From 285470d26fea35f274a03714094ec2a154a798f0 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Fri, 3 Oct 2014 16:13:39 +0100 Subject: [PATCH 01/10] First commit of new dev structure --- .travis.yml | 44 +- INSTALL.txt | 87 + Makefile.in | 69 + bin/Readme.md | 14 + bin/Setup_Py_Dir | 26 + configure | 47 + docs/README.md | 1 + docs/cookbook.pdf | Bin 0 -> 350267 bytes examples/1d_sn.pf | 44 + examples/cv_macro_benchmark.pf | 71 + examples/cv_standard.pf | 67 + examples/fiducial_agn.pf | 67 + examples/travis/Setup_Py_Dir | 26 + examples/travis/balmer_test.pf | 42 + examples/travis/check_travis_test.py | 73 + examples/travis/test1.pf | 5 + include/README | 3 + lib/README | 3 + py_progs/CheckComplete | 9 + py_progs/dev/history.txt | 2 + py_progs/error_scripts/py_error.py | 142 + py_progs/error_scripts/watchdog.py | 224 + py_progs/grid_Royal/grid_royal.py | 150 + py_progs/grid_Royal/history.txt | 2 + py_progs/grid_Royal/msub_split.py | 63 + py_progs/grid_comp/Old/compare.py.090301.old | 432 + py_progs/grid_comp/Old/compare.py.090302.old | 522 + py_progs/grid_comp/Old/compare.py.090306.old | 773 + py_progs/grid_comp/Old/compare.py.090307.old | 827 + py_progs/grid_comp/Old/compare.py.090312.old | 885 + py_progs/grid_comp/Old/compare.py.old | 396 + py_progs/grid_comp/Old/history.txt | 2 + py_progs/grid_comp/compare.py | 1003 + py_progs/grid_comp/compare_one.py | 119 + py_progs/grid_comp/history.txt | 2 + py_progs/history.txt | 2 + py_progs/make_royal/history.txt | 2 + py_progs/make_royal/make_royal.py | 195 + py_progs/make_royal/make_royal.py.old | 151 + py_progs/modules/Old/carlo.py.090303.old | 837 + py_progs/modules/Old/carlo.py.090304.old | 937 + py_progs/modules/Old/carlo.py.090312.old | 955 + py_progs/modules/Old/carlo.py.090314.old | 1003 + py_progs/modules/Old/carlo.py.old | 115 + py_progs/modules/Old/grid_eval.py.090606.old | 874 + py_progs/modules/Old/grid_eval.py.090609.old | 902 + py_progs/modules/Old/grid_eval.py.old | 422 + py_progs/modules/Old/history.txt | 2 + py_progs/modules/carlo.py | 1226 ++ py_progs/modules/carlo.pyc | Bin 0 -> 29100 bytes py_progs/modules/grid_eval.py | 1057 ++ py_progs/modules/grid_eval.py.old | 1030 + py_progs/modules/grid_eval.pyc | Bin 0 -> 22143 bytes py_progs/modules/history.txt | 2 + py_progs/modules/oldcarlo.py | 115 + py_progs/modules/oldcarlo.pyc | Bin 0 -> 2628 bytes py_progs/plot_roche | Bin 0 -> 71812 bytes py_progs/restart/history.txt | 2 + py_progs/restart/restart.py | 101 + py_progs/restart/restart.py.old | 98 + py_progs/scripts/compare.py | 1 + py_progs/scripts/grid_royal.py | 1 + py_progs/scripts/history.txt | 2 + py_progs/scripts/make_royal.py | 1 + py_progs/scripts/msub_split.py | 1 + py_progs/scripts/pf_update.py | 117 + py_progs/scripts/pyfits_eval.py | 353 + py_progs/scripts/pyfits_eval2.py | 383 + py_progs/scripts/restart.py | 1 + py_progs/setup_scripts/Setup_Py_Dir | 26 + software/Readme | 8 + software/cfitsio3040/History | 1 + software/cfitsio3040/License.txt | 53 + software/cfitsio3040/Makefile | 160 + software/cfitsio3040/Makefile.in | 160 + software/cfitsio3040/README | 151 + software/cfitsio3040/README.MacOS | 31 + software/cfitsio3040/README.win32 | 50 + software/cfitsio3040/buffers.c | 1446 ++ software/cfitsio3040/cfileio.c | 6345 +++++++ software/cfitsio3040/cfitsio.doc | 9127 +++++++++ software/cfitsio3040/cfitsio.pc | 10 + software/cfitsio3040/cfitsio.pc.in | 10 + software/cfitsio3040/cfitsio.ps | Bin 0 -> 914733 bytes software/cfitsio3040/cfitsio.tex | 10192 ++++++++++ software/cfitsio3040/cfitsio.toc | 120 + software/cfitsio3040/cfitsio_mac.sit.hqx | 1 + software/cfitsio3040/cfortran.doc | 2051 ++ software/cfitsio3040/cfortran.h | 2509 +++ software/cfitsio3040/changes.txt | 2977 +++ software/cfitsio3040/checksum.c | 508 + software/cfitsio3040/compress.c | 5271 ++++++ software/cfitsio3040/compress.h | 215 + software/cfitsio3040/compress_alternate.c | 155 + software/cfitsio3040/config.log | 694 + software/cfitsio3040/config.status | 719 + software/cfitsio3040/configure | 5950 ++++++ software/cfitsio3040/configure.in | 423 + software/cfitsio3040/cookbook.c | 571 + software/cfitsio3040/cookbook.f | 772 + software/cfitsio3040/drvrfile.c | 742 + software/cfitsio3040/drvrgsiftp.c | 522 + software/cfitsio3040/drvrgsiftp.h | 21 + software/cfitsio3040/drvrmem.c | 1163 ++ software/cfitsio3040/drvrnet.c | 2644 +++ software/cfitsio3040/drvrsmem.c | 973 + software/cfitsio3040/drvrsmem.h | 179 + software/cfitsio3040/editcol.c | 2384 +++ software/cfitsio3040/edithdu.c | 855 + software/cfitsio3040/eval.l | 512 + software/cfitsio3040/eval.y | 5572 ++++++ software/cfitsio3040/eval_defs.h | 159 + software/cfitsio3040/eval_f.c | 2781 +++ software/cfitsio3040/eval_l.c | 2219 +++ software/cfitsio3040/eval_tab.h | 41 + software/cfitsio3040/eval_y.c | 7042 +++++++ software/cfitsio3040/f77.inc | 31 + software/cfitsio3040/f77_wrap.h | 287 + software/cfitsio3040/f77_wrap1.c | 345 + software/cfitsio3040/f77_wrap2.c | 605 + software/cfitsio3040/f77_wrap3.c | 799 + software/cfitsio3040/f77_wrap4.c | 571 + software/cfitsio3040/fits_hcompress.c | 1685 ++ software/cfitsio3040/fits_hdecompress.c | 1970 ++ software/cfitsio3040/fitscopy.c | 60 + software/cfitsio3040/fitscore.c | 8379 +++++++++ software/cfitsio3040/fitsio.doc | 6418 +++++++ software/cfitsio3040/fitsio.h | 1791 ++ software/cfitsio3040/fitsio.ps | Bin 0 -> 689413 bytes software/cfitsio3040/fitsio.tex | 7493 ++++++++ software/cfitsio3040/fitsio.toc | 92 + software/cfitsio3040/fitsio2.h | 1150 ++ software/cfitsio3040/getcol.c | 1008 + software/cfitsio3040/getcolb.c | 2001 ++ software/cfitsio3040/getcold.c | 1676 ++ software/cfitsio3040/getcole.c | 1679 ++ software/cfitsio3040/getcoli.c | 1901 ++ software/cfitsio3040/getcolj.c | 3726 ++++ software/cfitsio3040/getcolk.c | 1894 ++ software/cfitsio3040/getcoll.c | 614 + software/cfitsio3040/getcols.c | 826 + software/cfitsio3040/getcolsb.c | 1991 ++ software/cfitsio3040/getcolui.c | 1907 ++ software/cfitsio3040/getcoluj.c | 1901 ++ software/cfitsio3040/getcoluk.c | 1916 ++ software/cfitsio3040/getkey.c | 3133 ++++ software/cfitsio3040/group.c | 6428 +++++++ software/cfitsio3040/group.h | 65 + software/cfitsio3040/grparser.c | 1365 ++ software/cfitsio3040/grparser.h | 185 + software/cfitsio3040/histo.c | 1375 ++ software/cfitsio3040/history.txt | 2 + software/cfitsio3040/imcompress.c | 3767 ++++ software/cfitsio3040/imcopy.c | 192 + software/cfitsio3040/iraffits.c | 1975 ++ software/cfitsio3040/iter_a.c | 147 + software/cfitsio3040/iter_a.f | 224 + software/cfitsio3040/iter_a.fit | 1111 ++ software/cfitsio3040/iter_b.c | 114 + software/cfitsio3040/iter_b.f | 193 + software/cfitsio3040/iter_b.fit | Bin 0 -> 408960 bytes software/cfitsio3040/iter_c.c | 171 + software/cfitsio3040/iter_c.f | 347 + software/cfitsio3040/iter_c.fit | 701 + software/cfitsio3040/iter_image.c | 93 + software/cfitsio3040/iter_var.c | 100 + software/cfitsio3040/listhead.c | 62 + software/cfitsio3040/longnam.h | 584 + software/cfitsio3040/make_dfloat.com | 90 + software/cfitsio3040/make_gfloat.com | 88 + software/cfitsio3040/make_ieee.com | 87 + software/cfitsio3040/makefile.bc | 496 + software/cfitsio3040/makefile.os2 | 22 + software/cfitsio3040/makefile.vcc | 706 + software/cfitsio3040/makepc.bat | 71 + software/cfitsio3040/mkpkg | 74 + software/cfitsio3040/modkey.c | 1641 ++ software/cfitsio3040/pliocomp.c | 331 + software/cfitsio3040/putcol.c | 1920 ++ software/cfitsio3040/putcolb.c | 1005 + software/cfitsio3040/putcold.c | 1052 ++ software/cfitsio3040/putcole.c | 1066 ++ software/cfitsio3040/putcoli.c | 976 + software/cfitsio3040/putcolj.c | 1976 ++ software/cfitsio3040/putcolk.c | 1004 + software/cfitsio3040/putcoll.c | 369 + software/cfitsio3040/putcols.c | 294 + software/cfitsio3040/putcolsb.c | 966 + software/cfitsio3040/putcolu.c | 629 + software/cfitsio3040/putcolui.c | 962 + software/cfitsio3040/putcoluj.c | 969 + software/cfitsio3040/putcoluk.c | 986 + software/cfitsio3040/putkey.c | 3046 +++ software/cfitsio3040/quantize.c | 857 + software/cfitsio3040/quick.ps | Bin 0 -> 252686 bytes software/cfitsio3040/quick.tex | 2159 +++ software/cfitsio3040/quick.toc | 25 + software/cfitsio3040/region.c | 949 + software/cfitsio3040/region.h | 80 + software/cfitsio3040/ricecomp.c | 510 + software/cfitsio3040/ricecomp.h | 107 + software/cfitsio3040/sample.tpl | 121 + software/cfitsio3040/scalnull.c | 230 + software/cfitsio3040/smem.c | 77 + software/cfitsio3040/speed.c | 483 + software/cfitsio3040/swapproc.c | 98 + software/cfitsio3040/testf77.f | 2488 +++ software/cfitsio3040/testf77.out | 746 + software/cfitsio3040/testf77.std | Bin 0 -> 66240 bytes software/cfitsio3040/testprog.c | 2588 +++ software/cfitsio3040/testprog.out | 797 + software/cfitsio3040/testprog.std | 48 + software/cfitsio3040/testprog.tpt | 12 + software/cfitsio3040/vmsieee.c | 130 + software/cfitsio3040/vmsieeed.mar | 137 + software/cfitsio3040/vmsieeer.mar | 106 + software/cfitsio3040/wcssub.c | 765 + software/cfitsio3040/wcsutil.c | 488 + software/cfitsio3040/wcsutil_alternate.c | 44 + software/cfitsio3040/winDumpExts.mak | 191 + software/cfitsio3040/windumpexts.c | 502 + software/gsl-1.15/.deps/gsl-histogram.Po | 83 + software/gsl-1.15/.deps/gsl-randist.Po | 108 + software/gsl-1.15/.deps/version.Plo | 7 + software/gsl-1.15/AUTHORS | 31 + software/gsl-1.15/BUGS | 1153 ++ software/gsl-1.15/COPYING | 674 + software/gsl-1.15/ChangeLog | 887 + software/gsl-1.15/INSTALL | 551 + software/gsl-1.15/Makefile | 1208 ++ software/gsl-1.15/Makefile.am | 72 + software/gsl-1.15/Makefile.in | 1208 ++ software/gsl-1.15/NEWS | 1525 ++ software/gsl-1.15/README | 81 + software/gsl-1.15/THANKS | 499 + software/gsl-1.15/TODO | 191 + software/gsl-1.15/aclocal.m4 | 9418 ++++++++++ software/gsl-1.15/autogen.sh | 15 + software/gsl-1.15/blas/.deps/blas.Plo | 256 + software/gsl-1.15/blas/ChangeLog | 77 + software/gsl-1.15/blas/Makefile.am | 14 + software/gsl-1.15/blas/Makefile.in | 547 + software/gsl-1.15/blas/TODO | 12 + software/gsl-1.15/blas/blas.c | 2190 +++ software/gsl-1.15/blas/gsl_blas.h | 602 + software/gsl-1.15/blas/gsl_blas_types.h | 54 + software/gsl-1.15/block/.deps/block.Plo | 133 + software/gsl-1.15/block/.deps/file.Plo | 135 + software/gsl-1.15/block/.deps/init.Plo | 134 + software/gsl-1.15/block/.deps/test.Po | 151 + software/gsl-1.15/block/ChangeLog | 42 + software/gsl-1.15/block/Makefile.am | 19 + software/gsl-1.15/block/Makefile.in | 666 + software/gsl-1.15/block/block.c | 87 + software/gsl-1.15/block/block_source.c | 30 + software/gsl-1.15/block/file.c | 102 + software/gsl-1.15/block/fprintf_source.c | 171 + software/gsl-1.15/block/fwrite_source.c | 116 + software/gsl-1.15/block/gsl_block.h | 24 + software/gsl-1.15/block/gsl_block_char.h | 65 + .../gsl-1.15/block/gsl_block_complex_double.h | 65 + .../gsl-1.15/block/gsl_block_complex_float.h | 65 + .../block/gsl_block_complex_long_double.h | 65 + software/gsl-1.15/block/gsl_block_double.h | 65 + software/gsl-1.15/block/gsl_block_float.h | 65 + software/gsl-1.15/block/gsl_block_int.h | 65 + software/gsl-1.15/block/gsl_block_long.h | 65 + .../gsl-1.15/block/gsl_block_long_double.h | 65 + software/gsl-1.15/block/gsl_block_short.h | 65 + software/gsl-1.15/block/gsl_block_uchar.h | 65 + software/gsl-1.15/block/gsl_block_uint.h | 65 + software/gsl-1.15/block/gsl_block_ulong.h | 65 + software/gsl-1.15/block/gsl_block_ushort.h | 65 + software/gsl-1.15/block/gsl_check_range.h | 57 + software/gsl-1.15/block/init.c | 87 + software/gsl-1.15/block/init_source.c | 80 + software/gsl-1.15/block/test.c | 223 + software/gsl-1.15/block/test_complex_io.c | 64 + software/gsl-1.15/block/test_complex_source.c | 124 + software/gsl-1.15/block/test_io.c | 66 + software/gsl-1.15/block/test_source.c | 121 + software/gsl-1.15/bspline/.deps/bspline.Plo | 284 + software/gsl-1.15/bspline/.deps/test.Po | 254 + software/gsl-1.15/bspline/ChangeLog | 37 + software/gsl-1.15/bspline/Makefile.am | 17 + software/gsl-1.15/bspline/Makefile.in | 666 + software/gsl-1.15/bspline/TODO | 10 + software/gsl-1.15/bspline/bspline.c | 1034 + software/gsl-1.15/bspline/bspline.h | 26 + software/gsl-1.15/bspline/gsl_bspline.h | 114 + software/gsl-1.15/bspline/test.c | 385 + software/gsl-1.15/build.h | 37 + software/gsl-1.15/cblas/.deps/caxpy.Plo | 64 + software/gsl-1.15/cblas/.deps/ccopy.Plo | 64 + software/gsl-1.15/cblas/.deps/cdotc_sub.Plo | 64 + software/gsl-1.15/cblas/.deps/cdotu_sub.Plo | 64 + software/gsl-1.15/cblas/.deps/cgbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/cgemm.Plo | 69 + software/gsl-1.15/cblas/.deps/cgemv.Plo | 69 + software/gsl-1.15/cblas/.deps/cgerc.Plo | 69 + software/gsl-1.15/cblas/.deps/cgeru.Plo | 69 + software/gsl-1.15/cblas/.deps/chbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/chemm.Plo | 69 + software/gsl-1.15/cblas/.deps/chemv.Plo | 69 + software/gsl-1.15/cblas/.deps/cher.Plo | 69 + software/gsl-1.15/cblas/.deps/cher2.Plo | 69 + software/gsl-1.15/cblas/.deps/cher2k.Plo | 69 + software/gsl-1.15/cblas/.deps/cherk.Plo | 69 + software/gsl-1.15/cblas/.deps/chpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/chpr.Plo | 69 + software/gsl-1.15/cblas/.deps/chpr2.Plo | 69 + software/gsl-1.15/cblas/.deps/cscal.Plo | 64 + software/gsl-1.15/cblas/.deps/csscal.Plo | 64 + software/gsl-1.15/cblas/.deps/cswap.Plo | 64 + software/gsl-1.15/cblas/.deps/csymm.Plo | 69 + software/gsl-1.15/cblas/.deps/csyr2k.Plo | 69 + software/gsl-1.15/cblas/.deps/csyrk.Plo | 69 + software/gsl-1.15/cblas/.deps/ctbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ctbsv.Plo | 71 + software/gsl-1.15/cblas/.deps/ctpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ctpsv.Plo | 71 + software/gsl-1.15/cblas/.deps/ctrmm.Plo | 69 + software/gsl-1.15/cblas/.deps/ctrmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ctrsm.Plo | 71 + software/gsl-1.15/cblas/.deps/ctrsv.Plo | 71 + software/gsl-1.15/cblas/.deps/dasum.Plo | 64 + software/gsl-1.15/cblas/.deps/daxpy.Plo | 64 + software/gsl-1.15/cblas/.deps/dcopy.Plo | 64 + software/gsl-1.15/cblas/.deps/ddot.Plo | 64 + software/gsl-1.15/cblas/.deps/dgbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dgemm.Plo | 69 + software/gsl-1.15/cblas/.deps/dgemv.Plo | 69 + software/gsl-1.15/cblas/.deps/dger.Plo | 69 + software/gsl-1.15/cblas/.deps/dnrm2.Plo | 64 + software/gsl-1.15/cblas/.deps/drot.Plo | 64 + software/gsl-1.15/cblas/.deps/drotg.Plo | 64 + software/gsl-1.15/cblas/.deps/drotm.Plo | 64 + software/gsl-1.15/cblas/.deps/drotmg.Plo | 64 + software/gsl-1.15/cblas/.deps/dsbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dscal.Plo | 64 + software/gsl-1.15/cblas/.deps/dsdot.Plo | 64 + software/gsl-1.15/cblas/.deps/dspmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dspr.Plo | 69 + software/gsl-1.15/cblas/.deps/dspr2.Plo | 69 + software/gsl-1.15/cblas/.deps/dswap.Plo | 64 + software/gsl-1.15/cblas/.deps/dsymm.Plo | 69 + software/gsl-1.15/cblas/.deps/dsymv.Plo | 69 + software/gsl-1.15/cblas/.deps/dsyr.Plo | 69 + software/gsl-1.15/cblas/.deps/dsyr2.Plo | 69 + software/gsl-1.15/cblas/.deps/dsyr2k.Plo | 69 + software/gsl-1.15/cblas/.deps/dsyrk.Plo | 69 + software/gsl-1.15/cblas/.deps/dtbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dtbsv.Plo | 69 + software/gsl-1.15/cblas/.deps/dtpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dtpsv.Plo | 69 + software/gsl-1.15/cblas/.deps/dtrmm.Plo | 69 + software/gsl-1.15/cblas/.deps/dtrmv.Plo | 69 + software/gsl-1.15/cblas/.deps/dtrsm.Plo | 69 + software/gsl-1.15/cblas/.deps/dtrsv.Plo | 69 + software/gsl-1.15/cblas/.deps/dzasum.Plo | 64 + software/gsl-1.15/cblas/.deps/dznrm2.Plo | 64 + software/gsl-1.15/cblas/.deps/icamax.Plo | 64 + software/gsl-1.15/cblas/.deps/idamax.Plo | 64 + software/gsl-1.15/cblas/.deps/isamax.Plo | 64 + software/gsl-1.15/cblas/.deps/izamax.Plo | 64 + software/gsl-1.15/cblas/.deps/sasum.Plo | 64 + software/gsl-1.15/cblas/.deps/saxpy.Plo | 64 + software/gsl-1.15/cblas/.deps/scasum.Plo | 64 + software/gsl-1.15/cblas/.deps/scnrm2.Plo | 64 + software/gsl-1.15/cblas/.deps/scopy.Plo | 64 + software/gsl-1.15/cblas/.deps/sdot.Plo | 64 + software/gsl-1.15/cblas/.deps/sdsdot.Plo | 64 + software/gsl-1.15/cblas/.deps/sgbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/sgemm.Plo | 69 + software/gsl-1.15/cblas/.deps/sgemv.Plo | 69 + software/gsl-1.15/cblas/.deps/sger.Plo | 69 + software/gsl-1.15/cblas/.deps/snrm2.Plo | 64 + software/gsl-1.15/cblas/.deps/srot.Plo | 64 + software/gsl-1.15/cblas/.deps/srotg.Plo | 64 + software/gsl-1.15/cblas/.deps/srotm.Plo | 64 + software/gsl-1.15/cblas/.deps/srotmg.Plo | 64 + software/gsl-1.15/cblas/.deps/ssbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/sscal.Plo | 64 + software/gsl-1.15/cblas/.deps/sspmv.Plo | 69 + software/gsl-1.15/cblas/.deps/sspr.Plo | 69 + software/gsl-1.15/cblas/.deps/sspr2.Plo | 69 + software/gsl-1.15/cblas/.deps/sswap.Plo | 64 + software/gsl-1.15/cblas/.deps/ssymm.Plo | 69 + software/gsl-1.15/cblas/.deps/ssymv.Plo | 69 + software/gsl-1.15/cblas/.deps/ssyr.Plo | 69 + software/gsl-1.15/cblas/.deps/ssyr2.Plo | 69 + software/gsl-1.15/cblas/.deps/ssyr2k.Plo | 69 + software/gsl-1.15/cblas/.deps/ssyrk.Plo | 69 + software/gsl-1.15/cblas/.deps/stbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/stbsv.Plo | 69 + software/gsl-1.15/cblas/.deps/stpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/stpsv.Plo | 69 + software/gsl-1.15/cblas/.deps/strmm.Plo | 69 + software/gsl-1.15/cblas/.deps/strmv.Plo | 69 + software/gsl-1.15/cblas/.deps/strsm.Plo | 69 + software/gsl-1.15/cblas/.deps/strsv.Plo | 69 + software/gsl-1.15/cblas/.deps/test.Po | 136 + software/gsl-1.15/cblas/.deps/test_amax.Po | 84 + software/gsl-1.15/cblas/.deps/test_asum.Po | 84 + software/gsl-1.15/cblas/.deps/test_axpy.Po | 84 + software/gsl-1.15/cblas/.deps/test_copy.Po | 84 + software/gsl-1.15/cblas/.deps/test_dot.Po | 84 + software/gsl-1.15/cblas/.deps/test_gbmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_gemm.Po | 84 + software/gsl-1.15/cblas/.deps/test_gemv.Po | 84 + software/gsl-1.15/cblas/.deps/test_ger.Po | 84 + software/gsl-1.15/cblas/.deps/test_hbmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_hemm.Po | 84 + software/gsl-1.15/cblas/.deps/test_hemv.Po | 84 + software/gsl-1.15/cblas/.deps/test_her.Po | 84 + software/gsl-1.15/cblas/.deps/test_her2.Po | 84 + software/gsl-1.15/cblas/.deps/test_her2k.Po | 84 + software/gsl-1.15/cblas/.deps/test_herk.Po | 84 + software/gsl-1.15/cblas/.deps/test_hpmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_hpr.Po | 84 + software/gsl-1.15/cblas/.deps/test_hpr2.Po | 84 + software/gsl-1.15/cblas/.deps/test_nrm2.Po | 84 + software/gsl-1.15/cblas/.deps/test_rot.Po | 84 + software/gsl-1.15/cblas/.deps/test_rotg.Po | 84 + software/gsl-1.15/cblas/.deps/test_rotm.Po | 84 + software/gsl-1.15/cblas/.deps/test_rotmg.Po | 84 + software/gsl-1.15/cblas/.deps/test_sbmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_scal.Po | 84 + software/gsl-1.15/cblas/.deps/test_spmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_spr.Po | 84 + software/gsl-1.15/cblas/.deps/test_spr2.Po | 84 + software/gsl-1.15/cblas/.deps/test_swap.Po | 84 + software/gsl-1.15/cblas/.deps/test_symm.Po | 84 + software/gsl-1.15/cblas/.deps/test_symv.Po | 84 + software/gsl-1.15/cblas/.deps/test_syr.Po | 84 + software/gsl-1.15/cblas/.deps/test_syr2.Po | 84 + software/gsl-1.15/cblas/.deps/test_syr2k.Po | 84 + software/gsl-1.15/cblas/.deps/test_syrk.Po | 84 + software/gsl-1.15/cblas/.deps/test_tbmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_tbsv.Po | 84 + software/gsl-1.15/cblas/.deps/test_tpmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_tpsv.Po | 84 + software/gsl-1.15/cblas/.deps/test_trmm.Po | 84 + software/gsl-1.15/cblas/.deps/test_trmv.Po | 84 + software/gsl-1.15/cblas/.deps/test_trsm.Po | 84 + software/gsl-1.15/cblas/.deps/test_trsv.Po | 84 + software/gsl-1.15/cblas/.deps/xerbla.Plo | 90 + software/gsl-1.15/cblas/.deps/zaxpy.Plo | 64 + software/gsl-1.15/cblas/.deps/zcopy.Plo | 64 + software/gsl-1.15/cblas/.deps/zdotc_sub.Plo | 64 + software/gsl-1.15/cblas/.deps/zdotu_sub.Plo | 64 + software/gsl-1.15/cblas/.deps/zdscal.Plo | 64 + software/gsl-1.15/cblas/.deps/zgbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/zgemm.Plo | 69 + software/gsl-1.15/cblas/.deps/zgemv.Plo | 69 + software/gsl-1.15/cblas/.deps/zgerc.Plo | 69 + software/gsl-1.15/cblas/.deps/zgeru.Plo | 69 + software/gsl-1.15/cblas/.deps/zhbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/zhemm.Plo | 69 + software/gsl-1.15/cblas/.deps/zhemv.Plo | 69 + software/gsl-1.15/cblas/.deps/zher.Plo | 69 + software/gsl-1.15/cblas/.deps/zher2.Plo | 69 + software/gsl-1.15/cblas/.deps/zher2k.Plo | 69 + software/gsl-1.15/cblas/.deps/zherk.Plo | 69 + software/gsl-1.15/cblas/.deps/zhpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/zhpr.Plo | 69 + software/gsl-1.15/cblas/.deps/zhpr2.Plo | 69 + software/gsl-1.15/cblas/.deps/zscal.Plo | 64 + software/gsl-1.15/cblas/.deps/zswap.Plo | 64 + software/gsl-1.15/cblas/.deps/zsymm.Plo | 69 + software/gsl-1.15/cblas/.deps/zsyr2k.Plo | 69 + software/gsl-1.15/cblas/.deps/zsyrk.Plo | 69 + software/gsl-1.15/cblas/.deps/ztbmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ztbsv.Plo | 71 + software/gsl-1.15/cblas/.deps/ztpmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ztpsv.Plo | 71 + software/gsl-1.15/cblas/.deps/ztrmm.Plo | 69 + software/gsl-1.15/cblas/.deps/ztrmv.Plo | 69 + software/gsl-1.15/cblas/.deps/ztrsm.Plo | 71 + software/gsl-1.15/cblas/.deps/ztrsv.Plo | 71 + software/gsl-1.15/cblas/ChangeLog | 40 + software/gsl-1.15/cblas/Makefile.am | 24 + software/gsl-1.15/cblas/Makefile.in | 953 + software/gsl-1.15/cblas/TODO | 11 + software/gsl-1.15/cblas/caxpy.c | 12 + software/gsl-1.15/cblas/cblas.h | 34 + software/gsl-1.15/cblas/ccopy.c | 12 + software/gsl-1.15/cblas/cdotc_sub.c | 14 + software/gsl-1.15/cblas/cdotu_sub.c | 14 + software/gsl-1.15/cblas/cgbmv.c | 15 + software/gsl-1.15/cblas/cgemm.c | 16 + software/gsl-1.15/cblas/cgemv.c | 15 + software/gsl-1.15/cblas/cgerc.c | 14 + software/gsl-1.15/cblas/cgeru.c | 14 + software/gsl-1.15/cblas/chbmv.c | 15 + software/gsl-1.15/cblas/chemm.c | 15 + software/gsl-1.15/cblas/chemv.c | 15 + software/gsl-1.15/cblas/cher.c | 14 + software/gsl-1.15/cblas/cher2.c | 14 + software/gsl-1.15/cblas/cher2k.c | 15 + software/gsl-1.15/cblas/cherk.c | 15 + software/gsl-1.15/cblas/chpmv.c | 14 + software/gsl-1.15/cblas/chpr.c | 14 + software/gsl-1.15/cblas/chpr2.c | 14 + software/gsl-1.15/cblas/cscal.c | 11 + software/gsl-1.15/cblas/csscal.c | 11 + software/gsl-1.15/cblas/cswap.c | 11 + software/gsl-1.15/cblas/csymm.c | 15 + software/gsl-1.15/cblas/csyr2k.c | 15 + software/gsl-1.15/cblas/csyrk.c | 15 + software/gsl-1.15/cblas/ctbmv.c | 15 + software/gsl-1.15/cblas/ctbsv.c | 17 + software/gsl-1.15/cblas/ctpmv.c | 14 + software/gsl-1.15/cblas/ctpsv.c | 16 + software/gsl-1.15/cblas/ctrmm.c | 16 + software/gsl-1.15/cblas/ctrmv.c | 15 + software/gsl-1.15/cblas/ctrsm.c | 18 + software/gsl-1.15/cblas/ctrsv.c | 17 + software/gsl-1.15/cblas/dasum.c | 11 + software/gsl-1.15/cblas/daxpy.c | 12 + software/gsl-1.15/cblas/dcopy.c | 12 + software/gsl-1.15/cblas/ddot.c | 16 + software/gsl-1.15/cblas/dgbmv.c | 16 + software/gsl-1.15/cblas/dgemm.c | 16 + software/gsl-1.15/cblas/dgemv.c | 15 + software/gsl-1.15/cblas/dger.c | 14 + software/gsl-1.15/cblas/dnrm2.c | 11 + software/gsl-1.15/cblas/drot.c | 12 + software/gsl-1.15/cblas/drotg.c | 11 + software/gsl-1.15/cblas/drotm.c | 12 + software/gsl-1.15/cblas/drotmg.c | 11 + software/gsl-1.15/cblas/dsbmv.c | 15 + software/gsl-1.15/cblas/dscal.c | 11 + software/gsl-1.15/cblas/dsdot.c | 16 + software/gsl-1.15/cblas/dspmv.c | 15 + software/gsl-1.15/cblas/dspr.c | 14 + software/gsl-1.15/cblas/dspr2.c | 14 + software/gsl-1.15/cblas/dswap.c | 12 + software/gsl-1.15/cblas/dsymm.c | 16 + software/gsl-1.15/cblas/dsymv.c | 15 + software/gsl-1.15/cblas/dsyr.c | 14 + software/gsl-1.15/cblas/dsyr2.c | 14 + software/gsl-1.15/cblas/dsyr2k.c | 16 + software/gsl-1.15/cblas/dsyrk.c | 15 + software/gsl-1.15/cblas/dtbmv.c | 15 + software/gsl-1.15/cblas/dtbsv.c | 15 + software/gsl-1.15/cblas/dtpmv.c | 14 + software/gsl-1.15/cblas/dtpsv.c | 14 + software/gsl-1.15/cblas/dtrmm.c | 16 + software/gsl-1.15/cblas/dtrmv.c | 15 + software/gsl-1.15/cblas/dtrsm.c | 16 + software/gsl-1.15/cblas/dtrsv.c | 15 + software/gsl-1.15/cblas/dzasum.c | 11 + software/gsl-1.15/cblas/dznrm2.c | 11 + software/gsl-1.15/cblas/error_cblas.h | 87 + software/gsl-1.15/cblas/error_cblas_l2.h | 239 + software/gsl-1.15/cblas/error_cblas_l3.h | 246 + software/gsl-1.15/cblas/gsl_cblas.h | 606 + software/gsl-1.15/cblas/hypot.c | 28 + software/gsl-1.15/cblas/icamax.c | 11 + software/gsl-1.15/cblas/idamax.c | 11 + software/gsl-1.15/cblas/isamax.c | 11 + software/gsl-1.15/cblas/izamax.c | 11 + software/gsl-1.15/cblas/sasum.c | 11 + software/gsl-1.15/cblas/saxpy.c | 12 + software/gsl-1.15/cblas/scasum.c | 11 + software/gsl-1.15/cblas/scnrm2.c | 11 + software/gsl-1.15/cblas/scopy.c | 12 + software/gsl-1.15/cblas/sdot.c | 16 + software/gsl-1.15/cblas/sdsdot.c | 16 + software/gsl-1.15/cblas/sgbmv.c | 15 + software/gsl-1.15/cblas/sgemm.c | 16 + software/gsl-1.15/cblas/sgemv.c | 15 + software/gsl-1.15/cblas/sger.c | 14 + software/gsl-1.15/cblas/snrm2.c | 11 + software/gsl-1.15/cblas/source_asum_c.h | 34 + software/gsl-1.15/cblas/source_asum_r.h | 34 + software/gsl-1.15/cblas/source_axpy_c.h | 40 + software/gsl-1.15/cblas/source_axpy_r.h | 50 + software/gsl-1.15/cblas/source_copy_c.h | 31 + software/gsl-1.15/cblas/source_copy_r.h | 30 + software/gsl-1.15/cblas/source_dot_c.h | 38 + software/gsl-1.15/cblas/source_dot_r.h | 33 + software/gsl-1.15/cblas/source_gbmv_c.h | 172 + software/gsl-1.15/cblas/source_gbmv_r.h | 100 + software/gsl-1.15/cblas/source_gemm_c.h | 171 + software/gsl-1.15/cblas/source_gemm_r.h | 127 + software/gsl-1.15/cblas/source_gemv_c.h | 160 + software/gsl-1.15/cblas/source_gemv_r.h | 92 + software/gsl-1.15/cblas/source_ger.h | 50 + software/gsl-1.15/cblas/source_gerc.h | 67 + software/gsl-1.15/cblas/source_geru.h | 67 + software/gsl-1.15/cblas/source_hbmv.h | 149 + software/gsl-1.15/cblas/source_hemm.h | 208 + software/gsl-1.15/cblas/source_hemv.h | 140 + software/gsl-1.15/cblas/source_her.h | 82 + software/gsl-1.15/cblas/source_her2.h | 119 + software/gsl-1.15/cblas/source_her2k.h | 273 + software/gsl-1.15/cblas/source_herk.h | 163 + software/gsl-1.15/cblas/source_hpmv.h | 142 + software/gsl-1.15/cblas/source_hpr.h | 82 + software/gsl-1.15/cblas/source_hpr2.h | 119 + software/gsl-1.15/cblas/source_iamax_c.h | 41 + software/gsl-1.15/cblas/source_iamax_r.h | 39 + software/gsl-1.15/cblas/source_nrm2_c.h | 60 + software/gsl-1.15/cblas/source_nrm2_r.h | 50 + software/gsl-1.15/cblas/source_rot.h | 32 + software/gsl-1.15/cblas/source_rotg.h | 46 + software/gsl-1.15/cblas/source_rotm.h | 58 + software/gsl-1.15/cblas/source_rotmg.h | 162 + software/gsl-1.15/cblas/source_sbmv.h | 102 + software/gsl-1.15/cblas/source_scal_c.h | 37 + software/gsl-1.15/cblas/source_scal_c_s.h | 33 + software/gsl-1.15/cblas/source_scal_r.h | 32 + software/gsl-1.15/cblas/source_spmv.h | 102 + software/gsl-1.15/cblas/source_spr.h | 58 + software/gsl-1.15/cblas/source_spr2.h | 68 + software/gsl-1.15/cblas/source_swap_c.h | 35 + software/gsl-1.15/cblas/source_swap_r.h | 31 + software/gsl-1.15/cblas/source_symm_c.h | 207 + software/gsl-1.15/cblas/source_symm_r.h | 133 + software/gsl-1.15/cblas/source_symv.h | 95 + software/gsl-1.15/cblas/source_syr.h | 58 + software/gsl-1.15/cblas/source_syr2.h | 68 + software/gsl-1.15/cblas/source_syr2k_c.h | 194 + software/gsl-1.15/cblas/source_syr2k_r.h | 131 + software/gsl-1.15/cblas/source_syrk_c.h | 168 + software/gsl-1.15/cblas/source_syrk_r.h | 127 + software/gsl-1.15/cblas/source_tbmv_c.h | 172 + software/gsl-1.15/cblas/source_tbmv_r.h | 109 + software/gsl-1.15/cblas/source_tbsv_c.h | 181 + software/gsl-1.15/cblas/source_tbsv_r.h | 125 + software/gsl-1.15/cblas/source_tpmv_c.h | 174 + software/gsl-1.15/cblas/source_tpmv_r.h | 100 + software/gsl-1.15/cblas/source_tpsv_c.h | 229 + software/gsl-1.15/cblas/source_tpsv_r.h | 134 + software/gsl-1.15/cblas/source_trmm_c.h | 335 + software/gsl-1.15/cblas/source_trmm_r.h | 226 + software/gsl-1.15/cblas/source_trmv_c.h | 171 + software/gsl-1.15/cblas/source_trmv_r.h | 110 + software/gsl-1.15/cblas/source_trsm_c.h | 402 + software/gsl-1.15/cblas/source_trsm_r.h | 278 + software/gsl-1.15/cblas/source_trsv_c.h | 230 + software/gsl-1.15/cblas/source_trsv_r.h | 134 + software/gsl-1.15/cblas/srot.c | 12 + software/gsl-1.15/cblas/srotg.c | 11 + software/gsl-1.15/cblas/srotm.c | 12 + software/gsl-1.15/cblas/srotmg.c | 11 + software/gsl-1.15/cblas/ssbmv.c | 15 + software/gsl-1.15/cblas/sscal.c | 11 + software/gsl-1.15/cblas/sspmv.c | 14 + software/gsl-1.15/cblas/sspr.c | 14 + software/gsl-1.15/cblas/sspr2.c | 14 + software/gsl-1.15/cblas/sswap.c | 11 + software/gsl-1.15/cblas/ssymm.c | 15 + software/gsl-1.15/cblas/ssymv.c | 15 + software/gsl-1.15/cblas/ssyr.c | 14 + software/gsl-1.15/cblas/ssyr2.c | 14 + software/gsl-1.15/cblas/ssyr2k.c | 16 + software/gsl-1.15/cblas/ssyrk.c | 15 + software/gsl-1.15/cblas/stbmv.c | 15 + software/gsl-1.15/cblas/stbsv.c | 15 + software/gsl-1.15/cblas/stpmv.c | 14 + software/gsl-1.15/cblas/stpsv.c | 14 + software/gsl-1.15/cblas/strmm.c | 16 + software/gsl-1.15/cblas/strmv.c | 15 + software/gsl-1.15/cblas/strsm.c | 16 + software/gsl-1.15/cblas/strsv.c | 15 + software/gsl-1.15/cblas/test.c | 38 + software/gsl-1.15/cblas/test_amax.c | 142 + software/gsl-1.15/cblas/test_asum.c | 143 + software/gsl-1.15/cblas/test_axpy.c | 233 + software/gsl-1.15/cblas/test_copy.c | 221 + software/gsl-1.15/cblas/test_dot.c | 383 + software/gsl-1.15/cblas/test_gbmv.c | 543 + software/gsl-1.15/cblas/test_gemm.c | 1399 ++ software/gsl-1.15/cblas/test_gemv.c | 503 + software/gsl-1.15/cblas/test_ger.c | 283 + software/gsl-1.15/cblas/test_hbmv.c | 411 + software/gsl-1.15/cblas/test_hemm.c | 427 + software/gsl-1.15/cblas/test_hemv.c | 395 + software/gsl-1.15/cblas/test_her.c | 179 + software/gsl-1.15/cblas/test_her2.c | 195 + software/gsl-1.15/cblas/test_her2k.c | 427 + software/gsl-1.15/cblas/test_herk.c | 395 + software/gsl-1.15/cblas/test_hpmv.c | 379 + software/gsl-1.15/cblas/test_hpr.c | 171 + software/gsl-1.15/cblas/test_hpr2.c | 187 + software/gsl-1.15/cblas/test_nrm2.c | 143 + software/gsl-1.15/cblas/test_rot.c | 635 + software/gsl-1.15/cblas/test_rotg.c | 1677 ++ software/gsl-1.15/cblas/test_rotm.c | 1511 ++ software/gsl-1.15/cblas/test_rotmg.c | 167 + software/gsl-1.15/cblas/test_sbmv.c | 395 + software/gsl-1.15/cblas/test_scal.c | 911 + software/gsl-1.15/cblas/test_spmv.c | 363 + software/gsl-1.15/cblas/test_spr.c | 163 + software/gsl-1.15/cblas/test_spr2.c | 179 + software/gsl-1.15/cblas/test_swap.c | 311 + software/gsl-1.15/cblas/test_symm.c | 827 + software/gsl-1.15/cblas/test_symv.c | 379 + software/gsl-1.15/cblas/test_syr.c | 171 + software/gsl-1.15/cblas/test_syr2.c | 187 + software/gsl-1.15/cblas/test_syr2k.c | 827 + software/gsl-1.15/cblas/test_syrk.c | 763 + software/gsl-1.15/cblas/test_tbmv.c | 1819 ++ software/gsl-1.15/cblas/test_tbsv.c | 1819 ++ software/gsl-1.15/cblas/test_tpmv.c | 1659 ++ software/gsl-1.15/cblas/test_tpsv.c | 1659 ++ software/gsl-1.15/cblas/test_trmm.c | 3947 ++++ software/gsl-1.15/cblas/test_trmv.c | 1739 ++ software/gsl-1.15/cblas/test_trsm.c | 3947 ++++ software/gsl-1.15/cblas/test_trsv.c | 1739 ++ software/gsl-1.15/cblas/tests.c | 44 + software/gsl-1.15/cblas/tests.h | 44 + software/gsl-1.15/cblas/xerbla.c | 44 + software/gsl-1.15/cblas/zaxpy.c | 12 + software/gsl-1.15/cblas/zcopy.c | 12 + software/gsl-1.15/cblas/zdotc_sub.c | 14 + software/gsl-1.15/cblas/zdotu_sub.c | 14 + software/gsl-1.15/cblas/zdscal.c | 11 + software/gsl-1.15/cblas/zgbmv.c | 15 + software/gsl-1.15/cblas/zgemm.c | 16 + software/gsl-1.15/cblas/zgemv.c | 15 + software/gsl-1.15/cblas/zgerc.c | 14 + software/gsl-1.15/cblas/zgeru.c | 14 + software/gsl-1.15/cblas/zhbmv.c | 15 + software/gsl-1.15/cblas/zhemm.c | 15 + software/gsl-1.15/cblas/zhemv.c | 15 + software/gsl-1.15/cblas/zher.c | 14 + software/gsl-1.15/cblas/zher2.c | 14 + software/gsl-1.15/cblas/zher2k.c | 15 + software/gsl-1.15/cblas/zherk.c | 15 + software/gsl-1.15/cblas/zhpmv.c | 14 + software/gsl-1.15/cblas/zhpr.c | 14 + software/gsl-1.15/cblas/zhpr2.c | 14 + software/gsl-1.15/cblas/zscal.c | 11 + software/gsl-1.15/cblas/zswap.c | 11 + software/gsl-1.15/cblas/zsymm.c | 15 + software/gsl-1.15/cblas/zsyr2k.c | 15 + software/gsl-1.15/cblas/zsyrk.c | 15 + software/gsl-1.15/cblas/ztbmv.c | 15 + software/gsl-1.15/cblas/ztbsv.c | 17 + software/gsl-1.15/cblas/ztpmv.c | 14 + software/gsl-1.15/cblas/ztpsv.c | 16 + software/gsl-1.15/cblas/ztrmm.c | 16 + software/gsl-1.15/cblas/ztrmv.c | 15 + software/gsl-1.15/cblas/ztrsm.c | 18 + software/gsl-1.15/cblas/ztrsv.c | 17 + software/gsl-1.15/cdf/.deps/beta.Plo | 66 + software/gsl-1.15/cdf/.deps/betainv.Plo | 142 + software/gsl-1.15/cdf/.deps/binomial.Plo | 90 + software/gsl-1.15/cdf/.deps/cauchy.Plo | 59 + software/gsl-1.15/cdf/.deps/cauchyinv.Plo | 59 + software/gsl-1.15/cdf/.deps/chisq.Plo | 10 + software/gsl-1.15/cdf/.deps/chisqinv.Plo | 10 + software/gsl-1.15/cdf/.deps/exponential.Plo | 59 + .../gsl-1.15/cdf/.deps/exponentialinv.Plo | 59 + software/gsl-1.15/cdf/.deps/exppow.Plo | 25 + software/gsl-1.15/cdf/.deps/fdist.Plo | 92 + software/gsl-1.15/cdf/.deps/fdistinv.Plo | 86 + software/gsl-1.15/cdf/.deps/flat.Plo | 59 + software/gsl-1.15/cdf/.deps/flatinv.Plo | 5 + software/gsl-1.15/cdf/.deps/gamma.Plo | 63 + software/gsl-1.15/cdf/.deps/gammainv.Plo | 139 + software/gsl-1.15/cdf/.deps/gauss.Plo | 59 + software/gsl-1.15/cdf/.deps/gaussinv.Plo | 86 + software/gsl-1.15/cdf/.deps/geometric.Plo | 85 + software/gsl-1.15/cdf/.deps/gumbel1.Plo | 59 + software/gsl-1.15/cdf/.deps/gumbel1inv.Plo | 59 + software/gsl-1.15/cdf/.deps/gumbel2.Plo | 59 + software/gsl-1.15/cdf/.deps/gumbel2inv.Plo | 59 + .../gsl-1.15/cdf/.deps/hypergeometric.Plo | 137 + software/gsl-1.15/cdf/.deps/laplace.Plo | 59 + software/gsl-1.15/cdf/.deps/laplaceinv.Plo | 59 + software/gsl-1.15/cdf/.deps/logistic.Plo | 59 + software/gsl-1.15/cdf/.deps/logisticinv.Plo | 59 + software/gsl-1.15/cdf/.deps/lognormal.Plo | 59 + software/gsl-1.15/cdf/.deps/lognormalinv.Plo | 59 + software/gsl-1.15/cdf/.deps/nbinomial.Plo | 85 + software/gsl-1.15/cdf/.deps/pareto.Plo | 59 + software/gsl-1.15/cdf/.deps/paretoinv.Plo | 59 + software/gsl-1.15/cdf/.deps/pascal.Plo | 59 + software/gsl-1.15/cdf/.deps/poisson.Plo | 85 + software/gsl-1.15/cdf/.deps/rayleigh.Plo | 59 + software/gsl-1.15/cdf/.deps/rayleighinv.Plo | 59 + software/gsl-1.15/cdf/.deps/tdist.Plo | 90 + software/gsl-1.15/cdf/.deps/tdistinv.Plo | 139 + software/gsl-1.15/cdf/.deps/test.Po | 142 + software/gsl-1.15/cdf/.deps/weibull.Plo | 59 + software/gsl-1.15/cdf/.deps/weibullinv.Plo | 59 + software/gsl-1.15/cdf/ChangeLog | 135 + software/gsl-1.15/cdf/Makefile.am | 17 + software/gsl-1.15/cdf/Makefile.in | 712 + software/gsl-1.15/cdf/TODO | 28 + software/gsl-1.15/cdf/beta.c | 66 + software/gsl-1.15/cdf/beta_inc.c | 193 + software/gsl-1.15/cdf/betainv.c | 225 + software/gsl-1.15/cdf/binomial.c | 108 + software/gsl-1.15/cdf/cauchy.c | 59 + software/gsl-1.15/cdf/cauchyinv.c | 75 + software/gsl-1.15/cdf/chisq.c | 34 + software/gsl-1.15/cdf/chisqinv.c | 34 + software/gsl-1.15/cdf/error.h | 4 + software/gsl-1.15/cdf/exponential.c | 59 + software/gsl-1.15/cdf/exponentialinv.c | 39 + software/gsl-1.15/cdf/exppow.c | 70 + software/gsl-1.15/cdf/fdist.c | 81 + software/gsl-1.15/cdf/fdistinv.c | 104 + software/gsl-1.15/cdf/flat.c | 65 + software/gsl-1.15/cdf/flatinv.c | 59 + software/gsl-1.15/cdf/gamma.c | 74 + software/gsl-1.15/cdf/gammainv.c | 195 + software/gsl-1.15/cdf/gauss.c | 351 + software/gsl-1.15/cdf/gaussinv.c | 202 + software/gsl-1.15/cdf/geometric.c | 90 + software/gsl-1.15/cdf/gsl_cdf.h | 170 + software/gsl-1.15/cdf/gumbel1.c | 50 + software/gsl-1.15/cdf/gumbel1inv.c | 61 + software/gsl-1.15/cdf/gumbel2.c | 59 + software/gsl-1.15/cdf/gumbel2inv.c | 61 + software/gsl-1.15/cdf/hypergeometric.c | 183 + software/gsl-1.15/cdf/laplace.c | 59 + software/gsl-1.15/cdf/laplaceinv.c | 75 + software/gsl-1.15/cdf/logistic.c | 59 + software/gsl-1.15/cdf/logisticinv.c | 61 + software/gsl-1.15/cdf/lognormal.c | 39 + software/gsl-1.15/cdf/lognormalinv.c | 65 + software/gsl-1.15/cdf/nbinomial.c | 83 + software/gsl-1.15/cdf/pareto.c | 57 + software/gsl-1.15/cdf/paretoinv.c | 61 + software/gsl-1.15/cdf/pascal.c | 40 + software/gsl-1.15/cdf/poisson.c | 84 + software/gsl-1.15/cdf/rat_eval.h | 25 + software/gsl-1.15/cdf/rayleigh.c | 39 + software/gsl-1.15/cdf/rayleighinv.c | 61 + software/gsl-1.15/cdf/tdist.c | 271 + software/gsl-1.15/cdf/tdistinv.c | 239 + software/gsl-1.15/cdf/test.c | 1391 ++ software/gsl-1.15/cdf/test_auto.c | 1464 ++ software/gsl-1.15/cdf/weibull.c | 37 + software/gsl-1.15/cdf/weibullinv.c | 61 + software/gsl-1.15/cheb/.deps/deriv.Plo | 134 + software/gsl-1.15/cheb/.deps/eval.Plo | 134 + software/gsl-1.15/cheb/.deps/init.Plo | 134 + software/gsl-1.15/cheb/.deps/integ.Plo | 134 + software/gsl-1.15/cheb/.deps/test.Po | 138 + software/gsl-1.15/cheb/ChangeLog | 74 + software/gsl-1.15/cheb/Makefile.am | 17 + software/gsl-1.15/cheb/Makefile.in | 664 + software/gsl-1.15/cheb/TODO | 4 + software/gsl-1.15/cheb/deriv.c | 60 + software/gsl-1.15/cheb/eval.c | 206 + software/gsl-1.15/cheb/gsl_chebyshev.h | 133 + software/gsl-1.15/cheb/init.c | 117 + software/gsl-1.15/cheb/integ.c | 65 + software/gsl-1.15/cheb/test.c | 297 + .../combination/.deps/combination.Plo | 98 + software/gsl-1.15/combination/.deps/file.Plo | 97 + software/gsl-1.15/combination/.deps/init.Plo | 97 + .../gsl-1.15/combination/.deps/inline.Plo | 98 + software/gsl-1.15/combination/.deps/test.Po | 104 + software/gsl-1.15/combination/ChangeLog | 43 + software/gsl-1.15/combination/Makefile.am | 25 + software/gsl-1.15/combination/Makefile.in | 673 + software/gsl-1.15/combination/TODO | 4 + software/gsl-1.15/combination/combination.c | 172 + software/gsl-1.15/combination/file.c | 114 + .../gsl-1.15/combination/gsl_combination.h | 92 + software/gsl-1.15/combination/init.c | 128 + software/gsl-1.15/combination/inline.c | 24 + software/gsl-1.15/combination/test.c | 261 + software/gsl-1.15/complex/.deps/inline.Plo | 10 + software/gsl-1.15/complex/.deps/math.Plo | 61 + software/gsl-1.15/complex/.deps/test.Po | 142 + software/gsl-1.15/complex/ChangeLog | 80 + software/gsl-1.15/complex/Makefile.am | 20 + software/gsl-1.15/complex/Makefile.in | 669 + software/gsl-1.15/complex/TODO | 21 + software/gsl-1.15/complex/gsl_complex.h | 103 + software/gsl-1.15/complex/gsl_complex_math.h | 142 + software/gsl-1.15/complex/inline.c | 24 + software/gsl-1.15/complex/math.c | 1019 + software/gsl-1.15/complex/results.h | 4573 +++++ software/gsl-1.15/complex/results1.h | 583 + software/gsl-1.15/complex/results2.h | 42 + software/gsl-1.15/complex/results_real.h | 115 + software/gsl-1.15/complex/results_zreal.h | 28 + software/gsl-1.15/complex/test.c | 256 + software/gsl-1.15/config.guess | 1501 ++ software/gsl-1.15/config.h | 309 + software/gsl-1.15/config.h.in | 308 + software/gsl-1.15/config.log | 1439 ++ software/gsl-1.15/config.status | 2163 +++ software/gsl-1.15/config.sub | 1705 ++ software/gsl-1.15/configure | 15076 +++++++++++++++ software/gsl-1.15/configure.ac | 567 + software/gsl-1.15/const/.deps/test.Po | 141 + software/gsl-1.15/const/ChangeLog | 81 + software/gsl-1.15/const/Makefile.am | 15 + software/gsl-1.15/const/Makefile.in | 642 + software/gsl-1.15/const/TODO | 4 + software/gsl-1.15/const/gsl_const.h | 31 + software/gsl-1.15/const/gsl_const_cgs.h | 116 + software/gsl-1.15/const/gsl_const_cgsm.h | 122 + software/gsl-1.15/const/gsl_const_mks.h | 126 + software/gsl-1.15/const/gsl_const_mksa.h | 126 + software/gsl-1.15/const/gsl_const_num.h | 43 + software/gsl-1.15/const/test.c | 97 + software/gsl-1.15/depcomp | 630 + software/gsl-1.15/deriv/.deps/deriv.Plo | 131 + software/gsl-1.15/deriv/.deps/test.Po | 136 + software/gsl-1.15/deriv/ChangeLog | 13 + software/gsl-1.15/deriv/Makefile.am | 16 + software/gsl-1.15/deriv/Makefile.in | 664 + software/gsl-1.15/deriv/deriv.c | 178 + software/gsl-1.15/deriv/gsl_deriv.h | 50 + software/gsl-1.15/deriv/test.c | 209 + software/gsl-1.15/dht/.deps/dht.Plo | 138 + software/gsl-1.15/dht/.deps/test.Po | 90 + software/gsl-1.15/dht/ChangeLog | 14 + software/gsl-1.15/dht/Makefile.am | 15 + software/gsl-1.15/dht/Makefile.in | 662 + software/gsl-1.15/dht/dht.c | 227 + software/gsl-1.15/dht/gsl_dht.h | 87 + software/gsl-1.15/dht/test.c | 193 + software/gsl-1.15/diff/.deps/diff.Plo | 131 + software/gsl-1.15/diff/.deps/test.Po | 136 + software/gsl-1.15/diff/ChangeLog | 25 + software/gsl-1.15/diff/Makefile.am | 16 + software/gsl-1.15/diff/Makefile.in | 664 + software/gsl-1.15/diff/diff.c | 182 + software/gsl-1.15/diff/gsl_diff.h | 52 + software/gsl-1.15/diff/test.c | 197 + software/gsl-1.15/doc/12-cities.eps | 15622 ++++++++++++++++ software/gsl-1.15/doc/ChangeLog | 67 + software/gsl-1.15/doc/Makefile.am | 21 + software/gsl-1.15/doc/Makefile.in | 840 + software/gsl-1.15/doc/algorithm.sty | 79 + software/gsl-1.15/doc/algorithmic.sty | 158 + software/gsl-1.15/doc/autoconf.texi | 132 + software/gsl-1.15/doc/blas.texi | 698 + software/gsl-1.15/doc/bspline.eps | 6930 +++++++ software/gsl-1.15/doc/bspline.texi | 271 + software/gsl-1.15/doc/calc.sty | 150 + software/gsl-1.15/doc/cblas.texi | 514 + software/gsl-1.15/doc/cheb.eps | 3348 ++++ software/gsl-1.15/doc/cheb.texi | 194 + software/gsl-1.15/doc/combination.texi | 223 + software/gsl-1.15/doc/complex.texi | 493 + software/gsl-1.15/doc/const.texi | 576 + software/gsl-1.15/doc/debug.texi | 389 + software/gsl-1.15/doc/dht.texi | 159 + software/gsl-1.15/doc/diff.texi | 105 + software/gsl-1.15/doc/dwt-orig.eps | 2657 +++ software/gsl-1.15/doc/dwt-samp.eps | 2657 +++ software/gsl-1.15/doc/dwt.texi | 452 + software/gsl-1.15/doc/eigen.texi | 851 + software/gsl-1.15/doc/err.texi | 306 + software/gsl-1.15/doc/examples/blas.c | 31 + software/gsl-1.15/doc/examples/blas.out | 2 + software/gsl-1.15/doc/examples/block.c | 14 + software/gsl-1.15/doc/examples/block.out | 2 + software/gsl-1.15/doc/examples/bspline.c | 124 + software/gsl-1.15/doc/examples/cblas.c | 33 + software/gsl-1.15/doc/examples/cblas.out | 2 + software/gsl-1.15/doc/examples/cdf.c | 23 + software/gsl-1.15/doc/examples/cdf.out | 4 + software/gsl-1.15/doc/examples/cheb.c | 40 + software/gsl-1.15/doc/examples/combination.c | 25 + .../gsl-1.15/doc/examples/combination.out | 17 + software/gsl-1.15/doc/examples/const.c | 25 + software/gsl-1.15/doc/examples/const.out | 3 + software/gsl-1.15/doc/examples/demo_fn.c | 40 + software/gsl-1.15/doc/examples/demo_fn.h | 9 + software/gsl-1.15/doc/examples/diff.c | 32 + software/gsl-1.15/doc/examples/diff.out | 8 + software/gsl-1.15/doc/examples/dwt.c | 54 + software/gsl-1.15/doc/examples/dwt.dat | 256 + software/gsl-1.15/doc/examples/ecg.dat | 256 + software/gsl-1.15/doc/examples/eigen.c | 50 + .../gsl-1.15/doc/examples/eigen_nonsymm.c | 55 + software/gsl-1.15/doc/examples/expfit.c | 70 + software/gsl-1.15/doc/examples/fft.c | 43 + software/gsl-1.15/doc/examples/fftmr.c | 60 + software/gsl-1.15/doc/examples/fftreal.c | 59 + software/gsl-1.15/doc/examples/fitting.c | 45 + software/gsl-1.15/doc/examples/fitting2.c | 80 + software/gsl-1.15/doc/examples/fitting3.c | 29 + software/gsl-1.15/doc/examples/histogram.c | 37 + software/gsl-1.15/doc/examples/histogram2d.c | 50 + software/gsl-1.15/doc/examples/ieee.c | 22 + software/gsl-1.15/doc/examples/ieeeround.c | 30 + software/gsl-1.15/doc/examples/integration.c | 37 + .../gsl-1.15/doc/examples/integration.out | 5 + software/gsl-1.15/doc/examples/interp.c | 41 + software/gsl-1.15/doc/examples/interpp.c | 40 + software/gsl-1.15/doc/examples/intro.c | 11 + software/gsl-1.15/doc/examples/intro.out | 1 + software/gsl-1.15/doc/examples/linalglu.c | 36 + software/gsl-1.15/doc/examples/linalglu.out | 4 + software/gsl-1.15/doc/examples/matrix.c | 22 + software/gsl-1.15/doc/examples/matrixw.c | 40 + software/gsl-1.15/doc/examples/min.c | 65 + software/gsl-1.15/doc/examples/min.out | 13 + software/gsl-1.15/doc/examples/monte.c | 106 + software/gsl-1.15/doc/examples/multimin.c | 58 + software/gsl-1.15/doc/examples/multimin.out | 15 + software/gsl-1.15/doc/examples/multiminfn.c | 39 + software/gsl-1.15/doc/examples/multiset.c | 25 + software/gsl-1.15/doc/examples/multiset.out | 71 + software/gsl-1.15/doc/examples/nlfit.c | 115 + software/gsl-1.15/doc/examples/nmsimplex.c | 62 + software/gsl-1.15/doc/examples/nmsimplex.out | 25 + software/gsl-1.15/doc/examples/ntupler.c | 72 + software/gsl-1.15/doc/examples/ntuplew.c | 43 + .../doc/examples/ode-initval-low-level.c | 38 + software/gsl-1.15/doc/examples/ode-initval.c | 62 + software/gsl-1.15/doc/examples/odefixed.c | 30 + software/gsl-1.15/doc/examples/permseq.c | 21 + software/gsl-1.15/doc/examples/permshuffle.c | 40 + software/gsl-1.15/doc/examples/polyroots.c | 26 + software/gsl-1.15/doc/examples/polyroots.out | 5 + software/gsl-1.15/doc/examples/qrng.c | 19 + .../gsl-1.15/doc/examples/randpoisson.2.out | 2 + software/gsl-1.15/doc/examples/randpoisson.c | 35 + .../gsl-1.15/doc/examples/randpoisson.out | 1 + software/gsl-1.15/doc/examples/randwalk.c | 29 + software/gsl-1.15/doc/examples/rng.c | 22 + software/gsl-1.15/doc/examples/rng.out | 3 + software/gsl-1.15/doc/examples/rngunif.2.out | 12 + software/gsl-1.15/doc/examples/rngunif.c | 26 + software/gsl-1.15/doc/examples/rngunif.out | 10 + software/gsl-1.15/doc/examples/rootnewt.c | 52 + software/gsl-1.15/doc/examples/roots.c | 58 + software/gsl-1.15/doc/examples/siman.c | 82 + software/gsl-1.15/doc/examples/sortsmall.c | 38 + software/gsl-1.15/doc/examples/sortsmall.out | 6 + software/gsl-1.15/doc/examples/specfun.c | 15 + software/gsl-1.15/doc/examples/specfun.out | 2 + software/gsl-1.15/doc/examples/specfun_e.c | 21 + software/gsl-1.15/doc/examples/specfun_e.out | 4 + software/gsl-1.15/doc/examples/stat.c | 23 + software/gsl-1.15/doc/examples/stat.out | 5 + software/gsl-1.15/doc/examples/statsort.c | 36 + software/gsl-1.15/doc/examples/statsort.out | 5 + software/gsl-1.15/doc/examples/sum.c | 47 + software/gsl-1.15/doc/examples/sum.out | 6 + software/gsl-1.15/doc/examples/vector.c | 22 + software/gsl-1.15/doc/examples/vectorr.c | 23 + software/gsl-1.15/doc/examples/vectorview.c | 30 + software/gsl-1.15/doc/examples/vectorview.out | 10 + software/gsl-1.15/doc/examples/vectorw.c | 23 + software/gsl-1.15/doc/fdl.texi | 513 + .../gsl-1.15/doc/fft-complex-radix2-f.eps | 298 + .../gsl-1.15/doc/fft-complex-radix2-t.eps | 426 + software/gsl-1.15/doc/fft-complex-radix2.eps | 682 + software/gsl-1.15/doc/fft-real-mixedradix.eps | 606 + software/gsl-1.15/doc/fft.texi | 1039 + software/gsl-1.15/doc/fftalgorithms.bib | 240 + software/gsl-1.15/doc/fftalgorithms.tex | 3296 ++++ software/gsl-1.15/doc/final-route.eps | 11635 ++++++++++++ software/gsl-1.15/doc/fit-exp.eps | 767 + software/gsl-1.15/doc/fit-wlinear.eps | 6958 +++++++ software/gsl-1.15/doc/fit-wlinear2.eps | 5908 ++++++ software/gsl-1.15/doc/fitting.texi | 518 + software/gsl-1.15/doc/freemanuals.texi | 99 + software/gsl-1.15/doc/gpl.texi | 723 + software/gsl-1.15/doc/gsl-config.1 | 41 + software/gsl-1.15/doc/gsl-design.texi | 1636 ++ software/gsl-1.15/doc/gsl-histogram.1 | 42 + software/gsl-1.15/doc/gsl-randist.1 | 38 + software/gsl-1.15/doc/gsl-ref.info | 630 + software/gsl-1.15/doc/gsl-ref.info-1 | 7374 ++++++++ software/gsl-1.15/doc/gsl-ref.info-2 | 7031 +++++++ software/gsl-1.15/doc/gsl-ref.info-3 | 7407 ++++++++ software/gsl-1.15/doc/gsl-ref.info-4 | 6600 +++++++ software/gsl-1.15/doc/gsl-ref.info-5 | Bin 0 -> 268397 bytes software/gsl-1.15/doc/gsl-ref.info-6 | Bin 0 -> 105581 bytes software/gsl-1.15/doc/gsl-ref.texi | 671 + software/gsl-1.15/doc/gsl.3 | 58 + software/gsl-1.15/doc/histogram.eps | 3088 +++ software/gsl-1.15/doc/histogram.texi | 1173 ++ software/gsl-1.15/doc/histogram2d.eps | 776 + software/gsl-1.15/doc/ieee754.texi | 470 + software/gsl-1.15/doc/initial-route.eps | 11867 ++++++++++++ software/gsl-1.15/doc/integration.texi | 973 + software/gsl-1.15/doc/interp.texi | 338 + software/gsl-1.15/doc/interp2.eps | 3252 ++++ software/gsl-1.15/doc/interpp2.eps | 2004 ++ software/gsl-1.15/doc/intro.texi | 246 + software/gsl-1.15/doc/landau.dat | 201 + software/gsl-1.15/doc/linalg.texi | 1203 ++ software/gsl-1.15/doc/math.texi | 364 + software/gsl-1.15/doc/mdate-sh | 205 + software/gsl-1.15/doc/min-interval.eps | 330 + software/gsl-1.15/doc/min.texi | 408 + software/gsl-1.15/doc/montecarlo.texi | 767 + software/gsl-1.15/doc/multifit.texi | 655 + software/gsl-1.15/doc/multimin.eps | 778 + software/gsl-1.15/doc/multimin.texi | 597 + software/gsl-1.15/doc/multiroots.texi | 1088 ++ software/gsl-1.15/doc/multiset.texi | 201 + software/gsl-1.15/doc/ntuple.eps | 555 + software/gsl-1.15/doc/ntuple.texi | 198 + software/gsl-1.15/doc/ode-initval.texi | 770 + software/gsl-1.15/doc/permutation.texi | 382 + software/gsl-1.15/doc/poly.texi | 322 + software/gsl-1.15/doc/qrng.eps | 1420 ++ software/gsl-1.15/doc/qrng.texi | 174 + software/gsl-1.15/doc/rand-bernoulli.tex | 824 + software/gsl-1.15/doc/rand-beta.tex | 1446 ++ software/gsl-1.15/doc/rand-binomial.tex | 882 + .../gsl-1.15/doc/rand-bivariate-gaussian.tex | 1374 ++ software/gsl-1.15/doc/rand-cauchy.tex | 1157 ++ software/gsl-1.15/doc/rand-chisq.tex | 1424 ++ software/gsl-1.15/doc/rand-erlang.tex | 1443 ++ software/gsl-1.15/doc/rand-exponential.tex | 1130 ++ software/gsl-1.15/doc/rand-exppow.tex | 1157 ++ software/gsl-1.15/doc/rand-fdist.tex | 1115 ++ software/gsl-1.15/doc/rand-flat.tex | 1140 ++ software/gsl-1.15/doc/rand-gamma.tex | 1443 ++ software/gsl-1.15/doc/rand-gaussian-tail.tex | 835 + software/gsl-1.15/doc/rand-gaussian.tex | 1160 ++ software/gsl-1.15/doc/rand-geometric.tex | 864 + software/gsl-1.15/doc/rand-gumbel.tex | 966 + software/gsl-1.15/doc/rand-gumbel1.tex | 844 + software/gsl-1.15/doc/rand-gumbel2.tex | 841 + software/gsl-1.15/doc/rand-hypergeometric.tex | 695 + software/gsl-1.15/doc/rand-landau.tex | 705 + software/gsl-1.15/doc/rand-laplace.tex | 1160 ++ software/gsl-1.15/doc/rand-levy.tex | 1157 ++ software/gsl-1.15/doc/rand-levyskew.tex | 859 + software/gsl-1.15/doc/rand-logarithmic.tex | 894 + software/gsl-1.15/doc/rand-logistic.tex | 1154 ++ software/gsl-1.15/doc/rand-lognormal.tex | 1125 ++ software/gsl-1.15/doc/rand-nbinomial.tex | 882 + software/gsl-1.15/doc/rand-pareto.tex | 1142 ++ software/gsl-1.15/doc/rand-pascal.tex | 881 + software/gsl-1.15/doc/rand-poisson.tex | 882 + software/gsl-1.15/doc/rand-rayleigh-tail.tex | 1136 ++ software/gsl-1.15/doc/rand-rayleigh.tex | 1151 ++ software/gsl-1.15/doc/rand-tdist.tex | 1154 ++ software/gsl-1.15/doc/rand-weibull.tex | 1443 ++ software/gsl-1.15/doc/randist.texi | 2299 +++ software/gsl-1.15/doc/random-walk.tex | 658 + software/gsl-1.15/doc/randplots.gnp | 376 + software/gsl-1.15/doc/rng.texi | 1473 ++ software/gsl-1.15/doc/roots-bisection.eps | 1784 ++ .../gsl-1.15/doc/roots-false-position.eps | 633 + .../gsl-1.15/doc/roots-newtons-method.eps | 567 + software/gsl-1.15/doc/roots-secant-method.eps | 510 + software/gsl-1.15/doc/roots.texi | 911 + software/gsl-1.15/doc/siman-energy.eps | 11782 ++++++++++++ software/gsl-1.15/doc/siman-test.eps | 11278 +++++++++++ software/gsl-1.15/doc/siman.texi | 371 + software/gsl-1.15/doc/sort.texi | 315 + software/gsl-1.15/doc/specfunc-airy.texi | 130 + software/gsl-1.15/doc/specfunc-bessel.texi | 592 + software/gsl-1.15/doc/specfunc-clausen.texi | 28 + software/gsl-1.15/doc/specfunc-coulomb.texi | 151 + software/gsl-1.15/doc/specfunc-coupling.texi | 109 + software/gsl-1.15/doc/specfunc-dawson.texi | 12 + software/gsl-1.15/doc/specfunc-debye.texi | 63 + software/gsl-1.15/doc/specfunc-dilog.texi | 35 + .../gsl-1.15/doc/specfunc-elementary.texi | 23 + software/gsl-1.15/doc/specfunc-ellint.texi | 198 + software/gsl-1.15/doc/specfunc-elljac.texi | 13 + software/gsl-1.15/doc/specfunc-erf.texi | 99 + software/gsl-1.15/doc/specfunc-exp.texi | 135 + software/gsl-1.15/doc/specfunc-expint.texi | 183 + .../gsl-1.15/doc/specfunc-fermi-dirac.texi | 125 + software/gsl-1.15/doc/specfunc-gamma.texi | 316 + .../gsl-1.15/doc/specfunc-gegenbauer.texi | 42 + software/gsl-1.15/doc/specfunc-hyperg.texi | 107 + software/gsl-1.15/doc/specfunc-laguerre.texi | 40 + software/gsl-1.15/doc/specfunc-lambert.texi | 28 + software/gsl-1.15/doc/specfunc-legendre.texi | 273 + software/gsl-1.15/doc/specfunc-log.texi | 47 + software/gsl-1.15/doc/specfunc-mathieu.texi | 258 + software/gsl-1.15/doc/specfunc-pow-int.texi | 22 + software/gsl-1.15/doc/specfunc-psi.texi | 90 + .../gsl-1.15/doc/specfunc-synchrotron.texi | 24 + software/gsl-1.15/doc/specfunc-transport.texi | 34 + software/gsl-1.15/doc/specfunc-trig.texi | 160 + software/gsl-1.15/doc/specfunc-zeta.texi | 101 + software/gsl-1.15/doc/specfunc.texi | 359 + software/gsl-1.15/doc/stamp-vti | 4 + software/gsl-1.15/doc/statistics.texi | 817 + software/gsl-1.15/doc/statnotes.tex | 93 + software/gsl-1.15/doc/sum.texi | 188 + software/gsl-1.15/doc/texinfo.tex | 8997 +++++++++ software/gsl-1.15/doc/usage.texi | 525 + software/gsl-1.15/doc/vdp.eps | 1082 ++ software/gsl-1.15/doc/vectors.texi | 1701 ++ software/gsl-1.15/doc/version.texi | 4 + software/gsl-1.15/eigen/.deps/francis.Plo | 268 + software/gsl-1.15/eigen/.deps/gen.Plo | 265 + software/gsl-1.15/eigen/.deps/genherm.Plo | 268 + software/gsl-1.15/eigen/.deps/genhermv.Plo | 268 + software/gsl-1.15/eigen/.deps/gensymm.Plo | 266 + software/gsl-1.15/eigen/.deps/gensymmv.Plo | 266 + software/gsl-1.15/eigen/.deps/genv.Plo | 265 + software/gsl-1.15/eigen/.deps/herm.Plo | 258 + software/gsl-1.15/eigen/.deps/hermv.Plo | 260 + software/gsl-1.15/eigen/.deps/jacobi.Plo | 249 + software/gsl-1.15/eigen/.deps/nonsymm.Plo | 265 + software/gsl-1.15/eigen/.deps/nonsymmv.Plo | 267 + software/gsl-1.15/eigen/.deps/schur.Plo | 260 + software/gsl-1.15/eigen/.deps/sort.Plo | 251 + software/gsl-1.15/eigen/.deps/symm.Plo | 258 + software/gsl-1.15/eigen/.deps/symmv.Plo | 258 + software/gsl-1.15/eigen/.deps/test.Po | 335 + software/gsl-1.15/eigen/ChangeLog | 146 + software/gsl-1.15/eigen/Makefile.am | 18 + software/gsl-1.15/eigen/Makefile.in | 684 + software/gsl-1.15/eigen/TODO | 22 + software/gsl-1.15/eigen/francis.c | 1047 ++ software/gsl-1.15/eigen/gen.c | 2116 +++ software/gsl-1.15/eigen/genherm.c | 227 + software/gsl-1.15/eigen/genhermv.c | 205 + software/gsl-1.15/eigen/gensymm.c | 213 + software/gsl-1.15/eigen/gensymmv.c | 202 + software/gsl-1.15/eigen/genv.c | 925 + software/gsl-1.15/eigen/gsl_eigen.h | 347 + software/gsl-1.15/eigen/herm.c | 182 + software/gsl-1.15/eigen/hermv.c | 250 + software/gsl-1.15/eigen/jacobi.c | 263 + software/gsl-1.15/eigen/nonsymm.c | 293 + software/gsl-1.15/eigen/nonsymmv.c | 987 + software/gsl-1.15/eigen/qrstep.c | 211 + software/gsl-1.15/eigen/schur.c | 798 + software/gsl-1.15/eigen/sort.c | 346 + software/gsl-1.15/eigen/symm.c | 180 + software/gsl-1.15/eigen/symmv.c | 216 + software/gsl-1.15/eigen/test.c | 1342 ++ software/gsl-1.15/err/.deps/error.Plo | 95 + software/gsl-1.15/err/.deps/message.Plo | 95 + software/gsl-1.15/err/.deps/stream.Plo | 95 + software/gsl-1.15/err/.deps/strerror.Plo | 43 + software/gsl-1.15/err/.deps/test.Po | 92 + software/gsl-1.15/err/ChangeLog | 161 + software/gsl-1.15/err/Makefile.am | 12 + software/gsl-1.15/err/Makefile.in | 662 + software/gsl-1.15/err/TODO | 6 + software/gsl-1.15/err/error.c | 78 + software/gsl-1.15/err/gsl_errno.h | 154 + software/gsl-1.15/err/gsl_message.h | 80 + software/gsl-1.15/err/message.c | 38 + software/gsl-1.15/err/stream.c | 66 + software/gsl-1.15/err/strerror.c | 101 + software/gsl-1.15/err/test.c | 116 + software/gsl-1.15/fft/.deps/dft.Plo | 150 + software/gsl-1.15/fft/.deps/fft.Plo | 242 + software/gsl-1.15/fft/.deps/signals.Po | 154 + software/gsl-1.15/fft/.deps/test.Po | 190 + software/gsl-1.15/fft/ChangeLog | 140 + software/gsl-1.15/fft/Makefile.am | 21 + software/gsl-1.15/fft/Makefile.in | 667 + software/gsl-1.15/fft/TODO | 17 + software/gsl-1.15/fft/bitreverse.c | 101 + software/gsl-1.15/fft/bitreverse.h | 33 + software/gsl-1.15/fft/c_init.c | 195 + software/gsl-1.15/fft/c_main.c | 223 + software/gsl-1.15/fft/c_pass.h | 106 + software/gsl-1.15/fft/c_pass_2.c | 98 + software/gsl-1.15/fft/c_pass_3.c | 127 + software/gsl-1.15/fft/c_pass_4.c | 147 + software/gsl-1.15/fft/c_pass_5.c | 205 + software/gsl-1.15/fft/c_pass_6.c | 220 + software/gsl-1.15/fft/c_pass_7.c | 312 + software/gsl-1.15/fft/c_pass_n.c | 204 + software/gsl-1.15/fft/c_radix2.c | 316 + software/gsl-1.15/fft/compare.h | 30 + software/gsl-1.15/fft/compare_source.c | 125 + software/gsl-1.15/fft/complex_internal.h | 14 + software/gsl-1.15/fft/dft.c | 25 + software/gsl-1.15/fft/dft_source.c | 104 + software/gsl-1.15/fft/factorize.c | 176 + software/gsl-1.15/fft/factorize.h | 29 + software/gsl-1.15/fft/fft.c | 117 + software/gsl-1.15/fft/gsl_dft_complex.h | 55 + software/gsl-1.15/fft/gsl_dft_complex_float.h | 55 + software/gsl-1.15/fft/gsl_fft.h | 60 + software/gsl-1.15/fft/gsl_fft_complex.h | 136 + software/gsl-1.15/fft/gsl_fft_complex_float.h | 139 + software/gsl-1.15/fft/gsl_fft_halfcomplex.h | 86 + .../gsl-1.15/fft/gsl_fft_halfcomplex_float.h | 86 + software/gsl-1.15/fft/gsl_fft_real.h | 80 + software/gsl-1.15/fft/gsl_fft_real_float.h | 79 + software/gsl-1.15/fft/hc_init.c | 128 + software/gsl-1.15/fft/hc_main.c | 188 + software/gsl-1.15/fft/hc_pass.h | 76 + software/gsl-1.15/fft/hc_pass_2.c | 106 + software/gsl-1.15/fft/hc_pass_3.c | 162 + software/gsl-1.15/fft/hc_pass_4.c | 189 + software/gsl-1.15/fft/hc_pass_5.c | 264 + software/gsl-1.15/fft/hc_pass_n.c | 257 + software/gsl-1.15/fft/hc_radix2.c | 173 + software/gsl-1.15/fft/hc_unpack.c | 90 + software/gsl-1.15/fft/real_init.c | 183 + software/gsl-1.15/fft/real_main.c | 145 + software/gsl-1.15/fft/real_pass.h | 65 + software/gsl-1.15/fft/real_pass_2.c | 116 + software/gsl-1.15/fft/real_pass_3.c | 166 + software/gsl-1.15/fft/real_pass_4.c | 203 + software/gsl-1.15/fft/real_pass_5.c | 283 + software/gsl-1.15/fft/real_pass_n.c | 264 + software/gsl-1.15/fft/real_radix2.c | 134 + software/gsl-1.15/fft/real_unpack.c | 42 + software/gsl-1.15/fft/signals.c | 26 + software/gsl-1.15/fft/signals.h | 64 + software/gsl-1.15/fft/signals_source.c | 288 + software/gsl-1.15/fft/test.c | 126 + software/gsl-1.15/fft/test_complex_source.c | 448 + software/gsl-1.15/fft/test_real_source.c | 235 + software/gsl-1.15/fft/test_trap_source.c | 138 + software/gsl-1.15/fft/urand.c | 26 + software/gsl-1.15/fit/.deps/linear.Plo | 131 + software/gsl-1.15/fit/.deps/test.Po | 129 + software/gsl-1.15/fit/ChangeLog | 18 + software/gsl-1.15/fit/Makefile.am | 18 + software/gsl-1.15/fit/Makefile.in | 664 + software/gsl-1.15/fit/gsl_fit.h | 85 + software/gsl-1.15/fit/linear.c | 346 + software/gsl-1.15/fit/test.c | 173 + software/gsl-1.15/gsl-config.in | 80 + software/gsl-1.15/gsl-histogram.c | 78 + software/gsl-1.15/gsl-randist.c | 394 + software/gsl-1.15/gsl.m4 | 162 + software/gsl-1.15/gsl.pc.in | 11 + software/gsl-1.15/gsl.spec | 80 + software/gsl-1.15/gsl.spec.in | 80 + software/gsl-1.15/gsl/Makefile.am | 17 + software/gsl-1.15/gsl/Makefile.in | 387 + software/gsl-1.15/gsl_inline.h | 67 + software/gsl-1.15/gsl_machine.h | 104 + software/gsl-1.15/gsl_math.h | 164 + software/gsl-1.15/gsl_minmax.h | 102 + software/gsl-1.15/gsl_mode.h | 88 + software/gsl-1.15/gsl_nan.h | 45 + software/gsl-1.15/gsl_pow_int.h | 61 + software/gsl-1.15/gsl_precision.h | 66 + software/gsl-1.15/gsl_types.h | 41 + software/gsl-1.15/gsl_version.h | 26 + software/gsl-1.15/gsl_version.h.in | 26 + software/gsl-1.15/histogram/.deps/add.Plo | 94 + software/gsl-1.15/histogram/.deps/add2d.Plo | 99 + .../gsl-1.15/histogram/.deps/calloc_range.Plo | 92 + .../histogram/.deps/calloc_range2d.Plo | 92 + software/gsl-1.15/histogram/.deps/copy.Plo | 92 + software/gsl-1.15/histogram/.deps/copy2d.Plo | 92 + software/gsl-1.15/histogram/.deps/file.Plo | 129 + software/gsl-1.15/histogram/.deps/file2d.Plo | 129 + software/gsl-1.15/histogram/.deps/get.Plo | 94 + software/gsl-1.15/histogram/.deps/get2d.Plo | 94 + software/gsl-1.15/histogram/.deps/init.Plo | 92 + software/gsl-1.15/histogram/.deps/init2d.Plo | 95 + software/gsl-1.15/histogram/.deps/maxval.Plo | 92 + .../gsl-1.15/histogram/.deps/maxval2d.Plo | 93 + software/gsl-1.15/histogram/.deps/oper.Plo | 92 + software/gsl-1.15/histogram/.deps/oper2d.Plo | 92 + software/gsl-1.15/histogram/.deps/params.Plo | 92 + .../gsl-1.15/histogram/.deps/params2d.Plo | 93 + software/gsl-1.15/histogram/.deps/pdf.Plo | 95 + software/gsl-1.15/histogram/.deps/pdf2d.Plo | 97 + software/gsl-1.15/histogram/.deps/reset.Plo | 92 + software/gsl-1.15/histogram/.deps/reset2d.Plo | 92 + software/gsl-1.15/histogram/.deps/stat.Plo | 95 + software/gsl-1.15/histogram/.deps/stat2d.Plo | 94 + software/gsl-1.15/histogram/.deps/test.Po | 88 + software/gsl-1.15/histogram/.deps/test1d.Po | 88 + .../histogram/.deps/test1d_resample.Po | 92 + .../gsl-1.15/histogram/.deps/test1d_trap.Po | 97 + software/gsl-1.15/histogram/.deps/test2d.Po | 136 + .../histogram/.deps/test2d_resample.Po | 92 + .../gsl-1.15/histogram/.deps/test2d_trap.Po | 97 + software/gsl-1.15/histogram/ChangeLog | 170 + software/gsl-1.15/histogram/Makefile.am | 20 + software/gsl-1.15/histogram/Makefile.in | 700 + software/gsl-1.15/histogram/TODO | 6 + software/gsl-1.15/histogram/add.c | 55 + software/gsl-1.15/histogram/add2d.c | 66 + software/gsl-1.15/histogram/calloc_range.c | 108 + software/gsl-1.15/histogram/calloc_range2d.c | 153 + software/gsl-1.15/histogram/copy.c | 91 + software/gsl-1.15/histogram/copy2d.c | 96 + software/gsl-1.15/histogram/file.c | 127 + software/gsl-1.15/histogram/file2d.c | 184 + software/gsl-1.15/histogram/find.c | 86 + software/gsl-1.15/histogram/find2d.c | 50 + software/gsl-1.15/histogram/get.c | 69 + software/gsl-1.15/histogram/get2d.c | 101 + software/gsl-1.15/histogram/gsl_histogram.h | 134 + software/gsl-1.15/histogram/gsl_histogram2d.h | 172 + software/gsl-1.15/histogram/init.c | 199 + software/gsl-1.15/histogram/init2d.c | 301 + software/gsl-1.15/histogram/maxval.c | 101 + software/gsl-1.15/histogram/maxval2d.c | 140 + software/gsl-1.15/histogram/oper.c | 195 + software/gsl-1.15/histogram/oper2d.c | 203 + software/gsl-1.15/histogram/params.c | 42 + software/gsl-1.15/histogram/params2d.c | 60 + software/gsl-1.15/histogram/pdf.c | 154 + software/gsl-1.15/histogram/pdf2d.c | 187 + software/gsl-1.15/histogram/reset.c | 34 + software/gsl-1.15/histogram/reset2d.c | 35 + software/gsl-1.15/histogram/stat.c | 141 + software/gsl-1.15/histogram/stat2d.c | 266 + software/gsl-1.15/histogram/test.c | 45 + software/gsl-1.15/histogram/test1d.c | 483 + software/gsl-1.15/histogram/test1d_resample.c | 99 + software/gsl-1.15/histogram/test1d_trap.c | 130 + software/gsl-1.15/histogram/test2d.c | 753 + software/gsl-1.15/histogram/test2d_resample.c | 115 + software/gsl-1.15/histogram/test2d_trap.c | 203 + software/gsl-1.15/histogram/urand.c | 26 + software/gsl-1.15/ieee-utils/.deps/env.Plo | 93 + software/gsl-1.15/ieee-utils/.deps/fp.Plo | 47 + .../gsl-1.15/ieee-utils/.deps/make_rep.Plo | 87 + software/gsl-1.15/ieee-utils/.deps/print.Plo | 38 + software/gsl-1.15/ieee-utils/.deps/read.Plo | 100 + software/gsl-1.15/ieee-utils/.deps/test.Po | 98 + software/gsl-1.15/ieee-utils/ChangeLog | 229 + software/gsl-1.15/ieee-utils/Makefile.am | 14 + software/gsl-1.15/ieee-utils/Makefile.in | 666 + software/gsl-1.15/ieee-utils/TODO | 5 + software/gsl-1.15/ieee-utils/endian.c | 37 + software/gsl-1.15/ieee-utils/env.c | 114 + software/gsl-1.15/ieee-utils/fp-aix.c | 155 + software/gsl-1.15/ieee-utils/fp-darwin.c | 95 + software/gsl-1.15/ieee-utils/fp-darwin86.c | 204 + software/gsl-1.15/ieee-utils/fp-freebsd.c | 102 + software/gsl-1.15/ieee-utils/fp-gnuc99.c | 182 + software/gsl-1.15/ieee-utils/fp-gnum68k.c | 101 + software/gsl-1.15/ieee-utils/fp-gnuppc.c | 98 + software/gsl-1.15/ieee-utils/fp-gnusparc.c | 97 + software/gsl-1.15/ieee-utils/fp-gnux86.c | 111 + software/gsl-1.15/ieee-utils/fp-hpux.c | 110 + software/gsl-1.15/ieee-utils/fp-hpux11.c | 105 + software/gsl-1.15/ieee-utils/fp-irix.c | 110 + software/gsl-1.15/ieee-utils/fp-netbsd.c | 118 + software/gsl-1.15/ieee-utils/fp-openbsd.c | 121 + software/gsl-1.15/ieee-utils/fp-os2emx.c | 91 + software/gsl-1.15/ieee-utils/fp-solaris.c | 110 + software/gsl-1.15/ieee-utils/fp-sunos4.c | 122 + software/gsl-1.15/ieee-utils/fp-tru64.c | 176 + software/gsl-1.15/ieee-utils/fp-unknown.c | 30 + software/gsl-1.15/ieee-utils/fp.c | 50 + software/gsl-1.15/ieee-utils/gsl_ieee_utils.h | 99 + software/gsl-1.15/ieee-utils/make_rep.c | 197 + software/gsl-1.15/ieee-utils/print.c | 99 + software/gsl-1.15/ieee-utils/read.c | 194 + software/gsl-1.15/ieee-utils/standardize.c | 61 + software/gsl-1.15/ieee-utils/test.c | 482 + software/gsl-1.15/install-sh | 520 + software/gsl-1.15/integration/.deps/cquad.Plo | 133 + .../gsl-1.15/integration/.deps/glfixed.Plo | 131 + software/gsl-1.15/integration/.deps/qag.Plo | 140 + software/gsl-1.15/integration/.deps/qagp.Plo | 150 + software/gsl-1.15/integration/.deps/qags.Plo | 148 + software/gsl-1.15/integration/.deps/qawc.Plo | 142 + software/gsl-1.15/integration/.deps/qawf.Plo | 138 + software/gsl-1.15/integration/.deps/qawo.Plo | 151 + software/gsl-1.15/integration/.deps/qaws.Plo | 142 + software/gsl-1.15/integration/.deps/qcheb.Plo | 117 + software/gsl-1.15/integration/.deps/qk.Plo | 118 + software/gsl-1.15/integration/.deps/qk15.Plo | 118 + software/gsl-1.15/integration/.deps/qk21.Plo | 118 + software/gsl-1.15/integration/.deps/qk31.Plo | 118 + software/gsl-1.15/integration/.deps/qk41.Plo | 118 + software/gsl-1.15/integration/.deps/qk51.Plo | 118 + software/gsl-1.15/integration/.deps/qk61.Plo | 118 + software/gsl-1.15/integration/.deps/qmomo.Plo | 131 + .../gsl-1.15/integration/.deps/qmomof.Plo | 131 + software/gsl-1.15/integration/.deps/qng.Plo | 135 + software/gsl-1.15/integration/.deps/test.Po | 138 + software/gsl-1.15/integration/.deps/tests.Po | 59 + .../gsl-1.15/integration/.deps/workspace.Plo | 131 + software/gsl-1.15/integration/ChangeLog | 164 + software/gsl-1.15/integration/Makefile.am | 14 + software/gsl-1.15/integration/Makefile.in | 686 + software/gsl-1.15/integration/TODO | 24 + software/gsl-1.15/integration/append.c | 35 + software/gsl-1.15/integration/cquad.c | 683 + software/gsl-1.15/integration/cquad_const.c | 1334 ++ software/gsl-1.15/integration/err.c | 58 + software/gsl-1.15/integration/glfixed.c | 484 + .../gsl-1.15/integration/gsl_integration.h | 323 + software/gsl-1.15/integration/initialise.c | 37 + software/gsl-1.15/integration/positivity.c | 13 + software/gsl-1.15/integration/ptsort.c | 62 + software/gsl-1.15/integration/qag.c | 265 + software/gsl-1.15/integration/qagp.c | 510 + software/gsl-1.15/integration/qags.c | 570 + software/gsl-1.15/integration/qawc.c | 220 + software/gsl-1.15/integration/qawf.c | 281 + software/gsl-1.15/integration/qawo.c | 460 + software/gsl-1.15/integration/qaws.c | 220 + software/gsl-1.15/integration/qc25c.c | 132 + software/gsl-1.15/integration/qc25f.c | 158 + software/gsl-1.15/integration/qc25s.c | 238 + software/gsl-1.15/integration/qcheb.c | 229 + software/gsl-1.15/integration/qelg.c | 233 + software/gsl-1.15/integration/qk.c | 102 + software/gsl-1.15/integration/qk15.c | 70 + software/gsl-1.15/integration/qk21.c | 77 + software/gsl-1.15/integration/qk31.c | 89 + software/gsl-1.15/integration/qk41.c | 102 + software/gsl-1.15/integration/qk51.c | 117 + software/gsl-1.15/integration/qk61.c | 126 + software/gsl-1.15/integration/qmomo.c | 194 + software/gsl-1.15/integration/qmomof.c | 390 + software/gsl-1.15/integration/qng.c | 190 + software/gsl-1.15/integration/qng.h | 193 + software/gsl-1.15/integration/qpsrt.c | 113 + software/gsl-1.15/integration/qpsrt2.c | 81 + software/gsl-1.15/integration/reset.c | 9 + software/gsl-1.15/integration/set_initial.c | 12 + software/gsl-1.15/integration/test.c | 2386 +++ software/gsl-1.15/integration/tests.c | 362 + software/gsl-1.15/integration/tests.h | 85 + software/gsl-1.15/integration/util.c | 137 + software/gsl-1.15/integration/workspace.c | 154 + .../gsl-1.15/interpolation/.deps/accel.Plo | 95 + .../gsl-1.15/interpolation/.deps/akima.Plo | 99 + .../gsl-1.15/interpolation/.deps/cspline.Plo | 221 + .../gsl-1.15/interpolation/.deps/inline.Plo | 82 + .../gsl-1.15/interpolation/.deps/interp.Plo | 130 + .../gsl-1.15/interpolation/.deps/linear.Plo | 95 + .../gsl-1.15/interpolation/.deps/poly.Plo | 101 + .../gsl-1.15/interpolation/.deps/spline.Plo | 104 + software/gsl-1.15/interpolation/.deps/test.Po | 105 + software/gsl-1.15/interpolation/ChangeLog | 146 + software/gsl-1.15/interpolation/Makefile.am | 16 + software/gsl-1.15/interpolation/Makefile.in | 673 + software/gsl-1.15/interpolation/TODO | 13 + software/gsl-1.15/interpolation/accel.c | 58 + software/gsl-1.15/interpolation/akima.c | 389 + software/gsl-1.15/interpolation/cspline.c | 475 + software/gsl-1.15/interpolation/gsl_interp.h | 224 + software/gsl-1.15/interpolation/gsl_spline.h | 101 + software/gsl-1.15/interpolation/inline.c | 30 + software/gsl-1.15/interpolation/integ_eval.h | 36 + software/gsl-1.15/interpolation/interp.c | 280 + software/gsl-1.15/interpolation/linear.c | 198 + software/gsl-1.15/interpolation/poly.c | 173 + software/gsl-1.15/interpolation/spline.c | 194 + software/gsl-1.15/interpolation/test.c | 987 + software/gsl-1.15/libtool | 10056 ++++++++++ software/gsl-1.15/linalg/.deps/balance.Plo | 263 + software/gsl-1.15/linalg/.deps/balancemat.Plo | 263 + software/gsl-1.15/linalg/.deps/bidiag.Plo | 263 + software/gsl-1.15/linalg/.deps/cholesky.Plo | 262 + software/gsl-1.15/linalg/.deps/choleskyc.Plo | 265 + .../gsl-1.15/linalg/.deps/exponential.Plo | 264 + software/gsl-1.15/linalg/.deps/hermtd.Plo | 266 + software/gsl-1.15/linalg/.deps/hessenberg.Plo | 218 + software/gsl-1.15/linalg/.deps/hesstri.Plo | 230 + software/gsl-1.15/linalg/.deps/hh.Plo | 254 + .../gsl-1.15/linalg/.deps/householder.Plo | 263 + .../linalg/.deps/householdercomplex.Plo | 267 + software/gsl-1.15/linalg/.deps/lq.Plo | 275 + software/gsl-1.15/linalg/.deps/lu.Plo | 310 + software/gsl-1.15/linalg/.deps/luc.Plo | 313 + software/gsl-1.15/linalg/.deps/multiply.Plo | 254 + software/gsl-1.15/linalg/.deps/ptlq.Plo | 314 + software/gsl-1.15/linalg/.deps/qr.Plo | 275 + software/gsl-1.15/linalg/.deps/qrpt.Plo | 314 + software/gsl-1.15/linalg/.deps/svd.Plo | 275 + software/gsl-1.15/linalg/.deps/symmtd.Plo | 263 + software/gsl-1.15/linalg/.deps/test.Po | 310 + software/gsl-1.15/linalg/.deps/tridiag.Plo | 221 + software/gsl-1.15/linalg/ChangeLog | 453 + software/gsl-1.15/linalg/Makefile.am | 19 + software/gsl-1.15/linalg/Makefile.in | 690 + software/gsl-1.15/linalg/TODO | 15 + software/gsl-1.15/linalg/apply_givens.c | 125 + software/gsl-1.15/linalg/balance.c | 86 + software/gsl-1.15/linalg/balancemat.c | 186 + software/gsl-1.15/linalg/bidiag.c | 364 + software/gsl-1.15/linalg/cholesky.c | 358 + software/gsl-1.15/linalg/choleskyc.c | 322 + software/gsl-1.15/linalg/exponential.c | 187 + software/gsl-1.15/linalg/givens.c | 46 + software/gsl-1.15/linalg/gsl_linalg.h | 592 + software/gsl-1.15/linalg/hermtd.c | 240 + software/gsl-1.15/linalg/hessenberg.c | 440 + software/gsl-1.15/linalg/hesstri.c | 173 + software/gsl-1.15/linalg/hh.c | 179 + software/gsl-1.15/linalg/householder.c | 339 + software/gsl-1.15/linalg/householdercomplex.c | 260 + software/gsl-1.15/linalg/lq.c | 565 + software/gsl-1.15/linalg/lu.c | 348 + software/gsl-1.15/linalg/luc.c | 366 + software/gsl-1.15/linalg/multiply.c | 137 + software/gsl-1.15/linalg/ptlq.c | 493 + software/gsl-1.15/linalg/qr.c | 598 + software/gsl-1.15/linalg/qrpt.c | 493 + software/gsl-1.15/linalg/svd.c | 679 + software/gsl-1.15/linalg/svdstep.c | 607 + software/gsl-1.15/linalg/symmtd.c | 232 + software/gsl-1.15/linalg/test.c | 4390 +++++ software/gsl-1.15/linalg/tridiag.c | 580 + software/gsl-1.15/linalg/tridiag.h | 67 + software/gsl-1.15/ltmain.sh | 9636 ++++++++++ software/gsl-1.15/matrix/.deps/copy.Plo | 214 + software/gsl-1.15/matrix/.deps/file.Plo | 216 + software/gsl-1.15/matrix/.deps/getset.Plo | 216 + software/gsl-1.15/matrix/.deps/init.Plo | 214 + software/gsl-1.15/matrix/.deps/matrix.Plo | 212 + software/gsl-1.15/matrix/.deps/minmax.Plo | 251 + software/gsl-1.15/matrix/.deps/oper.Plo | 253 + software/gsl-1.15/matrix/.deps/prop.Plo | 214 + software/gsl-1.15/matrix/.deps/rowcol.Plo | 254 + software/gsl-1.15/matrix/.deps/submatrix.Plo | 255 + software/gsl-1.15/matrix/.deps/swap.Plo | 216 + software/gsl-1.15/matrix/.deps/test.Po | 257 + software/gsl-1.15/matrix/.deps/test_static.Po | 259 + software/gsl-1.15/matrix/.deps/view.Plo | 216 + software/gsl-1.15/matrix/ChangeLog | 225 + software/gsl-1.15/matrix/Makefile.am | 24 + software/gsl-1.15/matrix/Makefile.in | 692 + software/gsl-1.15/matrix/TODO | 14 + software/gsl-1.15/matrix/copy.c | 87 + software/gsl-1.15/matrix/copy_source.c | 88 + software/gsl-1.15/matrix/file.c | 88 + software/gsl-1.15/matrix/file_source.c | 157 + software/gsl-1.15/matrix/getset.c | 88 + software/gsl-1.15/matrix/getset_source.c | 228 + software/gsl-1.15/matrix/gsl_matrix.h | 25 + software/gsl-1.15/matrix/gsl_matrix_char.h | 350 + .../matrix/gsl_matrix_complex_double.h | 351 + .../matrix/gsl_matrix_complex_float.h | 351 + .../matrix/gsl_matrix_complex_long_double.h | 351 + software/gsl-1.15/matrix/gsl_matrix_double.h | 350 + software/gsl-1.15/matrix/gsl_matrix_float.h | 350 + software/gsl-1.15/matrix/gsl_matrix_int.h | 350 + software/gsl-1.15/matrix/gsl_matrix_long.h | 350 + .../gsl-1.15/matrix/gsl_matrix_long_double.h | 350 + software/gsl-1.15/matrix/gsl_matrix_short.h | 350 + software/gsl-1.15/matrix/gsl_matrix_uchar.h | 350 + software/gsl-1.15/matrix/gsl_matrix_uint.h | 350 + software/gsl-1.15/matrix/gsl_matrix_ulong.h | 350 + software/gsl-1.15/matrix/gsl_matrix_ushort.h | 350 + software/gsl-1.15/matrix/init.c | 87 + software/gsl-1.15/matrix/init_source.c | 252 + software/gsl-1.15/matrix/matrix.c | 10 + software/gsl-1.15/matrix/minmax.c | 72 + software/gsl-1.15/matrix/minmax_source.c | 254 + software/gsl-1.15/matrix/oper.c | 91 + .../gsl-1.15/matrix/oper_complex_source.c | 236 + software/gsl-1.15/matrix/oper_source.c | 191 + software/gsl-1.15/matrix/prop.c | 87 + software/gsl-1.15/matrix/prop_source.c | 161 + software/gsl-1.15/matrix/rowcol.c | 178 + software/gsl-1.15/matrix/rowcol_source.c | 199 + software/gsl-1.15/matrix/submatrix.c | 178 + software/gsl-1.15/matrix/submatrix_source.c | 66 + software/gsl-1.15/matrix/swap.c | 88 + software/gsl-1.15/matrix/swap_source.c | 210 + software/gsl-1.15/matrix/test.c | 237 + .../gsl-1.15/matrix/test_complex_source.c | 708 + software/gsl-1.15/matrix/test_source.c | 789 + software/gsl-1.15/matrix/test_static.c | 7 + software/gsl-1.15/matrix/view.c | 176 + software/gsl-1.15/matrix/view.h | 5 + software/gsl-1.15/matrix/view_source.c | 273 + software/gsl-1.15/mdate-sh | 91 + software/gsl-1.15/min/.deps/bracketing.Plo | 134 + software/gsl-1.15/min/.deps/brent.Plo | 136 + software/gsl-1.15/min/.deps/convergence.Plo | 132 + software/gsl-1.15/min/.deps/fsolver.Plo | 140 + software/gsl-1.15/min/.deps/golden.Plo | 136 + software/gsl-1.15/min/.deps/quad_golden.Plo | 136 + software/gsl-1.15/min/.deps/test.Po | 141 + software/gsl-1.15/min/.deps/test_funcs.Po | 116 + software/gsl-1.15/min/ChangeLog | 98 + software/gsl-1.15/min/Makefile.am | 16 + software/gsl-1.15/min/Makefile.in | 669 + software/gsl-1.15/min/bracketing.c | 125 + software/gsl-1.15/min/brent.c | 221 + software/gsl-1.15/min/convergence.c | 61 + software/gsl-1.15/min/fsolver.c | 201 + software/gsl-1.15/min/golden.c | 120 + software/gsl-1.15/min/gsl_min.h | 111 + software/gsl-1.15/min/min.h | 25 + software/gsl-1.15/min/quad_golden.c | 343 + software/gsl-1.15/min/test.c | 216 + software/gsl-1.15/min/test.h | 42 + software/gsl-1.15/min/test_funcs.c | 85 + software/gsl-1.15/missing | 376 + software/gsl-1.15/mkinstalldirs | 162 + software/gsl-1.15/monte/.deps/miser.Plo | 138 + software/gsl-1.15/monte/.deps/plain.Plo | 135 + software/gsl-1.15/monte/.deps/test.Po | 147 + software/gsl-1.15/monte/.deps/vegas.Plo | 136 + software/gsl-1.15/monte/ChangeLog | 220 + software/gsl-1.15/monte/Makefile.am | 21 + software/gsl-1.15/monte/Makefile.in | 667 + software/gsl-1.15/monte/README | 37 + software/gsl-1.15/monte/TODO | 28 + software/gsl-1.15/monte/gsl_monte.h | 55 + software/gsl-1.15/monte/gsl_monte_miser.h | 97 + software/gsl-1.15/monte/gsl_monte_plain.h | 65 + software/gsl-1.15/monte/gsl_monte_vegas.h | 125 + software/gsl-1.15/monte/miser.c | 709 + software/gsl-1.15/monte/plain.c | 152 + software/gsl-1.15/monte/test.c | 480 + software/gsl-1.15/monte/test_main.c | 71 + software/gsl-1.15/monte/vegas.c | 925 + .../gsl-1.15/multifit/.deps/convergence.Plo | 250 + software/gsl-1.15/multifit/.deps/covar.Plo | 256 + .../gsl-1.15/multifit/.deps/fdfsolver.Plo | 256 + software/gsl-1.15/multifit/.deps/fsolver.Plo | 256 + software/gsl-1.15/multifit/.deps/gradient.Plo | 258 + software/gsl-1.15/multifit/.deps/lmder.Plo | 280 + .../gsl-1.15/multifit/.deps/multilinear.Plo | 266 + software/gsl-1.15/multifit/.deps/test.Po | 287 + software/gsl-1.15/multifit/.deps/work.Plo | 249 + software/gsl-1.15/multifit/ChangeLog | 179 + software/gsl-1.15/multifit/Makefile.am | 20 + software/gsl-1.15/multifit/Makefile.in | 677 + software/gsl-1.15/multifit/TODO | 10 + software/gsl-1.15/multifit/convergence.c | 89 + software/gsl-1.15/multifit/covar.c | 192 + software/gsl-1.15/multifit/fdfsolver.c | 171 + software/gsl-1.15/multifit/fsolver.c | 157 + software/gsl-1.15/multifit/gradient.c | 33 + software/gsl-1.15/multifit/gsl_multifit.h | 130 + .../gsl-1.15/multifit/gsl_multifit_nlin.h | 172 + software/gsl-1.15/multifit/lmder.c | 387 + software/gsl-1.15/multifit/lmiterate.c | 229 + software/gsl-1.15/multifit/lmpar.c | 499 + software/gsl-1.15/multifit/lmset.c | 63 + software/gsl-1.15/multifit/lmutil.c | 134 + software/gsl-1.15/multifit/multilinear.c | 560 + software/gsl-1.15/multifit/qrsolv.c | 218 + software/gsl-1.15/multifit/test.c | 283 + software/gsl-1.15/multifit/test_brown.c | 113 + software/gsl-1.15/multifit/test_enso.c | 279 + software/gsl-1.15/multifit/test_estimator.c | 37 + software/gsl-1.15/multifit/test_filip.c | 214 + software/gsl-1.15/multifit/test_fn.c | 25 + software/gsl-1.15/multifit/test_hahn1.c | 568 + software/gsl-1.15/multifit/test_kirby2.c | 392 + software/gsl-1.15/multifit/test_longley.c | 178 + software/gsl-1.15/multifit/test_nelson.c | 217 + software/gsl-1.15/multifit/test_pontius.c | 143 + software/gsl-1.15/multifit/work.c | 134 + .../gsl-1.15/multimin/.deps/conjugate_fr.Plo | 263 + .../gsl-1.15/multimin/.deps/conjugate_pr.Plo | 263 + .../gsl-1.15/multimin/.deps/convergence.Plo | 261 + software/gsl-1.15/multimin/.deps/diff.Plo | 250 + .../gsl-1.15/multimin/.deps/fdfminimizer.Plo | 252 + .../gsl-1.15/multimin/.deps/fminimizer.Plo | 252 + software/gsl-1.15/multimin/.deps/simplex.Plo | 261 + software/gsl-1.15/multimin/.deps/simplex2.Plo | 261 + .../multimin/.deps/steepest_descent.Plo | 261 + software/gsl-1.15/multimin/.deps/test.Po | 268 + .../gsl-1.15/multimin/.deps/test_funcs.Po | 252 + .../gsl-1.15/multimin/.deps/vector_bfgs.Plo | 263 + .../gsl-1.15/multimin/.deps/vector_bfgs2.Plo | 268 + software/gsl-1.15/multimin/ChangeLog | 186 + software/gsl-1.15/multimin/Makefile.am | 20 + software/gsl-1.15/multimin/Makefile.in | 684 + software/gsl-1.15/multimin/TODO | 8 + software/gsl-1.15/multimin/conjugate_fr.c | 271 + software/gsl-1.15/multimin/conjugate_pr.c | 276 + software/gsl-1.15/multimin/convergence.c | 58 + software/gsl-1.15/multimin/diff.c | 58 + .../gsl-1.15/multimin/directional_minimize.c | 248 + software/gsl-1.15/multimin/fdfminimizer.c | 174 + software/gsl-1.15/multimin/fminimizer.c | 135 + software/gsl-1.15/multimin/gsl_multimin.h | 226 + software/gsl-1.15/multimin/linear_minimize.c | 247 + software/gsl-1.15/multimin/linear_wrapper.c | 185 + software/gsl-1.15/multimin/simplex.c | 467 + software/gsl-1.15/multimin/simplex2.c | 701 + software/gsl-1.15/multimin/steepest_descent.c | 176 + software/gsl-1.15/multimin/test.c | 223 + software/gsl-1.15/multimin/test_funcs.c | 342 + software/gsl-1.15/multimin/test_funcs.h | 68 + software/gsl-1.15/multimin/vector_bfgs.c | 350 + software/gsl-1.15/multimin/vector_bfgs2.c | 331 + .../gsl-1.15/multiroots/.deps/broyden.Plo | 261 + .../gsl-1.15/multiroots/.deps/convergence.Plo | 250 + .../gsl-1.15/multiroots/.deps/dnewton.Plo | 259 + .../gsl-1.15/multiroots/.deps/fdfsolver.Plo | 256 + software/gsl-1.15/multiroots/.deps/fdjac.Plo | 249 + .../gsl-1.15/multiroots/.deps/fsolver.Plo | 256 + .../gsl-1.15/multiroots/.deps/gnewton.Plo | 261 + software/gsl-1.15/multiroots/.deps/hybrid.Plo | 263 + .../gsl-1.15/multiroots/.deps/hybridj.Plo | 263 + software/gsl-1.15/multiroots/.deps/newton.Plo | 259 + software/gsl-1.15/multiroots/.deps/test.Po | 256 + .../gsl-1.15/multiroots/.deps/test_funcs.Po | 250 + software/gsl-1.15/multiroots/ChangeLog | 142 + software/gsl-1.15/multiroots/Makefile.am | 19 + software/gsl-1.15/multiroots/Makefile.in | 680 + software/gsl-1.15/multiroots/broyden.c | 456 + software/gsl-1.15/multiroots/convergence.c | 90 + software/gsl-1.15/multiroots/dnewton.c | 186 + software/gsl-1.15/multiroots/dogleg.c | 413 + software/gsl-1.15/multiroots/enorm.c | 33 + software/gsl-1.15/multiroots/fdfsolver.c | 177 + software/gsl-1.15/multiroots/fdjac.c | 111 + software/gsl-1.15/multiroots/fsolver.c | 164 + software/gsl-1.15/multiroots/gnewton.c | 230 + software/gsl-1.15/multiroots/gsl_multiroots.h | 177 + software/gsl-1.15/multiroots/hybrid.c | 662 + software/gsl-1.15/multiroots/hybridj.c | 608 + software/gsl-1.15/multiroots/newton.c | 156 + software/gsl-1.15/multiroots/test.c | 260 + software/gsl-1.15/multiroots/test_funcs.c | 744 + software/gsl-1.15/multiroots/test_funcs.h | 76 + software/gsl-1.15/multiset/.deps/file.Plo | 97 + software/gsl-1.15/multiset/.deps/init.Plo | 97 + software/gsl-1.15/multiset/.deps/inline.Plo | 98 + software/gsl-1.15/multiset/.deps/multiset.Plo | 98 + software/gsl-1.15/multiset/.deps/test.Po | 104 + software/gsl-1.15/multiset/ChangeLog | 3 + software/gsl-1.15/multiset/Makefile.am | 21 + software/gsl-1.15/multiset/Makefile.in | 670 + software/gsl-1.15/multiset/TODO | 4 + software/gsl-1.15/multiset/file.c | 115 + software/gsl-1.15/multiset/gsl_multiset.h | 93 + software/gsl-1.15/multiset/init.c | 130 + software/gsl-1.15/multiset/inline.c | 24 + software/gsl-1.15/multiset/multiset.c | 181 + software/gsl-1.15/multiset/test.c | 278 + software/gsl-1.15/ntuple/.deps/ntuple.Plo | 96 + software/gsl-1.15/ntuple/.deps/test.Po | 99 + software/gsl-1.15/ntuple/ChangeLog | 9 + software/gsl-1.15/ntuple/Makefile.am | 22 + software/gsl-1.15/ntuple/Makefile.in | 670 + software/gsl-1.15/ntuple/gsl_ntuple.h | 82 + software/gsl-1.15/ntuple/ntuple.c | 202 + software/gsl-1.15/ntuple/test.c | 162 + software/gsl-1.15/ode-initval/.deps/bsimp.Plo | 265 + .../gsl-1.15/ode-initval/.deps/control.Plo | 131 + software/gsl-1.15/ode-initval/.deps/cscal.Plo | 139 + software/gsl-1.15/ode-initval/.deps/cstd.Plo | 131 + .../gsl-1.15/ode-initval/.deps/evolve.Plo | 141 + software/gsl-1.15/ode-initval/.deps/gear1.Plo | 141 + software/gsl-1.15/ode-initval/.deps/gear2.Plo | 141 + software/gsl-1.15/ode-initval/.deps/rk2.Plo | 102 + .../gsl-1.15/ode-initval/.deps/rk2imp.Plo | 141 + .../gsl-1.15/ode-initval/.deps/rk2simp.Plo | 266 + software/gsl-1.15/ode-initval/.deps/rk4.Plo | 102 + .../gsl-1.15/ode-initval/.deps/rk4imp.Plo | 141 + software/gsl-1.15/ode-initval/.deps/rk8pd.Plo | 102 + software/gsl-1.15/ode-initval/.deps/rkck.Plo | 102 + software/gsl-1.15/ode-initval/.deps/rkf45.Plo | 102 + software/gsl-1.15/ode-initval/.deps/step.Plo | 92 + software/gsl-1.15/ode-initval/.deps/test.Po | 269 + software/gsl-1.15/ode-initval/ChangeLog | 188 + software/gsl-1.15/ode-initval/Makefile.am | 18 + software/gsl-1.15/ode-initval/Makefile.in | 683 + software/gsl-1.15/ode-initval/TODO | 81 + software/gsl-1.15/ode-initval/bsimp.c | 567 + software/gsl-1.15/ode-initval/control.c | 81 + software/gsl-1.15/ode-initval/cscal.c | 193 + software/gsl-1.15/ode-initval/cstd.c | 184 + software/gsl-1.15/ode-initval/evolve.c | 236 + software/gsl-1.15/ode-initval/gear1.c | 272 + software/gsl-1.15/ode-initval/gear2.c | 347 + software/gsl-1.15/ode-initval/gsl_odeiv.h | 230 + software/gsl-1.15/ode-initval/odeiv_util.h | 2 + software/gsl-1.15/ode-initval/rk2.c | 250 + software/gsl-1.15/ode-initval/rk2imp.c | 336 + software/gsl-1.15/ode-initval/rk2simp.c | 382 + software/gsl-1.15/ode-initval/rk4.c | 365 + software/gsl-1.15/ode-initval/rk4imp.c | 390 + software/gsl-1.15/ode-initval/rk8pd.c | 537 + software/gsl-1.15/ode-initval/rkck.c | 371 + software/gsl-1.15/ode-initval/rkf45.c | 372 + software/gsl-1.15/ode-initval/step.c | 90 + software/gsl-1.15/ode-initval/test.c | 1268 ++ .../gsl-1.15/ode-initval2/.deps/bsimp.Plo | 267 + .../gsl-1.15/ode-initval2/.deps/control.Plo | 131 + .../gsl-1.15/ode-initval2/.deps/cscal.Plo | 141 + software/gsl-1.15/ode-initval2/.deps/cstd.Plo | 133 + .../gsl-1.15/ode-initval2/.deps/driver.Plo | 114 + .../gsl-1.15/ode-initval2/.deps/evolve.Plo | 141 + .../gsl-1.15/ode-initval2/.deps/msadams.Plo | 268 + .../gsl-1.15/ode-initval2/.deps/msbdf.Plo | 275 + .../gsl-1.15/ode-initval2/.deps/rk1imp.Plo | 279 + software/gsl-1.15/ode-initval2/.deps/rk2.Plo | 104 + .../gsl-1.15/ode-initval2/.deps/rk2imp.Plo | 279 + software/gsl-1.15/ode-initval2/.deps/rk4.Plo | 104 + .../gsl-1.15/ode-initval2/.deps/rk4imp.Plo | 279 + .../gsl-1.15/ode-initval2/.deps/rk8pd.Plo | 104 + software/gsl-1.15/ode-initval2/.deps/rkck.Plo | 104 + .../gsl-1.15/ode-initval2/.deps/rkf45.Plo | 104 + software/gsl-1.15/ode-initval2/.deps/step.Plo | 92 + software/gsl-1.15/ode-initval2/.deps/test.Po | 269 + software/gsl-1.15/ode-initval2/ChangeLog | 265 + software/gsl-1.15/ode-initval2/Makefile.am | 18 + software/gsl-1.15/ode-initval2/Makefile.in | 684 + software/gsl-1.15/ode-initval2/TODO | 65 + software/gsl-1.15/ode-initval2/bsimp.c | 571 + software/gsl-1.15/ode-initval2/control.c | 107 + .../gsl-1.15/ode-initval2/control_utils.c | 27 + software/gsl-1.15/ode-initval2/cscal.c | 223 + software/gsl-1.15/ode-initval2/cstd.c | 216 + software/gsl-1.15/ode-initval2/driver.c | 474 + software/gsl-1.15/ode-initval2/evolve.c | 381 + software/gsl-1.15/ode-initval2/gsl_odeiv2.h | 332 + software/gsl-1.15/ode-initval2/modnewton1.c | 426 + software/gsl-1.15/ode-initval2/msadams.c | 1314 ++ software/gsl-1.15/ode-initval2/msbdf.c | 1774 ++ software/gsl-1.15/ode-initval2/odeiv_util.h | 17 + software/gsl-1.15/ode-initval2/rk1imp.c | 499 + software/gsl-1.15/ode-initval2/rk2.c | 251 + software/gsl-1.15/ode-initval2/rk2imp.c | 507 + software/gsl-1.15/ode-initval2/rk4.c | 360 + software/gsl-1.15/ode-initval2/rk4imp.c | 532 + software/gsl-1.15/ode-initval2/rk8pd.c | 546 + software/gsl-1.15/ode-initval2/rkck.c | 377 + software/gsl-1.15/ode-initval2/rkf45.c | 381 + software/gsl-1.15/ode-initval2/rksubs.c | 52 + software/gsl-1.15/ode-initval2/step.c | 104 + software/gsl-1.15/ode-initval2/step_utils.c | 27 + software/gsl-1.15/ode-initval2/test.c | 2506 +++ .../gsl-1.15/permutation/.deps/canonical.Plo | 98 + software/gsl-1.15/permutation/.deps/file.Plo | 97 + software/gsl-1.15/permutation/.deps/init.Plo | 97 + .../gsl-1.15/permutation/.deps/inline.Plo | 99 + .../permutation/.deps/permutation.Plo | 98 + .../gsl-1.15/permutation/.deps/permute.Plo | 258 + software/gsl-1.15/permutation/.deps/test.Po | 107 + software/gsl-1.15/permutation/ChangeLog | 74 + software/gsl-1.15/permutation/Makefile.am | 21 + software/gsl-1.15/permutation/Makefile.in | 671 + software/gsl-1.15/permutation/canonical.c | 194 + software/gsl-1.15/permutation/file.c | 113 + .../gsl-1.15/permutation/gsl_permutation.h | 100 + software/gsl-1.15/permutation/gsl_permute.h | 24 + .../gsl-1.15/permutation/gsl_permute_char.h | 44 + .../permutation/gsl_permute_complex_double.h | 45 + .../permutation/gsl_permute_complex_float.h | 45 + .../gsl_permute_complex_long_double.h | 45 + .../gsl-1.15/permutation/gsl_permute_double.h | 44 + .../gsl-1.15/permutation/gsl_permute_float.h | 44 + .../gsl-1.15/permutation/gsl_permute_int.h | 44 + .../gsl-1.15/permutation/gsl_permute_long.h | 44 + .../permutation/gsl_permute_long_double.h | 44 + .../gsl-1.15/permutation/gsl_permute_short.h | 44 + .../gsl-1.15/permutation/gsl_permute_uchar.h | 44 + .../gsl-1.15/permutation/gsl_permute_uint.h | 44 + .../gsl-1.15/permutation/gsl_permute_ulong.h | 44 + .../gsl-1.15/permutation/gsl_permute_ushort.h | 44 + .../gsl-1.15/permutation/gsl_permute_vector.h | 24 + .../permutation/gsl_permute_vector_char.h | 45 + .../gsl_permute_vector_complex_double.h | 45 + .../gsl_permute_vector_complex_float.h | 45 + .../gsl_permute_vector_complex_long_double.h | 45 + .../permutation/gsl_permute_vector_double.h | 45 + .../permutation/gsl_permute_vector_float.h | 45 + .../permutation/gsl_permute_vector_int.h | 45 + .../permutation/gsl_permute_vector_long.h | 45 + .../gsl_permute_vector_long_double.h | 45 + .../permutation/gsl_permute_vector_short.h | 45 + .../permutation/gsl_permute_vector_uchar.h | 45 + .../permutation/gsl_permute_vector_uint.h | 45 + .../permutation/gsl_permute_vector_ulong.h | 45 + .../permutation/gsl_permute_vector_ushort.h | 45 + software/gsl-1.15/permutation/init.c | 99 + software/gsl-1.15/permutation/inline.c | 27 + software/gsl-1.15/permutation/permutation.c | 275 + software/gsl-1.15/permutation/permute.c | 89 + .../gsl-1.15/permutation/permute_source.c | 163 + software/gsl-1.15/permutation/test.c | 300 + software/gsl-1.15/pkgconfig.test | 9 + software/gsl-1.15/poly/.deps/dd.Plo | 97 + software/gsl-1.15/poly/.deps/deriv.Plo | 97 + software/gsl-1.15/poly/.deps/eval.Plo | 83 + software/gsl-1.15/poly/.deps/solve_cubic.Plo | 119 + .../gsl-1.15/poly/.deps/solve_quadratic.Plo | 82 + software/gsl-1.15/poly/.deps/test.Po | 131 + software/gsl-1.15/poly/.deps/zsolve.Plo | 140 + software/gsl-1.15/poly/.deps/zsolve_cubic.Plo | 118 + software/gsl-1.15/poly/.deps/zsolve_init.Plo | 133 + .../gsl-1.15/poly/.deps/zsolve_quadratic.Plo | 83 + software/gsl-1.15/poly/ChangeLog | 103 + software/gsl-1.15/poly/Makefile.am | 17 + software/gsl-1.15/poly/Makefile.in | 672 + software/gsl-1.15/poly/TODO | 133 + software/gsl-1.15/poly/balance.c | 127 + software/gsl-1.15/poly/companion.c | 36 + software/gsl-1.15/poly/dd.c | 85 + software/gsl-1.15/poly/deriv.c | 64 + software/gsl-1.15/poly/eval.c | 27 + software/gsl-1.15/poly/gsl_poly.h | 179 + software/gsl-1.15/poly/qr.c | 245 + software/gsl-1.15/poly/solve_cubic.c | 110 + software/gsl-1.15/poly/solve_quadratic.c | 85 + software/gsl-1.15/poly/test.c | 579 + software/gsl-1.15/poly/zsolve.c | 85 + software/gsl-1.15/poly/zsolve_cubic.c | 153 + software/gsl-1.15/poly/zsolve_init.c | 70 + software/gsl-1.15/poly/zsolve_quadratic.c | 103 + software/gsl-1.15/qrng/.deps/halton.Plo | 94 + software/gsl-1.15/qrng/.deps/inline.Plo | 104 + .../gsl-1.15/qrng/.deps/niederreiter-2.Plo | 95 + software/gsl-1.15/qrng/.deps/qrng.Plo | 102 + .../gsl-1.15/qrng/.deps/reversehalton.Plo | 95 + software/gsl-1.15/qrng/.deps/sobol.Plo | 94 + software/gsl-1.15/qrng/.deps/test.Po | 102 + software/gsl-1.15/qrng/ChangeLog | 43 + software/gsl-1.15/qrng/Makefile.am | 14 + software/gsl-1.15/qrng/Makefile.in | 667 + software/gsl-1.15/qrng/TODO | 13 + software/gsl-1.15/qrng/gsl_qrng.h | 111 + software/gsl-1.15/qrng/halton.c | 239 + software/gsl-1.15/qrng/inline.c | 13 + software/gsl-1.15/qrng/niederreiter-2.c | 353 + software/gsl-1.15/qrng/qrng.c | 118 + software/gsl-1.15/qrng/reversehalton.c | 241 + software/gsl-1.15/qrng/sobol.c | 231 + software/gsl-1.15/qrng/test.c | 247 + software/gsl-1.15/randist/.deps/bernoulli.Plo | 99 + software/gsl-1.15/randist/.deps/beta.Plo | 138 + software/gsl-1.15/randist/.deps/bigauss.Plo | 133 + software/gsl-1.15/randist/.deps/binomial.Plo | 105 + .../gsl-1.15/randist/.deps/binomial_tpe.Plo | 106 + software/gsl-1.15/randist/.deps/cauchy.Plo | 133 + software/gsl-1.15/randist/.deps/chisq.Plo | 104 + software/gsl-1.15/randist/.deps/dirichlet.Plo | 138 + software/gsl-1.15/randist/.deps/discrete.Plo | 99 + software/gsl-1.15/randist/.deps/erlang.Plo | 104 + .../gsl-1.15/randist/.deps/exponential.Plo | 133 + software/gsl-1.15/randist/.deps/exppow.Plo | 138 + software/gsl-1.15/randist/.deps/fdist.Plo | 104 + software/gsl-1.15/randist/.deps/flat.Plo | 99 + software/gsl-1.15/randist/.deps/gamma.Plo | 138 + software/gsl-1.15/randist/.deps/gauss.Plo | 133 + software/gsl-1.15/randist/.deps/gausstail.Plo | 138 + software/gsl-1.15/randist/.deps/gausszig.Plo | 133 + software/gsl-1.15/randist/.deps/geometric.Plo | 99 + software/gsl-1.15/randist/.deps/gumbel.Plo | 99 + software/gsl-1.15/randist/.deps/hyperg.Plo | 103 + software/gsl-1.15/randist/.deps/landau.Plo | 99 + software/gsl-1.15/randist/.deps/laplace.Plo | 99 + software/gsl-1.15/randist/.deps/levy.Plo | 133 + .../gsl-1.15/randist/.deps/logarithmic.Plo | 99 + software/gsl-1.15/randist/.deps/logistic.Plo | 99 + software/gsl-1.15/randist/.deps/lognormal.Plo | 133 + .../gsl-1.15/randist/.deps/multinomial.Plo | 103 + software/gsl-1.15/randist/.deps/nbinomial.Plo | 103 + software/gsl-1.15/randist/.deps/pareto.Plo | 99 + software/gsl-1.15/randist/.deps/pascal.Plo | 99 + software/gsl-1.15/randist/.deps/poisson.Plo | 104 + software/gsl-1.15/randist/.deps/rayleigh.Plo | 99 + software/gsl-1.15/randist/.deps/shuffle.Plo | 99 + software/gsl-1.15/randist/.deps/sphere.Plo | 99 + software/gsl-1.15/randist/.deps/tdist.Plo | 138 + software/gsl-1.15/randist/.deps/test.Po | 140 + software/gsl-1.15/randist/.deps/weibull.Plo | 99 + software/gsl-1.15/randist/ChangeLog | 514 + software/gsl-1.15/randist/Makefile.am | 16 + software/gsl-1.15/randist/Makefile.in | 707 + software/gsl-1.15/randist/TODO | 69 + software/gsl-1.15/randist/bernoulli.c | 61 + software/gsl-1.15/randist/beta.c | 75 + software/gsl-1.15/randist/bigauss.c | 70 + software/gsl-1.15/randist/binomial.c | 100 + software/gsl-1.15/randist/binomial_tpe.c | 381 + software/gsl-1.15/randist/cauchy.c | 51 + software/gsl-1.15/randist/chisq.c | 61 + software/gsl-1.15/randist/dirichlet.c | 163 + software/gsl-1.15/randist/discrete.c | 406 + software/gsl-1.15/randist/erlang.c | 54 + software/gsl-1.15/randist/exponential.c | 53 + software/gsl-1.15/randist/exppow.c | 122 + software/gsl-1.15/randist/fdist.c | 68 + software/gsl-1.15/randist/flat.c | 53 + software/gsl-1.15/randist/gamma.c | 229 + software/gsl-1.15/randist/gauss.c | 143 + software/gsl-1.15/randist/gausstail.c | 107 + software/gsl-1.15/randist/gausszig.c | 227 + software/gsl-1.15/randist/geometric.c | 67 + software/gsl-1.15/randist/gsl_randist.h | 185 + software/gsl-1.15/randist/gumbel.c | 78 + software/gsl-1.15/randist/hyperg.c | 124 + software/gsl-1.15/randist/landau.c | 565 + software/gsl-1.15/randist/laplace.c | 57 + software/gsl-1.15/randist/levy.c | 136 + software/gsl-1.15/randist/logarithmic.c | 76 + software/gsl-1.15/randist/logistic.c | 53 + software/gsl-1.15/randist/lognormal.c | 70 + software/gsl-1.15/randist/multinomial.c | 121 + software/gsl-1.15/randist/nbinomial.c | 54 + software/gsl-1.15/randist/pareto.c | 54 + software/gsl-1.15/randist/pascal.c | 50 + software/gsl-1.15/randist/poisson.c | 93 + software/gsl-1.15/randist/rayleigh.c | 85 + software/gsl-1.15/randist/shuffle.c | 124 + software/gsl-1.15/randist/sphere.c | 119 + software/gsl-1.15/randist/tdist.c | 80 + software/gsl-1.15/randist/test.c | 2178 +++ software/gsl-1.15/randist/weibull.c | 64 + software/gsl-1.15/rng/.deps/borosh13.Plo | 95 + software/gsl-1.15/rng/.deps/cmrg.Plo | 95 + software/gsl-1.15/rng/.deps/coveyou.Plo | 95 + software/gsl-1.15/rng/.deps/default.Plo | 102 + software/gsl-1.15/rng/.deps/file.Plo | 95 + software/gsl-1.15/rng/.deps/fishman18.Plo | 97 + software/gsl-1.15/rng/.deps/fishman20.Plo | 95 + software/gsl-1.15/rng/.deps/fishman2x.Plo | 95 + software/gsl-1.15/rng/.deps/gfsr4.Plo | 95 + software/gsl-1.15/rng/.deps/inline.Plo | 104 + software/gsl-1.15/rng/.deps/knuthran.Plo | 95 + software/gsl-1.15/rng/.deps/knuthran2.Plo | 97 + software/gsl-1.15/rng/.deps/knuthran2002.Plo | 95 + software/gsl-1.15/rng/.deps/lecuyer21.Plo | 95 + software/gsl-1.15/rng/.deps/minstd.Plo | 95 + software/gsl-1.15/rng/.deps/mrg.Plo | 95 + software/gsl-1.15/rng/.deps/mt.Plo | 95 + software/gsl-1.15/rng/.deps/r250.Plo | 95 + software/gsl-1.15/rng/.deps/ran0.Plo | 95 + software/gsl-1.15/rng/.deps/ran1.Plo | 95 + software/gsl-1.15/rng/.deps/ran2.Plo | 95 + software/gsl-1.15/rng/.deps/ran3.Plo | 95 + software/gsl-1.15/rng/.deps/rand.Plo | 95 + software/gsl-1.15/rng/.deps/rand48.Plo | 99 + software/gsl-1.15/rng/.deps/random.Plo | 95 + software/gsl-1.15/rng/.deps/randu.Plo | 95 + software/gsl-1.15/rng/.deps/ranf.Plo | 97 + software/gsl-1.15/rng/.deps/ranlux.Plo | 95 + software/gsl-1.15/rng/.deps/ranlxd.Plo | 95 + software/gsl-1.15/rng/.deps/ranlxs.Plo | 95 + software/gsl-1.15/rng/.deps/ranmar.Plo | 95 + software/gsl-1.15/rng/.deps/rng.Plo | 102 + software/gsl-1.15/rng/.deps/slatec.Plo | 95 + software/gsl-1.15/rng/.deps/taus.Plo | 95 + software/gsl-1.15/rng/.deps/taus113.Plo | 95 + software/gsl-1.15/rng/.deps/test.Po | 102 + software/gsl-1.15/rng/.deps/transputer.Plo | 95 + software/gsl-1.15/rng/.deps/tt.Plo | 95 + software/gsl-1.15/rng/.deps/types.Plo | 95 + software/gsl-1.15/rng/.deps/uni.Plo | 95 + software/gsl-1.15/rng/.deps/uni32.Plo | 95 + software/gsl-1.15/rng/.deps/vax.Plo | 95 + software/gsl-1.15/rng/.deps/waterman14.Plo | 95 + software/gsl-1.15/rng/.deps/zuf.Plo | 95 + software/gsl-1.15/rng/ChangeLog | 404 + software/gsl-1.15/rng/Makefile.am | 22 + software/gsl-1.15/rng/Makefile.in | 718 + software/gsl-1.15/rng/TODO | 100 + software/gsl-1.15/rng/borosh13.c | 92 + software/gsl-1.15/rng/cmrg.c | 197 + software/gsl-1.15/rng/coveyou.c | 92 + software/gsl-1.15/rng/default.c | 93 + software/gsl-1.15/rng/file.c | 57 + software/gsl-1.15/rng/fishman18.c | 95 + software/gsl-1.15/rng/fishman20.c | 103 + software/gsl-1.15/rng/fishman2x.c | 121 + software/gsl-1.15/rng/gfsr4.c | 165 + software/gsl-1.15/rng/gsl_rng.h | 217 + software/gsl-1.15/rng/inline.c | 30 + software/gsl-1.15/rng/knuthran.c | 177 + software/gsl-1.15/rng/knuthran2.c | 103 + software/gsl-1.15/rng/knuthran2002.c | 189 + software/gsl-1.15/rng/lecuyer21.c | 99 + software/gsl-1.15/rng/minstd.c | 109 + software/gsl-1.15/rng/mrg.c | 149 + software/gsl-1.15/rng/mt.c | 241 + software/gsl-1.15/rng/r250.c | 172 + software/gsl-1.15/rng/ran0.c | 100 + software/gsl-1.15/rng/ran1.c | 130 + software/gsl-1.15/rng/ran2.c | 146 + software/gsl-1.15/rng/ran3.c | 135 + software/gsl-1.15/rng/rand.c | 85 + software/gsl-1.15/rng/rand48.c | 143 + software/gsl-1.15/rng/random.c | 656 + software/gsl-1.15/rng/randu.c | 95 + software/gsl-1.15/rng/ranf.c | 161 + software/gsl-1.15/rng/ranlux.c | 222 + software/gsl-1.15/rng/ranlxd.c | 249 + software/gsl-1.15/rng/ranlxs.c | 302 + software/gsl-1.15/rng/ranmar.c | 173 + software/gsl-1.15/rng/rng.c | 154 + software/gsl-1.15/rng/schrage.c | 51 + software/gsl-1.15/rng/slatec.c | 205 + software/gsl-1.15/rng/taus.c | 184 + software/gsl-1.15/rng/taus113.c | 168 + software/gsl-1.15/rng/test.c | 602 + software/gsl-1.15/rng/transputer.c | 83 + software/gsl-1.15/rng/tt.c | 143 + software/gsl-1.15/rng/types.c | 101 + software/gsl-1.15/rng/uni.c | 201 + software/gsl-1.15/rng/uni32.c | 203 + software/gsl-1.15/rng/vax.c | 83 + software/gsl-1.15/rng/waterman14.c | 92 + software/gsl-1.15/rng/zuf.c | 141 + software/gsl-1.15/roots/.deps/bisection.Plo | 137 + software/gsl-1.15/roots/.deps/brent.Plo | 137 + software/gsl-1.15/roots/.deps/convergence.Plo | 132 + software/gsl-1.15/roots/.deps/falsepos.Plo | 137 + software/gsl-1.15/roots/.deps/fdfsolver.Plo | 138 + software/gsl-1.15/roots/.deps/fsolver.Plo | 138 + software/gsl-1.15/roots/.deps/newton.Plo | 137 + software/gsl-1.15/roots/.deps/secant.Plo | 137 + software/gsl-1.15/roots/.deps/steffenson.Plo | 137 + software/gsl-1.15/roots/.deps/test.Po | 140 + software/gsl-1.15/roots/.deps/test_funcs.Po | 118 + software/gsl-1.15/roots/ChangeLog | 181 + software/gsl-1.15/roots/Makefile.am | 19 + software/gsl-1.15/roots/Makefile.in | 675 + software/gsl-1.15/roots/TODO | 12 + software/gsl-1.15/roots/bisection.c | 134 + software/gsl-1.15/roots/brent.c | 244 + software/gsl-1.15/roots/convergence.c | 87 + software/gsl-1.15/roots/falsepos.c | 178 + software/gsl-1.15/roots/fdfsolver.c | 89 + software/gsl-1.15/roots/fsolver.c | 108 + software/gsl-1.15/roots/gsl_roots.h | 127 + software/gsl-1.15/roots/newton.c | 106 + software/gsl-1.15/roots/roots.h | 37 + software/gsl-1.15/roots/secant.c | 117 + software/gsl-1.15/roots/steffenson.c | 144 + software/gsl-1.15/roots/test.c | 315 + software/gsl-1.15/roots/test.h | 129 + software/gsl-1.15/roots/test_funcs.c | 229 + software/gsl-1.15/siman/.deps/siman.Plo | 130 + software/gsl-1.15/siman/.deps/siman_tsp.Po | 143 + software/gsl-1.15/siman/.deps/test.Po | 112 + software/gsl-1.15/siman/ChangeLog | 129 + software/gsl-1.15/siman/Makefile.am | 21 + software/gsl-1.15/siman/Makefile.in | 689 + software/gsl-1.15/siman/TODO | 9 + software/gsl-1.15/siman/gsl_siman.h | 82 + software/gsl-1.15/siman/siman.c | 273 + software/gsl-1.15/siman/siman_test_driver.sh | 22 + software/gsl-1.15/siman/siman_tsp.c | 329 + software/gsl-1.15/siman/test.c | 162 + software/gsl-1.15/sort/.deps/sort.Plo | 99 + software/gsl-1.15/sort/.deps/sortind.Plo | 99 + software/gsl-1.15/sort/.deps/sortvec.Plo | 240 + software/gsl-1.15/sort/.deps/sortvecind.Plo | 241 + software/gsl-1.15/sort/.deps/subset.Plo | 240 + software/gsl-1.15/sort/.deps/subsetind.Plo | 241 + software/gsl-1.15/sort/.deps/test.Po | 263 + software/gsl-1.15/sort/ChangeLog | 66 + software/gsl-1.15/sort/Makefile.am | 16 + software/gsl-1.15/sort/Makefile.in | 669 + software/gsl-1.15/sort/TODO | 39 + software/gsl-1.15/sort/gsl_heapsort.h | 44 + software/gsl-1.15/sort/gsl_sort.h | 20 + software/gsl-1.15/sort/gsl_sort_char.h | 50 + software/gsl-1.15/sort/gsl_sort_double.h | 50 + software/gsl-1.15/sort/gsl_sort_float.h | 50 + software/gsl-1.15/sort/gsl_sort_int.h | 50 + software/gsl-1.15/sort/gsl_sort_long.h | 50 + software/gsl-1.15/sort/gsl_sort_long_double.h | 50 + software/gsl-1.15/sort/gsl_sort_short.h | 50 + software/gsl-1.15/sort/gsl_sort_uchar.h | 50 + software/gsl-1.15/sort/gsl_sort_uint.h | 50 + software/gsl-1.15/sort/gsl_sort_ulong.h | 50 + software/gsl-1.15/sort/gsl_sort_ushort.h | 50 + software/gsl-1.15/sort/gsl_sort_vector.h | 20 + software/gsl-1.15/sort/gsl_sort_vector_char.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_double.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_float.h | 51 + software/gsl-1.15/sort/gsl_sort_vector_int.h | 51 + software/gsl-1.15/sort/gsl_sort_vector_long.h | 51 + .../sort/gsl_sort_vector_long_double.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_short.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_uchar.h | 51 + software/gsl-1.15/sort/gsl_sort_vector_uint.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_ulong.h | 51 + .../gsl-1.15/sort/gsl_sort_vector_ushort.h | 51 + software/gsl-1.15/sort/sort.c | 114 + software/gsl-1.15/sort/sortind.c | 101 + software/gsl-1.15/sort/sortvec.c | 90 + software/gsl-1.15/sort/sortvec_source.c | 93 + software/gsl-1.15/sort/sortvecind.c | 90 + software/gsl-1.15/sort/sortvecind_source.c | 106 + software/gsl-1.15/sort/subset.c | 86 + software/gsl-1.15/sort/subset_source.c | 146 + software/gsl-1.15/sort/subsetind.c | 86 + software/gsl-1.15/sort/subsetind_source.c | 146 + software/gsl-1.15/sort/test.c | 140 + software/gsl-1.15/sort/test_heapsort.c | 183 + software/gsl-1.15/sort/test_source.c | 303 + software/gsl-1.15/specfunc/.deps/airy.Plo | 101 + software/gsl-1.15/specfunc/.deps/airy_der.Plo | 99 + .../gsl-1.15/specfunc/.deps/airy_zero.Plo | 93 + software/gsl-1.15/specfunc/.deps/atanint.Plo | 95 + software/gsl-1.15/specfunc/.deps/bessel.Plo | 108 + .../gsl-1.15/specfunc/.deps/bessel_I0.Plo | 146 + .../gsl-1.15/specfunc/.deps/bessel_I1.Plo | 146 + .../gsl-1.15/specfunc/.deps/bessel_In.Plo | 143 + .../gsl-1.15/specfunc/.deps/bessel_Inu.Plo | 150 + .../gsl-1.15/specfunc/.deps/bessel_J0.Plo | 150 + .../gsl-1.15/specfunc/.deps/bessel_J1.Plo | 152 + .../gsl-1.15/specfunc/.deps/bessel_Jn.Plo | 150 + .../gsl-1.15/specfunc/.deps/bessel_Jnu.Plo | 148 + .../gsl-1.15/specfunc/.deps/bessel_K0.Plo | 147 + .../gsl-1.15/specfunc/.deps/bessel_K1.Plo | 147 + .../gsl-1.15/specfunc/.deps/bessel_Kn.Plo | 148 + .../gsl-1.15/specfunc/.deps/bessel_Knu.Plo | 150 + .../gsl-1.15/specfunc/.deps/bessel_Y0.Plo | 152 + .../gsl-1.15/specfunc/.deps/bessel_Y1.Plo | 152 + .../gsl-1.15/specfunc/.deps/bessel_Yn.Plo | 155 + .../gsl-1.15/specfunc/.deps/bessel_Ynu.Plo | 148 + .../specfunc/.deps/bessel_amp_phase.Plo | 142 + software/gsl-1.15/specfunc/.deps/bessel_i.Plo | 144 + software/gsl-1.15/specfunc/.deps/bessel_j.Plo | 149 + software/gsl-1.15/specfunc/.deps/bessel_k.Plo | 149 + .../gsl-1.15/specfunc/.deps/bessel_olver.Plo | 100 + .../specfunc/.deps/bessel_sequence.Plo | 137 + .../gsl-1.15/specfunc/.deps/bessel_temme.Plo | 93 + software/gsl-1.15/specfunc/.deps/bessel_y.Plo | 151 + .../gsl-1.15/specfunc/.deps/bessel_zero.Plo | 148 + software/gsl-1.15/specfunc/.deps/beta.Plo | 97 + software/gsl-1.15/specfunc/.deps/beta_inc.Plo | 99 + software/gsl-1.15/specfunc/.deps/clausen.Plo | 95 + software/gsl-1.15/specfunc/.deps/coulomb.Plo | 102 + .../gsl-1.15/specfunc/.deps/coulomb_bound.Plo | 105 + software/gsl-1.15/specfunc/.deps/coupling.Plo | 140 + software/gsl-1.15/specfunc/.deps/dawson.Plo | 94 + software/gsl-1.15/specfunc/.deps/debye.Plo | 96 + software/gsl-1.15/specfunc/.deps/dilog.Plo | 95 + .../gsl-1.15/specfunc/.deps/elementary.Plo | 94 + software/gsl-1.15/specfunc/.deps/ellint.Plo | 92 + software/gsl-1.15/specfunc/.deps/elljac.Plo | 88 + software/gsl-1.15/specfunc/.deps/erfc.Plo | 97 + software/gsl-1.15/specfunc/.deps/exp.Plo | 92 + software/gsl-1.15/specfunc/.deps/expint.Plo | 99 + software/gsl-1.15/specfunc/.deps/expint3.Plo | 94 + .../gsl-1.15/specfunc/.deps/fermi_dirac.Plo | 107 + software/gsl-1.15/specfunc/.deps/gamma.Plo | 106 + .../gsl-1.15/specfunc/.deps/gamma_inc.Plo | 100 + .../gsl-1.15/specfunc/.deps/gegenbauer.Plo | 91 + software/gsl-1.15/specfunc/.deps/hyperg.Plo | 92 + .../gsl-1.15/specfunc/.deps/hyperg_0F1.Plo | 148 + .../gsl-1.15/specfunc/.deps/hyperg_1F1.Plo | 155 + .../gsl-1.15/specfunc/.deps/hyperg_2F0.Plo | 93 + .../gsl-1.15/specfunc/.deps/hyperg_2F1.Plo | 100 + software/gsl-1.15/specfunc/.deps/hyperg_U.Plo | 154 + software/gsl-1.15/specfunc/.deps/laguerre.Plo | 95 + software/gsl-1.15/specfunc/.deps/lambert.Plo | 88 + .../gsl-1.15/specfunc/.deps/legendre_H3d.Plo | 100 + .../gsl-1.15/specfunc/.deps/legendre_Qn.Plo | 151 + .../gsl-1.15/specfunc/.deps/legendre_con.Plo | 165 + .../gsl-1.15/specfunc/.deps/legendre_poly.Plo | 153 + software/gsl-1.15/specfunc/.deps/log.Plo | 94 + .../specfunc/.deps/mathieu_angfunc.Plo | 254 + .../gsl-1.15/specfunc/.deps/mathieu_charv.Plo | 254 + .../gsl-1.15/specfunc/.deps/mathieu_coeff.Plo | 220 + .../specfunc/.deps/mathieu_radfunc.Plo | 325 + .../specfunc/.deps/mathieu_workspace.Plo | 255 + software/gsl-1.15/specfunc/.deps/poch.Plo | 99 + software/gsl-1.15/specfunc/.deps/pow_int.Plo | 88 + software/gsl-1.15/specfunc/.deps/psi.Plo | 106 + software/gsl-1.15/specfunc/.deps/result.Plo | 86 + software/gsl-1.15/specfunc/.deps/shint.Plo | 94 + software/gsl-1.15/specfunc/.deps/sinint.Plo | 97 + .../gsl-1.15/specfunc/.deps/synchrotron.Plo | 100 + software/gsl-1.15/specfunc/.deps/test_airy.Po | 329 + .../gsl-1.15/specfunc/.deps/test_bessel.Po | 330 + .../gsl-1.15/specfunc/.deps/test_coulomb.Po | 330 + .../gsl-1.15/specfunc/.deps/test_dilog.Po | 329 + .../gsl-1.15/specfunc/.deps/test_gamma.Po | 329 + .../gsl-1.15/specfunc/.deps/test_hyperg.Po | 330 + .../gsl-1.15/specfunc/.deps/test_legendre.Po | 330 + .../gsl-1.15/specfunc/.deps/test_mathieu.Po | 327 + software/gsl-1.15/specfunc/.deps/test_sf.Po | 339 + .../gsl-1.15/specfunc/.deps/transport.Plo | 98 + software/gsl-1.15/specfunc/.deps/trig.Plo | 97 + software/gsl-1.15/specfunc/.deps/zeta.Plo | 104 + software/gsl-1.15/specfunc/ChangeLog | 799 + software/gsl-1.15/specfunc/Makefile.am | 19 + software/gsl-1.15/specfunc/Makefile.in | 772 + software/gsl-1.15/specfunc/TODO | 678 + software/gsl-1.15/specfunc/airy.c | 869 + software/gsl-1.15/specfunc/airy_der.c | 888 + software/gsl-1.15/specfunc/airy_zero.c | 546 + software/gsl-1.15/specfunc/atanint.c | 115 + software/gsl-1.15/specfunc/bessel.c | 983 + software/gsl-1.15/specfunc/bessel.h | 92 + software/gsl-1.15/specfunc/bessel_I0.c | 232 + software/gsl-1.15/specfunc/bessel_I1.c | 258 + software/gsl-1.15/specfunc/bessel_In.c | 225 + software/gsl-1.15/specfunc/bessel_Inu.c | 122 + software/gsl-1.15/specfunc/bessel_J0.c | 111 + software/gsl-1.15/specfunc/bessel_J1.c | 128 + software/gsl-1.15/specfunc/bessel_Jn.c | 199 + software/gsl-1.15/specfunc/bessel_Jnu.c | 185 + software/gsl-1.15/specfunc/bessel_K0.c | 214 + software/gsl-1.15/specfunc/bessel_K1.c | 220 + software/gsl-1.15/specfunc/bessel_Kn.c | 240 + software/gsl-1.15/specfunc/bessel_Knu.c | 189 + software/gsl-1.15/specfunc/bessel_Y0.c | 122 + software/gsl-1.15/specfunc/bessel_Y1.c | 137 + software/gsl-1.15/specfunc/bessel_Yn.c | 217 + software/gsl-1.15/specfunc/bessel_Ynu.c | 131 + software/gsl-1.15/specfunc/bessel_amp_phase.c | 188 + software/gsl-1.15/specfunc/bessel_amp_phase.h | 45 + software/gsl-1.15/specfunc/bessel_i.c | 329 + software/gsl-1.15/specfunc/bessel_j.c | 396 + software/gsl-1.15/specfunc/bessel_k.c | 248 + software/gsl-1.15/specfunc/bessel_olver.c | 982 + software/gsl-1.15/specfunc/bessel_olver.h | 33 + software/gsl-1.15/specfunc/bessel_sequence.c | 154 + software/gsl-1.15/specfunc/bessel_temme.c | 219 + software/gsl-1.15/specfunc/bessel_temme.h | 38 + software/gsl-1.15/specfunc/bessel_y.c | 292 + software/gsl-1.15/specfunc/bessel_zero.c | 1219 ++ software/gsl-1.15/specfunc/beta.c | 169 + software/gsl-1.15/specfunc/beta_inc.c | 210 + software/gsl-1.15/specfunc/cheb_eval.c | 34 + software/gsl-1.15/specfunc/cheb_eval_mode.c | 30 + software/gsl-1.15/specfunc/chebyshev.h | 31 + software/gsl-1.15/specfunc/check.h | 3 + software/gsl-1.15/specfunc/clausen.c | 111 + software/gsl-1.15/specfunc/coulomb.c | 1417 ++ software/gsl-1.15/specfunc/coulomb_bound.c | 120 + software/gsl-1.15/specfunc/coupling.c | 439 + software/gsl-1.15/specfunc/dawson.c | 281 + software/gsl-1.15/specfunc/debye.c | 566 + software/gsl-1.15/specfunc/dilog.c | 662 + software/gsl-1.15/specfunc/elementary.c | 86 + software/gsl-1.15/specfunc/ellint.c | 651 + software/gsl-1.15/specfunc/elljac.c | 128 + software/gsl-1.15/specfunc/erfc.c | 465 + software/gsl-1.15/specfunc/error.h | 25 + software/gsl-1.15/specfunc/eval.h | 17 + software/gsl-1.15/specfunc/exp.c | 614 + software/gsl-1.15/specfunc/expint.c | 581 + software/gsl-1.15/specfunc/expint3.c | 146 + software/gsl-1.15/specfunc/fermi_dirac.c | 1633 ++ software/gsl-1.15/specfunc/gamma.c | 1685 ++ software/gsl-1.15/specfunc/gamma_inc.c | 721 + software/gsl-1.15/specfunc/gegenbauer.c | 194 + software/gsl-1.15/specfunc/gsl_sf.h | 39 + software/gsl-1.15/specfunc/gsl_sf_airy.h | 139 + software/gsl-1.15/specfunc/gsl_sf_bessel.h | 549 + software/gsl-1.15/specfunc/gsl_sf_clausen.h | 52 + software/gsl-1.15/specfunc/gsl_sf_coulomb.h | 128 + software/gsl-1.15/specfunc/gsl_sf_coupling.h | 125 + software/gsl-1.15/specfunc/gsl_sf_dawson.h | 52 + software/gsl-1.15/specfunc/gsl_sf_debye.h | 91 + software/gsl-1.15/specfunc/gsl_sf_dilog.h | 130 + .../gsl-1.15/specfunc/gsl_sf_elementary.h | 57 + software/gsl-1.15/specfunc/gsl_sf_ellint.h | 112 + software/gsl-1.15/specfunc/gsl_sf_elljac.h | 48 + software/gsl-1.15/specfunc/gsl_sf_erf.h | 91 + software/gsl-1.15/specfunc/gsl_sf_exp.h | 134 + software/gsl-1.15/specfunc/gsl_sf_expint.h | 167 + .../gsl-1.15/specfunc/gsl_sf_fermi_dirac.h | 126 + software/gsl-1.15/specfunc/gsl_sf_gamma.h | 293 + .../gsl-1.15/specfunc/gsl_sf_gegenbauer.h | 73 + software/gsl-1.15/specfunc/gsl_sf_hyperg.h | 154 + software/gsl-1.15/specfunc/gsl_sf_laguerre.h | 68 + software/gsl-1.15/specfunc/gsl_sf_lambert.h | 69 + software/gsl-1.15/specfunc/gsl_sf_legendre.h | 315 + software/gsl-1.15/specfunc/gsl_sf_log.h | 82 + software/gsl-1.15/specfunc/gsl_sf_mathieu.h | 107 + software/gsl-1.15/specfunc/gsl_sf_pow_int.h | 49 + software/gsl-1.15/specfunc/gsl_sf_psi.h | 113 + software/gsl-1.15/specfunc/gsl_sf_result.h | 59 + .../gsl-1.15/specfunc/gsl_sf_synchrotron.h | 60 + software/gsl-1.15/specfunc/gsl_sf_transport.h | 78 + software/gsl-1.15/specfunc/gsl_sf_trig.h | 152 + software/gsl-1.15/specfunc/gsl_sf_zeta.h | 112 + software/gsl-1.15/specfunc/gsl_specfunc.h | 10 + software/gsl-1.15/specfunc/hyperg.c | 291 + software/gsl-1.15/specfunc/hyperg.h | 78 + software/gsl-1.15/specfunc/hyperg_0F1.c | 178 + software/gsl-1.15/specfunc/hyperg_1F1.c | 2065 ++ software/gsl-1.15/specfunc/hyperg_2F0.c | 63 + software/gsl-1.15/specfunc/hyperg_2F1.c | 946 + software/gsl-1.15/specfunc/hyperg_U.c | 1746 ++ software/gsl-1.15/specfunc/laguerre.c | 335 + software/gsl-1.15/specfunc/lambert.c | 231 + software/gsl-1.15/specfunc/legendre.h | 72 + software/gsl-1.15/specfunc/legendre_H3d.c | 568 + software/gsl-1.15/specfunc/legendre_Qn.c | 366 + software/gsl-1.15/specfunc/legendre_con.c | 1374 ++ software/gsl-1.15/specfunc/legendre_poly.c | 779 + software/gsl-1.15/specfunc/log.c | 266 + software/gsl-1.15/specfunc/mathieu_angfunc.c | 343 + software/gsl-1.15/specfunc/mathieu_charv.c | 875 + software/gsl-1.15/specfunc/mathieu_coeff.c | 348 + software/gsl-1.15/specfunc/mathieu_radfunc.c | 459 + .../gsl-1.15/specfunc/mathieu_workspace.c | 204 + software/gsl-1.15/specfunc/poch.c | 465 + software/gsl-1.15/specfunc/pow_int.c | 74 + software/gsl-1.15/specfunc/psi.c | 866 + software/gsl-1.15/specfunc/recurse.h | 125 + software/gsl-1.15/specfunc/result.c | 89 + software/gsl-1.15/specfunc/shint.c | 135 + software/gsl-1.15/specfunc/sinint.c | 402 + software/gsl-1.15/specfunc/synchrotron.c | 285 + software/gsl-1.15/specfunc/test_airy.c | 134 + software/gsl-1.15/specfunc/test_bessel.c | 618 + software/gsl-1.15/specfunc/test_coulomb.c | 442 + software/gsl-1.15/specfunc/test_dilog.c | 310 + software/gsl-1.15/specfunc/test_gamma.c | 393 + software/gsl-1.15/specfunc/test_hyperg.c | 692 + software/gsl-1.15/specfunc/test_legendre.c | 552 + software/gsl-1.15/specfunc/test_mathieu.c | 212 + software/gsl-1.15/specfunc/test_sf.c | 2735 +++ software/gsl-1.15/specfunc/test_sf.h | 106 + software/gsl-1.15/specfunc/transport.c | 492 + software/gsl-1.15/specfunc/trig.c | 771 + software/gsl-1.15/specfunc/zeta.c | 1050 ++ software/gsl-1.15/stamp-h1 | 1 + software/gsl-1.15/statistics/.deps/absdev.Plo | 58 + .../gsl-1.15/statistics/.deps/covariance.Plo | 58 + .../gsl-1.15/statistics/.deps/kurtosis.Plo | 58 + software/gsl-1.15/statistics/.deps/lag1.Plo | 43 + software/gsl-1.15/statistics/.deps/mean.Plo | 43 + software/gsl-1.15/statistics/.deps/median.Plo | 43 + software/gsl-1.15/statistics/.deps/minmax.Plo | 155 + .../gsl-1.15/statistics/.deps/p_variance.Plo | 43 + .../gsl-1.15/statistics/.deps/quantiles.Plo | 43 + software/gsl-1.15/statistics/.deps/skew.Plo | 58 + software/gsl-1.15/statistics/.deps/test.Po | 302 + .../gsl-1.15/statistics/.deps/test_nist.Po | 121 + software/gsl-1.15/statistics/.deps/ttest.Plo | 58 + .../gsl-1.15/statistics/.deps/variance.Plo | 58 + .../gsl-1.15/statistics/.deps/wabsdev.Plo | 58 + .../gsl-1.15/statistics/.deps/wkurtosis.Plo | 58 + software/gsl-1.15/statistics/.deps/wmean.Plo | 43 + software/gsl-1.15/statistics/.deps/wskew.Plo | 58 + .../gsl-1.15/statistics/.deps/wvariance.Plo | 58 + software/gsl-1.15/statistics/ChangeLog | 127 + software/gsl-1.15/statistics/Makefile.am | 19 + software/gsl-1.15/statistics/Makefile.in | 682 + software/gsl-1.15/statistics/TODO | 105 + software/gsl-1.15/statistics/absdev.c | 70 + software/gsl-1.15/statistics/absdev_source.c | 49 + software/gsl-1.15/statistics/covariance.c | 72 + .../gsl-1.15/statistics/covariance_source.c | 136 + software/gsl-1.15/statistics/gsl_statistics.h | 20 + .../gsl-1.15/statistics/gsl_statistics_char.h | 79 + .../statistics/gsl_statistics_double.h | 99 + .../statistics/gsl_statistics_float.h | 99 + .../gsl-1.15/statistics/gsl_statistics_int.h | 79 + .../gsl-1.15/statistics/gsl_statistics_long.h | 79 + .../statistics/gsl_statistics_long_double.h | 99 + .../statistics/gsl_statistics_short.h | 79 + .../statistics/gsl_statistics_uchar.h | 79 + .../gsl-1.15/statistics/gsl_statistics_uint.h | 79 + .../statistics/gsl_statistics_ulong.h | 79 + .../statistics/gsl_statistics_ushort.h | 79 + software/gsl-1.15/statistics/kurtosis.c | 71 + .../gsl-1.15/statistics/kurtosis_source.c | 55 + software/gsl-1.15/statistics/lag1.c | 70 + software/gsl-1.15/statistics/lag1_source.c | 51 + software/gsl-1.15/statistics/mean.c | 70 + software/gsl-1.15/statistics/mean_source.c | 35 + software/gsl-1.15/statistics/median.c | 71 + software/gsl-1.15/statistics/median_source.c | 44 + software/gsl-1.15/statistics/minmax.c | 72 + software/gsl-1.15/statistics/minmax_source.c | 207 + software/gsl-1.15/statistics/p_variance.c | 71 + .../gsl-1.15/statistics/p_variance_source.c | 39 + software/gsl-1.15/statistics/quantiles.c | 71 + .../gsl-1.15/statistics/quantiles_source.c | 45 + software/gsl-1.15/statistics/skew.c | 72 + software/gsl-1.15/statistics/skew_source.c | 51 + software/gsl-1.15/statistics/test.c | 132 + .../gsl-1.15/statistics/test_float_source.c | 416 + .../gsl-1.15/statistics/test_int_source.c | 258 + software/gsl-1.15/statistics/test_nist.c | 503 + software/gsl-1.15/statistics/ttest.c | 72 + software/gsl-1.15/statistics/ttest_source.c | 42 + software/gsl-1.15/statistics/variance.c | 72 + .../gsl-1.15/statistics/variance_source.c | 128 + software/gsl-1.15/statistics/wabsdev.c | 21 + software/gsl-1.15/statistics/wabsdev_source.c | 51 + software/gsl-1.15/statistics/wkurtosis.c | 21 + .../gsl-1.15/statistics/wkurtosis_source.c | 62 + software/gsl-1.15/statistics/wmean.c | 21 + software/gsl-1.15/statistics/wmean_source.c | 48 + software/gsl-1.15/statistics/wskew.c | 22 + software/gsl-1.15/statistics/wskew_source.c | 59 + software/gsl-1.15/statistics/wvariance.c | 21 + .../gsl-1.15/statistics/wvariance_source.c | 171 + software/gsl-1.15/sum/.deps/levin_u.Plo | 133 + software/gsl-1.15/sum/.deps/levin_utrunc.Plo | 134 + software/gsl-1.15/sum/.deps/test.Po | 129 + software/gsl-1.15/sum/.deps/work_u.Plo | 131 + software/gsl-1.15/sum/.deps/work_utrunc.Plo | 132 + software/gsl-1.15/sum/ChangeLog | 102 + software/gsl-1.15/sum/Makefile.am | 17 + software/gsl-1.15/sum/Makefile.in | 665 + software/gsl-1.15/sum/gsl_sum.h | 162 + software/gsl-1.15/sum/levin_u.c | 262 + software/gsl-1.15/sum/levin_utrunc.c | 202 + software/gsl-1.15/sum/test.c | 250 + software/gsl-1.15/sum/work_u.c | 95 + software/gsl-1.15/sum/work_utrunc.c | 68 + software/gsl-1.15/sys/.deps/coerce.Plo | 20 + software/gsl-1.15/sys/.deps/expm1.Plo | 57 + software/gsl-1.15/sys/.deps/fcmp.Plo | 20 + software/gsl-1.15/sys/.deps/fdiv.Plo | 20 + software/gsl-1.15/sys/.deps/hypot.Plo | 57 + software/gsl-1.15/sys/.deps/infnan.Plo | 20 + software/gsl-1.15/sys/.deps/invhyp.Plo | 57 + software/gsl-1.15/sys/.deps/ldfrexp.Plo | 57 + software/gsl-1.15/sys/.deps/log1p.Plo | 20 + software/gsl-1.15/sys/.deps/minmax.Plo | 10 + software/gsl-1.15/sys/.deps/pow_int.Plo | 25 + software/gsl-1.15/sys/.deps/prec.Plo | 42 + software/gsl-1.15/sys/.deps/test.Po | 126 + software/gsl-1.15/sys/ChangeLog | 170 + software/gsl-1.15/sys/Makefile.am | 12 + software/gsl-1.15/sys/Makefile.in | 674 + software/gsl-1.15/sys/coerce.c | 49 + software/gsl-1.15/sys/expm1.c | 50 + software/gsl-1.15/sys/fcmp.c | 62 + software/gsl-1.15/sys/fdiv.c | 28 + software/gsl-1.15/sys/gsl_sys.h | 63 + software/gsl-1.15/sys/hypot.c | 68 + software/gsl-1.15/sys/infnan.c | 152 + software/gsl-1.15/sys/invhyp.c | 102 + software/gsl-1.15/sys/ldfrexp.c | 110 + software/gsl-1.15/sys/log1p.c | 30 + software/gsl-1.15/sys/minmax.c | 39 + software/gsl-1.15/sys/pow_int.c | 56 + software/gsl-1.15/sys/prec.c | 67 + software/gsl-1.15/sys/test.c | 624 + software/gsl-1.15/templates_off.h | 92 + software/gsl-1.15/templates_on.h | 254 + software/gsl-1.15/test/.deps/results.Plo | 118 + software/gsl-1.15/test/ChangeLog | 32 + software/gsl-1.15/test/Makefile.am | 10 + software/gsl-1.15/test/Makefile.in | 546 + software/gsl-1.15/test/gsl_test.h | 66 + software/gsl-1.15/test/results.c | 461 + software/gsl-1.15/test_gsl_histogram.sh | 16 + software/gsl-1.15/testfile | 4 + software/gsl-1.15/utils/.deps/memcpy.Po | 1 + software/gsl-1.15/utils/.deps/memmove.Po | 1 + software/gsl-1.15/utils/.deps/placeholder.Plo | 1 + software/gsl-1.15/utils/.deps/strdup.Po | 1 + software/gsl-1.15/utils/.deps/strtol.Po | 1 + software/gsl-1.15/utils/.deps/strtoul.Po | 1 + software/gsl-1.15/utils/Makefile.am | 7 + software/gsl-1.15/utils/Makefile.in | 501 + software/gsl-1.15/utils/README | 5 + software/gsl-1.15/utils/memcpy.c | 20 + software/gsl-1.15/utils/memmove.c | 28 + software/gsl-1.15/utils/placeholder.c | 9 + software/gsl-1.15/utils/strdup.c | 43 + software/gsl-1.15/utils/strtol.c | 162 + software/gsl-1.15/utils/strtoul.c | 21 + software/gsl-1.15/utils/system.h | 102 + software/gsl-1.15/vector/.deps/copy.Plo | 179 + software/gsl-1.15/vector/.deps/file.Plo | 180 + software/gsl-1.15/vector/.deps/init.Plo | 179 + software/gsl-1.15/vector/.deps/minmax.Plo | 216 + software/gsl-1.15/vector/.deps/oper.Plo | 218 + software/gsl-1.15/vector/.deps/prop.Plo | 179 + software/gsl-1.15/vector/.deps/reim.Plo | 181 + software/gsl-1.15/vector/.deps/subvector.Plo | 181 + software/gsl-1.15/vector/.deps/swap.Plo | 179 + software/gsl-1.15/vector/.deps/test.Po | 228 + software/gsl-1.15/vector/.deps/test_static.Po | 230 + software/gsl-1.15/vector/.deps/vector.Plo | 175 + software/gsl-1.15/vector/.deps/view.Plo | 181 + software/gsl-1.15/vector/ChangeLog | 237 + software/gsl-1.15/vector/Makefile.am | 21 + software/gsl-1.15/vector/Makefile.in | 688 + software/gsl-1.15/vector/TODO | 6 + software/gsl-1.15/vector/copy.c | 87 + software/gsl-1.15/vector/copy_source.c | 51 + software/gsl-1.15/vector/file.c | 89 + software/gsl-1.15/vector/file_source.c | 63 + software/gsl-1.15/vector/gsl_vector.h | 25 + software/gsl-1.15/vector/gsl_vector_char.h | 230 + software/gsl-1.15/vector/gsl_vector_complex.h | 17 + .../vector/gsl_vector_complex_double.h | 251 + .../vector/gsl_vector_complex_float.h | 251 + .../vector/gsl_vector_complex_long_double.h | 251 + software/gsl-1.15/vector/gsl_vector_double.h | 230 + software/gsl-1.15/vector/gsl_vector_float.h | 230 + software/gsl-1.15/vector/gsl_vector_int.h | 230 + software/gsl-1.15/vector/gsl_vector_long.h | 230 + .../gsl-1.15/vector/gsl_vector_long_double.h | 230 + software/gsl-1.15/vector/gsl_vector_short.h | 230 + software/gsl-1.15/vector/gsl_vector_uchar.h | 230 + software/gsl-1.15/vector/gsl_vector_uint.h | 230 + software/gsl-1.15/vector/gsl_vector_ulong.h | 230 + software/gsl-1.15/vector/gsl_vector_ushort.h | 230 + software/gsl-1.15/vector/init.c | 87 + software/gsl-1.15/vector/init_source.c | 230 + software/gsl-1.15/vector/minmax.c | 72 + software/gsl-1.15/vector/minmax_source.c | 217 + software/gsl-1.15/vector/oper.c | 91 + .../gsl-1.15/vector/oper_complex_source.c | 182 + software/gsl-1.15/vector/oper_source.c | 151 + software/gsl-1.15/vector/prop.c | 87 + software/gsl-1.15/vector/prop_source.c | 148 + software/gsl-1.15/vector/reim.c | 44 + software/gsl-1.15/vector/reim_source.c | 56 + software/gsl-1.15/vector/subvector.c | 176 + software/gsl-1.15/vector/subvector_source.c | 86 + software/gsl-1.15/vector/swap.c | 87 + software/gsl-1.15/vector/swap_source.c | 107 + software/gsl-1.15/vector/test.c | 244 + .../gsl-1.15/vector/test_complex_source.c | 782 + software/gsl-1.15/vector/test_source.c | 843 + software/gsl-1.15/vector/test_static.c | 6 + software/gsl-1.15/vector/vector.c | 31 + software/gsl-1.15/vector/view.c | 176 + software/gsl-1.15/vector/view.h | 2 + software/gsl-1.15/vector/view_source.c | 76 + software/gsl-1.15/version.c | 30 + software/gsl-1.15/wavelet/.deps/bspline.Plo | 130 + .../gsl-1.15/wavelet/.deps/daubechies.Plo | 93 + software/gsl-1.15/wavelet/.deps/dwt.Plo | 107 + software/gsl-1.15/wavelet/.deps/haar.Plo | 130 + software/gsl-1.15/wavelet/.deps/test.Po | 229 + software/gsl-1.15/wavelet/.deps/wavelet.Plo | 92 + software/gsl-1.15/wavelet/ChangeLog | 32 + software/gsl-1.15/wavelet/Makefile.am | 17 + software/gsl-1.15/wavelet/Makefile.in | 668 + software/gsl-1.15/wavelet/TODO | 14 + software/gsl-1.15/wavelet/bspline.c | 591 + software/gsl-1.15/wavelet/daubechies.c | 458 + software/gsl-1.15/wavelet/dwt.c | 396 + software/gsl-1.15/wavelet/gsl_wavelet.h | 108 + software/gsl-1.15/wavelet/gsl_wavelet2d.h | 107 + software/gsl-1.15/wavelet/haar.c | 81 + software/gsl-1.15/wavelet/test.c | 270 + software/gsl-1.15/wavelet/wavelet.c | 134 + Makefile => source/Makefile | 0 agn.c => source/agn.c | 0 anisowind.c => source/anisowind.c | 0 atomic.c => source/atomic.c | 0 atomic.h => source/atomic.h | 0 .../auger_ionization.c | 0 bal_photon2d.c => source/bal_photon2d.c | 0 bal_trans_phot.c => source/bal_trans_phot.c | 0 balance.c => source/balance.c | 0 balance_abso.c => source/balance_abso.c | 0 balance_bb.c => source/balance_bb.c | 0 balance_gen.c => source/balance_gen.c | 0 balance_sub.c => source/balance_sub.c | 0 .../balance_templates.h | 0 bands.c => source/bands.c | 0 bb.c => source/bb.c | 0 bilinear.c => source/bilinear.c | 0 compton.c => source/compton.c | 0 continuum.c => source/continuum.c | 0 corona.c => source/corona.c | 0 cylind_var.c => source/cylind_var.c | 0 cylindrical.c => source/cylindrical.c | 0 debug.c => source/debug.c | 0 density.c => source/density.c | 0 detail.c => source/detail.c | 0 diag.c => source/diag.c | 0 dielectronic.c => source/dielectronic.c | 0 direct_ion.c => source/direct_ion.c | 0 disk.c => source/disk.c | 0 do.c => source/do.c | 0 ei.c => source/ei.c | 0 elvis.c => source/elvis.c | 0 emission.c => source/emission.c | 0 estimators.c => source/estimators.c | 0 extract.c => source/extract.c | 0 fitsio.h => source/fitsio.h | 0 foo.h => source/foo.h | 0 get_atomicdata.c => source/get_atomicdata.c | 0 get_models.c => source/get_models.c | 0 gradv.c => source/gradv.c | 0 gridwind.c => source/gridwind.c | 0 homologous.c => source/homologous.c | 0 ionization.c => source/ionization.c | 0 ispy.c => source/ispy.c | 0 knigge.c => source/knigge.c | 0 levels.c => source/levels.c | 0 lineio.c => source/lineio.c | 0 lines.c => source/lines.c | 0 log.c => source/log.c | 0 log.h => source/log.h | 0 longnam.h => source/longnam.h | 0 matom.c => source/matom.c | 0 matom_diag.c => source/matom_diag.c | 0 models.h => source/models.h | 0 my_linalg.h => source/my_linalg.h | 0 partition.c => source/partition.c | 0 pdf.c => source/pdf.c | 0 phot_util.c => source/phot_util.c | 0 photon2d.c => source/photon2d.c | 0 photon_gen.c => source/photon_gen.c | 0 pi_rates.c => source/pi_rates.c | 0 plane.c => source/plane.c | 0 plot_roche.c => source/plot_roche.c | 0 proga.c => source/proga.c | 0 py_grid.c => source/py_grid.c | 0 py_ray.c => source/py_ray.c | 0 py_smooth.c => source/py_smooth.c | 0 py_wind.c => source/py_wind.c | 0 py_wind_ion.c => source/py_wind_ion.c | 0 py_wind_macro.c => source/py_wind_macro.c | 0 py_wind_sub.c => source/py_wind_sub.c | 0 py_wind_write.c => source/py_wind_write.c | 0 python.c => source/python.c | 0 python.h => source/python.h | 0 radiation.c => source/radiation.c | 0 random.c => source/random.c | 0 rdpar.c => source/rdpar.c | 0 recipes.c => source/recipes.c | 0 recipes.h => source/recipes.h | 0 recomb.c => source/recomb.c | 0 reposition.c => source/reposition.c | 0 resonate.c => source/resonate.c | 0 roche.c => source/roche.c | 0 rtheta.c => source/rtheta.c | 0 saha.c => source/saha.c | 0 shell_wind.c => source/shell_wind.c | 0 signal.c => source/signal.c | 0 spectra.c => source/spectra.c | 0 .../spectral_estimators.c | 0 spherical.c => source/spherical.c | 0 stellar_wind.c => source/stellar_wind.c | 0 sv.c => source/sv.c | 0 t_bilinear.c => source/t_bilinear.c | 0 templates.h => source/templates.h | 0 test_bb.c => source/test_bb.c | 0 test_diectronic.c => source/test_diectronic.c | 0 test_saha.c => source/test_saha.c | 0 time.c => source/time.c | 0 torus.c => source/torus.c | 0 trans_phot.c => source/trans_phot.c | 0 util.c => source/util.c | 0 .../variable_temperature.c | 0 vector.c => source/vector.c | 0 version.h => source/version.h | 0 wind.c => source/wind.c | 0 wind2d.c => source/wind2d.c | 0 wind_sum.c => source/wind_sum.c | 0 wind_updates2d.c => source/wind_updates2d.c | 0 windsave.c => source/windsave.c | 0 yso.c => source/yso.c | 0 zeta.c => source/zeta.c | 0 2845 files changed, 903646 insertions(+), 34 deletions(-) create mode 100644 INSTALL.txt create mode 100644 Makefile.in create mode 100644 bin/Readme.md create mode 100755 bin/Setup_Py_Dir create mode 100755 configure create mode 100644 docs/README.md create mode 100644 docs/cookbook.pdf create mode 100644 examples/1d_sn.pf create mode 100644 examples/cv_macro_benchmark.pf create mode 100644 examples/cv_standard.pf create mode 100644 examples/fiducial_agn.pf create mode 100755 examples/travis/Setup_Py_Dir create mode 100644 examples/travis/balmer_test.pf create mode 100644 examples/travis/check_travis_test.py create mode 100644 examples/travis/test1.pf create mode 100644 include/README create mode 100644 lib/README create mode 100755 py_progs/CheckComplete create mode 100644 py_progs/dev/history.txt create mode 100644 py_progs/error_scripts/py_error.py create mode 100755 py_progs/error_scripts/watchdog.py create mode 100755 py_progs/grid_Royal/grid_royal.py create mode 100644 py_progs/grid_Royal/history.txt create mode 100755 py_progs/grid_Royal/msub_split.py create mode 100755 py_progs/grid_comp/Old/compare.py.090301.old create mode 100755 py_progs/grid_comp/Old/compare.py.090302.old create mode 100755 py_progs/grid_comp/Old/compare.py.090306.old create mode 100755 py_progs/grid_comp/Old/compare.py.090307.old create mode 100755 py_progs/grid_comp/Old/compare.py.090312.old create mode 100755 py_progs/grid_comp/Old/compare.py.old create mode 100644 py_progs/grid_comp/Old/history.txt create mode 100755 py_progs/grid_comp/compare.py create mode 100755 py_progs/grid_comp/compare_one.py create mode 100644 py_progs/grid_comp/history.txt create mode 100644 py_progs/history.txt create mode 100644 py_progs/make_royal/history.txt create mode 100755 py_progs/make_royal/make_royal.py create mode 100755 py_progs/make_royal/make_royal.py.old create mode 100755 py_progs/modules/Old/carlo.py.090303.old create mode 100755 py_progs/modules/Old/carlo.py.090304.old create mode 100755 py_progs/modules/Old/carlo.py.090312.old create mode 100755 py_progs/modules/Old/carlo.py.090314.old create mode 100755 py_progs/modules/Old/carlo.py.old create mode 100755 py_progs/modules/Old/grid_eval.py.090606.old create mode 100755 py_progs/modules/Old/grid_eval.py.090609.old create mode 100755 py_progs/modules/Old/grid_eval.py.old create mode 100644 py_progs/modules/Old/history.txt create mode 100755 py_progs/modules/carlo.py create mode 100644 py_progs/modules/carlo.pyc create mode 100755 py_progs/modules/grid_eval.py create mode 100755 py_progs/modules/grid_eval.py.old create mode 100644 py_progs/modules/grid_eval.pyc create mode 100644 py_progs/modules/history.txt create mode 100755 py_progs/modules/oldcarlo.py create mode 100644 py_progs/modules/oldcarlo.pyc create mode 100755 py_progs/plot_roche create mode 100644 py_progs/restart/history.txt create mode 100755 py_progs/restart/restart.py create mode 100755 py_progs/restart/restart.py.old create mode 120000 py_progs/scripts/compare.py create mode 120000 py_progs/scripts/grid_royal.py create mode 100644 py_progs/scripts/history.txt create mode 120000 py_progs/scripts/make_royal.py create mode 120000 py_progs/scripts/msub_split.py create mode 100755 py_progs/scripts/pf_update.py create mode 100755 py_progs/scripts/pyfits_eval.py create mode 100755 py_progs/scripts/pyfits_eval2.py create mode 120000 py_progs/scripts/restart.py create mode 100755 py_progs/setup_scripts/Setup_Py_Dir create mode 100644 software/Readme create mode 100644 software/cfitsio3040/History create mode 100644 software/cfitsio3040/License.txt create mode 100644 software/cfitsio3040/Makefile create mode 100644 software/cfitsio3040/Makefile.in create mode 100644 software/cfitsio3040/README create mode 100644 software/cfitsio3040/README.MacOS create mode 100644 software/cfitsio3040/README.win32 create mode 100644 software/cfitsio3040/buffers.c create mode 100644 software/cfitsio3040/cfileio.c create mode 100644 software/cfitsio3040/cfitsio.doc create mode 100644 software/cfitsio3040/cfitsio.pc create mode 100644 software/cfitsio3040/cfitsio.pc.in create mode 100644 software/cfitsio3040/cfitsio.ps create mode 100644 software/cfitsio3040/cfitsio.tex create mode 100644 software/cfitsio3040/cfitsio.toc create mode 100644 software/cfitsio3040/cfitsio_mac.sit.hqx create mode 100644 software/cfitsio3040/cfortran.doc create mode 100644 software/cfitsio3040/cfortran.h create mode 100644 software/cfitsio3040/changes.txt create mode 100644 software/cfitsio3040/checksum.c create mode 100644 software/cfitsio3040/compress.c create mode 100644 software/cfitsio3040/compress.h create mode 100644 software/cfitsio3040/compress_alternate.c create mode 100644 software/cfitsio3040/config.log create mode 100755 software/cfitsio3040/config.status create mode 100755 software/cfitsio3040/configure create mode 100644 software/cfitsio3040/configure.in create mode 100644 software/cfitsio3040/cookbook.c create mode 100644 software/cfitsio3040/cookbook.f create mode 100644 software/cfitsio3040/drvrfile.c create mode 100644 software/cfitsio3040/drvrgsiftp.c create mode 100644 software/cfitsio3040/drvrgsiftp.h create mode 100644 software/cfitsio3040/drvrmem.c create mode 100644 software/cfitsio3040/drvrnet.c create mode 100644 software/cfitsio3040/drvrsmem.c create mode 100644 software/cfitsio3040/drvrsmem.h create mode 100644 software/cfitsio3040/editcol.c create mode 100644 software/cfitsio3040/edithdu.c create mode 100644 software/cfitsio3040/eval.l create mode 100644 software/cfitsio3040/eval.y create mode 100644 software/cfitsio3040/eval_defs.h create mode 100644 software/cfitsio3040/eval_f.c create mode 100644 software/cfitsio3040/eval_l.c create mode 100644 software/cfitsio3040/eval_tab.h create mode 100644 software/cfitsio3040/eval_y.c create mode 100644 software/cfitsio3040/f77.inc create mode 100644 software/cfitsio3040/f77_wrap.h create mode 100644 software/cfitsio3040/f77_wrap1.c create mode 100644 software/cfitsio3040/f77_wrap2.c create mode 100644 software/cfitsio3040/f77_wrap3.c create mode 100644 software/cfitsio3040/f77_wrap4.c create mode 100644 software/cfitsio3040/fits_hcompress.c create mode 100644 software/cfitsio3040/fits_hdecompress.c create mode 100644 software/cfitsio3040/fitscopy.c create mode 100644 software/cfitsio3040/fitscore.c create mode 100644 software/cfitsio3040/fitsio.doc create mode 100644 software/cfitsio3040/fitsio.h create mode 100644 software/cfitsio3040/fitsio.ps create mode 100644 software/cfitsio3040/fitsio.tex create mode 100644 software/cfitsio3040/fitsio.toc create mode 100644 software/cfitsio3040/fitsio2.h create mode 100644 software/cfitsio3040/getcol.c create mode 100644 software/cfitsio3040/getcolb.c create mode 100644 software/cfitsio3040/getcold.c create mode 100644 software/cfitsio3040/getcole.c create mode 100644 software/cfitsio3040/getcoli.c create mode 100644 software/cfitsio3040/getcolj.c create mode 100644 software/cfitsio3040/getcolk.c create mode 100644 software/cfitsio3040/getcoll.c create mode 100644 software/cfitsio3040/getcols.c create mode 100644 software/cfitsio3040/getcolsb.c create mode 100644 software/cfitsio3040/getcolui.c create mode 100644 software/cfitsio3040/getcoluj.c create mode 100644 software/cfitsio3040/getcoluk.c create mode 100644 software/cfitsio3040/getkey.c create mode 100644 software/cfitsio3040/group.c create mode 100644 software/cfitsio3040/group.h create mode 100644 software/cfitsio3040/grparser.c create mode 100644 software/cfitsio3040/grparser.h create mode 100644 software/cfitsio3040/histo.c create mode 100644 software/cfitsio3040/history.txt create mode 100644 software/cfitsio3040/imcompress.c create mode 100644 software/cfitsio3040/imcopy.c create mode 100644 software/cfitsio3040/iraffits.c create mode 100644 software/cfitsio3040/iter_a.c create mode 100644 software/cfitsio3040/iter_a.f create mode 100644 software/cfitsio3040/iter_a.fit create mode 100644 software/cfitsio3040/iter_b.c create mode 100644 software/cfitsio3040/iter_b.f create mode 100644 software/cfitsio3040/iter_b.fit create mode 100644 software/cfitsio3040/iter_c.c create mode 100644 software/cfitsio3040/iter_c.f create mode 100644 software/cfitsio3040/iter_c.fit create mode 100644 software/cfitsio3040/iter_image.c create mode 100644 software/cfitsio3040/iter_var.c create mode 100644 software/cfitsio3040/listhead.c create mode 100644 software/cfitsio3040/longnam.h create mode 100644 software/cfitsio3040/make_dfloat.com create mode 100644 software/cfitsio3040/make_gfloat.com create mode 100644 software/cfitsio3040/make_ieee.com create mode 100644 software/cfitsio3040/makefile.bc create mode 100644 software/cfitsio3040/makefile.os2 create mode 100644 software/cfitsio3040/makefile.vcc create mode 100644 software/cfitsio3040/makepc.bat create mode 100644 software/cfitsio3040/mkpkg create mode 100644 software/cfitsio3040/modkey.c create mode 100644 software/cfitsio3040/pliocomp.c create mode 100644 software/cfitsio3040/putcol.c create mode 100644 software/cfitsio3040/putcolb.c create mode 100644 software/cfitsio3040/putcold.c create mode 100644 software/cfitsio3040/putcole.c create mode 100644 software/cfitsio3040/putcoli.c create mode 100644 software/cfitsio3040/putcolj.c create mode 100644 software/cfitsio3040/putcolk.c create mode 100644 software/cfitsio3040/putcoll.c create mode 100644 software/cfitsio3040/putcols.c create mode 100644 software/cfitsio3040/putcolsb.c create mode 100644 software/cfitsio3040/putcolu.c create mode 100644 software/cfitsio3040/putcolui.c create mode 100644 software/cfitsio3040/putcoluj.c create mode 100644 software/cfitsio3040/putcoluk.c create mode 100644 software/cfitsio3040/putkey.c create mode 100644 software/cfitsio3040/quantize.c create mode 100644 software/cfitsio3040/quick.ps create mode 100644 software/cfitsio3040/quick.tex create mode 100644 software/cfitsio3040/quick.toc create mode 100644 software/cfitsio3040/region.c create mode 100644 software/cfitsio3040/region.h create mode 100644 software/cfitsio3040/ricecomp.c create mode 100644 software/cfitsio3040/ricecomp.h create mode 100644 software/cfitsio3040/sample.tpl create mode 100644 software/cfitsio3040/scalnull.c create mode 100644 software/cfitsio3040/smem.c create mode 100644 software/cfitsio3040/speed.c create mode 100644 software/cfitsio3040/swapproc.c create mode 100644 software/cfitsio3040/testf77.f create mode 100644 software/cfitsio3040/testf77.out create mode 100644 software/cfitsio3040/testf77.std create mode 100644 software/cfitsio3040/testprog.c create mode 100644 software/cfitsio3040/testprog.out create mode 100644 software/cfitsio3040/testprog.std create mode 100644 software/cfitsio3040/testprog.tpt create mode 100644 software/cfitsio3040/vmsieee.c create mode 100644 software/cfitsio3040/vmsieeed.mar create mode 100644 software/cfitsio3040/vmsieeer.mar create mode 100644 software/cfitsio3040/wcssub.c create mode 100644 software/cfitsio3040/wcsutil.c create mode 100644 software/cfitsio3040/wcsutil_alternate.c create mode 100644 software/cfitsio3040/winDumpExts.mak create mode 100644 software/cfitsio3040/windumpexts.c create mode 100644 software/gsl-1.15/.deps/gsl-histogram.Po create mode 100644 software/gsl-1.15/.deps/gsl-randist.Po create mode 100644 software/gsl-1.15/.deps/version.Plo create mode 100644 software/gsl-1.15/AUTHORS create mode 100644 software/gsl-1.15/BUGS create mode 100644 software/gsl-1.15/COPYING create mode 100644 software/gsl-1.15/ChangeLog create mode 100644 software/gsl-1.15/INSTALL create mode 100644 software/gsl-1.15/Makefile create mode 100644 software/gsl-1.15/Makefile.am create mode 100644 software/gsl-1.15/Makefile.in create mode 100644 software/gsl-1.15/NEWS create mode 100644 software/gsl-1.15/README create mode 100644 software/gsl-1.15/THANKS create mode 100644 software/gsl-1.15/TODO create mode 100644 software/gsl-1.15/aclocal.m4 create mode 100755 software/gsl-1.15/autogen.sh create mode 100644 software/gsl-1.15/blas/.deps/blas.Plo create mode 100644 software/gsl-1.15/blas/ChangeLog create mode 100644 software/gsl-1.15/blas/Makefile.am create mode 100644 software/gsl-1.15/blas/Makefile.in create mode 100644 software/gsl-1.15/blas/TODO create mode 100644 software/gsl-1.15/blas/blas.c create mode 100644 software/gsl-1.15/blas/gsl_blas.h create mode 100644 software/gsl-1.15/blas/gsl_blas_types.h create mode 100644 software/gsl-1.15/block/.deps/block.Plo create mode 100644 software/gsl-1.15/block/.deps/file.Plo create mode 100644 software/gsl-1.15/block/.deps/init.Plo create mode 100644 software/gsl-1.15/block/.deps/test.Po create mode 100644 software/gsl-1.15/block/ChangeLog create mode 100644 software/gsl-1.15/block/Makefile.am create mode 100644 software/gsl-1.15/block/Makefile.in create mode 100644 software/gsl-1.15/block/block.c create mode 100644 software/gsl-1.15/block/block_source.c create mode 100644 software/gsl-1.15/block/file.c create mode 100644 software/gsl-1.15/block/fprintf_source.c create mode 100644 software/gsl-1.15/block/fwrite_source.c create mode 100644 software/gsl-1.15/block/gsl_block.h create mode 100644 software/gsl-1.15/block/gsl_block_char.h create mode 100644 software/gsl-1.15/block/gsl_block_complex_double.h create mode 100644 software/gsl-1.15/block/gsl_block_complex_float.h create mode 100644 software/gsl-1.15/block/gsl_block_complex_long_double.h create mode 100644 software/gsl-1.15/block/gsl_block_double.h create mode 100644 software/gsl-1.15/block/gsl_block_float.h create mode 100644 software/gsl-1.15/block/gsl_block_int.h create mode 100644 software/gsl-1.15/block/gsl_block_long.h create mode 100644 software/gsl-1.15/block/gsl_block_long_double.h create mode 100644 software/gsl-1.15/block/gsl_block_short.h create mode 100644 software/gsl-1.15/block/gsl_block_uchar.h create mode 100644 software/gsl-1.15/block/gsl_block_uint.h create mode 100644 software/gsl-1.15/block/gsl_block_ulong.h create mode 100644 software/gsl-1.15/block/gsl_block_ushort.h create mode 100644 software/gsl-1.15/block/gsl_check_range.h create mode 100644 software/gsl-1.15/block/init.c create mode 100644 software/gsl-1.15/block/init_source.c create mode 100644 software/gsl-1.15/block/test.c create mode 100644 software/gsl-1.15/block/test_complex_io.c create mode 100644 software/gsl-1.15/block/test_complex_source.c create mode 100644 software/gsl-1.15/block/test_io.c create mode 100644 software/gsl-1.15/block/test_source.c create mode 100644 software/gsl-1.15/bspline/.deps/bspline.Plo create mode 100644 software/gsl-1.15/bspline/.deps/test.Po create mode 100644 software/gsl-1.15/bspline/ChangeLog create mode 100644 software/gsl-1.15/bspline/Makefile.am create mode 100644 software/gsl-1.15/bspline/Makefile.in create mode 100644 software/gsl-1.15/bspline/TODO create mode 100644 software/gsl-1.15/bspline/bspline.c create mode 100644 software/gsl-1.15/bspline/bspline.h create mode 100644 software/gsl-1.15/bspline/gsl_bspline.h create mode 100644 software/gsl-1.15/bspline/test.c create mode 100644 software/gsl-1.15/build.h create mode 100644 software/gsl-1.15/cblas/.deps/caxpy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ccopy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cdotc_sub.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cdotu_sub.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cgbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cgemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cgemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cgerc.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cgeru.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cher.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cher2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cher2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cherk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chpr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/chpr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/csscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/cswap.Plo create mode 100644 software/gsl-1.15/cblas/.deps/csymm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/csyr2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/csyrk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctbsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctpsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctrmm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctrmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctrsm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ctrsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dasum.Plo create mode 100644 software/gsl-1.15/cblas/.deps/daxpy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dcopy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ddot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dgbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dgemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dgemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dger.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dnrm2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/drot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/drotg.Plo create mode 100644 software/gsl-1.15/cblas/.deps/drotm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/drotmg.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsdot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dspmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dspr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dspr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dswap.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsymm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsymv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsyr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsyr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsyr2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dsyrk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtbsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtpsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtrmm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtrmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtrsm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dtrsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dzasum.Plo create mode 100644 software/gsl-1.15/cblas/.deps/dznrm2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/icamax.Plo create mode 100644 software/gsl-1.15/cblas/.deps/idamax.Plo create mode 100644 software/gsl-1.15/cblas/.deps/isamax.Plo create mode 100644 software/gsl-1.15/cblas/.deps/izamax.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sasum.Plo create mode 100644 software/gsl-1.15/cblas/.deps/saxpy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/scasum.Plo create mode 100644 software/gsl-1.15/cblas/.deps/scnrm2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/scopy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sdot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sdsdot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sgbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sgemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sgemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sger.Plo create mode 100644 software/gsl-1.15/cblas/.deps/snrm2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/srot.Plo create mode 100644 software/gsl-1.15/cblas/.deps/srotg.Plo create mode 100644 software/gsl-1.15/cblas/.deps/srotm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/srotmg.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sspmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sspr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sspr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/sswap.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssymm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssymv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssyr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssyr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssyr2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ssyrk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/stbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/stbsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/stpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/stpsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/strmm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/strmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/strsm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/strsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/test.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_amax.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_asum.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_axpy.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_copy.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_dot.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_gbmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_gemm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_gemv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_ger.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hbmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hemm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hemv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_her.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_her2.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_her2k.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_herk.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hpmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hpr.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_hpr2.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_nrm2.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_rot.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_rotg.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_rotm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_rotmg.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_sbmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_scal.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_spmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_spr.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_spr2.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_swap.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_symm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_symv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_syr.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_syr2.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_syr2k.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_syrk.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_tbmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_tbsv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_tpmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_tpsv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_trmm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_trmv.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_trsm.Po create mode 100644 software/gsl-1.15/cblas/.deps/test_trsv.Po create mode 100644 software/gsl-1.15/cblas/.deps/xerbla.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zaxpy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zcopy.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zdotc_sub.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zdotu_sub.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zdscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zgbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zgemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zgemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zgerc.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zgeru.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhemm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhemv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zher.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zher2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zher2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zherk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhpr.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zhpr2.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zscal.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zswap.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zsymm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zsyr2k.Plo create mode 100644 software/gsl-1.15/cblas/.deps/zsyrk.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztbmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztbsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztpmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztpsv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztrmm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztrmv.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztrsm.Plo create mode 100644 software/gsl-1.15/cblas/.deps/ztrsv.Plo create mode 100644 software/gsl-1.15/cblas/ChangeLog create mode 100644 software/gsl-1.15/cblas/Makefile.am create mode 100644 software/gsl-1.15/cblas/Makefile.in create mode 100644 software/gsl-1.15/cblas/TODO create mode 100644 software/gsl-1.15/cblas/caxpy.c create mode 100644 software/gsl-1.15/cblas/cblas.h create mode 100644 software/gsl-1.15/cblas/ccopy.c create mode 100644 software/gsl-1.15/cblas/cdotc_sub.c create mode 100644 software/gsl-1.15/cblas/cdotu_sub.c create mode 100644 software/gsl-1.15/cblas/cgbmv.c create mode 100644 software/gsl-1.15/cblas/cgemm.c create mode 100644 software/gsl-1.15/cblas/cgemv.c create mode 100644 software/gsl-1.15/cblas/cgerc.c create mode 100644 software/gsl-1.15/cblas/cgeru.c create mode 100644 software/gsl-1.15/cblas/chbmv.c create mode 100644 software/gsl-1.15/cblas/chemm.c create mode 100644 software/gsl-1.15/cblas/chemv.c create mode 100644 software/gsl-1.15/cblas/cher.c create mode 100644 software/gsl-1.15/cblas/cher2.c create mode 100644 software/gsl-1.15/cblas/cher2k.c create mode 100644 software/gsl-1.15/cblas/cherk.c create mode 100644 software/gsl-1.15/cblas/chpmv.c create mode 100644 software/gsl-1.15/cblas/chpr.c create mode 100644 software/gsl-1.15/cblas/chpr2.c create mode 100644 software/gsl-1.15/cblas/cscal.c create mode 100644 software/gsl-1.15/cblas/csscal.c create mode 100644 software/gsl-1.15/cblas/cswap.c create mode 100644 software/gsl-1.15/cblas/csymm.c create mode 100644 software/gsl-1.15/cblas/csyr2k.c create mode 100644 software/gsl-1.15/cblas/csyrk.c create mode 100644 software/gsl-1.15/cblas/ctbmv.c create mode 100644 software/gsl-1.15/cblas/ctbsv.c create mode 100644 software/gsl-1.15/cblas/ctpmv.c create mode 100644 software/gsl-1.15/cblas/ctpsv.c create mode 100644 software/gsl-1.15/cblas/ctrmm.c create mode 100644 software/gsl-1.15/cblas/ctrmv.c create mode 100644 software/gsl-1.15/cblas/ctrsm.c create mode 100644 software/gsl-1.15/cblas/ctrsv.c create mode 100644 software/gsl-1.15/cblas/dasum.c create mode 100644 software/gsl-1.15/cblas/daxpy.c create mode 100644 software/gsl-1.15/cblas/dcopy.c create mode 100644 software/gsl-1.15/cblas/ddot.c create mode 100644 software/gsl-1.15/cblas/dgbmv.c create mode 100644 software/gsl-1.15/cblas/dgemm.c create mode 100644 software/gsl-1.15/cblas/dgemv.c create mode 100644 software/gsl-1.15/cblas/dger.c create mode 100644 software/gsl-1.15/cblas/dnrm2.c create mode 100644 software/gsl-1.15/cblas/drot.c create mode 100644 software/gsl-1.15/cblas/drotg.c create mode 100644 software/gsl-1.15/cblas/drotm.c create mode 100644 software/gsl-1.15/cblas/drotmg.c create mode 100644 software/gsl-1.15/cblas/dsbmv.c create mode 100644 software/gsl-1.15/cblas/dscal.c create mode 100644 software/gsl-1.15/cblas/dsdot.c create mode 100644 software/gsl-1.15/cblas/dspmv.c create mode 100644 software/gsl-1.15/cblas/dspr.c create mode 100644 software/gsl-1.15/cblas/dspr2.c create mode 100644 software/gsl-1.15/cblas/dswap.c create mode 100644 software/gsl-1.15/cblas/dsymm.c create mode 100644 software/gsl-1.15/cblas/dsymv.c create mode 100644 software/gsl-1.15/cblas/dsyr.c create mode 100644 software/gsl-1.15/cblas/dsyr2.c create mode 100644 software/gsl-1.15/cblas/dsyr2k.c create mode 100644 software/gsl-1.15/cblas/dsyrk.c create mode 100644 software/gsl-1.15/cblas/dtbmv.c create mode 100644 software/gsl-1.15/cblas/dtbsv.c create mode 100644 software/gsl-1.15/cblas/dtpmv.c create mode 100644 software/gsl-1.15/cblas/dtpsv.c create mode 100644 software/gsl-1.15/cblas/dtrmm.c create mode 100644 software/gsl-1.15/cblas/dtrmv.c create mode 100644 software/gsl-1.15/cblas/dtrsm.c create mode 100644 software/gsl-1.15/cblas/dtrsv.c create mode 100644 software/gsl-1.15/cblas/dzasum.c create mode 100644 software/gsl-1.15/cblas/dznrm2.c create mode 100644 software/gsl-1.15/cblas/error_cblas.h create mode 100644 software/gsl-1.15/cblas/error_cblas_l2.h create mode 100644 software/gsl-1.15/cblas/error_cblas_l3.h create mode 100644 software/gsl-1.15/cblas/gsl_cblas.h create mode 100644 software/gsl-1.15/cblas/hypot.c create mode 100644 software/gsl-1.15/cblas/icamax.c create mode 100644 software/gsl-1.15/cblas/idamax.c create mode 100644 software/gsl-1.15/cblas/isamax.c create mode 100644 software/gsl-1.15/cblas/izamax.c create mode 100644 software/gsl-1.15/cblas/sasum.c create mode 100644 software/gsl-1.15/cblas/saxpy.c create mode 100644 software/gsl-1.15/cblas/scasum.c create mode 100644 software/gsl-1.15/cblas/scnrm2.c create mode 100644 software/gsl-1.15/cblas/scopy.c create mode 100644 software/gsl-1.15/cblas/sdot.c create mode 100644 software/gsl-1.15/cblas/sdsdot.c create mode 100644 software/gsl-1.15/cblas/sgbmv.c create mode 100644 software/gsl-1.15/cblas/sgemm.c create mode 100644 software/gsl-1.15/cblas/sgemv.c create mode 100644 software/gsl-1.15/cblas/sger.c create mode 100644 software/gsl-1.15/cblas/snrm2.c create mode 100644 software/gsl-1.15/cblas/source_asum_c.h create mode 100644 software/gsl-1.15/cblas/source_asum_r.h create mode 100644 software/gsl-1.15/cblas/source_axpy_c.h create mode 100644 software/gsl-1.15/cblas/source_axpy_r.h create mode 100644 software/gsl-1.15/cblas/source_copy_c.h create mode 100644 software/gsl-1.15/cblas/source_copy_r.h create mode 100644 software/gsl-1.15/cblas/source_dot_c.h create mode 100644 software/gsl-1.15/cblas/source_dot_r.h create mode 100644 software/gsl-1.15/cblas/source_gbmv_c.h create mode 100644 software/gsl-1.15/cblas/source_gbmv_r.h create mode 100644 software/gsl-1.15/cblas/source_gemm_c.h create mode 100644 software/gsl-1.15/cblas/source_gemm_r.h create mode 100644 software/gsl-1.15/cblas/source_gemv_c.h create mode 100644 software/gsl-1.15/cblas/source_gemv_r.h create mode 100644 software/gsl-1.15/cblas/source_ger.h create mode 100644 software/gsl-1.15/cblas/source_gerc.h create mode 100644 software/gsl-1.15/cblas/source_geru.h create mode 100644 software/gsl-1.15/cblas/source_hbmv.h create mode 100644 software/gsl-1.15/cblas/source_hemm.h create mode 100644 software/gsl-1.15/cblas/source_hemv.h create mode 100644 software/gsl-1.15/cblas/source_her.h create mode 100644 software/gsl-1.15/cblas/source_her2.h create mode 100644 software/gsl-1.15/cblas/source_her2k.h create mode 100644 software/gsl-1.15/cblas/source_herk.h create mode 100644 software/gsl-1.15/cblas/source_hpmv.h create mode 100644 software/gsl-1.15/cblas/source_hpr.h create mode 100644 software/gsl-1.15/cblas/source_hpr2.h create mode 100644 software/gsl-1.15/cblas/source_iamax_c.h create mode 100644 software/gsl-1.15/cblas/source_iamax_r.h create mode 100644 software/gsl-1.15/cblas/source_nrm2_c.h create mode 100644 software/gsl-1.15/cblas/source_nrm2_r.h create mode 100644 software/gsl-1.15/cblas/source_rot.h create mode 100644 software/gsl-1.15/cblas/source_rotg.h create mode 100644 software/gsl-1.15/cblas/source_rotm.h create mode 100644 software/gsl-1.15/cblas/source_rotmg.h create mode 100644 software/gsl-1.15/cblas/source_sbmv.h create mode 100644 software/gsl-1.15/cblas/source_scal_c.h create mode 100644 software/gsl-1.15/cblas/source_scal_c_s.h create mode 100644 software/gsl-1.15/cblas/source_scal_r.h create mode 100644 software/gsl-1.15/cblas/source_spmv.h create mode 100644 software/gsl-1.15/cblas/source_spr.h create mode 100644 software/gsl-1.15/cblas/source_spr2.h create mode 100644 software/gsl-1.15/cblas/source_swap_c.h create mode 100644 software/gsl-1.15/cblas/source_swap_r.h create mode 100644 software/gsl-1.15/cblas/source_symm_c.h create mode 100644 software/gsl-1.15/cblas/source_symm_r.h create mode 100644 software/gsl-1.15/cblas/source_symv.h create mode 100644 software/gsl-1.15/cblas/source_syr.h create mode 100644 software/gsl-1.15/cblas/source_syr2.h create mode 100644 software/gsl-1.15/cblas/source_syr2k_c.h create mode 100644 software/gsl-1.15/cblas/source_syr2k_r.h create mode 100644 software/gsl-1.15/cblas/source_syrk_c.h create mode 100644 software/gsl-1.15/cblas/source_syrk_r.h create mode 100644 software/gsl-1.15/cblas/source_tbmv_c.h create mode 100644 software/gsl-1.15/cblas/source_tbmv_r.h create mode 100644 software/gsl-1.15/cblas/source_tbsv_c.h create mode 100644 software/gsl-1.15/cblas/source_tbsv_r.h create mode 100644 software/gsl-1.15/cblas/source_tpmv_c.h create mode 100644 software/gsl-1.15/cblas/source_tpmv_r.h create mode 100644 software/gsl-1.15/cblas/source_tpsv_c.h create mode 100644 software/gsl-1.15/cblas/source_tpsv_r.h create mode 100644 software/gsl-1.15/cblas/source_trmm_c.h create mode 100644 software/gsl-1.15/cblas/source_trmm_r.h create mode 100644 software/gsl-1.15/cblas/source_trmv_c.h create mode 100644 software/gsl-1.15/cblas/source_trmv_r.h create mode 100644 software/gsl-1.15/cblas/source_trsm_c.h create mode 100644 software/gsl-1.15/cblas/source_trsm_r.h create mode 100644 software/gsl-1.15/cblas/source_trsv_c.h create mode 100644 software/gsl-1.15/cblas/source_trsv_r.h create mode 100644 software/gsl-1.15/cblas/srot.c create mode 100644 software/gsl-1.15/cblas/srotg.c create mode 100644 software/gsl-1.15/cblas/srotm.c create mode 100644 software/gsl-1.15/cblas/srotmg.c create mode 100644 software/gsl-1.15/cblas/ssbmv.c create mode 100644 software/gsl-1.15/cblas/sscal.c create mode 100644 software/gsl-1.15/cblas/sspmv.c create mode 100644 software/gsl-1.15/cblas/sspr.c create mode 100644 software/gsl-1.15/cblas/sspr2.c create mode 100644 software/gsl-1.15/cblas/sswap.c create mode 100644 software/gsl-1.15/cblas/ssymm.c create mode 100644 software/gsl-1.15/cblas/ssymv.c create mode 100644 software/gsl-1.15/cblas/ssyr.c create mode 100644 software/gsl-1.15/cblas/ssyr2.c create mode 100644 software/gsl-1.15/cblas/ssyr2k.c create mode 100644 software/gsl-1.15/cblas/ssyrk.c create mode 100644 software/gsl-1.15/cblas/stbmv.c create mode 100644 software/gsl-1.15/cblas/stbsv.c create mode 100644 software/gsl-1.15/cblas/stpmv.c create mode 100644 software/gsl-1.15/cblas/stpsv.c create mode 100644 software/gsl-1.15/cblas/strmm.c create mode 100644 software/gsl-1.15/cblas/strmv.c create mode 100644 software/gsl-1.15/cblas/strsm.c create mode 100644 software/gsl-1.15/cblas/strsv.c create mode 100644 software/gsl-1.15/cblas/test.c create mode 100644 software/gsl-1.15/cblas/test_amax.c create mode 100644 software/gsl-1.15/cblas/test_asum.c create mode 100644 software/gsl-1.15/cblas/test_axpy.c create mode 100644 software/gsl-1.15/cblas/test_copy.c create mode 100644 software/gsl-1.15/cblas/test_dot.c create mode 100644 software/gsl-1.15/cblas/test_gbmv.c create mode 100644 software/gsl-1.15/cblas/test_gemm.c create mode 100644 software/gsl-1.15/cblas/test_gemv.c create mode 100644 software/gsl-1.15/cblas/test_ger.c create mode 100644 software/gsl-1.15/cblas/test_hbmv.c create mode 100644 software/gsl-1.15/cblas/test_hemm.c create mode 100644 software/gsl-1.15/cblas/test_hemv.c create mode 100644 software/gsl-1.15/cblas/test_her.c create mode 100644 software/gsl-1.15/cblas/test_her2.c create mode 100644 software/gsl-1.15/cblas/test_her2k.c create mode 100644 software/gsl-1.15/cblas/test_herk.c create mode 100644 software/gsl-1.15/cblas/test_hpmv.c create mode 100644 software/gsl-1.15/cblas/test_hpr.c create mode 100644 software/gsl-1.15/cblas/test_hpr2.c create mode 100644 software/gsl-1.15/cblas/test_nrm2.c create mode 100644 software/gsl-1.15/cblas/test_rot.c create mode 100644 software/gsl-1.15/cblas/test_rotg.c create mode 100644 software/gsl-1.15/cblas/test_rotm.c create mode 100644 software/gsl-1.15/cblas/test_rotmg.c create mode 100644 software/gsl-1.15/cblas/test_sbmv.c create mode 100644 software/gsl-1.15/cblas/test_scal.c create mode 100644 software/gsl-1.15/cblas/test_spmv.c create mode 100644 software/gsl-1.15/cblas/test_spr.c create mode 100644 software/gsl-1.15/cblas/test_spr2.c create mode 100644 software/gsl-1.15/cblas/test_swap.c create mode 100644 software/gsl-1.15/cblas/test_symm.c create mode 100644 software/gsl-1.15/cblas/test_symv.c create mode 100644 software/gsl-1.15/cblas/test_syr.c create mode 100644 software/gsl-1.15/cblas/test_syr2.c create mode 100644 software/gsl-1.15/cblas/test_syr2k.c create mode 100644 software/gsl-1.15/cblas/test_syrk.c create mode 100644 software/gsl-1.15/cblas/test_tbmv.c create mode 100644 software/gsl-1.15/cblas/test_tbsv.c create mode 100644 software/gsl-1.15/cblas/test_tpmv.c create mode 100644 software/gsl-1.15/cblas/test_tpsv.c create mode 100644 software/gsl-1.15/cblas/test_trmm.c create mode 100644 software/gsl-1.15/cblas/test_trmv.c create mode 100644 software/gsl-1.15/cblas/test_trsm.c create mode 100644 software/gsl-1.15/cblas/test_trsv.c create mode 100644 software/gsl-1.15/cblas/tests.c create mode 100644 software/gsl-1.15/cblas/tests.h create mode 100644 software/gsl-1.15/cblas/xerbla.c create mode 100644 software/gsl-1.15/cblas/zaxpy.c create mode 100644 software/gsl-1.15/cblas/zcopy.c create mode 100644 software/gsl-1.15/cblas/zdotc_sub.c create mode 100644 software/gsl-1.15/cblas/zdotu_sub.c create mode 100644 software/gsl-1.15/cblas/zdscal.c create mode 100644 software/gsl-1.15/cblas/zgbmv.c create mode 100644 software/gsl-1.15/cblas/zgemm.c create mode 100644 software/gsl-1.15/cblas/zgemv.c create mode 100644 software/gsl-1.15/cblas/zgerc.c create mode 100644 software/gsl-1.15/cblas/zgeru.c create mode 100644 software/gsl-1.15/cblas/zhbmv.c create mode 100644 software/gsl-1.15/cblas/zhemm.c create mode 100644 software/gsl-1.15/cblas/zhemv.c create mode 100644 software/gsl-1.15/cblas/zher.c create mode 100644 software/gsl-1.15/cblas/zher2.c create mode 100644 software/gsl-1.15/cblas/zher2k.c create mode 100644 software/gsl-1.15/cblas/zherk.c create mode 100644 software/gsl-1.15/cblas/zhpmv.c create mode 100644 software/gsl-1.15/cblas/zhpr.c create mode 100644 software/gsl-1.15/cblas/zhpr2.c create mode 100644 software/gsl-1.15/cblas/zscal.c create mode 100644 software/gsl-1.15/cblas/zswap.c create mode 100644 software/gsl-1.15/cblas/zsymm.c create mode 100644 software/gsl-1.15/cblas/zsyr2k.c create mode 100644 software/gsl-1.15/cblas/zsyrk.c create mode 100644 software/gsl-1.15/cblas/ztbmv.c create mode 100644 software/gsl-1.15/cblas/ztbsv.c create mode 100644 software/gsl-1.15/cblas/ztpmv.c create mode 100644 software/gsl-1.15/cblas/ztpsv.c create mode 100644 software/gsl-1.15/cblas/ztrmm.c create mode 100644 software/gsl-1.15/cblas/ztrmv.c create mode 100644 software/gsl-1.15/cblas/ztrsm.c create mode 100644 software/gsl-1.15/cblas/ztrsv.c create mode 100644 software/gsl-1.15/cdf/.deps/beta.Plo create mode 100644 software/gsl-1.15/cdf/.deps/betainv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/binomial.Plo create mode 100644 software/gsl-1.15/cdf/.deps/cauchy.Plo create mode 100644 software/gsl-1.15/cdf/.deps/cauchyinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/chisq.Plo create mode 100644 software/gsl-1.15/cdf/.deps/chisqinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/exponential.Plo create mode 100644 software/gsl-1.15/cdf/.deps/exponentialinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/exppow.Plo create mode 100644 software/gsl-1.15/cdf/.deps/fdist.Plo create mode 100644 software/gsl-1.15/cdf/.deps/fdistinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/flat.Plo create mode 100644 software/gsl-1.15/cdf/.deps/flatinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gamma.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gammainv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gauss.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gaussinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/geometric.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gumbel1.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gumbel1inv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gumbel2.Plo create mode 100644 software/gsl-1.15/cdf/.deps/gumbel2inv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/hypergeometric.Plo create mode 100644 software/gsl-1.15/cdf/.deps/laplace.Plo create mode 100644 software/gsl-1.15/cdf/.deps/laplaceinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/logistic.Plo create mode 100644 software/gsl-1.15/cdf/.deps/logisticinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/lognormal.Plo create mode 100644 software/gsl-1.15/cdf/.deps/lognormalinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/nbinomial.Plo create mode 100644 software/gsl-1.15/cdf/.deps/pareto.Plo create mode 100644 software/gsl-1.15/cdf/.deps/paretoinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/pascal.Plo create mode 100644 software/gsl-1.15/cdf/.deps/poisson.Plo create mode 100644 software/gsl-1.15/cdf/.deps/rayleigh.Plo create mode 100644 software/gsl-1.15/cdf/.deps/rayleighinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/tdist.Plo create mode 100644 software/gsl-1.15/cdf/.deps/tdistinv.Plo create mode 100644 software/gsl-1.15/cdf/.deps/test.Po create mode 100644 software/gsl-1.15/cdf/.deps/weibull.Plo create mode 100644 software/gsl-1.15/cdf/.deps/weibullinv.Plo create mode 100644 software/gsl-1.15/cdf/ChangeLog create mode 100644 software/gsl-1.15/cdf/Makefile.am create mode 100644 software/gsl-1.15/cdf/Makefile.in create mode 100644 software/gsl-1.15/cdf/TODO create mode 100644 software/gsl-1.15/cdf/beta.c create mode 100644 software/gsl-1.15/cdf/beta_inc.c create mode 100644 software/gsl-1.15/cdf/betainv.c create mode 100644 software/gsl-1.15/cdf/binomial.c create mode 100644 software/gsl-1.15/cdf/cauchy.c create mode 100644 software/gsl-1.15/cdf/cauchyinv.c create mode 100644 software/gsl-1.15/cdf/chisq.c create mode 100644 software/gsl-1.15/cdf/chisqinv.c create mode 100644 software/gsl-1.15/cdf/error.h create mode 100644 software/gsl-1.15/cdf/exponential.c create mode 100644 software/gsl-1.15/cdf/exponentialinv.c create mode 100644 software/gsl-1.15/cdf/exppow.c create mode 100644 software/gsl-1.15/cdf/fdist.c create mode 100644 software/gsl-1.15/cdf/fdistinv.c create mode 100644 software/gsl-1.15/cdf/flat.c create mode 100644 software/gsl-1.15/cdf/flatinv.c create mode 100644 software/gsl-1.15/cdf/gamma.c create mode 100644 software/gsl-1.15/cdf/gammainv.c create mode 100644 software/gsl-1.15/cdf/gauss.c create mode 100644 software/gsl-1.15/cdf/gaussinv.c create mode 100644 software/gsl-1.15/cdf/geometric.c create mode 100644 software/gsl-1.15/cdf/gsl_cdf.h create mode 100644 software/gsl-1.15/cdf/gumbel1.c create mode 100644 software/gsl-1.15/cdf/gumbel1inv.c create mode 100644 software/gsl-1.15/cdf/gumbel2.c create mode 100644 software/gsl-1.15/cdf/gumbel2inv.c create mode 100644 software/gsl-1.15/cdf/hypergeometric.c create mode 100644 software/gsl-1.15/cdf/laplace.c create mode 100644 software/gsl-1.15/cdf/laplaceinv.c create mode 100644 software/gsl-1.15/cdf/logistic.c create mode 100644 software/gsl-1.15/cdf/logisticinv.c create mode 100644 software/gsl-1.15/cdf/lognormal.c create mode 100644 software/gsl-1.15/cdf/lognormalinv.c create mode 100644 software/gsl-1.15/cdf/nbinomial.c create mode 100644 software/gsl-1.15/cdf/pareto.c create mode 100644 software/gsl-1.15/cdf/paretoinv.c create mode 100644 software/gsl-1.15/cdf/pascal.c create mode 100644 software/gsl-1.15/cdf/poisson.c create mode 100644 software/gsl-1.15/cdf/rat_eval.h create mode 100644 software/gsl-1.15/cdf/rayleigh.c create mode 100644 software/gsl-1.15/cdf/rayleighinv.c create mode 100644 software/gsl-1.15/cdf/tdist.c create mode 100644 software/gsl-1.15/cdf/tdistinv.c create mode 100644 software/gsl-1.15/cdf/test.c create mode 100644 software/gsl-1.15/cdf/test_auto.c create mode 100644 software/gsl-1.15/cdf/weibull.c create mode 100644 software/gsl-1.15/cdf/weibullinv.c create mode 100644 software/gsl-1.15/cheb/.deps/deriv.Plo create mode 100644 software/gsl-1.15/cheb/.deps/eval.Plo create mode 100644 software/gsl-1.15/cheb/.deps/init.Plo create mode 100644 software/gsl-1.15/cheb/.deps/integ.Plo create mode 100644 software/gsl-1.15/cheb/.deps/test.Po create mode 100644 software/gsl-1.15/cheb/ChangeLog create mode 100644 software/gsl-1.15/cheb/Makefile.am create mode 100644 software/gsl-1.15/cheb/Makefile.in create mode 100644 software/gsl-1.15/cheb/TODO create mode 100644 software/gsl-1.15/cheb/deriv.c create mode 100644 software/gsl-1.15/cheb/eval.c create mode 100644 software/gsl-1.15/cheb/gsl_chebyshev.h create mode 100644 software/gsl-1.15/cheb/init.c create mode 100644 software/gsl-1.15/cheb/integ.c create mode 100644 software/gsl-1.15/cheb/test.c create mode 100644 software/gsl-1.15/combination/.deps/combination.Plo create mode 100644 software/gsl-1.15/combination/.deps/file.Plo create mode 100644 software/gsl-1.15/combination/.deps/init.Plo create mode 100644 software/gsl-1.15/combination/.deps/inline.Plo create mode 100644 software/gsl-1.15/combination/.deps/test.Po create mode 100644 software/gsl-1.15/combination/ChangeLog create mode 100644 software/gsl-1.15/combination/Makefile.am create mode 100644 software/gsl-1.15/combination/Makefile.in create mode 100644 software/gsl-1.15/combination/TODO create mode 100644 software/gsl-1.15/combination/combination.c create mode 100644 software/gsl-1.15/combination/file.c create mode 100644 software/gsl-1.15/combination/gsl_combination.h create mode 100644 software/gsl-1.15/combination/init.c create mode 100644 software/gsl-1.15/combination/inline.c create mode 100644 software/gsl-1.15/combination/test.c create mode 100644 software/gsl-1.15/complex/.deps/inline.Plo create mode 100644 software/gsl-1.15/complex/.deps/math.Plo create mode 100644 software/gsl-1.15/complex/.deps/test.Po create mode 100644 software/gsl-1.15/complex/ChangeLog create mode 100644 software/gsl-1.15/complex/Makefile.am create mode 100644 software/gsl-1.15/complex/Makefile.in create mode 100644 software/gsl-1.15/complex/TODO create mode 100644 software/gsl-1.15/complex/gsl_complex.h create mode 100644 software/gsl-1.15/complex/gsl_complex_math.h create mode 100644 software/gsl-1.15/complex/inline.c create mode 100644 software/gsl-1.15/complex/math.c create mode 100644 software/gsl-1.15/complex/results.h create mode 100644 software/gsl-1.15/complex/results1.h create mode 100644 software/gsl-1.15/complex/results2.h create mode 100644 software/gsl-1.15/complex/results_real.h create mode 100644 software/gsl-1.15/complex/results_zreal.h create mode 100644 software/gsl-1.15/complex/test.c create mode 100755 software/gsl-1.15/config.guess create mode 100644 software/gsl-1.15/config.h create mode 100644 software/gsl-1.15/config.h.in create mode 100644 software/gsl-1.15/config.log create mode 100755 software/gsl-1.15/config.status create mode 100755 software/gsl-1.15/config.sub create mode 100755 software/gsl-1.15/configure create mode 100644 software/gsl-1.15/configure.ac create mode 100644 software/gsl-1.15/const/.deps/test.Po create mode 100644 software/gsl-1.15/const/ChangeLog create mode 100644 software/gsl-1.15/const/Makefile.am create mode 100644 software/gsl-1.15/const/Makefile.in create mode 100644 software/gsl-1.15/const/TODO create mode 100644 software/gsl-1.15/const/gsl_const.h create mode 100644 software/gsl-1.15/const/gsl_const_cgs.h create mode 100644 software/gsl-1.15/const/gsl_const_cgsm.h create mode 100644 software/gsl-1.15/const/gsl_const_mks.h create mode 100644 software/gsl-1.15/const/gsl_const_mksa.h create mode 100644 software/gsl-1.15/const/gsl_const_num.h create mode 100644 software/gsl-1.15/const/test.c create mode 100755 software/gsl-1.15/depcomp create mode 100644 software/gsl-1.15/deriv/.deps/deriv.Plo create mode 100644 software/gsl-1.15/deriv/.deps/test.Po create mode 100644 software/gsl-1.15/deriv/ChangeLog create mode 100644 software/gsl-1.15/deriv/Makefile.am create mode 100644 software/gsl-1.15/deriv/Makefile.in create mode 100644 software/gsl-1.15/deriv/deriv.c create mode 100644 software/gsl-1.15/deriv/gsl_deriv.h create mode 100644 software/gsl-1.15/deriv/test.c create mode 100644 software/gsl-1.15/dht/.deps/dht.Plo create mode 100644 software/gsl-1.15/dht/.deps/test.Po create mode 100644 software/gsl-1.15/dht/ChangeLog create mode 100644 software/gsl-1.15/dht/Makefile.am create mode 100644 software/gsl-1.15/dht/Makefile.in create mode 100644 software/gsl-1.15/dht/dht.c create mode 100644 software/gsl-1.15/dht/gsl_dht.h create mode 100644 software/gsl-1.15/dht/test.c create mode 100644 software/gsl-1.15/diff/.deps/diff.Plo create mode 100644 software/gsl-1.15/diff/.deps/test.Po create mode 100644 software/gsl-1.15/diff/ChangeLog create mode 100644 software/gsl-1.15/diff/Makefile.am create mode 100644 software/gsl-1.15/diff/Makefile.in create mode 100644 software/gsl-1.15/diff/diff.c create mode 100644 software/gsl-1.15/diff/gsl_diff.h create mode 100644 software/gsl-1.15/diff/test.c create mode 100644 software/gsl-1.15/doc/12-cities.eps create mode 100644 software/gsl-1.15/doc/ChangeLog create mode 100644 software/gsl-1.15/doc/Makefile.am create mode 100644 software/gsl-1.15/doc/Makefile.in create mode 100644 software/gsl-1.15/doc/algorithm.sty create mode 100644 software/gsl-1.15/doc/algorithmic.sty create mode 100644 software/gsl-1.15/doc/autoconf.texi create mode 100644 software/gsl-1.15/doc/blas.texi create mode 100644 software/gsl-1.15/doc/bspline.eps create mode 100644 software/gsl-1.15/doc/bspline.texi create mode 100644 software/gsl-1.15/doc/calc.sty create mode 100644 software/gsl-1.15/doc/cblas.texi create mode 100644 software/gsl-1.15/doc/cheb.eps create mode 100644 software/gsl-1.15/doc/cheb.texi create mode 100644 software/gsl-1.15/doc/combination.texi create mode 100644 software/gsl-1.15/doc/complex.texi create mode 100644 software/gsl-1.15/doc/const.texi create mode 100644 software/gsl-1.15/doc/debug.texi create mode 100644 software/gsl-1.15/doc/dht.texi create mode 100644 software/gsl-1.15/doc/diff.texi create mode 100644 software/gsl-1.15/doc/dwt-orig.eps create mode 100644 software/gsl-1.15/doc/dwt-samp.eps create mode 100644 software/gsl-1.15/doc/dwt.texi create mode 100644 software/gsl-1.15/doc/eigen.texi create mode 100644 software/gsl-1.15/doc/err.texi create mode 100644 software/gsl-1.15/doc/examples/blas.c create mode 100644 software/gsl-1.15/doc/examples/blas.out create mode 100644 software/gsl-1.15/doc/examples/block.c create mode 100644 software/gsl-1.15/doc/examples/block.out create mode 100644 software/gsl-1.15/doc/examples/bspline.c create mode 100644 software/gsl-1.15/doc/examples/cblas.c create mode 100644 software/gsl-1.15/doc/examples/cblas.out create mode 100644 software/gsl-1.15/doc/examples/cdf.c create mode 100644 software/gsl-1.15/doc/examples/cdf.out create mode 100644 software/gsl-1.15/doc/examples/cheb.c create mode 100644 software/gsl-1.15/doc/examples/combination.c create mode 100644 software/gsl-1.15/doc/examples/combination.out create mode 100644 software/gsl-1.15/doc/examples/const.c create mode 100644 software/gsl-1.15/doc/examples/const.out create mode 100644 software/gsl-1.15/doc/examples/demo_fn.c create mode 100644 software/gsl-1.15/doc/examples/demo_fn.h create mode 100644 software/gsl-1.15/doc/examples/diff.c create mode 100644 software/gsl-1.15/doc/examples/diff.out create mode 100644 software/gsl-1.15/doc/examples/dwt.c create mode 100644 software/gsl-1.15/doc/examples/dwt.dat create mode 100644 software/gsl-1.15/doc/examples/ecg.dat create mode 100644 software/gsl-1.15/doc/examples/eigen.c create mode 100644 software/gsl-1.15/doc/examples/eigen_nonsymm.c create mode 100644 software/gsl-1.15/doc/examples/expfit.c create mode 100644 software/gsl-1.15/doc/examples/fft.c create mode 100644 software/gsl-1.15/doc/examples/fftmr.c create mode 100644 software/gsl-1.15/doc/examples/fftreal.c create mode 100644 software/gsl-1.15/doc/examples/fitting.c create mode 100644 software/gsl-1.15/doc/examples/fitting2.c create mode 100644 software/gsl-1.15/doc/examples/fitting3.c create mode 100644 software/gsl-1.15/doc/examples/histogram.c create mode 100644 software/gsl-1.15/doc/examples/histogram2d.c create mode 100644 software/gsl-1.15/doc/examples/ieee.c create mode 100644 software/gsl-1.15/doc/examples/ieeeround.c create mode 100644 software/gsl-1.15/doc/examples/integration.c create mode 100644 software/gsl-1.15/doc/examples/integration.out create mode 100644 software/gsl-1.15/doc/examples/interp.c create mode 100644 software/gsl-1.15/doc/examples/interpp.c create mode 100644 software/gsl-1.15/doc/examples/intro.c create mode 100644 software/gsl-1.15/doc/examples/intro.out create mode 100644 software/gsl-1.15/doc/examples/linalglu.c create mode 100644 software/gsl-1.15/doc/examples/linalglu.out create mode 100644 software/gsl-1.15/doc/examples/matrix.c create mode 100644 software/gsl-1.15/doc/examples/matrixw.c create mode 100644 software/gsl-1.15/doc/examples/min.c create mode 100644 software/gsl-1.15/doc/examples/min.out create mode 100644 software/gsl-1.15/doc/examples/monte.c create mode 100644 software/gsl-1.15/doc/examples/multimin.c create mode 100644 software/gsl-1.15/doc/examples/multimin.out create mode 100644 software/gsl-1.15/doc/examples/multiminfn.c create mode 100644 software/gsl-1.15/doc/examples/multiset.c create mode 100644 software/gsl-1.15/doc/examples/multiset.out create mode 100644 software/gsl-1.15/doc/examples/nlfit.c create mode 100644 software/gsl-1.15/doc/examples/nmsimplex.c create mode 100644 software/gsl-1.15/doc/examples/nmsimplex.out create mode 100644 software/gsl-1.15/doc/examples/ntupler.c create mode 100644 software/gsl-1.15/doc/examples/ntuplew.c create mode 100644 software/gsl-1.15/doc/examples/ode-initval-low-level.c create mode 100644 software/gsl-1.15/doc/examples/ode-initval.c create mode 100644 software/gsl-1.15/doc/examples/odefixed.c create mode 100644 software/gsl-1.15/doc/examples/permseq.c create mode 100644 software/gsl-1.15/doc/examples/permshuffle.c create mode 100644 software/gsl-1.15/doc/examples/polyroots.c create mode 100644 software/gsl-1.15/doc/examples/polyroots.out create mode 100644 software/gsl-1.15/doc/examples/qrng.c create mode 100644 software/gsl-1.15/doc/examples/randpoisson.2.out create mode 100644 software/gsl-1.15/doc/examples/randpoisson.c create mode 100644 software/gsl-1.15/doc/examples/randpoisson.out create mode 100644 software/gsl-1.15/doc/examples/randwalk.c create mode 100644 software/gsl-1.15/doc/examples/rng.c create mode 100644 software/gsl-1.15/doc/examples/rng.out create mode 100644 software/gsl-1.15/doc/examples/rngunif.2.out create mode 100644 software/gsl-1.15/doc/examples/rngunif.c create mode 100644 software/gsl-1.15/doc/examples/rngunif.out create mode 100644 software/gsl-1.15/doc/examples/rootnewt.c create mode 100644 software/gsl-1.15/doc/examples/roots.c create mode 100644 software/gsl-1.15/doc/examples/siman.c create mode 100644 software/gsl-1.15/doc/examples/sortsmall.c create mode 100644 software/gsl-1.15/doc/examples/sortsmall.out create mode 100644 software/gsl-1.15/doc/examples/specfun.c create mode 100644 software/gsl-1.15/doc/examples/specfun.out create mode 100644 software/gsl-1.15/doc/examples/specfun_e.c create mode 100644 software/gsl-1.15/doc/examples/specfun_e.out create mode 100644 software/gsl-1.15/doc/examples/stat.c create mode 100644 software/gsl-1.15/doc/examples/stat.out create mode 100644 software/gsl-1.15/doc/examples/statsort.c create mode 100644 software/gsl-1.15/doc/examples/statsort.out create mode 100644 software/gsl-1.15/doc/examples/sum.c create mode 100644 software/gsl-1.15/doc/examples/sum.out create mode 100644 software/gsl-1.15/doc/examples/vector.c create mode 100644 software/gsl-1.15/doc/examples/vectorr.c create mode 100644 software/gsl-1.15/doc/examples/vectorview.c create mode 100644 software/gsl-1.15/doc/examples/vectorview.out create mode 100644 software/gsl-1.15/doc/examples/vectorw.c create mode 100644 software/gsl-1.15/doc/fdl.texi create mode 100644 software/gsl-1.15/doc/fft-complex-radix2-f.eps create mode 100644 software/gsl-1.15/doc/fft-complex-radix2-t.eps create mode 100644 software/gsl-1.15/doc/fft-complex-radix2.eps create mode 100644 software/gsl-1.15/doc/fft-real-mixedradix.eps create mode 100644 software/gsl-1.15/doc/fft.texi create mode 100644 software/gsl-1.15/doc/fftalgorithms.bib create mode 100644 software/gsl-1.15/doc/fftalgorithms.tex create mode 100644 software/gsl-1.15/doc/final-route.eps create mode 100644 software/gsl-1.15/doc/fit-exp.eps create mode 100644 software/gsl-1.15/doc/fit-wlinear.eps create mode 100644 software/gsl-1.15/doc/fit-wlinear2.eps create mode 100644 software/gsl-1.15/doc/fitting.texi create mode 100644 software/gsl-1.15/doc/freemanuals.texi create mode 100644 software/gsl-1.15/doc/gpl.texi create mode 100644 software/gsl-1.15/doc/gsl-config.1 create mode 100644 software/gsl-1.15/doc/gsl-design.texi create mode 100644 software/gsl-1.15/doc/gsl-histogram.1 create mode 100644 software/gsl-1.15/doc/gsl-randist.1 create mode 100644 software/gsl-1.15/doc/gsl-ref.info create mode 100644 software/gsl-1.15/doc/gsl-ref.info-1 create mode 100644 software/gsl-1.15/doc/gsl-ref.info-2 create mode 100644 software/gsl-1.15/doc/gsl-ref.info-3 create mode 100644 software/gsl-1.15/doc/gsl-ref.info-4 create mode 100644 software/gsl-1.15/doc/gsl-ref.info-5 create mode 100644 software/gsl-1.15/doc/gsl-ref.info-6 create mode 100644 software/gsl-1.15/doc/gsl-ref.texi create mode 100644 software/gsl-1.15/doc/gsl.3 create mode 100644 software/gsl-1.15/doc/histogram.eps create mode 100644 software/gsl-1.15/doc/histogram.texi create mode 100644 software/gsl-1.15/doc/histogram2d.eps create mode 100644 software/gsl-1.15/doc/ieee754.texi create mode 100644 software/gsl-1.15/doc/initial-route.eps create mode 100644 software/gsl-1.15/doc/integration.texi create mode 100644 software/gsl-1.15/doc/interp.texi create mode 100644 software/gsl-1.15/doc/interp2.eps create mode 100644 software/gsl-1.15/doc/interpp2.eps create mode 100644 software/gsl-1.15/doc/intro.texi create mode 100644 software/gsl-1.15/doc/landau.dat create mode 100644 software/gsl-1.15/doc/linalg.texi create mode 100644 software/gsl-1.15/doc/math.texi create mode 100755 software/gsl-1.15/doc/mdate-sh create mode 100644 software/gsl-1.15/doc/min-interval.eps create mode 100644 software/gsl-1.15/doc/min.texi create mode 100644 software/gsl-1.15/doc/montecarlo.texi create mode 100644 software/gsl-1.15/doc/multifit.texi create mode 100644 software/gsl-1.15/doc/multimin.eps create mode 100644 software/gsl-1.15/doc/multimin.texi create mode 100644 software/gsl-1.15/doc/multiroots.texi create mode 100644 software/gsl-1.15/doc/multiset.texi create mode 100644 software/gsl-1.15/doc/ntuple.eps create mode 100644 software/gsl-1.15/doc/ntuple.texi create mode 100644 software/gsl-1.15/doc/ode-initval.texi create mode 100644 software/gsl-1.15/doc/permutation.texi create mode 100644 software/gsl-1.15/doc/poly.texi create mode 100644 software/gsl-1.15/doc/qrng.eps create mode 100644 software/gsl-1.15/doc/qrng.texi create mode 100644 software/gsl-1.15/doc/rand-bernoulli.tex create mode 100644 software/gsl-1.15/doc/rand-beta.tex create mode 100644 software/gsl-1.15/doc/rand-binomial.tex create mode 100644 software/gsl-1.15/doc/rand-bivariate-gaussian.tex create mode 100644 software/gsl-1.15/doc/rand-cauchy.tex create mode 100644 software/gsl-1.15/doc/rand-chisq.tex create mode 100644 software/gsl-1.15/doc/rand-erlang.tex create mode 100644 software/gsl-1.15/doc/rand-exponential.tex create mode 100644 software/gsl-1.15/doc/rand-exppow.tex create mode 100644 software/gsl-1.15/doc/rand-fdist.tex create mode 100644 software/gsl-1.15/doc/rand-flat.tex create mode 100644 software/gsl-1.15/doc/rand-gamma.tex create mode 100644 software/gsl-1.15/doc/rand-gaussian-tail.tex create mode 100644 software/gsl-1.15/doc/rand-gaussian.tex create mode 100644 software/gsl-1.15/doc/rand-geometric.tex create mode 100644 software/gsl-1.15/doc/rand-gumbel.tex create mode 100644 software/gsl-1.15/doc/rand-gumbel1.tex create mode 100644 software/gsl-1.15/doc/rand-gumbel2.tex create mode 100644 software/gsl-1.15/doc/rand-hypergeometric.tex create mode 100644 software/gsl-1.15/doc/rand-landau.tex create mode 100644 software/gsl-1.15/doc/rand-laplace.tex create mode 100644 software/gsl-1.15/doc/rand-levy.tex create mode 100644 software/gsl-1.15/doc/rand-levyskew.tex create mode 100644 software/gsl-1.15/doc/rand-logarithmic.tex create mode 100644 software/gsl-1.15/doc/rand-logistic.tex create mode 100644 software/gsl-1.15/doc/rand-lognormal.tex create mode 100644 software/gsl-1.15/doc/rand-nbinomial.tex create mode 100644 software/gsl-1.15/doc/rand-pareto.tex create mode 100644 software/gsl-1.15/doc/rand-pascal.tex create mode 100644 software/gsl-1.15/doc/rand-poisson.tex create mode 100644 software/gsl-1.15/doc/rand-rayleigh-tail.tex create mode 100644 software/gsl-1.15/doc/rand-rayleigh.tex create mode 100644 software/gsl-1.15/doc/rand-tdist.tex create mode 100644 software/gsl-1.15/doc/rand-weibull.tex create mode 100644 software/gsl-1.15/doc/randist.texi create mode 100644 software/gsl-1.15/doc/random-walk.tex create mode 100644 software/gsl-1.15/doc/randplots.gnp create mode 100644 software/gsl-1.15/doc/rng.texi create mode 100644 software/gsl-1.15/doc/roots-bisection.eps create mode 100644 software/gsl-1.15/doc/roots-false-position.eps create mode 100644 software/gsl-1.15/doc/roots-newtons-method.eps create mode 100644 software/gsl-1.15/doc/roots-secant-method.eps create mode 100644 software/gsl-1.15/doc/roots.texi create mode 100644 software/gsl-1.15/doc/siman-energy.eps create mode 100644 software/gsl-1.15/doc/siman-test.eps create mode 100644 software/gsl-1.15/doc/siman.texi create mode 100644 software/gsl-1.15/doc/sort.texi create mode 100644 software/gsl-1.15/doc/specfunc-airy.texi create mode 100644 software/gsl-1.15/doc/specfunc-bessel.texi create mode 100644 software/gsl-1.15/doc/specfunc-clausen.texi create mode 100644 software/gsl-1.15/doc/specfunc-coulomb.texi create mode 100644 software/gsl-1.15/doc/specfunc-coupling.texi create mode 100644 software/gsl-1.15/doc/specfunc-dawson.texi create mode 100644 software/gsl-1.15/doc/specfunc-debye.texi create mode 100644 software/gsl-1.15/doc/specfunc-dilog.texi create mode 100644 software/gsl-1.15/doc/specfunc-elementary.texi create mode 100644 software/gsl-1.15/doc/specfunc-ellint.texi create mode 100644 software/gsl-1.15/doc/specfunc-elljac.texi create mode 100644 software/gsl-1.15/doc/specfunc-erf.texi create mode 100644 software/gsl-1.15/doc/specfunc-exp.texi create mode 100644 software/gsl-1.15/doc/specfunc-expint.texi create mode 100644 software/gsl-1.15/doc/specfunc-fermi-dirac.texi create mode 100644 software/gsl-1.15/doc/specfunc-gamma.texi create mode 100644 software/gsl-1.15/doc/specfunc-gegenbauer.texi create mode 100644 software/gsl-1.15/doc/specfunc-hyperg.texi create mode 100644 software/gsl-1.15/doc/specfunc-laguerre.texi create mode 100644 software/gsl-1.15/doc/specfunc-lambert.texi create mode 100644 software/gsl-1.15/doc/specfunc-legendre.texi create mode 100644 software/gsl-1.15/doc/specfunc-log.texi create mode 100644 software/gsl-1.15/doc/specfunc-mathieu.texi create mode 100644 software/gsl-1.15/doc/specfunc-pow-int.texi create mode 100644 software/gsl-1.15/doc/specfunc-psi.texi create mode 100644 software/gsl-1.15/doc/specfunc-synchrotron.texi create mode 100644 software/gsl-1.15/doc/specfunc-transport.texi create mode 100644 software/gsl-1.15/doc/specfunc-trig.texi create mode 100644 software/gsl-1.15/doc/specfunc-zeta.texi create mode 100644 software/gsl-1.15/doc/specfunc.texi create mode 100644 software/gsl-1.15/doc/stamp-vti create mode 100644 software/gsl-1.15/doc/statistics.texi create mode 100644 software/gsl-1.15/doc/statnotes.tex create mode 100644 software/gsl-1.15/doc/sum.texi create mode 100644 software/gsl-1.15/doc/texinfo.tex create mode 100644 software/gsl-1.15/doc/usage.texi create mode 100644 software/gsl-1.15/doc/vdp.eps create mode 100644 software/gsl-1.15/doc/vectors.texi create mode 100644 software/gsl-1.15/doc/version.texi create mode 100644 software/gsl-1.15/eigen/.deps/francis.Plo create mode 100644 software/gsl-1.15/eigen/.deps/gen.Plo create mode 100644 software/gsl-1.15/eigen/.deps/genherm.Plo create mode 100644 software/gsl-1.15/eigen/.deps/genhermv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/gensymm.Plo create mode 100644 software/gsl-1.15/eigen/.deps/gensymmv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/genv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/herm.Plo create mode 100644 software/gsl-1.15/eigen/.deps/hermv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/jacobi.Plo create mode 100644 software/gsl-1.15/eigen/.deps/nonsymm.Plo create mode 100644 software/gsl-1.15/eigen/.deps/nonsymmv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/schur.Plo create mode 100644 software/gsl-1.15/eigen/.deps/sort.Plo create mode 100644 software/gsl-1.15/eigen/.deps/symm.Plo create mode 100644 software/gsl-1.15/eigen/.deps/symmv.Plo create mode 100644 software/gsl-1.15/eigen/.deps/test.Po create mode 100644 software/gsl-1.15/eigen/ChangeLog create mode 100644 software/gsl-1.15/eigen/Makefile.am create mode 100644 software/gsl-1.15/eigen/Makefile.in create mode 100644 software/gsl-1.15/eigen/TODO create mode 100644 software/gsl-1.15/eigen/francis.c create mode 100644 software/gsl-1.15/eigen/gen.c create mode 100644 software/gsl-1.15/eigen/genherm.c create mode 100644 software/gsl-1.15/eigen/genhermv.c create mode 100644 software/gsl-1.15/eigen/gensymm.c create mode 100644 software/gsl-1.15/eigen/gensymmv.c create mode 100644 software/gsl-1.15/eigen/genv.c create mode 100644 software/gsl-1.15/eigen/gsl_eigen.h create mode 100644 software/gsl-1.15/eigen/herm.c create mode 100644 software/gsl-1.15/eigen/hermv.c create mode 100644 software/gsl-1.15/eigen/jacobi.c create mode 100644 software/gsl-1.15/eigen/nonsymm.c create mode 100644 software/gsl-1.15/eigen/nonsymmv.c create mode 100644 software/gsl-1.15/eigen/qrstep.c create mode 100644 software/gsl-1.15/eigen/schur.c create mode 100644 software/gsl-1.15/eigen/sort.c create mode 100644 software/gsl-1.15/eigen/symm.c create mode 100644 software/gsl-1.15/eigen/symmv.c create mode 100644 software/gsl-1.15/eigen/test.c create mode 100644 software/gsl-1.15/err/.deps/error.Plo create mode 100644 software/gsl-1.15/err/.deps/message.Plo create mode 100644 software/gsl-1.15/err/.deps/stream.Plo create mode 100644 software/gsl-1.15/err/.deps/strerror.Plo create mode 100644 software/gsl-1.15/err/.deps/test.Po create mode 100644 software/gsl-1.15/err/ChangeLog create mode 100644 software/gsl-1.15/err/Makefile.am create mode 100644 software/gsl-1.15/err/Makefile.in create mode 100644 software/gsl-1.15/err/TODO create mode 100644 software/gsl-1.15/err/error.c create mode 100644 software/gsl-1.15/err/gsl_errno.h create mode 100644 software/gsl-1.15/err/gsl_message.h create mode 100644 software/gsl-1.15/err/message.c create mode 100644 software/gsl-1.15/err/stream.c create mode 100644 software/gsl-1.15/err/strerror.c create mode 100644 software/gsl-1.15/err/test.c create mode 100644 software/gsl-1.15/fft/.deps/dft.Plo create mode 100644 software/gsl-1.15/fft/.deps/fft.Plo create mode 100644 software/gsl-1.15/fft/.deps/signals.Po create mode 100644 software/gsl-1.15/fft/.deps/test.Po create mode 100644 software/gsl-1.15/fft/ChangeLog create mode 100644 software/gsl-1.15/fft/Makefile.am create mode 100644 software/gsl-1.15/fft/Makefile.in create mode 100644 software/gsl-1.15/fft/TODO create mode 100644 software/gsl-1.15/fft/bitreverse.c create mode 100644 software/gsl-1.15/fft/bitreverse.h create mode 100644 software/gsl-1.15/fft/c_init.c create mode 100644 software/gsl-1.15/fft/c_main.c create mode 100644 software/gsl-1.15/fft/c_pass.h create mode 100644 software/gsl-1.15/fft/c_pass_2.c create mode 100644 software/gsl-1.15/fft/c_pass_3.c create mode 100644 software/gsl-1.15/fft/c_pass_4.c create mode 100644 software/gsl-1.15/fft/c_pass_5.c create mode 100644 software/gsl-1.15/fft/c_pass_6.c create mode 100644 software/gsl-1.15/fft/c_pass_7.c create mode 100644 software/gsl-1.15/fft/c_pass_n.c create mode 100644 software/gsl-1.15/fft/c_radix2.c create mode 100644 software/gsl-1.15/fft/compare.h create mode 100644 software/gsl-1.15/fft/compare_source.c create mode 100644 software/gsl-1.15/fft/complex_internal.h create mode 100644 software/gsl-1.15/fft/dft.c create mode 100644 software/gsl-1.15/fft/dft_source.c create mode 100644 software/gsl-1.15/fft/factorize.c create mode 100644 software/gsl-1.15/fft/factorize.h create mode 100644 software/gsl-1.15/fft/fft.c create mode 100644 software/gsl-1.15/fft/gsl_dft_complex.h create mode 100644 software/gsl-1.15/fft/gsl_dft_complex_float.h create mode 100644 software/gsl-1.15/fft/gsl_fft.h create mode 100644 software/gsl-1.15/fft/gsl_fft_complex.h create mode 100644 software/gsl-1.15/fft/gsl_fft_complex_float.h create mode 100644 software/gsl-1.15/fft/gsl_fft_halfcomplex.h create mode 100644 software/gsl-1.15/fft/gsl_fft_halfcomplex_float.h create mode 100644 software/gsl-1.15/fft/gsl_fft_real.h create mode 100644 software/gsl-1.15/fft/gsl_fft_real_float.h create mode 100644 software/gsl-1.15/fft/hc_init.c create mode 100644 software/gsl-1.15/fft/hc_main.c create mode 100644 software/gsl-1.15/fft/hc_pass.h create mode 100644 software/gsl-1.15/fft/hc_pass_2.c create mode 100644 software/gsl-1.15/fft/hc_pass_3.c create mode 100644 software/gsl-1.15/fft/hc_pass_4.c create mode 100644 software/gsl-1.15/fft/hc_pass_5.c create mode 100644 software/gsl-1.15/fft/hc_pass_n.c create mode 100644 software/gsl-1.15/fft/hc_radix2.c create mode 100644 software/gsl-1.15/fft/hc_unpack.c create mode 100644 software/gsl-1.15/fft/real_init.c create mode 100644 software/gsl-1.15/fft/real_main.c create mode 100644 software/gsl-1.15/fft/real_pass.h create mode 100644 software/gsl-1.15/fft/real_pass_2.c create mode 100644 software/gsl-1.15/fft/real_pass_3.c create mode 100644 software/gsl-1.15/fft/real_pass_4.c create mode 100644 software/gsl-1.15/fft/real_pass_5.c create mode 100644 software/gsl-1.15/fft/real_pass_n.c create mode 100644 software/gsl-1.15/fft/real_radix2.c create mode 100644 software/gsl-1.15/fft/real_unpack.c create mode 100644 software/gsl-1.15/fft/signals.c create mode 100644 software/gsl-1.15/fft/signals.h create mode 100644 software/gsl-1.15/fft/signals_source.c create mode 100644 software/gsl-1.15/fft/test.c create mode 100644 software/gsl-1.15/fft/test_complex_source.c create mode 100644 software/gsl-1.15/fft/test_real_source.c create mode 100644 software/gsl-1.15/fft/test_trap_source.c create mode 100644 software/gsl-1.15/fft/urand.c create mode 100644 software/gsl-1.15/fit/.deps/linear.Plo create mode 100644 software/gsl-1.15/fit/.deps/test.Po create mode 100644 software/gsl-1.15/fit/ChangeLog create mode 100644 software/gsl-1.15/fit/Makefile.am create mode 100644 software/gsl-1.15/fit/Makefile.in create mode 100644 software/gsl-1.15/fit/gsl_fit.h create mode 100644 software/gsl-1.15/fit/linear.c create mode 100644 software/gsl-1.15/fit/test.c create mode 100755 software/gsl-1.15/gsl-config.in create mode 100644 software/gsl-1.15/gsl-histogram.c create mode 100644 software/gsl-1.15/gsl-randist.c create mode 100644 software/gsl-1.15/gsl.m4 create mode 100644 software/gsl-1.15/gsl.pc.in create mode 100644 software/gsl-1.15/gsl.spec create mode 100644 software/gsl-1.15/gsl.spec.in create mode 100644 software/gsl-1.15/gsl/Makefile.am create mode 100644 software/gsl-1.15/gsl/Makefile.in create mode 100644 software/gsl-1.15/gsl_inline.h create mode 100644 software/gsl-1.15/gsl_machine.h create mode 100644 software/gsl-1.15/gsl_math.h create mode 100644 software/gsl-1.15/gsl_minmax.h create mode 100644 software/gsl-1.15/gsl_mode.h create mode 100644 software/gsl-1.15/gsl_nan.h create mode 100644 software/gsl-1.15/gsl_pow_int.h create mode 100644 software/gsl-1.15/gsl_precision.h create mode 100644 software/gsl-1.15/gsl_types.h create mode 100644 software/gsl-1.15/gsl_version.h create mode 100644 software/gsl-1.15/gsl_version.h.in create mode 100644 software/gsl-1.15/histogram/.deps/add.Plo create mode 100644 software/gsl-1.15/histogram/.deps/add2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/calloc_range.Plo create mode 100644 software/gsl-1.15/histogram/.deps/calloc_range2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/copy.Plo create mode 100644 software/gsl-1.15/histogram/.deps/copy2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/file.Plo create mode 100644 software/gsl-1.15/histogram/.deps/file2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/get.Plo create mode 100644 software/gsl-1.15/histogram/.deps/get2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/init.Plo create mode 100644 software/gsl-1.15/histogram/.deps/init2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/maxval.Plo create mode 100644 software/gsl-1.15/histogram/.deps/maxval2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/oper.Plo create mode 100644 software/gsl-1.15/histogram/.deps/oper2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/params.Plo create mode 100644 software/gsl-1.15/histogram/.deps/params2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/pdf.Plo create mode 100644 software/gsl-1.15/histogram/.deps/pdf2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/reset.Plo create mode 100644 software/gsl-1.15/histogram/.deps/reset2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/stat.Plo create mode 100644 software/gsl-1.15/histogram/.deps/stat2d.Plo create mode 100644 software/gsl-1.15/histogram/.deps/test.Po create mode 100644 software/gsl-1.15/histogram/.deps/test1d.Po create mode 100644 software/gsl-1.15/histogram/.deps/test1d_resample.Po create mode 100644 software/gsl-1.15/histogram/.deps/test1d_trap.Po create mode 100644 software/gsl-1.15/histogram/.deps/test2d.Po create mode 100644 software/gsl-1.15/histogram/.deps/test2d_resample.Po create mode 100644 software/gsl-1.15/histogram/.deps/test2d_trap.Po create mode 100644 software/gsl-1.15/histogram/ChangeLog create mode 100644 software/gsl-1.15/histogram/Makefile.am create mode 100644 software/gsl-1.15/histogram/Makefile.in create mode 100644 software/gsl-1.15/histogram/TODO create mode 100644 software/gsl-1.15/histogram/add.c create mode 100644 software/gsl-1.15/histogram/add2d.c create mode 100644 software/gsl-1.15/histogram/calloc_range.c create mode 100644 software/gsl-1.15/histogram/calloc_range2d.c create mode 100644 software/gsl-1.15/histogram/copy.c create mode 100644 software/gsl-1.15/histogram/copy2d.c create mode 100644 software/gsl-1.15/histogram/file.c create mode 100644 software/gsl-1.15/histogram/file2d.c create mode 100644 software/gsl-1.15/histogram/find.c create mode 100644 software/gsl-1.15/histogram/find2d.c create mode 100644 software/gsl-1.15/histogram/get.c create mode 100644 software/gsl-1.15/histogram/get2d.c create mode 100644 software/gsl-1.15/histogram/gsl_histogram.h create mode 100644 software/gsl-1.15/histogram/gsl_histogram2d.h create mode 100644 software/gsl-1.15/histogram/init.c create mode 100644 software/gsl-1.15/histogram/init2d.c create mode 100644 software/gsl-1.15/histogram/maxval.c create mode 100644 software/gsl-1.15/histogram/maxval2d.c create mode 100644 software/gsl-1.15/histogram/oper.c create mode 100644 software/gsl-1.15/histogram/oper2d.c create mode 100644 software/gsl-1.15/histogram/params.c create mode 100644 software/gsl-1.15/histogram/params2d.c create mode 100644 software/gsl-1.15/histogram/pdf.c create mode 100644 software/gsl-1.15/histogram/pdf2d.c create mode 100644 software/gsl-1.15/histogram/reset.c create mode 100644 software/gsl-1.15/histogram/reset2d.c create mode 100644 software/gsl-1.15/histogram/stat.c create mode 100644 software/gsl-1.15/histogram/stat2d.c create mode 100644 software/gsl-1.15/histogram/test.c create mode 100644 software/gsl-1.15/histogram/test1d.c create mode 100644 software/gsl-1.15/histogram/test1d_resample.c create mode 100644 software/gsl-1.15/histogram/test1d_trap.c create mode 100644 software/gsl-1.15/histogram/test2d.c create mode 100644 software/gsl-1.15/histogram/test2d_resample.c create mode 100644 software/gsl-1.15/histogram/test2d_trap.c create mode 100644 software/gsl-1.15/histogram/urand.c create mode 100644 software/gsl-1.15/ieee-utils/.deps/env.Plo create mode 100644 software/gsl-1.15/ieee-utils/.deps/fp.Plo create mode 100644 software/gsl-1.15/ieee-utils/.deps/make_rep.Plo create mode 100644 software/gsl-1.15/ieee-utils/.deps/print.Plo create mode 100644 software/gsl-1.15/ieee-utils/.deps/read.Plo create mode 100644 software/gsl-1.15/ieee-utils/.deps/test.Po create mode 100644 software/gsl-1.15/ieee-utils/ChangeLog create mode 100644 software/gsl-1.15/ieee-utils/Makefile.am create mode 100644 software/gsl-1.15/ieee-utils/Makefile.in create mode 100644 software/gsl-1.15/ieee-utils/TODO create mode 100644 software/gsl-1.15/ieee-utils/endian.c create mode 100644 software/gsl-1.15/ieee-utils/env.c create mode 100644 software/gsl-1.15/ieee-utils/fp-aix.c create mode 100644 software/gsl-1.15/ieee-utils/fp-darwin.c create mode 100644 software/gsl-1.15/ieee-utils/fp-darwin86.c create mode 100644 software/gsl-1.15/ieee-utils/fp-freebsd.c create mode 100644 software/gsl-1.15/ieee-utils/fp-gnuc99.c create mode 100644 software/gsl-1.15/ieee-utils/fp-gnum68k.c create mode 100644 software/gsl-1.15/ieee-utils/fp-gnuppc.c create mode 100644 software/gsl-1.15/ieee-utils/fp-gnusparc.c create mode 100644 software/gsl-1.15/ieee-utils/fp-gnux86.c create mode 100644 software/gsl-1.15/ieee-utils/fp-hpux.c create mode 100644 software/gsl-1.15/ieee-utils/fp-hpux11.c create mode 100644 software/gsl-1.15/ieee-utils/fp-irix.c create mode 100644 software/gsl-1.15/ieee-utils/fp-netbsd.c create mode 100644 software/gsl-1.15/ieee-utils/fp-openbsd.c create mode 100644 software/gsl-1.15/ieee-utils/fp-os2emx.c create mode 100644 software/gsl-1.15/ieee-utils/fp-solaris.c create mode 100644 software/gsl-1.15/ieee-utils/fp-sunos4.c create mode 100644 software/gsl-1.15/ieee-utils/fp-tru64.c create mode 100644 software/gsl-1.15/ieee-utils/fp-unknown.c create mode 100644 software/gsl-1.15/ieee-utils/fp.c create mode 100644 software/gsl-1.15/ieee-utils/gsl_ieee_utils.h create mode 100644 software/gsl-1.15/ieee-utils/make_rep.c create mode 100644 software/gsl-1.15/ieee-utils/print.c create mode 100644 software/gsl-1.15/ieee-utils/read.c create mode 100644 software/gsl-1.15/ieee-utils/standardize.c create mode 100644 software/gsl-1.15/ieee-utils/test.c create mode 100755 software/gsl-1.15/install-sh create mode 100644 software/gsl-1.15/integration/.deps/cquad.Plo create mode 100644 software/gsl-1.15/integration/.deps/glfixed.Plo create mode 100644 software/gsl-1.15/integration/.deps/qag.Plo create mode 100644 software/gsl-1.15/integration/.deps/qagp.Plo create mode 100644 software/gsl-1.15/integration/.deps/qags.Plo create mode 100644 software/gsl-1.15/integration/.deps/qawc.Plo create mode 100644 software/gsl-1.15/integration/.deps/qawf.Plo create mode 100644 software/gsl-1.15/integration/.deps/qawo.Plo create mode 100644 software/gsl-1.15/integration/.deps/qaws.Plo create mode 100644 software/gsl-1.15/integration/.deps/qcheb.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk15.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk21.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk31.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk41.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk51.Plo create mode 100644 software/gsl-1.15/integration/.deps/qk61.Plo create mode 100644 software/gsl-1.15/integration/.deps/qmomo.Plo create mode 100644 software/gsl-1.15/integration/.deps/qmomof.Plo create mode 100644 software/gsl-1.15/integration/.deps/qng.Plo create mode 100644 software/gsl-1.15/integration/.deps/test.Po create mode 100644 software/gsl-1.15/integration/.deps/tests.Po create mode 100644 software/gsl-1.15/integration/.deps/workspace.Plo create mode 100644 software/gsl-1.15/integration/ChangeLog create mode 100644 software/gsl-1.15/integration/Makefile.am create mode 100644 software/gsl-1.15/integration/Makefile.in create mode 100644 software/gsl-1.15/integration/TODO create mode 100644 software/gsl-1.15/integration/append.c create mode 100644 software/gsl-1.15/integration/cquad.c create mode 100644 software/gsl-1.15/integration/cquad_const.c create mode 100644 software/gsl-1.15/integration/err.c create mode 100644 software/gsl-1.15/integration/glfixed.c create mode 100644 software/gsl-1.15/integration/gsl_integration.h create mode 100644 software/gsl-1.15/integration/initialise.c create mode 100644 software/gsl-1.15/integration/positivity.c create mode 100644 software/gsl-1.15/integration/ptsort.c create mode 100644 software/gsl-1.15/integration/qag.c create mode 100644 software/gsl-1.15/integration/qagp.c create mode 100644 software/gsl-1.15/integration/qags.c create mode 100644 software/gsl-1.15/integration/qawc.c create mode 100644 software/gsl-1.15/integration/qawf.c create mode 100644 software/gsl-1.15/integration/qawo.c create mode 100644 software/gsl-1.15/integration/qaws.c create mode 100644 software/gsl-1.15/integration/qc25c.c create mode 100644 software/gsl-1.15/integration/qc25f.c create mode 100644 software/gsl-1.15/integration/qc25s.c create mode 100644 software/gsl-1.15/integration/qcheb.c create mode 100644 software/gsl-1.15/integration/qelg.c create mode 100644 software/gsl-1.15/integration/qk.c create mode 100644 software/gsl-1.15/integration/qk15.c create mode 100644 software/gsl-1.15/integration/qk21.c create mode 100644 software/gsl-1.15/integration/qk31.c create mode 100644 software/gsl-1.15/integration/qk41.c create mode 100644 software/gsl-1.15/integration/qk51.c create mode 100644 software/gsl-1.15/integration/qk61.c create mode 100644 software/gsl-1.15/integration/qmomo.c create mode 100644 software/gsl-1.15/integration/qmomof.c create mode 100644 software/gsl-1.15/integration/qng.c create mode 100644 software/gsl-1.15/integration/qng.h create mode 100644 software/gsl-1.15/integration/qpsrt.c create mode 100644 software/gsl-1.15/integration/qpsrt2.c create mode 100644 software/gsl-1.15/integration/reset.c create mode 100644 software/gsl-1.15/integration/set_initial.c create mode 100644 software/gsl-1.15/integration/test.c create mode 100644 software/gsl-1.15/integration/tests.c create mode 100644 software/gsl-1.15/integration/tests.h create mode 100644 software/gsl-1.15/integration/util.c create mode 100644 software/gsl-1.15/integration/workspace.c create mode 100644 software/gsl-1.15/interpolation/.deps/accel.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/akima.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/cspline.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/inline.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/interp.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/linear.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/poly.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/spline.Plo create mode 100644 software/gsl-1.15/interpolation/.deps/test.Po create mode 100644 software/gsl-1.15/interpolation/ChangeLog create mode 100644 software/gsl-1.15/interpolation/Makefile.am create mode 100644 software/gsl-1.15/interpolation/Makefile.in create mode 100644 software/gsl-1.15/interpolation/TODO create mode 100644 software/gsl-1.15/interpolation/accel.c create mode 100644 software/gsl-1.15/interpolation/akima.c create mode 100644 software/gsl-1.15/interpolation/cspline.c create mode 100644 software/gsl-1.15/interpolation/gsl_interp.h create mode 100644 software/gsl-1.15/interpolation/gsl_spline.h create mode 100644 software/gsl-1.15/interpolation/inline.c create mode 100644 software/gsl-1.15/interpolation/integ_eval.h create mode 100644 software/gsl-1.15/interpolation/interp.c create mode 100644 software/gsl-1.15/interpolation/linear.c create mode 100644 software/gsl-1.15/interpolation/poly.c create mode 100644 software/gsl-1.15/interpolation/spline.c create mode 100644 software/gsl-1.15/interpolation/test.c create mode 100755 software/gsl-1.15/libtool create mode 100644 software/gsl-1.15/linalg/.deps/balance.Plo create mode 100644 software/gsl-1.15/linalg/.deps/balancemat.Plo create mode 100644 software/gsl-1.15/linalg/.deps/bidiag.Plo create mode 100644 software/gsl-1.15/linalg/.deps/cholesky.Plo create mode 100644 software/gsl-1.15/linalg/.deps/choleskyc.Plo create mode 100644 software/gsl-1.15/linalg/.deps/exponential.Plo create mode 100644 software/gsl-1.15/linalg/.deps/hermtd.Plo create mode 100644 software/gsl-1.15/linalg/.deps/hessenberg.Plo create mode 100644 software/gsl-1.15/linalg/.deps/hesstri.Plo create mode 100644 software/gsl-1.15/linalg/.deps/hh.Plo create mode 100644 software/gsl-1.15/linalg/.deps/householder.Plo create mode 100644 software/gsl-1.15/linalg/.deps/householdercomplex.Plo create mode 100644 software/gsl-1.15/linalg/.deps/lq.Plo create mode 100644 software/gsl-1.15/linalg/.deps/lu.Plo create mode 100644 software/gsl-1.15/linalg/.deps/luc.Plo create mode 100644 software/gsl-1.15/linalg/.deps/multiply.Plo create mode 100644 software/gsl-1.15/linalg/.deps/ptlq.Plo create mode 100644 software/gsl-1.15/linalg/.deps/qr.Plo create mode 100644 software/gsl-1.15/linalg/.deps/qrpt.Plo create mode 100644 software/gsl-1.15/linalg/.deps/svd.Plo create mode 100644 software/gsl-1.15/linalg/.deps/symmtd.Plo create mode 100644 software/gsl-1.15/linalg/.deps/test.Po create mode 100644 software/gsl-1.15/linalg/.deps/tridiag.Plo create mode 100644 software/gsl-1.15/linalg/ChangeLog create mode 100644 software/gsl-1.15/linalg/Makefile.am create mode 100644 software/gsl-1.15/linalg/Makefile.in create mode 100644 software/gsl-1.15/linalg/TODO create mode 100644 software/gsl-1.15/linalg/apply_givens.c create mode 100644 software/gsl-1.15/linalg/balance.c create mode 100644 software/gsl-1.15/linalg/balancemat.c create mode 100644 software/gsl-1.15/linalg/bidiag.c create mode 100644 software/gsl-1.15/linalg/cholesky.c create mode 100644 software/gsl-1.15/linalg/choleskyc.c create mode 100644 software/gsl-1.15/linalg/exponential.c create mode 100644 software/gsl-1.15/linalg/givens.c create mode 100644 software/gsl-1.15/linalg/gsl_linalg.h create mode 100644 software/gsl-1.15/linalg/hermtd.c create mode 100644 software/gsl-1.15/linalg/hessenberg.c create mode 100644 software/gsl-1.15/linalg/hesstri.c create mode 100644 software/gsl-1.15/linalg/hh.c create mode 100644 software/gsl-1.15/linalg/householder.c create mode 100644 software/gsl-1.15/linalg/householdercomplex.c create mode 100644 software/gsl-1.15/linalg/lq.c create mode 100644 software/gsl-1.15/linalg/lu.c create mode 100644 software/gsl-1.15/linalg/luc.c create mode 100644 software/gsl-1.15/linalg/multiply.c create mode 100644 software/gsl-1.15/linalg/ptlq.c create mode 100644 software/gsl-1.15/linalg/qr.c create mode 100644 software/gsl-1.15/linalg/qrpt.c create mode 100644 software/gsl-1.15/linalg/svd.c create mode 100644 software/gsl-1.15/linalg/svdstep.c create mode 100644 software/gsl-1.15/linalg/symmtd.c create mode 100644 software/gsl-1.15/linalg/test.c create mode 100644 software/gsl-1.15/linalg/tridiag.c create mode 100644 software/gsl-1.15/linalg/tridiag.h create mode 100755 software/gsl-1.15/ltmain.sh create mode 100644 software/gsl-1.15/matrix/.deps/copy.Plo create mode 100644 software/gsl-1.15/matrix/.deps/file.Plo create mode 100644 software/gsl-1.15/matrix/.deps/getset.Plo create mode 100644 software/gsl-1.15/matrix/.deps/init.Plo create mode 100644 software/gsl-1.15/matrix/.deps/matrix.Plo create mode 100644 software/gsl-1.15/matrix/.deps/minmax.Plo create mode 100644 software/gsl-1.15/matrix/.deps/oper.Plo create mode 100644 software/gsl-1.15/matrix/.deps/prop.Plo create mode 100644 software/gsl-1.15/matrix/.deps/rowcol.Plo create mode 100644 software/gsl-1.15/matrix/.deps/submatrix.Plo create mode 100644 software/gsl-1.15/matrix/.deps/swap.Plo create mode 100644 software/gsl-1.15/matrix/.deps/test.Po create mode 100644 software/gsl-1.15/matrix/.deps/test_static.Po create mode 100644 software/gsl-1.15/matrix/.deps/view.Plo create mode 100644 software/gsl-1.15/matrix/ChangeLog create mode 100644 software/gsl-1.15/matrix/Makefile.am create mode 100644 software/gsl-1.15/matrix/Makefile.in create mode 100644 software/gsl-1.15/matrix/TODO create mode 100644 software/gsl-1.15/matrix/copy.c create mode 100644 software/gsl-1.15/matrix/copy_source.c create mode 100644 software/gsl-1.15/matrix/file.c create mode 100644 software/gsl-1.15/matrix/file_source.c create mode 100644 software/gsl-1.15/matrix/getset.c create mode 100644 software/gsl-1.15/matrix/getset_source.c create mode 100644 software/gsl-1.15/matrix/gsl_matrix.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_char.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_complex_double.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_complex_float.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_complex_long_double.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_double.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_float.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_int.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_long.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_long_double.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_short.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_uchar.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_uint.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_ulong.h create mode 100644 software/gsl-1.15/matrix/gsl_matrix_ushort.h create mode 100644 software/gsl-1.15/matrix/init.c create mode 100644 software/gsl-1.15/matrix/init_source.c create mode 100644 software/gsl-1.15/matrix/matrix.c create mode 100644 software/gsl-1.15/matrix/minmax.c create mode 100644 software/gsl-1.15/matrix/minmax_source.c create mode 100644 software/gsl-1.15/matrix/oper.c create mode 100644 software/gsl-1.15/matrix/oper_complex_source.c create mode 100644 software/gsl-1.15/matrix/oper_source.c create mode 100644 software/gsl-1.15/matrix/prop.c create mode 100644 software/gsl-1.15/matrix/prop_source.c create mode 100644 software/gsl-1.15/matrix/rowcol.c create mode 100644 software/gsl-1.15/matrix/rowcol_source.c create mode 100644 software/gsl-1.15/matrix/submatrix.c create mode 100644 software/gsl-1.15/matrix/submatrix_source.c create mode 100644 software/gsl-1.15/matrix/swap.c create mode 100644 software/gsl-1.15/matrix/swap_source.c create mode 100644 software/gsl-1.15/matrix/test.c create mode 100644 software/gsl-1.15/matrix/test_complex_source.c create mode 100644 software/gsl-1.15/matrix/test_source.c create mode 100644 software/gsl-1.15/matrix/test_static.c create mode 100644 software/gsl-1.15/matrix/view.c create mode 100644 software/gsl-1.15/matrix/view.h create mode 100644 software/gsl-1.15/matrix/view_source.c create mode 100644 software/gsl-1.15/mdate-sh create mode 100644 software/gsl-1.15/min/.deps/bracketing.Plo create mode 100644 software/gsl-1.15/min/.deps/brent.Plo create mode 100644 software/gsl-1.15/min/.deps/convergence.Plo create mode 100644 software/gsl-1.15/min/.deps/fsolver.Plo create mode 100644 software/gsl-1.15/min/.deps/golden.Plo create mode 100644 software/gsl-1.15/min/.deps/quad_golden.Plo create mode 100644 software/gsl-1.15/min/.deps/test.Po create mode 100644 software/gsl-1.15/min/.deps/test_funcs.Po create mode 100644 software/gsl-1.15/min/ChangeLog create mode 100644 software/gsl-1.15/min/Makefile.am create mode 100644 software/gsl-1.15/min/Makefile.in create mode 100644 software/gsl-1.15/min/bracketing.c create mode 100644 software/gsl-1.15/min/brent.c create mode 100644 software/gsl-1.15/min/convergence.c create mode 100644 software/gsl-1.15/min/fsolver.c create mode 100644 software/gsl-1.15/min/golden.c create mode 100644 software/gsl-1.15/min/gsl_min.h create mode 100644 software/gsl-1.15/min/min.h create mode 100644 software/gsl-1.15/min/quad_golden.c create mode 100644 software/gsl-1.15/min/test.c create mode 100644 software/gsl-1.15/min/test.h create mode 100644 software/gsl-1.15/min/test_funcs.c create mode 100755 software/gsl-1.15/missing create mode 100755 software/gsl-1.15/mkinstalldirs create mode 100644 software/gsl-1.15/monte/.deps/miser.Plo create mode 100644 software/gsl-1.15/monte/.deps/plain.Plo create mode 100644 software/gsl-1.15/monte/.deps/test.Po create mode 100644 software/gsl-1.15/monte/.deps/vegas.Plo create mode 100644 software/gsl-1.15/monte/ChangeLog create mode 100644 software/gsl-1.15/monte/Makefile.am create mode 100644 software/gsl-1.15/monte/Makefile.in create mode 100644 software/gsl-1.15/monte/README create mode 100644 software/gsl-1.15/monte/TODO create mode 100644 software/gsl-1.15/monte/gsl_monte.h create mode 100644 software/gsl-1.15/monte/gsl_monte_miser.h create mode 100644 software/gsl-1.15/monte/gsl_monte_plain.h create mode 100644 software/gsl-1.15/monte/gsl_monte_vegas.h create mode 100644 software/gsl-1.15/monte/miser.c create mode 100644 software/gsl-1.15/monte/plain.c create mode 100644 software/gsl-1.15/monte/test.c create mode 100644 software/gsl-1.15/monte/test_main.c create mode 100644 software/gsl-1.15/monte/vegas.c create mode 100644 software/gsl-1.15/multifit/.deps/convergence.Plo create mode 100644 software/gsl-1.15/multifit/.deps/covar.Plo create mode 100644 software/gsl-1.15/multifit/.deps/fdfsolver.Plo create mode 100644 software/gsl-1.15/multifit/.deps/fsolver.Plo create mode 100644 software/gsl-1.15/multifit/.deps/gradient.Plo create mode 100644 software/gsl-1.15/multifit/.deps/lmder.Plo create mode 100644 software/gsl-1.15/multifit/.deps/multilinear.Plo create mode 100644 software/gsl-1.15/multifit/.deps/test.Po create mode 100644 software/gsl-1.15/multifit/.deps/work.Plo create mode 100644 software/gsl-1.15/multifit/ChangeLog create mode 100644 software/gsl-1.15/multifit/Makefile.am create mode 100644 software/gsl-1.15/multifit/Makefile.in create mode 100644 software/gsl-1.15/multifit/TODO create mode 100644 software/gsl-1.15/multifit/convergence.c create mode 100644 software/gsl-1.15/multifit/covar.c create mode 100644 software/gsl-1.15/multifit/fdfsolver.c create mode 100644 software/gsl-1.15/multifit/fsolver.c create mode 100644 software/gsl-1.15/multifit/gradient.c create mode 100644 software/gsl-1.15/multifit/gsl_multifit.h create mode 100644 software/gsl-1.15/multifit/gsl_multifit_nlin.h create mode 100644 software/gsl-1.15/multifit/lmder.c create mode 100644 software/gsl-1.15/multifit/lmiterate.c create mode 100644 software/gsl-1.15/multifit/lmpar.c create mode 100644 software/gsl-1.15/multifit/lmset.c create mode 100644 software/gsl-1.15/multifit/lmutil.c create mode 100644 software/gsl-1.15/multifit/multilinear.c create mode 100644 software/gsl-1.15/multifit/qrsolv.c create mode 100644 software/gsl-1.15/multifit/test.c create mode 100644 software/gsl-1.15/multifit/test_brown.c create mode 100644 software/gsl-1.15/multifit/test_enso.c create mode 100644 software/gsl-1.15/multifit/test_estimator.c create mode 100644 software/gsl-1.15/multifit/test_filip.c create mode 100644 software/gsl-1.15/multifit/test_fn.c create mode 100644 software/gsl-1.15/multifit/test_hahn1.c create mode 100644 software/gsl-1.15/multifit/test_kirby2.c create mode 100644 software/gsl-1.15/multifit/test_longley.c create mode 100644 software/gsl-1.15/multifit/test_nelson.c create mode 100644 software/gsl-1.15/multifit/test_pontius.c create mode 100644 software/gsl-1.15/multifit/work.c create mode 100644 software/gsl-1.15/multimin/.deps/conjugate_fr.Plo create mode 100644 software/gsl-1.15/multimin/.deps/conjugate_pr.Plo create mode 100644 software/gsl-1.15/multimin/.deps/convergence.Plo create mode 100644 software/gsl-1.15/multimin/.deps/diff.Plo create mode 100644 software/gsl-1.15/multimin/.deps/fdfminimizer.Plo create mode 100644 software/gsl-1.15/multimin/.deps/fminimizer.Plo create mode 100644 software/gsl-1.15/multimin/.deps/simplex.Plo create mode 100644 software/gsl-1.15/multimin/.deps/simplex2.Plo create mode 100644 software/gsl-1.15/multimin/.deps/steepest_descent.Plo create mode 100644 software/gsl-1.15/multimin/.deps/test.Po create mode 100644 software/gsl-1.15/multimin/.deps/test_funcs.Po create mode 100644 software/gsl-1.15/multimin/.deps/vector_bfgs.Plo create mode 100644 software/gsl-1.15/multimin/.deps/vector_bfgs2.Plo create mode 100644 software/gsl-1.15/multimin/ChangeLog create mode 100644 software/gsl-1.15/multimin/Makefile.am create mode 100644 software/gsl-1.15/multimin/Makefile.in create mode 100644 software/gsl-1.15/multimin/TODO create mode 100644 software/gsl-1.15/multimin/conjugate_fr.c create mode 100644 software/gsl-1.15/multimin/conjugate_pr.c create mode 100644 software/gsl-1.15/multimin/convergence.c create mode 100644 software/gsl-1.15/multimin/diff.c create mode 100644 software/gsl-1.15/multimin/directional_minimize.c create mode 100644 software/gsl-1.15/multimin/fdfminimizer.c create mode 100644 software/gsl-1.15/multimin/fminimizer.c create mode 100644 software/gsl-1.15/multimin/gsl_multimin.h create mode 100644 software/gsl-1.15/multimin/linear_minimize.c create mode 100644 software/gsl-1.15/multimin/linear_wrapper.c create mode 100644 software/gsl-1.15/multimin/simplex.c create mode 100644 software/gsl-1.15/multimin/simplex2.c create mode 100644 software/gsl-1.15/multimin/steepest_descent.c create mode 100644 software/gsl-1.15/multimin/test.c create mode 100644 software/gsl-1.15/multimin/test_funcs.c create mode 100644 software/gsl-1.15/multimin/test_funcs.h create mode 100644 software/gsl-1.15/multimin/vector_bfgs.c create mode 100644 software/gsl-1.15/multimin/vector_bfgs2.c create mode 100644 software/gsl-1.15/multiroots/.deps/broyden.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/convergence.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/dnewton.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/fdfsolver.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/fdjac.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/fsolver.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/gnewton.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/hybrid.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/hybridj.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/newton.Plo create mode 100644 software/gsl-1.15/multiroots/.deps/test.Po create mode 100644 software/gsl-1.15/multiroots/.deps/test_funcs.Po create mode 100644 software/gsl-1.15/multiroots/ChangeLog create mode 100644 software/gsl-1.15/multiroots/Makefile.am create mode 100644 software/gsl-1.15/multiroots/Makefile.in create mode 100644 software/gsl-1.15/multiroots/broyden.c create mode 100644 software/gsl-1.15/multiroots/convergence.c create mode 100644 software/gsl-1.15/multiroots/dnewton.c create mode 100644 software/gsl-1.15/multiroots/dogleg.c create mode 100644 software/gsl-1.15/multiroots/enorm.c create mode 100644 software/gsl-1.15/multiroots/fdfsolver.c create mode 100644 software/gsl-1.15/multiroots/fdjac.c create mode 100644 software/gsl-1.15/multiroots/fsolver.c create mode 100644 software/gsl-1.15/multiroots/gnewton.c create mode 100644 software/gsl-1.15/multiroots/gsl_multiroots.h create mode 100644 software/gsl-1.15/multiroots/hybrid.c create mode 100644 software/gsl-1.15/multiroots/hybridj.c create mode 100644 software/gsl-1.15/multiroots/newton.c create mode 100644 software/gsl-1.15/multiroots/test.c create mode 100644 software/gsl-1.15/multiroots/test_funcs.c create mode 100644 software/gsl-1.15/multiroots/test_funcs.h create mode 100644 software/gsl-1.15/multiset/.deps/file.Plo create mode 100644 software/gsl-1.15/multiset/.deps/init.Plo create mode 100644 software/gsl-1.15/multiset/.deps/inline.Plo create mode 100644 software/gsl-1.15/multiset/.deps/multiset.Plo create mode 100644 software/gsl-1.15/multiset/.deps/test.Po create mode 100644 software/gsl-1.15/multiset/ChangeLog create mode 100644 software/gsl-1.15/multiset/Makefile.am create mode 100644 software/gsl-1.15/multiset/Makefile.in create mode 100644 software/gsl-1.15/multiset/TODO create mode 100644 software/gsl-1.15/multiset/file.c create mode 100644 software/gsl-1.15/multiset/gsl_multiset.h create mode 100644 software/gsl-1.15/multiset/init.c create mode 100644 software/gsl-1.15/multiset/inline.c create mode 100644 software/gsl-1.15/multiset/multiset.c create mode 100644 software/gsl-1.15/multiset/test.c create mode 100644 software/gsl-1.15/ntuple/.deps/ntuple.Plo create mode 100644 software/gsl-1.15/ntuple/.deps/test.Po create mode 100644 software/gsl-1.15/ntuple/ChangeLog create mode 100644 software/gsl-1.15/ntuple/Makefile.am create mode 100644 software/gsl-1.15/ntuple/Makefile.in create mode 100644 software/gsl-1.15/ntuple/gsl_ntuple.h create mode 100644 software/gsl-1.15/ntuple/ntuple.c create mode 100644 software/gsl-1.15/ntuple/test.c create mode 100644 software/gsl-1.15/ode-initval/.deps/bsimp.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/control.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/cscal.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/cstd.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/evolve.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/gear1.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/gear2.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk2.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk2imp.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk2simp.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk4.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk4imp.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rk8pd.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rkck.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/rkf45.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/step.Plo create mode 100644 software/gsl-1.15/ode-initval/.deps/test.Po create mode 100644 software/gsl-1.15/ode-initval/ChangeLog create mode 100644 software/gsl-1.15/ode-initval/Makefile.am create mode 100644 software/gsl-1.15/ode-initval/Makefile.in create mode 100644 software/gsl-1.15/ode-initval/TODO create mode 100644 software/gsl-1.15/ode-initval/bsimp.c create mode 100644 software/gsl-1.15/ode-initval/control.c create mode 100644 software/gsl-1.15/ode-initval/cscal.c create mode 100644 software/gsl-1.15/ode-initval/cstd.c create mode 100644 software/gsl-1.15/ode-initval/evolve.c create mode 100644 software/gsl-1.15/ode-initval/gear1.c create mode 100644 software/gsl-1.15/ode-initval/gear2.c create mode 100644 software/gsl-1.15/ode-initval/gsl_odeiv.h create mode 100644 software/gsl-1.15/ode-initval/odeiv_util.h create mode 100644 software/gsl-1.15/ode-initval/rk2.c create mode 100644 software/gsl-1.15/ode-initval/rk2imp.c create mode 100644 software/gsl-1.15/ode-initval/rk2simp.c create mode 100644 software/gsl-1.15/ode-initval/rk4.c create mode 100644 software/gsl-1.15/ode-initval/rk4imp.c create mode 100644 software/gsl-1.15/ode-initval/rk8pd.c create mode 100644 software/gsl-1.15/ode-initval/rkck.c create mode 100644 software/gsl-1.15/ode-initval/rkf45.c create mode 100644 software/gsl-1.15/ode-initval/step.c create mode 100644 software/gsl-1.15/ode-initval/test.c create mode 100644 software/gsl-1.15/ode-initval2/.deps/bsimp.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/control.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/cscal.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/cstd.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/driver.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/evolve.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/msadams.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/msbdf.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk1imp.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk2.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk2imp.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk4.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk4imp.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rk8pd.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rkck.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/rkf45.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/step.Plo create mode 100644 software/gsl-1.15/ode-initval2/.deps/test.Po create mode 100644 software/gsl-1.15/ode-initval2/ChangeLog create mode 100644 software/gsl-1.15/ode-initval2/Makefile.am create mode 100644 software/gsl-1.15/ode-initval2/Makefile.in create mode 100644 software/gsl-1.15/ode-initval2/TODO create mode 100644 software/gsl-1.15/ode-initval2/bsimp.c create mode 100644 software/gsl-1.15/ode-initval2/control.c create mode 100644 software/gsl-1.15/ode-initval2/control_utils.c create mode 100644 software/gsl-1.15/ode-initval2/cscal.c create mode 100644 software/gsl-1.15/ode-initval2/cstd.c create mode 100644 software/gsl-1.15/ode-initval2/driver.c create mode 100644 software/gsl-1.15/ode-initval2/evolve.c create mode 100644 software/gsl-1.15/ode-initval2/gsl_odeiv2.h create mode 100644 software/gsl-1.15/ode-initval2/modnewton1.c create mode 100644 software/gsl-1.15/ode-initval2/msadams.c create mode 100644 software/gsl-1.15/ode-initval2/msbdf.c create mode 100644 software/gsl-1.15/ode-initval2/odeiv_util.h create mode 100644 software/gsl-1.15/ode-initval2/rk1imp.c create mode 100644 software/gsl-1.15/ode-initval2/rk2.c create mode 100644 software/gsl-1.15/ode-initval2/rk2imp.c create mode 100644 software/gsl-1.15/ode-initval2/rk4.c create mode 100644 software/gsl-1.15/ode-initval2/rk4imp.c create mode 100644 software/gsl-1.15/ode-initval2/rk8pd.c create mode 100644 software/gsl-1.15/ode-initval2/rkck.c create mode 100644 software/gsl-1.15/ode-initval2/rkf45.c create mode 100644 software/gsl-1.15/ode-initval2/rksubs.c create mode 100644 software/gsl-1.15/ode-initval2/step.c create mode 100644 software/gsl-1.15/ode-initval2/step_utils.c create mode 100644 software/gsl-1.15/ode-initval2/test.c create mode 100644 software/gsl-1.15/permutation/.deps/canonical.Plo create mode 100644 software/gsl-1.15/permutation/.deps/file.Plo create mode 100644 software/gsl-1.15/permutation/.deps/init.Plo create mode 100644 software/gsl-1.15/permutation/.deps/inline.Plo create mode 100644 software/gsl-1.15/permutation/.deps/permutation.Plo create mode 100644 software/gsl-1.15/permutation/.deps/permute.Plo create mode 100644 software/gsl-1.15/permutation/.deps/test.Po create mode 100644 software/gsl-1.15/permutation/ChangeLog create mode 100644 software/gsl-1.15/permutation/Makefile.am create mode 100644 software/gsl-1.15/permutation/Makefile.in create mode 100644 software/gsl-1.15/permutation/canonical.c create mode 100644 software/gsl-1.15/permutation/file.c create mode 100644 software/gsl-1.15/permutation/gsl_permutation.h create mode 100644 software/gsl-1.15/permutation/gsl_permute.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_char.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_complex_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_complex_float.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_complex_long_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_float.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_int.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_long.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_long_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_short.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_uchar.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_uint.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_ulong.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_ushort.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_char.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_complex_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_complex_float.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_complex_long_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_float.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_int.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_long.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_long_double.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_short.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_uchar.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_uint.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_ulong.h create mode 100644 software/gsl-1.15/permutation/gsl_permute_vector_ushort.h create mode 100644 software/gsl-1.15/permutation/init.c create mode 100644 software/gsl-1.15/permutation/inline.c create mode 100644 software/gsl-1.15/permutation/permutation.c create mode 100644 software/gsl-1.15/permutation/permute.c create mode 100644 software/gsl-1.15/permutation/permute_source.c create mode 100644 software/gsl-1.15/permutation/test.c create mode 100755 software/gsl-1.15/pkgconfig.test create mode 100644 software/gsl-1.15/poly/.deps/dd.Plo create mode 100644 software/gsl-1.15/poly/.deps/deriv.Plo create mode 100644 software/gsl-1.15/poly/.deps/eval.Plo create mode 100644 software/gsl-1.15/poly/.deps/solve_cubic.Plo create mode 100644 software/gsl-1.15/poly/.deps/solve_quadratic.Plo create mode 100644 software/gsl-1.15/poly/.deps/test.Po create mode 100644 software/gsl-1.15/poly/.deps/zsolve.Plo create mode 100644 software/gsl-1.15/poly/.deps/zsolve_cubic.Plo create mode 100644 software/gsl-1.15/poly/.deps/zsolve_init.Plo create mode 100644 software/gsl-1.15/poly/.deps/zsolve_quadratic.Plo create mode 100644 software/gsl-1.15/poly/ChangeLog create mode 100644 software/gsl-1.15/poly/Makefile.am create mode 100644 software/gsl-1.15/poly/Makefile.in create mode 100644 software/gsl-1.15/poly/TODO create mode 100644 software/gsl-1.15/poly/balance.c create mode 100644 software/gsl-1.15/poly/companion.c create mode 100644 software/gsl-1.15/poly/dd.c create mode 100644 software/gsl-1.15/poly/deriv.c create mode 100644 software/gsl-1.15/poly/eval.c create mode 100644 software/gsl-1.15/poly/gsl_poly.h create mode 100644 software/gsl-1.15/poly/qr.c create mode 100644 software/gsl-1.15/poly/solve_cubic.c create mode 100644 software/gsl-1.15/poly/solve_quadratic.c create mode 100644 software/gsl-1.15/poly/test.c create mode 100644 software/gsl-1.15/poly/zsolve.c create mode 100644 software/gsl-1.15/poly/zsolve_cubic.c create mode 100644 software/gsl-1.15/poly/zsolve_init.c create mode 100644 software/gsl-1.15/poly/zsolve_quadratic.c create mode 100644 software/gsl-1.15/qrng/.deps/halton.Plo create mode 100644 software/gsl-1.15/qrng/.deps/inline.Plo create mode 100644 software/gsl-1.15/qrng/.deps/niederreiter-2.Plo create mode 100644 software/gsl-1.15/qrng/.deps/qrng.Plo create mode 100644 software/gsl-1.15/qrng/.deps/reversehalton.Plo create mode 100644 software/gsl-1.15/qrng/.deps/sobol.Plo create mode 100644 software/gsl-1.15/qrng/.deps/test.Po create mode 100644 software/gsl-1.15/qrng/ChangeLog create mode 100644 software/gsl-1.15/qrng/Makefile.am create mode 100644 software/gsl-1.15/qrng/Makefile.in create mode 100644 software/gsl-1.15/qrng/TODO create mode 100644 software/gsl-1.15/qrng/gsl_qrng.h create mode 100644 software/gsl-1.15/qrng/halton.c create mode 100644 software/gsl-1.15/qrng/inline.c create mode 100644 software/gsl-1.15/qrng/niederreiter-2.c create mode 100644 software/gsl-1.15/qrng/qrng.c create mode 100644 software/gsl-1.15/qrng/reversehalton.c create mode 100644 software/gsl-1.15/qrng/sobol.c create mode 100644 software/gsl-1.15/qrng/test.c create mode 100644 software/gsl-1.15/randist/.deps/bernoulli.Plo create mode 100644 software/gsl-1.15/randist/.deps/beta.Plo create mode 100644 software/gsl-1.15/randist/.deps/bigauss.Plo create mode 100644 software/gsl-1.15/randist/.deps/binomial.Plo create mode 100644 software/gsl-1.15/randist/.deps/binomial_tpe.Plo create mode 100644 software/gsl-1.15/randist/.deps/cauchy.Plo create mode 100644 software/gsl-1.15/randist/.deps/chisq.Plo create mode 100644 software/gsl-1.15/randist/.deps/dirichlet.Plo create mode 100644 software/gsl-1.15/randist/.deps/discrete.Plo create mode 100644 software/gsl-1.15/randist/.deps/erlang.Plo create mode 100644 software/gsl-1.15/randist/.deps/exponential.Plo create mode 100644 software/gsl-1.15/randist/.deps/exppow.Plo create mode 100644 software/gsl-1.15/randist/.deps/fdist.Plo create mode 100644 software/gsl-1.15/randist/.deps/flat.Plo create mode 100644 software/gsl-1.15/randist/.deps/gamma.Plo create mode 100644 software/gsl-1.15/randist/.deps/gauss.Plo create mode 100644 software/gsl-1.15/randist/.deps/gausstail.Plo create mode 100644 software/gsl-1.15/randist/.deps/gausszig.Plo create mode 100644 software/gsl-1.15/randist/.deps/geometric.Plo create mode 100644 software/gsl-1.15/randist/.deps/gumbel.Plo create mode 100644 software/gsl-1.15/randist/.deps/hyperg.Plo create mode 100644 software/gsl-1.15/randist/.deps/landau.Plo create mode 100644 software/gsl-1.15/randist/.deps/laplace.Plo create mode 100644 software/gsl-1.15/randist/.deps/levy.Plo create mode 100644 software/gsl-1.15/randist/.deps/logarithmic.Plo create mode 100644 software/gsl-1.15/randist/.deps/logistic.Plo create mode 100644 software/gsl-1.15/randist/.deps/lognormal.Plo create mode 100644 software/gsl-1.15/randist/.deps/multinomial.Plo create mode 100644 software/gsl-1.15/randist/.deps/nbinomial.Plo create mode 100644 software/gsl-1.15/randist/.deps/pareto.Plo create mode 100644 software/gsl-1.15/randist/.deps/pascal.Plo create mode 100644 software/gsl-1.15/randist/.deps/poisson.Plo create mode 100644 software/gsl-1.15/randist/.deps/rayleigh.Plo create mode 100644 software/gsl-1.15/randist/.deps/shuffle.Plo create mode 100644 software/gsl-1.15/randist/.deps/sphere.Plo create mode 100644 software/gsl-1.15/randist/.deps/tdist.Plo create mode 100644 software/gsl-1.15/randist/.deps/test.Po create mode 100644 software/gsl-1.15/randist/.deps/weibull.Plo create mode 100644 software/gsl-1.15/randist/ChangeLog create mode 100644 software/gsl-1.15/randist/Makefile.am create mode 100644 software/gsl-1.15/randist/Makefile.in create mode 100644 software/gsl-1.15/randist/TODO create mode 100644 software/gsl-1.15/randist/bernoulli.c create mode 100644 software/gsl-1.15/randist/beta.c create mode 100644 software/gsl-1.15/randist/bigauss.c create mode 100644 software/gsl-1.15/randist/binomial.c create mode 100644 software/gsl-1.15/randist/binomial_tpe.c create mode 100644 software/gsl-1.15/randist/cauchy.c create mode 100644 software/gsl-1.15/randist/chisq.c create mode 100644 software/gsl-1.15/randist/dirichlet.c create mode 100644 software/gsl-1.15/randist/discrete.c create mode 100644 software/gsl-1.15/randist/erlang.c create mode 100644 software/gsl-1.15/randist/exponential.c create mode 100644 software/gsl-1.15/randist/exppow.c create mode 100644 software/gsl-1.15/randist/fdist.c create mode 100644 software/gsl-1.15/randist/flat.c create mode 100644 software/gsl-1.15/randist/gamma.c create mode 100644 software/gsl-1.15/randist/gauss.c create mode 100644 software/gsl-1.15/randist/gausstail.c create mode 100644 software/gsl-1.15/randist/gausszig.c create mode 100644 software/gsl-1.15/randist/geometric.c create mode 100644 software/gsl-1.15/randist/gsl_randist.h create mode 100644 software/gsl-1.15/randist/gumbel.c create mode 100644 software/gsl-1.15/randist/hyperg.c create mode 100644 software/gsl-1.15/randist/landau.c create mode 100644 software/gsl-1.15/randist/laplace.c create mode 100644 software/gsl-1.15/randist/levy.c create mode 100644 software/gsl-1.15/randist/logarithmic.c create mode 100644 software/gsl-1.15/randist/logistic.c create mode 100644 software/gsl-1.15/randist/lognormal.c create mode 100644 software/gsl-1.15/randist/multinomial.c create mode 100644 software/gsl-1.15/randist/nbinomial.c create mode 100644 software/gsl-1.15/randist/pareto.c create mode 100644 software/gsl-1.15/randist/pascal.c create mode 100644 software/gsl-1.15/randist/poisson.c create mode 100644 software/gsl-1.15/randist/rayleigh.c create mode 100644 software/gsl-1.15/randist/shuffle.c create mode 100644 software/gsl-1.15/randist/sphere.c create mode 100644 software/gsl-1.15/randist/tdist.c create mode 100644 software/gsl-1.15/randist/test.c create mode 100644 software/gsl-1.15/randist/weibull.c create mode 100644 software/gsl-1.15/rng/.deps/borosh13.Plo create mode 100644 software/gsl-1.15/rng/.deps/cmrg.Plo create mode 100644 software/gsl-1.15/rng/.deps/coveyou.Plo create mode 100644 software/gsl-1.15/rng/.deps/default.Plo create mode 100644 software/gsl-1.15/rng/.deps/file.Plo create mode 100644 software/gsl-1.15/rng/.deps/fishman18.Plo create mode 100644 software/gsl-1.15/rng/.deps/fishman20.Plo create mode 100644 software/gsl-1.15/rng/.deps/fishman2x.Plo create mode 100644 software/gsl-1.15/rng/.deps/gfsr4.Plo create mode 100644 software/gsl-1.15/rng/.deps/inline.Plo create mode 100644 software/gsl-1.15/rng/.deps/knuthran.Plo create mode 100644 software/gsl-1.15/rng/.deps/knuthran2.Plo create mode 100644 software/gsl-1.15/rng/.deps/knuthran2002.Plo create mode 100644 software/gsl-1.15/rng/.deps/lecuyer21.Plo create mode 100644 software/gsl-1.15/rng/.deps/minstd.Plo create mode 100644 software/gsl-1.15/rng/.deps/mrg.Plo create mode 100644 software/gsl-1.15/rng/.deps/mt.Plo create mode 100644 software/gsl-1.15/rng/.deps/r250.Plo create mode 100644 software/gsl-1.15/rng/.deps/ran0.Plo create mode 100644 software/gsl-1.15/rng/.deps/ran1.Plo create mode 100644 software/gsl-1.15/rng/.deps/ran2.Plo create mode 100644 software/gsl-1.15/rng/.deps/ran3.Plo create mode 100644 software/gsl-1.15/rng/.deps/rand.Plo create mode 100644 software/gsl-1.15/rng/.deps/rand48.Plo create mode 100644 software/gsl-1.15/rng/.deps/random.Plo create mode 100644 software/gsl-1.15/rng/.deps/randu.Plo create mode 100644 software/gsl-1.15/rng/.deps/ranf.Plo create mode 100644 software/gsl-1.15/rng/.deps/ranlux.Plo create mode 100644 software/gsl-1.15/rng/.deps/ranlxd.Plo create mode 100644 software/gsl-1.15/rng/.deps/ranlxs.Plo create mode 100644 software/gsl-1.15/rng/.deps/ranmar.Plo create mode 100644 software/gsl-1.15/rng/.deps/rng.Plo create mode 100644 software/gsl-1.15/rng/.deps/slatec.Plo create mode 100644 software/gsl-1.15/rng/.deps/taus.Plo create mode 100644 software/gsl-1.15/rng/.deps/taus113.Plo create mode 100644 software/gsl-1.15/rng/.deps/test.Po create mode 100644 software/gsl-1.15/rng/.deps/transputer.Plo create mode 100644 software/gsl-1.15/rng/.deps/tt.Plo create mode 100644 software/gsl-1.15/rng/.deps/types.Plo create mode 100644 software/gsl-1.15/rng/.deps/uni.Plo create mode 100644 software/gsl-1.15/rng/.deps/uni32.Plo create mode 100644 software/gsl-1.15/rng/.deps/vax.Plo create mode 100644 software/gsl-1.15/rng/.deps/waterman14.Plo create mode 100644 software/gsl-1.15/rng/.deps/zuf.Plo create mode 100644 software/gsl-1.15/rng/ChangeLog create mode 100644 software/gsl-1.15/rng/Makefile.am create mode 100644 software/gsl-1.15/rng/Makefile.in create mode 100644 software/gsl-1.15/rng/TODO create mode 100644 software/gsl-1.15/rng/borosh13.c create mode 100644 software/gsl-1.15/rng/cmrg.c create mode 100644 software/gsl-1.15/rng/coveyou.c create mode 100644 software/gsl-1.15/rng/default.c create mode 100644 software/gsl-1.15/rng/file.c create mode 100644 software/gsl-1.15/rng/fishman18.c create mode 100644 software/gsl-1.15/rng/fishman20.c create mode 100644 software/gsl-1.15/rng/fishman2x.c create mode 100644 software/gsl-1.15/rng/gfsr4.c create mode 100644 software/gsl-1.15/rng/gsl_rng.h create mode 100644 software/gsl-1.15/rng/inline.c create mode 100644 software/gsl-1.15/rng/knuthran.c create mode 100644 software/gsl-1.15/rng/knuthran2.c create mode 100644 software/gsl-1.15/rng/knuthran2002.c create mode 100644 software/gsl-1.15/rng/lecuyer21.c create mode 100644 software/gsl-1.15/rng/minstd.c create mode 100644 software/gsl-1.15/rng/mrg.c create mode 100644 software/gsl-1.15/rng/mt.c create mode 100644 software/gsl-1.15/rng/r250.c create mode 100644 software/gsl-1.15/rng/ran0.c create mode 100644 software/gsl-1.15/rng/ran1.c create mode 100644 software/gsl-1.15/rng/ran2.c create mode 100644 software/gsl-1.15/rng/ran3.c create mode 100644 software/gsl-1.15/rng/rand.c create mode 100644 software/gsl-1.15/rng/rand48.c create mode 100644 software/gsl-1.15/rng/random.c create mode 100644 software/gsl-1.15/rng/randu.c create mode 100644 software/gsl-1.15/rng/ranf.c create mode 100644 software/gsl-1.15/rng/ranlux.c create mode 100644 software/gsl-1.15/rng/ranlxd.c create mode 100644 software/gsl-1.15/rng/ranlxs.c create mode 100644 software/gsl-1.15/rng/ranmar.c create mode 100644 software/gsl-1.15/rng/rng.c create mode 100644 software/gsl-1.15/rng/schrage.c create mode 100644 software/gsl-1.15/rng/slatec.c create mode 100644 software/gsl-1.15/rng/taus.c create mode 100644 software/gsl-1.15/rng/taus113.c create mode 100644 software/gsl-1.15/rng/test.c create mode 100644 software/gsl-1.15/rng/transputer.c create mode 100644 software/gsl-1.15/rng/tt.c create mode 100644 software/gsl-1.15/rng/types.c create mode 100644 software/gsl-1.15/rng/uni.c create mode 100644 software/gsl-1.15/rng/uni32.c create mode 100644 software/gsl-1.15/rng/vax.c create mode 100644 software/gsl-1.15/rng/waterman14.c create mode 100644 software/gsl-1.15/rng/zuf.c create mode 100644 software/gsl-1.15/roots/.deps/bisection.Plo create mode 100644 software/gsl-1.15/roots/.deps/brent.Plo create mode 100644 software/gsl-1.15/roots/.deps/convergence.Plo create mode 100644 software/gsl-1.15/roots/.deps/falsepos.Plo create mode 100644 software/gsl-1.15/roots/.deps/fdfsolver.Plo create mode 100644 software/gsl-1.15/roots/.deps/fsolver.Plo create mode 100644 software/gsl-1.15/roots/.deps/newton.Plo create mode 100644 software/gsl-1.15/roots/.deps/secant.Plo create mode 100644 software/gsl-1.15/roots/.deps/steffenson.Plo create mode 100644 software/gsl-1.15/roots/.deps/test.Po create mode 100644 software/gsl-1.15/roots/.deps/test_funcs.Po create mode 100644 software/gsl-1.15/roots/ChangeLog create mode 100644 software/gsl-1.15/roots/Makefile.am create mode 100644 software/gsl-1.15/roots/Makefile.in create mode 100644 software/gsl-1.15/roots/TODO create mode 100644 software/gsl-1.15/roots/bisection.c create mode 100644 software/gsl-1.15/roots/brent.c create mode 100644 software/gsl-1.15/roots/convergence.c create mode 100644 software/gsl-1.15/roots/falsepos.c create mode 100644 software/gsl-1.15/roots/fdfsolver.c create mode 100644 software/gsl-1.15/roots/fsolver.c create mode 100644 software/gsl-1.15/roots/gsl_roots.h create mode 100644 software/gsl-1.15/roots/newton.c create mode 100644 software/gsl-1.15/roots/roots.h create mode 100644 software/gsl-1.15/roots/secant.c create mode 100644 software/gsl-1.15/roots/steffenson.c create mode 100644 software/gsl-1.15/roots/test.c create mode 100644 software/gsl-1.15/roots/test.h create mode 100644 software/gsl-1.15/roots/test_funcs.c create mode 100644 software/gsl-1.15/siman/.deps/siman.Plo create mode 100644 software/gsl-1.15/siman/.deps/siman_tsp.Po create mode 100644 software/gsl-1.15/siman/.deps/test.Po create mode 100644 software/gsl-1.15/siman/ChangeLog create mode 100644 software/gsl-1.15/siman/Makefile.am create mode 100644 software/gsl-1.15/siman/Makefile.in create mode 100644 software/gsl-1.15/siman/TODO create mode 100644 software/gsl-1.15/siman/gsl_siman.h create mode 100644 software/gsl-1.15/siman/siman.c create mode 100755 software/gsl-1.15/siman/siman_test_driver.sh create mode 100644 software/gsl-1.15/siman/siman_tsp.c create mode 100644 software/gsl-1.15/siman/test.c create mode 100644 software/gsl-1.15/sort/.deps/sort.Plo create mode 100644 software/gsl-1.15/sort/.deps/sortind.Plo create mode 100644 software/gsl-1.15/sort/.deps/sortvec.Plo create mode 100644 software/gsl-1.15/sort/.deps/sortvecind.Plo create mode 100644 software/gsl-1.15/sort/.deps/subset.Plo create mode 100644 software/gsl-1.15/sort/.deps/subsetind.Plo create mode 100644 software/gsl-1.15/sort/.deps/test.Po create mode 100644 software/gsl-1.15/sort/ChangeLog create mode 100644 software/gsl-1.15/sort/Makefile.am create mode 100644 software/gsl-1.15/sort/Makefile.in create mode 100644 software/gsl-1.15/sort/TODO create mode 100644 software/gsl-1.15/sort/gsl_heapsort.h create mode 100644 software/gsl-1.15/sort/gsl_sort.h create mode 100644 software/gsl-1.15/sort/gsl_sort_char.h create mode 100644 software/gsl-1.15/sort/gsl_sort_double.h create mode 100644 software/gsl-1.15/sort/gsl_sort_float.h create mode 100644 software/gsl-1.15/sort/gsl_sort_int.h create mode 100644 software/gsl-1.15/sort/gsl_sort_long.h create mode 100644 software/gsl-1.15/sort/gsl_sort_long_double.h create mode 100644 software/gsl-1.15/sort/gsl_sort_short.h create mode 100644 software/gsl-1.15/sort/gsl_sort_uchar.h create mode 100644 software/gsl-1.15/sort/gsl_sort_uint.h create mode 100644 software/gsl-1.15/sort/gsl_sort_ulong.h create mode 100644 software/gsl-1.15/sort/gsl_sort_ushort.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_char.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_double.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_float.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_int.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_long.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_long_double.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_short.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_uchar.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_uint.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_ulong.h create mode 100644 software/gsl-1.15/sort/gsl_sort_vector_ushort.h create mode 100644 software/gsl-1.15/sort/sort.c create mode 100644 software/gsl-1.15/sort/sortind.c create mode 100644 software/gsl-1.15/sort/sortvec.c create mode 100644 software/gsl-1.15/sort/sortvec_source.c create mode 100644 software/gsl-1.15/sort/sortvecind.c create mode 100644 software/gsl-1.15/sort/sortvecind_source.c create mode 100644 software/gsl-1.15/sort/subset.c create mode 100644 software/gsl-1.15/sort/subset_source.c create mode 100644 software/gsl-1.15/sort/subsetind.c create mode 100644 software/gsl-1.15/sort/subsetind_source.c create mode 100644 software/gsl-1.15/sort/test.c create mode 100644 software/gsl-1.15/sort/test_heapsort.c create mode 100644 software/gsl-1.15/sort/test_source.c create mode 100644 software/gsl-1.15/specfunc/.deps/airy.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/airy_der.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/airy_zero.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/atanint.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_I0.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_I1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_In.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Inu.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_J0.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_J1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Jn.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Jnu.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_K0.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_K1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Kn.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Knu.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Y0.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Y1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Yn.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_Ynu.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_amp_phase.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_i.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_j.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_k.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_olver.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_sequence.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_temme.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_y.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/bessel_zero.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/beta.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/beta_inc.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/clausen.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/coulomb.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/coulomb_bound.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/coupling.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/dawson.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/debye.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/dilog.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/elementary.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/ellint.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/elljac.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/erfc.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/exp.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/expint.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/expint3.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/fermi_dirac.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/gamma.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/gamma_inc.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/gegenbauer.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg_0F1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg_1F1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg_2F0.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg_2F1.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/hyperg_U.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/laguerre.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/lambert.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/legendre_H3d.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/legendre_Qn.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/legendre_con.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/legendre_poly.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/log.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/mathieu_angfunc.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/mathieu_charv.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/mathieu_coeff.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/mathieu_radfunc.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/mathieu_workspace.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/poch.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/pow_int.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/psi.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/result.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/shint.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/sinint.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/synchrotron.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/test_airy.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_bessel.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_coulomb.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_dilog.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_gamma.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_hyperg.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_legendre.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_mathieu.Po create mode 100644 software/gsl-1.15/specfunc/.deps/test_sf.Po create mode 100644 software/gsl-1.15/specfunc/.deps/transport.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/trig.Plo create mode 100644 software/gsl-1.15/specfunc/.deps/zeta.Plo create mode 100644 software/gsl-1.15/specfunc/ChangeLog create mode 100644 software/gsl-1.15/specfunc/Makefile.am create mode 100644 software/gsl-1.15/specfunc/Makefile.in create mode 100644 software/gsl-1.15/specfunc/TODO create mode 100644 software/gsl-1.15/specfunc/airy.c create mode 100644 software/gsl-1.15/specfunc/airy_der.c create mode 100644 software/gsl-1.15/specfunc/airy_zero.c create mode 100644 software/gsl-1.15/specfunc/atanint.c create mode 100644 software/gsl-1.15/specfunc/bessel.c create mode 100644 software/gsl-1.15/specfunc/bessel.h create mode 100644 software/gsl-1.15/specfunc/bessel_I0.c create mode 100644 software/gsl-1.15/specfunc/bessel_I1.c create mode 100644 software/gsl-1.15/specfunc/bessel_In.c create mode 100644 software/gsl-1.15/specfunc/bessel_Inu.c create mode 100644 software/gsl-1.15/specfunc/bessel_J0.c create mode 100644 software/gsl-1.15/specfunc/bessel_J1.c create mode 100644 software/gsl-1.15/specfunc/bessel_Jn.c create mode 100644 software/gsl-1.15/specfunc/bessel_Jnu.c create mode 100644 software/gsl-1.15/specfunc/bessel_K0.c create mode 100644 software/gsl-1.15/specfunc/bessel_K1.c create mode 100644 software/gsl-1.15/specfunc/bessel_Kn.c create mode 100644 software/gsl-1.15/specfunc/bessel_Knu.c create mode 100644 software/gsl-1.15/specfunc/bessel_Y0.c create mode 100644 software/gsl-1.15/specfunc/bessel_Y1.c create mode 100644 software/gsl-1.15/specfunc/bessel_Yn.c create mode 100644 software/gsl-1.15/specfunc/bessel_Ynu.c create mode 100644 software/gsl-1.15/specfunc/bessel_amp_phase.c create mode 100644 software/gsl-1.15/specfunc/bessel_amp_phase.h create mode 100644 software/gsl-1.15/specfunc/bessel_i.c create mode 100644 software/gsl-1.15/specfunc/bessel_j.c create mode 100644 software/gsl-1.15/specfunc/bessel_k.c create mode 100644 software/gsl-1.15/specfunc/bessel_olver.c create mode 100644 software/gsl-1.15/specfunc/bessel_olver.h create mode 100644 software/gsl-1.15/specfunc/bessel_sequence.c create mode 100644 software/gsl-1.15/specfunc/bessel_temme.c create mode 100644 software/gsl-1.15/specfunc/bessel_temme.h create mode 100644 software/gsl-1.15/specfunc/bessel_y.c create mode 100644 software/gsl-1.15/specfunc/bessel_zero.c create mode 100644 software/gsl-1.15/specfunc/beta.c create mode 100644 software/gsl-1.15/specfunc/beta_inc.c create mode 100644 software/gsl-1.15/specfunc/cheb_eval.c create mode 100644 software/gsl-1.15/specfunc/cheb_eval_mode.c create mode 100644 software/gsl-1.15/specfunc/chebyshev.h create mode 100644 software/gsl-1.15/specfunc/check.h create mode 100644 software/gsl-1.15/specfunc/clausen.c create mode 100644 software/gsl-1.15/specfunc/coulomb.c create mode 100644 software/gsl-1.15/specfunc/coulomb_bound.c create mode 100644 software/gsl-1.15/specfunc/coupling.c create mode 100644 software/gsl-1.15/specfunc/dawson.c create mode 100644 software/gsl-1.15/specfunc/debye.c create mode 100644 software/gsl-1.15/specfunc/dilog.c create mode 100644 software/gsl-1.15/specfunc/elementary.c create mode 100644 software/gsl-1.15/specfunc/ellint.c create mode 100644 software/gsl-1.15/specfunc/elljac.c create mode 100644 software/gsl-1.15/specfunc/erfc.c create mode 100644 software/gsl-1.15/specfunc/error.h create mode 100644 software/gsl-1.15/specfunc/eval.h create mode 100644 software/gsl-1.15/specfunc/exp.c create mode 100644 software/gsl-1.15/specfunc/expint.c create mode 100644 software/gsl-1.15/specfunc/expint3.c create mode 100644 software/gsl-1.15/specfunc/fermi_dirac.c create mode 100644 software/gsl-1.15/specfunc/gamma.c create mode 100644 software/gsl-1.15/specfunc/gamma_inc.c create mode 100644 software/gsl-1.15/specfunc/gegenbauer.c create mode 100644 software/gsl-1.15/specfunc/gsl_sf.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_airy.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_bessel.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_clausen.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_coulomb.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_coupling.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_dawson.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_debye.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_dilog.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_elementary.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_ellint.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_elljac.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_erf.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_exp.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_expint.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_fermi_dirac.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_gamma.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_gegenbauer.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_hyperg.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_laguerre.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_lambert.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_legendre.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_log.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_mathieu.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_pow_int.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_psi.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_result.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_synchrotron.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_transport.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_trig.h create mode 100644 software/gsl-1.15/specfunc/gsl_sf_zeta.h create mode 100644 software/gsl-1.15/specfunc/gsl_specfunc.h create mode 100644 software/gsl-1.15/specfunc/hyperg.c create mode 100644 software/gsl-1.15/specfunc/hyperg.h create mode 100644 software/gsl-1.15/specfunc/hyperg_0F1.c create mode 100644 software/gsl-1.15/specfunc/hyperg_1F1.c create mode 100644 software/gsl-1.15/specfunc/hyperg_2F0.c create mode 100644 software/gsl-1.15/specfunc/hyperg_2F1.c create mode 100644 software/gsl-1.15/specfunc/hyperg_U.c create mode 100644 software/gsl-1.15/specfunc/laguerre.c create mode 100644 software/gsl-1.15/specfunc/lambert.c create mode 100644 software/gsl-1.15/specfunc/legendre.h create mode 100644 software/gsl-1.15/specfunc/legendre_H3d.c create mode 100644 software/gsl-1.15/specfunc/legendre_Qn.c create mode 100644 software/gsl-1.15/specfunc/legendre_con.c create mode 100644 software/gsl-1.15/specfunc/legendre_poly.c create mode 100644 software/gsl-1.15/specfunc/log.c create mode 100644 software/gsl-1.15/specfunc/mathieu_angfunc.c create mode 100644 software/gsl-1.15/specfunc/mathieu_charv.c create mode 100644 software/gsl-1.15/specfunc/mathieu_coeff.c create mode 100644 software/gsl-1.15/specfunc/mathieu_radfunc.c create mode 100644 software/gsl-1.15/specfunc/mathieu_workspace.c create mode 100644 software/gsl-1.15/specfunc/poch.c create mode 100644 software/gsl-1.15/specfunc/pow_int.c create mode 100644 software/gsl-1.15/specfunc/psi.c create mode 100644 software/gsl-1.15/specfunc/recurse.h create mode 100644 software/gsl-1.15/specfunc/result.c create mode 100644 software/gsl-1.15/specfunc/shint.c create mode 100644 software/gsl-1.15/specfunc/sinint.c create mode 100644 software/gsl-1.15/specfunc/synchrotron.c create mode 100644 software/gsl-1.15/specfunc/test_airy.c create mode 100644 software/gsl-1.15/specfunc/test_bessel.c create mode 100644 software/gsl-1.15/specfunc/test_coulomb.c create mode 100644 software/gsl-1.15/specfunc/test_dilog.c create mode 100644 software/gsl-1.15/specfunc/test_gamma.c create mode 100644 software/gsl-1.15/specfunc/test_hyperg.c create mode 100644 software/gsl-1.15/specfunc/test_legendre.c create mode 100644 software/gsl-1.15/specfunc/test_mathieu.c create mode 100644 software/gsl-1.15/specfunc/test_sf.c create mode 100644 software/gsl-1.15/specfunc/test_sf.h create mode 100644 software/gsl-1.15/specfunc/transport.c create mode 100644 software/gsl-1.15/specfunc/trig.c create mode 100644 software/gsl-1.15/specfunc/zeta.c create mode 100644 software/gsl-1.15/stamp-h1 create mode 100644 software/gsl-1.15/statistics/.deps/absdev.Plo create mode 100644 software/gsl-1.15/statistics/.deps/covariance.Plo create mode 100644 software/gsl-1.15/statistics/.deps/kurtosis.Plo create mode 100644 software/gsl-1.15/statistics/.deps/lag1.Plo create mode 100644 software/gsl-1.15/statistics/.deps/mean.Plo create mode 100644 software/gsl-1.15/statistics/.deps/median.Plo create mode 100644 software/gsl-1.15/statistics/.deps/minmax.Plo create mode 100644 software/gsl-1.15/statistics/.deps/p_variance.Plo create mode 100644 software/gsl-1.15/statistics/.deps/quantiles.Plo create mode 100644 software/gsl-1.15/statistics/.deps/skew.Plo create mode 100644 software/gsl-1.15/statistics/.deps/test.Po create mode 100644 software/gsl-1.15/statistics/.deps/test_nist.Po create mode 100644 software/gsl-1.15/statistics/.deps/ttest.Plo create mode 100644 software/gsl-1.15/statistics/.deps/variance.Plo create mode 100644 software/gsl-1.15/statistics/.deps/wabsdev.Plo create mode 100644 software/gsl-1.15/statistics/.deps/wkurtosis.Plo create mode 100644 software/gsl-1.15/statistics/.deps/wmean.Plo create mode 100644 software/gsl-1.15/statistics/.deps/wskew.Plo create mode 100644 software/gsl-1.15/statistics/.deps/wvariance.Plo create mode 100644 software/gsl-1.15/statistics/ChangeLog create mode 100644 software/gsl-1.15/statistics/Makefile.am create mode 100644 software/gsl-1.15/statistics/Makefile.in create mode 100644 software/gsl-1.15/statistics/TODO create mode 100644 software/gsl-1.15/statistics/absdev.c create mode 100644 software/gsl-1.15/statistics/absdev_source.c create mode 100644 software/gsl-1.15/statistics/covariance.c create mode 100644 software/gsl-1.15/statistics/covariance_source.c create mode 100644 software/gsl-1.15/statistics/gsl_statistics.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_char.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_double.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_float.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_int.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_long.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_long_double.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_short.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_uchar.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_uint.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_ulong.h create mode 100644 software/gsl-1.15/statistics/gsl_statistics_ushort.h create mode 100644 software/gsl-1.15/statistics/kurtosis.c create mode 100644 software/gsl-1.15/statistics/kurtosis_source.c create mode 100644 software/gsl-1.15/statistics/lag1.c create mode 100644 software/gsl-1.15/statistics/lag1_source.c create mode 100644 software/gsl-1.15/statistics/mean.c create mode 100644 software/gsl-1.15/statistics/mean_source.c create mode 100644 software/gsl-1.15/statistics/median.c create mode 100644 software/gsl-1.15/statistics/median_source.c create mode 100644 software/gsl-1.15/statistics/minmax.c create mode 100644 software/gsl-1.15/statistics/minmax_source.c create mode 100644 software/gsl-1.15/statistics/p_variance.c create mode 100644 software/gsl-1.15/statistics/p_variance_source.c create mode 100644 software/gsl-1.15/statistics/quantiles.c create mode 100644 software/gsl-1.15/statistics/quantiles_source.c create mode 100644 software/gsl-1.15/statistics/skew.c create mode 100644 software/gsl-1.15/statistics/skew_source.c create mode 100644 software/gsl-1.15/statistics/test.c create mode 100644 software/gsl-1.15/statistics/test_float_source.c create mode 100644 software/gsl-1.15/statistics/test_int_source.c create mode 100644 software/gsl-1.15/statistics/test_nist.c create mode 100644 software/gsl-1.15/statistics/ttest.c create mode 100644 software/gsl-1.15/statistics/ttest_source.c create mode 100644 software/gsl-1.15/statistics/variance.c create mode 100644 software/gsl-1.15/statistics/variance_source.c create mode 100644 software/gsl-1.15/statistics/wabsdev.c create mode 100644 software/gsl-1.15/statistics/wabsdev_source.c create mode 100644 software/gsl-1.15/statistics/wkurtosis.c create mode 100644 software/gsl-1.15/statistics/wkurtosis_source.c create mode 100644 software/gsl-1.15/statistics/wmean.c create mode 100644 software/gsl-1.15/statistics/wmean_source.c create mode 100644 software/gsl-1.15/statistics/wskew.c create mode 100644 software/gsl-1.15/statistics/wskew_source.c create mode 100644 software/gsl-1.15/statistics/wvariance.c create mode 100644 software/gsl-1.15/statistics/wvariance_source.c create mode 100644 software/gsl-1.15/sum/.deps/levin_u.Plo create mode 100644 software/gsl-1.15/sum/.deps/levin_utrunc.Plo create mode 100644 software/gsl-1.15/sum/.deps/test.Po create mode 100644 software/gsl-1.15/sum/.deps/work_u.Plo create mode 100644 software/gsl-1.15/sum/.deps/work_utrunc.Plo create mode 100644 software/gsl-1.15/sum/ChangeLog create mode 100644 software/gsl-1.15/sum/Makefile.am create mode 100644 software/gsl-1.15/sum/Makefile.in create mode 100644 software/gsl-1.15/sum/gsl_sum.h create mode 100644 software/gsl-1.15/sum/levin_u.c create mode 100644 software/gsl-1.15/sum/levin_utrunc.c create mode 100644 software/gsl-1.15/sum/test.c create mode 100644 software/gsl-1.15/sum/work_u.c create mode 100644 software/gsl-1.15/sum/work_utrunc.c create mode 100644 software/gsl-1.15/sys/.deps/coerce.Plo create mode 100644 software/gsl-1.15/sys/.deps/expm1.Plo create mode 100644 software/gsl-1.15/sys/.deps/fcmp.Plo create mode 100644 software/gsl-1.15/sys/.deps/fdiv.Plo create mode 100644 software/gsl-1.15/sys/.deps/hypot.Plo create mode 100644 software/gsl-1.15/sys/.deps/infnan.Plo create mode 100644 software/gsl-1.15/sys/.deps/invhyp.Plo create mode 100644 software/gsl-1.15/sys/.deps/ldfrexp.Plo create mode 100644 software/gsl-1.15/sys/.deps/log1p.Plo create mode 100644 software/gsl-1.15/sys/.deps/minmax.Plo create mode 100644 software/gsl-1.15/sys/.deps/pow_int.Plo create mode 100644 software/gsl-1.15/sys/.deps/prec.Plo create mode 100644 software/gsl-1.15/sys/.deps/test.Po create mode 100644 software/gsl-1.15/sys/ChangeLog create mode 100644 software/gsl-1.15/sys/Makefile.am create mode 100644 software/gsl-1.15/sys/Makefile.in create mode 100644 software/gsl-1.15/sys/coerce.c create mode 100644 software/gsl-1.15/sys/expm1.c create mode 100644 software/gsl-1.15/sys/fcmp.c create mode 100644 software/gsl-1.15/sys/fdiv.c create mode 100644 software/gsl-1.15/sys/gsl_sys.h create mode 100644 software/gsl-1.15/sys/hypot.c create mode 100644 software/gsl-1.15/sys/infnan.c create mode 100644 software/gsl-1.15/sys/invhyp.c create mode 100644 software/gsl-1.15/sys/ldfrexp.c create mode 100644 software/gsl-1.15/sys/log1p.c create mode 100644 software/gsl-1.15/sys/minmax.c create mode 100644 software/gsl-1.15/sys/pow_int.c create mode 100644 software/gsl-1.15/sys/prec.c create mode 100644 software/gsl-1.15/sys/test.c create mode 100644 software/gsl-1.15/templates_off.h create mode 100644 software/gsl-1.15/templates_on.h create mode 100644 software/gsl-1.15/test/.deps/results.Plo create mode 100644 software/gsl-1.15/test/ChangeLog create mode 100644 software/gsl-1.15/test/Makefile.am create mode 100644 software/gsl-1.15/test/Makefile.in create mode 100644 software/gsl-1.15/test/gsl_test.h create mode 100644 software/gsl-1.15/test/results.c create mode 100755 software/gsl-1.15/test_gsl_histogram.sh create mode 100644 software/gsl-1.15/testfile create mode 100644 software/gsl-1.15/utils/.deps/memcpy.Po create mode 100644 software/gsl-1.15/utils/.deps/memmove.Po create mode 100644 software/gsl-1.15/utils/.deps/placeholder.Plo create mode 100644 software/gsl-1.15/utils/.deps/strdup.Po create mode 100644 software/gsl-1.15/utils/.deps/strtol.Po create mode 100644 software/gsl-1.15/utils/.deps/strtoul.Po create mode 100644 software/gsl-1.15/utils/Makefile.am create mode 100644 software/gsl-1.15/utils/Makefile.in create mode 100644 software/gsl-1.15/utils/README create mode 100644 software/gsl-1.15/utils/memcpy.c create mode 100644 software/gsl-1.15/utils/memmove.c create mode 100644 software/gsl-1.15/utils/placeholder.c create mode 100644 software/gsl-1.15/utils/strdup.c create mode 100644 software/gsl-1.15/utils/strtol.c create mode 100644 software/gsl-1.15/utils/strtoul.c create mode 100644 software/gsl-1.15/utils/system.h create mode 100644 software/gsl-1.15/vector/.deps/copy.Plo create mode 100644 software/gsl-1.15/vector/.deps/file.Plo create mode 100644 software/gsl-1.15/vector/.deps/init.Plo create mode 100644 software/gsl-1.15/vector/.deps/minmax.Plo create mode 100644 software/gsl-1.15/vector/.deps/oper.Plo create mode 100644 software/gsl-1.15/vector/.deps/prop.Plo create mode 100644 software/gsl-1.15/vector/.deps/reim.Plo create mode 100644 software/gsl-1.15/vector/.deps/subvector.Plo create mode 100644 software/gsl-1.15/vector/.deps/swap.Plo create mode 100644 software/gsl-1.15/vector/.deps/test.Po create mode 100644 software/gsl-1.15/vector/.deps/test_static.Po create mode 100644 software/gsl-1.15/vector/.deps/vector.Plo create mode 100644 software/gsl-1.15/vector/.deps/view.Plo create mode 100644 software/gsl-1.15/vector/ChangeLog create mode 100644 software/gsl-1.15/vector/Makefile.am create mode 100644 software/gsl-1.15/vector/Makefile.in create mode 100644 software/gsl-1.15/vector/TODO create mode 100644 software/gsl-1.15/vector/copy.c create mode 100644 software/gsl-1.15/vector/copy_source.c create mode 100644 software/gsl-1.15/vector/file.c create mode 100644 software/gsl-1.15/vector/file_source.c create mode 100644 software/gsl-1.15/vector/gsl_vector.h create mode 100644 software/gsl-1.15/vector/gsl_vector_char.h create mode 100644 software/gsl-1.15/vector/gsl_vector_complex.h create mode 100644 software/gsl-1.15/vector/gsl_vector_complex_double.h create mode 100644 software/gsl-1.15/vector/gsl_vector_complex_float.h create mode 100644 software/gsl-1.15/vector/gsl_vector_complex_long_double.h create mode 100644 software/gsl-1.15/vector/gsl_vector_double.h create mode 100644 software/gsl-1.15/vector/gsl_vector_float.h create mode 100644 software/gsl-1.15/vector/gsl_vector_int.h create mode 100644 software/gsl-1.15/vector/gsl_vector_long.h create mode 100644 software/gsl-1.15/vector/gsl_vector_long_double.h create mode 100644 software/gsl-1.15/vector/gsl_vector_short.h create mode 100644 software/gsl-1.15/vector/gsl_vector_uchar.h create mode 100644 software/gsl-1.15/vector/gsl_vector_uint.h create mode 100644 software/gsl-1.15/vector/gsl_vector_ulong.h create mode 100644 software/gsl-1.15/vector/gsl_vector_ushort.h create mode 100644 software/gsl-1.15/vector/init.c create mode 100644 software/gsl-1.15/vector/init_source.c create mode 100644 software/gsl-1.15/vector/minmax.c create mode 100644 software/gsl-1.15/vector/minmax_source.c create mode 100644 software/gsl-1.15/vector/oper.c create mode 100644 software/gsl-1.15/vector/oper_complex_source.c create mode 100644 software/gsl-1.15/vector/oper_source.c create mode 100644 software/gsl-1.15/vector/prop.c create mode 100644 software/gsl-1.15/vector/prop_source.c create mode 100644 software/gsl-1.15/vector/reim.c create mode 100644 software/gsl-1.15/vector/reim_source.c create mode 100644 software/gsl-1.15/vector/subvector.c create mode 100644 software/gsl-1.15/vector/subvector_source.c create mode 100644 software/gsl-1.15/vector/swap.c create mode 100644 software/gsl-1.15/vector/swap_source.c create mode 100644 software/gsl-1.15/vector/test.c create mode 100644 software/gsl-1.15/vector/test_complex_source.c create mode 100644 software/gsl-1.15/vector/test_source.c create mode 100644 software/gsl-1.15/vector/test_static.c create mode 100644 software/gsl-1.15/vector/vector.c create mode 100644 software/gsl-1.15/vector/view.c create mode 100644 software/gsl-1.15/vector/view.h create mode 100644 software/gsl-1.15/vector/view_source.c create mode 100644 software/gsl-1.15/version.c create mode 100644 software/gsl-1.15/wavelet/.deps/bspline.Plo create mode 100644 software/gsl-1.15/wavelet/.deps/daubechies.Plo create mode 100644 software/gsl-1.15/wavelet/.deps/dwt.Plo create mode 100644 software/gsl-1.15/wavelet/.deps/haar.Plo create mode 100644 software/gsl-1.15/wavelet/.deps/test.Po create mode 100644 software/gsl-1.15/wavelet/.deps/wavelet.Plo create mode 100644 software/gsl-1.15/wavelet/ChangeLog create mode 100644 software/gsl-1.15/wavelet/Makefile.am create mode 100644 software/gsl-1.15/wavelet/Makefile.in create mode 100644 software/gsl-1.15/wavelet/TODO create mode 100644 software/gsl-1.15/wavelet/bspline.c create mode 100644 software/gsl-1.15/wavelet/daubechies.c create mode 100644 software/gsl-1.15/wavelet/dwt.c create mode 100644 software/gsl-1.15/wavelet/gsl_wavelet.h create mode 100644 software/gsl-1.15/wavelet/gsl_wavelet2d.h create mode 100644 software/gsl-1.15/wavelet/haar.c create mode 100644 software/gsl-1.15/wavelet/test.c create mode 100644 software/gsl-1.15/wavelet/wavelet.c rename Makefile => source/Makefile (100%) rename agn.c => source/agn.c (100%) rename anisowind.c => source/anisowind.c (100%) rename atomic.c => source/atomic.c (100%) rename atomic.h => source/atomic.h (100%) rename auger_ionization.c => source/auger_ionization.c (100%) rename bal_photon2d.c => source/bal_photon2d.c (100%) rename bal_trans_phot.c => source/bal_trans_phot.c (100%) rename balance.c => source/balance.c (100%) rename balance_abso.c => source/balance_abso.c (100%) rename balance_bb.c => source/balance_bb.c (100%) rename balance_gen.c => source/balance_gen.c (100%) rename balance_sub.c => source/balance_sub.c (100%) rename balance_templates.h => source/balance_templates.h (100%) rename bands.c => source/bands.c (100%) rename bb.c => source/bb.c (100%) rename bilinear.c => source/bilinear.c (100%) rename compton.c => source/compton.c (100%) rename continuum.c => source/continuum.c (100%) rename corona.c => source/corona.c (100%) rename cylind_var.c => source/cylind_var.c (100%) rename cylindrical.c => source/cylindrical.c (100%) rename debug.c => source/debug.c (100%) rename density.c => source/density.c (100%) rename detail.c => source/detail.c (100%) rename diag.c => source/diag.c (100%) rename dielectronic.c => source/dielectronic.c (100%) rename direct_ion.c => source/direct_ion.c (100%) rename disk.c => source/disk.c (100%) rename do.c => source/do.c (100%) rename ei.c => source/ei.c (100%) rename elvis.c => source/elvis.c (100%) rename emission.c => source/emission.c (100%) rename estimators.c => source/estimators.c (100%) rename extract.c => source/extract.c (100%) rename fitsio.h => source/fitsio.h (100%) rename foo.h => source/foo.h (100%) rename get_atomicdata.c => source/get_atomicdata.c (100%) rename get_models.c => source/get_models.c (100%) rename gradv.c => source/gradv.c (100%) rename gridwind.c => source/gridwind.c (100%) rename homologous.c => source/homologous.c (100%) rename ionization.c => source/ionization.c (100%) rename ispy.c => source/ispy.c (100%) rename knigge.c => source/knigge.c (100%) rename levels.c => source/levels.c (100%) rename lineio.c => source/lineio.c (100%) rename lines.c => source/lines.c (100%) rename log.c => source/log.c (100%) rename log.h => source/log.h (100%) rename longnam.h => source/longnam.h (100%) rename matom.c => source/matom.c (100%) rename matom_diag.c => source/matom_diag.c (100%) rename models.h => source/models.h (100%) rename my_linalg.h => source/my_linalg.h (100%) rename partition.c => source/partition.c (100%) rename pdf.c => source/pdf.c (100%) rename phot_util.c => source/phot_util.c (100%) rename photon2d.c => source/photon2d.c (100%) rename photon_gen.c => source/photon_gen.c (100%) rename pi_rates.c => source/pi_rates.c (100%) rename plane.c => source/plane.c (100%) rename plot_roche.c => source/plot_roche.c (100%) rename proga.c => source/proga.c (100%) rename py_grid.c => source/py_grid.c (100%) rename py_ray.c => source/py_ray.c (100%) rename py_smooth.c => source/py_smooth.c (100%) rename py_wind.c => source/py_wind.c (100%) rename py_wind_ion.c => source/py_wind_ion.c (100%) rename py_wind_macro.c => source/py_wind_macro.c (100%) rename py_wind_sub.c => source/py_wind_sub.c (100%) rename py_wind_write.c => source/py_wind_write.c (100%) rename python.c => source/python.c (100%) rename python.h => source/python.h (100%) rename radiation.c => source/radiation.c (100%) rename random.c => source/random.c (100%) rename rdpar.c => source/rdpar.c (100%) rename recipes.c => source/recipes.c (100%) rename recipes.h => source/recipes.h (100%) rename recomb.c => source/recomb.c (100%) rename reposition.c => source/reposition.c (100%) rename resonate.c => source/resonate.c (100%) rename roche.c => source/roche.c (100%) rename rtheta.c => source/rtheta.c (100%) rename saha.c => source/saha.c (100%) rename shell_wind.c => source/shell_wind.c (100%) rename signal.c => source/signal.c (100%) rename spectra.c => source/spectra.c (100%) rename spectral_estimators.c => source/spectral_estimators.c (100%) rename spherical.c => source/spherical.c (100%) rename stellar_wind.c => source/stellar_wind.c (100%) rename sv.c => source/sv.c (100%) rename t_bilinear.c => source/t_bilinear.c (100%) rename templates.h => source/templates.h (100%) rename test_bb.c => source/test_bb.c (100%) rename test_diectronic.c => source/test_diectronic.c (100%) rename test_saha.c => source/test_saha.c (100%) rename time.c => source/time.c (100%) rename torus.c => source/torus.c (100%) rename trans_phot.c => source/trans_phot.c (100%) rename util.c => source/util.c (100%) rename variable_temperature.c => source/variable_temperature.c (100%) rename vector.c => source/vector.c (100%) rename version.h => source/version.h (100%) rename wind.c => source/wind.c (100%) rename wind2d.c => source/wind2d.c (100%) rename wind_sum.c => source/wind_sum.c (100%) rename wind_updates2d.c => source/wind_updates2d.c (100%) rename windsave.c => source/windsave.c (100%) rename yso.c => source/yso.c (100%) rename zeta.c => source/zeta.c (100%) diff --git a/.travis.yml b/.travis.yml index 8f91db596..1aea6785a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,8 @@ # # Procedure: # - travis automatically clones the main dev branch of the repository -# - we clone the rest of the directory structure into a folder called structure -# - note this is different from normal directory layout, but facilitates the build -# - Cfitsio and gsl are built -# - we then cd into the main build directory and do make test_tr. +# - we clone the rest the atomic data from the data repository +# - we then run some simple test models to check we are reading in data and so on # ##################################################################################### @@ -26,48 +24,26 @@ branches: dev install: - # clone the structure branch into a sub directory - - git clone --depth=50 --branch=structure git://github.com/agnwinds/python.git structure - - cd structure + # first configure - export PYTHON=$TRAVIS_BUILD_DIR/structure - - echo $PYTHON - - echo $PWD - - # make cfitsio library - - cd software/cfitsio3040 - - ./configure - - make - - mv libcfitsio.a ../../lib - - make clean + - export PATH=$PATH:$PYTHON/bin + - ./configure - # Then make GSL library - - cd ../../software/gsl-1.15 - - ./configure --disable-shared --prefix=$PYTHON/software/gsl-1.15 - - make + # do installation - make install - - make clean - - mkdir $PYTHON/include/gsl - - mv $PYTHON/software/gsl-1.15/include/gsl/* $PYTHON/include/gsl/ - - mv $PYTHON/software/gsl-1.15/lib/* $PYTHON/lib/ + #Then clone data - - cd ../.. - mkdir data - cd data - - git clone --depth=50 --branch=data git://github.com/agnwinds/python.git . - # cd back into right directory for making source code - - cd ../../ - - cp $PYTHON/py_progs/setup_scripts/Setup_Py_Dir $PYTHON/bin - - export PATH=$PATH:$PYTHON/bin - + - git clone --depth=50 --branch=data git://github.com/agnwinds/data.git . script: - echo $PWD - # these long strings of variables are required because we have a different directory layout to normal - - make CC=gcc LIB=structure/lib LIB2=structure/gsl/lib BIN=structure/bin INCLUDE=structure/include INCLUDE2=structure/gsl/include python + - cd source/ - make clean - - make CC=gcc LIB=structure/lib LIB2=structure/gsl/lib BIN=structure/bin INCLUDE=structure/include INCLUDE2=structure/gsl/include py_wind + - make py_wind - make clean - cd structure/examples/travis - Setup_Py_Dir diff --git a/INSTALL.txt b/INSTALL.txt new file mode 100644 index 000000000..f2b4a2379 --- /dev/null +++ b/INSTALL.txt @@ -0,0 +1,87 @@ +WIKI AND MORE DETAIL CAN BE FOUND AT + +https://github.com/agnwinds/python/wiki + + +### Retrieving the software the first time: +Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved (and most likely recompiled). + + +**If you have git installed:** To obtain the directory structure, simply retrieve it using git as follows to clone the directory structure: + + $ git clone https://github.com/agnwinds/python.git -b structure + +You then need to cd to the new directory and set your environment variables + + $ export PYTHON = /path/to/python/ + $ cd $PYTHON + $ make install + $ make clean # this can take a while, cleaning gsl is a little laborious + +note that export syntax is for bash- for csh use + + $ setenv PYTHON /path/to/python/ + + +**Without git:** Use the ZIP function under the [structures](https://github.com/agnwinds/python/tree/structure "Structure") branch, and then download .tar.gz versions of the python source under [releases](https://github.com/agnwinds/python/releases). + +Once you have a directory /path/to/python/ which contains the structure, place the unpacked tar.gz python source folder under /path/to/python/progs/ + + $ export PYTHON = /path/to/python/ + $ cd $PYTHON + $ make GIT=False install + $ make clean + $ cd progs/python_xx #replace xx version you download + $ make clean + $ make CC=gcc python # if you want to use mpicc, ignore the CC=gcc + $ make clean + +Again, for csh use + + $ setenv PYTHON /path/to/python/ + +As you can tell, the git install is simpler! + +### Setting up environment variables +The only environment variables that is needed is to define PYTHON. For bash or sh users simply place the following: + + export PYTHON=/path/to/python/ + +where $HOME is you would modify $HOME to read something else if you are not installing putting this in your top level directory. You also need to add $PYTHON/bin to your path, e.g:: + + PATH = $PATH:$PYTHON/bin + +for c shell, use the following commands + + setenv PYTHON /path/to/python/ + setenv PATH "${PATH}:${PYTHON}" + +### Running Python + +Once you have added PYTHON to your path, copy the script Setup_Py_Dir to $PYTHON/bin/: + + $ cp $PYTHON/py_progs/setup_scripts/Setup_Py_Dir $PYTHON/bin + +Then go to a directory where you want to do a run with parameter file root.pf + + $ Setup_Py_Dir + $ py root.pf + +The code will now run! + + +### Directory structure + +The python directory structure is fairly simple: + +* progs: location of source code for various fully debugged version of the code +* bin: location of excutables +* data: location for all datafiles. Files that are mainly for reference should be gzipped to save space. Such files are not recreated in +* bin: The location of the executables. (It is a good idea to put this directory in your path) +* software: This directory contains libraries which are used in in python that must be recompiled when creating an installation on a new machine, primarily Bill Pence's cfitsio package and the GNU scientific library gsl +* Example: A directory with a few examples of python runs. (Note that the input files will have changed and so one may not be able to run these examples without some changes in the input files.) + + + + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..f3b5bdeaa --- /dev/null +++ b/Makefile.in @@ -0,0 +1,69 @@ +# +# This is the makefile for the python related programs +# +# Make sure you have defined $PYTHON as this directory first +# then type +# make [GIT=False] install +# +# if this fails, consult https://github.com/agnwinds/python/wiki/Installing-Python +# for manual install. + +CFITSIO = $(PYTHON)/software/cfitsio3040 +CMAKE = mpicc +GSL = $(PYTHON)/software/gsl-1.15 +GIT = True +LIBS = True + + +ifeq (True, $(GIT)) + CLONE_DATA = mkdir $(PYTHON)/data; cd $(PYTHON)/data; git clone https://github.com/agnwinds/python.git -b data . + CLONE_RELEASE = mkdir $(PYTHON)/progs; cd $(PYTHON)/progs; git clone https://github.com/agnwinds/python.git; cd python; make CC=$(CMAKE) python; make CC=$(CMAKE) py_wind + PRINT_CLONE = 'Cloning Git Release' +else + CLONE_DATA = + CLONE_RELEASE = + PRINT_CLONE = 'No git installed- have to obtain release and data manually from releases page on github. Exiting.' +endif + +ifeq (True, $(LIBS)) + INSTALL_CFITSIO = cd $(CFITSIO); ./configure; make; mv libcfitsio.a ../../lib; make clean + INSTALL_GSL = cd $(GSL); ./configure --disable-shared --prefix=$(GSL); make; make check 2>&1; make install; make clean; + MOVE_GSL = mkdir $(PYTHON)/include/gsl/; mv $(GSL)/include/gsl/* $(PYTHON)/include/gsl; mv $(GSL)/lib/* $(PYTHON)/lib/; +else + INSTALL_CFITSIO = + INSTALL_GSL = + MOVE_GSL = +endif + +install: + @echo 'Installing Python. the radiative transfer code' + @echo 'Installing in directory '$(PYTHON) + # First make cfitsio library + @echo 'Installing CFITSIO library...' + $(INSTALL_CFITSIO) + + # Then make GSL library + @echo 'Installing GSL library...' + $(INSTALL_GSL) + $(MOVE_GSL) + + # get atomic data from git + @echo 'Installing Atomic data' + $(CLONE_DATA) + + + #finally, make the latest release + @echo 'Making latest release...' + @echo $(PRINT_CLONE) + $(CLONE_RELEASE) + + @echo 'Copying Setup_Py_dir to scripts directory' + cp $(PYTHON)/py_progs/setup_scripts/Setup_Py_Dir $(PYTHON)/bin + + @echo 'all done' + +clean: + rm -f *.o *~ + cd $(CFITSIO); make clean + cd $(GSL); make clean + cd $(PYTHON)/progs/python; make clean diff --git a/bin/Readme.md b/bin/Readme.md new file mode 100644 index 000000000..cfb091996 --- /dev/null +++ b/bin/Readme.md @@ -0,0 +1,14 @@ +python/bin README + +==================== + +This is where binaries are stored once versions of python have been compiled using make. + +Setup_Py_Dir can be used to set up the links to the data directories in a given working folder. + + +This should be set up with your bash configuration file (or similar) +export PYTHON=/path/to/python +PATH=${PATH}:$PYTHON/bin +export PATH + diff --git a/bin/Setup_Py_Dir b/bin/Setup_Py_Dir new file mode 100755 index 000000000..c2984f466 --- /dev/null +++ b/bin/Setup_Py_Dir @@ -0,0 +1,26 @@ +#! /bin/bash + +# This is a simple routine to set up links so that python can be run in +# a directory +# 05aug ksl Coded +# 0603 ksl Modified so others could use this as well +# 1306 jm Modified structure to close issue #13 + + +# please make sure your $PYTHON path is setup to use this script +top=$PYTHON +xdata=data + +# Note that we now have standard73, standard39, h20 and so on in the top level data directory +# that way atomic/standard73 now links to $PYTHON/data/standard73 +# and standard73 then links to the subfolder atomic73 + +ln -s -f $top/$xdata +#ln -s -f $top/$xdata atomic + +## the other data is the same +#ln -s -f $top/$xdata/kurucz91 +#ln -s -f $top/$xdata/hutdisk93 +#ln -s -f $top/$xdata/disk06 + + diff --git a/configure b/configure new file mode 100755 index 000000000..3e07d11c7 --- /dev/null +++ b/configure @@ -0,0 +1,47 @@ +#!/bin/sh +# Shell script for configuring Python radiative transfer code compilation +# James Matthews, University of Southampton +# Questions: jm8g08@soton.ac.uk +# Usage: ./configure + +MPICC="True" + +printf "Configuring Makefile for Python radiative transfer code\n" + +printf "Checking for mpicc..." +if hash mpicc 2>/dev/null; then + printf "yes\n" + MPICC_IN=1 +else + printf "no\n" + MPICC_IN=0 +fi + + +printf "Checking for gcc..." +if hash gcc 2>/dev/null; then + printf "yes\n" + GCC_IN=1 +else + printf "no\n" + GCC_IN=0 +fi + +printf "Preparing Makefile..." + +if [ "$MPICC_IN" -eq 0 ] +then + if [ "$GCC_IN" -eq 1 ] + then + cp Makefile.in Makefile + sed -i -e 's/mpicc/gcc/' Makefile + printf "Done.\n" + else + printf "failed.\nNo gcc or mpicc installed. You need a C compiler!\n" + fi +else + cp Makefile.in Makefile + printf "Done.\n" +fi + + diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..222713e61 --- /dev/null +++ b/docs/README.md @@ -0,0 +1 @@ +The docs folder is where documentation goes for Python \ No newline at end of file diff --git a/docs/cookbook.pdf b/docs/cookbook.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3860307562a7059be3b1e2e45ecf1dd267af2f28 GIT binary patch literal 350267 zcma&NQ;;S=7Oh*hZQHhO+ke@%ZL7=fvejkV>auN{r_YJ|HWP7YKV{@=X5{+z+AGPG z#3bmM8Q5XS=az<7VK|7Gh#ZWqiTL$SU6ajiT+=~FiKe2x|%r?F-q71 zT+PJHOdL$jU<3qUTwI;a0Cq5*>v7uJDF>~{{yT<+WoTvA;weP^qz<^0?zR@WCFYeX z)EkI+D5T7?Nh}F};{*J91f-Ih)(^zNaDVF?#~MJfEgLC|1J? z^L1_95fyn+Bm7O9^phq0(bl#^TRw(ARvtVr*E@Fz{6CL7nG6*ZY8>Pd%=vC+J$!J% zwzE6^Qgv=N5O(G+w)yvMy4ode1(LyhuNdGy`Nl-|I}uqgaB;7nDempEV1Dw~uV+lR zAswShZnn!DF29Ox5bMGouNvwi8W?oWzL%CGLVV~K{cCST>bh7fUKAvL;`=+u!;z4B zx47IX%^pphoI|R8bYljkkzywTP37I`C>-o|b&r&2#3mF;{#SW8Enm*pbKe zlv~g3Eb{1wyR;0ZoYFqYI0in^P-ZEJ?3gnvpoy+)f#F%FRbY+#LLfkHNFV6Ii8{?G zyp#-?aJpZywA_>qCh-J8>YU0mU24a12;HhsV9a@X2rOvKis~;EMt#~K>A25L0yK>@WAaHPmo7EGrRb)soC*m|`wO45ab$MzHtdAQ$yb?mE~wR+ z@O*TH`Zgzqpn$ET=Q~6ZbfMy)Nuw4!RLD9Zu*LBg1SDFK1Qw3jS||5CNnItR_yBB) z8iM#u=TA5Hs6>PX_Xsi#Ra*1CeIb!=vs(pi^>RyJVaR}jz3=Psh`SN%G+_T;u0|bJ&Xo-r1ww>x)Tb2?%LU#ly@T?=N zY2&71F}bM{h*kyADd|wXOuWLXf%&q!o&hx z07Q;R8@{G#PcBu6ty3K?r>txXgtiO0tPiA>wI-ffhqb^9xRH=z#_J7k?00619Cv3kcgY zJDOE8)hahSF*KrlZL{t+!WiR+4ge$tb?9m7ws4M*M$$Dl62bU|3xiI9B?27BE#`2Q zjq@r~(m!K^af5Zj510O#Y(C{OYyx%U;^8|9V61p`@%^Q~2tBxXIR!C;=g^>~k_!fc zr02Bb`L#5oCi2Bwt41OM;yJ3KVYEMnLPdojl9K8?&5nXsxWWWhaQ8lJFV5=PXxdhZ z^Qca#qDj2A83=PfY%n-9@7HCfhbN($HiUO>LG6~~x)}i?y`t`dvyL$bz23fdrMxnd z6vRF^80Bj#(?mnzb)A8gVUY`Cmd$Yft&hiRX_)pE18kwHR=`-smr$pP*^n)5 zVPF}zO6-B`vqJ~rl+-!Z&~R`{^{N%jx zDHP8sgc@$1>sOQuum*@ietw^e zd{}xXlelERx8WZto@o=c^pZ>5B-L_OWp#9C;ud1fc7Flil^WXdffJ(u!mG3X+RYC@lldX(i) zMixb}%3$YRSD+#104r)AcN$n( z$)8`VV%vs39(%_{1==R#)daHVNeyp0PXp?h%hJvtg%RP^ClZ+|Y&~qIA&GhBmN|Lm zOK94*OXSHl$Ch5SJHL+$TE^5w+}QsD7HV~|=}KVv32@Auufwd)!V4GAwj?L*H~Z5) zGMdsYSRp5p_c3m4oOk01VcCuXE?=B_oP9ykAO1-aoD5)U42lR$@BVi%#2wQ=-9Dd2 zHPA32!v7tfhG0PpaHUnU=M|0I)N!F1f`k&DbRRlsc$qk6{K`qGLeslyZN z%c-n-6#Yp$6lv?^ctilYptvuZz!EwNK{Q;4jB?+f;OUxYhJ%|)(8X$aHxmHUku6ooD zdEisGmu&#uZ{TG_5Jg0rRQha000GyI%gd{jw~|J`D99mqDXp5Sc*Gdxb29%{VJnad zpo8c^Db{um?0qQrh$zeUMl4W#aP!Bt7;oibixmwk*nH1Z;g$ibkx@In>W^DU#6fW5 zwoYGww<*fp(d>MFs{DjI`>Hckh0_d_aWbKHhf9g=wnRl%X(9h4kR$Yh1<~ma*+|xr zEo5ZW40&v~Y-8vg!_5?i(@=Yp66l>IQLHe&kZ8C%aFVL1nM_KGZmZqlmZoTzk?%(M zGowxuUovqt{^@{N=N}+G8_jfrKn}=zRkrpxI{VAm3*HH13RF*cw01p^qR_Tk)&{2% z$=>;)`Lo=sUX&|NpG9GMKsVw>x@E@X)k(@+#8men;C7u;PCSMLrHFm_em5Q!V~9|oq{d)g zM!N#+|9V1CNCr#Chscy5js$bgI|QJlYKMEL`qz9Z({_u%=X!om3vy~;dF{gwA z*??NIer`6#x0B{?O8N9XFN!Cq$pzw-uhgQ$xL~k9<@YXpxxTK7==`WtzpP*y8`Sec zq*OeiP|AE>U_xwuaeVZ@{b|~eR6ex9gY*4*yglhuqVn{qVYgeAbV?*=cHq8z=6RsM zgi15SaPz8(aVkS9`XrUx-c>pN!5Y~E_DAy%|6aX|zq8$VGPuCVfSReQt@+lEWrDI^ zA)x)l%h39(Fywi!*CJ`aePojX!kM^m;twQ zJKx$0*^_9T^Cor`b?Xz3#>b~A$tN)LWuZrZ8*yj7Au!+vRmHe2DU3Vo=i!IO^`Kz7 zPC7vs^;NW02nUUQq#6C07}MHZ75AniQ(vFBFj5mu(0aypf5n6m(Sb9Ak?>bru4BH! zz#0tsjA(s+l^`@&6BnCB&(SpZmq`G4E3Uzr0%x{1yA(kShaCiU+TVmi7IH>{s_pb5 z<04jBRKzpvs@>t%Q>!oS=Ekntj58VXGZAtgi!`v#Zsw#Pp#`wr-*s6<0ecD8JO;Z8 zE6M_joZN_|?8!&IXX*nXLI+4=UvaOpL86<|fEHE} zCHz391TtO975$M{Rt}vQ8*u_s=6e<&BqV#HyHC&nk@K(`BJPhr(0e1)CJdCt8-&6` zd~Vvnf_yA4swLc-@3yVaU+wP{9^lDTMS*Nka9|VC6$Zz|%x_X#bt|M1edtJxHiD0< zZ3V5*6-s~gN2rc8WXGr;HWI^Jk-T+LUkMgMfKj8$HDv%vOlP%#eCV$*EViOCeCg(Ok}sqoZay# zhfxB1hYE9W7g{15iVv#RHDb#XLV^6X3$-vlF&V#EVqsiukm_SbT}L$G5_YGonwKm( z48g2+KKFCnTr^Br-`mNPUaB9l&OtKT-MOlg)jDuGxc}`hZ{TS!#7WBu-g~i*|N}d>8=kFZ${i>G+L9I)J9F*0Nb_ zGPm)^K|e=na_|L)Er(*8Ah;mYJv&GOQrbSf zUDBf9q6bHkZs@i+x#2K~4xiF=Q!CAF1xMHm$_gvlc=AD^m3@opzS?}F%YR>S2`7FB zL&VDyIK^)6Ngj+dP2Y?-v~(i5K;NapnzlO8&KZtHxcX7PU&9zfHOr>718e3}`WTdy ziAjna-0*Uo2@o=hji;VIq#lZ^bN^(e-id!1t!5fg(|c2Q$~J7SRKgfMae> z5P^f}UZNOt;Hd-cto+i-)nhA8-~<`%L~$USX}dT7`nP^XG`1fIXIRMV5FI*?iMK5a zUeNq)Uz1#nQaErbN;eQ7zaG~s!|tNy;E4{6TRt+MUWuRf7XOvHy3=+CWUnsE)E5ne zNOi^Jh{Y8DlDBzroq*_ZdcR9ZGqTN z*lmUU49To?3O#z5$rAi%GpQqrrR-(RXDXn$IA+t;`32D?;aC!^79lMV0*nFfWEn_~ z4z45a)EHbrq{cIEAiaU_DcFC3`x+e1YtzeRyKe)LKB;^8>(f4ImB%KAvE=<7;|Yf6 zCV)I09vEc!VcHCnV|!hU0>ug?lsI&a zN?nLdgantr#fY1XWk)clMz%j^rSIQcUWRz@IpxeE65o!YqSEIbFg!yR-ui@VAc#4s z0ObTTF1P~R&K}IZR9R-|B^)%krb1uX2ghMQ`&!~7( z;I+$D0=PidTiQ07VEu>A6p%QT$vA$2yPc?dKHde33n2_1vQ@OwhuMNC$olqGggtlEA zU9QQ1i=we879J5?VTZ^!l1htjtRWD#q70-1LA_Pu z$SHt>UKj#_alq?y@**4yf~n)b0@hUG&4xAuBK~46pF{xBP*qBk{^-_jyHsy;Pnpm- z+Xir)Mw%G4CQYQZgbb5#4jY9$RMkHY^D)q9%J5Z9pf4j{vzPI7+ZX%5c5$|*dE~A& zo{T69NHjoS3Aaj#+J72T5fP0Ey%k zgt3~Z%vLrgJqid;VWEB?@;ZW1qs4DMhB8OShgY_@W&Oqpuj=*!O|p2kW%z7YE#2=1 zp6S*5G7Q0W5H*a<$`C!mG+N^^j~I~F_CPwb@+KIaygmBjug+cTyNMaa7@TpO-Ev~G z+aUDJIch%yhxuiAydVzB>y>CzDd+!6{TL4vK?B7LZ3%)@b*GjNp;SN6^(?UMw_7PD zX#f`vnJb`2#)=fI!l)SHXy;L%BYYY@0ZHmtP~KDc0zBZ2xDB_T3aQ-Kfck9WQY|6M zRbWZ35%RoOgo0$!R8R{iR%t7fv$-QpY+ZsLcGHTBEwp^zdX7PYh*Y`!5*E%*FA)V(1n2 zKQ(N-6EGwugB62sV^5Yk2M|SIMdogW9K=yVVK^b+u$Sr9>sVhfUrGB5JQeAjD_>qh z_&~$O(l`EJ6xF|++wduTIX?coHGOq4=BbQz2q5tCKs3m?Aet~{gnuAg?j z5vb64#029kg!8(2YsThs10mi*%g5iC$7|0oJblTqExAiqM!|jzNg3PQTrZZi_B3~O1KNw^?7x{m7^=umO2oHNHO$V zx`L012GVx`bY7BCJ3|?##7RtKdf3r_-Be~(dCX(5cw_;;|1**~FqOC83S7a1Y>5@| zI2{bCU}OxFq#GYg(td||HMx|qs@5)EqglZ+0oUZSs4Dtn{TcSdV`pRKY=0)DkP4is zebXbmCMwQBFn`^C_pUSl`up+ZPj4?j`rw|srGs|#AF_N};7R)~F8|(x8pA#?pJu)+ ztGlW;Gdp3m4Y9DoA6*Fe!|CQoS+J~I*zX)fbvwf;DYfZ5i;o@*hWFw44xDhE$faSw z4fU(Bfv^<}4}%xh(IayW%ox5JG19 z+P;g*y>fPXDZZlejz(bPbC^`r3mQrB?uj|0&MMHuUH>N_nE{*6KOg>2OEa}Gh1RV$ zWeD{~9{p~S?HB@`7bPOCz!o4ocyHOH0WOC>xRU-Fbmc_K<8(Ix4H{4(Y>IG}4U~c*5su2Q*i84RN_@)tc^5R5<(IQZFbEzUAU~ zOeoY8ITFd9@~efAeu`pQS?LR+g(?ruiQMQkr4q6JXEWSUGXP+j1+wi-s=a|_4^hk*7Gu)W9|=% z|NW~N`&V-m)yV|*A(5erQ^j)QZednnNZGT+&WjVv+=^qoAms86 zC0II7z-N@HeMg{=6PlPbPTvY!gJpf@egQO$FiUWRRx=Q2v^|%QFSJqy z-NIaeKA^rxd|W6}@y3d&Z%pDmOZDOs6pdP*n(M0&{{lZjzgslrORx&{qcF|PTX^BH zo?>&=y(NRs)cR&;qm5vv+eKKpvV{`zj2vZM*+1|YXm;>5Fs`y zPj|Qh*xB9(vJe*z-%XdHv<5;f0c}==Kx&1;s=sfUsCEnvH+t}gk45l1mpuA?(H|I} zdwOriLtPBbdi8e_&dq zIc$Hcv&=js3$-T;(Lql}7_RAEo`9r~Xi1|`B;E*r_yMBfY2h+L7|cgKI{y6>>#{#JKGrf9NDauEGC80m5A4>WT!lplWr;+bkS~4Zyzt zWh)J|=^Vf&(3vv6jS`xp}lQwE(S1 z2o)?A8eUt$iY)|x$NeDd>p4M8zvU$;S_#7GFfJzfnL@o&_79dMdr2cqWcgXtQtn2! zxQ@uPMb-;~TCpl$Mh*}i2s%ouP&fQCyXaD8*2K$1Lt)y9Bag_o(8qn;|AEM)`OEQN z$cF1b$%dJmne~4qn{F*ThYb#-?>xgobZ~P}c6ya1-9UfK26y?O8ft4>s@6g!TM7&s z*(@%A?}uzq4%h zK}3^>%td1lu(~$e#-G5? zLG2ON)q>DznRQLWYn@Fbh|-$qmZII$nxck_(n_4o6MWAPU$jP((}g5Z(fZVeF>rZ5 z>udyff*4QtH-B(k&kkGIZvAufHG;?1ieIV##~AiX6cx8W>bWF)4dYa%Eb)Df$UdLv z(~OKga@28TRJez8Cm_$BeP8T8=bHecY`>PmYlMAZ2TrW1i@{VoAnRl^#Af6pi$mN|4}m zxT$+2O6Ol}%K=l=B0;_}~llqtU+A-|dAEVeh-hLy#ZOr9l8p7l;Yn3nQzS#UIw5)ntK ziZuc6hcRS(^SHr|*YnG4Iap6wi$L9gMOn7e%e{{fe&7^DSq_&zz`|H_eZaFP0ErUA zG7*!D{T@bjF2JPlUp-yXUptrXve=Cw^MDF>ZgmjUBM|shb599WL{0yl3Hb`0tH*>u z&>Ik%ZkQ)`HYLL49Kx4_Y%cU<>=qsZ=p(Khp^Mwgbc6us*SeYcMgX!CgoJRmAdb1G zL%0UP^T&i^1PH_ki&~hP<~dn~^*rfB<_z;GngOlR#5PeOxc9Fa8@CPYMT#Oo^+yac z9rI&EprnHppjRBeS<2Nj#evxl%6SaN0J?avUtGC#VP{wCYY%qUcZLTHZ&IVFbyY7! zYF<2)<0KLuZraTTf(o2`8ntJSW<#3(Q0O2)n%7mN27zrc4+OG$n*4k{dt=5Dvy=mY zMF3!+If5YQ&{DD1xn__xCZMrRow1LJ%N}1E>Sl<~Lia9TY8urq2F#~xON>Fq!wp=) zOA~lC59IFa@#Rs_H4w&_2$koiYh}*kVOQ*>X2M$O$xL-kAy!ZIhd)XrGrdzK>=rsj zzru1G>hO_=w$ro|bue3TJoTza$(Wbzz$DhAVW@`zdMkE8_X*EY#l$!c3H{D{25@)& zxU0SEpLrO0#1jlAbX}={0X_xw3Mi5ivH=5l0##z|Keb&d*Vc%H>$UA?zsxTPsdArX z1$E;oKVxLNSYp9HQIA_;jE)KgSV-w6@K|`;R84?9Eseq))axpam8JKIjA8Pe8KH7!I9nkY{u0vLP%L>}KrvJQ_xdqo}j;;mDs-lA);8ifQa~*2N zonF6)*k&~a)4s`u^1iDGgpCIQ+bS}6h?mEg<_!R=sf%fW^iE!eB)Q(l3CZ-_4xNeO z1Ppni=3|&gflFq@LMP%Eo*9w%0`l#;KQU$wZkG%Z3V0r z6Yai}MJ<|&t+7y`LX$nEHn!iPP8?rgy{21Sj!lR6Gn+lE@cuTQSYGNFNuAcc8uF*y zWZCQcNS*e0TcO51iG4Wib>f&Ig)p=)g+pdgtgrzr^9Ce zh}CUMMr|)C(4IynjOR`?a!v-`Zj3uRxqDcqj5k|<)M=I8@NG%@y!5PJsD3;S@tne( z4-=^bJT{kCh|D{jk)mK*9LB^Ddc;3Geaz&&tSBM-bjDsWn|V$x=D8P9j^2P$q7yt< zcYf(0M$5+q?#a63m$@&-$-2Wn`PWHij$<4}@msxo*#%2^BW02#OQQKlNPmMGrzs@- zr;xL<{-=<$uyXv*LLP@b-gwaZ&!Q+4ofy`98rp+k=vhEF+*zOLB$s3vZ7v74KD1Heq+VaA@`hL6q_~mgUIAo0}2|!oByFO}`t)z>cG}RPS z&$u)=-|7t!%zL)Vf`Adkp89^cuk%P!^86u=TG@DMm>A%bcmGfeGpo%I!4bGR&=T)| zS?7=}P%Z6u3UokOf+*8A+Tz0BV#{*Kf2N5KF+a`zv4SKN?#0(N!G38n%jiadc5yAX z=d|qG{~CVIgn>1s8z1DO&1kquR55^fX5k|@yIp^1PP&OW#=EETH_wu8F4ay0;9wF# zk+^ra!`6T7Uedv*P4F3zMi4x4ag-j9Gqqo>U9;c}4qk}sn&bmi4vGG3bJU*AHr@>F z?2w>ay+(OezNy+!7B{(LvhH*2A}*zt0Sq*l#sVkh7y?fU(!*e1dklmOi85gogCG#u zPHox@@{&o~_=kZvq14>T==&}NF&?fAP5{4xbN87@_oQC_`aCtDqjF^K>Q}Z;RDa=& z%;2E2%v&Bg3vU5peWX&V=$8%DlrLD1*HjoB1MPuE!V)T`LHvfjrc9kz5;#a`AN3O# zouBl!d2i}uS}6Z$qVzIGiiD`o!H#pAyhF72!|SLbz?JF@PSaD4Xb)X>x_Uz`4Gx%s|t7RfK=spL`$#8hDea2&OfDFz&s^dPdAKS!JM6mM z?=tb-C_-7pFOHdACS$%trN2zN$s{B45|& zSadN7csI6L&ur4l26FIC55PpQf!UYv9zFM7nAuZ*msa3BYFKJmX~Z#-g&7GfmI|N! z08r@vh#%pf$&w@kyzyoYH|2-fOiUp0jCX5_1tHfDjqJT&&8JbJh&PClU^&VRAcK41 z$W4L8bDsqU9cf41YYBTr>g{{5p@?$<5toZHlrFPtCcx3K1}l=o#-(r@zsEtE2TY!V zaig$q7?Smg!Ni9S;>%^039G;`c8jQScE!r+K>$A4TCU`sE%sCR_Br!jDM$w=WB|>! z*qexa4v=GZq=T(EgX)owlH7YBA`ioBese};Qx(P|Rn7FOfhENLS&)!h)84U^5 zD7W&*LHO7%!wYeTRrX?0N=AXhQn2o^zbbqU9u=-%?Dvrr&PXl}hE^Sma{}c8m_e5O z(K)+nP=_qj8ySLJFDH5E&Uhe{E!R@vu(V)OF(lEdnW-dU_czGk`>CQp3%7CZ$)6`|v4_E%aKkUZdRE=f1 z+@N!#XW@rbgMsWQA0HK+<8>0%{%GJYmsJ2Jl%CifJJCoc@vM!ySv&Hx*||C`Hs$f| z%ElHpfxg51hxc;cNPYpcde0Tmp!M&(lv$xyHs5<95vi31=SL>wFun`1?Sn6+)6}+x zCbhUe3`Zk%G>}-QRnOs+irX4M(b5=Ok@qF;dD^Ai=l#WG0%3r^;;2ArCWeOQ24ko>A8-mfZ4s1ofZr)f%M?P^c0EF9#Lrj0#iQ z#C6Qrxi{w&7@eyd0vzk#06)}$sJ2S_H z>DBFw(D`QyCHHc4o8uUV?5%e=sY=r2z69Idh1D0#dosGE6VB1(A%;2BfFmc_`+!LU zXgBZ%V5NYMW7h+C9jZ*m-4I^~vXzhE!@yZ?=dmg4ov*U?bQR* zE4>L%jiaYjN}^Cm%=~t@o<_yrnuGlVEHj5a!K}BMCJTgk(1<7OsC){!hr0E5B$FY8 zzvacNQwj49k-XuP?&3(shEOqp;^z#kgi2GTb2Hzf(ST7x_bTQIWze5OCqUEGrjg7tfGbS z`P+*}=_0S389bg|oTyZh(};S6+VXnt2MD@r)H34gG|d@%mhvx$DtJt+te8`uItjQK zL2H|(xRW=4D&87Ex^0LH=x&5^cI?0Z-0lz>Y=1!`-__pz7Zm$1QF>->R;K^eQ_0nm zPM~E+>ghF10*w%p`Sf;jkhQ$vv_u_vX6{Q4 zp8km-+y*Dvd;j=0;XwTpRTOz>w=Z^NHGtBqWtU8)O`!N$vr$vC$=*;HmTDp1}VR{Ka=X^4_{93B!;DJkDhKJl>*3a6m)fPh2gBdga9RdeeTr>KA zM@hQT%^Jd|YnARTQTJvaOHGekG-3`>5V>-nIH4VlbT-#cwd#132CKS&ztHWJIo2)G ztlgi@py0y5S$cx1;?4Q23Eg%YMn^;(?six7U@l=k7d*NMb{-;Ej%Zee`*{1<*7d?o zI@{P5Z})GzGH70H=;LIn!~8+9>RAd&Vm8Y6q~J>(<_QP3YjM*!<#^p-oRJYEF+-~d z4avf_m7XC`yJv!u8{C~o{k2ya!%R0}1;uA_c90uSE8n@lRrLml)U5Dk4jNmqULefK zE1YgoC6e*FM7mgsX;{d@QmoVFEyyMnR!lUogk06N)NmyFkV&uw7sKP- zwk&M_J;i}un^;N;(Ll)E%fw%y%bA%{#Q@oLewIhhXB2$JQ1LTlKB)(ZQIKQ;6M><~ ziaxosRFG3K*pez?3PfwCOxqVBciMXk*I;XESTBQ?lg=U{e+@ zI&pk>s35fc`f%hC5g-%3EhLotgCNM)G2&Y0_Sk=ks|AHU9(ly~c`qm|AHR!T0Qa?k zG#B2h_amiWu(7#Mq9UC74yCW33oI7cC@jN-sFrLkEf>|j*XS?`OiN_oEb_Z5hc8fPuuLe&i8f zd>{bM_ceSPrDxqij%_YUU{z{+`2*2Jf_~@Cc{}lQ6Do)1iu=V>V8f^rBOdFC%;J=h zM&p}N;u+%&l~BfA;&E0P`y%85n9UB{-(y{IrF)$j-=geAOs5f{{?ySFI-a^@i_&A@ zohjlIK9mDx46YPAi;4b*hFv~jSfcP{O=yTPxl-Jf0+))exDf<1rbBbGhhyxy;ZoSKP$>ABBdpTKjrue3@kgZrYsJ z`%ntR9d-N)DXR~6Nf*srgGh68&qTyum@|58}4-=4w675^P)%sJy64lKnLrbO?Vt^r?#!P0S?sqptd||;PU)~wBZ);icIe$zz{KNRnOa0$L;pigckt}ri+5^Jrcj}Qqgz~Ft-Caf#?2>U&36Haf!gwQEu z%nwyza5G=f%Kz#7(nf-1m&C~=u6FD~0pvm;y=gl1j!+H8tUCwjnq&W0kAG{W`6lPie5N3yGx zjaO-6)h|Wh+G{Te13Ja0@VeyIY;wS~LlahK?@Wt{;L&+i)a!1(>{k>n$-|q>^J77! zp6FfNQ;Yf?TykwJ+crgy?`KT(-15G9@zXu28*|Z|KSx{hH(`M3A&|B2vXO_{i`_6{ z22~iQ97@IEwjirz-T|fU-XbOSCoa0s&SRq#rDuESdZq|&frdo5?>fb-MLVpXmqCZ5 zE47`Cq=VXF;6TvGGoqAip5yezZ;t~zI&F#*Zv>?hi+~^&@Z0nLXG!y*8Tf!=uzMs8 zX@U@*w2^zot2+u?+PI=wy`0Q!JT}TRI(9+!PY_|H2$eL=`A3yI>WHzmJG8P~KDz=@ zQ_9f=MgDs?_bLx4lHX0Y@yEcIe4N}<^c&1Ctv`~T|y|C3y|wrt8~D{{|GT?XkN8PPjnloAI88X0cxHkGyPBTzA8 zbFInINU)Zy!`U*!-NYsn?FRb%NXg>Pc}8EL;w`6tKFjy*ud;|gH~Y5#d=~7qyX&)h zSsC;Z@y11EY>Lh@?-$kEol(E6(x8!q;O$w(AJ53pke?pEvZt(Rfv83$Oz%I6P4#1} z$BzP0#nbn?XLEF}z^Y>32U;7*CD!<^Biy_S#I^n(3{lH5%?NJobUcQeR;QWvlX|}a zwasO?H5HWR*9sW8UUMAX|3;=K#F>lzYq6zGGqjHa(dv^!UQCZyVG$8MjSdCcr+ts? z32U<_qkbx2tTYVF+Jj$oml?2|$&LPnc@BZq51QoL=Cv1D&mu{nN~fSsq-U`n+S>{2e!qcrBX; zvwikq64SqW2Mqpo=+CN)x&82_%gs~+EYyF@bMtUj3U=W|Wn+*XV>iR%+==KTEUpQ{ z=NTKjN=I^sg+WURYv{cFhwu#z2%L_zSc%`wS{k9eKfK5>`N6%5%Q)0D4Z=>;6CWG_ z4uXYnyv{F7Q+|FcSxL46AL>37h4Fuv^Q5sM7iAATBkqGlJX2LZj>kRuv<_-}mC|Qv9CNR`Z0ildIs}Q?^u+n_*b)$z zbZ>wJ!D*tSy}pY*{bEOH6Y7W}4x}Pw76t=eZT*-(NA6rz0r&0Y#5a+JcaJtJeV8?y z$U%k}bbe3p7`vqfi%TW(L_%MoyhO!B~PONsF4tt5*58yl-g!hgr9lFHeH=JqMOtWSp0yuJ;DOiP58)n~iXsbH% zitcB!tXfG>O7`$?HpZP_ss}M-?!UkWXU3Ph+;hU#Z_5r)8(ZmL8ZwA;MD zo3**QH(L3s0IhX5BqZp=K>Ix)C|CSPBQR-JRqgEY3b#V9ohLDoUuNd(_CY80Ti6Tb;^XRb{Ro#?>J0I~BF$>cUoYnN$ z+giFu`QH>eH_hIp>3alrsWlR1CWV7kTOgrT#C}r4*^jeGv!Z>bg)+mDG;%~6`&==> zgccqYFTtHV>}_eh6kDTScoczm&(aD?pDXg&6{b%8R7o6~rWHB&J ziFU>@XPKEkrAs<)lKzl?~RL(fxU*cbl zk-2SII-tRupdgKIB$%~$g$YexVp>WXxJfYJO%-Dzc^A2UHOk?G-mXbLlOBeA8V7uG zdj=rtl(9|soVk@NIyel_-&+R)AtNu{U`uN3@SK?Zh4N`4s=tNmh2wj+4OorNh-huD zH_;HWh=4XtvhvgaY%C6rMqrHJXkq` zNd?`5ZsM#l4kr^Z*_KUIdoKAKn5ro4hVmJha$}pM@NL)8q=eCchC1B#4H848919Xi z2S@u5^KVs7w^|AWdd>lwKIC2TDACLsm5YhCD=P>(c9z(jZh$<<-_T~JA{F)f(yE#e0LM#LH)TSCyx?ff&NGo)A?o`KDsU(^@WQJGS z_L+Os07V*!a+vlCv;`8Uvd7LyuiBgefNS<9qx$8M=d8*|DM-mj!8wzbEvYT~)c9zI z2;o@gu*&MWK20F``@(tzyrJM~hmU8EckP}5{FWOvF>z8oi;(F}8n%}X3#aFiavZ(g zSWb@bD~R?fDL(+Uoo+$oTMmQiuG!20Uf<%^D1+9~PM0*3c1-y)W&-V~HJ48$ysRO$ zueb$XGqYY{G-F`Z5qdmq$1Ygg4YX7N?rtz1hmkOS8NTVl=3U}R-%*Z(@yfjBto-Ql zq7B@BF)f0Ge@j%z5q?xG%c4sTpXoR*+RlLnB3GIsIuD2YHp(r%db>Y^%G-H^q!}F7 zn^_`cWnnIFv^Ehr_rw8D2KZnzpBk=3o0&wWtHA)Enb2ZG6O;J#h#q?VC0+%FG;K>} zvW`NsimT%-(p9SOY#P6gkty+-^!pqvZr&Z%HHg6}G#5m6+g5un3~{l$!fd+3eV-qk z;ZJ~mwdj(ct)i?yJe7NLwGl8Z-#!N(fuTNP=_h&*m;N>PCeyQT2?ujM`T_SRv36QGV zL{Z`=QN3}UAEJoo?>|7RqjVPk1-jV(3v_X?|IgvuH0(*|f8pEOy4|G8tU_ocUwqfw z(*2r46kZkbic9+nDwGAL<3y9-RKDzdML{3|3AJjsaq)tAOQ5goyg8qHk(-mM{Oei) zUz7&Q0U|_~y)Axk7R{isl3(FoMBSYeAHzR4PXf^-f`bXcYYrX(-7xgv4vfD`;6JDk z8p)378CO^yIvXl#Uue|63;W(4TIBqu6C*D86+`QEA>0rpUS=c9uUd`k4Zqb|u%la> z(K;l*qnQr-p{30IvGs0JxSkv&iC*l$_JNvRCu*@1YWAe<67Ugl3?KJYJN89W&4e>b zZ>7BF8me4TGg26^y{4PRz@#bguImbw;y5BtuhJ$$*k-!Al>%$Aicj~Dm1#~Laj<&2 z86tX&palGNfHl(C7wECI{+Ox$8CLSB8Me>AmBRVK83D{|@NwhA6dNA=AI9FPT@Yni z+8wrS+qP}@ux;D6ZQHhO+qUig`Z?!v&x`dZDzhRZ-XM5eMd!#8#5bq{02>|ek44Ap z$_4-Qa^PY01aG1N$=H7yeCbLb@Xtr;qr`icgpFiYs`#rok~c&E=iyU8)XqT(BKNM! zkdDXye3T&QjZdJUj?&o<3JasmC@p!Si*;-dfuR{^9*tBtf)-YPhXDJy z(8aa%=vH8qvR%NMO)dpVJLN+yGBQFgH=~d69|Q(s)y+)@t(6;Oe!LX0K6>zEu$XwW zkO4_ogS~Ra@JIhkms7@nYop!-XYPjMr{$E*ganwyt!~&a6~-)ikBdkBv%4uTluqFM zjz)?v&FH9ZJDXOvOp-uvQWAf%4o*3R78JexEi;q|%z|hn0k~6XOP5U=Eipn^Cf+lU zsiR$_*-z-0+|%^Is%aP(ev(3R_)jZviYo&cuRpi|^bn($J03iVDo%hw5~Kf%29xO0 zy?)4g!gbt3r_~&iiPN?t&IcjB)40@14+9 zGQs598$aa`m3-qymfxLK2So(2!?>JPyF9cpOCKyA=2uR#0WZ!&Vr(oF$RJ{cx>W%2 z7DDe6r@$5G>&vs0^)+A*U()YBMFJr_wA6PALr_N=AOGyn+Y0*Ftcs**V2J@!pDuA_ zZ|Q?U=K_1{C&u>`22E*9p|uK1^$|*3-a?OJTd@Y3!mout#NHM#n1Xuf@Yyf@R8J7A z5^aF@i)+Pe-B0bhG%^}%sorza=I=qIrb|4IDr$bcT|$&W8y<=n!lUHf7}~0ZNOe5A zK2HP&zZ*r>A5<`fJW)O9@B?kT%@AL}&SSg>IK zdjRYZvHf=w3=?Jy{X`OzDB6-D0Vs;u)%yF~!7{~ai>~0i^7p4ez4-^ToAhv5x2(WZ zC)BS~U;kf<>PlDQ<%K#E)p_@CBrP@!NMu;lzj5}P5 zD0KXH>Yq=1m5M3B9|1cs;M!PEpRSWwi4H3VY$A$FyGvGm$1 zOHS@`E~t_&cN5NAtV79Z*BlnYx`=VdvgmPOd|*bcsldJlfTG8DxyM#oDniw(zXiTi zPnRwey3qvzdd=a^+12&U#!wB62pU+$qD-~T>Hi8@G-pfC4XhOBm&1`*0acmu z%9v*@Wr2+(3a3GMY$@23`B34Ijm1%wyp`&>EWM6(-7<2h&gwkB;VUO>t%YFgr0M-@ z=SuwKE%&in_GUEYA9xn0aImnwtp4)&K5o!-SSaxxGZ3C(daqJi=6zI2MrA{p8?aYk z?1Va(YZ*Ii4Q@skT4VD7Zb^+ksqM_|9RAig0fs27i`)|hOO&(dt0nDSLZWZ6e_Nii zS8mg?hJKN$x(rTxM8GR&8tEbpa0usl<61@2Y!X+B4mqP0(>kuFE$jGIK$z>8hZ#yBTW z|A_>QiM7maN+XT(6i^m&aM$;uaDV>f4%PaHAw-kbD-Y^axj>b1s)ZL^iXKl!R@jPE zMUIunFeqGyAOgK4Si?vL=w=IAz=$z}_uXC}a0^hy>qy^<&OQSXEnoTw6ipUKX;xRQ zG6>AzNn|_+e=Jn-M#FsDGcpufS@{=njQUa8m~Rz9b-OeQoL=~89@h%HyDBgQYziTP zm;&ayM6MYdbU1`9I1YyBu!;#go)q*c_nTcNv$I9tw80rYIlsBgA-#4H?t}2gQ^L}^;RlY#zvl|0e{j}f3KSb_{==?sZcn!U`9>swECyU;X9 zptd^woBXx6{uX#w)WOURzw6;CTHG?X$5Y4JoC|xV4#?1L#d<{+zl#DLTG#ujl@>qm zg^r`sd92P7FQKNV6Wb15*TRgGjq67Yr+~psk0j~PJh~Q|uLI#N)d`f+!ri*k zu0gp%XjppMtOccz^%4vl1}_7INsM0ES^K!BTvg4M#*i#5eUTwy^rSjYJnmwojs0PI zChYQwsAQNUo6I)TN)~p^>{0H`|k`}5rO3f@Eg2kEF1;n7A1I7H^G811q?l_Y)I9l|$TFdwMLHk|%tX+c=U}FX{)8QB_1feXB02PpX(*w1f`+i{D&4 zC^xA^jI6zTJF780ve#{`*?YK-(bzLp>R$=Q10hR0#XTdO1pCo|B0$iw3QXYYn0*AK zi^BrIlTnN7Z6Z6(4pDgK=#OAAl_9jXkdKvy)f|4r_V)BbxT*>7d+0-3@wfW&4 zW$dgZN`=;i#hR_1((D4PPy7yUY=QsSSO0@qz{twZ{=bTZIci$}EY&E!Z*}upCNzc; zIy7Gc81pqZ49)O5FwX|KAex0%go)(|j!15PzGv~vBe6=xz(`SCJnX(_gT$9UPvvh0 z53X(PK66NMij4)>r#EoA?Gcb#VY*W6B+srPZ)Jbyn8FLk_x6cH+xlGl=*yS(K@Bjl z0tlqWJyX;XcTuJYWY~P&Q0mnc`!qtW{;C|^;Za!WQA`oSrxK$7DWR>frm5hj%eXss z(mg4QbStqQX9^d-{5zTxBd)U9bnr>hVt$S1cI@$%m;?TtY7sWMonlgx1*o zDQen3N$h@9^|iQ9qCa5$$+rZuM5|v3BiwG?73f`-{oNUE zmOekY-$QaEzD%Z4CSkxP-YEGq0kK=|h}z7J7b?d6^7>(*4^RFfrLi4xQ}hx-10bLa zz!B*05R;^Lt(3=N(!3)IC$|*&O_RK)11j`=@AqsMVQ`$upN*6$&?&#g!gsv}!S%+4 za9DU0I1T}4YHo=6u^n!R=>l&g&|qK!P_?F?U(1%OnIy3{ac2kogWOaDez{_v4-Mu&Vhx6uW1@F7QPwtwd4!`fP|ITH8-K zyB$nW?E;}A)+V1xO(cNW&Q+w&eO-$T)5!bRT1ee|O3*#MWll%L^NGi#8KxugIuU=n?uqGgX(?RZ}{sJzKS#TMbl2X;}4x@2)39 zjx;Nf&HW6fq-b|tJAnaa%SL$na*M$p4&7u`Eoo~}eY_Nx@VOP&pri|?Iqq?IiFe%w z$itFAP{{`o>{e*prT8{s2caa^NuzjLh?&(z!&N<^48pbXIE;y*&MlY|0#On|M)r^j zu*w48foMpXVg}bIV%_B6z&)LX^3Kn#fe{S@bqVS6@`y4&Im(P?RyXEGJtJnwHGHts8cQ6nhVwc4SPVeiw|Ew;{%DPERP zfHeqQ@kSA0R@r)g%9)*7a}H;QjE$>22*+JO^#GyD{qTYo!&os6KR2BGVm^9$$HL5C zV+b+0gCb5(So1>hSRjyqg9HzVn_sK#cwbY)?jZ)>uxj0#mO1b2fq)6Fxi$xRr?dn$ zNgq1db6A^XS#x@ShO?BUi9yhj#=8t=V04^z(14PX$u*@-Au2iJDsSvuQvwNCtAHQrdKd$p*g=~u3Gxs2$DK< zZNrM6Qf0}M*vOx)D(?J9M9vytYJ#Id#u_8@Mx@zhv|kQUzVmQ@g3!V8V5lgB-DwmU zmK$tn2_G04Xs(P^pS%)yQ{8p?u7}7`Cg4m$_N1Z%SH6BfR<|fLzUBOBon3&+mkMfy`b~IX_}$`TK>q4dW1F*BK*zdmo<=J zcn+LdEkwN7Z>qS)>16bwMNrU0^)AUs9={ZF^{KXgnU6B6sgZ#f%tjUqj%<@ z`oDvRmFfQqC5((r9RKs+QI(DRm*wfXtGic>+SF7`U40b{Ly-tXGgoN7t)K+SETmy$ zsYpzA%lZD8jbGl}HE-(IrE%=#!0BZ_vTn^YX^La#x3jzDi+2=jbWXAvx89n4gq4hH z%&uva&75nUxxPEzx-sm~CL1ej*YM1K(qAXgDIpwR#Hsn zgHS06YXc|bGdmfLyPvjAH`y&C(K*dI!N>uk8xJIew&%4rhTHPJn9{z^1xzBu4xjwX-E2~3LMF}=wWb#ia8syFs}!dLtyesjf6 z#ThG(ik3L+AW4;L7iR@r=fUFalcfUCG9EWT8P>gsiH(RAiq4Nc~tM zaw6b)FN~?a9{aJacJZQIAct5T{&@nhn=QI1Tv_$hwTsm!M$H8DsnnXMSqJAQ)7SIF zGPhDo8V^eGns3N4wVH`iGX24CVe8hz1d5;Y0cweYBH1CZGAhe=0-h&k3f_77_pH_M zf>XDEZUiKe$STIT%d$?c8cC?Qp@A+J75LQx?BxT17%6r!`D~W`id%!32`USLEl7Wq z#mikj#%MQ%NosFHDy<&`5zU;sEHdO8wnM&HG>`}+9uSP;SU%xc7iAvZDgSg zAK>bo=%UdL=3~c_{OX+h#(gT>Voyw{5{^fu>}I$EOEvuML1QRW7*nO(JkLrmn4A~| zSiC&px4ilKv`1{DYCRU>-fF61SPiHo4uvq|yRg0)@CB;F3^w;3LJ=2ZCp0WG=?<+d+GV0iZ7ktYA0j#+`gD zPCTo3zaWOA1fd*YqZu^Dr>aOjx#dFjumj*}jT-g|dYkx;+tmGY>PT6`7k%$hinRkT zUQb0w&XrM&^-g<}_LBogCe1I*Xz1E*OBdCP^g%f#`E~jNqRlwh{In21tP#r-3trG= zIrzp5l5ghTCZlWkpRBCoyI+mPhZ5z@H!wPq6ypWm7rQW$?otZYOxv`h^|$yBXMs%83s z=}P48wr=Lz{H5Dm#>z`y`kpQ;Zm_j8o*DYtrLob?@j?^OUFJYuT)8_dZrl!zdvmn) z-EUnE+R^^Igbo28S^YZO+^x>6^AUlg z+kW}0no&Z+X%0ps+}RLHl@QQ`|GJk7crO3y(^l>VswV7xT8fPHW z>x2kIVe!CA(}q+>Qf#u+Pi^kvPx#t$H@ublgy$Y{1lKrN=9rOayk%Zqa&=4x;sght z>$(5B=e`QhJx^6LXVh!pjYQpsX*CVz(?2-v)v9c+9c2u-DP_z)U={jyO-eza01<{F zW?Ih2F@|L_98gpypk}TJfDF^*nQN#G=kSE$*KYn|dc@b^erDi@c-aQC#T!lf8x9bf z>+i#W;aNct0DH4}oh|r+;nv^C<*Op^_wcuA$zOoai_$m(=zmjQMkwIc*9yNw}0y$yhM3sM5^9r>n@XQC0k zfSeV)$HRIb2agg=ZYrA-o;2f!E!oat*XHIxYn9`HM5mDL5aju=RKgSSM#1q2$pW?p zhPO3`_#O=YWZsSu7$7>!Sev^Nps}F3QMaWe6jDshrFCcbgwwI;6 zDa)udlUb2Yry>k^1@eoqXw|pmA3@P<_U2UnVUjdxT%b3z)E#6&?u_>n^6_GJS8R5~ z^v1qi=KKfH=)r{pA4^HZ0?y}MRWx_r9smS{9d7e|gi%Z)vUcNo2HY6ni`jsXc>tor zTOTK?a(5>i5Sp!Gi^q9WA>)DHY!VQs7?}rBXtry26x~77Nq-OYz*Ad4>_iSMh06J( z`x>#Mjvr1qy|%9Ql%2^EFO1ss5=&V?<4+;Ty?&(YVgOd24}#=1T3?JTN6*vFTsBS! z5kN|=JH7KxrtCP^^y*3MAJ3b*5vLu|Aq)HsE~h$LT<1a3-y^~0)_flrKzm)x`ua46 z>LR&W>v1<(zP2O4h>_u_f1irjc53tIbg+NQ0QQcqNLU^10rWxIUG}2tE$Z(uj*Up} zANt&)n0kc>VbZYiF+LOhLJ!L_-n#q~?y)H^hT)2vQr63maJ4?+xiL!XuSmo@0{A!# z5e$JF{93@^Ls|?3hR}9p2B;K3h!nuQEUCp{skNk%g)N8`zUe8>Zp7!s5t{N=wpm>^ zpYk@FH8}(SGTLS=j!PzUwr)YVz`H|1NQQ1xa{+5?bc#9?@pmcL?9Sw4BB8d083P%8 z6nP&uu$4patFGT^i_8ac!@6B1yvP-u)|mf*YZUULV!j+uaJk%h+V zZKzOSt21zFu@ml+nXe0P=e9!XG?su7M6yv(GQHA8_NVtqBzw$hI+J;yYWOia3I5zq z0>7hgSL+~?Oodkhi$^8;Eu6F5NJ!WdN9VX3`$F%usl?cDWemp;J^xWNK6QyM#%Cb0 z(aQW(xM5`nqe9D>xAH5AN44vM?O4|B**-Y{uSdaY8(g*TvS1D&>um_2dJ20EmuDj) z`Z|%p_~6b5G?yvHu!SFqLk$z}HWbiO4M9REZneP2g0BV__<;Lg7DiOm2S6NTW(%mX z4SI3o+Yg=*p6hzxN2*O*!ty@M?FKn^xS(eEAZJ;Rhrh(FzNgSZp#zz`ZA|zVR}3vr zQ{WVg@#`P}3bp_uQcAuev}s45j=kV>F^8uR_?-_c%!jKOb@vOv&QLN6LMVPS7QxRoKm#(+by7fw`W%b(yR9U76xYWQJX^M$f*8RJw?I z;qP-HJ$maO@-T*N_J7{(%;-)@Q`<*-LmINtFSa7s=Uuj8r4&|Zh{u-xLVU9p2wC9? zPXZg#2>|+HgaOy7OE8zU4LIvIY#Ho;#p19^us!N2^I>J^Cow)=_JB+9i!^#>+C?O; zyfN=ge=@WFU57)U5|03U#M zPvwnTf%3Bt=8)BfW&;Ni$pLY!lOrFls(CeHRwUr(WyZ05<#=bkSCW@n*nVt(nvoGE z+%S^`yY>BYNx!D1*L&@Fe}5cOxf-=@8Hdh3D7v zdmH&d$;O?V$&p~%l*H8DE zR9fIn$$``eTCoAk)kTojSJqWkn;H(6!L^tG1+xyXZ6ubc zco%JD4TEAD`$jMIu8knP$A^KH35uN?WYYpP{{Xo6pSLKD=)93mjcaSPBU8W&HtqqF z>_XgjAWYPV6Cx(}I-E?&-HJ+_-NcjibNr6r0K!2MX+b{Q7QKD*2?~%~1X?KsD3=Sjf`U+uE8K{|X7ntmD1Z)!nlwhQ+h# zx|OHQ_3+~~Tm)*&LAwHGxPtnF_UiD{`{v$!&Z6P(B55_(|Bl6}6C=0DBcqbS&|d)7 zn1-_3sIjw@e06>CCalb%lqJV{7_vcH52cS$%28rdpOh|+%IMD`8eJ;LzI5a6x zjmI=msypTVTWGZ25qdZ|IN#}5x31HdKx}TiEct(EO!e#XNPvy^gxsAcWzx4MC%G$u zZvdVGWeWZ5YKRz>kz3ka^zh1ej!|piZjejc5jX^%pc;EZqh~riaX3i)12NN~hfh3f zJmLo{U`ndvJlvo+h-RnQ@b!>S6&)2U!bjBM$WGoGFi4|?=f!W%0MUy4GyDVR-kbtP zAWXm(vRNI5lG6%Y#yh9&`0l)~o7h@a>1MXtjF51T25v=g30n*rc{`#boS;5YiHe!K>gp@P%gc0nGLha&uq3`b5NxHsMUC zvG}{*z%PCP3Ab}R_t@iMkHu)Xvj zKKvfN@rtf16YvF9iiuy?UQvXA~Vs`+wV=P7Vbk4=USa{{eb2Q4}!a~hC~=PMQvx@!l07TC7R z4MRz~Oqcvnp;*nFLuFHYqpd|H9W~jridv6!*3p{$PKbvBQhX;R zD{w~vokt50Z(2TrZg zbc*9dJ0Bpz#wnHT~k2^Zk+xA?mUI@sT#P#26w*pZ)6jtYy6&cX=!DjBJMD<7~% zf5@k4wt0?}(~nr@JtX{?#bJP~%O~_KACqa;uKAe%H}s|`YQ z1JgkV2}@+<`St`jK2JmNDhg5%O&qXE_TyBU=Y*6?JRh18niZx`&!aA3z+$O$r{4Dp zej<71;`KjxFWlZy#b1Dp!IGG_0fxN(0;f*nOoc`+WNHlZ=gM=haR={{*c>sqV6U9& z77!=-3NCINR(zr#jY2uHXhKT-QWsc12bSYI+kBjR%WY;p0uDViyU)?T@-WeG>lbal zi`;s}W3PmDmvnlxU}el{d<~rPd86pf4S?cz*DUkS2FpH3N--ZaZ5jkX-Y#}8>b9fF zxkEQE>ixXJ9g!t?vQ6-zh{W%P8w5j4{;o?I`4Gcn=me$k;p1h`y z#}}T9WZ2=9=nU4+wRpur{F0gDAj}R0X-(Nb zbR-~!rlsMK%WoHe%=+-R{L`dP-|_7KSk0Y3ITl&Z46IFQoUhNAc4l)U<@nN(c42TO zhM{Kh0p?=K^1SwP3mYVr*Wyq&a20AuGywQ0;V0NYdTF&bM|o+G<@|_T#19 zLI0$o*H)L7W&P1!4B3e(z!pHnzVSI}BY5lY2auK-@`X8;dJoc7yzbhkRkXI|g2$~@ zwf@Pe8AkG0iCxC$ZnXW*wY=o{+bOc(Ch$}vcOrqj!wWAiifP4a1f`@+5naJw&ETqv zB15j5A*)qsE^p+5(FG{})e8dp!F)NO2lZ7Y#;bEEQ7iZ$?O$yhpm1T@E&%3l<~|}P zF|Y-0@#|imjY!bdDP;hkMDU^y0z!SXV$7s&k$_Hcu9**QpUc2^997@akldOD>qX;w z9kdQvzw1@np>n`_@fUI;%EAzT6S=#5C7_O##8+`WdTg#UkfVN%d^(H5?Y+3@@Sboz zQFZdq?!XzNBA0l`AQ2RlBkial?viz;>Cw)+sC_^XvL^HlHBNQ z1AW}&9K@vK+KMF;fA>*pb=V-XB5kxV(Q zSAkxHHP%Mm-h5SV^zmMA9l$PK&$qoqg~4TJn?gtq{sFt0mVa2Iune3C2HdG_50n$l z-xHmm@&_Yy4Xcbe1mF8+`|dP^cOnk$8lrMcB(GqIBOYVUF|L3~@H!J1f#Ec^M>OxaUD@;nb~?w`)Z}kBJ6z74w$## zmpo*f9g3mOwFh$*tq2bCX~?%AN}QseW!>rpaY~-B(ZkI*^75N#V`Y!@yp1vk;dQr`;|+;Uoe)Y^N~y7k$c5T zrsI%N90|-v#z;lVqPsUBmOQ`JyWP?bNV@FWj&kt|=n4hTzP;Oih6sbY=5G`waCZ^3 z)ySJH{3gJ#HdcvO4hbe|yj9@hY!aXWh-ZczcZVO^)f!>5ov7p9URhQFzS*()JEDle zjT>Shn}4roo-Gkwlsa4wkc}Wik})l$!PERY9)dcY`-!8B^yS=zb_3{ z+(+^d>gsoGyI-^JkudgQd#rApQ@dsla+nr9Md5bD7H(+GR)(Z^(`lwK;3azrHf&BPsCX z5JuAB!zj?W;lS3A$wv6l=PjLqH^#Wil6UhZK0D+ z8*0Jkd=)?DjhQHN3T8wl_auxAA4D`f#la(q+G$5{ zR9GS=GGHs=ib|q|wtcWC*$Tm~oVbnX67BRW?nfWC%!zPs{EJ}hB}_?z_=&JE2g6gm z2+Jp^PJ$(nCi1m6)Kpmp5Z-{Lp=e(J5#)>HP+|aIM2ZQs1)ujuWkguLB$~N{$p?)? z)=I%=olD38s`vT1uJK@tM)?*|O5mm|TS{VJd}KQ-WDNi!uXM3IVE8i9{$bS`I=^1N z5AZ!~XBVfn%;~$uVUfIX-^1`HA6P)_=xAzU6h|9m4gAtkG4II z)I^>c@F1l;oImp=ExwvvDLXSo7Qp+jG&&H`ldg`CJ-%5!AegD=Kz|8cx^?p&z22xP zAnmjqPDfe90Fk=95@z28_+xMgypBdAyRKDy_Sd7`z;4(*lztXqfHfb>AHXa0b$h zEK#Mz-jwv2OYLkJ8SeFdJkPGjRxS~ELpuA^?~7(IV4~ShV*IRi|G**pT-N+IlTMRV zR19Wj49zcNA%cwi9~aRueJ%8ytOZhJik~weOuB*If_C@I; zf7#ylZ^ULnMtDZDGol0S4dW6dGMVQqapa#jhc#wa9*!IkGlx57vJH^d%J-rsd7T47{xs zYHoB(5Fo-snkXpXGGXUfz;bKrKXeRIoXobL_LXDCI_3)~@p zNd1<%Uy>MeC5nKjkP9KtG8M``pTo_)0Yc00=rE>nj)|e^UQ(}FEF+DFCEn+S%IXmm zsAk0fx`r&l`1q`A0#s$(t7#%kTct1rrKux`Sb#TSeM#4YcWA3W+0X2owqD9NH6(vG z+ksydqWv@!Jw@5Q(M?=wQ(M;-$DCCh$QNw@<&X<~AAk=oa!5P9)=ydY3{a$Ik0gtDke5gq3=H%`K%ava#@#~P&B;>kv#4-x+NpOZ z(wgB}Q5;BvjP%x=(jA=HD7#1{8_~kjs@GpdDkNagZ<&$$m_5?{8M{C7r(T3WC;lASun)woYE(Jxq|c|Lha+{FdHZx;t7A%coh8^6T({T(Pu(de-_2P)yS;^i%O(moi!^b+lr^fgf7Q~Kg)!u zTcnuApMfcQd7r+gK5+G|5*nLb4yuQjHCc$DHSQF}bQE{jh!J?TZGu)p7dz8EsqZ1q zJu>6?X};MEY>oz?tUIvdvo#%?Yl6trRn(iOqK;LOdoFs}kFH?}s5>#6zj`M%yd838 zDLQ)WEUQJ7PCg)#)s?`SEH2%I@!Iuzt`x^`4BvW4 zuBC+x&DAfhSSCK7^!-3eS_0Y4Rc7c!bJ^HY0tL2?y^gj;d-isP3)|aQC039nU%yOn z?zk~pSq!rsF!T zTkfW}iG&$5!9E3>-g5q`=rgn5?cLbPM`lc30K5sS{+>c>9hD0^=wC5k_6#SiHXk@a z=tFFRh5n!+77bh`dTYp797J!kxYfZQaR)dMEiH4@Z=-gt$xJ5m0$R-Dww9w)D9BSCob7#fIPTDNLXOJ$H zj7mA~5t`sMqU(J})PKfqAN_qnqqAC&0OWSQWnfi?mPYV4@)qw8pdLd_qweFFaz_0& zPr)fYyi}Q>1PsL3q3U1!*ym$92S20@&1L7UX7ye2j^_}N`O5F6GV**u)J$zpKP1x$N;@So!y4xu!G3H(wC8?NVhery1Zhiw2#$i03Fu)7o&K zygI>EJ@c$BZIz$AF4>0JY^<0@7q3aZ$RQtGd0GdEnHLqN2Rb~6%!=_RZ=KnUJhJo? zd1N`|P9})0NWxBs3;?D+^P3;S_XaP=Opi4N?}gV z&)-5gKfC!9-aqPU@1a+pnd2~WW)+5N5rK75STM40p@CgO0=IQB9}_)<&ZsVXN>eEc zZ?$=N$~81Scbh>@$yjQK79p7(jp85=V7wGwD$c~UrY+z8SgKlKCEuXulsmys(-{fg zu4Rz)uX4y>Q^Fe?hNS0C39N4oOmjXYpgOfc=-fIv_c(MA=LbJoNX>|?^9b7h{Cd!L zyq<V3cwZ$yJOV z8ILxYJw&Hu37ogK!N0(FAZfcB)`C|+58`yZj#><;ws*t7rAcQdemaLs*pU?s6OqKd z-UwU8#1NX|bJT$Dsh7%C zBl*Qq*RK=qp)l1&rdB7}AY)NQVMkMr?2j1+NoQozg*J4%Iyzk+VG|MLL~_oUT35s= zN<<|wstL%b+SUbr)xR2J*-xmb?>qc1AGms)dw7-`658GMRJf^126gwDPLdB z5l5yHS1F}v)_=F!P)O|qF(IKm=#=eL{EOo=^Ctl*v(ZUsTGqETiljT}+etzS|CvmKCwZ?kpp=LWu2@#p}2uB0k$JweMXK<{?a)W#d7 z7i9%Ew`dTjbocc_(~W(z=eo0X6pdHbKbA76XshE5Xts*f!Y!BBhPyv(JJE$kqxaJ& z>UO%iw8rm}EE|(hur=D$3I2~3IhbR$5#hR})m{RxH*Mu)`wh4ENtMo4hws;Uq>YBk z>y|2hv{ZBy8`b>z&NRC*&IK-YJ+bAfA_%cJ57d4SDHV=yH!%D)k@(P?uq6bX!^&%q zPAxSU>>xG5ukbit3P}YPuR1OVBxeFuR!(JCd{2qU$&&C3joKSc+(+|Cpudn{Itdny z0Hv8gxydq^t&nwF&Kaa4P0n4HnyP8Ci58uu>+4OpSGXXCUNvmyYAJSDCn~dD7}b<& z+S58T*mM0Xhhvor)-GHsSuo_svhQ)hPdartP(b1mE+uXi8m~3(UX7RQ2-v^N5n*iH z^=h*q213Zyi~?7@fxI%SGKN!zVi#p8MY>2v(?SaJ{Er{Ckn)Fs!{g5xPw?Fa{ zPIkeut?pS=pl1}Pfz&rqO8|GS3`jby5i~bi0jgkMq+;LUAAQkq$a+AsO|Ic`L3gR7 z6*>%I5C_7vpFFvF8ud*L0<=JE7H1-YK!RxbLni1!xNsI6oMGe2HNhYd;t5pV88T!z z{$){IN&rd4ql}KM)5&#+eZAlo00dc@dfw6KeGmVjjh5Bf%~>F2cp+H9jrFs7_I)_b z99RPY-~xmC>LTa8hw5GIb8z~#r;2z$AK+JQqEQ(q%vLcv0TsSmfp>2vj`JfnPc_3e zmPLW;7|y^4$EvT6Wh0EEeAdi~kAWfN69D@ogzMEQZ6ow|Cg_9^;rAq9NJQbcvB`s{ zPK;=^^($Wo>$rHc;UAJ|4e~PFetZJia%(4~c>8=FFpfc+P8ct}+3`a`ZOYtBNLY-m&j`caCauNdfo09LbLj7#M*`p2=;5a_IuLs^pPj3h&(19BI%aSNZEw52;9Tsyka30;EK?11FSm_ke09IQ(!FPfp2@LZ;~FFPGdYw`gt9LHv7u#WYP@K zSVWIv$rv&LiCY0eu+)Du&@ywOFSC7~bdPdm8@lt$Bq1~`zQw<;*XoqvZctKb8ShJj zD*tPaLI`lxUnH4lr2^%K^GDKWhoitTElJEZ*R1Bns&P-*hp6uYBT%%nu!c2edua_e zs3o%QRrf9j*NV1}Ck__!kW(2~-h6UMD(Pi9(1Gd*8FcS*rXC?5Dt825&aA{@k)VS_lNYO#*T~KnUw8Jv*L7S~= zwHsLm0=)PiwSIn%;s;iF*DsGOmASE{kmlUtWs){(MlxkT=ttWw`h5#3PW=vMGV~$3 z95uEjiG4Nc=)=ccPfNl~BA<}|8iMw`|EaK+#hbY{!W|(i1ISZT*Jc`b0rWaF6yAyt z`8xPKKJcc>>~Ii8G58Ah@q})4joaOo4`ds1oB=iceIgWK}%MZHoEtI*Xi@>3~sEHomP>uTN z7SJ^7E6!O8-Axeh@T?5!(E0gGMYlz`e5xuV>ljt>F>abGr78*Dtzn)wc`Y8(bNU3n zP`F8%*h{o0ebc+Jeym&<1I!@#F%NgSQix=s$UbNl%fwMWhWl`Hx@zAcelL90b$eqq z6@6Hx-OabkUUqRa?)SJUcS&efpj}@5+LfKt8(C7CQ>V(?cvOJPv6BD$P#x?T{MAk! zG*WlH-c1(=WeIhO=Y{AZO~|YIunzutCJ%Uf(9WUH%~AlLH^w%?dQiuG9S&*Mr!8(4 zRvcL8=vz|5%_prOPvukM+giHOSC7W~T~AcE1H%6az`6dX9a(G~|JOSknl$D9?a1nW z)4JBgjl>b8aCMSdgJ75=UE^341B3!Q!fG7vNV|F_eZC-#Cep7sqR@Xc#%_+d+x2JL zN=WqUA30kXpFDk`tA@3jXB{6sjDs03o69VkP!-|SyJdW}B9NmYtKKLH$tB|Ksm5vd z{*=9L3z$H+tsinLXM-S?dI3xbMkdx>k$R_Jn zjx*T-ye<~l>u4uQY7J~MC2v)lT}jf7CG#uML9X_5KLo39z^`~EtDa^%i7zUK(=JQg zVDa8d0-Ibg8mF)_aI=zoJq1;f{4e`LwzXNQH2vt=f)rSjw}QWjW{j*IyAQFVzgV$Y zZOJ!&cS9+i0ZiI}3vC!Vj+Qb~Wpya*g(Av|=a5!c(@`5*9CMB+5y~=4IMvv~((#X07H!JH z*R6bQ=au_Rqo=Ed9FM_0cI6l<+j?!B+Zc-1L7xIOqxBM$*fbEvG*L~M%q(*}ZOrkd z9JDV;Ume}L!0lRxOQA0^_*Aa~b1&h^!+ z?(T&{_a>{)2V8pWkQcB7FakDHtWm_TaJ4j0*Ew}!=Q^4z8uEjF$m|c0RJ`}HB3D|_ z>YK}-%!8TUl?qh)%pZim3AWiXr*tV5T)f>jzs6W;Y{lu?B}!6XMwdS~F2c$}H*U3^ z`H~ithy|*;_8z>#tiky6lLRST*O0jV@!pU2mc%05rZ9o~rJMm*5IoQ*3>W5BREr(g zA&C*(6X;6e_B-rzU!Oh$eS-4TojigbmYfDaAro>q2yluPPQWauqB(e-sN;9_=4(8F zW%*hL#bV)1eFBfop1LYS;LyyrAQ2mqhaui&k6ry3uk>;#Qm{t8qU9JTC{(kZ7(Fmb zSt$50mQ0>g?)a#>izE)p2HE}2WY0%h1u^!(-SgHvf`yc?LXZd!&9{&#y^RLDMeEwo zjzrAJwyUXz=r{3#hSl+QbHiV1Or!Ao)hGlGNqhicF(Z&C_SD_BR69m3nxFQt2U5qP zETqVAdEArTZUms@^@fOnlopPJyr+6|yLL!s>U*k>Fqn72`SYKdBwi z_Hqa(SLb}927|iRj{8Qy$zJj!iz4mbqN^r)*}}QWJ0IVO_M`x=SEBbZb?3uC&uR4| z)=u)+HSm32R4Rm}71GKOMUX-vU9l1uQ)Cb9PyU)4*%2mXZW-y}As&7HUx~3Qgw$=S zrow|2Jfv~9p3R}O4EQIA&;q2$a|INvSi1Kao~eC*nfm}`SnfWP?*!z*F(Rt`hX>4$ z;Q05~;3*Nmpq(6rJbscr=DV-t8ARpRZ?fG>l$zOONT=yqfdT0U7GI_pLrhFYWRs*l-8P78y2ZF=6JK{Dd#ki4@_t(qg?0X2+ z7iL9e&7FbD=ev%h+m16twr;Hs9%oz9+WOv6rYv-EY`JK|b(Gq&FUU=|sQmxIGyhL# zw6k#jU+z>35N0r6v6W+pl(L$q))p@i~gJc9}1K?DcSZ zTF*=yss$1Kb5rasK~TafGQuvwmp~U+PE1O)Yzuz$*ROqwX=BX58l4cg#nK<)0_W0+D=I?=OUO!dJcV9tqtG|u1UuO0< z<>c==f>#{4_sHmC%|mB4AJbE#=R-pkuCM z>2p;wN0X!~o(U@#xal(LQj!eKhqwo&f6)Syj4YN~PtGy>+&kCk)!Mf=j*k*|SIxMl zR)Z8Qi`k$lcFc}5Tl)6_HI#d6Ng=}v=d3`&P%rrpr&Bjxn4tf3vFG=Q0a$=dO1?>M z@R>i)lXWF1_UBGT`Y4bYwWddhwcCXLqj#~B8N4u^5*F;ykD-P8zOG#a?(q@gTTG!` zgcP1kk@pMgVY*zsR=r3}D5$cTh(&h;YOi>&n%ZC+)ddAf8&qvDG#bKE!*7Tzb9q1T zCgKY(b1tFm0;>gU;hV*{ZwFn4XF9cXf`GUXr@S18cn}q&km|Q~1asTJ%8^F``|b3p zFcv3ES)Do^YP2Q+rS?06?nZxdyJHx`&nZBZXp2=}YPLU=wf>Z3>&`AYrPXYtDN%rb z9n5l=$xf^Px7~yICBG@_2t$rF9|j@Zi`jp2n0v5rd7f~ zr@<|ooMnP}iJqr2&X4-48<2i?YY&ZemwbIORN>+NR{rc>oK|10s-dUY!r8~QYX7{* z14N1F!(5qN{L4IKJ=2KD!+VdQ{tdjb#(SizD*;I|e`Rn|RQYePPn2N>vsGZOf5^cd z7%lwy>Z6cB<&OpXC}XFu-S`6D*i`c`O?IQi?r`PAp>n9`XGb?%AB)3xZXjbW3&Q7* zx`R{+i~t1QD9hpr1simkdC$CC8e|k^K_UYbLIf62_!pDan7JqZSWXd`Rwandm~w34BnA0XC&QcqwZl= z*W4lLp4L%ZVmkQk_3(ouhm+1eoFDoJMw?cl`S13@)XgE`DVD|vT|IHze|@_OptmA{ zzsmCcrKZgUen(A3?n&@)mP!IDXbljs7%j$CA$=<+H=*w8&#n(5bk^s*OdO%(bwis` ze&N?M0VU)jha-7p@01@AC(U6h9Npb_Qou#(`XBt;|3Lk+uyFlf`?m|N|2OiiEg2K$ z*ikETUBeiKl2A78kenqQ5lKmD0@1l$-E0N=w+N;)6Q4J3rdqmDqKGYo2(|$d3gj@r z+Mle2-37j4n8Jj=*@+8Q{ccdIGzB(D*_Dg?X17bMn4;wJYb}Ghxtc-@)_KG<;~eIq zN$S+h8MkhMRme&bYC#oi&_ZwOEp|ddE#{-$YYb|R0NbF-iUGUv=Tm|bF|l-JV%8{G z{GH1Rv+EFhYU}T|Vyb1ra3|qT#u==|*0*k6l}M$FkwtbFdXy1+s@MB=Y9HG-r`jRE zDQKh={Vfw@2z<27eYaL@sDzG|eX5Z)OlFxLRbKLmIxd=R8JzjO?S?-UaJBNtiRj=O zX2_)Ms?}w58b9}tuc*HYwQFYmfTz4IW~utBIq$c^lCGJ4DYpdwe#0-?J#Ke%KTuOY z+9?U$Dit>8dcLsjn|W!a5@!wN%R>E)$Sg8;v72ZNvW|ug2@glg6`dU!eseYT(R7JR zGdGg>NX|C9WCuu?-Oes-@gdOEEvSk1bZAjJErOvFu;=Z_QRCwI%6B>`wYWMO@Z!E#YA>oF!ss_yHd{*sT0bp_@hn0fCdc;IsGtOMHbZT8uz;7Li#cL2X9PPF+ThzS z42YvzE!j|&xgTBP;PWZ1@un(ce?H!9jRLNsBV)xI*-G-eG0B)C%?yj&`j6yuaVyq% z*pt7*7ntTw(G0oXZCEVEV(+Wv)j&+d&N@j)%;I?sbEI}R^>x?3HY{IejumdWyBi7FuPd5~QPq*X2H5!ZQ!yQ6F}zb} ziX9y|lpN%>JDhUXrsgaBT`um*xh&6vW9OBVfzq{{b{fkAcA2-Y`94i|a9IvgOi69u zLvdKsU%Zjhd5_kl*AJ=t$0jvbC9IaM0L?*kfX!0xnXunW@^?*;K&E6X?f`g5DdojO zHX^Ut!OXL}@zKOPE(aTw&Jg@w7RjZASw0HVJp#YK3d{x^$7#cf^~4w54_@%- zzFgXT60JjBEblVveO8mEGGr1>WD@VSv$``?W3+bkMHhkSpL{hAs)@S_*Dl-0_gM;% z6YSv;iR0n%xzsv)%$m|!FgQJ$-g4=)-@AveeylTH`U29GPKfifrD|Qjjj(m%t*+&Q zhFjXKizLRslZ5x!YIX!{YFH4(EcQ!&qh6XHNhJMD{V{nVC3_Q^{xk`nD4KZX#03JCDCR8QwxoU!b+R=;! zV5dGxfJV$J_`eQ)eBhaY>J0v$o{sx}%CWisci%(e|K~IL9pbx?`k4{Jp7_Iu%_Hqf zTvjXJG5UTaBc@ZUBWU~?1VL7^DVxu~brxKE-6ymDZd{@%V}S|JY*I9maJfxdh#ee4 z$}7#0eZRKMKh2RQ^w8B+6j~r;I_IFe&IN&h4?!X6ED?;)udnx@ek>;A*qYunK#PJX zIifURzr||L>v3+^zZzv{wH*!-4o-zMPQ3TFP$**7^^|$TCaLXJ9C7^0xyn}OK9us> zgyVp90}uBqZ2NzTf%X5};j8;NTM#p8E1B9_n7P9-sd<>X|93^k!Nke}j!DbL+})a( zlbIQgN!r53%G#ZngP9$UNz}&OP1(X#%*nyo$4amj8^1o_}|IboCH-PlUkonsUA+Y|?8aiNr z?BxXzmL?8?K5}kp^%F%~|Ahi}v(bv?r9^xQMIv(f_O*I(&Rl7cxChwq&GmgfxwI)e z$td$G_uK#aL=F}vMuC9<`~UZ!!Ir%s{P%&OwM^tcm>l5;SIU9K7#f{^cb6X}N|j>5 z1gQKxs4x(_MhAk-Z8SUw@&0V?goBs$NIF#)P3PGWF~vu`0YVZ1M#;G}%!jVJhU3#d zBep({EeMO9*a1s)44)df%w(>lz=^zTLqWX4%hAmFpfpIX>8(&Zf2HgvJ-OcJXlSzu zuKIqM9X$xal);42-yDW*Hjo%V3Xz%1X~=FmKtT|nC5*!9#RDiNB@0t zL)KT&;6O_Kd&?ihN6Vc59fdTf7bvqE0R(M>yPaUAAN9doP=B}gS{mdH?Ckk3UKw}V(OqhDu{@-yuXHj@v00R*ZNk;+nmM8blQNO6iHv2;xX}lm>_1DX=ge(-OFLL45 zLZ=k1IMBknL9Fug&M$J{`}7z{<@IeRH-xlXgNR8mSxO|hU#?_EQjxQjoekpK6Qa{Q z?%)>Y{mS9J}n)uyp{*;IpDohjDq7xfJ(le3b#B=p~HP8Y)!R1)r99v zqPWbS`IY)END?b1EfMx)F$Sw(GkRsO26zy1y-NwnQR=TyEfNJp2u z4rO&yadi_Vzv&pP4p?($nB$egGHT$#R#HMVj8oEP4fTsVfgn{6ef;a)!q?!&`fn=% zLu_^b*L&Eqe}aYugFVF12r=Pzy=$tIi>;GmpsM8XJP4~kmq&v`*WH*N{YIuZ5;yab?cc&LX~0t+2u855G%M`lV)vF6di|Aa zbnsuk59|eEaxfCTavl>71{&qkQ~nEo1KhrTBceWsg3taj{Pr8$hO)1$({J49*RDXF zqj8hH?hHhXGe+Slh&>pps})ScN??@3rNP)n80HvCDtA){k*X$LZDCfVuGZ@XfRKk}@Z%|4p9!tyB7iFSr{sn}L!`n+i5QwA9 z_ZWUO<#wseKRrc_h1`Mulc6*c?C0II5C;dx8Uxsq(Kv)$>BVy~qq~3M0IY|#jORWB ztj|6o6^3?>EZpSRI+FoJ^UFCRtjgEb{MYd>eG9Rka;}Bv2?VggQ3|686NHeCQ+u13YF-D=T6P&H#wK)b(#QE5-_`y>`>n!)Z?Pf$F3I1Gd+ znly^z+g4|lVa=7_yJ7IqUs)7|2wJpy(ro3>R1DIPF||q8rY{Kt)G?TIEn$QCFT8u9 zk6Q1hW-S*Tim5nK6qq{b_3HtLFSVXz#A2p}3%Z5edht+n+Zh0T-BB2Q*>)J_`2-wr z83X8y5@yzl0Hmp?3GuH%J)e5?h1I;nON)yI|KvKjiR=INcmZYBBgW-6wWgKrM=CE3 z3ZsLn=pC23k5&$+Wzc6q3tTdAiq8_b!LKmXp|3$%pH!FF)eAS(m6f7tK)FV8A&0Qx zq^4Kp9eF*<{8^zoI8TU9b{jWS9HE$}tY)1VF;mP^SDkNf^jC2g`v4+g+Mzze{F7}o zQe@y%Tp+na7Zw(NAd@v4L<)VB#sJvj$7Q4?yzhEY0I(!9Lp8sce#fAv&H}*JP$jtL zzaq|h{xTlyKcqQrb^n2uLWK!yHyBA(Reb&pV}10~za8cr{^6_dHMiA>zT!kjU-d`L0$=Jc!ZUW*g%HcGmttdFUR z1o-t|7+q(mEwlW)&mU+i`~SWiJ+F2EO64ys2RHgvP@@WTj;JZ(A3=GaSqx@X=VT-E z)P}4;qj;y3prfOkUiWU>U_4m<*fo2S<2He1(D6Sfr0Uf2Pev#FO|b$gd)og-A+>_K zV#ijXkgu!vD`^VE01{!o$N|GjpIF4~V+;+@BRy3`Q8jvuhJl>0k9Fv<)sj z&5<^7ST(BMuKF0(+|OT!BYRS>HXTtV76b+v!Aa;`TOz~Mix_j!2`Tk>ECS;`iwHCf zrj3e3yaUV}P@7tMeU4NHWL+VAB zzLUXm<5L0+u|97ksgUf~M|MJWPpJpwF|od8t~VH2^Xq=nm*$rT6lk}}sMBVr2qDl< zn+}Bu9ZH!pS0gn_dq_}&kCqr=^6;y1EPu(Be@?y&kEB_%fr;v%1-5O%_ z(#|MtzKN9-Xol_a<#t}1ahCj`-R{5=|LuC|)@aSsai#e0_nuS{|11xDt&I%X%) zqWdkAv_+?L(TqZ5>EH`&z!1aAO5xY@<;U_k{eA-nC2HqqXA=T*o3lP4H3k zaq{L@k&%1Tzk3pHO5!+D)HxAc;bUql2b~;&EA$4`N4v4Se2j_Trz`kt^UR0Xulfj( zAa%>VgI%A7?h4x!rOD!TX-U>>x7VAZClv}ml_)^m=sJ5@ve6`r3^HcN8!@pVg zPkeSunMcGWaqqXnLnqY+nVoVzYk+)5b&&F_6K8zLr6sLhV%#f2E^O80hB>>OM9FY( z4`-It)k}RxS@vbJyT9>Y%D*tBn`XUXnin02zp9x{4g#xPmaV@{-8yi66GozWUz@Q} z_P+0T2#U!DA3Zsna+9rZe*DG`n@rT>zx6$ej)cei^jiVdZ_Zi&pFZrrAHg`r1NX2* z>bF||)Gqz>T&edm$7&)ISm7hxeZIq&`rP}n*x*%RfepOG(^F9i{%=LbK<^+4akI)8 z4qH7n=`*f)Fhqo@@2}m`;C4wP%D-Zbw;E`<38xaZa#&oPl-cXFj;9(>cune9QHueH z*DmHV*&RTWMZTSL;AEGLhO82C+hC%=rL0?H!75BDFNOg4n0h`XWNkBdc^Cx_RyG*Q z&jcbiH=vT3m*?vps5A=Ga)}^$wuPbUjoFBwtg(y z^lz@#E#*xfvJ`FQvtfu3&9SDfW=)(PXC1elE|W=*;rodL=HvVap50EAD5Cnw*CpiU zBu1HMIEb4&JMoQv0l~xWaA=|n4G@wKa$a_-V%P7}QoXBsy7U|T^8>O!H2|0cYSkkpvZv@BW(^}CjTt$mLX}@>;O|9lE>qxAAOv%=e(&2BtJr*lBswZP@ zBtUg}4PIz$)neO!G%Ir3whHqMO5X2 zaczKxL!hlx?ZP5?K$ZF3b~G7s*^SoBeUYd6&8A&JywEgD)fYGLP_Q#}{EW!|j1K_K z#>%>A?dRAu4surF$@4RezHJb;2SXFob3`LY))iL6;^b4$xJ!y@b5tYenph@Ix0I4% z!+hSqtc!rMPVAfq1r;>DsEH4pV0ea%hF?&i%Nb=WS%>(WzlTaEOm7j%bV@Shs>hF zg9su~*Owh={kM+Obb%%^(m0{C&->f{crtaJz?{U)%pYg}6fog^{kKF(Lqj7YBg59R zyIfOdjnN{CvW92p%mJHcN5Yd5mdV1wLW;PEl>A)KIK(~4k}iHtjKPzV?wl)drRJg| zk(G@Lr@k08p6|LDcFylOCawz_Ue$i^y=r^Xpi^-?p^}r4i8t~A z@y#u>?Y+FDsrfuZ)S2frkVu=$wcA?4oyW|>TrB*C+ooJ4bC*gk(~Oi|pJ{8g9{rI( zRxZk9=iVi{d?o{FZf#$Unz73e!Sje zZh277>YW=pv^}>onrBI&Ia*i&l(m6rp15Z26UY*>eyxcc=hTK{!}(0;X!Mbu$1$jA zxl^N}<3^d*+hq{rW{_2vN^58F6FcTcn=Q6L20A$l0{yO z$X`tJDQ=|%fyMVFPi61u0$z4HzadE9WP!6{`)>ljCIjxg3|2+Y9AQrs$0HUt9^q?c z5*6GMiq4d_jC?_PsQ_SM&{2-juOvOSH%CTvX+#aVZKFjp4Om?flf({zns1HhX{(i~ zD;{q^f2yaIb zdBEsf;WVyXE?BN<0khq@JycK&&J{~QLiF|GhWVT9D7){>y+;+_Bl$cCp+d{&-qB_4 z?^T_u%N4U3^JQVU#*5px5CN@GN}jw~Bmr$YUxiFiM3)l~0Wc|$s9M5}a~|gfo1??3 zRRx0@$gDi)62SqPP=(B9oGx=@jkK1ImyR0Y?hwJORrQCqdn%GhQkuL1wVO1cR~ zHrv@LONO-s@*R=mM!TLm^ISi~Uv-<@A;-kx4s-L7kZX~SVpbKmTZuKeL9$8&$D2F?GM%ZXC9U zzG0Kxx2d?L-iNf~nhuzCR94j_GbHWL3t+~Qa=NZk#oE^@8WmpD*kj3^^it5K%D}yn z6nSZk7a?M^Qcq$c_V2TIYE%Jy9!lB^&y?KJi-gR}waHzF_AxPv&w6%5d96ils}|s) zRx=BVz;8Ho17(Zr?pgL#@gU|mt&>EE1|BF`YM17p2jY5X>OA-PhH?#m0BsqW@3`{p zt)GpYiwpZQ^ZKpezjayL+}vDRN-ZcD*wvi|@FA^*qA1T!z^p5SUjdB5vguIBNH?om zl#*)*Tlz4{>7htmh`O(rRLYZ*iX$P2j=M zR5eRBF|Rcoa6%rlbTl+&jg1&z9brIFj0{Xb{O=AYE3|6XJ44Lb1yU;KlB@ovknE!Y zlbE!b@xSAd0H)Fprm-S7(R!K>=*F+V4@OQo{C>j+3+*JaDqkF{oACzVtZZyICjZuM zwOZlTX4m-ibbMT#CffsmD;kVe-)R&LEjS?>2zp^?@0vVLNLzoYqt#QyqJJ_ICFx^ z=zT5lb}v5Ru&}T|LP7$iG9dF$LPLx@5y(Wew6v_OtRbPHPrANiCtdnxnT z;lC7H#u;{$?}3MhXLfd0zW7L!>_?^Jw(Nj6qmD(ouxRt3TfevNEqs3Y^*pBX5Or`E zJ(6QPvmRO%(cd>Rck8?DH&NqLqkP*`3&wqLg@glJLs#svy-2Vjg6ju zV)Rcy7o*v4&0e_BXC{ic|A2T!Ox}Aaqm?OASKXasG(&WL4C?fVAu);2}wak1x#0afO#WPyvRSwiBC3AR$E&e zW(Y-|)EoG~E>8Vwpxi@26oKIwY@0+H`e{9Ut=Q#lBWrHb)(nzD>dBu(U`U`-!!G!I zzmHFxMN(e0TIOqqfP$i=q{PC&=nQznGRl?$4lNgM4AO@X!Xhs#3r6ei=^|iyKwEgy zrp;$s=Qx43frAE@_=gu5YIf|S55nsH!BpL>>;!@+1AQYtbrwdEkDg;KDpkpGyPAxS zJ@~Zm-$97`-rwK3oHmJJfhlK^C@*GvTU*A4H%UdGem-WcHlJmpB70pOIaoeQesmq_ z>MXfAY*cOYkiVjBgPqM?h1}Io+DD5QCUIfhU(X5Kkmpm|AM4 zd3^QNgdXxbRu+e|tlBqSsuA#olMOZ@)~2#m5oxtElbNJ&b*K0mj%wl1&xHm@X* z041U<;GHA+%s*M$_AQb4j{QuOmXtr2v0(o9_){Y?oLfJ&XEFIn4I!wMg56VnQkq_F<6nYEIrUQdX7xuw|h{*7+$ z6Co`D|8C!FIEJs3Q+W$bUt&ZDtH~&9Q2$LiUk??{Qfm;np|{O_}_+wf4}sP*YB7_ z4u2u%1TlidMP@fokKG|S?<_dvZ29ejARO=P>|9+DVPZl$8V3djT3Arv8~IE8tFDA8 z?+AUp-|Y-QJL8UxkGr|Ksi~<2Blcxo-`=`!9D_~U9iH9BZn(5aWpPGFw9zcI9agNc~*XI`y z00##T231p4-R2I-GBPkwI229%ry@~|;p>mLCu5$zz{7)sU?&`)ny|2-iZNkkH#P|9 z8Cvm-T?tma7fZLdw~d{gzMgOPG&&F{tN&*A=se99N+p25On<{0c^;^9_VoO*2POrr z@6D|Wj6}}!-$CW%VCs70|JHXZT+g&K z&5>VPUOpx&3KUI?*Uf5k^Ndx>2{c7qN=ht{Y!x2I4aWy3h#StCemk<)g@%#whZ%$v zTpTt&hxvcgPzi%MOhzGn#x^$VoAtgsRM61C)ZTFA9Q%g+o!-^eb$54{^GwjlbzNkq z)6CwU{u*XKjpM(22d;$vI*?1hr%MB1p#Jrl0Q#@cvvrLEO9duaf0JJa>Wz;Bv0i#X z8G~uHkqkToxdKd=L{NPXj0a-hS$RF;J_6_sgksV0$VRTPjd}vR2Ik!ke16mu0=+uA zzuv8;0U2aY!oR{D3hFj*SHK%59i3fC#uBYZadh_)5bu1)B_V=_2FeKqFcEsJ4J1J! zMD;~9IYZIm(G62HH8i>cKQedwCMG7v#>N`gU3-?_m7c#-{4>?TM2NnPyQnG1-K4+w zG4fNOmxbQU0s;aL9>F1TT;#csmIY=&AcF$K0`46G3=@H~I=$}15$7SQs;bn4K&Q(a zL>6Z6OPFq`rWUIH-zQyMp+?yXfWQvg;RAMS!!xjLU>==x%y*(BMj6mHu+Bxt7vbxP z5rOpYhD`@T%@t-Qx#TrNW!8l`&^5(n;@cLMldki+-sI{v|4VTH5r00C>{L`#tgN@| z2fT}VH3Q$BtFS`Jk&UinA|pq}#`>**EcAcq`z-X&pFcorKwuJrbijHV1-9xAtKi5` zBz( z8Bvf+LKj#wQ`4L_@9J4oL1*(2zx1pu_$lItJ3$$c&kEq3NppW3q;__VO0QV$we&5^ z8Agzh)Jv|JH5F$~@C;i>T`?}(aRqJthV-*fBWxpcTQq4Zrn67U&R1r=UbndL`@_LP z)`JF%3LI&1eS28xaN2b7l$rf%W$UTq1jBcM>@<2mQg4u=B(3?e8_P={v4-z--E%Q$ z*X$C*6#fN`1Br1*iwJUk#^>7nm*8Ht)ouiGD|0lkOce63Ow_tE@0DAHt}WUVCWl7d zeS_U)c7cbi+U~Pu|dhVjEl*^hxc|c?CFLHs1R@T@nNuVgi+X z5Mynl6P}$KVKrgF{!ASrt`dJk+XC~?pu*CFxkF)3cx0gntxr|LMm*(OdXMGb=eYl6 zF#nKJdpj>PtwTpRUZyVwiR&|eCLl;WkTllmPkuWBm1uyv)hMEB&e>g?j1fzhFlQY9}2{0 z&!xbcmoTAtqCBDhDQ@^b)+Yg4B>_4S8ff*m#BjI7z_*E!3yA-X@c-*V^pjCWx(ar8 zet}>5LP1JWl_TLx#%d17a=WCDW7i*jBi#vI=Be8u)ct=efS+325F(S-L5JUQE+OvM zn&;Vy&FQ(y>5wg8D6|*5O1A}g&cnxQ^t69$(91y@c*)X-yn`0agzZ+oLf4-hU%U`U zsd)|ZZ0N7yAt9JiaGrZDN;LbblA?_?*M&@)qM*) zJ|MHlo^+&V^^XdohR&arEoD@n+F&DiV+6JO@hSrJiQJ)#mEi*ExL(wjfW&mY_a7*v zs^GVI#CV&<7d4?jK0njTl%{)b&fh1kj_{C><6i7$(qTit6_Z8rFZas)i;Qm$p;~2Z zD&%VJmlFLv-+M5{2rzmqMo$LDSjZW;90e}fW)YE9ee(ms(b^qBsGHf24?mf$%>T_!K8tU+pJlW$5@ z#=zoFCNAkEwtBEmng8B^XN_x`Iw;6GG{4o$>c!R|C_q>#x8 zL;#$iF88N@oBV1NlZugzdMs4d9;Hu4k_wVo|+2))=< zV9^~|f#nOUO=fZZYVZb2c86n6(i19iTY4m}KRX2BLkYx~<2I0tC0h0pW}<~%1!DsF z0+7##li!4kP#lXUf7EveRO&Poe?UKIuC{xRM0Wq`Xv7{2t@I2$o2#;-GA`v9a}$x- zrop-H{_q3ZEJBts*F_gX=?+-?*G0S|o+o{%Vu$+~$cLcwUlP6Gvn=*R!){+*>54@L zJ`WqIBN3dI)E-XgsSOw9>ZdCM6LKekC1FDHph8A^`gQwr@JHv0x)QvB@n0twJ0}Cz zw-TsY!F%vhxN#4<4p_*9&38wZiv;(`;HXv(|Lj3m1_eaN_5To8GNPz%~9I{X< zhZPbjq-xvd_CRDAqMKHx+|dY5W?N)gN7~TO7YXndN2e?geGVlROfF)D6D&bTCANNe z=|bK1R?5HPKKV(XVBGOoC38DBpjN9fVD7geEvXIO#i+{z>67pt%ge{-mz2o0Jis7{ zK$&!Mc7}(7f)a^h)O!$ob>(b};gc|JPo+i_Q?y$gP7bSx z+p4%-j#3hZqm;|dS39(w*r!Q)6gzKRk@_;ldwD#UWA{5I{lk|oq=D>sM?T(}Zrhal z9N&B>4LY1lF|A`tm)`1P!k6_9_MO9O_Bqk)O$>nR0qS4M;HPzSAR_VxIS6eKsyEi8 zfr31@Hrup{NYVGJ$n|^j=(C^1nzWo8jlI5b4blXRAdUF^Hkcf?5o@T1!I9beMi3sYe+H(G&HC^C7C;{Nd$){7Z+%sBqX>i z{>E23Iy6v5JkD|==f6z&%5uT_{M4N;j4ylBgu>J)84ce3yBcbWr}kirAc`#AjYQu- zOJanO;g*@Cgv@9SuiRMmFVgh|K`2h_LVB8QNorVgJO%v<2FMG!;p39? zj?7c5a*#Yu#6U$`34Kt!uNNw`!k}9+yeY}azuPJ6>gvX!7$qks?;jox4G+^<`=Jp| zOif7wCxb!0&E06bfo9)9Oy~~Z6!v^5K=-1F-H&agk$9WJd9MAKo)7)Gy}4%>ew}wc z)Fy6oW|}8GgNR@H*H;h5;TPL#v!sRL^rpdcx%yRLaE?$abS`vyZ*kR|`SHRL!wWpV zcI5Y5Y6=PouiO)U7($8}iszB%&QfPWb+(7Gk&*9b1;zQ}Oan$}6wG=0F5x8KP6(VS#n)<%1t)F5fI`79C18Ydg~Y zeBE=Xv(8)+n^t$7Ti)RtYXQ@r&|wa)Ud`Kiy4ySy!ga?(M3>W9k+4>>9WSSwfk60$e~7@K`Y`T`G#EF&Xxk?8uO`}E{pE>Ty>o;;wA%NyIC+t z@UwIw-|58ZIlU!I+_@50RK|$(X@t=AfoJ{_^g?bkz&T~h^{Rl0f)3@UyYEdM6a_4A zIcCX$ewV4%p_)8((w?{JjW`n~2^1a6Vt+$Lj+S z$&e6Lh2ezaKTS-??~Ck<%=T0iJ2hax|2$;KOw`~pM#TN2lgtFgUk`L0+J5y-K6k}z zNAVO5&J`Gz!A6fS8PhO!uV$$QTIBlRp9C~3PQo<g^sr`$YR_lN7?$M8egm#QZe!|oI&I;ciQ0l%-=Ez}7%z~1Y3!~sbrCdF zK(EBD!P1r}tQnPAnF;$e0rzj{wvhYH1H;Feo>Un?lPf*}6+{$bC?X4sTYg@%6&D0s z1IRVcUo4c+;j4{6e_;c*nSt!w|NdE|GmaqgJqBcmeG*aKu=sCR?_oNK9e59~g3HKspczFa`Gc14PUBSK2?8o9Juz;}ND)&4B zL~(h<$kANL{X1{>(_a8L+G@X|>>h#)9c7PQ-DO>a8jjVR6CX?|#t2bywA~600aI1C z`TLwI-XqZAfD&A{h(7oXx2XyaTp&s(4?MRm&6MaZ!`u0-!NHXDb92!@0Yy=qP+WvC z8K02cl7XY8e_4=|yliHX=7y4Ng^IG|RKdf<#zIEN!o|kI!^6YI2UC2I8%e6UwULyc zg-f8KG%t^sl{d9h=(#0DOWwY}qOx-^CZzG)6epno00)bU9*LczX}O;YHFT7s*~#G* znY47H+JpY`IY3osB?iR7`y#MABHZSX77M|!kXiEYgx)0@nq6h(<>lLXot>RAh_|M{ zaE5^_gPg1^p)X~`@wsgG^$ErFP@u;sWzhbN@ka`BHB2%~}ykxMO`CT}@Ps zT)Rj1>e^0S`Y(b1{ttCE|41PDt(vOl31U2Xy9GGo_pXYvva+hG0ALb{KNAlCUH#21s|!By`Dp`50D+1jRm-A3#a_25I_mT>Oxcir8l6xG@yQnRxl*uu6u(8 zQKglLL)`~Xwu84VcD11*i86Q!>$CHPFo|8*`oBI*6QJ>C7YyD$_Y%jM91I7Obd)A7)%SI^OUleGE>N0?(^@TD@@;L2xAnabqWuHiwPwn?U_BF;A5o-?dj7v zscSsARL=~_Zy-i>k#8JJpY}eLZb2jo?frnXo4x(Hfs~V|KkF$yRPwBG_^mF27t`0^ zp!hA5=%{~5&aQYKKMq7I7WME93-Jd)Zubp&S1f#AK{fB~{{H^ra6-?pWp=gjI*3K+ zxE&x!#=(I(QTF^%t2g1Dpj|r`eR`jbcH0Y%!?H}kYz>(BuFv%aR2YzWji|!W5Bkm3 zKI*GWNk<3&rJ$sU$!#^_&zdh<3sU^Z67T;PxNnM+Ut2>1607$$e|pPv%KBR6d8`a? z`oYO(-~(-)g9Mq=Kdq#-Q&(l0k5M2OhjBUW>1yj|?9M9*Ban(P(br#hc z?T(1AadLHKjmaA14fS`bfWZXt%=PciB`t|2)ys|+wR>xWv`W@DG=z$YY9QhcDG}vO zO6>sbV)$-(2?aq(dXajucdZovL_v>ERyCP*Ui{={C6JX?wwGT-?)-`+3u6)7oNcro-gxa+8_?*r=_MQ<`|p9>&GZ?=5pCApc{xG z%hW3_6f2-oUR;acS?+YzatVniBPvM&|~g;1QDN#5u`7s`X$n-=?IbIH%D? z{{}Q(NuwtrK@0Hl@sX1DUkZw8hMHWddo=*-L<||Zt5_Bx7?(uG>)+un0@OS%rTUqp z`(jyipePy+ob4c5#HN4gH!=xs*`G7k>~)XM2Xy?d5Rb|XhaaIdv(g|-iyfM>J)BBN zZWLKIJ*>_FqZbm(x&A$?Em;? z`Z2aO&)YRI*M|Q8BI>KdqKdY+>7fS+K}iWk5fJHiP+GcMrKGzVYG_oDltvoq?v!q6 zq`SL^`nLDp=lA_T&z!T*+Iz*j-gj;1cAgKZS;hX{`VI$k+3&gGIRqQ~EHt%@F00wg zfBF)~Xsvi{r>)j&C)*^&IzKkYEF6XTNn!+_7sX(;r1 z#>4hx_wkf3Xb!z{fx%#)Tfna0P;-AdJzh^pZY>hSTv~V6e!R^friq#0=IZae8v>!n_r3xmM0A1@kdc+Pp*Cq7xk6A1(2& zA~^~1Px`)PPg*}(5HQ)S&=1-oJ=VT_DNsARj=KZF*II(s8epRc}YN@PT}_Fvrm%}?~;!S|#j zd|oMkjE=J-{-Z^hJ=q3%%rm1^5>v(Qs78OT@F~m`9#0w*<0#Ko88oJzzpv*Z);T337fv%|7Cn5m4@4t%bnKkcr_qS~P25J9?dzlg~vN3}wCL%(! z9}EsGh;u#<+J9hxquGk;i2vSuG3K2J_S5c!?>T6M(^z+f*SfC>M99fH6B5zT#h7~- zr5GoWZ4#`LGhY~=JcII&F3wMJGv3}5+S+G_eC4LI2w2@gwWS78fSi=nC+NpB4wP~z zFG>rhd1rw}X!O|+(6|5yzgr{*-@ff>&uE~nNbv1U`==Jf>M~}S(J^E1JTInYbXvWm zz333Occa>*TAOr4dfPh|ybmq!LY~3szfbVsYSTQbHEuh|&{TM|M(!crKrC`HER`4G zsY~cgf)D7G2aGtjMm@Z)EV$v%jhR2h`s4QxD{Bp`=#ESx%hUVWTuwf1JW(JUcF~m5hEx zoINR9etj|QSVr*`WEH`0Xe_aXuuq1K-wSbRIMT3z%ZWG|< zkF(MWSk{7UOQK1Twe0t?v5{yKB>MfbvW9bCwlc2Iles@#nq6^^&EP)XA#-8ZBhD<& z7xI|MZSpR-wD7yWa!A*3qpn#QRJ@vP$A0~B zblJ{Ou*z(-)M-cDuE>wGJHDvK8LlF3< z7+cUrn1Ce)4Ca(gt{w5n7vNY@1rau z4hsATGF@MBaz-UQiZB8Ty>U}ohDOpJ+)9!d!1Aj!5b*L; zG27x+$x##<$&roIPZk)Y;BnmXyV}#K+@7tns)!F^CcAdt!5ZUnxO~;768??GdM>@= z@7CxbbN5>S%<<^Gwtg9n&oQQvz)doR`_63rJ>7%0aIwcZc&{Fmkd+XtLag-!yr>v8 zlJMk7U0`xv#@$Y&HZ}`URImuukFH^ZcIEus&W-D!d2M!F{>)_08`^jdx0K zPVq{DLjQh=;<09tZ}#yFc?==utqPy}yzH_$(ifd{ToS#U9_q5(8?xMvI2#NDJD0-R z5<6Dc`21xgKKEMg9Wltz7a8#caI>aOl#0D(IC$V?z&S2#;3s*SeqX z?3qVYD9^n3)M153uGriDBN1&)NqU^WJdxWhK=+w4ps{^-5d*b;x%`6vFjts%8Ba(S=CtYA%xThGzHZS z5lvpNp`oovx?DYFt*8W*Ci#VH9!|^}sB=zwdU``clE1NKborAfN1%I}l$10zr5Osz z$jB%!E9>s!VRCp+=Wl^JNbmu-`A3r9$S>+xUz!K}%cqUpy0kZU;gOY=6Zljt^C60% zf-Nlmt|Vq=i_|jOTo%rD7xMEP@9E{f{yco36<=H^g;8Uvx*+OhHGe}+n49&6jfQld zj~z-Z|Lk~~%i>_LRO8ft6FS@5rxMDU{Whmvc5S)Uy$^2-ZxYhH9f_KptZ%YcjpvnY zps%Y9dte|fjiY4{@g@-}sIRKp9tU}nN*eWsCi9IvK3)6NX*z=ZEzMp>jHEwa*j`gH`SX?Gvu!PA!xjV{y5N-5QuGv~#>uUuQgugR989Pxc(9%hfe4;EggPX(W7OokGQO}ES6K0 zU<*T&okn@9(TYV;S52krKsRrP-Rk4&ZxYyU3gSE?6VvwtOLQo}^;Xx`#Isgw{f*Si zbkli>Uq4l)a*lsbI(+qD@W!WRc8BJ<^z_=NHvu&wm$zb1amc??lUP{y#zA_@xkiHs zZ?$P|eudKEj^SH#Q6oqk~p6gS5g4gE^=1noDc<4m6g#I|zS_sIuOoI;NOdc*-Rj3q(U$ zSFpsQMA8-pkEVzawQ%)s#zJS#Z}oh1@q(K>=B_!UX3WyfD%Q<&H&NoQjZO)H?xTXX zf9vzGwZF{?b`>aH97=lDU_hqIb1vCo3qK4B-cFkS5aDYKycxm;-D~<7hlEa2)=c=h zt@=k+#%gx$P51rx5l#Dh=-0dhiL$Zh{xi=1u(xO8RJ^tYr)p~5yUc6QqGXZ6kP0q7 zyTt(U($rGWlwgOV#mZ55-ygz0*NT^$j0O@u2uQ>x&+kt;+g%L_k|Z2@%%Q6-vpwCj zavJ;OWGlolJe)eO+Vl5PYiEs!l*qSV7q7H$oiXgtThm&t{ov>fmoGOfE_B#pj}|)$5;>BOJBSNkwzO4SoUu&*Z7>_fG?aK&MmwgO z#6f-Y`d9L2P7)-;cL2vVpa3|Izrjrc$mq`xzMzt~Gws8hwLhrc!&w8S3QK2B@r%IC&$O%rZ9<`>W}FC6UgDqG%~MUv@e0W2picO z!H7@Fe}zNY)=1J3h*~85Zk+h6p@IvX!Zu3s3X#pc9zDHxx9|#Xx9hBV;U~o( z#&q=Cn{43`2accD5?w-yL%Y$R5VbMA_2Op35!EIeM0^-&-FLeT=rJ#0R*)W2`FfJn zZ^EF^h9LYB2apXv6C6hK_TZj?e3Z_wvx>sU(!!owS!vB03{aUiWZD!SK;@TN|2cjS zC6()sQ6Z@Yjt|BC(%e?Kbwwwz{5tx2dO|`&m7ABvHEog!S#yGQMQ)<$YTHosh8TKM2+Zk}m!Md^yhRPMwcK%eJ(IEloHF=;0zG z0a-7*x;dQ({pC;m#5<`P?Wm>xLpdoa<`*x}o?(mT%e!RZkolPnu)jPC={3(xjR8P$ zv^&%M$gK6oHxyy&)qnf6yXxe?03*wEgB%^2{*3u^$SXlX$|R8!LHuQO<#dm)4?rms zsPu^(5-`-ErlAql<9zro1+sX7AhqGU7lO(T9Z_20+{=CoU7 zd*KSCunclCzKcyg(RA*#>cQ!{g6t3cwX-`Pl;w1p8kq4mJvuV&8?0$l?|Fpl##+qU z*%V87gj3x2&aE-}bsI-s?F{RUIR9t_#15`l!#wz7zSPNr*nrRE{Z1?^=B=)@qnq<_ zO?33w$9OfrCOPB)ac=R9s&)dswJxotVjNbk`vS|FpW(}0`9_zmlJd#}(QVOS<>7N7 z(|wN>`<4|8UqW6#M#Ji>MWU{7nyN6mari4I9n* z5VcdwsW|ch@uJwfcbxkB8K>zRw=})&uCO=J-i~{97Cp;_cb zEi3(?O9dNxyvNq_H*yfsvemLOHk2a7&7Ht)RcF3z5KZXqd?0^^#CUyLy?}MG9{_y7 z3#bH>X;=0-_Ax}dG;+jVi(tK+62Qh7q3Kno?#@5cNK$mkfp_`q^1H9M_uo4m=C6XV zeA?VeGQZS^FwxN81 zi!RtXhEwjOpih*Vr}Q?}XA}Qbi6_oC5q52Dbx`o{APksxOy1i}7sP|!a}CYs>3YlO zq*%V%?EIG9agbUX#L^n92raDh+tyh2fXgx6WekxhYjdE53)m@dIp*)xQF0vi>M07K zPnnpw%|=#xV^~i60mt!te@;hR+kJPc6o4V3d;E`TVy#lU=51wji;C8F<|7Y6FeS3A zIS=o6zid!jOpfaof5)%4FwQgegrxxVgCM9JkOm7-LR$r#YvN7QFA_UEiqDA%wg0 zje@$LMEBg3>dEc=TqBVGVTV1ur5!?SOZE#?9E@c<)n9SO*{F!5RcKqycK6s;(f+k7 zTKeIl^3@_)z?oaEdBWE9&_H=h(73oXJVT-2aL2Czs;-(QI+ZpFp>=zg^xE@JS^?W3 znlAfTBD{1xo8kUa4;xB6-SqhhpH_(aL!wjxqwX~Q#-><^4wr=l%@@>=*PLbm2pBn9 z>0Vg+xmv^&){`xzvhtw$UVZ~sv|lp;0eA-|IE%=cfaIB~WKnlVhGiI;)y3hDRU3U; zRV5{@k`JhGwhHh2ySX|imX|O68T|pzr@FfO-t6wfdvj|~_Y@);f8jH)_`~0BhuK*w zJL*=*dydOrdFa9mG8Xyn!HprH*u;+FB-?gPw*d7-A=wch_9dE z!yWAI#lEtLvbv9*f&bjWLIy-}3BeHL^X_kjWseKocBTz8TZacRwD!}>8q|Yq`UL6D_Hs?r|{M23b6FqN{h+e>GHf)u-cEs zg#`tjBv-6r(m&Kih2s2WM+OdO$KO5qK8{GuK+o~UI6WFZSIK0B2_TU44oP>CExSE7mVCcD+q*x=Cq})X)peq&o_J`eh2u)?FRR8&XPppqMh3hE+ zrp}*#SW4tFEBmmHTV}Sj8zWqIw*R-btLA&uTI`Ezv$>+T_20tTJ;rsu6Aee8G6+^3 z;OpXBV#lvY%F#^O^olO}9ldjhIRz&9B*-G$q_l`0b;xU+l zD-n*Fhf(I3LS;0VQYWS6wUKF85EqlCrPR3%IbKv5Vt(?^ArpARBW_fgSXuWn3v&vO zZm}+rJT&zvGFb@%1@rVsDNdZn|k45l! zEL}VdhvaF6*(lcTIN)676@s=%p-wfH;V~z00v^i>>#Y!H{HY@{yjAJrl&{w&9gT^k z7d~%R6Q(&M?G`-7chZ*_KFw^k+ilyxrBY^dbZo@M-n6`49R0%| z7P`>5*qczMS*|zCnE9`EJ-nE|ZF#`J|0WJlN;3`0&Z<+qeHJ9E{8(@YBKd0KssFn8 zeO#(ZJ(o-5N#wLDrHlD8WZ;`bVBw;~AGXnrk~s57sKBMb>oF8pix!`NfV&t9+SlEP z`*S3nk>9wVu+t~3qH)KI%9>zN3bCa~773SVCm}zvwr+0?Okr}3gKGp66O*~Q`R^cT zs({mrxE)A}iMjdqkf*-tC33O39ibsd-9p;Ore$#Pu5mRlDImYsWW0!xXp>&(e^j&-yhPKJLOlAN;-W1_7AbM zy~s9H{kE>;Fp=}*{PW3Nol((CS92ma_i-rmdy^gkcZ-%Ui^Dj}u(l3c7ued5q-I=x zZyP~Y&jJAA;cC+gIqy!fpDi7&bb*C#Bk9gOT|w{9$S8AMFC5H5LSx+1*k#53=(c`Pm!0in@#LUgF>jlJhtVZ224Kn29lqof<7A9c4k{oTLh!IY$ldx zpOAc-5p>!VQ}cA}A;Gm#ozk-rZ-VBcaQmQR8lm1jF0E^E^puu#U1>}8FCD2x=Qk1$ zcVU?&Yxz;KkNbt@xnNA@J7COQIg zKMtzCSFrfiRU>b2@A~?|zCpJsin*||Iv-NHrQ?xa^_jyh0oDtha6KSdY&AwVCptZg zkvN6_xp#)!cKbYNuCjFM>y;*g`Wavyot5bT&fBM%0FBi?g!dgsu1omBnf&x@xt+J? zbiP%hv!AOXcw@oWe1=`ekc(~XjnX<8p~yS)xUT z8Q!Vmck3$zK_GK0@hygq*o3z-0ny6Q`FYb-_m)q5SV3La0v4O;SE?aOkti;H(?wgc zgK4`)(`RSYbZlnz#n!8~vxgmQ!jqK=`#J1u=smJ1_4jaLrZxhvGE)EbN@ zXId3cJqMVVjif_1>(5QIF65XO@woWRjRq3Yne6zwM$QYQmwD^PO@@V^W8x@qG#N+sydZlKmh3Q zFflONJ33I+TFIVlk`kAR)O_j))u*bknt6z?RBb(%Yc!fIN6xB^LH>6rmHbv=0uoZ7 zS@W=SDSQEGqalnjKd^O+Ri6FQKdDhiet4k%CX}EG3ANVY-$`kpE7$zq;7&JNg_qYY z`{rB&?(2hf%ilkExP&?9u_CGPb0|#TRKZ`KLU{cBN?p%YejDY+8my(i2M>QxS18Rn z+pYYeq2zngcU_J&vjsJALXt*5o%%LsjW_kQWfCGD8^nCL=z+M&)4oC}{D7iUbxF3* z@vheNGxiPwrKV<)I3hOoDPkf+63WS0jwQwwSuP?as=2nd29Tknqa#2#X$b^9{Gy_w z!NEa!Vgxz6zR!{O&1GrB(=bRiWv!6gF@`;zfjt)LH$EyCEW{FE=01EF3#grOanEkZ ziPH<9em^%Six-OY>T{`VUx99j9rDzyM~gOdbr+W5dmD%bBiey6BQIuL~5UO!r3v9g&dizdB23P8^suFJwCo8|yq_(%1RYwV#-+SQ0xU~#? z^{M>y2<3({4hDrMIDtlRk{4okQGN4cf72sM&A|s+L^%g(mP(F1;1pvaN5{wY>Kvc% z_T{PML_oaPk#tT=zl*-FU`{*-iYcH`2EBD4TIAw7&1$Cu8rGp9XcAo;LQrmY(FBEx zzJ?4AChZFRDiTAMp8$X*U*P`o)vXO>WU)-)R2`cUC|5 zKZv`OfQZg3`4)YS(j3wL9t{Et3?wPXnI@r)_>&jHb*q?gyRV2~!!z0L@XMd+25g5|6!7)Z4aW0m463u z$z;V5b)ZE%TV@(Gl}HH6kJ{ zZ4amG)`o?ht~EWK{?%?IC$??-lBI73bOR*`2QUbZpS8L#&~kBdT1=N^g@xhW8mVY# zKoYMU=BX_Cb`aeNpc(O-fIz7QDqN2~6}@;PZ0oSOwG|?C88r!U+aVTXykz8{8^X)V z%6dREYqLkNfpVpmzlx9MG}~iFw~V6#ynIq?|&A`T1*seEDL3z}-z(Utb?> z64IebRdkgs{Mm7I1jnsp{;X9poQB(GKB>oOBtJ>O3D=d#y7@cA`xr^*=QRs93J#Q} zW-%%`nSkvrgZtV>bKMs4+AXXmV|a2hmB&gOh)liiZ!h9GP5(|!-KKTj@IDkH0s96Zr~VCT}Djp23insXz&4e8?chXNPZ~t04sX#y^k}2s5WnM zf_JvJ0eMr*zsE>MTAGZMbP;?f0Iq;jh>M(}t5yDoIv#FliXV3oY%Fq#Id`#P0y(|1 z5CvswMe8tRx$JQY&Z8^O`zjwIW4NN6oE0b{8Rd`Y(txBAWFVkTrFOg-xshZR212i5 zanOD4!bip83egh7_sOqxE>;6*vrfX5m6IkQXJ=;~@Q^C286L9{qlp47z|{M3B~UbQk(7djhK)N2 zP&5K$>ZhyiT5k*xpC^gH1!mFTii1w52@QsQJh$dPQkQT6C50@;+)ccty9>8 zOXf(yXy&#c2s|Kr_?ie;xJsu+)4%p&HHbAo9_WWes~h@YG^>4d6LH5 zb`8eTpOwE_7)~}Sf*xZgMJ+ClHaGbHt1?7CrnUG0WC~ce&JEdPF>Xi8q=Wy+7X|~| zE!$rwaB7qz@AO8{<$9e8*tRR31VA*Idz?CZ#RbmB@A5bkIW4}L`@@(p((VNl9HBN*R z=U{Ltc^jl_w8J*omI5`mR54ItzrX)ih`+LR+QX++)^WQiQYwZ<=HVb+s9SOKa&vE1 z!wHswKcSF#HMd9{7!*V~f4I2Znt0y7x%s*GQ9H*?)mbZ+Qw`-DGVRW6CR;A?Y;V+i zz&-|qTW8CK_+=Pdm(^}?h;aRFl}ld;^{=2HLMqG@2BPUzJI=QRJta6N&!;LLV#&cK^IPD*=@u zqp5;k=8I;Bk(x(DId>Nr0&n{C1TQFf?aOAB*LVtNoIX!}M~Z`y9^Bh!tt8LnZ`z=u zSH|?9`=PjD4p1i;wp?^W~MoB4hHHjnLPmAN@QwU~1s>8gR3&D=v#V)_g#qLG2 z$IxwfR%0Vc0;-+Khq}~@_?-H>y8ODj9IxB+=C=Mk`Ptc}CAtFB>iOieI=eF$qIMYV zWb>@w_+o!8h#9OePB^V#XCdXa8C7}Y>U zC1gIv3Y}wtiTV$*TscOv&!A z3qeHm>|O+r!cGMZjnP%B^A#S`2O2a|3ew2Rlg2t8;U?xjSjae}M>E0uX2^T~_GTvk z;y#-A`fg8@1^|McbEa#R8qPE#)pS1#HjT`jZqGV{7KGtvs2*8a%wEXJAn%*I=KGn3 zCu)gf|HvUrDE40?l~h&z1qi&kdd496#j`p;UV0JI%&Yq<(-Z4QQDvUK8_^7?kuPj( zT?JPYiSqsF*H)-@=;PxvJf?EvcSANDW=<=l4b?s6@4nb>w_q8uP*9z-ju+{EmC_Hc z-LZ`Z!y}kY^Gracn7eRy+uU)sfVrmUIIFoHuecwj_>^g#+F+Z^V^H|Gy`l1&O5L(t zr>VovxJh=i6_ZlIy(6Vd|M~NvfDq%NQseTBzTeLJb*={k-ghV70ZC2qTC|QXE-tpV zi?J=9;HwFXi`XGwlBwr-(3Ry-N4U*T{da%OCnQI~LTT4_@N*FN*{{i>x( zGP0IM?X#+)6@#jyiaS!L}@Q%643 zq-#H(fBZSG*MaXqRv&zl!Si=0qkK~Tr-E=Up1v<^QsIA}3qeo?!%9__aImf=Up#*i zkN-&gJP?z~@PJFUzTk%#G>6Ij7ibcup8V$J7l8Qku*zB0MDg{+X1?w7d>a#^+ApDX zwC)>*@GFvUSWi*Za@m{b9f61oQHDkDATnt@t}nd*N<>pju}6!c5qtcIa}edN=U`cJ zci*n8h^E{!b1CCQh55@`#lH*_4#-*FFi8CTbSzWE_5KcC;|0ECHpJb{jetf-GdeUR z0!fDkJ24$fVeQGCZ&>r2Vwo`%v;Y_Lz;kcTJWdCK=d;FPK~hfjK*EutEJe+(8)M72-3rtP6_FW2Kf2Cc&%oDs#>UcLtP`Pm zwc0~+`Ph?1(*#cR-glwvIy$uGh$0`V%)9e@=-z%x(~Gh3jX8^_0PYgHpU;Jeo8JgN z?2}!Oq=r@A^-B2tN0iuCw-6hUeI3jTyLa!+RD*fR>`3R=a@&YZ+2`gytm5Q1QA}AZ z!XID+f7~o32?EG|c~Elj7@L z!qIvVFaPc`wQ2ol53<32CsN=;UYzm)o4tG(tshlZjddVP2YMu!TL=!0q=OzXbZili z>~d5=^hpFetrnq|AUtA}aXnnLD%pJYhrL)YizjY?qahx~dYq!N(+SgW21d_&SkZ+( z7&G^0sJ^`b8u=Kd9>fQyt6uJd)zIz&XTDcYEey;axsk7T#2Vz*;|oN555jDu#T|iU zq^G-|ZvHGTE-orcNlun?zP(%tU!w=*Q@{_K4J2kj5<3TouL{Y&;Ovf=&31R+MJ^0JOXS%HH*r5^_^YMcODL zWj#86%^t@XQ&K5xfj?kE#S;s^VYXFFetOp06;A82GqGpm7YEEG8!U3U&@BJX9^{ZJ zrh^_#YM0M6HmsUl%M{&N?xO9W8rOUK79HCQ zdAh~WB~MBtl+t{FVR=2j5@|MbPGvDyZZ!vYbbx)AY;zm*G%C$X#3N+LbW(XRIgVqv z>P$|>r|)=*k>U#!mkp1<+x(!z{N4S#ANc`fQ4$hZlTU_HMHk9V!Y0M|d_&0J;<~yzz`q0qkE;1Y)yaR} zijD1Ddf9fEyXdq%gajK_b4rS~&!_KidvSz6TVuBZKwnpwABpcX|5|FNs9VU9V~7{p zYjxUHWFo+rj^6YP6tB`5U;80iS_=Z2to~j+nrpt#y}Nxk)LJa9fkD;axbr>jr+PrV zx1v~66m|yG{x+P5;2=u$=J0p9>ChtOJg61V!4}OlfmM269j}3cG2nU9lg*8;xTQj@ zC)jZ*VlC8N@UFQo&O_wc4j6&qgWXR=nti_r-dE}4i|5acO--X(E-ziplh@L)Phlg5 zXx@jn8#bOQgc3t8I3<<*59+K7e*TnB6(J{HCaSU8ihRT%2RYmHO;}iP|9f_-N_?fQ z9XhU<;qZMa9uNNVYv31--Da-8 z%zmQ(@8y)+`U(Ujh8APp>D>9Xd{Yrgn<9VgHErO#tY1SjX}|SdBp8Vwhw$-1aY&=t z7A{Zwc^R1w<-)4dnj#SdytJ<`qCO2n9tA3|K6X?kK84NmjMvb=lTZu9B_ez|zqBAV z;Ac)7BRc!>-f>Xq<$eem9bK#Me=NH%xG$1|DkSRqH{elTq!#UaIXN{YB`^U82Ol2* zg5GD_WN1T4{2AHVfsC4jq3>xKsb*dFk-Tek!^8C|&&CcPzQrQ>fJ$X9BeN(~!?}U@ z1=zd;!Ap#kB&YP#D_~`C*R3V&JR6j{cn(uP+PX=&Y47%>POBV`w`y$(F zLO8B8{*MAuv}l2L(9ywxVJGUT++Wc0=6|Q9^=O{A5B7ZvLBB$WwxwogsE%dsWj^}b zJl(HBXsbd#&1ATi(~k1v;UkFSfy9I_x|6YS(Yu}}w{_0Grtieo6TYHj{`!=`4_}z@ z|8VdEBKV@I{K{49QG8@Bc9WaM@iikqW1AbzbV2Ym^D~w((k+kYwi{RMZ6@HlI3p4o zYe~7U`FTA?<*%PUCbt%Kk4|%pU*XK`0DFlW5`PV~XRWqb0C(B=$TAllq=Sgw&=t9M zFEj0z;QytloH0s;mQCtcdp_R&>#G;cYItY(*alF}O%RJYz)Ves9TxQhfFIE908j_a zS9%E%&xVG6LD;I*h^Q(%vv9({W}ttoJI zt0`z#n?}l*p=APV$FX|9Tbu9^$-^4FUY#f^|6&>FqmLg@a8KrR;wZu^+LG2k-CD~( zyxb9XBPQQk96pk(?zzM_J7UeXxz($vMJ~p$Xhih<{i_Y?jx5h7P9jHX22GyQc0^7L z+Ygl;Ew?H)Y2ST!1^`=K-QyjL$s)Z8Dn1`k%z0uh!ca|GQdEdr;}rF;yN`>})JARw?6lteh=6Cp)zTJYN={guo{ zN2nGj=31dNp*{5{;n{bRddUa#iI2>ZjzX!aOY~`|#qC1n-D;xR$=7B6_v*|X+X&A% zN?vQa-vFA4EP%>zVtC)Lc%Q3@2s^}cl5uap2}J;fUQ3js(~c8tI?CXFh}IId>OJkt zmoGtur=h9}xGx#KIpRQ#$2m8iDQzhj@0s>v8i2(tANmTI6Vc-IjF0G3SJ7DF$=+`cLe;FZ^ktC%} z$0Xj*%elF;mL0NYj66*Uj~_-;oWYv#X!<%kC6w+8wX>lz&oGo;Zxnfk;}WU6?eRYh zMJS|-G`b%!O;izW)k6Q+C+c!s^vfk+BtjRHNgwcs zX}!OMha1$`{@gK$1Cs=+ao~!-9*#NH{N$x+dRn6ML&@Xf4m}hB1^Inx-nZRfwO7e$ zzNXV_EE}{&{8NLcFt&-7t|ujkzNpnwA5UtsPTErdnf{)HNXA%wp_6JL--cu_qA%5C*rbG zboY$jRoX2hjim34dPYtgMWR4ZFU<@9TuzPlLxHOkf(>p07sqW}ACk{cJkcug1@|!!=`ZJLpl-9{Z%N5*`?>$*Wsi#*WrtPTv zelgg^Zr@sUReUu27u*bq&88ShzwJDt<7;bsE=B$3xD znR{8O@D@9gr^waegVg_D=VBlMWkp3rk!~$L4!2M~6jw#&9Z7*z4G(WDLg+f>K(_TWNQJw>upIyah-zU zALVrM7ozZF;%q$ED_sBCU=dIocK7y}G6PM|U>~>NG%$iZ2b!BTdanN9V2Jh7%#iEy&VdV##g7c zj4cW1MRht0sB<669NI&`^sO}Z$*)JqGSY0wF><<0x%Z~2p3gEl%sT2m8V z0=GTXm!Ftm3fm!G5s#Xk4lWU9(I}y^j1{4vrY_9R?z~um{!&q=jh=GZO7*_G+8WIP zD7){YEK&@(N-vv!1GdJ4O34{>^yf-oYl_T+KP9Y!!XvozZrOU%p!)UBtQswTmjxos z@lM$BUnoR83=IwcWg3 zYk{wn$mNc(zBqPC%e5N+d0T*S5V+@G9?-rxQX@|F&1bidyzpQPOvLKbD;xhvV_>4;6w z8#1XmY1oLm-kpvsOtA=yA6*!Dcg@-C^UdHR|Lw%f7nooOr0YOSJ;YSAqvTaAqCliu z`+68Mvwwp~4Mz^$H`-pvZGK}R{IfP_7qgF}ru@nJDCWelFF9jykdQT@);?$Nc#l(K z*HPDHihmowtyIH3w2i5$_oLy}c43@MQ6qB2`;OtJK^FfOa!=bF@Hea(D@Eb|p5wMb zJ2pJr;!(UhBpTf4ecxrn!oz*}RL#`7PEmKt*1XzL%MLbInp_E~jwUlo?pF|0kI?e` z;P70Gh|Nj7wEl_dNk>*5ci3z8o12{jxk0fhG`OPuLv>oxVm$@fc#}_Myq}G)`>^0O zJ|kIv+YX~Q90F?ph5(p5thfC;vFz_%9?>FC#Gk{A669&c! z&sq560`xR39erWK?5U~z8Y;KsA}%7!+mD!n55N|b(ThzTs=21YkV&|>bTxU zXufwYbTQv6zDFi6DcRV2{sB#4Z5k{jiUxu$x4g&wW=X8+f?5 z65%vod6z)lC7mE5C85&VY$C2dm(5B(jho8dq+ZfEC|DWzlZ2^UXt*eNQ{wD0mkCAm=#22s88B?&Ksqok?EI?PIXQKo~}tQ{n-iGd}#U%QMdMkBw(` zFON}l1ZTbv!kVVjW>iTGlcN6Or*2?e#6CWFyaB@^3@E5eiG6LhIXuTAI^<6wyuj2l zk^SU3YOVOTEtzZv{nqag_Qa22lZX%riA3`2Y8=AXn+S`Ef+Z{3qV)7gKsfM4(z$*0 zJlX%f`y(_ez%pPc;f;fAuKVH5*EA>{2t@#C$;e=seDWa+bhRn!3CfUZn|t;$k%?L2 zpj`i8{qP}O8z|Y((wg+@HqFf4wY9YHY2K&S1@BT@4?{dm!zu9|(-Uc8ygxfTEvdEL zCQT|t{Ca^Bq_-hDAd-4BnfIMJ+b2?Bdz+5#4Hof}?CBO?#@7x!n`&u0z+XViYbF6rVPvbAd@VoBu<1t;zSc$i*M#iY0eQkaOm}y`}eLC0}JW5~-qE z;;ANP0=FIir3Uugh5$wk&rNG@uM9ABHuU(G%^Z{k+!qUJG{RV*E?B_ZR_l;Z3G#VN zhZ)}*(chFw$8IC)t_reb6|7lBNLwogB%lXtuG_L!igbsJgR%$159VCntpBT>Gfqjglq%P6vam~T|3Q%7DXcw6G`QIZFxWshGAJnM=g%h_ zbFOm&RmopS&uJ~olD`Z^_w?f8`klv0N-AOeM4*40|J^`kLin&4+TpFx&U?r-AryyyMS8RLxMpKf5UHP>AC zeOasd5k8wu?jpVJ5H+Y8H}QHUg=w&;26tzMttZ!8Xr zm2oR?8=$iUp$~SbEUR@A-X+?Lwzj=gsdn;egk&tapDI;FC8TI-J~mc}ilqeK5YLS(aS z&5-7vfn>**7HfitMwU?slVXRo=heh7S6pyj`FMyEo8;` z=``&5S%zUO!_l43u=e_*GP4j@e8oZ-;YaP@1^2H#*!#Q*X?EFHtl4^L-o}|lKKF0) zt)sMc+dWO(tdht2UGmf1Fl2oSTbbT49luzq7u#G%gj{Z>Bymmj{n0Pm;M^;w3D^l( zJJ~PR>Gcj&ig1YXMUhgIcQ4St+)Uj_!nG3g;DrE2gE|m8a1WtyiDdUUa^4u6=rie3 z?@2@@{4!mv6~cu$_TLu7g^EsCP55*0FJ^pPgkwp&*FFT9x=qwM(*Q)7`~yZ~Se7rr z!$E>FYTP$p-06N?9`FrRwmw-*`S8qdaD#MJKV{c6uphr*NxG5HKA6$G@v*k+Nk8oS z-NFdQYv;~V9^uRm~hQ#YUwGMsXjnP4&Kb9 z`t~&=%>l~RHPeEXe=Klgv7nwQ-lyK^R- z325P}qfOo#W+YSvj72fOrPL=f$)VyXTaqW|FlvAC2g8JzyB*B^PGNQ#O7wblAPfJ! zZ{-uPVb1Ki!(V;Cjn65`$sA?Q|E1j{g;T zF=I;o-j3snObEEh6p(PW#ZQ~09akCj5DIaUqB{2;s%DYz4u5%0k8R7#XFQwpuC0u6 zYP_IX*}p+)(zPdy9#B-x_WBLoTcySayO6;)UN_j7IoLR$GH}kPqZ0~9nMZD3M)GSJ&HKlPYFs zL?x{@^xf6>CbtWUy;kpn;MaQZ&UY6fshCI!X3Qwq(~+Kpd)9tsQ+A7rv=8=l5Dom9 z;=X|V&uy=*e0CTmST6xBI)qc3Qc3A*4g~8 z4l*bxc$4n?f^T>i8VKdS0t4KiBW+a8%yp^^rlO+n6=jPiYJe&N%I|m1IU7Il)Wgxx zMLR4u!3%@^6eGaha&M}tzj>L|>@et$11V8^EH<`#?neZ+Hu`cpr$~}N)fWEy^;{Kj zmX>0#UXi{I9N-{xWxsNC5Wn*S)ZO4)bK$c5%o16T#q|$lt4<@6H_`7CcFs04Z++CF zSe{`tQOO}YIcA*DyUrz5bCZ{zfWqkLeD?khnz2r*jZ=ai8-rt6dg6%GsQ_V*myba@ z(v=o1OIQ!==)0K}7@~{I9CSxUbw>}K=xT%PjXSBSyN=8H79F8vhMn8!FgD8e zBoi{?mQYlgI}PFg)m$g`JzwKy@@fGt+gXLTz4i804p1@tE3a_Jfv^eXqb7q6R{;O+ z_}jOOzZ#p(yYD4)JGZf54OM=POpPhgP+RXe2^0KGG-p~cTm6(5edM{-7@ZOn8{on< zKErvB%fRq(m!6oCpI-ngC-cMN=(YQY5{0TdzM4@vXA+a!7!p_af=k|56CVYzcq}eY zPUb&LhsBMr=?TmRpzKmj@NJS{Q#{E|zVxBYY_E#4@;-*LmoXjkh$aXeIw*fs-joWK z8sBv9@tgMb4!5@-MeqA(zyE6cr#bn}C5yU;<3vGyqSorCGxlSrH#P{p&iC`hsbxoK znCR%l-3?0YlfDl};4b-KdGk|e@m*~WCOv~gAg7|LSP})2ouXQBVWCy+-)LprG<%WR zoR_=l1!m)gQ|CVqw)*ep0?Q-j%Yj_=)Yuv#(g+e-e0>yT_QZ?D z@Q4V38qh^!4$dsPiQm{$|@(Oi@Me@#~eF3nZ=nUC8SJ;KrM_{ zqO6+y(Lh7CUn^~43I=}z*XU?z{Z`!gylrxI89a12Mk;1wJx2Kdqd>9szf4uI5hUX3 zG;2hC&aDQ~^R(VNnN4Wt=JxRk4vo3}+vp$>_*R!ot%;Yu-&5TlGuxax&%Et6bDYjh63C zm9~I$LP|NOwLKzEug`Xrc;Y|@+Any;>C0#B;)ClKU7Fc`1+_D-Ekz1!Qeu0W` zxigXW0Y0Q_I=^pa&RR(HIfWTD!JlV;|BUSu;>I*m?EGO_k~gBjsZdb$N#>T-H)e(v zf1P9`hL*vDKEgz;@sIrr~0Z+_&pgpjIO97cjw{lGE)=&F|d>L{d-4!>$S z99lE@90ixOMlO}dfQ$MyFg`17&cPuemq4_*xw*018rs_Ds-oR1($dcF=w@*aR5W5= z$!1@nV13hXED{6Ud3_=>MHN`qxBY}1ajxVsCH=fw*4xUarZl<{h;_Yl^c}S~1OFBV zP(zPOq|N%nh`0g0h&i0fwhg7hoa2(gRU@~R)Fg8Fa9?HlapUOcXNl{x-LGZi=7YJ8 zEXlY;z>&B6uz6LI`(`+$&dZkALpxpx2wE5OS54SIHfLPWwz=Wys9ofd5YvasXjWQV zJ;m0;mX%p^26z)6uU%cD-)`!!Nht~%HWOmU5KeUw_myUF?D#5eu2jBqxw75&INEHD zV6^+U-^A3Owf*_?r{!1+ka!v%PafsH^awytyo8ipL3$H(hP*B(hBh|Gz%mZ2>Die6 z^;tZOkP8sNV6+%$ARR~J0H(>+6|>gNB*oAl%fM-4`@e{v&~G<+3YqKc>)@b}Y(Wz8DrU9bAfJ#P$H|j!UpT}U z3cNJ%Dc%E^a+btPE(Yem4GM-~@u{=1Q)7{SreX-({Ef=m{@)}*fe z+A5=gCFJ==v{k+P8f$LXzcm09nJ7~*#0+^i4amgRkLiKuf+f92$O?KZVqX4$Gc5uL zAm}>Ga;1T<4NT&@lv7~9+*c-Z*&&=k-XKBna#O@5fP?Z$RdUdWTUSd<3!uZW;8I+6 zh2W9!x$CFa=)Cd(2fe&TBULNS0|4@P@>OP)n}yQ z+Uc3$&fCmif;y|&{Tk~~wDlQG&oUBnK6-sa12-q<(ZdKfHue$1=)t*Q98|GiaPwGH z15L_@ueT6qRhEq9E1?&nzvoru-FQj-r5yMoTqLPXnZ}L&moIriK}b^yK)DkdblDlrb}U5??vnjmkAaz7&%O1r;bV#AHT3UQ z2385WEs^NrJ|=#^$OchdZv7<=>5F zoY3`VX%lb6$4bPpZx~@0;F@idfz229*gaD*8@;@H7y8#}#CQk#S7_l9+*=GZ1j_;! z;3sPPv!87T?`0Pnt%c~ec=A$HBQg?154yUq+z&q2Zd+EB%CXXe=K)$CP0iUq zKZPGJYFhgG`gom>yntjEE$bnV^?}c-lE~ErP#azxwD?LVMvWwy)8>uI*GV#AT(JByGdmKn z3iVn576^EW5V}H3H4>i6s(Fj`PT%vSSv_`H+{v*Xc#Os1YBkN!wA5MyJFRgDMV1mn zA$mE=KLjMhbGqE9ACy^rCL~HqW8fSg=7;dvN>Eb}oi&TH!>EGyil7oR%c}&s-%FoW z{_l?qj%-7pG6l6ZpC2FY70ewD=DA2om)reNGQN?{#qoje`}N1yoUgVkh8$1+;u2C{ z6B-ihDgXC6$ajgJCoQj%HZ8$x$qxeQHy&uA5CnwXot>58MX)P?@t1c~>K+lL_^5&rS+wK z4=TfWr4{7KgWop=0R=w)=ik~y#bNK#kwrKwtCC^z0Jk|yWbX|#X7G7O2`{nrgs*ip zS>{u(>I-iK{R%}5b#pirwtU0TIS@=ko+Qm9Tvo@r20!)PTV4Dk?*ijn|1iO%BUJZ4AAPv?TwuvCj}6K+df?mj6_W`o7u+~c)o zcqME@K`TWKR4OfZD@4J+P-a3FFsm{w7JZcADte*i1BEC=wcSG-`e1jBO@T z+ApZMwxZjEJ&D=Ebl)o4-nPLNOQvNeq2IPs2zJDFr8eBpA?Jd92>~@Sdr(qrk9Lh( z>9Z!jlKvf5tlz(TKTOw-4kNL&PnbnPQ%~c3G{90+*yn-}puMCdu%AnGf5nXFRz#`C z*H#LaG3xFx*YGc*_fo;XzgFB|*<$DttCir^K`@WJ*N(#KPU&X|*GC}~#jKd%u_q*d zzX%RBGutc0xEl=0w+>z@8|J7=7O+-u-3U$MK!PNgkb+ANy0EOljycL3boLq9?h)hW zsEnxera7f>dHA2KC}G5yJFhr@5H&!o=#?l3dV^_RXuO8Iapq*eq$JRu%uE8A0i4s3 zXsU#{k~0*zM6l#qn8{yK3DUZANfbvD`vmT65DGL;D(+bpHc^9^N9B+R*isp5b89P} z&>E1YWw}(rJmL~l!yt_sgv%`eXEOrHUQ7ABh;N$3Lq2131qWCp&9=i#b*OgMU>dJ) z?eKAKnqB)3nxp>S8xdA>-i0Ce1T4(tf`W|6T)f=05dZp33oWMtJG}}{PNz*+P&5KX z2Xz}SWc%_!t?Ec5a;cZc#4ki2!z6#co6_>(i|kUU1~v*P)cF3oy+aH zPiXCI?<@UZy!*)>zMnTTI!|uAMb(K|(;I z46qV5teNq=T1fGDO?H3tqO-5TVFwADJs$e*Z$=A&FQYUD69g|?Ijv>-D)tmTxaQw2 zMoIAaVTQ+u>%&!Ntvw@kQZgOOPCK!|$peEsQ)RsvVHnKs5+|@0(7jywQ zx4pQoo`6knRfc6!(|i{50wu@4spGwOk=@4SEafx58u}K?(hdKn7@Nl9C~dD)ipZ!C z^t|iF5{wKkXs(ph^$r?RA0`w; zHO^1*gi?V*Kr9=A86ct1RDUTsU*^YGK!t&H5vjBMwyeC96~1AzR04k1ivUPTIz;Y} za}s|}QkEs(?V08GNs?iK{Bx5j7CGYkoyHJU%NuI5z%hl~mxmwzN_gTlU2g+_Dtf@O zjSt?Z7=NUp^22rnPsrj)&6G>7GAM}Qs~}4^KaIc*s{PLmQqiW)0JX;xJa(0U+#`o! zAIel(RNw;YVZi0iPQoW*ktEB^i#M0il|1ltj9Q@j?LFrXr9gUXRXiWh z`zhV}{onLCvh7AdxXCBR;3O~=>e#8_G&)ElQFfYyjZ{{1+O#+#LQSF*Eg3GRLS}q} zwCF&~H*uSaJQMBaPdA*w@wmP#6JY*iJ(}oZKxVEX8Xjeqb-vC&Y{p8p>#$Pv{BN80 z<)1uOQ2h)}nd`@cB8f^aReO4Tb!+Rg_!sqeJ_$3JzwN~>p7*W-#$8c{HW~8tKrNdo z9Tq@NSrMcGu`O@Dy{uxwSM)p;-E?)UqZ@@xdd=7(5XXnMi!Ai0k@q%`B|zApQ}M?x z-L0H$#8VM8Tgf?Q9CStQin|Rj%-ff-*z6tq1(_(GhScCr959*kIIhrKR9EcrI-RRb z?2{ZeUfnW1-dsN3mb-I%yaOlbCSmjga1hi`QT^U-DAb^xXer8=WzQI3C=vQD^mE(t zJSx;0Mu8Qmbvx-l8JJ3!-z|u0e~r(Y>1+2#O?Yqj>32UJ?csb~#~){}ly7Ao+fev# z9I1CPs`mZ7zib8FXLe)k6!NK}6~n2r2+iei)7;tEe^Jvq>V0wcl$W?TNk3CDx8)Ey z_#VcO5pNIgHaBxlnME8f#a#!^G3TnDXDT+kO}Lf&c9m@emshRtuE6}jlsFElYev^@ zaNKv7+&LLwiJuPs@psmPdoLs#E)d*gpc%Km{1`Od{B6u7g9Il;Z0t(-Q*hbw}-Nr6T}T zn|k&3`CvfXx5xa5WV@2%jSGT)V=<}t!9eO1Oa&I!a(h(~8qZ&R(26%Ye)@PS2Uu#v z$vWkx!;(DcsHmvn#JsLxw14VL!4C7XQ}k+64~&48``eaDi({l2DO`ZF6Y9;T1jge`9)x&8Gf1;ldD7?E&^;$ebIX`UyIZPt_ z`e1=O9mDDYOiBk0CAY(_GU!N;*Qh{mz4-8Vd*rjIs5lxiPo)Vs#iaom@N|;+>`hoh zwzJ_~vBV$jUyWeY>EOcZbrAK~o~%n^6o4VgCma2MQUJCwgWcLQuxi;0(4#n3%)=K4 z!%KVR7MOSu(=(4ezp~E@+*P~DMNA#6TL#PVZpQ1LZXP~jFEV2ryDR+ZTwK(Zlni1+ z0f}@NJ_!wgMZ3HRwR8fFTw75tsmdFWBN zYv|37%h*b)iB-b07y`Lu%=rx7MeERNOd~5l;h(_bfPKct%iDxQr}`13LpuX80Y@Ah z9NgB{2DTyFuAc0lv>pBYyWXIT<^w$WL+*wyx6Z+06UugGb<4eJ9Wb{++EegZi?S@Y zS&gr45x5ydHV6M2L&8?DS9qZS6C6{~!mJJGq=!%M(ngHNi){v40aJfc^G@Wki&_fh zX4gyU=+Yd3F(8e2zI8==Z3+G$yYx%@CJ&3Z zGY+xo4d=iA>?zb0G@wKOTphYEG1tPAdvUpxL@b;x>0v#RAqpCM!<1FhIB-kiV`3x# zRT=M}_w1%;iEKHdMKg$W_i z41{F&ZN{NYzdiAA0GDqlD59RIVn?3oReY_nRz5J^VH!}%dgtdi@|2>;&dUS+qWH<{ zJD2G#-6jwb5LuGV(fHTf-X*%Kzw(f8{MVYy!_KD^qU+vL#*{nonKwGpIYlddoRRzX znBC{82z)0@3Dw0$7bSIdaFm3fu*hRdmeEt`90%1~Lq~r7)G2~mdih(+3z}rl?b%Ib zNd<(p`2}sNA2nA;d!{sFA3t6o6l1GBbftPvsv#-K;^?^#EMp;$0ap6~5Aa9jgaCAd zMFTkqiY(ShHtPs56Cg+PRHh_v;P)f0%JztZIbrwr9T02)-h4Ou>mMt7W9wwHYl9ed zT{M&3J*$JX#?6Jbd1MzaDm_Vp$D5e_;w2_}-XUu=;OoTzrl-1uzxN3^8WI^j(uvU^ zA+OolK)2cwi}wh*VRdZ|@k!P`luc=*lGEg~^9P6nj7W7_sju}BfP*Cvv*HNRJTvJ% zvL}qJPNhmZp`A4=Uv3G&56)Z7m<_SDiCEN)VW9SR{UP|DU(qVKd6;4NFylWr3>P(2 z8ov4c?B8QKAyno4b%Q`NLEAvXWvjADi>elmG5Y z@Kx&)Ymj}%aj-Bq`bFZ$n09k!p^mh)pzX$pLjGcE=I!MZ71_Ap#-*W6IH0+Wg6I6* z;PKpU%Q}T@aISxHd>o`C$W#9Av?Wsr9!ts=`M*vHc`>ZL4SjJcQ>ZdPk@I(DEFK2Z z;hqV$lW7VjCUC%lDKG$l;9`KhdzOut2V;=Cmj-J3_jt*+ef$XD35} z!w#AOa#TXYKM)$5BMH&Z%Cmi{rCe@~e>s&~;?tXOp^(p35exKX-C1%ZfO3u|5OU#C zucQ=F(DjrkO@$fMuCP((FK35eVHHbUz5C`_EBzh9*PfE%%tcN86Psz6rn>{Y5}T3+hQs8Tq(Zt4gM!@7b_pRLv8d+;`3!7^tjaTXX{B^4HG zBq5`EjgPv$xc?Ae7YA!$iSg6oGr1nx#olZ-8I89uOuV({inO8|>IbLh2n_LycAPF# zn)1(2*!Zr+(B_(gDun{3dqpQ<8dtF@Tj|wke+@~;)LQW|_&UKUfL){hNb~c;`FvMp zv>BnjVf@~~Q2YI5XYio-o}~U&SUs4OrKm}!Wj{Cyd8ETn3Chw234zYJUhk-+;vqpH z!k%BB6Tc&E&r8USDXVC_8;J^mUfPxeP$oCw#}P3F4+I};)n^ERz0X}-IHW^Pwy8hu z@GS;Ltkpy?K{B@*Ax0`VPRvG^LIf3eL|u$EiNfK8Ufn@rYunP_AIMANwnOeOgK$n)IWdx7Dk-=e z)9y+(UYB(}@onvRG$Rm6bXU&rx5G$R0PToO$sHA+)Ky~<4WopjyB=EZP^|0G&}JP z`y+l58*h=sz@s6b>YNeS90`8CK!k%EcOLu5DRW;#e+;1qPt{wUP~j1uBWtrj-g z6AR~8J9@)==!(13t2>i<7pHf4;2HA}*N186V7d^mjZT;WZg|^;V|r3@k;N6yS2PwX zkx!bhQMrigF;jRYd=g#bvP-2eW%tcBu8c+nEH7?bMuip=O5NPjTq0oO9KQj zI-PzS0*F7q83sH@EAf#I&fi*bwfQ?^;$u_Zo2`f1%a*!xenO$t^zq1Aprj6}h(vSh zgnYMiy5-UFS@z{zct$Cg5#q1Ukt~iy5|Yt)r~GmaqL&zMYlC6Wey~752bxkZePP=- zGySp8ULgz0Xe2DY9R+)KhFSp)4Vh_yAiY)Gk2Q`2+`=cC?e{KJNOdjm1MqH~K=5(3 z0w-)Fxik}vfDR2e{yjT8h}rp{Q5m5`BtSs{3veJhR6^`bzTOG!q!$oLf8nK zY&WFl(ZZx_4WxH~>#W=8>`gFuk&ZV?VxdTaz1IJe%^eRXlW#h#_&zj?LCQn^FV5}M zHq=l=Mtk8_&(rPhCZ3z=Ve#rtn7dj_Zb{GWNO=Fer)vZCdBCs>Wt_#*w@ndKkMoHD zHIl~e#S4$?+7@)Z`@4s&CF>rocRvb_Kq1$5QSkKmW1&6NT(5;l!9tP>(Xs9pZXZ6M z{M2GRRsjxAh@yF1&IF@uv1!j{nqm`memlp(oloHBAu>NZ=;>B5qcuAJDuEN)%Jf__ z(>F=YVm+x)E%%A}+TYtA93{M-a$eJ5pc}|x6roqEHN;0(IrOd8cRI&G8U8@JhT1lF zp`Dn{=MPgyKIUJMRD!sw0vspOW*0~)RJG-u+_(IMwfa#ilk&#$ z{{k^o0peCCXRYU70+)b&j^Sf%N{6g&JMD$$lk;N<`uq|fJqW?U{O>q4F(X=x-0 z;aV)`g4$h|R^Jlv)Doz=FtX$&IB1wcb>^5pbg3>r9>B38|L+GSrKEN*rbNMMSqcgx zqoYsE3dpxd#b5XO6#n9>Qq?;JlK(|xtNUZR zC&5uQSEwIec$#}0fyg5Q0)jOXg%SxlvlZXN2t)G;JipAl&ub-;o7GMA1c0I={L1Dk zBk&>w!IX6=Yj-zkiPb*CV)80ub@$0Mi|TGOrKB|b{reLBOc#&Mz+~g#QeNHE`NY>e4U5k1E*$F$dHhaSpPbGS#WWm_vAHgS96j^){j9U$ARw z=eg1k@EKX{!@fYp*JrUSP!gP!tbe<+x?I71TRBMH&>zjd`{4YXa4bBKCag>1+GRl~)4D!%0>+3>~z4*T*t21$>*ZOO#fnu)ta zVAgtQ^8@ze2`_hLDY#Skv( z30myZFZ*dz_Kp0wR}7tl1b9_r^uu6qz~gtGd3U#21rbU=IJKM3k`^|BPZAVN1})(9 z*2C2M#^m@YENh3OE|(W)s0v?g_H6MPy?@r`B}L&V0n%m%FbdQHWFaV;N z58QgKzfRGmlK40$IyomT`Ks{whD|qnBggfBfawmZ!l3}}&VX<3>+nb0E9RfFn6K+S z;=gaZF3~4^FH6Y|&}X(RH93)L;;$?q*vhg?xdQh7j9U@uWcWpS5SigJgO1HB+~2O~ zdFc@fi7jpxzB?Hd@LX10w-dNLQ2HJkGU@wAyxWnG+c>Y8?;*72zV!)BRftiQ(eX88HWaZ z-<>JGOvXQ$&Q4EPkI?uida#%sAD44c8yRP3;%a{|ts<$w#o@{1=-r;2&&4ko@TwL0 z$iV0^=M-Qf6C=BbNz5*20`4FW(f&+{FbsLgZgI3E#g&>a-$IJBHTGI1^ z$Y+`nr9Z#)*~r35s#Bq%bn;;`;z`$Fw1Yt7g!7OgbMFf-q@WjfWS^JUe3_$v1#v3x z4&=Z1%c0x=J%~YKl`lhNBVxyOdUl8&G7p7e0w`f}Ew9hh;*j8S+8ceDl+(S2nD0l= zIMg7eDKoPn?z7!G#7}K`lWw}y3?ipL*+C~32ssql{!orYYybdwguT;&oq%s0&-x5V}JoSi1W*Kg#Y4sTzF?G_ZH(gJ=s8(L5R z>K**AAG-SOf{)*2`RQ?>guKurSu8^S-TI&+=sXPJv&JfwRP`LoiMoOTX9MwAzex5@ zdg}19z6_eZr=Uotou5H+5l9CF^_jwy7r!>j)fe**J|9(koj$T_qx>#NLQ6Am>)OpL zgnBu*!3a&iCv;@tGNh;bM^E1nbSlFbL~>QmSPZD6`Rx3T_b zbEd#0N%w7roqYzzsx?_YEglDo3dc;c$yShzv!eJZ7m`uWL0eARoRsT&7ja>qvF9wa zh6dLarHty|#wF3QOh;SF)feCIc|J&a;&@4$V04I!`hQ0H>1sa~&;gE?p%A6ewpuT+ z$HGrdOf2}20tL1Tu&?8Mmo<;V=OR6|e<&Y03Vu>F$(;1|6oGm9Tt_IHuv51&pfbHy zHESxh+4>MDb2w)P-v7}zfUy@$=$qz4mCNG4R;toz(OD1llRxqK>nnz+2Qx3}ND&=D zarkpn3PzAx>#G32yi0TUvigMs?eqyINZvCjmbQBG|iC)&>M6(am`l2cd+<#$@UmS zXv|mgH@r8h5@hr@0bhuAwPof&RmEl5sCc|Af2AscVxrK0gD(F z2G)(w%;tjy zoX{KopxA%wlbZRi2Ly%O-q;h33h_br_y6aD!e7NP>ih;wF*-5nKOvbK49IqpcT&-5 z?umy2`&d~;;cW&%{1c=~XPdSrho1b-I5@1Dc!{>Aju8Hns{=>t@5z`BPV4J-R3Tdo zK1y}^f!^sx3=I`?Z_t-?O> z?l)J*Z{Z+G+33MwvPU6$H6sL1CJC7e4W~3NQL{W3ax4P!B|Jrx7k?%wY?dwCnpRU* zQfkmh3QDcU3-PF-SFJK5i4#7vA?zX00er7#->eV3+JE``i)5`eN_t+mO3&nUB_D=L zTjl_%u!H193U`t>6r%e4E&1GVjmGqBz2UF=@{?BL1x%keeog~5CfV!O5rQOO81b+2 z@(j)|CMGp*mtXDdPQNbHuLyvIO49l=a?3mH9q=M`B{f^StNg4!GXCc^ORFz3e|4sq zw31s@~Y1*FBrZ%(TTal`VkTm z4{gU&i~a{Bk2nGDrEPL!xoskO*7JG*|ElRnYeF<4X$1*yfm5!m0NI56OSgRgOn~n; zmH`cgWOL(4^pFGy0_8} z3>J(K$y&-WCWpuVGt^k+%17W0ff8#nQ?aXFfwTuhk`45SD#kq6% zXxMKK`*`6V5!K1s2|4UpLb!?>zYnrxqKsxbzVTg|29NrG0bl?LLr*$F#iD-XT2|4Fods zMb&5(-W8whk%+aQ=HW%CD?~mYnVoRSNbOA z%v!T3qv$5#eBqY->$K1#;S``2s_+{aAvTIFXUM*7r9TsAB5r1eEh(J6zwDYN3WmJN z`=P#6nM2?k?o8%TiYnl1zmGBtCvKyrXU7D{5c+w-`A2@`$**AP%r1i z$Kr1P_%IGPS@F3C#J!XPKt|(DrO*a{dn@UH=>e$az;qfQ+j*(28Yqn9v8SEkM!f@y zR&U<|J%ckV4K>`+4)rf|3?7{7)J{l@4KXMKWQ*U>af2i+aG94wuG0m{Z68Z?IO^-I zvlunG@vX;dovcp2LEs6R1qf4FU{~U7byyCo))`NfROQv#J8+YZs1;t1_o&n(eG>wf ztLg}(E-_rO38preyqA7+0z(d4JL@J^$?{|;$ge8 ztrj9Zlj+cp?5inBa$F}-SO`TAvs$g`)gJmfKb~pOO2lI@)}Y0AsOjUd#18w_?FoTu zE$fPF!6!sU7j|iNwTY%3ZwkytjQaCLN49i1v%tW|KXzSK5VuQbyrISmpT3{}%RQ5j z)kSk8c+TzR=WZ5()cGfKWLV6@H_J6X+7tQ3XQfkP7!AJw3Ay-1Yi!RqQxhxJC(nQI zO}}3dEc_mnb2BwI)9KdNI0ai1He@3L6!M?l_+Q$P0BoQoN`jqm>{)6))?HI4tyNPB zIH-S^snp+EGix|W0s=+vj$t3^2@UDJy*)e3S618!aT*X66_6v#Q!UquyINZy?H)Xj z%nB>)E<^|CSTGrCgQ>HgS1SS4fX;n#@@PRY$i4vBG(j7r?$j0D$;^r1(FNsx9x2mO zi@BQauTl@YcY|{%Xr!_eGU8g|Iz)cUye?6-i|}B+$57(?klnXMKid@SJ~-@(SpM$s z2RQax_~ho9;K+1NC!D2gqxs_S56rgw2D>2%g8xNLDcqCyfqM6xF3u8N-4#f>GR{8Z zc;jI4O;L2${O2KU~mR-%9Zhi=mECI%EAJsbefNW{J-K? z;7b0N=-tXRkzu>h7ZDKw|ECVk!ongZI@;~}gaR;nlz#v7RY6QXDCaRfK0ZD)6xB+N z2AnVqH0`HZ0*ZP6^OLxG6TjS`8yg$b($S@HJB2-5fdh8%!|(f|sh%)p>?ix~X;FZg z3Y4!sFv3^M43e4E{a@g-0HGF)fp$C`!e<%+C;0srRBp!uI#pLEWOKQj%DDG<_m z!T+2njQ8{F0wQ((r2!}^m#XKTng+?m6^N<9RE8{vCr;1rZT^q5$gmGEEl4bTHXVF6ZWUoRMbS7udgpinh2-Z`PC`x=;Y_(D?J zAi-|oRs5yVZr_9Z7JPD^WWDfzis1&rA~~raKtWE8r2`Hwn3^KwA8|8zvkc}qfSxK`#HYm|&dXtqT{^#>c^B zVm2_Nb5}W_M&SKL1gQ86B7$(L)Y1r2Ne-8|!DSG~Va@#jMjsfq;$M8qE`9I{GM*g&E>Q-^ zTWunD8!R}Fj$b)(KtloM64~pz5-@2o5~A(*pA_gL3n#kV4kqZw=8dD?9!yDmt`I#C zbce7$ihHou2u=?~}%0R~siy*2P4vt{xzAtaFy zf#+u&A0URmS8{>i3s0M_Net;X!$mhvd% zyfz0@_c7St-dBJ=UdA$>tKa*wmtSc5RgSkk9?Hp3f(I(UF=4qH6!v@?f0=;L{Uwt> zK6MYInA`MpZr z7e7Db80r0T`stf7+NyTjztp zZqF7P&Or`qoJwNE7t*ZYHfu|E>hF5$pl=d5$ z`5Ct^8jE-brOFk7s&##Ksa|TUwrl3c?#qLj_{1_KD_Bl2Q8V((KMNf^#lUgRJvMIQ zc7Ro)_kV$q`#Uoe1F)I zw%(1ACHi15uR^g!<r|`e1h;sNk8V{cuQc)F{X~!;$vQ!(r>E_NH37aB^%xPOhTj&twm zD?*%ldO<_*ME`txqCHX2Rs}P5-OXqh2mJWPKe_~;oLqbsiyk}%2ddK>nvvDA>ca=v zpK7)Xu8i^4e)w?;%QF{gW(#Nd1!|t_%##H<+{>rDGeT*$xVHwlX=(5q_ck3RpKtH~|^`>Jb76Z(5>M7IWfaT+HIjBTK zNt2v#+9d(Hv-;*U2a)BClY-gQkkPa8m}4)ZttAd4 zmM-~C?c=84)$^aq-s!bRL(A{{*R1$@2gOF}G&JS6BrlJ}1_)dH+=t&Hf!kt$NHcOq z@)3DXC^1Gp42%d%{$dQ8oCKzpi*?&c-eg=9p!}R3ZA5~2a2d>yg56xm0qD|YF1a4g zI6;7YWMuMX&de5w9K?Y6pH|aN(xsiKN$3`gyit1DKTG=XtcAqZR@2i*q2fVD*I_7K z@0;`f6-#YaZGz(yXAxlUIx3^NJ9n`2^?qi08l*!OhUP9gr47D!2^a-u^!&NOY@Zhs zrzDVgN_s&wJsk^_Xk!Kh7+5>2AKBvv%S46VWjSxWM8&u5x}?=l&ob4M_4Q~Ibs@ko4#y%K2?eXnw!z_TRk_r1Gc(0_CH_c*hM+SEz3w4}_xj z1xXlf6eXMqXelX0;W9z`@YGh(vEUviIX}SoiEMuEjV1Lgwq0g}$qNhhz6@wuS68%O zE;`!6Eaj7U(guT_Uaf#JyI@wdU=>iD@D`E1`~7i%D+K~0SK0u$??`}!y|R5rPmS+A zM!#SF37I!JE;c7RM}`xGH^E1{P2Dd4)-aPtL&xPvF2(-ESR>dY2DVlbI~R4{8LnH=W~Fq(Mjc4gF3wjR zEdj&rPuCduKL4p;!K6Vz;~ixYA!~GT@VyB?SW256IM$NbN}nR9tL3WU>oX_=O8E*G zxTaz4j0J})DMjBw^9)}VJ@VhV5<$IS77g%L@_9JF;|sqZ*XFZB5Xy68in)Kh7=oh@ zCcl3aN23ik9pus<0{=8HaRxGe;IJZ7bD1cMz<)Ov5r{~p2=wvt3N}z{g~@TSvN}9) za(aApqAs=!NH7rS^3T7_H%Uz`H~^61!OfYLRg(%qjx5<#v^K$;>*ugo#dY~&a9`0a zQ3k~_-OiSAAQaP(A$DK3wey|7`P4`8XwYB`C7pfdQQmH9sSu#-?@p21O5e+mELx+C&J zGLZwEWuZ>VmA3P8Qy2-0mW%q2mO0G(`l>IBv*W!A>+g|M=z1R~k%@%AIHtX5F6N#k z=3zV$NOqE6S}BaT@Kz1v72G012>7zw%n(OSz8YDt?@v6w#iisxhpYa3A&_r~h>y19 zLf(`52f3W>l-P^OxSWuyq-luDs&fBd==;_-LJqubd!i(c%eiWbt|7{kGW>Vz)d$ht zl{T}=8B<uxL2h@j6kI zbPNgD&E3L+U;?TNt2XzxqrWz@g540t{h8v0hWN&0?TBMfO@s*7&1Jzq@cU{dUW*)x z(jkOj-Wjp9qK2~U25Ky!?N`lKmQ=EL9;2io*E%MnoC~~_alk{lX~>a9;$W4ms^Ds{ zgHTJx%#%zo(YEnzZ*S-2;3W4)ifhT>Mj~ijsjC=KWnTi7|zt%G?40cIsS$P5eHo7-VF&2H$!$9lH5Y_ zxz`owC!P6mGmsW8Nc?wvR9;bPEY$a!wl`HX)uu{^q5f&(bWT%s!U5F3`(HxfOHudg zZb;AQVI+R?R7v;aric62&#u_+X_bejhhy)moDaDTed&=4eNBcX0MBPF_QmB*DWX*J zNb=0NvWg@nbvIXL3VBdWo6BGU-~L?mIHu;p|KaK@9IEcRW|ibxOz3_e6X?dt*D@x%-GKhNaD>dX%Z8EIO|kD+ggxaltml;5C&oV^7ePa|%BG%i z;qhOk+f(XJpZf-*zONuZY-$1QvmpAb%x<|2aqeJmZ;y9Xup4eQ=hugAi@6mpiz$HvEtWp=?s<$l@d6-757`bVIfyIVM-pE;D|XGH}_ zjawDyJKLQ^Wb3%PG9VtL055=C`SH?mSpIwIo~K)iKh%ovY4tokJ$J%E9IVzV*ghuT zQN1S^TUD*u!{PHDW1od}nQu7G&7h-8Qs4wlpxltlr-Xp3vWp5xD#suqBwT(q`TI8& zFK^Ng%-7eKdje%bG?S^B*a>Ks;ODA;7oXy}A%`P^l zhZa&@G%fgP#c$>#*;)u2Rt3g{Il6HzcRva5TFNkbW}$AAML}Z482`-&OUpf9c!+-_ z9Itw@))}zN=G_pyVSMz)qL~}N4?sutk z+Zp}gDV^x)bA?{j3tI4w#--G;>cm@z)TlQrE^ASL+20fKg+b3w{uX53Nsv|CxGmz# ztWD>4y@PKgnPa==)=SLdhXiEu1nbP}txf0lEVhnGc(mi{45t*pSOvej-+rxq*gEm8VxGZ`96zeg#k{K zDL9qpRD%Xw134`-kb^CCJ)S6tD?R9mgmZpF#?zjge$~HtFk~ktmWyu1$DCBzV9`Z7 zB>{z`qTf(zXGqxiJ}n`dH6#%k3lWEjGy0fk^SN-y&1+N;GCbeQK+atb!Ox=3)ZD0=$X^wqZ z`m&M{ci#G|$Pcf|ZhV!zx`)3;_l;A|-zxdO8jNj0lIseH)1`$I_Onq(`hA@2&w2M6tl_dhp`FjHMXx~Zuf_(P`O{)pBC0s$PDESH`*a2x{645wSQ9o8_3PU1n zr5BAG&eL$#wVqKIx8{565X-W$lJnUf?5!Q`$8({!){|uy4893;biKI>R1~ddbP}~l zGM~{u{`N;DvA_KVyyOn2#GTpns|-)VwXBw1M@^mYKri33y#vi!A1qn84W_0`t=h5F5XzyqauV^TvRXYq#NL8!^D zOzGx>!Sbrx#<0-%3VD(yg~v2lS~+~^R+oRI!aP$-V#-WnKcue1Yg;k6lC>A>{X~=^ zh!m6T5ju*jKVXcb{n=>$msSi>Oc=^q@YAHaDgH{p)6N4x=6P8n*QX(iBWcG8?;wSHu8vKYeHA4Ya7vC})5qTYvYC7@BGPtzN|M9{Y3n@SK^72C zCKF#<8O{ds>ef8nlZ{^%6Dqo5iA+!oZ2DIW=jM~nvqg#TsH^U(tcFKPXB!Me5E{!r zNojC8hcERfv7|!r%F6K=yhU2b;Y9Bf|2*{Sf5b|3dWa66f?$Qb^141P%#@k4J6tP;*4jG1li>yG}e_VzI9}bJH|yKAmiFdZ}x6tOAkhnEJy^QY$?!a0!|PG&-qk|9PmN zKW%;U;L?8L2fL0KG98jU=55Q8KuB%KwISBl&_L>xa%FCx{`ctfhb{N;% zpXsfb64xiRztEUu&fabND_;gPOEH-_lc11~DO@sKAoHk3& zozVTotE{KbZQ6vCsU(~#-AQJhIs~5YSiHl)-Zr3H-orkoQ}@qiSSP300Ofe*WrZFW zR%x>>JeU2SGN}lTWYr`sD|F}mu?iUpMohA|h}Wrq^Mxz(|{y*UTBq~m)~nJ9RSJJ$&w zdRSzNz1LB?1|y2YBcVAk!++N#=FR7rq205h>==Hzqgr~oa-0SokBvbb9=SY9NG6Xx zhCaJJg0sTPxi~!o`ra6_)CbC#bH;D_H0UweNR#(FZ=q~Nk{#A~eNpQx?Til-iEJwI zahP8t3B8gp*c+ChWs|QCrYlTbv;X3I;@m6&qY*F-Z*5~U$aO;dUv-o7-c@IULHEGv7i6hiR>)=%nP*XX#L`0pV2s!2I96P3A(OXe zQBvK(hqY759sS@9xBpmrQq|sc@nMU=?|joio}aV1AIoV{bwA$MIjCXLTom*p!r!HS zCTX%2jf|x*(tB%?Tfe>yo89OAwQq0u<(1LFUJviVR}*Nz+zRXZ`dT?gLidW&k5-|m zU$Q^WL1d;b-+2o`TX5@)JL+WYt75+{|4(hvu`D3O+cjpmCDe22m99_Jl`N=GCHKi8 zjjOk*1K@!UIO5wHj-Hx<6EKb$^LxvvF4Q1m<4*}TM0p?a(;w$QX&v)Eof$%>4KX~y zPj2^91uX-I8)FvydTlaiX=#%i3- zL_x z?^-KIC8c99Yzq|sbO*jB_psY)jFDFzc2jNxNQG9W3n8{XwC7y%UL5w23Q0Z z#5B!cr!*V2KO0+_Ra#p5No1&vP~{yYIyog}4!Ep?RhvUAjC%-%f`MDYFiUx#RhDtG znC?Zw_tb`i^w;e3ghUIWR+gVVg1?N8hkC^;ydMe-OOd+Ca$!F^6AzqI*-4k27BWc* z3>6)cDn~?7_Hm#eWTNn?V>@dWi9yJFcg4SKOE^{hZEcf?+Mpq{TgBQ6b-ba5RYa;C z1~E#Z71Hk7rC)1cW?iZa*TGhs7LyPYGchv4BOt(Gmt6V~e+wamSWF2>I*VZIo&Wjs z2ai*6xunT+W2w^&j$o;n&BQ+u%3Dx@bfgrQKwv_KyYeA2Sw=>-Ke9jh#%dN0@eQah zoSn6+zvjSManIS#jFGS2=@C!3*v!wk^cl0Z<3`zYX?PfSoqLoF2t((pKM342k>!&Z zdM=Hm&CfJ?fI@&GNSX(r3P1a1IEG$kM}9loAJY3FYayUs|7G=xUylWtEtTpwKigwy z>K>VbAbS;jNC*DRz_>134sf$q;IPQBkER`Gx*XO|t?} zJA*x58Z$N(J)`9-$BmJ5Idy@rUxHmMk1vPg0@wgKhb`3#1-86jn2 zI3U+vc$6<5fsm?>f+EGKwnQ#jZ8h=U9yg9Vo2O#8(3{9`A=fC(L7cC)O4yq4r*7)@ zk>V2-F!BOLe1r@(tWr1K+_p8v^%@hAv_c$WVmbv}ms*}ilPZaei@*Jap%jm4+coQJ zA(0KiO?ylBvz0}9lGV6b+pp1Nh2?M!hc2eE@rrb!ghQG6Fwko5GXL3gB6t%Cy z1}+>?oqSV1Uk3fbQSk3Pv-2v-8BYwZm!=AHHPN4SQ*y6#O}au&awuAR{SL@8(Rflm zfki4rCwu2f(eNBSQXK;tRtJ<}ii%i-xOBcS>^+z%*B;Nx(vt1YSYb*El=K=y&7U?2 zm=b`Q@bdCLwrr09DM7}u=R2nTUEf(v35xeWcAL04}Zh>lS$0%~iX31okR=3t(?B%v} z?T6JFlgvWl{1*L~ad0fl15dNlt>M+KFX=A{EL}Z3ZmzEGZchfM7z=b5@WVYQEkA9J zS8)xKGF67QJ9qq4eT(TvX`;o0C$IQ-#}s|dz6SBfH|f$iy?S8Tnh&6%wWgj8*O*?<%@7H=_Z!QkA zN6P^n|Rn4dwqu%y6#wH^p zBO!TS;_Fg?se)?sDvE%RFoa~wt*5_3x3jUyVN=f9`T#sgU|L9BU7-Jo?3UsYa+1_{ z*n7euC@4twCDh{G3!-;e!nLxQA8)+U`x^ z|K{Nm5M+C`7b~XN%@dAPs5G0=;kJ{u^o*EyIm;^HL6q4X@@$om- z*Oyz)MkhrRylC}K|m&y+xa7*XArNvW5=o)S-fO4^#Ep_LE>k?okGD_rWcV5 z1h1Tev^L3jTAa1dA}vTF2^znGuB%vF8KQ_+e12H@$vo?`-TzEfjA^;VEN~vBQZ8qk zU{`9_Ww&StBITCM5|00t1U`J|=L7g$M$~;|*Aw*!=G<@JUZkUPofc7I@af2(9T}TO zMPsfz+lN_w^Yv;E_>uYfgPa_?0BjgNn3z^;b00=&cDZOTWO3wEDP((S%Qpn~aHUxm z@uFQO5#FpP6W_`a?^jUY{>My~%;I;q594xJ-*L1kR(93|*M*PNb1~lb{M%T3=+F+d zX#imO(*VEtGC!Mdq^P=vq)t;5TYbUa3<3y9&j)br7IN z{z6IkoUx0;eRKii02X>v>mqALNNhDwsf{a}2N;A|i z*nR7I^mLH;W=`b7-G98Xtc%~V+M=5>tN?Li*j){)eqQ)|Z1~muA(r_b;m2)~HA34v zt&A2H23A&VeE~3W1FZAGKA6KD>;3jK0%%ac)l@ygsCH#DP{Wh33H+N31u}vema%uh z*pun4px^^I4XUl@Ln9&r++X11i@(ih;FTYDrWnu%)8-T9nBigChnV8x-yFO$b^@bj zB^t6m3l@B$r>7?;Z}J4)SVq!QOjqw5{|t8UR$ud6$Da#z3U#*bY{M+QhXH7cYd%pX zsKx0y3kx(QCKL2d0ctR?>Yf9m{O3eo(y6h)2^HiAW`O*nYzG8fgM#1fK?RY>2jmA- z2OGfV@~H3x>``Fz0rBfgiLJ8?>t(i&k5beAlz0ZzZiJ9rv!LnQEKg9&U5km0U=~xB zki21JWc2#Gg7__X<}z0&ZJhBb>N|uXgK{IZgB$$nEwKJY#DqOb>XqzoY{~4nKuj4j zDX?RCsz6TlB$o`I>2&^8s{m3&=}Jtt;8)lq>aFqVnmk$mwCg-fEg7amgk4QPC%Oj9 zgP*?FBS6I1`JrC=Sy=a#Z~BQaNn06E8)uPTyU|m9XeH|q zGA4^_s@rl^q(Hat3i}xvbF25}W(i~SgX%sETMxq9c`4|mGUUD*;&pq;vb=;|>U!LS zBR(dDMZ~VR-<1u3Do@V_Da2_IXu3@9YWU&9XD{<`aE&kf`MvJ1vwdfay_%|J7Lhum zl+gtM^0Hrlv9Zaj&O?KDdtEYpV_-x3E+)OAnw+M;@y%fIQ_$Yh==OGnz&W$~@ zpa4nMk@4F9#@8y(@CNw0K*Z2-R23B7Wry;1oo9*!ng7&}n})oydMB)uz9ROH8!HBO zDAL>7*4CE(=~!xHy8u$zx2O7h{N=PjHw65Xr6u+AFjjO{bm@orSJOTUKRu2C#Bmfn zK@CX+`X0t;Bhxf~pYlIyL(iCg1=9r^J>vZ0W%?3N` z9sluQz1ItVmpFvdjA_qxH@uaHLSmUhQE^WL18`p;rb?h z&!O5LUAhe8*sw?O@nt_1%Kp1E{sWw|=@^l8P#ulPX0V#m!vhmmL3+^xEwpnQMI9@|0VGg~y&na-M6TPzjQkc$-N*m zgx+p^VF5RNm2tgr%YMm7{`LYCRdF!a{{BJ3sGQ59O-r4WHS?nHUT`ly+kGPOrQGS>7f<`SYG)%QzaNw&6v0&nc?<5$sJ*ETP@ z>jL~}`(mTxV30`hyxd$M<3wY8OH4r(@&CRArA-V{o(mcJH4-kK#3M63j*A!Yo7~uh zFH%8Xx#&jB$MKhukL9pyG9@=QDe1xCp`hcI0>A=*wbPjG?7$vO)w~nr6rrG?WPMt7 zEJk2hrVQIE>*jv>8W>d7Y!?NI+9OJzldZwnqF>uaorOuCbcA`NrrDX~-sRibh4u2( zjNB_r3>{>bYieqO9LCCB!h)-3%6?w9pw_@^_81=3FqO^Nm3X~7a#5izZJ#&=ouVn z$L*Cw3U=QjNOQTpCh1}u4&pB@szT;GYuLlYbb9?}b*%qJGCuWtP245>inZN#kdNdS zG0x_f^4#5fuo0E9$M5#7Tg=z5RUI7CraCDBHe(=1xO z{NR;JZfJDRL-=*)8+h5l`O&aenCT|>4<9y8%ypO{uG+Z3rAUgo zQKo*JokFiMbmzU9nVGk@x2WUX$5%p!TUtQ{;E)8JB$m9ve{U2F09`{1)k{eU8Q5G7 z=8}puz@aGG!$^N8JIOF`A^P)m^_7oVzR9z@EYSkx0z2t zEEWpY@VPatZk8SlrD|4J4(4iCojI||JOm+PBC6nkr%!8-KFOLrV3WN)##4{ev~fV%>0EMC+=$L| zsp+0pEoj%X9k(|ok`cDZlRv5#Nx(TP_JW%(XRSHLTPFonH-@S@I^ka4+>bIFESQX| z+Nstg!`I65*OEvU`>SlIX<^Ez)c>XXh4*0{(|mk;zhmYb$w<%QT8~=#s0M#C_I1#Y zFPwiZcB+HT^Q&(Hy1u>7I6%kcEZKm_iScha`|1iqs{Sc(*aJg_ARL(D&?A}CN=H}M z!nFe(xl&If_oB$^XyOJm<28MFEc=^L2KO4%z+y`z>%7! zAw6#tscGiDYO2J!U$`=u1q^iFHwKz=T8>ny1_7S&rv4dA`&ek%I6VdRUxB8(b}t3h zaRH4Jxk}KpX$P*&t*n2IMwDnYtnJT#`TEE)h)9F{cM>_*+&OoN1)l2ZHH;fq`V*P| zPEd8SD`a+Rsz{?8ju=GSfPLxrz{WB)pmY5XmWvaBBx@Yb8(>bDY_gH zpNyVf>!0qBP91*2=HE-0K1uGo@OnNsvx`T41#~g6$eLY+C=`qANS_oXqRb!KQ9t(9H$WNQJgw49c0+ z*5_fM1{g_fJf10RZ+0eqGt;%r;CxWbk)eKZ?~aNF_Pl5n0Nk_DG3D^+^J2kL8PDsY zsrSCj`s?F?)f+`7Q$;x23`m;|jOY1h}|MKA&q=psPgAHVG%=An~C`>>g;*Ulo^a?PB>&yTW`< zQTQoH-g>x!qxuJaA+g$C+c}d+#WH-?3bS`>Z(}lJw*XKUs4A)iB# z<|JVF>H`!6fYZ=uGKF8t9nY<9NNETfPYkV>CFFu2noi_&03zjo_|v3Ats{}C{F zxuYQj{FMTL)01P$1^Z?QN|jF-UNx(t%-C$X;_ptwL9#xffB3gY4N&cfh22Fz6sD=H zAMqi#wA%5H>3srQUx(Sj5XEM=vkG6(_(b$HhIcDWSEohh+CjlIP!mCQ$gVqbV@d!X|=g~-!mu82hjTK*G#r6TZGi4r|K#S z2+<+R~CB+FWA_*}uF$oBQL|nH7 zHDaMD9GZ}ej>)Se1nCiPL6nUB^$8KbD)3nkkIC)VpY3w^-y_AoEO^7MOY^i&?}js#Mu+~T^S0=F{O(g4)WCWt+n7P$PBYHl8wAh%^K(`Ib?je99sI zz}WJp_L+e;2-Nam0;x1v=LhqzKTrx_WGH`H1@giTS?xcmbvX^3?jlqrzILqRRgZ!~ zwN7wWjiAi|AxNVB@74k;W1!-vs{Hj+C&hHFgTLM{{Ne z+FMDfMDSZuQtw&l_c1Pg{5@Encw`N8-$p4;BCo>=h{_Q=@Jv%^Mc~%1c-RGM>=j^@ zRIT;N1FZl4q+4o!$fmshvo}%|YX~Z16O1!YPk~4SaC(y&P2#FNNQ_FtctV=uc#Nsd z6YqTJgs#FvP;EPbbducWIa>W4(Lcq*;~U`)CK;G-xZ!}N0P3E!)|L&&j*og;qd4ge zDK*htZpA(KzNm#v31zKY=cys_Ztf@X3+qYig))Pwro-hbhXKpm)UndV09|p%O)8m$ zy>I-eLCmE5-%Vz#DuU3O8eF)fq{}M^7xTGXOk^63fV_puB%Ratv+><^(%FtI$q?Br z!2b=?xn&$us`Z1=0Zl|QqDkGV-ez|8oe=gcQ?k3&dmV)WJxg-xUGxSTiM`PxX;RX% zX|wZ4J0Rd!aBKd6%A&-;?&G3>7vC>HK)3e~s=9RbJXOasx3>jk>b!RK0>90{eE@0{ z9pI#rxgvJwZ-C^{-*YP;N##R|`}*Zy$!mA?JY#;$+85>Q=dB>oLREDfxVs#?fWVB) zABBZ(ATmR<3gcOtwE1+y^R1B@iJ)A&n0-3bflnIaFd;s~>ihLo9M`p6^u|Z*$IYXvsI; zzh=41TKQj|pRe!p0{Ck7SaKc;fQ)cd9<|`lvHfwzGR9`cBi{8`{2e9RmI12CYo;0} zAykb7&3v(laOT`8md=;x`S^HtKZbJTFSD7P+&o&Mll9eKnd(_mWSQfQ4q^DulxeA? zG!>)marj&;7aF8s&j32EE$AejOe+giG$QDPRP+rEshim5J>Q0(ka3QX?4ADVT4_LX z|I`K7jzIZR1D>POV7`u2FAKGEdF)+Cw~Pj7m1oMr5QVtIW=4u%ChBU}C?$|6bBzu? zAydpzi{SWs(U}ROc2dD8cJ5E|>&~kSgE;RXZ z;oG}BQ|?}T5k`fQzD(l_Te%j?RDFu0A^|TOB{GJ^mU*ndP!IY0Z}nkSz)V8*J1!AS@j<;Pm`w=YN!vr@@A*5cFi$`J+}q^1%uM1*@=4mMQGJ zaBL(|iG=l#k!g60Ut5wCj@Uu?6Ph1DM?Svv!8gDDGxN+RAtr2~@)Jh~(gc4d-=pYr z5v3>7uO|sKsZAYpwX3LShs-kpb$%64-8R5ep-9Ko|9-3R#$|7+SoKwJs~75q!$ta7 zDVfTLHj5J@nKJm{JeoE5qvf59E0kFXfzP71BEShi`wTSq6u^f7jRqMFjruQO)=GOc z0|1$hOQaY=tGjk7zQx@%Fv-AlE5W~K%KU0P25H{ZT4xe?kO-o;18r_(e&)@;bDpcH^z@{low;riN@k#FW z>DSQLBL$>dD!}BLH-#h!vjcO7@lv~mknLph)F_Ml+wR85J6TziHOZmpDCGOF_$Z9p zI@!_uaWqKoDVgW}ZEb99Eb!wwi-qHrq9X4DEJSNvzfcd5x7z|Fq7?|`lGm?YJAjO_ zJ>rk;uP^1?e$W3^wOEZOvzxvFvd|qnOa@|-0KW;+Lbhkm+c{tUvAU|zNqJ|&1QB{a zVj?N>pGlj7)1CKD1XP=!_h(K2_=@=zmISK@D?}gE@=hu%Qi!btTB@6nhkuxq)|dZK zIb9(mjgB(FYESK`v?_)wwB`um<5dE43`hm4E$Whmw+m3idsxHs$-9{M5m0##e^&dy zy*^PGkId(#EH_fT;fH)VzrV(JhysY+j`A0G~Q4tuoR7r6uu28mlb( z4yFDr`EH@l!{y8Fd~&_RV3k$0KWW8Wm$E@H7eQ)2xyBqRF?rxDAa#SY`GF-ENIel*&^q9YIcJtrg z7b;SXbj-gOf%oiT>U#dtjNQbUUsW|`>|a?(W5Q71mj1)OU-Uu?O@z>@e9$zesW77- zO5l73<+L4|A5a+EjOK)VK&XrvnUTV2)jtZ$gM;L_Dip?87D=|2VLTB+$tx=0uJsX& zo)71)^682+G=+}w^Y51%a=)T~m`dZn7)X~0^&goj8KRTw;hf-~`IVVSESD_Jh9I9= zG+gd%mCSjzU@D1@bs1*o?y^m(V3mZz)bDUd@Y}V0oocB5U#$!UY3Nbqoky}cdxqC{ z4jZyHJc!YdKsOx5zwBVEO^49Ik>ZvbWh{2l>zZsPsqPC$i7>{ofR~0O*_K(oRF1zi zP#vPJ4;2a}110mK1k<<($FUWUSax3Knz(jMa$D&^PE`es+m#lRSB> zuH+e*74Z$QX}TvT`*$b<5e(NXL($MBYd4Zx(miYBJi{Fq2Oo(MFjrEf3q@n&cQo#D z4y0bNkD7-3AOO2Ln8p}z@_i`38p>T877f#(4GFNR{P!2jobAB;$prv;Kb*AziIT~C zoul6;!=QayE|t>q#OeH!WZf`dMQi+(?ZTpH`p{#mG&#~tJf*h_Z9p#t*D;=C2i zKA0O@?}TQqjL0=G?o^)vmc#H|2p^1*OhXXe=XUOtJNuVA|9@nKFyi6Lb!_N9`^)rQ zgH71_k~h`O=?l}0Y7s*L56;9@4WbQseesq5nX%xq6*W1RW*s*D?9pA2iNj9BK2oq4 z<$>F_JU=kE&A%z9>jw{_!vrmUMmB4|k)3I9UyO0H0L2VN6TnwysPf$Tbgbv!j)KzTn4*v>>S zssr8!z*c{t_kVl&t<3aa?8AVd=<3WZ;u$Ny)*>m4otRT-Eu-mo?JleB$x~4v5R~yt z`tH7YK999+=!`uZJYDv2(vR>Os4}yIa>00a20rkW^TpQ8 z#V?7ie?b(T%MP~->#C@xf)=J_s&f@ZH8C@FrUn07Rn@V`8J(r(M|yf1qWR$*uuHfr z38M!3t#AopT*G5#tD8U_=P|3F1+^Ug$*=nYZbvDoDpl+_&L6bbu_du$(Isi&5DC+f zJ^C;_y!fr3=)$QH!JGD&J0{tI5t;qb&EN#L-MdsA-72gV6#&B%7Qg;-CWnsJgK)#) zdFsA~}_x3-1)H=&Y;M`SW zH%b)L;60hG+Bs6LP~+^B$gRdu(;8b3>+5*Ik+g0?Zr0r94w+zpMH0+@g!RZlkfCu+1&?6gPJ&Dn{n^$` z0=VO5K!bXJQLxkX_~#k|p(#9enOT06F34I1JaFg5)B39D*fqdtEUFVaWANq0eC-df zRQOE8V(ltjY4o(Sx)7_o0OFbsQZ`E^fX7nGGy1})r$EWt*@@XvMhW?$qM`y9{9e7F zRO}w`ui)OSe)ljYcV2AIH#+S~-CgT~Vw=S!1xkCmjbr6KWp^fhWMP{yFl*e8tEJc` zt#9+c{j4k-PUd#yCI;C=zSj*4zXx}zX1w7i4y&an;8f?>9Z%-X5UlEnOWWxCYMI7z zckO%kyWVMcv79Qg{iZ!Hf(?SPGo1H4qt;+2E;KfY^=9eIdWO8|LSljR9_(-R$t2Gh zI|MYc_QEgzn%Axsu`8ig4qcos`1vb{0*L( zex7A_XaxoU`b@&D&gI^s(El;w}0ofzO|2gYJLjaLz!aHjJf^ z{uS(F{YJmpWKm&VDC?9&%sV9`u@1fc8MxH{nd%5D!aVJa?5IVWcNCA<8*1QL;;vGc z_nQah0Vr04HfZa3cWLF@%10sSU;&cOKxi()j5h>yED4o=LlJ~p5{zZNd4G-G*UWbm zTVND?F92|~-kg2i3O7;{lG>V1<>bdwV!w574BO`@Bs|dT`A2zqUo?XzfJ_6_Dt&%% zoU#^t5Qb7yC-G}`%^!znPxrLmiTi!@9~g1K>>5ZaS~c@JZ!4FCD+NMwgvoUxYFE{p z2uF?!7XeQc7F7m@j4wnM^I0S%r~hdip*22Xs?X=@$DRL{o7DpNo^fE_0PORvha{Y` z>1z6_s%t;1bhWB7WIlX0Z81v8<*6#&n}w-NI$3N9V?4pnrQVvZ@%E}~!d4M8O`rsG zQs0C98yw>yby`eqp?_E7aPgXriy>eMZXAm3&6{v3k$%elcp|0|^27Cbt>5JB(2B4sM#cwC=nmN1Atgl!4oaR z;|D2h+In*6pJC4=guyUYPtutisWr;+vGVmrLZ<){I%qKlaVjiF0dLiKvbmg7&4c*q zyp?Q$*_~}aWc{ihn;WV4e0ww>;)VU1AG`VHLS?VR%2+BJ~N&AVfz*QB(=aS>Nl^lfhkD!KuYHK9RD(ak;A2i z_SG+PJ7TgJulEfLbK!c%dGmBzf^u3C4hQi-5_LnSr#1A)2e5O@SBrRn5#(zQCVQ`U z;MFTa|ImAu4{%69A%F9zkZtbzYuHKpzJ+5 zZqDnwdj|m@GEl?l5;3FP3SGgWJT`SPFal>nys<%;yJ&uP8;nfsd&r+_!z*Lljfsf{1>k8W=Tl!kn^W@ zxsI4r$OvOse{OD`ao0vam}B#Wd*L>PmPExuLTSlFm$&?@P^j~!k+bL!%#t5|?Kcdj zCr6Dq23^k(APQ}}_B2H?#N2F^M)UpAo0cZCk2dSX(`dM zozX5rcMdSnLCTqc)CAHHpb0fK7ITh?%HPsk{=vZ{W$G`+yZr`z0u7Q{I#-YTpx~E2 z24;KgPe@zzoBhj1&$rVEoh#64HSiZYfzX7+3Es}sjLkE3NL=KC3L(u z^K(5qSEejlF}bT}&hdo9Hrx%&>LKtUEybK|byR(#_dFoD^GVlD{%aohwQ;;M#6#;C z{jic7!<1bgeEant7fcGSVBme#1QyOOa_;JXXd8B`W>Bw<@Ld1ai4lV`w!J+VN#9t> zt>If)KZoZJnJJ|o-2wQDVT{>Tyg?M=hAg6baYr3$+k4|v)2gS_&8&OQU*4S8*qy$& zmF#~07Q>a{NIc^XmkTBCtuRgLB3|Q5nqEmpN=e-vf(}&#(TyAbjgV1DIfk`@fx$A< zmluMY4wYI4wTH{kQX}gmk)|PFg1>{OLWCup+mb;^zwg8r=7(HjM}_)!e)aW3FXQ4U z|Kxn-N_qF2>CU9IEVaqvfK{hWhY(k)BhiqYXXP;ed_jKu4fH`CNhkhaA843mWEMSJ zw8@odsBHmg$H?@SkMCxpSbKPQ7$_7GFdwDlM&jW6hJ%L(O3a2%Cg?teX|Pp0`Mt&Q zt#|GnY2s?+YEw`^z%n5)<8N{~Bo&A{vRp#Ox)P6)8`jrr(qE6$xXp?K5zFZJFM--` zf;sOg;mWBHs{oYi)P1d(20z;6?U(V~!WM?eSc6QW1n9|D*!~e&Cd# zcZeHtt}sZ;3(OyY9Q-e9_(~RV1=f{jaci9DUJTd`>p{VGxX%n3xo~fNd?&GzVVYB~^l%BY@@t>x62{V#0y% zSU`AO$D=n=8P4m*@|J@GFCwi*imm(i`Nq5i$?nw1&uU7#SF6jjLMp;Tj69oerZdbd zy|>Nwt@U5HkctTx3Ks?YB&IRvT-fhTDbaL44wLT8c0TcY98tKHNW`-5`fIsLNRA-7 zN`K%hq@=iQ)3l5j(2SB10&kJfC7QZS&M|#^K5Mg?g$ga5i+#g{P9W3Ok;?7!dx+v= zrdwRdr(oEss>F@V>uwcW=NiLx%$h+8$7r`Tri-H!brBpK93V;_!p5efkA}8ec=Kcq z?cC}{1%yMEuJW1HX+&l463%{{R6>zEXxZBpAENn%#4-teg?|mJ4v{idhjmC`S+lqL z79qE$`*#uZ;o>)IeR$KEVER^5;MWJjCdRt0%iu88L*{OLK58=~=MKDF-3VK`=gL3Ph zX<4pIS(yIOc+1k!(Gie$r=+BSFB!Qp)$nakY}SZ+X`gwYVcXbw5I$+dcyjgO`DKoN zu*Ylu)(1K^VS)JJXG-YyCJND5(Z|s(vFQ)H+Jj3CMH0+MApw)VQ#tMQU&3J=8@#@= zc6_B^<9%h9s+B|X+q&itkdXsvWKB&C7}Wv7a^gzmZri5a$x_Hy83hGQ!h?<+rB-#! z0}rrLgoWFH@c!iF1n9ncx|+FBiDrHWhwDe&S;N1qG{qKU{ff4@^Nxb_9()-KnQnF$ zp^IL(6%!nqi}n1XyBD`t4!uIW_TN+^6-0fWx#T&yIq?nzBR+^&w-fnVnF@$pY^ShBK?jE;_)=YQUC%pj;5{U%BGIDP;o zb6>rD*<$hluA6?QogPN^aKDMtUhl6%Gg! z(Qj}S3hZQwrWbMux``ajd=zAh(dIoz7J-W*N;zhKExV+E_Ay3oc;~Map1!B88v2eQ)vkG!Y8UtiVfAG>;b zuiDcy-MzZkwbxqLSw#5djojUZTt4{&KEM4xT;@^1Cw>CZBJ?}xO?f3g3j z2lMJ%_PVt{j+FmSP2^+Tefq4ZsiOOgzFI?+Uq>vyUyzAqotvIql_8_kd~Bwf_4bKD z{{hy!H#ziGAJaZL%|#ghzMHwtcu?Xi-qIe=J^o^JNJ;3f@P0~ChRKARs5DaMsg8;g zE*+A#^vkcx!52ir3eJ*0Em}kVQMZKjd(Da%f%OczAN{pe9NZsIyccIYewp?SREj%8 z2%Zrn${3Rn;wNfShw°lH@$N_rLK{WYcMWWQ}; zK3SKps|r+FSBg_vy?k&9-CptpAIYsAG1k=(THeo=QhvTXdwyU1%0nyQ+wDVQ6c(%U zT?|^!mB_!x1)YfyV$4?w54^EnMPy2MCtn#!|L#2;C_iX$itzLQIjm-o53XLh?a~`4 zqZzom`YLxI@H3`d<~6;1(5>6jCw+w}WP|eg?{FkD zc6*$eEJ4$GI@6t!Q!i&^9(?Zm(kZC}&rZ$^I?y;xhaGTwOVdAVjP4e6WVi{Fa(CB} z;*&+yzSy4a0FfqHL`;!T1G0E;v%m%J%<%VKYc;EFb=mk9RO5Yx@ zDN0s9k(bA?`)42#SYw?jtRb*JLN(mDmWWf zjrYG$26wdI+!WnM+~3Gye63sYs=r5d%-Jl|)!+W!ki%%7yu5GDzT}3s!0Ky8)-+N^ z`$7X5+KO4!kB_I>+|bR$fWy4n`%HDFSA7pjd*5s*KZIB$5i^y728-3?zS3+!J@wT* zVnMM*s?Q_C?smibQ6>Sob%7xjs!M!A65)ZL?U@yN3z_c+RNc+X8%-qH)~Vr)CNAEx z!*Zv#Cws(4a$&o)WiOx&xI+r!-S-Zrc`LoMT8;hi0dw*MT1r*PFTZx+he~@|4jKdD zKZz1pB%#za8cs{O^x&apm|RHymm~jd)V=O>Gra14xWI?Wft7ag#K+y-scF!ebQxa( zfxGt&_F%ww!%bUNfaCM_XhVX78&VoNWxKgXEe|qBNJkL;z#L$Zr&{n|Vxg{TNVUf_ zZxlBM1~}R4xHi>0#Yw5jRpW4AKp`U12fy=T-nm%sT*oNX;;YGoskh#$DuTAY9|Rxn zmdaQ-krf10KwFRdP(M8xDLR}>s<0QW7abSf!WT>*+=}45LblzUol0mF?|_r(5h;h^ zL*E{9Ein;2BtEAq+n5Jc_&(>I{*Js!Y)uMHmOAv3WM^V~-P}y2`!K`F*tHzeQ1^d-%4uq9;^W~N z7#P?Mv+?uu%gV||sV`Cd(=DG?@0Evb=Y-(z_0OV)5Xo?MtvuMb$0QCio!(j1QcBTeDxfC6g@q>JfAr}^Mk_i1Qb2p zJ$($lZ0#SOr{oymYVWA(V;hVopyl|?`JZP93PS%?@B~y`-TfSWpaLrHwtkLEj`p4o zj(D=Nc>nHZ(2s*I3=9AO3@pAYYQ+2lPy_tG@_+sZS}_05GXGD4iXnsc=iC3uq7eHZ z7RA4(tgx8Ge|gG=8w@@}!N}XrC}g9J=#KiEDxVrQG-)ipV1U4JNj33U^}k1iF;YDt zEg6b$3X(qS7n2WF8qW-541G_SjV5(RmvAmKIdMKRVAdvZ;`}yVa8D8Q(zob^EFR~| z24!jzxnWq63?8mLxjtL12zIP=ceG|!&T_n}V7iJhPX1O8yP*%K(fNXfOfG@U^fJ$f z=kS+#_h?EwfOjR;%*)mj@oNU067nJED_UO8gReMy86ym+H0Ab>LgsJm>z6;zX;=Do ze)3GDDgL2*RwW>}^f(>l^>;nN&`mh^V7H&`;KZgtT00^A&$I__w*Q!y>sKp(mRW`j zZ*CLDOm;30=YqR+6I%A|XSj5|8W5SOIl4xO!U8NH8Hr*|D9Gd)VB3?gTmntv&P`R z>o`$i_`j9he?i9;Cg${tB_OWvi=1?XemygvK|SP4csaVS^>wSx6GH*aq?FPb6-^q& zli3y7^ch6g;pZ0|#R<`ZL{j$b0{L}rhP#e@I3ZZkt~Ae;@f3uA$0>G3sGDr{l4aZxJz?+a&7St^+n0ZntbrenjKJYB0iOG+y0NGw1O2`Mbg|S1vRWr(^ z%wa>H(bZxh_Tk;Mo#$IJ^031LH1cX#DjKRP#81#1a)fVp0VX0S3%F+hn}eTr{Pdu? zy;+cl(K^Y*k40AfvT*9{^vUv1WVyS^Exaj^{(KGJqfq_3-1OzkpS4>BLSo4Mlin#g z&Y~5WAIy6MdQ;c;@c`|It(_jI)ly|08JhFG;sx#A%ZZ#VC+KZs>a6+h#0BZEP2y3t~ z4$#!`-9zA>UkgC?wri~G-zj$~msxX!6 zM;{;ftn1kB-Lse3dxVtOBo%>wZL{;J+22H1({wVRY#~m#cIzC~D-P#7{ppov?+$-D z$H%&fPTI%EGO<8V@DeuL+@9qZd27hLrGtzuAU@uLu+fM#=7{spT@$Y|o0h7RHp&li z6MV$23nJUfFCQh+v`g?PLX!5Cpq9r}qU`$O$BUy@c)z`SVNy(ne_(qwypRw3Ahy4A zEhUruy%FWEYKOK)I(32OZ!N=ngSseZT=f?-nth(n7Cp~b?SAS?*->u*6L@XI@ri&; zShtnK3;E5>vvj<@-RxUkHEe2aU33;;$;bLtDAPY#-r%XI#ox2YW;0rq0EGFkke~*N zQFWhn*Wv}($jdI+$(9(P#$}%T7LVeaY7WaAEBVeNPEZDjA_m^b0$m25ui=E{c8mHZOM%mnrr*R11vx3BY(HfL za*2i@ZM?4D*TK~1^2+Ofw2a?X&$3fJg0fHTsxIRN+^8^vckf=uDrng~RrMd&W?>{D za*^-+)IFq0pEds>MMbZPYqV6O`)CW<^+4*>svZ4yzL%CS_m1G_Q+mjvD;yw`(Sr5* zgG@;kIcHA=0K|m^{9ZP-#tVA?1j6R@Ks>Bz$h%z`cjyg{Zm={ehMdtP{345vIv{Wz}` z-%JehyaE;TfOsl@Cl_i}tXcT4D-joDw7UHvg1WT6voW8xd6`$ceO$o2oLrKdXL|*% zQ-I9hIeiXvLj_D1N90VT;+@bFv?!3+#S5$a_UzDyMHe6L2_ayU#oGnuBZ$t|F>Bb} z89h($_ZOhp>b%9=ATSVZ5~A%(>k5+xpAri+EILJXme;uFUsJraKaJBrrgcpc=`L4i z4evWKP7cb#`j9Bf=3xx6k4BmcylGYW@QisCNkyhqzp+|QqB#sN-f>2Rv-eQ#KmXa1B za2x9L7DWiA!09zajN^MM`g#G=M|iWmdk2ID=$Q5OzLEfNy!84=GVwOusj_74j<3t; zK0zOOIG%dx!8L0YdZno*sX%V28~V`ZCj3yHN}sD3VR+>RcqMv@6)Gw4DjT(|TC4>)}U@(0H-C_Fem z?D6UX1oyI#Sj=QNi3;gv0@)(uA|G9o-tSJni1RRBnt&eLL#O*3=H*A8rKj}li5gwY zkMOcE;h+>q;NAS4C4QW*Wp}hU$cY$YnYkq3)2f@BHr9*}(Zs)gI6D!UQ$~#?vy?5t zh=)~q%{e0-CcjJNB`>(*(F@=NVfKDXzH^2CAoS2BvIcq|&;h>4T{47z0xEp&y-R6s zdkM1(c-*f_dq;#F6$mNx{#gLk$pm(}^DOZ-+?J{_m)ol&qFiu>9-wwrj_y5krvR$H zRlyHo(2iQF%VrX%>7K>+o?_f}@-;nq^w7=`N#>oFUXe~AyUn})eR0g(VF7TGJ8I$6 z1Yb8!&MR6Jq>uz)1%-QFIMb-$NY~z071VE1w_R6u(W94=UIkuXv0hr%lX&f0_n&50 zi{#H_RG0bAAOomwIiIJA6G5xJ0NiUTch&#O%*myM8va! zHox0H<<;&@y`8Fjn6$B17bMoGiJYCTuc+sTwz*iqllqiWC-aAt75}Spc)F!RgH?)e z2d=#Dc+sd7`NnQG^7kU-r#LU9PCIx78^aCab9D2Y5I-i>HH^4dek%ex|G5Crn*#5i z5CMYx%n(Wmyw(80ki|7Oy?Y`&=iu;^FQ5;1L@KZ2He6;S{c<~;0fIB;1szgI7^5W4 z7{5xV=NTy==Galc8YcuY1Idf5Soyjj!poI*|1CBL)SDGe^MnQ>Mm{1*)DDVP#R&Ib zlYsyokEdgs5OZx+!O(iClvVpVk};1|mVT;ZWr7857Fb*%H0VbMb&m>!*MBa>mKME3 z6%YmZ_PNW`W)8DkgC2qz4cK0jnfPw2NS7{8ACQL)(@Bp|rEf&Sgz$Tt4INvi7f>T_} z)>ijfwBS$`Acg`&R=zK^=jTx^8LxAG3Z`K3pS=RrL|&XdpD2l|m^oaDX5_#?7aL>x z1iv(%@}Cr;W=lA$)1NpJv54a{5+fq21e6Ro4u$URq66tkeZt;Y1uz%9KF3JUL3z_n zh$eyPMmE5OsGuo+_YH81ZLd$(wyc61RS+0lYTN6ZC52%1f^0*L=&U?Rj&P%$sq)A` zj)A5OJ+NdJmz(WUNpLGXx*VcU*fXxWLk{dgHQ&Z$`pJGbR1qP-dx*;et23?B#F>?- zg%Bm;uvf>C$;XHiu%k;-2dW`j$y5{xmE`N;piIITO9)(q5V;xGHHBtEPvgmhPKqQt zr_G*{16iV}_N6)sdDH+UR)oX=J94PP*__u41)B;&+|Vj{1N15#+84wQUguFXg}hAR z?P-ssrYM~)iI*d^<^lDZpubnzVllVGH%k*9z3o(Bg0X|GQiU265Jr$TK4wLTI^o8h zH1veTF1E87s`R>_32y=ySlOC|z+`@j0;~ycjWb-z<~Q2vKt#xk>ywZ&cGQE)BxqI! z1xB-1rI1v86s|%UBn<;}LLF79=SseQ!ru9yNQA@9;4Wt*Lc?G+jIy_q&5oD#JW4pA zF|$|p)I)1$cfUsH;1?u?B1D~Bc=A7R33R70q9xy~ch1qa1JW&+sFr||U(PC^KHjUy zEAhpag%J`cYqCf`l$0k1pj1!u?J;^F{&!H6O_muuwQK>Y;yy}mdZY}mGNRm6F&WO# zE7BY1E8Xh^34)@pSM$dV6{7T_JLk>vucc##RA0V^SV4D;jpC!=@=WAVQ-0>V!D1q) z0e1`*nuT0}La*>OO8iYGAJr>oLt}>>q7y5e(Q}9{Y#7A}A50LdKa-@N9rW#Wo6iEmi!}LyNkW|Kk zE*jG@qXCcmM(790lx9|+c%5sVnU6K~vz-H85APc@jh5OauX#fq%SbU zZICO--dIEr^vUDe4Xv?2tBiAhQ7Fu>Wm$TLu!4J02+r_cbvhAfxu_8q^IL^EBpivt z>)l~L=7M--C~)HI#N$O-0|m{9bX}-u7`@Z}kwBsPp2A;tcD3`azK80p*|dUR=Ajz( zHX%gskh>?l+(g@8+X9tOMKiw?xgn{4+@y%!BBUP$A?7GVB+%u0Wh=J!<2%ftT5p-eeeiN(>}Dgu0Qg9kTr+*yx)yHgi`ZrLF-CA z8Ch<0P%m5hvGM9dwflRW)%UMmaC*hnKV6v0eLHo-o_thqm6*ld+&_kGoc-Wd`&j*d zTAo`y9o@=RjN(joQ6ooT_vX^NF3O*O>fK5`izH@WF@rw5i#Z>;hANeNd(g=Zr^4k*x>JOK zDne{35?^V`=6Eu0OA|_S8}DY1@s|iaQSwp_A`7$&68q)(K3NwTl!SYk^WjB1OPUEa z1DzkVu9xHscx~c4O=>C&Hq~Ji$mMsog2t?uNxW3Ful#vKI7FWw-_GIuSo%eMsNMh* zl%498YSt@!J2;3yK~tKnH;8qgu>hn2k>5ZM`Vyw38i>IXaqWH^!Qf)JdN@Es`yJC> zL1=l$ue2U-==M9AZRE5)+Y9oQrMe88&hPt~0N{&}KsAU3!R@SdlneG^5cKigtAQvi z=3-ag_%HkqW6VTj{-LN?j>L1t^Om0w{gYa{Rxk|?M#P+wC=kFU6`v9UnWKwcHe9$< zm?0fMy_J1(SYK~?L$Qq_-}hrMYrgPgcCM_8n{yyQ(#5LbD7+>zq#wYFhTBc~7>Plb z(M*-rl5Oq-OvZL9$+lHMGelaXP{5=R1-NBfLt+zP+hzL(0~Z0K%YUgD29YM%6bTT6 zw6Q#8bKR%&1|6q}T5pm$#gT@*!C!<^MR$5pIqcD_g@ZyhNB>&eKZdl^O(JcMK2Q0A zaif#v+q=oAV?IjiQ83ei58>>qHu&9KDXYtmTc;^RQjocDC1FBeg4YdIbI|?oQKHf? zZl`hosCbVu1tK9x&3iv^7#y~a^^FtjQSk!L5PrnZqmOqx2`QJW^GFs|zLhXq z$5uYnl=`}WAjvDR9MOo2?V;%x`5@b3zIZZ(MN^l*u4DWh9jL3jba|-W4!hA;59viv z%U1RHGxVE=-w|-Ff~fZonhHwy{lS;^iCK9PleC0d^jBLGte>tyB1H7b(Dy4&1lV*z z&;frp`R`E{@)r*tS8$kon&zy+i`eKMvY7YvVX2supzF1O7qQAyDhk~Ngk8a}p!X1Q zuYKa&b%r8!c$z$n#|Ty|i>4_30;FTnT+ufiThp&RAUA6telXk$f$y&9yjt{U@M4-m zS1F0pt1vdgVgk=?y5*n90Ha2tA*^0UYw3Bxg_xs;(SB7WD|+?=@*g2GkjB^jH*{%# z69;*Rl2QIk1ZoIBky3qX1~h<9FKd0zcIRBCEc#d+Uy3MEf8&W@4>m~@3Zits^4n?G ziw1`Xyv%$Y*PC4P%>W-*MYx@7%+3VYL%9X~f_!O%k>EU6Nt1V1+kC!<-*=YnMnXNI zss@8Qz++TBN28BBSg1H@YMH8ejv86QcNjrxIBSNoyCYpCl5$`i&^_-DawR&VPy{5D zze7x5Mxsj|m;*YR6+HiVu`Wo~>VD6R|_P z$&-;!FJoj=ygpFR_ja)hW)`9J5nGaEr}R16;W3Oj!=yb>=;}d+p(xrvHD3{~H!JHs zC)O1)s{W8yDTm>Q3QdKVO*B9j99fTe{YbzFA|8){*cT!zUe6*|0@TO7qZb7{IHKlZ zOULQr5FHcYSUC$_u^{Nf3cq(Hp$>z%6T?a6;d;P#dx^pbcNo4R(L2aOUQYqlUxdR( zvBn6}17jkNFH810^+UWTk*A|O<%?c|i#bLPf7lTpH%7jp4$^#zJ3wF6HMw47f_=0xzHh1MFaY@;XUfpFsJcXalcohsa@EhFG8j&w!``v*v8KhE1tBEP*`B~y$ly}0wA{lK@A0py_oqO zYBSbG01JPr*iY3#3|JP{`;I!A8vWh%^}SP&8JPr4bFREJjjI+hPlo`Z{wRi3s0=^4 zBfDxP`7Chh*-E9kIVLgSb@ymj{FRB&o!aw~I|KmX485(5zqstdlxKj)G=d*@-Le2Ke6ItMFmb|S6!hnv7&7n8JIU4<VmvE1fE4f|tpF!OJz*GOPUQPXf0&)M1^9u^YME-@_{uf}|@TF9?rfln5{J+Em zcUZuyJe*O?BH9oxXx#Z~JTHbkhL8Yih#Oh!1&Xonlu3yije*3NDLn~njE({-1@x@- ze0bCty1r$a@r6NMXD7$bZ1Tq!w!ylxY=;VkI@xF8HSY#mjGOj;f5c4w^ZQ_Tci6hn zli?K^NY*dH+xuHJ(NafqGaT!Kyos5~%OX+JXUhX9ky zG5@Pv6McauF z!~$2E4dL*pekiR4);4^%A^3=(iYs=&vg0AP!CD`}Jn>>-yU~TndHb9$!=Z=vZSmj8 zJ71tD{m9y>+XcsX=LtNi&UbVxPq(_r zHp!X)A)4sR@ZO|kqqG_ulDhL<_-rxX);Gv>+mPq8saq4-*(UL~RJ{Z%!Hy>#5r2GX z-qpvx&@H2g_yEu&!pHU%Ua%K`_V=hy!Uzx0hf(|Z>dclf6;H;^X!M}Io|uxA23A(P z$@@a>cD|RF`%$F32;pLK3ZhmDJLX-gs-no(Q%xTGMZ9KT$LAU22PhhX^2Z>(YB}rn z#O!<$bc{m3>(L*C8U?n4hCWO~%v|m_MxY9mDw~!3!x>q;5tt_W?MxA7=MJ1+m<0mW zkHe~%VI*OnV}$~?oCWLe_&$!jj8H=BLHZw&+o_*`AWABq^`!g09P`v)k#O4Uyo@V7 z;gT=gv^8HSZbtN(`AJIQbIBAbiZrX`+lEdCoiaTTt}!y$h0He7WJ(qI?tr_2tT7>f zE;xuiH6A^Sl6PT^8rk$91Yq>kfEeT8z5Ixsa41wA(r2tlJ@lX{OE=jI1l)guM87nG?PDdgAh&`d z$<#A(aDeBMJB?ANN#Q5X3Gee4#l`YC#~ zA)P^nE4Us}e8a}JR7LUr;WT0Wb?j zrzQ}qsIm>zuYNLDg~e&`LH%v(aeK!)+eDnA(inFFp*3I}O?(7SPWZYUyyE0UAZ3pAbieHntv){q&5z8;8abvcHPhyI<~;xw z{&HP2?Si(0A*HCrjb8H}$mC5}&VW0!9P=EgGJv(N#%(y0KSo_lbNiX39CPTCkAZHf zL~a6Mi57Si?)}qCF{S#xw3-e2gF5bAL`(%z9->ST?G?mAf{y@Qs+#5FmwIBM*uIj` z(teHfIR}nEa~RL9l8Q6XmeU=&*h=3snGHDcqlXrg__$ZVDJ@I z=esQLs5P>VMUur-8j70yYp^F9o#v>8S2-hY{_ZnYyv=({+0U8|WVsJ!ZSg`(H|Hb3 zi^qtpd~`qwHGo|U{HWxFLRkB8Rcn$_7H{{u4jpUq#$s7-<*wI&Wgc#sU~z%WpXWX~ z$wyeu-mgCIw#6#onH%+xcfD1d`|Yz>X-EZ#_OfCK!7>WBUzv6JV*npsz+6s7EhAoQ zVKI>`aS>>+49t->USO6S(C|q+mn*n3%p+ao%rX-&zBrPoRro}KYF@m{n{`EGX}%$O zIqGb>9sa4t?Yr|~sV1Z zyNxqOuu$8e8T@DooTne_9o~F3|ClHEz`yeB>UQ7AF~>7~W+9Q`W=YK?W_gSC+cmEv zb9@HX0B_&6D%glO*+dCd*J;IQ`?0I9^afWPrtoqMh^o2_7;~OiV&UJg`^YO_#rs_3 zbOO7((SfyPwjW*@Ci{lYX+TQek@fb}OcZM4tB!bHRaNr+f<&(urm^st<$cic*ul31_5<@wVY^qTjs3pmnrmqb&>BszTWPl*ljZ(Yh`=A@S4^0JrqC0 z4QD)Zhe{`N|46*32l0s&GcYu3btBL>?saz|J+e3>O6P*}N`&+=a4naDJ1Whi>C;Wq z9FGl5+cwb*Srg|kIWIRK=Yr`IHt!>R?D*v~h7p<90 z%~U-|E>4uJ<7;Aj@B|V(4+>Yn=kg8Z?bfigE2gWUu3H@4A%j)ezy!#nFx3}xblJkM z%r?CR$_j$8Ck(~HDLNYTKrLlB&7u@hI3F-h42aWIal0_y+E6A0RTVOt%XXLKM47XU zVH_dB)yg&rhFg&yDQ1waZMQ}{-Jgo8&|NFgudk_#XQ6qlYZK+2<_pgy0u}dco9jVm zFN62W>jO(h#4nHvTiL73RC%om#Y8b@@-GOY(pn01why&|<3t=zE96xe@@adrBA&hw z$kZypg{1?_SuhtR$*l2N7$SN$Nz2l*icC^w*T8lKF0bP9>LF>6HPrv~#-egnrYU}@2awF z%p(nE?Xr|vkZLrbVGL$1^6Lql5eaa#GKMXISvole@Pr%keV*TPpSVmlFAKNCht3PaOMrgL zl8iXRrU=6yF@R|(r6kMA7jND6{ow5J*}kCddVWV3)*KIIA0>7Pin=xp~|g%&`k zgAE}Tco)7gZ^5G`)eG-AGCYxUU>}pX6rm1c%wKQRVlg3q2v~H)v9?81)WoE5BW@SGxmlMDzmHJ~yU_@p(n{2k=4#e)okTh;ZLolLT1 z-PeVQ0*(NWpYnRtR$@}_{$6aqGLr^Ai^ECDLHNZdlF^rHaiIeenxB8^M0I+nIy67g z@p5Ijh(U}$8!VnS=FJh_cq#%>78+!xo||}+l*9bU97CU#mye5Dd>FUSuGfx7ZasU0 zf6$98>G(8xTO^_vMt$DI69Ba{EjNC%3}W+ z*AFQJpB!%I@Tdk9l)^s42{16Y4gIF~eClNd40B}5Gru(3(8aM=4ZyP`I#|>NxxOi! z29RW*Qigg`)I;aYq3696X^g0L|95w)35uuv)|HfLec^E=7JvHt9wUr6s-(Ru@RWWS zkbEg8d;Vt3T+X+sxfH(*ZvsN>Hx?TxKl*jI%U1n!1|SI2gw6P*;6uFl|^hdMJ;rwoxq=V zL`F7C(~ry=sF@cv>H0C5q^P37RCJ_}>)Px`iZP_1c#zVITr3f4JL_v(X-Gb5=>y%5 z0+A6v#9TnnCCC0NBD8?O;l#EBKkMsoWm|l?ZmQ%bd#ZIsPQIEcR~)`@3!^>-N;!xe zuQaAn$1uq}7Uam)Lr)?*y=d}vg!xP9yb~X-pFp6V)!|>cvWAwl_0BF^0Fxau(el98 zg25yj&Ko*8BZk2<;j-mH@R8@e)p~I71*siQ=|9$FAk+)*^cxMkpdrJ#OoXRz-dj9S zQzU!5rnCTKr20jJ6vQkrzU|TNYv~J8q3g+mw{pL`qhQ=6dDSO<&ZqnPf4^LQvnorP z%78Dl;-~LKtJX4%NVozg=FnVZpm5Wxl z?=cjZ6C)DKL)7BL{lweUl`XO~1Ha?!N$uC~YIti^@6sXC-lM5CBeix0I+GJUB8S3f zOE1$kmrx>=Iap*r_xy4AG9;}E94xsU_1!zzsGaeHJ`m!jCSH7vImAKwVMqjkfR6R~ z{(aCFL%h**OB+C7Fo4OmS0*GijkWh%>MS7LHchAAO_MD3*|s-%5FnkMybkm^l9WQd zd3%}=LVbVCH6)pK?7CaEFn$Fnkt?aU$G^zLs&WQ$BeW(=DgHQml63`hzsxoi3(30K zd5^pS*nXnb;(+T$edb?D4L{sGakgJ#7`qO3#6MjJ_dFBH?|xdtxz^1g&GxpHSDwUh ztv$WmUuoZEh)W#6vJ@9wIz)u7O}(BM!SE9lqPl^ZOBBx>O#YoZx|kW!;Q9DzQiF#A zJHLv`VUW~rL|XRT;q5bD6~iwa{;M}&cK1mPa;;L7xpW`KAV-7q19?;id3*)0*HB)w zvz61&L_;zq`r;flGq0a5&vk_R(tOhU7zaPB{e|yb+|Hmo#pddTa{#oAr;%(f; z<=H}5VQrJD_i?I98H-vjfp3j0Bfr3CZgct+EP1G77 zX1!&tAIvv&f08af5_uTW6OzBa9Vd$@)+U_loBok&{hKfxxq5=9#GiJCAun(f#}ah~ zbzAdedxx-OZ}JD8c+bqcJvV*^kPA59d9A9dI$Ndu_3PKBj_|Xq*o_U($c@jrjCX%M zBhUML#3Swkr2Wxy`MKDa zz#-l1!SIOtyOoYVfy8$Umm5EeB9DKdivC_@i?4)ibPap9U+ki0t%DCfT1On=MBZ9k zh2JJyFWx_-;|<&Ud4IO-xoPfsx7pR_8R>H*)nt9^=ZQqX+tgjdiiQop6;+%+k|`Je zHG7=-u;zZwc!v#*>0aNGh3x%4`zrqHsiA}WWrLefb1F7@w5^P#~_cKUH2~`&IGcVLoj&2gNak- zX%#MMK>x3U#}~5DF`tN^R|6}fv~ubZk`sW0y^YFIt2}N9@7RSmH{)E3j-1Bz*dbkV zpud2LD&W-8)!cZ1p|0i&rce@Z|)6$YJ`hZ zjkG0m^T%x7vJA_ns9=-Hy(zP*B}{pE(@Fc2s^p8Fo9MYu(9dHXVs9CRNzuC317eY; zFxpHWhFU&K%>akiVZ#g=AvU}Pt!K12J(`W)lgPV$*M;v)O@Ur4>*iC=F#!+u)ENsc z!EX}ul}KaHu}~q4VzU%9>rssv$c{20Z6Op!I=DSZd`JM!n0rL`V>UK;5u<0&!gZ1! z1H+ECh{vqj|u5%c&hdf!+6weR~~(EgUh0{cD?{D$b`zRf{@^1dgJ zrljY4B>ff1_zzemioWuT3{Tte&qc-g=Zv-#_>dxilv8Jwt23jJbgPSLAM>X(iQ2#= zgHqARv6B2Kz)XOAdN}tEe!y#FL}OwKHzq=9&`DMy>)1yqp9S(e_%sV+ui>|8#=z^< z$*4{)?$GG`$5YIw7~PVp^e~=#mew3l(vj2f7e=sf5cAQH$BR_T#&tUpqO|zmKT{U@ zz8yxv7*UQzSnLGx8O@lseHaUri-L-mJ7LbR=We0~XlACuEOED7P5+R*NE0WT2?kpV z`#lfx!-444XGO?$YZVMcq5Xa~mp1*4#gvO_%$uY!M{^$AWDc)_Uz47a*8Sk^NYwWs z!CMV+t=UrvzeVVk$T}Zx<(Wm4@IXdNH)|+xSf97z_?SJQgmDTWCp?G-7yIPIQ$44| z(gQd&ka+Wyj$3WyPGmgaLCNK_j5q*PD}6Km<2AX=r;W}cqDNT0a7x-iF`|K|0+QEJ zAQJ%C#*98~xZjo+^5uf$rD;wa9Z4%WUH`1=x$%fnZJ#pRA$~h3g34NOiiJju#Z|bx z@Zt04JY`i=q4BKGEi_A>NA!>^Nl62GqN&8(=?8LCC~pqgtNCf%wJP`_2P7w1()`@f zUsO`M_6sPw_t{vp{h}p~G(L7|PZ$t)fuzDMY5A84?|fJQ+(^U+Sw1C%92R`pb&ge` z)*O^yn2=%V#B#3g-#eH-m60wZsLkI%_B#tvoKqen#$uBy#c!yuL#PxQH8cH1#-de3 zSwaTF(BIUBT!d@UBsDJ}4kC z`1fz%b#Y3T_-vwK#C zlM4W;q-W_^HnvyNS;)JmG3`sH^E;)uo~`0(TMEY;rxdRt%7LzXg5PY`r*S%(zUF}~XsVePlmVB6 zb@H}bukYu^2c#zwB~w-%zz!Y@8=Zl!SzKLKdz_7Pp0;kdkQfVdiOx z#EgFYJC2*v}-nQ1I=q30Mr7Qytd<6H*rn#t6>*pTB=mio(UFL#K1 zz4=KfgL$(5NR&60l-+dyGpwilzsvOz6532FU2m05JxoF(sk-gg@sKTVbh=1BXMA{5 zz93;csNb z4n~^pH+FGu+G(@E;&+Kb>GK)y5?tgW1};?;2^y_4THf)SdpKCcDX2QQeV8$8l!*%; z_zDMNkj7z+wLI7BC*#+I3Vj@Rmbzs9;p1Cr^EeovbKIFK>j@VfH>R4u;_EN&&#NGi zLjFegKeK!ibBxwcd7vX_)l_4T!>1Xp4Hf_=Czwf3rKAqZ!zUO@VC{OF^}-FOL+gbv ze)Hw_QznEd?FDqdbzLzgC&W~m9EC6u6Jes|#-A8YIT_Q><+e@FAi^}<-g~|}S`eQ4 zObD^{KWj3xN^tOkAy%K}q=>s!j&}i0#>9_Bm-`?$98?>(XaSv_vkxeynmMTesv}j- z2~J}r6jL!$-V0WGBC!mjA&i5-;jB;_+=pf=LLxl$sajZ1AhR?a22JomhGa!u@?O0H zprr-P1?rS;cI4f0m1=P<7Irh>4-%7%R^yLQh;Bo>uUBnonhU72x`1CX)Y1 zcX6QKdDmEH&)mkM{mlI;3DK!-m`tqIYh1{s+%%PW0|IHQS)A`_2Q57YGN4uwNSMb) z;_@}4VY1>Nrv94AY{56ra&7YJ)9SXi9Fse<3C3pIJKsy%nU$5raeB0#CMJcWU3o8t z!63p5j>xMewY3sF+cK$Kro+k8V`5(Y`?(qf`4gBhS#p0_As~1Ek98Cjakt7)oksrs zD8{{gsDpj0L4B(zIqqNfA+g)a?J>sBpOi1!;WT|D@mi)*-?OR_ova40SS_Q#YTc|j zJVa5t0Ukf84^y=GLVkHu$oJy9P?E_y$}a&re8M!!KhXpx+m!7qe4!;=-X%I z*0-k@8$tcS>@m7vB~AiJNSZ^MyScIa=qY9?Ge%zNYI>^8ys8_+iwqVa&+k`mCo?j) zb?dU39O)09J&WyQ=LoOD(}XJ#M4p}PBj@a%pfM!aH|G@)?E63&8;#*GhP3e`<*)LJ zQRrDr-KT`GPciL02&+jD*4t+BF7rUs>ZqKMo8$>$H#!J&D{#=oHf4{bLC-oUhV3QWZonO63Y)t9z3f@Od5Y(vJ? z95^;7Z8Cz~kI=$KN%+G<3!)IHL}waPHe66rNY3@8fd*Ls5~z>85gZsz9xo)VG@3T! zgTH-~#wY~o<8r$V2NF}F>*CV~o4gtH;)wBZwq&WN%;=DUEA|XgtTF?oF*Ad(&W#;_ zH^7IlZvffJgZ(eO;y*x(|9o))+R5O&T&n@5v&fr3g`PyYV4TE{5r%ttW9=B$X9?W9 zlS3#AF2xEO3QifcDnh10Zbl0ZO@7~wR$JUN7Tu=POG8puA~&k-AG-&jbBF*TNky3lXB&L*6+8v0v&?!ww0G0j?ynXJHp|OhJThHcJG3j5U6nU zrPpz;^@?4_Us;0zp76!gWwGj_HhNG8ARZJ`NA}(BS;oa4mK`nN9n#q7ePtBT+9X0@AhHA2C&HHvE<4GFlO!5KQ>Ndp9;~ zDdZRaZe-IdD&pRXmq)6Ncw$D1#xmqRw!M!ECof}Ipqct^dM5{U#)9zgFTEY6`-~qE zZi#+cvgU06K2Ys|DOAM|8FH&p!uXELtZEFxw}h)g&r)5(+M{n!^y5DR>4Zik!AsRrF@*dQQIwH2?s zy)8oAUX_y4x$<+V`v*-T8AWr=@l%YFm{N|u)B<~No6r7wzbzR6%t^t&@+xQBYBVWB zL5gex+#qH0PU(nsY><}X*6S_d9|om|5I$mb4I_4^xw&|O%%Xu1HWDUde-=9$l|qI3DkPdYiEr3a3a{dt~tIg>}KWeUzIrnu{Mo9KkfkMT0`Zc#!J%#@_OWxY$(N0Y3G`+;N1p35-Ty||IRxp# z1YNpqo40M-=55@z-?nYrwr$(CZQHgz-^|3nn#DxaqM|mnsfw!1lldGB5U`j~3B=7% zSk=u&<;;{P(EszieaMJBb0l|gnt{g+a=AMtEnEatCDB!T5VU0t%gz(s%gB*uy3 ziaDSMJ!-jCaBaoSo_zs@GN#5;Dk@u?-ykL0_&3x8v|mOd8@HTZ8+i$n6zmBJc5?>} za8N*>9LFJ&s52EL?AL~kNzS+$0_Her<#V*`^#hvn#^bt32Y~KaPFaE!@)DH**^Qztjg>R-+>_D0u>9|qy%l;?nap;RW>^6*}5 znNmR_c(jO$_d+mj{f>dru0x45CP59dg{b-2R#BXLL+tOz^g13Z@tso4M-{JL5Kjhz z3{4OThJ*X_UEfLuq)UyY&X}tm(2oIe{Y2i7{YMK2$uH)VBxu68VwVw z#|#@>DBkQGig%N-v3WT5UMZ>08Iqg}P+(({KON6K&VNCGnVDf{ zwF;ztqb&Ye+7}xTSb>vLGnNf;^|^oELZgNcYu7pE`pTBVKc=Q*33~t*ZU)knX+`W^ zM6Cmd`5mSejIjG*KNR5LJIE*+Rz3#O({PtomCqse=s+(0?3SlL}p)d0W%*(eu)>ijXtKJRyI zTA6|=uDLBfUL+{^t7B^8eIN+AD0v1NR1_R8M1`OZ0#XLhEh=rGNYsQU?p_CO4?e?x z%p9;$TY?cKWq;AOaMc0LpA}Ae@M41IVYD^I?VwWKVB%m$==KX+?1y9nM#>l9dAc@g z=hTvf@WJy>c=ylS%ESjUj5%1ezw9wE#zhidX!pm;C(HJQbP7jA@h3r=dnd9^Ps=A6 z0%<>a>=I&O5;0UmH0O!Y`_XJDv|4a^tf2ri-kU&9au}^Xwe}MZ|hZuJ1qz)eDn!10~R_+nuZA~1jjoRbM{;rgquf-=KQ+_QeH3E zCa{q)x{s4Ha6Z(XZPycEO`hHng6{3xmZLpj)}AFa2ws+7;e5-0U$dCbaDTe zLA)#!xmi4_^H*_+!qtiqUUeDSkE=AY%b$>BDe(Brg5b8VhX8_KFfGv04ui0O$znkw zMUY{T>&4DVJ2>jG+4FU`gu% znZC5d%MXhs1=Ot_57d{)>Acozd(U49glWXe!=xS}hAe%-g7CbT<_tR?&Yg0}TDrcN z#B87x)F24(RrpKv5xpjZ`Oc!H(BSF6yl8v=4WjV3 z{oVF=z~BvptNm1&hLkUKgF=khxqMVTC0-3t4B^0L0|_2i_O?4SW*eXu?H_2qg_ZQ3In| zw;<9@<)1E4<N;S=l&iA7E2cVEBv2t2Zfu0Qwprb zT=-X~DhVs!c54s=+fW-#{C#syi6fe=1-Cwey}$lA%^fU<0>YdB|iT zF`RmT0MtlK>1up!2S6iMU2;%CYC%lGe4MA&Z)r6Qi@^Jb{ZUjo_CMM7i_;W5xCnf_ zmaGLOa6>VdgA2Y~s5$Vj_eUdTkVh8(6_~7on^Di_-AF8z-R*t{%#e!*^&5li>(`B- zN4N2taKFs;i3)Q1&M^(6{NV}xXV34Z3ui z5idH4V|i#_zO?9Hx!yXJ+kk85piEe%R*$<~(KI}$REwGQEDtM>Xbi)_ zH!Jm53hwEIU?o<(R43;dRP5V>A|%61!a17aA>g93bUQbYEPX9N5oDa#!1v(_Ih%Lk9#T6^&=BG+wGu0q6cK?@jZPd;T5!NO>L74KnoM6 zT-C`!H<*EI+*qK*B0V9W7*lW;a3%H)9+LGKqRRAy91^M%BSi}ix+f~SFaB5$L+3K~ zWne)?TtcHuRL^F0?yKHcuTKbZW-B|#$3{6TKV zR553<#Xw*(e%QITd(4t1)c>CNl0~b~-HQrYp~-BurJenr*w}6AI!6HeC$u9!0Hh!j zT=rECx#pBcs2(mh2T|}tK17r+)8$!1*te~wYBNh`+o8MuF4W~eCO(UX&T`Df@>~j} zDt!R$tE&&x@r%|IT^|rJlI1(VrB-{#Xaoy3uoSuHg*8vm`}Ou3vGaR3C@1iKHR!tI z{)qV>XOAEY{b|De<@x#XQEmp^yX5!v683rKe0&^#n4^hsWHL3ALvCgw)s*6R(sA;? zFi~}<>MOzLami~*ZWQ=_Iu-7F*|%+8TJC@^kD_t*;;J>S!VHgjAMFIc10mZjY7nfJ zlQJ}7!7Nz6IN4+SdY`E&oKj>_GWF0o1UVip6R;bZdv`;;BCoB1Jd?9PMk|Jr+&erh z&x}06jIChrA7a{>4_5wc+REN&Xq?(DLqYqH{6D~5g9@A{0+f5 zz)Kw$fbGW^%Xtbyh=NmEbUVQd@jC(;5Y*ef11WmHwZy?Es9d{LIFRUrj|{^x%#lL! zkjJ;+9F{%P-p)MX*LI)Y@xZ`;*0vBP%&_!1Y*a|eZpZa1^r!HH|lGcS;ZcpFI^Sw@Fay0K9J2M35sxe zQ42X>g*zx}=+9Qb4>L`arPOn9r;b2nZdVip>aW~p)bHWY0uJbX`T5-rGH}lkgPVpv(W;U_#af0VXB5=v1PH2su&!2CokPS6=5+`Rez-Y&CH+ z>-=KjuvNhvYlv_zGIgkN@mmEKD);x~e4+e>ukeQW>@jsr@|81}Nk2d!|Q$l7ob|$v} z!_@l!ciLoi7&_T(H_+j2YSibfwR9V7wpjn~@lVxib3CHaz~{E}b^G(mvFGu0hg~bv zQB{SYyW*ql-twQKusfNikRgvqVy;WeOjDE-8~_MgiwqH0gvU}GqED9{lmw2dydk); zdE8fAPf|q|FPrwts{JP#*@czK?q`z3VDAf4d3+dy&|D8z&j^^2$)3s4j;Rqi4GU}S z7re>wD{^LFY^!ewC(qo#%K89GgxbpVcHd0jE3@`YSGtL)qFp&^p<*tAbF`t^2+Fm z#Xqqvzwk&X4UUj*^UU=Pz-H;{YwN%=RkT(>BfYl#zu7mt!e7!szHZ0A8=bxw?*v6C zEhR2MGrlhmsbRktr@AB}_p$E9U|+628a$@3B&a~czn5Fzx>Fm!GT)2C8y^Hx3SX(B zzXDPI(ZS85z7pSZQ5oaAN{D&#tW1ve>~>$d`p~9hvyni&5C=(c2|j_ISdvVwr8rbX|K`uT)%?lHZ^*?NFKJxFxB63}`?ndM z12}D(Mp>dth`BIS_Jk9$seja0%^Oc`^=&~FsZBrVN&sCE^N}|Wha)*o)~v414N>I@ zaQ|XhtKG@2>_{#by(KF`P$Bj~Wxb8b?GbvHWgbq^<&aWeUE5epu0GuhGjp{yak^%g z-;RBAzL3s$-=gAvHeA7BgRYmOX!^tzm-TKKOalngB?ul{TaA}g`N@bjYX&)BwP7pz zi?m2{t4{avD3>Vgv7}_IStNuylSBml$PzCBiW?{55S+Nw)bmx?Mf4}!DgH=&*d}Iz z#7bQs-aLDWnzX1>t*^?A@fJ0C9e9=$PKCkhuUtMp+BPex-TgB+o4KSe%@C5&?@~A} zDL+I2$&+bCcq#^u!p?5tS}N`?jcI@W2l3o78`xPbzkyslLW|V?$B7ma=N-fj4bd&( zbg*`tsHoBhTlXShzBJ)DlQ(2XA*|d9dm5T=vq2<+IBRmzD{^Fh&zUYh8S3cRf6w<) z2@wJ8@H;`meQhU(lFPDyrpT1+RfmP#7Bh0xxD+lq2luD>C11DB5*ETe-~Kycyg z7ZnNFTY^8ji5q4AN&Ypw(}fm&J#WbGErekTjnb#_CM_7f#<)w`H zOjLlE$+*(@!eT`sLYOx6J!=L#YjD5JgS!|o)VR?3J4c~o+RcF3l}ts%9kyYyBOdbB z20r-X7x{7eNUd#;wR*xmTi(4^JevA?;lX!yNM3GG`K;G#5;lkvMqNq_abfO6)QxomJ|K6&??H#6T-{mGK(Y`AWGmhVkIq6 zBLic2XIr*)^JG1%#k=oCMrW6~P$a4{|JXjusITsxTKSs1UWHZTe&zKI-+H_bIUDCC~z+CaNG{8=MG)mq_*Yn34N zx=L*M3v-!uQ;o%oocBdv!U+ARs-k*R-vveS`Efrt?gD z=q>zoPtJyrxB7oRxVB1}fH1 zeu8|z2iw+snac4-nUPghWFYDnYYhRXOB}{3N7sMc(pdIQ%-VOH#mkz$5`kR+y-wx= z@!<+bAOJO$=|^wB_;;Cq)!5U`x!foj-xVUK9YclG0;MZMvh1EVUAO%UZBMI$F-SvO zUz&-O7QC7eTD~w?IkQ+%E(FIxY;1#h1r-cGkLS^LTzm#@zk&_6v;~RmZV_*us~3)g zJ)XKneX-@yjU(C;F!4h5q%-le_d1~})m05+K}_w9ItS7GcNr0yIW0sYQhc{bIiYIt zLoRm3mG5o`sT;5T&y7oEaDrd{IT8(yvafI?5QX5>G*A7rYzHXM%$*x=6yYGPx`s*g z<;lB}e?lw#OGYl9y0bN9H5@IV><;|Y!N3F0pO%1NKMJ8g5~vWBLILXx)1SHN+!hTc zzD+fX(k*7do;7y7s>ScGO?jaDmuDipcLRqurTFOXld0?6dQM#&hgd$4{|#{zYx!rj zHLt&bs1wGN3Q|#1zIULOsSsYu@(Um~X>>@c+v=5!Aenuv1Gt~uHwuxqLce;kvEsIfy zQDCsi?WoDv{aj9*jhAitNWC+PY;{FjK3%jMi}du^Sw6`dk(VD~mFBS0o9dmCmLe29 z?-b&f6oR(z@EJ~HTg-()AI<_*i^k$Wlk|?T?CL`f{+mu$!~=emAx?)J!wBt77S4T^ zu?Ib@hX9O~w5||+<>2tHpQiDnc(kfRPIFM{|GpGqxfL@KL|)7-;O6X^vHbkc6#cT* zA~Vkr9t}qc7-s3ElS*BZIuq0AA&Ow1d6yacP&IK33|l$;ryD8F>n5npf+AzDBM`M* zcV)>LTTY*l&vsIs=KIss(B?zX;puJ#x`z_F3nZ;CSOFmT_h~a?2I`JIYp9LX^6&Bk zd)NUtY%9JdeI)MB5Vz{BFwF0MrfpEcax@Xh7yS4`Ko2Q2iftbfl&H#~CocT9C=8s% z(LuJ;wk|sacn8`RABo_RWm-aXr=)yUvOaL1ZBRdM57;#sqi-0o=qq25PSJU@q2tl7 z#6&uvl9HXmAPwNe5S*Zwy$FH6GaXB?0VK~FBBAUiWmv;mZ10K}2mA+1K#6csr8^BB zzMJIRn}|B!A4g)yo)xQ0&uB`l4!SVA`jX&skO2i~)Y$qrIQqb(oRcj}?z=j`o+hn+ z3z1WYTrMDG;!C~!7ala4ntOc zE!|jYF*%m^INpl^b1TbK9lyk&(_3LrYWt9-a?-K!#2kVb^b@!r)hyu$^;1Vbg~@VQ zZ|JvM?cST<0~p2B=)|N9)LtdAa2*|gX35C8vkrG;7a=Oy$W<(@+5C;#YYHGoVJ}QH z-f;)k)|1zNJg6~s38YD$gf%Tz+6xTKL)|yX{V?H2^g~abffZ`imEt^~M$!gmp~hMX zh{3Iai0H@+D6(b4ms+qA-LO=PJChE~fThWl9>%xH5bVqJ67594zp zMCQXgmm97XiHw!n?w8mMwp59}#;tx>VPNa><`Jt^y0U&NZlybh$DoGA){&n#qOmtC zityx1*d;3}XOu6?r4*o#d}L8#VjU=WXve@ZHTjoCZy}ES8gskM$$!XFbvP(cPDYO; zeEw5QtgI)246Hcduh2BM6$;n*TH&z0|4I(m4gIx~NTR_6kUc`Ge5V-g>iw6kA$UTx zliitotx}%)h$^(*{g2lZK;eO&=OUAw%(j&hkRTN{)*_B$M3|xA>5uAvy5^_1{ArdR z%!Q<$&$3&dmqln%k|%UuI8sZ`nSF{xf}`{y4994C!9v?GAPh!ti+v{Y9ziM8k0d}O zpDhN}`v^afBj&x%bV6|xoB1TeSBo`;PpKc5q0x8tN>YT(S>F~tCR?f>ZkujQ&eRWh zLxoPikca;Agadys_+drxAxDio7!lmFFM>oN*T21c{L7bkEJiZ?1TAOImO-1flnE`~ zH6~gc1FkArMjNA6IwcuKtZhE{8JT5Ee}801>L7Q z=GiNrLOuH3nmj5sc+c<$y&0|Tfx+-7ESSz=+9arYy}2P*>-{0SP zS(2P7hCQe$*oG0W{MB`VBHqBcSX4m{ogElmQ2w%E&g)b>eV_Ws-xZo|ZNE6?A_gs+ z0FA_qu77=~@TLzo8TJ|i(F-A-gEb)ljqUv2IX10h-k(i7>b-M2YQYh}5pHH%M0v0s zp}-%i==L;-kXjSw)l!(s>bY1C2GBBe3}CBn(GPgGTTMB%cqC6@*MEcf2Cw-lA!FD7~Um2|V3pu&N3|vcJDQ*4`3tJY57COE4cri41=&cyd zjn^S3vpZr6D%-#0+Re>7Fq3_H*|PK>sz*37vj6%Wm={nd$AGk;gu{L+t`@^(`_T{JvGX$m<~j7TYtnJiuvyc~#7Cg`%FPb_5S-SA=H-3emW zf>$Z>|3Gs_Gdn|lv^LQ{muD_9?m=HCfk>EanTtQ5 zs8&LDx*t=-Rs}ItKUAD-UTtR4rYcGz>NS4{yc6C>ri0=(C91bH45?jj`)1cTEg481 z;uo?%QryMZtw)0s+nLW|cNY@+;OgX!mL8pKUlVMpoSIiu(&p|KNkv<^)8GSm7|j3% z+!0^$vlRqmdKNIfO&9)NDbN$wT7(%VKMgj*8anhZr&E4t*{daLSJ3Wif!OCjMZEG) zip7F;ym1FjX@ZD`VsiSbaAoz2=VPtbnO8dz6kyQz&w3b%Y^pu&GOJZ%YT3ZA^JLIs z(B3JEi@5J}bL=KJN%Cc+IVM8Mg3X_P8b9}NCT=e}jii(~Nm(tLu*#=7n{5d{aD)6* zMz^mAWvruQ9)}JEa7Zz}<^H*Drr+8rR5HZa5HN-p2mP3MHRuMKg^6ayNFOnH)NoZG zR7-pRonamuB3=^*xF5pL?LmIw0#Ep$MNeWOzf*;!NB2(j3fK3pD`v<8UZA+%>r1k@)nZi*Rl5e!zjcZUylbx#Sr~up%b<||tQ5Sj(FVJkd7QARpFL)n zT>}0ya2>2y<*_n2Ryy2An zY14n(D?ep&tiV=PNGu3h;?kZ64 zD)#fSw`?}tAWL#xgoG**n&7qcmgKbf3li)<`ID6sT81=>uvBp+Vp&Z_oe5xbW6nmE zvB-PS`$bp?=Lpz-GdWkRw_vyQ@PVH%V}D7IH1 z2I}+3^$t%$LU+YPfmH$%fY;cWAn>=l$t|R0^HEa_e1<`0 zm~wt4{Es%C4tt_pxQKMgjxCADKw`O;kKusthAj= zjta8Q!6@6bD&7^~P82olaJ?E@U)ddMGcz}RzH|Fs1xmo`RO1s zF2~(=-1+{GH<(?j`bWP7nd#2|-pftle1XrJd7@GbPZ> zLFaLu?X#NOTr;7edmL_+o$Hh8s1ZmyYY)(qdvwZ|yts&O`C1I9z@jL2RnDIC>o^@y z;p8(~7R99V*|gq6O6i+tObqTY@Dw3VqJm;PbRS^gK_;}bz(GY>A_)7`%x{ltxZj_x z1j@@+>Ko|w(8A82Pw?#z0IUGuL*bRA)EUvZ-KQ-Qt|82KQyx8{4H>fCX5G$Zv>%cF zG4@Od^%-ih~oMZUSrncW0ihY8LS>+bQ&!kM*tFQ$`Ox& z0x9JB7IO%;nC%seW%n(IZy1qmU5zqQQJ9n82K)PQ*u$%QYT^mzID1(a?StOfH$(`) zKCs#?j!318#EdbmybB6#`mtPz>kRR&lXJx*Dl0@zcFUAPeoxWc@{d=MZINy^GGc>W zuE^)qR#&S7deNQi_||fR9m!FkFHD((W#erM;|<%gE|cr{cn-eWD@6%{h0`EDF%^M9 zTLEgi=kJp72hKuYn-*ME^gcDp-!Ls**9kFok5g}#}vqT0tV}uOrH+03JAEh zbL&Kj3ny#@?Z?Zy#uqALZuu@(_JR4;#4ORJ3a>>k{}8q7HAWYmZX=R#j7K(Zze4QyF(f7ex`BCJU_k%TUt+ zEIO!(t9-rsdhG4?Xcf>1ME@4F%!o7V0$wD*#^3LFB-5Y{D_j5$6(=zFYbN0Jn*M{_ zInsD8&ptOdvnM}F%zAv>Gw!#L9vRy`_|u$hB+}(w9=r640Lssis3G8tElPtGdJ&f+ zgW0ll-A=?p1JN!rbP7|}@7hV=3!$W}CC`3v^EZD1s@EqeACogcv*ZF{U^jemaFc!j zCyME55TxNx{xte9?ibPT_-62Vo;$9XQSt~wlu?5$$A)zd30Y_nermx5h4hRDu&nS? z0SL8|Rklq4f;ZBZ^Mr4QJWJ@M@9vt|p`MN$3D9SJPeD>v$PdKN^qgZ(i+PTBiD{6c zCJ`hqt3C{FSvssUDg7%8xIO$(1_kLP%u{4M*rZP)&Ri^65>355c1CRb-d)p++;D4pVJU%^IK2=fdokr_A8zmP~! z-C=gI7g4~uSsuJT$C@>dJ1NgmkFf%$tszO4v+&YO&iNZyzJ4|3-94M;Jt2JQ3dPw#mg~9dQ(uxyds*lAaZoRvo(Hf^6 zE^mlXQo#a|hlqRB#9R4lC;LxS_6((T?jFR|C*gj`CzsJ~Pg!s8XL8`B|Gfbq4TbuA z`$^l#z%)X=W*koif4@5RV%dN<3#^5(za-d00Pl&+H7fI(cU4FLM9a%JRHyh0x=%-b z`;`ZD0;43x&S%01993ce|QFH&j{~m-PCkOQILva>;QT3xiMJKu)Z9J zKin-*dus?WItt9A!@9y!A3+t|O508o{WAp*2i~_)<5jk@ut$Fz(?zQGr91_rPxm4g zG7JMEDy$0;2OHg?%rt;q+#e%;Y9rngUv+fZmE)la)dqWlrGb;ui9Vs+l6xyye$mW_ ztH0~%DCN;Hbc&l&&fxUbIqj=}x$z%E0+kNVe?|!heDzY;IHbe2FSI88ZP=52G1X?q zm}+Qxq?Z{46k=_k(5c8B_JrC}KN7i3ZVU@`5N{Bp9HU#FD2uZ%G+&)4b*(DnDMi}G z;FDXXQSs%LaeEGb6julA=AjK9Llt3sjVOsp`W*@AUf9OVJoe1#i-h{=IkT>@Kw_~ z;y!OYt5%Y*8+5AG!VaP%mX!w7=E@wXC%696?09j?Zz6+q_^~`nkmpaUZ^PB-=yih> zR^aS~@6~h9Wx_~}2gkc&;4S;*IWy(KO$}4^Q39}i`ShhpSPRqY!TEv@p>=B?!J5CB zWJIs1TI4`{NwJY2DO4;)Z8$w}te_oymLK00G@$80XuHOoSJqgPA^3f<>Hm#$WG65w zELK$Lw!#{)$}P)tBw%8S{=&l1xWe`xNiq>-RX&A|+XTOQc^i6JJ|j{kN4|iX&}*T) zam2ctHNL^-h6M!%(`yV!$x11q$$c}es_m|;nH!A3{)wMt?1jec?5fQQ8uFlTZnL3o zgPTif94YEAf%xR=!L`KnX%-ouq;9LN_mE?CgADeTaePFGBKU*BA*3F7rq&g*w|^W7 z8%op^sNsEi#Z-^%Prn+CuZ?xU{-B$~a#vyl{%R6Z6r7|HNa4Wt1OposzfTnr3TPHO z?Z->sy7IHti|7aR^0MJrEF5VYYp?K1mB>06x`y4=8=-ln?>2{Z0Ao9@;?Foe%XPaM zryXtUHCN*h>&avPq!aTB>am`Hh1P0szC#~Pkn6=r>2o*ZFr`Kg2DYf98Ng+yT0vIG zFBl0?u0ty?PUobC*50%jWbH$XPzAo5gX&(}u>1Vj=@Gt6W9K)SoNZceC73}T54#J; zTfR}u!@Z*9h1k}{;-$|~V7;Q+@mIapmkK}ah;ag75=LF{#xxUNFFOTZV>7M7IfXmC z?h7e9SYroK`8)#NihOr}0(z;cWnYvS0tf~IE77GECAq_?HhR0l4{h(4e#ioU!D*VP z)w-B7ocbTmns_ep=DE0lCW0N)7jIM-oTBI4U95z!bj-EsAwijU5riFM8IklWMqqIG z)N2f+QDMGCVv1=*6umSoS%P?JW7nX`}V; zid~duyGLvI_kS%O4Vng8@;+2x4R)UYJm@w1`Z zx*rzw?i)E1wWBa64a>+TjiH3u>EpFXd$|RL7DkX3HXFp0Wa<)6n4XmiSd<+d9xo>( zYOcD2FuV4FSbLF%W%nZp>)edCw$kCA_8WV8oX<@Sb4WSY{*i)QuYx)?ON>r`mln0` zKFvh8K(Z@o|8yVR*jdde!eEA1olv=c!1`rgv=wNBE}F(S?)6MO1kM&h(s;^fa%L;p z+Wn%-8$!+ZQx<#5R~0JKeV>@Q^KClc-r8_3y@Fg}Z<#;)DpcXP>^QKct|6z09Z}Qm3 zTEjJoZ*FIHznPAN+sEQn2h0z}m>JWJwQ2_HH$A(((?;<;8uSMoA-2u)s5OMk&8^va z+?DTgmZvhY4*A!n8$yjlvJbHrCWc5(odwf8XsVxqJ&;I<%O{ zUr-|;u4QDOrPyEYw!GHBpI}0mIOz>g+O$F+jx;HOGLnBDjf+H<>pd#u;A3qUD4p6$ zoHF+CZMa8fe)1^Mi}^s+k?RN$Vg20G!v03X3wy}JgfoEKWkqNs zyNv6cvpc{LhJP5jH|a|+p2)!rlTjv|CM#c&gQf*3$a*ev_X_ShG9}X8qO1CdmgLkCaO#6m4U0D$_EQS&_V=#jQ5bJ+MJ@ZOvLKw{Mx z4=9SWeq85wkl`1|Q-?Wr~8wf0uH?GeP>!b=~I-_kPjvvH|DMyM$~VfdLM&=<4n=OUkU0 z`N^zbhk6l$K<%KgCvfu7FrQ_V2}c!ZV;UOwY~aV*Xa-Z_VV2MaVbRf`lO@O=*~M#W z!#Z(OaKHx#c$84UNOqJp4sTt558=QPxND^4o_i$Xv+2J1lWwc=MUzJ|kLqWB-bj$} zH`pIi(RgIfkq$D80uRZfV3buh>L2YcQu4DAQ^gmKwB4oMn!IdY#KP%A9HUOZsCQaq zsrP1TnxfCYgjjA#lm;7902D&$_VF%l&86GxA^_nP_YuX{VX^^457{LwM(=5zfb3;Q zl`Q$4dxE452&|+*k0%XGEVt`?cw?6`JwE6)}oHNF6LmAt^{Ar zNN$Z@6;5Vkxs~#P)$ z(-ftnAN>}ek!%a&yC{R%MUJOx>4pkXR=cV zuz9n-g!{$`OHcz5g$@}v3OXzYfgJ%Iud=CI_#rc564bqwHzB`@+wB6&J`q5??X7T? z(g$kx5qBJgSfoBwEvmITcHK^8UJuWN{oO$)QL@QX;{E0@$(l)8jJ->iWDU#GkA3ZK znC?DLWoHXCMbZE{Y*yb?trsEe->M-1nI2@KB;eh^fMY>buGy3TG{W1ejsKpbq?ZU{%XIY)XzZ=YyeNq4v^sXR%CPI*G{p zh24nmD1`U70zlm~SU_zn4)~E-iF_=*{da88@+sKCpmj0RP7Rl;Ougc{tb?DvnUewW z9Lp$dYTcQQUfdySk>$2iyIc{Np!;!|dd)Yj*b}NMRB=3mgk|HB_Glu<7Ng~R0Q$k% z(-?0I__vvuN(3JNQ3vy!L8qR+ZmIHPbg4+sz@$&;!eR7RX=abSf;)MDnvQJ~Zr12{ zJ2{->Ls!Z`)R%Zo*XvD@hgm364ep9kKpFQd{|utk3lp`Hxeclsccq~h$s>K{)@nBE z55wy(Xji(9zvZZ6`A9bnMjA8^$6Ymt_hP1;NnGUaaa}--U1;H#eIMXoW>4*~dg`D4 z6V9ebz=+p~xg<-bQC`2QU1ilsLuXo0$w=~_oLWh-IHYmT14jQRqc>o~V!C+xCy^bZ z1`{JDc;!aE!oH3%v^JC(T_%mhL8I`#Eo4ql&v@5E$;!#+)#7y)YO%3o%b~%o1w)NZ z7+6yGmBLxM6g8~~f3&+mC-G!@nC=*SaNWx{_o(+xQvetxb!3 z78iwe;`fW87CXjBx`aGoOgJL9e81BE^%Iw;7~MmVAMn%2V$Ww*qNfGXP<@YxFQ4q@ z$Uj=c(~NYfLxh>Iy9JF+&*6EjJ1=e zlPW;m^1YtTb0CVCuZrZ3WN}2%)p!Zn>b0u5ew6s3NKQ-cmrsPx?Ek!FfD@zGTq_Gy;mg;i*F;T!C(@C$0u)$iP0e>~Ix|6*IsWsb_Dx-r&lxjh?kHs#d0^I)L6Z4H zJ)&BK4BV1Si3tlcd~V+Fg^gp){a6G2bMq<$!X(%v^pCjJ(3z>$Nbn!@FN?Z7Op-Lb zHBOmF)dt)^o&Vn*D`gPK^-JLm~suX;$yvqjQ&_&LHc*yV# z#J(OgDPwAV5?NNMx?HRz$Jlyxg%&X5{Qctks03uQucP zB1TJB@F3Ou`K@CFx7~sr8?%dWq{ifAPZ*rCFEd_@s?LPKLJqSq3om@iXUX9x}4s3OtC6*Y8 zVGB*fdhUh6DfwEH$RQGm98NGDL0>_4^CMsx)^l`5m3gCitG&jrV8kY_e=5XGqwleJ zTVd?Cd)s-_`;U9YNJmRZ1#Edz#G+({v)3Okn&q1*X)pHGG7H+Cq$&k~$ z5gZ`%8)OMU*tV)VutJXCdB&Rv&XJ6GffDT+ukhU?%PIq1ZVLsFr4fc|gXq`I{YId; z7hfY?lbO3sQN~;gEB#EUv}N{#Yk>@sD-oRvFHEqU^7~y8qY<#l5t`Q~M4C$t_w{v3 z*~vu9cp&0qAamg~y<_bX%REk>Eg55Tdxg%y14`naW~3_%9~?BdbGC zrPem*sK++U02R>LRe>ZHD;uVbt}h&z)Tzf8o4&Tq%R%*8$Xb>~;TZqjKM!&cpvFgU z4jlLk_uADo?;2rgSZN7>+@!^s@4K8V}IJI``M$1f};s(@!~ z$2=^xNyPJV?8WrmU71PvsUt6hy2Y`wD&=J{;res2Lu@%2JcK;#9Jl2}XBDB>D<~aD zfmv}pdC3WNY8xVo*K3(5^1*_mdjt=hZxX2^JU57rIlcjKIZ_7xY$$T>lejj3n6`iL zGdwuthV_yg&G+rwn(lobN$6%Rn(6ZA7KT9#u`&YS7=uvqIVT-M98&B+FOR-5c ztZ53OJ7~?_>(qLrCF(^tYMVEV2VQTqP2ld9`u+imP6UGp>>!%PQA}~C3<57ts6i- zYAFXs!x%Ny!lWK(b5~%lcIo8Eu%3gk(MeHaAo$!ndyl!T@A6z+7r>ASG~Yy$LGW;P z%eqkNqps6ul6jC~6N8fz4NL1dSfkl;sN(9cN>P)XRja1RQdRllPCq0u?gq6;+5o#w zkQcj4&KVOqYJG=h)fwt_Q>1`S8pE}+UV!`~hEcQC3GdU%d!pXNJum*Jbis}oK*=g$ zam!Ixg^lvpl}myqUg5ASCZp{zn_Z_W!o>U-2bLeSartJPNnJ}tq(4LI5p>2|l1o}` zAt6tUBvxX$xa0DCpN-Oo$C}?x#EyWc_ialm1!1IK8Whv_S0;bxzOFURO>8G8TSHy7 z6#W=NLoYx)B~{T>aMRCn4A}wY7gJqU_kS^V4ne{wLAq_* z{kLt~wr$(CZQHhO+qP}nes>nLo5ia|Mdr2^RS_9qoilK~%jWxh>9I;=)3DFv=PbqO z5OAo2V8M6Y3ndmDj)0Htz%Q$2fyX~p>Iy4zrwA4!pf_jK+qn8XYAA8PlSo|OANGVo zmw8sP%S`S(w^LrdES4)t$O!*PMT*d|uH;$bU`#xwMw}{Ju4mBw{Gf8@x*VE2i|jz+%Xyj{mBd9RNIP`2b*XHT2A_BB(|Qb&jNpB;iu zt&1&bGts<_W+TP?@dn>OrPZvPWN=UE!+L{iYJ%-KIkyu2pNB&6AryV_L#K81NxstK!%!P z7?1W1TI8iC*>Ij)F7?aeIQ4dPh$-nm$s zv~He~1+vnYh^I!(3n+eGa6J*vVV zfJkhbNJtwDf(bUDP-53eY${2CiUs|m+_&?lH6{7f2?t?mlCVjSR0{{r@K+JQ&97K+ z%x9cr_a(tA6S6lxL&8l;VZjZ6=gM|Or`PHtMHkv>)EDW_jyT}Sizne<($}a%{GJj6 ztN}=$wn+P9S44~5QNN@juq^bE#_gOkJjRCqFb)!n2zm<%c>UB= zLj@-@_w3fNCxazcYwe809+Ip}h>SC6IBdoEym4f&md4X4cTi-gPDVZu+*G4-C%{?w(f*Hd&v% z&OkF2RkwXQ+yW_ziTiRzd*TQ~*t7v{C}0P3oQCr?&bwAjt`zP07K@^9#RAa5fQHgh z#vdGU2cN*w6aZd9onqYQW>wB=Y7gq&n#J%gRLR6v;Ekqs(eX>qW#c*dsd0>=T7B1( zJs*gYv{%Kr%AnbwzWHMhEbENb52oP~8fsnb#x@6CyTI)23?T#;8&1 zIZ!gy?RDrSP$NtwP7@&)VyxUB9*_`6flg*6n;8;h>qui>9vP5fiQh;XD9 z)Inmtdn4i+392{n5MK%$k_||KjFBg2ny-~CY*%gY-_gjg_hv5S2mMQ%cs^>d%owOn zZl#us2(7zQ$D0rPqX9)OeN-&mr~o7I%(oyWu*rN}L+a5<={KHtg)aji`T9|*>7D88 zmVYi(z=Vw^wA;U`>lVHZ-H%u8W77Iv`z1xcw~n`=hfn>bB<18Xq8iU3UO?PE`Wdu_Nwz;@XEFpp1dU_30}T*7CF3 zG5_X@?T=$VNWXu6*ev56@|)xK<-z9+R1ej8FYCIv!|~n-2si3l5*uSaX6i*b=4ZkK=m@rFpkv2Q{m-uk8{vjWy_D4iw97uoMsC zA>d+H(mwD4KDtmmEP>(fhHx+Pb@R;mEJllWU(kvwByY>Gyrd^cc>9e0)hImtEr9)qdDi+Sm4~i8Dubsq%}^QH`~!fAalS;K1zjk@=OCu6i3|< zEj)L17vP5+l~iY!6xgI^VxrmJKvn6!G9;l&iX-x|f1o2{@kY~5Y2w_>K?HH;>V5ub z7O-{;49_azMVbCENbObg8ILOwkj4twS?dy4+oppNXfVEeNv*x=_CSSc*_oAJ8E{p5 znxEurlHL#Rx2tynACsoR9KoA&d$clA?{RZ587EG13Ei z#*Ai(A`#bNR9Vr~j4r;qQj@&KA@%yeASMb_aUTnMnSNZCa#(svmN|18JaAnce=%?t zC+Njq%zB>K_{maQnXzBVHv<=^LKvZhtk4q$02khvPw$h?zH3k_R=}`hU3w~$xqFGqP|W*> zBNiMh?%|ZU_D9!k`mw1iVDrQqLB&J!LL~#2!2(`?UT2BodSR~ejdooIh=5E_9VnZ* z(lN8qq`g5$020=^LM$7Y*bF(eEEfz9c55Wq4ILIGGfk-2XQz|g^=66vrlWE`n;;V> ziHe{iZL=@Ga;fBQ#B}`gQSV|LB+Q$hpjX0IL%9oIaCSJVM#9~uiTg<{^fu}5Ig6Jw z0zRNdI>UP|f)?ZSH8ZPRmL#278y-jWuryg)edA*(^!^`xTZ*R6w9lQV#TtE%3f&LK zs#I4lr-y22Ad!7%Xx9>~zy+3|%Sm)<8_m*7d?vcFfGflv+ItD=VuiS^>Aw@}o|Ws* z=r>Sw--04j)iXOBZSf%;@e9@jLW(r{ii1I(;~#h)RjnIWXslzRdB|evN>@GJg&$!K z6UcN86%6-UsKkoz+P{ohWG&P{mYdg%gRw$+PmEpSLP$hwnfP@Lr zA$@KLGO2D_F>`mQ+gZ?kv8kwS=ejPydf2837%JXRKyv&YpBXR)J##-eA(6wi*9h$^ zDt|gh%BH_KeMJ4jx;m$hP*%13STLI2%gux*pGXvhpHv_`AQ=dmL!`6RiEnqfQKg{; zF~E>@@&Sboz9`JD6P!`&;Oko=FJmoyHX@h0!Pk;nY3)*!JK&B^|J(Z2JMGTsbaon@hD|#jMjIm&pkp3GgCp-- zsxwF<4ISzzIkLrXEZyKR9Ya=ycE{v?B+M*3cmtMTq@Dgvka8aNYZh;f+;;-( zoc=|B1EUcK9UE~AO{_~=Utr4k5+^?v_5i?#C4*j&+(P(nDMbtNn>Yow{W`kqg+iv) zjjuSO2AA3vo+gIBc?x#JK6 z=@?MHCLy^%-OB2z9xYA>o=BH;7w<~DHfTw5dB%-=b{3}*gj=$c?x5qRK65Oi_Cc=M`K9f^mc7xqXpID7N<7kW%1dEjJgWhFhoO%^u1$RD zY7rKFbr?{{Tv)k?6miEc+x0*?iZw?fwJyQ`Xzo65L^6JbJN3u*yAMw0#c)h)ThJ!D zHrtxLcEmoZLq{3HrzU;VUuHcdmm1fvvZEe4VBw^Yx)Y`=*HgYqhiGqcC(!y)3V=mX ziAdud8{O`?iaOn=aat@(T2+9E*jB;!uV5N{CtNW}tJSkSy?U!;^a3NAsb#J%?y#US zJVk1Q{nVNRXvXd9Z|3G|5IxHw~?(k}byS}Lb>j?}9oA0p@6>S+Sy>(= zo|e~o4BgMZz>Lyjbm1d{U;0$+3rL+wXSPRMD)$i9hX$T;;Cmj2=M@K1MRN19LojLY z=DbRpCU#J&&uvr+f`bqNp}`xrzMbahY3(COOP+ z81L+0!JiZdtC?nIvueB^ zGm#@#;aDr!Q!BLMONKg1e#dlFeAr$GG1x$x&{^5#!GUAtd<<(iF{qqX7iB}MGisDa zoc~?EGrXEvba`0m#jR*_e0Z+e43v=byFi^{DIMtArdmShOZi^Y=)JW&Uk(lJ*18{5 zhAx2DRgS$gP<;GhH$6opJ1~h<^xX-XCLwRy%*dmbaki-$75PBD?~?#p+^ODLXI<{ZUqv){BXf=L zY8*VMA_7)ERSx@9i&5UY|GW{8x35m>slpuF5aRig#(6@!6#p}wEAgq%f3StyfkYW5 zb2LXS^atQYR8dG}@VLCP269v@-I-PO}c@bI#F8m~K zxYuP-xjB*sP*IXpdyU7nl$IU3IypRj$jQo&h;ZPY9M2i6F2>`s zS~D5r$4w5D2}G*~s&r}Szi&wS#&vNu*@rRD;Icx0TOC1PRPqc(=?r*VjISe7{0%E! zV3D_V)tQx}w#KR1q(*ne_cPOg9<>J8D`!iU6lR*}BU^9%)7KpQmW06)dO;QiBD*q* zsa#{JxvG*RZ#Jxhh9Uj2hll)oU3zhE-nFDNF+T$Ly0H2_f<%CR_3{bL$P~#`xAr%S zAn)*~8h#Q=amA8GQPRQ@30Z!J-d1f^pJx$P#_z>WMFX+k&OH&wGrUn#a&Zo-6jrWm|P0AKL5a)ipS zL@M9fe{oJo=Ogn9_zsT@1aCDs)2E(b4$3`!(~yO9vyA@Nx`9rGX^k~ARpGzfC$E2v zXywHms5_sV_n4tnv%wDMD8ohYES=uG_=g%A#6ucQqmoftTG#e|BKn)h+(It>$)yFVl6*D$y>2C}o`H(hp#pRsgnU<7BR_x@;h( zj7`9+xI&uiYdbWQHo-i1mGen^J*E!9EiZw2sPk2;00y%TUNW)jr+_hw@!3cmj~As4WQ=DF7!tG7y*@UIUAb%2XX%6 z37qbKhl?8_IT_?{J#aT4Ve0F{UrgkSVnPRakA^x9x=b?<-C2YCLoqA0t>)F4{6i`k z%Cf$*>U`BNnM>!yhE>m81=z2U8=+69C5i-{o z^odi4=uycNmgTk8|17&@Es--VOs{yW#;>6|yBAO&yGpeGNwr5>XRaF!4~JBA*7)hk z0PzxmNVuYqmJ*2P3F**b+(dJ-6watd6iOd^O1uIMRTyN~1gIrpGt0b+k!jmKo3h}% z=+Tf)3&c}w2)I%M-`_(nuv*XKY&hg5kyI{gV7Towlf4KiGC0cC=>X&XBC`jpZx8p! zE}G~`#pOnwtd&eN0TA5()ENxI8f6*Wf&G3cQh3-T@^l-EyU#vM>gN|N8z17x(zYwwmzaiu@El(0>g+W-oq#D2EwGV^%Xh_7b!oI-g5j5ATw2 z5vg=ki0tOQXJhzLo9frS5}ue_&p zvgD(H4IMQpMOFf^ZsUwJm&F1-a)ohoL9j{E9_n4u&3CyU{6RK!ADwKHx%DaZ<3+PW zj8WTUNRh&MDy<6kohGJ2>YQHu6$d!jeQ#sUfV{)ip^p9-@g2SK=HJ4rU2n?j4A@q%d8@yVFr{sow?F2q+L7Y!%K8-2B`lOf{jTQY)wR`* z7DoT)Xt28ZNqsm$CAr9p8a)pzz8R4gazQhcz!3eaTUzOgWF|cf!K^@Sgo?kywORJk z*T@%At<-ESu^WhBOCUZH7pbKI^duy|qn)U|xYW2^nYJ-pzt-N0fy(Vb*S)gD+MyWY zLVH}a*7Ou@deT8>f{!IuUq5&zZ(x>t7x*Zp7LiGNrs~K`G|(Aw$KJ(M_E)!CvVU^< z%D$);F<3@kTZ(r`_B)-5WtXhttz-!&A%xR8@9Ldfr`Z|Qr`{M5-*eIps9d+U^FkkW z4c$fuKlU^-4Ht*MQ@DS}I@41hfv$0m>)R87x!-Kz5qF$Uf}_9@{)#2|UB$+uy=I*#Ff)mXi#U#cWkrsm&Bc>F`eq*$x74n*^h3w;uRSIrb zX@Y5^_ilruuX11h^NTIRbnRvW3HTh+ixioW=@1Q!!4HP5PEExm<9x`2Y1|`L-MxN& zl;c9^iCIj>SZJmPn0{t`;qHErU0E?iths+m>@=A{jn>%lbF> z=Tl!+r$~KaE7p5$5@uv})eSeer9Q6qN($6Cjc!9a@@wc_`*`T`BmiVMat_P6BCJxc zzM0%rZCiJ_k1NK9jO-PhWoS~p&*sZQ;lM~RW*nBQx$J_ z^|j7z#v}JTFh7FnA8WzQ)+@7fQGYES(*6M_M}mH$;tO;GdxSU+yl7q^)=o67B*VT zk|^~=8O^<>tIPoYOAq=Et-XQ@f)$TWhas#~wLlz;Kcr1jl1ufUa2llZ@I)`6t*yh& zkTVp2-U-|hU@_hx{)_7h@i4ka8?_C#IY#8Eho^_$MdItU!AZH~Q8uM5FL@bv=>V9=)LE6CgRJR z44o5Y1L;6I{`Bt_l8oH=-l@vrKPB{sJ#(SpcjCnP0Lcto7$`2&S9?NOp|B@od~O`< zo56bj(L-zt_4p1+=Z~iV5o6h1X*@Yqd4B~&8GdPp5Tk9%cy3#riks*c)OTVS#Pm#m zPrnDo-dGq;>MDfB(pzHLWUU+6r>7zZ`0smHIUiM3QQQ3vJR}UFOer@9WA12$`@55M zgE+@z#x*wRqN=rcQ}MfPRE!0x1Jis9DTE`E@&#NyC%k98nw>s0*oIHx0eDQa2H1B*38vGj;DR_nD+9%VI*6>N8IYcN%@qD0daGb2VLzu1 zEXvS=*5G~2P?V3DJ@P#~`8I<|Uu{9doMSsXzrB%=3<)1kD+$-Pj}?->3$B`};lcPE z?NOOOIEypC@G-zZnNBZi!1tFDHmlRT2=??r4k)Z7F6ems9j*SHexXkPpP2+g_0(J( z#eM;DLJ%eLR|WP5YenmEw}PU~nnCnVzDjo=R1B2tOze*3Ap&i-M)8Z?)`0MkPJqb1 zVE-dfMmx#aFyNUEMUIRGGNzzRCrd^A3QfDV8~DOPJ#N@42W8k4%p#Fi#=p1fGeHE) zm(L%bEU5&hrP!Vx#FBh&Q9(ImgAl;HMi!fQx`=C*K)p9Vj%ArEKV?_NN~IGucsAx0 z2rLqs1w@y&ru3A_{blngP$~kU^C8Uzo#iQ7{IJ<=&O&sO=RMv)rvQG|&qfq>9B|&8 zq+E=}X(N{t@icn?j)1R21yQ)YMp(jGttgu(=V6^w{lE?7zD9Y8Ig~Pp5`%n$?2fFy z7%R_^C%8$jfVIA~^|7bWH@CBUczCm<8+V0FCYX>F-A>1{$oj2vI#m$EI8V^xr_m^I z<$K<-p?L8L;TP3x!IaRKAW=j~%?kn4%!^!V-vMSX0$v8`*VlF2GQ;sA-Fas3SDKq; zJ*km2i-8P;{?cM(vM12>2nSK64$*=J6glo;ZmOG5UZbJx`VfVX&RG}bn4~h}(u7-y=HLcwDssG4bzReBj zLRpgxSLA}WxCupKO-HmmeVh~~OeoQCsUwQ08j39b0m+3nD+k~zA!h|Lym zU2(8=foX7gnb^9;6GXEunAuWpCTDS-d#egHefU_p;-B4y_!PTXZqTYQ3Q*K23ZeUm zOUL^(Gg1khVa73Bi7_^(bEy+~7+m+wDYPKd-mok3+7uX(t&>2z;|GS)uc&~7q_r}$ zpW2>N`6-7yAmiwItQA6Wtj-h&zQc&v>ao<9X1BZV#09sRYlO;9y=E�l_Owv&aK# z?=5etIGn=|>Hdd3+cI@tl+SV7Odz(cJ5qEPEx)PIF{`G7uEeQgXwq8Oc&ES$L4LYU z;#FK)1eQy8S;xt(W#1t)t&Y;l1W|`;rFUb<&^xIdIzEgRRstL)vznkmen$#_r6nC^Y06d=hyldd+W>bM-~@bv2td&=dpx>kA+u?_i{w?ccEgL zBhEGO+CQFiPyu_|gjm;=55M^^%NnQLjBfAd;@V-mq%ppvPS#vPqNW;!u%rJxC(^KR zwji2oY3C>U-H|4!?vXNhBw_$M2_#L9zv_GFi6|4ipAVG6QoIKgDO{+ZR}fLY9VR~X z0?4vWZ~{j6hL8x}S3;snHU>KlFuWZ<@KN*qBgSRpm6r>F^ZHuM7_$n>6Jc)~d`;>e zhCsJon-$x2?Hqc7QViUKzAFZtC4w-#qK#zXK5~yh9Va(?|@*pFHt4>Yw zke~~xRd71V6r)Ie_IH?4v!;|vwwM;*t04m* zH07=8-uTE+59yZcw4XvBxCEul@zcfO)IC4Pt50Z! zG^iHQ?b@P`YPs%6&Hg%#DT(N{_6#|M7IYTsKHpW{;T^1FxIG6E3HKbKZ>o4~&V5 zakF3NDcb*ze3yG8r%f=*08v(0HSUnQwVTEh)gGd_G7`52>v3ZK9}oO+0Y6q9cA0dS z8_oR18}4JP7Vet-m5nxkywP;Yll6VAN$B=peU#{mt@4|yCoC1Y6f?4u=+F1Q6))O6 zRLC5S{zT z8u(>^4Ju}Hle+%wRNPA)V_=6Ao+{DdRiD7f=9pirSE14!r>|Tjt|kYXCk%Pt7>i!7 z%h9!{z>n}aS(zw3v1RNlA}0}}tow=(J9q>ny-Elj>(uPL(JezXgdgMzmJ6$dr--3AokF##Nk{3-aPAt;JV5xUqmieSFmyAaz zlocDRxXi8pmr_j?tSZ`Q_Rl=+nE(|O1i zpEnt8RqWV~AIaeGvVZOSYeDTA8_8tjb}5FCGBoyzI9>dS>7&l2SBpL8*vh z3QczqQsT2-1@+dqU6N73H&gEKk#8O7U6jea%SW|XuZwHDy?I5DLyvIh8kkc_ILY#k zL0&q1S#@~J(YgBq5O?!LQq0Nn6B?5Ik}e-!Zk>fR1RD)`d&dfiE?;KT&gcSjg21IK zPtaWRfSxnS<9evm1q(~q4k$&Q0>6arDvbusg%Y67kP!RN<4TNynIJ5J3rUBrq8u-& zfXKB}Ad9lU@#X}cACD_24Y!+o#_oDrNB1nKR~m3Af-AVL;S# zy2iU6?6=^+Y$p8N9e*!x?JvTIUjabXRUdL|2fIPVCY~W-svI1pCQ(D7gy|AAhz?KY zZE4*J$k8k5#O2LX4Y*1T3JSZ^1HxL2=&MY`z)NdaNrz~usGXb;BEI$6oZtT71f>&7 zT*Orhv9}T-V!y@T@2!+hQiW5t0KWvfv-eEVGUSSxcdX-?0;h9(B||oPP}q%9?O$i5 z+;~eDxu^@ol)bSLHE5)-T6vUYS^{uMlAI;aK_6K9Oo>LQ9{!6qo5HNmE+=Y zuDngp-K+4zh@O`;JKe zWbzEqG8|VwOpo{Z#V=Nw5w9piqXgV~xik`Oz2wpW?0*zxpcv@F|D7F1*C-d_6p8Z zE?dKj=eJrFxnllCr6<#c6BzakQrhZz#(h~Xg;jt_)dXQI6G1LxRUMR3B$yA`4$Qz^ zVRI;z=EZ;62S7%qocM%!XddY9O(6vI8ZpuyDTh+`{F8&1f|zU;hOwP$>_E#F43++a zd-V^p0Zs(gwjek^-nV7SHy<5v|L$9I>FBIaN#j@TO!igl{@SrYJbisQ;brP>UE?e$ zjSB$gFSz<}5H`@;jQfoY^{9>0Nkw;OE>_qP?I9AH9tqYF`$Fssu`Ae0dY)^~7&|-RkQ*wngSiE=gXz;NHfGMO+^SS^~B5td60fH>KqUuUeam~Th zSoDEDV_8JM@{I&-*n2!Rx2+vQ`oN*DQOBpUk7t?&{8cn|K{vVlZsv`~w_A!h510Nz z4Ce;v(nJMT<=kVKx9y&+g6urazm@x^d|D2|;uS@aZ_o|m;c!PP7tm*zjswD=Zdgn5 zI{oQK{jvhR&4Tg{XflI2gYvNa?fIkT1v9E`S8$<*@vG)3vne?b11M0K5Klt_O1`=~ z69mVJtiTtxW6|_w(K4ya+9X=#RdI~NXmG`tN>8a54YiGAe6<$Uiu3q@rU`Yb7Gkae zc2&J>$_1-Z9it~XJep>Y#wOMc-&GE{YMw%oeOb*h?q@)nU6|Ro!I%1}4HIEU%k4Sr zslMPHSZwUGkvPiR&{R-Zd4OTpUDzw3L_f|kM5`l*0gFXmzyo?dp4%Sf5ScEYf`RRo z_CpQkX@W}Q7Yy;BEHErgi^(<$QLv*~#ioa}h=|79>+xJxMDSTynHdHR*l5?o+h-$E za?M`wF9P0SOd|YB{FT-7_%B@+l~0>pozM_JAhCn;@?Fbi6XqmKn_?XQf{+&SBh6xe zV@9d^Zmrd3DPA7M(ZX(GMSN7Rd z)A9(d^Sy_*Ql8utG)+V)K`?e`L(@*`Eb_LX>*j9D$l)TigniicFv009bWK{uY$-{& z?PU-r8*Sa$w|RQ(&;?`-;HdT&s_tW1fMizLh*POl_<9rWuo_PSB6_ii<5Cn!?-b56 zfec9W1YSsG+a3t7DpEj&KY`pCjx3T)IYg-iN`8Dv9dcGnGgdfZ9d>%3c;jEMRjNwb zN8-{lt8zu-m(d?HNX+%vB3Q+B7SQd&iN$f2t4O+-N3T3?LqGEimgR$@V36Lq|o7lTE|# zw>CXJI0%*B>g?ijY-0E+HTF#xzA%!#fO|YC{8UB)>BYnV-o=N~*@^$#qP9JWVf=QEH;Dh_SB>IdJFAKdz;oIMhu#0Z_Eg6g#AjxCs&9Ao zVb@7G4+o;Jn6R9fuw3xvw)QtDB7(yWunSXtZSBuTM{5c|MFtJ;9}<)Uy#JMF`S*B` zhx?7A^6O;(SDx^(SIGE!3I~wu*Zep((pZxAQlY z|KnyUQD1YjC#vu_Rqz)C)ZEng@-4UM=hV#aC&TTpiDC@c3d;G%MtubJtrQgA6LQlx z-RPLm{0NXiq1BP8`D>*Ad(nb1zOg!qTYSB5__F2#Mqf|Q^oRCZCZ~ku6(0rde}soH zzI)xLD7l`+nXa*+1+c9BH%&6Xajh57r>|7s^prRC_{Q+F@io`dv62TQfDa!}ak$tW zM4=b%VkCYh)B{n#HMGkf)!`nif)af$9x4j(>#;e!p!BX(mpxkG5XDjFZ#f+uwius* zW<>R)l0zs}N!=91^t0BDM0@;O(qPLhlVqSTY^UUgK|Xt-4xP+b()s6LYn4N1wA~dJ*Lnhm6a1{hR_hNSqZC$CmW@*42W3XzzmO}U_v4@K zSQ9%;XwA?L7UvLZS)7|!);6EMT|vjtvVsKsr3{IJ5}{aOq-qlbkF#%CSSi{EA)Pbf zLL2n`yhSVo4wv(}@V65YJZKr~Tv<~Um?G$gD-_t{uwjkawnJ9CtYmwc#2$7sQek4l z>9;F2$cv%XM2GbXYirPp&k{oDT9dX~*OHQ)> zXY$XpxknAgp{#ZUbU>395W6yd7-uM_6TH5(ycsfxMm;7)!=jkWp4;ra)b`y3qw&R^2=M@JIqB_v-L0YPd@uPcHh`Ls2of2Er{r+Vz z_H(zHqH1Kc!>1}t?gIxE)emO)Q2cC}w%DnaI30KFzW2^gM;np^(x67i1~t{bL0|cD zFRco?lBm zJfPn}#@IsADiHC_a@*WIi!80yGM{35V4;&5v#NsWG%Ly*|pM_Xi(~NhTl6Q zG#NpSm)WlX&FwmO$}0^u=Vys}q{?8kRZe~R6I1D>?RZ~D;i<)L;&~*p$)GjFTMtE~NqHRKJV9nk+`dp=Ja{s&!5f+_khdG$^Ax}9_IZ|!yi7TNP19|D1x{}Q z6dk%PlWCX6Bs+{$E17LviMvR-yd`SD`;6Ce zIbN$Gux{&7(HrJIkQVjHINw)$8HvPB31DvjoRx6PtJ@}J@fa^iFORcEgqd450aJfO z->lP*VO*>vnobr2rKMkBOWIPAtm%wKa>!FSYp;}SF4|DZAbit`8}p+!N|p0%nZ2X3 z23a&{Xj}K*xH!Rzdmcf)X43PcWKeu~@1=gekY2|3R8YW29sHFD=k{{l#inR zI5lx zBB*^2pLoPpt46C!Wb_i643q3Oij_}6J*@3%573A~$$-?RS39$iv-c`M$15sTWLS%f_I9*me4Y6W&*WS zE1bs5F_sF&MeEZZcaZJk3$kD_3*CwGw}Oped>Qw{mz@%>#9m<^!;vkddnWUAkYnW1 z^GB3?gEChQ#!vGbX|Vb!fAkFVb?SrLG4ucwg&*~m(Zl~Vs9^xKnZ3Ub)Wg_^jN{x5X9f!J$2*=NSo(+ zQ%VODM$G0V*(?l0q?>@1ZS<#uOnJmyp!jg*Rl0qJ&N=9DLkNFM8K4&REU`O$*wjH4f zq-{_>dLCNDSM>Pj@?(Z~`(Xyne{_IZ|7xFBk;+c68SM$$)JI9y`hqhMpbCD>QvKu#7U{#uH>6G< zfUWK~g>!rZry{72SFM=R6f+0fPHeg3lZ$KHeMCRvHxW^M#z=YgX22|&C>eb5fJmii zdcp;7zya=8DXsM4GwE`>Uh)8@rv#@;^|ogneCazoe?2StVOsy|O?KS0@UCHV!%aM7 zpX?*^-hY=IWX;5d`PW#D=H>Z=MM9z7j=lTXAp>9~VI1I@n_#qU0aDVXBDw!%ucw`d zE>M~uzMUrXXbenS9P?yPV#GLG9p)CamUx+h=(*32YLeHT3|s!e-=OIzhtbqOe=vU_ z04K%cG>L=a&}L25V(3;PI1KrRKv^Ki*#i|DinhQDH&O&ym&B{FH?0=Uu~RTK2+M*;cF~IQ2=XrhUZk=G$O~E)_|+he_MoZ7 z;>io+;9ZHfZ4T7+Y?w{L&G}WqB@?}G!L$ZwL3+2dv};`rM>~7_iAhLI>XQYUU(e|%Q%^w z%n+E{%sP5fzSXNnG};{z+y7(i9D;>mVl{ni+qP}nwr$(Cea?4m+qP}nwmJV@+^Sj3 zVs_n~O;=Z^QmN#5BSh$2q(-18q_er-W|7Rh%EHty%0G)WXa%1l%P%t&0-pQIF3RzM z7tpAtT9kLr7Tx^Fk~!`pkxTb=Lci^~J}?%VL;h#jr*QK|f2Dc8Coer_U1iJL8_8a# z(HCw+Q;g#gTW#L|*3*f4bZ>nO?hFg+7giWnOt-$5f_Ks}>?{XNf8NjfA+(kLS#iK7 zFkS0Af$=A`aQ%;nj|8YqhQhk<+#*fK@_h1fFlB zS%kq5wv9*BMML5IA*y{5%`-l4x_2EAxf5DrYZD89g?3EhGZ*TEzl+|3F1hf!kAQ^0 zh|LL`{`@W=2NWAyh5);6Q(O2ArktW@-%}e_DMD-9t33i=?#;)Dh^iV0#U?)04^lJ9HjEX!3L`y8JEJkS$elFuZ_2+TT>fvxO;K=xLvuJolf94dl8$h8&7XdXJu^ivYyw^e3jP%;vFb{tEZV zz5({-vuY^YD;B%x!o9{B24)PLWxBsSe{}1=q#^w#!DV{-g#njeLo(RR@=V`zi_MQO zoa4mw4@nd>DHabvADKZK)r$YzKu;C#R+-dzlaC;@mH6)QF zC5|5?HvIH#phFsoYWpYoyxrSTGw&@pjYtGz*aEiNRoZ`1aZKWT>5~fNok?uBaE=;6 zuv3fB8Vi1kxn^I}$j~D|Kg&$0pa0t5MbhyH7AEJKj$hjrsHVo|%TlktWOKXHN*299 z3JAe7%PZ0V@LM0J!6ef$(=lk!V_2U5!Qrpu(jT}cd=Ci4Wb-5GLMvj0frzSg>+`eJ zUEVpIQ?13gL~iU_Zw#mZ>g4AAxx%TNPo!9YFm6C#CA1-)DqLLnd2Q7FC%J-zkJk7m z4cUbJf%0Nk_6%>CVd%9(fvma-y#J=VWpF7-Q=uoCu0H>?@7q9PcKgzlQv%znK$2uX6? zjKL)+$#w~TN{3`MVZ_(HtE9*OJy0-i@2ne}E(gASZ@#czCT^U~p1!gALb2|;d6XxI zQzjA9<{JA9D?0^lY@7g&c3^m)1PZ+vN>OEeTUo_*nB`hBvwkcV!l-0Em#OG>nDcbK z&q=n~(5`ov8{(3GRGQqKJ#AT58)6z<0}PS0Qv<)pUtd3J{Gn_zTOleB#=W0YfTM$C zE-T5eP!ck*+43UVqkiFk2cmu4RG?L>5|7+AVnC5VML3KDI%iRWymUsL6_{>%Of+z+%xRNQ=#9UoE%6T{iBsf9Y{$qq%i)Og$#0qAhpSYBAHwA8 z#OBl|C{Z($krK}(2sO}C(R-x6Ky>~kRqPEk6)Z4@L_u)gjb46-LFPt6x+J0C4a=_G zfRHqjkOBLHeM=xtQ)@e>A2Nxvk#^T^9@&}l!Xy8RuKLrLp4$9OxQ&8ohei*=Di(&nYiHz-1Djz+3M5 zP2O;KKO%mZ$!PF3W?G7Gm0bYZWQ~cFIup=&>G~J^p(I8;>8as}yGx?p`)G=edZf2L zYwXx#BB(I)Hk43+ERVr4gxD~jgzcF`tNB)h0xL#8hB9`i=^d#x-Y&XwkvR)@ksz}6 z&=ixm^rf`F7PUC9|6V0Q)1IFB?YNP4l*|2=Nc+x-4?bZQci06#MXyvs z*ih5t;Q+g9yZ9XyY#j`X~aJL6YG%G zh)~@$YSg#Z-$tI-w6{r9wDtmGG<13vfY;@9lu@Op!$?pqYx#NH#zPGqp8R_m8ii*MgUw-{>t)F=_CtjTbiJVj(UR4e@0 zo}dQ_M>dU_fp?T$CsN&G1sj9U8OdYKILSJtKsLX!yv6ndE$6keFIwb%fdt^h-O5I&b8QsCD zNv<-yoCocAt5KaPKWdjTQz*DiO^$Ni5KF$YkpT)$TP8U z+2v#(xoSJjP!88)?KTDhln+4|ZO_5{=$cqsRBM^)EFbcJ3YH6o!hJPp{z^-5uWy(f z(8!-0o$mPXnO>0VnMeI%&2}k#D}XYKm;+wbVGm!4rB7a1njriF4fAZZXv0rjM<}t- zOn4XQT`$FlY%zD}Y-81H(gdd0wnWSi!GmsolX6&iGPT30KJ+{H608^4d%O#j)7iT> z1l6Y1D#?l|o^UMoXLiOWY=CvSf^)5veA&KeSoAuNTX5vSK6Mh$GtU7%>1AVckWYbe z!xKq6yaI12znluU%@Rk9x~s%W@GhhAX1>!4yJRBI24D(&_U;2zPNy&A)1Afj75BjZ zB}fsg^}?7zJsIMQ{3&DLk4%ngTvhl9l<{4cbr;WcmkCx%N!_kj0fz{=ktw(?kqBU2 zLWx?2>oeWQh-lhz&YSJf)r50$X~icg=qS@Z8-Vbu z6OOcLJ(13kc3O@{^lH_IOZ^Glm~vW?Z=ArM#9kWSlgu23mm4eJI_l*_22=`Lx?1Y+ z0U>Ww;mpMHZ)_;~h)yW&(8@3M*6(fXleF*S#vJ`wnR^#`cgfG#e$fTHcgL;9UTGZY_Hjl73 zHn*bZ80H}vJ*wSyuV1|Dn$$Ly!FQ)W9a?fjX$WJtB}y49Pp>8{f(P@7EG-T_aaV{N z_m~&YbE@G~*-3a<>Z|BOw9jcZC~4-%a353l00*t3f@>c~2SMuv-CZyd}C(?ie zHdCf9k17KcwXe2F_T`H&UM%+NYG2=8bfnyy#@S0BrW#@KQ3z>#DCKK0&1e?+&epv`2o#-Xin0g4 z(2k*y3XgUU|1k|Z3y7URDJ>|%F(!1Edt&zOyXB-sBQ!GCw(mZ4Ln0}izm-`SKE>5d zBZ|k@n4sw~P8`o07Z443d^Xd}PcJ;Vn1V3!2fe!E3#>R|H@L4F`sA!)bqcsN$lO9o zJ9#ZHb;4!6B;lC6wS$QnS;&Frb%|~Ih+|9vIYw+#n2Y_R*dADV>r{Z?^L2$e|8jAX zJ(4WucnKJgN&!^zsk=_okHB9a7n1R{K}|>Zd}9b3W%mXrIC2kI6-qd^@m3{2C;+Zb4Pl(g}*wlbV9^Lr#0_`%2Jd+^wXVt z%QaU*i11-(3_aQ|%ftG!qOk&j{Wz#j!+8Rv!5qRZ`5xBlm_MDFbY$EnEsF_=51M66 zdB7}l_(`|XRX-%vPTqfMqo`O0vr$En+*&8b7kgKPz+k>lRBRe~l|_EQD*^AB1+%4L zrw4iwms9Q-i$(pfm8F3#d`iAWIHnSvkTICQdhpPMX5J~+f19NEq1s}%l1X5(xPQmC z9)@^V&dL&Y@OT0NS=8QXO@ zkD-_bkMCA`$jl%;qLl16$=*N;?a@qZ$b30=92JH-5q5$^$h8O7A%-UDS@y?Ku{`46 zWSYKuoU@f(Z6i?_7XnE`w6FCwVBkx82j<2y;j&YoEI2a-25CxMn1yA}VH6D`XV8%^ zQi1ElH}uCA0PTz8so=}S7xNwY)sAgyl{=+l;(jSgR;nwPVj|%5TKu)ww`CU*l;vy_ zNAC?Am(#Cc1wA)mShT!)$J@`C&51M(G>c_XGY#4>C(eDu>?z$GDG2QLWZqN5CXTDd zarpW<)t;}!Z2;{KA}%XXPA&5D@6NcL{0R9q-Gg;GxZkR=U3Rg2`Hu0?Ju9|`C5?gc zgMC>ZQ&;bYt};&Du_8|2_D(<=| z=ygPA#wJpgu^PtVSbF1eB4>9vUg4Lc#1S>FyOHC`T2X}wuv(-Wf4JmiC>0kDQSeqa z{jCUOb$DY2xUe6nL<8?%Ax;V?Q90lYb_K$p1J~^51nAq(H$Peap;6&@SAg(}piMc6 z=_!GK0WxKMfzrGo5PW9tg2UD|;7u=;*9je9LwrqSB+Y)ks_UMwXc3dUsN;zCOgW z+p$q1Fq-Bc`FVQqrY{?RGoPWvZ-Dd52vjPX(Fxjq9J@38`AAM?GP0bRwHYplJN^#O z!{mc;3}@P#28G45Wz$(8-EubmM3xV6)=&V$*NwnEoY&4yZ`~tB8oP|_LzhahrF+V@ z>l5*i9{S;OVo~9i?FzT%iYCqBRv}F|31!--S= zS_^zDjIi%|i}~k_s*=byZ$>~-a##p8!iq!wSA*#}gUwk|j0A(7YWQ4Q&%#g~<|$MJ z1ux|7-kJd?Bs07DkLEfaKYFWxBt&7~NQ*O}A~k4uc9Z=ZG^$=!8oJMJ2ZNh!WL2|0 zE579{I+a_zNWFW2TS2M(a`C~_4f`EvNX9c3WZE&&n!)o@@zTww~ML66x z^IK(3mv>V=6W4S2@R0CUT4lfUwfZ>eY5}Q@_iQge=|kwQ_>2>k1<`gJ&<|E9>Vl&p zY?hm+56)|wt8GzVkCeL+3#Px%itl`Xr4|H~%)FefUT!8;f-DgjOCHqCc|V)tQZ~CS zmeSulKdV{mPq48t=?lKQo8Jl_E%gADh0pCoWQEI#iK9&O&LoDi;6T)rT%4xs)P?YL z!69s3D?zS7f1woCPQgr5M|Biy}R8^9c$nIyHyr_U!V z>Z{F2;4C%HDUumud2El`$z|G!;?E_?XeuCE=1OnJC7o?t2`{H&AX0vtL=A1Hf7T+Z z(owQ1faqVXo%K7BBR}sVCjDu|$e=!yS}ggKt5P9C6e76^w&^|)Wi4@Advxja+$@}t zqw=T4)1@qr*pFI+CS`z>2rA|bj3>@Hq7yOIM=vg4hgjaN??3v|&~iQJN20;GLK(t| z3`S($#idNU9C^*xj8Rzxxd2R{+4wrvPh3k(lxef*+PZdNPf%sOHq02qjnk_rd=HT0 zpmiptf2^74Tq0@dDS=fj>0;LtvtA+}Ygj_D7{lSiAQ1;OsGnq=8RN06FPybDKWgIR zB;REj=j$BT<@;}{=lE($tlsOpEJU>&_z~P*&WkeUtCL1`&|PG=Wr7|acV(klk9i&U z8}Ee>wogHmIOGf8?K`eJmbauXYO~oF_o*03j}U&&Y-#E=1blrur+--r2*#@`$fYx8 zK$>fiR`DK9E&1Vgg`DKr$(S(%F5$VrCj!t^N_b!6Ltcq2uU5h2yrGKUh0kWh7~n`in3B_6fkaJjW8 z6p^6NJdBbEe$idlFf5lsf<`iaQzF)rRV($h0h+PF4f^Av@JY!2b;4ZkgMD*-CFSrq ziF3|C{0e?5bMukSJfI>)?Xa0R52j?6e=t8biqMH3Q96pr>M3TctG-6+SuuL&{a z=t)47D<(uEl2yswGn@e>R%kxr?I#Z_jh~lSmb;~i2OhoOavy4~@Wl(^h+9%Q`dZDf z-!w%8p8XpSonvETj}s|{^Wq<(8%p{zf)AI}1c=)P;NnDLLrkNeI75*#zu#0bo5Spy z{UZkX0tJd5?X(h2?^SG%>73!r9{Hm|9oLh<-!M;H-22>#k= znqsh!B$JT$d%gxz=S2)!|7Cm5_@#4^r~R%5iu@qnh>4*=taG9ma=b2fL&pv^ZAL{~5kA2k@ zBQ(u$vfdS5dM!8{j1(~1X5b(g|N3o+Bqr~lEbOpQWW;B=UZGt#pgFUM-OBG?*(=%D z47%peZF;uM)Jbe1KHHazt`*bh4!+za{40cR>^?ja%hfvvj@dyvsdhrma0NAT=F3`{ ztJRlZWDQ*!f3BzI5?9MqS#1rFxepyBHW%60AtHD5;gBCxCxdO7+-zz0>T4*b2ZX#apAm1zcc8$hc?Q7t4+IC!I zj$PSI!NGK2OwQ%E%^?31jw`#-0=}i}C8JohmI`XXQ!6o1Lw2%BRXs@u5%NW5ePx(2Oqq0V6nWpl?O!pB;d9^cP zk0Ye^<1#Q5NZqGQkc&}<9oaeX?uj)EdoO$+s<+kslzSwO)EyvH>)?`Y+fv&wQ891e zuzy3XjJ^Z!WOXy!1x!i*2zd@^H*zbM((tox*1^+cnkh%Bhwb+SmDWDENV&>cnb$Yh zU}JbbmyY`KI)qsoI8UTl=^BjpDT{VoR%S;;#F5AfM2}FcLrWCq#mmSGQL%xK0F`u9 zu(ANM{YHi~Vh1JlCg(E6bPz7Yg6H-LAD(5yAy&JWq!#dVicy|AS&u%%d(0Vy9&rfe zeaCzWgX__B%Jj@Ut}Zi*l368Q*Q%JG^2IsEhs|&op3jq7kGqhn0-O9MKw$ynMCfcV zwWP%9yoK-Ff5GW& zwm8qh<{Dfze5~ulQKCAgK!^Y7{(?~{QC4iqor4yp46_KqT$)}1m)f~{FoVRgVUCyL zZx$|xKXC#l2kHtddQ9V~PNDs-09 z^d=d(igwd;s&63+y=_-9|2kasF%aKShYK!wmaIr*@eW!SQQ?D; zl7L3@8Epz;V%5;f*rk?pL;o$PJTkR70E&Z=Vo6VLZ(cZ)Za4Gj%tR8ga?|1(D=zd# zBPC7n&D1zvB@cRVO;H!w*|ABY30hCNj1@gi$ugjCI65{h7Nmoq>$NZ4H?A9HHrUoB zw)O)1zHORk!d~_((>IS%_`cYE%oRNF)`*Z56gGZ~`;YGUgi(A#@$_E-8#)dl*{dG} zL}I-zE4gkTxk=g719pK?g+qxLG@%NwhofouPvLsjg8oSOP`66vul?+X+m?|#S%7+HZX2H&- zRZM<)Q4&&tq)#35C=?!+k6e;tG{p9yRG7L0Ue^GQZ9FKIjNO-pS^<@Dt~~A21ARrv zZIU}PKlPo`=m$VdO@>vH9r1lzQD!r5pWPDklbghwMx-a+jBD_@-%l|^rL?bu!nV0} zL4Z$9=^cL!c7jZdI!nktr6SHQ{{;OCTXu`GAS`lfT1^H-0>O22uNckj%y&GJXP6;r zeYLd44I^%&g5QPfpk$)iC5vZ_@fi_0K)#{~#nNX?d;Km8x^Kr4#_|v-B&2K2^*Xx)gr;#&-gey^=Kl z{!~h?<9H=P);md(i;7-6{N6pF%r5U+#Tyj*6^Db> z_t~19nA{5&eqt_E#;d!k0G!@S(qB=tN_=?S90!Q+(ng>DnYQ|YUPjd~ECI99<|oqG#i zPX$g2Ci-7nW3zHi2rMA58`mN+f(cg+`MFYsYL>c2#OY1K3!5aG6i>6r$cHxJE6pH_=ys^=xAHf8q*CHLP{G7#)9@$5PU~-5okO`!RN8m! zs%J($2~tE)l2{V!8z*7~J|r@5)f9T>%Wku`{3roG(z+)rsCq+8M2-Ok2B(`gF)FmX zgDW!Ax?M>~cA$x#NZ(h=z)1bWy*Jfj8|DKp{rROCEda3d&138WJ@#{-NpI9v{||j_ z_36|9iz#6Je=r41%$yAW7gNB=&d&C~+y4-R|6LL=F*35T{eLnAF|VKsx?78&P)D~& z1nXkKU0q$?4qNSAU0`kdw*$C913_IN>HD|0-M+J_*xK%rps6B~=WacB5w zg>nMK=m|2@SB*^5oLa(C7-ee>_0tGUb5N+uPYL{$0Q!wt;eKWMXarp2XN?HtS;+MD01#7Fvu0xZ#6 z|DraxHi2$*vJro|@-j-0=Rt!`ApA{E1<(Pwk&%(f!O;QEAppEGG#GwU1!k52-`kQt=o!nw^zFgD!2>YMVe;!r zFcF^N2mZT1EQEuj6X>VcpYlT=MBqP611rlzAO^5Z?M=e(NH`?mncq;sANR&*fOCex z(Rj@M=e0fmyk`MqGb?-ZqmQxgJ2Ymf=xFOI-_jrVi9gk-h;?s(?u!jhfM=R(82~dg zI5q(C^MN=2qwn;9Qor<3j@-yx%l>Wh zqABdfW@pFnAPUrg6S@VkGh0Z?2IBe8u>~X!%k!yke%ME#*VG67%KO#Cs*W!PMvPba1$BJJ;8vwBueuxy^A9x_swfA6w4c5Qt zcER!Uz6ewoG-7S=d8BXGp`SG{64u{f0dkfPdL!@)nQL1C+28n(*c5Bk6v{2%?**IK#1d+`6hK5&qn$-|is zfgKGGF3o?AQ4cUd^9Lwctnr`4s`&#P1kvCNJm{8kl)qqIu+}aA<2M{nrRFE^n!x<) zPcc~T?p_=g>J-2$Z({>s<`-db^xM8->F<6R%m{9oTKdc1;R~HT&fn~V{us*T*Bkn8 zJ>dNvTzfkIFy{~D9v!IjCm7c)p@aFH?C%I*^6LyGKP!G=WDxQ_J}xNA!LjWx95@1H z&0hc^&+adPKx+F>04?E-KdB*L(EArS==||>2!J99ef~nf;`i*8!O<1y;pFk{2d-1= zH~7yl7B~=306C<@(;Img;lF4Z7p`UKqZ7K13M({%9Mn0| zR!3-DJEp->%04l;j)?<$*OYXj?*rY5gZL;cP52Y(%!Kt`;wQx+M`-fmgBkd^lVPIE zc}JEh$A(3Q3>6?HF9LhNTbOc^WG1O{B5Vq#5t8NyUw;BZ6}hEf*3$nO!8I?t!hPYL zWc1*XVeDFd9ckym*v{4L%dwkhkU_Yf?e^4>ggH6qfM}mvrm-aTQ4P(`^a-?$vE?0>8{5Wns z*U8Y+Sk~&a8>S%HYyeS^vu6AhD@pQeh9%teN+ut!fV1S=q|#MLh+&65g6S)B$MaLx zLG%OWDC7pE9ElV)xSahflyGNY&%i2MfPvZ}{E8-g>^GrI^ry%=Q6s4}&bE{9C_!=Q z`trZ1qfMogJOjI>aJU_=i_Xc%FJ&|nGyflqL2Ty?L)wlf9xZzk5EI!AzoTZivb0=q z<~8dYM^#*>%o zIvX8@pk|zMdeo8ggX?-$nz;wta42p)l!7pjrm*8_7^hN7dK-a1 zGg_Sb*Ly!T)@ww3eHGy%2wM>M4JsmD+nDS=W%Dbn#AE5CBj>6`VzyLCATnuL9$(8c z`wcF^ycB3fro%rH!xlxf05p{DYB&y)G{K*>&fLzQQ8;vkS0d1qE98ualu7B|vUu5~ zN8(U}5IHt!gR8!|CAoDQw(BOzTclT>+7L%-u&mr-)?@8F6|0ZG(Up0EjN_P1?Y8EF zqL%?8CzHOdOCMY7ZCd$^pa_ggISp&mVJs^uNpu@w$q7dV!8L36di0ZDw`iHC4nMc- zNS4@ev9ju}pdqCty+>{Fw~Cp1XqmM}T^SB4(zJ6xW6SF5lwq*>n8`G*S=E}Oqon(E zyN+7**T3weA~@Up&Uf_2z*UP6pAlrL;|VXYhIHAE%o_Xl&Nh}TA$Yy&JSl04G9?Zv zAvz5ub;Dj4MS&%yl5G$^2HG&V(jxRQ@UB23uNTkF)qL7SfG8}v$(TlF9w%AZ3My9?>Cji z&DUL?^&(vOF$^|TIRtXR^5FHCn@d|)?#Abi4;H~gbm9E+&1iQYHp&Xhht^oL0`Mt< z+x8gUsIl^aFZ2iGbm=?4^CV$5rs~A9myso?aq-PmtJhBg8;ST2Ppew{{Y+g&?iV1i zFwjdyY@h4xGcD=}eIz!WbdC@L>3+2fr`b0vIggFhHbK{WaWs-F(JBo6=0?hV4tyIj z$0bx$D@IV7)sZqYkKDkUu_wW&Ku0Afbh7pN z)d!Cba(?)mi`2hecLkhxBI-iCR;Eb`3-K0#o)wt^letG{V^5E$+T6E{r_bb{_g_2R z=GRWR%_0!@lS_Wbc@kfAYS|GE)jyBcx!QW9gx)S$L7V8bLf-OJ8d5}QKx^E}V`eDr0A(Ed)`;#oUGsz)b?DZs)E_jAlRhGi{pDQtY5l?nDTQxx z-WC)m)~k^X;8WrTU_R1rmYt%H1I-j|4tLc9F{cGP?vf{|@n4xnL4XB>-zdo{{q(Y0$0j!|2C{Z` z6HjrBYXd4;EoqNGTs|H*@naWMF``SfG14I58n7)DmxJZbP9!}2xUHwxFe7@P9Wm>D zx_?VuSU;O^M!L*4T%>m3kWKl}S5|SUboMy2>>@yD5QzY+YDjhB1YcNx^i(w>9<~jXySrr#1i!fz+pXV8F72Z%c^MtY}($nfO(e514!>=;C)23Tbp}m;@pV#^dt~x23DPfQUcy2yR4Q(5ZT@JQ{>pO?+ z41|QN=v$$`jg&eRUZdc=H_tCb!l!EPY@mFc0V0ru3j4`ALR{*Hsk$9376u|TEkYLJ z&!nYfI@_KJ5(fP0MT(%CnDas_=?EV$#EZRibdi)5^s_HYABFtWsse@t%YA;YUn3E0 znI1-ET4S7$y5UIFBvu^Ury1KD5w43>rI=T+ntz%&8o~;}(t%&w!OL#*nQ+8Vk4w4$ zF~bF2OQ69gBEuEHiuGoH!8I`EPz0g=y*+>G?Nao^2Bb_(-no>^B&aRcJ_w2!{*t=C zz#KIo>|$m~kj_*t-9t0tE~)PIW*ma-_&UA>5f{VBr{wlVHn$sy`s6{0a7DFx1KiO^A0bA9?Q<~V?XH*w*D`N4u#9uV$>$jjUlh3cJQTQlJ{4AO+ zZPYF|-(20#MwJOUa0c!UPlrlU{(jD$RsuVr2Fbx~&804YjeftcD~>5f@e)1GWH_D7 zl~J8f8iiYg(7A%P5TQQIU2NAOw(!W<-+~j%a8HId+0p*#BVm^aL55KzrpGYlPP4K`+GV&*c#W0uxUGK;X`&>Can7e zVLhvsIp=lXNhS$7dY+H4EghIC)IO}ea*)&<4wE|xj2C<5;1J>x^0Iz)MVA*CI}33N ztIwl}sW3ilpp)BaD_YotOFfLP+8mDK@^*T{Y5x@c`IFj=SMTIVofXg7fxF#PYG=)# z><891tOQ~Plz1tPo6ys9m)blKJQl9!?(f%yMD!p5lV`r?y?`I1mfPe^KpB3?S=c)5 zIYQp+)cdk}gHdrozNv9<@r8Mp>5tz&V<7bq(mY0TuQ&LG-9%km66$lNsB^_y?E$$_x zX-Wos*YcS8d6RB$X*%BF?+o#WkuHQEA<|B_~?OdR`MJMg%fglRS!Cp2v4BC;d z-|c5VhYkU#-I3=6wYB}0n>Yr`>tRUlU;t1AYLy{r^nz~12sZHGS?_rpca6o&mdc%G zf7Y<1Wov6Z?r>`&QVvF?_wKN1T)P~Xg}oatWK%r|A3iR(_4BZh`TE-c@*mj3Nv)3{=Dj*zocwy ziACc0aDIJ7F1BJn7sEH9H&Z5}@$E5Te<5)0>9&mYBEyl&JWKwlqKWOaoEMO~(;5O@?HMW@v1lhQ)>+_gxWTB&mO4Cvb7IaV{0540#Gy18!vg zv|~92u%`u_7+x%#jhhiBAB%)dYI1epX=${%6ah}e=ZR8Lj9lT#g z51FfhK>U`MVwy;5HB*pp_!toePLpq47`t!0mUPJdCSc#($$+|E?Meqa2hF+i2Gx({ zLm7P5FI(3Ag-+pFT;?`1zI2+W&F1o0&ZEaqy^W@`lf z;JAC&@S=59q5jFRp`(h2BUu(8x!;Wz<5R-Je@3O#FEz(vz+RgF+|>Xcl*orSgXjq5 z=1x|Q)e@hdO(bjS*>kprOIPDTvnQrCk}#^y)+#DTmMX$Zf6KKOx@rZjvEdF-8e{!t zmgZVhUo(|Iz%GHWR*lJwEx|`r?rqVkteI@N8I@}{6aYs6q2>1a#>iMUTC(oC^!C^J zK7sL{CcfIS6oZs=bG70 zXg8ti8P`+}`o8G?rycaw>BO=)?4AOppt=^G5fRno-Y#hE!%l39juaO}zuv{-Hp~UI zM%;e2oL#n{5JQ|)=cJiirrg889>6?rJ!uT}qvR_>&soU&w!h*aKz)%6k#296a9&JK z_pknOYuu5PdX=Yl8O=|wPI9;Qo)>jCwo;btq9aN!@Fm#u&%|*ynT zb9PT!_?~5p{@25vT<(orI-PHYhlkbzYaZ%>D2n$|k7B4wX%zjxLY0vc1#8(c&an-h z6RxZUE7Rz{EClYNIn-i%;ge>ZtQbt=#kmWxsss>VVPq}@8>K^bo|DZ?5&|Xmjd;cv z`;@298_k}X(A0vvF633Bt@mmGR5IXx#|47WbTvOzIWmNC%1DPdq zJB01o+3e);5~5RIv3EWv`J80zDqRD{+Ua(7_VSCtcTVoXx5e1$&ea+z=P0xaz zqUQR1&E zxN4jv+Og#re(IcJGLrYbG*=Qn+~$$;u@^->8j)W`My_-))d=>Z5zU}d_MP8*gLcQF zP@gP~M^$o@X`Ka z1Y4E2Z}IE+xTeC=O)_9HGx>DX?vtV;HZVZj&CeWainN;|AC!2qjS1?g?1DJNH&f0g z*=xE7=2H+!dy>nji=*b?R|+NN)LgTjHv8jI?gax+`0T?R%xjGFOlsIH6Vyt_9p-l% zLmY!7F`+YtaV>Jh3%$?_Ruy|B#eUE!8ZIH;4NA9!Q2R)499=4>O zxx04Wd!D?!=mHYK@pgdiToGa&X1_tAQ(95nOgd^f)3bh!a}gPsaY(XDtG{t_y~ML% zDsrVuc{SHpg}4@-Re&1Np_1Hm{XM@Uv_nWpnEyx*7J(zR>C77U!m!b%#>D4Z{xZX( zRNF??^K?V=>4*rSmHec?Dldc2|2Ia!R}|IBS|uUKfL*fnY`$Wf=Rxj`A+cnFc4!1{ zib}WP;w=S3RV0g8rifyum!~gaXgnNFR|LP0PLwx{tD(mD1{O%#qna@mPCR+wHRDC9 zlUtc-$UeW6O>uqL@`EN^xAM8Nevdb#!+OE`LOA`BW2r3Szh;aSC5ea2i!2oMa|JII zZ+66ruRp8GBLW1^wRJGUE8PKK%@T+iK})$QdFQZ&7vqV}7*UX+kfKs{WO%T8o^+sp z3VXUJ%Z`!qUO3Uc?+4IZ>wnc#C+zfAY|q!RzzXGu%l4;wsT$opcRtYV}OsNW!dZj@EV;M?wbTBmch`w>S1yiVIW0Kmp znwz43vT*B>RTqhW97%RdGi&q&kg~2w{mY?;`&-T|~9GFu~ z&|I*@8jzo(tfo25RAog>vl_*Gz@WEa8Cng!zg?Y;V@fB_^5P)n-GQ?njMGvpGWg4) zQQ2=S{d@5iY)UiBCCD z_nq6JDu23cnl|cFz)<7R!L1mCvr2N-?*rd(tcv>l_%y7{qa?2z(M)-|VW373Uy=|Q zi52wi4PO;?mRiAaVW&VJ#6KE$&+I~jdeMmo%@PUh774cFEw@`Qzs^@R39M3RPFB7W zs1;tEf}F-d2Y+s2!&7(BR;9UC5ZW@+jr|N#JD7WRmeGv7Q{g zj{M~P!j<0rVd~ypXpq1~=&LGwT3Hi_uaOexrUt_h3yjNjyvxH>p%1qvnnxn%*ivh) zbu8s>ww}!2@t^xj#s~{}tGuzQ71dQs>Id6N^khPWeK%o|HHjcE57$r6?qSskFv8-0 zWY}VKj(VFT2uMA!@L+-pk-uMr)?S3Yza-QzeDcHDEW>pGX$RK(k)Rxd0q;p=fUA8c z;{`WV-VP`|zfc*JGyr?Vu6G*wz9m9d%TSvZm@nvwcfJ!1z9{l+hphxaLuoB%g}$|r zOcGI=1w>KQg+ia2-F@>XhPqS2dnc@RvyWHMeH+RRQ;QKshgZjroQELiEWBvcLhuKQ ze`QikkA6g{T5hoP#YQ=_s@R4do=Ild6SoIH%G~=fZI-)ch{QvV6Rb^1>!3E!+wNb~ zAd@5tz08HRM|hcGN)7EXNECiBGQaLa4Dg;`#F_6T`E~tR2qQ0xQ9LwB6;8tt8wT)j zRZ?V7zE@A!y#%{|)_YUa?j;~|era#C0e6;QSdQ9iJ7})!RxfJqWkp?5KrH>7OhYG~ zd0f#xh6-~cW&$`@?k>|N!rGmF&=kd&nIbdvc#)j*8PmDVY8&c;h>YX>={oRfK?m@E zjCqIzj+^1BA3~=arYgxm*+?0#>ECN^hj+^Zw8f6lbYCaKij;4DCe3cXeHf#|)6)FO z;CF=`SX-g(8_=_Bbl9)06VA(oS|JNk1g3idr-Ps>q#GJ&r%e9LO^qQC;mw30ucB3j z;!?kU2KUIVG+G}eNDFoabyrRHq+$%Hok=Mp2#Czz&K4eu2`X{?e&*Lbi}pn0swCIpGw>CK#H_jD8qaQ= zW^2*@8?u;gy@U#0iMAFUJ>-eLQN7o0@#DF%h3Okm9z?xl#WTAN?5) zm2F{6v}5`j{}hSd+fXc!OQ;m-8~3E&mv+O1ft*qCa-Pv@0;S$oHmhp2_cu+p>**nt zT>qMpuc}~2BH0Oos`a66&iP-X%Ro6R4*KU7ORt0?52j4^SEhE5I(z21Nia^;Q#HkddP4^)RX%`Kj z2_Ycxx5hiQiH@c{Z$vskc>h#->ZQ4@*4IbseOUm0QLs_nFqA`lbY%DrxEYHKQS+`5 zp&lW&_YpO%FlQxx)eBN3NkzRB^5CGb! zIWj>o)peyDUJIZxjMQDxaj!p-d3MRTJVbZA86HnE>&7zMWp4 zLom%G-g4X<9S;m7%lSB<;YIV3;nHc=-l{B*WGIvgc`OuS(VpggA%TVQqh#Ms|2I zQF2byM#=ZG`4g@AmaSW>Dh1^HU5mi7UU&j3R{mv0yDa6VtQKtud|-=R9MvQLMr@6!ebgYCx73w3G!V>?NxYn)7$Z zksEv22r`E?K3E(M7>xjc05%?&jivKwyQxz7t;Tkeb5Bba)BS{t(A<3~^h^+kcyA>u zwd{1_1_@xQNfWxIbV#f)IFNvOQ;lO{y{fsy1=zDp+3H_AAS)8D0L5QPjVjh$^xasv zvn0Osr`cS%Uci5z;Ktjkdx@N$)96<8bcK$Uf(#@v4$>o=Q?`p!zM|dYT(as1Pjw3+ zQ9?McE+!t$TTZG2p;F=+u15bGC%d)>s={hSk(_F&I|A}k)>XT|#yS%b7gA8PB4 zpqS#O>Bt>tEB3vTMzx#sy)NW-fnV|O0E(>9HV=ivw4Urq!~qaK39t_pT8Bw<{7t%K zJA?+L$V+~9;QM~jkk>kE&^{IW275vS#D!(c@4bOjpH3O#^;4pdB_s;aP|fo)8_?Gx z?P;0u>ND4Jz>g2@S$J>=vcSF#;fb-!#Pi72BeCCStqA{Mu)HbYP%5FZaT->eOHt(7 zu^KIK)hvUT%)z;yi{MXRlDuRSl(<81Ua|@O#S>5am6GlXLTgm}$9_TdJ~raRG@igrjIf{$?Z$B?v~w0E;L z`y5V^^;kH9G8F9l%DeW<1{}$aGEzH#>pg6t&j9s4fLlx|h)1b#!3sAR#655<8{QbJ z4?6Oo16;xl8(H`0NsX)(^&`Wwkr)`1_$S%VSd8Ig&U;4$n#DB4jCV&VGYfY_h) zf#9yWpEXXmuw|au11*flCS;&}OnZ2aap+YJ_xqWe$?b!zf2hvW)Iezic}S>1(o!Yp=jdbp4q&KrgTC?kFDaLB2bKPT4 zQk>wd3DSfR*0(x=$Pa{yMc288))0tXd^;~wl9P ze2RuQ2sGuOmHuj1R?nj9P^JjIKZAl>KMbRv?&U`=de5PD(q=z*QoLoCeS)mrO30jRC>W)Qek6Vb> z0e;pQbcpa<`Td0Jl60jF!X-SvB@Y!3j-tDo1SRdm3ur@=JY0?e*kF6|uYjf(Xq-`u#yRbzL!BRs7>IbBU6uVTK{nXkjF@yJd4ie%M7AB1faxtA23N(;R-T6lC?gR8)=~>`ENx zK5Dw&f6UnkLiUQG1>LOw1{mJDGfVsT=T&*%l2+}^X__GL0(nN#D_O`ZuS-G=;);-F(@tBLA4?PAjb5av(!ex9-{H{azLM9QwF~(ToaLCAj&az4 zGKn=7&@K(wvJW6mvlJN!DKc74NLIlpSi>@)haHf;7r3^|&k0B;3gOjRFHx)1)Ss!(!PmT`ZM8nk)Ipdf_qx zo)Q%mJPipzLV}SG`O&?M!4X*(TdY|6dy*S#*kH2cRs#k4m6d8O^`8)GBv=w@3pRV# zFa1C!8Fu2}UIGUalGe+2dv!yQ&p2#s&VR}+0ty%y{{)UPC*co-Y}j$5d0#!CKBA(% z(NW!sv74S-Tkni4g006DVr?*l!(KPX0Z*v9wB z3zM}E*5)(JC@o!$`7D=yV+Y?jGXtW6En_YZ!2Y1Q^NqOkzlZYm%5?9t*q-hWy;i9i zv&p_0zU&87NKyiM@n0`R1ThO6^!OWjsNYi(<=-sqM2)0Wz zCWHUNN@n!>Q8m>tFd2K18FskLGNt8;pNN6R!AsYTrE-(8iOEOxn`0DfjSTfP5llCP z;cgJNl@=qFit|p}nuH9UrE}ld>807c38D^_MrJ>3zk} zRe&tQamL`p2zjKZp8e(@`hd;|N1Usnzmg2YENM8>a8q9)obXVq5~hBZp+wXeXpD-q=>lkmMVw$z1&RVJ953d z^s7D7D#Egrj?rO7g9&MX%b=Jw|b}T(;asTA?vQOh2M=aY`3xeaOUlWxTZs0N5GQgX zP9f7a2x^dBhUV@aG#!)}sRCrjE{$Beb>MS!3|SR11_0I|v(4#DbyuEdL<>SOaIE-4 z+oQs=1n(wR(#Q&@Ha7EU6jylDIJkor`SOk<2}|P&WLwY1afo&u!BTyU5N2Sow|M=9 z$Ph|7a$v0$&(XHV4Py6cbf<&5dP~&+phP1{*I1}zBTozX3Yph#F%fC?4Tj<2jjpPC z6xz@0OSA1T+Dm*3W%C3g=F6oL{fhE*70MY6W&YWh`@}yX`u}=|>?trlJMxzXR>U zgfsj_!@S2NYs(y3v1VK79>{+>)s#^Ok+y;>5TpdxSJD)zw%Xs~XboA+v?CJQcvClxg3?epdI6a%gl3Wms?W@9i}F zzH*(f7u`bdQ*Iy>!4_4yTHUHv9E3|+PriOE4DWt$4}b+UjRIg?mDZJzz4&~qn{xRm zkn2-_+OjagOyj~7rYI^UnLW!g+nMrQY7DGdX+3w-{V0c@vX#--_jfhq2=!P06}QO_ z=p-b3ymWn2O90CPrV2k3dv~@!&dSV#@2)2-D6%rO-5j0UsG7a5zeE01{LI$hZ5%=$ zUSo~MyKgvY(qMf+q}MjT0$V!@*%_%&UIF57w3%xF)lu_eUia=>KslFlAIofBK9opD zCaA}rmhPEN6e6c}kH(&rFY?%Uh*_E`Brj=trbR; zp!)<)U>}Eb7k;t?$NfN8?M!&L-2F@Hbi(6As7<0farAY|R5}3-k^-XAAU)n5vzAq< zGT{r=&)?m~%&0Zm6<&ENfz|N2A<;^~*@VIOG2QZKqJwN#n`nmZTgV`LMqC5R@FaJAJFVOxj%yh zV^+>-lUbIe3}qxCAdQM^HC;%$vhYiNzDw#b~XwbNk*66UrcFnpvsy>9~2^86v8g9{F9N9qrBE$0SSZzEnCRnbZ+p5dHL zw^+udT`t1CW`AnhXX=CjY?av2-PXFfUs$32c0!v9RZRLJ?jUj8W!B~q?_e#p{0DEW z3Op@5hj0L{xf$ouFr4lwTUzN%FWR(4m6Z)iB$n{o0M}I;LFQY zz}g*6X~@aCi>jN`b^>3`SrcgRxvsbJgOM5@2l@tgXnY!f`jm_5N&{DKey2=49&$Z! zK1!PrO3x^PLb$@GW@#IBvrlTzAllYRH|Oz-m-f6axl#}+&w+pJ(03}u{)F-FLRdP` zKTRA^XMh(G^~%X;K7p}!pS|_N1QcBqhn*Qx@;FL_#Bl0=)PP2zuhJA*VT@YJ(?<%0 zn^zuzWtKXko1(Vc1e|6le8R4hLc_%q++|};H3W^(NKR>o^=Wk7_SKc;ktKymeWX)G z5*zQ3|M?~It?g3SDgzzV5#rq@NAbiD-9<{pHj$W63Dlwzm^@`rF`Y$lvuw#Hr>cZ7 zXVtM9)Q$NVhU#@mS&Zhc(P$;*aEfyQ9JE%OMkLtd`aJ-N|LhXl-Sy7I_ zLO4h&I8AkU`)pIl6)V*#BA1Sn!=?)&=5e8gNeg#CPN62Q=~Ty)^Y_g1UCCZ~Fg9gJ zA)fY~lxX7_gpbAnRuw+ga~AMG&AE`(6en* zTuca)6e(XLRc&uZej4Aa1U}fXs^1(}=S@t0o`c~2`w|4=$Z>ZOF3B8L`zSH;g)oaH zk?Nfi78FMi&-&u_)oDY|)=}~&l4NmbSjO)eX!*2sYPE&RDLEX@{!&}!|55f|6|?*E zF8DdaS^Ed)z$E4C+ezp_Q{$Je!&OnJX}RdV{Fi!hIt4-qn0|f)85gCS@@Cr{p%90` zAxoHjIhLN*)2Hu*G@tfipUYa}8Q04K+c7CrSx#}r%K~bXO}a9pKV91O0h$Ibsgv~? z&r!5>eoZWn&nuz3MzvA^nM^M1+Y_)nCwlsjl%U8!U(bWj2MXqgOSV4uo{oxri@@|4>zud8oGLhrVf!!mBkOnZwMcUjMpw!D9u0xC|N*^ zGDqQ03{^vKefT(CHCG`iCX=i_>y4Y06v+cWXT9WHpn2&AN<+DU^&|;y$8i+xZ)l%^ zpw64gckcMVrh2^D-IR>0ov+1jsV>LpBi#;stwm<|9V1Mr+musvJdEP1kHjgQh2f0a z26f|u^)#Q;*nC#W4NbM@bO5`V>C^54uEpB!seNCnUa>M77EtmfyW|ujRl#iEzAO2( z%ZkG9HKMqZ0lDHiNa%k+n&3C=^pAwGkQt#YoqeFX=uYIoFc0KWdf^QEtmEo4iL7*- zY+E+}AgVQBAfi@q?afIExpzjdYIW8(ig)dd{Hkweo*SJRceWc&HO=}b3Aa=MnequS zfaO8pOj%z`P_PkVg3f34<9QA#5H`fUw5^HL&WH8{E&ETl9n-2+a<-N@D#h2&6c10- z9MTcBHEivg%a^UCGfuY(JnuXFyg#tq5NG@*Hez0VA+k{%@XUSY@71|_d*5?~&uNj! z(>(L0mqyim zj*n}wO|PzN)W^GYOv>1FdP9vl1$d%xkw4!xHGSp)=v?tX1CP($?z*!=6On7JViB(f zve%T~eLlmeNZ;a_Om2YeF` zS#z|U&LuBcC>0y~+Ny;FzP6%1PiDKI>%#Nq6j7H)e3orMoJrPA4aSJPU-&yg~7-4phH{Z$W2M zAITqt?_(mJ?Q^C7QpgiF((-OdE;O_T5>nD{N5!lT#{h>;Npq3*_bOB$!<&zSwUgNO ze3iW&zdCIf$-7CjUSLFV!{(SQOgLm38Id`#&P{J@txrG8%+f>n&U*aG0em9>-xc#H z9Dyr2B@A5s5sl=NxYK1QA*!xF7Jy)Sf|uPod)<@pC4LHw5nx8Gs>m`6Z%`H(FuasbJq=gxT}IP(Xah+zjT-S)wM;bK=o^YEtJgyG#wS+7ae zVx3{0qfJSJpwl_NTz=DbQrX2e4H(o@@_gfV!4?c1&7+|~KmfQJc{249yu_~$HCfyU zs~?0Z??&lb0%BuRmf00Ra$r zoRn?msdC`wDxXN-jdiKWP&zq&uHLotaFfgWc*e6?;j<2AXb=@c5yU;PGVp?WaW(ASY*o zLJ1pUy~quch#brJUm9sR2E(Eq{IIZVo?bG@oxSLXW+2J|ms_j^u71?vD28kH{VBww zJ9JyNFV(&65UOaV>2fVB;r17LMf1OCFpzoMR;78?bT)@ziZ2KdNG#KmU-TvxBCvlX z@5mugJ$G$1eue)zL`v@iT?T`V{DW-Ux>DgUX3lQJZhJMKgXi^q-Rrp3Fv+;e#m-nw z9?#_cAe^>mX9#Bp_kKZt&{swu`j6~YNL+s^L&r% z4cXfTrA5M7lUu{85&t}fGsQ>g@dD{S;-o0eRXK)Up-Q7{>W2zjfy8CFuitO{WGv|?FPo*sH}0V#$EN(tEO0&KfLO(-cd_B= z$;F+Q=nK~?ma3l!e$^ZNaSlyEOsQA{;?n4@^Y7xB}W=XwO&yho4kQn4vA@e(=9)A}# za|^Bi*QE)i2E|3MaMH!jhuH2~C1`QklHsum~MJTw(A|TReGR zi6`u(Hn>bz6gNuK-m4WzMmD=^NSInsS|IO=aDR{n9R`El2a;PsXQoC<@t~sCI-oz3<{s7jjU^US>iP1fq zq4_0ef`_8g46lCK11o*{i{+@oa?mk$gq&b{$LuJ9yw^CbdD~`zjJfo+Xrj&#!=^if zl!>mD8e2E?8g?#XuaO8Kdh@De4DK_9>7tkd`TYCacfFUGAEs%BINmdm<<>A)nL93w zYO~sek({7o8%-BTRC$*FEWOuf_>4$M#UV3FIC^2l<8gK>j7p1k?ON4Udh-}0d71*arYckk zs}Nl^mG&QBGj_e?dIQM*p;&>X0iB5*3uRyDQ{8a~lD(%+gT|-5>JW$IQ@`B!qC`%g z0jSD;rIua_@jC2!(3$813HANe^-lOg8#K$5(C)x}0x19SB@>YP_lEL_vTz+Mq&79~uK=EPrXTtyf1Vz+eA8@UN+#CJd zU}fUJrlUh;7)l0YL@|kitN3xUkip8l`sI@^)y_U0ZTV%yo=V$9?;YVkfO5m!bDKRO zX4f}`8H=ZDNKS+K6Y)h<%yN}?Ni=jt_z?|KxpmmS z0aFqYGJNe>X#Eaaa}_?L+MH>)7M|)n*s7sh#BwkcK3waXhpk7WN(!hI^Lo4HXo-Y8Na4gpEnG$3nu@83?0m$G z9JrcF|A^Ai`+zp*b4nNP3}>v5s_%Z?E%W zTHE;~5xnZU$KQPCH7A&$vR%QH8GAi&~} z2!&u0k55U_H}Lr#a2o{-dY33P$M(K5AP2IfdavNXXgGAs4P%?ic00bgbOUw2597@tvV1wynY)5a95-6&MTc8C2)@sjU?D*y0Upx7uPWO| z3W6eG^vMn}g$B5iT3X%O=;*2W*SN1>ud!!ux{g<1UZlGmO*ckh zN3;MXDcdj={~$SmY&nGlBEu^;iykK%O}_5QHxE)%MsoVjG3$tdjGkQMO6SQZeO9n> z9@L=d6>Vsuf~f0t{mbm#i%Xt5eWU(kASPfb!m?O8Z4|nM_-mkoCDl?2IJPu38aqGh#K^hfy|KpFrdg^fZhPaac|0{35dBo0C#l3k?I*S?cBOvzW2&q zVmF+$caQYJVdU8{k&zbPnc#NtlRG)HN^Q|d841Mb<)r|NS=sJ4#`1eEF-_j@AYT!KI*VE zaISj*kh*g{!Weqp2~!ThJbVg+hh%1c@+aw(6}e}zM^YNP<+&ZJr70Ox9FDAm1rqV1 zvzK(+24bmOs=ywfO+t?NB;1de!U|_5H}`GgzgR~(3-nHYO3wVQ)e6~E@FOTIgKZY} zk``Wb^kZYyjFOwzQtQzJFie>OL+4Nfo1Z~=r*9TBRRtVQI{9EykW-j%DBC63+TE1Y zu_MtK`$(&D#Q%}Zng*8qgmRSO+pEPJJFF@X+Z$fQhd@l) z&yi%|QaRltFaaqT7s*vhQqch{YfR6);1z4FTW-ZEur_24xntH9I4V`c>ZI_BcZwN8 zQ`*^daN0%Ov&pp#(dHgOB6MWD#XM6cCJ;Y!=ds^JNb>E_m#S3mLE6ZC#=10HOBQ-2WhBI z9n^+lK*>I{&odbwkj%{8OFPI=eMpD8b8ezK9Axg|C*l0h=PN)@BKQ<314X5FLvQ>9 z%TTc7x72g%Z_CNJVN9dgQBj?}GG4buTLc(-xgvxTsCY4!-}>bMr}bK4)UnJnc2n=hX&H4!rH}cQ=U7b`ZNZZ93^)%~}cjfxSC` zOakDN2*rob^718}3b5vH)|y&j=#wsn2~DM}Hk6uf9AhsFTOMkJVWH2z_Q1FQH>*RV zLF3a1b$3N9sVABiV%8Bu^kq; zw5o0)IyN>-ZC2q#W409%N&_NATBTwfv!7oJ;s#q#X?O^&cspGRxb)PA8HIe$vK><5 zBoWMjgQeh~>nDV1boFrT3sx%w2%r=GvMc^`?v&y6Y1s0qG)RA)5S0JlU9velS++{V z2kvD=rBP%|WA-Iky6-nzC;PAXt~$b^B?|W&wCt=gwp$yJsuJ~P@3OcCJZcu>wtSC6 zBh*7$H=K*F2`yhnuiwxA4LhIf^y^-ZLxQK@tcCUEn2ozvpcjF*oIsCj7sspxoDzkD zThHjeu}NEIZNYXA1W)y%OP@X9CM9sc4@sTo?2d!+II_S{%BcD3kF(IH2>%XzA{%cZ zm0|GL*~Kbbtp*QB<}n}4Tq9y5-3|DUcf(VC7_<*7Y}bZ_NO-_DDk>iN9ytQT5QfkU zB`|@#uxBS;_osd(zfCs4oGNHdFVcGvp9RyjTJa^`2~Q7B%o=MnEl@??F`48wcOV0V z`7`qt_kKsTXF0P*x^wlvk9c~G_?u~&oVbwwX2xE=gr4M5jjf3X>_*DLcP6Hvnj0l@ zxY++3Vt%ym{@Wm+ujaLJqpZQsqag#V1e({!QqG3?n1vwUj(+>3$<8m?Siyo$bT6{6 zCxQC0k7i3J!MP$raH`J0l?5QKr$k{c?@oBXXoe&AnW^ak8DN^{)Be=S6z=s%VcxID zcIAly7`^g^{#8CTVysK*Xg{s6lYRFbBoGhk5K5`j^625?3V|a;m?&9KkPJ?sh-l&X zF*(N{sN#zr2`#b!G=*-t%pe|0Z^R;!+;8(w-`wO_rjLo>F7n zCdQ*8frdpyPJY1(=N|!F;@NP3=FtJq^W){^3~gDGyYR7YkE1&-pWdka;iusdl9G}T zKXc&Z9fArE^bwHq;Ro4;c4|2T1t9z>pkTrbzkiEB@&cK_j%eXQKHuNN{kOSA<#1y|1M6mY;NQ<2brQ(&jr;e|U}A&&eHZ-Q zJAh{r?BVIkTR-uqQ=;DW@{m!0PfUJe*6feqO%LW^N@75Kxc~-sryHP=RG;YHl+wA$|+K<>XaRPoNkv{rmr_pXMOHXMWq(AVB_@a?bluTN3C|_;2Zu)XLu25byXV_rIE0 zzy1HN_5C{+nNa%Q>b`A6N`wd0;2Zw#NZxZE{g!^~DF5U>{@#Q$bs>iD*!T4O|A^om zgNVL=32L9OLpnBLeU?{33I4DxA%Cn2R1_e_{l=OZ@~dDK1ULzQIYisbNVn0U7y^y@ zXZ<41@3h(}WBrK=M9Jme>)_$|)uol6`wZ2%z+HPj%iVQ%R_+j}-Jj|B0iVQi9rx&>{c`6-4;$lsBUQls`_r zq>%svRQ?!EOaS@E{{4rip<#ryV?Eo&rJtj2zvw+l-tsToJ@JWxcoi(DU43Z@t3CbM z{Qau(7xc>0KU||gd2J0<6Rs<9=TF2eLhIDm2*XSHCK;NXnoPz)wKErfP%~{vMS0hSI?mSc;%f z6)8OEADP&$^wL2rO`C#MR!e4lH$XFlX&cHNoxVVG{;e-Yq@CNJ*s4vZCcFw&SUq_+Q3nOQk?SnOw#q$A>@iJ=O%D7wY zhvXivDLp&VMrXlbU#Z|{&eYm5WrnxR!5f!Xm<-w3v zaN~d4|EU;#SS9%c!&)CJNd^6z6SElTeGzf)*oC2sOn+Y-EJvwEH7qt;EOzFTE><~= zh5pRjTeh4;8#(!}F1AM{5uK1nTXq3_w!c`Bh-x}zt|c9+yDwK`s-e4DlC_?o(vy5O z+}0{<=HdlVDkj2REe>%5z0~Rw#n>MKC0NS)*V!rJnLI*nIpq$xL?k1omzU9*yNqGE z?tv-H{N`X!McdPy0)&3YY74UGwcEkcI*)EsA8Fs{q>s1$DAMjJIR|PKKyCZ}rIcjL zs}&g-{z-V5eU;N>L}PKLecQDhaZQ9%{q*IS5+?%?$++qj5JLAKHUPr*Q;-0I7R*|4 zXGf3Nt^&yh?X78{lk6=t#PYQ*xTD$5-BCmBGUzDFw$W3W?aWoy%E>i8eZ_9)Hfi6a z82xGi`6WRvg+QJoCi>{|&iQ*p_hdw)6D%0{68Iy6mifHT5yOeY zP3Nn}n|9!Ia<#iOvUoa>Ka#gkU1{<2#Ri2|RIy>;2q!73Hw7HQtcQ-5LU}M(T_R7W zQif2ABtgpBIQc15mw^mE;Zi@{Gl5H#R zQWUh%94NNbz?1Qh#{$DizN7o*+0*HkRBc3!jjwIIdBjNIhs5UuYV) zN7AAwMdn`RAazDw+ujkn=xRDROPLi~!25yLO8w)FMkvq4&`<3bS0bq%G14P(LnNk8v&wCME|dP zGW6fvP1c`7BIFG`?dpRQH+Bs51icQo;{i5o0Vn~u&38+sFx%PiKXU81 zwgy(?ol&A5(mZiuBT1R%s1fe7^cO8;xrIw`!juJU-a(we#1w644@o1JIwcg2seCtQ zQ0h7sOW`!5TCQivD`uWMLI-2qNuTsCJJ^Ul8fV}1?0Z_)UZsgO{VIC10UwfGVTURo*QCQwA58_;ge*^?eXC-Fq?8WC8+!)P1 zxAzKXqam8pxiW)6kSKAm`@ zj=V;3;tPbT@(^lgK=)h= zf}i&8IuW&0(m8oqokSBXRhj90y}n-NI1AV`PrG&cPE290h2B@A7sURB?)a+Na4uc# zN2D?HU_iWuz>Eiix6nV`xn$aj@K&3TJwo|_b+jFc!_KSw1+H7OX_W*NaaxEuFMWtMY;;YG55BNX6OqlIG7CM) zJYb@8BAYo8Bi`cpyiTnfNidPIKZPt;+l}9V$W;4QxF)_cOOvm&rA%JDlh%&!wT_N2 z;C?{UG-jROek{;68E|Kj?tfBR-`2<*v1@9(bjx`%;ziJ=Q4*Z;oXoU>&vaGTbJ~-3 z(3Z)lBgZEg4^~EtPM}mw!$6Rf>kVJ1Gt#3_*8qBP{2blU;t zCNa5A%#5D^eFt z>Yu0wj>@0H{%#{2!C8?36XLjZYOio=Iqn$m<|XO1*hi~& zSc#q|xHy+Pzw}`P&Mw=IspjNEcl1cmlv466b?=fTzv-sNHXWf1cVZR2oBG$JeOv|S zQx{K?#R)Fblwo8(i=WdOcE|2t5+xa%d&vH2b^gzO5Xd75>)y9fowO!)XznB&WR+xM-k&uv^=X$e zpNhKf4scq-h%`0!;C>t_O7$Rp2FB>DbTxh1D$5-ZBhDjv@ z=2WXsvxGjx&k#8GzSHF|ELXn)?ppJqi)Oj)9Ic~8@?xOA*NE8|we+c~8)7k!~Dd^cEOzrW^dbSsN45fg%`0 z0|@4aLXgw{l>(eEX&Ol?b4fTqlaE4vLb5)`1&$IXSqpH?tn%T-DrnpM}fz|ABb{PWYs33eLo0z?h>Lr+?a>&MMwdjW)Ae>_US#HYpMmMyGSnaH{x$~ z#(z(Y@)R4AQS*z@%y7&HDAp-p9p=_x?B*Lr8ZjMD4iQk_*y&dkzRblA4SlPgJmi>F zskT9F(X_sfOo|1FIalAQn9E0t+#L)+I!B!bye0)4rg(7OqjznjT+wre_1|T_W#Vf| zRx?v`9biQT`@>S0ZKFBzBmEOz-IF0^y4|b&L5NSPNrLM3dQ7rS{5tVX?&}lHl%8(L z|7|6RGG*O(Ffy^U;v#R)xR&AN>t&T(8M@=)3i9j|W%H}r$T{c8eGwUE`QQK7nx=y= zw2$MQxMgpXJ^OX(LwSP}hb_vCDGRJ>Wsg?IJ%pG8r-Jlq0d zoW{m!?rLJk!*%RD{l$%MA&+F3)3nBZIJUkJFjS*w;XZb8NXbsWi{LQ*Z3pbC^n@u?b8A!S z{M8)`weG79L&UXT=#2=Y>Z@@$=PlQ9});LdEapl*{WPIDkc1 zssDp8QjR}%IjLaF$Q1E-PuqR$-Y6wCVG2~4^-Cneo==aoa&Q@0YvYtS3=>IL)&~xz zH$I%_U|B5d?OKCJi?L4dFVmTAyBd*hC}Cd}x$8R6?ROQ%kex_vMZ^kasdo&#YrTEEyk8tRdS6T&k_$Sk~QHY>SH-siwXB{rKfY#c26PrDhFii`RmbFB&66$%pC0e1L_Pqf7vdq}UBKi04mG zKY>5~2WIcB29$Q`?2&UXVy)X<%wZmxnp55UcGOUb3(y7+JbObjJyJ;Yu`Fr@q$7PNm@#BVaCnd&=V zUmdpH5^V;ux)&_NS4{j3q`2uq#di(95mh7sq_5yNFYHK5LDA^vz^>o>lX+w9kB(`! zM4LNw%_RZ?mN12?+9PZX>Jz7fScH5W6 zsTe+S|L%5Dr_>fmMgr11qQ~y3($Md%LtOzN!Ed?O?#Ry&<9xW$Q{jy- zbc@Brr0VB;GYKdsp7`#s0G|?7hM_s+v1d-xlt#69R`u6C{Gi4RRDS`A7hvxwAsxza1wgM6} zWucDzX3m?ANR|g3chVYb#(_p^eh+Bg+^(52UWC zy!=H15uRc*#YROQyb_s)?9d?to2?XQbw=GN=dhP(8J*gH4ca-HnT0aZqRO_21vIGr1%@&(k z?@quW(PX&g_whfk@r}7zBeueTZ`Tfi=*NYD2NSQaXGQ=st;AM7zH|@E2lush2h4S( zeDJ(l+_jB!>tg`T5*UGdPpF2aWNP;V3W+mK2~ktR;L6gt*T`BsEprDQBV|-cVUai0 znE!7aCCTNr++ssA2`$6IZd&9ZoZ1@h@D2W0=tf^=NA8u8IX8eqB3;%OPr(-QY0Bbv zPjTj3@UUSarfF!5SoHQrj0UlqpQHNhpLciD*VQ*wb!P5m77Z`OnW|?vpVjgorCvn#plkL+DS!ty?2(*c(?>nf;Cp}nxKvjiPp*8MW(&*zZ3X3rsIVFcX zZakMyFCg7k+zI_kG6k19*%2=_KyL;KDWk;BE-UE%M$JDFUz#-0RW4q0V#sRgb`@BmhmlXLx$`Ed%uR^K)MfOQ%VVR5{)V--s)n}2CnE#J zmR^<+vtp2BGKao+nm={#3S2heCuzHo+?-RxYESWB7380_n+jfhc)gk>um{<1|AtE|GraB}E`>aam6xzxdvi zQ|gIXCm$-mVr_VkK-LQ1W}+N`OLZ+Caw|->le>4(S@Mm=BylNm1u?OE*w9{87O+$8 zl?fOaOhw)#D~5G{t&~OfPN`D~wzcW$+!$FpxexR@&~WSg;!B}XfXt!K=^C}LD@`PS z%+nI3qg3=`r*t5bk3+wxKXFNCus?j!LeS2Qf|Et+z(9&)91GFT3HF$jU=*o-fCR2L zTk-t5yU0w~!|cv_#2KD2PvmB8>JWv@5WWd3Mrwz}rdQfd<2kGDG0vK--@Oy7gm472 z`!XzCEstNom%*!+9i7IRg9$c~nt8N9M?ZooL(fG?OH`?NSzZMARF1Myd&R2k9;TR` zEM(^P46i>e{w{5Sa=Gxr53Go0}~y~xm-fgiTxovjB~;+?)CT{9o^vTi*=y? zOJuW~WYX~UT>eKcnItl#{dwUlTTSb+6Z)lB)Jie;r0dZ>(FD1lIUe-Hvhi5^ucp&J-^t+kBk|J<7g^d^;F~i$ zZ7yBgrM{$+qAh<{GjZ+WpPfgYNRmb*aFYcYJmans6>xuiV^?m}5Nvl}n|ryKpOe$Y zX)k03maTVwJG!Q~m46n1rJiIBU%!UaJ{16PD;UFz>H*>qC*0nshkW9r5;*^+pXAO~ z`;d`PR1oyUCZRLO$}hdF{x-8WQO8cm2HE<=6iR+=+hq3_6YO|mMmHSHC*uOZD-@h9 zd!MP#>Q*v4M~t_+XcM`;g#{-JGsmBoT+R8$xULF-UO ze>N+v&D?v@8P|-mp_iQ=K$f;jXfYO;E^djDLDudc!Tp85FBZX?7dzKEXwG7ewRqVL zu<_7y-PMzfyr^ycup;lN!3KNK|IpNROl7D*9O%={C^CO@E{oKh`agti|CIfZPY*1& zHf`0hk4%*8J7Ac+65#mYHB^hQ{N3j2y@4MDdzohUwBPn0oeGLctl@@?TC?Qbt(s;U zMq~1Qc;xv9$h1xI2&eX?HF*_2DXM`QC=*IkINLBrzEgncoslj-yZfFrLx`cAK-IaWdWRG%=lsk!`TH&)awXlHc?LEO6(7^k1ny=YOU8Y>fXqamhr;!OFt&U#UJPD<|XsIn{3k zQ$bzFW|JBD2PPcG1q{M&=^_(T;(;>vA~G{HH91Q{O0i3XCIvwz%+pd*5)x6;dY^K> zY&-q`P~XRDIb&@`+l$}svN<$bQaV)}KB6grk_5??$Gc14A+I0BLzs~elcpC2`~h@z z^>NoWrVcO!)MCbvM2#Dc_!H_60uAoanMf(Ld3~8fh$O)3CQg_O6eq8dB`<;t3w|Hi zXZXV;QZVQrfr!9?`Wl2$79!HC18fZ~VP=QAxjcPko9RdEkGq^Dz{kjlbj^P)z)6k? zZ3`y|lq;}#sW0cottE`>-yvbeF*)@C5VDt8Z*S*}3>3)8$>~BQSO4>STrDFJ=M>7V z5%j!Q$AAI>6ZJKdK>=m|*GD84{a?5;GYGdY>6*wUhlij%{a$W=l1=Oo`|byOaRCF0 z-K}E*T~)YUWi!ludZTCnY@5H|3Ha#9#LJDnpVtrkFY!-@5DjgT>?|TkJC1&Ib5OS+ z;9M%J+YXO*2T&r&Q#;|XLhAczf_-3rZlS7c*zYV{5S5e#aG`6+Z`qk8Y%n)hrz4kO z?(Y)Fcf4b|2`R`jkohsF5PK)EPrh7YT(HI-=}z|3+Ho$zxE#n_fIl2AaPyli$oVzw zym+tfra?u7U*={w&`S(@`o8u!t6K=YBWU};pdI;}2EKehDxd5iw|Bt#_Ezk9Xp`tMK%eCA*_fse7(LW{ z(AQurz&lU)1c;v>4>!qcx?Y0ukm5H#X+P!k63Tyc|LA64&=3DCk4^mBT;t;rDiFZ; zC1Qw+m6w5}aBRK(xMBE_>jjMd#9IpP`Vqi?=7v>3;`~;)q=$DK`@lem1#AQy+{Eww z`hJ1W814KM0?hfn@Lr-%RQI%nvGel)^y%>SbMdjG_-$AH1AtI+b#wkKJbo?w`6(lk zvlqVsz+G#tZC%;YxUClF171weocN@(zaCf~?! zLPjJ)$a{j{(7!alaK8BPAm0&2A%69J1HbtbX8H*L6OKL;C_q96{D4LP3(EcYd%MLW z{rq){kN*h?=og54(9Ikxtew>C{8y;L7|)&V zk-h-j=5GAEegT@Grls-A$VAUKLRvGGN9Md9J#f;pbw11zdxv-FqCWP3-~F=3RpajU zL0rkw-=E>`2D0G?rI)w|^tst3T${JY>g%-XJuB!?Tt+)uK+J_nyd+@Uj?G(-ug*N4 z4LCgj9q(K)PJOm~KNX`12L}w&`Ee5NmrJF)iYvNo0@%#&l5R!PDmi;yu4$A?0we54 z*96)XDyN7HtdZzY{2Qb*|CO(?+)|XHHImjSODG*6z?O!;5W#`TcPfVR493LMtL_Ft z9UntU$;hW97sv253E)X9`aDwJK`~29!#N(V`^~xVG4ulwqYt|zwlSd?l!O{|afdbl zRqCcTI(SIasKNHY1|cxlg4slR`KS>ZV{K<;!X!6y*)Jr;nKJ-C?{r_!#KL^V zYBTn@T(4fBt=&j~i<+k2@+E4jx??8C`OHx@t>>Ji+AkY#X)4&*xyivu+64v}hnW~Z zg~P^CDP-3|srLS9&MSZ_qVKubJz=-e(o^qG9*;Gb_b(rijSKLF(Oav#zYC*ma&T)# zzcUX;S`g*HWL!*|R<7y&WR^LHS1{j{|0GE|l9TP!{k%Fvm`)1W*nSxOFm)&QFsc)SMJbpmZHP|O97m5i*oaibzKh*AK z1W`|;Ym&HId+>mJ5UQ$cDEPB8&Y*Bhuw*8QxY3EUno<~`*Q7isBn0Jt~vh)uVf! zT?4qPB@&n}vfumHPf~dmw2!kDswvs4=v{DS;txL1H<_6Ivl z5R_v>T5DNyu^L22Xx!@U5NUiO&Gm4OO%z$d45y5UEQm*}9%ZsOe$@AkZ1_~ji~Zw# zQCH@`NQTBluBvwSQxy!ZuaUcB2X(qM^4M1E_0g{^l=S>W+H6*QVgz#y?ers;%A`Du z7E*-m@0(~V?y5)%kb;`X);Bz8XOeqgT>pr!#m7m!Y(=d88wSE(v5j+;gn0XFHG8PX zY^WK67s28WaJrK=1A}ohlN_Id#MJvKVC^?K^1@ji*UhFoie{-%sK<^JUMd|Mc}xdn zme0Loz@RElaYhS~0cu_v-DywQ6iLnzkJoqc)0%h>r`ipcpSfp!w&^ol%c)G3c6>TsM{UTd@;Pi`cW~>F9>N(|s()vN;U%V5#f< z{x`9FSQj{64h7@wTjiI`n!P8w-U5X3Anyl5KKYs+9QyAH$Y$d-*!gqGt%5lL`)DIh z6)uVs98ptX;c+v*NG`LaNU^2x5F_f!(*U8AQXNHb5pSv3;v$6P;iLsEP3JtH=rHQc zglO9-2n|sw-WeMf4zPF1F6;9BR{)efNLFQX)adbQ1`FImW5V{>7srfE0_*JZ_Bjcu zwH$NW66~QIO*CDI zpz&~W-y>91-YG1PZ$|+wR_?iQZv|)84FzB`HXY&ivpN8$Yk3$2^hNPN_?2)bEQqiE zta?=V2@@RyaQb~=G7Y|KkJ-6POmLpFMV}>XOno5X_*OVhzPa^D4CFN&ZnN8jVkCvZ zM48yh3anS6MYnRUXK22jAzLYWjJ;7Uj>J^H9>KI!QtD`gt&zTA#vFMyjSS})gy=F{ z%iIFO6En3MS(kyAysy#^RA(6kzPdz4^w0r{v|zl}?(x&8*Fdz2lAKa%4*4t20mVp( zXxP(%{1dk7R`x;iCzLA`2-@3T-l^r<8(vjzlQcqzl*j;mPWbn)LWDnmJ9PlZ`G9!z z)+i_`MmB9_`NaLLYn;^C3rZW!OcMqf-992-hjT(ftJYFjy|f!bfjDn0D=L(NPWP$l z%vVLuWdMxq#AFwvln7S25Aqq&ttw9%L1BQk7gF-Q2787?PynSOd!&I*S*Ic^wNF?L zR=4JgFc=MyD5Dh$raDlAqx~llcy{47)y8tpYCB+STz&!*ecfVduN6#UB(Bkf^g47abY~?a z`<}@ywJbGqBXj88KZ}q9bZpVkOmiqdAyvl*p=umBSbR%QlxDt(i6$Y_x9$7SA{=YV zg5fRp$OFjzZSNGwYqo;-OIjDxqTIn>m&Dr!eJ&Eh7s>n&SJrOHQ`F)t2 zl?IXs@(b(PyHp%9#n+X#ZsDLTqi4!PT;D)9>IBFKuF{mCAu9eVS=jO^UYW+4pee>b zk!PwbmC8pLK6$;FK~ZwqnBOdPw7CY$GzI7tFs@M9UVmtcmG|JfF_$X=@zx|C-O$TTrT0vea>tZI#oBxG zbC?75Uy5Ue?hg)`$Y;EBGqDIAL2+nE#QO@zM(grMLSrfukc`-4^n3CLZn&+*v2r?e zCQFejg-c)PP1k3Eu2AHkyK5%Me+Ce*UPDO$D+#0bLd&fw*1ZpLow-lL7Bmc9!I|@w z^*wj^PL#=y1i{D$h3|qD$UR}Sm>slHOdC-8{v@tqABDE9|=>Nn2YKxM^98WmT>0H1ZZtrL=f!Ro>3fE-p^XdOuXY5PjTk?M-|eWOW{w%%B(RWFfed^&Weg?O9Gf{&<{-?!m-okLWY z-Eyz(T*PgOlSz3H>+Mi}_u8t#5xwAk4U@>U-=Rey)n5Utz{Fp!Ed3qBpW z;mK_={aM$YDP#pK07%o75?DB(WJv0MC38*%c;GpE;SAZ5-xsWZ@+|P_7Hd_{Bw$(d zSejJia8J6EJd}Ik6QwUr16siCP$?)!3(`MuKcBf3OvSfIsNz%f?xn7i#Rye0OIw%@ z_dIFJc=cS!HjiciVP&T`K58L7xZ8`YkdkP8$k*bC;L_o+( zYDo$*N}{t_QpnTodox$8H40_MgjeL~+rl*m)qN&#kziY1N?nuL`%BoGeH^#qlCfEgHRy@;8)* zw!@l>eN1QRMH{d7@3tO7=Bx8QBWlyZ(grJcKh636P7P5nvYfvVUW4htVR?UfXnUVa9grTq zg*ms5VhDWcYFpdeB}wTf-MdKgC~;N`vA2x8i%jonwP03H@nR9AF1zsEhs||gktAqD z1^QN8F%-mi@=e(+Ul4(Uo!F@Ymg|g9%&G4Wdn`zPMchnwQ(Vj%O`k_g$X-v7JBdF| zWKY*9PREkc;%AQYQuUlCpm@h+D5St7Sosv}*zws4o@1j$0TCcy}GXooG58wgM{+fzNtSoQNT!nCL^ZUHZByT|Mvp$~Lp)jRTOW;=cz>OZH5}&0Wty{) zE+kp|ned%f9V2t{W3%&Q6=GCM~w$e&GqC-}QCv9<5;8qRrIcLFmYw?HOhw{Yvj zH@5f>n%4Qbyn*?gu=lp#DkwkhO3fxi8Y4Y|6ZKbS)rvXL2(Q5%d`Vu>xfV2?yc3fm zh!I?n-eP*)s_c*b6d1l0mL!B^dS{L#DQr?n8mhV9OaDg;x*>b*JQ@iQ$qidw`%+<( zLBjTT1L@!OE)k77?lM-Ht=uqOT(Mrr%9;wpEZ9{Yy1GIbMZpp5~Ine zyI%vp^jf5ka{P#4p)z8nBN&%AK_k@i@K1b80r&b|7XGXk0CzarN{+>u=X-$3kd?1SLx{nh&_d2v~)R$uNtfvmCh{VIe0XjdO5I?)(fzf+mO{Rfv< z3unuK>q7G_^RC{0rmDQ__T_HYaWovMXGe&lkqf^&UA`4_m05XMjt&YhSY|OPa5(?J z6{z2^6x?ZRDxq~fA&}UukjAIA+}`ue+Gh9e?l!=wBVutwcwd$l zaF12L6_{5xl8XCbRz%v)7PR|f`i3cOsm8nD|44+Mv&0%c$Ekpiz)x!h;U=&%Bq(M! z$D6Hz0g|-r5BFhBMjms_{J>&@`A_Eb8%0Ar84?H7oV{R~c3_7xLGAxAaVhf!@X4q* z*}toil%wmGs>!Z-R_LQ`Jlgj_DP6M6_4o+CEHSM}P@j&(i3kP?q)s;8djH8q2~2VW zEh;ea7MFLo?s$lH_51em${ULf^qmCyL<22-$PHE(oOOH|$BM0r}brrs^qHCse@Jp?={B=VP# zR|Jsf9o6u4w6QHA_tJZ3KUvAVm_XZM@)+WEC+moQgKgG1*9`>3se0-z@^KpL)6T=o zLed-p|1>ASjLfWZwRS?gZz;NL`!S%G2y=!)8GDU4{XU-3YD&acR(d{ zwmWmasnayd`g?aM2=!S%x2^Hjv>Q=A*Su!%l;?7{9Mq5ebHye!bbO#ZZVUFCrx2P> zpt{%El;+S-Be2kkSt?gSm*mh!!B|T)(6tU{ya}XL0fs>E1{w(kWN#ySM~Dre3|Y)_|;BH%e;m83u%9M*=%pz z;65^!Jh1MJfU^Qb-kVX>Xwy)wp4%oNEZ9t3rNC$Dyjraz2Mp)zKQoW(B=r^wFLpcf zSPI>z>a{gSFUBIySRM1Xdhdtp%^jig^70e~fG*=fV5-+A#2}BFvbUcnW#QBdM^4lB z=n0e!rsbxO7djjk^P`m}*OF~n&cuhu{pYyyZ%wQ_vDHr}EPYT&z~`TAo3F*EuzTOJ z^@^?>G-v!ZZ1!f@k1J zEJFt8*4U9>?C)@}m*^vK#{qP$9lLrPCNGRnq0h!tDy1tcJ&2cXaam_!8rM~SJAPvb z)EIjYxON}al178Q~@R32Qdv=K_KFW|=_OeRmiY|qQAGRH9kw$8a) zT#lH9M{rQ(y=^vg8?0s5YH&O1hIr7v-2GrPC#C!^R_h+0RTr3>-=nvP0cK%Os<0|1 zAfB^U7;b1BXk4cxYNF6lG!}L0zK?fW{nMT0mEWrP^1s>~y-X21wMQbORZuNwD`w}@ zxxvkMUM65CwFLMkx9KZhe(EwxK%qAmdpI+25Vd3wTI1N%w6n)haik=#4Z_0_WhS$| z`os_I9rIehUUdydW-Y7jc9m&C3CNkchG042Xi45M8=mG~S-a}e2Mn@UwS|Q$H@#6H z+D%;eH1;RxeuOTcZy{O;5-_z6Eu`$iU1r-)om^&aX%S!CLAfC+nu~?N2!hqia?o3@ z6G}?h)s5Vl>#o6#&wNf?^!(x#)DSK>LM>&c@VD|@`q9Fxf44HtO5)FaQ7BWnGi-}b z+N`8go!@Vfj{BTJCGKC6xQML|))*?p_&JvpF9Z~1S`e6jaT_~DA5a|na>x;VDMBe)<_I}-&fH7o@yWLDBvk!jz3K0pjzOx^>Hx+tdU65C)2Ej3;S$BC& zTKYZsZ1Q&_S~)$=b}yj9@#ELuf$F<)_M7owi`B8Soz~)ug1IuMI1mwVS^dmCQoX?!I3&41dit-i@@7 zSd8*1$f#?+BKe%O330NCLQiDSGXdk~yf&vF4`7nPk28$)E{N4{oax@1$ck7}Pf*Bk z1_A!esdIDsR%iPfhsYg%!$g3Z1e^sqEq2|J0%$u+cnrRQTK6|^8HOCpKa#eoL_aHh zBAi*}e)osWbC-y1oUXmtv2q@WWr@;o?XgE_u~ST1C*46B%Y8sR?7!5n%I- zA2Cy+;;8y{QD1p8Vze?FVm{K;a{%G=nmPFDLX&-0Z#FD^<_T1QT?EKU<12V6bO+v~ zfX%s`656YfWe&sQSmBVb2mYgg-1Lt0d!;Yp_1%LQeka0+E?s9LE=95w_HBQkbq&LQ zx8Um%S}vRO4CbGk0*xK)H|UJp4!uI@QM9ff2fgd$uUD)lfKR9R*ZoHw4}!=^=)O4H zE-Fd(K4y#u?2oxv-AbgE697Zfc5hFyX+sKxv23dsl7Q)&5kc0BP0dRhq#+~wicHtA zWRoC0!fw*~vR#Dx>c(fLu^LfOeF??D_wD z|Lc8C*V)eb<3IaMQ_{vd$MXqgT~F-%W2tT>V|!UG%LzsDI}u?uS#`pCz3T7+jl6ht zcL0fPQKR}O3iF(~czYfY>ubgKz~He08PZ%k!WSAJV{?11uP|?~)hbh}wNIFYZ{G!n z8lk2ErPmk}B!RMz$ls@PZ3v^mHmR}tbZR!SyH)N~3~9mG`r`zL78*SEXAzG}i+<)b z`HnDYd9Z@3bP;ATbQ-QPF87xTN$U>i#?S(&-elc`PcfPq$I$Cg;7cCJc`GebcyZKL zmLnYSiYY5IGMk<8KnSPn?T>7FV&@(L2U~@%auy!log3aexz&2#TFt<7lG}kLhNnsx zHnK6Rf=zf83^qxhiVazwrZ{Ei= z5jo;-pHKcCiMc;3EqY6fZJeuwKEfh=o%!0FU#K*R=}kspBEI%DD3HrpU>TxzQI};j zKct?YcA(Av4CM>i+DmbnYz9g6W(n9im8)0b@)TcHmB z++XHhWKp}0LUv!Ke0w#^qaR_87U%U3=k3Z4rBg_2f`?w}vEjpzrk@Z_Dp2dxz;(5!k(pBo5ztE1v8qIbjFUEa`OAq5K$$y}AUB)0B@5E?>V=`RD7RRfcbF{f(Tc9bT{S+g3XKltOf^xi--DVRk|kZQdxT=JmdgHlUBCWBYOMO znq|qOR(ulD(Y%nJUuEL1cTSen88eCkb{~e&Gz!~UV`PMzaYbRO$e;5PqeR<&1B-ih z-7ChM@};rP?nj~u8_}HqEbQJC*&cA6Bg~G6yfJaC>HIdDNB%7Jze!6s4@#?eqK1Xt z`4uzkh2AdDcYkpI7oSR-{LUq32-*ZbRdlrgP?_7o#m-L?bic4*21K6)cNXkM!DKKT z;RwlT5t{$;Pt}S9F}~tzXDEVFOylBd4ojm}ND(o7?G}}55Nf@#^x8!O8@vuTtP}tG z5pqE_HY`RuJL!IY^ZZnjNX;ed2ZfeBZm1;Ux2^b%f`}qXKb4%zUA@ELjJ|%h?&?k3 ztbDwsz?fSKRcQPH(uUXU<{f9B0_xl5s+fZKWbFWU)sNuUZ{b)ZMviiTlB}e@Yp7jA z3HP|Izr?s>yY*zz1jCIaQum{>FqHpSK!)qZBjUGiJ}1}UZHLglirZG(fr|{IRg+eQ z+rolj*{=E|Dq5k3>(VAEuIsUk((+(KWJZ29q8(nm#mZf58yP6*f@E!U9SD!TR*%Mn zJdGYH_d*dj;OuH?zMS<6{Lk9`xbhC7mCkmoxq*>SNBbylq~V~8heMrQFI1|Zu4Sn4#vcrWkUIZ?n48aGbKlFU$g~&^!H!+hX%rN-YlW# z&XbtTlYhd{sqb1g9xk)23kawibM84XMKZ@^l>llXk?PW^#-`M=L||g^fvtWg8g$(O zOR|@=7EK4CVDZG4*9T*a_Q9O^+H)J8oli_x{mB(FQ=;v(Rjeuk_dz*c3S71stuM+X zkbP${;t>6HHH&Xk_-;-@9g^${YH#e#x2t&lD>)k!JIN2Rx?qn_P};xUT_{<6eDJv+ zx9&F}NGx>che^sck%8L2stJOokw|&9sDM|FA#%eJn<_2Xy-Fn~h@<7<8-`=|_pMb;yM{imm=Hwn4LZG!@ff8&t% zVudt;oC@IO!&6ZFx|L=T05yjAlEz`@gAtg4K7I`q$1w1B2Imw2ZUxuI#DsS1igpMP z&V&EEaRA&wWeFtfMe&Kyuukwxt~YlJ_}1~^JNtU(R4-ircBhY!0n@+?A)vE=Hw6eL zjTSYpylgnyS6y;${9*5EUaPjhzId&B%h-k09;&%$L!z#-wE1~#_I-sBO^D;3(q62dK0}Oayo z^usFz>cG9A0Cd4meH$Pi2jTs(`{nm1Xou*>@8O4f;>QQ?6_8#f|xd4l-D06xIDkAW-e3^r-l!`T4-eFP6{S_=?#Dvl#@zOy8w|E z!|&DeSjqPbD%*vP{#^yyAd<_KP>9~4iGc_Ho{c5YjZI%2Ts!(p1dP!;SA=-L%`-;G zw(Yu~w8Gy&q&Pk5F>;DuK%5+Zb?)p=_RyiWV@9s7h4SbC5coicAtZ6FM1Qs0bAVui zK)-9X(f5FXntjuK3-!=|iGBh=fby0Ad4xca9}wGeFo@suqcA|k-(YV*0v~>YL_moD zwlJZAxPCz2Y>jmN27bywxj8vD$A5SeTjziJ0RTRQG8oh-{s$~z^q1C}dpoY`xO|sm zErNvJby+Uf!vpMbukgrAB}``Bm^oSbOdqWxj)k$x*ZB@n;pZib;r>Pc4=q;V=*nJ3 zjKKXA(m;>JlT4$>aE+Hl2$|gQi@63kWaG0TXxxt3rc)tFt$(w`DY_jrgZQzPTqQ=? z1d3hCsA_QL^RKH~cXYDR=l-XSH`H9C2*=%?7XhI!1ZFj>qVLrq-H>vN5(b`BcXzP- z!|hqd<)r|(n5M)U+C_1+qt5R{PDIHH!tD=%KR~6QYdY|ACZ@pW+R*8p?a1wq>=Noo zJB7J z9yjJa8q~fzHOkI>B}_=2ipmV6;TIc-H)GqFG*K0@5Ylx@rhHDBDAxC>=lt?1_A5() zm+(1!S7JB3lHol$skAprT$hwi!B)%d79JwNwP5yv4uXij}H{ zfr0UyoCq$tpB?z3pNdya;Fp$w0`HV_?jM08>{DI^P4ae<(zP-Hwpwd-eI3JIrv;gm z8&+i8rZ}_KSux@x9n0`BH3S*a?NJsUz_u#vX7Bc6R5g>cbx6f02%zyG^%^qD-EK3;8 zS#hbD|Knri75KO43H&DXr5J>|L!j>eF?LSP!YDy|-L`Gpwr$(CZQHhO+qUs;+qRYS zT_lx@Tx9;j)Kqo%JiQho6OC&eJ2PyOv(emSu(>bEf)+y~H#UD4BW?%5+2%Ov2$OAw zb%Ek&_)*P|=-H;KobuqF4z4K{6k8ZcH-WR1J0w2XVN`jm0?Pp?S~S92vIKniDXHuW z6+l$ozwn@KiHv6}nd`)`GMp=1HfwofpCV-KHjc+2T;~3f8SG~gnEC3I>N`W;RuiqquwtTjy_uhGJ`&szBUj4=cQ+_qEMmg2NYZjwXLfM-{|jz-x8Qq zk4QISg?MPx1^@e)yj?17k+a6}Gr4n3gk~UFjKq*tfqzi)Rw5eg1RsE{(n0Yknr*$! zTrVjWv+0kM?E1cjfl$LuypeK1BPcO2M%mbj8o3XWPyFAq$e<5%FZ^JB%N&J;8lFX2 zauup#1EcNcniTu(lDu~uN8OGWXo&ZyXAifN7IEoa0v{qQQi3Kb)!xeTvh@NlkY1Tr zz@|r8X<)9_SAx#13CQ^2&^-O3l>}iRNWN(WbXIBG(9P!x52|>hasj%ZsxuotP=7N1 zE(h;B3Z%(LLdxOyZ)Mfo&x+ivW8xLvAc^tuc2eL5b=2-JyypOjO)*Wv;U-NEN#2RZ zLpgXL^hmG9Ct>!t;qFJW|9KQo&P_*2dVor1TQ zSb0X$qjd!h-#;LZ7s&==jT+T-7Tr@VQ+C8PIDt;F`f2HKofs-XS&K#I(cwRDpjhhLymg77ibz&NQ zhEH;F4@|tS)p8Hf&qp=Uj2By*RAxN2LhoGa?M?u949J-MBung=YgKP6OfWx+?`+m#Xxvjj#Ng&x zW!kP&`Pgw(RyI7B?)Yr@F)#RX-28)Q%;LyuNV^=f=ioe&Y+^1PJBW6fqUSiC;Y1oI zN&Az=_?_P}w?>7QFN140*afYCI!u;l^`4>2>)DZ>G?Z6&WtyT+HW(=PmZx0lkXQsT zk(AV#t7IS-A!K)`-N0_+HvTa_GErySe43v(Kw?8!Wb5gdEn#&k9Nuh0IdK39m!U?Y&sO zZx$R(tD|&jr4+Zp<#71b%roemDtQ2uw!?yDHrnF*;TFtfyfSMF6@hVm$mD>RWn}_h zM>-_kXT_}OPOm3tz*IOhc;XM`tv2|{`3k7l72*&K2s;RT%=&s#26^s${-xZbnIAXj z&-F@v6L)64LBhQ~*G9dN!rjrgWA9b_LQkJ>s2n8f5ll8g8=_M_SYtA@c7WW5K2@SEQl_hbD1lPxBlktIl+}JoFhtEq?OH=lc<{x0yU<*iUzlSo?cDm!6=wOR~HyJ8b*lc{>b_kG{^!BZscdiP07mzPTp*6Q(e zZf@o9(l&G3{Ex7zk~Ouxr(C~=lYaPg6jXgMO%O{kd6%;pu8k`GK3DcrobUB+n-1-| zAwxkTKG}Q`9c5jLHEzQJ8Tg}ZKO!k?W|eaoLkZ}}@<+!zMY(UIGU7b^$n#W?fg8A2~ z{ds)vh78t9FY^vwG1ns+90(Io+00#j(sZ*%GDV$Y}fDTJ%0_W$wQfV51TOl33C>EtVCM_;#UkgqSxv@*rP7=>HCky$i?@O70KgyN^%x^7c60&}mJiW0huh@7eXW%nn;*ofbOvS2- zuV`+NyQ^+{_wRXL8|RBBq+a7SNqo-RKcP?@)`RAh{iu=<^WqEm_= zvlyjIR~*djM04Xh8?urQzh?BDF@z^&In#WjVvw71{~4$ySXaESj>bYiwv7?Od#t** z26e0|o%K@+OfICk@>lXcx5t{`*}IDDVnvp2sOBy4!q~I6bx+?)0eUv*Ri%2KXZoFW zTLdGUAvc|0+}Sz)bK~gji&V7`B&!^I5vVy5Q7|0mC-jan=_>C+k0aawi+Gf`cPLI% zDPFd1BnD%NOV^#I-nQTk$*!Cgq$H(F@fx z-p%5F3_>INpF%BfSYZYYNeCMvX+B@1)a%za;aA_VP7BcB zeZ8Jx$(!gZ8_9jqV6DZ1f1*@&tC`oR(_f4`hk`%W)h_WBH|aIT(g>?K1sJF3To=si z3d5OWA&m)03O%Xt&aPHT_WPMl1MJfm37!t!B-P6?aLg>pG;9?XvNR{fZ=;Ho{rI{m z^WIn~>3deNVAG1YzQmP>Fd|wZs#^U;YTK6%j2T8!AKzB zd_rN)%S1r{O9`z;HUc>u#(m@=^sj4E;+3@AXTPEOJ=hNZaTny5eP{a$7d1!Nt>Gz& zjX&G%3KHV?CB9PcJq1~>oDR9xK7ik^>r~RJ5lFL(!5GaVU$Bv<=m=+fWQopoM)qZgq3&(d zx+`oz+Sd=6a=S-6W6GKrCBUuMl184MtGRVm9Kz?vp|O!OfhEv|3z_qH+0quv7xBs> zYvvEAkqU1#JrqHDr;I#<$++wQqsUV~@OK-iFZrV;(LuQUL~Z2C0z20Gdbh`1XzN0L zkv=qwDa^%rZ%HaUM(LdqdllDm?aKLL%H_@sG*egA$G^Y~^378!SbAg!a6$&d#RS!5 zTOoKl+{E9Q%C*ZWC59KIylGsTXBBrT`CX}ieyyIS>B=sr;T{aqYU8E@Dmng~Zz`U= z_c+Gy;f)>7OdKifOiT9{bJ;1IsH9O`Bsm8XN8IHFgL!3$aFR`<7goAu5mA!Z)Z=fA zy(#E?i{7u1Q@@Zbb`WER;!l%XDEA%<=Jx3PbqtRQ zbKz>23Uyj^Gigu8_iZDlQBJoAE$%n5ZU~8e@vZ-7D(`$%AlcAl@#^p72K9xpaA}Vrb0d>EyDb*T0M*LbD)*|FHtHCeD=|JBVb;cv=Qn zVonqmuI|prE*Ea2kncRn0(?t4FI(=G6~@#mh(6OM6t%%aG8~4q9e_){f^siJ%)-qa zfy}md`)53??6k>c6eGs};PeRaZHl+n1LV>gR$MEM9ZGIyn+()9h;59X3<6GPhAwk{ z1ni|j`6L;i=Tv2h9Fz2wPr<dTyc%=%GFZ8V9VQ)tpW=KW!=yeA( zt5AiysD-s&;!^$w@g=}yu8%N0Eq`B�X}9^C&AOXXaK=TMYD?2WDP>qmv=_#iNy_S9O`q(Q`39d30=a!q6@(tNF= z`3ZbkNrR_5_0Q5>4kyF5{vOm@Ub{)@@r86guZ0p!__$&%y5iDp*U%9=Z~hRi2H~~F zqemtD8EM4_m{Dg8KW72a4WP4n`mK!&e;4VkF^~F0mn6QArMU(x2KugiP{7Fya8_sN zZ0db9h{wSV*b=**5_C=`V%odgsU}I@{)$+0+SW-JPgI`ENA@`-g*#L_y?GXo0l}v=RLFVtSqF0fgO*a*>BgD?Dcg=uv&I{oBhT;o&u6uz@ z#!2k-!1TqPSR+CA8<-Mh`3$in2907ecSZcNFAwT+ua!#z z{!i5Cs6Kh~5#@#5g2%{%=epmJOu=}OQbs^>c4H8>Ae6sC2uY0#8s|M=D~o^5!Ejw5 zYQDjjRmY4`7;jBETsqyatoFsSXioreMM`cW6w5V`9$XGU>SD%}S=%-_1aRfXBu`B& zeBIhlMcL`RhJ>6f&?K?DQZ_^@FLnm@jj;!*jJ>Q(gUd^(^^2>@`XS8vMF)+6-j;5h zsyYu;CnxbK@wYJ1qKYPOe0tSi6|<->k2712JS(E|(AJx%a)(*71}Jtl3qoF=R=~?N z8#Y%U+!x&t8MVCL5Xo14IrB@!YkSHcg-QX{$0F{NXcYc$sW+*R?oop+O+-=HoMx4$4J>4=A*9H7a6Pd{QGw^J;1MAQQliN`I0 ziBucM(Aalr$qvd1>z^twa=_`np{wwqQTpf!WHs)V6Ab(62c(k^p&wVDp<(N{(X@<=!@R8TK${aeTuW_zEk8M zdBHmG)>kijbuXF{ma(EEm74Fzrowq6%Yt$R`)HM*=4VxTsyzXZlbgBiI!)TfZ?8v> zWg#%IpzA#bnl*eF3F+Ot_q*PU^dEo~DV^KlK_4(T;eJu&ML&q1qox&E~_=sfQqiXe9@Jc+? za@HOc-q9FwZuT3Vw=o_&co5WZ@pI9|2P2(Z8p9MH*b;e8$HIA(yD>sl8P8)l}bQ_a%15=b)g0$kb>ST~t?o0r<~Qg;3&9+?BZ@niCA< zVWwG2MbjTnbuy-=IRnisM~7l?H5cYc7hMBc2cd=Z`1rpr=Cw-X;D~B1s&bk6MBs>K z$z~uoQ*4nY$vE0rs~E#^UW%v%#%3b|3?^UKb%?8d)O*#PQ{TGsuE2N{lpNIg+Lv^6 zj2!7WdDweuA(+}9ok>g5n3UDJSNWve_M_2(t57wfQLr>b+s%%TIA_r4v9uG1|Oa&MOYORlfxhOf`UxOHWmURC`?R4Ct%W>h1 z<*z37hpHgjLZZifg*;4ruQC{D=VCJ$JbO;w~EPr??|iz zyK0oOJ?MhAN5gQb3chxKSeqPMt=!X{d(Ks&<+KJtlg{R zsg#ecc%Wxu+_e3O?i4+go|E|vQ8Wa_BmZ`Eaz;7sy6z9fE0&n=$qx|r3)}URF;^3s z(xK{l%UraGq=p-Gl@2N~{|>yZGa#D_N6iZ;O*Sge@QW_Gil3(%r~eBt9$2Gle<1VE ztS&=8JaKY((<=`sA$*MWhEqJH%6N~n)3DR$ap!ND{hOVV60X86RW%I$u%n0mWxUq1 zsiE!P)YU-Tig+!+sBnF~VG^o&s4-OPrDQ6Oaw*PcTQ+;Q@>>p3yrb2^bN)K)cCg%G z3yk$T|7-RX)=|EU2=Y)Zn_S_FZl<%G23*yW{XDj9s$X1OtGvR#P+2>6W5P$R1-#MQ zFw?ZavukY8-(pDvDQRSSk>SX6a8fWGf8JtA54n^qjhRZ#Huc4_vspECtYhFS*~>qu zGMbddndTK2UJv?{YB~Ks9r={%?g6?`xvbpjz6}Zr9M-;Rf2TiVzCZ*F_NeAwr?S6F zxE4NIksJl?+6_(grHh&+9CUrpe{$OmCw`%w|A^Hhp%}@3G&a9gSdU2|Vvxh1o0pRnw zxDn`r=7}pZ2MuUL(N6(x7T&nDFwb=DXV#qZ7Jx)mjd8(ca z*8JH?9331*Xo3E1yk{xKcU9Qh#iVpt2o={-F45(l8G*L4vJVGwh!}(zX(ZAB4yYvi zjIthkVHKj5Bb1Z544uq>bqY7?!9B#~9ClMHfkllTclkbXaW*yZ_Ir+c;F5vl?&ggh z20x{eUgQrv({rn-fJGBg9vbMzk%FSK!m)jPH7Z*NxpCJKvd_P ziWp&+_qB){WWdVzoHAZKb2BwV$f|R+3$(W#s zd6uE%|KfKY`mp}LayS3!kO=IJtO$5`{&&)bk${n%^Z&vuF*2}o{GS-k|7}lVWaRuW zw(~#d|HGd2A7?510*y|_FY%}i){xMKf3m~R2>@Now1Oa6g5P%@{cQv0m zGPyK(1aot9>Fga=VE?ed7LB1fm6^RYbXzb-@h@L~M=A0;$fmpdzW#7)TeExX(>FX* za|<);mu}bvICw!=Zs`$tL(IEAn*!n`Ka(>9$iU>#@a)_$Bmg(ifE^jyz#inv4(@**Bfa52?>+5&>VLu`jHTA&C5(p3jShn_N z;V&{S69lfcC|l)=Z(=a(e@6oaxiH};$V%pV4$f}oJ-cQ4tnKIvbr z&)eKC?Ed7)9N2%%4HLkICWm`~jzaj|KisoBxbN~${*ozz>3+Gl`UoaBv)6zgwC{t*Kk?uHP)qgSe|yN1 zehrNu!t!6`gMZ@iO|31Cf73ux=kN&UP893H>La)QvaJLDb}c~bE04i9e^#ah1m{T+ zo0-Cqb0brOGeZyM+e?~DORzRoHjs>s@5wTMnP4p8v8A{g8@n5iZ==93Mus2wxGrxp zHHGQX%r0jBRRVJhq9NamyL%Wgx~+eF;UT$^y%%@6CP&9W0XaDWw-pLf0*K@T$*5gD zWd`m19Pj{4TN}a!bO08!y8z7I#$^D3D_8_`%{+t5YfGj`gAz>hY&_YL-}RPRJ`PSnabNMQA#tDl@9|e?FmAxv z1#~l8+4ue}RbT6l+Qd@FQ!Tud0S;MS)w5$Png#(dm?;@-+Y##1Q#vWs$vPMYsVohb zYCdNk*}b1PL(bKCHG{cFS&=eM^EopdZoeO&qc%Zju#BTTYS1&}wa4xyKBIEM3{xbC z>%0_0Wv9VbD;j$CSD*dl9ZUPE5>C@#t`u%BD=8*ZN61fBcs~lEEm-jt_Re}pJ+mK% z*vK82mFQ_j8FGZ=3$Ec*a!4iNDaPXs4#AV(C8G4>rOH5TF(0!`b zxgPCGZeyGnp~GywwUc9-Ne2V+CEfRJ(K6UYOp{xEWU*PQN6V&@triRER9a@f8fWFP z!*g+mN10lsfRWcbxMNf*oNq1$A5z>GS6|}H78|*S=q^o5#=U-;)V&7Fzm(PX&%lyf zHYFJ0)wg1;>#f>heLoDfzl83j;^DOCj$Z6J787560Gh6sf^YBR6+vcf4N+31vw;iM zOHdmc%NR(bI#1rxf8UXXUvU|(E9gjn6W_w|;=>y*07O;7!QexfPSn4%mUm8dhCPEV z8ib%@=J`W6l~TSjRMF&^)?+Vma|Z9p{r)_;o!HbkP(?$NF4) z>$n2T$+}o*)FRDYHyO5X+fOSxD$(p$vVtEi5PW*|xp)|5@iS(z0R-Tm!YYDA*l_T& zzRmaJ-wv0WSHQT!)p;DfK6kg-_5 z$aMYdrOWE+9Cxf!>$s3^flWLFwl;_O0ZPh^>eugWJT2(QxmR>gO-v+{t#@g@ve^>Z zKOVB3j!&x5jc6Sn8SQqv_Z71yMi=PkpO`&-JVQ%xHGh_Xhq3Ov1We6lT@@gXIZS3+ zXR%0~_qZs-Wsyl>e!1L{$uYbP{%w*tn329wdxcGPjh=d?Zr(4YN#S$Hx+hx_Ft~rU zvP$^Pq&s}jss2PWRiCN*>j?35Z#SHG+DwYd8^6pwz%h^PUdY zYW8Foi(b94lgC;M4gGdRYr|f4?ulQ^tLQG9v%M<_OE3@AmRAfor!=(jA|2`h`MiZ6 zp~>9EcM>M#ir(}LutC}NJBv?@yEc2@<)w2gN4l^M^4wchF>gxV*6Tx=aIrUNl2T&2 z*nqSdD!&zsTbQ(h)_OzDiUB%PS4ofB+^n@}l2uao@N?4ivhBRI44ffA`D4bJ>{IEv zkO8T6vW(&ca06&&UCLnAM7yv<5px%4H$5S*ef;+mhDr*^&yxVBuU9xMtEe)Sd3}db zRHO&>^Z6~k<0sV+kcZKJ^0eOT9k>Tn3QR|&nl(nkSTRvQM<1;mdc(_&FQ~@67!eS+ zl0trU(;Qhgla0kerzK1d8nwkBkx-ehzb}<}XvmP=7fEVyly!8dd7ol3L|MBt>RY)v z6ws%xWmou5`tGq?E`!>RxNyjjkDJ){NT36{oZVTI(0=hM3kQl$K^z#4Ov9XihZ`-f zI%QUyF5zTEp&87-i5JPz5=UcZ^@tg5%*pPDj?d+M@>FDk)lcj3OX_E_Ovq<-s@ed0X2DT~Q2yV<9ndrOy$B3b4-xo_#cN1czM_CZ@aN(dqh+d_^8^VinD%!Up{@Cblm2;;mE0; zZkET0-RC5)F+dF?%k%d%rv!>0C-XL6M6S(}bUutiZGKy;@bThhf02f0vPcF6YxyA6 z62=V7ap(ztUXrKdz338gVpYYo{1LYT9NOGzHfDPEkry3g6t`7wwYzOV3rj;@-lyLr z$0S$bXS!T%ckk93S#?!1O8Ylg>zoP)@0%D`_u7!{fBpu*CRuxlI|R%Lv4|Q$!OpIC zyy+ve%2q#m<-W|xh5GZXUc?YpkH~pGVey@Z<`yXK!N!^@$w;(9?f45`&tvSRYvBz) z6-zE7^3Fo=)6cHcEJ&Y$7n1_?p z&?BsHaeeA2)td@Roq5f?IYSyKQo}s7O|`J9O4?3+^N?3=z`ok5BfMMLz8X5gp7;$OHXM3m zCr?Y02i_#Ee!Y?zpcJ41!7!B`FhLc%bmU z8UmM@OYli+SP*%dHHPUl#(`I@lUYvi%Q<&ik9&B&%jnsZ=X%hx2_!((?quGASwO3K z(ALqtSI$g*x!hc?y0G$3*JJT?o$_(6bAVVEP+3~1nCdd!9bGdBye%ugSW{hX@HCzI zkND7rLJFWN90fJ7ZNb!HHe;9FhYX!I4NTx3$|Ybfns&=|XRv}ANf}lNFha4&a>S91 zu!#@>UxRbjhwUB@k#~wJ4`ln|gQG-A^i>l99}&kh&4lf^Z4O%||C=m!x<)@`N~cXL zn(CKH5$7^~qH`4i`EN7-=i~TqvaBa@p2jq&%EN}QYj_Kq_U`RMW)9wFS zcbf<~-c{Vo>P@lH<#6;^s2kTZ#bzXGvf3c)_mCIkgCY5 z2*+n^u4-;*5wST9SrpIHR)hzw-ko`0rW^H*qHW0s@}FFRR2R+~ca5@MYd1m?)$o&) z!f&=R5>Mml5PX6#*TL{DqHbpf4ja?fRr3LG(LjH=r#}9{+i!`YsI32tXz9yu@!8It z*pN}q;MqW%GieHNu4<{?++wd4A8Euuv&l+Rl|Y*$ZI_HXTumtNH~lXZ6E%E=DInHR*?h7yvS}; zM>Y@NE3%gv9Q2qNSBU}_(?u>~8d9_8{~C1w4Avon17 zDg$rg^!Hdc^5r$SA#r`P>MG{h(-AU#!hdOV?N)?3+#vIM8pNlda&Zx-NruaG=hQa6 zA7R0vL9y<=IM)06oUG+3D%Q=9C)M2q52lfU;N>DEf7tL<!y z?fc;Uzn&Mj)To{FFU*UF!p=*=n-iNG-EG{Chm8B3qapGPgPg$;*hsyVnOeSx)0BEd z^gW|yB}b}4^HLHYqOB1q6wb&N{4l};CHE8X)W-y3ds zAs>}=34d_-ND8J3>`$Y*yYL$whPsI0MF@e_@9$y_KV_|9nbI>pw zq8jX2QN=nn|AknmaTblowyUI*s~OF6UuU6H^f|b$>1VG^>$sUYxA1x*&6)k`QLMT6 z&)#{umhMg=2H-dl<9e zPK5N}m^0A!R2Gd?!~n{Fbz!K8R!R=yLbrcBSnO35UfuJ;r9=CSE^%ausqh)<=YB6% z4{v+4sWUqxxak|eTnVf#mo|6lCko*+|2FS}WQ+08y5TV7$s*(*@p4P0B)$p=4(aOX zfD~*xzGbwyV#5MaDFb(4;Z)AYYB-ji zetjH-PeP~iimaSq2|o(@epPD)CYF7-hGx=sx1RGL@tE}wPXv1=xD<&DWi@PAHf-I@ zztz{-YZ9lYX_A*5&6ePm&Yjq(9!%b0l+taA;sb|%d8{!hP1e7ZTNY6!g|t0=LP_3< zM2F{QAj{_od6t0c1qb;KH7>C!ev>(~V0)^$VPq!`M^Ow+mUmcGqc0f`6&ot`wq2rN zs|VN{edYijH&z}sE)XL2xk0Q`E?@~;v1JMbHm~qN@JquB+}!1m8zyqd8vDw~7?B$_ zEZWg;wL_x&`kjI8jecX2-GBZt@mvAW8#6?6b+_yxzc^T;Tf)l>5~ENTw1@9j2|Ia5U8+lj;LmLyL?} zQ;q;28egs*svs=v^RmdA-%?4pN&+`Tbyul=DX8B7#g6RjwW!pSVI_N9zsIM?UO8}d zlH>6ab8s+V&W}94gADF8ho&yY*nNvR>4~nAb$<@QZ zY?Hh^BJ^GrQDa}o2mi$xt!HugA=QZD#IB@dpwFJd!3$Y&>rjX^=8*m>f zJPgv-|4=hCObbIT>zoy3C1!NV0I(Bp@bUumYYcEC%nAlBsq=L00xPO3H9?W#@f{ni zITkxXyK9U7k65bKeIjc&n!y>LgOYauDb3sY*Yi^5Y-4vf7ODdb&pL&Fj!^dnU110?FDpkuWHZ67(JBATN*l?^2zry@bL;wwyL95 zDD*k$opO;>jL0^p5FOXM%tnuCHV5A;Mm6=p{sibE#xJd`q7s(0$sI3#+8tff(afo9y%2Z2X z5zC#1&EZo?9e=rd7_oF;R~}iVe|(d@pjhYYR6FdtGP&*@sV*zbR9mjo9s|#G*{edR zD4%?b2~9{2NnetTOQY?c$0|$H^a5#Pk@k;I^0ofH_0^CX^;%gmE`&Ha`YCllWPboe zae0vFAP|C$8D$#@Pdtng=0y26H1bPEe`)V2bf!6{>B6~t5wF#eqd=AN$z=hVdAQpl z$%H!|6Iw@f?P|Ijq&a74k8Ki{+}GFw4H1Z$nRYXMcI28jvbWMJ7&QOea$?>L<;%rF zYW^&iYM7cT-S5lfVW>s)X`l6&-2JaRc$*i25whKR2LZQla$}O(T1_VG8|ZX*JimlE zw-mEoG39-j=$-82@#H*BM2+`5iZ#&t%IL1g;>n9o{m&xJGBfe4qQ(@n5C5`2lPqe| ze~5Xv6XEWrV%!t+z`H7Mc6Vo8=v~@|A74xWLAPhHXX~q6qTHc##m0TX8S!LJW;lHs z@_^BD#Lbs81tU=K>1UK>wVK=XLM#OJhF)xAphjerbp1*#x0P*u$w1OD1@zVarQgR* zYA97@S6$2?ZpRY_x8L-c!r*$lZzR?^0|6~z`aW4Tw1_b%%cqna|~4X@qm zIpQZ!cQ6uYY(Hk7+KA%JC#)pu7uw*;h&%rBmI{aa2tj_ZN`=PKakoCY{zDx%8|f3v zN}x56-k~8=dH8CkZd9(7?b>`tjM$aZ#=1lQi>PNjCjJ7=)U!h-(t>oq!76st@3B%# zh2gX%r*pBM zF@nflSSTW$bH(rN6dZpo8%N1iYF^lCqOff-^Lr~ERt;Z5L7|NE)_N=bW$v5^c6`Ol z2uXE+{$-F&qYn!Ko9BPH2aD7RW{;Jx(o}UyFA;@(cpRR{Dx_!C&XOAW2w|`DAXa9J z{~1V!p|~QSwofUOHDT{8$C%thvefYD`NkT7VhC65XRV8(quM^?LTZ!BH<~uX3ZdKH!Lh zN{$gUx%%*ezEW1MVe+KgWNnn)=zH=hi}112=#-^>WdYPTZ0xZL+Y=6iE8&OD`)E9u zj!uhX8l=y#c`R#LY#5S|pUmaI0|suCZ^su!wG*-Y1z@l!7xdD(Nx&tB{4vh=Ae)4| zPZN8p!f1W5%do8*itlDl{(RYp9J6VETt+Woi&kqjPnF-h(d4qdo<+ZcdVNnOUAJ!n z`VH{ahMqo*PL{b7I=IfwccsONJOcj44=QqOqQTe>+LWmP_3P~}-%X~Av(wwztj9ny zTxWrbINE6HvX7fmd2lEY*RlJZQTn~|_$%wPCfWm#Y^P4|9ali9RV>-;4qBV$I;OLE z=O#Y%xh&3hl3#am@)QM>GhkX9xJu6!#e9xsC61`x&J!E=_3fi3^VG7Tr4y&T>2!Oy z4~#H#7UrvpUO_9=55}yphdR`4hin{4`UQ489U_vSyF_05)!=G;RZwwY1uC|l>#BDHWeSB3 zgYj822Z-t8d~io5)m23$B-FNXG`Q%Xs*4<#xHilhi^}qKaX#)SLy?qM0%Y<#4cE;z zaCRt{U6@kn^VVL~wL4RK5IkhpW#4*|{EBbtqO}1usY}E?UIUyLJ{Q`BxL@+TC~oG(Q>to->0K zXO(u@$Mj33bbLzed(o#6g~$pN;P0M?^nEPE_!Hn#^rpMF7d5%CocXazy@!vEdowpF zt%I*p;>A=KoU-NE#F_l$s_#W)UlIw1#)-^=AyY{HCVJ(Um{Mzb%i~2aT+dM|KG)8z zz$xFj%G~k^dm>jS>1aG2w7doJ%xW@WifPT&jbwm|t5K=8HlSbH_U<<6ExK_M(n6(y z$lmXv16q$Gfc8a-eJg^pM`$JP!cxR+FD;k5l>&;nOMO2O}v7> z9LF{0QMR*_%a^8E)X#a`R;#P-lD}DIxM zSb=)yjP+wWqzh_u7XkOTAD8#hE5g}95LmEQ2vmjo!pjRHQUsG{cJMsHDLNo zoi*&-=O$fORG98 zBINsfjPY!^psm=;qsR@qk>DGXDRYWrWsvHl1e($qM_C;xbEj8VjF=H$G76?MAp;yt zg_$$#owZ(?^0E*T-)kDy!Zk?PZFxAhtGwC=xHw_54goc zFgc6ik;C$T!$?sYF<*)i(a6SuTn)rZaRIRMJIms-W4W)~Pw={6Q*K^1sSfg!y&j#< z1ug2KG<#(7UVBguT8Gy#ZHLw-Y zn>DAc`a3j)2;oF&gA3}iXR5)6VvRus~=5pm>||B}dCXWgR@ zHNI_MbCf<4(`e@gj)fbWI`$OW(_mt`t>0_t7_M9v7+BdN?$Y;K$uu{FH|BMrinU+; zqLR<;f(~D)Sh9lTJAC!m?6h)p`?)t-M-kN~ODc|kHrJ#*j_Dn2Zkdg~_}m+k+d=EM z=0E%LqRZ#bhMgC~g^fW7uk?{2Z3U;mRWSd1bM_xDa{cor=+$iz1^ga>m2=j70|ted zQE4~8{pKrs5kcdJ8itPUa=m2pauO{<_H*ux`aVb0W!aZD0m+w^z{)f%6&Mq6i%pbn zcL!%0wggZea80)J%!);T#z%Z#Xcr7Vrg?uOvCAL>Xc<2CfkhLTfg~Cj?toZzU_T`1 z3~ey0y4n7!%VF-r%#JYQb2mSbY$}t@qQN3hH&&O;iXFdR?T!+Ujho2QDYqljKcXC| zJ$4GNX`v#DRqW&VpV~=)f0u%ZO z4ZM~dQ^Un#r}xZ9Sj*P8wIN2xW*Pn#UXS6AfuT?5bDrUix;iCkU1r^?QQdgUtv1;z zfW0a}!3+P3v2%*f1lZPXY}-l4ww;b`J007$ZQHhO+qUfv|0K8f9ruoL9`?hj$2F?z zy=u)hKY2dN^ZOXQ<-F{VeIT!*bjEAv4v@Q|T{Hox$I`#K2Q3Ul!?UAG2`q)w{tx;r z*X}ow(-X%xotFyt!J9bg-s)3yNbNvG_5Ni#dK>C_RQ5ReW!GM`zPg}l`5~y^ln$s) zBCmiI;8Sls5*Kc{yv9tfl0@>|l@0}DcK250aJ?**Enm9{u=$NW~1dtsy?mTk)PLHN-=9~rb_Zd)e-Q^#_k)z1u^Ia z8q|1f87;6KkeYjW3$ z$`$WLtnp1NjzF21yql;~XRku1k*P+Qlns_5aNW&b)T2o$fZV%O^Ra2R9BFyCo$_dHwDb%8W*?o{+k z!_|x^ThPx;v<>XfaD68u8LU!IQP(e zY%27Xr$1j2yn*f0f;n02LR^dW`~PGz`NjM(mQ+^JndJ=Ro4Z)d*qW^K_4~?B zBpW&yzfw`m%1)UPJqzNeA_w4hps;+=UrNoWcL0ZyS6}h3XvWMQLlK-;cH&|6kQk47 zk=LClUHvX!7Pl6)t$ zZqTu@SBHLBS(2KY_k!|+!mqH32;u+Ezh+hz=<0MWdmv9bEF;e&otXMblWI0}EdW4MJ8WlBij2HI#4CIfp% z>gy)91G1B~2tIF??c*z8EsKqhobs28l>RYDj>kl=2WL)GXRP-`R06+d2?q8sV~iJE zTP-=~83fcf=3*VVrJ%?i?y3t{iT7^9&M+sws)-rIs>--v;5t^bu>$yYOY?qwI4TS{ ztE0eLhXIz5iYOVXOOxNxS8_ChArX2G;G%nRy|Br$ctn{#N1mVtnLfNms zW-=F)31k4um8Q-7@+J?b5pou9lTT6)N#3t`q2&;}P!qt)W!TM>#>kPBu5VAazwbbv zAq~pIARm&gWHsUFeYescLC=(aTH!q|qfyBl#gRbD^GeemA9W3uIi!UBx(Y@%aRSIc)`e?`7Bmbn4rGNNSb4$hOLkp!yOP#CBYl|T+#9JZjs zTE6F5wu0u`VF~ETR@0W&<3~a^fL&VuK~L1xJL0=;Rh+sp=5HZR+nc3@(ugg{n-|nm z*2lS~7wVO{{A>IG@M|iidwaF*iFqpm9@kGTaB@`Z*TzisATVkxEXx{GEKQADjZ0ss_His&d1w)p)%3R+R>!5lGklOGOB^p)}wPt zc|#0-hm_r_Jk8>}Y+mPmNrb>slboZKI19b!HvOr`xVXKKJRe3QI8?JEL}<=u@Snr# z{v~5&5;uFr+j~|kdI(;kEgg^ZyF@>4rdG+FX4e&~wmwgiYU)xgmLrV@zvmF+7`6oQ zR_!48NBC~ivDDzU**wqTK>4-tE-Ocnk#@5NP2zE2V7-)jNr7O-H9!reCs?;0bl7(* z2J|aM32i#oz%sp^;BwHvF%*hq7K1Ra*LRpl2R#=i)AhUr3~Q!~UM}r0sg+gi}>9 z)LIw^`sHo&&qKquB7qyM_`_@ZJ`cPwg1(1dcc?P4roc?y5=1#Lb5#5HU%BRt8uvi#f;uiorZ7@%z;uUyN%~LC~998f5gAb88o#kf`1hze=53C*iMJ5R0KmnT) zST>riUg19^r+7H8SrF6%8{d+x4&f;XD!S*5D!#dg_Q;X|%^6Y?82=+M0C#Namfa&M zs&%q-kRN63v-j5HG^W++WAq}9f2N^lY$!l%b4jN>9miz{6dTsF;33;#d4=GHF1Byp zgTzR*{3}mT2}Zfd!%>kD#_k?IRS4j_$CJ8Cx+Y!nNbX8Ebk4dj|8&IUQM=G;gG2oq z-nG8z`QiD4nw@r&$q%Xe0q|icj6-gFySI;bwxY1_O}zOsuVUY(X^61YWTGYzhQ$?_ zb!CL|&><4ba_Htdc_(d-^!&PU0gC1dn4t`mwiEyNJPr1oq@N{wr533u?)bg+_v(Iv zT~x!fE0j*pUf~3R^C0s;~hgfzY z-U1oTyoT56lC9>Ix;>}RXLzu)tMwTQEiGDDN9{f{;J~SFsC&xaN0mrBD3N!p)`U+d ze;RB}htT!IM|f=R6JiW8{yhr!Uzn4OEDg5Fs`P#xrKwlYrdAxLnbISzHeS<8Vr+1& z8;K+>sb`g&F@ixmv**b*Sy4IL_&Rz_vMxz#a4tjq9aqmeFIfR;9)&1TEa#&3TB~PQ z7S4?oA)-inK;Je>ovZqDr0d>$E!B9l4HDR9+QbP_ClEVOr59uj6pA{(x&DHn~tnmdSbL=Uq<6qU*JT-opjr6TR806b!JK3`kH0;2<8~ z=uobQ;NiGkS{cA-=|GJJUhyo%C0OeNLlcvOD33~~`f)%w%346Mh=`a&dCvaf_~R3k z%j*RB25=2v8$BwlY^~ts0kSoMNO3=f`3G&mf_Uy389UqC>CrdY8U1n?fz5D095mr% zg6PL^j*j3Nz`n2$lsH=f-%6vw63_~5&5qwwwGixK?btj4KnxJtG|KTkPtu`LJ=o*W z_eyyA4S=lMyX!p>wHLp{7+Ki?SA@|Q0<{+mASW7a zBtc1~T2a}+Z2)F@&_}-&v=7nD-11e$|tsYX35a-w4I9y_^{LLr&tt)3!d-kkz}&-QeA7CpLUDy zw;uu9KRh(raebhArW@dojhHa|X*cyhdkS>(`d!sP%uS9B|4fu{!*3=6BG+_!rr8N0 zInd+ZX*-jei<9`qrPkm~EdZ;;@0F-DoL03LB9r>2l{@uWX$+({f!?$hmKG0>8qPlF zYlgIjrzwQr->k135Ixo#etE)!yJ*%gUig|^oWP@Ua-#&{44@BzoIrZC3|>|cjz28- zK&IqgjK^f)_k|mf1_-Xd0XwGj2tZBSc1wiAL*NGN-yEJ97N&o+A*cK_G=QhciN^il zczJ#yJZB=x@p>UGW#RW<|2wF({Z4palDH)h+-KbN6Y%5mRZ1@> z$ME&u#KzF`j`{s$2^O#|R2m-TWT4zjbd{OEnnjHa!ZCVd2e2Qb;@GT?-g|^cBJx2| z4#jn_#J-SrEJ=*&p-qHX#g8nE<;bXdI@8l`A$1|RR*xo4^uiz|XL6cTpJ#c{TMIUJ zDwkE@(vmD3?iQ8vQJ54#HqWsOo~Hd+rc~^yu=2z>+$rBhmv)?hXrpd*Q$sJC`h)st z{=Kad!kPtFY3HP~uViMkDGK==z6>j^Ci72PXV)hh?NlYAO^8LHBX&o28F`=P0>92* z02PogeGiWk*)*hXNq<(zYmDAOP-^6!Az>J4SVeUlUwKH35P3q*N_ce17e8dBT^6P} zNO;ve0=>nKdRl-MYKbtLew@|GvwHw8WWY+TuThe=nJZc za)byW>oZ_Xnv6-FkK(s7+GLN)wQ2#e)hu-$1dg)K%m-^o-_M6*hbRr7p z?U;yrhLx7J>%FJNq#R6c&RD8Z1!MINy5^gS@Sk)yV>&yT{VB7Dl!3_+!6#b#Y_cq> zLG2@S9UfAMcMMKV_`H6`Ws`(ulBVACc{@@THZ5NA`A_yKO>R8eWqV2X@SJ@x9K21- zteI(sT!}rKo_N}{bj3$^F5{1m=$&GVB-RO+603b1d-9lQklh18(LF1aq<-9|1Vhlq z0Tgc)+IV3f;+y z5^b?e-u5eC!ZykXh1#cR@Rb@upqWdY&F|`;(o;4^0Tqv60YW`?Vzu*qwFF~5Tfs*h zu~xn6r?ORD9LTf54J2WOy#wzKz1IACm=7Uv%`Ou{QeLJZQ5nGuQ(3-)r(yxEQqJoB zhj^LoO-}Vuzb|s`+!DAne>_@~AF;V)p<}8a%d$$f;T2wvhcbQC0o4R%s? zUIrplDNu!KN7yS|lE-NPcy|{LYx2AkM9=E6>LfH@1c`U}U6_iWT}g)4H9^R)b*)kP zhf8iyMHV$>{FvNBFq;^v$Y>M|tI1l|a;5!T<#*0dB$SL^J$6j*WMhTpDevoIBKBsC zhy%~448%BvZ@!~#3%C>g_gH|Fd?6L_kRZB~7Wpz5^{yuBe3Rj#KZeE*N=IoH^j>~SG_I01N9ls&j;Yz%kfnn3l^xLxBK#7PU4>n z<7k~@1R==Eww{?7!6vmdLbAA#nm0imVUtq+ zoSkD`FVh4WwlN<;fg7GO&B7>pV?JySs=Q)(i7_vC2TE*jwY~}Ri=DMfFMn(vPU+gK zY9+)eo=En`JyT1=WG~}KE}Oet@QcA&eiOh7OWMfmb=6!gTzw)up1)$dcgOUGgLsah zsB5P!nUI6t+n3*mMU~*%y3@Gi@yA zTTr#V{p}ucCtfJ^ z83pwIWtwZDnQ2ngxNYWJ%m(D2Jb(g5n0uOx;r7ZA>ow%as+17h{&1;d(&hL&t4zDa zQJ8iU1SI}KfZ zpf0F9Y|9AQ<^#;!|LLdZU`p*g*}b#_H#Oi0XcA5r%%&%yTx(E-$k*g^j3xy5NkwS3#cv(G51=dCc}F+Vcrx@ZZIZ#6sr>0cQSl(>!@|;rb#nT zlmV4Qi7XuR0{$+X@_Z5%?RODGKy?pjntl{=$_|3YQBtO+$*L(Q0N(?f<;6&Q2MR#A zIR?Q7K)!)<$ln<+>KYxhp&z)0(?KczO>)Fo4+#)#NHF583iDFG(uk+6b_Z25GFgo8=6Sv3qivd_E>A8wi+bcD35If*guP87@oX{0_(y9?dao0 zhAwyatn);F`4^A>@qP7{N?%z*_KNra}2?hs=bcDNP!oKtS z4ZRe;K9+7s!WcaegQJkCuFMjplJt))1sah%;JA~H;!*chkEVjz;u+sqNOZRk>-fUC{Z-GirQ#bt6!?u{Z}wjoiEoElGavJcwl#^Oe{NJIy&>vCuS= z?KMPZuJzlE0U?o+=*9QXw?Ya$-AUwNLS`8~koB13`+z&*oB2CF z8r`BfJv*l~Vv=t*?oh+Gld(T2KW_J4(R%K2D3d9YVbbnoR0ny8_gr1682wG^(Il5Y zCo_=#Qwu^rO62|z`(rzs)a4D8d5AadempRd@S+VT&L`_1rHKvjuq|;wIU8b7_J%DA z?OISuuZgm&8?w6)0gg^wfIA|5#|{?Xt|mvNu6s9m?~wENvV!p}n%XM7-Otiuv-fca z=i0YUAc<5OUuHJQ_dr-oXH)%yblqUv>hHbyCSI(l44S2Aw3MF1&aYP)T&8XrWA_sw zx)$);@ZbaX&Kt~?E7;^@h4j!wghtUxkdpeDpjMOef~oJTux05lchiRRXRAA_peO=q zP>=W7f)BCa+UWw<;;AS)X^Jpr40N2UEeQb`<*TGAKBhiv`V5exVEXJc!7YJ z;?Jc(D)oKIPkJ(#!t~A0`lS(OFW!eC4m0G}Y8_aW>J#JKOWxhpl}8fzE`;?Dw@T@i zqjoN($Ep<>f&IgLnxB}uB{^;B(v+)IK(=l)FTLzk+jb9%7(TMvzX@df6-${*s zScWHZEDCbU;(bMT`mQ_P%nlOMBm~fSc3aHQY*H->9R|XXJp9?n?$k9x6<7+4C>f8u zVX~vYkRl*CGGdFq@HSWmH-~3rNdn%6bq-~t0w=54q^!=J1Zvrq%8I+5X%3!;H3(CZ z%78t)XeCi{H6J#z6B3gmYdFRgTkSjW*Ne%dx411^;(onE)`M#UC-7uR9@E;Q$z;1Q z-&&m47m<_t7Il*x3d1G|k%81eF3(Y~iwg+LAfKKu!`txJ*9sw2rV6Si?-Ev*1U*jh z8VN-ShHAu0)({_Cl_orC$1Fs5oj)slQ}QMM=6dPr{gu(=HlOL~fa77`+iS9Uz&Tg8 zU978at=RLPv!?$@>^`hR+2w=&Ww*nNmSSu&;71{mx*O?j4CoBp>)Epl(U z9uw>#YvVNBi6WFemxoV&;b!POsGu^8+NRjnSj!8xJZxUM4Tn>LD#CLd>9IVZMI&UUMQ{sDHzxq{Ix)U%G!&1*^e{2|j zd_||ZNG27e-#|U?^n4J~Qk0au#_C-c4n0AFCt-KzhApYvN<_!>nx-C9mHW+KxGP+V z^q#%$7uKtI+aQPZff|_){?sz|7#NnO3BDa9V3thfhx1y9UP#$B7Pj)~H!J3=80U!^Pt>d^PT7+36cgfgqNI?(RYHeb9P{eg&RURfU6lF~NW+6(f* z^;PGoM5J$uc!Jcas|no|5y$Dg*fu_)fj-P+_kIVHG9HSl^wQBnps`q)+HA#?evuz% z!7<Asl8poI)NAR4GvdNTw;Ik)O zgK~DHB4HB@w^wEzw^{{*Xv$MHpD%#;T@Vd#Fby*e1WM*ZBx1lAZf16SapZ0HX?kFu zw!>A~#vsbYYi6`v_8m2Sb!nYKCF_3tJUXC95sIYZYwz11f-CooU;i$vN`k3NKkX> z!e`vnbRk5WE^GZlLc}2D3)=C4ayjSNqHYz9*E_UeFrf?Gsjib8oRhYx!Z5C)S<#g7 zicr{CtPRIA)hyy~yPKydrcG}WNV}1vdF5jgnz>!~(Fi(_-eU1>yHTIWXG)ADED!D! z-6`F4dxoq^nG}~^ITAYVEwB6xBB^XiQ{TXGHz-H`L z(r0!{OF8DV0@toDL1JtY;C!l*k>F3={C8+MTACQ}DdbJm?N}Ie1PrbZ<;o%PlJQU{ z4R!njYm4qP?4)(X*CxV}U424jnbOM%C%7~6o=?{{X93v1$P3*-p&hs>sJa)IlO(@f znQ0Zi#wg_@-IjZL7xA|J6$AgKeT`^guzti9RA^}gESrWzRtR8tnG;7@uYG7p(TIel z4m-dBX+070kYuxN1J{ zbH?O`8{c&LETKz$LU&;VeW|ZdO|njkh|uh6$G_4RsOm!o)Fi-q5;+aaf#9`|h|b#= zsNsjM3c}kaCUCCr&YUG2+=%OrkV98PGo43GUbS)C6{#Eu{>|NCQKzu3;h2RNLGVR& z^Ffp7BhU;QQz;3tPY2>c7zoik)_smN-{G8aqahMHY2u~WzB^+MN+xIzYa6V~m%7HD zs)V8T&J`n&fHt3uU%(uKl?}bL>qMMdroOc9Fkf!_Lh-tg9}vfvaKdVtSn08 zCKf-z7$Yv-$t_^?m`v5DhvTF z_tHQVT5m(MyyS5S58Y-3ET$T=lq_7edTKxVt1{18RdhQI7f>~=v7HIJ3b<0Mp>l@dmkSbd$2MNO1j zPxf*}UL?ZZjXQ@G?(OQxC^F>cwl`&PHm3Yyd+@qw`bnQqN;p;%g)d@>hrb?yFeFvB;IB=+hP4 z);C9JJle4Dw-h3?$0A{EJ9`6(cRjQ_`V03Qx;T|^)0tW3{lys8+BJnpQ+8RSUXqo zMfJp<9?gZUv?{&0`5MSJLoH1wJwQw|r9cMA4s?@ZM#Eqd``oK`xgae7mDqamV@;oR z)N>lI`?9<*nq8B_$t7oItLwIIkZW;b%hi?tbeJsu(0X9OBz>hX1tIC}WN7GC+ftaH z)Ge)V673EaHo@r2;k$mQSP)Wu&qcT@E4?PeOmiwUkD8=l zbfnl-UdaP{;79XTx!GY-sD?i0nmMs^f+aI<6)d{-GqB4(Why$#T2N?SW_MaPJ$ov6 zLVTTr>Uhq?jyRovdeb_;871d0yk51*!3;I_7H$m6UIxNomKk-{u~R0EGyIK`dgAI z=r223!U#&@jo=Y)|I7exwZ1OQs5P5Y!ImI%q^jjxYbs7kbd9!sJL|cH@dP6OdcC)M zfAN@2Xt2u!t9_)3fz}u5A@foM#M4O5WZz;(haSDVq@_~|XNhp4@}AdYo*Qei7Ic2W zTo6X;4Gk#gIxkpCDBG_r_`zRU4nxe~BD;5q^?3|ZWuO(l{qAo4O|Q*2U0gv;F793F zw1=2xNx{hxy*Cf?&9J_0?=VX@oxs@bI1cU??va z7lMT+EBeAtn%g@Xc}=tanDQev_JP3kC(dSnRq)S=P;A|F(75Mg`m7^a=)8KGjDC-V z(g}JQT9EqE_1eW=xgv-mZiz|tQ|;9FWyVL41!}2cs=fuiE ztD<#YK;%ApbOy5KZ3|tHzxoe__Vck#{|3z|b`B7_Lp)SUd%jL>A)GY>ARk}S#T>G- zK|+?T^VTXE-(I3?yiJ)^qlby6Fim%s94Jkc@lR*4(#`9tY+^@cD8B8>%-kMp27iLa z83?j#FbRZv0SL0@L%Jy2zra$gw?cmG!g1Ov|p4g_HItpb%>zig_;N&+dWvu*q2fks`pC>!cc2QG{*X)wc> z#qek-kt&{xCQ=jUzXrqwf$aixL|sXgN)CdFu(|rOfGRJPL%3*iOu@0~m~VIvgNC>s zdF{l#nu8f(!K2^n0rqL-<>6Mj={>Msfd$<1;6tq~qaZUh)~srovjCGN(I| z&vX|q6)&FxomWkM5k~<2v5r)t3+?ttw7&O^7QUA&T~CA_aJl@B^vi;tWr0%+Sx$$0 zkDmND(eir}ykKFp&VSsEi+{GUhPtg(Op`W!e2L$;IXbq;2xg=EJ0}fl=OE(>-7B>n zL!p{{muCN>`ZB3AfN2$Ni1{v3gwn9sE0w3@-M$2=#4{ue-wa+dIs{tY{ETnijB>!&FBE9`E}a+| z_Dz$&wd$A#cBzDa?5eYh_=XR3Fh?&C4*%`T;>fm=!huXIl?`wD(te9y4u4%N}uJAHzPPf18 zr#ewe0;8**DHqcNcbwE@PwU57gWZ(IVOd<|Ve>=12@>Tj7R>zhXZM^-sH_A@)doFW7_ z?dF4fp6KjIweh#sZ~iR?Gaag&-xK6vl`AG|@vf}uIJ?v6$k$6`-6XWXQWiz)kI0L7 zv;du(P8{-trj?p_0CZm+7f5K9rTVcdm%CO9iIo%iqNH984x||G>`@R^oTcd;ny_jd zfeZBLWzAfqRA>3p+1klDK^eX_LbN`SoCO4vL-CY_PKKgKOOU zVpCSNAw{C=Pm4@nM5>#HbjhhU<)lLsawsy<4+mVYqd`Po62LYN->c7WTq`oWQc?J5 z#32##75mw(({2U|yOZXETUoC(T=Bh0gp1X`>$v&Ew54PDHm4;J77@)m`W8F7XxJ$2 zzL<~ai9uWioGM;Zzv4hKu!>YA(rtfY>;LYXM-W>;3w;$UYWqAnIi?pD^G6707It57 z9es$I+bg@#rCm{I#d?!C<6&Au#;)~GAaP<7J=BP9zP?Rwl+%!ii1&Km9mn3|A>y1Z zekQ`jXiCiZRg*EzH3i6nE(zr+2S#LMF%?B}Wln5Pa%D-RarTE?o-1dD`OF(Zlotbc;g6iH^`*C}+l%VDO4PNd^ki zDZF_KLLbyjxGyzC#U(!nIvpIIbkrG0O2_WPtxcHi#nw-@p~0bAyOMq%68S}H-NXVVfUY<)sU8r! zJut~P9UinMvUX|46rby%TI@K%EE}1fLH3}kDB5`2?EU}}Sx2I?R4ipNmMa?>ygYyv@>>ejz9}00JW!eOZCDg`Av@; zIsTQ3Z66_HEIj{~4t-IrArNnbkTBF~-xG~~I$R(`u;vy)9Thbi&N>-K?N5n)nCo;; zXij$uvC{~_#&_fhB83oIzPJJG3WibDt@4%@A8c<~r>lwM6h*bS@ZQ_$f%B!&SO{^L z#x@E+p@Y^@kStDtWRko@?C(66bVe~bx$bQH1N2DtzyPt-CjLlK7xPq>RiHGSpr@~- zstN=3wlMVHOPL2xj%neL2GP#e)cwP0w~%ZkJfy%mEV5W{T0wR_brof#nl3{hJP|au z#vTMbb?C1%bN5$xmoBA}7TYv!=e*u63LN{;bCymL>ZG|wNw-5P2RxoAOkEu;X$4fi zd*uUZedt}tXHZ06r{dX8ox^U&m)qDpmbJF+d&RKNXvUbi3d9dKv$4PF*hn-hIg*39 z>W$<>^VWP6s0Ru#=G589wH!$vq!hcjW+rhRY7UpkZ5KSb_?sl)A7!^zD6DG<4+B|6 zd{Rk+R#8rs3PdB-tA%}Bsii#a*H^-9+jIV^)Z$U5U7ewPYzabK!uF#R z^dub5kSzbE)X21ohVGgB>w_glM!UFFvh);`VYK&I5o&e7|L_am?7}q6;=QIl%*)gI%eR_X|lI zAJ>WL5x1VnN%WNR8PsU{uVa&H$`;S z$9M5MC=VLR9$OgCv12;nQ$i9{-O}q&N&j4bSoo4PtGB1mdPpX8FI$|URg!%R?G@;+ z%fOnG`9&9gxt81%YBTjoM*+#O5q4>Mc#98KV((}F0MP`#t1vf?Q_Z0{mS(39x)x)&-MQ~BkiI75ogaK${f&GE~V)mbRZbVT^;wm~Z zRIw0kC?4~oUzc)mV%m`<4*FF8)KnvKj1-c7H_Vp!`kH4^OoyMF;=!Ur)0Majq!zoS z`zFNzN~3;NAk?^C>4ye;Uj>RL7IN)eTl&pcxp|a~{1Px55iQ1!PGWq*tibTc>jR~* zRIkR8a!f`>-w(;F_Z~`e3da{YN~y3+>F0VB4?jCgMKVHjI| z(KhFT63+n1P#5Mp+r0g2stT{%AXK}X2)T-xvdz=<7M4&Y>%A*>ql_1|wb~p*7WbuY z24>x`*=X?HmfJQ34v;S5B{vm}ykX`|gBFuOW$PqKJJAfoj+SW}rO*iy`dT&{t3sYi z&gehEp1+^lOpS4AYn1x-%As+kY#VY_Ao+c<#dOAJi|F_cB)s;o>8K$tJEuhJYiTH= zBpTF2^{ahR8Lk)eQRCQT)_nCT3F!`d-A#PwDCN}1wb^7_dfQtLxRIvuA=_a#v}MT& zViMRC^;Q=`FyuARyRcOeA2_8xPH$)-QZ%f|GbgiZgA4)$Pca+UM5DYC$PO19bcgDlVWiO?5sg|r+7vtkOhg6&jNBZU9 zrd5t2G}bPT^AXO2Cs1-cbKJQ*kXr{ov}7I4=i=Sk8cB*n7uH*m?z`AkQSKR%r*pm% zS0`5NyrvHEXv0w?G%{sES04nv?=uX4Dh`*HC5a5{xp_0smr?sKHlbcb{3VY=4g>Go z_mj!@A0U~Ko~Qo?{c`*l=$Dy;<$plG%q$#S9RHsI{-645W;PaP*8e5+8~p;VfOozM z9tko4jl{|s)AgUV)ZPUNe~Yob69`VBQNNF|&DPGdJv*H(dFoepxmyV1X`{K-7aA?0 z7$P^myo*I?Yj^g0Ok{2x9w|ZD)Ci1`xpAI_nRzHFp+c+kUu-z?P*Mfx|J7c%|1css zfZ%la8yAYv6Y+3)@%T4a!TU#m_Ycp`3=hnVLm8MFAAjT(^q_JGE|1SFq7jKB#<#YC zat|d%tn;{YYi4S<`ws%{NcYfB}^8{$KMorkSUibe29DGoTRIMRR&q<==f6=4Xd+ zKQsc0(iHj7##(M92WU46b?b z{?YOA@qrN#AZ`$U0&)zvzH?PRe1AWx4BrSL^fynQ|Cp}@MS*ta{;oYaM3dXtDaK1M1{7)^|boWydC=^8c9r0b~5qVn&#U-1}JsZ2AA7 z|D>rbj6dcbe;Xt>vNS>3f9Zmjd;C-l-Q>081I~=gfqr6$><~9ii2NU4FRz#znKJ!- znZEq^{rhyje{Q}QQh(Z3e)^yzx;EDVC8YrApPwT3f8Of{z!*^TWG#JuQ+yL7e%Q_r z+X~RP&!nTEvb6fvPgRN|6G%>2d``zqpG~tfM%yz`Cbd>)x(1*}_$Lb_e0Ovaq1^n= z`u(Z_cs>B)#m_lEh@}C7k8(C&^Q#0T@b;qb*T}WZwX7dL0Shiq|MK4IiR5P zzHn$Te|CDYz7-uHhz37oND_Y`00)SsG(c<`2x4L{9K4_CFKz<}R z9#nGnwjG$1+&2fvN#Q-iA=pXb8*V@$&5v0AIrYCSotJiCk+m=XN>%?U;ryp``k&HY zhC>k1weJ`~-#)KVkVlqA7a-lGI=4rC-1y};4v>ZnK-9V*H>wxzd@DeHaPmXi$m%oe z?-~vhKnRk0Xn7a>St5vFULabK1^D|ET=n(U^v9|nju>Jy6NgJ1@C&pBwmHymQo}cb zSH?Qp`ez^F@A@?dm?-lnXybQas$YEIz1{feBW&lFT+BsU|7qKIT1QXS65)a%#HpVk z($C$qhR}+(JGTbV&38S}#CP}{ROQYkA{0)-UqYm1hb#dib38v47*AhpUzVl-of|>3 z&oBa&uCF^|!P%D|#h^%sw;G59F8|)58*6{lKFEQ|=eXqyfhR-Y5fGbMztG9a@3iT~ z-RC%@{9DfN-bMX!^mD*k(9>Ng;}6Pa7m#d>%{OXh$ltcZACa>U@h5$zrMiP}CLD5w zvK+rQ$m3(U<`%#mNYhs%aOW2j5j#=@%Q?@(UZY?M_ZGkmIYThz8v*u1%h0~T9^|`W zE?=#)ee34{=+OQPG_dsY1rp5U^m|M!u$%AOpU87gfT&zouP+Id$pbj&8{uzW*~ah+ zG%H(LUoWqa_`eMBH3131e8_n)U&GnmV2brh`u4BeCZt-Poms3s){WRv3To~<@G^uo zNYZrU%FOA0wlds;Nf zzyI#tAKag-fV=tR;`=OvR_`_Y`=yXixj3JQC{2rZIo&1Qm;b2svOYT4id(dW>Ove; zct_G}(MfUS8;8=)aav(SVQq#W5T@e%od)$d{V>I0GXtb3aOXnozEWnEjB9)4aGm-plj+1t@-TOv9e-iGNh)#Vy5zuvu26KfsS4=tIoxf(VSkk7D z++=!M?TBG;XS6yc0S}(!~*^dUk7$vYp75R}lNvy&G^gh{!3E6%rl2nXS;XPvTBt-NApx)TI9p{GH*RhN)4TY?TQY-$G+^HY;vMHZ~L2EhcYeOIDUsT#eUPrC) zK`hF(&1qK(R^#+e2?r?zzOd}&83X5FJ9VYoJE`84L61PGSX+3nylsN#mdZtH{RN>eu?Ce4oxyQFNp`QNn@E=6=aF5%9rf-$B`H{sxLO z84rnLsttIR{ZerQJMGo@88Q>puk_$F69_N;s-&D)#}?J+fJn+oS`ikcRbxUj6b$Pq zw^R_HdV2N~9cHpc_O5b{7#t7Gi3QeJl7O%do(4{BrRvWPDXa?l87u!Dl)Lp^4Qi0V;(|TQ zU0M+GQD(yRX7$}x(5qoZ?qEMTGa@Zj`ZN(fBIaAJ-H z&WSt>TzqIAni-}K4DULlcccRt3CJGnOIn#eImS8}2pR-SD%ZNML@d0me;ClLRxO<3_Ept8+9?_w;sfb z$yctgW2I{XeFZW}m?l(M-^Xt^bkEFlT&lr1Cpj8juI}&%>Npnr*bw!#p z3da@|Zsx`Xi!_)$2=_T1iDXTus<&|M5B;{8)ES}%h4}<)uO5zx7!$g+^6b6tNssR* zZU_9y`l`N84q>=&tZp#t*_ZdO0jdq21*9y#BfIYB3EQ5CL%-*4WI}?SPcelp8}wwq z4eVN61>lP#mIh5?8hps!YbQkV=~5tPf*kkhUteeeR+v% zi411fy;(LLWQtm9MQ{ z<5A)tpy5z$%I_-U5|w=i&?m&EB)K;7G118o5n+VXKW|7<|qdMeoP(auOY2@Wn&DOt-G@0@ z09?unPvn6(SQdDqBXuhX--y$Q2>iAycxX5rbPL@*uu-)(CE)c}*u<(wm-iDfQ1NmM zmRnLJ8gDnw4*V$zgx=aTp-rAJ87_0W(qFpLoNO%+KV0(joY8*p8fus%gST(1Sl;O;FO@xy$KVN7@1EAE+aq}Ui}RAVzM%!9mA`TBD(2#Cl!!$X z5i<-?KghRO?-=SM!%#{b6ECt??C9H^L<#ypS{~OyJjue+eyhm!gX>5;+L2i z|B(Wh@oT{ju|jbU+VH4GFSR(T-U>spp=WuNQY~EAP?D}vau2RJb@{TTD&~3gzP>!* z#?+ud&M>I(qY9a7y?m<-M{Er&jdI%Dk&aVQ#?zqI^*6L*Ek~eld+j{l+oH(Zd96^z zhb#Coad0)U{G-d4sIzIApsrbD$ta4tMt*Q@CBZRdsfBeHvV!f`l*}%jQYwx<^3JDR zi!r;bx3$;@S`;%&Mm=9td(SB}oj%O0r7_qU*d@P_md(RNfTc_kgs=@(mlt;0Yj3F2+W5+Dhn=s_>@(1f1-;`v=MZ3tL_`Q9z2BR_(rbLs z{&I9mu*>+~4q@HcA;jES@slYj-K6eK&Dcx^xh${4S4h-mWE-@%J}rJ34V?QA^h13q zUuew62E05=-GT@=4C;ivs)s{!K3*{kxXrY~LPPw#Y`^{y+N%j}R6xXuJzHoCpRyE+ zW$wN}1OpFy$FU<0rzPmAqUU!Wk^_-eb#G%YJaY!{;ZA#!~~&k_5pV`a3N&Viw^mwuQ^5-MbA*UE=8q9q2oz zl(Dp96E^ufu5t%{W)A5#;pfXnXNET?5ns$HugW|ylxUG$_;so`IY$#EoWC^(a1$z% za_O<7lZQRndR9|eHeyG(4INnZ+-Q_W%JwM>>*Fg68`*q4^r$z;{h^h`UB@O@QUkfR zd$NRn8UceA(^iGti2I@Rk-@4kWc}Mh9+B^=VbaN=D7gln|6uv{oRVe>DYWET$sY2E zi&SA%JKTrCS^5PnymP^MJB$jaly?SKM|R5rJ+O$K3Qt=uLh?{_vWRvmk*NYu2CJC* z1|du4=n0K}*_i#YJkf>(pC^t>WrRal&)9)|U%HnGYvP;X`IGi-zA8Dyf5fTC|1eF} z_3=yAePhuDLo^SJ3O2=C{g!L)Z5K%CS}Vby=pGgIL1L7Q62m-Wtr$y6ju0_r14-7Z z6fI}j?|8C#;~a7A=C@q~Tx?`Tm=ZPn0BoZ;sql{RKl&V}iUI_-BPYC=L{wz@=bkw026TbFgK|_Dzb! zYMPG-9y9oa7e=J?aQ#)FnQj3jm(#5%7DyvHN*`q{%C+cr0{v8+UObK10CI|25@oX! zJOo^j(Rg~0Ws~on?1dMu~F z@6z}1FHX$W)Z~p@r&cf8^zo3V)R6G*EvA3I0LD?7O>T>OWf(RMGzsKyNtu8Nsz{Qj z@V-K|C!9b6-R!_P(E_r>1MzgX)N9LGzFits2@!dEwr_EtPt%}hn-CRvoI#}o8js7p z%!O|-nEA4-rDPm_FCN$;mMBX>soJA3lXISgnIY8FPuW*w|};H^@<5#6mlPHI6CBG!DwF}AzPKA)ZCCX|8phCa_zPNhli{k_|CV!>t{(2vs1b5iRd7oEMc1VV# zwk}z$+OgYw7Z?HJgx8in*7|qhXiqYKdDYG4FD!gm)tZOv0`0cw(g}B%bki)sxA>M@ zKO_a0;{wdagPyIMmFW*NuAki~{0D65Q7J}Mwt7U{Miy*5p9rxy5;61NYF*EX)K`78 zJ!sVbQX}EYW+0IPbJw`QRQ!nS!Voos@Uk8~vUvu-&Kh3JRAm=t@F>df>i|u&YgTT~ zWkHJnQ2GsAPw-Uk-f&)jszpNPhKH>Jy3l>#unlrs%E|FmsFcM_C~!>+#nQFXzh`B; z_o8F+^k@oI%jw+#zUcK0cWm^cDFKXf(VG=OqL2&9+e5nYI9hb7%~qrG!l71+&2cWB znG)AmSd~32E|~=EV3a;pnKC0y(rtJ1p~No=K{}fd9+9|?13?9zkW!Q>ukBXv*knt} zrMgTSeSItlx=7=_L^sjY#(U!2+q9x-I-V=FxyMfT`o;^tWioxeXtepT0PMmY05^2K z6NJF=fvh|t#F$$S+iytk*I#7EJz>c9oP0DiI?F>X9z=}LsTqrSXE@b4B9>jy&O*YZNvDEK|9uhsD9y&=KJf`}d8Zy!96cTY9GK*6N#*o8XBd}6etM)F3g zu@TTN^SX>o9!8DiZ{FiPCUl^aog^PDczkmzW5^FMY$zq`F-*xnS@}BTTrSY+_PwoN zU-v1TIss$uS!sBqRNmMugl4I|b2T{Io)|8Ap+pU?-D~pF{HOV-(RNInYlC?1WEyWT zn&yM&N^^PT1jGY%JH(**%`2;bCbM2o9BZj$`e=T}kBfBu?g>X(pnYBDC$-~CzqhwV z2?-M%{6|#%g_miPc5&Gdt)*2$9K;9Sq92uc8JJz3<-QGE-8=6T`#)N9Noigsm=%;| zPQKZE9e;kLL0c%+6gw(Oc{fP^bAzaBqL-LjdP#)?scTV-pavFiAL`U<2@#)sYC&jU z`YlbxZrInBHdxd}RKDvJ`Me!ccDFhe991opaFQjgYT49R*0GY4J%J3caf+Lx+ur*R z;_pq>C1mGlY4$LkF)Afq3fJ`+n#&v;dLf5yz%8P_Ay?ktYZFv@1&fxs2)<>x1)`>B zq_(zdBKuC3h&V+IzVBBZ6dK$| zFvEI=_*9UPr0B~76+t}RE^{+YG8V6z+k_;3`=Gmr^L(p6llTT7=M4f+8eEspPi26p zZeJjxr0Wd(tJ1gUiBA++N-TrMJRT&?F@!9ageoK4_K?@;T84B3w)iZN*#?n5e3;$)_<@n`A zYlF=&_Pw~DL54?nbkG~MY@bL9&4k8*&|nEcWVN|>>{1B2glWNh%QyT_+(YUHj}Sxr zv&CH0QjETs(~Y{s-t!o+rz~oVUj64ouG`|7W^YCo3PY|H*Gh+}#Nxs@kprL9iZUPE zsjAP+(IUQMIL>gdn_7_+wbU$Qgjv8i4j>d|wmaJ+(zOUCz{|Xm;E3HKuJTcu2!+@! zf7k(NUwAqDgarB)^vTXPsGvm@ar>K<&)T+^^a!z>#?GCoATamwVaLzu)SEWVCq7AM z>Mqw~5>(+`V455)V);MaBl|#qcj>fZn(WUI+H-n|z^Lw;tbV~Bk#_5$l_B&2hr4J9 z8BbPUjf=~K|MZlh6x^V*yvnQAt;vlC8MwG4U_x_4wq6T&EZ?>)tis0i@h+&l9z41{ zo49wbFSFi!U-h7UWn164Oye6Y^b%zqH7Ov<9lG*vp9&))Dsd}BA6=fvsj64YtBAMg zBl&x$R30HyDG^*lhOhu%cseTpIJ=kbcbg03k>`j^8CD$X(Eu4b>>n!{MJhXrk)zc@ z&gXK>`dsr@~#8EYGJFoA) z>?(Sfe2NBJ$Cv@(jjDilB~=HdB6($}!)BcSr96_SJAF2C7`Z(3^ z_hb;NmqnU*$Xu33=0e&SpmtSgnl-u+b(+!g0EmZgt;ZyVNsOl%;R*dD?h(XzV#)~y z(;($jr^MSax~{fO?eFd_zKPCzf{QdsvMAYY?!b@uZ_|z-S?FMjkR!r<`IZA_nd9^F zatSjX`CIIyg{B` z?1fIjja1zdv}!J-Gqh2PQsmV5iVrO`;1<>N2|~M`dZeSHv6wma^9fpY|DK2zkPCA1 zCvKK@+shT{f<_~`I|^lBQ-EMpeESj@l62FxXQ!Y{z8xFw*Q{LfWv>~4%t&hv;_c0S zblK?kimX=6;}{Pa177_u;Cj@jx_z`wqAV zr%aZ-Lrjm?qmKRQ#mrh}a(go%%Sw9Ayd+)=U2*8nJ8!sIy3Rp`R9RuryYQAV7hP)N z@^oH1sLjT#MdT@3~-0l?D^DA zS^%n!P&qse6H$upgnmR2=!#`5jn~1MSLLd4d!mPIFR+>Yt`(eGHY@tZ6=j&(};&Y&!T%Ve{!Qh#vW_8YTo31?-aU#c0*=|bK3p+ty$Fhx9 z=L*h_xA??f)cM$#m|xAsbzilVcE(-RBbKd{Qocd}fL!c6CC+!_l^nLWYwCX5}BGb3MO^PZRb-m_pwY?-YX zAu~}ag@wKCD1~3bmE`L7!KRTW4V}wFWn96mN)t{i!j2E}g=(vSlk4QIS#eS-3YR9u z8*Ni%It_7(%GQt?zG^t#Q=@Vc6#+pfHjk@xayA$%mlTO5(OsvnQ+)=L1<mh;TP~GpNvAwwr}T_PV3KBFT5}SFl}bTABX(C1V4< z#q7`{o+@?t<}4zg0NsAL@MTXoswAVh@(o)~o~*>D!;89eOb?C%--|ZOhZ+1%Zk%ReC|d3Coa~xMK6k>w z=iVZgZ3UsR0J${AmUUIx;tHM6i9mU2`2gh)_5dg_BUm^Ga++LqH82Mgf#sb93cBy% zGLtRRgYu5P14b%Tg@F!(V|&+KF))$+p^>~Ho*#emG%{_+L+fb(qXKc--lN@9Guq<# z&IaDYY4S?+$eJAWTE7cu-)mk%BJH0*n7IQlw_O#G%~anVI*WR`5eKxo5T<7%uat05 z7@v0pXmt>>G#-_=yyH>ld6n!$`A#eHwKn7Aru++Fl3T|X^s_VV!p zPnLfoLZdmBVLX~~LxSOp6hT%DxQSU?u8eti>2*OFGBffRP2YkY6t~Eh%5Mbpq2nESaK^D0}l4V1`SdhOa{v9~Ljk@)5}+MH{yvRLJ(_WcDEC z!iqqp33*iQ(a*Eqw-tk#8GQvuaYk^}wC55U3%lL)Z_3QfI)lIHaIP71YEvYSW~n51 zD^sQnzJj*9VAnP0mp6Mq8f8K!%1N4ckQ0}I9p6U8y${x2+tvj!0`lZX(MFv#~Fo{_JYSusL{!ST_$#` zQ}@R*tx)8Y>@UrsZe1o-o{9-Tlngn#XlwNIorX5uXv2Ch^r)SQs-Y|AEy+^MEDr|O ztQa(xT3sG|bw!J4rfl|J44Dnci8`L3Q-AyH(%?-b(J>W+4M%32_Ydop)t0@S`4o5G z{0vU(&WSFLnm$osOGCn8s!MUDH9UYjFTFyyUET%AJuYxx+phsCM*OGuoZt(}%7rw)@E7OhYi2#XK4IC}azTnF&@bjb*Fh=F8t`4WX9rq*`c|K+bj~^T4V#fQK$2xQ{<#aK{B?(!WWsEn8}-YmaYui* z^%lOBEFX%X#Xjmm@Dadhtpx_y!m=x4*)GAL=32{sB#8fs!x~K(kD&-Ny4%mV9`cyn zsi4WAaw`Kv*aqVyM%zN6K{UZrWA~7qA1pZf%H%XPGY_w*gB|+-QUl^+jlyH0*Mu{- z9#2=N+KvcPzVPUrPMT`h9r9X)g=69%-?2Ni`+fQ%IN(i+d9-*y0bmF|i-ih%SV;S9fRH)YvEIsBQOm zclWxUEU+yWKydhqL0PNWAZOoh`I3GLN?GHfKg06tNE#Do(-OVa;>3_1Av4lFwha;- zFVN+-+*Ff&c=bu?wY&=|UQh5!vNRx>Dkne-H{2o?*!l@`cJLCP?Osrc;{8O{P>Bhq zJ0MNvy-Fv$H6CjEd^%*i!eXNokh=t5<%gI%Y!iw4|)=A5oIuvtidOa zQH^hq*J*aj;clVB)#BSCf|4~!ro2B`<$rF=dlh7;!DgXx@jXw@xM)90-VPwFg;rPc zi|uhZQZKul=*S%7*O^qn_u8W3q#5_C!@w|`scGuwzyhfmMbt#YvopR&o5;PCm zq~msYGz)E$2wwy)9Iws4@De%^v*aNGz~~ zch+6=8C~Bkt1ik+2LkJCFLyz$KOZWkD6m(Q9L4$5$41WhB>b#i>p+0-v3R-1K$wOP z4lBup%+Mtxp$nk05f>~a#m(a2ZdfuoesV=58lJ(ycQ{3=xX>_>XzVfhGd(nlk-Qn9 zxscp>VfK0skxKVUm+E&;^BRO0o^oxov$*BvxyLX?1!CK&{dpZ;8E2=jI*w~48Uk|n z4GGQPt5f{Hmb~YQfFoOX7K^`kjoy*#e7ira{&peOmb&PbST1BD9`-}mdLXBxyM36@ z@lmX-t;J<-)48%%@Wdj1dPm?8?U1+50BeNC#1^@vKa2w4OKs@KhD z;kC;*Nj~U#%s|8>hudGPE$DNBHxgl;@h_qG}FY0LmQdqZT-fUM3 zX?wp;+j+Qc9pv&gI?`PutLV^C^rvUlhvY=(o)hvdtgYvsc1zl~yZjS%JxsJ*Wm;H+ zW_e%OaIeDqY@}rGbQJcN!RK#?iQl~180^<|YF3&zP2{q&(V82hR_G3~j@Rs75Uu)| zS(ff`A5R8lb2iYRY_~p=9-ZY!yaQkMDX$@H_cW2>x1*sQoL6K7tGB?FbF6;nFB}35 zm+_LGy*4=!l_{ebW`H`wrx@G{o*?1SqaC~QYlw{O zvnl)>L~m-{?Cwpu_7ly>#O{3T$kquiBRn6b{e~M=reRJ*axP{X-b-&kckh#I~gJ(5}%(wuaRJBTHs!tb-fDauen`x8U2R2Yp zgrih{prf945yR2HMJ*=!P})*7Sy=*8y_8i^j*OoS?2#~6Yz8zo4gwjRaCe7+^2ydvuL`w6I z&S1O}@niEf-kf3NzgxhHwANjo4~2M=Z+>yhO~xM{>1z5s-M?ef4CY(jiEs^t^;2?h zsADU&`RXTgegR)Gn1OM$4?Y@7`jFGukcDV%MU13EJfF5Jc8-$vcK)z840HPU&%9P* z;+Bj2?oH#aPq{EtqLYBTl3^5UFP2=tatoxDYDP7VHA0Jw+k7S+c&b5bn~GdN2ZrRm z-0HXW70E)5RRYUZ2oPk>NP&wO-nxBB<2p+tuJo_uic0uS@?+tT>h;CBhD6g7&X_0m zG$x7wf%n7G()=pl>(hUp}e3BOi9F~+^`;oUH*}`KaiaJBj;YRwX zr|?L5EM``n7w(6}K`j;!#g;Gc)#2Oxfx!Z??uG)j#TRdx0WvSD9-`1so@1%o7Z1Iey_VIfL$0S+g2S~u zIu?U_2+CO3{KU0jtKYy6CY4|lk?UFL6K9Ikgx~k2}c^HveOa~0=1@7 zbSPensJC1A+Vp`Dnpoi8{3LY!+jqh!?;J^FE!0Dj-V%hLvhj=_vaQndHWuNSsTy6p zd@ygsCD|ttDmV6nlF7~uDKX#+xs0hIy(_~zklH?7%L+~I_Z*aFd5`FtXCeDNCFw=s zv&EF<8;4`(uYQhy)-Vblyx>&rhUwmwg7$dlZon+Xs^lHct{E*o|G5%|J%9wixG*#Z z=li1z#Ab6K&*Rz;{~?`N=Z6(#LyM$$5j*8}L{oA{i?!IUZTFY$UN;7KN4uyGF_R{R z!r;Rawezc{3Y?z_$9c*}sM@HAO(mmf_53To?S64DqX^$GB)sehnG`(b`wT5fbZdGf zbmf{^O#9g*xhB{DiVqxC=d9F)FS@4R;(qm`Td=UDcT*=9!vuNs5Jmi=5r*%`kH{4A z68#0kD)Pd`5qb4rzh!TZa%V72GYn}GLfnKYj#ePpxO__{`oyr> z>5r7e_GagU0=7NgO}|nS87)80xgbgr{`+&pANAyt_4vcEY`WApn<-c7;_;0yA{y zkkx|AZ4_{I-epr2=6scc%-6xV!RW6{e-yh@iqG`Q&ucSQon5Dwr#6e7}Oc+s4^+851ficrK)PAuQn0rQG6<1f&n(2 z2pgLB`3Cp_z^Lf7mx;q zvBlYf5lN6gTXhpg*kQ&^W}%f?9)=8Q+mN+0C!XmPB+xHeJVLVC;ixU@0G>c$W&QBL zfQqJrQ{XI6_uw`nbaK*9hxj{hiaUJrk5ms+a57nJ0 z=S!**tqUDDjtk@POP@Z2fNm{#Nc-qZ5kS1yhk-S6-9G0-_$Meo=%4)~xSzA6p$uq> zG432O*l_gSePBnvqYvG(?HMU-3Q3P?U^3*SjN!6vqrS7#fIN;`+dS6O(bN)X2_qGi z)Zb0K%Ux+#Igzqr@p%2jeCvFsw&bGPY%y^qJ!ouY_hpGI1~TN^lg^$=b@^L7+jmI2 zg>}|4_?@-s-Rrx$=gEXAc_o-h1dDQXkR*Qo>=VLkd18 zUifMv=ObJ|MH}>na7cM#DfEd^cSVwRPj2Px$*5VIQAXt$jSDFTLxGP&kankVm@0=C z@}C`a3|oGndvW_WqlLj7$P}S}FYzPz2}`;$*MN>`>@S8m4e?G@$E&}$d;@CKCi^}P z&F;mI^Nr<8-%STTyt;skP(05@suyI+390Vq&Motu>_kT6X5}u4@&MB~A}GHa-_7X$ z`O6WSE-v`DEJ<8Pr{2zeNH_#PgR?*9}Z zG_FY$AFbMwUr!TqYfPrAx{M{eVOBN-kR;k=R9+!Li#<>sG*7YBd9qjE)qoei$^3cT zIsF{o_D#J#jPD|LrJJ?A>vA<-&u(~}b`?ZP*~N{lk96kGlT&Q3a~LeS!xrLe9h)CL!4&zMQW4c7rO$CmfKPfr?EWCW4gDsUyU>EgLh8LyT zT%;Q3T>?pq7L!%HZM3U&!l>igXv!k9HLkOr1vM$-XiGg{jw2SF>L4C!`#Y7RLK0Hg zmOZ__(SGvu9O>YO1I2m#7KEx&oXH(~D|{TBe?oE)s}JttTOMhrZz3tziiox3RmRzk z-Un$FF@vYwdV1bPqVh1$CC{OYo6kfv-S7`kbauE-)~ii?sfVZLTq2l zA4ee!U*$V!-Md!XeRllJpAEX(k3{0x>9+Z@4-|r{pvx{pPgU=)tSLxXWHp8oJ`r*q-X)MsxZ6ZD**HOvcXdAeuuLkY%i_8n;`LC;|8>j>|oF2DBDE_%f)vLGz~$h1 z31P9nKeH-~l|sTMaxkc-gQuheR|Eq{)A8+FdOUk#5q>zQ8Ae&)(G;rcfU6)t;>ipw zAQhLTFrzI^V>3znA*vM;vDg08#FI&s%g`n=tX;>pN!d zGGBY@`xu?NntLvEgrU)j;ESg^V6xt!aL}B1zUt4zfHRY@C%vmRQwL&^?mqiNwJyF~ zwy@7nZ)o-08dzoaImx!*EfrO_mX zRK6Emk@r6Qv1^)|2VuH7%(}|gfs2x%+$QYESjfg7YDHo8By!h#C%hptd(*JW?*k_0 ztJofVd{}U>diL!o@~9~>obk%s?7+>67wuC$b=e&6NJ&5c*YxlWj3z%C7s`$gRhjSh z$1iQ=F&=_g^TT?;TYSWn6~M>98muHb%4TYZt)$b;*$c0mU z8Os@u`syZ3VK;c&)V}*^8aF=EjBc-v7A4Bix*(VAy; z>1ChzQgiw^@ZJ3Atvp)`2k|4syUdjX-g0#oDH*?3{9X;+F|@bTiqzw>b8=@N7IP9* z$&aoaI#A;@#EUMTSCB4N(q9#yy*96_Caa}mW_7NIt}!nSciOo$sO(qiazkY?`5$C`_g+H16l9>E zM{MQF${$q!fqM0+fPD}3GI68i`pS)#j_xx5n4Un@u$9N_hwn&FtL9+LdmWecRS8aiO6;~;lC2#UR(^DZe%#Mie2$dP9>g?v$3@2qd8MjiZ z)k6@mX-kRzB&0V}`{{`|*eIaDE1bUQdGMtvbdbdL%Y@Vg!B!42CQC9v6;7XG;U^7P ztMAvaNiKP4{oNgBE{mtM8lFi3H)4}(F%_~<;^;SMoxXfB$V$l=z)>hgNjkZKAq_oR zQl=GWRQ<96xo29pi4+FciE}?m9_j=8rUHDf8?YNZbW%Tz8p8nwfc`Sqz`V!Ywd^5S z6Q-G<32Kpb-%@mPeC|AzFJ`>Lnh*1d&!^)%=Ov0k=fhmVm?h;e1qvSnP06F!lXzdI zYhfgAd6h8%Ma-{{s5-r-d$PoHo4A=&^_KDe_8ZV+ikq|X=_r`W8H|(xU|+3k;M887 zP$u8izo_SpKk-J7B@;(MPn!sdbzkyMknla^KZEk24Ca!Q1q{<|2h8OZ~532k6(kvf4Y{$sK1xu$>L z>(qUv2u{4J5Q6jsvT=pJkJP-y??C~j0Z@hbO;=WV# zyD6B^!i*zjK|0-VuJ8JG;vFo|M348iJsqRX>wd%HCv>@{+`3es`sRA|?H&%d#fiJl zcem{lEu8F7H4Jcc$mE}gRXbaLTGIhrY`Zg)9O$dQD>1HS^UjgReND+Qb~n0%A})_u zE3BytO>k0!(A>JJMgQJ&Rmn);r4q$qFa)J>U2wM-#lrRt_bt6p4n%k8pVS(D{T zrAKQD6+M#8*pNImxnYDHRk`@QawDKfl8{asS6-hNm#@aX!~%8IKeaT{SjVmRq3Jn& zf12-ht3aX5D^QuCLGYEB0umvZn15NbBts&3#(2wa379RW*XOynExa2m6wf zr{ZG;OEhw3WaCtpZEk`{I(1c&A258PxVM zKRn;k;c#H+hb4Z&HY`xWNA#1}GrlT-_|a8Bww4gr(F#4H95ng9c)m5W%2`5R7&&G# zNkeRO+}dVHBW`JA?gJGW$=Rt`;ba1zbs$dMK-~GYVcs%4TyA=byL5~DUPd)+I&o(P z4cm$*1H)zsshYXNOYKf6IC3qAryhCSKJPXoW>|oVsJAv<2xM>(|ZIOtmdLxN#n0Zostiv@ja^bT1B4_(hRYB z)&rMvtyJx$@ofr@Y4vfx3qAL_z}=Mw9DWSWI7H!c!_i(jhgmai4j2@%IDB#sG#saH zHH56jQZ-&Sd8I3S$Pa)*n6ga7nAEdt_tVLA9+)#93bHQ`NwtW&5G}M#wq@U3bW$pR zUAPcDiKqV3+Q%iKOSaD>0F^$jK8(NMb)WiSnv+wAv60OkuwR0niO01+*@S%;TdVA$+N2SW^^T+#Y+qQjR+~sM|A`Jyn5?PIsyjZlffE<(z2lS$45wNKmr(g zho;?FU2bdv&|fBSe$VT~1oD#NK(s{FJCF+IuFVE#);uB6^MpOdOM{1#&|^5`O9~ZX zRpHbVJ=k$Vo35R%IZ098;E;LzcYEPdaDdWE4fDtuWf^rpT0IeyI(?YMRH6d7^by7e zlzj|AskOgurlD^9xt=;=B-DabFx{Ls!2x1UDI@knyVlANVU|X-1$C{^IkG^2FaNZ) zp&dXJ8aa6%Qln?mgH3^&W^7Z;0lvO9fkd1IrbRGZ4RxcSZIYCSPraK{T_tki2gfjs zA!o;n=>|;7l|j7TzJ4&9Y-0`&7Zjre!AJL;^I?mA{yezwj9qF zss`T=(3K8%$US!%l@}fj+qdGp9M*Hl-?1~cPn*_0LAKRR`$GT!1PdYb-aU^#F$x@} z{qnXW2Bw2N42cl@lI*~zjKNM5ef@J$i}5;Wy*)UY=8S4RWE~|5rcNRaX`FW zq*R((SWK&7em$#D+&f+P1XhG;lo6y=HD`uBIw+ZP4y-jw^1|!z$iMlpzH{qGP9oNMD0_ zea`)k@Nnwcy#6TNRAP2k3~1$W=AGY*W*a@mRpOHf!1D0}vUEKwmDXm~CP%PZ=CmXX z6fg8H_lE<9Ntkaguh0~vJXY0j11NYJf_Dm7GIC-$Y#%)s)k{vWjNES?RIsyoV)H2K z>d8Vp#P$~FVaZ0ONMCeJ_g|y#!*@-lK4%_l_DlsgR}f}Uj7|QW69N-5Ef0F2rOH@| z5oI=$H2mG5ui}1Z%7j<>aTZu~(4?d1=~)V^=-${`^z;3QQLupLq5FGgL^z6xjOi2& zln3w%TPf5E zuz8pXn0!-m?p(y8+9S`zcjG1Oxgj7T`C|-Uu#G)ULCZn~c{vGgz9I*>GBJV(vOGNs zFK9H!UACU&MKKb0?4d@NQk1kcA#{UvMafX2c7AO1sOEY4Op?FYaXlsBREEosdQays zc7{$Jb%|9WQe!(1oH~4V6dofkFtOgD9Gacddfe6Bw1iTM>hoPikVzPM?{0&H?OpMe zJ*1m^$*e(Eu1UybU(dRMgvZhzybD?x7N{BS`s&Bv%f(VLf$-c2(k&W?39}B3lP5|k zM;he_!o6T-+@n?^s42#mYQH9g37TX6gj6cxdak;5V5A2BOL7UUlRLhL1{&3(j7ZY{ zW@%+6T$t=G1^{g>Tt!M<@{xtqC>5&dJZcwf-~$#wtzUp?WL~>YP%b|#pB~35c(rbo zyX0;cgS@>>ww=(R)pO|aV?0>K!gsa?O_`t9=9Q?sR#o1s44CPwKdj9n^u(fA59;mD zXc|sZr!cFbKhu-z1k>nG+S-T5nNsREQQ!YjR8l(cUZ;SNOgB{(z`;;Yv<(6TnjOi( z_b>vgFVvtM@d5|WUoz|R5*p;^j zWL(J^Mi#b~p*w$)rfx4{fs*ZfgkQtJaeqZ>hV+<`o!l_n@bCdL zx_S@-q}?{*uDG#%Gpy=cxSxxcctOKHKG}EUM@;~=7ygbHV?+=e+P#Vr=i<$d2BuoN z>PtMPxghejKx;FLo(FQl)k#<;M-MvJ9Fk%$CV{Opan!#IaH&z(uDO{!_6QLa}z7KbcQKS+br7eOR*73W}EDtp6r5- zPA5zM;b^32iQ01MZ0Bq@9jB@pRGvD*zu8Lk*KUd)2VGCVT9RAEC~7t$Ne-li76`}_ zc2AF}^`a^L=~(+wk1Uu~i^<_S8)rbyEB9S2ol`bc!}WZ#eWee2XI|x(AXWP`fou*K zJ#$#4Yy%j%3B${hULQU*XnGdeibt26>!P|SFRRDs$4S|syPI!a*d9EDy6;=hd8z*Uj00$gdSMbc?Z8r`xa{)ZQof zh^STZb{8MQ_@X8M(1?l7=J+;{?5hmyq}maJW6i8*$^e=?)2nkcq&lv%TE@8i&O9k{ zpAjCzAgfO{<4i2R)u<*<+>L0!-bXX2iSNL^nyq$!K_F8wT-Fi@ayQig+=c5)#;Of_tqo!z^h@ zZ&$(;XYxfOdmpN(>DdgHmW%TkM5PcWRlQi<#OjYF`p4ATMIYgkm(DLAHLGZa)Fo#6 zEEG-W*N>poUMV>1;USD$!E!r!)d!S~a|`)8UzbyqfSW$2kt}jm@xMlK?6<(Tx_*{? ziTZc3d!&(=b0b}=&uWff{t?iovLb+w&j6L+kYnyM3ya!>vbGVrM#_Cat!3QJ*!OX# zag3c)b0%E4ZQt0oZQFLzv8|46+eyc^-LY-kwry*7ovMB6TznVjZvBO4jXCGAN^AXn z$>%I7eLH^pD4FN{o%`FMHP&mwtas9(`Sx`m&EU1!1V*cD5I3&bM%2xv6~xPdg>6wR z9SnjJl-m&Jd!_LBfL_%WLANG;CP``eUJ-HYHKTE$1che3qRJF@TP&)Ruf8Z@lHh)9 zO^pOXv<_p-BL!)A%sObmIWRn*9Qt9y7wMdS=3gY$Q!VwmJ~NcmN4L9^d+?(al#xO+ zK9k5xmAYL1-F^6&&IkkiWr^<#jlUe6jVNMk(R*UVu^B^N#_>IKGJ1&Un-crFgvcb! zwv$Ou@`P&X_=HICyM}Uxs2kt9W%=y#@qH{FRxYQe!lbU?pkW_DvJ7uzg{_ipc(W%T zU4L%Kn)wRH({Lk#xGV_S>t3vR(pjbPO1~Vbpbq6_!cmWVYpp1jnR=~FafzsUQekXy>W@=bkX63#2D_hutVJ0HYd)pLAy>kr^KT18zT@| z3#a#~Svk#f8u_;&iMH4}DTEsg75kgRLG^qMu;`?$#YvnTFNo|Q;X#2W zhkNw}WcG&HIg`REIja(LWeyHo_3_cW271c1-{>g%8B(v9C_n)ph<%YHqv!OM*lXSF9w37yp9<0sU3olOr;oN86wAO=bt9=on(a-h* zMRJ=Jtedc3gM?&($u5?k_B72F(npgAOhZ}aDyX`eol&uR|GMBao&bwCtt6 zfeu)*o=~@0RH?(rYZ|{e&j`adGfdxr{%+186j2G4o!+#?-VB^HP&QongVw1*b_xG| zaVMt}>qHarZ{9~4u9^{NvgqWlaVA%o>v*N6Rn9`y$Q&mKME~=&$ z_9Z66iJ_mGaCwN+8>x;Ub+@9~1G=@IOJ^MQ1AX*A@F&-r(qPkT6HflCJtoj06ouN} zKhW{mVZ0MGfB>HB{G&w;!{!|%V14Gw5)Y(`7k3(!C*~2OOn4Z_5035uc#a^c%0h!& zw*}br+Vc{NT|G$+!UVz!p(;`eUP&=D_=M7|)IeyMO@el$t>7Vc_5+)$Q+fyRiOC%B znnrr^{4q|-=eG!-Uq0cTr+Qr91=pWKc&&c%&blU3@eI4cD^0)8IR0rpEuiMDGD78c z7)k)igli?AV*Dgzg|(PMTf~N)A``s2l5K|`g*>!ji+(!sU)wJOiCxS9tV|BRcfpDN(?~*mbPtbEYL)+Kx_66#c zkH%7&zMk9KSt_kkdQAk}FBY?v?- z%yb$?!xenm@|9imQ9*Y)|4a+Ikf{EzUwD%o>1a7!3JI-*1v;rn0M9z4CuuJqqIs>jp&JmTsA#PAX6QVjIz+MLG4*igl=721Md*}zA z-^WCA)G14zbOPL9gbZ5hB4Jh~lLMh*HJRN8cwT$JVn!g%SAIJX-z|BaRBKObrGQk% zn211I5^h8oRb1@Uw$LNnL}beG#FLJ$w@tCf7GoBjFX z@SqWxDSmVO(}eEx$iOYp4-1!w!Z*LE5lFm2e}eZaViMYFTl6iD(GhID5%L;^&TQtw z6^>E*7nn};f+)U`6nkLcNNMqJTIYJe#=H7&xqyGOcY+5l(mbhQC9<{%i9~~Zsu?z% zz*8m<0sGMiX(EUI&~yT}gE(S$?%AjGXF8>>_Une&jRBIVXLgP4nk^!r89!N?Tl}2M zPL3jH^J#OF_y#?J+SH0ADpNiQkj_n73|#5`>jsusJ(C2r*Yr{%XMAfpak8E62Aj-9 zFOtuZPQ(E+IG?>|dWS;VShoNC0aiTK2UpJ@o54!t``!jEKc zO5q)TvdNwIYS<&XC0eyAJ@Q$)S!2sRkPC^F-+nSs3_`of);_RAt{xjt6hKBXV%{L>8h@M^1C_ktfo_H6&r-{iG zi0j=+S8v*lRrjDz&81f~Cy~t8RwFDPde%{`+&~SY#%Ddcoz=vr=R`nIxx>`X`R@qo zRc^cU!*k~_&O*u~V$ApSD{@aY>J~3fvOrIBAsR(sh}E|^fB#U0?DN~9T#%PrZ>`4T zp~Nep!kC9`xh2kAprMKV4qXTr-0%08=<=FQ9Vh#`_LF=pC;#`^vqgf6tDVs7e)!-| zA@2WVKorg7Un(OCEq1XyZIe3J!e!8U8 z(-7Z*w~WCVzLYy(^204k_YGJB4D10uJ_3K5ZAEF{q?L%7@5>DX;*nQrCau~V5834Wr^DyxD` zYd?!u4U04oR%Yv9f3qt)Y(gr-m&DKc9=zF3Qw&RWQH@%TN-0^do7%pN*(0-G<=0+Z zXhx3%jPd!2YG&)qrfNzpUH7soqY|Y1HNv#f=~L~&i-@i$mWuYA07!sYK+-}?pIPLaKnIwpf2y8M~XhV)l*=-24^z=OqN{C{@QH zQ7m!VwUTZic4*iE`3j-<$3UY+nDs}jFaBt({$3p>L%5c}W> z*(J@b@yR7tehrH>;MRN+Omuig289r5H1+;YMeV1wTF4DqL-l3GjbEpKQH}Oj-s1S# z;y++z&~ex<$pnpX2*G@U8m=1ftJa`nx<4tG$a$Qm;n2{vpxT3E3c}hFy&uSj%sJ~} z8LN(9x1S|t9sTtkdjP}teC4K<)?_zw) z{CDLIK_eXPx{uBM7Dzjv%`gwxAtnG-+OtX}Y;Yj^fMrb7r5&k9h4zf4kgLtAKaR_qR{GY~jLV^mVca`R ze3oSMc^wi53dIu!K}Z#9vgv7$-12wugu&mCtk0bKUfeAF5;8l58RQwD3hkf!i^Mbp zw8t*8EkTAUNczRxTtN_*V-0S3+2Y743nTq&;mJ zv{|&ZIJGm1Sv~W5tVe6_Ir{s%7xlxhg}RIEyeo8Iar80stkKj(u>Kdtzy%;C0)>lFNNhTNb1vH!Iz_1s>Ijgi>!*XJ3)4+gVqmR;+W|= zNSp-}ew42rfaJ`e+2VT3Ev4e;>NRg!yDlj)kfNY50CV z2PemTgk`uzDIzEq4x`4&*worn*L}A*@PRZ(hh^o~wkZOG|3sVMLQ5Fwm za1K*$FRB|{vDET&7MiD5atUi}OAVnLugvpl&2^5^`|y+X^pA(4AI-`Buot5hVBD`8 z=k`EsH=Xhgcdhjha|aG!$gPJS#hT;I%fp2)LeoT>OH~A|?p92@@iR_T$md9(E={%| zkS&^jhU<3XA%v&ALMGb$1qLhDjOE|xnS!;f(i^<0k|`ivr8T&1#@)06avF2mp8HKg zX)CJM%;eQ*;)&kAZQTA=xfNaIR0wK(rYE*pQQUCKoCFtAbOTCwy4(LpbHduA?7NA+ z+`Um{vWaHQq_)5pC%@oxiQ-FcChi_@=!PwdoJDSF>M;W?{(~dh6Z%m=DnQvG3C^Pz z0dtZT#}odO&Y66b++)%uxvBcVz>frxD%Q|#Gz9j;YdiGS_MWYcdm_}xrWoDsn7TmB zPtBf(g21)^Rjr2YQFMKJVEoRSQ83A+6wQV_T=aUZ4j@=%J+sxr;Yj#*yt-v9oTg|f z5{rnYy(lWCyQ7``O>ucY`Iw^LN1T73BiVXK;+y)MqU_oP2J>7^L@iRoetO-fgcZ&T zcoAFEQ3JB%k@qucwW`x=WDZ87Moe?Hf?%!RLlvKYK{ZruUrPqz>B4QD088V<&~RXi z-;xu5z=KM+*>`iyIbc{Kpi)W6z~#x~mug#RX9ses zciHK4;r?}09(TeU5W&{B<+s`u>&$v7nouzLAK~u{HN{N!M_PLboR7Jzk z*SFB=kNJExPDSDEl&Mq~F`L%qnq#xihwEl>pf1N{erAzPE%??5mk6vwDX(?z`5v`F zUfju8u8WRyMPz|)S_)RH1QcHcVkRmHeY!zsU?&$o*92yu5F1tDr=O|vT@*a>?tRox zK(*>`#02(H;ygUdj%UtuS7D{>K&$SAiM%;g-^}+9KO=`^EOJkEOjhqd&9-1wIq+DH z7xy`Ou8=1o!CeO2UXtY=OH2!gzJTi6*r}Q}MPlk#guOjVL1=K}0ryTB1=rip0ma>r zc|-|nB7^L&aVVhRxFqWKglNhr*a1bCb~b@vsB*x-bOBjBHQ{6AU;*Xo;=0OWXf)bV zyP3`{ZF{9}W}uI~lva1oc&Qa1B%^XSM?zQ&lakt!x)h`j96;&};i24%jqDsag-o%- zj6#-C0!`yS|Jo%pRyP|4wtnIGphTRi3ih_@WEdLKwiFCA(gusi#-LU3 zGCtUKalgC3YE*cUSI97LkOyo#PEuzJ(96jc8R> zgucHo%zg-Ya?_MDF?y&6OWrsp(pUS3=tvXY$(piNuX@9E<0=w5bF&B2qCoN#;yAnT z6N0!cQeK#FB%x{GDDt~kL26f4qpP##vEfH?FQ}F(W?1N8w>VSvH?Qu;)w*}gX<;UP zHN)}FCap4hVJsxDdzsV2APG8O{?OmJ`vs)J4}Q$aA4&J=-(<~>5Xvwqp<%7ae?Zam z-U26?r((}QPe%~u{0i@VDQGFZ_mdQV`R5W=$YEbW<_+|3iG*?HN^EZx<>MwOZ6@?2 z%C%ZRJCFjs9g8v*AKkl;xmrw}-edTol1qGnXqL$#=HNH0!OB{jtL7Q-IxzBG*asyS z|9qQ%7~xn`FwG3hDtwlbFrgS>4P?0mtWmH_>jo>aP&VuC9**7*rz!# zjmpyp;a!P1DV1n9RDEIaJB@oEizQ>QR^NeLB`kIt)~dq_jydB=a= zN|U6h)|U9gjXB1m{^`=yTN;^65ka*Uk$0Rvs$l1W9?7o!v}V@Zi?S_ zacgR13fS@6&qLkhR&81>G9xpKP)RU2_PKX2wK8%j6tAXXJN9m_Lcji+Lng6)Gi54b z85sN^F2&!xERhprEA47EKVJ0yJ7qcp6_h8qOn%lug0Tpu2}%^j!0m^g9>w%ALCo*q zzPi$L*U9ZJ+l0&+jr(HqS0^+Ku#X%YWH^U5$!mVojbKL4v1r#jnH{m;pIUuz-FrZ_ zdCSSIkZ$GCf9#=0GW6JP;vGHkD#6em!0Y1Sm$JIUeTv}KLPd10NvrD5%G8{_0wU)~ zUuitIG%l`Q<^QcN0JL*yfe{<%2*k79!mnnB#c+S$aBkU`wq(Ah-P#Mth)2{b=Hw3D-=iJ=X&`+BrGmWFtXeG(%1J( zj?>K=*T%==gIDg(Lkkow-)1DGICB7*}B0C^fT z!YqPlBLTZYq!AJ_Qer>Upl&+Sn>UvJiHnPkjU`+KAqyAern$WZ@is8W@Ml5=6Y~_o z1M1lYe(b}a-RT9D3IHf$V4fp1LG?pjfrtwOX@u~=0*4gV0_oXHP$K(R!7|0|gH{FxaC&F_1FtgCSVBXWoE86Ysh# z^7huhe~xlq|Es(&P66_HnMt^3z?iw{rn!O$d~gQT^%Da>;_mNrnvV5W@~14 zD70x?aFOiYCIzm0!f1Y5SX-C;?R&ww-62Oq3ufrm7X$@GL_~rB3Jxh214>vG+3jig zjQ(M`>}d)$Sk3JU_#P_*a}x#>{rLNLb@Ujx|BOLh3#^1d+}=RHL(<0P1Frqd?Ld$r zglhHsf9±NNyQe`qFtgg$;QB?cz8zFLw$Qs4YE`tTXuCUaeBqq=5Sqi017UVy)I ztI=l#QvT&DARq2u_W%F|Xu{(PFWDfF@OY0(4;hn%KjQP*yY{den(zmq@5B!^ z%$+cCUFB;g`fAR1g5M1v>N!kE-1H0~VLehc91 z^k@W&yQR~BTHH=D3%I@_y|2;b$ z9urlZd5Qsw);GMyVI0R)uXr$et5bBU=T7SWze*_8d0-t4`V}hwd~desoRVLqYJAax zMNcucGLi}h2}B{<0N$tZ`5u&uWnKG~PqOt>KtpzM&>hV7sn&#L8PvwQ zZh2i@GJbwuCO!ogDh4vT0XmJibd^$Bge~M3zJw1MheeCMq(SwsK~OaT`&MT${dLK2 z2$h-=E{k9kP_!s5VDyDhe*7fdcR&VNSVi{EiYce*YERDf5N;Q|LS)b)bBAA6MVX%n zYAxvd>+@9jq$^@`2`U~6n&oTK-8ObC_9(NB+VyYd%%aL+bCZ0_Qv&UhGZE6uW(nL* zzMUjSqNtP)M=nrDp1tW6v#N%MLJN!wGj2gt*DDnBo+zp>siK!1A_>l2q7o^TYWlO4 z(a3rS#c66+e&o}ij>KMYPqxAwn}6n_`wnc6T%sXhO62USIN4*LD=9$gF;=w2LVdP& zRxm}qrrupkxUFoV!FG|yF73|;f?l{9A(o<-Ul>ntCiaZf!){P>Jd9fTS)%x%dmKaP zpy;#YnVwR&NH7!NBR^QV_W{HYS~E^@OJ#BU?2EO7FloiAEI=hjhYW>Tdw<3A)zaq< zV(%}gVGZPs3%YC61!TJ?2%3OW8U?0*>9jN?@Z>p6^VFWVui|6n+g7-Pl4(&5cS%I~m8NrXt!Ir# z$1Hou2~rlEn@?z1B$)8`e)R%Lu&I<8PcrLA@Qe*CxZ)0N>h?dzc()NL5(ONRE+|ZlNYK4)z_k7BD&;N zl%Z_;@?|!VCzS7(ydP(==DrW&&ENLRUn@(kmITHQbg$jF2!Gt)lrU0daE2oq@x{d6 z^c1L_|H^fi-~boSA0iSsf?u7bwd?PD<;+k|(X2A-artD8G^A~YYs9g7mRWRXcWZ$$ zWJ5Df@Xp?`OP|ZNTKR#-XM9iPYdhu^Qyb(9_Y@5^Kgj7$b8;{B!G`Pr> zZxqydO7LKMcpLx++?Pvkurk9OjoHLU)?fifd{nv-u3yw{uVgOq+HsZ*A^dmAQ? z2u52+9Gft4?Ejl2C*nMy z?Jb2I>Rn3&AF7%(-21JXm~ujD5)mSlfLr>HkaHg{0em$HOa2IPwkY9tNH48i5lY-2 znM9xt&SQ=*J54yj6PD(Csi;kum8N#5Sx~!Ncpa{|H>Py&(a1gKR2i6NdZ354H(4Ft z(t>wY_a#gjP>0L)e-&0A_3U@9D{tS_;XOSU7IWxi?Yve8_lE`Yowtg`iM7($^aGS1pY#|0$s=wcH6?PZ8`>1~Q? zwFFPM7Vn%wwTq2HMa#Lk$9&XPAMND-DjOrb`4d@Po%x3U&xc(5)+QWC`mrEn2V80g z6hQE2CP8X&b^k0P(7o&*5AOEV*H=7Ytem`VjPSE1>d20pVJ!!#=%&95G%jiM=HqW$ zpOw9vf;ggZ?f~7yckOgdOf%OB@1O~P za4g)YtyU3xZ#z%6lMG}%JG)086CoT3Blw&L8*EiE248V@E$KdI=G7v-?fxfM76?!? zWTv{O++*(%Rp!RW$<@-oAet9bpH9(8mp9V=NPc!Yi*5?3KGbbDh$pCa{40D-oGf3j z=d*o|Y<50TcH`R3JR*BV(bhIBBixZiQ=DAG0$#^8zQts~HA54dAq@}9I<@&O)bf}p z&VAFoPWqBc1i78`s5eJ~>YT#FJaba%(3o_HY&BqxM+}y{KD_HM*MncA^jF_#)N#JS z?iEKZ&$sAW0Ry3m%5@l-pRf2sdB#A9ysY)DMz|#D>A1Jszr3)WYN80aUs(CM zk`-Zn&*;^!r_YNV72ULiKt;j^ks|SUwm$T!J(eC3`Wa!l#8l2sQ(4@}Xs7f^dHaO^ z-sfQyt^0+y82zq=D~)68Gz{ANoG%4U8-ePULJz8Koo{g4Y@gcxw<+t3f;arXokaSt)Fz>Ci{BS-s_|qw zX}!~n&9)2c!%xHU>)SrOm}}ef)uA3;0<|+3KPlY#TTkaYdLItDK`W*_VMSkO+`3B{ zb`Uptz=1Tpjk%q`ku3B}B{5gYT-06*qyH90mz_h|5TP{?5B-ug^LJBAmFqSu+8-$^ zG<+ICOhh6J$115TBSpY_a=NJO2wS@fdwb4VZYoV6I78VBjI_)6VP`%}u?zpL5=%$t z)!_xx*Q*17tV(obOL@)`ky4<g9EJX;m4mgS*CRdXnyk3tvi zej=EsdhNYItN*FR$y(%@ce9^TF;>a?fyHgw z-<%BL0~`62?wX7%$pGAkDRpns6tz6Aow-XM5N*)8Wi=rd!?UAY5}pP=Gp)#UNh-P}fu7?*a`&2+##zwZW{dE6trycwM1A8vNuF0GG-Q(mOiZ^ zZ)e)#xbQO2P%`Y@%aOp@ak8R;jjm~YvBScd&1#_l$YM)Xcesb`I1odX^=Ac|g70mY zPsPw2;(5zcJ+_fwOXZhXY@|o?v-2Q$jIC*AhzYy_T_q%f*Wf zgWS+1!N1j=v;KB4O>%~9q1={w1HH|^yw>lB%%wmmYgcvjGkW`rD2qxbYjYK*f2>Pe z=*I`TQDZM#V#!`XgRtY~N9?gbmGCwMPoXxkHy>cB*eau{NDIt%x1~4$muTdx4!5(<@Jp>G+Uu#-wgLv! z?qgFZyi=HB)@FkD#8ESPurf|3Fxzeq=HCxWTCL^F66D|boQw@Dl51OJKg6x~g`S4o zw8`@$$|%Ll=wNh(ZKo0A8Fv^npsn9w^T0C%0$5D!FutOj)5Ax|D{A>(Uxiz$+z~Sj zY<4MQGMN#y$u)kErFPcJRUMSZ{J(O#WuEIG_R@n7xqamG4D0zu-3Bg?c4vu4q?~@t zdEiJiGovnf$6C>C6%idy%}u4!U|EE(e)nFQumyP@m5bAW6Tx`;VL6)VJ9rp6_6^wU z1Vq?`cL@~U{JjRZNhoh+r(sx-x?P`APRx`(^1Mj6RLWxE0X8`*4M|gY)vS3uI4WFd zl)6jdo(lI|I689+LOSjnlvpehpl;~C*W6vq)L_A~_6VOZ#`NSI_T4M3IF#Xl!ZJH; zqZDA=qKb6n>BCjVo^Xhpi}u!oCVC@u1nVB=dh1H=CUlnTR(aChd+BONcrWBAIwQ+m zqrv6}@48xu65yZKWv#kVvsSt*{9w1@Wtvyhuom6eRe!TyPRRgA(>HAI@?$kA`;8ed zD~DW8HQNKrn6i8Ut@%)?#{;W*fK)6wy|#4mDyQSw!kxSNvRp~yM8ChNBy>%svXy>$ zuFxBa7aw5J=gfcCbtPrtWh&bresO{uivB>RFwu1z6awWz;j-I-3_?CkDlgGAPZmqk z1JrNE($!3`ep-N?Gn0h;?jmtf^nmngIhWoM|Bkpafs1$6go5GuYcdipTU{f=tsW!W z*V=B%Vu6QYyM>Nt?}{PEhxjXkIuzhDPB8Kg5rtIx7=j4xDf=J{eYF$mT${3&2-XuiCyhXtktGWQ;;H8mh9n+6TC$KeZTp^ z(?rbF2>S)bz07bDgoraNkgCmQ||z6r&KT$b*VFwVt%B(?qnt3=xR zq}D%QTvvc7D6uH|HQKL7_<#_(E(E>Miiq}f6I@L<`RRM6J3Dpu$xc&KgI$9D9#g?* zRoGVKDIrOx)QeBqE^4G?M3)5T3Z{Y7nF>n z$oBG6Vc4t1=#edz5n+{pFl+*S=eDhZW8VDadD$;-S)-2iW#H3II87G1&y)_G+0V)N zU1=c(@uJeJ?ry7FdXLzq??xqYqMD_L8@FYXHC-Ka7gCN@vENpzsTolNzROXYw~EES z8ktG`>_hWrTfvHzi}<@{1P+kCXjW)Q#?v%Vx5Zi>MGuwV1}8OADfCwx;)kIa$InM@cD5xlHu(4c46y>wOsL-P2Xr z%csRUFXuo&2dy6^RD%=TiI=1UF5=($p73*h&On8u5fzyBr?phA6)|$bGe{PV8~jrG zzi3D|5|z?E`Hxr?o?dblig*2Kcss1 zeMuJVqJk$%(ZZeTss%N|n*Z zwH55TpmO;vy}U1L4o<1?mWDg!(|MBEt(+Ur?nOSNnz}mqG}-8wL58O|1B@@~hkUB>g@5j#)aEA@*?Qg-*D_ z_>Wp}l+E>*wh2;Y4z}?*2U*c*p2nksU)}YdEsl|z5Q@ns!|@z~y4yoEIF$nY3E&1T zvxEnv1ty-)K|c3p2jplV-5SIm26Y7U(hj%Bgdapahr6wD?*^Al699u~#LniNjNLa9 z%59R9QHG=;KX5{yX*Wn}4I@!E&K{ z_N1WG!F6D@Trb$X%N0au6|pH3whA17cTLiD_jF#IH2s9<5(<~|@ft)a(muazID_M* zs&>wINi0M+lF|M+I#+&=NU!6hX61$~J5HAP%!UF42R}rWa}=8ugpaCHod|;I+}YGY zW`7^++oajRBjH@iBFT{o}mM(oY7GF0D1hV%DHMCepj0>GR0bFgnaAT(K`d z90wnHb_fffeTZg>GJskHNwlTMj z=f+~`dqCNDwg-Upsa3n-7nEJO-#RA~YsoU!==-#B@rMI+*>E~c>$?WeCHYDDBTxz$ z@77Mltss~c)sC`do!k9r${pc3SS^KDLt3U8JsAgOL79mz{{gh+FY%MUmUqc-@3+=L^;=e?njsjS{yA){4)A1*V*(NSh5jMIcE19cpRX^fnWA;&la{a2=_O z9d=V@Rij=zW0y_;`}w;>qRPWWN#ewGVOGVbjjT3OC$#-lEezY&`?_1US8$ z3xdWx)m91%$;DZN=fndyUhuzh;^dL)qIX$V7Oj0}<Rvl|eTKY!j%xs8jih25oe8B6I}pOv5tgfLuWI*d8XA2TbTnIGn477t>FA`_D% zq`f0D*%ZPCS+^_r;thP$5Qyg``*0>n6RelUDBu9FSsSQWWs-l zB}ES_C^`(XHKe|396LODaM$eJ#snLjmhE)S*PJ7)cO#_&AqldwHxmR`ir2(N%U`tS zsNz6R;Qed#=TstT9d+wS)-P-e#+rGQRiPfw?qDAjPahHDl%7cHHr;f1iKkYH5v`PK zzP;IB1WeRg9gP{^lp&~A%i||{Eiy-h>DCf6V^tx?>SvWay;U}0GpVYi64 z2#K@jA%PjP=jZ9Rs0gJ~KP7hF{dT&nwmM9!cCs3ByI$62)@Jx8VYS*f=h+!);(%cz zcfs#(BY=J{xrhS1z2!Y#Utb;4)1P`FAy4IL=o^3_uc1SQhQ2ZAVIVY#1P*ct!4v=e?dXNPR{_)yc{9t>N+yCLW}5XP*xm;mbNgUozaRBa_@Q+x;)S3n-5`lkNVSil~k)nS#_-M4Ke z3F)0>kGOz8URcY(pd@nj_eSVwC>($V+5V21rq(^>!`K!~58-%ybda0m?W(As$T zmaaZIf_;bkW+%CLd2k5j0^tAmnTWSXWR7BtG{25o!#uR*% zhaTRIeRR=)l+`LE`K`k z!8jlfImVx1z6BIyC>RGX7;wvtI6xhV7Y#?-{J&c+U}keg{=(M-b#Q%gRQ#zGl?!EE zgukC53)DsH%^}30W9(o5mIwOU0{QI;i3vR)*cRyb4|3WP672XHj%qfzit>|HkIH?8 z3XUqi&yXDDFEeK9vy3oMg4PBP&~@3zM@w9T0`UtT+OPZb`dwi6PJo0E#SsBW`2_sw zU}HWia|1sCdfI6?pQ%qRLV~EhQQlqOYa|HAV(z`)Lt=o=ZNk^w&>za7bvSs5m=n8l z!i!I@pAR}fz`t5Ts}l>O)!hpGQjIo!WswDMYl}E3d3uXpr}4>idQeNdE{XwJgSu&_ zRzR){1%fxR)@Ga;Phv)C&%@igMikm|Qqh+8ftOWI9!vMqpAVBi1#XSImCmvVc<^*B zIg8CV*-L~UW*WO5_o=^F@q=6}_cZ4PvUiif;KkL*Nwq=eyKdbRn zeyNBjIiH%5iX71LGk4gj;!nM!_UH#76#r6ggsuh0lrr+}tnAAv<7+Ni( z^q3nq&c_otMwQA!|+EOLXb?p%y<9^jKjeG-n5jVPfuzABK=Tk$0`1zl)kiNnO?%>w=6&y0=}SLiMPd-E*tsVX@@PM| zwkDBI9kd-yFYe0s5!|oHqG=>7-`J95&5ffsrh`{~nI%o5xQ`=8nahbUbIZZ%7(0BAoBq z>Yj^$XF^M89j&Ri+X6w&4;E@_SeZ@QszavgDfZ(Us(=6ue4(pmEImRmSr54f{B1kL zs^nHq3lB_PDWu7#ZEc66mkLH{NMD}S%K8)@Egjm*ceq+_4hb2r{SFpq$^wj}M8n(s z#0J=g*f1ow1a5Xw(k8kaYOz)PTT zD1}a^>H7pP(Ms0y>$3w~Nuw(9fOt2cNAtC>#b#C^;VoJGfQ7u;(rUwzk|^vpc*w*o zqY+N?1XR0tB?`Q8fuuPNDs^iX-l#+nlTC`cXbc*H2G;JhK%u z@8HqXOKzgCGCOgybo);agUu9ydLpaaj@u!R!9>9s5uc>3YPHgm)nyi#u$N_!n5JL0 zMsR7|#lM}1;tk&LzQ_xX&o+??F3lk5E?gFPO&K)#yR{*Uqr>PH!rS>7dV8=hEp27Y z*ZZqb9n2p}lyY=d6J-rU+2prVhDt1i#ms$ASNS|>=vVGtm=oG4;o^0<~`DQlyMgz{|*5-S^&IW;nJ;&!VzCOYB{E?rE1K~Op; z`gGS%ujti~ly3g#0bSpbDnvY?)9yks$8S29J#6Hg?WDQz{-)7qPwqnkl@Kp$q zoD>nNM(7DNc)Z=T$q^f$s&I`19%>e}{zii`7JOsD$-G=_h*-oT*vp*Q)J@mZn*G3e ze=Ky}^vNnR13swKw6;yvW4<8lxZk_pA4C~6=U69{lR0kh^@EXbj_!vQv7ZEo+mLJfb9Bi|lCIoZ<= z&v`aX4KsRhWyo8b!3ACi57+3lb+Tr;TVnW{Nfn-}Ye@EiGmg108Az=44e3-WGJm!E zKF{@$a~~b!z&(k2B)7X9m&F+7^I?Eg6nPe&$m0DT`-D@n7Mr zx25r4t(DCIhv4~)&CD9>Lt-@x_^89d_MH=ft75`+Zh5deJ7GIYpwQUW=P5n_=jH3& zKiu%0v6LmMw@rllja+rBtwa;%_P~qJ>;N2aS)33#-eZiqx!5tBMqGZ&2oQ0^-9)2pN)Jg@77nv7g`E>S}Gm;aP$RA})rSvkkK^uO9=Ue7@B~?}JFhxxEB!#@iCN6rZogjCnAV zwM$6fNth4%$^~nddmy27lpIrL`@kVn>xpB&ePTjD2U%m*IPIy)F2ic7NAMQV0a&D( zSyHObGAoY1K%rUp|<{RDlx&C|-ct{Ht40KPS zYkyUHJBy-Ux|>|kMzN`-!ktUQL9*LMisa}iy8FHiuIWSfG~P_ZG)+#jAc6vjW(QmT z@N-t2Zy*p1d!?#nc9fsuS8=bRYCr@S+JHktDm(QO$$;BVkXH0@6?C$OK!o31)H@&G zi>*&H)u!?|k%Xfg%;&*rzpZI-F<6v<_nnS+mREiW3mIE=c$Tfe@VgYFKp4?NMKDCn zpD5Eri7hETFl*U!DI_iXHzNLRaZy{<3811rpCzUol-|61TNS%lTt`oXI)+Z3Vs=dJ zS(2qoUaZ>Uh_U@*)?Jq4l&+NWmx8iP(W?el4ukDjix!pmAOSbeeO?D5dM1)|ctYJ* z`Y|IgI8LnrB26J>5*PrcaJ?uX7Ru(yJxpy)N}I46aT3xohwq(W&A51txO;uNY|}$l zs0z6~*M*_=#WBpSGx}*92|MBuuUB5$DBC8>MDm{=QCtv*ueT)RyTTH=~#wkz6cVZWVn-79d9AB#BSxHdY!Q;pEf^Y(iTkOU~OyQ z_aiEno<>=L*Zi3|=|e}AL}@!?Eg$ug%N8-x7oa*;FY8wGDK&l|qKq^a%1zRWs-Ac@ z5#+IcDx&rYAaJKlV_mhou+}KZMsS0Ktm|{M?vk-b?^WFtr3OznsbYnPG&P>C{5!&X?-UnWU92U|2;<*P9z$nrpTescL;v*Za zF75P!Q@d|EpI%INu<09D4ceQ(A9t9`}bf^>vC=&CV07 zCbZ_CO#@~|m%_49Mg50)V!+hKm3G|)W@ECC{A!()w)@$YIocq!zLow~DdzP`>eM<^S3^W9KwU?50{`rgXLS zPo?po{ce|@q2l?u64Y=Sjxa=)_ZbJAB=oLH%d!Kd@~M$!i>VvqHecDvok#$zw2gBC z6w!t)e{}k~NbfW@p0OIt8kOT~gYG85GZ#RP82)u3{XM5fP0f{>8F?ysYc=9aBPOTM zbBL~;xcskj`Ico2`S?#4aT^fE5ipFo4zJ~?twr}XGq)?7{`EFDi$+9j{W!>&R>WB7 z$~d|7ZnLiziUaktfGx?7$xK2!80dz;(5U}bRvJ4e$%mG8Ep||28x>pvcO)0`U}@aS zIjoFU@=TfltkI!=qg~TCUrPq7#}LnGNuQlZQwTK+irD>hsQcZ~wcdyf|EO8((bN^9 zA%+P=Kb)t5^RREz(fnqz8iOpGE4Rr6A5y=vh>^l%ll*RBd@3jR2_v-ejjX23YMG(q zj#kYbkEn0W4HS<-ubu(`8JZ0U3pIgHUD zA7>w3v>SOe&R_4JtD@c2UoVMxSytj*s=9OmnnJ=Cn_u5T^u6#x)jAW<&eG9!Vc4%TYQcNuh$EmqKy-_lIT zwBV5SMJM(`VYH|}iF?*TEh^W{DP=@DV$G0k@BX39&I~z5%oC^DRq!VPCsxKZq%9zf zD^H`e%if|>0743vHs~z3eXUC7xc8Bhn^LN>T89kk`InPavh6ReR}5K!|9;uwIUrJ~ zEZ&WB+UaC!bFJITAJHa!1Z3r(ONM=`OleisHM9{E=IUmPc*nq)w!_lY#AmR7eaR$n zRqxFF&Jco{;(#?2W|O{aS;FQViP`n03)F+(nPIotUxe0Zh!W!~SZfshbT(7Yn?rp& zmQEQ9zrLzPS!(H{CPqWfmlgEhH}HyZxzoNiy)sj8Lf)3r@PG8qXplm;%0g;oEy@_z z{mfiUguMzK4SZy0_g=D<87VCB4!C08E;-l?cCq4m_1urG%ozFF zC`bv^e3tX(l>OIufnCQs{R`sdb{LK)Sk<$%BN+;(d{#uj(9ypsuG@q3C2Yu_%M-Ij zZ%F$e3DocV^1}}EaS(0$gEr=~^qN%wh3Y%_$SIV5b&GBxB0cfVn&);FOmTLej{TC9 z73gmH3DmB8_k(T4I3?*9+`Q99t_3amG^j022wnp}EM9O{481Qj$%vrCY7vD4E4<5< z3Kl)ToR)o4(9L)`EAi3(zSg!Xhrr5?T@VvP5~z*3x@$N;d5r4|q~PeExQ z$b#9NGwtjmbWbB&i0$GwJN;^;%r~%AT2nNfoJx62cCPEDP#Az7`DNOPWgmEgNJqJ} z6VnhUK>>l}NP4@(al`EXn|9|2l$*Gv=QZr2+=}^6I@M(f60^i_*G<|eD;iBVa)?~J z3~%2brY3+2#Z3;oVThi-|6S%lVxY-#6l}AX2Vy#3De8u3Y?z1iiZ-~)v-bLI&KkQH z^UtAoR{;f8T;iom<7!P%Ai)C}`;o|MGckLx6a2+eeo}jLtDnuWscS3TbwhHsVlvJW zq25-HH;@$(~GUiIig5X3LQKaY}L!I427FB7-Uk3jka7a@G2yxt0=Ji1VKl@Uu z|3N&W%##pWX*K2ocOlnYlKhTfI^VGW3@>Ma_IbJcwx*3muVspQN3hu`6k%N;jcc2F9 zKoQ>`@wtoUL&XX&S+}5hIqH=S(iud`TDQPV#n|DjMv5`7n3p=8j3@f8P=`0QdMCek zrFsd3RZF6wph72KU8%fSWj@}RO#UFBD{H@Tjf#!VI6`!+^10<8=)3FV>X#J5R3Ru!?()>^XUzlvAx)X{P@%8X6qfeIkrK0yj zZ;eBoqz0^W5$&##cnxLqn0P8&2%B;E?-SD?#63F#0hH5pLXu`| zU0?Zq!9~1 zyc9$vlx)-H!q+*C>ftOKVXISSN-wot_+`eq55?;7220KD^yrGLIBu5YmEG#dkOy&; zkA7|H`|*9ReDJ)^FfH_(&fIIL5Dt?D??{HeGD#QyvNH-=_)&UTO#EtVZCW(yV@oyn z*k$Jc_Yvt({md0n{>JlqWbq*?kC-6?zeKsAX!Le9viq(@@eE2e+_;$?-{6LlH4Frcc1)Wu+YpKYQO@oShy z`-Vt!|C--y`h^SG`qSca_!r8)O3!&{&%D%rtQo;R>4|pJ^3W2$Rq+FQ)mHopnPS?P z>J5U0CEPb&AlOwMaaCyXYS?K@ZXAfRn)nQFV_>C&DtF?$eDrSqj0X?@Em_P zk>-j>OVn%%Q)#43nqYlia8NSn>OLUf-E&zy6fAwV^(ss%`>gJpu*$<+Vva}Qu=`Lj zV<^0~>Jyu#H^(E5uZ9y21Btc5K;6&~4PPHcE5?(R+scci42pd~V=% zJj|=?tPp3coxzOjno}tci}TUrMy#hWayMp)mde5-2Pvb3-TQ?5Y9GBw8MS8cr-Inz zS+N(gmdVPRe{NXgw$HT3ShK!Or+pHJSs+#otKJiMGQ4r_8^TMbgp%OW>vIpkg2rKtQTjrSq35SJz(jC0?{@cK&(h zufgFNL~-bJ{|`uqmJ!td3#9&sMv3eUEs1z}|2HgUB4XlX`#;%GW+EnLE{^|$PycU{ z%EZdV%>KVn>i2-Gc$JdYMO|@?2$7Kb#O6MgjMtjAt#I)idF8K}6%ZZ_psR^VwdBqd(x(3JJ zjSUT?N(vT%+E@O5lJVtD0W%ClP``hAA5munSXR~2i_$MD(-Xk4iID2S>l{GV+TPaP zUo|v9FRQA&f7qPukD(+o+5_l7rKUhUpnlImrb`X<&oAN_fAv4HP58xvXu@%W-~j+g z|8iGB4W9+f;zDq+^Nf$*LCt?~=Le<`^Y-;Y!8$y@W8pOWk!osUKI!PLudk;}pBbhQ zXI2KBqd?r^E};Cm=O9lne>FjT#xn@4PZ7SF8BUEUgG?h4rS=ZtBC6J0o6ZRIRrVno zgFH7QA2h8}du7MzMiTX#7B7dgVAL#vx^8ZQt)i*Nr+}ioG^*x9J{dr=-0tW}> zCC*Yu32lu~2eu9hO0y6#RYO=41;SEy1PC>CWk9TbnckWba5X)y{pE+s0WJ|)4mzd# z@FC~QfH^}Xu7+ib6}Jt*Y53efZXQ$Amxh7z@*-MWhI~WvO&~JM8@5{J)A+Woq+jbN zxO`e&hlOZqdMAaH{!1E(iG2tGIwAQzdY}^g89Rl03cF`$Vsf-^1O<`}B7hW$MCZr3 z`sfVtU2gm#{5i2ZIyv8uqW_cuHV0)4>HQ`6?8xK<4yK(=EC8tWqy5GrZmb8T6U3|m zamr(Zj{1y!QDd4rXZ+moFpGog^M7)=T?47|^Zo|nbkC#|gRjjz03P@=CrK))Yw3$8 zZp{Y#Du;#%ctLdk;Cq8mxH71M;L$>H_@6xOJ@o2+&-_oQO0B{M{uPFI!B2S9r-}&D z)2rxSz3sPX|1tY#?%Pb~6yyg_aDCq;CIDo^Z)7JfIdb{nDe~&);r7Sl=x2B8XaDHO zEWvFk()ej5hkObi#M6)7Ln;!VdCh&9BU+Kkzj9qrV2loCi9rSm7eZx0k`=Ul; ztp`ZXP@Da(1nI3){DVLZ*4XBjEwxGPBL~p&*F309Qtz0 z3>G&EYX5Yq!x`m|-&?nZ(eai~^pWS=pV9@0L25Ih%WBE?Hz<=Vjh3o)=r3*o~Zp;{CXF zo91jOTgar+1<4ZgYAWHM0*eamhbbH|Sa&rFR1wch7Nn@Ni%jav%lcj8`#bnCp!hsK zr0#p~n$fixu*Q4Q*v*2{Tdqt_0L&|zk5}-DyeE||mj6UWyKal;W}Zx4ASHSvtzjy7 zylXT^7e+A_g2Pp%6M^y5cymG$3}PPn>A;#?HI?-sgHx$&PlY{GB(egZp5_W+I~8NUuPISF6G zn2$SSZukv4A~}4fAA{|u%K&V)SlpLcm&d0nSiKn6=V)uX{Q#XzixrP)H6A#>$|SY* z49^!@3XHbj8@4{9;z2Ps=k<_XrhZx;5q|E;{@?2hVtmHEoj4>`zK$rP=mbIU)RR5+ z0rzBoW7JD{-MdCY2<)4)iGC<7xFL^F93R0lBIeF^=@}P7F(su3@ zWy6pQxr_*z_s0Y{+*?)u_s2xFhsn|p^fHI_=;D*9M1O*z{pNpFxK4EH!Ebr_wY7W3 zubPWJK)KI#Tk&TaQZosuNg@e7?!1yA<*SLr8D|$TzqgqUR0%5jRK>lj;U(Iek4&nC ze;e;WcPYuI_(`!|F-+z@rZ4Y*=d5N66NO?|O9hWtcL9=RQTmNGwi>da(-p+N zD;x@FJq3|6&P~1V;Id@;bTnm1kDO_;_}#pEhylu5b=`64+i5yj}#ERClbS0 zB=#s6KKL%ot1i*eYJxTx=|Fk=Cw0D+U~jZ|ek={Jc=Q&IbD2A-RqAIK8W^%(_RT%I zd?Or_0X&sEH9OYdvOY2|h2s0GZ+@{!IN5lWRWXMQ_@A6RqkNMdKV;YX`x&ygUAS3gnh7Awjt5yvO%; zxEya)_R14SiX{&LV-zo(SK87|`Ji%bsp070!Q5q6LBjfQI-tH0e0;(aVP-;KCRmPP z)a>zXtGuPeZ9-WCHnlN>EikOcLZI2I5%CS^XVfD9%48#DmOxCU;bX*xlV=PhUfJl4 zQ0v+0hix}rR6BOUTX{Vq5P(uOMH$r7ni8oEqOxV zf?T^VJPZ}JGQdv*$E~zve^nD-L331^BJh)>|Be5z!7y1kQbYZ`N5CwlnD#(Dol2XU z6+d^1e{_sRcvDpTBg@%Sk#0k+DKS%?0n;N*Zim~E8n0`v(yOD$+t+W*ZpKlY7Isb= z15erAfAFq>MpymeYe0!f)HTvMwv8c6a8*Hw2Z=9A%D-|Y2z|$PN@jtK6u2TlDX5=3 zZ-upE`=w+4c>z>jaXahN@pxo$AS46Ukn5K#5Z8l#Lb*R4OV zK|W0@%dLcETm$?$uW&9&&2|;zPPK56LKLu=+ue0A?R5xe)A&l)5W9;$((lW1a58+e zq5eGH8EvW>yvokq0L@;}yE?ytPIZ^b*cn6LT#NFMkg)Q-_^uG1A2=4vlFUvhi)K70 zo%zrxEu*>_^|zYA1Ja6ET~NMmF3Uiqaus1fqIxB$qXUqFE`W}vJ}?&;^_L&TcE*FN zb!vg$wnjw>O=u~A*AZ+=w8%KU@D+sB#$;co;M4 zZ-yBON*``9L_ix|=tIeNn2Z6|x2T9L;Oa(B7;D2trXU65d}py%VjS`0*Sre7JKn}`Xcig~ZS82OA!2q6J=5?h z9H8AWg4MC7Dod6e1D<=U$00aMRYcI|%8a}uT*%lA;@~idvQ}p>6 z9S3K$pqZqp#->C5X!go%@-Qa^h+C8Ng*Bq*@1x!S+wes@ucetyp~xzhjPbJUc$2B| zfW@F6WxWCY*wB8p@V#j8jXuOzspJehpc+1=3(YdA&2NYn7n=5%6;S) zRwimJCq~cNxJDI|-73Nqu2P*6`S(|J30JhP+O|dO^W1f&j<7g);gRFrYIQYm9p>6f8 zqKq>^%YN$^UrQ!UWq#F<@C&H}PyiBIsSjx-qzTY%AX?cKO zjUGmBVi286%20Im%vOk1&(#n9x5`?z42FXVHg4H^J*NJlt_!7#y0<3~`jeP{$fN4T z1-?>NTdvIi{GrKF7{SL0UY`IRK~#(;z>X!iOdE+L6g2!tfA$G|9P}oO z0S2cr>q?BJV`J-MykU@!qE$cZGJIj~9^Oe>stvF&E!lJ2xiDZLB((axPfZVkfoL=5 zeeX#eqAt^iDN3@_j!`_n8`D3{*QI1=Uiuu$!uug^`jzcsY zxY+lqtWFASrxqVKA|eTmq4ntLruTce67J7p~b*$eAz0?*F2P|&YxK0m zuAbuh3Z>{0py7;|?8+n~ko7#7^4U^`8r}VygYa?Y4}{y|_WgIrlBS*K-R-3JcwhMp z$sMUK3s2<~Ng;w(NDKO43g(m4%6UFVJRxCxJYLHR+jf zh60ZRJ{u~QSCI5p|3A=YGQ9+<0ugZ2L(+8`v|8ibM4!uv*+8N-d}YvH3SNyH@aNNO zWvQKpG{$iP99sn_X#bcY_UGEB)x|r85hcGpuY$do~E5o%(jE0|YKTP4u)Fh1br{`@fkG69M!&xMgjuZGp#vqsWdTX0t)~ehni(akkU`@hyAx(5p9#RAQ7%f zJhrGR3U5Th81(^J7lx#7({!RNX+AJia}aPKVJYEtMpvjq55=MW6JSJESB4ryKTc*J zK=gvhMzb6TNCzcsv7jkBIiWnEBN{Lx)^5g;xP01S`VnOX3)zCJt6_DaIaS}t15`?IeO)=WELT+}5P ziYp0<){1kt5i$EW6G+WG<72dLIQ2;lVe}XFv3nyyqU-PQrHw{NkbA=Bfv>WMShiHV zknuA`K6vJyni_iryO!QKY{iIzObm_Deqi_LF|N-KD6#z?{gkQi#1wIuY&Xl<7SH@b z4AkzNNBIOgMA=Tbcb*afW9E1N?OZ;gsN7wro;UZlXj?pETQ9Lo3RH?(>Zf=Ynbjf9 zAVU?WVwv+3=Yzk?uxCo!Sl#I8hS9B*CEhq`)RE0^48Nh{&0~6R=pej)MV^R~QGS-z zM$z2ZEwse9Z0?kNVcsO7cxVkuD~Ru_U2>08x|9kEtj6-KllC0--{`maB3n0yspC*f zW*Z8Ty$VH+IDPTxaB0LJLoFx4Y#L=!TzW!s0IEt0orhi`ZTI!k%tEbLQ3>mMA||Gt z6ZuLvc?6W2~IWtaz05q%Yu_BA<)sAt;nt=Yda3EM_;lC0bl0A?Sr~tb zQzCAZJa#qvCzb-6bi$?x+g`iXXD_-mJSa^BN@N3X5F_b-%cREsY!juf?GgxlMraI>OHUCQ?M&}ys;rqC#Ch5?wNjX2%HWgFZh{XZE`KtU110CtA_?x^Q zyVf}3L2(3qtfN~8N7|fT-xJG5FBS|x=3xgN(@Z~FMTjznlOrm|bI^pr!mO_1fuNCV z&{R*|7tc`^ud+w`(~7s4vPt^vj!c+HUb@5b)4jUKxF>ycpgHro!RK#NH>U2i?{3)4 zH@G5;>^5*FR#hH6^Pv{Q+#U=bM<-NsrCg75#al*{n?*ezvN7iv27?M|+@;%?xO z6JmtZsA{!V8@qDUtz{5~nMaW)C5C=kTi#96dQc)JP=*y7jE^)QtpYY^Hl+JFd}fRc z&K`qP-z)7e|G}ID#3(@+(@16_T58^;<{5Q_%qx%w@_Oc=k&ux|t9ZCBsFofdo0PUn zt&Judib}X=*Zl@+U9G{fngrfPj(bdx%XLyLTY8C&TcArmMzZcfPkG&YXNDvIx{Ph! zn&*CO*7_-celSR19^&GwRC-6B#fy^v(WA48;$8y&SQ5s>F{wHK{+%|2w zI#DDP6j6nmtf~{8wVoqiTXTI3<8zbFpe{#jE@Uc)cyK0QB4J)VT|{zpR-WtN3?tr zaab6DPKJ5n&)r84YzrKy6pNHqWkt8McPFHGhmfLwcF0%HH>75^BvNkbtqbfXw`l!u z8vK&P0gH-EnasP|dF?HfB$=pLFCQT$SKCX&f$J^&Aiw(nlqvq_>AgUOz?-X9do`5` zeO*i;=q;XY6{5!pAGgyMc|uH-^zz>3URk$WpTsNYgK9&-7+~;#a~7|=E$tywvUdW` z_<2<#$n10!t9Zmb`Y*?2&Tq?E)>Vy3@>wNadVB3YmJ4nJnYsv@`bZs64mo0JNwLBe zE|N=0&WBtzodkUwIY7C=0F2LeV8rg=HulU?Ic1>F(o>Pa}0IFLbm^^~o#EUe0fZ(Sj%_gp~o#n{3c=(#RmLt=MeP9o2sbFpN7Q zzOE{Eo9p>=C!Ex_S1tJgjpYa*tX_^2Xi?f67!iXlQi?@Q-h}|zC213epk#CBns|na zZRUPk*>GNn^J)%Wg8#BO`d;EXQ>W)5Cxc-Hfc>t-CDE2SvUOV3>^9d z1~Z~F@?r(W$e#1%_0CwU7t=E7YM5Uo`bOl&9coiVI;|CY;;3I{EJ%{*+9+$%r6`VA zJFFS;-lI;>AKwIQSYC7u^}-hGNY$uU5KKcuL#4IH^q%CBj2TtUI8WktEi+xIy69pz zbS)y0(BcK2l*Y5<8uo$dD?679qE+o-(scw%%>hj-A&%$A;anG)5jvSvNulu0)C;{m zyRr|Xj{-xn0&O&^teVg_u83OI8qvG-V}L)go!6ZX=p^0WC63i>vo>Db06-UOF!^wd@94{r8k=IQVFggbJ;JTa)I>D{{GeC zOJyf~;qZ^V-&vaC&~+&=3*}hD_b(#+Kp2o&PTlbJ8cu&;bgrh9;)F3MOOnX(nOD3E zK5Oh{zq#^pq%25p#qQN)8yaEY@5v`21CbHJMFeu?2A-!wC4z4j;SF!U`;#5t$rXg2 zQsgMATmebt<|+Y%^hQ=e-Y1$;(Y2Xu403C3&u^~;0^7cH4C}MM2GZJ3E1jr7&9^q?%0wk5Z~P7ffc@(M!6?hmi@orc@9>tyV(x0Q zSLYu3K9=+JmjNrYD69ktm90n^Y}vx5^YV+6^ruiw)uS?=ZKpT>a;n~+d>hTPh1Nq$ z{ydBDQ9UpORDpDB?kot?K$ti8T6fmT=u1T5>Kd9u8+#aU9ss_Z_%_Cqh*<#D6XYba{I1*ilw0=?I!I2VW4*&)B1&RTUCf=z z0RDA?OoRO9lF(BEe`ZkiG>1FgHjsot7%{l~t1K|RH1CS(lvNc88mxRn#_(mmq~+G6 zS}V`u4ocU)Gx0lo<7m89>qP4fS>!BKvgmi?mcaMn8bWdBdX1ynX-H3y zKg%ILeoD?D^VaC2=}cvJDd9RnHP;_X`&s&v`~=6_#ZTVLQey`8Az3EMyUPSt5v^vs zOn^bjwf9-V8XI6|CV7Cc2f72{mHa;;r%d*6Y0d*r5L#-cMzMA<*}(6lyv%q>z%aH0 zQe~jY=3)>(|6CPqbqE)Exw4?>%*5d&X6yoiO6dMDUtNti*Nv$S-n0(W{j4-@yp~#i z;tyTvig;Azmwe=d#pXVgVej%_!`JGp_=&ajKeTt=+ZdLlo!)T)ZjV>gO8#_jB=roL z#aOPhEu}6nJLjw@rRwr5Vg-J^hMpAT*;el%_Y80vkH^dVloz+&QVuh+igvs#6=5>^ zDUok<21g}@iHdL(LsE|_7e1ToB+t3ub0B@wPtY%%bD0#(xTH_kti;5EunKdv*A7Cj z^^iC_O84dwhn4C4dvjd0fO zXZi=~8#u1fW@vcmJ2_6Cau++v*oiGj72{g~P#2z{~JCr(-Q&WOR z0UN5f?t*7)VeTglcl=Hs1qn3UsKPoTMIh-$G0KHmHg(X<&_ko2+dk-NrVG+aCLsbp z!8fhysT6%*=gWjvtZ-C>Y+&m1TtE$-@|wui76|!?n|K^X9keDpOoFW(smJ`QMpd_E zyFrgrc2U>Y7+*d`z~jGSCuH=O<6v%*qP+OCMk{e~EtY9Bvph;^`%=7Qan`%KqcP)+ z5>94gTA{S7x99CzWJNSVmRB$}E(8DcyTw(7Plp^y{)9hex8rB(mB_%Spupuq8lcY% zIwpcq;=D|VLAS>?+7ZC{Y;349YG|N&Oi%ocbm#*)h`Vsl4RCki77@LxD?2h{y|RM` zvStg+cVpv%Vt-pM`FT9<-L!M5SL)mm$h#E$W7ps=Sb1q)*0g$N%c8<8nf^ge-FuVF zD@)(D*k@KVswKsZNK9C^#8J*d>+*$BxU{jsG-wI)tmd1&Cwq&k)?tU&A+xta7S5J< zGSol~=t22efD-yywAHH(KdGfg&%^8m#c30OC1aYW!Q0!WlqTS2Q7NIACbxKotELF; zx4M(N0SJw!9q&p4X7c@R&WVqwaLgsaT}kFz29|DY`}d)f#(xR*Rs1ddVi_}`X7E)i z!Uri&_7-LR_0^|n%YSZ)#+Tx|BOz?~KhCk+6M4CUVK&5ec~Ih_R^==776ODF#|{$n<1Mh-TU= zcYWuskHUx%2Yzrj`WZ`dM1!;Dr9wq(B2hs({IQ_i8kjdPzbd`ZPqPq&4yd+aj=-}P zv<6|E?kfwgMB@7}5lsZlEpm|M7O(}>>AI3%Hrw3e_16RccwE?$qh@IE0|W4`;MN7P zMP4D1x>L0csG5^HCSM^c3x!)_7xgTAt>nsFx#Tg;Ny)0EJT1{fnUEkH-uYtRz!I-@ zE1poY5Fg)3_4E_T?_2UddRH^;&ok@b(4pA+voDAV@=#8{xWfhf`Bw0W>2H`_S)a=% z(s#xTNCiXJLvzGj?)!Z1?f1Lbx5Q2!)u6ZUltX~DytQjo!O$^3=Uvletf`dIVb#>x z*}rX?4tt}+rHE{nvC4DR*5g!c<|Z>ZxPT^&q)Ba5!G=DFu+kPiGt*Wjd-?N`A7Z=z zoccL4b4NT`aeoz1Q8!zQwH2@pIac$($G?qh&ih!~*|(>r4}3s;zb=YK1!W*@ix#V^ zOIU zO-rgYpcI!{=XefQlHWlQm!I-KLUPiyj4=a~Q93IYY^DE5SLw}A^KmYJALW#rABA&K zZM5C2sE#EpiUQ@aL|L?1NQ*mSh;?wrUp9Z7f+dp_ew@=@V;vlM zzpC2Ofd5_4xh)0x$GPDDgv78Hhh~iAvi@xXXQxAZlbo7=oBhpr{At2@PN@zIxr>9J z6U;lJ*qp47LEfv7)})0*X6rnFT6FY+jFNbs*#;tSDLCq8hOJudZi&&*P8eg)u1JqN za*)yKT$Icpy+&aF$!Zp;4lZb|PRv-5s+@7O=GvgVR1$|L_Y>beB zjIuO~%@6l*%RC73Nm;KjCeY3ZYBOUY?oyD9O}Jg;ja=vXp|OJ6%^)X+bzGQIaYgM@#e1#Hso!3t8q#=0dCqnub7`&~`3_2*Z8S+f}q=G%ga}s2%Sy zCct@sz5a!EbwFWE$ardNChiKmgFf{ido`+U(Zxw;3C3rbQNYyGk!2~Mu(;=wGG1OC zi?O6^x)3kic6$fTWD?}GA1D8dgB4KH#+k&0*kvCqP1QNxYR0Bn?%31%NB=nB+G-Qu zUF_saqcDqxW|McKS0!`!lhP88Z{4~-qOPA>H=c;L&=!#LrW;~Onlqs@*9zj2B@#xB zWTmXR=DtV-gY^4TFb45vY?ebcv*e=jfa|{v zeW2Bv9;)Uw|D7%4hmWU@#Saz?G>i&hVakZ91kTUKF@p8-iW5lIR2cJWpdNth>~ISC zIR`L2u2}xLkuv??69qb)u?dkJiC7es=se{VfY~%OV}whQ$}d&WdCm)h)+;R@V30%7 zYRmF~5={OMXKlnay#%-J%~NEdACkR6E4Esk%Oq>;yCEcoS%mZ{rA1n*ECA=TFsQ^} zuL}&VQ&ac5$t{p!V*O(j!lAp#f&5L14kFFt7MqU&P z)Fa6Ai$-KiXp`E~pp?IvvD_&#CI-Y`^tQLEy(B}6if9=Z>ebuknH{YLv0{LZlwoE{ z2gx;1IS7}7Q?)no-Qo6hIttgl9R~&g& zo6qK8%G!R3B|W?jxsA%LNF<_n+#a5eVmw>tJ3U{m6!u@7SkpZwu=H%T@ePga3YjJ> z&VKt$o}E0W%EqzAH_l|iaKbGScC*&we*K_Fm$q4n<*!adi#XXwm}xZhr@7*8vo$5j zx=T0WXD)Ik#90EGH~@#pbx{qssOZ=qxOXilUK~kmTVm)tpV8LCu%qmC22F1{ zdO=fP0$p=me1S4ZM&3#csWvx4$FZ+ev_`?kcUF9TPj*1WDIsfINRFh$nn?y; z99lJ+>{M{Z>55P0-q87r`7IHh|Hk?w-+1d`l3|14wQ_ic9HMZ_458efozK-w1V?H? z=4Ac1CAL`I9S1?+QJpjSFB;q!9;hDo{7cRb#aPjYOe+?lVl4Dlr57y(x1pxi#lm)vX8IY1yl_E`hm@+ndsMg z_|Dx`V&Hn~bDA5c1ae?lROp#h`0pu-ukMz?MYglY<5A+ z))W1-Z+3Z#?hK#{`IdoAbaqNIu;V^nk}51H*wHC|9>!cPQjT4joOWE zOl;e>olI=onb@{%Op=Lhb7I?XY}?6u=G0%O>OWQA#ktsBwQJw*?yBy7*0Um7$!a+k zqz7M=b-#u&!z_R9;v(YE_^71Hjf&djuP5t9G9$SmoRIv&cL`p%sl7=wJ33{v=U+PP zl^1FEshf2yc#S`@v)(O@t_b$}Y(0dWZ|VBUR6=b`M~<5Jq~D$D_!e1N7Oo4H96Xi3 zarF_;JnMmSgIHT^bzK$HxK%*rhE$F*?0Jl3*-m~~-@3X}csPVOfnl7-%9V)YlGk6R ze3G?N;Y41cXiT+{xEBXMUjtwTvow!U2w;+)o|)ngLA%6mW59k4?gflsF@*n;N$cc+t7{P70a7_dHW@- zu+g{FjPZ$U`4oN6ukKcX_&%MZ9Om?XTH8}C+Kg89yDp-#JbDw4R1mx}7!ON=@Z5;q z3@wGS$7|AJiORAGjV?@3Cp15*e$Wz1Y2U~RseN~OuEx4l;!=AexqRxA5ppbzCz~f3 z`LHYuhTr{qchz1e7pWjcjsaqQYNVdOfGxCGo|V{RM@E#$fuIA0veSNbsS2F|C#k=E z(uGK?(;E$-BT}9i+9(cIjFy*z$uk#fvw@~MDZecK`z8un?iH=jKP}^ol-zIohQ+6k zs)#U8yl3XIow|+ZuVD$mwH_Q7&wO7;Yl8TRq1KxS3M+(Dh)TrJ1({I)!)@R*4XrAR z$V>L$k!WJqCtU8JUWdUYtgC^Ro3)m~Mo zOuX5NWKh(df>5}BC%~*-bJjNh&07F9i%=RCjhSO&ZZrx>L9`2(U_^5v#1+-RpH%fv zdXd?Ub@6l_ zzq8Vch~51FUmb~lpC*~2IOV9`SecT;vj8$7QFhD9g!T>ubf0WF&ldl$)Qw>Ck4GG| z-5CAf`*S!b*sFl(ra$~1TSAW@yP zgdL!EF=M5k!O{^5(v#2InNyuD(1Fus{F4vlFDVDh}@FN%0jV6+<^tM4{dSz4Z+ch6asat|ruj@Tg0>8B8aBh5BG;U}xfj7l0V zKV3&g6vhuHU4&{O0BbEN{`Ve@IV_ApZ#EPao#CdJ>hz41`q-tb382^TFwP#iE56fY zx_gONLLv9B*hZ~}X(=n=C@Ix1(AZtMg>>t;ZWuvb)ud9$1L9lxO(#E*G#lIO%bl(7 z4slZT_%luu+}T)?syUh_|LKi%UufCtFcc&jmy!rRy}xWz*!2C8jor|iO}F&$Q9fgz zzu^r{Bmb0I$Xjqe2_??K?fKA{8ad(r=}6Fv9wXiRF?o&p#tc*DP-B2jUDS_{{LVe8 zNWCN^&WfQmM^*!Ty5d{YKUSK!Swgy1nvI_(TjT6qWX10yw+j5_EwP!Iq<9ldGxBzF z-WBR65k{}ab&Zp(#?1eLgv-iU_>+|Xm!FA;o2UoWk66fs=O~j`M&xRXR5*KkZ$d{# zW6pINigsOw`F_^zGu>E(Ch=7z+f=G9qm86~%8W z^`PR?9K2@0LJ7^@F(+RJ% zTQ^uN`%G%%<@Ew9F7qp_!3bMCSx@6fL-ms^BI-(0fxnDtwQ z&cmPC*oGk)aUD{9>ifc4EFC)iZNB-%{$>4(bCuP+0rDF1g?Z}ELsMjuGBS}%W{FJ{ z9Y+hPo}u0Vvo+m+b`aQIci}@T4YksZ;6??%3w@3#7O{@_G%EgC+UTXXrRr+X9Mo9& zU2;(4D>>P+3qG)UVw+#rpNjJV|qLsTrB^C@cl1JkC~JG{}~$St33*pX*!- z%a!v;BfZDt#r zI+~|6J-){-2MYr+=-2>n_X6DlBi#xn)zbqZWMtgy123E*1;JtCs;3YR1HXlX107&K zD=Ca8oH4S+%NP|55CY4j&jj5X91OM#_yZn@L~L0fh6C~2GyorfKn%SEk}1IY8ACKRh;w-gb`ThJ72tCCsek-ysu4xbx;z9NW*_YD zr=K8BJ=@s+uWQ2G0R375h;yX7cRcMNl5~weYpqUR=X2qH#ad#CtUeP$g-qaDwFo1K zKO-Zfh%pJs7%WJz?wZrL!|$s-nD@WqUz?v}1EZ6u=P>o&e?ad+b%O}|n0t&Y9EbyB zn&`$xFLvUAl9^juAaeC#@csB^h~Y-xs$cU6jqm6}+kI@cq7|2w^pD>1?l#OV0a?l|a; zI#6l|`F7u5PhAe>6FCf=n}_&k#wbQVnFLWF<`T}sOAnkgDEEavw2K;Nr1iB2ho=He2AFq46MK_rQvWfCv(zCq$Pw9SqLzPC z*4{qc(UT;7g?#iW+wU4H8GY)Hono1;>Y2~I3BuEnW`SM&JhpA0ixF9zFN_o!I@+X2B)Bq;i04nd=tP;u5LQ#SZl=9ICR4pTvl1+_zbK20ux`RVGeK&(XA7Io8}@iGis zwrFY2<8o?b@4Z8%>uC8}7?C0B3+*ijw^eVJsEB6Q5{p%Aq8?fUz$f6^L?z;KdNaXo zYwam{=_l3i;2h=IK6l?jc|S8>i1Paim|Tnzo@tq&Sah{9fgA_o=Ze0y*WaKE@NtZN zk08xzJt(||{`R6@a}Gq6;R)9<;I$=V#UnB_YBdTlBLgQA-o~gTt1iaF)hObdf~VE? z5ZT#hPvte7*8f6$Z&q>8xNMBI)_+7we2_;;PS3qI4}qNyQ(nB=nCE7*>)@AQ0i1Pq z;#1oC^~=7e{Q#zoQ_!;p+?b_yy!PI!cJkHgrf{iF10n`i zq$V#j{dcBt77`l+7v*SX<4W!Ys;YNj%swtFKhs03FIaW2$rFDB)B`4TB@?p?Cw0a@ ztbmDYmD?o}n@4^^9QEz>u|36K=dqi^4AU2jid^s;Z*u3zr0Dr_5e0<#09_3qbx+q6 z`7wzt9KJqzIUp#UrvS82!hk+{7Y-*mr;f?BQPppym_gZtTJ&9)osx8GaI9`eDX4^kT=->aYH{tK)r5j6IS{GvVi! zpTF|?1XUYbb`xv?9N-iK$t0IeNab@PbCBm6mPinQRyLkykr^$QgE_E4SUujD>kM8P7n@My7{h$@D?8*F@lf zQvk#dOiVC{c(0U>v_0IDtvG{BzRI7psb_m=6ycM4SAEM`*KqY!me8xjFN()B$d05d zj^mL+LU^oDjjn?CJW&!HgY_DsZ>+xVwpI&eO08Ac;OU`;{86dDKKI{uD44t3Y9W*( z?qBX@ix-`>A8*L7v+XkxSGka|CPt|jk%wCGH0DA?O;ui#hh2)tMvjOQn14H-equ3y|DV!-Zlg|c{1=|jr&5U^f36F zL)je7BHIeab#%YFE5!#CTf64%{x6fKzww*b`3&d5D$z}AkD5*DzC_iB?9^NTD}2n| zCGGie^a^a-U*uK&p8<>#)aCj)e`)t|MD9i%Ab$UZkP%`jGf25|;i0zHro8`nC?E@Z z7-S$}fF3^BnuS$9yKtgwG*IBZQqrTOzM0hJfo{QX7{UK}!l|sFhMupJir%`D1_}m2 zlL-O#$+3f#gi5Qv=leCN!pTQ{V>>C%*}=&5JXF)By!nwPqu|oA4Iw15h4q@ai}e@L z^C<<)cmm3sD9*t*Gcei5O@2WsQ#%ylO)0iOi;DIhRhSzc;|Y7ZmqokFyA#q{^Fj5B zPZXft$`}^G-O$R8fo+CKr5>`Dd+_+U9mIz=One_lGR@NjA~TAA_%!{>1z7QMA7R;< z{gpph?Cx73G#VQapY(uxh@WmUAHUx%`eW6{`vzs3!i%1%UYsju0kD=Ro9k=L zEyBsK2NvHmkB=p@#=GxQAlJsjU>T4i_*c;Vu)^cDb89SA8sOmcs0}Du1Ha#-Mft{l5V8>4S{?;V4Z=+A43yd~21h%7ZCp2WD_)J-=0 z@pi_T>de4ky9q5*xpo=j%C{m*benxKIaD%~Og`sOkU_Ui-;~G~bro{2mN$Nk0|LoyLORZauk__7Qx1_O>tFjJ-<2=*&y&2y;24mCUBt<%FR4dnv-03#Y zK<8F0{d|ZU%n?{ac&H0&7I$D*c9b7R_qj5NFJqlYBKU*b~v6!X6LvF1ZoGpEYY$=nh<;m zox;?TrCo#X^?}OGSWXVDmJ8YDKELWH>p)?mUGh@tI|_o-fUf4PZh@lf)(}yU-gW=7 zC8!gX2(kW0^o?Gg27XAhW-)*&IOO*I0_2!zIhjaU9JMlUu=!Eu@bXJ85IPzneEC-P ze3NZ)NH6&u?*yWUALc2-ascXyLaUY#6!2o%p=&XyUpW%wJv6h+EeP?b0*4gAo3oJP zt;+6jJnw*GJ6xufO?mgx(G_@(T6(&XM_ah$`!SPMS`7hGb@t#=9t9AZi?;N(EZl?SyLl;Hte=j&g?#%J3XWZ?gzf?(pJei zK!}t4_a-B2XBiAq%RWbFc41}=19^)I$*`dJ3jtrZIGX+R4glv_l#dw5jEFhMtj57* znSb`fPoMuRNBXEj`$^*_H1`EW(C%dfkD)Z;j+?OYUv0mcV|2^5#f$d7w5(>GM=k1G znojlxIhAXo7F-X8k>2f;q+%~m3K%zI;&xo74(1F*q*^SI2EGy>SC1SH{vRLB8o?93UHAO9b1?(iZOWw*#(T6S)Q(EVYyVy>U0xXEMXPOC zcba6y!3f9j+s={nDVWRK0!-uj`><}tZh4@;jfT9-oK7~W1)R670nCP=3^xLD4!jTr z%dP)Wbd7lE)uG6b-m~*%yTE4vlvDUm_zczS5^m$xrf}^Wbz_U&OQc0rUEtxHTOx+s z$KIo!My5idf_4z8$KJc4HlQevc%4habsAn5Hg_ zqEO2d#3i$dvJkT>)mr?l|hl=g-Nx{YKT9Ra71^d0qrthT%4CN-}w&TA|i$u zIvaK&{w7A^F}QgeW-IVEB2N0RR@H>?r$N;X8Ngo*-3$kDJ@gZv{L>oBf4}-MNf87@8IoQRe)DE`N-|x z>Y$QEkoR7J;U+@ufwKbPpKX+1i9<-rxRU2)*iyZo60r3mZM2|z)yJ#=t*-I!U%B;# zBSanF%&vF$`jPhO(_Lk7kw`_~B_1BMDIoB&`{Rd?czzo08EAM_8iNlO8kK7v?fQ;oM2Zsm(hD&F2OXNxg8?Ntkv6D0e&qet#Iucp9z9|-z@8rz z85+n;2c=wht9T^fWL3KS_BlU?Jmyyo;O->KUXWKVkCyXcx!^_2+{a_d|9SNOnwwUF zLM;gpI51qxc|H>|YjMCDjB%ZHc{VZqHy*=O{Y ze_z1xyJ8RJw*(K>C`sLhxk@z~MO}{QmQ|C+Dqtp}1WmvyB~ZSeX#|1QMkw%65II`z z&QIN&NYH%jUim;V&M)~xA;dEuG5yWiouj+lG$`6L6Ai$#mIjJc!nasy(Mp*=TC>tD zx;tJ(YPVZ5Y7Zq-EzdmWqAmP3tTLok$t(Ce;*3bnK`7m)GqIh z4_OL5OG4L_iog0WGaie&Z~Q8OEFl9wJ+5o%J)&D?Z}G5u?52HGo0vD(5F;MEDR>u{ zWNhb^E$N@3Xw7GN-ykVxFV?Yo#w&=E3l?$=Z_}%l+ynWHvy+@Z>PxBE;q64#F)U{C z^w0bIlg*{S&MJf`fwL%iR#;xj5;i8u$?|Eve!EH^c1s~e0H6GZ*@0D>whkf}!Pmkb zOT#7XX>bHrZ1-RDZjJjpfD<_ELHSVC`ods4DnCb(&58pJXUv= zo}|ZTE+1>IP@I!jDe+`LM~CQZ?#ga%Z^SB0Dd&mOBR}rdaAYu58Fk87xFG-4o#7F= z>n;~}t3BT!$ViOHoksX?Y$lhdiAGGxrDy zq!|w%!chxGe3iv@Khjf;kw^UZ`J|_9xGA$A{tV>{V02!koZcq7qRw6**GxP~$T>4o z{HWIrhZa<$Z?5+C%&y9v@ERi2|J4o1bQSPnA7mY_Sb zQLoj+!0k)mL|!ybY`|q47NU^7=8(C6)~ftqt3WO&=wjs#M{_bh;$J1LD>#aDacWG7 zU4cs}cZF@U9hIXJ{W!z5ry)KsYR}bVJbqx7cZ+)4>7tD^kd)gB|K?`xR=sV@@9%=5 z>(BU)6NN;VCt@L4H^yNI&JS(YfQiNlaw1R3Rg*V-(xmSsH!{hfU6tPXW8iSPNz{ZB z@^~3$a4!4DJfPvC6Bp}WljkaNv(5-Ara|4FW4T2#&V$T5-Wiy+%?Izy{Bo&7J~f%h zh_F?|7#};XII@VbzhkJ5xSvEd=28?BQNr=Yc9TcVvmUtE-(o;GBnv-)!c|MaHVr8x zA2zsm*G#X+J=(RxA!{5|m58h3#}r03LH1RK2+ck|Wp}gVqoCc!!S&VZSf`mT<@Q|h z#rxwgRPkiqUvNu0RXxiuwClq~l-2A&7Jfzx(T`dxqtA`^^9)%%jp@yH51zK}p%=f` zS<|BGjX#qgYG@`yy8bg&&POvmi^$bB1=~R0_I`$aQ-r;A99A*5T<&342%gkf3%0(P zLLucj%}q5S>mV^3^=I&>bd(cLtjh3qXm%p$qi*G{>#~EzZH@6K9@M#k{o4$Kq!AjZ zH}|M$U+?4OCE;{fytq5Ul+#n|V|i-~m+={*+A2nUl$nMv{5tB_D_rP+N!u0uX7%BC zr&AJfvzVHH)k*9-wnj$VHmR{j1-0>6-ByZ%{Wh$+l!*^BC z&ti<6FQ<5d-a)iE>%syCHaer%ZZil5BNyXlZ$b`(*#sQfzm$oS|8tD`>8$9gfce^${fF2S&Tn7HdiXaizj zzFIKiWE@>J`bQs6E{kXshF%Rh>|66^ z86Ce)ubriZ%tsk2A-J}XCK2mW6K*gZ&J=Ap=dv-5@*@}G!K7%~;qdPz$(?Z)TWY&{ zBU0Yd7n==UJq;prC|BK(U>{;-BeyJCrP~~>(a%C-&{gy@?mEp@_N0?_V?{1;H$>$k zBb1j7kpt<63K;Q`a8@^1t`r+coRkR=S(APmcgse#xoA&CQy1VD3-H(pnRDatV9Fuy zQEFk5S)Tf;rbG$hRwm?gte;uvbnt%;J%o*Y_=FQsZnrAByNSww&3h$FQi(=s!!8|J zXsE=Jy^Ab5>BPZOOF1;_+NAbmMgDJGcIX?80tAe#qq-emN% z82O9x^EvJq&1zBm&L6jImr78VZ{SCzE%1d`)0_X~2sLNhf8foe@sC=P{<={F*!#Vw zf)0R&sia_;=IzAr?F7T%1>`!P;9A!&oAQG?>HuR1ey_N6;E24wWl#~@N;IzG)vU5o zOL;K+&YHlIr%z~(ZBodhdTEE$AVL(T9~LvtAm5xj_UL?e&u4-A8Wmoy{c`5DgTs(8 zqx}BYzC#;@-HjSNV-%5IGa#;^yeFuTJ@WPGAt5mw40HYfB;K^t=B2>%Y45Xj^<)1# zuIuvRQ?9sTAI8eHB`NUP8WW;ywdl>qQbZ;$T(*eeIfNh|*?D}dq)g-=7Y{~2n!fUP zrY;1qpdSoTDmt$anh_W$j-!z<&r1vr9$EY+5dG7t)HA(~hg)or5=XQBcCPV(W$PJ3>PmGt(we3YH15Gac zo-WQ=UZkV1i+TfOLJDOjv3b#qPH?RZqT8hXl101IHr6z-86`pdH(F z1x9Qepg-O)CX!!-s+cWBJ(s($9~w%%%Pt6(i`m`a#wUC4T_@a7eZ2IKbh28YQtMY4 zLEohd{5wGXGct)fTwmS4XN)sdFcGE+q&cl;Y}VsyA0V(2 zxV9aB*?fRb|H+Y$V$#^Qs0-`emB|<#SBQa7GH{&333Hv>Q}!8n1L26X|EUZ~xC$O`&)&KWFYpKq*FF&9>yGJC7YO%-3g z2c0QZmF42jd@5+wTJq>Yx?(?!Ks2dB-7x!tVY8JeS64XfV8V@nlO~CqVQTD;cWF%` zZEir5eD)UWU_xgqioQPrjLMv8bV&*u4Wx4Hqj9~v6~Uy579uWCt)(14%2r-t@1PK$ z2y(NAD>c8Qw|D)8s_#6tPMwi)Bw#*c0&uGkul1oxV+QOc77)~*v((!@>|d5Jgnw_= zIMbg^b%ETZ;&yf&3^Da^9ZsM=_*2c+=WMsOQgr!U9Iv76(w9X89ANWx$f~f6C4a7K zX^nOiYw;ahEap5|=L0gO8jC;Dh`20)iikMy<{Fx|F0so2Ap+fT*b*){baCwUF zy)gqPAD#bY{PK(@cq@by+dmyA;g(@o-}Q@)eDBe9pK<)CkeA& ztySz+%##}98)AImzi9?I>K0GoCdIhcaEMg;r=#9iaz2+bs!_Gvfrq753XEr8Xyv_~ z8b)|!RYR%GP!_OD!DXb|c4-fIylZf)e3~HlnR^Kl$ zuH&A)IBKlvSLYM|@cdOjSM0s?fXvVR>i}KkAOKebOfc2kH}2%;eNzn^pYkr9I9dQ) zeBh83mQH5?BdZcgd-@31Tjc3_F{8KC8Bze7?oa3o8;PRVUo?^wneBOT@VPzG6E*9X zura2;07zARr#z@CyMVV})M>ZL_VXXvS1yTn%Wy5ItxXOQIhwxte|?|bau zgjjKiu$uGY7k_-b&dI)VPw~rs2jSfk(r>UjK#%5FtK?#V12(HzI-r=PNEcG}Wo z%MPdf(hyk)dSRuAAQO@a;POblrA)QCEUq(fsGFal{eZQLlUL)W{si8hwhn00yi_FT zKRfG?A48t*fIyW@r?#zi)2@4i#b{c>GIe8Hbrk8>zaQz)YwohNJJb7UE_&{9N>P2n zcRbR^fT6pWjJ20lKDDIwB`>E+zw{PQ@-lsC-yLE#Hc^plz%a-vNA9NoJt86B?0!HM zO}aXjDTBGx6L;l-QA}8n>LaMHZ#r3!J!jf&PZrkmjJ9cMPrHI7KvjAF_am}hj=M1L z(!VY5y~@d6>lf&o*2iuxw=AR4sDN9CBNE-(GG!;J&q45UU{zHHTnVt&aKpk@XqQf9 zYRVtXzfy&dnLK-B$&@J_H=cVboS)MertA+or&Y^z5 z>&Twsd_bA0Qp2`>O2)e5jzoa;PX9=h{Gv@`iJrpbz-4a{Tns39(n{%QXp~z?WCxE5 zUStxTTC6eHo2c?)?E8eVJ+I?#4%~|=>2s@7E;EJ>Sg9 z)_S}e`okBgTqa9GFzRv*TPkJWOnVyL8j4AfsVp9GbS7A5HoD+}*sQwT3&$iJv9sEb zFq09(CRmAgzvu7iU^MxPgD{-!2s>l3u2niioCMc<0gjksij=e) zHG__4Fk_~qxG93s(m}Yk+-xD51?k5E2+!-;6y#zBZ zLqD4Nl}%VCS84D`y;)3(>WWGT#a7+;9Xw4Mfmd;$&k$&SEnrU`(e5lmTN4&oy<9S! zV$*x;f_*IX#gBa8P*4U*&X`7vr;;}6Z=!S`w{$SxE)~fRdf$b=-~!BYEQ~Nt%)7D zV1?WK6R}*Rl`XGqNg-TvI>#F5+RJ#8&6>;(W-(NaWTtFI(-+K`l!lM2aof{+GHd=t z$!}7xK#n9G-$nm6!q(1;6=fw!esgB<)Rn49yQ{MPihPcPg(_zy9vZAZW~lV2lw6B( zz{fGM%(3-TiN}A?iET|LYAmTjl*caY7~Kc~-$9Qwtm;MXreu=%yBqCi6?zp zo$yrz3XejT>xPmy?zWyusM`q{2!`qY#*+N;D%9+Bj^(RAY~r+?Kqdvi9LXty@lgm<4=1%;(q*7R8$iFu#*p{{bSi{vucexr z{M50Kqnp2oOv$anKuNArLVYQ`lYQiDI=T6gh*tQL?ov|O0*n#Z#$n5LM3VE& zDEK5WmqLzyk2xd)q=yKd;L}M?6?5=Ow<6C0kJ4!$<_pQ{FLA>09uVx#%+*wP zYbOE^oU;yiUBKmdEJFI-R|k7iU(@^n9=@G3tA%fEi<=q0%4hpu3h*h+zpTRjmId^j zY0(O@2TcQACXn>kDT`hIF6VYX&)V&OrpB1(;`w*KwY;)Vb^M4!UL0y*| zJJ;%1bPcJ~b{r$?Ii!ZYZ42ZfgA@U+G#~~(lq68e8G9E7XFj6HnhQ7o z@}HY9=}Eg;1ivzsY$!x~IA|oW-5ZwWtZZbiAs^2}*jvyGVPcG`B5!H))c^Q(3iW)Q zUr&=n4rrq|aH;bc!tM3q3%e2jv~g}Dy+(M9Pq$7h# zACI<#AjNy0QE-rd{$+Xf=#%YCR%lIPW;W3B%R#275 zfov?A`Z<2HM9ekx(FQ`&9wce@_5%XE;Sq~m z5^{0fhB!;>85;GTCl65L!3oec6%KL*d%A|s-Dlaoi>Dsr{wb^SpqVMeno6MJd#!feh)*_ADw-JhTuD=*u`;fUz-H?oN=-u zZd(%El8{6uAK{=kZ6s}*+XHYSG8+&L*Q#Oa#H|EEsJOix%);i~0?x3w=wlL_{apB} zc4B8^rPL2c7iH!y($CKz%)Dy2v}N@lo?r;AO9nPI;MU+!PhMA zSUlrxOTM{YKxX|YV<|ZBni=O(XvXG?^E*MYO71%=?uOXLHjdnw1@K8CZwt80$=)?S zd-2MmEE`uPWDr%vh1Ax{^vCKh+NdDcXs}*=Z{;>jG_3X1L%%_hSPD&Q+aN^w7m)kz zWK`$zU)ooiW;W9kaiqTJ4{YdE!_9eM*n)9l>z5%HCeUcY>##%;!f~OgVw)v|kffbq z6$THj`84S+YltforeZLX;1#Y2f{u#u4A4Ep>Wm5WrJiXX8(=p!t?IXkgSbvUF*&Qe zT4xXa*&9}C0o&@=T9-Sz^>hW>_2H^ucl~5G8ZhZAH~&)|)>5>wAaa)u06VW5ryxRI zN11@RwBE{RbSF~`EvUBr!rLh#818+A&DzjbG^T9h+gvQ8PebEiKx4C%2m3pY?IOn) zHjc54iIrbewV%p!kpNj1an4>bBYwO9o$D`yVEHdJ*;1x^Vp8u_N$kR;t*-Zuus+)r zh8M)A*KA>YCWGb8O~(O6@wv!o^S0}s1cNLyTT=y%c+P!+J1l(9d zs~qf$b;*Rxh`)&B@#iG}QxufzKSe>gx!L|F{Q1w=z{btN`aiG#D+|iO%*y?LH8wm$ z{>@ zJ1?+tj4uFh}@<3YqZsGGYG=tkDUo(FvxJDY#R8!yPc<^pF%J zk=>=K1%kQ(3VQkZ*)1Os4n9N>$k_VBA|8Z- ztsZf1ucjz0OF;PV_}~wi=g$HRS5Z!*`X&&%s;(}+m@M$f;ql>rND1t&1AHrJIk<>0 z7T0fz-Gn622@9nDJ}Fa?A}Fhkwcu}OD{k!|z_eaqAXi9F4dfi^a1+ueu43`UAQwtYc0NLkyCyua=9-`4R=ibgk5WSvV-T?8B#F{T6 zw#M(I8L z#Tk&QHkQENR*n8PA?a;mHZEe2%YC@Vr|-6d08}(SzW#+3Fa&03olRcSuavK8gywhn zK0seg%|Btom4g2zNUMeHE@?;n6w%70V+c6)Q-ycv4T&%RQ`0(%mPEem%9YO2@Z6n(jKW2#?0_Z}n zZ(0hWKOG^>%eVxIC{H7_FaW1FK&i&e;ZaJ-PVO^faz>>@_riD;jdlVOAQg!?6}TM%?uBY zJY@iWklSB?HmkKj>aKm3lmPWcbP;`YrG8hUk3A=NoG?VkT>)RWHD(8|uk1m4^w$d* zcQ-A*9QA3W;Hf5sG!jE{ppB0AO^*N7$_8=`A>LX9Y^uxs9xXtFu5aY#4cZX}ab$Z3 ztIpL+{BGAGBm}wm5RwldF#xF=3P5GT3siq68bUNue`VS~0IRq84%u$B0*1VTR(k^_ zJ{@_czeRjOG#&!x@D}&`P7~g=8Gw-Mpw;~W#L$7u6VF6rZ%|i234hzMW5e5;&48r! z?dX$od!pH?oaR?jhN-Tf1eP`fTFcr*PAXtrWakq8DRU4;^3PCKoOW7@>Ro; z5iroUA`FD+c7tl<0{^P=cy7br1rD|?8$)ikg8*sXN+C7syB7Pvww>F*;d@(7zm1LlEJd_QU#869UY3go^itAV>hJI=&&;8sD+kAKHSnP0{HoJRF)xRdxEt|6eY z&UYmaF@tB~F@iSpb$*A=eNkA7EERdqZq=246lh7|m((%1cY4~nkKhTODT8^+#SzqN z9B;}Cs%i})OA$+G#v8%`0Pm%_@#!m`Wi{tJfVv@zvmF*c{++y8-bBzdx0MxL-T zdqE44pzO$~;L($V1MwiZYmC|RYJWp2LB3TADacNgoYy>QQa`5xLFS2p9*%as83^mH zEJat($n$EaG&kzx)}2YQawA^I%#!W1w84N+c`VOm)X%6HeD+cjS(;3SHa0gBp9XZY zG6w)H-y^y=F{aM`iDh(CLFB$6|CDuGEF?}Rg(83V z!DCTDzlb^`!y zObYx;Q{Hh!i`2O+Fo~k{_V}`1SVq=@X~e5p*ZI1QQ_EIwT*cT`42rvYyZZ*NvS};! zCR&4n&$|sMaA|}>E@PgPb-GVchc*Pkpob(RD5#V=Y)Q<{PD3l0G=A=)o<_x;w?#wtjB=-^!jD_%w$6<9c#V$5)A>QzXE*pM;X_Ec$WCrs+1+)Ukvn zg6@1-qyrakH@VsMedPBmr#=30(w3tW`J#a!{w32_6+M2ibg|ML$Z+t5r$a}GLgqP@ z(l)KCi$~1km4Jd+;|3z7nG6DDhy(3eN7o!@xu#U&UeVv}7rHAO&iT(aQYFA5qd!Fl z`BD$YGAexnQ5^cIEam-AnR?_J`_S|3$anhze4SBiI2(6)`ut>$E6(r7_6cVMMZ=IuT{G&3W_hLltWOJ3sjxvuJbXS4i{ zu1gN9v%Zm#_1$|YbIoeR71PMEmcl9~B1HU5OQy*ytQKt^xKL2^mt)aa3ANCg1x66?mdn9|Zl>`-MLq={Bt}d4Z35TbUn&f~m zgCVt`KPZ{MsSQHq>YkW;KaDFM{&r;A7?h;evATKv9HDgQG<5=@!}8EG#;6C~@(Cu- z@C4Wg6a8pA3NgUG`LUVXI9~ibA$KZ(t`!?rk6Mb{*FA&tuZ`IjK9>k;lC(~64s)MB zQ6b>B$(t`x0z<>SgO=Ix%z`;|lN8fzRR){2Uh-UKaP0N3nk}|M`Q~nmBTzL^RJde> z5ok@9Bxm%$bSOK3X#u}x>ItTKMp;{)dwrsRv^q{&v7d5AqxKgs#Fw<}79q%)^tG?b zuI=VFfjv+;y_H#n94-1_50{|?uh3sx&wN3UC9@dpr>b<;D@cUNoFaQR=sAhYgp^3= z>pL}UuO~nArZO>X=B*Out^VNYp{2SGYvVfrsjSP)(M`GklUQJ{3FdSWoH(Y*a5th7 zk+OKT(YgB;l-&uL)qQgkNjpx}lA&d%m>4?~(e%fJ4@dI^Wy5fX#mz3%l7e+}HMd05 zdDh^f&Z5gfY$_29_6pR-?|^wZ=cF@oC5H!y+tul=$8}*Hvm35#4sD+_O-F82`BLSm zFuXgG6HR~R9ozIyl^z@Z)duU!2rc}ZN7m$#{xsdGi)S6{HDC$%o)`&<`o;Cfx8{nl z<-7=oE(cZILy0a-Mt0yuqG-0y31)HeP;P`mU06|(zJDc?GmhWdj@>RfUFkL+iBy>tR_pjk{D(fa~FLKU-1`Pjv#5Q zYz2#4VqtuU3WmJqF3DZdRngzN03bW>rLvw8e6Mo84M< zxVYAZxvy7W8(f&KOP!c7I=P2GZo4eK$5k$azkaa&-#HDaQ`3c@nybxG^3HY^5vG4; zn?}0jy;l;kCOq&~I*aD{A4Rlm^UaLP{5p2-e&HRBxBFNE91gipzLmx3)l&!Mx?g^t z93$PHC!@Mg4*f6(?~AX6a_X>gI`?2XBAUm|?a9jV|L#JW<}HxP7N|E{yB-ZK<8?@p z%L?u_E2MM^&PsjQB@SSN7e=+6eon7p8f)PKaz^c@Ma5Rkt7r|79B3#^G8JmVV0Q*I zb!+CytSSGs|Af8^h4+A4OmxWZLGVQVyHz2ZbuJ44zsndM9Zi?RbP#`5OCx zx~uBImps%pE%$pLujW^zEU*)S1wOOliR{s|{{D46q3& zw&x{?s7ylHFFm-j18fl__ZasLEt>Qz1qB~YpVI3P9c%ymZ3%OY>>$1STy7?VhJ*5; zOl#uYo$tbfSyRqk!2MQRz)--qo^)xe9jKcojSt>I0fLEiKi-j*1a32Rb8=?ZHp$%c zyW2>2#PwClE57tEjuP3AXP;1e7#$;jc81Mu!cgNgl5`a+tw8SU6t~%t-Q8aHVzJ#q zIkXex?srxwd}b}ppfPmElJ6 zl{m495flb8<=L@ z%0_JF&6uKG!@q4ZfA^sv$gde1KNyfG?mxFD`Ot$5cY#8vG^hW*XWdjbSztcJ-B7n` zM)am)je9>W72>vK+ntKaYC_M`(ci=kjDkW>#-h~sQ*4f@E45m?+2pUy3_HV--y^a@ zkG{Vt@au|1_01D6OSC0r1zZ}9tH$_w<%keBsmlBH-r9e?69p5(*lW@aRRP%#{snK}7t)ipE? zD?vxWjJ=sdLJ9;Nx5pGk^zDseU`kx#HiX5>S1f}JK z+V~F$^6iQNjrjM$80pwTw_P>+P)tIJ`TM}|T@%){*$ctuwO%58t?ljN0O(C9kFVzV z1MTYm8I%<`W&~3Z=3cZtFQ#`d-hy`*mUbE&9QdKGDKsUKqYJ^Du&uELUn+2P$?*Xu z;?zzr>#j?)x9aBRS~iT344%iwG-)dg%w*MFj#`ftC>}u>R4dP~D;i9k1YLc~w~zm4M*z z@K?S%RDZrHeMU#;j1145Mz|TW70O3^u6dQ4i%P&8|F{K-ao8dqvVExpojY%P%Y~g^7rBL4w4Ce_6Fstssq_|wcSS^sm5`m-HqQy$w2fG81q9#hOs|nc6BN9M z`ds$CVY+52c;(F`vxU#kyCY5w9GU5^6<+XIxLNY7TSkm!TcR`63Qm(L_@q6{3S6|O zcKB}2fkA0ge&)jiVfZcmIS+ zpv@wFcU028ed#f7Jtp5hErPxv_8{Yb>2be_h&Xf`|!deO#U|h*@t@Ks{LA4<&MEy!r zB{cTem4%1}09`Ge>9Gy56;?@rO~j~N?kG7J4;k5WiNu;L-|kr)yn03qI!=c6ju*%~ z78Dqaf-9qxZ4IK&c|3rQauE~1ZH3!={X!9!ezawyjZD!hb-EEjGC8RPm?tGL zO3LI)8WZkehFBHKR^4E>+>ivR3Kt>vL#9EAjF%n9-_FDQC@D3o=V19d7}M(eOSIsL zQvJsaVUs>qo7*GYlO9mtiw=j(h5WVAUog&Uu?@S!s(%P!iZk?v9L8LHR!wAcRjM)G zG;%cV_$JvzN)tDGgn104@H_8m(1GbC-em^ZwvWsfSDV!|pTOq}q4Lp+kiJMtL)G(> z#N(8JF8NaeF}QwrHU#}GIYz7?E1U3kj^b7EbI9B80ZKGyQ3=7zcObr&W4-rK)W`8M z;6RPekvRqQlvQ4N7Gn0f9dc!MjeE0Yv<}+>$ z5|`Jk8F-54!I%Bs7WX*Bz&gb(6Wb=zfD7u;2RZ5U>I&9oU+409eDBO?=0V=_%~e$^ z+dEL1x9H2>70T)oyMz*lilncq6=o>O2z^BmED`G)2{RB$7;%Bzvy;35*8Hy zaPnMunWYmOS2-2G=&hmt>Nz6Mj`v3gRfTRVOWJq|6o*LR>-@$yEM4?ptb#o&>+lm7 zgqk#{VjsV{7|Rx*XQz_G`LT=L0nV)6O2H|z8T0mqR7X=faZ;HdJ>wdDw}S%Yad^Lf zn4_8UYgZ5fs4g?yBsfX1hJ|`Px9-yt5kU^SH9%LdgIBeMpCPntv5!3`%2%wU=g!08 z(zw*>@rH&1=8Uo$HDIbsOk!ZJ^DpW)l-r~d8FN{5zE zBEwr`)|C+bkm!ZQTsn=moarc=H(JIDd-5;U1BsxYLS`HB-RQmvE7>w|6^2Zff0UZg zQTfzg{wbyw9f>*j1ygysOU5ai4;ia?01F{kb@@t<3P<^|#_eQdH`Y;Ahhwx%rnIGP zgFQ*p5*#~If88sc^NHhZ+v@-tFuTs8Wvt9WpPYQdfQ*|A?!s0x=e6pn)N$wRjvGx zZcZY+iadF-(?L9?)y=zaV{Vfwt6;gg8Wx=SF+T#<=N=yyPlKkm86UR{jWkoP67&$7jQ1?^HKzr@vDO} zi20^D@jYz&5!_h)vSCoq!($IXa?m%4H4V6aoW3NyQX#N)0*xMXPMZeb1vds6>%^XF z!#XVWdbLb~q`^~=razX_qP@@8t@ot|ru3tvF1Bh&TtWoS;c?5gHzC3-F#626r@;{SZ3?vmX`P|?sTK=l2J-88A- zP&1ogOQT(l#Z0TWV9x2YSE|4d#?xQ`MKDfHCKF1IQXyJ7#L|TnYQYV4h#A}9}U6_0tSI&opF)yNk9jdx!xQ939wc|G>@H) zia&a7f3FjwsF;*EJX}3<4rFeP6iDc^JgwQtE!TRh#iq2|Bk=Yxx?WIC$K1$jPI{`K zao2wKAF}$}BKZ-R)_aC?(Dl0HO=m_~cjivzzHIr|aO`M#_#^6kbJR)~9?ON<2JxsZwmm$A=75^T|Ciw=zO@6V{rz3t3x#x~$L_UVE z3?l3Ls?a%A=%=ZPq<(1q1D;H~0Z8HSY0cfviP^`8W7#N%A0?knPAMsyCn_h!buCQ_ecKbCTgOT8XkirrDvyJ^qOz{;*oa@7LO&-^e_xt%k zJV8CZA2y!vB$uPldwFMoCt9ml?6@#3Tsw)eyK zFb@rpUVv3KCJIZ=r+jnjFapz})(LB8g>17u@^nuNR+0yNlCE1ag5qNzVac^fz9<4U zqwd*+FTL=tBd%@(ycGhvxnwwSg zl)F=w49dp5=_QrwXbg@Wn-WoqqCR18_P>T_(~8i@)UiHDEowu?jNp-5Hv; zVIfl3;Yw@VzvL!Yb{vmNI+;_v**hS301*kFP2n2oBAKrpY51O~HoPr#*RGITs|#ZA zCEjNOw(BpSb_iy@6*!_(&df@#`#i$3ESF301i)AXjUI{UO4nyyXgLexlk)~Rd`Xmu zzm{~$N03{OA5#c}4Y=J=wcxi7Tk!PHs5#lAlJiyLlN22x6dAY7T z*MBv6v=}|)hZRNPJMldeyr04FNVnBovd!7*`Owr!+CMIc<~K7G62{z9YcCDdxGC7rLDeYk%k`+K?}}#a)H!Ay z-t0^-IayF!W~rZ+c=$X@!D(vo@mD7YD8gO}=Mk!8uHlT+4F=}UPBtT3nCyCDQod2= zw)*R0Pl!6xx$BZFJ{|nOGmXteimof8RuCCo0rvDIRl{E$ZSf=$#svu`FGiLIlnDUyuS6plO%eA62w|hiWsL zvC)}+K8GC|N36fuV8BEbGiPmexnEZHo1u;wp8|=tcRFDma3K5XXN;FgLQ2x;iI6c= z0Hc$Yku@6#O>;dfD>9AIo^M%haOUXh0V4!!e_zZU+<4Pk=>nj`SbCx3DQ28MyMpJ5z zX0q(IuBX$hgXKLg?Rp5|e!I2DNw7ikqO6LgeGV5x2^o`7(NC+*9K7hYI4h_W(BUXv z>_hA%??Yt3a^^egM{>3CtrRekR{zcIv>mR#!O|uCyf?uvTfhO&*j!py3J`SYm!U)) zvR1o0RYLw{F6!EnLhQE9>P?NIivXp&K064__(yd#(<@9-Ec0nF` zC8MZ9x-JhZ3j?mYmEtGWhGWq;!MZJ*L>RvrAA5<`tTuOd1*x0A1 z(4+L^IGH{e0Wcl8V3JB<-Y1lrNr3a)*97XYP`m=hA3&SMeD#fKvQiwGxXWziP zY(qr*P^22TA)A-(dW1vW!RB0E)?_6WvK+ZUp9Yfp@% z%!eP=)$ELYHGt5tU#;TRXX*Gg1$}KeHxk@xRd`8qKd}e8SFdLpgkkLWr*7WB*<)>E(RiWGba?2HJQ>Gj6TJqsCZ!(G#ze5wEH| z>k1g4+FA08c1@L4DM{^Z8KSa@4c6WSoY z$A?}Pxz|h_u?EFF^h;l>ve)EkhNb~yM=f=$Z_GP(o%iV;fz;h<*4-An8Qc(lsHsXl zy@BqFXF)agrJDkKvJSDxHVqxmT9S{qj(2l5s>_e4c1*La{cEOvDGnN?f^&Dgvym-m zIsJuACdM@5`=Ysx;%uRJ#S;}AKkqTEAYK<)_A5eJ5rRYSqK@VFA(sa!e;;))fC{4t zstWJ!h;}({ZGv!Cd9FzzxafSbkXx{($#nsEw%meB88HZpLDm$(CjQi=-!GwR1V}Bi z_VS=88ZGo2kcelurfqCSjuQWK4^2d<4CS`+$NZEl4Lvd`Bz8&2dQeI3<#)3W7JmXk zM&hNaKcCCmVZUea)r~!x7s`cs9zM2o8Ro45San?=+CR_)ytV-lg{(EBVKqlKul2-n zWNmccC1@QY)PxLQIq2oBNn^KSwJY(Ro(BGUR33 znn9+O4mqwv^4b0rT=n5(8-cAD9>{CX*YUXRPh&`IG_;;7WqNOHNfrnXh_byO z-OpJuVF%cTruQRKm#h2gpQ26kKrzCKG|bA(<#()vIy`(AlKO!Q63$HDy&qiOO3xx zLlyTSEVjkCD`Eq17*>wUiw^q^N>k)a3k+9{a4Fer<-T^32{hH=5^#x5+YiTZYQbU& z8LCNM90IS7pn>xHp11F3YfR2n`%u`_l2$Rdcc4JwYKo=cT*`7 zmW(34dk(PT#56mm*miVw)XI$iW~nB;)Pa~Ml0=d)mmSj(N!2=C`%d*Olks)s9nZN! z%~uTY4QA|=6t-01+J9gZ$uS$cNGkIIJL6||rlgst!z#gc)X7Ih)-aqmLiQ4}^5Q|% z!pt>ei`8B$iL}$eTmT#MH*Z_uoz}QOKa_8IRzA{Mr}9}AUmT2a!9Ud-L&V3fE%`dJ zMMqN8kb^{5CG+XE^AzWj{GLkd6`{KOu?GkilbiRS_?S83x!VADvtWx8LZp9g=&Q1O znwksqA}HKeVS+P3Qsd=^8tB~jP@qq$HDCDldhE);>gPNif^U7Nq8R8`!?%?NUnS>3 zgi-kuM6V|nprd=dK3Ji-B8frl*-?VdJszeapI_1Y+Z*qrOpbS4IEcqt?@a}Dg zG9RhZ#g)wJUKA<5YBe!x^nkiIlNWdn+hcf~UOPPwp#IG6MFWaQX)^<>IotN9)>y*B z?d2AdS0WpdQGRX7p!z6$7av7(Nkv~eU6e_6`%sThehLGc!GTgvkzpzk$Td5Fj|MXA zO!@R3TR?}}5jsv9KIq@Sc=s7ZHkmwgbS3Umc__? zEl4Ux#+?zQf|H;KFlTtFwYOK~2P^36ejiok`q(Nfqw{97Ur_g9)=T8%IVJuaEAfCH zzbJ&CAYm)!_gUzzfzT%t@lWVtWc}$bvrCXavEW>SXz1~>xJ?D|qtw+hi*n>ELVdMb zCBic;9xbbC#NIr{_gjaf`(ibyMb&y$&YO@$p&LH$lcn*7WGnMED9Sdb#{q6w$a)mP zVleohR5?E_b%lr*Y)h0cl0>MZFm<*j2cgbfnB44!M!;(Q@#vE{R^0=K+Af^Eq&b22 z)xxau+_fLYAV=BZgBL>}mmNgV)3ZM@m#>mb&M!fyj)j{Q9b_{HC9%a=?j(+q@XYI& zV4uK-6CsM;qY?{nhv5!KTX^^()-dSZUf$NJt~AeC#F#Ew$nL(yv{_i^wzt?J>R0>x zZc<)8`?rxcuSmd3X&boeuGIz8f{0V?+U|%AJGy&VHMdQjuN2tWDC8 zkv~L`7{q`Nrn!bHD02Ebefg}Xlk0Kyw*q6Ggy~0sWecG`xqf;OQSLZY;%kVS_lXyBXy5f0F(Kk&3VtICqX-1DqHC72(-=Ce)B@ej{5krxMVWE)c}3St8lq)++E zicM!>Vk*y-EBsWTEjcw<$^3&eHdi-6 ztc{`Au~Q!#J7cv1G#y3`x~YKQ&tP6!E5>d=Yyq-x6uz2i@2NQ&~06x>5krt3~TXp2hH4k3JM5}{|tm$ zHXPF%78m2$(b+i|$%xP}a`&cFaaEap`S{L?iH|hg#XNZZFsVKO*i?CXYruhFGagPE zhVF{J$?4EZD|1I%5fQ%A4~C5Tkc;EiAzzi0NYVOIU{es$atZc!z1qnhWD&2I zNxL9ri+{IuC+~mqSXW-dePPd#mc6*0MlhX6BF>BB2VvNmT~9$9H*WoX2vK_#*Yt+t zGQm&ZAvLEM*`@PjOs~uP3>42s;3nQOKv;Y2<+f)1_zJQ)R1Wgc3jmVc2g~-&V4E$8 z?Q{X}78`oYPaUFuIH^~+`!EvgY+s^PYbg>%pq2S(^Kw3%F`4Cg6{F>_r;{O3Zb1Bg z^@s%w7d^Li2TxOz0%rG)CHWk7^b_duKWXEM1W)3DkGjMwP$l z?7VO;EM>Zk~W3K-ZaN?%?C4iaFGTOwf|C^V%(OeNk@L?ic~_w5oS}4 zb7M)`2U7g=-E7HEFv_hg!$ptrKF4vZVo3ch>i~Iyt`D_?`&<=DrJb zKU%fAizRY3*XNB*{T`Xc27v}!6u#0!ie1$|MF+XbF}3MEYP)F^giMVCEs;9ic%?3Vxd$>A=%XDd|P07@7E4a-dvZ^*lNDp^OjaD6kw zOf^IeET_tvz;Y04|&re>vs9{*3qOhq)JG4ZNdL}QiOCIWO;^NcmTCx^~d`-rWw z_it4O#I>JWOIW>$E339)9x;%%Q0x6u*Jlcx%x5&}>qsG)D5$jFqca$fhwvV_E&Mbm zvR~L={X4(}+o{KwyH6Eq!Ej*~5bio5q^wML#>Qk;`8hjrA^3ispZX)QxVzF)w>E&6I^ z?dju&mxHgdJoyBhXcBIq4+gK@!)3fWCT`1@2k=glLqeO7_6*#~YAG2{LQv5c#m7mK zj%crbkwIn6TUbR$S5O=<%ZxR?AlxY{aDF_!+_f9IFKKO;%ap}!`OlDK{#%Bb5xbZc z4)+ExuoFxezABN-FA$Z|-H}~`j_?8@MYJT!af8*L8^0!KCW>b%a|vD;cZ~UD zjhnL97*}d0P#TL;*2Uv=&XoK72DWathdq{Dj6J7~XTcHn)G80f;NQZdw|i$9WB11; zPg~xWQSt`u)vbfY;!oW9jFhqU!mvC8x}`gj1k;tZSHFRqHdJ{WipS;^yq=7zb*><5yp z$Y(m6hoSd*H^=smzQz8jh~L+f1hmR3ABed2(=72uibqYRHfavGxOIGKm`ufkRgY+C7Kz5CK+<~=`+_fiZ zS;;)2-GDGx7Loyn6!_H2}Swh5vhaL)v zU`1WxWN)NZBaev@Q@D*^%+DxTr9{e~vJr+YoI5MV*_&e{H>c zfe71mxb?r76gFZTdOa$23!%K+>98Wslt_ca^nVoc`M}{6mBp0JTo+e|UDbMyNe?dX zo7@Ad@Z@c70$(r@2p%ol9q6Sq_{!BLeCp&S;Wb6g!b>gyv?9_J6s{0^2Ry;%kI*-( zT|}acL!J|g8}}R#b*VYtIhL!dO;~!#hi^yhFt3emTBE*4DK_&Fu?f*Zh6RT)?*%$+ z!w;03pCz_$#5E81m4QoF_4ZX*SZPZ^d4OOGxf><36vX$uvNok1pBx_|t~_ zu>&VnA@|KfNuT!K9d(iP?z|aR;Nda{0pK5y1SME;0O-AiZH~xn>e_Jeb+%a3u_ma$ z{`d}C(u~V=)3*qV)%t`ksXM{*+E5GdEeKnVhW|{5#{cwGCLhtNB_FwfdwumLhg#F8 zCr>^Vu3{=I^X8duJUlUmAJ`wIE77mE$z;V%EMZ#Q!+MU|k&VW(uaED92b6&q-Xor( zlClRR^QmS> zvASu%gkR6Ey@H|@%_4NfwNDIAkl4YeqmfgT`Q&6oUMkjS-%`D>96GTZ&=Jabv@c|d zWsy*Y5xOl#EEQutmvR&J!k2>2h<+J++I!FPitJCR-Nm7v|3^6af)e&F^_mUte|1Od zGUo8qgN|o79&2D?HTFx28&%z9nsm)d!TBV7Mf^jEjg(+@G*R?6iYGZPA;VX{3IqG+ zf!<7pJWzR907b!0_WL{nz;q8PpRL^Np8wQShpu*;iTFfmF#YYZEi<1@y7v13E=B5b zbkyK!YV;WAtK@``qLmHNrxzs@zCj*LbPX3>7;|J zqBZ9$Og>n7tyxQX2N5#XHN|%$J5!gbHsXcJ!fxMQvN=6AFlZNzIgfO#vRZ3`*Hv4C zHa9K3Ezh1JnDMYDt(1IFOWvMAR!ObniM4~%#mg4TSb=#ovUa#dz-S2~fA5RYOel5v zov(7xav)~S+5@)3@5ntck?pzn83aVDDY#p(K5Zu`=7sX@nS({I}SkJ*14Z~A;|UAGhh`3pVJ$$8c(h))-6U?2yI@9*30uaK@WQ^ z*m?_$rz$P30#t$sfGx+0jppX?>Vh(G>XclrL-mO;<}BPZBpXSdAlc+o7CbJip7RiD zfi@d$W6lvQq|BEVZx#LvW#oiE@X0k5&*0U5wlRBb{6rtaMz+@}&_LQV=`&oOA1=sP zqYCnqSqfW9{;i7r^D+YRD1p>-!qCw*wQ9$2c$LbsV``@bT54*QZ4?HKwNHS*#}3r!u!`{)98fCc-z6IXQ8h_K)CH(V_c!O1xWOgxm%Zd&;?g5?I-in6`O}_+;}9cO=CD~ zAlk0f}0@6f^|s3h(PG<<3wBWXGM2QlBg8PMI`*RIT!aoqsPI5sHAwzye1&g zPr1%@P7O3VXGNU@%Hf*SM>G7V+fzzcL-PburZ1ygoHJl_khDXrIMg7kP~wuVsjfzi zrr@D9_UllpS&`ecCco`DU^?v9N($<%udek)j8zaAO00PFa+>SIkVmS7$L^TD~AsgV0 z9e4V^O222j(}vkmRr0W5SCFsD{F_VN#Gs3M(*8@8~thE{N5XaVZ<{E>&i0+d!) z7w0oGgNKJFGv-Do12=~z)B^JlOQ|9iKs^U?b_LG_{H4OoxA;#tRK`LEBIVy%k}~Co zVhMLzi#Iwe03cytWeU~o2H4TQkp-9oNZ{(98OCuhgs zm(P#t7oD)a5oo$vMi-Dw0Giq>cyB?_DF4Hc!QyvTEf;_nZT_rXxTZ|&r-4^y&ZWAnGB>?3aAFK%~zc5?L!A9|jxt0Rz3cmU8D|MhQ8 z1^PYDNev)Vvt#2&zb3kh@mxschSvJerZ^=kIfZ;)W@B#Fz}Lv= z1mwLT=uSE2{L|eE7z6VLcYB}?K>p=7z$x4;gkMZ@6mmb!XWBV`ICMYFE4Bl0`iLJf z9zfHu-7vI4>NmPW6Ht1IA2A!i)7M@&Za>Wvb^yk)A2CAEpdE;j!gq`SjMN_y9vVQ? z#YAB?pn12Ib8Zce+YCQ?L(wsPTGSQwl%W0JTkJn zHu|VbPJvAhjc971oJX^`{R~Tg!hi6SJJ=&2;9BxSBoFUj9zbgb{Y$a8|0Zo{`pOyB zzZ$T9r8fazF*-G{vbz2b1GRwb-xCx>>;EG>`INpp2IFelqsup%_UrPuWN35zBOcYa z1aIT#6d*(M6Hv(Q%jyTDT3wu4K(hD?1C=m)0S7TP{Q(DI-8_YdupG|Y2;6s&#Cr~cSMLP+Y#%9+r=OB%t)^v^Xk3)|xiG~)U`7@35sTzF{18vf7yQ{DWR z$LLu9OZ>A(>F6Kn03y43@TS8d@Z-?z;`EV&S}rVS3s)<^oWxIM3@Z6|PDM@evPYNg zN0|SGuX_xV(dExa{%Z=j^6U2+hnhTfH!WaC+f-G;d>^M62<7x*|2_nWGIaAM6v*-S zE46QQx&LkMCV=el2OQXW_Aure6zKU2C|IrcUytTJerGU|$FR=7@?d{Ykr|zwL0VUz zZ{V=!5nuGbUt1su=a4L-8d~-YC-4om&=>7>h@|%h+c_xNCEF`fMW)Z1j=!g`;Xqk3 z+BvA*2j0|~Jd07Soy3w(#EmkKhfdp@0NA^!<%_?^U)C6PTuocC^&BzG9IEa#TKoba z^5f-njb~qn$5ognz#CAzq|zB@$D=`o-=I&sMf#gfzWLs!Jl2NlrgfRpa1R~d+{V$P zW$=QePRSo+8&B>g47JfB_RbjSx#dpmZA};*%624;56=+3?txL0%xx-td!2C1;IGLZC3rplM+jLzH_B#Gr5>;hSdcZa#qh6;{6hUVRv(EU&(UsYP@+?x za+9Yc>M~LzWm=+h0pcq_==EDO*2w)c36--I)PHlQS@$Mz#sOt5%fhwAnP1GV6vZfU z4?=y(RSxs;5Ep2(t-sG_;P)m##0e8{ER?XbPNbq218Yb-GWfkk`&g1sM^WLC7RP=% zg%ItTq>;jDI7?WlvaHZEgkEv(X!QIUkKh1o(LC8ty=7lsuM-VqKiTp;3igSR{$xG= z{dd&a#M>FASCl)nl6N_16&BcBPV#(c4nM$D!GPtqb^0;k4!I?q@`Lxyb;REJX%=mV zR-FN(PiFj>I<}j{QoC_Cf`PLG?>QVhO~o>|=&{){eRO@HQeqSXol{N3%z0odqwTDEASsDS8X58Tq_ti4R`jf9 zxY@$_?dt;h#;M`83e2_1p2)vVCBX&75w?k|emHEx71{P!v<$#8XX>#XOSNajp&>J{ zS2j1}q|<(pL*RApeI-3HzARID82ru?x_+bxw=ZdgMXcD8I{jg=@j&jRlO6^o6EP~Z=GDyEw7i?hGfo`ZkkV(J(!-8?X#kN9gGZQ6)*bv3>g@^GWcIUT@80$PzMKn zTS$*|vC)?>Y};F8!`lK3^#P%c3G zbWr8$AP#u7;`Fnx2jEwMBpuA3`|5JMx>T;-xg-9B8T7{~wYWlLw>Y|}JgFI4If^cv zr#z5qI?3elf8{=tMrT)}3OrPLE3eD`8OuCKc4@}UAX_ii%1Jw3zQb-xDFH@LC2&oQ zHV&3Bqo`M@xe!!4cO&H1jkfe#0ouC6&n|vpICK%WtEwlbb2IkrV2A3gVMj! z&(2YL?h@DOMt&~guM#8$v30>>QJ!&tOgPu7)&iY4ka-K7hC00bG#+^3V^j!GtRm3^ zWY~?)c~G>*0jg5Y!kHj( z_y0H(F2OZmPraJSv3hV(QUwQm3wLi=H=9}fFGQ8p<5DW>{qP~1e>R>$f3`#hSI)Y6 zd5EK1wnB39oBOx$tpF~SjK;!YQLqHdp>S7Md$uCSd17ia>Pn``rQ+rMBSCo`0_xKR9!kkHSC>fLz&M z%CG&=f*M!VAiFd}ho89fuZH(~s-2zrV^M&+3MDz-5`WrmiW-KEOJMlNCNFWEhQ*ym zIi!RDhALX#`*Z}K{>x~Y;#CLK`SMU)=89E8zWgkLE!$rpP%V}FjX-@!9CKMur?;il zb4~AZcWGvt_Y#Mybmcvrm$*D?rK$dJ@nfXw&EQu-KY#?8RzAQYwF=SavUq4=Q4vW; zmDF)x+>WM*S7~p}U&^?%60*q$c9?@gLyJruQ%Jh(9ls87*qJ8YL(V+FrX^rS=!-CN zT^Q>g_&SJWs3B{+{3oDWs#ezXx|b0>dzL1CttK`os!l$NryhGk>tC=O(j)L57vEQP zF4l@6DO{EZ3F7-NgkWl_&y$($ESJ0dPK7igQU^$CZ#jeJII?p42dAq7x(&}EvpZon zz+0$%OZO3%=UxsOEh*XPYQW4n)z?^jlCw+Lpt*w=KU{&?4*S^wR-UW*HXiH_yWYg( zb_nN1C2gBK+^%VXEHSuu*(~Jg{vhq2Fv{FbvPO%-9*vV;BEEh|R||c{cIXJtOo=Q> zUItI|d!En|E=K2pL)7rGjrB2>kAcU`0S!$qX1@)*4|O>g1W?~m0R;^966&<#wiuF2 zM^YUdWRAU6b~+xI%ronNn!h5uutCUH8%3d9nS7(~NB@1Ca}f zHmyu(!CCoUR67jsCC9&ye+}ezjoby#OftZMf|LC;!q$oIf@&#X+0t=}Ik(9{EYxPB(%{qK zS_KawU`P!}wV%!^fK5W0$=>rkdgvU1j;m|4{P%4=;zITK+kuRxQS0TeBn!F01Cz$2sHa=Q zyFzxd8=^xFq~y0-!-%EUIUUli5D`jOK$jlo$3W!$LO%dS*s0AGaY*D6@vG5s1@?qL zxBo?bhd2BQ6JGS^#w>wc`wUp4SM##qp0uJ${ZoWInGG{_5qpc%IZ~804}}-|30_n zQ{tN!Ei&LqxVD)91d3fRj5wX9f?(_~a($N7 z>8|Js{ctUdZV|zrTngd1KS$Ifh~(U112K(Qsl%g2-V-+ndP=^uW<6SOGmw-2;8|k= zD{$TBA3SOA^?6hF<&$*08T(Zty3)*>elm7fOR+bN`VWbjD^J+k%))a80hBbJpr0I4 zd(91BKU28fg@2lT9Wab+B#9BPTToWNp!ZNpVbi}txGJdQN~!Kr>g%c6)YvVu^Irk# z&B}A7R8C)$i7BP+lb7ze-3X>l>semt#+f?)$8lkH;}O6}oR(rff;g&Tfq^zkf<4Yc ziK%`eNXT<%&B|_*n>*uT`>qy4VPJTL@05!*SD{SHPKr_7>Q&)q9ZG$xqKWItmwcW5rKDDC?^h?$Ac8fNq8yjVLf?2=ZHI4wra?t6;T zB%ckK+=gD1@dT1f-pDEV+vboc4r99!lMyoY6_4Mv;|6QFVamPSaR<@ubFUpIixp)i zYm+Ry{|z40kA|r6Xyx^F8%5p?>1tv|Eh!wo!rv-Vm8v|=gn|g3mdkL48yJ{OYke$n_66q%dN0uKwJYNwLdhf)o z|HIZfEsLUUTXNdAZQHhO+qP}nwr$(CZLDeQ?x=`*JKr!K`siqxGL`iP_ADck)Lb(h zzfk>Ntw`+Q^PuTSYq=S5GJ*y;VH~s9_v3A>^+hw_7cGKw7}FoDDr4}GitzlWk+NqE z-WXN1DL0j#4dQv>)6~@xj{A~xp^8t)y zkL0pItNqa>36%&Wo*Z&o=0@am+E&ebt53@NDRRQ>7%1F@P%?`-`rtgT4pQ#KVE~>B zFvl_Eun3S6Fo&~Bm$uX^lRgo(9ab>AxvZ&b4t*hmf#aFOB{%0_>Dqof4F+;=HuLq0 zIh?pTs|Lt@O$hwMN|03pMD8N@%ZY)h%g}xp5e64Iy~wiM>Z*AE{gm1okvf)@!1rZo zVubg2*rFVARiY#m@Maot<9k)#3cm)5;y46lIBD8?vdc5VRmfpxlTxlC{@gyP{1+2S zb`_#~dVUEKO==*TsZDS~4tEA0h#mDn{swEBd0NRW_j|LDtMQI1XrqxMcIgf4r1ov7 zDr`U>&XgL9aOZ`evl!WJ&Czi)8i(jLHEI1<>hoXr+LdS<+soK`Fa`XWcR;sQogDea zRur1L^_O?~BDCzf@1T&1y=QK~y+UI-qEYPu+y2%>Pnir$!3f^r}_VVvC{Js^F z(e)LtYGulq)Y7V6gG}HCVmWg8g_~tTdi{~w;&_^+{2(#RN zn|AfaL|^>4By-#c=PA;Si$FQVe)QxK-GcmA1~cAYalD6=g952~!U zSAs)l3HfN)hiy<@f!`kyAGtSiH?vt;;k0WtL|cX2i7%V9OF6+= z{_HnUG)u`mcP*rbe9?iwH#)2G4zX*6lTdR)hfF%PxcLHqoL8H4%o!0RwGdYDXNclX z@P0cz7=MM_6%$EaKghjKpsIO4F}I<1Zl^(YkAnmXx0T!3`5-Iy zFBI%NyNf<Zzy((p|NDDOxxlk~?@V|ac@ z;-i`$#z8G-k<|#*>zAAKINDDVCOt;P`hD3z^9{8`fgCyr^Mo#Q+@T%D5v=1Bk?{-` zQ7g!;IF=eD91}n`wmRg6&=lYrn!%(9v)$uw*}#>AlZ#&Npfn`gxyC;<862WgSrQPN z@zU`9C_v_XQ!R&-oCWa_krnTKTl&rYKp8`NEM&+7)o4U9t@j4Y9g*C<{ta5T)E(ACOz2qkxIZ9D;GV^pTwSp$Ll zQQ-IN@@pBY>wK@LPgIp)r`?&%VS>4kkpWy|LPk51EPJ3nhU!Yhp0bx-U*}2qkV#AeMo+{x^h9h@FLMdR}ye$qUo0 z*EbnY*YEKFmf7FPv^LlK0^<~^4h1X{=HY^Zk%2sCQ#vJ48n1BKmsnG%@k-ukGMT%4 zL`VjYOz{u7w6cmQh_36G);s)nz3|~zCaJE}7=+_j)fgWctW!3V_Y)%)Aq*Wj-UGUb z>MbRS!!8hvjUL%`j9I zv`#WNbfsh^iU+R}3L&N8CCT?D5209WLYP3?e0pvQs2w>rn#b|2%q5W@dv%-e&x#y8 zkWu~o+|-1OE?Z4b2&5IwfeB3h1iWUqVH!rG@8z2aUyb6BSzB9JI zS|7i#+PRXj-Sk7Ic6u{9cy<#31sUsOV|4WRJ#|5BcM=51A?#W-)DyJ(Y$z7l>>y zhi+d&y(iGZy42vc?mHj3N<-T)P-d_nvOtjzMcP7*sCWrAA5#WqX^L|R8VZE}jFLYF zhdoa8HX2Xo!Y){IHJZ{iXQt2i#W*e|3_E*7^Ta3QL&kA}AfRYUwmvn;NXm!Mf;`LD)Gr0JAyUTv%j6NY=HrTsW) z<600)g>j`PxSo%omu~<}6!CZ=Xa(j^*pDx!wtuR6Q~haqvwX8xh{9mqMeUyR9^WVV zjUddlN3xZCD`HB=oP+n1apIZtYadk8hQYT>UV^fRGWnNT4@iCEve-i1hT^ES^{jPF z;XTCjxf0r%_Kw&aI4G~jTz*7-kuj7--N&;y2!UjoA42W10b0S;3|`nXjbKUfo6t4r}wk5MjOg7}s*iFK5vkZ>l5Q3&PU7p!s;+UXUf$0l9Oeiusf^Hz2A z?taP+As?ob1(?6kuztprGzNDytyn=_UpczOKXi?6 z*Ss$@_nnQ;xh&QfkI|eM-kdM>p_^Z2^_*@U<=1y(4L09WT{Awa*sD?X$8~1UI9GQ# zEtw{RB(4)lirqX&uEP2hni+M9i-7iY-(C18no8h`bLv=et+nonquVIvVJ@s%q(fvk z=(Wj?J7`wy3yvz-mkH2wj!?f?w^xOV?$!!r{(Igl?MM_J%SAjhmgGt0!{i-9}#iDu~{1615iprVs%QQk(++QH*T18PaZ5tSEoX=W6D&k>+$?aQj#A7i68d z7c=>xYx&7QB-2OxO!{SFqD7wkQj?fOse+B(eHx638!NQewNwvn&)DzgpCdl;4&xUNON% z)*(RYg^VvzBEKH+Y|b)1m$@ET=!<-@)(qM{KLL=NGnO{|BKZn_!&^BuD~dCQMcUNf z9D@P=A(a=xRFF#YhasMs)5%izi^>|DFOBal?I04!bXBCv(|g|TvFCz=bT!p7eMr$I z6fyq|JjE7)>?o^k>8RWM&fX9+yyavEM%pXZi)f1V6RNk*%t#JXrsmm zg{O0_92{AyXBmce$;PF4a?9Bp5s1S-BNYPMNsz^cHa7&=w=!h(FT_T(jwKyiv{oL@ z?kOBab2j`VyMyeqP(<|Bxg4S7txkTru14!-6(k*6T*|1xvSWft~NQ&N5{s1*shj z7*MmqGQ}X_cq_yt{hxPpf$XMCKmR#S5!$Y7vb3g;8;P&S{LvG0QsjET#Q}K51NG8= zoO1ecNr@kd*sq}&#IcbDY-N0%nLCTwCmcl>+~LxF$>I`QOKT)NEQ#MjY(N7d?agtN z5LukhD{cq~Jpdt2wf>=>;d$d1&`B?hw_T|zzIt)_)L1dE&N;Y8nbZEPeTR`rdqA#V z2x*u<>#acdWjHuS=~LXW?G{xNp=)urbnC=(Zh?Hp@)T53Wo~2 zdw8Q$%VB)if@8X?9}I0-2%$L{YL?&PTUQu zY%M}Ul4wyj-hG@pMNr!gOm$>z@8$hX@37i%#c65xh*h#MM$DG?rh0dCP`G(3n+!c; zDV#)eq9g^nC1JwUYE@KVD35rd|V%vv$0ZqT2MzAi%fAC=R2uL zc_^&w*#_J0%k47RdP#T^0_yFw=+pX9y01s=4=rvkkOiQh5ydXCyxLG#wZ^79z)BHV5 zCyvs7+clCS9{Lez=gp#Nb9*KFw2Bwk!g~!2> z0C&f2!XlUG@=atWRwT^VQ&kT>p05;ddei?1H9oii^XeKc5^*GI714`;aW2)r1jm2; z@vroVi6bR>78%-cP!o@IG+w4J2V=0woK}Z)u7Mz8c@!)z4~ZH&s)#pf%ghOVAuKNW z1+m+3k=W~khK@0r@nq+}9wykhtlal{S(4y8qGSP) zjtZysI|}h$K^n6adZXTBsyeJ?@4Cn`J$+HJAsExIb%L%(we&6{I5aUY2SKho7;=v= zk>RY+V(_1|B;}>SuO{_EOPg&wIMLuO#&z`(GpHUlzRbnRPW0cD6LB2gJV8l*}S&ovOCfH?u})Dmlrk|gQPRA59=L@IvNJ#_F(Tt z;)G&T$QCo5)E%XwN*13Ns@OnvShVW7E{{7g$(Q#fVEDF{FQ~;%*yu;A3vzer$YZl7 zca?LR7k+%eTzfn(j8lyyhsnJ{7H#Y6=_<2LQZAMk8|_qgFq5?plMr_a~EDH zMiTYMON_Kt&TH>2g`ejs5%LSC5#cgr32o_)+qQGp_K;+&f#OEuAY+H2%572;xjFSE zGw_4t5_R1LDYs2i{8#6-N)R_iC=bPMy~(`WZtzBkB)&n?sCcpVyUZN6nTV_J1{`N6 z69;eFZZA^9f*M_AXTMDez4>st&5U@VD;V<`YAwhzX2Ys=xH4c-RGDUY_QgZRkGTZ! zOvy)^^~#<}u#aAg&~-|9|3JcjfcQ6xTgFx9$EB*L6CC|p)n^6+8xvom(9kvdyWe+Pr|YG zxmmSQ@usv$#G8^O($FNQo`2)AGq1fl@yE8_OjZ8{V0FBb3{Z4>H+)x0`^3a^8Mk6I zmiZ`(#^Jv@Yx|4;o0d0sim5YXiSrUGk_m~s78f$BSlc{zwdXe1D7m?LKAfDW9KI{2 z>`ljg8H*U*iH#F{!pWeW2m&&I0XbodPxG)@4K3IA-%Wz5gwT3`k+~Ec5?N?^2X%4@ z?e=Q=f>bqjs9Ak(l7;>aFR%Q()e&y{TdIz{v|-FMFF4I!9s-)mWr%cjph}?c8>VXV zi{>$!Hm>7U{rMjKzZL|<%4rvE-iQ5_?T6?G$kNznbmJiilmOFxk(V_`B3UI9?WW7@ zv4(A`a_li);&dQh;nG0JJ21j}IM~?(4Iw($WEW#A);-YzvgW+9i+jRfFJ&uDl`is^ z`F?!>0tBR==MyhqQy}ai^lFDlwVeh(&0}jqBeSQ;%w`@C80W{I=W7@ZDKH{cw zcNg8R+gt9{hIy3!oi5l>(9-eWL-DYXCPum9zb{X%J1ebK4!=dV_*-5FgxCSfpoQ-a z;tiM_*s+))#a^P&+e`CZYsR3};a=VJ@(8Z?uqtEy8UO% za>A^U-2YI@rX`7M+bsH~%bhs6CrP&Q#y%^oqlOui@?4w_E>pX^H@`=UHCg1Y@v$M2 zk4OCE%fRJ-IGMZ?zk!wYTXx}al)aX*i!77bzN@T#z{R2yWK`SWl|cnQsx8gcc?iK`~so)2Ydy zZVfqUOijC7@5=4-?*>p@KNUVfqu}teGKbnl+9vZ%$iHaeTt^2q%+$8FBW7bv_B)dc z*OVheJc&v{ykUkqM))C=ApLT_J8DU|lLAs5m(gk>3bUbkaX~@Rj9**nNBSrJMHOXj zA3jRl@D3kKv$2qH4>$c$ZE1l#3q?u@L27AU28r@io~US7~ywdTq&TqT2>GpRI(1Zha^(VJMvrGB69{n&(~!^Y?LwmPB9UX z1zyFhckXSJS;&8TRB}wB87VR*sd9dxQjzOm3O}^mp0CGpy5i zlP4D^qn**t2b>a0@qSLuly6IM5Hd2Yxo#O*?2|x%+q)>374h>oA-lo5d(!1rMaf8T zTQ7>`S@(ooGRJ$c?N*Iae3rQ%Go;S~Q!g~Km#zLx0V@4#SmBzByAuvCV zba~o^TwbcTL%-xtmPZHp&PzF<*4kwnF^5*}y@_KdOO9p}}Ff)JP3PFJ;Tlu^#nBSz~<4vzPUX7QX=0W~F{IfA4U^*<} z)*immSfK^y9+bq1$DhE+W)+3-u37JNOWtve$%-kouU=OBkEOyF=+&Yn@nEy4dv&w1 zOMOf--2=5#r4takU(6P$KKhu2qo}7#BBiv4*3M~aOGr5b1n|LU8EXDra0On>=<*xJ z3hf~g2ff0BJzQ2TRU)Q^L6BN8V=ktAu&{ZRmJ-{Q>qsVEp_dG1aOy(CX|FEcb|u;Q z+s=cGrc5*ckZ0JdvK9Q_0SH5&%Dq)0jn_X)>8sIcT;W$~GZHvJs@7!umUCm4oD5K? z<@RZ^tQ%F(>6;p7Ot|><4OnGr|1kRa4w?`b)*Qb=9iER5yxoSzIK|h;r|_V+;hNaM z-NG*C8g%{u`XQRu$Pj}=w64L_=z6!a1kCE)s99r&(5R?$LgMj_=yNo z;6*$)k1F_%C%aGSm06!@0x?ySZs&)^t56=IJ3wrf3d(TsNc;!-x{Fb}blK60{x%#f zu@wf1+>&seXo|5){lSjz9bo^+Av;i)|G3*km<<=vkzxbYu$SU7AE}TjW0RfG-bGAU zHa&rizVj1K+N3S1TAR#xoqwi;q4DYf$FhBL`dgTK2vkcS%@)W`>wm}8PCQisNxgQB zOQK8lK~%~27sgOJwbocPq^c(W08tMsACefEuH4u|Wvit363Nj(ZI*YWqR zDo#&_U3u{NO%@aH|K-)IlZ-_@%r+7{W}5#9=Hze^g-f=4U2Y5whxIz-z4ThHEkw-K z#U6txX^5_L{HQZz1zn8@%LquHrZkp_C}EZ}J5Qmcv%i$K6)|Ek$6-_oQCtyQ2co$l zU$4WV0)0z9;s~Pq<~i|7Q_bPFVphNLZ}fnUtc*&5=T%^D+z&I<^y!4d2%)e;yJm_x zPkpKQk)VpJ*jSMrCtfNAA0UP8e6ZLC&vU95`VI?Hdaki%u33`sdbR+8^R|OI3bD(p z)JdV>d3K->jZvV%j1Aw*ikY7UZ158_#}LJQwt2LAapmwzsIF4gT|9~6%ZY=&Im$YZ zESUd?9}QD6C9OIRn<8&u|Lo(s)~QpVZH>;xcIq17l=7>P`jc5AHcQTo4y9ew-35DA z@l1YSxh~(EULVB_==V8P5)2reDh9_HpL&0lXjzs?V?itg4?$}7x-{?$nKtllpNi9J z44CT8HmaS~X)~D2AZ-U&+7E!Eyg%Q?vXN|=Awh0MX|UwcWl|RAkA95S#%$*o+82vpSmBsElG)qW@7G7Ea$bcwqvFX~SvO5_%pN1yg)r%GL7@M8PQkB2hp*xqPN zwRE2GhA8uR(c>SNxHZ9t#NN|4B-K{WZzv^WFil)|YvGX*O>~31Ncc)FO_E z_)qnaz>mKZt(bAf(>M;wjm|4eqyvJcTP9#Lhn<;|ByRHE1hSZ`P7U25@4I&ekvitr z;x6k@rTPPUjt zRpY;P^n5{AKsWA8yvwcvn1zXtV-GNML@|GoXO|ic*@!aDbv4yP7q{Dr`*QKfU}wfY z@x)KYWNgHUHm`~GytNszP>4gX`1j#8RpU2Kj{=@?xz*d4_q~_ELSR%O7fMnB{3$+A3=nE`E$C5v>G>;3q0`A?VSV?FPIHp< z%5c86+TsO22X`)+QkT?ltgc_KX68DpO!0ojgfALN8o+jsxQkg;nu#eg0Jc-_1D~^; zl)KDPCXDu&8EOs*g7Eu7!T#T|QGEoI{vf{ViCbOz47_~@cy!k|!bab?mt|1i^v@R+rPCN5)En2gm@84$ z-S_=nSNiEXqP~H9pRt5NJV~3ijgTo<$~Ye~CWiEc5ppV8YzzLPG{qqX!uZ&iC5U=7 zdodgH#dbtPo9D$81J_6a_k7@L?M+GnkGsd~x~64xx*um}L1Zm2Q-aIw(M)W-?@brC zUnse{$AuX9(num_3c-9qH$%J-D^x!`oN(F~PKApRtf6W>cFAyecbvVnQ%L4=9?w#| z>A?$S`wOcX1*P6kbMh%>YvejLXVy*Mu8IQ6HH5lGMTBx+H$cdPYog&jw+f~ZiX^v4 z5ukO@7*%F;`;tAHU}9}tiX+ozjraa>PQQWm7;Mbh`GLt|(L_@ejjFngTInh2ZqKBL zc@X(D4BoC((ULp14X^c4`If=%U0WRE-Cm#DKqZKv0Lw*+y)8u@C%s|%2mw6g66_v$2|h0SL)R+r%2GQID8FijP)qGfmSLit}=)B0uR2D zOn!IgF#Mq~F=234a+cw(Xp4)bweM+VWB!ZAED^aA^GV*AKM53GFxG#F{k$T?8}IFM zsNoLOxT91%`r<4Rwk(cz!gyj~ z`|jm@7K;}-q9vpLxPB8azq}WktH^tzbizHG_2b1i4_+5L9`NgtW*+D zRgCXLvIjHNf_(w8+GR$acOFP@LAEIoum+NwRbp^QK}Q)^vCxQ`v@K0t^3Ml!Y4Tp_ zg6Czh#4Cq;!0qG#fwy|noQRj^zGlF@)FJs^Qo?Q?qou^Qgr@W}j@^Ex=rCic4o&{9 zPka6o2)9QF4lSispMUDbxM=U7gW6xpr5nez56UUwEdmpzguRx{8*fqDPvyU%1oOHD z`Y@`}rw(lRKQ6Y1NB_il$Zo2TlDjse@yME0g(f7P{*|qnci^?ptCS@bcP>=mzuUZm zJJ!yJl`1c|HwF7Z^p}$4KM$BX$PW+0Blcm{pkyT?`V)Dr+$Ht87UY#*r9xgY{Ywsx zZDBaGU1fF?!QmJ-K}oRPl<~TbTkb$1jX!hT9v7AUPpo3PW3E;Qngb)kP2o#g^0&e!sgEnVLH`Omn5a3`E24q^Z8`O zZV`ajq4x2a&m%(bPYZ!S#dE){sdKSle^a3|0xo1*Sv&m-M}~=E z-LXl_4WA9ePhUo6CB_^qA=ddXgGF5M$O9f`&+9tb{>}f3Z-K9te{lsTN)gN6CFV`b zw4KS$Y1UBvIuY!Wv~>xDF_-A{Nm|E87wiYmyWK|MTDB&wOxIo%EfFnG?v=M&Go(T=TTh zdu2{C;p2sxzT_s$@b&hloy)lV9x!G065l8CjSp*tKAa=8OO^cvPtIe*R~Lf$0wy^o zm?*ePj_EPm=p5d#Ejs(k3}{G$x$rGb%=V;6^52K5Nuv}UQOa;mOl)}IZ*6iu3$WV= z@*DGw`y~}!sM~uDY^v-adN6WC9Q!QXmUjK>k<8h_t2#vis@%^L-nYUxTq-eg(8vpE>Sditt72dsNV06ZsDxWVeC~u8>3&}Vi$;&>D>GL9dUtoW)DL3byv-_ zZoOWe84)_c1I_Ax#qWsR9ED}_vm7(pWv=mjge*$r4B+0@(S>CM?RGbwazo_qz(5bR zAj4CSI8NC^!7pK;ty#%8+^vW$=JgLXQLnz!ufA`g!_L0bk;6w#{DmQ|+~|zf1XNp6 zKg`lQcWq2xiN)jxu^pz=c(?i(kjqVTF+q+XLT2CbeR^$Wur%+8g<8%6`uq&lJ~hW) zU#^+&)OlX;kMOQ~+40>TX|>lGjX`Q+Ar4;KVw5H9J?za{{>aDI6CCyQ?N zl*toaNVLcd#GbEiCK_?pO93k=q7Ny42?}>rgR`)xZ?v0Ch-B$T{Co}5yzxGw^a%?Hg7odeg!}B9i0X4fO{WZ0Q?oKflBF9N%aTynOb~#l zCIh_e{$E4oP{1XF-QcqWPb(&FdQiHPp@%9)8cV-oa5ryfa;R@^Jmgk^v4r4F!!(l|h~d!D%`V@wOV$Dvvb8*)<*`gRRMvta35 z_%G8PD{(mXAk8GZ8JtkQJxH;1aHnMXGaHyV)2u7DkJ}~d-Sz;#FXoUyzrC!xHKJ)R zrcsh%qt}QVS9zBV$g~w+Wt5VnY0o9k7AYy|dw}Ez)+Cj*$|65437<$cstBXv?U0jR9gmpqGSG=|TX z^dF0L`ONy*g48wp8>740qT3ErHs#J9DLO<$nyn`FHCUTraw|nJ@+W?~sLlWnKB(k& zNsMl`QKPr^ib*(Eh3YLCM|`Fg6s87q(=N@<0S z>qZ}*5^Yco7?L6f25HB<8($>~zoe>^y4dkq6p)^n5ROr9?$g!6mZ5uF)c7!`|@qd&m%MMS})(i_8rzYJ5Tz;bWw z%6WZ(L?LXb4?^s~dl~&Ug0W3;sMD`70?*Bng108(^Kv~a zc|8N{Y$+kjW}F5;7{A9j3NikkMiyo#f(r7avmK?PIWm72PvsEi6V-$#UelZCq8KYDeWujT`^fXABI?!Rpk6zqHk1o%2G*s#pEa^LQRYzz1K$h@XLGL*o%5^$E2TLTV?!w zkz=N9z%)8s3DI%kGbzoiprG`eQnSL(g$Snv*-?F`ImZs%H|h^P#T@M2f652c{8`^T z$nds~rF~8|_B|G;h(Aa8D!aRJ3~H;dCuSPEr1`=BNz+{35(7Lc71VdcJUvO6n)k>> z#y-mGIQr{HzphvmGS>A&>gB_cQ;)xCWt_)Zol$V}N**nRHd2-Xjx5MJ@i^R~{7SM%8+CdVJk5E^#+`xDf@9d*$Xg6Dwm5}z&zjo%`e)9pIAYoob zB30J;KMQw)s3jc{(qz(#j{b{@ug|O`pCL%j!p911kL*jPh0;x%%B0=_(}MS6W0hqW z2O7?nys;pEI!5$U(dWV!Z;Ni1R0j+!>u5@5g*^DkS5cy21Vi2UJ3H%jnYIrhw<<`R z&_^Nus|B*zPxu$)V(+q-lK>>lv-Y$ZFQq{?OeEQ^-0|-V2_^he1E>5A#}0~%@92p= zsrb}90A`{UwIF4Yee$oHtpf8k8UQkw0r;(aI(u4(h*AJY5Q`a>a=F;Vi~?x5#9&BP zVxRsWINV&zabMM+89=#pIll;OYTeYQ^>ixf*y}WTX-q89+O5)JH?5vUp1atmDJhB( z_O&+g*QoC&)GfIV1(zgRg_J#3K$1PjmfKiz1GyQ?$wSDbz|tNV91;zzIK9b%FoBNw zco{+wp&WG`CN#rIrFYHjknB{A-l~tfGy=H=9=_ryIc*qez1@u1xRvGMUPGlj^5ccp zu+1P~oG2A5U4C9kwWLYDI}CE$z|_09+k%Dm3R`Vy0?KRG`Ho|}8-z87$Va*0%cKY% z_@JLQ^pJjJ9mdbv89B)PvEiwoVfW0sSrr9Z0JX=fz64L~HdVi)7Z8WpDu5B*2;{Y9 z&wt__QqRQoseUA}dSj=Y2gA3gkbr^T$71BL*IS85$mP)k!v&av#G$BUc~i{4q3+XA zl0vi#l@ow6K74%bEf;Uy#x}4wPNni3afC8g5jvh?YPo?E`l1#37Ji}>(OU}!fFr`Hlk{&#ZnDx@g_V!uJ%1zpCHwxf#O+ag!(V}G zE=Tzqx;$#xPLkEC@+vrZGFGC;*&BD}o$`6TMaWS6CrUK8Ftn!EE$#PuI=x{jsX6^F_}fr(#YzHE)Hyn{JDBbo)aW&WFflLymWR5<30St10IJOx!Fd)CR6jv z0T7tu&0)BAx#ydhW7PBlL^vHRn=o%XIliIF6JoG}nkYGA&*13(nG9cSSP)5QGurT1 z$>EFuR=1M!;%0@HT5t%)h#`ibgMSb>uqYxTvK6KhH0C{&vx(lSyuHTpS4^@G!86`sBHt+~uxG7&~3R3@N& z+{)C-hvPdc<1;Lo=qlobfX)x=&Y&v<-r3cWmpJW-jP*3@)&4P8q+pd^F8$@{YY17e zEvF}xVXKc`3^BkY78n4nZ(R)L&Ey7XU}cg|D3&h9D$2(s5a@?~rC4_#DiGGl0*4e8 zkGZ=QoP0JH!wX_yTB~=vQs_i}M>}iEBY>9^Jo>MgqMA#+(*kP{f3!2vexZIN7J3M1 zq3ythRR3KhDcPAjnv=S4?NC!$0{MNcxeC$rL&-eTUN0X@;}R znt+IV{1^Dny9SnZogAioPsPK>yq_fckl26*+OzWK3xG*T$~OxY z^QmS1lp(s!91kOQX+_8KXwViKZ+W?EM&POa$adVNTZu@$mjDq=PBKblZw(7e9kwzt z@RYv@aPD7y4qEJ5Bb;PgwUAmVH$3)Xgg4Fyq7y2UdKwX_-5$ASREDETr#}B-r3s6P zv%&r^oAp+??QXtmod{d_%mSxdt^e7zo~!p?oYju4FLEVgeT`V!0B3EkWP;D?l0XMq^0ZRvgYu7-aLgP*$G->N^;P%3-r@apiWXQbZXt); zd=8mHX7DiMB;_fVG{E%3e*07o4uUiDtlg!&CWIiIW(N%zsqi#kkHf)E<$9Le^5PD3 zWueSGS^Pv@yk93s5p1%UWb$nl#6h4&vZ+nlrQEX{w1bJP>c*2mBsC!0gvswwKH^PK zJwdQon~yd1BEqAueZ+VJjZx{(REhm7dNc!tbke1tUBOLZDsl1*Asp32w$Hb&87K-O z2;C~dc=TCZhA+1n@|F_%2_o~{7A+2TK~v?qsZbhPA;1zVJLNv*_RLwz2z+#K-#c=} z>7@z2J=hbm2y|1b0~8l;cVCdEusTXDESR3s=BU4&ov@=H1={U$eHm^2V3-3@t>=zn za^iN7XU~5&o?*Jpojsq)AqHxwp(d<1K$dj(gD0tEqH}mEN4>mo5?znH^tiA;d8%8+18c z9>HLKsJUFs!FZ07sr-(32=N z=ST40J0)*`O~)Dpec9E}wj+kZBJI<683$~Ly*g%U*AjR|{HphrepL3Q+mm>I%&NK8 zT1ZMcWw;}me05JJ(O@+ynm+Zm%XJaBZ4)BCz zSQ@up5Nn|q-tYT0X=AbSXXEJQ?(MM*&;9r`8*60tF#>cR!_1|(45AdKNA*Oc+bzhn zIBYm-Lx)xg393?a{wE6Frxs=ME&g|{P3xj{@MxJtBkPX7&8wyXbI&~y*CPkU{yRSz zhlYRs_dj4^ER6pH7RJuR`2XQxOayG44F3}q#?HdY@&8C+1W@#1mNqV?P6YH~Hij;y zBBsXnCZ?|kok*Spu+{r+;A=lQNT&H2rFt$#Q)SQ8*xD*MS* zLG|&u+3~T6#Xovw3&`^kv4itn11uZa;9za6ErhsS)5CR}qkO_#O5dQNI5*`6m z5c2*gGN7xo1Z+p1+anmjfeRYoF`x|KK#KE)a&`ipDS)7W1_1}~8F0)%7Jxek5%m=E0GN|N0sN5zau6aS zZ0Kk8fc~KcctD93{y{j45%L0jUX@W{g@Kg;xUv!|vjRW>0$y1DSc(_)n*KEu%2CAk zmmPx_{6!xW{1M&zFZ!#d?DHoQBt}30067Z*4=A8x1W8=b@3$b%Nd%nmGmMNs?JwaA z?)g6hcKmrv00#)<{x$d>H~=SrqYTuBJ>NeI3M&Hml7K`B0mLNY5sdWHB!I*G`};fn zffvSx{X7na8aj=49{Lktu!qgSM*#{c{L{FF3Hociu-^gtobSC5CS<^m_x~*P|9*Ea zMj!$D_s1{(i+Owp9Qqs^8)(+$^G7?dZ|WL?j07ay0U)#B-vd%e@CWFh9!Rjkzx`C7 z;olBP@YvtU2N4_e0caBf`lkhd*x%<*-2G=-Sw-{%1S(Qe3J7FWGz5U?=m;4Q(_wM{ zmw0^=EF_3{(GUB_Jl+4X9}N=vDVQ69W|k=DlxUYRhJH$TC3=kd?sHrmXXevPwBbyQ zE6#?}pr;-&ybc_OtQ_W}k95|^&@i<1TlFdlj7@;Z93Fq5klxjPq;ok;Sgu76?K6jl8hpk$fZcQ=K>0KmS_ zZ$706V-qFHGE&JFnXb4f6N8G$wWHmzY?^j5{ekdJEHyi?Ruj0s==8g&$I|#PR;1`T zvgIJP^50X=*8{m#hgUCOF?FuVv`AcVNJ`*~(BQnZN4^ia8k@d{zB_sK?fFEnWxLQG zS%SZmJ2}LES)R*b2-#z-$DLg&Xm6uwVi2Ot{T_$B&@*^;%J;h>70OfDER3N}i`qBq zWdG;7@>vacHk7Zod0x%N9U3Z_{1V8ssrB|f-Qn%c7)Pimp74#o+7XCpIDPM3X0J`WCFpbmo-rCE@jT4h_9^<~vpaj)I9M1yYBLtJ zDGNB7mu>hxa4?Hi=GL*g=(%gyE44OWHXxG*QCa($*W_+S6FYc|IMaPT`jClOrw_B< z8>EUOXyuDNG&zGRv*5TH-HBkJFUmC1Mg+<58L_RZ#;sJ*!5T{%yBc6!msUcR^uB98 zXQaED0JY?K58dF-*;>%&s+S-hr#xbt+vWbNP6P_Zh%(!Fjx5X@mlw;+^^=*AF0t0t zhrxa*V`)}wEG52a-2jRJ2M^a8Y!1B@9nt2eBD1|4#K>?%*zD+F--3)51}w{__-=Xm zJ{UVB*;E_E!1ZG;uv?hsZ(vScQZQgk8R+|T;^>$0Qe2Z-`3H}cWEQonj3ZY-pUWR< zs^?Ky)8dbs$)znUTcwv$%2yJSWlt*Zqs~v zCs2e|TBqKv`8!;Wd3T#mmvqi6s;j;??FuOW;t_N_dT(MhIS9#iR^` z!gU5Re~--Mtl7Hc37BKPjhOxz--!0Ytl6D`bSgG{WJeKm(xv{C#Y3E_fsa#h0juA> zs}1I& zLy!hh!^EK{_}`Z2N$~!hU&oR&ySYQj01+PyuF&XumTHrfH#_F1zr2p9D}oNR@CH^? z<0&QEg7fyutc$s|+hGTFdwgOyT!DnywFp-)R=w5(4=U^ODi09ut22%T?DBoeA?)DN z&xPpGBD$-Fi6O-?Fhjf&#nTojM9oJJ9>L0((Zr^ZmV9@=`C;=s2yq)Swmh8uI=^g|Aj`Devwfe0$rKe#_Js zp2YidCuh^3niWV4d1U{s8)~D5fkV*L-uTwMHD1~#wVdRS=|OnjYi~`_!7J1$s+=j< zW~0Pj=%X}-l-W}M} z5!lci`RD`ba{H)!Evr{`Pr(l7wyBYRICuYFW8WN{$=9trv8{>U*mz^xwv&l5v2EM7 zZB8^3ys#KXtt$V8akKU@icK538z1LdLv(}wTxLXKx2VW9+5}u7* zV7HQ5l}A&I6b->J_29R8y%wnH3v$n>w;V9-Uqzvvna5ZS{3xT+f2G<6E^lfM-cj-L z*(Ew;+^1M$B(=w=5-Ob0CRe;yGQ^}yTsd1i=7}@%g*y%S+RY!4{55`L#+k8%v5xAd z7&T6!W~%pW8w&8d?7U4-=fozH80MEximtfVO(gcr9nbMP z+V9S|*cB=$FXp0+O7w~y%9av!Rcjx*Fj!w}`ax_Mz?ec&S-W_8AX7UoO_ro$t1@V$yd$z@kBI(V zvGdI%9?0HUP6`re^#cmO8B66`{`3bBkZd zyhnl+UT;?{Bwe6*2>E+!*?l6b39KH~(9Dbm~Ps}pz2 zW#RijuU@MkS%!YB9}%&*O(vu&aJMZk#*{fz63jFW*7g+t8ak7=H0hkjp~UD6({%67 zTaD>au{m|Er}8UvNNa6P%*g-wcKmRd*@ch?3$*BDaTre$pr(t<#f8nspC)7*a_b|1 zg+FlUw0ehLoioE&HY9B!(PRB-KW&YvIa;b7tLCGSuPRvnePbLkLH5t;3;|`XAokjE zU)!BZo;loBfwY-wM}w}hE@<=m(znz5LeCvG^;@ZGrzBMxNrW;h5XDbRbE>L#iEz;! z?-soZ{N>59p6L6}P$-R;LHLO=lVwGhKWG^iy8e3=pIir4v~Pw%!tNE^9mj-r>1jBx zWu`bJjDJ#%0XzReyR3+l zKHNvBO*#3V)caXE115ROf5u|FLh;q4Jxl`mRMJhilGy@IN1J{e1=+-wuD6+70CtSC1IqrL7;%u)5?dk+0AUip0 zdy1ybeBsPoD>G4f+`%0fuG;TLu)*P_s~F~ zk&z-0EcBp$gN=RbImbfBe;734k9DPblowl_jd7^VBNtRZXTlj#jpDrIKk#Ams21MC zaRWciw;$vjR&{KKLntP)rJ@oVMES<1-nIKjbv$IYDB z7y}MQX70w2`)O!36*rf?{sc+ub<_HrzEn_hiK)b%#NjMw%8j2{r?Bjeh+NIHQ@4 zQ=kJR6nT}H+>xT(?MXQZ=DiJY&qVMo3dbs-$juV7vM98aX89r^VwNzL%ARdK%Gr3? z5&R!V8)JfGt{1!So3Sefq*kviz%p6{m%+m@c~qIL7l|1aV;=cqA$mbcoKTd~dC+JZ zzHmKs3C-ZZj9q{4lRJHT-}!UTP$~E7c6V7GY`*dc^=l+GW1kbfy!e<_QlGz^h+4un`0X@CHGbk(F5@b@}Q>4oViU`gHt7Wa4Dhg*F;&r7bjjC7<80h3Q2JhK{CF=)tOeQ1>#hztwn#+Rz&OD7IkYC#};)O zS|pSNEtr?#N%vD=xC9+>`R0R@-|8H8t5DftUhm7BeSuf3HRhk{mwdSe<+W#TT>Np$ zBdVN;sv4e_jlb)xmC6*0BDeu|6MmBKf zKh%Bj&2Z}N9AlZxDhz@Did((zFPTGyA*KAH=R)7A#vH{OzB96=e+hqn!~#@2p+wy* zkr`quw^}U@i6)yw$wKi0rNr1g(A;%&P06WMTcDABP%>TQy-EF2C^jP`KBnr+}?62fSYg1}gK)6D>( zKnfKK#?NyZC)tJ@PMCgL@h(yocjmC4RojAM)<*Wr={dnVb*OT*c?$f;WXWYv{)9r+ zeO9(fsw*d6MZBVKgvq)5rHNx8xYi$tM^eOa=^h# zMEJqg1OrTqqxaLT$9F0*9B-W6h@P#-Oi%heL$R~V=GbK}HC~aT?h+1D;BuJQbJ>YL z(^LsWBlNl3cs{0jwd7ns%5S<@oGr)Ket-Ai2V(gIx!=Dsm!h(_dQq&GMOCo2R^6)$14!7{I}wP z{tJednvdv17D9Cra<8uKo_5{S7e9`{8{yxhZ^{Nigi(AJ)lm z3-%ylGnniA>e8-e&RhK;k8Lq}b(yc;4$e!GZH6B2$jBr^9s; z!KUANq+4a5J+a|e)pEIuRbqyf1b}-XFZuF}_$oBe((XFCrv)C#eWMts_p{C{$uWgw z9-CY+#Si&3x~4=jO3=%sKJh+!eB7?*@*X@d%Ud;5k4HUcQ)pMQm{!Op%N!Qit~{aX zZOu#B?tp6;Y(vuyr8#-8BrjQ4H7s(uAWgrc-(uj^77V=;@fPM!%hCS5R0CZ=ULih6 z>y!lrp03Y-*JW>$x#9c5QSwZJy820-5c?_x+Gp^yA;rccM;Gi2V|Vtu%WmL__6iF( zzc|xD(6W28%`2)=srVAYd;?Yfr_>^Vr}N79=;n{PL>@kl^p zU$yCEn()ghS?7!k@Iv~vnT&^!bPRa>NxQ)@_0;=K`w1~SnJ6_IzsO*zPsW-cucWQN zEb2r?hQ}*LL|MjIC*hsNzgs@{N)~ zIVz_m1`Vm$il&hCGG7m6{_6O@PDK$cN1_g*i8355m!BSkufP#WJ%eG_vR}F{SreWM z>IF^To;kbL7VOo!XgJyICNJ8)p3XlZ^8SIg_+0|_edkk$iMB$0g`V@d6UGpzhlfz~ zzr#v)v8WfBtVEZzIr`87wFgFj4{r39W}0`I-W-VURI#I>gxU-bl*B;d-!57c{g$}b z@dic=*uI5DjbXiaiUom=gGY0ZHNRsxZ?UTX+%jbg=rU)oaN2-&`z9k(eA!oJ1y|ob z7|+DVd0`fRQHj&+?sEG~?z4^TkrW0maAD`2a|a46IK+ti2+AQ_DFuwM41xsDj)-)= zS$Tr_7nKrsEn@09t{7m0jX_Z>QE|+adUyPwYeqXXs<_F3JmC7V=B!=Y?StM+++8)o z!z{M}o#fGRQz-;rG3ro0=4)e6$wm`vx@4Iz&>M4uZFqh@!6D3t%6h!5k2P{*uMxvX zGA!fg@9n04e}hB_v1{ry0tPG5H0vd`xNf)%;by`*nl@$4zl_kfY#zhg^_<+Z`oans zOHMS>$=$I9$x^{q)xz>+!!bOgCJgi|NpZ%YoNU*;6HH>fXKCd1CY4Ll67Os1V-FK8 zoD@wfBjse{Y3#U^bW21xm}7MT*+_*z#~~=nw`+BRf^I%PpTB3t6Qs)w4Tg=x*j+-3 zSkukgk1x+4t)10HvvF^*RbBpABbiwqTZ2-KgYBJ}{nIC`JgJ0k5zG;rRNA;XvjRd} z&H=e6?q=ViA{|jkhXG{p0><+UM{)MnJH?h@3c!`yitM*F`JHTA+ehm==`_HHUMzd< zo~A?l4b1y1A&&VGzpI3v8Kq=GFV%pixi~x;uL`wYqV*$WfNTQhFh6DiGqyC7<*yQ?u);dYIoU!rV@G=<2-d+fwVh)myCk`ETANG^ctH3KA5fXtrX} zx?9EbC64r{JpaSrn%hlUY+OlkI>3Pk>V#rNY-JEkt|mk2&+>xwjyhymJJS5dU{t?v z-d>jof+L)#senx$XvNBf*du&_$iEnVI`ZQt5Kl|2^DAR2)wONA=N-0hpB@vyZ)tah8+{ zBJfWk^8PDbe=wp)vOe?i;@dEGotgw^Hi5P$EdJ1)sMi5S>4U@B*rv(iVSiB>%B4J) z;72aPTGO}&(5f-b%GdsoNHlAjnH-glD{v*u29H(x(vQ~NNKK{w)z(2&*Bj}Q*n}Hh38IU&scZ8@VcEp-0Z>$zcSizw)t=;gj- z4dt<|kq$%llh$A7rNwdJ2wa6%!nF`d&4~pze}=@~HS0uvaF}gE2oGD6fK91YnC(qQ z&2(~c55La$Pnz7$)jpTPk0#B#Cy6<3a62wDof@d!A-+a`6y)+N5fqs%o~qVs)+3GG zpT{)a#=Ly3$}bQh#`GuWSo2haFTg@LY)UUT5in^1D>^@_GwP4n+cC1C$R<1102aYm7F$~>9Pn69o zaEtkOts1Ss{^rje$^k^=Y!Khkuy@of-kx{rqS?-5DoOA7xOFoNLJRB0pkI$T9?@>K zzy!&P?x45)dBwbup>sK#zq6m*NmJ7~vVeBRU*$DhPsgr@{+(i0!t+gub&eX0@$sbV z2Vw!YcEL_FqTX=(`s=v77n#(lNutmn`qq8srbM^5{-*@p>g-6EQGl5H+A2fNJ4)k2 zfBiM58<7X?am9qyrOQOytZ$*wvgJf>-!4$JefvWFIMZ`+%|U5Yo&AZI)#DQr+Ih&s zh(xL!+yriOEPj@*uT7+Z2Ge#bsPTCCiU96G4yMuF=UonY4g zMhx>%`TjP9K=SYu3tfZ~%g4Xg9SpZ?v_#B<;doN~d8*_@n%q~b#lJ+pZN3E#?hU=CSa)w|N-K0i7f@XdENuy8$gONqt#oo= zx!lGWg86#3;}=zUy%NmKnrQVtIJn>Ln_ z;@eefU_4~-4qt;e6nTS0H9WKyzC-vJ&oX&`Ij1=l4;Sa1B!Y*bV2*76R6|H}1MJMO z_pu^!T9gA4+kh>40yDVdmrG2;rXUC!tI{oHA#F>VGtn`La8%3EmLcprIxTb^Aqy<< zxQCf2F6bHcRZ=Q)rNv(?GvJ-s0e@)rL)08$mV(lthiK2*H}_tMo;KFeL`@j zNXi}TaRLw<1a5$RdZ=Fx*b_voGIj_rpdnR+p<9cU7{NEhrD3s^G@#8xP`}`1pizvZ ziabYzO@Xl*3!NHjf@c(P8VTOeSZTpN%2Q?%#`9yh4W=eRta@dng2!At#D%PX3299U zfQ^Vz6O!64NyED+sL?Jc=nG^0<%)uYT1|**FHHa>kBgv`ONLg2M*@gIy)6Z>sKDcC z?4Hgz0G=Dtp&x!RXrZ9W0VHOmR6cQg194o>E~=Wl>X%KMXx_y;Ekp`bsW7>`t7ww< zrY^h!)l>xm3yxa(kKXZ;#MO`JJbXE1W${Kt7Xbqw_e^>}f)1dIudn4VYoKw% z@H-}5bmGGSD=t6&I=R<*@6gI;j=|COaWW z^IqBKsM?XxW7m*Zq;0wKJ=lqI34hO@@)Mkn3R5VY#?POM3cP$Ts#qwCg7@dvmI0@y zR+|HliA;N(AuXWh!_;rFofrROAHqn%@XIcUw&kRiVagHC;;*`+0nHa(QVThJ?&4mo zeGL|OUB2{*oW^e$(_x3$W45zY4)`L37=kbs)oBh2);l)$>3u&I#?+y0b@?`u5Lmxq zO$W6jP;z7j~bJ|55wCog`BQlpmK(TA=I2h*TkGS&!Y;he2`_sC6)C0&wMAa99= z%kd;-JPTqcYK~I%A<_JB4sbmUGHm#2LdTvbyGLl9SjA!ZdfA2Inr?Pa1j`5J>xkBh z*iAW7Pfo+J-1~aLGc=n}J-^?^=4pIBGyf;zJ*@kK$NPFCwD;|P!6hw+F$eK1NWnoS zhK1R@PuqQ~6*d1U^ZZMc5F)y=Kf2W{zk4R5;dp`t-je(3jsfF__ixAP+=NF^1iU$J zgRx<)-d*myY+L=4?7mM5bd&J+qa6rh7EvkzsxZ2)p$JClgG@w1yrbjUZKGq0zKV4# zmyfV-kUFBu(0yf*kIKcTl<~8)70?lu3Dk9X+_wC^>p?+w$pe<0+gws5QXrZrVC1fz z+u`;g=G4&QEWe5rs^#xrebGf~B+6`N%22`_{p%Z6E|$vEn%f<#RD8urM6HGg;bHTY zh=gZGL|@XZCFF%s?$d20GeSb52uk}M`bm&Xeysx_5ygCd&6|7)Q6NYrm*wJR$ptz# z?Eyy%k)t0tWJp~eo~2%3l_7ff1`#8^641p-qSDe>r3*Q>JEa6lF>4KWfpeUgBN^@j zgBz#Ne^QJFQsr5)(6K^XvTgwz5y*)Hf(O`R;Y}f>iRhtSEMo$WhE(vR|G*@bhp4d{ zvO(mcKLq_q0~ca*cGN7C!xNpm`U_ut{f`==M!G}(Ua`)-W=vG5LoyMYqW>hR0-4{3 zL+HEXLR)L)@e{=|3J~ik8l)7I@AFy32&JLqDGmlNh3jj5Qgz4T;~Y>csi>u6l4oki z7<3SdW<92y|H74VYPPm?B?LoC)pnGFxK5mIz=WUjn2Fi(jz-yq)YHHGMK-mF0m0m;x4$Sf&|z$`D&nQU zoQC->OUj%8VhA-6Igu}tJrZ5DrGGZ*O~r~nkuwhc+{!SAJ`GrDb7)Dh;);`aaXe{K zW<#m~5GQ!XQ*`%zsHD(S0;zaTS-CK!1({e|iZevcsR>7WsNjnn7B}v5r;P3K_1?<# zQma%&OM^c{jtaA=s|WaN(F^^}KnM-=7(Ea@kdmP`moA~-3~X7!lsb(W@{BvR&xi2L zMI61Qm^?wJfQS4+mBbX2Him$#P9v=tDw}^!h|N#^v`GGU3B!WCRtP(5RmKW2z(a|A zR}$Bv_E@?FqA~UcJ~C!|GPSJonH&-VY4_F}OKNgY=1fmW^_Q&4YNEOA_@|eVd!4r! z7W5tO$2dQYu}+2s_MT@9cqeQDIq$2$O-Q$&ai z@pEFhn6(+=hWcBL1^Wc@RI$n3O7|<`Ev%C+O;Pj!S{6~s6|zENt=hf~%}aKxl|P;d z#j0Xhx3TAMF29a}>J8U9S3`s5fNo9hFmG@(C*e5=w4s$9cfp3FwEVPCZJ%gqG(kQQ zJf*pD_B*v2vFe+*?qCUVL*xTO5Awbg(#p*u7*VMC0&D41bgB#CJhZJt&CJc)UMJ)S zmZJ<&Z72B7884kl?zGb333G2bahjUJuE^7P#Ms>{v|v65b6Nky{_$>2(lK1=i@8JG zClFQ(Vw8kA?o_o5yr{`0f~0dbff)l9E9_j{0lXer=|k1L>-)jVt?K@~io-~P_t&lp zQY(xdsH_ZXK?h7|Lm?4GBj$*`qY5@wW##_lW{o5P2dNU6_P{spb~3YVxu*y+YV^I> z)ZM2LMPX*to~Qj@%l1Ym#sl$8&L6d+ZR&i%-m*mA2^HEXx1`fK@rP(>Y$H5DgV{HX z^HFPvCzt@EH$zUrU`iQJL4TIoXsS(FTjaXiVuLg{ooJ&y;hU%hu;0`1#b(Y_-3nsT z6w%>_=X?}`iFxf~%4TvuN2G3gc0K%m5?s~x5Gaj69vWrrQOoy*=1DrB#fB+!Tm5#4 z%_NmHbRfXPKT)PN&#Wjhg)N?>fR6tLfCQ5Wr>nf!p?t&s?G_h)(*A12 zywg|0#$JaN6Fz|Uhbwbmt)T3@^FY>Rpznxe@!EGj)SJ=$kMVg6$<2;`&3W){U!?@^ z>vpE%r{fI--%q**cCO3+%+Cr*cW@u;E6|P?6V1!2Y*`;wU$&OEf2pm<3_#)Co!yVw zY7gu4?#Z@r{d@C0ism`)*T&W6BYe7#z&X;3MSNI#aA(l?o|W%A-q3kOyC<^Ch5r4} z6ZE{`;7N!3gEc?l0*?IRm1r>(l2Jt3%H=*1sXRu<>rdo01?UJ26 zGrJG>&_T3$FM9x%-B5A%tj8)bl2N$hWw(FZ)8Hpj%ggU~VS9SY;LZK-=?@)*53Oxs zg8IAD1-IqTRI29%C=s-Nz^3Og9Zsqb=c~i#zAkPmV;C|3lcYqz><#?S92@;U*m+a2 z8w#?ROT&<4!kAv<%MVUcMhLEM{XN*< zaQ6<6-*Ss2mL}G5IRN$~Bc$|+r>!3*p+=iQ)ddA`3ak-n?+M*hKI5J~1Es`5r}5Y1Uc<@KBM-eV3wFIv@+a!Mk27IpjHRWT=8XXa*C zMDNbO9t0B7i?JKtRnd#AR^-&YSGoh$8w2VNH!S09$_{`1>v@A?(@m$KQZL})#}1{|4}O3 zdzSZ$t|KG|c+J4}A$*69qPHo5x%m!w1961#<;z_+jL#Hb?+HZquqN4@X-*K&n?*8n z_R1n>yr0iQ80`FsoH=;izUVB4+uQ+2AM=Fi7;NbZyLMYWUyk5w6D1l))3^9d!fxN- zse=kxu9_UUaJhWZkRSW63(`TE)}AUT0pJKQw{=_S)lN2>znXpB6xy4@MIj754YfG`s3}bXwWMZ?*7&^UiO?hAew&79mYRNlYDXI z-s34XG!+Zi5b`n1v5K#KGr&3Q9X|c#JlRh0^3ZY(=EkCTEx(XP@XLTNc-V`68cb4% zfX-4iX=gtEEEKy&W{02#^@MrZ`TaPjqC$cgRqiG-wdoZua<94O{*^%`bl{bf0-*N( zq1R6EwPW!k7S0_WPEZxn`EOP?bnCJrJ#RNy*@3gYBzur{mTSHw{-!~G5Z(DV7}4hP64?SQz%$UO%oE>A6Li6i_=WKyaHT2A?qWxhc!_Nbzk4E>8uF_ zi1nE@(`r&5hcC>8e`T559)9w5v;;=$8!bGBTNK}ZT%kXle$!ic((m^IrwKdyE?i21 z;idtqG@eKer3HD$g2{^&!v+d=FIKE=U%E}wp`|XB=_folEd3xKS1Prj$fup6~5Q6Tx#%Qii`;vN4eIFN2Wmx8? zg)NC1u{KYmZ%lRkxVKqSX3ttzL%>1)b&}aX_NG8EPfj_E7AkRI+@NRbFyBD_ zs{P3F_$=kg`8yr^ejQmYbz!Tb=_MbU)cmg44wymYwY4rSyLdmRUf)%pR}HMH)~>Yk z4O>w?b$U0=?8{y?tnZgU$>AGG5ITPu*cK9<2ao(m!Swd%haP1Tp1jb|L$f{yorQW00+z)nahrBdWt5(-EPajt#t_NI@o$z$ zB`14RSCdaj2(^Q$xtf_41CWu8nGwiF1J5M-i3xGB|7`iJ{#Vh;-cIZjIRc;-<6&V2 zvN3bBumYLcSlKysK6}X9oBqEW)trnR9L!8Vp(jQ*&SvmTN^0U-j1sOkHpWJFcK^(; zX89Rk^?CiL9P|JUGbiWI=>V*s(g4}HSvVM27}@_N-v1H`AZO)f2KbbNl}XIZ*viO` z24L-A3sQr64;Z{#FlO{U zdYkJ;hhk*}{G`Sj0k>jSg58~aoRXu_h~QuayT+WL|CRECB!neY2~`-O!H_;ZmymHD z$uZN;NJgoeLaw$DcbNl&EFu`dS3m_sa!{a`o)}d;3d(?N$Ebk*Qu->|{NKHL&i}G@ zEfq6!cqVB(Q!@{MF7xMNx%A7{771ZdR&il=ZZQclW=<|K5e^n{W;St7W>zr)!2iF?=R9&| zb`~y{05)ch|M6p|m>pN0GWt4n{rW-}Rg~jITW_$hgf7C}J4!=((_5Or*~9hmcDccJXvmEq87 z58$>P&RL3q!V{_VrJu(vGEN~xm?5WLkis&Aegh8UfWR`!hQk-+ev;!r11?0#?TWkG z!g{{4lJ#vDz0qKratxW?DX!F%w&Rc!ORX%K_RXv0skL=-M(o6 literal 0 HcmV?d00001 diff --git a/examples/1d_sn.pf b/examples/1d_sn.pf new file mode 100644 index 000000000..9b68de77c --- /dev/null +++ b/examples/1d_sn.pf @@ -0,0 +1,44 @@ +Wind_type(0=SV,1=Sphere,2=Previous,3=Proga,4=Corona,5=knigge,6=homologous,7=yso,8=elvis,9=shell) 6 +Atomic_data data/standard_sn_kurucz +photons_per_cycle 80000 +Ionization_cycles 20 +spectrum_cycles 1 +Coord.system(0=spherical,1=cylindrical,2=spherical_polar,3=cyl_var) 0 +Wind.dim.in.x_or_r.direction 30 +Wind_ionization(0=on.the.spot,1=LTE,2=fixed,3=recalc_bb,6=pairwise_bb,7=pairwise_pow) 3 +Line_transfer(0=pure.abs,1=pure.scat,2=sing.scat,3=escape.prob,6=macro_atoms,7=macro_atoms+aniso.scattering) 3 +Thermal_balance_options(0=everything.on,1=no.adiabatic) 1 +System_type(0=star,1=binary,2=agn) 0 +Star_radiation(y=1) 1 +Disk_radiation(y=1) 0 +Boundary_layer_radiation(y=1) 0 +Wind_radiation(y=1) 1 +Rad_type_for_star(0=bb,1=models)_to_make_wind 0 +mstar(msol) 0.8 +rstar(cm) 1.23552e15 +tstar 10672.1 +disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk) 0 +Torus(0=no,1=yes) 0 +wind.radmax(cm) 2.2464e15 +wind.t.init 10000.0 +homologous_boundary_mdot(msol/yr) 26.8 +homologous.radmin(cm) 1.23552e15 +homologous.vbase(cm) 1.1e9 +homologous.density_exponent 7.0 +wind.filling_factor(1=smooth,<1=clumpted) 1 +Rad_type_for_star(0=bb,1=models,2=uniform)_in_final_spectrum 0 +spectrum_wavemin 200 +spectrum_wavemax 20000 +no_observers 1 +angle(0=pole) 45 +phase(0=inferior_conjunction) 0.5 +live.or.die(0).or.extract(anything_else) 1 +Select_specific_no_of_scatters_in_spectra(y/n) y +Select_scatters 0 +Select_scatters 1 +Select_scatters 2 +Select_photons_by_position(y/n) n +spec.type(flambda(1),fnu(2),basic(other) 2 +Extra.diagnostics(0=no) 0 +Use.standard.care.factors(1=yes) 1 +Photon.sampling.approach(0=T,1=(f1,f2),2=cv,3=yso,4=user_defined,5=cloudy_test,6=wide,7=AGN,8=logarithmic) 2 diff --git a/examples/cv_macro_benchmark.pf b/examples/cv_macro_benchmark.pf new file mode 100644 index 000000000..446cc6213 --- /dev/null +++ b/examples/cv_macro_benchmark.pf @@ -0,0 +1,71 @@ +Wind_type(0=SV,1=Sphere,2=Previous,3=Proga,4=Corona,5=knigge,6=thierry,7=yso,8=elvis,9=shell) 0 +Atomic_data data/h20_hetop_standard77 +photons_per_cycle 100000 +Ionization_cycles 1 +spectrum_cycles 0 +Coord.system(0=spherical,1=cylindrical,2=spherical_polar,3=cyl_var) 1 +Wind.dim.in.x_or_r.direction 30 +Wind.dim.in.z_or_theta.direction 30 +Wind_ionization(0=on.the.spot,1=LTE,2=fixed,3=recalc_bb,5=recalc_pow,6=pairwise_bb,7=pairwise_pow) 3 +Line_transfer(0=pure.abs,1=pure.scat,2=sing.scat,3=escape.prob,6=macro_atoms,7=macro_atoms+aniso.scattering) 7 +Thermal_balance_options(0=everything.on,1=no.adiabatic) 0 +System_type(0=star+disk,1=star+disk+secondary,2=agn) 1 +Star_radiation(y=1) 1 +Disk_radiation(y=1) 1 +Boundary_layer_radiation(y=1) 0 +Wind_radiation(y=1) 1 +Rad_type_for_star(0=bb,1=models)_to_make_wind 0 +Rad_type_for_disk(0=bb,1=models)_to_make_wind 0 +Rad_type_for_bl(0=bb,1=models)_to_make_wind 0 +Overall_system_type(0=single_object,1=binary) 1 +mstar(msol) 0.8 +rstar(cm) 7e+08 +tstar 40000 +msec(msol) 0.6 +period(hr) 5.57 +disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk) 1 +disk.mdot(msol/yr) 1e-8 +Disk.illumination.treatment(0=no.rerad,1=high.albedo,2=thermalized.rerad,3=analytic) 0 +Disk.temperature.profile(0=standard;1=readin) 0 +disk.radmax(cm) 2.4e+10 +lum_bl 0 +t_bl 10000 +Torus(0=no,1=yes) 0 +wind.radmax(cm) 1e+12 +wind.t.init 40000 +wind.mdot(msol/yr) 1e-9 +sv.diskmin(wd_rad) 4 +sv.diskmax(wd_rad) 12 +sv.thetamin(deg) 20 +sv.thetamax(deg) 65 +sv.mdot_r_exponent 0 +sv.v_infinity(in_units_of_vescape 3 +sv.acceleration_length(cm) 7e10 +sv.acceleration_exponent 1.5 +wind.filling_factor(1=smooth,<1=clumpted) 1 +Rad_type_for_star()_in_final_spectrum 0 +Rad_type_for_disk(0=bb,1=models,2=uniform)_in_final_spectrum 0 +spectrum_wavemin 3000 +spectrum_wavemax 6950 +no_observers 7 +angle(0=pole) 10 +angle(0=pole) 27.5 +angle(0=pole) 45 +angle(0=pole) 62.5 +angle(0=pole) 80 +angle(0=pole) 80 +angle(0=pole) 80 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.0 +phase(0=inferior_conjunction) 1.0 +live.or.die(0).or.extract(anything_else) 1 +Select_specific_no_of_scatters_in_spectra(y/n) n +Select_photons_by_position(y/n) n +spec.type(flambda(1),fnu(2),basic(other) 1 +Extra.diagnostics(0=no) 0 +Use.standard.care.factors(1=yes) 1 +Photon.sampling.approach(0=T,1=(f1,f2),2=cv,3=yso,4=user_defined) 2 diff --git a/examples/cv_standard.pf b/examples/cv_standard.pf new file mode 100644 index 000000000..4187d6d9c --- /dev/null +++ b/examples/cv_standard.pf @@ -0,0 +1,67 @@ +Wind_type(0=SV,1=Sphere,2=Previous,3=Proga,4=Corona,5=knigge,6=thierry,7=yso,8=elvis,9=shell) 0 +Atomic_data data/standard77 +photons_per_cycle 100000 +Ionization_cycles 20 +spectrum_cycles 20 +Coord.system(0=spherical,1=cylindrical,2=spherical_polar,3=cyl_var) 1 +Wind.dim.in.x_or_r.direction 30 +Wind.dim.in.z_or_theta.direction 30 +Wind_ionization(0=on.the.spot,1=LTE,2=fixed,3=recalc_bb,5=recalc_pow,6=pairwise_bb,7=pairwise_pow) 3 +Line_transfer(0=pure.abs,1=pure.scat,2=sing.scat,3=escape.prob,6=macro_atoms,7=macro_atoms+aniso.scattering) 5 +Thermal_balance_options(0=everything.on,1=no.adiabatic) 0 +System_type(0=star+disk,1=star+disk+secondary,2=agn) 1 +Star_radiation(y=1) 1 +Disk_radiation(y=1) 1 +Boundary_layer_radiation(y=1) 0 +Wind_radiation(y=1) 1 +Rad_type_for_star(0=bb,1=models)_to_make_wind 0 +Rad_type_for_disk(0=bb,1=models)_to_make_wind 0 +Rad_type_for_bl(0=bb,1=models)_to_make_wind 0 +Overall_system_type(0=single_object,1=binary) 1 +mstar(msol) 0.8 +rstar(cm) 7e+08 +tstar 40000 +msec(msol) 0.6 +period(hr) 5.57 +disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk) 1 +disk.mdot(msol/yr) 1e-8 +Disk.illumination.treatment(0=no.rerad,1=high.albedo,2=thermalized.rerad,3=analytic) 0 +Disk.temperature.profile(0=standard;1=readin) 0 +disk.radmax(cm) 2.4e+10 +lum_bl 0 +t_bl 10000 +Torus(0=no,1=yes) 0 +wind.radmax(cm) 1e+12 +wind.t.init 40000 +wind.mdot(msol/yr) 1e-9 +sv.diskmin(wd_rad) 4 +sv.diskmax(wd_rad) 12 +sv.thetamin(deg) 20 +sv.thetamax(deg) 65 +sv.mdot_r_exponent 0 +sv.v_infinity(in_units_of_vescape 3 +sv.acceleration_length(cm) 7e10 +sv.acceleration_exponent 1.5 +wind.filling_factor(1=smooth,<1=clumpted) 1 +Rad_type_for_star()_in_final_spectrum 0 +Rad_type_for_disk(0=bb,1=models,2=uniform)_in_final_spectrum 0 +spectrum_wavemin 800 +spectrum_wavemax 1850 +no_observers 5 +angle(0=pole) 10 +angle(0=pole) 27.5 +angle(0=pole) 45 +angle(0=pole) 62.5 +angle(0=pole) 80 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +live.or.die(0).or.extract(anything_else) 1 +Select_specific_no_of_scatters_in_spectra(y/n) n +Select_photons_by_position(y/n) n +spec.type(flambda(1),fnu(2),basic(other) 1 +Extra.diagnostics(0=no) 0 +Use.standard.care.factors(1=yes) 1 +Photon.sampling.approach(0=T,1=(f1,f2),2=cv,3=yso,4=user_defined) 2 diff --git a/examples/fiducial_agn.pf b/examples/fiducial_agn.pf new file mode 100644 index 000000000..5d4bd6b06 --- /dev/null +++ b/examples/fiducial_agn.pf @@ -0,0 +1,67 @@ +Wind_type(0=SV,1=Sphere,2=Previous,3=Proga,4=Corona,5=knigge,6=thierry,7=yso,8=elvis,9=shell) 0 +Atomic_data data/standard77 +photons_per_cycle 200000 +Ionization_cycles 30 +spectrum_cycles 20 +Coord.system(0=spherical,1=cylindrical,2=spherical_polar,3=cyl_var) 1 +Wind.dim.in.x_or_r.direction 100 +Wind.dim.in.z_or_theta.direction 100 +Wind_ionization(0=on.the.spot,1=LTE,2=fixed,3=recalc_bb,5=recalc_pow,6=pairwise_bb,7=pairwise_pow) 7 +Line_transfer(0=pure.abs,1=pure.scat,2=sing.scat,3=escape.prob,6=macro_atoms,7=macro_atoms+aniso.scattering) 3 +Thermal_balance_options(0=everything.on,1=no.adiabatic) 0 +System_type(0=star,1=binary,2=agn) 2 +Disk_radiation(y=1) 1 +Wind_radiation(y=1) 1 +QSO_BH_radiation(y=1) 1 +Rad_type_for_disk(0=bb,1=models)_to_make_wind 0 +Rad_type_for_agn(0=bb,1=models,3=power_law,4=cloudy_table)_to_make_wind 3 +mstar(msol) 1e9 +rstar(cm) 8.85667e+14 +disk.type(0=no.disk,1=standard.flat.disk,2=vertically.extended.disk) 1 +disk.mdot(msol/yr) 5 +Disk.illumination.treatment(0=no.rerad,1=high.albedo,2=thermalized.rerad,3=analytic) 0 +Disk.temperature.profile(0=standard;1=readin) 0 +disk.radmax(cm) 1e17 +lum_agn(ergs/s) 1e43 +agn_power_law_index -0.9 +Torus(0=no,1=yes) 0 +wind.radmax(cm) 1e19 +wind.t.init 1e5 +wind.mdot(msol/yr) 5 +sv.diskmin(wd_rad) 50 +sv.diskmax(wd_rad) 100 +sv.thetamin(deg) 70 +sv.thetamax(deg) 82 +sv.mdot_r_exponent 0 +sv.v_infinity(in_units_of_vescape 1 +sv.acceleration_length(cm) 1e18 +sv.acceleration_exponent 1.0 +wind.filling_factor(1=smooth,<1=clumpted) 1 +Rad_type_for_disk(0=bb,1=models,2=uniform)_in_final_spectrum 0 +Rad_type_for_agn(0=bb,1=models,3=power_law,4=cloudy_table)_in_final_spectrum 3 +spectrum_wavemin 200 +spectrum_wavemax 2600 +no_observers 8 +angle(0=pole) 20 +angle(0=pole) 40 +angle(0=pole) 60 +angle(0=pole) 70 +angle(0=pole) 75 +angle(0=pole) 80 +angle(0=pole) 85 +angle(0=pole) 89 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +phase(0=inferior_conjunction) 0.5 +live.or.die(0).or.extract(anything_else) 1 +Select_specific_no_of_scatters_in_spectra(y/n) n +Select_photons_by_position(y/n) n +spec.type(flambda(1),fnu(2),basic(other) 1 +Extra.diagnostics(0=no) 0 +Use.standard.care.factors(1=yes) 1 +Photon.sampling.approach(0=T,1=(f1,f2),2=cv,3=yso,4=user_defined), 7 diff --git a/examples/travis/Setup_Py_Dir b/examples/travis/Setup_Py_Dir new file mode 100755 index 000000000..d37ba5fbe --- /dev/null +++ b/examples/travis/Setup_Py_Dir @@ -0,0 +1,26 @@ +#! /bin/bash + +# This is a simple routine to set up links so that python can be run in +# a directory +# 05aug ksl Coded +# 0603 ksl Modified so others could use this as well +# 1306 jm Modified structure to close issue #13 + + +# please make sure your $PYTHON path is setup to use this script +top=$PYTHON +xdata=data + +# Note that we now have standard73, standard39, h20 and so on in the top level data directory +# that way atomic/standard73 now links to $PYTHON/data/standard73 +# and standard73 then links to the subfolder atomic73 + +ln -s -f $top/$xdata +ln -s -f $top/$xdata atomic + +## the other data is the same +ln -s -f $top/$xdata/kurucz91 +ln -s -f $top/$xdata/hutdisk93 +ln -s -f $top/$xdata/disk06 +ln -s -f $top/$xdata/disk14 + diff --git a/examples/travis/balmer_test.pf b/examples/travis/balmer_test.pf new file mode 100644 index 000000000..260e7df3e --- /dev/null +++ b/examples/travis/balmer_test.pf @@ -0,0 +1,42 @@ +Wind_type() 9 +Atomic_data data/h20 +photons_per_cycle 100000 +Ionization_cycles 1 +spectrum_cycles 1 +Coord.system() 0 +Wind.dim.in.x_or_r.direction 1 +Wind_ionization() 3 +Line_transfer() 7 +Thermal_balance_options(0=everything.on,1=no.adiabatic) 1 +System_type() 0 +Star_radiation(y=1) 1 +Disk_radiation(y=1) 0 +Boundary_layer_radiation(y=1) 0 +Wind_radiation(y=1) 1 +Rad_type_for_star(0=bb,1=models)_to_make_wind 0 +mstar(msol) 0.8 +rstar(cm) 1e10 +tstar 10000 +disk.type() 0 +Torus(0=no,1=yes) 0 +wind.radmax(cm) 1.00000000001e11 +wind.t.init 11100 +shell_wind_mdot(msol/yr) 0.00472e-17 +shell.wind.radmin(cm) 1e11 +shell.wind_v_at_rmin(cm) 1.00000 +shell.wind.v_at_rmax(cm) 1.000010 +shell.wind.acceleration_exponent 1 +wind.filling_factor(1=smooth,<1=clumpted) 1 +Rad_type_for_star()_in_final_spectrum 0 +spectrum_wavemin 3000 +spectrum_wavemax 7000 +no_observers 1 +angle(0=pole) 45 +phase(0=inferior_conjunction) 0.5 +live.or.die(0).or.extract(anything_else) 1 +Select_specific_no_of_scatters_in_spectra(y/n) n +Select_photons_by_position(y/n) n +spec.type(flambda(1),fnu(2),basic(other) 2 +Extra.diagnostics(0=no) 0 +Use.standard.care.factors(1=yes) 1 +Photon.sampling.approach() 3 diff --git a/examples/travis/check_travis_test.py b/examples/travis/check_travis_test.py new file mode 100644 index 000000000..45b61ab48 --- /dev/null +++ b/examples/travis/check_travis_test.py @@ -0,0 +1,73 @@ +''' +run simple test of python- check it runs and read sin atomic data +''' + + +f = open("test1.out") + +nerror = 0 + +for line in f: + data = line.split() + + if len(data) > 0: + if data[0] == "Get_atomic_data:": + if data[1] == "Could" and data[2] == "not": + nerror += 1 + print "Error: %s" % line + + elif data[0] == "Error": + nerror += 1 + print "Error: %s" % line + + +f = open("balmer_test.out") + +n3 = 1.0 +n4 = 1.0 + +for line in f: + data = line.split() + + if len(data) > 0: + if data[0] == "Get_atomic_data:": + if data[1] == "Could" and data[2] == "not": + nerror += 1 + print "Error: %s" % line + + #elif data[0] == "Error": + # nerror += 1 + # print "Error: %s" % line + + + elif data[0] == "Macro": + if data[1] == "Atom" and data[2] == "level": + for i in range(len(data)): + if data[i] == "n": + if data[i+1] == "3": + n3 = float(data[-1]) + if data[i+1] == "4": + n4 = float(data[-1]) + + + ratio = n3 / n4 + + + +if ratio > 1.7 and ratio < 2.3: + print "H alpha / H beta is %8.4e" % ratio +elif ratio != 1.0: + print "Error, H alpha / H beta is %8.4e" % ratio + nerrors += 1 + + + + + +if nerror > 0: + print "Errors when running" + exit(-1) + +else: + print "Ran python OK" + exit(0) # test was success diff --git a/examples/travis/test1.pf b/examples/travis/test1.pf new file mode 100644 index 000000000..5adc85f44 --- /dev/null +++ b/examples/travis/test1.pf @@ -0,0 +1,5 @@ +Wind_type(0=SV,1=Sphere,2=Previous,3=Proga,4=Corona,5=knigge,6=homologous,7=yso,8=elvis,9=shell) 0 +Atomic_data(data/standard73) data/standard77 +photons_per_cycle (20000) 10000 +Ionization_cycles 0 +spectrum_cycles 0 \ No newline at end of file diff --git a/include/README b/include/README new file mode 100644 index 000000000..addd88f9c --- /dev/null +++ b/include/README @@ -0,0 +1,3 @@ +Include directory for GSL and CFITSIO header files + +linked using INCLUDE variable in Makefile diff --git a/lib/README b/lib/README new file mode 100644 index 000000000..55147bc28 --- /dev/null +++ b/lib/README @@ -0,0 +1,3 @@ +Folder to store library files for GSL and CFITSIO + +Linked using the LIB variable in Makefile diff --git a/py_progs/CheckComplete b/py_progs/CheckComplete new file mode 100755 index 000000000..bf0092b62 --- /dev/null +++ b/py_progs/CheckComplete @@ -0,0 +1,9 @@ +find . -name *.sig -print > tmpCheck +rm tmpCheck1 +awk '{print "grep COMPLETE "$1" >> tmpCheck1.out"}'>tmpCheck1 +rm tmpCheck1.out +source tmpCheck1 +echo 'Total sig files' +wc tmpCheck +echo 'Total completed' +wc tmpCheck1.out diff --git a/py_progs/dev/history.txt b/py_progs/dev/history.txt new file mode 100644 index 000000000..8c644b6e7 --- /dev/null +++ b/py_progs/dev/history.txt @@ -0,0 +1,2 @@ +16 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +24 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/error_scripts/py_error.py b/py_progs/error_scripts/py_error.py new file mode 100644 index 000000000..a0b1d32dd --- /dev/null +++ b/py_progs/error_scripts/py_error.py @@ -0,0 +1,142 @@ +#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python +#specify your python interpreter path above to run as executable + +''' + +University of Southampton, James Matthews, 130722 + +"py_error.py" + +This is the post-processing code to deal with the error logs in +PYTHON's parallel mode. + +usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root + +returns: + + Error summary printed to screen. Can pipe to file if required. + +130722 JM Coding began -- initial tests conducted successfully + +''' + + +## import modules +import sys, subprocess + +#help string for user +def help(flag): + ''' help function for user''' + if flag=='help' or flag =='-h': + print '''usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root''' + sys.exit(0) + else: print 'Watchdog.py: for help type use -h flag' + +# read root pf file from command line +if len(sys.argv) > 1: + root = sys.argv[-1] +else: + print 'Error: no arguments provided. Exiting.' + exit (0) + +help(root) + + +# set defaults +nprocessors = 1 +diagfolder_name = 'diag_' + root + + +# check for args +for i in range(len(sys.argv)): + if sys.argv[i]=="-f": + diagfolder_name = sys.argv[i+1] + + +# list files in folder, put in array 'files' +command = "ls " + diagfolder_name + "/" + root + "_*.diag &" +output = subprocess.check_output ( command , shell=True ) +files = output.split("\n") +if files[-1] == "": files = files[0:-1] + + +# number of processors and therefore diag files provided as argument +nfiles = len(files) +nprocessors = nfiles + + + +# create some arrays to store the error logs and increment the counters +# note that we also count the number of threads an error occurs in +error_log = [] +error_count = [] +thread_count = [] + + + +#everything now initialised, can collate errors + +for i in range(nfiles): + + filepath = files [i] + + # grep for error summary in the diag file + command = "grep -A 100 'Error summary: End of program' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + + # split the grep output up into lines + data = output.split("\n") + + # now cycle through the lines in output + for j in range(len(data)): + No_log = True # variable which is True if this is a new error + + # check we have a non blank entry to avoid indexing error + if len(data[j])>0: + error = data[j].split() + + # this next line is to check we have an actual error summary and not a string line + if error[0].isdigit(): + + # now get the err log string, and its count + error = data[j].split() + + count = int(error[0]) + log_string = data[j][13:] + + # search for a match in the already fpund errors + for k in range(len(error_log)): + if log_string == error_log[k]: + + No_log = False # we've found a match, increment the counts + error_count[k] += count + thread_count[k] += 1 + + # this is a new error, so append to the log and count arrays + if No_log: + error_log.append ( log_string ) + error_count.append ( count ) + thread_count.append (1) + + +n_logs=len(error_log) + +# print the output to screen +print "Error summary: "+root +print "Collated errors for " + str(nprocessors) + " processors" +print "Recurrences -- Description -- number of threads in which error occurred" +for i in range(n_logs): + print "\t%d -- %s -- %d" % (error_count[i], error_log[i], thread_count[i]) + +# all done. + + + diff --git a/py_progs/error_scripts/watchdog.py b/py_progs/error_scripts/watchdog.py new file mode 100755 index 000000000..8ddd5f2d3 --- /dev/null +++ b/py_progs/error_scripts/watchdog.py @@ -0,0 +1,224 @@ +#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python +#specify your python interpreter path above to run as executable + +''' + +University of Southampton, James Matthews, 130722 + +"watchdog.py" + +This is the during-processing watchdog code to deal with the error logs in +PYTHON's parallel mode. Very similar to py_error.py + +usage and arguments: + + python watchdog.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root + +returns: + + Error summary of ongoing run printed to screen + +130722 JM Coding began -- initial tests conducted successfully + +''' + + +## import modules +import sys, subprocess + + +#help string for user +def help(flag): + ''' help function for user''' + if flag=='help' or flag =='-h': + print '''usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root''' + sys.exit(0) + else: print 'Watchdog.py: for help type use -h flag' + +#strip function for comparing error strings (removes actual numbers from error message) +def strip_error(s): + '''little routine which strips numerical digits from errors''' + result_nodigits = ''.join(i for i in s if not i.isdigit()) + result =' '.join( result_nodigits.split() ) + return result + + + + +# read root pf file from command line +if len(sys.argv) > 1: + root = sys.argv[-1] +else: + print 'Error: no arguments provided. Exiting.' + exit (0) + +#print help if needed +help(root) + + + +# set defaults +nprocessors = 1 +diagfolder_name = 'diag_' + root + + +# check for folder args +for i in range(len(sys.argv)): + if sys.argv[i]=="-f": + diagfolder_name = sys.argv[i+1] + + +# list files in folder, put in array 'files' +command = "ls " + diagfolder_name + "/" + root + "_*.diag &" +output = subprocess.check_output ( command , shell=True ) +files = output.split("\n") +if files[-1] == "": files = files[0:-1] + + +# number of processors and therefore diag files provided as argument +nfiles = len(files) +nprocessors = nfiles + + + +# create some arrays to store the error logs and increment the counters +# note that we also count the number of threads an error occurs in + +#2d arrays with index i,j, which store the jth error in thread i, plus the counting array +error_log_thread = [] +error_count_thread = [] + +#errors that have exceeded error counts for each thread are stored here +error_nolonger=[] +error_nolonger_thread=[] + +errors=[] + + +#everything now initialised, can collate errors + +for i in range(nfiles): + + filepath = files [i] + + #two temporary arrays for storing error logs in this thread + #these get appended to the arrays above, error_log_thread + temp_error_log=[] + temp_error_count=[] + temp_errors=[] + + + # grep for error count errors in the diag file + command = "grep 'Error: error_count:' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + + # split the grep output up into lines + data = output.split("\n") + if data[-1] == "": data = data[0:-1] #this is needed because the array has an extra element + + # now cycle through the lines in output and append these message to an array + for j in range(len(data)): + error_nolonger.append(data[j]) + error_nolonger_thread.append(i) + + + + + + + # grep for errors themselves in the diag file + command = "grep 'Error:' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + #print output, filepath + + # split the grep output up into lines + data = output.split("\n") + if data[-1] == "": data = data[0:-1] + + # now cycle through the lines in output + for j in range(len(data)): + error_string=strip_error(data[j]) + temp_errors.append(error_string) + No_log=True + + for k in range(len(temp_error_log)): + if error_string==temp_error_log[k]: + No_log = False # we've found a match, increment the counts + temp_error_count[k]+=1 + if No_log: + temp_error_log.append ( error_string ) + temp_error_count.append (1) + + error_log_thread.append(temp_error_log) + error_count_thread.append(temp_error_count) + errors.append(temp_errors) + + +#1d arrays with index i,j, which store the jth error in thread i, plus the counting array +error_log_total = [] +error_count_total = [] +thread_count = [] + + + +#now we cycle over each error log for each thread and count the totals +for i in range(len(error_log_thread)): + #cycle other error_log array for + for j in range(len(error_log_thread[i])): + error_string=error_log_thread[i][j] + error_count=error_count_thread[i][j] + No_log=True + for k in range(len(error_log_total)): + if error_string==error_log_total[k]: + No_log = False # we've found a match, increment the counts + error_count_total[k]+=error_count + thread_count[k] += 1 + if No_log: + error_log_total.append ( error_string ) + error_count_total.append (error_count) + thread_count.append(1) + + + + + + + +n_logs=len(error_log_total) +n_nolonger=len(error_nolonger) + +# print the output to screen + +# first we print the total errors across all scripts +print "WATCHDOG Error summary: "+root +print "Collated errors for " + str(nprocessors) + " processors" +for i in range(n_logs): + print "\t%d -- %s -- %d" % (error_count_total[i], error_log_total[i], thread_count[i]) + + +# now the errors for each thread +print '\n-------------------------------\n' +print 'Errors which will no longer be logged' +print 'Thread -- Error' +for i in range(n_nolonger): + print '%d -- %s %s' % (error_nolonger_thread[i], 'Error count:', error_nolonger[i][57:]) + + +print '\n-------------------------------\n' +for i in range(nprocessors): + print '\n' + print 'Thread %d errors' % i + print 'Recurrences -- Description' + for j in range(len(error_log_thread[i])): + print "\t%d -- %s" % (error_count_thread[i][j], error_log_thread[i][j]) + +# all done. + + + diff --git a/py_progs/grid_Royal/grid_royal.py b/py_progs/grid_Royal/grid_royal.py new file mode 100755 index 000000000..176f6226b --- /dev/null +++ b/py_progs/grid_Royal/grid_royal.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: + grid_royal.py root num + + +Description: + + This is a program that generates commands to run a series of + python models on Royal + +Arguments: + + None + +Returns: + A new output file + +Notes: + +History: +07sep ksl Coded + + +''' + +import os +import sys +import glob + +def pfcheck(pflist): + i=0 + pfgood=[] + while i0 and line[0]=='mkdir': + j=j+1 + if j%1000 == 0: + file_no=file_no+1 + name=filename+'.%03d' % (file_no) + print 'Starting file ', name + g.close() + g=open(name,'w') + os.system('chmod +x %s ' % name) + g.write(lines[i]) + i=i+1 + g.close() + +if __name__ == "__main__": + import sys + if len(sys.argv)>1: + doit((sys.argv[1])) + else: + print 'usage: msub_split.py filename' + diff --git a/py_progs/grid_comp/Old/compare.py.090301.old b/py_progs/grid_comp/Old/compare.py.090301.old new file mode 100755 index 000000000..ae4b6b0a2 --- /dev/null +++ b/py_progs/grid_comp/Old/compare.py.090301.old @@ -0,0 +1,432 @@ +#!/usr/bin/env python +''' +090301 ksl The main routine is apparently explore, which allows +one to compare models to data. + +Bugs - The problem aborst when one selects and inclination that is not +there. It's also not obvious from the what the inputs are and particularly +how columns and inclinations are numbered. + +There is some evident overlap with monte. + +090301 ksl Made some cosmetic changes to make easier to use. + +''' + +import numpy +import pylab +from kslio import * + + + +def read_python_spec(filename,column): + """Read the a spectrum file created with python""" + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + w=[] + f=[] + line=specfile.readline() + while line!='': + z=line.split() + word1=z[0] + if word1[0]!='#': + w=w+[float(z[1])] + f=f+[float(z[column+1])] + line=specfile.readline() + w=numpy.array(w) + f=numpy.array(f) + return w, f + + +def read_data_spec(filename): + """ + Read the ascie data spectrum file with two + or three columns. If there are three columnts + it is assumed that the third column is the + error. + + """ + try: + specfile=open(filename,'r') + except IOError: + print filename," does not exist" + return(-1) + wave=[] + flux=[] + error=[] + line=specfile.readline() + while line != "": + z=line.split() + word1=z[0] + if word1[0] != '#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if len(z) > 2: + error=error+[float(z[2])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,column): + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + + +def hst(data,model,column): + """ + plot a rescale model against hst data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(2) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,1170,1210) + pylab.xticks([1180,1200]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1220,1260) +# plot_data_model(data,model,column,1220,1260) + pylab.xticks([1230,1250]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1370,1410) +# plot_data_model(data,model,column,1370,1410) + pylab.xticks([1380,1400]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1530,1570) +# plot_data_model(data,model,column,1530,1570) + pylab.xticks([1540,1560]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod,1170,1650) +# plot_data_model(data,model,column,1170,1650) + pylab.ion() + pylab.draw() + pylab.close() + +def fuse(data,model,column): + """ + plot a rescale model against FUSE data + + Note that the wavelengths are hard coded. + """ + pylab.figure(1) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,920, 960 ) + pylab.xticks([930,950]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,960,1000) + # plot_data_model(data,model,column,960,1000) + pylab.xticks([970,990]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1000,1060) + # plot_data_model(data,model,column,1000,1050) + pylab.xticks([1020,1040]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1130,1185) + # plot_data_model(data,model,column,1130,1185) + pylab.xticks([1145,1165]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 905,1185) + # plot_data_model(data,model,column,905,1185 ) + pylab.ion() + pylab.draw() + pylab.close() + +def get_grid(filename): + ''' + filenae is the list of files produced by gen_grid.py which is also read by pyfit3 + + columns is the list of columns + files is the list of all the files, with their associated values + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + #debug print line + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m 2: + error=error+[float(z[2])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,column): + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data where + data is a standard ascii spectrum file and + model is a python output spectrum and + wmin and wmax are rhe regions to be included int he plot + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%s) or mod (%s col %d) were not found' % (data,model,column) + return w,f,wmod,fmod + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + pylab.axis(xreset) + pylab.draw() + return + + + + +def hut(data,model,column): + """ + plot a rescale model against hut data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(3,figsize=(12,8)) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column, 980,1100) + pylab.xticks([ 990,1080]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1195,1275) + pylab.xticks([1200,1270]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1365,1465) + pylab.xticks([1370,1460]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1510,1580) + pylab.xticks([1520,1570]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 900,1850) + pylab.ion() + pylab.draw() + pylab.close() + + +def hst(data,model,column): + """ + plot a rescale model against hst data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(2) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,1170,1210) + pylab.xticks([1180,1200]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1220,1260) +# plot_data_model(data,model,column,1220,1260) + pylab.xticks([1230,1250]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1370,1410) +# plot_data_model(data,model,column,1370,1410) + pylab.xticks([1380,1400]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1530,1570) +# plot_data_model(data,model,column,1530,1570) + pylab.xticks([1540,1560]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod,1170,1650) +# plot_data_model(data,model,column,1170,1650) + pylab.ion() + pylab.draw() + pylab.close() + +def fuse(data,model,column): + """ + plot a rescale model against FUSE data + + Note that the wavelengths are hard coded. + """ + pylab.figure(1) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,920, 960 ) + pylab.xticks([930,950]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,960,1000) + # plot_data_model(data,model,column,960,1000) + pylab.xticks([970,990]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1000,1060) + # plot_data_model(data,model,column,1000,1050) + pylab.xticks([1020,1040]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1130,1185) + # plot_data_model(data,model,column,1130,1185) + pylab.xticks([1145,1165]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 905,1185) + # plot_data_model(data,model,column,905,1185 ) + pylab.ion() + pylab.draw() + pylab.close() + +def get_grid(filename): + ''' + filenae is the list of files produced by gen_grid.py which is also read by pyfit3 + + columns is the list of columns + files is the list of all the files, with their associated values + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + #debug print line + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1: + i=1 + while i col_err: + error=error+[float(z[col_err])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,column): + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data where + data is a standard ascii spectrum file and + model is a python output spectrum and + wmin and wmax are rhe regions to be included int he plot + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%s) or mod (%s col %d) were not found' % (data,model,column) + return w,f,wmod,fmod + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + pylab.axis(xreset) + pylab.draw() + return + + + + +def hut(data,model,column): + """ + plot a rescale model against hut data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(3,figsize=(12,8)) + pylab.draw() + # pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column, 980,1100) + pylab.xticks([ 990,1080]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1195,1275) + pylab.xticks([1200,1270]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1365,1465) + pylab.xticks([1370,1460]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1510,1580) + pylab.xticks([1520,1570]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 900,1850) + # pylab.ion() + pylab.draw() + pylab.close() + + +def hst(data,model,column): + """ + plot a rescale model against hst data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(2) + pylab.draw() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,1170,1210) + pylab.xticks([1180,1200]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1220,1260) +# plot_data_model(data,model,column,1220,1260) + pylab.xticks([1230,1250]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1370,1410) +# plot_data_model(data,model,column,1370,1410) + pylab.xticks([1380,1400]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1530,1570) +# plot_data_model(data,model,column,1530,1570) + pylab.xticks([1540,1560]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod,1170,1650) +# plot_data_model(data,model,column,1170,1650) + # pylab.ion() + pylab.draw() +# pylab.close() + +def fuse(data,model,column): + """ + plot a rescale model against FUSE data + + Note that the wavelengths are hard coded. + """ + pylab.figure(1) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,920, 960 ) + pylab.xticks([930,950]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,960,1000) + # plot_data_model(data,model,column,960,1000) + pylab.xticks([970,990]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1000,1060) + # plot_data_model(data,model,column,1000,1050) + pylab.xticks([1020,1040]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1130,1185) + # plot_data_model(data,model,column,1130,1185) + pylab.xticks([1145,1165]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 905,1185) + # plot_data_model(data,model,column,905,1185 ) + pylab.ion() + pylab.draw() + pylab.close() + +def get_grid(filename='sscyg_kgrid0902/Models.ls'): + ''' + get_grid reads a file, containing the list of models in the format produced + by gen_grid.py and read by pyfit3. + + It returns + columns which is the list of the column names and + files,which is a list of all the files, with their associated values + + Note that this does not include anything having to do with the angles for which + spectra were generated. + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1e-10: + scale=1e-10 + scaleword='-10' + elif ymax>1e-11: + scale=1e-11 + power='-11' + elif ymax>1e-12: + scale=1e-12 + power='-12' + elif ymax>1e-13: + scale=1e-13 + power='-13' + elif ymax>1e-14: + scale=1e-14 + power='-14' + else: + scale=1e-15 + power='-15' + + smax=ymax/scale # This is a number between 1 and 10 + print 'nice_flux', smax + + delta=3 + while 3 > smax/delta: + delta=delta-0.1 + + label=[] + y=[] + i=0 + while i<4: + y=y+[(delta*scale*i)] + label=label+['%.1f' % (delta*i)] + i=i+1 + return y,label,power + + + +def pyfit3_out(filename,inst='hst'): + ''' + Plot the results of pyfit3 in a standard way. The instrument + defines what standard wavelength ranges are involved + ''' + + wav,flux,err=read_data_spec(filename,0,1,2) + wav,mod,good=read_data_spec(filename,0,3,4) + + hst_bands= [[1175.64,'C III']] + hst_bands=hst_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1393.754,'Si IV']] + hst_bands=hst_bands+[[1548.203,'C IV']] + + + + pylab.figure(3) + pylab.clf() + + + i=0 + while i<4: + subplotno=221+i + + ax=pylab.subplot(subplotno) + + # Read the specific spectrum for this file + wav,line,good=read_data_spec(filename,0,5+2*i,6+2*i) + # Get the wavelengths for this band + wmin,wmax,x,xlabel=vel_lim(hst_bands[i][0],3000,3) + + # Reduce all three spectra to the wavelength ranges to be plotted + ww,ff=reduce_xy(wav,flux,wmin,wmax) + wwmod,ffmod=reduce_xy(wav,mod,wmin,wmax) + wwbest,ffbest=reduce_xy(wav,line,wmin,wmax) + + # plot the spectra + pylab.plot(wwmod,ffmod,'g:') + pylab.plot(ww,ff,'b') + pylab.plot(wwbest,ffbest,'r') + + + + # Now label it all + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xreset[3]=2*numpy.median(ff) + pylab.axis(xreset) + pylab.xticks(x,xlabel) + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + # Add a label. Note that .text is in coordinates of plt + xpos=wmin+(wmax-wmin)*0.1 + ypos=0.8*xreset[3] + pylab.text(xpos,ypos,hst_bands[i][1]) + + + i=i+1 + + + + # Finally add the global labels + pylab.figtext(0.5, 0.0,r'Velocity ($km \/ s^{-1}$) ',horizontalalignment='center') + pylab.figtext(0.03,0.3,r'Flux ($ergs \/ cm^{-2} s^{-1} \AA^{-1}$)',multialignment='center',rotation='vertical') + + +# pylab.xticks(x,xlabel) + pylab.draw() diff --git a/py_progs/grid_comp/Old/compare.py.090307.old b/py_progs/grid_comp/Old/compare.py.090307.old new file mode 100755 index 000000000..cd4ca6741 --- /dev/null +++ b/py_progs/grid_comp/Old/compare.py.090307.old @@ -0,0 +1,827 @@ +#!/usr/bin/env python +''' +090301 ksl The main routine is apparently explore, which allows +one to compare models to data. + +Bugs - The problem aborst when one selects and inclination that is not +there. It's also not obvious from the what the inputs are and particularly +how columns and inclinations are numbered. + +There is some evident overlap with monte. + +090301 ksl Made some cosmetic changes to make easier to use. + +''' + +import numpy +import pylab +from matplotlib.ticker import FuncFormatter +from kslio import * +import carlo + + + +def get_python_spec_angles(filename='py_ixvel/ixvel_00_00_00_00_00_00_00.spec'): + ''' + This routine simply finds the angles for which a specific python spectrum + has been calculated and returns them as a list + ''' + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return w,f + + angles=[] + line=specfile.readline() + while line!='': + z=line.split('Ang:') + if len(z)>1: + i=1 + while i col_err: + error=error+[float(z[col_err])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,ang_no): + ''' + get_data_model just gets an observed + spectrum, data, and a model spectrum + + data is the name of the observed spectrum + mdoel is the filename of the model + ang_no is the spectrum number beginning + with 1 + + Note - It's not clear that this routine + is that useful. + + ''' + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,ang_no) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data where + data is a standard ascii spectrum file and + model is a python output spectrum and + wmin and wmax are rhe regions to be included int he plot + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%s) or mod (%s col %d) were not found' % (data,model,column) + return w,f,wmod,fmod + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + return + + + + +def hut(data,model,column): + """ + plot a rescale model against hut data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(3,figsize=(12,8)) + pylab.draw() + # pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column, 980,1100) + pylab.xticks([ 990,1080]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1195,1275) + pylab.xticks([1200,1270]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1365,1465) + pylab.xticks([1370,1460]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1510,1580) + pylab.xticks([1520,1570]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 900,1850) + # pylab.ion() + pylab.draw() + pylab.close() + + +def hst(data,model,column): + """ + plot a rescale model against hst data + + Note that the wavelengths to be plotted are + hardcoded + """ + pylab.figure(2,figsize=(14,10)) + + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + + pylab.subplot(241) + add_plot(w,f,wmod,fmod,1170,1210) + pylab.xticks([1180,1200]) + + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1220,1260) + pylab.xticks([1230,1250]) + + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1370,1410) + pylab.xticks([1380,1400]) + pylab.subplot(244) + + add_plot(w,f,wmod,fmod,1530,1570) + pylab.xticks([1540,1560]) + + # The entire spectrum + + pylab.subplot(212) + add_plot(w,f,wmod,fmod,1170,1650) + + # Finally add the global labels + pylab.figtext(0.5, 0.94,'HST',horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Wavelength ($\AA$) ',horizontalalignment='center') + pylab.figtext(0.03,0.5,r'Flux ($ergs \/ cm^{-2} s^{-1} \AA^{-1}$)',verticalalignment='center',rotation='vertical') + + pylab.draw() + +def fuse(data,model,column): + """ + plot a rescale model against FUSE data + + Note that the wavelengths are hard coded. + """ + pylab.figure(1) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,920, 960 ) + pylab.xticks([930,950]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,960,1000) + # plot_data_model(data,model,column,960,1000) + pylab.xticks([970,990]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1000,1060) + # plot_data_model(data,model,column,1000,1050) + pylab.xticks([1020,1040]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1130,1185) + # plot_data_model(data,model,column,1130,1185) + pylab.xticks([1145,1165]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 905,1185) + # plot_data_model(data,model,column,905,1185 ) + pylab.ion() + pylab.draw() + pylab.close() + +def get_grid(filename='sscyg_kgrid0902/Models.ls'): + ''' + get_grid reads a file, containing the list of models in the format produced + by gen_grid.py and read by pyfit3. + + It returns + columns which is the list of the column names and + files,which is a list of all the files, with their associated values + + Note that this does not include anything having to do with the angles for which + spectra were generated. + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1e-10: + scale=1e-10 + scaleword='-10' + elif ymax>1e-11: + scale=1e-11 + power='-11' + elif ymax>1e-12: + scale=1e-12 + power='-12' + elif ymax>1e-13: + scale=1e-13 + power='-13' + elif ymax>1e-14: + scale=1e-14 + power='-14' + else: + scale=1e-15 + power='-15' + + smax=ymax/scale # This is a number between 1 and 10 + print 'nice_flux', smax + + delta=3 + while 3 > smax/delta: + delta=delta-0.1 + + label=[] + y=[] + i=0 + while i<4: + y=y+[(delta*scale*i)] + label=label+['%.1f' % (delta*i)] + i=i+1 + return y,label,power + + + +def pyfit3_out(filename,inst='hst'): + ''' + Plot the results of pyfit3 in a standard way. The instrument + defines what standard wavelength ranges are involved + ''' + + wav,flux,err=read_data_spec(filename,0,1,2) + wav,mod,good=read_data_spec(filename,0,3,4) + + hst_bands= [[1175.64,'C III']] + hst_bands=hst_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1393.754,'Si IV']] + hst_bands=hst_bands+[[1548.203,'C IV']] + + + # 1031.93 )triplet) 1037.62 (singlet) + hut_bands= [[1031.93,'O VI']] + hut_bands=hut_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hut_bands=hut_bands+[[1393.754,'Si IV']] + hut_bands=hut_bands+[[1548.203,'C IV']] + + + + + # SVI 933.378 (triplet) 944.523 singlet + fuse_bands= [[933.378,'S VI']] + # CIII 977.0201 + # NIII 991.577 991.511 are slighly off the ground state, but have highes progs + # NIII 989.799 is the ground state, but has a lower gf. + fuse_bands=fuse_bands+[[977.02,'CIII 977']] + fuse_bands=fuse_bands+[[1031.93,'O VI']] + fuse_bands=fuse_bands+[[1175.64,'C III 1175']] + + + + + if inst=='hut': + mytitle='HUT' + bands=hut_bands + vel_width=9000 + elif inst=='fuse': + mytitle='FUSE' + bands=fuse_bands + vel_width=9000 + else: + mytitle='HST' + bands=hst_bands + vel_width=3000 + + pylab.figure(3) + pylab.clf() + + + i=0 + while i<4: + subplotno=221+i + + ax=pylab.subplot(subplotno) + + # Read the specific spectrum for this file + wav,line,good=read_data_spec(filename,0,5+2*i,6+2*i) + # Get the wavelengths for this band + wmin,wmax,x,xlabel=vel_lim(bands[i][0],vel_width,3) + + # Reduce all three spectra to the wavelength ranges to be plotted + ww,ff=reduce_xy(wav,flux,wmin,wmax) + wwmod,ffmod=reduce_xy(wav,mod,wmin,wmax) + wwbest,ffbest=reduce_xy(wav,line,wmin,wmax) + + # plot the spectra + pylab.plot(wwmod,ffmod,':g') + # pylab.plot(wwmod,ffmod,':k',linewidth=3) + pylab.plot(ww,ff,'b') + pylab.plot(wwbest,ffbest,'r') + + + + # Now label it all + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xreset[3]=2*numpy.median(ff) + pylab.axis(xreset) + pylab.xticks(x,xlabel) + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + # Add a label. Note that .text is in coordinates of plt + xpos=wmin+(wmax-wmin)*0.1 + ypos=0.8*xreset[3] + pylab.text(xpos,ypos,bands[i][1]) + + + i=i+1 + + + + # Finally add the global labels + pylab.figtext(0.5, 0.94,mytitle,horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Velocity ($km \/ s^{-1}$) ',horizontalalignment='center') + pylab.figtext(0.03,0.3,r'Flux ($ergs \/ cm^{-2} s^{-1} \AA^{-1}$)',multialignment='center',rotation='vertical') + + +# pylab.xticks(x,xlabel) + pylab.draw() + pylab.savefig(filename+'.jpg') diff --git a/py_progs/grid_comp/Old/compare.py.090312.old b/py_progs/grid_comp/Old/compare.py.090312.old new file mode 100755 index 000000000..79b4cc4aa --- /dev/null +++ b/py_progs/grid_comp/Old/compare.py.090312.old @@ -0,0 +1,885 @@ +#!/usr/bin/env python +''' +090301 ksl The main routine is apparently explore, which allows +one to compare models to data. + +Bugs - The problem aborst when one selects and inclination that is not +there. It's also not obvious from the what the inputs are and particularly +how columns and inclinations are numbered. + +There is some evident overlap with monte. + +090301 ksl Made some cosmetic changes to make easier to use. + +''' + +import numpy +import pylab +from matplotlib.ticker import FuncFormatter +from kslio import * +import carlo + + + +def get_python_spec_angles(filename='py_ixvel/ixvel_00_00_00_00_00_00_00.spec'): + ''' + This routine simply finds the angles for which a specific python spectrum + has been calculated and returns them as a list + ''' + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return w,f + + angles=[] + line=specfile.readline() + while line!='': + z=line.split('Ang:') + if len(z)>1: + i=1 + while i col_err: + error=error+[float(z[col_err])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,ang_no): + ''' + get_data_model just gets an observed + spectrum, data, and a model spectrum + + data is the name of the observed spectrum + mdoel is the filename of the model + ang_no is the spectrum number beginning + with 1 + + Note - It's not clear that this routine + is that useful. + + ''' + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,ang_no) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data where + data is a standard ascii spectrum file and + model is a python output spectrum and + wmin and wmax are rhe regions to be included int he plot + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%s) or mod (%s col %d) were not found' % (data,model,column) + return w,f,wmod,fmod + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + return + + +def xadd_plot(w,f,wmod,fmod,band): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + wmin=band[0] + wmax=band[1] + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + print "The yname was %s ",yname + + if band[2]!='Complete': + wmid=0.5*(wmax+wmin) + ww=(int(wmid)/5)*5 + pylab.xticks([ww-10,ww+10]) + x=0.5*(wmin+wmid) + y=0.8*xreset[3] + pylab.text(x,y,band[2]) + + + pylab.axis(xreset) + return yname + + + + + + + +def xplot(data,model,column,inst='hst'): + """ + plot a rescaled model on an instrument + by intrument basis + + 090307 This is a generalized versons of + the earlier routine to reflect + what I have learned earlier + """ + pylab.figure(2,figsize=(14,10)) + pylab.clf() + + + hst_bands= [[1155, 1195,'C III']] + hst_bands=hst_bands+[[1220, 1260,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1380, 1420,'Si IV']] + hst_bands=hst_bands+[[1530, 1570,'C IV']] + hst_bands=hst_bands+[[1170, 1650,'Complete']] + + + # 1031.93 )triplet) 1037.62 (singlet) + hut_bands= [[1010,1050,'O VI']] + hut_bands=hut_bands+[[1220,1260,'N V']] + # 1393.7546 1402.7697 + hut_bands=hut_bands+[[1380, 1420,'Si IV']] + hut_bands=hut_bands+[[1530, 1570,'C IV']] + hut_bands=hut_bands+[[ 900, 1825,'Complete']] + + + # SVI 933.378 (triplet) 944.523 singlet + fuse_bands= [[920,960,'S VI']] + # CIII 977.0201 + # NIII 991.577 991.511 are slighly off the ground state, but have highes progs + # NIII 989.799 is the ground state, but has a lower gf. + fuse_bands=fuse_bands+[[960,1000,'CIII 977']] + fuse_bands=fuse_bands+[[1010,1050,'O VI']] + fuse_bands=fuse_bands+[[1140,1180,'C III 1175']] + fuse_bands=fuse_bands+[[900,1180,'Complete']] + + + + if inst=='hut': + band=hut_bands + mytitle='HUT' + elif inst=='fuse': + band=fuse_bands + mytitle='FUSE' + else: + mytitle='HST' + band=hst_bands + + + print band + + # Get the data and the model + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + + pylab.subplot(241) + xadd_plot(w,f,wmod,fmod,band[0]) + # pylab.xticks([1180,1200]) + + pylab.subplot(242) + xadd_plot(w,f,wmod,fmod,band[1]) + # pylab.xticks([1230,1250]) + + pylab.subplot(243) + xadd_plot(w,f,wmod,fmod,band[2]) + # pylab.xticks([1380,1400]) + pylab.subplot(244) + + xadd_plot(w,f,wmod,fmod,band[3]) + # pylab.xticks([1540,1560]) + + # The entire spectrum + + pylab.subplot(212) + yname=xadd_plot(w,f,wmod,fmod,band[4]) + + # Finally add the global labels + pylab.figtext(0.5, 0.94,mytitle,horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Wavelength ($\AA$) ',horizontalalignment='center') + + string=r'Flux ($ 10^{%s} ergs \/ cm^{-2} s^{-1} \AA^{-1}$)' %yname + + pylab.figtext(0.03,0.5,string,verticalalignment='center',rotation='vertical') + + pylab.draw() + pylab.savefig(inst+'.jpg') + + + + +def get_grid(filename='sscyg_kgrid0902/Models.ls'): + ''' + get_grid reads a file, containing the list of models in the format produced + by gen_grid.py and read by pyfit3. + + It returns + columns which is the list of the column names and + files,which is a list of all the files, with their associated values + + Note that this does not include anything having to do with the angles for which + spectra were generated. + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1e-10: + scale=1e-10 + scaleword='-10' + elif ymax>1e-11: + scale=1e-11 + power='-11' + elif ymax>1e-12: + scale=1e-12 + power='-12' + elif ymax>1e-13: + scale=1e-13 + power='-13' + elif ymax>1e-14: + scale=1e-14 + power='-14' + else: + scale=1e-15 + power='-15' + + smax=ymax/scale # This is a number between 1 and 10 + print 'nice_flux', smax + + delta=3 + while 3 > smax/delta: + delta=delta-0.1 + + label=[] + y=[] + i=0 + while i<4: + y=y+[(delta*scale*i)] + label=label+['%.1f' % (delta*i)] + i=i+1 + return y,label,power + + + +def pyfit3_out(filename,inst='hst'): + ''' + Plot the results of pyfit3 in a standard way. The instrument + defines what standard wavelength ranges are involved + ''' + + wav,flux,err=read_data_spec(filename,0,1,2) + wav,mod,good=read_data_spec(filename,0,3,4) + + hst_bands= [[1175.64,'C III']] + hst_bands=hst_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1393.754,'Si IV']] + hst_bands=hst_bands+[[1548.203,'C IV']] + + + # 1031.93 )triplet) 1037.62 (singlet) + hut_bands= [[1031.93,'O VI']] + hut_bands=hut_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hut_bands=hut_bands+[[1393.754,'Si IV']] + hut_bands=hut_bands+[[1548.203,'C IV']] + + + + + # SVI 933.378 (triplet) 944.523 singlet + fuse_bands= [[933.378,'S VI']] + # CIII 977.0201 + # NIII 991.577 991.511 are slighly off the ground state, but have highes progs + # NIII 989.799 is the ground state, but has a lower gf. + fuse_bands=fuse_bands+[[977.02,'CIII 977']] + fuse_bands=fuse_bands+[[1031.93,'O VI']] + fuse_bands=fuse_bands+[[1175.64,'C III 1175']] + + + + + if inst=='hut': + mytitle='HUT' + bands=hut_bands + vel_width=9000 + elif inst=='fuse': + mytitle='FUSE' + bands=fuse_bands + vel_width=9000 + else: + mytitle='HST' + bands=hst_bands + vel_width=3000 + + pylab.figure(3) + pylab.clf() + + + i=0 + while i<4: + + subplotno=221+i + + ax=pylab.subplot(subplotno) + + # Read the specific spectrum for this file + wav,line,good=read_data_spec(filename,0,5+2*i,6+2*i) + # Get the wavelengths for this band + wmin,wmax,x,xlabel=vel_lim(bands[i][0],vel_width,3) + + # Reduce all three spectra to the wavelength ranges to be plotted + ww,ff=reduce_xy(wav,flux,wmin,wmax) + wwmod,ffmod=reduce_xy(wav,mod,wmin,wmax) + wwbest,ffbest=reduce_xy(wav,line,wmin,wmax) + + # plot the spectra + pylab.plot(wwmod,ffmod,'g') + # pylab.plot(wwmod,ffmod,':k',linewidth=3) + pylab.plot(ww,ff,'b') + pylab.plot(wwbest,ffbest,'r') + + + + # Now label it all + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xreset[3]=2*numpy.median(ff) + pylab.axis(xreset) + pylab.xticks(x,xlabel) + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + # Add a label. Note that .text is in coordinates of plt + xpos=wmin+(wmax-wmin)*0.1 + ypos=0.8*xreset[3] + pylab.text(xpos,ypos,bands[i][1]) + + + i=i+1 + + string=r'Flux ($ 10^{%s} ergs \/ cm^{-2} s^{-1} \AA^{-1}$)' %yname + + + + # Finally add the global labels + pylab.figtext(0.5, 0.94,mytitle,horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Velocity ($km \/ s^{-1}$) ',horizontalalignment='center') + pylab.figtext(0.03,0.5,string,verticalalignment='center',rotation='vertical') + + +# pylab.xticks(x,xlabel) + pylab.draw() + pylab.savefig(filename+'.jpg') + + + +print ''' +The main routines are: + +compare.explore(modellist='py_ixvel/models.ls',spectrum='ixvel_stis2',obs='hst',ions='no') + allows one to explore models based on the variables that were used to generate the models + +comapare.pyfit3_out(filename,inst='hst') + which produces a plot that shows the results of a pyfit3 run. + This is rougly equivalent to sm.pyfit3 + +compare.xplot(data,model,column,inst='hst') + compare observed spectrum to a specific model and numbered angle on an instrument + by instrument basis + +For more extensive information, use the help facility +''' diff --git a/py_progs/grid_comp/Old/compare.py.old b/py_progs/grid_comp/Old/compare.py.old new file mode 100755 index 000000000..f6ac0d7ab --- /dev/null +++ b/py_progs/grid_comp/Old/compare.py.old @@ -0,0 +1,396 @@ +#!/usr/bin/env python +''' +090301 ksl The main routine is apparently explore, which allows +one to compare models to data. + +Bugs - The problem aborst when one selects and inclination that is not +there. It's also not obvious from the what the inputs are and particularly +how columns and inclinations are numbered. Th way numpy is imported is painful. + +There is some evident overlap with monte. + +''' + +from numpy import * +import pylab +from kslio import * + + + +def read_python_spec(filename,column): + """Read the a spectrum file created with python""" + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + w=[] + f=[] + line=specfile.readline() + while line!='': + z=line.split() + word1=z[0] + if word1[0]!='#': + w=w+[float(z[1])] + f=f+[float(z[column+1])] + line=specfile.readline() + w=array(w) + f=array(f) + return w, f + + +def read_data_spec(filename): + """Read the ascie data spectrum file""" + try: + specfile=open(filename,'r') + except IOError: + print filename," does not exist" + return(-1) + wave=[] + flux=[] + error=[] + line=specfile.readline() + while line != "": + z=line.split() + word1=z[0] + if word1[0] != '#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if len(z) > 2: + error=error+[float(z[2])] + else: + error=error([1.0]) + line=specfile.readline() + wave=array(wave) + flux=array(flux) + error=array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=compress(condition,x) + yout=compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,column): + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """plot a rescaled model against the data""" + + + w,f,wmod,fmod=get_data_model(data,model,column) + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + pylab.axis(xreset) + pylab.draw() + + + + +def hst(data,model,column): + """plot a rescale model against echelle data""" + pylab.figure(2) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,1170,1210) + pylab.xticks([1180,1200]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,1220,1260) +# plot_data_model(data,model,column,1220,1260) + pylab.xticks([1230,1250]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1370,1410) +# plot_data_model(data,model,column,1370,1410) + pylab.xticks([1380,1400]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1530,1570) +# plot_data_model(data,model,column,1530,1570) + pylab.xticks([1540,1560]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod,1170,1650) +# plot_data_model(data,model,column,1170,1650) + pylab.ion() + pylab.draw() + pylab.close() + +def fuse(data,model,column): + """plot a rescale model against FUSE data""" + pylab.figure(1) + pylab.draw() + pylab.ioff() + pylab.clf() + pylab.subplot(241) + w,f,wmod,fmod=plot_data_model(data,model,column,920, 960 ) + pylab.xticks([930,950]) + pylab.subplot(242) + add_plot(w,f,wmod,fmod,960,1000) + # plot_data_model(data,model,column,960,1000) + pylab.xticks([970,990]) + pylab.subplot(243) + add_plot(w,f,wmod,fmod,1000,1060) + # plot_data_model(data,model,column,1000,1050) + pylab.xticks([1020,1040]) + pylab.subplot(244) + add_plot(w,f,wmod,fmod,1130,1185) + # plot_data_model(data,model,column,1130,1185) + pylab.xticks([1145,1165]) + + pylab.subplot(212) + add_plot(w,f,wmod,fmod, 905,1185) + # plot_data_model(data,model,column,905,1185 ) + pylab.ion() + pylab.draw() + pylab.close() + +def get_grid(filename): + ''' + filenae is the list of files produced by gen_grid.py which is also read by pyfit3 + + columns is the list of columns + files is the list of all the files, with their associated values + ''' + + f=open(filename,'r') + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + #debug print line + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1: + i=1 + while i col_err: + error=error+[float(z[col_err])] + else: + error=error([1.0]) + line=specfile.readline() + wave=numpy.array(wave) + flux=numpy.array(flux) + error=numpy.array(error) + return wave, flux, error + + +def reduce_xy(x,y,xmin,xmax): + ''' + Get the portions of the array that are within xmin and xmax + ''' + condition= (xmin < x) & (x < xmax) + xout=numpy.compress(condition,x) + yout=numpy.compress(condition,y) + return xout,yout + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + xout,yout=reduce_xy(x,y,xmin,xmax) + a=numpy.average(yout) + return a + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) + mod_ave=ave(wmod,fmod,wmin,wmax); + scale=data_ave/mod_ave + return scale*fmod + + + +def get_data_model (data,model,ang_no): + ''' + get_data_model just gets an observed + spectrum, data, and a model spectrum + + data is the name of the observed spectrum + mdoel is the filename of the model + ang_no is the spectrum number beginning + with 1 + + Note - It's not clear that this routine + is that useful. + + ''' + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,ang_no) + return w,f,wmod,fmod + +def plot_data_model(data,model,column,wmin,wmax): + """ + plot a rescaled model against the data where + data is a standard ascii spectrum file and + model is a python output spectrum and + wmin and wmax are rhe regions to be included int he plot + """ + + + w,f,wmod,fmod=get_data_model(data,model,column) + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%s) or mod (%s col %d) were not found' % (data,model,column) + return w,f,wmod,fmod + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + + + return w,f,wmod,fmod + +def add_plot(w,f,wmod,fmod,wmin,wmax): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + pylab.axis(xreset) + pylab.draw() + return + + +def xadd_plot(w,f,wmod,fmod,band): + ''' + This is the generic routine that plots a panel of the spectrum + ''' + + # Check that get_data_model succeeded + if len(f)==0 or len(fmod) == 0: + print 'data (%d) or mod (%d ) had zero length' % (len(f),len(fmod)) + return + + wmin=band[0] + wmax=band[1] + + ww,ff=reduce_xy(w,f,wmin,wmax) + wwmod,ffmod=reduce_xy(wmod,fmod,wmin,wmax) + + + fscale=scale_model (ww,ff,wwmod,ffmod,wmin,wmax) + + pylab.plot(wwmod,fscale,'r') + pylab.plot(ww,ff,'b') + + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xmed=numpy.median(ff) + xreset[3]=3.*xmed + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + print "The yname was %s ",yname + + if band[2]!='Complete': + wmid=0.5*(wmax+wmin) + ww=(int(wmid)/5)*5 + pylab.xticks([ww-10,ww+10]) + x=0.5*(wmin+wmid) + y=0.8*xreset[3] + pylab.text(x,y,band[2]) + + + pylab.axis(xreset) + return yname + + + + + + + +def xplot(data,model,column,inst='hst'): + """ + plot a rescaled model on an instrument + by intrument basis + + 090307 This is a generalized versons of + the earlier routine to reflect + what I have learned earlier + """ + pylab.figure(2,figsize=(14,10)) + pylab.clf() + + + hst_bands= [[1155, 1195,'C III']] + hst_bands=hst_bands+[[1220, 1260,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1380, 1420,'Si IV']] + hst_bands=hst_bands+[[1530, 1570,'C IV']] + hst_bands=hst_bands+[[1170, 1650,'Complete']] + + + # 1031.93 )triplet) 1037.62 (singlet) + hut_bands= [[1010,1050,'O VI']] + hut_bands=hut_bands+[[1220,1260,'N V']] + # 1393.7546 1402.7697 + hut_bands=hut_bands+[[1380, 1420,'Si IV']] + hut_bands=hut_bands+[[1530, 1570,'C IV']] + hut_bands=hut_bands+[[ 900, 1825,'Complete']] + + + # SVI 933.378 (triplet) 944.523 singlet + fuse_bands= [[920,960,'S VI']] + # CIII 977.0201 + # NIII 991.577 991.511 are slighly off the ground state, but have highes progs + # NIII 989.799 is the ground state, but has a lower gf. + fuse_bands=fuse_bands+[[960,1000,'CIII 977']] + fuse_bands=fuse_bands+[[1010,1050,'O VI']] + fuse_bands=fuse_bands+[[1140,1180,'C III 1175']] + fuse_bands=fuse_bands+[[900,1180,'Complete']] + + + + if inst=='hut': + band=hut_bands + mytitle='HUT' + elif inst=='fuse': + band=fuse_bands + mytitle='FUSE' + else: + mytitle='HST' + band=hst_bands + + + print band + + # Get the data and the model + w,f,e=read_data_spec(data) + wmod,fmod=read_python_spec(model,column) + + pylab.subplot(241) + xadd_plot(w,f,wmod,fmod,band[0]) + # pylab.xticks([1180,1200]) + + pylab.subplot(242) + xadd_plot(w,f,wmod,fmod,band[1]) + # pylab.xticks([1230,1250]) + + pylab.subplot(243) + xadd_plot(w,f,wmod,fmod,band[2]) + # pylab.xticks([1380,1400]) + pylab.subplot(244) + + xadd_plot(w,f,wmod,fmod,band[3]) + # pylab.xticks([1540,1560]) + + # The entire spectrum + + pylab.subplot(212) + yname=xadd_plot(w,f,wmod,fmod,band[4]) + + # Finally add the global labels + pylab.figtext(0.5, 0.94,mytitle,horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Wavelength ($\AA$) ',horizontalalignment='center') + + string=r'Flux ($ 10^{%s} ergs \/ cm^{-2} s^{-1} \AA^{-1}$)' %yname + + pylab.figtext(0.03,0.5,string,verticalalignment='center',rotation='vertical') + + pylab.draw() + pylab.savefig(inst+'.jpg') + + + + +def get_grid(filename='sscyg_kgrid0902/Models.ls',outfile='none'): + ''' + get_grid reads a file, containing the list of models in the format produced + by gen_grid.py and read by pyfit3. + + It returns + columns which is the list of the column names and + files,which is a list of all the files, with their associated values + + If outfile is something other than none, all of the comments are written to + that file. This is to prepare for writting a new file with censored values, + see sensor below. + + + Note that this does not include anything having to do with the angles for which + spectra were generated. + ''' + + f=open(filename,'r') + + print 'get_grid ',outfile + if outfile!='none': + g=open(outfile,'w') + + + + line=f.readline() + columns=[] + files=[] + n=0 + while line!='': + z=line.split() + if z[0]=='#': + if z[1]=='Variable': + columns=columns+[z[2]] + if outfile !='none': + print line + g.write('%s' % line) + else: + nvar=len(columns) + zz=[z[0]] + m=1 + while m1e-10: + scale=1e-10 + scaleword='-10' + elif ymax>1e-11: + scale=1e-11 + power='-11' + elif ymax>1e-12: + scale=1e-12 + power='-12' + elif ymax>1e-13: + scale=1e-13 + power='-13' + elif ymax>1e-14: + scale=1e-14 + power='-14' + else: + scale=1e-15 + power='-15' + + smax=ymax/scale # This is a number between 1 and 10 + print 'nice_flux', smax + + delta=3 + while 3 > smax/delta: + delta=delta-0.1 + + label=[] + y=[] + i=0 + while i<4: + y=y+[(delta*scale*i)] + label=label+['%.1f' % (delta*i)] + i=i+1 + return y,label,power + + + +def pyfit3_out(filename,inst='hst'): + ''' + Plot the results of pyfit3 in a standard way. The instrument + defines what standard wavelength ranges are involved + ''' + + wav,flux,err=read_data_spec(filename,0,1,2) + wav,mod,good=read_data_spec(filename,0,3,4) + + hst_bands= [[1175.64,'C III']] + hst_bands=hst_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hst_bands=hst_bands+[[1393.754,'Si IV']] + hst_bands=hst_bands+[[1548.203,'C IV']] + + + # 1031.93 )triplet) 1037.62 (singlet) + hut_bands= [[1031.93,'O VI']] + hut_bands=hut_bands+[[1238.821,'N V']] + # 1393.7546 1402.7697 + hut_bands=hut_bands+[[1393.754,'Si IV']] + hut_bands=hut_bands+[[1548.203,'C IV']] + + + + + # SVI 933.378 (triplet) 944.523 singlet + fuse_bands= [[933.378,'S VI']] + # CIII 977.0201 + # NIII 991.577 991.511 are slighly off the ground state, but have highes progs + # NIII 989.799 is the ground state, but has a lower gf. + fuse_bands=fuse_bands+[[977.02,'CIII 977']] + fuse_bands=fuse_bands+[[1031.93,'O VI']] + fuse_bands=fuse_bands+[[1175.64,'C III 1175']] + + + + + if inst=='hut': + mytitle='HUT' + bands=hut_bands + vel_width=9000 + elif inst=='fuse': + mytitle='FUSE' + bands=fuse_bands + vel_width=9000 + else: + mytitle='HST' + bands=hst_bands + vel_width=3000 + + pylab.figure(3) + pylab.clf() + + + i=0 + while i<4: + + subplotno=221+i + + ax=pylab.subplot(subplotno) + + # Read the specific spectrum for this file + wav,line,good=read_data_spec(filename,0,5+2*i,6+2*i) + # Get the wavelengths for this band + wmin,wmax,x,xlabel=vel_lim(bands[i][0],vel_width,3) + + # Reduce all three spectra to the wavelength ranges to be plotted + ww,ff=reduce_xy(wav,flux,wmin,wmax) + wwmod,ffmod=reduce_xy(wav,mod,wmin,wmax) + wwbest,ffbest=reduce_xy(wav,line,wmin,wmax) + + # plot the spectra + pylab.plot(wwmod,ffmod,'g') + # pylab.plot(wwmod,ffmod,':k',linewidth=3) + pylab.plot(ww,ff,'b') + pylab.plot(wwbest,ffbest,'r') + + + + # Now label it all + reset=pylab.axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + xreset[3]=2*numpy.median(ff) + pylab.axis(xreset) + pylab.xticks(x,xlabel) + y,ylabel,yname=nice_flux_labels(xreset[3]) + pylab.yticks(y,ylabel) + # Add a label. Note that .text is in coordinates of plt + xpos=wmin+(wmax-wmin)*0.1 + ypos=0.8*xreset[3] + pylab.text(xpos,ypos,bands[i][1]) + + + i=i+1 + + string=r'Flux ($ 10^{%s} ergs \/ cm^{-2} s^{-1} \AA^{-1}$)' %yname + + + + # Finally add the global labels + pylab.figtext(0.5, 0.94,mytitle,horizontalalignment='center') + pylab.figtext(0.5, 0.0,r'Velocity ($km \/ s^{-1}$) ',horizontalalignment='center') + pylab.figtext(0.03,0.5,string,verticalalignment='center',rotation='vertical') + + +# pylab.xticks(x,xlabel) + pylab.draw() + pylab.savefig(filename+'.jpg') + + + +print ''' +The main routines are: + +compare.explore(modellist='py_ixvel/models.ls',spectrum='ixvel_stis2',obs='hst',ions='no') + allows one to explore models based on the variables that were used to generate the models + +comapare.pyfit3_out(filename,inst='hst') + which produces a plot that shows the results of a pyfit3 run. + This is rougly equivalent to sm.pyfit3 + +compare.xplot(data,model,column,inst='hst') + compare observed spectrum to a specific model and numbered angle on an instrument + by instrument basis + +compare.censor(modellist,newlist) + produces a new list of files in a format for pyfit3 which have been censored to for + example be a specific mdot. +For more extensive information, use the help facility +''' diff --git a/py_progs/grid_comp/compare_one.py b/py_progs/grid_comp/compare_one.py new file mode 100755 index 000000000..b41524786 --- /dev/null +++ b/py_progs/grid_comp/compare_one.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python + +from numpy import * +from pylab import * + + + +def read_python_spec(filename,column): + """Read the a spectrum file created with python""" + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + w=[] + f=[] + line=specfile.readline() + while line!='': + z=line.split() + word1=z[0] + if word1[0]=='#': + # its a coment + else: + w=w+[float(z[1])] + f=f+[float(z[column+1]) + line=specfile.readline() + return w, f + + +def read_data_spec(filename,wave,flux,error): + """Read the ascie data spectrum file""" + try: + specfile=open(filename,'r') + except IOError: + print filename," does not exist" + return(-1) + n=0 + z=specfile.readline() + while (z != ""): + q=z.split() + word1=q[0] + if word1[0] != '#': + wave.extend([float(q[0])]) + flux.extend([float(q[1])]) + if len(q) > 2: + error.extend([float(q[2])]) + ierr=1 + else: + error.extend([1.0]) + ierr=0 + n=n+1 + z=specfile.readline() + return filename,n,ierr + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + lx=len(x) + num=0 + ytot=0 + l=0 + while l < lx : + if(xmin <= x[l] <= xmax): + ytot=ytot+y[l] + num=num+1 + l=l+1 + if (num==0): return(-99) + return(ytot/num) + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax,fout): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) +# print data_ave + mod_ave=ave(wmod,fmod,wmin,wmax); +# print mod_ave + scale=data_ave/mod_ave + rescale(fmod,fout,scale) +# print 'len fout', len(fout) + return scale + + +def plot_data_model(data,model,column,wmin,wmax): + """plot a rescaled model against the data""" + wave=[] + flux=[] + error=[] + if read_data_spec(data,wave,flux,error) == -1: + return -1 +# print 'Read data',len(wave),len(flux) + wmod=[] + fmod=[] + if read_python_spec(model,column,wmod,fmod) == -1: + return -1 +# print 'Read model',len(wmod),len(fmod) + fout=[] + scale_model (wave,flux,wmod,fmod,wmin,wmax,fout) +# print 'scale_model', len(fout) + plot(wave,flux,'b') + plot(wmod,fout,'r') + reset=axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + axis(xreset) + draw() + + diff --git a/py_progs/grid_comp/history.txt b/py_progs/grid_comp/history.txt new file mode 100644 index 000000000..65a1129ea --- /dev/null +++ b/py_progs/grid_comp/history.txt @@ -0,0 +1,2 @@ +184 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +200 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/history.txt b/py_progs/history.txt new file mode 100644 index 000000000..ff336c261 --- /dev/null +++ b/py_progs/history.txt @@ -0,0 +1,2 @@ +720 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +800 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/make_royal/history.txt b/py_progs/make_royal/history.txt new file mode 100644 index 000000000..162b11761 --- /dev/null +++ b/py_progs/make_royal/history.txt @@ -0,0 +1,2 @@ +32 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +40 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/make_royal/make_royal.py b/py_progs/make_royal/make_royal.py new file mode 100755 index 000000000..d93da2ae8 --- /dev/null +++ b/py_progs/make_royal/make_royal.py @@ -0,0 +1,195 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: + make_royal.py [-t maxtime] [-a] root + +Description: + + This is a program looks for the pf files in a directory + and generates the commands to run a series of python models + on Royal. + + -t sets the maximum time you want the program to run. The input can + be in seconds or hours. The routine decides which you have + entered + -a says to get all of the .pf files in the directory. If not, then + the routine searches for all of the .pf files that match + root*.pf + + To start Royal processing your jobs just exuecute + + root.msub + + + +Arguments: + + None + +Returns: + A new output file + +Notes: + +History: +08nov ksl Coded + + +''' + +import os +import sys +import glob + +def pfcheck(pflist): + i=0 + pfgood=[] + while i0 and zz[0][0]!='#': + if len(zz)<2: + good=0 + if zz[1]=='$': + good=0 + j=j+1 + if good==1: + pfgood=pfgood+[pflist[i]] + else: + print 'Dropping: ',pflist[i] + f.close() + i=i+1 + return pfgood + +def make_pbs(pffile,maxtime): + + root=get_root(pffile) + pbsfile=root+'.pbs' + + # Put limits on the values for Royal + imaxtime=1+maxtime/3600 + if imaxtime>8: + imaxtime=8 + if imaxtime<1: + imaxtime=1 + + if maxtime> 3600* 7: + maxtime=3600*7 + + + f=open(pbsfile,'w') + f.write('#PBS -N %s\n' % root) + f.write('#PBS -l walltime=%d:00:00\n'% (imaxtime)) + f.write('#PBS -l mem=2048mb\n') + f.write('#PBS -M long@stsci.edu\n') + f.write('#PBS -m a\n') # Onlly send a message if the job aborts +# f.write('#PBS -m bea\n') + f.write('echo -n \"The job\'s unique ID: \"\n') + f.write('echo $PBS_JOBID1 \n') + f.write('cd $PBS_O_WORKDIR\n') + f.write('pwd\n') + + f.write('\npy -r -t %d %s\n' % (maxtime,root)) + f.write('restart.py -n 10 -C "msub %s.pbs" %s\n\n' % (root,root)) + f.write('exit 0\n') + + + f.close() + return pbsfile + + + +def make_msub(basename,pffiles): + ''' + Create the initial msub file + ''' + msubfile=basename+'.msub' + msub=open(msubfile,'w') + + i=0 + while i0 and zz[0][0]!='#': + if len(zz)<2: + good=0 + if zz[1]=='$': + good=0 + j=j+1 + if good==1: + pfgood=pfgood+[pflist[i]] + else: + print 'Dropping: ',pflist[i] + f.close() + i=i+1 + return pfgood + +def make_pbs(root,pffiles): + pbsfile='Knox_'+root+'.pbs' + jobname='Knox_'+root + runfile='Knox_'+root+'.run' + + f=open(pbsfile,'w') + f.write('#PBS -N %s\n' % jobname) + f.write('#PBS -l walltime=%d:00:00\n'% (8*len(pffiles))) + f.write('#PBS -l mem=2048mb\n') + f.write('#PBS -M long@stsci.edu\n') + f.write('#PBS -m a\n') # Onlly send a message if the job aborts +# f.write('#PBS -m bea\n') + f.write('echo -n \"The job\'s unique ID: \"\n') + f.write('echo $PBS_JOBID1 \n') + f.write('cd $PBS_O_WORKDIR\n') + f.write('pwd\n') + f.write('%s\n' % runfile) + f.write('exit 0\n') + + + f.close() + return pbsfile + +def make_rfile(root,pffiles): + runfile='Knox_'+root+'.run' + working_dir='Dir_'+root + + f=open(runfile,'w') + + + # Section with commands to run + f.write('mkdir %s\n'%working_dir) + f.write('cd %s\n'%working_dir) + f.write('Setup_Py_Dir\n') + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the main table containing all of the pf files in a list. + + filelist should be a list of names, e.g ['test1', 'test2' of + parameter file names. This routine reads all of the parameter + files in a list and returns them as a single list + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1 and z[1]=='Freq.': + filetype='new' + break + line=f.readline() + z=line.split() + + diff=1.e30 + i=0 + while i1.0: + print 'The closest angle was %f which was %f from desired value of %f\n' % (best,diff,angle) + + + print best,diff,angle,ncol + + wave=[] + flux=[] + line=f.readline() + z=line.split() + while line!='EOF' and ncol=ncols and z[0][0]=='#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if ncols == 3: + err=err+[float(z[2])] + line=f.readline() + print 'read_spectrum: Read %s with %d wavelengths' % (filename,len(wave)) + return wave,flux,err + + + + + +def plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none'): + ''' + plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none' + + Plot a spectrum from a model produced by python. Usage should be obvious. + + At present data is not used. The intent was to allow one to plot data + against the model. + ''' + + pylab.clf() + wave,flux=read_py_spec(model,angle) + + print 'return',len(wave),len(flux) + + pylab.plot(wave,flux) + pylab.xlim(wmin,wmax) + pylab.draw() + + + +def get_one_plane(xi,yi,filename): + ''' + get_one_plane(xi,yi,filename) + + This routine reads a .dat file produced by + py_wind and rescales it logarithmically producing + a plane for an rgb image + + ''' + try: + x,y,z=read_py_dat(filename) + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + z=numpy.log10(z) + #new z=numpy.maximum(z,-20) + z=numpy.maximum(z,0) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + x=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum were ',xmin,x + values=values/x + + return values + + +def plot_one_plane(filename,wsize=1e10): + ''' + plot_one_plane is intended to allow + one to plot any ascii output file + from py_wind + ''' + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + xy=get_one_plane(xi,yi,filename) + xy.shape=(100,100) + pylab.imshow(xy) + pylab.draw() + +def cno(rootname='sscyg',angle=50,wsize=1e10): + ''' + + Usage: cno(rootname='sscyg',angle=50,wsize) + + where + rootname is rootname for a model that has been run + ang is the inclination angle of the observer + wsize is the x/y sized of portion of the wind to + be displayed + + + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get carbon concentrations + car3=get_one_plane(xi,yi,rootname+'.ioncC3.dat') + car4=get_one_plane(xi,yi,rootname+'.ioncC4.dat') + car5=get_one_plane(xi,yi,rootname+'.ioncC5.dat') + + + i=0 + carbon=[] + while itmp.py_wind.out' + os.system(command) + + # Get a limited amount of information about what happened + os.system("grep 'Reading Windfile' tmp.py_wind.out") + os.system('grep Error tmp.py_wind.out') + + # Next line is needed to primarily to get the cursor whre one wants it + print '\nDone' + diff --git a/py_progs/modules/Old/carlo.py.090304.old b/py_progs/modules/Old/carlo.py.090304.old new file mode 100755 index 000000000..0146f7247 --- /dev/null +++ b/py_progs/modules/Old/carlo.py.090304.old @@ -0,0 +1,937 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: carlo is a package of python routines intended to + aid in the interpretation of fitting our python generated + models + +Notes: + At present there are two sets of routines, neither of which + is really finished. + + The first set is intended to help to + locate models and allow one to select models that are + "close" to one another to display. This portion of the routines + here are not finished. + + The second set of routines displays an individual model which + must first have been run through py_wind with the -s option + in order to produce the data files one needs. It works, but + could still be improved. +History: + +090116 ksl Coding begun +090120 ksl Combined routines that were working in order to have + a single set of routines for this general topic + +''' + +import sys +import os +import glob +import pylab +import numpy +import math + +from matplotlib.mlab import griddata + + + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + + + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + except ValueError: + name=filename+'.pf' + + x=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the main table containing all of the pf files in a list. + + filelist should be a list of names, e.g ['test1', 'test2' of + parameter file names. This routine reads all of the parameter + files in a list and returns them as a single list + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1 and z[1]=='Freq.': + filetype='new' + break + line=f.readline() + z=line.split() + + diff=1.e30 + i=0 + while i1.0: + print 'The closest angle was %f which was %f from desired value of %f\n' % (best,diff,angle) + + + # print best,diff,angle,ncol + + wave=[] + flux=[] + line=f.readline() + z=line.split() + while line!='EOF' and ncol=ncols and z[0][0]=='#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if ncols == 3: + err=err+[float(z[2])] + line=f.readline() + print 'read_spectrum: Read %s with %d wavelengths' % (filename,len(wave)) + return wave,flux,err + + + + + +def plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none'): + ''' + plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none' + + Plot a spectrum from a model produced by python. Usage should be obvious. + + At present data is not used. The intent was to allow one to plot data + against the model. + ''' + + pylab.clf() + wave,flux=read_py_spec(model,angle) + + print 'return',len(wave),len(flux) + + pylab.plot(wave,flux) + pylab.xlim(wmin,wmax) + pylab.draw() + + + +def get_one_plane(xi,yi,filename,zmin=-20): + ''' + get_one_plane(xi,yi,filename,zmin) + + This routine reads a .dat file produced by + py_wind and converts it to a logarithm + + zmin is the min value allowed for the algorithm + and should be set to something reasonable since + it affects how the gridding works. + + 090303 - Updated so that this version does not + rescale anything. This means that for + rgb images one needs to rescale somewhere + else. The rationale for this is that one + actually wants to rescale based on the three + frames that go into to makeing the image + and not a single frame. + + ''' + try: + x,y,z=read_py_dat(filename,'yes') + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + z=numpy.log10(z) + z=numpy.maximum(z,zmin) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + x=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum were ',xmin,x + # values=values/x + + return values + + +def plot_one_plane(filename,wsize=1e10): + ''' + plot_one_plane is intended to allow + one to plot any ascii output file + from py_wind + ''' + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + xy=get_one_plane(xi,yi,filename) + xy.shape=(100,100) + pylab.imshow(xy) + pylab.draw() + +def cno(rootname='sscyg',angle=50,wsize=1e10): + ''' + + Usage: cno(rootname='sscyg',angle=50,wsize) + + where + rootname is rootname for a model that has been run + ang is the inclination angle of the observer + wsize is the x/y sized of portion of the wind to + be displayed + + + Note that the rootname could include a directory path. + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get carbon concentrations + car3=get_one_plane(xi,yi,rootname+'.ioncC3.dat',zmin=0) + car4=get_one_plane(xi,yi,rootname+'.ioncC4.dat',zmin=0) + car5=get_one_plane(xi,yi,rootname+'.ioncC5.dat',zmin=0) + + print 'length c3',len(car3) + + + i=0 + carbon=[] + while itmp.py_wind.out' + os.system(command) + + # Get a limited amount of information about what happened + os.system("grep 'Reading Windfile' tmp.py_wind.out") + os.system('grep Error tmp.py_wind.out') + + # Next line is needed to primarily to get the cursor whre one wants it + os.chdir(curdir) + print '\nDone' + diff --git a/py_progs/modules/Old/carlo.py.090312.old b/py_progs/modules/Old/carlo.py.090312.old new file mode 100755 index 000000000..0898a58db --- /dev/null +++ b/py_progs/modules/Old/carlo.py.090312.old @@ -0,0 +1,955 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: carlo is a package of python routines intended to + aid in the interpretation of fitting our python generated + models + +Notes: + At present there are two sets of routines, neither of which + is really finished. + + The first set is intended to help to + locate models and allow one to select models that are + "close" to one another to display. This portion of the routines + here are not finished. + + The second set of routines displays an individual model which + must first have been run through py_wind with the -s option + in order to produce the data files one needs. It works, but + could still be improved. +History: + +090116 ksl Coding begun +090120 ksl Combined routines that were working in order to have + a single set of routines for this general topic + +''' + +import sys +import os +import glob +import pylab +import numpy +import math + +from matplotlib.mlab import griddata + +# These are the global variables +python_version='unknown' + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + + + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + except ValueError: + name=filename+'.pf' + + x=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the main table containing all of the pf files in a list. + + filelist should be a list of names, e.g ['test1', 'test2' of + parameter file names. This routine reads all of the parameter + files in a list and returns them as a single list + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1 and z[2]=='Version': + python_version=z[3] + print 'The version of the spectrum file was ',python_version + if z[0]=='#Freq.': + filetype='original' + break + if len(z)>1 and z[1]=='Freq.': + filetype='new' + break + line=f.readline() + z=line.split() + + diff=1.e30 + i=0 + while i1.0: + print 'The closest angle was %f which was %f from desired value of %f\n' % (best,diff,angle) + + + # print best,diff,angle,ncol + + wave=[] + flux=[] + line=f.readline() + z=line.split() + while line!='EOF' and ncol=ncols and z[0][0]=='#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if ncols == 3: + err=err+[float(z[2])] + line=f.readline() + print 'read_spectrum: Read %s with %d wavelengths' % (filename,len(wave)) + return wave,flux,err + + + + + +def plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none'): + ''' + plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none' + + Plot a spectrum from a model produced by python. Usage should be obvious. + + At present data is not used. The intent was to allow one to plot data + against the model. + ''' + + pylab.clf() + wave,flux=read_py_spec(model,angle) + + print 'return',len(wave),len(flux) + + pylab.plot(wave,flux) + pylab.xlim(wmin,wmax) + pylab.draw() + + + +def get_one_plane(xi,yi,filename,zmin=-20): + ''' + get_one_plane(xi,yi,filename,zmin) + + This routine reads a .dat file produced by + py_wind and converts it to a logarithm + + zmin is the min value allowed for the algorithm + and should be set to something reasonable since + it affects how the gridding works. + + 090303 - Updated so that this version does not + rescale anything. This means that for + rgb images one needs to rescale somewhere + else. The rationale for this is that one + actually wants to rescale based on the three + frames that go into to makeing the image + and not a single frame. + + ''' + try: + x,y,z=read_py_dat(filename,'yes') + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + z=numpy.log10(z) + z=numpy.maximum(z,zmin) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + x=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum were ',xmin,x + # values=values/x + + return values + + +def plot_one_plane(filename,wsize=1e10): + ''' + plot_one_plane is intended to allow + one to plot any ascii output file + from py_wind + ''' + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + xy=get_one_plane(xi,yi,filename) + xy.shape=(100,100) + pylab.imshow(xy) + pylab.draw() + +def cno(rootname='sscyg',angle=50,wsize=1e10): + ''' + + Usage: cno(rootname='sscyg',angle=50,wsize) + + where + rootname is rootname for a model that has been run + ang is the inclination angle of the observer + wsize is the x/y sized of portion of the wind to + be displayed + + + Note that the rootname could include a directory path. + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + # Get the spectrum. The reason for getting the spectrum is + # to establish what version of python was used to create the + # spectrum + + wave,flux=read_py_spec(rootname+'.spec',angle) + + + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get carbon concentrations + car3=get_one_plane(xi,yi,rootname+'.ioncC3.dat',zmin=0) + car4=get_one_plane(xi,yi,rootname+'.ioncC4.dat',zmin=0) + car5=get_one_plane(xi,yi,rootname+'.ioncC5.dat',zmin=0) + + print 'length c3',len(car3) + + + i=0 + carbon=[] + while itmp.py_wind.out' + os.system(command) + + # Get a limited amount of information about what happened + os.system("grep 'Reading Windfile' tmp.py_wind.out") + os.system('grep Error tmp.py_wind.out') + + # Next line is needed to primarily to get the cursor whre one wants it + os.chdir(curdir) + print '\nDone' + diff --git a/py_progs/modules/Old/carlo.py.090314.old b/py_progs/modules/Old/carlo.py.090314.old new file mode 100755 index 000000000..f0b35176c --- /dev/null +++ b/py_progs/modules/Old/carlo.py.090314.old @@ -0,0 +1,1003 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: carlo is a package of python routines intended to + aid in the interpretation of fitting our python generated + models + +Notes: + At present there are two sets of routines, neither of which + is really finished. + + The first set is intended to help to + locate models and allow one to select models that are + "close" to one another to display. This portion of the routines + here are not finished. + + The second set of routines displays an individual model which + must first have been run through py_wind with the -s option + in order to produce the data files one needs. It works, but + could still be improved. +History: + +090116 ksl Coding begun +090120 ksl Combined routines that were working in order to have + a single set of routines for this general topic + +''' + +import sys +import os +import glob +import pylab +import numpy +import math + +from matplotlib.mlab import griddata + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + + + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + except ValueError: + name=filename+'.pf' + + x=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the main table containing all of the pf files in a list. + + filelist should be a list of names, e.g ['test1', 'test2' of + parameter file names. This routine reads all of the parameter + files in a list and returns them as a single list + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1 and z[2]=='Version': + python_version=z[3] + print 'The version of the spectrum file was ',python_version + if z[0]=='#Freq.': + filetype='original' + break + if len(z)>1 and z[1]=='Freq.': + filetype='new' + break + line=f.readline() + z=line.split() + + diff=1.e30 + i=0 + while i1.0: + print 'The closest angle was %f which was %f from desired value of %f\n' % (best,diff,angle) + + current_inclination=best + + # print best,diff,angle,ncol + + wave=[] + flux=[] + line=f.readline() + z=line.split() + while line!='EOF' and ncol=ncols and z[0][0]=='#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if ncols == 3: + err=err+[float(z[2])] + line=f.readline() + print 'read_spectrum: Read %s with %d wavelengths' % (filename,len(wave)) + return wave,flux,err + + + + + +def plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none'): + ''' + plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none' + + Plot a spectrum from a model produced by python. Usage should be obvious. + + At present data is not used. The intent was to allow one to plot data + against the model. + ''' + + pylab.clf() + wave,flux=read_py_spec(model,angle) + + print 'return',len(wave),len(flux) + + pylab.plot(wave,flux) + pylab.xlim(wmin,wmax) + pylab.draw() + + + +def get_one_plane(xi,yi,filename,zmin=-20): + ''' + get_one_plane(xi,yi,filename,zmin) + + This routine reads a .dat file produced by + py_wind and converts it to a logarithm + + zmin is the min value allowed for the algorithm + and should be set to something reasonable since + it affects how the gridding works. + + 090303 - Updated so that this version does not + rescale anything. This means that for + rgb images one needs to rescale somewhere + else. The rationale for this is that one + actually wants to rescale based on the three + frames that go into to makeing the image + and not a single frame. + + ''' + try: + x,y,z=read_py_dat(filename,'yes') + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + xmin=numpy.min(z) + xmax=numpy.max(z) + print 'The mininum and maximum values of the plane were',xmin,xmax + print 'The log of these are ',numpy.log10(xmin),numpy.log10(xmax) + + z=numpy.log10(z) + z=numpy.maximum(z,zmin) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + x=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum were ',xmin,x + # values=values/x + + return values + + +def plot_one_plane(filename,wsize=1e10,zmin=0): + ''' + plot_one_plane is intended to allow + one to plot any ascii output file + from py_wind + ''' + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + xy=get_one_plane(xi,yi,filename,zmin) + xy.shape=(100,100) + pylab.imshow(xy) + # pylab.imshow(xy,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + pylab.draw() + +def cno(rootname='sscyg',angle=50,wsize=1e10): + ''' + + Usage: cno(rootname='sscyg',angle=50,wsize) + + where + rootname is rootname for a model that has been run + ang is the inclination angle of the observer + wsize is the x/y sized of portion of the wind to + be displayed + + + Note that the rootname could include a directory path. + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + # Get the spectrum. The reason for getting the spectrum is + # to establish what version of python was used to create the + # spectrum + + wave,flux=read_py_spec(rootname+'.spec',angle) + + + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get carbon concentrations + car3=get_one_plane(xi,yi,rootname+'.ioncC3.dat',zmin=0) + car4=get_one_plane(xi,yi,rootname+'.ioncC4.dat',zmin=0) + car5=get_one_plane(xi,yi,rootname+'.ioncC5.dat',zmin=0) + + print 'length c3',len(car3) + + + i=0 + carbon=[] + while i0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + majorLocator=MultipleLocator(30) + ax.xaxis.set_major_locator(majorLocator) + + + bx=pylab.subplot(235) + pylab.plot(wave,flux,'r') + + wcenter=1238 + pylab.xlim(wcenter-width,wcenter+width) + zzz=get_median(wave,flux,wcenter-width,wcenter+width) + pylab.ylim(0,2.*zzz) + if current_inclination>0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + + bx_majorLocator=MultipleLocator(30) + bx.xaxis.set_major_locator(bx_majorLocator) + + cx=pylab.subplot(236) + cx_majorLocator=MultipleLocator(30) + cx.xaxis.set_major_locator(cx_majorLocator) + pylab.plot(wave,flux,'r') + wcenter=1550 + pylab.xlim(wcenter-width,wcenter+width) + zzz=get_median(wave,flux,wcenter-width,wcenter+width) + pylab.ylim(0,2.*zzz) + if current_inclination>0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + + + # Now plot the global labels for the plot + pylab.figtext(0.07,0.30,'Flux',verticalalignment='center',rotation='vertical') + pylab.figtext(0.07,0.70,r'z ($10^{9} cm$)',verticalalignment='center',rotation='vertical') + pylab.figtext(0.5, 0.480,r'x($10^{9} cm$)',horizontalalignment='center') + + pylab.figtext(0.5, 0.025,r'Wavelength ($\AA$) ',horizontalalignment='center') + + + + pylab.draw() + pylab.savefig(rootname+'_cno.jpg') + +def one_ion(rootname='sscyg',ion='C4',wsize=1e10): + ''' + + Usage: one_ion(rootname='sscyg',ion='C4',wsize=1e10 + + where + rootname is rootname for a model that has been run + ion is the ion name as part of the name in the + filename produced by py_wind + wsize is the x/y sized of portion of the wind to + be displayed + + produces a 4 panel dispaly of this ion only, showing + + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get ion + try: + den=get_one_plane(xi,yi,rootname+'.ionc'+ion+'.dat',zmin=0.0) + frac=get_one_plane(xi,yi,rootname+'.ion'+ion+'.dat',zmin=-5) + scat=get_one_plane(xi,yi,rootname+'.ions'+ion+'.dat',zmin=-1) + abs=get_one_plane(xi,yi,rootname+'.iona'+ion+'.dat', zmin=0.0) + except IOError: + print 'Could not find eith this root (%s) or this (%s) ion' % (rootname,ion) + return + + den.shape=(100,100) + frac.shape=(100,100) + scat.shape=(100,100) + abs.shape=(100,100) + + # Adjust some of the scalings + print 'density ',den.min(),den.max() + den=numpy.maximum(den,den.max()-5.) + print 'density',den.min(),den.max() + + + print 'frac',frac.min(),frac.max() + frac=numpy.maximum(frac,-5.) + print 'frac',frac.min(),frac.max() + + print 'scat',scat.min(),scat.max() + scat=numpy.maximum(scat,scat.max()-2.) + print 'scat',scat.min(),scat.max() + + print ' abs', abs.min(), abs.max() + abs=numpy.maximum( abs,abs.max()-2.) + print ' abs', abs.min(), abs.max() + + # Do plot + pylab.figure(1,figsize=(12,12)) + pylab.clf() + pylab.title(ion) + + pylab.subplot(221) + pylab.title('Density') + pylab.imshow(den,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(222) + pylab.title('Ion Fraction') + pylab.imshow(frac,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(223) + pylab.title('Scattering') + pylab.imshow(scat,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(224) + pylab.title('Abs') + pylab.imshow(abs,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.draw() + pylab.savefig(ion+'.jpg') + +def get_median(wave,flux,wmin=0,wmax=1e6): + ''' + get_median(wave,flux,wmin,wmax) gets the median + value of the flux in the interval wmin,wmax + ''' + + i=0 + while wave[i]tmp.py_wind.out' + os.system(command) + + # Get a limited amount of information about what happened + os.system("grep 'Reading Windfile' tmp.py_wind.out") + os.system('grep Error tmp.py_wind.out') + + # Next line is needed to primarily to get the cursor whre one wants it + os.chdir(curdir) + print '\nDone' + diff --git a/py_progs/modules/Old/carlo.py.old b/py_progs/modules/Old/carlo.py.old new file mode 100755 index 000000000..b486ec47a --- /dev/null +++ b/py_progs/modules/Old/carlo.py.old @@ -0,0 +1,115 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: carlo is a package of python routines intended to + aid in the interpretation of fitting our python generated + models + +History: + +090116 ksl Coding begun + +''' + +import sys +import glob + + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + except ValueError: + name=filename+'.pf' + + x=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the man table + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + + + + + + + diff --git a/py_progs/modules/Old/grid_eval.py.090606.old b/py_progs/modules/Old/grid_eval.py.090606.old new file mode 100755 index 000000000..d7cb124c0 --- /dev/null +++ b/py_progs/modules/Old/grid_eval.py.090606.old @@ -0,0 +1,874 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: grid_eval is a package of python routines intended to + aid in the understanding how models in a grid vary + +Notes: + This version does not use sqlite + + Instead it has it's own concept of a table which is a list. + Each row in the list consists of a bunch of name, value pairs + + The tables are specific for use with python since the first + two columns are the rootname and the spectrum number. Usually + operations preserve these two columns regardless of what else + happens + +History: + + 090404 Bagan with the current version of carlo.py + 090420 Removed the sqlite portions of the test routine + so I could actually make progress + +''' + +import sys +import os +import glob +import numpy +import math + + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + +# Next few routines are general purpose utilities + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + print searchlist + + names=glob.glob(searchlist) + + + if len(names)==0: + print 'Error: get_filenames: No files with this searchlist: %s ' % searchlist + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + +# Next routines cover the reading and writing of ls files including the +# createion of ls files from pf files. The main interface is the "table" + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + + This routine has been specifically written + to for python, the radiative transfer program + + A record is returned for each angle of of a python model, + and the root of the filename is encoded into returned records. + + The purpose of this is to make it possible to + treat the angles as variables, even though + they are calculated in the same grid. + + It DOES NOT handle the type of records needed + for gen_grid.py + + 090403 ksl Made this modification + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + root=filename[0:n] + except ValueError: + name=filename+'.pf' + root=filename + + x=[] + nangles=0 + angles=[] + phases=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + if words[0]=='no_observers': + nangles=value + elif words[0]=='angle': + angles=angles+[value] + elif words[0]=='phase': + phases=phases+[value] + else: + # The next 2 lines are needed for sqlite, and was deleted from + # this version. It is needed there because + # Because it treats . as a special character + # keyword=words[0].replace('.','_') + # x=x+[[keyword,value]] + + x=x+[[words[0],value]] + i=i+1 + + if len(angles)!=nangles: + print 'Error: %d observers but only %d angles' % (nangles,len(angles)) + if len(phases)!=nangles: + print 'Error: %d observers but only %d phases' % (nangles,len(phases)) + + # This section is to handle non python .pf files + if nangles==0: + # print 'nangles ',nangles + xx==[['filename',root],['nspec',-1]]+x + return xx + + # This section is to handle python .pf files with multiple angles + xx=[] + i=0 + while i 1: + # print string + # g.write('%s\n' % string) + + values=table_reduce(table) # Eliminate all the columns which do not vary + i=0 + while i< len(table): + row=table[i] + value=values[i] + # print row[0],row[1],values[i] + string='%-10s %5d ' % (row[0][1],row[1][1]) + j=0 + while j1: + unique=unique+[record[i][0]] + + i=i+1 + + return unique + + + + + +def table_get_choices(table,colstart=2): + ''' + get_choices determine what variables are changed in the table. + and values of the variables. + + Note: There is no guarantee that all possible combinations exist, + since typically a complete grid would contain some non-physical + choices, such as a mass lost rate exceeding the disk accretion + rate + + Note: The values are sorted + + 090405 ksl Modified to not worry about first two columns, which + now contain the filename (or root of it), and + a column (for a spectrum + ''' + + unique=[] + + i=colstart + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + +def table_select_rows(table,select=[['angle',30]]): + ''' + table_select_rows returns those portions of a table which have the values set + by select. Note that the select list need not return single values + + If no rows satisfiying the allowed conditions are found then an empty list + will be returned + + This could easily be expanded to limits if that were desirable. + + 090603 - Added logic and code to limit how closely numbers needed to agree with one + another to try to handle roundoff errors. It is a little unclear that shis + was necessary. + ''' + + i=0 + tmp_table=table + while i1 replace them one by + one + + ''' + new_table=[] + i=0 + n_updates=0 + while i < len(table): + row=table[i] + new_row=[] + for x in row: + if x[0]==colname: + if len(values)==1: + new_row=new_row+[[colname,values[0]]] + else: + new_row=new_row+[[colname,values[i]]] + n_updates=n_updates+1 + else: + new_row=new_row+[x] + new_table=new_table+[new_row] + i=i+1 + + if n_updates [[var1,1],[var1,2]] + + + ''' + newtable=[] + xtable=table[0] + k=1 + while k0: + xxx[1]=[z1[0][0],z1[0][1]] + + row=[[s[0],s[2]]]+[x[i]] + z2=table_select_rows(table,select=row) + if len(z2)>0: + xxx[2]=[z2[0][0],z2[0][1]] + + + row=[[s[0],s[3]]]+[x[i]] + z3=table_select_rows(table,select=row) + if len(z3)>0: + xxx[3]=[z3[0][0],z3[0][1]] + + # print 'z1',z1 + # print 'z2',z2 + # print 'z3',z3 + + print 'xxx', xxx + + xxxx=xxxx+[xxx] + + + i=i+1 + return xxxx + +def generate_one(outfile='compare.in',variable='wind.mdot',value=1.6237767391899999e-10): + ''' + This actually writes out what we want to a file + + 090531 --- This looks like a test, because do_one is a test + ''' + answer=do_one(variable,value) + f=open(outfile,'w') + i=0 + while i0: + second_model=x[0] + g.write('%-10s %5d %-10s %5d\n' % (first_model[0][1],first_model[1][1],second_model[0][1],second_model[1][1])) + # else: + # print 'No model for ',select_one + j=j+1 + i=i+1 + + +# Next section actually runs comparisons, following + + + +def run_compare(infile='test.run',pffile='default',outfile='default'): + ''' + + Run the model comparisons based on what is in the .ls file + ''' + + # Read the input file + + try: + f=open(infile,'r') + except IOError : + print "This file %s does not exist" % infile + return lines + xlines=f.readlines() + + + # inputs=read_file(infile) + + dir,filename,root,ext=split_filename(infile) + + # Adjust the name of the parameter file + + if pffile=='default': + pffile=root+'.pf' + else: + xdir,pffile,ext=split_filename(pffile) + pffile=pffile+'.pf' + + + + if outfile=='default': + outfile=infile+'.out' + + + + # Iterate over the input file, checking to see if py_comapre has + # already been run on this combination. If so, skip, if not + # run add to command string + + commands=[] + i=0 + # while i0: + ave=xsum/nsum + vari=(xvar*xvar-ave*ave)/nsum + vari=math.sqrt(vari) + print '%-30s %5d %8.3f %8.3f'% (variable,nsum,xsum/nsum,vari) + variable=line[2] + xsum=0.0 + xvar=0.0 + nsum=0 + else: + # x=eval(line[len(line)-1]) + x=eval(line[3]) # This is the overall best (the individual fiels follow) + xsum=xsum+x + xvar=xvar+(x*x) + nsum=nsum+1 + + i=i+1 + + + if nsum>0: + ave=xsum/nsum + vari=(xvar*xvar-ave*ave)/nsum + vari=math.sqrt(vari) + print '%-30s %5d %8.3f %8.3f'% (variable,nsum,xsum/nsum,vari) + + + + +if __name__ == "__main__": + import sys + if len(sys.argv)>1: + pfs2ls(sys.argv[1],sys.argv[2]) + else: + print 'usage: grid_eval.py pfroot listroot' + diff --git a/py_progs/modules/Old/grid_eval.py.090609.old b/py_progs/modules/Old/grid_eval.py.090609.old new file mode 100755 index 000000000..8f5e3361b --- /dev/null +++ b/py_progs/modules/Old/grid_eval.py.090609.old @@ -0,0 +1,902 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: grid_eval is a package of python routines intended to + aid in the understanding how models in a grid vary + +Notes: + This version does not use sqlite + + Instead it has it's own concept of a table which is a list. + Each row in the list consists of a bunch of name, value pairs + + The tables are specific for use with python since the first + two columns are the rootname and the spectrum number. Usually + operations preserve these two columns regardless of what else + happens + +History: + + 090404 Bagan with the current version of carlo.py + 090420 Removed the sqlite portions of the test routine + so I could actually make progress + +''' + +import sys +import os +import glob +import numpy +import math + + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + +# Next few routines are general purpose utilities + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + print searchlist + + names=glob.glob(searchlist) + + + if len(names)==0: + print 'Error: get_filenames: No files with this searchlist: %s ' % searchlist + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + +# Next routines cover the reading and writing of ls files including the +# createion of ls files from pf files. The main interface is the "table" + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + + This routine has been specifically written + to for python, the radiative transfer program + + A record is returned for each angle of of a python model, + and the root of the filename is encoded into returned records. + + The purpose of this is to make it possible to + treat the angles as variables, even though + they are calculated in the same grid. + + It DOES NOT handle the type of records needed + for gen_grid.py + + 090403 ksl Made this modification + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + root=filename[0:n] + except ValueError: + name=filename+'.pf' + root=filename + + x=[] + nangles=0 + angles=[] + phases=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + if words[0]=='no_observers': + nangles=value + elif words[0]=='angle': + angles=angles+[value] + elif words[0]=='phase': + phases=phases+[value] + else: + # The next 2 lines are needed for sqlite, and was deleted from + # this version. It is needed there because + # Because it treats . as a special character + # keyword=words[0].replace('.','_') + # x=x+[[keyword,value]] + + x=x+[[words[0],value]] + i=i+1 + + if len(angles)!=nangles: + print 'Error: %d observers but only %d angles' % (nangles,len(angles)) + if len(phases)!=nangles: + print 'Error: %d observers but only %d phases' % (nangles,len(phases)) + + # This section is to handle non python .pf files + if nangles==0: + # print 'nangles ',nangles + xx==[['filename',root],['nspec',-1]]+x + return xx + + # This section is to handle python .pf files with multiple angles + xx=[] + i=0 + while i 1: + # print string + # g.write('%s\n' % string) + + values=table_reduce(table) # Eliminate all the columns which do not vary + i=0 + while i< len(table): + row=table[i] + value=values[i] + # print row[0],row[1],values[i] + string='%-10s %5d ' % (row[0][1],row[1][1]) + j=0 + while j1: + unique=unique+[record[i][0]] + + i=i+1 + + return unique + + + + + +def table_get_choices(table,colstart=2): + ''' + get_choices determine what variables are changed in the table. + and values of the variables. + + Note: There is no guarantee that all possible combinations exist, + since typically a complete grid would contain some non-physical + choices, such as a mass lost rate exceeding the disk accretion + rate + + Note: The values are sorted + + 090405 ksl Modified to not worry about first two columns, which + now contain the filename (or root of it), and + a column (for a spectrum + ''' + + unique=[] + + i=colstart + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + +def table_select_rows(table,select=[['angle',30]]): + ''' + table_select_rows returns those portions of a table which have the values set + by select. Note that the select list need not return single values + + If no rows satisfiying the allowed conditions are found then an empty list + will be returned + + This could easily be expanded to limits if that were desirable. + + 090603 - Added logic and code to limit how closely numbers needed to agree with one + another to try to handle roundoff errors. It is a little unclear that shis + was necessary. + ''' + + i=0 + tmp_table=table + while i1 replace them one by + one + + ''' + new_table=[] + i=0 + n_updates=0 + while i < len(table): + row=table[i] + new_row=[] + for x in row: + if x[0]==colname: + if len(values)==1: + new_row=new_row+[[colname,values[0]]] + else: + new_row=new_row+[[colname,values[i]]] + n_updates=n_updates+1 + else: + new_row=new_row+[x] + new_table=new_table+[new_row] + i=i+1 + + if n_updates [[var1,1],[var1,2]] + + + ''' + newtable=[] + xtable=table[0] + k=1 + while k0: + xxx[1]=[z1[0][0],z1[0][1]] + + row=[[s[0],s[2]]]+[x[i]] + z2=table_select_rows(table,select=row) + if len(z2)>0: + xxx[2]=[z2[0][0],z2[0][1]] + + + row=[[s[0],s[3]]]+[x[i]] + z3=table_select_rows(table,select=row) + if len(z3)>0: + xxx[3]=[z3[0][0],z3[0][1]] + + # print 'z1',z1 + # print 'z2',z2 + # print 'z3',z3 + + print 'xxx', xxx + + xxxx=xxxx+[xxx] + + + i=i+1 + return xxxx + +def generate_one(outfile='compare.in',variable='wind.mdot',value=1.6237767391899999e-10): + ''' + This actually writes out what we want to a file + + 090531 --- This looks like a test, because do_one is a test + ''' + answer=do_one(variable,value) + f=open(outfile,'w') + i=0 + while i0: + second_model=x[0] + g.write('%-10s %5d %-10s %5d\n' % (first_model[0][1],first_model[1][1],second_model[0][1],second_model[1][1])) + # else: + # print 'No model for ',select_one + if j%1000 == 1: + print 'Processed record %5d of table1 %5d from table2 %5d' % (j,len(table_one),len(table_two)) + j=j+1 + i=i+1 + + +# Next section actually runs comparisons, following + + + +def run_compare(infile='test.run',pffile='default',outfile='default'): + ''' + + Run the model comparisons based on what is in the .ls file + ''' + + # Read the input file + + try: + f=open(infile,'r') + except IOError : + print "This file %s does not exist" % infile + return + xlines=f.readlines() + + + # inputs=read_file(infile) + + dir,filename,root,ext=split_filename(infile) + + # Adjust the name of the parameter file + + if pffile=='default': + pffile=root+'.pf' + else: + xdir,pffile,ext=split_filename(pffile) + pffile=pffile+'.pf' + + + + if outfile=='default': + outfile=infile+'.out' + + + + # Before starting huge numbers of runs of a routine which will failover to interactive mode + # check if the .pf files exists + + if os.path.exists(pffile): + print 'The pf file d %s does exist, ready to rock and roll' % pffile + else: + print 'The pf file d %s does not exist. Get one before trying to proceed' % pffile + return + + + # Check if the outfile exits if it does then ask whether it should be delted before beginning + if os.path.exists(outfile): + print 'The output file d %s already exists' % outfile + choice=raw_input('Delete it (y/n)') + if choice[0]=='y': + os.remove(outfile) + else: + 'OK, continuing with old output file ' + + # Iterate over the input file, checking to see if py_comapre has + # already been run on this combination. If so, skip, if not + # run add to command string + + commands=[] + i=0 + # while i0: + ave=xsum/nsum + vari=(xvar*xvar-ave*ave)/nsum + vari=math.sqrt(vari) + print '%-30s %5d %8.3f %8.3f'% (variable,nsum,xsum/nsum,vari) + variable=line[2] + xsum=0.0 + xvar=0.0 + nsum=0 + else: + # x=eval(line[len(line)-1]) + x=eval(line[4]) # This is the overall best (the individual fiels follow) + xsum=xsum+x + xvar=xvar+(x*x) + nsum=nsum+1 + + i=i+1 + + + if nsum>0: + ave=xsum/nsum + vari=(xvar*xvar-ave*ave)/nsum + vari=math.sqrt(vari) + print '%-30s %5d %8.3f %8.3f'% (variable,nsum,xsum/nsum,vari) + + + + +if __name__ == "__main__": + import sys + if len(sys.argv)>1: + pfs2ls(sys.argv[1],sys.argv[2]) + else: + print 'usage: grid_eval.py pfroot listroot' + diff --git a/py_progs/modules/Old/grid_eval.py.old b/py_progs/modules/Old/grid_eval.py.old new file mode 100755 index 000000000..c55b1dca2 --- /dev/null +++ b/py_progs/modules/Old/grid_eval.py.old @@ -0,0 +1,422 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: grid_eval isa package of python routines intended to + aid in the understanding how models in a grid vary + +Notes: + At present there are two sets of routines, neither of which + is really finished. + + The first set is intended to help to + locate models and allow one to select models that are + "close" to one another to display. This portion of the routines + here are not finished. + + The second set of routines displays an individual model which + must first have been run through py_wind with the -s option + in order to produce the data files one needs. It works, but + could still be improved. +History: + + 090404 Bagan with the current version of carlo.py + +''' + +import sys +import os +import glob +import numpy +import math +import sqlite3 + + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + + In this version, the a record is returned for + each angle of of a python model, and the root + of the filename is encoded into returned records. + + The purpose of this is to make it possible to + treat the angles as variables, even though + they are calculated in the same grid. + + 090403 ksl Made this modification + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + root=filename[0:n] + except ValueError: + name=filename+'.pf' + root=filename + + x=[] + nangles=0 + angles=[] + phases=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + if words[0]=='no_observers': + nangles=value + elif words[0]=='angle': + angles=angles+[value] + elif words[0]=='phase': + phases=phases+[value] + else: + keyword=words[0].replace('.','_') + x=x+[[keyword,value]] + # x=x+[[words[0],value]] + i=i+1 + + if len(angles)!=nangles: + print 'Error: %d observers but only %d angles' % (nangles,len(angles)) + if len(phases)!=nangles: + print 'Error: %d observers but only %d phases' % (nangles,len(phases)) + + # This section is to handle non python .pf files + if nangles==0: + print 'nangles ',nangles + xx==[['filename',root],['nspec',-1]]+x + return xx + + # This section is to handle python .pf files with multiple angles + xx=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the main table containing all of the pf files in a list. + + filelist should be a list of names, e.g ['test1', 'test2' of + parameter file names. This routine reads all of the parameter + files in a list and returns them as a single list + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + +def compare_pf(pf1,pf2): + ''' + Compare two parameter files to identify which variables are different in them. A summary + is printed out, and a list containing the differences is returned. + + This will likely fail if the variables that are different are strings + ''' + filelist=[pf1,pf2] # It does not matter here whether the extensions are attached or not + table=make_table(filelist) + unique=get_choices(table) # In this case is should be true that the first value corresponds to the first file + + i=0 + print '\n Summary: \n' + print 'file1: %40s' % pf1 + print 'file2: %40s\n' % pf2 + while i1 and z[2]=='Version': + python_version=z[3] + print 'The version of the spectrum file was ',python_version + if z[0]=='#Freq.': + filetype='original' + break + if len(z)>1 and z[1]=='Freq.': + filetype='new' + break + line=f.readline() + z=line.split() + + diff=1.e30 + i=0 + while i1.0: + print 'The closest angle was %f which was %f from desired value of %f\n' % (best,diff,angle) + + current_inclination=best + + # print best,diff,angle,ncol + + wave=[] + flux=[] + line=f.readline() + z=line.split() + while line!='EOF' and ncol=ncols and z[0][0]=='#': + wave=wave+[float(z[0])] + flux=flux+[float(z[1])] + if ncols == 3: + err=err+[float(z[2])] + line=f.readline() + print 'read_spectrum: Read %s with %d wavelengths' % (filename,len(wave)) + return wave,flux,err + + + + + +def plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none'): + ''' + plot_spec(model='sscyg.spec',wmin=900,wmax=1700,angle=50.,data='none' + + Plot a spectrum from a model produced by python. Usage should be obvious. + + At present data is not used. The intent was to allow one to plot data + against the model. + ''' + + pylab.clf() + wave,flux=read_py_spec(model,angle) + + print 'return',len(wave),len(flux) + + pylab.plot(wave,flux) + pylab.xlim(wmin,wmax) + pylab.draw() + + + +def get_one_plane(xi,yi,filename,zmin=-20): + ''' + get_one_plane(xi,yi,filename,zmin) + + This routine reads a .dat file produced by + py_wind and converts it to a logarithm + + zmin is the min value allowed for the algorithm + and should be set to something reasonable since + it affects how the gridding works. + + 090303 - Updated so that this version does not + rescale anything. This means that for + rgb images one needs to rescale somewhere + else. The rationale for this is that one + actually wants to rescale based on the three + frames that go into to makeing the image + and not a single frame. + + ''' + try: + x,y,z=read_py_dat(filename,'yes') + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + xmin=numpy.min(z) + xmax=numpy.max(z) + print 'The mininum and maximum values of the plane were',xmin,xmax + print 'The log of these are ',numpy.log10(xmin),numpy.log10(xmax) + + z=numpy.log10(z) + z=numpy.maximum(z,zmin) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + x=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum were ',xmin,x + # values=values/x + + return values + + + + +def xget_one_plane(xi,yi,filename,delta=4): + ''' + xget_one_plane(xi,yi,filename,zmin) + + This routine reads a .dat file produced by + py_wind and converts it to a logarithm + + This version, tries to produce an array whose + maximmum the maximum of the .dat file and + whose range is determined by delta + + + + ''' + try: + x,y,z=read_py_dat(filename,'yes') + except IOError: + print 'Error: get_one_plane ',filename + raise + return + + z=numpy.array(z) + xmin=numpy.min(z) + xmax=numpy.max(z) + + xdelta=xmax/math.pow(10.,delta) + + + print '\nxget_one_plane : ',filename,delta + print 'xget_one_plane: The mininum (allowed) and maximum values of the plane were %g (%g) %g' % (xmin,xdelta,xmax) + print 'The log of these are %g (%g) %g ' % (numpy.log10(xmin),numpy.log10(xdelta),numpy.log10(xmax)) + + xmin=numpy.maximum(xmin,xdelta) + z=numpy.maximum(z,xmin) + + print 'The new min and max in the array are %g %g before taking log' % (numpy.min(z),numpy.max(z)) + + + z=numpy.log10(z) + xmax=numpy.max(z) + + # limit the dynamic range of the plot + # z=numpy.maximum(z,xmax-delta) + + values=griddata(x,y,z,xi,yi) + + values=numpy.array(values) + values.shape=(len(xi)*len(yi)) + + xmax=numpy.max(values) + xmin=numpy.min(values) + + + print 'The minimum and maximum in the gridded data were %g %g\n' % (xmin,xmax) + # values=values/x + + return values + + +def plot_one_plane(filename,wsize=1e10,delta=4): + ''' + plot_one_plane is intended to allow + one to plot any ascii output file + from py_wind + ''' + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + print 'plot_one_plane ',wsize,delta + + xy=xget_one_plane(xi,yi,filename,delta) + xy.shape=(100,100) + # pylab.imshow(xy) + pylab.imshow(xy,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + pylab.draw() + +def xone_ion(rootname='sscyg',ion='O6',wsize=1e10): + ''' + one_ion(rootname='sscyg',ion='O6',angle=50,wsize=1e10) + ''' + + # The only point of next line is to get the version number + wave,flux=read_py_spec(rootname+'.spec') + + + + ne_name=rootname+'.ne.dat' + te_name=rootname+'.te.dat' + tr_name=rootname+'.tr.dat' + + + scatter_name=rootname+'.ions'+ion+'.dat' + absorp_name=rootname+'.iona'+ion+'.dat' + concen_name=rootname+'.ionc'+ion+'.dat' + + + pylab.figure(3,figsize=(12,8)) + pylab.clf() + + pylab.subplot(231) + + plot_one_plane(ne_name,wsize,delta=4) + pylab.title(r'n$_{e}$') + + pylab.subplot(232) + plot_one_plane(te_name,wsize,delta=4) + pylab.title(r'T$_{e}$') + + pylab.subplot(233) + plot_one_plane(tr_name,wsize,delta=4) + pylab.title(r'T$_{r}$') + + pylab.subplot(234) + plot_one_plane(concen_name,wsize,delta=4) + pylab.title('Ion Density') + + pylab.subplot(235) + plot_one_plane(scatter_name,wsize,delta=4) + pylab.title('Absorp') + + pylab.subplot(236) + plot_one_plane(absorp_name,wsize,delta=4) + pylab.title('Scat.') + + pylab.figtext(0.07,0.5,r'z ($10^{9} cm$)',verticalalignment='center',rotation='vertical') + pylab.figtext(0.5, 0.02,r'x($10^{9} cm$)',horizontalalignment='center') + + pylab.draw() + pylab.savefig(rootname+'_'+ion+'.jpg') + +def overview(rootname='sscyg',wsize=1e10): + ''' + overview(rootname='sscyg',wsize=1e10) + ''' + + # The only point of next line is to get the version number + wave,flux=read_py_spec(rootname+'.spec') + + + + ne_name=rootname+'.ne.dat' + te_name=rootname+'.te.dat' + tr_name=rootname+'.tr.dat' + + vel_name=rootname+'.vel.dat' + vel_name=rootname+'.vrho.dat' + + vz_name=rootname+'.vz.dat' + vtheta_name=rootname+'.vtheta.dat' + + + pylab.figure(3,figsize=(12,8)) + pylab.clf() + + pylab.subplot(231) + + plot_one_plane(ne_name,wsize,delta=4) + pylab.title(r'n$_{e}$') + + pylab.subplot(232) + plot_one_plane(te_name,wsize,delta=1) + pylab.title(r'T$_{e}$') + + pylab.subplot(233) + plot_one_plane(tr_name,wsize,delta=1) + pylab.title(r'T$_{r}$') + + pylab.subplot(234) + plot_one_plane(vel_name,wsize,delta=3) + pylab.title(r'V$_{x}$') + + pylab.subplot(235) + plot_one_plane(vtheta_name,wsize,delta=3) + pylab.title(r'V$_{y}$') + + pylab.subplot(236) + plot_one_plane(vz_name,wsize,delta=3) + pylab.title(r'V$_{z}$') + + pylab.figtext(0.03,0.5,r'z ($10^{9} cm$)',verticalalignment='center',rotation='vertical') + pylab.figtext(0.5, 0.02,r'x($10^{9} cm$)',horizontalalignment='center') + + pylab.draw() + pylab.savefig(rootname+'_overview.jpg') + +def plot_line(rootname,ion='O6',angle=60,wave_min=1000,wave_max=1050,wsize=1e11): + ''' + The idea of this plot is to capture the scattering and the absorption + of a line + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + pylab.figure(2,figsize=(12,12)) + pylab.clf() + pylab.title(ion) + + wave,flux=read_py_spec(rootname+'.spec',angle) + + scatter_name=rootname+'.ions'+ion+'.dat' + absorp_name=rootname+'.iona'+ion+'.dat' + concen_name=rootname+'.ionc'+ion+'.dat' + + + + ax=pylab.subplot(221) + pylab.plot(wave,flux,'r') + pylab.xlim(wave_min,wave_max) + zzz=get_median(wave,flux,wave_min,wave_max) + pylab.ylim(0,2.*zzz) + + if current_inclination>0: + string='i=%d' % current_inclination + pylab.text(0.25*wave_min+0.75*wave_max,0.2*zzz,string) + + majorLocator=MultipleLocator(30) + ax.xaxis.set_major_locator(majorLocator) + + + + pylab.subplot(222) + plot_one_plane(concen_name,wsize,delta=4) + pylab.title('Ion Density') + + pylab.subplot(223) + plot_one_plane(absorp_name,wsize,delta=4) + pylab.title('Absorp') + + pylab.subplot(224) + plot_one_plane(scatter_name,wsize,delta=1) + pylab.title('Scat.') + + pylab.figtext(0.07,0.5,r'z ($10^{9} cm$)',verticalalignment='center',rotation='vertical') + pylab.figtext(0.5, 0.02,r'x($10^{9} cm$)',horizontalalignment='center') + + pylab.draw() + pylab.savefig(ion+'.jpg') + + +def cno(rootname='sscyg',angle=50,wsize=1e10): + ''' + + Usage: cno(rootname='sscyg',angle=50,wsize) + + where + rootname is rootname for a model that has been run + ang is the inclination angle of the observer + wsize is the x/y sized of portion of the wind to + be displayed + + + Note that the rootname could include a directory path. + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + # Get the spectrum. The reason for getting the spectrum is + # to establish what version of python was used to create the + # spectrum + + wave,flux=read_py_spec(rootname+'.spec',angle) + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get carbon concentrations + car3=get_one_plane(xi,yi,rootname+'.ioncC3.dat',zmin=0) + car4=get_one_plane(xi,yi,rootname+'.ioncC4.dat',zmin=0) + car5=get_one_plane(xi,yi,rootname+'.ioncC5.dat',zmin=0) + + print 'length c3',len(car3) + + + i=0 + carbon=[] + while i0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + majorLocator=MultipleLocator(30) + ax.xaxis.set_major_locator(majorLocator) + + + bx=pylab.subplot(235) + pylab.plot(wave,flux,'r') + + wcenter=1238 + pylab.xlim(wcenter-width,wcenter+width) + zzz=get_median(wave,flux,wcenter-width,wcenter+width) + pylab.ylim(0,2.*zzz) + if current_inclination>0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + + bx_majorLocator=MultipleLocator(30) + bx.xaxis.set_major_locator(bx_majorLocator) + + cx=pylab.subplot(236) + cx_majorLocator=MultipleLocator(30) + cx.xaxis.set_major_locator(cx_majorLocator) + pylab.plot(wave,flux,'r') + wcenter=1550 + pylab.xlim(wcenter-width,wcenter+width) + zzz=get_median(wave,flux,wcenter-width,wcenter+width) + pylab.ylim(0,2.*zzz) + if current_inclination>0: + string='i=%d' % current_inclination + pylab.text(wcenter+0.5*width,0.2*zzz,string) + + + + # Now plot the global labels for the plot + pylab.figtext(0.07,0.30,'Flux',verticalalignment='center',rotation='vertical') + pylab.figtext(0.07,0.70,r'z ($10^{9} cm$)',verticalalignment='center',rotation='vertical') + pylab.figtext(0.5, 0.480,r'x($10^{9} cm$)',horizontalalignment='center') + + pylab.figtext(0.5, 0.025,r'Wavelength ($\AA$) ',horizontalalignment='center') + + + + pylab.draw() + pylab.savefig(rootname+'_cno.jpg') + +def one_ion(rootname='sscyg',ion='C4',wsize=1e10): + ''' + + Usage: one_ion(rootname='sscyg',ion='C4',wsize=1e10 + + where + rootname is rootname for a model that has been run + ion is the ion name as part of the name in the + filename produced by py_wind + wsize is the x/y sized of portion of the wind to + be displayed + + produces a 4 panel dispaly of this ion only, showing + + ''' + from matplotlib.ticker import MultipleLocator, FormatStrFormatter + + + xi=numpy.linspace(0.0,wsize,100) + yi=numpy.linspace(0.0,wsize,100) + + # Get ion + try: + den=get_one_plane(xi,yi,rootname+'.ionc'+ion+'.dat',zmin=0.0) + frac=get_one_plane(xi,yi,rootname+'.ion'+ion+'.dat',zmin=-5) + scat=get_one_plane(xi,yi,rootname+'.ions'+ion+'.dat',zmin=-1) + abs=get_one_plane(xi,yi,rootname+'.iona'+ion+'.dat', zmin=0.0) + except IOError: + print 'Could not find eith this root (%s) or this (%s) ion' % (rootname,ion) + return + + den.shape=(100,100) + frac.shape=(100,100) + scat.shape=(100,100) + abs.shape=(100,100) + + # Adjust some of the scalings + print 'density ',den.min(),den.max() + den=numpy.maximum(den,den.max()-5.) + print 'density',den.min(),den.max() + + + print 'frac',frac.min(),frac.max() + frac=numpy.maximum(frac,-5.) + print 'frac',frac.min(),frac.max() + + print 'scat',scat.min(),scat.max() + scat=numpy.maximum(scat,scat.max()-2.) + print 'scat',scat.min(),scat.max() + + print ' abs', abs.min(), abs.max() + abs=numpy.maximum( abs,abs.max()-2.) + print ' abs', abs.min(), abs.max() + + # Do plot + pylab.figure(1,figsize=(12,12)) + pylab.clf() + pylab.title(ion) + + pylab.subplot(221) + pylab.title('Density') + pylab.imshow(den,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(222) + pylab.title('Ion Fraction') + pylab.imshow(frac,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(223) + pylab.title('Scattering') + pylab.imshow(scat,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.subplot(224) + pylab.title('Abs') + pylab.imshow(abs,cmap=None,extent=(0,wsize/1e9,0,wsize/1e9),interpolation=None) + + pylab.draw() + pylab.savefig(ion+'.jpg') + +def get_median(wave,flux,wmin=0,wmax=1e6): + ''' + get_median(wave,flux,wmin,wmax) gets the median + value of the flux in the interval wmin,wmax + ''' + + i=0 + while wave[i]tmp.py_wind.out' + os.system(command) + + # Get a limited amount of information about what happened + os.system("grep 'Reading Windfile' tmp.py_wind.out") + os.system('grep Error tmp.py_wind.out') + + # Next line is needed to primarily to get the cursor whre one wants it + os.chdir(curdir) + print '\nDone' + diff --git a/py_progs/modules/carlo.pyc b/py_progs/modules/carlo.pyc new file mode 100644 index 0000000000000000000000000000000000000000..05542f021e42e960513ba2e7534a4dc038deef1a GIT binary patch literal 29100 zcmdU&dvF}decxwy0g$@{2tGi9xEF^<@(A96AbGrpj`tvWycZLRCk;#&0fKi2sp67JqS@2k)6?Da>u-O5zy3|*cfL1L`q#K0K{X#-&IPX!aq)ccN#P@d?0vbAdL?OuMDQ~q2QGvix+~+ zn}WvX;FZlmt~wBui$QfTD3^jN*_(pu=HNA|-V#(vF9omh$l;*M<*>y^g6c@{8g1Gd zRJU4WG^mbRWLsLpHmhNKQ03nayK6^K-5FHJEKX!sP~C0uv7kC0RQCkc2`hX@P`xvF zjYd=8uAq9imDwFs?+L1VEl%OkF8A3Zxbfbgy5ABH1g|j))I$no4q5>!B=^3cdMKz) z2Gzqs^?s}WPAm3+m7KC0c^o$$v6N{`xjU#H4XVe2>T#=zHqf01tr>fR>WQFAqQm-{@?Q*A9Efp79)mkG7OQrLzPAxfEDxT?t z+@92$9o5&ag=Ky^%dIe}brRK=Heo7k)?yV=;_`f4nJ*P-b-Pw>G*)X)QHqbSG{!cx)IiP{mbVNa=+*>9pD_CrhPcj~zRH{E_12q)|NEs!B*^YxSk3 zr9XJgr!UMRaMf(AXaU2%EXmN*bW?vj)yq<`SPm0%8ns&nZLURk^eUVTHt5@8Tq%{} z|I45Ali*&^*-TJx$5r*Svx$qP=H+Hy5QoeU7(KfO3t$rI6q{y)o4vX9`p zf#>-3TrhqkA9R8sCM_S_%mp_J!Sw?3R>hM=f>N&$3Go8^VtWHoN<|EVf7wjD1r zScgL=nR?d@MXj^cZW3o?OGUkr^j4c7O6aUG)04$oC7z2JyxEnoR~fgc{YPDA)$V$u zH9M(@_0~VWQzD^vmt7{ca=S9$;01OD$yFGkAj zwRZKW;mR~PqE)89zsXS&k|9+yxHUJLOSTgO3_3?Gm}|ABc@q`2Sr6UHj}7vdiL5-X zab{#$n>4aH8}@v_s89JH{HYEE6mRB( z-1}Beq}2|tt#+T@o>kdb-2m0?&8pjJ)lrC|tZg?2T&28x-N@|&!Q24vU!s+KiJ(*j zC1SwDy+}jRmf>$_ekyypQ>3(8t&Yit2?7(p)&++Xrt36dajqFA^FR#3-3e<~YwZ;f zCrRR2CIUh)5C)#y#9S^5VOyajJ1ozF>*?cpsiop%ty`%r8sJdAoiN+xYe-f*q@A@c z5|A8b;V4E0+RykC=mjN`>FJ}9{zK#u4CQz9a@)WRt<^PhZsPQExv^Axw%u;EC-r7K z5<&IOwS9~NlPJAf0C1;J1 z0Gi-wF6iehKgnr&x^f_ukXrDd|3@%>Tog3&B`+MWE z$s;TGzGjYU5$?_Q^y|f-o)78*Khhw0L&S!HE8QS>(ZEk2n|xHmT4c#)p#|6$%Mvv4 zj<%!#VH2>iw1^xS@C)v=$U7PWS80ax+-dS%>rDpMt&o*;s#IhtlEf}+6)HED%PUFP zVOk*g_Ecdd2yV|om?gF*%t?V5877Hs3-_CVTXb?#vJh=iAT%>sfm<~h9|WE5G(?gN zBaIqF!zv|tPC7z#i)qT+owcjwhTVCdUc2d_`fVLbk=>r#j3mq!?OHfzHQB?W(KPFd zC9*hHT??pvskY&1BXCkrW)|n(OEj4#2sUeu>|%zD=7$QSx#3)ixl#yr=CS^lUX#Hvx%c|)U-a!Pojz>^rlKML%L5(^uY;m5h;^APa{NJBfrnT0BqAse@VVc z6A8?gyv?vHqmrf^P^!ly-zO*)-&MZsXv#uaoU|N`akcQe@+tpIad_cdwNichN-!ZLTJ^hV8usL^qUzs4y{+M@eNbLgw7miEbH!v@6!X2W73 z!CYX3XRMB8u99s8!R8?^3B}&Kmk4F=ej3nR_3rP?W$&KFTPUOVUtk?JhNQ9sLHCRn z%vBO{#7RgYm~aRw_!HdmV*&z%vg}Gg3c;0!B_JRwAPtJ9MR^>FdMX$NDp8uk-Ivp6 zfw`_VPje4|i$DUdrv2{GojhPd*t*NIeS$rFDDW_tHsDuiK=1y7;V+8;LQ9oipzW4* zgj!>loMhY_Kdj8R;tHI*Dr8&$U|5o&!dJ`fSVE3ez=o2{_EgnXj$IS{rvlo5+cOAOuAy~HsCU>Ei+Wnl$wZR%K= zDY&rMpyi>MHPl@b%TLQNX)V-vO!LU%{7Rxb&>mc8r@~~ZGVerwp`0Y}VCJQCM;=u{ z@z9jkTt?Bl9F{8;xUuw378T0$&x}~u-kTl+8DCkd^}zI!rMkg# zGzMj?T{ZN*y5ZTQ6+_h5_wJ|lf(=-=4CMu+<4ht4s3l-_6nNd^ulL&Z&fNC=Xx{V< zQ7SDXXH~~1351hiB%Op!>+m(qOq`0Zm;l`(X64D7!k1$P2N~tt$5{xG_;>$Ie5Xx~QjNMX^%@1QCHq&}-Qm?eGH|xwTM<2A_ zm%NUCat~c>x68S%fIM_zG#B32tTe>BPj`Xf0l-)0y2%3uIA^3Gf(5_Pv+%3RH zRofJF+oGuS+l!*V5&we%S(u%z|Z^Y zo`1nux>)c4tI4L|N=0Hl#N?5vD-BWiD~uQQ@6qj^s4tY8Xkc@GHAk<;dW7Y}id5MW|-;z-g3{aW@$f848RapX_TTMoTrT0W&fqmP7FOAFO^rKZzt+1UXzTQ_}Rz zs7TtHsbu{7C9Ecne@m84|BUqb^`=xuSZ=7}rhYWV^@it}D(MY)@&{ZxgGy2Cdbps8 zrb)KLmVt5j^&Mj0T#u47nu8_j&$-h!1ILMGGq3=CSh>qjLa^ISLa?8O0ztpn3^VO? z%*}*!MPQ;{aH5|Nz@D2hF|rD&UJ5Jwyrvv8KqTl_Q7~B`Y|W6)iGn!^!6BbTg6VWA zAGF3@!scM2%*-hU&qG6*UeXvTSEAe&E4PKoJ}k}m-O5{A?Om?8mZFiY_|~jAEO6b{ zUI7p;vQ;45C>d`2mf=R)XwlAJw5kOYDBsm>wp^kBqsyvs+wEyJS_D{-MhgUEMcK<@ ziUDlJV2_eY!FB$jW>e>J>MRB~wkU~bQ~8ZyVGY|C8k4PL11*EW9+IzoA(y-IySbbV ziKQCgOymr3*v!zd?q+m$2G^;O+H!$gb?uHV+Dt(fZj4yCRg8GuvFKjbi}Y{q1GHdR z%By>MYV%(sX+%s&@5Ob~Na{#%eXCFA7WLkeZ~vexV|kiRD@w+^*@C$-8c?;yQ%~Tb zBSxv||HPi`a@UP*0W<45Ww!;pG@|T%(3U(yhLE{V*pM($?=AyHz0G7F=hW32P2kN8L|rT{eA7vuUoH zvR>KjS!uS)nnc(OV@bO(xf@VOzHC~A)8|)aWEh?l`7l!=D@~*J;bVwkcLcMiECt=X$?`AlmshxJyAb=EAXJfhliJ@C6DUWIpUFQZ*S z2j?2`;v%gs&&i6VarcVK0*_N8QQT}{RpFRkm6HnlX)5HlT;RFOY-R9@>K!(=qA|V2 z5<%qaI+!GPa%rqpgBl)0GfaDF23jM8&%XFvk3*Vy|7Fbcs7T-(H6FAopbRcCeM{MU zu$oypLq}`1818?rUAr=E#;I02hNP4mwq(0x)!M8r*Z=fmuRr!5r7TRS!W;sB9G%-P~(NOO`rDD;}$|`6sEl{oQLkJUlIx5K3R^w{T^2_aZdBqyYCg*&4v1Ur8#AT^Esm4e5 zs7i4l8)j8U_HH-83wh>V|mg=jOa)ERa`HDyRDY4@~qG-?XgI+(rQ>l5@wOP z#!}ZT^7G}!92%LrRV5o3kep_zqz#WAhg{}Ef7?)GPw`1cR4X- z@h$O4F~zg|Bp(K1wFG1JHo~NEK=h0G$65^Q0-PBxt^F_(7H~+JF79AiPgxl&ChIec zFN^zyD<7d4FTr?O%z|tjYo9cD=o3uh`4@P_ViYhNneH8bSYat-$>he(whl_`nS$#< z#n|f#9oH**8u*iDZ0$YM@xCF^nwxZh-GR3e@3w4dEEyjx(`aZ>(e8&Fq4+_GU`-g! z7y;uA)=QtfrI&0y_sM-MgJrp|5m)|~)578{dV-9Iz1B}kt4_9Rv2!cg3|o+F9`+VH z3`Ai5lZTqELt5>Grl?~w8!T!EEUCotdP|;dk~^!f78n*3?YebhRu#bL#h1^e3XN1Q z>cwo}o+K-S%y3fDuyVOI#JdNe`9;~AE!Ha8SeNYpTNB|5LDV74oIVlW%Mi%Ub$4TG5UxV|yHgajrh zNehMzhw>93Q4yTlO*l4CV24DgRzQyvBBj_iY`8QoT*}$-uHXS699CyG@nb;q*Qs1{ z+)RF%Vt285IMe6uc5^%h6~jBSuDv~*3cw!2 zgYG}Hxel06>N9Sx!(YkUY_J1vm~H#gV9;uj?Iu1Cp8$?h?85*AvaH4gH~C$1v4;sZ z`K7Rcly_1e7D`vf?Mxb+V20V_b*H|TUb!K?5A5MZ(>3e9Gx9jVpemv4q~2ZfuL)8( z=uN7O2bpD|N646&S~8ja@0YEyrY-E`11SbLe;e63Cr=!fBTQpyp_#xLBQrM|v76HU zQ{2eh4v&Y&tG557LdNKr+h*JslXbRoOg#b-2^nlLHLZutPe8!a=9DMC#T>NhZTv5~ zOt)E_5PRd6yL5?o1kbn{UAgwe|cRuMTiQAJx4H%B#jH#|qRHmvH>r!-5aNezb587Vspf8i4& zxl-OSj^W&-&C8M8US{U5oYC+ksjSqeH8}BW1qSVNpiESzs){g0bCpy#U+0K88o(^c zF&Pm^Nn<{E6}#x5*(GwAM3?}!t#2{gZ(@C?YGwedJPFbfx#q%IQvJ2<`-?*OZO}jG zd2B;AS{$hk7kOG_}n3(UXrIJ4U43ee(FD#Efl93!IWjX@P9k4zZHGn|i{Y zh=oSS%ihZ@)6Q@(%JjnbCh{5V?VWmk3enc)YENr)vWuikFOwzHYgOi&$Cf=41A$-V zfTvE`ZA^hW8@f{YSRSp1EOWMSIGg@?+t)FhGkN~p1r9rNgg#nU@y5{`3V^3wp{#O z9MdX#lxC>PpXDccfU@4Y$IhWy_g*cCa5{my*xaA31{mMu-NdF3Tp4TVz!g-}CeOKj*CcF0uoK9pJtr0l_o zU}whp*oA7eKE76}@cngUW|0^XFU zs%#F>vL;@@eY+A1wK8sq#yM%c3f5Exg0!ED zMM6)=+%s*I7;Rn@Wy_TguC46J$!pDEA#KuZSz92UCgapvQ}H>u5BY}G*;+((RV(DT z;LR|um8zL{Cj0^6$WjY*uSUt%#zZUPvs&IyhT6Ezdf8Mh)Q&cVvhAbr`S0H!#2TFfeTt- zsK*12A2Yt}+Z2)MkxxsM86V7#iMay{j_tpd*x4V1Hz-(u&RUrD7!Q!v|<-;Oy z$hsr%IRMC(^<4m$Y3PF7g22*H5*(tev)ZGs3$g$~Lr)(!`0{ZBQdd|h+zWtG0LtL* zCB=a+Dd_*S!eO9cuHq?lJI?E??MLLafS5Zp`Bpe~Fbf=G#0QSK#5C{h7(_fAmx38K z5!~}!xvVMfl96$(r}MVQN_7`Z@{+&c-Ia>nRif~hipU1@9`UBo!==!J6rR_}GGGQf z$T$xEe667At;uN!?&rF<|MnIKW^SoycYtho;|TIIrycK%-RP8YpM7hTK|9l*1E)<3 zFRdP`@MLH{b*od&btglmNx!@tUIi$(!>90IJ)AsPKg|D0$aB|)s$Q8edBPXM=Br1h z4@p%aH+sT1ZsOl;4TMLLDVyUy7?sEwH$~C4ut$9wXj{QRd2ua6QCuigTgl8l>mg!< zgLe@94FyjV7%(ojmZQI^ln*Q5$AMw=6T}>}!i<9GrUJ7Y2qpPA1%4MQEd#;mBf9)4 z0^^%qSLO%8!L3xX`sED(#>s;u2U~9e!u;;S2o{4Q`5l1aKKw672MrPhlZDZOL?xVg zJ^yq?>j3&l&o=pSE}RMiRb=8q25-U^&9e@DZ&f08Mlg#)jxI8@!7zb?Sqg6&!_<2)esvZh<^+Usz(&?~9xY zP%4sdbJG+O94nl$&Rgz8;P9Q)UV*1$5IyR)KXH}+5;?*c*X}*YUZARM&t-)rF$2y-J3}vBad{fYnVc6yGKUGSp=lAnx3H~Ia%`3O`(u?jbhGKMltqlk%w^vVw@F5 zDVzFIkRVbv_ocABn57)y!fL~3b24ZviA7b4GclyewnxpSohPIE@HyZptD-B(I%s?M zY2oc!x2!OYTc_|2m+xw3*Vq?krCq1+Sbt%5oqb_e&UFg!?k_x^6*hbLEp6V@Uw9%b z%n+?p^Bq}XCKlfl+V_g?OT}s!RQEBnnQC;2Z1-{D{-An5A2Qy=xmFp>Mn9hJB^>lG z;XZrAIlfuEFnL&SUlvT8cQZ_Y$@JS3Z%Q~cMdFi(UVP+GW;>WNF@ExR?KoS>McWlL z6G^g(il&=2vnE@-(;shJx`c6>DiiyzYE@F%RYhjS%vMHg=i<61O)Q0(E)jf_z~+#V zLwjiRz|4ngHx9(#BFhq9@(JJWPiRx(Pn96qKZi2$j9K?r;_q;6Q~1m*zM_lqcU4FY zy-+E4rt9B*&+pyyk?(xrl)*+2ym87f=2|#;;P|l*e(13qVP)aK;f_9Ml1?bc)^a1R zHy7ANv|8En1z`+7+Aa6Rq+O(?>mM5X?dQL7?USc$@^)8OyOV19*eAXw-}b(WnX$o) z8^cSBbq`zFAh|CW%m|X<6C=6Qu0_mqw{@B<%?dxFPbfjXvg_5ngys_x#xUFX)v71o7rEFWg(;siUbhQ?RvBTiF1icrwVR;3;Ycy@f z&#pHNkrJ1#mH`_0Zh_-dBm_gd2TEApO9j@~+>XLdEPx~Vo$UOLV6VS@xHmVEFF6-T znP^nEVdvM@!%l-wA)m0*7FAZ;6h(!d4n^hb0t!)1=;>mhr^iuHQ??PNGWhT|(UNDe zIKNG_bSpW90mvS-dVq9j>CupqwAj_Ws;~!0SJpryP!)phX2lX}f?a=ZTloV8gl1$pGac%ilnEYWt zQNlEh8;HSS(JtEa_C2J-)T`GlNAqL)DqOi!*0rCEBFTl9;q7+k<{s{*LvvW zUd9iOPHD$}O6YW&$}@BVYfAdrAU?%UP)Gc&0>K@aP3l~I>*@=SK3x$*)euRa8;%5C6OZu7|kg4FqH3@;&4>yc6|E z^Rt6-8Z6?sD2KgKbJO!2lqzVn2TH1N-k){`g<&80-0rc@753OiVcL&YwYIRwK3CXd zABE|;D-7HTRb9<@Iqc&CH%Y+FPO|{n;E3+{3d25^O&%N(;JeRJNLLA66H}xJo|K5h zA6iS{P?V1{no$;*p;t&Zk~BJbC9*U;)1+Sx(cbFDT$S{FKP7lA9djm!-8`uL|v z%-i6We?l?yVu*=2Wsv_*8<~oqJXqDF;m=o7IQ!PA`Y(N2fByZcSSEw`YXp4^RIuDn zC%>-jUsS<26o{#9luiC%SSdT{T8I?Mnv^-(2r5IVm)3}9ry;7BYwhUsWJO<4AfniZ zp0Dfjg9;2smlV57fDMsB!$`isXIa?k_0Scz)uLyVsVh-OBa~fCXNf(RJ&l=#@}*XL z#!fhBwH+?6fn?!R^jQU;Q}9mJrKM3@&@(be_bxC=|D4M7n*Uy1zO3Na75s*R-y|@l z7i)Qe__b@-jFCHEemrqyNT*d^;3m0tR_?cX#(}`pba09D?`I5ia5sDs|26jZjAIUr z!YsG3r#uG7EaeWdw9oQD@LnF8e19HT-pk`a zpDk=1a-&(hF^;n?44co~NYFhel*}?O;YG>!H2|xqARb}z_7K>mQ9#m1Srv$~7>vuC z{y*UPp-$57)SbHewBj=?7+bMy0oCT1ZZUHtW6zQsfN0hO6l6xwmWlO?Qb<+Ujk{EE z^mcXjkHfb9abPv-&)eRg$MVykx1&Fg!;Z26+uk=|<_ew;7)t^xTslhlsHag@sdT_> zK}rYg|L~!KA273-$nE~DJm)oFJL%l^Y`}=E9x#f!0V8s|qRtIJ9k4ekxT@o0{T<)2 zdQf)t=Q)qZOc;0f=W*0iHekDMH(jZdX(v9;7$!QsuWR2wxFVp=BIO^{nG$MnrCET+XT{7qdxq`GeGu}j{esi`t4iYiiq(d7e-@nDbp zZ`_z5DOPSx7SwUV>fsPD_}t;(`h=&Bj5t1RP)EK==YX%y9;o9TR&>I?>v%wqfHqFq zE!W{|DQ$#8AF&qR8C>53BM)LCz1KtsrY)QAw`lE}4sbje-Tjg3#@)g7yV7ploxMi7 zam>1Lk7%^-@!sJ2J!w&Fl3o_pcJcU+NEbEA$l-%_@Y+K`_2HoUNKkz=sJ?@jiJdje zek`b-yj?cuy*(aOp9rc?>TWYExckU>DyW`XlfeM`xy!h*?w2+jKZ&|KTaKH= z+xtF(fXmBq!f%7NW;y=}TL|}<;X`-%d%8#YkQ9?G{u&%8xB4hFJA_PU$rasWT*z0Z z{sc9h6-O5R(CGv;0pAd{BkO=W)kw`+s@CXA?`vDR6yqG$Qz?4fu%{w;Y7Z-~YJ|nE zq%c&@o{&K$dW~yS3i@&$>X}}wh0w}V$TspZN?pr*V2h@)R+}`am@`cx*K}=k7gCLx+}WfS`cN56SRrm zev^O|4$8SuUW`6Q#KuUwW6|H@%DV8PtKj7$FP}T-jO^NGI-j=doHF8Xr=@*|&z(DW z~x=Irt zt?=i+uWPgScB`+gXLvX3lh^w`eJa_>^Dkzeu$cZ|J#*&3;V{t{&M-Bd+Eq|1t688+ zJDcV0q@g|Z+3_a#avA+&1w9qVv@t^EU#BCrpiqJO4_ zeM!NW75qMdsfx2*vqj8yox+;hBJ_GHE~~OSYr|Tj!~&7|p7h195)ZcS-Za5x?XJRI zI7Qvn_jS@CbBrqD4z+`yZMlg-D`DQt`d-}U^WDMQ&9~i-+zFhmMtsQsL-K}}j=Cpz zx7ShkOGm}`U?)D(mMTx_-2MWo_#qHddR5NgUi_vf@)PW>*f5@b$aGl2k+9+{KgoZj z=eN~ioyk!|m2VJGRrvw{gA_CsV_%jy6s&wwn^m5{QC;8mv$W5G)?KN&{bl;LpH&8p zlrm_&{bf>1q}P7Yq@DKLUuKK9R{ApTStY)^x(_d0z6R&JE57oQ7cL5>dAmAKC@hc8 z5f{FSEw@85_>_zfl`e6lYV!FKDtLLEH`bt z%}v-e<;e@yTW!Qv*9OzoevUc*-ma*rd&R5{Vyo*wX;0HIgIbHcI=S9W7(1V*r)i6b zt*(tOrfF$yxCz|$rY&acMJ<4~KLF3fqDd0w0C6i~D9F4^(N8WoOW2!MEr%m^(;PHr zMv;AXr;tE&y~dQqyv8I$0~(X7%xg@pGOsalL1m2VMl16gldEihf6ExnjaKHBELYjV z{>m844ONDC_@P8!#yFgAj3LvLQ<~Kr8Qn)y{dViER2A~{E1e3!$X3f;XpX zudB!!zSi5k)Uw)VDPP0BdYnt0<&8vttn&Ybz`D!&Ng!9C>Qp9G=CGR@X=isXjb-5>+caJx(POs5G*+Kl`9=W5(~ZaLA4 zF0U!jew$6nIQ8@Ai;k|Pbh&q<@?pxuf0JPBrs4obSqKimDSQ9#&KV(;DyV&)v-~74 zB2~8~guIEWHZ`)HWw)sT9b^?+mBEoausO`Mw%Y+E#13OjfFwNOwR{m{eTN0{qTnl- zsbC$%VH-wLw9#yS>{gUDl7G4tI>D{%W@OjwYp{6@!(#^mOEEjRd)%%Bv2pD_lV(Dp z-2=?^$Qp)z5}n;TON1m~vFG?3xWX8Qcs++qyVdNJ?wY$W)$1ETuI;!PRqC(dGw>BQ zct*Xck}_udheSdSVTJmo0&ELw^BUG-*|4fN&Bk(^-3_l=bvI*Z8`+%D(;Gv0!4B~` zjiGlQ;z4gZhI{_%jvl`PA{(A{2AAL3kY)Fe9;EAe#6=rT&+`V|J`}@gyZ1M+i)JE; z(RwT$PVZjzR>OJsU)|xvBOx2Fb%v8YiY&W-I3>!Ao)PdLcJ%iB)g8Ti`-W%j=rKH| zMfl+{jesqt4GR~$E`SWXEE|X9nJ(|qsUWVBG#g2LSHdg18yvZx#j&yO{v&M@W~YPrkFnc*J9t z%+|z($tSe1!d>7WXZz1$b-&rg|IQOWeuB(l(syT+U}Z1c@dErFiAulG9|gp|oyxQq zc{^ms3A@VH*HL;l_db7}63t>oCitd;dkD;+H-~exv_fO{LGaA!`d&E{?)~^_BRO_z zqg*V^a%b9t`Im4~0G=cw-C2pGvw{yZ8fkE(ZeG=oeEhU?G93E&X-l6q19pAe`yTt^ z3qSUW({-~VUncUxH?EEScK#EmUDflo%4IWY*Y7;~CkKZ9?a!aC%Sn6eJ49an*?;x@ z$%UUkZ6@vdE7ixp{)fjtb-J!5-}CsVPMgDI{O{Dm*9rumqsPu?QsgH+F4jJRJ)=Dp zj%MK`*piv{^?}RrlR6i(cm1HhmJRygkp~}6O8sZYmi(Y)o=k6?GRwXhun`pPQ_OXG zwsA|E<#Z<-vpGIyv0=1cb0}}eA7Is3oG<&D|Ll}$4XwF3Yob5Mvd_^dd##guc-&eA z$gI}u8KN`WvJuv<9Fh`?u2|IBqkHCQS*A@ZEO)O;7@RMsR9HuSWv{l*RpW~L+F$NR z&e>A~kIe>mAN?Yt8L76%*IYm74B45r-GpV?9n2-2aCtd;KmVEC*et~5)n;H*Hti#^ z8Ik?yD=M7vZEHBZTAvnYan25jURAL_R3KAu^q&;`X96q4m&CZlC625kNA zR~BIYa*o!zWpaCmIKuj^O6B+3Zx?veng+94bo!Un&HmO5mI|EvHK&2P0cRF86+ z*GXBc^Vaj^>hYOl5Ayf8h4z0%?^BvlrcnxxI?Pf`g&c9iSypy@2T=Pe^c`a~iKa8E z3<^lWp)eP~FY1O_7+a{8Xqg;%ipHseczybUEX8P`xL~m&;qqh0T%lfQ-4UGo1p7wV zF3cjT&*x;?4XJcRFQ=h4m}=DFz4)p|{ZgCL}qlH;Z4N>@tJoYDnE&vt7S{r0kYm}q?opXj?ge5&tanr{k| zLlmjEYm4C_oqMCZE@A~!$2qU7_gE`?M_SfS3b-X(X1LNb49R)tTRzLRbrv`P9dspejkYQH@$^PcDpW-(7==odSa-V) zvNjQC&T}^P#&vm(<=h)|S6eOr7mvs>R-(_oo>_p8!jj z8nve+YW8{25F2ON-@E{FXkfHBeE0CZ#cjp?#j(--!#^`TJ-mOj{|DTTKtKQh literal 0 HcmV?d00001 diff --git a/py_progs/modules/grid_eval.py b/py_progs/modules/grid_eval.py new file mode 100755 index 000000000..2be6ea9c4 --- /dev/null +++ b/py_progs/modules/grid_eval.py @@ -0,0 +1,1057 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: grid_eval is a package of python routines intended to + aid in the understanding how models in a grid vary. + + Some of the routines run the c routine py_compare which + compares two spectra produced by python. This routine + gets inpt from a .pf file. The usual progression + of steps is as follows: + + pf2ls -- to create a .ls file from a collection of .pf files + make_runfile -- to create a file which contains all the + various combinations of py_compare that need to + be run + run_self_compare -- to actually run all the comparisions. + This can take a long time to run on a large grid + analyze -- to read the output file from run_self_compare + and summarize how everything varied + + Note that there are certain applications where the pfs2ls + routine is useful from a standalone sense. + + +Notes: + This version does not use sqlite + + Instead it has it's own concept of a table which is a list. + Each row in the list consists of a bunch of name, value pairs + + The tables are specific for use with python since the first + two columns are the rootname and the spectrum number. Usually + operations preserve these two columns regardless of what else + happens + +Problems: + + Bacause it is just one routine the subsidiary routines show + up in help. + + There are a number of extra subroutines that appear to be + for there for test purposes which are confusing. + +History: + + 090404 Bagan with the current version of carlo.py + 090420 Removed the sqlite portions of the test routine + so I could actually make progress + 090829 Tried to undersdand what I had intended + +''' + +import sys +import os +import glob +import numpy +import math +import datetime + + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + +# Next few routines are general purpose utilities + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + print searchlist + + names=glob.glob(searchlist) + + + if len(names)==0: + print 'Error: get_filenames: No files with this searchlist: %s ' % searchlist + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filename into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + +# Next routines cover the reading and writing of ls files including the +# createion of ls files from pf files. The main interface is the "table" + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + + This routine has been specifically written + to for python, the radiative transfer program + + A record is returned for each angle of of a python model, + and the root of the filename is encoded into returned records. + + The purpose of this is to make it possible to + treat the angles as variables, even though + they are calculated in the same grid. + + It DOES NOT handle the type of records needed + for gen_grid.py + + 090403 ksl Made this modification + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + root=filename[0:n] + except ValueError: + name=filename+'.pf' + root=filename + + x=[] + nangles=0 + angles=[] + phases=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + if words[0]=='no_observers': + nangles=value + elif words[0]=='angle': + angles=angles+[value] + elif words[0]=='phase': + phases=phases+[value] + else: + # The next 2 lines are needed for sqlite, and was deleted from + # this version. It is needed there because + # Because it treats . as a special character + # keyword=words[0].replace('.','_') + # x=x+[[keyword,value]] + + x=x+[[words[0],value]] + i=i+1 + + if len(angles)!=nangles: + print 'Error: %d observers but only %d angles' % (nangles,len(angles)) + if len(phases)!=nangles: + print 'Error: %d observers but only %d phases' % (nangles,len(phases)) + + # This section is to handle non python .pf files + if nangles==0: + # print 'nangles ',nangles + xx==[['filename',root],['nspec',-1]]+x + return xx + + # This section is to handle python .pf files with multiple angles + xx=[] + i=0 + while i 1: + # print string + # g.write('%s\n' % string) + + values=table_reduce(table) # Eliminate all the columns which do not vary + i=0 + while i< len(table): + row=table[i] + value=values[i] + # print row[0],row[1],values[i] + string='%-10s %5d ' % (row[0][1],row[1][1]) + j=0 + while j1: + unique=unique+[record[i][0]] + + i=i+1 + + return unique + + + + + +def table_get_choices(table,colstart=2): + ''' + get_choices determine what variables are changed in the table. + and values of the variables. + + Note: There is no guarantee that all possible combinations exist, + since typically a complete grid would contain some non-physical + choices, such as a mass lost rate exceeding the disk accretion + rate + + Note: The values are sorted + + 090405 ksl Modified to not worry about first two columns, which + now contain the filename (or root of it), and + a column (for a spectrum + ''' + + unique=[] + + i=colstart + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + +def table_select_rows(table,select=[['angle',30]]): + ''' + table_select_rows returns those portions of a table which have the values set + by select. Note that the select list need not return single values + + If no rows satisfiying the allowed conditions are found then an empty list + will be returned + + This could easily be expanded to limits if that were desirable. + + 090603 - Added logic and code to limit how closely numbers needed to agree with one + another to try to handle roundoff errors. It is a little unclear that shis + was necessary. + ''' + + i=0 + tmp_table=table + while i1 replace them one by + one + + ''' + new_table=[] + i=0 + n_updates=0 + while i < len(table): + row=table[i] + new_row=[] + for x in row: + if x[0]==colname: + if len(values)==1: + new_row=new_row+[[colname,values[0]]] + else: + new_row=new_row+[[colname,values[i]]] + n_updates=n_updates+1 + else: + new_row=new_row+[x] + new_table=new_table+[new_row] + i=i+1 + + if n_updates [[var1,1],[var1,2]] + + + ''' + newtable=[] + xtable=table[0] + k=1 + while k0: + xxx[1]=[z1[0][0],z1[0][1]] + + row=[[s[0],s[2]]]+[x[i]] + z2=table_select_rows(table,select=row) + if len(z2)>0: + xxx[2]=[z2[0][0],z2[0][1]] + + + row=[[s[0],s[3]]]+[x[i]] + z3=table_select_rows(table,select=row) + if len(z3)>0: + xxx[3]=[z3[0][0],z3[0][1]] + + # print 'z1',z1 + # print 'z2',z2 + # print 'z3',z3 + + print 'xxx', xxx + + xxxx=xxxx+[xxx] + + + i=i+1 + return xxxx + +def generate_one(outfile='compare.in',variable='wind.mdot',value=1.6237767391899999e-10): + ''' + This actually writes out what we want to a file + + 090531 --- This looks like a test, because do_one is a test + ''' + answer=do_one(variable,value) + f=open(outfile,'w') + i=0 + while i0: + second_model=x[0] + g.write('%-10s %5d %-10s %5d\n' % (first_model[0][1],first_model[1][1],second_model[0][1],second_model[1][1])) + # else: + # print 'No model for ',select_one + if j%1000 == 1: + print 'Processed record %5d of table1 %5d from table2 %5d' % (j,len(table_one),len(table_two)) + j=j+1 + i=i+1 + + +# Next section actually runs comparisons, following + + + +def run_compare(infile='test.run',pffile='default',outfile='default'): + ''' + + Run the model comparisons based on what is in the .ls file + ''' + + # Read the input file + + try: + f=open(infile,'r') + xlines=f.readlines() + f.close() + except IOError : + print "This file %s does not exist" % infile + return + + + # inputs=read_file(infile) + + dir,filename,root,ext=split_filename(infile) + + # Adjust the name of the parameter file + + if pffile=='default': + pffile=root+'.pf' + else: + xdir,pffile,root,ext=split_filename(pffile) + pffile=root+'.pf' + + + + if outfile=='default': + outfile=infile+'.out' + + + + # Before starting huge numbers of runs of a routine which will failover to interactive mode + # check if the .pf files exists + + if os.path.exists(pffile): + print 'The pf file d %s does exist, ready to rock and roll' % pffile + else: + print 'The pf file d %s does not exist. Get one before trying to proceed' % pffile + return + + + # Check if the outfile exits if it does then ask whether it should be delted before beginning + if os.path.exists(outfile): + print 'The output file d %s already exists' % outfile + choice=raw_input('Delete it (y/n)') + if choice[0]=='y': + os.remove(outfile) + else: + 'OK, continuing with old output file ' + + # Iterate over the input file, checking to see if py_comapre has + # already been run on this combination. If so, skip, if not + # run add to command string + + commands=[] + i=0 + # while i0: + + xx=numpy.array(xx) + ave=numpy.average(xx) + med=numpy.median(xx) + min=xx.min() + max=xx.max() + std=xx.std() + + # print variable,len(xx),ave,med,std,min,max + + print '%-30s %5d ave %8.3f med %8.3f std %8.3f min %8.3f max %8.3f' % (variable,len(xx),ave,med,std,min,max) + + variable=line[2] + xx=[] + else: + xx.append(eval(line[4])) + + i=i+1 + + + if len(xx)>0: + xx=numpy.array(xx) + ave=numpy.average(xx) + med=numpy.median(xx) + min=xx.min() + max=xx.max() + std=xx.std() + # print variable,len(xx),ave,med,std,min,max + + print '%-30s %5d ave %8.3f med %8.3f std %8.3f min %8.3f max %8.3f' % (variable,len(xx),ave,med,std,min,max) + + + + + +if __name__ == "__main__": + import sys + if len(sys.argv)>1: + pfs2ls(sys.argv[1],sys.argv[2]) + else: + print 'usage: grid_eval.py pfroot listroot' + diff --git a/py_progs/modules/grid_eval.py.old b/py_progs/modules/grid_eval.py.old new file mode 100755 index 000000000..e273d6575 --- /dev/null +++ b/py_progs/modules/grid_eval.py.old @@ -0,0 +1,1030 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: grid_eval is a package of python routines intended to + aid in the understanding how models in a grid vary + +Notes: + This version does not use sqlite + + Instead it has it's own concept of a table which is a list. + Each row in the list consists of a bunch of name, value pairs + + The tables are specific for use with python since the first + two columns are the rootname and the spectrum number. Usually + operations preserve these two columns regardless of what else + happens + +History: + + 090404 Bagan with the current version of carlo.py + 090420 Removed the sqlite portions of the test routine + so I could actually make progress + +''' + +import sys +import os +import glob +import numpy +import math +import datetime + + +# These are the global variables +python_version='unknown' +current_inclination=0.0 + + +# Next few routines are general purpose utilities + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + print searchlist + + names=glob.glob(searchlist) + + + if len(names)==0: + print 'Error: get_filenames: No files with this searchlist: %s ' % searchlist + return names + +def split_filename(name='test/test/foo.dat'): + ''' + split a filene into a path, filename, a rootname, and an extension. + + In short get every possible thing one could want to know about a filename + (except of course whether it exists) + + + ''' + + try: + i=name.rindex('/') + dirname=name[0:i+1] + name=name[i+1:len(name)] + except ValueError: + dirname='./' + + try: + i=name.rindex('.') + root=name[0:i] + ext=name[i:len(name)] + except ValueError: + root=name + ext='' + return dirname,name,root,ext + + +# Next routines cover the reading and writing of ls files including the +# createion of ls files from pf files. The main interface is the "table" + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + + This routine has been specifically written + to for python, the radiative transfer program + + A record is returned for each angle of of a python model, + and the root of the filename is encoded into returned records. + + The purpose of this is to make it possible to + treat the angles as variables, even though + they are calculated in the same grid. + + It DOES NOT handle the type of records needed + for gen_grid.py + + 090403 ksl Made this modification + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + root=filename[0:n] + except ValueError: + name=filename+'.pf' + root=filename + + x=[] + nangles=0 + angles=[] + phases=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + if words[0]=='no_observers': + nangles=value + elif words[0]=='angle': + angles=angles+[value] + elif words[0]=='phase': + phases=phases+[value] + else: + # The next 2 lines are needed for sqlite, and was deleted from + # this version. It is needed there because + # Because it treats . as a special character + # keyword=words[0].replace('.','_') + # x=x+[[keyword,value]] + + x=x+[[words[0],value]] + i=i+1 + + if len(angles)!=nangles: + print 'Error: %d observers but only %d angles' % (nangles,len(angles)) + if len(phases)!=nangles: + print 'Error: %d observers but only %d phases' % (nangles,len(phases)) + + # This section is to handle non python .pf files + if nangles==0: + # print 'nangles ',nangles + xx==[['filename',root],['nspec',-1]]+x + return xx + + # This section is to handle python .pf files with multiple angles + xx=[] + i=0 + while i 1: + # print string + # g.write('%s\n' % string) + + values=table_reduce(table) # Eliminate all the columns which do not vary + i=0 + while i< len(table): + row=table[i] + value=values[i] + # print row[0],row[1],values[i] + string='%-10s %5d ' % (row[0][1],row[1][1]) + j=0 + while j1: + unique=unique+[record[i][0]] + + i=i+1 + + return unique + + + + + +def table_get_choices(table,colstart=2): + ''' + get_choices determine what variables are changed in the table. + and values of the variables. + + Note: There is no guarantee that all possible combinations exist, + since typically a complete grid would contain some non-physical + choices, such as a mass lost rate exceeding the disk accretion + rate + + Note: The values are sorted + + 090405 ksl Modified to not worry about first two columns, which + now contain the filename (or root of it), and + a column (for a spectrum + ''' + + unique=[] + + i=colstart + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + +def table_select_rows(table,select=[['angle',30]]): + ''' + table_select_rows returns those portions of a table which have the values set + by select. Note that the select list need not return single values + + If no rows satisfiying the allowed conditions are found then an empty list + will be returned + + This could easily be expanded to limits if that were desirable. + + 090603 - Added logic and code to limit how closely numbers needed to agree with one + another to try to handle roundoff errors. It is a little unclear that shis + was necessary. + ''' + + i=0 + tmp_table=table + while i1 replace them one by + one + + ''' + new_table=[] + i=0 + n_updates=0 + while i < len(table): + row=table[i] + new_row=[] + for x in row: + if x[0]==colname: + if len(values)==1: + new_row=new_row+[[colname,values[0]]] + else: + new_row=new_row+[[colname,values[i]]] + n_updates=n_updates+1 + else: + new_row=new_row+[x] + new_table=new_table+[new_row] + i=i+1 + + if n_updates [[var1,1],[var1,2]] + + + ''' + newtable=[] + xtable=table[0] + k=1 + while k0: + xxx[1]=[z1[0][0],z1[0][1]] + + row=[[s[0],s[2]]]+[x[i]] + z2=table_select_rows(table,select=row) + if len(z2)>0: + xxx[2]=[z2[0][0],z2[0][1]] + + + row=[[s[0],s[3]]]+[x[i]] + z3=table_select_rows(table,select=row) + if len(z3)>0: + xxx[3]=[z3[0][0],z3[0][1]] + + # print 'z1',z1 + # print 'z2',z2 + # print 'z3',z3 + + print 'xxx', xxx + + xxxx=xxxx+[xxx] + + + i=i+1 + return xxxx + +def generate_one(outfile='compare.in',variable='wind.mdot',value=1.6237767391899999e-10): + ''' + This actually writes out what we want to a file + + 090531 --- This looks like a test, because do_one is a test + ''' + answer=do_one(variable,value) + f=open(outfile,'w') + i=0 + while i0: + second_model=x[0] + g.write('%-10s %5d %-10s %5d\n' % (first_model[0][1],first_model[1][1],second_model[0][1],second_model[1][1])) + # else: + # print 'No model for ',select_one + if j%1000 == 1: + print 'Processed record %5d of table1 %5d from table2 %5d' % (j,len(table_one),len(table_two)) + j=j+1 + i=i+1 + + +# Next section actually runs comparisons, following + + + +def run_compare(infile='test.run',pffile='default',outfile='default'): + ''' + + Run the model comparisons based on what is in the .ls file + ''' + + # Read the input file + + try: + f=open(infile,'r') + xlines=f.readlines() + f.close() + except IOError : + print "This file %s does not exist" % infile + return + + + # inputs=read_file(infile) + + dir,filename,root,ext=split_filename(infile) + + # Adjust the name of the parameter file + + if pffile=='default': + pffile=root+'.pf' + else: + xdir,pffile,root,ext=split_filename(pffile) + pffile=root+'.pf' + + + + if outfile=='default': + outfile=infile+'.out' + + + + # Before starting huge numbers of runs of a routine which will failover to interactive mode + # check if the .pf files exists + + if os.path.exists(pffile): + print 'The pf file d %s does exist, ready to rock and roll' % pffile + else: + print 'The pf file d %s does not exist. Get one before trying to proceed' % pffile + return + + + # Check if the outfile exits if it does then ask whether it should be delted before beginning + if os.path.exists(outfile): + print 'The output file d %s already exists' % outfile + choice=raw_input('Delete it (y/n)') + if choice[0]=='y': + os.remove(outfile) + else: + 'OK, continuing with old output file ' + + # Iterate over the input file, checking to see if py_comapre has + # already been run on this combination. If so, skip, if not + # run add to command string + + commands=[] + i=0 + # while i0: + + xx=numpy.array(xx) + ave=numpy.average(xx) + med=numpy.median(xx) + min=xx.min() + max=xx.max() + std=xx.std() + + # print variable,len(xx),ave,med,std,min,max + + print '%-30s %5d ave %8.3f med %8.3f std %8.3f min %8.3f max %8.3f' % (variable,len(xx),ave,med,std,min,max) + + variable=line[2] + xx=[] + else: + xx.append(eval(line[4])) + + i=i+1 + + + if len(xx)>0: + xx=numpy.array(xx) + ave=numpy.average(xx) + med=numpy.median(xx) + min=xx.min() + max=xx.max() + std=xx.std() + # print variable,len(xx),ave,med,std,min,max + + print '%-30s %5d ave %8.3f med %8.3f std %8.3f min %8.3f max %8.3f' % (variable,len(xx),ave,med,std,min,max) + + + + + +if __name__ == "__main__": + import sys + if len(sys.argv)>1: + pfs2ls(sys.argv[1],sys.argv[2]) + else: + print 'usage: grid_eval.py pfroot listroot' + diff --git a/py_progs/modules/grid_eval.pyc b/py_progs/modules/grid_eval.pyc new file mode 100644 index 0000000000000000000000000000000000000000..28e837057c81d5352d2e3555b9c8056d030d2298 GIT binary patch literal 22143 zcmd6vTZ|mnncq)!&xPHb3-7~`WUC~K;z$|}FS2AWt+g(sM9LRRs-Z& zLGt^5=TvnMNg2){8-&tS*X7*n`~Khc)Q|qhbbaf0m%iL|;olU$uke@utH`;QbMJAC zT&v=4NA5jN{CUN_S1Hb`?!9VpKIYyVE6&H=d*j9VgnMtowJ161T9i59T0G*;r2B-X zYOckdn)`$<>aNBA2krczYfZUN7{ionP22q$E6@3?-Jfx-L#}n$3eVd45j*GRQP(== z)+%m|0Ux)UhwbJG-E7U-og=Pw(%PZ$yp?>!?jLilNA3P`*E-=^kGa-otY6Okly3) zF_(VEwVrh!R$TUF7mcod`dODouKl?Cm|4xc564{gxQo*1aF<*2{yEDs|8d1doBuqD zTF<$w*SZlcRowEzqTcP_t2kGWAM$Ux*J!5kjkJ^I&8(Nk%guJ$<<6Vke9#_j4bpnO zzP#JbdU-p)ME$jXyS0+uX>{Ut9yelY-)^j>akd)wb_eTOH|}R!gLXH~<92tDc3WvH z9%S`equt_0JXlZTEpGPnL8IGhch}Ag-k_zynLN(6yKysPF1>+<*N6v=Tb(rC zUT-(o{op(8e6SS9_1fzVZuJ>S7@{7iE^{8xkSgEW>QaW&Zet@|WQ3iql-alYIo;o2 zTGl#C(q~w`wAo&5H{;c;Z{yr<57vwI$=h09EyOC72ld)uJEO18)<)OY)}wxw4b)N0 zDp^@IIp}X~#NDlpTWOzBe?8x7bUM5B8gH%N7_c^Z-0P=#+P`DXvpl0M_tUjTzr|a& z`E0K@1~F@%)@$pHUN7x3i)&0a>+fD-KIebo{O8VpuJ&4Etj?XUjR-2Hy(}jL7^OwKD z;jSUt+}+5{-K)5}6}V&IT$=|K@zuSmqnW!^%?1;-_t#GcTYbIUP6t}k5)@VKUD%rJ!g_&h zSiM`j@vt$fXp-j`Fa3Xk!|VNi*1r^w4g%i1o>{wj@xox5JZ!RjM@##EX(5ehH zjkQj8Yf$BcDcHPhal=Fgbsh}+x65HmgK?f}zWD+t&JOu$&dz-u+RM*%vhLcs-tLNC zUw*EY-Z@u7281%0rsST18$3w{x$&83yfRxo8cj#}VXj3e=j^bWWlOEbps96G_cQ$2 z+x;mgyI<4`W_7?#y-i*v=e%bSv+Cxa&@1Ov`zyU@r(#dsbM9t$-i-}-<8_zu#`)J8 za}@7_qu~8W5kgPJ~OU*jlue2Nid7tDX@WazyStLcK}*}=sBUQeOczF;=p5jH-9 zbf_gFE2GY~UQn*frE`hSVKYdis0q zU;g)*{2LCq#Ol@;oVuW^Q&*K_HRQ+gw2)!-AAB$^+b>7pmPGcRHW2x@66mh}b`Syg>I_U1A zZdKeon%Rd{m;DD9slq{3fMlg={4*DE-JaZAo@>-NO5K}syT{ysq0rC-`UkhBndN7g zWzA-J*w4~G=9$g!F3O#{Jz!8eedZ-sV83CR~gkv z17QxDm~R9%TC2p1EhanbX!I@}Y1ud%&iegIbWQP3`RI@?-X*IP+!g%9unlhPsO{=q(c2^|8rQ`+0@cG*9yi@yHqh%5$m-;Sk*K|;%fpFjJDpk&S zy@uv}JDxHLVW$fN3H@%ilHD?$6D~C}GxF*OV{mnG4c>65)KJ0h$Ov#qNS=2rzi1BkRU0H9NdZFU>Ucd?4-5 z&LqmMrYt3^d7by*C7oC=nOD;kJ zc5@pl_X9L51+n4W&W`P-(zi7?;uBb@t=MH*WI~vuX%vrDJZM3q1*^lBy)ia`-hI>4@K}kkCSc^ttG8mE8 zV@72tU(h5v0;0d_pgz>JaFE*OO^6AH5-USw+|8kfsP?4W`H95$l@ER-oesU~Dta9? zO}|r9Cs6MY@zM%DkthdNC=uwr2fgzcU4imw04L_844OOb1eMV*dMKK@QFC*{nn5$E z(Gf~bn=zxx)Z7VLHC=;&gq{nniR#jtei^1giMdLPSFdfh+)WTFOb#8dYNPxY#VBpk z;>w>e1eS*Jp)sN>+L^iZq^Qvoqnp<$Kl+m3LdUOXcZ*~{a35SXP0!}!BYsCqrG(hF@E zwr}SWM>5_@EkGkV702(sn#A$x3oqmzXuJ_7b1Odmg{9}$c)bi*O`Xo``2%$}GI^|2 zW`}=qF7bEz?1l4reENk}oIk>4kiR!})1IBmP1al0%&#wqQ4%{`;A~)ayKr+wMt*ZW zYd6z8c~phW>Qg_`;Zl?S#+57mw6)btO-kNC6R|Fm&rondoajZPa6y^ujPms{QT=9V`h*UV^S&Fq2Xb9c>4OVu{%m|GE`EqP82Na%dHFQoC~5k33? zZJ4lf;}ZzH*|8~LW;`0NP9g9n-2_)MFC`$4L<>AQ9381(c8*VlyY;A!K=dW5(Ib>T zfk^E zGsN|BY188Uw*UZUig2$cP`L6z6a`z>TcyBPt*|)l9Lz0D#V>la6H0jV?`ePIAUCGW zhCR*=>_L!W8goc8ADi&^qGf*`zx4lD9++$z_vdfe)`^>9IGLk!ik(P$fCW!P^4@Cr}J` z1}rF?5Gb{!w=S3>UTWhWNgm^Y0fgzwZ@%Rb8O(YTfdpHrUG5r-&+-zV{xJ@tFu`@Bfx0?2^qS$!Cs{K#e%dc>72li^$ zx|#wAW&n>Gy7rWSq%svv0Siw?^Od<0E=~(BfRn=&TR_uj)P)ws5aXY40$<8Gh00QO zJ3o|n!mH6}I-+g~?cYS)@qEn6j=P;##qoQT?X&O{n$Q?x-LwFawS>92ORQ%Y!Iiu( zn=i=ULL{qHhVW-m**qtdk+%u=i~OUZ6-HvM;Et8&1~;l&ss_bffh|!>{zn|@wKs4q zhRBW&rFh*LBNu0Y$NBJ>*SRbC)$r>5VoW58_(XTDUb8?4)$PubO!jsQyRW^vE4f`f zkh!0?H+qS6f;O~=H-n&>Eafd)DZ)gwV3M%VB)pPc zI7Z-CQwoe#Y|=wfN;Igqn_OZI7W9ri)#|Jmtvxf^OkPoeFX`}Q4kqdDEO7RJ?828c z_maDSh84f)o=+|!k@8p#*CwD;{GiaL7iRV7ICMNKo3Da}CkEd`noCsOLz<83#Xmrr zRUGyImq`;*#QJ`WjyFPo+!RB2c?J1F$2;#9Y*1>quTf_&F`t~5x(i>(tr|pujW_<9c%x(n)OMIbzE7B8(mU}!oe9L&`M+n~d{8QAT!fGC-)#U^kUavScv0x6 zpn4Oh-5TOTHZC-4?-Dc9`?&(Q1P!*VDEE>4fS0gFB{ATFZWga?VSEzjm875>8OWs* ztC?-wYIj3q(y$+gV2FP1_V5?UpVxq|;3Y=uBfr~bH3yp;c?KtSv+mj6`fjco^;(!9 ze7hyLos{m420=|+F+>$n!--5Z@n4B$y)ByGCa{Q#t{^0HRGHDa6!2hyTLLFIzJj0Y zL8Dl4XS^#Qh>w<71a~ydx)@MKB340_Vj_E>VF9641u;66cfrUFI+UM>HvJhS(8Gh@&5f@Wl=mRFNq9t;oFN=%41n znMbmS8ztQhyl6hW<-KTSAoIT&4td#-lTy+gteDei=!25; zdo&>+h~dCCCa%RR0fcg5m;@1a31q9W(NKgjx4-SpUOBDJ73DiCyj;E|So%%;Z-gD> z!^#1re6?+2UA=)s**3M|)>hl+DhLf$Gg4L55847z){P#%Ebqj!cm}RL-<2VT`RIID z6+c)TXybXh)58Tv%SiZ6d!tP8 z)Ch$Z$`&kP#vIRd;gdl?VsqG=CPK;tn6G>jxe7p)2B4*wt&|KOdI=#L9E#mmwz?Xp zN+(d1;!T1z0#rG#aaxe^(jkGsk2fdqLu=b0Za2lI&(Win3Sbf(dAEZYJy-%@nUW5K znYNM$cK>hf?B&P)_&>h*$jcV=9m3cKp>9*MR~xr-@A_71N-Oz1^}Hca8u|Xs8^D?4 zV6f3!F}ky>Zn_<=1T(hEY0C_K24zNpbhH(t4bzKEr6&n#&y0w`rFb* z_TchMhB5*3#}pnt3$}ovEs!NG9;5uGM_aorz!zj8;w?P$7&GdrR|1aa znEy5hB3|a35B%??rowu1B#DCkW0Ab+Fy}Bc{UMX24`Z}-POX{J3HX3KlxtGuHs>GK$c*2BqgGKp@ z?y3ImeUaiZRX0~$AjPmuzb|Thnul((phnT6r#ye0_j-DTIE;5WY322InZH~%wwIC; zU}cmAag9($jLSCDu=5{s2(KzQ`2u3<6_v|d=uE^-P*}Yqbr@&~gJw-fl+_?ELhL~% z9q&xqsmCe{t(I+e{u<*Bis9`&#j|8rj&|gN&K!>q>ICxUG9;E?PCsVmpvT%7#y6(x5N3wH`ksm~c(8FiQ!mDABnrq65T2D*yMktodd>W0@V9S9(s4D0Y{c?K z%XxeOlZH;odQE#BCDO_QqC`0mi^l27_Y#~8<>Rv1FI^~`;NgY|?^{al?8;af;z|Al z^9=&_tq}gEzthC|q}lj&Xc_yNVDOa;Htl6 zO+nse=c0dg?gi-GLV%X;fpy5(1}2H|&weQ`ZhWxlpKxDEi$j)r7_%g|M7aXv9qS`m z;nZuJ2RO?*Er0tJF02@Ln5dny2%PSVU!*;IetF;}O`v1v5)+DD7x@+BP*lgw$9B~C zsJO2Z3NM`$2ibpXzjXGsLksWx=U+65BBn1{=}urJGSpzGLZXOfQ3&5J=(&_D*E};J zETs3LLrPW<_K_=C3oHT^PYvJ@XL_ zk+x{T@T$1+fTR}{;Rc0kFm){;9zr*`<1NAt3@i>s6K1avfF3;2*#POQk%PPi5e*WDUJ zCeBSf=$azX*N9Tt8S8>9TV7D$AwOii=@Z6R%mx{H?@%jou=!-XAayM1t;pyNJ10EP zHjr)@opPvQzM9cF+-u?OMsxg`OgdAr+nHF7yWos&df5hl?8!O7+>;~Rd+hRji{x*Q z6QO_e?s-lQ8OJ2T!DC)!8%`nDW|KnS+t>naG~V^Jd7I(psR|BKDbSXz)Xj`Z&2HPp zQf8f8u8{B>4ZQ3&zg7AD{my`1zrBGXxHi`v|M8Fi?ytSk{yxcEX3cePk!q7Gpq!*R zcxGAmIfk~)5g@tM&u(iAgqkMPCtufShMxB19aT*@Sd7kGYo_uQOK73vq)P#lq&azp z-4~V`t4gRFP>J#SnmtL<3*C;7n6l`4Mrkh64 zjupZdbCMV{5oJ{TT6CaNt9e0OJeM(QvFoa0)iXHpj#P+X6T>zKo?b$!kdmo4y7s@bkfI$V}a`6+vQ;A>>Knb#srfY8J zZ-`-eqdcapc=)?y3aX4)WeX-QU%;b!8bYBVBqoDRFH`K}BP4a+PHZp+Kr5H#@>+yp3>%~zBE z2qL);N5~05&lsx6J|URxPs6lT130(Dx=5L`Q#(63~xTV;D0XqpXc|br${ksk-6JV?+9NM zYj6i@)hRMu#>Y-p$#(%Q2oO}HggjY!wsHie{;A57Ifi?0uX@CIC=@ZJt6694u4Zz z;8q3bR^e%GQbyWLxcQDLFT5)`)kms`6~kr0E+cirQ#BQyvdQNJ@DUj*jFjBdHD0ry z(RDGf2OHN&in`&cE+5vl0g{>JXT+ps?hdNeve}5a$S1ICxew1WwGfx&S{u)7<5~{+ zA%33{Y>3yT%XU0q5n=AvP| z$Fgks;aE4ux$b?&-{$Est1NjzmzFUm!ZF*GF{YNo6qLg-7V zGa2MMGr6xjMlu)V+WjSKCb1t{-V_XFcbQ<{`LCAU#pKG&**|13)FhirIjLv~IwO}9 zIqP$5O%^{9x@2m8a0pLY@xl`xMkOFV$F)}a9{Xeos5nLw zma$q>#%h_nT5tasL`i;;r*HQ&g{%<$-nDM2t(v#o;}`78((CN{qOPxd$@~>6d!cM8 ztcEkCP)=5PYCEZtH&pIBIt+#K7j^lP4knLfT?9uwv-d$O^Um+RV$XK+bya$W!$2!) zNd_xsX&JI9)Kz%pEQ{9L8@|N8vCJF}V39!cp9;%fqiZ)YRhg>Rh~O)2b(*L^&5&)5 zoU>=~(al!zK#V<6qFudm6oGye8m)duR6Np|HQYbgxouF{dROcCy- zGzYk1Lpu7c{x7M5;eTcvjq952L1qcKFd_xVUCLTVS6(z;9mg>FbTK9Q8REW zMg|G^xDMHlsnma-f=#M|SHX-BRVhn>Oe2*Ur*;tfgdA{-&6Mni^i5=JB8K<4U{GDU z5_H;yMmQ{Nj>(LC0~{E%PGQVRV24r2zhLS6meJ}RBdTZxg`k_CCo<3P8a5G(e^8q+ zcmBKZhVT*aLmA=rzhj=vY>M5UZ0Mw{hc-YCK+!@h6%K#EL8!|%!5P;E3Vkhgr5k?j zyWe4~pqu$J*pUEs`71s;apK+~;dfYvSq&h&OylLPLw4&tEgUXdP(w$6Lw;yMKS%j7 zake@^?*CzP$EXR0eOUF)>^j22PlXg(hxC%E7_7wQ1))GLagI)sYrYcx1c9 z9u>Bc@l}K1L<~NPB2%Bba#|bkn0r9{APuApCz-F~dh*LE1-@v5n?c$V8b>a5<_6yW zp5N0LoAP2+eF7Bt(`fnqk6DwvB*3+wbvpU0pIT4hbE~@)U&Rs;aNbI>j<9d~K7k?A zCP$?_<)=a`jHHLkW<$3TG&;UtYbZA#$`#_CL`?ADF6^G`K4VyI!Ny(7%eB*nA^Pcj zNkOued?WLC`wMi#2LGV4$7eS{&|w)Z*4Yg}^uAk}9-Q`G98=}IGsSTAF!A*V}dt3B|hzWMPRcJ>?FEA1}Rv+q7ZVZ9_Oa z?X8-I_#Kr$QN>1Q^Y9qwCw@4z-s5Nol)%k&Z5(2o*?6A1z6 zSSXI9DbFt2cMytNwl85{$SwH*XczBd0)oun=AKUTY$X-eDiDq|!bcx&yDyh7ZYA?aWydOA8U7xI`*vY>*d<|8gq@0a<@-+u^>o3@FJ z{}}MWhJu&(iQ|Ugf@bh-4~|>jl;OC*tiW-=v^W){1CXGquU%FEHAWzv+kc{vZeC}Q z`conOH4o_$gA5GC6FfG&ZX*gz*VGpIuzmu5^iAe9>vsO7wt1r^pq2;V*G31Hdlulw zaYflf?k*okQtz|(0sr2PLM_AEva{~DfbFscWP@$ZIy?gShR)h|DRk$5`Vz7a&p>rV zdgN9o0rn%Kz<$I7JHkZ3KI=BOQD2b+SCQcl1NR$H*$~?mxRs+@xGq3%;KZ?%%EBj} z#h6$4ghO1ItZqJN#3l&kk@}pc(nD=kl!IlvA^7AFu4_Y2`?60F3HGT14e7ura;pW? zSwu>^Bkj9K%K0KyP2n_a!BVl5+*u?Vpu72R`;>P=8kaVP#%oJOMZc-cz6E1@tr#8q z%_NO%P(!D>?lFe9x`Yi(&q7njrDa|%i_e9*Sjy>h+HX%w!92zVp31y0#KqD`Go;wE zpiFjeeX_+Q>S%+Mu+;&3+tr3YZ}iysjC>7=H(vY(2|IjSsw#oP_X2Dx!|w)!dJ@u> zz^@tkt+yB-Wva#^-&6|UJ__rqaDRbLtkZpy(o(3ti3{FJ+KJ7MA-1^t5#Kr4kHnYx zz7&=szrcn1ETn#+F8pknFJ0wfwfe^vlM$k?hnPiotczBYYv+r>rIt<0~#eeLAsYbyGEdaVSct6ko-9f@Xzb; zT^;^{4u4UHp)Fg3#%02mjG9JmJmW-XkW#=G9<=!xr#Q1&gS>~ z*{(i>sth-TJk|X6K!Bc7eixs)YW;U(g5k!;UWSI7Rg>e0{r8q;i~uHJB+-U57lDs6 zm#rT-bFq8OI+IN^i8Ggm@rNQ8KlW+`)|a<$yqi`Y75`b8ADbM+z$*3%{x&)St(k>H z7joU~a%;+L47*F;y2KLlm-wZ)G^Y+yQ8ppo9jqC8wuaisKF-bTY9q`zH;W8;SN4P% z>D^3tZ7}R41j84_@StIxm9yR?$=&j*=;Npx95b&on;7ZYL^7T=?I0wt>buy&W&8gh z%w*_Y`U(WahgLkU8sv_|QG~$y8iwtDvNS5)(Wgb~HS;u?q#WW44ki)k>!C__?NV&K zyrs_+k~(`@+6SDmFZQ{FH&_nv$DXs7#Cn*u&~zgQMcq zA+6<*w@{*^q(19Ewme2tV+)l!7RsD`EpFs~)s}f>MW63jSuuNfD`$Q9R$lShO1@)* zoHkuZdYw)dVg_N$xw6vAnky@Q&31Dye6*m62I}(w{-z3Rk^D!3R>GEl%XJH1NW?I0 zV*T0HCm-CCMQdNVNTe$yGWQd4OY)WupVQ%e9loW*i#o`+=!1Y34*a$*e@TZwqr+d- z;jioPcQ}MuTTc7RFrU8BUmMxrXYcFh|4^R=C|*K?+v=oWl96r>LECcb-vMudw=_OG zJN4PAo3-P!U#Pt>_4w3t$1fk5uT9N9SzDaFGW+t8x!Frcl9R2eE7R0E5j|e{-{t2S AqW}N^ literal 0 HcmV?d00001 diff --git a/py_progs/modules/history.txt b/py_progs/modules/history.txt new file mode 100644 index 000000000..b459aa7e3 --- /dev/null +++ b/py_progs/modules/history.txt @@ -0,0 +1,2 @@ +360 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +376 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/modules/oldcarlo.py b/py_progs/modules/oldcarlo.py new file mode 100755 index 000000000..b486ec47a --- /dev/null +++ b/py_progs/modules/oldcarlo.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: carlo is a package of python routines intended to + aid in the interpretation of fitting our python generated + models + +History: + +090116 ksl Coding begun + +''' + +import sys +import glob + + + + +def get_filenames(dirname='.',descriptor='*.pf'): + ''' + get_filename(dirname,descriptor) locates and returns all + the filenames of the type specified by descriptor + ''' + searchlist=dirname+'/'+descriptor + names=glob.glob(searchlist) + return names + +def read_pf(filename='test'): + ''' + read and parse a parameter file. Note that + this routine can handle the extension or not, + but it will always try to read the .pf file + ''' + + # Check whether .pf has been added + try: + n=filename.rindex('.') + name=filename[0:n]+'.pf' + except ValueError: + name=filename+'.pf' + + x=[] + + + f=open(name,'r') + lines=f.readlines() + f.close() + i=0 + while i1: + q=q.split() + words=q[0].split('(') + try: + value=eval(q[1]) + except NameError: + value=q[1] + x=x+[[words[0],value]] + i=i+1 + return x + +def make_table(filelist): + ''' + Make the man table + ''' + table=[] + i=0 + while i2: + unique=unique+[v] + + i=i+1 + + return unique + + + + + + + + + diff --git a/py_progs/modules/oldcarlo.pyc b/py_progs/modules/oldcarlo.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ec0b0d46956c4759dc8f82ecac07198e5be1060 GIT binary patch literal 2628 zcmbVO&2Aev5FW0iwRY=N37o_++M>+QK@CzlIkZ57qD_+)O%8PdIf;W@g!L{h(_Zh& zBxOs0d`fP8ir#xD&{ybt^d0&F?KdOYPJkTR2-q<>oZ$>V&NuWQe_u$yefHavoEE

>AO#kuxC+7WVMmu>meaU60-A zE<;lpmjzR#$w6J1((5#RY<;NR^nRM&{p#+$dtd5(U+PD7!LHk8IIhyv{)68}P&jGN zHz9BLMmu?g0Z;hvBYgfk#7yvAohe#9i6{_R=puTh=%hij20&wTKY~b;p$UT>Tbe36 zFx|pB{(GkYT+WV=(`UM@b7TudszT#vV^?8ZmO4%N$fvHJPs@rh1|rbB>${e**0TXr{Lq zUEqnLWjvLD9TBj;j@o6sx2jL5iF59yR9_;6AK%A(t%^v!7!uz@fD`JyNv|S0Y0|7o zwn4A3)RHmuL<$vt64T^Qn#F{3&srRGkEs5g6eiHF*;u@mXtu|LHQG!-M=y+Xx~jvSG}#^pZG%3xDAcSx&Zb@mHw9l&!idUV zppV2!lRnbnJ4I#<2rNjMI*~W66f29aG@HQ1;w<<-k;;6Ym1FaRbG4J&L6@n37fcYS zn$F(cwnIOd2ybpDlp?s(TfWy%DAgJ8{X|5-vKRyP{aHho+ z>r!Y?fJl*$@36y#rqJRzjK2zzCO>8S^Fld5-GpqrG-)E&Emteeuzv}beGMUwV8I;l zvxXyX{g2rI-~a78+(QnK#Xz=sh?&30+ce_^TFE&+4D%U2Js|cLJ|C$we9(fJq>NER zDa=4Qwr$enJ8tuDq4@b6#RiBg4Tif1cME(1B03PBTL!T~hhH#=Xh`UBXhNr^2nQuc z1;s&XSi^Yo{4^F?);ybs@Ik-ArJ*;;<9>}j5nzp5(-m1>C?t4Hi!O4Sz^_Q)+`l31 z3%wKwwQk^^A&X|>O_*Yyu*V* zQRjn!v@1XLeLiMi&ZK#Clf`X_^IT>0pI>3$hV$3>?`K?^Z#o$JWr#RhR?DqUvV0?1 F{ufQ_EBOEb literal 0 HcmV?d00001 diff --git a/py_progs/plot_roche b/py_progs/plot_roche new file mode 100755 index 0000000000000000000000000000000000000000..a4d44883a325706b5e87a0a727b2c4477ccc649b GIT binary patch literal 71812 zcmeFa3wTu3)jxbr0EtMOL{YJ#9W~TMk(&qzqCqnXN)Qw@C@|zQfkoZ-b|V8{HabEY~uTY)#+Hc)H{ zT}=B0b}TK57X|c@NbmBanY}sH20;nxT)MKNG)U>mV>Dz)NA~D1mE`BguhF@5Gm;r!`FgISP&5i*-SZ*8HH-PM~i4aJA~HE@m* z|M0xR6Fu)RB+X(v{;q@3_}Kw`0cdh1wePRIzkA-~KC-@wv|;!#c8scv)sCttFCL}c z=UAjshC|-o*IE4RRj0Q9`qNK8zGcpH)Qd7u-b{SH>>p!5Uw^E796qdzdi#DgzXN$7 z)1@n8@o449b4Nn9@?s^gTSiHfT4r%cNhCIMj41-12mcOQ;GhK#THv4s4qD)#1rA!^ zpal+E;GhK#THv4s{{LWstGvc{5_`K7`!bsr^lzM>?IjD+8)szqPdx8$|6`i}b0npA za8bK|ZsR+bUv_C?--xEV!A%P?o5JahXQX45-*{YqeBV77Urk?ac&YK_x~wO;E7g^C z)~I;DbG!PT+qg61@wBzgb?-LrYWxZ}C%XD2n)^3pHoRK*VRA+PyFBa}G7I5vj8?qdj+m6$4HcoE>MaNr0wpWw2kZd)`n!1lPtn!6-dWOkONhW`A-!^1;@j)4npMN0Z z@rw`S?r3PPJ0h9buBEC&jh&O>C5C-}>}obPtU%eujd6UpHq_u-vuASCGfZwuGPzIo z@nXYkknpMiVdKUn_-<_|#kc0g~T;-@J~>cwF>8D-=IWL%8EGRYR*+SzYQS z6IrYWCg1WknEYy$ry675C(3}2BPY3$XUPVBKY0LujSY)XuNdf)re}!Xf2eWChi%i6 z{nJ{#ku_y7ieYdxHfi)3TP87AS2>!DMM72K3|(PZD&$$Rf#15q`A&tzDHYaMmz1^U z^j*dUaK=7 zcQW74$ecF9u)#^*i1#z*Z4VN%^2V8yruxnBBJ{}POiD8EEX8@9<~-lwoUHFgcT@Q{ z==`%%^1VY%{_Q${n3LaBe~+r}tf0C@irqb${I5%0EtjawCv;{TGP_3FvNzwg&hwyP z+WQ$bFSU8EgBoS7mmDeYUe_OD*mSD}UBW|S1)eO(j& zy)qz7*5}zKIdqlkPK{vHWqly&nlVMP)Ex2bNKY$e`THP_P}@sfE%ROSgf^C%~i zHXmX*(Laau^v_`?H<>p>@foA}{IWa{Lbsi1j-E`=tg0u0ZXNwLnfM%1@oI;9+9JeJ zrxk-N$IZxCZJ32Y3eyi*VyE?n ztcH(1!=RFQ-AVC4mrT6nq@+tqr<0P2l-BUmWY=|U)7+<%iT8rswXX@&@Y4sp#5GS3 zy7mvC1fkb8K`1|VDL13~rts6PYa8M~9k^hl&ZgmvWs;W5^Q{e|kw{awHjL0Ham_X_ zCN$A(N7<--Q&_qYJb}ib~xQ^t;p&?Y2atE-@;l#FkzqI&6s-bcs(( zP={Du)qOyxzk~E9NpEPr_ArGKAEjSALP5?h(=D^FVE)R<$b5t#GtYc13)5F^(vxAX z?d|;Q(;=)DVmffP*p@V-BF?r zn+7KQTF^+z#7&yw&BdxWJg(1wj`L*0IFu-B^{O;fOkdL^`9+?G2^wk6T3I(8u6>QN z!;L7Lsz4fbr}G#EF4UygaFW$afj+BUpo{!sQIBdHb;i)XtEHEkYM;=ghxA!39agFM z3r+WXsMsWqocPFRZ~s_lJXi*E<(jNCW_|5irTtCJLR>jhpRd8WnI6w$T0874O+ncU~}m^CfXoafC$O>x6ptrBLSVB^MV_-<{;$G4t(Gr8#* zCO0LS+&Ay9B@?BZ_ooQ5#+N(4%2iOM&iNy9g4oQt$*#@@>D(q>Gp)Td4`~=23U(zE zexpDPKb#jWY{T(65TVO7g7uy|D-fyvE$L1nT?gSw+Wtjc?-SAuinKu$nb)Asvl`-G zrnVAcvFXdy_QF@F!)9HZDl)G@oo6+ymbh$3@A`C%_0YXxj-)##YbaH6>0?&I{Ju-d z`hcYwa*iG$mQB)v$;8#)@n~awF5k{Nv|W?bxOc9$LsCiDv#g|wl&t5NL7ul~!46nH zj4zo~+Ps@j6&Z~DNy-hvjg(PnhvIuib|${(WTz(+-=rf!i>B~z$oiqdn+EC@JyiS2 z`x%9lKisacfG(8s(rEnM4QxiIq5^H}U- zd!#={1g!HPgbc|^KemOHMFhuJ9?#TMhgD|ntN1&ld`2(%7Z;q%p}#wdUYUF9;UV? zd8L!QC`eutB+Du-$VsuPICY|>|CPp{OT|&I?AU!M{rRzU`ZJn+oigW>%fu^?!nLf; zl?8?h&0MnD^l4}{dm?ScehES>T*+X&W~YkUs2=XdQpVPVP>~J^!rkc4=>H`j67tRF+UPdQEGdg*=6mH+R+reFB51A<4{hPO|b4 zpG<+BN(t#iLxW_OPmW23LV3tl-It$;#rf%K&4)D&E} z!YSrwW08-6VKBaBui}Ljm~+W|`lbsw=yW@kh#RFCF_6vHBl*f-=F3zgV31Xx<1_%v zss?$_%2bHmnAaWeQ8=X$X>CIyrZ*>IdQ+f>=}mGE)0?8=J?7-UYkF~dD2#4Z*cK>j z8tr4N+`lt;=={D7J~Y*6Vqn#u%Ve)XnSReE<-@iidOMBG{u~K6_28^a^pJRtxXAp# zMV_%PQWd7e?G8&l!NLsj{fzl~d(B9cRX;jalXX4LbzwTe3yu>g+{+0Ji8z5d5hpMO zdN_ee?%@Qcs5pT+Np*q^Jp|p<(~o-?(lpVW>|wT#%?J$mI<`wW_qyZ?TTLWnWo zo=p=|EmY5Q(>0I5jxCEFi(-20Db-`ontl5*1nS{uK|gMhufY5d^StzAxL!^7hUEtz~^@) z6VKs>OQhg4kCW5|^+{n31{lP?1NJHt5e9Rdb898SmLE%6s)bZ?P73XhK-+Z&3AGwY zZHKui4cQn8RV&Tm6^AFWF+g)a>vJ?8FD5}@-AS&{TDc=5a=)16*-CXV9e1wN4pJyk zPShPkIhA}WFxO%sOL0a)94Aki;aAx6aS|nxzpCZ`%##9PDv9zN5i|DOIZZXBNqmV5 zj5}wgCZ-P*rliSCssgYNJUVluqD1Qr+2aI;f9e|7s~WYLS!qZrEmZuS^x0DHqF(9A zLzF(Ip;SpzyQ1$|`|;X9Uq$W7@OsC4uRhKyBDO>(WV+&bm3jvhD!2t-bJzFf22(ZL zCl1`!gYDN8TcZw*t~h&Nj`KXtc>y@1dehp{qFvq|Ij(78$L=-5TqVM^Lr3)Q4oB5r zf*LEuWa5Vi7GN4i3|2jRgY@jkXSb#H?772)Zf-lR(7_Tw?9+chkiscGs!w+$!@E?6 zzF)CMj_S~ns?YDx>(8S+m_%H!*f||~NY|mQVJ@Y-uEPN^lk|cV56ja;OP}HGTBy(( zrddEle$$4kV;%yEjIm+NjAB}Rs2|?7d_d<%=pjKW2B$DqtJplzEYdZLkm}F#+H^Xv z-J^=U9L2g28z+U$EZE+oVEX42#JZa@ab|G&r?fq|ty59np6e(-PtWevxXDUj^KGy> z^vVo(h`GT|S_qb>T%rVgx%LDEhj4e|nr?3;Lf_rC?Xnt1qjPnR#JVflkPqni$`xNz zF0xHH<4U^ZgInIQw3QW4W@)HQ@)?|P4P%r!PbL-{wP1pgJCJuoQ+PjR6TUBONrv|y z=w11qV^rldCVP&p{CPPJITm zz6B}ro19end)CS;yr!c#HPak{7$k!D6yt5IY};{cNhbd4h@tG7oaMucFmYpMQg%F5 zQ|=K$c93u5hf}byv37&b9M9xV8b2 z@ZrwxLfM23w__cu1*B~Pnw-}`htVZ7$+`kHOe@VtZ|O7dEeuPdIs%B$=pAIelPu%N zbCBcb$WLiSuKbV=4^T^PXwJ2|sU)y78wZ3=MOk8yz%1i2>0^XRxMpcvl@?#ZIrV8U z1o+~U)xa5H=Nj|~#}8BNplk(2Fp!~;Oe}~BWgmeTDp$! z%19;*9r>~BTzqA1Wd0tJWlamar=2Rz>A)E_moNT@>Zsv1_R{cgl8KzZn{inA>MbQk zDK&ebumv5s7^Blgur!KbQmjf)u24p1xYz5r1cAjcHKoo-X_XYpO5J6~u~4X`ag-IB z_k^1hEpvK_y@^61z64@ly+2j#J;kYFv%w3xaYU1?>kpN_8D!|z6xOL z(Inql6z~ZJ$u9dGM{K=NyjPXd{nHvkmYZs07WYgh6NU_;%T%Qi&ZqX_4jsoH34hcT zfz!xv$MWO5aJ?`v1b5P;eLLUBb=0n7w9_eOS%qq-JM%*J)_c)xXcmye&Gp5qaNC}6 zo9l;h-F-4)Rdn$8jPJ1?w0y+)p1$(qlBmrRTg2?@>oTQS`gBMY=9PU6D^pZ^(;TwlFkf9*9vYY=GvJ3HV`tHS7*9*Xm5xK3 z84JOK8OSmV+Jqlx6u9RXqmZsTIgJMCqXh06lfE6deLGv*^l4g?zTPdqE|X>S7WTbc zKEyTRaONHnR;P_Xe{2d5*)ufJlHH3}&FAylkIveY*KNIdt=V@A0;Lx11jP>eVnrl# zD%Do9AWAgTTFg)g7FKH;D3fTWQB@w1$-{z42OX`=iD)WJkJdhcN`;fA&I)gH8N+&7 z05aHNYhbG~CZa+LBd2;1C%7Gn5?Nu)C(txJ-G(yx*`o=Y1?CX$5EvqC6DT&{C6F>n z7{M}2O)-v|t32%==PRDwpbKx^6W+R}h32#EGEN(E*Spfj-~*e8qb`NDxN zh_*Y?l5eeIu0)?`Dr1W|&YaSA6kO$zO4b%^$W@vw)qJ(_MvV|c&jgeuUo^9q6nE!^G|M&FQC zmhN>fkxs(6PdY0(VuWayN~#ssq&Twz4zU87#@M*e=|WB{Qsahe=AgA4D_JrtlI~Hx z+SQ?SB??StB%&SGmgy{#(iam*B5c zXd9&b*GJlBiXH(}lJ8c@+FYhDh$~1#Lm~#crtm$9mSBRAubbxkoyHbu9>=9qM`0(p zA_Q}5a(1(rE}7VZ(TcX>RIwe4x3sRw(rBnV^UKB1!kNl^hvZR8k%24Uc2>|Kyi(H; zE=(8Q!SDf^pcB}2fbD6@gHuY7gKhD7vQSLvJH3slFM^pco-&as>|nF+qmjGDG|k=D z6yArMK>Ha@vhrVRb5cbR$dv!uwq$r8Z_3@5cI`{aM1i&=v*-kEZ1P9Ywzxm}q~6)v zn0!MSns8%0EwUyX&b${qJ0^X{NrlDwS_!e>g z`?++I{bZxaXMYd6CYBe_75?HaAFS=xxgEyC&H0+wQ-As&Yw%4e`ajYj4@Hdz??4{a zXwZAc3z#qN1IT}&O=b~lY*ZfhC7M#&s^cH*&zn_8=T^Hh%{!Qf8}})-b)u@Kg3QJ? zzu9ktH=&mP=}zW0H`CuC&Wu1U&L@Iy?nxlAAn>?bp(#DKDSV4Nt>jM$Gj(XFe~0$y zCRNw+rf|31+1zh#CT3~a$JG9irmv55U8pGfahDVwe{OeE!TzSYbftlhj+#06MQn&l z&(O}KCYw$WAYUm(kI=GQ`%^2&wGG-MR`+p>=Sy#!5sgz5=%xpiJQc;T z{h|h$JjOR<^T+`vZ=ycOQO-x}a~$P7PoLu`=a_v+c^u_Dq|b4b^BjGSV|vr9X*g@- zH}EXM_y#T%jBnr>g7FPJUogIb7YW8U@EpN&v;l&NqnT^J{1(;6YO9-*BhIxcOu9PA zbxTf;I1@y=vCTA-ACmYMk}g;I>dsj;g%@l0V@zQ$5Ot<0TW98ldK872QZ!T2N3I$X6g@>3 z&Cw(|LUPzD@)mEkm3W9#i58>Kntkkmx+7P#W1ZK)D{_qB;KX5gwYpDP?uSk$R?e^! zqV3Dmy3T@zI;Rm69Sj}#sJpiH{nPrc?Vh>3YdbIq&6tNT_7H4R7^aGVTvK-Bo0-o` z0yxU9yCV3)t^PJJpDT=6GYhI??`y@N47m5aI%zH>%n>H4L!)*uo>xHbhHJPvRcLjs z8+#&||D7v{yhdSJbIWC3PrjJnb4IN%ZMVaE_yIX;(K~zTgiwgP8Mmcj0woue&8_W5 zSZpXd&AKBtfnu`x@WZj7QLTDPGrIvB?%;*W6({poYBynugTnY=a@+N1b^UtA3tK4$ zc1UsMF+(8o)!iBT61R}3yNiMwHt3jkEo)XcFYS@|*C@MMjbU8edKP=Jrp{fmFc{i2 zR~AlOik0l+)NBiD#aAJ}WKD#4ZE4OC8WFNtYz*oGoTl7Az(oue?`Hcnldv7kQtuxa zi+&6vi$%~|xg(kX0xXA3IbQepo02sh2?g8sgtrB2mXta7-rYLNZI&o^Pt)8Xs+AeY z*fpuy&~7%+>(~WECHTla7()`xLrI{QSI1bwhXA2gXVa;~F8F5~6yaqp`GL)))D^VlD_#)F3@6E262jO%&DvhxmTk(#p$ zE5GxTi6bCCnA6?`Z7R$yq+lUEK}9-(YY42>fmbt~3brplv+LBRxuL{!NWaJmm4)jm znQ6LQYxouPy91rGAqX%e@jAl_WApt$=b6CVH|)^zUo_1$zg|*eLGOwQV=x-eX93wD z6zNbQ6XZggN;Ok#O5a259m}VGX|cZtd5t}KvALk@EYXs~wKAEktG6#7X3u*V4EJ+9 ztgX;>E&xr?b!I@V*s=MyFF!_|^ybitg0Py$y~tI5p+-60cDB1_s_w~PzCda zyg4kZpqb(F`)UsyEs9-w1U~l)=9+zLA+#3p*SjF%+`;P3F*gVtA(di5sC)e`j@Z>w zDfVG9(LapCZq?&5W=^7IGTaR5GwBN5s9!6>8o=RL!~_xmR>2DBfx(58@a8??&1+gH zor=zvUAksp^C4E&lPN1YZbOaQ%4%$g3mDSautdPn#)b+3!|)sn0ini*QUJ&zg!o^Fh8T=Tc|skIQbV?_{xKA$$XpYI`a#flZoncO=sk!kaNDQxtmGU4Aegx zEqI_!5BS)V3{tj|W(x;FAdGU!#30 zqrbGAkqB(jM1>+qct!>$1DUR=`yX)2CEG<)6{>wgFrz`5 zyfef5uYJ~>B!_52HD;0=+KP1ZWCYv+F$>yU)p#$eE2_zJ3;;e^b2&1*^AaZv&G-#l z599D=X|a3o>u5$+iF)affuHbZG#1P?A6}gEGM+pFD*)j`2bL?4GV#K%a#^i*X7qa^BFFSR@>>*g<85u1$Hn$@klT&!S1_Gn}HX(l0EL{TgmSD=MD z=|+}4Ny$N9h$)qmESA#t*v9$v&fM*dJ0^!8 z%}5Rv!@w4*Q*D5el7q1sgsz^M+ji#mYmPQ%>sCr-!Ul6Ub=hRmjds~2wp4@r+)YS9 zD~1%`!Z7%1dv9Z-Y-6LW-+*Yw=z>^_c-x5 zAaHFHGe*MS(B9)2G^BA3bRD3#_u7G8%l&o607?hlE z^8#Hq;fH+Z1k;vg__d6OsmT}-=HOcI$mgKlxm1ZJGZt3M9HjK9TQq#;n2{zk$=_?>7cI6u)D8f3l76=i((Zs>1@%3Nd8|@1#vyx{}bo{f`Sd!)tBR5S+`-(YtS&??8?%7Fa%JJ`mS?QIiOQX z7uGETTOo*C-UeE^(bbfe`(1^Bk;?|+ZFtfP?0`!H&+v#@GH>VXI-yrRyi0iw{5wm2 z3)XcH1lE!B)t4o5Myc<;?4#yhcn&RgXUi-@-vzZyt}yIklLJ#@Y;s_{3}MQGF=raa zGdn$cdk`m093vUKR!?NS9O-3Te=o%a*L7weQ!1iHq>>JJS?B_A`3LD;&v;*PB>pUIbSfhxL zpWseGBP5OxG+R@5wKauz1QR}clIZ9mlO|HKLO*kE>1-^3d~ZWX9b;r0P!VSbOm{$L z28;F9dg{hZxQ+yoy=Yt4Cg6#^B&-Nb#o4eoCK-ycwxE?trjsZlQOgkN2C+m&KUeNI zPzPp+nkxjb)Pn=rQ@OfC=>buntp$;OjTUR8Hl`MMSD*-8Ej^jICGZwh#=9ttwZ&7c zP)>cW7UCVI%ziBs_=MRcRSoZe+ln;hPek>ovf5GRa@QQ-N3~OTpP>SQpFp1cu z7Ep$&r+Z?kGj53Zu5Wo$&tSAgRO2CPgkR|@P9~gwre-P~VxrC%q7t^n#7^*BDy>g+ z--pOMOd6d4&d;lBwglHYuN=T{k6!VvdmObhO!b_0S7Ix`y(QX2yiZ?X#6zq@#6zrW z!H*X?v6LXVt7|xZx!5nfYv)I@?W?Yt>aKxx4EOtXV-pxeO>=jtl?NVfb=}KdPyrdc zy54CD?{eG!H}=E^G#DD4mpkH#L1Rt7HaGg<)~87$)D-x_VZl?R?rx#b0cRLQZwj=N zRW}5(6;WJ9LAHEw%a6)8p+MRlr4&a=Wsjf}pz9QhM|3kqeJM|w&$|j0A4YYpkj!-0 zymHfz;sN&ac@L3dFT}{#K2wNXz1D;9{3*U6e5a;=utr{uG#k}no6&a z#)(a^SHA%s&=|f20|gxK!DM3UXdB-7qsnw|#poarLsodh@~`(us5@cR*GU;a1m8ZN z_`Bg0)e0^6EK-K?zP7@XlEp>WY2>m2r|^fdtPGD*NW5pIrJ1luLw-`v zL-m>@Yi_rzv25I_ra46f>FILdb4vIgR4w*JXO#_Bjy?BG4nG*jQ?%U@Sdm=5qiODg z$jybkr!+%ur<WL05yjfJh$BS0$#9D z%ZP5&BMsVhY%=i+-I^a9C0(w7neym{Jwmdkg`vgHkIikizxo*huiR#v+m>if)6?N} zkai3}7N*0TYC1Q>4$;x+Ru)tn`$qt}_dYl=tVXEZ7>0e$buv7ym*J^irs8YWoqxC# zBR9Lza>~A_;Xs?s+`?gynXt0i%AqkgCllA4s$wFnwL|@q7tQJ>E+5gGa{ICf6H_U< zr#X$4Y>@(}N%nW}vzj4HWz}k5M?{oOofE#HV(E$_*{x>lv#W3>EK&tQU_6G&skQDv z@+h_WK+R<#*ZF(3kG(G0N9AMps&Pdz{DaeBiQ4hE11D#Z_ zlZsWgYzzeXvH{k%d?qPSSoLGxw*X0%fM)#GV+}1}cWdUWGDwq4<|D)1XxD4ym*N38 znV5?KI(jz;(pB7XIAPkNIE4aDKvsaEN$qyk%TO`D>l;Yr?_#p|#B2-FjO1VTk`Y9Dr&g2!dyZHyfAQf*(ES8Xph*VT;L!_Cdb(hk4|%g}gchIkcbVsL-Q2l(`v( zRPb-<93fsjYi0@x2Pr$`zD~;+)Tu)Ly)VWcUH5`cZj0h=OL*qx^}M0MFjuOwViA-- z6dnLwk?kq(RU3C$?DXKSrtD+`57eVqGZ9Yv(!_R9unMfDwrzqGlr3my#qiX&)MPj{ zuU+w`k$K#A8@Vgv`V%?9sWla<2BgWF79(ok! zs6(5=94(}^XgXz*4P7R^9U@6O%3$M;_ZVzQxz54cZoc~!I{c!OvGnp1AEnieNG7&^ zU5yhN+jz0JL!bF_rU-FkPUj71&W@dk=E=nIAr!z6qX*jWKOrMB?}Mrv%`_Q(LL|bB z>`~+<6EpPLeR5{Gc1^~v6q4|=k-7WvcmffuRbEJH8Lg0fvbr_3FkZjHTRaxXgHhM) z%SM3jcx13%G885go3$omrPy7Mvl1Gf$;cfO-a2>8TnjRabVn92c`fIP3V)VHEY2$HcbM z5beO&>vB?lDJd(48^*@uqCM?0oHcKhr>;xdlWI-R-;UJMqwQE{vrz<1MeG>bIbSxi4lg)dSCQIHN_eJ z{Q&aVzC}Vy8in`_6aI|qP%Y#(Y=)@aS+CitOy(HhOEbj6+QyX?;AN)njtVj1@Cf#HM zNR{HZYXkiZDMs;y!01sVK5J0jTqQ}+pfBqp>sepoNqi$1WcHMIrz7uZGH>_|_?1G| z&cm=gH~dei3n`fs%|0btVM)(~jXK*IzC@Db&3nkPp^YkRdAcPfN>JS3L*qB>MkiAM z+o94N4=X$MY!DP+y$2qa200Bwo3`#qk>oh-mmxW$2Pt3d{1x~H#z%!@giwiP1B+-! zc>-*a2U?^IR$?itIhsnBgb3}R#qXpQk&YWJu%w9_#5QhVe8F!t{EQpYVM_dP16wVh zL1k5#;Tls8amty(bvJ&&;l(lR?M`l_X>!|y0gJWb6yt(Qr)<1qk6sUvio`1Mad;BE z?mHQ4Z?n~q*anmZ+E5>Ey=`D;OwmB?jK|T{??GP1rx1sq-U&YVW_}wN`mmV2{)r96W{(%Hz+WuqLHhy z+Xf`j;8hT4GA9~rL27C|LNt;QcPiN8h9~x~WFiBhQi9U*j{EQ+g{~UakNYQO%wQu3 zdvzxLL|W!JID@*E*ssHHE*YvI)$@1^7o`dcH&J+%ZJTNsWe4LK$m{afTqBaiugCs? zJ1!b&Z-!N@v_)u1_1G!i^VhNeWAx*11EC5uaK^LEN)A2_ELD!r9%4t}(8qM`UWHKD zC^6M4v7%Su7g0E+2CK?7q=hPLKw(wMSX&9xevUdVh<#R_@1n0ObsDJ7aH!LDEow3| zmB+E6ma512zVz6Daz>9SR*&9=Kl_R3p}1Qeo@6D^;ThyQI@Eo>4t%`1)!~=eeOEec zq7FqLp-DLNgd87WvG7606`b6Pdwg~by91wYNctl z{`6pqTG7u}D;FW$s`Vir4(NE=ckn|=<7t@4W74iv8s1B)TTovwmHvj}My0^h#`Y>a zABCZDP=i(HRMMiAj!sqQ3q0)#j7wIX9IZ}WWyjC(W6-WLWml)CcKx^yxyL(lk8!n< z!Ezgl==QO4o`GFM%2|y(>rL^SdiI9IzU+=C;U&q$i`d;#eNuRqqa1EHOeS`urq7mi zZX!+&cVBY|j&fUKw{(xh%OpmvAO8qDh8RuUf z07E{=O(Qy0-3gZS;hOU~AUE@`-=hc&gV<$_06Vsi_stJjToW!ujeTkR1EfRSWa3CA68&FpJ|74MoJ(*<8L&BoRMbF|_q5D~ zik)SX}9IXeRH`YUsEAhMk`=up5N4!qWW-+L=mK0JK z>M7*CpkfQN-}V;rA?75xLU zn08;JIkMfGl*rJ=^CFSbl@+Ct%A%#wNNKd9Xk`>9)unY6(MWk!dAz)+qI^}fHd0bl zQ4w?Lt4kyCXl-Srtgfnr8FQAD$3iu=)r)J3DnqgI%DRf8cr+HOEh;T9ikB~ohT^qF zRk5;YZK%8|R20f7E-$IBDhJ!#(0P}Is%t|zv6>~(T9p!uM=L6dYD3G*t4hIpdR0wb zJXBU*5e?;(SE1UX60)2UinbZ(f^HVxFB^>_ZE+}G9V)4fLWB@U-da@{ zH47ERYg724s8e$Y7K#oEU0fG8g2fcCB}LG* zwz@iARa6-zm3K)L7JxvdMe(9gS#5Qt5@mP{8%ADbEM8QbQyHtS$n|OkmsI9@aU$eJ zOLSHZ>{4Btv!piHD=m*L9a&jg9ha<8D@_vYTv@aths7)EDkH@eInmn1u~9K>lzZOA z7mWzTmqbIw6(M9QNsFVQqT*`UVED+fXdL8{HS-5~ag_IH`yMq(l2enM$4Amn(Eicd zXb3(~6r%W{LRsXi3|Nx2#a5z`D?_E#a1v<&ag->n67Z_3R#K&wF*GVK zx}rQ5kE!;ouBuoGwPMw^#c;+Y)$!^o+S!p!luVT^R8&=J3W=OX516N_w5WDvh`pju zjT9xMOeLj&mlUCctgMMf%BpK4(zK(e6c>*eGo`Mo97&ZU#!k7Yt~M8)EK*ipRa6m) z)kI6;wRM#}%TnT;|6$qUib&*3m#wOfR2RphwacQl=+N$2Xn1KTwxqhQqEwm+u5&h% z&}q*aJ;*DnT3iuDEj85@(Oj=)Nl}bv1?vPi6?D2_N1qxqHLi*iT<^B zjwmjQm6zmHqh5p${LzGqqg9Bjaj~;15Gsm?#*7|aQ=)9_5>(ac%n);>yzmSaR3kix z&MT^|s16y29whHDM=a#~#!dY7YAUMZ5ya~yQ6?h@A-Fr=>_T2KI!5ivh_H@L3RR4m zGJGPVRmE5X#zg28kxG+LJ2p~=;3H&%dX`7#^77L7k}1Q-gUcWKl|@5kMdcNBh;b{7#lTnSv>`ETSTQMdX|$*opuRgm2TmIUU1wFtFaxTt3gLfMs0ahiiGz^swSdG=B8#DX_a9qpPb!l?d4w)T1?29G+N*@DUBozU1P9b9GrKdDg`hu=n4Rpb+LG;7z4r5Xgq`&XSEv97h`fJWULmXm{?YZs_H6> zVGA^AIVXc`q8J7W&i&9^!B|z|oeL`!PDKJ|Y0_7egqO||QHqgWRJ*vYGFlZE4WcV* z(4d}&Hijm3;8iA5O|&(;g5s@-Fi@7GL-k5mU1w5g#TZ7R)6sdxYEV{Tz!DAE;D-JZ zOd7QjFi}%>P!(P>=hCU?he=CYeK`XJWhBT=!gyFzJ1I0(O+GRIfUB!{sWJ}dZ52#f z3Cd^{ZkGz-Z*B~e*(fJ3@dzi;oK#m-BN10=h0_R`JHav0ML;mpt5xl8>O0TQ8OT+N z$i!I9ex(l9qyL=gJK9i9x7AEv=G!5bI!`x^jMkx?mAR8bAycO#Dq?}Hx;846JL>>4 zx>&0Ku9z^WiH%GpS%;bFAS`em4-%-(QoP(Mj6R;p>inkLc_Zoe#Y)zFpkL(MmZ~2 zV!~T<0<^?m*o3VhsFjwNVeX8eq$+^(Ex{;RQdAYf%sYm`EDFtL*OkXbrs8NxQ62gu zhX<_b@QItytQdh0=YcWCOOY6wdY&Lm&g-h;lR~n1mlU-)#EPb(x@s|EENX;Ci=(BG zUdmlsT^W^WI@fxowMA%R?hULAEw4ohF%3rr#SG3;T~bn48;W7Ds4H0ll?R1o))m8& z9dkRy^^z!PpfG1Br=1oGtB{o+-(jD}S$@Bl%vpI_BM&_s|7zts3&syXSm! z2+>-VzV7+F-1#>?_xGIcbG}!4?F(N$cJ_s*oj0uO?eSkT=P&22e{98Z|9ND~Cl9>$ zYC-WV&DU#w>Y3lY{)g3XPT4T^eQdM8tJ0ebn^nD;`q*~Pspa?No_cJJlGjVm+nl-g zjwe6Op}q0f{xfy-^3-u?Ug!GFXU;o2_xx%9`SkbR|J|yyPpPl|Wc`Y_e>ONdZNmw* zyUx+apRIcG%?ak6Vm5jR`dP;SO0xkEf3Niw7@|N9JIhe3mmk-K?@wTz(ETfw7@|N9JIhe3mmk- z|F;%+88_bW_bmL|=irZl%kaynmIpWUjWXUyeBF@kc_-sJEc~53G1GDI{+gliOe7dg z`frZ&ywfy2v7v9nPl<_1Z*VCS@aM`i0cDMB=Kxcl*pCBwE}GzZOEiCC!+-T50e^!j zPwN!id!^}#4gH_`1@s1!{wGsC@7tQ5*wB9rIf*I1!KA+rcj0W*^u&h#+x-K2gGtYO zEPkNri4FaOjywjFe%FPbcekb|HuO(8@)%6|8!z&_2Q@vhq3?F+4JQ3{GjPv`rYAP^ zn*fMs;>%#tA3f9aS~NW|Y3L7g0EkI%FzI<;$!|41F=^BSdWh0&ag4oIl zKukN#(3pB%Jlpf;YImNAtt@Sq<E8p*IwQYBf1^WhFzM?rgCA>pV#9wh05SO+O#1bgd)`Buo|rVW zXC44C=?y0RD~0G6nx2?6q<_PSdj^yKzAHWNRZUN9=^{QFI?z(qmWMjCnitodjKE9-(bqWAmVwG zH9fJR|Bgd%FzNpcn)5Y1v7z7T&>KwpZHqi_wx%aG^!GXTH<LUW2A5HuRfOhM4>fCjIOs z=#!eB*wFvjp(p+kXiS`Zide_VUpV+R2fyjyw;bHz;CCJTk%RkvHQ=A_;KLn!l7q)M z_)G_%@8B5@p6lR+4lZ|awS!kV_&Nu#cks;){+@&X!@)ms@FNa>(!tL<_!ka-)4^{! zxWmEkJNRP<56lScd8~s^aqu_?<7eWweP=uPN(YxaIPTzj2jA%6I~@Fgga6CH+a28E z;5G;EcJQAa{Jw+z%s~D_9h~Lh;~adlgGV}eyo0AW_yPxC;^2i2E^{#ZR9~^N3N#1- z^0xxGXKefg{qb(3Gd2>NzIlSv_YG!WK5i-csir43^iKg0v+o;B`dt;C_ft(zOd7_P zj~xC6lfJFm^ZrZI6C3&^&Yam`(obCGdCzHjVnhFa|3DstNq@>WF^AXm#D@Mw0OFbW zGMMz;t1C;L{vD(ZT09 zc$$OfI5^_qs~lYG;OiXx9S7g!;5!|>#lep__$deT1$9RE*B$(pga7Q{_Z<8Y@Hf&i zzs7ZCAJ4oXE+j_#nf`bv(o6j`Z`(TfpMyzLh7bS7BK<4{y{W+U8uP$*WLf^@`!6{7 zC9lP%|J>VY@hjdREdGV}SBrOgpIZE?m)2-_{>BSg{F--$#lQ8=v-k~fmc?&+3oPE_ zm0SFKuioN6csBs^@gUh+<|~0W`z>BNs$EJQ{TIFcxZ$66Xx2Isx8v&;lwBz_O2)e# z{8I;Sckr7I{;PxQhp;ZiXM=;Ea`1Z&_Kytc`GhA^_9O?7b8y(fmpM4*U_OJ&@Oj9= zEe`&xgFkifSB?tG9`E3h4nEJpbq>D4!88G5*KTDBiA4s}$7pl@<@;R@e%HI(roZn! zVDWzM35);Xy>9V`-ajq=%=0->7M>q_VT(O~w#8}wQi~7qms_0fCoCT1-wgZ~bjjAT z?FZiM|3!SsJDT>{=kdY0)UjFXLfnq8J5cs3LPJS{7%0yd#`#Rp7)(2mo`3oN5q^M= z@*lM6NBhrOJk)Qq_*j3p#l!sfEI!^prOEL8x__3%C-`$LKGCnVINM)u@o@iMi@)Kw zSbVbo5-^`Em#yWT0KC~h+-Lu~K=d8ryEdUN#wNc;Sz`Lb1Ooig4hGW>q~Tw_Kf(|2 zNdFHueU$&6#bf-F)*Je<{uqnL`BN-D!=G;Pcz>zI6Z{(BD@7Momyzvm#ZqK5n6fRi zWvBQ7KF`12rsw-NTYQ1P$>Qn$0~TNC|IXrz{J&Z}!~ciHGyP#nqu0g$DHhN6$6Gwd zpK9@3e}To9`PW-q=-+Db75-foU+MqU;syS8ix>J|xxv(1><_cJ#2;gEseh%#<^EL` zU**RvUh1#5xWaF+xXS;D#nt{(7T5SMS$wtsn#FPd4U3og-i=1K<^Cv(SNMe%uktG_ zUhOwoe2ss*#r6K(7Jtis-r|J+Ym3+UA6on!|A-By-X?#l#q0gcEl&E&EZ*RM%i^2- z+bq7#zaO|#{7v~!Li)~G(sypwcrdEk3|#M@?en>}4;zdpjy*5<9G_3_{guIZNYx&} zdH!yUYkwB3O3N3oZB z4Q9QEpe+CL{Vjfgf9xM=(;xJQS^N_}$KtL2D2pHV^DX|VKi}d<{bGwB^VeAXkpDxA zxA|Kve$xLja9DIv@?0Xi+%LKmYs~ho0j~ES@Hr1zE%--1A2dsSX@BZMO#45oG41~l zKK!Ho4W=DP!@qpL*$?pZ{_{4y#edo27yLIY-r?`H_$B|)?;1WY`zKiZihr`jzwpnu z_(lIJi`)F=7Vq>|0XIUgY%R}iqWiOAhx-Np%%>e56WzCq9rz}wdjGi;I~d(*hXi=y zAb$8OC8pTHVA_E+{LA-$=Lh%=|GPH*P5*X_cl!@m{0D!l#qIu1i{J7)E&ikbuEl%( zuik9x+T)M3_|N`ii#z_D4b0RF}%ElM1*iNUl9Y514#|IH8Zd;VoM{e6Fd#UJ>U7XQOvZt;iyW{W@aw^{s8 z|5=OwQ}1W~;T9k8j|4smdSz>QMgwp5_lZsN1pifRaT9d_DX*XGXc-mHr4@>)v#Yd*SW${sIdx39;UfEinyMQSTQBhnfyJ}qq>@BlmxJX_0i z1n_46Yhs_11RpE*83SDJA1C&iBKY_eI~d(*hnv9D*x??fiuj4av;%4Qm+wzW3-CE< zciQy4w8t!-n)aH-=cc`B@p)<87KhXRVe#~|fwvm|7p9H1ct+Y}iwn|b0bdARvb79X zh`wiu?qwR&H)5ji*=c;r@HaJf*Stnw>V6q`8r@$|B8cw936u>Dd_q!hcJMvK1GY)} zWlU#J^%9k`3{bF zWj4LY+h}pI_alo-y~iys^PaPKvDapCxz}y+Qtva1E4{(DnR;uyp%!259S7_m%eGMR zWC3sXuavdn3BdJK4u2Op_zDLzI~$*uNQ6K3JAtt@+kfrfH(Wsh~0i5_PNfZ-`+1+3HgYFcRKh_4nAZUZC)>XJ4XmsWvOqo z){D3uU%!J4#I%1UKK!Ho4W=DP!@qq01_yuF`=d?2*?ZUGjozmg-|F?-WXf*xzG3n0 zUM}$QkS$yD91XnLPm1nmi_ABQ?iUE&kg`u@WTyP1z{kj6sHzhA4W|60;UDJY4!+Bq zY}5b4yTIamytx+N>n*nUey_&jE#9>jKj5vk_($ID7XR3L!Q!8I9Tq?2y$3u;bXW2e ziSBoZ?$x624@CDBf`6EzyU~}re+WKC_Z><_(cNI`P8$B@`#*K?<6ghpP5KjFhQ&{M z$65Se-YAQo_9j~Vj8|&$v))w}H+xBow|ln&H;9g^-rGgThegNxMXyIh$E|`NP0`Wl zMIG+|AEV>FN@UT|VCqO3{^k3v4t~jd)TaO3d&S~cynPn`()+u`zw!;(cEF_f5Tj^Nz9jeeVp5Kk&}8 zc)vH>;*Y%r7XQ<`(c*u3n=Jm+`-#P$d5>Fsz-zHM&2O`~pZ{Cnp<-KQhf{$!`@6*- z&J;WUKE=+)wzTtZlr?t#F#-N&;%G4KOd9^>`-l1gKFsg1>4W`GE&hss*d2yG!yjVt zSNyoehx?7dQ$=RQ^D>b+UDgy)k$I4;BPdd{mVuZu--xor919-7hkulrxDsVU122)Z zYsg2C=l#sVZ4Umkg9jWR&`$sk4V)vT&lh}|;LC^yTrRlGpcr)-6VtjbNDDTP37>I(PFVVO^aJ|Oq!1rl982CwIe0UF1i=^Y>YvB2+ z#?3id1K-dzycW=|G4BEUo5s8!@9&zPzn>k51}0D5pLsYjeDDXOshXMbG#v$P6HO>ZpN8=peL;ES4i~v4`7_#x6#!(vc zUb}NN<~^v>H0FIri!|Q02=^0e%=?#CYRr3X*J;dqu5Q(s_fXwS4Bfq<#|-?D##?Ze z_Yq?FL;tOw_q0ymhV&PRAsb`zs~R)LzNKmSTjVaC&ie{J(CN)6`Hml};jz-u&pXzQ^9d4Div$S*wt@6Awn8t^R|F9N=U7`k6P+w<7gGD8~78A zH@BQP@DW4*<`C~$P0xF_TXcFU(qGo;+{ga4#=IZz_Zo9v@h45c1oZnf4&nFTA8O3s zeS6S}GFO0RfX3ON8LV**@R1tVfF@hx5lA1c@o3=58jk}$U*n0uGc}H*?0k*SLVCHz z^+>PQc+u`5-ZG6x>>1+KYn%ssy}>B^U5)dBZ`XJl@Vy$(0N$$cEa0a!o&)?mG3?KK z242$XdFU^%YFvuC+BL2R-mmF-kN3wqeGBM4+;c;_@wfE@HQolCsc|##F~lg72|qbW zrx!wou^QJ;ALdQf*t>9;cagzY_8&OU(BL=wyr+jU^S<<}bvl2`|4ohgTmMFl`8)qx zG@ixZ{1c-r?=RY-G4E4-Tw~r7`-;ZApZ0Byd2j09h@s;g@cC5ZLf}D2WBPpHqcvUx zoTG6)@F-%`%loFrYs~v6r)tbS^XVFMuWz=-+!rk*#>azy7VC8GCzor?J+Z4bO(tko z>vUd+T}KR?XT#>V=yYDE_`c9*dZW=U4+=)iqi<-McV{E6YRvm=f1xq2`@f;-mw^6l zoz8pUJ2mG0^Z(MA_qwNJ+@|il5C2Gwc|X!|#GuQm7%(uT)44txq0>hoeWFh1{aSe% z^IoiJ8uNN?p~k#lw^U=^Yh6hU{-eQXrB3I4Xlpd){oB`T%=@oyB!;bWV5?0!o%fLc zP-EU7elIb2=7Hx{jq7U%417xC<`n}5zHIOng9g5;u~#%`;2Rp}Egm%RPX!eS1aK3}5J9xH(FL!Xn z!HXSS;ov$4U*q5g2PYkTtAl^&;4Kc`>frx!@beDl_&yV#3-Q5U{d9dK{<5EGJ<42w z^NaA|D^CmX;e28iKC|(;1fNUsnS;+Z+EG zEMDP7%HtzXA2)Wi7m49G=1eb=AD(&X^f~h)v!-1r7FmuUf@M$+V8PAVFf(Qn0jf!RDi;%wTnyiahVrE zVqxU`OQxPj+3^7G#eDcW)n5{cuD~Or<58$vR7!P=ii$kG@Iao=E~q?)cU0Bll~d(K zRY-8(9O5Ad&m0GnlBhgXI#OFy9s}n-lWBFlyWxv6Bju&AM0p%L;;=!<(nt|rR#h3P zjn-5!sk*Wz!uPxoRz+ixT0ELN4ta4_Ru0>h;8FSb#$(r^k-Xl4XLu6_4)PpqyfK2d z7VS&N;>{wF(irSlT2@!O7?REAd7z zyoN|KO3lH0a9}+c6SejzR8x)T{o`F=c#}nGuS^y~CW1r=L5MA7W!ic1=zazZJjCCNT%`_6 zi)tdpa60uS6&&&UB+*j|4bQ{7LW;^!PJfq{R{}?4u_D^1lJ7iHJwrVM--{rMfuag_ zl(%pY(n@g3skOMbhuiWpo;aN$}tAO=jhlf-m(_@$kh?NaE2LtrBYA< zPa(a|5IqHVIcG;`;wc~vxt7> zO^;N(1cy06Y8)+Dvl8zfg72~|VSIBcmbE9Mq$bqWdXcMD;FGu1;H<6)FD1Y`3A{*c zX~`1WzqYirx(>cnTUu6unrbm_DyJoa0=1>eduu_4p^_#F-rQlZat6HON3x?OQM_v` z5-X~#!8^!6gLjhQ4GXG=^OWx+;;|YpiIF;jx2Pa_N%hz&L?8(<`ry1#NvFURwdEKU zRUnd=CE-L~%!HvE|Mmq*z<5Vvb(wOySdCIgj!-Y<%^xi1ba91INxY~ovLaHttP})% zImIdj{$)j_{MOM2FFh*8t6z}7UW`MGHkCH3EH6c;GjNpy!2{Nm97AEUR|R<-B|)X! zYDI+aS@I$)is8sONSBkYB`vd}3bw}kh>)Yym4j-v6)RSti?KE@vQo2IWsb#sp@wH> zRFS38m6eNYBc;oWYRkr=p%x=9;x(7>a(SB&XCSfj<(u!Aj)E( zI9?h9E0@SyLU62x>=SpQ|6?HK*eHnr`2=V4W1XvvTS{NK^@RF7| z;w$66eCzb(wL-?XOTms3u4R;$m~CaL#0xd~Dn`Uv95`guR4->YQ%vy^Bve_8SD3K< zU=EpI;9WED2}2V@6s&>(aGH`z$jxI7Mh_liHKdH!R+*eCl_f87ghN>AmuYU5@^%q# z6ka1#8ym$Jij1nkEB>mhMwLdFX&4!Q`Y88Za3%kq+<9{xjI6vy48c)RddtW!!9@{* zL651T8tzr68{2CX4T2>jbuh;WCTXeNl`oF#-L*}p);-(_=q4sG>2x$54&&4zWeiZA z^2?~HDWNAONWs8uB9xwXru1pm?`>%4Ik9r%Jzr>+8q3{RopDy{&T-w6bW1gEF#6j- zDMJ`u(pB+gbPI^V!VPQAJj0oc>xrN<;rpCPoim20GAR>7>B%WGNpU{6{?A`feTh|( zvkLlmtDMy3#pf&!xGD%{sAgi?=Ty_3U8c?#`*nfQ{OUiQ?sj-iCQrI`obC4 zmzgI0k0v_*&H2s$>5K%y)*YAKA=ZqQW>CZkYQ{yvU}%gO3X|>Rec`Z~I!ylC@lj7; zzD%z(r08>c&SfSHcmb?Ts8*@57Nbh)OvEg6%#1V|#hI8p0uqj$ z91-F0=GxQ8%IR`u;&l8tImH`p7sr@%X6}eH$B!5@ezI(!=#(*I#!6Cg8572g&K)sk z>_ilu9H}TSV-MBL#+<2`<5iwZ%O!CPUYR>~tg1u8zA!+&W6v0`#KMG7(oRR(#EFs? zi$<49+Bk}<#FzP-B%Xo9GgLiw#gYPfPM+}#{^!~_U;QU7cV_OCycq0E4>>b;@@c1!oiKjlWPYQ4(V7&8jR|X`HD#xc zHQ4rat^g7&zva9x!Ef0H7{CC9+cBmqvT zDBxmv?K-$lpihpSOlWI_&Q9iNlNpKpKc$^ZPuoBgM)Om;%`V135mA?@n=ZQS4y7bi zsiH*1f%5ZvzWW$^Yzm=e0r9-=WA2<>BMo^J;0&;6 z+;`g_`_1}8*$YgA;;u|@eAet27a=<`e!5rBSSBLY&q%6zCU7~r^9ybo;;sLaxK^FlH`glUy)T~aaQ~8_vRs+Qp7Wr=S^^1qp_OlGp7PW?XLHtG=!v9LCL|V3 zCyYSV;;~9d?KUo49FJ%7<<$!_nh%|zw|c_LfSD)Gg)3*ARzDt&t6e^9!~8$vZ)VD_ zKjRjNR1#!;0XvUxUMNpZOz7G*v2bNU6=^l4>IHTNN;+aK@#C5qo$n=!vK%|5)>8|FQ;(KMrFn6YZR!`O0T zjyvzG0)rUhPuH}U>;76=%>kQ0r_JKxav9^;gCHHC%FOjs!(Vzxf%wvR7DDkHf=Rj_%iY5!sd

gbqiJ37z#! z2p#r%o6yg|_%We_Un4?i_)`fT)Ep5yCNSG6sMd&%VtYpC;T1^79S4x!TlH_0j@I2_ z5=7&GZWE$~vU2=3T}&)%1&Qsb*$Z$=b3(zawZI9z08bli3ZwMGf`ZsVrBS*nO9&oN zx^K1?M;=f*noPDWgj`}dBNa;Lb4BUMSV1=;*3U`pL@<-1Mbdk8k*eVQuPD7{ZkDNa WwR|a_GB>5HE0~*ycQZHti1G*amiUhV literal 0 HcmV?d00001 diff --git a/py_progs/restart/history.txt b/py_progs/restart/history.txt new file mode 100644 index 000000000..162b11761 --- /dev/null +++ b/py_progs/restart/history.txt @@ -0,0 +1,2 @@ +32 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +40 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/restart/restart.py b/py_progs/restart/restart.py new file mode 100755 index 000000000..b97272431 --- /dev/null +++ b/py_progs/restart/restart.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: + This is a simple program which parses a .sig + file and determines whether it is reasonable + to restart the program to complete it + +Description: + + restart.py -n number rootname + +Arguments: + + None + +Returns: + A new output file + +Notes: + +History: +07jan ksl Coded + + +''' + +import sys +import os + + + +def parse_sigfile(root): + + sigfile=root+'.sig' + + f=open(sigfile,'r') + lines=f.readlines() + f.close() + + i=0 + restarts=0 + while i maxstarts %d' % (status,restarts,maxtimes) +sys.exit() diff --git a/py_progs/restart/restart.py.old b/py_progs/restart/restart.py.old new file mode 100755 index 000000000..d25b05b26 --- /dev/null +++ b/py_progs/restart/restart.py.old @@ -0,0 +1,98 @@ +#!/usr/bin/env python + +''' + Space Telescope Science Institute + + +Synopsis: + This is a simple program which parses a .sig + file and determines whether it is reasonable + to restart the program to complete it + +Description: + + restart.py -n number rootname + +Arguments: + + None + +Returns: + A new output file + +Notes: + +History: +07jan ksl Coded + + +''' + +import sys +import os + + + +def parse_sigfile(root): + + sigfile=root+'.sig' + + f=open(sigfile,'r') + lines=f.readlines() + f.close() + + i=0 + restarts=0 + while i maxstarts %d' % (status,restarts,maxtimes) +sys.exit() diff --git a/py_progs/scripts/compare.py b/py_progs/scripts/compare.py new file mode 120000 index 000000000..a12617ded --- /dev/null +++ b/py_progs/scripts/compare.py @@ -0,0 +1 @@ +../grid_comp/compare.py \ No newline at end of file diff --git a/py_progs/scripts/grid_royal.py b/py_progs/scripts/grid_royal.py new file mode 120000 index 000000000..04a8cc90b --- /dev/null +++ b/py_progs/scripts/grid_royal.py @@ -0,0 +1 @@ +../grid_Royal/grid_royal.py \ No newline at end of file diff --git a/py_progs/scripts/history.txt b/py_progs/scripts/history.txt new file mode 100644 index 000000000..e8e494710 --- /dev/null +++ b/py_progs/scripts/history.txt @@ -0,0 +1,2 @@ +48 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +56 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/py_progs/scripts/make_royal.py b/py_progs/scripts/make_royal.py new file mode 120000 index 000000000..d27eaa77d --- /dev/null +++ b/py_progs/scripts/make_royal.py @@ -0,0 +1 @@ +../make_royal/make_royal.py \ No newline at end of file diff --git a/py_progs/scripts/msub_split.py b/py_progs/scripts/msub_split.py new file mode 120000 index 000000000..34daf57e4 --- /dev/null +++ b/py_progs/scripts/msub_split.py @@ -0,0 +1 @@ +../grid_Royal/msub_split.py \ No newline at end of file diff --git a/py_progs/scripts/pf_update.py b/py_progs/scripts/pf_update.py new file mode 100755 index 000000000..736cc9d87 --- /dev/null +++ b/py_progs/scripts/pf_update.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python + +''' +This python script updates a .pf file for a new version of +a program with new keywords. It inserst new keywords; it +eliminates keywords that are not in the base.pf file. It +will not handle the situtation where the order of keywords +has been changed (because python and other programs often +do not necessarily have unique keywords. If a new keyword +is in the same relative position in the new file as the old +The old value of the keyword will be maintained. +History +07jul ksl Coded +07sep ksl Updated to make sure a line in a slave + file is not written more than once and + to allow a master file line to override + a alave line, if the 3rd word is '!!!' +''' + +import sys + +def process_a_file(master,slave): + """Update a single pf file using the master as a template""" + try: + s=open(slave.rstrip(),'r') + except IOError: + return(0) + + print "Processing ",slave.rstrip() + newfilename='New_'+slave.rstrip() + sout=open(newfilename,'w') + slines="" + slines=s.readlines() + # print "master: ", master[0] + # print "slave: ",slines[0] + i=0 + while i < len(master) : + j=0 + new=master[i].split() + while len(new) > 2 and new[2] == '!!!' : + sout.write(master[i]) + i=i+1 + new=master[i].split() + new_keyword=new[0] + kk=new_keyword.find('(') + if kk != -1: + new_keyword=new_keyword[0:kk] + # print 'Searching for ',new_keyword + itest=-1 + while j < len(slines): + old=slines[j].split() + if len(old)==0: + j=j+1 + break + old_keyword=old[0] + kk=old_keyword.find('(') + if kk != -1: + old_keyword=old_keyword[0:kk] + # print 'Trying ',old_keyword + if new_keyword == old_keyword: + # print "Matched ", j, " to ", i + itest=j + jhold=itest + break + j=j+1 + if itest==-1: + sout.write(master[i]) + elif len(old) > 1 : + # sout.write(slines[itest]) + sout.write('%s %s\n'%(new[0],old[1])) + slines[j]='Used up' + i=i+1 + s.close() + return(0) + +argc=len(sys.argv) + +if(argc==1): + print 'Interactive inputs' + master_pf = raw_input("Master parameter file: ") + list_to_update = raw_input("List.to.update: ") +elif argc==3: + print 'Getting inputs from command line' + master_pf=sys.argv[1] + list_to_update=sys.argv[2] +else: + print 'Usage is either via command line or intractively' + print 'If interactive, simply enter pj_update.py, and answer questions' + print 'If command line, enter pf_update.py master.pf list.of.old.pf.files' + sys.exit(0) + + +print 'Using ', master_pf, ' as basis for updates' +print 'Using', list_to_update, ' as list of files to update' + +try: + master=open(master_pf,'r') +except IOError: + print "File ",master_pf,"does not exist" + sys.exit(0) + + +try: + list=open(list_to_update,'r') +except IOError: + print "File ",list_to_update,"does not exist" + sys.exit(0) + +mlines=master.readlines() +lines=list.readlines() + +for line in lines: + process_a_file(mlines,line) + + + + diff --git a/py_progs/scripts/pyfits_eval.py b/py_progs/scripts/pyfits_eval.py new file mode 100755 index 000000000..fed249461 --- /dev/null +++ b/py_progs/scripts/pyfits_eval.py @@ -0,0 +1,353 @@ +#!/usr/bin/env python + +import Tkinter +from pylab import * + + + +def read_python_spec(filename,column,wave,flux): + """Read the a spectrum file created with python""" + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + n=0 + z=specfile.readline() + q=z.split() + specname=q[column] + z=specfile.readline() + while (z != ""): + q=z.split() +# wave[n]=float(q[1]) + wave.extend([float(q[1])]) + if(len(q)< (column-1)): + print "Not enough columns in line",n + return(-1) +# flux[n]=float(q[column]) + flux.extend([float(q[column])]) + n=n+1 + z=specfile.readline() + return(specname) + + +def read_data_spec(filename,wave,flux,error): + """Read the ascie data spectrum file""" + try: + specfile=open(filename,'r') + except IOError: + print filename," does not exist" + return(-1) + n=0 + z=specfile.readline() + while (z != ""): + q=z.split() + word1=q[0] + if word1[0] != '#': + wave.extend([float(q[0])]) + flux.extend([float(q[1])]) + if len(q) > 2: + error.extend([float(q[2])]) + ierr=1 + else: + error.extend([1.0]) + ierr=0 + n=n+1 + z=specfile.readline() + return filename,n,ierr + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + lx=len(x) + num=0 + ytot=0 + l=0 + while l < lx : + if(xmin <= x[l] <= xmax): + ytot=ytot+y[l] + num=num+1 + l=l+1 + if (num==0): return(-99) + return(ytot/num) + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax,fout): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) +# print data_ave + mod_ave=ave(wmod,fmod,wmin,wmax); +# print mod_ave + scale=data_ave/mod_ave + rescale(fmod,fout,scale) +# print 'len fout', len(fout) + return scale + + +def plot_data_model(data,model,column,wmin,wmax): + """plot a rescaled model against the data""" + wave=[] + flux=[] + error=[] + if read_data_spec(data,wave,flux,error) == -1: + return -1 +# print 'Read data',len(wave),len(flux) + wmod=[] + fmod=[] + if read_python_spec(model,column,wmod,fmod) == -1: + return -1 +# print 'Read model',len(wmod),len(fmod) + fout=[] + scale_model (wave,flux,wmod,fmod,wmin,wmax,fout) +# print 'scale_model', len(fout) + plot(wave,flux,'b') + plot(wmod,fout,'r') + reset=axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + axis(xreset) + draw() + + +# This routine determines which of the models are good enough +# and shows where in the grid they lie +def analyze_pyfit3_results(filename,col,cutoff,nx,ny): + """Identify which models are good enough""" + # Assume columns in input files are numbered from 1 + try: + resultsfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + z=resultsfile.readline() + value=[] + x=[] + y=[] + xgood=[] + ygood=[] + goodmodels=[] + goodspectrum=[] + n=0 + ngood=0 + if col > 0: + col=col-1 + xaxislabel='Col '+str(nx) + yaxislabel='Col '+str(ny) + nx=nx-1 + ny=ny-1 + while(z!=''): + q=z.split() + firstword=q[0] + if firstword[0]== '#': + print z.strip() + # It's a comment line + secondword=q[1] + if secondword == 'colmin': + colmin=int(q[2]) + colmax=int(q[4]) + print 'colmin,colmax',colmin,colmax + if secondword == 'col.with.modelname': + modelcolumn=int(q[2])-1 + else: + value.extend([q[col]]) + x.extend([float(q[nx])]) + y.extend([float(q[ny])]) + if float(value[n]) < float(cutoff): + xgood.extend([float(q[nx])]) + ygood.extend([float(q[ny])]) + goodmodels.extend([q[modelcolumn]]) + goodspectrum.extend([int(q[modelcolumn+1])]) + ngood=ngood+1 + # It's a data line + n=n+1 + z=resultsfile.readline() + print 'For a cutoff of ',cutoff,'there are ', ngood,'good models' + figure(1) + clf() + plot(x,y,'ro') + plot(xgood,ygood,'bo') + aaa=axis() + bbb=list(aaa) + bbb[0]=0.9*bbb[0] + bbb[1]=1.1*bbb[1] + bbb[2]=0.9*bbb[2] + bbb[3]=1.1*bbb[3] +# print aaa + axis(bbb) + font={'fontname' : 'Helvetica', 'color' : 'b', 'fontweight' : 'bold', 'fontsize' : 16} + xlabel(xaxislabel,font) + ylabel(yaxislabel,font) + return [goodmodels,goodspectrum] + + +# Plot the good models +def plot_good(data,models,wmin,wmax): + """Compare the good models to the data""" + n=0; + modelnames=models[0] + modelcolumns=models[1] + print 'boogie',modelcolumns + lin=len(modelcolumns) + + print "plot_good",data,wmin,wmax +# print models + + figure(2) + clf() + while n < lin: + model=modelnames[n] + col=modelcolumns[n]+8 + print 'model: ',model,col + plot_data_model(data,model,col,wmin,wmax) + n=n+1 + font={'fontname' : 'Helvetica', 'color' : 'b', 'fontweight' : 'bold', 'fontsize' : 16} + xlabel('Wavelength',font) + ylabel('Flux',font) + return(lin) +# OK, here is the gui that runs it all + +def gui(): + global v1,v2,v3,v4,v5,v6,v7,v8 + global xmodels + + xmodels=[] + + + + def process1(): + global v1,v2,v3,v4,v5,v6,v7,v8 + global xmodels + xmodels=[13,14,16] + filename=v1.get() + col=v2.get() + cutoff=v3.get() + nx=v4.get() + ny=v5.get() + print "filename: ",filename + print "Col containing chi**2: ",col + xmodels=analyze_pyfit3_results(filename,col,cutoff,nx,ny) +# print "Number of models returned",len(xmodels) + + +# plot the good models + def process2(): + global v1,v2,v3,v4,v5,v6,v7,v8 + global xmodels + if len(xmodels)==0: + print "Error: no models to compare. Run select best" + return(0) + data=v6.get() + wmin=v7.get() + wmax=v8.get() +# print data,wmin,wmax +# print xmodels + plot_good(data,xmodels,wmin,wmax) + + + def destroy(): + root.destroy() # Close the gui + print "on destroy", len(xmodels) + close("all") # Close all the plot windows + + + root = Tkinter.Tk() + frame=Tkinter.Frame(root) + frame.pack() + b1 = Tkinter.Button(frame,text="Select best",command=process1) + b2 = Tkinter.Button(frame,text="Plot best",command=process2) + b3 = Tkinter.Button(frame,text="Quit",command=destroy) + + l1=Tkinter.Label(frame,text="Results from pyfit3: ") + l2=Tkinter.Label(frame,text="Column to use for chi**2: ") + l3=Tkinter.Label(frame,text="Value of scaled chi**2 to keep: ") + l4=Tkinter.Label(frame,text="Col x to plot: ") + l5=Tkinter.Label(frame,text="Col y to plot: ") + l6=Tkinter.Label(frame,text="Spectrum: ") + l7=Tkinter.Label(frame,text="Wave min: ") + l8=Tkinter.Label(frame,text="Wave max: ") + + b1.grid(row=0, column=0) + b2.grid(row=0, column=1) + b3.grid(row=10, column=1) + + l1.grid(row=2,column=0) + l2.grid(row=3,column=0) + l3.grid(row=4,column=0) + l4.grid(row=5,column=0) + l5.grid(row=6,column=0) + l6.grid(row=7,column=0) + l7.grid(row=8,column=0) + l8.grid(row=9,column=0) + + # Data set to analyze + # Pyfit3 results file + v1=Tkinter.StringVar() + v1.set("v3885sgr_hst_ixvel.results") + e1=Tkinter.Entry(frame,textvariable=v1) + e1.grid(row=2,column=1) + + + # Column to use + v2=Tkinter.IntVar() + v2.set(5) + e2=Tkinter.Entry(frame,textvariable=v2) + e2.grid(row=3,column=1) + + # Ratio of chi**2 to keep + v3=Tkinter.DoubleVar() + v3.set(1.1) + e3=Tkinter.Entry(frame,textvariable=v3) + e3.grid(row=4,column=1) + + + # Column x to plot + v4=Tkinter.IntVar() + v4.set(7) + e4=Tkinter.Entry(frame,textvariable=v4) + e4.grid(row=5,column=1) + + # Column y to plot + v5=Tkinter.IntVar() + v5.set(8) + e5=Tkinter.Entry(frame,textvariable=v5) + e5.grid(row=6,column=1) + + v6=Tkinter.StringVar() + v6.set("v3885sgr_hst1") + e6=Tkinter.Entry(frame,textvariable=v6) + e6.grid(row=7,column=1) + + + v7=Tkinter.DoubleVar() + v7.set(1500) + e7=Tkinter.Entry(frame,textvariable=v7) + e7.grid(row=8,column=1) + + v8=Tkinter.DoubleVar() + v8.set(1600) + e8=Tkinter.Entry(frame,textvariable=v8) + e8.grid(row=9,column=1) + + + + + + + root.title("Pyfit3 Eval") + ion() + root.mainloop() + + +gui() diff --git a/py_progs/scripts/pyfits_eval2.py b/py_progs/scripts/pyfits_eval2.py new file mode 100755 index 000000000..b594559c3 --- /dev/null +++ b/py_progs/scripts/pyfits_eval2.py @@ -0,0 +1,383 @@ +#!/usr/bin/env python + +import Tkinter +from pylab import * +ion() # Turn interactive graphics on + + + +def read_python_spec(filename,column,wave,flux): + """Read the a spectrum file created with python""" + try: + specfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + n=0 + z=specfile.readline() + q=z.split() + specname=q[column] + z=specfile.readline() + while (z != ""): + q=z.split() +# wave[n]=float(q[1]) + wave.extend([float(q[1])]) + if(len(q)< (column-1)): + print "Not enough columns in line",n + return(-1) +# flux[n]=float(q[column]) + flux.extend([float(q[column])]) + n=n+1 + z=specfile.readline() + return(specname) + + +def read_data_spec(filename,wave,flux,error): + """Read the ascie data spectrum file""" + try: + specfile=open(filename,'r') + except IOError: + print filename," does not exist" + return(-1) + n=0 + z=specfile.readline() + while (z != ""): + q=z.split() + word1=q[0] + if word1[0] != '#': + wave.extend([float(q[0])]) + flux.extend([float(q[1])]) + if len(q) > 2: + error.extend([float(q[2])]) + ierr=1 + else: + error.extend([1.0]) + ierr=0 + n=n+1 + z=specfile.readline() + return filename,n,ierr + + +def ave (x,y,xmin,xmax): + """average a restricted portion of y between xmin and xmax""" + lx=len(x) + num=0 + ytot=0 + l=0 + while l < lx : + if(xmin <= x[l] <= xmax): + ytot=ytot+y[l] + num=num+1 + l=l+1 + if (num==0): return(-99) + return(ytot/num) + +def rescale (zin,zout,scale): + """rescale a list by a scalefactor""" + lin=len(zin) + i=0 + while i < lin: + zout.extend([scale*zin[i]]) + i=i+1 +# print 'len zout', len(zout) + return len(zout) + + +def scale_model (wdat,fdat,wmod,fmod,wmin,wmax,fout): + """Produce a rescaled model""" + data_ave=ave(wdat,fdat,wmin,wmax) +# print data_ave + mod_ave=ave(wmod,fmod,wmin,wmax); +# print mod_ave + scale=data_ave/mod_ave + rescale(fmod,fout,scale) +# print 'len fout', len(fout) + return scale + + +def plot_data_model(data,model,column,wmin,wmax): + """plot a rescaled model against the data""" + wave=[] + flux=[] + error=[] + if read_data_spec(data,wave,flux,error) == -1: + return -1 +# print 'Read data',len(wave),len(flux) + wmod=[] + fmod=[] + if read_python_spec(model,column,wmod,fmod) == -1: + return -1 +# print 'Read model',len(wmod),len(fmod) + fout=[] + scale_model (wave,flux,wmod,fmod,wmin,wmax,fout) +# print 'scale_model', len(fout) +# clf() + plot(wave,flux,'b') + plot(wmod,fout,'r') + reset=axis() + xreset=list(reset) + xreset[0]=wmin + xreset[1]=wmax + xreset[2]=0 + axis(xreset) + + +# This routine determines which of the models are good enough +# and shows where in the grid they lie +def analyze_pyfit3_results(filename,col,cutoff,col2,cutoff2,nx,ny): + """Identify which models are good enough""" + # Assume columns in input files are numbered from 1 + print "Analyze",col,cutoff,col2,cutoff + try: + resultsfile=open(filename,'r') + except IOError: + print filename, " does not exist" + return(-1) + z=resultsfile.readline() + value=[] + value2=[] + x=[] + y=[] + xgood=[] + ygood=[] + goodmodels=[] + goodspectrum=[] + n=0 + ngood=0 + if col > 0: + col=col-1 + if col2 > 0: + col2=col2-1 + xaxislabel='Col '+str(nx) + yaxislabel='Col '+str(ny) + nx=nx-1 + ny=ny-1 + while(z!=''): + q=z.split() + firstword=q[0] + if firstword[0]== '#': + print z.strip() + # It's a comment line + secondword=q[1] + if secondword == 'colmin': + colmin=int(q[2]) + colmax=int(q[4]) + print 'colmin,colmax',colmin,colmax + if secondword == 'col.with.modelname': + modelcolumn=int(q[2])-1 + else: + value.extend([q[col]]) + x.extend([float(q[nx])]) + y.extend([float(q[ny])]) + value2.extend([q[col2]]) + if float(value[n]) < float(cutoff) and float(value2[n]) +#include +#include "fitsio2.h" + +static char iobuffer[NIOBUF][IOBUFLEN]; /* initialize to zero by default */ +static FITSfile *bufptr[NIOBUF]; /* initialize to zero by default */ +static long bufrecnum[NIOBUF]; /* initialize to zero by default */ +static int dirty[NIOBUF], ageindex[NIOBUF]; /* ages get initialized in ffwhbf */ + +/*--------------------------------------------------------------------------*/ +int ffmbyt(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG bytepos, /* I - byte position in file to move to */ + int err_mode, /* I - 1=ignore error, 0 = return error */ + int *status) /* IO - error status */ +{ +/* + Move to the input byte location in the file. When writing to a file, a move + may sometimes be made to a position beyond the current EOF. The err_mode + parameter determines whether such conditions should be returned as an error + or simply ignored. +*/ + long record; + + if (*status > 0) + return(*status); + + if (bytepos < 0) + return(*status = NEG_FILE_POS); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + record = (long) (bytepos / IOBUFLEN); /* zero-indexed record number */ + + /* if this is not the current record, then load it */ + if ( ((fptr->Fptr)->curbuf < 0) || + (record != bufrecnum[(fptr->Fptr)->curbuf])) + ffldrc(fptr, record, err_mode, status); + + if (*status <= 0) + (fptr->Fptr)->bytepos = bytepos; /* save new file position */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpbyt(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG nbytes, /* I - number of bytes to write */ + void *buffer, /* I - buffer containing the bytes to write */ + int *status) /* IO - error status */ +/* + put (write) the buffer of bytes to the output FITS file, starting at + the current file position. Write large blocks of data directly to disk; + write smaller segments to intermediate IO buffers to improve efficiency. +*/ +{ + int ii, nbuff; + LONGLONG filepos; + long recstart, recend; + long ntodo, bufpos, nspace, nwrite; + char *cptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + cptr = (char *)buffer; + ntodo = (long) nbytes; + + if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ + { /* so reload the last one that was used */ + ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); + } + + if (nbytes >= MINDIRECT) + { + /* write large blocks of data directly to disk instead of via buffers */ + /* first, fill up the current IO buffer before flushing it to disk */ + + nbuff = (fptr->Fptr)->curbuf; /* current IO buffer number */ + filepos = (fptr->Fptr)->bytepos; /* save the write starting position */ + recstart = bufrecnum[nbuff]; /* starting record */ + recend = (long) ((filepos + nbytes - 1) / IOBUFLEN); /* ending record */ + + /* bufpos is the starting position within the IO buffer */ + bufpos = (long) (filepos - ((LONGLONG)recstart * IOBUFLEN)); + nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ + + if (nspace) + { /* fill up the IO buffer */ + memcpy(iobuffer[nbuff] + bufpos, cptr, nspace); + ntodo -= nspace; /* decrement remaining number of bytes */ + cptr += nspace; /* increment user buffer pointer */ + filepos += nspace; /* increment file position pointer */ + dirty[nbuff] = TRUE; /* mark record as having been modified */ + } + + for (ii = 0; ii < NIOBUF; ii++) /* flush any affected buffers to disk */ + { + if (bufptr[ii] == fptr->Fptr && bufrecnum[ii] >= recstart + && bufrecnum[ii] <= recend ) + { + if (dirty[ii]) /* flush modified buffer to disk */ + ffbfwt(ii, status); + + bufptr[ii] = NULL; /* disassociate buffer from the file */ + } + } + + /* move to the correct write position */ + if ((fptr->Fptr)->io_pos != filepos) + ffseek(fptr->Fptr, filepos); + + nwrite = ((ntodo - 1) / IOBUFLEN) * IOBUFLEN; /* don't write last buff */ + + ffwrite(fptr->Fptr, nwrite, cptr, status); /* write the data */ + ntodo -= nwrite; /* decrement remaining number of bytes */ + cptr += nwrite; /* increment user buffer pointer */ + (fptr->Fptr)->io_pos = filepos + nwrite; /* update the file position */ + + if ((fptr->Fptr)->io_pos >= (fptr->Fptr)->filesize) /* at the EOF? */ + { + (fptr->Fptr)->filesize = (fptr->Fptr)->io_pos; /* increment file size */ + + /* initialize the current buffer with the correct fill value */ + if ((fptr->Fptr)->hdutype == ASCII_TBL) + memset(iobuffer[nbuff], 32, IOBUFLEN); /* blank fill */ + else + memset(iobuffer[nbuff], 0, IOBUFLEN); /* zero fill */ + } + else + { + /* read next record */ + ffread(fptr->Fptr, IOBUFLEN, iobuffer[nbuff], status); + (fptr->Fptr)->io_pos += IOBUFLEN; + } + + /* copy remaining bytes from user buffer into current IO buffer */ + memcpy(iobuffer[nbuff], cptr, ntodo); + dirty[nbuff] = TRUE; /* mark record as having been modified */ + bufrecnum[nbuff] = recend; /* record number */ + bufptr[nbuff] = fptr->Fptr; /* file pointer associated with IO buffer */ + + (fptr->Fptr)->logfilesize = maxvalue((fptr->Fptr)->logfilesize, + (LONGLONG)(recend + 1) * IOBUFLEN); + (fptr->Fptr)->bytepos = filepos + nwrite + ntodo; + } + else + { + /* bufpos is the starting position in IO buffer */ + bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)bufrecnum[(fptr->Fptr)->curbuf] * + IOBUFLEN)); + nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ + + while (ntodo) + { + nwrite = minvalue(ntodo, nspace); + + /* copy bytes from user's buffer to the IO buffer */ + memcpy(iobuffer[(fptr->Fptr)->curbuf] + bufpos, cptr, nwrite); + ntodo -= nwrite; /* decrement remaining number of bytes */ + cptr += nwrite; + (fptr->Fptr)->bytepos += nwrite; /* increment file position pointer */ + dirty[(fptr->Fptr)->curbuf] = TRUE; /* mark record as modified */ + + if (ntodo) /* load next record into a buffer */ + { + ffldrc(fptr, (long) ((fptr->Fptr)->bytepos / IOBUFLEN), IGNORE_EOF, status); + bufpos = 0; + nspace = IOBUFLEN; + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpbytoff(fitsfile *fptr, /* I - FITS file pointer */ + long gsize, /* I - size of each group of bytes */ + long ngroups, /* I - number of groups to write */ + long offset, /* I - size of gap between groups */ + void *buffer, /* I - buffer to be written */ + int *status) /* IO - error status */ +/* + put (write) the buffer of bytes to the output FITS file, with an offset + between each group of bytes. This function combines ffmbyt and ffpbyt + for increased efficiency. +*/ +{ + int bcurrent; + long ii, bufpos, nspace, nwrite, record; + char *cptr, *ioptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ + { /* so reload the last one that was used */ + ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); + } + + cptr = (char *)buffer; + bcurrent = (fptr->Fptr)->curbuf; /* number of the current IO buffer */ + record = bufrecnum[bcurrent]; /* zero-indexed record number */ + bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)record * IOBUFLEN)); /* start pos */ + nspace = IOBUFLEN - bufpos; /* amount of space left in buffer */ + ioptr = iobuffer[bcurrent] + bufpos; + + for (ii = 1; ii < ngroups; ii++) /* write all but the last group */ + { + /* copy bytes from user's buffer to the IO buffer */ + nwrite = minvalue(gsize, nspace); + memcpy(ioptr, cptr, nwrite); + cptr += nwrite; /* increment buffer pointer */ + + if (nwrite < gsize) /* entire group did not fit */ + { + dirty[bcurrent] = TRUE; /* mark record as having been modified */ + record++; + ffldrc(fptr, record, IGNORE_EOF, status); /* load next record */ + bcurrent = (fptr->Fptr)->curbuf; + ioptr = iobuffer[bcurrent]; + + nwrite = gsize - nwrite; + memcpy(ioptr, cptr, nwrite); + cptr += nwrite; /* increment buffer pointer */ + ioptr += (offset + nwrite); /* increment IO buffer pointer */ + nspace = IOBUFLEN - offset - nwrite; /* amount of space left */ + } + else + { + ioptr += (offset + nwrite); /* increment IO bufer pointer */ + nspace -= (offset + nwrite); + } + + if (nspace <= 0) /* beyond current record? */ + { + dirty[bcurrent] = TRUE; + record += ((IOBUFLEN - nspace) / IOBUFLEN); /* new record number */ + ffldrc(fptr, record, IGNORE_EOF, status); + bcurrent = (fptr->Fptr)->curbuf; + + bufpos = (-nspace) % IOBUFLEN; /* starting buffer pos */ + nspace = IOBUFLEN - bufpos; + ioptr = iobuffer[bcurrent] + bufpos; + } + } + + /* now write the last group */ + nwrite = minvalue(gsize, nspace); + memcpy(ioptr, cptr, nwrite); + cptr += nwrite; /* increment buffer pointer */ + + if (nwrite < gsize) /* entire group did not fit */ + { + dirty[bcurrent] = TRUE; /* mark record as having been modified */ + record++; + ffldrc(fptr, record, IGNORE_EOF, status); /* load next record */ + bcurrent = (fptr->Fptr)->curbuf; + ioptr = iobuffer[bcurrent]; + + nwrite = gsize - nwrite; + memcpy(ioptr, cptr, nwrite); + } + + dirty[bcurrent] = TRUE; /* mark record as having been modified */ + (fptr->Fptr)->bytepos = (fptr->Fptr)->bytepos + (ngroups * gsize) + + (ngroups - 1) * offset; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgbyt(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG nbytes, /* I - number of bytes to read */ + void *buffer, /* O - buffer to read into */ + int *status) /* IO - error status */ +/* + get (read) the requested number of bytes from the file, starting at + the current file position. Read large blocks of data directly from disk; + read smaller segments via intermediate IO buffers to improve efficiency. +*/ +{ + int ii; + LONGLONG filepos; + long recstart, recend, ntodo, bufpos, nspace, nread; + char *cptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + cptr = (char *)buffer; + + if (nbytes >= MINDIRECT) + { + /* read large blocks of data directly from disk instead of via buffers */ + filepos = (fptr->Fptr)->bytepos; /* save the read starting position */ + +/* note that in this case, ffmbyt has not been called, and so */ +/* bufrecnum[(fptr->Fptr)->curbuf] does not point to the intended */ +/* output buffer */ + + recstart = (long) (filepos / IOBUFLEN); /* starting record */ + recend = (long) ((filepos + nbytes - 1) / IOBUFLEN); /* ending record */ + + for (ii = 0; ii < NIOBUF; ii++) /* flush any affected buffers to disk */ + { + if (dirty[ii] && bufptr[ii] == fptr->Fptr && + bufrecnum[ii] >= recstart && bufrecnum[ii] <= recend) + { + ffbfwt(ii, status); /* flush modified buffer to disk */ + } + } + + /* move to the correct read position */ + if ((fptr->Fptr)->io_pos != filepos) + ffseek(fptr->Fptr, filepos); + + ffread(fptr->Fptr, (long) nbytes, cptr, status); /* read the data */ + (fptr->Fptr)->io_pos = filepos + nbytes; /* update the file position */ + } + else + { + /* read small chucks of data using the IO buffers for efficiency */ + + if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ + { /* so reload the last one that was used */ + ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); + } + + /* bufpos is the starting position in IO buffer */ + bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)bufrecnum[(fptr->Fptr)->curbuf] * + IOBUFLEN)); + nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ + + ntodo = (long) nbytes; + while (ntodo) + { + nread = minvalue(ntodo, nspace); + + /* copy bytes from IO buffer to user's buffer */ + memcpy(cptr, iobuffer[(fptr->Fptr)->curbuf] + bufpos, nread); + ntodo -= nread; /* decrement remaining number of bytes */ + cptr += nread; + (fptr->Fptr)->bytepos += nread; /* increment file position pointer */ + + if (ntodo) /* load next record into a buffer */ + { + ffldrc(fptr, (long) ((fptr->Fptr)->bytepos / IOBUFLEN), REPORT_EOF, status); + bufpos = 0; + nspace = IOBUFLEN; + } + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgbytoff(fitsfile *fptr, /* I - FITS file pointer */ + long gsize, /* I - size of each group of bytes */ + long ngroups, /* I - number of groups to read */ + long offset, /* I - size of gap between groups (may be < 0) */ + void *buffer, /* I - buffer to be filled */ + int *status) /* IO - error status */ +/* + get (read) the requested number of bytes from the file, starting at + the current file position. This function combines ffmbyt and ffgbyt + for increased efficiency. +*/ +{ + int bcurrent; + long ii, bufpos, nspace, nread, record; + char *cptr, *ioptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ + { /* so reload the last one that was used */ + ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); + } + + cptr = (char *)buffer; + bcurrent = (fptr->Fptr)->curbuf; /* number of the current IO buffer */ + record = bufrecnum[bcurrent]; /* zero-indexed record number */ + bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)record * IOBUFLEN)); /* start pos */ + nspace = IOBUFLEN - bufpos; /* amount of space left in buffer */ + ioptr = iobuffer[bcurrent] + bufpos; + + for (ii = 1; ii < ngroups; ii++) /* read all but the last group */ + { + /* copy bytes from IO buffer to the user's buffer */ + nread = minvalue(gsize, nspace); + memcpy(cptr, ioptr, nread); + cptr += nread; /* increment buffer pointer */ + + if (nread < gsize) /* entire group did not fit */ + { + record++; + ffldrc(fptr, record, REPORT_EOF, status); /* load next record */ + bcurrent = (fptr->Fptr)->curbuf; + ioptr = iobuffer[bcurrent]; + + nread = gsize - nread; + memcpy(cptr, ioptr, nread); + cptr += nread; /* increment buffer pointer */ + ioptr += (offset + nread); /* increment IO buffer pointer */ + nspace = IOBUFLEN - offset - nread; /* amount of space left */ + } + else + { + ioptr += (offset + nread); /* increment IO bufer pointer */ + nspace -= (offset + nread); + } + + if (nspace <= 0 || nspace > IOBUFLEN) /* beyond current record? */ + { + if (nspace <= 0) + { + record += ((IOBUFLEN - nspace) / IOBUFLEN); /* new record number */ + bufpos = (-nspace) % IOBUFLEN; /* starting buffer pos */ + } + else + { + record -= ((nspace - 1 ) / IOBUFLEN); /* new record number */ + bufpos = IOBUFLEN - (nspace % IOBUFLEN); /* starting buffer pos */ + } + + ffldrc(fptr, record, REPORT_EOF, status); + bcurrent = (fptr->Fptr)->curbuf; + + nspace = IOBUFLEN - bufpos; + ioptr = iobuffer[bcurrent] + bufpos; + } + } + + /* now read the last group */ + nread = minvalue(gsize, nspace); + memcpy(cptr, ioptr, nread); + cptr += nread; /* increment buffer pointer */ + + if (nread < gsize) /* entire group did not fit */ + { + record++; + ffldrc(fptr, record, REPORT_EOF, status); /* load next record */ + bcurrent = (fptr->Fptr)->curbuf; + ioptr = iobuffer[bcurrent]; + + nread = gsize - nread; + memcpy(cptr, ioptr, nread); + } + + (fptr->Fptr)->bytepos = (fptr->Fptr)->bytepos + (ngroups * gsize) + + (ngroups - 1) * offset; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffldrc(fitsfile *fptr, /* I - FITS file pointer */ + long record, /* I - record number to be loaded */ + int err_mode, /* I - 1=ignore EOF, 0 = return EOF error */ + int *status) /* IO - error status */ +{ +/* + low-level routine to load a specified record from a file into + a physical buffer, if it is not already loaded. Reset all + pointers to make this the new current record for that file. + Update ages of all the physical buffers. +*/ + int ibuff, nbuff; + LONGLONG rstart; + + /* check if record is already loaded in one of the buffers */ + /* search from youngest to oldest buffer for efficiency */ + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + for (ibuff = NIOBUF - 1; ibuff >= 0; ibuff--) + { + nbuff = ageindex[ibuff]; + if (bufptr[nbuff] == fptr->Fptr && record == bufrecnum[nbuff]) + goto updatebuf; /* use 'goto' for efficiency */ + } + + /* record is not already loaded */ + rstart = (LONGLONG)record * IOBUFLEN; + + if ( !err_mode && (rstart >= (fptr->Fptr)->logfilesize) ) /* EOF? */ + return(*status = END_OF_FILE); + + if (ffwhbf(fptr, &nbuff) < 0) /* which buffer should we reuse? */ + return(*status = TOO_MANY_FILES); + + if (dirty[nbuff]) + ffbfwt(nbuff, status); /* write dirty buffer to disk */ + + if (rstart >= (fptr->Fptr)->filesize) /* EOF? */ + { + /* initialize an empty buffer with the correct fill value */ + if ((fptr->Fptr)->hdutype == ASCII_TBL) + memset(iobuffer[nbuff], 32, IOBUFLEN); /* blank fill */ + else + memset(iobuffer[nbuff], 0, IOBUFLEN); /* zero fill */ + + (fptr->Fptr)->logfilesize = maxvalue((fptr->Fptr)->logfilesize, + rstart + IOBUFLEN); + + dirty[nbuff] = TRUE; /* mark record as having been modified */ + } + else /* not EOF, so read record from disk */ + { + if ((fptr->Fptr)->io_pos != rstart) + ffseek(fptr->Fptr, rstart); + + ffread(fptr->Fptr, IOBUFLEN, iobuffer[nbuff], status); + (fptr->Fptr)->io_pos = rstart + IOBUFLEN; /* set new IO position */ + } + + bufptr[nbuff] = fptr->Fptr; /* file pointer for this buffer */ + bufrecnum[nbuff] = record; /* record number contained in buffer */ + +updatebuf: + + (fptr->Fptr)->curbuf = nbuff; /* this is the current buffer for this file */ + + if (ibuff < 0) + { + /* find the current position of the buffer in the age index */ + for (ibuff = 0; ibuff < NIOBUF; ibuff++) + if (ageindex[ibuff] == nbuff) + break; + } + + /* increment the age of all the buffers that were younger than it */ + for (ibuff++; ibuff < NIOBUF; ibuff++) + ageindex[ibuff - 1] = ageindex[ibuff]; + + ageindex[NIOBUF - 1] = nbuff; /* this is now the youngest buffer */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffwhbf(fitsfile *fptr, /* I - FITS file pointer */ + int *nbuff) /* O - which buffer to use */ +{ +/* + decide which buffer to (re)use to hold a new file record +*/ + int ii, ibuff; + static int ageinit = 0; + + if (!ageinit) /* first time thru, initialize default age of buffers */ + { + for (ii = 0; ii < NIOBUF; ii++) + ageindex[ii] = ii; + ageinit = 1; + } + + for (ii = 0; ii < NIOBUF; ii++) + { + ibuff = ageindex[ii]; /* search from the oldest to youngest buffer */ + + if (bufptr[ibuff] == NULL || /* if buffer is empty, or */ + bufptr[ibuff]->curbuf != ibuff) /* is not the current buffer */ + return(*nbuff = ibuff); /* then choose this buffer */ + } + + /* all the buffers are locked, so we have to reuse the current one */ + /* If there is no current buffer (e.g., file has just been opened) */ + /* then use the oldest buffer. */ + + if ((fptr->Fptr)->curbuf < 0) { + bufptr[ageindex[0]]->curbuf = -1; /* this buffer no longer contains */ + /* the current buffer of another file */ + return(*nbuff = ageindex[0]); /* return oldest buffer */ + } else { + return(*nbuff = (fptr->Fptr)->curbuf); /* return current buffer */ + } +} +/*--------------------------------------------------------------------------*/ +int ffflus(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Flush all the data in the current FITS file to disk. This ensures that if + the program subsequently dies, the disk FITS file will be closed correctly. +*/ +{ + int hdunum, hdutype; + + if (*status > 0) + return(*status); + + ffghdn(fptr, &hdunum); /* get the current HDU number */ + + if (ffchdu(fptr,status) > 0) /* close out the current HDU */ + ffpmsg("ffflus could not close the current HDU."); + + ffflsh(fptr, FALSE, status); /* flush any modified IO buffers to disk */ + + if (ffgext(fptr, hdunum - 1, &hdutype, status) > 0) /* reopen HDU */ + ffpmsg("ffflus could not reopen the current HDU."); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffflsh(fitsfile *fptr, /* I - FITS file pointer */ + int clearbuf, /* I - also clear buffer contents? */ + int *status) /* IO - error status */ +{ +/* + flush all dirty IO buffers associated with the file to disk +*/ + int ii; + +/* + no need to move to a different HDU + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); +*/ + for (ii = 0; ii < NIOBUF; ii++) + { + if (bufptr[ii] == fptr->Fptr) + { + if (dirty[ii]) /* flush modified buffer to disk */ + ffbfwt(ii, status); + + if (clearbuf) + bufptr[ii] = NULL; /* set contents of buffer as undefined */ + } + } + + if (*status != READONLY_FILE) + ffflushx(fptr->Fptr); /* flush system buffers to disk */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbfeof(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +{ +/* + clear any buffers beyond the end of file +*/ + int ii; + + for (ii = 0; ii < NIOBUF; ii++) + { + if (bufptr[ii] == fptr->Fptr) + { + if ( (LONGLONG) bufrecnum[ii] * IOBUFLEN >= fptr->Fptr->filesize) + { + bufptr[ii] = NULL; /* set contents of buffer as undefined */ + } + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbfwt(int nbuff, /* I - which buffer to write */ + int *status) /* IO - error status */ +{ +/* + write contents of buffer to file; If the position of the buffer + is beyond the current EOF, then the file may need to be extended + with fill values, and/or with the contents of some of the other + i/o buffers. +*/ + FITSfile *Fptr; + int ii,ibuff; + long jj, irec, minrec, nloop; + LONGLONG filepos; + + static char zeros[IOBUFLEN]; /* initialized to zero by default */ + + Fptr = bufptr[nbuff]; + if (!(Fptr->writemode) ) + { + ffpmsg("Error: trying to write to READONLY file."); + dirty[nbuff] = FALSE; /* reset buffer status to prevent later probs */ + *status = READONLY_FILE; + return(*status); + } + + filepos = (LONGLONG)bufrecnum[nbuff] * IOBUFLEN; + + if (filepos <= Fptr->filesize) + { + /* record is located within current file, so just write it */ + + /* move to the correct write position */ + if (Fptr->io_pos != filepos) + ffseek(Fptr, filepos); + + ffwrite(Fptr, IOBUFLEN, iobuffer[nbuff], status); + Fptr->io_pos = filepos + IOBUFLEN; + + if (filepos == Fptr->filesize) /* appended new record? */ + Fptr->filesize += IOBUFLEN; /* increment the file size */ + + dirty[nbuff] = FALSE; + } + + else /* if record is beyond the EOF, append any other records */ + /* and/or insert fill values if necessary */ + { + /* move to EOF */ + if (Fptr->io_pos != Fptr->filesize) + ffseek(Fptr, Fptr->filesize); + + ibuff = NIOBUF; /* initialize to impossible value */ + while(ibuff != nbuff) /* repeat until requested buffer is written */ + { + minrec = (long) (Fptr->filesize / IOBUFLEN); + + /* write lowest record beyond the EOF first */ + + irec = bufrecnum[nbuff]; /* initially point to the requested buffer */ + ibuff = nbuff; + + for (ii = 0; ii < NIOBUF; ii++) + { + if (bufptr[ii] == Fptr && bufrecnum[ii] >= minrec && + bufrecnum[ii] < irec) + { + irec = bufrecnum[ii]; /* found a lower record */ + ibuff = ii; + } + } + + filepos = (LONGLONG)irec * IOBUFLEN; /* byte offset of record in file */ + + /* append 1 or more fill records if necessary */ + if (filepos > Fptr->filesize) + { + nloop = (long) ((filepos - (Fptr->filesize)) / IOBUFLEN); + for (jj = 0; jj < nloop && !(*status); jj++) + ffwrite(Fptr, IOBUFLEN, zeros, status); + +/* +ffseek(Fptr, filepos); +*/ + Fptr->filesize = filepos; /* increment the file size */ + } + + /* write the buffer itself */ + ffwrite(Fptr, IOBUFLEN, iobuffer[ibuff], status); + dirty[ibuff] = FALSE; + + Fptr->filesize += IOBUFLEN; /* increment the file size */ + } /* loop back if more buffers need to be written */ + + Fptr->io_pos = Fptr->filesize; /* currently positioned at EOF */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgrsz( fitsfile *fptr, /* I - FITS file pionter */ + long *ndata, /* O - optimal amount of data to access */ + int *status) /* IO - error status */ +/* + Returns an optimal value for the number of rows in a binary table + or the number of pixels in an image that should be read or written + at one time for maximum efficiency. Accessing more data than this + may cause excessive flushing and rereading of buffers to/from disk. +*/ +{ + int nfiles, typecode, bytesperpixel; + long repeat, width; + + /* There are NIOBUF internal buffers available each IOBUFLEN bytes long. */ + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header to get hdu struct */ + return(*status); + + /* determine how many different FITS files are currently open */ + nfiles = fits_get_num_files(); + + /* one buffer (at least) is always allocated to each open file */ + + if ((fptr->Fptr)->hdutype == IMAGE_HDU ) /* calc pixels per buffer size */ + { + /* image pixels are in column 2 of the 'table' */ + ffgtcl(fptr, 2, &typecode, &repeat, &width, status); + bytesperpixel = typecode / 10; + *ndata = ((NIOBUF - nfiles) * IOBUFLEN) / bytesperpixel; + } + else /* calc number of rows that fit in buffers */ + { + *ndata = (long) (((NIOBUF - nfiles) * IOBUFLEN) / maxvalue(1, + (fptr->Fptr)->rowlength)); + *ndata = maxvalue(1, *ndata); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_num_files(void) +/* + Returns the number of FITS files currently opened in CFITSIO +*/ +{ + int ii, jj, unique, nfiles; + + /* determine how many different FITS files are currently open */ + nfiles = 0; + for (ii = 0; ii < NIOBUF; ii++) + { + if (bufptr[ii]) + { + unique = TRUE; + + for (jj = 0; jj < ii; jj++) + { + if (bufptr[ii] == bufptr[jj]) + { + unique = FALSE; + break; + } + } + + if (unique) + nfiles++; + } + } + return(nfiles); +} +/*--------------------------------------------------------------------------*/ +int ffgtbb(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstrow, /* I - starting row (1 = first row) */ + LONGLONG firstchar, /* I - starting byte in row (1=first) */ + LONGLONG nchars, /* I - number of bytes to read */ + unsigned char *values, /* I - array of bytes to read */ + int *status) /* IO - error status */ +/* + read a consecutive string of bytes from an ascii or binary table. + This will span multiple rows of the table if nchars + firstchar is + greater than the length of a row. +*/ +{ + LONGLONG bytepos, endrow; + + if (*status > 0 || nchars <= 0) + return(*status); + + else if (firstrow < 1) + return(*status=BAD_ROW_NUM); + + else if (firstchar < 1) + return(*status=BAD_ELEM_NUM); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* check that we do not exceed number of rows in the table */ + endrow = ((firstchar + nchars - 2) / (fptr->Fptr)->rowlength) + firstrow; + if (endrow > (fptr->Fptr)->numrows) + { + ffpmsg("attempt to read past end of table (ffgtbb)"); + return(*status=BAD_ROW_NUM); + } + + /* move the i/o pointer to the start of the sequence of characters */ + bytepos = (fptr->Fptr)->datastart + + ((fptr->Fptr)->rowlength * (firstrow - 1)) + + firstchar - 1; + + ffmbyt(fptr, bytepos, REPORT_EOF, status); + ffgbyt(fptr, nchars, values, status); /* read the bytes */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgi1b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + unsigned char *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + LONGLONG postemp; + + if (incre == 1) /* read all the values at once (contiguous bytes) */ + { + if (nvals < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 1, nvals, incre - 1, values, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgi2b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + short *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + LONGLONG postemp; + + if (incre == 2) /* read all the values at once (contiguous bytes) */ + { + if (nvals * 2 < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals * 2, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals * 2, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 2, nvals, incre - 2, values, status); + } + +#if BYTESWAPPED + ffswap2(values, nvals); /* reverse order of bytes in each value */ +#endif + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgi4b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + INT32BIT *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + LONGLONG postemp; + + if (incre == 4) /* read all the values at once (contiguous bytes) */ + { + if (nvals * 4 < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals * 4, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals * 4, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 4, nvals, incre - 4, values, status); + } + +#if BYTESWAPPED + ffswap4(values, nvals); /* reverse order of bytes in each value */ +#endif + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgi8b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + long *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + This routine reads 'nvals' 8-byte integers into 'values'. + This works both on platforms that have sizeof(long) = 64, and 32, + as long as 'values' has been allocated to large enough to hold + 8 * nvals bytes of data. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +*/ +{ + LONGLONG postemp; + + if (incre == 8) /* read all the values at once (contiguous bytes) */ + { + if (nvals * 8 < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals * 8, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals * 8, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 8, nvals, incre - 8, values, status); + } + +#if BYTESWAPPED + ffswap8((double *) values, nvals); /* reverse bytes in each value */ +#endif + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgr4b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + float *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + LONGLONG postemp; + +#if MACHINE == VAXVMS + long ii; + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + short *sptr; + long ii; + +#endif + + + if (incre == 4) /* read all the values at once (contiguous bytes) */ + { + if (nvals * 4 < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals * 4, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals * 4, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 4, nvals, incre - 4, values, status); + } + + +#if MACHINE == VAXVMS + + ii = nvals; /* call VAX macro routine to convert */ + ieevur(values, values, &ii); /* from IEEE float -> F float */ + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + + ffswap2( (short *) values, nvals * 2); /* swap pairs of bytes */ + + /* convert from IEEE float format to VMS GFLOAT float format */ + sptr = (short *) values; + for (ii = 0; ii < nvals; ii++, sptr += 2) + { + if (!fnan(*sptr) ) /* test for NaN or underflow */ + values[ii] *= 4.0; + } + +#elif BYTESWAPPED + ffswap4((INT32BIT *)values, nvals); /* reverse order of bytes in values */ +#endif + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgr8b(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG byteloc, /* I - position within file to start reading */ + long nvals, /* I - number of pixels to read */ + long incre, /* I - byte increment between pixels */ + double *values, /* O - returned array of values */ + int *status) /* IO - error status */ +/* + get (read) the array of values from the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + LONGLONG postemp; + +#if MACHINE == VAXVMS + long ii; + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + short *sptr; + long ii; + +#endif + + if (incre == 8) /* read all the values at once (contiguous bytes) */ + { + if (nvals * 8 < MINDIRECT) /* read normally via IO buffers */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbyt(fptr, nvals * 8, values, status); + } + else /* read directly from disk, bypassing IO buffers */ + { + postemp = (fptr->Fptr)->bytepos; /* store current file position */ + (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ + ffgbyt(fptr, nvals * 8, values, status); + (fptr->Fptr)->bytepos = postemp; /* reset to original position */ + } + } + else /* have to read each value individually (not contiguous ) */ + { + ffmbyt(fptr, byteloc, REPORT_EOF, status); + ffgbytoff(fptr, 8, nvals, incre - 8, values, status); + } + +#if MACHINE == VAXVMS + ii = nvals; /* call VAX macro routine to convert */ + ieevud(values, values, &ii); /* from IEEE float -> D float */ + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + ffswap2( (short *) values, nvals * 4); /* swap pairs of bytes */ + + /* convert from IEEE float format to VMS GFLOAT float format */ + sptr = (short *) values; + for (ii = 0; ii < nvals; ii++, sptr += 4) + { + if (!dnan(*sptr) ) /* test for NaN or underflow */ + values[ii] *= 4.0; + } + +#elif BYTESWAPPED + ffswap8(values, nvals); /* reverse order of bytes in each value */ +#endif + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffptbb(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstrow, /* I - starting row (1 = first row) */ + LONGLONG firstchar, /* I - starting byte in row (1=first) */ + LONGLONG nchars, /* I - number of bytes to write */ + unsigned char *values, /* I - array of bytes to write */ + int *status) /* IO - error status */ +/* + write a consecutive string of bytes to an ascii or binary table. + This will span multiple rows of the table if nchars + firstchar is + greater than the length of a row. +*/ +{ + LONGLONG bytepos, endrow, nrows; + char message[81]; + + if (*status > 0 || nchars <= 0) + return(*status); + + else if (firstrow < 1) + return(*status=BAD_ROW_NUM); + + else if (firstchar < 1) + return(*status=BAD_ELEM_NUM); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart < 0) /* rescan header if data undefined */ + ffrdef(fptr, status); + + endrow = ((firstchar + nchars - 2) / (fptr->Fptr)->rowlength) + firstrow; + + /* check if we are writing beyond the current end of table */ + if (endrow > (fptr->Fptr)->numrows) + { + /* if there are more HDUs following the current one, or */ + /* if there is a data heap, then we must insert space */ + /* for the new rows. */ + if ( !((fptr->Fptr)->lasthdu) || (fptr->Fptr)->heapsize > 0) + { + nrows = endrow - ((fptr->Fptr)->numrows); + + /* ffirow also updates the heap address and numrows */ + if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) + { + sprintf(message, + "ffptbb failed to add space for %.0f new rows in table.", + (double) nrows); + ffpmsg(message); + return(*status); + } + } + else + { + /* manally update heap starting address */ + (fptr->Fptr)->heapstart += + ((LONGLONG)(endrow - (fptr->Fptr)->numrows) * + (fptr->Fptr)->rowlength ); + + (fptr->Fptr)->numrows = endrow; /* update number of rows */ + } + } + + /* move the i/o pointer to the start of the sequence of characters */ + bytepos = (fptr->Fptr)->datastart + + ((fptr->Fptr)->rowlength * (firstrow - 1)) + + firstchar - 1; + + ffmbyt(fptr, bytepos, IGNORE_EOF, status); + ffpbyt(fptr, nchars, values, status); /* write the bytes */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpi1b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + unsigned char *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ + if (incre == 1) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 1, nvals, incre - 1, values, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpi2b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + short *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ +#if BYTESWAPPED + ffswap2(values, nvals); /* reverse order of bytes in each value */ +#endif + + if (incre == 2) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals * 2, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 2, nvals, incre - 2, values, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpi4b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + INT32BIT *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ +#if BYTESWAPPED + ffswap4(values, nvals); /* reverse order of bytes in each value */ +#endif + + if (incre == 4) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals * 4, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 4, nvals, incre - 4, values, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpi8b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + long *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + This routine writes 'nvals' 8-byte integers from 'values'. + This works both on platforms that have sizeof(long) = 64, and 32, + as long as 'values' has been allocated to large enough to hold + 8 * nvals bytes of data. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +*/ +{ +#if BYTESWAPPED + ffswap8((double *) values, nvals); /* reverse bytes in each value */ +#endif + + if (incre == 8) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals * 8, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 8, nvals, incre - 8, values, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpr4b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + float *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ +#if MACHINE == VAXVMS + long ii; + + ii = nvals; /* call VAX macro routine to convert */ + ieevpr(values, values, &ii); /* from F float -> IEEE float */ + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + long ii; + + /* convert from VMS FFLOAT float format to IEEE float format */ + for (ii = 0; ii < nvals; ii++) + values[ii] *= 0.25; + + ffswap2( (short *) values, nvals * 2); /* swap pairs of bytes */ + +#elif BYTESWAPPED + ffswap4((INT32BIT *) values, nvals); /* reverse order of bytes in values */ +#endif + + if (incre == 4) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals * 4, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 4, nvals, incre - 4, values, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpr8b(fitsfile *fptr, /* I - FITS file pointer */ + long nvals, /* I - number of pixels in the values array */ + long incre, /* I - byte increment between pixels */ + double *values, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + put (write) the array of values to the FITS file, doing machine dependent + format conversion (e.g. byte-swapping) if necessary. +*/ +{ +#if MACHINE == VAXVMS + long ii; + + ii = nvals; /* call VAX macro routine to convert */ + ieevpd(values, values, &ii); /* from D float -> IEEE float */ + +#elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) + long ii; + + /* convert from VMS GFLOAT float format to IEEE float format */ + for (ii = 0; ii < nvals; ii++) + values[ii] *= 0.25; + + ffswap2( (short *) values, nvals * 4); /* swap pairs of bytes */ + +#elif BYTESWAPPED + ffswap8(values, nvals); /* reverse order of bytes in each value */ +#endif + + if (incre == 8) /* write all the values at once (contiguous bytes) */ + + ffpbyt(fptr, nvals * 8, values, status); + + else /* have to write each value individually (not contiguous ) */ + + ffpbytoff(fptr, 8, nvals, incre - 8, values, status); + + return(*status); +} + diff --git a/software/cfitsio3040/cfileio.c b/software/cfitsio3040/cfileio.c new file mode 100644 index 000000000..64d6739b9 --- /dev/null +++ b/software/cfitsio3040/cfileio.c @@ -0,0 +1,6345 @@ +/* This file, cfileio.c, contains the low-level file access routines. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include +#include /* apparently needed to define size_t */ +#include "fitsio2.h" +#include "group.h" + +#define MAX_PREFIX_LEN 20 /* max length of file type prefix (e.g. 'http://') */ +#define MAX_DRIVERS 23 /* max number of file I/O drivers */ + +typedef struct /* structure containing pointers to I/O driver functions */ +{ char prefix[MAX_PREFIX_LEN]; + int (*init)(void); + int (*shutdown)(void); + int (*setoptions)(int option); + int (*getoptions)(int *options); + int (*getversion)(int *version); + int (*checkfile)(char *urltype, char *infile, char *outfile); + int (*open)(char *filename, int rwmode, int *driverhandle); + int (*create)(char *filename, int *drivehandle); + int (*truncate)(int drivehandle, LONGLONG size); + int (*close)(int drivehandle); + int (*remove)(char *filename); + int (*size)(int drivehandle, LONGLONG *size); + int (*flush)(int drivehandle); + int (*seek)(int drivehandle, LONGLONG offset); + int (*read)(int drivehandle, void *buffer, long nbytes); + int (*write)(int drivehandle, void *buffer, long nbytes); +} fitsdriver; + +fitsdriver driverTable[MAX_DRIVERS]; /* allocate driver tables */ + +FITSfile *FptrTable[NMAXFILES]; /* this table of Fptr pointers is */ + /* used by fits_already_open */ + +int need_to_initialize = 1; /* true if CFITSIO has not been initialized */ +int no_of_drivers = 0; /* number of currently defined I/O drivers */ + +static int pixel_filter_helper(fitsfile **fptr, char *outfile, + char *expr, int *status); + + +/*--------------------------------------------------------------------------*/ +int ffomem(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + void **buffptr, /* I - address of memory pointer */ + size_t *buffsize, /* I - size of buffer, in bytes */ + size_t deltasize, /* I - increment for future realloc's */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + int *status) /* IO - error status */ +/* + Open an existing FITS file in core memory. This is a specialized version + of ffopen. +*/ +{ + int driver, handle, hdutyp, slen, movetotype, extvers, extnum; + char extname[FLEN_VALUE]; + LONGLONG filesize; + char urltype[MAX_PREFIX_LEN], infile[FLEN_FILENAME], outfile[FLEN_FILENAME]; + char extspec[FLEN_FILENAME], rowfilter[FLEN_FILENAME]; + char binspec[FLEN_FILENAME], colspec[FLEN_FILENAME]; + char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; + char *url, errmsg[FLEN_ERRMSG]; + char *hdtype[3] = {"IMAGE", "TABLE", "BINTABLE"}; + + if (*status > 0) + return(*status); + + *fptr = 0; /* initialize null file pointer */ + + if (need_to_initialize) /* this is called only once */ + { + if (need_to_initialize != 1) { + /* This is bad. looks like memory has been corrupted. */ + ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); + ffpmsg("Fatal condition detected in ffomem."); + *status = FILE_NOT_OPENED; + return(*status); + } + + *status = fits_init_cfitsio(); + + if (*status > 0) + return(*status); + } + + url = (char *) name; + while (*url == ' ') /* ignore leading spaces in the file spec */ + url++; + + /* parse the input file specification */ + ffiurl(url, urltype, infile, outfile, extspec, + rowfilter, binspec, colspec, status); + + strcpy(urltype, "memkeep://"); /* URL type for pre-existing memory file */ + + *status = urltype2driver(urltype, &driver); + + if (*status > 0) + { + ffpmsg("could not find driver for pre-existing memory file: (ffomem)"); + return(*status); + } + + /* call driver routine to open the memory file */ + *status = mem_openmem( buffptr, buffsize,deltasize, + mem_realloc, &handle); + + if (*status > 0) + { + ffpmsg("failed to open pre-existing memory file: (ffomem)"); + return(*status); + } + + /* get initial file size */ + *status = (*driverTable[driver].size)(handle, &filesize); + + if (*status > 0) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed get the size of the memory file: (ffomem)"); + return(*status); + } + + /* allocate fitsfile structure and initialize = 0 */ + *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + if (!(*fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffomem)"); + ffpmsg(url); + return(*status = MEMORY_ALLOCATION); + } + + /* allocate FITSfile structure and initialize = 0 */ + (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); + + if (!((*fptr)->Fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffomem)"); + ffpmsg(url); + free(*fptr); + *fptr = 0; + return(*status = MEMORY_ALLOCATION); + } + + slen = strlen(url) + 1; + slen = maxvalue(slen, 32); /* reserve at least 32 chars */ + ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ + + if ( !(((*fptr)->Fptr)->filename) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for filename: (ffomem)"); + ffpmsg(url); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* mem for headstart array */ + ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); + + if ( !(((*fptr)->Fptr)->headstart) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for headstart array: (ffomem)"); + ffpmsg(url); + free( ((*fptr)->Fptr)->filename); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* store the parameters describing the file */ + ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ + ((*fptr)->Fptr)->filehandle = handle; /* file handle */ + ((*fptr)->Fptr)->driver = driver; /* driver number */ + strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ + ((*fptr)->Fptr)->filesize = filesize; /* physical file size */ + ((*fptr)->Fptr)->logfilesize = filesize; /* logical file size */ + ((*fptr)->Fptr)->writemode = mode; /* read-write mode */ + ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ + ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ + ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ + ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ + + ffldrc(*fptr, 0, REPORT_EOF, status); /* load first record */ + + fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ + + if (ffrhdu(*fptr, &hdutyp, status) > 0) /* determine HDU structure */ + { + ffpmsg( + "ffomem could not interpret primary array header of file: (ffomem)"); + ffpmsg(url); + + if (*status == UNKNOWN_REC) + ffpmsg("This does not look like a FITS file."); + + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + } + + /* ---------------------------------------------------------- */ + /* move to desired extension, if specified as part of the URL */ + /* ---------------------------------------------------------- */ + + imagecolname[0] = '\0'; + rowexpress[0] = '\0'; + + if (*extspec) + { + /* parse the extension specifier into individual parameters */ + ffexts(extspec, &extnum, + extname, &extvers, &movetotype, imagecolname, rowexpress, status); + + + if (*status > 0) + return(*status); + + if (extnum) + { + ffmahd(*fptr, extnum + 1, &hdutyp, status); + } + else if (*extname) /* move to named extension, if specified */ + { + ffmnhd(*fptr, movetotype, extname, extvers, status); + } + + if (*status > 0) + { + ffpmsg("ffomem could not move to the specified extension:"); + if (extnum > 0) + { + sprintf(errmsg, + " extension number %d doesn't exist or couldn't be opened.",extnum); + ffpmsg(errmsg); + } + else + { + sprintf(errmsg, + " extension with EXTNAME = %s,", extname); + ffpmsg(errmsg); + + if (extvers) + { + sprintf(errmsg, + " and with EXTVERS = %d,", extvers); + ffpmsg(errmsg); + } + + if (movetotype != ANY_HDU) + { + sprintf(errmsg, + " and with XTENSION = %s,", hdtype[movetotype]); + ffpmsg(errmsg); + } + + ffpmsg(" doesn't exist or couldn't be opened."); + } + return(*status); + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdkopn(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file on magnetic disk with either readonly or + read/write access. The routine does not support CFITSIO's extended + filename syntax and simply uses the entire input 'name' string as + the name of the file. +*/ +{ + if (*status > 0) + return(*status); + + *status = OPEN_DISK_FILE; + + ffopen(fptr, name, mode, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdopn(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file with either readonly or read/write access. and + move to the first HDU that contains 'interesting' data, if the primary + array contains a null image (i.e., NAXIS = 0). +*/ +{ + if (*status > 0) + return(*status); + + *status = SKIP_NULL_PRIMARY; + + ffopen(fptr, name, mode, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftopn(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file with either readonly or read/write access. and + move to the first HDU that contains 'interesting' table (not an image). +*/ +{ + int hdutype; + + if (*status > 0) + return(*status); + + *status = SKIP_IMAGE; + + ffopen(fptr, name, mode, status); + + if (ffghdt(*fptr, &hdutype, status) <= 0) { + if (hdutype == IMAGE_HDU) + *status = NOT_TABLE; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffiopn(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file with either readonly or read/write access. and + move to the first HDU that contains 'interesting' image (not an table). +*/ +{ + int hdutype; + + if (*status > 0) + return(*status); + + *status = SKIP_TABLE; + + ffopen(fptr, name, mode, status); + + if (ffghdt(*fptr, &hdutype, status) <= 0) { + if (hdutype != IMAGE_HDU) + *status = NOT_IMAGE; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffopentest(double version, /* I - CFITSIO version number, from the */ + /* application program (fitsio.h file) */ + fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file with either readonly or read/write access. + First test that the version of fitsio.h used to build the CFITSIO library + is the same as the version used in building the application program that + links to the library. +*/ +{ + if (version != CFITSIO_VERSION) + { + printf("ERROR: Mismatch in the version of the fitsio.h include file used to build\n"); + printf("the CFITSIO library, and the version included by the application program:\n"); + printf(" Version used to build the CFITSIO library = %f\n",CFITSIO_VERSION); + printf(" Version included by the application program = %f\n",version); + + *status = FILE_NOT_OPENED; + return(*status); + } + + /* now call the normal file open routine */ + ffopen(fptr, name, mode, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffopen(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - full name of file to open */ + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *status) /* IO - error status */ +/* + Open an existing FITS file with either readonly or read/write access. +*/ +{ + fitsfile *newptr; + int driver, hdutyp, hdunum, slen, writecopy, isopen; + LONGLONG filesize; + long rownum, nrows, goodrows; + int extnum, extvers, handle, movetotype, tstatus = 0; + char urltype[MAX_PREFIX_LEN], infile[FLEN_FILENAME], outfile[FLEN_FILENAME]; + char origurltype[MAX_PREFIX_LEN], extspec[FLEN_FILENAME]; + char extname[FLEN_VALUE], rowfilter[FLEN_FILENAME], tblname[FLEN_VALUE]; + char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; + char binspec[FLEN_FILENAME], colspec[FLEN_FILENAME], pixfilter[FLEN_FILENAME]; + char histfilename[FLEN_FILENAME]; + char filtfilename[FLEN_FILENAME]; + char wtcol[FLEN_VALUE]; + char minname[4][FLEN_VALUE], maxname[4][FLEN_VALUE]; + char binname[4][FLEN_VALUE]; + + char *url; + double minin[4], maxin[4], binsizein[4], weight; + int imagetype, naxis = 1, haxis, recip; + int skip_null = 0, skip_image = 0, skip_table = 0, open_disk_file = 0; + char colname[4][FLEN_VALUE]; + char errmsg[FLEN_ERRMSG]; + char *hdtype[3] = {"IMAGE", "TABLE", "BINTABLE"}; + char *rowselect = 0; + + if (*status > 0) + return(*status); + + if (*status == SKIP_NULL_PRIMARY) + { + /* this special status value is used as a flag by ffdopn to tell */ + /* ffopen to skip over a null primary array when opening the file. */ + + skip_null = 1; + *status = 0; + } + else if (*status == SKIP_IMAGE) + { + /* this special status value is used as a flag by fftopn to tell */ + /* ffopen to move to 1st significant table when opening the file. */ + + skip_image = 1; + *status = 0; + } + else if (*status == SKIP_TABLE) + { + /* this special status value is used as a flag by ffiopn to tell */ + /* ffopen to move to 1st significant image when opening the file. */ + + skip_table = 1; + *status = 0; + } + else if (*status == OPEN_DISK_FILE) + { + /* this special status value is used as a flag by ffdkopn to tell */ + /* ffopen to not interpret the input filename using CFITSIO's */ + /* extended filename syntax, and simply open the specified disk file */ + + open_disk_file = 1; + *status = 0; + } + + *fptr = 0; /* initialize null file pointer */ + writecopy = 0; /* have we made a write-able copy of the input file? */ + + if (need_to_initialize) { /* this is called only once */ + + if (need_to_initialize != 1) { + /* This is bad. looks like memory has been corrupted. */ + ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); + ffpmsg("Fatal condition detected in ffopen."); + *status = FILE_NOT_OPENED; + return(*status); + } + + *status = fits_init_cfitsio(); + } + + if (*status > 0) + return(*status); + + url = (char *) name; + while (*url == ' ') /* ignore leading spaces in the filename */ + url++; + + if (*url == '\0') + { + ffpmsg("Name of file to open is blank. (ffopen)"); + return(*status = FILE_NOT_OPENED); + } + + if (open_disk_file) + { + /* treat the input URL literally as the name of the file to open */ + /* and don't try to parse the URL using the extended filename syntax */ + + strcpy(infile,url); + strcpy(urltype, "file://"); + outfile[0] = '\0'; + extspec[0] = '\0'; + binspec[0] = '\0'; + colspec[0] = '\0'; + rowfilter[0] = '\0'; + pixfilter[0] = '\0'; + } + else + { + /* parse the input file specification */ + fits_parse_input_filename(url, urltype, infile, outfile, extspec, + rowfilter, binspec, colspec, pixfilter, status); + } + + if (*status > 0) + { + ffpmsg("could not parse the input filename: (ffopen)"); + ffpmsg(url); + return(*status); + } + + imagecolname[0] = '\0'; + rowexpress[0] = '\0'; + + if (*extspec) + { + /* parse the extension specifier into individual parameters */ + ffexts(extspec, &extnum, + extname, &extvers, &movetotype, imagecolname, rowexpress, status); + + if (*status > 0) + return(*status); + } + + /*-------------------------------------------------------------------*/ + /* special cases: */ + /*-------------------------------------------------------------------*/ + + histfilename[0] = '\0'; + filtfilename[0] = '\0'; + if (*outfile && (*binspec || *imagecolname || *pixfilter)) + { + /* if binspec or imagecolumn are specified, then the */ + /* output file name is intended for the final image, */ + /* and not a copy of the input file. */ + strcpy(histfilename, outfile); + outfile[0] = '\0'; + } + else if (*outfile && (*rowfilter || *colspec)) + { + /* if rowfilter or colspece are specified, then the */ + /* output file name is intended for the filtered file */ + /* and not a copy of the input file. */ + strcpy(filtfilename, outfile); + outfile[0] = '\0'; + } + + /*-------------------------------------------------------------------*/ + /* check if this same file is already open, and if so, attach to it */ + /*-------------------------------------------------------------------*/ + + if (fits_already_open(fptr, url, urltype, infile, extspec, rowfilter, + binspec, colspec, mode, &isopen, status) > 0) + { + return(*status); + } + + if (isopen) + goto move2hdu; + + /* get the driver number corresponding to this urltype */ + *status = urltype2driver(urltype, &driver); + + if (*status > 0) + { + ffpmsg("could not find driver for this file: (ffopen)"); + ffpmsg(urltype); + ffpmsg(url); + return(*status); + } + + /*------------------------------------------------------------------- + deal with all those messy special cases which may require that + a different driver be used: + - is disk file compressed? + - are ftp:, gsiftp:, or http: files compressed? + - has user requested that a local copy be made of + the ftp or http file? + -------------------------------------------------------------------*/ + + if (driverTable[driver].checkfile) + { + strcpy(origurltype,urltype); /* Save the urltype */ + + /* 'checkfile' may modify the urltype, infile and outfile strings */ + *status = (*driverTable[driver].checkfile)(urltype, infile, outfile); + + if (*status) + { + ffpmsg("checkfile failed for this file: (ffopen)"); + ffpmsg(url); + return(*status); + } + + if (strcmp(origurltype, urltype)) /* did driver changed on us? */ + { + *status = urltype2driver(urltype, &driver); + if (*status > 0) + { + ffpmsg("could not change driver for this file: (ffopen)"); + ffpmsg(url); + ffpmsg(urltype); + return(*status); + } + } + } + + /* call appropriate driver to open the file */ + if (driverTable[driver].open) + { + *status = (*driverTable[driver].open)(infile, mode, &handle); + if (*status > 0) + { + ffpmsg("failed to find or open the following file: (ffopen)"); + ffpmsg(url); + return(*status); + } + } + else + { + ffpmsg("cannot open an existing file of this type: (ffopen)"); + ffpmsg(url); + return(*status = FILE_NOT_OPENED); + } + + /* get initial file size */ + *status = (*driverTable[driver].size)(handle, &filesize); + if (*status > 0) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed get the size of the following file: (ffopen)"); + ffpmsg(url); + return(*status); + } + + /* allocate fitsfile structure and initialize = 0 */ + *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + if (!(*fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffopen)"); + ffpmsg(url); + return(*status = MEMORY_ALLOCATION); + } + + /* allocate FITSfile structure and initialize = 0 */ + (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); + + if (!((*fptr)->Fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffopen)"); + ffpmsg(url); + free(*fptr); + *fptr = 0; + return(*status = MEMORY_ALLOCATION); + } + + slen = strlen(url) + 1; + slen = maxvalue(slen, 32); /* reserve at least 32 chars */ + ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ + + if ( !(((*fptr)->Fptr)->filename) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for filename: (ffopen)"); + ffpmsg(url); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* mem for headstart array */ + ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); + + if ( !(((*fptr)->Fptr)->headstart) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for headstart array: (ffopen)"); + ffpmsg(url); + free( ((*fptr)->Fptr)->filename); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + /* store the parameters describing the file */ + ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ + ((*fptr)->Fptr)->filehandle = handle; /* file handle */ + ((*fptr)->Fptr)->driver = driver; /* driver number */ + strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ + ((*fptr)->Fptr)->filesize = filesize; /* physical file size */ + ((*fptr)->Fptr)->logfilesize = filesize; /* logical file size */ + ((*fptr)->Fptr)->writemode = mode; /* read-write mode */ + ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ + ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ + ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ + ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ + + ffldrc(*fptr, 0, REPORT_EOF, status); /* load first record */ + + fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ + + if (ffrhdu(*fptr, &hdutyp, status) > 0) /* determine HDU structure */ + { + ffpmsg( + "ffopen could not interpret primary array header of file: "); + ffpmsg(url); + + if (*status == UNKNOWN_REC) + ffpmsg("This does not look like a FITS file."); + + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + /* ------------------------------------------------------------- */ + /* At this point, the input file has been opened. If outfile was */ + /* specified, then we have opened a copy of the file, not the */ + /* original file so it is safe to modify it if necessary */ + /* ------------------------------------------------------------- */ + + if (*outfile) + writecopy = 1; + +move2hdu: + + /* ---------------------------------------------------------- */ + /* move to desired extension, if specified as part of the URL */ + /* ---------------------------------------------------------- */ + + if (*extspec) + { + if (extnum) /* extension number was specified */ + { + ffmahd(*fptr, extnum + 1, &hdutyp, status); + } + else if (*extname) /* move to named extension, if specified */ + { + ffmnhd(*fptr, movetotype, extname, extvers, status); + } + + if (*status > 0) /* clean up after error */ + { + ffpmsg("ffopen could not move to the specified extension:"); + if (extnum > 0) + { + sprintf(errmsg, + " extension number %d doesn't exist or couldn't be opened.",extnum); + ffpmsg(errmsg); + } + else + { + sprintf(errmsg, + " extension with EXTNAME = %s,", extname); + ffpmsg(errmsg); + + if (extvers) + { + sprintf(errmsg, + " and with EXTVERS = %d,", extvers); + ffpmsg(errmsg); + } + + if (movetotype != ANY_HDU) + { + sprintf(errmsg, + " and with XTENSION = %s,", hdtype[movetotype]); + ffpmsg(errmsg); + } + + ffpmsg(" doesn't exist or couldn't be opened."); + } + + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + } + else if (skip_null || skip_image || skip_table || + (*imagecolname || *colspec || *rowfilter || *binspec)) + { + /* ------------------------------------------------------------------ + + If no explicit extension specifier is given as part of the file + name, and, if a) skip_null is true (set if ffopen is called by + ffdopn) or b) skip_image or skip_table is true (set if ffopen is + called by fftopn or ffdopn) or c) other file filters are + specified, then CFITSIO will attempt to move to the first + 'interesting' HDU after opening an existing FITS file (or to + first interesting table HDU if skip_image is true); + + An 'interesting' HDU is defined to be either an image with NAXIS + > 0 (i.e., not a null array) or a table which has an EXTNAME + value which does not contain any of the following strings: + 'GTI' - Good Time Interval extension + 'OBSTABLE' - used in Beppo SAX data files + + The main purpose for this is to allow CFITSIO to skip over a null + primary and other non-interesting HDUs when opening an existing + file, and move directly to the first extension that contains + significant data. + ------------------------------------------------------------------ */ + + fits_get_hdu_num(*fptr, &hdunum); + if (hdunum == 1) { + + fits_get_img_dim(*fptr, &naxis, status); + + if (naxis == 0 || skip_image) /* skip primary array */ + { + while(1) + { + /* see if the next HDU is 'interesting' */ + if (fits_movrel_hdu(*fptr, 1, &hdutyp, status)) + { + if (*status == END_OF_FILE) + *status = 0; /* reset expected error */ + + /* didn't find an interesting HDU so move back to beginning */ + fits_movabs_hdu(*fptr, 1, &hdutyp, status); + break; + } + + if (hdutyp == IMAGE_HDU && skip_image) { + + continue; /* skip images */ + + } else if (hdutyp != IMAGE_HDU && skip_table) { + + continue; /* skip tables */ + + } else if (hdutyp == IMAGE_HDU) { + + fits_get_img_dim(*fptr, &naxis, status); + if (naxis > 0) + break; /* found a non-null image */ + + } else { + + tstatus = 0; + tblname[0] = '\0'; + fits_read_key(*fptr, TSTRING, "EXTNAME", tblname, NULL,&tstatus); + + if ( (!strstr(tblname, "GTI") && !strstr(tblname, "gti")) && + strncasecmp(tblname, "OBSTABLE", 8) ) + break; /* found an interesting table */ + } + } /* end while */ + } + } /* end if (hdunum==1) */ + } + + if (*imagecolname) + { + /* ----------------------------------------------------------------- */ + /* we need to open an image contained in a single table cell */ + /* First, determine which row of the table to use. */ + /* ----------------------------------------------------------------- */ + + if (isdigit((int) *rowexpress)) /* is the row specification a number? */ + { + sscanf(rowexpress, "%ld", &rownum); + if (rownum < 1) + { + ffpmsg("illegal rownum for image cell:"); + ffpmsg(rowexpress); + ffpmsg("Could not open the following image in a table cell:"); + ffpmsg(extspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status = BAD_ROW_NUM); + } + } + else if (fits_find_first_row(*fptr, rowexpress, &rownum, status) > 0) + { + ffpmsg("Failed to find row matching this expression:"); + ffpmsg(rowexpress); + ffpmsg("Could not open the following image in a table cell:"); + ffpmsg(extspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + if (rownum == 0) + { + ffpmsg("row statisfying this expression doesn't exist::"); + ffpmsg(rowexpress); + ffpmsg("Could not open the following image in a table cell:"); + ffpmsg(extspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status = BAD_ROW_NUM); + } + + /* determine the name of the new file to contain copy of the image */ + if (*histfilename && !(*pixfilter) ) + strcpy(outfile, histfilename); /* the original outfile name */ + else + strcpy(outfile, "mem://_1"); /* create image file in memory */ + + /* Copy the image into new primary array and open it as the current */ + /* fptr. This will close the table that contains the original image. */ + + /* create new empty file to hold copy of the image */ + if (ffinit(&newptr, outfile, status) > 0) + { + ffpmsg("failed to create file for copy of image in table cell:"); + ffpmsg(outfile); + return(*status); + } + + if (fits_copy_cell2image(*fptr, newptr, imagecolname, rownum, + status) > 0) + { + ffpmsg("Failed to copy table cell to new primary array:"); + ffpmsg(extspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + /* close the original file and set fptr to the new image */ + ffclos(*fptr, status); + + *fptr = newptr; /* reset the pointer to the new table */ + + writecopy = 1; /* we are now dealing with a copy of the original file */ + + /* add some HISTORY; fits_copy_image_cell also wrote HISTORY keywords */ + +/* disable this; leave it up to calling routine to write any HISTORY keywords + if (*extname) + sprintf(card,"HISTORY in HDU '%.16s' of file '%.36s'",extname,infile); + else + sprintf(card,"HISTORY in HDU %d of file '%.45s'", extnum, infile); + + ffprec(*fptr, card, status); +*/ + } + + /* --------------------------------------------------------------------- */ + /* edit columns (and/or keywords) in the table, if specified in the URL */ + /* --------------------------------------------------------------------- */ + + if (*colspec) + { + /* the column specifier will modify the file, so make sure */ + /* we are already dealing with a copy, or else make a new copy */ + + if (!writecopy) /* Is the current file already a copy? */ + writecopy = fits_is_this_a_copy(urltype); + + if (!writecopy) + { + if (*filtfilename && *outfile == '\0') + strcpy(outfile, filtfilename); /* the original outfile name */ + else + strcpy(outfile, "mem://_1"); /* will create copy in memory */ + + writecopy = 1; + } + else + { + ((*fptr)->Fptr)->writemode = READWRITE; /* we have write access */ + outfile[0] = '\0'; + } + + if (ffedit_columns(fptr, outfile, colspec, status) > 0) + { + ffpmsg("editing columns in input table failed (ffopen)"); + ffpmsg(" while trying to perform the following operation:"); + ffpmsg(colspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + } + + /* ------------------------------------------------------------------- */ + /* select rows from the table, if specified in the URL */ + /* or select a subimage (if this is an image HDU and not a table) */ + /* ------------------------------------------------------------------- */ + + if (*rowfilter) + { + fits_get_hdu_type(*fptr, &hdutyp, status); /* get type of HDU */ + if (hdutyp == IMAGE_HDU) + { + /* this is an image so 'rowfilter' is an image section specification */ + + if (*filtfilename && *outfile == '\0') + strcpy(outfile, filtfilename); /* the original outfile name */ + else if (*outfile == '\0') /* output file name not already defined? */ + strcpy(outfile, "mem://_2"); /* will create file in memory */ + + /* create new file containing the image section, plus a copy of */ + /* any other HDUs that exist in the input file. This routine */ + /* will close the original image file and return a pointer */ + /* to the new file. */ + + if (fits_select_image_section(fptr, outfile, rowfilter, status) > 0) + { + ffpmsg("on-the-fly selection of image section failed (ffopen)"); + ffpmsg(" while trying to use the following section filter:"); + ffpmsg(rowfilter); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + writecopy = 1; + } + else + { + /* this is a table HDU, so the rowfilter is really a row filter */ + + if (*binspec) + { + /* since we are going to make a histogram of the selected rows, */ + /* it would be a waste of time and memory to make a whole copy of */ + /* the selected rows. Instead, just construct an array of TRUE */ + /* or FALSE values that indicate which rows are to be included */ + /* in the histogram and pass that to the histogram generating */ + /* routine */ + + fits_get_num_rows(*fptr, &nrows, status); /* get no. of rows */ + + rowselect = (char *) calloc(nrows, 1); + if (!rowselect) + { + ffpmsg( + "failed to allocate memory for selected columns array (ffopen)"); + ffpmsg(" while trying to select rows with the following filter:"); + ffpmsg(rowfilter); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + if (fits_find_rows(*fptr, rowfilter, 1L, nrows, &goodrows, + rowselect, status) > 0) + { + ffpmsg("selection of rows in input table failed (ffopen)"); + ffpmsg(" while trying to select rows with the following filter:"); + ffpmsg(rowfilter); + free(rowselect); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + } + else + { + if (!writecopy) /* Is the current file already a copy? */ + writecopy = fits_is_this_a_copy(urltype); + + if (!writecopy) + { + if (*filtfilename && *outfile == '\0') + strcpy(outfile, filtfilename); /* the original outfile name */ + else if (*outfile == '\0') /* output filename not already defined? */ + strcpy(outfile, "mem://_2"); /* will create copy in memory */ + } + else + { + ((*fptr)->Fptr)->writemode = READWRITE; /* we have write access */ + outfile[0] = '\0'; + } + + /* select rows in the table. If a copy of the input file has */ + /* not already been made, then this routine will make a copy */ + /* and then close the input file, so that the modifications will */ + /* only be made on the copy, not the original */ + + if (ffselect_table(fptr, outfile, rowfilter, status) > 0) + { + ffpmsg("on-the-fly selection of rows in input table failed (ffopen)"); + ffpmsg(" while trying to select rows with the following filter:"); + ffpmsg(rowfilter); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + /* write history records */ + ffphis(*fptr, + "CFITSIO used the following filtering expression to create this table:", + status); + ffphis(*fptr, name, status); + + } /* end of no binspec case */ + } /* end of table HDU case */ + } /* end of rowfilter exists case */ + + /* ------------------------------------------------------------------- */ + /* make an image histogram by binning columns, if specified in the URL */ + /* ------------------------------------------------------------------- */ + + if (*binspec) + { + if (*histfilename && !(*pixfilter) ) + strcpy(outfile, histfilename); /* the original outfile name */ + else + strcpy(outfile, "mem://_3"); /* create histogram in memory */ + /* if not already copied the file */ + + /* parse the binning specifier into individual parameters */ + ffbins(binspec, &imagetype, &haxis, colname, + minin, maxin, binsizein, + minname, maxname, binname, + &weight, wtcol, &recip, status); + + /* Create the histogram primary array and open it as the current fptr */ + /* This will close the table that was used to create the histogram. */ + ffhist(fptr, outfile, imagetype, haxis, colname, minin, maxin, + binsizein, minname, maxname, binname, + weight, wtcol, recip, rowselect, status); + + if (rowselect) + free(rowselect); + + if (*status > 0) + { + ffpmsg("on-the-fly histogramming of input table failed (ffopen)"); + ffpmsg(" while trying to execute the following histogram specification:"); + ffpmsg(binspec); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + /* write history records */ + ffphis(*fptr, + "CFITSIO used the following expression to create this histogram:", + status); + ffphis(*fptr, name, status); + } + + if (*pixfilter) + { + if (*histfilename) + strcpy(outfile, histfilename); /* the original outfile name */ + else + strcpy(outfile, "mem://_4"); /* create in memory */ + /* if not already copied the file */ + + /* Ensure type of HDU is consistent with pixel filtering */ + fits_get_hdu_type(*fptr, &hdutyp, status); /* get type of HDU */ + if (hdutyp == IMAGE_HDU) { + + pixel_filter_helper(fptr, outfile, pixfilter, status); + + if (*status > 0) { + ffpmsg("pixel filtering of input image failed (ffopen)"); + ffpmsg(" while trying to execute the following:"); + ffpmsg(pixfilter); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + return(*status); + } + + /* write history records */ + ffphis(*fptr, + "CFITSIO used the following expression to create this image:", + status); + ffphis(*fptr, name, status); + + return *status; + } + else { + ffpmsg("cannot use pixel filter on non-IMAGE HDU"); + ffpmsg(pixfilter); + ffclos(*fptr, status); + *fptr = 0; /* return null file pointer */ + *status = NOT_IMAGE; + return(*status); + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffreopen(fitsfile *openfptr, /* I - FITS file pointer to open file */ + fitsfile **newfptr, /* O - pointer to new re opened file */ + int *status) /* IO - error status */ +/* + Reopen an existing FITS file with either readonly or read/write access. + The reopened file shares the same FITSfile structure but may point to a + different HDU within the file. +*/ +{ + if (*status > 0) + return(*status); + + /* check that the open file pointer is valid */ + if (!openfptr) + return(*status = NULL_INPUT_PTR); + else if ((openfptr->Fptr)->validcode != VALIDSTRUC) /* check magic value */ + return(*status = BAD_FILEPTR); + + /* allocate fitsfile structure and initialize = 0 */ + *newfptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + (*newfptr)->Fptr = openfptr->Fptr; /* both point to the same structure */ + (*newfptr)->HDUposition = 0; /* set initial position to primary array */ + (((*newfptr)->Fptr)->open_count)++; /* increment the file usage counter */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_store_Fptr(FITSfile *Fptr, /* O - FITS file pointer */ + int *status) /* IO - error status */ +/* + store the new Fptr address for future use by fits_already_open +*/ +{ + int ii; + + if (*status > 0) + return(*status); + + for (ii = 0; ii < NMAXFILES; ii++) { + if (FptrTable[ii] == 0) { + FptrTable[ii] = Fptr; + break; + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_clear_Fptr(FITSfile *Fptr, /* O - FITS file pointer */ + int *status) /* IO - error status */ +/* + clear the Fptr address from the Fptr Table +*/ +{ + int ii; + + for (ii = 0; ii < NMAXFILES; ii++) { + if (FptrTable[ii] == Fptr) { + FptrTable[ii] = 0; + break; + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_already_open(fitsfile **fptr, /* I/O - FITS file pointer */ + char *url, + char *urltype, + char *infile, + char *extspec, + char *rowfilter, + char *binspec, + char *colspec, + int mode, /* I - 0 = open readonly; 1 = read/write */ + int *isopen, /* O - 1 = file is already open */ + int *status) /* IO - error status */ +/* + Check if the file to be opened is already open. If so, then attach to it. +*/ + /* + this function was changed so that for files of access method FILE:// + the file paths are compared using standard URL syntax and absolute + paths (as opposed to relative paths). This eliminates some instances + where a file is already opened but it is not realized because it + was opened with another file path. For instance, if the CWD is + /a/b/c and I open /a/b/c/foo.fits then open ./foo.fits the previous + version of this function would not have reconized that the two files + were the same. This version does recognize that the two files are + the same. + */ +{ + FITSfile *oldFptr; + int ii; + char oldurltype[MAX_PREFIX_LEN], oldinfile[FLEN_FILENAME]; + char oldextspec[FLEN_FILENAME], oldoutfile[FLEN_FILENAME]; + char oldrowfilter[FLEN_FILENAME]; + char oldbinspec[FLEN_FILENAME], oldcolspec[FLEN_FILENAME]; + char cwd[FLEN_FILENAME]; + char tmpStr[FLEN_FILENAME]; + char tmpinfile[FLEN_FILENAME]; + + *isopen = 0; + + if(strcasecmp(urltype,"FILE://") == 0) + { + fits_path2url(infile,tmpinfile,status); + + if(tmpinfile[0] != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,tmpinfile); + fits_clean_url(cwd,tmpinfile,status); + } + } + else + strcpy(tmpinfile,infile); + + for (ii = 0; ii < NMAXFILES; ii++) /* check every buffer */ + { + if (FptrTable[ii] != 0) + { + oldFptr = FptrTable[ii]; + + ffiurl(oldFptr->filename, oldurltype, + oldinfile, oldoutfile, oldextspec, oldrowfilter, + oldbinspec, oldcolspec, status); + + if (*status > 0) + { + ffpmsg("could not parse the previously opened filename: (ffopen)"); + ffpmsg(oldFptr->filename); + return(*status); + } + + if(strcasecmp(oldurltype,"FILE://") == 0) + { + fits_path2url(oldinfile,tmpStr,status); + + if(tmpStr[0] != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,tmpStr); + fits_clean_url(cwd,tmpStr,status); + } + + strcpy(oldinfile,tmpStr); + } + + if (!strcmp(urltype, oldurltype) && !strcmp(tmpinfile, oldinfile) ) + { + /* identical type of file and root file name */ + + if ( (!rowfilter[0] && !oldrowfilter[0] && + !binspec[0] && !oldbinspec[0] && + !colspec[0] && !oldcolspec[0]) + + /* no filtering or binning specs for either file, so */ + /* this is a case where the same file is being reopened. */ + /* It doesn't matter if the extensions are different */ + + || /* or */ + + (!strcmp(rowfilter, oldrowfilter) && + !strcmp(binspec, oldbinspec) && + !strcmp(colspec, oldcolspec) && + !strcmp(extspec, oldextspec) ) ) + + /* filtering specs are given and are identical, and */ + /* the same extension is specified */ + + { + if (mode == READWRITE && oldFptr->writemode == READONLY) + { + /* + cannot assume that a file previously opened with READONLY + can now be written to (e.g., files on CDROM, or over the + the network, or STDIN), so return with an error. + */ + + ffpmsg( + "cannot reopen file READWRITE when previously opened READONLY"); + ffpmsg(url); + return(*status = FILE_NOT_OPENED); + } + + *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + if (!(*fptr)) + { + ffpmsg( + "failed to allocate structure for following file: (ffopen)"); + ffpmsg(url); + return(*status = MEMORY_ALLOCATION); + } + + (*fptr)->Fptr = oldFptr; /* point to the structure */ + (*fptr)->HDUposition = 0; /* set initial position */ + (((*fptr)->Fptr)->open_count)++; /* increment usage counter */ + + if (binspec[0]) /* if binning specified, don't move */ + extspec[0] = '\0'; + + /* all the filtering has already been applied, so ignore */ + rowfilter[0] = '\0'; + binspec[0] = '\0'; + colspec[0] = '\0'; + + *isopen = 1; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_is_this_a_copy(char *urltype) /* I - type of file */ +/* + specialized routine that returns 1 if the file is known to be a temporary + copy of the originally opened file. Otherwise it returns 0. +*/ +{ + int iscopy; + + if (!strncmp(urltype, "mem", 3) ) + iscopy = 1; /* file copy is in memory */ + else if (!strncmp(urltype, "compress", 8) ) + iscopy = 1; /* compressed diskfile that is uncompressed in memory */ + else if (!strncmp(urltype, "http", 4) ) + iscopy = 1; /* copied file using http protocol */ + else if (!strncmp(urltype, "ftp", 3) ) + iscopy = 1; /* copied file using ftp protocol */ + else if (!strncmp(urltype, "gsiftp", 6) ) + iscopy = 1; /* copied file using gsiftp protocol */ + else if (!strncpy(urltype, "stdin", 5) ) + iscopy = 1; /* piped stdin has been copied to memory */ + else + iscopy = 0; /* file is not known to be a copy */ + + return(iscopy); +} +/*--------------------------------------------------------------------------*/ +int ffedit_columns( + fitsfile **fptr, /* IO - pointer to input table; on output it */ + /* points to the new selected rows table */ + char *outfile, /* I - name for output file */ + char *expr, /* I - column edit expression */ + int *status) +/* + modify columns in a table and/or header keywords in the HDU +*/ +{ + fitsfile *newptr; + int ii, hdunum, slen, colnum = -1, testnum, deletecol = 0, savecol = 0; + int numcols = 0, *colindex = 0, tstatus = 0; + char *cptr, *cptr2, *cptr3, clause[FLEN_FILENAME], keyname[FLEN_KEYWORD]; + char colname[FLEN_VALUE], oldname[FLEN_VALUE], colformat[FLEN_VALUE]; + char *file_expr = NULL, testname[FLEN_VALUE], card[FLEN_CARD]; + + if (*outfile) + { + /* create new empty file in to hold the selected rows */ + if (ffinit(&newptr, outfile, status) > 0) + { + ffpmsg("failed to create file for copy (ffedit_columns)"); + return(*status); + } + + fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ + + /* copy all HDUs to the output copy */ + + for (ii = 1; 1; ii++) + { + if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) + break; + + fits_copy_hdu(*fptr, newptr, 0, status); + } + + if (*status == END_OF_FILE) + { + *status = 0; /* got the expected EOF error; reset = 0 */ + } + else if (*status > 0) + { + ffclos(newptr, status); + ffpmsg("failed to copy all HDUs from input file (ffedit_columns)"); + return(*status); + } + + /* close the original file and return ptr to the new image */ + ffclos(*fptr, status); + + *fptr = newptr; /* reset the pointer to the new table */ + + /* move back to the selected table HDU */ + if (fits_movabs_hdu(*fptr, hdunum, NULL, status) > 0) + { + ffpmsg("failed to copy the input file (ffedit_columns)"); + return(*status); + } + } + + /* remove the "col " from the beginning of the column edit expression */ + cptr = expr + 4; + + while (*cptr == ' ') + cptr++; /* skip leading white space */ + + /* Check if need to import expression from a file */ + + if( *cptr=='@' ) { + if( ffimport_file( cptr+1, &file_expr, status ) ) return(*status); + cptr = file_expr; + while (*cptr == ' ') + cptr++; /* skip leading white space... again */ + } + + tstatus = 0; + ffgncl(*fptr, &numcols, &tstatus); /* get initial # of cols */ + + /* parse expression and get first clause, if more than 1 */ + + while ((slen = fits_get_token(&cptr, ";", clause, NULL)) > 0 ) + { + if( *cptr==';' ) cptr++; + clause[slen] = '\0'; + + if (clause[0] == '!' || clause[0] == '-') + { + /* ===================================== */ + /* Case I. delete this column or keyword */ + /* ===================================== */ + + if (ffgcno(*fptr, CASEINSEN, &clause[1], &colnum, status) <= 0) + { + /* a column with this name exists, so try to delete it */ + if (ffdcol(*fptr, colnum, status) > 0) + { + ffpmsg("failed to delete column in input file:"); + ffpmsg(clause); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); + } + deletecol = 1; /* set flag that at least one col was deleted */ + numcols--; + colnum = -1; + } + else + { + ffcmsg(); /* clear previous error message from ffgcno */ + /* try deleting a keyword with this name */ + *status = 0; + if (ffdkey(*fptr, &clause[1], status) > 0) + { + ffpmsg("column or keyword to be deleted does not exist:"); + ffpmsg(clause); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); + } + } + } + else + { + /* ===================================================== */ + /* Case II: + this is either a column name, (case 1) + + or a new column name followed by double = ("==") followed + by the old name which is to be renamed. (case 2A) + + or a column or keyword name followed by a single "=" and a + calculation expression (case 2B) */ + /* ===================================================== */ + cptr2 = clause; + slen = fits_get_token(&cptr2, "( =", colname, NULL); + + + if (slen == 0) + { + ffpmsg("error: column or keyword name is blank:"); + ffpmsg(clause); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status= URL_PARSE_ERROR); + } + + /* If this is a keyword of the form + #KEYWORD# + then transform to the form + #KEYWORDn + where n is the previously used column number + */ + if (colname[0] == '#' && + strstr(colname+1, "#") == (colname + strlen(colname) - 1)) + { + if (colnum <= 0) + { + ffpmsg("The keyword name:"); + ffpmsg(colname); + ffpmsg("is invalid unless a column has been previously"); + ffpmsg("created or editted by a calculator command"); + return(*status = URL_PARSE_ERROR); + } + colname[strlen(colname)-1] = '\0'; + /* Make keyword name and put it in oldname */ + ffkeyn(colname+1, colnum, oldname, status); + if (*status) return (*status); + /* Re-copy back into colname */ + strcpy(colname+1,oldname); + } + else if (strstr(colname, "#") == (colname + strlen(colname) - 1)) + { + /* colname is of the form "NAME#"; if + a) colnum is defined, and + b) a column with literal name "NAME#" does not exist, and + c) a keyword with name "NAMEn" (where n=colnum) exists, then + transfrom the colname string to "NAMEn", otherwise + do nothing. + */ + if (colnum > 0) { /* colnum must be defined */ + tstatus = 0; + ffgcno(*fptr, CASEINSEN, colname, &testnum, &tstatus); + if (tstatus != 0 && tstatus != COL_NOT_UNIQUE) + { + /* OK, column doesn't exist, now see if keyword exists */ + ffcmsg(); /* clear previous error message from ffgcno */ + strcpy(testname, colname); + testname[strlen(testname)-1] = '\0'; + /* Make keyword name and put it in oldname */ + ffkeyn(testname, colnum, oldname, status); + if (*status) return (*status); + + tstatus = 0; + if (!fits_read_card(*fptr, oldname, card, &tstatus)) { + /* Keyword does exist; copy real name back into colname */ + strcpy(colname,oldname); + } + } + } + } + + /* if we encountered an opening parenthesis, then we need to */ + /* find the closing parenthesis, and concatinate the 2 strings */ + /* This supports expressions like: + [col #EXTNAME(Extension name)="GTI"] + */ + if (*cptr2 == '(') + { + fits_get_token(&cptr2, ")", oldname, NULL); + strcat(colname, oldname); + strcat(colname, ")"); + cptr2++; + } + + while (*cptr2 == ' ') + cptr2++; /* skip white space */ + + if (*cptr2 != '=') + { + /* ------------------------------------ */ + /* case 1 - simply the name of a column */ + /* ------------------------------------ */ + + /* look for matching column */ + ffgcno(*fptr, CASEINSEN, colname, &testnum, status); + + while (*status == COL_NOT_UNIQUE) + { + /* the column name contained wild cards, and it */ + /* matches more than one column in the table. */ + + colnum = testnum; + + /* keep this column in the output file */ + savecol = 1; + + if (!colindex) + colindex = (int *) calloc(999, sizeof(int)); + + colindex[colnum - 1] = 1; /* flag this column number */ + + /* look for other matching column names */ + ffgcno(*fptr, CASEINSEN, colname, &testnum, status); + + if (*status == COL_NOT_FOUND) + *status = 999; /* temporary status flag value */ + } + + if (*status <= 0) + { + colnum = testnum; + + /* keep this column in the output file */ + savecol = 1; + + if (!colindex) + colindex = (int *) calloc(999, sizeof(int)); + + colindex[colnum - 1] = 1; /* flag this column number */ + } + else if (*status == 999) + { + /* this special flag value does not represent an error */ + *status = 0; + } + else + { + ffpmsg("Syntax error in columns specifier in input URL:"); + ffpmsg(cptr2); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status = URL_PARSE_ERROR); + } + } + else + { + /* ----------------------------------------------- */ + /* case 2 where the token ends with an equals sign */ + /* ----------------------------------------------- */ + + cptr2++; /* skip over the first '=' */ + + if (*cptr2 == '=') + { + /*................................................. */ + /* Case A: rename a column or keyword; syntax is + "new_name == old_name" */ + /*................................................. */ + + cptr2++; /* skip the 2nd '=' */ + while (*cptr2 == ' ') + cptr2++; /* skip white space */ + + fits_get_token(&cptr2, " ", oldname, NULL); + + /* get column number of the existing column */ + if (ffgcno(*fptr, CASEINSEN, oldname, &colnum, status) <= 0) + { + /* modify the TTYPEn keyword value with the new name */ + ffkeyn("TTYPE", colnum, keyname, status); + + if (ffmkys(*fptr, keyname, colname, NULL, status) > 0) + { + ffpmsg("failed to rename column in input file"); + ffpmsg(" oldname ="); + ffpmsg(oldname); + ffpmsg(" newname ="); + ffpmsg(colname); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); + } + /* keep this column in the output file */ + savecol = 1; + if (!colindex) + colindex = (int *) calloc(999, sizeof(int)); + + colindex[colnum - 1] = 1; /* flag this column number */ + } + else + { + /* try renaming a keyword */ + ffcmsg(); /* clear error message stack */ + *status = 0; + if (ffmnam(*fptr, oldname, colname, status) > 0) + { + ffpmsg("column or keyword to be renamed does not exist:"); + ffpmsg(clause); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); + } + } + } + else + { + /*...................................................... */ + /* Case B: */ + /* this must be a general column/keyword calc expression */ + /* "name = expression" or "colname(TFORM) = expression" */ + /*...................................................... */ + + /* parse the name and TFORM values, if present */ + colformat[0] = '\0'; + cptr3 = colname; + + fits_get_token(&cptr3, "(", oldname, NULL); + + if (cptr3[0] == '(' ) + { + cptr3++; /* skip the '(' */ + fits_get_token(&cptr3, ")", colformat, NULL); + } + + /* calculate values for the column or keyword */ + /* cptr2 = the expression to be calculated */ + /* oldname = name of the column or keyword */ + /* colformat = column format, or keyword comment string */ + if (fits_calculator(*fptr, cptr2, *fptr, oldname, colformat, + status) > 0) { + + ffpmsg("Unable to calculate expression"); + return(*status); + } + + /* test if this is a column and not a keyword */ + tstatus = 0; + ffgcno(*fptr, CASEINSEN, oldname, &testnum, &tstatus); + if (tstatus == 0) + { + /* keep this column in the output file */ + colnum = testnum; + savecol = 1; + + if (!colindex) + colindex = (int *) calloc(999, sizeof(int)); + + colindex[colnum - 1] = 1; + if (colnum > numcols)numcols++; + } + else + { + ffcmsg(); /* clear the error message stack */ + } + } + } + } + } + + if (savecol && !deletecol) + { + /* need to delete all but the specified columns */ + for (ii = numcols; ii > 0; ii--) + { + if (!colindex[ii-1]) /* delete this column */ + { + if (ffdcol(*fptr, ii, status) > 0) + { + ffpmsg("failed to delete column in input file:"); + ffpmsg(clause); + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); + } + } + } + } + + if( colindex ) free( colindex ); + if( file_expr ) free( file_expr ); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_copy_cell2image( + fitsfile *fptr, /* I - point to input table */ + fitsfile *newptr, /* O - existing output file; new image HDU + will be appended to it */ + char *colname, /* I - column name / number containing the image*/ + long rownum, /* I - number of the row containing the image */ + int *status) /* IO - error status */ + +/* + Copy a table cell of a given row and column into an image extension. + The output file must already have been created. A new image + extension will be created in that file. + + This routine was written by Craig Markwardt, GSFC +*/ + +{ + unsigned char buffer[30000]; + int hdutype, colnum, typecode, bitpix, naxis, maxelem, tstatus; + LONGLONG naxes[9], nbytes, firstbyte, ntodo; + LONGLONG repeat, startpos, elemnum, rowlen, tnull; + long twidth, incre; + double scale, zero; + char tform[20]; + char card[FLEN_CARD]; + char templt[FLEN_CARD] = ""; + + /* Table-to-image keyword translation table */ + /* INPUT OUTPUT */ + /* 01234567 01234567 */ + char *patterns[][2] = {{"TSCALn", "BSCALE" }, /* Standard FITS keywords */ + {"TZEROn", "BZERO" }, + {"TUNITn", "BUNIT" }, + {"TNULLn", "BLANK" }, + {"TDMINn", "DATAMIN" }, + {"TDMAXn", "DATAMAX" }, + {"iCTYPn", "CTYPEi" }, /* Coordinate labels */ + {"iCTYna", "CTYPEia" }, + {"iCUNIn", "CUNITi" }, /* Coordinate units */ + {"iCUNna", "CUNITia" }, + {"iCRVLn", "CRVALi" }, /* WCS keywords */ + {"iCRVna", "CRVALia" }, + {"iCDLTn", "CDELTi" }, + {"iCDEna", "CDELTia" }, + {"iCRPXn", "CRPIXi" }, + {"iCRPna", "CRPIXia" }, + {"ijPCna", "PCi_ja" }, + {"ijCDna", "CDi_ja" }, + {"iVn_ma", "PVi_ma" }, + {"iSn_ma", "PSi_ma" }, + {"iCRDna", "CRDERia" }, + {"iCSYna", "CSYERia" }, + {"iCROTn", "CROTAi" }, + {"WCAXna", "WCSAXESa"}, + {"WCSNna", "WCSNAMEa"}, + + {"LONPna", "LONPOLEa"}, + {"LATPna", "LATPOLEa"}, + {"EQUIna", "EQUINOXa"}, + {"MJDOBn", "MJD-OBS" }, + {"MJDAn", "MJD-AVG" }, + {"RADEna", "RADESYSa"}, + {"iCNAna", "CNAMEia" }, + {"DAVGn", "DATE-AVG"}, + + /* Delete table keywords related to other columns */ + {"T????#a", "-" }, + {"TC??#a", "-" }, + {"TWCS#a", "-" }, + {"TDIM#", "-" }, + {"iCTYPm", "-" }, + {"iCUNIm", "-" }, + {"iCRVLm", "-" }, + {"iCDLTm", "-" }, + {"iCRPXm", "-" }, + {"iCTYma", "-" }, + {"iCUNma", "-" }, + {"iCRVma", "-" }, + {"iCDEma", "-" }, + {"iCRPma", "-" }, + {"ijPCma", "-" }, + {"ijCDma", "-" }, + {"iVm_ma", "-" }, + {"iSm_ma", "-" }, + {"iCRDma", "-" }, + {"iCSYma", "-" }, + {"iCROTm", "-" }, + {"WCAXma", "-" }, + {"WCSNma", "-" }, + + {"LONPma", "-" }, + {"LATPma", "-" }, + {"EQUIma", "-" }, + {"MJDOBm", "-" }, + {"MJDAm", "-" }, + {"RADEma", "-" }, + {"iCNAma", "-" }, + {"DAVGm", "-" }, + + {"EXTNAME", "-" }, /* Remove structural keywords*/ + {"EXTVER", "-" }, + {"EXTLEVEL","-" }, + {"CHECKSUM","-" }, + {"DATASUM", "-" }, + + {"*", "+" }}; /* copy all other keywords */ + int npat; + + if (*status > 0) + return(*status); + + /* get column number */ + if (ffgcno(fptr, CASEINSEN, colname, &colnum, status) > 0) + { + ffpmsg("column containing image in table cell does not exist:"); + ffpmsg(colname); + return(*status); + } + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if ( ffgcprll(fptr, colnum, rownum, 1L, 1L, 0, &scale, &zero, + tform, &twidth, &typecode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, (char *) buffer, status) > 0 ) + return(*status); + + /* get the actual column name, in case a column number was given */ + ffkeyn("", colnum, templt, &tstatus); + ffgcnn(fptr, CASEINSEN, templt, colname, &colnum, &tstatus); + + if (hdutype != BINARY_TBL) + { + ffpmsg("This extension is not a binary table."); + ffpmsg(" Cannot open the image in a binary table cell."); + return(*status = NOT_BTABLE); + } + + if (typecode < 0) + { + /* variable length array */ + typecode *= -1; + + /* variable length arrays are 1-dimensional by default */ + naxis = 1; + naxes[0] = repeat; + } + else + { + /* get the dimensions of the image */ + ffgtdmll(fptr, colnum, 9, &naxis, naxes, status); + } + + if (*status > 0) + { + ffpmsg("Error getting the dimensions of the image"); + return(*status); + } + + /* determine BITPIX value for the image */ + if (typecode == TBYTE) + { + bitpix = BYTE_IMG; + nbytes = repeat; + } + else if (typecode == TSHORT) + { + bitpix = SHORT_IMG; + nbytes = repeat * 2; + } + else if (typecode == TLONG) + { + bitpix = LONG_IMG; + nbytes = repeat * 4; + } + else if (typecode == TFLOAT) + { + bitpix = FLOAT_IMG; + nbytes = repeat * 4; + } + else if (typecode == TDOUBLE) + { + bitpix = DOUBLE_IMG; + nbytes = repeat * 8; + } + else if (typecode == TLONGLONG) + { + bitpix = LONGLONG_IMG; + nbytes = repeat * 8; + } + else if (typecode == TLOGICAL) + { + bitpix = BYTE_IMG; + nbytes = repeat; + } + else + { + ffpmsg("Error: the following image column has invalid datatype:"); + ffpmsg(colname); + ffpmsg(tform); + ffpmsg("Cannot open an image in a single row of this column."); + return(*status = BAD_TFORM); + } + + /* create new image in output file */ + if (ffcrimll(newptr, bitpix, naxis, naxes, status) > 0) + { + ffpmsg("failed to write required primary array keywords in the output file"); + return(*status); + } + + npat = sizeof(patterns)/sizeof(patterns[0][0])/2; + + /* skip over the first 8 keywords, starting just after TFIELDS */ + fits_translate_keywords(fptr, newptr, 9, patterns, npat, + colnum, 0, 0, status); + + /* add some HISTORY */ + sprintf(card,"HISTORY This image was copied from row %ld of column '%s',", + rownum, colname); +/* disable this; leave it up to the caller to write history if needed. + ffprec(newptr, card, status); +*/ + /* the use of ffread routine, below, requires that any 'dirty' */ + /* buffers in memory be flushed back to the file first */ + + ffflsh(fptr, FALSE, status); + + /* finally, copy the data, one buffer size at a time */ + ffmbyt(fptr, startpos, TRUE, status); + firstbyte = 1; + + /* the upper limit on the number of bytes must match the declaration */ + /* read up to the first 30000 bytes in the normal way with ffgbyt */ + + ntodo = minvalue(30000, nbytes); + ffgbyt(fptr, ntodo, buffer, status); + ffptbb(newptr, 1, firstbyte, ntodo, buffer, status); + + nbytes -= ntodo; + firstbyte += ntodo; + + /* read any additional bytes with low-level ffread routine, for speed */ + while (nbytes && (*status <= 0) ) + { + ntodo = minvalue(30000, nbytes); + ffread((fptr)->Fptr, (long) ntodo, buffer, status); + ffptbb(newptr, 1, firstbyte, ntodo, buffer, status); + nbytes -= ntodo; + firstbyte += ntodo; + } + + /* Re-scan the header so that CFITSIO knows about all the new keywords */ + ffrdef(newptr,status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_copy_image2cell( + fitsfile *fptr, /* I - pointer to input image extension */ + fitsfile *newptr, /* I - pointer to output table */ + char *colname, /* I - name of column containing the image */ + long rownum, /* I - number of the row containing the image */ + int copykeyflag, /* I - controls which keywords to copy */ + int *status) /* IO - error status */ + +/* + Copy an image extension into a table cell at a given row and + column. The table must have already been created. If the "colname" + column exists, it will be used, otherwise a new column will be created + in the table. + + The "copykeyflag" parameter controls which keywords to copy from the + input image to the output table header (with any appropriate translation). + + copykeyflag = 0 -- no keywords will be copied + copykeyflag = 1 -- essentially all keywords will be copied + copykeyflag = 2 -- copy only the WCS related keywords + + This routine was written by Craig Markwardt, GSFC + +*/ +{ + tcolumn *colptr; + unsigned char buffer[30000]; + int ii, hdutype, colnum, typecode, bitpix, naxis, ncols, hdunum; + char tformchar, tform[20], card[FLEN_CARD]; + LONGLONG imgstart, naxes[9], nbytes, repeat, ntodo,firstbyte; + char filename[FLEN_FILENAME+20]; + + int npat; + + int naxis1; + LONGLONG naxes1[9] = {0,0,0,0,0,0,0,0,0}, repeat1, width1; + int typecode1; + unsigned char dummy = 0; + + LONGLONG headstart, datastart, dataend; + + /* Image-to-table keyword translation table */ + /* INPUT OUTPUT */ + /* 01234567 01234567 */ + char *patterns[][2] = {{"BSCALE", "TSCALn" }, /* Standard FITS keywords */ + {"BZERO", "TZEROn" }, + {"BUNIT", "TUNITn" }, + {"BLANK", "TNULLn" }, + {"DATAMIN", "TDMINn" }, + {"DATAMAX", "TDMAXn" }, + {"CTYPEi", "iCTYPn" }, /* Coordinate labels */ + {"CTYPEia", "iCTYna" }, + {"CUNITi", "iCUNIn" }, /* Coordinate units */ + {"CUNITia", "iCUNna" }, + {"CRVALi", "iCRVLn" }, /* WCS keywords */ + {"CRVALia", "iCRVna" }, + {"CDELTi", "iCDLTn" }, + {"CDELTia", "iCDEna" }, + {"CRPIXj", "jCRPXn" }, + {"CRPIXja", "jCRPna" }, + {"PCi_ja", "ijPCna" }, + {"CDi_ja", "ijCDna" }, + {"PVi_ma", "iVn_ma" }, + {"PSi_ma", "iSn_ma" }, + {"WCSAXESa","WCAXna" }, + {"WCSNAMEa","WCSNna" }, + {"CRDERia", "iCRDna" }, + {"CSYERia", "iCSYna" }, + {"CROTAi", "iCROTn" }, + + {"LONPOLEa","LONPna"}, + {"LATPOLEa","LATPna"}, + {"EQUINOXa","EQUIna"}, + {"MJD-OBS", "MJDOBn" }, + {"MJD-AVG", "MJDAn" }, + {"RADESYSa","RADEna"}, + {"CNAMEia", "iCNAna" }, + {"DATE-AVG","DAVGn"}, + + {"NAXISi", "-" }, /* Remove structural keywords*/ + {"PCOUNT", "-" }, + {"GCOUNT", "-" }, + {"EXTEND", "-" }, + {"EXTNAME", "-" }, + {"EXTVER", "-" }, + {"EXTLEVEL","-" }, + {"CHECKSUM","-" }, + {"DATASUM", "-" }, + {"*", "+" }}; /* copy all other keywords */ + + + if (*status > 0) + return(*status); + + if (fptr == 0 || newptr == 0) return (*status = NULL_INPUT_PTR); + + if (ffghdt(fptr, &hdutype, status) > 0) { + ffpmsg("could not get input HDU type"); + return (*status); + } + + if (hdutype != IMAGE_HDU) { + ffpmsg("The input extension is not an image."); + ffpmsg(" Cannot open the image."); + return(*status = NOT_IMAGE); + } + + if (ffghdt(newptr, &hdutype, status) > 0) { + ffpmsg("could not get output HDU type"); + return (*status); + } + + if (hdutype != BINARY_TBL) { + ffpmsg("The output extension is not a table."); + return(*status = NOT_BTABLE); + } + + + if (ffgiprll(fptr, 9, &bitpix, &naxis, naxes, status) > 0) { + ffpmsg("Could not read image parameters."); + return (*status); + } + + /* Determine total number of pixels in the image */ + repeat = 1; + for (ii = 0; ii < naxis; ii++) repeat *= naxes[ii]; + + /* Determine the TFORM value for the table cell */ + if (bitpix == BYTE_IMG) { + typecode = TBYTE; + tformchar = 'B'; + nbytes = repeat; + } else if (bitpix == SHORT_IMG) { + typecode = TSHORT; + tformchar = 'I'; + nbytes = repeat*2; + } else if (bitpix == LONG_IMG) { + typecode = TLONG; + tformchar = 'J'; + nbytes = repeat*4; + } else if (bitpix == FLOAT_IMG) { + typecode = TFLOAT; + tformchar = 'E'; + nbytes = repeat*4; + } else if (bitpix == DOUBLE_IMG) { + typecode = TDOUBLE; + tformchar = 'D'; + nbytes = repeat*8; + } else if (bitpix == LONGLONG_IMG) { + typecode = TLONGLONG; + tformchar = 'K'; + nbytes = repeat*8; + } else { + ffpmsg("Error: the image has an invalid datatype."); + return (*status = BAD_BITPIX); + } + + /* get column number */ + ffpmrk(); + ffgcno(newptr, CASEINSEN, colname, &colnum, status); + ffcmrk(); + + /* Column does not exist; create it */ + if (*status) { + + *status = 0; + sprintf(tform, "%.0f%c", (double) repeat, tformchar); + ffgncl(newptr, &ncols, status); + colnum = ncols+1; + fficol(newptr, colnum, colname, tform, status); + ffptdmll(newptr, colnum, naxis, naxes, status); + + if (*status) { + ffpmsg("Could not insert new column into output table."); + return *status; + } + + } else { + + ffgtdmll(newptr, colnum, 9, &naxis1, naxes1, status); + if (*status > 0 || naxis != naxis1) { + ffpmsg("Input image dimensions and output table cell dimensions do not match."); + return (*status = BAD_DIMEN); + } + for (ii=0; ii 0) || (typecode1 != typecode) || (repeat1 != repeat)) { + ffpmsg("Input image data type does not match output table cell type."); + return (*status = BAD_TFORM); + } + } + + /* copy keywords from input image to output table, if required */ + + if (copykeyflag) { + + npat = sizeof(patterns)/sizeof(patterns[0][0])/2; + + if (copykeyflag == 2) { /* copy only the WCS-related keywords */ + patterns[npat-1][1] = "-"; + } + + /* The 3rd parameter value = 5 means skip the first 4 keywords in the image */ + fits_translate_keywords(fptr, newptr, 5, patterns, npat, + colnum, 0, 0, status); + } + + /* Here is all the code to compute offsets: + * * byte offset from start of row to column (dest table) + * * byte offset from start of file to image data (source image) + */ + + /* Force the writing of the row of the table by writing the last byte of + the array, which grows the table, and/or shifts following extensions */ + ffpcl(newptr, TBYTE, colnum, rownum, repeat, 1, &dummy, status); + + /* byte offset within the row to the start of the image column */ + colptr = (newptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + firstbyte = colptr->tbcol + 1; + + /* get starting address of input image to be read */ + ffghadll(fptr, &headstart, &datastart, &dataend, status); + imgstart = datastart; + + sprintf(card, "HISTORY Table column '%s' row %ld copied from image", + colname, rownum); +/* + Don't automatically write History keywords; leave this up to the caller. + ffprec(newptr, card, status); +*/ + + /* write HISTORY keyword with the file name (this is now disabled)*/ + + filename[0] = '\0'; hdunum = 0; + strcpy(filename, "HISTORY "); + ffflnm(fptr, filename+strlen(filename), status); + ffghdn(fptr, &hdunum); + sprintf(filename+strlen(filename),"[%d]", hdunum-1); +/* + ffprec(newptr, filename, status); +*/ + + /* the use of ffread routine, below, requires that any 'dirty' */ + /* buffers in memory be flushed back to the file first */ + + ffflsh(fptr, FALSE, status); + + /* move to the first byte of the input image */ + ffmbyt(fptr, imgstart, TRUE, status); + + ntodo = minvalue(30000L, nbytes); + ffgbyt(fptr, ntodo, buffer, status); /* read input image */ + ffptbb(newptr, rownum, firstbyte, ntodo, buffer, status); /* write to table */ + + nbytes -= ntodo; + firstbyte += ntodo; + + + /* read any additional bytes with low-level ffread routine, for speed */ + while (nbytes && (*status <= 0) ) + { + ntodo = minvalue(30000L, nbytes); + ffread(fptr->Fptr, (long) ntodo, buffer, status); + ffptbb(newptr, rownum, firstbyte, ntodo, buffer, status); + nbytes -= ntodo; + firstbyte += ntodo; + } + + /* Re-scan the header so that CFITSIO knows about all the new keywords */ + ffrdef(newptr,status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_select_image_section( + fitsfile **fptr, /* IO - pointer to input image; on output it */ + /* points to the new subimage */ + char *outfile, /* I - name for output file */ + char *expr, /* I - Image section expression */ + int *status) +{ + /* + copies an image section from the input file to a new output file. + Any HDUs preceding or following the image are also copied to the + output file. + */ + + fitsfile *newptr; + int ii, hdunum; + + /* create new empty file to hold the image section */ + if (ffinit(&newptr, outfile, status) > 0) + { + ffpmsg( + "failed to create output file for image section:"); + ffpmsg(outfile); + return(*status); + } + + fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ + + /* copy all preceding extensions to the output file */ + for (ii = 1; ii < hdunum; ii++) + { + fits_movabs_hdu(*fptr, ii, NULL, status); + if (fits_copy_hdu(*fptr, newptr, 0, status) > 0) + { + ffclos(newptr, status); + return(*status); + } + } + + /* move back to the original HDU position */ + fits_movabs_hdu(*fptr, hdunum, NULL, status); + + if (fits_copy_image_section(*fptr, newptr, expr, status) > 0) + { + ffclos(newptr, status); + return(*status); + } + + /* copy any remaining HDUs to the output file */ + + for (ii = hdunum + 1; 1; ii++) + { + if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) + break; + + fits_copy_hdu(*fptr, newptr, 0, status); + } + + if (*status == END_OF_FILE) + *status = 0; /* got the expected EOF error; reset = 0 */ + else if (*status > 0) + { + ffclos(newptr, status); + return(*status); + } + + /* close the original file and return ptr to the new image */ + ffclos(*fptr, status); + + *fptr = newptr; /* reset the pointer to the new table */ + + /* move back to the image subsection */ + if (ii - 1 != hdunum) + fits_movabs_hdu(*fptr, hdunum, NULL, status); + else + { + /* may have to reset BSCALE and BZERO pixel scaling, */ + /* since the keywords were previously turned off */ + + if (ffrdef(*fptr, status) > 0) + { + ffclos(*fptr, status); + return(*status); + } + + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_copy_image_section( + fitsfile *fptr, /* I - pointer to input image */ + fitsfile *newptr, /* I - pointer to output image */ + char *expr, /* I - Image section expression */ + int *status) +{ + /* + copies an image section from the input file to a new output HDU + */ + + int bitpix, naxis, numkeys, nkey; + long naxes[9], smin, smax, sinc, fpixels[9], lpixels[9], incs[9]; + char *cptr, keyname[FLEN_KEYWORD], card[FLEN_CARD]; + int ii, tstatus, anynull; + int klen, kk, jj; + long outnaxes[9], outsize, buffsize, dummy[2]; + double *buffer = 0, crpix, cdelt; + + if (*status > 0) + return(*status); + + /* get the size of the input image */ + fits_get_img_type(fptr, &bitpix, status); + fits_get_img_dim(fptr, &naxis, status); + if (fits_get_img_size(fptr, naxis, naxes, status) > 0) + return(*status); + + if (naxis < 1 || naxis > 9) + { + ffpmsg( + "Input image either had NAXIS = 0 (NULL image) or has > 9 dimensions"); + return(*status = BAD_NAXIS); + } + + /* create output image with same size and type as the input image */ + /* Will update the size later */ + fits_create_img(newptr, bitpix, naxis, naxes, status); + + /* copy all other non-structural keywords from the input to output file */ + fits_get_hdrspace(fptr, &numkeys, NULL, status); + + for (nkey = 4; nkey <= numkeys; nkey++) /* skip the first few keywords */ + { + fits_read_record(fptr, nkey, card, status); + + if (fits_get_keyclass(card) > TYP_CMPRS_KEY) + { + /* write the record to the output file */ + fits_write_record(newptr, card, status); + } + } + + if (*status > 0) + { + ffpmsg("error copying header from input image to output image"); + return(*status); + } + + /* parse the section specifier to get min, max, and inc for each axis */ + /* and the size of each output image axis */ + + outsize = 1; + cptr = expr; + for (ii=0; ii < naxis; ii++) + { + if (fits_get_section_range(&cptr, &smin, &smax, &sinc, status) > 0) + { + ffpmsg("error parsing the following image section specifier:"); + ffpmsg(expr); + return(*status); + } + + if (smax == 0) + smax = naxes[ii]; /* use whole axis by default */ + else if (smin == 0) + smin = naxes[ii]; /* use inverted whole axis */ + + if (smin > naxes[ii] || smax > naxes[ii]) + { + ffpmsg("image section exceeds dimensions of input image:"); + ffpmsg(expr); + return(*status = BAD_NAXIS); + } + + fpixels[ii] = smin; + lpixels[ii] = smax; + incs[ii] = sinc; + + if (smin <= smax) + outnaxes[ii] = (smax - smin + sinc) / sinc; + else + outnaxes[ii] = (smin - smax + sinc) / sinc; + + outsize = outsize * outnaxes[ii]; + + /* modify the NAXISn keyword */ + fits_make_keyn("NAXIS", ii + 1, keyname, status); + fits_modify_key_lng(newptr, keyname, outnaxes[ii], NULL, status); + + /* modify the WCS keywords if necessary */ + + if (fpixels[ii] != 1 || incs[ii] != 1) + { + for (kk=-1;kk<26; kk++) /* modify any alternate WCS keywords */ + { + /* read the CRPIXn keyword if it exists in the input file */ + fits_make_keyn("CRPIX", ii + 1, keyname, status); + + if (kk != -1) { + klen = strlen(keyname); + keyname[klen]='A' + kk; + keyname[klen + 1] = '\0'; + } + + tstatus = 0; + if (fits_read_key(fptr, TDOUBLE, keyname, + &crpix, NULL, &tstatus) == 0) + { + /* calculate the new CRPIXn value */ + if (fpixels[ii] <= lpixels[ii]) + crpix = (crpix - (fpixels[ii] - 1.0) - .5) / incs[ii] + 0.5; + else + crpix = (fpixels[ii] - (crpix - 1.0) - .5) / incs[ii] + 0.5; + + /* modify the value in the output file */ + fits_modify_key_dbl(newptr, keyname, crpix, 15, NULL, status); + + if (incs[ii] != 1 || fpixels[ii] > lpixels[ii]) + { + /* read the CDELTn keyword if it exists in the input file */ + fits_make_keyn("CDELT", ii + 1, keyname, status); + + if (kk != -1) { + klen = strlen(keyname); + keyname[klen]='A' + kk; + keyname[klen + 1] = '\0'; + } + + tstatus = 0; + if (fits_read_key(fptr, TDOUBLE, keyname, + &cdelt, NULL, &tstatus) == 0) + { + /* calculate the new CDELTn value */ + if (fpixels[ii] <= lpixels[ii]) + cdelt = cdelt * incs[ii]; + else + cdelt = cdelt * (-incs[ii]); + + /* modify the value in the output file */ + fits_modify_key_dbl(newptr, keyname, cdelt, 15, NULL, status); + } + + /* modify the CDi_j keywords if they exist in the input file */ + + fits_make_keyn("CD1_", ii + 1, keyname, status); + + if (kk != -1) { + klen = strlen(keyname); + keyname[klen]='A' + kk; + keyname[klen + 1] = '\0'; + } + + for (jj=0; jj < 9; jj++) /* look for up to 9 dimensions */ + { + keyname[2] = '1' + jj; + + tstatus = 0; + if (fits_read_key(fptr, TDOUBLE, keyname, + &cdelt, NULL, &tstatus) == 0) + { + /* calculate the new CDi_j value */ + if (fpixels[ii] <= lpixels[ii]) + cdelt = cdelt * incs[ii]; + else + cdelt = cdelt * (-incs[ii]); + + /* modify the value in the output file */ + fits_modify_key_dbl(newptr, keyname, cdelt, 15, NULL, status); + } + } + + } /* end of if (incs[ii]... loop */ + } /* end of fits_read_key loop */ + } /* end of for (kk loop */ + } + } /* end of main NAXIS loop */ + + if (ffrdef(newptr, status) > 0) /* force the header to be scanned */ + { + return(*status); + } + + /* write a dummy value to the last pixel in the output section */ + /* This will force memory to be allocated for the FITS files if it */ + /* is being written in memory, before we allocate some more memory */ + /* below. Hopefully this leads to better memory management and */ + /* reduces the probability that the memory for the FITS file will have */ + /* to be reallocated to a new location later. */ + + /* turn off any scaling of the pixel values */ + fits_set_bscale(fptr, 1.0, 0.0, status); + fits_set_bscale(newptr, 1.0, 0.0, status); + + dummy[0] = 0; + if (fits_write_img(newptr, TLONG, outsize, 1, dummy, status) > 0) + { + ffpmsg("fits_copy_image_section: error writing to the last image pixel"); + return(*status); + } + + /* allocate memory for the entire image section */ + buffsize = (abs(bitpix) / 8) * outsize; + + buffer = (double *) malloc(buffsize); + if (!buffer) + { + ffpmsg("fits_copy_image_section: no memory for image section"); + return(*status = MEMORY_ALLOCATION); + } + + /* read the image section then write it to the output file */ + + if (bitpix == 8) + { + ffgsvb(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, + (unsigned char *) buffer, &anynull, status); + + ffpprb(newptr, 1, 1, outsize, (unsigned char *) buffer, status); + } + else if (bitpix == 16) + { + ffgsvi(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, + (short *) buffer, &anynull, status); + + ffppri(newptr, 1, 1, outsize, (short *) buffer, status); + } + else if (bitpix == 32) + { + ffgsvk(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, + (int *) buffer, &anynull, status); + + ffpprk(newptr, 1, 1, outsize, (int *) buffer, status); + } + else if (bitpix == -32) + { + ffgsve(fptr, 1, naxis, naxes, fpixels, lpixels, incs, FLOATNULLVALUE, + (float *) buffer, &anynull, status); + + ffppne(newptr, 1, 1, outsize, (float *) buffer, FLOATNULLVALUE, status); + } + else if (bitpix == -64) + { + ffgsvd(fptr, 1, naxis, naxes, fpixels, lpixels, incs, DOUBLENULLVALUE, + buffer, &anynull, status); + + ffppnd(newptr, 1, 1, outsize, buffer, DOUBLENULLVALUE, + status); + } + else if (bitpix == 64) + { + ffgsvjj(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, + (LONGLONG *) buffer, &anynull, status); + + ffpprjj(newptr, 1, 1, outsize, (LONGLONG *) buffer, status); + } + + free(buffer); /* finished with the memory */ + + if (*status > 0) + { + ffpmsg("fits_copy_image_section: error copying image section"); + return(*status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_section_range(char **ptr, + long *secmin, + long *secmax, + long *incre, + int *status) +/* + Parse the input image section specification string, returning + the min, max and increment values. + Typical string = "1:512:2" or "1:512" +*/ +{ + int slen, isanumber; + char token[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + slen = fits_get_token(ptr, " ,:", token, &isanumber); /* get 1st token */ + + if (*token == '*') /* wild card means to use the whole range */ + { + *secmin = 1; + *secmax = 0; + } + else if (*token == '-' && *(token+1) == '*' ) /* invert the whole range */ + { + *secmin = 0; + *secmax = 1; + } + else + { + if (slen == 0 || !isanumber || **ptr != ':') + return(*status = URL_PARSE_ERROR); + + /* the token contains the min value */ + *secmin = atol(token); + + (*ptr)++; /* skip the colon between the min and max values */ + slen = fits_get_token(ptr, " ,:", token, &isanumber); /* get token */ + + if (slen == 0 || !isanumber) + return(*status = URL_PARSE_ERROR); + + /* the token contains the max value */ + *secmax = atol(token); + } + + if (**ptr == ':') + { + (*ptr)++; /* skip the colon between the max and incre values */ + slen = fits_get_token(ptr, " ,", token, &isanumber); /* get token */ + + if (slen == 0 || !isanumber) + return(*status = URL_PARSE_ERROR); + + *incre = atol(token); + } + else + *incre = 1; /* default increment if none is supplied */ + + if (**ptr == ',') + (*ptr)++; + + while (**ptr == ' ') /* skip any trailing blanks */ + (*ptr)++; + + if (*secmin < 0 || *secmax < 0 || *incre < 1) + *status = URL_PARSE_ERROR; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffselect_table( + fitsfile **fptr, /* IO - pointer to input table; on output it */ + /* points to the new selected rows table */ + char *outfile, /* I - name for output file */ + char *expr, /* I - Boolean expression */ + int *status) +{ + fitsfile *newptr; + int ii, hdunum; + + if (*outfile) + { + /* create new empty file in to hold the selected rows */ + if (ffinit(&newptr, outfile, status) > 0) + { + ffpmsg( + "failed to create file for selected rows from input table"); + ffpmsg(outfile); + return(*status); + } + + fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ + + /* copy all preceding extensions to the output file */ + for (ii = 1; ii < hdunum; ii++) + { + fits_movabs_hdu(*fptr, ii, NULL, status); + if (fits_copy_hdu(*fptr, newptr, 0, status) > 0) + { + ffclos(newptr, status); + return(*status); + } + } + + /* copy all the header keywords from the input to output file */ + fits_movabs_hdu(*fptr, hdunum, NULL, status); + if (fits_copy_header(*fptr, newptr, status) > 0) + { + ffclos(newptr, status); + return(*status); + } + + /* set number of rows = 0 */ + fits_modify_key_lng(newptr, "NAXIS2", 0, NULL,status); + (newptr->Fptr)->numrows = 0; + (newptr->Fptr)->origrows = 0; + + if (ffrdef(newptr, status) > 0) /* force the header to be scanned */ + { + ffclos(newptr, status); + return(*status); + } + } + else + newptr = *fptr; /* will delete rows in place in the table */ + + /* copy rows which satisfy the selection expression to the output table */ + /* or delete the nonqualifying rows if *fptr = newptr. */ + if (fits_select_rows(*fptr, newptr, expr, status) > 0) + { + if (*outfile) + ffclos(newptr, status); + + return(*status); + } + + if (*outfile) + { + /* copy any remaining HDUs to the output copy */ + + for (ii = hdunum + 1; 1; ii++) + { + if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) + break; + + fits_copy_hdu(*fptr, newptr, 0, status); + } + + if (*status == END_OF_FILE) + *status = 0; /* got the expected EOF error; reset = 0 */ + else if (*status > 0) + { + ffclos(newptr, status); + return(*status); + } + + /* close the original file and return ptr to the new image */ + ffclos(*fptr, status); + + *fptr = newptr; /* reset the pointer to the new table */ + + /* move back to the selected table HDU */ + fits_movabs_hdu(*fptr, hdunum, NULL, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffparsecompspec(fitsfile *fptr, /* I - FITS file pointer */ + char *compspec, /* I - image compression specification */ + int *status) /* IO - error status */ +/* + Parse the image compression specification that was give in square brackets + following the output FITS file name, as in these examples: + + myfile.fits[compress] - default Rice compression, row by row + myfile.fits[compress TYPE] - the first letter of TYPE defines the + compression algorithm: + R = Rice + G = GZIP + H = HCOMPRESS + P = PLIO + + myfile.fits[compress TYPE 100,100] - the numbers give the dimensions + of the compression tiles. Default + is NAXIS1, 1, 1, ... + + myfile.fits[compress; 5] The number following the semicolon + mufile.fits[compress TYPE; 5] gives the value of the noisebits + myfile.fits[compress TYPE 100,100; 5] parameter that is used when + quantizing floating point images. + +The compression parameters are saved in the fptr->Fptr structure for use +when writing FITS images. + +*/ +{ + char *ptr1; + + /* initialize with default values */ + int ii, compresstype = RICE_1, noisebits = 4, smooth = 0, scale = 1, intval; + long tilesize[9] = {0,1,1,1,1,1,1,1,1}; + + ptr1 = compspec; + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + if (strncmp(ptr1, "compress", 8) && strncmp(ptr1, "COMPRESS", 8) ) + { + /* apparently this string does not specify compression parameters */ + return(*status = URL_PARSE_ERROR); + } + + ptr1 += 8; + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + /* ========================= */ + /* look for compression type */ + /* ========================= */ + + if (*ptr1 == 'r' || *ptr1 == 'R') + { + compresstype = RICE_1; + while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') + ptr1++; + } + else if (*ptr1 == 'g' || *ptr1 == 'G') + { + compresstype = GZIP_1; + while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') + ptr1++; + + } + else if (*ptr1 == 'p' || *ptr1 == 'P') + { + compresstype = PLIO_1; + while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') + ptr1++; + } + else if (*ptr1 == 'h' || *ptr1 == 'H') + { + compresstype = HCOMPRESS_1; + while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') + ptr1++; + } + + /* ======================== */ + /* look for tile dimensions */ + /* ======================== */ + + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + ii = 0; + while (isdigit( (int) *ptr1) && ii < 9) + { + tilesize[ii] = atol(ptr1); /* read the integer value */ + ii++; + + while (isdigit((int) *ptr1)) /* skip over the integer */ + ptr1++; + + if (*ptr1 == ',') + ptr1++; /* skip over the comma */ + + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + } + + /* ========================================================= */ + /* look for other parameters */ + /* ========================================================= */ + + if (*ptr1 == ';') + { + ptr1++; + + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + /* get first integer parameter */ + if (!isdigit((int) *ptr1) ) + return(*status = URL_PARSE_ERROR); + + intval = atol(ptr1); /* read the integer value */ + + if (compresstype == HCOMPRESS_1) + scale = intval; + else + noisebits = intval; + + while (isdigit((int) *ptr1)) /* skip over the integer */ + ptr1++; + + if (*ptr1 == ',') + { + ptr1++; /* skip over the comma */ + + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + /* get 2nd integer parameter */ + if (!isdigit((int) *ptr1) ) + return(*status = URL_PARSE_ERROR); + + intval = atol(ptr1); /* read the integer value */ + + if (compresstype == HCOMPRESS_1) + smooth = intval; + else + return(*status = URL_PARSE_ERROR); + + while (isdigit((int) *ptr1)) /* skip over the integer */ + ptr1++; + } + } + + while (*ptr1 == ' ') /* ignore blanks */ + ptr1++; + + if (*ptr1 != 0) /* remaining junk in the string?? */ + return(*status = URL_PARSE_ERROR); + + /* ================================= */ + /* finished parsing; save the values */ + /* ================================= */ + + (fptr->Fptr)->request_compress_type = compresstype; + + for (ii = 0; ii < 9; ii++) + (fptr->Fptr)->request_tilesize[ii] = tilesize[ii]; + + if (compresstype == HCOMPRESS_1) { + (fptr->Fptr)->request_hcomp_scale = scale; + (fptr->Fptr)->request_hcomp_smooth = smooth; + } else { + (fptr->Fptr)->request_noise_nbits = noisebits; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdkinit(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - name of file to create */ + int *status) /* IO - error status */ +/* + Create and initialize a new FITS file on disk. This routine differs + from ffinit in that the input 'name' is literally taken as the name + of the disk file to be created, and it does not support CFITSIO's + extended filename syntax. +*/ +{ + if (*status > 0) + return(*status); + + *status = CREATE_DISK_FILE; + + ffinit(fptr, name,status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffinit(fitsfile **fptr, /* O - FITS file pointer */ + const char *name, /* I - name of file to create */ + int *status) /* IO - error status */ +/* + Create and initialize a new FITS file. +*/ +{ + int driver, slen, clobber = 0; + char *url; + char urltype[MAX_PREFIX_LEN], outfile[FLEN_FILENAME]; + char tmplfile[FLEN_FILENAME], compspec[80]; + int handle, create_disk_file = 0; + + if (*status > 0) + return(*status); + + if (*status == CREATE_DISK_FILE) + { + create_disk_file = 1; + *status = 0; + } + + *fptr = 0; /* initialize null file pointer */ + + if (need_to_initialize) { /* this is called only once */ + + if (need_to_initialize != 1) { + /* This is bad. looks like memory has been corrupted. */ + ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); + ffpmsg("Fatal condition detected in ffinit."); + *status = FILE_NOT_CREATED; + return(*status); + } + + *status = fits_init_cfitsio(); + } + + if (*status > 0) + return(*status); + + url = (char *) name; + while (*url == ' ') /* ignore leading spaces in the filename */ + url++; + + if (*url == '\0') + { + ffpmsg("Name of file to create is blank. (ffinit)"); + return(*status = FILE_NOT_CREATED); + } + + if (create_disk_file) + { + strcpy(outfile, url); + strcpy(urltype, "file://"); + tmplfile[0] = '\0'; + compspec[0] = '\0'; + } + else + { + + /* check for clobber symbol, i.e, overwrite existing file */ + if (*url == '!') + { + clobber = TRUE; + url++; + } + else + clobber = FALSE; + + /* parse the output file specification */ + ffourl(url, urltype, outfile, tmplfile, compspec, status); + + if (*status > 0) + { + ffpmsg("could not parse the output filename: (ffinit)"); + ffpmsg(url); + return(*status); + } + } + + /* find which driver corresponds to the urltype */ + *status = urltype2driver(urltype, &driver); + + if (*status) + { + ffpmsg("could not find driver for this file: (ffinit)"); + ffpmsg(url); + return(*status); + } + + /* delete pre-existing file, if asked to do so */ + if (clobber) + { + if (driverTable[driver].remove) + (*driverTable[driver].remove)(outfile); + } + + /* call appropriate driver to create the file */ + if (driverTable[driver].create) + { + *status = (*driverTable[driver].create)(outfile, &handle); + if (*status) + { + ffpmsg("failed to create new file (already exists?):"); + ffpmsg(url); + return(*status); + } + } + else + { + ffpmsg("cannot create a new file of this type: (ffinit)"); + ffpmsg(url); + return(*status = FILE_NOT_CREATED); + } + + /* allocate fitsfile structure and initialize = 0 */ + *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + if (!(*fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffopen)"); + ffpmsg(url); + return(*status = MEMORY_ALLOCATION); + } + + /* allocate FITSfile structure and initialize = 0 */ + (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); + + if (!((*fptr)->Fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for following file: (ffopen)"); + ffpmsg(url); + free(*fptr); + *fptr = 0; + return(*status = MEMORY_ALLOCATION); + } + + slen = strlen(url) + 1; + slen = maxvalue(slen, 32); /* reserve at least 32 chars */ + ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ + + if ( !(((*fptr)->Fptr)->filename) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for filename: (ffinit)"); + ffpmsg(url); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = FILE_NOT_CREATED); + } + + /* mem for headstart array */ + ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); + + if ( !(((*fptr)->Fptr)->headstart) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for headstart array: (ffinit)"); + ffpmsg(url); + free( ((*fptr)->Fptr)->filename); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* store the parameters describing the file */ + ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ + ((*fptr)->Fptr)->filehandle = handle; /* store the file pointer */ + ((*fptr)->Fptr)->driver = driver; /* driver number */ + strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ + ((*fptr)->Fptr)->filesize = 0; /* physical file size */ + ((*fptr)->Fptr)->logfilesize = 0; /* logical file size */ + ((*fptr)->Fptr)->writemode = 1; /* read-write mode */ + ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ + ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ + ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ + ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ + + ffldrc(*fptr, 0, IGNORE_EOF, status); /* initialize first record */ + + fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ + + /* if template file was given, use it to define structure of new file */ + + if (tmplfile[0]) + ffoptplt(*fptr, tmplfile, status); + + /* parse and save image compression specification, if given */ + if (compspec[0]) + ffparsecompspec(*fptr, compspec, status); + + return(*status); /* successful return */ +} +/*--------------------------------------------------------------------------*/ +/* ffimem == fits_create_memfile */ + +int ffimem(fitsfile **fptr, /* O - FITS file pointer */ + void **buffptr, /* I - address of memory pointer */ + size_t *buffsize, /* I - size of buffer, in bytes */ + size_t deltasize, /* I - increment for future realloc's */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + int *status) /* IO - error status */ + +/* + Create and initialize a new FITS file in memory +*/ +{ + int driver, slen; + char urltype[MAX_PREFIX_LEN]; + int handle; + + if (*status > 0) + return(*status); + + *fptr = 0; /* initialize null file pointer */ + + if (need_to_initialize) { /* this is called only once */ + + if (need_to_initialize != 1) { + /* This is bad. looks like memory has been corrupted. */ + ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); + ffpmsg("Fatal condition detected in ffimem."); + *status = FILE_NOT_CREATED; + return(*status); + } + + *status = fits_init_cfitsio(); + } + + if (*status > 0) + return(*status); + + strcpy(urltype, "memkeep://"); /* URL type for pre-existing memory file */ + + *status = urltype2driver(urltype, &driver); + + if (*status > 0) + { + ffpmsg("could not find driver for pre-existing memory file: (ffimem)"); + return(*status); + } + + /* call driver routine to "open" the memory file */ + *status = mem_openmem( buffptr, buffsize, deltasize, + mem_realloc, &handle); + + if (*status > 0) + { + ffpmsg("failed to open pre-existing memory file: (ffimem)"); + return(*status); + } + + /* allocate fitsfile structure and initialize = 0 */ + *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); + + if (!(*fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for memory file: (ffimem)"); + return(*status = MEMORY_ALLOCATION); + } + + /* allocate FITSfile structure and initialize = 0 */ + (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); + + if (!((*fptr)->Fptr)) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate structure for memory file: (ffimem)"); + free(*fptr); + *fptr = 0; + return(*status = MEMORY_ALLOCATION); + } + + slen = 32; /* reserve at least 32 chars */ + ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ + + if ( !(((*fptr)->Fptr)->filename) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for filename: (ffimem)"); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* mem for headstart array */ + ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); + + if ( !(((*fptr)->Fptr)->headstart) ) + { + (*driverTable[driver].close)(handle); /* close the file */ + ffpmsg("failed to allocate memory for headstart array: (ffinit)"); + free( ((*fptr)->Fptr)->filename); + free((*fptr)->Fptr); + free(*fptr); + *fptr = 0; /* return null file pointer */ + return(*status = MEMORY_ALLOCATION); + } + + /* store the parameters describing the file */ + ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ + ((*fptr)->Fptr)->filehandle = handle; /* file handle */ + ((*fptr)->Fptr)->driver = driver; /* driver number */ + strcpy(((*fptr)->Fptr)->filename, "memfile"); /* dummy filename */ + ((*fptr)->Fptr)->filesize = *buffsize; /* physical file size */ + ((*fptr)->Fptr)->logfilesize = *buffsize; /* logical file size */ + ((*fptr)->Fptr)->writemode = 1; /* read-write mode */ + ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ + ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ + ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ + ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ + + ffldrc(*fptr, 0, IGNORE_EOF, status); /* initialize first record */ + fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_init_cfitsio(void) +/* + initialize anything that is required before using the CFITSIO routines +*/ +{ + int status; + + union u_tag { + short ival; + char cval[2]; + } u; + + need_to_initialize = 0; + + /* test for correct byteswapping. */ + + u.ival = 1; + if ((BYTESWAPPED && u.cval[0] != 1) || + (BYTESWAPPED == FALSE && u.cval[1] != 1) ) + { + printf ("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + printf(" Byteswapping is not being done correctly on this system.\n"); + printf(" Check the MACHINE and BYTESWAPPED definitions in fitsio2.h\n"); + printf(" Please report this problem to the author at\n"); + printf(" pence@tetra.gsfc.nasa.gov\n"); + printf( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + return(1); + } + + + /* test that LONGLONG is an 8 byte integer */ + + if (sizeof(LONGLONG) != 8) + { + printf ("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + printf(" CFITSIO did not find an 8-byte long integer data type.\n"); + printf(" sizeof(LONGLONG) = %d\n",(int)sizeof(LONGLONG)); + printf(" Please report this problem to the author at\n"); + printf(" pence@tetra.gsfc.nasa.gov\n"); + printf( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + return(1); + } + + /* register the standard I/O drivers that are always available */ + + /* 1--------------------disk file driver-----------------------*/ + status = fits_register_driver("file://", + file_init, + file_shutdown, + file_setoptions, + file_getoptions, + file_getversion, + file_checkfile, + file_open, + file_create, +#ifdef HAVE_FTRUNCATE + file_truncate, +#else + NULL, /* no file truncate function */ +#endif + file_close, + file_remove, + file_size, + file_flush, + file_seek, + file_read, + file_write); + + if (status) + { + ffpmsg("failed to register the file:// driver (init_cfitsio)"); + return(status); + } + + /* 2------------ output temporary memory file driver ----------------*/ + status = fits_register_driver("mem://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + NULL, /* open function not allowed */ + mem_create, + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + + if (status) + { + ffpmsg("failed to register the mem:// driver (init_cfitsio)"); + return(status); + } + + /* 3--------------input pre-existing memory file driver----------------*/ + status = fits_register_driver("memkeep://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + NULL, /* file open driver function is not used */ + NULL, /* create function not allowed */ + mem_truncate, + mem_close_keep, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + + if (status) + { + ffpmsg("failed to register the memkeep:// driver (init_cfitsio)"); + return(status); + } + + /* 4-------------------stdin stream driver----------------------*/ + /* the stdin stream is copied to memory then opened in memory */ + + status = fits_register_driver("stdin://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + stdin_checkfile, + stdin_open, + NULL, /* create function not allowed */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the stdin:// driver (init_cfitsio)"); + return(status); + } + + /* 5-------------------stdin file stream driver----------------------*/ + /* the stdin stream is copied to a disk file then the disk file is opened */ + + status = fits_register_driver("stdinfile://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + stdin_open, + NULL, /* create function not allowed */ +#ifdef HAVE_FTRUNCATE + file_truncate, +#else + NULL, /* no file truncate function */ +#endif + file_close, + file_remove, + file_size, + file_flush, + file_seek, + file_read, + file_write); + + if (status) + { + ffpmsg("failed to register the stdinfile:// driver (init_cfitsio)"); + return(status); + } + + + /* 6-----------------------stdout stream driver------------------*/ + status = fits_register_driver("stdout://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + NULL, /* open function not required */ + mem_create, + mem_truncate, + stdout_close, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the stdout:// driver (init_cfitsio)"); + return(status); + } + + /* 7------------------iraf disk file to memory driver -----------*/ + status = fits_register_driver("irafmem://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + mem_iraf_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the irafmem:// driver (init_cfitsio)"); + return(status); + } + + /* 8------------------raw binary file to memory driver -----------*/ + status = fits_register_driver("rawfile://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + mem_rawfile_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the rawfile:// driver (init_cfitsio)"); + return(status); + } + + /* 9------------------compressed disk file to memory driver -----------*/ + status = fits_register_driver("compress://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + mem_compress_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the compress:// driver (init_cfitsio)"); + return(status); + } + + /* 10------------------compressed disk file to memory driver -----------*/ + /* Identical to compress://, except it allows READWRITE access */ + + status = fits_register_driver("compressmem://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + mem_compress_openrw, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the compressmem:// driver (init_cfitsio)"); + return(status); + } + + /* 11------------------compressed disk file to disk file driver -------*/ + status = fits_register_driver("compressfile://", + file_init, + file_shutdown, + file_setoptions, + file_getoptions, + file_getversion, + NULL, /* checkfile not needed */ + file_compress_open, + file_create, +#ifdef HAVE_FTRUNCATE + file_truncate, +#else + NULL, /* no file truncate function */ +#endif + file_close, + file_remove, + file_size, + file_flush, + file_seek, + file_read, + file_write); + + if (status) + { + ffpmsg("failed to register the compressfile:// driver (init_cfitsio)"); + return(status); + } + + /* 12---create file in memory, then compress it to disk file on close--*/ + status = fits_register_driver("compressoutfile://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + NULL, /* open function not allowed */ + mem_create_comp, + mem_truncate, + mem_close_comp, + file_remove, /* delete existing compressed disk file */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + + if (status) + { + ffpmsg( + "failed to register the compressoutfile:// driver (init_cfitsio)"); + return(status); + } + + /* Register Optional drivers */ + +#ifdef HAVE_NET_SERVICES + + /* 13--------------------root driver-----------------------*/ + + status = fits_register_driver("root://", + root_init, + root_shutdown, + root_setoptions, + root_getoptions, + root_getversion, + NULL, /* checkfile not needed */ + root_open, + root_create, + NULL, /* No truncate possible */ + root_close, + NULL, /* No remove possible */ + root_size, /* no size possible */ + root_flush, + root_seek, /* Though will always succeed */ + root_read, + root_write); + + if (status) + { + ffpmsg("failed to register the root:// driver (init_cfitsio)"); + return(status); + } + + /* 14--------------------http driver-----------------------*/ + status = fits_register_driver("http://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + http_checkfile, + http_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the http:// driver (init_cfitsio)"); + return(status); + } + + /* 15--------------------http file driver-----------------------*/ + + status = fits_register_driver("httpfile://", + file_init, + file_shutdown, + file_setoptions, + file_getoptions, + file_getversion, + NULL, /* checkfile not needed */ + http_file_open, + file_create, +#ifdef HAVE_FTRUNCATE + file_truncate, +#else + NULL, /* no file truncate function */ +#endif + file_close, + file_remove, + file_size, + file_flush, + file_seek, + file_read, + file_write); + + if (status) + { + ffpmsg("failed to register the httpfile:// driver (init_cfitsio)"); + return(status); + } + + /* 16--------------------http memory driver-----------------------*/ + /* same as http:// driver, except memory file can be opened READWRITE */ + status = fits_register_driver("httpmem://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + http_checkfile, + http_file_open, /* this will simply call http_open */ + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the httpmem:// driver (init_cfitsio)"); + return(status); + } + + /* 17--------------------httpcompress file driver-----------------------*/ + + status = fits_register_driver("httpcompress://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + http_compress_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the httpcompress:// driver (init_cfitsio)"); + return(status); + } + + + /* 18--------------------ftp driver-----------------------*/ + status = fits_register_driver("ftp://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + ftp_checkfile, + ftp_open, + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the ftp:// driver (init_cfitsio)"); + return(status); + } + + /* 19--------------------ftp file driver-----------------------*/ + status = fits_register_driver("ftpfile://", + file_init, + file_shutdown, + file_setoptions, + file_getoptions, + file_getversion, + NULL, /* checkfile not needed */ + ftp_file_open, + file_create, +#ifdef HAVE_FTRUNCATE + file_truncate, +#else + NULL, /* no file truncate function */ +#endif + file_close, + file_remove, + file_size, + file_flush, + file_seek, + file_read, + file_write); + + if (status) + { + ffpmsg("failed to register the ftpfile:// driver (init_cfitsio)"); + return(status); + } + + /* 20--------------------ftp mem driver-----------------------*/ + /* same as ftp:// driver, except memory file can be opened READWRITE */ + status = fits_register_driver("ftpmem://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + ftp_checkfile, + ftp_file_open, /* this will simply call ftp_open */ + NULL, /* create function not required */ + mem_truncate, + mem_close_free, + NULL, /* remove function not required */ + mem_size, + NULL, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the ftpmem:// driver (init_cfitsio)"); + return(status); + } + + /* 21--------------------ftp compressed file driver------------------*/ + status = fits_register_driver("ftpcompress://", + mem_init, + mem_shutdown, + mem_setoptions, + mem_getoptions, + mem_getversion, + NULL, /* checkfile not needed */ + ftp_compress_open, + 0, /* create function not required */ + mem_truncate, + mem_close_free, + 0, /* remove function not required */ + mem_size, + 0, /* flush function not required */ + mem_seek, + mem_read, + mem_write); + + if (status) + { + ffpmsg("failed to register the ftpcompress:// driver (init_cfitsio)"); + return(status); + } + /* === End of net drivers section === */ +#endif + +/* ==================== SHARED MEMORY DRIVER SECTION ======================= */ + +#ifdef HAVE_SHMEM_SERVICES + + /* 22--------------------shared memory driver-----------------------*/ + status = fits_register_driver("shmem://", + smem_init, + smem_shutdown, + smem_setoptions, + smem_getoptions, + smem_getversion, + NULL, /* checkfile not needed */ + smem_open, + smem_create, + NULL, /* truncate file not supported yet */ + smem_close, + smem_remove, + smem_size, + smem_flush, + smem_seek, + smem_read, + smem_write ); + + if (status) + { + ffpmsg("failed to register the shmem:// driver (init_cfitsio)"); + return(status); + } + +#endif +/* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */ + + +#ifdef HAVE_GSIFTP + /* 23--------------------gsiftp driver-----------------------*/ + status = fits_register_driver("gsiftp://", + gsiftp_init, + gsiftp_shutdown, + gsiftp_setoptions, + gsiftp_getoptions, + gsiftp_getversion, + gsiftp_checkfile, + gsiftp_open, + gsiftp_create, +#ifdef HAVE_FTRUNCATE + gsiftp_truncate, +#else + NULL, +#endif + gsiftp_close, + NULL, /* remove function not yet implemented */ + gsiftp_size, + gsiftp_flush, + gsiftp_seek, + gsiftp_read, + gsiftp_write); + + if (status) + { + ffpmsg("failed to register the gsiftp:// driver (init_cfitsio)"); + return(status); + } + +#endif + + return(status); +} +/*--------------------------------------------------------------------------*/ +int fits_register_driver(char *prefix, + int (*init)(void), + int (*shutdown)(void), + int (*setoptions)(int option), + int (*getoptions)(int *options), + int (*getversion)(int *version), + int (*checkfile) (char *urltype, char *infile, char *outfile), + int (*open)(char *filename, int rwmode, int *driverhandle), + int (*create)(char *filename, int *driverhandle), + int (*truncate)(int driverhandle, LONGLONG filesize), + int (*close)(int driverhandle), + int (*fremove)(char *filename), + int (*size)(int driverhandle, LONGLONG *size), + int (*flush)(int driverhandle), + int (*seek)(int driverhandle, LONGLONG offset), + int (*read) (int driverhandle, void *buffer, long nbytes), + int (*write)(int driverhandle, void *buffer, long nbytes) ) +/* + register all the functions needed to support an I/O driver +*/ +{ + int status; + + if (no_of_drivers < 0 ) { + /* This is bad. looks like memory has been corrupted. */ + ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); + ffpmsg("Fatal condition detected in fits_register_driver."); + return(TOO_MANY_DRIVERS); + } + + if (no_of_drivers + 1 > MAX_DRIVERS) + return(TOO_MANY_DRIVERS); + + if (prefix == NULL) + return(BAD_URL_PREFIX); + + + if (init != NULL) + { + status = (*init)(); + if (status) + return(status); + } + + /* fill in data in table */ + strncpy(driverTable[no_of_drivers].prefix, prefix, MAX_PREFIX_LEN); + driverTable[no_of_drivers].prefix[MAX_PREFIX_LEN - 1] = 0; + driverTable[no_of_drivers].init = init; + driverTable[no_of_drivers].shutdown = shutdown; + driverTable[no_of_drivers].setoptions = setoptions; + driverTable[no_of_drivers].getoptions = getoptions; + driverTable[no_of_drivers].getversion = getversion; + driverTable[no_of_drivers].checkfile = checkfile; + driverTable[no_of_drivers].open = open; + driverTable[no_of_drivers].create = create; + driverTable[no_of_drivers].truncate = truncate; + driverTable[no_of_drivers].close = close; + driverTable[no_of_drivers].remove = fremove; + driverTable[no_of_drivers].size = size; + driverTable[no_of_drivers].flush = flush; + driverTable[no_of_drivers].seek = seek; + driverTable[no_of_drivers].read = read; + driverTable[no_of_drivers].write = write; + + no_of_drivers++; /* increment the number of drivers */ + return(0); + } +/*--------------------------------------------------------------------------*/ +int ffiurl(char *url, /* input filename */ + char *urltype, /* e.g., 'file://', 'http://', 'mem://' */ + char *infilex, /* root filename (may be complete path) */ + char *outfile, /* optional output file name */ + char *extspec, /* extension spec: +n or [extname, extver] */ + char *rowfilterx, /* boolean row filter expression */ + char *binspec, /* histogram binning specifier */ + char *colspec, /* column or keyword modifier expression */ + int *status) +/* + parse the input URL into its basic components. + This routine is big and ugly and should be redesigned someday! +*/ +{ + return fits_parse_input_filename(url, urltype, infilex, outfile, + extspec, rowfilterx, binspec, colspec, 0, status); +} + +/*--------------------------------------------------------------------------*/ +int ffifile(char *url, /* input filename */ + char *urltype, /* e.g., 'file://', 'http://', 'mem://' */ + char *infilex, /* root filename (may be complete path) */ + char *outfile, /* optional output file name */ + char *extspec, /* extension spec: +n or [extname, extver] */ + char *rowfilterx, /* boolean row filter expression */ + char *binspec, /* histogram binning specifier */ + char *colspec, /* column or keyword modifier expression */ + char *pixfilter, /* pixel filter expression */ + int *status) +/* + fits_parse_input_filename + parse the input URL into its basic components. + This routine is big and ugly and should be redesigned someday! +*/ +{ + int ii, jj, slen, infilelen, plus_ext = 0, collen; + char *ptr1, *ptr2, *ptr3, *tmptr; + int hasAt, hasDot, hasOper, followingOper, spaceTerm, rowFilter; + int colStart, binStart, pixStart; + + + /* must have temporary variable for these, in case inputs are NULL */ + char *infile; + char *rowfilter; + char *tmpstr; + + if (*status > 0) + return(*status); + + /* Initialize null strings */ + if (infilex) *infilex = '\0'; + if (urltype) *urltype = '\0'; + if (outfile) *outfile = '\0'; + if (extspec) *extspec = '\0'; + if (binspec) *binspec = '\0'; + if (colspec) *colspec = '\0'; + if (rowfilterx) *rowfilterx = '\0'; + if (pixfilter) *pixfilter = '\0'; + + slen = strlen(url); + + if (slen == 0) /* blank filename ?? */ + return(*status); + + /* allocate memory for 3 strings, each as long as the input url */ + infile = (char *) calloc(3, slen + 1); + if (!infile) + return(*status = MEMORY_ALLOCATION); + + rowfilter = &infile[slen + 1]; + tmpstr = &rowfilter[slen + 1]; + + ptr1 = url; + + /* -------------------------------------------------------- */ + /* get urltype (e.g., file://, ftp://, http://, etc.) */ + /* --------------------------------------------------------- */ + + if (*ptr1 == '-' && ( *(ptr1 +1) == 0 || *(ptr1 +1) == ' ' || + *(ptr1 +1) == '[' || *(ptr1 +1) == '(' ) ) + { + /* "-" means read file from stdin. Also support "- ", */ + /* "-[extname]" and '-(outfile.fits)" but exclude disk file */ + /* names that begin with a minus sign, e.g., "-55d33m.fits" */ + + if (urltype) + strcat(urltype, "stdin://"); + ptr1++; + } + else if (!strncasecmp(ptr1, "stdin", 5)) + { + if (urltype) + strcat(urltype, "stdin://"); + ptr1 = ptr1 + 5; + } + else + { + ptr2 = strstr(ptr1, "://"); + ptr3 = strstr(ptr1, "(" ); + + if (ptr3 && (ptr3 < ptr2) ) + { + /* the urltype follows a '(' character, so it must apply */ + /* to the output file, and is not the urltype of the input file */ + ptr2 = 0; /* so reset pointer to zero */ + } + + if (ptr2) /* copy the explicit urltype string */ + { + if (urltype) + strncat(urltype, ptr1, ptr2 - ptr1 + 3); + ptr1 = ptr2 + 3; + } + else if (!strncmp(ptr1, "ftp:", 4) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "ftp://"); + ptr1 += 4; + } + else if (!strncmp(ptr1, "gsiftp:", 7) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "gsiftp://"); + ptr1 += 7; + } + else if (!strncmp(ptr1, "http:", 5) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "http://"); + ptr1 += 5; + } + else if (!strncmp(ptr1, "mem:", 4) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "mem://"); + ptr1 += 4; + } + else if (!strncmp(ptr1, "shmem:", 6) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "shmem://"); + ptr1 += 6; + } + else if (!strncmp(ptr1, "file:", 5) ) + { /* the 2 //'s are optional */ + if (urltype) + strcat(urltype, "file://"); + ptr1 += 5; + } + else /* assume file driver */ + { + if (urltype) + strcat(urltype, "file://"); + } + } + + /* ---------------------------------------------------------- + If this is a http:// type file, then the cgi file name could + include the '[' character, which should not be interpreted + as part of CFITSIO's Extended File Name Syntax. Test for this + case by seeing if the last character is a ']' or ')'. If it + is not, then just treat the whole input string as the file name + and do not attempt to interprete the name using the extended + filename syntax. + ----------------------------------------------------------- */ + + if (urltype && !strncmp(urltype, "http://", 7) ) + { + /* test for opening parenthesis or bracket in the file name */ + if( strchr(ptr1, '(' ) || strchr(ptr1, '[' ) ) + { + slen = strlen(ptr1); + ptr3 = ptr1 + slen - 1; + while (*ptr3 == ' ') /* ignore trailing blanks */ + ptr3--; + + if (*ptr3 != ']' && *ptr3 != ')' ) + { + /* name doesn't end with a ']' or ')' so don't try */ + /* to parse this unusual string (may be cgi string) */ + if (infilex) + strcpy(infilex, ptr1); + + free(infile); + return(*status); + } + } + } + + /* ---------------------------------------------------------- + Look for VMS style filenames like: + disk:[directory.subdirectory]filename.ext, or + [directory.subdirectory]filename.ext + + Check if the first character is a '[' and urltype != stdin + or if there is a ':[' string in the remaining url string. If + so, then need to move past this bracket character before + search for the opening bracket of a filter specification. + ----------------------------------------------------------- */ + + tmptr = ptr1; + if (*ptr1 == '[') + { + if (*url != '-') + tmptr = ptr1 + 1; /* this bracket encloses a VMS directory name */ + } + else + { + tmptr = strstr(ptr1, ":["); + if (tmptr) /* these 2 chars are part of the VMS disk and directory */ + tmptr += 2; + else + tmptr = ptr1; + } + + /* ------------------------ */ + /* get the input file name */ + /* ------------------------ */ + + ptr2 = strchr(tmptr, '('); /* search for opening parenthesis ( */ + ptr3 = strchr(tmptr, '['); /* search for opening bracket [ */ + + if (ptr2 == ptr3) /* simple case: no [ or ( in the file name */ + { + strcat(infile, ptr1); + } + else if (!ptr3 || /* no bracket, so () enclose output file name */ + (ptr2 && (ptr2 < ptr3)) ) /* () enclose output name before bracket */ + { + strncat(infile, ptr1, ptr2 - ptr1); + ptr2++; + + ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ + if (!ptr1) + { + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ) */ + } + + if (outfile) + strncat(outfile, ptr2, ptr1 - ptr2); + + /* the opening [ could have been part of output name, */ + /* e.g., file(out[compress])[3][#row > 5] */ + /* so search again for opening bracket following the closing ) */ + ptr3 = strchr(ptr1, '['); + + } + else /* bracket comes first, so there is no output name */ + { + strncat(infile, ptr1, ptr3 - ptr1); + } + + /* strip off any trailing blanks in the names */ + + slen = strlen(infile); + while ( (--slen) > 0 && infile[slen] == ' ') + infile[slen] = '\0'; + + if (outfile) + { + slen = strlen(outfile); + while ( (--slen) > 0 && outfile[slen] == ' ') + outfile[slen] = '\0'; + } + + /* --------------------------------------------- */ + /* check if this is an IRAF file (.imh extension */ + /* --------------------------------------------- */ + + if (strstr(infile, ".imh")) + { + if (urltype) + strcpy(urltype, "irafmem://"); + } + + /* --------------------------------------------- */ + /* check if the 'filename+n' convention has been */ + /* used to specifiy which HDU number to open */ + /* --------------------------------------------- */ + + jj = strlen(infile); + + for (ii = jj - 1; ii >= 0; ii--) + { + if (infile[ii] == '+') /* search backwards for '+' sign */ + break; + } + + if (ii > 0 && (jj - ii) < 7) /* limit extension numbers to 5 digits */ + { + infilelen = ii; + ii++; + ptr1 = infile+ii; /* pointer to start of sequence */ + + for (; ii < jj; ii++) + { + if (!isdigit((int) infile[ii] ) ) /* are all the chars digits? */ + break; + } + + if (ii == jj) + { + /* yes, the '+n' convention was used. Copy */ + /* the digits to the output extspec string. */ + plus_ext = 1; + + if (extspec) + strncpy(extspec, ptr1, jj - infilelen); + + infile[infilelen] = '\0'; /* delete the extension number */ + } + } + + /* -------------------------------------------------------------------- */ + /* if '*' was given for the output name expand it to the root file name */ + /* -------------------------------------------------------------------- */ + + if (outfile && outfile[0] == '*') + { + /* scan input name backwards to the first '/' character */ + for (ii = jj - 1; ii >= 0; ii--) + { + if (infile[ii] == '/' || ii == 0) + { + strcpy(outfile, &infile[ii + 1]); + break; + } + } + } + + /* ------------------------------------------ */ + /* copy strings from local copy to the output */ + /* ------------------------------------------ */ + if (infilex) + strcpy(infilex, infile); + + /* ---------------------------------------------------------- */ + /* if no '[' character in the input string, then we are done. */ + /* ---------------------------------------------------------- */ + if (!ptr3) + { + free(infile); + return(*status); + } + + /* ------------------------------------------- */ + /* see if [ extension specification ] is given */ + /* ------------------------------------------- */ + + if (!plus_ext) /* extension no. not already specified? Then */ + /* first brackets must enclose extension name or # */ + /* or it encloses a image subsection specification */ + /* or a raw binary image specifier */ + + /* Or, the extension specification may have been */ + /* omitted and we have to guess what the user intended */ + { + ptr1 = ptr3 + 1; /* pointer to first char after the [ */ + + ptr2 = strchr(ptr1, ']' ); /* search for closing ] */ + if (!ptr2) + { + ffpmsg("input file URL is missing closing bracket ']'"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + + /* ---------------------------------------------- */ + /* First, test if this is a rawfile specifier */ + /* which looks something like: '[ib512,512:2880]' */ + /* Test if first character is b,i,j,d,r,f, or u, */ + /* and optional second character is b or l, */ + /* followed by one or more digits, */ + /* finally followed by a ',', ':', or ']' */ + /* ---------------------------------------------- */ + + if (*ptr1 == 'b' || *ptr1 == 'B' || *ptr1 == 'i' || *ptr1 == 'I' || + *ptr1 == 'j' || *ptr1 == 'J' || *ptr1 == 'd' || *ptr1 == 'D' || + *ptr1 == 'r' || *ptr1 == 'R' || *ptr1 == 'f' || *ptr1 == 'F' || + *ptr1 == 'u' || *ptr1 == 'U') + { + /* next optional character may be a b or l (for Big or Little) */ + ptr1++; + if (*ptr1 == 'b' || *ptr1 == 'B' || *ptr1 == 'l' || *ptr1 == 'L') + ptr1++; + + if (isdigit((int) *ptr1)) /* must have at least 1 digit */ + { + while (isdigit((int) *ptr1)) + ptr1++; /* skip over digits */ + + if (*ptr1 == ',' || *ptr1 == ':' || *ptr1 == ']' ) + { + /* OK, this looks like a rawfile specifier */ + + if (urltype) + { + if (strstr(urltype, "stdin") ) + strcpy(urltype, "rawstdin://"); + else + strcpy(urltype, "rawfile://"); + } + + /* append the raw array specifier to infilex */ + if (infilex) + { + strcat(infilex, ptr3); + ptr1 = strchr(infilex, ']'); /* find the closing ] char */ + if (ptr1) + *(ptr1 + 1) = '\0'; /* terminate string after the ] */ + } + + if (extspec) + strcpy(extspec, "0"); /* the 0 ext number is implicit */ + + tmptr = strchr(ptr2 + 1, '[' ); /* search for another [ char */ + + /* copy any remaining characters into rowfilterx */ + if (tmptr && rowfilterx) + { + strcat(rowfilterx, tmptr + 1); + + tmptr = strchr(rowfilterx, ']' ); /* search for closing ] */ + if (tmptr) + *tmptr = '\0'; /* overwrite the ] with null terminator */ + } + + free(infile); /* finished parsing, so return */ + return(*status); + } + } + } /* end of rawfile specifier test */ + + /* -------------------------------------------------------- */ + /* Not a rawfile, so next, test if this is an image section */ + /* i.e., an integer followed by a ':' or a '*' or '-*' */ + /* -------------------------------------------------------- */ + + ptr1 = ptr3 + 1; /* reset pointer to first char after the [ */ + tmptr = ptr1; + + while (*tmptr == ' ') + tmptr++; /* skip leading blanks */ + + while (isdigit((int) *tmptr)) + tmptr++; /* skip over leading digits */ + + if (*tmptr == ':' || *tmptr == '*' || *tmptr == '-') + { + /* this is an image section specifier */ + strcat(rowfilter, ptr3); +/* + don't want to assume 0 extension any more; may imply an image extension. + if (extspec) + strcpy(extspec, "0"); +*/ + } + else + { + /* ----------------------------------------------------------------- + Not an image section or rawfile spec so may be an extension spec. + + Examples of valid extension specifiers: + [3] - 3rd extension; 0 = primary array + [events] - events extension + [events, 2] - events extension, with EXTVER = 2 + [events,2] - spaces are optional + [events, 3, b] - same as above, plus XTENSION = 'BINTABLE' + [PICS; colName(12)] - an image in row 12 of the colName column + in the PICS table extension + [PICS; colName(exposure > 1000)] - as above, but find image in + first row with with exposure column value > 1000. + [Rate Table] - extension name can contain spaces! + [Rate Table;colName(exposure>1000)] + + Examples of other types of specifiers (Not extension specifiers) + + [bin] !!! this is ambiguous, and can't be distinguished from + a valid extension specifier + [bini X=1:512:16] (also binb, binj, binr, and bind are allowed) + [binr (X,Y) = 5] + [bin @binfilter.txt] + + [col Time;rate] + [col PI=PHA * 1.1] + [col -Time; status] + + [X > 5] + [X>5] + [@filter.txt] + [StatusCol] !!! this is ambiguous, and can't be distinguished + from a valid extension specifier + [StatusCol==0] + [StatusCol || x>6] + [gtifilter()] + [regfilter("region.reg")] + + There will always be some ambiguity between an extension name and + a boolean row filtering expression, (as in a couple of the above + examples). If there is any doubt, the expression should be treated + as an extension specification; The user can always add an explicit + expression specifier to override this interpretation. + + The following decision logic will be used: + + 1) locate the first token, terminated with a space, comma, + semi-colon, or closing bracket. + + 2) the token is not part of an extension specifier if any of + the following is true: + + - if the token begins with '@' and contains a '.' + - if the token contains an operator: = > < || && + - if the token begins with "gtifilter(" or "regfilter(" + - if the token is terminated by a space and is followed by + additional characters (not a ']') AND any of the following: + - the token is 'col' + - the token is 3 or 4 chars long and begins with 'bin' + - the second token begins with an operator: + ! = < > | & + - * / % + + + 3) otherwise, the string is assumed to be an extension specifier + + ----------------------------------------------------------------- */ + + tmptr = ptr1; + while(*tmptr == ' ') + tmptr++; + + hasAt = 0; + hasDot = 0; + hasOper = 0; + followingOper = 0; + spaceTerm = 0; + rowFilter = 0; + colStart = 0; + binStart = 0; + pixStart = 0; + + if (*tmptr == '@') /* test for leading @ symbol */ + hasAt = 1; + + if ( !strncasecmp(tmptr, "col ", 4) ) + colStart = 1; + + if ( !strncasecmp(tmptr, "bin", 3) ) + binStart = 1; + + if ( !strncasecmp(tmptr, "pix", 3) ) + pixStart = 1; + + if ( !strncasecmp(tmptr, "gtifilter(", 10) || + !strncasecmp(tmptr, "regfilter(", 10) ) + { + rowFilter = 1; + } + else + { + /* parse the first token of the expression */ + for (ii = 0; ii < ptr2 - ptr1 + 1; ii++, tmptr++) + { + if (*tmptr == '.') + hasDot = 1; + else if (*tmptr == '=' || *tmptr == '>' || *tmptr == '<' || + (*tmptr == '|' && *(tmptr+1) == '|') || + (*tmptr == '&' && *(tmptr+1) == '&') ) + hasOper = 1; + + else if (*tmptr == ',' || *tmptr == ';' || *tmptr == ']') + { + break; + } + else if (*tmptr == ' ') /* a space char? */ + { + while(*tmptr == ' ') /* skip spaces */ + tmptr++; + + if (*tmptr == ']') /* is this the end? */ + break; + + spaceTerm = 1; /* 1st token is terminated by space */ + + /* test if this is a column or binning specifier */ + if (colStart || (ii <= 4 && (binStart || pixStart)) ) + rowFilter = 1; + else + { + + /* check if next character is an operator */ + if (*tmptr == '=' || *tmptr == '>' || *tmptr == '<' || + *tmptr == '|' || *tmptr == '&' || *tmptr == '!' || + *tmptr == '+' || *tmptr == '-' || *tmptr == '*' || + *tmptr == '/' || *tmptr == '%') + followingOper = 1; + } + break; + } + } + } + + /* test if this is NOT an extension specifier */ + if ( rowFilter || (pixStart && spaceTerm) || + (hasAt && hasDot) || + hasOper || + (spaceTerm && followingOper) ) + { + /* this is (probably) not an extension specifier */ + /* so copy all chars to filter spec string */ + strcat(rowfilter, ptr3); + } + else + { + /* this appears to be a legit extension specifier */ + /* copy the extension specification */ + if (extspec) + strncat(extspec, ptr1, ptr2 - ptr1); + + /* copy any remaining chars to filter spec string */ + strcat(rowfilter, ptr2 + 1); + } + } + } /* end of if (!plus_ext) */ + else + { + /* ------------------------------------------------------------------ */ + /* already have extension, so this must be a filter spec of some sort */ + /* ------------------------------------------------------------------ */ + + strcat(rowfilter, ptr3); + } + + /* strip off any trailing blanks from filter */ + slen = strlen(rowfilter); + while ( (--slen) >= 0 && rowfilter[slen] == ' ') + rowfilter[slen] = '\0'; + + if (!rowfilter[0]) + { + free(infile); + return(*status); /* nothing left to parse */ + } + + /* ------------------------------------------------ */ + /* does the filter contain a binning specification? */ + /* ------------------------------------------------ */ + + ptr1 = strstr(rowfilter, "[bin"); /* search for "[bin" */ + if (!ptr1) + ptr1 = strstr(rowfilter, "[BIN"); /* search for "[BIN" */ + if (!ptr1) + ptr1 = strstr(rowfilter, "[Bin"); /* search for "[Bin" */ + + if (ptr1) + { + ptr2 = ptr1 + 4; /* end of the '[bin' string */ + if (*ptr2 == 'b' || *ptr2 == 'i' || *ptr2 == 'j' || + *ptr2 == 'r' || *ptr2 == 'd') + ptr2++; /* skip the datatype code letter */ + + + if ( *ptr2 != ' ' && *ptr2 != ']') + ptr1 = NULL; /* bin string must be followed by space or ] */ + } + + if (ptr1) + { + /* found the binning string */ + if (binspec) + { + strcpy(binspec, ptr1 + 1); + ptr2 = strchr(binspec, ']'); + + if (ptr2) /* terminate the binning filter */ + { + *ptr2 = '\0'; + + if ( *(--ptr2) == ' ') /* delete trailing spaces */ + *ptr2 = '\0'; + } + else + { + ffpmsg("input file URL is missing closing bracket ']'"); + ffpmsg(rowfilter); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + } + + /* delete the binning spec from the row filter string */ + ptr2 = strchr(ptr1, ']'); + strcpy(tmpstr, ptr2+1); /* copy any chars after the binspec */ + strcpy(ptr1, tmpstr); /* overwrite binspec */ + } + + /* --------------------------------------------------------- */ + /* does the filter contain a column selection specification? */ + /* --------------------------------------------------------- */ + + ptr1 = strstr(rowfilter, "[col "); + if (!ptr1) + { + ptr1 = strstr(rowfilter, "[COL "); + + if (!ptr1) + ptr1 = strstr(rowfilter, "[Col "); + } + + if (ptr1) + { /* find the end of the column specifier */ + ptr2 = ptr1 + 5; + while (*ptr2 != ']') + { + if (*ptr2 == '\0') + { + ffpmsg("input file URL is missing closing bracket ']'"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + + if (*ptr2 == '\'') /* start of a literal string */ + { + ptr2 = strchr(ptr2 + 1, '\''); /* find closing quote */ + if (!ptr2) + { + ffpmsg + ("literal string in input file URL is missing closing single quote"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + } + + if (*ptr2 == '[') /* set of nested square brackets */ + { + ptr2 = strchr(ptr2 + 1, ']'); /* find closing bracket */ + if (!ptr2) + { + ffpmsg + ("nested brackets in input file URL is missing closing bracket"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + } + + ptr2++; /* continue search for the closing bracket character */ + } + + collen = ptr2 - ptr1 - 1; + + if (colspec) /* copy the column specifier to output string */ + { + strncpy(colspec, ptr1 + 1, collen); + colspec[collen] = '\0'; + + while (colspec[--collen] == ' ') + colspec[collen] = '\0'; /* strip trailing blanks */ + } + + /* delete the column selection spec from the row filter string */ + strcpy(tmpstr, ptr2 + 1); /* copy any chars after the colspec */ + strcpy(ptr1, tmpstr); /* overwrite binspec */ + } + + /* --------------------------------------------------------- */ + /* does the filter contain a pixel filter specification? */ + /* --------------------------------------------------------- */ + + ptr1 = strstr(rowfilter, "[pix"); + if (!ptr1) + { + ptr1 = strstr(rowfilter, "[PIX"); + + if (!ptr1) + ptr1 = strstr(rowfilter, "[Pix"); + } + + if (ptr1) + { + ptr2 = ptr1 + 4; /* end of the '[pix' string */ + if (*ptr2 == 'b' || *ptr2 == 'i' || *ptr2 == 'j' || *ptr2 == 'B' || + *ptr2 == 'I' || *ptr2 == 'J' || *ptr2 == 'r' || *ptr2 == 'd' || + *ptr2 == 'R' || *ptr2 == 'D') + ptr2++; /* skip the datatype code letter */ + + if (*ptr2 == '1') + ptr2++; /* skip the single HDU indicator */ + + if ( *ptr2 != ' ') + ptr1 = NULL; /* pix string must be followed by space */ + } + + if (ptr1) + { /* find the end of the pixel filter */ + while (*ptr2 != ']') + { + if (*ptr2 == '\0') + { + ffpmsg("input file URL is missing closing bracket ']'"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + + if (*ptr2 == '\'') /* start of a literal string */ + { + ptr2 = strchr(ptr2 + 1, '\''); /* find closing quote */ + if (!ptr2) + { + ffpmsg + ("literal string in input file URL is missing closing single quote"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + } + + if (*ptr2 == '[') /* set of nested square brackets */ + { + ptr2 = strchr(ptr2 + 1, ']'); /* find closing bracket */ + if (!ptr2) + { + ffpmsg + ("nested brackets in input file URL is missing closing bracket"); + free(infile); + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + } + + ptr2++; /* continue search for the closing bracket character */ + } + + collen = ptr2 - ptr1 - 1; + + if (pixfilter) /* copy the column specifier to output string */ + { + strncpy(pixfilter, ptr1 + 1, collen); + pixfilter[collen] = '\0'; + + while (pixfilter[--collen] == ' ') + pixfilter[collen] = '\0'; /* strip trailing blanks */ + } + + /* delete the pixel filter from the row filter string */ + strcpy(tmpstr, ptr2 + 1); /* copy any chars after the pixel filter */ + strcpy(ptr1, tmpstr); /* overwrite binspec */ + } + + + /* copy the remaining string to the rowfilter output... should only */ + /* contain a rowfilter expression of the form "[expr]" */ + + if (rowfilterx && rowfilter[0]) { + ptr2 = rowfilter + strlen(rowfilter) - 1; + if( rowfilter[0]=='[' && *ptr2==']' ) { + *ptr2 = '\0'; + strcpy(rowfilterx, rowfilter+1); + } else { + ffpmsg("input file URL lacks valid row filter expression"); + *status = URL_PARSE_ERROR; + } + } + + free(infile); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffexist(const char *infile, /* I - input filename or URL */ + int *exists, /* O - 2 = a compressed version of file exists */ + /* 1 = yes, disk file exists */ + /* 0 = no, disk file could not be found */ + /* -1 = infile is not a disk file (could */ + /* be a http, ftp, gsiftp, smem, or stdin file) */ + int *status) /* I/O status */ + +/* + test if the input file specifier is an existing file on disk + If the specified file can't be found, it then searches for a + compressed version of the file. +*/ +{ + FILE *diskfile; + char rootname[FLEN_FILENAME]; + char *ptr1; + + if (*status > 0) + return(*status); + + /* strip off any extname or filters from the name */ + ffrtnm( (char *)infile, rootname, status); + + ptr1 = strstr(rootname, "://"); + + if (ptr1 || *rootname == '-') { + if (!strncmp(rootname, "file", 4) ) { + ptr1 = ptr1 + 3; /* pointer to start of the disk file name */ + } else { + *exists = -1; /* this is not a disk file */ + return (*status); + } + } else { + ptr1 = rootname; + } + + /* see if the disk file exists */ + if (file_openfile(ptr1, 0, &diskfile)) { + + /* no, couldn't open file, so see if there is a compressed version */ + if (file_is_compressed(ptr1) ) { + *exists = 2; /* a compressed version of the file exists */ + } else { + *exists = 0; /* neither file nor compressed version exist */ + } + + } else { + + /* yes, file exists */ + *exists = 1; + fclose(diskfile); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrtnm(char *url, + char *rootname, + int *status) +/* + parse the input URL, returning the root name (filetype://basename). +*/ + +{ + int ii, jj, slen, infilelen; + char *ptr1, *ptr2, *ptr3; + char urltype[MAX_PREFIX_LEN]; + char infile[FLEN_FILENAME]; + + if (*status > 0) + return(*status); + + ptr1 = url; + *rootname = '\0'; + *urltype = '\0'; + *infile = '\0'; + + /* get urltype (e.g., file://, ftp://, http://, etc.) */ + if (*ptr1 == '-') /* "-" means read file from stdin */ + { + strcat(urltype, "-"); + ptr1++; + } + else if (!strncmp(ptr1, "stdin", 5) || !strncmp(ptr1, "STDIN", 5)) + { + strcat(urltype, "-"); + ptr1 = ptr1 + 5; + } + else + { + ptr2 = strstr(ptr1, "://"); + ptr3 = strstr(ptr1, "(" ); + + if (ptr3 && (ptr3 < ptr2) ) + { + /* the urltype follows a '(' character, so it must apply */ + /* to the output file, and is not the urltype of the input file */ + ptr2 = 0; /* so reset pointer to zero */ + } + + + if (ptr2) /* copy the explicit urltype string */ + { + strncat(urltype, ptr1, ptr2 - ptr1 + 3); + ptr1 = ptr2 + 3; + } + else if (!strncmp(ptr1, "ftp:", 4) ) + { /* the 2 //'s are optional */ + strcat(urltype, "ftp://"); + ptr1 += 4; + } + else if (!strncmp(ptr1, "gsiftp:", 7) ) + { /* the 2 //'s are optional */ + strcat(urltype, "gsiftp://"); + ptr1 += 7; + } + else if (!strncmp(ptr1, "http:", 5) ) + { /* the 2 //'s are optional */ + strcat(urltype, "http://"); + ptr1 += 5; + } + else if (!strncmp(ptr1, "mem:", 4) ) + { /* the 2 //'s are optional */ + strcat(urltype, "mem://"); + ptr1 += 4; + } + else if (!strncmp(ptr1, "shmem:", 6) ) + { /* the 2 //'s are optional */ + strcat(urltype, "shmem://"); + ptr1 += 6; + } + else if (!strncmp(ptr1, "file:", 5) ) + { /* the 2 //'s are optional */ + ptr1 += 5; + } + + /* else assume file driver */ + } + + /* get the input file name */ + ptr2 = strchr(ptr1, '('); /* search for opening parenthesis ( */ + ptr3 = strchr(ptr1, '['); /* search for opening bracket [ */ + + if (ptr2 == ptr3) /* simple case: no [ or ( in the file name */ + { + strcat(infile, ptr1); + } + else if (!ptr3) /* no bracket, so () enclose output file name */ + { + strncat(infile, ptr1, ptr2 - ptr1); + ptr2++; + + ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ + if (!ptr1) + return(*status = URL_PARSE_ERROR); /* error, no closing ) */ + + } + else if (ptr2 && (ptr2 < ptr3)) /* () enclose output name before bracket */ + { + strncat(infile, ptr1, ptr2 - ptr1); + ptr2++; + + ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ + if (!ptr1) + return(*status = URL_PARSE_ERROR); /* error, no closing ) */ + } + else /* bracket comes first, so there is no output name */ + { + strncat(infile, ptr1, ptr3 - ptr1); + } + + /* strip off any trailing blanks in the names */ + slen = strlen(infile); + for (ii = slen - 1; ii > 0; ii--) + { + if (infile[ii] == ' ') + infile[ii] = '\0'; + else + break; + } + + /* --------------------------------------------- */ + /* check if the 'filename+n' convention has been */ + /* used to specifiy which HDU number to open */ + /* --------------------------------------------- */ + + jj = strlen(infile); + + for (ii = jj - 1; ii >= 0; ii--) + { + if (infile[ii] == '+') /* search backwards for '+' sign */ + break; + } + + if (ii > 0 && (jj - ii) < 5) /* limit extension numbers to 4 digits */ + { + infilelen = ii; + ii++; + + + for (; ii < jj; ii++) + { + if (!isdigit((int) infile[ii] ) ) /* are all the chars digits? */ + break; + } + + if (ii == jj) + { + /* yes, the '+n' convention was used. */ + + infile[infilelen] = '\0'; /* delete the extension number */ + } + } + + strcat(rootname, urltype); /* construct the root name */ + strcat(rootname, infile); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffourl(char *url, /* I - full input URL */ + char *urltype, /* O - url type */ + char *outfile, /* O - base file name */ + char *tpltfile, /* O - template file name, if any */ + char *compspec, /* O - compression specification, if any */ + int *status) +/* + parse the output URL into its basic components. +*/ + +{ + char *ptr1, *ptr2, *ptr3; + + if (*status > 0) + return(*status); + + if (urltype) + *urltype = '\0'; + if (outfile) + *outfile = '\0'; + if (tpltfile) + *tpltfile = '\0'; + if (compspec) + *compspec = '\0'; + + ptr1 = url; + while (*ptr1 == ' ') /* ignore leading blanks */ + ptr1++; + + if ( ( (*ptr1 == '-') && ( *(ptr1 +1) == 0 || *(ptr1 +1) == ' ' ) ) + || !strcmp(ptr1, "stdout") + || !strcmp(ptr1, "STDOUT")) + + /* "-" means write to stdout; also support "- " */ + /* but exclude disk file names that begin with a minus sign */ + /* e.g., "-55d33m.fits" */ + { + if (urltype) + strcpy(urltype, "stdout://"); + } + else + { + /* not writing to stdout */ + /* get urltype (e.g., file://, ftp://, http://, etc.) */ + + ptr2 = strstr(ptr1, "://"); + if (ptr2) /* copy the explicit urltype string */ + { + if (urltype) + strncat(urltype, ptr1, ptr2 - ptr1 + 3); + + ptr1 = ptr2 + 3; + } + else /* assume file driver */ + { + if (urltype) + strcat(urltype, "file://"); + } + + /* look for template file name, enclosed in parenthesis */ + ptr2 = strchr(ptr1, '('); + + /* look for image compression parameters, enclosed in sq. brackets */ + ptr3 = strchr(ptr1, '['); + + if (outfile) + { + if (ptr2) /* template file was specified */ + strncat(outfile, ptr1, ptr2 - ptr1); + + else if (ptr3) /* compression was specified */ + strncat(outfile, ptr1, ptr3 - ptr1); + + else /* no template file or compression */ + strcpy(outfile, ptr1); + } + + + if (ptr2) /* template file was specified */ + { + ptr2++; + + ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ + + if (!ptr1) + { + return(*status = URL_PARSE_ERROR); /* error, no closing ) */ + } + + if (tpltfile) + strncat(tpltfile, ptr2, ptr1 - ptr2); + } + + if (ptr3) /* compression was specified */ + { + ptr3++; + + ptr1 = strchr(ptr3, ']' ); /* search for closing ] */ + + if (!ptr1) + { + return(*status = URL_PARSE_ERROR); /* error, no closing ] */ + } + + if (compspec) + strncat(compspec, ptr3, ptr1 - ptr3); + } + + /* check if a .gz compressed output file is to be created */ + /* by seeing if the filename ends in '.gz' */ + if (urltype && outfile) + { + if (!strcmp(urltype, "file://") ) + { + ptr1 = strstr(outfile, ".gz"); + if (ptr1) + { /* make sure the ".gz" is at the end of the file name */ + ptr1 += 3; + if (*ptr1 == 0 || *ptr1 == ' ' ) + strcpy(urltype, "compressoutfile://"); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffexts(char *extspec, + int *extnum, + char *extname, + int *extvers, + int *hdutype, + char *imagecolname, + char *rowexpress, + int *status) +{ +/* + Parse the input extension specification string, returning either the + extension number or the values of the EXTNAME, EXTVERS, and XTENSION + keywords in desired extension. Also return the name of the column containing + an image, and an expression to be used to determine which row to use, + if present. +*/ + char *ptr1, *ptr2; + int slen, nvals; + int notint = 1; /* initially assume specified extname is not an integer */ + char tmpname[FLEN_VALUE], *loc; + + *extnum = 0; + *extname = '\0'; + *extvers = 0; + *hdutype = ANY_HDU; + *imagecolname = '\0'; + *rowexpress = '\0'; + + if (*status > 0) + return(*status); + + ptr1 = extspec; /* pointer to first char */ + + while (*ptr1 == ' ') /* skip over any leading blanks */ + ptr1++; + + if (isdigit((int) *ptr1)) /* is the extension specification a number? */ + { + notint = 0; /* looks like extname may actually be the ext. number */ + *extnum = strtol(ptr1, &loc, 10); /* read the string as an integer */ + + while (*loc == ' ') /* skip over trailing blanks */ + loc++; + + /* check for read error, or junk following the integer */ + if ((*loc != '\0' && *loc != ';' ) || (errno == ERANGE) ) + { + *extnum = 0; + notint = 1; /* no, extname was not a simple integer after all */ + } + + if ( *extnum < 0 || *extnum > 99999) + { + *extnum = 0; /* this is not a reasonable extension number */ + ffpmsg("specified extension number is out of range:"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + } + + +/* This logic was too simple, and failed on extnames like '1000TEMP' + where it would try to move to the 1000th extension + + if (isdigit((int) *ptr1)) + { + sscanf(ptr1, "%d", extnum); + if (*extnum < 0 || *extnum > 9999) + { + *extnum = 0; + ffpmsg("specified extension number is out of range:"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + } +*/ + + if (notint) + { + /* not a number, so EXTNAME must be specified, followed by */ + /* optional EXTVERS and XTENSION values */ + + /* don't use space char as end indicator, because there */ + /* may be imbedded spaces in the EXTNAME value */ + slen = strcspn(ptr1, ",:;"); /* length of EXTNAME */ + strncat(extname, ptr1, slen); /* EXTNAME value */ + + /* now remove any trailing blanks */ + while (slen > 0 && *(extname + slen -1) == ' ') + { + *(extname + slen -1) = '\0'; + slen--; + } + + ptr1 += slen; + slen = strspn(ptr1, " ,:"); /* skip delimiter characters */ + ptr1 += slen; + + slen = strcspn(ptr1, " ,:;"); /* length of EXTVERS */ + if (slen) + { + nvals = sscanf(ptr1, "%d", extvers); /* EXTVERS value */ + if (nvals != 1) + { + ffpmsg("illegal EXTVER value in input URL:"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + + ptr1 += slen; + slen = strspn(ptr1, " ,:"); /* skip delimiter characters */ + ptr1 += slen; + + slen = strcspn(ptr1, ";"); /* length of HDUTYPE */ + if (slen) + { + if (*ptr1 == 'b' || *ptr1 == 'B') + *hdutype = BINARY_TBL; + else if (*ptr1 == 't' || *ptr1 == 'T' || + *ptr1 == 'a' || *ptr1 == 'A') + *hdutype = ASCII_TBL; + else if (*ptr1 == 'i' || *ptr1 == 'I') + *hdutype = IMAGE_HDU; + else + { + ffpmsg("unknown type of HDU in input URL:"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + } + } + else + { + strcpy(tmpname, extname); + ffupch(tmpname); + if (!strcmp(tmpname, "PRIMARY") || !strcmp(tmpname, "P") ) + *extname = '\0'; /* return extnum = 0 */ + } + } + + ptr1 = strchr(ptr1, ';'); + if (ptr1) + { + /* an image is to be opened; the image is contained in a single */ + /* cell of a binary table. A column name and an expression to */ + /* determine which row to use has been entered. */ + + ptr1++; /* skip over the ';' delimiter */ + while (*ptr1 == ' ') /* skip over any leading blanks */ + ptr1++; + + ptr2 = strchr(ptr1, '('); + if (!ptr2) + { + ffpmsg("illegal specification of image in table cell in input URL:"); + ffpmsg(" did not find a row expression enclosed in ( )"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + + strncat(imagecolname, ptr1, ptr2 - ptr1); /* copy column name */ + + ptr2++; /* skip over the '(' delimiter */ + while (*ptr2 == ' ') /* skip over any leading blanks */ + ptr2++; + + + ptr1 = strchr(ptr2, ')'); + if (!ptr2) + { + ffpmsg("illegal specification of image in table cell in input URL:"); + ffpmsg(" missing closing ')' character in row expression"); + ffpmsg(extspec); + return(*status = URL_PARSE_ERROR); + } + + strncat(rowexpress, ptr2, ptr1 - ptr2); /* row expression */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffextn(char *url, /* I - input filename/URL */ + int *extension_num, /* O - returned extension number */ + int *status) +{ +/* + Parse the input url string and return the number of the extension that + CFITSIO would automatically move to if CFITSIO were to open this input URL. + The extension numbers are one's based, so 1 = the primary array, 2 = the + first extension, etc. + + The extension number that gets returned is determined by the following + algorithm: + + 1. If the input URL includes a binning specification (e.g. + 'myfile.fits[3][bin X,Y]') then the returned extension number + will always = 1, since CFITSIO would create a temporary primary + image on the fly in this case. The same is true if an image + within a single cell of a binary table is opened. + + 2. Else if the input URL specifies an extension number (e.g., + 'myfile.fits[3]' or 'myfile.fits+3') then the specified extension + number (+ 1) is returned. + + 3. Else if the extension name is specified in brackets + (e.g., this 'myfile.fits[EVENTS]') then the file will be opened and searched + for the extension number. If the input URL is '-' (reading from the stdin + file stream) this is not possible and an error will be returned. + + 4. Else if the URL does not specify an extension (e.g. 'myfile.fits') then + a special extension number = -99 will be returned to signal that no + extension was specified. This feature is mainly for compatibility with + existing FTOOLS software. CFITSIO would open the primary array by default + (extension_num = 1) in this case. + +*/ + fitsfile *fptr; + char urltype[20]; + char infile[FLEN_FILENAME]; + char outfile[FLEN_FILENAME]; + char extspec[FLEN_FILENAME]; + char extname[FLEN_FILENAME]; + char rowfilter[FLEN_FILENAME]; + char binspec[FLEN_FILENAME]; + char colspec[FLEN_FILENAME]; + char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; + char *cptr; + int extnum, extvers, hdutype, tstatus = 0; + + if (*status > 0) + return(*status); + + /* parse the input URL into its basic components */ + ffiurl(url, urltype, infile, outfile, + extspec, rowfilter,binspec, colspec, status); + + if (*status > 0) + return(*status); + + if (*binspec) /* is there a binning specification? */ + { + *extension_num = 1; /* a temporary primary array image is created */ + return(*status); + } + + if (*extspec) /* is an extension specified? */ + { + ffexts(extspec, &extnum, + extname, &extvers, &hdutype, imagecolname, rowexpress, status); + + if (*status > 0) + return(*status); + + if (*imagecolname) /* is an image within a table cell being opened? */ + { + *extension_num = 1; /* a temporary primary array image is created */ + return(*status); + } + + if (*extname) + { + /* have to open the file to search for the extension name (curses!) */ + + if (!strcmp(urltype, "stdin://")) + /* opening stdin would destroying it! */ + return(*status = URL_PARSE_ERROR); + + /* First, strip off any filtering specification */ + strcpy(infile, url); + cptr = strchr(infile, ']'); /* locate the closing bracket */ + if (!cptr) + { + return(*status = URL_PARSE_ERROR); + } + else + { + cptr++; + *cptr = '\0'; /* terminate URl after the extension spec */ + } + + if (ffopen(&fptr, infile, READONLY, status) > 0) /* open the file */ + { + ffclos(fptr, &tstatus); + return(*status); + } + + ffghdn(fptr, &extnum); /* where am I in the file? */ + *extension_num = extnum; + ffclos(fptr, status); + + return(*status); + } + else + { + *extension_num = extnum + 1; /* return the specified number (+ 1) */ + return(*status); + } + } + else + { + *extension_num = -99; /* no specific extension was specified */ + /* defaults to primary array */ + return(*status); + } +} +/*--------------------------------------------------------------------------*/ + +int ffurlt(fitsfile *fptr, char *urlType, int *status) +/* + return the prefix string associated with the driver in use by the + fitsfile pointer fptr +*/ + +{ + strcpy(urlType, driverTable[fptr->Fptr->driver].prefix); + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffimport_file( char *filename, /* Text file to read */ + char **contents, /* Pointer to pointer to hold file */ + int *status ) /* CFITSIO error code */ +/* + Read and concatenate all the lines from the given text file. User + must free the pointer returned in contents. Pointer is guaranteed + to hold 2 characters more than the length of the text... allows the + calling routine to append (or prepend) a newline (or quotes?) without + reallocating memory. +*/ +{ + int allocLen, totalLen, llen, eoline; + char *lines,line[256]; + FILE *aFile; + + if( *status > 0 ) return( *status ); + + totalLen = 0; + allocLen = 1024; + lines = (char *)malloc( allocLen * sizeof(char) ); + if( !lines ) { + ffpmsg("Couldn't allocate memory to hold ASCII file contents."); + return(*status = MEMORY_ALLOCATION ); + } + lines[0] = '\0'; + + if( (aFile = fopen( filename, "r" ))==NULL ) { + sprintf(line,"Could not open ASCII file %s.",filename); + ffpmsg(line); + free( lines ); + return(*status = FILE_NOT_OPENED); + } + + while( fgets(line,256,aFile)!=NULL ) { + llen = strlen(line); + if ((llen > 1) && (line[0] == '/' && line[1] == '/')) + continue; /* skip comment lines begging with // */ + + eoline = 0; + + /* replace CR and newline chars at end of line with nulls */ + if ((llen > 0) && (line[llen-1]=='\n' || line[llen-1] == '\r')) { + line[--llen] = '\0'; + eoline = 1; /* found an end of line character */ + + if ((llen > 0) && (line[llen-1]=='\n' || line[llen-1] == '\r')) { + line[--llen] = '\0'; + } + } + + if( totalLen + llen + 3 >= allocLen ) { + allocLen += 256; + lines = (char *)realloc(lines, allocLen * sizeof(char) ); + if( ! lines ) { + ffpmsg("Couldn't allocate memory to hold ASCII file contents."); + *status = MEMORY_ALLOCATION; + break; + } + } + strcpy( lines+totalLen, line ); + totalLen += llen; + + if (eoline) { + strcpy( lines+totalLen, " "); /* add a space between lines */ + totalLen += 1; + } + } + fclose(aFile); + + *contents = lines; + return( *status ); +} + +/*--------------------------------------------------------------------------*/ +int fits_get_token(char **ptr, + char *delimiter, + char *token, + int *isanumber) /* O - is this token a number? */ +/* + parse off the next token, delimited by a character in 'delimiter', + from the input ptr string; increment *ptr to the end of the token. + Returns the length of the token, not including the delimiter char; +*/ +{ + int slen, ii; + + *token = '\0'; + + while (**ptr == ' ') /* skip over leading blanks */ + (*ptr)++; + + slen = strcspn(*ptr, delimiter); /* length of next token */ + if (slen) + { + strncat(token, *ptr, slen); /* copy token */ + + (*ptr) += slen; /* skip over the token */ + + if (isanumber) + { + *isanumber = 1; + + for (ii = 0; ii < slen; ii++) + { + if ( !isdigit((int) token[ii]) && token[ii] != '.' && + token[ii] != '-' && token[ii] != '+' && + token[ii] != 'E' && token[ii] != 'e') + { + *isanumber = 0; + break; + } + } + } + } + + return(slen); +} +/*---------------------------------------------------------------------------*/ +char *fits_split_names( + char *list) /* I - input list of names */ +{ +/* + A sequence of calls to fits_split_names will split the input string + into name tokens. The string typically contains a list of file or + column names. The names must be delimited by a comma and/or spaces. + This routine ignores spaces and commas that occur within parentheses, + brackets, or curly brackets. It also strips any leading and trailing + blanks from the returned name. + + This routine is similar to the ANSI C 'strtok' function: + + The first call to fits_split_names has a non-null input string. + It finds the first name in the string and terminates it by + overwriting the next character of the string with a '\0' and returns + a pointer to the name. Each subsequent call, indicated by a NULL + value of the input string, returns the next name, searching from + just past the end of the previous name. It returns NULL when no + further names are found. + + The following line illustrates how a string would be split into 3 names: + myfile[1][bin (x,y)=4], file2.fits file3.fits + ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ + 1st name 2nd name 3rd name + +*/ + int depth = 0; + char *start; + static char *ptr; + + if (list) /* reset ptr if a string is given */ + ptr = list; + + while (*ptr == ' ')ptr++; /* skip leading white space */ + + if (*ptr == '\0')return(0); /* no remaining file names */ + + start = ptr; + + while (*ptr != '\0') { + if ((*ptr == '[') || (*ptr == '(') || (*ptr == '{')) depth ++; + else if ((*ptr == '}') || (*ptr == ')') || (*ptr == ']')) depth --; + else if ((depth == 0) && (*ptr == ',' || *ptr == ' ')) { + *ptr = '\0'; /* terminate the filename here */ + ptr++; /* save pointer to start of next filename */ + break; + } + ptr++; + } + + return(start); +} +/*--------------------------------------------------------------------------*/ +int urltype2driver(char *urltype, int *driver) +/* + compare input URL with list of known drivers, returning the + matching driver numberL. +*/ + +{ + int ii; + + /* find matching driver; search most recent drivers first */ + + for (ii=no_of_drivers - 1; ii >= 0; ii--) + { + if (0 == strcmp(driverTable[ii].prefix, urltype)) + { + *driver = ii; + return(0); + } + } + + return(NO_MATCHING_DRIVER); +} +/*--------------------------------------------------------------------------*/ +int ffclos(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + close the FITS file by completing the current HDU, flushing it to disk, + then calling the system dependent routine to physically close the FITS file +*/ +{ + int tstatus = NO_CLOSE_ERROR, zerostatus = 0; + + if (!fptr) + return(*status = NULL_INPUT_PTR); + else if ((fptr->Fptr)->validcode != VALIDSTRUC) /* check for magic value */ + return(*status = BAD_FILEPTR); + + /* close and flush the current HDU */ + if (*status > 0) + ffchdu(fptr, &tstatus); /* turn off the error message from ffchdu */ + else + ffchdu(fptr, status); + + ((fptr->Fptr)->open_count)--; /* decrement usage counter */ + + if ((fptr->Fptr)->open_count == 0) /* if no other files use structure */ + { + ffflsh(fptr, TRUE, status); /* flush and disassociate IO buffers */ + + /* call driver function to actually close the file */ + if ( + (*driverTable[(fptr->Fptr)->driver].close)((fptr->Fptr)->filehandle) ) + { + if (*status <= 0) + { + *status = FILE_NOT_CLOSED; /* report if no previous error */ + + ffpmsg("failed to close the following file: (ffclos)"); + ffpmsg((fptr->Fptr)->filename); + } + } + + fits_clear_Fptr( fptr->Fptr, status); /* clear Fptr address */ + free((fptr->Fptr)->headstart); /* free memory for headstart array */ + free((fptr->Fptr)->filename); /* free memory for the filename */ + (fptr->Fptr)->filename = 0; + (fptr->Fptr)->validcode = 0; /* magic value to indicate invalid fptr */ + free(fptr->Fptr); /* free memory for the FITS file structure */ + free(fptr); /* free memory for the FITS file structure */ + } + else + { + /* + to minimize the fallout from any previous error (e.g., trying to + open a non-existent extension in a already opened file), + always call ffflsh with status = 0. + */ + /* just flush the buffers, don't disassociate them */ + if (*status > 0) + ffflsh(fptr, FALSE, &zerostatus); + else + ffflsh(fptr, FALSE, status); + + free(fptr); /* free memory for the FITS file structure */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdelt(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + close and DELETE the FITS file. +*/ +{ + char *basename; + int slen, tstatus = 0; + + if (!fptr) + return(*status = NULL_INPUT_PTR); + else if ((fptr->Fptr)->validcode != VALIDSTRUC) /* check for magic value */ + return(*status = BAD_FILEPTR); + + ffchdu(fptr, status); /* close the current HDU, ignore any errors */ + ffflsh(fptr, TRUE, status); /* flush and disassociate IO buffers */ + + /* call driver function to actually close the file */ + if ( (*driverTable[(fptr->Fptr)->driver].close)((fptr->Fptr)->filehandle) ) + { + if (*status <= 0) + { + *status = FILE_NOT_CLOSED; /* report error if no previous error */ + + ffpmsg("failed to close the following file: (ffdelt)"); + ffpmsg((fptr->Fptr)->filename); + } + } + + /* call driver function to actually delete the file */ + if ( (driverTable[(fptr->Fptr)->driver].remove) ) + { + /* parse the input URL to get the base filename */ + slen = strlen((fptr->Fptr)->filename); + basename = (char *) malloc(slen +1); + if (!basename) + return(*status = MEMORY_ALLOCATION); + + ffiurl((fptr->Fptr)->filename, NULL, basename, NULL, NULL, NULL, NULL, + NULL, &tstatus); + + if ((*driverTable[(fptr->Fptr)->driver].remove)(basename)) + { + ffpmsg("failed to delete the following file: (ffdelt)"); + ffpmsg((fptr->Fptr)->filename); + if (!(*status)) + *status = FILE_NOT_CLOSED; + } + free(basename); + } + + fits_clear_Fptr( fptr->Fptr, status); /* clear Fptr address */ + free((fptr->Fptr)->headstart); /* free memory for headstart array */ + free((fptr->Fptr)->filename); /* free memory for the filename */ + (fptr->Fptr)->filename = 0; + (fptr->Fptr)->validcode = 0; /* magic value to indicate invalid fptr */ + free(fptr->Fptr); /* free memory for the FITS file structure */ + free(fptr); /* free memory for the FITS file structure */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftrun( fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG filesize, /* I - size to truncate the file */ + int *status) /* O - error status */ +/* + low level routine to truncate a file to a new smaller size. +*/ +{ + if (driverTable[(fptr->Fptr)->driver].truncate) + { + ffflsh(fptr, FALSE, status); /* flush all the buffers first */ + (fptr->Fptr)->filesize = filesize; + (fptr->Fptr)->logfilesize = filesize; + (fptr->Fptr)->bytepos = filesize; + ffbfeof(fptr, status); /* eliminate any buffers beyond current EOF */ + return (*status = + (*driverTable[(fptr->Fptr)->driver].truncate)((fptr->Fptr)->filehandle, + filesize) ); + } + else + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffflushx( FITSfile *fptr) /* I - FITS file pointer */ +/* + low level routine to flush internal file buffers to the file. +*/ +{ + if (driverTable[fptr->driver].flush) + return ( (*driverTable[fptr->driver].flush)(fptr->filehandle) ); + else + return(0); /* no flush function defined for this driver */ +} +/*--------------------------------------------------------------------------*/ +int ffseek( FITSfile *fptr, /* I - FITS file pointer */ + LONGLONG position) /* I - byte position to seek to */ +/* + low level routine to seek to a position in a file. +*/ +{ + return( (*driverTable[fptr->driver].seek)(fptr->filehandle, position) ); +} +/*--------------------------------------------------------------------------*/ +int ffwrite( FITSfile *fptr, /* I - FITS file pointer */ + long nbytes, /* I - number of bytes to write */ + void *buffer, /* I - buffer to write */ + int *status) /* O - error status */ +/* + low level routine to write bytes to a file. +*/ +{ + if ( (*driverTable[fptr->driver].write)(fptr->filehandle, buffer, nbytes) ) + { + ffpmsg("Error writing data buffer to file:"); + ffpmsg(fptr->filename); + + *status = WRITE_ERROR; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffread( FITSfile *fptr, /* I - FITS file pointer */ + long nbytes, /* I - number of bytes to read */ + void *buffer, /* O - buffer to read into */ + int *status) /* O - error status */ +/* + low level routine to read bytes from a file. +*/ +{ + int readstatus; + + readstatus = (*driverTable[fptr->driver].read)(fptr->filehandle, + buffer, nbytes); + + if (readstatus == END_OF_FILE) + *status = END_OF_FILE; + else if (readstatus > 0) + { + ffpmsg("Error reading data buffer from file:"); + ffpmsg(fptr->filename); + + *status = READ_ERROR; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftplt(fitsfile **fptr, /* O - FITS file pointer */ + const char *filename, /* I - name of file to create */ + const char *tempname, /* I - name of template file */ + int *status) /* IO - error status */ +/* + Create and initialize a new FITS file based on a template file. + Uses C fopen and fgets functions. +*/ +{ + if (*status > 0) + return(*status); + + if ( ffinit(fptr, filename, status) ) /* create empty file */ + return(*status); + + ffoptplt(*fptr, tempname, status); /* open and use template */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffoptplt(fitsfile *fptr, /* O - FITS file pointer */ + const char *tempname, /* I - name of template file */ + int *status) /* IO - error status */ +/* + open template file and use it to create new file +*/ +{ + fitsfile *tptr; + int tstatus = 0, nkeys, nadd, ii; + char card[FLEN_CARD]; + + if (*status > 0) + return(*status); + + if (tempname == NULL || *tempname == '\0') /* no template file? */ + return(*status); + + /* try opening template */ + ffopen(&tptr, (char *) tempname, READONLY, &tstatus); + + if (tstatus) /* not a FITS file, so treat it as an ASCII template */ + { + ffxmsg(2, card); /* clear the error message */ + fits_execute_template(fptr, (char *) tempname, status); + + ffmahd(fptr, 1, 0, status); /* move back to the primary array */ + return(*status); + } + else /* template is a valid FITS file */ + { + ffmahd(tptr, 1, NULL, status); /* make sure we are at the beginning */ + while (*status <= 0) + { + ffghsp(tptr, &nkeys, &nadd, status); /* get no. of keywords */ + + for (ii = 1; ii <= nkeys; ii++) /* copy keywords */ + { + ffgrec(tptr, ii, card, status); + ffprec(fptr, card, status); + } + + ffmrhd(tptr, 1, 0, status); /* move to next HDU until error */ + ffcrhd(fptr, status); /* create empty new HDU in output file */ + } + + if (*status == END_OF_FILE) + { + *status = 0; /* expected error condition */ + } + ffclos(tptr, status); /* close the template file */ + } + + ffmahd(fptr, 1, 0, status); /* move to the primary array */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +void ffrprt( FILE *stream, int status) +/* + Print out report of cfitsio error status and messages on the error stack. + Uses C FILE stream. +*/ +{ + char status_str[FLEN_STATUS], errmsg[FLEN_ERRMSG]; + + if (status) + { + + fits_get_errstatus(status, status_str); /* get the error description */ + fprintf(stream, "\nFITSIO status = %d: %s\n", status, status_str); + + while ( fits_read_errmsg(errmsg) ) /* get error stack messages */ + fprintf(stream, "%s\n", errmsg); + } + return; +} +/*--------------------------------------------------------------------------*/ +int pixel_filter_helper( + fitsfile **fptr, /* IO - pointer to input image; on output it */ + /* points to the new image */ + char *outfile, /* I - name for output file */ + char *expr, /* I - Image filter expression */ + int *status) +{ + PixelFilter filter = { 0 }; + char * DEFAULT_TAG = "X"; + int ii, hdunum; + int singleHDU = 0; + + filter.count = 1; + filter.ifptr = fptr; + filter.tag = &DEFAULT_TAG; + + /* create new empty file for result */ + if (ffinit(&filter.ofptr, outfile, status) > 0) + { + ffpmsg("failed to create output file for pixel filter:"); + ffpmsg(outfile); + return(*status); + } + + fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ + + expr += 3; /* skip 'pix' */ + switch (expr[0]) { + case 'b': + case 'B': filter.bitpix = BYTE_IMG; break; + case 'i': + case 'I': filter.bitpix = SHORT_IMG; break; + case 'j': + case 'J': filter.bitpix = LONG_IMG; break; + case 'r': + case 'R': filter.bitpix = FLOAT_IMG; break; + case 'd': + case 'D': filter.bitpix = DOUBLE_IMG; break; + } + if (filter.bitpix) /* skip bitpix indicator */ + ++expr; + if (*expr == '1') { + ++expr; + singleHDU = 1; + } + if (*expr != ' ') { + ffpmsg("pixel filtering expression not space separated:"); + ffpmsg(expr); + } + while (*expr == ' ') + ++expr; + + /* copy all preceding extensions to the output file */ + for (ii = 1; !singleHDU && ii < hdunum; ii++) + { + fits_movabs_hdu(*fptr, ii, NULL, status); + if (fits_copy_hdu(*fptr, filter.ofptr, 0, status) > 0) + { + ffclos(filter.ofptr, status); + return(*status); + } + } + + /* move back to the original HDU position */ + fits_movabs_hdu(*fptr, hdunum, NULL, status); + + filter.expression = expr; + if (fits_pixel_filter(&filter, status)) { + ffpmsg("failed to execute image filter:"); + ffpmsg(expr); + ffclos(filter.ofptr, status); + return(*status); + } + + + /* copy any remaining HDUs to the output file */ + + for (ii = hdunum + 1; !singleHDU; ii++) + { + if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) + break; + + fits_copy_hdu(*fptr, filter.ofptr, 0, status); + } + + if (*status == END_OF_FILE) + *status = 0; /* got the expected EOF error; reset = 0 */ + else if (*status > 0) + { + ffclos(filter.ofptr, status); + return(*status); + } + + /* close the original file and return ptr to the new image */ + ffclos(*fptr, status); + + *fptr = filter.ofptr; /* reset the pointer to the new table */ + + /* move back to the image subsection */ + if (ii - 1 != hdunum) + fits_movabs_hdu(*fptr, hdunum, NULL, status); + + return(*status); +} diff --git a/software/cfitsio3040/cfitsio.doc b/software/cfitsio3040/cfitsio.doc new file mode 100644 index 000000000..5e4244b41 --- /dev/null +++ b/software/cfitsio3040/cfitsio.doc @@ -0,0 +1,9127 @@ + CFITSIO - An Interface to FITS Format Files for C Programmers + + William D Pence, HEASARC, NASA/GSFC + Version 3.0 + + +[Note: This file contains various formatting command symbols ('*', '-') +in the first column which are used when generating the LATeX version of +this document.] + +*I. Introduction + +**A. A Brief Overview + +CFITSIO is a machine-independent library of routines for reading and +writing data files in the FITS (Flexible Image Transport System) data +format. It can also read IRAF format image files and raw binary data +arrays by converting them on the fly into a virtual FITS format file. +This library is written in ANSI C and provides a powerful yet simple +interface for accessing FITS files which will run on most commonly used +computers and workstations. CFITSIO supports all the features +described in the official NOST definition of the FITS format and can +read and write all the currently defined types of extensions, including +ASCII tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. +The CFITSIO routines insulate the programmer from having to deal with +the complicated formatting details in the FITS file, however, it is +assumed that users have a general knowledge about the structure and +usage of FITS files. + +CFITSIO also contains a set of Fortran callable wrapper routines which +allow Fortran programs to call the CFITSIO routines. See the companion +``FITSIO User's Guide'' for the definition of the Fortran subroutine +calling sequences. These wrappers replace the older Fortran FITSIO +library which is no longer supported. + +The CFITSIO package was initially developed by the HEASARC (High Energy +Astrophysics Science Archive Research Center) at the NASA Goddard Space +Flight Center to convert various existing and newly acquired +astronomical data sets into FITS format and to further analyze data +already in FITS format. New features continue to be added to CFITSIO +in large part due to contributions of ideas or actual code from +users of the package. The Integral Science Data Center in Switzerland, +and the XMM/ESTEC project in The Netherlands made especially significant +contributions that resulted in many of the new features that appeared +in v2.0 of CFITSIO. + +**B. Sources of FITS Software and Information + +The latest version of the CFITSIO source code, +documentation, and example programs are available on the World-Wide +Web or via anonymous ftp from: +- + http://heasarc.gsfc.nasa.gov/fitsio + ftp://legacy.gsfc.nasa.gov/software/fitsio/c +- + +Any questions, bug reports, or suggested enhancements related to the CFITSIO +package should be sent to the primary author: +- + Dr. William Pence Telephone: (301) 286-4599 + HEASARC, Code 662 E-mail: pence@tetra.gsfc.nasa.gov + NASA/Goddard Space Flight Center + Greenbelt, MD 20771, USA +- +This User's Guide assumes that readers already have a general +understanding of the definition and structure of FITS format files. +Further information about FITS formats is available from the FITS Support +Office at {\tt http://fits.gsfc.nasa.gov}. In particular, the +'NOST FITS Standard' gives the authoritative definition of the FITS data +format, and the `FITS User's Guide' provides additional historical background +and practical advice on using FITS files. + +The HEASARC also provides a very sophisticated FITS file analysis +program called `Fv' which can be used to display and edit the contents +of any FITS file as well as construct new FITS files from scratch. The +display functions in Fv allow users to interactively adjust the +brightness and contrast of images, pan, zoom, and blink images, and +measure the positions and brightnesses of objects within images. FITS +tables can be displayed like a spread sheet, and then modified using +powerful calculator and sorting functions. Fv is freely available for +most Unix platforms, Mac PCs, and Windows PCs. +CFITSIO users may also be interested in the FTOOLS package of programs +that can be used to manipulate and analyze FITS format files. +Fv and FTOOLS are available from their respective Web sites at: +- + http://fv.gsfc.nasa.gov + http://heasarc.gsfc.nasa.gov/ftools +- + +**C. Acknowledgements + +The development of the many powerful features in CFITSIO was made +possible through collaborations with many people or organizations from +around the world. The following in particular have made especially +significant contributions: + +Programmers from the Integral Science Data Center, Switzerland (namely, +Jurek Borkowski, Bruce O'Neel, and Don Jennings), designed the concept +for the plug-in I/O drivers that was introduced with CFITSIO 2.0. The +use of `drivers' greatly simplified the low-level I/O, which in turn +made other new features in CFITSIO (e.g., support for compressed FITS +files and support for IRAF format image files) much easier to +implement. Jurek Borkowski wrote the Shared Memory driver, and Bruce +O'Neel wrote the drivers for accessing FITS files over the network +using the FTP, HTTP, and ROOT protocols. + +The ISDC also provided the template parsing routines (written by Jurek +Borkowski) and the hierarchical grouping routines (written by Don +Jennings). The ISDC DAL (Data Access Layer) routines are layered on +top of CFITSIO and make extensive use of these features. + +Giuliano Taffoni and Andrea Barisani, at INAF, University of Trieste, +Italy, implemented the I/O driver routines for accessing FITS files +on the computational grids using the gridftp protocol. + +Uwe Lammers (XMM/ESA/ESTEC, The Netherlands) designed the +high-performance lexical parsing algorithm that is used to do +on-the-fly filtering of FITS tables. This algorithm essentially +pre-compiles the user-supplied selection expression into a form that +can be rapidly evaluated for each row. Peter Wilson (RSTX, NASA/GSFC) +then wrote the parsing routines used by CFITSIO based on Lammers' +design, combined with other techniques such as the CFITSIO iterator +routine to further enhance the data processing throughput. This effort +also benefited from a much earlier lexical parsing routine that was +developed by Kent Blackburn (NASA/GSFC). More recently, Craig Markwardt +(NASA/GSFC) implemented additional functions (median, average, stddev) +and other enhancements to the lexical parser. + +The CFITSIO iterator function is loosely based on similar ideas +developed for the XMM Data Access Layer. + +Peter Wilson (RSTX, NASA/GSFC) wrote the complete set of +Fortran-callable wrappers for all the CFITSIO routines, which in turn +rely on the CFORTRAN macro developed by Burkhard Burow. + +The syntax used by CFITSIO for filtering or binning input FITS files is +based on ideas developed for the AXAF Science Center Data Model by +Jonathan McDowell, Antonella Fruscione, Aneta Siemiginowska and Bill +Joye. See http://heasarc.gsfc.nasa.gov/docs/journal/axaf7.html for +further description of the AXAF Data Model. + +The file decompression code were taken directly from the gzip (GNU zip) +program developed by Jean-loup Gailly and others. + +The new compressed image data format (where the image is tiled and +the compressed byte stream from each tile is stored in a binary table) +was implemented in collaboration with Richard White (STScI), Perry +Greenfield (STScI) and Doug Tody (NOAO). + +Doug Mink (SAO) provided the routines for converting IRAF format +images into FITS format. + +Martin Reinecke (Max Planck Institute, Garching)) provided the modifications to +cfortran.h that are necessary to support 64-bit integer values when calling +C routines from fortran programs. The cfortran.h macros were originally developed +by Burkhard Burow (CERN). + +In addition, many other people have made valuable contributions to the +development of CFITSIO. These include (with apologies to others that may +have inadvertently been omitted): + +Steve Allen, Carl Akerlof, Keith Arnaud, Morten Krabbe Barfoed, Kent +Blackburn, G Bodammer, Romke Bontekoe, Lucio Chiappetti, Keith Costorf, +Robin Corbet, John Davis, Richard Fink, Ning Gan, Emily Greene, Gretchen +Green, Joe Harrington, Cheng Ho, Phil Hodge, Jim Ingham, Yoshitaka +Ishisaki, Diab Jerius, Mark Levine, Todd Karakaskian, Edward King, +Scott Koch, Claire Larkin, Rob Managan, Eric Mandel, Richard Mathar, +John Mattox, Carsten Meyer, Emi Miyata, Stefan Mochnacki, Mike Noble, +Oliver Oberdorf, Clive Page, Arvind Parmar, Jeff Pedelty, Tim Pearson, +Philippe Prugniel, Maren Purves, Scott Randall, Chris Rogers, Arnold Rots, +Rob Seaman, Barry Schlesinger, Robin Stebbins, Andrew Szymkowiak, Allyn Tennant, +Peter Teuben, James Theiler, Doug Tody, Shiro Ueno, Steve Walton, Archie +Warnock, Alan Watson, Dan Whipple, Wim Wimmers, Peter Young, Jianjun Xu, +and Nelson Zarate. + +**D. Legal Stuff + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. +(However, see the restriction on the use of the gzip compression code, +below). + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +The file compress.c contains (slightly modified) source code that +originally came from gzip-1.2.4, copyright (C) 1992-1993 by Jean-loup +Gailly. This gzip code is distributed under the GNU General Public +License and thus requires that any software that uses the CFITSIO +library (which in turn uses the gzip code) must conform to the +provisions in the GNU General Public License. A copy of the GNU +license is included at the beginning of compress.c file. + +Similarly, the file wcsutil.c contains 2 slightly modified routines +from the Classic AIPS package that are also distributed under the GNU +General Public License. + +Alternate versions of the compress.c and wcsutil.c files (called +compress\_alternate.c and wcsutil\_alternate.c) are provided for users +who want to use the CFITSIO +library but are unwilling or unable to publicly release their software +under the terms of the GNU General Public License. These alternate +versions contains non-functional stubs for the file compression and +uncompression routines and the world coordinate transformation routines +used by CFITSIO. Replace the file `compress.c' +with `compress\_alternate.c' and 'wcsutil.c' with 'wcsutil\_alternate.c +before compiling the CFITSIO library. This +will produce a version of CFITSIO which does not support reading or +writing compressed FITS files, or doing image coordinate transformations, +but is otherwise identical to the standard version. + +*II. Creating the CFITSIO Library + +**A. Building the Library + +The CFITSIO code is contained in about 40 C source files (*.c) and header +files (*.h). On VAX/VMS systems 2 assembly-code files (vmsieeed.mar and +vmsieeer.mar) are also needed. + +CFITSIO has currently been tested on the following platforms: +- + OPERATING SYSTEM COMPILER + Sun OS gcc and cc (3.0.1) + Sun Solaris gcc and cc + Silicon Graphics IRIX gcc and cc + Silicon Graphics IRIX64 MIPS + Dec Alpha OSF/1 gcc and cc + DECstation Ultrix gcc + Dec Alpha OpenVMS cc + DEC VAX/VMS gcc and cc + HP-UX gcc + IBM AIX gcc + Linux gcc + MkLinux DR3 + Windows 95/98/NT Borland C++ V4.5 + Windows 95/98/NT/ME/XP Microsoft/Compaq Visual C++ v5.0, v6.0 + Windows 95/98/NT Cygwin gcc + MacOS 7.1 or greater Metrowerks 10.+ + MacOS-X 10.1 or greater cc (gcc) +- +CFITSIO will probably run on most other Unix platforms. Cray +supercomputers are currently not supported. + +***1. Unix Systems + +The CFITSIO library is built on Unix systems by typing: +- + > ./configure [--prefix=/target/installation/path] + > make (or 'make shared') + > make install (this step is optional) +- +at the operating system prompt. The configure command customizes the +Makefile for the particular system, then the `make' command compiles the +source files and builds the library. Type `./configure' and not simply +`configure' to ensure that the configure script in the current directory +is run and not some other system-wide configure script. The optional +'prefix' argument to configure gives the path to the directory where +the CFITSIO library and include files should be installed via the later +'make install' command. For example, +- + > ./configure --prefix=/usr1/local +- +will cause the 'make install' command to copy the CFITSIO libcfitsio file +to /usr1/local/lib and the necessary include files to /usr1/local/include +(assuming of course that the process has permission to write to these +directories). + +The 'make shared' option builds a shared or dynamic version of the +CFITSIO library. When using the shared library the executable code is +not copied into your program at link time and instead the program +locates the necessary library code at run time, normally through +LD\_LIBRARY\_PATH or some other method. The advantages of using a shared +library are: +- + 1. Less disk space if you build more than 1 program + 2. Less memory if more than one copy of a program using the shared + library is running at the same time since the system is smart + enough to share copies of the shared library at run time. + 3. Possibly easier maintenance since a new version of the shared + library can be installed without relinking all the software + that uses it (as long as the subroutine names and calling + sequences remain unchanged). + 4. No run-time penalty. +- +The disadvantages are: +- + 1. More hassle at runtime. You have to either build the programs + specially or have LD_LIBRARY_PATH set right. + 2. There may be a slight start up penalty, depending on where you are + reading the shared library and the program from and if your CPU is + either really slow or really heavily loaded. +- + +On Mac OS X platforms the 'make shared' command works like on other +UNIX platforms, but a .dylib file will be created instead of .so. If +installed in a nonstandard location, add its location to the +DYLD\_LIBRARY\_PATH environment variable so that the library can be found +at run time. + +On HP/UX systems, the environment variable CFLAGS should be set +to -Ae before running configure to enable "extended ANSI" features. + +By default, a set of Fortran-callable wrapper routines are +also built and included in the CFITSIO library. If these wrapper +routines are not needed (i.e., the CFITSIO library will not +be linked to any Fortran applications which call FITSIO subroutines) +then they may be omitted from the build by typing 'make all-nofitsio' +instead of simply typing 'make'. This will reduce the size +of the CFITSIO library slightly. + +It may not be possible to staticly link programs that use CFITSIO on +some platforms (namely, on Solaris 2.6) due to the network drivers +(which provide FTP and HTTP access to FITS files). It is possible to +make both a dynamic and a static version of the CFITSIO library, but +network file access will not be possible using the static version. + +***2. VMS + +On VAX/VMS and ALPHA/VMS systems the make\_gfloat.com command file may +be executed to build the cfitsio.olb object library using the default +G-floating point option for double variables. The make\_dfloat.com and +make\_ieee.com files may be used instead to build the library with the +other floating point options. Note that the getcwd function that is +used in the group.c module may require that programs using CFITSIO be +linked with the ALPHA\$LIBRARY:VAXCRTL.OLB library. See the example +link line in the next section of this document. + +***3. Windows PCs + +A precompiled DLL version of CFITSIO is available for IBM-PC users of +the Borland or Microsoft Visual C++ compilers in the files +cfitsiodll\_2xxx\_borland.zip and cfitsiodll\_2xxx\_vcc.zip, where +'2xxx' represents the current release number. These zip archives also +contains other files and instructions on how to use the CFITSIO DLL +library. + +The CFITSIO library may also be built from the source code using the +makefile.bc or makefile.vcc files. Finally, the makepc.bat file gives +an example of building CFITSIO with the Borland C++ v4.5 compiler +using older DOS commands. + +***4. Macintosh PCs + +When building on Mac OS-X, users should follow the Unix instructions, +above. + +The classic MacOS version (OS 9 or earlier) of the CFITSIO library can +be built by (1) un binhex and unstuff cfitsio\_mac.sit.hqx, (2) put +CFitsioPPC.mcp in the cfitsio directory, and (3) load CFitsioPPC.mcp +into CodeWarrior Pro 5 and make. This builds the CFITSIO library for +PPC. There are also targets for both the test program and the speed +test program. + +To use the MacOS port you can add Cfitsio PPC.lib to your CodeWarrior +Pro 5 project. Note that this only has been tested for the PPC and +probably won't work on 68k Macs. + + +**B. Testing the Library + +The CFITSIO library should be tested by building and running +the testprog.c program that is included with the release. +On Unix systems, type: +- + % make testprog + % testprog > testprog.lis + % diff testprog.lis testprog.out + % cmp testprog.fit testprog.std +- + On VMS systems, +(assuming cc is the name of the C compiler command), type: +- + $ cc testprog.c + $ link testprog, cfitsio/lib, alpha$library:vaxcrtl/lib + $ run testprog +- +The test program should produce a FITS file called `testprog.fit' +that is identical to the `testprog.std' FITS file included with this +release. The diagnostic messages (which were piped to the file +testprog.lis in the Unix example) should be identical to the listing +contained in the file testprog.out. The 'diff' and 'cmp' commands +shown above should not report any differences in the files. (There +may be some minor format differences, such as the presence or +absence of leading zeros, or 3 digit exponents in numbers, +which can be ignored). + +The Fortran wrappers in CFITSIO may be tested with the testf77 +program on Unix systems with: +- + % f77 -o testf77 testf77.f -L. -lcfitsio -lnsl -lsocket + or + % f77 -f -o testf77 testf77.f -L. -lcfitsio (under SUN O/S) + or + % f77 -o testf77 testf77.f -Wl,-L. -lcfitsio -lm -lnsl -lsocket (HP/UX) + + % testf77 > testf77.lis + % diff testf77.lis testf77.out + % cmp testf77.fit testf77.std +- +On machines running SUN O/S, Fortran programs must be compiled with the +'-f' option to force double precision variables to be aligned on 8-byte +boundarys to make the fortran-declared variables compatible with C. A +similar compiler option may be required on other platforms. Failing to +use this option may cause the program to crash on FITSIO routines that +read or write double precision variables. + +Also note that on some systems, the output listing of the testf77 +program may differ slightly from the testf77.std template, if leading +zeros are not printed by default before the decimal point when using F +format. + +A few other utility programs are included with CFITSIO; the first four +of this programs can be compiled an linked by typing `make +program\_name' where `program\_name' is the actual name of the program: +- + speed - measures the maximum throughput (in MB per second) + for writing and reading FITS files with CFITSIO. + + listhead - lists all the header keywords in any FITS file + + fitscopy - copies any FITS file (especially useful in conjunction + with the CFITSIO's extended input filename syntax). + + cookbook - a sample program that performs common read and + write operations on a FITS file. + + iter_a, iter_b, iter_c - examples of the CFITSIO iterator routine +- + +**C. Linking Programs with CFITSIO + +When linking applications software with the CFITSIO library, several +system libraries usually need to be specified on the link command +line. On Unix systems, the most reliable way to determine what +libraries are required is to type 'make testprog' and see what +libraries the configure script has added. The typical libraries that +need to be added are -lm (the math library) and -lnsl and -lsocket +(needed only for FTP and HTTP file access). These latter 2 libraries +are not needed on VMS and Windows platforms, because FTP file access is +not currently supported on those platforms. + +Note that when upgrading to a newer version of CFITSIO it is usually +necessary to recompile, as well as relink, the programs that use CFITSIO, +because the definitions in fitsio.h often change. + +**D. Getting Started with CFITSIO + +In order to effectively use the CFITSIO library it is recommended that +new users begin by reading the ``CFITSIO Quick Start Guide''. It +contains all the basic information needed to write programs that +perform most types of operations on FITS files. The set of example +FITS utility programs that are available from the CFITSIO web site are +also very useful for learning how to use CFITSIO. To learn even more +about the capabilities of the CFITSIO library the following steps are +recommended: + +1. Read the following short `FITS Primer' chapter for an overview of +the structure of FITS files. + +2. Review the Programming Guidelines in Chapter 4 to become familiar +with the conventions used by the CFITSIO interface. + +3. Refer to the cookbook.c, listhead.c, and fitscopy.c programs that +are included with this release for examples of routines that perform +various common FITS file operations. Type 'make program\_name' to +compile and link these programs on Unix systems. + +4. Write a simple program to read or write a FITS file using the Basic +Interface routines described in Chapter 5. + +5. Scan through the more specialized routines that are described in +the following chapters to become familiar with the functionality that +they provide. + +**E. Example Program + +The following listing shows an example of how to use the CFITSIO +routines in a C program. Refer to the cookbook.c program that is +included with the CFITSIO distribution for other example routines. + +This program creates a new FITS file, containing a FITS image. An +`EXPOSURE' keyword is written to the header, then the image data are +written to the FITS file before closing the FITS file. +- +#include "fitsio.h" /* required by every program that uses CFITSIO */ +main() +{ + fitsfile *fptr; /* pointer to the FITS file; defined in fitsio.h */ + int status, ii, jj; + long fpixel = 1, naxis = 2, nelements, exposure; + long naxes[2] = { 300, 200 }; /* image is 300 pixels wide by 200 rows */ + short array[200][300]; + + status = 0; /* initialize status before calling fitsio routines */ + fits_create_file(&fptr, "testfile.fits", &status); /* create new file */ + + /* Create the primary array image (16-bit short integer pixels */ + fits_create_img(fptr, SHORT_IMG, naxis, naxes, &status); + + /* Write a keyword; must pass the ADDRESS of the value */ + exposure = 1500.; + fits_update_key(fptr, TLONG, "EXPOSURE", &exposure, + "Total Exposure Time", &status); + + /* Initialize the values in the image with a linear ramp function */ + for (jj = 0; jj < naxes[1]; jj++) + for (ii = 0; ii < naxes[0]; ii++) + array[jj][ii] = ii + jj; + + nelements = naxes[0] * naxes[1]; /* number of pixels to write */ + + /* Write the array of integers to the image */ + fits_write_img(fptr, TSHORT, fpixel, nelements, array[0], &status); + + fits_close_file(fptr, &status); /* close the file */ + + fits_report_error(stderr, status); /* print out any error messages */ + return( status ); +} +- + +*III. A FITS Primer + +This section gives a brief overview of the structure of FITS files. +Users should refer to the documentation available from the NOST, as +described in the introduction, for more detailed information on FITS +formats. + +FITS was first developed in the late 1970's as a standard data +interchange format between various astronomical observatories. Since +then FITS has become the standard data format supported by most +astronomical data analysis software packages. + +A FITS file consists of one or more Header + Data Units (HDUs), where +the first HDU is called the `Primary HDU', or `Primary Array'. The +primary array contains an N-dimensional array of pixels, such as a 1-D +spectrum, a 2-D image, or a 3-D data cube. Five different primary +data types are supported: Unsigned 8-bit bytes, 16 and 32-bit signed +integers, and 32 and 64-bit floating point reals. FITS also has a +convention for storing 16 and 32-bit unsigned integers (see the later +section entitled `Unsigned Integers' for more details). The primary HDU +may also consist of only a header with a null array containing no +data pixels. + +Any number of additional HDUs may follow the primary array; these +additional HDUs are called FITS `extensions'. There are currently 3 +types of extensions defined by the FITS standard: + +\begin{itemize} +\item + Image Extension - a N-dimensional array of pixels, like in a primary array +\item + ASCII Table Extension - rows and columns of data in ASCII character format +\item + Binary Table Extension - rows and columns of data in binary representation +\end{itemize} + +In each case the HDU consists of an ASCII Header Unit followed by an optional +Data Unit. For historical reasons, each Header or Data unit must be an +exact multiple of 2880 8-bit bytes long. Any unused space is padded +with fill characters (ASCII blanks or zeros). + +Each Header Unit consists of any number of 80-character keyword records +or `card images' which have the +general form: +- + KEYNAME = value / comment string + NULLKEY = / comment: This keyword has no value +- +The keyword names may be up to 8 characters long and can only contain +uppercase letters, the digits 0-9, the hyphen, and the underscore +character. The keyword name is (usually) followed by an equals sign and +a space character (= ) in columns 9 - 10 of the record, followed by the +value of the keyword which may be either an integer, a floating point +number, a character string (enclosed in single quotes), or a boolean +value (the letter T or F). A keyword may also have a null or undefined +value if there is no specified value string, as in the second example, above + +The last keyword in the header is always the `END' keyword which has no +value or comment fields. There are many rules governing the exact +format of a keyword record (see the NOST FITS Standard) so it is better +to rely on standard interface software like CFITSIO to correctly +construct or to parse the keyword records rather than try to deal +directly with the raw FITS formats. + +Each Header Unit begins with a series of required keywords which depend +on the type of HDU. These required keywords specify the size and +format of the following Data Unit. The header may contain other +optional keywords to describe other aspects of the data, such as the +units or scaling values. Other COMMENT or HISTORY keywords are also +frequently added to further document the data file. + +The optional Data Unit immediately follows the last 2880-byte block in +the Header Unit. Some HDUs do not have a Data Unit and only consist of +the Header Unit. + +If there is more than one HDU in the FITS file, then the Header Unit of +the next HDU immediately follows the last 2880-byte block of the +previous Data Unit (or Header Unit if there is no Data Unit). + +The main required keywords in FITS primary arrays or image extensions are: +\begin{itemize} +\item +BITPIX -- defines the data type of the array: 8, 16, 32, -32, -64 for +unsigned 8--bit byte, 16--bit signed integer, 32--bit signed integer, +32--bit IEEE floating point, and 64--bit IEEE double precision floating +point, respectively. +\item +NAXIS -- the number of dimensions in the array, usually 0, 1, 2, 3, or 4. +\item +NAXISn -- (n ranges from 1 to NAXIS) defines the size of each dimension. +\end{itemize} + +FITS tables start with the keyword XTENSION = `TABLE' (for ASCII +tables) or XTENSION = `BINTABLE' (for binary tables) and have the +following main keywords: +\begin{itemize} +\item +TFIELDS -- number of fields or columns in the table +\item +NAXIS2 -- number of rows in the table +\item +TTYPEn -- for each column (n ranges from 1 to TFIELDS) gives the +name of the column +\item +TFORMn -- the data type of the column +\item +TUNITn -- the physical units of the column (optional) +\end{itemize} + +Users should refer to the FITS Support Office at {\tt http://fits.gsfc.nasa.gov} +for futher information about the FITS format and related software +packages. + + +*IV. Programming Guidelines + +**A. CFITSIO Definitions + +Any program that uses the CFITSIO interface must include the fitsio.h +header file with the statement +- + #include "fitsio.h" +- +This header file contains the prototypes for all the CFITSIO user +interface routines as well as the definitions of various constants used +in the interface. It also defines a C structure of type `fitsfile' +that is used by CFITSIO to store the relevant parameters that define +the format of a particular FITS file. Application programs must define +a pointer to this structure for each FITS file that is to be opened. +This structure is initialized (i.e., memory is allocated for the +structure) when the FITS file is first opened or created with the +fits\_open\_file or fits\_create\_file routines. This fitsfile pointer +is then passed as the first argument to every other CFITSIO routine +that operates on the FITS file. Application programs must not directly +read or write elements in this fitsfile structure because the +definition of the structure may change in future versions of CFITSIO. + +A number of symbolic constants are also defined in fitsio.h for the +convenience of application programmers. Use of these symbolic +constants rather than the actual numeric value will help to make the +source code more readable and easier for others to understand. +- +String Lengths, for use when allocating character arrays: + + #define FLEN_FILENAME 1025 /* max length of a filename */ + #define FLEN_KEYWORD 72 /* max length of a keyword */ + #define FLEN_CARD 81 /* max length of a FITS header card */ + #define FLEN_VALUE 71 /* max length of a keyword value string */ + #define FLEN_COMMENT 73 /* max length of a keyword comment string */ + #define FLEN_ERRMSG 81 /* max length of a CFITSIO error message */ + #define FLEN_STATUS 31 /* max length of a CFITSIO status text string */ + + Note that FLEN_KEYWORD is longer than the nominal 8-character keyword + name length because the HIERARCH convention supports longer keyword names. + +Access modes when opening a FITS file: + + #define READONLY 0 + #define READWRITE 1 + +BITPIX data type code values for FITS images: + + #define BYTE_IMG 8 /* 8-bit unsigned integers */ + #define SHORT_IMG 16 /* 16-bit signed integers */ + #define LONG_IMG 32 /* 32-bit signed integers */ + #define FLOAT_IMG -32 /* 32-bit single precision floating point */ + #define DOUBLE_IMG -64 /* 64-bit double precision floating point */ + + The following 4 data type codes are also supported by CFITSIO: + #define LONGLONG_IMG 64 /* 64-bit long signed integers */ + #define SBYTE_IMG 10 /* 8-bit signed integers, equivalent to */ + /* BITPIX = 8, BSCALE = 1, BZERO = -128 */ + #define USHORT_IMG 20 /* 16-bit unsigned integers, equivalent to */ + /* BITPIX = 16, BSCALE = 1, BZERO = 32768 */ + #define ULONG_IMG 40 /* 32-bit unsigned integers, equivalent to */ + /* BITPIX = 32, BSCALE = 1, BZERO = 2147483648 */ + +Codes for the data type of binary table columns and/or for the +data type of variables when reading or writing keywords or data: + + DATATYPE TFORM CODE + #define TBIT 1 /* 'X' */ + #define TBYTE 11 /* 8-bit unsigned byte, 'B' */ + #define TLOGICAL 14 /* logicals (int for keywords */ + /* and char for table cols 'L' */ + #define TSTRING 16 /* ASCII string, 'A' */ + #define TSHORT 21 /* signed short, 'I' */ + #define TLONG 41 /* signed long, */ + #define TFLOAT 42 /* single precision float, 'E' */ + #define TDOUBLE 82 /* double precision float, 'D' */ + #define TCOMPLEX 83 /* complex (pair of floats) 'C' */ + #define TDBLCOMPLEX 163 /* double complex (2 doubles) 'M' */ + + The following data type codes are also supported by CFITSIO: + #define TINT 31 /* int */ + #define TSBYTE 12 /* 8-bit signed byte, 'S' */ + #define TUINT 30 /* unsigned int 'V' */ + #define TUSHORT 20 /* unsigned short 'U' */ + #define TULONG 40 /* unsigned long */ + #define TLONGLONG 81 /* 64-bit long signed integer 'K' */ + + The following data type code is only for use with fits\_get\_coltype + #define TINT32BIT 41 /* signed 32-bit int, 'J' */ + + +HDU type code values (value returned when moving to new HDU): + + #define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */ + #define ASCII_TBL 1 /* ASCII table HDU */ + #define BINARY_TBL 2 /* Binary table HDU */ + #define ANY_HDU -1 /* matches any type of HDU */ + +Column name and string matching case-sensitivity: + + #define CASESEN 1 /* do case-sensitive string match */ + #define CASEINSEN 0 /* do case-insensitive string match */ + +Logical states (if TRUE and FALSE are not already defined): + + #define TRUE 1 + #define FALSE 0 + +Values to represent undefined floating point numbers: + + #define FLOATNULLVALUE -9.11912E-36F + #define DOUBLENULLVALUE -9.1191291391491E-36 + +Image compression algorithm definitions + + #define RICE_1 11 + #define GZIP_1 21 + #define PLIO_1 31 + #define HCOMPRESS_1 41 +- + +**B. Current Header Data Unit (CHDU) + +The concept of the Current Header and Data Unit, or CHDU, is +fundamental to the use of the CFITSIO library. A simple FITS image may +only contain a single Header and Data unit (HDU), but in general FITS +files can contain multiple Header Data Units (also known as +`extensions'), concatenated one after the other in the file. The user +can specify which HDU should be initially opened at run time by giving +the HDU name or number after the root file name. For example, +'myfile.fits[4]' opens the 5th HDU in the file (note that the numbering +starts with 0), and 'myfile.fits[EVENTS] opens the HDU with the name +'EVENTS' (as defined by the EXTNAME or HDUNAME keywords). If no HDU is +specified then CFITSIO opens the first HDU (the primary array) by +default. The CFITSIO routines which read and write data only operate +within the opened HDU, Other CFITSIO routines are provided to move to +and open any other existing HDU within the FITS file or to append or +insert new HDUs in the FITS file. + +**C. Function Names and Variable Datatypes + +Most of the CFITSIO routines have both a short name as well as a +longer descriptive name. The short name is only 5 or 6 characters long +and is similar to the subroutine name in the Fortran-77 version of +FITSIO. The longer name is more descriptive and it is recommended that +it be used instead of the short name to more clearly document the +source code. + +Many of the CFITSIO routines come in families which differ only in the +data type of the associated parameter(s). The data type of these +routines is indicated by the suffix of the routine name. The short +routine names have a 1 or 2 character suffix (e.g., 'j' in 'ffpkyj') +while the long routine names have a 4 character or longer suffix +as shown in the following table: +- + Long Short Data + Names Names Type + ----- ----- ---- + _bit x bit + _byt b unsigned byte + _sbyt sb signed byte + _sht i short integer + _lng j long integer + _lnglng jj 8-byte LONGLONG integer (see note below) + _usht ui unsigned short integer + _ulng uj unsigned long integer + _uint uk unsigned int integer + _int k int integer + _flt e real exponential floating point (float) + _fixflt f real fixed-decimal format floating point (float) + _dbl d double precision real floating-point (double) + _fixdbl g double precision fixed-format floating point (double) + _cmp c complex reals (pairs of float values) + _fixcmp fc complex reals, fixed-format floating point + _dblcmp m double precision complex (pairs of double values) + _fixdblcmp fm double precision complex, fixed-format floating point + _log l logical (int) + _str s character string +- + +The logical data type corresponds to `int' for logical keyword values, +and `byte' for logical binary table columns. In other words, the value +when writing a logical keyword must be stored in an `int' variable, and +must be stored in a `char' array when reading or writing to `L' columns +in a binary table. Inplicit data type conversion is not supported for +logical table columns, but is for keywords, so a logical keyword may be +read and cast to any numerical data type; a returned value = 0 +indicates false, and any other value = true. + +The `int' data type may be 2 bytes long on some old PC compilers, +but otherwise it is nearly always 4 bytes long. Some 64-bit +machines, like the Alpha/OSF, define the `short', `int', +and `long' integer data types to be 2, 4, and 8 bytes long, +respectively. The FITS standard only officially supports 2 and 4 byte integer +data types, however CFITSIO also supports an experimental 8-byte +integer datatype for FITS images (BITPIX = 64) and FITS table columns +(TFORMn = 'K'). + +Because there is no universal C compiler standard for the name of the +8-byte integer datatype, the fitsio.h include file typedef's +'LONGLONG' to be equivalent to an +appropriate 8-byte integer data type on each supported platform. +For maximum software portability it is recommended that +this LONGLONG datatype be used to define 8-byte integer variables +rather than using the native data type name on a particular +platform. On most +32-bit Unix and Mac OS-X operating systems LONGLONG is equivalent to the +intrinsic 'long long' 8-byte integer datatype. On 64-bit systems (which currently +includes Alpha OSF/1, 64-bit Sun Solaris, 64-bit SGI MIPS, and 64-bit +Itanium and Opteron PC systems), LONGLONG is simply typedef'ed to be +equivalent to 'long'. Microsoft Visual C++ Version 6.0 does not define +a 'long long' data type, so LONGLONG is typedef'ed to be equivalent to +the '\_\_int64' data type on 32-bit windows systems when using Visual C++. + +A related issue that affects the portability of software is how to print +out the value of a 'LONGLONG' variable with printf. Developers may +find it convenient to use the following preprocessing statements +in their C programs to handle this in a machine-portable manner: + +- +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + printf("%I64d", longlongvalue); + +#elif (USE_LL_SUFFIX == 1) + printf("%lld", longlongvalue); + +#else + printf("%ld", longlongvalue); +#endif +- + +Similarly, the name of the C utility routine that converts a character +string of digits into a 8-byte integer value is platform dependent: + +- +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + /* VC++ 6.0 does not seem to have an 8-byte conversion routine */ + +#elif (USE_LL_SUFFIX == 1) + longlongvalue = atoll(*string); + +#else + longlongvalue = atol(*string); +#endif +- + +When dealing with the FITS byte data type it is important to remember +that the raw values (before any scaling by the BSCALE and BZERO, or +TSCALn and TZEROn keyword values) in byte arrays (BITPIX = 8) or byte +columns (TFORMn = 'B') are interpreted as unsigned bytes with values +ranging from 0 to 255. Some C compilers define a 'char' variable as +signed, so it is important to explicitly declare a numeric char +variable as 'unsigned char' to avoid any ambiguity + +One feature of the CFITSIO routines is that they can operate on a `X' +(bit) column in a binary table as though it were a `B' (byte) column. +For example a `11X' data type column can be interpreted the same as a +`2B' column (i.e., 2 unsigned 8-bit bytes). In some instances, it can +be more efficient to read and write whole bytes at a time, rather than +reading or writing each individual bit. + +The complex and double precision complex data types are not directly +supported in ANSI C so these data types should be interpreted as pairs +of float or double values, respectively, where the first value in each +pair is the real part, and the second is the imaginary part. + +**D. Support for Unsigned Integers and Signed Bytes + +Although FITS does not directly support unsigned integers as one of its +fundamental data types, FITS can still be used to efficiently store +unsigned integer data values in images and binary tables. The +convention used in FITS files is to store the unsigned integers as +signed integers with an associated offset (specified by the BZERO or +TZEROn keyword). For example, to store unsigned 16-bit integer values +in a FITS image the image would be defined as a signed 16-bit integer +(with BITPIX keyword = SHORT\_IMG = 16) with the keywords BSCALE = 1.0 +and BZERO = 32768. Thus the unsigned values of 0, 32768, and 65535, +for example, are physically stored in the FITS image as -32768, 0, and +32767, respectively; CFITSIO automatically adds the BZERO offset to +these values when they are read. Similarly, in the case of unsigned +32-bit integers the BITPIX keyword would be equal to LONG\_IMG = 32 and +BZERO would be equal to 2147483648 (i.e. 2 raised to the 31st power). + +The CFITSIO interface routines will efficiently and transparently apply +the appropriate offset in these cases so in general application +programs do not need to be concerned with how the unsigned values are +actually stored in the FITS file. As a convenience for users, CFITSIO +has several predefined constants for the value of BITPIX (USHORT\_IMG, +ULONG\_IMG) and for the TFORMn value in the case of binary tables (`U' +and `V') which programmers can use when creating FITS files containing +unsigned integer values. The following code fragment illustrates how +to write a FITS 1-D primary array of unsigned 16-bit integers: +- + unsigned short uarray[100]; + int naxis, status; + long naxes[10], group, firstelem, nelements; + ... + status = 0; + naxis = 1; + naxes[0] = 100; + fits_create_img(fptr, USHORT_IMG, naxis, naxes, &status); + + firstelem = 1; + nelements = 100; + fits_write_img(fptr, TUSHORT, firstelem, nelements, + uarray, &status); + ... +- +In the above example, the 2nd parameter in fits\_create\_img tells +CFITSIO to write the header keywords appropriate for an array of 16-bit +unsigned integers (i.e., BITPIX = 16 and BZERO = 32768). Then the +fits\_write\_img routine writes the array of unsigned short integers +(uarray) into the primary array of the FITS file. Similarly, a 32-bit +unsigned integer image may be created by setting the second parameter +in fits\_create\_img equal to `ULONG\_IMG' and by calling the +fits\_write\_img routine with the second parameter = TULONG to write +the array of unsigned long image pixel values. + +An analogous set of routines are available for reading or writing unsigned +integer values and signed byte values in a FITS binary table extension. +When specifying the TFORMn keyword value which defines the format of a +column, CFITSIO recognized 3 additional data type codes besides those +already defined in the FITS standard: `U' meaning a 16-bit unsigned +integer column, `V' for a 32-bit unsigned integer column, and 'S' +for a signed byte column. These non-standard data type codes are not +actually written into the FITS file but instead are just used internally +within CFITSIO. The following code fragment illustrates how to use +these features: +- + unsigned short uarray[100]; + unsigned int varray[100]; + + int colnum, tfields, status; + long nrows, firstrow, firstelem, nelements, pcount; + + char extname[] = "Test_table"; /* extension name */ + + /* define the name, data type, and physical units for the 2 columns */ + char *ttype[] = { "Col_1", "Col_2", "Col_3" }; + char *tform[] = { "1U", "1V", "1S"}; /* special CFITSIO codes */ + char *tunit[] = { " ", " ", " " }; + ... + + /* write the header keywords */ + status = 0; + nrows = 1; + tfields = 3 + pcount = 0; + fits_create_tbl(fptr, BINARY_TBL, nrows, tfields, ttype, tform, + tunit, extname, &status); + + /* write the unsigned shorts to the 1st column */ + colnum = 1; + firstrow = 1; + firstelem = 1; + nelements = 100; + fits_write_col(fptr, TUSHORT, colnum, firstrow, firstelem, + nelements, uarray, &status); + + /* now write the unsigned longs to the 2nd column */ + colnum = 2; + fits_write_col(fptr, TUINT, colnum, firstrow, firstelem, + nelements, varray, &status); + ... +- +Note that the non-standard TFORM values for the 3 columns, `U' and `V', +tell CFITSIO to write the keywords appropriate for unsigned 16-bit and +unsigned 32-bit integers, respectively (i.e., TFORMn = '1I' and TZEROn += 32678 for unsigned 16-bit integers, and TFORMn = '1J' and TZEROn = +2147483648 for unsigned 32-bit integers). The 'S' TFORMn value tells +CFITSIO to write the keywords appropriate for a signed 8-bit byte column +with TFORMn = '1B' and TZEROn = -128. The calls to fits\_write\_col +then write the arrays of unsigned integer values to the columns. + +**E. Dealing with Character Strings + +The character string values in a FITS header or in an ASCII column in a +FITS table extension are generally padded out with non-significant +space characters (ASCII 32) to fill up the header record or the column +width. When reading a FITS string value, the CFITSIO routines will +strip off these non-significant trailing spaces and will return a +null-terminated string value containing only the significant +characters. Leading spaces in a FITS string are considered +significant. If the string contains all blanks, then CFITSIO will +return a single blank character, i.e, the first blank is considered to +be significant, since it distinguishes the string from a null or +undefined string, but the remaining trailing spaces are not +significant. + +Similarly, when writing string values to a FITS file the +CFITSIO routines expect to get a null-terminated string as input; +CFITSIO will pad the string with blanks if necessary when writing it +to the FITS file. + +When calling CFITSIO routines that return a character string it is +vital that the size of the char array be large enough to hold the +entire string of characters, otherwise CFITSIO will overwrite whatever +memory locations follow the char array, possibly causing the program to +execute incorrectly. This type of error can be difficult to debug, so +programmers should always ensure that the char arrays are allocated +enough space to hold the longest possible string, {\bf including} the +terminating NULL character. The fitsio.h file contains the following +defined constants which programmers are strongly encouraged to use +whenever they are allocating space for char arrays: +- +#define FLEN_FILENAME 1025 /* max length of a filename */ +#define FLEN_KEYWORD 72 /* max length of a keyword */ +#define FLEN_CARD 81 /* length of a FITS header card */ +#define FLEN_VALUE 71 /* max length of a keyword value string */ +#define FLEN_COMMENT 73 /* max length of a keyword comment string */ +#define FLEN_ERRMSG 81 /* max length of a CFITSIO error message */ +#define FLEN_STATUS 31 /* max length of a CFITSIO status text string */ +- +For example, when declaring a char array to hold the value string +of FITS keyword, use the following statement: +- + char value[FLEN_VALUE]; +- +Note that FLEN\_KEYWORD is longer than needed for the nominal 8-character +keyword name because the HIERARCH convention supports longer keyword names. + +**F. Implicit Data Type Conversion + +The CFITSIO routines that read and write numerical data can perform +implicit data type conversion. This means that the data type of the +variable or array in the program does not need to be the same as the +data type of the value in the FITS file. Data type conversion is +supported for numerical and string data types (if the string contains a +valid number enclosed in quotes) when reading a FITS header keyword +value and for numeric values when reading or writing values in the +primary array or a table column. CFITSIO returns status = +NUM\_OVERFLOW if the converted data value exceeds the range of the +output data type. Implicit data type conversion is not supported +within binary tables for string, logical, complex, or double complex +data types. + +In addition, any table column may be read as if it contained string values. +In the case of numeric columns the returned string will be formatted +using the TDISPn display format if it exists. + +**G. Data Scaling + +When reading numerical data values in the primary array or a +table column, the values will be scaled automatically by the BSCALE and +BZERO (or TSCALn and TZEROn) header values if they are +present in the header. The scaled data that is returned to the reading +program will have +- + output value = (FITS value) * BSCALE + BZERO +- +(a corresponding formula using TSCALn and TZEROn is used when reading +from table columns). In the case of integer output values the floating +point scaled value is truncated to an integer (not rounded to the +nearest integer). The fits\_set\_bscale and fits\_set\_tscale routines +(described in the `Advanced' chapter) may be used to override the +scaling parameters defined in the header (e.g., to turn off the scaling +so that the program can read the raw unscaled values from the FITS +file). + +When writing numerical data to the primary array or to a table column +the data values will generally be automatically inversely scaled by the +value of the BSCALE and BZERO (or TSCALn and TZEROn) keyword values if +they they exist in the header. These keywords must have been written +to the header before any data is written for them to have any immediate +effect. One may also use the fits\_set\_bscale and fits\_set\_tscale +routines to define or override the scaling keywords in the header +(e.g., to turn off the scaling so that the program can write the raw +unscaled values into the FITS file). If scaling is performed, the +inverse scaled output value that is written into the FITS file will +have +- + FITS value = ((input value) - BZERO) / BSCALE +- +(a corresponding formula using TSCALn and TZEROn is used when +writing to table columns). Rounding to the nearest integer, rather +than truncation, is performed when writing integer data types to the +FITS file. + +**H. Support for IEEE Special Values + +The ANSI/IEEE-754 floating-point number standard defines certain +special values that are used to represent such quantities as +Not-a-Number (NaN), denormalized, underflow, overflow, and infinity. +(See the Appendix in the NOST FITS standard or the NOST FITS User's +Guide for a list of these values). The CFITSIO routines that read +floating point data in FITS files recognize these IEEE special values +and by default interpret the overflow and infinity values as being +equivalent to a NaN, and convert the underflow and denormalized values +into zeros. In some cases programmers may want access to the raw IEEE +values, without any modification by CFITSIO. This can be done by +calling the fits\_read\_img or fits\_read\_col routines while +specifying 0.0 as the value of the NULLVAL parameter. This will force +CFITSIO to simply pass the IEEE values through to the application +program without any modification. This is not fully supported on +VAX/VMS machines, however, where there is no easy way to bypass the +default interpretation of the IEEE special values. + +**I. Error Status Values and the Error Message Stack + +Nearly all the CFITSIO routines return an error status value +in 2 ways: as the value of the last parameter in the function call, +and as the returned value of the function itself. This provides +some flexibility in the way programmers can test if an error +occurred, as illustrated in the following 2 code fragments: +- + if ( fits_write_record(fptr, card, &status) ) + printf(" Error occurred while writing keyword."); + +or, + + fits_write_record(fptr, card, &status); + if ( status ) + printf(" Error occurred while writing keyword."); +- +A listing of all the CFITSIO status code values is given at the end of +this document. Programmers are encouraged to use the symbolic +mnemonics (defined in fitsio.h) rather than the actual integer status +values to improve the readability of their code. + +The CFITSIO library uses an `inherited status' convention for the +status parameter which means that if a routine is called with a +positive input value of the status parameter as input, then the routine +will exit immediately without changing the value of the status +parameter. Thus, if one passes the status value returned from each +CFITSIO routine as input to the next CFITSIO routine, then whenever an +error is detected all further CFITSIO processing will cease. This +convention can simplify the error checking in application programs +because it is not necessary to check the value of the status parameter +after every single CFITSIO routine call. If a program contains a +sequence of several CFITSIO calls, one can just check the status value +after the last call. Since the returned status values are generally +distinctive, it should be possible to determine which routine +originally returned the error status. + +CFITSIO also maintains an internal stack of error messages +(80-character maximum length) which in many cases provide a more +detailed explanation of the cause of the error than is provided by the +error status number alone. It is recommended that the error message +stack be printed out whenever a program detects a CFITSIO error. The +function fits\_report\_error will print out the entire error message +stack, or alternatively one may call fits\_read\_errmsg to get the +error messages one at a time. + +**J. Variable-Length Arrays in Binary Tables + +CFITSIO provides easy-to-use support for reading and writing data in +variable length fields of a binary table. The variable length columns +have TFORMn keyword values of the form `1Pt(len)' where `t' is the +data type code (e.g., I, J, E, D, etc.) and `len' is an integer +specifying the maximum length of the vector in the table. (CFITSIO also +supports the experimental 'Q' datatype, which is identical to the 'P' type +except that is supports is a 64-bit address space and hence much larger +data structures). If the value +of `len' is not specified when the table is created (e.g., if the TFORM +keyword value is simply specified as '1PE' instead of '1PE(400) ), then +CFITSIO will automatically scan the table when it is closed to +determine the maximum length of the vector and will append this value +to the TFORMn value. + +The same routines that read and write data in an ordinary fixed length +binary table extension are also used for variable length fields, +however, the routine parameters take on a slightly different +interpretation as described below. + +All the data in a variable length field is written into an area called +the `heap' which follows the main fixed-length FITS binary table. The +size of the heap, in bytes, is specified by the PCOUNT keyword in the +FITS header. When creating a new binary table, the initial value of +PCOUNT should usually be set to zero. CFITSIO will recompute the size +of the heap as the data is written and will automatically update the +PCOUNT keyword value when the table is closed. When writing variable +length data to a table, CFITSIO will automatically extend the size +of the heap area if necessary, so that any following HDUs do not +get overwritten. + +By default the heap data area starts immediately after the last row of +the fixed-length table. This default starting location may be +overridden by the THEAP keyword, but this is not recommended. +If additional rows of data are added to the table, CFITSIO will +automatically shift the the heap down to make room for the new +rows, but it is obviously be more efficient to initially +create the table with the necessary number of blank rows, so that +the heap does not needed to be constantly moved. + +When writing row of data to a variable length field the entire array of values for +a given row of the table must be written with a single call to +fits\_write\_col. +The total length of the array is given by nelements ++ firstelem - 1. Additional elements cannot be appended to an existing +vector at a later time since any attempt to do so will simply overwrite +all the previously written data and the new data will be +written to a new area of the heap. The fits\_compress\_heap routine +is provided to compress the heap and recover any unused space. +To avoid having to deal with this issue, it is recommended +that rows in a variable length field should only be written once. +An exception to +this general rule occurs when setting elements of an array as +undefined. It is allowed to first write a dummy value into the array with +fits\_write\_col, and then call fits\_write\_col\_nul to flag the +desired elements as undefined. Note that the rows of a table, +whether fixed or variable length, do not have to be written +consecutively and may be written in any order. + +When writing to a variable length ASCII character field (e.g., TFORM = +'1PA') only a single character string can be written. The `firstelem' +and `nelements' parameter values in the fits\_write\_col routine are +ignored and the number of characters to write is simply determined by +the length of the input null-terminated character string. + +The fits\_write\_descript routine is useful in situations where +multiple rows of a variable length column have the identical array of +values. One can simply write the array once for the first row, and +then use fits\_write\_descript to write the same descriptor values into +the other rows; all the rows will then point to the same storage +location thus saving disk space. + +When reading from a variable length array field one can only read as +many elements as actually exist in that row of the table; reading does +not automatically continue with the next row of the table as occurs +when reading an ordinary fixed length table field. Attempts to read +more than this will cause an error status to be returned. One can +determine the number of elements in each row of a variable column with +the fits\_read\_descript routine. + +**K. Multiple Access to the Same FITS File + +CFITSIO supports simultaneous read and write access to multiple HDUs in +the same FITS file. Thus, one can open the same FITS file twice within +a single program and move to 2 different HDUs in the file, and then +read and write data or keywords to the 2 extensions just as if one were +accessing 2 completely separate FITS files. Since in general it is +not possible to physically open the same file twice and then expect to +be able to simultaneously (or in alternating succession) write to 2 +different locations in the file, CFITSIO recognizes when the file to be +opened (in the call to fits\_open\_file) has already been opened and +instead of actually opening the file again, just logically links the +new file to the old file. (This only applies if the file is opened +more than once within the same program, and does not prevent the same +file from being simultaneously opened by more than one program). Then +before CFITSIO reads or writes to either (logical) file, it makes sure +that any modifications made to the other file have been completely +flushed from the internal buffers to the file. Thus, in principle, one +could open a file twice, in one case pointing to the first extension +and in the other pointing to the 2nd extension and then write data to +both extensions, in any order, without danger of corrupting the file, +There may be some efficiency penalties in doing this however, since +CFITSIO has to flush all the internal buffers related to one file +before switching to the other, so it would still be prudent to +minimize the number of times one switches back and forth between doing +I/O to different HDUs in the same file. + +**L. When the Final Size of the FITS HDU is Unknown + +It is not required to know the total size of a FITS data array or table +before beginning to write the data to the FITS file. In the case of +the primary array or an image extension, one should initially create +the array with the size of the highest dimension (largest NAXISn +keyword) set to a dummy value, such as 1. Then after all the data have +been written and the true dimensions are known, then the NAXISn value +should be updated using the fits\_update\_key routine before moving to +another extension or closing the FITS file. + +When writing to FITS tables, CFITSIO automatically keeps track of the +highest row number that is written to, and will increase the size of +the table if necessary. CFITSIO will also automatically insert space +in the FITS file if necessary, to ensure that the data 'heap', if it +exists, and/or any additional HDUs that follow the table do not get +overwritten as new rows are written to the table. + +As a general rule it is best to specify the initial number of rows = 0 +when the table is created, then let CFITSIO keep track of the number of +rows that are actually written. The application program should not +manually update the number of rows in the table (as given by the NAXIS2 +keyword) since CFITSIO does this automatically. If a table is +initially created with more than zero rows, then this will usually be +considered as the minimum size of the table, even if fewer rows are +actually written to the table. Thus, if a table is initially created +with NAXIS2 = 20, and CFITSIO only writes 10 rows of data before +closing the table, then NAXIS2 will remain equal to 20. If however, 30 +rows of data are written to this table, then NAXIS2 will be increased +from 20 to 30. The one exception to this automatic updating of the +NAXIS2 keyword is if the application program directly modifies the +value of NAXIS2 (up or down) itself just before closing the table. In this +case, CFITSIO does not update NAXIS2 again, since it assumes that the +application program must have had a good reason for changing the value +directly. This is not recommended, however, and is only provided for +backward compatibility with software that initially creates a table +with a large number of rows, than decreases the NAXIS2 value to the +actual smaller value just before closing the table. + +**M. CFITSIO Size Limitations + +CFITSIO places very few restrictions on the size of FITS files that it +reads or writes. There are a few limits, however, that may affect +some extreme cases: + +1. The maximum number of FITS files that may be simultaneously opened +by CFITSIO is set by NMAXFILES as defined in fitsio2.h. It is currently +set = 300 by default. CFITSIO will allocate about 80 * NMAXFILES bytes +of memory for internal use. Note that the underlying C compiler or +operating system, may have a smaller limit on the number of opened files. +The C symbolic constant FOPEN\_MAX is intended to define the maximum +number of files that may open at once (including any other text or +binary files that may be open, not just FITS files). On some systems it +has been found that gcc supports a maximum of 255 opened files. + +Note that opening and operating on many FITS files simultaneously in +parallel may be less efficient than operating on smaller groups of files +in series. CFITSIO only has NIOBUF number of internal buffers (set = 40 +by default) that are used for temporary storage of the most recent data +records that have been read or written in the FITS files. If the number +of opened files is greater than NIOBUF, then CFITSIO may waste more time +flushing and re-reading or re-writing the same records in the FITS files. + +2. It used to be common for computer systems to only support disk files up +to 2**31 bytes = 2.1 GB in size, but this barrier is gradually being broken. +CFITSIO can optionally read and write these so-called 'large files' that +are greater than 2.1 GB on +platforms where they are supported, but this +usually requires that special compiler option flags be specified to turn +on this option. On linux and solaris systems the compiler flags are +'-D\_LARGEFILE\_SOURCE' and `-D\_FILE\_OFFSET\_BITS=64'. These flags +may also work on other platforms but this has not been tested. Starting +with version 3.0 of CFITSIO, the default Makefile that is distributed +with CFITSIO will include these 2 compiler flags when building on Solaris +and Linux PC systems. Users on other platforms will need to add these +compiler flags manually if they want to support large files. In most +cases it appears that it is not necessary to include these compiler +flags when compiling application code that call the CFITSIO library +routines. + +When CFITSIO is built with large file support (e.g., on Solaris and +Linux PC system by default) then it can read and write FITS data files +on disk that have any of these conditions: + +\begin{itemize} +\item +FITS files larger than 2.1 GB in size +\item +FITS images containing greater than 2.1 G pixels +\item +FITS images that have one dimension with more than 2.1 G pixels +(as given by one of the NAXISn keyword) +\item +FITS tables containing more than 2.1 G rows (given by the NAXIS2 keyword), +or with rows that are more than 2.1 GB wide (given by the NAXIS1 keyword) +\item +FITS binary tables with a variable-length array heap that is larger +than 2.1 GB (given by the PCOUNT keyword) +\end{itemize} + +The current maximum FITS file size supported by CFITSIO +is about 6 terabytes (containing +2**31 FITS blocks, each 2880 bytes in size). Currently, support for large +files in CFITSIO has been tested on the Linux, Solaris, and IBM AIX +operating systems. + +Note that when writing application programs that are intended to support +large files it is important to use 64-bit integer variables +to store quantities such as the dimensions of images, or the number of +rows in a table. These programs must also call the special versions +of some of the CFITSIO routines that have been adapted to +support 64-bit integers. The names of these routines end in +'ll' ('el' 'el') to distinquish them from the 32-bit integer +version (e.g., fits\_get\_num\_rowsll). + + +*V. Basic CFITSIO Interface Routines + +This chapter describes the basic routines in the CFITSIO user interface +that provide all the functions normally needed to read and write most +FITS files. It is recommended that these routines be used for most +applications and that the more advanced routines described in the +next chapter only be used in special circumstances when necessary. + +The following conventions are used in this chapter in the description +of each function: + +1. Most functions have 2 names: a long descriptive name and a short +concise name. Both names are listed on the first line of the following +descriptions, separated by a slash (/) character. Programmers may use +either name in their programs but the long names are recommended to +help document the code and make it easier to read. + +2. A right arrow symbol ($>$) is used in the function descriptions to +separate the input parameters from the output parameters in the +definition of each routine. This symbol is not actually part of the C +calling sequence. + +3. The function parameters are defined in more detail in the +alphabetical listing in Appendix B. + +4. The first argument in almost all the functions is a pointer to a +structure of type `fitsfile'. Memory for this structure is allocated +by CFITSIO when the FITS file is first opened or created and is freed +when the FITS file is closed. + +5. The last argument in almost all the functions is the error status +parameter. It must be equal to 0 on input, otherwise the function will +immediately exit without doing anything. A non-zero output value +indicates that an error occurred in the function. In most cases the +status value is also returned as the value of the function itself. + +**A. CFITSIO Error Status Routines + +>1 Return a descriptive text string (30 char max.) corresponding to +> a CFITSIO error status code.\label{ffgerr} +- + void fits_get_errstatus / ffgerr (int status, > char *err_text) +- +>2 Return the top (oldest) 80-character error message from the + internal CFITSIO stack of error messages and shift any remaining + messages on the stack up one level. Call this routine + repeatedly to get each message in sequence. The function returns + a value = 0 and a null error message when the error stack is empty. +>\label{ffgmsg} +- + int fits_read_errmsg / ffgmsg (char *err_msg) +- +>3 Print out the error message corresponding to the input status + value and all the error messages on the CFITSIO stack to the specified + file stream (normally to stdout or stderr). If the input + status value = 0 then this routine does nothing. +>\label{ffrprt} +- + void fits_report_error / ffrprt (FILE *stream, status) +- +>4 The fits\_write\_errmark routine puts an invisible marker on the + CFITSIO error stack. The fits\_clear\_errmark routine can then be + used to delete any more recent error messages on the stack, back to + the position of the marker. This preserves any older error messages + on the stack. The fits\_clear\_errmsg routine simply clears all the + messages (and marks) from the stack. These routines are called + without any arguments. +>\label{ffpmrk} \label{ffcmsg} +- + void fits_write_errmark / ffpmrk (void) + void fits_clear_errmark / ffcmrk (void) + void fits_clear_errmsg / ffcmsg (void) +- + +**B. FITS File Access Routines + +>1 Open an existing data file. \label{ffopen} + +- +int fits_open_file / ffopen + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_diskfile / ffdkopen + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_data / ffdopn + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_table / fftopn + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_image / ffiopn + (fitsfile **fptr, char *filename, int iomode, > int *status) +- + +The iomode parameter determines the read/write access allowed in the +file and can have values of READONLY (0) or READWRITE (1). The filename +parameter gives the name of the file to be opened, followed by an +optional argument giving the name or index number of the extension +within the FITS file that should be moved to and opened (e.g., +\verb-myfile.fits+3- or \verb-myfile.fits[3]- moves to the 3rd extension within +the file, and \verb-myfile.fits[events]- moves to the extension with the +keyword EXTNAME = 'EVENTS'). + +The fits\_open\_diskfile routine is similar to the fits\_open\_file routine +except that it does not support the extended filename syntax in the input +file name. This routine simply tries to open the specified input file +on magnetic disk. This routine is mainly for use in cases where the +filename (or directory path) contains square or curly bracket characters +that would confuse the extended filename parser. + +The fits\_open\_data routine is similar to the fits\_open\_file routine +except that it will move to the first HDU containing significant data, +if a HDU name or number to open was not explicitly specified as +part of the filename. In this case, it will look for the first +IMAGE HDU with NAXIS greater than 0, or the first table that does not contain the +strings `GTI' (Good Time Interval extension) or `OBSTABLE' in the +EXTNAME keyword value. + +The fits\_open\_table and fits\_open\_image routines are similar to +fits\_open\_data except they will move to the first significant table +HDU or image HDU in the file, respectively, if a HDU name or +number is not specified as part of the filename. + +IRAF images (.imh format files) and raw binary data arrays may also be +opened with READONLY access. CFITSIO will automatically test if the +input file is an IRAF image, and if, so will convert it on the fly into +a virtual FITS image before it is opened by the application program. +If the input file is a raw binary data array of numbers, then the data type +and dimensions of the array must be specified in square brackets +following the name of the file (e.g. 'rawfile.dat[i512,512]' opens a +512 x 512 short integer image). See the `Extended File Name Syntax' +chapter for more details on how to specify the raw file name. The raw +file is converted on the fly into a virtual FITS image in memory that +is then opened by the application program with READONLY access. + +Programs can read the input file from the 'stdin' file stream if a dash +character ('-') is given as the filename. Files can also be opened over +the network using FTP or HTTP protocols by supplying the appropriate URL +as the filename. + +The input file can be modified in various ways to create a virtual file +(usually stored in memory) that is then opened by the application +program by supplying a filtering or binning specifier in square brackets +following the filename. Some of the more common filtering methods are +illustrated in the following paragraphs, but users should refer to the +'Extended File Name Syntax' chapter for a complete description of +the full file filtering syntax. + +When opening an image, a rectangular subset of the physical image may be +opened by listing the first and last pixel in each dimension (and +optional pixel skipping factor): +- +myimage.fits[101:200,301:400] +- +will create and open a 100x100 pixel virtual image of that section of +the physical image, and \verb+myimage.fits[*,-*]+ opens a virtual image +that is the same size as the physical image but has been flipped in +the vertical direction. + +When opening a table, the filtering syntax can be used to add or delete +columns or keywords in the virtual table: +\verb-myfile.fits[events][col !time; PI = PHA*1.2]- opens a virtual table in which the TIME column +has been deleted and a new PI column has been added with a value 1.2 +times that of the PHA column. Similarly, one can filter a table to keep +only those rows that satisfy a selection criterion: +\verb-myfile.fits[events][pha > 50]- creates and opens a virtual table +containing only those rows with a PHA value greater than 50. A large +number of boolean and mathematical operators can be used in the +selection expression. One can also filter table rows using 'Good Time +Interval' extensions, and spatial region filters as in +\verb-myfile.fits[events][gtifilter()]- and +\verb-myfile.fits[events][regfilter( "stars.rng")]-. + +Finally, table columns may be binned or histogrammed to generate a +virtual image. For example, \verb-myfile.fits[events][bin (X,Y)=4]- will +result in a 2-dimensional image calculated by binning the X and Y +columns in the event table with a bin size of 4 in each dimension. The +TLMINn and TLMAXn keywords will be used by default to determine the +range of the image. + +A single program can open the same FITS file more than once and then +treat the resulting fitsfile pointers as though they were completely +independent FITS files. Using this facility, a program can open a FITS +file twice, move to 2 different extensions within the file, and then +> read and write data in those extensions in any order. + +>2 Create and open a new empty output FITS file. \label{ffinit} + +- +int fits_create_file / ffinit + (fitsfile **fptr, char *filename, > int *status) + +int fits_create_diskfile / ffdkinit + (fitsfile **fptr, char *filename, > int *status) +- + +An error will be returned if the specified file already exists, unless +the filename is prefixed with an exclamation point (!). In that case +CFITSIO will overwrite (delete) any existing file with the same name. +Note that the exclamation point is a special UNIX character so if +it is used on the command line it must be preceded by a backslash to +force the UNIX shell to accept the character as part of the filename. + +The output file will be written to the 'stdout' file stream if a dash +character ('-') or the string 'stdout' is given as the filename. Similarly, +'-.gz' or 'stdout.gz' will cause the file to be gzip compressed before +it is written out to the stdout stream. + +Optionally, the name of a template file that is used to define the +structure of the new file may be specified in parentheses following the +output file name. The template file may be another FITS file, in which +case the new file, at the time it is opened, will be an exact copy of +the template file except that the data structures (images and tables) +will be filled with zeros. Alternatively, the template file may be an +ASCII format text file containing directives that define the keywords to be +created in each HDU of the file. See the 'Extended File Name Syntax' + section for a complete description of the template file syntax. + +The fits\_create\_diskfile routine is similar to the fits\_create\_file routine +except that it does not support the extended filename syntax in the input +file name. This routine simply tries to create the specified file +on magnetic disk. This routine is mainly for use in cases where the +filename (or directory path) contains square or curly bracket characters +> that would confuse the extended filename parser. + + +>3 Close a previously opened FITS file. The first routine simply +closes the file, whereas the second one also DELETES THE FILE, which +can be useful in cases where a FITS file has been partially created, +but then an error occurs which prevents it from being completed. +> \label{ffclos} \label{ffdelt} +- + int fits_close_file / ffclos (fitsfile *fptr, > int *status) + + int fits_delete_file / ffdelt (fitsfile *fptr, > int *status) +- +>4 Return the name, I/O mode (READONLY or READWRITE), and/or the file +type (e.g. 'file://', 'ftp://') of the opened FITS file. \label{ffflnm} +> \label{ffflmd} \label{ffurlt} +- + int fits_file_name / ffflnm (fitsfile *fptr, > char *filename, int *status) + + int fits_file_mode / ffflmd (fitsfile *fptr, > int *iomode, int *status) + + int fits_url_type / ffurlt (fitsfile *fptr, > char *urltype, int *status) +- +**C. HDU Access Routines + +The following functions perform operations on Header-Data Units (HDUs) +as a whole. + +>1 Move to a different HDU in the file. The first routine moves to a + specified absolute HDU number (starting with 1 for the primary + array) in the FITS file, and the second routine moves a relative + number HDUs forward or backward from the current HDU. A null + pointer may be given for the hdutype parameter if it's value is not + needed. The third routine moves to the (first) HDU which has the + specified extension type and EXTNAME and EXTVER keyword values (or + HDUNAME and HDUVER keywords). The hdutype parameter may have a + value of IMAGE\_HDU, ASCII\_TBL, BINARY\_TBL, or ANY\_HDU where + ANY\_HDU means that only the extname and extver values will be used + to locate the correct extension. If the input value of extver is 0 + then the EXTVER keyword is ignored and the first HDU with a + matching EXTNAME (or HDUNAME) keyword will be found. If no + matching HDU is found in the file then the current HDU will remain + unchanged and a status = BAD\_HDU\_NUM will be returned. +> \label{ffmahd} \label{ffmrhd} \label{ffmnhd} +- + int fits_movabs_hdu / ffmahd + (fitsfile *fptr, int hdunum, > int *hdutype, int *status) + + int fits_movrel_hdu / ffmrhd + (fitsfile *fptr, int nmove, > int *hdutype, int *status) + + int fits_movnam_hdu / ffmnhd + (fitsfile *fptr, int hdutype, char *extname, int extver, > int *status) +- +>2 Return the total number of HDUs in the FITS file. This returns the +number of completely defined HDUs in the file. If a new HDU has just been added to +the FITS file, then that last HDU will only be counted if it has been closed, +or if data has been written to the HDU. +> The current HDU remains unchanged by this routine. \label{ffthdu} +- + int fits_get_num_hdus / ffthdu + (fitsfile *fptr, > int *hdunum, int *status) +- +>3 Return the number of the current HDU (CHDU) in the FITS file (where + the primary array = 1). This function returns the HDU number +> rather than a status value. \label{ffghdn} +- + int fits_get_hdu_num / ffghdn + (fitsfile *fptr, > int *hdunum) +- +>4 Return the type of the current HDU in the FITS file. The possible +> values for hdutype are: IMAGE\_HDU, ASCII\_TBL, or BINARY\_TBL. \label{ffghdt} +- + int fits_get_hdu_type / ffghdt + (fitsfile *fptr, > int *hdutype, int *status) +- +>5 Copy all or part of the HDUs in the FITS file associated with infptr + and append them to the end of the FITS file associated with + outfptr. If 'previous' is true (not 0), then any HDUs preceding + the current HDU in the input file will be copied to the output + file. Similarly, 'current' and 'following' determine whether the + current HDU, and/or any following HDUs in the input file will be + copied to the output file. Thus, if all 3 parameters are true, then the + entire input file will be copied. On exit, the current HDU in + the input file will be unchanged, and the last HDU in the output +> file will be the current HDU. \label{ffcpfl} +- + int fits_copy_file / ffcpfl + (fitsfile *infptr, fitsfile *outfptr, int previous, int current, + int following, > int *status) +- +>6 Copy the current HDU from the FITS file associated with infptr and append it + to the end of the FITS file associated with outfptr. Space may be +> reserved for MOREKEYS additional keywords in the output header. \label{ffcopy} +- + int fits_copy_hdu / ffcopy + (fitsfile *infptr, fitsfile *outfptr, int morekeys, > int *status) +- +>7 Write the current HDU in the input FITS file to the +> output FILE stream (e.g., to stdout). \label{ffwrhdu} +- + int fits_write_hdu / ffwrhdu + (fitsfile *infptr, FILE *stream, > int *status) +- +>8 Copy the header (and not the data) from the CHDU associated with infptr + to the CHDU associated with outfptr. If the current output HDU + is not completely empty, then the CHDU will be closed and a new + HDU will be appended to the output file. An empty output data unit +> will be created with all values initially = 0). \label{ffcphd} +- + int fits_copy_header / ffcphd + (fitsfile *infptr, fitsfile *outfptr, > int *status) +- +>9 Delete the CHDU in the FITS file. Any following HDUs will be shifted + forward in the file, to fill in the gap created by the deleted + HDU. In the case of deleting the primary array (the first HDU in + the file) then the current primary array will be replace by a null + primary array containing the minimum set of required keywords and + no data. If there are more extensions in the file following the + one that is deleted, then the the CHDU will be redefined to point + to the following extension. If there are no following extensions + then the CHDU will be redefined to point to the previous HDU. The + output hdutype parameter returns the type of the new CHDU. A null + pointer may be given for +> hdutype if the returned value is not needed. \label{ffdhdu} +- + int fits_delete_hdu / ffdhdu + (fitsfile *fptr, > int *hdutype, int *status) +- +**D. Header Keyword Read/Write Routines + +These routines read or write keywords in the Current Header Unit +(CHU). Wild card characters (*, ?, or \#) may be used when specifying +the name of the keyword to be read: a '?' will match any single +character at that position in the keyword name and a '*' will match any +length (including zero) string of characters. The '\#' character will +match any consecutive string of decimal digits (0 - 9). When a wild +card is used the routine will only search for a match from the current +header position to the end of the header and will not resume the search +from the top of the header back to the original header position as is +done when no wildcards are included in the keyword name. The +fits\_read\_record routine may be used to set the starting position +when doing wild card searchs. A status value of KEY\_NO\_EXIST is +returned if the specified keyword to be read is not found in the +header. + +***1. Keyword Reading Routines + +>1 Return the number of existing keywords (not counting the + END keyword) and the amount of space currently available for more + keywords. It returns morekeys = -1 if the header has not yet been + closed. Note that CFITSIO will dynamically add space if required + when writing new keywords to a header so in practice there is no + limit to the number of keywords that can be added to a header. A + null pointer may be entered for the morekeys parameter if it's +> value is not needed. \label{ffghsp} +- + int fits_get_hdrspace / ffghsp + (fitsfile *fptr, > int *keysexist, int *morekeys, int *status) +- +>2 Return the specified keyword. In the first routine, + the datatype parameter specifies the desired returned data type of the + keyword value and can have one of the following symbolic constant + values: TSTRING, TLOGICAL (== int), TBYTE, TSHORT, TUSHORT, TINT, + TUINT, TLONG, TULONG, TLONGLONG, TFLOAT, TDOUBLE, TCOMPLEX, and TDBLCOMPLEX. + Within the context of this routine, TSTRING corresponds to a + 'char*' data type, i.e., a pointer to a character array. Data type + conversion will be performed for numeric values if the keyword + value does not have the same data type. If the value of the keyword + is undefined (i.e., the value field is blank) then an error status + = VALUE\_UNDEFINED will be returned. + + The second routine returns the keyword value as a character string + (a literal copy of what is in the value field) regardless of the + intrinsic data type of the keyword. The third routine returns + the entire 80-character header record of the keyword, with any + trailing blank characters stripped off. + + If a NULL comment pointer is supplied then the comment string +> will not be returned. \label{ffgky} \label{ffgkey} \label{ffgcrd} +- + int fits_read_key / ffgky + (fitsfile *fptr, int datatype, char *keyname, > DTYPE *value, + char *comment, int *status) + + int fits_read_keyword / ffgkey + (fitsfile *fptr, char *keyname, > char *value, char *comment, + int *status) + + int fits_read_card / ffgcrd + (fitsfile *fptr, char *keyname, > char *card, int *status) +- +>3 Return the nth header record in the CHU. The first keyword + in the header is at keynum = 1; if keynum = 0 then these routines + simply reset the internal CFITSIO pointer to the beginning of the header + so that subsequent keyword operations will start at the top of the + header (e.g., prior to searching for keywords using wild cards in + the keyword name). The first routine returns the entire + 80-character header record (with trailing blanks truncated), + while the second routine parses the record and returns the name, + value, and comment fields as separate (blank truncated) + character strings. If a NULL comment pointer is given on input, + then the comment string will not be +> returned. \label{ffgrec} \label{ffgkyn} +- + int fits_read_record / ffgrec + (fitsfile *fptr, int keynum, > char *card, int *status) + + int fits_read_keyn / ffgkyn + (fitsfile *fptr, int keynum, > char *keyname, char *value, + char *comment, int *status) +- +>4 Return the next keyword whose name matches one of the strings in + 'inclist' but does not match any of the strings in 'exclist'. + The strings in inclist and exclist may contain wild card characters + (*, ?, and \#) as described at the beginning of this section. + This routine searches from the current header position to the + end of the header, only, and does not continue the search from + the top of the header back to the original position. The current + header position may be reset with the ffgrec routine. Note + that nexc may be set = 0 if there are no keywords to be excluded. + This routine returns status = KEY\_NO\_EXIST if a matching +> keyword is not found. \label{ffgnxk} +- + int fits_find_nextkey / ffgnxk + (fitsfile *fptr, char **inclist, int ninc, char **exclist, + int nexc, > char *card, int *status) +- +>5 Return the physical units string from an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the + beginning of the keyword comment field. A null string is returned +> if no units are defined for the keyword. \label{ffgunt} +- + VELOCITY= 12.3 / [km/s] orbital speed + + int fits_read_key_unit / ffgunt + (fitsfile *fptr, char *keyname, > char *unit, int *status) +- +>6 Concatenate the header keywords in the CHDU into a single long + string of characters. This provides a convenient way of passing + all or part of the header information in a FITS HDU to other subroutines. + Each 80-character fixed-length keyword record is appended to the + output character string, in order, with no intervening separator or + terminating characters. The last header record is terminated with + a NULL character. This routine allocates memory for the returned + character array, so the calling program must free the memory when + finished. + + Selected keywords may be excluded from the returned character string. + If the second parameter (nocomments) is TRUE (nonzero) then any + COMMENT, HISTORY, or blank keywords in the header will not be copied + to the output string. + + The 'exclist' parameter may be used to supply a list of keywords + that are to be excluded from the output character string. Wild card + characters (*, ?, and \#) may be used in the excluded keyword names. + If no additional keywords are to be excluded, then set nexc = 0 and +> specify NULL for the the **header parameter. \label{ffhdr2str} +- + int fits_hdr2str + (fitsfile *fptr, int nocomments, char **exclist, int nexc, + > char **header, int *nkeys, int *status) +- + +***2. Keyword Writing Routines + +>1 Write a keyword of the appropriate data type into the + CHU. The first routine simply appends a new keyword whereas the + second routine will update the value and comment fields of the + keyword if it already exists, otherwise it appends a new + keyword. Note that the address to the value, and not the value + itself, must be entered. The datatype parameter specifies the + data type of the keyword value with one of the following values: + TSTRING, TLOGICAL (== int), TBYTE, TSHORT, TUSHORT, TINT, TUINT, + TLONG, TLONGLONG, TULONG, TFLOAT, TDOUBLE. Within the context of this + routine, TSTRING corresponds to a 'char*' data type, i.e., a pointer + to a character array. A null pointer may be entered for the + comment parameter in which case the keyword comment +> field will be unmodified or left blank. \label{ffpky} \label{ffuky} +- + int fits_write_key / ffpky + (fitsfile *fptr, int datatype, char *keyname, DTYPE *value, + char *comment, > int *status) + + int fits_update_key / ffuky + (fitsfile *fptr, int datatype, char *keyname, DTYPE *value, + char *comment, > int *status) +- +>2 Write a keyword with a null or undefined value (i.e., the + value field in the keyword is left blank). The first routine + simply appends a new keyword whereas the second routine will update + the value and comment fields of the keyword if it already exists, + otherwise it appends a new keyword. A null pointer may be + entered for the comment parameter in which case the keyword + comment +> field will be unmodified or left blank. \label{ffpkyu} \label{ffukyu} +- + int fits_write_key_null / ffpkyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) + + int fits_update_key_null / ffukyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +- +>3 Write (append) a COMMENT or HISTORY keyword to the CHU. The comment or + history string will be continued over multiple keywords if it is longer +> than 70 characters. \label{ffpcom} \label{ffphis} +- + int fits_write_comment / ffpcom + (fitsfile *fptr, char *comment, > int *status) + + int fits_write_history / ffphis + (fitsfile *fptr, char *history, > int *status) +- +>4 Write the DATE keyword to the CHU. The keyword value will contain + the current system date as a character string in 'yyyy-mm-ddThh:mm:ss' + format. If a DATE keyword already exists in the header, then this + routine will simply update the keyword value with the current date. +> \label{ffpdat} +- + int fits_write_date / ffpdat + (fitsfile *fptr, > int *status) +- +>5 Write a user specified keyword record into the CHU. This is + a low--level routine which can be used to write any arbitrary + record into the header. The record must conform to the all +> the FITS format requirements. \label{ffprec} +- + int fits_write_record / ffprec + (fitsfile *fptr, char *card, > int *status) +- +>6 Update an 80-character record in the CHU. If a keyword with the input + name already exists, then it is overwritten by the value of card. This + could modify the keyword name as well as the value and comment fields. + If the keyword doesn't already exist then a new keyword card is appended +> to the header. \label{ffucrd} +- + int fits_update_card / ffucrd + (fitsfile *fptr, char *keyname, char *card, > int *status) +- + +>>7 Modify (overwrite) the comment field of an existing keyword. \label{ffmcom} +- + int fits_modify_comment / ffmcom + (fitsfile *fptr, char *keyname, char *comment, > int *status) +- + +>8 Write the physical units string into an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the +> beginning of the keyword comment field. \label{ffpunt} +- + VELOCITY= 12.3 / [km/s] orbital speed + + int fits_write_key_unit / ffpunt + (fitsfile *fptr, char *keyname, char *unit, > int *status) +- +>9 Rename an existing keyword, preserving the current value +> and comment fields. \label{ffmnam} +- + int fits_modify_name / ffmnam + (fitsfile *fptr, char *oldname, char *newname, > int *status) +- +>10 Delete a keyword record. The space occupied by + the keyword is reclaimed by moving all the following header records up + one row in the header. The first routine deletes a keyword at a + specified position in the header (the first keyword is at position 1), + whereas the second routine deletes a specifically named keyword. + Wild card characters may be used when specifying the name of the keyword +> to be deleted. \label{ffdrec} \label{ffdkey} +- + int fits_delete_record / ffdrec + (fitsfile *fptr, int keynum, > int *status) + + int fits_delete_key / ffdkey + (fitsfile *fptr, char *keyname, > int *status) +- +**E. Primary Array or IMAGE Extension I/O Routines + +These routines read or write data values in the primary data array (i.e., +the first HDU in a FITS file) or an IMAGE extension. There are also +routines to get information about the data type and size of the image. +Users should also read the following chapter on the CFITSIO iterator +function which provides a more `object oriented' method of reading and +writing images. The iterator function is a little more complicated to +use, but the advantages are that it usually takes less code to perform +the same operation, and the resulting program oftens runs faster because +the FITS files are read and written using the most efficient block size. + +C programmers should note that the ordering of arrays in FITS files, and +hence in all the CFITSIO calls, is more similar to the dimensionality +of arrays in Fortran rather than C. For instance if a FITS image has +NAXIS1 = 100 and NAXIS2 = 50, then a 2-D array just large enough to hold +the image should be declared as array[50][100] and not as array[100][50]. + +The `datatype' parameter specifies the data type of the `nulval' and +`array' pointers and can have one of the following values: TBYTE, +TSBYTE, TSHORT, TUSHORT, TINT, TUINT, TLONG, TLONGLONG, TULONG, TFLOAT, +TDOUBLE. Automatic data type conversion is performed if the data type +of the FITS array (as defined by the BITPIX keyword) differs from that +specified by 'datatype'. The data values are also automatically scaled +by the BSCALE and BZERO keyword values as they are being read or written +in the FITS array. + +>1 Get the data type or equivalent data type of the image. The + first routine returns the physical data type of the FITS image, as + given by the BITPIX keyword, with allowed values of BYTE\_IMG (8), + SHORT\_IMG (16), LONG\_IMG (32), LONGLONG\_IMG (64), + FLOAT\_IMG (-32), and DOUBLE\_IMG + (-64). Note that BITPIX = 64 is an experimental + data type that is not currently defined in the FITS standard + document. It is not recommended for general use. + The second routine is similar, except that if the image pixel + values are scaled, with non-default values for the BZERO and BSCALE + keywords, then the routine will return the 'equivalent' data type + that is needed to store the scaled values. For example, if BITPIX + = 16 and BSCALE = 0.1 then the equivalent data type is FLOAT\_IMG. + Similarly if BITPIX = 16, BSCALE = 1, and BZERO = 32768, then the + the pixel values span the range of an unsigned short integer and +> the returned data type will be USHORT\_IMG. \label{ffgidt} +- + int fits_get_img_type / ffgidt + (fitsfile *fptr, > int *bitpix, int *status) + + int fits_get_img_equivtype / ffgiet + (fitsfile *fptr, > int *bitpix, int *status) +- +>2 Get the number of dimensions, and/or the size of + each dimension in the image . The number of axes in the image is + given by naxis, and the size of each dimension is given by the + naxes array (a maximum of maxdim dimensions will be returned). +> \label{ffgidm} \label{ffgisz} \label{ffgipr} +- + int fits_get_img_dim / ffgidm + (fitsfile *fptr, > int *naxis, int *status) + + int fits_get_img_size / ffgisz + (fitsfile *fptr, int maxdim, > long *naxes, int *status) + + int fits_get_img_sizell / ffgiszll + (fitsfile *fptr, int maxdim, > LONGLONG *naxes, int *status) + + int fits_get_img_param / ffgipr + (fitsfile *fptr, int maxdim, > int *bitpix, int *naxis, long *naxes, + int *status) + + int fits_get_img_paramll / ffgiprll + (fitsfile *fptr, int maxdim, > int *bitpix, int *naxis, LONGLONG *naxes, + int *status) +- +>3 Create a new primary array or IMAGE extension with a specified + data type and size. If the FITS file is currently empty then a + primary array is created, otherwise a new IMAGE extension is +> appended to the file. \label{ffcrim} +- + int fits_create_img / ffcrim + ( fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_create_imgll / ffcrimll + ( fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +- +>4 Copy an n-dimensional image in a particular row and column of a + binary table (in a vector column) + to or from a primary array or image extension. + + The 'cell2image' routine + will append a new image extension (or primary array) to the output file. + Any WCS keywords associated with the input column image will be tranlated + into the appropriate form for an image extension. Any other keywords + in the table header that are not specifically related to defining the + binary table structure or to other columns in the table + will also be copied to the header of the output image. + + The 'image2cell' routine will copy the input image into the specified row + and column of the current binary table in the output file. The binary table + HDU must exist before calling this routine, but it + may be empty, with no rows or columns of data. The specified column + (and row) will be created if it does not already exist. The 'copykeyflag' + parameter controls which keywords are copied from the input + image to the header of the output table: 0 = no keywords will be copied, + 1 = all keywords will be copied (except those keywords that would be invalid in +> the table header), and 2 = copy only the WCS keywords. \label{copycell} +- + int fits_copy_cell2image + (fitsfile *infptr, fitsfile *outfptr, char *colname, long rownum, + > int *status) + + int fits_copy_image2cell + (fitsfile *infptr, fitsfile *outfptr, char *colname, long rownum, + int copykeyflag > int *status) +- + +>5 Write a rectangular subimage (or the whole image) to the FITS data + array. The fpixel and lpixel arrays give the coordinates of the + first (lower left corner) and last (upper right corner) pixels in +> FITS image to be written to. \label{ffpss} +- + int fits_write_subset / ffpss + (fitsfile *fptr, int datatype, long *fpixel, long *lpixel, + DTYPE *array, > int *status) +- +>6 Write pixels into the FITS data array. 'fpixel' is an array of + length NAXIS which gives the coordinate of the starting pixel to be + written to, such that fpixel[0] is in the range 1 to NAXIS1, + fpixel[1] is in the range 1 to NAXIS2, etc. The first pair of routines + simply writes the array of pixels to the FITS file (doing data type + conversion if necessary) whereas the second routines will substitute + the appropriate FITS null value for any elements which are equal to + the input value of nulval (note that this parameter gives the + address of the null value, not the null value itself). For integer + FITS arrays, the FITS null value is defined by the BLANK keyword (an + error is returned if the BLANK keyword doesn't exist). For floating + point FITS arrays the special IEEE NaN (Not-a-Number) value will be + written into the FITS file. If a null pointer is entered for + nulval, then the null value is ignored and this routine behaves +> the same as fits\_write\_pix. \label{ffppx} \label{ffppxn} +- + int fits_write_pix / ffppx + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_pixll / ffppxll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_pixnull / ffppxn + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); + + int fits_write_pixnullll / ffppxnll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); +- +>7 Set FITS data array elements equal to the appropriate null pixel + value. For integer FITS arrays, the FITS null value is defined by + the BLANK keyword (an error is returned if the BLANK keyword + doesn't exist). For floating point FITS arrays the special IEEE NaN + (Not-a-Number) value will be written into the FITS file. Note that + 'firstelem' is a scalar giving the offset to the first pixel to be +> written in the equivalent 1-dimensional array of image pixels. \label{ffpprn} +- + int fits_write_null_img / ffpprn + (fitsfile *fptr, LONGLONG firstelem, LONGLONG nelements, > int *status) +- +>8 Read a rectangular subimage (or the whole image) from the FITS + data array. The fpixel and lpixel arrays give the coordinates of + the first (lower left corner) and last (upper right corner) pixels + to be read from the FITS image. Undefined FITS array elements will + be returned with a value = *nullval, (note that this parameter + gives the address of the null value, not the null value itself) + unless nulval = 0 or *nulval = 0, in which case no checks for +> undefined pixels will be performed. \label{ffgsv} +- + int fits_read_subset / ffgsv + (fitsfile *fptr, int datatype, long *fpixel, long *lpixel, long *inc, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) +- +>9 Read pixels from the FITS data array. 'fpixel' is the starting + pixel location and is an array of length NAXIS such that fpixel[0] + is in the range 1 to NAXIS1, fpixel[1] is in the range 1 to NAXIS2, + etc. The nelements parameter specifies the number of pixels to + read. If fpixel is set to the first pixel, and nelements is set + equal to the NAXIS1 value, then this routine would read the first + row of the image. Alternatively, if nelements is set equal to + NAXIS1 * NAXIS2 then it would read an entire 2D image, or the first + plane of a 3-D datacube. + + The first routine will return any undefined pixels in the FITS array + equal to the value of *nullval (note that this parameter gives the + address of the null value, not the null value itself) unless nulval + = 0 or *nulval = 0, in which case no checks for undefined pixels + will be performed. The second routine is similar except that any + undefined pixels will have the corresponding nullarray element set +> equal to TRUE (= 1). \label{ffgpxv} \label{ffgpxf} +- + int fits_read_pix / ffgpxv + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_pixll / ffgpxvll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_pixnull / ffgpxf + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) + + int fits_read_pixnullll / ffgpxfll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) +- +>10 Copy a rectangular section of an image and write it to a new + FITS primary image or image extension. The new image HDU is appended + to the end of the output file; all the keywords in the input image + will be copied to the output image. The common WCS keywords will + be updated if necessary to correspond to the coordinates of the section. + The format of the section expression is + same as specifying an image section using the extended file name + syntax (see "Image Section" in Chapter 10). + (Examples: "1:100,1:200", "1:100:2, 1:*:2", "*, -*"). +> \label{ffcpimg} +- + int fits_copy_image_section / ffcpimg + (fitsfile *infptr, fitsfile *outfptr, char *section, int *status) +- + +**F. Image Compression + +CFITSIO now transparently supports 2 methods of image compression: + +1) The entire FITS file may be externally compressed with the gzip or +Unix compress algorithm, producing a *.gz or *.Z file, respectively. +When reading compressed files of this type, CFITSIO first uncompresses +the entire file into memory before performing the requested read +operations. Output files can be directly written in the gzip +compressed format if the user-specified filename ends with `.gz'. In +this case, CFITSIO initially writes the uncompressed file in memory and +then compresses it and writes it to disk when the FITS file is closed, +thus saving user disk space. Read and write access to these compressed +FITS files is generally quite fast; the main limitation is that there +must be enough available memory (or swap space) to hold the entire +uncompressed FITS file. + +2) CFITSIO also supports a newer image compression format in which the +image is divided into a grid of rectangular tiles, and each tile of +pixels is individually compressed. The compressed tiles are stored in +rows of a variable length array column in a FITS binary table, but +CFITSIO recognizes that the binary table extension contains an image +and treats it as if it were an IMAGE extension. This tile-compressed +format is especially well suited for compressing very large images +because a) the FITS header keywords remain uncompressed for rapid read +access, and because b) it is possible to extract and uncompress +sections of the image without having to uncompress the entire image. +This format is also much more effective in compressing floating point +images (using a lossy compression algorithm) than simply compressing +the image using gzip or compress. + +A detailed description of this format is available at: +- +http://heasarc.gsfc.nasa.gov/docs/software/fitsio/ + compression/compress_image.html +- + +The N-dimensional FITS image can be divided into any +desired rectangular grid of compression tiles. By default the tiles +are chosen to correspond to the rows of the image, each containing +NAXIS1 pixels, (except when using HCOMPRESS, where the default is +to compress the entire image as a single big tile). +For example, a 800 x 800 x 4 pixel data cube would be +divided in to 3200 tiles containing 800 pixels each by default. +Alternatively, this data cube could be divided into 256 tiles that are each +100 X 100 X 1 pixels in size, or 4 tiles containing 800 x 800 X 1 +pixels, or a single tile containing the entire data cube. Note that +the image dimensions are not required to be an integer multiple of the +tile dimensions, so, for example, this data cube could also be divided +into 250 X 200 pixel tiles, in which case the last tile in each row +would only contain 50 X 200 pixels. + +Currently, 4 image compression algorithms are supported: Rice, GZIP, +HCOMPRESS, and PLIO. Rice and GZIP are general purpose algorithms that can be +used to compress almost any image. HCOMPRESS is very effective for +astronomical images. The PLIO algorithm is +more specialized and was developed for use in the IRAF data analysis +system to store +pixel data quality masks. It is designed to only work on images +containing positive integers with values up to about 2**24. Other +image compression algorithms may be supported in the future. + +The 4 supported image compression algorithms are all 'loss-less' when +applied to integer FITS images; the pixel values are preserved exactly +with no loss of information during the compression and uncompression +process. The HCOMPRESS algorithm can also be used in a 'lossy' mode to achieve +a greater degree of image compression (by specifying a 'scale' parameter +value greater than 1). To set the scale parameter effectively, one must +know the RMS noise in the image pixel values; The fits\_rms\_float +and fits\_rms\_short routines in CFITSIO are provided to estimate +the RMS value in an image. + +Floating point FITS images (which have BITPIX = -32 or -64) +are first quantized into scaled integer pixel values before being +compressed. This technique produces much higher compression factors +than, for example, simply using GZIP to compress the whole FITS file +image, but it also means that +the original floating value pixel values may not be precisely returned +when the image is uncompressed. When done properly, this only discards +the 'noise' from the floating point values without losing any +significant information. The amount of noise that is discarded can be +controlled by the 'noise\_bits' compression parameter. + +No special action is required to read tile-compressed images because +all the CFITSIO routines that read normal uncompressed FITS images can +also read images in the tile-compressed format; CFITSIO essentially +treats the binary table that contains the compressed tiles as if +it were an IMAGE extension. + +When creating (writing) a new image with CFITSIO, a normal uncompressed +FITS primary array or IMAGE extension will be written unless the +tile-compressed format has been specified in 1 of 2 possible ways: + +1) At run time, when specifying the name of the output FITS file to be +created at run time, the user can indicate that images should be +written in tile-compressed format by enclosing the compression +parameters in square brackets following the root disk file name. The +`imcopy' example program that included with the CFITSIO distribution +can be used for this purpose to compress or uncompress images. Here +are some examples of the extended file name syntax for specifying +tile-compressed output images: +- + myfile.fit[compress] - use the default compression algorithm (Rice) + and the default tile size (row by row) + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + myfile.fit[compress HCOMP] + + myfile.fit[compress R 100,100] - use Rice, GZIP, or HCOMPRESS compression + myfile.fit[compress G 100,100] and 100 x 100 pixel tile size + myfile.fit[compress H 100,100] + + myfile.fit[compress R 100,100;2] - Rice or GZIP, use noisebits = 2 + myfile.fit[compress G 100,100;2] when compressing floating point image + + myfile.fit[compress H; 25 1] - HCOMPRESS, with scale = 25 and smooth = 1 +- + +2) Before calling the CFITSIO routine to write the image header +keywords (e.g., fits\_create\_image) the programmer can call the +routines described below to specify the compression algorithm and the +tiling pattern that is to be used. There are routines for specifying +the various compression parameters and similar routines to +return the current values of the parameters: +\label{ffsetcomp} \label{ffgetcomp} +- + int fits_set_compression_type(fitsfile *fptr, int comptype, int *status) + int fits_set_tile_dim(fitsfile *fptr, int ndim, long *tilesize, int *status) + int fits_set_noise_bits(fitsfile *fptr, int noisebits, int *status) + int fits_set_hcomp_scale(fitsfile *fptr, int scale, int *status) + int fits_set_hcomp_smooth(fitsfile *fptr, int smooth, int *status) + + int fits_get_compression_type(fitsfile *fptr, int *comptype, int *status) + int fits_get_tile_dim(fitsfile *fptr, int ndim, long *tilesize, int *status) + int fits_get_noise_bits(fitsfile *fptr, int *noisebits, int *status) + int fits_get_hcomp_scale(fitsfile *fptr, int *scale, int *status) + int fits_get_hcomp_smooth(fitsfile *fptr, int *smooth, int *status) +- +4 symbolic constants are defined for use as the value of the +`comptype' parameter: GZIP\_1, RICE\_1, HCOMPRESS\_1 or PLIO\_1. +Entering NULL for +comptype will turn off the tile-compression and cause normal FITS +images to be written. + +The HCOMPRESS algorithm has 2 parameters. The first is the scale +factor that controls the amount of compression. The default value +of scale = 0 (or 1) results in lossless compression. Values of scale greater +than 1 will produce larger amounts of 'lossy' compression. As a rule +of thumb setting scale to about 2 times the RMS noise in the +sky background of typical astronomical image will compress the image +by about a factor of 10, with minimal loss of significant information. +Larger values of scale will produce greater compression, but with more +loss of information. The fits\_rms\_float and fits\_rms\_short routines +can be used to calculate the RMS value in an image. + +The second HCOMPRESS parameter controls whether to slightly smooth +the image after decompressing it, if it was 'lossy' compressed +(with smooth > 1). Smoothing helps to remove some of the 'blockiness' +in the image, especially if it was highly compressed. The default +is to not smooth the image (smooth = 0), but setting smooth to 1 (or +any non-zero value) will cause the image to be smoothed. + +The 'noisebits' parameter is only relevant when compressing floating point +images (with BITPIX = 32 or 64). +The default value is 4. Decreasing the value of noisebits +will improve the overall compression efficiency at the expense of +losing more information. + +The following 2 routines are available for compressing or +or decompressing an image: +- + int fits_img_compress(fitsfile *infptr, fitsfile *outfptr, int *status); + int fits_img_decompress (fitsfile *infptr, fitsfile *outfptr, int *status); +- +Before calling the compression routine, the compression parameters must +first be defined in one of the 2 way described in the previous paragraphs. +There is also a routine to determine if the current HDU contains +a tile compressed image (it returns 1 or 0): +- + int fits_is_compressed_image(fitsfile *fptr, int *status); +- +A small example program called 'imcopy' is included with CFITSIO that +can be used to compress (or uncompress) any FITS image. This +program can be used to experiment with the various compression options +on existing FITS images as shown in these examples: +- +1) imcopy infile.fit 'outfile.fit[compress]' + + This will use the default compression algorithm (Rice) and the + default tile size (row by row) + +2) imcopy infile.fit 'outfile.fit[compress GZIP]' + + This will use the GZIP compression algorithm and the default + tile size (row by row). The allowed compression algorithms are + Rice, GZIP, and PLIO. Only the first letter of the algorithm + name needs to be specified. + +3) imcopy infile.fit 'outfile.fit[compress G 100,100]' + + This will use the GZIP compression algorithm and 100 X 100 pixel + tiles. + +4) imcopy infile.fit 'outfile.fit[compress R 100,100; 4]' + + This will use the Rice compression algorithm, 100 X 100 pixel + tiles, and noise_bits = 4 (assuming the input image has a + floating point data type). Decreasing the value of noisebits + will improve the overall compression efficiency at the expense + of losing more information. + +5) imcopy infile.fit outfile.fit + + If the input file is in tile-compressed format, then it will be + uncompressed to the output file. Otherwise, it simply copies + the input image to the output image. + +6) imcopy 'infile.fit[1001:1500,2001:2500]' outfile.fit + + This extracts a 500 X 500 pixel section of the much larger + input image (which may be in tile-compressed format). The + output is a normal uncompressed FITS image. + +7) imcopy 'infile.fit[1001:1500,2001:2500]' outfile.fit.gz + + Same as above, except the output file is externally compressed + using the gzip algorithm. + +- +**G. ASCII and Binary Table Routines + +These routines perform read and write operations on columns of data in +FITS ASCII or Binary tables. Note that in the following discussions, +the first row and column in a table is at position 1 not 0. + +Users should also read the following chapter on the CFITSIO iterator +function which provides a more `object oriented' method of reading and +writing table columns. The iterator function is a little more +complicated to use, but the advantages are that it usually takes less +code to perform the same operation, and the resulting program oftens +runs faster because the FITS files are read and written using the most +efficient block size. + +***1. Create New Table + +>1 Create a new ASCII or bintable table extension. If + the FITS file is currently empty then a dummy primary array will be + created before appending the table extension to it. The tbltype + parameter defines the type of table and can have values of + ASCII\_TBL or BINARY\_TBL. The naxis2 parameter gives the initial + number of rows to be created in the table, and should normally be + set = 0. CFITSIO will automatically increase the size of the table + as additional rows are written. A non-zero number of rows may be + specified to reserve space for that many rows, even if a fewer + number of rows will be written. The tunit and extname parameters + are optional and a null pointer may be given if they are not + defined. The FITS Standard recommends that only letters, digits, + and the underscore character be used in column names (the ttype + parameter) with no embedded spaces. Trailing blank characters are + not significant. It is recommended that all the column names in a + given table be unique within the first 8 characters, and strongly + recommended that the names be +> unique within the first 16 characters. \label{ffcrtb} +- + int fits_create_tbl / ffcrtb + (fitsfile *fptr, int tbltype, LONGLONG naxis2, int tfields, char *ttype[], + char *tform[], char *tunit[], char *extname, int *status) +- +***2. Column Information Routines + +>1 Get the number of rows or columns in the current FITS table. + The number of rows is given by the NAXIS2 keyword and the + number of columns is given by the TFIELDS keyword in the header +> of the table. \label{ffgnrw} +- + int fits_get_num_rows / ffgnrw + (fitsfile *fptr, > long *nrows, int *status); + + int fits_get_num_rowsll / ffgnrwll + (fitsfile *fptr, > LONGLONG *nrows, int *status); + + int fits_get_num_cols / ffgncl + (fitsfile *fptr, > int *ncols, int *status); +- + +>2 Get the table column number (and name) of the column whose name +matches an input template name. If casesen = CASESEN then the column +name match will be case-sensitive, whereas if casesen = CASEINSEN then +the case will be ignored. As a general rule, the column names should +be treated as case INsensitive. + +The input column name template may be either the exact name of the +column to be searched for, or it may contain wild card characters (*, +?, or \#), or it may contain the integer number of the desired column +(with the first column = 1). The `*' wild card character matches any +sequence of characters (including zero characters) and the `?' +character matches any single character. The \# wildcard will match any +consecutive string of decimal digits (0-9). If more than one column +name in the table matches the template string, then the first match is +returned and the status value will be set to COL\_NOT\_UNIQUE as a +warning that a unique match was not found. To find the other cases +that match the template, call the routine again leaving the input +status value equal to COL\_NOT\_UNIQUE and the next matching name will +then be returned. Repeat this process until a status = +COL\_NOT\_FOUND is returned. + +The FITS Standard recommends that only letters, digits, and the +underscore character be used in column names (with no embedded +spaces). Trailing blank characters are not significant. It is +recommended that all the column names in a given table be unique within +the first 8 characters, and strongly recommended that the names be +> unique within the first 16 characters. \label{ffgcno} \label{ffgcnn} +- + int fits_get_colnum / ffgcno + (fitsfile *fptr, int casesen, char *templt, > int *colnum, + int *status) + + int fits_get_colname / ffgcnn + (fitsfile *fptr, int casesen, char *templt, > char *colname, + int *colnum, int *status) +- +>3 Return the data type, vector repeat value, and the width in bytes + of a column in an ASCII or binary table. Allowed values for the + data type in ASCII tables are: TSTRING, TSHORT, TLONG, TFLOAT, and + TDOUBLE. Binary tables also support these types: TLOGICAL, TBIT, + TBYTE, TCOMPLEX and TDBLCOMPLEX. The negative of the data type code + value is returned if it is a variable length array column. Note + that in the case of a 'J' 32-bit integer binary table column, this + routine will return data type = TINT32BIT (which in fact is + equivalent to TLONG). With most current C compilers, a value in a + 'J' column has the same size as an 'int' variable, and may not be + equivalent to a 'long' variable, which is 64-bits long on an + increasing number of compilers. + + The 'repeat' parameter returns the vector repeat count on the binary + table TFORMn keyword value. (ASCII table columns always have repeat + = 1). The 'width' parameter returns the width in bytes of a single + column element (e.g., a '10D' binary table column will have width = + 8, an ASCII table 'F12.2' column will have width = 12, and a binary + table'60A' character string column will have width = 60); Note that + CFITSIO supports the local convention for specifying arrays of + fixed length strings within a binary table character column using + the syntax TFORM = 'rAw' where 'r' is the total number of characters + (= the width of the column) and 'w' is the width of a unit string + within the column. Thus if the column has TFORM = '60A12' then this + means that each row of the table contains 5 12-character substrings + within the 60-character field, and thus in this case this routine will + return typecode = TSTRING, repeat = 60, and width = 12. (The TDIMn + keyword may also be used to specify the unit string length; The pair + of keywords TFORMn = '60A' and TDIMn = '(12,5)' would have the + same effect as TFORMn = '60A12'). The number + of substings in any binary table character string field can be + calculated by (repeat/width). A null pointer may be given for any of + the output parameters that are not needed. + + The second routine, fit\_get\_eqcoltype is similar except that in + the case of scaled integer columns it returns the 'equivalent' data + type that is needed to store the scaled values, and not necessarily + the physical data type of the unscaled values as stored in the FITS + table. For example if a '1I' column in a binary table has TSCALn = + 1 and TZEROn = 32768, then this column effectively contains unsigned + short integer values, and thus the returned value of typecode will + be TUSHORT, not TSHORT. Similarly, if a column has TTYPEn = '1I' + and TSCALn = 0.12, then the returned typecode +> will be TFLOAT. \label{ffgtcl} +- + int fits_get_coltype / ffgtcl + (fitsfile *fptr, int colnum, > int *typecode, long *repeat, + long *width, int *status) + + int fits_get_coltypell / ffgtclll + (fitsfile *fptr, int colnum, > int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status) + + int fits_get_eqcoltype / ffeqty + (fitsfile *fptr, int colnum, > int *typecode, long *repeat, + long *width, int *status) + + int fits_get_eqcoltypell / ffeqtyll + (fitsfile *fptr, int colnum, > int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status) +- +>4 Return the display width of a column. This is the length + of the string that will be returned by the fits\_read\_col routine + when reading the column as a formatted string. The display width is + determined by the TDISPn keyword, if present, otherwise by the data +> type of the column. \label{ffgcdw} +- + int fits_get_col_display_width / ffgcdw + (fitsfile *fptr, int colnum, > int *dispwidth, int *status) +- + +>5 Return the number of and size of the dimensions of a table column in + a binary table. Normally this information is given by the TDIMn keyword, + but if this keyword is not present then this routine returns naxis = 1 +> and naxes[0] equal to the repeat count in the TFORM keyword. \label{ffgtdm} +- + int fits_read_tdim / ffgtdm + (fitsfile *fptr, int colnum, int maxdim, > int *naxis, + long *naxes, int *status) + + int fits_read_tdimll / ffgtdmll + (fitsfile *fptr, int colnum, int maxdim, > int *naxis, + LONGLONG *naxes, int *status) +- +>6 Decode the input TDIMn keyword string (e.g. '(100,200)') and return the + number of and size of the dimensions of a binary table column. If the input + tdimstr character string is null, then this routine returns naxis = 1 + and naxes[0] equal to the repeat count in the TFORM keyword. This routine +> is called by fits\_read\_tdim. \label{ffdtdm} +- + int fits_decode_tdim / ffdtdm + (fitsfile *fptr, char *tdimstr, int colnum, int maxdim, > int *naxis, + long *naxes, int *status) + + int fits_decode_tdimll / ffdtdmll + (fitsfile *fptr, char *tdimstr, int colnum, int maxdim, > int *naxis, + LONGLONG *naxes, int *status) +- +>7 Write a TDIMn keyword whose value has the form '(l,m,n...)' + where l, m, n... are the dimensions of a multidimension array +> column in a binary table. \label{ffptdm} +- + int fits_write_tdim / ffptdm + (fitsfile *fptr, int colnum, int naxis, long *naxes, > int *status) + + int fits_write_tdimll / ffptdmll + (fitsfile *fptr, int colnum, int naxis, LONGLONG *naxes, > int *status) +- + +***3. Routines to Edit Rows or Columns + +>1 Insert or delete rows in an ASCII or binary table. When inserting rows + all the rows following row FROW are shifted down by NROWS rows; if + FROW = 0 then the blank rows are inserted at the beginning of the + table. The first delete routine deletes NROWS consecutive rows + starting with row FIRSTROW. The second delete routine takes an + input string that lists the rows or row ranges (e.g., + '5-10,12,20-30'), whereas the third delete routine takes an input + integer array that specifies each individual row to be deleted. In + both latter cases, the input list of rows to delete must be sorted + in ascending order. These routines update the NAXIS2 keyword to + reflect the new number of rows in the +> table. \label{ffirow} \label{ffdrow} \label{ffdrws} \label{ffdrrg} +- + int fits_insert_rows / ffirow + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, > int *status) + + int fits_delete_rows / ffdrow + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, > int *status) + + int fits_delete_rowrange / ffdrrg + (fitsfile *fptr, char *rangelist, > int *status) + + int fits_delete_rowlist / ffdrws + (fitsfile *fptr, long *rowlist, long nrows, > int *status) + + int fits_delete_rowlistll / ffdrwsll + (fitsfile *fptr, LONGLONG *rowlist, LONGLONG nrows, > int *status) +- +>2 Insert or delete column(s) in an ASCII or binary + table. When inserting, COLNUM specifies the column number that the + (first) new column should occupy in the table. NCOLS specifies how + many columns are to be inserted. Any existing columns from this + position and higher are shifted over to allow room for the new + column(s). The index number on all the following keywords will be + incremented or decremented if necessary to reflect the new position + of the column(s) in the table: TBCOLn, TFORMn, TTYPEn, TUNITn, + TNULLn, TSCALn, TZEROn, TDISPn, TDIMn, TLMINn, TLMAXn, TDMINn, + TDMAXn, TCTYPn, TCRPXn, TCRVLn, TCDLTn, TCROTn, +> and TCUNIn. \label{fficol} \label{fficls} \label{ffdcol} +- + int fits_insert_col / fficol + (fitsfile *fptr, int colnum, char *ttype, char *tform, + > int *status) + + int fits_insert_cols / fficls + (fitsfile *fptr, int colnum, int ncols, char **ttype, + char **tform, > int *status) + + int fits_delete_col / ffdcol(fitsfile *fptr, int colnum, > int *status) +- +>3 Copy a column from one HDU to another (or to the same HDU). If + create\_col = TRUE, then a new column will be inserted in the output + table, at position `outcolumn', otherwise the existing output column will + be overwritten (in which case it must have a compatible data type). + If outcolnum is greater than the number of column in the table, then + the new column will be appended to the end of the table. + Note that the first column in a table is at colnum = 1. + The standard indexed keywords that related to the column (e.g., TDISPn, +> TUNITn, TCRPXn, TCDLTn, etc.) will also be copied. \label{ffcpcl} +- + int fits_copy_col / ffcpcl + (fitsfile *infptr, fitsfile *outfptr, int incolnum, int outcolnum, + int create_col, > int *status); +- +>4 Modify the vector length of a binary table column (e.g., + change a column from TFORMn = '1E' to '20E'). The vector +> length may be increased or decreased from the current value. \label{ffmvec} +- + int fits_modify_vector_len / ffmvec + (fitsfile *fptr, int colnum, LONGLONG newveclen, > int *status) +- +***4. Read and Write Column Data Routines + +The following routines write or read data values in the current ASCII +or binary table extension. If a write operation extends beyond the +current size of the table, then the number of rows in the table will +automatically be increased and the NAXIS2 keyword value will be +updated. Attempts to read beyond the end of the table will result in +an error. + +Automatic data type conversion is performed for numerical data types +(only) if the data type of the column (defined by the TFORMn keyword) +differs from the data type of the array in the calling routine. ASCII and binary +tables support the following data type values: TSTRING, TBYTE, TSBYTE, TSHORT, +TUSHORT, TINT, TUINT, TLONG, TLONGLONG, TULONG, TFLOAT, or TDOUBLE. +Binary tables also support TLOGICAL (internally mapped to the `char' +data type), TCOMPLEX, and TDBLCOMPLEX. + +Individual bits in a binary table 'X' or 'B' column may be read/written +to/from a *char array by specifying the TBIT datatype. The *char +array will be interpreted as an array of logical TRUE (1) or FALSE (0) +values that correspond to the value of each bit in the FITS 'X' or 'B' column. +Alternatively, the values in a binary table 'X' column may be read/written +8 bits at a time to/from an array of 8-bit integers by specifying the +TBYTE datatype. + +Note that within the context of these routines, the TSTRING data type +corresponds to a C 'char**' data type, i.e., a pointer to an array of +pointers to an array of characters. This is different from the keyword +reading and writing routines where TSTRING corresponds to a C 'char*' +data type, i.e., a single pointer to an array of characters. When +reading strings from a table, the char arrays obviously must have been +allocated long enough to hold the whole FITS table string. + +Numerical data values are automatically scaled by the TSCALn and TZEROn +keyword values (if they exist). + +In the case of binary tables with vector elements, the 'felem' +parameter defines the starting element (beginning with 1, not 0) within +the cell (a cell is defined as the intersection of a row and a column +and may contain a single value or a vector of values). The felem +parameter is ignored when dealing with ASCII tables. Similarly, in the +case of binary tables the 'nelements' parameter specifies the total +number of vector values to be read or written (continuing on subsequent +rows if required) and not the number of table cells. + +>>1 Write elements into an ASCII or binary table column. + The first routine simply writes the array of values to the FITS file + (doing data type conversion if necessary) whereas the second routine + will substitute the appropriate FITS null value for all elements + which are equal to the input value of nulval (note that this + parameter gives the address of nulval, not the null value + itself). For integer columns the FITS null value is defined by the + TNULLn keyword (an error is returned if the keyword doesn't exist). + For floating point columns the special IEEE NaN (Not-a-Number) + value will be written into the FITS file. If a null pointer is + entered for nulval, then the null value is ignored and this routine + behaves the same as the first routine. The third routine + simply writes undefined pixel values to the column. The fourth routine + fills every column in the table with null values, in the specified + rows (ignoring any columns that do not have a defined null value). + \label{ffpcl} \label{ffpcn} \label{ffpclu} +- + int fits_write_col / ffpcl + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, > int *status) + + int fits_write_colnull / ffpcn + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, DTYPE *nulval, + > int *status) + + int fits_write_col_null / ffpclu + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, > int *status) + + int fits_write_nullrows / ffprwu + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nelements, > int *status) +- +>2 Read elements from an ASCII or binary table column. The data type + parameter specifies the data type of the `nulval' and `array' pointers; + Undefined array elements will be returned with a value = *nullval, + (note that this parameter gives the address of the null value, not the + null value itself) unless nulval = 0 or *nulval = 0, in which case + no checking for undefined pixels will be performed. The second + routine is similar except that any undefined pixels will have the + corresponding nullarray element set equal to TRUE (= 1). + + Any column, regardless of it's intrinsic data type, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column + as a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + data type of the column. The length of the returned strings (not + including the null terminating character) can be determined with + the fits\_get\_col\_display\_width routine. The following TDISPn + display formats are currently supported: +- + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +- + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the + decimal. The .m field is optional. +> \label{ffgcv} \label{ffgcf} +- + int fits_read_col / ffgcv + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *nulval, DTYPE *array, int *anynul, int *status) + + int fits_read_colnull / ffgcf + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, char *nullarray, int *anynul, int *status) +- + +***5. Row Selection and Calculator Routines + +These routines all parse and evaluate an input string containing a user +defined arithmetic expression. The first 3 routines select rows in a +FITS table, based on whether the expression evaluates to true (not +equal to zero) or false (zero). The other routines evaluate the +expression and calculate a value for each row of the table. The +allowed expression syntax is described in the row filter section in the +`Extended File Name Syntax' chapter of this document. The expression +may also be written to a text file, and the name of the file, prepended +with a '@' character may be supplied for the 'expr' parameter (e.g. +'@filename.txt'). The expression in the file can be arbitrarily +complex and extend over multiple lines of the file. Lines that begin +with 2 slash characters ('//') will be ignored and may be used to add +comments to the file. + +>1 Evaluate a boolean expression over the indicated rows, returning an +> array of flags indicating which rows evaluated to TRUE/FALSE \label{fffrow} +- + int fits_find_rows / fffrow + (fitsfile *fptr, char *expr, long firstrow, long nrows, + > long *n_good_rows, char *row_status, int *status) +- +>>2 Find the first row which satisfies the input boolean expression \label{ffffrw} +- + int fits_find_first_row / ffffrw + (fitsfile *fptr, char *expr, > long *rownum, int *status) +- +>3 Evaluate an expression on all rows of a table. If the input and output +files are not the same, copy the TRUE rows to the output file. If the +>files are the same, delete the FALSE rows (preserve the TRUE rows). \label{ffsrow} +- + int fits_select_rows / ffsrow + (fitsfile *infptr, fitsfile *outfptr, char *expr, > int *status ) +- +>4 Calculate an expression for the indicated rows of a table, returning +the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If +nulval==NULL, UNDEFs will be zeroed out. For vector results, the number +of elements returned may be less than nelements if nelements is not an +even multiple of the result dimension. Call fits\_test\_expr to obtain +>the dimensions of the results. \label{ffcrow} +- + int fits_calc_rows / ffcrow + (fitsfile *fptr, int datatype, char *expr, long firstrow, + long nelements, void *nulval, > void *array, int *anynul, int *status) +- +>5 Evaluate an expression and write the result either to a column (if +the expression is a function of other columns in the table) or to a +keyword (if the expression evaluates to a constant and is not a +function of other columns in the table). In the former case, the +parName parameter is the name of the column (which may or may not already +exist) into which to write the results, and parInfo contains an +optional TFORM keyword value if a new column is being created. If a +TFORM value is not specified then a default format will be used, +depending on the expression. If the expression evaluates to a constant, +then the result will be written to the keyword name given by the +parName parameter, and the parInfo parameter may be used to supply an +optional comment for the keyword. If the keyword does not already +exist, then the name of the keyword must be preceded with a '\#' character, +otherwise the result will be written to a column with that name. +> \label{ffcalc} +- + int fits_calculator / ffcalc + (fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, + char *parInfo, > int *status) +- +>6 This calculator routine is similar to the previous routine, except +that the expression is only evaluated over the specified +row ranges. nranges specifies the number of row ranges, and firstrow +and lastrow give the starting and ending row number of each range. +> \label{ffcalcrng} +- + int fits_calculator_rng / ffcalc_rng + (fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, + char *parInfo, int nranges, long *firstrow, long *lastrow + > int *status) +- + +>>7 Evaluate the given expression and return information on the result. \label{fftexp} +- + int fits_test_expr / fftexp + (fitsfile *fptr, char *expr, > int *datatype, long *nelem, int *naxis, + long *naxes, int *status) +- + + +**H. Utility Routines + +***1. File Checksum Routines + +The following routines either compute or validate the checksums for the +CHDU. The DATASUM keyword is used to store the numerical value of the +32-bit, 1's complement checksum for the data unit alone. If there is +no data unit then the value is set to zero. The numerical value is +stored as an ASCII string of digits, enclosed in quotes, because the +value may be too large to represent as a 32-bit signed integer. The +CHECKSUM keyword is used to store the ASCII encoded COMPLEMENT of the +checksum for the entire HDU. Storing the complement, rather than the +actual checksum, forces the checksum for the whole HDU to equal zero. +If the file has been modified since the checksums were computed, then +the HDU checksum will usually not equal zero. These checksum keyword +conventions are based on a paper by Rob Seaman published in the +proceedings of the ADASS IV conference in Baltimore in November 1994 +and a later revision in June 1995. See Appendix B for the definition +of the parameters used in these routines. + +>1 Compute and write the DATASUM and CHECKSUM keyword values for the CHDU + into the current header. If the keywords already exist, their values + will be updated only if necessary (i.e., if the file + has been modified since the original keyword +> values were computed). \label{ffpcks} +- + int fits_write_chksum / ffpcks + (fitsfile *fptr, > int *status) +- +>2 Update the CHECKSUM keyword value in the CHDU, assuming that the + DATASUM keyword exists and already has the correct value. This routine + calculates the new checksum for the current header unit, adds it to the + data unit checksum, encodes the value into an ASCII string, and writes +> the string to the CHECKSUM keyword. \label{ffupck} +- + int fits_update_chksum / ffupck + (fitsfile *fptr, > int *status) +- +>3 Verify the CHDU by computing the checksums and comparing + them with the keywords. The data unit is verified correctly + if the computed checksum equals the value of the DATASUM + keyword. The checksum for the entire HDU (header plus data unit) is + correct if it equals zero. The output DATAOK and HDUOK parameters + in this routine are integers which will have a value = 1 + if the data or HDU is verified correctly, a value = 0 + if the DATASUM or CHECKSUM keyword is not present, or value = -1 +> if the computed checksum is not correct. \label{ffvcks} +- + int fits_verify_chksum / ffvcks + (fitsfile *fptr, > int *dataok, int *hduok, int *status) +- +>4 Compute and return the checksum values for the CHDU + without creating or modifying the + CHECKSUM and DATASUM keywords. This routine is used internally by +> ffvcks, but may be useful in other situations as well. \label{ffgcks} +- + int fits_get_chksum/ /ffgcks + (fitsfile *fptr, > unsigned long *datasum, unsigned long *hdusum, + int *status) +- +>5 Encode a checksum value + into a 16-character string. If complm is non-zero (true) then the 32-bit +> sum value will be complemented before encoding. \label{ffesum} +- + int fits_encode_chksum / ffesum + (unsigned long sum, int complm, > char *ascii); +- +>6 Decode a 16-character checksum string into a unsigned long value. + If is non-zero (true). then the 32-bit sum value will be complemented + after decoding. The checksum value is also returned as the +> value of the function. \label{ffdsum} +- + unsigned long fits_decode_chksum / ffdsum + (char *ascii, int complm, > unsigned long *sum); +- + +***2. Date and Time Utility Routines + +The following routines help to construct or parse the FITS date/time +strings. Starting in the year 2000, the FITS DATE keyword values (and +the values of other `DATE-' keywords) must have the form 'YYYY-MM-DD' +(date only) or 'YYYY-MM-DDThh:mm:ss.ddd...' (date and time) where the +number of decimal places in the seconds value is optional. These times +are in UTC. The older 'dd/mm/yy' date format may not be used for dates +after 01 January 2000. See Appendix B for the definition of the +parameters used in these routines. + +>1 Get the current system date. C already provides standard + library routines for getting the current date and time, + but this routine is provided for compatibility with + the Fortran FITSIO library. The returned year has 4 digits +> (1999, 2000, etc.) \label{ffgsdt} +- + int fits_get_system_date/ffgsdt + ( > int *day, int *month, int *year, int *status ) +- + +>2 Get the current system date and time string ('YYYY-MM-DDThh:mm:ss'). +The time will be in UTC/GMT if available, as indicated by a returned timeref +value = 0. If the returned value of timeref = 1 then this indicates that +it was not possible to convert the local time to UTC, and thus the local +>time was returned. +- + int fits_get_system_time/ffgstm + (> char *datestr, int *timeref, int *status) +- + +>3 Construct a date string from the input date values. If the year +is between 1900 and 1998, inclusive, then the returned date string will +have the old FITS format ('dd/mm/yy'), otherwise the date string will +have the new FITS format ('YYYY-MM-DD'). Use fits\_time2str instead +> to always return a date string using the new FITS format. \label{ffdt2s} +- + int fits_date2str/ffdt2s + (int year, int month, int day, > char *datestr, int *status) +- + +>4 Construct a new-format date + time string ('YYYY-MM-DDThh:mm:ss.ddd...'). + If the year, month, and day values all = 0 then only the time is encoded + with format 'hh:mm:ss.ddd...'. The decimals parameter specifies how many + decimal places of fractional seconds to include in the string. If `decimals' +> is negative, then only the date will be return ('YYYY-MM-DD'). +- + int fits_time2str/fftm2s + (int year, int month, int day, int hour, int minute, double second, + int decimals, > char *datestr, int *status) +- + +>5 Return the date as read from the input string, where the string may be +in either the old ('dd/mm/yy') or new ('YYYY-MM-DDThh:mm:ss' or +'YYYY-MM-DD') FITS format. Null pointers may be supplied for any +> unwanted output date parameters. +- + int fits_str2date/ffs2dt + (char *datestr, > int *year, int *month, int *day, int *status) +- + +>6 Return the date and time as read from the input string, where the +string may be in either the old or new FITS format. The returned hours, +minutes, and seconds values will be set to zero if the input string +does not include the time ('dd/mm/yy' or 'YYYY-MM-DD') . Similarly, +the returned year, month, and date values will be set to zero if the +date is not included in the input string ('hh:mm:ss.ddd...'). Null +pointers may be supplied for any unwanted output date and time +>parameters. +- + int fits_str2time/ffs2tm + (char *datestr, > int *year, int *month, int *day, int *hour, + int *minute, double *second, int *status) +- + +***3. General Utility Routines + +The following utility routines may be useful for certain applications. + +>1 Return the revision number of the CFITSIO library. + The revision number will be incremented with each new +> release of CFITSIO. \label{ffvers} +- + float fits_get_version / ffvers ( > float *version) +- +>2 Write an 80-character message to the CFITSIO error stack. Application + programs should not normally write to the stack, but there may be +> some situations where this is desirable. \label{ffpmsg} +- + void fits_write_errmsg / ffpmsg (char *err_msg) +- +>>3 Convert a character string to uppercase (operates in place). \label{ffupch} +- + void fits_uppercase / ffupch (char *string) +- +>4 Compare the input template string against the reference string + to see if they match. The template string may contain wildcard + characters: '*' will match any sequence of characters (including + zero characters) and '?' will match any single character in the + reference string. The '\#' character will match any consecutive string + of decimal digits (0 - 9). If casesen = CASESEN = TRUE then the match will + be case sensitive, otherwise the case of the letters will be ignored + if casesen = CASEINSEN = FALSE. The returned MATCH parameter will be + TRUE if the 2 strings match, and EXACT will be TRUE if the match is + exact (i.e., if no wildcard characters were used in the match). +> Both strings must be 68 characters or less in length. \label{ffcmps} +- + void fits_compare_str / ffcmps + (char *templt, char *string, int casesen, > int *match, int *exact) +- +>5 Split a string containing a list of names (typically file names or column + names) into individual name tokens by a sequence of calls to + fits\_split\_names. The names in the list must be delimited by a comma + and/or spaces. This routine ignores spaces and commas that occur + within parentheses, brackets, or curly brackets. It also strips any + leading and trailing blanks from the returned name. + + This routine is similar to the ANSI C 'strtok' function: + + The first call to fits\_split\_names has a non-null input string. + It finds the first name in the string and terminates it by overwriting + the next character of the string with a null terminator and returns a + pointer to the name. Each subsequent call, indicated by a NULL value + of the input string, returns the next name, searching from just past + the end of the previous name. It returns NULL when no further names +> are found. \label{splitnames} +- + char *fits_split_names(char *namelist) +- + The following example shows how a string would be split into 3 names: +- + myfile[1][bin (x,y)=4], file2.fits file3.fits + ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ + 1st name 2nd name 3rd name +- +>6 Test that the keyword name contains only legal characters (A-Z,0-9, + hyphen, and underscore) or that the keyword record contains only legal +> printable ASCII characters \label{fftkey} \label{fftrec} +- + int fits_test_keyword / fftkey (char *keyname, > int *status) + + int fits_test_record / fftrec (char *card, > int *status) +- +>7 Test whether the current header contains any NULL (ASCII 0) characters. + These characters are illegal in the header, but they will go undetected + by most of the CFITSIO keyword header routines, because the null is + interpreted as the normal end-of-string terminator. This routine returns + the position of the first null character in the header, or zero if there + are no nulls. For example a returned value of 110 would indicate that + the first NULL is located in the 30th character of the second keyword + in the header (recall that each header record is 80 characters long). + Note that this is one of the few CFITSIO routines in which the returned + value is not necessarily equal to the status value). +> \label{ffnchk} +- + int fits_null_check / ffnchk (char *card, > int *status) +- +>8 Parse a header keyword record and return the name of the keyword, + and the length of the name. + The keyword name normally occupies the first 8 characters of the + record, except under the HIERARCH convention where the name can +> be up to 70 characters in length. \label{ffgknm} +- + int fits_get_keyname / ffgknm + (char *card, > char *keyname, int *keylength, int *status) +- +>9 Parse a header keyword record, returning the value (as + a literal character string) and comment strings. If the keyword has no + value (columns 9-10 not equal to '= '), then a null value string is + returned and the comment string is set equal to column 9 - 80 of the +> input string. \label{ffpsvc} +- + int fits_parse_value / ffpsvc + (char *card, > char *value, char *comment, int *status) +- +>10 Construct an array indexed keyword name (ROOT + nnn). + This routine appends the sequence number to the root string to create +> a keyword name (e.g., 'NAXIS' + 2 = 'NAXIS2') \label{ffkeyn} +- + int fits_make_keyn / ffkeyn + (char *keyroot, int value, > char *keyname, int *status) +- +>11 Construct a sequence keyword name (n + ROOT). + This routine concatenates the sequence number to the front of the +> root string to create a keyword name (e.g., 1 + 'CTYP' = '1CTYP') \label{ffnkey} +- + int fits_make_nkey / ffnkey + (int value, char *keyroot, > char *keyname, int *status) +- +>12 Determine the data type of a keyword value string. This routine + parses the keyword value string to determine its data type. + Returns 'C', 'L', 'I', 'F' or 'X', for character string, logical, +> integer, floating point, or complex, respectively. \label{ffdtyp} +- + int fits_get_keytype / ffdtyp + (char *value, > char *dtype, int *status) +- +>13 Return the class of an input header record. The record is classified + into one of the following categories (the class values are + defined in fitsio.h). Note that this is one of the few CFITSIO +> routines that does not return a status value. \label{ffgkcl} +- + Class Value Keywords + TYP_STRUC_KEY 10 SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, + GROUPS, PCOUNT, GCOUNT, END + XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, + and the first 4 COMMENT keywords in the primary array + that define the FITS format. + TYP_CMPRS_KEY 20 The experimental keywords used in the compressed + image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, + ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK + TYP_SCAL_KEY 30 BSCALE, BZERO, TSCALn, TZEROn + TYP_NULL_KEY 40 BLANK, TNULLn + TYP_DIM_KEY 50 TDIMn + TYP_RANG_KEY 60 TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX + TYP_UNIT_KEY 70 BUNIT, TUNITn + TYP_DISP_KEY 80 TDISPn + TYP_HDUID_KEY 90 EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL + TYP_CKSUM_KEY 100 CHECKSUM, DATASUM + TYP_WCS_KEY 110 WCS keywords defined in the the WCS papers, including: + CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn + CDj_is, PVj_ms, LONPOLEs, LATPOLEs + TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, + TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn + jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, + iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn + (i,j,m,n are integers, s is any letter) + TYP_REFSYS_KEY 120 EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs, DATE-OBS + TYP_COMM_KEY 130 COMMENT, HISTORY, (blank keyword) + TYP_CONT_KEY 140 CONTINUE + TYP_USER_KEY 150 all other keywords + + int fits_get_keyclass / ffgkcl (char *card) +- +>14 Parse the 'TFORM' binary table column format string. + This routine parses the input TFORM character string and returns the + integer data type code, the repeat count of the field, and, in the case + of character string fields, the length of the unit string. See Appendix + B for the allowed values for the returned typecode parameter. A +> null pointer may be given for any output parameters that are not needed. \label{ffbnfm} +- + int fits_binary_tform / ffbnfm + (char *tform, > int *typecode, long *repeat, long *width, + int *status) + + int fits_binary_tformll / ffbnfmll + (char *tform, > int *typecode, LONGLONG *repeat, long *width, + int *status) +- +>15 Parse the 'TFORM' keyword value that defines the column format in + an ASCII table. This routine parses the input TFORM character + string and returns the data type code, the width of the column, + and (if it is a floating point column) the number of decimal places + to the right of the decimal point. The returned data type codes are + the same as for the binary table, with the following + additional rules: integer columns that are between 1 and 4 characters + wide are defined to be short integers (code = TSHORT). Wider integer + columns are defined to be regular integers (code = TLONG). Similarly, + Fixed decimal point columns (with TFORM = 'Fw.d') are defined to + be single precision reals (code = TFLOAT) if w is between 1 and 7 characters + wide, inclusive. Wider 'F' columns will return a double precision + data code (= TDOUBLE). 'Ew.d' format columns will have datacode = TFLOAT, + and 'Dw.d' format columns will have datacode = TDOUBLE. A null +> pointer may be given for any output parameters that are not needed. \label{ffasfm} +- + int fits_ascii_tform / ffasfm + (char *tform, > int *typecode, long *width, int *decimals, + int *status) +- +>16 Calculate the starting column positions and total ASCII table width + based on the input array of ASCII table TFORM values. The SPACE input + parameter defines how many blank spaces to leave between each column + (it is recommended to have one space between columns for better human +> readability). \label{ffgabc} +- + int fits_get_tbcol / ffgabc + (int tfields, char **tform, int space, > long *rowlen, + long *tbcol, int *status) +- +>17 Parse a template header record and return a formatted 80-character string + suitable for appending to (or deleting from) a FITS header file. + This routine is useful for parsing lines from an ASCII template file + and reformatting them into legal FITS header records. The formatted + string may then be passed to the fits\_write\_record, ffmcrd, or + fits\_delete\_key routines +> to append or modify a FITS header record. \label{ffgthd} +- + int fits_parse_template / ffgthd + (char *templt, > char *card, int *keytype, int *status) +- + The input templt character string generally should contain 3 tokens: + (1) the KEYNAME, (2) the VALUE, and (3) the COMMENT string. The + TEMPLATE string must adhere to the following format: + +>- The KEYNAME token must begin in columns 1-8 and be a maximum of 8 + characters long. A legal FITS keyword name may only + contain the characters A-Z, 0-9, and '-' (minus sign) and + underscore. This routine will automatically convert any lowercase + characters to uppercase in the output string. If the first 8 characters + of the template line are + blank then the remainder of the line is considered to be a FITS comment +> (with a blank keyword name). + +>- The VALUE token must be separated from the KEYNAME token by one or more + spaces and/or an '=' character. The data type of the VALUE token + (numeric, logical, or character string) is automatically determined + and the output CARD string is formatted accordingly. The value + token may be forced to be interpreted as a string (e.g. if it is a +> string of numeric digits) by enclosing it in single quotes. + +>- The COMMENT token is optional, but if present must be separated from +> the VALUE token by at least one blank space and a '/' character. + +>- One exception to the above rules is that if the first non-blank + character in the first 8 characters of the template string is a + minus sign ('-') followed + by a single token, or a single token followed by an equal sign, + then it is interpreted as the name of a keyword which is to be +> deleted from the FITS header. + +>- The second exception is that if the template string starts with + a minus sign and is followed by 2 tokens (without an equals sign between + them) then the second token + is interpreted as the new name for the keyword specified by + first token. In this case the old keyword name (first token) + is returned in characters 1-8 of the returned CARD string, and + the new keyword name (the second token) is returned in characters + 41-48 of the returned CARD string. These old and new names + may then be passed to the ffmnam routine which will change +> the keyword name. + + The keytype output parameter indicates how the returned CARD string + should be interpreted: +- + keytype interpretation + ------- ------------------------------------------------- + -2 Rename the keyword with name = the first 8 characters of CARD + to the new name given in characters 41 - 48 of CARD. + + -1 delete the keyword with this name from the FITS header. + + 0 append the CARD string to the FITS header if the + keyword does not already exist, otherwise update + the keyword value and/or comment field if is already exists. + + 1 This is a HISTORY or COMMENT keyword; append it to the header + + 2 END record; do not explicitly write it to the FITS file. +- + EXAMPLES: The following lines illustrate valid input template strings: +- + INTVAL 7 / This is an integer keyword + RVAL 34.6 / This is a floating point keyword + EVAL=-12.45E-03 / This is a floating point keyword in exponential notation + lval F / This is a boolean keyword + This is a comment keyword with a blank keyword name + SVAL1 = 'Hello world' / this is a string keyword + SVAL2 '123.5' this is also a string keyword + sval3 123+ / this is also a string keyword with the value '123+ ' + # the following template line deletes the DATE keyword + - DATE + # the following template line modifies the NAME keyword to OBJECT + - NAME OBJECT +- +>18 Translate a keyword name into a new name, based on a set of patterns. +This routine is useful for translating keywords in cases such as +adding or deleting columns in +a table, or copying a column from one table to another, or extracting +an array from a cell in a binary table column into an image extension. In +these cases, it is necessary to tranlate the names of the keywords associated +with the original table column(s) into the appropriate keyword name in the final +file. For example, if column 2 is deleted from a table, +then the value of 'n' in all the +TFORMn and TTYPEn keywords for columns 3 and higher must be decremented +by 1. Even more complex translations are sometines needed to convert the +WCS keywords when extracting an image out of a table column cell into +a separate image extension. + +The user passes an array of patterns to be matched. Input pattern +number i is pattern[i][0], and output pattern number i is +pattern[i][1]. Keywords are matched against the input patterns. If a +match is found then the keyword is re-written according to the output +pattern. + +Order is important. The first match is accepted. The fastest match +will be made when templates with the same first character are grouped +together. + +Several characters have special meanings: +- + i,j - single digits, preserved in output template + n - column number of one or more digits, preserved in output template + m - generic number of one or more digits, preserved in output template + a - coordinate designator, preserved in output template + # - number of one or more digits + ? - any character + * - only allowed in first character position, to match all + keywords; only useful as last pattern in the list +- +i, j, n, and m are returned by the routine. + +For example, the input pattern "iCTYPn" will match "1CTYP5" (if n\_value +is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". +Notice that "i" is preserved. + +The following output patterns are special: + + "-" - do not copy a keyword that matches the corresponding input pattern + + "+" - copy the input unchanged + +The inrec string could be just the 8-char keyword name, or the entire +80-char header record. Characters 9 - 80 in the input string simply get +appended to the translated keyword name. + +If n\_range = 0, then only keywords with 'n' equal to n\_value will be +considered as a pattern match. If n\_range = +1, then all values of +'n' greater than or equal to n\_value will be a match, and if -1, +>then values of 'n' less than or equal to n\_value will match.\label{translatekey} +- +int fits_translate_keyword( + char *inrec, /* I - input string */ + char *outrec, /* O - output converted string, or */ + /* a null string if input does not */ + /* match any of the patterns */ + char *patterns[][2],/* I - pointer to input / output string */ + /* templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *pat_num, /* O - matched pattern number (0 based) or -1 */ + int *i, /* O - value of i, if any, else 0 */ + int *j, /* O - value of j, if any, else 0 */ + int *m, /* O - value of m, if any, else 0 */ + int *n, /* O - value of n, if any, else 0 */ + int *status) /* IO - error status */ +- +> Here is an example of some of the patterns used to convert the keywords associated +with an image in a cell of a table column into the keywords appropriate for +>an IMAGE extension: +- + char *patterns[][2] = {{"TSCALn", "BSCALE" }, /* Standard FITS keywords */ + {"TZEROn", "BZERO" }, + {"TUNITn", "BUNIT" }, + {"TNULLn", "BLANK" }, + {"TDMINn", "DATAMIN" }, + {"TDMAXn", "DATAMAX" }, + {"iCTYPn", "CTYPEi" }, /* Coordinate labels */ + {"iCTYna", "CTYPEia" }, + {"iCUNIn", "CUNITi" }, /* Coordinate units */ + {"iCUNna", "CUNITia" }, + {"iCRVLn", "CRVALi" }, /* WCS keywords */ + {"iCRVna", "CRVALia" }, + {"iCDLTn", "CDELTi" }, + {"iCDEna", "CDELTia" }, + {"iCRPXn", "CRPIXi" }, + {"iCRPna", "CRPIXia" }, + {"ijPCna", "PCi_ja" }, + {"ijCDna", "CDi_ja" }, + {"iVn_ma", "PVi_ma" }, + {"iSn_ma", "PSi_ma" }, + {"iCRDna", "CRDERia" }, + {"iCSYna", "CSYERia" }, + {"iCROTn", "CROTAi" }, + {"WCAXna", "WCSAXESa"}, + {"WCSNna", "WCSNAMEa"}}; +- +>19 Translate the keywords in the input HDU into the keywords that are +appropriate for the output HDU. This is a driver routine that calls +>the previously described routine. +- +int fits_translate_keywords( + fitsfile *infptr, /* I - pointer to input HDU */ + fitsfile *outfptr, /* I - pointer to output HDU */ + int firstkey, /* I - first HDU record number to start with */ + char *patterns[][2],/* I - pointer to input / output keyword templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *status) /* IO - error status */ +- + +>20 Parse the input string containing a list of rows or row ranges, and + return integer arrays containing the first and last row in each + range. For example, if rowlist = "3-5, 6, 8-9" then it will + return numranges = 3, rangemin = 3, 6, 8 and rangemax = 5, 6, 9. + At most, 'maxranges' number of ranges will be returned. 'maxrows' + is the maximum number of rows in the table; any rows or ranges + larger than this will be ignored. The rows must be specified in + increasing order, and the ranges must not overlap. A minus sign + may be use to specify all the rows to the upper or lower bound, so + "50-" means all the rows from 50 to the end of the table, and "-" + means all the rows in the table, from 1 - maxrows. +> \label{ffrwrg} +- + int fits_parse_range / ffrwrg(char *rowlist, LONGLONG maxrows, int maxranges, > + int *numranges, long *rangemin, long *rangemax, int *status) + + int fits_parse_rangell / ffrwrgll(char *rowlist, LONGLONG maxrows, int maxranges, > + int *numranges, LONGLONG *rangemin, LONGLONG *rangemax, int *status) +- +>21 Check that the Header fill bytes (if any) are all blank. These are the bytes + that may follow END keyword and before the beginning of data unit, + or the end of the HDU if there is no data unit. +> \label{ffchfl} +- + int ffchfl(fitsfile *fptr, > int *status) +- +>22 Check that the Data fill bytes (if any) are all zero (for IMAGE or + BINARY Table HDU) or all blanks (for ASCII table HDU). These file + bytes may be located after the last valid data byte in the HDU and + before the physical end of the HDU. +> \label{ffcdfl} +- + int ffcdfl(fitsfile *fptr, > int *status) +- +>23 Estimate the root-mean-squared (RMS) noise in an image. +These routines are mainly for use with the Hcompress image compression +algorithm. They return an estimate of the RMS noise in the background +pixels of the image. This robust algorithm (written by Richard +White, STScI) first attempts to estimate the RMS value +as 1.68 times the median of the absolute differences between successive +pixels in the image. If the median = 0, then the +algorithm falls back to computing the RMS of the difference between successive +pixels, after several N-sigma rejection cycles to remove +extreme values. The input parameters are: the array of image pixel values +(either float or short values), the number of values in the array, +the value that is used to represent null pixels (enter a very +>large number if there are no null pixels). \label{imageRMS} +- + int fits_rms_float (float fdata[], int npix, float in_null_value, + > double *rms, int *status) + int fits_rms_short (short fdata[], int npix, short in_null_value, + > double *rms, int *status) +- + + + +*VII. The CFITSIO Iterator Function + +The fits\_iterate\_data function in CFITSIO provides a unique method of +executing an arbitrary user-supplied `work' function that operates on +rows of data in FITS tables or on pixels in FITS images. Rather than +explicitly reading and writing the FITS images or columns of data, one +instead calls the CFITSIO iterator routine, passing to it the name of +the user's work function that is to be executed along with a list of +all the table columns or image arrays that are to be passed to the work +function. The CFITSIO iterator function then does all the work of +allocating memory for the arrays, reading the input data from the FITS +file, passing them to the work function, and then writing any output +data back to the FITS file after the work function exits. Because +it is often more efficient to process only a subset of the total table +rows at one time, the iterator function can determine the optimum +amount of data to pass in each iteration and repeatly call the work +function until the entire table been processed. + +For many applications this single CFITSIO iterator function can +effectively replace all the other CFITSIO routines for reading or +writing data in FITS images or tables. Using the iterator has several +important advantages over the traditional method of reading and writing +FITS data files: + +\begin{itemize} +\item +It cleanly separates the data I/O from the routine that operates on +the data. This leads to a more modular and `object oriented' +programming style. + +\item +It simplifies the application program by eliminating the need to allocate +memory for the data arrays and eliminates most of the calls to the CFITSIO +routines that explicitly read and write the data. + +\item +It ensures that the data are processed as efficiently as possible. +This is especially important when processing tabular data since +the iterator function will calculate the most efficient number +of rows in the table to be passed at one time to the user's work +function on each iteration. + +\item +Makes it possible for larger projects to develop a library of work +functions that all have a uniform calling sequence and are all +independent of the details of the FITS file format. + +\end{itemize} + +There are basically 2 steps in using the CFITSIO iterator function. +The first step is to design the work function itself which must have a +prescribed set of input parameters. One of these parameters is a +structure containing pointers to the arrays of data; the work function +can perform any desired operations on these arrays and does not need to +worry about how the input data were read from the file or how the +output data get written back to the file. + +The second step is to design the driver routine that opens all the +necessary FITS files and initializes the input parameters to the +iterator function. The driver program calls the CFITSIO iterator +function which then reads the data and passes it to the user's work +function. + +The following 2 sections describe these steps in more detail. There +are also several example programs included with the CFITSIO +distribution which illustrate how to use the iterator function. + +**A The Iterator Work Function + +The user-supplied iterator work function must have the following set of +input parameters (the function can be given any desired name): + +- + int user_fn( long totaln, long offset, long firstn, long nvalues, + int narrays, iteratorCol *data, void *userPointer ) +- + +\begin{itemize} + +\item + totaln -- the total number of table rows or image pixels + that will be passed to the work function + during 1 or more iterations. + +\item + offset -- the offset applied to the first table row or image + pixel to be passed to the work function. In other + words, this is the number of rows or pixels that + are skipped over before starting the iterations. If + offset = 0, then all the table rows or image pixels + will be passed to the work function. + +\item + firstn -- the number of the first table row or image pixel + (starting with 1) that is being passed in this + particular call to the work function. + +\item + nvalues -- the number of table rows or image pixels that are + being passed in this particular call to the work + function. nvalues will always be less than or + equal to totaln and will have the same value on + each iteration, except possibly on the last + call which may have a smaller value. + +\item + narrays -- the number of arrays of data that are being passed + to the work function. There is one array for each + image or table column. + +\item + *data -- array of structures, one for each + column or image. Each structure contains a pointer + to the array of data as well as other descriptive + parameters about that array. + +\item + *userPointer -- a user supplied pointer that can be used + to pass ancillary information from the driver function + to the work function. + This pointer is passed to the CFITSIO iterator function + which then passes it on to the + work function without any modification. + It may point to a single number, to an array of values, + to a structure containing an arbitrary set of parameters + of different types, + or it may be a null pointer if it is not needed. + The work function must cast this pointer to the + appropriate data type before using it it. +\end{itemize} + +The totaln, offset, narrays, data, and userPointer parameters are +guaranteed to have the same value on each iteration. Only firstn, +nvalues, and the arrays of data pointed to by the data structures may +change on each iterative call to the work function. + +Note that the iterator treats an image as a long 1-D array of pixels +regardless of it's intrinsic dimensionality. The total number of +pixels is just the product of the size of each dimension, and the order +of the pixels is the same as the order that they are stored in the FITS +file. If the work function needs to know the number and size of the +image dimensions then these parameters can be passed via the +userPointer structure. + +The iteratorCol structure is currently defined as follows: +- +typedef struct /* structure for the iterator function column information */ +{ + /* structure elements required as input to fits_iterate_data: */ + + fitsfile *fptr; /* pointer to the HDU containing the column or image */ + int colnum; /* column number in the table; ignored for images */ + char colname[70]; /* name (TTYPEn) of the column; null for images */ + int datatype; /* output data type (converted if necessary) */ + int iotype; /* type: InputCol, InputOutputCol, or OutputCol */ + + /* output structure elements that may be useful for the work function: */ + + void *array; /* pointer to the array (and the null value) */ + long repeat; /* binary table vector repeat value; set */ + /* equal to 1 for images */ + long tlmin; /* legal minimum data value, if any */ + long tlmax; /* legal maximum data value, if any */ + char unit[70]; /* physical unit string (BUNIT or TUNITn) */ + char tdisp[70]; /* suggested display format; null if none */ + +} iteratorCol; +- + +Instead of directly reading or writing the elements in this structure, +it is recommended that programmers use the access functions that are +provided for this purpose. + +The first five elements in this structure must be initially defined by +the driver routine before calling the iterator routine. The CFITSIO +iterator routine uses this information to determine what column or +array to pass to the work function, and whether the array is to be +input to the work function, output from the work function, or both. +The CFITSIO iterator function fills in the values of the remaining +structure elements before passing it to the work function. + +The array structure element is a pointer to the actual data array and +it must be cast to the correct data type before it is used. The +`repeat' structure element give the number of data values in each row +of the table, so that the total number of data values in the array is +given by repeat * nvalues. In the case of image arrays and ASCII +tables, repeat will always be equal to 1. When the data type is a +character string, the array pointer is actually a pointer to an array +of string pointers (i.e., char **array). The other output structure +elements are provided for convenience in case that information is +needed within the work function. Any other information may be passed +from the driver routine to the work function via the userPointer +parameter. + +Upon completion, the work routine must return an integer status value, +with 0 indicating success and any other value indicating an error which +will cause the iterator function to immediately exit at that point. Return status +values in the range 1 -- 1000 should be avoided since these are +reserved for use by CFITSIO. A return status value of -1 may be used to +force the CFITSIO iterator function to stop at that point and return +control to the driver routine after writing any output arrays to the +FITS file. CFITSIO does not considered this to be an error condition, +so any further processing by the application program will continue normally. + +**B The Iterator Driver Function + +The iterator driver function must open the necessary FITS files and +position them to the correct HDU. It must also initialize the following +parameters in the iteratorCol structure (defined above) for each +column or image before calling the CFITSIO iterator function. +Several `constructor' routines are provided in CFITSIO for this +purpose. + +\begin{itemize} +\item + *fptr -- The fitsfile pointer to the table or image. +\item +colnum -- the number of the column in the table. This value is ignored + in the case of images. If colnum equals 0, then the column name + will be used to identify the column to be passed to the + work function. + +\item +colname -- the name (TTYPEn keyword) of the column. This is + only required if colnum = 0 and is ignored for images. +\item +datatype -- The desired data type of the array to be passed to the + work function. For numerical data the data type does + not need to be the same as the actual data type in the + FITS file, in which case CFITSIO will do the conversion. + Allowed values are: TSTRING, TLOGICAL, TBYTE, TSBYTE, TSHORT, TUSHORT, + TINT, TLONG, TULONG, TFLOAT, TDOUBLE. If the input + value of data type equals 0, then the existing + data type of the column or image will be used without + any conversion. + +\item +iotype -- defines whether the data array is to be input to the + work function (i.e, read from the FITS file), or output + from the work function (i.e., written to the FITS file) or + both. Allowed values are InputCol, OutputCol, or InputOutputCol. + Variable-length array columns are supported as InputCol or + InputOutputCol types, but may not be used for an OutputCol type. +\end{itemize} + +After the driver routine has initialized all these parameters, it +can then call the CFITSIO iterator function: + +- + int fits_iterate_data(int narrays, iteratorCol *data, long offset, + long nPerLoop, int (*workFn)( ), void *userPointer, int *status); +- + +\begin{itemize} +\item + + narrays -- the number of columns or images that are to be passed + to the work function. +\item + *data -- pointer to array of structures containing information + about each column or image. + +\item + offset -- if positive, this number of rows at the + beginning of the table (or pixels in the image) + will be skipped and will not be passed to the work + function. + +\item + nPerLoop - specifies the number of table rows (or number of + image pixels) that are to be passed to the work + function on each iteration. If nPerLoop = 0 + then CFITSIO will calculate the optimum number + for greatest efficiency. + If nPerLoop is negative, then all the rows + or pixels will be passed at one time, and the work + function will only be called once. If any variable + length arrays are being processed, then the nPerLoop + value is ignored, and the iterator will always process + one row of the table at a time. + +\item + *workFn - the name (actually the address) of the work function + that is to be called by fits\_iterate\_data. + +\item + *userPointer - this is a user supplied pointer that can be used + to pass ancillary information from the driver routine + to the work function. It may point to a single number, + an array, or to a structure containing an arbitrary set + of parameters. + +\item + *status - The CFITSIO error status. Should = 0 on input; + a non-zero output value indicates an error. +\end{itemize} + +When fits\_iterate\_data is called it first allocates memory to hold +all the requested columns of data or image pixel arrays. It then reads +the input data from the FITS tables or images into the arrays then +passes the structure with pointers to these data arrays to the work +function. After the work function returns, the iterator function +writes any output columns of data or images back to the FITS files. It +then repeats this process for any remaining sets of rows or image +pixels until it has processed the entire table or image or until the +work function returns a non-zero status value. The iterator then frees +the memory that it initially allocated and returns control to the +driver routine that called it. + +**C. Guidelines for Using the Iterator Function + +The totaln, offset, firstn, and nvalues parameters that are passed to +the work function are useful for determining how much of the data has +been processed and how much remains left to do. On the very first call +to the work function firstn will be equal to offset + 1; the work +function may need to perform various initialization tasks before +starting to process the data. Similarly, firstn + nvalues - 1 will be +equal to totaln on the last iteration, at which point the work function +may need to perform some clean up operations before exiting for the +last time. The work function can also force an early termination of +the iterations by returning a status value = -1. + +The narrays and iteratorCol.datatype arguments allow the work function +to double check that the number of input arrays and their data types +have the expected values. The iteratorCol.fptr and iteratorCol.colnum +structure elements can be used if the work function needs to read or +write the values of other keywords in the FITS file associated with +the array. This should generally only be done during the +initialization step or during the clean up step after the last set of +data has been processed. Extra FITS file I/O during the main +processing loop of the work function can seriously degrade the speed of +the program. + +If variable-length array columns are being processed, then the iterator +will operate on one row of the table at a time. In this case the +the repeat element in the interatorCol structure will be set equal to +the number of elements in the current row that is being processed. + +One important feature of the iterator is that the first element in each +array that is passed to the work function gives the value that is used +to represent null or undefined values in the array. The real data then +begins with the second element of the array (i.e., array[1], not +array[0]). If the first array element is equal to zero, then this +indicates that all the array elements have defined values and there are +no undefined values. If array[0] is not equal to zero, then this +indicates that some of the data values are undefined and this value +(array[0]) is used to represent them. In the case of output arrays +(i.e., those arrays that will be written back to the FITS file by the +iterator function after the work function exits) the work function must +set the first array element to the desired null value if necessary, +otherwise the first element should be set to zero to indicate that +there are no null values in the output array. CFITSIO defines 2 +values, FLOATNULLVALUE and DOUBLENULLVALUE, that can be used as default +null values for float and double data types, respectively. In the case +of character string data types, a null string is always used to +represent undefined strings. + +In some applications it may be necessary to recursively call the iterator +function. An example of this is given by one of the example programs +that is distributed with CFITSIO: it first calls a work function that +writes out a 2D histogram image. That work function in turn calls +another work function that reads the `X' and `Y' columns in a table to +calculate the value of each 2D histogram image pixel. Graphically, the +program structure can be described as: +- + driver --> iterator --> work1_fn --> iterator --> work2_fn +- + +Finally, it should be noted that the table columns or image arrays that +are passed to the work function do not all have to come from the same +FITS file and instead may come from any combination of sources as long +as they have the same length. The length of the first table column or +image array is used by the iterator if they do not all have the same +length. + +**D. Complete List of Iterator Routines + +All of the iterator routines are listed below. Most of these routines +do not have a corresponding short function name. + +>1 Iterator `constructor' functions that set + the value of elements in the iteratorCol structure + that define the columns or arrays. These set the fitsfile + pointer, column name, column number, datatype, and iotype, + respectively. The last 2 routines allow all the parameters + to be set with one function call (one supplies the column +> name, the other the column number). \label{ffiterset} + +- + int fits_iter_set_file(iteratorCol *col, fitsfile *fptr); + + int fits_iter_set_colname(iteratorCol *col, char *colname); + + int fits_iter_set_colnum(iteratorCol *col, int colnum); + + int fits_iter_set_datatype(iteratorCol *col, int datatype); + + int fits_iter_set_iotype(iteratorCol *col, int iotype); + + int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, + char *colname, int datatype, int iotype); + + int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, + int colnum, int datatype, int iotype); +- +>2 Iterator `accessor' functions that return the value of the + element in the iteratorCol structure +> that describes a particular data column or array \label{ffiterget} +- + fitsfile * fits_iter_get_file(iteratorCol *col); + + char * fits_iter_get_colname(iteratorCol *col); + + int fits_iter_get_colnum(iteratorCol *col); + + int fits_iter_get_datatype(iteratorCol *col); + + int fits_iter_get_iotype(iteratorCol *col); + + void * fits_iter_get_array(iteratorCol *col); + + long fits_iter_get_tlmin(iteratorCol *col); + + long fits_iter_get_tlmax(iteratorCol *col); + + long fits_iter_get_repeat(iteratorCol *col); + + char * fits_iter_get_tunit(iteratorCol *col); + + char * fits_iter_get_tdisp(iteratorCol *col); +- +>>3 The CFITSIO iterator function \label{ffiter} +- + int fits_iterate_data(int narrays, iteratorCol *data, long offset, + long nPerLoop, + int (*workFn)( long totaln, long offset, long firstn, + long nvalues, int narrays, iteratorCol *data, + void *userPointer), + void *userPointer, + int *status); +- + +*IX. World Coordinate System Routines + +The FITS community has adopted a set of keyword conventions that define +the transformations needed to convert between pixel locations in an +image and the corresponding celestial coordinates on the sky, or more +generally, that define world coordinates that are to be associated with +any pixel location in an n-dimensional FITS array. CFITSIO is distributed +with a a few self-contained World Coordinate System (WCS) routines, +however, these routines DO NOT support all the latest WCS conventions, +so it is STRONGLY RECOMMENDED that software developers use a more robust +external WCS library. Several recommended libraries are: + +- + WCSLIB - supported by Mark Calabretta + WCSTools - supported by Doug Mink + AST library - developed by the U.K. Starlink project +- + +More information about the WCS keyword conventions and links to all of +these WCS libraries can be found on the FITS Support Office web site at +http://fits.gsfc.nasa.gov under the WCS link. + +The functions provided in these external WCS libraries will need +access to the WCS keywords contained in the FITS file headers. +One convenient way to pass this information to the extermal library is +to use the fits\_hdr2str routine in CFITSIO (defined below) to copy the +header keywords into one long string, and then pass this string to an +interface routine in the external library that will extract +the necessary WCS information (e.g., the 'wcspih' routine in the WCSLIB +library and the 'astFitsChan' and 'astPutCards' functions in the AST +library). + +>1 Concatenate the header keywords in the CHDU into a single long + string of characters. Each 80-character fixed-length keyword + record is appended to the output character string, in order, with + no intervening separator or terminating characters. The last header + record is terminated with a NULL character. This routine allocates + memory for the returned character array, so the calling program must + free the memory when finished. + + Selected keywords may be excluded from the returned character string. + If the second parameter (nocomments) is TRUE (nonzero) then any + COMMENT, HISTORY, or blank keywords in the header will not be copied + to the output string. + + The 'exclist' parameter may be used to supply a list of keywords + that are to be excluded from the output character string. Wild card + characters (*, ?, and \#) may be used in the excluded keyword names. + If no additional keywords are to be excluded, then set nexc = 0 and +> specify NULL for the the **header parameter. \label{hdr2str} +- + int fits_hdr2str + (fitsfile *fptr, int nocomments, char **exclist, int nexc, + > char **header, int *nkeys, int *status) +- + +>2 The following CFITSIO routine is specifically designed for use +in conjunction with the WCSLIB library. It is not expected that +applications programmers will call this routine directly, but it +is documented here for completeness. This routine extracts arrays +from a binary table that contain WCS information using the -TAB table +lookup convention. See the documentation provided with the WCSLIB +> library for more information. \label{wcstab} +- + int fits_read_wcstab + (fitsfile *fptr, int nwtb, wtbarr *wtb, int *status); +- +**A. Self-contained WCS Routines + +The following routines DO NOT support the more recent WCS conventions +that have been approved as part of the FITS standard. Consequently, +the following routines ARE NOW DEPRECATED. It is STRONGLY RECOMMENDED +that software developers not use these routines, and instead use an +external WCS library, as described in the previous section. + +These routines are included mainly for backward compatibility with +existing software. They support the following standard map +projections: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, and -AIT (these are the +legal values for the coordtype parameter). These routines are based +on similar functions in Classic AIPS. All the angular quantities are +given in units of degrees. + +>1 Get the values of the basic set of standard FITS celestial coordinate + system keywords from the header of a FITS image (i.e., the primary + array or an IMAGE extension). These values may then be passed to + the fits\_pix\_to\_world and fits\_world\_to\_pix routines that + perform the coordinate transformations. If any or all of the WCS + keywords are not present, then default values will be returned. If + the first coordinate axis is the declination-like coordinate, then + this routine will swap them so that the longitudinal-like coordinate + is returned as the first axis. + + If the file uses the newer 'CDj\_i' WCS transformation matrix + keywords instead of old style 'CDELTn' and 'CROTA2' keywords, then + this routine will calculate and return the values of the equivalent + old-style keywords. Note that the conversion from the new-style + keywords to the old-style values is sometimes only an + approximation, so if the approximation is larger than an internally + defined threshold level, then CFITSIO will still return the + approximate WCS keyword values, but will also return with status = + APPROX\_WCS\_KEY, to warn the calling program that approximations + have been made. It is then up to the calling program to decide + whether the approximations are sufficiently accurate for the + particular application, or whether more precise WCS transformations +> must be performed using new-style WCS keywords directly. \label{ffgics} +- + int fits_read_img_coord / ffgics + (fitsfile *fptr, > double *xrefval, double *yrefval, + double *xrefpix, double *yrefpix, double *xinc, double *yinc, + double *rot, char *coordtype, int *status) +- +>2 Get the values of the standard FITS celestial coordinate system + keywords from the header of a FITS table where the X and Y (or RA + and DEC) coordinates are stored in 2 separate columns of the table + (as in the Event List table format that is often used by high energy + astrophysics missions). These values may then be passed to the + fits\_pix\_to\_world and fits\_world\_to\_pix routines that perform +> the coordinate transformations. \label{ffgtcs} +- + int fits_read_tbl_coord / ffgtcs + (fitsfile *fptr, int xcol, int ycol, > double *xrefval, + double *yrefval, double *xrefpix, double *yrefpix, double *xinc, + double *yinc, double *rot, char *coordtype, int *status) +- +>3 Calculate the celestial coordinate corresponding to the input +> X and Y pixel location in the image. \label{ffwldp} +- + int fits_pix_to_world / ffwldp + (double xpix, double ypix, double xrefval, double yrefval, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *coordtype, > double *xpos, double *ypos, + int *status) +- +>4 Calculate the X and Y pixel location corresponding to the input +> celestial coordinate in the image. \label{ffxypx} +- + int fits_world_to_pix / ffxypx + (double xpos, double ypos, double xrefval, double yrefval, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *coordtype, > double *xpix, double *ypix, + int *status) +- + + +*VIII Hierarchical Grouping Routines + +These functions allow for the creation and manipulation of FITS HDU +Groups, as defined in "A Hierarchical Grouping Convention for FITS" by +Jennings, Pence, Folk and Schlesinger +(http://fits.gsfc.nasa.gov/group.html). A group is a +collection of HDUs whose association is defined by a {\it grouping +table}. HDUs which are part of a group are referred to as {\it member +HDUs} or simply as {\it members}. Grouping table member HDUs may +themselves be grouping tables, thus allowing for the construction of +open-ended hierarchies of HDUs. + +Grouping tables contain one row for each member HDU. The grouping table +columns provide identification information that allows applications to +reference or "point to" the member HDUs. Member HDUs are expected, but +not required, to contain a set of GRPIDn/GRPLCn keywords in their +headers for each grouping table that they are referenced by. In this +sense, the GRPIDn/GRPLCn keywords "link" the member HDU back to its +Grouping table. Note that a member HDU need not reside in the same FITS +file as its grouping table, and that a given HDU may be referenced by +up to 999 grouping tables simultaneously. + +Grouping tables are implemented as FITS binary tables with up to six +pre-defined column TTYPEn values: 'MEMBER\_XTENSION', 'MEMBER\_NAME', +'MEMBER\_VERSION', 'MEMBER\_POSITION', 'MEMBER\_URI\_TYPE' and 'MEMBER\_LOCATION'. +The first three columns allow member HDUs to be identified by reference to +their XTENSION, EXTNAME and EXTVER keyword values. The fourth column allows +member HDUs to be identified by HDU position within their FITS file. +The last two columns identify the FITS file in which the member HDU resides, +if different from the grouping table FITS file. + +Additional user defined "auxiliary" columns may also be included with any +grouping table. When a grouping table is copied or modified the presence of +auxiliary columns is always taken into account by the grouping support +functions; however, the grouping support functions cannot directly +make use of this data. + +If a grouping table column is defined but the corresponding member HDU +information is unavailable then a null value of the appropriate data type +is inserted in the column field. Integer columns (MEMBER\_POSITION, +MEMBER\_VERSION) are defined with a TNULLn value of zero (0). Character field +columns (MEMBER\_XTENSION, MEMBER\_NAME, MEMBER\_URI\_TYPE, MEMBER\_LOCATION) +utilize an ASCII null character to denote a null field value. + +The grouping support functions belong to two basic categories: those that +work with grouping table HDUs (ffgt**) and those that work with member HDUs +(ffgm**). Two functions, fits\_copy\_group() and fits\_remove\_group(), have the +option to recursively copy/delete entire groups. Care should be taken when +employing these functions in recursive mode as poorly defined groups could +cause unpredictable results. The problem of a grouping table directly or +indirectly referencing itself (thus creating an infinite loop) is protected +against; in fact, neither function will attempt to copy or delete an HDU +twice. + +**A. Grouping Table Routines + +>1 Create (append) a grouping table at the end of the current FITS file + pointed to by fptr. The grpname parameter provides the grouping table + name (GRPNAME keyword value) and may be set to NULL if no group name + is to be specified. The grouptype parameter specifies the desired + structure of the grouping table and may take on the values: + GT\_ID\_ALL\_URI (all columns created), GT\_ID\_REF (ID by reference columns), + GT\_ID\_POS (ID by position columns), GT\_ID\_ALL (ID by reference and + position columns), GT\_ID\_REF\_URI (ID by reference and FITS file URI +> columns), and GT\_ID\_POS\_URI (ID by position and FITS file URI columns). \label{ffgtcr} +- + int fits_create_group / ffgtcr + (fitsfile *fptr, char *grpname, int grouptype, > int *status) +- +>2 Create (insert) a grouping table just after the CHDU of the current FITS + file pointed to by fptr. All HDUs below the the insertion point will be + shifted downwards to make room for the new HDU. The grpname parameter + provides the grouping table name (GRPNAME keyword value) and may be set to + NULL if no group name is to be specified. The grouptype parameter specifies + the desired structure of the grouping table and may take on the values: + GT\_ID\_ALL\_URI (all columns created), GT\_ID\_REF (ID by reference columns), + GT\_ID\_POS (ID by position columns), GT\_ID\_ALL (ID by reference and + position columns), GT\_ID\_REF\_URI (ID by reference and FITS file URI +> columns), and GT\_ID\_POS\_URI (ID by position and FITS file URI columns) \label{ffgtis}. +- + int fits_insert_group / ffgtis + (fitsfile *fptr, char *grpname, int grouptype, > int *status) +- +>3 Change the structure of an existing grouping table pointed to by + gfptr. The grouptype parameter (see fits\_create\_group() for valid + parameter values) specifies the new structure of the grouping table. This + function only adds or removes grouping table columns, it does not add + or delete group members (i.e., table rows). If the grouping table already + has the desired structure then no operations are performed and function + simply returns with a (0) success status code. If the requested structure + change creates new grouping table columns, then the column values for all + existing members will be filled with the null values appropriate to the +> column type. \label{ffgtch} +- + int fits_change_group / ffgtch + (fitsfile *gfptr, int grouptype, > int *status) +- +>4 Remove the group defined by the grouping table pointed to by gfptr, and + optionally all the group member HDUs. The rmopt parameter specifies the + action to be taken for + all members of the group defined by the grouping table. Valid values are: + OPT\_RM\_GPT (delete only the grouping table) and OPT\_RM\_ALL (recursively + delete all HDUs that belong to the group). Any groups containing the + grouping table gfptr as a member are updated, and if rmopt == OPT\_RM\_GPT + all members have their GRPIDn and GRPLCn keywords updated accordingly. + If rmopt == OPT\_RM\_ALL, then other groups that contain the deleted members +> of gfptr are updated to reflect the deletion accordingly. \label{ffgtrm} +- + int fits_remove_group / ffgtrm + (fitsfile *gfptr, int rmopt, > int *status) +- +>5 Copy (append) the group defined by the grouping table pointed to by infptr, + and optionally all group member HDUs, to the FITS file pointed to by + outfptr. The cpopt parameter specifies the action to be taken for all + members of the group infptr. Valid values are: OPT\_GCP\_GPT (copy only + the grouping table) and OPT\_GCP\_ALL (recursively copy ALL the HDUs that + belong to the group defined by infptr). If the cpopt == OPT\_GCP\_GPT then + the members of infptr have their GRPIDn and GRPLCn keywords updated to + reflect the existence of the new grouping table outfptr, since they now + belong to the new group. If cpopt == OPT\_GCP\_ALL then the new + grouping table outfptr only contains pointers to the copied member HDUs + and not the original member HDUs of infptr. Note that, when + cpopt == OPT\_GCP\_ALL, all members of the group defined by infptr will be + copied to a single FITS file pointed to by outfptr regardless of their +> file distribution in the original group. \label{ffgtcp} +- + int fits_copy_group / ffgtcp + (fitsfile *infptr, fitsfile *outfptr, int cpopt, > int *status) +- +>6 Merge the two groups defined by the grouping table HDUs infptr and outfptr + by combining their members into a single grouping table. All member HDUs + (rows) are copied from infptr to outfptr. If mgopt == OPT\_MRG\_COPY then + infptr continues to exist unaltered after the merge. If the mgopt == + OPT\_MRG\_MOV then infptr is deleted after the merge. In both cases, +> the GRPIDn and GRPLCn keywords of the member HDUs are updated accordingly. \label{ffgtmg} +- + int fits_merge_groups / ffgtmg + (fitsfile *infptr, fitsfile *outfptr, int mgopt, > int *status) +- +>7 "Compact" the group defined by grouping table pointed to by gfptr. The + compaction is achieved by merging (via fits\_merge\_groups()) all direct + member HDUs of gfptr that are themselves grouping tables. The cmopt + parameter defines whether the merged grouping table HDUs remain after + merging (cmopt == OPT\_CMT\_MBR) or if they are deleted after merging + (cmopt == OPT\_CMT\_MBR\_DEL). If the grouping table contains no direct + member HDUs that are themselves grouping tables then this function + does nothing. Note that this function is not recursive, i.e., only the +> direct member HDUs of gfptr are considered for merging. \label{ffgtcm} +- + int fits_compact_group / ffgtcm + (fitsfile *gfptr, int cmopt, > int *status) +- +>8 Verify the integrity of the grouping table pointed to by gfptr to make + sure that all group members are accessible and that all links to other + grouping tables are valid. The firstfailed parameter returns the member + ID (row number) of the first member HDU to fail verification (if positive + value) or the first group link to fail (if negative value). If gfptr is +> successfully verified then firstfailed contains a return value of 0. \label{ffgtvf} +- + int fits_verify_group / ffgtvf + (fitsfile *gfptr, > long *firstfailed, int *status) +- +>9 Open a grouping table that contains the member HDU pointed to by mfptr. + The grouping table to open is defined by the grpid parameter, which + contains the keyword index value of the GRPIDn/GRPLCn keyword(s) that + link the member HDU mfptr to the grouping table. If the grouping table + resides in a file other than the member HDUs file then an attempt is + first made to open the file readwrite, and failing that readonly. A + pointer to the opened grouping table HDU is returned in gfptr. + + Note that it is possible, although unlikely and undesirable, for the + GRPIDn/GRPLCn keywords in a member HDU header to be non-continuous, e.g., + GRPID1, GRPID2, GRPID5, GRPID6. In such cases, the grpid index value + specified in the function call shall identify the (grpid)th GRPID value. + In the above example, if grpid == 3, then the group specified by GRPID5 +> would be opened. \label{ffgtop} +- + int fits_open_group / ffgtop + (fitsfile *mfptr, int group, > fitsfile **gfptr, int *status) +- +>10 Add a member HDU to an existing grouping table pointed to by gfptr. + The member HDU may either be pointed to mfptr (which must be positioned + to the member HDU) or, if mfptr == NULL, identified by the hdupos parameter + (the HDU position number, Primary array == 1) if both the grouping table + and the member HDU reside in the same FITS file. The new member HDU shall + have the appropriate GRPIDn and GRPLCn keywords created in its header. + Note that if the member HDU is already a member of the group then it will +> not be added a second time. \label{ffgtam} +- + int fits_add_group_member / ffgtam + (fitsfile *gfptr, fitsfile *mfptr, int hdupos, > int *status) +- + +**B. Group Member Routines + +>1 Return the number of member HDUs in a grouping table gfptr. The number + member HDUs is just the NAXIS2 value (number of rows) of the grouping +> table. \label{ffgtnm} +- + int fits_get_num_members / ffgtnm + (fitsfile *gfptr, > long *nmembers, int *status) +- +>2 Return the number of groups to which the HDU pointed to by mfptr is + linked, as defined by the number of GRPIDn/GRPLCn keyword records that + appear in its header. Note that each time this function is called, the + indices of the GRPIDn/GRPLCn keywords are checked to make sure they + are continuous (ie no gaps) and are re-enumerated to eliminate gaps if +> found. \label{ffgmng} +- + int fits_get_num_groups / ffgmng + (fitsfile *mfptr, > long *nmembers, int *status) +- +>3 Open a member of the grouping table pointed to by gfptr. The member to + open is identified by its row number within the grouping table as given + by the parameter 'member' (first member == 1) . A fitsfile pointer to + the opened member HDU is returned as mfptr. Note that if the member HDU + resides in a FITS file different from the grouping table HDU then the +> member file is first opened readwrite and, failing this, opened readonly. \label{ffgmop} +- + int fits_open_member / ffgmop + (fitsfile *gfptr, long member, > fitsfile **mfptr, int *status) +- +>4 Copy (append) a member HDU of the grouping table pointed to by gfptr. + The member HDU is identified by its row number within the grouping table + as given by the parameter 'member' (first member == 1). The copy of the + group member HDU will be appended to the FITS file pointed to by mfptr, + and upon return mfptr shall point to the copied member HDU. The cpopt + parameter may take on the following values: OPT\_MCP\_ADD which adds a new + entry in gfptr for the copied member HDU, OPT\_MCP\_NADD which does not add + an entry in gfptr for the copied member, and OPT\_MCP\_REPL which replaces +> the original member entry with the copied member entry. \label{ffgmcp} +- + int fits_copy_member / ffgmcp + (fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt, > int *status) +- +>5 Transfer a group member HDU from the grouping table pointed to by + infptr to the grouping table pointed to by outfptr. The member HDU to + transfer is identified by its row number within infptr as specified by + the parameter 'member' (first member == 1). If tfopt == OPT\_MCP\_ADD then + the member HDU is made + a member of outfptr and remains a member of infptr. If tfopt == OPT\_MCP\_MOV +> then the member HDU is deleted from infptr after the transfer to outfptr. \label{ffgmtf} +- + int fits_transfer_member / ffgmtf + (fitsfile *infptr, fitsfile *outfptr, long member, int tfopt, + > int *status) +- +>6 Remove a member HDU from the grouping table pointed to by gfptr. The + member HDU to be deleted is identified by its row number in the grouping + table as specified by the parameter 'member' (first member == 1). The rmopt + parameter may take on the following values: OPT\_RM\_ENTRY which + removes the member HDU entry from the grouping table and updates the + member's GRPIDn/GRPLCn keywords, and OPT\_RM\_MBR which removes the member +> HDU entry from the grouping table and deletes the member HDU itself. \label{ffgmrm} +- + int fits_remove_member / ffgmrm + (fitsfile *fptr, long member, int rmopt, > int *status) +- + +*IX Specialized CFITSIO Interface Routines + +The basic interface routines described previously are recommended +for most uses, but the routines described in this chapter +are also available if necessary. Some of these routines perform more +specialized function that cannot easily be done with the basic +interface routines while others duplicate the functionality of the +basic routines but have a slightly different calling sequence. +See Appendix B for the definition of each function parameter. + +**A. FITS File Access Routines + +>1 Open an existing FITS file residing in core computer memory. This +routine is analogous to fits\_open\_file. The 'filename' is +currently ignored by this routine and may be any arbitrary string. In +general, the application must have preallocated an initial block of +memory to hold the FITS file prior to calling this routine: 'memptr' +points to the starting address and 'memsize' gives the initial size of +the block of memory. 'mem\_realloc' is a pointer to an optional +function that CFITSIO can call to allocate additional memory, if needed +(only if mode = READWRITE), and is modeled after the standard C +'realloc' function; a null pointer may be given if the initial +allocation of memory is all that will be required (e.g., if the file is +opened with mode = READONLY). The 'deltasize' parameter may be used to +suggest a minimum amount of additional memory that should be allocated +during each call to the memory reallocation function. By default, +CFITSIO will reallocate enough additional space to hold the entire +currently defined FITS file (as given by the NAXISn keywords) or 1 FITS +block (= 2880 bytes), which ever is larger. Values of deltasize less +than 2880 will be ignored. Since the memory reallocation operation can +be computationally expensive, allocating a larger initial block of +memory, and/or specifying a larger deltasize value may help to reduce +the number of reallocation calls and make the application program run +> faster. \label{ffomem} +- + int fits_open_memfile / ffomem + (fitsfile **fptr, const char *filename, int mode, void **memptr, + size_t *memsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), int *status) +- +>2 Create a new FITS file residing in core computer memory. This +routine is analogous to fits\_create\_file. In general, the +application must have preallocated an initial block of memory to hold +the FITS file prior to calling this routine: 'memptr' points to the +starting address and 'memsize' gives the initial size of the block of +memory. 'mem\_realloc' is a pointer to an optional function that +CFITSIO can call to allocate additional memory, if needed, and is +modeled after the standard C 'realloc' function; a null pointer may be +given if the initial allocation of memory is all that will be +required. The 'deltasize' parameter may be used to suggest a minimum +amount of additional memory that should be allocated during each call +to the memory reallocation function. By default, CFITSIO will +reallocate enough additional space to hold 1 FITS block (= 2880 bytes) +and values of deltasize less than 2880 will be ignored. Since the +memory reallocation operation can be computationally expensive, +allocating a larger initial block of memory, and/or specifying a larger +deltasize value may help to reduce the number of reallocation calls +and make the application program run +> faster. \label{ffimem} +- + int fits_create_memfile / ffimem + (fitsfile **fptr, void **memptr, + size_t *memsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), int *status) +- +>3 Reopen a FITS file that was previously opened with + fits\_open\_file or fits\_create\_file. The new fitsfile + pointer may then be treated as a separate file, and one may + simultaneously read or write to 2 (or more) different extensions in + the same file. The fits\_open\_file routine (above) automatically + detects cases where a previously opened file is being opened again, + and then internally call fits\_reopen\_file, so programs should rarely + need to explicitly call this routine. +>\label{ffreopen} +- + int fits_reopen_file / ffreopen + (fitsfile *openfptr, fitsfile **newfptr, > int *status) +- + +>4 Create a new FITS file, using a template file to define its + initial size and structure. The template may be another FITS HDU + or an ASCII template file. If the input template file name pointer + is null, then this routine behaves the same as fits\_create\_file. + The currently supported format of the ASCII template file is described + under the fits\_parse\_template routine (in the general Utilities + section) +>\label{fftplt} +- + int fits_create_template / fftplt + (fitsfile **fptr, char *filename, char *tpltfile > int *status) +- + +>5 Parse the input filename or URL into its component parts, namely: +\begin{itemize} +\item +the file type (file://, ftp://, http://, etc), +\item +the base input file name, +\item +the name of the output file that the input file is to be copied to prior +to opening, +\item +the HDU or extension specification, +\item +the filtering specifier, +\item +the binning specifier, +\item +the column specifier, +\item +and the +image pixel filtering specifier. +\end{itemize} + Null strings will be returned for any components that are not present +in the input file name. These routines are mainly for interal use +>by other CFITSIO routines. \label{ffiurl} +- + int fits_parse_input_url / ffiurl + (char *filename, > char *filetype, char *infile, char *outfile, char + *extspec, char *filter, char *binspec, char *colspec, int *status) + + int fits_parse_input_filename / ffifile + (char *filename, > char *filetype, char *infile, char *outfile, char + *extspec, char *filter, char *binspec, char *colspec, char *pixspec, + int *status) +- +>6 Parse the input filename and return the HDU number that would be +moved to if the file were opened with fits\_open\_file. The returned +HDU number begins with 1 for the primary array, so for example, if the +input filename = `myfile.fits[2]' then hdunum = 3 will be returned. +CFITSIO does not open the file to check if the extension actually +exists if an extension number is specified. If an extension name is +included in the file name specification (e.g. `myfile.fits[EVENTS]' +then this routine will have to open the FITS file and look for the +position of the named extension, then close file again. This is not +possible if the file is being read from the stdin stream, and an error +will be returned in this case. If the filename does not specify an +explicit extension (e.g. 'myfile.fits') then hdunum = -99 will be +returned, which is functionally equivalent to hdunum = 1. This routine +is mainly used for backward compatibility in the ftools software +package and is not recommended for general use. It is generally better +and more efficient to first open the FITS file with fits\_open\_file, +then use fits\_get\_hdu\_num to determine which HDU in the file has +been opened, rather than calling fits\_parse\_input\_url followed by a +call to fits\_open\_file. +> \label{ffextn} +- + int fits_parse_extnum / ffextn + (char *filename, > int *hdunum, int *status) +- +>7 Parse the input file name and return the root file name. The root +name includes the file type if specified, (e.g. 'ftp://' or 'http://') +and the full path name, to the extent that it is specified in the input +filename. It does not include the HDU name or number, or any filtering +specifications. +> \label{ffrtnm} +- + int fits_parse_rootname / ffrtnm + (char *filename, > char *rootname, int *status); +- +>8 Test if the input file or a compressed version of the file (with +a .gz, .Z, .z, or .zip extension) exists on disk. The returned value of +the 'exists' parameter will have 1 of the 4 following values: +- + 2: the file does not exist, but a compressed version does exist + 1: the disk file does exist + 0: neither the file nor a compressed version of the file exist + -1: the input file name is not a disk file (could be a ftp, http, + smem, or mem file, or a file piped in on the STDIN stream) +- + +> \label{ffexist} +- + int fits_file_exists / ffexist + (char *filename, > int *exists, int *status); +- +>9 Flush any internal buffers of data to the output FITS file. These + routines rarely need to be called, but can be useful in cases where + other processes need to access the same FITS file in real time, + either on disk or in memory. These routines also help to ensure + that if the application program subsequently aborts then the FITS + file will have been closed properly. The first routine, + fits\_flush\_file is more rigorous and completely closes, then + reopens, the current HDU, before flushing the internal buffers, thus + ensuring that the output FITS file is identical to what would be + produced if the FITS was closed at that point (i.e., with a call to + fits\_close\_file). The second routine, fits\_flush\_buffer simply + flushes the internal CFITSIO buffers of data to the output FITS + file, without updating and closing the current HDU. This is much + faster, but there may be circumstances where the flushed file does + not completely reflect the final state of the file as it will exist + when the file is actually closed. + + A typical use of these routines would be to flush the state of a + FITS table to disk after each row of the table is written. It is + recommend that fits\_flush\_file be called after the first row is + written, then fits\_flush\_buffer may be called after each + subsequent row is written. Note that this latter routine will not + automatically update the NAXIS2 keyword which records the number of + rows of data in the table, so this keyword must be explicitly + updated by the application program after each row is written. +> \label{ffflus} +- + int fits_flush_file / ffflus + (fitsfile *fptr, > int *status) + + int fits_flush_buffer / ffflsh + (fitsfile *fptr, 0, > int *status) + + (Note: The second argument must be 0). +- + +**B. HDU Access Routines + +>1 Get the byte offsets in the FITS file to the start of the header + and the start and end of the data in the CHDU. The difference + between headstart and dataend equals the size of the CHDU. If the + CHDU is the last HDU in the file, then dataend is also equal to the + size of the entire FITS file. Null pointers may be input for any +> of the address parameters if their values are not needed. \label{ffghad} +- + int fits_get_hduaddr / ffghad (only supports files up to 2.1 GB in size) + (fitsfile *fptr, > long *headstart, long *datastart, long *dataend, + int *status) + + int fits_get_hduaddrll / ffghadll (supports large files) + (fitsfile *fptr, > long *headstart, long *datastart, long *dataend, + int *status) +- +>2 Create (append) a new empty HDU at the end of the FITS file. + This is now the CHDU but it is completely empty and has + no header keywords. It is recommended that fits\_create\_img or +> fits\_create\_tbl be used instead of this routine. \label{ffcrhd} +- + int fits_create_hdu / ffcrhd + (fitsfile *fptr, > int *status) +- +>3 Insert a new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = PREPEND\_PRIMARY prior + to calling the routine. In this case the old primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. Refer to Chapter 9 for a list of +> pre-defined bitpix values. \label{ffiimg} +- + int fits_insert_img / ffiimg + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_insert_imgll / ffiimgll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +- +>4 Insert a new ASCII or binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for the + new extension. If there are no other following extensions then the + new table extension will simply be appended to the end of the + file. If the FITS file is currently empty then this routine will + create a dummy primary array before appending the table to it. The + new extension will become the CHDU. The tunit and extname + parameters are optional and a null pointer may be given if they are + not defined. When inserting an ASCII table with + fits\_insert\_atbl, a null pointer may given for the *tbcol + parameter in which case each column of the table will be separated + by a single space character. Similarly, if the input value of + rowlen is 0, then CFITSIO will calculate the default rowlength + based on the tbcol and ttype values. When inserting a binary table + with fits\_insert\_btbl, if there are following extensions in the + file and if the table contains variable length array columns then + pcount must specify the expected final size of the data heap, +> otherwise pcount must = 0. \label{ffitab} \label{ffibin} +- + int fits_insert_atbl / ffitab + (fitsfile *fptr, LONGLONG rowlen, LONGLONG nrows, int tfields, char *ttype[], + long *tbcol, char *tform[], char *tunit[], char *extname, > int *status) + + int fits_insert_btbl / ffibin + (fitsfile *fptr, LONGLONG nrows, int tfields, char **ttype, + char **tform, char **tunit, char *extname, long pcount, > int *status) +- +>5 Modify the size, dimensions, and/or data type of the current + primary array or image extension. If the new image, as specified + by the input arguments, is larger than the current existing image + in the FITS file then zero fill data will be inserted at the end + of the current image and any following extensions will be moved + further back in the file. Similarly, if the new image is + smaller than the current image then any following extensions + will be shifted up towards the beginning of the FITS file + and the image data will be truncated to the new size. + This routine rewrites the BITPIX, NAXIS, and NAXISn keywords +> with the appropriate values for the new image. \label{ffrsim} +- + int fits_resize_img / ffrsim + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_resize_imgll / ffrsimll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +- +>6 Copy the data (and not the header) from the CHDU associated with infptr + to the CHDU associated with outfptr. This will overwrite any data + previously in the output CHDU. This low level routine is used by + fits\_copy\_hdu, but it may also be useful in certain application programs + that want to copy the data from one FITS file to another but also + want to modify the header keywords. The required FITS header keywords + which define the structure of the HDU must be written to the +> output CHDU before calling this routine. \label{ffcpdt} +- + int fits_copy_data / ffcpdt + (fitsfile *infptr, fitsfile *outfptr, > int *status) +- +>7 Read or write a specified number of bytes starting at the specified byte + offset from the start of the extension data unit. These low + level routine are intended mainly for accessing the data in + non-standard, conforming extensions, and should not be used for standard +> IMAGE, TABLE, or BINTABLE extensions. \label{ffgextn} +- + int fits_read_ext / ffgextn + (fitsfile *fptr, LONGLONG offset, LONGLONG nbytes, void *buffer) + int fits_write_ext / ffpextn + (fitsfile *fptr, LONGLONG offset, LONGLONG nbytes, void *buffer) +- +>8 This routine forces CFITSIO to rescan the current header keywords that + define the structure of the HDU (such as the NAXIS and BITPIX + keywords) so that it reinitializes the internal buffers that + describe the HDU structure. This routine is useful for + reinitializing the structure of an HDU if any of the required + keywords (e.g., NAXISn) have been modified. In practice it should + rarely be necessary to call this routine because CFITSIO +> internally calls it in most situations. \label{ffrdef} +- + int fits_set_hdustruc / ffrdef + (fitsfile *fptr, > int *status) (DEPRECATED) +- +**C. Specialized Header Keyword Routines + +***1. Header Information Routines + +>1 Reserve space in the CHU for MOREKEYS more header keywords. + This routine may be called to allocate space for additional keywords + at the time the header is created (prior to writing any data). + CFITSIO can dynamically add more space to the header when needed, + however it is more efficient to preallocate the required space +> if the size is known in advance. \label{ffhdef} +- + int fits_set_hdrsize / ffhdef + (fitsfile *fptr, int morekeys, > int *status) +- +>2 Return the number of keywords in the header (not counting the END + keyword) and the current position + in the header. The position is the number of the keyword record that + will be read next (or one greater than the position of the last keyword + that was read). A value of 1 is returned if the pointer is +> positioned at the beginning of the header. \label{ffghps} +- + int fits_get_hdrpos / ffghps + (fitsfile *fptr, > int *keysexist, int *keynum, int *status) +- + +***2. Read and Write the Required Keywords + +>1 Write the required extension header keywords into the CHU. + These routines are not required, and instead the appropriate + header may be constructed by writing each individual keyword in the + proper sequence. + + The simpler fits\_write\_imghdr routine is equivalent to calling + fits\_write\_grphdr with the default values of simple = TRUE, pcount + = 0, gcount = 1, and extend = TRUE. The PCOUNT, GCOUNT and EXTEND + keywords are not required in the primary header and are only written + if pcount is not equal to zero, gcount is not equal to zero or one, + and if extend is TRUE, respectively. When writing to an IMAGE + extension, the SIMPLE and EXTEND parameters are ignored. It is + recommended that fits\_create\_image or fits\_create\_tbl be used + instead of these routines to write the + required header keywords. The general fits\_write\_exthdr routine + may be used to write the header of any conforming FITS +> extension. \label{ffphpr} \label{ffphps} +- + int fits_write_imghdr / ffphps + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_write_imghdrll / ffphpsll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) + + int fits_write_grphdr / ffphpr + (fitsfile *fptr, int simple, int bitpix, int naxis, long *naxes, + LONGLONG pcount, LONGLONG gcount, int extend, > int *status) + + int fits_write_grphdrll / ffphprll + (fitsfile *fptr, int simple, int bitpix, int naxis, LONGLONG *naxes, + LONGLONG pcount, LONGLONG gcount, int extend, > int *status) + + int fits_write_exthdr /ffphext + (fitsfile *fptr, char *xtension, int bitpix, int naxis, long *naxes, + LONGLONG pcount, LONGLONG gcount, > int *status) + +- +>2 Write the ASCII table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input pointers + are not null. A null pointer may given for the + *tbcol parameter in which case a single space will be inserted + between each column of the table. Similarly, if rowlen is + given = 0, then CFITSIO will calculate the default rowlength based on +> the tbcol and ttype values. \label{ffphtb} +- + int fits_write_atblhdr / ffphtb + (fitsfile *fptr, LONGLONG rowlen, LONGLONG nrows, int tfields, char **ttype, + long *tbcol, char **tform, char **tunit, char *extname, > int *status) +- +>3 Write the binary table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input pointers + are not null. The pcount parameter, which specifies the + size of the variable length array heap, should initially = 0; + CFITSIO will automatically update the PCOUNT keyword value if any + variable length array data is written to the heap. The TFORM keyword + value for variable length vector columns should have the form 'Pt(len)' + or '1Pt(len)' where `t' is the data type code letter (A,I,J,E,D, etc.) + and `len' is an integer specifying the maximum length of the vectors + in that column (len must be greater than or equal to the longest + vector in the column). If `len' is not specified when the table is + created (e.g., the input TFORMn value is just '1Pt') then CFITSIO will + scan the column when the table is first closed and will append the + maximum length to the TFORM keyword value. Note that if the table + is subsequently modified to increase the maximum length of the vectors + then the modifying program is responsible for also updating the TFORM +> keyword value. \label{ffphbn} +- + int fits_write_btblhdr / ffphbn + (fitsfile *fptr, LONGLONG nrows, int tfields, char **ttype, + char **tform, char **tunit, char *extname, LONGLONG pcount, > int *status) +- +>4 Read the required keywords from the CHDU (image or table). When + reading from an IMAGE extension the SIMPLE and EXTEND parameters are + ignored. A null pointer may be supplied for any of the returned +> parameters that are not needed. \label{ffghpr} \label{ffghtb} \label{ffghbn} +- + int fits_read_imghdr / ffghpr + (fitsfile *fptr, int maxdim, > int *simple, int *bitpix, int *naxis, + long *naxes, long *pcount, long *gcount, int *extend, int *status) + + int fits_read_imghdrll / ffghprll + (fitsfile *fptr, int maxdim, > int *simple, int *bitpix, int *naxis, + LONGLONG *naxes, long *pcount, long *gcount, int *extend, int *status) + + int fits_read_atblhdr / ffghtb + (fitsfile *fptr,int maxdim, > long *rowlen, long *nrows, + int *tfields, char **ttype, LONGLONG *tbcol, char **tform, char **tunit, + char *extname, int *status) + + int fits_read_atblhdrll / ffghtbll + (fitsfile *fptr,int maxdim, > LONGLONG *rowlen, LONGLONG *nrows, + int *tfields, char **ttype, long *tbcol, char **tform, char **tunit, + char *extname, int *status) + + int fits_read_btblhdr / ffghbn + (fitsfile *fptr, int maxdim, > long *nrows, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + long *pcount, int *status) + + int fits_read_btblhdrll / ffghbnll + (fitsfile *fptr, int maxdim, > LONGLONG *nrows, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + long *pcount, int *status) +- +***3. Write Keyword Routines + +These routines simply append a new keyword to the header and do not +check to see if a keyword with the same name already exists. In +general it is preferable to use the fits\_update\_key routine to ensure +that the same keyword is not written more than once to the header. See +Appendix B for the definition of the parameters used in these +routines. + + +>1 Write (append) a new keyword of the appropriate data type into the CHU. + A null pointer may be entered for the comment parameter, which + will cause the comment field of the keyword to be left blank. The + flt, dbl, cmp, and dblcmp versions of this routine have the added + feature that if the 'decimals' parameter is negative, then the 'G' + display format rather then the 'E' format will be used when + constructing the keyword value, taking the absolute value of + 'decimals' for the precision. This will suppress trailing zeros, + and will use a fixed format rather than an exponential format, +> depending on the magnitude of the value. \label{ffpkyx} +- + int fits_write_key_str / ffpkys + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_write_key_[log, lng] / ffpky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_write_key_[flt, dbl, fixflg, fixdbl] / ffpky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_write_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffpk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +- +>2 Write (append) a string valued keyword into the CHU which may be longer + than 68 characters in length. This uses the Long String Keyword + convention that is described in the`Local FITS Conventions' section + in Chapter 4. Since this uses a non-standard FITS convention to + encode the long keyword string, programs which use this routine + should also call the fits\_write\_key\_longwarn routine to add some + COMMENT keywords to warn users of the FITS file that this + convention is being used. The fits\_write\_key\_longwarn routine + also writes a keyword called LONGSTRN to record the version of the + longstring convention that has been used, in case a new convention + is adopted at some point in the future. If the LONGSTRN keyword + is already present in the header, then fits\_write\_key\_longwarn + will +> simply return without doing anything. \label{ffpkls} \label{ffplsw} +- + int fits_write_key_longstr / ffpkls + (fitsfile *fptr, char *keyname, char *longstr, char *comment, + > int *status) + + int fits_write_key_longwarn / ffplsw + (fitsfile *fptr, > int *status) +- +>3 Write (append) a numbered sequence of keywords into the CHU. The + starting index number (nstart) must be greater than 0. One may + append the same comment to every keyword (and eliminate the need + to have an array of identical comment strings, one for each keyword) by + including the ampersand character as the last non-blank character in the + (first) COMMENTS string parameter. This same string + will then be used for the comment field in all the keywords. + One may also enter a null pointer for the comment parameter to +> leave the comment field of the keyword blank. \label{ffpknx} +- + int fits_write_keys_str / ffpkns + (fitsfile *fptr, char *keyroot, int nstart, int nkeys, + char **value, char **comment, > int *status) + + int fits_write_keys_[log, lng] / ffpkn[lj] + (fitsfile *fptr, char *keyroot, int nstart, int nkeys, + DTYPE *numval, char **comment, int *status) + + int fits_write_keys_[flt, dbl, fixflg, fixdbl] / ffpkne[edfg] + (fitsfile *fptr, char *keyroot, int nstart, int nkey, + DTYPE *numval, int decimals, char **comment, > int *status) +- +>4 Copy an indexed keyword from one HDU to another, modifying + the index number of the keyword name in the process. For example, + this routine could read the TLMIN3 keyword from the input HDU + (by giving keyroot = `TLMIN' and innum = 3) and write it to the + output HDU with the keyword name TLMIN4 (by setting outnum = 4). + If the input keyword does not exist, then this routine simply +> returns without indicating an error. \label{ffcpky} +- + int fits_copy_key / ffcpky + (fitsfile *infptr, fitsfile *outfptr, int innum, int outnum, + char *keyroot, > int *status) +- +>5 Write (append) a `triple precision' keyword into the CHU in F28.16 format. + The floating point keyword value is constructed by concatenating the + input integer value with the input double precision fraction value + (which must have a value between 0.0 and 1.0). The ffgkyt routine should + be used to read this keyword value, because the other keyword reading +> routines will not preserve the full precision of the value. \label{ffpkyt} +- + int fits_write_key_triple / ffpkyt + (fitsfile *fptr, char *keyname, long intval, double frac, + char *comment, > int *status) +- +>6 Write keywords to the CHDU that are defined in an ASCII template file. + The format of the template file is described under the fits\_parse\_template +> routine. \label{ffpktp} +- + int fits_write_key_template / ffpktp + (fitsfile *fptr, const char *filename, > int *status) +- +***4. Insert Keyword Routines + +These insert routines are somewhat less efficient than the `update' or +`write' keyword routines because the following keywords in the header +must be shifted down to make room for the inserted keyword. See +Appendix B for the definition of the parameters used in these +routines. + +>1 Insert a new keyword record into the CHU at the specified position + (i.e., immediately preceding the (keynum)th keyword in the header.) +> \label{ffirec} +- + int fits_insert_record / ffirec + (fitsfile *fptr, int keynum, char *card, > int *status) +- +>2 Insert a new keyword into the CHU. The new keyword is inserted + immediately following the last keyword that has been read from the + header. The `longstr' version has the same functionality as the + `str' version except that it also supports the local long string + keyword convention for strings longer than 68 characters. A null + pointer may be entered for the comment parameter which will cause + the comment field to be left blank. The flt, dbl, cmp, and dblcmp + versions of this routine have the added + feature that if the 'decimals' parameter is negative, then the 'G' + display format rather then the 'E' format will be used when + constructing the keyword value, taking the absolute value of + 'decimals' for the precision. This will suppress trailing zeros, + and will use a fixed format rather than an exponential format, +> depending on the magnitude of the value. \label{ffikyx} +- + int fits_insert_card / ffikey + (fitsfile *fptr, char *card, > &status) + + int fits_insert_key_[str, longstr] / ffi[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_insert_key_[log, lng] / ffiky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_insert_key_[flt, fixflt, dbl, fixdbl] / ffiky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_insert_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffik[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +- +>3 Insert a new keyword with an undefined, or null, value into the CHU. +> The value string of the keyword is left blank in this case. \label{ffikyu} +- + int fits_insert_key_null / ffikyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +- + +***5. Read Keyword Routines + +Wild card characters may be used when specifying the name of the +keyword to be read. + +>1 Read a keyword value (with the appropriate data type) and comment from + the CHU. If a NULL comment pointer is given on input, then the comment + string will not be returned. If the value of the keyword is not defined + (i.e., the value field is blank) then an error status = VALUE\_UNDEFINED + will be returned and the input value will not be changed (except that + ffgkys will reset the value to a null string). +> \label{ffgkyx} \label{ffgkls} +- + int fits_read_key_str / ffgkys + (fitsfile *fptr, char *keyname, > char *value, char *comment, + int *status); + + NOTE: after calling the following routine, programs must explicitly free + the memory allocated for 'longstr' after it is no longer needed. + + int fits_read_key_longstr / ffgkls + (fitsfile *fptr, char *keyname, > char **longstr, char *comment, + int *status) + + int fits_read_key_[log, lng, flt, dbl, cmp, dblcmp] / ffgky[ljedcm] + (fitsfile *fptr, char *keyname, > DTYPE *numval, char *comment, + int *status) + + int fits_read_key_lnglng / ffgkyjj + (fitsfile *fptr, char *keyname, > LONGLONG *numval, char *comment, + int *status) +- +>2 Read a sequence of indexed keyword values (e.g., NAXIS1, NAXIS2, ...). + The input starting index number (nstart) must be greater than 0. + If the value of any of the keywords is not defined (i.e., the value + field is blank) then an error status = VALUE\_UNDEFINED will be + returned and the input value for the undefined keyword(s) will not + be changed. These routines do not support wild card characters in + the root name. If there are no indexed keywords in the header with + the input root name then these routines do not return a non-zero +> status value and instead simply return nfound = 0. \label{ffgknx} +- + int fits_read_keys_str / ffgkns + (fitsfile *fptr, char *keyname, int nstart, int nkeys, + > char **value, int *nfound, int *status) + + int fits_read_keys_[log, lng, flt, dbl] / ffgkn[ljed] + (fitsfile *fptr, char *keyname, int nstart, int nkeys, + > DTYPE *numval, int *nfound, int *status) +- +>3 Read the value of a floating point keyword, returning the integer and + fractional parts of the value in separate routine arguments. + This routine may be used to read any keyword but is especially + useful for reading the 'triple precision' keywords written by ffpkyt. +> \label{ffgkyt} +- + int fits_read_key_triple / ffgkyt + (fitsfile *fptr, char *keyname, > long *intval, double *frac, + char *comment, int *status) +- +***6. Modify Keyword Routines + +These routines modify the value of an existing keyword. An error is +returned if the keyword does not exist. Wild card characters may be +used when specifying the name of the keyword to be modified. See +Appendix B for the definition of the parameters used in these +routines. + +>>1 Modify (overwrite) the nth 80-character header record in the CHU. \label{ffmrec} +- + int fits_modify_record / ffmrec + (fitsfile *fptr, int keynum, char *card, > int *status) +- +>2 Modify (overwrite) the 80-character header record for the named keyword + in the CHU. This can be used to overwrite the name of the keyword as +> well as its value and comment fields. \label{ffmcrd} +- + int fits_modify_card / ffmcrd + (fitsfile *fptr, char *keyname, char *card, > int *status) +- +>5 Modify the value and comment fields of an existing keyword in the CHU. + The `longstr' version has the same functionality as the `str' + version except that it also supports the local long string keyword + convention for strings longer than 68 characters. Optionally, one + may modify only the value field and leave the comment field + unchanged by setting the input COMMENT parameter equal to the + ampersand character (\&) or by entering a null pointer for the + comment parameter. The flt, dbl, cmp, and dblcmp versions of this + routine have the added feature that if the 'decimals' parameter is + negative, then the 'G' display format rather then the 'E' format + will be used when constructing the keyword value, taking the + absolute value of 'decimals' for the precision. This will suppress + trailing zeros, and will use a fixed format rather than an + exponential format, +> depending on the magnitude of the value. \label{ffmkyx} +- + int fits_modify_key_[str, longstr] / ffm[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status); + + int fits_modify_key_[log, lng] / ffmky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_modify_key_[flt, dbl, fixflt, fixdbl] / ffmky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_modify_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffmk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +- +>6 Modify the value of an existing keyword to be undefined, or null. + The value string of the keyword is set to blank. + Optionally, one may leave the comment field unchanged by setting the + input COMMENT parameter equal to +> the ampersand character (\&) or by entering a null pointer. \label{ffmkyu} +- + int fits_modify_key_null / ffmkyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +- +***7. Update Keyword Routines + +>1 These update routines modify the value, and optionally the comment field, + of the keyword if it already exists, otherwise the new keyword is + appended to the header. A separate routine is provided for each + keyword data type. The `longstr' version has the same functionality + as the `str' version except that it also supports the local long + string keyword convention for strings longer than 68 characters. A + null pointer may be entered for the comment parameter which will + leave the comment field unchanged or blank. The flt, dbl, cmp, and + dblcmp versions of this routine have the added feature that if the + 'decimals' parameter is negative, then the 'G' display format + rather then the 'E' format will be used when constructing the + keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a fixed + format rather than an exponential format, +> depending on the magnitude of the value. \label{ffukyx} +- + int fits_update_key_[str, longstr] / ffu[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_update_key_[log, lng] / ffuky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_update_key_[flt, dbl, fixflt, fixdbl] / ffuky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_update_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffuk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +- + +**D. Define Data Scaling and Undefined Pixel Parameters + +These routines set or modify the internal parameters used by CFITSIO +to either scale the data or to represent undefined pixels. Generally +CFITSIO will scale the data according to the values of the BSCALE and +BZERO (or TSCALn and TZEROn) keywords, however these routines may be +used to override the keyword values. This may be useful when one wants +to read or write the raw unscaled values in the FITS file. Similarly, +CFITSIO generally uses the value of the BLANK or TNULLn keyword to +signify an undefined pixel, but these routines may be used to override +this value. These routines do not create or modify the corresponding +header keyword values. See Appendix B for the definition of the +parameters used in these routines. + +>1 Reset the scaling factors in the primary array or image extension; does + not change the BSCALE and BZERO keyword values and only affects the + automatic scaling performed when the data elements are written/read + to/from the FITS file. When reading from a FITS file the returned + data value = (the value given in the FITS array) * BSCALE + BZERO. + The inverse formula is used when writing data values to the FITS +> file. \label{ffpscl} +- + int fits_set_bscale / ffpscl + (fitsfile *fptr, double scale, double zero, > int *status) +- +>2 Reset the scaling parameters for a table column; does not change + the TSCALn or TZEROn keyword values and only affects the automatic + scaling performed when the data elements are written/read to/from + the FITS file. When reading from a FITS file the returned data + value = (the value given in the FITS array) * TSCAL + TZERO. The + inverse formula is used when writing data values to the FITS file. +> \label{fftscl} +- + int fits_set_tscale / fftscl + (fitsfile *fptr, int colnum, double scale, double zero, + > int *status) +- +>3 Define the integer value to be used to signify undefined pixels in the + primary array or image extension. This is only used if BITPIX = 8, 16, + or 32. This does not create or change the value of the BLANK keyword in +> the header. \label{ffpnul} +- + int fits_set_imgnull / ffpnul + (fitsfile *fptr, LONGLONG nulval, > int *status) +- +>4 Define the string to be used to signify undefined pixels in + a column in an ASCII table. This does not create or change the value +> of the TNULLn keyword. \label{ffsnul} +- + int fits_set_atblnull / ffsnul + (fitsfile *fptr, int colnum, char *nulstr, > int *status) +- +>5 Define the value to be used to signify undefined pixels in + an integer column in a binary table (where TFORMn = 'B', 'I', or 'J'). + This does not create or change the value of the TNULLn keyword. +> \label{fftnul} +- + int fits_set_btblnull / fftnul + (fitsfile *fptr, int colnum, LONGLONG nulval, > int *status) +- + +**E. Specialized FITS Primary Array or IMAGE Extension I/O Routines + +These routines read or write data values in the primary data array +(i.e., the first HDU in the FITS file) or an IMAGE extension. +Automatic data type conversion is performed for if the data type of the +FITS array (as defined by the BITPIX keyword) differs from the data +type of the array in the calling routine. The data values are +automatically scaled by the BSCALE and BZERO header values as they are +being written or read from the FITS array. Unlike the basic routines +described in the previous chapter, most of these routines specifically +support the FITS random groups format. See Appendix B for the +definition of the parameters used in these routines. + +The more primitive reading and writing routines (i. e., ffppr\_, +ffppn\_, ffppn, ffgpv\_, or ffgpf\_) simply treat the primary array as +a long 1-dimensional array of pixels, ignoring the intrinsic +dimensionality of the array. When dealing with a 2D image, for +example, the application program must calculate the pixel offset in the +1-D array that corresponds to any particular X, Y coordinate in the +image. C programmers should note that the ordering of arrays in FITS +files, and hence in all the CFITSIO calls, is more similar to the +dimensionality of arrays in Fortran rather than C. For instance if a +FITS image has NAXIS1 = 100 and NAXIS2 = 50, then a 2-D array just +large enough to hold the image should be declared as array[50][100] and +not as array[100][50]. + +For convenience, higher-level routines are also provided to specificly +deal with 2D images (ffp2d\_ and ffg2d\_) and 3D data cubes (ffp3d\_ +and ffg3d\_). The dimensionality of the FITS image is passed by the +naxis1, naxis2, and naxis3 parameters and the declared dimensions of +the program array are passed in the dim1 and dim2 parameters. Note +that the dimensions of the program array may be larger than the +dimensions of the FITS array. For example if a FITS image with NAXIS1 += NAXIS2 = 400 is read into a program array which is dimensioned as 512 +x 512 pixels, then the image will just fill the lower left corner of +the array with pixels in the range 1 - 400 in the X an Y directions. +This has the effect of taking a contiguous set of pixel value in the +FITS array and writing them to a non-contiguous array in program memory +(i.e., there are now some blank pixels around the edge of the image in +the program array). + +The most general set of routines (ffpss\_, ffgsv\_, and ffgsf\_) may be +used to transfer a rectangular subset of the pixels in a FITS +N-dimensional image to or from an array which has been declared in the +calling program. The fpixel and lpixel parameters are integer arrays +which specify the starting and ending pixel coordinate in each dimension +(starting with 1, not 0) of the FITS image that is to be read or +written. It is important to note that these are the starting and +ending pixels in the FITS image, not in the declared array in the +program. The array parameter in these routines is treated simply as a +large one-dimensional array of the appropriate data type containing the +pixel values; The pixel values in the FITS array are read/written +from/to this program array in strict sequence without any gaps; it is +up to the calling routine to correctly interpret the dimensionality of +this array. The two FITS reading routines (ffgsv\_ and ffgsf\_ ) also +have an `inc' parameter which defines the data sampling interval in +each dimension of the FITS array. For example, if inc[0]=2 and +inc[1]=3 when reading a 2-dimensional FITS image, then only every other +pixel in the first dimension and every 3rd pixel in the second +dimension will be returned to the 'array' parameter. + +Two types of routines are provided to read the data array which differ in +the way undefined pixels are handled. The first type of routines (e.g., +ffgpv\_) simply return an array of data elements in which undefined +pixels are set equal to a value specified by the user in the `nulval' +parameter. An additional feature of these routines is that if the user +sets nulval = 0, then no checks for undefined pixels will be performed, +thus reducing the amount of CPU processing. The second type of routines +(e.g., ffgpf\_) returns the data element array and, in addition, a char +array that indicates whether the value of the corresponding data pixel +is undefined (= 1) or defined (= 0). The latter type of routines may +be more convenient to use in some circumstances, however, it requires +an additional array of logical values which can be unwieldy when working +with large data arrays. + +>1 Write elements into the FITS data array. +> \label{ffppr} \label{ffpprx} \label{ffppn} \label{ffppnx} +- + int fits_write_img / ffppr + (fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_img_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffppr[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, > int *status); + + int fits_write_imgnull / ffppn + (fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); + + int fits_write_imgnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffppn[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, DTYPE nulval, > int *status); +- +>>2 Set data array elements as undefined. \label{ffppru} +- + int fits_write_img_null / ffppru + (fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelements, + > int *status) +- +>3 Write values into group parameters. This routine only applies + to the `Random Grouped' FITS format which has been used for + applications in radio interferometry, but is officially deprecated +> for future use. \label{ffpgpx} +- + int fits_write_grppar_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpgp[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, int *status) +- +>>4 Write a 2-D or 3-D image into the data array. \label{ffp2dx} \label{ffp3dx} +- + int fits_write_2d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffp2d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG dim1, LONGLONG naxis1, + LONGLONG naxis2, DTYPE *array, > int *status) + + int fits_write_3d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffp3d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG dim1, LONGLONG dim2, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, DTYPE *array, > int *status) +- +>>5 Write an arbitrary data subsection into the data array. \label{ffpssx} +- + int fits_write_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpss[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, DTYPE *array, > int *status) +- +>6 Read elements from the FITS data array. +> \label{ffgpv} \label{ffgpvx} \label{ffgpf} \label{ffgpfx} +- + int fits_read_img / ffgpv + (fitsfile *fptr, int datatype, long firstelem, long nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_img_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgpv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + DTYPE nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_imgnull / ffgpf + (fitsfile *fptr, int datatype, long firstelem, long nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) + + int fits_read_imgnull_[byt, sht, usht, int, uint, lng, ulng, flt, dbl] / + ffgpf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) +- +>7 Read values from group parameters. This routine only applies + to the `Random Grouped' FITS format which has been used for + applications in radio interferometry, but is officially deprecated +> for future use. \label{ffggpx} +- + int fits_read_grppar_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffggp[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, int *status) +- +>8 Read 2-D or 3-D image from the data array. Undefined + pixels in the array will be set equal to the value of 'nulval', + unless nulval=0 in which case no testing for undefined pixels will +> be performed. \label{ffg2dx} \label{ffg3dx} +- + int fits_read_2d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffg2d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, DTYPE nulval, LONGLONG dim1, LONGLONG naxis1, + LONGLONG naxis2, > DTYPE *array, int *anynul, int *status) + + int fits_read_3d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffg3d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, DTYPE nulval, LONGLONG dim1, + LONGLONG dim2, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + > DTYPE *array, int *anynul, int *status) +- +>9 Read an arbitrary data subsection from the data array. +> \label{ffgsvx} \label{ffgsfx} +- + int fits_read_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int group, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, DTYPE nulval, + > DTYPE *array, int *anynul, int *status) + + int fits_read_subsetnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int group, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, > DTYPE *array, + char *nullarray, int *anynul, int *status) +- + +**F. Specialized FITS ASCII and Binary Table Routines + +***1. General Column Routines + +>1 Get information about an existing ASCII or binary table column. A null + pointer may be given for any of the output parameters that are not + needed. DATATYPE is a character string which returns the data type + of the column as defined by the TFORMn keyword (e.g., 'I', 'J','E', + 'D', etc.). In the case of an ASCII character column, typecode + will have a value of the form 'An' where 'n' is an integer + expressing the width of the field in characters. For example, if + TFORM = '160A8' then ffgbcl will return typechar='A8' and + repeat=20. All the returned parameters are scalar quantities. +> \label{ffgacl} \label{ffgbcl} +- + int fits_get_acolparms / ffgacl + (fitsfile *fptr, int colnum, > char *ttype, long *tbcol, + char *tunit, char *tform, double *scale, double *zero, + char *nulstr, char *tdisp, int *status) + + int fits_get_bcolparms / ffgbcl + (fitsfile *fptr, int colnum, > char *ttype, char *tunit, + char *typechar, long *repeat, double *scale, double *zero, + long *nulval, char *tdisp, int *status) + + int fits_get_bcolparmsll / ffgbclll + (fitsfile *fptr, int colnum, > char *ttype, char *tunit, + char *typechar, LONGLONG *repeat, double *scale, double *zero, + LONGLONG *nulval, char *tdisp, int *status) +- +>2 Return optimal number of rows to read or write at one time for + maximum I/O efficiency. Refer to the + ``Optimizing Code'' section in Chapter 5 for more discussion on how +> to use this routine. \label{ffgrsz} +- + int fits_get_rowsize / ffgrsz + (fitsfile *fptr, long *nrows, *status) +- +>3 Define the zero indexed byte offset of the 'heap' measured from + the start of the binary table data. By default the heap is assumed + to start immediately following the regular table data, i.e., at + location NAXIS1 x NAXIS2. This routine is only relevant for + binary tables which contain variable length array columns (with + TFORMn = 'Pt'). This routine also automatically writes + the value of theap to a keyword in the extension header. This + routine must be called after the required keywords have been + written (with ffphbn) +> but before any data is written to the table. \label{ffpthp} +- + int fits_write_theap / ffpthp + (fitsfile *fptr, long theap, > int *status) +- +>4 Test the contents of the binary table variable array heap, returning + the size of the heap, the number of unused bytes that are not currently + pointed to by any of the descriptors, and the number of bytes which are + pointed to by multiple descriptors. It also returns valid = FALSE if + any of the descriptors point to invalid addresses out of range of the +> heap. \label{fftheap} +- + int fits_test_heap / fftheap + (fitsfile *fptr, > LONGLONG *heapsize, LONGLONG *unused, LONGLONG *overlap, + int *validheap, int *status) +- +>5 Re-pack the vectors in the binary table variable array heap to recover + any unused space. Normally, when a vector in a variable length + array column is rewritten the previously written array remains in + the heap as wasted unused space. This routine will repack the + arrays that are still in use, thus eliminating any bytes in the + heap that are no longer in use. Note that if several vectors point + to the same bytes in the heap, then this routine will make + duplicate copies of the bytes for each vector, which will actually +> expand the size of the heap. \label{ffcmph} +- + int fits_compress_heap / ffcmph + (fitsfile *fptr, > int *status) +- + +***2. Low-Level Table Access Routines + +The following 2 routines provide low-level access to the data in ASCII +or binary tables and are mainly useful as an efficient way to copy all +or part of a table from one location to another. These routines simply +read or write the specified number of consecutive bytes in an ASCII or +binary table, without regard for column boundaries or the row length in +the table. These routines do not perform any machine dependent data +conversion or byte swapping. See Appendix B for the definition of the +parameters used in these routines. + +>1 Read or write a consecutive array of bytes from an ASCII or binary +> table \label{ffgtbb} \label{ffptbb} +- + int fits_read_tblbytes / ffgtbb + (fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + > unsigned char *values, int *status) + + int fits_write_tblbytes / ffptbb + (fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + unsigned char *values, > int *status) +- + +***3. Write Column Data Routines + +>1 Write elements into an ASCII or binary table column (in the CDU). + The data type of the array is implied by the suffix of the +> routine name. \label{ffpcls} +- + int fits_write_col_str / ffpcls + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char **array, > int *status) + + int fits_write_col_[log,byt,sht,usht,int,uint,lng,ulng,lnglng,flt,dbl,cmp,dblcmp] / + ffpcl[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, > int *status) +- +>2 Write elements into an ASCII or binary table column + substituting the appropriate FITS null value for any elements that +> are equal to the nulval parameter. \label{ffpcnx} +- + int fits_write_colnull_[log, byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpcn[l,b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, DTYPE nulval, > int *status) +- +>3 Write string elements into a binary table column (in the CDU) + substituting the FITS null value for any elements that +> are equal to the nulstr string. \label{ffpcns} +- + int fits_write_colnull_str / ffpcns + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char **array, char *nulstr, > int *status) +- +>4 Write bit values into a binary byte ('B') or bit ('X') table column (in + the CDU). Larray is an array of characters corresponding to the + sequence of bits to be written. If an element of larray is true + (not equal to zero) then the corresponding bit in the FITS table is + set to 1, otherwise the bit is set to 0. The 'X' column in a FITS + table is always padded out to a multiple of 8 bits where the bit + array starts with the most significant bit of the byte and works + down towards the 1's bit. For example, a '4X' array, with the + first bit = 1 and the remaining 3 bits = 0 is equivalent to the 8-bit + unsigned byte decimal value of 128 ('1000 0000B'). In the case of + 'X' columns, CFITSIO can write to all 8 bits of each byte whether + they are formally valid or not. Thus if the column is defined as + '4X', and one calls ffpclx with firstbit=1 and nbits=8, then all + 8 bits will be written into the first byte (as opposed to writing + the first 4 bits into the first row and then the next 4 bits into + the next row), even though the last 4 bits of each byte are formally + not defined and should all be set = 0. It should also be noted that + it is more efficient to write 'X' columns an entire byte at a time, + instead of bit by bit. Any of the CFITSIO routines that write to + columns (e.g. fits\_write\_col\_byt) may be used for this purpose. + These routines will interpret 'X' columns as though they were 'B' + columns (e.g., '1X' through '8X' is equivalent +> to '1B', and '9X' through '16X' is equivalent to '2B'). \label{ffpclx} +- + int fits_write_col_bit / ffpclx + (fitsfile *fptr, int colnum, LONGLONG firstrow, long firstbit, + long nbits, char *larray, > int *status) +- +>5 Write the descriptor for a variable length column in a binary table. + This routine can be used in conjunction with ffgdes to enable + 2 or more arrays to point to the same storage location to save +> storage space if the arrays are identical. \label{ffpdes} +- + int fits_write_descript / ffpdes + (fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG repeat, + LONGLONG offset, > int *status) +- +***4. Read Column Data Routines + +Two types of routines are provided to get the column data which differ +in the way undefined pixels are handled. The first set of routines +(ffgcv) simply return an array of data elements in which undefined +pixels are set equal to a value specified by the user in the 'nullval' +parameter. If nullval = 0, then no checks for undefined pixels will be +performed, thus increasing the speed of the program. The second set of +routines (ffgcf) returns the data element array and in addition a +logical array of flags which defines whether the corresponding data +pixel is undefined. See Appendix B for the definition of the +parameters used in these routines. + + Any column, regardless of it's intrinsic data type, may be read as a + string. It should be noted however that reading a numeric column as + a string is 10 - 100 times slower than reading the same column as a number + due to the large overhead in constructing the formatted strings. + The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + data type of the column. The length of the returned strings (not + including the null terminating character) can be determined with + the fits\_get\_col\_display\_width routine. The following TDISPn + display formats are currently supported: +- + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +- + where w is the width in characters of the displayed values, m is + the minimum number of digits displayed, and d is the number of + digits to the right of the decimal. The .m field is optional. + +>1 Read elements from an ASCII or binary table column (in the CDU). These + routines return the values of the table column array elements. Undefined + array elements will be returned with a value = nulval, unless nulval = 0 + (or = ' ' for ffgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned +> elements are undefined. \label{ffgcvx} +- + int fits_read_col_str / ffgcvs + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char *nulstr, > char **array, int *anynul, + int *status) + + int fits_read_col_[log,byt,sht,usht,int,uint,lng,ulng, lnglng, flt, dbl, cmp, dblcmp] / + ffgcv[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE nulval, > DTYPE *array, int *anynul, + int *status) +- +>2 Read elements and null flags from an ASCII or binary table column (in the + CHDU). These routines return the values of the table column array elements. + Any undefined array elements will have the corresponding nullarray element + set equal to TRUE. The anynul parameter is set to true if any of the +> returned elements are undefined. \label{ffgcfx} +- + int fits_read_colnull_str / ffgcfs + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, > char **array, char *nullarray, int *anynul, + int *status) + + int fits_read_colnull_[log,byt,sht,usht,int,uint,lng,ulng,lnglng,flt,dbl,cmp,dblcmp] / + ffgcf[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, > DTYPE *array, + char *nullarray, int *anynul, int *status) +- +>3 Read an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Undefined pixels + in the array will be set equal to the value of 'nulval', + unless nulval=0 in which case no testing for undefined pixels will + be performed. The first and last rows in the table to be read + are specified by fpixel(naxis+1) and lpixel(naxis+1), and hence + are treated as the next higher dimension of the FITS N-dimensional + array. The INC parameter specifies the sampling interval in +> each dimension between the data elements that will be returned. \label{ffgsvx2} +- + int fits_read_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, int naxis, long *naxes, long *fpixel, + long *lpixel, long *inc, DTYPE nulval, > DTYPE *array, int *anynul, + int *status) +- +>4 Read an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Any Undefined + pixels in the array will have the corresponding 'nullarray' + element set equal to TRUE. The first and last rows in the table + to be read are specified by fpixel(naxis+1) and lpixel(naxis+1), + and hence are treated as the next higher dimension of the FITS + N-dimensional array. The INC parameter specifies the sampling + interval in each dimension between the data elements that will be +> returned. \label{ffgsfx2} +- + int fits_read_subsetnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, > DTYPE *array, + char *nullarray, int *anynul, int *status) +- +>5 Read bit values from a byte ('B') or bit (`X`) table column (in the + CDU). Larray is an array of logical values corresponding to the + sequence of bits to be read. If larray is true then the + corresponding bit was set to 1, otherwise the bit was set to 0. + The 'X' column in a FITS table is always padded out to a multiple + of 8 bits where the bit array starts with the most significant bit + of the byte and works down towards the 1's bit. For example, a + '4X' array, with the first bit = 1 and the remaining 3 bits = 0 is + equivalent to the 8-bit unsigned byte value of 128. + Note that in the case of 'X' columns, CFITSIO can read all 8 bits + of each byte whether they are formally valid or not. Thus if the + column is defined as '4X', and one calls ffgcx with firstbit=1 and + nbits=8, then all 8 bits will be read from the first byte (as + opposed to reading the first 4 bits from the first row and then the + first 4 bits from the next row), even though the last 4 bits of + each byte are formally not defined. It should also be noted that + it is more efficient to read 'X' columns an entire byte at a time, + instead of bit by bit. Any of the CFITSIO routines that read + columns (e.g. fits\_read\_col\_byt) may be used for this + purpose. These routines will interpret 'X' columns as though they + were 'B' columns (e.g., '8X' is equivalent to '1B', and '16X' is +> equivalent to '2B'). \label{ffgcx} +- + int fits_read_col_bit / ffgcx + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstbit, + LONGLONG nbits, > char *larray, int *status) +- +>6 Read any consecutive set of bits from an 'X' or 'B' column and + interpret them as an unsigned n-bit integer. nbits must be less + than 16 or 32 in ffgcxui and ffgcxuk, respectively. If nrows + is greater than 1, then the same set of bits will be read from + each row, starting with firstrow. The bits are numbered with + 1 = the most significant bit of the first element of the column. +> \label{ffgcxui} +- + int fits_read_col_bit_[usht, uint] / ffgcx[ui,uk] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG, nrows, + long firstbit, long nbits, > DTYPE *array, int *status) +- +>7 Return the descriptor for a variable length column in a binary table. + The descriptor consists of 2 integer parameters: the number of elements + in the array and the starting offset relative to the start of the heap. + The first pair of routine returns a single descriptor whereas the second + pair of routine + returns the descriptors for a range of rows in the table. The only + difference between the 2 routines in each pair is that one returns + the parameters as 'long' integers, whereas the other returns the values + as 64-bit 'LONGLONG' integers. +> \label{ffgdes} +- + int fits_read_descript / ffgdes + (fitsfile *fptr, int colnum, LONGLONG rownum, > long *repeat, + long *offset, int *status) + + int fits_read_descriptll / ffgdesll + (fitsfile *fptr, int colnum, LONGLONG rownum, > LONGLONG *repeat, + LONGLONG *offset, int *status) + + int fits_read_descripts / ffgdess + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows + > long *repeat, long *offset, int *status) + + int fits_read_descriptsll / ffgdessll + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows + > LONGLONG *repeat, LONGLONG *offset, int *status) +- + +*X. Extended File Name Syntax + +**A. Overview + +CFITSIO supports an extended syntax when specifying the name of the +data file to be opened or created that includes the following +features: + +\begin{itemize} +\item +CFITSIO can read IRAF format images which have header file names that +end with the '.imh' extension, as well as reading and writing FITS +files, This feature is implemented in CFITSIO by first converting the +IRAF image into a temporary FITS format file in memory, then opening +the FITS file. Any of the usual CFITSIO routines then may be used to +read the image header or data. Similarly, raw binary data arrays can +be read by converting them on the fly into virtual FITS images. + +\item +FITS files on the internet can be read (and sometimes written) using the FTP, +HTTP, or ROOT protocols. + +\item +FITS files can be piped between tasks on the stdin and stdout streams. + +\item +FITS files can be read and written in shared memory. This can +potentially achieve better data I/O performance compared to reading and +writing the same FITS files on magnetic disk. + +\item +Compressed FITS files in gzip or Unix COMPRESS format can be directly read. + +\item +Output FITS files can be written directly in compressed gzip format, +thus saving disk space. + +\item +FITS table columns can be created, modified, or deleted 'on-the-fly' as +the table is opened by CFITSIO. This creates a virtual FITS file containing +the modifications that is then opened by the application program. + +\item +Table rows may be selected, or filtered out, on the fly when the table +is opened by CFITSIO, based on an user-specified expression. +Only rows for which the expression evaluates to 'TRUE' are retained +in the copy of the table that is opened by the application program. + +\item +Histogram images may be created on the fly by binning the values in +table columns, resulting in a virtual N-dimensional FITS image. The +application program then only sees the FITS image (in the primary +array) instead of the original FITS table. +\end{itemize} + +The latter 3 table filtering features in particular add very powerful +data processing capabilities directly into CFITSIO, and hence into +every task that uses CFITSIO to read or write FITS files. For example, +these features transform a very simple program that just copies an +input FITS file to a new output file (like the `fitscopy' program that +is distributed with CFITSIO) into a multipurpose FITS file processing +tool. By appending fairly simple qualifiers onto the name of the input +FITS file, the user can perform quite complex table editing operations +(e.g., create new columns, or filter out rows in a table) or create +FITS images by binning or histogramming the values in table columns. +In addition, these functions have been coded using new state-of-the art +algorithms that are, in some cases, 10 - 100 times faster than previous +widely used implementations. + +Before describing the complete syntax for the extended FITS file names +in the next section, here are a few examples of FITS file names that +give a quick overview of the allowed syntax: + +\begin{itemize} +\item +{\tt myfile.fits}: the simplest case of a FITS file on disk in the current +directory. + +\item +{\tt myfile.imh}: opens an IRAF format image file and converts it on the +fly into a temporary FITS format image in memory which can then be read with +any other CFITSIO routine. + +\item +{\tt rawfile.dat[i512,512]}: opens a raw binary data array (a 512 x 512 +short integer array in this case) and converts it on the fly into a +temporary FITS format image in memory which can then be read with any +other CFITSIO routine. + +\item +{\tt myfile.fits.gz}: if this is the name of a new output file, the '.gz' +suffix will cause it to be compressed in gzip format when it is written to +disk. + +\item +{\tt myfile.fits.gz[events, 2]}: opens and uncompresses the gzipped file +myfile.fits then moves to the extension with the keywords EXTNAME += 'EVENTS' and EXTVER = 2. + +\item +{\tt -}: a dash (minus sign) signifies that the input file is to be read +from the stdin file stream, or that the output file is to be written to +the stdout stream. + +\item +{\tt ftp://legacy.gsfc.nasa.gov/test/vela.fits}: FITS files in any ftp +archive site on the internet may be directly opened with read-only +access. + +\item +{\tt http://legacy.gsfc.nasa.gov/software/test.fits}: any valid URL to a +FITS file on the Web may be opened with read-only access. + +\item +{\tt root://legacy.gsfc.nasa.gov/test/vela.fits}: similar to ftp access +except that it provides write as well as read access to the files +across the network. This uses the root protocol developed at CERN. + +\item +{\tt shmem://h2[events]}: opens the FITS file in a shared memory segment and +moves to the EVENTS extension. + +\item +{\tt mem://}: creates a scratch output file in core computer memory. The +resulting 'file' will disappear when the program exits, so this +is mainly useful for testing purposes when one does not want a +permanent copy of the output file. + +\item +{\tt myfile.fits[3; Images(10)]}: opens a copy of the image contained in the +10th row of the 'Images' column in the binary table in the 3th extension +of the FITS file. The virtual file that is opened by the application just +contains this single image in the primary array. + +\item +{\tt myfile.fits[1:512:2, 1:512:2]}: opens a section of the input image +ranging from the 1st to the 512th pixel in X and Y, and selects every +second pixel in both dimensions, resulting in a 256 x 256 pixel input image +in this case. + +\item +{\tt myfile.fits[EVENTS][col Rad = sqrt(X**2 + Y**2)]}: creates and opens +a virtual file on the fly that is identical to +myfile.fits except that it will contain a new column in the EVENTS +extension called 'Rad' whose value is computed using the indicated +expression which is a function of the values in the X and Y columns. + +\item +{\tt myfile.fits[EVENTS][PHA > 5]}: creates and opens a virtual FITS +files that is identical to 'myfile.fits' except that the EVENTS table +will only contain the rows that have values of the PHA column greater +than 5. In general, any arbitrary boolean expression using a C or +Fortran-like syntax, which may combine AND and OR operators, +may be used to select rows from a table. + +\item +{\tt myfile.fits[EVENTS][bin (X,Y)=1,2048,4]}: creates a temporary FITS +primary array image which is computed on the fly by binning (i.e, +computing the 2-dimensional histogram) of the values in the X and Y +columns of the EVENTS extension. In this case the X and Y coordinates +range from 1 to 2048 and the image pixel size is 4 units in both +dimensions, so the resulting image is 512 x 512 pixels in size. + +\item +The final example combines many of these feature into one complex +expression (it is broken into several lines for clarity): +- + ftp://legacy.gsfc.nasa.gov/data/sample.fits.gz[EVENTS] + [col phacorr = pha * 1.1 - 0.3][phacorr >= 5.0 && phacorr <= 14.0] + [bin (X,Y)=32] +- +In this case, CFITSIO (1) copies and uncompresses the FITS file from +the ftp site on the legacy machine, (2) moves to the 'EVENTS' +extension, (3) calculates a new column called 'phacorr', (4) selects +the rows in the table that have phacorr in the range 5 to 14, and +finally (5) bins the remaining rows on the X and Y column coordinates, +using a pixel size = 32 to create a 2D image. All this processing is +completely transparent to the application program, which simply sees +the final 2-D image in the primary array of the opened file. +\end{itemize} + +The full extended CFITSIO FITS file name can contain several different +components depending on the context. These components are described in +the following sections: +- +When creating a new file: + filetype://BaseFilename(templateName)[compress] + +When opening an existing primary array or image HDU: + filetype://BaseFilename(outName)[HDUlocation][ImageSection][pixFilter] + +When opening an existing table HDU: + filetype://BaseFilename(outName)[HDUlocation][colFilter][rowFilter][binSpec] +- +The filetype, BaseFilename, outName, HDUlocation, ImageSection, and pixFilter +components, if present, must be given in that order, but the colFilter, +rowFilter, and binSpec specifiers may follow in any order. Regardless +of the order, however, the colFilter specifier, if present, will be +processed first by CFITSIO, followed by the rowFilter specifier, and +finally by the binSpec specifier. + +**A. Filetype + +The type of file determines the medium on which the file is located +(e.g., disk or network) and, hence, which internal device driver is used by +CFITSIO to read and/or write the file. Currently supported types are +- + file:// - file on local magnetic disk (default) + ftp:// - a readonly file accessed with the anonymous FTP protocol. + It also supports ftp://username:password@hostname/... + for accessing password-protected ftp sites. + http:// - a readonly file accessed with the HTTP protocol. It + does not support username:password like the ftp driver. + Proxy HTTP survers are supported using the http_proxy + environment variable. + gsiftp:// - to access files on a computational grid using the + gridftp protocol in the Globus toolkit + root:// - uses the CERN root protocol for writing as well as + reading files over the network. + shmem:// - opens or creates a file which persists in the computer's + shared memory. + mem:// - opens a temporary file in core memory. The file + disappears when the program exits so this is mainly + useful for test purposes when a permanent output file + is not desired. +- +If the filetype is not specified, then type file:// is assumed. +The double slashes '//' are optional and may be omitted in most cases. + +***1. Notes about HTTP proxy servers + +A proxy HTTP server may be used by defining the address (URL) and port +number of the proxy server with the http\_proxy environment variable. +For example +- + setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 +- +will cause CFITSIO to use port 3128 on the heasarc proxy server whenever +reading a FITS file with HTTP. + +***2. Notes about the gsiftp filetype + +DEPENDENCIES: Globus toolkit (2.4.3 or higher) (GT) should be installed. +There are two different ways to install GT: + +1) goto the globus toolkit web page www.globus.org and follow the + download and compilation instructions; + +2) goto the Virtual Data Toolkit web page http://vdt.cs.wisc.edu/ + and follow the instructions (STRONGLY SUGGESTED); + +Once a globus client has been installed in your system with a specific flavour +it is possible to compile and install the CFITSIO libraries. +Specific configuration flags must be used: + +1) --with-gsiftp[[=PATH]] Enable Globus Toolkit gsiftp protocol support + PATH=GLOBUS\_LOCATION i.e. the location of your globus installation + +2) --with-gsiftp-flavour[[=PATH] defines the specific Globus flavour + ex. gcc32 + +Both the flags must be used and it is mandatory to set both the PATH and the +flavour. + +USAGE: To access files on a gridftp server it is necessary to use a gsiftp prefix: + +example: gsiftp://remote\_server\_fqhn/directory/filename + +The gridftp driver uses a local buffer on a temporary file the file is located +in the /tmp directory. If you have special permissions on /tmp or you do not have a /tmp +directory, it is possible to force another location setting the GSIFTP\_TMPFILE environment +variable (ex. export GSIFTP\_TMPFILE=/your/location/yourtmpfile). + +Grid FTP supports multi channel transfer. By default a single channel transmission is +available. However, it is possible to modify this behavior setting the GSIFTP\_STREAMS +environment variable (ex. export GSIFTP\_STREAMS=8). + + +***3. Notes about the root filetype + +The original rootd server can be obtained from: +\verb-ftp://root.cern.ch/root/rootd.tar.gz- +but, for it to work correctly with CFITSIO one has to use a modified +version which supports a command to return the length of the file. +This modified version is available in rootd subdirectory +in the CFITSIO ftp area at +- + ftp://legacy.gsfc.nasa.gov/software/fitsio/c/root/rootd.tar.gz. +- + +This small server is started either by inetd when a client requests a +connection to a rootd server or by hand (i.e. from the command line). +The rootd server works with the ROOT TNetFile class. It allows remote +access to ROOT database files in either read or write mode. By default +TNetFile assumes port 432 (which requires rootd to be started as root). +To run rootd via inetd add the following line to /etc/services: +- + rootd 432/tcp +- +and to /etc/inetd.conf, add the following line: +- + rootd stream tcp nowait root /user/rdm/root/bin/rootd rootd -i +- +Force inetd to reread its conf file with \verb+kill -HUP +. +You can also start rootd by hand running directly under your private +account (no root system privileges needed). For example to start +rootd listening on port 5151 just type: \verb+rootd -p 5151+ +Notice that no \& is needed. Rootd will go into background by itself. +- + Rootd arguments: + -i says we were started by inetd + -p port# specifies a different port to listen on + -d level level of debug info written to syslog + 0 = no debug (default) + 1 = minimum + 2 = medium + 3 = maximum +- +Rootd can also be configured for anonymous usage (like anonymous ftp). +To setup rootd to accept anonymous logins do the following (while being +logged in as root): +- + - Add the following line to /etc/passwd: + + rootd:*:71:72:Anonymous rootd:/var/spool/rootd:/bin/false + + where you may modify the uid, gid (71, 72) and the home directory + to suite your system. + + - Add the following line to /etc/group: + + rootd:*:72:rootd + + where the gid must match the gid in /etc/passwd. + + - Create the directories: + + mkdir /var/spool/rootd + mkdir /var/spool/rootd/tmp + chmod 777 /var/spool/rootd/tmp + + Where /var/spool/rootd must match the rootd home directory as + specified in the rootd /etc/passwd entry. + + - To make writeable directories for anonymous do, for example: + + mkdir /var/spool/rootd/pub + chown rootd:rootd /var/spool/rootd/pub +- +That's all. Several additional remarks: you can login to an anonymous +server either with the names "anonymous" or "rootd". The password should +be of type user@host.do.main. Only the @ is enforced for the time +being. In anonymous mode the top of the file tree is set to the rootd +home directory, therefore only files below the home directory can be +accessed. Anonymous mode only works when the server is started via +inetd. + +***4. Notes about the shmem filetype: + +Shared memory files are currently supported on most Unix platforms, +where the shared memory segments are managed by the operating system +kernel and `live' independently of processes. They are not deleted (by +default) when the process which created them terminates, although they +will disappear if the system is rebooted. Applications can create +shared memory files in CFITSIO by calling: +- + fit_create_file(&fitsfileptr, "shmem://h2", &status); +- +where the root `file' names are currently restricted to be 'h0', 'h1', +'h2', 'h3', etc., up to a maximum number defined by the the value of +SHARED\_MAXSEG (equal to 16 by default). This is a prototype +implementation of the shared memory interface and a more robust +interface, which will have fewer restrictions on the number of files +and on their names, may be developed in the future. + +When opening an already existing FITS file in shared memory one calls +the usual CFITSIO routine: +- + fits_open_file(&fitsfileptr, "shmem://h7", mode, &status) +- +The file mode can be READWRITE or READONLY just as with disk files. +More than one process can operate on READONLY mode files at the same +time. CFITSIO supports proper file locking (both in READONLY and +READWRITE modes), so calls to fits\_open\_file may be locked out until +another other process closes the file. + +When an application is finished accessing a FITS file in a shared +memory segment, it may close it (and the file will remain in the +system) with fits\_close\_file, or delete it with fits\_delete\_file. +Physical deletion is postponed until the last process calls +ffclos/ffdelt. fits\_delete\_file tries to obtain a READWRITE lock on +the file to be deleted, thus it can be blocked if the object was not +opened in READWRITE mode. + +A shared memory management utility program called `smem', is included +with the CFITSIO distribution. It can be built by typing `make smem'; +then type `smem -h' to get a list of valid options. Executing smem +without any options causes it to list all the shared memory segments +currently residing in the system and managed by the shared memory +driver. To get a list of all the shared memory objects, run the system +utility program `ipcs [-a]'. + +**B. Base Filename + +The base filename is the name of the file optionally including the +director/subdirectory path, and in the case of `ftp', `http', and `root' +filetypes, the machine identifier. Examples: +- + myfile.fits + !data.fits + /data/myfile.fits + fits.gsfc.nasa.gov/ftp/sampledata/myfile.fits.gz +- + +When creating a new output file on magnetic disk (of type file://) if +the base filename begins with an exclamation point (!) then any +existing file with that same basename will be deleted prior to creating +the new FITS file. Otherwise if the file to be created already exists, +then CFITSIO will return an error and will not overwrite the existing +file. Note that the exclamation point, '!', is a special UNIX +character, so if it is used on the command line rather than entered at +a task prompt, it must be preceded by a backslash to force the UNIX +shell to pass it verbatim to the application program. + +If the output disk file name ends with the suffix '.gz', then CFITSIO +will compress the file using the gzip compression algorithm before +writing it to disk. This can reduce the amount of disk space used by +the file. Note that this feature requires that the uncompressed file +be constructed in memory before it is compressed and written to disk, +so it can fail if there is insufficient available memory. + +An input FITS file may be compressed with the gzip or Unix compress +algorithms, in which case CFITSIO will uncompress the file on the fly +into a temporary file (in memory or on disk). Compressed files may +only be opened with read-only permission. When specifying the name of +a compressed FITS file it is not necessary to append the file suffix +(e.g., `.gz' or `.Z'). If CFITSIO cannot find the input file name +without the suffix, then it will automatically search for a compressed +file with the same root name. In the case of reading ftp and http type +files, CFITSIO generally looks for a compressed version of the file +first, before trying to open the uncompressed file. By default, +CFITSIO copies (and uncompressed if necessary) the ftp or http FITS +file into memory on the local machine before opening it. This will +fail if the local machine does not have enough memory to hold the whole +FITS file, so in this case, the output filename specifier (see the next +section) can be used to further control how CFITSIO reads ftp and http +files. + +If the input file is an IRAF image file (*.imh file) then CFITSIO will +automatically convert it on the fly into a virtual FITS image before it +is opened by the application program. IRAF images can only be opened +with READONLY file access. + +Similarly, if the input file is a raw binary data array, then CFITSIO +will convert it on the fly into a virtual FITS image with the basic set +of required header keywords before it is opened by the application +program (with READONLY access). In this case the data type and +dimensions of the image must be specified in square brackets following +the filename (e.g. rawfile.dat[ib512,512]). The first character (case +insensitive) defines the data type of the array: +- + b 8-bit unsigned byte + i 16-bit signed integer + u 16-bit unsigned integer + j 32-bit signed integer + r or f 32-bit floating point + d 64-bit floating point +- +An optional second character specifies the byte order of the array +values: b or B indicates big endian (as in FITS files and the native +format of SUN UNIX workstations and Mac PCs) and l or L indicates +little endian (native format of DEC OSF workstations and IBM PCs). If +this character is omitted then the array is assumed to have the native +byte order of the local machine. These data type characters are then +followed by a series of one or more integer values separated by commas +which define the size of each dimension of the raw array. Arrays with +up to 5 dimensions are currently supported. Finally, a byte offset to +the position of the first pixel in the data file may be specified by +separating it with a ':' from the last dimension value. If omitted, it +is assumed that the offset = 0. This parameter may be used to skip +over any header information in the file that precedes the binary data. +Further examples: +- + raw.dat[b10000] 1-dimensional 10000 pixel byte array + raw.dat[rb400,400,12] 3-dimensional floating point big-endian array + img.fits[ib512,512:2880] reads the 512 x 512 short integer array in + a FITS file, skipping over the 2880 byte header +- + +One special case of input file is where the filename = `-' (a dash or +minus sign) or 'stdin' or 'stdout', which signifies that the input file +is to be read from the stdin stream, or written to the stdout stream if +a new output file is being created. In the case of reading from stdin, +CFITSIO first copies the whole stream into a temporary FITS file (in +memory or on disk), and subsequent reading of the FITS file occurs in +this copy. When writing to stdout, CFITSIO first constructs the whole +file in memory (since random access is required), then flushes it out +to the stdout stream when the file is closed. In addition, if the +output filename = '-.gz' or 'stdout.gz' then it will be gzip compressed +before being written to stdout. + +This ability to read and write on the stdin and stdout steams allows +FITS files to be piped between tasks in memory rather than having to +create temporary intermediate FITS files on disk. For example if task1 +creates an output FITS file, and task2 reads an input FITS file, the +FITS file may be piped between the 2 tasks by specifying +- + task1 - | task2 - +- +where the vertical bar is the Unix piping symbol. This assumes that the 2 +tasks read the name of the FITS file off of the command line. + +**C. Output File Name when Opening an Existing File + +An optional output filename may be specified in parentheses immediately +following the base file name to be opened. This is mainly useful in +those cases where CFITSIO creates a temporary copy of the input FITS +file before it is opened and passed to the application program. This +happens by default when opening a network FTP or HTTP-type file, when +reading a compressed FITS file on a local disk, when reading from the +stdin stream, or when a column filter, row filter, or binning specifier +is included as part of the input file specification. By default this +temporary file is created in memory. If there is not enough memory to +create the file copy, then CFITSIO will exit with an error. In these +cases one can force a permanent file to be created on disk, instead of +a temporary file in memory, by supplying the name in parentheses +immediately following the base file name. The output filename can +include the '!' clobber flag. + +Thus, if the input filename to CFITSIO is: +\verb+file1.fits.gz(file2.fits)+ +then CFITSIO will uncompress `file1.fits.gz' into the local disk file +`file2.fits' before opening it. CFITSIO does not automatically delete +the output file, so it will still exist after the application program +exits. + +The output filename "mem://" is also allowed, which will write the +output file into memory, and also allow write access to the file. This +'file' will disappear when it is closed, but this may be useful for +some applications which only need to modify a temporary copy of the file. + +In some cases, several different temporary FITS files will be created +in sequence, for instance, if one opens a remote file using FTP, then +filters rows in a binary table extension, then create an image by +binning a pair of columns. In this case, the remote file will be +copied to a temporary local file, then a second temporary file will be +created containing the filtered rows of the table, and finally a third +temporary file containing the binned image will be created. In cases +like this where multiple files are created, the outfile specifier will +be interpreted the name of the final file as described below, in descending +priority: + +\begin{itemize} +\item +as the name of the final image file if an image within a single binary +table cell is opened or if an image is created by binning a table column. +\item +as the name of the file containing the filtered table if a column filter +and/or a row filter are specified. +\item +as the name of the local copy of the remote FTP or HTTP file. +\item +as the name of the uncompressed version of the FITS file, if a +compressed FITS file on local disk has been opened. +\item +otherwise, the output filename is ignored. +\end{itemize} + +The output file specifier is useful when reading FTP or HTTP-type +FITS files since it can be used to create a local disk copy of the file +that can be reused in the future. If the output file name = `*' then a +local file with the same name as the network file will be created. +Note that CFITSIO will behave differently depending on whether the +remote file is compressed or not as shown by the following examples: +\begin{itemize} +\item +\verb+ftp://remote.machine/tmp/myfile.fits.gz(*)+ - the remote compressed +file is copied to the local compressed file `myfile.fits.gz', which +is then uncompressed in local memory before being opened and passed +to the application program. + +\item +\verb+ftp://remote.machine/tmp/myfile.fits.gz(myfile.fits)+ - the +remote compressed file is copied and uncompressed into the local file +`myfile.fits'. This example requires less local memory than the +previous example since the file is uncompressed on disk instead of in +memory. + +\item +\verb+ftp://remote.machine/tmp/myfile.fits(myfile.fits.gz)+ - this will +usually produce an error since CFITSIO itself cannot compress files. +\end{itemize} + +The exact behavior of CFITSIO in the latter case depends on the type of +ftp server running on the remote machine and how it is configured. In +some cases, if the file `myfile.fits.gz' exists on the remote machine, +then the server will copy it to the local machine. In other cases the +ftp server will automatically create and transmit a compressed version +of the file if only the uncompressed version exists. This can get +rather confusing, so users should use a certain amount of caution when +using the output file specifier with FTP or HTTP file types, to make +sure they get the behavior that they expect. + +**D. Template File Name when Creating a New File + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following Template Files chapter. + +**E. Image Tile-Compression Specification + +When specifying the name of the output FITS file to be created, the +user can indicate that images should be written in tile-compressed +format (see section 5.5, ``Primary Array or IMAGE Extension I/O +Routines'') by enclosing the compression parameters in square brackets +following the root disk file name. Here are some examples of the +syntax for specifying tile-compressed output images: +- + myfile.fit[compress] - use Rice algorithm and default tile size + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + + myfile.fit[compress Rice 100,100] - use 100 x 100 pixel tile size + myfile.fit[compress Rice 100,100;2] - as above, and use noisebits = 2 +- + +**F. HDU Location Specification + +The optional HDU location specifier defines which HDU (Header-Data +Unit, also known as an `extension') within the FITS file to initially +open. It must immediately follow the base file name (or the output +file name if present). If it is not specified then the first HDU (the +primary array) is opened. The HDU location specifier is required if +the colFilter, rowFilter, or binSpec specifiers are present, because +the primary array is not a valid HDU for these operations. The HDU may +be specified either by absolute position number, starting with 0 for +the primary array, or by reference to the HDU name, and optionally, the +version number and the HDU type of the desired extension. The location +of an image within a single cell of a binary table may also be +specified, as described below. + +The absolute position of the extension is specified either by enclosed +the number in square brackets (e.g., `[1]' = the first extension +following the primary array) or by preceded the number with a plus sign +(`+1'). To specify the HDU by name, give the name of the desired HDU +(the value of the EXTNAME or HDUNAME keyword) and optionally the +extension version number (value of the EXTVER keyword) and the +extension type (value of the XTENSION keyword: IMAGE, ASCII or TABLE, +or BINTABLE), separated by commas and all enclosed in square brackets. +If the value of EXTVER and XTENSION are not specified, then the first +extension with the correct value of EXTNAME is opened. The extension +name and type are not case sensitive, and the extension type may be +abbreviated to a single letter (e.g., I = IMAGE extension or primary +array, A or T = ASCII table extension, and B = binary table BINTABLE +extension). If the HDU location specifier is equal to `[PRIMARY]' or +`[P]', then the primary array (the first HDU) will be opened. + +FITS images are most commonly stored in the primary array or an image +extension, but images can also be stored as a vector in a single cell +of a binary table (i.e. each row of the vector column contains a +different image). Such an image can be opened with CFITSIO by +specifying the desired column name and the row number after the binary +table HDU specifier as shown in the following examples. The column name +is separated from the HDU specifier by a semicolon and the row number +is enclosed in parentheses. In this case CFITSIO copies the image from +the table cell into a temporary primary array before it is opened. The +application program then just sees the image in the primary array, +without any extensions. The particular row to be opened may be +specified either by giving an absolute integer row number (starting +with 1 for the first row), or by specifying a boolean expression that +evaluates to TRUE for the desired row. The first row that satisfies +the expression will be used. The row selection expression has the same +syntax as described in the Row Filter Specifier section, below. + + Examples: +- + myfile.fits[3] - open the 3rd HDU following the primary array + myfile.fits+3 - same as above, but using the FTOOLS-style notation + myfile.fits[EVENTS] - open the extension that has EXTNAME = 'EVENTS' + myfile.fits[EVENTS, 2] - same as above, but also requires EXTVER = 2 + myfile.fits[events,2,b] - same, but also requires XTENSION = 'BINTABLE' + myfile.fits[3; images(17)] - opens the image in row 17 of the 'images' + column in the 3rd extension of the file. + myfile.fits[3; images(exposure > 100)] - as above, but opens the image + in the first row that has an 'exposure' column value + greater than 100. +- + +**G. Image Section + +A virtual file containing a rectangular subsection of an image can be +extracted and opened by specifying the range of pixels (start:end) +along each axis to be extracted from the original image. One can also +specify an optional pixel increment (start:end:step) for each axis of +the input image. A pixel step = 1 will be assumed if it is not +specified. If the start pixel is larger then the end pixel, then the +image will be flipped (producing a mirror image) along that dimension. +An asterisk, '*', may be used to specify the entire range of an axis, +and '-*' will flip the entire axis. The input image can be in the +primary array, in an image extension, or contained in a vector cell of +a binary table. In the later 2 cases the extension name or number must +be specified before the image section specifier. + + Examples: +- + myfile.fits[1:512:2, 2:512:2] - open a 256x256 pixel image + consisting of the odd numbered columns (1st axis) and + the even numbered rows (2nd axis) of the image in the + primary array of the file. + + myfile.fits[*, 512:256] - open an image consisting of all the columns + in the input image, but only rows 256 through 512. + The image will be flipped along the 2nd axis since + the starting pixel is greater than the ending pixel. + + myfile.fits[*:2, 512:256:2] - same as above but keeping only + every other row and column in the input image. + + myfile.fits[-*, *] - copy the entire image, flipping it along + the first axis. + + myfile.fits[3][1:256,1:256] - opens a subsection of the image that + is in the 3rd extension of the file. + + myfile.fits[4; images(12)][1:10,1:10] - open an image consisting + of the first 10 pixels in both dimensions. The original + image resides in the 12th row of the 'images' vector + column in the table in the 4th extension of the file. +- + +When CFITSIO opens an image section it first creates a temporary file +containing the image section plus a copy of any other HDUs in the +file. This temporary file is then opened by the application program, +so it is not possible to write to or modify the input file when +specifying an image section. Note that CFITSIO automatically updates +the world coordinate system keywords in the header of the image +section, if they exist, so that the coordinate associated with each +pixel in the image section will be computed correctly. + +**H. Image Transform Filters + +CFITSIO can apply a user-specified mathematical function to the value +of every pixel in a FITS image, thus creating a new virtual image +in computer memory that is then opened and read by the application +program. The original FITS image is not modified by this process. + +The image tranformation specifier is appended to the input +FITS file name and is enclosed in square brackets. It begins with the +letters 'PIX' to distinguish it from other types of FITS file filters +that are recognized by CFITSIO. The image transforming function may +use any of the mathmatical operators listed in the following +'Row Filtering Specification' section of this document. +Some examples of image transform filters are: +- + [pix X * 2.0] - multiply each pixel by 2.0 + [pix sqrt(X)] - take the square root of each pixel + [pix X + #ZEROPT - add the value of the ZEROPT keyword + [pix X>0 ? log10(X) : -99.] - if the pixel value is greater + than 0, compute the base 10 log, + else set the pixel = -99. +- +Use the letter 'X' in the expression to represent the current pixel value +in the image. The expression is evaluated +independently for each pixel in the image and may be a function of 1) the +original pixel value, 2) the value of other pixels in the image at +a given relative offset from the position of the pixel that is being +evaluated, and 3) the value of +any header keywords. Header keyword values are represented +by the name of the keyword preceded by the '\#' sign. + + +To access the the value of adjacent pixels in the image, +specify the (1-D) offset from the current pixel in curly brackets. +For example +- + [pix (x{-1} + x + x{+1}) / 3] +- +will replace each pixel value with the running mean of the values of that +pixel and it's 2 neighboring pixels. Note that in this notation the image +is treated as a 1-D array, where each row of the image (or higher dimensional +cube) is appended one after another in one long array of pixels. +It is possible to refer to pixels +in the rows above or below the current pixel by using the value of the +NAXIS1 header keyword. For example +- + [pix (x{-#NAXIS1} + x + x{#NAXIS1}) / 3] +- +will compute the mean of each image pixel and the pixels immediately +above and below it in the adjacent rows of the image. +The following more complex example +creates a smoothed virtual image where each pixel +is a 3 x 3 boxcar average of the input image pixels: +- + [pix (X + X{-1} + X{+1} + + X{-#NAXIS1} + X{-#NAXIS1 - 1} + X{-#NAXIS1 + 1} + + X{#NAXIS1} + X{#NAXIS1 - 1} + X{#NAXIS1 + 1}) / 9.] +- +If the pixel offset +extends beyond the first or last pixel in the image, the function will +evaluate to undefined, or NULL. + +For complex or commonly used image filtering operations, +one can write the expression into an external text file and +then import it into the +filter using the syntax '[pix @filename.txt]'. The mathematical +expression can +extend over multiple lines of text in the file. +Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +By default, the datatype of the resulting image will be the same as +the original image, but one may force a different datatype by appended +a code letter to the 'pix' keyword: +- + pixb - 8-bit byte image with BITPIX = 8 + pixi - 16-bit integer image with BITPIX = 16 + pixj - 32-bit integer image with BITPIX = 32 + pixr - 32-bit float image with BITPIX = -32 + pixd - 64-bit float image with BITPIX = -64 +- +Also by default, any other HDUs in the input file will be copied without +change to the +output virtual FITS file, but one may discard the other HDUs by adding +the number '1' to the 'pix' keyword (and following any optional datatype code +letter). For example: +- + myfile.fits[3][pixr1 sqrt(X)] +- +will create a virtual FITS file containing only a primary array image +with 32-bit floating point pixels that have a value equal to the square +root of the pixels in the image that is in the 3rd extension +of the 'myfile.fits' file. + + +**I. Column and Keyword Filtering Specification + +The optional column/keyword filtering specifier is used to modify the +column structure and/or the header keywords in the HDU that was +selected with the previous HDU location specifier. This filtering +specifier must be enclosed in square brackets and can be distinguished +from a general row filter specifier (described below) by the fact that +it begins with the string 'col ' and is not immediately followed by an +equals sign. The original file is not changed by this filtering +operation, and instead the modifications are made on a copy of the +input FITS file (usually in memory), which also contains a copy of all +the other HDUs in the file. This temporary file is passed to the +application program and will persist only until the file is closed or +until the program exits, unless the outfile specifier (see above) is +also supplied. + +The column/keyword filter can be used to perform the following +operations. More than one operation may be specified by separating +them with semi-colons. + +\begin{itemize} + +\item +Copy only a specified list of columns columns to the filtered input file. +The list of column name should be separated by semi-colons. Wild card +characters may be used in the column names to match multiple columns. +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table (i.e., there is no need to explicitly list the columns to +be included if any columns are being deleted). + +\item +Delete a column or keyword by listing the name preceded by a minus sign +or an exclamation mark (!), e.g., '-TIME' will delete the TIME column +if it exists, otherwise the TIME keyword. An error is returned if +neither a column nor keyword with this name exists. Note that the +exclamation point, '!', is a special UNIX character, so if it is used +on the command line rather than entered at a task prompt, it must be +preceded by a backslash to force the UNIX shell to ignore it. + +\item +Rename an existing column or keyword with the syntax 'NewName == +OldName'. An error is returned if neither a column nor keyword with +this name exists. + +\item +Append a new column or keyword to the table. To create a column, +give the new name, optionally followed by the data type in parentheses, +followed by a single equals sign and an expression to be used to +compute the value (e.g., 'newcol(1J) = 0' will create a new 32-bit +integer column called 'newcol' filled with zeros). The data type is +specified using the same syntax that is allowed for the value of the +FITS TFORMn keyword (e.g., 'I', 'J', 'E', 'D', etc. for binary tables, +and 'I8', F12.3', 'E20.12', etc. for ASCII tables). If the data type is +not specified then an appropriate data type will be chosen depending on +the form of the expression (may be a character string, logical, bit, long +integer, or double column). An appropriate vector count (in the case +of binary tables) will also be added if not explicitly specified. + +When creating a new keyword, the keyword name must be preceded by a +pound sign '\#', and the expression must evaluate to a scalar +(i.e., cannot have a column name in the expression). The comment +string for the keyword may be specified in parentheses immediately +following the keyword name (instead of supplying a data type as in +the case of creating a new column). If the keyword name ends with a +pound sign '\#', then cfitsio will substitute the number of the +most recently referenced column for the \# character . +This is especially useful when writing +a column-related keyword like TUNITn for a newly created column, +as shown in the following examples. + +\item +Recompute (overwrite) the values in an existing column or keyword by +giving the name followed by an equals sign and an arithmetic +expression. +\end{itemize} + +The expression that is used when appending or recomputing columns or +keywords can be arbitrarily complex and may be a function of other +header keyword values and other columns (in the same row). The full +syntax and available functions for the expression are described below +in the row filter specification section. + +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table. If no columns to be deleted are specified, then only the +columns that are explicitely listed will be included in the filtered +output table. To include all the columns, add the '*' wildcard +specifier at the end of the list, as shown in the examples. + +For complex or commonly used operations, one can place the +operations into an external text file and import it into the column +filter using the syntax '[col @filename.txt]'. The operations can +extend over multiple lines of the file, but multiple operations must +still be separated by semicolons. Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +Examples: +- + [col Time;rate] - only the Time and rate columns will + appear in the filtered input file. + + [col Time;*raw] - include the Time column and any other + columns whose name ends with 'raw'. + + [col -TIME; Good == STATUS] - deletes the TIME column and + renames the status column to 'Good' + + [col PI=PHA * 1.1 + 0.2; #TUNIT#(column units) = 'counts';*] + - creates new PI column from PHA values + and also writes the TUNITn keyword + for the new column. The final '*' + expression means preserve all the + columns in the input table in the + virtual output table; without the '*' + the output table would only contain + the single 'PI' column. + + [col rate = rate/exposure; TUNIT#(&) = 'counts/s';*] + - recomputes the rate column by dividing + it by the EXPOSURE keyword value. This + also modifies the value of the TUNITn + keyword for this column. The use of the + '&' character for the keyword comment + string means preserve the existing + comment string for that keyword. The + final '*' preserves all the columns + in the input table in the virtual + output table. +- + +**J. Row Filtering Specification + + When entering the name of a FITS table that is to be opened by a + program, an optional row filter may be specified to select a subset + of the rows in the table. A temporary new FITS file is created on + the fly which contains only those rows for which the row filter + expression evaluates to true. (The primary array and any other + extensions in the input file are also copied to the temporary + file). The original FITS file is closed and the new virtual file + is opened by the application program. The row filter expression is + enclosed in square brackets following the file name and extension + name (e.g., 'file.fits[events][GRADE==50]' selects only those rows + where the GRADE column value equals 50). When dealing with tables + where each row has an associated time and/or 2D spatial position, + the row filter expression can also be used to select rows based on + the times in a Good Time Intervals (GTI) extension, or on spatial + position as given in a SAO-style region file. + +***1. General Syntax + + The row filtering expression can be an arbitrarily complex series + of operations performed on constants, keyword values, and column + data taken from the specified FITS TABLE extension. The expression + must evaluate to a boolean value for each row of the table, where + a value of FALSE means that the row will be excluded. + + For complex or commonly used filters, one can place the expression + into a text file and import it into the row filter using the syntax + '[@filename.txt]'. The expression can be arbitrarily complex and + extend over multiple lines of the file. Any lines in the external + text file that begin with 2 slash characters ('//') will be ignored + and may be used to add comments into the file. + + Keyword and column data are referenced by name. Any string of + characters not surrounded by quotes (ie, a constant string) or + followed by an open parentheses (ie, a function name) will be + initially interpreted as a column name and its contents for the + current row inserted into the expression. If no such column exists, + a keyword of that name will be searched for and its value used, if + found. To force the name to be interpreted as a keyword (in case + there is both a column and keyword with the same name), precede the + keyword name with a single pound sign, '\#', as in '\#NAXIS2'. Due to + the generalities of FITS column and keyword names, if the column or + keyword name contains a space or a character which might appear as + an arithmetic term then inclose the name in '\$' characters as in + \$MAX PHA\$ or \#\$MAX-PHA\$. Names are case insensitive. + + To access a table entry in a row other than the current one, follow + the column's name with a row offset within curly braces. For + example, 'PHA\{-3\}' will evaluate to the value of column PHA, 3 rows + above the row currently being processed. One cannot specify an + absolute row number, only a relative offset. Rows that fall outside + the table will be treated as undefined, or NULLs. + + Boolean operators can be used in the expression in either their + Fortran or C forms. The following boolean operators are available: +- + "equal" .eq. .EQ. == "not equal" .ne. .NE. != + "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< + "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => + "or" .or. .OR. || "and" .and. .AND. && + "negation" .not. .NOT. ! "approx. equal(1e-7)" ~ +- + +Note that the exclamation +point, '!', is a special UNIX character, so if it is used on the +command line rather than entered at a task prompt, it must be preceded +by a backslash to force the UNIX shell to ignore it. + + The expression may also include arithmetic operators and functions. + Trigonometric functions use radians, not degrees. The following + arithmetic operators and functions can be used in the expression + (function names are case insensitive). A null value will be returned + in case of illegal operations such as divide by zero, sqrt(negative) + log(negative), log10(negative), arccos(.gt. 1), arcsin(.gt. 1). + +- + "addition" + "subtraction" - + "multiplication" * "division" / + "negation" - "exponentiation" ** ^ + "absolute value" abs(x) "cosine" cos(x) + "sine" sin(x) "tangent" tan(x) + "arc cosine" arccos(x) "arc sine" arcsin(x) + "arc tangent" arctan(x) "arc tangent" arctan2(y,x) + "hyperbolic cos" cosh(x) "hyperbolic sin" sinh(x) + "hyperbolic tan" tanh(x) "round to nearest int" round(x) + "round down to int" floor(x) "round up to int" ceil(x) + "exponential" exp(x) "square root" sqrt(x) + "natural log" log(x) "common log" log10(x) + "modulus" x % y "random # [0.0,1.0)" random() + "random Gausian" randomn() "random Poisson" randomp(x) + "minimum" min(x,y) "maximum" max(x,y) + "cumulative sum" accum(x) "sequential difference" seqdiff(x) + "if-then-else" b?x:y + "angular separation" angsep(ra1,dec1,ra2,de2) (all in degrees) +- +Three different random number functions are provided: random(), with +no arguments, produces a uniform random deviate between 0 and 1; +randomn(), also with no arguments, produces a normal (Gaussian) random +deviate with zero mean and unit standard deviation; randomp(x) +produces a Poisson random deviate whose expected number of counts is +X. X may be any positive real number of expected counts, including +fractional values, but the return value is an integer. + +When the random functions are used in a vector expresion, by default +the same random value will be used when evalutating each element of the vector. +If different random numbers are desired, then the name of a vector +column should be supplied as the single argument to the random +function (e.g., "flux + 0.1 * random(flux)", where "flux' is the +name of a vector column). This will create a vector of +random numbers that will be used in sequence when evaluating each +element of the vector expression. + + An alternate syntax for the min and max functions has only a single + argument which should be a vector value (see below). The result + will be the minimum/maximum element contained within the vector. + + The accum(x) function forms the cumulative sum of x, element by element. + Vector columns are supported simply by performing the summation process + through all the values. Null values are treated as 0. The seqdiff(x) + function forms the sequential difference of x, element by element. + The first value of seqdiff is the first value of x. A single null + value in x causes a pair of nulls in the output. The seqdiff and + accum functions are functional inverses, i.e., seqdiff(accum(x)) == x + as long as no null values are present. + + The angsep function computes the angular separation in degrees + between 2 celestial positions, where the first 2 parameters + give the RA-like and Dec-like coordinates (in decimal degrees) + of the first position, and the 3rd and 4th parameters give the + coordinates of the second position. + + The following type casting operators are available, where the + inclosing parentheses are required and taken from the C language + usage. Also, the integer to real casts values to double precision: +- + "real to integer" (int) x (INT) x + "integer to real" (float) i (FLOAT) i +- + + In addition, several constants are built in for use in numerical + expressions: + +- + #pi 3.1415... #e 2.7182... + #deg #pi/180 #row current row number + #null undefined value #snull undefined string +- + + A string constant must be enclosed in quotes as in 'Crab'. The + "null" constants are useful for conditionally setting table values + to a NULL, or undefined, value (eg., "col1==-99 ? \#NULL : col1"). + + There is also a function for testing if two values are close to + each other, i.e., if they are "near" each other to within a user + specified tolerance. The arguments, value\_1 and value\_2 can be + integer or real and represent the two values who's proximity is + being tested to be within the specified tolerance, also an integer + or real: +- + near(value_1, value_2, tolerance) +- + When a NULL, or undefined, value is encountered in the FITS table, + the expression will evaluate to NULL unless the undefined value is + not actually required for evaluation, e.g. "TRUE .or. NULL" + evaluates to TRUE. The following two functions allow some NULL + detection and handling: +- + "a null value?" ISNULL(x) + "define a value for null" DEFNULL(x,y) +- + The former + returns a boolean value of TRUE if the argument x is NULL. The + later "defines" a value to be substituted for NULL values; it + returns the value of x if x is not NULL, otherwise it returns the + value of y. + + + +***2. Bit Masks + + Bit masks can be used to select out rows from bit columns (TFORMn = + \#X) in FITS files. To represent the mask, binary, octal, and hex + formats are allowed: + +- + binary: b0110xx1010000101xxxx0001 + octal: o720x1 -> (b111010000xxx001) + hex: h0FxD -> (b00001111xxxx1101) +- + + In all the representations, an x or X is allowed in the mask as a + wild card. Note that the x represents a different number of wild + card bits in each representation. All representations are case + insensitive. + + To construct the boolean expression using the mask as the boolean + equal operator described above on a bit table column. For example, + if you had a 7 bit column named flags in a FITS table and wanted + all rows having the bit pattern 0010011, the selection expression + would be: + +- + flags == b0010011 + or + flags .eq. b10011 +- + + It is also possible to test if a range of bits is less than, less + than equal, greater than and greater than equal to a particular + boolean value: + +- + flags <= bxxx010xx + flags .gt. bxxx100xx + flags .le. b1xxxxxxx +- + + Notice the use of the x bit value to limit the range of bits being + compared. + + It is not necessary to specify the leading (most significant) zero + (0) bits in the mask, as shown in the second expression above. + + Bit wise AND, OR and NOT operations are also possible on two or + more bit fields using the '\&'(AND), '$|$'(OR), and the '!'(NOT) + operators. All of these operators result in a bit field which can + then be used with the equal operator. For example: + +- + (!flags) == b1101100 + (flags & b1000001) == bx000001 +- + + Bit fields can be appended as well using the '+' operator. Strings + can be concatenated this way, too. + +***3. Vector Columns + + Vector columns can also be used in building the expression. No + special syntax is required if one wants to operate on all elements + of the vector. Simply use the column name as for a scalar column. + Vector columns can be freely intermixed with scalar columns or + constants in virtually all expressions. The result will be of the + same dimension as the vector. Two vectors in an expression, though, + need to have the same number of elements and have the same + dimensions. + + Arithmetic and logical operations are all performed on an element by + element basis. Comparing two vector columns, eg "COL1 == COL2", + thus results in another vector of boolean values indicating which + elements of the two vectors are equal. + + Eight functions are available that operate on a vector and return a + scalar result: +- + "minimum" MIN(V) "maximum" MAX(V) + "average" AVERAGE(V) "median" MEDIAN(V) + "sumation" SUM(V) "standard deviation" STDDEV(V) + "# of values" NELEM(V) "# of non-null values" NVALID(V) +- + where V represents the name of a vector column or a manually + constructed vector using curly brackets as described below. The + first 6 of these functions ignore any null values in the vector when + computing the result. + + The SUM function literally sums all the elements in x, returning a + scalar value. If V is a boolean vector, SUM returns the number + of TRUE elements. The NELEM function returns the number of elements + in vector V whereas NVALID return the number of non-null elements in + the vector. (NELEM also operates on bit and string columns, + returning their column widths.) As an example, to test whether all + elements of two vectors satisfy a given logical comparison, one can + use the expression +- + SUM( COL1 > COL2 ) == NELEM( COL1 ) +- + + which will return TRUE if all elements of COL1 are greater than + their corresponding elements in COL2. + + To specify a single element of a vector, give the column name + followed by a comma-separated list of coordinates enclosed in + square brackets. For example, if a vector column named PHAS exists + in the table as a one dimensional, 256 component list of numbers + from which you wanted to select the 57th component for use in the + expression, then PHAS[57] would do the trick. Higher dimensional + arrays of data may appear in a column. But in order to interpret + them, the TDIMn keyword must appear in the header. Assuming that a + (4,4,4,4) array is packed into each row of a column named ARRAY4D, + the (1,2,3,4) component element of each row is accessed by + ARRAY4D[1,2,3,4]. Arrays up to dimension 5 are currently + supported. Each vector index can itself be an expression, although + it must evaluate to an integer value within the bounds of the + vector. Vector columns which contain spaces or arithmetic operators + must have their names enclosed in "\$" characters as with + \$ARRAY-4D\$[1,2,3,4]. + + A more C-like syntax for specifying vector indices is also + available. The element used in the preceding example alternatively + could be specified with the syntax ARRAY4D[4][3][2][1]. Note the + reverse order of indices (as in C), as well as the fact that the + values are still ones-based (as in Fortran -- adopted to avoid + ambiguity for 1D vectors). With this syntax, one does not need to + specify all of the indices. To extract a 3D slice of this 4D + array, use ARRAY4D[4]. + + Variable-length vector columns are not supported. + + Vectors can be manually constructed within the expression using a + comma-separated list of elements surrounded by curly braces ('\{\}'). + For example, '\{1,3,6,1\}' is a 4-element vector containing the values + 1, 3, 6, and 1. The vector can contain only boolean, integer, and + real values (or expressions). The elements will be promoted to the + highest data type present. Any elements which are themselves + vectors, will be expanded out with each of its elements becoming an + element in the constructed vector. + +***4. Good Time Interval Filtering + + A common filtering method involves selecting rows which have a time + value which lies within what is called a Good Time Interval or GTI. + The time intervals are defined in a separate FITS table extension + which contains 2 columns giving the start and stop time of each + good interval. The filtering operation accepts only those rows of + the input table which have an associated time which falls within + one of the time intervals defined in the GTI extension. A high + level function, gtifilter(a,b,c,d), is available which evaluates + each row of the input table and returns TRUE or FALSE depending + whether the row is inside or outside the good time interval. The + syntax is +- + gtifilter( [ "gtifile" [, expr [, "STARTCOL", "STOPCOL" ] ] ] ) + or + gtifilter( [ 'gtifile' [, expr [, 'STARTCOL', 'STOPCOL' ] ] ] ) +- + where each "[]" demarks optional parameters. Note that the quotes + around the gtifile and START/STOP column are required. Either single + or double quotes may be used. In cases where this expression is + entered on the Unix command line, enclose the entire expression in + double quotes, and then use single quotes within the expression to + enclose the 'gtifile' and other terms. It is also usually possible + to do the reverse, and enclose the whole expression in single quotes + and then use double quotes within the expression. The gtifile, + if specified, can be blank ("") which will mean to use the first + extension with the name "*GTI*" in the current file, a plain + extension specifier (eg, "+2", "[2]", or "[STDGTI]") which will be + used to select an extension in the current file, or a regular + filename with or without an extension specifier which in the latter + case will mean to use the first extension with an extension name + "*GTI*". Expr can be any arithmetic expression, including simply + the time column name. A vector time expression will produce a + vector boolean result. STARTCOL and STOPCOL are the names of the + START/STOP columns in the GTI extension. If one of them is + specified, they both must be. + + In its simplest form, no parameters need to be provided -- default + values will be used. The expression "gtifilter()" is equivalent to +- + gtifilter( "", TIME, "*START*", "*STOP*" ) +- + This will search the current file for a GTI extension, filter the + TIME column in the current table, using START/STOP times taken from + columns in the GTI extension with names containing the strings + "START" and "STOP". The wildcards ('*') allow slight variations in + naming conventions such as "TSTART" or "STARTTIME". The same + default values apply for unspecified parameters when the first one + or two parameters are specified. The function automatically + searches for TIMEZERO/I/F keywords in the current and GTI + extensions, applying a relative time offset, if necessary. + +***5. Spatial Region Filtering + + Another common filtering method selects rows based on whether the + spatial position associated with each row is located within a given + 2-dimensional region. The syntax for this high-level filter is +- + regfilter( "regfilename" [ , Xexpr, Yexpr [ , "wcs cols" ] ] ) +- + where each "[]" demarks optional parameters. The region file name + is required and must be enclosed in quotes. The remaining + parameters are optional. The region file is an ASCII text file + which contains a list of one or more geometric shapes (circle, + ellipse, box, etc.) which defines a region on the celestial sphere + or an area within a particular 2D image. The region file is + typically generated using an image display program such as fv/POW + (distribute by the HEASARC), or ds9 (distributed by the Smithsonian + Astrophysical Observatory). Users should refer to the documentation + provided with these programs for more details on the syntax used in + the region files. + + In its simpliest form, (e.g., regfilter("region.reg") ) the + coordinates in the default 'X' and 'Y' columns will be used to + determine if each row is inside or outside the area specified in + the region file. Alternate position column names, or expressions, + may be entered if needed, as in +- + regfilter("region.reg", XPOS, YPOS) +- + Region filtering can be applied most unambiguously if the positions + in the region file and in the table to be filtered are both give in + terms of absolute celestial coordinate units. In this case the + locations and sizes of the geometric shapes in the region file are + specified in angular units on the sky (e.g., positions given in + R.A. and Dec. and sizes in arcseconds or arcminutes). Similarly, + each row of the filtered table will have a celestial coordinate + associated with it. This association is usually implemented using + a set of so-called 'World Coordinate System' (or WCS) FITS keywords + that define the coordinate transformation that must be applied to + the values in the 'X' and 'Y' columns to calculate the coordinate. + + Alternatively, one can perform spatial filtering using unitless + 'pixel' coordinates for the regions and row positions. In this + case the user must be careful to ensure that the positions in the 2 + files are self-consistent. A typical problem is that the region + file may be generated using a binned image, but the unbinned + coordinates are given in the event table. The ROSAT events files, + for example, have X and Y pixel coordinates that range from 1 - + 15360. These coordinates are typically binned by a factor of 32 to + produce a 480x480 pixel image. If one then uses a region file + generated from this image (in image pixel units) to filter the + ROSAT events file, then the X and Y column values must be converted + to corresponding pixel units as in: +- + regfilter("rosat.reg", X/32.+.5, Y/32.+.5) +- + Note that this binning conversion is not necessary if the region + file is specified using celestial coordinate units instead of pixel + units because CFITSIO is then able to directly compare the + celestial coordinate of each row in the table with the celestial + coordinates in the region file without having to know anything + about how the image may have been binned. + + The last "wcs cols" parameter should rarely be needed. If supplied, + this string contains the names of the 2 columns (space or comma + separated) which have the associated WCS keywords. If not supplied, + the filter will scan the X and Y expressions for column names. + If only one is found in each expression, those columns will be + used, otherwise an error will be returned. + + These region shapes are supported (names are case insensitive): +- + Point ( X1, Y1 ) <- One pixel square region + Line ( X1, Y1, X2, Y2 ) <- One pixel wide region + Polygon ( X1, Y1, X2, Y2, ... ) <- Rest are interiors with + Rectangle ( X1, Y1, X2, Y2, A ) | boundaries considered + Box ( Xc, Yc, Wdth, Hght, A ) V within the region + Diamond ( Xc, Yc, Wdth, Hght, A ) + Circle ( Xc, Yc, R ) + Annulus ( Xc, Yc, Rin, Rout ) + Ellipse ( Xc, Yc, Rx, Ry, A ) + Elliptannulus ( Xc, Yc, Rinx, Riny, Routx, Routy, Ain, Aout ) + Sector ( Xc, Yc, Amin, Amax ) +- + where (Xc,Yc) is the coordinate of the shape's center; (X\#,Y\#) are + the coordinates of the shape's edges; Rxxx are the shapes' various + Radii or semimajor/minor axes; and Axxx are the angles of rotation + (or bounding angles for Sector) in degrees. For rotated shapes, the + rotation angle can be left off, indicating no rotation. Common + alternate names for the regions can also be used: rotbox = box; + rotrectangle = rectangle; (rot)rhombus = (rot)diamond; and pie + = sector. When a shape's name is preceded by a minus sign, '-', + the defined region is instead the area *outside* its boundary (ie, + the region is inverted). All the shapes within a single region + file are OR'd together to create the region, and the order is + significant. The overall way of looking at region files is that if + the first region is an excluded region then a dummy included region + of the whole detector is inserted in the front. Then each region + specification as it is processed overrides any selections inside of + that region specified by previous regions. Another way of thinking + about this is that if a previous excluded region is completely + inside of a subsequent included region the excluded region is + ignored. + + The positional coordinates may be given either in pixel units, + decimal degrees or hh:mm:ss.s, dd:mm:ss.s units. The shape sizes + may be given in pixels, degrees, arcminutes, or arcseconds. Look + at examples of region file produced by fv/POW or ds9 for further + details of the region file format. + + There are three low-level functions that are primarily for use with + regfilter function, but they can be called directly. They + return a boolean true or false depending on whether a two + dimensional point is in the region or not. The positional coordinates + must be given in pixel units: +- + "point in a circular region" + circle(xcntr,ycntr,radius,Xcolumn,Ycolumn) + + "point in an elliptical region" + ellipse(xcntr,ycntr,xhlf_wdth,yhlf_wdth,rotation,Xcolumn,Ycolumn) + + "point in a rectangular region" + box(xcntr,ycntr,xfll_wdth,yfll_wdth,rotation,Xcolumn,Ycolumn) + + where + (xcntr,ycntr) are the (x,y) position of the center of the region + (xhlf_wdth,yhlf_wdth) are the (x,y) half widths of the region + (xfll_wdth,yfll_wdth) are the (x,y) full widths of the region + (radius) is half the diameter of the circle + (rotation) is the angle(degrees) that the region is rotated with + respect to (xcntr,ycntr) + (Xcoord,Ycoord) are the (x,y) coordinates to test, usually column + names + NOTE: each parameter can itself be an expression, not merely a + column name or constant. +- + +***5. Example Row Filters +- + [ binary && mag <= 5.0] - Extract all binary stars brighter + than fifth magnitude (note that + the initial space is necessary to + prevent it from being treated as a + binning specification) + + [#row >= 125 && #row <= 175] - Extract row numbers 125 through 175 + + [IMAGE[4,5] .gt. 100] - Extract all rows that have the + (4,5) component of the IMAGE column + greater than 100 + + [abs(sin(theta * #deg)) < 0.5] - Extract all rows having the + absolute value of the sine of theta + less than a half where the angles + are tabulated in degrees + + [SUM( SPEC > 3*BACKGRND )>=1] - Extract all rows containing a + spectrum, held in vector column + SPEC, with at least one value 3 + times greater than the background + level held in a keyword, BACKGRND + + [VCOL=={1,4,2}] - Extract all rows whose vector column + VCOL contains the 3-elements 1, 4, and + 2. + + [@rowFilter.txt] - Extract rows using the expression + contained within the text file + rowFilter.txt + + [gtifilter()] - Search the current file for a GTI + extension, filter the TIME + column in the current table, using + START/STOP times taken from + columns in the GTI extension + + [regfilter("pow.reg")] - Extract rows which have a coordinate + (as given in the X and Y columns) + within the spatial region specified + in the pow.reg region file. + + [regfilter("pow.reg", Xs, Ys)] - Same as above, except that the + Xs and Ys columns will be used to + determine the coordinate of each + row in the table. +- + +**J. Binning or Histogramming Specification + +The optional binning specifier is enclosed in square brackets and can +be distinguished from a general row filter specification by the fact +that it begins with the keyword 'bin' not immediately followed by an +equals sign. When binning is specified, a temporary N-dimensional FITS +primary array is created by computing the histogram of the values in +the specified columns of a FITS table extension. After the histogram +is computed the input FITS file containing the table is then closed and +the temporary FITS primary array is opened and passed to the +application program. Thus, the application program never sees the +original FITS table and only sees the image in the new temporary file +(which has no additional extensions). Obviously, the application +program must be expecting to open a FITS image and not a FITS table in +this case. + +The data type of the FITS histogram image may be specified by appending +'b' (for 8-bit byte), 'i' (for 16-bit integers), 'j' (for 32-bit +integer), 'r' (for 32-bit floating points), or 'd' (for 64-bit double +precision floating point) to the 'bin' keyword (e.g. '[binr X]' +creates a real floating point image). If the data type is not +explicitly specified then a 32-bit integer image will be created by +default, unless the weighting option is also specified in which case +the image will have a 32-bit floating point data type by default. + +The histogram image may have from 1 to 4 dimensions (axes), depending +on the number of columns that are specified. The general form of the +binning specification is: +- + [bin{bijrd} Xcol=min:max:binsize, Ycol= ..., Zcol=..., Tcol=...; weight] +- +in which up to 4 columns, each corresponding to an axis of the image, +are listed. The column names are case insensitive, and the column +number may be given instead of the name, preceded by a pound sign +(e.g., [bin \#4=1:512]). If the column name is not specified, then +CFITSIO will first try to use the 'preferred column' as specified by +the CPREF keyword if it exists (e.g., 'CPREF = 'DETX,DETY'), otherwise +column names 'X', 'Y', 'Z', and 'T' will be assumed for each of the 4 +axes, respectively. In cases where the column name could be confused +with an arithmetic expression, enclose the column name in parentheses to +force the name to be interpreted literally. + +Each column name may be followed by an equals sign and then the lower +and upper range of the histogram, and the size of the histogram bins, +separated by colons. Spaces are allowed before and after the equals +sign but not within the 'min:max:binsize' string. The min, max and +binsize values may be integer or floating point numbers, or they may be +the names of keywords in the header of the table. If the latter, then +the value of that keyword is substituted into the expression. + +Default values for the min, max and binsize quantities will be +used if not explicitly given in the binning expression as shown +in these examples: +- + [bin x = :512:2] - use default minimum value + [bin x = 1::2] - use default maximum value + [bin x = 1:512] - use default bin size + [bin x = 1:] - use default maximum value and bin size + [bin x = :512] - use default minimum value and bin size + [bin x = 2] - use default minimum and maximum values + [bin x] - use default minimum, maximum and bin size + [bin 4] - default 2-D image, bin size = 4 in both axes + [bin] - default 2-D image +- +CFITSIO will use the value of the TLMINn, TLMAXn, and TDBINn keywords, +if they exist, for the default min, max, and binsize, respectively. If +they do not exist then CFITSIO will use the actual minimum and maximum +values in the column for the histogram min and max values. The default +binsize will be set to 1, or (max - min) / 10., whichever is smaller, +so that the histogram will have at least 10 bins along each axis. + +A shortcut notation is allowed if all the columns/axes have the same +binning specification. In this case all the column names may be listed +within parentheses, followed by the (single) binning specification, as +in: +- + [bin (X,Y)=1:512:2] + [bin (X,Y) = 5] +- + +The optional weighting factor is the last item in the binning specifier +and, if present, is separated from the list of columns by a +semi-colon. As the histogram is accumulated, this weight is used to +incremented the value of the appropriated bin in the histogram. If the +weighting factor is not specified, then the default weight = 1 is +assumed. The weighting factor may be a constant integer or floating +point number, or the name of a keyword containing the weighting value. +Or the weighting factor may be the name of a table column in which case +the value in that column, on a row by row basis, will be used. + +In some cases, the column or keyword may give the reciprocal of the +actual weight value that is needed. In this case, precede the weight +keyword or column name by a slash '/' to tell CFITSIO to use the +reciprocal of the value when constructing the histogram. + +For complex or commonly used histograms, one can also place its +description into a text file and import it into the binning +specification using the syntax [bin @filename.txt]. The file's +contents can extend over multiple lines, although it must still +conform to the no-spaces rule for the min:max:binsize syntax and each +axis specification must still be comma-separated. Any lines in the +external text file that begin with 2 slash characters ('//') will be +ignored and may be used to add comments into the file. + + Examples: + +- + [bini detx, dety] - 2-D, 16-bit integer histogram + of DETX and DETY columns, using + default values for the histogram + range and binsize + + [bin (detx, dety)=16; /exposure] - 2-D, 32-bit real histogram of DETX + and DETY columns with a bin size = 16 + in both axes. The histogram values + are divided by the EXPOSURE keyword + value. + + [bin time=TSTART:TSTOP:0.1] - 1-D lightcurve, range determined by + the TSTART and TSTOP keywords, + with 0.1 unit size bins. + + [bin pha, time=8000.:8100.:0.1] - 2-D image using default binning + of the PHA column for the X axis, + and 1000 bins in the range + 8000. to 8100. for the Y axis. + + [bin @binFilter.txt] - Use the contents of the text file + binFilter.txt for the binning + specifications. + +- +*X. Template Files + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following sections. + +**A Detailed Template Line Format + +The format of each ASCII template line closely follows the format of a +FITS keyword record: +- + KEYWORD = KEYVALUE / COMMENT +- +except that free format may be used (e.g., the equals sign may appear +at any position in the line) and TAB characters are allowed and are +treated the same as space characters. The KEYVALUE and COMMENT fields +are optional. The equals sign character is also optional, but it is +recommended that it be included for clarity. Any template line that +begins with the pound '\#' character is ignored by the template parser +and may be use to insert comments into the template file itself. + +The KEYWORD name field is limited to 8 characters in length and only +the letters A-Z, digits 0-9, and the hyphen and underscore characters +may be used, without any embedded spaces. Lowercase letters in the +template keyword name will be converted to uppercase. Leading spaces +in the template line preceding the keyword name are generally ignored, +except if the first 8 characters of a template line are all blank, then +the entire line is treated as a FITS comment keyword (with a blank +keyword name) and is copied verbatim into the FITS header. + +The KEYVALUE field may have any allowed FITS data type: character +string, logical, integer, real, complex integer, or complex real. The +character string values need not be enclosed in single quote characters +unless they are necessary to distinguish the string from a different +data type (e.g. 2.0 is a real but '2.0' is a string). The keyword has +an undefined (null) value if the template record only contains blanks +following the "=" or between the "=" and the "/" comment field +delimiter. + +String keyword values longer than 68 characters (the maximum length +that will fit in a single FITS keyword record) are permitted using the +CFITSIO long string convention. They can either be specified as a +single long line in the template, or by using multiple lines where the +continuing lines contain the 'CONTINUE' keyword, as in this example: +- + LONGKEY = 'This is a long string value that is contin&' + CONTINUE 'ued over 2 records' / comment field goes here +- +The format of template lines with CONTINUE keyword is very strict: 3 +spaces must follow CONTINUE and the rest of the line is copied verbatim +to the FITS file. + +The start of the optional COMMENT field must be preceded by "/", which +is used to separate it from the keyword value field. Exceptions are if +the KEYWORD name field contains COMMENT, HISTORY, CONTINUE, or if the +first 8 characters of the template line are blanks. + +More than one Header-Data Unit (HDU) may be defined in the template +file. The start of an HDU definition is denoted with a SIMPLE or +XTENSION template line: + +1) SIMPLE begins a Primary HDU definition. SIMPLE may only appear as +the first keyword in the template file. If the template file begins +with XTENSION instead of SIMPLE, then a default empty Primary HDU is +created, and the template is then assumed to define the keywords +starting with the first extension following the Primary HDU. + +2) XTENSION marks the beginning of a new extension HDU definition. The +previous HDU will be closed at this point and processing of the next +extension begins. + +**B Auto-indexing of Keywords + +If a template keyword name ends with a "\#" character, it is said to be +'auto-indexed'. Each "\#" character will be replaced by the current +integer index value, which gets reset = 1 at the start of each new HDU +in the file (or 7 in the special case of a GROUP definition). The +FIRST indexed keyword in each template HDU definition is used as the +'incrementor'; each subsequent occurrence of this SAME keyword will +cause the index value to be incremented. This behavior can be rather +subtle, as illustrated in the following examples in which the TTYPE +keyword is the incrementor in both cases: +- + TTYPE# = TIME + TFORM# = 1D + TTYPE# = RATE + TFORM# = 1E +- +will create TTYPE1, TFORM1, TTYPE2, and TFORM2 keywords. But if the +template looks like, +- + TTYPE# = TIME + TTYPE# = RATE + TFORM# = 1D + TFORM# = 1E +- +this results in a FITS files with TTYPE1, TTYPE2, TFORM2, and TFORM2, +which is probably not what was intended! + +**C Template Parser Directives + +In addition to the template lines which define individual keywords, the +template parser recognizes 3 special directives which are each preceded +by the backslash character: \verb+ \include, \group+, and \verb+ \end+. + +The 'include' directive must be followed by a filename. It forces the +parser to temporarily stop reading the current template file and begin +reading the include file. Once the parser reaches the end of the +include file it continues parsing the current template file. Include +files can be nested, and HDU definitions can span multiple template +files. + +The start of a GROUP definition is denoted with the 'group' directive, +and the end of a GROUP definition is denoted with the 'end' directive. +Each GROUP contains 0 or more member blocks (HDUs or GROUPs). Member +blocks of type GROUP can contain their own member blocks. The GROUP +definition itself occupies one FITS file HDU of special type (GROUP +HDU), so if a template specifies 1 group with 1 member HDU like: +- +\group +grpdescr = 'demo' +xtension bintable +# this bintable has 0 cols, 0 rows +\end +- +then the parser creates a FITS file with 3 HDUs : +- +1) dummy PHDU +2) GROUP HDU (has 1 member, which is bintable in HDU number 3) +3) bintable (member of GROUP in HDU number 2) +- +Technically speaking, the GROUP HDU is a BINTABLE with 6 columns. Applications +can define additional columns in a GROUP HDU using TFORMn and TTYPEn +(where n is 7, 8, ....) keywords or their auto-indexing equivalents. + +For a more complicated example of a template file using the group directives, +look at the sample.tpl file that is included in the CFITSIO distribution. + +**D Formal Template Syntax + +The template syntax can formally be defined as follows: +- + TEMPLATE = BLOCK [ BLOCK ... ] + + BLOCK = { HDU | GROUP } + + GROUP = \GROUP [ BLOCK ... ] \END + + HDU = XTENSION [ LINE ... ] { XTENSION | \GROUP | \END | EOF } + + LINE = [ KEYWORD [ = ] ] [ VALUE ] [ / COMMENT ] + + X ... - X can be present 1 or more times + { X | Y } - X or Y + [ X ] - X is optional +- + +At the topmost level, the template defines 1 or more template blocks. Blocks +can be either HDU (Header Data Unit) or a GROUP. For each block the parser +creates 1 (or more for GROUPs) FITS file HDUs. + + +**E Errors + +In general the fits\_execute\_template() function tries to be as atomic +as possible, so either everything is done or nothing is done. If an +error occurs during parsing of the template, fits\_execute\_template() +will (try to) delete the top level BLOCK (with all its children if any) +in which the error occurred, then it will stop reading the template file +and it will return with an error. + +**F Examples + +1. This template file will create a 200 x 300 pixel image, with 4-byte +integer pixel values, in the primary HDU: +- + SIMPLE = T + BITPIX = 32 + NAXIS = 2 / number of dimensions + NAXIS1 = 100 / length of first axis + NAXIS2 = 200 / length of second axis + OBJECT = NGC 253 / name of observed object +- +The allowed values of BITPIX are 8, 16, 32, -32, or -64, +representing, respectively, 8-bit integer, 16-bit integer, 32-bit +integer, 32-bit floating point, or 64 bit floating point pixels. + +2. To create a FITS table, the template first needs to include +XTENSION = TABLE or BINTABLE to define whether it is an ASCII or binary +table, and NAXIS2 to define the number of rows in the table. Two +template lines are then needed to define the name (TTYPEn) and FITS data +format (TFORMn) of the columns, as in this example: +- + xtension = bintable + naxis2 = 40 + ttype# = Name + tform# = 10a + ttype# = Npoints + tform# = j + ttype# = Rate + tunit# = counts/s + tform# = e +- +The above example defines a null primary array followed by a 40-row +binary table extension with 3 columns called 'Name', 'Npoints', and +'Rate', with data formats of '10A' (ASCII character string), '1J' +(integer) and '1E' (floating point), respectively. Note that the other +required FITS keywords (BITPIX, NAXIS, NAXIS1, PCOUNT, GCOUNT, TFIELDS, +and END) do not need to be explicitly defined in the template because +their values can be inferred from the other keywords in the template. +This example also illustrates that the templates are generally +case-insensitive (the keyword names and TFORMn values are converted to +upper-case in the FITS file) and that string keyword values generally +do not need to be enclosed in quotes. + +*XI. Local FITS Conventions + +CFITSIO supports several local FITS conventions which are not +defined in the official NOST FITS standard and which are not +necessarily recognized or supported by other FITS software packages. +Programmers should be cautious about using these features, especially +if the FITS files that are produced are expected to be processed by +other software systems which do not use the CFITSIO interface. + +**A. 64-Bit Long Integers + +CFITSIO supports reading and writing FITS images or table columns containing +64-bit integer data values. Support for 64-bit integers was added to the +official FITS Standard in December 2005. + FITS 64-bit images have BITPIX = +64, and the 64-bit binary table columns have TFORMn = 'K'. CFITSIO also +supports the 'Q' variable-length array table column format which is +analogous to the 'P' column format except that the array descriptor +is stored as a pair of 64-bit integers. + +For the convenience of C programmers, the fitsio.h include file +defines (with a typedef statement) the 'LONGLONG' datatype to be +eqivalent to an appropriate 64-bit integer datatype on each platform. +Since there is currently no universal standard +for the name of the 64-bit integer datatype (it might be defined as +'long long', 'long', or '\_\_int64' depending on the platform) +C programmers may prefer to use the 'LONGLONG' datatype when +declaring or allocating 64-bit integer quantities when writing +code which needs to run on multiple platforms. +Note that CFITSIO will implicitly convert the datatype when reading +or writing FITS 64-bit integer images and columns with data arrays of +a different integer or floating point datatype, but there is an +increased risk of loss of numerical precision or +numerical overflow in this case. + +**B. Long String Keyword Values. + +The length of a standard FITS string keyword is limited to 68 +characters because it must fit entirely within a single FITS header +keyword record. In some instances it is necessary to encode strings +longer than this limit, so CFITSIO supports a local convention in which +the string value is continued over multiple keywords. This +continuation convention uses an ampersand character at the end of each +substring to indicate that it is continued on the next keyword, and the +continuation keywords all have the name CONTINUE without an equal sign +in column 9. The string value may be continued in this way over as many +additional CONTINUE keywords as is required. The following lines +illustrate this continuation convention which is used in the value of +the STRKEY keyword: +- +LONGSTRN= 'OGIP 1.0' / The OGIP Long String Convention may be used. +STRKEY = 'This is a very long string keyword&' / Optional Comment +CONTINUE ' value that is continued over 3 keywords in the & ' +CONTINUE 'FITS header.' / This is another optional comment. +- +It is recommended that the LONGSTRN keyword, as shown here, always be +included in any HDU that uses this longstring convention as a warning +to any software that must read the keywords. A routine called fits\_write\_key\_longwarn +has been provided in CFITSIO to write this keyword if it does not +already exist. + +This long string convention is supported by the following CFITSIO +routines: +- + fits_write_key_longstr - write a long string keyword value + fits_insert_key_longstr - insert a long string keyword value + fits_modify_key_longstr - modify a long string keyword value + fits_update_key_longstr - modify a long string keyword value + fits_read_key_longstr - read a long string keyword value + fits_delete_key - delete a keyword +- +The fits\_read\_key\_longstr routine is unique among all the CFITSIO +routines in that it internally allocates memory for the long string +value; all the other CFITSIO routines that deal with arrays require +that the calling program pre-allocate adequate space to hold the array +of data. Consequently, programs which use the fits\_read\_key\_longstr +routine must be careful to free the allocated memory for the string +when it is no longer needed. + +The following 2 routines also have limited support for this long string +convention, +- + fits_modify_key_str - modify an existing string keyword value + fits_update_key_str - update a string keyword value +- +in that they will correctly overwrite an existing long string value, +but the new string value is limited to a maximum of 68 characters in +length. + +The more commonly used CFITSIO routines to write string valued keywords +(fits\_update\_key and fits\_write\_key) do not support this long +string convention and only support strings up to 68 characters in +length. This has been done deliberately to prevent programs from +inadvertently writing keywords using this non-standard convention +without the explicit intent of the programmer or user. The +fits\_write\_key\_longstr routine must be called instead to write long +strings. This routine can also be used to write ordinary string values +less than 68 characters in length. + +**C. Arrays of Fixed-Length Strings in Binary Tables + +CFITSIO supports 2 ways to specify that a character column in a binary +table contains an array of fixed-length strings. The first way, which +is offically supported by the FITS Standard document, uses the TDIMn keyword. +For example, if TFORMn = '60A' and TDIMn = '(12,5)' then that +column will be interpreted as containing an array of 5 strings, each 12 +characters long. + +CFITSIO also supports a +local convention for the format of the TFORMn keyword value of the form +'rAw' where 'r' is an integer specifying the total width in characters +of the column, and 'w' is an integer specifying the (fixed) length of +an individual unit string within the vector. For example, TFORM1 = +'120A10' would indicate that the binary table column is 120 characters +wide and consists of 12 10-character length strings. This convention +is recognized by the CFITSIO routines that read or write strings in +binary tables. The Binary Table definition document specifies that +other optional characters may follow the data type code in the TFORM +keyword, so this local convention is in compliance with the +FITS standard although other FITS readers may not +recognize this convention. + +The Binary Table definition document that was approved by the IAU in +1994 contains an appendix describing an alternate convention for +specifying arrays of fixed or variable length strings in a binary table +character column (with the form 'rA:SSTRw/nnn)'. This appendix was not +officially voted on by the IAU and hence is still provisional. CFITSIO +does not currently support this proposal. + +**D. Keyword Units Strings + +One limitation of the current FITS Standard is that it does not define +a specific convention for recording the physical units of a keyword +value. The TUNITn keyword can be used to specify the physical units of +the values in a table column, but there is no analogous convention for +keyword values. The comment field of the keyword is often used for +this purpose, but the units are usually not specified in a well defined +format that FITS readers can easily recognize and extract. + +To solve this problem, CFITSIO uses a local convention in which the +keyword units are enclosed in square brackets as the first token in the +keyword comment field; more specifically, the opening square bracket +immediately follows the slash '/' comment field delimiter and a single +space character. The following examples illustrate keywords that use +this convention: + +- +EXPOSURE= 1800.0 / [s] elapsed exposure time +V_HELIO = 16.23 / [km s**(-1)] heliocentric velocity +LAMBDA = 5400. / [angstrom] central wavelength +FLUX = 4.9033487787637465E-30 / [J/cm**2/s] average flux +- + +In general, the units named in the IAU(1988) Style Guide are +recommended, with the main exception that the preferred unit for angle +is 'deg' for degrees. + +The fits\_read\_key\_unit and fits\_write\_key\_unit routines in +CFITSIO read and write, respectively, the keyword unit strings in an +existing keyword. + +**E. HIERARCH Convention for Extended Keyword Names + +CFITSIO supports the HIERARCH keyword convention which allows keyword +names that are longer then 8 characters and may contain the full range +of printable ASCII text characters. This convention +was developed at the European Southern Observatory (ESO) to support +hierarchical FITS keyword such as: +- +HIERARCH ESO INS FOCU POS = -0.00002500 / Focus position +- +Basically, this convention uses the FITS keyword 'HIERARCH' to indicate +that this convention is being used, then the actual keyword name +({\tt'ESO INS FOCU POS'} in this example) begins in column 10 and can +contain any printable ASCII text characters, including spaces. The +equals sign marks the end of the keyword name and is followed by the +usual value and comment fields just as in standard FITS keywords. +Further details of this convention are described at +http://arcdev.hq.eso.org/dicb/dicd/dic-1-1.4.html (search for +HIERARCH). + +This convention allows a much broader range of keyword names +than is allowed by the FITS Standard. Here are more examples +of such keywords: +- +HIERARCH LongKeyword = 47.5 / Keyword has > 8 characters, and mixed case +HIERARCH XTE$TEMP = 98.6 / Keyword contains the '$' character +HIERARCH Earth is a star = F / Keyword contains embedded spaces +- +CFITSIO will transparently read and write these keywords, so application +programs do not in general need to know anything about the specific +implementation details of the HIERARCH convention. In particular, +application programs do not need to specify the `HIERARCH' part of the +keyword name when reading or writing keywords (although it +may be included if desired). When writing a keyword, CFITSIO first +checks to see if the keyword name is legal as a standard FITS keyword +(no more than 8 characters long and containing only letters, digits, or +a minus sign or underscore). If so it writes it as a standard FITS +keyword, otherwise it uses the hierarch convention to write the +keyword. The maximum keyword name length is 67 characters, which +leaves only 1 space for the value field. A more practical limit is +about 40 characters, which leaves enough room for most keyword values. +CFITSIO returns an error if there is not enough room for both the +keyword name and the keyword value on the 80-character card, except for +string-valued keywords which are simply truncated so that the closing +quote character falls in column 80. In the current implementation, +CFITSIO preserves the case of the letters when writing the keyword +name, but it is case-insensitive when reading or searching for a +keyword. The current implementation allows any ASCII text character +(ASCII 32 to ASCII 126) in the keyword name except for the '=' +character. A space is also required on either side of the equal sign. + +**F. Tile-Compressed Image Format + +CFITSIO supports a convention for compressing n-dimensional images and +storing the resulting byte stream in a variable-length column in a FITS +binary table. The general principle used in this convention is to +first divide the n-dimensional image into a rectangular grid of +subimages or `tiles'. Each tile is then compressed as a continuous +block of data, and the resulting compressed byte stream is stored in a +row of a variable length column in a FITS binary table. By dividing the +image into tiles it is generally possible to extract and uncompress +subsections of the image without having to uncompress the whole image. +The default tiling pattern treats each row of a 2-dimensional image (or +higher dimensional cube) as a tile, such that each tile contains NAXIS1 +pixels (except the default with the HCOMPRESS algorithm is to +compress the whole 2D image as a single tile). Any other rectangular +tiling pattern may also be defined. In +the case of relatively small images it may be sufficient to compress +the entire image as a single tile, resulting in an output binary table +with 1 row. In the case of 3-dimensional data cubes, it may be +advantageous to treat each plane of the cube as a separate tile if +application software typically needs to access the cube on a plane by +plane basis. + +See section 5.6 ``Image Compression'' +for more information on using this tile-compressed image format. + +*XII. Optimizing Programs + +CFITSIO has been carefully designed to obtain the highest possible +speed when reading and writing FITS files. In order to achieve the +best performance, however, application programmers must be careful to +call the CFITSIO routines appropriately and in an efficient sequence; +inappropriate usage of CFITSIO routines can greatly slow down the +execution speed of a program. + +The maximum possible I/O speed of CFITSIO depends of course on the type +of computer system that it is running on. As a rough guide, the +current generation of workstations can achieve speeds of 2 -- 10 MB/s +when reading or writing FITS images and similar, or slightly slower +speeds with FITS binary tables. Reading of FITS files can occur at +even higher rates (30MB/s or more) if the FITS file is still cached in +system memory following a previous read or write operation on the same +file. To more accurately predict the best performance that is possible +on any particular system, a diagnostic program called ``speed.c'' is +included with the CFITSIO distribution which can be run to +approximately measure the maximum possible speed of writing and reading +a test FITS file. + +The following 2 sections provide some background on how CFITSIO +internally manages the data I/O and describes some strategies that may +be used to optimize the processing speed of software that uses +CFITSIO. + +**A. How CFITSIO Manages Data I/O + +Many CFITSIO operations involve transferring only a small number of +bytes to or from the FITS file (e.g, reading a keyword, or writing a +row in a table); it would be very inefficient to physically read or +write such small blocks of data directly in the FITS file on disk, +therefore CFITSIO maintains a set of internal Input--Output (IO) +buffers in RAM memory that each contain one FITS block (2880 bytes) of +data. Whenever CFITSIO needs to access data in the FITS file, it first +transfers the FITS block containing those bytes into one of the IO +buffers in memory. The next time CFITSIO needs to access bytes in the +same block it can then go to the fast IO buffer rather than using a +much slower system disk access routine. The number of available IO +buffers is determined by the NIOBUF parameter (in fitsio2.h) and is +currently set to 40 by default. + +Whenever CFITSIO reads or writes data it first checks to see if that +block of the FITS file is already loaded into one of the IO buffers. +If not, and if there is an empty IO buffer available, then it will load +that block into the IO buffer (when reading a FITS file) or will +initialize a new block (when writing to a FITS file). If all the IO +buffers are already full, it must decide which one to reuse (generally +the one that has been accessed least recently), and flush the contents +back to disk if it has been modified before loading the new block. + +The one major exception to the above process occurs whenever a large +contiguous set of bytes are accessed, as might occur when reading or +writing a FITS image. In this case CFITSIO bypasses the internal IO +buffers and simply reads or writes the desired bytes directly in the +disk file with a single call to a low-level file read or write +routine. The minimum threshold for the number of bytes to read or +write this way is set by the MINDIRECT parameter and is currently set +to 3 FITS blocks = 8640 bytes. This is the most efficient way to read +or write large chunks of data and can achieve IO transfer rates of +5 -- 10MB/s or greater. Note that this fast direct IO process is not +applicable when accessing columns of data in a FITS table because the +bytes are generally not contiguous since they are interleaved by the +other columns of data in the table. This explains why the speed for +accessing FITS tables is generally slower than accessing +FITS images. + +Given this background information, the general strategy for efficiently +accessing FITS files should be apparent: when dealing with FITS +images, read or write large chunks of data at a time so that the direct +IO mechanism will be invoked; when accessing FITS headers or FITS +tables, on the other hand, once a particular FITS block has been +loading into one of the IO buffers, try to access all the needed +information in that block before it gets flushed out of the IO buffer. +It is important to avoid the situation where the same FITS block is +being read then flushed from a IO buffer multiple times. + +The following section gives more specific suggestions for optimizing +the use of CFITSIO. + +**B. Optimization Strategies + +1. When dealing with a FITS primary array or IMAGE extension, it is +more efficient to read or write large chunks of the image at a time +(at least 3 FITS blocks = 8640 bytes) so that the direct IO mechanism +will be used as described in the previous section. Smaller chunks of +data are read or written via the IO buffers, which is somewhat less +efficient because of the extra copy operation and additional +bookkeeping steps that are required. In principle it is more efficient +to read or write as big an array of image pixels at one time as +possible, however, if the array becomes so large that the operating +system cannot store it all in RAM, then the performance may be degraded +because of the increased swapping of virtual memory to disk. + +2. When dealing with FITS tables, the most important efficiency factor +in the software design is to read or write the data in the FITS file in +a single pass through the file. An example of poor program design +would be to read a large, 3-column table by sequentially reading the +entire first column, then going back to read the 2nd column, and +finally the 3rd column; this obviously requires 3 passes through the +file which could triple the execution time of an IO limited program. +For small tables this is not important, but when reading multi-megabyte +sized tables these inefficiencies can become significant. The more +efficient procedure in this case is to read or write only as many rows +of the table as will fit into the available internal IO buffers, then +access all the necessary columns of data within that range of rows. +Then after the program is completely finished with the data in those +rows it can move on to the next range of rows that will fit in the +buffers, continuing in this way until the entire file has been +processed. By using this procedure of accessing all the columns of a +table in parallel rather than sequentially, each block of the FITS file +will only be read or written once. + +The optimal number of rows to read or write at one time in a given +table depends on the width of the table row, on the number of IO +buffers that have been allocated in CFITSIO, and also on the number of +other FITS files that are open at the same time (since one IO buffer is +always reserved for each open FITS file). The CFITSIO Iterator routine +will automatically use the optimal-sized buffer, but there is also a +CFITSIO routine that will return the optimal number of rows for a given +table: fits\_get\_rowsize. It is not critical to use exactly the +value of nrows returned by this routine, as long as one does not exceed +it. Using a very small value however can also lead to poor performance +because of the overhead from the larger number of subroutine calls. + +The optimal number of rows returned by fits\_get\_rowsize is valid only +as long as the application program is only reading or writing data in +the specified table. Any other calls to access data in the table +header or in any other FITS file would cause additional blocks of data +to be loaded into the IO buffers displacing data from the original +table, and should be avoided during the critical period while the table +is being read or written. + +Occasionally it is necessary to simultaneously access more than one +FITS table, for example when transferring values from an input table to +an output table. In cases like this, one should call +fits\_get\_rowsize to get the optimal number of rows for each table +separately, than reduce the number of rows proportionally. For +example, if the optimal number of rows in the input table is 3600 and +is 1400 in the output table, then these values should be cut in half to +1800 and 700, respectively, if both tables are going to be accessed at +the same time. + +3. Use the CFITSIO Iterator routine. This routine provides a +more `object oriented' way of reading and writing FITS files +which automatically uses the most appropriate data buffer size +to achieve the maximum I/O throughput. + +4. Use binary table extensions rather than ASCII table +extensions for better efficiency when dealing with tabular data. The +I/O to ASCII tables is slower because of the overhead in formatting or +parsing the ASCII data fields and because ASCII tables are about twice +as large as binary tables with the same information content. + +5. Design software so that it reads the FITS header keywords in the +same order in which they occur in the file. When reading keywords, +CFITSIO searches forward starting from the position of the last keyword +that was read. If it reaches the end of the header without finding the +keyword, it then goes back to the start of the header and continues the +search down to the position where it started. In practice, as long as +the entire FITS header can fit at one time in the available internal IO +buffers, then the header keyword access will be very fast and it makes +little difference which order they are accessed. + +6. Avoid the use of scaling (by using the BSCALE and BZERO or TSCAL and +TZERO keywords) in FITS files since the scaling operations add to the +processing time needed to read or write the data. In some cases it may +be more efficient to temporarily turn off the scaling (using fits\_set\_bscale or +fits\_set\_tscale) and then read or write the raw unscaled values in the FITS +file. + +7. Avoid using the `implicit data type conversion' capability in +CFITSIO. For instance, when reading a FITS image with BITPIX = -32 +(32-bit floating point pixels), read the data into a single precision +floating point data array in the program. Forcing CFITSIO to convert +the data to a different data type can slow the program. + +8. Where feasible, design FITS binary tables using vector column +elements so that the data are written as a contiguous set of bytes, +rather than as single elements in multiple rows. For example, it is +faster to access the data in a table that contains a single row +and 2 columns with TFORM keywords equal to '10000E' and '10000J', than +it is to access the same amount of data in a table with 10000 rows +which has columns with the TFORM keywords equal to '1E' and '1J'. In +the former case the 10000 floating point values in the first column are +all written in a contiguous block of the file which can be read or +written quickly, whereas in the second case each floating point value +in the first column is interleaved with the integer value in the second +column of the same row so CFITSIO has to explicitly move to the +position of each element to be read or written. + +9. Avoid the use of variable length vector columns in binary tables, +since any reading or writing of these data requires that CFITSIO first +look up or compute the starting address of each row of data in the +heap. + +10. When copying data from one FITS table to another, it is faster to +transfer the raw bytes instead of reading then writing each column of +the table. The CFITSIO routines fits\_read\_tblbytes and +fits\_write\_tblbytes will perform low-level reads or writes of any +contiguous range of bytes in a table extension. These routines can be +used to read or write a whole row (or multiple rows for even greater +efficiency) of a table with a single function call. These routines +are fast because they bypass all the usual data scaling, error checking +and machine dependent data conversion that is normally done by CFITSIO, +and they allow the program to write the data to the output file in +exactly the same byte order. For these same reasons, these routines +can corrupt the FITS data file if used incorrectly because no +validation or machine dependent conversion is performed by these +routines. These routines are only recommended for optimizing critical +pieces of code and should only be used by programmers who thoroughly +understand the internal format of the FITS tables they are reading or +writing. + +11. Another strategy for improving the speed of writing a FITS table, +similar to the previous one, is to directly construct the entire byte +stream for a whole table row (or multiple rows) within the application +program and then write it to the FITS file with +fits\_write\_tblbytes. This avoids all the overhead normally present +in the column-oriented CFITSIO write routines. This technique should +only be used for critical applications because it makes the code more +difficult to understand and maintain, and it makes the code more system +dependent (e.g., do the bytes need to be swapped before writing to the +FITS file?). + +12. Finally, external factors such as the type of magnetic disk +controller (SCSI or IDE), the size of the disk cache, the average seek +speed of the disk, the amount of disk fragmentation, and the amount of +RAM available on the system can all have a significant impact on +overall I/O efficiency. For critical applications, a system +administrator should review the proposed system hardware to identify any +potential I/O bottlenecks. + + +\appendix +*1 Index of Routines +\begin{tabular}{lr} +fits\_add\_group\_member & \pageref{ffgtam} \\ +fits\_ascii\_tform & \pageref{ffasfm} \\ +fits\_binary\_tform & \pageref{ffbnfm} \\ +fits\_calculator & \pageref{ffcalc} \\ +fits\_calculator\_rng & \pageref{ffcalcrng} \\ +fits\_calc\_rows & \pageref{ffcrow} \\ +fits\_change\_group & \pageref{ffgtch} \\ +fits\_clear\_errmark & \pageref{ffpmrk} \\ +fits\_clear\_errmsg & \pageref{ffcmsg} \\ +fits\_close\_file & \pageref{ffclos} \\ +fits\_compact\_group & \pageref{ffgtcm} \\ +fits\_compare\_str & \pageref{ffcmps} \\ +fits\_compress\_heap & \pageref{ffcmph} \\ +fits\_copy\_cell2image & \pageref{copycell} \\ +fits\_copy\_col & \pageref{ffcpcl} \\ +fits\_copy\_data & \pageref{ffcpdt} \\ +fits\_copy\_file & \pageref{ffcpfl} \\ +fits\_copy\_group & \pageref{ffgtcp} \\ +fits\_copy\_hdu & \pageref{ffcopy} \\ +fits\_copy\_header & \pageref{ffcphd} \\ +fits\_copy\_image2cell & \pageref{copycell} \\ +fits\_copy\_image\_section & \pageref{ffcpimg} \\ +fits\_copy\_key & \pageref{ffcpky} \\ +fits\_copy\_member & \pageref{ffgmcp} \\ +fits\_create\_diskfile & \pageref{ffinit} \\ +fits\_create\_file & \pageref{ffinit} \\ +fits\_create\_group & \pageref{ffgtcr} \\ +fits\_create\_hdu & \pageref{ffcrhd} \\ +fits\_create\_img & \pageref{ffcrim} \\ +fits\_create\_memfile & \pageref{ffimem} \\ +fits\_create\_tbl & \pageref{ffcrtb} \\ +fits\_create\_template & \pageref{fftplt} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_date2str & \pageref{ffdt2s} \\ +fits\_decode\_chksum & \pageref{ffdsum} \\ +fits\_decode\_tdim & \pageref{ffdtdm} \\ +fits\_delete\_col & \pageref{ffdcol} \\ +fits\_delete\_file & \pageref{ffdelt} \\ +fits\_delete\_hdu & \pageref{ffdhdu} \\ +fits\_delete\_key & \pageref{ffdkey} \\ +fits\_delete\_record & \pageref{ffdrec} \\ +fits\_delete\_rowlist & \pageref{ffdrws} \\ +fits\_delete\_rowrange & \pageref{ffdrrg} \\ +fits\_delete\_rows & \pageref{ffdrow} \\ +fits\_encode\_chksum & \pageref{ffesum} \\ +fits\_file\_exists & \pageref{ffexist} \\ +fits\_file\_mode & \pageref{ffflmd} \\ +fits\_file\_name & \pageref{ffflnm} \\ +fits\_find\_first\_row & \pageref{ffffrw} \\ +fits\_find\_nextkey & \pageref{ffgnxk} \\ +fits\_find\_rows & \pageref{fffrow} \\ +fits\_flush\_buffer & \pageref{ffflus} \\ +fits\_flush\_file & \pageref{ffflus} \\ +fits\_get\_acolparms & \pageref{ffgacl} \\ +fits\_get\_bcolparms & \pageref{ffgbcl} \\ +fits\_get\_chksum & \pageref{ffgcks} \\ +fits\_get\_col\_display\_width & \pageref{ffgcdw} \\ +fits\_get\_colname & \pageref{ffgcnn} \\ +fits\_get\_colnum & \pageref{ffgcno} \\ +fits\_get\_coltype & \pageref{ffgtcl} \\ +fits\_get\_compression\_type & \pageref{ffgetcomp} \\ +fits\_get\_eqcoltype & \pageref{ffgtcl} \\ +fits\_get\_errstatus & \pageref{ffgerr} \\ +fits\_get\_hdrpos & \pageref{ffghps} \\ +fits\_get\_hdrspace & \pageref{ffghsp} \\ +\end{tabular} +\begin{tabular}{lr} +fits\_get\_hdu\_num & \pageref{ffghdn} \\ +fits\_get\_hdu\_type & \pageref{ffghdt} \\ +fits\_get\_hduaddr & \pageref{ffghad} \\ +fits\_get\_hduaddrll & \pageref{ffghad} \\ +fits\_get\_img\_dim & \pageref{ffgidm} \\ +fits\_get\_img\_equivtype & \pageref{ffgidt} \\ +fits\_get\_img\_param & \pageref{ffgipr} \\ +fits\_get\_img\_size & \pageref{ffgisz} \\ +fits\_get\_img\_type & \pageref{ffgidt} \\ +fits\_get\_keyclass & \pageref{ffgkcl} \\ +fits\_get\_keyname & \pageref{ffgknm} \\ +fits\_get\_keytype & \pageref{ffdtyp} \\ +fits\_get\_noise\_bits & \pageref{ffgetcomp} \\ +fits\_get\_num\_cols & \pageref{ffgnrw} \\ +fits\_get\_num\_groups & \pageref{ffgmng} \\ +fits\_get\_num\_hdus & \pageref{ffthdu} \\ +fits\_get\_num\_members & \pageref{ffgtnm} \\ +fits\_get\_num\_rows & \pageref{ffgnrw} \\ +fits\_get\_rowsize & \pageref{ffgrsz} \\ +fits\_get\_system\_time & \pageref{ffdt2s} \\ +fits\_get\_tile\_dim & \pageref{ffgetcomp} \\ +fits\_get\_tbcol & \pageref{ffgabc} \\ +fits\_get\_version & \pageref{ffvers} \\ +fits\_hdr2str & \pageref{ffhdr2str}, \pageref{hdr2str} \\ +fits\_insert\_atbl & \pageref{ffitab} \\ +fits\_insert\_btbl & \pageref{ffibin} \\ +fits\_insert\_col & \pageref{fficol} \\ +fits\_insert\_cols & \pageref{fficls} \\ +fits\_insert\_group & \pageref{ffgtis} \\ +fits\_insert\_img & \pageref{ffiimg} \\ +fits\_insert\_key\_null & \pageref{ffikyu} \\ +fits\_insert\_key\_TYP & \pageref{ffikyx} \\ +\end{tabular} +\newpage +\begin{tabular}{lr} +fits\_insert\_record & \pageref{ffirec} \\ +fits\_insert\_rows & \pageref{ffirow} \\ +fits\_iterate\_data & \pageref{ffiter} \\ +fits\_make\_keyn & \pageref{ffkeyn} \\ +fits\_make\_nkey & \pageref{ffnkey} \\ +fits\_merge\_groups & \pageref{ffgtmg} \\ +fits\_modify\_card & \pageref{ffmcrd} \\ +fits\_modify\_comment & \pageref{ffmcom} \\ +fits\_modify\_key\_null & \pageref{ffmkyu} \\ +fits\_modify\_key\_TYP & \pageref{ffmkyx} \\ +fits\_modify\_name & \pageref{ffmnam} \\ +fits\_modify\_record & \pageref{ffmrec} \\ +fits\_modify\_vector\_len & \pageref{ffmvec} \\ +fits\_movabs\_hdu & \pageref{ffmahd} \\ +fits\_movnam\_hdu & \pageref{ffmnhd} \\ +fits\_movrel\_hdu & \pageref{ffmrhd} \\ +fits\_null\_check & \pageref{ffnchk} \\ +fits\_open\_data & \pageref{ffopen} \\ +fits\_open\_diskfile & \pageref{ffopen} \\ +fits\_open\_file & \pageref{ffopen} \\ +fits\_open\_image & \pageref{ffopen} \\ +fits\_open\_table & \pageref{ffopen} \\ +fits\_open\_group & \pageref{ffgtop} \\ +fits\_open\_member & \pageref{ffgmop} \\ +fits\_open\_memfile & \pageref{ffomem} \\ +fits\_parse\_extnum & \pageref{ffextn} \\ +fits\_parse\_input\_url & \pageref{ffiurl} \\ +fits\_parse\_range & \pageref{ffrwrg} \\ +fits\_parse\_rootname & \pageref{ffrtnm} \\ +fits\_parse\_template & \pageref{ffgthd} \\ +fits\_parse\_value & \pageref{ffpsvc} \\ +fits\_pix\_to\_world & \pageref{ffwldp} \\ +fits\_read\_2d\_TYP & \pageref{ffg2dx} \\ +fits\_read\_3d\_TYP & \pageref{ffg3dx} \\ +fits\_read\_atblhdr & \pageref{ffghtb} \\ +fits\_read\_btblhdr & \pageref{ffghbn} \\ +fits\_read\_card & \pageref{ffgcrd} \\ +fits\_read\_col & \pageref{ffgcv} \\ +fits\_read\_col\_bit\_ & \pageref{ffgcx} \\ +fits\_read\_col\_TYP & \pageref{ffgcvx} \\ +fits\_read\_colnull & \pageref{ffgcf} \\ +fits\_read\_colnull\_TYP & \pageref{ffgcfx} \\ +fits\_read\_descript & \pageref{ffgdes} \\ +fits\_read\_descripts & \pageref{ffgdes} \\ +fits\_read\_errmsg & \pageref{ffgmsg} \\ +fits\_read\_ext & \pageref{ffgextn} \\ +fits\_read\_grppar\_TYP & \pageref{ffggpx} \\ +fits\_read\_img & \pageref{ffgpv} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_read\_img\_coord & \pageref{ffgics} \\ +fits\_read\_img\_TYP & \pageref{ffgpvx} \\ +fits\_read\_imghdr & \pageref{ffghpr} \\ +fits\_read\_imgnull & \pageref{ffgpf} \\ +fits\_read\_imgnull\_TYP & \pageref{ffgpfx} \\ +fits\_read\_key & \pageref{ffgky} \\ +fits\_read\_key\_longstr & \pageref{ffgkls} \\ +fits\_read\_key\_triple & \pageref{ffgkyt} \\ +fits\_read\_key\_unit & \pageref{ffgunt} \\ +fits\_read\_key\_TYP & \pageref{ffgkyx} \\ +fits\_read\_keyn & \pageref{ffgkyn} \\ +fits\_read\_keys\_TYP & \pageref{ffgknx} \\ +fits\_read\_keyword & \pageref{ffgkey} \\ +fits\_read\_pix & \pageref{ffgpxv} \\ +fits\_read\_pixnull & \pageref{ffgpxf} \\ +fits\_read\_record & \pageref{ffgrec} \\ +fits\_read\_subset\_TYP & \pageref{ffgsvx} \pageref{ffgsvx2}\\ +fits\_read\_subsetnull\_TYP & \pageref{ffgsfx} \pageref{ffgsfx2} \\ +fits\_read\_tbl\_coord & \pageref{ffgtcs} \\ +fits\_read\_tblbytes & \pageref{ffgtbb} \\ +fits\_read\_tdim & \pageref{ffgtdm} \\ +fits\_read\_wcstab & \pageref{wcstab} \\ +fits\_remove\_group & \pageref{ffgtrm} \\ +fits\_remove\_member & \pageref{ffgmrm} \\ +fits\_reopen\_file & \pageref{ffreopen} \\ +fits\_report\_error & \pageref{ffrprt} \\ +fits\_resize\_img & \pageref{ffrsim} \\ +fits\_rms\_float & \pageref{imageRMS} \\ +fits\_rms\_short & \pageref{imageRMS} \\ +fits\_select\_rows & \pageref{ffsrow} \\ +fits\_set\_atblnull & \pageref{ffsnul} \\ +fits\_set\_bscale & \pageref{ffpscl} \\ +fits\_set\_btblnull & \pageref{fftnul} \\ +fits\_set\_compression\_type & \pageref{ffsetcomp} \\ +fits\_set\_hdrsize & \pageref{ffhdef} \\ +fits\_set\_hdustruc & \pageref{ffrdef} \\ +fits\_set\_imgnull & \pageref{ffpnul} \\ +fits\_set\_noise\_bits & \pageref{ffsetcomp} \\ +fits\_set\_tile\_dim & \pageref{ffsetcomp} \\ +fits\_set\_tscale & \pageref{fftscl} \\ +fits\_split\_names & \pageref{splitnames} \\ +fits\_str2date & \pageref{ffdt2s} \\ +fits\_str2time & \pageref{ffdt2s} \\ +fits\_test\_expr & \pageref{fftexp} \\ +fits\_test\_heap & \pageref{fftheap} \\ +fits\_test\_keyword & \pageref{fftkey} \\ +fits\_test\_record & \pageref{fftrec} \\ +fits\_time2str & \pageref{ffdt2s} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_transfer\_member & \pageref{ffgmtf} \\ +fits\_translate\_keyword & \pageref{translatekey} \\ +fits\_update\_card & \pageref{ffucrd} \\ +fits\_update\_chksum & \pageref{ffupck} \\ +fits\_update\_key & \pageref{ffuky} \\ +fits\_update\_key\_longstr & \pageref{ffukyx} \\ +fits\_update\_key\_null & \pageref{ffukyu} \\ +fits\_update\_key\_TYP & \pageref{ffukyx} \\ +fits\_uppercase & \pageref{ffupch} \\ +fits\_url\_type & \pageref{ffurlt} \\ +fits\_verify\_chksum & \pageref{ffvcks} \\ +fits\_verify\_group & \pageref{ffgtvf} \\ +fits\_world\_to\_pix & \pageref{ffxypx} \\ +fits\_write\_2d\_TYP & \pageref{ffp2dx} \\ +fits\_write\_3d\_TYP & \pageref{ffp3dx} \\ +fits\_write\_atblhdr & \pageref{ffphtb} \\ +fits\_write\_btblhdr & \pageref{ffphbn} \\ +fits\_write\_chksum & \pageref{ffpcks} \\ +fits\_write\_col & \pageref{ffpcl} \\ +fits\_write\_col\_bit & \pageref{ffpclx} \\ +fits\_write\_col\_TYP & \pageref{ffpcls} \\ +fits\_write\_col\_null & \pageref{ffpclu} \\ +fits\_write\_colnull & \pageref{ffpcn} \\ +fits\_write\_colnull\_TYP & \pageref{ffpcnx} \\ +fits\_write\_comment & \pageref{ffpcom} \\ +fits\_write\_date & \pageref{ffpdat} \\ +fits\_write\_descript & \pageref{ffpdes} \\ +fits\_write\_errmark & \pageref{ffpmrk} \\ +fits\_write\_errmsg & \pageref{ffpmsg} \\ +fits\_write\_ext & \pageref{ffgextn} \\ +fits\_write\_exthdr & \pageref{ffphps} \\ +fits\_write\_grphdr & \pageref{ffphpr} \\ +fits\_write\_grppar\_TYP & \pageref{ffpgpx} \\ +fits\_write\_hdu & \pageref{ffwrhdu} \\ +fits\_write\_history & \pageref{ffphis} \\ +fits\_write\_img & \pageref{ffppr} \\ +fits\_write\_img\_null & \pageref{ffppru} \\ +fits\_write\_img\_TYP & \pageref{ffpprx} \\ +fits\_write\_imghdr & \pageref{ffphps} \\ +fits\_write\_imgnull & \pageref{ffppn} \\ +fits\_write\_imgnull\_TYP & \pageref{ffppnx} \\ +fits\_write\_key & \pageref{ffpky} \\ +fits\_write\_key\_longstr & \pageref{ffpkls} \\ +fits\_write\_key\_longwarn & \pageref{ffplsw} \\ +fits\_write\_key\_null & \pageref{ffpkyu} \\ +fits\_write\_key\_template & \pageref{ffpktp} \\ +fits\_write\_key\_triple & \pageref{ffpkyt} \\ +fits\_write\_key\_unit & \pageref{ffpunt} \\ + +\end{tabular} +\newpage +\begin{tabular}{lr} + +fits\_write\_key\_TYP & \pageref{ffpkyx} \\ +fits\_write\_keys\_TYP & \pageref{ffpknx} \\ +fits\_write\_null\_img & \pageref{ffpprn} \\ +fits\_write\_nullrows & \pageref{ffpclu} \\ +fits\_write\_pix & \pageref{ffppx} \\ +fits\_write\_pixnull & \pageref{ffppxn} \\ +fits\_write\_record & \pageref{ffprec} \\ +fits\_write\_subset & \pageref{ffpss} \\ +fits\_write\_subset\_TYP & \pageref{ffpssx} \\ +fits\_write\_tblbytes & \pageref{ffptbb} \\ +fits\_write\_tdim & \pageref{ffptdm} \\ +fits\_write\_theap & \pageref{ffpthp} \\ +\end{tabular} +\newpage + +\begin{tabular}{lr} +ffasfm & \pageref{ffasfm} \\ +ffbnfm & \pageref{ffbnfm} \\ +ffcalc & \pageref{ffcalc} \\ +ffcalc\_rng & \pageref{ffcalcrng} \\ +ffclos & \pageref{ffclos} \\ +ffcmph & \pageref{ffcmph} \\ +ffcmps & \pageref{ffcmps} \\ +ffcmrk & \pageref{ffpmrk} \\ +ffcmsg & \pageref{ffcmsg} \\ +ffcopy & \pageref{ffcopy} \\ +ffcpcl & \pageref{ffcpcl} \\ +ffcpdt & \pageref{ffcpdt} \\ +ffcpfl & \pageref{ffcpfl} \\ +ffcphd & \pageref{ffcphd} \\ +ffcpimg & \pageref{ffcpimg} \\ +ffcpky & \pageref{ffcpky} \\ +ffcrhd & \pageref{ffcrhd} \\ +ffcrim & \pageref{ffcrim} \\ +ffcrow & \pageref{ffcrow} \\ +ffcrtb & \pageref{ffcrtb} \\ +ffdcol & \pageref{ffdcol} \\ +ffdelt & \pageref{ffdelt} \\ +ffdhdu & \pageref{ffdhdu} \\ +ffdkey & \pageref{ffdkey} \\ +ffdkinit & \pageref{ffinit} \\ +ffdkopen & \pageref{ffopen} \\ +ffdopn & \pageref{ffopen} \\ +ffdrec & \pageref{ffdrec} \\ +ffdrow & \pageref{ffdrow} \\ +ffdrrg & \pageref{ffdrrg} \\ +ffdrws & \pageref{ffdrws} \\ +ffdsum & \pageref{ffdsum} \\ +ffdt2s & \pageref{ffdt2s} \\ +ffdtdm & \pageref{ffdtdm} \\ +ffdtyp & \pageref{ffdtyp} \\ +ffeqty & \pageref{ffgtcl} \\ +ffesum & \pageref{ffesum} \\ +ffexest & \pageref{ffexist} \\ +ffextn & \pageref{ffextn} \\ +ffffrw & \pageref{ffffrw} \\ +ffflmd & \pageref{ffflmd} \\ +ffflnm & \pageref{ffflnm} \\ +ffflsh & \pageref{ffflus} \\ +ffflus & \pageref{ffflus} \\ +fffrow & \pageref{fffrow} \\ +ffg2d\_ & \pageref{ffg2dx} \\ +ffg3d\_ & \pageref{ffg3dx} \\ +ffgabc & \pageref{ffgabc} \\ +\end{tabular} +\begin{tabular}{lr} +ffgacl & \pageref{ffgacl} \\ +ffgbcl & \pageref{ffgbcl} \\ +ffgcdw & \pageref{ffgcdw} \\ +ffgcf & \pageref{ffgcf} \\ +ffgcf\_ & \pageref{ffgcfx} \\ +ffgcks & \pageref{ffgcks} \\ +ffgcnn & \pageref{ffgcnn} \\ +ffgcno & \pageref{ffgcno} \\ +ffgcrd & \pageref{ffgcrd} \\ +ffgcv & \pageref{ffgcv} \\ +ffgcv\_ & \pageref{ffgcvx} \\ +ffgcx & \pageref{ffgcx} \\ +ffgdes & \pageref{ffgdes} \\ +ffgdess & \pageref{ffgdes} \\ +ffgerr & \pageref{ffgerr} \\ +ffgextn & \pageref{ffgextn} \\ +ffggp\_ & \pageref{ffggpx} \\ +ffghad & \pageref{ffghad} \\ +ffghbn & \pageref{ffghbn} \\ +ffghdn & \pageref{ffghdn} \\ +ffghdt & \pageref{ffghdt} \\ +ffghpr & \pageref{ffghpr} \\ +ffghps & \pageref{ffghps} \\ +ffghsp & \pageref{ffghsp} \\ +ffghtb & \pageref{ffghtb} \\ +ffgics & \pageref{ffgics} \\ +ffgidm & \pageref{ffgidm} \\ +ffgidt & \pageref{ffgidt} \\ +ffgiet & \pageref{ffgidt} \\ +ffgipr & \pageref{ffgipr} \\ +ffgisz & \pageref{ffgisz} \\ +ffgkcl & \pageref{ffgkcl} \\ +ffgkey & \pageref{ffgkey} \\ +ffgkls & \pageref{ffgkls} \\ +ffgkn\_ & \pageref{ffgknx} \\ +ffgknm & \pageref{ffgknm} \\ +ffgky & \pageref{ffgky} \\ +ffgkyn & \pageref{ffgkyn} \\ +ffgkyt & \pageref{ffgkyt} \\ +ffgky\_ & \pageref{ffgkyx} \\ +ffgmcp & \pageref{ffgmcp} \\ +ffgmng & \pageref{ffgmng} \\ +ffgmop & \pageref{ffgmop} \\ +ffgmrm & \pageref{ffgmrm} \\ +ffgmsg & \pageref{ffgmsg} \\ +ffgmtf & \pageref{ffgmtf} \\ +ffgncl & \pageref{ffgnrw} \\ +ffgnrw & \pageref{ffgnrw} \\ + +\end{tabular} +\begin{tabular}{lr} +ffgnxk & \pageref{ffgnxk} \\ +ffgpf & \pageref{ffgpf} \\ +ffgpf\_ & \pageref{ffgpfx} \\ +ffgpv & \pageref{ffgpv} \\ +ffgpv\_ & \pageref{ffgpvx} \\ +ffgpxv & \pageref{ffgpxv} \\ +ffgpxf & \pageref{ffgpxf} \\ +ffgrec & \pageref{ffgrec} \\ +ffgrsz & \pageref{ffgrsz} \\ +ffgsdt & \pageref{ffdt2s} \\ +ffgsf\_ & \pageref{ffgsfx} \pageref{ffgsfx2} \\ +ffgstm & \pageref{ffdt2s} \\ +ffgsv\_ & \pageref{ffgsvx} \pageref{ffgsvx2}\\ +ffgtam & \pageref{ffgtam} \\ +ffgtbb & \pageref{ffgtbb} \\ +ffgtch & \pageref{ffgtch} \\ +ffgtcl & \pageref{ffgtcl} \\ +ffgtcm & \pageref{ffgtcm} \\ +ffgtcp & \pageref{ffgtcp} \\ +ffgtcr & \pageref{ffgtcr} \\ +ffgtcs & \pageref{ffgtcs} \\ +ffgtdm & \pageref{ffgtdm} \\ +ffgthd & \pageref{ffgthd} \\ +ffgtis & \pageref{ffgtis} \\ +ffgtmg & \pageref{ffgtmg} \\ +ffgtnm & \pageref{ffgtnm} \\ +ffgtop & \pageref{ffgtop} \\ +ffgtrm & \pageref{ffgtrm} \\ +ffgtvf & \pageref{ffgtvf} \\ +ffgunt & \pageref{ffgunt} \\ +ffhdef & \pageref{ffhdef} \\ +ffibin & \pageref{ffibin} \\ +fficls & \pageref{fficls} \\ +fficol & \pageref{fficol} \\ +ffiimg & \pageref{ffiimg} \\ +ffikls & \pageref{ffikyx} \\ +ffikyu & \pageref{ffikyu} \\ +ffiky\_ & \pageref{ffikyx} \\ +ffimem & \pageref{ffimem} \\ +ffinit & \pageref{ffinit} \\ +ffiopn & \pageref{ffopen} \\ +ffirec & \pageref{ffirec} \\ +ffirow & \pageref{ffirow} \\ +ffitab & \pageref{ffitab} \\ +ffiter & \pageref{ffiter} \\ +ffiurl & \pageref{ffiurl} \\ +ffkeyn & \pageref{ffkeyn} \\ +ffmahd & \pageref{ffmahd} \\ + +\end{tabular} +\begin{tabular}{lr} + +ffmcom & \pageref{ffmcom} \\ +ffmcrd & \pageref{ffmcrd} \\ +ffmkls & \pageref{ffmkyx} \\ +ffmkyu & \pageref{ffmkyu} \\ +ffmky\_ & \pageref{ffmkyx} \\ +ffmnam & \pageref{ffmnam} \\ +ffmnhd & \pageref{ffmnhd} \\ +ffmrec & \pageref{ffmrec} \\ +ffmrhd & \pageref{ffmrhd} \\ +ffmvec & \pageref{ffmvec} \\ +ffnchk & \pageref{ffnchk} \\ +ffnkey & \pageref{ffnkey} \\ +ffomem & \pageref{ffomem} \\ +ffopen & \pageref{ffopen} \\ +ffp2d\_ & \pageref{ffp2dx} \\ +ffp3d\_ & \pageref{ffp3dx} \\ +ffpcks & \pageref{ffpcks} \\ +ffpcl & \pageref{ffpcl} \\ +ffpcls & \pageref{ffpcls} \\ +ffpcl\_ & \pageref{ffpclx} \\ +ffpclu & \pageref{ffpclu} \\ +ffpcn & \pageref{ffpcn} \\ +ffpcn\_ & \pageref{ffpcnx} \\ +ffpcom & \pageref{ffpcom} \\ +ffpdat & \pageref{ffpdat} \\ +ffpdes & \pageref{ffpdes} \\ +ffpextn & \pageref{ffgextn} \\ +ffpgp\_ & \pageref{ffpgpx} \\ +ffphbn & \pageref{ffphbn} \\ +ffphext & \pageref{ffphpr} \\ +ffphis & \pageref{ffphis} \\ +ffphpr & \pageref{ffphpr} \\ +ffphps & \pageref{ffphps} \\ +ffphtb & \pageref{ffphtb} \\ +ffpkls & \pageref{ffpkls} \\ +ffpkn\_ & \pageref{ffpknx} \\ +ffpktp & \pageref{ffpktp} \\ +ffpky & \pageref{ffpky} \\ +ffpkyt & \pageref{ffpkyt} \\ +ffpkyu & \pageref{ffpkyu} \\ +ffpky\_ & \pageref{ffpkyx} \\ +ffplsw & \pageref{ffplsw} \\ +ffpmrk & \pageref{ffpmrk} \\ +ffpmsg & \pageref{ffpmsg} \\ +ffpnul & \pageref{ffpnul} \\ +ffppn & \pageref{ffppn} \\ +ffppn\_ & \pageref{ffppnx} \\ +ffppr & \pageref{ffppr} \\ + +\end{tabular} +\begin{tabular}{lr} + +ffpprn & \pageref{ffpprn} \\ +ffppru & \pageref{ffppru} \\ +ffppr\_ & \pageref{ffpprx} \\ +ffppx & \pageref{ffppx} \\ +ffppxn & \pageref{ffppxn} \\ +ffprec & \pageref{ffprec} \\ +ffprwu & \pageref{ffpclu} \\ +ffpscl & \pageref{ffpscl} \\ +ffpss & \pageref{ffpss} \\ +ffpss\_ & \pageref{ffpssx} \\ +ffpsvc & \pageref{ffpsvc} \\ +ffptbb & \pageref{ffptbb} \\ +ffptdm & \pageref{ffptdm} \\ +ffpthp & \pageref{ffpthp} \\ +ffpunt & \pageref{ffpunt} \\ +ffrdef & \pageref{ffrdef} \\ +ffreopen & \pageref{ffreopen} \\ +ffrprt & \pageref{ffrprt} \\ +ffrsim & \pageref{ffrsim} \\ +ffrtnm & \pageref{ffrtnm} \\ +ffrwrg & \pageref{ffrwrg} \\ +ffs2dt & \pageref{ffdt2s} \\ +ffs2tm & \pageref{ffdt2s} \\ +ffsnul & \pageref{ffsnul} \\ +ffsrow & \pageref{ffsrow} \\ +fftexp & \pageref{fftexp} \\ +ffthdu & \pageref{ffthdu} \\ +fftheap & \pageref{fftheap} \\ +fftkey & \pageref{fftkey} \\ +fftm2s & \pageref{ffdt2s} \\ +fftnul & \pageref{fftnul} \\ +fftopn & \pageref{ffopen} \\ +fftplt & \pageref{fftplt} \\ +fftrec & \pageref{fftrec} \\ +fftscl & \pageref{fftscl} \\ +ffucrd & \pageref{ffucrd} \\ +ffukls & \pageref{ffukyx} \\ +ffuky & \pageref{ffuky} \\ +ffukyu & \pageref{ffukyu} \\ +ffuky\_ & \pageref{ffukyx} \\ +ffupch & \pageref{ffupch} \\ +ffupck & \pageref{ffupck} \\ +ffurlt & \pageref{ffurlt} \\ +ffvcks & \pageref{ffvcks} \\ +ffvers & \pageref{ffvers} \\ +ffwldp & \pageref{ffwldp} \\ +ffwrhdu & \pageref{ffwrhdu} \\ +ffxypx & \pageref{ffxypx} \\ +\end{tabular} + + + +*2 Parameter Definitions +- +anynul - set to TRUE (=1) if any returned values are undefined, else FALSE +array - array of numerical data values to read or write +ascii - encoded checksum string +binspec - the input table binning specifier +bitpix - bits per pixel. The following symbolic mnemonics are predefined: + BYTE_IMG = 8 (unsigned char) + SHORT_IMG = 16 (signed short integer) + LONG_IMG = 32 (signed long integer) + LONGLONG_IMG = 64 (signed long 64-bit integer) + FLOAT_IMG = -32 (float) + DOUBLE_IMG = -64 (double). + The LONGLONG_IMG type is experimental and is not officially + recognized in the FITS Standard document. + Two additional values, USHORT_IMG and ULONG_IMG are also available + for creating unsigned integer images. These are equivalent to + creating a signed integer image with BZERO offset keyword values + of 32768 or 2147483648, respectively, which is the convention that + FITS uses to store unsigned integers. +card - header record to be read or written (80 char max, null-terminated) +casesen - CASESEN (=1) for case-sensitive string matching, else CASEINSEN (=0) +cmopt - grouping table "compact" option parameter. Allowed values are: + OPT_CMT_MBR and OPT_CMT_MBR_DEL. +colname - name of the column (null-terminated) +colnum - column number (first column = 1) +colspec - the input file column specification; used to delete, create, or rename + table columns +comment - the keyword comment field (72 char max, null-terminated) +complm - should the checksum be complemented? +comptype - compression algorithm to use: GZIP_1, RICE_1, HCOMPRESS_1, or PLIO_1 +coordtype- type of coordinate projection (-SIN, -TAN, -ARC, -NCP, + -GLS, -MER, or -AIT) +cpopt - grouping table copy option parameter. Allowed values are: + OPT_GCP_GPT, OPT_GCP_MBR, OPT_GCP_ALL, OPT_MCP_ADD, OPT_MCP_NADD, + OPT_MCP_REPL, amd OPT_MCP_MOV. +create_col- If TRUE, then insert a new column in the table, otherwise + overwrite the existing column. +current - if TRUE, then the current HDU will be copied +dataok - was the data unit verification successful (=1) or + not (= -1). Equals zero if the DATASUM keyword is not present. +datasum - 32-bit 1's complement checksum for the data unit +dataend - address (in bytes) of the end of the HDU +datastart- address (in bytes) of the start of the data unit +datatype - specifies the data type of the value. Allowed value are: TSTRING, + TLOGICAL, TBYTE, TSBYTE, TSHORT, TUSHORT, TINT, TUINT, TLONG, TULONG, + TFLOAT, TDOUBLE, TCOMPLEX, and TDBLCOMPLEX +datestr - FITS date/time string: 'YYYY-MM-DDThh:mm:ss.ddd', 'YYYY-MM-dd', + or 'dd/mm/yy' +day - calendar day (UTC) (1-31) +decimals - number of decimal places to be displayed +deltasize - increment for allocating more memory +dim1 - declared size of the first dimension of the image or cube array +dim2 - declared size of the second dimension of the data cube array +dispwidth - display width of a column = length of string that will be read +dtype - data type of the keyword ('C', 'L', 'I', 'F' or 'X') + C = character string + L = logical + I = integer + F = floating point number + X = complex, e.g., "(1.23, -4.56)" +err_msg - error message on the internal stack (80 chars max) +err_text - error message string corresponding to error number (30 chars max) +exact - TRUE (=1) if the strings match exactly; + FALSE (=0) if wildcards are used +exclist - array of pointers to keyword names to be excluded from search +exists - flag indicating whether the file or compressed file exists on disk +expr - boolean or arithmetic expression +extend - TRUE (=1) if FITS file may have extensions, else FALSE (=0) +extname - value of the EXTNAME keyword (null-terminated) +extspec - the extension or HDU specifier; a number or name, version, and type +extver - value of the EXTVER keyword = integer version number +filename - full name of the FITS file, including optional HDU and filtering specs +filetype - type of file (file://, ftp://, http://, etc.) +filter - the input file filtering specifier +firstchar- starting byte in the row (first byte of row = 1) +firstfailed - member HDU ID (if positive) or grouping table GRPIDn index + value (if negative) that failed grouping table verification. +firstelem- first element in a vector (ignored for ASCII tables) +firstrow - starting row number (first row of table = 1) +following- if TRUE, any HDUs following the current HDU will be copied +fpixel - coordinate of the first pixel to be read or written in the + FITS array. The array must be of length NAXIS and have values such + that fpixel[0] is in the range 1 to NAXIS1, fpixel[1] is in the + range 1 to NAXIS2, etc. +fptr - pointer to a 'fitsfile' structure describing the FITS file. +frac - factional part of the keyword value +gcount - number of groups in the primary array (usually = 1) +gfptr - fitsfile* pointer to a grouping table HDU. +group - GRPIDn/GRPLCn index value identifying a grouping table HDU, or + data group number (=0 for non-grouped data) +grouptype - Grouping table parameter that specifies the columns to be + created in a grouping table HDU. Allowed values are: GT_ID_ALL_URI, + GT_ID_REF, GT_ID_POS, GT_ID_ALL, GT_ID_REF_URI, and GT_ID_POS_URI. +grpname - value to use for the GRPNAME keyword value. +hdunum - sequence number of the HDU (Primary array = 1) +hduok - was the HDU verification successful (=1) or + not (= -1). Equals zero if the CHECKSUM keyword is not present. +hdusum - 32 bit 1's complement checksum for the entire CHDU +hdutype - HDU type: IMAGE_HDU (0), ASCII_TBL (1), BINARY_TBL (2), ANY_HDU (-1) +header - returned character string containing all the keyword records +headstart- starting address (in bytes) of the CHDU +heapsize - size of the binary table heap, in bytes +history - the HISTORY keyword comment string (70 char max, null-terminated) +hour - hour within day (UTC) (0 - 23) +inc - sampling interval for pixels in each FITS dimension +inclist - array of pointers to matching keyword names +incolnum - input column number; range = 1 to TFIELDS +infile - the input filename, including path if specified +infptr - pointer to a 'fitsfile' structure describing the input FITS file. +intval - integer part of the keyword value +iomode - file access mode: either READONLY (=0) or READWRITE (=1) +keyname - name of a keyword (8 char max, null-terminated) +keynum - position of keyword in header (1st keyword = 1) +keyroot - root string for the keyword name (5 char max, null-terminated) +keysexist- number of existing keyword records in the CHU +keytype - header record type: -1=delete; 0=append or replace; + 1=append; 2=this is the END keyword +longstr - arbitrarily long string keyword value (null-terminated) +lpixel - coordinate of the last pixel to be read or written in the + FITS array. The array must be of length NAXIS and have values such + that lpixel[0] is in the range 1 to NAXIS1, lpixel[1] is in the + range 1 to NAXIS2, etc. +match - TRUE (=1) if the 2 strings match, else FALSE (=0) +maxdim - maximum number of values to return +member - row number of a grouping table member HDU. +memptr - pointer to the a FITS file in memory +mem_realloc - pointer to a function for reallocating more memory +memsize - size of the memory block allocated for the FITS file +mfptr - fitsfile* pointer to a grouping table member HDU. +mgopt - grouping table merge option parameter. Allowed values are: + OPT_MRG_COPY, and OPT_MRG_MOV. +minute - minute within hour (UTC) (0 - 59) +month - calendar month (UTC) (1 - 12) +morekeys - space in the header for this many more keywords +n_good_rows - number of rows evaluating to TRUE +namelist - string containing a comma or space delimited list of names +naxes - size of each dimension in the FITS array +naxis - number of dimensions in the FITS array +naxis1 - length of the X/first axis of the FITS array +naxis2 - length of the Y/second axis of the FITS array +naxis3 - length of the Z/third axis of the FITS array +nbytes - number of bytes or characters to read or write +nchars - number of characters to read or write +nelements- number of data elements to read or write +newfptr - returned pointer to the reopened file +newveclen- new value for the column vector repeat parameter +nexc - number of names in the exclusion list (may = 0) +nfound - number of keywords found (highest keyword number) +nkeys - number of keywords in the sequence +ninc - number of names in the inclusion list +nmembers - Number of grouping table members (NAXIS2 value). +nmove - number of HDUs to move (+ or -), relative to current position +nocomments - if equal to TRUE, then no commentary keywords will be copied +noisebits- number of bits to ignore when compressing floating point images +nrows - number of rows in the table +nstart - first integer value +nullarray- set to TRUE (=1) if corresponding data element is undefined +nulval - numerical value to represent undefined pixels +nulstr - character string used to represent undefined values in ASCII table +numval - numerical data value, of the appropriate data type +offset - byte offset in the heap or data unit to the first element of the vector +openfptr - pointer to a currently open FITS file +overlap - number of bytes in the binary table heap pointed to by more than 1 + descriptor +outcolnum- output column number; range = 1 to TFIELDS + 1 +outfile - and optional output filename; the input file will be copied to this prior + to opening the file +outfptr - pointer to a 'fitsfile' structure describing the output FITS file. +pcount - value of the PCOUNT keyword = size of binary table heap +previous - if TRUE, any previous HDUs in the input file will be copied. +repeat - length of column vector (e.g. 12J); == 1 for ASCII table +rmopt - grouping table remove option parameter. Allowed values are: + OPT_RM_GPT, OPT_RM_ENTRY, OPT_RM_MBR, and OPT_RM_ALL. +rootname - root filename, minus any extension or filtering specifications +rot - celestial coordinate rotation angle (degrees) +rowlen - length of a table row, in characters or bytes +rowlist - sorted list of row numbers to be deleted from the table +rownum - number of the row (first row = 1) +rowrange - list of rows or row ranges: '3,6-8,12,56-80' or '500-' +row_status - array of True/False results for each row that was evaluated +scale - linear scaling factor; true value = (FITS value) * scale + zero +second - second within minute (0 - 60.9999999999) (leap second!) +section - section of image to be copied (e.g. 21:80,101:200) +simple - TRUE (=1) if FITS file conforms to the Standard, else FALSE (=0) +space - number of blank spaces to leave between ASCII table columns +status - returned error status code (0 = OK) +sum - 32 bit unsigned checksum value +tbcol - byte position in row to start of column (1st col has tbcol = 1) +tdisp - Fortran style display format for the table column +tdimstr - the value of the TDIMn keyword +templt - template string used in comparison (null-terminated) +tfields - number of fields (columns) in the table +tfopt - grouping table member transfer option parameter. Allowed values are: + OPT_MCP_ADD, and OPT_MCP_MOV. +tform - format of the column (null-terminated); allowed values are: + ASCII tables: Iw, Aw, Fww.dd, Eww.dd, or Dww.dd + Binary tables: rL, rX, rB, rI, rJ, rA, rAw, rE, rD, rC, rM + where 'w'=width of the field, 'd'=no. of decimals, 'r'=repeat count. + Variable length array columns are denoted by a '1P' before the data type + character (e.g., '1PJ'). When creating a binary table, 2 addition tform + data type codes are recognized by CFITSIO: 'rU' and 'rV' for unsigned + 16-bit and unsigned 32-bit integer, respectively. + +theap - zero indexed byte offset of starting address of the heap + relative to the beginning of the binary table data +tilesize - array of length NAXIS that specifies the dimensions of + the image compression tiles +ttype - label or name for table column (null-terminated) +tunit - physical unit for table column (null-terminated) +typechar - symbolic code of the table column data type +typecode - data type code of the table column. The negative of + the value indicates a variable length array column. + Datatype typecode Mnemonic + bit, X 1 TBIT + byte, B 11 TBYTE + logical, L 14 TLOGICAL + ASCII character, A 16 TSTRING + short integer, I 21 TSHORT + integer, J 41 TINT32BIT (same as TLONG) + long long integer, K 81 TLONGLONG + real, E 42 TFLOAT + double precision, D 82 TDOUBLE + complex, C 83 TCOMPLEX + double complex, M 163 TDBLCOMPLEX +unit - the physical unit string (e.g., 'km/s') for a keyword +unused - number of unused bytes in the binary table heap +urltype - the file type of the FITS file (file://, ftp://, mem://, etc.) +validheap- returned value = FALSE if any of the variable length array + address are outside the valid range of addresses in the heap +value - the keyword value string (70 char max, null-terminated) +version - current version number of the CFITSIO library +width - width of the character string field +xcol - number of the column containing the X coordinate values +xinc - X axis coordinate increment at reference pixel (deg) +xpix - X axis pixel location +xpos - X axis celestial coordinate (usually RA) (deg) +xrefpix - X axis reference pixel array location +xrefval - X axis coordinate value at the reference pixel (deg) +ycol - number of the column containing the X coordinate values +year - calendar year (e.g. 1999, 2000, etc) +yinc - Y axis coordinate increment at reference pixel (deg) +ypix - y axis pixel location +ypos - y axis celestial coordinate (usually DEC) (deg) +yrefpix - Y axis reference pixel array location +yrefval - Y axis coordinate value at the reference pixel (deg) +zero - scaling offset; true value = (FITS value) * scale + zero +- + +*3 CFITSIO Error Status Codes + +The following table lists all the error status codes used by CFITSIO. +Programmers are encouraged to use the symbolic mnemonics (defined in +the file fitsio.h) rather than the actual integer status values to +improve the readability of their code. +- + Symbolic Const Value Meaning + -------------- ----- ----------------------------------------- + 0 OK, no error + SAME_FILE 101 input and output files are the same + TOO_MANY_FILES 103 tried to open too many FITS files at once + FILE_NOT_OPENED 104 could not open the named file + FILE_NOT_CREATED 105 could not create the named file + WRITE_ERROR 106 error writing to FITS file + END_OF_FILE 107 tried to move past end of file + READ_ERROR 108 error reading from FITS file + FILE_NOT_CLOSED 110 could not close the file + ARRAY_TOO_BIG 111 array dimensions exceed internal limit + READONLY_FILE 112 Cannot write to readonly file + MEMORY_ALLOCATION 113 Could not allocate memory + BAD_FILEPTR 114 invalid fitsfile pointer + NULL_INPUT_PTR 115 NULL input pointer to routine + SEEK_ERROR 116 error seeking position in file + + BAD_URL_PREFIX 121 invalid URL prefix on file name + TOO_MANY_DRIVERS 122 tried to register too many IO drivers + DRIVER_INIT_FAILED 123 driver initialization failed + NO_MATCHING_DRIVER 124 matching driver is not registered + URL_PARSE_ERROR 125 failed to parse input file URL + RANGE_PARSE_ERROR 126 parse error in range list + + SHARED_BADARG 151 bad argument in shared memory driver + SHARED_NULPTR 152 null pointer passed as an argument + SHARED_TABFULL 153 no more free shared memory handles + SHARED_NOTINIT 154 shared memory driver is not initialized + SHARED_IPCERR 155 IPC error returned by a system call + SHARED_NOMEM 156 no memory in shared memory driver + SHARED_AGAIN 157 resource deadlock would occur + SHARED_NOFILE 158 attempt to open/create lock file failed + SHARED_NORESIZE 159 shared memory block cannot be resized at the moment + + HEADER_NOT_EMPTY 201 header already contains keywords + KEY_NO_EXIST 202 keyword not found in header + KEY_OUT_BOUNDS 203 keyword record number is out of bounds + VALUE_UNDEFINED 204 keyword value field is blank + NO_QUOTE 205 string is missing the closing quote + BAD_INDEX_KEY 206 illegal indexed keyword name (e.g. 'TFORM1000') + BAD_KEYCHAR 207 illegal character in keyword name or card + BAD_ORDER 208 required keywords out of order + NOT_POS_INT 209 keyword value is not a positive integer + NO_END 210 couldn't find END keyword + BAD_BITPIX 211 illegal BITPIX keyword value + BAD_NAXIS 212 illegal NAXIS keyword value + BAD_NAXES 213 illegal NAXISn keyword value + BAD_PCOUNT 214 illegal PCOUNT keyword value + BAD_GCOUNT 215 illegal GCOUNT keyword value + BAD_TFIELDS 216 illegal TFIELDS keyword value + NEG_WIDTH 217 negative table row size + NEG_ROWS 218 negative number of rows in table + COL_NOT_FOUND 219 column with this name not found in table + BAD_SIMPLE 220 illegal value of SIMPLE keyword + NO_SIMPLE 221 Primary array doesn't start with SIMPLE + NO_BITPIX 222 Second keyword not BITPIX + NO_NAXIS 223 Third keyword not NAXIS + NO_NAXES 224 Couldn't find all the NAXISn keywords + NO_XTENSION 225 HDU doesn't start with XTENSION keyword + NOT_ATABLE 226 the CHDU is not an ASCII table extension + NOT_BTABLE 227 the CHDU is not a binary table extension + NO_PCOUNT 228 couldn't find PCOUNT keyword + NO_GCOUNT 229 couldn't find GCOUNT keyword + NO_TFIELDS 230 couldn't find TFIELDS keyword + NO_TBCOL 231 couldn't find TBCOLn keyword + NO_TFORM 232 couldn't find TFORMn keyword + NOT_IMAGE 233 the CHDU is not an IMAGE extension + BAD_TBCOL 234 TBCOLn keyword value < 0 or > rowlength + NOT_TABLE 235 the CHDU is not a table + COL_TOO_WIDE 236 column is too wide to fit in table + COL_NOT_UNIQUE 237 more than 1 column name matches template + BAD_ROW_WIDTH 241 sum of column widths not = NAXIS1 + UNKNOWN_EXT 251 unrecognizable FITS extension type + UNKNOWN_REC 252 unknown record; 1st keyword not SIMPLE or XTENSION + END_JUNK 253 END keyword is not blank + BAD_HEADER_FILL 254 Header fill area contains non-blank chars + BAD_DATA_FILL 255 Illegal data fill bytes (not zero or blank) + BAD_TFORM 261 illegal TFORM format code + BAD_TFORM_DTYPE 262 unrecognizable TFORM data type code + BAD_TDIM 263 illegal TDIMn keyword value + BAD_HEAP_PTR 264 invalid BINTABLE heap pointer is out of range + + BAD_HDU_NUM 301 HDU number < 1 + BAD_COL_NUM 302 column number < 1 or > tfields + NEG_FILE_POS 304 tried to move to negative byte location in file + NEG_BYTES 306 tried to read or write negative number of bytes + BAD_ROW_NUM 307 illegal starting row number in table + BAD_ELEM_NUM 308 illegal starting element number in vector + NOT_ASCII_COL 309 this is not an ASCII string column + NOT_LOGICAL_COL 310 this is not a logical data type column + BAD_ATABLE_FORMAT 311 ASCII table column has wrong format + BAD_BTABLE_FORMAT 312 Binary table column has wrong format + NO_NULL 314 null value has not been defined + NOT_VARI_LEN 317 this is not a variable length column + BAD_DIMEN 320 illegal number of dimensions in array + BAD_PIX_NUM 321 first pixel number greater than last pixel + ZERO_SCALE 322 illegal BSCALE or TSCALn keyword = 0 + NEG_AXIS 323 illegal axis length < 1 + + NOT_GROUP_TABLE 340 Grouping function error + HDU_ALREADY_MEMBER 341 + MEMBER_NOT_FOUND 342 + GROUP_NOT_FOUND 343 + BAD_GROUP_ID 344 + TOO_MANY_HDUS_TRACKED 345 + HDU_ALREADY_TRACKED 346 + BAD_OPTION 347 + IDENTICAL_POINTERS 348 + BAD_GROUP_ATTACH 349 + BAD_GROUP_DETACH 350 + + NGP_NO_MEMORY 360 malloc failed + NGP_READ_ERR 361 read error from file + NGP_NUL_PTR 362 null pointer passed as an argument. + Passing null pointer as a name of + template file raises this error + NGP_EMPTY_CURLINE 363 line read seems to be empty (used + internally) + NGP_UNREAD_QUEUE_FULL 364 cannot unread more then 1 line (or single + line twice) + NGP_INC_NESTING 365 too deep include file nesting (infinite + loop, template includes itself ?) + NGP_ERR_FOPEN 366 fopen() failed, cannot open template file + NGP_EOF 367 end of file encountered and not expected + NGP_BAD_ARG 368 bad arguments passed. Usually means + internal parser error. Should not happen + NGP_TOKEN_NOT_EXPECT 369 token not expected here + + BAD_I2C 401 bad int to formatted string conversion + BAD_F2C 402 bad float to formatted string conversion + BAD_INTKEY 403 can't interpret keyword value as integer + BAD_LOGICALKEY 404 can't interpret keyword value as logical + BAD_FLOATKEY 405 can't interpret keyword value as float + BAD_DOUBLEKEY 406 can't interpret keyword value as double + BAD_C2I 407 bad formatted string to int conversion + BAD_C2F 408 bad formatted string to float conversion + BAD_C2D 409 bad formatted string to double conversion + BAD_DATATYPE 410 illegal datatype code value + BAD_DECIM 411 bad number of decimal places specified + NUM_OVERFLOW 412 overflow during data type conversion + DATA_COMPRESSION_ERR 413 error compressing image + DATA_DECOMPRESSION_ERR 414 error uncompressing image + + BAD_DATE 420 error in date or time conversion + + PARSE_SYNTAX_ERR 431 syntax error in parser expression + PARSE_BAD_TYPE 432 expression did not evaluate to desired type + PARSE_LRG_VECTOR 433 vector result too large to return in array + PARSE_NO_OUTPUT 434 data parser failed not sent an out column + PARSE_BAD_COL 435 bad data encounter while parsing column + PARSE_BAD_OUTPUT 436 Output file not of proper type + + ANGLE_TOO_BIG 501 celestial angle too large for projection + BAD_WCS_VAL 502 bad celestial coordinate or pixel value + WCS_ERROR 503 error in celestial coordinate calculation + BAD_WCS_PROJ 504 unsupported type of celestial projection + NO_WCS_KEY 505 celestial coordinate keywords not found + APPROX_WCS_KEY 506 approximate wcs keyword values were returned +- +\end{document} + diff --git a/software/cfitsio3040/cfitsio.pc b/software/cfitsio3040/cfitsio.pc new file mode 100644 index 000000000..db0667916 --- /dev/null +++ b/software/cfitsio3040/cfitsio.pc @@ -0,0 +1,10 @@ +prefix=/Users/jmatthews/Documents/Python/software/cfitsio3040 +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: cfitsio +Description: FITS File Subroutine Library +Version: 3.006 +Libs: -L${libdir} -lcfitsio -lm +Cflags: -I${includedir} diff --git a/software/cfitsio3040/cfitsio.pc.in b/software/cfitsio3040/cfitsio.pc.in new file mode 100644 index 000000000..1344af262 --- /dev/null +++ b/software/cfitsio3040/cfitsio.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: cfitsio +Description: FITS File Subroutine Library +Version: 3.006 +Libs: -L${libdir} -lcfitsio @LIBS@ -lm +Cflags: -I${includedir} diff --git a/software/cfitsio3040/cfitsio.ps b/software/cfitsio3040/cfitsio.ps new file mode 100644 index 0000000000000000000000000000000000000000..e28f229adc8c2ca08ce0434b50c5879d9ae105df GIT binary patch literal 914733 zcmeF)>vJU6ktO)=@mFNqn#?5IAv4~YL9;RI$d^{Lt!fR)QFE5Y4=5n33L_K%0VtBy zF#hlJJCO+#SR^H?#Zk9Rf6U){~>vaDwxpPZeao?OhfZ}+oLu3p@I zb#k-!?N86|F7_YIPG6kg-JV~4=onu7-O0=S?MJg}u{=Kc=bN*=GmN*V`^z)0t*+i& zo}FL5TwQ(r(X8~pzN%-7q4w71>h#U){pH>6>hjJp*1uhS=DqcAKR*7qJiL@YpZrsm zKc9X&{rTj7PJe#;n<{tpf9H+E!|mnS`s#I#d0YHq^ZVcY?vsDnKhGt8H2dXOUw!rA z&Ed}WZ}%UbUcLU+@iY0#$>rHUonQLgG&Hjho|O+bdi>DuPHs+K@9*|EuJr8s{J-{P z`Cn!Za(%PEz1_Rh>2#l5y}3Dcl-Z~I&t_L|?ylcVW4idTY(A{&kE*(9GA8?%=a;{` zxjOx1fA`VsZvXY^hu1e(#V`J$nET%5{Pb?tl;zAU+|ADRFLJQy#pn6n{Mo(NzVYvT zb^rYQ@+=?u=Gpv{d&ha@!DsiM6wkg{&Byz*H`o4t`tkkU&B^8M#mU{?+vm3zx3d=~ z7q|P_v-y{|=l{B&Rn=@!&tAW|@XD*{mF0(>mx{wn7Y670;?3<)-cR3~&i#)J=KS(L zN4x*LoIUwWHT$6Y=Kh0fR(*5+VxRMrg^B;-^y>2ToPYMsmI7Y#N9ACx`ps_@U|Erkg4sF74Bgb3so& z`}Ej{gFbw_nw^}TO{4Vb$DbFkPwsBczn-1Gxw&C(hiCWWY@FT1;AgjQp3hF6-_FVp zOaD}}i@W>j4QKo2#nsKp#l_)+MK1REojm;Fc7HsWsrtv?&%C(%?aAHe)wCqd zRVJu-Hs7sQCUg4V7tiLGmmWTw|7LsmdwO>>JwJQ#!QILE#eLpi9<21)%;U*Ci+Psw zr*E(Kv&MJx#ECLgFD~zHzCOOR;tpm`HhVU^_2%Wv`STNo^4aX<=H}#WF<+hg*7fb| zv-#@H`Ni4#)yd6${xdz>-x!^)Y$}Cs+Y{uEl#{2n;tE-t2eBrF$)Wvi#i}d>K z?DR{go?Tp>oVf+pYGCHa`}y2p+`c&8*?k^XuJUlT8Kl{>;&{hCc=qD#OUWaV)G;E+*IZc#W(1`m6i3OP^irFJIohnst-qyxeEn z)~~+xR{QW)k@vp7uj=LO=~tVF_wzR&dHb!e*N<;k^^P8^@e@>@AFR!ORr-whko}N6J(EHny zFByyj-CS83pUlRCK{&~*o^f*fuXDoLCy$mfJ)17V7<@J}$Pe>rP`>7H)?d%oZ)fXQ z(;el>SJV3S8Ur~!IeoQ1+kbg}y3ZRvmF4noIehS8M`-8FOxW|R=Mjy{{adY^d3w^kb>EU#c z$@QIm^Tl`oD!KaN82z5jH}~_?tb%d&Js#!@Q_pL@^8!8^uaiNzynGiRGV7mA?|c#u zT*W)Zo{sMH;Lq6H(Zmny!w0iw9jnM`{C)6blX;y@A@(=-PI(x}4SRcjb$$Qlc7HR4 zSx-KAb#?WJ*&i;izPh|G9-cee{FC3zCTI3+c7RBXptMlG+}~Zze?L0_g>S018IG)Y-F0^nFM=vsayl8Jc zz37Lh8G+kZS6^LoKfxT(#LeA(@%Xjr`O`1Hdtn+pj`t~M`fUCLOnp{V&`$%BS!>t%KZl-z}Ea zhl_qX%>lA~_U#uBnD(=8o)z=!``oMh{P;WY=h=Ls8Sj*$M~`3f-V{{H1;zn^|QOBD2fk2s?v7RJ;p=?~ZhI%PZD@ytvCfdj*%K#D+(C{RBck1=i>9K5$rq zvuQ?eE&#E+E0gM8g4!Nl@a_S`9bcF{`RwsZgwy-OaTvnc{^IUrvWp1~kH;52^U}@Z zhkkqi$?O{P%SW@0^U-*dy!`Ow^!|f(_S+os{)1+Eu)qJHo*ukN9+kIV-k1JDY_B-? zyl^fwUDB1k7d(G3jaA@!ArY3Z zAJgFPWW_HQ&-=5cE)D3h*6$((|`Nvzl-U=%jv(v^xxZy@C(NSoV~exHGTQ! z_}?7irds$+&_USLO#$GN?j-oLF%uis)ira$@i?QOn(dwY2Q zc&WFyXQzil-JUXY=3r_mlIN`OyEkzCFK?v(JC`DsSBS&p*H3 zzdR}CFJ8>%FFbv5;os>&9-Up`j9k{^qyIIVzr2ZA%ui0=-1&2Qa+BjdzuAAeFXXSM z)6=Ac-rJu6QcnAFe-no0Ip$)1;!9Wg7oh>G%*U;3$iLI`Vt)JPdg5eebDr_ydi~S3q zm>wQqKDp(#&p~!@?2T)~2W6CAy}f?5zZ7h|38BxASNgB}n=99S>EiFc^62i>&EDe| zIHQbR2IW?sJij#*u5BMiu9#nPRXOrB?6>>Z=f{VKyE}tFeDsgVfZV9e0i|+y@!^@9 za+q;8U(M!g^E{hxXY<``{_ENN|C!ByGn@an+5G=C+g3+5BG} z;qq*5g-I zeR67D{*^xBIJi$nXYv~H6tR5&n&cnvHDsPoyax05w|I@>iPv~%2v3dU&zr=P8~XDf z{u8G4^Kt(4()$lGKE)T|+W!o2DTf!&pT9Uc{fU6f?M1@3F#hgO0{`7zLi^p_FopGp zbN*yu-Qq}C7dmckuD*K1?M@FK0*iQhD?;Puk3sg~jd$^<_zPqI53J(iFNpoK`IqOn z=g$F-IIV|EI|du^Ul93Gq5l}s-Vgoac~HQQ3H=kG_};*Q|B>G?E6$E*2H#Q(O5{CThaAH?-M29LkV^&A(_kBIukpU4cp zJGejSRE~@E&pDL|L;lHx;{O0N__oEo!;as*z4u@Fo6ObwCw;V(?>_kXdj5~Xj2{IL zo^d6JcrJ#s2Bz<7W~bF7^*+ zuv(|*4@W*e!@?flNbUBo;or4<|Z2c{tDGDa5Nltz(eP!v~=8JqT?2=<};g%JlH^>gMj% z-fSI@a!YzLJ(t)VuK9R-2Nd_*Kqhg2c=q&6aMGLW<6%5L0K10|zJJQE;JxEvrc)lC zX9!#nBI4wNf!v(GHXrAgir?pVj7q$YLdT?jbs5}({XaQi$%jYhm%=B)1I=Nz@h_Km=Xr8*^)jL*S-dxx#M^0}KYjrq+=XBH&GAt&r-NZG=wGPT zEU_##oi~ShWwXZg&tRwG$8jYO*vS=#;hKo~+x=NN%$ZgO(6MTGfeCsJ#3T`?c$lxDg+|eo?pFezW zLRKd?6NH{jA$DMjo|?s%g<9PsF8nHs>J>wniXii&?kY6a<7<~E&qM8HSTKSNWg3!O z^v=_f%Jak0y8YwPhH*C2Dt`CE!=Rp>yu=i8RMX$-azXYJhtI5@Ua01CVw3YiG40j4 z9Q^tuK5e>{-2cxp^3TP{e}|~?KE`>78xL{hAzb_gafG=Z;|a6+H^vdZ+=BC*XIGOucu#2hE`dq#42wWd7<0)|c5sB%KC|R9c zT)z^5o=*j@mxn6Yp;9~FAL?9{n!@z%^dFEarLl8m42216SJ_K}X{wXGeiL>{Ap)6w z?cbYMu!@@%JN-@7W@NCBu`fyI-yw~Uc<0$?+9VRcm%4?62 z3V?Y<0{R3vCM5+012sOU0s~r-n|V8 zsHXMsWFoj8p5%7axZXWYt?S7%Q10C`wXcUKs(7h^Jv@czQVVQ( z@yP}))xk$}?>SkEAr$k$#k2Di9>$-PB6|T>vH>~}XvX=dRRPS~i#IpV_i_lgD|XSdoMceGgp{ssOwqZEV1D0q zbbrw+|9P>}k0-!>*w1|5=sXZ$f05@gU*GXOZ0IlaJg~x3&%=ab1b-eHeD^cocVj;v z=UwUe?|OWG6f{`0CofJH?N3$Xdj9p@0UW$|F=2!k$7koyry|$knU73`uL&&NMecGp zVTCu3Na5kCetM+vZ!1#^^H0jue|vFD#3|tdxcY;<1yp#DxBNhjYl@J6y2e!;LBxGBN#$HwwMA#W+>pFL1E-{M1lmbW~HfWK?c_IMXh z9!zomXL-vHNT2@GP4^L{{Cr>E%YXc+(63wd`u3q+_1lf9H!tpS{AW{xo7U3@q57eR zB7GAFZ9D<qECC|q2nVL_Hg#; zl_Ia0u7|H2+h>lSdA!nNAL?|S3L4Wl?jJ^ax>#xN z{GnUsy@Nh&U~C>o`1Q#jrk+MA`_y-tR?9EaZkdbr@BE)Bv`y?MnpyACl3b|rr)THt zcIv`01r*}byBQ5K_QTxbcB7b|4zc}Oo#$+N`|-q&y)x4$KHg8LZ$Et|jfI~W)XSH* zvm1?mr+>JA*DreLILHEUEuT+)6S*oqfbYIE^;Ar~Ju?NR7~w;r^zJxQW5r=&9-EpT zkmvmu(-AVR_sX3}2m17zKRnE#E}@4{KAKqWBJCI7uP)1Nr9=ME=lFdX~|6i_ul@Bdu<7-^X>B;4c zQNGfRs8EK?_~h#JoaKBt8}(*>9Nc!BmT8@W`?C)V-Q(|;$D#fAHmpX9RMKll#W|BU@R{4|K)dH+Od_wDf$ zy83C;Z)U%}B4N6G|D*qMK(4?1Ep_^v*YCgko4XSY3FB1I{Ge(-EZf7~o!{=xzuuqy z?)*+I_|XP4@zEFW zo#oN~9$T@r%ufARvq!Hn+3+aFBzdlQ`C>C{`hM3p&1%{9z<6y;!V@uBms+ZnLba^`hKVZ9R$l6zZYbBQ z-MC%1i+(pYzVG7J%WBcBhjG_c&2DQDt6^PlHk-O%ZPpGtG{bT=?AlG)Y&y?2yLCA< zrJ-E*{kB>g*(QUqsvNFc7Q?m~+U0JyDp&1xQ5wN|yB-$(rtiwZ?Y6Get@z)fS~pc$ zZF=L`o1Lm@7Ry~xSKD>dw+3z4Zr9t=wXM2#)h-tGw%e@7WxXjk?P$bzZM`#rjj3(N zX0>a_YPIQ$viG%W**8_US#5{)ZnIuhW7(9AG4QX8U#vIHxEq(dak z#woe-db4P^#;3Ic7Pa#V48z*!jhklU9_!i&4t-TDw&l2C6w_7L^|&6pZM#`-T2{o| zD%afgF}+paSDTWJw;dbVYaN~7t*NmHyL#1F z9T=k!$3<6G)mXE#rFrU_6-!x_b=#N2Vr|Z=Rky2) zwG(tMt!m5Fw&_;&X64q0<+2=D%-T2%Rk_=22PSRZbqlM0T(3$OZm>(H+!`_qamC6y zGt_N*^S3OUs@illCsSG_yM-mR;81qWSUI(U-)_vdsV_!8qaAizAFs;ga!n$(7>0Gf zEti99c05O2x7&JCudJB$W>@WYya(r2Gm@_8j2eH_)@{?p2l9kN*>$_!lBLya@0rME z-S&fP9IS`h(2boz>R02i8;W&Zwblen8wW!;aF81&=xSZ23oiS%^(pua4WHAiO zO#bQCghdEj_o&Ooo{+P2Q><$F|;Xc;)qKG(d)QgAvdZma~QhSy5!MCh-J^O44yT-j9X|pjdfQn zcgxMfq{q@lUNe;2?V1foX1*L|F)kO&VL6H%n_a(Lm+Nvh?iTz@GuU#V-wr#zh}-3{ zR^!%v@&?Vg^to|0h;UoWbK9B3zT}~-`>fvB>9XHcn_|1@S=@sE8GDhY8To}}Q*$j# z(TbVZ7EM+gBWUWys_VIe?Y7(XtM$5BjzygS&U2NO;jxN*uo{ff*bJli#|@Y3K9}pb zi$>(zart#=W?f8ImxV>)h4C&!V*?`+Cdkx}~o7cHeGAN~^@hF4!SoSabsTxEgy= zhx=X_CZG3B#^Ij(W;8Zii?rt~gx@FyrT_x1^ z?P4bcFeoM>gfNwzyPZh4c2*-ftjs$6VA2g5$FnY5{x~rPbXXaq zHpqduTeiz3NW-O-rFFKb$KJ)QN+4oa4m{Zg9^7p^Xhz_4TfF_ab=9H>yuhH~3b1o5 zEIWQbUuH9b>U#d+?el#S``*PVH5Q6f9ypJDV+-DUOq0j&mP&V%%b} z;3y3#{FG50j8au@El$DJ>ap0FDti~Bx2DQi!{jae&B^cJm*pCeDy?4Yqu(0C&fW6K zKyU$+ZOsW3w%DxU0UnLZZI&x|$@On7vo+8FtL}zHC473<956Ik61po)&1SpXZ6Pr@ zo5SOYc)77IYeovD0~JE)%D^uYJR}4qsI}#E+{LghGAyywB^V+=bDoP$BWz`E+KQ2G zIZ9TsZ0y^%Z7XvFCY#|AE;Mn)2n-9hLB@>$(~A4RsL--(48A0xg8p~oqFpnVp=MS5 z9gpb7d(*!u)-5N&QTu0vV*-`S7Q$cgZ{@n~0QlZQUhp70s|9jqC@l*Z`lTVRi&bw$ zfDSye(eGi&ase9dpb#sAGl1bXYYVeCgLS|r{JI9mps!Ucw5^(T*;xdeP1UWsEbeyI zS0)zxZX{EH=P*CbmkRVd^3(7W%QWT1m^&5;CjH_+I(z=pSxK@bUTyCsc!3d)7$BKQ6{M`Vqj`AY20`s>E z7o7VNjJHL-8Jg`V1TasrsWzbU9AT{=q>j>(#Tpo>RxUv9#pSt4`4_(lee~nHC>hOY z4a#3QC60<8V*9*~5eIS>bvud<>{!s-04UyWn6JFVni@N9eP^7Zp=B?nXq$S;D)`@S z$?7B~ea3|e;N-*LKP5N@dUd&O< zrk5rpyaao+u0VDr$N!S^>!$l zMH9d@G_}CHSY@fp+$~g@aAoO zE;aQf_byH{^G(^8Tltd6Q!WY#0TAlkpo{g)=>VK8#E=LfpxS0@xZnN38d>l}}flk^Aax=cGT3`UwrNstOQe}x38@DcM8&jCt&Q_gCYfS{m zGjfR*U>uR0JXA+7!LFs*tC1OTEUO*2-n5{*882lxFf=DF*9GPPyGoKjh@+Nx@T%Ma z6ya+bYJ31J&L7A(x5Lox*iG=nVCi5M7%JZ&hOJNnoI@$tfk-R%)-6Js2m^pL7Q}L{ zfd{WyCUUOL2=FiJrTKsj7J(_^upqZ`slL_?!3Q2yfuU@zFxtbaNzm(Ca8{b{noaru zS8jK##PGPaR@zsa=Y=&cB8gjFS#!Hs9MONbHhUm;#Tthu-a z2R=Xv+r(@)k^2X+I1}R*47ZX{SzT4XSr#&L-pEX{tGWhC-5Ee9L6y4?Qd~K$EA&rS z3ZY>U zY+I-0!%LgD{C#c!k;cX@J!(2E8Rf+!NRNnni#XSRLMfvF{N%CS=0{Su!|ok*Nd9_wQ8_b zt^jsLjL2#%T`|vyFN!V7kH@kCFjw+At{RhUiW_d$sNuK)UwNpQC8k-_U>L?_!Dx)q zmPZOO0>o?35pPi;S{RSa3KIjA81YsvYmK{B_|!@i-bN_62Z)yt3UD0KPFfGChxRof zaF@j;4Uk|Xeb)Gp1+*#+63a!oq1*0IB(mkI0JLy~l^mh%Ir}ZV!Qq>EHy|(yF^rqf z#+i$jRbx^mYfYjN``QXDd^KdUN(f`iC@r=p%g5U6Kx};CqP4<;XS%KmC%I$Xa7Jq^ zgy;gYT3S1mh%-tkBmn@8Tf(WxOap$m33%YFxG96Rx;OAg*&7zCalsM+6JZziU@Q$f zZ?H%VvbvZ-;2o-DDbs5By0vT?+2{Ht<(9;5U0_zWIj6i`E)o`MiR|Q%xmE|0qm`y^ z<8U$}0cUARgxKGrJj9HplGxJtiJI6UAsB6%wOWF%jX=C&M!B*LWSfW^tj$4yrj^-} zewNaWh*;O?v@+id=|_r#Gq^gD~!@~_c+&uOX={+U;wHsuZj_l zg5+MwgMEI$2e>d0n2}bp0=~+uNGnS&xWU1+`~k=at1i)kA^@Nr+$#phb}K6*saw*C z-mM$TMh2LrnkXao)P2!{AnZg2CEWsEvH}Kd^d`<78tG+_{?9VxKY^!Kv!J@h5BJtO zGHwCeG+dbL5fi5nj{^fVhczojD4_E=bBt;zfBwcA44Vr6un-8vda+XD4Y_-iNrgzp z7)!h*3YA<7e>1xF5G&P6FtaY?y;!06o~l3)t^q7m=fo~SBa$Kr2i6LPfwVz<$Y0UM zeZ*8icAwn&_h5VgNPx8!iX{jm~7220lQ-% z23qAyvl&8?O^a-n1qTWxxi;CM%Lap7uArzw!r8feJn>r6P~uQ5#GbQ3gPSdEBd`<_ z)QT15xDiSDPKHpGsoe0T(gi^eAkXx6g-c;!1BA`x2~Mfa1aq&uKA8=NBvi9X=sS5d zkjy5-H=sP_cN-9g?cq|T`88Ly>USV1H`k6bd}9sOpv0ESLvmiJwG{&Vm_c+nFk%+O zBQ)J|v7IO%BZImIcPubBmNN$0y7+e~jRO;ehcAP(> zY;gvtFYXV6gVN<9VWzdS!HK**hif|ZaLgp=CRANFb2Lz)W z#@Yq81rAPE^>YPaAhCpcu~JG74R2tAL1rsvstWLSNOUC{$du(;fAyl^chJCLVX-5O zLo#Hs0}rTFbFh#s@&}k?@lC<8R!AGGXgsoR$Mq4x{91q)Ww4{89c9^}sFV z0mQi)5zax0QN&ZY3(T%juPM2jJH=9#ZRdtq>ZUZfFm2ee3&>4 zi6zbh{0!tWDhhc^T(>1CGKrm-LjG_1EN9}a#mLFQyNv{!nMr;H4KZ2nnKEZ+PX00f zgw<6|0B4swaO5Eg<&{VavC~kve)ALj0Ggr37qA1<2;y;X>_`gN$$W8Iyi#hlfoW2Yd9GBKR2(>zNVTf{bc5&5$!F=`^Y3=nIK zTUR;bO)GXFwX58nk`1?wLy;PpeI+u4rD&8)#o&v;s?v@s-{BMrX|QXD?3A1E-F5J! zHKXn%%qo?_8Nk0uDmhK`9p_-B1;s8L9-}Ea*{Q{f<#3D~!#pWgh;kgUsg~>t*eV)) zWs>TkM`U%!UKIp@paOT}0_A9C2O>-D5(i=FBUP9Re56uH(n2!fEXuzaBV!t5ln-rW zEG{jT1MEe(Vz?@4A~+m5*Vd8MtsP9IMG_nMF7xBcnvluRSV55?tVy@f-D*m1CrLG+ z0O0kw_%URnU#x=y5=L+ z`R}WebeZq#3;$*+$&A$dC*S>tR7p;AI*B0vK2?%UeH2Mzw`cO?9~Ma}-7dSIMUsDS zB1xKpMoLBn3B}?ZR2}`$TB*K)-=*+~UJdG$_sC9RKX|N03P_79q9|f75GuuQb&*uH z2Yh2MmqOCxHp5{7ZYjaa9VBHvq=a8ofy4=Jr3_*(Z7d2YqBAlJK&ot#20#kfGxVR_ zMHx;m1^H7<(Lu`JAt#yBN`*kp31)_hVCcRf5a5@h&4Kxd`xGRlJV?QmepfIrelZoh ziI7Bp6$&S^hSXzJB~erkPhEjGTd5&L1cW10d6lWEDV0Ve04>TT7zs>hNL8T*$+Fa3 zPOQR9S}T*2iAunh0fVrSUxA=2OwE}@2iTOTDo4ueRy$zTC5HQlHABjg!GIO22@?+w z?&79$X>vP=SiLyfEtp$s*UAQ#g;K9+0W3r3MN5P6RFISoV2@q%RN}NFI`mP!z>vS^+*JlQI_00E;4J$5w-s{-xVMkh`N^N}Q4g zr2!d(>U$~~*sxKy6_(ZTvZ-+MSUIqCNl6lZnK~%|kjl?}n21HhGd@PAkXn@tkdP9Q zC3nXu&@nov1e*{}RRQ{*7R|CzOH|x+E?FD_X^171u*$K#xZEm2BKP5D%d6_qM@Crw zN8W)EP_I_enh(;)+qlXw(C|t696`!IUou#9)ANlxN4l9#M(ncI$PI0a5AXO4IN_7n7a}=F& zPuG)=%e7Q%dX+O=Olr+p1~LtWbg&*57PVhnP)wr^T@Oo~I0WZV#9+~G!IX0ZTlFhM zmQ=tR&*~y7VRaJLTH4g@qK;L|MTaMctYkn*&m#3z?@*b*pU5p}+2l2>9P7(9V$3ZF zg@^EQC^}PyFj5)gnpE47T39s|B~%~1f>?^dQT2(3?FO62$5kd69FrKq$ePe4T&uOrC(Rl z)vqAUFDy;Uq)ss=B`FnA6ha&-m7NJETAT#sqJqi7fg$Mdv?L}zE=}vnFc=d3h^fNG z(!*F{v=2$l|H^-UKEVHQ#S=A-es>^@>OzS(T z&fhH0$|(Kq@~q~NKKMD&e?vRkG@*aTiB>(#K2Q(VjaKzD(d>s4t#qUL-Ljvm8;$5! z@Pb65gB2BkT;Wvlh+}RG%4r&N&b*=tgpqOSpgjf-U5JVU=#;hS*3z|r7UXQ8tB*&H-6J<6d=q)pmehfimJppsy}zRhI^=t6sK><5eduErK7e$vacpglJNq_V(B)fGJx zoTbbWs04x*s;ou}dL+dpaa4Me5+ zgR6egI*}t#2MUkCqG|$&m_SVtg-XShYH(09qJ2$KNEg2@^Qfl9Xt=jQasMe~mdfg)7XJ=D?B{78lBRzK@5~8=L4SCQDfnD@& zK)$LNEJq?3phuA>PgDT}n^aOat&$#$3ZY0E%~@B#>ryc4C*>;23nBq{MRLl_nJ^k! zHf}>uhkSJ}EWhp`9=~HjCx_wFQ56cXG zaR<>m(-cJf5%FL}-!jQV2*QklyHbu6?Aa%m&D`FF|EaEPUP+DPJNm$90C645E ziUBH~rGh~^8KvM>kYa-(e468k0tbsI<%*$J#!A(Q+&04G!7ZrpvvgNTM+lV4QItE~ zrdA45OSF}KgrGHqI=HNcs8px0>E7`A3S2%z{SJ!C1Cb6gtLURKn4r=nXG5qWzcM%Ub|5M9F-@cmey!^t8{*gJv$>~ny3kle?iVn5{_5|oHSVRsje>r!olD^R2+uGN%c8n^z)<;N8HTqNCwpNF(iWgZp~X?vCg?<=#6 zMhYbW)Pv`Il-iDN_>M|>DT!IzN-GkKLMag+}C~b%H$7jML{) zQa9X~v7!ao6qXD7k^x%}%zc$YuL$Rs5+y?67%&PXqo=BmY|vdQXQ6m9#S)wRekk#v zL{4$u@JASu>`oslv50erOw$dJ4x2R4`cziFaxY~vk+m9~lCK0-_?cv>gp-kyDfCfd zFn$q6&!`?|v1OyPjLb?37eO*-v5A&Tm`)JG1E^zBi?a$+nTf5#vycvHMMb1x)QGIO z1@DL`^nxfd96$u~no`D}v!eeTSC`llf5+)mH*N0WS9}r7f4Xi3 zbN9nfmrh}65wUpYp(L>q2z8Kg^K>G*Lkb}uh(KszHz|lg-_BkOdPWGzP@U8sk?fIP zks7I|>B2+P0VT=?K*vJKMM%*co?c1X57H=_DC!)rfkcJSMy!Q|r3Q->ZldZWuTd|F zCd!p*&Ixmff2U{hdCam_G^z^{KEQ{*4V+uZlL%=8y=5+8U!yxh4a0d@V&_C}QoMl$ z^hu(cK1K99eQJOU7$nUSS7&4x_fv}q*Q4^wCh*~ z!Q2`Nv2Y41(wUH=r1gW8GRm1E;EH6M{wv7Swi|jU(X{k26je3q9Xypox_J5{ZO5AN zFpbn503N+NsvUl`HA?yrNO(xrR6*ofpzhQ@rbrS+kr1nyGHNA&N*fX6uXLmc(HG{2 zv_z(;ltAl(=++iXI7wb2i_{dEdYQD!v}9)knMjICqPFzV0qw~UWI*$%qb5W;jylB+ zQrSV5NAygZ9mId#2=v|1iiSPiT7Uu`nJCwG0^lA^4g5{N3A-Zb$!Vtc9Mvb48oL0< zQRuMLEJ#qP!Cv39PgoDdn5LDm*p&PQWuojxfr{y%?VVcJ3@M&#WQ{6LsXEeU%E_X% zk|*delBttON#hxkq&JFnl`IW3B&UX1Q2<_(g~${Dc2|y<_49sP$VH9YY zRm>EM08nB#f=_oVmjparn=D(tsmw~2Zp^bsi=~vNF;zy3myhsVnK#4=jIPoP)bdXf zCgmu*jW{Eu4dN2aqU4o6Wp`PB#zIo#%u=VQ(PgP9An+IWp}jTrGOYm8uk|~<; zD0kVCK=W*f3011B>qHB;Nu=s3ojJNe4U+0tIv^F*=~U_EJWxgE2AQ(VjKY<^I%QwW zRHv$5PuX<@b0o=fdW98C_N>b#K<>X5c^g~W*?(GY?GAwRHoq)94nI`wlgSO+cCSzLNVxi#{23&fb} zRM2qjnCT_45;gmWRl)5!Fr{LW ziRfEeSOF&6B-n=`8xL@X5ky2a3$efjx>bTV1g^9K;ybM6^k5r!{r?eJ+w;T9j+@6d z>d^zT!uLpw^+RhYz`5pntxPi{1J}Xj1DQB#Zat7{(G<_QJ|$!=AG+I&LF{h^1tATpKb7 zyXi>;mIR#a3FH>FghY!#_H4%_P-2Y>b`Aq;(U$OLxP5v7TeWm#9*^JNA#|L;=De$m(pS11fPxbPH}=_Z%8S zyOZUtk&ZTq@v#l$W8(9(2N~qf@B8l|lF(rTMtx zLi0*X->ha1Dw)#sxzk`!F$mkRBK|YYop@O7QC6L%Cbvm9rP0dLq92YPDS8zn$*dI$ zNNtebh#ImfLK-dzOht6F3j*peWvGA9gYJpA-Clm~ipc z@U`JoQo__nZ>4tvP$XW`9Yg-384Op+Bv}koS2+Ravf-K5>1dJ&5rksOh9EHXrb2%}0rP%%h@)c$b zuu#@WR0Lp!5#4jyKFy*dTr;SG3-TOnWF`eciLpux9%yc_$#ne)4%q_()Ihu%H>w@Q zDg38hzallkbIWZAaHz6Sjqn@{AKelui1ZSJkF}3P$n9FbwtS)0vIMg80|+U;r6Jg1 zbrCMYF-j$=cv!0Cqf{541tqC5sHr(hR)9ICtx~>WV?C(L5vJuDf>&e9(C`%&E8J_3ij0aV z&d2cFX;|^0sji7~O`&fj&5=qXvQ4d30p&n)4Aq7>z^cm-4x$+f=dU&<85WrI7>R0v zucix)DSE~16et%;k=15#uo>@4xyPibbJAJC)SwPls z5o&&^kf`GsL!OCi$Q}bccltO&kf)Nvb1)vIBzcQ_fUD$m7!i0<@&bp;sBCn@w@F}Z z>i}S6mrm(nx?Gh!Aa@&sPz{M1D1Vzaa0cue?!=xm`=tLMkuK_NOM-5g)}kTrq)gW~c_C94#C(B{rwb$pxehrXb6t z!ArXjKPg|++3NCGU3xgJSs8*>V!%TMNQ|-Y8LVX~g;QUOR8Lt0@n9LIvCoZ2ASYy_ zrES_FM(ARl?nnU14oq-JaF?~ii7iAXy|xkw`M&GZw3f<)vYWaw%qqvUo*`Sr2o8%& zt+cA~yRs2OA_l2BunZP#+33Kw5gO7aYELN+PKPx(4jh_28L|tDrpvHdRuoPEBS08H zFA1bj!lk#1$QC_;px`ciKW)r%tH3bbK^ao=!hntmM36KJBhWf6qI$8YVfc&(Gfc_R zvd)I9l6W|suL9VVgk(mj{7O0TLnm3MBEywiq$%uF&UxsnXM&x_0 z)yQP>R2-wi0EEzsmJB{I`)i>RAYKtrrfrn7>TO~P25HGd1JQ;<&z1`ALNh6PE^VRN zE?Lti0xny1G0N<7n8J2)Rf2FChUjJ4X~U%n?!Y`Q--41p$`EC_ta=2t!`~s90C=Dm zv8nwPg$9gaT4d0A%;ijJlZ1Q`FDX@%ovNaVy_PVyZZA#u0hmIZ>1?)arwy=@XN0(= z*wiYj6U`eYmA6dw7Lme<+Z2)t13@K^laVFzhPzW}B74@tgs!d5%{Ix0)*Y}m7#p_r!WU!G>b6TwoD zwm(hcKlTP#1&6|QCzk^1198G*N^~SCd;=$tEywUF7IHMVya*jSm?`D7y-;{fKHc^& zoVuz&p^6|LdLk!C*1>&A^IAiXK*2jmu%ZOXUe>|o@>EQX>9tnPWeOBVY>FuX3^Y1W zhWsZHFz601%rn#5NGQz`ekr>xA>!a{$%(d*!m>;gEn$9oDO{S%v@C57D;VR!Sx7P+ zl>)>VZk}_1(QJegWf(e7>Wlx(tw!9$Q)VAPlJt&a$`&T_9UzS_3(<+uFr@TAhKEU^ z8iaT2S~Bnccz+cR770y2j<&+X<-(qO2uSF0XdE^;qzq(5ApxKvWs9&q zXbts+>^~C8zt3lU;50j9V;HmC$fOL!M1E+rK>u;bfG~j}uc)X%$ZkgjL7(4C9ZK;a z7*Y~X7d8PJHlYJN5zmC!kpN+gVdS#yz9Lbj(rN83Dti>cD7=7H-e1qRaipbE5wdxQ zo)RFNYm)*=hf%Ipwh;%{IM^}lzUo1mYr@mmQ$nNyIdsNY#cA^vB6&@0vlE+@#01QJ zENj}Zl3rec3HdKwXOQL?)oKOfw)HQh;^jp0eH1_{g4usP6_9XWTu6GR#74K~|WZM94 zC!x@OKDJBXE8s*S(WgRP@^&@2k4R<;GD$8jcZ0J8#-u)ml`=3%wV9U#rly9f@`tks z1;kOIfn=?w0V<$i6I5asm=c(cm z2Y@C6zbtZaD!UL$eWGSEEvl)?G5NU$8I`&uu0k;O2fY(0VL$2A9H9r2vK@dS8RUr|&B)WZcxWZ5CKH!rOdS=BOXuzQr z#JXtXQZ9@TC?zH7Ns7CnVvu%puqsP9A5j*#G9j!-FIg~VBw_w?-}phj_!8%oNvVfY zBS2b7edTI~%A&`-tIt?xSP)#U{r*tFo+Z#K0%ng_{t)96eJL0r7EF96MhPznK;nPU z!Q_;-WR+3KZ{rsm)y zwg~_%ZJ3;W$MOpooFpR-3ki*a^r}t9UxWfHf`HKY+2cH3fH|Y%CGBLa~fO zKG7Oz?gqsN-E#b96vq&;k!6nNQnf*U4U7tOW;bHoy5dJRp3ng36G6t4)cSfNtB^YDaOEe^#Ur8i9qlZIS}yL-ucM5$)q;vUg5Su<=)>X*m_0}aj;zASy@b_qFhLimv*j&0Wc@^Zj92hBpnpb-&n9xY8Wa zsbXn%Y+<-^aa%Z;e(>AOXA?~n&9rBUDJ<-1=L)b@&dJ%?U_$cD=;*q^q-;N&{Z`b) zrw%t{62AjGV$|Ie?^Gy2!B<8eZjk#1E~eJ(B4n7P2XZR-pTsZnY9yAryhy5+g}O?v z2%%{I14hlfE<|ppF$d;E2Bab)vKUR?DccK98}ZfI!&2g5T!G(p6(uq!D@9k!L>PdX zskCQ{3UXJggqxRTP)A^-OssVg{WeQR`w01{ad>bl807B?BKCOwNN2#d&Ck}ey7tZj(c-DDR)aaX3Q@-5QAZeXPnITuC~L_;juML&f# zWW}}#gdxRk0Ctjm0GVn{*)KN|R#6U5ZrMpxS-C1X+Ld!=kyuFPsdOkVkRn8o9kDO1 ziu=lj^ssA@oiJTA+D{~BcD7&%Jj=G0Mq4_Sm{}pJ0e`hB>7!6>+!+C%4XrB}xn5_< zuX^xRN$Giu@VO-LsHikeszxNDS(X7SY}lOy_~9rD?W49kbotzqEWmj3n~C|7c~t?( zDt#4Fbaa~zR3Ons@jfCN0%L*QhaC}(Bko@~LHi-Q>^7(-ghfo7rSd4gT{!@q3TEPR zvRjbUR<&8G388Qe*0p9y#KzWz8%|kU3;xWY{bcYNz8$Og4FRz*cq& z>Lx?p!(*nyGo;V7@v@xI-6-iYF(D<)5nP)6j9sps(O4qdNOcZ+V?R7TJ0V_H`BW|- z1CU*?!KlcADuq#KI#|)A0hFJh(paF=$)mY3~&bObm^9Nwq(feIvZIjd8U-@>cQFUTqMldV#rniHX2oy z&kjWVgt}UOv4Ir;0T@F6<;A6HQXmJ;Ms3nWWmMOf24eVtyTpp3{up|oB+4sPo8ll! zmx4}+r!+@a$!Mm%a6!Cf97BGDhC>XSB8$i`f^bEuVx$iu3j0ot6k^V%v$mylcEuzKN!0GC)iW{3 za@rW1WrzSW6PtOVII^j!>u{l9oSLAi)wzpX!O|OimgW%Zk%9vRWIn9!>=&IK3>9b% zO48hvD`{MekJe(n!x4F8J3imfHfcsN+reSxc;l!dZOj~kIb{a?FoGdn@J5l6CvZTY z5PT^~Bmsg}`3ufDRVJX8CQhG0_0TNqJfw zjjxGZL&Ob2P5DpQ<`?;U^n#iU$}Q|X7tz&4Hn0ln6h7_bN~Hu)s4a7$&h1#h9Q5bn z1edg-(}{@SMv?1NFrd0)T(EX%X7xF2P-855wfS^JyLwE|2lIoR^gttdL_|XBUKr7|$B-kT=0Dve&vRHYLXacnfCaF@#Kz+?!q}MV4k9Kw(2$TUIgNWdhIyQG{cRtlSzpWw;a>}YMS{sNGREY72Fl!1c z*+I=%+w;;Cpe(pIn$|SopxX6txI$5ik@^UKB?@p$QFvurYAO?sLCrPgl60hHPcxK; zt>l#81P)GP`eh)+2IUeV9#d#pb5(4cAppR(aMb3bM&pF)#D+ba?!rA}J)*KkMN5~@ zOr@5^ql2vvmJwYN(H*!ar$oj@2gj4-r;QAl!0ksiQuK1ZP|pAh%aL;7niVUEtUxXP z8IznEmst=~lW;;ZOv4CD6>=nIq?N|7MAIa*jXnr5Or{fQl26Ea#2&xcBsGe2@*Fe8 zy##w(Y#25pW+Oy&tpw2sIbWC%UdLP9a0)lkV7PPc5tHieZ0C#nkt=fN`HhYAD{}k% zo)gG^x`F+SJdq^S}=LE$a~fkc-#>D=_t4-a-|I z&5%^ZPoZ4WMhee@CVWxku4w5r&P28deuh%^yFK1@FD`?TGjtIosxWG>bhokvZAz9V zcVyE|%4s+icWi`G5~hPdRPY`$0r8su2a?jcDEyK#L&(`p#TV_l;W1Fj6m^D%Baio* z)?R!YagLaP6gPX~2c2rNOhlZ>#puDW{NkM@3CzPZQM$s8U@UQ7mV}zNTA$R1i^Ci3 z()MQ+ShPXHT!*W0sp}Nuf$%52EVDg}=iD;9GkRJO<2U&wW(+)l91Pvc!IU8-{sBA484MTv@ ziAm_O$WWdn#r)1vTH+M>ARAkDCijj!X^_ZOjGcNidS=!+}T+xX(f~BJ8oSV67CD zz)y(CCmFSMVG9dxOp>jbY!wn-1;kH3o`c*`6Dq>frZA3+je?6OlqKQefEYC|88ITs zH{|e4l!p>EMAPgao)7?`L%oPp#L^?+?0Uu$x?l+Y)Y-@G!x!6ibhMH3~gI z2#~h7r*YFWV9wFa0y$x1MBxnDc(YB8nTaV}@*5C$3bU{u8LSHlNwq2x?Vui9i6%p$ z0Qnt#9g>@>BMh$?D&I%0Do7-C&pxkd0uAY4sp}r_dt0JVw7$?J&`5?0jzE{f4d)nf z7NjkCBTV6;q(G7e$Bi0}&y#fF9Lk31^vfRTj}mlES)NG-4dj63@u>rK(`*O9-GU+mk8=QW@8Cf$i>8U6hm`D1%fxUkOcl=H4DCM7Y;0!*&l6cDI^ziXL^Wi zgsrnZn>Q7dl#mSWPt$I6X`)<8X+{i1tp4nB^Q#WXLJOK!8^nXxvpsn9#=J6Bd3IYy z%wTWuM<{fuRVdJa`GjOdbvRG`Pt2GVb}IE`iI+RY1dyz*$6wDlQ}xJm)4G6M!+q zu;IBQr-^JyqLYLHorz1d!1y4)5Nnxdm6{-qMXcl9ogD!Y(UR20h$4-phmZni42uwe z>r|D~xe9Sbg#(U_L=?-UU_j|OggdD9{8Y{#9lPh6(qgy@Cz?kGWv+@JNd3 zgfaO!C$^{VoS*s>^`LxX7s^{2Yr*DcDd|IWRAcP@6@5)HjV4qQ9wFPC!#4^Q7E5v` zR2E(^Jy~!neI+$}`1`P7yd~lUf2u-DLXlq=fXO7ve&{5fDllm_RHo4rN%G6KDO$iN z`KcL!fbPX>m~%Wo3*k_#o{9X4zF(eTaU~s~ec;U!uRyYBvO!a}YXs?tP^I~OSVX1O zn0<9ssQ3!0m`s3)$a_>kojL72({C5WpMc$5cbd^4Ds&1ekAe-*q?-c)@CKx($^tA% z#1_vrS921AR`>=4BnyO4ElW&y_G2?(0E3@D!%4_T$=b5R1nedi;hEW_upu2$qf6U! z(6nhmABDRn3`;SHFE5e=f|!y))D%rMG;Kj5MU%@@uNpHN#jxQ5YSi}P3{HbX3m>PW zO7l}TVK+Xyx0EQ5oslj`_1z41N+?a=4fjOM5Vkh~CpuRGO2sojycG^g?UKhg)wETv zk&XbX?h4Jc_{q~*MHnGodxF5GfjP*OBdyaS1USo;pd?EYL1pOGMSMJYaMVX)k2WU9 z;TGT?B^s_g{Vg(4q-@+dyc@9x`4oKyP!B@zZki^@Bprv2Ft7ye&lRenSa24f^=OV% zJcSzR5d#W+VS(b0wEw~CM0KhIxfp~jg@>Y@1O#uIjme2QP!at~wNFg}-c{?uZdip; zN^2AV)~&r1QlTmsPZF5IvZ*oCP8#8dUKTY?ELs!*9A7RAvs{`otwB`tmsX9a!1}mpw3pLGd#8f{R zXLUx@o!@0px(2yq+3jUP6#tz@jZbYEhHXChNgbL%B0aMM^^0UqS2i1+^D$UdCsw zOAu-5G|-|g>`V&yLIP|y+Ci{EsuJT$vm2*tRVdjYqWB{YCi)X)RrzVEvSI*nWMuo& zT-ggghm{3YrE6IpkJ?w_wAo5BmVj*JgRQO*RTy^=E7z-Hs)`-f1y2cdt2Q%MO23assFG=c*KNuE45r>>|MBa}AH!UnChBZXkgY#(oU^Dp9F^((mUpqSCVv zg+GO9K1AIif|zNCU_^uDO*KEipN4M%n^h>Zhj4|_i)ZDByCV(|8-xOBlWfZGB7l(a zo26x6A|akp`|)zTgMo`;Oka%oiw-3hpY1;(eJ77YOJ5Rwk3}j#i6k(A({OnrlguLI zulx`iVs6U*-kPGKY$@7XJKjvTqBnwzm#rw)rD~)yp;(8p!}uZwWCNssxXSDkhP4x9 zlc4A}k^+iLWi+<6_wPlhgtQd9EeTnty~E(qITR!s&3DXc9& zbVhX{m6k9mjDmR_l-3x91n7YCmZnAgE04gBbKUuEP4r9DfM^{6BrG~QhlE=W%#bKB zrMfC8oT(8^8yoOI-;~+5Zd3B-hQk~Q(;~JDm1jweSeKte43e9I5+M#PlPmE9Ul=Ti z#<;_UG`f~OE(Dq-$Rl|cm7_jV)pj`jOktsPTKH`(QY5Heq6pn2qN1-5<^cu*G}eaI zqG*GF6XeCiAQV0bZJJ-cR2ElQvijj*QeA9%%8Ztuz@`4cEY!YbXD9@o84REXMUB(( zBuQ4!lJsDF)VYlffP?dh%8d3TvJAorh!g{YQXn0)gPcN zgf;1M)142V)2-n%#bv<+=E9M3Lx2m?u@Km-rR2ZJGz$rYL&D$-$XYZ7i$aDWokoD0`45&pPAd0~lrpLzvL#U$^x{aust3oSC#~Vp+4wH?W&Tsz0 z?_t35d!xzdd_3KGGGgAqLNLYBYzarQ9b=|~Dj5dsm1l8hjtJ3D#VV9Jzb>kirI3dx zh|2G*NoL1G;!q^%kx}zvqHaP1%2-J!F4rtVw6HcCCjMoJ5>R!p2rSdpqiU$5Dsmeg zbc(W}7HL`ItDqn-jdaRv1vTfV|3E{GL~_#*wT3_mgc1hHU=eU>S*F0OuH`VsvLw+u zzn{bV(fi4yp=Q04STATx-i^WM0c~KF1sz2tyAjx=5s1#m`)N>oh3bZS4*P+*<;&IOenoIp2(m)e zm6a$A%P{<3yRtYhGt*rYsw;bBTDSa##EU{BI4d$6`I+cJal+gfj1+0=s&TSi5$|p| zK`>1t_`mE!iL|C-P6r6j&z}Vg@F?txtFgpVP{(*+uNV^H2WBEfw%VNFg<)djX}mTm zS>DdcVhOns7W}&Ub3CnBETJ~^euOS8MXLS=PEw^1XLUhsX}B}a)J@_$mzE9x{Q?|F z1X%J8kQJ!Y`b|lYP~jmZYSXSuN=(hJg$6(Sbtp;kz$r^`x9U7#B!B`%V1smc`z=B0 zy|6ZHL8XNF0@{I9QU;gkMg%WcRdq1YDo|(zeKX3H)*W&IpIgYAbbsX6xAIfO0z3v$ zqfV#{p;6%ou#e8a#7iv;!6A|%a#7|_{@}jJ0;ROMoA#%4_9F%cU zT_O5Iu=0LT45%1=pWwqefP2;^5rjpD5r9?f62pcGezIf0Xb|aW(h&!Im=KN*U7H{5 z%C+;SEMzBxP`Z;wObv))fxdm&N@{%o2KVZ=MP#3%tl|u9&>%NR`)YO3xQLdQ)tpxdrPs-7(Q;tvl#d-yC zUpC{+UOj~e^{5rWB0&kAZm5sU2 z)ap#5+L?4|0+ps;gEz6Sp@)+6o};QANz{p)j%gVt@rTx&v<^o$3DKYjpx@Hr7i7%Y z-YDHF(oGT5$>Q~-?o-iHC%GCN=SGKxP?I=Pp}-;lH&d~lM)v3hFtQb6JTUJ8Q(7N5 zKW2wt$dAODWl2L);B@j){irtJHGl;^UdouA5s{Cn{2CBASBqqRQI!;c>rRWBb-)iG zb&v(FMDRjjz)E^uW#@^F&@E8Mb!Fcm)eGa1;+f*1z{7=W7UbEWASju*NX14$1W>^h z=tcHp2uNW=o6V3Q?$odd9?}zSxcDunM7d^fp=^FE0p$$cvl)cZfD-D3X)KVa4jAp|()bJ5*Uy$?dKfQ5rB*_ehY&>{P%D52j%;C0q`Z64grUwL z4diwFvZuyIEURQOTT2KB1dvQnP!KS)7X${v<|nxu=S6p0wc0UJZWR2{samE=R;D^? z64G;Qj`26gKzX(yQ<*`M0ueNhVaTO;@TZ6;aj+!yGs$6KfgqKr&6pG?p7LGRE>$H> zXShOKfa?*iv*m~Y3Jru?2stmoAwu%gu2X}#_2BFA(G-^;Ci6hDf^jl=W*jB1sg;IA zB`w1(5MOW}l+BCyOeo~=xJWG4Z5dIs@wjlgu1M!lqy!=K=~!N}Y~99LpR5?PK>a8$ zzX6v#z)F6=^dv+4 zI$W1kq|O28;uWy2mWS$Ln@(G6#RRCOrMbhg1sVV%@-7yM_{-gLz=DhVynZ~+Ae}Dy ztwqDa-3!;r+G%{bdPQmxK6`@*{6?RXO*UjLAfK&!@PjwC5I7l5gowk(Y4#NF<7dPg z!_RB@D<2lWWeO33DJ=oj=~xF{43PAd-Mank(4^X}iY2ZXbd8mYdg*wfJ|xpqTvdk> zBv4^gOyEv(mT)Wz67uKtFThMFKAse<8F0sl=+dYWka?U}S`uI~Czl$sQT>aNkf+{0 z<&ElBkfyv>_QnM3eo{7s%I}NI5N8x__ZayKzDYsGftM1?j`RUr7y zzF}61zP7*wkv`iZ$&6gA6#^JcNr7d8FSP?04L&sJvH zNgCvb3)5c)T;Of!@zuw&ZWvU%st<05YqdKOM%@M$FcY^o?dHIFh8S4H?5a#5*{l;V4Yc~-?A=dqp4IjB@%i;Cu1O>q6dcFC-FW7Ik&sGN z0fSDBeG{xYHgX&U@4lb!HVjCc2$2GUru{unA+hg2=Q?NawbxpEAERB0-_8*{-sVo@ zQC@UFjaBh5xdS;#bq_EP%hoWo_`?0;lwglzuUO2QdRY5pikk9T*5tRto7m^4#!tgW z z-~98&FMsjH8*jDguNuFs40-hET*2Sn_2`?sb$7Eq-Z|Xc^?$$j z0Op}rn=qT9VJ22@ngXcKmGy#n@ctA#y^jKl}#`xG(EWD$tQ56%ghDHMr zP>2{W+O^&VFiayT(wwD*R=`3_UDwWHyoSrg)l0fql<^okdKAS;)rOTs8T&OPJZ;(> zplMmbq3C?UeNy~tdIYb~wrXLtuNnYDmcVa#O@7Wy$xYs1?NyH{!0`5T7FCtLHE)-E zha_f9&&~P+Z zsu>CQm{tWtwFTvjOoUiQ4J@2WKCQ=B|BbRDLqtMUjoWT^R1+e5kSuu5S{z0{r?+G3 zl#m$i2A(KXtxSZx&LemjT}=ID(mK_W+C(@c0bU`yEU;8XjG<$E#w|WEJxJB+sdx>} zFLuugGtNT^#Yb}$YoGUaC(B_t@GBX16Qd#Nr1*`*FgLDPU`VWZhOehF-XhES6 zq&Np>$#1S@}Q6w(q4z5L?GU82(2Lh2A zgKE^5tjt!^C|7W*BxR$vl71Lbv0QwhHHoTzEdi?*dRqI0!z3JV%xG3ZTqyv$bHxW& z`eo|CH*odrnqTCcJG|TgXcM1QiwKF)oCjr#{u4m};?LeE8mUfk5sZ`s5EY{uA8DHN zG?N5{Pc5NTZ&DyeB%2WzkxGhJOiaq`gFM9%j9k_G9HGrvAQ3TO|1h%X7<2}urshOu zdCXZ8K$KFLea~RZAZOb;vDPw0c#I4>u5PshY+%(S3KTsx?xZd*C0!7+3_q%E?;Ts+p3sc|S*453I9Kdi1IzoFP!Whrxl2DV(>b8n|Tk2sJ$Ssr7=P^ZRA z;M*JGq&QcQkJ_M$67P9QUyh2mVe{mGIWWl^o(lo2Qh}S9aqYkfK|oNU?Voesx93p1LpL#f49o|9V?ko9{?#g0^WTIEEysU=)46{$&7H{`)m zVRleh*o2mV+rw$&+L8-05v%u|BSD(arOV%Bb!3Ee+q5+aQ*OkVCSEA{rHops6teY+ ztGZD=mY7Oo1e8;&p+Qo^-O#@MgbgJ(o6V6Xxe(Gprsmqwlf4P9N-V1d$&&ce zrB2fqieR8!)R+LJ!?bHn3TUZ#KbsRbW&5wjT=R=GJPjAk+0^421FI~<-Z zCkl6}oz5&rd()PXILXDVB^gnQ>S4(#t00LoXf@OxZ)yxxmS^$@m#s%uizsyH=ixgU z2sK8r@mlyp9 z%i3R(UbnU{0untn#u!N`IikOJCFQmGYG;s-ez>8?qS^5`I-Xng=dVrZ>yyCXOd zRMK3V#xndc6D69?iRkRIG>?(iah5mYoLA70s+M4f$x=9b(Z-sJZr$V zg1ooP6RXy$LgTTd;y{fs63!a0t2>xij=eVTp-%);vjHhrq(c5bwTrI?tvB<#wommw z2T50bKqBf!TAo1;!nUm_8rbp%G6?e(mA;XOBQIrd=hDoKol>Y-0YX8EllvG-oHoH6 zSS6>b9u3V=wDp2EW!~%zyG{bz28Zc8%C#6HKP1L*$&zibG zCNoqXLTlyVQ)t097n7QQ2fh$>WJ+kjyF1!01Z^~ml&$Oq10a=>ss;t3j=D$frvlHn z;vri(hB$IPEu7^P)~-RkxpiPiBR!c#bj#I`M}bhU@nrFG5g^nHa{L~^fci*|mw?(yUERPEW6_mO#cKr|HOk**WnkUN2?MzcN_~&g@*%#JA$>=R0K->z}- zietVZ`NKXc{1=sB3%XX`cp;yUscq_;_~vrt;z?l)m~*6qT1o5(j&imn7E*RxK3!ai zT9`aXh?E?;9~h#@hhU+-k3WDua_puQGadSlibmxteh&}gfm#G*L}!u28_B_fuDELL z2|e7r3jbzwdBBJty_3MX6mM!F;Y>*Lxsy1-82%xtJjGqOhsWh8HV>=;b;)^^{~I`9 z^o!h3H(HK5DNV~G1YbbKHz`MIj>qNrA}S>@Q573p5i%j_u9WCLT1~EsU?xIg2eH8L zL_d`o_{8cJ^iU$hs9;Rl%^P&)Wo3BA&$tn#aAs>rl|g4OFM#L5W+hPhp3OuMFAVK7 ze40XS&>wrd)8oL=fh){BHXBr2prO@_Mw5aP&;Wp$9o_6tU3p+21_TyMs;QC6lw3 zj^+T=$)LzmVX3@q0htSKG^0WO&^#S)mJd(vS6Sc`x}?W)s?Z$Me2;QfbDG%XvlO$S zFc1lh4M+?@G_V6|Q`3(d%ZHUHJ$D`zP*j(96%<4xEi^Nd0Pe^$pPWc6InYDc;}V3L z$*awX!Aa;^=t&7D$2ddmP>YEnVXji^aOB?&L=f_9=UiZwQf%gz#~ z8$k*`HGK{|a2C}tj(~?)Gpu@8tGZBT>>me*iWksiCC;7akP_2nKaQt($9h00t9HFs zSCpc{3u}zhQBRBY-87*DFrH9(tX`<8C*#;b)Vo^pSlId9p0`cFuc8q&rcR#;h(`%)Jtf0zY?3kYgBO2dQEY);522A@R?V`0@j<{tyWss z>|iDz%jx(qLZ~X_Yi4)M21gk1;OZYQ1i6ay854Ww;Sutk)W^iKA z7YOkEorQM{)~SD>*|v799n#lvY~WV;2FV|;QWVB3>P@qBLJ~<-(}|D1@Ku!TbwUTLs ze3nT1h{cDO>bQ`_P4Y9APDz2iRxdRzAc+P8NprH7*ax9Y&{GLm#8c|=nhU;cV$P#+ zgpR)4s5#1B1HPkkHJ8CH*iY5A)=Wp;i;H-i|M*y8iN99X7QK8m($!|+KV}FuJCJf_ zHS4meT@`o%t5nGf6_KYVcrAThxY$j3Y6;7TA!ytPEMJys>xyU6xkHb6<}uT1@0tspcEyi_A%on;E9Bb`&IZ?0w_2zAr2wTqgH`S z%{&EEu_8Ekin-=`XP1)J#C2_{mEHzdcx*5=20&Xmio%Yv3AwqjbF_te=2~i;hXMc| z@nxhcGnQ?&I?1q#vNwp6Z$69!eD#GzBp1Bszv(gn^{Kw2T6mRjl8D&jz>q&xCukz+ z90pMjVY2e-qp}q58g1%6gadind`QWX0)!hv6RGTlb$JcOt_Q@X73?Kx&Aiw}39X6z zyr01$U&f!lo^W$?sFGr z^ku#j;Tzv23ZgjblW-vxZ1U6#V9F5c7;|}Cbk182%42(MRD}@6hW8RCMf3~%c7i16 zb9b`<>BYE_)Cdx+$dbxxD=Scwboo3}a~XA&9NI~BhvM1L%gFSa^9K0nh(-uI32iF? zr>0|HfWDGtt-T;vi?@y(QzXhwCmF^_GGvoW6h_KAFrGj0inkkfv%F$AwB>*XC9qm; z2d#+WK)+|R>%^#&IF@?fRUg8enF63y!&cRU%#0qVOb#ExuHr@zA0)BSYz@g>1#6ys zNvD3eWnVxD0{cZo{7{ zhX4|%CpS7l-(IKall?TZVx^Ih_EOqI9V+b44wpygkgGAcW>ABu9h{#1tnSpu0?b%v zs##Me8)u+7PG1uKr>{Z|Nse$RpojIdC6+=?pLh$Z-4u z&NawFMpA2w$7b(LJ9A|PXQj2k4vG0nKLn}58X<`z0&*Og8R01Fs3hP<21ojq<4HV2 zlA|EOR^c8g<51Y=>T}*nUE$iTAX99vh6<1t$%xuQ-HMYCj%O>V;{$tYc4dZhPsh&k zJi)C6ewAh55_%4hUM*HVA=oPdGH>G)l!-{7c&_NHP@LcNv21HXl_j>tumZ3OXF9IT z3HB?4N$5MEzm{$ISnRL!ElYLu-p_owo)hLC7m&=?%Zwfco zJm$NKC^%yastKuibwnCvu2+vaogo0umL1!*(mFH20__BL!LTZ|9*FuXDda4U#L3eh zK-z8#p+PKeysA4iY-J}<`RmSsz+UJ(35eTz!0)n)12Izg%$JU~-BdmtLgl$1&P zMfZNI|;TE&mMdcvdo`f?G=Yuafq1pf1wfEO-bsb5-E79{YPEGq@zsinkv0c%^C-0|yRm zMJU17VI3`fF8Z1JFphRPIJ>eSE_vF8s$EM^->wQpsl7m7#^V|n0z0tKcS}mVI40Uh zR~ytv@0A<(sb1(-N6;Lutd#&QiGXnGME<#_LcFiXNq2(0P;;?8R0A&DCY#Z1t!|y+ z&HwYcVYg1{AM+fqSU51@~N=n)^dVJO8NoO>I+GN&K5^yqE0pINDvqVbY|55Y zB9SV}Nrm{r6jWtgN>4BYyB}h-+4W=^ND);Hq1q2cBe+6V0X!U%Zi=ymBZ|RFL>vlG zsG#zwiAtxSzRj&DWaP_7GznYEmHB)X zDm}u-cI7Yg&(uT-MqDlAkvP<-5(Lx)|B-3cjsB6sjAq6}S+ZJ$2~!a|)JFthuv;h% zFUpq!g%N2Ed96<%;i*X(lvEp~`dfD+VKQ|bx6mXDoeZTBPfTKy8HINcMQ4PXRMo~4 zV4yn0?PtUTS(*JnS*=IImuY5BP_eI7qp*C&J0>m)!XUNJukbY;peh8%UPUegE0@vf z0AE#Jeu}gKIuNBpkx@~nP=hwn&ZP+(%Vd6xv#4yfL{gcE;@Oj`WlnjcQbGQDo^@2S z$ANY*m+-Ab2?-r6;5b?W+!A8db{aI*TiSEWY=t`8C$#5RLodcO;Kp5U&B>)$QiE|s z)rbdkKnwP$jXj7*r7RL7z*NNE-W~z^u}30QvszSU@(E??v5{;fFVCz*fs2t-y3A2$ z8J~(ynJ7)=m5dBy5kINkI%aZt>+y!jf$y_ZYO9i$R_vgu6;cakq!Q_EECv zk^3Up0SVxrfsSOF|EhsVaEa&aaqlC5q;;eVz|NEl!DDPy0H|`O0psCZI8mXrk&WH- zgfLNm*s(Lu11TZ7V8TKjLK1jaLH^)HwuF`#D&q99=^<5jN=04S3YcxEgzGk;KyLE& z><6bQbub_{GilM3YUBKU&Ld}>=WLmvm<~VeZ`O~%rNvKKDlqrxab;x7m`8#c1Sq1^ z5Do=&!y_FC?F2INTVT{|^5h#qFJ{bA)*Ke?s)C#bZLUTepZwspKrL*Z!-$=aGJy{~ z4i&zDUi{I_Ooa`1N)?p)OrMwyW<`<1^yF* z1!V!E?lClZ5FGWHr%{w#V15NR_^sG!(pJ;px&Tk%D%=7S6c0qRb7G&MAptQJXh%lt z7m{_scG#kh#`Nh4>-!zUX1#&?VJ2m&$@UF7=N1n9L z&4%nHfgHh4i~>!Yj3!!U_$_qUH)tE_nWs{6jm5%^18X9C_TF>~W^A;KTx>(x8g{OD zO@9=9GO)<7S#y*aly3z!F28bHn;jwr>7kQ0L*oXsj98Z@0jc)A$mhpw^PD<%U&aH> zHVrvtq2a7hdQ6hK3l`Mltq^BLa_S;Vct6yJilT&T4*)_EG)A~8cDpSOUmxmWsRgrW#VGXe5h5uoP{3&P|9XAfU`3DQB7km97sHk6F_wo z`P44Jh;V6G55mBeFMgBLrAY>P>KL0O4ictJW5dCdSVh@P&8lS%p9N3wmZ(=f3<$$? zL2iVeYPsJFlUpfT{At}W-<_Xo8?3UOE~(MNd>|X$4%zzCk9}5v`{0_NhcRz*5y>IY%j3NTd&=&nzO zi6{d2(NZUblcEZai`6J(SxjX_`o&FJ1#RYYV<}hB#Wh|>Bakw~RvYStn6~TW z4(=AHfv!YhP>wVUBG)Rz@oZ%5L#`??PmN|9iU^t98MaJfsWzdF3U#<=r;yl!jY70! zhsWHCC=K)xUx_r?81>M@F`7v8$BGXNuAvDF z`0yqQW(SocgO&;^)KlX>sj+%YJQ9v+XQ=rl60x)gHnUW*6M09-n(*RXk;SHPdUxxe z(Ln74Eeh7!6wrE*9U9Q+D_j^nN+!ZA4ta}2j9>SFd@kg(YEAGrWlg@20zq$HE#g1t z2h}xij8u$)qP>%?sHzD2FjR3=t!UlEJib>AtL~0&Y98m7K6_!M$^0I^V-LP)BSj5z zd@zoyTkt|CG`+e~8_Gb|uZJN%S}|!$+Fy`_ybpluD!>GExj?h$WJ`UsaGVUlrmDne zacYJOH6KE^vOo@vY07N$1L{|Xbr{WTv0QR}q#;t?E&(&EMv95Tfje|;KrkU{->$?| z)&dKjBW6K(nJLvbL$@;5_tN~X2zamvQg4zS)SZn5fN_&_>!8Qi+D{!I5XUD3tEoun z(!T=meQ*k;(p9Y2nmCbl0X~cM zk&p5fm@W}iJ*x<6hp6(`Mbe>M1N;KcB`$20`K*l4U35Z>1rs#+H zgsmm}2?~-XE6r*MfS`Q?CsIze`qT=EO)`n*kee*NN}GWQ%huOq?i03vA%B#@WmiG~ z1O@_-lGVv=-d;nSB@00WH>3u%DJ*95XBvD%TAUL``^xRaWQT!+5a$NB$_q6iFPjf0 z1M=upC5W3Wit^nv!scAVN zxN=%|6%W}~08vS?NT^3KY<7QKst?@A1U!trs#d_7fUDBG?I&sK7a7_%bmzrvJ~q&- zgD9pFm#{RhApS5)2rNQ%w67H3COBoWM~S zRmZX?8RO~F8M_Z?!4V-8e7~ek3`U6E{Aas>psM7-d{B}JDX35oRumhH43VbG$oyBP zmZmv}xa!gUiAV6C=dZR#m8qz?NhCi&r&$Tfc4Sg>Yw)?c(ug|McybabO@Vh*b#73{ zv=Y^npvA&|_5JA#&>4$ElS!0R8_c$th%rIf)#in)MLG$~q{p;*uv|o`^sH%&66)2R z1TZL961ycbPRb=#I4(YrT9j6lQ6J^y45(hv(I(AgPe^3JX!|qgxmmQn>{A#?=(AP2 zA}cwmo&!a)FOR3>B)p;usAnQKga^cxme-Y zuIETI_N2mFSkU=Z*+5N$QPuDMqrZ_AlF-m05bmnVJpGVyv&WE4R4a9pcj1Cp8>>9+ zif$k2YZ~oO|0};rK_Gv#>l7842tX6hKjKSioRiy|coH555?!u_x5V)$Cp=lCL8#Hb ztjzSXBqrP^+D_T3+=Wm?!{%?r_6cJEgP50)>hu#VMQPgyD0iYO@Z}~^pQV&aqYx@e zG4=APvny&qB2Y;tpYl2qPRnbUL~0Ec<5PVNe&BsLpEqTTr>eI9m=pB zfI)d<=0UmpHRQ8EfnN9d#CM!DJwqPA&3Y{M2&MwUvJh>r91HR(dPP?mIL?+E!LA7p z2(1;!eugr|A;Ovuo_U9wDm-M5@SQ|k&u zp4>oHy?zU$q|XG#0gVu4L_!sxY1ZS?(1F%8v2+lybeIAf73b5l3;*py9A`RnD#Bx*nrv53G01viQBDi@o8lY6q(Y3V~ck-nm~YNebJ@> zq6AWFokdWz3GIeeajz(sU|ITP%9fTuToqmtvy^4g9TBQtzpRWAG5N$TSs;MjA!G?I z+E@)n=7^?ycuqjilp(mIyj0D6^_gvFMGz|y9HVwsgZmfp8D?}?Rm4z3sow6FR_!3R zA-f2VvT!M@PgRCE166o)>FRM)5!>ol;VY$EEj=O9cdtQohpJJ}58rYXfWK+w1$Y)x18AdV~l5d>+yP{_)0 zYfmjltzxDf9B39CvbQ~a+e7K=Ng2-2mQ)J>!+u|dI=!o-NM+YLzXBUtA}Wl@LiDGLdC&Ctq95{*;H=yYFMX6Rojnv zbCFu%AbCJcpb~$!QXG!+){?n*kUKKuz5D{ms1S7}^-J;YHSVT%)o#s&hh2jGCGi8G?-5?C8j(S7&#UjY+OkXG* zabspQkDMU^a&E-3dyL3&AHe_1SVMIKz68;^&>eED#>5H9ms!J*r`)({uqs*1O15o( zt{4#6oFtHs^u|iYo`TV|Wpa^{g6uOC2AY$0F48OH9CQ%6MvQDqkQu9zO#^b~o3J-g zAPr)OQl)yZIylp44M$V$3K4nkX~2^`1lWq@S%7iU`Lbx!@Z@&QP* z#i0uYDWM#o%HM~{YS=*zCsyf*O+W{+DHSUfD_-rh#$b>d5fLJYp(XyS_++c^3KuL+ z;;uzdO#;37XyAGq)~Yr@o$6Rr^2#(4i(ug*4&-$C1VN@{yWA&bs5HD){(%SJ&4A`$ zK|#{4z9bPT*)JImMa9g@>nQ&6BXy0i8lo|X_MM6Ye4$oK*eEk}x?M0dnk~r3W(8tC z?N+nPMOa>4+k(vK?R?wPqr>93I+9%*Q!AX;vD`V*j0ug)Vn#wnp?>_Jex?c@VK@^W zyslu;Yv5D0R|5&!mZW*QAsSM!EssG2ls|MJFk{*%ElX+)QlrdlAxsWCk2;M4YTqiI zM6qOCu6|k;K8KAL6@{&L?}twywhc=>TLeFzph$9qAMITr&k~HaLDG_#fK;f=zV2QQ zF$~<#m8+z#LqGs_*p%s1bX-REYF+x$V#=q=E6%>s2o=LE>96#;M1j~C>T24s#Q-!> z1hh;dhcMH~LZK2C01;sYV9s#|ALKDKn;5rL2w?uyM*c}@VO~$if3<5zfH@u=b?bTK`zEnr58UzF5q* zdNc)q;GxV%&m;%|)!rORuw%fdVz~pzOGa^N03nME?_tG-`x>CFX%44{f+P#( zIhKy_1D;uzAcHvSYhli}qs~wgL_hIGjh!P%l1&!W|PQ`QS~ z5e!^c7M4Ir!<32*&X;}JwIwzGtE}t>J$}03IL5WOGu2hFwUt>$662`dnxkb%NUs$;?sQ3`?pEheZU}UF7tOwUR~oIVN3l&o_dlQ!!`O z|2MmrYGLaUF?4Bxz-&`aZ*?um9HScm@GnlsRLU72Z4hsfjrT>qTCVT z8yrw;oy*L#3+A}8u(&fQ2@=Snff5h_aJkSR?%JWm_`9sYz5)pmQ6v%x#uZQ$Ud4_< zERH>?O~k++U^4_Qz0I}*BeXKbVKRBc<`dx^cA=p=sq}E@#Q;W-E-qKkhJvu2WXpCv&ip)9oXb^hxWwSqc^WalefoI{w<$|_(9T`g+ z(Vk?d(b=ymS^c1suGqk=bI=ji_7M;;0h1I{DV;jN-%xA2!HH$O1iOSc(E$X@lI~E` zV}RAB=n~vC2ZCp|Fn$3HL6VkL(JfYna4D$E(Rvbve6Qyzs77R3Ce6Dt(Xf@c>(xSX(oOMpS;dgY}fsW_}x1?z-X z^Qdw_kOa^^7=3Jl_iWAt5G+uu-a&%Ag`NVQfH8~81(FNGSQdL0Jqiri#PJS|*r8pE zIZhqjR!f$)IFHlSvdSDA%Ko+zJ_b4`?aaS)s6kS2kwZ};h2yGCp=TN_cVG_cc|d9L zxgY>zfK_!?C6&DrRGPfOKp^OPidhzvs}LgbzI&E=+T;qTM5*ZU0Eqc6qZ!45>P}1G zb1RY?H7AzTw%27N-pGBcjN~*0erI7u_kG|(1t6ZOM6DlSYy+gS+ILAjiYJNJQV4xX zB*Ksd(}_;TpLhgn3cMH&89;+V#z530cncp&@A8E8qDA6gRhbdf07v5uK)43K5sZa? z5tEF|wL9DfimBuv&XFWnJ8b-d*OPbth< z%|}75XpEXVLtC`R$jisXfG|NpRD3pp2bLBH1X$rs_d(ec6jeE5O}o-g=#Q5zm+4>#_0keTCm)1Wx!SYq9eOcg&<$M6TwR7J@o9OBmGdccH(p$T6dWN zAXS9=9SN%*9AKw`CJEB8v=YfLDf^gRNteE)k6??*yrQ#4Ea(qX_FdR5Jw`+gdve65 z!=<%_f}kXICiHNq_Nc0`0!0|KaB3C3O$950$cWYN3e74cmRvA9g-HIjQAJxWQFu`O z&eKDywm%^WYl3QO;0k6*Nz(?9>I$wlmb@w;V;Dz4$L5(EbA3898hq5jtVq^7IbNxer5i9D2cxo>W;jv*5HVFdBl(;${2b|H{hc;GdvePi& zH%B|eDnBTI;6!O&5}^}gn!KoL#Uzf=k%tdu36dEyrA(sV*89c?P=TnAOO5ZVdOkjc zz-DzsGDwKkQsvjRRtOQX4}54Vi`HU%>L93yA2U_Lev@^)rUiqdn)8EbYN}&iOnpv@ z2uRXn8H;6(_onj=VGTW*__9%I2o%tPCPl-$z|*c0;~^02WVdh<{T!vZe(U1`qHb>@%;J+LV?4wZ^UN>^YLvcp#bhQKRC^2VZBL`&332vod5 zt){lhG=&9aYMpf`7fGM&DdQSUAxEkF^3j1ZQafxSCqv)eB#T|p^x-fj&0&A^`qK98 zt=`FbORy4i;Y3>p-c$YA7GN_P%I`X5QNN;+sAxL^*KnfKN?7ghRW-JXI3<+Uu>}?4 zN$JuA2!SOch{Yy;K~JTk#V&iyQe~Zhjxj(22q-ctvADo(M;%b9iQfuHf9U978VB+N zb#RKW(2XtDtu{Q*1!IB(^3@{y(AR(#`P|3wa3N4K3RV=rWH@hfM-D;RnHFCqkRbx9 zbz(_$f`dd%H1T^`YdMACL@7JRP1Vg`fKP}I~6ou!n1mRQ-TJ_c2C94k(g104Tcfyc|X!^u3^L}(uksT!hnX;=JtcI-ReUXQNt2hoaHz!ND$6HYa$^^i4 z;E<|j)w(pd%iJNd=857JPV1!y&Zw}WqWVv0Cmty1@c}zn zT>^%j8xIeLN~F9&`o~c#m@`~RgfN(rQq3M$NpIGK+6`*#qF2;7MNv#ry4JM?_;nc> z!M$W=uXn|+N*9Xf$xXIbcBT7g;?p;sod^klHpIv(eZ)(N)dC~2wb}u${uoF{ngT=? zsO}1K8rqN9wP6e9BZ)O6R2xx+En{oRtIvt*>&2Si0&+K^S56U|D(jH%iZ@`#%Z=KX z2OSjFhh^2N_B1-^5HIPUsKe19=vuRAn3@oX-mYS>sVz+hLMe~5q#l8M zkre2@1~PV=x(63YUXLUkmEWRig$5{uVH^$iL%YP$OlKCBk!{vHssh|o#&{yl4pMSJ zP0j|#3f5RDMPDEakuZcL(%U+Q%#ppGp2nI zsTP*@ez@ugB}f-NB%<0S1U2U}P|$!Cn+*0*AjGD~*aS=Qt(wNi3z*WTC0Qb+qJ$Mm zJZ$P_y1HkJ(U*6`^cv9|1`}L9r-Mhm}+?!g}}O^USR9i5Q9xB z(>eQ&5)dudg;{i=Wv8&`?MK{-=-jXb2~>s;i8FOI2uMJ}waY;!ImM&Y=B_gdGSp(= zWq=)V9lhfiC_(^OGyy{0rork;Ik;4aTULPTGUvhOyP*CUCiRnM3SIBt?7XZcm$& z(?@Aw7+Z&l1T126k+;1gZ`COxVJjgc&B(i=jlhW}$s9$fWv*0Zq%i_6Y9jnYyz2tD zVjqlba%fcm0z8QisLk#Gl#p9VPI8S_BM*Ko5s;VA3xU*Ax!AATy+G$C6!#HnBLb8J zf^_G0#Q?|{if~&U=2Yc_fsT=#ChnQ&D&Iu%re1qACJ)v{;_J!rY9EW})D>9~Wolj< z%T|FH@^6Qf^fS%G{U*6M6FI>J8tH)a53$*_wGuam1d-~SSuF|}w9lTMyoQj}U;%j4 z&YYV-o;2-&g%cHJKmhKD)a4Av(t8Rr5hB3DjUzQ)gM9`yZl^-$3Qj*P;*}Vj+4M9D ztaX%1Xm#wixJp!3oka4t`9eaSD7q_&nDCXbRBt{W$TykaMX#!?08?D9PDi`iX>VE*$EyxJdsM#CAgQDv zim2e&JpqaO+dTmcXcN%TjfIaWEzww_2VN^xFmI@HH6Wm=4Df7KUZMwM8g581%Zl%5 z)X##yb103R@l15GAny@&J!TA`u#ID>^8`{IEy{{K>w;YZeq}NPbETWrT)Pp*unb4@-U% z)DS+*6iZtfO967gY&KzZK9L={XUXh*@c=={nNCd?P^k7b0a>6Fc8(O>I>TyHjpR*L zkq@UMPWhc?sNhth%lds=8HXaI=mA@*Jj;Flc>&@plC<-v!W;6OHpv0$a|j{c2wMR%!qIX+=*jWQbZ11MO$TpSSP!q> zv0D2G)4UcLXfY1>n*1NYhQzAGvSS@ga;2=#v+Z`U)$bw% zaVUCw;0l^>7VwXWQ|2GkyJ3HHE3^j$K_$|%-AI1Ib( zz^0bymV=&*gk`KCpD70#$F092U9c==+u0rVK5(5y4k_ZZkTWF;-e#^gWfzJax1O@1 znD-Ynu>8K{9)PInZ4i0lpj_8+^Zt<>Nf~+G9=aYQqI4_ylKP4jR!TI8OC1Y=(jO!pTniw!DIW)= z0UGcFN1JSHQ#MFiEhK!|t8Bi?qS9FncdQt^IWi3LSV_;S4nw)bn#3nDVVdwgHi1;H zm@5&=6n26i6JQzR3C&anB?avmW9l7bbkoW(@hVwBQiYtz)F9@4;iKV*fm9rj_ZLFc zgIS*(QQM1o8F+CTDc@GWa5CtvE$30H!O3@+B3np>Kv=*+!#18TI+WvH66VAOAr)&I znMqA-!_m1=*O)>^7V>85ggOaqu{+@^+=NzJ12SP1wYMm#u~1QKG7nZx1{Yf*o%nrl zoGlpJ^hq?_G3v}DSWIq`YRJXs8>3B); zlmv{fA{YAiCOr_VFr%78K``x{kjdOWfc6QBP{PDIWV9t<`0!;tJ;W1MMT>h^zFJ-V z9!9z-k6}=yMiW$PB!Jo_B{%~(tqII;(ras~uAv`Y2OKjucejJ@p!7xHQuG@~raZAy zs<$kXqyz>k2u=)qkeS#8|>t7(?J+Jt-H5 z{UsPbCZtFHVrlbbSZ=jM4LS;5_&_Z~$5-jahf3@?NgXL3P&kgSN_&s$P5Ee%Z79F3 zoS+#t$SISjqzc8M)08{VgR{`_r$~)bR=tSohW|Wv^%o%TfFj}BQtZOUWCOL>K%{;~ z31ksD7eHW4_2dFYl3w;GuMM6kY_op*vOEdYALW5|Wvc*$N+I@2Zd$pqd(nh?tDl)i z-KCicy`n$3a@Eox+}MM4a4~f$X_#%`KiwI4(ArEPt*nG%d$w)=vL0HREbO){@S zl&6JA?@HmiQ$$H26GT!_qJk_+9$ZI8Tv3V$Uc(bKv`0f}51Q-NBjubYOc48O@u+Fg zDiqFhQA&Vj$E9lsg@()InsB&17^%+lmW36w1d6gEv?!*NF&ad{9s)v1QwA|qmo{Ll z`n=0GtOkw;3PW*O2!f^U5m_W9G2-#wh(Sss_`$QSuUpnkz)iZr(n%~RbqUn>12eGo zWMgp}G!LMPZYng@X7)J=ja^vG@#z(e{t9DV>;b~~mWe^Se z!niiIUu`KZfIft;HmLlP&A72+Dj>$pXrN-b&{NYpY#>9aQxMbLCzci+7~r1a231ZK zZ)8MFVBTiON=VaBrC1V?o2~(~#=jAwYE-r-?3{*(!IunM_8RsIeucdwwj8lVMH-`y z3x|;PI$5f@RM3DNdKYvt@%#OktwuPpt>G?l7opq83NT+cgVc`6^USK9 zK`@~OKp<2J0`y753r?jLXU*+%C64+NWoM@=Kg4h6%^^mKQ^_Sk>bPQrsj)^`yrkZZ ziZF4kQ)2b-9afW0kUrt~m?PsAoYw52ToWjhsz7aNPyv`g6Y%U+6R=h~djrFubCK2# zMMpPp2C$It7`W2Nani(4G)tp>6mRqeL7l9epEEax;u5B+>a~+{kZKfwkSuP)S^CRa*Oq{-Jp`d7_0`m+kZF5drBz2I*NlT_vZlMrKt<>Ko&NLw z1^%C|QUCmJZ@fmmzv>$G|8|M`>&fjm-``z5|N4IY;N-(@ zT0dBiUTp8KF3xY(PtWha-o9`V`^EY7`uXj})%O1TkJh8>>-DpKTx_kGV)Z?589BONTn52RmfU;0?4I1M`?s`teh-}@=U|<;Z2Ossi8n!{X z#8zlJC2c4$Yd7a0Y$AIz?6@CvOA(BuV|X4zM7dFt$-g;mR8$oAe6cDsJd!RNEKBu; z@>o5kv-x1hwSxFiMHLsu*vgub(TJc%V5=lyFa}(ZbYy8t8!5DI6eS|KL8zb|C^gkt zN}oD?HJ&JbqC&O2=xL&1s};%DFdOv3XbYneX3$#cg@|__1t29BArt{<1!0pJpp_a| z5QuRY5F3(90z+{yiXvw%0wV+ALrLdb*S~@HpFUDGc4d_Hrfk+~BAB4UFxDU;r<+9t z^nvvJtd`6rpDIq2Swn1bpwKbKPzZudC0oD;;Mg^q2|LP^LTAxV#78Lcqc{@gEqAzy z7_0QIpGG3btde3#z^bEe_w!o`lKrxFX(gIxGgc_iT;^3~$jY#S9xx;sY*?p)N7Q^5 ziX=l;(;qow!E6{pmB%!N9niJ2of_)C9C2W>Zau!%<$C&Z)B= zG{XjvS!o{L0{{c={U!5)=?!dQEFH$VVf6hvfQMEDChZu81=}@qIhm1N+Z=OLh&kRU z7{w!Zh)q1?rqbT{HIPgd%s;Heik!=L2a95oJujt->aIIAXLy4;+4M^2Uj3D7^u#5f zusH`KjL1(zL`722Byq@!A6_SQj?>2x?o_J0nKrPAAVYS<;dox-4NljqnQ`skcP z$P%Uv?Sg#Jm=m54MWx4}UhwPP#2N=gKRD8_h04S+)kub|$LE!x69}3sB2r{nkDSWfomjV-wn8K5GvI;oo?N_+V0qn>X_o%LGn zz=MkBqK4Oitgy{S=sg)}MVS;$y#}a_^ z*Q|kAKy}7elI?AZDkL>)_Y(5w@y7DavlR3AVI(PZh*{ojsY)^8=%T{uAvP^?r^aM6 zv^+FFWd>I5vA&xcO~FC;@cROMzI!~rXDr6}V(8XJQrmxsb~1t$sn|32S8?bF#2cH* zk^3tiUF|#yvXZH7)nQ6Z69^p5xDm{Ya+Q4M`e_6rs=P^Stb5F!cr9s$VC>OxFw_mA z1h3=1bkh!3qc-D8o$tEY`m4EY#nYxH2pmpvMV}|8c(V-M@Z-_3**1GlhL@&L&Rxn= zf!gH^x(lksX-0O-Xp&u!r?=8b3Qr3C!rM^`4e`0O&eKC+)2oD!ah$pEnilWaT0`_t z!}Poh%MrJoa*xu<%j__?UXpde50U0rF>HzAA6c9&!Q3ts0iBo-+(-)qn6DXcD*SlB z*lSX#W2R8e=qXupsda1&)k74qji_5=-|-_977w^S3y;9rY9f-|je+H5YhJ8RpHVfR zEaGFy&55=0gUJk@ELI?MnUL3+a&DT0Xw?~Fr6!|oL=K`pex|X!gn2=qwYF|GhdO^& zH`}&~HmvQY&kWH_YnG_d+6^MAvkb@V;Gz@A;*?dDFt%=nO5z$byyM*2UeIQB|5^UD zFGMK1NZ_z51T@<~N7N$S$rAA=wcki^SPqhHY^WR}dev-Zp|NvL6(J1X;t;}U0By-& zqE9n2VTk4u3TB1_$XHqEuLVTNcq3I58CwTa-rA%-F!h*eNkbBml4#+O7qQW>HG_nUx7IN!+{ zU`cD8V!5#Kpa7?%J?r>WZA45DFZqjw@C3f|+3N$uPy(Xn%DHMafZ+Qv)~5B#X>>&y z0ZYmEne z2uyr$6ac@Gi48)*lR>pO+=N*{A`m4M!qRA0@yEdjARQniJfTZyZWx@u=5iJu7JOt@ z?Gys&2~8LkhuPs3ls}D-iaN9if+Tvq$tq$n+J~NNXcNm=93%Y|f@KyHiyE{{5U*w3 zhlW8F7PLLsjCcw6XR_=D5WSJ$gGr^pFN%p*u3Jse)9lMql21v`X;wcSUZ;(qrA^94 zd~6fub3j?6@Yxp^t$BpO+HA=80$Dy9U1#(RFNpN_d|9AuCvZ!@5jJ#c9&RRmNZ>QG zQXN0C2dhmAiUP;7P~KpBnKT|5$bdDCvf(Le#qn@8qc$a3hr5=HO?F&L3DAA^WiH%5Vgsq5AN zvo*pG9tSBzhz5C@TA7M2I`bP*1>-ywSilU9l56`!h7aZh}1FJ9v{lMM=re zr`f6glnw~y-~PklLjaO8P@q_GkdzS>X!@d+p4_MQpzCd=cN;Ya zM>Rwf^+h*ro>nYJE3;B=&Mv4x_I6K|YDe_4XT(}QDy4N{8~oS%ipkHTq0D17AA^{R zMM!qbR5Q+)5m>{#hR*|u#23`c#ffbQ0SHB>wWH-87T#>8b{nC^q*9Yt1R**NQ6Qf# z5UYv9$KpU%xT&V4RHYkpf-pov@Z}N6HjFS}Zm#dYSdZ__Q#g5|WKZMXJvmW`co~PBxM5 zTyYuMLU0G^$lhQ$b=8^?U~CN;PTf<@?SR+#CcaZGV1}xmCcMDLjuJkE;smW*oOCkh zw0>@|TN?H8GIl8o+e#Wn5&ICG`h@3;kV6r1pasQNSx*^U#-63rUK&YdZ#egr74Ubg zzhgtP1-kUnDj}3|VzXaYV_0FLn_~xn*b`mSAr(0Fib>LtKA=oSOknW6hf2AWns6G9 zinx$BFlwbP28Wl6VrHoelZ;h>x}>TgQP|P9$FheW5?y6LmTmdN)<}zTQhnPDricP8 zj(>%Mpa4}83dL)vD*YK-Bu7&#Vh8)!aIi0lDexso)O`6m3nUhh!cl^?(?=avQn42E z&ZPkp38!iWzB(L)I@T8<;P55svJqG)QO3E|%>dap>ooIP9l|jHDjmr{2*jQE40UF( z?CRfi@*UE~WmzP*0%G8@Tbcjjbmn7Fqf={Dw4M*#M>i4|ojf*tIy1Yi>I)94eB+K> zd?h$41EQc*v`Xf5@wb#cS;>!QhgHi|1Tr9jmp~y;v&co(}V z){es>*#&ydZDn~epOO5EnUN+5U+%9S5n0-+9a|(2u*J49SSY2WDDk`DjVMBuqY6g9 zZ1-uX2^!_(PCoNc0nuths|WN-eoE19iCdQG|#%6jp@(%EFU}b%I02V^)nEWm?*_<=ly*8R-<|@LM$_Htt z_Ti0V;T``A?B^g!DBSerYTv6&H=R}cm!7^5YDW7t~O z^cDT7xJ0j3l9?lJ)DJZ39NV7sM#O+BRcex?JnGb3pF)7j*TrR1!pAJ-XX=s^P9Ocd zX^rw&{X9HN3@@^V5fWKm@lrTAtb~V*MO1jBK<$^T(_9?J`ekhPIBkW#JTsWHFQYO6 zIvk-kHA{A9dqmXgDs)e%$xgMDh-xl_SN%y(ifm!C_AXC!f=A0Ii&3@Xlc8{HYbFYg z&5p^@Gb_e(COBjpRDVOimGVMkeo^?rnT94|BcRCPbOJCG%nGU-V9i%=f;FmCHPvuJ zzh>8SVJm;}ny73|C;U9Bl#CWda#mN!W*lQ;Jz~I>yLc(b-Zv(pH;5D$B0%`U4Kd4+ z?H~MdfzLMeP;JJ}GYkWirtAydP>b(`Sa8(xyp*~08`O)gbQBgcT-d~CVloe?qsB@h z6Ulo!I5bg(SV1Vl~ybc+q?c0E2G&-Hc(`EzB0EI zhqj3-$4F!V6X8^^s!j*S7V@Fw8R~mO@3J2&Y}x81HL;}*E+!)UKeoQMLma8CY1`C@ zN0tCB^@6g3+vr-3GF*f@Scwr_?Bs$FW=QC0hzD!1Ou@H=9mfIH6=Ff?5Q-T@5XS~r z9!G?;#;7A+H_OfcunKh9to897B^=T>G>Wba^GU@bzU^P9Kz4M#YiFG&UCLJq`J7N< z!auJ;UT&Thi;q_)Rj^FrEMrFmU!|bqgnh<$o34OqL6yK$)p?K}3oB}$F#&xkERUBs zY91D~wB5kw)8WW{G6ko52{F0w4Nzo_wBY1nF@KHg#uu^t@#bQT(X;Hbm6c9oTv>6}cB)k_L5$U{at?mAbGVzlT+T(*-WC%y9%*!^T+VxNa-x zxL_C6U2wYgejtsz63YNRn3W2?p?=aP=nS!PRqrU?P6eoM29uhXnNm6K*fvPpGl|%2 zte~$@H$m<-$KKFXC1zUBP)ZgLWFFZ#FUThAmI2hrs7rwn^)w zs{e+yQD*?;D`#QgcobKA*=%_OD9BdaAKx(2I=<;(&AIRGsPqFv`sKpVzZ&5({F& zm*ZJ$OdzCM!HwJk6w*;N&sk}*j&rFyP<57TyE$DM`yQxuZHM@BrLQ$aZ4d^15+}-; z_Gx{}y6QzC$t^f90mIoDnrtk%#r#VckZaZyZ-489gYssZX%vGYNDQdER3zUs39Zfn zf&e#Bw^VRa2^DJdQg4IA)YQd2Gw@|A41C>iMFYGkl$@fK-%<&skrltqH;FRIkj4|J z`LZ(45PX~2{ zU8zA3&ICI7=fF&e1%V!wijvc6;}v+w4boPlDf6hjCK$L zYnm3v5~60#4w^@C3$ysIFv(m|^Aj1rNgz<6P~)A=LbC<@FZV08*N7pihX8>k#$rIi zK7`aREH}&-)T7YU&QWrAx?w?rrA@4gwXhn;5Y}v@h$v?G;KS z9EzVoHN=9*kIj>?6OhLkUiyBDR^2M>$E*on&pEC!5Kfo0m@T?)R_BpcswQmMaR68C zoplX}T8eMNg+vC=sMVz^9B z3$Q8rsj%JmFhvoXUok{k9Ze1_TFJ;7I%V^cDg{uz^n`o?+B9u5@dIbzBjYjb!Z-=! z6y8a!w$<^FqH+>6z}C^pSZB;rsV(R!0n$W@5lVg`M#5ki_eu>5sb+*JFc{T4b+rof zopawB__klk@maQU48UtQ7s4(+6h#DD1*@B4ENU7Iz`db(K&_j|ibSjtN2%Ac6Mn-8 z>W(^Rg;gWg0IoVZOdg6j>Jl$DHxz4Ltz>Jp8fGcw2A4xKNOlw4xx54gAXBnRlk+fS z37el}8gQ^}1#6AAQB~qQ`xs$MJgyVEHV-=k5Q{ohf=Ls)x$AADeJHx5!YD|GL?-39 zqGeI+;es-o1dL_%#`bQFNM5av4%ll;lu4O+^o4P1@TDno9FFoTb~^%ta7jznu%zB6 z@>%Wr*D#%|GAU=WpE+Q{>m)o-y(BDZBM>}jYI_WHl|!qk4pwNWTICJT+@4hCk-LaAj0L1Q`viG?%C(Eo!zx%rFDPvrCe9J% zkLje;BW6=f2AQIZ5eQwS>Y`sFod+Qh7s4h*;=A#*aS zCV|C<%oBj&4~t8*ihNKhc&Lz(vj8Pz<&!#`6JP?iwcduWSeDd60(rDI3{RWJw(UNs{qfqKStBmhDs z2vF}}U_~}{DZxtEVzFk@yydaM*c)wa4jmAQkc`Y1!6iy(%uWKpi+147xbNi5 zu%*L|dA9y28C}!J4I+iQ4z9H zB-{xo28Cc>)7GWl{ErXxET!iOg|7!@8D8WSlctm(ZYUw_CFE)dTLaOH#B()(CrywKy|% zGcpy!u%~LgucDeF{!qJY14|@{B9UM#0mJe43N{lwEVoMIq9nA)9hk=&R#C>=gW^T% zu?6W$0#hCZ8d(e}MVhPW8|7-}TLdamJzN=XD+}XMx;SyUqvEv41N;4$rqwDI!3%g=ryId=F;eyECr>k>`}RDnpK#SSN9}d z+W8b}2-FJnR6M3Dzh%SaQ}9znPodr>5iG2gK#5b7br1}6CNdseFZlRqG#))D;yd%G z+S(wA620)Hh|Bja5ZEVNwc@wOtip)`sjJ`M6m((ti{+%_YH9nZLgun3*#TrkZSx8# zHM;IfT@A2XXJ#ICHRS>z6L}SD?oE{;?Ha12;;`}Gk{8ZZL1^XG9l{xeHYMGGHr$K` z%}Z%6L+m95$taN-aM+|{fJE8{wfL|n!3l6ldtMmv!n<#C;jF1x-k}ND6^*$F?kn9yn~VR4uNsVKBTZc)dOh^pWa_ZRexE&yo+6{{~jMm0T$eOb;U=7`rS z6GdbCFMvf=HQ6W=VrU(oh<8`odV;bj5JC-xuEawrkSPJc!^KhCg(WyHM~~`JWTG!) znf>U3ze^k7d`Oy~^2Y5ZaB5Eqi)laDm-$>W215O|e9Hy~0zeH45km^Wu#&whrBVc% zLI`QgTp)4tu#rGS@1_;k1R^U+``C&hJ>#Yu zKGOwRgf+r*reEV36r>0Y1^d`@*y@5jpoMY`pX7r<9Jw1EI4X+zSC9~zMNM{YMpq3| ziV|VBAj++Y%7z97FiZ(otzT9dh@-F#6QiWzptF;~E@}jPt!sx>O4YI$ss^V8Twi(0*0c4jHjFjvLracD&?-RK^8EZKjQ^RWE-cI+xD=s*@C_VurIKQ z@svA<{xNc%hb_&77R7iewxjoQk+uVQ?+8zfj}(IXDQpRx1CA1{hwO>TQTEv(VyukT z#U)Z1KqEL|Ze(=WKbM|`lss~RHz5Mx0J!I#R8ux=Dx!?fu9*P9YSNHR;JLV;qbnck zs05*aJISR<`NZc=0@gzIH|HbJ5{HkvLfvHz42ha2)099=D|SdPqbkVz+M;c2=ma*- z$>l*xEWAE;pE&R9n%O5#R2+)9I6UbqmPogj0!MJen8iXn;9`{bA`c*tm3V$nv;m4F zbo>LlLsm}tB9RF{$P_&RrfE=tJp$@bdp=_ZKOu-9#Nzc3#DPIT&PEcjM3`Neg zlK4J*u2J^P&j@Ik!rjesQpSDTi{luT;yepU?S2+2zI%!Ql*a@Jxd?>TrZI`?8CsjW zmz*kaPxS*SV@?HFOra!V45(ix96}WlcAPdCIK@+=wUE2uE#&@G_3qS3Jx-GcpgOW^N@_4Nsqy3tDk#{HmySbD@3x{2fYUlz zv1raDW@y+a5F~{cgP^>EqSaZ|?7P!>tnkOgctK7c|7AHx?Of>PfX1EXj~oD4o?H%f(1;YLKKf?EMZ zL?c0XJ@lXICr1hxTptt&fw;i?G+kRU7V`=|V2L1pA|G=YYXC&T#miC+22rz#=pH(x znc9pSL)h{^D~z$9pi`!5mIH7v!>xslyyOeOov^EcHOdGi3p<>0oxFnQs##UN34#aK z75;#E=1W8#=#&`@X^!Dly8D_)73{ZVv190T(2v z0X>*o+U`X{*$w;?)`OnkBv7ALMba-3hoLDTQezvbgg8wRuJFR1EJPqHkP$}vuEru& zC9V>aq$pBd;ZbYq^I?2A_L8)DK6LYx29ehAmm5uQsE%^934RH5b#lhp0jNoI#-l0r7fTLOy zKAiwf$7lhmT^olYlv@TVo0+E}K%`91&cnj0r5Yr}Ohh!mOD59!Q>!-;5M^|jmikX@ADgrS~pgzq+Eg{@fznHy5BL`b#$LA2K1i9w? zkw|eKmOyurW8#mxfKVl&V~`3FTOsaMEjfx1J*lpi5ZyAMyq-x6n>Xfw=6V&$n$wur zVjQpUX>T;%9MxEbf+gq!d*9kjq#CCNdGB962nC0LXPe=(e11WeChopoHDrG1cwft) zA%oJO7jwoB)%fkHR<~A0%nPxvCV6eWI?fi%LLM8x<27X}pVWDJBYJnmCwG)IbJw zRU)Y~O||H}D14cgC{TC-$B|%%>hg4X%OnAwIl5MyjHBd1iDX_QebB~Jg^AlU7oJ~C zXwCh^UW$Rq;NjHeD6A7FH?ca>|0J;ZPINXBDrYP%Csv=y#@qVlOmj$L%BdGHwOusV zFsnNAcZg0usWNrI5Q(Xi!dlwQ6@-M#!8EC>ohY0`7bkwsOGg8$%AA={*q|)DSKUqLm0=4YX;EN zuOr*ja+#a2s*qL)*3iXdV<#%$?HCMIf-8cu+b3#Rz}hIFB|7tM+z*zo+zT=jJK#u0 zo;!|~j5#VweVh~}`y2IuQ?GFmN@0D7*iu%5IBX!!wdo9eG)Nh|0N#YUBF!>Pv3cbd zWJM4w>gV)~QCjF)+t+t7ehRIF6u~oi%KQ+DTcMaogp&d*#5$u$)_oh9Zv|<;eltlO z9+1pvA8ht0p7^X3Aw(WL0)9B}=I3KIEI-1r*%Nwt@qTu!1~9y{^i57&m@FM9c1y!8 zo2`Tv!Sy%>JrM17G&*V+E|WD9Oo)HCNA(SN#%+g%00o;N)!0nwym>;j{PaCHAS=nvchxP+JE#9T720~T*2!BBbNzyLBK7rP}ca;b>rx(CR8^^0_C9=n85 zEzOOSA28aovnbhhvp^(3N%+Squ_?(>jSES)7jAKma*uvI1ZmKbgTPs(Z4rBLBl^x^ z9ad%fA`?91gR+l!qN)aFHQLdHWPgYlz$V1`kOo6wSu8Bxp9V!3=7eTKqCi>yhN;=II+8o6Kx=l#pL8nu8`EeWy1GuSl zmL{DSur=EjThzr;(YRq(iotB15QVD+Qfj-xB)mbgCoJQ6i%#`g zjI}{!!f;65W>Fw78RL;XlaJ7`!g)$ahQY}qAQcJM)8cPnRceeu#Ir0J|4Egg-Wcc; z6;A~dZKOV0BdNH_(ZF>JAnX_!1+^H6 z7lH2-gAS}!(z9?Rn1{KAG;4);1Mb+#L7p_5pf*(v*tR423^c3-V}#u9zOd?^wVJdU z`(UDh8+~qse(jvvbZImWGs&WRG2p0fDD&tfS;5x;x?%a)Gs_BA&EsG#$?}q)%a@R0 z%PLh7I!tQ!wiC%Kjkm!5p)swUgrsuwsurFLLbA=TC{tkd$^RaS04aVT!xMLH;53@yx$B7+M_VGrjJUX6+t&4|Dpi*|s#s@;K(Zf+60pdcog zgUG^${vx{{>Ttqfz6vshab=q*pYN^-2G-d`(DW3OlbY3{=cAe5#884YQ<6HN?NuqK z*HE;i=-KLoKBQ*mY+0qwSuP)Sqti`nuenr2;@d%I7&8Ig`1pB3wA%nI5E?6+WB@SH zIJC^>)RAnZcVYei?VeAmskW&i` ziXhNsGerS^0+;V>8G%r_+n;f;`aaCI+83ZHPf`#x%gssGP{M;m7MaNfauAsV@UZW3 z1{SM}AZ^O7C==R5il$RGsNT0OFKE5o8;vr)4nT1oaR-(pz=HWmuC&Vjuu3PO33EAs`IK zJ6Q5CX1nqJ95r`;57Np?B*3PlYI&%^KCq!Bqfcr$7AFxnCc$4Fn_I;BV2HjljATW+ z7Iiwl%6G`k#^s1}V+|d|vS_!K)NN+@8;c`(@=7@!mcp4}`yg3E!3->*Y{i2gwJ#m; znv1M(?-fHr@psthJR=wIforsdqR5i2pDLK$lVS+Z!wq~IcOC;DQ2+~ZhB`!mlpV6)14$JjwpHZF8D8840A#} z0YNE+iSFAxBOtW0k-1qpWl!XOYpjaa9Vg#2kX-pc9h+vbiEl7!v;zu70@y2$-0TP; zJGZ7W$O8t+G{%N7TP*RZ=@w2;w(S5CRDRPa!677|cRuubu*O`VmIp9(Z& z_fqIvVUSFk0Fx=3O>@tnE%d8}91UZ8QKOQV4c_Zk^AXxU&^AJ{eq+Xf-WfhlP~LK; zf#$Grx7eoLSap}YWW(A}_2B7`*Xzg9b?P))DRoBUb}X~81P)+4ll^a7NvIx)o3_$M zDM)k};{lFJz;qhzNt@m?0U;zyp+7&b$D6&KvKy!DRH~0(3hP2t=*%WjJq1&hh1>@o zqE zA)_%w!h}6)3kDo9d=QS7Q+B}N!c1&V1jD$q|T;z6ByG-N1<-ImbwZ-N%Ag8*a>u$g;v*t~sMSzDE* zkrU%Ara`|`OT&_Ap8}8xcMX1%8--0r%x>|eaxApm&!D@6ucn@%e8>5v5X79+@{W0= zoM(q%EU-MieGexh+XE%gkTdKg(9Us@o)$&Axd3oossb*agUne&UYojL{FHdc!Z7n| ztcq30T1601MGlQ6kyy+a3?+|P0Nyxb5Sm0`w?)QTviwo-4?EBdAOi!rwt9~rs|W9( zV964R5w$4U*BA)U;Y`|>G27-uAY|m>8e>$+FfaDbJy9 zZ@#Xtz|)Z9(4Hy*9APxTulbB)`p=3+k$P0|KvfY*d%$!ZeE%pw<+F{10d60l9OR%k7>!fsxki^TY zZXCQ`>E-@3hj~~EbRY$Hq+W>imA@KD<2xms`X*To@HiRKfF8G`s1=#v$8b2KYcBpw zg|;#z;Wmw^Q|PLLB`ya~riZf~a>)eo3^i0lF#n(uz+P=C^&-YYM#foXqZN7wo)yxA zh|q%!QyiKcgyW)r*jH$k-bJNOmpnx1Y@cU9mTYL?D6+FoLhV4tp(5+;NvD?$lTEac z8(vekqOW`Lm3yvFR8TnRZN3bPjrRpeH1LT(@~f&1jRH#sPaXW`HC277mGD$fe58b$ zs+M}ib*{pU8;CIQ2q%bCR!^c}n4-aYXpC1!Cx$<;3=)X^(ZDLvX|YRaZcwMK>PNF? zTPbNrO%0{kob*8~kS;Q%1(yueFJ3WD39`-&rK@+{IX@^mg^Qey(ZP!&djR*WKOQCH zxNC+{z^w{ZMIvyC^EO!#ILfeUXrYE26(fY^6RqC(3RxT#IUtf+AIfqF^9GB17#(U1 z__Wl!Rzk9e{5Q&8@geIKiJCO1Nd-&@u>~I;4&aq+N>+h@b5SoA+=u`lA@<0XHaMa? z6F5>Ac;m3aCNM1aM$HWWN-3vYW_B6&pWJA40iH@oGiX-DOlvHON5A-Yl}<1IX4;3HMV?O--87xBRN?G&hWMP6TYnNE^u3UcO4fJno&!{IY}xiK*boz~E5 zh+8a2Wj68&R@7waP`F!Qo|_FiW1!YbU5;TQDp;y-;40%<$SP=F^fb63t*GA{H6MqM zq@pl*a`*wy;gsD=`6nBArt%q2A_5lraKPf`nlY9W9;!lf+R-=!oGJ4uEbmZWd2gg^ zwMW3}dYJtbAeOyJA)^DNfs9T}zEFloCbwq5%BiRh<2bZc*+}KV*m~JE*+YK_Vkq2( zBNnfnbB}@v3wa)Y9f^Q`L*;mI2-$@Whx;P$p-XzhJvMXH5$-Mr(o)h`O{GO&IHT$% zC4dQ&9-lSJ6KyaeqRZH|1SC6E)dS87g@OYR#)~Z-!r-;jwLu^cQG))6L6(~^n$Akx zU)h8`t@=`XUdR;V3Df#PcK`=K&O*ECcHoq9D4?umhSDXlbk=Fuf(j5$A(^f?+?dP- zC<38iDUPhh-lz;Y13_Xm3htYa7=4h<)nm>@io^j~Yi5)TOdX(b5a2PHG+van0m2#R z(775J!iuj+Wl9Zo6IcSJKuPd?=3lB9M}o5sABBHowGn;$K$ZsV*-G=;gjDlT5BoX& z2erXb-DHGjH;~4(eu8B3q{2=hQ;lc6rE1|+DblJVEwsvina*h@{VEUD`;o^&n6*<3 zqi|~4Yybpp)Yh&UjbK3K$<=piI)pnfgLw3cHSt-Zq-^2JoPKS<%#_L6ES5rUL&mC4 z4DX6}lF_|XfQS?<(Cx%ks$Wt0p&-K0V6NM-XjX_>?3LUNJcEeqxDzWyL+u&WM9LY0Td}kng9!ps;=Sbm z<$iRqvys3-3U*9$-4ofr%WW!hI4q2vDTNFujWs;Axj^uXq5(cNO5`*mN`BHh2TfHQydY5%ST(W|`0=uwS&snloUAn)4JoR#wi)1zNtZ zBc9O%9HRc{DTJ-vp^_AXU5?9QZ#hRj(M& z=_%I6L`ymlr-xtjrM;jHKsH5j8=nShx&o$|5s58_dWNM0F46O>vBa+JDB%)l_n2$B zmz@Z7iKP?8oOHPn4nkV@4vogN&{!)Pv$UrD^a2o2Ef*0y?%36ZYMne!pQfko+;B+L z7)k^-2Twds^MHT{kwYL=zoZ!Bh!AoOt?yT8kfM!!kC5`Nteg-yW8xG5R&!L0m|C_b zn`xhvEGpowjw8@?0Fx*%Y~>GJ!T7H6RJcQggTz48Ys3@^YR#sUuLN2Ld|Qf z@&HL(XhXY@BG7rj6{HN;2Li4dCjmv-j*fnEr98<@<83w4Q1gU~GMHMf0GJ{iPHl7k zj8QMSCFeC^C(&u)$QR{0xK$KE7&xhNdax^*)j& z>HA0$V3q|6ZYecG&@h>aF^yXEN!jC++<>VC@*5C}X9PFEK9aJ1f|~{MJNl%yI?W(@ z=#X>-nK+=lR!#D$wvoG=N$)+|+0=9Z3VLBA@3KPQ5T$>>}8z3=;1#6e1|^p87(K zj!?}pW@4H_bzVO~ta9njd8gOf`t9y^%lY&zBl8e7E&#W0*vvOfEjLB@CEws^ zSu#dRupOJK@!&7?|)cvgSpVO|W|>jU(T5VGZ1Vps)G z_0VjUP{v1(r17Q6iz+&g(o{kIK?fg!Rq5<%e2DCbJ@gc_MF{AymGUw-8o~&wzyzxf z6%>)OFp%h+hpjhc6PTjbr38e7^x5b*#EJWt_8b@)#1@gqC0RQkAvv+CmPO2_YOxD+ zBS1T5IB5o8B@x;df+|&47PQsGA9EzA^Imu3QUNz*D+$4}%Ib~8P{Fezv?rqOc!7kb zAR5G`Qs)#fWzlpB;+@7tRYd$`k@zu#0qPigB%Pv3C6ev`5uvh zwp(0Zwva3=5D&ct4zllMutFSmGA3OgV`V_@fO=4X$sg zV^D_>j>+c|Sfyf|8KbI{&o^q1<=K_%@>*Jx`rw@zw}67x%pI!?qdCCdG{>&2iAt26 zhX34Dung@Ek79RG4fRU8HbKeSsQOeX`VJeLTKljh&Bx(OJwcX5B%dFrU%=`h(u`wN zlV-}nDzc?fD&^JQPJ!?z?Zb75Q6;aPE9Akf$S=ELQiR}dh=I`(icSxbbe}@Uw4_l9 zQ4K!$X-`w!uZ5_oRcZ;GQ=?=Ed@z~PjwtAB3%bNJctojU^0JZ#8p^N)JSJK}LC!46 zxmD1vjhxj;k8IF=SndZ#A=h+L1^j{69?@>#1N$o>#pszvcseDrm!s8u6GmzzHX*RV zr1pjUjDxo{6osRUMFO#TvWWuyK2u$f7r?wXo!;LyI6{5X%K($UgsYrmsyL(Yjc7wB-Apf@RUrpXu9g2#|@QgkGF!buMZKu2dVC zmH<{^mC^P zQ7$7*8b6^-XV`)NG@Yuvz)eo)B z@wT{zh^I#}BZg<(3OWo<0#qF!U6^*cWK`!T`HpUl0m4Z2`mmT$TUz^QM={ma%Hv8& z0>0OipcxqU#kyD9dMYL?D&@!@vZz16w-IcxIN~5s3497tN>)Y;tf;D0s%n-2iw8%i zs!9YEVb%dn{o?47{HYI49efiv2I8|0_$P=%8AjpI!O^^K zIfrjOW3&G3yta|D%@4|xE1Ps^Kt{!ivn)Fb7qA$2w+rP35PggG){z}RVAw+29N=V zHj@1%lc<^vvd#U{D;ve=*nkcbq=#K|S>hwuVV_%MA5(3mWMb;V3A;z}7@a5nq#Yxu z+$uoC^Ng-UkK}Z9`c!l17dkxHE7{xm3Qt6-+S7}OF!3fna5-VQl_k8jNH&I-iVy{y zY8qNWk2e|%X8<^~PoQkCwNk*L@S_+2&*c1l3t;3 zGr(ncv;n!D=>XTn9)b}>obuwheAo>tsPiK`PBzSIef{bW=t%sKK#(PA3Mt zmxfAPj(p^lrWrS9JSC|dTVMTCC%QCb6;-=%Fk%i!EHX8h&>pRlM{7VJv_>jG{R_tM z@%>EEE=NlTb$SC>7%(D)0MN@T)YXEkgl+dT8bF-NVVWQ0EUZU&H3Ef08z<^HLDh0g zRzEN)u?P@XsSzqj;*#K;o_>;$(8U%fZj8Zk-1*Mu5n|s|scHALN9Xb)GDNo7+m7+a?8Z|Ii#&rkv zbK?LN=t56uNt|$upjKY$x{+-H(hjr>(y2bI8DSF$^pa9T;xUg5F5Vjc1j=A#OCCyC^r+{}y(GRjWK~fjD=U))bE}SOQ!9)x zmF$$PXRaa2N4+Zb`88I>coqT1R#9>TRvBwcXtlZH{-qu~t=VblEe}B}H7Wo@C3HJf zh?Kf%kWAK2f$n6Xhr~D#9pOr}^Q1sh9EM7bAZXq#G6+ydDJcr=3uZ3AF6Id8hK3>` zunFP`#6`7XONP^hgsfu}MyD$SL;WDlAOnn*Gv2a<3F)lhIXc^x$&%O>ra>6Z=CKkp zliNLCZ+=!fSQ4m1iD`Soz@DjD50xrFB^8R_Q-Rc5z6?_5VS(0CbHoXNjR!-qD*cLV zy?`p;SyUrQHNpe-Z@MJ%vnhXoZRQMBggwBcLr8sPP^$ZD_Joa&@x}-9MiHdJdPY9! zLM^HC1FuB!fViiCT!HjOE3ndA3Ci03MbScCsEHp4M5PF#R1^86HBw=?4jC1X?iT=( z9J5@O{E7B0l|RCbE1x0@4712V1Hd!{;Eq8Qcx)Od0i?{;WO-l;co!e^dP$Sw1c7a>-V0*C~ zV~*L+3=tXlSl{{q}}u1K22X zlRH2}(iJw!Q!;7RJun1im&5M?PmmKD1z`zVCEi#+gk+i6$_ zq`D%^QOwoAS%Zgj+u9EhaZ;%GMCfR~o8r3Bda(`?oZ`$DBQaBr26zA>J{enM|Epfj zes+Y3mzo!&RDkfhgiwCa5_=cAgHM_YMl=yp_+0cTCV#kTr@2}{iUNi^xV}{~6_W-+5<}L1z(1$4iKzux zQeHzR?XkMN_&)(4r!UPeE=ACXq)AF%Z^1Bvu%o|V6JUDh9vS5c)F;pg=A6Pdh#r#6 za~Lp{r>_A@$zDhp(YF~@`5i1r87nJ+BZt2g&a9c^MT`>XnpEe6dQB3To(F~Tj*Ud% zRp3CNk>f~hHV#oy7D=%Lj!~lS8WZ9>(^)Eo8I5wt`6_QUWPYYsBs_3;pb-Tm<%`17 zKVv{>gK#>1R`CtvM;*A!+OSnY$S~}Fa;NBNkf$Qn_EZsj;_f370OM{iM##FrMu+6b zgwm_p08_T}(w_99beditTJg=q1>&+G z+C=IpeXZi2aEiJ2WPox99mov4_*?`j7cs$DkFllK6s9<4c(vw2JEcc{r5A^kz3L~7 zqo9JQ1ZXLN;bv$;yUvC{^Qu76!eD9|SK%vl9y^4Ck<7@>(byoJ%z##~UNsTaMHEU# zk4rLFi^hgXbcsw6o~>6=4dsdePG~BIY>K_(H-Pb-bS??e~}#{EI~yo85J2SF0~nYP#DaBBRGkc{>{2UD*Q-QH8={3$yAHU zgBRSNpWrpf1c@uDaR4O;8o1dcCRkI>mGg5*`n7b~n(+{Xf=c5xJ@62s?{vYQ63B*9 z5y)g*?|T$d>s*h{BGzU3kUTWK3q77k{mOhFj=d^lE`c)0=YT$^^GaMEiF7Vqpj_Mn z{TKB`gHy-IZ&6QnJTcTC!rd~1kyM~DlSy88vjtp|qvlMdL>N=5o=2SON3)Y*HF4a- zQBFv8{23T3GYETZ+rm(5laSI+l9(?m=zaN zp~9>{ad-CGR_wOzi)P8P>RG5*U5xvp>XbAj0XRT;gn&z8WvU0as5KT1R%g!>=@pU0 z#_*oU%pzR(8s(dd#WBJ)BGwTQl52Xq7}QIfSb4w_if$GlC6_3K(Wj#@<>ns05|IFP zu3Q04*+SeWO5ooFc|AKMDjQgYqiIJ3+6`JCzz+;MnGq+zDVy&oLBPkWiZxs2UKjD* zlDMV{=+p`sfgs5%BaZW%CQoCY)FN(sigiriNDkj;5g27{GBSd58ch`zK=Fy)y(cA>D^k&))y<)o*Ga~uI8Koss#npSQi|J^ds*Ga ziyy;^-Z$qIR`VfFHSL}Nj09^kq$ut3o8aMyQ#$<-8W4 zNC6j}sv^t-#M>ko6Zm9IWQ6hu7zJ4+aYrg+wy;Hamhh_cgor#CJVHW;NMfrsH5H>J z2zcNkzl4HCBH7^-viZ`Ms}Bu>2n z0@lK7)CCT0WeK$%2TBAatg@9Q>38cDGf;Q;PAwVPHG*t3Rs>0&A9#5Q@oy+ar;Xz;EC@hp12NywALYo33 zp^S_`Rab;L`)Cv(ja!r2*F=Gi7+z6R8-0=h1Jt`(k4!>AmB3h-8LXR;B~B7(0i<}W z;)wy7&FxSh*v&vt?tx;mgokbyqZF9R$Of&_*?McO*n%Z29#iEY*~N7;aHkV-XKF}c zV!-s1j%7AWqeO}p66!UiWvR3~L{!qTB|uQ7bb(65B?lyk>|pcz%Y0ZsJc`092LXD3 z42$8d3$fN8oDIH<6~z0u*%$LVQDy3dgMaB0qO{dezej~A?o$JrD<{wNUV#}`nAsED zU2~ul2^6R;dOL+Xb(Dlt zzAJGA#iivTKacP!o+?ze0yX6${R!MLuu}1zEg~dpO_IIra8;7+O3Ft0_8I-9uLB*@}(AQBdmZO(@xf@J87o?Cy`IMe4T75;hQO>w}HB{;#F4LV*q;?l7 z>G}dPK+LSh5Q15?w=E9N32|nBi{-?7K&UwwvM@KF15-C>Z)6j@Xm-_aDtLg~Pq3HS zS|Ukg0%~wZBgUW-1qYJPQb(#6T6!8aWRxO8Ar5EEaGr+!7_4%c@*t z^%2xjQEV!>T2-qTYm-wJfPt_OzN&)`8#j>NvBFyI>~(@TGb%PcXLML2~FF@Ua!0Y{!nho;{*B zozQ@^3_}RDwu|rM)4{4$QZsR25s?r=H+T%@R69yRsve>M|CL!{d>oC_4=^`Y#oY`5Rs41PvTG+(Q?kPf}!!)%pEH={g69d&^C1M7jh zvJ@gj7naz{FswhNB0sS+4i zkW(U(H=roLiUsi8;pR)~f8O85M8}i*|M(eU8{L4JBJKHoQM(Ruq)dX6_>mOLtkmFT zS0IUqySUG01@Y#kCgqh>XSZb(KlNfcr?fR%1b8wnFDR0{ET)jBcju}U@M;PmeTbNr zPrb;s64GHy@^L(W@!l{7H!gk*rK?W!{%y`nTTD%rsk!MNDk?%6(B0r0!Oq$vFT=oL z_52KAFv$(Z$4J0P!+@}7P?yzh7`tB0;=h!9r10i1a5RAO(enr}Vh=$S-P&2ZX^Sx-VWTTe!_dKDzmYzhROEY5);1BoFZfV{v?hKf&+ar#x!)$4+$ zWYiF=pZT9(KH&ex6x6?Mi0OBKb%v?G`I|?WLaqOQN0@q0pN}5>J0_UE+1zfQ-hKW- z|EL+JE$08?5vFp}rxB*|_e#t7Z%3G(9nZbqJUu*Yc8|B)o5yvtyIns0``fK~u$#?? z%?(N)5{h)eHA=eZ230DAh6WOJwZJjH|1!d~{!}X4-!Z~8LM)C3xI{<;mrxm;pjIF? zYg|@JsJM9`*d~=$NC=2H*#=`6k_DrrciIj}$A^dFtA`tk!RNvs7#+??{Wn!*Tw_Q^ zIT-uILJJPznGsRmV09ej2*2_rG^dCg_5k_%Jf7-{Mj*=?qoR#sMxN z<;rW?<=#HaRLj!F<3$7^D!8Y}ZCFQFgy{^bE5)|b)Zm{+z~Mx47bPM1A0CLh zv|uIpms+k!;8z>zC&)H6CX9v{Af^zM7#$Q@lo^dYV$VCpBJfMYmzma^BVa;7q8& z=t-O_buW0XWVB4v8EkUAdm=i;1L!()>=5d@W8HSHTHtgbeyctkK4=;cF`rh7Lf4TUuCNu zgAmeAz@_851r67yf+0k6b7>_*j{*Djj1kBTDscQ*ePDUyqV+<5HxEpyV8byIV+b>A zQ;$J^gr9QNp0bg5;_p_!+imSMvBbda z-s_f?6$j!rs3^I5@PGUz4mBTDN8Df>?1KszyMUiicQxb9UJ_Qk5EPNCghvL_bo^Y? z*SzzTR!OtMg9@?y#^OH$*ejbj)o8Q!R8sw=vqTlMO|WFz2WkW3p+FpyBJ8$Ptz=fe zK;G0ri3PKvj>|Wyy7R3HuI>lTkVO@*MrPD=;ISBY;_3GWdmFLN&%|{PUOXYwk`XDH zNII@;w4ewif|60)wf;-lv1)vo62SzU0h>IfOfi%xlj7Ivb%1rHVuJLAR+Oo@VQk)T@4?j{JT*~vE6Pp z_}_E1IxmS-j2|(nj;b!7CfC%XVL+JFh8Juz>f=`Fph)Ap(h2xXPn zCJK7&Jxm#LL1zjeI3sU%t!0c%>is76qo*QPd+(SVkP&lP?%%9IiWBZP8S<= z#(b}VRmVdCR+E>rcdeskY(0>&rY^h}?#I(Cd$=;@Bzysj72*^xEFiJCghfb?0D|pI zrR0kR5YU_`B{y@Wfv2t-vrFs`JD1ldQh{_M@-hVJe8+oc;c-mjB%zP2P~siy3ajse z>q5=g7C9Xyeg^|TreW1j)S~ZsJ7=2hlWa99fx9Hm6iFWuU9?e=l zs1rRdiKcE)<9MhwY>Ee-7k8_VCg1Zl>3+1Xcv)IH5=6&(?H;r-m)UD~El>S82GZ10 z=+R)Ch0oJ`1DhB(b0cqZIE<%biM<;hePc!9Idnrd~!-ZocfLF`LgvZPatPvnzL zCl>u;qbV`A^eEI=tzIRYxg>XlUWdTn1v=Y$BbeDt$?a(BBywsD{}Np1%SiY2#?^>P zkZ!K1qdGOy+dO5osh(W} zAblFW#@V*Tg&|r1i40yC4+vi$bG#Mz3}Arf@jz`&y#i$YzQA4gY+Vh@e4}LT3`@GuwKMHcog!!gG$Nbh1`RT%pDvj6 zCQOK?h-#R+4X^P9aCK*HliW#8^NXEbc zb1(=Ov?W5p#iHWDJ0pkl|V zkea*nB05zrQkHH!3i-l70{hd8%_P_C%)t%eALLf^sYj??vLUG!C}=WqV!U4kIs#2D z!Xxpd+3*b%2Hyk}TTb?cXzVNn8_=Pe6gBxCDE5fd+;F|1L#zZ5=-L_DPq2{Av-$TN@1*e#?iLobb!tE6scN z1cy~cB%*6AbCR(jFP3S$EP*IPSk2VcmO>Ty63~@P_J5n$DLbRbrWo~Y!DRc$_ zIQsND4^Wi#h)pS=FxzGsCY)rvJ?p5z1wIqpZ4UVh`jE47r42MSE*R@7F*P=qZb5m2qG-M}M(@9cMx zg4;xOWP9NWDrGZT_yj&PVyPvz0}c1^*?iVkQKoi}c3yfYcRk@VwKR|n>2j6Y5EI=(JB%HZt)o-0OGPR}khtQ#FOcRE@t4q~!wkK3Zdf}Z~>BSLN zhG)@jE;V_D6`o=Rb-)pcff|VPh$`*0GD{?eBB@#J9??^*VO_}LM=B-yl{@X>CQ?+j zP?{C72o{e(Hq+8VyFF1ei5k7C95`_?Bv7mEzQkQRmA$~%1+yul9BhGtV=GUxn#wi8 zn2K)*I8VVRDcvZ$P6P*FTWx_V)bacK~Mx*)%oFijZ* zuN!^g2g!cUF`&o}indb4+mB>t&kw}3aRg_b;_7wlRV$K?H*4x$#o^sbC^#H@Ql~XF zUR+c$+jepmn;wXVfih`Mg_E`l1q-B%Pu+>|ELN-8tCc-t`zQZKJwWcCkeMyte_7L| zP8R>ez%JA|m`n?Hpu!|eag~iylr?!i*{SQzxD-u<11#hEh|TP9F4{TtO?7AiU;u{- zyWnRd0sj06u99`g*=CKlEd@EOW!w@9q=qCY+FcIn$?)hOd)c@}#aGEUP%56zKLUFq zx5I7-qVmCmS(rg&a*#`9(py_#8zGO$f}hA%vcAF$TPU}gt=sfq_8)aswXy?i@B=rL z7^9Bvj3UueXe*nEh)65dmj)=T3*&?6DID+spr&~5e7Y!?0Y|r<^F-K=t>W_1iI){s znbv3@oRx|aX48TIedZo*E@7^rMg=$v>IN;pHGXyIatXtNDqrkHo?5moUMT2-i=3sc z2~F(_lmN9aXTUOiN*nLoC4(w^bG+7~x3MBp%n+7Hq z(K)eva%1QOabT!XMw~ctK{yRpwA31g%wRTj=Z6J4kPI zGOb2Alv9zXI%n%tN@vPG=@=!DE5!b=J(UrXbD2!R!zAp<=FEeV8cinHfhY=epi!tZ z)|pwxW5ZY?I0Hmx4-nQISB-kGg}vKUOo30~MFESP1&3vMizia@+Y4i&swc~CFG*Nj zHaT$6X3-yPi6}o>udw{?oZ-xi8&!}DW;0b`kze3I15mKt=r3E;@A^b51iuAhnpBuq z8($ue;aNIknQdIKD zLzP86&ykxS!UIwq2FTVp?JTNwCljUIfW0F08wi9>a8)h@R44cd>tvlOK#`4Y3LyyE z*)-GXswA;oHW=xWZ08B;!0fFIz65Fm+Uo#vI4yz^5%?SE%0t3=p}@I_sX}>N0e;V< zdFf)A62Pn|@C4LUL!B=c6k#DQskLG`z<%4@rjVo?>mgleb8hSEQgHoQ*J`}w?xF

+hTOF-l=KCxd`rbATgbEJtJT%n<$o;(rr|LtR)_y z)T0xJ;gWP+24ZbK7v?_ z)z>9Xyw$d0OVv-rv`dYy?VN7o;Q0bO3~i?MNAHQ57OE)n1Cy=7mc?D60+cZa0=|-) zirjIo^Tv`nh;2B#QO=aW*`%3?u@B^vz@twC(v8?5`ilip7Va37wyEG<;ZUwX21F!~ zqagxwT%d#rcodwb4!aLK8nZ;8t}%7SJGgDv*oIWA`4)Mg5i=y5h^VHuAmfE|E=)b8 zQ48X}XNYO>!=Y>NC4e3UV96YO5`cjg+Gh|w=u?7D{iD5|kOBZBkhx8~uoqQO0u~~U zA_~Z`2}H2R$Cx?cuk|D{X(Lxb9&O8fnTi-sIcQ%#B;Oj5&45&oL(b<7$oOss&n3GHt zt!8}~NCFS|Y7@13GVBzZ5~F#Q*yL52t&YH)+j@vVEGBAdvs|m@a12ZcpW z#oAyYFt79J>Dmll-U)tpbO3PQQ`MW$q=KXii)vC#r8^W1b%+*Gur@DyI7E-WN6r`Y zp?T(tdX5ED$1T<(X>xg@E1*f^wrl*B0Xt8J-N;MK4 z50e5NeL+1I^vm_uk9br+1~&o@So|cF)rX+JLy~~L?fr&OU~#Y@60Ilc2Wl(_Tk4Qy zL&qY*rYJE)3PMtGfYoFVKtVKAj#$DuQTI=nuf_p~&B4JN1GUI21tARugi>}rM+>`V zUk{nf7Ai}3GE<*HtcvcMOqBwf5%HZlgB)J?O@u|Nc8G!PUI*+Mq*_yCkeBdJV-I?z z6+QunAj+z49cSE`-NhSHqbJmYcwi?&UC9MIElh>PV&16Zj5A@D%kG0CJY#Kb3^4EkBBeO9dt4 zrLhZ5K}X%BUjjIF2D>S#E^JFHQE@Z~yl<#gZT7OLCMJR%!k7VJ@~13r**I?6({OL; z)~<5;L2C95QO>oA!<<+O7th6xQWJBzxdm5cFQ6i!+W@csbHR;Crfz%ay>uGMfrkNw zNiuXg6#;w+*fVu0r2!iCo*5R*k%^`vqyV8r_v;Zvw`$AH8UldvvYzu2!pC6NV)|$ucu~xXnA` zlx;aV9&l0iM2A-DwS5@vV+ z=LJKMFRK?#7a!`*vReRmBC<+lK)MP(5+Z>DAXBwnE0bIh2BLp+_ zeW`YP^|FCLwQ3241cB)ka&hpWvQyLp@vVj&fqrmeY#EO%aRSCbtJru~i~Od9f#m!I za@J1NF9^Tk1j|lY6~!UD79w^3I)yUeYAPZ*LSxT$070+t8{I;z7O?B`N3*30!gqpK zvj=@vaYN;4p&P+3+SzPCgZ>!giY_8YLQYT|v;W{q$iDUx8B$hO5lB+vDG+3bD^Z!> zgv*G*$T&5*cWPvQ1H=qJ#KM#GX3n2D=gibQ+~`@_Cy>{hcEp^f1!URK&}Uh()v36^ zGBb!r0nasKmle)AC5nKtx+u8??KyUUbOlRBprvqtTR@rj4VEck1QnYY(kl;wjCKh5 z!L{-Cd6x1MFlo)z|4y7;tMrAcNop7egqTO{NsUg0kexm%L4u$l#N&!;Y-_wn>UOdX z>8yeSl&AjD)4)oy6qz3c_9{Bn@s44$OJTv=L8B;P3DAxm{gU{ zYKy1yN_Ti2dx89=!Y63fcFD!UY$>GGkjbeupH<)E-5f!eW_*C`O`Aj}5HE8Tw4H23IEdMc@- zo}GaV@D?(W6CzT<$g%bpQw!=vpy;LR73z_&LSdXS0Zmn_jIxz|c5e<6!EC2U;~e+m zE9Ova@u!E{lsm6>QG%tg>QgbSLWkq4LztUBnj7Ut=d#N5mH=HEurlef~=@+eYISOdVWSV^Wl5zBAM16144FyLn9f$cB3M#T%s zfFT{(sr0+5AdZ6UU%YjWjI^ux^$BP@55Jdg^6GMX=&DpNGyplj5^75Hfq9h?!Wud_ zOH^(OJ_Or_j|Nx)n^d1j0Xp6=@ zbeek5i~w&utiM@vKf@CDLT|H}KHf$Hc4*`{@8u*|l0>8Wo1f>fi~M=x#rktPlY7rx z$O_W%G4&I$gBhj6SX@uWdCv*#dj$?Wx9BVsS#(YtwlZLx2+MpU8|1>x`7h|EstWZ& zmrhmTC7sRXsTU=ETa)d9&KUs#63Y1o!T4px%CI5@SCC@dWnwSt4dSi^BA6L=w!z@UJFt)WxGqxh3S3|TYo3;@ku zsJ|9OmH?$LI-G~o=>J|K;+>29*(x?5NwvgA=5fHOmx^2LPSY?Y7e`l1Zy1Hn!a~*oqqh^kBTyHqJME4arvXu3)2X1tj!nv8tuvn@z@{q&PJ&r9QWmo-WhbwZf&kb%8=6`VX* zZ8x}(+C1!tCWkpCHiHz$o{tsB69O_&$(b%`N3e0VtX)zW#GSPbDnZncoqCHFi(lJO z&jQUumIQr-RV)WgVF-#s){QoTM=8iL>!89!HkU=mvZ)U77I^wGmMXU0a=z9lbFFTRr)w%6;sH)qxD25r+GOQ59&ikXH7w29cne*mf8TSAt78qet zw8eN^8Sui^kRs(qk`RGG4ww( zm_!X}$dW3}SZu5llaSgzg~RbA6-tEEAq8a6-4c;%R4wTJM*B5Yhf+;fsy?^fnN6J_ zWU3ciV~!2Qir}=BNEjfOii7h)^3>by>jDvsDKO9v}}3OaADUNXq)!eO1<)WYr7V)gpIN6%j%jhzb4N0g z8>o)QW508K?Ys7ihraCzMj{b{6a0)$WEwwb?6{M>xNF->Ym(U;{3hu3# zp-aZ~sZy!}Pys3wNmeMx{vc*5;|6eO|DjW$=S*vHB6mO()1o8yGazZ>-m$w z^|mX|h3&xK+D#Q!N=AA%jbI`CpT2$O)F+ zD^O(f0(&}JZ@ZAgYzes~CJ98AY^y`+ZV~tJPZE{GUvLI}xIoYvZc6EqH%DDpK$D!% zPHGZ$ImnuiO(n^^RiB6=CcabDj{HPSW0pid{csK6tx9th!Y5rSF&l3(7BZk8DA%FU zBxA)Ps6id0dvFVj=)H9wuMIU|bi9o~d?JD?+MVGXx=K%li@1*AaxnArdq^`kiIGKZ z4WvQZSbRnx)(rq33#wwu+{ZgWtrWh5dzC06Q9+P1*5~sJ%Z(Hzg?|%0Trr5QR$*+5 zlTatQI7Folj7-W7ir%rlO-QSxQ%Xzk<^_q#makc1{v*j&lgR?&v~`QZ^V}q#kv_SD+#X|2B0jcRY*YxtHJ~6iAF|St#mZ&7 z3NIgkXUd>B6e=O< z67;dTR3zM!VntKwS+i8HR9M#Rv`8fjoG7aa4#+}2d>^%lbzBQDJz%7QtKN_lge+X9 z02;f}u;Tn7@)_*T?$WCbQRnuY^o~%eTR<|899MjKYzZJ~X{MIoz<}3kPxuhAhU{;2 z7@Mp;MV?IQ68!BoY%o$aPeROq=Wbh3v0ae=(#M2Gk{~4k6h=ah)7%trw~)vh*#^7R zS5YNF+skbp$1T;UZ*hXD5}C9>r{*LHPe6}gZh)ws3|43m3Gb<#!@>u~B~hjgM1QpU zw6e2nc@C;Sr%*pdg$*Xg+{eb}0MQaLvp?gFoNehn7fYQ@2N(izlzq~aewoar`89dp zxE;6y$-=}r?^nVjVQAn_1sdTsFF<`{bx#v(9S&I?u~4%SW>-^~j;S41!Jb)pfA)|te z{HR)M3s(s59VOzYMY_s|675?ZDK}XRop_a~^~@wQXQZp^3$_G9XdO(O1uUvnE;y5D z!5T?7JA)d}HdoWbg{-@DZP8JoVkS1(Ufl-TvSXt96I)n{!3Y)0xb!J_NCgp$oa}ik z-Qgw28b{$2Re5wiYfVs@ctVgRQNuy;mNyZCjl*FlS190dC(0?OOQsRvxJkt!1_{ST zoQ3~_qv;0G?>H#hJ0z=M*6OGPYND4jC%$=2fPH}NWa{vIYgL6mSb(HhSE!WX=uyX^ zg+bl=E}}DQQ3b99Hjz-t7AEiQr^XOU=z?E_QgA?1O5GW)9hqpPhD@0@o(J4+%Q&{@ zZ80}&4uYPt2A>$hnam71yELbAbkYs$FI;{5>)trbLh|IU*PB@06Tp>X+c@pR1^wCQ| zvByfx0H~()fD1T04W)}p%jDu3C8tB8x6_V)0_DXYcJswhkO-_|Y z+BNY_#HzDIz@%Y#qR<`mY*ZcKo~cv@37e3maB?*&`3}d^4hEt8n>wUnkWKvVP@?~! za$O7nhTp(Y(D>wIg&S@`uU4JSur=>8+PkdX3o;qR`C=+tQ3=}gZLdQRN16?G`3zh; zW{@|}ZpVFwXnYGH84aM&7V`B?NQhFJI?P#NAzn;|0L>&Tp^j)yVa@O>RmjDncU>t+ zagsEfVGSfMX5JLcy157bF9ZH zl7gx@3DesBwv}KJ*XRtg`lNhH?}P zCyLp%7$0H`BbK_l8Iv6C2w1>SBBml5BLQ===2ok~_|&|4r5eh|vBKQhbatEU^<)w8MFS@nfyvT?wx zOfqO@+n;pmg@rAchHEr~xRr%YiJRofGv$;C{&7-T#%xPJ;AUK|{FF^pzUEUc`5_oo z@ahnI%gF|NV0LjuE-1jNotQ+%Y#wAQC^%x^E0mU3xM?2}fIK3A=B%%{RcF~>`D-*9 zWZ6d1lLaJmrH8V~?-?abX%vv4*6u9qk6AIzK(P1rv+yzXZDTWcki|g#z;8fMvNnA2oCQ7xTY*^`i2LG zzoiLDo-6@MLCKzp!-G&oh>4t%)nd*zd?9KgAjL`0N>H~lv2jQjJCj-i%QFnQJrT+B zX3$1nftz`zJm|WGRVm(ekz5wu&6H^FqA>5=fFqE3N|fCpwc*j=i_D`KW|0r5>YX%x zRao;N#I2e(Si}ehf)>LBVvcU-Dx`PCOK(ATi=Lx!R8fO2cEKWnsuOM*#~Z_f*x=Q^ z&OG>-ybXR}aj15YLck)LqtdVzn*}>BDC-rlkdgYwiCVE^WxETQav%P zRGMLPU#ai?KMVk|OZ12AwB#}A5dDAY4F2;aR~3^@0yf?XR}b=cQf{xUqHgK>!^3hDY&(0*feDhn+1* z2yp>488%|CiE}O-nDiZhmVJnAtNmPe04+#4$zKkH%vRb+1aI`f%r zttO(J@&jZ#M$Tf_!<($Qfpl+qi>Xzw0vI+wvAK~*sx`pFb=P`(&o4?K~U+Ygh|&(Q*#DW`A*G0NXAd62Jnpg!dFs0YQs>9APv-r9=C~8 zy{OCVEZ*G)W=mmIM7tLy>X9pf6xT{;mQX;*_R}xdJ6DK{W>IsGBX4XqUnDx&myLrW zP+;~JKFo?k<+<_{W@ zS6acOqY#iB5d)UNVG)I3QPdN9$twVyepewcq{+L^Xy=;5kT$*bfgn-;pn}!pQd}Ks z(_^<|eHP2A>P)T&DtrJ)E1*Vm3$AsZU;;#btAaRHtf3pZA3g6HO9&(KwM*+=ntbYZ z#^SNCE&-{?kq`*$PG$%dYkiRXC0Ke^2zi1nS-OOeYKWroc@n^@w?a!mB7)XNlr((+ zw^=W;FvDYH2LcpG7=*F}29hEXGAW?^At;;7VG^DdrOrRSNf`HS$OaZT+N$W-J2I5^ zxG$LtQ)>nf)_{G=1b7I{B-#{I1q4*b&X#ASV_`hLC)QkJqPyA`P~r;^L~u1`DFG}F zAvVrfn|$0B9Vu+@`5n5SQ2}am)t8f4>6Ms*pmGZptTHmpgwGCYkjg}Ic-&HgB(h$@ zQh5$jY{E=&QS>2i&`O*n+W`ULHPJT*9;yF;!({B$I5h7hSKLby-|YfWdU(}Q($+d z*qYTSc9Ss_H86?uGl?TT9s%2XNEZg&0* zSx1isC-TwaBS{X(O$2D(e}5l$tZqqWR?ubFj{s(>A+#yg898q5%PYNPaZpyzL`Fc%14IXQ-hrz@LaKXYoz>igJ78 za)c35loLickQ1SDkpU~2Qpm#9RFrc!X3 znO zX;O}sv|ekC5@0%0``YUbs}p72Q61c39QjMpM}U*P!3hBd@64Z=?i7>;fE1q~sXYuk zIUBSiag&&g3Jn10xe<08u6khvUdRRMX$C}1!aOWW?_O@q_5?%)0Q_yHReJ#Z(>HU-6lZ^5XfnOU(!%?STXyNfn5<)x(C>26ELd zBd0s_j$o-zbqGIV8NjfHZT99WuJO7q_*ihkIC4msU%nPvlBV#aT2fJh8$c}3&+=Jl zgSwjC1&wRhG|5xIW%N<1p_!x^^IvS^3|p15neOT!gYi^yAh;V>ia84XUrivS2it%x zrJz{_#vLY3s`UYULI)PdhRUDo)aY_iFlZDp&4|t>5Ah#}EsRFoIxvI9pvTEHVj?C0 zSt}gCQv^oGLCixBOMoa{6o?Q2C9s`4+Av9i3wjJ#!aCauXh`g=@B*MHeOOD}EZ0>X zbT&<>T52+MPScG24T|wa3x_tQX{=C?6Y4{GTkK?Jed2M8)QVQyn;!CW+Tg4ViT4i z>{@&M7c5?xh$i6<6B^pcf-0LSg-%T$lQc=2&7f2#g@AmfRw(mj?b;2*m6!CSU`!YX zGDA*S1^C^mH2SanC5+$|i+0eWTn;kmmPsH{wAgzH`b@YGgc6_dEqEa39bo7@owpHh z>PnB^Y6q5>M^ww482N~jzJ&&Iwa}2i(Fykk6Z}uQ3)&Z*ri>Do$d@r?YOisf3z8B| zZ?v^EPC7?{P!;_T!Je`YFc&cYc~*R2Q3dsF!K4^rTU)x4N7xx`Our7emrdk86{Tk= zu{dVH4&d($h%xp|{%rv*uPY{qvA6jFQY_FSP`iIpZeD_3nq;~$+*E_1Oi?N5|McVg ziQqZxOClI4J{Cz71oC8T>b%8qb^B3k5!^5O}p zSllP5q!Bj00e-8Qo(=>2)hXqP`*jG%CDw2;IeHmL4t_?trh3jAp z(Y=Dr-`X)Ayc($YqG*M(<$^Q;LorcAq6{*eh_vX}mcCd9wE%nY0T((M?whaT) zTCv}-v6Z!v#&BIkn;%zIL>{Ry~) ztwn2?De1*_rdA3*LNT0JhHShmK%fxB@p0XNVdH`Jc%iOvBJUmmfCmNLv|*|}A}vto zEZ1-+(zoGB6-u_JR6=y)BOyBhgIvKNdagupm~0O|A`KOGaJRNJx!yuTK1m{mF> zqj0dAk|>XoWXByT@{4j68#3SEqh`!1bh;p`o` zn4T`fctfZlO`U`T4d#`r*s$$Hp-~d0k9dI6M*VaCc=YeO%YZ|f)4g(=F>+FZ;b>#7 z95XvzzSEhEQUn=LK@EJXgG5^r@l|@DjnG{sIzSn8?@hkqYOtktBn+L-PqQm90sI0o%2fXsM;@c; z6|R0#31&2fnW{Q!GZk?r!acU27QJe9tN_fTG9mQAp}A2}=IBrJ(p*-9?m_mtk_2(4 z87so6(KKHq1m%wFGX}=G;;S|C$V_4{S+4HFUe(0@3XO9{0AZLITS@iGhLqwC<0n+E__up}E!EQKnH`H7Gh5`KJ{*--)?ybwWY1cq<`<0Qfn%T#Q5!l062 zB0ykaU1<~R$*pSC4v6efh?1%Y1-!JIRa+@8X%^{J;9`s<$@s2ihvphmj^^@#y0fY% zX;Y&MQsk6fwu>0$!HmFTOLR;vU>U@hB_lxhV0LE44WJwQ<^ zVvMk)7Sum1t-Bczi7VOTf^k%c_PkuYh!&V6^$7H0<#QV}R!kJmn89qDgqIZP*YLfp zEX`Q4#i1Tt53DQ`fmFCcivkk)oD5wN1aw?I^8g|sqIRYh+Xgfrp*neOUmH>XqYX?{ z5k{-qi{mzuq#jmb%P=Y&%XXxd0Oy##2DBd^-j)-?>64w#a$l)B#6(NNu3MUBok3r-$gr zv5R?iiUQ-(eq}Z$3NhefOQq_QcoGp5em02%j4zxt6n7}6LbR;aPtIh?S?xLLc$mjW0#ji$zmFTFUmVO>5bi#z1mGWba;8Yy zkf`3IR|19NmJh`Skv)`aVlBu)X_4lvGlmSW=e(&xJVDvRGqa49GW9!3t}I#3ZfvB8 zi;Hu0pkBj9oERxMg-=t^)7?D8#j+GkPzk^P#T=r_oW9 z)txjbOF0N-drq#S%rChyG_h=|eVNhGR_wHx6OWqn!cOK>S85)h7M5w0ArC!x$_K8Z@nzEZ?ui-wTm@9dL+Jc%Yz&c^@env`E#c$-Q$tDQRtf!zT(ac_6io?%H(9}8Mk-D- zqY^|S5oJ;xhtL|+jg5_EOIL>KH2LKng%!Akg;7vg`6BQ-@Tf0mz0N8!yI3XssOMD% zF$#93!|UmSJjj*W4{%5*D~TJ$X)lYSN+Sct-L6M%v&I}k&4Ez~PHo$95;O`zGaE=# zjjdEFLCBk2XNd`C&~n_LUEH(?$IjPSQ9lZj%Yjs0)@z`#%*5@b)NbafC`3ZX;K{+x zyL2Br0Dn0aQp$9;0^2eV1FPr`i)x$~19eq%9`FoT|2ub{qHfr_*wNlFSD_g)MWfTX z86fDEjzD1^z!1ySo{3p0$&Nc~kMH*U0A()k=Gv-Q1SBkhrv*tji9r(xiU@xI2Wnw( z$1Y6Z6%s%T+f;^CefULLt*(O_|D72)N;uXcW%Q^gMeUQnR443#oU-ywJQhM7H-uSa zd}^R09w28jgM>}vZUg}AoOA6QaSKyH%AQ0(?1!D>KcY}hFnie!g>5|85kb&!o{l=g zaf)nio(G_5%OQ2eNOC~bNUkEUxADJLQiUSQSUVyM@=e*CC4(#8h5<&j>XOXSoKTk% zhg>a?qAZ~aQ7LsuoD$F+MlEC&7>$I9*kre}J2@fT0_4xv!9+r0gyq@Hncz@%3J}zt zve$~K6?pDd8MYj=nEX~|#wWuED#Xet@zairX9bY7Cji)0Bu<@!lC!U-B8o#iCf7`( z%kxoakR-#~MB#cgS2G~|u+5>~RW8k|YYK(#%EN*EJaTp+vLc!ZC80gh4uVkpHKuyv z&VJ|z)r8yx<}1vDd8$LytzyWZK>KxU!)eI4Fs$IvduWsWs4ry%i8g84;}X3{*b+Aa zg*t9ElLqM#;-G&HqoTYPrVP;h8T$deK)uvkXSlD1{dLR*)tFjgdPZm zWbY_&NLW`PRFMENmENsr7EQ@m{svz#Srvp%p$gfE1sR~aDAK)j6gqn@jv#m!BBtO2C7gT$g9S})@q)ehg35y6(Fhvigf4 zdOw0A5VPVKn!?UCqYx}k*(eH>CSL%WY;{5n?^yMVskX8M(YrZs^_Gk0ZavObWc5Wf zf4%>1p9n7u3O{k3ZdE|Z8gj*hQ3iG-p;X>M#S3T)jr(wmK6ZcrVy3~SKq=P}9g^4s=;=Fqz3-mIkFGCKkn- z{p{Wxa%smSP|8>}K_s`F{GZK7F;)Sfs+UnQ7$_~zHDuugs1ZdTFGnC_;RiJ}d*)o}t-=3}-a;U5$f$A^MQ$2GMFB&%Msfm|2k2P%NG zyuhcT2dt4Y=qL}}(&4b8YA~2^RrN&(rTJir?F4v7)3#Ia`Uda0fZq-Dy++qW#|-5?nik4L1rsc2x8nP^Ah64SDkrR(PRG8LjpWd=y)P1K>IIlqS>OToJL^STiV|Z+EPrZ6Y8+2 zL&e5K5ewg?0eC@dCCz9e@)6Po7|$3-5)}t=pSTI`Kxl-?$1*o-L@=T?*zg%-(L&Yj zU|UVve7gqVqEPDfg7$QPI4lUsUho(X$VDe}OR#o%tg~=Nw0EQwDk>}KlrW-1lMLX# zoRT6s}lKO%g-zf^G1MZ7~xS!a-;uou{E zn>#|4V0;t~x8{USFs#bN(X1S`nRyD`dA%lStC4Lep)5~MVRVo%2ln929T-iVW>VmX z?6U>WD(A~{<$idr8Ce{ND(rO8jA&|79s(yzUSeo+T*0AcQ29sdKk#JGk4-aTMEXmm zRgDMDIO4wJco3pwQ*lp9uPP$zI)KddjwyUl%HVQ$;3=Dg3WY!80a*n+V2$HVhIcdR zsNd2eiE|#gn{ven2(Uk;oF>os$mjqoI#ytcds!o-86EVfUdTctITVR23UcV>THB zF{}yfxiw%_{g?}t;Q-C-98}*k=_%HaUh6tn>EpNR4HfY~RM21)M4<}oVccRB$n2{N zNHD1Rz#srgLYjgiS?_&?mBO9~dsJm*xPt(jW0L7MDD#*Af!kRNs2Hw;okrlrVD~N( z%fxXa@F{Y!!ajv3#xGD2Wc4^jOq=JCeV0l%u9UM5ZfYcLj+9Y zaknfdVp_(*27-B>G*RD=tPpu$?^7IY`$Wo&{$=?OWa+u9xq#X-YAzcLU2 zdkPx}MwnI5M64AVvVb^MS_;Uv!U2fT>l~$zUJ+I)OM3M(6D+$NPpzY*5+1B0SRPEKQ z==w&|X%p*nQKLWXMuklTIvh{1ZRSvW3&ADxsBE!39VS(Ki3OdlG>&_0ibtYN9$Po6 z@`lD5e^b>F{s>oROH4Rw76>GpJJiSGdm4mkgEWv`5`q`(Ut36RiTi+u&tS4 zFy@Hz#Xz1J0c>XKE@eRDUj+C;TeU5MX(`V@yAxdFcz#cwVCBAnD&Uo(M4&c9%9nVc z!jHO&Pf=vIp@}PifEK^T3JE9}3QQ0Doc2m@Y=#PI8_U9>Dh+|)Ghm=8Qg9o$5e5*N zcACI?rx3zWO6T~5adnaOB!pjbicJX45S6Vd+BfmGp=`EQh^aS(SYvsaNo6m6>8UZo zA*&`C$N74UCI_G$o-JC#TG$7!za7xNx5?8nhISwS-App57Mh12TFtpR)U-Z4_ zp;zXKSD4F8Toljf5BOM$s+y{?E49p3`H!d>&(okGoa~7P2#y~=1yX?gIFm*kpkX3I z;*J~({0&clz$fK-WOkbx(!Z)k_7p z($#K2L;|1ofxoj6k?L@j&K7-lY^k=BB-fFyzI1J8fI+iXSZ5g%D%m2MUT8ny!QirP z>bkm*4k_t~Vc;|x*3N{7*_UZ=NPW*qp=L)n->xJeSclfpY<>lo1hLh#jHy8IVSQ~# zh|%x3;%Y6YM0OT5&80yC~?0fxdTn?oPrl~1_EL(i>CF(EvQIj0ZXv)d z(h4e#tWg7qrWkNQ8*ZA{Xb8-LTF({w$h0hdh%Jtz9iy;8q^r=;DvmPxTs=|8TW=0# z+4C|JX&VT_OMxsvn$O0cx=Qt(41(hLdH?z412n?^yhr#y;sb8(HrEf2_wTMB{%!f< zi`To`tNY#K>K|WizTfWpm#^20H{VIKU;NXzzy0$3_Wlo>{`AYkXNRBuW<7j%;1@0) zHrJ2a``zXBsETE?;#)-|XJruc!MzzJ2=fFMsvN&BJ>awf@RQ{(5zZxA(idkL&H`?ef)c?tRzB zmHZhll3db+#&&GoxJzQ^}p{`&ge_U_}SAGm+_XAT&F#0_$D1G4x7T;?H}mJ4-R)-&pyxK1 z@YP)7{S6m~{r$l+mM7oqfBy1M|N7aNyx!g1 z-)?ty!t)pF^~1yU$HkWLZ_n319j@Em?dHR}`QS>wdbYcN^bM{f9q&d3>^diECJ4=oQoV=b!%EKkv5x{b0ZPd@t|WyEe6+667kDg!O_q}44MrGIT~3ushN?_JEL)cGu>X$ z<|nMz3TDz~Xfg|W4XvYjS~Cjm3-1pfQE(GN#>NLjbC=VRAc}t_0feeozsXTba{hVnNF!=J-_1K#bnwn#Qf3xn zMt0)`ln5N`tO^)%9%^H3CA4^oI87~F$WrqsKp5Ah=P%}h?5`SDpsR4opfqLK7FD1u zra>+g5;+JL3!zie)Uxm;xgCX`iOs7Uu~{?=L|1({iU=0vsvQEdjLB!NSJDSH6Spon zol^DuD3cTlTp;vOjGU4M5e&6*ptv@ILS704lcABU1Ht`@G1V7SI(rNhQ@4-;1Vs+$ zCE_T*AxxS_eJko7o>Y&*OYSiy(Y*AvzH}P;vPWQGdgTCx({E!QF&kN5nr%rtAf;w} zLB!$z*saN0O1UgaL2#TlTStt$wd9?LCh)po54bU}K~M_<()68%6$E z{2!y~H1Tl_inWrzwyj<^r8=#L5kcloEGCxxNJAsKnEVQX0hOT+^`mM+iJdMVc!J0= z)38MMXO##joPM@l@9MmYiS8{il|JVEGu{!fV!RNwq!%yLmuwY6emxRcuZXLB+&8LCfJPI zf>A&frEgVbt&C$&2OKd$(3nHvNurfi4R)CdY~Rd>ka2Bczc_$OYk!WPpmgdvb9USp zPZ8|R|Leri9d)Q-aaAIxXG`jhse5E_=D~c~86`AWq)_2;tQ-nFxf4Fu=zu(9(<6N} zT3?k2tcZ7$d`Tw{F;DilE7%28fs*5Re5Fp`8 zB3AP4iCGXZ^*{!30Z|{FLwn z02)Tf{SgXBlo65V3>gU*iZMv}kVz(LtePw~A1Oz4m^=;@2Y9Pc4Q(I91aP)M4^AiH z0^Esp`c4qs6gbfvOwx|cRs5AwG(xfb7wLhFQhgj*1;yZrBT|8{@Bm&P7+a-SUvV8Y zhRVMX)8yz?Dy~r#WWk766XhXzq2Y@JCa4^NRdEympS%l>G8qXST|-!#5gBLg!UnVoT|^nvm|qmwE@FdKBUa zNOmd&_*>H%R9L6Z9kn*lae`1K6anEW4h2U-jY=S)i{M}a#$?rLu25c!{) zQ1R&KU!l2|Rx=7nh(QzCq~?yg2pw&Om{$0Wm>?~^%q>GiQzdPen^VBZG_VHyq;yD= zJ%`Y6$YBLsX~IR+asjaN#v&;^YZ#miiF#L=hyp@Ydqc;&$bPp$kV(T`*dx}UDPu}L z5Zfj|t(pfIi?m>|Fh(YodI(DS>6>A2Ex{yYCFFtx zqY;cUhJp?>??oOvaOq@Q@6h0%w5nS@YNv~@X2a#ABt#v{WkWjmg^+b{t&OkIk@2AWf!%JPyS^Xv*hvc2?+ldmJFj)o&Rrm7^Y5B^o~ zj+8y^0IGTb-=qX_(y5~0Oex4p#n*%dsU@Iz1pP^{2)~_uLd;+zsicZZ1;ikcBy=ys ztcd!sHVh7eCQvYBe}ow@89;aAKx0xv}PanjMFB(}gen1c~uSO|%_ zFtYrt8vV{3D?}~2pGXdoG}@o2UaDuSE^&2lgk=XNU7q){{M7+D$e(5r>(j>^7+x1RRr^F^mw&ERB3P zrOvEZG=cd{buR%c^^8+0=xicJ5zIxLg)kH_>0}?K15tRQ;rA+frgRBfV`~Yg6W1d4 zrFIJRH6|=^B$B|G9%ve}=EQU07xstSnczf>g>*k^%K2ix(?(JDp}H~6X;9t)K`yvS z$5C2I*)u{`A{$+Vl}4Nwwt+_o(Nj#LmKNj!fg=(g$a{*bVR9uJG`)ucB8vDa3gsH| zOBmS%^(Z_4Zoyn4HH=9Gtx=>$nHi{MuP|E3 zgwX>`MuI+2bT6hLy`}68gd!D)t|!!v{*=BWcuI1RG(TfmH1Cg$2Ro@a@{45(kf0AL zsi9TXA5vOPQUEc6HN~<}4eTJ4j8Uoc4nYn#X<9LCA%m3)CR7_HJOTwnADM<&QhA?L zInieVliaF#GZcFfwMS5@1Oua&;34&>EmB*Idm))b$Q>62i3!Feb_AdK-d9K4@SHG(mB$+H9CYAQym(FaoGG)W}=ehm;KSSVI2;)5paMq>bnTv5jxZw z7033O9hkTz6^SmR1F(p^I5N%}Od-rbj6v0W={2gnbo8HO1ywj0+qBW6 zh5-YqL3)oUEtvu$y;!5vLr~j9sz3=5{22BY&9BTIsc76NG7s8*Xn{V;ZAo3q0Wr0( z+%ZAWziKe7`6N;LJkva#sV~q%u^i;-NDMT5r)RPLS|ECj>(2H(GX_5Q)1Y# z7t3YqvAi+YsqH2fEmSf_gdo>`172@)cf2CwyGvDzeRED6uG3Eun zwF3U?Z$J`bpOHR7Kayx+b2OojbQip!=km_F{h=7?&IUGKUy69kB_LnktIF+=KOe$)qbW{on56#k{ z?1hGXC3Z_MkkRT2`B-Ms=)v;7a0vu3?oV93fhxE8A zc@W*|Yl_2wVj%}Xjjdb+j9dr+!HFG9i4MK&f zxhztBK#Gb)Ok-H8|-5L4_OCu%>hnQWL9#@)+=dmqkYk78jRM zKcmJ_O1$s@NTyLUL8&H!ndpILCQxdLjK&+o(MKkMD@cwqHrxm~m--I_hv>Y(lM;g_w|7Clno1FV4_N#Ex_n;San; z$P8^J>z!C82}BBaR9!~mm=O#J7`zqiLWUC|_K^TYv>5(@xq}LZ=rFewEs{k>FciB9 z?-*XiZ^N(`T}#tZn5EE)%93^Bt`4yUU-+gdUql@ifZPu_Tn-iGVTd^u3c;XQwpLsM*2`LG&z8~+hcQSLATj2t}@2m1x<38kVYY|6l}MbRvX6?H9Bi!O(Z z=oshJD5i_0h?%UKXXwKxisEOgXBhty>w`UJ8xeW*eIp|g_E_V{eu6seGF+{hmcuxQA2@=+6siNd(WhN1#=II%6Qo884{6RBd5 zU_cSc+MuQqs}r99SxgvHC2GVcke)TnmlkY2nB!;Y+v%;up6!~hBywsnqU;%A@r@* z7AztJluScBF-qy!I4X5?C=O*Es2rRdEIlIR>Qg7c3D3e}j2h?R_#K!$7-sU~U^m$S z>Mzu(51KweAtp6jbcmvn(TGfqpqihkHz>fYMN4B;Qyf4j2*;mcSst2n}N=sOm;D_KA6mWymie z0*JNYBk&D&y9TN#*Z``WMnIYq8=#&6T}Chg-lNfwN;T9JWjfnzBVh;h0Co)QfpDTk z0D*`F0#_m*k@9Y5MK)39i-g9^LcmY~Nc@4g8-}I|T~YYV7P2zHZXx}R&#!3{FdDHI zqNwaUPKaD~#UfN&f)7tDcMF$CJWkmxUWvwWYG5D0Bl_vBbp0D?9WF(lsGm*av{fO5 z&cP(YpyK2X#RqXqi4=fV0{kqB#Vb%os>7{knk9;1MSv2?PhtQHLr^0vaP=B0p;7Q0 z`iF3kuAqj9AL>cda{-NQ#a4r1k?I7$BRpxDvs@QaSBKsdO&2g^@A$*SC7Q~rO*SpR>JbpOA< zga^|8C!L?3mwELCw33EEtt?l&fI{!FmHvV;TLm|P! z(--XpEYEjq+Y7Dbh1TXmYinWU9k=oi>DkS-h1J%=>bq5c%f#1rYpeXpfAsW~cN=`a zs{gj$ZEP=WY`y!(0x)f^wYz7VYiDID`KaTMu0&Y)H%fN4mzRhctSpeoKG|PcUKn?Q zg^ksCPP^T~NbD{@^ql%*UX_nITVP7jyVZ5UxxT76mzTW5L|fPrbPJnX`jUg4SKe)IavM2uOp%3+%>{iDw)wvj<;&U- zZUBI-W!=2ND{x!&iiiF&6xvw!X;r%wSm;FsK)oKOhE^l{FPrL1hH~?#=Mr0=^nFG2I z8Jxs6!+I1)Z2H4G485@4T3~(|1j45CHT1l)Dt_fMcG%zW{Tf8Ztz5%1`0u*tjFTV< zDnU}M1xhJ&D-vPl-L}5s?q$A!zo99Ad+dRApy+qHpOCid-2}}+_?sX zTkySs)(6%Lxst|}kV7uOYwxs_>YqmKv%X(TGVBXLlH9{sr7g8A~KPG zkOlE!!{U^YRmeTT(t3tU46NauP*AqqVFErwsOOHFC@v3z1|k>iNn~(cgVhN zi3rrWz=7dV!r%u2M5Mgi6l5aZRg^Xg9{lkEO)gQ*N2I8}5OdSW$dbMaI8|D%wU%&| z8cD?lbeHBo30=Bd<6j=DPh!{w#P+thl0R7-GMTTbdJ05>P5;gJ+E9!L|LJFO*$RUE z9rarRRMOK10sn_N`9>y-1gkkyG84pLj_6M)65)yO#{Y!~ zOUDJH&~yVCzg-ufs_Ju5>znatIO^r9*5l62?KOYApkVcOOtI>3sVp50Z&kf2%l78w=%=^1W}`Jyp3btW00YH_HpBqw58b!fLj+7upLiE{ok4`zOcyhfNsZw0KJu z>yt^dR~&V^9V!sdI?X|&`2Kcq-f1#cc|j9=7w#5b42zwsCI~t$_OF`5f&x(tfKIbp z+>DxoLQmuwFPe*#1)Ub7F_p7T6xM0+f&#`#le`PEknYKayMkIuF5Tr;5YZdAFDbd@ z3bI)w2-rhj_M!NJCjomA1+z`m+iB6FXco1E)F7#*%PxwSdppNFM@`nmFHC*JN!aEU zyQAi$U;)U2(}Eh7rVe;Pz_T%T#rOX4ygfb#gyUcU?Of?&XWYc| zN9L5dVe}BreJHwlAx%<`gX1^efx4F_(k5z-5`6gGsJ>FqGk}L$!V?D3h<1?Pw zkCmu)qyK|z1%SJDY|B3*ZE~9F#T*i z=ybuz;YS`parB_`sfm$wS}ZlunEGFrfBXE~)4z?GFX}(mKkMT9-}TS>tx^A?{`s*R zbsd=!h&3%slHiWQ?A0dX=Cn8--Hy+oT$9j9t1^v4F{ADc%lpK??Qw_i+gA`$1H3`l zDi{~SM6Ttc9|L3dx2d(v{#ajIf}i&oeujzTt_l8Dz`rAM`*1Z9sKd^AuX7nhJ!xV> z*MO@(^S{cDm|qbW2zae%Emm~U>9vPVY%n(G=Jq|JqKUSMrLc`bRQ2W5KYt08CQ1?H zV;6qyZ;g2uLTmuL)`XSGjs?rH(3Nezjc$djUXwH}+}RgdWhvb$4hE;=_V})eC>9s3 z2OHA&6fzJy9RzXTv)jQ?we9dLm+2|p@?MzSm=`c{8|5D-hv){2+wFd z_GA7{F9@uxvv65%j8D2NSdRn?n~!$78hnoB9N$fDI+v3sRIY{S8TmQ$fGYv`_pAa{ zkVF;#uRmz^^VBK`FQ-+oyYl)v%mcl z@-eN0R6|5&(m;cm4X0cI!!@SRVL(sp39|%Bb zLz1F8X)cPlJChr;zLp`@uf)a$D8;(fqP`Z`2e11jfX`bo%UPfC*hzp@P?}g1I)+C0@vB@w|hPvUW9)Nhrl- z#ED8XrRELHf7ds@{(0)UUzG&|aj_iCE!kUZS+MN7BMtlUCXC>hv@3$TenC%VoByGk zZ zoES+)^%qW%jk4K$axz5)?eU;}DstBqTAb|ryKA|5Y@2vs%9NiAlNO*K=KlBC#JXTc;;q8oR|#NpYNieRg-lT1po7 zk{+Zm!1Zrmv!;NX=dFYsr9+&^~v6A!aY)bYdPoUe`&qtg=w$r zf7d_XQ{(j?zZz-K0NrOMfvs57eD2$4ZmLMwlHzQDb6Sa%;Vt||9MLNeV)&)lPD^G-Y&N%y!c5<1xa+aSe=I z0o%46U&!v*AQ4_(qruaz<}ZHvMg;6SfYrdG-T8D{LK-rA@t||n!y>eJ*`b|VY&ijN z414hRY;YyVxnCqBSzO>JhY1g9p{^8L%HdUFsmADIp4Pmb&_>MTvB%b}9Sb>vWduvm^p$pEHNgL|PeiE} zYIp&%hk$oH_`6^yW){n+;Kxkh_kkAq_A14uu9_cs(bp^}FW}2SgU!{j2~?PEb%e=g zoKG2OhIBxTEy+pCl|!^^9iv4d2`g|uFuYp({Ivw>MEl+R%-)xSrOfxL{&dlGss zlDHv%ZwoaR(13wtp{{2O)ofuwrYr+d{E~-C$n}^x&Tj@Mza@*Q*}v=8{R)C0Y$Oe# z_cBtbR%~I7c^~{uiQ=yoRa4N`kgipIb>QSN6gWQU9ciVgIh~VUN-|TEk6@|rr_P;% zsi?9Et&z5VgmZOep+KwfZQO6qO zrY-?5OQyzIH0aH2O#K~?0Y3ZNS8q%J4xR$=24}2Dudgr3V~arJEZ{;oH-K>4;F4`6 z%C{mUlq~L9sAm6uY<2&{3M`!)G+hMhQ`|w$x%9P>p0znx$6V%GOrtkM)^S#d` zurx?V?&to~Lxe@SEGHemPN6^uTBeu!kgZZ7J!B}Uut2(;14v;1QU;N^cbCCAV^p}{ z(rt5mnYmca8sRY%f6Z^^h`Ddbi{$@i-nC#}2G(t(9M_kU>ArKkyN{2#A0DO*!2Vnd z3Z>7=ON{%G<#J~MnEiWdC0cs@i~8rsZq#+=;kAv(9MC^tR@f|g*eR8?Gq1@*cIq}D zna(=<)?fS3=ZC=gBGw|8|x~;yl z2Y;JKjP)D!IcO+hp1zv|F;*@`bv42W+fdf*-Z}1b7m|U4KM|h@j*g{ak0h%@F zOnrSuHR98Wr9f!#<8f!$iAYzZqzOy3hiA9L_KibD6}u**4J% zCP8V6^`+!Ozr7g@Ap+d98P(6JFLP9Xee=Hb+Dzd8v`H}af_XB@6u-U}+dva-EUc6@ zwm$7O@Afr@m%rJL5MMb#Hp|6IZ_ZxhNN=kUNozm?dS0)As9?Mi7g5U@#N zQgn})BtQLs<6N}Yp-rDl==Jw3Sxo)N1@(sp^dM?|lL{MpmmDM;6ohu2VmQIMcTysI zqn%=(aHu)eMN|@qIc`mNkW$_oVSf1RffB$>8lnO48ac5f|u8{(`)?87O?|NK%WGtgG>KLa(D2HVQ=%t#0${#ECa zO?45e5@6+0MDfXre~d#O+T^Kw=BeASy0OklTdV9b&Ce;H&R%(wt8@o(-pm1t#8FW^ z8;PvR1e%s*1Z}0bEZxz;0^3=QJs8ZZJw%I~<5t&~R{wktClCIZ)}5u!)QvO0S&zkD zr?oKh16jYF_xk_EaNbsmOh&e4JEzcR_gXS6h4?x}E!c!IE$Nt^0t^4?q}O8@Eq|Lw zw&jm(!@SS761T%cVr+q|M8Gdi^LjwC?mo*IO+j+X#%tQ@-$Np$O)(G9Oj~+^$tMF% zK^LMzKxd!-i>{~)21G~aZ?}W7Yl~tp8qz{ku-z+J_(hA-F4Tdof1U!I4)KKT?D|jn z%p#T=jnv$sGv4qJ8)q7L4256wTe%nYwO6>$vEOZl0fhS;2H3x%AtF`0)S#~k>YUG> zCh+=e{%I>_c46~v=Itn#<*Y?TPX&A#4~Q5B^jrhIM(Q;~vJP+ka~*{L0K;KBg^d_7 zl3>RvaxCMOI}Qfj6#lI(fYfEltTwoyo=1=man%=8e$JFtelc@ledY5$hosqx_z^>J z68xBjQL3ymfO9+3;=daFwGA-kN9v%?R{8V1*FN}LolhUTQR@x9jdDe-+u+-jvq@!Y zDaw`VTaHulMmJRwy=5}GtJx%O8pRt%x(|uOzrmEDnCBATfVv}^^(09z_*Vcu29$rR zuV8jpY7o=LN8hU`U3mhCd!Aad`EX84QKS(1#e?|+$f-&oP&h^YpteKP<-fB~<;~Fd z)P1sCx{aM&)#w_-n5u>zfw7FU_l#U5RjO0yO~t4kbSw#f+R~ke-YH@6814mpg54pl z2FI8OH!7wuC%Td%pXU`D(q}qH$=9*<7y$L(evyp14>=Q_1M8*oJaCYi!Voth;e?1N zr#%Q@PpQ_LST{yWy)+NO_m=k%{npnv?=vlmBAgK8jNc1(+$cj^_ta?GfX=Ww}Xj+-b;zb9pn;D-P#&T`LM4$9L`#Xn&^vh6zDz9Q8Xc|7Au} z_%JKW@Quq$raIq}AzTI8OBjXj@{ja+_U}4Y>YwY^{UYY6-#GPI&{QbOt7FbPoW;^o zxsR|?6~;E{>zyM3rkKIeEiwUDFbIS$tN2SqH!HSt`%POOgN4Tk@OonjhM@+3WmwoeAqV*7hcW z9+l1peKksF=YuXkpX^=oe8?5ZAEM94i=IA{E~9>aeu!VRe- zWfAYKVnbY6O78kg9|LIKZ@*BQPx#Tn+Wg zK*nIIjX-yiN^)&@Ob;}Axf%(k< zzl;iEpH7MdqUH}YC$Rq6payu#7I)x?d1!nPD6QzhAAiAb-k0gsFd{ovvo*aLVE8yy z9ZXko)ZwUqevCfyb;jsp7k<@m^Y&M7NDE8l<&0>Jg>6qStm2h%`)Z=j{-}zA1?=kP zGPBCK%g|2&_p5Em)Kh2nvbL(Iyq)Ra?=F`zU!|0d2v-beJ5*sX zHfJh&SUyUO!+-+i;8dvt5yZeN=H*EV$#AQ0Uj6gbdS|Yis~_`bJ$7T@LbRAGyVsU& zJWE)6Jv+BIqeY)?s$DZXxj(DQQcRkpA-_U}ehoao#zMkAH+Bcc@YAKQS(eyeRxSZCyW&1I6}5)C2hq*T3cK+Kym<$mF)`B-OhB9?r=^rK7R#~_qCwU?#q-dH~VA#p;OD^Bo)W+J^qbI zqPQjbr%<9LW(@W#JKT$yBIaJnRSkEP(1{=tqc?IqToF~1_Qu+x?L_VW!3fbqrE3@> z9#oLK{-@dVOW@~iu3vX=E9*bbexCii#7|a0VVLA~F{58Zt%*Bclow(d8q*69JCz(o zPW;epRNd4|&FNVH559Yzh!H&VRy+HU*}uyLalbyNRApXJG>);LBvf;%l-Rda8=66} z9uDo!?bS?#%!3--T3u!=XF98=%W&&Z7{dB;?)_L>YW+8T4kKkPLRxE_NEO?W#Agln z248bY)MA_=UYi;%Awa%_u7^blc4Q9w zDVnG%;!c&kn(^yn)=7?n-8btqmd!ekLRzJw`&x%*=E7}8bwR2&nC6nao`;C;*Is*T zPJJ|Ux@Usp3_+g`j@Rp>IjTL?M>A8T90MY3Bng=?8F5%!G%zCp=iUHhxDHenjLps2 z<=2;6|NP)}Vy6dx{K9WFlF(pA&g_hW<{hHkqF{<%7(Xalu(ezkV~_|Af>1h{M7{*l zGg6`=np#Cn+&Vo5ilYUcMBdQoDawRpQtURVkf^ zMmj?7kC0_*`OHo-mVA0AmF8gII8PBSoto%!-I$$7%jD>p$8k18dK|-`*ELs`X>9%W zHBr&fbY2%np((?DDQzDUXUX451f8dmvP_qu2wd3iGU1bmKXcJFN7nvu%#rPBj_fec zk>v)CDi1#`x6OFWD&r&~M{%iTZ@QJ?ykRzF@6Qk^lfOHB{^+~+#c-f@pP0=+;K{$0&Uja^hzqY^5B#nh3RV10|(KJ5P9yD31Y#Q z)Ob4xqs901rgc3Cd@v_Wlc3xD^>Hx1xy6^^DMpJiEExLjr`_er1414xc~1IWBT zZhYW}exVJBQN=vJTkO0(-sf9Qj@E*5O8z6Gs&%#URK_i!FnB<-n7X$^F23UnN*4yj zWS}+{z6o&C2y0_d&-4J6h=Ut!n#*gLgD)~T%igEqUMVnAy1(_Ymx?!B#e}ltv#QVGrurrAWB~MArT$t zJj!I~#>{YJf_bYmIU5g7AunE9qfutDu#OE+D1tg(A0D5ui>aP(;DN<-C1KL?RJq|>i<+mBITt&hTiFYkpJGrHQ z@-1HtuFi(HX2$cPRxNiE^LwBo^Ao(b^Xy>nee>HUov{v91zFdwd$#{NIn!~eLPZ=8 z27n?VW{D%^^I(B~Q9+SRv=b2Gi}J>>52fH>l+D#d4Yoo-ppGJuG|?PHGlFvTi7L|oiUnF=7}$Xy^z6MH;O zI!wH>N`|RL0nX%RjD%;7y%@?&dh3x`yO{FpOAv6cH1^itavuyT9FPw*LeWEGe{_)^T1+Zo&y1Q3zlqri}y3awd^? ziyr*f>p;FPW(jbpVW0k{n}B49#5P9M<7+`w!~SuaxLD$d{>2@Dv?@~-r`b$F>Q zF*#-kl%cg90@@LPDDgJ30qLYRt_ zdc{w#UOnAAKH1ylfhtQB6DD9Fv3=pncIE536l%QaVXKbAE#CSS`Ew zxXS4s@GzLA`Y1$;^us!5nP)daIRTM$KAXW^AQp=zu5>oT5ZkIT#Hh6*LkD3g*Uo0( zksBOoD>5oo_x zde=;-@KYyERKC!D$wH9qO2IYUe9xwi=^I7a!r(*HW zX(%WtSO&NT^tP{pmF_MjC)fvyK*K8ej>({yHEA;F${atEgGZKUJU>q6nRO&rnTV_k zbbFC6cix=r9RV=wU0G_9xWTr1eWKG@4xhi>J=s5ejmBXfX*5)KivG>b^>*!lIn5c=>>)VDL2XS^+-L=%?%F)NC{CA=w zI!47OA(*Gs9x^JPoPMeOgSKf0xx{5(lH#S~U#qfV0ZirFu5 zr>7wxu2YW-6m)yjAC12=ZdUM*wJ4ed#>gO9wm;&b4BC=gZ>+_(*i$4EgJQ1xqbur7 z-IV^m;Mg6sm2aV`Y?1S^nUcd!5!#U{|I&x-?0&12j37I>RA=gN5;5=CTf8Jw`dxHn zUF$Xfdegy1sBg^ZqaN2FQJ_Uh5kCEXbUt+g&qb&}xv@w@1rrPa2ee}x`sAI{>dc)% zoVlYDc;2E^K^MmWXO70&aJ)DfSA%qx5xUr>uLNO|Lef$a=lqm3RyNilSql%@#n}wT znIjxD#$mfko(YmCTS-%<8i(p|5;`jt``c=)tYVvS=`5L2vzCzs_D%gw$*xN()?7ZQ zNig7*HdJ+bc`8kK3R;}4EnE(`CmBsisyNujU@<0x!vN4UC+`BAhdNQB6z|M5)6_X z&>L6)PZDC$#inqN=M0le?o-Vy_85x98Lyk5KdqMpymW|@Vee5b<|RHFgOlib_KkGJ{UDM=y(|$7P`s}30SQ%0JGod zH#E*u_`-?^BW(g{c$HE>z$5p-V(hOkK0e{^(rRb%98wNI^7&0RVSU;DDP`OFV1lav zkb)pE+|it`ka}!GG9p5TB~M>yO1BuuT+XjY$S9Lx-*H@pKarO_BbbK^!kU=Io=AtI zz=742eNhksY2P?RgR3LeYot0nQo##tr13h*oyOMv$lF0kxP|>>>2)M{k$0FV80Sp4 zh}r@`v`Kw_af{Uu>;yrK2VulBdR3SfPC(@*=g)yk>0%5}Y;RtK=)mq#yw35C>-Lp| z+23VFj4owR=w8$T?%M~6{Cp|yF+ZFYm*`A6+1a_UnwpqUg~iy7DR>kjvq7VH8-w8Q ziqUCP#*_?4ya;)P3P{*`jMpVCVuX8YO^T~v`LKzVNnRraHcxtSIQXD_6eKXlgt3SO zELp~+-|290S_TlQAilV?9c2sDnltzWIJbQ!$efs-!(EVX9&dJ$&@v&eDjt)65@Y{y zcwLyx_BxIO3&@!7qzweh87Wy#*FOg?@0HIWlIljYOU!!5I6H<1abAo}bXo?aCxvx$ zOYMN1o~|L5tF%}4R*dWLB>EWTz+hsE*ly;uOmW%N;BQM?=DiT={);`HLb-dcWAAI zVxggvVdN=chbK&f2FwKqYQpi8Uj+tRKGcTg4aV#q-i2NG%x!!nGnbpQnG3B$(LDVo ztRD)6Yynhi>f?-(k_FP*aOm$#hNtXK8IYsVP?~_C2GTh)70LjLYj(~^O(-CSw^1Ii z#<7SB8Lcr=HcrTs>@mix$V9Rg;Q>1?+E6&46pC|*9g{tK$9B#uU!-GkiJ-g)-wuM1 z0AU2Fk`M6PO&{fiOp-&V@R*I+_M%{Hk%ogN>P7)8X~j`3*RgFgOl z_eS#EA{Pn?4Va@W5!oIR*KvwZIIs!R1q4f1acEjeWhL-UEdmMBIb8(+?X#ZG`m99q zzv!}lr=8p2xaYf^$n`msp0;Gbv+Udt*$%f1SyPVq^vaZN>7mP#s5$3g^?jk%D0G4A zJqSZ9mhndf^9N+~GfiJ3$S+gu)8xZ|pT#E62#_j<$K+(`g~KPW5k}vJ;0V@vj;iPv zf9$yQa-#4y(g&j?ALb#NQE&oV`&t1b#SAm@uZOoivS0kIOfxY=4^1N#0<(x79FR)U zGi=4sNtVArg}TDOcXhO5(}PlEbvPVoSt+TkP?ftvgaL=i_^;J_WJ&c9_%~LOPPt^! zo=q^wph1piahQ9wF9hwkNUhQYaa4dEx*c0XC~^U8+oWAlTp(Z^B@{CO24xPQ;Vfvi zL7k=E(zlUTtnw*XS->y6Ia}kgy{x{prju#L7okaOcj6J~J~DgCzTv6s$Zj8MssvZq z>dwPCIYzrB8wf@;^XWD+M{FkAn^9Rj1nWX}06doDf;@ndhU`03WMnD=rcYz~RAW1( z4UYSWSczOFON~hD5s1s1F6Fe&06_rMLLy6I`Wqy|(_`X!d2`B}C0>KHs>~Q}nw*7f zS<2S1%^c}A{t9_^aTdg~g2wA>oKGHBvm-(K$InZ9IRay0&1c&m=yC}!Kexv=$5E;&V6OGP2N{ub z#GJEY?k0Zj)%e*P!L~+#Czb^`4lCg!%nU&j)5}Tl5VTrCLTRjfZ)+5@++XHO5u;95 zX_bTzfo|sj5Z;HNV&FwSK;ppOpR=BdLPs$zI8(T}qZ^w@lI?4FzPI`J>WX6rkO&RN$=T+2e}&ir|0!?3um}G$ocK&vJ(q z@BZoaA^-dFVDI_&d#`*94ToZ4=F072gkT34EZP%|R&v*oLcHqbn*O6t@V* z-nlwQREY_maSGG~?Iv#(Mn-mh&2q%>xqST8$FqE_jNunDE$m0`AOwjS$^ z2LydPiS@!mrWKrT6$b3onMu5~Wu|*;_Y2*1kWOW$OF2cGcOv2}qBQV{uS;T_aB8_dgO3Es51ff0b;bY(QFL{*}77|jc zg}}_oa)ybwD(Aik2#ahhH3%TWQX3~Nylm^GgtBm4pd^Orv$;6In6;9W3TD~=Ey*xM zxqyCUBBLkToiJd;QDBodQ-s2WDGLrQi<*QN4^Zx34HS;$?@7{{nELz~)IOE?kyoy+ zExd-P=n;xqo=WbZX_cu;(b~*2sp2N$K4=w^q!j`#^m#THB zKei>uH_yo4g53|NVL82@+3Y3o^lF4l1}f>4h}$ZeWoKn~+#d9V#SI2N-W42O{=pXG z_*@y1`V&zP;{7QL#+yo(E=SFfWZ4%t5mJ4CXm$_)I1#NX)FBY^EfQgJLw4^Yk36${ z&Qt*?n@Ce=ekR_2AppJJfOkBT5c zP&AovF%kAG?yIORQijw}%_N;ctoSrRCF#j$mwyt`SoV<}NmHA1rL3buN$_&S4dvo^ zEPQDeHgO~tmU;333ztSAM1zo3+)PF#W+GKj7-LB>PZbO-D*hLqxa^909l)x>6)T<@;+x7fhMdEXZpR<6cBKaRXlGKJO!zb#f|M4N^LhrMGIA9FGAKhHHhi+s zlg2<~$&ErRx#LasQ%C@SwhqaaYnDM)M>Vp*nRWhHvFT~pfo+{}jP?(x3<0acWUtuy z$)$UhvspTsnOOR;DMWbAn66~ zcaCo-XE^$>nC;{p%=5O;w&7DVjt8B~L2rPyq{A6Jvw2G8!RJpSMLKzULHd-C($n_mcJpsVcXKJ~9{yHbs`)9=U3lp! z0Rp5N9(xBeRNzLHHpFBb79F3pl`)zajh)WOGkI(~xO4*MFLFp+WF{WT2ewEn8Qoyk zMv#K5tSPKr;rra3Wv1m6_s~`jir(J`o~=`S|5~S;@s~wniob>HK1~!^Y!micc6{QG zo%Yq@5Dy_%^*s?X-jlowg0{S9ERScQwd(R3t)$~{_>}u9IjjoMQnAU@kS&X81bbrP zvkU=UUFdKqCo>?l!`H?5=YpBXTFW3yNP!ZJ?~puD#LlNt7!@B%V+48Gj{cT3C`(Uml7Xp<9K(X)YJRY_h;OS$uDtVv;~kw~99`6NNg$9N@2eIOz}7sL z^nG!Ba(uS0=!r?i5_ODw3=qyI%3AD@bd?*HE`|NWEqIRp2mi@&FkxscCB%vLJA|C& ziyXdhdQa9}Z{u5FS_ka)$aD$MtTHzaf(L?2lPb%iND!D(B8W{;L?MPU-U=F>Fwpj0 zDS(3ROVTM{V|X?_PY$iE5}FT`Ct+ws4Hc4tRlP@}e+H~K)PM;ysvuio0*!$#E7}}!UH7-$$=@Df+ z2^^M|!{SN{*s_CU8Wdp4NT@+=lCeT6lTzj$91|oZuT#W+R@gVPpr$=4D=LI%QdHc) zNy&RhuY+vXR(vY!{uS8B))KyFqYS`ea6luE~|~K$zg3v7WXd8x2Qp>)_em$dFc| zgfL%If@21Bka(VGy|h6k7jYK(`y8RinT#0J@0-MNIn~=StmB(dufVWF>JlRoPXM!; zm+d$zF&>V(BH%xD1R%@VLDk$+MuobBB6%`BQsee%Bw5&-HlC^8$t4%15sh(CGopDO z5`$MfvmCHv?7FNNvT`)K%mI;Ss3lQrM16UxVhIPgs9r5-w?9Z_Pn-@fhyqAfK$>YZ z25t?bL_YHW-O<<}k}K<>cKdS9o?|GI(;r}L!PJ%H>(Huq^+BtCEgk?_8}_HaZ-XDs zO2b~2>13HF?zZ@g45{(qALJFH-hr7HzN8<3N8OBg00nCJhVqJDj`Y`?{y^w{Ndy<; zL{>Wh4&>18U-kNJa+kg0=dkQXlm5V|hE0a$kZM4clBbIbhkbsVv=tK{6wf(*oAvz> z$Nkopq#O?3!30kvm#&Z;hQN*g^Ki-j#MIerst{Y(T5SOBohMf%UB)_uuj8}PjSnmT zlOEzYtRB2OY@^kMvn~772fTT}qa3RUMu~_2Do@tN8NJG&DXpagjAjKe28pL%UoYnK=f_=S^n7A`bmMHUpqt zupx4G*$AsnRvh846sYyA-xGFT2i(}l@@1@2WWyj{2xSmu*chU3#<#tzfsl3qp2pyz zQ@ptyTLQ4>h`rb$SODaS&~9VXYW;rXJZ}-RL$k3{N`lD5up}U$u8d zpeZ*5K*$vK@@&@ICln7g1lohq_~oW^3d@=7b`%TzBvw8C`<TJ$|cIuv#B_+4c-#nYcX>7cF_Ky zCf|SKZS(!l`GGt8>|W5+kJ{x0PSTYl!yn3{!6Wi!$~9M9e=Cl&L-$A6^1|IQKi!Hp zWm_q3=y+7W_}{SbO=qcjzw2y`VA4$SAz$Hf)I-A;#o8~eK1|`^$mFW2Uzywk>IjFC zsyx2AHOZ?J5Y?xc@-AK|PEW4vh!FgHg2LCg6lYM+aQ+Xdm1V^hcnk_!;Z>v&p<1!) z#=x}9G8gP|rDdyqTg!%QGWt#iH&{0` z-EK--850OK^9oc%SdG)}AyAX#_;Nrr4}Hv<6jMkQA1+`LDW**by^_dP_AKTs1L$*d zN)}=eEhR2d3>_|%;dhlO8z*5dt2X&-1eOGKxVuvo!N4KINp*W*thKC>n_XOJ$G5wM z9JCzIBN?4GPExM!KqPxw+Xxhj`(H~5R1`WWu10K^9xK=hPz@%5YGpg2Fbch(3HAK> z6@0d@iL6GY6QxYYr^BxhHh|Kb0a|$vnU1ux^iEhda&Jf?q*zNbaKdte&{Ya6oKeET zHaM{q^yNJO6{YV^iKSd<43oJIxio>rXcP~G^}Mp~fWY(p5YNfAaG1?FnD( zy#ARVt7j0XI{7&Yr4C>49Q}@|x&QjP=y7jfDu{`13W5W|Q5Yb5KfO8HJ3ij?HT$pL z9PH~O+1DfRL?50>O?@FJZ%_CRF^VB0OzywlJ$U2D$O`Qfg1f0a|8 zc=cN)CTlzE!gs~Xj9O$?g<5SQd#dfA0N2~mC}~#6F8IKw=lzTV1b* zfrjKVIkU-KX098mQSS_+`O+<_`m6H~hLU|%hj zT$#2fI6}3f&LuiQ{Yp`g@Ase+#|djhjq_zL6H)hOh#JT3`To(~?umFG{whD41j%|+ zpL_&VAksS?4$tx4|9T6w`~1EtcVPwqtjDAMV|E+kMhs4SIr&{|_`Tz|2Z=fK>#DkU z5{cNNKH_y?1nPszdzCUrvW_TdB$3XcWkksufTmk!K_dW#n}WtI zx7I0D-r9jMKpgTyAetyGp2SD^BZ)j%HQ9Gtj6pZtsrCckHNzJnF zi^*^hmB@}$)dO{ks6Zd7he?KzjGhh)P2rkR72#5L+GoK=6s=)By~s?tr8Oy@7KgGT z?Pl#+dly8ycn_l;IQMXo|Fm#&!nQdhiBX2TdxRPt>$Vz9Sp{cX%{^fk)L@j|rI2Gb z#$?`vc^I|@p-Y1BJhj%k97dt6^|Qz?9AF%A$P=3#<}8sSYO`dsjpINq8K(&wHjxxQ zsf@j_^)U1m-m)I^IpS_u>g;o{~TGPGmDeVAs7*V^v0 zS)QH*3XM4%@T$;Lm%e-y3}9u-VhuLdh?1r>8V{SI)|7R#$==$w8FxHzQWav&mbW}q zJuOekXI(N{&n9>xLr7kPYwOh{PhMh`OYc*CicZ`8DWk#^|3_3fmPQN+SAj>O{rBIf z-}PQqwMp9hO{8eqb*VD=Q?I&GLlr?1AF5L%?MG7-Id2nqD8o+?O*@(`?L$Nz%Zm7D z>}$<8bOD7ES0EyMGGhn(xk69K2~p;IxY&IjRZ@q3KWgha0#&a?S+6a8B(=2g35!1g zz>~wBIm>vLq9wDUl2x_Pi6*}7%d4niviozKY>ZiWr#db!* z6S;5*Sy|ghIf{@rzlY03cmZvqQ5?i}1R`a%fJiFWqWbpAA#n%4@uN)tkXZ*-A5w%V zK?)U6a}FcTuz2No2AzNzx;DKJnbITUmxT>nkQfXjJu?^(F+2*0P8>#0Wk-3N8N~y7 z2&b5LJ3-XSI>yuk`ZpJIZ2~b0DE#L3RH#D?@ZW$dX@rU@?DoQucK#^62u0!j+q8XZ z$Jm;uRuJXkwyYet(eu#l>2q=U49h}EIR6eHBEF+hzw}S=f#t{q+aL(6v9@jNR){()<$b5f@;)mvMV3<85T8V!@PtG)+E(@7 zxoiKMJl2-R3wZMfVG*Id+xZ_k4wSw@nCN+i*83@&m712L{RdO)S6;tAVi z8M{bA{2!DQZ%QJ9&ejX@3lm{Rx;~{D`Tz9RLvK@CPY4jl99AT8i}Flq>Q4ih3jL7A zF1gYVkaUJQf+Gclg38=UsoZTxXiz|0gh@PbVRj1DI?lp9z#J-{UR%zg zD$lb(;e=|zeMs6`?0U+<#dnZnHI+&;EQt`JAD`V0hHm+E^+a%8?T$4aA)r{{iIr}C zs`Pc(R?dc_qbijpohe0K>*VYeYs=tV`ODHcs|)epE}bD)36zJ?(s%D_wTt>x{C26Y z@CdbUnA2BU4JTcJ_a77ok)r?U=?||kV&wx)?np-<(0Zs&z@YlkMR~(JiX8*&Y;00R zsse(Km(;9x7}r6106;^$q%X(%Qs7xCL)xm1BM`;qG2df#lRQRMIdoq1-R(CuB&bUN zL2A+V>uEI ztdPHGEqhYYF*?Nh_VAd)?~ss`YoDF*6&TYhk*w0Qv`Nzfp+;%nOQeSd>0TluBTB+x zf=y3=yMME9SoM^jW8{eFKnb}vO`8s@?jP;{gwHCO@xaY%9>DY9%^L)>J(2E}EEvB| z>%A+UllhOrpy732Lwyd9Up!r5y50O$`pym4Pdwk-g+U#>Gd;Z>63qKdP)m6tLCLk4 zup>uq?cof zx%_|s*{iffkhtx0Im#09c`~a-QIdiG$bgAwhYbH;5Y8u{oU_ii67Q9w_dleQ-@pKj{3_tKYg|L^rtt- zWbO5<0R?ZeI-c&LVA_9+^D}=KOf-Fj)Po=TaeZmop{b7>49M`)H-NSF^zz}E#_xKc zkSzu*ZxkCLa;0k#BJUSEcOFYd^?h#DA!$WDk3gbzfAp!tT(W4H;Ruo6#Y?yB?D+wU zKk*11F2et8h~#G|^5*R}@4Oe8z%J5AqJ5`RlE}4-Zmmce_;_@Rm1e69b^k)FNL&$J1#t&LUXXbj5o^I#!oB(p|g0d$d;ubrG9o z6tS{Ka2fZXX(p``@jo}28&Hn%_@5HLOpbqwTcYD>1Fe7CrWm(m@4{=?H74d%Id zid9SD;i#ZE@ut}r6|z*B$iX2G{ICCKJvCY)(j)0L;aQd;??q|b(#B8XTe01w&+eW- zfyTIVQ`4u5={vc`@5K7rR#5#tHZz-H)(U;_md7y$y11EGFkGp_^Y=)uT+y9R#xpKYO!vHP8O?* z`v{~oWYCwGp)nw08H5!?Hyu_|izL*p6vAEm31Sd#n47WYim&-0N;K62m-bb&8Dnuu zxNWZEV+$PnK9iASTe-+8aJu*j%awQ4-wc=f&5}3}!-;lSaxN1MFM9%^3kRQ{umos5 zr~P7i(~pA~$|)D&NGiu>RR$xtU{1D^_o}uc`OB){EUlr+&dmFiowyX2;pIV5+R-#& zCfQhu*d)fl6vYi0$TkR!YJQE|Oro7l>?R)-g_Q1i!ljA4G+A6!P}Y@)ZJDMWeQV8u zp=5UIz?-n?w4fjwSV@W7$#~`IaHQrSOxG18nYqwv!tubfwn77eG^UAU$RLIiG`qp3 zeAc5VS_VUqcWjg94Oc6 zGUdAgD$WFA@g#aZpOd942M)}BV&)RkxlX1w7#t)k?u0erJ(pO`;+5wFse_j!A;NhL z@e4L&ND!92qZyh&nhFwgP=i}oPNLZo_tnHetCOV4f0QhAmPA5;Yg7W)A$v3@_==eu z#SO&?`pQCE^yL{AdFMA#4C)Qbce-Ol<5w!FUXew8_Hg#D@Su1ZO*n`s=!uu9zT-+2 z+o~=V%80BG#m75+j`D9UW5F@bca8BK4F~KL04cRHeD$-gTE`&qRVgg@h9x+?{4$ba zY!xK3jz1}I3299Jyr28j0(X^1GHK}2jt3

P-xbxC@ggwWVuP;D8xi zl(zvaQAY!fImFA=aL=&5h}F!8!3)^%St%8Q)aQu!aBN6cpd-@6xCT)V!#aq_!gxYB z_`_h!kwQ60p5*4|ZhB6rg`y+L(rtriOG6wIsL+T}-elQmEE6m%N21a+;TpUU;ppoRrFg#~mSprx8VkVtPuRB{Xik=zlGtkxD1iG0eP}b{Y?uX!>0$q-HmB zgvi!41V5LnWQ}Kz(cnzGP39OspCV>q5XnD5*ae+ggy^NfqH2eq;Ts#c{q{$bnq+?m zJe$dbpE5}&7NVMdYlC4Ko)td1&Z8miA@+G2&%ptB{+Ez8KmX;;4q0vJg2u877rtTr zip3dKDbExxB;{>uMWiI=^2UpPoTE|r9vXnyLG3l)CS);TPJN>M<#3y$KWZ!syGH^c z@(Msp=l03jsnHAMK#iUGh$p!{Q&I0~!pzEKJh?O~)itW@ET_eJsl zWH{1nOXR8YhW@fk30M20%B>OjBWm+K+BW7dX!j4P=CzYe4KImyrJ8<{9LsZscwA8I zJRPh^e3a>Ff}*xO9mz-xjb;59#5g$z!cG~i=&PF2q!OB!TsOtZ$0Hx14b73+c>s2qu$SA3vbS$n77NDf;pDh+nD1S#^|13?|SfiNMKP446s{^+PZsp&lBWo%! zdU&P97*Rheize$Mb!|pOgfxsM+XRB4vOJL7NuB|-e&~7xocWP9 z-OYuS^_g%4Um=p};RrId#8hIS!?U;h2dZ#`e&knCZcz&}NRm+>vrM>NyrY9QVz$Gx zyP&so%HtV9E6SGhqP3$%M4d(HjwoYMwYl0It=e3}xGB?D5xZt<9lQ=x*Lg+^Ky*yb zbz_~#bPz#Q8H7B_ArN&LY zG@@Sjf=r2ZUHmEj^v<)1HfFKLHQFa4By2JrN8$mQMN_CE@y15br9zC_p(Uv|wU1Iy870SwY9dV1i1S_YnCYxEX_0~CA+BQ;`S7yts&V^eyS zUxLUU4i~RhaT;p~otXQAq@NuU2xCyc({LQ4RYkO>rj3TCEf zc-_eoWYoPE^e9 zEQr=kyfU-%(rBo*D-EZF1Y)YWQnp#NX0I&oS5gB!|9ek@0lvVev5c%Hvn;KcLKwN* z_IyMwh!8%lW!+`HN)ZX0cmiOq5iIdS$_XEwUvvGzc^xC+R4_I&1gFgtROV?ACIhM40XQ)hSROqjO%(jgTKV#$0?{tYuAqR^Ui z|Jgo`j-Is?#thL$fuGq<5Ntx7I9y|9QjTWk+SJf!#@ki1SZiH1J7R9i^iqjCdRYFZ-nAcL?$v8F|f!7ow1UVzTR3 zKY#wr_p8g;`})3-ihd+pBKf)$qZcIE5Jy>plusnTzs|@{U`%(WC$?5OJ*ED=(06vG zr+wRGS_cM!T~3u~IuHCrH$I8179-)ywklD7V5yddQ1@4^Efb^NUP_W%AdZ(9n$F`- zq83cvx>kU?s-G$%nn^Y&mO4*}axjpVBXt>%T*uPchb`xuWd-T<9Y_#usq84X_X>h~ z(%RXwsH*EK`}N#(bWsY~WWQ3Kwd_OL0XT>+lT{VbtO@;WII{t=93-!#_G-4COf!P6 zM3ofA(njf1X7oU15}&cgCE-og7b3optVn?LTWlNar#eD$hlCca2jwH_indptwYPXj zZzu({WZ~J;sRdcw%668i8A)>%k-0zO*x1#wQYA~POv01|9u&DSfD7OSfQux-M->O0 zNok68wVGHqAq1bW)2E3Zt%<-DLhkqyv3+97c{L0(6n*AQMHH5S+W^F4LL9 zk|OGbRaNDI!2UeEdJ58;60h=WBwS>df>z1c8MCR3t62LhEQb@PAgb_fEr5>Q5KWpeOFHu=FZ-i`MFzcY<=M2paFT|y2%Ey)5d@Q?{Dbt|BjP7 zS2kuMGJFO6^@z+xvGpHNAd;drYPHt6+0kmvM*7SU)-DlhgF$4VhJ;jr*(f`&p}FZ` zM_mZiVqa1=B|cTR>%hj8q&7y&09bG->JTtQY;Gsehd33%hN$ZYm`v$D>oWFZ=Bb(6 zrK(RHc1VC%B?7Kh$`vBi$?`5iWl~pJ&kBKoumI&dt#RtJ++DaeuSC$qbvmR~nvIKM zk^ZSmF1@w@8qsxigAxZhSLy2WL05USa+$h{QjxrBwITZ^CO+qzE{d~D*(2pe9QKho z)0kpDAHsBHbH%5-MnqdYAV0LWUWwr{p^arG1#VYCn~k-slvq7|g`nq(QZ<&YrFz~0 zW)^qba?g}V{7qzCczz8T6dQtI@`3V$e#3igwpVL%lHrVnAzq&%2&~Oi9r>H&34Hgl z{rPNsL&Be`B*No<9KFRTx8J~l3h!1=10Abt*+MtTDzqg00aHa(nO-9@l4`&erl2o% zzZU%9@6@fqK_%rbSbDiuM%6LMGb3}V#@dmTpOW+q8GE1LJ4-nP?(xS7AA|;4FUjutyi2+VT0#c+=#5QIjw+% zszyZIyaR%@Ym&e)>NcHxFzR5H>fFQ#l0Na=t5#E?3D9ayY_;|T4$@X-JC0`qE6DgH zKd5dt$(2O`#zGj0MT|%>$V!)`AgxRYz-xg`^0C?%;D!Q$TirXZtPk)}0u%|T%#FQ5 zM;ok}m<*9}M+gh5O{97}tx{9sW?u8HU`w-Ci5E-12d2XP!Gw?G7xD5_rcBtRckmtG z#|APxyzQYnoMksc2u9FRhHr~o&j&rHZ5fnnd*R9%5HdlUyT~=kbIOhr_oD`LLj>3b zH)TMLjf5VF-o|Wz7GW0%3l#9MnfSJZRTY5GlMXNt#1s36yd{6@QCSKj>Be;6XKZ=ZT6Z$rngGKr-rjOBnxwVmgC3LmsTNkgZ)ROT4!_kqyR}#P z{R%EF4z)!6l$I#*;`|wJmPB4#CVH539qe9W?tiKjDWfkbMjS+9cIjf#Ua1(hc3p%R zNEpv*kwZL$PcH_cT&hK5tJI46E0m(ntB6BCWCh5}$9;h9`$UVxJURW=r8D_8dj}3> z7>GWRtuZbyg}B2M5m34Jvn2JbB=6DVlf`bck%W;nP+75sk?WWz42p}mu`EY91wUO= zr*P6hjW+<3BSevLBmu7cZp0oX!Ff=77>7_eHQy_?7Hw`3Hw*}s2BnW?(xk4B`*bWx z6c2{*@PTK}$uWGBidM7LOaNAH@1{ShIsGh>62UrSDAL0JGQup(2=!vB!{`k?r6u2d|@8x$Fl)dcKm2v8@KZpQNJs}7R3=cJj0}ttRs!mDAnDG)Iiq< zoCYNkPoXmw(O?{8w1|!EFU#CW{nDtifn)Yb?fhQ&1gp_;HO6)nr%;^esFNrHVgrhV zY1vwJ1qjGdtD7unIn(IJdh)jlkWhFpS45{S^qfr?w|15&+_WN3rBXL?#OQAbIdrhe1&wX zJF+S*XrlGInG*HphK|xa1 zdW-B#I&m$x>MQN|d2mT^S6k;wO)-nK6!gT5^=J0s9q5}7u)osW1vNLMBTV6H2rji~ zMsn13L@Bl?xxfWoLWLa8o@|d2XsWHyfRQ#AbE+ATS1%%P^`}XWn0g4Ho~n{`hBu7; zp>y|%UfyIwDomu9nO}yI;AMU=VMeJwxk%I+Dvhour?Nwgc-tz5x1n82+MBe zR4Cu6ZB*X2bn57xrtmZv#P61*MpOJGcSpY56%RbPqIzuF36^Hw&>NM3m$zw%qPF zhNrP@$;YohU+YzBplqB05vd&p_QpA5b2m4Xv?k!GvO_0yPq@oAUPMsbi!BMEP@8t4 z1I@7-74;gmfSdItAN(Z2=3wvQP*%D6rvwT9qN*(7QFll-F1Pm^X1fH7W0Hr%c1KEk>;TWDi+C4i(-*lTSnAXi1R6B&UrLP<**poD?nTYylRO& z$>7UWAOoGssuC4N)JmWN6*FpJ+gc8GwtCWMZiHn=*%VOb_8Q?Rm$TTF(90mp>5ju% z%RY<7tdn4*_}PYH%>*Tzx8nZJ*D}=cy|4*-3YVJkPlC=%z!6kpDxJiqTS zS~&-nk5yo7y0+vhm8b6Al8lxh+^6G20t=;R>M;v=?yXY!Mkcg*0lt(t6vT5Yga}uO zkJx<$&7@JVUV^7GhpAYYr;u+;&KwhRjFBX8qSNyMAB5vX& zI?i1^&7dQlUHlE~pbE-;B$GV$D$J#qA!hlno<^{YbLSK+ojy&vI z0SS!_1$bLA)Z`5MNGGmJaT_KPb0mYv ziAB9%3$7jD>ByzWkK_Zj-;8NO7(ZbJ!Kl|EkR!o`KY|(SqCkm}@y7u&%WIGp((0mi zL0zCu4V1fHQi}57K0<*00%zWiI(~|2J|Ilij~nR{bI2qRw#043`TA{x)n#}v5-2IW zLM-bQ(!hp2AU%?VM#4O#n^N6;z(KaGa=na{2ZPYmu9Kb5xF_?i1Dd36;TXD`B)TF| zuO1xIHK&Zm=^}fKaS=|EGA@t6q=na{LPsB#&RjE}?S1_jde*oIfr*U{oGH^xUdvjt zpnz{hC6QT7;Wf69CI0fh-)cY5*yZgi zz(}}LCnBX}Rz_ZBi7adA6wNJDTiU%89-#Hdh)-#F%S>A$KJnT|nSiwPI6j%y>|!7o zasINLMa}?=rD9n~DZ&!FhGwM(D~av>2y~c`tbr@s$I&>}ucFA*Isws>-cK~&E7lEv z#0vOKapEbn(P2%~Np3g{p^}^BN(;O_q#T-75EOrYt%N9BjuB$6oq|CnBP>k3AljLd z9LR?Tnp~V{`8^WE5ef(kLEPwgRW~zaDzZti5s*p#Bv4uP7+1EGc%#HLm>0{U9_LLI zLc^|X%|sOR9kxI{q`k`tOF^rV|Ib!9j>xKR2E;@xvXN`Su(Y!QP0h0;OrNIeMQ~br1lHkIi08^WVAGgAjvUBT z36!MQ2@EI&#JijX%Y29ug$HrH#Q#zVae%PdFDC&tkiRmagk97n;QJ!TT8HqEXj7$o`SAGd(VjAY_H^!KEn`&zGB5xUZ*5f7)u)8D2(#~ez>q?fncp&=BeD1C|yVp14-;*Vgsc2Z(gKO%UWoZODlE6tDs#_IY zB^->7@@9xP@~Zd+Sd_YAP>@_4p2W|p!PiM7>^0|X^oxs&-y5dY6^H)aVd_@P?)Bg^ z=d*b{&>z^l72R`1Tu>2OeX;5vOwInD*4~p*MWU7SqUS3XX+5Ow~$xx=wn%43Lp@)!`drC>v%0R$!IMiYN@Np zTjeb)4F(}fP5@RtqY?=TgPv?X@G-FiT}DbLOUY=nFE04$5Bv+c_w-l4_#eC`ICKT} z=M)s3;`B1KApo#j8zVGf3Mfj=xl%MLVMCy9<=w(~kkt-B*r=upr{YOykd zLP#_+$m=WCPkt&zIY`OBbjIV+nBm$t#EQn$hDj_{637Fl@}rfMlvtJfj&LPmLj96% zXG6=1sZJ)o^;K)WaYvJ(-xpj{id@Myne*0$|28KzrcA~5tR>5Lh-O=|4@}2wN#Qab zQ(9lg88Y216^3!%lO1_p%TWr>Hpuuy$9S$4$t?G{Tof*q#}E?<$x=KesI0b^87Kcj z!Y3HE?&O;YbM;#e@lwEKd+MzNWj?$i)ki6=CO6sC8nHv>E<3oaVN3X{C{ybYHPGR% zUjWnn_>Yu?Q_wm7^ZM|Zf%zVh}%b9YZ7b~=0 z5F+m#P&YhJw2fgtx}uvGP`_*=j=Nm)+hCW*9f=()~3yUha$C=HR#Cp%XUV^aE{yXZemkuCbxws zj8oMT{8Te~U$$8Q#S>8ilAtc_Ydi!V=A(Wr2svJtCD=zv^zbs$u02U`4zv&$167A{ zkBga}zolzhCV!;VgCZlTpl$CKFQ4l`SwozPLJ3`K3{cEOxG4TAP7Qm7YoF*@0Km-T z>iZq+I=1xg2_8$HUgiWF63VxR>8DG0SLOEDK@#o0UOY!PvsR9Q8j43Giha4mbV^rP zP=+?)UXl%b@M_5C2_o-8rm6ew#FJ(__GJW`z7bu*E$T*}< ziK_x7H;CBqO=|620TBj1S>|(!jJ_Rt(f-5W~b& z-?a|zDq+7Ax`cS29sL+N9dB6dM|lg5osr@M!jO68*r3ut(={D01&(Hu<)!>VKGfj8 zxU=r8{fy`I1UdV0xhbTCnN&|3=CP*{Vuq8p911|BA^;_wq@g&DII)NbrXAB+7^Y1zOssY^ah^ue`EIIE=#ny0UM2n^BTyTh$dQKX zx|&PWc;AS}^&x>)i4Jm$H5-Lp6_1mom9XRhws^_0Sfd8c9#g`Z*%ySrx z#vw6Uz_uj|zFFRMJ9qO19>9C2P3WLrbK1=^P!)0qEGfFr2PKy^8!gKSE84@Lu2QW5 zDLfKC$N-)9cMNf-Oe~2_k}DAyt_#B+`{vo9*n8bLf+KB)G7Rc%*XZooL$M^w9g7)J zv-XKCR@Pa`7e$>Trx2N;2%5IHXsNhHN+(ZcIf~}zrn0s7WQVQWi3T7Ul^OcJjHid_ zHj;?%9B{ibM$T_PQ(}4IjSq&&$+V#>T6sm@69)&wIQ1;^qOnuJEpzjFOvNJ3r)e~v z6(Vn#l@eUQ=w)Wvp_f#V2#86UT&eYPQdGfNNhoAH6t9MHLhxe4$vB+W{u=MY0R6?P zrHGow)2UNl-hs4vTk&j?3NMr#Qyh5SrP`H)77xN{*>sg(S~(hQC((XYNK?z(<^U2e zk)*){l_;~#p?Vo)BbQcMAkQMzR#PpdYfbENRSbv-AF^o^919uF5`an%CE}fJdwz4O zYVV9eDOrK}g%Zg0LZOFnA$`V>4qSe!zT-jyB^`X!C=k(wG8`BJ2X1M{Mu=T5Bd4N; zTWn06^DAG&eZqa1Vir|DydCIzH2FXQwwpb%CN7v)I(=liQ>?g&g|eNiKdsesFOgQ< zgr(+NJEmFQNw1fI!VgX-8;cLaHcY++V_+?0jqzWhnMY9lFf+(Z;rEAe`?_%wFXs%zig(kee{LSBOWxlg{UN?siM<0 zyFqWog=6Ct3q!G|z-f{RomniPFer>UX;YPe?sZhXkAST)BSP-W>}m7De86AwS%t$o za`B6|a1)_9RTW#|l%zdz{qjR*LXfDE7PLTRg6WWihgcQWmVv{pf)a9>5M_qsoU~wF zr|+sQ(wG8f>UO|d?Y$)$b~UfgPJhx>%$*4<^qjXID>V6=HfIwGty_V&jX_5Aun#YD ziJ>t5jG;t>I2a=PBPrN`47Drp=Ueia($TR6C`(Oj>ZmrsWleKL200LsXa=X6<)HjN zOXG2(FcN)STg^YmqzPg~_MUA;9c@-`*O?LYUJGW-Kuk7?Qt_c=u#9~sA8D`U#R?_0 zDs~P!TVeysoQJTGWS9AOs6_Y3Ozaoo2Nk~3WymnU_?5kAJ}&%WUm&A&Iy3X7VT4Gc zInzGe;D%My)Jv$(FWXER?35NT@3Jj-aBeg~$52W|zri`&-hHYhjrn03S9Ky$2*5%( z^&*F7VakO-6>q_)*`mpWpnv!yOW80y#oMMEEtxe9-hV|m7)jiZ15RY~yQD^GVP!NjuEqAkF09JlZoM|h2V5uFE|TiIo^up*nt3XG%yAEY+ufio|2rc4U= zKWa9WtqKE0$Qtt3w2dBFHasU{=Co3q#oC-!ZZq09KU9@`m<#m#)IsubfZzqV4Q>e^ z*?7STk~_vF6WM11I{BRa_L~B5&?)6s=VA}Hb>qD8Ms8tBHuF2;7jx+fbJppKZ!?LSHliaxmKuSpE4j-hf8PF!a;1Rj1#>xwC zv81VW%Iej?=B;bYW=U-(ICW8bC#?i9$XI&m*LhvsljBQl{WPxl&R)AwRCk_2g1J47 z91z|gO(D2%`_H!l4VeGR@YP`;`f}wrkp(ayxG77PxI-8I)B2hdBf&!4Pjg=;R-2u< zl;qtAnw#WWVIONUFey{M(K+t+Q%1Ok=FKTgW#G3WHnelJA!RaZxz{8s6bQc}UVx7x z6lzbfC6ih;IBy@_#A8u}ikt-8X`nbG>5;@qLaHU(dz$HB1;5uW&b^q|t*xo`_|9=y zNTQ_hUn{0W9xV|hzC=Xk#ech{#Gx<9JNRs#RH^`1DNfKGK;-ex{wtdF8qfT9cBo7dnF_HJI^KNINy2pF^fd-e&f~}6#tovZ@|>q@ zvOAYaJpf(F|KWb9BS|`jZg?NnoBu9oQ|b@Rtb)6RB_KGe-xTkiuI0B0588fdw&WQv z@b_Ty0Ur|6M8mTWVQgBUJ3tNtN zKtEJ$V&h^4v&(pIqPjPW-z(|1~R!I^c!B>~HTE%zUk<8sEWtaKump8s|&3O&-@%bB^I1=HGvYsCfDM1^llpVr56g zS+kgAXh|`jcD_NK)X5!2URa&V6}USx-O~5lv5H9|pA276FJW6cjH%FuK~355p0kjM zGDKLfP%psuuagL3lM{7vaZ6`oS;UH9*WrxG=i%CGVJLq0lC!!-&=jGFcoraba&vR} z;}1V58R5~#>*K>mUkCIMC2EXPoeZy8*|KEu$?=7yh`lq1q6VECI| zc|lHvQPd73B(f&0(2okU=e-@W{qBZM?_S#Zo@o|x5XRZRdIzIY3*={iWEXd413+D5WKHgwg26UO&Ba!Kk>G`*ACrW$3E#& zGmN5E0Ci?`C8m-g0p?!Z0k_cjLa2e@&EOp+ubh*^5lBkxsy%C*eE>~k{`w_MH>m0~ zYGW&OB5nMI7tvn|r?LkD96r9*O?H;t%3^D%>5VLgWN|Tdac%!bqb!{fC42#CC%DT! z2=MV6;hZ_bI88Z}q0qQHPLZgkXt8Yxh7trC%|tFNtpVS%WH-{a1ta%w;c+<|xB!u5 zDp6Ej@zK|Dzt5rG0-p(N^)(WfSi!^MaaPgBL`J)fLBVm37fWE9g6*il-x^Y@x$@!G zbU7RX3vuaXtwoxt&`%%anU7PXk;AQ*L<6YuA{b46akkM`Cxu)#-&4)4*0!|Srf-7o zUr*AdfuO%M4g!H4?thp0t&FfiB(c6x&&oDJoyPQ42inG{`8!3o!IY_@87yZuJ;@2> zWMC?%ltn|sc8+_x^!MFiRf$=${9C?vVHkBj2vq0P5E;qxK@k8gBo9xNFUsUL+_z`6 zF@P0Lz5h?Kw!CmzwTZpyAX3w2`bt1KuaW6Gow8&MVoisU-LI`oV&UsF?uVl{-5|)! z93`!>|IL%LY-6Zqi}cSo#E7c6z}GS2d7*s>^mp8bXj3(BhmQzD$r;<{VGVCZV`7Pw zJ820jd@rx%f?FMU!&suSrxsI*+mx)7x#Fn=w`3viaGpw!FhL!OQ#Szf3=#g_&S0`f zuZI*o6bOPgtqMcKJfa;PhrQ_Iw1>Ir`aOdJkiiL4%Cv!XjLzzGbMT|PNSVU`k#P^* zfL%N3$?f=$QN-u&a!B3L0+pDOp4ABDFwbzdDVAZ%$)HVftA`Q?Iaxq)Y@dp}HY=>< zMD48bWC%yBOAxXEEP7Sg<(z>>J9z2Zf#u|I_=5G=f%o^1T>&x8|?|tdq zI~7(?skvkvqDilfE12`O+;}>AEo1t%+pk~0*!zj!N|25S`#0WN0-PEaCo&_!qV*#r zQ#wYzGuk8FrS9JT*8ZD4y_0t=_vHN>n>oBw#<3y6o4_D*xhL`3mH^PTw;}+fGf-TL z)qc$ZP};^IKgvf`F00ZTX%VsUa5!SbUvhirQv#OnO9|lS#ie;ihtI$|=4uM*SFp|{ zxucW-C-w>caZ13@vgn1|7|ERd>CMj5Z5kVG?}<$^J0NbfgTbL3dMPvekU8=8RuE!2x{$MpDjrM9YU@+4I-WfK)Bd(faZ1j7x2a2T5R~Et z0i>3A4K|ftG{z~a1<&KA_7alCxB8wuk7Qnsgk#ncO`W8d0IC<=#&#Wss2A;oYPugM zDz%B}+Jjh@*p2zRrXkZ&=SGHm?vA`UrD0(cx;ic|w_KEjL>E2>cs!nUjxEU7@qHFL zAhEOupo_V+6xfMs^4Pba4>vf-c^cO6^yM31K(E486A!_sPhGqvwUha=RPEhucK6$F z0lT(b-?u$rRL?CBRO#O$NjC$t*j>Q%L5(V81;Ci6L6&Y*HKz127o!$>5l+Wy_Mz>C zl6qqW(4@`ZWqsf#0g!i$aO3vB9^`88avSM5i1AivRkKzx*#PK4Bi6gb-CFZJ zmi}N@HtbFr(+p3>Gm_!XP!g}z8nk)PGKXb&q|YjsN`G>mQjthg*r?TbAnCf=c6rU! z&`-B83ILqHQ~DlJ^=H7lQBC{g<f z$QIJ*E8Xb)eSYy#II^NI>JKP%RRrf)H6n%GX{IOLoQtMpx)tBZ(eO!?ZNky?!?~SM zn*F2!yrX{)o{uIzq~ zo?T3`ed{&Nj%QcqR9b2>2c5GGZmJkAuV){aDd8$xSNVoDN1(cyhB8Zgf1@9t_oWK^ zTjP_A)iJHE&>eFYKEkW#+rK1dZOr)yH~^$8>xP!M;54T~rQ}aze@PpYcbCfi!ISZ8 z;`ZEr8IPaWn@DI}(`%T&j|Ws}>!|lBEpiD?j4$+_+2p|s-Nk4+kru6>w`1*@f05d_ zmn!n^WlG{nJ9eKS#Gr`D)1ZL8-B4mpygHQ&-LtfUfz+fk&3V5*I`A111Tq{dlhSz8lsS&Bm(S zMh3el)`Ly6JnsVW86vcIfli3i(8LK2`7n9%=Jo4sQAr@eAF%n!eI}a+Fl#GXO76qb zWJv3`iqlzyJ|P7~tj!H>3+~-IUDXnsPc&X!nQD2W?eKQI{U6zDu;+t+9ymLkA(@%~ z5o7ZMgNRP8R{N}ic98p-Hm8W*+qdtyVvqkK#%-XolIZPP%V6VSq~#^)KBN+JAIU^0 z(_~`W=(Y-#5Mnm{U*f9RGyJFk9PS>S1}^?$ z4KFi|jBGkAI3?)qcj4|uJJw<9J1@3=+J2|k+14+kP!oHVB~V;TNiK^Hx@{3Z!E~Hw zl=39Iu@1vpRlVDP{G4GKYRbc6SPdImY*TkugvDbX??xl*a^$h$1n%r^z5bJjqoLq% ztTbGfcZ1iu(~XIDehF+s!U@e=ulp$R$W4Asdf5ghf1 z*VuNZ75lW8@;nSCn7~od;7Jm_NGx~_NEgs6V8hn)J>dgVAIkc|=LFC`mreQ=L6L1= zk~7nh7|7wF@N-P7u}?srxre6Ti45W?HA!D5KUcR2Gk(=l;b{>lCX+l`%yb?q`AGJI zDH(L*g#aLAUHAG6kV1~PYF7e*bf=w%n~&7QXleW5^4c@WHW~)@R+rI&Fg=DRXOntt zlbmdD&Z!>P0>X^maSfhJXjBKL0zXau;QZqSX8Xx!Xy|1)a&hgq`cAo~Y)>Yycb;s& zo2E4tMs(V$MOPoTpZ;a%Rs0MN2$OKm6!ijLJ>PlReiq7m&bo}FE6YTkO!%#Z2;vVc zokYlr`qvFpPonASIq}?hvS8q+ffhNF5FU9uNfp8{#WrLx&>WRwvElVzTI(bruI{xbN6LE(MY$x>9Cx2FbTT?%q3#fkI|Wk09= zOO|NAp3I$8@B;iRi`7-D&dlH{>{DHX?9QDI5)H*%Ie`e631U%kkz-EvV&W)@8F6#F z>+D*-X?v%(NEG7=DFHKN{Znp1siTsPh(BW5_JyuFs{q)wZv+v)IAP_``L9R{y2nPq zNEFIcYz35=m&hMMKIIqFb~jVI^$#{h`Z^X+#U4&0Z0DY?>dk~MQ7)JM%@jrd|voCdKqql$AcPPzZ2AdichYapd z@0RDeL~~U}Et%SGSmvssn2kk3@syTg0}JYiDeKe|NsI&us8V~Y-zpm+tOa&B_q+V&-mZ4;;%;l?1CGAhIOJKAZ_t)Z zx>@y>R9g&!xReI6SV!%psVr* z{c{Mzg5Wh1Q7=iw#f47F3f4#bzh1{jVUi$fW6$`|Sxc(-sT7DAZN3s97aOpioMuH> z;{1+esE(bbmn0#Pb*0Wg1b74CBq@fJ5<4_ATtc^<#ncE0Q}`xID5m_MQj3)<=Nkkd z0mat7m$B|>aL(MWqCdP|G(VpFte>!v2>^!rk=DEU?p$e?H_94QkVeg{q)cC^zrOh% zy%vX&Q&ha&ZS={6wA>t|%t`C$BX<4#TQ8y!8NzkI zFpyU8gjGk@x|B=0IKj-{M|zg-U)OoTSK?l7wML|MwEIEBFl|eTZk(urAiSKj@cMHW zhw5*Q4irqJv@CUMVyl%Y8LXaJ7Q%s?W%1}c?q#2DII-qMo*(phW1#!_hn0vRa6NcY zbc{9UHUXk5zc>NQD0IYkGz{sagCQw&6jQ4NVwc0$Mv?yH>8qZ|6xsCk^(}di>O=Q2 z5rU(=i6Wp3PY#3H!t7;GC2-ATmK?-B!HzSDktl=?Cq`tfdmJ zd_C!{i-yQzYn%~WKMvg|RW~|x>cAm)P%OV-T(9SOox_{~`Gu3&qmPfWqT#{W1LcaT zYVUyveEI3?*#l%gD}eaqo2C|yBZC|d>CT(PEl%B?QX4<&5b%kEKXcHIIjBu==DYYn zQcV;A{DCM4Uag14LTao;n^FMbu=r&gFNWdAYpt>^Bw-ZFWQJ0?#oWf)eZU0!vs#do(} zNIYG$8b9rI%{{zk#qsV|cy08cz5R6WtMvoPqgan$yl%n%&W}0(#gpDseR7w6n~tr% zJ3g-s(oTy7u!Lwhs~D4-YjSI*+zif33%(Da1NAV90R-VF=5ZL6-iUwIsIeu-cShyw z+0nzgA;!tGW_H5(H3Xs5NOJN{cRdD^>ndT* zzk(iKfOa78D8*YOxvic(KJqRyP-^BYf+#$5jhaMfSo7=MVHL_AO&n?5CSE(MW3aO7 zYRh-fV;K1JJV}^(PwskO#foIzdG1NW`N^+A;6`@6#z^ZiukrMMi}Lvz+Pg7%vs3QE zu+uCvHos48 zOs%11_}A!X5$Q%%rLHEUm5p@8zI`-WHB^7o$$OL?7R&>F5JA`)Wxi7mELREt>QRfr z6b>wtkuGUg?>F41R~1&nC>gBB9S=++5p1z~hV60Wb^dp#SdtS}-bJ?P;Z0#7u$x_T z5&zT(KF(3b=&@ko-g@=j_6qX3Ro9{-hXtkV3wx%jK_IlvCoHrEZ#2S08Hd&yxdKEX zbcSN({g9&(ZN6zjTuPX>#{(u;ex#kH$VQhh7|PrRdMyU~O)k>==h~X26#ueqa)8;N z=*Bn~A~BJjFPG#-OCgJ}HU}{vk{gm4wC&jC@J1NsS#cc+=89Niz`BcIR@%~ZI5BL} z+%sP|r^PA9!UI9WAeST&BSFUiHpX@Ju#I+J2}*Z2i@8(-0lscvU)b;EG@I~(vDiq{ zNPdf!#v}YMNE|uYE^^B(so@+<=u*xWFvAuFIvOz*lMWb!c1xP3T4kMn2{YCULsIG< zPtQRPvfo<{G2)>+Az?MERFoWhz^Z$YjCFFD=8+6O<6QMfhJuUB8C-n!X7|ays!$zW z6jHOt6t{MtGADVon)KG|9Tla<3hu-mKTedOLf-1iB5^mjgOa0Wpu@(#o76VuPf%ix zdva^C(TH%@C8m)=pm~&nX_=SrW5pDwWRPZ1x_&_d6=PbRmv~AQd$=b!0aw4C+LM5B zIglc_x?H=Jz^L=fVqQ9_6t(tJSWq?&euIeMRtEMIG8zg@8(qazVy7(}y6(ySUSK1qMaj+>m=E9@lCSJ(%It(aRZcv?b)igzr zc8R%ZSrl&%bKupXD7>^hS$MrordUkNWx+M!!z`F#s6t4JMS>7jRVRb%JdyVjUw< zrCu>V(@-4<*Gr4kp?ibX3_Og=Y;Z6%jGTQM^v!ysjQ^;8s*N(cHRakTb6oxS_?O0SihTPOYAG zrR`j;FE+Dk-_UPy0hwOP`w%<^FH|MWKEaLMrFW2)&P(`eSxQyJ;kh|ZEV-DF6C@Vj zH<1GQ=Bbgyhz8XxrKKfW4UIb^>9QM#7y?7rH5=ItLc1UBmrP9dtS4r%mB0<~5mh^1 z-JBlYa&I}GbhMOR_Yz}FG|k)aS{4SuEY;eC@$&+SddB(Kd#Hoe@aiyT^8RhjX&s|wbEviQMS#ie8xCVMo?q!{V~ zs>U4{_0?qWCuJhO*me6vj8A5p}wuEXs)SMaTlywI=^Q-62vCLadC!$ae7FjPIU+q zAg614CqJL++RYFaPyX>ASvW?BlBv?Bv=mu;q`O`Wn1YaDq$#UmI1RFqLEA<<%Wj&3 zd*P(@+H7p+F8OF+axay)KVYc_!dV1!of>{B6u8)q6%A~s{Eo(Uh$%^U{(pF_m*1{_fjw<87K!WUWTYSgI@&P0#;?N{P34}mS zRjMp4lP<5G?UbXp#s#O>*SAtM2DwpVLMrLSCJxZCAvyCt;bzbHjvRzxa;`U1IE zvIsyPGhX!-jLynQ>qAV+wFo?@dX?UWB@s7XLe2!lI){5d)x1x zKYzFP=Gn6_lYDCqbI|CN8-OIKI;I=`{9L1R;UFWAM^|o->mRv}1z2=_oy%_4D>nVl+=qv6yUmoIRirCkEIJ;IxmWD2IYe&g6xdoR+%SbKNJ>OyPj z;JtN#sAHsv)(fkjj}=5E;*oz9fL|I1t;Pa!QnP@hF%au8&2_A zsa*zWeFKA^eSfK8=LKJ5_FrO?d$@$U6B>1cHp3=x)#>Etkk}H>if194@wY6S>60&; z$xAyq_=^-Vt}YDB8l`My#8Pz^xIv42G78yrN@Fst{10X=VXAYiMd?k?Tii7&eK+DF zxa#-tJ-5Z5pTC`aAD~w-?&>1-gk(z>YmvZXly?05VS9f5@qk{7wYZ2z>3MR4|0qf9 z8)4LKGUP?dDhreF6WkvoEb(-LdL0F25Kq=iXk-A!IQ}7@lAu@IbR@GBeI&;~bXKgg zglx9546w^ON*6-eDSxYHCUFlL_)owq4TGqLi0L+ZTsf|-1WGm=e^UR%+h6MF;VU8B z_El>11(NFrr<48sflTiacEfii&jkP?8bB{phsO`oQ)T=DxD*RZFr_(PMx*3LZSXK2 zsTSWkHsyH2V+Pp+4yfvD^a^Cu^OiYXu;}u=W=<8u!n$(|%WRlQfi3vx#uTxImG*Lo7?vcE`WJr(>c$5- z2WF=kz#x@jVSmCic+hQBn{syAsMLvzQ*mo@H_pm|&&=t^Tjncgjds!)W?!-C>B}r7 zaLhHBYBB*|l?Lcik6M!safIEEG@dxyGMFPPuDLK`GTU#mP2W?7#W~^lohtYw>E}LK zc27hB{Jp%9AW?+HZ#MBrG2-P&%e16p*2fc`G_j43n2(JPQ;8)hnMcT69xuQ$Qj&Y; z)+&uJ6Wn;lPfw?sU1xy~253$b;zdXF!kSVo)#<@OTZ~p(*i57`6BcGbrXHL7eu)W! zY~^S!_DM}QRb4zla?T-8_+uw8r8g2N07JkBCYX2-iUjosr#Y@vnW)7T zNL6S>0s$=qOmcA_GEO1AWc4YH)9a7gQT(dhtF{V zz~oBF)8X!dQm9ybsCTUm;^e5Jhw1fJCXUjA@$nIx#tLPt`V+=HPsZm+df^ z+-8dOkE+Fs5(6$%lL+>Zz@=UI?w-6!JVKJ%bx5ZxU{LNeYY6p@`=s%KFr#r>a6&+O z0%D34a@!*gXj95Lm+D6e4K1&8VIzBnjdbqiZ-JAFn83OCIxH|6l0d;#gc}|=cKwwy ztMrSKS+hI7Ql88-47j;>VB~EJN%R)Yo?ajn$NV_`MOqIIHoD z_i_Wv2pd2dWOOnxjI}44-^h3m_eA)ddgZ2q(dCWgi5bF@-K5vjYhf=cqbc9TOp0s} zH3E@&v2~t8z;2BJN)?1lp_k#sR<_1I{jRg;?UY&OV0FrS-2N65)o3O$xG52hIgKr25lKR}`EZAg>VvSCvQ=y_USSJY}1pAhggulq$HK@5g_Y!4OyO{!h|txM%6eV-#>?C1HOr@%yNBEU9l6g zKb$i|;~rDh=2t!4CHG_F2>P)^YxwimiJD+ouIRpt=^Co_EM5^;)6GS=B_XSFUF`uV zq_JzHv&}cd{>XxL0lop64NASG2w+6|xp?2TqpCG%>m5^8mY8i6y5^q7NEP@wnyeuf zSAC1FM9xvEdv_FOJGo|SXyZ8?Kh4mmDVWLIMeWh1l~nALMKD`IO^qjyP?kBt9Ei-Y z#3RpSU6-MZ@Q0~M(G-T&1igtr5!+kSXVXnm&^i7kqpvhoa zjKV=ZTd*OlWYsxQ{1*GgIJK(xBsmQFnz^ei$AjUFzp!hXk~C^G-+dvOfvFFz~`80Fx6>jAq-|K zp-10s$W7V04ue8QX$L+D#iT>-nFE1`$ZXQ!F{?hcy*UJMG&M4^3WG4eb*E!tV-5nB z8?=;J({&k*L5tJ7#kkRKh@#~GfNMguGR!_44dzYHN4*G+R=Y>v@~tLN(Pl(H(M9+1 z6QQ>LNqFm4>0vtsaRKR zVJIgm&Ee41gO8l6tAme~L=FdX$VgC9&4<>Pu)J9qn}aN;@VLR)rcN=loOdcn+(rt% z+Fkd~k$1yNmEm=hPUU;n+dDsEka5!?H<|}3-F_ZPXD70Qi8~71`TDPf-?{TU;KX&c z4N=Oc60v>jdsMjIUgs~|AJFJt{Df=0r@HofHu;EjxkT|{t&(=g%@#A?pxUm<{wI9r z70^WIQ$Kq2DBc)-0R`8iZG{b;>PmCZKKlB38Yyz8F^Q}`tozFSCE9&4AIt`Nz8O0j zk@mNFTfGdefK(B5F@wv9-$54A{2050}THpc%KgcFo{Pd?HnCwU$M<1-2~dk9SVNc44cvxB`i zuU^>>v#_xKiLT}>_zf=VPrKVsdF{^b{`ODXulHD}a+T-{72ia>OhXz}mS;o8I)+ z_dwfD9*v?2`g-R}c#@JOC;|B=Qf&4Fgi*BOziyNKl+|WzFovRR*SwRroy%VKNJv!!VNO$uazW_6*|#8xkp&B2u;?I* zZNY}rAg~ey4-z**Z7^d$k!DRS76LA=ZE#B(L#1{QjdYnOaTky|>;_3KnbsPRsnp7x z--1YKMl!xuiW#=3dAM4c*;m30ol+)>92|`(SjegQ_lUj`5@=CbSuZNrgJbWQl1>;? z1gIH{ZGNr_DW4YEY2OEGXMnOQWx=wfQ7}9b2V>=UfL1Zke97S#P27$`Ln!7rH0Bu` zI^|UPxg>CLClC~MO!ZB%CuoVS()0n}M;{ba^l}cfki($Gg*%2lYQ&6flQAziI%tbA zkmm$*ksR%Mm(ED-|MEKGq5ner&x9$PLopN^q}vrtfU#7-OuuY-Rr@jBjO4~U(k{af zE!N3>ZCi6(>LoWNuGST6L}grO@fc2^8IWAItwbetkNU+&HE7q&Fkhuq~ zENY?yFHuO)iLkhJat|Aj=(t9olicPxkBjv4LW4;nSX`ys2o=`>fT>Lv?>qJD?h_Vg zvL%zh3qDC8+A=Zk@BvPie-Lply{!<5#o#Os+7{yx(URLo2|ucqs*-= zQG}fOPKF$TL@HZIOHPP+z{vtDN{+@=tRKH{kINB;@3Ks~(WTKtmPL>EC_0fM zZa@4fK@MLozC5hOF@~whNfUD!n&PvxOO+7CO}q-Pi1Tff2P)k>9>Qt}b~p=R8S5^I zJP*FXSW5Ag=8b|&h~VRN7OD7#?MkfUni)@ss2u~t1IZr-TbA7wnnl&g%gab3hE`@Z z)kB?GjgY?AthU}RcK|kpU#PE(C=#7bWKt4?%aXcwi2t@h%w1-yoY?kjt;-i)fNjqk z&r2J~)G(eM=V9MytD@Yno8wd6tE0ma_F9;Y%ZqL@s7N<6{c?5jD?h=7koC+TS)bBO zX=P8l5B!Zsx;(tN{c@8d#iev^zNhTl8|6;?>%Xy=MCKPJ-|o+@Z{8Vy{q~=@zFNMX z8tVvjY*&Ku=FGVG{s$9lncN@NjP2ccnw7>p#`ZNEILalG7d*3ohYlkH2TwfCH!8IS! zo;kVE6VAPc%5dDGd@GL=^W zbynyP2Me+dX?#Ho?ZWXSO;YM&q6xIHz$E7i7s&8Xa9b?t_wnNJkyJ~jqG>Z-mP_Ri z!pB-zS#f{7WLYpj%@r`EV3VPrl^w9)eWX`A zDWEsv0i)mA!{2=;$RgXw--yQgDp_4j(YZp9jsAX$)CBjY;gMwP4zn#(AqgGG78qLy zT^aC6(R3=~P$$PgF)>MbrBM%6#}~q&ZsvXxomQHY$F%=GH01l`J}SYmQLH)Fd*mlRjy+xQ|QjNI)f^@<=wZfOCeCAh@x}ddzzDN zqZW$d;UYQOd=TLC6wgYBp5nUHT`oK=;SVA%tly!(fiScWa8d+p zQv#-F#DgiFUCV{;bEB+iz~9$5*i6xH}W{+UE?g-6ngw@POc$yiB7G)WGesVH2 zlGt;GsuK>Bu4}B!d##>oqij}=A;zN2<*0n*`)C5_1P&S8&Sy$*vRMrFUHDcun+&XW z#ib%DPKI(USHa>I_NaoY!D3W5M1$*c08S?v&T*{hGA>jm$JV|=hGs0H@Nj%5z0i9A z7`>iA6TuSLg%64hfr7P(DVzyjlv!okcVrS3S(p4rTgNC3q9bsuR20?x;N?0&g9XPH zH=b0`|LEofFIv!%y=ebZp-Isbu4Fq+INHz!jYk=iSadpidiifOXUf}r^zfxT#0?jP zJ5+`>7|-IRsDuJn?haijlsPy}{Kga#PfDPueUv1!vSrATi=aMrLs0Mb{QM#LKe{a> zGAVQBqx@6KhL;|iRFZ^(R@a2Dj znctFotZO($-gSel7@YYPe=$Vcv~cD#aeR&^C5(wQ3rOg(R+tI1US6eR{Y2Nn65zcUl3opLU!P*P;6#7GJZex}ZYYxT5QvoFqtodvg(vZ-{* z;5AO4GBe10>}O;&wx2F%mA;5P67}MTZPB$K6PF=7Ds&a5%9kWmV**-tIdbHyt{)gFS0l9b|!+zPXCoNiC=70A`U0UZb+JxSqtq z*@s*17EmE9Kg@gyhsC?J&{2{789Q|yxAsMWLYaIkfL!cyZTn#(h|Wkz1Nbos>Oe?t zx%w|#aa$=L6W(@9fS|8XEl?-eZ6KxS9*l|azVJ*YhN_oMS%m}R$vU*AV)P=`FFsAw zN0=$~tV2Jx);Z5cs*Y6NXWQC~3Y?b29N#HB3gL6o1_^p(DGqF`XT&}Y6dxxba5rD{ zJPsnUGF47V5Rm(EaSLP#wUR?r#fGhkLMm>xd?(dJCa1m|Xsp$qC24^^5%Kr2E087= zSQl30y0e7njA!~{vH$$#dQ5?Nw#)VG9K*pIqnjkKh5GBt{wtU25qQXJ%8ZHNdNcYa z5_z~KVVL&cxKgj(ALg^7s6z_UwEW-=Ro`db((0lyuxk5E7Xi)xzjle9)or^3g?(_z z9dBsz)r(o38cnNLC8@g0^U#p%a~EUWy|FKJdyz_p>fGIV2(NhElCinD*A18EA-_hK z=JEF5dRyrilGH4EXseNz<{3+*ENOXkn*}5n6@UA(Jl=iJyMn`pmnAUC8Ni#kOHP+U zNg}islu^mmrNv3u-tlibjZXqm6(>ZQ<9 z&f~($lb~w7`>+dmeXEYr(kKbD@c1#ZG8RV28J+z$=aDl$BZAi>XUfW0%dCtYE?C)l zva?Sf9b0*)1&nJZeN7Rz?#o?DO-W;*iTx)8@e<*|Lbrt$OEDf zhlEhOoCca!gcn(3#0g?aYkPzOl6FrQZ*+!8XaSp&!Kb+@-Uw-Itf*)Xxj;gw4%2`+X3&vNv)!nL3@p|QW^i=s?%e8Y zc_gs5^Ax>8;~_C`pa000P*-A;!aM90bgNA!Q>Q4Jf zu(GN^Rd{8;xsVWz2|R!a3YkqApST7lHL&o$tb(W#GzuyTu#ujMFF+3d$UPvxpm~r( z8P|!}B|th!**PrRu$xha*tSX)Ape$>N2WI@`9_&KFIf{}mwPh!#~;~d_Gy+}*q^b;Bl6zHCKdlNVdeLI#lJm- z(V>NM`D0P4DHUhiZ_-D2{kJ!`t~wAvE*EwPv2KQhFm%oCa$>){N57X07e>cR3YpB#mLjiFK0cfSd?cDtCZbG~P*&@OIEzuNsP@>C zFj$tC2*p|#8Fw%uS!W)x+m>d~z$`RE5n)m(Pq?C1TE~x&PCIx$z=&mLSO9VmNV_Nk z-NCIn6C?6~jw~BsQ$;)^V(?L|N?lD6W?8#x6Ok5JX_qJYR_wG{AkOtlhK^c5IC>lZ5aX7&X zR1F)`HB!OeX%j&zg55?+D&(?vi7t@7%q3lXi=?@?`*smgkft;UF%UfWA2VE1Xoor? z3MVnsd)=+};8m-+u9;!z%E@e3Ku|f;_xHQrS&mIcv3`EI_(@$wC zj_4ud?yQ$|J?5LW@xV*rox6UD?iXC8y%g*0Sw58*R?A}9gD_HBiU-E`WigD0vT zyot`zK{eP4M@={$&~-UqfklS!~Tzo}uG1gd?r zxLc8BY~cdQ)-8R9=$^fnfPwGIVjrJ0h8>n~2dOG#gJ^?qpyF^3iAF7gHbErzMJN8I z3}<>9md7@s<)@6L`J8P!3gDr@^ng_;RJ1h_MT*v?@CAzrJ^ZnWalB}~#OZ~8yuAV4 zg5l=tqu^*skWMUT90(1;S=n@ons!$Smtk6zpszRaxJis$wOb>pBxuok7-2y}EdmZX zL?ukTWXJfJ`ti%xCJd#;3G2EPsY z>?Bnm8lpeeQ=T&Q{3_?VnF^bT+uiaEcFU2>|G2^Zs7( z5j+?|er~_)f2x_alkRkwW@Q4*2@g0SVyz)HLh=n#15W|@B?d-n#Fq^&W^y4l!iBFx zn_|ON6Za?^&3mXku`@@}#kCeh+N`}>mBSdFBm03KUQQM`GT`ARfu7Zb*<1!*nG2pU^U*4dp|DqRGdhHmXQ{Qg5Xp9fvx)@H66aF$=78dABX1O=)OApFYO=_^znRC* z_VzaK-MiFXPnos*bKMGMtwtshRjsi*`)2PIHTHmSU;%Ok5b!dFz-u2KJlySp9)U)?2fJ!7il!%UhogC}iVR|hxSH6b zS6(oyBHPboO;t0ZS2fH+#0mF18Uhi?DVGk@R{;Ta&E@jVZ zJgwhDrk*F6ZNFhLT&cg)$^W5mE&#`>WaG%?2NNlBK#rUHdllg;JP9 z#J;3w4}*%~Mq9`bnG_j9msQcdE$n2ScP)$T*4BYSC?{<{)PD8iBhF?b)AKuzsn5>C z!rj&@phL_p)+II<+_HXlaIJn8W_|NyEISy~1e+BJ?w2pwlw*LOKgQ|6 zB_EWV{Hlehq?D$WR#@5qh{h077p~1z+}n;Z2Mie%|J}un>3C|h5DjG`$0HvnFET8R zg1@1E*g4Tb5|kEo^`DHb-MCo7GJ&(x9xoB!1=k9ZWk+-pB`>e+Iy9ue6GG`C3VvSd z$w>Cassf|v-N>$niALyXeB5F7=epno_>i~(qNp)@v+>IEG zIg#Nq+5eZc2qhHtwJayB7^BimZPV6$5@vK|QST9<*5Y)ECd^1f21wpra^XOfzf&tk zA>}5rByg6j?eo~s?2EjN(+^jXuZqWE-$C=`5*&00y&Y_o#ne=q+*xx5#&H34gbC6G1I7|gK$cdQCk?xY!-NS^&23CZ zr_%_Z7_uA@`~)Xc#d>>>0Phc7oxsi-5IVlS;&FM@rLPU0NlBpgC1F%R?w=lF(2$Wa zWYSuV-N&Vboq0F&3s=xqB1UU2s^!{pWH?_ZGyV6IUIo74?%AC|*c=PR$L%9U<`Kja zU04;Qm60b>4f){qEV|Jxz~&;J*z|X5E0-xLn1`$Q42J08DrJaG7fBJ5bo+UHS=d98 z^nTj^1BwxCvGw}(R%9Um3ByuswX@4iU4omRhrPKUf9bX{E)=7aOf>OXS{4-@1b~AB zv4Qg%6L%pQo#$ghGY~mB0E3sL0O*SI&})S{Ve*I0&$XeNR}QaeaoOG}f{@eHEm&OX z&2&X^gSF~r&BTCX@|_M?7blU;%L_1|&wP+56Aa_T?F#bX#^&=2ov5a<#`c_Z?_zNw z-I1hmXI(BpHprgqIc$c-Q0)j7_>~9WDruwz{YfA}L#PGJ#wr$z&|(i12N~q(Bwi@# z)-*8Ylt{pbd{oA|b%hSE4w_1Vv{x;Mne8ar6KuOWrC&MpaRY9H{cXk(Pp6%L&u&o# z#j=q7rHjI3jK@u2sx09YwT+Ucn2Jw*Aea%W_c_xtET(Jl%sSQnzMX6=KJ=+UG$JRi z*q83^r^8940f*Xc%K}x2e$u?q7CD!5Fcgc@Tv^u=0kFN~jqmMfF;^4KIW*ix0tKv;kmhz6O^wc6OKa3a_-e2*a$&Zm8{H*oE12>AMTVw} zzUltg#FpAfBDIZ03O!!nd(r0D#Wnt-Nass&fRWLgB15 z+(?{bom1!uumCotU#KZAG~|UgyiidSN$7>wf4+7SkItcLltPu33nZh6sv$K>W(9G_ zm)=dhUi;~689JQHile0&P(=9AQ;O-$+!FV8KO?d7;q%#-j}#|4jJKu4=ko~_tZAw~ z=7hUG3HcsRsSz_nFD6)-w#;D+ejx}+ic^r7 z;}aQ}XrW~oZa}~L`wKFmKdfoBNa1%JFcCl)jJ%DxOf#^d#%eNgN`%&^a@$&&K!!pX z?_@}jiQ@3Q1#mW(WIPW*>J?0=HqS{e2+;S_S2u6I2yYwH*yytgP>A9(Pjqz;KC7C& z{x(P|zyCMh1)`U{v>_g(WjBeA?l6M~Qe5p9-P{yo%A4ELC%Xc2WorrmwbD z#9#fOtTt8J|7!c~WMy#?&LtR10Lr^1SF5B==C6_WJx$h7}*0btN z_H+c44K%uB{8B1i5{Be<4aatbF^LVbC8N>mePF9T+INkhgYXIjl&FM11VtyJ~#E(-A`f*6otxsVfxa3{rUVoXO~MW9q=jBeXf<)C_(oQ#O6`Vm1KcPb zXv5mtqIJ|yIO1pI^S&-PcxZ633nwBLwYg4ys^vqT?TtsNa#zLK^}} zt#I)bRQxjgmH*~)R9T|+$axb%5$xlRW>#N0GnNqkk<(WdUAooHmhh8> zaQI9pNf(dXO;>PHnvEHic;f!3j6KQ5QL4IXeCu@IEu0oj`P%4`W?OlB_6!CViPMat z6QBVYsOIwEl%t$xvH>J?&?vJkHv@ahwf#+-CFFL>M@=F*B6e2zpsPMoDa9_x$Qh98 zqHA(J6I@!8tV)ivG%jl00GyGmqh`cMbA;Iq5BOgLZdh~#-xuWF;>Lf zi0D9BMlG`KbzwN}hMd(JKCH25?STy)^G~QA+guhg978Cox#aS7 z>gz0K?41*HHg{BrTAiG7iEY6Z9>8h$>ba6p0Cpat%MH<6piU?qC4O+sbW@u(UF~uR zA-)5_R#V2Hfentd>MtZS|8h!~S#~;;JK58Fue!p>v{jO_%dC-Ie?y=$&4>tuePfYr z=sWFhl}-+*qIkSd@i9%=O|_+fbV+K-a-}gtP}{#E3*t0o)P2=;Y=X&CdD$*)gTbt3 znKTeIjiKQ{qTZP##2p?Wg8}PXme@HRWJ%10Va@B_bwm)vVDI^KPSjX2+@oNFJwyG= z!S}gys)kOe8LCEd4B6wzaIrZtX+fp&*<(3@^=tS5HPgCu9RrceIy{K#5DrW^A`&(a z64YdO4HKAlLt-p`J5@M-MPdRPWajEI)Rn%d*3G!7$m2Nal|Xe7tvZq#CSWip=cNjp z!}LIu1vdCadl5l`fSt}@8#fGPyO2&N6WuQ>Nplt5`B~0G{(s8Ll~S`c99SRV@v~Us zI`u^prcq{b9bOLR7bU_)0;;THuYJ)0q0;AP!kV}VMBz&sw#;3 zj0=}c3Cr>;N$^xHE$ySRV>Sl?L_tmjxtI?rbahaNoowb_Ko;TwW)_hGoqqQ^PBE4E zQy2}rzA-~%zCt%nHzIlD8 ze4ISEWkuUiiy%pa?~m>aB+yKBX+Ds^XBatsAc4GBu1WiE%X@_?*swee1|Kc^`-hd*Q%~G88j9q0#xP03F>cc{(}qpJF;hWElTW4Q%7xb2*3bLAFb6NCYZ zbpFz*2<9^I&jl>c;gkKfg`X?iGhmAdva%5FN^q@!=g$=z1lF#kP{HtTjq^)=Deu5O zh-_+JobBnsjYg**zEs7V&RCNmtVn`E$$6SNRf^c>;#OhKBD%@OaWWm)7`6rC2zg0C zBC3RBqj5k~3-IO9?Pp0*C1rJ@IjZfUB=Sg`B({*HCt1!NynK>cuN@JZ=&X3y0*(7# z^|0*bg5KGVPnRvj*jlPZGw?$@b8A=K{b**q zQ5d$?C1)RTX{@e@oxJHlRPd%E-Oc{xEY|rkgiclu?7X< zDQ8*_jVnj^lY{&kw>x9K^PQQ3O2^x`MaEnPR88Mc5~62dp&& zteAU?5s4N$dd#Enujma_xR)-GJ{B&OVNTsHm-_B?gWZ59Q~98rkHS)3fL!vNu_-)BsF!b8Ey&Kn;fxG7?s{*?4|)dWm3G zN()l%S5c^)-#NZ^2j9lm5v$NfZ8-I`JD~P`L>nBC9tB5fHqn`mRlP!XFq%co^OCTV zMY*t4&E3he0Y?}fU|_UT(+L9NY>CN&j_qnzBY(%boU~_5l6hfxE-WoN4^=^;!%o@~ z7V|fA(pE+N`n)XQj_@5n6|W>XT0df1^M^zRL8+CRvKz{^33GiFJ_lxDeckp4sU@hw zpUZ?^nns47{K6QMxFE9%bp-*V&xkIFBYwxna=hgOWYQ)EhwK;Tc-@Q=hwbkzHhv3X36?(R}pcG#@stX%IJL&J2~eX;*NKsm@v#RFo%h+3mcI6+EO z-;%vzUxd6XD{84KQ}Qjwev?eFLl&wHLw-`yqbyrRm{Tq_ z&sTD&Q$u74>6S76lQPs~xg;u&;Z~o^(5lnR(o?n~ve9DrMitzqOO@TO7ZkZziiTwz zbs9;ic>SKvU;@iWlV>VSAcWz26GqW&9jrd)XYr@wc@C^G(-lENc89CS%amoWy0>Q7 zFDG?8F`8&qPnHGV!ycWQH}`t!u-;|jrWQ`NCTEE z)e5r6Z5GTi_C(g=u?LCfG4wT;=Wsof4F$k*oONZn3#h@o8%$cw=)aFcbESq9z7$j1 zkqfu})L@qUx}z5d#n+nfHpED7TQC6o9M@@h_nMQ>#=*6{5^)mG_lf8_V!~#{|hFh~Obj7qS70>MQE)ThF^Gv{epk4z1rA6Fk@_PNX}TdG-fR+$z>x`wY+>4>^>l8>~dT!sTbO6o3dH{ zERBbvIkqqDP2!ulo;2pjk}aK2tPARfsGNj7<6#u zNzhp~0~+H(%}cs1B_+GMC9@WP4i5igMbRRW^3 zu#VK6O&o^!P{8Es>h`h#4UTuLRa7PI%#I>{qTB)voYE1L^TOtgAh@+dT^ubH6XFN? zt^)70HjeN}gsa=kgnb$+7uhQ@%LoAko<0Q7#B37nW({5>o`O7biOwve3~{36lA)Mh zV<<^{!SzB~d7iUt1)Z#r)@z=?Ysdp=0`%RsJ%l|Ts@UIzj0gZ=KAa=(~ z;J6Xz^6EC7-e7D_7J;FhC9MXGFx^GOP!Q`8$jzN}|5eg~=23b+ z!|v}K?iLDIwP!Kk$~^P zjkz)S%O`43&lPwD99H{CS?55@VTOqv_8Ch@TrSUYLx zaOX?L4n0lFzK{hhL}Za*oxj3cB86`dFq}ExJ9{<=AU9!veJ%Al#P6-FQ&Zp_ZIQsDB3B26NqcCiPUIU|_` z8-#G<<=#e~Ix4gk4v>_uhse4V$=kZbgTgo|zZ5^=-Pve^G-Al9x_CxTzSEv_*@GLb z%py)EE2vOT2&FDLNAIroEy1bc4wdArl3_8+E-+|%3>xVKM81!nC{FPyEz40ZD%&RT-v>Ql|Mr4pd1m2* zt%ZDZqR&_YJko=13iAQ)Jw~S8EzO5?=IbS5mVw98E$H+QX;HHR!B|GQA?L{wiFxL z4r8TDX&bcLa&HP7u2UCQw{{G24EU)>hw(Td$N{cxCjJ@$T@^}1e3PLfylLwIU6Nwk zV#{N-3`Gk1g4*H%i%BLjZxAFbR+z7DU8HXX|8M6Nw(J+4$}1!+rQqOXk)p?s#C=%i zEW0=*v+-t^PF@-@eGGe-!P7h$X5*cJl87o!Yy)9KFF7eKOGA-I3eL{;s-Uz6u(4`& zz@1B6Nx2r}8@O&Kx^zaRBSyr+64n9a)YJjhZo<*A78J2Hs`Lf>{&CV$Ph#Uwcyaf;HJvmZ-nn zL|7yv%Oej{85nB1tlUqA$qmV5(=W~_Q~Wz41O#t0hqRgQg0P1htirzb5weL2LCDi8 zQG^avWlP6tdQns?N~KvU9dnL^dWmjpz8$!@gx&*eyp>sFkb6%Ur$OXEpeg#(xq3X$ zJ0h^~8x$i=87Uey1SS|weq;%FCmll~byJAOeX?-gFSqDLOwjI{=wYk=DaUg0j zm8~j!46vGA2D~OxQU?{4^OuD8ft%G7WZF1T6IWQ-ZTmB9tsg2=Vrj!@_7WwrBuYjx zsmzO!mjrF)i!JN$7ikft-Wty>j$vSDBiUssWV&g9xv4c4DGQ^bSy<^ zrQ!nLk|IQJFvxv(k?oFZaAb!{&qr`dJSj8DK#Yml_~mWf&4)%J`ekcAK*?xC!iQOa z3&n~RV83Jq@4Z&uu`;GM0fT9FUuHG*Usq)0+TL}sAyTVWP0C~~l_PUsEx1AsRQ_-TjM3V3E_-z%r{yF93k>^FQ_}y7 z9b~7lx7jgW0d<^ZU<7Stt-G_LqkBc$jk-xnZ9w)VC7m|J|JHK5JSHXh-{pR$y&Q=; z9OE;w1rCXhuIoLe;)ybwZ*5JaqwEGkx?BgL3Oq%$bLa~bz#`GtEIOrzTLekTQ({c;u#<(vSmGP)GuRPTEC4AR13 ztF|3}mBDY{K3?7^oM7kuOE48`Ts#5Tknko^#&nYyYkIJ}u#$XgV{1Sv? zKfNuLC|=DWgf#4WC%S^kFa!y--Lh#0SQ(pJ)`^^8*#P>IxssO;F?L^U{h}+k_CzCX zL`$h-URY373w?UA^oUzWeQhRC$g-G`QCa*gZ9=uCD0_;RNb8b?)?OzjcSV9m;K|}A zyI;*=sc?>xS~D&GK#LY^$wfO-e&1``hdJk3>Da_~7UZ94f8(lQ*qzT=6vB~s5nz@_jmqPG7Sq)t3zlIr&YOR=HxT1fq)=5vAYm}*I&t&`YhWh_v;Ah z$h*z=4CEBC;iQ`TAP;OGClEQvuloe~wEl;URfd=$c!GndljJWsVNV!ot`iUxjO2XT zdYKI$(3|thUID~$BNA88_-AO9mSA^mvkH7yaj!T(*1sp5oP33Stz&hrtrc^_ z@ZlkE?j!oFm{%wHbSn~n!M>QPtEucrJuNMVT1p5&;&aNkPrR8a2W2J zNu2^5XAmP`mlS}td6qkPw*V9b5je2&2uflYgU#Tg$WCv@otKZ_JY$CQ4CrAQr^U4Hy zA;W7YozM8mz2sudh~Rj6wIhKoP_khoNT#v3_nx4@8iHg#D8Of&q&_G>>OR+z{kNs= z2M5r5N~kA`6XzDcw7}I_*mp>2rf+{5!K)$;YdFP~!YR=SVz;km4@Kk+A7L?k;wrt6|>*KOSe>7&vkpL+g-C`PaJtr2QeP2 z5@jTnO_>36$skd4&fu-;NB{^BTWSkKVmp&DId^2}Ya+o2?5j^@t88Xdy^C(`k0TvX zXWq>0B3C`eg2hDemnbp)FUcJ;GXBcCMO=*7>kA0Sb6AHqU}Bm!YRmGmrpW1p@O$v^ zsUihy04aW3MG9m>Jl}fFD}LIRO{skE>BdU@2opnT-Fq+J=m$^ey?`ub5(wz`rfOua zGx9gx-*H#`pVpaR*6}uuu)IpU2 z2^l1hK<Wp{htRSL{`(s~v$v zr@|SE>&qs~ZbU5Y-|o$pb;2CjrYf5~p1g?S&k)IIR&%#4dxehVOEE=BZGk$(gv0zd zWg|_U+cg=`# zaY05pzj*fSwRqo~C{(`_l;yKGTU9a|zRerlu;`_`Ik)!n7%niEOCQMt7KPB3ZQ!f` zzSUg9wj4qxmby^2=R@hxI4L??fC`B#sHaowSJ1Fjq|w@1g<;bCVL#Z6LAF@U7y$wRt3gY| zs46?-c;XsZ$t?K9&Vc$tka#ihd1D0GQ{7UEo+is`k|klWyPZM61ia%Qsv8co?z4Wx zT*H_cyaOHP@Ij{L(}k29WD_b;)!#x7`tT=G`fSpnOKXfw4jG^DOWDK7`?qtvgp&MT zRx`8PboUd}m|m6vT=C>507dnlbN!ukAO+D41=FaAGTEM*X3GhE(pHD#ovlKA&&sd} z#Hk#B(?pl8D#+Cr?=oJG^vN_4&4me|wzVi(Bg}baQQ|-n(Gn{-tAw&Fj#TL4Y+Hwu zoyRYD|86~mcL%5Df59fGS@UZdu;-AS>S6lT{!PyK#E z!caw(cXiP{9i&4Mbeb()Qqx_7bS7jYOAq>w{tbAh@k z$wMM{HX~3DP+w+5Y_+q5Lhp7$Q&U6ON$*?KHlZQn-$l$I<%(Jx>Y2FK)Bz~zF{a6` zXgdR^r)P=rKNjP&ngKAILGa-_F@(jiPdSP8 zjXamsA?N3k4fk|dMzgHWqbqzyq{ryWR0r|kn`g*_6W?1Iy}3z}q*>>NmBi=C;{)nJ zzGISuAAYQRX&(CIatAvBoA~;5v_8YBTv(baPfONA1n=Ad3*O1sP)0L!E(?2D@bCw} z3gn~)3NVg+uxc&ylv{T24fuVY#h5}uxP5dFvMceI;}ip^VXGXRC3>*xggX>P`w-t2 z<;b912zbvspQdBDEAoOu||Q{fPH zi)22CTILhJ`;k_sDFjxSZ|fu>VnohKxHs0XT3wbxaOg)@lSWvz5fpA72yb5+8U}sA zLy1r^js;Y(15;adnW)jCp(#qv(9cRfpgVl|7pCXw755b=fS@p*ff3o8gJY9{T}ED8 z-{jEkGk5EkmY^lkUsjprO$bmGQ3bN13>7G3)o6m+gX*T8V03JHRphbR?3#r_>03~; zyoKb)?-rO*m=Hwc41T=OKD*6n{YsqLNi9Gz$YpW!WAp+!h=%nvHCBwfz1geCpK1+) zQV`ByC?{$#E7Xpv1h|6LXgDUIaLr?U-Izd#G@e1HFwZb1bSs4!g@xHYWN2~Y71PFB z0=v8 z^>^ySqeVnsV_U|?uU@)Q{-o;jMdqPL~GbDsub@McBEN}x05g;43UiG?{g}A)V#SdRWx+=R%G6L1!D1?-+ z3ngS#g~wF!#uN>S+G}m*ZLh#9-9p|04Kjv zHxL3sqRW}xb?U^NAM3Uj?~mqoZV}FRgDRp9BL$DR-FB#KHCv)=icAQh_qHVU1!!F~ z+T}y&D22w4z8X;CYj@wcxeiqXjA`ldA_ChGb8}OSFLmNX^+cTeF=Ga5e?yy{tbnPQ z)}VEb>xIqA4D8F4V-c$uP6;(R?86&Dt$IqpIh&bs z$CcxNuNBogXa;f3SGM-cN9ZB!9w8+Q?aRfNhfe%tI%>p)vk=0-wsJWzPHv0#5=R^d z`?Jso>q21_=2uPX%^`NL%ZRQ6Rddh7u|w5^22AD;C^VQy{Ol_MB3}to4#{3 zI>aVac!zWGj$KUBA5MONDUXkFppZ0zF1YE7HOJTT?*FIG?8$+2;rIOLomPYPs(`p? zu{2K$+rHWZHW~pSlYzQl00pbP`TH&aK78lKA%uu)0-%odmfb7{DOniBSVaO~NGl`c zlM)7$1rg&c2s6r%c)NGNv4oH~(Lhu3M`wlEMTTuyL+t?_%)y|79`Po}LeXLvRhT4^ z&rClYJdB6=tSfn7h+;9Ztd+n3B#lag`c*|@1E7AIV}6hc08q+ z+RHclJG&%unQT!McLq%?xTOT}h=|+@&5&a{*aL{2+OHI>gYLHFyf4Kl;Zrh!Es9fY z6P^M4)9YU<0ZhP`b_!L=|7(-DNwV#(W=ShMT!wmiB!el~*ASdFcJ0*%1=$PnQizCj+na+s*kR|8i0Dt&A@S%^xbQ-Wc+14C~ zz*1l3|~Fe7Ijk*Et$&ygavK(ixyicLGwCY%DS~o)+z=yIGHBpZz2{F4VB_lCzvFhx;F-wy;cXK z04%wTuNan83i%;bE^M=^Cc;lN5ni_@Qy8FD9vJ4J7HS{JN)?aGk;0Y>a;Rl4YBUNJwCo5 z7&2tM=<&lmd+29n$aD{HxS`Jd4@1=M;2-)PqwaA71{NMN7*!{(!(*q%r`+9`PA6N@ zKxx()i(E26f{CSrjK$ChFT)**)-68IUH{;$77FqD$WhMaH95+6_0z@W?901jb%K(1 zk_D$v{vU7e-W=C)Yy(ljn^d4)>(k^A=#FK=iCN>}c9 za$mm?l%fV~nLf1e#o5I^{|=W=KMTDlFPK9RS5xEf%W3qxI0Ual^0r4xdM65>L@kN#Wi%U~wi42JZvRlXgzib^Km^^xR z9nQEk=K()B7xKsh54(l@%LuZuVvu%rAxW3-RcXfc>$Ca!bWs zQFDSlE6m1`Yh7L=MT^~l|KxmqR4{wHxE_@g*c#SOMXUq`;laSB>5+urC^SiyvV&;F zyjft}xfCiZLK)j6yn6ch)0Z!}tX&Skw^48OW}@4Cj9VN{^Z^X*H?N-U;1R$`tM+D8 z4Leef zy3qEHC8p*vJbQS_f)|W$Nh4@gKvp3GyiZ}Ky`gQl)^-_Zk3!bDQ$No!Bk-bM&;8vI z#iN-3Al{7<&cYZUYsFI`edkNK%zDVz@1SF!pFrx!3;*m@*v#1 zmd99y;SnPP!}SOhS@lm(K~LG^DIAfi1PPkeratUXF15+NVrrwqz{@o zg5eTHi|y2px`WY^Vwhp%4pfLS++bjzmhn_d2O+CmV9n!WaG7P*OPzAZyuF$C0l6xj zWlv3vwvG}Puw`>v3cm%{s3_SE|5>lr^5K6dL4YwYMS53RA#7Qn9=8L4G>9 z(u{L{5pH>t2-60VD;TjGWaXHm1f{C>)yhc{(^Vb?-C~+{77#)xc@W^b#?MTE+C3q$Bms(Ud#8?^VIfhCNUhEx2+zx-q zO%UAm3<;NmG{G|up~`nB8>`bl@&E6aV?cWzQaWv_AL5tnM&X)sc8j z<~6zTzEb-20nVe`zo5jAPZb|T&D&>!l|()2cU)qxSoQtnbvd}|ku#K>ReWJIkw0;h zO8Qi0AyaGi%qa=!%@u48B%lhPzPp-W5<23*D1dE3eq z5EwXLukFoC2OPp{N;vSbEgeXLDIPy)-QG`DRfYGWw+kR){js;yGL5e?cUr$*CiQZ{ z)!F6niajE0gE%T_Dr2y($}X4uX*f%iba9ka!amToF&13I2W%D5^V&Q=Q>pk6#Cm?5 z-IB|}#7VHJt3K@tW#3#V=04Ep?>stA5Bh6ocxOZ_{M3Fuh%l*F4^Bdt?R=#(P>lG+ zj{gp6QF>IZT)=rOmwbnDm70{pl+aht`5K!kvIUpLX3T0H z=xKIze_l|%HqCbfbE=&M*i{$GS}m(;da3Tx(lCDG$J(3+br}8<;u8fj{6%`QSaf(1 z=L{X9TTK~Ggf2@kd@2#T2J3QiW-0S;Dql8_KSw|q4!CV%FmPoJd$w)G_RSu^J&lx{ zkhG6UMWvF|o==4em>f8&C6Urov|5s{Pos~JH8`2D;`gc3{#bll#cNGfv1ij_03l0g zB90`Qpp$mFLR3B1N!j)TPFwvNm~>x6+bFbc<{clq)dqoh7Z z*?*!=GBF+6b#-vab|J3LR;FQmbyp z$fYT()~Y!9w)`-^OtnPhggV{YpB9H%O5HvhD7hUEH}>rnkLX+l&GD4qt$MX-GeoQJTd1m% zB%M$edby2EZ&AEbHH(~5Gyc$}5@8J?CGuDI8DG18e{y*lTcwm8v3hgwW4&7!y=EoN z*$3~y@Z)!@E2|%Ksn4I*`19U{Zhkiu$B^_DY?8YCGPX>44yU9!qoOEW!PRNM@PGam z>mWsz9-I6PTO&j&Ch5sJrufsNkN8{jV}MgSGPgrQ#X+7ZhFOg~wE)C!3-|x@;Qsgb z_JkWYp8{7DlD0+EnY9qr9$Xx5PQs7YslgCH()s1EUdczSMko3KhQ7wVH4C7U9BprK z1SoMUC62MUD2=-7Gv5`E1i~G0MNT&{&l0qcqyA^=581bCm6 z_)xz$q^(iL^bx1Y$pkh`9=FBFXxJ7tD3yOQ&_UbGq=R%_ibRo?%_+d6;#{Wk4siE7 z-oU#5*9|c}*9}d+dd4FE!vDYe;_>~}hf`RNnZu(4lxz+MsJBF%Q}avk?d;#E&k87z zUW{BC``LL0?u#36ae8~E73+vnN_|AJbIF`oOB@VR;aR9G42I1w9{Y<)M}HCO`B3fm zm@bh_*d;lH>(ihKX6xB;U~4)qb{+18+Z&pK_x9U5!SPiS{5oJ`aH9-&ZKhSH6_?Kp zRzS<=+ZA71F>`dp%+x$_#sWR(OSJG}=&c%;Xz6F5;C*W0or?SZGbLISe*$sZiLWM7 zSt@8nM*;JtuI*%VMk*OUO}#;dhWb~o5TB1-?Q$3AQ5H>61%&;tD2v)aziA$em@QPA zEhc=R^9(PmX%RQTi92Svou3StmIRb2Pvq9RwHcL|!;&=D!k+e#m&|0aJHPAM#Ewlt zZIW#Jmm8iji4LIZRg4uKe_CK%EZRkr3ML~OjIJ|dXw*?i?TEY46TlI4c|l1PhQCj} zf?sffh2OWXC=;f!*fUydOmtvPU3F`vWe$G{V`^P-iKz6BVKO_&fjpkt+@pAn1F7(% zC{rW2mkam<_d|Gv`?)2n!F^C*_jEZ*ts35kvw}L)4)Mv@9D9T8lpGR34R4m<+Z{%A zS!>57pLcP~(ap)>31-lXzQE4Dx%d6ORg$A(7rl&9h&z=WFDI?Xx3yz^IT-JcWcz9B zyE;Gmqn_rziBS1DNyXFo2Z8r&xuBL>X{5u%M-3J#-(1eA4-2J@s>03iO)zKt40VZ{ z#?Ti}W{xT)=rnL~SkIVDK|Q6-4GBOc5)Xa}r!ohr?8-O$)17I%?^s1-#@|f-_NQ;( z-22P=pv>(#=uobit;M4FXn1_n2hE$|*anXZ2HnFClgA2E)oq^PN?AdaLmsZ|$wc$o zbSy`NoxL4vh6?zshV}MvWQt|1Mq9w~Yoo`HD1&pTLq1|?Wo|3Zvx{LTJD6ezhC9!{ zeD*?|r{x?@_~+xlNd{+(Db^|dsd5_AI%o8a1MHbwd4xhC4z8F>ERm4ehnl*(M3`7} zjwOG27iXTUe-ige3h_w?h*67u= zokk1n6%foD?zO`lM=s6irNrf!dR(=2;4;a*@m-BPBZ3W^Y4rloh~yRJ@Dfy9#zA$# zj(BN5N_+X!SfOsS`s^9QBU1Q1I!z(_*N(O`g2eA5me}1pIR!10_nr;sG6|??tu`;k zER-W?#je90on6Q*eN8nZfDT3c7TByafT-bj4eaS{9zohaOGG{;O` zB#_vU0LEh?LeXXK`Lt}yO5zlf6Y@fTq~D-`xvx+T8$8s2sX|$UXH^5X#2g7>?Z2bQ z=)YK46b=nVR@VE(H^QR3qN03rtNJ3me>;@U?!RxVSc~*Ww~F7Yxw?B5>s(C@o!|ND zaN(p?*E-S)RbL*qxPoB9TzF79kpYlN5k(qL#Ss#ix?6y8)8`&iSOwDYSz$q9GbDi! z=gK#T>oRKb7S|IC zDEWG29k~BPgN+E%;FpMnf^X47Z%}lC0Gz~2_EZuzW9Jg-SmY+ApcbjCN~F4of3z>U ze)$7zSVbK#Jmgfi%?k>f;T&_@4iw1kI9mmC+F{^1h4VP+@bwF3Ko~71BxtZAc@4gx zpcZz8d|cv8^@wrY?0Qy%1gL_#~VG4w20egtSq3mVfc3B1apjj0h?W?x% zf^x3V#kI3sCfANZXH{-Qj(ly4>`z?8=v$Jt9D}68X5b%1C{9B=B#%YwWSo*~03t9L z?fg+y;L>+8lH($cv3-NlbjX^?9!^P~mf&2zDhxhZm=o;qTxnTU=5OJ-#*p&-qc2Hp z%3mT5kvadc$G$N{h!Hxp!?Ggu!4r)@k{{!=t}z#k}>Pp6(xMlr|)nslc4` zXPkKM%m>ls@s9p}a%oQHhD;#{!oTEIBZS$L?u3@v3N8^x77ZaMRO?A8?9?3!u&n79 z>UMqI6S-dwa|P4Txr$NC+lvB+%umUtX^y9yFaDY<7h~C~+icoXfhAxob%X0O%`frk zWmBgas62|%6^as)^$ic;PItCuJ+ckk*G{!zst`}|+&1s3;_k9jDtW-Wh_~><;KI4` zBxmz>*sXIf^BZJ0Gbo<Mbx)7oVjKK=zN2qYSI87dIEqk`4bHpPK9@8L(=pS0Q;S3~XM+pJ z;bKTzLLc=y1*I5(*m1C+;0)M&p_2!9qaj-T<2%zGZ%1K{i!dF=3@i8?{WEvSFo z*mS#hsEu}FkfU3r?S%^<7XY8Dj1HIuKKU8`VGn$&rkX(wuBldSk;5NV%|$IWoiS1{ zt=Cl3z6}m}E?VBj*!NC8;ck=^eWA4&`kzk7nxYKhsiyg%uMNzgHjJ+Az@BJ?zO1nh z7oE_!%0mRCv_rWBK?INaTn&HeH!vb2e9-IC)roXs!0izvVE5_M=TCR&p*`?DlnQg7 zKaB@9jJ;0~8$uzQ zm?=rNAQ23M=uSse9g?y~fvv4qGsccW&)VddgxH|yBZ&R}weoQp49iE=aYwBOdQ>tgJPyrTDO=`huCtXLF-oyxN9Dwdk zRFMC0^WjpF-bXC?@Q@$Kee7Q}evfwr6W!M*`R33cH{c=~TBR{1F+@Ul-KdaCN^f0Z z^@3hNoB@TB!Y_8DnNU!eGvW zJ^S9)aV2@F+@aM6*7WEOd4_t)oWdgyIK1PR~hdcWupR&rsG& zjgvTFmuLFw=y02*IA#{TuU$a_1nlCH$2J75~)IlN#blrbRq&$A<9LFAEerLH_UBsvp_rz&l& zA#9E_!bG#^9^zB{RxMA&JHxhQ3AL0eW{-a#>EC~4n1&B{lg@#eOB^GM*6o~S3x~9O z=Ob~~R0e=cIwL)9Hj!b>FWgRC6jeBmiEd8}FIq$=4roF4v1(>)nnNfaG3*{_3JuyV ziC^(R%t6<&aJi&`H#7wg^9K}ousm6`78_DLPoYbEj@V?Cy84|@p38~&gv+*HMXKvt zBA6-0zI{wj^2g%EDo=X+f=_8k_3*HKAHOVr*&iY_LLYf$yiv9GEQ&Rqk%Ud2*wXaL z@Ney*J6Rmjgiy{Ko2)2wac_?aq+(YQ1-{fkA%s(EDS@U6!vm8ENT$uZ;^pEyg~QC^ z06DWiWw)osSoeOGxnr=$%Gd~eqEcg4B}D_Rt< zAYL%_465QAin4nRO4!HdvT0>mhu2h4ua!&F=~5$;N^?dHE zR&mY)@O;LT0DgTD8&glV?tCwvfq2d=;=C3S^ClMgVYP_veRj&^SEk4hPMHKtcbs-h z?R>%*Qnh54M?>|vfovk~Sci)nS3%61YoyoQ>^P}0?u^qw^MeE{fCRzdHRLGK zq>&qdMv_v_BT03 z7#O8knEVSkEYzI?g@W^C7Oa{QSjYlP0|QI+2rT`d|ML}9@*itp2_?8Q6;V^bf-x{a zMU=*7{3nK1Y2z4~NGYVPD22a=8bV{JL;?=uMsfaYiE{$SpMpL>JBnF}o|WW757Oq>T_Xs8={L&Bz_$~MR7h96kw{b}6i{=Dm>br{x4U!RyrcK3Os;O>B79z zNA(+L993@OAyC)Lu=?q!8m$5*_|+3KV9*H>r$m~XQ=-^IPIq@oBO&Tf=`M54Nc2sa zUj^YC%_2Ri^pxTO&2UQPGo+QvX+UoP>b6ey|D8Y<%KU7 zj;nOAwHtXfUMMXP@gpNwvQ%5T0C@{t7#q(Nf7VAWO}FfHXkiY(d#*N9%a`Cq`hZSn z)Q*{+9>fe2p_;+V6G$e1Aiv~o=v#%?ku#7!>5Glg!Q{E!x;MOE{Z{fx&G6fvt+m_( zKFet7p+rr7_Ay;4D4B8@hDY&kHZL%l2MR&dUy>^QBgGb`k~dxG#!SjZ>sedz%{exc zLmIg@Z^xi`E7QYu+;|+)^E;~Vzom|}I*M5lOe^#rWdhSi{3^{F-PSr|ZGautaS*=Q z9Fu0`i!(>VD(UT$9t~q|>W)uIZHz4CCC&YUUNjLm*#;7J!~-FLC_epQ^!c~VrD%I| zEJr{Gsj3i5hPzEn#x?6~J)O?oifNGCs^$uKjBRJ^!UhnyJYh1TgDEuFW$Uq~_V@+X zgVXsipxy5kR_t9Kp4zsrZCas@)l!JN9ODLtW6V=1^)rBMvCO}>2j>gj(!{r0uQgqDbt9Mk0WOkLeEioZcFByNj% z>)7xwNpi)1REFHiGjae6{1y}0kZ~Q00`ZPx1g)Etzr`^wX?=h2K`n2}*JO}7@)OCa zP|hF|_o(r}H-RAe?u@t|$I>*<2mN+SEtnZvA|5?bgMo13o4DoprYwe%!x%TqVbTOp zM759LHxgDGD}+o7#LRVdEo9YLy`Kr2!-d{h<(}9P(Xjpl(foQRBuGk+Blw;;OVO?* z;%qhIJW2cSmX#2YIAD}Vw5-K&qO{IS4oK`UkH#d+jh451r<(i2t%t zY5ZLmUf7;@oNsXv_9OkfK$`PF(w`0^FVikmE&3G+chNkp0Ja}b!SgBv(0pU|L-|pSv+D<)t*)a~A~(NgVNsLpd_ZH9lx(Uz z-aFf*#CM2#$FlN|D45Fg^@AQ)mOM6F^0M9J<L4bKX<8yyK7^ftI?=T??uXw)P}D@DT7tfao7roWFSN4uAD z(~2$nP+yKgWVOXEY)2r%vl0dk)^$;^a3kbj1c*$$_OAwoQJzbiRQtYuDFIT$jLsvH zDGgWR4Q+9yUQsLQs4Z|s<=*9+6w&4MjC7y|L1V1)sVt)eA>4N%v!cBxc`tm3ml<~u zk6Xl;n#V3cn5ipw(XZ0dYBffO7)8sQk`>6zn9s-zFoZ+%P$aQ9u(I2N%o4D`{R}Ua zyo0*NomPlRc~SP}8-f>s*4UmI77A93yDGD0(BOR@t64<)tyt7Y$K}1jyXL$svS3ZL z^=FBlBQ)u32i_c*8gh7sxoxQ~4~9m%>@SC8iZ^mrT{fL*zn#{0V@P=CPzRQ}>#IsD zv(WO}DNEOK)2VGo&J>Ssy*|shJ(yM6d!Ji-L}lXKDD06>WUlw+%baD}k>eR8!Nt~@ zAQOld7*6pjcn3g`UZ!(xVQZKLFDtGO)+QdJuOIWN#+L(uF%Cv)XS}*Da~dukDae_W zDR^O6X~aAhCu1{8(uGqex{foZhBj6<1nSHd(gX)J$3&`jzxm5*BR@Dh)DlWt>Ds4kFi+|!LI8lmMpwyRMBl^JW#U@XNXo-L!78Z36d_)K$0HQSJ zH(WL?cHWboCZy+K$Ju$H3p}{nDjDk*T(k-39Z}mNeXa;eY(w#GI8)2_mvum{ ztX48Qa(wz_7*btmJ)Zg7!Br6z8j(2X;Ybx-Be`UNs>l|4F^%wz08Ngv7b z|JFB0o-rU%U++V)UMp&@<ztPW&crZZQRCo?2t}&D1QBm>=gtAEHT`+t3*4B{V2kfx}Z$wl0?Dnka+KhsZ7bj46y-GTcj@VNFIu>oR>7ix^wc?u`Z0H3z>FU2&-ZgmSS97 z9+yk6LN@=bKxVsEoe zzrt3u!xt|JBeuDPvwo;Li>H5k#-K;^tB#_xQW&q)XmqdJh<0ryV`X8GwD(r5&;7u# zYLWI|+Sj4QLs`Qkuo5PJSbeJ^joCnsE%s$~bR83CK$y~uK(uJc+(>(1cm@lzKBY$m z3)2^~RsKUlpTp5k!>>>jlDkUclAJ*5IgiysiQRvMcXEphXgWO%&u zEWZ)1r$k)a3|Ws1XD-!gNK0`Fq^W0xBTsj7%AgP>e$k*okgTEW2432dpA7G{4G%{c z!>aOsIVKS!nsSeP$w5pxF~EYcZfk>R3cmBU$nrL4>-E}Lq(P`4yhk}y{He1HRVM3ASZYJ!WH51D9w{y~sfGdN)RQH@q%o4)tUU|)I7 zEhX=Ep1=J3*^|f5;p{h)zi12*x*ZNx#_rt`x!7-aXnNS^TVK4)iou=w>eu6+IVsPr zWQvJ*zV=_{@2$pFX9CSkfeAk&>gdrf3QQES{3i-bpn$01y3L)h;~z|1)?eB`K70NW zqEMS_T$3Gou*=S;FTZA{vf%ZdCojMJ>iN^Z>F+vKDDdeg&-r1@4~c>iec&Mq{2Q{V zP`TpUghnWP(!ooQj*CQyW;lpAHGVm|Q_Ko1Cc`p=F8yme_-0NX#kwPQ=2*xvKRkHI z>akwYXR?cXXLlw}-2t+dsNC8acfDalK?MX*9?PeyqcJNDuktFzMo}Q?D+)5?C{0NB z&pi)+#U5%(OO$w5bv3h$_V`iHygVatT&g# zEYI=l7oR@;jN1Y~jn_G{C`+iESCvS5*^J}Hdhb9n0>CJwZ_1Wcl+RMUz35~b-CP;r zpkSWaGThsTLh74hLdn4u5r`CBwEePu%gWE{T}`(aCKhY2PMr!9dyKD}^BuWKPEnBM z9ub##FhmnQF+oTJ;q5his8Oo$c+V3`9k&yo@g0+2M50WmjLYN)BAK9TPTXs)7N_tJ zltDk9%wMXRj?o?qcQoTg2P3e)5wX?v;4}}T!6k|=KD%OyZ@6RTB3KF;?;8(IK8jD} z*Aj3?as`eResKZi=mzvhHdUx3>`_k9F;%wDWkE;=oy7(?vawn*^HRyHL8B_ju$zX* zRo>6&t1Z^=qTEs(I<(?QwW)2@BuBX!!Q_GS$g_9wj6tvg9X|Pj|lk>Z!co`#(ts$Rg^BJrmAf;Wx1*lJ0^0^)3(#pMq3C zWxbIo9SGxxTJq0|Q~O#aZ9^Uz9dqi1>QKS1R;k|F78*`k{WzD&83CP%?8EZB^bHSm zjr|X_gJ!*xaH~1zh{XAWnL01LKbB}XIDXx=_{n=Fb)@S zzA_sO4gV1s8n;R@k)&BnEYP8nP6R7HlLsZI14l&skozc3!o|v9N4hha?LbG z;FPu3ESUsjLT6#Y9mXeaAz|f)d%;Z(ZNPEPr2veCp}`7z$sJ+^1A`LQ$TDu3|N8&j zrby3PHk6O?gz92z`2#~G5G5WW)y6LQtigM4*h*xLORHH|zS_F7^84gPm}aQ!JB5j{ zkb>Ppc?I$|Qg;F2>DQXU(9k{OQsrt<5j*-0yO&H0BQ!wURJKfnxWd%i*wiHo1sTmm z=Gq+4gI(suO1p6n+3CiP6u#mEvQ$PAheoDoOLpC%#}&m&D)fu0IeMeO4p<6vuOF$z zL+^CW)|~w%{?wf}qD4@>nF(VVmA$CnR}*Y>xTM2GjgaC3eF21EQ0S3M#1G;AB3zD0 zq+z@S{#+j@n9_VK#Q<+&E8bn(2}>HglN_oMU7;TO7Ph37yxW|})HicNKrFzq@wg2> z9GaJ~$pO+l0ECvxzHo54nnGp_Le%*aX){xyJ=c~Ybv-nPSQA3tJ5?bHd3}9TVl%6d^&n0x_3?ZDK`ABu zDI33{kVDZfSOP0(b_BllvM4p{Y#obG(xra$E4FTBX?>gE%CO#CS+nP*hY+1B04l|r z2_ybZrz`3al*EY)Au5ruFqa3|+&nR%v^vu!^~(a9fd!WlQq3x6FBJ-q;7N>(!XfF$ zdT^wXo6of1;qV=dNW7(CV0t<%>{uGXG!NG*Y;2!N!gRR=dXDu}SH_25FS2lnW`A-NM%b3NOg~!AKa%l(3(utQGHnEZdz`m;*FA3*?X&u zr6I}84_HNLbDw_{b7hy~g8C~|>e?(K#m_KGJtC!9DF2fBtBqf&zhc_s{tr@wXx~u? zaQ@4CS(Kbq^6Tz31&r1=&U8=J#W-eQ`B{v!$$NsCZ~}yQb(1Wmvk!lL z`uydSXFK2i<({&cZzrqMhihSD6rO+g{_G>JJtdQO_4Y)4n{4O$@&Kyg@T_h#`YIeA z^6P!1{6kh~4#|sKSX6Stm2R?_zb+`v#TkdndZ_JcNJP)<)9E&k6|?u1@b=aj?S|f$ z78F+;mcpM2n(~-~W?8CRah((^876j)T5})P>4o)MlM?$PBQGHD=(3%LcepUs8FJ?J z!r4Ea-~)s{mSpteaFQ_{_Jt2B^`M-ko=+hk1;Y_YMP(~ztlK@gqO1$x%0%-k>ZLt` zP9ssx|KEy2GK)@>QDe>)Re3sm&h&6 zq`eK0$9O+@rnur`h{4xZ z%s{Vw`GI#o;sC|Z>GPDA;-QcBQh3R@9HwoFHL@IFD3Z)DW}SX&PeM~zHw0Vfiy+}q zOHk;Fikmpr$W?J%G2#QYg96pXRTaN#d{4S1J1WZtjpq>cvGXja^8ST5W#9o$_43Ov zxu#hh_ywgMm3{jb6Q&w6SSxb@Jb8u&IyD9)M3^Yy<0LzQ4OEqg$`$?Z;XCZ-f^a;&#L}{;)K* z1FfSW&N_0OrMfRGPA`bXu)HiRL@yLWw4J2T-5vYuiz(6-CWp)KfFQC$E4(ry(Mo%BtB8f`k$J}OOZ7L2j%DKS-*0hIJ81Xb zFbLUpF_7*7g{Q(`3aMq1flv%FcP4oj3=u~rkU%RE=o117Pj%jEA?e|z`l-_m4G2{~ zwLcCbo{N;OP78jHrB`#4|J~#8U=xf|ltqtfC59TzS1WNC)WzydvY5qJ6~Bu3O9iO( zMgjB4D;Q>Qje4V`52c;Q=Z*$|;X_GsAfvnMW=ad-En8L+^Mh~(kWFgXCsdeaiwyZj z!pPX;NaUQuHe$ndJSvE`3vpw*#CTy?6wLDhC_*fb2Zhc9P>)^ni&7%Dit1TzP2L`X ziIEr zPPq~GU9*4trOgsWhVYm=W*sDwpft0%VMs`$FPrq~kPX6TQC}UIq}kJAKSc5}LNRG8 ze>%t>Vm-%}-WhL=7Cndz&q`a%{L@DE)sypFbm`5Moj>}ER>O|cMRJeVPqtDjXXk2fak0_`40PFh<~+s@*GwHUim zKvYBuVoM$xnHNdO2u$||VkYgtn%N~a1k5;sNNC8$jGZ4I=eq}*g1`z`(F{H9w+u3p z#;I!`6f+`Drw5194o;%bWw&$yc7xkL47R}ltO7=#|G(JN_qjDY_^u;O|iI*Zb zPfN5`H<;E!1~)2ybUB{XAdfe=Q2`U_zisnD(}WG;%E@uudJy0J@e!Cp~g-oQTD#S1@UKr^5|VoKl0a zYm+nZtqN0|llv)x#Jg4p@aJYLZ9)M34Lw zObO=erFl{ln1|Yprf{Hx-1ffyWmGO4Spec;)xfNquNP{S@oG>lxta~n175hA_U3lkvNa# zL{B@Mke1_eLdR$Hh`A&?g4byOwoneWQR$u7o4PeT(nhk16AikY-kflC7>{nNGP)(_ z1UK6bbSWV4M{_Wqv9Rk$y41EuN(fpxM!*lE+W8vu;H)$*eLCZkpBbi2kfJ-y1r<%r zI^D@fYwIqI==dmJU9{_psV@1M!_l=3=iPq&)%gI0lHJ6vfoYc3wqj`X3D@M+EW(~? ztX)Dqe2R{F9GT3Wr>GsYPdfmPI+2kw2wj!ZjOOAPJ4ZY8S8_p~ek76gR@~L01C89n zhimS@U^6n^R^@Bk21^L_bV=|S`QSy#X$qYA_Mn{II;HvJWnceD$Vd7RJsR2RDp+|IW;J!;C9LnId|u#Yw0v(hnJ zhkd|VDkzX=)$616jY1WM#9GfHMG*TJ0B6era1n&y%dTXFP4)2i@Hhn9d<&i}ux+ye|M9-DR zc&pN;ux%CwwylUphfXJUc9rF&9$8?Np9ip(*#_3W$!Uqb)fo`wX0z_;yXKvy ziwNa9Ej}h6wZaNU53bLbb&NCQ3f|+ay-r5o)a(G)+#L+IZSX-8NIp^cy z&FOJrs}~5?AGQOd?k8A%8BhYOMP;?;zK>W~S1=Zo*F`YVXQmh~&`Zf9@^)7Ps;$N< zS?om`g)1}Q>>rwwR29`{=^`=rbY(`Pbf)81iQ$loO!ghV3pbBcx9u>sN(Kf(czQ!L z^&oJ7PF?xNaTW%speG6_JA?9Dl<2C;1d5kEu@RF4nq~)q*ZtggmvB&75Y4w$!jUeD z^n*I{Ju*dwo#b4lyzZ*uu#)U*7t#@n(gy@uB^;dWZ`N=`35S#;VW+ZV*jSKbuLdBE zM~v$2?(#<#F_|kVC}`Mlna#oE_f}H0LW(7pCm2B{CkrXUO-7W4N(#q*Sw`^(YB**( z4*n75b+T8A-IW1@WGlGZ}fc25NUqGLW(|vti%MN*k7}$dP z*}}jgXGA!sv~urI`t;Krkfq#%@ZPZ{QlXu^C{hQ;ui-q~*J$tssm4rkIh0epns;rh zd?)fEQRI22yIjvG8yq8_)QB$qD5~Qj%E*S7A->nd2uLyNQ!NLMGm6#8OTa59PqkTwI6v#CIQn=)%NO-G`W)ZX2z=1At*4VCJ4vv^{k)4w; zo}NXihH7$8WolVb%-jlwQCq+)?Hw)qea6#a(pKckxN3zgg|3B4X!*2ZGf=-uqeo?B?R(JDAy9F~?7*R_(m%^1$a9e_y|CW_-Tv_Lr$2+x|WFcOI$ zMFH zcpdhWGoprln9bz7Thh9QFz+JAQlES;g0a@t*!kpm%*xXtjipsDb9vbq%OhG|NlCoO zOue({?sY<{qAyER1RajKY7#3>)yh(qw6h+Iw&zY3iC`sD8#G?O*$uz0`^Jd%qh zxp2z@_BEylN@-n`kSa=%>(6>rrUjjgb|YPgr*AR56ei3X+^*vFbd6l@as}=a0!!9U*X^WvgShx`Zo%&?~EfU(qed|4@5 zl&Y^`EMX?aAYpmEZ7ifSb}v>FAAL&*RRDDBCJy6r`AjQY~0KyTOACckLXyhZ-GtaZ45PRBA&QZzrW=VM)mE2 zuc@xliZ$-PE>~|P0<2SlB#gow!-^vM(@U8+n&GqP6X&31=!6Y+sF8eg&u5DL)$5{+ z5B_=&Rm8&!2aR%h?dEKN$j@MwK0qXL+xqvVK-p=;xVN850rVa&}+-Ri+F`Jyvx z#NzwGy{@HUjE_Kc_z86!C$f)&M3eXh9hq=sbXnUl&aW&YtBWg8uk*+X@t`T!X`N3Re3@f)VTl*uHYWQ7L4)de*&h2Swp;N~9xqyrH9Zr5M0{LZf zlv-1wcjgZX5!G?<9OGeHHvuae=dKc(7OJ+la>*G3Tik>dGgz$WcV5RosC3EUD=0=4 z!Dxl8Fh+l`pSdum4P@baQ5dsAI$gE-{h$-K;C3TW<|<}3Sw<+`xS*ny4hnRrEn+X0%dP12=xZQ9#~JHD zq@+d1A{?rHA$rW2^Oyth!c~dr)n6HLReCI14GT-B%zVjDMv-D)4iSak_7eTY9?w$f zwYqKQ^Xn{g<3(1V{9)M_zxYq#6+uzg@OQ1q!Fj>0jq^GfLw1aB3vzVADJoHN%r7U( z*^dU7@CGRY42u@aZH+1-mLi~qj^LUw$5*{F}*EM4+9v;7hBT?d5M} z-(B~G)y?>Z^n^aTO`@qjs&O&;sIK*0n+~7L&rY|etL?FCTsK*t-CU2)jx`ETU)$uq zzS*aHlhbVAc@Xc(yoccMD9zK-R>%uY^}*~D)aw+LJka}a)>UyC<(*QG;YtjOKy8Sd z>tZ8m4pg@0L<@msHj&H92S;~+#XIMu?$ttIz@siiM28F=q+yin_ z{1W;d$%e8kS;sph@<{n;^Q27W+-PPD_38(gH}}B0l3r-%;N+AyK7M)f%K_kz^Uyq1 z*%VmR>cu{K=r5iovqmkI>9nD=DI_|7uzzs4i#r{v0d*~Cd8kwlC6JHyk~W={U0$Gmu=xt_eDe4W-N`3i%r(mCFd{os_ez(? zSjW(nsl~_FX<;A~VRv4hVzmZP^H}vjq_L{GBGX4m33Ej@rL>^}A1EqlV%rK+HqBK- z*j`(brJ+}f^=B+NuTgE3@tmK(!n>Dp-vbyqtE*k&3@tkJO5yY8^O8+g`ynzrabzf zIG#1Gs!No`F4mT7EA$)cE{ALGTji*tLH`&(oUaiLK$(Lma?&e3}rV}k<5a2P)yTpe0RNgX;7~Le@(@4L+t>cH~6G!j3;MDaj$uYejS~}HD#cy z=77cMS3{d7_erWFoYA$0Bi+MKLf?GFIlI>0M=v(N_>wgDun!HDC)jZHS*$&Bp~yeJ zfGBC8f^(>r0sYf11ZodAciKr1Q^gV5_wL4a5@KNX@GmRSQt_XJAa2b{NfT;=+agvx z$Ob~9j{1t*T8m3ciyh;(3}pq9$=O$no7Y#i?Y6t|{1>#Gt0#)zD)2&w9!wV4|MOic zT0D1e;4LXzR+~&(tL-+3h2wcZS-3>F0#REbPZp0)+f}=eRw50yj_HKCn>!Zc(p0th zOWmtrvS<*%FVMr_SCK`E--ScfP$e)T*k0CCDCs)ajdbjaHW_h^o>;XmuxjK)m^gBG zPNc7ON$QBAiundc(VMqOBS)%ghEq*FiO7-@1YEdya{c!}h&^Tm^RG1?YG}?3LJWXn zDpZ}b+iRifeG_z1e-JB4pmKrCXe9s%S__6Q7Q(+JEr}m?OX>1LvE9*9mL}Du06l9t zaOyl^5?}Ljc&Q3FOL;i-^>P|zE~E7-M>llK87Nb7I$Dq4%#ur;$Z_!y*LG&69fy{r zThbhX#IU@!?l>2eDs0m;HH$>?Go0KWiTcl#Dr}3}U3GA`ZZ>(x=Y4sV=N*VlN8evR z?jSFWcQ<_-KTs5wG!}^gTHGu%78v3^8uCN44g=Dj04=J_Pr7ZWKPf;TzHe%SWR6^} zhQDi=cH-~IP*)D$r=sM1rf-b%fvRd)ij-ZbIs65ISkDx=q>9gbmZe-*r%^0L#E!7q zFxwj)InX%eXZWKnlsA6I;}`A2P8qm^H%^3wl0{=yk+^CLq77`}M#1!WyR<6hta4#m zrLWy=qh4Wd1TmcATf;NN*-QtUXPQ`oYTqgBPQtYqZW6k1!bGKB`4QEvjZhSmL}i|Z8Gz_@o6piI}~ zn#mnd@$8bThU(fhhbxZBh!@IYDIANSUw_Km)tMrgU{JRPXLWM}yh2Xdj_`R@wfEiyX^4BL)mquQhO8@SD8;`V8jShZjy%);u%0iF{M>`3(HG1ld}e3$4rw^ z5pHNiHE)(Gd`y89e5Hw$yQrCjKo>_%QeED|l1%-{Wn!?3U0{kd(2W<7M>R|bAD92p z9?iDjXl)C{gAE|4RrU#j-j6`o@}VbVud6uuvHT$lqvV@?!(X4g=IJAx$zk*8Vmghk zBHjz671TcJ3A4IyCVq;t5<(n4xri)jlb)D9a!3IUt}Y<7l$vUMT<#gs zuNftt{jMi84M4+26fVTziP_+hck$Np>VhwZe)$&h2`@8SY&)b-FmC+4*NTy#R{#%Lw0HV2{y%c4SCfUqAg4B{JP&$FF`N>>motXQ{WZA!%ieYM*tJ@u??2z0~ zi_{P|+O#PR5lNqHW=$FL1b`rh4&7os@PPH1VpD}NaJjc4Q$I(~B%m>JEVEB^V?|(0 zJRH3sBai+kUiAL>ciK=E?Es(UCq6~wq2VX`ca^(Jw^6GFU{zPO*p@FRD}>H~?i;&D z%LMpCibnk|j=--jP8IUBM7K)Sbi0XSfEktJBt@i7lc}*&{VlUu!wjQY@un1s3&tED zyae;thzN_4Zg7H{E72#b6dK1cgRh5|z{Mv5WlXr7)5IHMO^Q)hHS9(AJ}TQdQ?sl% z(qEjHP!xDVaLUeU_8}qg3=O2IoCWuoL=_+ms?_RJpc=c_Jw3_u-lB@aMTtI{5Q$J7 zMHB(FA##UA=Yh%i0MnFd3}5JVF63Hl4kBh;5tP0(cikD!qRh3Kxro?sHdxl!Z*JGG zMtI{ujzEKBiYd(~vt#nGG`YgqQA9_rfhHvh*8JJiG;x)e*12t(hZi_P#M6)nM09<_ z7^!@ttcCOf2j!*(a#@K%%R3f0_(#97zNJMABm}Yt5bl}YPPx(H>8_I7)fq7A2;sWR zRmdfOX>mu0bJp_o0f<4BkL(iRh~K^qQ4lna7GY|2NCTra@w?MQDes`vvf*j&bBa=# z7Am+rn5k1)loS5_VF1DbPD*sScS*EAjh~z6>IqUGhBk1tAiY*1^Q01;D{chBxLer` zptBVAmFphfWJe0z=PC>L$4U)fTmgQwf#P3JQIfu6#*FcNNXi{nDq>a?+dj`yH6=lY z#4D8!vTgO|%XLc)5}Glpr_|d36)(i`OA(UK#{e#~`oS}lb&YJp)GnDSA?EtEsGMbp zF-85FM4l{8lpruvXhr-4r$6Y7^%#Qi7*I|aD!PA=XctfMvnB}hee&?o`qoTnuAgz< zeQ5q}vcB>kC=%)Ctc`k~l+4H@vpZyuBFjWt705jA@-28*xwPdVqps#dQDVFe7{fr7 z+02L`2aPdVOJx;O+f|H}Y)tb9EG0I!(TdiE5kKS5W2{TApgrLV+G|x~<((kb0QMy%e*oh(!_KN$9y7sk^h-d3Xw?KsP94_z( zrBzh-*OM~Z8e0hBVgyqt!-3-+Z%CL0A$`#7SKgHco@LAxAJ~)OG3N(+%yl6Iw8pE- z+|Y?4SKiE#sWPrwsI3%Q%8qW|Qks5qOCS=*istKrlg5BXl(GJ!6i{TA6u00SM2tm; z!s$V#{YHKeOc^l;BP%^q0i2#7*r~SW$cq7@ZL720&{;VsBQPBXKxW9vtU_e+1RlIBwd-h=y(*Fr36q4r7pN_yX+JeK68FF(2oi ztc$O1T#zfXgHt&h^8|ypOKd^g-+8r}s^^~IT;3>o6g3#$@sORZiV<&Q4KOmQQS5Mj z^8E3O|7HgxM@;^*u5yQbar;UNQ=#a59_P8}6pxs3CHbndzSzQSA+sm#v!mP65E^A)^K?8$=PU?U>+NLX~;#WSP z$XjH7;5KX5cO+Qk;SEEgu#C|B`n|I~gDMwLS09i0=z38xfVc@X>$DGGY=%2k|@ z7bhIIVlEPo%5>{B5LLCKJVUxlJJhw5$SRlaG5VCshOQ>V+D}yrOofl%X4L|A%znh` zHkx$-mgq13z^4o)xFMJL#?_Hm^Ox98E4=e6| zJiGW!xb;JhzWL3?Z~0E6MT>6}F%l(bFtAFjWtZg_f_(yiOG;FQkneH2{ zw)jVF;=*esspZ$Ci(r2MVJ;5G2UQ(BN8u>)^&qTr?jQ?oVgk_#Fe!kaEKAPPV060p=o1E z(oT|GiW%C^Ay}uTW5j&ur>457T%~^mN(tnMuH>c9-uZ6&s1}pM(4!mFTot;}QXg@& zv)~3`oMA$ldN~L_`bGE#JPf4jdTKtnChiZL!6clNKfsAU-vf`O3(Q- z(4t~Cvc+BWGE*CcVQN}OzshRB4W>##KwUpM5??vJ!c6a{SEygI1{phhUB1XUqORWz zTWU`gwt&Jp9*XlH+|F(RyhSTev=ZMQECI((_m!tScVCF;W)!tVe0O{9KBQ9ZZ6EQ4 zx_^Tp5DA)bXX62)0xcRc?;PBKIw%@1{85}1QDr}*4zF5pk)v*q zDkp@kAFDgVZZ|rWuhLR#2si3D20%*^ph6QdOyODO(;Z#^gikv=ZIJ+#9OC$vSN#m+ zphuBZ;IWyrC|XY5lizin>Z_-(J!fL7>32>JudmwqYBMD|MdVuF8cSxEi2I3ha;j$| zx`Nt>S?5G*#*Lwv2B9Hl{t;f5FU^oE9GFgcEjq6Bz9OwX>&z$`2fD)_+db!MCwpo7 z$!P2_vnashrR27o6Z1-~gKl)o6HC#IusH)e!o@j2mTd}@;gkkYOP1IsU(Bva4a4R2 zS-V@4-!-*A6q`HvShyXBCf&xtr1Mri6NmP?^CN_qJ0BAeD||`K$vD_n{!PJ9he%3lMf=6kjK0hO}X<^{#9okFMf5}lIH+F{pD&8ERY zK77N*0B?-js*O2|R2f^6_sdk61k_ri9g0^iQAq!XSk|vfBjL3Z7|JD8j6QWO312b} z630;vKnka%JfhIia=Rx%)NolLW6jl1NK%CC6cQRt;0f=ESQsW~Xq*7OmN7B~b-}VG z`@?zOLy%xtUZ!Fb3)OE~Niz<-=kX~GkGk8ywTh&O>Iwjb$bcV=L+*`3hV&v1#~WKR z9{@!}+Zw`Iyfw9{ zhtqT`0eUHTFOZkPV2(jguXHP}67>x1#P|ZsyxUp|=nrcN6E3ut29TAg{Vi)rwz;>K zG0b>;Gc#9dhP8Yb2Wko4_6>UBH90OYkk$+)lK~PAm%&Ncm{==dV^~A+f>H47AIPrDo<`kNJJ5Q_Qlwhri5GWz0B)@p5&O|ij&RIE9q_l=H(+WkxkKw~O^G%l{a^b0Y z$g-}o5Gvbg7G}WJ^%O*2ZXnH4;OW{1h|S;=u+_mQfM|FtA7SIDg1!9ZCtGQTd(MIh z7{&gk-G9tNxA*}fcJYHTstxO}Ib7tQx6EXQX^WIRb;ybR9`;yJmWzGaW`SATo-5Zm zBVAOa$IR^$`5boDL0bJ!XSNEQBTxSKZFSBE=};n7FRtNQE#9hPz&>Zmsmjc4Qs?X2 zC%etgK#p^pg;UDO3KL0C*kN}lj9|(F9@o}g*&}2tcFPOI!A@ch19XzF`Du7u_*dm{ z#SgF~EzhaFK3dT|dv?yotgF4|ZUwGtt9i0(TXXU5KfuDjb+mJAOy{d)_}6x9uhW7& zY`AkV=XXpXP3K;z80_Tw<-x*;ccN?;3;uGNGua)t66Phh;|yvlPkv zYhfQd-k}qhGxDLF>5}(rVaNNcBZF|G}VUj zuT%+|=}cY?O_cZyQ^37fx~B-dqs9lS+-g*3(fM`qSo7vj8tglRrnpdU{oo3CWt+yc z@;fmgk>*KkkQ==nN$EWb?NW4N3rUW79tM@WU}(dZaw$qqe$ zhy`=UEq?tjxe&3{qb$|A<~AvZQGa}9<~^Lej)(t|O%PEWOr9L?#uOIDBRJJ2u;&c} zc047HwtM*ckE#RR$J3RSKjKu&%ZZy7oz^p0rx`@L>Ok;H5Xzq16K1s3Db`dH>kgql&tAq!13jq58onniqXX|so;Uoj zepdiF%P9?Znw~L50knBD%97cmjAK_NPJ7$O3odPdKGZhOzz9>Ig)xjkF$x#=D3$>w zIA)sdochLEySE@W!s1=F*g=5F6{-b|^IL8r9LdE2KL}x&Qsd)6wMU zetnKtg$xyq`1S7T5m(RN9H0G(RRt=cNkGiGx!se~m#rR{!iPtH=kwt(Kl~p(CZtEf zP&$edic!>tA{HIKQRwLVV&wPev4}%0!rCq#m4_);)QI>{eW7@^h&&91s<|Z$49Zg{ z>V9XX+25cZ!!;qJw6Ek_kY&3S4tk;!&`Hv?gCFiy`cc{*H`asJE4S;&7L^>IBuu?H z2Lbow|CeDRYIaHO$ta`dcMNB@Pei#Fygf=KK$g*|wQXfrcBoC1bj5izWM4ffHK-Sg z0qSIOs+zAaP;n?23vE3szINkBj&qrHOHV!Ha8$Bns-x`z1JzSo^ww3TCpRSd;WUC6 z8EhSt7ODWFTVs1O-!{;aL=G^>UlA4BH+0jLs!-%a(M+shCqRpQN#_>OdU^ex@8&?c zpi)B1L1@Le=9;)1Rcy(IRcy^-uMwY#6Dl$Xl={(xs|U)4?Cxm_mk996c$t7MErXZY zIbn@agR;9PyNC~KqsS5fO;u0hdh_$-Ha-)z7tnp zHVl1jTYT{6>8L$c~s_ z2}`LcOQ332kXU-EP#=H{6Nh_)SQSu0&x+4g$XqKZ?4t74;@~GawV2W}ZfTHWRXf3c z6L*%j#q5C;s?o|6=dn1tHc)*Zhk~gg^5K zis>W%0GZ>zL}DLBDcAO<5Utt;ditaKJ9&N@4tUJL!(+a3b9TxyxRu3)Xz#2I-%VbO zDhz7;R#WBjmK+oF6j9|Qm3q_ZVp~{G#{`}5rX;$(GC!GgYQ8%j&XUzIwSv`K_oAew zL_YZt#-RqulyM3Dj2e?h;yJuj9W*YY=tJW!GOp^(roKaaTXUx30OQt6%erv=anqU7 zIIM8p*U4uFqmWyawJIwU?bVGLECjeYCpvynDNe%3TjMM*ZsWR3Tt z4g-+K9^_yTP1hvY)R^8R6uQX)+^^-L>@M%cqOlmcXfa7%GZCKIu;d~9fV^9)YL7+q zv-UGr9Nr!v7>B@tw8;!DxL9%f2J8Y|2O-1WltDDthr#3!M!`@&cIf`@nx_k05L8Ah$8Ewjp#|I!`tW+5u9~ia%pF z7J=Uvc{W{!Bceo6JW*{jE&-D6-y6@!2*eYobG z0!4v7&VoF=ItP*!*XHNdM1qSTlZ@6m+r55oRD`WOqiVr&8TVRy6ohQHM`!VNfiY%L zAPO<=wZXc5%ABZ_b2zcn z`}e2oC?_4jONenLdTu>(8p}$_u|=^(grx0Yw7UMzcGQA`3E`D;@D)=CwS})lW_-6> zb>mCWV!pclA-`IJ)yoSX4xP9(z*X+6@9 zj!sw$B@u9Q(EHEPH>34t@|u;6Xla5-!ZoGBw`Pdzg_xi;3)dn@;QMZM*0R_R>Q}WM z=i%pTFX-Rf9KNjAjW^1&rkm15p$UcnMc<^>BXCMVGDuGZg6Ia76E;1<3))HP>2@ne z%9;v33%|84YKw1}iXTKl?xyg-Zvr6Pj6dY0^svb%Ay|Q&DQq}WQ0per{R93k;<4eo zl;s<_90*IuGS;N-Mv#}qNCZ#%Q)%!}Uo@&0ho4cV^-c*fdt-?)D;-oh8G0uaEG5Ir zh$%ZCmKt8uL|7fj@CGc&D6;BQzwEUp4Kuu&b!&hDX{H42n@xT7;6aMIY zb*x2$^t||Y&rN^UvNu=ckniwe7YzweQs2uTWQ_bve!TvNpNJzE0eW?&U#W=4zsiAl zd`DH{yjc7aHv{+?tK6s(ow3;+6W<4SBrT#B=L47%&ICUqZq$Ms4b2n7IB%R)@jTN8 zY-J-PF>3(6(Y!}YrfqA-T%-Ug;x=E7$#;XX%e;>3Jdy?+SW;%uXmu|3WkUW;qJp2{ zmj3^$cU%*>UEcHAX*Pa&R;*QO=mr*Uy}-Gq27X7>(Hs&&$%r|TdG_0;AgiW^(W?B& z{*x!Bioe1Y(2-ujHU|?-MZ_60T?UE`$tOo*&6J05UL8)0t~?i@g~b_30l1G$iydvW zidfBmmye76D4ne$)YK4IG^>akSGXRZpMdPMh?espY~W5Bv3Ot(tpE7rNJgOph0s4M z*#moszPrHa$c^1Sm+vk6dLTu}%>=^HU8i%2C=G#HdM#GRwMIWd^o%O=>~HWtTv;*Yd@1Q0fjO*XNafV1LYF}E$%H2NBm30tnpxH&g zwkzHo1~7bG&?cL&-5yVtt$d_6y8#}vJMUS2hMfREqbs&BuBi}Q?3XyI^8@9+_%JF^9-4KE732UTscHe{m6j_26dmH5grnmm?LA zje{|z$S9i3c(aFKQ^UzkvSbEQDc2hB*M~;(T-pYIS214cUe-@40h?eFIeihYfOb?5 zoU)+7A%G|)FHL35SbKjtJt{2*O(#LI!Y1zOmkhhaNy;*1>Y$crX2s)3q{J}t`@*y1 zfejs(Su{v*>nv#<+}PsSK3%{E90H2g`h7v-P}MlK)fSpHb1+VLjl9@OI0RuvXOu_8Gmarv*3a-&oNw!my}G>I zMw}zn^a44cln)3YcYU1|LBqvGWEr*(lxqmJek3EL{Jb;Qk1gipf01NLNq`NMC`uo@ z-Wi1`;R94r31PsHuZ6v%{6{R$Vr3PLrq~u(Lg34ql!U^OpXFD=O!-c6tuCrjprY&a zSK>;O?mq7bQ?2v^SDR@^Dt}6os4=S~4K4LYjV&GnB z1{On1!(y6Bp+!W7h39iDnEf!&I95fZp=A3#xIy5;7#&t!K8YgNSse-J% zhE?45t;k6Is=47Ly?`ACpy-T<4zOJ1P13%nPUX z`^6ltbQ317%mM@A`CInD@Tb`X84{alQw+D3f?BjGQ}T`xruRs2v&0RL4!HAmV@l|Ct6O@% zEs-DGBn)lJ1!5KD5#%t^L-xcHZSG}Wm{80`FWZ}Z@#mn%bOTD#LPf>1g!^cKS4d;2 z*3aq_VKks{$YwCI8~i8Y@awY+=1uZX#fPg{iH#Li{HOv@Wg_9CuBFd&WrVqrmD!BB5n5Y=%K==0v9MeClu6b3IPba zE7)NZLsq}hMFl1qtJN)oIHS>a9Z_jm815S5B{IYMZ|B@Lj~1-U8C~ozdRrc=Eip}V zS@@`J4JumPD;miT_(8qYCQ!D(;eAWn(B)Z7@*uz z-Pkw&k)=D?WI{bfbYkj@HAPK7>RU1O(n5Ny;oIw^j(#BH)K%dc`pu_@+SUsuIC4~E zQg5POQoPsu`f6nNq6oNu;euvaCZ|tl!6SZ#tJH%>RJpGI`>I?;hq#z8mTcwJXkqpD zgY;if18U<6+maMPWKKlh1QqpZQDp(e3o?>^YwtMLG5uh@lrP~O5Hhg-dWj-@A8Tl^ zdI9aaeX~c5Jk#f}*|Tr3ii=m6f$rp-NoYgfL7?iB9=!x3BB#f1iI->+|J_^)w)87( zs&SUT#-=p^Z02>p$)$~6V=n!5CS{~g!WJ{HyPFX>{5m6n-TEFy>&DH8>=1PXQKb>UKF)){r??K`x9cggWgsXvAop0{zikqgcw3G>MQd zN1!Y&G%|vTo#Z+X&Ds|8Xroao!<+g@L-_9BfR{> z27LFJrRnGkzCglX4SJO@z3~lS!>y()IQ8=h6lCzs5U~ z`=H)hEX}Pgq=&0OKO2yluqa}`u(Ye&j@JUivKec*h~xS6Lx==hYBlDofj9Pgb!gqj0nTfwA7V7fL0BYlaaMq zmNVsW2(ubO>0GTt%uem};kFh~9EWa3iX~{`FFmyEAScKROkp{s47saIs13+~ z<|SNT8|@K5*6eWt!+(wZRon+g#Jt8WbHt~IQA<)=tvr~W9X)fEhi8-P0PXWL*Kabf z7U#5fEW&xemG>KEA!)V}zdzN{?A|wz-tE42HXeHxy3jRx0O6*~kw&=QtZEtc$cYpv{IV(VR zd5ilTK+bB0#ILaC=_Vy(A12RLQOnJ=LOeRHgkLA)Zz2Z?vsI3iw4ovTQ|$lO(T`3| zd6=kbPG~0!N4>(_#b`N8bb19~549foUeyW{0MhA+*3VLXMf#ADYT!4+Px-jhkIlOc z#L5}SEjrukv%14D6Ob#&TK!nMEE165eG%%2FI3la0`(FK+5i^Zm1v%3dIH7 zVE*Zd7-cqw-!KxHj4|y!EW`;4xQjY(G1L&(@v5eCjA2#!K}#agglEWcS;wJnPETSC zvhzULGnpskA|ixhLIjSRt)9~D-&N+V$egXX3P8R~+mBL;kZY(hRvaw$LWnI%Z#s$yUO1Z2mN?`NOGB~WB9CKf1zxLcKO02sS*YhsS1kVh0J$5b z%h2ZT^|PWCul5L9EXEOMrhc$C3_FtXYcJKdS^kC*mK`+FerE6@SJjz5-fR<>l|tNw zLH$LP_n0}uRWJzBK}#IDfzir(jtjvDc)W2^yC;#gZW@UBO9Zv#wG+#Ui$HA^v|?xa z>aa%Si7$H9lox5>(B#ttK@5h_9p^~-MwI}+bd`Y1PObHtpUaEWl$~H52WE}ammMhn zy%O-i${)=ZXGg(-{6b&yz9*cN{6IWG;4+>bpv1WmP~Og!_W|^0$-OLfRq!+K`Lmo4sNFPAsmOzL=BA9v>~p#^$3he*NXb~&~f8aL};K{sXb(S5ig#2vr(DpP(99-dU2tK!w z@K(FaabZk)wgu09@#)ut;c_PutYed<@PF_X4Dg4l@~ushi9ntNe68|HM;|CpvD?zR zhxGMeQnJByvK39ON&t-Eig=X8t8g_~x?>6Q)8zn17AkPg#mXjNUOx|F)wE+V6ov50+0B$ zGcM>C?0}m3NzBQuRbr0FACQX_tib<&f{qvq=k2&=f!8Ob^lKXotYYvSwK>(FWU;z* zrM47Kv)JnmIxQvV+@Q}1)WfM*pHsRsE@4PciVPVv?q!((W7vljjSflqy`$C#Qx&D! zC8<59K{zZmG5{4g*~zu-|0J7{*c0qni9L>U{rlX_hI6CdO~aBpnabSX*a&w#M_G+G zqBfq`Ql%`#5!2{qGU6|cGX!pcN#S1Q3)jtyyVuvZm_*(1qoY?y;sTSbgW@v+l4Sf$ zqv$$nIYC~VIl(OBS5Cu2M^yILd#h4-@dCz#Q!;7HB*6+NG5vTtg^=uw2kfo>B#{ZG zy!c7i$;+Dcr;PV`czCjRLUDG_R6R`B1%Y zs%S{Q>Bes!e5a-@ifilSUq9$-(NYFAtS22rw5Z-DriIJ;$_X2}ScRf2HsE;ML2N*c zNSgPtxgykKFrwBI3PpoTMu&8QV7I(Oss+lsE#YTsEtPSV>5=))OHia`E>Ey#Jf2QC zO^WfOw94$QIHAoD+6!L{KZQ~u!J z-}A@vy(Q31V4J}Jde;nr7ce%c>1;oi_1%SDe4P!eyG?(SlaoDB*@(<9I_-9LyC;Vx zu{==~$6TY#W;Yx~%km)3c2#O`Z5Jkf=KQFOiqi|`XA3)F;OK|q1X@K*82b>YRuzY$ z8lC4sxEa)A$<0u>#FT3}&X4AZiszer!{oJYjtC263-cC*toPoi_(0n*5iE^CG5J1D6ChxX$xY1`Cw!aOQX)2l`_NBR@y;Rt*&-yp~4Ck=- zZ%}5M8}#p4MQn81VPhzUU@r0%chFlYot6|;(_X?u9 zCxBXORW+)50S>{9GThRlT?`WNSByRuqT;es)eS2oikbyNiug>-juC4sf*W1K7}s?1 zE0~q1WOBi4zGltfQ!1*=^{)IOrUkm#R9#m>8luZmTD;Q#Rq#4jZ>PfJTMyZCay1l$ zqQHm@g*d1JH7sx~RD2_cSq(E) z`I@-%;;t^;eMigH zd6X^_3i+ljO8OyqLMcoO32|mcAd;-eR^?>!HY4)&MXcAG)P z!)%wdWUVhKg_{$VwgZLa5a{k;4v99n)G^L+FIX*6igS7*9xw+BqrvV5hNSpTb}zh3 z@_<0V_Q*BG7bm2!@1PxP*&hLA4t!djhlZlrji#Q%u^p519`zP2^@o5{c7zgdM&kd!;aqD%k6u^b< zdsW;04ou<<^3B`RVFs9%D6d}U+VHH{d!@YPPxxpvEhb&e(~(ZGw6u9dR#uxahPQ@+0id`7Wsj`X$@JM|>B5F&j}DdcfI5!2DX;p|F6)w{Ph z7c|5vFUi*xmKgc2Xh5S=h^A?6jkEFQ;)Ku?_Fne)Z9mwo7xc(^>e?P{t#BA*X_<91 z&f{qF?a~#qWXdqPo`V*L12p=fD!Ugn5ZF5(`dpciKCuu zcW@rr0h$LmU^^08MsbN6;{7#6*w$Hxlh;(T?9B4h2ZC6byKJq5>q(I% z_JP*|L++m(xjL*jG%B~J9Q2y`r4pX-8Z`E3Fe(rkn<+xcohbv&KSi`46eR~zId3d9 z41eo1QYWss_5wD*D^V`)dZuSSk8(ezjhbuZpjpR-mbhZvkF?`d2+~`|$E*9jU#NWm zYg18C$lB4U^UUg`GJwzUR18N-f*S22#0)zh0l37!d2$rjd9M)BxwZ64zi*X&3HGTArUOjZVo$MzT{z$AntpJcyQJrIFnIkC)KU8X470sY&~LFuOF~BI2|9!Wjx%wx_KMZskbz_ zsL$(=DC$R!;}2n_d?CoeFm0RQaF-j*8SE;~^4$br!Uw1Op77zZs$l;&`rdcnGY>-$ z$F`>u#XM?$r+`$yBOGHJQZV-|+WpTa_fx(XSCDZ>)V4~k!)0NjX}BzQLc?-C8?X~N zVhD2>xDmCRz2EXVy59)92;LOdUHZx<5nOVJY&fil9%1n|Uxe4D(_;OPc(m&_Y#614 znj~eP#Gn+Rt~6ugS2-YdUGNpwH;g)HvG3wCh$$Z(RfebS3$KC6$1^Xp2F7M~TaaY6 zw<)t71v7dHf#YY-o<9HdHAgmniz@{ng+3+GSl{#o09mcRAErBqnnX~xQO?GKYtL29 z$d%+jfTwFRU%LeQ==}fV?cJNJx~?_v|Me+cq`D-03~1}FqT$U|@^6s0?;qxnJvC>6bY)lZCAsJpy0FMqnr@bdcVc;=2+G;`m`JZBI37{x#} zdvpYdg^gzCET*=7l#`QmJ)V4O+p(1|sbG9Nd)G4@7+gHQI_<#VJDhU81499tb&~UB z5HxksJyo~%9>a@9YN0cPvMsC zPN_T^?*RkKw_vqBi!d=iLRe>-Ha81Mv#9A+d=k^|?sW@j%t#HEnj^pIG)P($2W95C z7Z?-BR+rW`bQ)4JpeQJaH+Rx$5BNjnQ%KdCUYj;acs>oL%LqYci>KYaes3Y#xg<%> zy#uk12sPTlUuWIUsvXFMby}zKwXK|>n4t93hKX$A)CgPvFt!}DgJRY?Avs~<{bN$Z zXc=gEiY}o8pG@o#L`3NT(1K;XF<@(jGn6_9VCBnEsXikg=~~|=n3?6}0{za<7XCwU z^iaQ3t`Z3P+rx%_AdCcAqEEzK4(`QLX9)z^r9Jb^(s~9qg-y z(juH6 zW^^WEjrAKSI^2xW=Kg%)@BcA>Uw+n+G8x)ow;E~7VgJa_;m&@B*ouRIroz;qpaN~y zXehb-yWF!6HBA#FWsN=TQ{H3}i;i%hhM`RpV9ILId5w5Z2*gpYb^xKnM`GXNgH3~4 zTY#Hb`?ufA>szD2f&5LZ9zTz&D?8*(yvA|bsi$FF4h!TcifS9>pj~@qbnOTZg|-he zu&n_b+6Hm&2g{kPJGR+6U^tg0c&*+ha7;sIilb0yI}bxBQnr?hz44@s>+r8_KYNM; zfh&_Igk+hZ91cnp-FtSR-&Phk$gAhKOiX>TxBEX{?69qj_;D&=+TqQWfNd9o)M_)Z zRN@WG4aZH}zM^-WZSb($PL*$58Q`s*kXWIhf=mfGLa%IBhOD`+_8~RCgb3_BECnqj zWrv7d4uW)Uko>)R8%YP=Pn3T9TtdkVlK_?lTlSYQ?lR91^YsxHE~ z2Q_GdEulG~-(~;x0L^ZTSE$=M$bwcZ$8sxaKue~xkQff&xQb&AJ}Q$;6$c?w5Kqrf z>>~wAsa1nfIl=QgGa4}CC@D_O(drdKv-LlsggIFyfY{5TncN_cKFF)hm#dvc6h|CiyL)zI5LKn z6#s`M2XMTIWq?O;R0g>V^KCFp2~}lam{UXMazsy?+0;bIJM+QZL!2sAt+KS;OJugC z4Q*g)tJutkY*YL6fw6FD1tow8quhoZ2vsLmbN+$74W-C;48Rr_c70 z{gma70?TI`+{Ux06)xsPe^VG&4_&!N;P41vpfcOq7V(0B5q_?f)$GDQcSvg1J`QLx zwSgm28oU+|T8pgH?r_8E4oB17q&b-roGqqIv%1fYI8qrBxPKHJ>ar=}=2K>ODtCi{ zjD0M|LK1m*i@A#6G>2{MIea-n^Rxtlnj$E>Oqo*qr5PN0SE_Ki1y~?SkzV17?m`-^ z@Sj~E$_He?V!cGBNk71v8{dTK(^elwT4yE^7h3l1cV7@&SZnaI`o5qKtX(B|UBoCG&kuUry7XQn|u`}{4SZ(|2G6>rej3d=Jsa4Ar z&k{yAiwJ>#V_c!RfQ~oY$UBKV?Ou`%F`+V_m=%i?NYr$a6W_cZlJB*a6Z$r>AXL{Q3WreDY&_!%vK)Kv-M2alhvFENgk-{^V1#mlhsL~tQO?0?C}EL6sB{yp=a@&$Gpt0$V@dpNov|x~@R@l-Cu& z_^MY>Iats!rOfU5x^$V3sX=g(<)N{m1#5054ooD8T^%@(_Gn79{5p|8usnbkA=ai#&eFu$KYb!eIP`&A2 zAw|pnERZ@mjun50o1~thCa|#Hg_s6!17Jkt z;H=JR3GBX17L1N3?W3jWi}RiL;m)={h|9e>gm-JIauf`Vtn=pgI+|hs>h&hlsQn9v z)IS#3g>*1Zmgt0WO%p!S)9&YoMW?g+cr0;@ylf}mZf5I%;DPJ@(lkvuGXABYx z@yf!B`85c-A+rvIJ{iDPX8?&jnJhhA5{l=@054d<7-%H`4KTd>mD?jFZoJ6(wZ*M@ z)k*dWnJF&&$fgzS?wdJjv7dgVLs{fB=gCkTMD*(cVk)zNx}zt zKezPJaL*WV!@z)c46f)OE7^+I#{%i-qFt|Neoe4csDz^;>PLQcc&Xjt9lH{8NJ$3` z!r+`n`YEt9u+tsVDH>i(_<%(#4&-~?2v2Mic8wLhpB)82c?!WFF=rlhKnl;&4?FJ2!H4D!*EL6ZbD6LfQl!rhj{~6S8X>WmB zm?f?N^NJj`mxBO1c)W{9nYs;>XPb}KnRcD2C$pQ?T`MhPpnYR~c(DZ`JK~JPEE$=1Fim0PGH zQRX`hgkP#6LG*Wgzf9P?AynB0x+F+}Q&5m9m`=>_1DqYz&Xcmur@>;hY zyp)P5N8GEnFHI;zT0hWIqC-1y1uK;gg=A|1%($`K>&-jv^x7w4dp3NWMoXBYRipg z8p;dm8sigsq^r=(7z<9(`{5oSFLd2^URMpH%~xcZG(2SYWLNrSDnLb8(gdef21^pS z$39lEM23oB)aOI+;On2bpA`?Ml<2PkD6YgcG`>qiG(E{1ppV?Lz~5VHlNPTC`xyAW z8Oan74A8`l6-e%L^@+EgS0?6Q7%6uUlidJgT{?1B72f|il4dcF5)R`P4#NQ3B!`=Y z>g+-XlSddiL9V|9mZ`k#tAiIKw}o9cqDJhB?gzw!lEL?bMA%{7=_1y_VaO6|YQ?ER zjUYPs%lA9Mr9pKa6vtBNhi_SKfjkcHSX_1SAq*S%v)QuR%VL1kP~c-zxEDz6id{`z zf-M0t^07E~ht4k~HGI~Ks6-lYB9eE`ZZjo-hAgs6dN<-7CtZ36M=nE+c65D=35s*O zTCl-@G3y{gu!xQ-&G00T#|&Be!Cl9qnuLfOu4vTo&F zGDD07_S&!cxs}fi*%r7BN2}koTdO5wOz)tpdnav*;(Msx zZ#b^{e*}0M0oYkB_wLHHd)MS9e&Y7XBw~oF;7O$u!boIyL9W5$;LGwD95mJk3yi3Q zvM8mz@h2~dUq#5$5!%wj(-y8kW#{&j`lzYJwpNzhI7cH`Be8Jjst$T)szht(l|$~s zF@k-aCfxP4#63%83!UC97NWVLtb)zNj+1TU@3c3UN0ch3ewUKvp-ILM2U@sU50Q(FWvusf#tD{Mt#75PLkTwr&qBZXBg||ch33r^z7(3lEGFs z*3=39pT=hmo@_1BB>{hHQ=z0J>UXrbi-pxY$f+f0H+R!9&^_5}srvRbUh120?~ZPN zGgPD_04uv~o07m`pxuV=FqH&ONzX|AVD3F%5rB}>5w9XSButI^(v!M!QO33|*7RZN z$U^6!1G&;=Lv?PsICEg3_EG>QYDGQB$j*^|AX_IS@qipLvSg|kWDoHwJdG6=;$Jog z8+lwxB4w3!H}S88uYz>Ho_zQ#6_*&u4sZhzyN?C*-e~MxkXG5+wweQF%He3dyW27~ z@J@vI>h|~|;&tMiXSc`iEUvQQX@_OM!S2OHm8A45LrG}R~FBUh~FxY0K!I+&5hcM~{H92OhKjL$~|&dpLLaQI`Dh%0jgqab1o zQrTOK!Avm@r+giZJYq{W&F3a-zAx3JsRJojA%I7X!>pyjSa_DD(cfc*mLUiGg%gQJ4k)f-QZ&zNz+R!5|zCO z?wI4}He$^!_507!`P4>M(R662NCZ*;0g>OLbFMdGE0W*q(0ODV|2b!RVTUy^bL)gTXahI(S? zLhj)Lp*xBe$uDg#(nDUPZI7MSDK?>+()OgNX*$AeCe6drDv}$ZlBDjS3K4L)SGiyZ zK4z6#P2uVL!c+Q9{G$pH_{``i6aBjW-VN=PC9m`DGd;AhNH>XJrj|5DJgqAck2dzQ zl{yOQ5HFB;YGsrzN#l?(n}J8_t$25J%0tl&?^R~9oMk4@!_PsYu`0&8oo=={8YPhJ99TJ2%kGjrio?Z0S)NBpBw`4L;#SCUoC7T7NMfgDd^p?0 zWweJk*62b*bg}H8Wm!`>_6gaIA@2BOpvBZLz)N7;Y>;yb2q;BF~P4IoJg8b z%W0j6tg(JO2)e1%-=S`Y=;H0+jVr)yhmp3y%AD7S{%a_)w1x*f+oYGQYikEq9 zYi@n!jX3sS@fsbIS6GoV(W~#Hb|NgQM{EZmC?z(Wh|0m%0phuLL}8b-Rc%+lMk`k; zJrqm0bdU@7kZFJ-yr@PHEEx}mjKS_HDnr9j048f&Pgc$Iu-;ez;oZ0^SF07iemJ7$ zGl&dr^5iBBI}RU{n&#jfMR6B$6y+nutd{K)G_kk!?ve~y$N{Y-kHl7u$w-@lRH zcU3W>coF&I3Vy-8S38qBYG1L)@J8@ruoVW3TXY9|y@W>)V$^Gu%73B8Xma#rnN`Q5 zJAYH-!RiJC_3@It3*FaQLd+=vH>RvQ zeTN?2TXpIX^sft7>*!{S{Q*>_e0w@&_a5KeoRQsypEF|0v%yuWo!=FKgt1HE0P-E& zAE}mM_=QkT%~B+(V=`@3wcYUzRewU9H0x$hZEaRw-*{W9Resf~?!XuMQ53ctE#&Sk z4FeRk5_AjSmDK7EwW3rwvSD7grcU7)u$Ha2h0Vm~naE5Z6x%J*S%*rv)DE1k)N2Qo zQ9>tV%uH(tsC{D%0lJnxF*Xayyiod=HH1jJC=EecDmnLiFTT_1O>tatWr{T<#l(X! zk0`x~ay;0|9flGjsCdZBDll;>Nid;&8HeV%gWfC_Hg|Lcx08p;Oeon_(_q8<#TxfR zXwO>X2I8E!d58h$y;k3Xa5KllGkbIb6J^<)E3B2!kPG2Vd)YKV>Wh zG;kZh#8q{q;H{5;kRG9xArVi0<)!{uu%|TwnItHZptH3s58O33)75SyaxNUa8h(#`7b>nBQqfoPDLDayF61T(hq+&n7u6r0ez&_kL&?7&yfbHks z>p_EldD9`sZL+i}0DHaggO~5ScDElt&6I2&wo`*QwI!`S5KhCg9U54}@t4-}rg*7m2?zs#7A!fg{j$j(uQ@`b%GyBK6<|2Qs!C$EAU*QTn9}pqxU){_qxaFuO zVNrIKnRI#&ht;V+646fj*3mtYifFBmMC~a@L#IoGXkja3OO!8U?xCumQ;WdrYQ1hr zKk0OrUg6ZV$W(k@q8)T>K=)rl+ADx6aE~id7fzf1Yjq(hO&5ey=nvd&3 z8M`iqvWM-s{WF3+T_~Gn+?YW`8*BB2hD}KIJ;XJydbQT=-rtH!07m8z@wn1#&Q*a3 zN5Rj9lKEb@(r?Bp$_u8n6zwtUoH1Fj;$ApCp8>-e$VIKnDLD-9N6(`eKT}Oh8!lEW z9@)HlXxEj9V=8tgn1T>JM>wT#*~eR!0`Hr5`oj>4iXe*!X=Raxf1)=G@?2Ure72eb z#;bheB~=M9@^0Y7*>{G`sxVcLx~-a%-!lo$DUSBY*knAM>fXnxD5=E z_}_cA|A)-=x_i6A_du@v-YiGlNZ?iFn6yWQtP=mKn2aPbvD;u!*+Yg`^n4j(ofj|q zyQ@Wo6xbo6|D8iCBw1$}i1DB=DaiOdG%DlTLH%-FCQg*D%g=Q-Brt&(P{f%Vv9Tmp z7MLG;87Ec}A58e#2!sP!@@;;yLk^n)sb-1uON%@BHOl#-`zpX1*N!QvJhBI9N*Fl^ zgHNGaehG~R&4*SC`Xafqu^y@%id#lkN<}zwRSx>$*uQuk2lwjT^)X<3^|ROVO4)ZV zQE!IHJAScTTwQa%ONR!szQ#>_hO=&ViZw~bU}TB!8D~19L#aetdj!bo<5Y z6Fh9XcTv>XTeSbOIOVFZSPgSF+Wv6Gquc&GSJs7nvC_WJaZ$QYp)XQ(X6kle$mPQ0 z!&@#(=(+)Yv91VPHa+E+(TyMS!`cyOzGP21(6T=6z)IAnznEtb1Z>T`WBRInA&Z363aA}PoS}!h@~3$D~RA?__NAL zOEED@ZJTALfTQ0#Z5 zD5Y9_vZ(OrN#>s1++5?zQ;>OG*MXf)|(7^_G=OISr6DGRajaL$Y56N>6@UdZHr3k3c?L?}3d7PqVjOw@G z4Juqt7z{*)j_NaqXdJ_66Tt2URJUdbQ4MY=v8lwHa~E}C8Y`}n)aVJTk}Rvp;!QVjIGbMP zgx#r+xiF_`#jOG|iby(jtVmd4u7iD0OeckssRi{X1;eC=ELuDa^R1CC>$tltZaG5) z>7!l*;1m!=f*b0x-y)$9cyj7Mjbv+Tk}v+prUTUINF#)}puGgbKnMq@#o1-Z-I8j< z$3hjBy5fE<9LVKxAeN-`r*N6JWunfIiyt*sB}fXIScpTxp>~ARMl6GwL_j_AaFlEI zci5I%Qsr=-O;#QTCzF*V(QvEQEm`=%z{HVSt|<W&r{w~?%Yj{DqE_1qK)M+YCW8(v1az&Scm$YsG-izA zCK`vuSgcRM#Wl3y@E0M~?kdHrIkRntb2cKMhB5_Yon&$?sZz^}?&e7oc{CVZeg?Hd zV*K?Hmk1|(o<0$ze0o_p0ti*^X8ioNzv;fN>H|3wu0L|iX5!oVwadmt9%wBj;?UUo zbX14KVj?|F+7?bcvF5#x@5ai}P;ejIP2Py8<{E3HmsKcroTSP!f-<8NXJ|ap)!>Zu z9(LFHd*$Ht+rj&3wwgAn5T(0A=emPeBR15m>*8Xc*Q%r_(-05&I# z7{Y9E0B~kXW?MxTP70XV*73<#{o>+-*>TV5@NI*r?)o`R-=ZcQeueCH8Y58PSgpv+CH(h@c73EQPCz|e(RI{Dy z0In(Iw@`-hl}aO13CkRy%Ku*Kms~k{NrZSP_&}bEB$6 zI#;5>z#~Bl5~~*RN<^_>cy>6ZaR5wSQUeT8X#F6N6o^xa;tq=PTMcPheX^j3?10HW z0$<(YLuc%R#H7i~OWL7851#Cj&B{L|!e3e0kmwO6*@(~yko+LxsH7R#8`n$0Qq$V6 z^XYWJ4oSffr6#(h;d5{eZ zJK$FqwQgO!KM+$>^V9R7Bs0pEvx}v^@v>%?ZWf8p9m5Wl*jlWO?6*xTE=~@ovlbZc zV~2cuYHBT$i=V-zj*rowk(4CkSRrS4=YKhZ?`1H5))pZzC$=e(e`Ger%hpTxBmL@Ch$|T~X2! zy@>T-6LAnk`Xs8zU==?$ih5MhX zdoz;6;Xr6iPBu$0RwsuXfL0E^(AD#XBDi5X?l@icwT3FUzH`;i5WTKhqfQ)|k%9R1nCW7Uv@Kwru@`V_ITOR#7`r_uT7{emUOi+?~Ci z<~R7x*aH`5=J3&KqvA<@{@sL&Bqwnr>?}yo_dh|A==jk^X}aL`Gk}mHR*_=GExQ9& zhDPlgtz`CY)slnD8)c!j2b77_o$$XyeLl}Vqmhl^uXLB@I~&m^fOT~7_eO4h@kZwI zn%G$<+T{t37CtNse%Y;ScDzpRKgnmQvXMhL_vDg3yo!v;CXIbbrii866(Z{vJZ_eV zBT{#rX=QRD%A_TT&w50Af8dznWaUK~%nS@ne|aP?j1#v*5m6L<2?H3gdjLDaM`PHJ zA%056M{u{M49#clfvv&6ms3JM=#h)WMFuZAd2-Yo829HcN1(_Am6GeSFj8Gno=DbG zFLBEySa=Al?D&7=VyXT9m&t_Nk4R>Ppk9iDYahYe1pv$T0ZOeuZl~s_`WSf~DOifj zO90I^wM{N{rjeKkBQEV8D9K=6wNP%Wk|v`B^N}hUirmMmybNyuI0K_Exp+}~RCR{5 z5O0>+#X${;y{e9v7EV@&y1W^c++nZEW56KxP7%6(x9~=S@DldKm~=+#&I+|iSESl%4XG8@FzF`<+rK(6srjVP>nLD76M&A)N}PV`dv2DMOaW7|Q)pQVr2{ z>R!QFFN?jr4a;dEtMWP0Z%%kNQv92AE=+~;208>N>WYr47nROozLh^8zNKDm)J{s6 zd$LVel5E9Nk5Y9I$ZzO?dUNa(%;?_5?Ywjxg=WhZXAhyLg+kN>GGoMOEMD|hgE1>flQ_a(OGk}3OiU)IPsV> zbRt$JRTEu_Pq6}iv$i@}1dtEFC*&lbZgJH6cr$&L35BRkgkBu3eqmcEcV6GbH73y* zR4LK@jM{T8h*gD2AbsK(`eBSg(f2jI%s=Fh>Dn7+wnm6a&8k1*(`s|0x(Q>WpF?d5 zH-rP2!d@?K$#o@NTL)*c#)}MYV^tU@XLU2J0zf)*V`@b@l$47R!9CitBUF?UYG=G3 zd91*3WXCD{4oeM%SmM>Dm{eVyJIl)`mDDEk_KjOWm^;LnWq{n33W<`Mk`*+aT|()A z@65t7*Ct(mestI!gzJK2?anM!7dMq=vw*WXPnTaNJc}iB~=6aH|m5d zbCOp!H_58xmAU-7JKXma6ywvVmsDI_txlRXW!SIT)!iUAN>rgc-DCIgAlsmC2NFnQ zI>svkEe)9_fr?L%4FF6<>9;g6Bk76UPY~zAK2u;J}o@cuV)L- zj?{kA%>qz{?0V2cD~o7*pB8?~Avozj(j$wCVqb?57k&4SyEb*<$uAF&bH*o#faC1= z@%B1Sk604M@~xLia}_zKcJd7-*!lH6iLh6`LvlqCvvw6c%E9m+`{TXG|MYv|vHx~> z@7t3rUHbk9TEHa^mHfyD-=WOQ~;5(oJeYQ!QjCZ3Ey!4rb9TK zYC0MQhX^BBDT^Br%%xT~78Prrnu@WNvK}sZbHZVUVDSS-9ghhY9~^Zz7es`JYDul> z*j?gJ?_JPNjEGh;i5FdH}&Xfk|STK^1($MP3zlWB(s-=Ssyze#ai zw(|!eTP5eKmEstcLDm%Z(IF#L7J)JN`gV5KM4RsKIviy;!f_BGqxw=g)g8xDNC`~~ zy9#x5;1=@HyHx=~QV@-b*i^<^`T?=Fkgf!+u?(nbXOzL2haQKI@0?4;(Lqswe^t*Q zCA}#k5($oyYUUgwV=Q;xU*^#ifY$B2XMYC^!NRt`PX4f#WMZeC3jC*mj?XG=m4?iHj@P1MwoZR6czRBjFb3kIoBNonjM8pb{i1AT3~GD`=qx zFO;aS!ZRM36da>%RV-ZH3~QePwiU0<|My`>d3A5=Xxm*3C>`xBg#wJK!wrGW+uD+H zad4_hbPPTPwbXT6BI|DR|6MeNe$65u-u`;q<-1$+9zmv^VIG}!Ck44JN3=|y)D0Bv z5T%M;-coTG0D*V-AhoL1HQkpvm`0HZXBC51CcMO%5gWJK)MR{3i>pb6m{0w?olUkH zGn<5*1b~sg`6c1j+rtlX_)jTCvY_W5JyJ6!WhvMk2xArIk#Ug7KW4paF7r!U_^1p5 zvonF-W*?C~KCFNxp6)E;bstb@F@h997 z9ROn*(a$kjr7{Ftd_gHYVGN29lPm7zhsrbrD-B`Rw|YpA=Qe~Mmi3f{pDl=L#0VnR z7R{xk*1i4cX{&&O{HI7hd^E~3R0*O?8e0*Pxhu-mv#N2*+K2LdIY@CtMmIkcAh}{^ zIY>8!3zqTGl}sore{VK68hpLk(v;?Wa>AmFs@*7e5-_gn?fksFb+68@uVWn=rnCp% zc@?_BSNAs+w2QSPF$WC_FYCG*T@GGW>FiI~R(K|b2*Z8Naz2FImKZ|%#WgA)uxCC9 zSseG$D>@O$R)t)9Y~bWN`UJ3eR?<9ciyHuIKnT1JDHyt^ad9rUL%ABWgKkr3x$J2s zbmhb^h%u&BTM%+ui6U=g1%xm}hN8u3WcTGKqS|gdXzBV!I!IqtU{n=`kU@arm;^YNErmY_VWf7iEZVXk<47whGXdYJDCk;y#kH=;r8$Bs#dqC^ z8cjso5dus34#!jz1z&%yYzl@Hi{lEzohL%yk*qqiI;rFcS+}4dBg%puvLb{kE94Ha zRHKLs*la1Zy@q%0Zd#N<1_%eQw44deuXt3>;i?MNjfkYSNEBIE^?7FY%E|LF`qC~8 zuW*fMdBn5{$5_&NwGvgmTEJ1j0zyNSYumLp=y%olknIb-Ko_DD&bEY;$}>kQ`Q{QA zkTXs1nIpSEz4n(@;eh@zeQ-im(V^t`_3PV67!-=2?6k>bdaxR=f88d!o~UKTEr6?w zD%zgIWj5x?($~kr?x;wO7PE4scBIzgyL0BpZKT1?kb(+>KZq>*o@4}GWW3IYAgSnY2R8zycS=4JbU71dG5%=4BT=YExzT8En(^y^;;;dC zn0{dg7Du}&>-TjvZ( zUd&;`1s!@&o8BA)=Hw_BI0#o5^BrfqGQt4vjo#Ewu zRXUB>d3SMLv#Ma9a!s^c;ZP6`-^v4~WSmSp3+QrA+!xb@GC6bMgp+6ZS4+?dM)pYK zvWV6Kv~mFQ3z;xE z-OVe*R_P_SX_G4bTy*D+(rp5yE+0k)g=l4fHtQ&FC_E6hrvo;l7{25WySCB>3Ll@G z9;yz~l9`|uzYejdFsOCktt8}e*}z(!{W5~waP^LBNCsNM{F_$#6o~2=h)GSX#U=@) zCW&~L)F9)mW~dykV%@BISnPsGqKtp5d@QfpQ2CrC!lzFsvF}cY?LZAsu!yX?W3OBX zmCQY037?V<+b#Ew$O@1&f>W)mV3r9yZ1s(+_^`r-alp8tlrn+JLXE>2LIa~cbZAjJ z@Wq{7W?m)(2_rB7id-@@s0gx=!mEq?AAyYL2e(L4XPX@nuTIKC(Ma0cw zLMCVN*;Vqpc?Rswdn?mJAhPu7R2MP|S|M#OZQ0rFqf-`xR|qhw!<$RNzJ_q?IE`+y zrZnCmjSgI}(NzvPm@d`Z2G|GZQ2VmdYrEaNDbFjo zWyv%oPM8Jie0@|d|KViPQA_v4OX&3I=wY4XbA$_q6+v@`|{lnNBrn*~n5If8n#8gY~^ z9>%J@Td~f#+F871Lb8^0d->AkTF%h-cq6P%`-qt`m5Y^bxFE*Y7CKMpkb`z)haE}b z%K}5Ce~6c}LN}~c%YzG&-8fs1D5Xxz8r6kIra(vlGSvWKg}qQ6#A5}-A>XEoFvp53 z93FY34dxYV@IL$Kt^{bVCI&fM3hI(t1i(P0CpxJC-SOfK(P%#lDL>azghZ4a-hX{0 zyOLktg!XWB$hkmhhVI-bJmwf?s{KQ<54(}G6*uSM4b6nSJ?V$`wuPaFV2;HCn7oQx zwIvqqd2O0iYSx2>ulyGvqZpzgqn&U6acBEa!m4TY-eI)V?0~%>8@QChqH7gHIFOD_ zELMt44C7l_VXDyln#yE}Llrs7~OYgoz=3}bT=_R`MbeuhrK}wIoITJcz+mavic4DR0D+Plx?3a?4KN}H7a86 z{m0j|zCACZ3fz-!C-@z4=_QmXY6Z=TgKn8=?(Z||?hiWRXspcgPAOLslUK&(JB_Wbq*J0!FQnR7s9Bop;gczrgn?Oo^4MkbOuML5xYaWc2~R*0+)f-z z)Pz<%7fz5NyO48KF09$1{D`7jd&78siV;dCl}(9xX&+1)mAYzoYDF4kWVoLUP10pF z+NywKU5v_Bt+|Iw1oxd=EPzoeC=PZIK^qn#Hj)BDY=k>jMtnrYxkB(F1^6bxXn5eX zn=l#(ak5#RE48y&i@a1;WvF5f`*Kkogzl>G_B6dZI)5V#YE&ikCc2{H4EUTISt=u( z|BjMJLW6Ykas2Xy*o4(6mwgK+Qj}6~O{E7zSsju@*b{^(;UN^^_#`)3w&b{eaZ{Cm z^-ScHGBIX*!m0^+7}`OkAV(p5m`#N*bzre#C*Zr~eNzrUq6+CEE#xsOh-n~oOU|$? zUIbP6Maj|(zZ%Ta%In;MVc$zo*?^N(r)YQRZfz(qo`I!S$=6E00Hr`6qddMy_&^)N z3(~&Yed%NVFLkC#dleFCZ=!;s>?6veiwI>(0^>o2(gN4;0?@L^iWEKrX(RzT3%R$s|#pK;2ntv6JHdyrV6ANY)$r%u&}8Y*b!bKpVIqvmHaR?_tpFlu;d zua){VD5!A|oR3t84JX3tNG*#~rv}}0YN|!(w2(wmbOUI!_)oKKyqeJ}8N^vPqC&gzFHES3vjV%6U@^|sb_iwocII%ix z3gRgC9BF41#Xys}T__>dA=mfJ(dS6fs!)uq-+4iH{Z!xH>0JS!XMY0LiPOhYWBH=% z$D!4v?DjDXBp*#+f^?!u6T#1xnn4DbvV;t>xY_x9Xl0|MyD5WC&UsyHKdJ2n!kD}> z)(}`Z0~uuR88qNR*q_j;1K-Hbp1~T&HH#{+I-Du6=nz2@Tdvq8u9No;;!fyB&8}4* zp#X2OFj<5cfgB^w(>Q2p@HRC^>kyCDIvz}Ix1aZm)}0_# zY=lkNbM>?7dIlT$`6y-H^3tX<_-FY|5IS93ZJomP8zuNi2om-@KmMq{W6IIhfRuBn zpOu8-(7m>_EVK5|veGA1%yWuln7)G-fhq}oX;1OI7^}4>F&F$BeC_Z|Fdl8OrW_;Et^?o^ zYsRoyd*D~HLJ1Wj1hj6BgG6@m=jiZ6ac|$TyQHqG2V$Ts{w1}3A5Y-EX552PmaYpO z)5@w{1yU&;Chkx+4C}OE;~Ya*4X>0O96~vMnOiskv1N0Xssh5AuvgYMMlR_(LOsWQ zh$CfIM1M+thc8;ilZD-*qilzg{!Q{bbz1D!9?RIg=$i9Is;8%viv>WQ36 zqUIsa@wi>|xn#k?>vw@YbzF2{3s01#3ER(<0Fpwfr#y=uDMp)--Na$Ztgpi|eO+DW z8L3fgoYBMkbAAq)LD9dCRnkM`&b_`$S$?GcUuW z9z`W0^#)64Y$rHP_FD9SGgDXd2qLSPKdl3{5dj~%5kbTqY<~(}+H5U-^h-t(-pr^5 z;S!{kX{(;^IIG^O$53DU*QGx+4?wutX|&;%*N^S=w!WZv#lnG_Ri2f*UcMeu7oL|J zeQ{I>5;oh&Vf+L)s|I9=N(&i38uz%G=!BA!{`s9i$B|@X2^|N+#1qn~4Ust2 zfRjlz{BG4!nsTc|NXmnzyI*z;qmb?cZJU1SDH<| z8JeNJH-fVAl%%(+3nf!W>4$b}AWMcr9j$hm$#j`_md^n(?pBv~*0LGJFHSOw=EG`f z9R>oP7BiJ!z`2Gh;S1~Jz0!*8#j!-Nynk`9T|pKU;kP(~w9csZm_I&#^zPlGPoL&F zXTt@}NpN!t$tXEz@YSbBPU;jP0f6ZV&E3$9rIG$8W-x)1kGc}`WI@=JE0v27uKGC_ zVQ6RM>_?@?$VGT5$Q2%e_~ju)uTUI9s$~2el|QLef%#QOPXZ&SA(=cFq2;-4Me~3PZ#27n#IY7JAe{`jBzB8}_xeIn zL$RSZVN8b~gIcXH-?+;VwFhgn(eq#u9n=mAwVU`kZTv$Gl2nhh z!XhG8Bp}cPnWAecs=-&VVdG8?RVVmfkF)oPw=?T2#IhjZ$rWq6S#IqYUFV3n~=nYeUN2$ zSR8mDN$^|tHXN4roZ5<1j9HAul|RjQVJ?>(d!+Ks2`82)-?8EwM+7-P`t~~+7#N_6 zEvR>WFbNuJxMyq>{zhG1RuyIuB=U|P_k$P67Btw zb2Y5>HJOtl)`$(|@Vfm2rJDa3AtVo&D@8I^2o{U`**OWi;`d==4kShPo7|$;lq%{j zAIn1-vEr^j^Pg_+4dzesPjoqIeU!?>%{eTnddSbL7=AnN}26le7E6~6Xy%bPIxFQ70jIWnT;v%ggW|;dL zPOAZpk8hV8>L53TeaJctt~=(c$#cuolN|ZqnKZ0J*s{iC$eHdRGFdk4cNn{WvVBW> z8o_Gz@gUDQIq>xcFXB&)(PxC9bLXA>q&8>UW>@zM?$oEuWL zK`Wf6_GrYc;=f|3xD)brgqejBZh>wS(eWufuZaj!M0X!tVN>~S)7$tKWhPmKya z=bED`RuWj8TrOPtV0Jr|YQ&LD6>&>cB_V&*2lLh#!%^&teHaZp@4{%tQDg7bOEh#2MMt-|mP64B#ysF8;%CrA#80B=wonrM3WO}pEPh}$ z%_u9DVK+t+!UWuV>xyM*Ua)kA?$>1POJ_UKD;c`01$(aDr(!(nMOz<+-92e2G+9s=7V^F$&x191i6nmlMe~TT1)DC?P}d{U%#q%Cv!d2x9a=5X5Nk{mz-6(Mu-12H_=8G%04N@F`lYJ-CcBC1050I&6v| zUW!%dr=_9V|7KSPj=+nXXyyZ*!?P0nuIhC{g`pp*WNh`_ho}e19$)YEx1iq)C7yZ3 zmjU)otW#@#L;elcK2Z9Z|KtF%w&Utnz915Z@~*_q=8IyBQrzRZxsx0Bg4J~NUO>)} zR*bBXq0Sm?2Si33)?P&sr}n`>Ig0NHCw@qNky^jx4%}%#R;boLw?dzRSpPVzuPhLl zT#%m_TBrfKEYkgzDuyA4=HZ#@Hl;ipb3p#ea_#JOZ}J0v=8!XbRQ047x{j_9>LXz+ zVs63~Vz3g#Z9Yq|XZOM z0L^rZ;CQf8GCE#31LP_;Br~gkTuvmLpK~kg7Rm>3O=hJiaB7g2f!!wVcMm*~EpT~b zFYh*x8yIDh;=UrQla2zi@)p_T13qnr)gET0;VfKMzKl$6AL@ps@%GmK&i>9GiF<0^ zTOB%#J#BxY_rMIqsi75(UxYs<5tepBh`HIQltPGAxaX?5hF$IA!7h@BuW%&d=odTn zayA`KPizRa6^WW{k5K(!-MH&>6X7Y<+IRP~`V+6d?@mHQLQGbmmx0%sWPjJnXSV;C zjFKabit;=TEoXJIh-sYJA-32HG$t9A!Uoy?QacvGzrZx;z&k%~K@;0@MUS>d1T?Rv z=NIiQ$Ey(-*6JQ@NXbT1rbMIx`(btG6ws(vn8+w+}kY zM2suqFW+!%L6w1O)+QJsqKI`UYa8&uF)6}$5K2@Ns@sMXA)o0ga**Xkvs}yDA&j1k z5(G8FcO2&CgoZ{ped_ShyZ0!}oaCLbxtS4JtLZbt1i|(aCmmd7i7e$jC>0J=#zECA zHbWTZFvCvWz(kz3Q~3^8b8n{-PgnIBsX%1GD-U_=`-7e5ktk2v|GK!{H(UF=+u`{s zNlrDw9?vzL6`Bw+o=&fC@$}xEv5%}rn2CAGeckwiIWVY+2#`k;LriCK;TW)WAJsVP zP)X`wzEAJb{Z#mI>2|>|xnoyB^F*F!D>e3uKuOYvH?5i|EJ0{bH8mm`%xS`MuA+{h z;kAR()O^S(BK-)WAr zJoihiI)jiRd50lmv$7gFZILS+N3cNHu$&&J*)ENau>54RXfKg_AFFm~!I#5PrY>+J zL>__dC`j)WmwtGEL)~zkt7gwo<*GreW?ynR#-oCOEq&1a9cI4RtfRpg|nvW?B*)^5c!&g5%#&62%R7K^g^0GC4+g1AR4N zCypFl&Q&)bE{U7N3ttI`0{-^!iZr(LlL<35 zy+FabU{z^zI72q~*53Xub8Pd_JnOr?euLB;8jSqj$1|a?n1{t4SKKA5n|V*j#1R=k z3zg*N;0_GE1G@BRG*RYK{h+`?pv);+gD_Imqf97(PbLKei)l#r8l=3F9t74}#uX{_ zA>X>bYC#ojgL4f|Z}6%0bY;C~Fe-qaJ-{JVuvfZVU?TAwj+_9Llv%0BBJ$AI<+vS5U<)bBrLGf93nKJf`d zTWSvY%5SC(;Y2g)q~F28KHSQXpb$ZUu;20>AoY}c$09HeIYxTNA;UB9AE!Nx4&{tXf(rmx$x^(-2MLb%HO0Z z>F1?~+TDHkXVc%y@wZ1>bItAlH}iie3&Z#K-^}%Y>Bbzcw-<|=aGVCBz(l5!eECZp z>+l^RS(x}T$tlBk0CH3JdB~6-QZo;-qJtqb9A*|CL`<mvnxk5K2 zkPz2-J4=^(xv=%%r>_Oj_aIP3)#Pa-L+Jwv`O2&kD_Nc_>fRwsr4%WF zs-wIx2BWw^txRSwh`a!=h|&Z!DG|4CgzSoS@=BDlspN5ACRVNL_-U8B;+L=901D05 zRfFB~9eXbme&I|0)~TS%jq>3m^Mw6rj#VXE!#zcmCIgS2n<>-!mcNC?IW!uf?9VCn zuMJBh$c^waUM#5pLU?Jq!*wY-gqy@Fcw)ZwIZ#Rku@+ZqOcTnNwoad@iPY%&tCr}KiK=U0%;@Rj%u-B3it_b{0Sucm;1#x|flCK@ZkWRa&tE*gM?EPzcZ`I?_V}gNf0tvlgA}*X9ki1Yh z){Zc4MOL+sz$dUZ(z%#%$ZPjR>09M)4BzuychE-T=_sj37a8=V;6zN=<&=d#k=g?8 zOP#?}bzuNC2`5KyP`IOk(-kEO?5F&R1SEs$eXd4vwG|s|w5BuPgQL!pUUF_5!{wn( zl|J)Bo)0MQgAbtaeQ-xhS7JV=P7O1l8)^tMq?hT%;#YZ%j!!1w+-p=>R{&cKK|2}> zxOukX7YI~_fyZJ+y}v+n&T|{c`($B*>Bq?AwZ`hDwMjN=jjbn?1#Pua5OX0fOOoi1 zyF1UfR0WR{37I(fm__c%V#591)K4iMD41$bUV0QxnMzz=SeNH+yf~AQw1lg(+jGao zqIJPtS*wDh6r&9>&fZ)(KsJ{h1qOlJOT`MBH6a{goG2FG#LVu~CDGf5wq{fxY<{t} zKJ6{xJEEPvx8$FV>TjaXww?l;Gf>tSxB$||XQt7ljh(XsGq2qeUK^iG8N%bX7r-P%|r7Q|!4_;<uKf7@q7fFyKti+^3!?gNsuxo~leK(^|WtkG0Ch z;dCC55JE*)h?{8BICyT(i;62jF~2=8>wo@f{IknHoZb_~5HURX_#@wds48R`YYtFs ztU{rXx7TNK@<$#M9S0SVN%M>DUlg!eL7I6%yS4i)ykPKeA^e- z4;{R-H5>+zqD{R4#PhVqtv1$fh|{e$N(wqN~e=P%r9 z!e)@bmkay5Y9U7wuFmG0-GlFUe-t)aF0~Ih$WVQDemvOOd#o?NdHQVoPdj`hPC=u6 zx;Qe!x6hxw_oW&Dh2KvF^&6a*F*R2U#-N8@0-)()%$-$|9Vs-&e z5d3Lx>$`y9Pd{u4fH6pP-}{MPWBT!I;iq=iyzbNHYu?`9-V!>TFZ}e=&huySkG&Ui*89`kM|PK91x)bAirz8=_ABOK`4I6!@M<*{gGhhD6)xI>Pjr&i(iznC3{xrk$t-Wt+24vM*J^J*!-96Uj)gCELl;#)w(6^#14_2Y~>agtsL)sEZb>pP@QZ>e2s1^=?RwhpRt zwYB*dd%FjPcIkXUUfYJK_PqT($WWhPuEH>q4xc|e*y1DM*vC6h0lkTops5V5 z?Z=m|E|}+h;rkyhNx{=7T!H!hv!^?JK3#aab>Pp0gT#I((a-!qlQSfolTTNE>p;uU zjC}WEufBW!gNPAc%hL263KJi{*V1A@7`nj6ck1w>mmgofqG66c@gctZ{)ekqZk=-Q zJsjS}p z(8s#FQh`upSy{(dWKIeH!nx-=Pxk*3Xm^aFZG!k8FLw8y{U|6c?0o-h`;P+VcmMhL z!Lx7n19Z=~9`9`Pntsq{KJo*XyKd2nfTx7lON*p`#2gZDMV)M#NPFOOiapKq$KCyd zXV3qlk1r#|fQ2W%$C{TWBs|o3dp(nYtJipYG^2d6Sltj+&`1|U~sUi zEl$wvd|hcFV~ohC#5^+G5jUyaZ$G}%@iswP28$(GcnoAFl)<8yHC__wdKzE4sWKIy zpC_0Zs3z9&mNty!y`M2$5NWnV*`CyV`G9J$7O=r$$clfZMhx}~(`3J2QI+PGv(1Kr zW1~kzw&fV*rNOif&+N(D@(PEELd4ZnqZHd1$Qg#t8)OznIjNL_l$y5X!-ZR|-fwHe|g`gSV1r(>JudhyN)r9`P zyyg_jBoH#>{iwJ_Rb`Ohw{qB9M9pVeARK?-;~%yVjARn3u^!TYxeY%W-j+lVnuEVTcGz&k>hS z&I1ZY;y3a`IKQ%rR@ef(5#Al~8LJuGf1-lG{1@d!wDYk=BWpggFW03I>Z&%rY>0Ebgn6!b&N zSLax@ao;LZk+4|@%nS0yCC|IyB6#sRmPzurGn!du_03}RO4=T!P$l6Xz&G7DEx0e- zh3Dnu!WtAgo1gMsf=1jqgnux+4~j6cQ;0geLa~=7Tv%kbzR*EK&T%bbKJM{VNjqUl`Ys25QAKO91>>;1Uq`JC1)JTR0rwIVdCszPF*yaxhfqjaGna9BK4=wIMc1jggRgb`^uaHq2390IeF;*=+)XJ zC{*M@Gd8i7^=QvDMgt|{OD2d{QPz=dFmTo?J{`wqV1+xhjw~BrD9K3@7a)psvdr9B zd$}_Z+jJ$m4>U30TsO{Uzm7D+yfHHlYko(d1pKLw0fd^iW%i#(pBV(PriE~8bV2Q; z2O7J;sC7#lQ3ACgk3GDbz>}75-kUYzHO-3lo|!z|Ot7S>nLx6~&t81U{2N_7;nmLlPB@f^{t zx&QXxzQ;rKdtJ)6wmI#D;5)RZ-U;zfhKtuGG69-nK}v!(e&>w2(_Shp4kId*argms zWmYwK>H*PsAPj=L+6v*elK9OvJv1$lei8nMe82NrPZkNm;wvY}v6gWvuHu4^D2qih zI3x;h+&Im*WK=K&PBBuMEZZzqZ?EOHyBJcC!A001tC>%#F$oeXPcC)Qoud4Ubu_Nv?pVBWAgg6xho6Rrec*UwmglN>J`cW2a#Nxzgcmx zStSRa->H$kEQRujV)To$m}U5&`L($D10MnfQt}2U2IKrYj#iEan`ge;IAQKZ6{)dGV;pwMoLK>XOXqnu9Zkn*66A_xw2vIBy*uJ_suKX0Tx&W zwCqsMt^fsRk>24H?NXZ)C^0DfL9O3|nJWYpDWMqvIIescWL<=?M4rmd6nUD##Apeo z6<1IT-W5D#M`dWDc#wX~WT7oMJzkD~boSDH(Yc1g9n^CIjjJ@-_+sUYpQGf$6}`IG z7~bMvUAjZbMXXM;o)MPc9Yw~jt=JrL?mZ!4e5D$*Dme09a((a0evC>Zp6d$UOFE{>wlO%bQ2X75mo|k`_No^7bb&BkxyN5F zEb&`-JxH!zvU~Q2`y?!(xNJRrfulVVTxFs`gUdV}aW4GJ83(IG6?`+w>oTsI=yr(z zmAbhT6;QbsBn4}ZYOcd$TzYbTnS+D0$|M=tG%O4U0!R?p|9jkZ1fWwAKe!L(`YM|s z5>}A=^N;}wJ`NL_Ah=Q`2(gT9NtDS0WgA+%n`?9<xBn+2e#Q8w!w$~oTPG# z?}}grIy186b#yG%QmSOYUYsYpba9)$>?9LdTHg*ura5ESQFpcl_3@-AixeHOmaIES z&6EzavH;xRMg3&io0>`csP%~W+46?kTy$j#nb44KN;XlvGV6z-vyZpeXu4T|D7#Cj zS9SWBu_gV>+lCz(_4wm_JgvuEXjHR*EWRj`CyQC4QK&%Eq-s+XsKX+qXpxy`c)rda?Zn$3om$p%0HcTH$akD#>pATE6lgYdOLw1VH7K@6=`;Fb9>=T{80jPVEf5Yzvdq zKq&Xow*pEWwal4It@3CzuXgQfW5@v7;?%s>=#wx;ZCl1I2}q?dqMF2uhLQx^ww^z3 z!?I0dLP~rPfs;K_ehR|hIX7&U&8z<70Bp4V)w!W#Inf)TZ4s^Rb;qQUfHOG3ZoyOmu=JcLDH`dccDJ#Ot$`|1YpGE(#`0DKUPPD?AUehIXE z;NnE7ImkVcq8V(uD9-a9MYXHJN93D1FUTN>0q$Xdn_I-)JgI@dU|xMAHzmzzX%ouOrUX6onYi zxtn=eV2rG8)2twBIW)!@#*&f13P3uW<+PI6z~oEf38$i4Br-|5=Wn$1#LnP3{m=r{2RJ(&p zVuQ((+-2YsNzVhS_*6pRqEWC;up*Q3HEH6hPptPs7*WE?Z71ZX_d84=vXU!( ziU+e|(ScqPvkcFYJ4FUkMer{Gb2nm?d7G8IC;^}?Liq#P7TZFy$iUsjJ`Got=`jPb znjaoY)mc{_ghQ&S82tLO4Jr(c6qywK#{jYQ1i(ZAppl1i1V(tv12(vRnZo z!{C_)Y4q@&rY*`QM0;9M=H5j5r6qK9aRcbxGA}LJ<*8`1awOCG=lR0QQ}2&H6*6C2|bqYs9-l6{Id`+iu$d)(y<2*pBQ2kCklOW@DZz4lt7T`j+E3RsX(2AQGLsj`&kd@8LMJZWEQRCOLo?A zn#=b$+^!fKIykV~+v(A{$%fj!Ej)<-p*~4x%)jpbLql?X8UM6D=4O4#cfQ?a5;?vP zmgtx)%6U#<04V45HEp-0wy^OG-uMAU2+As}{7~B;gYDq}Bp7KRO(w(^m!c(aC*q@f zr$@9a-?#$GV#xFZtxWFEUAj#aXq)t-s=|fmTOsMvDCn-Qm*v=>nzPdZ8e}RH z1#${IOme_}S0=L#WtLeJA|8IFIRid8_AhT1CG$kXV*j?19j1tP7%8)&SU+>nQz+dd zkZ7a{|3MQc+|b#iNdluFDM&0}2W(`AT16>-VgOeZPT2D`hgi?Q>vuSqxaes3R9$n9iNTNM!s#9 z%SCn@si;Jg?#1YFM9H0o`b$oj+;B8eB6Bg2XPu!Qu_XgEEhuYjVg<@wYVeCeHhf*H zG9N*FvEt>Ghg^+hufQX2J_&azhhp64UmQA&;g*lKPH^%PP1Dimxj2$UqQAVmJB<7F zgUQmvmDQaGi_4MCPWo8bY(DCC-ouc0Mr0o%V9o}M`Reup_YdGBycTRtp(}2c6UDv- zH(BBnmh*@=424dWetmt7)gkFoi=EpbL!Ue2WR>`7PFpNm>T_ZB@U-HbCU*VYES4H8 z>&CpCWnH?ku+RP#@O7clA5WB60Mom^c}pA>7-KX(Qm{^uE@mC$e=`JXc#pfnC7Lnr z5?PeIIZrO?!&Mnb(__5-pxL58!Cn4aKD&>e1RN3f2O!45XedTfS>B`nqp_&+%f=Q7 zl%PCHxn16Xr^3Tg;HE_yDOT3jbZgD;LbDQ^%My`agh{9!Wd@};i83Lp`la!4bs{;I zBKw-!AX#_W!~<6DpZ(p23mtyvoqTp0IG<>dhu&QuU%S3 z#|(2TTv!40G^?LIsUI;+ox$&55TeDt=?DUHea?prZgTQMp|Q4+_!BZdX4FH2dMop- zzcF4`9?CY!CGO3mrsL`+s6Mvtm1%^I)xLgKQRgwG zJ_|NbA(h_hKM0L|_!!z$SavLhJQ*LO*|kqDhNsiDdbpkrgOiE_ zV0(yT3*3p=M$86EKcg&y~F=RYr;hnst2VMTNmT!XFh=p$jXWG=yxfFltlvg22Xp8xMG9izqFT6j7)uTQ3pY`#M* z{@)}wEQh^6^deViMAnkyTjUFzQoE!R(&QVTh!`&tohVm zFaGw|MS6jGeG^A)bl7mT!J0I4pEVpH;A_THT-r}*xXIrj1jQ-;)QFZeB}w{-(o~~W zIS%39*)=)jxR5xK=NT{p_$-~iwhI-#XDyV(&F6=jjXvUX!SGY?U7eO zO?@$?0(>0&(b36!yobJ$_+CHWCfPanlgbYq{Ec~WH0pdasizd|o zUk0&xGNc3cA-rW92j2=m^O0Nw=at`&wr%P=!;RtG*C0A7GGG7(0m(AHM`iyc0*A0c zV(H_U9UNmw4q{G^gpAPQ-=Pm9Cl%eM(<@eAWx9WL849TyS2R~~ge>H0a-iVmXK=^- zuHh+)dF@vtVxeO>s7ZrbU?2m7>CzzcNZu-v z7|+E0jZn2NS=LOB?&Ib!bbY%3-{bMVpTsn z(Vj)pK3QH3bwR*&(&hd1s)D1-X4I>?!8n%8F$YFVC@wF#)~nWG_5Ge!vU72d&1L#) z2q3u*d)8@z5)V)AA&|sw_O8h=Kt~BLHj%f}g?o%--rLAniXA-9^Dpa0EDOgp&-l?6 zTEkuNA`Ojp8Us&pd)hfVB5IU-5AGSGiQ343ij3IQ_l2yyKT>@7JA-hIGdHVD%FsIocr(d%w8CL&VT& zh-(=2nX6!EYm^#{e4{S0kSrbVDV&1BHB`EaO(5$~wJ(gy!wncbQ(nDFT1zzEbV=WK z(Wb1pO`cYxdv}Pl&KdZh+iS5z@oyxMYzzd4z+Ty3rXK5XdK1`}iK=bZCXh!`_hT2a zniYZvoG#*Dy3KnElDJ7t->Db1650;sQ;!BK+z?G7ALGk-G;f$v17zH!TP4)z3NBju zi>#IyyN$2r#XUu(OqC|soa9~h2<$?z0@DWC7OUY_OnIn^q_Yc(6dE}!w5fGEXzQuD z?3f&zipD?xHj%NJn-VV^_2|WwBdrL<6*q`2f-{`1C{Ct#bP@m|^*uJ4YL4N!L_)Y% zmVoRx>g3JjL`D9GM)(!n)slR9LjkN)#4d&jfoKsASgutt>9*aN%32>U)ZOb%gp%0C z*XiS+uPsWS=B!M_Zp7f)Q~XjsQuUsg*(0@3t{SCst&Ckb(S1U~hz)#cVq{~A^e;U6 zGE|dYmM8*9<~>mAm$)wF6pYRj9)t2Tm@E{{Aj|f=;kfv0CJX~a>2y>N53V1#+ z#-(@Q1n-ag@v;u&wm=>0QEx&P+dOx`UTTCm6qcF1@DLG20VGkrUdXXX;4sf=W9byn z!`&)b&dfT&pwGs3DI4?_=d$NSZLuEs>)-ym^tZ1V^N7MW2QmdGduna%Kw7o3QyhK} zXl@_#$w@ted2BZQSps@&wlpEIJoh13ryohKU_y7Sby%s|ghOLc76qFY z%8SiavV_Kj&qVjL&*6alVk}zZ2DHkPNTW)-BMn6?F2%#7#vf~UaoHkmD&PaT?pN2` zj(5V^b#234M2lZpsp0q9P7#>t+Y2L$zl?*5Wi$wex28cb*5rs7Yui1w?b2 zbZ6#$o6N#>G6ox1CtJ=hw&PT^9Uh0Mv5Y-m_&4R~8iiSDrU_`7dcg%V36)Q(}*B!K`X0gzHEuGuv7t{t4b z1(i>kiEfiY!kDpA@w zlX64I^`v~8XbNw;6jmO0dVy`Bw+%{!d@b$?WM(k!1Pg|J$E$}PVh1e|)9}z{>?9`- zca^l0$@-$qLAZlGNu95nrN}Rdk~!rLlNgjrSy>QMY0*}KI(Kdq>B#RRoq!HSy!-8r zz*fF8I;H@ri4{+U87*T>=b|CIfh=Z_F<;-0yW#%l|GXD1gznMfLk#p@^clJbD*rD@ z(GmvxcxH}uGuBB2#}PnfLh_aPrf&f7CFqRlW<(lO-mH7y=+ApRBHe{y{p`eDD|puZ zT!v@$r=R7`c$OH0;|o0NW<|rZ>SHv1ma+O=ir26O^>CV*wYxI)&a_;Dxe}kewSC=u473S2d<`)J&w|uCT5FAU zb=W43u@0vu-dL69tBKWgW_VbjvSs-BiPb$qPSToplXeX?R6nnWnwoccaa~~@&8xOC z!@P<<-H$SC^EIhTc%HB3LJhnb#p*>t2i)k|iWQ_Xy8PT|iooeEH){osyA zJzKcvmOmFBvSE+zrI+pFZP1FxLkc74akKm5Xh=7c%m>?$erkG^(L$0TFTdaJw)Fk> z#j8u6H7aHZKeg#=&3H7^Mj8wQg ztlM5P*njAEq12zK3l?@@G2YK`eSJMN1c2jqY&c8hJnVTX;gSI4bqnxJ@DOtjFguv* zOyx+yIKGMYlhQyc$xTAaGpWhEB$QWcx2A7vQ5lT0##2%c+(X|VbQsby1%&3uO>?oES#wxE19 z&ibypUsfJ?GJPfqsB~ZtE0^og`I_yxL&?{%jBPxa#q^-I@#qwQjfXd*Y&;yum2)y} z6{N@*3eYu0XX4FRc$#>Lpfd49ufJvC5i`k1ChH9oISo8{n&AyehIOXpRp9$rpSr_| z)(ZxAjVQ(`%xp#!*NxeT0#|Sl%-ywoHTWV~Dyig;7dP9CQrDQz*ij<)POWF{z5d+; z^0)Nw#V^R8g;k3U({Jr;-1sLlp#<_NkB;I-R&Kjn{nVWvOCF|)a*ngKu5b#QEdFF9 z1Ibwz;SXyi*1@!$6Q?Mf(nH8EmZHI28Sz}RkFf3%bmSm}Lq!m!xXV}S@CFxdMO!Rb z52F)y&XRk6&{5%#m!Z;yB4o+7Pz08s(h_0}?~RCtx@O#4ey~cH;)OMJh}w9tDYrJu zP%eTq6YXsatHExm+#;D`a%3v<96;bTC88}$5%)JL2yi>DIll!8QEhF`Cb1B5iNtgk8?dhGRL~Z;$tA^w z%;BC$H)&fky6EVUBGf7c(M&^#Pw$FYoy`Su;+H`=)A}?U+0CX) zqnN&6NjhqI?FB9`j)HU+rx4Y#!{9Xui<#aJC=*eRU zx9ihNnF7vMrlL&VXpiOGdMR?5;aPTIJBl_Ga5pG!P8~(R)qm{4bNpg%7Q&)Yn^?oY zbDA_3K%k<2=y&Wi<0d0gDxf(PTfLpq$tf|+>W@G`l8R=6ZWf8rj# zZYLZ~)%$BBZ{Oxt2#5b~+TOJ}uH#DA{ElD2@Wcs$98<>qV#k~biXvs47B4|UmNl&o z8N?j~0W=6m;&IG>pXYtoTA8`4ine;9{lT(SsM4 zBm)W2jR%KLn-UHe3ZpWkmRhxdR+*8;j>iuV%h#p^vW-?gZmwNlcWJAt z*k>X_(Y0kL)eKaIB|Kb*u}MdOMR|TY9|EN5BL%y z?7KUvDjNBqu}Jhnp`BfM#JTcEbSYJzF8UgdG1 zJh;?72zO^6I!>SsTqSx9r?NswTRSz{ui`Pb)HftfBWMshIwllq88C@a=zEorA=mie zjMsA#rWr?0GD$$^P(~W8qHeF>(V@a`+B(?+ZJ$}JCk7NuI9Yz9);c#X>J8tYac@+V zGScuZ75;Yr?cpBeXIL;xyycl7XJW`7ZX8a;ZWDU1J*NHTsqAm&syVq-ZUJ5Wk~`Sp zafbDazOmI0$4BQrQEe?^HN5BDM~cqi5>tqPt~8Z;K-W=ZSKMA510Jk3$7WR?K#e

tq`wPgP7K8H1&|&)P+9p6~vvU)TBFJ!vZxEP|?{uG@b%& z#8D*eau^b@q`4)7!`|4_gvUo!`%Awj&e}DuakduOj3TFCSCMh9NTHh_SJ* z+v5vv&NTNfAAUNdTtF+*@iE<_VNCv0RlUb*^Ts=W_*mY860vk9WJ^(HUYs3QRN$6M zNc5Jj-$L5d*O-K~L`@5Flj<;|Pb3z&>F}~%#t;3nP}1B0goGKfbLbj>D#A%Y#^lUt zMTBk-b5Vq-3V4RW$I9LGCdMtrTLzA3YqhD+mWLQiwZT+4V%GVps0x_RjT!Pw@m2U}ej6Bbt7#V?NxktUaaz5AbBi}< zTFQb@)7FFSjoDBWpW#l7p(e7>bd&w7dguj9KZCMwKYaYj9c5s9?Cqsa9Y}j3tM~8! z;Z&mm;T4+{`iXA{CXyWHhDk?oNXe{J0l%iiwK`9hbdRt4(sVW6J@&=YRMuHZtZ*3_*;%aig@4(~uTlGy zjqyJJy{aWuJLW3~(bhLhngZxQQw*iCW=1R!t{yH&g+r)?phWC|{mk4T7xGK@07UaN4kw9}PyD z?_m%9MGblL$YL97RO$Khn*(b$BLijD?~32lWo0+46e#W*i?vzQFZ;M zbsSNwvf$ac-Jl8ggK`F6$jT()_4`J6{mg`S2A_wqs4etu&YTP#8z*fTc#y*!4b|9- z66+4Nd8_<4sx{DSo(k_RYNXLHsrXW9d0%&(YFv8M!H)=M=s#LblXoimu*7ZmpVWrj zom5+55O%`Q7!_BvgxO2XxIwUqfI*J9tZt|RtF}E5RKqY_-|BW;Q?vvu*@StU^Tq0Ku0bUEhZ3aGR!A;ui7-|CrdSW|m5uLg) z2tDg=S(oqr6?Zoa^1I}(_wZfgZfS+?)cJV-uC;L%Rce~8wS&066bY)zac{(tvj6}mw1oJLN3dwcBP&a!%oT>yy}KHp z10NCm5e2k!v<|bN94^!_&4Uj!7gYpFwS4e|PEoJ1PtvZgjxF+Mg_5a6fU2ze1Z-u~mzrG_p~|2x zrwoyAwXRLK#Mk3x7pxGg*H1Z&)YfSTiq~VlHODpDjMUf}ng|Pm?oiDCJL^_&I}W&U z#o6*1&J%0da<}||_MKv$X`9kUjta5*5O9;TiK#*T7HELWZ!tEaE71Vrq0Qhz1A)!j z9XvK;iqZ&`@P>fWk)&I1)^}sH$)P+)CZ&^X5SZ8_@1W2%9taJyVzO%cvqJ)3BfQDF zdw+NZV`tlMP$X$@5tuXFlFSqiq)rdPJCEQUX2!_}-pZ}CcFyD+G0RYXx4I8g{9~S~ zXX4Avx8wb{>vs?32+4yArvTqSxciua0O-iu>r>nygj1~zILT-?b+bYTs=}EI4vw0q z1Mhzq75*{UNU9}vIk39i;e0%QF1P*o@|>4NzjuY!)!V7vOFegc!H5bf|I%D!d@NpK zBAW>7E<0&9L+r!85#W4_P#F)oW@D8Xwq6eWkQ!1C9T7y65_!)Y6(=$voZzZ_6NUtI zlOdT6N2~QTyI*mNCghgF{)-6dlcj_E9*2uZ`gK7S%&UTm5X6p>wD?l#95(0yB$d|cks@< zmZ}12AZ=vxAadeL6m}rgPit1v@|^jy2FFM8}-TRLEEcD*bPE({6 zZm#eT@*mzY%E;nF5&PPjf`>EW^Wwl=E=aZH8=F2kFg6ig*e&HJx+}aO5#~pdJeCU8 zBW`jD{+B_=@jicNS0dvDwRY4{E*%O9yNRO{v7IUBX5U@B6ETf-d=3qjJ!c(^y3-;h zEjn}%SG!|5R4V@rZ=O>X`H#W~^Z!=f?9C@6vZ@M*v^HTtsL7`j*cL%L%6Z&`PJmTr zHOCQAZ*503WqK3D&V%i( zSCHbu>G*S<(nJdhQ2DW(!masSSFrJXX+xd1BKX|RDfLP9*S=ahyC&gF5_burM1Q8;{+!x} z%18ECj}K92V%nYRiCPr`+A9Vd_+;y8=7O*-(H@Hxz2vMYD3Wu>fT@YkSYX)qbCP{n zuk-(n*`&Z{MK^o-osRZ|*i7WX=%QuWn{Dbo3*C4Ecl)f{&lp!;CQaiu5 zC$gGV-$2ncf_cB`0xJ=)UO?|cjty_e_Uysipy`~fgG5lLe-xQmXqj|ST#Y14q+PgO zqa|{s7O8)N_#9q1B5*@jJi@NL!da@&sA)|TT!!xMp>*WbFDUg-`2;eINy5|8gnO1< zeGPU&1u}h98%~DA9jORe5a*ncF`-?dOA!@GCWlYiC_am2ZlK|0j#)B0Oef}*y9~#O zUPw}bknx})({=!|6Li=rSXU5PG;^{1Uj2rw60t>vMuY*F`tL$2e^6k6Ai)a7LOs|h zbtw4ILwGU>8LZ?^7|Z{Aj-jzfHx829Zjb{Q@x{sIV73nSZgf6s^8-F~wU1Ve>6$ET z)tS}y9#c9zN#|+!p>8nbxUQ7{2<->qO8qg!fb__Z5C7=vJvRUX>{5Psc3x?hKb>4r zmYWqFVpJ}}xuTqdiY495Co2}cZTS^WK~=DPMfqdCfsS<8n`qDWDuV@Lly}6qxtsI$ z;1hr8=KCr4uuy#=y-1*3iNl|-NiMr=_>mU$T7%*6eTjNMv@f@|v+9zV1YzfLmOx^-Vq(b9oDHt8m`JVSo-cK{nR35u3}bQ20RxSO&U|8Z3ut?ju7>do*Sk z(52wy+ODSu9^HF{ni1HlXeqzf;#e#tgA}eB0{|9z7}w~{b>WGlwo!~^eTWUpFtfEI z>RLk6Cxf67CY$C@UPFZ=BN4{8BzDPD5oj%Uu6Ve1s@<*A&5DXDzEoWw=dgDbV`3t7 z5jKy4GfrQ6!3HMq7%QC5Em22uu|v? zxvBX}C9xUWwM{TFH@4J6qD2+WM&%NY$hvXNoFkHe_ljJ!1)&a0nqYLaOx*fo{z#`{ z-oP6UsA1k9TsM&i_C@xoF4M}{U<`(G!HN$BR#s5M`xA{(9l1wuuQFQ%^UVbc>T)xe zd`FebRFto~ZpCRRvd&=<)KM&KjtJUp#ha8Yrmn-p5YLENW{HvciRtELsX0IP;^9vy z;p9BwpvHMw*%%H=Zqi0JIefA=cCU6Bxnka=PrMe@HaYAOR*lkI?S?I6Hd;n2TjLKd z^*dKtHj;BdZoe0kVgh`KSZ-=qP_*a+qd{wRwixg>J@~;=>7;U=We_bV3=Jzu;no|< zaW3PG5Gm6WQ^#3Pk6s8RD=ZdzNttDPP)U!528bPaQ><`UlsZ=MrMS%T5_@2B#(>P> zv_m|qQfS6cxA}o!)Mq<6|9A2HKhQqu3h4XEB!=&%tZPr?+GHd`JP?s>G^G`2$yXii zh*!!_}nXlNqmm zHi;?1M4-wAjWgCkH6G?jA6a8a%gc0H3zcdLNfENu-Y zN1_Jo?={9~3I0a(pjBt-ar~lBj1P&m#o`YH$U}h^n~6gcWPw>`ITM?uVg@3Yu$vIC z!yGlC5$RT}XCF=Jz*s4?;ea>|R-|y49BTg0yct0?Tlx1hvXE2_?F(jY143KArM4DP zH4BSjoCGEeF3Uv~5?5SMShV|KdwVt%#%JVx#!%RqoJGO}lZaQvxj4-IigSI>?q0q5 zH+I(|UTZ51XLc58YZo`&;jf^PI!(%NBDR#+T(GwrAh|%{^N6FB?3`CF0v+8CRA5Rt z^^{^%%fOvdEU@LxHrEHj6e+p8{pwA*J ziqiDuSig?4TA-o>%1)LorgFZ6Dog_@jHvjWbg>MczdD2s2`=Q&jbvu$VA`-Pwk_S! zb|L-beCh-kY_D!d zd^kl)AyWLHLWvnkL`$jG6R$1E;g^)EB0jXH3bJPW;u2lOas7T_j`vh9DrVcrGGhwZ zns%$KSdpb zgqzG~jR@g1uHvgwG6YW#uuuN*p6PeyGiMjaOWB=(Y_Taa=N#;I)ZK9=pKh4edlGYV z0^3EnrrK*e-qY097*fUo4-kRRE6CPhq|S4MH;?`x#^0eCmT>{@7+zZ;?eR%nyyJG1 z52i5q3Tf2%!vDN?eBZJtIZ_lYObkvV*_)q2ijRMij`<^9M!W}4Y>oS4#T3;fei1Ds ze}aW-xR)XT)o-3xz586;({0OMW>-bqVxFxK;J|>BLzP!aZSdb%(CF!j>oNV$+>b+QYzH-wAR@z@Ebn(rfSe0b6 zc9^+~%!VLDe21^o?bU{+!L8CmEpgzgf4^dh5(cq*C*k>Zyrh#*|NTcux+g|>dVMJr z=YN0Y5-)#(;{@F^E_So7Q1zz>dd3+&lI8d$n#qk4&17VY2ZO7v8^Xq5KNTSk)g;yg zX2b+JhhZU{`~2ZO!gR_c*h=v#4uo1G4BG6gYJPo-2mMTbfxSr3^nKpoNBiy+A=g~D zI>qUJU0>glre)#SW``X-Ys;{k7CDmzu@83L@ujvw_w^0UZEfpg(|4B?mWb_&3UO;I zXp?Nw2O?UPP|N0hoiltRNc9P_iEjDmO^+k3t;eGeer=D27VXixR(5!F?Dca`UZMy} zg<_u55Oh%2S_s%=&cw~xr)Y5k!14`<14}t-pyT^Wvu;>8WTtCN|DlUvM`5NeMlBun zB367yGUX;kSrQ15bfLm2YCv-b{Al(S0Ui-Z(UO?K?Q@{;ij!?gcs#j45M-&UAL9~}DKPyuiYTM8;m$qb0Y@EH5FvF^KtT<@f=k3&fxzm^=p1@61i z_FK7xUd96iRP{YoVo+JBVsC*`NvwYC<=oug8nk|-|H`>MZ$o)dMmjw$uXZ&7AyyHIev`#4Ne*0FX`B_kpLMstqh7tV~W?0g7j5~frL*b=5cvc%mTO(%~#kaf(517D$T2kvw3BU2wrC`PS( z3YMJ4@QD_YTKt|PLA9CT-jl&Q(*yeZkSItGLY7bsuAb$oD9=ez58}Gc^!4l{kzaNN zvr8@P)K@T}q8CaF;ILfi5ak|7(mci)kA=z;UzHQ?BS{6hNLqrthEX#7WQ!uKtcw=v z!ehIYe{03Y8vWUYbtEcp&HQR(J&-gAUF-F$l%});<^6Gu(a^LOC4_cg%9&#AzJGSe zxX2w0MljNo+f5>V^ohhNPHculu9s&FT9+$-{_WE8etSH=`KJ~d?y<*jR;FJrOZnxE zCM-(kTz`*3EVHD-VZ8nU&ZUxu4e9XjfGQ~aj?M3IjyNu$^N%i}Mz z{V&(aiXIsy@&YCWz{(W~a0oJD;n?5kXBfG;u&Y*hooZMugD|h&? z%njTmc77rv5DF8%3c5;J2b?0!#WP!!*$P1RA>DY4iwsEU^$NXp1Ma*}nb$O-5*`Ps z6bpF|W7TT-bchKo2nh_~1%z^G$K?j!SrcoKaV?LEZhDtTH-fc_N!?1ej!RZqNHTMb ztcjTlT2ohVaHxte+!A%VK zEz2dBAST)OH@?I+P+(FbE?&%qXD2umi=zi|dBoNk_f(z`)Hq#cQrC*~`kAi+5XO_W zLPJ0eBS|V?0DqJEYnO3FwSzi&Z=K#!MPt>bK@A8{|gls$l*lbBBz4eyF=SdR;&lr4b9)*oyKy%)eqX6mIr+0V5NCN_U$f z#4;@m_k53j%BsIaxyo=BmUCf6m4l*CCsl$Pwblnb1$tS#~*KRj-mr zRD;0MV_|=p?-;H1;JNDNbWyn!-98U@ZQPy%>TnjfB5F|NC7a+y>dzH;Y6ncoTy*wc zboARefjCebGTGrgk1=qG66&lQh3eYa5cgp-K8_rjg9`$PG=rFFKH@cH0`crP`vF4% zh;fK?3Lp~Z^FrZ)`8s=YP6}l5KwWaFP+coQBAIG-BrL2`Ad24eF#sE} zr@n?lNkZW&D^%Cvqk6TwJIAZU5_+KJ7Z=~6gvKTkso+N;!$@@uk;IIcm=n+z$e)&1 z-X6$U%WV?RpK3{ZLmpJ}@^HyhKwtPIR(yR6_-#&~iaXcv`dQZCEjMS`+b_8Y-&v#= z_hSPG=UKHnYg>v7&ZpEhu_sC({?69+*@U85_(gXg?H$=k@9M$qXEhSX6QvL7h8bu& zgU?KUg~aDxhd(Nd17x=K{X1L`=a-*06z?>MqkG|MWJI@}IOi_B+K?BUcCFaNei?8J zV)jsNdw_}n9I3FvjbNB>MOj+g<-RN5igE!9*Lt&pN9^zU^enr$uesT%Bjr?Bw&lN^ zr<^d(l5P63kK>%dYr(zk_tu4lu4k&YR<;%8;t4^q#a^Qtqt@3JcG_ttTAYpg-&4+O z!N^G7VCZ2~_?2}%Bm!bDqRxrOaFJp1@xFM?wUqonU-MKQ3`ZsdU?j%^M(OjyT_T=srv&Ok<8f+^P*POjTC>f#CwZo#NY2IJQg|`4@M2`*Z`pRhiKM?fe0PYj zW1}h{lBZOLqd`fXT{!HRiTsSwdGf zE^7g@<$)!LiDG%h3eMy?^-{+)>*i0kjSO%!lDo{{m2Qt&KkM7>aOGRz^1^scTuR@h zYX~A>p`DMlWoy>kyg^lt(UVl+{0$53K9>QwCJUkAxV%mxyZ?6o&ECszSdHUj-@f{0 z@9C3oy*RFRa{b=^S3m4O%k205+xQP|;e7jN>IH0B_xYpThyCyJGpwaP6R_Ohd&$4@ zbxog>kGcO{{2L!V|MnHDtS%dVpeX(R*RQ^dQKB0wzGC{TZ=ZohZOD4Kppsq_6{PQ2 z!}z=raGu_RBX*xtqd36WrV1f}x@A3($2{vgqa8$-nYD6sxK~vl8>_ywI=udbBBhEv z0aCzLZUS(OlS}BMcupQ3FVEAH;BBmP8QQ!iC+E|*VzNq^m!%~Vg%ZptVc>yQUNDH7 z#U6$(orlcN1`9D|2(_*>Tq|*75P>@zp79AaS{8X}B^s$eqZw<$gBd3t&?W_q_JCNuXwF z^;(8b6vE{PZ9U2!G)5qNbg@it39C=Z7tTbtv0sdnewI? zHf-W~B3`f)yw*T%?}IueieyvLfTZqTRT&DaN8@4fRsL2jeG-0LPhLx=;d<4E4b~{nVsTWQ~6!o7Wx712H3r-r#8OGd1#$a>wPXA0~KW%MVV3EI@ zTAonEUQ}+zwMpB%vq3Knahe9bRBpDOMIC)wVh7BLt@x=J)m zM>6MT6Y3u#V1O5E8i^gMJIjQm&%0enFcsCc+bncc=&^$;lk4XTc+17g%d=IN!p(Hr z9AX!r^5^OoVOc6c2r07o&kQb&0}cm5d<&nj{;JYqi}~wZJ9<_6YR4BS8eeCEMYI~* zPvo6a@0MSQe$iAvJu+w%6>FO}FX6(h=Csn8!@PP8qe$xH6y1c{)tv~FvCqoH=;=t_ z9Gyfa=;E63YW2_=2LoG6J-t4u2;n3ghST-^3Nh*gs+ z7L5JJ%c(N6(s#J`>1FL@Kh6vVVjMYB;I(6^(NdY5W*!0>HAfS8X)&Kv^kJST_^1!A z!6AXVV>$=DEn7k2N2Pxx*3nmOpuwR^@pwW82DL!77S1dX&w@CUifK=)I8i9TtM&I~ zA0ol4Ko$$|NNT?|*^y<-3sHHzw}b?}YaqPoEi=3_`jEo&e3Wxg4%w_A91~&X0bC?L z!={Jx6pSi^M32Q0tGXueuTVHJl)DT-Chp_e*k5w*9WRYd~RS8>)MLZU);+F_p zj!~{-Ms{0VyIVWZk%iyz=XxV;J%N9rEb}Zgmz@M^z z*-gMHPj!hv60*aW3JP0!;N&Ugfw+6oYj!X>%tLcnk0c5=>xorv*b<60ZxC|yHi7|V z27^-jH8s0YyPnu9Fo;fT-&ANi6jP&gi$a=889)nZxVMqHKr6kYC-ThK87d5m)uiC= zPdr9hRjP{~|LDY)>+NrvNg)&MV|uef)N7H=a$+}%CdggF zz}yYzKf$58&NomjBOf1ZQM6ir*{qR|Ci-#V(sKOm|UBNcfm36OvOl~f+GQ~;O=^4ym*J$(ssld5m;cFGR2VEgD{LxuuzHV$%Q)6SX>&C}gAEkiRIiXZbK zQoXA0nUn6(2ELN{R>3gEA!g?n4A!svyAW94_Y@A*HB*GfXaX5l^KMoB3D2D_pBcXL zFHWw-G}a4NjHp zy}HsGH>lE#E_#v@igL+oQWm&0ew-&C3|z1fWfi4`SqvmA{$1tG`G`6l*7AR{qt!nJ z$j6Y^V=)vJMc_*bBv@;dmU^g=b&6MH%@LD~LUMGjx98XQYF=iWEm;|zp>XrT$M=n> z9F8&&h#tN5PF?cQAal-~V+A42IuXQCq2jj;@}ujN1aUzV5wsEDh>f+n(qcEh5RK_J zUxE<2%f^JNux}B{niQc7j^r?PKoh09M}stoKWn=aTN8HG7msnQR zm=4Z!st`yBOYtqy$s-Ia?<$@GIVP_yMGZz4EXx*PIt(e|{^`i)uuQ$MLrjziIxAI+ zleK2NEPJAp_4rD2rO-Alc^keSEE%_V9?2P}9zMqAgs|z*i3c7qDJ-Po0>Xl`D1DWm zlHZNB;E{!3<8|J!K7Wzb4_DhX%_H9_U2d}s#>}yNmPA++4u_D@iao-q#4*pfr-GJp zm4_J`4y4lDSd`Vw9&`x|r0S0f`{}{jsGo_XmjaoZkKh@6X_*9Q$nv7!`skP{pd(e$ z1n)#-&|Iwp54{O?jB25U;q0{sTyZ|V0hAtTknd~_Cly2gx|SVE6H z7oZQU;(Q*5CYny6#Y~K;>ozziO;%I>;&TiXf*3Ki3<>#Ys+?04zDVrMyX{9xYHS8* zzQeD(N))GJ1@$Dm>LUat&ZjvEyl*I|$3rdah{@#NT}-SS5}pEH#~P!#kwRi+&k{r# zMUAvO7t3e4878Q!ghjxX;$qmZ+aA;F~MI+ojca?84e5B$o4JUf*Z2Lk6v6CxqC z!u_JiByz{o3Bl&8f?fsSu*I$2p%z@>V`RL7EZVgWCc|X&s5dG<0gEMP6HAo^|K%5h z7zRBW5ur|q)ZOeuK@SdArJ6oDn8IWyfB*xbZ*{3erK{EcKRgxfthSGS0(~>3QLE3S zm4BlCFLTPFyl@}26pRms%!hzsdhzBx#ftES6e1j`IGjSaseGj;po^^kzRL9{Y(n`B zB2`K3e_#0zm7{y?BGPLYPp@N{Q2|=vp7a&?g$0acCAcY8JzcQ&h4vCX zC(e09BneKB#~SN)iLn3@C!^wrfx|7m9{@`ZXQB2)x;*_Y?sL)DE0iC$UR@zA7E>?L z(G;JV1lN4IAEOXS2y!UuUb7*zqnW3C;^fhL9whk-Lw7u_AJw;n1oa(*l>%$x(QUfE zhYv$EFjS6L8S!#?pc%UPHZ&O#(o3lI`@BO07>jF;&REZd9y<4wFLqwEUcOL?bSxl~7 zy3KK2bAf>3k&2KVMUtvTl6LC`5G2N+FG2_i4Q=g$@)p!#*+QgRcQbkO3{tr^S1(k6 zdQA|sgjg)J#{b6W5?+_LJT0tx`Q5kQvXZ|*q$l5g_blEmX&`31;sOUsuBfu|_a3jx zU8?V95tms}Ap}KEgFe_PrzpSyGN24gIJmzQrmPK5oG>=5B%Yi|GlFjvgX35PqZ-mR z%AzHBt9vi%R3x>bVqvUH`Ye$ix8DvuxWPe7-a`h3lf-NddDzTmA5ru>$w_o0a>kea zHoVDjmV}rzcC9vH;1QPIYIu@LI}ZvNZ6L!F^}wnrZDrM?4swZIyq*v$U)dnl7|mqT z9;x4kGIu*BlAvl&NaD*Isu{y<0OhRL16=ajJxCK-O|~O?;9d1FTm@y&T^fS@Bz0F! zyR}thZJREjw7PT<)%#C;5NsgD5^xdm830W^$zU|*=B74FW6;Lp0@Kq_^MqvbKYFzs zVd;yg`xcYQ(wACdgPe21<-h&)3+)I2 zI9~qS54y>sP(7fF_aRq&R)q^3u_JhsI|n8(Dx})RreGoClE3C>eb20K*Cmxv-jL}T zoH{9^Z*C86C_uG`I>y7qKTaCE+hWX=M9Q)h0?UqRbk+|#*aL>DfD6`FqdFadBOeLH zJRsrmW8KKs*z$N;A0S1lr&?t!FTY>>6@Oz*-*ChqORJKp=UmAl-@0_aB6)<%2}8`P zb&k#6p*bbQ1L+AuPjV$vRYj<7wq^GPuz?Gbs|mmk8$9ypI(K=F{BWoO-YU}*ev{t~ z`#4~$^X8nDUsGXwB)&4{Rs)2l{x++Cfn<|nL;nB zg?mce$jjkg-xHOS+Ci%$ldgQzNos8xPy{lW576LvH9CZnBN3$;= zxVd{~1H>pZ>#uCbMrJ#na-ZlW7eU3ih;Pv($OQsN*;*-AE|){$I3dC_xI#*m0~e}8 z4g1%WBu7@iQMxOCqn!#@=yo-D)RHBC!68P}wfv+Px@N@2v>pbw8J;0)%6|vm9?pu| zaTzwZ3E7U~4#}`7dB8a_CHRa=)POHdeSxZ|-H>0)m|jjq7YVOEr06B@6UwpRKIgyT zU`5PNeKkFF7u8va48k2zCux)kItWHFDLW<;%Z1+6*U^bRF3VqfbWsAr)0I!(*!CTu z1&}f$G107!nl)*LrmkCet*VJS3s_rY&Jd4>wT^F9e-j!Ts)|bT+46&4KR)&0; zqH>&RP&o_l!w`&h-g?33A&(0aBx4@W;ds2J;}a4en5jAeit|Ny)XR`03yqVg z0`WIox92Q+ay7C>=qMm$yxRC8vq>%_=`S1u%>fr#1xo6*h z$W`-H%^F&|UVciL%ZHlJRt!FVuEp>J9=xFceEq@B>TK+i&j7?@|G7$WH?kD>>8ls7 zzkRm<3~U0CzTJDf&k|ofhudbVZyn!#0}sFYjwTK&cUQNBkYsJQ*G0jc%B|MG9H~Fu zsTrNwRNkxThnQZ2lypd#mMF}wQ}Q{4Z0ILJ#vRwMnGCZ>6l1WaWL!W+wir~*@5gf~ zDA&-Y_{((B?>_xBfApa1+4HeG!@-ILA)q7PkiEC;e%Z2-l4Pzlu(H)t{Ad;~U*1Kszi#Afj$Tbu#wq zYWAO0*Xphh!KT43@qkSQAq1|`gMAXavmj+EL~_J(KpwC=ZYWe!%R!^6k?bP@rOrfL zO|wWZ4bq*=&Be5BUY#k-gJzy1(GNW&MFDiSD$@T2J3=zaPd#wUdv5$RU6Y>mIi{I; z&Q4=JuWS08;@*EM)wwFJ_>|TA%&HcOF}~oa4eLScgeG!!+-K+|!~Q83hRhE7W>h!z zyiF{A4q(&sW)IQh*#4n{i3fpJw*;V!l@}0<=N$aH_&HO$ukWg@{Iky?zCijQ9u$ng zKdqPOLPKN*PS{v;d$n!TXGnFYv201Ipp;m?+0U8hZ7>TWRa!l7j$E3*HhJJ@o+mIF z{qyI`>rH(a%P7!av92!Q0IP;Pb~k}hI=8X)r%MfSIS;*L9nz}u0$bt-W2Az^=1fSk9=s6C0L zb9tF31T1V*^47M@KJn6_Uuph&be2mHW+r#aXYk{QKR^t4QUA@k(*>*9e6X`VyBa=& z4ZNDqT-Ls=7;d|)T~{WF53g@2g7r{EghJMydA;(MxyoGz>g^|dv=5kw!Q=DA>u}~p zc)$9Q{dI*EJ~$|j%-KID5`|BVeL12Z!>*n}REFOUrOgy5@V6-CbDTiI$tczljz-D# zR#5&`1{H%uhW_d!@zxln@8Je_>_y&CU?cB32t zji)3~j9qRw#`chb$H{j z5g8wX@<{$MiBrXS;}_=b7~XCuU}u^t8Vqh`PF;>il6bT zCw2jAJNl{eIX@G3VhA>ZSqozU~R={U23B0@c;~)N@ z;O5=OFHb+79DaFq@bTcwQ^oIoMgWuxqVYx6C3IVEpXOsWq%hn14u6f|=1yN0?$Pp9 zJ;if8EK7)hMTZRP?xAGQ6YU)M{Fdc)Zfn&(t`8-)Ta#iHZk{gXq#uOvAYBeE@ppV$y214e+#b4eoT<&R2uAn+OfM?YwT!U?kZ)6G^+Z40J?G!LH z^yK0}IMHQd6mY8IkLglH_?~`5=o%M~=Ok-#{N?GFS%b#fztAxse!Mw9)6CJyijeSkoZ!aOvx6%=&g5BI*2k|Ig3gT-AN6sUA4^QAoil5^ zQpX-CDW62LReSSiAv1n5?7p?k7zt&FJ82(tvc0X4^L!HaYRQD!wURehvf>fEc74Ni zTS``;jrS!-z67Dz(q_d)zk(|)K0D-?eZta13@VCc+dervbXw&YDkEuy366=lx_dRn zO&TzIiT2mfyR1=FMMPE5z`=9`<@+eCi8ehljL|ozGrv0jc%}irJeb+QHXm;R*;(1$ z6i%>c>lLW1EmxiVdU$ys0~ljCOYp(4xhcumTX1a_15^2CT&~^dj8XAus?0LPAfL^3 zbS=f1oHtwfQ5-^pmVuGDL?lz|A?RyYD!i$3qx3bTSI?IN>3Ooyp9x{t zB%&YWB!CEgM(-{UfGC5~4I20aq`Z;e#MR;IXpBH8b zB<}@obvBwGH}6I2Jx^9##B5e?JQ5SyGp43>2o93R!)iaS3;6yV_raLu5UtAdCt}LC ziG9dN_`l0aoi6_$KG1Q8EC!{J1w&B11gI@>yzYH_Gcp~M>)z?--PxG+?fHxd`b?x@ zi%Z>+{>gRk&UI|l8%#R>oekEjH{X68#ZpgSy?XQY-pd+8MSYZ!{10#UpS@twV+O;|6%DyV4~47t-8$F*11b_|0>6awP~+Y%9aRB&WS1v=mMnZR0sB2C0uB_u}4 z(vJ?gIkUhBoyaW6E_jXCA=-B|tscb<4z$caN;zo5b2K92*F&X0dFrYosHzBY%#v(H zE>fJ8aj2{J$9b7DuOXS-0#l%s)x6$$Oh{M+l`@}9wY+E!Hg^`4wkNM3v{-bMT8%;& zoNuPuoywo4PTE>U&Z6xbItpEPQQeFv<@0t6czL%%GCGpgxEH!0&FC`j>w$vWP+- z)<1f_THG+P1NAI1LJG@a+Vf{B}f}>eoyNjAoHk#kW;I_R}wi^tip_j5feI4nPm0*phs5S}cmc+`W?o@qbVsHhGjE z_|Jm~>Bf__EtMx|Htx3WlvfTJLS$I!lGAZm$w}|;nT?B&IR-x!DREdnf}bAsG7-Gy zgec-dpa>pPqzDY$-Rw|Q8HF)oZT$p!?qHD~u5=tOBB2){CPx5B&eLZq*5b6)%!D1) zrHl0!!eJUbDo>jztlJNi3uGtP!1XhmOVYiN^sJPbqTIC53p5wCoNEjTDqm^$>Yyi0!CFk8Q2txkiuet5HBmH zCWDjNOL7hR^}~T0+{As-EDDvW&z8zaJ@hf-&xmpAIIXhauqXP!e|sY6@l^8r_~p~r z&5`hzzxnp9|M2438`mszVw6xm+1nR-{4r0Jb#7WiB|5ZfjGLdPW#iZb-YoK!1Xh&1 zmtym$hF^UPgVvZQq#$fNp#Y;ghM1s^yed}aUTYmv8cbO&I6-3v?AJfV!_!TWl*{eC ze)}bVRoPqtMP|z9mFe8E725hvQ9Z(MLcUAOtuk4R%a4`bl<-)h)g;JZ1+&&}Oze$9 zwwT8D4cN-Zq4S*dhA`Mb+iYq9hu}bq1S7jtia+q~cG^vA^fbqN6qamGC6DM*kId1W zUqVMugXxq8RIJ11xOpeM5c;x62i(}JOC(i@6&Gh9N3n^UTmHldfT4!Ltyuh8#LfQ)4qB`j)tUd z{Y}%K{BVlMx7sW9saDdWQ(_>a5u9_YPg!aNO?wgmU|g#L=+hHs-_zV1K7qUrd;$x) z*;ney;wHdGZKfE>k8QE*`S4O|z9{YNtw_=XEC?x61$MMy2t6^IRdq_k-TCsVwt$Oif(-I^y>>T?FQAlenib{ zQaJK^DRkkcDTnYg@ZYUCZzd5EO0tT(%_N%5Bp01WebP1FI_YiSAj+$sDI><=?GqGj zw-pn5eQGbZK=B%X)VHR=A?%2iM+EhQTp2db1OmQ)n=N=@-}5lJr$}jTLxbdu46SW9 za=Md?YC%x+@I015JfJ?Dt$=qt7wq!raogIg1Z1%8rEV^cSux=mnGZTH)In$-HdG2X zBUzbK>d&6jzG6h`U4;oz3?bsgLdW&Y*i7@O*5M-{jq2saJfq8SCiAjgIna4At`y6h>ktNX)_1slO0@(jIzPHf}cmAMGxZ< zY!_2ocwkHMfPGD`B=uDVd}+VQ*LqDcYM3wDNT5nd^zrkW>m3}4^^TP-Ef-IPYpt(- zyhlB49cEq)F2p__(iEnel?VjILts+5JLhU9QW%~`*1al@=QCK>4R_cl7dZAMI6JO& zvpSGDSo<>?O^d1+c3GO3s1~zm98U?Coz+Yv^P-+alcqV^Wp+Rx!+h^ZCfBf{-OQ}j2_z8v2gb4+?bEl`1fZ*z`o~DYQ?QNy( z8A+^pR6< zJ3plO>r;KGu)wwvfB&O?0jQDT%@5Dx7yfW)zI^m6J{1qfj>o7PJ=q`e*auOH-T!iX z?ZI3Q*AZ9n#-eOkuzo&3M+7X=YrSGvu-l{!1wQJG_`HE4YX-aFsF3GMH52OkTqTi; z5)xz2S`dC_lTc8r0-=Img4M7bw>NF6l)`WE^*I%mLJV*cQh?DB|= zXUoreK#Rq=O^G9o?>qE_DY7oKqO<+N^R*_+_eJvI;&at0mZVqvxUw5jAprecR6Yn zDsxXx?^3m_?y7MMK2a6-;(-0Hu$$CF#0)>>fBjFnB`NO&7MtRcGFV%QMyswTN&|Hz zLv*pJo>9w4Sxxm3DTz=$5!H+)ss8BDO0^V}(tlC)ta0l?sGeSJ{Iua%yJnJ{u{Kc> z=vytzYggEj`?bc#ITV55Md+@Y%=K5Pk){>crm808qHx4{bJ@_tAnC>}mAbJXAK~Af zX?ZgOIayzEYNjdvcBV5w@Ppgwp8-!~Oq%H;8qjUY`l`l9*Q(@gf8Lh-Pdv!l zkXY*G+9Areo=2bjiMVoo&Es@~jfd=zhCe%^e!jfX>dhB&z+VNKIKC4~3ah$PH$#XQ z^7vqr-^2;sJVgY^1wTB7NK(hV@&ZpyQ~)n_~^w0(0b&6Uq9XaY7XE+ zb9wv|4iLGf956$`f64(Hglxvs`tRTX=2ePU+bRB+IADf_;Q)Oi4&Z`x8KYSaSWqdx z^MJU|Ox-%40p4e_$vgkLZ1RF-?LOGqo?RB75w-b81?)RSQF{UVpU-K_y*+&RSg{^= z^gkqdt_J_>`@a&UEi zgG-U0f>&BNRHabou>jZ+8B^?}+H@7U2EUvy{|@xDwEX9D^`}$FB36!_P!{BiypH-F zj+KdFSsm?Al7Rlw0t+Y2ci&Kt}jQP1wEv#tX7YtVG9>;%jFfwFjW zh;Vnrr;lSFk^=$+$~eOmx}SmrzW>N`g5Nd#maoux#G*BuDqwkbxa%x3wGer=tH)8} z-HO@IQV7Mmpk6~jON5qb)`({CCX~KvHP!>eMUvAgZ{Fh;Yo{-N;kA*b=|euC2Ww9{ z;QR1~FL}g1OP=4XpB>J{coR0{A>42UT`5R+)A!xEpz(lN6#5P>lnRKFgj5aoYI+cX zpd}zyrATHH-=^){!|C$xgn#qa1kwLmLMq}i;%3~&iI0=p2wepDB2Jt;Llu$Dor0a- z<)LR_d?=fcoJYVZlbv->qT|oK>m@1d(#%TeoGyR!=Jnp!SAXFDzI`h9q=g@{YS*DR zD?(h(m z;2f8jtPM)6=r>(7t6FzaW?Q>bP#KI8cd>-UbQkS%wwR8HH$*C}@hV%F;AmMa z$MIMfl%$U%YEDk`ROiG~v;15~0-tR-0S~BFpv$PZw&HOd&3I(Yos5H{;m+z=7n!2z z+Umfiyyc$5n|zr?w4C6X7ce(Q31Mj*s-SvV3)CF++l(SjDK~CJk zM#<=_gRA2hO`1o>6SiIU*vRJlcbbStPL>&wIo6SlxXi}3@ws9g1kM1ArMsUOap8)w4IK-fg0o{$Azg zVo;m;_Jm=xD<7Y0A}?;CLKjfx7yF^t7GC9h|l8A&Qj9B zej)19Rj#|U$>rbZ9acg>e_1aN7FRVO?4v?{jMHRWwk^}Ui5UciBN zvSrlWzRNLt8?KMUh0iKz8*_BLps7i-VFng8RK>0-uymamAORO^531ShdjQCa&2*S< z{n3Bk9hiB=8Jre?Tb%@?Flf=ze_=E>b{tv@QMoYvC+2l1(&=+;KmLhlPg)q2BGln( z#S@IQ`1fMAgDaUWB4SlZ3A=uX^@?!2ZU9wkmC_{FeG81xf1`4q z2p^@^wu_+BQ*n)IPZ>%{_N;ie0uWqn(E4g8%E#ylju|T?krI*k-WYFl)$zM1m5Vei zHz9~&s|@B!NSN)4@ETv)FJ_(QC>+zthal^>@$K{n)A4PkT z`li?dnT5Dpf(`PZ+K3|fwLt1$&~<)FZlg@^WE<3J=DYY-SzU2+dk(Seoyl`-9SMVB zV(am$j*)rPfXz*af&y#5-+;XSOfMi5KDCaJ%dR6GWlW_PbVJJ=(^K_y4}Gx5=89=x zXsMq@16vL0I7G>81MTX&p{Yfj$#n#loh{ZKO_5H>G{Kpv9qmyIJ9`MZyR6EJ!pUJe z1aDQu#VNqBr`NZ5Xn7kp_cSX8qDc|Pk#wkFwe8ryumJbW`?&%6?Tl5

?_e{3X+NPBi&J;IR)8q}%Tk|#ev%~=Y zGs$_=LwGfs8wBVKWu!9Vk*gd2Tgn8t=CpEOZcp1{HTtC<$gA1|<@%rXis7*6lznhX zrd@n2kjs#BvZ`20Y4u#{AGrNU0|76{k;y>mZmBdU`1mLr>V>6O>?Y+PN>8eXn*#{C zGNPG1xJ~Am1^~PQEuWCN8pBYsa3uz(k(2LOfs%-CLtpt~SmX#CaX3a@a=3NJ4L={X zn@J#xfOWOd9UjPf!IrMZyuZSZGw3+%|C)+9u@gF&rOw-8539rI(0c z`J3H@x`KQfqnten-SG_{8E=!ab2C?kWr%OC7zak!kw@E5p?E|HF#+YC+P5<;*Eg_= zF^gjycf{B*Ix1#4rBwJMSN6HC0SbC6^vIHb@HCjKV+v8w*713@c2xNj4`BB8hZ~z> zVUuE6*YeSY5@W@ZD;#^XY77i)?0T*XMi~@KeHbwV72EHq*xpqm-&BCs&Hhv%VAKdn z+AJ$7J49`1aPrT`ag0wDk2`KP+q4&jb)fMzP@_~YR5uz5!&q%TydBbkaU|E@86NTG9p(O~6mWTPn1ANwR% z!wb=W#M_Oe^v$IdV~To35UOItiYlda#9e#$v;F&_lv*9!c`dpgGWl_&)z?OoSd6?@k%)ftb9>gQseCUF@J$t?@W8(Z@X6kDD70B5j(#EXcz?qk7-9if}GgjA<{ zU+Yt9`SQ~x1CJ-n73bq^FnN7hid<;JsZE$1O$RRmAkE>0dI-E&kdKcvlIS8{x~kzv zG{0Ew3)lFis~ao3`DwiL&9motWIyV!Jz~>+=7N({BFInHcIfp08O}XyH)X zQxPuVbh}N0Q$qZc7f*K8-?zSk0j+0?^m^eE_egSAXf8u<6v=d`R5*+u>zrm5!Uid# z_H@9$A|G8WYN`g#ebntfnm9{+k=8oXV{H}b^YcbNqH&4i&|C6T5uOqbZc~nzi+U_u z>k~d62$eQ1kD~%R6Cc~+&9hWLuO|%4i~PEyay`2W&pW>!4Ea-tdgRwpQLdx_y_15Y z!713eRZ_HmD~<<{%W*zR{U+9P7BWRMDx;2<8FB5;`DWBQ8q=(+_6%cC-HRHrnc6%7 zTX;@Ky2o$Avf?(Wp<#Kw@JfR%RI7UiL>- zYqvRNGvQt^)f_*T601lRC?V|+P$>$`6)6}jHTK8r?)FEESsL|*?T?q3pAPn?J}$js zvTwPxChQM`7P6=ggVJlnJ*5OeWl2Q93QnVd(hdP*tq~14-0FCT6kL zZfa2Wwnc=WCk+dv*a1jAewvnt%AxjganK^m(~-bp({tukNkeW>iOnY3NueiYeU>&n z;c?#jgo>P49~ma<_yC(&A6kvvcQw@U{RZok!tZImHa^nD>T?~f59M(V5scF~iCaI-q<$$ z`jPY}zfcaig#b3;KL42`*C~dWBWyb>M2_`4{-7Ju{SL+hvEC#q7{vM58}Y2~RMX-@`}ZVuTo%rdF)l@#%e26|;^%F&1L)lYJS2}J3-!*z^q z$cJzGx8Q%1Sw#-%@K+t4928|x6~~79Or?nDsS?Lw46jNB?U~DnosMxI{k%F2H803k zky$)8)~@|^P=+YCi6qWhz!!@9t0LYpi8E()gU8Cw=qBIdHbWUw6dd*D%C1T!v5L_v zWS5KX27rYY77^U|P{j)12>QOUxxMF9XQPa((?rpHqWn>IpU6pe@K#^Dj~Qt?%+YdaD)s4z?p`yfk zM%kM|Z{xw^LWxz$hfuR9;+jKkP{c=~%LO|WwOIv|5vd;J)KzXGSLFHT6%osquKi22 z`W#$J_p2>(M5SS3P%W7tc=cNGk+mIsaF(#d_uK5iH!lL$MT9qD$2WZ6x=>RCGgxem z&R&DkOA&BwN0}jEqJG$#!qM^CRaMRE>wjV3r~G=oah3FQd>GjvK|BS>#?Y`7UcF!1 zR|oBUfPAW`<+3Z{d`a?*mX|bBXkR>$G1w>42%n(5*K9r3>(vxsT##4|Q-P(D&6i$| z`@9CNgc6buCoS%#Ia14nGmj+Qp~M}I3l^h6@c)Vx5phK;1bMh{Cql4k|4kl^vUXf{ zJP^lKr<|qNODhi90E?L`FQT?etHYeQK5V8iEQ+g;NF+8Fu62{TRtLc;^v|jwlQAxc zz=HV7nPE$e85Msm?NW&BYb3^&_LWnIZq59dR;-DMD ztSHMkl`IDpIdmTqOXZSK*M93zT*5eP4+fSueyb$)CK2{n3IFuN?d$_G<|&|N7ME7d zgJ8j$pQlCu^&${V*S(AYVek16%#0B*ImI;hw)jtD z=ccccSD^~W3XOuYp^gVL&Id+DXhH=j8UWUrh-RUdRP`)ESLqtWpH;`=mbH})dJ6OP zGX*P=hBFhC>CMRykxnI4KLmAnJ0`&@x7;q@Od2rUmS-QK_dy?eIXlSHb+u2 z&YhuZjuYS^eL>B@px3MMQ^qL^JAh)2)JO%Pdlqt^9+Z%lw+D>~YDhEx6ICr>KC7zN zx!#H>@8*s?dnwIt7^Q;$z2#tYhHCY(6t&2`W?23s2qt)fo6(}9TkC?CnxamyhL$eR zGqv;%o|+#szEQrXVzoW$DMc;7Ij5-W&AP5r7kBE#=NV>8srE|O4b{8ijY1UFL2%99VT|p#&)hF)A+X zqN!PW4*t|E%&GYDpGFjDN*$9A*PU$kH_c(sErmRQ#*@f0Aak24b^-6>^c8b$-%R4I8qwezq6iy*ne z`nHHj={2f{s!k*p=0X&u8Bc-aIz0P%x5uYU zxuT6h0stU3Q-WGJhHVP9HBnb=ssNESjDj${WBb|poxre%bC#Z+2lytU4Gl)4VEuVHmjbGP_1uO|K3(J z*)M2HCc7#CAM)$;I#wJ*m`Yk~+r5FQwVw9|AW1OraFU^Liri&1mG^hc#kqQl%<5bL zq=R84P~P>QQ!dg@S(~lD5;%+@Q@iF`^SBTN5kPC+{bmm%wkjm(A zFAX2d+lg^fs#(b0WST&FUuN^esa&^n>7e5Tp{puuCFtqt>S><7 zdi_JNlsGFTK|z4fDc-x9zf%URg8AY-YJl1}bO{cD6IbCmNEq`nB*t6nl3p&@jsZ$q zYn=D|igAUuH{yrL{VMC~E0%inBl(L~{NfdR`HL1Ljag6(@(^xSwMqlXu`UZ0E1oRp zDw5h#`G9Y$kPTcU_&`^`Q#~BM>2dax=%mn${!h6NGnpet_fEvT+TVSlv#ojrjEL1FWn-^9I8_CxT3%`8Nu(&m;tSNlh~I zp=JfKmFV1Vg8aLun$CB4_q!^)6ElBa(JlyfPOTL|4@f9D9D0+71;Dip+K09VI+|bF zz$%9>Zw;29Tgwe&wqOK}ca=hn2RTkH@=53g+w9r!4Ot+Q$oUUDP1N<^Hx=DB_M^+zfQ!cQ%FpP@Q zs{Y@a^UwjCF~r`hj?tc&va@5JUb$8E0w9hGE44=>8HPs*Q1$lB6|$VVuU&%~u@aS& zF4`%E9B&THQ~G9y?i2qut@hIwj)wWX;U zr4;iJVg+_~1iW$)yQFRWmB|`#y>;Oizs!$WgF`RWrs!jxxDJ;2TSC;_2%O7eRgF?$ zC{s$6{5A%LT8hVuWApf@P#NjA#+U8iq%#w$4kvG=G@N|dJ#95#W|bQnF1yBBW&u=? zDFG##`RmoG0%GWoKwH9H85{CXNtIMRoR@=9W;s%qMtDl#^;*Q=Ka~7`dHkiETO-WS zpn@W*`s35ZmdyYrxIAJ(JO^^AM=Y96!+%UxijcA=uFq?_l<)*BOA}pp81V$|!F0a6 z!xMDfOgzDSlJSH9CzFWse6{b|gWZ+ci1Hc{x@kn2c<|c4tlIZ{d8g@D`OF;U@$I?B zgU6`~YX%@;Fed4t2r5H+*ha=@-pl0&4V*fRz)fz9JARgX;2RsZ3p3a>X@3>1aj#Yru6f1J-)_F^?Q7GtQ}! zaADp)yEV>|7Qg*?cXDtZ8IT^r_6(i~H&@2!&{Ue~j5=0Q-Tu6x8UHFFzt7%W>2kD| zn?nNRM1+QSvapd7{1BPvpOBJDN*2WbVUzTPu_sqCUTZ&}iz=dQxQzEAq^vkL;;eKH zuXd~vof${WLSx7LcNp8agea&Hkf+2REkV}M-h&i9g|@lb)3o7f8i z1nOWii*`c#$SF5JAa-FZ0<%SGFC)v-Q^36&6s27!)hgu3xFJd(AuHJTba}-pfy)$; z>#h=@f*qKjEd`6ROh1Ez6<}OC+Nm zXSWICD;<{htXRtdKWNsW?5JE#SUkZq94vnvfwWvs8O6o{=KhC*`JuoMG!VDD0I9td z*|ANMMyH!o=~dXyg*b%2yi@=rp5>TVnWmv6aW|w+hCrc8I$Nim9N=#5Q0Lmo&{M6@ zIowV?_%WTVBX8w8s?A8yf?f-O(`m2s(X<4M(g4_9sKBa1N`m(d^vkMU!H1AE(@5V@ za5k3LD3s>{mrIu5a*=9{o(J3F)E=|nWJYtvN1*b)Y~9i`qBqOXXSr0L-37c2mM8LIe{3gTIz@{*Lo%X{7n|{1J}4pyfro7S7bco@ ziBnI69W9svO;ik@i^F*N#~J2k2pQHQf;x1x+%v#TJ#QXHivmRpMHErJDcy1fqY{Tg2pl~%;+th81{2ntw>$rMR;>N68 z!m9RRR$puXw&@9tOLSF>0sY4AG9-c2x-XKq<$dO=Oj@pH`N;p zhH1!;FoR4lZRcnDf4-zXX2P&{LKl*`$R4k4YlsyV%DUmlhq%YKKVC3rFqo!t?(wE& zKlB9bwVi5q5+;XX3cntxQ(kny=*j=kc8(RVK&7lpv!v>sT z(k8C3&op{r@|;R=RM1c2X&uR0RJ*`6iC1%BG1y-Qg`y03kb^-F&Jr^Mz$A4^LEJKud81^Hs<);l@yOu!0+E#jvd|ge*+c zUS$ntu^y0NOk1T`ZfSPFKF4Lpdh$MNuZTQt5sj8M;w(P})XEl{jFk&rj9NrzWLYVt z{9`vIcyf{zAd{SXtP>2tZ_%ew5RT^X9)k~OV3pT|VPMuaDK|(jHj0->E9I~T_{of_ zGF&s8`}ARNsaT$03>2?8T|PT<&f(hLatDnX86-{)ELX}2jD{)1==Ge<-;bVeK1k5ux7$3V;+iTrap96_BvYCY4;e!+>1IPY8A*Vp z1L``mC0?~-HzR8tfZ4TSz>Hh5@n9zRhkvSe3h^s7`A`13_jZlV4Q4BhCYRJrWtlJ8 z4;kb0d@v`cXgx1GA{f4<} zCHx2XyDd6>@VP<7q6t#=c2qT^${=q*ARE9F?V2z_eA{s4_xO%}CPAjsn0LP2ffRc4*BuBIaxm<1BmkjxPk1t*^#+{l>=-vq%Yj3d{I zX=^4t;{l`8)+c*>$t5$stQAbd50N?w3Fv^cvT@@?lmKqO6*eO`AEa zJ#`;H^02EmrmL@8yg39Ec*Ymws=v^wdh~#=?U+Hkk_Lhqax%e9r^~`kryhL>6>=7% z_Ql1c;gQE!=Bm^3^{$Kk*jfXVSDX}4_`rSU6W^6hv7(H-sAwU;h)QM4Yb}f5rS4L# z07M>YTu}lMnW!j&F`5nEQgp(!XadCu)8Ryu5$6LkME#j#GQ4O_**mc&Z`Y~_aoDs3 zg>sXk*DdgyY?N^~qrnyUX;B1-0f-Zns3?LC{~W6mzaaEw3^arkAc`fEsDRy>Fi#s& zuEsxhu2`L*Pb)egZDp}sqa|!kEYoMwEC7cw;>U$=8WJLeSAH0fA{?>7ztUi4Jbj^; zVQ4V#b)BG=H?0%Y;h?W4bSx~q2mo~0GWC8?dJ{9%B$zjTPJ)A10>BU&@Z}A&66~_# zaDD|>#iA*?bN+}Ef9J{wah{UI1umjR7w(Ffupn?en{Dv}GU(kG;`*79Dqk40uWkEc zhc3exv!s*gE=hLrK9s=F=G}>0<#CfsldKrwyYWpd$^x1dIlUaQ%|xl4$jJnpux=}1k!~pDXnRrU zpFgmfFF7_5LTjY?TS?wl0);Q!8d{ZuF{iT5YP`fvE_v4w(VXxWp}rxQUZZfL4vpdI zn~VhIO=GG13)fJtZLiQar@v)Z^vTy>M_8}{GTa^YElD`w33-eRH<6{dW2~V!q0twb z*o<(S)j2f9;sP*h5UOjP{7= z|0qhlU`%FTCJ>BTc_Pkff1jeSG|UUie8(L5Fwe_g>q<}BfL(`KT3{qq3wdR zAS8pSSm*HZn`f`T9oMM|DL0n~#%WgEtns=kw`Q#0K;UfTVa05pdcr8ujr!hL?u?Ji zZQyk{8SGUx*k`J>+3}}xO1ox`axh)$H&dyNzHOShDPi1@az{g5dqL=WEJpdKLv@%O zKsocHo?chV-g;W~+~H+rM~?4NKy>U+2w5%E5}~DYreE+K2)-e$Za1eIz%pC7NCw2* zVZ9KDXM}5FnvE5Q!omvwldMfE(xPs8P<>4!NFfY)Le^4yMY#(_&#Hf@`5TqLm&$$0 zaEsc&kW5D$a(~E%P~S|jxI83wk8(n{HAQqfD1S*V$ZY^_Gwheu#@6}VTH$nyUw(HI zjYZf5FK^A07(({d^}#rKi@xf+L!`*P(Q6x@y3|vuDT~JzmnA3WGSXpPkv<{PFcU6H z|GsJh(HM?eMX`%0KNozJ_-(9veknk}ycop9uqhqCmmkI^Cxxs`1KVY&eGIPZn{)rf zSVv^tcYGm$+5&Exq7DXLB za86iCpi#iCSCdY9@S^qrewc_`1r>%1gchRfrX^6+g)d4?0Hne#XfY~7i^+RR9VH4> zyM>vaOA;lMb#kso<1E?zOo+N(hE5t`9)bQ@7fo6Vjt!Yzpz!RS&5C*{l2meotV=XE z*L}6e4B~T}V8?m`Yf6z##6J3=s4tJt)R>* zQ=%RmJa~S(%p8atO)us0sdtpIjMt33y?H2mN-x-f#(*9@WK0V44xf`b+Iz+E?p?(V zB>bEKd%9YJ&O4#zAw#gXAxNa$<-VL6nf$t68O@|AMDg44?s!$Ad_1I^K?y)5R2Wp~ zJH$!u!#YF=#iSJfeTXX=h(+K}pf;`@xM0Yk!VzdOCh7(g$`fXo=@s%t&&{Tx&*U9; z03@*JTadn7had}&iIAiRG0V$Q#(FYPH|+fhM}2h+e*dU>?!H=(M3pZbsd2=K+Ni84vt8rSgG;SOI zLmsk;3(sI!6SD)(sFQ#C1o6tT&{?YnbuXha+EN_{_+nxRzf96p8|90+r&dk%H8relxd zUAkHOr6$m)iVra119Rf-5Y80n@D*>UB)?vYA0DF5jZU!mBTIVE9~BL>Q=v04oHmiS z(ZF0HqU)V2reFqYkzT#%998C@aPGzL5n@G_^CbTmMgD?dbQgaS9N19lGDnCit4cS* z8bD))vpG~s^aE~+MCkgCn!rq8C!h4Zk0|;tSYC$x{3Hm)c51W4w=@$vy(Cc)8K2$0 zEm&|QECELeSSCWBgX2)Wh)YASU{R~$b1NCCtXBJW-rNcfd>v@OVwQX z6q@KZwOGcA5=Fk8B;}x?4rkbplpRAEYXqKTgxBN=heO#m5>3Zw_+#bx<>9(u&Wl;4 zEtdcngWt9In$Sz-5-)o5?8(MbJ$>f+Wz>~ zQwhWuBb5kcq?Y;<`u9Ml2iDUF7cYp(i!5kh2x!O4T&E$C2^pfqs$#ofimD8kB@C_x zrZxhps>S(3xCt%^zGe&l4o}RiM;|z|tUc6~JbdBDEPP{qxXSK7;+57D!9uC+Qct9= zF{yKQPto;6bX_uGU%kxB(0_23v%tze#5-R80%UoI-4QQe4E_rT8$r`Dk6da7To92{ z6QZkCcK7lA^pqh#e6F%ia*nzLMio8q<%hbgAQGwogw8pR)TPu%ZDkIHuF&*^>yB95 z(Y-X4=4qA*k}~{DSBsQCZ}_O*O5GdQB)7mS6Pj9bbNBaSZ8Hux;SJ9 zYiBAA7UmfYZdXYqim`9XJhf$?>LVRhcy2D^lL%Rv6~+n&fbNfnc%l6U?rhu-<+l6 z{TMRuB2zV8NmC4R4lDAJD%acf^w6Sd1S@(BlMP*(fLx`+$vjq4i0b--?O25tPCVya zN}VQzxb+?xZc@t93smd!iE)G`Ja&9ZE|66b))AaT8cZX)h3TMy|Y;p6f81UF;v*7XT*Uq5@g z_vG8X|A$-M?QWLNJ6qm+$!!bV2MLZ>mB5GPr_YFAu#<6`SKL})xZdwE&r!WZ6(t#j z*_`G|MU$3`xK+dH4!a4U+gEKkeLzJ#2qud9T2ze(J{L~6@==heaJun|Bp@RP3Dbe- zaU;Tr(%VQx)sO4@fGjmG#wukR*f5^E!;%dV2OcGtH!%MIhetH5%(W zvv{x>E~&$;V?vDOr`UuXJ61GvmlC>S#KR2^Yq8L5>8RsjHz+kc?E2mT{s^ZS@r7D# za2Q=M;^FA2l2(Xf6fyN8EIjB#eMR6HRU;7e&#NZduj8`~d2#%Iz)|r$6lMH#j*2Lz8J=Lbt zl$8L2!qBoKw(T&kuq_f5-ZoyZqCKC3o^b07_N0hF(9_PI7Z#Ja3VJFeGKHR;(+u_; zQQB{Yo-%;STXgKX2zoN5U(Vq_fS!~{<>jG01oZy{dd6~C&F7%!D#l5W+|ZMv#sPP( za>Aj7iS|u&j^N(uJlun#V%MQjR6{G6%uw6zsFJ}- z%+;aXfR9_qqS)WTOOTxS8fpp2_3JMJ$w@HVQ>SDTkb|6p$pIyskQ&HAP(>yZym^_s zZnzSW-cJ%(q6lwBx5~739VMDw*cv!azxce3r`IhMOy{q2%*ftI3|Zh71(SX zKMbkj_yOdWvSO6-Tf;aeeYp&4fN?4~D;Q@eb*>7uj?L8Lrn<_8ocTGn>+xqIa^-i&xD?EP>I8U zE?xIJQy!|;uRA$<8k#JL=N}1tqV*@Xs@eqPbRV&^;VSxyEL?@5m*+Y3BU)dj9!!6# z0VqkemS54vXIlHxOV>|fHYi)zkxT=vs_BvN}L^P%c>8B|Y;LIiLxNQKKSWKk*s1zw2Gz(mL0+l>;WUVCvKUz7iI37jOMu%<)$jh%kIR>`HLpz2mdC1Gc85bNfeLB|Go2T z*S_M@ll771hf5-~?ixm>FxJ*4TGc>9wo+6n8o~(PT+72^?xiTzwyk5)6Nn8~N{S)d zY(+1TG_qhcEqPQd$|m{#`hz5~y=f#IJttK*MNLm6f~*TRn7GHfztdHhcU%+6o9W$C zN&&^C(x**jI!C#~L4h-W`u~`F*XFv4WL@{Weg$zN_O{G6M$*)Eb#NjK7?yW~A#Aa` zdjUbqy34YprAvd?uiwx6W@e2VV@?SZ(Y?<3(2YGk=NMI4dCxbq(m!Z#E9}$l)%mSN zkE?cl4e(Suq{#cjt8bJG3mqtzTGB?^mYO2QA8VzkOZ9W;d`mr@ejRxD{5_YraHaSL^EdQ< zE|*$a-STC7s`2a0{PuVszaECeOVX3e{_WFGc_4JWz49NA0P6Cx{2RF3TXIgyW-+O0 zO&Rd+MFIb8FQU3E!5Z(AeFR1Qg!MJgqrY#dCW=#;7CRnBow}!*#Su0~^XRn;US>Xa zToS$k2YG3%Fw!Z~_E`*a1!2d~g}KG#u=^G$bd3*<;(i%+QLl2VqICpf`8>mPI+8`n zIY@@Z_t}udlrknI=+)%7UlNcDuq0a_Velu}IX*+(_u07<)y1<_&??obwXa?G zL|xi$&MB6@%1|ojsB6||rPjX9;RNKW+7OJ76xOA6j&EJPTA&|V~N;9?G924o_9;WUX z12GMx9q!AAD@Dxjkrd^%{Rwrgk72?1R(^&Ghq29`nT~$fwVx;+x32F~eI69pF|I!;Fe(Uyb@(SxU~Pr#c;7GoQz%fR zLq>uqkeJcf7{sE%C;(kALpDHl2ScW7SR{ERd6DI2jsa(HUuTQLKcKoCnh4#Mef5 zNDRT$swRp0G3lIHn+VdRG6O=1PGkQ~GZbvN-x|xY5R#2zXr+9`T!b=XRwSk$0)P#A zCy)%8o0>jR6+7)_bJK~5%P1X(xVMQcjKBfj7Uoa*04Wr%(M0ox>w*}nxcYa|`+e?0 z|GB;SaqVYi&^bdD2$(~_;t2$Fq2FhGKJ$Vd@>En^+YJpxFfZ{htwPE&CmO2P$n88u zPbIpgn&b6Se~Oolx0Rt!%Ik4mr7xl#K)zl-@1O?wZ#7Xbvv*qiIjzRIuC zR3WqFY=x^@-!D9h=l=(o^J|@lPci`2e)mv#a(eS*d5AC|0)%YAxBhA}+rkfVc*tU1 z&ioci1PkfQk{0g2R5sbJWnS%R3_jsP99$4X*^fpbVP%qW_Rn=`dqe}MMUn%G?2#0a zbyq=>jWqwo^MfrY9Lb4|Sy7^}QixhhOB_IOopMVYIEG=AkMaUe!_XW)fS8GVZn@=y zA7H=__udtZ$DtxizP^@Eon43(WR_;asI!9TwDe1r=^*=}l0U3rA=ldKw5{AgDJG|z zd^33`-kNK$#RZlCJqYM5dIJHvWfG4xyfgaN4SMqds^MfA zR}$1~ovu;~#ic$v!I{E2i7E=o$xwH1JmmMSGn1gFOg)BZutJ44WS-uf7EIMKJO`sV zTdZ-!Lg1Qn3-aYrjT;Xyi|PX_ew)c{yg)?w>+IP34l1NI<3ct^p2^X|zXQ9$?FF zq+)DWf9dZsQ(PuY5`zw;*5p|a00%k)Dp~)epgSJYNv6C&HlUj#-RP4K6@pY3LbjWp z8NYx<+)xu|eyaQ|?8X8#;-o%RYiH_KW^k%fpbX(P2rMc0#$;g&r8U{Qg{LK_VPYpi zEZPvMO9?89B|R%oRll-6R>n<{kT*Hqv8Rn{VBCz|Y@AX$7LN1@I*7T}jfMb=KU8DLdZfCqi+_?3a4g+hSl$s?iOpt4EQxcoYJR;sMJTEk5t z4itNmIKspZ>?s}`LZa)-%Ui#{;=pUoK@xXvFbG1T8FAPs3Nm+QgvUSBGm1kA`l{gd zCn{di9Hs=e1}Kl3i3Ru!r95~gLDkM}VE3jv!2&*DjThFB=pI8)*l$pVsOGDqef2TkyU4kvgZ=K&XbykYA;A3UoDXRb5 zqD<2EM?jt?nIt~L&i9!l`n9(IK=4fTdOh#3BW-I(?0fQ1n!+pKr_e_*c4r@cr^i{^}yf zD$-37D@C=$4}l%k5?(#!hZDQ+#roO zr&oxX%{|g(e>d#N>)kJ3yyOSrmLo0FF}~I$k_~zS2^Z1nm*Dxa?c+qPUKraTYmn;Y ze&ZLan7jJYQ_A$VB#!Ry~c2kn`Y!;vcAgb5XL;0CW>!ELfEJEYY=s-4+FOVs<q3zYaM z$@AHDreu+}Ew7c;IOrAE^ESKm*E~Omc6eoL4r|zF^cl+3T*J?;jgQKA(AU{0E=DKa zq~G*#QGT=`2Gt!Vx;sn%&fTMO!_#yzKu(9}-~-R>^!O5T>XUHQq;YiXDQiO=Do&?Z zbQT-uMut{1=TnFCLDZSUouRrIRU;}LI&9N`XpTVN>(>HhX~G0q3k>2jNRJc;E*5zi ztZ4791$|yOn8dMq=u$Pz*z?Var5*PS)mO9y*Uj`#ANXdC$$9Oc#5bkR zBpvN4?)<)$gG6h5ibLJNjJ;)eMm>iJS)mH<3x-vik&{%!8;{B3JghQ)Y){N4%JHv! zQ^T5;^jq^oM$@8?{vKROGQYJZLh3e%DVTz+pWRRXW;N?(AmmCNXAJUYTJ2z~m9i3nb?r(k z{)Ul|iII5})S_$41+1R0KqZPNi8quPfWgWE@$zcicKbTtM6bcfl`>7CXZWI)L!M7o z<(ZBL5qW7QDX2b!gB5j8D_K>XGO z4Dubm2@DDi%iK2Z6qx*zt_v6n5n+v?SFAl0UZ|+j?9w8?2CY@yMp506EXu{Ej@7BP z1yO+HttxR2WrkAus=n%*@nJfR*rTaf!W7-ao>Soeg(_;@btEnNznQj#5o;`mJA zEX!jZ1Imv0C@?K6w8F_x);Aq}C=_?+k|1N!>QW@lD>i}#z@Ye4|B~1lJ@4d~H+Q6; zMk6wg&T&PIomuzwX5D+b85t`M!v0_0GksgYZZyoACBEcJ(Tr(!_MOJfqj;nsS7a9n4Ao?WBd=cn8i*|zhC{CfJ^rL8BI~AbnVCvPG<;3U)0RtI zB^gH_8t`_BY|d^DQ5V_)|D-Qup0@cTn5AaqDEp{`o9{Gbb&Lzk04v9RP7cR2;(Otn zY1EtCM}CtGY8$v`<&jf-cs+(Kf%`C3MY!qbL{40n^4hP}8se3x zW7Abq5w9iPkF#B`HY7PV&=wP~6IGf|=2IUsaFSWoiRe86O4Rs_<7xzX$ z11Cmu4OTyRS?7o&Zobx|=hxs@@_g#viFA#eM4b{3z_(NntJf8id2D2=`jiI2fDTVe z?>slfa7}fVEmPD zOFt03%ce@`$U9oVO7*F%>-ZhvH{bDJ<*a#}rcj5XvwlFr?BCG1T`F+ayvJmg794+^CGoWysUPDbb7a3###I=mCrn zkzD9(@q+ROkW#wVPmgq{9(~kqUO8EQX6VZj+E-e0ZJkSpN$qgN>Il}ul9FI)3^Q!> zlbHxR17G-dtWe_aq8%-&TfSIE3d&C|?q;2>oUS3`e244?ZktYvXpg-)VZ+3lP91iBK05kB#01HY@}0}nLP<#Fr_X(WEp&*kRMEqqQ=5-%mu?PgGPA8{Iq>!=Jan#9MKgB<_3{EhBzZ%sqd^o2R z1P@V573|~LB;PaL_xZ~&F~8t8$eU;x8GL>J3PyhwX}rG$7cz(%E)0zDnj$3D8_Av_ zJ)w}w1I%c4P+Q)Mi|Rb^VJa<~+LVQpf5#{m;0x7TfG_1l9O1W^j&y1w-%Jn=L`g0@ zloUwriFoc+<|yiR(uhGrsY#G0?8jo%xFl#9U=~a@`kQ~H0h)JLF{#SW6>n^H0%|7|kCdPcrvg`lPn0QLd?gP) z)NBjeH}WTjB{g?KI^am_;uC4;*|yYeAD(q#)54XhtdmRo=DU|)>wi$OR<}5&TUp`~ zbcc@pb!rx&QtT7!Zhlud zVqOpMTbXo+Q0aJSBV`ZgbszeM40g+vVwTIll3C5wOP2X!%O&%Zq<;D_kO$%%+`Tg- zjXySRMS7>yl@}N=TPrNiKw7TtZ}0)wVR94O#X#LME)+=!Y)D2#axxm7d5jm7#>omO zs4|Iy;nO=B&~%>ID6c4>vOLNKQ9~?R5nX$ZgKxta0t~{SDGLSaHsK&cz8^IwrsJP9 zEv{U-Hk^y3N~S0c#V@|nnwpY}?CW}ilb$cTG%H9 zRT+%JJL`rWR6F6!-ueEW`z1q|HFnBVz4&r_)G_A>htiy7u&r974g$}OnQs&+Qe!sl zb=`IlsK_y(%sk{Otkto~MSvr$X0i70P zkH`k>Y)`UB`V1s%pFKKT-dXvV19;@`v_w;v8*%=q<)oWaBRTn%Gj;B`eM$tu$M|6i zew?8=Iz2o;;DfFiQ*A{*{;U?W^_<;oFAg{9_6>|6C$4&Mm{5QHPTw7xgKR(aQ9Tjo zFO7#j>yVWZMBp9c{skyUYf=V`PT%uFBvArey4k)g}Wx8357#BL)` zk6TTbX>51c!pFDKM&-w@t{EhP280to{@B}Vn?w8Zk<6p$S0reAV?KzIZ3u>>!rxH_ zPJ6;DZJT9kG`?=q*G3!2Dy?*}a)BGs_I)HzPC6p&`Ty z1q8lVlzZk3@JZGwm5*20KebPk%7UyiIy^3z7KIg2d7JP-5G8hM>uFtu} z3@8kdCo=5BIWg%9+GtH{D<0!oRa(pG^`R<^&ez9UKYy|N{foaMrb}_hsx*aH6@L{` zTjJGuSI*L2MEQnz`@o+t%$}<9kH<^dK%%)#ex)KaFK5-0TlHGT2o0y|bSGnHkllIX zr-^;cN$kUXFq}Ex2Q2%&>CT10^bku|?VzIkrTdDbfbNYp8WjDoBxE3}2JrFGk=Dg0 zQp@}=N}R0<`>zS}=?uv*e`wD90xX(1+}ZIs<4_!A9dxkFNET4V>JbT!DkU}zGuHQ0 zWh!#-hT0sizm8YVcpiP;Rbx@0E~D4r6sr)Wlcr5e@%{L>E@P(uNvcdWY2sN0=DP|- z9S)^tYs%!>%nHY)UP>J(fG?6m=Y20sJo+Wu($qkr&c)ew^ASCk1DapHf^*o;KIETZZl zZW`cz!U`l4>R39I(m(@p0{_`31xg1MzeU14*I(Fm?_}K##|bKcbde0O@^@QRdbpg6 z6P3BR(vHaudD=1d$a<+dMxnQVSQA(XMH5i1LhYHcbv_W$+24#&f_4UU{2Ojo4&Dp? zvKCQQy3GdW?4{^;IW-@BjqBr)UW^@T)z43+`Uj?MVI~>*oLj7=m;*o>$JiO(*(&Rh zjmh&K?=B|AV8I0mD}cRKS4iYVZ9Z5!*(q`kIz|r=aGnD*lbuP5_+XkY1+4Vo4o*g= z(4->dCi==YAA!=Ay5V;J>OeRI=8>#$8Pzm7`1^M;mCx3rI+(;VTgk%CRs%e|Qpw5O zB0tJIR$^V**@-iRk`RGJrP#8*?}A{WB;*9R5Szi~kfxt|QsF9yo(ovP!#ZU{o!{sQ zM^$3*_4QSWs*YfPh#~n=SVsDjacN1kXM&qh%l$Jc+8PXKSEQF~d65d%5GX-Y8DZlo zRoSB$=|d=CB(%2FqWHiw@-r`ttI4rA7nc{Guw;*amv9rSDy-1&x)c`PVi0yONOv67X%hf3`LYBdUg zL>QyKoz=`CJm>&|wc5jIa0?EKkf9S|RU)jGb>%Oq_>QLPOP1GFt*Pb`h^SPTm@RvX zT6|P3l|m#Gw3S$<^qwJgGK4bn$IIc@@rSYZ=F(20-)t~QostDU%pqR*S`_EQpsNmN zVR0LTR}?6g4)+_SOFyWMi9(wuL6&^^t2ld@1Qs$Y4^_V{vx{J+)eRFUpAkLZtxLjn zW;!EI^}IzHkkyZfw8kw=%%9>SjZp?f_?cPe&qfoel`r~t?u2;$3by_8^S}KC5`6dS zOSaUH#aWdbU_i~zs)f>t4rxfcIWR??mLr*TU##HD3^#+<9Z?_~cvs!VaF$*;$96!P zleJj0u{3)PxAqF?4F}#75+)0^NQ$(=48;>_ z22lw}*$2g+GIKsrjz~!wmpS>sE7;!?a(GCH+8dLG71IPHK)=`F@?s|e$-L(_FLW5wTb$z5hcP`mP=lz+{zvUgXlOho;p6J z(%4Q@zIS4!-FG2N8;kP{I^N&iR&hE}N&463KEQM2j?8ZQ|E5IYJvb4A6#?*1N)OqI zvHvOiAqByrm}DbJR7DJto^>;Yc363PyPVNSb?}}tQI5OB1JLEeF}jo2#~#qw@}on? zw-wQ0B`FUipAthSnH6YvR4kcBv%oyv!m`$J*{3rM2~alL9=Ge_P}c#M!s!UoSWeRw zI9;ByjJ_;XJgZbnn!KG{(6<4@a@9irw|AiO1}CbP20H_5bMx}T83^$rh~;5bQ9nu1 z5{^Vf?cIUF21lr^eZ4(=@67B%my}uRDt?Ql2e8^JkJSoeAOcfRMah-pDR8&TMP~!g zq>k+B2_0Milpa>4`NJjCgO9jFQd+#3LqEsnFrwmkduPIRdW^CahZ{j!V^PHFNZgnq z$h{~E+vQER0R1mmYN2FtjfU;194tf>RwKjlVRcp}GR$02AgyAbVGbT52QJ#WXC9Ia zH{#8`<(w=VitQM=ZmH2IL+2_(Q`7(!PcA zOy;xbyXk9bPULxSnso#TOwgFg+}faBpMjUd-;Rn&c3C<0<7fF{kl#s&rY>BJT^c|^ zUBp*RVV(!9XN^8JDS-gJzPfZy7r?80;FBwsN;o##%(-4IiPNR*J98qYciSn|0(Bcm znm^{leh5RKPA4=}$6{Fp;Onbu5`Cq!v`r8{o-F_6@h9??l&$L_Vy`r%h2h+M!)Avz zH{~D&`B2VjY%q9+GJ^4pf{_a*na}8=6`A|gZPROfq+9F>mKIcY1qhImD{2*LP61q@ zl&E;fognQ+4qSkJ_%`G4Psv&*0y3CxltyeznZs)1Wb67B`IFFK$k~?#U`L(#q}AmX2l_CJ-bFuo#b$Zp%{041DpTe0#43N6TH<{sj#@^ zhPIh@^MWxvU`h=;8isDMY23Z4zAiqQOp%$uFtE<1i#P&7L*8pBs7K zE&o7JI#*f!Od*l#<;%yVh}owmkge*&(6?x+Ko#oqeAZL`RVozffB(gIKfK&c#@X_n zfnWQhNNffZJ^$7)~d_;#gxotQ+F zGkN{u+wYkcsv?SHFR8C}fD=&aszE|-@OE?rEHrMA#6AiT`vNGh+-W#Hj9Xn1D{Ja7 zvPly;h36aSPffRB`p@En*4l~akRp&)#9qGt3{LPR^;g%pwHL9dfH{lNqJ+Dj=$3SyqSUYL+<%~#9Qj~b`Qf! zSz*E$bRIB=lZdgpv@GM3g%?@d1Klw^BaSuP-|uyN64(5d%`W9#I1in~ z@9gzqz%Lu7N5yy9v<(jcj()>wZw%{LuwzqUx?wJQK?dhGoQj3R71!}MpX-|XmPaw+ zS&IpC+7r(&1ege|2Mb{w(CZI5TV@x?>uOv5-LqXJ_$!Q{m-9A`JV(B9!D%}HCNM!` z&EA$a!~l+bNNN4@i_=7Qele`v5T<9#yFa{qv8%3cSxy2iOy|pI-v)A@+rw2Xo;+Ky zHklZ)oZJpgR&k;ZMTtx7>6~y!oag7{c(luB6y-6*`5|8&{gy{J zGtuE&l}`$*CgZ})R~h>O6lw>t+5R94_=S_xN>gY1gYK+M04EYx*{l2EEY2`SM{6~- zmUk~(bbj~F_r2Ig$>hot;c^t&Y@eNg-)#AHhXm!XKukmdyKoJfDee^E+NR~>2Iy1P zT=cKpQ6e+&#z=)F=repu%G39PK6NXLOmcueJ$k)?J|V5P%8qn&a0nlC7^!h%smv@> z1r@s7XDS30oU^mMLJDfO?l#CyL3K&ePR7O&KHL#GvVPI$9Gr%6%GHjGZY z2aIQMn%oIR5Cu+~z}3LCp>BlZ4k%ur(|WbVz3u#GX9#@+On5gl}cBm%^J zoM9pY1C5uu`2MslRM(t2-D`nwu53lPwGX9Wavvh_b$~Ro5Q# zbQPmtLn+c(8c3#OW~3C-7ib+sdENp|4d)H|whp|BABy=tN%N9+R8#DCoF%W9%pmCi zRGe1TRcg&X7K$u)H9-dn(;zv6Ug3NV;aF!2>{Q?=M%t1XcUDxCA91Qg#61fx1Sf1j z%cEaW%A{jiV_Qu5#_>_+t?M0Yq>Q}4NTyg&NRFN|y$R5z=PqJeIHPDBs?7rLLpNBP=Y4lB8z|(hj zM(Lnp7~xVfzdy-(YwkjayFwZb*_0-X6k6H?YZqxLYiy?sjT%$MM@pE^&wz?bTQ3b+ zL-9?33?Okd0OXBtmV{CI&@qscw{$|6cT%AXVpwTI3j#rl65tiIM8df*6Deqk_D07H zvWW~RIX^`%wWz=uNFuzCbOI)DjJ)3m_p4ivtfCKQ+>fR<60vx)*cQzV-yups_AKFRoNZDkJ5 zmRXZH<2rW@jseLS4LZ!sj@GCgdV`DgajHqhS+rBjeCPq};env+aLA+}{M8-RM_+Oh zTRdic8rsvZA@Pn8tx&D0(H+UAUT&<;h(HV;QvSv(%Y0!^p=1(eGew}}5H1XyVh?)~ z4YCn58qQd=#e+_LBCIDBxeNEXXhH1mK~kCaaLKrbOmwR@tHGpH*lIFub6vwiGGQzi zlL?rCjIGHO_S94wn^T!u$du-EwkmuOn!8n}e@BeG9g9KO*Cx`92wFVt@5)lt8CNu4 zJAH8TcylLl2UuebKa!geU>m<5nwQYE_xA!tO`~;N^!$>P81c)Si{zKt76sQ4DF$_l zcjTikv5J1a#xe(uITRy|d4jc*TOgdfpBxXdLQw;fjmfd&%L0C%9F+9wijlJw@G+oh zhL4Sa0g9vs9020qLCDtKC!o9gc3rP>6r3d?Sz0SpH&$Oc#&Y6m82D51D*mo8DEPxF z6v?S=<*dq9F&3vvpHBJZg--qnvCJXd`OY-jIsxJ%n0$e-9qn zJC{5dk{AQN(|dm**Afa;*^I1>RG?!FT11#n;y8%_O-m1?qBejKSD6rq4@hS(q006u zp_jwV1*Wuf07ut1suCF+;6+tmv+vJFHm&V)UNzFBCPc@adMPo4b^|5G1jzM9F}P9; z#0_zojKfawIWgmJID&#mkmJ;QUPEKQ@L8QD^Hh$OKbOac+r!$ntW>oSk}Zin?$AFG z#Nq`HzL;l=EA%9S^*@hlo{V8!+E`I~{sGL1eA4+DWbg{@UqeQuaahYUk^LUEm1WP$ zDDl9mh{P)Y0$H7*J0ioKATrcLVu#|ZMr&kxJ3^dw^^b+e=%gG0D~}}kA$AwtDtu-B z1RbsVNB*IaNQN?!X`BX9ktwXe#0Ei?A89`gtO)(QJhvsSJ9#i9%?@jftJLn?##K)3 z`5~7cQ9(K1yLd}MzZz)Pbx$}9y+N^u8@n~~0qyh7`8UPY2l|Y^^Ql8j-+~|wkn~mn zNwvBmdpn?U2t0CoppFSsZRQE5M?f((l|66AvX5*D7l$1!KRO^~LwDxQBi7pp#y>b% zy*NAu^6IrDynxzBr9B^g{Rp};BbfWAp}4Z5@=E-M?s6cGgXJWK-)iY}`O))7yduAy zBTbAETbB4`w}tZ(I+w%|DWbul3K1QPrs&n;U%YCMkJ)>xUj%1Bm^U}%;YcFHcR2`+ zW(Z2fa7u`5$?QlH%oTw+`~=GHG%DzM<2yt$d^;IRu?)BlKx%Y>?w$HNq_>8O;Oesk zj<_+Ol$_Ko*#)V%-<+99ium{f!=HrI5{QNnH;H%*J*caNN!ChH#&7kWgTpivk%(*M z3xR}>$?kGH9#3kF9XFgLK^Bd=ByeZ;@ic(ehon&Z0Gj&y`hQ3Ly-h1BUB{@8a18z-Ug_QKP!@=>9H)p{tD=c}*Lg}yT_qlF z8d5M?=8xx>TwT1se138KGbyQ0)dM8wk@fy~e)e+|s$+6M=RX?L-WqGlmFt%M}US; zsd>^{IXpOGe}))<9=Xp0Y)g|v3_n*9f_vC2*$?Z^T2$>rsJVM|i ztZO7?pFRfSo;?uGd!b2XBf~Cyqd@#*`E@M+Fn#VY*vjk6H?TdklORm>nHF)2%0`(B zV|lZGed={eS>urS$$$TbtgZ{mwisOCpy=zX7rURrVl?6 zNU|qRgFea#5{=97cvy8cZy5rALP_;x5O8PU2GlSVSj_>CQ#VqWj(f z004VdJ}5K9C@HO{l#KK6qdWP^glej?y-0shtQ_bH)4()a+m>Q#{N%vfEMf7eFql{2 z4rV+uglF0=VY046e`|ksbj`$?t`C~=f;p7<1_~qo0kG+a1-81MOj)4KY-?$RXzGx7 z@*IO*6w(t_L{sts348g?k$p$vFOHo;pShoTz_Q4-8v8SO-oexD2KKABv=z!s6OdSf z{43>tFUfAKUydSb4B~&RoS9k9!=M^_6TNASTRQ)nM!`EE0apA!}Bm1`q7~ zhPy#n^E$nAlKNrIL(Xa;dX)&CyE~_&nnySniT>E;f;U5|WRkj$D)<(8tL_H=-CAkH zb3L@J;@A%V0(0Z^T<2(Ax-1TrYnZ&oYMN=*=~d8QMgQj4wPrX`8p`X*|Vd8Fq6 z#V*u%7l9t~8MPk%gL*nanUs}BIYro1KoRPPR#2l`sm{>dE%>J-Wozh=EjqIZt$6AH zY2yq!`w6kCzr~B(qK#R8v#v~)B!Nw@Ay<3E_G%`(iBJ%ahlE59MZ^(72P)8$y2;)y zO)zj4fvxra5!`^n4_ zu-jZC)}wO{*R2KTK@zW3{z#) z%`THYBFV^tgb^`7O;$^!#vO5V?P9q|9H)FhPD91M+9a*eqN)Hk)=uTGY!HCL2SXbDibR)K(wc2^dbDyCj$O?mGlk8#92y@O2p7; z-n95lM$*>d4yOI3Pa%|o>5CRj&&B_pGA~N~Au31c9|1Sd8iF@JO?A1B$~rVv1V@4B z+-(>At{i52S56js3R4B!cq@Id9Xmbzu?x26G6%zMk=ZN({oZ!XQ<3LTz5rXeV7I}J zL#X-(xJ-9rC{d{xb-m$2YdDr$_|V{rGO=EE<(dVIs4k%r!d**oYHSc*rNlhvA}Mp( z1|LZwr`n81+K(I?UVe&=h!|!_en%BVx`4{K<`=l;VMw(dQ>hU-dj&3yP9HX!b{ax8Vw(z)`Gw6^a-O|oBJs!?oe6a2g1q?E3Vli+aaD5xXwWO;^Zsg^*qD4$Wp z5jd))_LuP?0}5Lc#<<8;*2g6yWAcJZZ7)%=QY(e)M_$4@OBfbiR|DYw+%faU9@2qV zv>y08Y?wTCMS=0~g5!=~!ey{J8BzuK3TzsZF}s1&)O>T_N9;S#!l>GdZ$WMq;M55x z@QEH#9y9W+?p0mQ4QbQcIJ~~TWM~?iYt8N6^Y*~gr4T)Mk%>NdrA(K4OB*8|=Nf@7 ziyE7PHeG7)Ls2eJBqsgnw5(e=G+iklf5+8qL38Xo=UO*@>R1^CC`p*Ut}79Qd~nKmRaIU?8#BVdS$N5zbAak=ySB%3t)k!YQt zi)boZ=+|QB*lt_jnjw#UB_;V_dG)C;Y8x==@>L=3?D*|_`9UQEUiOY52bu8Em3oL1 z-%*6lqEQ1dvUQi@e~Zxg2u4WOjOqQ5D8w~yHm3Yf`9eOc|o+l#N z#>-XQog-MZ8m*IwMJ_Z}6^D;nt|FGkDJan&(Jt3Hiu><%I(|te2bTW^AqLswz)^IQ z7;|5b#H|zK2ZP4E%cXUdkDMv}1B&sQ!i$N7LJA)#0ow{e_A7A*`ojt)qcO6+ABo{?_$og505Kn6; z0XAQTSi^_y2*hHu9h-~x^L;zw(j=%^t!$K@C0~bAP)`4F$u8r3xJFISYFS1>1&Dm8 zxm__0hd9-5%4}kLT>}b;185M?OpymUptjkP2a;nv&f6>V!1|hjcO4H59#|+I$X17` zgh&*gkmEYe@oBDa2!32R6H0BynY_sRLKMyYd6=BgO*j&&K(aePOuXP2NIXcn2&@C< z?3F3=4b1}WQ_y5eGDp6-e;VPKog)X5r6UbCcUg{+d|uE z0p}g`R0VY14UU^kFV2gqVL{O9=FpNY=NMW1?VPPcfV_PA^zf-%>;9^l zF!Ox2L0z}hwXd0~tr`Xx8kwKX$) zWj{jeD5Q5n*eT)&TyVtfCJkZBJ_DoWMwJ|Lh=W>P5EyH4{Q5L7)`vhY`@onA`R2d8 zLT>DNaL6#gsW?OizBpt`evAk7w@)^xf8QasYk`bm&|`6i0i+(9s7OIb zk>W_SoN-<_1{bc$^^KCq*QjGS?5&+R0SPiwYBNkp? z9b@L-#_2aGrhG2ufp)d5$PDv)fTSJ~O)~S+`N7AzW1Xg9|0U|IoUydL|13CDPGWHEs#ipb| zVMbMef+vNl@{≪6Hu{yb3nS-!6bv)#)WjkjPbUb2$#aVLVf$1oQwzcPxk#huzDX z*{!_|a22GhsJr2-SWO>=)G(Hl9%>fMQ;vBHgqjdTCjTzm%o?r=ez*r$#oCr~4upT? zybO^E9q zL5h&15$nd3?v|tJf}Z`qLNLdoR=V%z@T@Q z6?e5p4|jQngi{SU$A{rmBr23@zXwl6Z-XjTVYufuU_e!DK$xm74Sd>Rsu;xe`!tkO zkT|e8Kvg*HinUq@<`hey(93DS&*(`%TiH~$$tx%0Go}5I>ve_~eoKg`U}J%*65@!z z9ceF-=k-vT+3EvBALq{@6Sy6yN}jF^*pR?=RdtPqks)E!cG@M3MjPZhNA+0wSqRN^ zf7Zu7no!2t9~<+>`g+4vF~&ZoT%RrgR?Rl45Ila;01@m&CjrkTgeJa3}a8+o$F*mF6 z&qH9`_g;LozJpG6VEmU;@ZP?R+nRS=Z&gQTx{lzG>S&0_r2`nwQVJmG5*-+Er|q zrR8+CdM^IEob7O3ouYlp6G^zk!4=|3AYcCQ%{LTqVZZLjqtq<6*8b0Ec8k-UPLay8 zuuzO}QLcMX!y_hq8nTk+E7zv-^1@a5<|vjYMrW9iOoa`wY}!bg0Z z0(ZjTgBJI`^Z{}Lyjx28)STr|*wRp>~A1ynP*in z#%%cKHPWD1F=7Uy2|a*8=c6!34h}8dM)O9xSR&%*==D@>#9eYK$0Sk*gbPOfC7u-k zsi3nUxW+$U*_Z~``jA+*53c`tRp+e-s?Lf*jT1(@Cdiz#qT{avnU4`eUA|#~HI|=K zAE#r4?y)1+D?S;i2uZ_MH`n4%T5ASbFTdM;{%;U|k89B3FC-cGMHHrV7782*#(n2| zy9GsdrlCHmE@-TT#!Bign^O%?ART#ht+u6Y#_&Z=Sr0=Y9@6{dzBC>hS6)Q|jRubv ze#3!Yj0$DqiIgk;l#%MVO*_Ji*rHvCM(%v#W4i62cT2b*7rHFH|IQnIknS;iun7Ng zK3!l4f7bf|0$Ap}xC!l*nOfa4gf5(l@sc}yzr7uS=E-3zKIP06pZah7>1P#E!|Q>M zz$+Xc>?f2wq3VBZUkhsVbKA1V8nfYI@r|XlEk&cw$M3ClZoY6OP7UZ zEgOt3ouPsgOh8Gza(pwI zzDQ^G8X~&cJuMh)uq8*mSRHD3@~ok&_sC=BR{`uf@GC9M9V@ zc6Ccz7)?%au$sfnSke&8A85BVklYY$W6Cx)2{^%i#*iy~yyPsIZsf5uN;V5e4UzEm z$+EOK=9NwyU>x!_GlwDFZu(*to-k$mgt6uN-f4PJNGK>xKL5L5MUhR4OMd5&|-4 zd2b3GUmHbZ#Lj~S5Hc4CA-y#FFf{O$;-KGGcd#3}s9+*aZ=>ZRg67{wGOgrZFps>Y z%EiWa4fBW&db>ipspnFcOuJ#$d42S2_}Jo8N`*SxQM94B+#*{Srt5u~W>(Sl_$~p_ zf{jU47?$gv-TGR);-$i#3_y9Yq*`3ef5>76*lV;sm2~rF!%#k4?WKdM8RRkV&kxkS zP6t+nqDTNPGEuv<{3tOG!ntKHtjZyycS(<^^s8a0TB-pxI*AzwCvJmNF)tB+(*#0E zVnHi955u5}CFS!C1GA+djITH}>@;20{46-ibj}ea$rwgz5>>?5_ z;SD%8D7!$=3FYrYVcL)w%(t?%y)C6B3+k+gUrB$JyrI7+rQ=T*TG1v^a-=m0d*DFF6#?g)-06xECUTR($EYI9B$SSpw^u&t z{Sh3PbP_kA zEhSq%8pRA9HN-z$&%>6ZVrVpr-14Bt;r&F|ABZrVVsMQ-k`jbAOrs8rV{5%Tc;PZ7 ztJ}`7XnvzhNR^ryLGC7N6!*n($s6l(zr(9*Pz=Rwy2ISe;sUV$PTrnRN7hT6A-4-R zbjS<_-b$C=Tc@wBu0C|Q7Qh;?_HLij7R4-rOv-#C$7;^wSdb4UDl|MJ>sva1e%ACe z;o!RFZ0TqRSL69zdj9Y}NP=8# z?)s93P!ps}^ZIqd6UeBH;0Z)A1f!x0hrnqly)As{s6=7lT_xyWq$#YC>|tP)#`eC6sQl~ zrO&4Lm#iD{rw$P93b)lz=q(lgTXJ92o2_`zT3aCpA^F&aE!?;!7dmR+hE)*YM&2s) zLE*{bKW;RJ+68zTt1>5uG~ zHz|+UO{;N&{sMZ3BnnnR@G}gnA>9C3G_9sV0el>3J$a^v)EH``FL^;sQy{(Nj6+`R z$y>)BLxYodu!^SgOYin6COF*s=$>gcV@>Q_KYqt#Zja8_3#0;zBxuJDkD8NCmPmuE zBdAbXAos8cSP>T?QR$CvkA&;g0D#fJ8ebYI>JTc-qba;1Et01MLUa z90*ns*(I{kZD388wi>ydu1IoaxT|>6fFeB$e1nE6^U@Vhx^!)(j#H2w2;0zaAh8YFzy#ayZooFsu*_{r51Z6+ z5PuK2fxV1!uM~aN{B;kufg4yVTP(N&u#$e|32k8I&V6SGA2VZ|4=;3sXU6C>8oEJv zm-Q`14?Vn}(Lu~_$Nr&4sqK5vRUqltw+$nyV{2Qz7u>M1;#7tnmf(hdhgOPz2;A^) z0k~mfbwl~#j_c;!p~Yv{aw@VyTHtuIOes_2{esxGj+4{w{HKj|h1v3-)HM*`hQWVw zDl@cd?y#x)*QC=8 zle~`9Vq%A7Bdlswn{x%1v{C`Y@qs6+cR*LKNm zP=EJ5enb5{{03=D-L1v>mjlsV2ch!N=>EB&|3i+0ZWoo`Kx3rR+Tk})T>oIlVPP$H zhiGVuUYFe zE`L4gs@o^a-@o|l^KVE=eIFj-vsc{5v-|wj>&IJ~->sI0ogI}x?->f#NojymRJFqR zNX-N&x@i?iwh4{@EVegwvjJF za3StpU30il!%vJriYcI~m$|9y*Hf|*cwWK1i{RuW4&=(Uiv`?!fW9b)Ae#cng(I7A zk6;`vr`l-2`*@5OMb;mYQd=&OJX0SIa0%rvAy2x16#0bT#@nJOD|8I zfVh=cPT=J&@{*HVu^FJ1h`{FpIFiYVu|);xC+;zq@r+1L&P}<}TI2|I!L}6Z<{+Ow zki(zSA12VPzeyIIwHNoEyoJ!*7i!8%(n!a7I1u7_ z3-INVw>msk=@1xN6Ir68i5Sf&DSAfzYH%a0MUVaa{ zoU9ANy5mrx3y65<;_037R-&&Fx;!reQb4*WbNYdCPy;M7-i}qRtvFnG2wm>X6zAfC z^M50_oK9{j5_6b?E8;$m;{PjfIbGt?8R7?XXXhF@B3i@ell>SXA_QB0`Q4R_PYgOl zGc1IAV;%3NArV*0W3WcfDNf`4XzzqD%|%4L;WVaWOVg4Tg+wyyYdc27r3*i|f&1a! zcSA^|&S2xzOaRZFnscjvCxo!gSH#zBzLq}YjsPz`0K(L8n-8sW^E#G#4EOG7Kft|z zHzty|qWuh`J(!{=qCFHSEZ7knD1=SK34%8ELD6i}aF2(AB93pg$!%X2(?v!79v4JK z;=%=(?}B{aEr^PMS__)}2RF-MjW;G?eHAM{r%%}D!;f0VD(gZV=B3yeUS2lsHvs<%NnC^^%41zOM8sVi7=Cs}AMwJ`C3fJWnEh2}A zd!lHy4tq(d=qLpRs^b@Ju9_zf@pN}E#=TVB%FhZjtCKgY-PUg{FL zOevk^3pp66vF3H{?e7Ce2?FxQEIwQB^GxY|Q)_2c`3Nkm4JZeEuKL zb@%yq?1@s2wz#V=)cu~^VeT(1F}#dGY2w{F19l>}QGsg?DC0}KNlxtGcDLwoNo~R| zXe1gaC=Wpu?+#^}YuwOy5RVzVp7Q>d+9Ydr>M2NwyqyB2j6+A+M^)^ztqcE!a1|V` z99zP0I6~fZp4*-h-zGy1a1qs5^r|(xuhP>%#k&i0g6ch^)r7a*l{db6!Ti&>CF~sF zk@GsQyGuMV)5^B6?mGIzx&pv)2aM_E*{SI)7{B4C&LwDtC(ECI^X%oHwbC_vE$ktZ z)Iy!B+A<}gHq7ihE+>+R2n5YTdPZeJgcud;r_~7>;Y2Y9OE$P_;p*xVAthuZF9#-I z*v0fjS)Lms;1K*UW8u3!K^}?3Ziu$dvU?A(s6t=o<>x$IQ9FW8>!SrdN*nUpufbP4 z#n0dwunp~&he?Y(KiB)yR}wF20qRy~rO}AdcdR?E{G4?tI!dQmDpQpcT?t86_IGN} z@--mKR6yL$;LJvavk|txGD_SooK89PPl){y7#m#(C^N-2%mgI-uSwtq;JC*5Ayy(& z+=?aCa$aZkCw2f)4G}oVW`Q9a6N}_`sW0X+=alTpX>3mt9q}oZ;Xc!Gw#>))DiHUh zub4Lb@6Wy`Jwd7o!tXpy@Wt!zpMUX!9LIkMu&-k%fuNV-C0}PsR6za_*)N{QkFC0X z*d=xH+Rkw%IL@rx4wsv9o9Hce-XD9sF7#pEUAo7S&KOLr2t}ktKJN1VP69~Dey|lh zrodKVf#DcAkl&{f=0QGtq)!gd4-3HrU5z#*LI@bpr-@Cvz5LY8BxSND>cjbvzX&_H zCZ;X$5e%7^n6b0bPhgK&%YgMHnhub>t=IT+QPW+Q1^<*k>!cGZ@yd3ou;B|KaK|}y znLWi_qgV=nL%chg=V9f0!{)x>W)$$~!Qo_PnFi~yn`-kg~1M$n7F!EK2zq;9HdJZX)RYqFh z>twY_H2$%&IqegHHuXUzl5q$I2N4ibyxn z)HT3ydF7wf8JWWE!P(Ia)Z+MJ>!mXHwtCzEoM+??{|lnl**sOd z$u4YR5iIZxc6lT}&U9qyHE&!s-FDpYCAvv|Oot@&=uD&HDibaSJe-P5cq1&+x@mI^xk|#Ic7pORd#dx15N+~6XB%!=+S3z^$(~@rti82*P79o#Iy7~}P z1KL!ilyD6_s4XBF4aAcpxL{h@OlM~2aFN4W?$fA51GU1%hj=Kslz@e{IbE2r&C+-P z-W7*8BTbZ`-i7dPHJ8NcD;uc+&8Fn@=P!1t0`Lb7BHR{=d3Dn{W!e7O+T3$WIYgTv zkOzc;gu9&uU>;E8L`9iAe{s&*4q%4~X4k-z%6;Q2*aw~FiaSOpj;ZXl!hi5(_bK7i zcgLIX6$dVsS|fS z!$pi_SXq4qm+WJTWaSP&)az<7$o$|aHFvhj~V(2>%^L# zwUEYxp}ZPAdUStO^ms&9{|ekB@}QV=;>Qb!xlx5t3;4Ha}lIIg=T#O zsap9)*2+hLqB;sqh~wq&Uvb8-qHzAV@NAyFdX<%QK2Sp8yH^N~SmB*m;cWT&Uw5Cs zeEs6Pmue>yFPtp*F{Q52QTd!}yp$1e>R0JBWkjTNGV)P07m-gKp-Y#U7I1a85Q(9u znynrQpwnx@jaB+TWQpdz35e2Zv-VNhoyHpmQeSfi0 z(lJ6%{lo^8yzW0vFYhD*p?-B$k@WbxOM1e=kt7lmZ@g97$={J^v&8J5N=)%)iIRwe z+Tb&2saKqp8oP#sp5Jy%2JFfYP-whIZ;+BMPRc7wb#mW8#k7dYgE>zTD^tGO;`BF4 z%JdxN_>`LhY9SxQ3?nbp7ka8Eo=j$5ekfA5UMO(@`PK|FPzo)P=L_2NTr?cfxh+MD zTnnhdqe>6@ZDbqPKl%p+Bqlk?k&W+M=sTN0!2BJCldg{cSwVund3=S0|Ksr$t*+a& z{%iR;$yBbfjct7GhzBwrXBe$BIkZsj4f5FM17yF!V>?In4}oQI!h zd^qM{^%E{WkK5xtCaZndvWqEjDM0+=OX9`tk;)@_BQ=dO1-u-5+C2z>gUS?e!p!4` zq>&`gv9k7#5&`MG2zvFUgTu&OVYE)^RAK$ReeFxOmNsXaX^mk|ozBj54ZX&A zd#G0qMBoW^1qw2;cfL>ZhCl+cZ2)+R@+(;j7j)RQsIDrF#Vga6kV%N9ws3tcQUj#! z6S)SB$lt~-)BZUGHID0rvUY#f(*MT7eWRDlBU*@tDpVtI?$JWD=|N0iM6{lJc_+n- zT%P2VdAu&kSgl6%74tAqS0|OyUdzr@Y*R(-lx$N22`dHdi*LOi6t>$*;>aq~$%*Qk zA_{K&E5Eds#@-%;z>)rq%7M-7Q1+Q;jbyL+r3FBYQHyApxKXXUhLn#OW~|{g-9-Ly zUMOg4@eojGCW>B5tJ{j7LSco60}xs9VxW6oKKtv7*Q-2A*+gZ311f!(LjmF+mXllYA+|)LC z34Gu9`yO3* za(YY@@X2|U$IjVHQ-)F=hccCkR_Y;G2!R65k=?**2)F9;W%ij%a^Wb^Uaad|Ze~|& z2U2U>Knt}{R39r|Lr3g+drjva>w8PwIUfI-8q(R@(BQK#IURckh}E5gUsa>>Ei?Uk zl^ciZ=S<%I)o%!OeXK92L2FiDz;TjxmHx-k*hQYamU#v?E-2JP6R0>>RHYQb)!vO} zs;`hyQpa4nA}yn%UNZWR7(Sd3298aY=vQg%FWl}81E`ODg9C6Gqp%u8t=dmL6iMTu@P1|637 zvtTiBMOH#Nd&Ur%MuH(Zgt9nA4a-s=s%`G^<;~l}?o8b$(h8ZVn8-ky4R(mCV4Gsk z{COPUSs9*AMX{s$CtGw)eV_L<&MAJ0nrTXL<_n$BjkCs^a{lcYaO?5%C;U&;FahF)N6UYe8Q}C- z=Z@Ry|Hi)`XsEL+v;YQj)rQoe6mv0*N|vf`@c}DiPl+effhkSpy7=kwom^e24*{!? z>Muhs7d~T!;3$l2t=z}mok^&E1_G{dR}J{E$~{X5Ks#mL^GG%L;^LF>>pAN3u)KX_ z|N8P6PzVdn@k(gWikodr5Wi5Zsu=rJ*n@7mB&-meo&P4q$pfweQ(l*4d-Z{*dI=$Vb4VZGi^`lEC<1oR2WEx0){(nazmR)P!d zV6mQc#~n9!Z^RE|gq>b0j!J^saSiEAHh4Mmfnjk=6F-v!qj(OyQ&umPZYxT12u+gl zog7ko&A19Og3Xk}c*^E_SVKsnyeBzm3Q)``8E@!3?5Z3E7l%Q>x5&SC{c=(q(&D9Y zYQRNuqJ*NY4&KV(PFSN*nK+R()d<3EV)tM%49r_#yhbFHBnhlQ_P4pKej(gYH|eP% zFCz%v$y}X!Z2IpwSGIBF2alJzsD%HQKwBr3=H;11^K5k$I%u}#x`~gWm?5<+r_u&g zKsyQg3ocAjAYqltEE%sE=0Lg}6eT)Ck+m(B*@8GyYCvSv$*`Vo`69<*k)sKuRbYIb zC2s37hcF-5eQm<`fhrryG|oZebnMXh$DCLysWC#9Q_>8!FZ2GwnZ=oV3F9apGD5c{ zCf&G$P~o7HI~gdVaim{Wi!Emrq|u1^JMQL)+d1(gqTfqGN(C%1cO((J+*u{!Zud?v zg0n?Wo)Mf21Z{=OP)Eg?n?FS+P)whgGgjBBZSXhBygkB9)(xQ@AWF*U;@}Lc zxq%`_%67|T@p}H5D9^FtzNYa-@T?*1q-)HbV!lC;_B_O15%dz%fmBW6D3pO=Go9H= zC&%69Rvk(J>rmXKg?!c zzYsonT<>_I#wvp(#9m_hzjJe@ZVl;p7Dz;a{UP?c%P^IJ?B?^MP9o<_-vzx7 z3LIPolqNk!!twDzQ$uG1_4pKWh1$<@`N%UwS>SpoL)v+U;5AlFbOl>Hx9e*SDt z+yN|%a7tuRihKXZ)t^6`kq$H5LlZOVRwG%ZwUJDx|^knG@5_ zN`9mJB-7;GFu~1(5bjE{!saMR;7;dK5`P<|O~q>DajX&~OZeQx5Pb85`(@rOztxkS zQyf=YSuB(4S*!)|hOCP_N2Lzm7 zkFl|N2V$v}Fz7gS4FL$n8ZYw43(Yo{fWfGFa?V%qVU!spfAIswjUq)HRNSlR)DOB6 zQe2A%sK!Fp;2!ZG%;8?3nQGQ|?O6Wems)V`IeB1F^#iV!<2k?rW-xd}k<^QkCSGFA=hFKVDt51v}V@ zRkx8%KUuQ~_V!P&_wU|C?s6ek-BhP;BZm6VJ3?ps{SHG00b+eyZtm+&%&L~w8q(qC z*r`s)F}B)wQyk;~qlMrN0EXDZE$l_V(-MVZso$Eg@Ua&CK4e>(si9h8A~n!8zHGotww|@6|MKIT_l$nn zCyUL0&QN>$uZZM<5O@ABX{L)~X~sMM7eU~^{v*gxO^zUW`{q1mSsKAQbAp`f_pYvg zeDmb=$=&Ibw@>cgJ~?}GclPA$?8)Ox8Y1ypE|+86B`DeZ!B$b^;<|fElq0I(C3NIE zx}RLSCRjegJh{MZ1sbHAS`{?gcB(5tLgUl!z$xMcHVKMVxZNG6ox0|zIc$npZ2r(k z+j!vAaYCF!n%_ozg54CxDMl-TaXRynPj|+gFVT7-H)w0g5uTu7W_bHBQ($a^D}IM5 z*067k4-JAn#1+L9YhhkGdJesUIU4JD5m)p~L6-_yX>0u^Ot8(xAWcWf70|8;Q4zR^ zxp1n$pB~d>#I$PznR-z5YaBFt@l%C@*VYWP6cKSe7NN6x0g77@od#`#{u=XN-smx? zoV&+$_sm4=4D^agV!ul+!iYvDoUnmP(PQaBJomvI<;NBPHqb01J*=co=ObXgl$Mn) zc3d3?i7ss3rn+SGqev{Pq?~pe#TdaB0lg~4Hm0ca2#L5o`xSl;sD`8Eucb2N+#M*2 zbr>y#DYbto&pO7C3m|ON&<;#XweMfYWPJ03;18zLD6!$!G ze0>EKn;i4*50T?JF=i5&bUS{RbURA_Q>(eWvj)9)eDwih%pC#7^DY$QIkvQ}huDJ^ zJdE$4rYG#UJ|nJ+Zsm|yv~81MX}8V{D$w4DVX8e2cf_D_6e8>wNC46wF3(&fuB7Ii z-(dMJe;Ic<6FJm!7->YnG03p&ggU;%?5-V*t!^n;Ih8iPVRgyx$?Af?_J46=`LF+o zo6w(39ZUeHIheJBhYqG$U1Cr9?;mzDO)tO?R2Jcjr9oGK?#?o(6a}%NvIpHS{I8zS zA4kOu-#jXIwFrz04T*=O&gLxeY)U;;sQLSM$oDYy7=-M3#!zqeAoa>R3AX8QO$R&e zWWV2KDdKh1!55@DJN9hG^o&_V3+dTDL_VY7tOu0=D=IHEVBy{`_0yAeNh()T&AIpb z6xH?rE2QL15okI88;?(fpOio&Yx2t@JR&5LfWA4U;^cP4w8<_mxqca;TpA&TtJ!%2 zJ;kC5B0IshS2)NuDx;I@s9620^lo^U@aN6VL(-l6NrYfu@xz2W)vg&xet!I2kompe z1TB(OM=M)tY{pGQ*KXB(UEH!Yd+GE zwZF13l)@CyeV~cCPe+#RrxnYdlc@F~Oh_A+5^sNq2|HpIZ_U|$0$No%i!KYN@qy9KL&1*plR~$J z(GL6gz-VX5E8OwWiwJkbk<)O8qHdRfgNJ*rokTnLG3|tB=d%`*a3|S!ea6*x!M=;b zohkdSudn_~*q74f{p>4Y9)&y1YTZ`0g|@@(F<-hE7U)-jVjSa;e^2OHB4p$Tm35u> zgSflr&GHZ3Bpuf(vbv(WYMN>ASmi+xEV$@W_h*qh@5)$Wg7xhku_(Q%|O<19Yv+EkP^B^mP zxo!D?`#3?)n#dikS=imh0qukla#+VgKA5w*53m7A=*SOf3DMQmSj4G=`y$;w^_a2j z_^ZgZ5!D%vM0e7M@y)#ROzg2H(3dinI};75#N;G!Z0Lni;Am}GX-7wvoyyC$7>=6` z6~AfW`A>qzIrHT}z_pjfK3C<07Mic6)lEBlFu~12hke2X>I<0+cpIFrj7Xa66-H+g zGq#X%N#{@VhKynQybs2V88vY?)V_9`90nt#rt#x;(uJG%h*j0L4J_X`j~wMeUH0}) z_XKhj#4oZk`tC#y;~eBo+y50|$Ujd-vRvSaH_<%cdrqT7a&66}2pz|V_`*gTP3A9$oQFlwoX>Q@D&ah!KFVT8}lu90XL0 z`OlkAS920n&cuu9&tF`g-@OwsqW>9Cxlj?B{2b2x*Q)O5MW@`Ar&dXIsR5@Dw3Qd) zR#$WhWZSn$$HX#$TlOLx;a~Sv_y8R1Y6UC$OVa|CTt_2{@a<}amT{iES?U#(Szd!zVs=% zc7`>{k&jb!6H_O?ViDiH`c{aDQTMab)&;RSi>U}E+LnWV1|vLSwk{PLHJ&{Bl0Q+j zyWRJ#vTm4pL9N&LOnb=oAajL2_IA|3F?ur88S8nskGY>HU_i!XGl38&+^PHY#u!XK zZ%!_-E)T{sB1EU?Wp6tJAx7lEkDgtq&IQ(kViEX0{)WD4P?O{!-TuQ^A?^VIh9bBU z=!M{lUr!GV2x-WjVK{SwhWb5Gp9>7+0KYWV8vN1=+(FHvZ-ug}GhtDm;bA{wtopO< zN16c7>jeTe+DUT65TC>_cF4McCvp{^J<`w5glc+xAY_ew@V(p5*0^OfkZRD>v9$Kr z!63CVMvkhpt`h*B_8E z0A|CL*n8}SYonQ1O847HlONQ`UfUFi!tXthD8`die&;su0-5PhiU0Nu--Ja8nz`#k ziAZiA#++o!ekEF9{HB`8Tq1^9Oeglj!}Cc>KyTHPbBqmt1;D2 z)JvH5w&`+_Cn`|-7a>_Fc!@AtZciArIR@}ePCJ_~LN$-0-cf|ng&=3SHa3!!0jrI+ zL3h;lWtOr8)rbhtMt@csH8M#29)oz?KQ2){~OlLLt%2MDQiG%g#|`uRv*jAyn(Z;s4{w z64CF+1~4Rt%U_)AX(k1~+2DU#29AlqlZyXt_U|w)c8vJH*)%MQG^Kv235qG5xh zYU75sN}7y?@#^U(Ul*MVh4CI{7GP_d>syun!_hbNQx*-0RSW zD~-QQry_tMK^EVKt&PWZ-8qqjA|tSbZqz_CoETq5kzC3CzB}Bz0lXm>#o=P)ZL@ES z<;b4f0`lj{h^GiTpZc&EVWvHP&irP1Vh4vudw1tXv)i=kZGvcE?eRr#Zn(qPUB==h zH1xH;dCFyT2WtKCP>`d`^XMdvleUGF5sfaq!8cV{D{FE3RAV%7yz+*TZI4IG%L?rT z8-1V6wnsF*9%q*=T^hsWWVNpknQfMfGpbpRvd(H02yV8VFmV>x_0jMv{i->U zSi5K=rDsW`T3TE2)T#2E=ysBqZ6-fIyg0UtGbAR{r4-$mqZNo)c`8hzmirhT!jHbc z^~9_kXT!36#ZqmAs6Se0+Vsi5^^o*bDVlF1Zgj}YR*TS%a%z1H(T)#_dpJqRuagrT z1@9F=ce}C4j##7|G&&;(E%9AAfO!$w5fhjxp|ER-2&dEz4G@*Q6kzzAMhU&=NRsSD za+v{Mkrt`DQ;k&?>yCVAk-u|Pa{{(qIPF)rO~Z=9IhO* z3{jf1G2l&1&z2e(wx}rQkgP?7^-|fkjb;jD32OxHl z^_lex_%L&J#J z7j^5{kdv~9tk@8-yJPybcZB>#7ez&>P4~p)Ci=Gco;nIfJC8X?R~j!Z#VkKQh@xYj zt$OCnbfq}@UZ)?dwRM`HmZv!2o|RxKwGdS2>6HiUcWb~vO108~>NqB6WegE&DW~(( ztnMj_A^3@D(cip&ZuXop>zt!KA1L{>D>Q23Inu^eb;Jgh8m>@k^5o`I{jpDr?U+w>HMerp_Z*HM)69h=ZOX zzLSY)pTl?`-(6tkX*U^v{qi4&*XQD2`O~v4L$2h(;+g_mK0OG2U68w@&uc|}#FDn* zCgE3ypIqtcDD;z?KSJ8v!x&S`6~Oh)4)3#@2WZq#&m62f?;jA26jYuWC z^VmIkG%3h(4C;brxZL|->_yJO06E2R>OeiutW;pV-p;Q&j=Z#)TaBf0Hap82O4ALNkqD!%1p4 zF(pO#AOFZ_y6!$>cd*@LqbA5|&!Uva&cXpfh$e|u*Z)`Z6^Y3q^Uv1*S`I2&ytQYPENRn5EfT;JmaRA`|NUBgW^ zCpOVgSe4bzL{Ick>L2C}X@6{EG zo=`{jP~$0$KY4cLMbN4G8;|^)OraE9Dt-A}#37^GQ))`6wrgLl%LQlK#}I7^DT3)r zVONhlXKlsScOJe9>?+F|@p8^ODh8FBg$`x)Sfj;k;MkBdSCW{#SuE@7(OEe$fKoyx ziGV1ZxlR>+(~veXs*iEXwD@5MIvsm_`{qriPJGMXVjbK3Ic$X*GRUA{89La1ejb_C zapRgkE8y_P))xMxVkoXNVgMy_%v5QR#CHqE}D8h^y&5&x8Ka*4(YIj<2!cr{+ zO@~r#*8DbX75C|U`GfkcSq^F)uC>_WhRJ+b_JWhcX;d(l@OgQ2%w3~$A_w&?i70h# zDcCd1x98v7DQ79^MILG@L5dvmqFa9*)KD{a)^5t~HXXmP_Fv%Dz6x`-f3ES^4E0}e z`F}CHPc!L_Te2U??2k2>elDDM1~jXaPQxAqj!qWKBR?M(EPioY1_I56g)W<^kOG!# zXdTk#e$-Wq>e{_I0i|&Jm+K!tC@*fE4r+T^cjQfB4Ih z{^qay*2BxVMHLwC8@{f;{2U_!qw8z7;d@h&wEgoR&!5aU_41puCx`t1lY=Mw`p-MJ z_NwNq2%{r;A=m@}OgE#jh{Hn2QUcbGXG#PwomGgJ z0O*c7R>5A5#xI5C3QLz37x#Q5{axw??v24A$mq~88E>dq82?!ChGq;ca_iJD7kTkb z#ex^V$AZyT z&d5+Om_6^IqyG@&Jt*#AY$c@~Lv}qM9fWCMyg)VS?$7AbUaSCc@m99D0%}~B80mN! z36xwg&-l1Y*`t7^JSI7hb~lL9-F&r_wRJm6cf^+&-!0X|u3|;Sio>)IsrL;=1?p^Y zdz?#L$chfx3A$w(#-dr-b6)*ziF3 zP78IhEoR{NrUgW+u$AqeuazikycsRqB=Cvq?XUBYmdeK7W=Gi!;4^a}b z{Xg$Kf;)Bs>3d-vdSxY{m<_2_FHo!68HW__g7|LO&|tgvLCC`JwSm{3wE$e>HmpyLczO?7TLI#*w# znyc#}(Q3;+ulR1pb9@-NGA*CsI~h3>ct^Ps7=#)-Sbt3XBZ@b> z__$UdiS|4?i>L$EYNolU4QoZRhnVWoI`r%U%gi;K#k`F|dTHsnPU>vXvQG`jTIIh( z4MurnrIsS4Itwb&&&N{viKY+neoy4$jph)z@3e_^#`ckwcY}rZv;9essRe>sfjC>W zbYk>Z@Rr$X?A${PTc%P{vlC9i|m6dp60B-^6S7L*3$yEBDn z`{xR+vc#Pnz-fF|Q^Hv$mnpa&Ag0zSf5r`OnTEz_D?JEBlr@6^T3$GG8i2j5{UTGP z%S)jYzh%Vd!~RLt1RQ0jZ7x+lNl!q}5!cCWw$RnDnN1ysyXne+SK(;4UKbkJ!-;d& zpE6t=tc0Sfi{rpMXpG5ct(E*V#N zBF@05%TT=dj<;84ju&}fOm%iT#XMC$0sL0z-?(jBoCPa0#F~j6egzYKKJtAqx;ZUQSI|Cw{J5l8)Kn}DSMIChNDwfH7XTRg9M_?c1!IVmq$k^!xy8rD`lhU4n) zT2hK645KSCuFh??-LWkdV;o6|(m8sTo;XgUvc9&K`acc6pl+1>3G635f=WE_BByY5$+ntvU8cga*y;pMe1fN_BhqZZXC>Dn375I6>Y!ZbS#?r*GLPPK=0?YvDGYxNoPrM)d{eO8o z*Y2pUBu#(UuW(ndDH4|vN?njdjeDB1g{`%0@B+EYZtyA#DRluMF}fJjJ^kP3dEbcG zXP->ru9{UnA8bI%JZJCNaed>mJ9v?jxQq8@$F7D#ZdsHq)0s@EhO6)zvr3&FVG^7k zzb&BTE8D67Dg=5x5$H%qMhcq2 zm61ZW2)4{RH7$Yj_8Txwv)!1KF^gA3iJwx?orMBk<>$?t{K(ATbhlVjh!7G??}wLR zo4_x!m%3}F4jtaXe{Q89LUk>*)I4Zpdow{lo#}FIxsY1*9xIw6$?N2e(^-uY;Tvs0 zZ?soakkfCOp>Mtyg)e4hLs?9-Rh!JKHS6_IQVLtQl)8T8yuy1quBV2>GiD+ZfoH9Njka zy|Kv76z2i}5(2}G2%2HXx`;@Z@DSkgf4R%r>{Zl~@F-U&@gkK4)r(4$Z6H^cGI-4MDU6;iNJZ%30G z<2Lb3tgCP0EJkTT#F*>m=$P6C5#9%@6;xF#52MgCpN0!EQVU{#n2Ulh8>H}4%Pd1dL#}Vm#Rf8T3#1>jp8;|7gaw!CRv(E z?ppCWygj0l9kU`*3wx%U=xjeR0~;A-?poVo^j`f~!|vIp;++-lGOQmfKI+buyCtZ6 z9sRc23DcJ1XA1HYksQ;EYN_boje~=Kqg1GSw)0WJFH(fzQH-jOp=rD0bawcVEzCf| z$CK^0K*%2~;O6=%?sAWttBhyszq^b_US%5#vHO1c?cJ$U7rW=zz5__V2atvjpX!&# zlc!vfbavOdQ(~3&nE-?TZFs=fV1k9C`9_`o(}B`He!qN}uX~K)J&dOwom~WvQOZsA z^tIa-6F1!%zOnP`JK&}BYettwnd|M}3sCdRzx#WEFn%?BFPpUg7>mT3NFjO$C{0zT z8H+ul_)!-}8r{&?_%nc76_wAJG_t??8g z%X`UYW=SlvA9fHFZqRBdW+}<$72RlPp8JL05{&Thl01~w(5Mx*ffv}$D5b&EK|xQC zg|E?_v|*fU?mfhu0zd-KlG1H!FKaXRM8Knbq;-9m3*v}VB68;ejag?`s}C{#LgEQ3is1 z-^Cnu+1tkf`nvRc_A$#7Un(C&%Y$F^D>zM_h*1}pAM}fiHLA-Xyl$-@>#|StuMZ{X z9reE!V`R^>F+s@vGB9TSQ-B=_7a$YI;GE|gVU0#(WK7U}Onem$N1|C#SWf4{%kqai zh=IQ8iC`pazC1zMSJpJL-wyKeWTeqOTfjb_>;jL#`F!%@W7gRMkYYCnL5l77r?WNxI*KePyhZZv^A4T4cx z!SWv<;KCf6Kmn@|m z<*jeKEA$qXXM&X4lR{JRCA>7R`S_KFqv{h)^YIVr+*DPm`R)ACiZ2iKj8|vYSJHc~ zzEt&ORA0i|QGL0g+>=V*IDn5RKduYDrTh}e!mdwuP`_DzxoCu3^%~PJ=BK)Ur2KL; ztyk)9ak8JEw-z`B-ZfI7LZ~{loE)W!&Cwv+@r26=gq1cKdiSjaSA{)TsSSg_8$jeS zUp4sK3Q!Oo!Z~++EMQ#~0@*hbn$xP125-?CL)~6%p|AiXxPsV`m*}d>06N{{SEAd! zXzV9}fS>`$o>-sQd5`amkzcoESbHXz+x$claBh1~N0HzNUDOTEWH6?`Jcgxj3!b+L zlQ$QFXZ;lXrVpO~KNp>C+u%5m4v*Cl9ZoBDCMSC0OmRH;hrMZNkaJ>7?vt4qycFiw zeA5jLWt3~`B%A^u5`Qp4L|@MM>xNLs>d74@q^w7Ah-a z5(mScC#T1NVe-A&O~4Kf!_-4SS7j|o${;9t{{{GU(oF9B?vpQAN$1Va^>hi*sTBo0 z(XI@2oC`^v=Wa|L;jbxO)i{co>+<3Rzy#PSNi`!8ksC-DoIFZrAoV+!q>e;S#}iSS ztR-B&M(x2ztYr)iTo{_|E}Zej6tEzsLEi1(RrfqybuAOh|MnSa4?TU7KLbLr%aW1EV`q#?%d*!R`#wQpxTUqyLo=^kV+S= z2FQRiiuTNMPG?qf4i2I)&>Ajlng$IgcS?z@Sa#Ki^0cAIMIIzHxmB+f#!eIXqF$3q zTAkV_kb*nCO~HA%hkk3nzgKgRve$A!*;e9}s!gDHQxqMJ-wIBjxM5#c+N-d?eHL$? zK&lQY2fGp+hnkE0=$x7(7U*?)X*qt}E<{!ibI@(#T@Y2};rKCLd{!Fvy3Hp@bj8|i zMtUV@WvO#XS7!uTSp^Pi4zaG()=19)s4xW05Q=y&<+ zf=E9ZPUf2s&AJlD)dtQ1iJ`($yuwuT>=4q zUxn7GaiR{QN=uC26SCkgM1gyqkm}oUyIkKc5^}|$v`yqQeg!j2_RV;WlcUI;{p)-q zNv6Y8al1KAj@SYZ#b+IluHq z=6*W_$&Sa&U6eFhhyNaoT`=#@u3_DO)kqc5&cd-F``z<8X zT%5j2@rA!k*~KQEWB%n_Z922*>c=YKi1WeDdx7&K#L-Ubz<^f_WwqM$Y;pZ)Z8{R( zZOby_%=zD2noi{~Ox@L{rw=0UqAyM7mKb@zE<;~ahT66<>c>A?K0dBQ|9>ky4;;03 zjnM_8oS3+ypZt6fW#=1FOy7B^bDgL78H0=35btr>`TUQ0SCpP_1c=&xk9bQyrPx&d zTN%JYRvR2X_?J0dSUBqZ9emQ!#M4TzYK`YLzl4KAI22l1Fwly6Cnsg)C?(C`qdf#} zVlKIw4a%uh;$Mtbu@6I_i2WT>s?5a*6%SBVZ<z`frLCzTT@IKPEZOj1Z%)~pmYDO%`N4e1_zXkviKIaCv9oB~=;M#Ug2?n=q0C=j1P17$5y5{yQFd@&46kI)uP<&+Kf8Go z(+aqYXl_!*$79)#MwcChFBxwV3x-+^U-E zQ>j`nGcB^;r1P-fBaMx$%?&+uLm#L=mGqp9-Yv`!T_2v;bkoHlet5L2b|vyqCD0>i z9dwYBSI4abkTZd}^5oHs(o&Ju;~}JaKpZW6nxV4WV>Q~2$7TEN|j$}q**1%7gT-LQT-FD54 zs|)$4Gd{rzt~BN=_4GQ{me(+JW0R{_JXp_8={sfH=iV3fN~>zU=)IE8DXFsxOqlIdx%MI~d^}!1Bg9x!`*pVmagpMn zp=e-9g;J=(-`GS`PWvhkN@s1SaUlikH^whn5sU8>N38U#i&HWnw?{{N*x=z zMqtYj?c2$YCbFx^jgCKXt5ei12~)XD$CKyO{M=K!!}b2Je2Kf1F-yAnYPzB;sazEQ z^q0G5gh9WY&fZg1izN9YuUi!99;~6(J;7I!KJ{KI;ays!cK~3j4~rjVD&puvcw5p) zgdG~FR;Ddfe|9^_tgvzvps?8T=$I3VYZsNPD0X(R;Q_7c!;18BL#EWtfTAf4I#=p{ z#OJvZ0jtZVk>>Ct4&-}ny3AVz+7&n3;6)>qL-KqYN^^M0{_`Vk}N^U+i-yF<1ouM5r|!Z$>g34|iJ9a&LtHY(UmLz9Q9>Yb|1Pjrp zF$9aDcXtNx(k5AZaZ~#VFwr^b2Yj>Sl>y^AshKYED1cp=_ry$`$-s39(jS9GsDKV) z)NV1G1)lgbiVqXQ7$S~DFyL9D48e6W$ZM;16vWyP&5JU`(#B_!>nAnxv@)qf_4du11`Ds`A%+{STlon!_CP zK==Mld^OM0y>OK1)a3B!>ApClg-p7E5#a7PzI9jXOQ>BzUV{cj{CB5TR%*)NN0fZ@ zsZt2Pe?=mK!>@FZnzBG-*>4Cg|I%0?#i*R)+g#4N2Y-Hq$kOb!oS@~vn&yQF4dCje z9u)T*uTBVPwbEX$+6)M^f-OVr&r+&OF<>gS;J~J!6|T=e4e*vVn+TjwPN?W?81@ zt*>#)>N1u21Q8F3XT!$axj4Uvio6HOH$EuPaF`Q5LA(b|WPvf;gbxtb$Fb}BrmFKx zUDFP!D9i?q^}$FQKMbEjol;_R_CN|I6y$ZzoT|)FxAvIzpk>(6u*FPsz?N7Ua;~LG zzpQWT-gaqUl<&+o5L5RqrsV5pDpIJI7sr?TZ-XVcqSu2(=E$wDcrK~QMdA24l<-2t~z{&NTXHCU0^fXEUGG*>cDcQA+L<&Ny9<%KQe(Fh1X_r$b1 z;x4O8;HQ`%w(K*mOF?l5Wp1x@D-GJf5*5|W`n0vbF|)M)Cv&yR<*&u!GiAOfherWQ zPm;#-L3J^mFW(a8V+UFipOPu(DN*%}dC43P`bihUGk!`$xB#4U?Zbw2 zct3;REhxlUj5|?v>dp^)J5Rpc`LgWIH#=4y#gD^cR)hnAb>4;=F@`rdmb{2D5PZ}4AJl`6a=j7mNP)!#4mQ_5 zFF8bn*X9hY%l^ClSEpx8UEsiK)P6HT&VKMlVh5GTr2DKk2-$Gm%HhIbMg8@e@ETYL zEQ?p9KO#BlR@JDD9iO2h^_P>g)3{nC6yMS0XZ`N_D(}irI;)lDOa3Xzhyci z&jINW2o{uo%^rOl6$SZRM%9LY2~LQs?Y(-RXj>RB?brb_>Yo>M;BH8L>vBMGHzLoE ziD{D=K|1XxCK-<=>L&H5n3zDYNNH|W%AVi211 zjhq>17LDU2hT(z8g%|86+0xUXJsiS+ely3BlVn4;tIotUr~f1n1u{;2RSK^3dT{>a zq^t)0+{fC9$u`(SSkdazFN|$Mw46!lSx1_YA#<>cf|u2<(J+~CLpU(PIao_eKk4xd zdmID-A_FHaya^eIKuiT5y3#{%*X-WKk^DN8vaWMMtj> zc$q>ycBQf+D6DBD{Ocay*H{u9Ge?2A+!Tdy+PoSOkR`8cruYh7^txwKu{^6&tUACN zak{7pfHOmSf0`loXjef30sTVnW4@)e%fr=|VIE?R25v<*DLz6l(g9#&sSj?}e&aCw z#H@iK)1el2(Ofx@yGtC>CI=VJ%7Izs$Vwtrmy#sl6muGnXG>x-!Ay7RVn41Oxg#!(mxfrUq#etw<*u6Gh z66y&V$xf}4K&R|>3UK1phG_!X0*MU!r4o2)&!8W>#n*5R0>e^lQurbYV2qpi07m$h z!UL|k)G>#O)!@|@KE|89`4*82Nc9P7E<^-^5Le11eE*?5ED=PcL3)GJ<#Wn`6_C{i z6_{uOc)1#74p87T`|o|EH~}wCH>Rtf@!wBHzW~b`3AK2sv_z;>r|4FNcB@VyR3eT) z$;0^juWUtsBQ1DxA>~j`fk%trq*OVtNnx68`0hy82BF4L4%VRZEV$04PKFpvC8WdA z{2eD#$X16u79$|MhXs&y$KiE7aJoY0GLy!TCW>=`D~!BkJ*&Ng{#<(RCIQA|=B-W-1D zJN58!UBgOW%zj}K3?|}WBK}O>qo|{aIDP{BX#fdpR?tWh=+sLzFUv@zpTn`Ktm8xc zb6J1DQMR%=TM&WN0fbaS##fy~WCxx}EwxAWM!Om}55J5_n+t{Cz@TkL!~C#k&)*dz zoWRbXcb@D$HwePAkM;XM?>yr#s{CC|>a52NG>tl%crwF8rjB#cVn4L+;XbXx@?`K8 zSh%Lwxquqs!JgG1aXGKHqds46p}g3niunp63}>GhEvb;MC>5(=B(qVIml(s8A;(oR z#Ws|$lGT=f6a-72Y+vIL;N!XX6~CAT>zj#{3PMHN-i8FNZK^18L9-oQzk7K9{uy_b z9eh}($Kzo6eE({H`S^nFwO{UI;$CeC{{CANHphffAyMmV@JiuvS%9Qy|IC3D-aNrf*pbI-9f za_(#Xf(+bD4$QqkhLh`$(1ER9{BmEzG%k*=-}8r16UYE*^uue&p+6cq!ru>TV|bwf z4isP;(fIz^H`=cdU73m741S}=dfeiXS2oOE-A;=VZh4)RG8^`flI{1u7LzKPpeQVt z5xls*l@GLW_<%p?-o4Kszs%^H2iTe4IQVHKY62gzROsCCqT-fCO?f+*y;H?*1hm*U z$rd40G!t5Xot^ERfwe3u0kq(t;Wx4lh!wt zjqO-1bkfxcX$5F~vYOhuITEz7G%vzwY1W+JO!Ei{$wIbx)qI`;#WFk2Or`dYwj3+x zjz~)qHi~!UbcKQq<=E78?16i4##yY`L+qebfb;H!D!XA$j7{Cq{b~Mxw@P|1B zZq=*^dM-kI#mH8TVi!@0Lzk2GcAqhB{7yVqcYt=`2!9P=r1(1&THS~`C(vCC@?!0e zXy08&&@YJ?U*2u5!9mAy_6wjyz1mJv`HJO)4=DkZP4J>!JP0;jajrgsd$wQ~O9c19 z#E`^0u?nV`3)}6>3hPDbEOQo#$igP|hBd#SaVYQP9aIVECFQB64QkmsA}(2`%5s#4 zr$rT-YHbv`Xt@G|F=^ege#3mW!blfR`alv}=U|~$*%ySfL9A^oqO@^E{W9{jSfacJ z(mGv0TJ=*7tS?d42`o>S?`}#`p2A0RlDG>ULjQSp=P#%@Dv3M?4#?Fh>O@k1gL9@2 ziAWx8|j3SvA zp^txhfqbA>o>4eqWJ>Pt)&IV{emVK!(@$4<{U0<}@kjn{iH=}CQqx#}`6nzte0{E! zEX#sj;5j7^h;Vwd2yE1~OjkUHDGVmRbVkfFVn`M0chlG*ge?8iZSes(ViSe<85NRvBI>yBP>f>!3w=6%s_ z>S_`WBQom-gsWHrGHAcztV7@0t!H()HAQL-Z?Jjrh`^;O`EyoNxM1)|Q+%V>(ETEHw1wvO7 z;>Cf&7@4gJrofge^;xizvXU%OCnFCPl?G^>Pde@a*tvdd2YZ}?#CN*sJ~}>}g6sV*u3?TTbJXb&p!UZpr3G&iJC7;wjY83!4Ig&>$q*}g|lzU2R*0-rvE zfI4OQ6#Gm%x&8ZG_mcpt+JvF&$`j1SLmbZ(2 z>HsgJ$|X5J@bzGgA1xBA8=k4=Oa+h&=%j1~hmTo?nZWu2y-?4Nl>0;nmd_|3CQMve zRN*K8E~E^P-%#^NK@p(#l3_KUnG&m}|8-KIe zwZASRY6amDgCz5~F767iXHP0XDp+btd2eA-n*EVEu#_e}5Kr6+ts{Qqe}x6mEBlJiiR<&}IFMQD1L)PxZ6P!nt5m(oJ)6?aL#jaXd%j2$ZBuUE+CP?l`R zhwujJdyVkCtL!ra1jLOCNauXL(-^c9RoR#ks!GC$KV?$ZwltHL4n|>SEctDg`<=5M z^vMKw3?A)4QFM*uNDolp8d5AbrHQdZ(3g`nzNvi1nFs6_m(VXOm~PTF{au%QmL^df#fG)(tUf02c2 z`bz{1W6O|H{vJMgs0G%i-a}eTt(dQ6E}3W6S7=X?4YkGr8IlX|2uIcAOdozO z*$)lNtSA}EetA5kp=R(h19{YC-Cc**a9gn(7Xz6}t7-o=#?W`Lf5m)H+uo zCVz2l0_TCwgsnzyeW%j;mN98OA7#|IC+Z=^dpHZfB`PIwm(HmV;gT5Pg4&$*cfNwf z&Zh$pzDVl%fkuzHPzmNJ|{b*Mw$ua5-OOyNNE*Muw7*#^OWa(3+SyytJrktKo zdX&M+OfRMaX^C339JN|DKhlzh6}gs2l`1`@61uLk1?L*H57ifq|cx_o!{~fQ27T4jL@V6 ze{49^=|N@^D@=ZV_RA@gU0LvD^pDF$b`+FlRzb>P>I_6}RhuB0(Eh&H5~;57UWo0K z2KwTLvF8pGI2;HWh{n)!$QGTx8suMYiOinvI$T}B=>l&gP~b=~M|UaCc!kUE@lX00 zGKb<;cPfr0|3DQ)r-*E}3Q!fs9L|pRsf&~kr-x4YHrRlZrkFj2Rry4DQc6B1lH(Wf zghV>a8^BNI;=3HGdpZ(7-KOnP-fR>x9@c z1o&k2!HQE_7lZ@8ok4jdA^Amzb`Q^(05Ca#lJ3-qmqb7#HkGbh@}oD^=sEfB^5R!{ z3|E9-|sSqA^tQ+55d;cp`;_H6imfJID=YWbA=OiMf&VR{~5)cgl zj;L3oaF4G}lXs5co7a*FUKe>{G#X4Pxi?pemI1!FN)Zk{1hpfX{<;b*Lr-Y|Yb*8? z^=oa{xn=Vb&p_pemOh?*b$0OzhC^LnUtFBMA+YwPpi_6rXC{1fo=yyhWkQlk@bYMV zPNE?u5xa^<WBlVCUjf3~FHC#70y%Xt%y6L3nO?x+w%on128kCiR0;kd#Kb2;T) zLEO}vS>Hk2v6r+R|7BWQ>;d^S0chpgC}ZFW%H29|%L(R71Zlj> zEUb$dvkX19;wNrvI8Q`ZFvOuq0)}4>X&yT z#}ia0u9H@^?*tn@-Rn>-ic;h`p)CYCUk2Qzd$s5dbEU-V$)hOKZXZmogxgV{XAKKW zwXNkO%h={*yO6Lr2Fkew%Rz&e6Dn}9V_+-nJ^C(HZ;3y^;&3n+KW7@qMQGTobxACq zsBDE>`g9#g?t!OTp{K{hExGa$&_M4#*#f@u$7z6R*O+(PvtciN$@4|yDqD}+qcg~D zxq|RZ3%c~Rb!!52RmQ_O8?AV|DxjHHvgft&w60 zX5d4m8c~^2uSOfH;sLhH4k(k`*v!z+e0%Zh2dVkF4O0LJ-{SB_y{+Z!rTPMj554BSTgdCuW$rrmj z&mV%oq>Vyh$&n2!rAJWkxW2pwozVLn>#1%CfSJYCU+vk4ZQ~n5kOjfhdZ7F$+Cn)3 zw1s>_r60n=H!qk2Jv=?S$2Pa@+Z^#hJD%_yUv%LLJo>>-xm>Y)G=KYQPk0Fvv!ql6 z!n$DRSd~+uzu|}Dw7dPDu$MfM$~FX1U;_Vs|9&|>xqNYHl*PIG40BM|`9QR<kT1B7=63@A`@aDX5_NnN-AU};3-jH~g+A1<6fRsM zpoT@cO4UfKSX5BWn+7MPrvX7cb`7d+P6L5g{)*6 z1!)*-!3uW;!J&SIGt`+L6;q&1linpBt5c6KksO?i2;si-?ue5xZP{dQ6r$7w*@E-g zX@?GoRhk;>cm`h=rjZwyXM22b05;Eboi&F#e^RQ@;7b^g#Zxt20@}k1!t`7CVZc^L zPX>?7mpWq7P{p7($$*|-hI(`s@lNq({5tsw(U5Us&2oEa5Rpdt{`n(*_SMcq@kt!0 zs@VKx9n9}L8uhq>RS(iHHJJA3f1jM+ zZ!JalV;>5x^};mn`*57hS268Vir%+TkQ6gc;l7AYj{@};ibrXFOQO}=`*Dxnv9 zO(@>`_B%N?eCK0srx-ZgPGVxj9pnrtAU zSCGr;Cnce=9;`;-4pFbd1{_KtBN;%;r<_5+8jeDlasWeRf)nDKwZy65EGe3B#zxA$ zF^A}aS9U0aBL(Ct5~8pHejZR?iGx5FoGTeSt!)(yfIKNz3CRq^TuUA%>c6I3;r!T^ z&p^9=R_8#-qaxwG6PVKT6p~eQH8mI^7sH42;t&t*5D@J$igl-?3ONfou2)fS0bRS$*b zzz{;5NaJ@|M#es8JYJ~-J2K47(2HGl#8j-0_5>B!}#S z@F}f9-#93ec2Eil`ym@0ItYf>m|z7~JU0&zy+qmsBPxT`!UhZ4<&BWF_AHQ}Q}KQA zj>eKiMhHxX*^aEXMUld`u;~mx;nTc{Rp1KEt`F{uQ^-kCzrZ+Gxo1-OC1Y`dcuUx#}N1031uuR%F9{1(_%fq*}5ckP3 zm#Lr%U-Z@o56Pr`XK33`3Kkp%W>tV9_do>YAHmohTZoiW zbZ=A}?{(h$`g^%Q|MMO0kT@T0@-KMuyb4HOlKNx#k{378RT!plKQm+=R^4%F8;B&g zN4A3LK4=j5&-EnXE6IVD?IP-6VyYbV3L#$;bdcVR`y7ZUJiidxy?}qCmWTT=#em7m z{H@^#`X*{Y^FY;qH=~?L((oJC2=Q&W8L(i*BY7=Sy_iUO0aCaXwseBiUV!n=_B#ZH1SpN|XaoQJB6i!!{(L^DnktwlLw6t)}T+ z=_UyVenQ_@cc9YQVmW8D6$%T}#D>ALuKnfjqmRt&(?}p}u$p=BdkF__RE63ML>e1e zP5Njdzyoh`^hAz=>)l8V5)z9KWvII%kBG(G!_C!) zk6Ix>c(0O!hxf@I-@kfCmeyLBA4F-^eYxpJoCrRf(9dmR6ki>OyM-9|M(q!%M&*i> z+J1ZC$g6Ojn^RJ4;1}ptRQ}7!Cf8~lPd0^v5x66yLAK+`iRSL~^Huz+^|%a9+;HU? zN`P&~K~w8dhR$MWw3hR8k57GsN=$1DCYERcNCU;&(9W<+xtf>J4203XuT9>Po6<40y0PG|>8Dt|-d}UO=~|}C{`Bbi z4t@^`LHLrVclhE^TUDeT(GDo0JI|x~F*@nk6Q}#k;6t;OwOQ0$!!(|LTSA{>Sv-C81 zmh-^PCBsk&A>r|AASXNDCgh$N(((I13tvD8JO=H0xbH zWR)*Qy+Px!;pzOS0d26EEulPH$U{C98Bs#Oy>cSn{#jngXs*#K?ElMyb!W+F1O={d z_3$CEEi^)?q~0X65lx7XeR*eJ48mi^utc%IJYs#?QX#KmYLOWUgovO@#k8E7u zTsb4H+?bm}g;ZdNhOyzFnrlYuX zvT{d=#GR8Ve{%iL$!h+&#-CWw>jPE$PVkVW0^cf$GPP8+C-;X^NhkLm>N7l)59;Kbtkgs_OhBJd)0jqyJZg>Wf#m4bfnwOT z7c_OL`Ti7ydt+-X`o+_wGWd$c%{ObAc_fMpt<9dyV`E~SA}wW^5D{>)Zgkg)bGh5D zEykt9Ov?63d!d6ub;*^$NjnpCqfoka+hph9Fp@`4m(hof?SY5>)DEE_fg%zoxr{T2 zt2BmE2U*b@v?T_>QNyb8AW^P;ef3wBSI!Hh+EPLwS@Ix|n-)lXX&ukfAekJ%8W4Ke zl|4w{9_uvlgD-$NVaMgN98E|seJSnvmuI_sJ31~U9`(bgPg+@ueT$fbB4-+tf_nui zTsGe9m3$F2*tcRRe*<(yxM$=;It9!^H+%_&R$@#l4g_l=Rusc5%`d?pD~%ENlh1uCmeBB?Z9CJ26hBiKwbuKmK1FSWzn?Y(3hqwf6?d)9fDOtGx+V`h3}+GRuxXJIu}QJHThJ(+SK(> z`75P(bIIyTm5S&Nbl8LBlIwL|t0#zc1&DX5qENDW(uz30P>vu)d*e@2MHEm4C5&?B z(%DdoAQ0>15Z}k8{)?+ITeQ1#w+=SN-E+_I%dZa;iB*_)|T)u-J9*XG+$5K z*OhzC&%cu(Z?xYG4~DB%pZA^0&^}x#<;&nWsa$56(84Mp&X0(C0nUH}72{r!ZQ~D( z{tq^Qknlm!hl&f`F>Qm>oxPQrMPp6dRe8u752qIsR3uu_f@!7ny^JKzu!$8Sx%$np ziKt-4*0?$XHnQJB_5wcX}{_oY;obRWaag6PVv=Ufu*kr>cjPvt#iglJ}AG3uEGc)EDLAm zpw2>5Fh;9y%GYVf4db(q;NvpW%@vo8lfOO8cEe&Ya$d(B2b6{J(jUC@Wb*SBLSkQt z)7Iq3bKd|akH%bF++B(g%A5w{JcyaH9+?imr1IV+6|0u5v5k0jLyI173-1LBrv<%} zC?8LL1_t4uqL$b4N0~yXCn|T|3m??4`QbgT^zvzeWYL% z3U1wo?O7@I-YbW`?Mg>{o>O;vHjQ{&FN+caLQvr?ddxHZ7o0Z`E` zG9;|szMr;H=bfxYK5@krJgG{V~EO?e=MVMkubZ?u^#L& z_Exr^e^!?RL1b~hSfYftz=`{=PUs;))Z+g2iPW^trLv=v+(JY>SjBXOaj8bIi2Ypk z{`@Ok=)=j+8S&gf(}XG-m>vSx^M=_G5|1`yN#AfwstP%F0uKZMyA8100-AfU0NClL zXs8~rQ-XEtADCcO2B>9NySYD3R>cgrf1(CcgF-O~GHC&0X(Y-1{r(GtrqjFyLZ2PF z6V#e;A1ZtPY7H+rbQd~Lzzx>4A*BG8sr671GP*z$O*p!^5J9<|aPO5eb$lyMkU>#C zufJ^~Pf5q%Fr#%r3I?YO68juM$#9N5BaW6@OPA0#3n2p{J|FRKS|KNAQVp}txF$gk zuN+gxWu5JV-OEywb(M97`;=ql_VdX<@fK$vkpX>yJ@Lgb0xdj2Go|gLe@gziR2bec zLM%U+Rj@J(lw1$1xH;>nK3USXc2&@aEHW=j5GE4zlMn_4kH;+<>54q%1D6!RCo%(J zN|EN;_~&4kQNj&wselXF_Le-o%KJTRZhJ1Ag)xg2)0(AD*6##rmzQ3;WSE2S9#1`f z6ORIFshXF?37&^2v6DuPvjy3D(=aw6h<-RGI#!2c68dn53?yIuC$xcG zFZ;amV5aipm1yAeBwcaM91eZ|WLGmzqA2llAH)N+g|edyL11PnER!Kv4E^d2*a~{;-Vau2 z>4RpHC~>7E%wdbYAtjGA1K#Dhu1GUfAxBKNY98Kz+k|C<{Yg8Aw!jF=Teao_7=9;o z$K6_(wWZamuC2&pv=-5di&SvFu#n(H5c$X15 zWgIxB7Lx`AqM;erP%|Df{!2xq;?ufS5z*15io>V1u;Lrk;u}%UMH>x^Gp?!r1p6sQ z5a$`VJDv1GDjC62#GK-M<&`)#Mt`bm196A6iq84v_+r|2w!VjqI3+@JG!z=hmNd+# zDjXmeJ) zAgW4i^{iimnVRQOSpX=iwV`PgrS0O%goTw%nsZZq>4-xcsxG)t;B2;&>gas2(lZFg zFl~eG%NXD3)ZZF@46Afxf5COLue~1@Gq)dwnsO0b@tn@SgrZ)Nf4RKEZdT&b`kN!a z^o`!uMF9iA3&{%T-(E2meoSSkJU?nxq2nr*Um7j%Y!&{4=uvswAC}#!Vfst-0T+DF)mOBQ8#0bkR$C3MNB{ zt1PV!Pu#^xw`_*b+Pnr9-;{EB3-eDWs}MCZHBo(LPmXQ$$%fha#m(`F2)GXNMuAGG zAVUu!4)L)Wbp zQ>ZF=ABTpoAR_XBWm1MS4v`c_!YDI!+jCoP=o%uiWhqNpb0(DWV+yMzM0V4l2TC z$!+|f{S}@mzs^TB__Y~I<#FBozLJnPK~rs2BJURT{9jPOr|_T*LqL)8Tw2M~Ur;hgcml zr_~Lq^booXAb2}fkP#mbX)P3Sc3a00xiVA1g^ZL+53CxRmC~E=vZGbJH%8bL3t}4) ztZ1iURl-O+)1b6mhHh<{&^A7>_M zwM9-<6<$Yn2T6Utk6$mdffuK*n5yf0&9vv&lRXiUsgMp8^f}C3kf0A#;ggqPvQhKr z;0g>#in0#r1+X>us%n;PFaZ9!h=rEZVcAvEDW+4-&x>cX-f(N`E;HT40R9jCx9%}| zJ4YVzGA31tHm^Pqrn{zan_&-N?XaYvv+0B3L%aQ7!m7->|ltZ{XXvzk$|T-XNaF{1QJo&HIXJq{A1F7-5iM-#hRg+&h&eMp+>~ zvbXYJeb~yv=lhu*3P!}Kg@W>8%#JQVAd-OU0NKVEIJ%MT;)udQOgtZo%8i#e`h-dk z)Cuv^Y6+kaLiKqNuk?)mpmctnB?Roz8#3IX@^}L5 zT|Iij0(O4beZCj}_Q$tW6Dj19hFa0fLx;Yp6m#59Ad5r-=o(K(&AcY1!is@FI15Q3 zx|ao#f4TF8-u?VB@BJ8kcK`Hk(T6BX=ZUvqJ6JAJ&p=f-X;W0=g3KlrMy5Q|Olv4! zhn$m(bfj{0Ms8fF(_s&3vxU>)ewh{Hxb0l2(jB9q6sHno=52gMEgbeoe}O(y%S!H3 zDyOO_JH=y9v=<38iq$JCkwepzsy!BEj>E{rjA04|m8?uN=4y|Saq8!EF7Pv+TVCJT z6%A3+rFiFR#-LzI8^nb1Sb2M(dAdhBE=6vEy^F6(nTmF3XXIK_*E3d{1p)YHvpKag zeK`CC4xV7TNpQ8t%fLO#S-}+NN^@rTMg z6)tPjLm%UyD5&%RjPys8^7rm_%99H$&6<1zzco}&C9AP4xR1GA? zO!72S6Go1oCc035n>u$Wtr`GXeXu(X0_8X%MKM`jkYtesyYrAMF4O}NO_u3f@rz8G zH)8STPEisH$?vq5 zV~MTaG6_mLcy7B z6eL#6a>8ZO$&Q>;WK=}RnN}I=_`_NJjya(ch3P#+bMD#Ne{V1473{Xc;P?&hM8aH; zu3#_}=HK(WV2AV!LJct%ZUYoqCAK)t@x04dG@gH^|8$|Naxqxu#iuS9T=211r^okF z^WxBZ>av!+1*VS!^7eRHxvashdbql^#lp8_6(VGFlUK;5E;P^$ue8a0?Yqg4Bve?ghn;ohhu~`6ot=uiJ19C9Tu_U+S2oC&Cp>M+ z?+7`h&Md|iw%3)N;MClpDd}WgMG_i`3lMTA>3HYp zqS=NGXUOff80jLvz#B0NNVVEccX5#h)zY7Z)~&DL`s=<9%JX&2C>*fV#o;;&=||yp z#*SjqtPuB-6$Tgr!+D=PD{L0nIr?4O?BU*d#7Mrs)op`Ye0XSyfZ<)(#&hhzk!-(G z)4OdVPac-vg+;3m=mGo?vAwS)6PyU|DHb}w#H5!f`^P~lXnkj8m4?i<(~0}ahP7l0 zr{&`j7fD76s357D1abfj6>bh3O$8?xb()%Ew;-|Vzib$j7@NT&uAXI*$RS68ci{M5 zI$eQJ1-PPz>5pq+)3tHqA&tggow*9$3_)s)g-FNg5UYnmY5+fglv?VWoDrdgO+KV{HAvXn>)Fj=sh!Jfjg@{;2@fOvJ= zR|5Aze9!YGS1FnyQNSY%m2q#DZJSlo{;Sg}e0nV*9OO6HOiwb)1db=I6tXN_OMyg6 ztB8tZ+aqn0381ONk6;T8Z(^s)BZaP@6wXyH*iZQ^;1O~rJ_b;{#H=|rF;=1i_gn60qBDsMsl_?`@vq}VhRxyw43hOk!fXYxF&8-;dkGJO-4 z7o(Je%9K46mCaM2AU&B&>#mAQrgTOLI$Hw@2MpN}Q7NYu=9vu+vD4_SXRZH-|7sI1 zm|UrQX2O^`E|r{V9H${M*HTiU#kdd-L~eil+DSUIhF;1dK2$$}W>~vXEnGACLJ|Gg z2FXkfn~Bxv7b2+^$Gfo_QL=%G6jbOAzxah|+1WKag}l8fQwyLc!^CYu1{=9zSEl|* zGh69aa-!yGz}g;3rIIWb^&}HV(l&&Q?=-?a+U?~XaiJ!P=M5k9Q5yG@+axEmrxkLS$6%p9l0m}(RrxFWCGu~-%O%H~; z_9IFu9O(~xKB*+8_8yTbFhn3_nVO2t>U8qOroDUyc{(MpnuDDgm0&9G+``sU$3{15jxg*>v@2 zY6<3#5ld$`Zv_Wfp=Egvxy;DK3_pYyy-PwJOABiYi%@#We9eu-0y525tt^*A6KBKf z#Iii5>ZRn6NpzaSh&f9or-#J_9*U-TqNm*uUDOe2hoPs&Z07}wZTTexhAzS&fDpq- zSmx5BE5AyQCt~%&;Ut{>bX+3~p6NFvqIrU5x_CBk3hv7ntDvEC+rR-7%kdFeu=31Q zyGFf`E)AEHQFsLE2db{S-^q1e>|GGgE=ot<4o~SM63@~7^^s>oXj}y&zt%MDZd`8G zN{byd1At7Dr!%mhiF8!3NKa>6B(@LX77Hi|!z$yxo7}W(F(7TLbjh5Iv8n=<1eu)K zcEJOpS?2H!C8;>|w-n)RdJs!)Mc5K}VNtLJ1;g&~76;z9`+=eyY@K|{>a{Ac4@%si z_CJAuh&6CHUs*5ZL@M^Yv46}w=EaM109+UmJ&&pSr{ubOOcnfdb>$yeuL^_5JRs#Z zklh<91$+kvj!=y?8Vg(4sqg@cFFBY~zzN!vJWEDF_tcR-j`2&6ieJ?~DMJ;;EMp>@ z2-VIR`Us=eb29H%5bBV~4+E4))pi|g zTDvqIQrmb|U4~v;YRfabR?0n!CksFw=X70QldT=GDqx3kqTHZFR%7M1<%T!$7JP^0 zI10c@35moK+|ag85w?{ zpt=kQuZ}Swvf6pO3wOACQA9M3B4R(7nb=R$!9$eX3Z4ql6s{}tD_qp$di+wCdA9dL zgM563i5X;g=e38CBO=4ruDfT!TBV)+G}O4HVESROA|$hQi8xT?ubY*u@fX}K5J7o0 z!b9DI0*kmD!d-LSNyr^&#FF*J|BA6lr8U)vr-FK>TyloIc;xX6ia*t+c3i57L)Bbv zff6WlRb%jarQPxQ%t6D92yLB{Uc(Lrno!C&buYbCc8}}PUbkpgfgB5IYTY_HkO?)m zIJoP3HJ5$@&z0#N!c|WP^^ZH5_oqi7- zuP1~np}(;hJy77HQ~9`zo*+VCI=U(n!l|1m?JLfu%pwD#giAzDxzgeMncj#Ggu?E9 zchB0xU^+F94e~^dPuS3?_YB9t)i2gv=*Jq_SNti4nbb(T^Ue(~VE4`-RRGI;AlC@^?!UR=?d$8@2Rsq7-?O;4ef z2nYTY35z%s+^I{~_4WQ#R7wU;b=&*lISzn#6EwP1CFQsAVnzKz{Hh#IprJV*ejFx8 z*`4E@x3)FBErJcJ7MBk&7FT!K7NHcNDnrveJPDBm&iXm|6qVV#lc2?O$7+^T66+F7 zUv6SNBU<<2Rnah9mC%m5Tcn(NKI>Fgj_DfRz?i#-7jU8_b#OjbO`j2_P9UwmLs}3} zXJjMjjmEp@E+}BGg^PW8iF2*mTpuy_Zl~5oyp#vfq!hu1N=holuh@$+JS+xt!B5-7 z;FL!!LdYYnu+}FwEExhp9SB0AALS93k8{hE+7oyI8}z%Or{ug?R%B4JWsuU)C-D~Q z@IpeFGo!~!IBCR*5N#3ODk6OA$u zO6#Z(DBVIPfz&w#zsgdKcnm)GZno6wed}&A9Dpk6fx%^Ai$^KniXsep)bCSI5jUfE z;V7L)Tt8F3QM{h3qBxr0eElLXEtIwgG~_x_(>z$N0@WhDBoBhd(f&q2%Oj-!n}QSt z*L=}>cy~vW6L>vE$5y0qUT$hl0}Z-OMIC{gxYdlKPz%ixf->jTq|;>8PdoVhQTG!`R2 zYi*O9r>7n})siNWG$st(C|T|?x)zd2;_w=ashYkL4;hr}U!+V$rc7;}MLZzT~;@5){59-D0Zx#+p&p~pXesnHOP*L5zp>AEUZMuM+ zfS1aV{9EmZi^ReC;`^obbqkkB!;L3HF-!M|?l^yzng0;n(Zz*ao!Z4PIf0%>N|g*@ zWjG)*MBRH5t#L8~57VKcZ=m`w}2{csv(rDoT+oDSub4y7XG$fB;< z=z_{e3E&SYkc>wU88bH8V|^amPK)Mo z`KB2(l@2)8fN%E8sqWCkOxIJX?sHZ$B(Eu>l(#v?!0s@nH81-tY|GvqpPvV;k7|lL=su61qpeqNFF9;b24N z`4CAmGh3yX(GOb2WJvzvkb43zTSwuCzA4FT4v%JzHNF6LCGx-`x-tTSU2x!=Lr{hrgD*@DMZH@O9p#dvn-9QJ!Bx;1>Q zv=nwPCfekl^mS;)EJZg@3~#%o(;l&7-roXpsh^T4>XA!VgKlIs=-$q^-+l8aO5PZx zWP9o|&*O>bWVWi%FQ`Hfq`<|X{@^1H?#a$ySf;^4h zl^^2@VvtA-`au0f$Fe!`$W62cd~~jOUcQR9P1NKEPy>$%SB^dfLVf+S^}TxSJP1-m zv7k}0f-a*$*Nyht9pbfs?9Dl}3WsT-k0e$fO;kXnrwkHnq{VQbbI3AZl8Q4DLo|a2W!^BwdCFyw!Y1P1oQb z&dXAH9B!k@K!c88FIn{0kPv(Qgb@gYO3L~QKU%Sc&XEZgO$B%{C&9jXGb7>9H0Xkd zq_ZmAN1cNxN9Yir$ANlBnHdRoy@Csx;wDT_Ofn9qU#~r&u39T#T#&A)3dU2eB_uTC z6Dvd?zu+Nnx2YmsT`lFQy*%)UX?rki!HJbH>SmbCq*#?Hrwn`dIpy0@DH#pI1C^WO zCz>G9%)V7o!BU;OO{a&-kuB-Cy<$&B|3fqlB;Eall8oHjHrGKf-Em&gECOT;wZFY!l&4Q%zb* zzCW7$`|R=pSD{MJb0R?7RH_uWm_cG7>0P&{k4Vag8Sp@jy|fGi z0^~UDLAlq+g8MA&i=?4l8m} z0!5Oco@L3uB%VzvM&JGR5!C)_hkx(<%9{*qfd{Pknt|Q>Px;I$?+QZy*!x++EZ8 z>uf1^Vfoi8Q7{_`i3B`RGD)V?lhvgr(c%GmO^OnfwA*p-MHG2>jsm`b8bkPj?v&j3v;`3H%{P25RcQ5fGpn>%bD^s3W9R z#eoXoNf5=&9)8OMxSsmc#aBeN*;oIz``u4@iww`xi-Lx#9nq#_2;FKz+~|o3dTXuV zkG|T2x;d4x-}a6}FIvU&+J-$si(UxF(dnhijTOf_+(~;CEYV&P)Y|g+)!W|Ts=4pJ z*?n5CvGwHGZcMce*JP&_bR(RO0%@40sk275tR>3qY_T) zSbHgINeVESQnvdM+I?)dyx3lah^PQCnyQeo{j<}&xlG$E70zR<_kt!wn3y5?XW@(E z1gj4x=#oK0C1hD^6vB-*A&r@rN7R%?tls{sD^ln#$kyI5fR-c@S8#qeS6tilEdt^1 zI98fXR@jpa4)qG!wYVru^KizkbU^D4I`d>D47o``^$(a2m>>$`kdQLIK??D+BB%f| zOZbtUDoChI+boNmbK=R|>e+f|s#s+_dkA`^?K^Xd+sADuVxT7C^4t=l+GC?{3WLrV z-CvehMB=oi$U*v|BEUfAF&Y@xNl8~{Zj_wlz@kb533A%9Rg{zW%VM8$#>Qu9nn)r? zE^5Q3{3QTblovH@pUl8^NJ=mLkN@!gt{`rlQ<1``|gDISD>Mm*R8RYg_h&4q71m-hEzfpehqi@7y7F6xIGPc3kTie&h0 zI&ui|cqTz1LN)B@&E)47)1TDT^*Pa&c`0J&PEkHzU&@MA5#&g1-!+WV|1a4uWn3W9&JTOW4*^$YrTBir ziG+2i(+ZU_61T{I5T}z+mem1w)?eUzGNl#}^ z%a`|=IOsDZ9uJ=VZlAYe537W27TV&3<7pu^uoFwD5a ztJ*-aFh|{?YgCQ&d)Rj4N7#aXnut&uea(*yf(;L5S+hhV}rDu91O<&ul0}wsPGwy=VhG zHwOecp;XUfUpQH8$8cK-t-LS3dj=t%g$MB?+T0GNH^=XOqD8m-Su-EsFQ;Zu+i+Lt zx$vf&w~LNYp}z~O(s1Kh*r}v|PEG{4r21+f3&3Lhp_~PUgTXy{)e-Ub+bm7J;>tCF zbT(9>gCp5m=Vb=#;O~gb>mo}ekOZ(;$p6{4ynfdGD))= zSA;&sy&6C!N|dNx7wn081!ArmGo z30ih>V6z@zvkzt)XxLGxbFTVLHNRP16gTCTF|zDrY@nioyzG8b5s)XTXt#CF@loL7 zV`?QPp}Nx_AK_3?(bs(;{edEp;HzlDwkOve_Ftq@tUnl!?9&#WfFMQyz7TQ`7RKd= zv$v-_l~XGl9$ys^08bH!)pb?3ED)nQj9}xzi-YxWqL39cft%@cQMO}e93LsFOs{8# zx{feQA~Y~j?@uN{?%YTfuAK0G6B@3|(n!BXW0v;7l`fDb zyiD}{E&8g$C6(ujy#WIx_u8Pa)24D|+1s^%s^L{X*XhB{83p=P<}D%&EyZ|mwJm;; z_R2XVd^oX>f7_;jvETsaG88p#U9KV@<(~ zs0rPUCVRSb{`(!?(l4qU=~@(#e)B@q7dD_OxqTfss5@%~8o08@q<~OcWWC$2E9(|! zLXS*S6d<-X4Lnsjj!ivrwR1x6au?bLXOk23O_`$1Z4CgljRrIy#ihubG;dJbun2#AGO&{8G^0N%?i81G9uBhT3_93QZI+u-~`s0S_JJUU1(wSA&1H`q?W^C}~*lGO8x3LB&Wfw&!=jgKoxVUveVl zKE}@0SC~-K1OKqVA3=_-Ft1)trkgMC{={+ILt%;^24)VGn#_86L16*9W0MnW&IuzW z;xW8xgW{0&)fL%=w445B#rondRzDn$eVh^k=T>|W>uVn8(-Vf}YHq%LL)`dZ-(6fO zaeh4c7j{dSs`VeUeoU$sKX)Geo)E;?lx||CR#Ux6ohU}C10;^UYGqa@A>QaUc7LZ{ zuIbLXOB}R)#m|1^hC7OmohS^bSzpv5ky2_Bbs1OYI=Q)HKG*p?6%5##L14lBk7BUW zFpE=~EwHoZ`vnFm1XY(3@1GyrKB-882`!#a%W^q1&~`5;Xnv9 z@se^Tj^84L`V@@Ly(!*}0m(plHS`DvhrO}g@Z`(rg7Bb>_=Tbng-Setc*cXq#I0m_ z>qe&0njg{|{LaBln5bH{#4(oLiA1!VW**V&3NTkOW4%hxy~4X%9cQP5=sdpeBax7_WUk4z`_U89bis6PZt%& z@%h^ljo|>%f3c|{uV(o-;8ljqq2$5^e!*>)T%%n$)YP-qLF!U#WbUCH45?iGJ>lY(}&E4d$=kO1J+rMfBggl-V0yD z-kH5#1zI$V{mOr+wvg#+K-0xcaFhxNApTX3ak0J++snxu8ZtS*dHaeClhjJsuF%X= zr&h(pA((K#pQ-V@F`*E_!8eiGZjaCagpb(a< zj)Uu@iH^=tnxQcVO{fnK)Z|lm$fN`HK#DEptiF_6?{)FFmkJV8)E`zQI@Ep8nX?7kf zOC^nDB1e#6)FCMCRc;y%jaR4J7q;B5rao$152COMdF8x6^Z#jO_z4?9wTXh#axo18 z&iPy=gTj9CrNIOX19mmF=2jqkAz!5DT2O867UCmE1bbY3D4)8AS_ZdfiBVpf=GN;kpwofa8*4 zu&~67LAQjrxs*9vy?%YIj)t$=H4pS{z_*}g0YrZ62)Ls#2<>f6Z}^S`o|CO@Zph%! z!cszys9byH$i`(4F;WAP=?nN47;bk2_5NIG=_F&+(n^V!RW4xK$}p(e&PuNN`l^HD zC%zOey36d2)`=r1qYE$I=mvV)k_=(hj2Y$yDj?xT5}l)Va!JFxN*l@UUs6jSpwc*ITcrk0Jhm?WJBB`7S4ez9*>r&8qm0;#?Ud8;WcOj1o6qAenVw&MDCg!u1OJ_-&7sxWdO?oo*nOCY3VPd=+h@ zkwlz{RX_zpBopW{pgiaF@|s>Z9cCtA5Kmx^q@w!(+MPE#)LsaiB7)kA>E+U4`t^?x z$f!Zn!q$*Fkos==js?ASa<=+*&qr(;yUnAF)xDMmsEc}14kdKFzd&N~oSYCLg=R7; zQM>4O4~FzTckw_z%}MK^1Lhk<){g~ywo5}W7O~~IE-FOesx?(dpw9LAae8FVqb4H| z3>Jhij8i7~`*G(+3w6h3E<_&6lhWq-wI2p0|Bu7{NmeCNB}AA|^*lW4kB zL(UD?p?eeRDopGm^f4w%`q`F5iokZxd{jLc9HTXwi>ob%oIk6LMmyz3eQGN2KR&01 zRU#MX-o~vh^I(y@++hM)cZ-SQVnu9vNkAK;ek$4FdxQNb&jU*(`6=qp-aw?=sfQ!MXJr?R<#raMo*-1)NWughB(jwa84 zbXf@0xpnWeWn{2@fo*dFhPOc#5`brqp>4upeD3qg)YC+33bMTT$5Mg$p*#wthvaMf^+3ab)uIxmx8P zSmi(e+s?D6-|aCCN2$qt_&!0YD5#((5Y%vADj>-3P!&Y!6BgCW)-@{mcq)hfMdjW9 zi~r6pj;AZ$0o#5k)aKsy_HuZ=#L3kePzxo2Z^#zmkoZ>AG+p1)#45KKJAR^|Q-(EF zG8>82<|I-%!+P^);MV%$ItUPf&zWUNHy)Itr~?rCuXVu`(+9c}Q`YQzK2Dk@5ROtR zeDw|*#dfCN+U1huMMz~>OLuQm zk%n{95Gx9RhNrpi#_%KUFEuS9P&N!QO2&>``4eC>8G$_)Xnx8(~0z#f~rne z*&RQ z5{?{-Of|az=~V%M>$&T9zuaAFs)w;&IwMox>|F|3$emc_^!knh)m0X8K05_ci)vLw z9NyQ>7Ta-Sv=TOARRymRyXkNFNGO|@nWt15IdOr?|CKWx9eunmGKc(yLuCbB(H{>^ zA&WjuYAusK)i}Yzb4!E2rDnG26!vt_$-(4=-53aKIEiyt2RC*v%|@tKbV}#$@>o(? zIMh`KRV};dA#sm?iv@x<6;dy;wA*1 zZCADzi3|s;93v8~Qf0i<<#15V%HA7_T6;am0@&Fko)aQap^DllL$!s1=vmE6@^<2P zPabiz7K0MNzg&255`nXehDK^C)mSG%QtyKVfkvr&w@Hw@Yb-(k9Pju~)*eE1Vi)Gu z|EOQ2B%NB4nEuqJ%qxW#6RRQ+&fSy!imDj%$iO?{{^4~7IYI=&Axb-G+tYQiV|GN` zf#P!2L&GZAO`5|T4i*dS5v1iY^S!=vrjRfVFSvyuA~DM;cc3ca%s8XEIeMK{$|ZP# zM&X(I>x!~`zX!ZCd9W zuLmx~YJ;pUL4HI3w0?w$6Ehu4q-MZsCl55>}{t7kNqfwMe5QRG=t8KIhsT+ZSVct&o^g8JtxXy@-{P6ClMKZ=xcKghn$pK8^ zohf>6=$9+$yCs28u@D`mrU+hQ+BA$#4>?_$tw?FWr<3CP3eW(NnigtnRFPavCQb8B z0MS-9^&rGc&mWalBx9a|Q;jL7m*NCxS0*qRHq(yBDJ}wzAe>0L0F}djoaH5$k&|3} z_)w=%vs$4rN|-hJAo7RUlRnyDKI|0`h)7`jrx4XzE{j5pL$2Ww)_?I_-$ErE&&e7Td0212)=2p-PmnnY7q8BdMWXE3 z2~=o-P-cde0aKoiGzW~W21=00ee45AA~wU_^8yrO%@vOG!FZwr#5DF%gt-c5R*fS+ zwgVSXFwFnSWD%t!&wXT~KZ}EScVM~hARZ}S5|i@>@$@M?-NQ((ju2ert8u=3`t^6; zJc(Fn=ZQSHzwQ3`ch>v#*(2807f9${PW#i(zuouo*DIPS*#&RMLIl1wJAqx~PeOm&GaZd_gQ+v285 z-ln9>{M&qS9*Yq~`VZF&){*balVrT`h;eu>-L?AUd&nPnDYka?dpkw?Q=^VWff7;V-`MX*n zYDpR*h9#nAI(2RW9j3DF#i^T-4pR#W?4o@I`;5R9erS9MO2HxX9JzT$M3RKewd&<= zQ4CHqA^rIFA^vgPgx%~+b?1QlDrjmuw(X&y{Q5jLiFUExl!8iL&_R=gf6JSRnnl>E z!rX8-(THjfTZF%v6`0Sj=6NC%AD-sTL)ukblY&QDJ}!55N1XNHZfCjU;ST5!5c4K3 z#Q<;vqnkp>dO3-3);v^*F5GAocv#MJ;^E-<&_~WLeLcYtev$zeF2V}=GK+q^-{W4A_xsQc- z>U8oqVLBIPH1@-ZyfAD)>+fLH9$Od9w$+nH4(mS5Z=a#@T(!-9IIN1mMLBEIOLGiW2r(QCfxVrVhL)99fT!>S|-N)IH`D32Lnb^(J;~~NkgAZ zicP=;fu7iDX6F+GPDj{0q}9ijZrwh!fkA(m4?m|%MW|`ghIFWN_Cgul*Q+Ok)#&&c z2ES4D#tzg;BDh_yRq`9!X?*NEoTcy*OEIE9yF`~=CPQE1?$)u2U0tPQ2Es+Ci6*Xz zirn^tD@Uu{dO1EOk+^5Xwf5#h1C|7wsAZ?T&}4QAh`prSvUO~3D9uI6McA!H#tR=% zJVIp~^2K!3v`%^4;XX2h3r#VymtJhlB+DT!yM9YxlP#y}iihTxbrFI2QbXci^2#$6 zO?TN_@sYn$9h=^_tob$)j=`4UJ_kp97+?q%jlr5Wq}}tcFa9E zg&yHY*3m;5%IFUMc#kZ1=>YwJn;eZ=lkKCCtqu->&8(}+eP}M@Jbe~o4{F#`(ehc8 zjI^O}wgeC*rcY=yXaCHkVHr&qT@0=O(4r6p6Mgv#EE-?qg%A_0F&Z4hK9%u@gqzE9 z#rpg>dOQ!DC5L1UFmj5zr{5JhMUxKb7Ukk#aMlV7Ys>^LTE_*&&O{gU-yVkYML0Uz z^Zt!H1~a!UBgR@WF3kIPxf<3rC*9f*bq8ZB3m7pZ*TIT$Xr#I(Dwtl~cFm)dZI$HB zsn;P3t$lKc7(qxz);3n;J%TLCETcp;+paZF$Xw63!floB`bHR%eGKHc;7s;B-WE4F zx`?t01Tua}8D~mRAu7B@m`*B{rsbR-&pD1_M#{dVM}Ex-Oj@jgnlceg*B$U2W8tlx zcmx1nCSOJ~f#{MdK^c)=W=<*QCN@!uCT6RjOr)wx^A2LIJlPVi*j7rh+W9v15{TD^ zFvh#w0h#+A#jh@MIIMgj$D14Adb`8>4R!^2kgN?8XK}BVPcjI=LVeqG2t{X12OG z1@`7{3Tt$)jP6khK~$B(h}>nQ+y^{@-MsHiIySU^J-}+@CKqGJ#aEzD=i+2t$>UBC z5iLktMbWThh_XYMm4W14d1ChX!{PB;*&~TVv?Ir(Av^rx?ZxbH_72ry^5<}puY7ZB zqM1>)@lB{6uYw{Y9*Xhg$Iq6ImlRnrAaVuhC6|PLUG!i$hTVbSHmR zCOgNuMM}AuhZpZvg@gVfqmIKJ(bX_@B_X7QOv|uXxjw}MlC?V4G$(71aEz#yi-3d8 z4O%c2l;&LJoL_%O21A#i)|I82I13dff|{>}F@pq1aNFJF2!#5=$kOTc)@$t7#evFO zV7F*A?h;tq3j7QUyqx?&rVXTY=@cSU@bh4Q?;Fn7QLp7lgqSFn5VAr2D}Uzuxe$ma zn+h)P+Yhff<;SnKZo0%{2uA(bT$HvH6N>mKJTx5AyMwkn>UM8qPd!P$ba=)^T4}pn5Kvcw z&PaGp{GpVo>)^h7Vx$C(K~wWY^CX7^_!KrL0d2|?rAzmvxc0U0#+5=A+{G0o(S+LD z8T!eF#*RXyeXWR52oh9HN7o1Q4>tMrTS_V+uWKpGbuKmg8!QInJ2Cik;F7#fiX~7s zrV~8sMdH$*=}5h&7W#?rvPh$oJT#+*$VFCj=-380*xC(rOrKIR)uUr7vZ9&l?^a}G z;f>1{=VbTUvBl0&Zi-ThWoZ)V2;&+3gRfeiKSOJ|x>6b=Y@06DPbAEokoy8wd3tfA zUqQC*<{|`ktV0My#K6;Ft8Wmc5l!WI{+ z5v0x$VW+aTVaN`cNA%ck3IGbshLBOJCv|dY42G2Dz#z&zw~_`25{YmGi^dD3i&S}n zB9z7x1rcwz{?=|FW)Ni?WR% zBBfX@emDXxS}+}`MVZF`!VeY#OF5U23~Ow3vvdFaF1`rbCCJ0nC}i7qAZUO6I8IIG zW-3K=p;pl~j)qYlE8LMy8nSE2_V}BQ-Tm6@)tH3bDdDpDTw^07b-CM0KP`>1ZAd7g z&y*(A%#&MFURv)=CM&lRy~9T6YH`uC)yc_4 zQgS9R3~4*oqfkZ3H8Z*AwxPm#Ic}ALbY&~otW>>62#bt8lLJb4Hgu!pvVN=03G z@8%Ke>Z<#Rm;hF%@i_aSlf>+jPb3~)zSnt-a$`i&En%|Kzmncfw@m1X;Yz@vIg(^H zB3{;+&CEk~vmcEaZ;lxdR`}IIDn7>gmk)~1a3lv59=B#UB06?x?@YIR=432K;X=`y zKq4LO!NnTZ01+dW4w$b-%Q%4PHz}~{&XzzK*C+r?l_l^X`xU~effC8|;4{c4BEikO ztP2s8yYREJ6i22fg>({W5lA`tw%usw@<4PDvsH46`wUK@GPU_IE&J$Q9*JvRB*h-Eu9%QpCM3Bc8o$ko$9Nhzi#v*sbp3%9F|Uhj)K;zfy_{6F1R!6dWPue6!s5*PioMq$LvO%=;; z?>g3-)3&BkA63ZjfL4w4eX6PXgK>}CGfrldvqAwNdtjw_<*E`XI5X@~p9Ru^1$3{u z%|^yvr|8i|aI9)R9v*_+>=uRclr&^>Qq3G!VU*kpr@+y6C@8dtoVX{IuH zY|a_&{<#yRZ-1m}ht*X>Qc?{oZfG~CF1e;SCFB||fAs+r_eWIFt8%6m_{>}{D$`F%7St-!W~!ydGi$?SH({f^ z>jd~R%udO(6j3&jyz z2V)X7Z8Cj!XxPNydaQJ)8_Vhl)MHXQ0fkMAh_E$x(Wxi^y@9bt#As`T3fktmWGG8V zKeEn1+O2`L>I%|LGRZ1hlcx>CdPT?ns`f(4H`l=&xw@G-hV0pLw7p1E9@{PEP@8!L zGgTl#e3xr;wzx&R)=2ppzHQ(&by*TperyzF`Rz1hqDPCJ?V|*;d!~d@ndqvI46(A{ zYF1`BLdFx7r)YuI$+Th*FrsIUoaBu(sTJE+i%4F%wylm@U2TK5rWB1;naG-Dh?#%J z(RaL&jq5d>%Cg7_#SzvjzSqKdMgQHHNtOtPrmn&{7}6zpE!D;BHXIpB9-^6V_GfgZ zp#wzw`(mURD`=~|t<7S<-zq%BYvukEsixcN4%H=QU$W$=a|Z5O#R{sTIU1!FAS$C0A|{!cXZg+u1lN9CFhnpdepO_N zV9n~0j>4@5o!~uc*yXrzM--FK60_-aq~rwd?#e#f8BR^t@)UPWsd}++fxdci6tIno z7c+<~)Daz0)r(~d(vU&aZO4eQFfxd$VYGJOn>T702@;vh&5F|~UF6gPa=klhB&h2X zqLHBY-sNTcv)9L;L*-+g85I9#QI`vA!uXs{^d+`HyvV@;1uW?HQi{30=?0x_^S%SL z<1wny6Rda8m?89s6sFSALNjy~k1Oi(Ols3K;% z!d)@YsgAmqGmg`!K=xNb3(UU{CRF;Wh8L4X$gyZ*Wmo*9l~Wj>v-YnpFSU4(R_>hH z-`W3;wuE`DZ3JE&&Cv9E2}(s6VI_XHf%3 zkHYNY?wOrTzTNxc+rRGc{ZAQex-{hh>hbSPmX}sOM?v4Umw)$VG7_KoQa8KRI$}wI z$9oznE`Cm*7}|2H`x5Z@M;NrC0L?{+-x)*k@>GC%PLB^69F$B)M6ZMF*(5#q*q8*& zi$~1gODkpQ0f3OlRlQ%?#yr9ikwXWYbVFl|NwXQ{SN8dXh3dpD?Lg8nYw^5}%#Oex zDtS0gB1Iv9fD2^h>JO$eo{DDQC1}QQL)*)y#j*KtWV%1albbr1+Un?<$!5#sjeH*S z6=$hqu9?r9+|78~t#e|nts*i;gC{TFlX>Q~N~p_|dE*N|JvR7^-5ygZ0c1$=?Vd`9 zi(V>s;>407vE<`WE5N(x1^xUG=)?^o)#S2RD~!;tw{q zN*VnA+AzN2W7J2pUuG`CjG3=RYa5wZ{v0fE$`ST&pFaQY*)FdtrpTktOK^azR^st> z2T+N1y}mrsg#MzXyl^s2&)2xMjc1hjiuW=G{D15yAMlVihiTkAG1DO;8 ziD@%`r+&hl0Oc7tp zzz<{HTtb|TWpjBt9py&hGTF~-tyb)Jkk2CsQh6Ss9G;~+k@_gYz{D|#n5FGVqpb1g zojkWRD(Xu8>D6c4B)$%2PmBl0ZEBHHHeY!HF@qh)btS0UwP#j9qO|+x6Kd9F$TFwQ zdYEBE)a^m$X)Tp>8saxb>5*H(wRh_HE4m3hO!k`n;SE>s@nP&KzchD4Vc;a#jLd@X zGw`*_?Odna6RA%2O3r8j6dEw^u8_Rj%Z%kFbGOg{Kg{JBtrYLAt_}2d#d`R$Cv|z+ z0w)}V?z3hlxn|&^#l(i7lNrq|GIFsU+#hMK)5KGqf_P&8hDvQ0R7XEsKNEqEn6;9V z!T+qjYhlCQB=;&MoEFqjW9|skR6pV#vJk4$?TzQCLWe4XP1?1h>$xJ>F5@XJ78J{~ zTFwHc^A$cq+Y=Zf|4>;orncdto5i5klKy#jP5Wm>J|X$nKfUE1cZt$O*#Xa{m8&(83nh+@ z4+wg69Leq^qsk8ur^R3dK<(Drq&?%G8CkVf8MmB5Pbnm@!>#&iI+#4-UDt1c(tUK! z(Ob4hkY*AqL$NJu?i^rrLay7=s8A;4aj|15z*a0`r?aW0q8b%$+!?6&1Z7cjtw~l% zx4@`VoMfeM_@BP1FoS>gQcE|os`P(t+os~>CLF?~TGFrBel@B|_>tYU2oagCpp)UP4Ga2-cp0u~&uFS8{2>d;zG9 zpn+Kb@fAuonjU*6@C{W2nrG>VAxv#@#nwgRB!F(aD>Zwpuc(S5v`#XAoLYfk^t6F^ zg2A#`L-3e(gWauabm=SWG@_kot?T=ET-w-nldOJ}AN!zX)bVr#aw@yf2h_Bt$TkpG zC=j;dw;@n2PDC_^`38l#6unLx$N&K|{)5f~DVoZghiFo|2$Kz?7A&J|6xbDRI;q^R zpYPrp>Z+&g#*I){pJGq@P*=ezt;~P7N~0Fzo@byFDb9dWMpic~B`Z5D5H`?YDKhm$ z8bNf5vkIcK5QZb0=YTRbQQi(LByS-4>6puVc+TKxCFAYA6gCHg=aJZE32n4>Fh}gA zL%%$rlLlMv%Z9o3vu0SWPJMOxNU>>6hL<_vU%wWF1zAIxu%9Ru_eLQe8wBp-9VvNF%)yo{O*5 zC|nN$l+x80M$)kO{LJS`L`i5OX-H@Xq>-vw;cHQE$6>o=suc+;pkDWJ)u!G^<@aM$wu&d@9yvOX zO4>5pIy-4MX}BM_m8x73?kODs@F6QL``mn-2$M7$(NMQ9H!nYZD?X4m4TqFJLZbK! zlS$!&wW$|4zH-h(KDC83@&&qUPljo_t{yxNbalz<5}c+?mz1@$G}n34R-2pDh6)Lt z#9(e?6PEjEPKTJWjK~@lJF=aiqh@bYK5RlTlomR^;?GW__*W-|rW+JP5&BXLr2yna zJW)kyVc+Qgk|kR10Th}xXMvd-<`C34u04SKvg_J|wxB2!Lw-d%)~`#ME#=NE+0VDZ zQ?AcOsu^i5hSR8b!)p;o~7+$xeyIkaC{ys{zp3Dq4f&+H67X5tnEW)E-R7 zI&*5$VP=WNKk9(;SW}zK&WfH+{`d`@9cL4e*gx`W<_sb3>ca>62z#Q8!xO{IPCiD) z(~Ks6xxZ*q-T+k)n#4HMn61KscMAauO+f4N3o2APwu_F1H|-THGVzSKY*dycqPS9YJ&%D_f#G<{2a0t4k>))wux3DHu8-t z8As!-qH0#SY@HRviU2&M5XZ;T_+ro`SKaGiN49oOBFZMrS3Zx$qRG;ac#31@0&sj8 znYqDt_YJ;m4SPD=p`4>gslxJIF_fdR0HO~x@eN<1(0B1eZZYVqG;?HVbv$@x=Zta> zDWinkPK3U*^Y5v~(jj;+4(4#BfZ}HVIUFt~@vapjS#ioZ%V}`S8((UB?tVAQKXNym z4!lqPGK2;QFq$e7oa%BK>EogLFdY`SC5Y_Ogz{DGukZ=%qzVAQo^3`i5(_j|&8*E;Hc8PgzZAoEUsmsmHD5iyZnyG?AQKt%6#1>J&@)?<~DOF0! zwW=A@f?Fvk+U$XH54##mo_ ztbhI@5;9mdbl}G$@ zjmXm)acy%$BVJxDpd8e5Vd;`1Ex={QluTqC`%m<6#SAtdpU`bSs@>}_gY;=+53!pj?) zJ4}>=6&^4|VCl4s(Rp(8HxCopZ^ek0;qmf7oVXGI;fo_haG1d5I!S~d%P#Sq=<>JE z!bS)+90f6V)NrYdV4|oYUFDcItB`eukdG2#wLLhQ@$xS1n#k6@eH@x7u-U=1sYrq+rTiY;)gSYF3ND=^#r1$qnd1;u4_ zxe>Lx$90Dvv*LL$1oYxT{@KsRNzesFf)=_OYjsnp!`c_UjoNO=(!N+DideNpIjcKa zfHQo#O<^@1Y+WoElk8v1i0zx}mSNt^Co3-}AMdv%$MMUBvyX3&uU=hJR~VPPG4moI zKc2bK>1v(A-^YX%IcpR4={mxF+UD3HWmWaG;68JH^kG&K15E(EsT?h z?eD}?ZtHWu4SceB0~pn(Y-A6N{{A&U+?t^^$1zLQN1*(jTWevcz^L8 zM&eFtR!M_=Dc6_FYwHlnZ!c%uwgMm0BDQ@wi6=SEnx_TMrO#f!e_iwER|tIn zqo!fVW8pPdv-u054EVKuL9d~>N&Ce01Kj$F?xvJTeis)=mIx5&zJHw?8?U^^E3?+q zUNCVgP7-)rfG_x~KFB9D1~)=Uh0abM;QG9IpdR=5fm@>YtAF|M8J7X;TWjj3ioVJF zM`Ie{t-ViW%O5x>8s5iZTbbL6ye|50J59-VA$TEa)XC9%LR5xSAUWMK@=H~kGFlKcnNKC!zxdGL&xvv>kEixf$M}$(PUWlN zS4}^+pDC6#d+F9QXEmb@9lr@;oSzGrtD@y@E}AnptXybP+mR2Sh>69;5R_@;)Q;QK z&SSO5KDr8#vU#!QMIPb}9PAmJl=@2L`8`J%kHHUZr zoHg0w%|#%>W@on@zOp1rNpR0u4i9z_JcPhM62QwbLk=Ms?KQsm!xC@%LGus)wjyNc zsCRsXzDE3%bhW#qZ6epLP+)!#rad**%UHB1{$O9z6H-ZI9B?$M8@{tbV)*1F-59%V z1GwV!q_`|v03uHwS%=p7VU(@Yw^$5J6~G$vc3Vgz1BA;6n-ldB4>Z0%X6zeWKHvh1 zz~zm?b$J~pE5Zu0g-W>Ri6CvP8<+B3&5=#V`Q?|!%iWSnN|0NywzckLfU9pjwhIQd zjt*$j72goc5K*Nz+3|~Z39sGX0fNdY6Kseyd!X&1yoAvZe`()z*r@UJ+(wq`e$Lvi zxhfE3+@yP>S+BbwO-l{GU8^OokoT=0W@#ckSsPd)Q zU0~JbCKfZeK2kS?_{&0{bhJ6#UDcfX3O8oaN+qHqGTs>tWxCAa2Uao2-Rb1a@Lrab zb*TpUX|NzXW8hr}C|P_mR0V}5F2I(fBn!dhks;J9Zg#*jl_cWaYLr{4tk2M7>a09m8M!&GJnxwtUlq-S`kU>V>I^NRlX=Uf2GQdKsV9AUI?)blT4qA)NsLWp-#8Q`|5jQQ&cf`6sA=(1x+gu!6leX~gi~x|5AQ z77L9F@(A&Q%29izj*g{Ck-0RjPqOb2>X|lzOxcs*jmpkw8IheK6E0XJw#DxkA(To|qF0KL zW(7Qq{Fpf;UGN8cD3AI--pkR_c5V>TMX%DR=&CwABxAT9i|YWz9~WXTUFD$z3;c_M z5o_*H*qJnr&4As~CuT6aQ}*G-VXRY}(P^<2ZKIDa;tS>tox=c|A8v?D6H~@z+mx{5qM488if1A50&drtN~wBsYx3VC_gwz*Pp>yD|tvy#JT%+Mt2>#UaL!> z6zfY%bO}-G{K;LeD_;?rSC%%XTPym59}NWXE<(llJpPb7<@k%%a94MOvos!xRC;Fh z;>z&2aXwxWC6;&J$Xb#d?sa{S7x&-ev8b{3$V1NK zd;S#r)8l&-KCaUI`u~r@$DQ!GTZLD*nQU#PkSgrJ>#Z7gCwSS;EbX$T@OE=-_sgq; zSBqFqnNh0>ITs6Q^%mw?rYQuhCA|pPH1SK_W+^>n>>j^Hr4l5_9my%{rItYTh>@}!VU^;AY&LKT?w$p)%b$HZZ#2qr$cp5FLM-=$V`(5MP($Psv z*Uqf~;9|LSs^A6|Q+%w|eRl88HsCykfjBNwliJ;vagg-ir)fv6qW*nFe9=Zh^|SF? zy1Y`#{qKr(W9wkM5Es00or@k-i;Ts^P>UHHb&#l3B&9>UYpo|$f@U$5+o@0SDhFN9 zf-)o@#oF+aEFEMNlt>`=(Gv@|GCNjBU_6>64BvB)-6PLYwHv5|L*0R`7)!OU=_^$C zp3(S5r<^QM@42Y|TG-dg>hE@A5>e+M{t(3$m?vPPJmk@Pa88_}WFZ`hjOUk_$-bxq z`ZCTj_k38oB99ol5Qy!$)-As$K@47Sgi9J1i-+TR3=Z(-NJnS@moXzNtLh?T2jd_> zZd)m~QVjktq%Lh%_nvDJ5yAPfHD(RA9@Z|5ow`hh!7GaCRpnJY+I^g_a4vz7H|qj* zt<^5IB3TszL3`nkUKvZuG9LWn+fF02Fs!JL_fQ4j?C1#FAXuRSK@N!K(&&tThvUvj ztVc3Oiw9+_T!gjd!hJDKvjcK}*slS?9r|1e6Anj41MrpZ!RyZh%0oF&Ro_-9jvr~2 zb|vVEgDWqFNYN7~oHC>8?Gjn5<>=WPW&E6f6_3^HeYKWG7@3O*3mo%)3^2mL$cpxK zIH$9c=XCzUguOlA(2mxT-kR##r5W@mm2BwqsQfAvrvYaWN;o6|mQP<2xN7xTwwAs& zo&zr`AXBg61Y+y>c*;3xw(af@s3kiTsWs}15uinMv#i2l0Vr1LBVBI)G>EMU%i?FJ zzXvkd`0;WR74DEPrY&KU7n(KM90RJrIT4s(FthjriC3aVWdv11q~*LhxcW#PnZg8e zD|F>r{_ufIu4(VXf2JS!zvbn7my_jbJh{Ctm42y_Rek1}Y_2SSm_`lMgFmzKmy=gC z!-#kIdEGj!akJp&?Dzv0**Lv;w*2_RBhtsPERQ;O#nT>~S7>y-NNQenFS(ic@UCkS zHk8GB(t<;D?wSOH1DMuBqZjs>etKyCv{T~Vpp}iP#DiUq;x#FE+0#FNV_*ACD+5Ria27Cp}=Z zTi%Wo&)jkoO4@-Y_SkNGVJIZLwf@HO@W!%Sj8^R%wW11$uHGXQcxnh}XcI@<)^g4? zwL(eNgQW*ybzy3vp$70Qm1OEjp8gLk8SCuAYBBFzudTU4Sl9us6DJbSDFD(=NjA%o zhKvDLB6Birtxz-DfJd7a2@h)Ph_n{2>U-XCb|5!KZ`;%?;+63xJ{Rz>bRN2Q{oqt< zVq4H+b!VN@9)68SsH0R>DbtJZ*D*tf)@WY`+>V>0|0upT){wNRf*S-y;ea9q zrUud$JEO`PDG5$>eJNYxz-23JZFnuYp*TxDR%3bJE+fwDR zlhAwJXF=$8@=}v=(W2yiF-}ID=gEkdOi_PhX@YYNZ8FVPc>Hq0ydkF5cAGrKv1n?k zMp-bIzS`}BbX2`|t5g-O@KIg&89SkjM9e-Mtz&DxIF=(ofthbmWyASKHrB>k>eNid zzfPOxA^qS&06d!{G?LYqTB5lWT(j%!hqAE z0v}+AC>u#vmFS6%BG4W|BwHc&CY-{&4Bq>yymtop{@w!tYng3S%=~5E?7~ZEmZLsu z=W{tpg;ZgjHM*uKe;2r6AcXffpghbuIBv>)$mAf3tXX3|(Q!WhEuGfRGQ;Am<;n)fm9MENh?JPf!w5r?P zvMe5rMWlNY2VQxFRZ#?Yl8kI_O_Dhp0L9mr@OmJ*{MjVAfWabW#7F}bPbeC5Mi+la zs&<@Vrl7rXG zbcIzAEaaAzMy1UWT_)bBK0%tYib;g|WGMr$mciP$pA;GX_BVZ86w!sl0YfIf`C_{NZ$fa3m)k7@^`iCW{X-fAYK*s@h zxhWcgj9=O$%RIY^d9W@JY{SuFBW@r_$zw`clGMPjTi_DnDMQ#5<>wVjaI~e2O!vD| z_WH>|&;fQ{=SYNELBdYXl_QgJjKg7TQ{`F>o3(n`NH~47_vGc|dl@J?{gKd^tCr=+ zX#80fs^p9m5-c42f-yXG39Evxo$q&_?R>Qx-$S1*`0_^zR^x2cH@lDac5)EEg{HxJ z3*{(|(0w9`p`U;EO`8dCU1(L3&JngcNo5eFuAc8ddbIm}n;cnOSM)91jey3Uqv1WU zF&Cyk+5LJqN1)VSBk)zRu04!5v`aCR2;yq2yq@}g=j**kF^s}Z73jzUMLyS=g74Xt zKF$`4hUmLO%*tHeNvC^wBGok(0Up-Y33ITLKo?5XtTPpHJJuYweU^5cP6Iy9s`%2E zHq3Qga{Q0tQ&Rr=@M>nCK#IXXM3EE1tHkR*ylo^yj>MJYvJK{A8nO}}KOgX0%xGM+ zBnE_qmBF&Fth{1?>QFZl4o1Bl9f$l3%fMy`r)T!tJ|P!15)#Nj)kRY=u!Je@J@Yi_ z0{7iF%&n#)1A0LxNz%4Z?Oa7p>hTmdHFjapS!H`v|0IPXxzUK0EKt9&UL$>hm5_J4 z$H{+rdfMy2j(C9xIj9*T%oUgJv^A2l5Hh9-ALeM+N+(c(uA?0QNcrOZQg)(8I=?XUO*wH zuk2j#TfaPu51Y;6!(hlzu_bo1#E92uzw0=0%`98LDgckTX$Hd+aqf&`5L$@5%W!Ye z7xMgqmDtxnHU>9^80;9tVT@0ZrbJ!M;}d+UGPxd~P-Y%5{dddE>m*ErCamQ{MW?<0 zGYgfuXF2Qw=(!M!RMvdvZ-FK&$G26-7n-SdGAa{p$&oED1_!?zq59v)~8w%^Sc z6e~BRNFEp4Z{oVV?eLNgCyoS^wwJmf;n$p_bQNj&<5LS-iFkOr?CPclq8c2ja3Xh| z>=&;C66=uwl zHxckpwO!<}BVfmjGQwB0g5;GPu{C?cYa)3%O0+@K@9|YRCdHnh& zZmX)~qH9%+9#s+s8))fH>fPsqUr&CP zjlzom6<-r&WRd8oAp)*r-ATb;T{$dQ(;{}qcEFc!(X%Atb@`C(h6RVqGL03^Wk2q} zsCBVk;1$3v)_@Lw_(Yglbhm-ptmJh|lTY>^?R}%5YTU7f>1_}~aElJ~eXo*NBl&F_ z9i>huXCQXE!=1{0DQm2~1kyl}z2@+QGbxfroovlz^F)Ai)RvF zK3HdQl4%$(>c>P5NBMn0H#{alWH)E$_YI;fK|LbzhyVrr0zi6vq2<`w)bzukDqR&v zWgz6XyK@{|L?|7uD8`%&ZE^zCP<+I=c#~?YVjFE7h4-ao%6{>N+qsRGQ9{>|4q`f>X1?@! z@^k`s&P&t!>vp&VPb2OlA0B$Jq^!a)om)kfMqMG~VxFoqJ+|?+bfsa@y7Qz-7)RJv zVkS+ger*8_Y1+tkt4~sej$3C*MzO)&Iy;IXQENZFSpDh6%1=)s|-6Rly3GSUX@5-Ju>f!1*)GN0gt>S;V=kQX7CdN&ac)jbf|YOMmw zLJQnl-^^*r#qZUT6a$dg527Kf&}R*&(U>UJD{w}$&(WwxQSg5<#=#NIs~u+As1^Ej zITN&ZAVz&PJAIF6I@nX0kC=PClXoKoEr3B*HP>rS&UaX$)#}eA@d>^`*l@#+q%#LRUzMTCWqv~#qpa{En67&pcl(Y)2@b>8LJJ=stS6@ zt~YWVQ5L#aK13p}=|$6J%+5M`hyYINF@gYL+3jMW!K+}Nh4qIi8~cKH`n%wJU)0qz z+``Aqx=x5rIfMFWBE$r@*<+bKuY3L!r}c!wi6=;P2*A*tj?mHZjZ3A|@;f>iq1WL5Fi zhW?Y;swq4r4|X3$Gcqy^fr4R6jL$G^>iz74Y8xXvqne2OG6U=fUy_NEAEdVn3UH~z z&AD*bodC^Y<1ADFlxn#VCln6nLJ!A2LmrEo&eznXNNz34T0As4o8cN7*SYPo)uDzY zOIvm{Y0mx&A0G&P5Sae5C4DcFLZ}OO3*0+R?H*yhzn~0~+hZ=r=%j!LXD zfzW$D$hpYpU~N1H>veo*9mI_HyZL|0NwGv6`nQ2asEHn~b9AH!xzBRL zs06b+AVs2!XJG6sE$Y^LRtDSWP_3NCZR1e}+65-K;T{w1S&k*J(H3lswrz*(GjwTY zwo&7@9hAAB+q-a8=$^mN-9X(I5wq#r96FTTNFhP!i*THj|12nz6x$sd5=mK~zH=pp zBnDsR{;T_k_mAW?nWbSL?DZW#Y=~*i zR-v|4fge@A1Hgng<2&-UIJ;x#YO0e1ZVGNEadcI+kCUS=1wZl+tIq(>c1@#Z|3ldT zHX!>U)|Wf(g9&~^sIXejX^H`5zMAL7m=H|WmZV9DVU!Ajym2|$%Sm{*FR)Mx@hQoj zqsa^TYcfX6m7nP>#Qj#!_JO!a&Cx*T`To;y^$UObiAR5eMn6eu6YMI{!zdBhpixp_Sd( zdB(T)A8O(VU_!MC-Pv1|1{_KW5EJpxF5)OGN9H3zLWh)OfaB=hNgYyB+Q`;=h_w|( z<$LztRNY3L+6~HR+OUJoa0cYJLdL5=#?u>+u|9>lddT?qFKJsv4Hz^Q-

L!pkEW zM*f5L-@Tcs;@JSFw?usg#jP1Q%fHt*S*^_i2P&cW;A8OzR2x~cx~@Goxtu|7F@F!p zy-slDo*dRLL`-P~sts-1^193*Hx!zf=SAdRB z`kWc6jBG?wu$`X+uqX2xcm$-0+UoxGVp14vaIJL%OP4(-X5DJdE`$Zfjk_X69_x0 z?N2dlpGu9GW#W$mYL@T3a1Ud7PF#E7FAgu3%aJgO_TJE`4(VxE7XB$}9u~kH(6CHv z8r99ZF&L$=@Pec_6Zq-&l?KEmMwbHM9~OLGM;R2^$j9hrGOPhOsqf+*OsTlY?wmqK z?n#Nd*t!nM6k&#OH(&xPd_6pQ`ScC*%j=aO=6E-SA++6cq!i?)Yog1Yd6#R{`Bt}) zUKWKO+Q?#VO;{TVpxQh_<`!+YJU2V(P(a+*<`Wnj!{oMt04na^mBq7{5?E&8NIV|N z?yhwv6B(pM+}ZUossg*T}+aU0UXZP}!YrCJ#`+O}Sh}#&^eqeRI=+J-2Gf;&u zi^XL!s#myb+C%x}(=A-ak2>{jldhl=s8)4!5frQXNh*g15agl;XMk@F#a$&{I`l3F z-7U|U!GH3tYW5^dw4J=d-x53JW(5~T>r|W!?e;$O@Pq~y(l%_fL)6EVGPL)rK6_S? zkO3~|s9$qy!>Yw0J}G{Dh85qPanr|R%mow+RR(+C?220#KDB%GDIa3s^xM;Kt=>?j zz+7uwE$eEReYp!pyHga~O$sbt+lu{74T7HK#i2s@xC#&>AdttA;wSauZ?V4EM;?o- zQH9|+F*s5RHGto5&s-`J1XfOFz+2~XyB;X4>{-!Hl%!4^G~8blslGloL{-;n=A##8 zXgyN=-@`wOC(lg`&8C0g!W(U<0!EQvvRx9BH>3bC6ZY>A47r9R39AL&c z`ujKLEUeh(AePf;tSw^!?!)5+h_hX-sGHoQ2U>^)pGQ$p1pajTQsq!E$on^A(PrTx zhPo<*x?d?K7{y?@T#i&GVU48vRSY5}9mo zBET83govaqlzx{AANo1LaS8$nV~`@X*ysB=YbVfab?Vb*!wCqhdV^gwU6DlB-Dc|v zc0JDvFNe61Fh?DS5;Oq_%wqlcTx#frt*IWj-4Zs!-9N66<`gTAy@Y#kN zcOnX{8WdL z%U%veH+Lp05Bi+B%7%0^9Fl49uOzb%s3QyFND8k`hz3~z%b4(trrX$$ExLbjdyGVL z?US|EsGlKPEbR2sLVV&2pmn161w1D;{eujIe)v&8@bVW>UkY^L*F$k4>XItQGeTna zLiGYx-)pP#zK3E(Tcd$Uj)&E!=SDmX9}PAzAz_KOUl4Su1xoYV6@sAquIWb>% zx!m%jT0&ERnf-1g!}+3!yeKoM1`Pi6iW$=6)tKopF9r_mu)_G8kNIl9+zCyT8QKj# zne06Oau24^?bW_3tNW5YQi@u1Vq{IdSai+qfG64r3TkyBiEDKT%uziqnKb-es}1Cv=Nf!^7q2pq)t?q zk(;3zXu6xIepRL`xEXpxv7Og%kyu^qV-MYaFvJtcnmDjtXI)tb;HaQ^#2_?ta{C}% z5+D|EB%Y&=?;b@X%RPRZ%JMvK@Ug5?p-S~YS?M^nD_iTg^Y78@nn=mswcAph(wmC8 zRa15*2XB#f{N>@dPx;p0dE})Yq5y_Api+X7jw$y&h4^|n=2_n;dq zZF38u?%t4ZABQTbF{LHO8D)3$d4&i&40QQcb=)7X-P{L?K7BjVI6$Jd!GuBgCGu*eB`32(UK{YL*RWGoGZK!m*T9-Od!AHe zj>LHQf2M>w$p}H*Y0WV0+>NbT^K_*}vH1~m_faJus%L@uvtp3KvW$iyM}kTesi-F_ zP*QpucicM4#i5D?m}Hroet*EzHA`K#&W|dA`H>&lu-l4A*N9?QZXkmCly~%qpo&OI zrTuP2q=^Q~nmr5u#359%T=+&Xan{LcL44R*h9qE2wrAGhDvE#-%f3l-B4r zMj|w@<)CI`U!_K5+<3YohQb9SV_-qAiR7h*@FH_zb1bPXUIm6Hlq1~7!RKut8bbaU z-U*m?Wx`0GV~`x~W}PMvsj)PYOP>oOX^g2VZ0wler0Mp!Sfb%UxU(E0M+*+rwVER$ z;{WX!spWo1mo+m+@ZHQ9I1+OWXSO^g#z^X*uD!-NfibmYe;bnIS!=1oyRLu!h@=N> zSjuHyYUJ@W&rLqB$o6b$XNgyZ&q1?7WKXe|eveFu*Os`QZf|fiKoc5=iv7GgL{+d6 z>eJ}9y%Gw}+L2bef>Z25Qy8L8OON30M2Q|jdjN<~E=Zlkh)qWmXCle!>SS^jc`NO@ zGOUnuu-50^T?{qVPAYkucYHGtg_>&68jg}YORsitk=a{ulxS60F*r!zi3UE>?!c2i z0ulkVN_5%iW9fL-g8P2?prwKr{~lDhyuzmWp)ciGx0zx#KhiGh^&-!?lHm+XjSZGA zIjPP`b5W6%ESYEK7D!@wIAK6T0go((2uz=@Yb;;2jg_MIy+H;24D}GD19+(FX6J%Y zH&Acfd}g~7d_=klyHmxlDsD(bkyo)x2N!A;zzzj625>Z*r*WtCWw||N07B3^W)k=< z-;tv{)?8>HG`}x$X5T6hI&ZOrw4C-c!Yql8n;|gix17VgP*zNHP+d`Qk6d!O2nCde zof6keFj&xr+9?$q`zokj3nE1FX!g)3!W3?56kA+5Hbr?WJ=Va6)40T~?~?SK#e9!i zkXPcp3iqQQjlZ>h@XfT%Ct(#*Da?1%j)`hZAK;a9{17w=9+N0Y_ko|PiOk@MvN?EE z6lkgSu_F`@A3`d>Y#bx>h0x(splW;*rTp0QB)w{osKTASQR75jD<9c#JuoBcRh{WW zH_GHNyZol&v`$_W6Khr7*$=Cy*ejA&5leb`;xVa^`Eb;D1Gk!6JMFVeEWUe8+aF5V zPDF4*tGa@m0X25&NKOAUbR*hiZe}cAGdFduk8MN)qR+Lf*@RU6)E~$`((!*oy_Kbw z_I-rRYWT)$f&#;aAssk5L0SN+Wg(F1oJ&T>jj#c8h*57P+l%hV6UUJ6TKYr@(-ma|n`}8cC*O*V3zuN+4bmxEu6b*_J{o zY4w%_pG$Ly)$EJ7gEuUv1M4?VzhJF`o*YD!+rf8?8P48Bn^R6+xG&e7!+FVhC&vRg znF?%wc(}T<^iNCcN__p8KSLTwx<#mK*uqJ8i7K3?i9kltzmyh@MpYJ_IH#7dZgAF+{S>6Nfb=sSP35YE|vlrCC{Q$aWIZH@FP2Ga3`9eD0K*&7GEhvU6Pe?&`Iw?rK4>D4$Xn>y|cRN z&T{)ui&H!iCUOR1*6<|0)UKnrg3zIdY>)YR#8#*?NhF%XU`$s&RsM-sisypVccNvz^1M(46_LXJYTZBt4@FS?|Y{U>6@tzRV{_u=9 zGFh(Q#U@P1Nx7iha_rg^TEHh1zb%v-Mu#4L{Ifl`&Ri%xKbM_s?VS{qYza zpw&*LT1D(YxZR|axnF$bB1@i@6EHvfeiZG8T3vfVzMQtkdM3OHrHJN}b3{Bf)9D$d zz+G+6V2s9=JVR09ilERr*@Aib?}ppqeO{T|#{Y@~sjpPiMIKGr9a|T{LWWUSik-C^o)GWDgG$6^$auhh1=i9Fb#5*z%$X=s3u=4VEjuwgZ)ku(tBv0t_SuZ0cCH7A zlI%X zLzZuUBg&fQJY-&gdJk6~|Dg1P`z{|w$Z~w8E5CTz-TOb@O;Vc#Q;>%us@yXgPW zvEA!{9OG#E@zLqATDB@+d!`O;RL3@d0Ucf74beHRck)yn(xeTS26;v+w3()@vYhMV z*I3+p`uzOz>LHZjW6RaS2aSR&4u2j^b~F%{#^M=svk*$zvwkKA`Up2(UFxnXbiok| z=2e;SK-}!g@irt^22>W}B=-uM1YRRpIIpxd9^D-yk!JDBk`?nIl(Kw_HifZh_j?)Q~ams zif1CF_hlS3h#XZzovCZF<56vnwNDlL%JU6!WMN@8R60^9qznBN_cMx!C67#v|2WT& zJbe*PQ2WE@Y&l<)!y0r(^Ks(}h9N%?*Klp&B^~vy&NyUETnz6W^Ch`E{`@EupX4I= z>+Q^UzvwFfcF})LB>B6-H5*0aRms~(S5-i2#k?E;0XHQM55ghBg_P#O2s7Kn`^2m2 z`X`mL_<%Cwz;kq^pL`v~_*jFqZ*^Ezl)!^}mRRPz`a!8^> z-~tzz>1oGFl8tnCaC5paOi<*y!up*Hj+)3=#fVLwSyUR7SXEYPHoF3GBhWF(shxlN zY*D0mcX=A!E9{j6POt{hEKq^KGBu9-F~`zfj$onJA5>@&=e|W^({JdSIJ(iuuCiDs zB1|5_~hQFu;V;Vp%d-(s)J*m>U_sXWAvywDxP?<@qaIV@K~|>$Sz9VAiE_fDak3J#sqa|o;* z#yGquWvhEzwGH>~D4xi7wtcS1sf|`@lE*znG(OUa%{vL5?jsB~N*$8PkpiK{9Y!Ex zwa_&TPr`mMrX>Fuch(`%MUoY`J zNE7(z(NTREJZAiX^mLW7xNAXa5GYrPpWCMxGh|{^J_=^mjG9T7$27{F$WYnB4@s8f z`L9ippGCW<#{|}id`k4$5s@TkB?yIG@^LV`E{T=b5uAuY?+XGL6TpNVee&j+BCc`;}#PY-Mxp*_0!tJ9Ax61bQ*l`e-8U!ccjG#<#;KdV9sb zUCm(0nwIL8GlydV>f`Bpjc6zo+5V%Cv?I&{8{I@R_{SND3+RFFDwxQnk137J{bP7` zty7bvAnbLXP-P*NuoFs^jTT{0L5!e^d99aC z8Jnya#1hU2fjgD%2xb9bxs+y9Au#if2gU+5=U-c(5M=cWsccUNq=TM&s1T$C;Gz}Y z%9{EGE4E&E8^N_=V7@K$$tc84u5>4#6B=fLsBM$NPIE*Q?{Kli;hT3?_doi-S9s2- z!^_G29}xP>iAz`c?Z?A=m!x9&l@E1auntA7Y&l%bu{}+zYAU=HK)KeixdaRitOw|* z3d5`x8jtHfL2c{w*%!|RPF{-jcYn)R11ZDsX@Do}n zKPx6M1hBfvP`XeSszY+ENW}I}j1~!J#&Z$H{E%k{Y>Vm-c}&)77^C!^g4NY6mu@md zBbq37%MdW_{199;bs_Qn$79f%l4f#RMldcjx1)3hrpgo(7e)!-jH`lXJl7BalVfdp zQ{`s%-5uTWCcE6>K#TYa>!{QUo5i0~JJyDz3D4mP0bHaR4y}0V4qbzVw{djgE$+Y6 zm9n_=+iVPD#Yejpn_uFZB7FKsL;e;I_zUg+LSD?YL7QaIDr0V(SbXTYtZ{e6$Bd;s zq%K|K9-pWCyPq*N967a%8W3e%YScEaNc6%%P2o3-D2&j9mPdwM&pD@L*je6+crMw$vHO&4qIf#PXqp0^<%IHq?Rg^A# zkqDSC0^wVK`V$i;o5hdrAiut}{8NHSi8Sthi2fSD7UDYPWz=jPXMz*eQqQlhW}sm3 z&vbKxW2f{+M4@0D-$Xmkli3Lfo-ZF@91F{#FK52^ zQeN_byLs5K49OmB=B0;B@Wx&wf~{xuA1CgZomp$tf7c8ze6m2qWXn%8{B6Ph%GR>J+-^RDle0k5K{xj=dUSeU#P-)hY zs9%HTuE2GeJstmD@7l_@IHlpfRGkN^pcx3>tMQXez`U2?jVn9cxYo0`pa`|Fl2#BZ z*EE%NC|YD%;!?-B_%rW4c;zCMtoqcEjEEoPi%d7SrD0w~Pex$3Z+E|BEB-9Ix%%l} zcE0@ESI?e2l2G3J^B2>fLT>-zcCrm`)Db07J+6|F>@$`Oj&=Cedrn%h3bp6=u`tSU zjO=)iZS=j0m1Xx&)|B*p!~KY-wx8ZA_WB}46ofsU&_G_RUqQ4O>z$ALP`_sJR%l=< zmZg7naQO3S9N~_q@Ctc~^8MorCgR!IH$yEzk)Mx0{wkw_{c2Q^&~ZRY{T^O?&jGqG zzWC26P3Knr&rkO@9S;9vLIEO#uYKFwa@CCuW9}(G8gK9>D`BS%yTM-`^G#inbk3J_rok?cg+bb8ExVQk# zbZ+8BX=C6H;ys<(U~cbc*Jtnm^s`(@atYsEX$OcwP&vREv<0hv7gG|Hrq{!ULAzV1g0E-YoRjg4+G<)ra_68QEXzCay<-14W2;LcY zTHX{ydBYLZr{MR!BN+K3X=&em@|V3QPxhXCMb?MS^$kCN-Qz^=SI>67p-ul+P)O!* z@A2N3Rq?m?^aP!?}C! zyjGYSEO0S0yU}CsmAH%sh)RbbE@c*bzOY3qk@Y)l%I`!SGEcb9s?tSG+b%JiofEN{ zK`V*jcrvU2rllT-7D0?r>=rG9j^phOxU}gO+}zHu>4h~oR-3nZ@)CL9gRG+5aDAnD zTD}Le^t3066RnxZ9I+$0r8#D|QDv`C_|{@?DG1_MxW1J_-=)Me&6~SBfW`oMQMxcW7krKCc7jU#M&rO^wi0y#STO!8I7nOSctYBDkg}c zFZ*Gp5`TDe{HyTeNb`(nGAId!i7$uRD7nlMc@n0mnY{3wnLxd^?NRZsB*s(mr1Klh zr;7e7?FJ=vrliOv@|#|4VwF^urUQ$Q#1D>>vpHsOmZ1W;=mZw2C(LqCB&$b5ZBi`e zi&N!&`p+<0o*{tY#dY3fRS`KEv8sY0>vQnf140RCDB<$he7~Vh#X6mYq1dBtm2+f~ zlq*DaoQg6lg~&q4=+9gU{KZ!~t;H=?0Z(i_P*?uc$?uNiBCy4oPH|16CO*DOOtz6< zWmyP{8YQwB_vNiDo=XSU7gtwqd{N(9yZhv8&N z7LSG@&L$gcIYc(HX-OU>kY`z8iZ!g)Qd>T}7Ej2#8_Y{8Ic*5W1xEX*d>9^=iR3Go zEn$l<_!hcGS@s`(@?irj$ABW_0R^LWgW@0!gF+wgowCF&`$HvNST>?Pu>#x@tdLhF znRCLl!JM!&#|WgZZ>Ud1H(+t1tDwFkHh1`DpK5R(&2uf0nLw4zX?Ufre69~wQpumZ z^x8d6r6VFKd_0T31`$t(Tf+O9GO`yvg*DC2I6-yxwX20>_~FP?(noJs51C_h0km)` zS}Z27qc}!+^4i%kk)do9%A1_4a=kj?8a$6&q!UPys@Z2@Ug2QRZj-idQW+@V=rJ`b z>NS37DHhoad~}L%#QZn||09(^*~FHqvHKe(BZdsdY%t`j!y=ZC z=5r;l>9?rTsU3l0Wa~&!3AE#6*O*B+NEc*e2Hq7O~xG z6|;nIZzUOmeMMoOSLrQ^r)A{jm(1P#UtM z%xmegoft{8+jQYv6z9ZkJv@fb5bVq9b${8rI5kw^Ju`r(VBLHTcJ0PKrxsVE__zkJ zotBd=t;!Yco8ULaT$+PMxKSy?EVo^rcM!Em);;Qc#}?yA3VEnwdb5d?8Oy%A_QmwG z_36q_K1QdttF~7q#-4i3JR1juaMOy(ZJ@`@rz!D_3|>{sr>+SX%S9h_;BbN8JDk#} zr?d&wc3{#!P>O_w`jLP5?cew( z9663d?`!%aoy(te83HSe17E~LRaj!@SLr$8;%E+FDy{KN=@FSw}k7II9P-rPS^Da7?`NXMjPE<{%Cud;(imLUWp*KFWZRa$xYOqptk!MbBach{3CR46U$JyR#s50EXQ)!H+4lSE%I9;PtVk32btD99E+ zq;9cB7W26I=HS*g<7aXP=c`G#n@KQ=Jr;A$unNhf6iK_u*oFAqQs#Qz`nMo z&Uxk01OTbJXx(HbOZeG}k|&4`2(1)p)Bp{=E?EBTHNF}<<1~@qx$dUIwy9^--TG~u ztNctan{p4yZ@&%4WbSQu);1#5BMaT$#>-@;l?MFnx5X1y9kixnty@m!cwVP9FW&T% zyZrw5lR^Z&MyW!p81uN_@7Kq@nRBntd2Y)j{10h(`}^;#FFQXp_kM_=jQ;=N<({+x z<)CpU_MA?yYYJ=2e#(O)w@;XN#IDP{*Xv@^C<$*0YqzgZiV$}&VphA5rebSI) zslW4zI$5w4j4B#@U__h98(6G}^P3(JMCi`OsZ1=#q<0S*Uk)o8NaM2-E7-wL6~v61 z>M3zs&A=9*@Wu_OSf7&n>Y-wxyIa3w%|PPBijBBu25dM$2=io^vM}9N$}^)|)=zzV zOPfoJugE<(v4H}KB7E4p7`#0_0thE%KkmhVC0E98pXUlNF7C5%=6*qY)7I`*m;iOG zux|&VE_s3#6env4pGVjJJE8xO-$|ip%PSNVV#!fa4bqtcUNG+vsnbk+F9?8z4@LY&6tv_PG5{DOs?y#EK2$=E?IZ^jP7EeWet0>~Pq zo>+NBD-Jv$EhWonlrCm*L_J22^;8EE_E8H%WJGU!ts$E!u0$zw(6E`_DsO&%DI+b9 zk{5vbRJTGTGl2{6mVPIg{i*|;+>lZHBv>IrNK(+l6mcBHGnpj`p5_Ax!-foZ=2&%| zn~AyVyW=fS$KTF^fOv&TV!Q&@YJKBMP+9{hZpl)G2CYqJhExU%#cU%+F)qB}ICu|4 zMW*hWCXu|>zzWhE8l055F)IFmvN##2&ad*ATPRtb!%77!OW~6eU@poV^o~{<`7x>a zN*9;KF`tYA5mGi`)7Qnc?gx^7O0kvzif+o&FO7tRIKD!N_&Y}Lv?FW8w|@TrvZX>k+rODrxN$I z`*srk21_Dh4z?wOSyqKuyL(AS%d^*NluYAa6);)EuXKFG0A+iDnV#vC+58QdzFL8a z0@MPu>k;WkD+S97{xwFI?75N*T_)Dp=K+_K#Gg5iX)UGchgMf@foh`Fr~iSRp4Al} zc<0Yz?BNU>-wRXnZU$+Q0o~~V@kB6n7jYS?7suCBgQH5YxCGHTcVYo@6Q)`$8gKo9 z3x+kPtM`8A06@qa9VZ<`%vJXu8rE-#RpXIT5Fn5g`4OA141U(jfe z)%w5yp4z993+j`D?PW$}QV1xI zgi~sD!;TmKG2L}%Jj7V%Icbz4;GnMt%6j#}RF>6yw=k7iTt7=$6#<+ZoqnW#k&^Nj zrxN?h^Ur*;^uCkHeAJ|mvMD;9fKG{K7`53%kUaBsP_JKp1p@jDvIelgwnTn_a^fT>G$ zPg84W6}07AGjo|~;?CP)>cjFhec?YU@6$q0=N1Zk6)exIH4{Whn1MXq83Z-iXyNPQ z59TPt2apZ)V2QO$?oT>0CyWKM;GwsDOhQPpI{n7A3HUM!-o**0lU?;5{qET=FUd;V zcrvjXQ##83dLV?SDY5*5PW9YL^%?&>{q{48M<;*KM#Dnm*;-y+Uiu7pjsJQfJ;*0$2V3AmjVe7ApJapmL8;${GHes{Y~DZ_^eLc5 zk23u31!>z!)H}5a9kBlE7xI@FJa`NV!O#YP-9=lpN%B44^>amcp*mnS2 zH7=e57R;ub^%Ym!P-lIz1tF`JMsFQWXNdW{1{Dy&R->aQaM3Lr%#rdbRnq&%KRlWp zzWd}Ar}EzLi9RL9=rtl z7*L1oD+*puxHZE-B$aROv*~6{*qP77=~SH`Uz~Ef*Z3@3W0>dHXVD^BRJvVC|D%a8y3|wK^p5XD$+r zKYxD*ui)3TWwJlw#7s7({~bXq&~rKRIZk(I-Vj$WS@2l>0140E6I)5%{SeV3wJu1!BXd6S+7-lT%0HUs*H zgx5O|kCPJJnP?Zz9stbhEPX4Si-!!3$hOVLf&uNZXUD(FX(x7S)k`^C;*FU1u6PI+ zmY9ksLf&!l0#vIQnYvfPwOl6D+z{&297it3Fm2-w=@uNB>-u%G-eSCF^8mTrE31rkRGt*6XG0n9LGq+PJ*W0m5 zF%5n^t(NK{1p;#1)8^J83UFkeQ5w8uIkha*{V`j;H(saCC0!rV&0h?u7K3rN=kXp@ zu5?r@nnnqo>J_NW@x9qATMi)hVZC!HcFylJE7-0WYnUKbwiekK31JeZ+6^vO0I@5k zXo-9Wg)p~jB%BJzo1N;Aj*IfA*nAy4dPUMxE%>3gOsiFxM5+e%hi<)wjzYaD{ESJ< zmj|A6v65C}tY*BRBI9hJ`r)vqpB*tUd)E=0FJtmBqE6Z+cjYUsn{aCeDH+pP=krD5 z&+gHVZFNH@yXA`iZTH8&KYjKn7ANnJ55C{|`nz4W>>)ew<Mtt4QZ^#EkyKG!H3kdNxxiDXaK62%b*#z(~k z#>Ons4v6z2nM8ynYvjk_M+ZIfEJ$206US0U8`U2>e~CzJ94sNQx70jDbc9Rnzty2q zv|-4!b%UTk#*A~T>{B0u5dex8yz@$tiLUU6vb-j*QTLoA)|*KdsY5$(oKC97PB!3N z-fW7LtFkosi64@7%t5ppPl4S-7NlE{aw55Uhm2bEqQId|s8_t92u~MyL$#F+p$^_# zA1LLE!YXB3mr6uP^~e9_F1s~(*6iXu(b0FHz;4oMU!cNOW%q4kH)Vv|+dDrXj)yA_UR#$2@OB+q)L4R~t>I(R$vQY`wWX+rYf9Jx zPvUg46+5b9UYx|is}i@N%Ro<#-<*>0Ehf!c`(RBv=J=~hV~rR9?v3$R0#%gMF_Y!OEFV)6HI9ZTM_cZ z_kdH5;)eJDZqj7YMWza)4COMv%?;H()k1u0y_c;8GUM9O4!=$i(%^Bk?!~bIYG+nZ z^tF4)oU{5$!{Vbzzkf|pjx2+fTjEQ-g6a5)d2ZpsGEdpSpA#@0e71Qj*Pw05H069* zcx%O;3@iesc4g2i!==v!Y;t8tY>V~Z*bH08kypyxwzqr$Hte(2h`kJUOc$)$oI_6S zcd$*sJ2akQ1g|JfX;XbtcAbG~ppZlZiq4xG4s5^*`9xgmdOY_fQr6RDsXlERTH6UX zaUYA9upM5~E>1kk){)PBMcPy;YgnO|!FJpt3aSLkC#tXyyErFvL;0%cc#ys35OwY# zsyDDZei#+Q)p?gF#V27gRE~cZr)+vV5IAbowF&3CxIEQ`L(cVi89E=KBKoY?(D?u= zC50EFd5l7v{aA2()0JyVD8wJ-IvrdfNm`NDD=2?7gYzt_Ly>k!xw?Y#P2Yx@r4K2i zP`@1sOm&kj=pd}yXU3huyssZex+#wUR4qrEF9uOpvp8d>xU4@jh<+0Pb)A;8p97wZ zT9&X&s~n6st@NbMKcIZ!fOZrnd3G*Bz-6Ze7g9e6Z^N`&Sr$cGE8 zKkb@iH}s3l&=HRFg>BFk;1-wM-C2+R=-dW$D@?JX(?2(m0Y23=6Z0^|3R+dyLx1x4 zZ1Uw_cfQ@{c18CioKExn;{NV8-+o<3A$Ozh@$uf*yU#_aK%CAe&!Z*x;hZvIl_U0c zbgSwN=htyJr0OexqYdL|f zG56R93jaHtQyW!RXkTIRBiCKGfM}QC+RBM>F`Y_Gnt(_xis7siEf$0?S=#~gek2Zr z|CE%WDg_Pf<%cD#!;$06cedSBDo6N9u7??T+{o1ME*4y(S_W8J4EC$b+T;Yt{E^VK zKt!sCeUUklxK;S56^a96_WJMpFq`p3AD9Fu8-#&x>lyBE`SR(L{keSa5$o4j)ER4N)!ty==u8TldmudL(sEmgv8}SyoEP;=}PikX<``bC~=gxLff4pMco&=R#&A! zjZLSA_su}+OO)>~byqPCE39xT9uFtGRsv6kMCj^gjFY@lK`aVk(3uZ?rE-Ink}sSV z!&`FVwrc8`B%zNghum@7wkyPBjz8I0si!gxj#SbE!Fr4AyKY|~EF$P1J{#sEJhZb> z0FgJHM=#h|+#oJ8#kqVR^^JbsK6?HvBHekhUqDn-HIAN{n#Y=T2?JCD?H%fc0ExpQa2P89t8*r|4xA82h`Pxam_`+&%QyF^ zv5Eo_$z)q&ea-rxAh3_(&jzxfH3+7CiHdPNdLEbxVmT)1fD_VG;)_XbxHSqq6_^60 zRz;p;aRpzt_DWROiXWvD^@JFTV#agl&trtpPy%By)Fww|kt&33>r-%v^WcV~E zXJe;J^gwY0zQYyW4`_@|88$C81G4JV$=`J3`U05)7o);pL*1lg7R8-XpCU@z`+4Qt z@+UxCBCdB*Ou^3!cjZR+p^P&NuC_5B9L#LehWrXFy{MbSW17cDi)e5~Y`b-&OjOrv zS>mQoC-iTJNTxe)35qM-?|PxZ2!#n@R_=;~UD7rL3OtU-?$7@4n@GJ-50sdZeqwudM0u-m~ZX9vE&w3k!tSRaA4{ z4A*o?i?m617)>zxSSt9c^+(!s)Me!c7J)XiV3l`VUM;F`eZ3Y^jrvWK02AZK4sk9K z$YmMa({(6WDN6&koo{woz(}{S?2IMq;wbHe$jd63+{jI^-W{KCtSQ3nWK7I>c3*vr z-5ho1tQPmG@YV;|-FHy_CV!jCH0(^<|s^wFkepjx%i! z-fzDfXRmZ7%N@T+Y=CSU?|=OC**ACjTz{KBl7mjmUvW-87=L-Tv%jl!2%v`W?)}kI zyHII;D&s9J;~n$Os$q7RmtV!lzOqW&(Qk}f0AfKf}f7_dHBXh9x>^Yc#KY6tGZ1>Ckz3++rr`u$! zq94-QDjX91kZhE!`O$9gFVJ)84oas#R-UmgN{~C8?py5{Z0aA`CYYx-s9cHIQSX^H zv@v%o4ou!FijsBzLsYTgBl4PGBQz8OBNt49A=D13KKcW^q#~F9kF|GiuH#6uJpae1 zDBGQ0f^AI-_kmZn^{!D8r9!nz)QYT{>M53Wg8+B|5U;{R5~pXr`~J>x_sGb+SG%*; zU1nmDnK$F%;o*2R(7hf1gh?(8sZ9gD*I7ThgM<_=9T-|anpN_?v11FOV3o;}UEPpa z=7DionLV_ik&*C^Qsztm1lO8(NZhuQfH}}oFPkqW137##Neavc|Kw97JC1cVf&sik z+u;5Cj7(8qLK^Y?dliJdgLB!xL>x^lY!;GM$f9v9Qy;NF@e^4jvnbK~j$REMOCwxS z$5si;{Y)Ts^CeZjUWQXABsE#N@-+*wq|7qHHp;MlzNd)b5p~p+FpoR0)7M4n3{s_; zD#B~~Q=uzr&QlKV4#u19TTugTI$ROPFVeoZ7uuqgLj-pO5aWc-ToV;PHX_3|`D`7KB#hIF|ZAgT-mxvac!&@ej zFx9?vO$>|3<}kC)&a0U*NNuO1Y~SMyf@>#A2M&=cuqf19IL21kqKRcr7{$F!BB2sr zgNCS)9@*;0k$D+PpOm-D03z&{ZUlp{5i3Uc74wH3idn*fl+W4nJ7Nz!GdBzO>KU;_ zR_uEr_wb#KIo6u>Xq_=CPBbv8etO~N4qYm8rgNlTMw)p>a{{XR9>u-z!|SqjwXIq& z3JO{5aezeZz)3jb{E@Du;DqtX}0M=jmdV z?H+f{k7x|rN4;=(Kpqq(BVjFV_{gKOt}6M!)8Inb1>P}4d~#vg+{ZkWNYVPUksB3A ze7+GgLMSHW+*Rh?U`q@QYHu(EfI+zfAtxJds7I4^iZP}60j#mbtp_kuh~4;{?hZ+L z_)KeePQNL5RYkeZu5T$7Mqw8x7Bq(ts*=^6h5HtOdwl-Cdo66Cx0fG*p0tt45>@pP zU0Cvwf9U>GGGTBFsAXYNaeA zcRXK2fhx$VQDSpX`Z0f5&@A@xj`QR64-`z1PaQ<7^a$^qXZL9nsU>{iY-!8D15SW} zFVRT}GVH1|`>8jIP-5PgtAhoPb0RU?J$^|y&Uj~Iuf7B%vs_Jb z?(sTv@$p-9|3Pd!5gXd}A z`G=B^Vf&%|M70P?KpdWX7W=aK4kTD9MfDOg`zXxVa@RU6DeH^3Hx!mce6a5tE)d#_ z3>}Q0bkSi(OhV}hc`DKo-@pSjVe?zx?jaSO3hs|H60q z_bp#_dcOVFjUmz{?$CVANzzmJy?2t7$-Vp!gh*BIB7>x7IW*rPsI0z!XWk(L{s)u@ z$#k~;KY>}6zlqHHl2-cl`}g&WzsQ(~X|D1@R~=b-|Nb>)?DTp*Bnaw(MN7-#fHoN^e^?U#`Sj&lDzqbKN%;X=q$e(E&3$OU-%Vq zJSQ-6mW^+9ui#&4QH7%a!k3ZCxZ>X{{(Vlwjj>c@NI#A9<31Fr0}2}E+*UcK0wfXt zOhaKTe9$JrL*Zz)Lt)aA>|BI-ltm&p1&!+VaG{~ezw=IQ{tueasf7Q@|G)4v_OYOu zf1zTwj<4@UT^OF|=NxyL4!~lmg|;yM4{=Vc-(E?c3@4!FG~8X^5_MCx0{dKKlY~`{ z>@JbPhOJGYdWi2(sUYbL!_JF?G^*~;SnvNzcxQN=PloFFXFh&c!HhEcFXf`CoB zD0k$rykkA*j`dhox_1G%&8Ep}T|UCwozBz&>+%~v`pa93aRw_&U=C$pR;J_OKwnJLV zNX_6NILEoPnsE@k23`>(vU)t?3U#>!umb3y@7zw(iuu~>};lZ)dqE@ zl=!679r@U#341V5VoapP5}{hJ)`%oq)O*md-6s}bwFF_2TPP@ZN4E;<-?C=t9G807 zF#Mo|eCDvB)rphXj_0Lqq>HOlB_*N%Y;2>~x3)Rpryt38Xjn@r<0(lfT__K9v2&o? zbQy=f!WVAXu>E`=1hj*1{{+GpFGx-rP+$o1U$Kk(uk(huX42bt^%&&2ES9?6AX%By zfQF)87o^MkJ!ya0g(T)=;b@q_n|*x%m2O$*ESQ5V8E)L;Z@(};09}S#SD0rpBSEUT znkUhc3B$b-lXUYm3vM;G@N+CF@&7M9itZb3;SYC#13^%gkC zpc}?9g>`;eP3*cr*qbkZ501)8sEO~t{Ynk(F8K2c{&Tvl{RRHuGEI(C8nO9ssmr-A zQV(Qp*+G!C6>%nnZswUOUezy7tc^X_MpJ=&cs#bJXM3`$7Y1El#Q!1rPq$y}aoNeG zqF`39(rI=##Qy05yN)Fy3rntQcnb!Ivec?HqK`6{lH6CrPkD0K;i2}HjnYop_FrjS zSuC23Rb_)ya>frOIT5}h0IPN+NMmf~#^O8N9kJc~3`OM8ipD1H%g zAF8!!hCszA5LOC%S5f3qsceEj<=+LdaFV$jAJkvy)qeF zirN;NJAy9~SPdg_{+KEhHD7C ztG2{n?n=ruN8(2EWIjaNIBd%6hNaNs2s`FfG)?PJ|#U;3kyWqPv7ej!PwssXOmb&=!9HCQGl~VJ!p&2F6J%( z8X*Z01Kgm(DBz_#PJnC0`7fK?5s8oom4ncvSLXgij(`OT_>wYF3rtd+ z#GYdMr?9W!jfGTn>N zL@phUDI=zFw;7VKH|*Qog;%K#U>*N?kqIg(mE{5_4@uFwG94qFt-q{!T{ghK9{9~P}81N`#0n(oi!vO$^ejIb#r>mVGnK*FweFQVqahm zmGp>XG79uYp17myVgnm&!|Y&vJob=c#l5CYKq+=quZpO#6V^s*iKVx^5(N5fo zsUVUnhj~L{Mv4rLlx2;x|B+J|m&1GW#5^dPqcL$1GV}3wzXIxJ<&59U|k3#{jP1ua2QFuB51J1nkiNk{HO*=aIm1@i$Uc?o6r9FnMW1n zy^B}US=Q0(Tv6E}$ff9*+avyOMb?YTRJ_FFdy%Ms)p|21(GIo_+p5w=Iv>DAC9NP^ zs6|TBu42DJaDh38T+ZUzdM`cuLH)+$AZlx9e0ySGWAdERs)dqO#md(Zl3- zD6Qct5G9@3P*Oz~E#*s~g168h4>3X@Szf^!Lkf)*4A-Z*s#O?952!{hXzD6+SW+0H za{!8h=xw+oDS|CLCJ6}A%=Qt!0bvRO#Mc*5KbJv;hUo)x&_rzY%*U^A-;tVfTX1di zuS{P6%rn8{2gIk{d{*=!>4-E>_4g_4$GC?RrU#Sy^`_(V3A>5Woav17F0oV+@NREjDqtlYLA})DG9P+ce0u zBuXi|1d@iSSk9jnO)hg;odyqqLg>?sgnAWP6%%FBffX8K+B0TU;*8`XDKukDh%IE> z_@MEKtrPV_%oHq04JXJuAbpcvsvx^g8|$Q#_8%@*h-UpwDdxC7GGXp79u&B;^Nqo; zQS)~;&AtI82@P%l;$$9s)3RF$l5uUFH$uT?`4d{=3$`S|mDgG0M0Ear0F%3zF~V}dXWc*4X{I5b4RPUYos^$@?n1IRt= zW$}iIA|;?SL(Vd!L4}ezk4R+)As}@GW_FxLH<(p_RxSE43)lXA}*Y9=eKmnCehw!)&JB#Pun z0t)6GjiUCfiQQX3RX&{igpSBjaLzgR`lq9Y%?k5FOT)j4e)-r)e&gpH^6 z@3@6nfx4?{R(+JUk??w2H)8 zHa8-aiOc~fXc+KvYGZG}G9$(_ffnX;8M2Uy!NBbW&~^-qA*i?4aFtv}ERfNKvfXSZ z)W{EMTRGH$KH?{7KS&ntYz5riuwXe~1{@LffBEE;j1mh`)XJqmICXibe*{Xm-kWoDo77x5jaKe*Qg|HEQ!d zd-Ls)68~l@q%ot)jANRDZ8YzX+kX8qbP1gOwwU>=+nb-rozY$vy+6~0b80kh=@M#8 zD3F^2^X*Ey9#TD8UX&JPjW|uOrIM`V{~D)c6<3|eSB_vtTHj>tEPDOQMXr2an_w56 zwdJK?BmI!`!*_AkU!s@Y=8YykW#l*7VK}ck%zwdA2euYKs?lYeYDM?|L!k*Z$E5Zk zeAf>p3@jQvuTV5EpV6jjt$CI#pg5{(9wI?o;*Un5B3+NB7UkGNm>h9>NQ=OCff`jI zFYMEpfy50)y!;leBZL^Ow$zF@L3cTp>=uiPtF~{%V|ibJuXfP62w5?x6Lw8(pCRi< zwHBg(bEfu~HzJBr%a&_KAOm)ofN(J!MN4wm-uv{c?bg;4?M#3!?Q|9_HIT#UvMJrM zgy(3^Xd>TQ@QO9!aJo`VIV{2w3;xdFO4<=BAG(ix_s`}BTdp3eY!sQOO4vDMG5s>L zRH7rfD7pnc-fSVNe)h~w&wJ7A+(ftd!a}j%AyQm4vZ6o4EJtq`6RO}7wz9hvYnn?& zQ=$a}ZCD@7iBr_f2}BDm3ACqdTOnI;)|IHD?csm+CxLqY0Hx18_K@>t(TGUfl(bNp9!*1smB zJhzNdLLQSS3MdZek+v!wZ8tKt*uu)Ln;(!7@|gq+T2{2-{&Cc_D=%cOU%Zxu!Svns zAX_kGVyllEkLoyX{QCCv;^XH@;|w?(kJpf1LrCiI0RIC}n0o&B8T1@^or7<0-+(0jTa?$S zfH#^^57RA&XzOgAe+<>F0cqdMo2;N`4U7Wl!@y!pLhEn=GKh@SOdQX+^S(2K(rAhF z_D)j>^1s4JK?pR!jjr)MUvzU}mmi<1{3IffEvOqr=?y7`T)TAuL1RVSsAJGm2^>sa zzz-lI*?MpS76CCpkt(hvW(}kaRD-vYd~_Z>@fgXQX7i|Gx;r#M8i$ZUy>M$=V-}h1 zA*0>Plt*R<$mn{r+}gw>y+#RRQzQZddJ=(cqi6k7uO>{?;2fkP*h5@roGTyq3rJas zJWa|P1%Zpw;(!&6&xvKRHe}1IN{ys7N4I6VyyN>d89Qe!242ue@E4_NO2^XDReIOG z^iF=1*J;HvmVU%1$4bB+8RD4oUF`QY_%jnnxUVS_D8n zPvk3&lfy<2>oQO+lQl-OAsC^9)IrjcGv|}0fSjXLqr?jPG;eycb;mL&M3p#}?+14g z=mw_XWQNW$#sq!a;MbHyzipw8OxFejc?o|OE|9|yFc9APjY?H801 zCCaiwnLI~TG=m#i-T@r3aH4FOYlOlvR9W<4(cqX&@|G!?Md#9SC~4A(Iru^B6Z8L- zq37Ajktrfe)cGDRzK%LTm3a`k`#6;gIw{d{hkz#Ex?W1Er}-osnBB9LwH${n4qg2$ zcX$krcEHT)`GS2M%>e3>Y9Yuyte?SPfrHHKX-2fIC@VWnQsKptM*%-*I2iwN5m47o zK_@cXnOLI2wJt83DjAmr9U@?!s?dOx zOp_SVJUEAtz7v>POp&a-Q!0h1iYEC*DPu_o%3va+i^7hRRkXgYV^kp;B$sYpG)S)? zh@pQG>yyz}bP@!UoRh5?05L-@Md@Mi%349cB6`%2cYbH2AKtu|&=XXK87CHAw+W1+ zP1s>qET@mA0)HPPqCV)20^J1`4glUM6w(z$EsMv1ni8%8=#yK)%!K|2`(=^7Vj|&O zQgE@N3aeM!aTu8q1e|91>?JQ0!<#X+O0C?h!fp0^~RzN&g;aoDgsIr#RuZUW1c#6xjFfM=9Xpxew@e==wcbJFMeix$#%# z$F-t(l5sLm^GvjTq2#P!4e_41!COVBh9sx5g)<@#YY*m?ShLwwh8_SU`Cv~bpgg%j z&cXaA>EMOgS{Vpi&=}dM3>T+15yv8G;oa>d!5w8e$XtU>g%X88c=z?uA2hutam?iy zhFZujGOTTsS!cp2@NiGN2z=x>KigB{VkiuDOEs;G_h;|nmw(uO|6D1E^c>(QO9V7C zbFG+M7JJBP1=L=Yq>@FCe2ttFi{(%cbw#3jg`vy7md$K7+-3c8L4>0W`0h+u&^>EN z)XUzIrk*W0`vY8*9>--EaQ!mqz}7Jf)AE_75K21e&QG?ElbM-OezQ=Rp8c`d2{yv` z`l?caT6$7iIstWfUsz>?n{nw_pJ(^4epWyn8`jaTXZQM-3`s0d$)Y4=1UBkW`^V3+ z082qU-ag{5T%tHmeJq4en3-Iv!LZ4gl15P(3<|Z`PC!8UFvl}S;zTC8H(2D2KLk<7 zy=%WpJ%zEthH?-%H&rZUZo{rjiv2|?hge_6lJTV27or}DRu{uc4Y0!ob`~J$lO>I% z4c%2ri4Lmi2;(z?bFXH=tI&hCoRPI9&}|$EsFfTi-HUE<-6Vt;5oiqNpU_f+CO*u7 zqNJvX=*5J+x$%-j6$c|FZu#46=f&uI+Djr8{DRow_Z~Z2RqRX0^x4s| z6vg|DEXp!9e}?-fG6Wq}OW+;*(4i)4ITRK#^Ngjd06&3X?^ti=H>D<^{7*QWPO-7g zp7|m~*)e5^SUWUdB27G9JS53#8t^_X5@~KIWvkwMotHn28JD=3@UexFS?!3%t?h@h~}9SNB6+N8)ZyEqwH z9HfZ80-7}LPWJTZf5@NAJ;G4;c68%i7$T05_bQ5C zHj$DER6&~1EXvG62mJOe2HwwK+}v<8`!htJGAzOZmKoBM2H^uiq5P%YGFiAbIwE0I zhsqFoQn?Ilf3CyS(Aum~iJg)aAGdQ|n&wBp8-|kVfkTy>GQjFOp662eQduQsd|a?l z@?y?Wq7)6a7<>7Qm-1A!G`FNpNpEvfm2H&?pjF@CpMfE;PT7!Qp8k1Z$* zrwZM&GejS_+Z#x`{OalYMyEam<+zW^=n=aZGls1y<#H1h1M!=dLR38&+fg0XDBF(T)S&I4Yk=%!wZpjrr>cZ zMJYRx*bSK0()$6TDLai*^vaV7_L`J%7GoeK@ zIeX<&axj!DRSKG~_IT?b2rY%aIw4|-H{Kdz&&D9}HMPK1wbUpd=;~;fdo>eTPYhJy zPD`>g$5>GkF;Yf82UMUAXFuAwDxklvP`sT{K5csq5)SdD#F(*M^o>o>jd5UN?3}YJ zL!CmmwaT&YS~gaN6h?MuCo#d`xSB zoB+6xZVv-|^W7i+Oj#4z&Y6y}e0jJ-;h2N{eeOS6>{H3;^@|1b7wI$S;xE7d;^g}8 z|9<`jq`)d7VS+;nGMztOJw+KG)xVbFI|7auDv;-+(mE zA08awu~Asv)-qXqXWQRC$*+;ABpD`^mH7~o;h7Yw9vI9uIE&ZkO33gI9DjPY64Ib|;_wys;vv)%aZLPDFqt+wn;+O3 z+t+YpW-&WYpanL8x|Jg+46{Mne6+_pw--R>q7{>kUDTT9aO`rcekNo+9Hl!Pc*>dA z3*{xmzMx^!RR-8p=%`z6@lshYkc>2G$#58#Xp^u|B&s*CJCI8rhdE_m_~3q?=46?L z2qpF@!Wy?6?MjH4eI|OMh4M0?Br<0~8-3#PY&;x?1v=YZyG7SeQ5us3zg=$8{ZC5p zGe+qWF|73Oj$Z!=%z4F?H<2Co72I`&wxOb{j{}L@!bJGU9S~74mg#lYBXZ+=pLztQ ztaHn?0wCbH9Ob=uir#@KkULB#PoXBUg&S#fBreD&xIwTE`M5>6(lb*+MqWKIS3i zt?eUv$-7E>r-gl&Kqy-iPS~+N+cb6GPMaQyvh!^TT!mV+Uee}@VZD9|!~e{<)>|S5 zU|x(GKiu^*@{k?a52?noOx|z5e)|R)g>D><0$~g5*4Oh3MbPDy3NIS)2fAf`mSFU8|Pl2K@P*?nq%b0c` z9jRxW9lSl^h#yh@+q_kiruXW2+Lu^n0SKq@;3Qs~lh!DkXnGm8R=F>p(Yj^-tQeKN z(ccNeg-EiT#yFSk3X9jiBb}Wd>+HDL z6rpGs!TW9GAmQw1BH@Ke_%TSx!SFY4pFKaxD6&|BE?N4tH(2Ei7)hDT4tz>YcO69L ztc6&*(W(bS_OD@z(UmhX;`!BZFn=@4|AVafI07Xa$N(fUgPnlD54VDW z9Ue%pD|h3Hp~*^UH?QjI30j6y*lo&B?hxZnj-)T=lwUNhWk00oD(NwLv^KN}hrKLA zyA(9q`8?qpCnavLwXE}SR6Z6siW&m;a|KJ!Rfmhy_^ zR>{*$9QNs6n>O~>sc-l7@yW=I9rGEDG>-s79Z4sx-Yz!Q>N%D$pL6r?XWgQSiT8N- z+b_OgUn59fp8xIT*~9J2+xyiQ@bm}$ajHLF%wEi1E?++Xn{VEHyyk$1(9QSUN1PG? zoIk9H+9K=_U6CLh%;kmNiTivit=|@skJ2c>;!TFjvZlHlubTAuaDOXgj>jQkF=P<2 z>l-v=y_Qc*x^3!I!?DIn3Kgpc+rY*Vf{>xqd{spW#yg4`L{GYIpb0?Z& zQo#rDA+@~~LxdVG3;;hK`0!BcjY56zUjG->hU7OY3VC?&a&OX&jv`UoR=YoR2b6jC zUlbQPsSdT2hd$}kTE+t4I*xOG1*MVk{0DPunN(Zx8@l^KJG168>O?hVebSZ<;ayMr zi#ds_wzJD#FbM8A7x6IGo}cFJig^0MWijVML1QgD+teBv2WcuYb=F%jGsonIGOi3b zgZL68U{FyS!)BxKE+?8+X*{Rz_cb#<0jTK6l4OdQ3IS_VuN^!OIYKUT;XV=z@`7{# ztxj&%F_PNbiAG7PeH>Xvw8J7vSjSb}h$X~UZTLhmk3b&f*+8eqi<2krI+jl9r;JH7 zo^#-c{7KFhR0zc{%*9A9g9ughZ?Ww3Y28OFx{9S6E#umCN#&^(kb*aJ#YxofM#&VuZdqQ>>BS24 zQ+}r1KaJ`dtq(wF+say&?~JG(_=KSox(q)hWnPWib4Nem9vEVCYfP1cMT zL#0fGY)3Atv}aAUw>J#=r#Yd5Y|#2uoS;aKxD(W9gIt$q0LRme2iJ)q%3#T4V<;uf zEeBc3XW?psK1c{s_~04_(l}K`mW?r?Cy%><+lpZoYCjqHj6#p1ob_{* znS^h`n31yOA6oE8f6Gy@MXLYE6Ntmu1n+1_d(YsSESk~!!s5AT-VvBO{IpXGUf7|g zfevh$4=_h+Ar2f!ZbUN?vD~z0S^> zK*e3x(O%O|GBs))PozF5D}3)AXK_eFbi_$r+Ot`vrh%;UW_N%($zba8rSJ_419di{ z4PR)v29zI8W=MO^&4(#;&}F>_6PBP`Kea6odIS!IoMoBDvsfj`xKXFF^PtH)25gAA zi(A2oYg(GMYGx{bx7OE^?isJKa%;Lq{QA(PqdSZ!>mbBwW{lKwb;oK~`PR zoc8%cpp&d>EE;?-N6c?l+~W&8ruxs=Y(|l)I_tX&s)Kw*P##VZs_b)yM>_n@!0~Hv zKXg~dwY`x@=2VgN;xWgzhB#*EOsL7=rh$(DFA1OkoVvGI?wc2_#wnv^FXX}dRF0|y z5^QG-m-ZeaapO8DnMdLc*X7Mw+aa<>>2o?$kc?-U zUPdPMj~Lm>1@<93#_5&b$sG>KUN{+OG4}bqPhhHuT*!I>A-d2ZEeLNG+1^MRLBp^d z-k2Ct+XN^Y6J;d}l7Fr4xmD1%9z5~%A<1dW;cn{;Y!dH#>+k;V2UhsEpqP{iCzWV& zRM}6_xIL2Tw9KmS`0nVt*Dok{{=<*2-@bkQHAuU})gOeOfBTxvk{2V?joX~&RED1L z4SLkVDd%$g-w33iJv_r6R`{S@{GvoXy4)*4r(!pqt;xCRl@RempBk%Auydh1-50r<)s zZGxT#G>HtmH@;)}1w_Jk$|L=xA^?h@rBbR{KxsWywL2#6B1K_6{M<)+0^ zV_k*@gZNT3w-Mb?BTQ8a_#HDcwpn+!dNOWEK8(y^QS1@Fgb)XEwViFx6-c(%6*W42 zOy0?SBwg6*DcM}L{UdhjO43t14^Su)IUvKylhHoJyEzU0r&SVR<)RgY;QNM^lRJ#V zY%6Z^2DOu3^&e3_S#UJU_l9NoeozkD^8$%K9wXoAt_vxxwtrWfO@X@Os}(}=@%&or zZ=+kQ*w(DHQIUB5HE(O;82Joj?p)vFC|Z$`(U_nw%ak|vN>hOM1mi{Wm4jYQ(xAbZ ztriC?G1sOc?+{G-s?ywrZOJgc(Lp2XtA}Z$mP63>774{P@Uv~QI7MK#aGLJ}S9x4< znuTvuq$P(>{Y;jJt|*)r{x)MUk2mTh12$odB`Ysqtc-XF1tt?OYj?z=Yw9H|GLa3F zf}I7&-@)|o8%K)R1*tlmd|8_00$Ru36G`KoBYO$> zi~-aT0~T!m1_~yOfD^+P2aa;Q#o@Pxr*^q9%hmQSI2xMv{gD^?qYmtc4RU+)zcE4C zoXo|38hmxbzp;2CfJXm>4sFScGHkfmDKCnpu$s_RZWzKIx*lsZusL`*XJ$KVDwn4^ z+R>|AX-g{T{KtZa8_r@-!E=UgnJRrf1xob@eyzObLcFtAUZ>5CV{{Kd>hEYO^CG=&6^w^Sq3Xou;r1nN9!q}5o?OAy8$MF5o{ z-W{%E#L7CwI*r3z6%N8guqT9PFp`j$=y-eur8xd0zrgq%KF5B2dI&Y2H8gQB95<#Yo^E7lx~iIpU~ZVMejKT5<-EOAhm!T&B2g6X2kMRUr`Xj_wHwaFMe= z;clTOWcF4}?Z*V4eMFTRG%PZAEVGF8KBwD(2Jj1mFLh+GS$C*iHiECfe9xUBp1ViR zwxi6XqpO8$v8)T<&0K?v-k6pQEj9{jPeI<3AUi_GrZ)-I!4ow`26c~QKRh~&FU$UBf+;0SNYPgKm!lQNyoQGctQHGtQb9ykH ztTgYU2vW$aV?=vO>bAS{3DYBSs!&*LQ;FmBw-lzA+)P-&CE+mk%zU4851+b~=sGWz zgK4AwNTJfcwGmjABV;e$Aj@sQgtMU&A&h6A6uZxso^XzvY_Vvg;Vkei{AYXxx~)_t zQtQHg>rDP2dqN?+ma@`O6)Xf>im{HG5Qj!E`7~jnT+*J_`p|UEc!cK<3>LUIH!jmL zCn;(!Df5!B)*@;ovnhUeOB&SAqyS)ZG=gmZA?HsGV9lI778HiS)BwgV^#iEQWk0f2 z>N`#Yd5p0yWvQC3((GM!utJ{7jGxV2OF*;Nu0r}B6Gu-sE=2t zs?4xcq~T(83u-0TOn0B1ykXk>^kYEMdZF_1dj%vxtK9xg~4 zb4lBy^a3-6Mp4|;v&HG1!=I90+;NRbb%Xb3#kCcFQNvbifDGVeq2r8Q zA=ETEqw>Qr=cv)@HNu2Vrz`3J$4rCU8W2PvEvlLmfzplv{j2?vK+_X1^fE5kYqF0-|3B8cf$5_sMM`VO@J*r4uc`1}kp z0$1v%=SUl6lZh%weTm{-DjYGwE~SP%%-*0v28X4AF&kB0b17MjG{oTrIb-h_giV59 zkvkFYjALDxbC_NM2Qgj>ZuKm!ok-5Z**!sLTRf%{L)ScYO_8&kzdw5OD~J-7O)xR7rdO^4#W@!+g^B&@j&*K}NPVl7Q`JGU`Sf`l!AV7?Z?zhVkbyvnz~T z3mwLl1nOX2>0cHku$nq3eg<%W3(s510K*UyDrbO2j+6o0_xN^tQA8S*j33gcm_3{x6BCW}My$}tpElkRPL~i;f~^CJ&FE6XMX%D`{EgdD z?7&!JDU-Sy<6W&eO&!OYqdttcEAHn|K3;)L+)>Zecwd}TvM7kxgd;Wnz>$hjRdt!G%;5Q8~9k~ zv_rn3lmlwL;+{&o09cTO`IzPI)5CDSDRo}_R#QqdmR2n^EzWY!F{`R`su865;SpTR zd~{XqrHw|9%_?5i4r)zf@x4myra^K`e9WQ%-aGH!sDA^Hs$Fo2ys-X?h^@S^$RQFv zBoHD|16GsqCmBCjvmzZMliwv-BUUI)tbNDQ;4%X;3v#eoez9`6DkNSiyrzI+!NJ<1 zo?eli-KyMgNP_Qrkp=JZWwT=lWfmL|u<+2wmR}yVhSb6=LB8Zg9)WxXAa5@$5&4p+ zS^(_6&v(ZJiG?i8q7a{`lIC!kNn+ixx(<&blP095*m)_O1DZ>3LIlR|@NHWu_hlT& znoGk^;1oad;>sR$mGjt5A~_)u4Q*kF&xO0ttTqbea|WMzEp$c?Fp454QM*VUeKr%> z3H)|Y9rV~VDflG1L*pbJiLQFHA9q5v*k`-O_u7iv zezWee!3;MEJt<_sxHF=ewj{%C0|y{sbs0*sEVw@$egE~*kGh>xp_x*~a^4mEWPRbm zcIsD3R~~26x(m^8&*efauY8KC+d^6qCHo)jp`SBJmvur@DX8J(VSi#i@=`?(5^+Xo z+y`cc*)VcxL(iO@!qh8Cluhkz1KPv9g)%+eklL3z(;7WsDJUApUS*WUE*aytVoZ|t z(@#@xMun`)2@voAcx(%NtOtmUWU5k>R9fB@Cl;`H6umu5TYAN(YQ%e>lMS{CAZx@Y zlrrVWPeQ^ny+UHJJh9bf5`xP{s5qw^mOdQiO(1_Q^+^PpGT0XPx`k~f$*paxZB!~` zhy_PBDWi&z#aJw10)fP6OR|Ipd?K$p^y}GuOP5nRzPc7uo|)y@JA5PVt>Ig`L6$PW zq)CD^GScm6&A>V;>SfGGYYb$VoV)(rMZA2#Hk`J%_7>tnt;y{2Py!1esY<4cz0J{=|BBWGOf+NWN zu3$I9&W?!LD~Kfy_e)`YH9(l1!`k4_Bo{NJf?Z&y%DDb*guko{ycboo(<~K25+u^B z16xW3IK$9;Z&dh%ys%AMFBUV_5_H36f{Yt`Td<8bvbTp~7zP5h)UJ9Jf}Ho>AJ;Ov zRfgy0;z0s*Q;{U;**LJw>0_$D$xNkAQ6o^Twob2BMGyXS*B*00EpN$Df6Q=qR^1AFN`Jx$9w8!l0$ja1ZWB* zqwGN0S3H!$VuX9HOrkGsm&kKvzp-uum-%06z!uxc+M%7nJc2a^Y^=`6ov{BS>x{+# ztB7DjpiJ%LH;j?kNewcwg(EK75yoJyC*cm8gVSd093T>P&z(?Pghb?EhnvC5k%|;D z0W0T%^HB+Gvy6gdECWD+gl#8{F*MklTi8)F`w1e)9;2@_@o$68p@@VCTPJ4$-hNNk zD}>`e(Rgs8_{vI}tTE+kLDj<@IoV=Z?QOylBuM8OTICpyAX%hEMv;kY#qJmV94a2_ zsK|N%=4N+3t=LeSr}U(DI6N?fNh``NE8H8Y!4ncPoP8dkOy8XXy)(!fw6kabHbh9= z)dP4-qKi|j(vj3W@;Vm9 zG4SbN-mlpvN{>MM87vzllQxU3O&gXP=Anwsif^cJU@Rb|QhLMUCh;JhI?<1fs;(MJ z?lWo9%h9r6`?Co22ud)RuLv`|^;SS9%F*ldt0qk;Ym*Y}bjRgtp(r6VNEtOae!4Jb z>zPcYip+_uFJT2Jy#a*(vtu{4mz$1ROl`O?pHe`f)p! zA{sI<P%R$c?WG1RD?FGj_QYXJyBg#`h^ zl^DB`fbXnCURlNmk^noN35rfLq&%k>br>;c~xKydbl72Sn@4Ujft$(_>_rchP*dq1?l*)UP@FhB@0#WnKzzE?bkgS9k;Q|S- zvocu*m97DB{7?rRWXZT(X0MVOf1gOfa;GM_#9|%MMc=Lko0x$d(3MC9gE6=RAHQV4 zmm$`e)YvVPNU&M!c0;AXm}!1UE!eoHPk4?01orZTMZlG&8@xv61C%n1FCd08YF{D8 z#r=7Tk*}8eSe0$L$TGo6kYEl6i_Iy6R- zvEYWhvZ~Gwk)Dq_S_60%qb8vw5Dk<cNPf{N&!YMEq76v}Y%}&DIJ)Q3vaGg@yT>W%HHJ`>;uf zz2s7*SvAyfjDkZBgfYT7DY4in;lv2-gdxq9;kL19CpMTU6h)V8B@Y-7I}buAY5v7E zhuiF`ku878!UAa8LW^EJ8yhBFXpclnNjiDejLO%trASann1kSK7u|8U)GuHW;Q+Ag zJNB1dkIklnsQ?R~oSiE8?wm^5MxLa>C!2n-f{Gg?TX^>tBH{=uRInT#Zdr<;rq?(s zPqSmh5n7UBZ0qhsb~SRuN5#s+dC`y8q4Ln#?Bo^`Jd3q0Lm6wHvp&h;;iE8k3FFu& zgn+?HA0A|O4bCxCjT+S6+bK&V@={Kr4WIxC{<2v34UB9xBg93w5kcupBt51$*L}{G zFievO(v@rvosr3;2k)T^oB#NNX&j13WZ@|?E;m-o9ifYe*D;9b7wL(XQ4WlDGI*@v zP@Ev1u>-tjwJ{utgB3me^c<@h{l<#bOOZh$ZBz@(Sh9|^+TkH)^yic0haD}^mKkn3 z+^`FfwO9*K=qb2+AE4lH!{Q|>2rCeSJHilIcUpI>1zJN9!aC6K`rD(|Z=aLn=zxau zGu!tDfP1iaP8_9NC zk02m51NvlfS?WS$tV!xRHkJLYy#ehbf`^rQC5ar-N)cJYY+V`Dg&K-vR3dzMaplD2 zvTH#riK_xF@MZ49Oqj5-0SkG@2YB5q-kq&D_#h`;mcyaLj<7$i*v0Z`Co_ixo|_WD z!k!s;7l|>A@k7i2T)NV*XAQU( z!G_pdL1c*PjfBOBes+_d!*t}{?RI8|2v(ejVW5|=Ol-Vu=AZ5ff&c(f`9#njl{m1zV^GKi=-WlRxuD0%e{A)DJR9kz@t zhx1^BWb81E>RTi;7uFEs7%smZ^$M9bu2WMD3{cdO7Hg4)#==ZNEd1N&^XR>u{5rdKf)Yq*=z5wc<)pYHp#1AR$9kUWAENjnfc`PbI%dCQFd z9{YJ(v{V5;wuk&B)Tpw({wT{la;ape|HS5s%K$4iX*5!?)70A&--b@i!BO!g2P66)dyIs?x1mwP?r{9A*t7 zyrdN$xo;>3Q#9fWQNtECp+oJMG;Lpr%&Ch@E}E#4ct*g|_RFSi(4?5N>dN-D%uj@tZ z=G&6OPAU7h1w0VXrep~=HHPa>eC8x9u(TKRKA0fi?fnJisick}s3=$78}33xFA`Q@ zCZ)x|ilH>Pz>`xbgSWM#N{qzOMXsdQHtOOZxMy~;)is;V+Bx~jCV+;CqP0Z9-zf!E8a7gUGh7TB-r3R{HIWN=KT~iC_nvK!aYMIYx-Y4R4rh zWGXi9-Or)|Zd6W|6!_JJQ8|$gv8wTD)NP?6U)#{Wla}o-slMb4wxEXgp?34I$q4|o zr(;bKXZJif$pdv4CWG}TqwR!OFS|+;B$$qy5vlhKG-j*>3Pri?+Efu*DI+h!2@8Mv z|44%99ajvIMbaa?s3DxoZ zm_-WbUZ}G7%WoPls(oQ_jy>w?1q{OeJhZoA2{)s(3NI`>atDru=isMHj zJ7P^!6~~GPo!rDRWrIR#E_ij?)GlYC_n0sZ8gkRu{GIdg%&fDeI!$yM-QVE zHgj!+I7d4=YtAC(+(eY=Se)vwL5%VRMu>QzU}OEWE@W~P7_;Z^1*5fvlb z2h8^PK8#M;pRtr}2$}2=W)-!!&4PB_Op8+b!|zkmYRukFnXASgX3sFDpDz%Cyi-FJ z*SCS33kEol`%&RAT!SQG?6{253Kxp$2srhUe`^bOZEB=~~_cr>>Jx?z2lMYk{y>LP$d1m3pJ zSKF=gfF(ul*lBY(Hm&zWx&>)3lyr*7i6iN$m z{+sCQBVD4J;-nAwQQ=m+PrtH`-X|Y!ZGZXpt5@H><};0+yZ-*$YiEh81vyIZ^jae^ zo4>2KT>&&OxBF9N1OV9XxYQtPBIJ;7}<;hd9U$$Xlp*6X(g z%GN12bHjyCo?yzbfm>KZhm^}F5yOZkjBMs3Nph}U5}kuvZJhWRo|rCdci3BpnINeH zT(#0RQ^?&YMag@kadz%F9$*-Pt9)=>7zyYK-Rhp4MeVooLImC%IcQN@e#!mU9wD~B z%DgLk^loe68t)o-KK`KP^lauXO2|CTERwQrh=NpGyL#8RL(T}5>$|6qZiWTB^r{+x zlgO6P%Vm!QXYpQaStqpo%s-!Q{IOPNGr0Vz9EKaGA=Il8N2oO z%udP1e^dFf3+_sQj&_F?1=6Az;DN>=)?x$7%Y23)IXS*N{%~={M_N4#iiXp^WVrG! zP(skmr+lgRio>bu0;*bwxMhU94iT1evZiVYKJ05}(qJoQ`25SGcRw8c8Jg%KxEItk z!?vKb*^3VzH*2zc3qKnXF^51M@eS%Y(jb)FpG1di;L@bd>#`Zw1)bK)|iNBA9F z=8;9TW$F-0&{i;T9cvXtmhq$Qe_-dV5|=CjtX{>erSao11T#aFIPl^8gUDT$OP!8` zCJY78v{F^cYKXdSJn08l%v&jc@KC}Csr?)Ggg|Ppdj*x)62o1O%I?PVplkC?K|LdO zf>Cwy7QQkHBROPmRnr4%P$3fyxZ590$vA`9(0X{z`wGt~27!yr4Rl#ajqQ|?q>(8o zAF#^&d34XHd$qIkS{3irD%Ixw;P=mz0&CLgxRR*jKC>wefv-7TZca?y zoEwLk${E(S^i;u-{ATxlKu+1A!)5_hx6@oR<4pYFycqi=Wf0eyGG`IOf;9_ z*=(33wG?N+fA*589F?`jsN#f*ycHJD7-r@b#KOfO?O&DPLluuC-&kc>zDgh^outL? zF{ElTq9p9jj1+OjGsUx4qMoIgNY>n?Jo(e1v{=e4aD!2yG7WXs7ZUwr!k+q_aAb71bOL7L5-Z;RbmWjiN+1tXQ## z%nfc!RR-lDa$Aw~W^TCrbrM$3{_50`vP5vVjZjNjz6E zfGn+(`-&whR~d)w^prLgQ>0G>Ktq06Po%1jVDbV0H$p!i3%Gp=0ff!j@tvqU=XPAE zJEOAhzH(+zi)oH1rxgQC6U^KfFehb_)8`s`&rgt;EaovumuS{@Iv!!lNtDnN@tX$Y zw|O<2G!w8WNW;M9cJ^f5$(pr{F)x)>XB$&OX8;O|47IunCYV0KCKk)7=iafG+-C7Q znH3S{mfqF|l^rfn64+it;m6D0{1jHbWy_sP#V_L}R=SY>#}8L+3gFNS`-0LoHZ!VG z>gX^%z0A)vfiny)j*G`fY4rEaDc95KQns8O8ila1O`X;QTf4#^($FBeTse5aEo=Ll z3dzS)(?TYMa;S{5*tm#uQOHdghM`6v=vczniVc1%Ad*d)`2+C0!SY5$7Qyz&2jA6B z>+Dh|2uib>f-H_;%b31wPPx)5e#!f?09=j|FI)(L67_7fH2oR%=@?=Jh^oNRS=8B@ zf}%QL4`Dt+I2l-FkfawNHI!zP4iVo(fxL(c!!(&trfF)%ZJLZ*x-DuNOb}4m4s4CH z9}W`Mkkd2#AS81+rw)gOcz0%N{T2bg()SVnHx<*G1|fs3AGyR*TPX) zF+^u-J1l+9pJ*C%Z!z5#5?LXJ)$X{zf1*-A=}~(EIradw`EhW8GJ+`)#Z4GM)$zYOJK_F;VZO+NA zjV1GPFhRyS)6tp6uE}EyK<5Wq5K7X6ZY2dFe-`q3!2D&nV%@oL*oLt^5s!;8FsERtKy7Oq$+|!&>$G94v?OHJ z$t|&8QkncQiEfMKCY4KQ$B`ll)n;xmLaNK_cu8OBQ9)$k781wi5=bOVtn`7MF-<%r zi>br#o1n1Z4l61^vt4d`RZmmJI^W-2a`$h%5G>be)@Bc|nJhB8v$=?WfpqU#W3{oVs@Rx!0zI|8itRWof}F=rMmc?%RE+`h7S{@;lMbi;dQ0Ol zB(uleJc9MTMx!mM^#rehP#yTfx1Ft&{eP>(BBb~cEu3y9c=y>T8tx0T7e=J%MUI;c! zF8sfgLaAtvGpuGht0NTj8|C;QsVW6nGF~noF?mhu>~~P5E3I;3o)S; zq5P}L1=4?30||BTcu$c$>>MGMZ@+qbRIbC(*RO?2MvKf>0dB>6TwT&ls;g`a?g-U` zFhPLuf(xd?UVz6{<5WjI&s0Q4@(TfCq<+$jFi?HF2_R8D3Y|keUKt!?HLUz}ye4=- zA1c5D-H{RvVDW~epC}wAs6bZCxH6NhG0Yp}x;t;>CPSIa%31-f)N~jmcBT$^tVV}3 z_z@C2YQ4L)VUw$gOGm?jln_1@V$X~hhQ06O=HJi;Qqjg;+irB%Z8zIbB4e;L<2XK5 zsSIlmOVpNYA|X#HouH{xF2t>r2h-Nc@0IF&f11HmZB+P_;T-sEIoTOji5DL~Yd!UM z8Fp?(SO^9phn9E}aejCoOG*JQ61#Z$iA=~%rH%Fh33k^oU_B+QJ*klViXA3n0~_Mv z7vkRRf>#W1D3g4Iaq-LZec`d@rXR}%Bf>yMGE4;>-z~?9Iu>MB>2Wz@a=LJZ8K??t z`c?W=Dgk-Na~y-MdM?RN={Y9njeh@JSATxkKA1mOca+kF_r`tcSvGk5aB^{>j=0Ok zzva2|xE^I`aLu#i+TIQ=;lla4mug7>2JRluvZX{C?o_OBc)?}E(G)2L)f8m{T(M=` zl%8c%M3Hnqn$om)ndpb@-KFQU=L#z0&-85lv%9TbQkduYa+e9+V~)t{ZH?_)!HgT@ z*;dz>7eM)K{FKLT#va@Q@=%naPL^nVu+SmXaZ@~N<6>#f?TbPj``qzv32|aUNnxQi zD*map!=<2$acg>310&1$UOqeo^>2Bu6~m?CeD^0ds!kBj57gFT$HmF}wzm9i+?Mh` z;M+TXgsm56MN>qi;uU?-lu#!SXK@6ey{EXxZQRqw^h}LGl|-RTFP16aXjms_ zS6A~0<#9;!(2e<;%El3v7YjXWBQvB`jpZ9Rc6&uw$eijuyomcJ$BU?En_Kc5iWD#` zd)&L+0r_G3&}<4N<$sNv(z9t(GB4qZc%!C@Bh2%JCE-&%7Wq$oW1NBK*|ael%3t$F zjRi+6RmVO!f{Y|ps~@$6$;PwIZTU^i@%;3OeJwGSqni7Wdp|0Q&+=^AlBZa2G%6TE zc}Y6a-5Oi!0?pB|xNnSS)5c+pMOpUGW z3jaEXJkoCq2ZRqKd$*QUrCJ-Gp4Is9{)|GBxr7N3FLvom_NE4cY?6|Ns%GouA!=

d6Vf7CLQmkZSq^S$ zqq#j>V`P9cgh_j8r&$6^mRn9N7TMU;N^@hKnKo%G->9(?We3U}U+ialQ#;M=b%xrg zJ<|8#8)&Nb1VNG|ii4%eW_xS48tsjYwNZN`b1eX@EBq}Apvx(*)m<~%G{&;d)(99j zUX9U)ZiG-4E{4|{9h+~lBg#r!YjkA4#Xzy1eFCpFD64GBHf5@*K@t*cs{~Wm%eAc{ zX3VWJvFCD_ok5o@$L`z3^(a$MO`iP%DIZ{NC1f2O#CqFETN`EBbbK{xkL0+p_S9aK zFg@eaGodKO-8SJS4Fcy4cHO8!5Wsk&27P(zWwk`bd|xZB-y1QsjPk?W#Ciib#Z(1F z#GBYbdUFro@ajM?V`mH|EXp;XqH63SES-tjXO8OZzDZYp6J4n^K<=caoxueqf+b?t ztUtA>howu#ZT5y?F_efs406o`bc3A@NP{j_D}vxI>G#!FJ3kSYV6DEbyUAkN7_9H6 zO?GyohL4${8vc!)!uDHhurmnr5all7y6i;xQ^$y1Jeq3`@sLL;hoh)CwFf|<=4W*?pXIrOnrX6dw#{I&Y%mhQazSi=ir9-TEh z^wEseAj^}|fUu5ih9BgJCw6MIme%M3YWA&lMk@Y~TElk^XB>GRRL0Wmw??#=rs|Z+ z`B)UVxLyf+)0I($F6!4dtieJdadj}UUDW|86M-a7JLn8occ5jY13!*MSGv_t9i8Vc z4B0x9vDzt<=qxSRX=j~b+jr*2(V0%y;(6F@Y+X#u-5{8a+I6<3LMz9UXm)X1lAu`s>yB8usobZX?$q7}>1sO@er4+I@s#4$uY+|Xb?9){S>eAgI48>g(_ z$v6Y|+|aCko1*3B_9C!d6u6c2kKnK*N;?V)#SW`1OhHhhcjZex(7A;avNrG`L zX1$TpKsV5d>*Fo=vJ=_DlZlKBLl!PmP-Wd!7`%%4tfv`^72ePc_)c#U!+Y_?4BrO}*Pp{WV3Sp_t^&T56us-J94fnC+c4M5$CF}1)=CqLZKVp`u? zj0`HmSaac>`9@QH)QP=?^WH#hf;?lCHp!D#`II~zM(fLQ#k*`8S?k&$nvV3s?v5?c z+#d#9r>q+&?Are5!P&>O(-U&po8^G9y4Unrz_4qgrygry&KZuJx!r}50C)GZ!3jni zWKLUL6u=Cc3+_7EUhHNKp8cZU1dNSu(~Q=)q`jVTA{0VltOs_RJbP>$4@1g8WvqoP z<~2(3u%yqZHR@s}N=rW<+?s7`U{ALudwGpedRQWL+*-X!0rZ?o3?dSDa>+)sH9Q?! zZz7Kx+p0HBn(YQuSglPkS(8m>^X7?;3~I-NmmHvjZqZ!Wz-xm`!+32K6c}Aa~eSK{_oczLUn=rv7TO2BOewf@dwWFh}w4>L?9cFiO z&!nsTMqR!8mmd)7LOkhae8?UgZrE+|2P>j~Kw4Z%C2w+0{S3JNo|hTcg!Vu~fT)Bncr7fdsK9^eE{xYKZ5>U`>W2zEI_k6zqeZ zc3h-zzaFV2Ejw918CZcZ`9d(d1BDC69QPd^KX66+8j*t_dXyu|L@Aa+S}|W};nFt3 zY!~gYUW@$`@A0$sSz#;hD{5PLQl2IYi)R)zF#l?YRS@;S8XD%X1B> zYy|S$*=-I#b8U7X;!#suepXExw^XhQ6C|$CzvHH7rO?Y3I8?Nr^FSDjlll4CuQkT+ zwSpm5l+y~R@W}n)4z(+&Ed*fa)CDX&9e=pG~$+CE%()>bLLQOXIP#aj@E^ zW7o5kENdP4U5tI)QGQgL7tp5zGOJncl!)(M1iQQ6Poovmz402%{v*Npc0#ket; zlV|IV#nN@}a^vaDa$CHE!?i#u=Vw}=bd3PKt5p~d@KAbB5-7jZej;&+gdPnW1x$|R9U$C%Hs+@>w+nFzsFXXLa9{nVBs zO8Ks}Wj4sR=D-g_Ti)&5q|$=#(bhd@I@k{!9Itm;ZG|dze1rvZ=$Y$I)>z8Va)E3B zqeW0K&@A4B31#>((!FpTv|DkkM7yOAP>*THvswoo^H&-%EfVGTud^>pwbRV1neY0X zb2Sr_)U*8Yq?ztbA9Usxhf34o){iyb@v}`05@qAp`9@<$T<1+Y3c^SJbE^Bn!_?4|dONQbq(=|loV!o#EgljxPFdq)LK3dlS#GW?zZ+g z%C0u*_fPjElh`cE_IG`#YurB1ilC$R^;`N?`xzf3yM{EunD@S~pdYuyv+8-&Qa*P} z(v-K47Sj~>f^BkS2TtxCx2I>DX3lesSnUnre4mTQUqS$I;C7vFc(!qx`fWDWj<=Ac zPU$r!8wSa8$0@R-!TDJYj{H!B2?MI99@=dh7yUz}Zr|QhYo6nGw7>6V$0q8T$dbm- zvVC$aoF$5uK9b(K%c zCY#$&pY2$w?(U2%Kl7-ct+!r}lOCnOA$cPUsr+la<7XRMP3?Jm|0KR?rm$J?kLYyQ=k06J-* zYK;ivRM77#>bPP4`B<$f`Im&<#l9#RxxW;PSu^YWY(q=@v?z)GA?exE&Y$XmzjK>BN+{g6;Rbkfh-DaE6&;X!n3kHQ5M$wqcz7w8kl@Vrhg&?aTU-0k{qgZCnYihCPue4Xf5>ckSxYDaEFgQ=i{0(%8io%Z2vs-k=9{ad z^dS!-e~gp}F@(JBHG1|g_^36x^11ruks{2n9_kDAqoUM8KLgYirsR&so;#jA)b3sP zQAhgmq$9Q!iCguBI?4-YcAa{4Na))AOx<~{f_?lA%TUid@~{S;P$B?&^TbWpV9Iv8 z$eeO7Q(xY*>74n|Y|@e6&`Z5R2%6W8OEi*AeR+4%IqcC1*XFWa%aI>Cxp}^CJ4rc2 z9`o3n&lMQC>^7C6xqLn}=K{w%%vlJ4UU|@@oUo~i{!=I4gYG=}5oOYgA9@KJ@3hDr zLnmQ8yTcj@~^>$&t1WxAdp*ySKs+f-O{e9P4J>0;*UDNU{; z^{SwSb||sU`nf1Ms3K=X;2FeP0|TrHw;mf9txRGDYL9N(K~nC)+1YyzWQnvCNU+X_ z9X>E>FcAees3_OI%h)Jq$88A;SmSBq1M70U5CyfREpkHI&Ii(|rGHZK67Zj(2U^M= zB)C5dY>DrkQLS6%>b;D>01@`cVlsB?QLe!VG)j5^*g{*WwML2Y#d|e6LK8S0gZ?FU z9BohW1P|D-0d^tZ-V=LBxM_={gXHCQFXg3x>+Iu#(qw9x38WA*uCRk>(g{kAuo1ID+Zd0SQWhtk$~6oHS+r`_3Q(k%+dY7=qjC zK!gYK(skfW(s>gHn~u zVQh)u#M*J1)3gbXT(K*n%4zySeA7>%U&L+#JfV1~#GnF3xpsPUJ;5l8!NlBxwga^nK)GEn#LiAf-sw z=D9Ysx{%!8a}1>QFohaSX2S>TbSbPsJw)Z$eVQF;LgZq1o#hHd@SdP>o42h*PrcBH z1tXHc@BA{be>2n?w4kvSPT$r^ZWpWhs~a1cMUD@cO6^+gUp>vauA1=>$@p1 z;P3P>8JK&DWAL0jFK9qyr5@cq(op=y!RHveeElhR2p1^X+Os;nicB;L5;dooWQd!pg>F9&o-ZHglQ=5``}z_Z3+s|+E$MW zh~7>^f##wUIRtW)XTz6hVntZ)8xh!<3=RLx<@9E#;X5@v2MB9&e`XjKgCHR#=byomd7tn4N%f3 z`66dN@%PROCJ_AkpPmr--re18$SeDWD4KN6pWACb{s`#@jJTb8X{`N{aRw?qK+ za?)GAQEw%`DK4hDCHbeZ`{*q_{ms2~FDJd_8}(-Q2DGisE8P9Hd3AC7rzik(@A96z z_79cZ1x;|KM_6srB>i-clDH6iV+Rx0zm=py$#hD3my9V#XoJWTFFvNt!;(vpXBG(% zWOmYQy7-!0$9S$UlZ+Qm_}UaZXMVj^UY1r0OFz;PmG)?6m^kh+&dzaf;TL8<16HgM zywxA^8t4ELQ%{vuBJW$lJI89=$<&c|C*`nKtX)L*J$pxuqK|ysgp0i{p#VXXiQ^u9bb1s!7U|K%QEGsWTrnjMKaCeOHhqas{HRmZrrHl^{+1G4buQN!<4mq~j*juUC^c z5tQT8HHKTiPTem2KW;2vxUmXxL4lt2roMd;S626ijmMFKc%c?sSsE8vAT;Ie0_;D+ zhtwXK`aImw9+~~|qS{kw8lJHBsn_hWuPsRD;EyNl7s0g-cNsne#)zR!eEXPc`S#PD z?2H1&?4kYgs5p$$!tHpvIr-{qYf%pT8mHF_HAe`|&2fgWYi^to5PVV|{Iod|?j!dz zn~R7X91gOOZ}drUxXkEM1Y7pdrvxpxecDa>^FdH$agpyVZcHUGapZHzl@Bl_XnFV= zGIz951L`wbVN$cTRpiRAQ?zsCM~mI31vqBt5-K&(2=%W`v`Y)<8*BLj8eGH;7Yk+l z=kI%Yr*j59K_~9LxvEba==*VwLCMv=pY;2i>^9~)%w^)Zh4r5NVq;GoBGIzEi0iRf3NVAgfBh zt)t%vl30^PJx($1NT^0Ci{c7gPjN-Q(ONkoyD<1lrt+pU3OKho*6+^#{Po4j<8MBk zarZ9nnw}!WIis-H=X{9-(6Npd@J4w{V`wDObU;S>a|Sh7F7@l7ks2y_9Dp!^rqrgB z&jLA|tTn+&l!u<_4)P)U#=9(tXk1YK9tKgqXsyq!`EwArl|3ezc1+>OSyEK%NRZ}bvlHkAA3ITTCW(vN7TXrXjSpk51 zKvS?p^X=h~z8O8Q8F!Ifxl^qY zhI1oBRFwuT9JWRWn1}*^(@%wipJGH!4lq&K^FQ$b)8hEy|V zoU#$G+IC*3+9xNZ47q!!x4jsz2*0E4^{`}>#DnU2qRHqgii0+=a&dBX%Rye_UU4X4 z*h-6&>$~&kGmfIlCUL&<02AsZ*?9D2$3j?@xHrasa!qN?%dCZIuB+!bBl)~L1hc3D zkC7_qdV;|c`I*4o6HdU{Z`+L>-@$oqq zi@*czodBQuQs(5Gf5VDSi5?&yKK!Ix?tLcDv@sx)AKt4`*U^YVazk##f~3f6D*C!C z;no1E@Z2?|Xj0~T)=Cw`QB88DHOypA4I?*)1cb$@P!W(C6UJ~td_xT^U=bg{inSep zgvF^`54smktd9mnU~!r{EQaC(Kq%hI_~$j%iXk_b#qzN`9USubxPtX0P(j!%uiC=r zi__aXu52_Ul<(vN=b#ayOw@33Wb-%gcX3)YimV$;hryfW^*zf)UQ$VpA%mTFKf|s_ znR;jEF}qahI1>E%4zvqaw!fF}9_M^#GlsB<-nB&V#p&azzOx$gSO({fcNmadamcw$ zEoZ!z+ZD~8{mt)dw9XA4!la8ck0>@*jHr1;i?d%88~UVDTd;vsn6phChL{tktJ45O zD)WLZu(I0sd8v)Pc6>k1K?r&d&_i#4-O32Jd2JgjYxL9en!}wLK)nDg{<%X0)?1PU|0r z?b-h@B4GJLQe+Szxw$yrAnDO;yv6Dm=_36kLATUPC#2@L{*?DF?UnCs9p(EIs&B*S zd`v=*z8ysJ>V*4-TP(_=WDZ%E~k2xvt47nYPm1@x-C@mh^Ca)k$W(<+Y`6zJ^Fm zICJ;eJu*liQ>)0|w(Psb$_ImVKG_OE{dVGcwNh2^L(U>6h)%9;@|W9bxcOprP9Efp zug%_m+49wR$-;c#esx*&em96~5CXkG-MH_DMe`AoVTK&AzVTNLMCK*2?2p-8m&K(Q z+DPPQ=!;HNugAaFQ zVt>w~YF%(qC!zhG+gpOol94+pz4}B&6co2u!L#j-+$>g~bb#?t*+YS`30?SEDXbd* zkO!k5LKfGHB<${&!m)DvG6h`ozq%j9_3G1Swx?OBUN+>3RzE{B$C0bch9l`E;V-di z!bR$WvBi>g;(K+C3FIU9N~mLOf!yTSu4Vgqlf}ybRq7?08UdYO4YGT6O+kAsH;7hW zHRxlp(&>qic&Kmp*U$=HvRscJQ|Q#koy@+`S~?E_L&hJs^o7Oh1|>DK%H-v2$%H#8 zee(+i+bK+Laiy2Nl)lp)OmS?5oG5)c7|knQ-XW_<`$~70Uxq^QFFS#);^05gOC*S8 zOGxP2R`Fhq;h|V^69hTv8|w^c*PY^}={9F%Mte(vB@JO92 z)4w&@3G;`aOk*~hL_DtY43~35lOq}bsM1*m^awtiLcNH8{O|#jCDd|GqO-tPkB(F7 zc(&v-$$Xk+FXtcSG(^f3X-$6H$@a$+_3guxu{x1RoRfWIPjP3rHbA}Y#QWn30Pw!Q zt$sTh|A>5D=~QC$*$H@Aj70sUt8+vS*Hxdm4GY86m?-|X7xj-^1BB4*=GqzMt4Caw zq-1@oxL37|^oo9y&TwsIvo2PTNC6!SXRfgdU3w~S5d|!}`mL4+lYI5~6D;fs7VXgOf7IN^K_IvkT4B>(y8nRb9t!fbpH{d?S!!TQM+z>V^!gWTUcQK2h4H#k1=vYF<4 z@`$(qi%=e@%mOgT&!x!S2!7ktX^jXyaJlcBMBt0(?*9aLE z*7ONS2FnI$%`~yUr}U}tN0qItZ8n(dd-AQ~*et%42QY~GJvmM>03@%!91Qh6%L|(p zK)dl}JG-}+CO0C1WmYj^bvsz=d&(k@uyYY*FxdBW!*h&@G9~e4llXf&9{o`VkfX~% z)Q20%fN`7b1I3qvxW7IY!`rUKx4_X}cH;h;Tv#-&olGK^yzIpN^$DgcMlbDBQo~;k z;{MtiAMM;;b|(3?)=-7&+DnV^*eAS1h~Wx4KMNTqTZbjgE;`YEtr8Cr9Kb>L06N)z zeZ$1K4M$9$6YGrfYrD9i^{eH|)bRC= z^#Bo0H#V5*cj>?Bw>%ZSC%A!vjy=0E1xMQoUr!?A~n#m(bYYF(!9uoAXGvy_@u|YrFohzjvJZqdAz3%;j zJ7U@x*4nEzl|ef!?&K{gm6E3O+d)0(ZMsbEv~vhNs&I{BM7=|BXW3zkL_t4|xAOw- z>@LhHHRq>dSRy?T3;AEq_U8eV)W9~gI=@)Uyi@ScJ74XQs$hus2UBT z(-w<6xd4cd6n%rLSfHRN)+{(hpX!W7eB1QJ;*OupjHo#nujvgTNWawtK)?0Wc4VMG z$v%$$g}A;m0|dIj+e55@!Cl}b8*i?iPLRkiTg;7K?xh7{59FtV0#Un4JOnM%Lug16 zh<0TDa_|?(9>u~>j3>JpDsRz^UNa1*FV!$QHNs&JP$?)7i^&Xn7vb*yXJm^FV95^6 zuTvv;5B8)ahfQXGJm`@-(383I)xetL+d+-!C85t9Hn5xqGja$W_{9AT>f{c~9uJ(2 zm{4Z?K(1RZgY5Kz&k#BOeo!cPGI}GM8@oeqyHlKtyT|jp_A%V9k2@dWE-gsVW-&bc z<{u0?mY!;ScPs_{rc0+~08oO6Yblx*Hfk9*)O=@!CsJ&XeB` z>f-(pyE+yZ`zPKGe!%_D!lRvd&f%(fJE(?-xv&&3y%O@(a;F#`<~Unmf=s%-ReD}f z{2@0P;9a-+y&`xhh}8x52q#1bgCcn3-~==S&yJX&wU3d+O_Jr&Odx1UZF3uFY-t})5D2=VWuVzyEU_ofe?QOr zW>&4W0L$KIV*J6PyVuI9%F4=nWzxe7ZO((|(psLN(zyWUsQJS_44~or*JtvoJ0eq8 z*BAv+(+4ks^_N21alb3pkHMm|EqWAl67&}9zrG;uvA{hMG?>I}i~ZB$7FxDLq|B`4 zx94t+Tul+j%nfe|fE($Zv>Gd58-9Od!LjTRRGzmMzrT@($cBSbWIW%7-}58Lo)@kv z;D+DpRgUUBjJo)N0EEoRv(#e#z7h~dv8qUd`XtI0*RRhgLMI)H$;`C)KH9vHXO5KT zsj(6kgA;@n7V*SfPD=trzB&8r!Y6eKjR5$3dIagYUkEm`vC$F$pV5Ee&7t@guHM)T zUkIw0<@#*!{sTE5N!PeLE92w1_dtWn*PRBH+mGfXCsgK}=003D z(wSLP7tkeaHE!zBJsr<9E>ntAs*myQx#XW6C393}=V@IPqYtb47!P;$`uy`t@6|lL z=;;rv7SO!&Xf#9q!1c}LIo&;vd%qo=-k_$HcHHW$JEkY_(YJK?9Gy}OYtnnOvcB8b z(1g6;3kR2%2l9eSTgqYMEBE7`^v-YSr9B~jj5`VyQLXNCkm%m4;qi9!v|7o2cJ@82 zcnKj0aCg4!09T(GwFReT`pM|84A25GyDANf&*uHpVLy4R$8r| zUr=p}hSX}s&187;T(5!$y)hY2z%_85;iwjzYbAYjuDbTj2S{y+ILI(-bhA<$_? zKBg(|^s@m{)%fh=^pw`QbgMq+>hrlA;B;lB)uFnojuN*oA91gWD#q~S+urLB!~XtY z<1ItV-Texjyok;Gg`^|3j?J|nT(XaT@de@3+urWGt(~FYWLx6J`Df+L`d-|;6&9{X zgfa?30)wIPu($6Kq{ak7T_q*v!#1eF_7cl zv!ywu(bHnQ0}jr^i?_Wu>su?GWqB@hNCy$~_>@b@xd>-@-uBkE_Fk_C3P(oY9AoR* zqv;JhuBORqtb%7rei`i=L*JS7_3efGy6Yeyub^M*c3!)GvU&zjde{fFcb@8WO~>QO zA>C|gxePx8uzJ$a^PcumwE6u9_@cG-IqwAdxrOs_Z&wZERa12p2M5%?ypHz2hEM4S)Uyg%EsyCK zUdT4Ln3toDA${Iy*3J{J|JL8xVzyw@Olzk1>*)5gYWq~4Wboh7-R?FT_TpE3_Cgz= zW4JJn^W=q)_wA!2u@s%<>&b7U(_3Ne^U35;!?17B)tJ81)AQe$x^6tHe>27_18~Ee zs3BB08191qn=5!BtYXSr%5v7KE2gxqK13jhfH=w{FZ$9SdRxN`v(4n#6yfz4+(+>M zbH0&Q0Ot_vQ*&gx%FCuX)2sKQ^5dwCtQs;+Tm8M-O$2(N7STm#ZT~5hM|2h`Uiv4%LBM)$=Bv zscySmcW@PRDkl(0o6kT)lM&?)MGMat3W+kjY4qelEH2B9rKQukv5iHRUK@^UJkfiR z=RKbezcSL~Mo0gy39E*7Kr(|Kqi^t5t8@Xp@AP=eIXY3^2srW)e#zf&|2Ej(pEs&@ z2CIGl*?YITwXwa^-`&+mGm=SfdwsCAKd;f2+%f2I3KPg_4z1B8&WR&DsM#)% z;`sEQX3MwuDefgK63ls_sQLYh>#wuoI=Zb`vI=3qG3+T8Wg zS6ABG8B|*x^tY?q`){|0-%?MGN6R;`17WRvTv=ZiGWBtT=U3L&_;sd!-t-qb6wgSi z38tdwcKX|X?|@{aPxa}It)IkFo>Oa*Es&@j?Q4VO{e=Fl8f6eq^Qq`tv8HEX)L zX!+d<)d$+d7EI&`E%skd%n*jS_0%rmAypxcns!#F6IRKa3 z{qup;9xdZIRQYk_!K2ZmBB2JEOM#!Oo5Mr0XvWwh78_!Mj1O^Zsq;#9xV8Fp!dZF6 zGjlwFnxU=j|NREdCG?DcjBqE|R!ONn(_32^uI%n@@NHpF=n|6Zp^d4E2^cYsRHO9P z6P1zR)V^HE;(~R~ac_QBuQrT^xmPZ9Vu2a!J&E;ldYt$VmUOu#fRowVVV-Jbr4%B` zaW)*xInTF8 z$z77pf`$$3XC!q5?1q6hX3rHvX>yZXY_L1ex)85eu`4HJY>s#$0>7o?kwi!QOjHEXBAX&GE9cp;iWs z%h8i-wWEQ+ZEn64QO|zhzqyT#xwW<7$;r#JvzJ#_kB^QXO?yYPtW!o@edI`AF;&cV z0=yh|bx_j-M@LW2&Ys-f&azARt)+qDt2$cH#r)i2 zs2XJJNZ!+97!{j?6jCzvlqA9YQHlfYlsT#(x6w+YW8A;mD`N=Emt%3_zwd<>=9sQ7AEbxf&>|+!@8B*yG!&+A&1LOirO0neztk6H!$3 zqEPXg^i^x>(0ehZ!h~QApb-Xk10R#|BXu&5NR+`y9XmF8b`YZySj*mmLp>+5y`CL+k_+mk)lBs>WSJ19AgD(B|6Qi zkc(|&l_Z-!7Mnf}i-FaBM;0^#`WSaKa8Hokl%~>RILDP;iY?8qLWd{4*>(OI_htw2 z>CLS8639I6&Ay+7u5?3*+6JP=Rld|zWs{)Hqw-e6fv1RB5Sqe)z&?0EQ*!+D-bUgf?Z#@y|lOrr6ti93W z$Sc`;?3dID6on&MwvrIC{jFA`EMP86M+4HK8(UZ0a?UzVK=0@1@`|msR$gQ`BriiH z`Oic&J~p%)x%fssGPchc?P_#z$&}@7x8jz)pF7IQ`1IhIsZKy?Wka7&M(m{sI^>$I zt0eJaH)tH(cCx!t+Y*jU2kHc&K{?)Dq{4n}R`PK=Jslm$VrSbB1qZe~M%Q@!@Rm{_ z3bGQ{lA#W2geMGqvMky@+B;i@8%#VPWlm1`43>7>J2}8!7kU69xK}#79j9#FH+Dwt zCOqOjOV~nOlP;`u)a$<=Zla1aNZA>Smj|ulXVwpyMc0&N%j4YC`GExRf@qLtgL+cD zt1@E`5F&ZF!~bDA(1K7UwKyH(5Y%R6Ea zhu$SaoFp)@SPkp7#<2bqKstXW18uJUc=_askTbr%@L#a(lk5B&a=1Qx%(=yUed-$R zF<=*6g}sFz+^`|ucrw^g-6{bhiP*ElxgqX9$Jo|1^=K%!d?U5ApyhHZRG!TNCR7)AET3he1%_-J{)V5xY@YFt&ry_6HxxIJ60@?qIvA9p zWHW$&ih36O3wxo@)g8dED0H)m@I*-$jKSlV#CyzLB6woVKXfUP3|dOl-;G}BTdec@ zHeIzLl|uNLA#VCS>vgOY1r&z2VA-Y z-SNa!uBKxnhujRV5Cv%%8rjp@{_EO z>Do6mZYgw|EAI!pJQA$T9K1TT(JO9{YBF8I`cHi?miT|3{wD~+w4I1+i6(4!M>7|W zkG|1zJc2x1y?k%}Klxkl`B3^bEhk+D@&1VSQKMyC`~3xr5_kt&nht>R1!fT9j=f9+ zB!xKd@S+_1=!s*R%Zh`{GFLQ=n?oXrI_%Lof!LZ|!7?gmLZ<0xoQ^zBxB2 z6!X-6>IB_f;e;TfW2up>N+v(7>ez_sgd__R{;CN}bA@r4*o35$hJ~Q~1aq3vSuhU5 z+K*~z9hkwsp7785s;=||7yFcJ)(Vc`E7WWY6d!=3$^_YcSO2(*d%hQ8N+rd>}}px@QHSf|xz z1{9{N)MTfvg0&r6CUC6!?WFQzA-)pk>pXyssxRS(uLqkeJ0JY@h_4s?b#GZ3qwtmrRP97Tj|=7Hr;r6QlbHbAPW4q;aYk{Y|CQLLol~=F`Q(%srC+p zWPCT+9d7M>08X`GwAbF~7Dk9%6`NXUaO4Vh_ds-&YLe1?Po_6_>^^@Jp=+iHFP5)P z#2@ZB?VN_tau*i8gNxzmz(Q#G^f&=m2hd_{j>QHCp81C^Xr)D*(adjjfU0m@?83%7 z^^`hGc8tjS05^?)U-B-e!)b#I#$2&7i-&wkv?)Bbl7r;AoC0Scv^Au=TrUp@Y+yRElRgQ^1O4ktFg#q&Eb> z(pVb6tiK53KcTU(i7uz>QM*W94ZCK|#jH5aMMIX@ zo}suD_sL{>MoLq6>c$ch%z+fZ=?MigM+7&4f85*YudHotu742f(_3SGcH&=t-Wd%0 zNaJM47@6TYVWU$rH4?;Mc&3a8jXI}d@u9y%)NA`$ev{5PyMydcGPZor$c zldG9AI(%M!Z^h5al(+wcpDw3l-L(Bo{z4|HIbIx|BK!&{Txv=OfMNa8TV{pr6-jJ9 zkXaG#698P<*(6Sw;uVRFjUo3L$1Too8Atxv;H5sbpG?`3Aw+hlOJ~Ok&!z~0KvT1> zIEdGoVTcoW$o#8_@_+xxmq(tyI=Hxy56Mv%=?@HPA3hJ@@kuYqd_E>u%fhQ`m?jVU ze>!Wp4CsR0+Ue^0D80lVC+xRV zLSW1?-e@#L@fxKJn%rT-HE+iBqyf_2;|`0j^=so0=i(^fXnwDHsH8FZPoj(0XK8sf=fS#8GKiryW?yO zU!x~B(_3KcVprwn^~++xnFth)VQYAi1SGEq`-%KS7Lau@9a#})$A2bWhOFd>_(Z-8Z01krq@{<%X(l^w_gA;JKgfO*lgRWDzRmQJ zOm-k^?*=buhq&{*v2!53%T_EOR3vA(GHFdReH|ndqYZUTwN`vMewEo58ma!0N;das zhGtS28t7x0!JtU3q@2kJ20*Hw%pRsw)cF)n;TYiTT9`<2#;FHkD$-kZ8)=T2!EnBR zJe?lxbAqMAibT7|*gwF^M^c6gMcOzvlLAg;D@bx%u`Q0zl=E%NhR_R`m$HArIxH2- zLXe)5Gb*}ETo{ab5t9i$w>UJ;4=8Wc#b=x5t$lZc!d2L?2GclRfs8#<*F}D2U?Orm zd(=fi)#AZ^%OzDAK!KOJ35KWJ>bl{UnnMX4TO}zD`1enW2iP+xE?~=_J5!az0xoXQ zx`Y3Fpi@Wx@T3OF4LXsjlgf5JL*@1(|UiuF5`<=$W2yPF%R_+U?>m&Y(jh=?p-r zCWaQN9y4)XC-5%CKO=S#x<|Se&c`@>?}Sr3BUHmyEGQlpD?FJTlgqA2H;Q|_C(c-s z8P3fXzjA!@}1~pSFiPjFRFW zEsvvb{*t;PEBEdy=?=KzKsY}m`|xY*3a1uMRhW#lRzEC=|CJy!>$)7#W=EOj zspd7oooWe!;>gK3pQeMRhzJGbbg#g^f5stA%UPBt51EjZ6~q3@x8yY%l|2+boX|*2 zQi^ts8>Qpnd`haNuI_OBTG29_a{8KAys(JLF%-!I%HCtF2;}2J!)2=rC&Djy@Dbw) z=ONi=5_uWt7HwZ4oDhAs3JS}P&0;Si4ddKiw=VA~JiWLWiou0t8Ce*zV=Xf5w&Us- z5?ovLfYPsg&vpjNp?p}}%_0M$30MlF^#T}lk}d>>fp|2x4$~zls+6DN+{m$E58s0(|;?|B@NJmf=a&)|a zb%Zm46aUq9Bti^J;W1N6D(T$Ro)R}w<0mfg2y^n|E9VOE;X25hEFJM7X~eAZr}XRv zNclYFiQ_0`{-qE`+Gegbo+>oZ>{4r1$&;(6LA>5FA~dItM2PTRo=psUmdDe~Eo69A z*VCV%yyR0R*p@aOP8*)!z;hSI|L=f}8J34ER%~!&+Wl`g{^@((#mbjJKiwAvRH`qDY29i6(+R7>Ug#R-SnmHCAqetGmg7*b?9=a(^ zFqVsQcXKWDEn4yexfaVJ(UNO%`KK;kso5@K7e7b1EJ4Jm6g*yoR#kM#(qIV?y)FTOlJp%2c0_9$A$mnqT)R*FOImF_ z$QA}a6Tb+Kscj9vu-z@nl9W49yrPP^^gIB7x4Wz8vhFxG9;ms-R zcC)dmg<0GBte2!e!2^igomVfx!tCO=&*olyJHPPlGXFlEs%=DYJJQBfV=padYWVZ0tN$_7A-|D*dI4<(fd6IVB@;CG$~4}V z5al~F>{MHsF%*@Fx2ZCN!DMl|SNrnC({Jgb{*rP_K?dR6pgsvv^cGoxz6TV|yP2$b zZD5gfg|-w77gKW^8n%K%NSliy;xYp*hjV&C!m-nA8+LD(oIjo(P-u+f;3w;u0arFk zK8~(GkF4r+lIqB6GL0k2u(Mf>jh*S*&W04V%H$x5rx`!xgVQUvel*VVN{4b2 zIy|bCn^3P6x9b`tvFUnBI6SUDGRdxumO5oMuJX3I&Hywk{Xc98sLCfOb)*t+^Rjv9 zB<^+@eq`!9_kc2Iz5qgZ1SJ;i#qri@xxN(}_5FuaXT)ibeflI1r5eMTn2qJV zu9I3#V^!f9QR@Y1|7~K8H(DA-g)&?lY)Dfr8b)=AxX;X;{IA-3re*+u2ip*79LT&Q zwsnO(P!h&Nu|TC?;3GpZ;c%Ljzoq$PGg$MJeVMA{(fA-Nu>tGe;%H5pF% zu$}*T$+-5${UfQKd`ek>PJ)s;onDj9?Z~6H*P5%4;k7Qw7EDj|cwOW>9gexP$wOk7 zS|oK3f8P^?R%k#Myg${@8Q}t5K9$;=K9bI1L|~W}21r!b$6w(OSi&Pid9TRwL`z80zP(Qc>hNyb&|C0^I-#-ZC<%)lekuJHG#t&Q{<^QYx z|AtMH^p)Tnu-kj~^X#k6-JU>*2|++-k7i$;Pagw?vj+v2TUk#R%> zzLB4xN)t=HA0(tXU?~TPPLOzxu45?Ok`ycJ4j5Bm+s)2z&+_}n5j$pQjFki1s_=Z7 zs!^^Y(lV;T!lZ-w3md@rfr~(SGxKLTM7$lfyh9}NcNKbJOR>aKyaI?pN2bAWk%Y-y zZYhaxN{VYO;JaNpgXK(mt8WIw-NBZ%h|9fMIVZy=o4x!=dW4w_)^e7aFja*gW&T-S z^wjh6W|T@4Gt@|rx+9ouPT4RGw8}ylYx2@T2Mj3_tZtjmsl4ARG;>0$G#N(kFfJ!MYz@aV!}q&-}l4*e&($xP8l3S3;C^Zmzu0zxl7Lfv2X8XV#69M z@iM4oj-prBK*?<+*G3jMiZ>!n0hcPgTUUeMD=~$a=Be|m+pxpegJC=wo&_l|`RMCM zFI;|dzIm1#!g{z|vN(;Kg*>kcbnA~~r~;bu;Q>1@7zcdv3Xt0&Sv-}><#gCrQWv92 zQobBFmMOtVnB*IhY-axDU$!CbmniQPIj85&U3*>MQf%pN>Hx)+|GV`MbmOtsKZv4D zUO{D6$K0rlX)ow1K-`=5vOx)}t`8bfKO~|k_nvFzCiUWicEVt(?IZ&o8W11mn)c>f zRF@geB5Zi4{Xi?7!cUT7Kf)KatJLVOTMz}HylrWmld6zg+|MmuS}4!^y0&MYc6StN zVqy>to}R-=+y@)?)-sqx#qS&|E_lbwQMW)$$oE2h3uQIeO+SEqqg?sc($Ye%rOAPkNn7fds_NL|I|r6=Jyz2f2or{9}oeRLwtAY2+Lw(~8x<$V`D z`;Gz30SngJ5jwH)W%tVcl$x6;Jl)SdemMUyjoordv2G3Y*aXzduf;zEa#~xIS`%wH zoqQyJk6ZD@unm>9Gxzu^wF50gl`u*|d9wt0qE!J1qbsf?d_mfMEyf!-DI!stYbzmL zKTdq5yXB!f3e?J3mR9eVjGwajv_jsCB$QntY1=Bp!-H9ufZwkjK_8>3>v{y2%HtMT zdi%mK59{^|KXn(;8la>fMtK8t8_*bb>lcjf-+k@y_xz8|?IP5XofYOGB?SLt%qYV9 zUoJCE$;1U;Usr!q>o8!Hr-_&ztM?nLFu zrT$Y?g(+DvQpu{dhiTH@cBu-SE6|l>d!MRGeE+sfRo&PA1XZ0-NU2l>NvbM$1a6u4 zU8-s=x>*(X*nC(jQIU+%P*q0n1+7C>$j=tEho}m}?W<(fMq(JIHnciBUVO9SRWi1| z?wd_6>{Iqvc>(VEW*-XA(8iS(f_K$DeM^ZVt9xH9o{K?_~jtKSw#&Pfk*%aN0-g7Q82vo^?&pV!uQ#o3(jgP8TCZ${M!T z7{J9GRhZvuzcmQ-13<||kka8XuWesWk0~-sLS!|<@xpTPYUfV6 z;N#?!5W6s9(dpkNvi1^jj~~%NVd0tX0qK(SZZZF?RIgHk!Sy#7^C#cvh`QDr)P#`H zuUDVD!pU6cKdb{4{qc9nk~_aQA1ETE507U2Z~2s8>Yqob%xbyn8$eG}72o<1U0WlN zECbgwQ81Uqr>=vtOPz=PH-q*5qa~`#tA;x%g}(9^fm7Q9;V#KIHx3qg62QKcsEjk= zPnE?$u~JGzySCHT*8YYruL<^Uu2H=cKM^@mX)){bYzSIdq#9gLok$d_ofXQ~NXpKd zN^WcB>cwzNtcAL+n_I*Et?mA1f9=t{3&X2-RLmcOMKkgIb>XlXNBd365A$`jOggLP zy+|SP7SvU4)C>V@b4HD4feQ1z2Q_Y`LL+ei0&J?n0=q;HliQvz;OzHzcDAT)=bm?J ztPvBUByo5T+nwhI3+{jKt@trfnpyZ|%m`@Uq$`2E_YF zr2nr@p>WuOCQktt`_9e^_aY&v*Mql+dl#F>ClIhg$@ez5TvKqrFNY&G80Us;UsvuC zn@^hrKTv_t^lMt_4# zhYEOat*)qcq3$-%&y(-!?ODA`lO;`_Rg;*f>R6f_%`#Z`Yj#9LzCElogJ&ZEP0kUu zm@1xIxo{4UlJ)_$EYTQ+8Ex)y(Rr}By*Jz!pkOxC`s5($r(g{wNus>&b%HwXaYK(j zA9RLMMWEe&|Hm$!;4q0f6*^|CuSO%<^QuZl4MZisulRcA2Ao>s-p=|ybvNG(-fMG3 zDEKhKxa};H=b$)T0An;^#JvQ9!C~+O^C3kDhY>a33iDap8Bq5H_7l8eVWGu-$`QF7 z9TR%@B|WhqR-L)*gDvKNbV>3el2F_7o!fo}Oi(%)?!Q@Kf7S@T;yciknS8tu8^cXo zr5sHD5g7&;!%;^BV9QTk$754ma=7}A(s=s;STRrf7$pMgtxSuUgxx7PU8XOV`hu2= zt`=vMuI%jgbE|UK7vN&fUoP_y&oQ4M=;Z^Lgpe6V)RqS4n(czC$nC6ba+`U(1vt3l zg8GMP@d3s}8Pt%Thhk4VJwWi5TmWwO-O5gXZ66|7+40HN=F?*&=;a{xbpgqPER71&K92}UmXtd9S9@<2_(SC$vSMO^L;{W_54Tzv{h?$ z=FKM@OAmJuc!8Sv?4I(eZ()RYeU0$!WjSH**IHf8TC2qm;IPxawLG0F02cWKhso53__Paa7>6gY3H~;IgFwJK5)dW1)Ue%%Uih{Zowo zfrDJFk8Rz!yvT)%CZu5IQL{2vvFC6&8P&@38Qt0_wW8&O7xW$4M1RNHS$|`D_<=Zu zyux&F%OP?09l>%vB5@2z&8Di*r zk>MXZI@2p7GRH{x5x6a+;%ibA*ANlb!f7Z6B{#slm%78t?9#=Wq>N@`o;A56w1QEK(Vxm^LSc3>>GeXz@{Eg@yme-WJghxu}H6 zax&73>~;H$olPh+hwM#_lnq3=iZA|tLs;0`6j?ixz5{0Yejj8cm!#c|CdtAn2TUm} z4w9rq32ios7I-Qpb#)=b9u~se!#7(y8&LF9xv-ggx-B&f1FXW6Q~9NvRAQntNaJGk zuEB=OPUK)H@w!{!vieY4CguqK)(!-hHVpmFatW7Q9-wdsazse0G-b~(2gbX{=86)5 z7A{Pg6jXfyF+~(+K<#v$Hl*-Q3R30`vpk`{(R$kyna{MA zS65eV90}ChNI@=`D#xZXt9+&fs)ecaH40YA6A!D4_R$aFsyx&{E3SXAm1Rpd`)~Ju z9;^-DRcsZ>Q6spfgb4RW_9R|+IIjpb9f|_7v-L9=$2lc56>-spk!&lgW|0V%aSZYX z9Q=l`@+#5l*1B2t8*#+K4(1E(r_<{ad)8F%Y}9q zY!ov8&W@C`5wio z#|ih;T}b(C8&WA00;IxOl9#D5vv=#kNtK7uVGDg}f1+%vfW79pi=rfmXb*f36thi1 z3f@l z|JXzI4=tAtmY?FTzK>$PW~GaO&Q{72IUE>!ARIEN$+N;hT+R`G5kV=-!pvSEt0b_X z1ZTsyo|TYQ-{9!_M8S$+nF{WkE^062|>SFwgpd(!Yz28;VP^7H<{aOG^_WC*-UF*IJw z!8R8y)^)KQGF3-gl;#+=B_4}K>r`~xjDzs5Wr^WUQ&a`-$^q=ST4UO&^SOY_*LYtn zN5T#ke0AZFt8%?44UOI2*4Q$+Ek}tfFtDdz5+9jFX${|l*@!3>vX8Rti^3qD6`s{m z9BhJs?MzITP02X{r?Q39sp@C;*M=Xqi!F?ME75U}xFEfNnfEZ!b4*#nPeP8$rJf+k z=w-Xe6ABDB^Mg?DrmMH~-?W``!?x|NO=dvPx`fsC`%*D5*w0wjt*(9)cUBTaW255A zb)_L8BFtY8v$nUtN%xe{XBVq=Ud4aSD*9K*!sjzBT)l19(t5j~u+6Zl%`A>O4^eq{ z|IMkFws%EIoIKYul0qy0hs>`u@E5DeTp}CbupQapZ^$!CHUmHJKh*Ga*X=x$wKz1A zdW@h_SuQNrU`!cCf=9tAxh5FF)6N(G=eLY^w{k(6k#9*m{`u zIL|a)ngw6z*Hu;XAN~z4P98&BcT1my4xgooCSL5{;eIA%8g@8F=y9EMe;BqDw@me9 zi_J#BiTJxtVGdCWb%-=W_uLn|SQ%o76O_!!x6(gD3YUvMfYPNGTy&SpY9tC3msT|Q z##RokvkkaVeO@uJLQ!V0>7kjFIZA*i znV$@N@G){vRvn~F@R4Hj)5^|Zf1OT!!9o`28x8rP?E_p*p=%`pSM0V;YM2~w^W=p6 z#;hAQ$A?N_HsD%;Il^JkTuCHh$}RI6k48Bu!a_CW;+nhdt;j>Eoj}Iafl?G2bcZJJfGAdk9)xn1trRDXv^O2Z0&8QMoIfpaSNKYN5rOY}KPs~MVIPn8YusY(aY0cNG0 zSz7cnVV&x{#d8CxCDO(gmzMNE7NV%pIK;~C{%~hy^+$Z7jzbY0_k&0k_K4r>%*$i* z?y!MZ+0TXfrxCffB*S%?Hgp>AxqpsI4k*!^L-mzHjvyf&|4RhWJC|u;9Hb@?^IjPa zS61I~P*jqL{qRF^PoY`dTHg;H_ZFA6`=uJe=G$#Kr6cakqU0-OCt#Y&)}iGRk|^}S z#x0+z|9Z8A-Gw;6SsEf)?s%_DAkEEBYH++*I39nGr4r_%x1wPz2rk*Jf3JUD?)#y~WoBll}g|)$Y}z zsmJYEPKoQ2qw`;Sdcl5l2f}o7E%yISyPtLsDrKy&Mpsy|rDtVN! zN3)UEy6@10*?bUAmpsy{2&iu=)M5$!F;o&=RKkl5>;P`t5~~Zu>yny_^ELoO)(xq( zNZ8ZOrQ40t5VYfNseH(5Vjn~pa9n@8r#M1;vUaMe1ACpcqFhbrjT~=z9&F4m)o@^4 zf3@R79gk*^Qfq6!$8yor46B$CdmH;(K4*%&z7s!rr3NYZ)a@IZC*tB!tMKd-R=Hcj^Z^eDxlwtTM9se7%&TkcNYyvHa}a zT;Lr7YpDy1NmBy1Rlf}(Q-MWkJ`+D_pXtL{s==w&d~7naEAqZt+`9?rT>_F?&pt=4 z)b0lyHSfJn=Rqu0fBV%f_g}sQmx(d#u)vd}ge)?jQEZydaawg;2M@TKZg{cm)}{YD z%%%Oj;(|w{30A2jGcv>;M9OZF%@MN88z%Tz2X)@-6t4XVc|d|t&b!z)#buxkin=Ri z>hhRSbWZnwag#-=r1ErN@J3rEYcfpO7qJZVXA&{UP)z6KQuWf?)VHf4@quztT5*LW zQhQ&EUPcagSDLI6aTz~rkkz;|$d1g@Ru72>!=O^CyJWh&4xdky-ziaiX=S+O(kSLl z13eeP#zV=Ag=KCl(#T%UJ|4mE#yHPmJt}uyM$=!x7d^dR?v#y5`=86`d$t zq#Ap)aKcsM9f&eG9-;Ii2PIkUPL%WW>MmY__4NKNM=A|duLx;IQKR^JugYW(h1$Yy z{FkN2puk3=bFd>a9TU@c4^ac3Nw)@oXC9m$-l%XSNuHW?V~h#<_RiK1>DE}T{y{GD z-&|Zo&7_E(2MaRCYmFp~H~1)h1R+5|ZuEfVnqbqsYp|_(R-Zm4T4Pg%b8>+^=LnFk zY%|;U6?kX?%gEDDJyfyFDW%bM9(_Ia^Pys)#i^gA6YY|cjwN4Y=Df8niy@}f>F9E1 m2D66-^oQ5qJV8~RJDE;@{l?LV|0*BFITSIO Home + \end{rawhtml}} +\oddsidemargin=0.00in +\evensidemargin=0.00in +\textwidth=6.5in +%\topmargin=0.0in +\textheight=8.75in +\parindent=0cm +\parskip=0.2cm +\begin{document} +\pagenumbering{roman} + +\begin{titlepage} +\normalsize +\vspace*{4.0cm} +\begin{center} +{\Huge \bf CFITSIO User's Reference Guide}\\ +\end{center} +\medskip +\medskip +\begin{center} +{\LARGE \bf An Interface to FITS Format Files}\\ +\end{center} +\begin{center} +{\LARGE \bf for C Programmers}\\ +\end{center} +\medskip +\medskip +\begin{center} +{\Large Version 3.0 \\} +\end{center} +\bigskip +\vskip 2.5cm +\begin{center} +{HEASARC\\ +Code 662\\ +Goddard Space Flight Center\\ +Greenbelt, MD 20771\\ +USA} +\end{center} + +\vfill +\bigskip +\begin{center} +{\Large March 2007\\} +\end{center} +\vfill +\end{titlepage} + +\clearpage + +\tableofcontents +\chapter{Introduction } +\pagenumbering{arabic} + + +\section{ A Brief Overview} + +CFITSIO is a machine-independent library of routines for reading and +writing data files in the FITS (Flexible Image Transport System) data +format. It can also read IRAF format image files and raw binary data +arrays by converting them on the fly into a virtual FITS format file. +This library is written in ANSI C and provides a powerful yet simple +interface for accessing FITS files which will run on most commonly used +computers and workstations. CFITSIO supports all the features +described in the official NOST definition of the FITS format and can +read and write all the currently defined types of extensions, including +ASCII tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. +The CFITSIO routines insulate the programmer from having to deal with +the complicated formatting details in the FITS file, however, it is +assumed that users have a general knowledge about the structure and +usage of FITS files. + +CFITSIO also contains a set of Fortran callable wrapper routines which +allow Fortran programs to call the CFITSIO routines. See the companion +``FITSIO User's Guide'' for the definition of the Fortran subroutine +calling sequences. These wrappers replace the older Fortran FITSIO +library which is no longer supported. + +The CFITSIO package was initially developed by the HEASARC (High Energy +Astrophysics Science Archive Research Center) at the NASA Goddard Space +Flight Center to convert various existing and newly acquired +astronomical data sets into FITS format and to further analyze data +already in FITS format. New features continue to be added to CFITSIO +in large part due to contributions of ideas or actual code from +users of the package. The Integral Science Data Center in Switzerland, +and the XMM/ESTEC project in The Netherlands made especially significant +contributions that resulted in many of the new features that appeared +in v2.0 of CFITSIO. + + +\section{Sources of FITS Software and Information} + +The latest version of the CFITSIO source code, +documentation, and example programs are available on the World-Wide +Web or via anonymous ftp from: + +\begin{verbatim} + http://heasarc.gsfc.nasa.gov/fitsio + ftp://legacy.gsfc.nasa.gov/software/fitsio/c +\end{verbatim} + +Any questions, bug reports, or suggested enhancements related to the CFITSIO +package should be sent to the primary author: + +\begin{verbatim} + Dr. William Pence Telephone: (301) 286-4599 + HEASARC, Code 662 E-mail: pence@tetra.gsfc.nasa.gov + NASA/Goddard Space Flight Center + Greenbelt, MD 20771, USA +\end{verbatim} +This User's Guide assumes that readers already have a general +understanding of the definition and structure of FITS format files. +Further information about FITS formats is available from the FITS Support +Office at {\tt http://fits.gsfc.nasa.gov}. In particular, the +'NOST FITS Standard' gives the authoritative definition of the FITS data +format, and the `FITS User's Guide' provides additional historical background +and practical advice on using FITS files. + +The HEASARC also provides a very sophisticated FITS file analysis +program called `Fv' which can be used to display and edit the contents +of any FITS file as well as construct new FITS files from scratch. The +display functions in Fv allow users to interactively adjust the +brightness and contrast of images, pan, zoom, and blink images, and +measure the positions and brightnesses of objects within images. FITS +tables can be displayed like a spread sheet, and then modified using +powerful calculator and sorting functions. Fv is freely available for +most Unix platforms, Mac PCs, and Windows PCs. +CFITSIO users may also be interested in the FTOOLS package of programs +that can be used to manipulate and analyze FITS format files. +Fv and FTOOLS are available from their respective Web sites at: + +\begin{verbatim} + http://fv.gsfc.nasa.gov + http://heasarc.gsfc.nasa.gov/ftools +\end{verbatim} + + +\section{Acknowledgements} + +The development of the many powerful features in CFITSIO was made +possible through collaborations with many people or organizations from +around the world. The following in particular have made especially +significant contributions: + +Programmers from the Integral Science Data Center, Switzerland (namely, +Jurek Borkowski, Bruce O'Neel, and Don Jennings), designed the concept +for the plug-in I/O drivers that was introduced with CFITSIO 2.0. The +use of `drivers' greatly simplified the low-level I/O, which in turn +made other new features in CFITSIO (e.g., support for compressed FITS +files and support for IRAF format image files) much easier to +implement. Jurek Borkowski wrote the Shared Memory driver, and Bruce +O'Neel wrote the drivers for accessing FITS files over the network +using the FTP, HTTP, and ROOT protocols. + +The ISDC also provided the template parsing routines (written by Jurek +Borkowski) and the hierarchical grouping routines (written by Don +Jennings). The ISDC DAL (Data Access Layer) routines are layered on +top of CFITSIO and make extensive use of these features. + +Giuliano Taffoni and Andrea Barisani, at INAF, University of Trieste, +Italy, implemented the I/O driver routines for accessing FITS files +on the computational grids using the gridftp protocol. + +Uwe Lammers (XMM/ESA/ESTEC, The Netherlands) designed the +high-performance lexical parsing algorithm that is used to do +on-the-fly filtering of FITS tables. This algorithm essentially +pre-compiles the user-supplied selection expression into a form that +can be rapidly evaluated for each row. Peter Wilson (RSTX, NASA/GSFC) +then wrote the parsing routines used by CFITSIO based on Lammers' +design, combined with other techniques such as the CFITSIO iterator +routine to further enhance the data processing throughput. This effort +also benefited from a much earlier lexical parsing routine that was +developed by Kent Blackburn (NASA/GSFC). More recently, Craig Markwardt +(NASA/GSFC) implemented additional functions (median, average, stddev) +and other enhancements to the lexical parser. + +The CFITSIO iterator function is loosely based on similar ideas +developed for the XMM Data Access Layer. + +Peter Wilson (RSTX, NASA/GSFC) wrote the complete set of +Fortran-callable wrappers for all the CFITSIO routines, which in turn +rely on the CFORTRAN macro developed by Burkhard Burow. + +The syntax used by CFITSIO for filtering or binning input FITS files is +based on ideas developed for the AXAF Science Center Data Model by +Jonathan McDowell, Antonella Fruscione, Aneta Siemiginowska and Bill +Joye. See http://heasarc.gsfc.nasa.gov/docs/journal/axaf7.html for +further description of the AXAF Data Model. + +The file decompression code were taken directly from the gzip (GNU zip) +program developed by Jean-loup Gailly and others. + +The new compressed image data format (where the image is tiled and +the compressed byte stream from each tile is stored in a binary table) +was implemented in collaboration with Richard White (STScI), Perry +Greenfield (STScI) and Doug Tody (NOAO). + +Doug Mink (SAO) provided the routines for converting IRAF format +images into FITS format. + +Martin Reinecke (Max Planck Institute, Garching)) provided the modifications to +cfortran.h that are necessary to support 64-bit integer values when calling +C routines from fortran programs. The cfortran.h macros were originally developed +by Burkhard Burow (CERN). + +In addition, many other people have made valuable contributions to the +development of CFITSIO. These include (with apologies to others that may +have inadvertently been omitted): + +Steve Allen, Carl Akerlof, Keith Arnaud, Morten Krabbe Barfoed, Kent +Blackburn, G Bodammer, Romke Bontekoe, Lucio Chiappetti, Keith Costorf, +Robin Corbet, John Davis, Richard Fink, Ning Gan, Emily Greene, Gretchen +Green, Joe Harrington, Cheng Ho, Phil Hodge, Jim Ingham, Yoshitaka +Ishisaki, Diab Jerius, Mark Levine, Todd Karakaskian, Edward King, +Scott Koch, Claire Larkin, Rob Managan, Eric Mandel, Richard Mathar, +John Mattox, Carsten Meyer, Emi Miyata, Stefan Mochnacki, Mike Noble, +Oliver Oberdorf, Clive Page, Arvind Parmar, Jeff Pedelty, Tim Pearson, +Philippe Prugniel, Maren Purves, Scott Randall, Chris Rogers, Arnold Rots, +Rob Seaman, Barry Schlesinger, Robin Stebbins, Andrew Szymkowiak, Allyn Tennant, +Peter Teuben, James Theiler, Doug Tody, Shiro Ueno, Steve Walton, Archie +Warnock, Alan Watson, Dan Whipple, Wim Wimmers, Peter Young, Jianjun Xu, +and Nelson Zarate. + + +\section{Legal Stuff} + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. +(However, see the restriction on the use of the gzip compression code, +below). + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +The file compress.c contains (slightly modified) source code that +originally came from gzip-1.2.4, copyright (C) 1992-1993 by Jean-loup +Gailly. This gzip code is distributed under the GNU General Public +License and thus requires that any software that uses the CFITSIO +library (which in turn uses the gzip code) must conform to the +provisions in the GNU General Public License. A copy of the GNU +license is included at the beginning of compress.c file. + +Similarly, the file wcsutil.c contains 2 slightly modified routines +from the Classic AIPS package that are also distributed under the GNU +General Public License. + +Alternate versions of the compress.c and wcsutil.c files (called +compress\_alternate.c and wcsutil\_alternate.c) are provided for users +who want to use the CFITSIO +library but are unwilling or unable to publicly release their software +under the terms of the GNU General Public License. These alternate +versions contains non-functional stubs for the file compression and +uncompression routines and the world coordinate transformation routines +used by CFITSIO. Replace the file `compress.c' +with `compress\_alternate.c' and 'wcsutil.c' with 'wcsutil\_alternate.c +before compiling the CFITSIO library. This +will produce a version of CFITSIO which does not support reading or +writing compressed FITS files, or doing image coordinate transformations, +but is otherwise identical to the standard version. + +\chapter{ Creating the CFITSIO Library } + + +\section{Building the Library} + +The CFITSIO code is contained in about 40 C source files (*.c) and header +files (*.h). On VAX/VMS systems 2 assembly-code files (vmsieeed.mar and +vmsieeer.mar) are also needed. + +CFITSIO has currently been tested on the following platforms: + +\begin{verbatim} + OPERATING SYSTEM COMPILER + Sun OS gcc and cc (3.0.1) + Sun Solaris gcc and cc + Silicon Graphics IRIX gcc and cc + Silicon Graphics IRIX64 MIPS + Dec Alpha OSF/1 gcc and cc + DECstation Ultrix gcc + Dec Alpha OpenVMS cc + DEC VAX/VMS gcc and cc + HP-UX gcc + IBM AIX gcc + Linux gcc + MkLinux DR3 + Windows 95/98/NT Borland C++ V4.5 + Windows 95/98/NT/ME/XP Microsoft/Compaq Visual C++ v5.0, v6.0 + Windows 95/98/NT Cygwin gcc + MacOS 7.1 or greater Metrowerks 10.+ + MacOS-X 10.1 or greater cc (gcc) +\end{verbatim} +CFITSIO will probably run on most other Unix platforms. Cray +supercomputers are currently not supported. + + +\subsection{Unix Systems} + +The CFITSIO library is built on Unix systems by typing: + +\begin{verbatim} + > ./configure [--prefix=/target/installation/path] + > make (or 'make shared') + > make install (this step is optional) +\end{verbatim} +at the operating system prompt. The configure command customizes the +Makefile for the particular system, then the `make' command compiles the +source files and builds the library. Type `./configure' and not simply +`configure' to ensure that the configure script in the current directory +is run and not some other system-wide configure script. The optional +'prefix' argument to configure gives the path to the directory where +the CFITSIO library and include files should be installed via the later +'make install' command. For example, + +\begin{verbatim} + > ./configure --prefix=/usr1/local +\end{verbatim} +will cause the 'make install' command to copy the CFITSIO libcfitsio file +to /usr1/local/lib and the necessary include files to /usr1/local/include +(assuming of course that the process has permission to write to these +directories). + +The 'make shared' option builds a shared or dynamic version of the +CFITSIO library. When using the shared library the executable code is +not copied into your program at link time and instead the program +locates the necessary library code at run time, normally through +LD\_LIBRARY\_PATH or some other method. The advantages of using a shared +library are: + +\begin{verbatim} + 1. Less disk space if you build more than 1 program + 2. Less memory if more than one copy of a program using the shared + library is running at the same time since the system is smart + enough to share copies of the shared library at run time. + 3. Possibly easier maintenance since a new version of the shared + library can be installed without relinking all the software + that uses it (as long as the subroutine names and calling + sequences remain unchanged). + 4. No run-time penalty. +\end{verbatim} +The disadvantages are: + +\begin{verbatim} + 1. More hassle at runtime. You have to either build the programs + specially or have LD_LIBRARY_PATH set right. + 2. There may be a slight start up penalty, depending on where you are + reading the shared library and the program from and if your CPU is + either really slow or really heavily loaded. +\end{verbatim} + +On Mac OS X platforms the 'make shared' command works like on other +UNIX platforms, but a .dylib file will be created instead of .so. If +installed in a nonstandard location, add its location to the +DYLD\_LIBRARY\_PATH environment variable so that the library can be found +at run time. + +On HP/UX systems, the environment variable CFLAGS should be set +to -Ae before running configure to enable "extended ANSI" features. + +By default, a set of Fortran-callable wrapper routines are +also built and included in the CFITSIO library. If these wrapper +routines are not needed (i.e., the CFITSIO library will not +be linked to any Fortran applications which call FITSIO subroutines) +then they may be omitted from the build by typing 'make all-nofitsio' +instead of simply typing 'make'. This will reduce the size +of the CFITSIO library slightly. + +It may not be possible to staticly link programs that use CFITSIO on +some platforms (namely, on Solaris 2.6) due to the network drivers +(which provide FTP and HTTP access to FITS files). It is possible to +make both a dynamic and a static version of the CFITSIO library, but +network file access will not be possible using the static version. + + +\subsection{VMS} + +On VAX/VMS and ALPHA/VMS systems the make\_gfloat.com command file may +be executed to build the cfitsio.olb object library using the default +G-floating point option for double variables. The make\_dfloat.com and +make\_ieee.com files may be used instead to build the library with the +other floating point options. Note that the getcwd function that is +used in the group.c module may require that programs using CFITSIO be +linked with the ALPHA\$LIBRARY:VAXCRTL.OLB library. See the example +link line in the next section of this document. + + +\subsection{Windows PCs} + +A precompiled DLL version of CFITSIO is available for IBM-PC users of +the Borland or Microsoft Visual C++ compilers in the files +cfitsiodll\_2xxx\_borland.zip and cfitsiodll\_2xxx\_vcc.zip, where +'2xxx' represents the current release number. These zip archives also +contains other files and instructions on how to use the CFITSIO DLL +library. + +The CFITSIO library may also be built from the source code using the +makefile.bc or makefile.vcc files. Finally, the makepc.bat file gives +an example of building CFITSIO with the Borland C++ v4.5 compiler +using older DOS commands. + + +\subsection{Macintosh PCs} + +When building on Mac OS-X, users should follow the Unix instructions, +above. + +The classic MacOS version (OS 9 or earlier) of the CFITSIO library can +be built by (1) un binhex and unstuff cfitsio\_mac.sit.hqx, (2) put +CFitsioPPC.mcp in the cfitsio directory, and (3) load CFitsioPPC.mcp +into CodeWarrior Pro 5 and make. This builds the CFITSIO library for +PPC. There are also targets for both the test program and the speed +test program. + +To use the MacOS port you can add Cfitsio PPC.lib to your CodeWarrior +Pro 5 project. Note that this only has been tested for the PPC and +probably won't work on 68k Macs. + + + +\section{Testing the Library} + +The CFITSIO library should be tested by building and running +the testprog.c program that is included with the release. +On Unix systems, type: + +\begin{verbatim} + % make testprog + % testprog > testprog.lis + % diff testprog.lis testprog.out + % cmp testprog.fit testprog.std +\end{verbatim} + On VMS systems, +(assuming cc is the name of the C compiler command), type: + +\begin{verbatim} + $ cc testprog.c + $ link testprog, cfitsio/lib, alpha$library:vaxcrtl/lib + $ run testprog +\end{verbatim} +The test program should produce a FITS file called `testprog.fit' +that is identical to the `testprog.std' FITS file included with this +release. The diagnostic messages (which were piped to the file +testprog.lis in the Unix example) should be identical to the listing +contained in the file testprog.out. The 'diff' and 'cmp' commands +shown above should not report any differences in the files. (There +may be some minor format differences, such as the presence or +absence of leading zeros, or 3 digit exponents in numbers, +which can be ignored). + +The Fortran wrappers in CFITSIO may be tested with the testf77 +program on Unix systems with: + +\begin{verbatim} + % f77 -o testf77 testf77.f -L. -lcfitsio -lnsl -lsocket + or + % f77 -f -o testf77 testf77.f -L. -lcfitsio (under SUN O/S) + or + % f77 -o testf77 testf77.f -Wl,-L. -lcfitsio -lm -lnsl -lsocket (HP/UX) + + % testf77 > testf77.lis + % diff testf77.lis testf77.out + % cmp testf77.fit testf77.std +\end{verbatim} +On machines running SUN O/S, Fortran programs must be compiled with the +'-f' option to force double precision variables to be aligned on 8-byte +boundarys to make the fortran-declared variables compatible with C. A +similar compiler option may be required on other platforms. Failing to +use this option may cause the program to crash on FITSIO routines that +read or write double precision variables. + +Also note that on some systems, the output listing of the testf77 +program may differ slightly from the testf77.std template, if leading +zeros are not printed by default before the decimal point when using F +format. + +A few other utility programs are included with CFITSIO; the first four +of this programs can be compiled an linked by typing `make +program\_name' where `program\_name' is the actual name of the program: + +\begin{verbatim} + speed - measures the maximum throughput (in MB per second) + for writing and reading FITS files with CFITSIO. + + listhead - lists all the header keywords in any FITS file + + fitscopy - copies any FITS file (especially useful in conjunction + with the CFITSIO's extended input filename syntax). + + cookbook - a sample program that performs common read and + write operations on a FITS file. + + iter_a, iter_b, iter_c - examples of the CFITSIO iterator routine +\end{verbatim} + + +\section{Linking Programs with CFITSIO} + +When linking applications software with the CFITSIO library, several +system libraries usually need to be specified on the link command +line. On Unix systems, the most reliable way to determine what +libraries are required is to type 'make testprog' and see what +libraries the configure script has added. The typical libraries that +need to be added are -lm (the math library) and -lnsl and -lsocket +(needed only for FTP and HTTP file access). These latter 2 libraries +are not needed on VMS and Windows platforms, because FTP file access is +not currently supported on those platforms. + +Note that when upgrading to a newer version of CFITSIO it is usually +necessary to recompile, as well as relink, the programs that use CFITSIO, +because the definitions in fitsio.h often change. + + +\section{Getting Started with CFITSIO} + +In order to effectively use the CFITSIO library it is recommended that +new users begin by reading the ``CFITSIO Quick Start Guide''. It +contains all the basic information needed to write programs that +perform most types of operations on FITS files. The set of example +FITS utility programs that are available from the CFITSIO web site are +also very useful for learning how to use CFITSIO. To learn even more +about the capabilities of the CFITSIO library the following steps are +recommended: + +1. Read the following short `FITS Primer' chapter for an overview of +the structure of FITS files. + +2. Review the Programming Guidelines in Chapter 4 to become familiar +with the conventions used by the CFITSIO interface. + +3. Refer to the cookbook.c, listhead.c, and fitscopy.c programs that +are included with this release for examples of routines that perform +various common FITS file operations. Type 'make program\_name' to +compile and link these programs on Unix systems. + +4. Write a simple program to read or write a FITS file using the Basic +Interface routines described in Chapter 5. + +5. Scan through the more specialized routines that are described in +the following chapters to become familiar with the functionality that +they provide. + + +\section{Example Program} + +The following listing shows an example of how to use the CFITSIO +routines in a C program. Refer to the cookbook.c program that is +included with the CFITSIO distribution for other example routines. + +This program creates a new FITS file, containing a FITS image. An +`EXPOSURE' keyword is written to the header, then the image data are +written to the FITS file before closing the FITS file. + +\begin{verbatim} +#include "fitsio.h" /* required by every program that uses CFITSIO */ +main() +{ + fitsfile *fptr; /* pointer to the FITS file; defined in fitsio.h */ + int status, ii, jj; + long fpixel = 1, naxis = 2, nelements, exposure; + long naxes[2] = { 300, 200 }; /* image is 300 pixels wide by 200 rows */ + short array[200][300]; + + status = 0; /* initialize status before calling fitsio routines */ + fits_create_file(&fptr, "testfile.fits", &status); /* create new file */ + + /* Create the primary array image (16-bit short integer pixels */ + fits_create_img(fptr, SHORT_IMG, naxis, naxes, &status); + + /* Write a keyword; must pass the ADDRESS of the value */ + exposure = 1500.; + fits_update_key(fptr, TLONG, "EXPOSURE", &exposure, + "Total Exposure Time", &status); + + /* Initialize the values in the image with a linear ramp function */ + for (jj = 0; jj < naxes[1]; jj++) + for (ii = 0; ii < naxes[0]; ii++) + array[jj][ii] = ii + jj; + + nelements = naxes[0] * naxes[1]; /* number of pixels to write */ + + /* Write the array of integers to the image */ + fits_write_img(fptr, TSHORT, fpixel, nelements, array[0], &status); + + fits_close_file(fptr, &status); /* close the file */ + + fits_report_error(stderr, status); /* print out any error messages */ + return( status ); +} +\end{verbatim} + +\chapter{ A FITS Primer } + +This section gives a brief overview of the structure of FITS files. +Users should refer to the documentation available from the NOST, as +described in the introduction, for more detailed information on FITS +formats. + +FITS was first developed in the late 1970's as a standard data +interchange format between various astronomical observatories. Since +then FITS has become the standard data format supported by most +astronomical data analysis software packages. + +A FITS file consists of one or more Header + Data Units (HDUs), where +the first HDU is called the `Primary HDU', or `Primary Array'. The +primary array contains an N-dimensional array of pixels, such as a 1-D +spectrum, a 2-D image, or a 3-D data cube. Five different primary +data types are supported: Unsigned 8-bit bytes, 16 and 32-bit signed +integers, and 32 and 64-bit floating point reals. FITS also has a +convention for storing 16 and 32-bit unsigned integers (see the later +section entitled `Unsigned Integers' for more details). The primary HDU +may also consist of only a header with a null array containing no +data pixels. + +Any number of additional HDUs may follow the primary array; these +additional HDUs are called FITS `extensions'. There are currently 3 +types of extensions defined by the FITS standard: + +\begin{itemize} +\item + Image Extension - a N-dimensional array of pixels, like in a primary array +\item + ASCII Table Extension - rows and columns of data in ASCII character format +\item + Binary Table Extension - rows and columns of data in binary representation +\end{itemize} + +In each case the HDU consists of an ASCII Header Unit followed by an optional +Data Unit. For historical reasons, each Header or Data unit must be an +exact multiple of 2880 8-bit bytes long. Any unused space is padded +with fill characters (ASCII blanks or zeros). + +Each Header Unit consists of any number of 80-character keyword records +or `card images' which have the +general form: + +\begin{verbatim} + KEYNAME = value / comment string + NULLKEY = / comment: This keyword has no value +\end{verbatim} +The keyword names may be up to 8 characters long and can only contain +uppercase letters, the digits 0-9, the hyphen, and the underscore +character. The keyword name is (usually) followed by an equals sign and +a space character (= ) in columns 9 - 10 of the record, followed by the +value of the keyword which may be either an integer, a floating point +number, a character string (enclosed in single quotes), or a boolean +value (the letter T or F). A keyword may also have a null or undefined +value if there is no specified value string, as in the second example, above + +The last keyword in the header is always the `END' keyword which has no +value or comment fields. There are many rules governing the exact +format of a keyword record (see the NOST FITS Standard) so it is better +to rely on standard interface software like CFITSIO to correctly +construct or to parse the keyword records rather than try to deal +directly with the raw FITS formats. + +Each Header Unit begins with a series of required keywords which depend +on the type of HDU. These required keywords specify the size and +format of the following Data Unit. The header may contain other +optional keywords to describe other aspects of the data, such as the +units or scaling values. Other COMMENT or HISTORY keywords are also +frequently added to further document the data file. + +The optional Data Unit immediately follows the last 2880-byte block in +the Header Unit. Some HDUs do not have a Data Unit and only consist of +the Header Unit. + +If there is more than one HDU in the FITS file, then the Header Unit of +the next HDU immediately follows the last 2880-byte block of the +previous Data Unit (or Header Unit if there is no Data Unit). + +The main required keywords in FITS primary arrays or image extensions are: +\begin{itemize} +\item +BITPIX -- defines the data type of the array: 8, 16, 32, -32, -64 for +unsigned 8--bit byte, 16--bit signed integer, 32--bit signed integer, +32--bit IEEE floating point, and 64--bit IEEE double precision floating +point, respectively. +\item +NAXIS -- the number of dimensions in the array, usually 0, 1, 2, 3, or 4. +\item +NAXISn -- (n ranges from 1 to NAXIS) defines the size of each dimension. +\end{itemize} + +FITS tables start with the keyword XTENSION = `TABLE' (for ASCII +tables) or XTENSION = `BINTABLE' (for binary tables) and have the +following main keywords: +\begin{itemize} +\item +TFIELDS -- number of fields or columns in the table +\item +NAXIS2 -- number of rows in the table +\item +TTYPEn -- for each column (n ranges from 1 to TFIELDS) gives the +name of the column +\item +TFORMn -- the data type of the column +\item +TUNITn -- the physical units of the column (optional) +\end{itemize} + +Users should refer to the FITS Support Office at {\tt http://fits.gsfc.nasa.gov} +for futher information about the FITS format and related software +packages. + + +\chapter{ Programming Guidelines } + + +\section{CFITSIO Definitions} + +Any program that uses the CFITSIO interface must include the fitsio.h +header file with the statement + +\begin{verbatim} + #include "fitsio.h" +\end{verbatim} +This header file contains the prototypes for all the CFITSIO user +interface routines as well as the definitions of various constants used +in the interface. It also defines a C structure of type `fitsfile' +that is used by CFITSIO to store the relevant parameters that define +the format of a particular FITS file. Application programs must define +a pointer to this structure for each FITS file that is to be opened. +This structure is initialized (i.e., memory is allocated for the +structure) when the FITS file is first opened or created with the +fits\_open\_file or fits\_create\_file routines. This fitsfile pointer +is then passed as the first argument to every other CFITSIO routine +that operates on the FITS file. Application programs must not directly +read or write elements in this fitsfile structure because the +definition of the structure may change in future versions of CFITSIO. + +A number of symbolic constants are also defined in fitsio.h for the +convenience of application programmers. Use of these symbolic +constants rather than the actual numeric value will help to make the +source code more readable and easier for others to understand. + +\begin{verbatim} +String Lengths, for use when allocating character arrays: + + #define FLEN_FILENAME 1025 /* max length of a filename */ + #define FLEN_KEYWORD 72 /* max length of a keyword */ + #define FLEN_CARD 81 /* max length of a FITS header card */ + #define FLEN_VALUE 71 /* max length of a keyword value string */ + #define FLEN_COMMENT 73 /* max length of a keyword comment string */ + #define FLEN_ERRMSG 81 /* max length of a CFITSIO error message */ + #define FLEN_STATUS 31 /* max length of a CFITSIO status text string */ + + Note that FLEN_KEYWORD is longer than the nominal 8-character keyword + name length because the HIERARCH convention supports longer keyword names. + +Access modes when opening a FITS file: + + #define READONLY 0 + #define READWRITE 1 + +BITPIX data type code values for FITS images: + + #define BYTE_IMG 8 /* 8-bit unsigned integers */ + #define SHORT_IMG 16 /* 16-bit signed integers */ + #define LONG_IMG 32 /* 32-bit signed integers */ + #define FLOAT_IMG -32 /* 32-bit single precision floating point */ + #define DOUBLE_IMG -64 /* 64-bit double precision floating point */ + + The following 4 data type codes are also supported by CFITSIO: + #define LONGLONG_IMG 64 /* 64-bit long signed integers */ + #define SBYTE_IMG 10 /* 8-bit signed integers, equivalent to */ + /* BITPIX = 8, BSCALE = 1, BZERO = -128 */ + #define USHORT_IMG 20 /* 16-bit unsigned integers, equivalent to */ + /* BITPIX = 16, BSCALE = 1, BZERO = 32768 */ + #define ULONG_IMG 40 /* 32-bit unsigned integers, equivalent to */ + /* BITPIX = 32, BSCALE = 1, BZERO = 2147483648 */ + +Codes for the data type of binary table columns and/or for the +data type of variables when reading or writing keywords or data: + + DATATYPE TFORM CODE + #define TBIT 1 /* 'X' */ + #define TBYTE 11 /* 8-bit unsigned byte, 'B' */ + #define TLOGICAL 14 /* logicals (int for keywords */ + /* and char for table cols 'L' */ + #define TSTRING 16 /* ASCII string, 'A' */ + #define TSHORT 21 /* signed short, 'I' */ + #define TLONG 41 /* signed long, */ + #define TFLOAT 42 /* single precision float, 'E' */ + #define TDOUBLE 82 /* double precision float, 'D' */ + #define TCOMPLEX 83 /* complex (pair of floats) 'C' */ + #define TDBLCOMPLEX 163 /* double complex (2 doubles) 'M' */ + + The following data type codes are also supported by CFITSIO: + #define TINT 31 /* int */ + #define TSBYTE 12 /* 8-bit signed byte, 'S' */ + #define TUINT 30 /* unsigned int 'V' */ + #define TUSHORT 20 /* unsigned short 'U' */ + #define TULONG 40 /* unsigned long */ + #define TLONGLONG 81 /* 64-bit long signed integer 'K' */ + + The following data type code is only for use with fits\_get\_coltype + #define TINT32BIT 41 /* signed 32-bit int, 'J' */ + + +HDU type code values (value returned when moving to new HDU): + + #define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */ + #define ASCII_TBL 1 /* ASCII table HDU */ + #define BINARY_TBL 2 /* Binary table HDU */ + #define ANY_HDU -1 /* matches any type of HDU */ + +Column name and string matching case-sensitivity: + + #define CASESEN 1 /* do case-sensitive string match */ + #define CASEINSEN 0 /* do case-insensitive string match */ + +Logical states (if TRUE and FALSE are not already defined): + + #define TRUE 1 + #define FALSE 0 + +Values to represent undefined floating point numbers: + + #define FLOATNULLVALUE -9.11912E-36F + #define DOUBLENULLVALUE -9.1191291391491E-36 + +Image compression algorithm definitions + + #define RICE_1 11 + #define GZIP_1 21 + #define PLIO_1 31 + #define HCOMPRESS_1 41 +\end{verbatim} + + +\section{Current Header Data Unit (CHDU)} + +The concept of the Current Header and Data Unit, or CHDU, is +fundamental to the use of the CFITSIO library. A simple FITS image may +only contain a single Header and Data unit (HDU), but in general FITS +files can contain multiple Header Data Units (also known as +`extensions'), concatenated one after the other in the file. The user +can specify which HDU should be initially opened at run time by giving +the HDU name or number after the root file name. For example, +'myfile.fits[4]' opens the 5th HDU in the file (note that the numbering +starts with 0), and 'myfile.fits[EVENTS] opens the HDU with the name +'EVENTS' (as defined by the EXTNAME or HDUNAME keywords). If no HDU is +specified then CFITSIO opens the first HDU (the primary array) by +default. The CFITSIO routines which read and write data only operate +within the opened HDU, Other CFITSIO routines are provided to move to +and open any other existing HDU within the FITS file or to append or +insert new HDUs in the FITS file. + + +\section{Function Names and Variable Datatypes} + +Most of the CFITSIO routines have both a short name as well as a +longer descriptive name. The short name is only 5 or 6 characters long +and is similar to the subroutine name in the Fortran-77 version of +FITSIO. The longer name is more descriptive and it is recommended that +it be used instead of the short name to more clearly document the +source code. + +Many of the CFITSIO routines come in families which differ only in the +data type of the associated parameter(s). The data type of these +routines is indicated by the suffix of the routine name. The short +routine names have a 1 or 2 character suffix (e.g., 'j' in 'ffpkyj') +while the long routine names have a 4 character or longer suffix +as shown in the following table: + +\begin{verbatim} + Long Short Data + Names Names Type + ----- ----- ---- + _bit x bit + _byt b unsigned byte + _sbyt sb signed byte + _sht i short integer + _lng j long integer + _lnglng jj 8-byte LONGLONG integer (see note below) + _usht ui unsigned short integer + _ulng uj unsigned long integer + _uint uk unsigned int integer + _int k int integer + _flt e real exponential floating point (float) + _fixflt f real fixed-decimal format floating point (float) + _dbl d double precision real floating-point (double) + _fixdbl g double precision fixed-format floating point (double) + _cmp c complex reals (pairs of float values) + _fixcmp fc complex reals, fixed-format floating point + _dblcmp m double precision complex (pairs of double values) + _fixdblcmp fm double precision complex, fixed-format floating point + _log l logical (int) + _str s character string +\end{verbatim} + +The logical data type corresponds to `int' for logical keyword values, +and `byte' for logical binary table columns. In other words, the value +when writing a logical keyword must be stored in an `int' variable, and +must be stored in a `char' array when reading or writing to `L' columns +in a binary table. Inplicit data type conversion is not supported for +logical table columns, but is for keywords, so a logical keyword may be +read and cast to any numerical data type; a returned value = 0 +indicates false, and any other value = true. + +The `int' data type may be 2 bytes long on some old PC compilers, +but otherwise it is nearly always 4 bytes long. Some 64-bit +machines, like the Alpha/OSF, define the `short', `int', +and `long' integer data types to be 2, 4, and 8 bytes long, +respectively. The FITS standard only officially supports 2 and 4 byte integer +data types, however CFITSIO also supports an experimental 8-byte +integer datatype for FITS images (BITPIX = 64) and FITS table columns +(TFORMn = 'K'). + +Because there is no universal C compiler standard for the name of the +8-byte integer datatype, the fitsio.h include file typedef's +'LONGLONG' to be equivalent to an +appropriate 8-byte integer data type on each supported platform. +For maximum software portability it is recommended that +this LONGLONG datatype be used to define 8-byte integer variables +rather than using the native data type name on a particular +platform. On most +32-bit Unix and Mac OS-X operating systems LONGLONG is equivalent to the +intrinsic 'long long' 8-byte integer datatype. On 64-bit systems (which currently +includes Alpha OSF/1, 64-bit Sun Solaris, 64-bit SGI MIPS, and 64-bit +Itanium and Opteron PC systems), LONGLONG is simply typedef'ed to be +equivalent to 'long'. Microsoft Visual C++ Version 6.0 does not define +a 'long long' data type, so LONGLONG is typedef'ed to be equivalent to +the '\_\_int64' data type on 32-bit windows systems when using Visual C++. + +A related issue that affects the portability of software is how to print +out the value of a 'LONGLONG' variable with printf. Developers may +find it convenient to use the following preprocessing statements +in their C programs to handle this in a machine-portable manner: + + +\begin{verbatim} +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + printf("%I64d", longlongvalue); + +#elif (USE_LL_SUFFIX == 1) + printf("%lld", longlongvalue); + +#else + printf("%ld", longlongvalue); +#endif +\end{verbatim} + +Similarly, the name of the C utility routine that converts a character +string of digits into a 8-byte integer value is platform dependent: + + +\begin{verbatim} +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + /* VC++ 6.0 does not seem to have an 8-byte conversion routine */ + +#elif (USE_LL_SUFFIX == 1) + longlongvalue = atoll(*string); + +#else + longlongvalue = atol(*string); +#endif +\end{verbatim} + +When dealing with the FITS byte data type it is important to remember +that the raw values (before any scaling by the BSCALE and BZERO, or +TSCALn and TZEROn keyword values) in byte arrays (BITPIX = 8) or byte +columns (TFORMn = 'B') are interpreted as unsigned bytes with values +ranging from 0 to 255. Some C compilers define a 'char' variable as +signed, so it is important to explicitly declare a numeric char +variable as 'unsigned char' to avoid any ambiguity + +One feature of the CFITSIO routines is that they can operate on a `X' +(bit) column in a binary table as though it were a `B' (byte) column. +For example a `11X' data type column can be interpreted the same as a +`2B' column (i.e., 2 unsigned 8-bit bytes). In some instances, it can +be more efficient to read and write whole bytes at a time, rather than +reading or writing each individual bit. + +The complex and double precision complex data types are not directly +supported in ANSI C so these data types should be interpreted as pairs +of float or double values, respectively, where the first value in each +pair is the real part, and the second is the imaginary part. + + +\section{Support for Unsigned Integers and Signed Bytes} + +Although FITS does not directly support unsigned integers as one of its +fundamental data types, FITS can still be used to efficiently store +unsigned integer data values in images and binary tables. The +convention used in FITS files is to store the unsigned integers as +signed integers with an associated offset (specified by the BZERO or +TZEROn keyword). For example, to store unsigned 16-bit integer values +in a FITS image the image would be defined as a signed 16-bit integer +(with BITPIX keyword = SHORT\_IMG = 16) with the keywords BSCALE = 1.0 +and BZERO = 32768. Thus the unsigned values of 0, 32768, and 65535, +for example, are physically stored in the FITS image as -32768, 0, and +32767, respectively; CFITSIO automatically adds the BZERO offset to +these values when they are read. Similarly, in the case of unsigned +32-bit integers the BITPIX keyword would be equal to LONG\_IMG = 32 and +BZERO would be equal to 2147483648 (i.e. 2 raised to the 31st power). + +The CFITSIO interface routines will efficiently and transparently apply +the appropriate offset in these cases so in general application +programs do not need to be concerned with how the unsigned values are +actually stored in the FITS file. As a convenience for users, CFITSIO +has several predefined constants for the value of BITPIX (USHORT\_IMG, +ULONG\_IMG) and for the TFORMn value in the case of binary tables (`U' +and `V') which programmers can use when creating FITS files containing +unsigned integer values. The following code fragment illustrates how +to write a FITS 1-D primary array of unsigned 16-bit integers: + +\begin{verbatim} + unsigned short uarray[100]; + int naxis, status; + long naxes[10], group, firstelem, nelements; + ... + status = 0; + naxis = 1; + naxes[0] = 100; + fits_create_img(fptr, USHORT_IMG, naxis, naxes, &status); + + firstelem = 1; + nelements = 100; + fits_write_img(fptr, TUSHORT, firstelem, nelements, + uarray, &status); + ... +\end{verbatim} +In the above example, the 2nd parameter in fits\_create\_img tells +CFITSIO to write the header keywords appropriate for an array of 16-bit +unsigned integers (i.e., BITPIX = 16 and BZERO = 32768). Then the +fits\_write\_img routine writes the array of unsigned short integers +(uarray) into the primary array of the FITS file. Similarly, a 32-bit +unsigned integer image may be created by setting the second parameter +in fits\_create\_img equal to `ULONG\_IMG' and by calling the +fits\_write\_img routine with the second parameter = TULONG to write +the array of unsigned long image pixel values. + +An analogous set of routines are available for reading or writing unsigned +integer values and signed byte values in a FITS binary table extension. +When specifying the TFORMn keyword value which defines the format of a +column, CFITSIO recognized 3 additional data type codes besides those +already defined in the FITS standard: `U' meaning a 16-bit unsigned +integer column, `V' for a 32-bit unsigned integer column, and 'S' +for a signed byte column. These non-standard data type codes are not +actually written into the FITS file but instead are just used internally +within CFITSIO. The following code fragment illustrates how to use +these features: + +\begin{verbatim} + unsigned short uarray[100]; + unsigned int varray[100]; + + int colnum, tfields, status; + long nrows, firstrow, firstelem, nelements, pcount; + + char extname[] = "Test_table"; /* extension name */ + + /* define the name, data type, and physical units for the 2 columns */ + char *ttype[] = { "Col_1", "Col_2", "Col_3" }; + char *tform[] = { "1U", "1V", "1S"}; /* special CFITSIO codes */ + char *tunit[] = { " ", " ", " " }; + ... + + /* write the header keywords */ + status = 0; + nrows = 1; + tfields = 3 + pcount = 0; + fits_create_tbl(fptr, BINARY_TBL, nrows, tfields, ttype, tform, + tunit, extname, &status); + + /* write the unsigned shorts to the 1st column */ + colnum = 1; + firstrow = 1; + firstelem = 1; + nelements = 100; + fits_write_col(fptr, TUSHORT, colnum, firstrow, firstelem, + nelements, uarray, &status); + + /* now write the unsigned longs to the 2nd column */ + colnum = 2; + fits_write_col(fptr, TUINT, colnum, firstrow, firstelem, + nelements, varray, &status); + ... +\end{verbatim} +Note that the non-standard TFORM values for the 3 columns, `U' and `V', +tell CFITSIO to write the keywords appropriate for unsigned 16-bit and +unsigned 32-bit integers, respectively (i.e., TFORMn = '1I' and TZEROn += 32678 for unsigned 16-bit integers, and TFORMn = '1J' and TZEROn = +2147483648 for unsigned 32-bit integers). The 'S' TFORMn value tells +CFITSIO to write the keywords appropriate for a signed 8-bit byte column +with TFORMn = '1B' and TZEROn = -128. The calls to fits\_write\_col +then write the arrays of unsigned integer values to the columns. + + +\section{Dealing with Character Strings} + +The character string values in a FITS header or in an ASCII column in a +FITS table extension are generally padded out with non-significant +space characters (ASCII 32) to fill up the header record or the column +width. When reading a FITS string value, the CFITSIO routines will +strip off these non-significant trailing spaces and will return a +null-terminated string value containing only the significant +characters. Leading spaces in a FITS string are considered +significant. If the string contains all blanks, then CFITSIO will +return a single blank character, i.e, the first blank is considered to +be significant, since it distinguishes the string from a null or +undefined string, but the remaining trailing spaces are not +significant. + +Similarly, when writing string values to a FITS file the +CFITSIO routines expect to get a null-terminated string as input; +CFITSIO will pad the string with blanks if necessary when writing it +to the FITS file. + +When calling CFITSIO routines that return a character string it is +vital that the size of the char array be large enough to hold the +entire string of characters, otherwise CFITSIO will overwrite whatever +memory locations follow the char array, possibly causing the program to +execute incorrectly. This type of error can be difficult to debug, so +programmers should always ensure that the char arrays are allocated +enough space to hold the longest possible string, {\bf including} the +terminating NULL character. The fitsio.h file contains the following +defined constants which programmers are strongly encouraged to use +whenever they are allocating space for char arrays: + +\begin{verbatim} +#define FLEN_FILENAME 1025 /* max length of a filename */ +#define FLEN_KEYWORD 72 /* max length of a keyword */ +#define FLEN_CARD 81 /* length of a FITS header card */ +#define FLEN_VALUE 71 /* max length of a keyword value string */ +#define FLEN_COMMENT 73 /* max length of a keyword comment string */ +#define FLEN_ERRMSG 81 /* max length of a CFITSIO error message */ +#define FLEN_STATUS 31 /* max length of a CFITSIO status text string */ +\end{verbatim} +For example, when declaring a char array to hold the value string +of FITS keyword, use the following statement: + +\begin{verbatim} + char value[FLEN_VALUE]; +\end{verbatim} +Note that FLEN\_KEYWORD is longer than needed for the nominal 8-character +keyword name because the HIERARCH convention supports longer keyword names. + + +\section{Implicit Data Type Conversion} + +The CFITSIO routines that read and write numerical data can perform +implicit data type conversion. This means that the data type of the +variable or array in the program does not need to be the same as the +data type of the value in the FITS file. Data type conversion is +supported for numerical and string data types (if the string contains a +valid number enclosed in quotes) when reading a FITS header keyword +value and for numeric values when reading or writing values in the +primary array or a table column. CFITSIO returns status = +NUM\_OVERFLOW if the converted data value exceeds the range of the +output data type. Implicit data type conversion is not supported +within binary tables for string, logical, complex, or double complex +data types. + +In addition, any table column may be read as if it contained string values. +In the case of numeric columns the returned string will be formatted +using the TDISPn display format if it exists. + + +\section{Data Scaling} + +When reading numerical data values in the primary array or a +table column, the values will be scaled automatically by the BSCALE and +BZERO (or TSCALn and TZEROn) header values if they are +present in the header. The scaled data that is returned to the reading +program will have + +\begin{verbatim} + output value = (FITS value) * BSCALE + BZERO +\end{verbatim} +(a corresponding formula using TSCALn and TZEROn is used when reading +from table columns). In the case of integer output values the floating +point scaled value is truncated to an integer (not rounded to the +nearest integer). The fits\_set\_bscale and fits\_set\_tscale routines +(described in the `Advanced' chapter) may be used to override the +scaling parameters defined in the header (e.g., to turn off the scaling +so that the program can read the raw unscaled values from the FITS +file). + +When writing numerical data to the primary array or to a table column +the data values will generally be automatically inversely scaled by the +value of the BSCALE and BZERO (or TSCALn and TZEROn) keyword values if +they they exist in the header. These keywords must have been written +to the header before any data is written for them to have any immediate +effect. One may also use the fits\_set\_bscale and fits\_set\_tscale +routines to define or override the scaling keywords in the header +(e.g., to turn off the scaling so that the program can write the raw +unscaled values into the FITS file). If scaling is performed, the +inverse scaled output value that is written into the FITS file will +have + +\begin{verbatim} + FITS value = ((input value) - BZERO) / BSCALE +\end{verbatim} +(a corresponding formula using TSCALn and TZEROn is used when +writing to table columns). Rounding to the nearest integer, rather +than truncation, is performed when writing integer data types to the +FITS file. + + +\section{Support for IEEE Special Values} + +The ANSI/IEEE-754 floating-point number standard defines certain +special values that are used to represent such quantities as +Not-a-Number (NaN), denormalized, underflow, overflow, and infinity. +(See the Appendix in the NOST FITS standard or the NOST FITS User's +Guide for a list of these values). The CFITSIO routines that read +floating point data in FITS files recognize these IEEE special values +and by default interpret the overflow and infinity values as being +equivalent to a NaN, and convert the underflow and denormalized values +into zeros. In some cases programmers may want access to the raw IEEE +values, without any modification by CFITSIO. This can be done by +calling the fits\_read\_img or fits\_read\_col routines while +specifying 0.0 as the value of the NULLVAL parameter. This will force +CFITSIO to simply pass the IEEE values through to the application +program without any modification. This is not fully supported on +VAX/VMS machines, however, where there is no easy way to bypass the +default interpretation of the IEEE special values. + + +\section{Error Status Values and the Error Message Stack} + +Nearly all the CFITSIO routines return an error status value +in 2 ways: as the value of the last parameter in the function call, +and as the returned value of the function itself. This provides +some flexibility in the way programmers can test if an error +occurred, as illustrated in the following 2 code fragments: + +\begin{verbatim} + if ( fits_write_record(fptr, card, &status) ) + printf(" Error occurred while writing keyword."); + +or, + + fits_write_record(fptr, card, &status); + if ( status ) + printf(" Error occurred while writing keyword."); +\end{verbatim} +A listing of all the CFITSIO status code values is given at the end of +this document. Programmers are encouraged to use the symbolic +mnemonics (defined in fitsio.h) rather than the actual integer status +values to improve the readability of their code. + +The CFITSIO library uses an `inherited status' convention for the +status parameter which means that if a routine is called with a +positive input value of the status parameter as input, then the routine +will exit immediately without changing the value of the status +parameter. Thus, if one passes the status value returned from each +CFITSIO routine as input to the next CFITSIO routine, then whenever an +error is detected all further CFITSIO processing will cease. This +convention can simplify the error checking in application programs +because it is not necessary to check the value of the status parameter +after every single CFITSIO routine call. If a program contains a +sequence of several CFITSIO calls, one can just check the status value +after the last call. Since the returned status values are generally +distinctive, it should be possible to determine which routine +originally returned the error status. + +CFITSIO also maintains an internal stack of error messages +(80-character maximum length) which in many cases provide a more +detailed explanation of the cause of the error than is provided by the +error status number alone. It is recommended that the error message +stack be printed out whenever a program detects a CFITSIO error. The +function fits\_report\_error will print out the entire error message +stack, or alternatively one may call fits\_read\_errmsg to get the +error messages one at a time. + + +\section{Variable-Length Arrays in Binary Tables} + +CFITSIO provides easy-to-use support for reading and writing data in +variable length fields of a binary table. The variable length columns +have TFORMn keyword values of the form `1Pt(len)' where `t' is the +data type code (e.g., I, J, E, D, etc.) and `len' is an integer +specifying the maximum length of the vector in the table. (CFITSIO also +supports the experimental 'Q' datatype, which is identical to the 'P' type +except that is supports is a 64-bit address space and hence much larger +data structures). If the value +of `len' is not specified when the table is created (e.g., if the TFORM +keyword value is simply specified as '1PE' instead of '1PE(400) ), then +CFITSIO will automatically scan the table when it is closed to +determine the maximum length of the vector and will append this value +to the TFORMn value. + +The same routines that read and write data in an ordinary fixed length +binary table extension are also used for variable length fields, +however, the routine parameters take on a slightly different +interpretation as described below. + +All the data in a variable length field is written into an area called +the `heap' which follows the main fixed-length FITS binary table. The +size of the heap, in bytes, is specified by the PCOUNT keyword in the +FITS header. When creating a new binary table, the initial value of +PCOUNT should usually be set to zero. CFITSIO will recompute the size +of the heap as the data is written and will automatically update the +PCOUNT keyword value when the table is closed. When writing variable +length data to a table, CFITSIO will automatically extend the size +of the heap area if necessary, so that any following HDUs do not +get overwritten. + +By default the heap data area starts immediately after the last row of +the fixed-length table. This default starting location may be +overridden by the THEAP keyword, but this is not recommended. +If additional rows of data are added to the table, CFITSIO will +automatically shift the the heap down to make room for the new +rows, but it is obviously be more efficient to initially +create the table with the necessary number of blank rows, so that +the heap does not needed to be constantly moved. + +When writing row of data to a variable length field the entire array of values for +a given row of the table must be written with a single call to +fits\_write\_col. +The total length of the array is given by nelements ++ firstelem - 1. Additional elements cannot be appended to an existing +vector at a later time since any attempt to do so will simply overwrite +all the previously written data and the new data will be +written to a new area of the heap. The fits\_compress\_heap routine +is provided to compress the heap and recover any unused space. +To avoid having to deal with this issue, it is recommended +that rows in a variable length field should only be written once. +An exception to +this general rule occurs when setting elements of an array as +undefined. It is allowed to first write a dummy value into the array with +fits\_write\_col, and then call fits\_write\_col\_nul to flag the +desired elements as undefined. Note that the rows of a table, +whether fixed or variable length, do not have to be written +consecutively and may be written in any order. + +When writing to a variable length ASCII character field (e.g., TFORM = +'1PA') only a single character string can be written. The `firstelem' +and `nelements' parameter values in the fits\_write\_col routine are +ignored and the number of characters to write is simply determined by +the length of the input null-terminated character string. + +The fits\_write\_descript routine is useful in situations where +multiple rows of a variable length column have the identical array of +values. One can simply write the array once for the first row, and +then use fits\_write\_descript to write the same descriptor values into +the other rows; all the rows will then point to the same storage +location thus saving disk space. + +When reading from a variable length array field one can only read as +many elements as actually exist in that row of the table; reading does +not automatically continue with the next row of the table as occurs +when reading an ordinary fixed length table field. Attempts to read +more than this will cause an error status to be returned. One can +determine the number of elements in each row of a variable column with +the fits\_read\_descript routine. + + +\section{Multiple Access to the Same FITS File} + +CFITSIO supports simultaneous read and write access to multiple HDUs in +the same FITS file. Thus, one can open the same FITS file twice within +a single program and move to 2 different HDUs in the file, and then +read and write data or keywords to the 2 extensions just as if one were +accessing 2 completely separate FITS files. Since in general it is +not possible to physically open the same file twice and then expect to +be able to simultaneously (or in alternating succession) write to 2 +different locations in the file, CFITSIO recognizes when the file to be +opened (in the call to fits\_open\_file) has already been opened and +instead of actually opening the file again, just logically links the +new file to the old file. (This only applies if the file is opened +more than once within the same program, and does not prevent the same +file from being simultaneously opened by more than one program). Then +before CFITSIO reads or writes to either (logical) file, it makes sure +that any modifications made to the other file have been completely +flushed from the internal buffers to the file. Thus, in principle, one +could open a file twice, in one case pointing to the first extension +and in the other pointing to the 2nd extension and then write data to +both extensions, in any order, without danger of corrupting the file, +There may be some efficiency penalties in doing this however, since +CFITSIO has to flush all the internal buffers related to one file +before switching to the other, so it would still be prudent to +minimize the number of times one switches back and forth between doing +I/O to different HDUs in the same file. + + +\section{When the Final Size of the FITS HDU is Unknown} + +It is not required to know the total size of a FITS data array or table +before beginning to write the data to the FITS file. In the case of +the primary array or an image extension, one should initially create +the array with the size of the highest dimension (largest NAXISn +keyword) set to a dummy value, such as 1. Then after all the data have +been written and the true dimensions are known, then the NAXISn value +should be updated using the fits\_update\_key routine before moving to +another extension or closing the FITS file. + +When writing to FITS tables, CFITSIO automatically keeps track of the +highest row number that is written to, and will increase the size of +the table if necessary. CFITSIO will also automatically insert space +in the FITS file if necessary, to ensure that the data 'heap', if it +exists, and/or any additional HDUs that follow the table do not get +overwritten as new rows are written to the table. + +As a general rule it is best to specify the initial number of rows = 0 +when the table is created, then let CFITSIO keep track of the number of +rows that are actually written. The application program should not +manually update the number of rows in the table (as given by the NAXIS2 +keyword) since CFITSIO does this automatically. If a table is +initially created with more than zero rows, then this will usually be +considered as the minimum size of the table, even if fewer rows are +actually written to the table. Thus, if a table is initially created +with NAXIS2 = 20, and CFITSIO only writes 10 rows of data before +closing the table, then NAXIS2 will remain equal to 20. If however, 30 +rows of data are written to this table, then NAXIS2 will be increased +from 20 to 30. The one exception to this automatic updating of the +NAXIS2 keyword is if the application program directly modifies the +value of NAXIS2 (up or down) itself just before closing the table. In this +case, CFITSIO does not update NAXIS2 again, since it assumes that the +application program must have had a good reason for changing the value +directly. This is not recommended, however, and is only provided for +backward compatibility with software that initially creates a table +with a large number of rows, than decreases the NAXIS2 value to the +actual smaller value just before closing the table. + + +\section{CFITSIO Size Limitations} + +CFITSIO places very few restrictions on the size of FITS files that it +reads or writes. There are a few limits, however, that may affect +some extreme cases: + +1. The maximum number of FITS files that may be simultaneously opened +by CFITSIO is set by NMAXFILES as defined in fitsio2.h. It is currently +set = 300 by default. CFITSIO will allocate about 80 * NMAXFILES bytes +of memory for internal use. Note that the underlying C compiler or +operating system, may have a smaller limit on the number of opened files. +The C symbolic constant FOPEN\_MAX is intended to define the maximum +number of files that may open at once (including any other text or +binary files that may be open, not just FITS files). On some systems it +has been found that gcc supports a maximum of 255 opened files. + +Note that opening and operating on many FITS files simultaneously in +parallel may be less efficient than operating on smaller groups of files +in series. CFITSIO only has NIOBUF number of internal buffers (set = 40 +by default) that are used for temporary storage of the most recent data +records that have been read or written in the FITS files. If the number +of opened files is greater than NIOBUF, then CFITSIO may waste more time +flushing and re-reading or re-writing the same records in the FITS files. + +2. It used to be common for computer systems to only support disk files up +to 2**31 bytes = 2.1 GB in size, but this barrier is gradually being broken. +CFITSIO can optionally read and write these so-called 'large files' that +are greater than 2.1 GB on +platforms where they are supported, but this +usually requires that special compiler option flags be specified to turn +on this option. On linux and solaris systems the compiler flags are +'-D\_LARGEFILE\_SOURCE' and `-D\_FILE\_OFFSET\_BITS=64'. These flags +may also work on other platforms but this has not been tested. Starting +with version 3.0 of CFITSIO, the default Makefile that is distributed +with CFITSIO will include these 2 compiler flags when building on Solaris +and Linux PC systems. Users on other platforms will need to add these +compiler flags manually if they want to support large files. In most +cases it appears that it is not necessary to include these compiler +flags when compiling application code that call the CFITSIO library +routines. + +When CFITSIO is built with large file support (e.g., on Solaris and +Linux PC system by default) then it can read and write FITS data files +on disk that have any of these conditions: + +\begin{itemize} +\item +FITS files larger than 2.1 GB in size +\item +FITS images containing greater than 2.1 G pixels +\item +FITS images that have one dimension with more than 2.1 G pixels +(as given by one of the NAXISn keyword) +\item +FITS tables containing more than 2.1 G rows (given by the NAXIS2 keyword), +or with rows that are more than 2.1 GB wide (given by the NAXIS1 keyword) +\item +FITS binary tables with a variable-length array heap that is larger +than 2.1 GB (given by the PCOUNT keyword) +\end{itemize} + +The current maximum FITS file size supported by CFITSIO +is about 6 terabytes (containing +2**31 FITS blocks, each 2880 bytes in size). Currently, support for large +files in CFITSIO has been tested on the Linux, Solaris, and IBM AIX +operating systems. + +Note that when writing application programs that are intended to support +large files it is important to use 64-bit integer variables +to store quantities such as the dimensions of images, or the number of +rows in a table. These programs must also call the special versions +of some of the CFITSIO routines that have been adapted to +support 64-bit integers. The names of these routines end in +'ll' ('el' 'el') to distinquish them from the 32-bit integer +version (e.g., fits\_get\_num\_rowsll). + + +\chapter{Basic CFITSIO Interface Routines } + +This chapter describes the basic routines in the CFITSIO user interface +that provide all the functions normally needed to read and write most +FITS files. It is recommended that these routines be used for most +applications and that the more advanced routines described in the +next chapter only be used in special circumstances when necessary. + +The following conventions are used in this chapter in the description +of each function: + +1. Most functions have 2 names: a long descriptive name and a short +concise name. Both names are listed on the first line of the following +descriptions, separated by a slash (/) character. Programmers may use +either name in their programs but the long names are recommended to +help document the code and make it easier to read. + +2. A right arrow symbol ($>$) is used in the function descriptions to +separate the input parameters from the output parameters in the +definition of each routine. This symbol is not actually part of the C +calling sequence. + +3. The function parameters are defined in more detail in the +alphabetical listing in Appendix B. + +4. The first argument in almost all the functions is a pointer to a +structure of type `fitsfile'. Memory for this structure is allocated +by CFITSIO when the FITS file is first opened or created and is freed +when the FITS file is closed. + +5. The last argument in almost all the functions is the error status +parameter. It must be equal to 0 on input, otherwise the function will +immediately exit without doing anything. A non-zero output value +indicates that an error occurred in the function. In most cases the +status value is also returned as the value of the function itself. + + +\section{CFITSIO Error Status Routines} + + +\begin{description} +\item[1 ] Return a descriptive text string (30 char max.) corresponding to + a CFITSIO error status code.\label{ffgerr} +\end{description} + +\begin{verbatim} + void fits_get_errstatus / ffgerr (int status, > char *err_text) +\end{verbatim} + +\begin{description} +\item[2 ] Return the top (oldest) 80-character error message from the + internal CFITSIO stack of error messages and shift any remaining + messages on the stack up one level. Call this routine + repeatedly to get each message in sequence. The function returns + a value = 0 and a null error message when the error stack is empty. +\label{ffgmsg} +\end{description} + +\begin{verbatim} + int fits_read_errmsg / ffgmsg (char *err_msg) +\end{verbatim} + +\begin{description} +\item[3 ] Print out the error message corresponding to the input status + value and all the error messages on the CFITSIO stack to the specified + file stream (normally to stdout or stderr). If the input + status value = 0 then this routine does nothing. +\label{ffrprt} +\end{description} + +\begin{verbatim} + void fits_report_error / ffrprt (FILE *stream, status) +\end{verbatim} + +\begin{description} +\item[4 ]The fits\_write\_errmark routine puts an invisible marker on the + CFITSIO error stack. The fits\_clear\_errmark routine can then be + used to delete any more recent error messages on the stack, back to + the position of the marker. This preserves any older error messages + on the stack. The fits\_clear\_errmsg routine simply clears all the + messages (and marks) from the stack. These routines are called + without any arguments. +\label{ffpmrk} \label{ffcmsg} +\end{description} + +\begin{verbatim} + void fits_write_errmark / ffpmrk (void) + void fits_clear_errmark / ffcmrk (void) + void fits_clear_errmsg / ffcmsg (void) +\end{verbatim} + + +\section{FITS File Access Routines} + + +\begin{description} +\item[1 ] Open an existing data file. \label{ffopen} + + +\begin{verbatim} +int fits_open_file / ffopen + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_diskfile / ffdkopen + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_data / ffdopn + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_table / fftopn + (fitsfile **fptr, char *filename, int iomode, > int *status) + +int fits_open_image / ffiopn + (fitsfile **fptr, char *filename, int iomode, > int *status) +\end{verbatim} + +The iomode parameter determines the read/write access allowed in the +file and can have values of READONLY (0) or READWRITE (1). The filename +parameter gives the name of the file to be opened, followed by an +optional argument giving the name or index number of the extension +within the FITS file that should be moved to and opened (e.g., +\verb-myfile.fits+3- or \verb-myfile.fits[3]- moves to the 3rd extension within +the file, and \verb-myfile.fits[events]- moves to the extension with the +keyword EXTNAME = 'EVENTS'). + +The fits\_open\_diskfile routine is similar to the fits\_open\_file routine +except that it does not support the extended filename syntax in the input +file name. This routine simply tries to open the specified input file +on magnetic disk. This routine is mainly for use in cases where the +filename (or directory path) contains square or curly bracket characters +that would confuse the extended filename parser. + +The fits\_open\_data routine is similar to the fits\_open\_file routine +except that it will move to the first HDU containing significant data, +if a HDU name or number to open was not explicitly specified as +part of the filename. In this case, it will look for the first +IMAGE HDU with NAXIS greater than 0, or the first table that does not contain the +strings `GTI' (Good Time Interval extension) or `OBSTABLE' in the +EXTNAME keyword value. + +The fits\_open\_table and fits\_open\_image routines are similar to +fits\_open\_data except they will move to the first significant table +HDU or image HDU in the file, respectively, if a HDU name or +number is not specified as part of the filename. + +IRAF images (.imh format files) and raw binary data arrays may also be +opened with READONLY access. CFITSIO will automatically test if the +input file is an IRAF image, and if, so will convert it on the fly into +a virtual FITS image before it is opened by the application program. +If the input file is a raw binary data array of numbers, then the data type +and dimensions of the array must be specified in square brackets +following the name of the file (e.g. 'rawfile.dat[i512,512]' opens a +512 x 512 short integer image). See the `Extended File Name Syntax' +chapter for more details on how to specify the raw file name. The raw +file is converted on the fly into a virtual FITS image in memory that +is then opened by the application program with READONLY access. + +Programs can read the input file from the 'stdin' file stream if a dash +character ('-') is given as the filename. Files can also be opened over +the network using FTP or HTTP protocols by supplying the appropriate URL +as the filename. + +The input file can be modified in various ways to create a virtual file +(usually stored in memory) that is then opened by the application +program by supplying a filtering or binning specifier in square brackets +following the filename. Some of the more common filtering methods are +illustrated in the following paragraphs, but users should refer to the +'Extended File Name Syntax' chapter for a complete description of +the full file filtering syntax. + +When opening an image, a rectangular subset of the physical image may be +opened by listing the first and last pixel in each dimension (and +optional pixel skipping factor): + +\begin{verbatim} +myimage.fits[101:200,301:400] +\end{verbatim} +will create and open a 100x100 pixel virtual image of that section of +the physical image, and \verb+myimage.fits[*,-*]+ opens a virtual image +that is the same size as the physical image but has been flipped in +the vertical direction. + +When opening a table, the filtering syntax can be used to add or delete +columns or keywords in the virtual table: +\verb-myfile.fits[events][col !time; PI = PHA*1.2]- opens a virtual table in which the TIME column +has been deleted and a new PI column has been added with a value 1.2 +times that of the PHA column. Similarly, one can filter a table to keep +only those rows that satisfy a selection criterion: +\verb-myfile.fits[events][pha > 50]- creates and opens a virtual table +containing only those rows with a PHA value greater than 50. A large +number of boolean and mathematical operators can be used in the +selection expression. One can also filter table rows using 'Good Time +Interval' extensions, and spatial region filters as in +\verb-myfile.fits[events][gtifilter()]- and +\verb-myfile.fits[events][regfilter( "stars.rng")]-. + +Finally, table columns may be binned or histogrammed to generate a +virtual image. For example, \verb-myfile.fits[events][bin (X,Y)=4]- will +result in a 2-dimensional image calculated by binning the X and Y +columns in the event table with a bin size of 4 in each dimension. The +TLMINn and TLMAXn keywords will be used by default to determine the +range of the image. + +A single program can open the same FITS file more than once and then +treat the resulting fitsfile pointers as though they were completely +independent FITS files. Using this facility, a program can open a FITS +file twice, move to 2 different extensions within the file, and then + read and write data in those extensions in any order. +\end{description} + + +\begin{description} +\item[2 ] Create and open a new empty output FITS file. \label{ffinit} + + +\begin{verbatim} +int fits_create_file / ffinit + (fitsfile **fptr, char *filename, > int *status) + +int fits_create_diskfile / ffdkinit + (fitsfile **fptr, char *filename, > int *status) +\end{verbatim} + +An error will be returned if the specified file already exists, unless +the filename is prefixed with an exclamation point (!). In that case +CFITSIO will overwrite (delete) any existing file with the same name. +Note that the exclamation point is a special UNIX character so if +it is used on the command line it must be preceded by a backslash to +force the UNIX shell to accept the character as part of the filename. + +The output file will be written to the 'stdout' file stream if a dash +character ('-') or the string 'stdout' is given as the filename. Similarly, +'-.gz' or 'stdout.gz' will cause the file to be gzip compressed before +it is written out to the stdout stream. + +Optionally, the name of a template file that is used to define the +structure of the new file may be specified in parentheses following the +output file name. The template file may be another FITS file, in which +case the new file, at the time it is opened, will be an exact copy of +the template file except that the data structures (images and tables) +will be filled with zeros. Alternatively, the template file may be an +ASCII format text file containing directives that define the keywords to be +created in each HDU of the file. See the 'Extended File Name Syntax' + section for a complete description of the template file syntax. + +The fits\_create\_diskfile routine is similar to the fits\_create\_file routine +except that it does not support the extended filename syntax in the input +file name. This routine simply tries to create the specified file +on magnetic disk. This routine is mainly for use in cases where the +filename (or directory path) contains square or curly bracket characters + that would confuse the extended filename parser. +\end{description} + + + +\begin{description} +\item[3 ] Close a previously opened FITS file. The first routine simply +closes the file, whereas the second one also DELETES THE FILE, which +can be useful in cases where a FITS file has been partially created, +but then an error occurs which prevents it from being completed. + \label{ffclos} \label{ffdelt} +\end{description} + +\begin{verbatim} + int fits_close_file / ffclos (fitsfile *fptr, > int *status) + + int fits_delete_file / ffdelt (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ]Return the name, I/O mode (READONLY or READWRITE), and/or the file +type (e.g. 'file://', 'ftp://') of the opened FITS file. \label{ffflnm} + \label{ffflmd} \label{ffurlt} +\end{description} + +\begin{verbatim} + int fits_file_name / ffflnm (fitsfile *fptr, > char *filename, int *status) + + int fits_file_mode / ffflmd (fitsfile *fptr, > int *iomode, int *status) + + int fits_url_type / ffurlt (fitsfile *fptr, > char *urltype, int *status) +\end{verbatim} + +\section{HDU Access Routines} + +The following functions perform operations on Header-Data Units (HDUs) +as a whole. + + +\begin{description} +\item[1 ] Move to a different HDU in the file. The first routine moves to a + specified absolute HDU number (starting with 1 for the primary + array) in the FITS file, and the second routine moves a relative + number HDUs forward or backward from the current HDU. A null + pointer may be given for the hdutype parameter if it's value is not + needed. The third routine moves to the (first) HDU which has the + specified extension type and EXTNAME and EXTVER keyword values (or + HDUNAME and HDUVER keywords). The hdutype parameter may have a + value of IMAGE\_HDU, ASCII\_TBL, BINARY\_TBL, or ANY\_HDU where + ANY\_HDU means that only the extname and extver values will be used + to locate the correct extension. If the input value of extver is 0 + then the EXTVER keyword is ignored and the first HDU with a + matching EXTNAME (or HDUNAME) keyword will be found. If no + matching HDU is found in the file then the current HDU will remain + unchanged and a status = BAD\_HDU\_NUM will be returned. + \label{ffmahd} \label{ffmrhd} \label{ffmnhd} +\end{description} + +\begin{verbatim} + int fits_movabs_hdu / ffmahd + (fitsfile *fptr, int hdunum, > int *hdutype, int *status) + + int fits_movrel_hdu / ffmrhd + (fitsfile *fptr, int nmove, > int *hdutype, int *status) + + int fits_movnam_hdu / ffmnhd + (fitsfile *fptr, int hdutype, char *extname, int extver, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Return the total number of HDUs in the FITS file. This returns the +number of completely defined HDUs in the file. If a new HDU has just been added to +the FITS file, then that last HDU will only be counted if it has been closed, +or if data has been written to the HDU. + The current HDU remains unchanged by this routine. \label{ffthdu} +\end{description} + +\begin{verbatim} + int fits_get_num_hdus / ffthdu + (fitsfile *fptr, > int *hdunum, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Return the number of the current HDU (CHDU) in the FITS file (where + the primary array = 1). This function returns the HDU number + rather than a status value. \label{ffghdn} +\end{description} + +\begin{verbatim} + int fits_get_hdu_num / ffghdn + (fitsfile *fptr, > int *hdunum) +\end{verbatim} + +\begin{description} +\item[4 ] Return the type of the current HDU in the FITS file. The possible + values for hdutype are: IMAGE\_HDU, ASCII\_TBL, or BINARY\_TBL. \label{ffghdt} +\end{description} + +\begin{verbatim} + int fits_get_hdu_type / ffghdt + (fitsfile *fptr, > int *hdutype, int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Copy all or part of the HDUs in the FITS file associated with infptr + and append them to the end of the FITS file associated with + outfptr. If 'previous' is true (not 0), then any HDUs preceding + the current HDU in the input file will be copied to the output + file. Similarly, 'current' and 'following' determine whether the + current HDU, and/or any following HDUs in the input file will be + copied to the output file. Thus, if all 3 parameters are true, then the + entire input file will be copied. On exit, the current HDU in + the input file will be unchanged, and the last HDU in the output + file will be the current HDU. \label{ffcpfl} +\end{description} + +\begin{verbatim} + int fits_copy_file / ffcpfl + (fitsfile *infptr, fitsfile *outfptr, int previous, int current, + int following, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Copy the current HDU from the FITS file associated with infptr and append it + to the end of the FITS file associated with outfptr. Space may be + reserved for MOREKEYS additional keywords in the output header. \label{ffcopy} +\end{description} + +\begin{verbatim} + int fits_copy_hdu / ffcopy + (fitsfile *infptr, fitsfile *outfptr, int morekeys, > int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Write the current HDU in the input FITS file to the + output FILE stream (e.g., to stdout). \label{ffwrhdu} +\end{description} + +\begin{verbatim} + int fits_write_hdu / ffwrhdu + (fitsfile *infptr, FILE *stream, > int *status) +\end{verbatim} + +\begin{description} +\item[8 ] Copy the header (and not the data) from the CHDU associated with infptr + to the CHDU associated with outfptr. If the current output HDU + is not completely empty, then the CHDU will be closed and a new + HDU will be appended to the output file. An empty output data unit + will be created with all values initially = 0). \label{ffcphd} +\end{description} + +\begin{verbatim} + int fits_copy_header / ffcphd + (fitsfile *infptr, fitsfile *outfptr, > int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Delete the CHDU in the FITS file. Any following HDUs will be shifted + forward in the file, to fill in the gap created by the deleted + HDU. In the case of deleting the primary array (the first HDU in + the file) then the current primary array will be replace by a null + primary array containing the minimum set of required keywords and + no data. If there are more extensions in the file following the + one that is deleted, then the the CHDU will be redefined to point + to the following extension. If there are no following extensions + then the CHDU will be redefined to point to the previous HDU. The + output hdutype parameter returns the type of the new CHDU. A null + pointer may be given for + hdutype if the returned value is not needed. \label{ffdhdu} +\end{description} + +\begin{verbatim} + int fits_delete_hdu / ffdhdu + (fitsfile *fptr, > int *hdutype, int *status) +\end{verbatim} + +\section{Header Keyword Read/Write Routines} + +These routines read or write keywords in the Current Header Unit +(CHU). Wild card characters (*, ?, or \#) may be used when specifying +the name of the keyword to be read: a '?' will match any single +character at that position in the keyword name and a '*' will match any +length (including zero) string of characters. The '\#' character will +match any consecutive string of decimal digits (0 - 9). When a wild +card is used the routine will only search for a match from the current +header position to the end of the header and will not resume the search +from the top of the header back to the original header position as is +done when no wildcards are included in the keyword name. The +fits\_read\_record routine may be used to set the starting position +when doing wild card searchs. A status value of KEY\_NO\_EXIST is +returned if the specified keyword to be read is not found in the +header. + + +\subsection{Keyword Reading Routines} + + +\begin{description} +\item[1 ] Return the number of existing keywords (not counting the + END keyword) and the amount of space currently available for more + keywords. It returns morekeys = -1 if the header has not yet been + closed. Note that CFITSIO will dynamically add space if required + when writing new keywords to a header so in practice there is no + limit to the number of keywords that can be added to a header. A + null pointer may be entered for the morekeys parameter if it's + value is not needed. \label{ffghsp} +\end{description} + +\begin{verbatim} + int fits_get_hdrspace / ffghsp + (fitsfile *fptr, > int *keysexist, int *morekeys, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Return the specified keyword. In the first routine, + the datatype parameter specifies the desired returned data type of the + keyword value and can have one of the following symbolic constant + values: TSTRING, TLOGICAL (== int), TBYTE, TSHORT, TUSHORT, TINT, + TUINT, TLONG, TULONG, TLONGLONG, TFLOAT, TDOUBLE, TCOMPLEX, and TDBLCOMPLEX. + Within the context of this routine, TSTRING corresponds to a + 'char*' data type, i.e., a pointer to a character array. Data type + conversion will be performed for numeric values if the keyword + value does not have the same data type. If the value of the keyword + is undefined (i.e., the value field is blank) then an error status + = VALUE\_UNDEFINED will be returned. + + The second routine returns the keyword value as a character string + (a literal copy of what is in the value field) regardless of the + intrinsic data type of the keyword. The third routine returns + the entire 80-character header record of the keyword, with any + trailing blank characters stripped off. + + If a NULL comment pointer is supplied then the comment string + will not be returned. \label{ffgky} \label{ffgkey} \label{ffgcrd} +\end{description} + +\begin{verbatim} + int fits_read_key / ffgky + (fitsfile *fptr, int datatype, char *keyname, > DTYPE *value, + char *comment, int *status) + + int fits_read_keyword / ffgkey + (fitsfile *fptr, char *keyname, > char *value, char *comment, + int *status) + + int fits_read_card / ffgcrd + (fitsfile *fptr, char *keyname, > char *card, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Return the nth header record in the CHU. The first keyword + in the header is at keynum = 1; if keynum = 0 then these routines + simply reset the internal CFITSIO pointer to the beginning of the header + so that subsequent keyword operations will start at the top of the + header (e.g., prior to searching for keywords using wild cards in + the keyword name). The first routine returns the entire + 80-character header record (with trailing blanks truncated), + while the second routine parses the record and returns the name, + value, and comment fields as separate (blank truncated) + character strings. If a NULL comment pointer is given on input, + then the comment string will not be + returned. \label{ffgrec} \label{ffgkyn} +\end{description} + +\begin{verbatim} + int fits_read_record / ffgrec + (fitsfile *fptr, int keynum, > char *card, int *status) + + int fits_read_keyn / ffgkyn + (fitsfile *fptr, int keynum, > char *keyname, char *value, + char *comment, int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Return the next keyword whose name matches one of the strings in + 'inclist' but does not match any of the strings in 'exclist'. + The strings in inclist and exclist may contain wild card characters + (*, ?, and \#) as described at the beginning of this section. + This routine searches from the current header position to the + end of the header, only, and does not continue the search from + the top of the header back to the original position. The current + header position may be reset with the ffgrec routine. Note + that nexc may be set = 0 if there are no keywords to be excluded. + This routine returns status = KEY\_NO\_EXIST if a matching + keyword is not found. \label{ffgnxk} +\end{description} + +\begin{verbatim} + int fits_find_nextkey / ffgnxk + (fitsfile *fptr, char **inclist, int ninc, char **exclist, + int nexc, > char *card, int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Return the physical units string from an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the + beginning of the keyword comment field. A null string is returned + if no units are defined for the keyword. \label{ffgunt} +\end{description} + +\begin{verbatim} + VELOCITY= 12.3 / [km/s] orbital speed + + int fits_read_key_unit / ffgunt + (fitsfile *fptr, char *keyname, > char *unit, int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Concatenate the header keywords in the CHDU into a single long + string of characters. This provides a convenient way of passing + all or part of the header information in a FITS HDU to other subroutines. + Each 80-character fixed-length keyword record is appended to the + output character string, in order, with no intervening separator or + terminating characters. The last header record is terminated with + a NULL character. This routine allocates memory for the returned + character array, so the calling program must free the memory when + finished. + + Selected keywords may be excluded from the returned character string. + If the second parameter (nocomments) is TRUE (nonzero) then any + COMMENT, HISTORY, or blank keywords in the header will not be copied + to the output string. + + The 'exclist' parameter may be used to supply a list of keywords + that are to be excluded from the output character string. Wild card + characters (*, ?, and \#) may be used in the excluded keyword names. + If no additional keywords are to be excluded, then set nexc = 0 and + specify NULL for the the **header parameter. \label{ffhdr2str} +\end{description} + +\begin{verbatim} + int fits_hdr2str + (fitsfile *fptr, int nocomments, char **exclist, int nexc, + > char **header, int *nkeys, int *status) +\end{verbatim} + + +\subsection{Keyword Writing Routines} + + +\begin{description} +\item[1 ] Write a keyword of the appropriate data type into the + CHU. The first routine simply appends a new keyword whereas the + second routine will update the value and comment fields of the + keyword if it already exists, otherwise it appends a new + keyword. Note that the address to the value, and not the value + itself, must be entered. The datatype parameter specifies the + data type of the keyword value with one of the following values: + TSTRING, TLOGICAL (== int), TBYTE, TSHORT, TUSHORT, TINT, TUINT, + TLONG, TLONGLONG, TULONG, TFLOAT, TDOUBLE. Within the context of this + routine, TSTRING corresponds to a 'char*' data type, i.e., a pointer + to a character array. A null pointer may be entered for the + comment parameter in which case the keyword comment + field will be unmodified or left blank. \label{ffpky} \label{ffuky} +\end{description} + +\begin{verbatim} + int fits_write_key / ffpky + (fitsfile *fptr, int datatype, char *keyname, DTYPE *value, + char *comment, > int *status) + + int fits_update_key / ffuky + (fitsfile *fptr, int datatype, char *keyname, DTYPE *value, + char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Write a keyword with a null or undefined value (i.e., the + value field in the keyword is left blank). The first routine + simply appends a new keyword whereas the second routine will update + the value and comment fields of the keyword if it already exists, + otherwise it appends a new keyword. A null pointer may be + entered for the comment parameter in which case the keyword + comment + field will be unmodified or left blank. \label{ffpkyu} \label{ffukyu} +\end{description} + +\begin{verbatim} + int fits_write_key_null / ffpkyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) + + int fits_update_key_null / ffukyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Write (append) a COMMENT or HISTORY keyword to the CHU. The comment or + history string will be continued over multiple keywords if it is longer + than 70 characters. \label{ffpcom} \label{ffphis} +\end{description} + +\begin{verbatim} + int fits_write_comment / ffpcom + (fitsfile *fptr, char *comment, > int *status) + + int fits_write_history / ffphis + (fitsfile *fptr, char *history, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Write the DATE keyword to the CHU. The keyword value will contain + the current system date as a character string in 'yyyy-mm-ddThh:mm:ss' + format. If a DATE keyword already exists in the header, then this + routine will simply update the keyword value with the current date. + \label{ffpdat} +\end{description} + +\begin{verbatim} + int fits_write_date / ffpdat + (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Write a user specified keyword record into the CHU. This is + a low--level routine which can be used to write any arbitrary + record into the header. The record must conform to the all + the FITS format requirements. \label{ffprec} +\end{description} + +\begin{verbatim} + int fits_write_record / ffprec + (fitsfile *fptr, char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ]Update an 80-character record in the CHU. If a keyword with the input + name already exists, then it is overwritten by the value of card. This + could modify the keyword name as well as the value and comment fields. + If the keyword doesn't already exist then a new keyword card is appended + to the header. \label{ffucrd} +\end{description} + +\begin{verbatim} + int fits_update_card / ffucrd + (fitsfile *fptr, char *keyname, char *card, > int *status) +\end{verbatim} + + +\begin{description} +\item[7 ] Modify (overwrite) the comment field of an existing keyword. \label{ffmcom} +\end{description} + +\begin{verbatim} + int fits_modify_comment / ffmcom + (fitsfile *fptr, char *keyname, char *comment, > int *status) +\end{verbatim} + + +\begin{description} +\item[8 ] Write the physical units string into an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the + beginning of the keyword comment field. \label{ffpunt} +\end{description} + +\begin{verbatim} + VELOCITY= 12.3 / [km/s] orbital speed + + int fits_write_key_unit / ffpunt + (fitsfile *fptr, char *keyname, char *unit, > int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Rename an existing keyword, preserving the current value + and comment fields. \label{ffmnam} +\end{description} + +\begin{verbatim} + int fits_modify_name / ffmnam + (fitsfile *fptr, char *oldname, char *newname, > int *status) +\end{verbatim} + +\begin{description} +\item[10] Delete a keyword record. The space occupied by + the keyword is reclaimed by moving all the following header records up + one row in the header. The first routine deletes a keyword at a + specified position in the header (the first keyword is at position 1), + whereas the second routine deletes a specifically named keyword. + Wild card characters may be used when specifying the name of the keyword + to be deleted. \label{ffdrec} \label{ffdkey} +\end{description} + +\begin{verbatim} + int fits_delete_record / ffdrec + (fitsfile *fptr, int keynum, > int *status) + + int fits_delete_key / ffdkey + (fitsfile *fptr, char *keyname, > int *status) +\end{verbatim} + +\section{Primary Array or IMAGE Extension I/O Routines} + +These routines read or write data values in the primary data array (i.e., +the first HDU in a FITS file) or an IMAGE extension. There are also +routines to get information about the data type and size of the image. +Users should also read the following chapter on the CFITSIO iterator +function which provides a more `object oriented' method of reading and +writing images. The iterator function is a little more complicated to +use, but the advantages are that it usually takes less code to perform +the same operation, and the resulting program oftens runs faster because +the FITS files are read and written using the most efficient block size. + +C programmers should note that the ordering of arrays in FITS files, and +hence in all the CFITSIO calls, is more similar to the dimensionality +of arrays in Fortran rather than C. For instance if a FITS image has +NAXIS1 = 100 and NAXIS2 = 50, then a 2-D array just large enough to hold +the image should be declared as array[50][100] and not as array[100][50]. + +The `datatype' parameter specifies the data type of the `nulval' and +`array' pointers and can have one of the following values: TBYTE, +TSBYTE, TSHORT, TUSHORT, TINT, TUINT, TLONG, TLONGLONG, TULONG, TFLOAT, +TDOUBLE. Automatic data type conversion is performed if the data type +of the FITS array (as defined by the BITPIX keyword) differs from that +specified by 'datatype'. The data values are also automatically scaled +by the BSCALE and BZERO keyword values as they are being read or written +in the FITS array. + + +\begin{description} +\item[1 ] Get the data type or equivalent data type of the image. The + first routine returns the physical data type of the FITS image, as + given by the BITPIX keyword, with allowed values of BYTE\_IMG (8), + SHORT\_IMG (16), LONG\_IMG (32), LONGLONG\_IMG (64), + FLOAT\_IMG (-32), and DOUBLE\_IMG + (-64). Note that BITPIX = 64 is an experimental + data type that is not currently defined in the FITS standard + document. It is not recommended for general use. + The second routine is similar, except that if the image pixel + values are scaled, with non-default values for the BZERO and BSCALE + keywords, then the routine will return the 'equivalent' data type + that is needed to store the scaled values. For example, if BITPIX + = 16 and BSCALE = 0.1 then the equivalent data type is FLOAT\_IMG. + Similarly if BITPIX = 16, BSCALE = 1, and BZERO = 32768, then the + the pixel values span the range of an unsigned short integer and + the returned data type will be USHORT\_IMG. \label{ffgidt} +\end{description} + +\begin{verbatim} + int fits_get_img_type / ffgidt + (fitsfile *fptr, > int *bitpix, int *status) + + int fits_get_img_equivtype / ffgiet + (fitsfile *fptr, > int *bitpix, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the number of dimensions, and/or the size of + each dimension in the image . The number of axes in the image is + given by naxis, and the size of each dimension is given by the + naxes array (a maximum of maxdim dimensions will be returned). + \label{ffgidm} \label{ffgisz} \label{ffgipr} +\end{description} + +\begin{verbatim} + int fits_get_img_dim / ffgidm + (fitsfile *fptr, > int *naxis, int *status) + + int fits_get_img_size / ffgisz + (fitsfile *fptr, int maxdim, > long *naxes, int *status) + + int fits_get_img_sizell / ffgiszll + (fitsfile *fptr, int maxdim, > LONGLONG *naxes, int *status) + + int fits_get_img_param / ffgipr + (fitsfile *fptr, int maxdim, > int *bitpix, int *naxis, long *naxes, + int *status) + + int fits_get_img_paramll / ffgiprll + (fitsfile *fptr, int maxdim, > int *bitpix, int *naxis, LONGLONG *naxes, + int *status) +\end{verbatim} + +\begin{description} +\item[3 ]Create a new primary array or IMAGE extension with a specified + data type and size. If the FITS file is currently empty then a + primary array is created, otherwise a new IMAGE extension is + appended to the file. \label{ffcrim} +\end{description} + +\begin{verbatim} + int fits_create_img / ffcrim + ( fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_create_imgll / ffcrimll + ( fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Copy an n-dimensional image in a particular row and column of a + binary table (in a vector column) + to or from a primary array or image extension. + + The 'cell2image' routine + will append a new image extension (or primary array) to the output file. + Any WCS keywords associated with the input column image will be tranlated + into the appropriate form for an image extension. Any other keywords + in the table header that are not specifically related to defining the + binary table structure or to other columns in the table + will also be copied to the header of the output image. + + The 'image2cell' routine will copy the input image into the specified row + and column of the current binary table in the output file. The binary table + HDU must exist before calling this routine, but it + may be empty, with no rows or columns of data. The specified column + (and row) will be created if it does not already exist. The 'copykeyflag' + parameter controls which keywords are copied from the input + image to the header of the output table: 0 = no keywords will be copied, + 1 = all keywords will be copied (except those keywords that would be invalid in + the table header), and 2 = copy only the WCS keywords. \label{copycell} +\end{description} + +\begin{verbatim} + int fits_copy_cell2image + (fitsfile *infptr, fitsfile *outfptr, char *colname, long rownum, + > int *status) + + int fits_copy_image2cell + (fitsfile *infptr, fitsfile *outfptr, char *colname, long rownum, + int copykeyflag > int *status) +\end{verbatim} + + +\begin{description} +\item[5 ] Write a rectangular subimage (or the whole image) to the FITS data + array. The fpixel and lpixel arrays give the coordinates of the + first (lower left corner) and last (upper right corner) pixels in + FITS image to be written to. \label{ffpss} +\end{description} + +\begin{verbatim} + int fits_write_subset / ffpss + (fitsfile *fptr, int datatype, long *fpixel, long *lpixel, + DTYPE *array, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Write pixels into the FITS data array. 'fpixel' is an array of + length NAXIS which gives the coordinate of the starting pixel to be + written to, such that fpixel[0] is in the range 1 to NAXIS1, + fpixel[1] is in the range 1 to NAXIS2, etc. The first pair of routines + simply writes the array of pixels to the FITS file (doing data type + conversion if necessary) whereas the second routines will substitute + the appropriate FITS null value for any elements which are equal to + the input value of nulval (note that this parameter gives the + address of the null value, not the null value itself). For integer + FITS arrays, the FITS null value is defined by the BLANK keyword (an + error is returned if the BLANK keyword doesn't exist). For floating + point FITS arrays the special IEEE NaN (Not-a-Number) value will be + written into the FITS file. If a null pointer is entered for + nulval, then the null value is ignored and this routine behaves + the same as fits\_write\_pix. \label{ffppx} \label{ffppxn} +\end{description} + +\begin{verbatim} + int fits_write_pix / ffppx + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_pixll / ffppxll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_pixnull / ffppxn + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); + + int fits_write_pixnullll / ffppxnll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); +\end{verbatim} + +\begin{description} +\item[7 ] Set FITS data array elements equal to the appropriate null pixel + value. For integer FITS arrays, the FITS null value is defined by + the BLANK keyword (an error is returned if the BLANK keyword + doesn't exist). For floating point FITS arrays the special IEEE NaN + (Not-a-Number) value will be written into the FITS file. Note that + 'firstelem' is a scalar giving the offset to the first pixel to be + written in the equivalent 1-dimensional array of image pixels. \label{ffpprn} +\end{description} + +\begin{verbatim} + int fits_write_null_img / ffpprn + (fitsfile *fptr, LONGLONG firstelem, LONGLONG nelements, > int *status) +\end{verbatim} + +\begin{description} +\item[8 ] Read a rectangular subimage (or the whole image) from the FITS + data array. The fpixel and lpixel arrays give the coordinates of + the first (lower left corner) and last (upper right corner) pixels + to be read from the FITS image. Undefined FITS array elements will + be returned with a value = *nullval, (note that this parameter + gives the address of the null value, not the null value itself) + unless nulval = 0 or *nulval = 0, in which case no checks for + undefined pixels will be performed. \label{ffgsv} +\end{description} + +\begin{verbatim} + int fits_read_subset / ffgsv + (fitsfile *fptr, int datatype, long *fpixel, long *lpixel, long *inc, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Read pixels from the FITS data array. 'fpixel' is the starting + pixel location and is an array of length NAXIS such that fpixel[0] + is in the range 1 to NAXIS1, fpixel[1] is in the range 1 to NAXIS2, + etc. The nelements parameter specifies the number of pixels to + read. If fpixel is set to the first pixel, and nelements is set + equal to the NAXIS1 value, then this routine would read the first + row of the image. Alternatively, if nelements is set equal to + NAXIS1 * NAXIS2 then it would read an entire 2D image, or the first + plane of a 3-D datacube. + + The first routine will return any undefined pixels in the FITS array + equal to the value of *nullval (note that this parameter gives the + address of the null value, not the null value itself) unless nulval + = 0 or *nulval = 0, in which case no checks for undefined pixels + will be performed. The second routine is similar except that any + undefined pixels will have the corresponding nullarray element set + equal to TRUE (= 1). \label{ffgpxv} \label{ffgpxf} +\end{description} + +\begin{verbatim} + int fits_read_pix / ffgpxv + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_pixll / ffgpxvll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_pixnull / ffgpxf + (fitsfile *fptr, int datatype, long *fpixel, LONGLONG nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) + + int fits_read_pixnullll / ffgpxfll + (fitsfile *fptr, int datatype, LONGLONG *fpixel, LONGLONG nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[10] Copy a rectangular section of an image and write it to a new + FITS primary image or image extension. The new image HDU is appended + to the end of the output file; all the keywords in the input image + will be copied to the output image. The common WCS keywords will + be updated if necessary to correspond to the coordinates of the section. + The format of the section expression is + same as specifying an image section using the extended file name + syntax (see "Image Section" in Chapter 10). + (Examples: "1:100,1:200", "1:100:2, 1:*:2", "*, -*"). + \label{ffcpimg} +\end{description} + +\begin{verbatim} + int fits_copy_image_section / ffcpimg + (fitsfile *infptr, fitsfile *outfptr, char *section, int *status) +\end{verbatim} + + +\section{Image Compression} + +CFITSIO now transparently supports 2 methods of image compression: + +1) The entire FITS file may be externally compressed with the gzip or +Unix compress algorithm, producing a *.gz or *.Z file, respectively. +When reading compressed files of this type, CFITSIO first uncompresses +the entire file into memory before performing the requested read +operations. Output files can be directly written in the gzip +compressed format if the user-specified filename ends with `.gz'. In +this case, CFITSIO initially writes the uncompressed file in memory and +then compresses it and writes it to disk when the FITS file is closed, +thus saving user disk space. Read and write access to these compressed +FITS files is generally quite fast; the main limitation is that there +must be enough available memory (or swap space) to hold the entire +uncompressed FITS file. + +2) CFITSIO also supports a newer image compression format in which the +image is divided into a grid of rectangular tiles, and each tile of +pixels is individually compressed. The compressed tiles are stored in +rows of a variable length array column in a FITS binary table, but +CFITSIO recognizes that the binary table extension contains an image +and treats it as if it were an IMAGE extension. This tile-compressed +format is especially well suited for compressing very large images +because a) the FITS header keywords remain uncompressed for rapid read +access, and because b) it is possible to extract and uncompress +sections of the image without having to uncompress the entire image. +This format is also much more effective in compressing floating point +images (using a lossy compression algorithm) than simply compressing +the image using gzip or compress. + +A detailed description of this format is available at: + +\begin{verbatim} +http://heasarc.gsfc.nasa.gov/docs/software/fitsio/ + compression/compress_image.html +\end{verbatim} + +The N-dimensional FITS image can be divided into any +desired rectangular grid of compression tiles. By default the tiles +are chosen to correspond to the rows of the image, each containing +NAXIS1 pixels, (except when using HCOMPRESS, where the default is +to compress the entire image as a single big tile). +For example, a 800 x 800 x 4 pixel data cube would be +divided in to 3200 tiles containing 800 pixels each by default. +Alternatively, this data cube could be divided into 256 tiles that are each +100 X 100 X 1 pixels in size, or 4 tiles containing 800 x 800 X 1 +pixels, or a single tile containing the entire data cube. Note that +the image dimensions are not required to be an integer multiple of the +tile dimensions, so, for example, this data cube could also be divided +into 250 X 200 pixel tiles, in which case the last tile in each row +would only contain 50 X 200 pixels. + +Currently, 4 image compression algorithms are supported: Rice, GZIP, +HCOMPRESS, and PLIO. Rice and GZIP are general purpose algorithms that can be +used to compress almost any image. HCOMPRESS is very effective for +astronomical images. The PLIO algorithm is +more specialized and was developed for use in the IRAF data analysis +system to store +pixel data quality masks. It is designed to only work on images +containing positive integers with values up to about 2**24. Other +image compression algorithms may be supported in the future. + +The 4 supported image compression algorithms are all 'loss-less' when +applied to integer FITS images; the pixel values are preserved exactly +with no loss of information during the compression and uncompression +process. The HCOMPRESS algorithm can also be used in a 'lossy' mode to achieve +a greater degree of image compression (by specifying a 'scale' parameter +value greater than 1). To set the scale parameter effectively, one must +know the RMS noise in the image pixel values; The fits\_rms\_float +and fits\_rms\_short routines in CFITSIO are provided to estimate +the RMS value in an image. + +Floating point FITS images (which have BITPIX = -32 or -64) +are first quantized into scaled integer pixel values before being +compressed. This technique produces much higher compression factors +than, for example, simply using GZIP to compress the whole FITS file +image, but it also means that +the original floating value pixel values may not be precisely returned +when the image is uncompressed. When done properly, this only discards +the 'noise' from the floating point values without losing any +significant information. The amount of noise that is discarded can be +controlled by the 'noise\_bits' compression parameter. + +No special action is required to read tile-compressed images because +all the CFITSIO routines that read normal uncompressed FITS images can +also read images in the tile-compressed format; CFITSIO essentially +treats the binary table that contains the compressed tiles as if +it were an IMAGE extension. + +When creating (writing) a new image with CFITSIO, a normal uncompressed +FITS primary array or IMAGE extension will be written unless the +tile-compressed format has been specified in 1 of 2 possible ways: + +1) At run time, when specifying the name of the output FITS file to be +created at run time, the user can indicate that images should be +written in tile-compressed format by enclosing the compression +parameters in square brackets following the root disk file name. The +`imcopy' example program that included with the CFITSIO distribution +can be used for this purpose to compress or uncompress images. Here +are some examples of the extended file name syntax for specifying +tile-compressed output images: + +\begin{verbatim} + myfile.fit[compress] - use the default compression algorithm (Rice) + and the default tile size (row by row) + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + myfile.fit[compress HCOMP] + + myfile.fit[compress R 100,100] - use Rice, GZIP, or HCOMPRESS compression + myfile.fit[compress G 100,100] and 100 x 100 pixel tile size + myfile.fit[compress H 100,100] + + myfile.fit[compress R 100,100;2] - Rice or GZIP, use noisebits = 2 + myfile.fit[compress G 100,100;2] when compressing floating point image + + myfile.fit[compress H; 25 1] - HCOMPRESS, with scale = 25 and smooth = 1 +\end{verbatim} + +2) Before calling the CFITSIO routine to write the image header +keywords (e.g., fits\_create\_image) the programmer can call the +routines described below to specify the compression algorithm and the +tiling pattern that is to be used. There are routines for specifying +the various compression parameters and similar routines to +return the current values of the parameters: +\label{ffsetcomp} \label{ffgetcomp} + +\begin{verbatim} + int fits_set_compression_type(fitsfile *fptr, int comptype, int *status) + int fits_set_tile_dim(fitsfile *fptr, int ndim, long *tilesize, int *status) + int fits_set_noise_bits(fitsfile *fptr, int noisebits, int *status) + int fits_set_hcomp_scale(fitsfile *fptr, int scale, int *status) + int fits_set_hcomp_smooth(fitsfile *fptr, int smooth, int *status) + + int fits_get_compression_type(fitsfile *fptr, int *comptype, int *status) + int fits_get_tile_dim(fitsfile *fptr, int ndim, long *tilesize, int *status) + int fits_get_noise_bits(fitsfile *fptr, int *noisebits, int *status) + int fits_get_hcomp_scale(fitsfile *fptr, int *scale, int *status) + int fits_get_hcomp_smooth(fitsfile *fptr, int *smooth, int *status) +\end{verbatim} +4 symbolic constants are defined for use as the value of the +`comptype' parameter: GZIP\_1, RICE\_1, HCOMPRESS\_1 or PLIO\_1. +Entering NULL for +comptype will turn off the tile-compression and cause normal FITS +images to be written. + +The HCOMPRESS algorithm has 2 parameters. The first is the scale +factor that controls the amount of compression. The default value +of scale = 0 (or 1) results in lossless compression. Values of scale greater +than 1 will produce larger amounts of 'lossy' compression. As a rule +of thumb setting scale to about 2 times the RMS noise in the +sky background of typical astronomical image will compress the image +by about a factor of 10, with minimal loss of significant information. +Larger values of scale will produce greater compression, but with more +loss of information. The fits\_rms\_float and fits\_rms\_short routines +can be used to calculate the RMS value in an image. + +The second HCOMPRESS parameter controls whether to slightly smooth +the image after decompressing it, if it was 'lossy' compressed +(with smooth > 1). Smoothing helps to remove some of the 'blockiness' +in the image, especially if it was highly compressed. The default +is to not smooth the image (smooth = 0), but setting smooth to 1 (or +any non-zero value) will cause the image to be smoothed. + +The 'noisebits' parameter is only relevant when compressing floating point +images (with BITPIX = 32 or 64). +The default value is 4. Decreasing the value of noisebits +will improve the overall compression efficiency at the expense of +losing more information. + +The following 2 routines are available for compressing or +or decompressing an image: + +\begin{verbatim} + int fits_img_compress(fitsfile *infptr, fitsfile *outfptr, int *status); + int fits_img_decompress (fitsfile *infptr, fitsfile *outfptr, int *status); +\end{verbatim} +Before calling the compression routine, the compression parameters must +first be defined in one of the 2 way described in the previous paragraphs. +There is also a routine to determine if the current HDU contains +a tile compressed image (it returns 1 or 0): + +\begin{verbatim} + int fits_is_compressed_image(fitsfile *fptr, int *status); +\end{verbatim} +A small example program called 'imcopy' is included with CFITSIO that +can be used to compress (or uncompress) any FITS image. This +program can be used to experiment with the various compression options +on existing FITS images as shown in these examples: + +\begin{verbatim} +1) imcopy infile.fit 'outfile.fit[compress]' + + This will use the default compression algorithm (Rice) and the + default tile size (row by row) + +2) imcopy infile.fit 'outfile.fit[compress GZIP]' + + This will use the GZIP compression algorithm and the default + tile size (row by row). The allowed compression algorithms are + Rice, GZIP, and PLIO. Only the first letter of the algorithm + name needs to be specified. + +3) imcopy infile.fit 'outfile.fit[compress G 100,100]' + + This will use the GZIP compression algorithm and 100 X 100 pixel + tiles. + +4) imcopy infile.fit 'outfile.fit[compress R 100,100; 4]' + + This will use the Rice compression algorithm, 100 X 100 pixel + tiles, and noise_bits = 4 (assuming the input image has a + floating point data type). Decreasing the value of noisebits + will improve the overall compression efficiency at the expense + of losing more information. + +5) imcopy infile.fit outfile.fit + + If the input file is in tile-compressed format, then it will be + uncompressed to the output file. Otherwise, it simply copies + the input image to the output image. + +6) imcopy 'infile.fit[1001:1500,2001:2500]' outfile.fit + + This extracts a 500 X 500 pixel section of the much larger + input image (which may be in tile-compressed format). The + output is a normal uncompressed FITS image. + +7) imcopy 'infile.fit[1001:1500,2001:2500]' outfile.fit.gz + + Same as above, except the output file is externally compressed + using the gzip algorithm. + +\end{verbatim} + +\section{ASCII and Binary Table Routines} + +These routines perform read and write operations on columns of data in +FITS ASCII or Binary tables. Note that in the following discussions, +the first row and column in a table is at position 1 not 0. + +Users should also read the following chapter on the CFITSIO iterator +function which provides a more `object oriented' method of reading and +writing table columns. The iterator function is a little more +complicated to use, but the advantages are that it usually takes less +code to perform the same operation, and the resulting program oftens +runs faster because the FITS files are read and written using the most +efficient block size. + + +\subsection{Create New Table} + + +\begin{description} +\item[1 ]Create a new ASCII or bintable table extension. If + the FITS file is currently empty then a dummy primary array will be + created before appending the table extension to it. The tbltype + parameter defines the type of table and can have values of + ASCII\_TBL or BINARY\_TBL. The naxis2 parameter gives the initial + number of rows to be created in the table, and should normally be + set = 0. CFITSIO will automatically increase the size of the table + as additional rows are written. A non-zero number of rows may be + specified to reserve space for that many rows, even if a fewer + number of rows will be written. The tunit and extname parameters + are optional and a null pointer may be given if they are not + defined. The FITS Standard recommends that only letters, digits, + and the underscore character be used in column names (the ttype + parameter) with no embedded spaces. Trailing blank characters are + not significant. It is recommended that all the column names in a + given table be unique within the first 8 characters, and strongly + recommended that the names be + unique within the first 16 characters. \label{ffcrtb} +\end{description} + +\begin{verbatim} + int fits_create_tbl / ffcrtb + (fitsfile *fptr, int tbltype, LONGLONG naxis2, int tfields, char *ttype[], + char *tform[], char *tunit[], char *extname, int *status) +\end{verbatim} + +\subsection{Column Information Routines} + + +\begin{description} +\item[1 ] Get the number of rows or columns in the current FITS table. + The number of rows is given by the NAXIS2 keyword and the + number of columns is given by the TFIELDS keyword in the header + of the table. \label{ffgnrw} +\end{description} + +\begin{verbatim} + int fits_get_num_rows / ffgnrw + (fitsfile *fptr, > long *nrows, int *status); + + int fits_get_num_rowsll / ffgnrwll + (fitsfile *fptr, > LONGLONG *nrows, int *status); + + int fits_get_num_cols / ffgncl + (fitsfile *fptr, > int *ncols, int *status); +\end{verbatim} + + +\begin{description} +\item[2 ] Get the table column number (and name) of the column whose name +matches an input template name. If casesen = CASESEN then the column +name match will be case-sensitive, whereas if casesen = CASEINSEN then +the case will be ignored. As a general rule, the column names should +be treated as case INsensitive. + +The input column name template may be either the exact name of the +column to be searched for, or it may contain wild card characters (*, +?, or \#), or it may contain the integer number of the desired column +(with the first column = 1). The `*' wild card character matches any +sequence of characters (including zero characters) and the `?' +character matches any single character. The \# wildcard will match any +consecutive string of decimal digits (0-9). If more than one column +name in the table matches the template string, then the first match is +returned and the status value will be set to COL\_NOT\_UNIQUE as a +warning that a unique match was not found. To find the other cases +that match the template, call the routine again leaving the input +status value equal to COL\_NOT\_UNIQUE and the next matching name will +then be returned. Repeat this process until a status = +COL\_NOT\_FOUND is returned. + +The FITS Standard recommends that only letters, digits, and the +underscore character be used in column names (with no embedded +spaces). Trailing blank characters are not significant. It is +recommended that all the column names in a given table be unique within +the first 8 characters, and strongly recommended that the names be + unique within the first 16 characters. \label{ffgcno} \label{ffgcnn} +\end{description} + +\begin{verbatim} + int fits_get_colnum / ffgcno + (fitsfile *fptr, int casesen, char *templt, > int *colnum, + int *status) + + int fits_get_colname / ffgcnn + (fitsfile *fptr, int casesen, char *templt, > char *colname, + int *colnum, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Return the data type, vector repeat value, and the width in bytes + of a column in an ASCII or binary table. Allowed values for the + data type in ASCII tables are: TSTRING, TSHORT, TLONG, TFLOAT, and + TDOUBLE. Binary tables also support these types: TLOGICAL, TBIT, + TBYTE, TCOMPLEX and TDBLCOMPLEX. The negative of the data type code + value is returned if it is a variable length array column. Note + that in the case of a 'J' 32-bit integer binary table column, this + routine will return data type = TINT32BIT (which in fact is + equivalent to TLONG). With most current C compilers, a value in a + 'J' column has the same size as an 'int' variable, and may not be + equivalent to a 'long' variable, which is 64-bits long on an + increasing number of compilers. + + The 'repeat' parameter returns the vector repeat count on the binary + table TFORMn keyword value. (ASCII table columns always have repeat + = 1). The 'width' parameter returns the width in bytes of a single + column element (e.g., a '10D' binary table column will have width = + 8, an ASCII table 'F12.2' column will have width = 12, and a binary + table'60A' character string column will have width = 60); Note that + CFITSIO supports the local convention for specifying arrays of + fixed length strings within a binary table character column using + the syntax TFORM = 'rAw' where 'r' is the total number of characters + (= the width of the column) and 'w' is the width of a unit string + within the column. Thus if the column has TFORM = '60A12' then this + means that each row of the table contains 5 12-character substrings + within the 60-character field, and thus in this case this routine will + return typecode = TSTRING, repeat = 60, and width = 12. (The TDIMn + keyword may also be used to specify the unit string length; The pair + of keywords TFORMn = '60A' and TDIMn = '(12,5)' would have the + same effect as TFORMn = '60A12'). The number + of substings in any binary table character string field can be + calculated by (repeat/width). A null pointer may be given for any of + the output parameters that are not needed. + + The second routine, fit\_get\_eqcoltype is similar except that in + the case of scaled integer columns it returns the 'equivalent' data + type that is needed to store the scaled values, and not necessarily + the physical data type of the unscaled values as stored in the FITS + table. For example if a '1I' column in a binary table has TSCALn = + 1 and TZEROn = 32768, then this column effectively contains unsigned + short integer values, and thus the returned value of typecode will + be TUSHORT, not TSHORT. Similarly, if a column has TTYPEn = '1I' + and TSCALn = 0.12, then the returned typecode + will be TFLOAT. \label{ffgtcl} +\end{description} + +\begin{verbatim} + int fits_get_coltype / ffgtcl + (fitsfile *fptr, int colnum, > int *typecode, long *repeat, + long *width, int *status) + + int fits_get_coltypell / ffgtclll + (fitsfile *fptr, int colnum, > int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status) + + int fits_get_eqcoltype / ffeqty + (fitsfile *fptr, int colnum, > int *typecode, long *repeat, + long *width, int *status) + + int fits_get_eqcoltypell / ffeqtyll + (fitsfile *fptr, int colnum, > int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Return the display width of a column. This is the length + of the string that will be returned by the fits\_read\_col routine + when reading the column as a formatted string. The display width is + determined by the TDISPn keyword, if present, otherwise by the data + type of the column. \label{ffgcdw} +\end{description} + +\begin{verbatim} + int fits_get_col_display_width / ffgcdw + (fitsfile *fptr, int colnum, > int *dispwidth, int *status) +\end{verbatim} + + +\begin{description} +\item[5 ] Return the number of and size of the dimensions of a table column in + a binary table. Normally this information is given by the TDIMn keyword, + but if this keyword is not present then this routine returns naxis = 1 + and naxes[0] equal to the repeat count in the TFORM keyword. \label{ffgtdm} +\end{description} + +\begin{verbatim} + int fits_read_tdim / ffgtdm + (fitsfile *fptr, int colnum, int maxdim, > int *naxis, + long *naxes, int *status) + + int fits_read_tdimll / ffgtdmll + (fitsfile *fptr, int colnum, int maxdim, > int *naxis, + LONGLONG *naxes, int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Decode the input TDIMn keyword string (e.g. '(100,200)') and return the + number of and size of the dimensions of a binary table column. If the input + tdimstr character string is null, then this routine returns naxis = 1 + and naxes[0] equal to the repeat count in the TFORM keyword. This routine + is called by fits\_read\_tdim. \label{ffdtdm} +\end{description} + +\begin{verbatim} + int fits_decode_tdim / ffdtdm + (fitsfile *fptr, char *tdimstr, int colnum, int maxdim, > int *naxis, + long *naxes, int *status) + + int fits_decode_tdimll / ffdtdmll + (fitsfile *fptr, char *tdimstr, int colnum, int maxdim, > int *naxis, + LONGLONG *naxes, int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Write a TDIMn keyword whose value has the form '(l,m,n...)' + where l, m, n... are the dimensions of a multidimension array + column in a binary table. \label{ffptdm} +\end{description} + +\begin{verbatim} + int fits_write_tdim / ffptdm + (fitsfile *fptr, int colnum, int naxis, long *naxes, > int *status) + + int fits_write_tdimll / ffptdmll + (fitsfile *fptr, int colnum, int naxis, LONGLONG *naxes, > int *status) +\end{verbatim} + + +\subsection{Routines to Edit Rows or Columns} + + +\begin{description} +\item[1 ] Insert or delete rows in an ASCII or binary table. When inserting rows + all the rows following row FROW are shifted down by NROWS rows; if + FROW = 0 then the blank rows are inserted at the beginning of the + table. The first delete routine deletes NROWS consecutive rows + starting with row FIRSTROW. The second delete routine takes an + input string that lists the rows or row ranges (e.g., + '5-10,12,20-30'), whereas the third delete routine takes an input + integer array that specifies each individual row to be deleted. In + both latter cases, the input list of rows to delete must be sorted + in ascending order. These routines update the NAXIS2 keyword to + reflect the new number of rows in the + table. \label{ffirow} \label{ffdrow} \label{ffdrws} \label{ffdrrg} +\end{description} + +\begin{verbatim} + int fits_insert_rows / ffirow + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, > int *status) + + int fits_delete_rows / ffdrow + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, > int *status) + + int fits_delete_rowrange / ffdrrg + (fitsfile *fptr, char *rangelist, > int *status) + + int fits_delete_rowlist / ffdrws + (fitsfile *fptr, long *rowlist, long nrows, > int *status) + + int fits_delete_rowlistll / ffdrwsll + (fitsfile *fptr, LONGLONG *rowlist, LONGLONG nrows, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Insert or delete column(s) in an ASCII or binary + table. When inserting, COLNUM specifies the column number that the + (first) new column should occupy in the table. NCOLS specifies how + many columns are to be inserted. Any existing columns from this + position and higher are shifted over to allow room for the new + column(s). The index number on all the following keywords will be + incremented or decremented if necessary to reflect the new position + of the column(s) in the table: TBCOLn, TFORMn, TTYPEn, TUNITn, + TNULLn, TSCALn, TZEROn, TDISPn, TDIMn, TLMINn, TLMAXn, TDMINn, + TDMAXn, TCTYPn, TCRPXn, TCRVLn, TCDLTn, TCROTn, + and TCUNIn. \label{fficol} \label{fficls} \label{ffdcol} +\end{description} + +\begin{verbatim} + int fits_insert_col / fficol + (fitsfile *fptr, int colnum, char *ttype, char *tform, + > int *status) + + int fits_insert_cols / fficls + (fitsfile *fptr, int colnum, int ncols, char **ttype, + char **tform, > int *status) + + int fits_delete_col / ffdcol(fitsfile *fptr, int colnum, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Copy a column from one HDU to another (or to the same HDU). If + create\_col = TRUE, then a new column will be inserted in the output + table, at position `outcolumn', otherwise the existing output column will + be overwritten (in which case it must have a compatible data type). + If outcolnum is greater than the number of column in the table, then + the new column will be appended to the end of the table. + Note that the first column in a table is at colnum = 1. + The standard indexed keywords that related to the column (e.g., TDISPn, + TUNITn, TCRPXn, TCDLTn, etc.) will also be copied. \label{ffcpcl} +\end{description} + +\begin{verbatim} + int fits_copy_col / ffcpcl + (fitsfile *infptr, fitsfile *outfptr, int incolnum, int outcolnum, + int create_col, > int *status); +\end{verbatim} + +\begin{description} +\item[4 ] Modify the vector length of a binary table column (e.g., + change a column from TFORMn = '1E' to '20E'). The vector + length may be increased or decreased from the current value. \label{ffmvec} +\end{description} + +\begin{verbatim} + int fits_modify_vector_len / ffmvec + (fitsfile *fptr, int colnum, LONGLONG newveclen, > int *status) +\end{verbatim} + +\subsection{Read and Write Column Data Routines} + +The following routines write or read data values in the current ASCII +or binary table extension. If a write operation extends beyond the +current size of the table, then the number of rows in the table will +automatically be increased and the NAXIS2 keyword value will be +updated. Attempts to read beyond the end of the table will result in +an error. + +Automatic data type conversion is performed for numerical data types +(only) if the data type of the column (defined by the TFORMn keyword) +differs from the data type of the array in the calling routine. ASCII and binary +tables support the following data type values: TSTRING, TBYTE, TSBYTE, TSHORT, +TUSHORT, TINT, TUINT, TLONG, TLONGLONG, TULONG, TFLOAT, or TDOUBLE. +Binary tables also support TLOGICAL (internally mapped to the `char' +data type), TCOMPLEX, and TDBLCOMPLEX. + +Individual bits in a binary table 'X' or 'B' column may be read/written +to/from a *char array by specifying the TBIT datatype. The *char +array will be interpreted as an array of logical TRUE (1) or FALSE (0) +values that correspond to the value of each bit in the FITS 'X' or 'B' column. +Alternatively, the values in a binary table 'X' column may be read/written +8 bits at a time to/from an array of 8-bit integers by specifying the +TBYTE datatype. + +Note that within the context of these routines, the TSTRING data type +corresponds to a C 'char**' data type, i.e., a pointer to an array of +pointers to an array of characters. This is different from the keyword +reading and writing routines where TSTRING corresponds to a C 'char*' +data type, i.e., a single pointer to an array of characters. When +reading strings from a table, the char arrays obviously must have been +allocated long enough to hold the whole FITS table string. + +Numerical data values are automatically scaled by the TSCALn and TZEROn +keyword values (if they exist). + +In the case of binary tables with vector elements, the 'felem' +parameter defines the starting element (beginning with 1, not 0) within +the cell (a cell is defined as the intersection of a row and a column +and may contain a single value or a vector of values). The felem +parameter is ignored when dealing with ASCII tables. Similarly, in the +case of binary tables the 'nelements' parameter specifies the total +number of vector values to be read or written (continuing on subsequent +rows if required) and not the number of table cells. + + +\begin{description} +\item[1 ] Write elements into an ASCII or binary table column. +\end{description} + The first routine simply writes the array of values to the FITS file + (doing data type conversion if necessary) whereas the second routine + will substitute the appropriate FITS null value for all elements + which are equal to the input value of nulval (note that this + parameter gives the address of nulval, not the null value + itself). For integer columns the FITS null value is defined by the + TNULLn keyword (an error is returned if the keyword doesn't exist). + For floating point columns the special IEEE NaN (Not-a-Number) + value will be written into the FITS file. If a null pointer is + entered for nulval, then the null value is ignored and this routine + behaves the same as the first routine. The third routine + simply writes undefined pixel values to the column. The fourth routine + fills every column in the table with null values, in the specified + rows (ignoring any columns that do not have a defined null value). + \label{ffpcl} \label{ffpcn} \label{ffpclu} + +\begin{verbatim} + int fits_write_col / ffpcl + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, > int *status) + + int fits_write_colnull / ffpcn + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, DTYPE *nulval, + > int *status) + + int fits_write_col_null / ffpclu + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, > int *status) + + int fits_write_nullrows / ffprwu + (fitsfile *fptr, LONGLONG firstrow, LONGLONG nelements, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Read elements from an ASCII or binary table column. The data type + parameter specifies the data type of the `nulval' and `array' pointers; + Undefined array elements will be returned with a value = *nullval, + (note that this parameter gives the address of the null value, not the + null value itself) unless nulval = 0 or *nulval = 0, in which case + no checking for undefined pixels will be performed. The second + routine is similar except that any undefined pixels will have the + corresponding nullarray element set equal to TRUE (= 1). + + Any column, regardless of it's intrinsic data type, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column + as a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + data type of the column. The length of the returned strings (not + including the null terminating character) can be determined with + the fits\_get\_col\_display\_width routine. The following TDISPn + display formats are currently supported: + +\begin{verbatim} + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +\end{verbatim} + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the + decimal. The .m field is optional. + \label{ffgcv} \label{ffgcf} +\end{description} + +\begin{verbatim} + int fits_read_col / ffgcv + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *nulval, DTYPE *array, int *anynul, int *status) + + int fits_read_colnull / ffgcf + (fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, char *nullarray, int *anynul, int *status) +\end{verbatim} + + +\subsection{Row Selection and Calculator Routines} + +These routines all parse and evaluate an input string containing a user +defined arithmetic expression. The first 3 routines select rows in a +FITS table, based on whether the expression evaluates to true (not +equal to zero) or false (zero). The other routines evaluate the +expression and calculate a value for each row of the table. The +allowed expression syntax is described in the row filter section in the +`Extended File Name Syntax' chapter of this document. The expression +may also be written to a text file, and the name of the file, prepended +with a '@' character may be supplied for the 'expr' parameter (e.g. +'@filename.txt'). The expression in the file can be arbitrarily +complex and extend over multiple lines of the file. Lines that begin +with 2 slash characters ('//') will be ignored and may be used to add +comments to the file. + + +\begin{description} +\item[1 ] Evaluate a boolean expression over the indicated rows, returning an + array of flags indicating which rows evaluated to TRUE/FALSE \label{fffrow} +\end{description} + +\begin{verbatim} + int fits_find_rows / fffrow + (fitsfile *fptr, char *expr, long firstrow, long nrows, + > long *n_good_rows, char *row_status, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Find the first row which satisfies the input boolean expression \label{ffffrw} +\end{description} + +\begin{verbatim} + int fits_find_first_row / ffffrw + (fitsfile *fptr, char *expr, > long *rownum, int *status) +\end{verbatim} + +\begin{description} +\item[3 ]Evaluate an expression on all rows of a table. If the input and output +files are not the same, copy the TRUE rows to the output file. If the +files are the same, delete the FALSE rows (preserve the TRUE rows). \label{ffsrow} +\end{description} + +\begin{verbatim} + int fits_select_rows / ffsrow + (fitsfile *infptr, fitsfile *outfptr, char *expr, > int *status ) +\end{verbatim} + +\begin{description} +\item[4 ] Calculate an expression for the indicated rows of a table, returning +the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If +nulval==NULL, UNDEFs will be zeroed out. For vector results, the number +of elements returned may be less than nelements if nelements is not an +even multiple of the result dimension. Call fits\_test\_expr to obtain +the dimensions of the results. \label{ffcrow} +\end{description} + +\begin{verbatim} + int fits_calc_rows / ffcrow + (fitsfile *fptr, int datatype, char *expr, long firstrow, + long nelements, void *nulval, > void *array, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Evaluate an expression and write the result either to a column (if +the expression is a function of other columns in the table) or to a +keyword (if the expression evaluates to a constant and is not a +function of other columns in the table). In the former case, the +parName parameter is the name of the column (which may or may not already +exist) into which to write the results, and parInfo contains an +optional TFORM keyword value if a new column is being created. If a +TFORM value is not specified then a default format will be used, +depending on the expression. If the expression evaluates to a constant, +then the result will be written to the keyword name given by the +parName parameter, and the parInfo parameter may be used to supply an +optional comment for the keyword. If the keyword does not already +exist, then the name of the keyword must be preceded with a '\#' character, +otherwise the result will be written to a column with that name. + \label{ffcalc} +\end{description} + +\begin{verbatim} + int fits_calculator / ffcalc + (fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, + char *parInfo, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] This calculator routine is similar to the previous routine, except +that the expression is only evaluated over the specified +row ranges. nranges specifies the number of row ranges, and firstrow +and lastrow give the starting and ending row number of each range. + \label{ffcalcrng} +\end{description} + +\begin{verbatim} + int fits_calculator_rng / ffcalc_rng + (fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, + char *parInfo, int nranges, long *firstrow, long *lastrow + > int *status) +\end{verbatim} + + +\begin{description} +\item[7 ]Evaluate the given expression and return information on the result. \label{fftexp} +\end{description} + +\begin{verbatim} + int fits_test_expr / fftexp + (fitsfile *fptr, char *expr, > int *datatype, long *nelem, int *naxis, + long *naxes, int *status) +\end{verbatim} + + + +\section{Utility Routines} + + +\subsection{File Checksum Routines} + +The following routines either compute or validate the checksums for the +CHDU. The DATASUM keyword is used to store the numerical value of the +32-bit, 1's complement checksum for the data unit alone. If there is +no data unit then the value is set to zero. The numerical value is +stored as an ASCII string of digits, enclosed in quotes, because the +value may be too large to represent as a 32-bit signed integer. The +CHECKSUM keyword is used to store the ASCII encoded COMPLEMENT of the +checksum for the entire HDU. Storing the complement, rather than the +actual checksum, forces the checksum for the whole HDU to equal zero. +If the file has been modified since the checksums were computed, then +the HDU checksum will usually not equal zero. These checksum keyword +conventions are based on a paper by Rob Seaman published in the +proceedings of the ADASS IV conference in Baltimore in November 1994 +and a later revision in June 1995. See Appendix B for the definition +of the parameters used in these routines. + + +\begin{description} +\item[1 ] Compute and write the DATASUM and CHECKSUM keyword values for the CHDU + into the current header. If the keywords already exist, their values + will be updated only if necessary (i.e., if the file + has been modified since the original keyword + values were computed). \label{ffpcks} +\end{description} + +\begin{verbatim} + int fits_write_chksum / ffpcks + (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Update the CHECKSUM keyword value in the CHDU, assuming that the + DATASUM keyword exists and already has the correct value. This routine + calculates the new checksum for the current header unit, adds it to the + data unit checksum, encodes the value into an ASCII string, and writes + the string to the CHECKSUM keyword. \label{ffupck} +\end{description} + +\begin{verbatim} + int fits_update_chksum / ffupck + (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Verify the CHDU by computing the checksums and comparing + them with the keywords. The data unit is verified correctly + if the computed checksum equals the value of the DATASUM + keyword. The checksum for the entire HDU (header plus data unit) is + correct if it equals zero. The output DATAOK and HDUOK parameters + in this routine are integers which will have a value = 1 + if the data or HDU is verified correctly, a value = 0 + if the DATASUM or CHECKSUM keyword is not present, or value = -1 + if the computed checksum is not correct. \label{ffvcks} +\end{description} + +\begin{verbatim} + int fits_verify_chksum / ffvcks + (fitsfile *fptr, > int *dataok, int *hduok, int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Compute and return the checksum values for the CHDU + without creating or modifying the + CHECKSUM and DATASUM keywords. This routine is used internally by + ffvcks, but may be useful in other situations as well. \label{ffgcks} +\end{description} + +\begin{verbatim} + int fits_get_chksum/ /ffgcks + (fitsfile *fptr, > unsigned long *datasum, unsigned long *hdusum, + int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Encode a checksum value + into a 16-character string. If complm is non-zero (true) then the 32-bit + sum value will be complemented before encoding. \label{ffesum} +\end{description} + +\begin{verbatim} + int fits_encode_chksum / ffesum + (unsigned long sum, int complm, > char *ascii); +\end{verbatim} + +\begin{description} +\item[6 ] Decode a 16-character checksum string into a unsigned long value. + If is non-zero (true). then the 32-bit sum value will be complemented + after decoding. The checksum value is also returned as the + value of the function. \label{ffdsum} +\end{description} + +\begin{verbatim} + unsigned long fits_decode_chksum / ffdsum + (char *ascii, int complm, > unsigned long *sum); +\end{verbatim} + + +\subsection{Date and Time Utility Routines} + +The following routines help to construct or parse the FITS date/time +strings. Starting in the year 2000, the FITS DATE keyword values (and +the values of other `DATE-' keywords) must have the form 'YYYY-MM-DD' +(date only) or 'YYYY-MM-DDThh:mm:ss.ddd...' (date and time) where the +number of decimal places in the seconds value is optional. These times +are in UTC. The older 'dd/mm/yy' date format may not be used for dates +after 01 January 2000. See Appendix B for the definition of the +parameters used in these routines. + + +\begin{description} +\item[1 ] Get the current system date. C already provides standard + library routines for getting the current date and time, + but this routine is provided for compatibility with + the Fortran FITSIO library. The returned year has 4 digits + (1999, 2000, etc.) \label{ffgsdt} +\end{description} + +\begin{verbatim} + int fits_get_system_date/ffgsdt + ( > int *day, int *month, int *year, int *status ) +\end{verbatim} + + +\begin{description} +\item[2 ] Get the current system date and time string ('YYYY-MM-DDThh:mm:ss'). +The time will be in UTC/GMT if available, as indicated by a returned timeref +value = 0. If the returned value of timeref = 1 then this indicates that +it was not possible to convert the local time to UTC, and thus the local +time was returned. +\end{description} + +\begin{verbatim} + int fits_get_system_time/ffgstm + (> char *datestr, int *timeref, int *status) +\end{verbatim} + + +\begin{description} +\item[3 ] Construct a date string from the input date values. If the year +is between 1900 and 1998, inclusive, then the returned date string will +have the old FITS format ('dd/mm/yy'), otherwise the date string will +have the new FITS format ('YYYY-MM-DD'). Use fits\_time2str instead + to always return a date string using the new FITS format. \label{ffdt2s} +\end{description} + +\begin{verbatim} + int fits_date2str/ffdt2s + (int year, int month, int day, > char *datestr, int *status) +\end{verbatim} + + +\begin{description} +\item[4 ] Construct a new-format date + time string ('YYYY-MM-DDThh:mm:ss.ddd...'). + If the year, month, and day values all = 0 then only the time is encoded + with format 'hh:mm:ss.ddd...'. The decimals parameter specifies how many + decimal places of fractional seconds to include in the string. If `decimals' + is negative, then only the date will be return ('YYYY-MM-DD'). +\end{description} + +\begin{verbatim} + int fits_time2str/fftm2s + (int year, int month, int day, int hour, int minute, double second, + int decimals, > char *datestr, int *status) +\end{verbatim} + + +\begin{description} +\item[5 ] Return the date as read from the input string, where the string may be +in either the old ('dd/mm/yy') or new ('YYYY-MM-DDThh:mm:ss' or +'YYYY-MM-DD') FITS format. Null pointers may be supplied for any + unwanted output date parameters. +\end{description} + +\begin{verbatim} + int fits_str2date/ffs2dt + (char *datestr, > int *year, int *month, int *day, int *status) +\end{verbatim} + + +\begin{description} +\item[6 ] Return the date and time as read from the input string, where the +string may be in either the old or new FITS format. The returned hours, +minutes, and seconds values will be set to zero if the input string +does not include the time ('dd/mm/yy' or 'YYYY-MM-DD') . Similarly, +the returned year, month, and date values will be set to zero if the +date is not included in the input string ('hh:mm:ss.ddd...'). Null +pointers may be supplied for any unwanted output date and time +parameters. +\end{description} + +\begin{verbatim} + int fits_str2time/ffs2tm + (char *datestr, > int *year, int *month, int *day, int *hour, + int *minute, double *second, int *status) +\end{verbatim} + + +\subsection{General Utility Routines} + +The following utility routines may be useful for certain applications. + + +\begin{description} +\item[1 ] Return the revision number of the CFITSIO library. + The revision number will be incremented with each new + release of CFITSIO. \label{ffvers} +\end{description} + +\begin{verbatim} + float fits_get_version / ffvers ( > float *version) +\end{verbatim} + +\begin{description} +\item[2 ] Write an 80-character message to the CFITSIO error stack. Application + programs should not normally write to the stack, but there may be + some situations where this is desirable. \label{ffpmsg} +\end{description} + +\begin{verbatim} + void fits_write_errmsg / ffpmsg (char *err_msg) +\end{verbatim} + +\begin{description} +\item[3 ] Convert a character string to uppercase (operates in place). \label{ffupch} +\end{description} + +\begin{verbatim} + void fits_uppercase / ffupch (char *string) +\end{verbatim} + +\begin{description} +\item[4 ] Compare the input template string against the reference string + to see if they match. The template string may contain wildcard + characters: '*' will match any sequence of characters (including + zero characters) and '?' will match any single character in the + reference string. The '\#' character will match any consecutive string + of decimal digits (0 - 9). If casesen = CASESEN = TRUE then the match will + be case sensitive, otherwise the case of the letters will be ignored + if casesen = CASEINSEN = FALSE. The returned MATCH parameter will be + TRUE if the 2 strings match, and EXACT will be TRUE if the match is + exact (i.e., if no wildcard characters were used in the match). + Both strings must be 68 characters or less in length. \label{ffcmps} +\end{description} + +\begin{verbatim} + void fits_compare_str / ffcmps + (char *templt, char *string, int casesen, > int *match, int *exact) +\end{verbatim} + +\begin{description} +\item[5 ]Split a string containing a list of names (typically file names or column + names) into individual name tokens by a sequence of calls to + fits\_split\_names. The names in the list must be delimited by a comma + and/or spaces. This routine ignores spaces and commas that occur + within parentheses, brackets, or curly brackets. It also strips any + leading and trailing blanks from the returned name. + + This routine is similar to the ANSI C 'strtok' function: + + The first call to fits\_split\_names has a non-null input string. + It finds the first name in the string and terminates it by overwriting + the next character of the string with a null terminator and returns a + pointer to the name. Each subsequent call, indicated by a NULL value + of the input string, returns the next name, searching from just past + the end of the previous name. It returns NULL when no further names + are found. \label{splitnames} +\end{description} + +\begin{verbatim} + char *fits_split_names(char *namelist) +\end{verbatim} + The following example shows how a string would be split into 3 names: + +\begin{verbatim} + myfile[1][bin (x,y)=4], file2.fits file3.fits + ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ + 1st name 2nd name 3rd name +\end{verbatim} + +\begin{description} +\item[6 ] Test that the keyword name contains only legal characters (A-Z,0-9, + hyphen, and underscore) or that the keyword record contains only legal + printable ASCII characters \label{fftkey} \label{fftrec} +\end{description} + +\begin{verbatim} + int fits_test_keyword / fftkey (char *keyname, > int *status) + + int fits_test_record / fftrec (char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Test whether the current header contains any NULL (ASCII 0) characters. + These characters are illegal in the header, but they will go undetected + by most of the CFITSIO keyword header routines, because the null is + interpreted as the normal end-of-string terminator. This routine returns + the position of the first null character in the header, or zero if there + are no nulls. For example a returned value of 110 would indicate that + the first NULL is located in the 30th character of the second keyword + in the header (recall that each header record is 80 characters long). + Note that this is one of the few CFITSIO routines in which the returned + value is not necessarily equal to the status value). + \label{ffnchk} +\end{description} + +\begin{verbatim} + int fits_null_check / ffnchk (char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[8 ] Parse a header keyword record and return the name of the keyword, + and the length of the name. + The keyword name normally occupies the first 8 characters of the + record, except under the HIERARCH convention where the name can + be up to 70 characters in length. \label{ffgknm} +\end{description} + +\begin{verbatim} + int fits_get_keyname / ffgknm + (char *card, > char *keyname, int *keylength, int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Parse a header keyword record, returning the value (as + a literal character string) and comment strings. If the keyword has no + value (columns 9-10 not equal to '= '), then a null value string is + returned and the comment string is set equal to column 9 - 80 of the + input string. \label{ffpsvc} +\end{description} + +\begin{verbatim} + int fits_parse_value / ffpsvc + (char *card, > char *value, char *comment, int *status) +\end{verbatim} + +\begin{description} +\item[10] Construct an array indexed keyword name (ROOT + nnn). + This routine appends the sequence number to the root string to create + a keyword name (e.g., 'NAXIS' + 2 = 'NAXIS2') \label{ffkeyn} +\end{description} + +\begin{verbatim} + int fits_make_keyn / ffkeyn + (char *keyroot, int value, > char *keyname, int *status) +\end{verbatim} + +\begin{description} +\item[11] Construct a sequence keyword name (n + ROOT). + This routine concatenates the sequence number to the front of the + root string to create a keyword name (e.g., 1 + 'CTYP' = '1CTYP') \label{ffnkey} +\end{description} + +\begin{verbatim} + int fits_make_nkey / ffnkey + (int value, char *keyroot, > char *keyname, int *status) +\end{verbatim} + +\begin{description} +\item[12] Determine the data type of a keyword value string. This routine + parses the keyword value string to determine its data type. + Returns 'C', 'L', 'I', 'F' or 'X', for character string, logical, + integer, floating point, or complex, respectively. \label{ffdtyp} +\end{description} + +\begin{verbatim} + int fits_get_keytype / ffdtyp + (char *value, > char *dtype, int *status) +\end{verbatim} + +\begin{description} +\item[13] Return the class of an input header record. The record is classified + into one of the following categories (the class values are + defined in fitsio.h). Note that this is one of the few CFITSIO + routines that does not return a status value. \label{ffgkcl} +\end{description} + +\begin{verbatim} + Class Value Keywords + TYP_STRUC_KEY 10 SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, + GROUPS, PCOUNT, GCOUNT, END + XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, + and the first 4 COMMENT keywords in the primary array + that define the FITS format. + TYP_CMPRS_KEY 20 The experimental keywords used in the compressed + image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, + ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK + TYP_SCAL_KEY 30 BSCALE, BZERO, TSCALn, TZEROn + TYP_NULL_KEY 40 BLANK, TNULLn + TYP_DIM_KEY 50 TDIMn + TYP_RANG_KEY 60 TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX + TYP_UNIT_KEY 70 BUNIT, TUNITn + TYP_DISP_KEY 80 TDISPn + TYP_HDUID_KEY 90 EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL + TYP_CKSUM_KEY 100 CHECKSUM, DATASUM + TYP_WCS_KEY 110 WCS keywords defined in the the WCS papers, including: + CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn + CDj_is, PVj_ms, LONPOLEs, LATPOLEs + TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, + TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn + jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, + iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn + (i,j,m,n are integers, s is any letter) + TYP_REFSYS_KEY 120 EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs, DATE-OBS + TYP_COMM_KEY 130 COMMENT, HISTORY, (blank keyword) + TYP_CONT_KEY 140 CONTINUE + TYP_USER_KEY 150 all other keywords + + int fits_get_keyclass / ffgkcl (char *card) +\end{verbatim} + +\begin{description} +\item[14] Parse the 'TFORM' binary table column format string. + This routine parses the input TFORM character string and returns the + integer data type code, the repeat count of the field, and, in the case + of character string fields, the length of the unit string. See Appendix + B for the allowed values for the returned typecode parameter. A + null pointer may be given for any output parameters that are not needed. \label{ffbnfm} +\end{description} + +\begin{verbatim} + int fits_binary_tform / ffbnfm + (char *tform, > int *typecode, long *repeat, long *width, + int *status) + + int fits_binary_tformll / ffbnfmll + (char *tform, > int *typecode, LONGLONG *repeat, long *width, + int *status) +\end{verbatim} + +\begin{description} +\item[15] Parse the 'TFORM' keyword value that defines the column format in + an ASCII table. This routine parses the input TFORM character + string and returns the data type code, the width of the column, + and (if it is a floating point column) the number of decimal places + to the right of the decimal point. The returned data type codes are + the same as for the binary table, with the following + additional rules: integer columns that are between 1 and 4 characters + wide are defined to be short integers (code = TSHORT). Wider integer + columns are defined to be regular integers (code = TLONG). Similarly, + Fixed decimal point columns (with TFORM = 'Fw.d') are defined to + be single precision reals (code = TFLOAT) if w is between 1 and 7 characters + wide, inclusive. Wider 'F' columns will return a double precision + data code (= TDOUBLE). 'Ew.d' format columns will have datacode = TFLOAT, + and 'Dw.d' format columns will have datacode = TDOUBLE. A null + pointer may be given for any output parameters that are not needed. \label{ffasfm} +\end{description} + +\begin{verbatim} + int fits_ascii_tform / ffasfm + (char *tform, > int *typecode, long *width, int *decimals, + int *status) +\end{verbatim} + +\begin{description} +\item[16] Calculate the starting column positions and total ASCII table width + based on the input array of ASCII table TFORM values. The SPACE input + parameter defines how many blank spaces to leave between each column + (it is recommended to have one space between columns for better human + readability). \label{ffgabc} +\end{description} + +\begin{verbatim} + int fits_get_tbcol / ffgabc + (int tfields, char **tform, int space, > long *rowlen, + long *tbcol, int *status) +\end{verbatim} + +\begin{description} +\item[17] Parse a template header record and return a formatted 80-character string + suitable for appending to (or deleting from) a FITS header file. + This routine is useful for parsing lines from an ASCII template file + and reformatting them into legal FITS header records. The formatted + string may then be passed to the fits\_write\_record, ffmcrd, or + fits\_delete\_key routines + to append or modify a FITS header record. \label{ffgthd} +\end{description} + +\begin{verbatim} + int fits_parse_template / ffgthd + (char *templt, > char *card, int *keytype, int *status) +\end{verbatim} + The input templt character string generally should contain 3 tokens: + (1) the KEYNAME, (2) the VALUE, and (3) the COMMENT string. The + TEMPLATE string must adhere to the following format: + + +\begin{description} +\item[- ] The KEYNAME token must begin in columns 1-8 and be a maximum of 8 + characters long. A legal FITS keyword name may only + contain the characters A-Z, 0-9, and '-' (minus sign) and + underscore. This routine will automatically convert any lowercase + characters to uppercase in the output string. If the first 8 characters + of the template line are + blank then the remainder of the line is considered to be a FITS comment + (with a blank keyword name). +\end{description} + + +\begin{description} +\item[- ] The VALUE token must be separated from the KEYNAME token by one or more + spaces and/or an '=' character. The data type of the VALUE token + (numeric, logical, or character string) is automatically determined + and the output CARD string is formatted accordingly. The value + token may be forced to be interpreted as a string (e.g. if it is a + string of numeric digits) by enclosing it in single quotes. +\end{description} + + +\begin{description} +\item[- ] The COMMENT token is optional, but if present must be separated from + the VALUE token by at least one blank space and a '/' character. +\end{description} + + +\begin{description} +\item[- ] One exception to the above rules is that if the first non-blank + character in the first 8 characters of the template string is a + minus sign ('-') followed + by a single token, or a single token followed by an equal sign, + then it is interpreted as the name of a keyword which is to be + deleted from the FITS header. +\end{description} + + +\begin{description} +\item[- ] The second exception is that if the template string starts with + a minus sign and is followed by 2 tokens (without an equals sign between + them) then the second token + is interpreted as the new name for the keyword specified by + first token. In this case the old keyword name (first token) + is returned in characters 1-8 of the returned CARD string, and + the new keyword name (the second token) is returned in characters + 41-48 of the returned CARD string. These old and new names + may then be passed to the ffmnam routine which will change + the keyword name. +\end{description} + + The keytype output parameter indicates how the returned CARD string + should be interpreted: + +\begin{verbatim} + keytype interpretation + ------- ------------------------------------------------- + -2 Rename the keyword with name = the first 8 characters of CARD + to the new name given in characters 41 - 48 of CARD. + + -1 delete the keyword with this name from the FITS header. + + 0 append the CARD string to the FITS header if the + keyword does not already exist, otherwise update + the keyword value and/or comment field if is already exists. + + 1 This is a HISTORY or COMMENT keyword; append it to the header + + 2 END record; do not explicitly write it to the FITS file. +\end{verbatim} + EXAMPLES: The following lines illustrate valid input template strings: + +\begin{verbatim} + INTVAL 7 / This is an integer keyword + RVAL 34.6 / This is a floating point keyword + EVAL=-12.45E-03 / This is a floating point keyword in exponential notation + lval F / This is a boolean keyword + This is a comment keyword with a blank keyword name + SVAL1 = 'Hello world' / this is a string keyword + SVAL2 '123.5' this is also a string keyword + sval3 123+ / this is also a string keyword with the value '123+ ' + # the following template line deletes the DATE keyword + - DATE + # the following template line modifies the NAME keyword to OBJECT + - NAME OBJECT +\end{verbatim} + +\begin{description} +\item[18] Translate a keyword name into a new name, based on a set of patterns. +This routine is useful for translating keywords in cases such as +adding or deleting columns in +a table, or copying a column from one table to another, or extracting +an array from a cell in a binary table column into an image extension. In +these cases, it is necessary to tranlate the names of the keywords associated +with the original table column(s) into the appropriate keyword name in the final +file. For example, if column 2 is deleted from a table, +then the value of 'n' in all the +TFORMn and TTYPEn keywords for columns 3 and higher must be decremented +by 1. Even more complex translations are sometines needed to convert the +WCS keywords when extracting an image out of a table column cell into +a separate image extension. + +The user passes an array of patterns to be matched. Input pattern +number i is pattern[i][0], and output pattern number i is +pattern[i][1]. Keywords are matched against the input patterns. If a +match is found then the keyword is re-written according to the output +pattern. + +Order is important. The first match is accepted. The fastest match +will be made when templates with the same first character are grouped +together. + +Several characters have special meanings: + +\begin{verbatim} + i,j - single digits, preserved in output template + n - column number of one or more digits, preserved in output template + m - generic number of one or more digits, preserved in output template + a - coordinate designator, preserved in output template + # - number of one or more digits + ? - any character + * - only allowed in first character position, to match all + keywords; only useful as last pattern in the list +\end{verbatim} +i, j, n, and m are returned by the routine. + +For example, the input pattern "iCTYPn" will match "1CTYP5" (if n\_value +is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". +Notice that "i" is preserved. + +The following output patterns are special: + + "-" - do not copy a keyword that matches the corresponding input pattern + + "+" - copy the input unchanged + +The inrec string could be just the 8-char keyword name, or the entire +80-char header record. Characters 9 - 80 in the input string simply get +appended to the translated keyword name. + +If n\_range = 0, then only keywords with 'n' equal to n\_value will be +considered as a pattern match. If n\_range = +1, then all values of +'n' greater than or equal to n\_value will be a match, and if -1, +then values of 'n' less than or equal to n\_value will match.\label{translatekey} +\end{description} + +\begin{verbatim} +int fits_translate_keyword( + char *inrec, /* I - input string */ + char *outrec, /* O - output converted string, or */ + /* a null string if input does not */ + /* match any of the patterns */ + char *patterns[][2],/* I - pointer to input / output string */ + /* templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *pat_num, /* O - matched pattern number (0 based) or -1 */ + int *i, /* O - value of i, if any, else 0 */ + int *j, /* O - value of j, if any, else 0 */ + int *m, /* O - value of m, if any, else 0 */ + int *n, /* O - value of n, if any, else 0 */ + int *status) /* IO - error status */ +\end{verbatim} + +\begin{description} +\item[ ] Here is an example of some of the patterns used to convert the keywords associated +with an image in a cell of a table column into the keywords appropriate for +an IMAGE extension: +\end{description} + +\begin{verbatim} + char *patterns[][2] = {{"TSCALn", "BSCALE" }, /* Standard FITS keywords */ + {"TZEROn", "BZERO" }, + {"TUNITn", "BUNIT" }, + {"TNULLn", "BLANK" }, + {"TDMINn", "DATAMIN" }, + {"TDMAXn", "DATAMAX" }, + {"iCTYPn", "CTYPEi" }, /* Coordinate labels */ + {"iCTYna", "CTYPEia" }, + {"iCUNIn", "CUNITi" }, /* Coordinate units */ + {"iCUNna", "CUNITia" }, + {"iCRVLn", "CRVALi" }, /* WCS keywords */ + {"iCRVna", "CRVALia" }, + {"iCDLTn", "CDELTi" }, + {"iCDEna", "CDELTia" }, + {"iCRPXn", "CRPIXi" }, + {"iCRPna", "CRPIXia" }, + {"ijPCna", "PCi_ja" }, + {"ijCDna", "CDi_ja" }, + {"iVn_ma", "PVi_ma" }, + {"iSn_ma", "PSi_ma" }, + {"iCRDna", "CRDERia" }, + {"iCSYna", "CSYERia" }, + {"iCROTn", "CROTAi" }, + {"WCAXna", "WCSAXESa"}, + {"WCSNna", "WCSNAMEa"}}; +\end{verbatim} + +\begin{description} +\item[19] Translate the keywords in the input HDU into the keywords that are +appropriate for the output HDU. This is a driver routine that calls +the previously described routine. +\end{description} + +\begin{verbatim} +int fits_translate_keywords( + fitsfile *infptr, /* I - pointer to input HDU */ + fitsfile *outfptr, /* I - pointer to output HDU */ + int firstkey, /* I - first HDU record number to start with */ + char *patterns[][2],/* I - pointer to input / output keyword templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *status) /* IO - error status */ +\end{verbatim} + + +\begin{description} +\item[20] Parse the input string containing a list of rows or row ranges, and + return integer arrays containing the first and last row in each + range. For example, if rowlist = "3-5, 6, 8-9" then it will + return numranges = 3, rangemin = 3, 6, 8 and rangemax = 5, 6, 9. + At most, 'maxranges' number of ranges will be returned. 'maxrows' + is the maximum number of rows in the table; any rows or ranges + larger than this will be ignored. The rows must be specified in + increasing order, and the ranges must not overlap. A minus sign + may be use to specify all the rows to the upper or lower bound, so + "50-" means all the rows from 50 to the end of the table, and "-" + means all the rows in the table, from 1 - maxrows. + \label{ffrwrg} +\end{description} + +\begin{verbatim} + int fits_parse_range / ffrwrg(char *rowlist, LONGLONG maxrows, int maxranges, > + int *numranges, long *rangemin, long *rangemax, int *status) + + int fits_parse_rangell / ffrwrgll(char *rowlist, LONGLONG maxrows, int maxranges, > + int *numranges, LONGLONG *rangemin, LONGLONG *rangemax, int *status) +\end{verbatim} + +\begin{description} +\item[21] Check that the Header fill bytes (if any) are all blank. These are the bytes + that may follow END keyword and before the beginning of data unit, + or the end of the HDU if there is no data unit. + \label{ffchfl} +\end{description} + +\begin{verbatim} + int ffchfl(fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[22] Check that the Data fill bytes (if any) are all zero (for IMAGE or + BINARY Table HDU) or all blanks (for ASCII table HDU). These file + bytes may be located after the last valid data byte in the HDU and + before the physical end of the HDU. + \label{ffcdfl} +\end{description} + +\begin{verbatim} + int ffcdfl(fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[23] Estimate the root-mean-squared (RMS) noise in an image. +These routines are mainly for use with the Hcompress image compression +algorithm. They return an estimate of the RMS noise in the background +pixels of the image. This robust algorithm (written by Richard +White, STScI) first attempts to estimate the RMS value +as 1.68 times the median of the absolute differences between successive +pixels in the image. If the median = 0, then the +algorithm falls back to computing the RMS of the difference between successive +pixels, after several N-sigma rejection cycles to remove +extreme values. The input parameters are: the array of image pixel values +(either float or short values), the number of values in the array, +the value that is used to represent null pixels (enter a very +large number if there are no null pixels). \label{imageRMS} +\end{description} + +\begin{verbatim} + int fits_rms_float (float fdata[], int npix, float in_null_value, + > double *rms, int *status) + int fits_rms_short (short fdata[], int npix, short in_null_value, + > double *rms, int *status) +\end{verbatim} + + + +\chapter{ The CFITSIO Iterator Function } + +The fits\_iterate\_data function in CFITSIO provides a unique method of +executing an arbitrary user-supplied `work' function that operates on +rows of data in FITS tables or on pixels in FITS images. Rather than +explicitly reading and writing the FITS images or columns of data, one +instead calls the CFITSIO iterator routine, passing to it the name of +the user's work function that is to be executed along with a list of +all the table columns or image arrays that are to be passed to the work +function. The CFITSIO iterator function then does all the work of +allocating memory for the arrays, reading the input data from the FITS +file, passing them to the work function, and then writing any output +data back to the FITS file after the work function exits. Because +it is often more efficient to process only a subset of the total table +rows at one time, the iterator function can determine the optimum +amount of data to pass in each iteration and repeatly call the work +function until the entire table been processed. + +For many applications this single CFITSIO iterator function can +effectively replace all the other CFITSIO routines for reading or +writing data in FITS images or tables. Using the iterator has several +important advantages over the traditional method of reading and writing +FITS data files: + +\begin{itemize} +\item +It cleanly separates the data I/O from the routine that operates on +the data. This leads to a more modular and `object oriented' +programming style. + +\item +It simplifies the application program by eliminating the need to allocate +memory for the data arrays and eliminates most of the calls to the CFITSIO +routines that explicitly read and write the data. + +\item +It ensures that the data are processed as efficiently as possible. +This is especially important when processing tabular data since +the iterator function will calculate the most efficient number +of rows in the table to be passed at one time to the user's work +function on each iteration. + +\item +Makes it possible for larger projects to develop a library of work +functions that all have a uniform calling sequence and are all +independent of the details of the FITS file format. + +\end{itemize} + +There are basically 2 steps in using the CFITSIO iterator function. +The first step is to design the work function itself which must have a +prescribed set of input parameters. One of these parameters is a +structure containing pointers to the arrays of data; the work function +can perform any desired operations on these arrays and does not need to +worry about how the input data were read from the file or how the +output data get written back to the file. + +The second step is to design the driver routine that opens all the +necessary FITS files and initializes the input parameters to the +iterator function. The driver program calls the CFITSIO iterator +function which then reads the data and passes it to the user's work +function. + +The following 2 sections describe these steps in more detail. There +are also several example programs included with the CFITSIO +distribution which illustrate how to use the iterator function. + + +\section{The Iterator Work Function} + +The user-supplied iterator work function must have the following set of +input parameters (the function can be given any desired name): + + +\begin{verbatim} + int user_fn( long totaln, long offset, long firstn, long nvalues, + int narrays, iteratorCol *data, void *userPointer ) +\end{verbatim} + +\begin{itemize} + +\item + totaln -- the total number of table rows or image pixels + that will be passed to the work function + during 1 or more iterations. + +\item + offset -- the offset applied to the first table row or image + pixel to be passed to the work function. In other + words, this is the number of rows or pixels that + are skipped over before starting the iterations. If + offset = 0, then all the table rows or image pixels + will be passed to the work function. + +\item + firstn -- the number of the first table row or image pixel + (starting with 1) that is being passed in this + particular call to the work function. + +\item + nvalues -- the number of table rows or image pixels that are + being passed in this particular call to the work + function. nvalues will always be less than or + equal to totaln and will have the same value on + each iteration, except possibly on the last + call which may have a smaller value. + +\item + narrays -- the number of arrays of data that are being passed + to the work function. There is one array for each + image or table column. + +\item + *data -- array of structures, one for each + column or image. Each structure contains a pointer + to the array of data as well as other descriptive + parameters about that array. + +\item + *userPointer -- a user supplied pointer that can be used + to pass ancillary information from the driver function + to the work function. + This pointer is passed to the CFITSIO iterator function + which then passes it on to the + work function without any modification. + It may point to a single number, to an array of values, + to a structure containing an arbitrary set of parameters + of different types, + or it may be a null pointer if it is not needed. + The work function must cast this pointer to the + appropriate data type before using it it. +\end{itemize} + +The totaln, offset, narrays, data, and userPointer parameters are +guaranteed to have the same value on each iteration. Only firstn, +nvalues, and the arrays of data pointed to by the data structures may +change on each iterative call to the work function. + +Note that the iterator treats an image as a long 1-D array of pixels +regardless of it's intrinsic dimensionality. The total number of +pixels is just the product of the size of each dimension, and the order +of the pixels is the same as the order that they are stored in the FITS +file. If the work function needs to know the number and size of the +image dimensions then these parameters can be passed via the +userPointer structure. + +The iteratorCol structure is currently defined as follows: + +\begin{verbatim} +typedef struct /* structure for the iterator function column information */ +{ + /* structure elements required as input to fits_iterate_data: */ + + fitsfile *fptr; /* pointer to the HDU containing the column or image */ + int colnum; /* column number in the table; ignored for images */ + char colname[70]; /* name (TTYPEn) of the column; null for images */ + int datatype; /* output data type (converted if necessary) */ + int iotype; /* type: InputCol, InputOutputCol, or OutputCol */ + + /* output structure elements that may be useful for the work function: */ + + void *array; /* pointer to the array (and the null value) */ + long repeat; /* binary table vector repeat value; set */ + /* equal to 1 for images */ + long tlmin; /* legal minimum data value, if any */ + long tlmax; /* legal maximum data value, if any */ + char unit[70]; /* physical unit string (BUNIT or TUNITn) */ + char tdisp[70]; /* suggested display format; null if none */ + +} iteratorCol; +\end{verbatim} + +Instead of directly reading or writing the elements in this structure, +it is recommended that programmers use the access functions that are +provided for this purpose. + +The first five elements in this structure must be initially defined by +the driver routine before calling the iterator routine. The CFITSIO +iterator routine uses this information to determine what column or +array to pass to the work function, and whether the array is to be +input to the work function, output from the work function, or both. +The CFITSIO iterator function fills in the values of the remaining +structure elements before passing it to the work function. + +The array structure element is a pointer to the actual data array and +it must be cast to the correct data type before it is used. The +`repeat' structure element give the number of data values in each row +of the table, so that the total number of data values in the array is +given by repeat * nvalues. In the case of image arrays and ASCII +tables, repeat will always be equal to 1. When the data type is a +character string, the array pointer is actually a pointer to an array +of string pointers (i.e., char **array). The other output structure +elements are provided for convenience in case that information is +needed within the work function. Any other information may be passed +from the driver routine to the work function via the userPointer +parameter. + +Upon completion, the work routine must return an integer status value, +with 0 indicating success and any other value indicating an error which +will cause the iterator function to immediately exit at that point. Return status +values in the range 1 -- 1000 should be avoided since these are +reserved for use by CFITSIO. A return status value of -1 may be used to +force the CFITSIO iterator function to stop at that point and return +control to the driver routine after writing any output arrays to the +FITS file. CFITSIO does not considered this to be an error condition, +so any further processing by the application program will continue normally. + + +\section{The Iterator Driver Function} + +The iterator driver function must open the necessary FITS files and +position them to the correct HDU. It must also initialize the following +parameters in the iteratorCol structure (defined above) for each +column or image before calling the CFITSIO iterator function. +Several `constructor' routines are provided in CFITSIO for this +purpose. + +\begin{itemize} +\item + *fptr -- The fitsfile pointer to the table or image. +\item +colnum -- the number of the column in the table. This value is ignored + in the case of images. If colnum equals 0, then the column name + will be used to identify the column to be passed to the + work function. + +\item +colname -- the name (TTYPEn keyword) of the column. This is + only required if colnum = 0 and is ignored for images. +\item +datatype -- The desired data type of the array to be passed to the + work function. For numerical data the data type does + not need to be the same as the actual data type in the + FITS file, in which case CFITSIO will do the conversion. + Allowed values are: TSTRING, TLOGICAL, TBYTE, TSBYTE, TSHORT, TUSHORT, + TINT, TLONG, TULONG, TFLOAT, TDOUBLE. If the input + value of data type equals 0, then the existing + data type of the column or image will be used without + any conversion. + +\item +iotype -- defines whether the data array is to be input to the + work function (i.e, read from the FITS file), or output + from the work function (i.e., written to the FITS file) or + both. Allowed values are InputCol, OutputCol, or InputOutputCol. + Variable-length array columns are supported as InputCol or + InputOutputCol types, but may not be used for an OutputCol type. +\end{itemize} + +After the driver routine has initialized all these parameters, it +can then call the CFITSIO iterator function: + + +\begin{verbatim} + int fits_iterate_data(int narrays, iteratorCol *data, long offset, + long nPerLoop, int (*workFn)( ), void *userPointer, int *status); +\end{verbatim} + +\begin{itemize} +\item + + narrays -- the number of columns or images that are to be passed + to the work function. +\item + *data -- pointer to array of structures containing information + about each column or image. + +\item + offset -- if positive, this number of rows at the + beginning of the table (or pixels in the image) + will be skipped and will not be passed to the work + function. + +\item + nPerLoop - specifies the number of table rows (or number of + image pixels) that are to be passed to the work + function on each iteration. If nPerLoop = 0 + then CFITSIO will calculate the optimum number + for greatest efficiency. + If nPerLoop is negative, then all the rows + or pixels will be passed at one time, and the work + function will only be called once. If any variable + length arrays are being processed, then the nPerLoop + value is ignored, and the iterator will always process + one row of the table at a time. + +\item + *workFn - the name (actually the address) of the work function + that is to be called by fits\_iterate\_data. + +\item + *userPointer - this is a user supplied pointer that can be used + to pass ancillary information from the driver routine + to the work function. It may point to a single number, + an array, or to a structure containing an arbitrary set + of parameters. + +\item + *status - The CFITSIO error status. Should = 0 on input; + a non-zero output value indicates an error. +\end{itemize} + +When fits\_iterate\_data is called it first allocates memory to hold +all the requested columns of data or image pixel arrays. It then reads +the input data from the FITS tables or images into the arrays then +passes the structure with pointers to these data arrays to the work +function. After the work function returns, the iterator function +writes any output columns of data or images back to the FITS files. It +then repeats this process for any remaining sets of rows or image +pixels until it has processed the entire table or image or until the +work function returns a non-zero status value. The iterator then frees +the memory that it initially allocated and returns control to the +driver routine that called it. + + +\section{Guidelines for Using the Iterator Function} + +The totaln, offset, firstn, and nvalues parameters that are passed to +the work function are useful for determining how much of the data has +been processed and how much remains left to do. On the very first call +to the work function firstn will be equal to offset + 1; the work +function may need to perform various initialization tasks before +starting to process the data. Similarly, firstn + nvalues - 1 will be +equal to totaln on the last iteration, at which point the work function +may need to perform some clean up operations before exiting for the +last time. The work function can also force an early termination of +the iterations by returning a status value = -1. + +The narrays and iteratorCol.datatype arguments allow the work function +to double check that the number of input arrays and their data types +have the expected values. The iteratorCol.fptr and iteratorCol.colnum +structure elements can be used if the work function needs to read or +write the values of other keywords in the FITS file associated with +the array. This should generally only be done during the +initialization step or during the clean up step after the last set of +data has been processed. Extra FITS file I/O during the main +processing loop of the work function can seriously degrade the speed of +the program. + +If variable-length array columns are being processed, then the iterator +will operate on one row of the table at a time. In this case the +the repeat element in the interatorCol structure will be set equal to +the number of elements in the current row that is being processed. + +One important feature of the iterator is that the first element in each +array that is passed to the work function gives the value that is used +to represent null or undefined values in the array. The real data then +begins with the second element of the array (i.e., array[1], not +array[0]). If the first array element is equal to zero, then this +indicates that all the array elements have defined values and there are +no undefined values. If array[0] is not equal to zero, then this +indicates that some of the data values are undefined and this value +(array[0]) is used to represent them. In the case of output arrays +(i.e., those arrays that will be written back to the FITS file by the +iterator function after the work function exits) the work function must +set the first array element to the desired null value if necessary, +otherwise the first element should be set to zero to indicate that +there are no null values in the output array. CFITSIO defines 2 +values, FLOATNULLVALUE and DOUBLENULLVALUE, that can be used as default +null values for float and double data types, respectively. In the case +of character string data types, a null string is always used to +represent undefined strings. + +In some applications it may be necessary to recursively call the iterator +function. An example of this is given by one of the example programs +that is distributed with CFITSIO: it first calls a work function that +writes out a 2D histogram image. That work function in turn calls +another work function that reads the `X' and `Y' columns in a table to +calculate the value of each 2D histogram image pixel. Graphically, the +program structure can be described as: + +\begin{verbatim} + driver --> iterator --> work1_fn --> iterator --> work2_fn +\end{verbatim} + +Finally, it should be noted that the table columns or image arrays that +are passed to the work function do not all have to come from the same +FITS file and instead may come from any combination of sources as long +as they have the same length. The length of the first table column or +image array is used by the iterator if they do not all have the same +length. + + +\section{Complete List of Iterator Routines} + +All of the iterator routines are listed below. Most of these routines +do not have a corresponding short function name. + + +\begin{description} +\item[1 ] Iterator `constructor' functions that set + the value of elements in the iteratorCol structure + that define the columns or arrays. These set the fitsfile + pointer, column name, column number, datatype, and iotype, + respectively. The last 2 routines allow all the parameters + to be set with one function call (one supplies the column + name, the other the column number). \label{ffiterset} +\end{description} + + +\begin{verbatim} + int fits_iter_set_file(iteratorCol *col, fitsfile *fptr); + + int fits_iter_set_colname(iteratorCol *col, char *colname); + + int fits_iter_set_colnum(iteratorCol *col, int colnum); + + int fits_iter_set_datatype(iteratorCol *col, int datatype); + + int fits_iter_set_iotype(iteratorCol *col, int iotype); + + int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, + char *colname, int datatype, int iotype); + + int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, + int colnum, int datatype, int iotype); +\end{verbatim} + +\begin{description} +\item[2 ] Iterator `accessor' functions that return the value of the + element in the iteratorCol structure + that describes a particular data column or array \label{ffiterget} +\end{description} + +\begin{verbatim} + fitsfile * fits_iter_get_file(iteratorCol *col); + + char * fits_iter_get_colname(iteratorCol *col); + + int fits_iter_get_colnum(iteratorCol *col); + + int fits_iter_get_datatype(iteratorCol *col); + + int fits_iter_get_iotype(iteratorCol *col); + + void * fits_iter_get_array(iteratorCol *col); + + long fits_iter_get_tlmin(iteratorCol *col); + + long fits_iter_get_tlmax(iteratorCol *col); + + long fits_iter_get_repeat(iteratorCol *col); + + char * fits_iter_get_tunit(iteratorCol *col); + + char * fits_iter_get_tdisp(iteratorCol *col); +\end{verbatim} + +\begin{description} +\item[3 ] The CFITSIO iterator function \label{ffiter} +\end{description} + +\begin{verbatim} + int fits_iterate_data(int narrays, iteratorCol *data, long offset, + long nPerLoop, + int (*workFn)( long totaln, long offset, long firstn, + long nvalues, int narrays, iteratorCol *data, + void *userPointer), + void *userPointer, + int *status); +\end{verbatim} + +\chapter{ World Coordinate System Routines } + +The FITS community has adopted a set of keyword conventions that define +the transformations needed to convert between pixel locations in an +image and the corresponding celestial coordinates on the sky, or more +generally, that define world coordinates that are to be associated with +any pixel location in an n-dimensional FITS array. CFITSIO is distributed +with a a few self-contained World Coordinate System (WCS) routines, +however, these routines DO NOT support all the latest WCS conventions, +so it is STRONGLY RECOMMENDED that software developers use a more robust +external WCS library. Several recommended libraries are: + + +\begin{verbatim} + WCSLIB - supported by Mark Calabretta + WCSTools - supported by Doug Mink + AST library - developed by the U.K. Starlink project +\end{verbatim} + +More information about the WCS keyword conventions and links to all of +these WCS libraries can be found on the FITS Support Office web site at +http://fits.gsfc.nasa.gov under the WCS link. + +The functions provided in these external WCS libraries will need +access to the WCS keywords contained in the FITS file headers. +One convenient way to pass this information to the extermal library is +to use the fits\_hdr2str routine in CFITSIO (defined below) to copy the +header keywords into one long string, and then pass this string to an +interface routine in the external library that will extract +the necessary WCS information (e.g., the 'wcspih' routine in the WCSLIB +library and the 'astFitsChan' and 'astPutCards' functions in the AST +library). + + +\begin{description} +\item[1 ] Concatenate the header keywords in the CHDU into a single long + string of characters. Each 80-character fixed-length keyword + record is appended to the output character string, in order, with + no intervening separator or terminating characters. The last header + record is terminated with a NULL character. This routine allocates + memory for the returned character array, so the calling program must + free the memory when finished. + + Selected keywords may be excluded from the returned character string. + If the second parameter (nocomments) is TRUE (nonzero) then any + COMMENT, HISTORY, or blank keywords in the header will not be copied + to the output string. + + The 'exclist' parameter may be used to supply a list of keywords + that are to be excluded from the output character string. Wild card + characters (*, ?, and \#) may be used in the excluded keyword names. + If no additional keywords are to be excluded, then set nexc = 0 and + specify NULL for the the **header parameter. \label{hdr2str} +\end{description} + +\begin{verbatim} + int fits_hdr2str + (fitsfile *fptr, int nocomments, char **exclist, int nexc, + > char **header, int *nkeys, int *status) +\end{verbatim} + + +\begin{description} +\item[2 ] The following CFITSIO routine is specifically designed for use +in conjunction with the WCSLIB library. It is not expected that +applications programmers will call this routine directly, but it +is documented here for completeness. This routine extracts arrays +from a binary table that contain WCS information using the -TAB table +lookup convention. See the documentation provided with the WCSLIB + library for more information. \label{wcstab} +\end{description} + +\begin{verbatim} + int fits_read_wcstab + (fitsfile *fptr, int nwtb, wtbarr *wtb, int *status); +\end{verbatim} + +\section{ Self-contained WCS Routines} + +The following routines DO NOT support the more recent WCS conventions +that have been approved as part of the FITS standard. Consequently, +the following routines ARE NOW DEPRECATED. It is STRONGLY RECOMMENDED +that software developers not use these routines, and instead use an +external WCS library, as described in the previous section. + +These routines are included mainly for backward compatibility with +existing software. They support the following standard map +projections: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, and -AIT (these are the +legal values for the coordtype parameter). These routines are based +on similar functions in Classic AIPS. All the angular quantities are +given in units of degrees. + + +\begin{description} +\item[1 ] Get the values of the basic set of standard FITS celestial coordinate + system keywords from the header of a FITS image (i.e., the primary + array or an IMAGE extension). These values may then be passed to + the fits\_pix\_to\_world and fits\_world\_to\_pix routines that + perform the coordinate transformations. If any or all of the WCS + keywords are not present, then default values will be returned. If + the first coordinate axis is the declination-like coordinate, then + this routine will swap them so that the longitudinal-like coordinate + is returned as the first axis. + + If the file uses the newer 'CDj\_i' WCS transformation matrix + keywords instead of old style 'CDELTn' and 'CROTA2' keywords, then + this routine will calculate and return the values of the equivalent + old-style keywords. Note that the conversion from the new-style + keywords to the old-style values is sometimes only an + approximation, so if the approximation is larger than an internally + defined threshold level, then CFITSIO will still return the + approximate WCS keyword values, but will also return with status = + APPROX\_WCS\_KEY, to warn the calling program that approximations + have been made. It is then up to the calling program to decide + whether the approximations are sufficiently accurate for the + particular application, or whether more precise WCS transformations + must be performed using new-style WCS keywords directly. \label{ffgics} +\end{description} + +\begin{verbatim} + int fits_read_img_coord / ffgics + (fitsfile *fptr, > double *xrefval, double *yrefval, + double *xrefpix, double *yrefpix, double *xinc, double *yinc, + double *rot, char *coordtype, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the values of the standard FITS celestial coordinate system + keywords from the header of a FITS table where the X and Y (or RA + and DEC) coordinates are stored in 2 separate columns of the table + (as in the Event List table format that is often used by high energy + astrophysics missions). These values may then be passed to the + fits\_pix\_to\_world and fits\_world\_to\_pix routines that perform + the coordinate transformations. \label{ffgtcs} +\end{description} + +\begin{verbatim} + int fits_read_tbl_coord / ffgtcs + (fitsfile *fptr, int xcol, int ycol, > double *xrefval, + double *yrefval, double *xrefpix, double *yrefpix, double *xinc, + double *yinc, double *rot, char *coordtype, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Calculate the celestial coordinate corresponding to the input + X and Y pixel location in the image. \label{ffwldp} +\end{description} + +\begin{verbatim} + int fits_pix_to_world / ffwldp + (double xpix, double ypix, double xrefval, double yrefval, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *coordtype, > double *xpos, double *ypos, + int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Calculate the X and Y pixel location corresponding to the input + celestial coordinate in the image. \label{ffxypx} +\end{description} + +\begin{verbatim} + int fits_world_to_pix / ffxypx + (double xpos, double ypos, double xrefval, double yrefval, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *coordtype, > double *xpix, double *ypix, + int *status) +\end{verbatim} + + +\chapter{ Hierarchical Grouping Routines } + +These functions allow for the creation and manipulation of FITS HDU +Groups, as defined in "A Hierarchical Grouping Convention for FITS" by +Jennings, Pence, Folk and Schlesinger +(http://fits.gsfc.nasa.gov/group.html). A group is a +collection of HDUs whose association is defined by a {\it grouping +table}. HDUs which are part of a group are referred to as {\it member +HDUs} or simply as {\it members}. Grouping table member HDUs may +themselves be grouping tables, thus allowing for the construction of +open-ended hierarchies of HDUs. + +Grouping tables contain one row for each member HDU. The grouping table +columns provide identification information that allows applications to +reference or "point to" the member HDUs. Member HDUs are expected, but +not required, to contain a set of GRPIDn/GRPLCn keywords in their +headers for each grouping table that they are referenced by. In this +sense, the GRPIDn/GRPLCn keywords "link" the member HDU back to its +Grouping table. Note that a member HDU need not reside in the same FITS +file as its grouping table, and that a given HDU may be referenced by +up to 999 grouping tables simultaneously. + +Grouping tables are implemented as FITS binary tables with up to six +pre-defined column TTYPEn values: 'MEMBER\_XTENSION', 'MEMBER\_NAME', +'MEMBER\_VERSION', 'MEMBER\_POSITION', 'MEMBER\_URI\_TYPE' and 'MEMBER\_LOCATION'. +The first three columns allow member HDUs to be identified by reference to +their XTENSION, EXTNAME and EXTVER keyword values. The fourth column allows +member HDUs to be identified by HDU position within their FITS file. +The last two columns identify the FITS file in which the member HDU resides, +if different from the grouping table FITS file. + +Additional user defined "auxiliary" columns may also be included with any +grouping table. When a grouping table is copied or modified the presence of +auxiliary columns is always taken into account by the grouping support +functions; however, the grouping support functions cannot directly +make use of this data. + +If a grouping table column is defined but the corresponding member HDU +information is unavailable then a null value of the appropriate data type +is inserted in the column field. Integer columns (MEMBER\_POSITION, +MEMBER\_VERSION) are defined with a TNULLn value of zero (0). Character field +columns (MEMBER\_XTENSION, MEMBER\_NAME, MEMBER\_URI\_TYPE, MEMBER\_LOCATION) +utilize an ASCII null character to denote a null field value. + +The grouping support functions belong to two basic categories: those that +work with grouping table HDUs (ffgt**) and those that work with member HDUs +(ffgm**). Two functions, fits\_copy\_group() and fits\_remove\_group(), have the +option to recursively copy/delete entire groups. Care should be taken when +employing these functions in recursive mode as poorly defined groups could +cause unpredictable results. The problem of a grouping table directly or +indirectly referencing itself (thus creating an infinite loop) is protected +against; in fact, neither function will attempt to copy or delete an HDU +twice. + + +\section{Grouping Table Routines} + + +\begin{description} +\item[1 ]Create (append) a grouping table at the end of the current FITS file + pointed to by fptr. The grpname parameter provides the grouping table + name (GRPNAME keyword value) and may be set to NULL if no group name + is to be specified. The grouptype parameter specifies the desired + structure of the grouping table and may take on the values: + GT\_ID\_ALL\_URI (all columns created), GT\_ID\_REF (ID by reference columns), + GT\_ID\_POS (ID by position columns), GT\_ID\_ALL (ID by reference and + position columns), GT\_ID\_REF\_URI (ID by reference and FITS file URI + columns), and GT\_ID\_POS\_URI (ID by position and FITS file URI columns). \label{ffgtcr} +\end{description} + +\begin{verbatim} + int fits_create_group / ffgtcr + (fitsfile *fptr, char *grpname, int grouptype, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ]Create (insert) a grouping table just after the CHDU of the current FITS + file pointed to by fptr. All HDUs below the the insertion point will be + shifted downwards to make room for the new HDU. The grpname parameter + provides the grouping table name (GRPNAME keyword value) and may be set to + NULL if no group name is to be specified. The grouptype parameter specifies + the desired structure of the grouping table and may take on the values: + GT\_ID\_ALL\_URI (all columns created), GT\_ID\_REF (ID by reference columns), + GT\_ID\_POS (ID by position columns), GT\_ID\_ALL (ID by reference and + position columns), GT\_ID\_REF\_URI (ID by reference and FITS file URI + columns), and GT\_ID\_POS\_URI (ID by position and FITS file URI columns) \label{ffgtis}. +\end{description} + +\begin{verbatim} + int fits_insert_group / ffgtis + (fitsfile *fptr, char *grpname, int grouptype, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ]Change the structure of an existing grouping table pointed to by + gfptr. The grouptype parameter (see fits\_create\_group() for valid + parameter values) specifies the new structure of the grouping table. This + function only adds or removes grouping table columns, it does not add + or delete group members (i.e., table rows). If the grouping table already + has the desired structure then no operations are performed and function + simply returns with a (0) success status code. If the requested structure + change creates new grouping table columns, then the column values for all + existing members will be filled with the null values appropriate to the + column type. \label{ffgtch} +\end{description} + +\begin{verbatim} + int fits_change_group / ffgtch + (fitsfile *gfptr, int grouptype, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ]Remove the group defined by the grouping table pointed to by gfptr, and + optionally all the group member HDUs. The rmopt parameter specifies the + action to be taken for + all members of the group defined by the grouping table. Valid values are: + OPT\_RM\_GPT (delete only the grouping table) and OPT\_RM\_ALL (recursively + delete all HDUs that belong to the group). Any groups containing the + grouping table gfptr as a member are updated, and if rmopt == OPT\_RM\_GPT + all members have their GRPIDn and GRPLCn keywords updated accordingly. + If rmopt == OPT\_RM\_ALL, then other groups that contain the deleted members + of gfptr are updated to reflect the deletion accordingly. \label{ffgtrm} +\end{description} + +\begin{verbatim} + int fits_remove_group / ffgtrm + (fitsfile *gfptr, int rmopt, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Copy (append) the group defined by the grouping table pointed to by infptr, + and optionally all group member HDUs, to the FITS file pointed to by + outfptr. The cpopt parameter specifies the action to be taken for all + members of the group infptr. Valid values are: OPT\_GCP\_GPT (copy only + the grouping table) and OPT\_GCP\_ALL (recursively copy ALL the HDUs that + belong to the group defined by infptr). If the cpopt == OPT\_GCP\_GPT then + the members of infptr have their GRPIDn and GRPLCn keywords updated to + reflect the existence of the new grouping table outfptr, since they now + belong to the new group. If cpopt == OPT\_GCP\_ALL then the new + grouping table outfptr only contains pointers to the copied member HDUs + and not the original member HDUs of infptr. Note that, when + cpopt == OPT\_GCP\_ALL, all members of the group defined by infptr will be + copied to a single FITS file pointed to by outfptr regardless of their + file distribution in the original group. \label{ffgtcp} +\end{description} + +\begin{verbatim} + int fits_copy_group / ffgtcp + (fitsfile *infptr, fitsfile *outfptr, int cpopt, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Merge the two groups defined by the grouping table HDUs infptr and outfptr + by combining their members into a single grouping table. All member HDUs + (rows) are copied from infptr to outfptr. If mgopt == OPT\_MRG\_COPY then + infptr continues to exist unaltered after the merge. If the mgopt == + OPT\_MRG\_MOV then infptr is deleted after the merge. In both cases, + the GRPIDn and GRPLCn keywords of the member HDUs are updated accordingly. \label{ffgtmg} +\end{description} + +\begin{verbatim} + int fits_merge_groups / ffgtmg + (fitsfile *infptr, fitsfile *outfptr, int mgopt, > int *status) +\end{verbatim} + +\begin{description} +\item[7 ]"Compact" the group defined by grouping table pointed to by gfptr. The + compaction is achieved by merging (via fits\_merge\_groups()) all direct + member HDUs of gfptr that are themselves grouping tables. The cmopt + parameter defines whether the merged grouping table HDUs remain after + merging (cmopt == OPT\_CMT\_MBR) or if they are deleted after merging + (cmopt == OPT\_CMT\_MBR\_DEL). If the grouping table contains no direct + member HDUs that are themselves grouping tables then this function + does nothing. Note that this function is not recursive, i.e., only the + direct member HDUs of gfptr are considered for merging. \label{ffgtcm} +\end{description} + +\begin{verbatim} + int fits_compact_group / ffgtcm + (fitsfile *gfptr, int cmopt, > int *status) +\end{verbatim} + +\begin{description} +\item[8 ]Verify the integrity of the grouping table pointed to by gfptr to make + sure that all group members are accessible and that all links to other + grouping tables are valid. The firstfailed parameter returns the member + ID (row number) of the first member HDU to fail verification (if positive + value) or the first group link to fail (if negative value). If gfptr is + successfully verified then firstfailed contains a return value of 0. \label{ffgtvf} +\end{description} + +\begin{verbatim} + int fits_verify_group / ffgtvf + (fitsfile *gfptr, > long *firstfailed, int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Open a grouping table that contains the member HDU pointed to by mfptr. + The grouping table to open is defined by the grpid parameter, which + contains the keyword index value of the GRPIDn/GRPLCn keyword(s) that + link the member HDU mfptr to the grouping table. If the grouping table + resides in a file other than the member HDUs file then an attempt is + first made to open the file readwrite, and failing that readonly. A + pointer to the opened grouping table HDU is returned in gfptr. + + Note that it is possible, although unlikely and undesirable, for the + GRPIDn/GRPLCn keywords in a member HDU header to be non-continuous, e.g., + GRPID1, GRPID2, GRPID5, GRPID6. In such cases, the grpid index value + specified in the function call shall identify the (grpid)th GRPID value. + In the above example, if grpid == 3, then the group specified by GRPID5 + would be opened. \label{ffgtop} +\end{description} + +\begin{verbatim} + int fits_open_group / ffgtop + (fitsfile *mfptr, int group, > fitsfile **gfptr, int *status) +\end{verbatim} + +\begin{description} +\item[10] Add a member HDU to an existing grouping table pointed to by gfptr. + The member HDU may either be pointed to mfptr (which must be positioned + to the member HDU) or, if mfptr == NULL, identified by the hdupos parameter + (the HDU position number, Primary array == 1) if both the grouping table + and the member HDU reside in the same FITS file. The new member HDU shall + have the appropriate GRPIDn and GRPLCn keywords created in its header. + Note that if the member HDU is already a member of the group then it will + not be added a second time. \label{ffgtam} +\end{description} + +\begin{verbatim} + int fits_add_group_member / ffgtam + (fitsfile *gfptr, fitsfile *mfptr, int hdupos, > int *status) +\end{verbatim} + + +\section{Group Member Routines} + + +\begin{description} +\item[1 ] Return the number of member HDUs in a grouping table gfptr. The number + member HDUs is just the NAXIS2 value (number of rows) of the grouping + table. \label{ffgtnm} +\end{description} + +\begin{verbatim} + int fits_get_num_members / ffgtnm + (fitsfile *gfptr, > long *nmembers, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Return the number of groups to which the HDU pointed to by mfptr is + linked, as defined by the number of GRPIDn/GRPLCn keyword records that + appear in its header. Note that each time this function is called, the + indices of the GRPIDn/GRPLCn keywords are checked to make sure they + are continuous (ie no gaps) and are re-enumerated to eliminate gaps if + found. \label{ffgmng} +\end{description} + +\begin{verbatim} + int fits_get_num_groups / ffgmng + (fitsfile *mfptr, > long *nmembers, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Open a member of the grouping table pointed to by gfptr. The member to + open is identified by its row number within the grouping table as given + by the parameter 'member' (first member == 1) . A fitsfile pointer to + the opened member HDU is returned as mfptr. Note that if the member HDU + resides in a FITS file different from the grouping table HDU then the + member file is first opened readwrite and, failing this, opened readonly. \label{ffgmop} +\end{description} + +\begin{verbatim} + int fits_open_member / ffgmop + (fitsfile *gfptr, long member, > fitsfile **mfptr, int *status) +\end{verbatim} + +\begin{description} +\item[4 ]Copy (append) a member HDU of the grouping table pointed to by gfptr. + The member HDU is identified by its row number within the grouping table + as given by the parameter 'member' (first member == 1). The copy of the + group member HDU will be appended to the FITS file pointed to by mfptr, + and upon return mfptr shall point to the copied member HDU. The cpopt + parameter may take on the following values: OPT\_MCP\_ADD which adds a new + entry in gfptr for the copied member HDU, OPT\_MCP\_NADD which does not add + an entry in gfptr for the copied member, and OPT\_MCP\_REPL which replaces + the original member entry with the copied member entry. \label{ffgmcp} +\end{description} + +\begin{verbatim} + int fits_copy_member / ffgmcp + (fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Transfer a group member HDU from the grouping table pointed to by + infptr to the grouping table pointed to by outfptr. The member HDU to + transfer is identified by its row number within infptr as specified by + the parameter 'member' (first member == 1). If tfopt == OPT\_MCP\_ADD then + the member HDU is made + a member of outfptr and remains a member of infptr. If tfopt == OPT\_MCP\_MOV + then the member HDU is deleted from infptr after the transfer to outfptr. \label{ffgmtf} +\end{description} + +\begin{verbatim} + int fits_transfer_member / ffgmtf + (fitsfile *infptr, fitsfile *outfptr, long member, int tfopt, + > int *status) +\end{verbatim} + +\begin{description} +\item[6 ]Remove a member HDU from the grouping table pointed to by gfptr. The + member HDU to be deleted is identified by its row number in the grouping + table as specified by the parameter 'member' (first member == 1). The rmopt + parameter may take on the following values: OPT\_RM\_ENTRY which + removes the member HDU entry from the grouping table and updates the + member's GRPIDn/GRPLCn keywords, and OPT\_RM\_MBR which removes the member + HDU entry from the grouping table and deletes the member HDU itself. \label{ffgmrm} +\end{description} + +\begin{verbatim} + int fits_remove_member / ffgmrm + (fitsfile *fptr, long member, int rmopt, > int *status) +\end{verbatim} + +\chapter{ Specialized CFITSIO Interface Routines } + +The basic interface routines described previously are recommended +for most uses, but the routines described in this chapter +are also available if necessary. Some of these routines perform more +specialized function that cannot easily be done with the basic +interface routines while others duplicate the functionality of the +basic routines but have a slightly different calling sequence. +See Appendix B for the definition of each function parameter. + + +\section{FITS File Access Routines} + + +\begin{description} +\item[1 ] Open an existing FITS file residing in core computer memory. This +routine is analogous to fits\_open\_file. The 'filename' is +currently ignored by this routine and may be any arbitrary string. In +general, the application must have preallocated an initial block of +memory to hold the FITS file prior to calling this routine: 'memptr' +points to the starting address and 'memsize' gives the initial size of +the block of memory. 'mem\_realloc' is a pointer to an optional +function that CFITSIO can call to allocate additional memory, if needed +(only if mode = READWRITE), and is modeled after the standard C +'realloc' function; a null pointer may be given if the initial +allocation of memory is all that will be required (e.g., if the file is +opened with mode = READONLY). The 'deltasize' parameter may be used to +suggest a minimum amount of additional memory that should be allocated +during each call to the memory reallocation function. By default, +CFITSIO will reallocate enough additional space to hold the entire +currently defined FITS file (as given by the NAXISn keywords) or 1 FITS +block (= 2880 bytes), which ever is larger. Values of deltasize less +than 2880 will be ignored. Since the memory reallocation operation can +be computationally expensive, allocating a larger initial block of +memory, and/or specifying a larger deltasize value may help to reduce +the number of reallocation calls and make the application program run + faster. \label{ffomem} +\end{description} + +\begin{verbatim} + int fits_open_memfile / ffomem + (fitsfile **fptr, const char *filename, int mode, void **memptr, + size_t *memsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Create a new FITS file residing in core computer memory. This +routine is analogous to fits\_create\_file. In general, the +application must have preallocated an initial block of memory to hold +the FITS file prior to calling this routine: 'memptr' points to the +starting address and 'memsize' gives the initial size of the block of +memory. 'mem\_realloc' is a pointer to an optional function that +CFITSIO can call to allocate additional memory, if needed, and is +modeled after the standard C 'realloc' function; a null pointer may be +given if the initial allocation of memory is all that will be +required. The 'deltasize' parameter may be used to suggest a minimum +amount of additional memory that should be allocated during each call +to the memory reallocation function. By default, CFITSIO will +reallocate enough additional space to hold 1 FITS block (= 2880 bytes) +and values of deltasize less than 2880 will be ignored. Since the +memory reallocation operation can be computationally expensive, +allocating a larger initial block of memory, and/or specifying a larger +deltasize value may help to reduce the number of reallocation calls +and make the application program run + faster. \label{ffimem} +\end{description} + +\begin{verbatim} + int fits_create_memfile / ffimem + (fitsfile **fptr, void **memptr, + size_t *memsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Reopen a FITS file that was previously opened with + fits\_open\_file or fits\_create\_file. The new fitsfile + pointer may then be treated as a separate file, and one may + simultaneously read or write to 2 (or more) different extensions in + the same file. The fits\_open\_file routine (above) automatically + detects cases where a previously opened file is being opened again, + and then internally call fits\_reopen\_file, so programs should rarely + need to explicitly call this routine. +\label{ffreopen} +\end{description} + +\begin{verbatim} + int fits_reopen_file / ffreopen + (fitsfile *openfptr, fitsfile **newfptr, > int *status) +\end{verbatim} + + +\begin{description} +\item[4 ] Create a new FITS file, using a template file to define its + initial size and structure. The template may be another FITS HDU + or an ASCII template file. If the input template file name pointer + is null, then this routine behaves the same as fits\_create\_file. + The currently supported format of the ASCII template file is described + under the fits\_parse\_template routine (in the general Utilities + section) +\label{fftplt} +\end{description} + +\begin{verbatim} + int fits_create_template / fftplt + (fitsfile **fptr, char *filename, char *tpltfile > int *status) +\end{verbatim} + + +\begin{description} +\item[5 ] Parse the input filename or URL into its component parts, namely: +\begin{itemize} +\item +the file type (file://, ftp://, http://, etc), +\item +the base input file name, +\item +the name of the output file that the input file is to be copied to prior +to opening, +\item +the HDU or extension specification, +\item +the filtering specifier, +\item +the binning specifier, +\item +the column specifier, +\item +and the +image pixel filtering specifier. +\end{itemize} + Null strings will be returned for any components that are not present +in the input file name. These routines are mainly for interal use +by other CFITSIO routines. \label{ffiurl} +\end{description} + +\begin{verbatim} + int fits_parse_input_url / ffiurl + (char *filename, > char *filetype, char *infile, char *outfile, char + *extspec, char *filter, char *binspec, char *colspec, int *status) + + int fits_parse_input_filename / ffifile + (char *filename, > char *filetype, char *infile, char *outfile, char + *extspec, char *filter, char *binspec, char *colspec, char *pixspec, + int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Parse the input filename and return the HDU number that would be +moved to if the file were opened with fits\_open\_file. The returned +HDU number begins with 1 for the primary array, so for example, if the +input filename = `myfile.fits[2]' then hdunum = 3 will be returned. +CFITSIO does not open the file to check if the extension actually +exists if an extension number is specified. If an extension name is +included in the file name specification (e.g. `myfile.fits[EVENTS]' +then this routine will have to open the FITS file and look for the +position of the named extension, then close file again. This is not +possible if the file is being read from the stdin stream, and an error +will be returned in this case. If the filename does not specify an +explicit extension (e.g. 'myfile.fits') then hdunum = -99 will be +returned, which is functionally equivalent to hdunum = 1. This routine +is mainly used for backward compatibility in the ftools software +package and is not recommended for general use. It is generally better +and more efficient to first open the FITS file with fits\_open\_file, +then use fits\_get\_hdu\_num to determine which HDU in the file has +been opened, rather than calling fits\_parse\_input\_url followed by a +call to fits\_open\_file. + \label{ffextn} +\end{description} + +\begin{verbatim} + int fits_parse_extnum / ffextn + (char *filename, > int *hdunum, int *status) +\end{verbatim} + +\begin{description} +\item[7 ]Parse the input file name and return the root file name. The root +name includes the file type if specified, (e.g. 'ftp://' or 'http://') +and the full path name, to the extent that it is specified in the input +filename. It does not include the HDU name or number, or any filtering +specifications. + \label{ffrtnm} +\end{description} + +\begin{verbatim} + int fits_parse_rootname / ffrtnm + (char *filename, > char *rootname, int *status); +\end{verbatim} + +\begin{description} +\item[8 ]Test if the input file or a compressed version of the file (with +a .gz, .Z, .z, or .zip extension) exists on disk. The returned value of +the 'exists' parameter will have 1 of the 4 following values: + +\begin{verbatim} + 2: the file does not exist, but a compressed version does exist + 1: the disk file does exist + 0: neither the file nor a compressed version of the file exist + -1: the input file name is not a disk file (could be a ftp, http, + smem, or mem file, or a file piped in on the STDIN stream) +\end{verbatim} + + \label{ffexist} +\end{description} + +\begin{verbatim} + int fits_file_exists / ffexist + (char *filename, > int *exists, int *status); +\end{verbatim} + +\begin{description} +\item[9 ]Flush any internal buffers of data to the output FITS file. These + routines rarely need to be called, but can be useful in cases where + other processes need to access the same FITS file in real time, + either on disk or in memory. These routines also help to ensure + that if the application program subsequently aborts then the FITS + file will have been closed properly. The first routine, + fits\_flush\_file is more rigorous and completely closes, then + reopens, the current HDU, before flushing the internal buffers, thus + ensuring that the output FITS file is identical to what would be + produced if the FITS was closed at that point (i.e., with a call to + fits\_close\_file). The second routine, fits\_flush\_buffer simply + flushes the internal CFITSIO buffers of data to the output FITS + file, without updating and closing the current HDU. This is much + faster, but there may be circumstances where the flushed file does + not completely reflect the final state of the file as it will exist + when the file is actually closed. + + A typical use of these routines would be to flush the state of a + FITS table to disk after each row of the table is written. It is + recommend that fits\_flush\_file be called after the first row is + written, then fits\_flush\_buffer may be called after each + subsequent row is written. Note that this latter routine will not + automatically update the NAXIS2 keyword which records the number of + rows of data in the table, so this keyword must be explicitly + updated by the application program after each row is written. + \label{ffflus} +\end{description} + +\begin{verbatim} + int fits_flush_file / ffflus + (fitsfile *fptr, > int *status) + + int fits_flush_buffer / ffflsh + (fitsfile *fptr, 0, > int *status) + + (Note: The second argument must be 0). +\end{verbatim} + + +\section{HDU Access Routines} + + +\begin{description} +\item[1 ] Get the byte offsets in the FITS file to the start of the header + and the start and end of the data in the CHDU. The difference + between headstart and dataend equals the size of the CHDU. If the + CHDU is the last HDU in the file, then dataend is also equal to the + size of the entire FITS file. Null pointers may be input for any + of the address parameters if their values are not needed. \label{ffghad} +\end{description} + +\begin{verbatim} + int fits_get_hduaddr / ffghad (only supports files up to 2.1 GB in size) + (fitsfile *fptr, > long *headstart, long *datastart, long *dataend, + int *status) + + int fits_get_hduaddrll / ffghadll (supports large files) + (fitsfile *fptr, > long *headstart, long *datastart, long *dataend, + int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Create (append) a new empty HDU at the end of the FITS file. + This is now the CHDU but it is completely empty and has + no header keywords. It is recommended that fits\_create\_img or + fits\_create\_tbl be used instead of this routine. \label{ffcrhd} +\end{description} + +\begin{verbatim} + int fits_create_hdu / ffcrhd + (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Insert a new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = PREPEND\_PRIMARY prior + to calling the routine. In this case the old primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. Refer to Chapter 9 for a list of + pre-defined bitpix values. \label{ffiimg} +\end{description} + +\begin{verbatim} + int fits_insert_img / ffiimg + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_insert_imgll / ffiimgll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Insert a new ASCII or binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for the + new extension. If there are no other following extensions then the + new table extension will simply be appended to the end of the + file. If the FITS file is currently empty then this routine will + create a dummy primary array before appending the table to it. The + new extension will become the CHDU. The tunit and extname + parameters are optional and a null pointer may be given if they are + not defined. When inserting an ASCII table with + fits\_insert\_atbl, a null pointer may given for the *tbcol + parameter in which case each column of the table will be separated + by a single space character. Similarly, if the input value of + rowlen is 0, then CFITSIO will calculate the default rowlength + based on the tbcol and ttype values. When inserting a binary table + with fits\_insert\_btbl, if there are following extensions in the + file and if the table contains variable length array columns then + pcount must specify the expected final size of the data heap, + otherwise pcount must = 0. \label{ffitab} \label{ffibin} +\end{description} + +\begin{verbatim} + int fits_insert_atbl / ffitab + (fitsfile *fptr, LONGLONG rowlen, LONGLONG nrows, int tfields, char *ttype[], + long *tbcol, char *tform[], char *tunit[], char *extname, > int *status) + + int fits_insert_btbl / ffibin + (fitsfile *fptr, LONGLONG nrows, int tfields, char **ttype, + char **tform, char **tunit, char *extname, long pcount, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Modify the size, dimensions, and/or data type of the current + primary array or image extension. If the new image, as specified + by the input arguments, is larger than the current existing image + in the FITS file then zero fill data will be inserted at the end + of the current image and any following extensions will be moved + further back in the file. Similarly, if the new image is + smaller than the current image then any following extensions + will be shifted up towards the beginning of the FITS file + and the image data will be truncated to the new size. + This routine rewrites the BITPIX, NAXIS, and NAXISn keywords + with the appropriate values for the new image. \label{ffrsim} +\end{description} + +\begin{verbatim} + int fits_resize_img / ffrsim + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_resize_imgll / ffrsimll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Copy the data (and not the header) from the CHDU associated with infptr + to the CHDU associated with outfptr. This will overwrite any data + previously in the output CHDU. This low level routine is used by + fits\_copy\_hdu, but it may also be useful in certain application programs + that want to copy the data from one FITS file to another but also + want to modify the header keywords. The required FITS header keywords + which define the structure of the HDU must be written to the + output CHDU before calling this routine. \label{ffcpdt} +\end{description} + +\begin{verbatim} + int fits_copy_data / ffcpdt + (fitsfile *infptr, fitsfile *outfptr, > int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Read or write a specified number of bytes starting at the specified byte + offset from the start of the extension data unit. These low + level routine are intended mainly for accessing the data in + non-standard, conforming extensions, and should not be used for standard + IMAGE, TABLE, or BINTABLE extensions. \label{ffgextn} +\end{description} + +\begin{verbatim} + int fits_read_ext / ffgextn + (fitsfile *fptr, LONGLONG offset, LONGLONG nbytes, void *buffer) + int fits_write_ext / ffpextn + (fitsfile *fptr, LONGLONG offset, LONGLONG nbytes, void *buffer) +\end{verbatim} + +\begin{description} +\item[8 ] This routine forces CFITSIO to rescan the current header keywords that + define the structure of the HDU (such as the NAXIS and BITPIX + keywords) so that it reinitializes the internal buffers that + describe the HDU structure. This routine is useful for + reinitializing the structure of an HDU if any of the required + keywords (e.g., NAXISn) have been modified. In practice it should + rarely be necessary to call this routine because CFITSIO + internally calls it in most situations. \label{ffrdef} +\end{description} + +\begin{verbatim} + int fits_set_hdustruc / ffrdef + (fitsfile *fptr, > int *status) (DEPRECATED) +\end{verbatim} + +\section{Specialized Header Keyword Routines} + + +\subsection{Header Information Routines} + + +\begin{description} +\item[1 ] Reserve space in the CHU for MOREKEYS more header keywords. + This routine may be called to allocate space for additional keywords + at the time the header is created (prior to writing any data). + CFITSIO can dynamically add more space to the header when needed, + however it is more efficient to preallocate the required space + if the size is known in advance. \label{ffhdef} +\end{description} + +\begin{verbatim} + int fits_set_hdrsize / ffhdef + (fitsfile *fptr, int morekeys, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Return the number of keywords in the header (not counting the END + keyword) and the current position + in the header. The position is the number of the keyword record that + will be read next (or one greater than the position of the last keyword + that was read). A value of 1 is returned if the pointer is + positioned at the beginning of the header. \label{ffghps} +\end{description} + +\begin{verbatim} + int fits_get_hdrpos / ffghps + (fitsfile *fptr, > int *keysexist, int *keynum, int *status) +\end{verbatim} + + +\subsection{Read and Write the Required Keywords} + + +\begin{description} +\item[1 ] Write the required extension header keywords into the CHU. + These routines are not required, and instead the appropriate + header may be constructed by writing each individual keyword in the + proper sequence. + + The simpler fits\_write\_imghdr routine is equivalent to calling + fits\_write\_grphdr with the default values of simple = TRUE, pcount + = 0, gcount = 1, and extend = TRUE. The PCOUNT, GCOUNT and EXTEND + keywords are not required in the primary header and are only written + if pcount is not equal to zero, gcount is not equal to zero or one, + and if extend is TRUE, respectively. When writing to an IMAGE + extension, the SIMPLE and EXTEND parameters are ignored. It is + recommended that fits\_create\_image or fits\_create\_tbl be used + instead of these routines to write the + required header keywords. The general fits\_write\_exthdr routine + may be used to write the header of any conforming FITS + extension. \label{ffphpr} \label{ffphps} +\end{description} + +\begin{verbatim} + int fits_write_imghdr / ffphps + (fitsfile *fptr, int bitpix, int naxis, long *naxes, > int *status) + + int fits_write_imghdrll / ffphpsll + (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, > int *status) + + int fits_write_grphdr / ffphpr + (fitsfile *fptr, int simple, int bitpix, int naxis, long *naxes, + LONGLONG pcount, LONGLONG gcount, int extend, > int *status) + + int fits_write_grphdrll / ffphprll + (fitsfile *fptr, int simple, int bitpix, int naxis, LONGLONG *naxes, + LONGLONG pcount, LONGLONG gcount, int extend, > int *status) + + int fits_write_exthdr /ffphext + (fitsfile *fptr, char *xtension, int bitpix, int naxis, long *naxes, + LONGLONG pcount, LONGLONG gcount, > int *status) + +\end{verbatim} + +\begin{description} +\item[2 ] Write the ASCII table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input pointers + are not null. A null pointer may given for the + *tbcol parameter in which case a single space will be inserted + between each column of the table. Similarly, if rowlen is + given = 0, then CFITSIO will calculate the default rowlength based on + the tbcol and ttype values. \label{ffphtb} +\end{description} + +\begin{verbatim} + int fits_write_atblhdr / ffphtb + (fitsfile *fptr, LONGLONG rowlen, LONGLONG nrows, int tfields, char **ttype, + long *tbcol, char **tform, char **tunit, char *extname, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Write the binary table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input pointers + are not null. The pcount parameter, which specifies the + size of the variable length array heap, should initially = 0; + CFITSIO will automatically update the PCOUNT keyword value if any + variable length array data is written to the heap. The TFORM keyword + value for variable length vector columns should have the form 'Pt(len)' + or '1Pt(len)' where `t' is the data type code letter (A,I,J,E,D, etc.) + and `len' is an integer specifying the maximum length of the vectors + in that column (len must be greater than or equal to the longest + vector in the column). If `len' is not specified when the table is + created (e.g., the input TFORMn value is just '1Pt') then CFITSIO will + scan the column when the table is first closed and will append the + maximum length to the TFORM keyword value. Note that if the table + is subsequently modified to increase the maximum length of the vectors + then the modifying program is responsible for also updating the TFORM + keyword value. \label{ffphbn} +\end{description} + +\begin{verbatim} + int fits_write_btblhdr / ffphbn + (fitsfile *fptr, LONGLONG nrows, int tfields, char **ttype, + char **tform, char **tunit, char *extname, LONGLONG pcount, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Read the required keywords from the CHDU (image or table). When + reading from an IMAGE extension the SIMPLE and EXTEND parameters are + ignored. A null pointer may be supplied for any of the returned + parameters that are not needed. \label{ffghpr} \label{ffghtb} \label{ffghbn} +\end{description} + +\begin{verbatim} + int fits_read_imghdr / ffghpr + (fitsfile *fptr, int maxdim, > int *simple, int *bitpix, int *naxis, + long *naxes, long *pcount, long *gcount, int *extend, int *status) + + int fits_read_imghdrll / ffghprll + (fitsfile *fptr, int maxdim, > int *simple, int *bitpix, int *naxis, + LONGLONG *naxes, long *pcount, long *gcount, int *extend, int *status) + + int fits_read_atblhdr / ffghtb + (fitsfile *fptr,int maxdim, > long *rowlen, long *nrows, + int *tfields, char **ttype, LONGLONG *tbcol, char **tform, char **tunit, + char *extname, int *status) + + int fits_read_atblhdrll / ffghtbll + (fitsfile *fptr,int maxdim, > LONGLONG *rowlen, LONGLONG *nrows, + int *tfields, char **ttype, long *tbcol, char **tform, char **tunit, + char *extname, int *status) + + int fits_read_btblhdr / ffghbn + (fitsfile *fptr, int maxdim, > long *nrows, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + long *pcount, int *status) + + int fits_read_btblhdrll / ffghbnll + (fitsfile *fptr, int maxdim, > LONGLONG *nrows, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + long *pcount, int *status) +\end{verbatim} + +\subsection{Write Keyword Routines} + +These routines simply append a new keyword to the header and do not +check to see if a keyword with the same name already exists. In +general it is preferable to use the fits\_update\_key routine to ensure +that the same keyword is not written more than once to the header. See +Appendix B for the definition of the parameters used in these +routines. + + + +\begin{description} +\item[1 ] Write (append) a new keyword of the appropriate data type into the CHU. + A null pointer may be entered for the comment parameter, which + will cause the comment field of the keyword to be left blank. The + flt, dbl, cmp, and dblcmp versions of this routine have the added + feature that if the 'decimals' parameter is negative, then the 'G' + display format rather then the 'E' format will be used when + constructing the keyword value, taking the absolute value of + 'decimals' for the precision. This will suppress trailing zeros, + and will use a fixed format rather than an exponential format, + depending on the magnitude of the value. \label{ffpkyx} +\end{description} + +\begin{verbatim} + int fits_write_key_str / ffpkys + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_write_key_[log, lng] / ffpky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_write_key_[flt, dbl, fixflg, fixdbl] / ffpky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_write_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffpk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Write (append) a string valued keyword into the CHU which may be longer + than 68 characters in length. This uses the Long String Keyword + convention that is described in the`Local FITS Conventions' section + in Chapter 4. Since this uses a non-standard FITS convention to + encode the long keyword string, programs which use this routine + should also call the fits\_write\_key\_longwarn routine to add some + COMMENT keywords to warn users of the FITS file that this + convention is being used. The fits\_write\_key\_longwarn routine + also writes a keyword called LONGSTRN to record the version of the + longstring convention that has been used, in case a new convention + is adopted at some point in the future. If the LONGSTRN keyword + is already present in the header, then fits\_write\_key\_longwarn + will + simply return without doing anything. \label{ffpkls} \label{ffplsw} +\end{description} + +\begin{verbatim} + int fits_write_key_longstr / ffpkls + (fitsfile *fptr, char *keyname, char *longstr, char *comment, + > int *status) + + int fits_write_key_longwarn / ffplsw + (fitsfile *fptr, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Write (append) a numbered sequence of keywords into the CHU. The + starting index number (nstart) must be greater than 0. One may + append the same comment to every keyword (and eliminate the need + to have an array of identical comment strings, one for each keyword) by + including the ampersand character as the last non-blank character in the + (first) COMMENTS string parameter. This same string + will then be used for the comment field in all the keywords. + One may also enter a null pointer for the comment parameter to + leave the comment field of the keyword blank. \label{ffpknx} +\end{description} + +\begin{verbatim} + int fits_write_keys_str / ffpkns + (fitsfile *fptr, char *keyroot, int nstart, int nkeys, + char **value, char **comment, > int *status) + + int fits_write_keys_[log, lng] / ffpkn[lj] + (fitsfile *fptr, char *keyroot, int nstart, int nkeys, + DTYPE *numval, char **comment, int *status) + + int fits_write_keys_[flt, dbl, fixflg, fixdbl] / ffpkne[edfg] + (fitsfile *fptr, char *keyroot, int nstart, int nkey, + DTYPE *numval, int decimals, char **comment, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ]Copy an indexed keyword from one HDU to another, modifying + the index number of the keyword name in the process. For example, + this routine could read the TLMIN3 keyword from the input HDU + (by giving keyroot = `TLMIN' and innum = 3) and write it to the + output HDU with the keyword name TLMIN4 (by setting outnum = 4). + If the input keyword does not exist, then this routine simply + returns without indicating an error. \label{ffcpky} +\end{description} + +\begin{verbatim} + int fits_copy_key / ffcpky + (fitsfile *infptr, fitsfile *outfptr, int innum, int outnum, + char *keyroot, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Write (append) a `triple precision' keyword into the CHU in F28.16 format. + The floating point keyword value is constructed by concatenating the + input integer value with the input double precision fraction value + (which must have a value between 0.0 and 1.0). The ffgkyt routine should + be used to read this keyword value, because the other keyword reading + routines will not preserve the full precision of the value. \label{ffpkyt} +\end{description} + +\begin{verbatim} + int fits_write_key_triple / ffpkyt + (fitsfile *fptr, char *keyname, long intval, double frac, + char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ]Write keywords to the CHDU that are defined in an ASCII template file. + The format of the template file is described under the fits\_parse\_template + routine. \label{ffpktp} +\end{description} + +\begin{verbatim} + int fits_write_key_template / ffpktp + (fitsfile *fptr, const char *filename, > int *status) +\end{verbatim} + +\subsection{Insert Keyword Routines} + +These insert routines are somewhat less efficient than the `update' or +`write' keyword routines because the following keywords in the header +must be shifted down to make room for the inserted keyword. See +Appendix B for the definition of the parameters used in these +routines. + + +\begin{description} +\item[1 ] Insert a new keyword record into the CHU at the specified position + (i.e., immediately preceding the (keynum)th keyword in the header.) + \label{ffirec} +\end{description} + +\begin{verbatim} + int fits_insert_record / ffirec + (fitsfile *fptr, int keynum, char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Insert a new keyword into the CHU. The new keyword is inserted + immediately following the last keyword that has been read from the + header. The `longstr' version has the same functionality as the + `str' version except that it also supports the local long string + keyword convention for strings longer than 68 characters. A null + pointer may be entered for the comment parameter which will cause + the comment field to be left blank. The flt, dbl, cmp, and dblcmp + versions of this routine have the added + feature that if the 'decimals' parameter is negative, then the 'G' + display format rather then the 'E' format will be used when + constructing the keyword value, taking the absolute value of + 'decimals' for the precision. This will suppress trailing zeros, + and will use a fixed format rather than an exponential format, + depending on the magnitude of the value. \label{ffikyx} +\end{description} + +\begin{verbatim} + int fits_insert_card / ffikey + (fitsfile *fptr, char *card, > &status) + + int fits_insert_key_[str, longstr] / ffi[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_insert_key_[log, lng] / ffiky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_insert_key_[flt, fixflt, dbl, fixdbl] / ffiky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_insert_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffik[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Insert a new keyword with an undefined, or null, value into the CHU. + The value string of the keyword is left blank in this case. \label{ffikyu} +\end{description} + +\begin{verbatim} + int fits_insert_key_null / ffikyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +\end{verbatim} + + +\subsection{Read Keyword Routines} + +Wild card characters may be used when specifying the name of the +keyword to be read. + + +\begin{description} +\item[1 ] Read a keyword value (with the appropriate data type) and comment from + the CHU. If a NULL comment pointer is given on input, then the comment + string will not be returned. If the value of the keyword is not defined + (i.e., the value field is blank) then an error status = VALUE\_UNDEFINED + will be returned and the input value will not be changed (except that + ffgkys will reset the value to a null string). + \label{ffgkyx} \label{ffgkls} +\end{description} + +\begin{verbatim} + int fits_read_key_str / ffgkys + (fitsfile *fptr, char *keyname, > char *value, char *comment, + int *status); + + NOTE: after calling the following routine, programs must explicitly free + the memory allocated for 'longstr' after it is no longer needed. + + int fits_read_key_longstr / ffgkls + (fitsfile *fptr, char *keyname, > char **longstr, char *comment, + int *status) + + int fits_read_key_[log, lng, flt, dbl, cmp, dblcmp] / ffgky[ljedcm] + (fitsfile *fptr, char *keyname, > DTYPE *numval, char *comment, + int *status) + + int fits_read_key_lnglng / ffgkyjj + (fitsfile *fptr, char *keyname, > LONGLONG *numval, char *comment, + int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Read a sequence of indexed keyword values (e.g., NAXIS1, NAXIS2, ...). + The input starting index number (nstart) must be greater than 0. + If the value of any of the keywords is not defined (i.e., the value + field is blank) then an error status = VALUE\_UNDEFINED will be + returned and the input value for the undefined keyword(s) will not + be changed. These routines do not support wild card characters in + the root name. If there are no indexed keywords in the header with + the input root name then these routines do not return a non-zero + status value and instead simply return nfound = 0. \label{ffgknx} +\end{description} + +\begin{verbatim} + int fits_read_keys_str / ffgkns + (fitsfile *fptr, char *keyname, int nstart, int nkeys, + > char **value, int *nfound, int *status) + + int fits_read_keys_[log, lng, flt, dbl] / ffgkn[ljed] + (fitsfile *fptr, char *keyname, int nstart, int nkeys, + > DTYPE *numval, int *nfound, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Read the value of a floating point keyword, returning the integer and + fractional parts of the value in separate routine arguments. + This routine may be used to read any keyword but is especially + useful for reading the 'triple precision' keywords written by ffpkyt. + \label{ffgkyt} +\end{description} + +\begin{verbatim} + int fits_read_key_triple / ffgkyt + (fitsfile *fptr, char *keyname, > long *intval, double *frac, + char *comment, int *status) +\end{verbatim} + +\subsection{Modify Keyword Routines} + +These routines modify the value of an existing keyword. An error is +returned if the keyword does not exist. Wild card characters may be +used when specifying the name of the keyword to be modified. See +Appendix B for the definition of the parameters used in these +routines. + + +\begin{description} +\item[1 ] Modify (overwrite) the nth 80-character header record in the CHU. \label{ffmrec} +\end{description} + +\begin{verbatim} + int fits_modify_record / ffmrec + (fitsfile *fptr, int keynum, char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Modify (overwrite) the 80-character header record for the named keyword + in the CHU. This can be used to overwrite the name of the keyword as + well as its value and comment fields. \label{ffmcrd} +\end{description} + +\begin{verbatim} + int fits_modify_card / ffmcrd + (fitsfile *fptr, char *keyname, char *card, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Modify the value and comment fields of an existing keyword in the CHU. + The `longstr' version has the same functionality as the `str' + version except that it also supports the local long string keyword + convention for strings longer than 68 characters. Optionally, one + may modify only the value field and leave the comment field + unchanged by setting the input COMMENT parameter equal to the + ampersand character (\&) or by entering a null pointer for the + comment parameter. The flt, dbl, cmp, and dblcmp versions of this + routine have the added feature that if the 'decimals' parameter is + negative, then the 'G' display format rather then the 'E' format + will be used when constructing the keyword value, taking the + absolute value of 'decimals' for the precision. This will suppress + trailing zeros, and will use a fixed format rather than an + exponential format, + depending on the magnitude of the value. \label{ffmkyx} +\end{description} + +\begin{verbatim} + int fits_modify_key_[str, longstr] / ffm[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status); + + int fits_modify_key_[log, lng] / ffmky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_modify_key_[flt, dbl, fixflt, fixdbl] / ffmky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_modify_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffmk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Modify the value of an existing keyword to be undefined, or null. + The value string of the keyword is set to blank. + Optionally, one may leave the comment field unchanged by setting the + input COMMENT parameter equal to + the ampersand character (\&) or by entering a null pointer. \label{ffmkyu} +\end{description} + +\begin{verbatim} + int fits_modify_key_null / ffmkyu + (fitsfile *fptr, char *keyname, char *comment, > int *status) +\end{verbatim} + +\subsection{Update Keyword Routines} + + +\begin{description} +\item[1 ] These update routines modify the value, and optionally the comment field, + of the keyword if it already exists, otherwise the new keyword is + appended to the header. A separate routine is provided for each + keyword data type. The `longstr' version has the same functionality + as the `str' version except that it also supports the local long + string keyword convention for strings longer than 68 characters. A + null pointer may be entered for the comment parameter which will + leave the comment field unchanged or blank. The flt, dbl, cmp, and + dblcmp versions of this routine have the added feature that if the + 'decimals' parameter is negative, then the 'G' display format + rather then the 'E' format will be used when constructing the + keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a fixed + format rather than an exponential format, + depending on the magnitude of the value. \label{ffukyx} +\end{description} + +\begin{verbatim} + int fits_update_key_[str, longstr] / ffu[kys, kls] + (fitsfile *fptr, char *keyname, char *value, char *comment, + > int *status) + + int fits_update_key_[log, lng] / ffuky[lj] + (fitsfile *fptr, char *keyname, DTYPE numval, char *comment, + > int *status) + + int fits_update_key_[flt, dbl, fixflt, fixdbl] / ffuky[edfg] + (fitsfile *fptr, char *keyname, DTYPE numval, int decimals, + char *comment, > int *status) + + int fits_update_key_[cmp, dblcmp, fixcmp, fixdblcmp] / ffuk[yc,ym,fc,fm] + (fitsfile *fptr, char *keyname, DTYPE *numval, int decimals, + char *comment, > int *status) +\end{verbatim} + + +\section{Define Data Scaling and Undefined Pixel Parameters} + +These routines set or modify the internal parameters used by CFITSIO +to either scale the data or to represent undefined pixels. Generally +CFITSIO will scale the data according to the values of the BSCALE and +BZERO (or TSCALn and TZEROn) keywords, however these routines may be +used to override the keyword values. This may be useful when one wants +to read or write the raw unscaled values in the FITS file. Similarly, +CFITSIO generally uses the value of the BLANK or TNULLn keyword to +signify an undefined pixel, but these routines may be used to override +this value. These routines do not create or modify the corresponding +header keyword values. See Appendix B for the definition of the +parameters used in these routines. + + +\begin{description} +\item[1 ] Reset the scaling factors in the primary array or image extension; does + not change the BSCALE and BZERO keyword values and only affects the + automatic scaling performed when the data elements are written/read + to/from the FITS file. When reading from a FITS file the returned + data value = (the value given in the FITS array) * BSCALE + BZERO. + The inverse formula is used when writing data values to the FITS + file. \label{ffpscl} +\end{description} + +\begin{verbatim} + int fits_set_bscale / ffpscl + (fitsfile *fptr, double scale, double zero, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Reset the scaling parameters for a table column; does not change + the TSCALn or TZEROn keyword values and only affects the automatic + scaling performed when the data elements are written/read to/from + the FITS file. When reading from a FITS file the returned data + value = (the value given in the FITS array) * TSCAL + TZERO. The + inverse formula is used when writing data values to the FITS file. + \label{fftscl} +\end{description} + +\begin{verbatim} + int fits_set_tscale / fftscl + (fitsfile *fptr, int colnum, double scale, double zero, + > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Define the integer value to be used to signify undefined pixels in the + primary array or image extension. This is only used if BITPIX = 8, 16, + or 32. This does not create or change the value of the BLANK keyword in + the header. \label{ffpnul} +\end{description} + +\begin{verbatim} + int fits_set_imgnull / ffpnul + (fitsfile *fptr, LONGLONG nulval, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Define the string to be used to signify undefined pixels in + a column in an ASCII table. This does not create or change the value + of the TNULLn keyword. \label{ffsnul} +\end{description} + +\begin{verbatim} + int fits_set_atblnull / ffsnul + (fitsfile *fptr, int colnum, char *nulstr, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Define the value to be used to signify undefined pixels in + an integer column in a binary table (where TFORMn = 'B', 'I', or 'J'). + This does not create or change the value of the TNULLn keyword. + \label{fftnul} +\end{description} + +\begin{verbatim} + int fits_set_btblnull / fftnul + (fitsfile *fptr, int colnum, LONGLONG nulval, > int *status) +\end{verbatim} + + +\section{Specialized FITS Primary Array or IMAGE Extension I/O Routines} + +These routines read or write data values in the primary data array +(i.e., the first HDU in the FITS file) or an IMAGE extension. +Automatic data type conversion is performed for if the data type of the +FITS array (as defined by the BITPIX keyword) differs from the data +type of the array in the calling routine. The data values are +automatically scaled by the BSCALE and BZERO header values as they are +being written or read from the FITS array. Unlike the basic routines +described in the previous chapter, most of these routines specifically +support the FITS random groups format. See Appendix B for the +definition of the parameters used in these routines. + +The more primitive reading and writing routines (i. e., ffppr\_, +ffppn\_, ffppn, ffgpv\_, or ffgpf\_) simply treat the primary array as +a long 1-dimensional array of pixels, ignoring the intrinsic +dimensionality of the array. When dealing with a 2D image, for +example, the application program must calculate the pixel offset in the +1-D array that corresponds to any particular X, Y coordinate in the +image. C programmers should note that the ordering of arrays in FITS +files, and hence in all the CFITSIO calls, is more similar to the +dimensionality of arrays in Fortran rather than C. For instance if a +FITS image has NAXIS1 = 100 and NAXIS2 = 50, then a 2-D array just +large enough to hold the image should be declared as array[50][100] and +not as array[100][50]. + +For convenience, higher-level routines are also provided to specificly +deal with 2D images (ffp2d\_ and ffg2d\_) and 3D data cubes (ffp3d\_ +and ffg3d\_). The dimensionality of the FITS image is passed by the +naxis1, naxis2, and naxis3 parameters and the declared dimensions of +the program array are passed in the dim1 and dim2 parameters. Note +that the dimensions of the program array may be larger than the +dimensions of the FITS array. For example if a FITS image with NAXIS1 += NAXIS2 = 400 is read into a program array which is dimensioned as 512 +x 512 pixels, then the image will just fill the lower left corner of +the array with pixels in the range 1 - 400 in the X an Y directions. +This has the effect of taking a contiguous set of pixel value in the +FITS array and writing them to a non-contiguous array in program memory +(i.e., there are now some blank pixels around the edge of the image in +the program array). + +The most general set of routines (ffpss\_, ffgsv\_, and ffgsf\_) may be +used to transfer a rectangular subset of the pixels in a FITS +N-dimensional image to or from an array which has been declared in the +calling program. The fpixel and lpixel parameters are integer arrays +which specify the starting and ending pixel coordinate in each dimension +(starting with 1, not 0) of the FITS image that is to be read or +written. It is important to note that these are the starting and +ending pixels in the FITS image, not in the declared array in the +program. The array parameter in these routines is treated simply as a +large one-dimensional array of the appropriate data type containing the +pixel values; The pixel values in the FITS array are read/written +from/to this program array in strict sequence without any gaps; it is +up to the calling routine to correctly interpret the dimensionality of +this array. The two FITS reading routines (ffgsv\_ and ffgsf\_ ) also +have an `inc' parameter which defines the data sampling interval in +each dimension of the FITS array. For example, if inc[0]=2 and +inc[1]=3 when reading a 2-dimensional FITS image, then only every other +pixel in the first dimension and every 3rd pixel in the second +dimension will be returned to the 'array' parameter. + +Two types of routines are provided to read the data array which differ in +the way undefined pixels are handled. The first type of routines (e.g., +ffgpv\_) simply return an array of data elements in which undefined +pixels are set equal to a value specified by the user in the `nulval' +parameter. An additional feature of these routines is that if the user +sets nulval = 0, then no checks for undefined pixels will be performed, +thus reducing the amount of CPU processing. The second type of routines +(e.g., ffgpf\_) returns the data element array and, in addition, a char +array that indicates whether the value of the corresponding data pixel +is undefined (= 1) or defined (= 0). The latter type of routines may +be more convenient to use in some circumstances, however, it requires +an additional array of logical values which can be unwieldy when working +with large data arrays. + + +\begin{description} +\item[1 ] Write elements into the FITS data array. + \label{ffppr} \label{ffpprx} \label{ffppn} \label{ffppnx} +\end{description} + +\begin{verbatim} + int fits_write_img / ffppr + (fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, int *status); + + int fits_write_img_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffppr[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, > int *status); + + int fits_write_imgnull / ffppn + (fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelements, + DTYPE *array, DTYPE *nulval, > int *status); + + int fits_write_imgnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffppn[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, DTYPE nulval, > int *status); +\end{verbatim} + +\begin{description} +\item[2 ]Set data array elements as undefined. \label{ffppru} +\end{description} + +\begin{verbatim} + int fits_write_img_null / ffppru + (fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelements, + > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Write values into group parameters. This routine only applies + to the `Random Grouped' FITS format which has been used for + applications in radio interferometry, but is officially deprecated + for future use. \label{ffpgpx} +\end{description} + +\begin{verbatim} + int fits_write_grppar_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpgp[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Write a 2-D or 3-D image into the data array. \label{ffp2dx} \label{ffp3dx} +\end{description} + +\begin{verbatim} + int fits_write_2d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffp2d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG dim1, LONGLONG naxis1, + LONGLONG naxis2, DTYPE *array, > int *status) + + int fits_write_3d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffp3d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, LONGLONG dim1, LONGLONG dim2, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, DTYPE *array, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Write an arbitrary data subsection into the data array. \label{ffpssx} +\end{description} + +\begin{verbatim} + int fits_write_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpss[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, DTYPE *array, > int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Read elements from the FITS data array. + \label{ffgpv} \label{ffgpvx} \label{ffgpf} \label{ffgpfx} +\end{description} + +\begin{verbatim} + int fits_read_img / ffgpv + (fitsfile *fptr, int datatype, long firstelem, long nelements, + DTYPE *nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_img_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgpv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + DTYPE nulval, > DTYPE *array, int *anynul, int *status) + + int fits_read_imgnull / ffgpf + (fitsfile *fptr, int datatype, long firstelem, long nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) + + int fits_read_imgnull_[byt, sht, usht, int, uint, lng, ulng, flt, dbl] / + ffgpf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, char *nullarray, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Read values from group parameters. This routine only applies + to the `Random Grouped' FITS format which has been used for + applications in radio interferometry, but is officially deprecated + for future use. \label{ffggpx} +\end{description} + +\begin{verbatim} + int fits_read_grppar_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffggp[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, long firstelem, long nelements, + > DTYPE *array, int *status) +\end{verbatim} + +\begin{description} +\item[8 ] Read 2-D or 3-D image from the data array. Undefined + pixels in the array will be set equal to the value of 'nulval', + unless nulval=0 in which case no testing for undefined pixels will + be performed. \label{ffg2dx} \label{ffg3dx} +\end{description} + +\begin{verbatim} + int fits_read_2d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffg2d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, DTYPE nulval, LONGLONG dim1, LONGLONG naxis1, + LONGLONG naxis2, > DTYPE *array, int *anynul, int *status) + + int fits_read_3d_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffg3d[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, long group, DTYPE nulval, LONGLONG dim1, + LONGLONG dim2, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + > DTYPE *array, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[9 ] Read an arbitrary data subsection from the data array. + \label{ffgsvx} \label{ffgsfx} +\end{description} + +\begin{verbatim} + int fits_read_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int group, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, DTYPE nulval, + > DTYPE *array, int *anynul, int *status) + + int fits_read_subsetnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int group, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, > DTYPE *array, + char *nullarray, int *anynul, int *status) +\end{verbatim} + + +\section{Specialized FITS ASCII and Binary Table Routines} + + +\subsection{General Column Routines} + + +\begin{description} +\item[1 ] Get information about an existing ASCII or binary table column. A null + pointer may be given for any of the output parameters that are not + needed. DATATYPE is a character string which returns the data type + of the column as defined by the TFORMn keyword (e.g., 'I', 'J','E', + 'D', etc.). In the case of an ASCII character column, typecode + will have a value of the form 'An' where 'n' is an integer + expressing the width of the field in characters. For example, if + TFORM = '160A8' then ffgbcl will return typechar='A8' and + repeat=20. All the returned parameters are scalar quantities. + \label{ffgacl} \label{ffgbcl} +\end{description} + +\begin{verbatim} + int fits_get_acolparms / ffgacl + (fitsfile *fptr, int colnum, > char *ttype, long *tbcol, + char *tunit, char *tform, double *scale, double *zero, + char *nulstr, char *tdisp, int *status) + + int fits_get_bcolparms / ffgbcl + (fitsfile *fptr, int colnum, > char *ttype, char *tunit, + char *typechar, long *repeat, double *scale, double *zero, + long *nulval, char *tdisp, int *status) + + int fits_get_bcolparmsll / ffgbclll + (fitsfile *fptr, int colnum, > char *ttype, char *tunit, + char *typechar, LONGLONG *repeat, double *scale, double *zero, + LONGLONG *nulval, char *tdisp, int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Return optimal number of rows to read or write at one time for + maximum I/O efficiency. Refer to the + ``Optimizing Code'' section in Chapter 5 for more discussion on how + to use this routine. \label{ffgrsz} +\end{description} + +\begin{verbatim} + int fits_get_rowsize / ffgrsz + (fitsfile *fptr, long *nrows, *status) +\end{verbatim} + +\begin{description} +\item[3 ] Define the zero indexed byte offset of the 'heap' measured from + the start of the binary table data. By default the heap is assumed + to start immediately following the regular table data, i.e., at + location NAXIS1 x NAXIS2. This routine is only relevant for + binary tables which contain variable length array columns (with + TFORMn = 'Pt'). This routine also automatically writes + the value of theap to a keyword in the extension header. This + routine must be called after the required keywords have been + written (with ffphbn) + but before any data is written to the table. \label{ffpthp} +\end{description} + +\begin{verbatim} + int fits_write_theap / ffpthp + (fitsfile *fptr, long theap, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Test the contents of the binary table variable array heap, returning + the size of the heap, the number of unused bytes that are not currently + pointed to by any of the descriptors, and the number of bytes which are + pointed to by multiple descriptors. It also returns valid = FALSE if + any of the descriptors point to invalid addresses out of range of the + heap. \label{fftheap} +\end{description} + +\begin{verbatim} + int fits_test_heap / fftheap + (fitsfile *fptr, > LONGLONG *heapsize, LONGLONG *unused, LONGLONG *overlap, + int *validheap, int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Re-pack the vectors in the binary table variable array heap to recover + any unused space. Normally, when a vector in a variable length + array column is rewritten the previously written array remains in + the heap as wasted unused space. This routine will repack the + arrays that are still in use, thus eliminating any bytes in the + heap that are no longer in use. Note that if several vectors point + to the same bytes in the heap, then this routine will make + duplicate copies of the bytes for each vector, which will actually + expand the size of the heap. \label{ffcmph} +\end{description} + +\begin{verbatim} + int fits_compress_heap / ffcmph + (fitsfile *fptr, > int *status) +\end{verbatim} + + +\subsection{Low-Level Table Access Routines} + +The following 2 routines provide low-level access to the data in ASCII +or binary tables and are mainly useful as an efficient way to copy all +or part of a table from one location to another. These routines simply +read or write the specified number of consecutive bytes in an ASCII or +binary table, without regard for column boundaries or the row length in +the table. These routines do not perform any machine dependent data +conversion or byte swapping. See Appendix B for the definition of the +parameters used in these routines. + + +\begin{description} +\item[1 ] Read or write a consecutive array of bytes from an ASCII or binary + table \label{ffgtbb} \label{ffptbb} +\end{description} + +\begin{verbatim} + int fits_read_tblbytes / ffgtbb + (fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + > unsigned char *values, int *status) + + int fits_write_tblbytes / ffptbb + (fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + unsigned char *values, > int *status) +\end{verbatim} + + +\subsection{Write Column Data Routines} + + +\begin{description} +\item[1 ] Write elements into an ASCII or binary table column (in the CDU). + The data type of the array is implied by the suffix of the + routine name. \label{ffpcls} +\end{description} + +\begin{verbatim} + int fits_write_col_str / ffpcls + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char **array, > int *status) + + int fits_write_col_[log,byt,sht,usht,int,uint,lng,ulng,lnglng,flt,dbl,cmp,dblcmp] / + ffpcl[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, DTYPE *array, > int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Write elements into an ASCII or binary table column + substituting the appropriate FITS null value for any elements that + are equal to the nulval parameter. \label{ffpcnx} +\end{description} + +\begin{verbatim} + int fits_write_colnull_[log, byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffpcn[l,b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE *array, DTYPE nulval, > int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Write string elements into a binary table column (in the CDU) + substituting the FITS null value for any elements that + are equal to the nulstr string. \label{ffpcns} +\end{description} + +\begin{verbatim} + int fits_write_colnull_str / ffpcns + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char **array, char *nulstr, > int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Write bit values into a binary byte ('B') or bit ('X') table column (in + the CDU). Larray is an array of characters corresponding to the + sequence of bits to be written. If an element of larray is true + (not equal to zero) then the corresponding bit in the FITS table is + set to 1, otherwise the bit is set to 0. The 'X' column in a FITS + table is always padded out to a multiple of 8 bits where the bit + array starts with the most significant bit of the byte and works + down towards the 1's bit. For example, a '4X' array, with the + first bit = 1 and the remaining 3 bits = 0 is equivalent to the 8-bit + unsigned byte decimal value of 128 ('1000 0000B'). In the case of + 'X' columns, CFITSIO can write to all 8 bits of each byte whether + they are formally valid or not. Thus if the column is defined as + '4X', and one calls ffpclx with firstbit=1 and nbits=8, then all + 8 bits will be written into the first byte (as opposed to writing + the first 4 bits into the first row and then the next 4 bits into + the next row), even though the last 4 bits of each byte are formally + not defined and should all be set = 0. It should also be noted that + it is more efficient to write 'X' columns an entire byte at a time, + instead of bit by bit. Any of the CFITSIO routines that write to + columns (e.g. fits\_write\_col\_byt) may be used for this purpose. + These routines will interpret 'X' columns as though they were 'B' + columns (e.g., '1X' through '8X' is equivalent + to '1B', and '9X' through '16X' is equivalent to '2B'). \label{ffpclx} +\end{description} + +\begin{verbatim} + int fits_write_col_bit / ffpclx + (fitsfile *fptr, int colnum, LONGLONG firstrow, long firstbit, + long nbits, char *larray, > int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Write the descriptor for a variable length column in a binary table. + This routine can be used in conjunction with ffgdes to enable + 2 or more arrays to point to the same storage location to save + storage space if the arrays are identical. \label{ffpdes} +\end{description} + +\begin{verbatim} + int fits_write_descript / ffpdes + (fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG repeat, + LONGLONG offset, > int *status) +\end{verbatim} + +\subsection{Read Column Data Routines} + +Two types of routines are provided to get the column data which differ +in the way undefined pixels are handled. The first set of routines +(ffgcv) simply return an array of data elements in which undefined +pixels are set equal to a value specified by the user in the 'nullval' +parameter. If nullval = 0, then no checks for undefined pixels will be +performed, thus increasing the speed of the program. The second set of +routines (ffgcf) returns the data element array and in addition a +logical array of flags which defines whether the corresponding data +pixel is undefined. See Appendix B for the definition of the +parameters used in these routines. + + Any column, regardless of it's intrinsic data type, may be read as a + string. It should be noted however that reading a numeric column as + a string is 10 - 100 times slower than reading the same column as a number + due to the large overhead in constructing the formatted strings. + The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + data type of the column. The length of the returned strings (not + including the null terminating character) can be determined with + the fits\_get\_col\_display\_width routine. The following TDISPn + display formats are currently supported: + +\begin{verbatim} + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +\end{verbatim} + where w is the width in characters of the displayed values, m is + the minimum number of digits displayed, and d is the number of + digits to the right of the decimal. The .m field is optional. + + +\begin{description} +\item[1 ] Read elements from an ASCII or binary table column (in the CDU). These + routines return the values of the table column array elements. Undefined + array elements will be returned with a value = nulval, unless nulval = 0 + (or = ' ' for ffgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned + elements are undefined. \label{ffgcvx} +\end{description} + +\begin{verbatim} + int fits_read_col_str / ffgcvs + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, char *nulstr, > char **array, int *anynul, + int *status) + + int fits_read_col_[log,byt,sht,usht,int,uint,lng,ulng, lnglng, flt, dbl, cmp, dblcmp] / + ffgcv[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, DTYPE nulval, > DTYPE *array, int *anynul, + int *status) +\end{verbatim} + +\begin{description} +\item[2 ] Read elements and null flags from an ASCII or binary table column (in the + CHDU). These routines return the values of the table column array elements. + Any undefined array elements will have the corresponding nullarray element + set equal to TRUE. The anynul parameter is set to true if any of the + returned elements are undefined. \label{ffgcfx} +\end{description} + +\begin{verbatim} + int fits_read_colnull_str / ffgcfs + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelements, > char **array, char *nullarray, int *anynul, + int *status) + + int fits_read_colnull_[log,byt,sht,usht,int,uint,lng,ulng,lnglng,flt,dbl,cmp,dblcmp] / + ffgcf[l,b,i,ui,k,uk,j,uj,jj,e,d,c,m] + (fitsfile *fptr, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelements, > DTYPE *array, + char *nullarray, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[3 ] Read an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Undefined pixels + in the array will be set equal to the value of 'nulval', + unless nulval=0 in which case no testing for undefined pixels will + be performed. The first and last rows in the table to be read + are specified by fpixel(naxis+1) and lpixel(naxis+1), and hence + are treated as the next higher dimension of the FITS N-dimensional + array. The INC parameter specifies the sampling interval in + each dimension between the data elements that will be returned. \label{ffgsvx2} +\end{description} + +\begin{verbatim} + int fits_read_subset_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsv[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, int naxis, long *naxes, long *fpixel, + long *lpixel, long *inc, DTYPE nulval, > DTYPE *array, int *anynul, + int *status) +\end{verbatim} + +\begin{description} +\item[4 ] Read an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Any Undefined + pixels in the array will have the corresponding 'nullarray' + element set equal to TRUE. The first and last rows in the table + to be read are specified by fpixel(naxis+1) and lpixel(naxis+1), + and hence are treated as the next higher dimension of the FITS + N-dimensional array. The INC parameter specifies the sampling + interval in each dimension between the data elements that will be + returned. \label{ffgsfx2} +\end{description} + +\begin{verbatim} + int fits_read_subsetnull_[byt, sht, usht, int, uint, lng, ulng, lnglng, flt, dbl] / + ffgsf[b,i,ui,k,uk,j,uj,jj,e,d] + (fitsfile *fptr, int colnum, int naxis, long *naxes, + long *fpixel, long *lpixel, long *inc, > DTYPE *array, + char *nullarray, int *anynul, int *status) +\end{verbatim} + +\begin{description} +\item[5 ] Read bit values from a byte ('B') or bit (`X`) table column (in the + CDU). Larray is an array of logical values corresponding to the + sequence of bits to be read. If larray is true then the + corresponding bit was set to 1, otherwise the bit was set to 0. + The 'X' column in a FITS table is always padded out to a multiple + of 8 bits where the bit array starts with the most significant bit + of the byte and works down towards the 1's bit. For example, a + '4X' array, with the first bit = 1 and the remaining 3 bits = 0 is + equivalent to the 8-bit unsigned byte value of 128. + Note that in the case of 'X' columns, CFITSIO can read all 8 bits + of each byte whether they are formally valid or not. Thus if the + column is defined as '4X', and one calls ffgcx with firstbit=1 and + nbits=8, then all 8 bits will be read from the first byte (as + opposed to reading the first 4 bits from the first row and then the + first 4 bits from the next row), even though the last 4 bits of + each byte are formally not defined. It should also be noted that + it is more efficient to read 'X' columns an entire byte at a time, + instead of bit by bit. Any of the CFITSIO routines that read + columns (e.g. fits\_read\_col\_byt) may be used for this + purpose. These routines will interpret 'X' columns as though they + were 'B' columns (e.g., '8X' is equivalent to '1B', and '16X' is + equivalent to '2B'). \label{ffgcx} +\end{description} + +\begin{verbatim} + int fits_read_col_bit / ffgcx + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstbit, + LONGLONG nbits, > char *larray, int *status) +\end{verbatim} + +\begin{description} +\item[6 ] Read any consecutive set of bits from an 'X' or 'B' column and + interpret them as an unsigned n-bit integer. nbits must be less + than 16 or 32 in ffgcxui and ffgcxuk, respectively. If nrows + is greater than 1, then the same set of bits will be read from + each row, starting with firstrow. The bits are numbered with + 1 = the most significant bit of the first element of the column. + \label{ffgcxui} +\end{description} + +\begin{verbatim} + int fits_read_col_bit_[usht, uint] / ffgcx[ui,uk] + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG, nrows, + long firstbit, long nbits, > DTYPE *array, int *status) +\end{verbatim} + +\begin{description} +\item[7 ] Return the descriptor for a variable length column in a binary table. + The descriptor consists of 2 integer parameters: the number of elements + in the array and the starting offset relative to the start of the heap. + The first pair of routine returns a single descriptor whereas the second + pair of routine + returns the descriptors for a range of rows in the table. The only + difference between the 2 routines in each pair is that one returns + the parameters as 'long' integers, whereas the other returns the values + as 64-bit 'LONGLONG' integers. + \label{ffgdes} +\end{description} + +\begin{verbatim} + int fits_read_descript / ffgdes + (fitsfile *fptr, int colnum, LONGLONG rownum, > long *repeat, + long *offset, int *status) + + int fits_read_descriptll / ffgdesll + (fitsfile *fptr, int colnum, LONGLONG rownum, > LONGLONG *repeat, + LONGLONG *offset, int *status) + + int fits_read_descripts / ffgdess + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows + > long *repeat, long *offset, int *status) + + int fits_read_descriptsll / ffgdessll + (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows + > LONGLONG *repeat, LONGLONG *offset, int *status) +\end{verbatim} + +\chapter{ Extended File Name Syntax } + + +\section{Overview} + +CFITSIO supports an extended syntax when specifying the name of the +data file to be opened or created that includes the following +features: + +\begin{itemize} +\item +CFITSIO can read IRAF format images which have header file names that +end with the '.imh' extension, as well as reading and writing FITS +files, This feature is implemented in CFITSIO by first converting the +IRAF image into a temporary FITS format file in memory, then opening +the FITS file. Any of the usual CFITSIO routines then may be used to +read the image header or data. Similarly, raw binary data arrays can +be read by converting them on the fly into virtual FITS images. + +\item +FITS files on the internet can be read (and sometimes written) using the FTP, +HTTP, or ROOT protocols. + +\item +FITS files can be piped between tasks on the stdin and stdout streams. + +\item +FITS files can be read and written in shared memory. This can +potentially achieve better data I/O performance compared to reading and +writing the same FITS files on magnetic disk. + +\item +Compressed FITS files in gzip or Unix COMPRESS format can be directly read. + +\item +Output FITS files can be written directly in compressed gzip format, +thus saving disk space. + +\item +FITS table columns can be created, modified, or deleted 'on-the-fly' as +the table is opened by CFITSIO. This creates a virtual FITS file containing +the modifications that is then opened by the application program. + +\item +Table rows may be selected, or filtered out, on the fly when the table +is opened by CFITSIO, based on an user-specified expression. +Only rows for which the expression evaluates to 'TRUE' are retained +in the copy of the table that is opened by the application program. + +\item +Histogram images may be created on the fly by binning the values in +table columns, resulting in a virtual N-dimensional FITS image. The +application program then only sees the FITS image (in the primary +array) instead of the original FITS table. +\end{itemize} + +The latter 3 table filtering features in particular add very powerful +data processing capabilities directly into CFITSIO, and hence into +every task that uses CFITSIO to read or write FITS files. For example, +these features transform a very simple program that just copies an +input FITS file to a new output file (like the `fitscopy' program that +is distributed with CFITSIO) into a multipurpose FITS file processing +tool. By appending fairly simple qualifiers onto the name of the input +FITS file, the user can perform quite complex table editing operations +(e.g., create new columns, or filter out rows in a table) or create +FITS images by binning or histogramming the values in table columns. +In addition, these functions have been coded using new state-of-the art +algorithms that are, in some cases, 10 - 100 times faster than previous +widely used implementations. + +Before describing the complete syntax for the extended FITS file names +in the next section, here are a few examples of FITS file names that +give a quick overview of the allowed syntax: + +\begin{itemize} +\item +{\tt myfile.fits}: the simplest case of a FITS file on disk in the current +directory. + +\item +{\tt myfile.imh}: opens an IRAF format image file and converts it on the +fly into a temporary FITS format image in memory which can then be read with +any other CFITSIO routine. + +\item +{\tt rawfile.dat[i512,512]}: opens a raw binary data array (a 512 x 512 +short integer array in this case) and converts it on the fly into a +temporary FITS format image in memory which can then be read with any +other CFITSIO routine. + +\item +{\tt myfile.fits.gz}: if this is the name of a new output file, the '.gz' +suffix will cause it to be compressed in gzip format when it is written to +disk. + +\item +{\tt myfile.fits.gz[events, 2]}: opens and uncompresses the gzipped file +myfile.fits then moves to the extension with the keywords EXTNAME += 'EVENTS' and EXTVER = 2. + +\item +{\tt -}: a dash (minus sign) signifies that the input file is to be read +from the stdin file stream, or that the output file is to be written to +the stdout stream. + +\item +{\tt ftp://legacy.gsfc.nasa.gov/test/vela.fits}: FITS files in any ftp +archive site on the internet may be directly opened with read-only +access. + +\item +{\tt http://legacy.gsfc.nasa.gov/software/test.fits}: any valid URL to a +FITS file on the Web may be opened with read-only access. + +\item +{\tt root://legacy.gsfc.nasa.gov/test/vela.fits}: similar to ftp access +except that it provides write as well as read access to the files +across the network. This uses the root protocol developed at CERN. + +\item +{\tt shmem://h2[events]}: opens the FITS file in a shared memory segment and +moves to the EVENTS extension. + +\item +{\tt mem://}: creates a scratch output file in core computer memory. The +resulting 'file' will disappear when the program exits, so this +is mainly useful for testing purposes when one does not want a +permanent copy of the output file. + +\item +{\tt myfile.fits[3; Images(10)]}: opens a copy of the image contained in the +10th row of the 'Images' column in the binary table in the 3th extension +of the FITS file. The virtual file that is opened by the application just +contains this single image in the primary array. + +\item +{\tt myfile.fits[1:512:2, 1:512:2]}: opens a section of the input image +ranging from the 1st to the 512th pixel in X and Y, and selects every +second pixel in both dimensions, resulting in a 256 x 256 pixel input image +in this case. + +\item +{\tt myfile.fits[EVENTS][col Rad = sqrt(X**2 + Y**2)]}: creates and opens +a virtual file on the fly that is identical to +myfile.fits except that it will contain a new column in the EVENTS +extension called 'Rad' whose value is computed using the indicated +expression which is a function of the values in the X and Y columns. + +\item +{\tt myfile.fits[EVENTS][PHA > 5]}: creates and opens a virtual FITS +files that is identical to 'myfile.fits' except that the EVENTS table +will only contain the rows that have values of the PHA column greater +than 5. In general, any arbitrary boolean expression using a C or +Fortran-like syntax, which may combine AND and OR operators, +may be used to select rows from a table. + +\item +{\tt myfile.fits[EVENTS][bin (X,Y)=1,2048,4]}: creates a temporary FITS +primary array image which is computed on the fly by binning (i.e, +computing the 2-dimensional histogram) of the values in the X and Y +columns of the EVENTS extension. In this case the X and Y coordinates +range from 1 to 2048 and the image pixel size is 4 units in both +dimensions, so the resulting image is 512 x 512 pixels in size. + +\item +The final example combines many of these feature into one complex +expression (it is broken into several lines for clarity): + +\begin{verbatim} + ftp://legacy.gsfc.nasa.gov/data/sample.fits.gz[EVENTS] + [col phacorr = pha * 1.1 - 0.3][phacorr >= 5.0 && phacorr <= 14.0] + [bin (X,Y)=32] +\end{verbatim} +In this case, CFITSIO (1) copies and uncompresses the FITS file from +the ftp site on the legacy machine, (2) moves to the 'EVENTS' +extension, (3) calculates a new column called 'phacorr', (4) selects +the rows in the table that have phacorr in the range 5 to 14, and +finally (5) bins the remaining rows on the X and Y column coordinates, +using a pixel size = 32 to create a 2D image. All this processing is +completely transparent to the application program, which simply sees +the final 2-D image in the primary array of the opened file. +\end{itemize} + +The full extended CFITSIO FITS file name can contain several different +components depending on the context. These components are described in +the following sections: + +\begin{verbatim} +When creating a new file: + filetype://BaseFilename(templateName)[compress] + +When opening an existing primary array or image HDU: + filetype://BaseFilename(outName)[HDUlocation][ImageSection][pixFilter] + +When opening an existing table HDU: + filetype://BaseFilename(outName)[HDUlocation][colFilter][rowFilter][binSpec] +\end{verbatim} +The filetype, BaseFilename, outName, HDUlocation, ImageSection, and pixFilter +components, if present, must be given in that order, but the colFilter, +rowFilter, and binSpec specifiers may follow in any order. Regardless +of the order, however, the colFilter specifier, if present, will be +processed first by CFITSIO, followed by the rowFilter specifier, and +finally by the binSpec specifier. + + +\section{Filetype} + +The type of file determines the medium on which the file is located +(e.g., disk or network) and, hence, which internal device driver is used by +CFITSIO to read and/or write the file. Currently supported types are + +\begin{verbatim} + file:// - file on local magnetic disk (default) + ftp:// - a readonly file accessed with the anonymous FTP protocol. + It also supports ftp://username:password@hostname/... + for accessing password-protected ftp sites. + http:// - a readonly file accessed with the HTTP protocol. It + does not support username:password like the ftp driver. + Proxy HTTP survers are supported using the http_proxy + environment variable. + gsiftp:// - to access files on a computational grid using the + gridftp protocol in the Globus toolkit + root:// - uses the CERN root protocol for writing as well as + reading files over the network. + shmem:// - opens or creates a file which persists in the computer's + shared memory. + mem:// - opens a temporary file in core memory. The file + disappears when the program exits so this is mainly + useful for test purposes when a permanent output file + is not desired. +\end{verbatim} +If the filetype is not specified, then type file:// is assumed. +The double slashes '//' are optional and may be omitted in most cases. + + +\subsection{Notes about HTTP proxy servers} + +A proxy HTTP server may be used by defining the address (URL) and port +number of the proxy server with the http\_proxy environment variable. +For example + +\begin{verbatim} + setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 +\end{verbatim} +will cause CFITSIO to use port 3128 on the heasarc proxy server whenever +reading a FITS file with HTTP. + + +\subsection{Notes about the gsiftp filetype} + +DEPENDENCIES: Globus toolkit (2.4.3 or higher) (GT) should be installed. +There are two different ways to install GT: + +1) goto the globus toolkit web page www.globus.org and follow the + download and compilation instructions; + +2) goto the Virtual Data Toolkit web page http://vdt.cs.wisc.edu/ + and follow the instructions (STRONGLY SUGGESTED); + +Once a globus client has been installed in your system with a specific flavour +it is possible to compile and install the CFITSIO libraries. +Specific configuration flags must be used: + +1) --with-gsiftp[[=PATH]] Enable Globus Toolkit gsiftp protocol support + PATH=GLOBUS\_LOCATION i.e. the location of your globus installation + +2) --with-gsiftp-flavour[[=PATH] defines the specific Globus flavour + ex. gcc32 + +Both the flags must be used and it is mandatory to set both the PATH and the +flavour. + +USAGE: To access files on a gridftp server it is necessary to use a gsiftp prefix: + +example: gsiftp://remote\_server\_fqhn/directory/filename + +The gridftp driver uses a local buffer on a temporary file the file is located +in the /tmp directory. If you have special permissions on /tmp or you do not have a /tmp +directory, it is possible to force another location setting the GSIFTP\_TMPFILE environment +variable (ex. export GSIFTP\_TMPFILE=/your/location/yourtmpfile). + +Grid FTP supports multi channel transfer. By default a single channel transmission is +available. However, it is possible to modify this behavior setting the GSIFTP\_STREAMS +environment variable (ex. export GSIFTP\_STREAMS=8). + + + +\subsection{Notes about the root filetype} + +The original rootd server can be obtained from: +\verb-ftp://root.cern.ch/root/rootd.tar.gz- +but, for it to work correctly with CFITSIO one has to use a modified +version which supports a command to return the length of the file. +This modified version is available in rootd subdirectory +in the CFITSIO ftp area at + +\begin{verbatim} + ftp://legacy.gsfc.nasa.gov/software/fitsio/c/root/rootd.tar.gz. +\end{verbatim} + +This small server is started either by inetd when a client requests a +connection to a rootd server or by hand (i.e. from the command line). +The rootd server works with the ROOT TNetFile class. It allows remote +access to ROOT database files in either read or write mode. By default +TNetFile assumes port 432 (which requires rootd to be started as root). +To run rootd via inetd add the following line to /etc/services: + +\begin{verbatim} + rootd 432/tcp +\end{verbatim} +and to /etc/inetd.conf, add the following line: + +\begin{verbatim} + rootd stream tcp nowait root /user/rdm/root/bin/rootd rootd -i +\end{verbatim} +Force inetd to reread its conf file with \verb+kill -HUP +. +You can also start rootd by hand running directly under your private +account (no root system privileges needed). For example to start +rootd listening on port 5151 just type: \verb+rootd -p 5151+ +Notice that no \& is needed. Rootd will go into background by itself. + +\begin{verbatim} + Rootd arguments: + -i says we were started by inetd + -p port# specifies a different port to listen on + -d level level of debug info written to syslog + 0 = no debug (default) + 1 = minimum + 2 = medium + 3 = maximum +\end{verbatim} +Rootd can also be configured for anonymous usage (like anonymous ftp). +To setup rootd to accept anonymous logins do the following (while being +logged in as root): + +\begin{verbatim} + - Add the following line to /etc/passwd: + + rootd:*:71:72:Anonymous rootd:/var/spool/rootd:/bin/false + + where you may modify the uid, gid (71, 72) and the home directory + to suite your system. + + - Add the following line to /etc/group: + + rootd:*:72:rootd + + where the gid must match the gid in /etc/passwd. + + - Create the directories: + + mkdir /var/spool/rootd + mkdir /var/spool/rootd/tmp + chmod 777 /var/spool/rootd/tmp + + Where /var/spool/rootd must match the rootd home directory as + specified in the rootd /etc/passwd entry. + + - To make writeable directories for anonymous do, for example: + + mkdir /var/spool/rootd/pub + chown rootd:rootd /var/spool/rootd/pub +\end{verbatim} +That's all. Several additional remarks: you can login to an anonymous +server either with the names "anonymous" or "rootd". The password should +be of type user@host.do.main. Only the @ is enforced for the time +being. In anonymous mode the top of the file tree is set to the rootd +home directory, therefore only files below the home directory can be +accessed. Anonymous mode only works when the server is started via +inetd. + + +\subsection{Notes about the shmem filetype:} + +Shared memory files are currently supported on most Unix platforms, +where the shared memory segments are managed by the operating system +kernel and `live' independently of processes. They are not deleted (by +default) when the process which created them terminates, although they +will disappear if the system is rebooted. Applications can create +shared memory files in CFITSIO by calling: + +\begin{verbatim} + fit_create_file(&fitsfileptr, "shmem://h2", &status); +\end{verbatim} +where the root `file' names are currently restricted to be 'h0', 'h1', +'h2', 'h3', etc., up to a maximum number defined by the the value of +SHARED\_MAXSEG (equal to 16 by default). This is a prototype +implementation of the shared memory interface and a more robust +interface, which will have fewer restrictions on the number of files +and on their names, may be developed in the future. + +When opening an already existing FITS file in shared memory one calls +the usual CFITSIO routine: + +\begin{verbatim} + fits_open_file(&fitsfileptr, "shmem://h7", mode, &status) +\end{verbatim} +The file mode can be READWRITE or READONLY just as with disk files. +More than one process can operate on READONLY mode files at the same +time. CFITSIO supports proper file locking (both in READONLY and +READWRITE modes), so calls to fits\_open\_file may be locked out until +another other process closes the file. + +When an application is finished accessing a FITS file in a shared +memory segment, it may close it (and the file will remain in the +system) with fits\_close\_file, or delete it with fits\_delete\_file. +Physical deletion is postponed until the last process calls +ffclos/ffdelt. fits\_delete\_file tries to obtain a READWRITE lock on +the file to be deleted, thus it can be blocked if the object was not +opened in READWRITE mode. + +A shared memory management utility program called `smem', is included +with the CFITSIO distribution. It can be built by typing `make smem'; +then type `smem -h' to get a list of valid options. Executing smem +without any options causes it to list all the shared memory segments +currently residing in the system and managed by the shared memory +driver. To get a list of all the shared memory objects, run the system +utility program `ipcs [-a]'. + + +\section{Base Filename} + +The base filename is the name of the file optionally including the +director/subdirectory path, and in the case of `ftp', `http', and `root' +filetypes, the machine identifier. Examples: + +\begin{verbatim} + myfile.fits + !data.fits + /data/myfile.fits + fits.gsfc.nasa.gov/ftp/sampledata/myfile.fits.gz +\end{verbatim} + +When creating a new output file on magnetic disk (of type file://) if +the base filename begins with an exclamation point (!) then any +existing file with that same basename will be deleted prior to creating +the new FITS file. Otherwise if the file to be created already exists, +then CFITSIO will return an error and will not overwrite the existing +file. Note that the exclamation point, '!', is a special UNIX +character, so if it is used on the command line rather than entered at +a task prompt, it must be preceded by a backslash to force the UNIX +shell to pass it verbatim to the application program. + +If the output disk file name ends with the suffix '.gz', then CFITSIO +will compress the file using the gzip compression algorithm before +writing it to disk. This can reduce the amount of disk space used by +the file. Note that this feature requires that the uncompressed file +be constructed in memory before it is compressed and written to disk, +so it can fail if there is insufficient available memory. + +An input FITS file may be compressed with the gzip or Unix compress +algorithms, in which case CFITSIO will uncompress the file on the fly +into a temporary file (in memory or on disk). Compressed files may +only be opened with read-only permission. When specifying the name of +a compressed FITS file it is not necessary to append the file suffix +(e.g., `.gz' or `.Z'). If CFITSIO cannot find the input file name +without the suffix, then it will automatically search for a compressed +file with the same root name. In the case of reading ftp and http type +files, CFITSIO generally looks for a compressed version of the file +first, before trying to open the uncompressed file. By default, +CFITSIO copies (and uncompressed if necessary) the ftp or http FITS +file into memory on the local machine before opening it. This will +fail if the local machine does not have enough memory to hold the whole +FITS file, so in this case, the output filename specifier (see the next +section) can be used to further control how CFITSIO reads ftp and http +files. + +If the input file is an IRAF image file (*.imh file) then CFITSIO will +automatically convert it on the fly into a virtual FITS image before it +is opened by the application program. IRAF images can only be opened +with READONLY file access. + +Similarly, if the input file is a raw binary data array, then CFITSIO +will convert it on the fly into a virtual FITS image with the basic set +of required header keywords before it is opened by the application +program (with READONLY access). In this case the data type and +dimensions of the image must be specified in square brackets following +the filename (e.g. rawfile.dat[ib512,512]). The first character (case +insensitive) defines the data type of the array: + +\begin{verbatim} + b 8-bit unsigned byte + i 16-bit signed integer + u 16-bit unsigned integer + j 32-bit signed integer + r or f 32-bit floating point + d 64-bit floating point +\end{verbatim} +An optional second character specifies the byte order of the array +values: b or B indicates big endian (as in FITS files and the native +format of SUN UNIX workstations and Mac PCs) and l or L indicates +little endian (native format of DEC OSF workstations and IBM PCs). If +this character is omitted then the array is assumed to have the native +byte order of the local machine. These data type characters are then +followed by a series of one or more integer values separated by commas +which define the size of each dimension of the raw array. Arrays with +up to 5 dimensions are currently supported. Finally, a byte offset to +the position of the first pixel in the data file may be specified by +separating it with a ':' from the last dimension value. If omitted, it +is assumed that the offset = 0. This parameter may be used to skip +over any header information in the file that precedes the binary data. +Further examples: + +\begin{verbatim} + raw.dat[b10000] 1-dimensional 10000 pixel byte array + raw.dat[rb400,400,12] 3-dimensional floating point big-endian array + img.fits[ib512,512:2880] reads the 512 x 512 short integer array in + a FITS file, skipping over the 2880 byte header +\end{verbatim} + +One special case of input file is where the filename = `-' (a dash or +minus sign) or 'stdin' or 'stdout', which signifies that the input file +is to be read from the stdin stream, or written to the stdout stream if +a new output file is being created. In the case of reading from stdin, +CFITSIO first copies the whole stream into a temporary FITS file (in +memory or on disk), and subsequent reading of the FITS file occurs in +this copy. When writing to stdout, CFITSIO first constructs the whole +file in memory (since random access is required), then flushes it out +to the stdout stream when the file is closed. In addition, if the +output filename = '-.gz' or 'stdout.gz' then it will be gzip compressed +before being written to stdout. + +This ability to read and write on the stdin and stdout steams allows +FITS files to be piped between tasks in memory rather than having to +create temporary intermediate FITS files on disk. For example if task1 +creates an output FITS file, and task2 reads an input FITS file, the +FITS file may be piped between the 2 tasks by specifying + +\begin{verbatim} + task1 - | task2 - +\end{verbatim} +where the vertical bar is the Unix piping symbol. This assumes that the 2 +tasks read the name of the FITS file off of the command line. + + +\section{Output File Name when Opening an Existing File} + +An optional output filename may be specified in parentheses immediately +following the base file name to be opened. This is mainly useful in +those cases where CFITSIO creates a temporary copy of the input FITS +file before it is opened and passed to the application program. This +happens by default when opening a network FTP or HTTP-type file, when +reading a compressed FITS file on a local disk, when reading from the +stdin stream, or when a column filter, row filter, or binning specifier +is included as part of the input file specification. By default this +temporary file is created in memory. If there is not enough memory to +create the file copy, then CFITSIO will exit with an error. In these +cases one can force a permanent file to be created on disk, instead of +a temporary file in memory, by supplying the name in parentheses +immediately following the base file name. The output filename can +include the '!' clobber flag. + +Thus, if the input filename to CFITSIO is: +\verb+file1.fits.gz(file2.fits)+ +then CFITSIO will uncompress `file1.fits.gz' into the local disk file +`file2.fits' before opening it. CFITSIO does not automatically delete +the output file, so it will still exist after the application program +exits. + +The output filename "mem://" is also allowed, which will write the +output file into memory, and also allow write access to the file. This +'file' will disappear when it is closed, but this may be useful for +some applications which only need to modify a temporary copy of the file. + +In some cases, several different temporary FITS files will be created +in sequence, for instance, if one opens a remote file using FTP, then +filters rows in a binary table extension, then create an image by +binning a pair of columns. In this case, the remote file will be +copied to a temporary local file, then a second temporary file will be +created containing the filtered rows of the table, and finally a third +temporary file containing the binned image will be created. In cases +like this where multiple files are created, the outfile specifier will +be interpreted the name of the final file as described below, in descending +priority: + +\begin{itemize} +\item +as the name of the final image file if an image within a single binary +table cell is opened or if an image is created by binning a table column. +\item +as the name of the file containing the filtered table if a column filter +and/or a row filter are specified. +\item +as the name of the local copy of the remote FTP or HTTP file. +\item +as the name of the uncompressed version of the FITS file, if a +compressed FITS file on local disk has been opened. +\item +otherwise, the output filename is ignored. +\end{itemize} + +The output file specifier is useful when reading FTP or HTTP-type +FITS files since it can be used to create a local disk copy of the file +that can be reused in the future. If the output file name = `*' then a +local file with the same name as the network file will be created. +Note that CFITSIO will behave differently depending on whether the +remote file is compressed or not as shown by the following examples: +\begin{itemize} +\item +\verb+ftp://remote.machine/tmp/myfile.fits.gz(*)+ - the remote compressed +file is copied to the local compressed file `myfile.fits.gz', which +is then uncompressed in local memory before being opened and passed +to the application program. + +\item +\verb+ftp://remote.machine/tmp/myfile.fits.gz(myfile.fits)+ - the +remote compressed file is copied and uncompressed into the local file +`myfile.fits'. This example requires less local memory than the +previous example since the file is uncompressed on disk instead of in +memory. + +\item +\verb+ftp://remote.machine/tmp/myfile.fits(myfile.fits.gz)+ - this will +usually produce an error since CFITSIO itself cannot compress files. +\end{itemize} + +The exact behavior of CFITSIO in the latter case depends on the type of +ftp server running on the remote machine and how it is configured. In +some cases, if the file `myfile.fits.gz' exists on the remote machine, +then the server will copy it to the local machine. In other cases the +ftp server will automatically create and transmit a compressed version +of the file if only the uncompressed version exists. This can get +rather confusing, so users should use a certain amount of caution when +using the output file specifier with FTP or HTTP file types, to make +sure they get the behavior that they expect. + + +\section{Template File Name when Creating a New File} + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following Template Files chapter. + + +\section{Image Tile-Compression Specification} + +When specifying the name of the output FITS file to be created, the +user can indicate that images should be written in tile-compressed +format (see section 5.5, ``Primary Array or IMAGE Extension I/O +Routines'') by enclosing the compression parameters in square brackets +following the root disk file name. Here are some examples of the +syntax for specifying tile-compressed output images: + +\begin{verbatim} + myfile.fit[compress] - use Rice algorithm and default tile size + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + + myfile.fit[compress Rice 100,100] - use 100 x 100 pixel tile size + myfile.fit[compress Rice 100,100;2] - as above, and use noisebits = 2 +\end{verbatim} + + +\section{HDU Location Specification} + +The optional HDU location specifier defines which HDU (Header-Data +Unit, also known as an `extension') within the FITS file to initially +open. It must immediately follow the base file name (or the output +file name if present). If it is not specified then the first HDU (the +primary array) is opened. The HDU location specifier is required if +the colFilter, rowFilter, or binSpec specifiers are present, because +the primary array is not a valid HDU for these operations. The HDU may +be specified either by absolute position number, starting with 0 for +the primary array, or by reference to the HDU name, and optionally, the +version number and the HDU type of the desired extension. The location +of an image within a single cell of a binary table may also be +specified, as described below. + +The absolute position of the extension is specified either by enclosed +the number in square brackets (e.g., `[1]' = the first extension +following the primary array) or by preceded the number with a plus sign +(`+1'). To specify the HDU by name, give the name of the desired HDU +(the value of the EXTNAME or HDUNAME keyword) and optionally the +extension version number (value of the EXTVER keyword) and the +extension type (value of the XTENSION keyword: IMAGE, ASCII or TABLE, +or BINTABLE), separated by commas and all enclosed in square brackets. +If the value of EXTVER and XTENSION are not specified, then the first +extension with the correct value of EXTNAME is opened. The extension +name and type are not case sensitive, and the extension type may be +abbreviated to a single letter (e.g., I = IMAGE extension or primary +array, A or T = ASCII table extension, and B = binary table BINTABLE +extension). If the HDU location specifier is equal to `[PRIMARY]' or +`[P]', then the primary array (the first HDU) will be opened. + +FITS images are most commonly stored in the primary array or an image +extension, but images can also be stored as a vector in a single cell +of a binary table (i.e. each row of the vector column contains a +different image). Such an image can be opened with CFITSIO by +specifying the desired column name and the row number after the binary +table HDU specifier as shown in the following examples. The column name +is separated from the HDU specifier by a semicolon and the row number +is enclosed in parentheses. In this case CFITSIO copies the image from +the table cell into a temporary primary array before it is opened. The +application program then just sees the image in the primary array, +without any extensions. The particular row to be opened may be +specified either by giving an absolute integer row number (starting +with 1 for the first row), or by specifying a boolean expression that +evaluates to TRUE for the desired row. The first row that satisfies +the expression will be used. The row selection expression has the same +syntax as described in the Row Filter Specifier section, below. + + Examples: + +\begin{verbatim} + myfile.fits[3] - open the 3rd HDU following the primary array + myfile.fits+3 - same as above, but using the FTOOLS-style notation + myfile.fits[EVENTS] - open the extension that has EXTNAME = 'EVENTS' + myfile.fits[EVENTS, 2] - same as above, but also requires EXTVER = 2 + myfile.fits[events,2,b] - same, but also requires XTENSION = 'BINTABLE' + myfile.fits[3; images(17)] - opens the image in row 17 of the 'images' + column in the 3rd extension of the file. + myfile.fits[3; images(exposure > 100)] - as above, but opens the image + in the first row that has an 'exposure' column value + greater than 100. +\end{verbatim} + + +\section{Image Section} + +A virtual file containing a rectangular subsection of an image can be +extracted and opened by specifying the range of pixels (start:end) +along each axis to be extracted from the original image. One can also +specify an optional pixel increment (start:end:step) for each axis of +the input image. A pixel step = 1 will be assumed if it is not +specified. If the start pixel is larger then the end pixel, then the +image will be flipped (producing a mirror image) along that dimension. +An asterisk, '*', may be used to specify the entire range of an axis, +and '-*' will flip the entire axis. The input image can be in the +primary array, in an image extension, or contained in a vector cell of +a binary table. In the later 2 cases the extension name or number must +be specified before the image section specifier. + + Examples: + +\begin{verbatim} + myfile.fits[1:512:2, 2:512:2] - open a 256x256 pixel image + consisting of the odd numbered columns (1st axis) and + the even numbered rows (2nd axis) of the image in the + primary array of the file. + + myfile.fits[*, 512:256] - open an image consisting of all the columns + in the input image, but only rows 256 through 512. + The image will be flipped along the 2nd axis since + the starting pixel is greater than the ending pixel. + + myfile.fits[*:2, 512:256:2] - same as above but keeping only + every other row and column in the input image. + + myfile.fits[-*, *] - copy the entire image, flipping it along + the first axis. + + myfile.fits[3][1:256,1:256] - opens a subsection of the image that + is in the 3rd extension of the file. + + myfile.fits[4; images(12)][1:10,1:10] - open an image consisting + of the first 10 pixels in both dimensions. The original + image resides in the 12th row of the 'images' vector + column in the table in the 4th extension of the file. +\end{verbatim} + +When CFITSIO opens an image section it first creates a temporary file +containing the image section plus a copy of any other HDUs in the +file. This temporary file is then opened by the application program, +so it is not possible to write to or modify the input file when +specifying an image section. Note that CFITSIO automatically updates +the world coordinate system keywords in the header of the image +section, if they exist, so that the coordinate associated with each +pixel in the image section will be computed correctly. + + +\section{Image Transform Filters} + +CFITSIO can apply a user-specified mathematical function to the value +of every pixel in a FITS image, thus creating a new virtual image +in computer memory that is then opened and read by the application +program. The original FITS image is not modified by this process. + +The image tranformation specifier is appended to the input +FITS file name and is enclosed in square brackets. It begins with the +letters 'PIX' to distinguish it from other types of FITS file filters +that are recognized by CFITSIO. The image transforming function may +use any of the mathmatical operators listed in the following +'Row Filtering Specification' section of this document. +Some examples of image transform filters are: + +\begin{verbatim} + [pix X * 2.0] - multiply each pixel by 2.0 + [pix sqrt(X)] - take the square root of each pixel + [pix X + #ZEROPT - add the value of the ZEROPT keyword + [pix X>0 ? log10(X) : -99.] - if the pixel value is greater + than 0, compute the base 10 log, + else set the pixel = -99. +\end{verbatim} +Use the letter 'X' in the expression to represent the current pixel value +in the image. The expression is evaluated +independently for each pixel in the image and may be a function of 1) the +original pixel value, 2) the value of other pixels in the image at +a given relative offset from the position of the pixel that is being +evaluated, and 3) the value of +any header keywords. Header keyword values are represented +by the name of the keyword preceded by the '\#' sign. + + +To access the the value of adjacent pixels in the image, +specify the (1-D) offset from the current pixel in curly brackets. +For example + +\begin{verbatim} + [pix (x{-1} + x + x{+1}) / 3] +\end{verbatim} +will replace each pixel value with the running mean of the values of that +pixel and it's 2 neighboring pixels. Note that in this notation the image +is treated as a 1-D array, where each row of the image (or higher dimensional +cube) is appended one after another in one long array of pixels. +It is possible to refer to pixels +in the rows above or below the current pixel by using the value of the +NAXIS1 header keyword. For example + +\begin{verbatim} + [pix (x{-#NAXIS1} + x + x{#NAXIS1}) / 3] +\end{verbatim} +will compute the mean of each image pixel and the pixels immediately +above and below it in the adjacent rows of the image. +The following more complex example +creates a smoothed virtual image where each pixel +is a 3 x 3 boxcar average of the input image pixels: + +\begin{verbatim} + [pix (X + X{-1} + X{+1} + + X{-#NAXIS1} + X{-#NAXIS1 - 1} + X{-#NAXIS1 + 1} + + X{#NAXIS1} + X{#NAXIS1 - 1} + X{#NAXIS1 + 1}) / 9.] +\end{verbatim} +If the pixel offset +extends beyond the first or last pixel in the image, the function will +evaluate to undefined, or NULL. + +For complex or commonly used image filtering operations, +one can write the expression into an external text file and +then import it into the +filter using the syntax '[pix @filename.txt]'. The mathematical +expression can +extend over multiple lines of text in the file. +Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +By default, the datatype of the resulting image will be the same as +the original image, but one may force a different datatype by appended +a code letter to the 'pix' keyword: + +\begin{verbatim} + pixb - 8-bit byte image with BITPIX = 8 + pixi - 16-bit integer image with BITPIX = 16 + pixj - 32-bit integer image with BITPIX = 32 + pixr - 32-bit float image with BITPIX = -32 + pixd - 64-bit float image with BITPIX = -64 +\end{verbatim} +Also by default, any other HDUs in the input file will be copied without +change to the +output virtual FITS file, but one may discard the other HDUs by adding +the number '1' to the 'pix' keyword (and following any optional datatype code +letter). For example: + +\begin{verbatim} + myfile.fits[3][pixr1 sqrt(X)] +\end{verbatim} +will create a virtual FITS file containing only a primary array image +with 32-bit floating point pixels that have a value equal to the square +root of the pixels in the image that is in the 3rd extension +of the 'myfile.fits' file. + + + +\section{Column and Keyword Filtering Specification} + +The optional column/keyword filtering specifier is used to modify the +column structure and/or the header keywords in the HDU that was +selected with the previous HDU location specifier. This filtering +specifier must be enclosed in square brackets and can be distinguished +from a general row filter specifier (described below) by the fact that +it begins with the string 'col ' and is not immediately followed by an +equals sign. The original file is not changed by this filtering +operation, and instead the modifications are made on a copy of the +input FITS file (usually in memory), which also contains a copy of all +the other HDUs in the file. This temporary file is passed to the +application program and will persist only until the file is closed or +until the program exits, unless the outfile specifier (see above) is +also supplied. + +The column/keyword filter can be used to perform the following +operations. More than one operation may be specified by separating +them with semi-colons. + +\begin{itemize} + +\item +Copy only a specified list of columns columns to the filtered input file. +The list of column name should be separated by semi-colons. Wild card +characters may be used in the column names to match multiple columns. +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table (i.e., there is no need to explicitly list the columns to +be included if any columns are being deleted). + +\item +Delete a column or keyword by listing the name preceded by a minus sign +or an exclamation mark (!), e.g., '-TIME' will delete the TIME column +if it exists, otherwise the TIME keyword. An error is returned if +neither a column nor keyword with this name exists. Note that the +exclamation point, '!', is a special UNIX character, so if it is used +on the command line rather than entered at a task prompt, it must be +preceded by a backslash to force the UNIX shell to ignore it. + +\item +Rename an existing column or keyword with the syntax 'NewName == +OldName'. An error is returned if neither a column nor keyword with +this name exists. + +\item +Append a new column or keyword to the table. To create a column, +give the new name, optionally followed by the data type in parentheses, +followed by a single equals sign and an expression to be used to +compute the value (e.g., 'newcol(1J) = 0' will create a new 32-bit +integer column called 'newcol' filled with zeros). The data type is +specified using the same syntax that is allowed for the value of the +FITS TFORMn keyword (e.g., 'I', 'J', 'E', 'D', etc. for binary tables, +and 'I8', F12.3', 'E20.12', etc. for ASCII tables). If the data type is +not specified then an appropriate data type will be chosen depending on +the form of the expression (may be a character string, logical, bit, long +integer, or double column). An appropriate vector count (in the case +of binary tables) will also be added if not explicitly specified. + +When creating a new keyword, the keyword name must be preceded by a +pound sign '\#', and the expression must evaluate to a scalar +(i.e., cannot have a column name in the expression). The comment +string for the keyword may be specified in parentheses immediately +following the keyword name (instead of supplying a data type as in +the case of creating a new column). If the keyword name ends with a +pound sign '\#', then cfitsio will substitute the number of the +most recently referenced column for the \# character . +This is especially useful when writing +a column-related keyword like TUNITn for a newly created column, +as shown in the following examples. + +\item +Recompute (overwrite) the values in an existing column or keyword by +giving the name followed by an equals sign and an arithmetic +expression. +\end{itemize} + +The expression that is used when appending or recomputing columns or +keywords can be arbitrarily complex and may be a function of other +header keyword values and other columns (in the same row). The full +syntax and available functions for the expression are described below +in the row filter specification section. + +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table. If no columns to be deleted are specified, then only the +columns that are explicitely listed will be included in the filtered +output table. To include all the columns, add the '*' wildcard +specifier at the end of the list, as shown in the examples. + +For complex or commonly used operations, one can place the +operations into an external text file and import it into the column +filter using the syntax '[col @filename.txt]'. The operations can +extend over multiple lines of the file, but multiple operations must +still be separated by semicolons. Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +Examples: + +\begin{verbatim} + [col Time;rate] - only the Time and rate columns will + appear in the filtered input file. + + [col Time;*raw] - include the Time column and any other + columns whose name ends with 'raw'. + + [col -TIME; Good == STATUS] - deletes the TIME column and + renames the status column to 'Good' + + [col PI=PHA * 1.1 + 0.2; #TUNIT#(column units) = 'counts';*] + - creates new PI column from PHA values + and also writes the TUNITn keyword + for the new column. The final '*' + expression means preserve all the + columns in the input table in the + virtual output table; without the '*' + the output table would only contain + the single 'PI' column. + + [col rate = rate/exposure; TUNIT#(&) = 'counts/s';*] + - recomputes the rate column by dividing + it by the EXPOSURE keyword value. This + also modifies the value of the TUNITn + keyword for this column. The use of the + '&' character for the keyword comment + string means preserve the existing + comment string for that keyword. The + final '*' preserves all the columns + in the input table in the virtual + output table. +\end{verbatim} + + +\section{Row Filtering Specification} + + When entering the name of a FITS table that is to be opened by a + program, an optional row filter may be specified to select a subset + of the rows in the table. A temporary new FITS file is created on + the fly which contains only those rows for which the row filter + expression evaluates to true. (The primary array and any other + extensions in the input file are also copied to the temporary + file). The original FITS file is closed and the new virtual file + is opened by the application program. The row filter expression is + enclosed in square brackets following the file name and extension + name (e.g., 'file.fits[events][GRADE==50]' selects only those rows + where the GRADE column value equals 50). When dealing with tables + where each row has an associated time and/or 2D spatial position, + the row filter expression can also be used to select rows based on + the times in a Good Time Intervals (GTI) extension, or on spatial + position as given in a SAO-style region file. + + +\subsection{General Syntax} + + The row filtering expression can be an arbitrarily complex series + of operations performed on constants, keyword values, and column + data taken from the specified FITS TABLE extension. The expression + must evaluate to a boolean value for each row of the table, where + a value of FALSE means that the row will be excluded. + + For complex or commonly used filters, one can place the expression + into a text file and import it into the row filter using the syntax + '[@filename.txt]'. The expression can be arbitrarily complex and + extend over multiple lines of the file. Any lines in the external + text file that begin with 2 slash characters ('//') will be ignored + and may be used to add comments into the file. + + Keyword and column data are referenced by name. Any string of + characters not surrounded by quotes (ie, a constant string) or + followed by an open parentheses (ie, a function name) will be + initially interpreted as a column name and its contents for the + current row inserted into the expression. If no such column exists, + a keyword of that name will be searched for and its value used, if + found. To force the name to be interpreted as a keyword (in case + there is both a column and keyword with the same name), precede the + keyword name with a single pound sign, '\#', as in '\#NAXIS2'. Due to + the generalities of FITS column and keyword names, if the column or + keyword name contains a space or a character which might appear as + an arithmetic term then inclose the name in '\$' characters as in + \$MAX PHA\$ or \#\$MAX-PHA\$. Names are case insensitive. + + To access a table entry in a row other than the current one, follow + the column's name with a row offset within curly braces. For + example, 'PHA\{-3\}' will evaluate to the value of column PHA, 3 rows + above the row currently being processed. One cannot specify an + absolute row number, only a relative offset. Rows that fall outside + the table will be treated as undefined, or NULLs. + + Boolean operators can be used in the expression in either their + Fortran or C forms. The following boolean operators are available: + +\begin{verbatim} + "equal" .eq. .EQ. == "not equal" .ne. .NE. != + "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< + "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => + "or" .or. .OR. || "and" .and. .AND. && + "negation" .not. .NOT. ! "approx. equal(1e-7)" ~ +\end{verbatim} + +Note that the exclamation +point, '!', is a special UNIX character, so if it is used on the +command line rather than entered at a task prompt, it must be preceded +by a backslash to force the UNIX shell to ignore it. + + The expression may also include arithmetic operators and functions. + Trigonometric functions use radians, not degrees. The following + arithmetic operators and functions can be used in the expression + (function names are case insensitive). A null value will be returned + in case of illegal operations such as divide by zero, sqrt(negative) + log(negative), log10(negative), arccos(.gt. 1), arcsin(.gt. 1). + + +\begin{verbatim} + "addition" + "subtraction" - + "multiplication" * "division" / + "negation" - "exponentiation" ** ^ + "absolute value" abs(x) "cosine" cos(x) + "sine" sin(x) "tangent" tan(x) + "arc cosine" arccos(x) "arc sine" arcsin(x) + "arc tangent" arctan(x) "arc tangent" arctan2(y,x) + "hyperbolic cos" cosh(x) "hyperbolic sin" sinh(x) + "hyperbolic tan" tanh(x) "round to nearest int" round(x) + "round down to int" floor(x) "round up to int" ceil(x) + "exponential" exp(x) "square root" sqrt(x) + "natural log" log(x) "common log" log10(x) + "modulus" x % y "random # [0.0,1.0)" random() + "random Gausian" randomn() "random Poisson" randomp(x) + "minimum" min(x,y) "maximum" max(x,y) + "cumulative sum" accum(x) "sequential difference" seqdiff(x) + "if-then-else" b?x:y + "angular separation" angsep(ra1,dec1,ra2,de2) (all in degrees) +\end{verbatim} +Three different random number functions are provided: random(), with +no arguments, produces a uniform random deviate between 0 and 1; +randomn(), also with no arguments, produces a normal (Gaussian) random +deviate with zero mean and unit standard deviation; randomp(x) +produces a Poisson random deviate whose expected number of counts is +X. X may be any positive real number of expected counts, including +fractional values, but the return value is an integer. + +When the random functions are used in a vector expresion, by default +the same random value will be used when evalutating each element of the vector. +If different random numbers are desired, then the name of a vector +column should be supplied as the single argument to the random +function (e.g., "flux + 0.1 * random(flux)", where "flux' is the +name of a vector column). This will create a vector of +random numbers that will be used in sequence when evaluating each +element of the vector expression. + + An alternate syntax for the min and max functions has only a single + argument which should be a vector value (see below). The result + will be the minimum/maximum element contained within the vector. + + The accum(x) function forms the cumulative sum of x, element by element. + Vector columns are supported simply by performing the summation process + through all the values. Null values are treated as 0. The seqdiff(x) + function forms the sequential difference of x, element by element. + The first value of seqdiff is the first value of x. A single null + value in x causes a pair of nulls in the output. The seqdiff and + accum functions are functional inverses, i.e., seqdiff(accum(x)) == x + as long as no null values are present. + + The angsep function computes the angular separation in degrees + between 2 celestial positions, where the first 2 parameters + give the RA-like and Dec-like coordinates (in decimal degrees) + of the first position, and the 3rd and 4th parameters give the + coordinates of the second position. + + The following type casting operators are available, where the + inclosing parentheses are required and taken from the C language + usage. Also, the integer to real casts values to double precision: + +\begin{verbatim} + "real to integer" (int) x (INT) x + "integer to real" (float) i (FLOAT) i +\end{verbatim} + + In addition, several constants are built in for use in numerical + expressions: + + +\begin{verbatim} + #pi 3.1415... #e 2.7182... + #deg #pi/180 #row current row number + #null undefined value #snull undefined string +\end{verbatim} + + A string constant must be enclosed in quotes as in 'Crab'. The + "null" constants are useful for conditionally setting table values + to a NULL, or undefined, value (eg., "col1==-99 ? \#NULL : col1"). + + There is also a function for testing if two values are close to + each other, i.e., if they are "near" each other to within a user + specified tolerance. The arguments, value\_1 and value\_2 can be + integer or real and represent the two values who's proximity is + being tested to be within the specified tolerance, also an integer + or real: + +\begin{verbatim} + near(value_1, value_2, tolerance) +\end{verbatim} + When a NULL, or undefined, value is encountered in the FITS table, + the expression will evaluate to NULL unless the undefined value is + not actually required for evaluation, e.g. "TRUE .or. NULL" + evaluates to TRUE. The following two functions allow some NULL + detection and handling: + +\begin{verbatim} + "a null value?" ISNULL(x) + "define a value for null" DEFNULL(x,y) +\end{verbatim} + The former + returns a boolean value of TRUE if the argument x is NULL. The + later "defines" a value to be substituted for NULL values; it + returns the value of x if x is not NULL, otherwise it returns the + value of y. + + + + +\subsection{Bit Masks} + + Bit masks can be used to select out rows from bit columns (TFORMn = + \#X) in FITS files. To represent the mask, binary, octal, and hex + formats are allowed: + + +\begin{verbatim} + binary: b0110xx1010000101xxxx0001 + octal: o720x1 -> (b111010000xxx001) + hex: h0FxD -> (b00001111xxxx1101) +\end{verbatim} + + In all the representations, an x or X is allowed in the mask as a + wild card. Note that the x represents a different number of wild + card bits in each representation. All representations are case + insensitive. + + To construct the boolean expression using the mask as the boolean + equal operator described above on a bit table column. For example, + if you had a 7 bit column named flags in a FITS table and wanted + all rows having the bit pattern 0010011, the selection expression + would be: + + +\begin{verbatim} + flags == b0010011 + or + flags .eq. b10011 +\end{verbatim} + + It is also possible to test if a range of bits is less than, less + than equal, greater than and greater than equal to a particular + boolean value: + + +\begin{verbatim} + flags <= bxxx010xx + flags .gt. bxxx100xx + flags .le. b1xxxxxxx +\end{verbatim} + + Notice the use of the x bit value to limit the range of bits being + compared. + + It is not necessary to specify the leading (most significant) zero + (0) bits in the mask, as shown in the second expression above. + + Bit wise AND, OR and NOT operations are also possible on two or + more bit fields using the '\&'(AND), '$|$'(OR), and the '!'(NOT) + operators. All of these operators result in a bit field which can + then be used with the equal operator. For example: + + +\begin{verbatim} + (!flags) == b1101100 + (flags & b1000001) == bx000001 +\end{verbatim} + + Bit fields can be appended as well using the '+' operator. Strings + can be concatenated this way, too. + + +\subsection{Vector Columns} + + Vector columns can also be used in building the expression. No + special syntax is required if one wants to operate on all elements + of the vector. Simply use the column name as for a scalar column. + Vector columns can be freely intermixed with scalar columns or + constants in virtually all expressions. The result will be of the + same dimension as the vector. Two vectors in an expression, though, + need to have the same number of elements and have the same + dimensions. + + Arithmetic and logical operations are all performed on an element by + element basis. Comparing two vector columns, eg "COL1 == COL2", + thus results in another vector of boolean values indicating which + elements of the two vectors are equal. + + Eight functions are available that operate on a vector and return a + scalar result: + +\begin{verbatim} + "minimum" MIN(V) "maximum" MAX(V) + "average" AVERAGE(V) "median" MEDIAN(V) + "sumation" SUM(V) "standard deviation" STDDEV(V) + "# of values" NELEM(V) "# of non-null values" NVALID(V) +\end{verbatim} + where V represents the name of a vector column or a manually + constructed vector using curly brackets as described below. The + first 6 of these functions ignore any null values in the vector when + computing the result. + + The SUM function literally sums all the elements in x, returning a + scalar value. If V is a boolean vector, SUM returns the number + of TRUE elements. The NELEM function returns the number of elements + in vector V whereas NVALID return the number of non-null elements in + the vector. (NELEM also operates on bit and string columns, + returning their column widths.) As an example, to test whether all + elements of two vectors satisfy a given logical comparison, one can + use the expression + +\begin{verbatim} + SUM( COL1 > COL2 ) == NELEM( COL1 ) +\end{verbatim} + + which will return TRUE if all elements of COL1 are greater than + their corresponding elements in COL2. + + To specify a single element of a vector, give the column name + followed by a comma-separated list of coordinates enclosed in + square brackets. For example, if a vector column named PHAS exists + in the table as a one dimensional, 256 component list of numbers + from which you wanted to select the 57th component for use in the + expression, then PHAS[57] would do the trick. Higher dimensional + arrays of data may appear in a column. But in order to interpret + them, the TDIMn keyword must appear in the header. Assuming that a + (4,4,4,4) array is packed into each row of a column named ARRAY4D, + the (1,2,3,4) component element of each row is accessed by + ARRAY4D[1,2,3,4]. Arrays up to dimension 5 are currently + supported. Each vector index can itself be an expression, although + it must evaluate to an integer value within the bounds of the + vector. Vector columns which contain spaces or arithmetic operators + must have their names enclosed in "\$" characters as with + \$ARRAY-4D\$[1,2,3,4]. + + A more C-like syntax for specifying vector indices is also + available. The element used in the preceding example alternatively + could be specified with the syntax ARRAY4D[4][3][2][1]. Note the + reverse order of indices (as in C), as well as the fact that the + values are still ones-based (as in Fortran -- adopted to avoid + ambiguity for 1D vectors). With this syntax, one does not need to + specify all of the indices. To extract a 3D slice of this 4D + array, use ARRAY4D[4]. + + Variable-length vector columns are not supported. + + Vectors can be manually constructed within the expression using a + comma-separated list of elements surrounded by curly braces ('\{\}'). + For example, '\{1,3,6,1\}' is a 4-element vector containing the values + 1, 3, 6, and 1. The vector can contain only boolean, integer, and + real values (or expressions). The elements will be promoted to the + highest data type present. Any elements which are themselves + vectors, will be expanded out with each of its elements becoming an + element in the constructed vector. + + +\subsection{Good Time Interval Filtering} + + A common filtering method involves selecting rows which have a time + value which lies within what is called a Good Time Interval or GTI. + The time intervals are defined in a separate FITS table extension + which contains 2 columns giving the start and stop time of each + good interval. The filtering operation accepts only those rows of + the input table which have an associated time which falls within + one of the time intervals defined in the GTI extension. A high + level function, gtifilter(a,b,c,d), is available which evaluates + each row of the input table and returns TRUE or FALSE depending + whether the row is inside or outside the good time interval. The + syntax is + +\begin{verbatim} + gtifilter( [ "gtifile" [, expr [, "STARTCOL", "STOPCOL" ] ] ] ) + or + gtifilter( [ 'gtifile' [, expr [, 'STARTCOL', 'STOPCOL' ] ] ] ) +\end{verbatim} + where each "[]" demarks optional parameters. Note that the quotes + around the gtifile and START/STOP column are required. Either single + or double quotes may be used. In cases where this expression is + entered on the Unix command line, enclose the entire expression in + double quotes, and then use single quotes within the expression to + enclose the 'gtifile' and other terms. It is also usually possible + to do the reverse, and enclose the whole expression in single quotes + and then use double quotes within the expression. The gtifile, + if specified, can be blank ("") which will mean to use the first + extension with the name "*GTI*" in the current file, a plain + extension specifier (eg, "+2", "[2]", or "[STDGTI]") which will be + used to select an extension in the current file, or a regular + filename with or without an extension specifier which in the latter + case will mean to use the first extension with an extension name + "*GTI*". Expr can be any arithmetic expression, including simply + the time column name. A vector time expression will produce a + vector boolean result. STARTCOL and STOPCOL are the names of the + START/STOP columns in the GTI extension. If one of them is + specified, they both must be. + + In its simplest form, no parameters need to be provided -- default + values will be used. The expression "gtifilter()" is equivalent to + +\begin{verbatim} + gtifilter( "", TIME, "*START*", "*STOP*" ) +\end{verbatim} + This will search the current file for a GTI extension, filter the + TIME column in the current table, using START/STOP times taken from + columns in the GTI extension with names containing the strings + "START" and "STOP". The wildcards ('*') allow slight variations in + naming conventions such as "TSTART" or "STARTTIME". The same + default values apply for unspecified parameters when the first one + or two parameters are specified. The function automatically + searches for TIMEZERO/I/F keywords in the current and GTI + extensions, applying a relative time offset, if necessary. + + +\subsection{Spatial Region Filtering} + + Another common filtering method selects rows based on whether the + spatial position associated with each row is located within a given + 2-dimensional region. The syntax for this high-level filter is + +\begin{verbatim} + regfilter( "regfilename" [ , Xexpr, Yexpr [ , "wcs cols" ] ] ) +\end{verbatim} + where each "[]" demarks optional parameters. The region file name + is required and must be enclosed in quotes. The remaining + parameters are optional. The region file is an ASCII text file + which contains a list of one or more geometric shapes (circle, + ellipse, box, etc.) which defines a region on the celestial sphere + or an area within a particular 2D image. The region file is + typically generated using an image display program such as fv/POW + (distribute by the HEASARC), or ds9 (distributed by the Smithsonian + Astrophysical Observatory). Users should refer to the documentation + provided with these programs for more details on the syntax used in + the region files. + + In its simpliest form, (e.g., regfilter("region.reg") ) the + coordinates in the default 'X' and 'Y' columns will be used to + determine if each row is inside or outside the area specified in + the region file. Alternate position column names, or expressions, + may be entered if needed, as in + +\begin{verbatim} + regfilter("region.reg", XPOS, YPOS) +\end{verbatim} + Region filtering can be applied most unambiguously if the positions + in the region file and in the table to be filtered are both give in + terms of absolute celestial coordinate units. In this case the + locations and sizes of the geometric shapes in the region file are + specified in angular units on the sky (e.g., positions given in + R.A. and Dec. and sizes in arcseconds or arcminutes). Similarly, + each row of the filtered table will have a celestial coordinate + associated with it. This association is usually implemented using + a set of so-called 'World Coordinate System' (or WCS) FITS keywords + that define the coordinate transformation that must be applied to + the values in the 'X' and 'Y' columns to calculate the coordinate. + + Alternatively, one can perform spatial filtering using unitless + 'pixel' coordinates for the regions and row positions. In this + case the user must be careful to ensure that the positions in the 2 + files are self-consistent. A typical problem is that the region + file may be generated using a binned image, but the unbinned + coordinates are given in the event table. The ROSAT events files, + for example, have X and Y pixel coordinates that range from 1 - + 15360. These coordinates are typically binned by a factor of 32 to + produce a 480x480 pixel image. If one then uses a region file + generated from this image (in image pixel units) to filter the + ROSAT events file, then the X and Y column values must be converted + to corresponding pixel units as in: + +\begin{verbatim} + regfilter("rosat.reg", X/32.+.5, Y/32.+.5) +\end{verbatim} + Note that this binning conversion is not necessary if the region + file is specified using celestial coordinate units instead of pixel + units because CFITSIO is then able to directly compare the + celestial coordinate of each row in the table with the celestial + coordinates in the region file without having to know anything + about how the image may have been binned. + + The last "wcs cols" parameter should rarely be needed. If supplied, + this string contains the names of the 2 columns (space or comma + separated) which have the associated WCS keywords. If not supplied, + the filter will scan the X and Y expressions for column names. + If only one is found in each expression, those columns will be + used, otherwise an error will be returned. + + These region shapes are supported (names are case insensitive): + +\begin{verbatim} + Point ( X1, Y1 ) <- One pixel square region + Line ( X1, Y1, X2, Y2 ) <- One pixel wide region + Polygon ( X1, Y1, X2, Y2, ... ) <- Rest are interiors with + Rectangle ( X1, Y1, X2, Y2, A ) | boundaries considered + Box ( Xc, Yc, Wdth, Hght, A ) V within the region + Diamond ( Xc, Yc, Wdth, Hght, A ) + Circle ( Xc, Yc, R ) + Annulus ( Xc, Yc, Rin, Rout ) + Ellipse ( Xc, Yc, Rx, Ry, A ) + Elliptannulus ( Xc, Yc, Rinx, Riny, Routx, Routy, Ain, Aout ) + Sector ( Xc, Yc, Amin, Amax ) +\end{verbatim} + where (Xc,Yc) is the coordinate of the shape's center; (X\#,Y\#) are + the coordinates of the shape's edges; Rxxx are the shapes' various + Radii or semimajor/minor axes; and Axxx are the angles of rotation + (or bounding angles for Sector) in degrees. For rotated shapes, the + rotation angle can be left off, indicating no rotation. Common + alternate names for the regions can also be used: rotbox = box; + rotrectangle = rectangle; (rot)rhombus = (rot)diamond; and pie + = sector. When a shape's name is preceded by a minus sign, '-', + the defined region is instead the area *outside* its boundary (ie, + the region is inverted). All the shapes within a single region + file are OR'd together to create the region, and the order is + significant. The overall way of looking at region files is that if + the first region is an excluded region then a dummy included region + of the whole detector is inserted in the front. Then each region + specification as it is processed overrides any selections inside of + that region specified by previous regions. Another way of thinking + about this is that if a previous excluded region is completely + inside of a subsequent included region the excluded region is + ignored. + + The positional coordinates may be given either in pixel units, + decimal degrees or hh:mm:ss.s, dd:mm:ss.s units. The shape sizes + may be given in pixels, degrees, arcminutes, or arcseconds. Look + at examples of region file produced by fv/POW or ds9 for further + details of the region file format. + + There are three low-level functions that are primarily for use with + regfilter function, but they can be called directly. They + return a boolean true or false depending on whether a two + dimensional point is in the region or not. The positional coordinates + must be given in pixel units: + +\begin{verbatim} + "point in a circular region" + circle(xcntr,ycntr,radius,Xcolumn,Ycolumn) + + "point in an elliptical region" + ellipse(xcntr,ycntr,xhlf_wdth,yhlf_wdth,rotation,Xcolumn,Ycolumn) + + "point in a rectangular region" + box(xcntr,ycntr,xfll_wdth,yfll_wdth,rotation,Xcolumn,Ycolumn) + + where + (xcntr,ycntr) are the (x,y) position of the center of the region + (xhlf_wdth,yhlf_wdth) are the (x,y) half widths of the region + (xfll_wdth,yfll_wdth) are the (x,y) full widths of the region + (radius) is half the diameter of the circle + (rotation) is the angle(degrees) that the region is rotated with + respect to (xcntr,ycntr) + (Xcoord,Ycoord) are the (x,y) coordinates to test, usually column + names + NOTE: each parameter can itself be an expression, not merely a + column name or constant. +\end{verbatim} + + +\subsection{Example Row Filters} + +\begin{verbatim} + [ binary && mag <= 5.0] - Extract all binary stars brighter + than fifth magnitude (note that + the initial space is necessary to + prevent it from being treated as a + binning specification) + + [#row >= 125 && #row <= 175] - Extract row numbers 125 through 175 + + [IMAGE[4,5] .gt. 100] - Extract all rows that have the + (4,5) component of the IMAGE column + greater than 100 + + [abs(sin(theta * #deg)) < 0.5] - Extract all rows having the + absolute value of the sine of theta + less than a half where the angles + are tabulated in degrees + + [SUM( SPEC > 3*BACKGRND )>=1] - Extract all rows containing a + spectrum, held in vector column + SPEC, with at least one value 3 + times greater than the background + level held in a keyword, BACKGRND + + [VCOL=={1,4,2}] - Extract all rows whose vector column + VCOL contains the 3-elements 1, 4, and + 2. + + [@rowFilter.txt] - Extract rows using the expression + contained within the text file + rowFilter.txt + + [gtifilter()] - Search the current file for a GTI + extension, filter the TIME + column in the current table, using + START/STOP times taken from + columns in the GTI extension + + [regfilter("pow.reg")] - Extract rows which have a coordinate + (as given in the X and Y columns) + within the spatial region specified + in the pow.reg region file. + + [regfilter("pow.reg", Xs, Ys)] - Same as above, except that the + Xs and Ys columns will be used to + determine the coordinate of each + row in the table. +\end{verbatim} + + +\section{ Binning or Histogramming Specification} + +The optional binning specifier is enclosed in square brackets and can +be distinguished from a general row filter specification by the fact +that it begins with the keyword 'bin' not immediately followed by an +equals sign. When binning is specified, a temporary N-dimensional FITS +primary array is created by computing the histogram of the values in +the specified columns of a FITS table extension. After the histogram +is computed the input FITS file containing the table is then closed and +the temporary FITS primary array is opened and passed to the +application program. Thus, the application program never sees the +original FITS table and only sees the image in the new temporary file +(which has no additional extensions). Obviously, the application +program must be expecting to open a FITS image and not a FITS table in +this case. + +The data type of the FITS histogram image may be specified by appending +'b' (for 8-bit byte), 'i' (for 16-bit integers), 'j' (for 32-bit +integer), 'r' (for 32-bit floating points), or 'd' (for 64-bit double +precision floating point) to the 'bin' keyword (e.g. '[binr X]' +creates a real floating point image). If the data type is not +explicitly specified then a 32-bit integer image will be created by +default, unless the weighting option is also specified in which case +the image will have a 32-bit floating point data type by default. + +The histogram image may have from 1 to 4 dimensions (axes), depending +on the number of columns that are specified. The general form of the +binning specification is: + +\begin{verbatim} + [bin{bijrd} Xcol=min:max:binsize, Ycol= ..., Zcol=..., Tcol=...; weight] +\end{verbatim} +in which up to 4 columns, each corresponding to an axis of the image, +are listed. The column names are case insensitive, and the column +number may be given instead of the name, preceded by a pound sign +(e.g., [bin \#4=1:512]). If the column name is not specified, then +CFITSIO will first try to use the 'preferred column' as specified by +the CPREF keyword if it exists (e.g., 'CPREF = 'DETX,DETY'), otherwise +column names 'X', 'Y', 'Z', and 'T' will be assumed for each of the 4 +axes, respectively. In cases where the column name could be confused +with an arithmetic expression, enclose the column name in parentheses to +force the name to be interpreted literally. + +Each column name may be followed by an equals sign and then the lower +and upper range of the histogram, and the size of the histogram bins, +separated by colons. Spaces are allowed before and after the equals +sign but not within the 'min:max:binsize' string. The min, max and +binsize values may be integer or floating point numbers, or they may be +the names of keywords in the header of the table. If the latter, then +the value of that keyword is substituted into the expression. + +Default values for the min, max and binsize quantities will be +used if not explicitly given in the binning expression as shown +in these examples: + +\begin{verbatim} + [bin x = :512:2] - use default minimum value + [bin x = 1::2] - use default maximum value + [bin x = 1:512] - use default bin size + [bin x = 1:] - use default maximum value and bin size + [bin x = :512] - use default minimum value and bin size + [bin x = 2] - use default minimum and maximum values + [bin x] - use default minimum, maximum and bin size + [bin 4] - default 2-D image, bin size = 4 in both axes + [bin] - default 2-D image +\end{verbatim} +CFITSIO will use the value of the TLMINn, TLMAXn, and TDBINn keywords, +if they exist, for the default min, max, and binsize, respectively. If +they do not exist then CFITSIO will use the actual minimum and maximum +values in the column for the histogram min and max values. The default +binsize will be set to 1, or (max - min) / 10., whichever is smaller, +so that the histogram will have at least 10 bins along each axis. + +A shortcut notation is allowed if all the columns/axes have the same +binning specification. In this case all the column names may be listed +within parentheses, followed by the (single) binning specification, as +in: + +\begin{verbatim} + [bin (X,Y)=1:512:2] + [bin (X,Y) = 5] +\end{verbatim} + +The optional weighting factor is the last item in the binning specifier +and, if present, is separated from the list of columns by a +semi-colon. As the histogram is accumulated, this weight is used to +incremented the value of the appropriated bin in the histogram. If the +weighting factor is not specified, then the default weight = 1 is +assumed. The weighting factor may be a constant integer or floating +point number, or the name of a keyword containing the weighting value. +Or the weighting factor may be the name of a table column in which case +the value in that column, on a row by row basis, will be used. + +In some cases, the column or keyword may give the reciprocal of the +actual weight value that is needed. In this case, precede the weight +keyword or column name by a slash '/' to tell CFITSIO to use the +reciprocal of the value when constructing the histogram. + +For complex or commonly used histograms, one can also place its +description into a text file and import it into the binning +specification using the syntax [bin @filename.txt]. The file's +contents can extend over multiple lines, although it must still +conform to the no-spaces rule for the min:max:binsize syntax and each +axis specification must still be comma-separated. Any lines in the +external text file that begin with 2 slash characters ('//') will be +ignored and may be used to add comments into the file. + + Examples: + + +\begin{verbatim} + [bini detx, dety] - 2-D, 16-bit integer histogram + of DETX and DETY columns, using + default values for the histogram + range and binsize + + [bin (detx, dety)=16; /exposure] - 2-D, 32-bit real histogram of DETX + and DETY columns with a bin size = 16 + in both axes. The histogram values + are divided by the EXPOSURE keyword + value. + + [bin time=TSTART:TSTOP:0.1] - 1-D lightcurve, range determined by + the TSTART and TSTOP keywords, + with 0.1 unit size bins. + + [bin pha, time=8000.:8100.:0.1] - 2-D image using default binning + of the PHA column for the X axis, + and 1000 bins in the range + 8000. to 8100. for the Y axis. + + [bin @binFilter.txt] - Use the contents of the text file + binFilter.txt for the binning + specifications. + +\end{verbatim} +\chapter{Template Files } + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following sections. + + +\section{Detailed Template Line Format} + +The format of each ASCII template line closely follows the format of a +FITS keyword record: + +\begin{verbatim} + KEYWORD = KEYVALUE / COMMENT +\end{verbatim} +except that free format may be used (e.g., the equals sign may appear +at any position in the line) and TAB characters are allowed and are +treated the same as space characters. The KEYVALUE and COMMENT fields +are optional. The equals sign character is also optional, but it is +recommended that it be included for clarity. Any template line that +begins with the pound '\#' character is ignored by the template parser +and may be use to insert comments into the template file itself. + +The KEYWORD name field is limited to 8 characters in length and only +the letters A-Z, digits 0-9, and the hyphen and underscore characters +may be used, without any embedded spaces. Lowercase letters in the +template keyword name will be converted to uppercase. Leading spaces +in the template line preceding the keyword name are generally ignored, +except if the first 8 characters of a template line are all blank, then +the entire line is treated as a FITS comment keyword (with a blank +keyword name) and is copied verbatim into the FITS header. + +The KEYVALUE field may have any allowed FITS data type: character +string, logical, integer, real, complex integer, or complex real. The +character string values need not be enclosed in single quote characters +unless they are necessary to distinguish the string from a different +data type (e.g. 2.0 is a real but '2.0' is a string). The keyword has +an undefined (null) value if the template record only contains blanks +following the "=" or between the "=" and the "/" comment field +delimiter. + +String keyword values longer than 68 characters (the maximum length +that will fit in a single FITS keyword record) are permitted using the +CFITSIO long string convention. They can either be specified as a +single long line in the template, or by using multiple lines where the +continuing lines contain the 'CONTINUE' keyword, as in this example: + +\begin{verbatim} + LONGKEY = 'This is a long string value that is contin&' + CONTINUE 'ued over 2 records' / comment field goes here +\end{verbatim} +The format of template lines with CONTINUE keyword is very strict: 3 +spaces must follow CONTINUE and the rest of the line is copied verbatim +to the FITS file. + +The start of the optional COMMENT field must be preceded by "/", which +is used to separate it from the keyword value field. Exceptions are if +the KEYWORD name field contains COMMENT, HISTORY, CONTINUE, or if the +first 8 characters of the template line are blanks. + +More than one Header-Data Unit (HDU) may be defined in the template +file. The start of an HDU definition is denoted with a SIMPLE or +XTENSION template line: + +1) SIMPLE begins a Primary HDU definition. SIMPLE may only appear as +the first keyword in the template file. If the template file begins +with XTENSION instead of SIMPLE, then a default empty Primary HDU is +created, and the template is then assumed to define the keywords +starting with the first extension following the Primary HDU. + +2) XTENSION marks the beginning of a new extension HDU definition. The +previous HDU will be closed at this point and processing of the next +extension begins. + + +\section{Auto-indexing of Keywords} + +If a template keyword name ends with a "\#" character, it is said to be +'auto-indexed'. Each "\#" character will be replaced by the current +integer index value, which gets reset = 1 at the start of each new HDU +in the file (or 7 in the special case of a GROUP definition). The +FIRST indexed keyword in each template HDU definition is used as the +'incrementor'; each subsequent occurrence of this SAME keyword will +cause the index value to be incremented. This behavior can be rather +subtle, as illustrated in the following examples in which the TTYPE +keyword is the incrementor in both cases: + +\begin{verbatim} + TTYPE# = TIME + TFORM# = 1D + TTYPE# = RATE + TFORM# = 1E +\end{verbatim} +will create TTYPE1, TFORM1, TTYPE2, and TFORM2 keywords. But if the +template looks like, + +\begin{verbatim} + TTYPE# = TIME + TTYPE# = RATE + TFORM# = 1D + TFORM# = 1E +\end{verbatim} +this results in a FITS files with TTYPE1, TTYPE2, TFORM2, and TFORM2, +which is probably not what was intended! + + +\section{Template Parser Directives} + +In addition to the template lines which define individual keywords, the +template parser recognizes 3 special directives which are each preceded +by the backslash character: \verb+ \include, \group+, and \verb+ \end+. + +The 'include' directive must be followed by a filename. It forces the +parser to temporarily stop reading the current template file and begin +reading the include file. Once the parser reaches the end of the +include file it continues parsing the current template file. Include +files can be nested, and HDU definitions can span multiple template +files. + +The start of a GROUP definition is denoted with the 'group' directive, +and the end of a GROUP definition is denoted with the 'end' directive. +Each GROUP contains 0 or more member blocks (HDUs or GROUPs). Member +blocks of type GROUP can contain their own member blocks. The GROUP +definition itself occupies one FITS file HDU of special type (GROUP +HDU), so if a template specifies 1 group with 1 member HDU like: + +\begin{verbatim} +\group +grpdescr = 'demo' +xtension bintable +# this bintable has 0 cols, 0 rows +\end +\end{verbatim} +then the parser creates a FITS file with 3 HDUs : + +\begin{verbatim} +1) dummy PHDU +2) GROUP HDU (has 1 member, which is bintable in HDU number 3) +3) bintable (member of GROUP in HDU number 2) +\end{verbatim} +Technically speaking, the GROUP HDU is a BINTABLE with 6 columns. Applications +can define additional columns in a GROUP HDU using TFORMn and TTYPEn +(where n is 7, 8, ....) keywords or their auto-indexing equivalents. + +For a more complicated example of a template file using the group directives, +look at the sample.tpl file that is included in the CFITSIO distribution. + + +\section{Formal Template Syntax} + +The template syntax can formally be defined as follows: + +\begin{verbatim} + TEMPLATE = BLOCK [ BLOCK ... ] + + BLOCK = { HDU | GROUP } + + GROUP = \GROUP [ BLOCK ... ] \END + + HDU = XTENSION [ LINE ... ] { XTENSION | \GROUP | \END | EOF } + + LINE = [ KEYWORD [ = ] ] [ VALUE ] [ / COMMENT ] + + X ... - X can be present 1 or more times + { X | Y } - X or Y + [ X ] - X is optional +\end{verbatim} + +At the topmost level, the template defines 1 or more template blocks. Blocks +can be either HDU (Header Data Unit) or a GROUP. For each block the parser +creates 1 (or more for GROUPs) FITS file HDUs. + + + +\section{Errors} + +In general the fits\_execute\_template() function tries to be as atomic +as possible, so either everything is done or nothing is done. If an +error occurs during parsing of the template, fits\_execute\_template() +will (try to) delete the top level BLOCK (with all its children if any) +in which the error occurred, then it will stop reading the template file +and it will return with an error. + + +\section{Examples} + +1. This template file will create a 200 x 300 pixel image, with 4-byte +integer pixel values, in the primary HDU: + +\begin{verbatim} + SIMPLE = T + BITPIX = 32 + NAXIS = 2 / number of dimensions + NAXIS1 = 100 / length of first axis + NAXIS2 = 200 / length of second axis + OBJECT = NGC 253 / name of observed object +\end{verbatim} +The allowed values of BITPIX are 8, 16, 32, -32, or -64, +representing, respectively, 8-bit integer, 16-bit integer, 32-bit +integer, 32-bit floating point, or 64 bit floating point pixels. + +2. To create a FITS table, the template first needs to include +XTENSION = TABLE or BINTABLE to define whether it is an ASCII or binary +table, and NAXIS2 to define the number of rows in the table. Two +template lines are then needed to define the name (TTYPEn) and FITS data +format (TFORMn) of the columns, as in this example: + +\begin{verbatim} + xtension = bintable + naxis2 = 40 + ttype# = Name + tform# = 10a + ttype# = Npoints + tform# = j + ttype# = Rate + tunit# = counts/s + tform# = e +\end{verbatim} +The above example defines a null primary array followed by a 40-row +binary table extension with 3 columns called 'Name', 'Npoints', and +'Rate', with data formats of '10A' (ASCII character string), '1J' +(integer) and '1E' (floating point), respectively. Note that the other +required FITS keywords (BITPIX, NAXIS, NAXIS1, PCOUNT, GCOUNT, TFIELDS, +and END) do not need to be explicitly defined in the template because +their values can be inferred from the other keywords in the template. +This example also illustrates that the templates are generally +case-insensitive (the keyword names and TFORMn values are converted to +upper-case in the FITS file) and that string keyword values generally +do not need to be enclosed in quotes. + +\chapter{ Local FITS Conventions } + +CFITSIO supports several local FITS conventions which are not +defined in the official NOST FITS standard and which are not +necessarily recognized or supported by other FITS software packages. +Programmers should be cautious about using these features, especially +if the FITS files that are produced are expected to be processed by +other software systems which do not use the CFITSIO interface. + + +\section{64-Bit Long Integers} + +CFITSIO supports reading and writing FITS images or table columns containing +64-bit integer data values. Support for 64-bit integers was added to the +official FITS Standard in December 2005. + FITS 64-bit images have BITPIX = +64, and the 64-bit binary table columns have TFORMn = 'K'. CFITSIO also +supports the 'Q' variable-length array table column format which is +analogous to the 'P' column format except that the array descriptor +is stored as a pair of 64-bit integers. + +For the convenience of C programmers, the fitsio.h include file +defines (with a typedef statement) the 'LONGLONG' datatype to be +eqivalent to an appropriate 64-bit integer datatype on each platform. +Since there is currently no universal standard +for the name of the 64-bit integer datatype (it might be defined as +'long long', 'long', or '\_\_int64' depending on the platform) +C programmers may prefer to use the 'LONGLONG' datatype when +declaring or allocating 64-bit integer quantities when writing +code which needs to run on multiple platforms. +Note that CFITSIO will implicitly convert the datatype when reading +or writing FITS 64-bit integer images and columns with data arrays of +a different integer or floating point datatype, but there is an +increased risk of loss of numerical precision or +numerical overflow in this case. + + +\section{Long String Keyword Values.} + +The length of a standard FITS string keyword is limited to 68 +characters because it must fit entirely within a single FITS header +keyword record. In some instances it is necessary to encode strings +longer than this limit, so CFITSIO supports a local convention in which +the string value is continued over multiple keywords. This +continuation convention uses an ampersand character at the end of each +substring to indicate that it is continued on the next keyword, and the +continuation keywords all have the name CONTINUE without an equal sign +in column 9. The string value may be continued in this way over as many +additional CONTINUE keywords as is required. The following lines +illustrate this continuation convention which is used in the value of +the STRKEY keyword: + +\begin{verbatim} +LONGSTRN= 'OGIP 1.0' / The OGIP Long String Convention may be used. +STRKEY = 'This is a very long string keyword&' / Optional Comment +CONTINUE ' value that is continued over 3 keywords in the & ' +CONTINUE 'FITS header.' / This is another optional comment. +\end{verbatim} +It is recommended that the LONGSTRN keyword, as shown here, always be +included in any HDU that uses this longstring convention as a warning +to any software that must read the keywords. A routine called fits\_write\_key\_longwarn +has been provided in CFITSIO to write this keyword if it does not +already exist. + +This long string convention is supported by the following CFITSIO +routines: + +\begin{verbatim} + fits_write_key_longstr - write a long string keyword value + fits_insert_key_longstr - insert a long string keyword value + fits_modify_key_longstr - modify a long string keyword value + fits_update_key_longstr - modify a long string keyword value + fits_read_key_longstr - read a long string keyword value + fits_delete_key - delete a keyword +\end{verbatim} +The fits\_read\_key\_longstr routine is unique among all the CFITSIO +routines in that it internally allocates memory for the long string +value; all the other CFITSIO routines that deal with arrays require +that the calling program pre-allocate adequate space to hold the array +of data. Consequently, programs which use the fits\_read\_key\_longstr +routine must be careful to free the allocated memory for the string +when it is no longer needed. + +The following 2 routines also have limited support for this long string +convention, + +\begin{verbatim} + fits_modify_key_str - modify an existing string keyword value + fits_update_key_str - update a string keyword value +\end{verbatim} +in that they will correctly overwrite an existing long string value, +but the new string value is limited to a maximum of 68 characters in +length. + +The more commonly used CFITSIO routines to write string valued keywords +(fits\_update\_key and fits\_write\_key) do not support this long +string convention and only support strings up to 68 characters in +length. This has been done deliberately to prevent programs from +inadvertently writing keywords using this non-standard convention +without the explicit intent of the programmer or user. The +fits\_write\_key\_longstr routine must be called instead to write long +strings. This routine can also be used to write ordinary string values +less than 68 characters in length. + + +\section{Arrays of Fixed-Length Strings in Binary Tables} + +CFITSIO supports 2 ways to specify that a character column in a binary +table contains an array of fixed-length strings. The first way, which +is offically supported by the FITS Standard document, uses the TDIMn keyword. +For example, if TFORMn = '60A' and TDIMn = '(12,5)' then that +column will be interpreted as containing an array of 5 strings, each 12 +characters long. + +CFITSIO also supports a +local convention for the format of the TFORMn keyword value of the form +'rAw' where 'r' is an integer specifying the total width in characters +of the column, and 'w' is an integer specifying the (fixed) length of +an individual unit string within the vector. For example, TFORM1 = +'120A10' would indicate that the binary table column is 120 characters +wide and consists of 12 10-character length strings. This convention +is recognized by the CFITSIO routines that read or write strings in +binary tables. The Binary Table definition document specifies that +other optional characters may follow the data type code in the TFORM +keyword, so this local convention is in compliance with the +FITS standard although other FITS readers may not +recognize this convention. + +The Binary Table definition document that was approved by the IAU in +1994 contains an appendix describing an alternate convention for +specifying arrays of fixed or variable length strings in a binary table +character column (with the form 'rA:SSTRw/nnn)'. This appendix was not +officially voted on by the IAU and hence is still provisional. CFITSIO +does not currently support this proposal. + + +\section{Keyword Units Strings} + +One limitation of the current FITS Standard is that it does not define +a specific convention for recording the physical units of a keyword +value. The TUNITn keyword can be used to specify the physical units of +the values in a table column, but there is no analogous convention for +keyword values. The comment field of the keyword is often used for +this purpose, but the units are usually not specified in a well defined +format that FITS readers can easily recognize and extract. + +To solve this problem, CFITSIO uses a local convention in which the +keyword units are enclosed in square brackets as the first token in the +keyword comment field; more specifically, the opening square bracket +immediately follows the slash '/' comment field delimiter and a single +space character. The following examples illustrate keywords that use +this convention: + + +\begin{verbatim} +EXPOSURE= 1800.0 / [s] elapsed exposure time +V_HELIO = 16.23 / [km s**(-1)] heliocentric velocity +LAMBDA = 5400. / [angstrom] central wavelength +FLUX = 4.9033487787637465E-30 / [J/cm**2/s] average flux +\end{verbatim} + +In general, the units named in the IAU(1988) Style Guide are +recommended, with the main exception that the preferred unit for angle +is 'deg' for degrees. + +The fits\_read\_key\_unit and fits\_write\_key\_unit routines in +CFITSIO read and write, respectively, the keyword unit strings in an +existing keyword. + + +\section{HIERARCH Convention for Extended Keyword Names} + +CFITSIO supports the HIERARCH keyword convention which allows keyword +names that are longer then 8 characters and may contain the full range +of printable ASCII text characters. This convention +was developed at the European Southern Observatory (ESO) to support +hierarchical FITS keyword such as: + +\begin{verbatim} +HIERARCH ESO INS FOCU POS = -0.00002500 / Focus position +\end{verbatim} +Basically, this convention uses the FITS keyword 'HIERARCH' to indicate +that this convention is being used, then the actual keyword name +({\tt'ESO INS FOCU POS'} in this example) begins in column 10 and can +contain any printable ASCII text characters, including spaces. The +equals sign marks the end of the keyword name and is followed by the +usual value and comment fields just as in standard FITS keywords. +Further details of this convention are described at +http://arcdev.hq.eso.org/dicb/dicd/dic-1-1.4.html (search for +HIERARCH). + +This convention allows a much broader range of keyword names +than is allowed by the FITS Standard. Here are more examples +of such keywords: + +\begin{verbatim} +HIERARCH LongKeyword = 47.5 / Keyword has > 8 characters, and mixed case +HIERARCH XTE$TEMP = 98.6 / Keyword contains the '$' character +HIERARCH Earth is a star = F / Keyword contains embedded spaces +\end{verbatim} +CFITSIO will transparently read and write these keywords, so application +programs do not in general need to know anything about the specific +implementation details of the HIERARCH convention. In particular, +application programs do not need to specify the `HIERARCH' part of the +keyword name when reading or writing keywords (although it +may be included if desired). When writing a keyword, CFITSIO first +checks to see if the keyword name is legal as a standard FITS keyword +(no more than 8 characters long and containing only letters, digits, or +a minus sign or underscore). If so it writes it as a standard FITS +keyword, otherwise it uses the hierarch convention to write the +keyword. The maximum keyword name length is 67 characters, which +leaves only 1 space for the value field. A more practical limit is +about 40 characters, which leaves enough room for most keyword values. +CFITSIO returns an error if there is not enough room for both the +keyword name and the keyword value on the 80-character card, except for +string-valued keywords which are simply truncated so that the closing +quote character falls in column 80. In the current implementation, +CFITSIO preserves the case of the letters when writing the keyword +name, but it is case-insensitive when reading or searching for a +keyword. The current implementation allows any ASCII text character +(ASCII 32 to ASCII 126) in the keyword name except for the '=' +character. A space is also required on either side of the equal sign. + + +\section{Tile-Compressed Image Format} + +CFITSIO supports a convention for compressing n-dimensional images and +storing the resulting byte stream in a variable-length column in a FITS +binary table. The general principle used in this convention is to +first divide the n-dimensional image into a rectangular grid of +subimages or `tiles'. Each tile is then compressed as a continuous +block of data, and the resulting compressed byte stream is stored in a +row of a variable length column in a FITS binary table. By dividing the +image into tiles it is generally possible to extract and uncompress +subsections of the image without having to uncompress the whole image. +The default tiling pattern treats each row of a 2-dimensional image (or +higher dimensional cube) as a tile, such that each tile contains NAXIS1 +pixels (except the default with the HCOMPRESS algorithm is to +compress the whole 2D image as a single tile). Any other rectangular +tiling pattern may also be defined. In +the case of relatively small images it may be sufficient to compress +the entire image as a single tile, resulting in an output binary table +with 1 row. In the case of 3-dimensional data cubes, it may be +advantageous to treat each plane of the cube as a separate tile if +application software typically needs to access the cube on a plane by +plane basis. + +See section 5.6 ``Image Compression'' +for more information on using this tile-compressed image format. + +\chapter{ Optimizing Programs } + +CFITSIO has been carefully designed to obtain the highest possible +speed when reading and writing FITS files. In order to achieve the +best performance, however, application programmers must be careful to +call the CFITSIO routines appropriately and in an efficient sequence; +inappropriate usage of CFITSIO routines can greatly slow down the +execution speed of a program. + +The maximum possible I/O speed of CFITSIO depends of course on the type +of computer system that it is running on. As a rough guide, the +current generation of workstations can achieve speeds of 2 -- 10 MB/s +when reading or writing FITS images and similar, or slightly slower +speeds with FITS binary tables. Reading of FITS files can occur at +even higher rates (30MB/s or more) if the FITS file is still cached in +system memory following a previous read or write operation on the same +file. To more accurately predict the best performance that is possible +on any particular system, a diagnostic program called ``speed.c'' is +included with the CFITSIO distribution which can be run to +approximately measure the maximum possible speed of writing and reading +a test FITS file. + +The following 2 sections provide some background on how CFITSIO +internally manages the data I/O and describes some strategies that may +be used to optimize the processing speed of software that uses +CFITSIO. + + +\section{How CFITSIO Manages Data I/O} + +Many CFITSIO operations involve transferring only a small number of +bytes to or from the FITS file (e.g, reading a keyword, or writing a +row in a table); it would be very inefficient to physically read or +write such small blocks of data directly in the FITS file on disk, +therefore CFITSIO maintains a set of internal Input--Output (IO) +buffers in RAM memory that each contain one FITS block (2880 bytes) of +data. Whenever CFITSIO needs to access data in the FITS file, it first +transfers the FITS block containing those bytes into one of the IO +buffers in memory. The next time CFITSIO needs to access bytes in the +same block it can then go to the fast IO buffer rather than using a +much slower system disk access routine. The number of available IO +buffers is determined by the NIOBUF parameter (in fitsio2.h) and is +currently set to 40 by default. + +Whenever CFITSIO reads or writes data it first checks to see if that +block of the FITS file is already loaded into one of the IO buffers. +If not, and if there is an empty IO buffer available, then it will load +that block into the IO buffer (when reading a FITS file) or will +initialize a new block (when writing to a FITS file). If all the IO +buffers are already full, it must decide which one to reuse (generally +the one that has been accessed least recently), and flush the contents +back to disk if it has been modified before loading the new block. + +The one major exception to the above process occurs whenever a large +contiguous set of bytes are accessed, as might occur when reading or +writing a FITS image. In this case CFITSIO bypasses the internal IO +buffers and simply reads or writes the desired bytes directly in the +disk file with a single call to a low-level file read or write +routine. The minimum threshold for the number of bytes to read or +write this way is set by the MINDIRECT parameter and is currently set +to 3 FITS blocks = 8640 bytes. This is the most efficient way to read +or write large chunks of data and can achieve IO transfer rates of +5 -- 10MB/s or greater. Note that this fast direct IO process is not +applicable when accessing columns of data in a FITS table because the +bytes are generally not contiguous since they are interleaved by the +other columns of data in the table. This explains why the speed for +accessing FITS tables is generally slower than accessing +FITS images. + +Given this background information, the general strategy for efficiently +accessing FITS files should be apparent: when dealing with FITS +images, read or write large chunks of data at a time so that the direct +IO mechanism will be invoked; when accessing FITS headers or FITS +tables, on the other hand, once a particular FITS block has been +loading into one of the IO buffers, try to access all the needed +information in that block before it gets flushed out of the IO buffer. +It is important to avoid the situation where the same FITS block is +being read then flushed from a IO buffer multiple times. + +The following section gives more specific suggestions for optimizing +the use of CFITSIO. + + +\section{Optimization Strategies} + +1. When dealing with a FITS primary array or IMAGE extension, it is +more efficient to read or write large chunks of the image at a time +(at least 3 FITS blocks = 8640 bytes) so that the direct IO mechanism +will be used as described in the previous section. Smaller chunks of +data are read or written via the IO buffers, which is somewhat less +efficient because of the extra copy operation and additional +bookkeeping steps that are required. In principle it is more efficient +to read or write as big an array of image pixels at one time as +possible, however, if the array becomes so large that the operating +system cannot store it all in RAM, then the performance may be degraded +because of the increased swapping of virtual memory to disk. + +2. When dealing with FITS tables, the most important efficiency factor +in the software design is to read or write the data in the FITS file in +a single pass through the file. An example of poor program design +would be to read a large, 3-column table by sequentially reading the +entire first column, then going back to read the 2nd column, and +finally the 3rd column; this obviously requires 3 passes through the +file which could triple the execution time of an IO limited program. +For small tables this is not important, but when reading multi-megabyte +sized tables these inefficiencies can become significant. The more +efficient procedure in this case is to read or write only as many rows +of the table as will fit into the available internal IO buffers, then +access all the necessary columns of data within that range of rows. +Then after the program is completely finished with the data in those +rows it can move on to the next range of rows that will fit in the +buffers, continuing in this way until the entire file has been +processed. By using this procedure of accessing all the columns of a +table in parallel rather than sequentially, each block of the FITS file +will only be read or written once. + +The optimal number of rows to read or write at one time in a given +table depends on the width of the table row, on the number of IO +buffers that have been allocated in CFITSIO, and also on the number of +other FITS files that are open at the same time (since one IO buffer is +always reserved for each open FITS file). The CFITSIO Iterator routine +will automatically use the optimal-sized buffer, but there is also a +CFITSIO routine that will return the optimal number of rows for a given +table: fits\_get\_rowsize. It is not critical to use exactly the +value of nrows returned by this routine, as long as one does not exceed +it. Using a very small value however can also lead to poor performance +because of the overhead from the larger number of subroutine calls. + +The optimal number of rows returned by fits\_get\_rowsize is valid only +as long as the application program is only reading or writing data in +the specified table. Any other calls to access data in the table +header or in any other FITS file would cause additional blocks of data +to be loaded into the IO buffers displacing data from the original +table, and should be avoided during the critical period while the table +is being read or written. + +Occasionally it is necessary to simultaneously access more than one +FITS table, for example when transferring values from an input table to +an output table. In cases like this, one should call +fits\_get\_rowsize to get the optimal number of rows for each table +separately, than reduce the number of rows proportionally. For +example, if the optimal number of rows in the input table is 3600 and +is 1400 in the output table, then these values should be cut in half to +1800 and 700, respectively, if both tables are going to be accessed at +the same time. + +3. Use the CFITSIO Iterator routine. This routine provides a +more `object oriented' way of reading and writing FITS files +which automatically uses the most appropriate data buffer size +to achieve the maximum I/O throughput. + +4. Use binary table extensions rather than ASCII table +extensions for better efficiency when dealing with tabular data. The +I/O to ASCII tables is slower because of the overhead in formatting or +parsing the ASCII data fields and because ASCII tables are about twice +as large as binary tables with the same information content. + +5. Design software so that it reads the FITS header keywords in the +same order in which they occur in the file. When reading keywords, +CFITSIO searches forward starting from the position of the last keyword +that was read. If it reaches the end of the header without finding the +keyword, it then goes back to the start of the header and continues the +search down to the position where it started. In practice, as long as +the entire FITS header can fit at one time in the available internal IO +buffers, then the header keyword access will be very fast and it makes +little difference which order they are accessed. + +6. Avoid the use of scaling (by using the BSCALE and BZERO or TSCAL and +TZERO keywords) in FITS files since the scaling operations add to the +processing time needed to read or write the data. In some cases it may +be more efficient to temporarily turn off the scaling (using fits\_set\_bscale or +fits\_set\_tscale) and then read or write the raw unscaled values in the FITS +file. + +7. Avoid using the `implicit data type conversion' capability in +CFITSIO. For instance, when reading a FITS image with BITPIX = -32 +(32-bit floating point pixels), read the data into a single precision +floating point data array in the program. Forcing CFITSIO to convert +the data to a different data type can slow the program. + +8. Where feasible, design FITS binary tables using vector column +elements so that the data are written as a contiguous set of bytes, +rather than as single elements in multiple rows. For example, it is +faster to access the data in a table that contains a single row +and 2 columns with TFORM keywords equal to '10000E' and '10000J', than +it is to access the same amount of data in a table with 10000 rows +which has columns with the TFORM keywords equal to '1E' and '1J'. In +the former case the 10000 floating point values in the first column are +all written in a contiguous block of the file which can be read or +written quickly, whereas in the second case each floating point value +in the first column is interleaved with the integer value in the second +column of the same row so CFITSIO has to explicitly move to the +position of each element to be read or written. + +9. Avoid the use of variable length vector columns in binary tables, +since any reading or writing of these data requires that CFITSIO first +look up or compute the starting address of each row of data in the +heap. + +10. When copying data from one FITS table to another, it is faster to +transfer the raw bytes instead of reading then writing each column of +the table. The CFITSIO routines fits\_read\_tblbytes and +fits\_write\_tblbytes will perform low-level reads or writes of any +contiguous range of bytes in a table extension. These routines can be +used to read or write a whole row (or multiple rows for even greater +efficiency) of a table with a single function call. These routines +are fast because they bypass all the usual data scaling, error checking +and machine dependent data conversion that is normally done by CFITSIO, +and they allow the program to write the data to the output file in +exactly the same byte order. For these same reasons, these routines +can corrupt the FITS data file if used incorrectly because no +validation or machine dependent conversion is performed by these +routines. These routines are only recommended for optimizing critical +pieces of code and should only be used by programmers who thoroughly +understand the internal format of the FITS tables they are reading or +writing. + +11. Another strategy for improving the speed of writing a FITS table, +similar to the previous one, is to directly construct the entire byte +stream for a whole table row (or multiple rows) within the application +program and then write it to the FITS file with +fits\_write\_tblbytes. This avoids all the overhead normally present +in the column-oriented CFITSIO write routines. This technique should +only be used for critical applications because it makes the code more +difficult to understand and maintain, and it makes the code more system +dependent (e.g., do the bytes need to be swapped before writing to the +FITS file?). + +12. Finally, external factors such as the type of magnetic disk +controller (SCSI or IDE), the size of the disk cache, the average seek +speed of the disk, the amount of disk fragmentation, and the amount of +RAM available on the system can all have a significant impact on +overall I/O efficiency. For critical applications, a system +administrator should review the proposed system hardware to identify any +potential I/O bottlenecks. + + +\appendix +\chapter{Index of Routines } +\begin{tabular}{lr} +fits\_add\_group\_member & \pageref{ffgtam} \\ +fits\_ascii\_tform & \pageref{ffasfm} \\ +fits\_binary\_tform & \pageref{ffbnfm} \\ +fits\_calculator & \pageref{ffcalc} \\ +fits\_calculator\_rng & \pageref{ffcalcrng} \\ +fits\_calc\_rows & \pageref{ffcrow} \\ +fits\_change\_group & \pageref{ffgtch} \\ +fits\_clear\_errmark & \pageref{ffpmrk} \\ +fits\_clear\_errmsg & \pageref{ffcmsg} \\ +fits\_close\_file & \pageref{ffclos} \\ +fits\_compact\_group & \pageref{ffgtcm} \\ +fits\_compare\_str & \pageref{ffcmps} \\ +fits\_compress\_heap & \pageref{ffcmph} \\ +fits\_copy\_cell2image & \pageref{copycell} \\ +fits\_copy\_col & \pageref{ffcpcl} \\ +fits\_copy\_data & \pageref{ffcpdt} \\ +fits\_copy\_file & \pageref{ffcpfl} \\ +fits\_copy\_group & \pageref{ffgtcp} \\ +fits\_copy\_hdu & \pageref{ffcopy} \\ +fits\_copy\_header & \pageref{ffcphd} \\ +fits\_copy\_image2cell & \pageref{copycell} \\ +fits\_copy\_image\_section & \pageref{ffcpimg} \\ +fits\_copy\_key & \pageref{ffcpky} \\ +fits\_copy\_member & \pageref{ffgmcp} \\ +fits\_create\_diskfile & \pageref{ffinit} \\ +fits\_create\_file & \pageref{ffinit} \\ +fits\_create\_group & \pageref{ffgtcr} \\ +fits\_create\_hdu & \pageref{ffcrhd} \\ +fits\_create\_img & \pageref{ffcrim} \\ +fits\_create\_memfile & \pageref{ffimem} \\ +fits\_create\_tbl & \pageref{ffcrtb} \\ +fits\_create\_template & \pageref{fftplt} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_date2str & \pageref{ffdt2s} \\ +fits\_decode\_chksum & \pageref{ffdsum} \\ +fits\_decode\_tdim & \pageref{ffdtdm} \\ +fits\_delete\_col & \pageref{ffdcol} \\ +fits\_delete\_file & \pageref{ffdelt} \\ +fits\_delete\_hdu & \pageref{ffdhdu} \\ +fits\_delete\_key & \pageref{ffdkey} \\ +fits\_delete\_record & \pageref{ffdrec} \\ +fits\_delete\_rowlist & \pageref{ffdrws} \\ +fits\_delete\_rowrange & \pageref{ffdrrg} \\ +fits\_delete\_rows & \pageref{ffdrow} \\ +fits\_encode\_chksum & \pageref{ffesum} \\ +fits\_file\_exists & \pageref{ffexist} \\ +fits\_file\_mode & \pageref{ffflmd} \\ +fits\_file\_name & \pageref{ffflnm} \\ +fits\_find\_first\_row & \pageref{ffffrw} \\ +fits\_find\_nextkey & \pageref{ffgnxk} \\ +fits\_find\_rows & \pageref{fffrow} \\ +fits\_flush\_buffer & \pageref{ffflus} \\ +fits\_flush\_file & \pageref{ffflus} \\ +fits\_get\_acolparms & \pageref{ffgacl} \\ +fits\_get\_bcolparms & \pageref{ffgbcl} \\ +fits\_get\_chksum & \pageref{ffgcks} \\ +fits\_get\_col\_display\_width & \pageref{ffgcdw} \\ +fits\_get\_colname & \pageref{ffgcnn} \\ +fits\_get\_colnum & \pageref{ffgcno} \\ +fits\_get\_coltype & \pageref{ffgtcl} \\ +fits\_get\_compression\_type & \pageref{ffgetcomp} \\ +fits\_get\_eqcoltype & \pageref{ffgtcl} \\ +fits\_get\_errstatus & \pageref{ffgerr} \\ +fits\_get\_hdrpos & \pageref{ffghps} \\ +fits\_get\_hdrspace & \pageref{ffghsp} \\ +\end{tabular} +\begin{tabular}{lr} +fits\_get\_hdu\_num & \pageref{ffghdn} \\ +fits\_get\_hdu\_type & \pageref{ffghdt} \\ +fits\_get\_hduaddr & \pageref{ffghad} \\ +fits\_get\_hduaddrll & \pageref{ffghad} \\ +fits\_get\_img\_dim & \pageref{ffgidm} \\ +fits\_get\_img\_equivtype & \pageref{ffgidt} \\ +fits\_get\_img\_param & \pageref{ffgipr} \\ +fits\_get\_img\_size & \pageref{ffgisz} \\ +fits\_get\_img\_type & \pageref{ffgidt} \\ +fits\_get\_keyclass & \pageref{ffgkcl} \\ +fits\_get\_keyname & \pageref{ffgknm} \\ +fits\_get\_keytype & \pageref{ffdtyp} \\ +fits\_get\_noise\_bits & \pageref{ffgetcomp} \\ +fits\_get\_num\_cols & \pageref{ffgnrw} \\ +fits\_get\_num\_groups & \pageref{ffgmng} \\ +fits\_get\_num\_hdus & \pageref{ffthdu} \\ +fits\_get\_num\_members & \pageref{ffgtnm} \\ +fits\_get\_num\_rows & \pageref{ffgnrw} \\ +fits\_get\_rowsize & \pageref{ffgrsz} \\ +fits\_get\_system\_time & \pageref{ffdt2s} \\ +fits\_get\_tile\_dim & \pageref{ffgetcomp} \\ +fits\_get\_tbcol & \pageref{ffgabc} \\ +fits\_get\_version & \pageref{ffvers} \\ +fits\_hdr2str & \pageref{ffhdr2str}, \pageref{hdr2str} \\ +fits\_insert\_atbl & \pageref{ffitab} \\ +fits\_insert\_btbl & \pageref{ffibin} \\ +fits\_insert\_col & \pageref{fficol} \\ +fits\_insert\_cols & \pageref{fficls} \\ +fits\_insert\_group & \pageref{ffgtis} \\ +fits\_insert\_img & \pageref{ffiimg} \\ +fits\_insert\_key\_null & \pageref{ffikyu} \\ +fits\_insert\_key\_TYP & \pageref{ffikyx} \\ +\end{tabular} +\newpage +\begin{tabular}{lr} +fits\_insert\_record & \pageref{ffirec} \\ +fits\_insert\_rows & \pageref{ffirow} \\ +fits\_iterate\_data & \pageref{ffiter} \\ +fits\_make\_keyn & \pageref{ffkeyn} \\ +fits\_make\_nkey & \pageref{ffnkey} \\ +fits\_merge\_groups & \pageref{ffgtmg} \\ +fits\_modify\_card & \pageref{ffmcrd} \\ +fits\_modify\_comment & \pageref{ffmcom} \\ +fits\_modify\_key\_null & \pageref{ffmkyu} \\ +fits\_modify\_key\_TYP & \pageref{ffmkyx} \\ +fits\_modify\_name & \pageref{ffmnam} \\ +fits\_modify\_record & \pageref{ffmrec} \\ +fits\_modify\_vector\_len & \pageref{ffmvec} \\ +fits\_movabs\_hdu & \pageref{ffmahd} \\ +fits\_movnam\_hdu & \pageref{ffmnhd} \\ +fits\_movrel\_hdu & \pageref{ffmrhd} \\ +fits\_null\_check & \pageref{ffnchk} \\ +fits\_open\_data & \pageref{ffopen} \\ +fits\_open\_diskfile & \pageref{ffopen} \\ +fits\_open\_file & \pageref{ffopen} \\ +fits\_open\_image & \pageref{ffopen} \\ +fits\_open\_table & \pageref{ffopen} \\ +fits\_open\_group & \pageref{ffgtop} \\ +fits\_open\_member & \pageref{ffgmop} \\ +fits\_open\_memfile & \pageref{ffomem} \\ +fits\_parse\_extnum & \pageref{ffextn} \\ +fits\_parse\_input\_url & \pageref{ffiurl} \\ +fits\_parse\_range & \pageref{ffrwrg} \\ +fits\_parse\_rootname & \pageref{ffrtnm} \\ +fits\_parse\_template & \pageref{ffgthd} \\ +fits\_parse\_value & \pageref{ffpsvc} \\ +fits\_pix\_to\_world & \pageref{ffwldp} \\ +fits\_read\_2d\_TYP & \pageref{ffg2dx} \\ +fits\_read\_3d\_TYP & \pageref{ffg3dx} \\ +fits\_read\_atblhdr & \pageref{ffghtb} \\ +fits\_read\_btblhdr & \pageref{ffghbn} \\ +fits\_read\_card & \pageref{ffgcrd} \\ +fits\_read\_col & \pageref{ffgcv} \\ +fits\_read\_col\_bit\_ & \pageref{ffgcx} \\ +fits\_read\_col\_TYP & \pageref{ffgcvx} \\ +fits\_read\_colnull & \pageref{ffgcf} \\ +fits\_read\_colnull\_TYP & \pageref{ffgcfx} \\ +fits\_read\_descript & \pageref{ffgdes} \\ +fits\_read\_descripts & \pageref{ffgdes} \\ +fits\_read\_errmsg & \pageref{ffgmsg} \\ +fits\_read\_ext & \pageref{ffgextn} \\ +fits\_read\_grppar\_TYP & \pageref{ffggpx} \\ +fits\_read\_img & \pageref{ffgpv} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_read\_img\_coord & \pageref{ffgics} \\ +fits\_read\_img\_TYP & \pageref{ffgpvx} \\ +fits\_read\_imghdr & \pageref{ffghpr} \\ +fits\_read\_imgnull & \pageref{ffgpf} \\ +fits\_read\_imgnull\_TYP & \pageref{ffgpfx} \\ +fits\_read\_key & \pageref{ffgky} \\ +fits\_read\_key\_longstr & \pageref{ffgkls} \\ +fits\_read\_key\_triple & \pageref{ffgkyt} \\ +fits\_read\_key\_unit & \pageref{ffgunt} \\ +fits\_read\_key\_TYP & \pageref{ffgkyx} \\ +fits\_read\_keyn & \pageref{ffgkyn} \\ +fits\_read\_keys\_TYP & \pageref{ffgknx} \\ +fits\_read\_keyword & \pageref{ffgkey} \\ +fits\_read\_pix & \pageref{ffgpxv} \\ +fits\_read\_pixnull & \pageref{ffgpxf} \\ +fits\_read\_record & \pageref{ffgrec} \\ +fits\_read\_subset\_TYP & \pageref{ffgsvx} \pageref{ffgsvx2}\\ +fits\_read\_subsetnull\_TYP & \pageref{ffgsfx} \pageref{ffgsfx2} \\ +fits\_read\_tbl\_coord & \pageref{ffgtcs} \\ +fits\_read\_tblbytes & \pageref{ffgtbb} \\ +fits\_read\_tdim & \pageref{ffgtdm} \\ +fits\_read\_wcstab & \pageref{wcstab} \\ +fits\_remove\_group & \pageref{ffgtrm} \\ +fits\_remove\_member & \pageref{ffgmrm} \\ +fits\_reopen\_file & \pageref{ffreopen} \\ +fits\_report\_error & \pageref{ffrprt} \\ +fits\_resize\_img & \pageref{ffrsim} \\ +fits\_rms\_float & \pageref{imageRMS} \\ +fits\_rms\_short & \pageref{imageRMS} \\ +fits\_select\_rows & \pageref{ffsrow} \\ +fits\_set\_atblnull & \pageref{ffsnul} \\ +fits\_set\_bscale & \pageref{ffpscl} \\ +fits\_set\_btblnull & \pageref{fftnul} \\ +fits\_set\_compression\_type & \pageref{ffsetcomp} \\ +fits\_set\_hdrsize & \pageref{ffhdef} \\ +fits\_set\_hdustruc & \pageref{ffrdef} \\ +fits\_set\_imgnull & \pageref{ffpnul} \\ +fits\_set\_noise\_bits & \pageref{ffsetcomp} \\ +fits\_set\_tile\_dim & \pageref{ffsetcomp} \\ +fits\_set\_tscale & \pageref{fftscl} \\ +fits\_split\_names & \pageref{splitnames} \\ +fits\_str2date & \pageref{ffdt2s} \\ +fits\_str2time & \pageref{ffdt2s} \\ +fits\_test\_expr & \pageref{fftexp} \\ +fits\_test\_heap & \pageref{fftheap} \\ +fits\_test\_keyword & \pageref{fftkey} \\ +fits\_test\_record & \pageref{fftrec} \\ +fits\_time2str & \pageref{ffdt2s} \\ + +\end{tabular} +\begin{tabular}{lr} +fits\_transfer\_member & \pageref{ffgmtf} \\ +fits\_translate\_keyword & \pageref{translatekey} \\ +fits\_update\_card & \pageref{ffucrd} \\ +fits\_update\_chksum & \pageref{ffupck} \\ +fits\_update\_key & \pageref{ffuky} \\ +fits\_update\_key\_longstr & \pageref{ffukyx} \\ +fits\_update\_key\_null & \pageref{ffukyu} \\ +fits\_update\_key\_TYP & \pageref{ffukyx} \\ +fits\_uppercase & \pageref{ffupch} \\ +fits\_url\_type & \pageref{ffurlt} \\ +fits\_verify\_chksum & \pageref{ffvcks} \\ +fits\_verify\_group & \pageref{ffgtvf} \\ +fits\_world\_to\_pix & \pageref{ffxypx} \\ +fits\_write\_2d\_TYP & \pageref{ffp2dx} \\ +fits\_write\_3d\_TYP & \pageref{ffp3dx} \\ +fits\_write\_atblhdr & \pageref{ffphtb} \\ +fits\_write\_btblhdr & \pageref{ffphbn} \\ +fits\_write\_chksum & \pageref{ffpcks} \\ +fits\_write\_col & \pageref{ffpcl} \\ +fits\_write\_col\_bit & \pageref{ffpclx} \\ +fits\_write\_col\_TYP & \pageref{ffpcls} \\ +fits\_write\_col\_null & \pageref{ffpclu} \\ +fits\_write\_colnull & \pageref{ffpcn} \\ +fits\_write\_colnull\_TYP & \pageref{ffpcnx} \\ +fits\_write\_comment & \pageref{ffpcom} \\ +fits\_write\_date & \pageref{ffpdat} \\ +fits\_write\_descript & \pageref{ffpdes} \\ +fits\_write\_errmark & \pageref{ffpmrk} \\ +fits\_write\_errmsg & \pageref{ffpmsg} \\ +fits\_write\_ext & \pageref{ffgextn} \\ +fits\_write\_exthdr & \pageref{ffphps} \\ +fits\_write\_grphdr & \pageref{ffphpr} \\ +fits\_write\_grppar\_TYP & \pageref{ffpgpx} \\ +fits\_write\_hdu & \pageref{ffwrhdu} \\ +fits\_write\_history & \pageref{ffphis} \\ +fits\_write\_img & \pageref{ffppr} \\ +fits\_write\_img\_null & \pageref{ffppru} \\ +fits\_write\_img\_TYP & \pageref{ffpprx} \\ +fits\_write\_imghdr & \pageref{ffphps} \\ +fits\_write\_imgnull & \pageref{ffppn} \\ +fits\_write\_imgnull\_TYP & \pageref{ffppnx} \\ +fits\_write\_key & \pageref{ffpky} \\ +fits\_write\_key\_longstr & \pageref{ffpkls} \\ +fits\_write\_key\_longwarn & \pageref{ffplsw} \\ +fits\_write\_key\_null & \pageref{ffpkyu} \\ +fits\_write\_key\_template & \pageref{ffpktp} \\ +fits\_write\_key\_triple & \pageref{ffpkyt} \\ +fits\_write\_key\_unit & \pageref{ffpunt} \\ + +\end{tabular} +\newpage +\begin{tabular}{lr} + +fits\_write\_key\_TYP & \pageref{ffpkyx} \\ +fits\_write\_keys\_TYP & \pageref{ffpknx} \\ +fits\_write\_null\_img & \pageref{ffpprn} \\ +fits\_write\_nullrows & \pageref{ffpclu} \\ +fits\_write\_pix & \pageref{ffppx} \\ +fits\_write\_pixnull & \pageref{ffppxn} \\ +fits\_write\_record & \pageref{ffprec} \\ +fits\_write\_subset & \pageref{ffpss} \\ +fits\_write\_subset\_TYP & \pageref{ffpssx} \\ +fits\_write\_tblbytes & \pageref{ffptbb} \\ +fits\_write\_tdim & \pageref{ffptdm} \\ +fits\_write\_theap & \pageref{ffpthp} \\ +\end{tabular} +\newpage + +\begin{tabular}{lr} +ffasfm & \pageref{ffasfm} \\ +ffbnfm & \pageref{ffbnfm} \\ +ffcalc & \pageref{ffcalc} \\ +ffcalc\_rng & \pageref{ffcalcrng} \\ +ffclos & \pageref{ffclos} \\ +ffcmph & \pageref{ffcmph} \\ +ffcmps & \pageref{ffcmps} \\ +ffcmrk & \pageref{ffpmrk} \\ +ffcmsg & \pageref{ffcmsg} \\ +ffcopy & \pageref{ffcopy} \\ +ffcpcl & \pageref{ffcpcl} \\ +ffcpdt & \pageref{ffcpdt} \\ +ffcpfl & \pageref{ffcpfl} \\ +ffcphd & \pageref{ffcphd} \\ +ffcpimg & \pageref{ffcpimg} \\ +ffcpky & \pageref{ffcpky} \\ +ffcrhd & \pageref{ffcrhd} \\ +ffcrim & \pageref{ffcrim} \\ +ffcrow & \pageref{ffcrow} \\ +ffcrtb & \pageref{ffcrtb} \\ +ffdcol & \pageref{ffdcol} \\ +ffdelt & \pageref{ffdelt} \\ +ffdhdu & \pageref{ffdhdu} \\ +ffdkey & \pageref{ffdkey} \\ +ffdkinit & \pageref{ffinit} \\ +ffdkopen & \pageref{ffopen} \\ +ffdopn & \pageref{ffopen} \\ +ffdrec & \pageref{ffdrec} \\ +ffdrow & \pageref{ffdrow} \\ +ffdrrg & \pageref{ffdrrg} \\ +ffdrws & \pageref{ffdrws} \\ +ffdsum & \pageref{ffdsum} \\ +ffdt2s & \pageref{ffdt2s} \\ +ffdtdm & \pageref{ffdtdm} \\ +ffdtyp & \pageref{ffdtyp} \\ +ffeqty & \pageref{ffgtcl} \\ +ffesum & \pageref{ffesum} \\ +ffexest & \pageref{ffexist} \\ +ffextn & \pageref{ffextn} \\ +ffffrw & \pageref{ffffrw} \\ +ffflmd & \pageref{ffflmd} \\ +ffflnm & \pageref{ffflnm} \\ +ffflsh & \pageref{ffflus} \\ +ffflus & \pageref{ffflus} \\ +fffrow & \pageref{fffrow} \\ +ffg2d\_ & \pageref{ffg2dx} \\ +ffg3d\_ & \pageref{ffg3dx} \\ +ffgabc & \pageref{ffgabc} \\ +\end{tabular} +\begin{tabular}{lr} +ffgacl & \pageref{ffgacl} \\ +ffgbcl & \pageref{ffgbcl} \\ +ffgcdw & \pageref{ffgcdw} \\ +ffgcf & \pageref{ffgcf} \\ +ffgcf\_ & \pageref{ffgcfx} \\ +ffgcks & \pageref{ffgcks} \\ +ffgcnn & \pageref{ffgcnn} \\ +ffgcno & \pageref{ffgcno} \\ +ffgcrd & \pageref{ffgcrd} \\ +ffgcv & \pageref{ffgcv} \\ +ffgcv\_ & \pageref{ffgcvx} \\ +ffgcx & \pageref{ffgcx} \\ +ffgdes & \pageref{ffgdes} \\ +ffgdess & \pageref{ffgdes} \\ +ffgerr & \pageref{ffgerr} \\ +ffgextn & \pageref{ffgextn} \\ +ffggp\_ & \pageref{ffggpx} \\ +ffghad & \pageref{ffghad} \\ +ffghbn & \pageref{ffghbn} \\ +ffghdn & \pageref{ffghdn} \\ +ffghdt & \pageref{ffghdt} \\ +ffghpr & \pageref{ffghpr} \\ +ffghps & \pageref{ffghps} \\ +ffghsp & \pageref{ffghsp} \\ +ffghtb & \pageref{ffghtb} \\ +ffgics & \pageref{ffgics} \\ +ffgidm & \pageref{ffgidm} \\ +ffgidt & \pageref{ffgidt} \\ +ffgiet & \pageref{ffgidt} \\ +ffgipr & \pageref{ffgipr} \\ +ffgisz & \pageref{ffgisz} \\ +ffgkcl & \pageref{ffgkcl} \\ +ffgkey & \pageref{ffgkey} \\ +ffgkls & \pageref{ffgkls} \\ +ffgkn\_ & \pageref{ffgknx} \\ +ffgknm & \pageref{ffgknm} \\ +ffgky & \pageref{ffgky} \\ +ffgkyn & \pageref{ffgkyn} \\ +ffgkyt & \pageref{ffgkyt} \\ +ffgky\_ & \pageref{ffgkyx} \\ +ffgmcp & \pageref{ffgmcp} \\ +ffgmng & \pageref{ffgmng} \\ +ffgmop & \pageref{ffgmop} \\ +ffgmrm & \pageref{ffgmrm} \\ +ffgmsg & \pageref{ffgmsg} \\ +ffgmtf & \pageref{ffgmtf} \\ +ffgncl & \pageref{ffgnrw} \\ +ffgnrw & \pageref{ffgnrw} \\ + +\end{tabular} +\begin{tabular}{lr} +ffgnxk & \pageref{ffgnxk} \\ +ffgpf & \pageref{ffgpf} \\ +ffgpf\_ & \pageref{ffgpfx} \\ +ffgpv & \pageref{ffgpv} \\ +ffgpv\_ & \pageref{ffgpvx} \\ +ffgpxv & \pageref{ffgpxv} \\ +ffgpxf & \pageref{ffgpxf} \\ +ffgrec & \pageref{ffgrec} \\ +ffgrsz & \pageref{ffgrsz} \\ +ffgsdt & \pageref{ffdt2s} \\ +ffgsf\_ & \pageref{ffgsfx} \pageref{ffgsfx2} \\ +ffgstm & \pageref{ffdt2s} \\ +ffgsv\_ & \pageref{ffgsvx} \pageref{ffgsvx2}\\ +ffgtam & \pageref{ffgtam} \\ +ffgtbb & \pageref{ffgtbb} \\ +ffgtch & \pageref{ffgtch} \\ +ffgtcl & \pageref{ffgtcl} \\ +ffgtcm & \pageref{ffgtcm} \\ +ffgtcp & \pageref{ffgtcp} \\ +ffgtcr & \pageref{ffgtcr} \\ +ffgtcs & \pageref{ffgtcs} \\ +ffgtdm & \pageref{ffgtdm} \\ +ffgthd & \pageref{ffgthd} \\ +ffgtis & \pageref{ffgtis} \\ +ffgtmg & \pageref{ffgtmg} \\ +ffgtnm & \pageref{ffgtnm} \\ +ffgtop & \pageref{ffgtop} \\ +ffgtrm & \pageref{ffgtrm} \\ +ffgtvf & \pageref{ffgtvf} \\ +ffgunt & \pageref{ffgunt} \\ +ffhdef & \pageref{ffhdef} \\ +ffibin & \pageref{ffibin} \\ +fficls & \pageref{fficls} \\ +fficol & \pageref{fficol} \\ +ffiimg & \pageref{ffiimg} \\ +ffikls & \pageref{ffikyx} \\ +ffikyu & \pageref{ffikyu} \\ +ffiky\_ & \pageref{ffikyx} \\ +ffimem & \pageref{ffimem} \\ +ffinit & \pageref{ffinit} \\ +ffiopn & \pageref{ffopen} \\ +ffirec & \pageref{ffirec} \\ +ffirow & \pageref{ffirow} \\ +ffitab & \pageref{ffitab} \\ +ffiter & \pageref{ffiter} \\ +ffiurl & \pageref{ffiurl} \\ +ffkeyn & \pageref{ffkeyn} \\ +ffmahd & \pageref{ffmahd} \\ + +\end{tabular} +\begin{tabular}{lr} + +ffmcom & \pageref{ffmcom} \\ +ffmcrd & \pageref{ffmcrd} \\ +ffmkls & \pageref{ffmkyx} \\ +ffmkyu & \pageref{ffmkyu} \\ +ffmky\_ & \pageref{ffmkyx} \\ +ffmnam & \pageref{ffmnam} \\ +ffmnhd & \pageref{ffmnhd} \\ +ffmrec & \pageref{ffmrec} \\ +ffmrhd & \pageref{ffmrhd} \\ +ffmvec & \pageref{ffmvec} \\ +ffnchk & \pageref{ffnchk} \\ +ffnkey & \pageref{ffnkey} \\ +ffomem & \pageref{ffomem} \\ +ffopen & \pageref{ffopen} \\ +ffp2d\_ & \pageref{ffp2dx} \\ +ffp3d\_ & \pageref{ffp3dx} \\ +ffpcks & \pageref{ffpcks} \\ +ffpcl & \pageref{ffpcl} \\ +ffpcls & \pageref{ffpcls} \\ +ffpcl\_ & \pageref{ffpclx} \\ +ffpclu & \pageref{ffpclu} \\ +ffpcn & \pageref{ffpcn} \\ +ffpcn\_ & \pageref{ffpcnx} \\ +ffpcom & \pageref{ffpcom} \\ +ffpdat & \pageref{ffpdat} \\ +ffpdes & \pageref{ffpdes} \\ +ffpextn & \pageref{ffgextn} \\ +ffpgp\_ & \pageref{ffpgpx} \\ +ffphbn & \pageref{ffphbn} \\ +ffphext & \pageref{ffphpr} \\ +ffphis & \pageref{ffphis} \\ +ffphpr & \pageref{ffphpr} \\ +ffphps & \pageref{ffphps} \\ +ffphtb & \pageref{ffphtb} \\ +ffpkls & \pageref{ffpkls} \\ +ffpkn\_ & \pageref{ffpknx} \\ +ffpktp & \pageref{ffpktp} \\ +ffpky & \pageref{ffpky} \\ +ffpkyt & \pageref{ffpkyt} \\ +ffpkyu & \pageref{ffpkyu} \\ +ffpky\_ & \pageref{ffpkyx} \\ +ffplsw & \pageref{ffplsw} \\ +ffpmrk & \pageref{ffpmrk} \\ +ffpmsg & \pageref{ffpmsg} \\ +ffpnul & \pageref{ffpnul} \\ +ffppn & \pageref{ffppn} \\ +ffppn\_ & \pageref{ffppnx} \\ +ffppr & \pageref{ffppr} \\ + +\end{tabular} +\begin{tabular}{lr} + +ffpprn & \pageref{ffpprn} \\ +ffppru & \pageref{ffppru} \\ +ffppr\_ & \pageref{ffpprx} \\ +ffppx & \pageref{ffppx} \\ +ffppxn & \pageref{ffppxn} \\ +ffprec & \pageref{ffprec} \\ +ffprwu & \pageref{ffpclu} \\ +ffpscl & \pageref{ffpscl} \\ +ffpss & \pageref{ffpss} \\ +ffpss\_ & \pageref{ffpssx} \\ +ffpsvc & \pageref{ffpsvc} \\ +ffptbb & \pageref{ffptbb} \\ +ffptdm & \pageref{ffptdm} \\ +ffpthp & \pageref{ffpthp} \\ +ffpunt & \pageref{ffpunt} \\ +ffrdef & \pageref{ffrdef} \\ +ffreopen & \pageref{ffreopen} \\ +ffrprt & \pageref{ffrprt} \\ +ffrsim & \pageref{ffrsim} \\ +ffrtnm & \pageref{ffrtnm} \\ +ffrwrg & \pageref{ffrwrg} \\ +ffs2dt & \pageref{ffdt2s} \\ +ffs2tm & \pageref{ffdt2s} \\ +ffsnul & \pageref{ffsnul} \\ +ffsrow & \pageref{ffsrow} \\ +fftexp & \pageref{fftexp} \\ +ffthdu & \pageref{ffthdu} \\ +fftheap & \pageref{fftheap} \\ +fftkey & \pageref{fftkey} \\ +fftm2s & \pageref{ffdt2s} \\ +fftnul & \pageref{fftnul} \\ +fftopn & \pageref{ffopen} \\ +fftplt & \pageref{fftplt} \\ +fftrec & \pageref{fftrec} \\ +fftscl & \pageref{fftscl} \\ +ffucrd & \pageref{ffucrd} \\ +ffukls & \pageref{ffukyx} \\ +ffuky & \pageref{ffuky} \\ +ffukyu & \pageref{ffukyu} \\ +ffuky\_ & \pageref{ffukyx} \\ +ffupch & \pageref{ffupch} \\ +ffupck & \pageref{ffupck} \\ +ffurlt & \pageref{ffurlt} \\ +ffvcks & \pageref{ffvcks} \\ +ffvers & \pageref{ffvers} \\ +ffwldp & \pageref{ffwldp} \\ +ffwrhdu & \pageref{ffwrhdu} \\ +ffxypx & \pageref{ffxypx} \\ +\end{tabular} + + + +\chapter{Parameter Definitions } + +\begin{verbatim} +anynul - set to TRUE (=1) if any returned values are undefined, else FALSE +array - array of numerical data values to read or write +ascii - encoded checksum string +binspec - the input table binning specifier +bitpix - bits per pixel. The following symbolic mnemonics are predefined: + BYTE_IMG = 8 (unsigned char) + SHORT_IMG = 16 (signed short integer) + LONG_IMG = 32 (signed long integer) + LONGLONG_IMG = 64 (signed long 64-bit integer) + FLOAT_IMG = -32 (float) + DOUBLE_IMG = -64 (double). + The LONGLONG_IMG type is experimental and is not officially + recognized in the FITS Standard document. + Two additional values, USHORT_IMG and ULONG_IMG are also available + for creating unsigned integer images. These are equivalent to + creating a signed integer image with BZERO offset keyword values + of 32768 or 2147483648, respectively, which is the convention that + FITS uses to store unsigned integers. +card - header record to be read or written (80 char max, null-terminated) +casesen - CASESEN (=1) for case-sensitive string matching, else CASEINSEN (=0) +cmopt - grouping table "compact" option parameter. Allowed values are: + OPT_CMT_MBR and OPT_CMT_MBR_DEL. +colname - name of the column (null-terminated) +colnum - column number (first column = 1) +colspec - the input file column specification; used to delete, create, or rename + table columns +comment - the keyword comment field (72 char max, null-terminated) +complm - should the checksum be complemented? +comptype - compression algorithm to use: GZIP_1, RICE_1, HCOMPRESS_1, or PLIO_1 +coordtype- type of coordinate projection (-SIN, -TAN, -ARC, -NCP, + -GLS, -MER, or -AIT) +cpopt - grouping table copy option parameter. Allowed values are: + OPT_GCP_GPT, OPT_GCP_MBR, OPT_GCP_ALL, OPT_MCP_ADD, OPT_MCP_NADD, + OPT_MCP_REPL, amd OPT_MCP_MOV. +create_col- If TRUE, then insert a new column in the table, otherwise + overwrite the existing column. +current - if TRUE, then the current HDU will be copied +dataok - was the data unit verification successful (=1) or + not (= -1). Equals zero if the DATASUM keyword is not present. +datasum - 32-bit 1's complement checksum for the data unit +dataend - address (in bytes) of the end of the HDU +datastart- address (in bytes) of the start of the data unit +datatype - specifies the data type of the value. Allowed value are: TSTRING, + TLOGICAL, TBYTE, TSBYTE, TSHORT, TUSHORT, TINT, TUINT, TLONG, TULONG, + TFLOAT, TDOUBLE, TCOMPLEX, and TDBLCOMPLEX +datestr - FITS date/time string: 'YYYY-MM-DDThh:mm:ss.ddd', 'YYYY-MM-dd', + or 'dd/mm/yy' +day - calendar day (UTC) (1-31) +decimals - number of decimal places to be displayed +deltasize - increment for allocating more memory +dim1 - declared size of the first dimension of the image or cube array +dim2 - declared size of the second dimension of the data cube array +dispwidth - display width of a column = length of string that will be read +dtype - data type of the keyword ('C', 'L', 'I', 'F' or 'X') + C = character string + L = logical + I = integer + F = floating point number + X = complex, e.g., "(1.23, -4.56)" +err_msg - error message on the internal stack (80 chars max) +err_text - error message string corresponding to error number (30 chars max) +exact - TRUE (=1) if the strings match exactly; + FALSE (=0) if wildcards are used +exclist - array of pointers to keyword names to be excluded from search +exists - flag indicating whether the file or compressed file exists on disk +expr - boolean or arithmetic expression +extend - TRUE (=1) if FITS file may have extensions, else FALSE (=0) +extname - value of the EXTNAME keyword (null-terminated) +extspec - the extension or HDU specifier; a number or name, version, and type +extver - value of the EXTVER keyword = integer version number +filename - full name of the FITS file, including optional HDU and filtering specs +filetype - type of file (file://, ftp://, http://, etc.) +filter - the input file filtering specifier +firstchar- starting byte in the row (first byte of row = 1) +firstfailed - member HDU ID (if positive) or grouping table GRPIDn index + value (if negative) that failed grouping table verification. +firstelem- first element in a vector (ignored for ASCII tables) +firstrow - starting row number (first row of table = 1) +following- if TRUE, any HDUs following the current HDU will be copied +fpixel - coordinate of the first pixel to be read or written in the + FITS array. The array must be of length NAXIS and have values such + that fpixel[0] is in the range 1 to NAXIS1, fpixel[1] is in the + range 1 to NAXIS2, etc. +fptr - pointer to a 'fitsfile' structure describing the FITS file. +frac - factional part of the keyword value +gcount - number of groups in the primary array (usually = 1) +gfptr - fitsfile* pointer to a grouping table HDU. +group - GRPIDn/GRPLCn index value identifying a grouping table HDU, or + data group number (=0 for non-grouped data) +grouptype - Grouping table parameter that specifies the columns to be + created in a grouping table HDU. Allowed values are: GT_ID_ALL_URI, + GT_ID_REF, GT_ID_POS, GT_ID_ALL, GT_ID_REF_URI, and GT_ID_POS_URI. +grpname - value to use for the GRPNAME keyword value. +hdunum - sequence number of the HDU (Primary array = 1) +hduok - was the HDU verification successful (=1) or + not (= -1). Equals zero if the CHECKSUM keyword is not present. +hdusum - 32 bit 1's complement checksum for the entire CHDU +hdutype - HDU type: IMAGE_HDU (0), ASCII_TBL (1), BINARY_TBL (2), ANY_HDU (-1) +header - returned character string containing all the keyword records +headstart- starting address (in bytes) of the CHDU +heapsize - size of the binary table heap, in bytes +history - the HISTORY keyword comment string (70 char max, null-terminated) +hour - hour within day (UTC) (0 - 23) +inc - sampling interval for pixels in each FITS dimension +inclist - array of pointers to matching keyword names +incolnum - input column number; range = 1 to TFIELDS +infile - the input filename, including path if specified +infptr - pointer to a 'fitsfile' structure describing the input FITS file. +intval - integer part of the keyword value +iomode - file access mode: either READONLY (=0) or READWRITE (=1) +keyname - name of a keyword (8 char max, null-terminated) +keynum - position of keyword in header (1st keyword = 1) +keyroot - root string for the keyword name (5 char max, null-terminated) +keysexist- number of existing keyword records in the CHU +keytype - header record type: -1=delete; 0=append or replace; + 1=append; 2=this is the END keyword +longstr - arbitrarily long string keyword value (null-terminated) +lpixel - coordinate of the last pixel to be read or written in the + FITS array. The array must be of length NAXIS and have values such + that lpixel[0] is in the range 1 to NAXIS1, lpixel[1] is in the + range 1 to NAXIS2, etc. +match - TRUE (=1) if the 2 strings match, else FALSE (=0) +maxdim - maximum number of values to return +member - row number of a grouping table member HDU. +memptr - pointer to the a FITS file in memory +mem_realloc - pointer to a function for reallocating more memory +memsize - size of the memory block allocated for the FITS file +mfptr - fitsfile* pointer to a grouping table member HDU. +mgopt - grouping table merge option parameter. Allowed values are: + OPT_MRG_COPY, and OPT_MRG_MOV. +minute - minute within hour (UTC) (0 - 59) +month - calendar month (UTC) (1 - 12) +morekeys - space in the header for this many more keywords +n_good_rows - number of rows evaluating to TRUE +namelist - string containing a comma or space delimited list of names +naxes - size of each dimension in the FITS array +naxis - number of dimensions in the FITS array +naxis1 - length of the X/first axis of the FITS array +naxis2 - length of the Y/second axis of the FITS array +naxis3 - length of the Z/third axis of the FITS array +nbytes - number of bytes or characters to read or write +nchars - number of characters to read or write +nelements- number of data elements to read or write +newfptr - returned pointer to the reopened file +newveclen- new value for the column vector repeat parameter +nexc - number of names in the exclusion list (may = 0) +nfound - number of keywords found (highest keyword number) +nkeys - number of keywords in the sequence +ninc - number of names in the inclusion list +nmembers - Number of grouping table members (NAXIS2 value). +nmove - number of HDUs to move (+ or -), relative to current position +nocomments - if equal to TRUE, then no commentary keywords will be copied +noisebits- number of bits to ignore when compressing floating point images +nrows - number of rows in the table +nstart - first integer value +nullarray- set to TRUE (=1) if corresponding data element is undefined +nulval - numerical value to represent undefined pixels +nulstr - character string used to represent undefined values in ASCII table +numval - numerical data value, of the appropriate data type +offset - byte offset in the heap or data unit to the first element of the vector +openfptr - pointer to a currently open FITS file +overlap - number of bytes in the binary table heap pointed to by more than 1 + descriptor +outcolnum- output column number; range = 1 to TFIELDS + 1 +outfile - and optional output filename; the input file will be copied to this prior + to opening the file +outfptr - pointer to a 'fitsfile' structure describing the output FITS file. +pcount - value of the PCOUNT keyword = size of binary table heap +previous - if TRUE, any previous HDUs in the input file will be copied. +repeat - length of column vector (e.g. 12J); == 1 for ASCII table +rmopt - grouping table remove option parameter. Allowed values are: + OPT_RM_GPT, OPT_RM_ENTRY, OPT_RM_MBR, and OPT_RM_ALL. +rootname - root filename, minus any extension or filtering specifications +rot - celestial coordinate rotation angle (degrees) +rowlen - length of a table row, in characters or bytes +rowlist - sorted list of row numbers to be deleted from the table +rownum - number of the row (first row = 1) +rowrange - list of rows or row ranges: '3,6-8,12,56-80' or '500-' +row_status - array of True/False results for each row that was evaluated +scale - linear scaling factor; true value = (FITS value) * scale + zero +second - second within minute (0 - 60.9999999999) (leap second!) +section - section of image to be copied (e.g. 21:80,101:200) +simple - TRUE (=1) if FITS file conforms to the Standard, else FALSE (=0) +space - number of blank spaces to leave between ASCII table columns +status - returned error status code (0 = OK) +sum - 32 bit unsigned checksum value +tbcol - byte position in row to start of column (1st col has tbcol = 1) +tdisp - Fortran style display format for the table column +tdimstr - the value of the TDIMn keyword +templt - template string used in comparison (null-terminated) +tfields - number of fields (columns) in the table +tfopt - grouping table member transfer option parameter. Allowed values are: + OPT_MCP_ADD, and OPT_MCP_MOV. +tform - format of the column (null-terminated); allowed values are: + ASCII tables: Iw, Aw, Fww.dd, Eww.dd, or Dww.dd + Binary tables: rL, rX, rB, rI, rJ, rA, rAw, rE, rD, rC, rM + where 'w'=width of the field, 'd'=no. of decimals, 'r'=repeat count. + Variable length array columns are denoted by a '1P' before the data type + character (e.g., '1PJ'). When creating a binary table, 2 addition tform + data type codes are recognized by CFITSIO: 'rU' and 'rV' for unsigned + 16-bit and unsigned 32-bit integer, respectively. + +theap - zero indexed byte offset of starting address of the heap + relative to the beginning of the binary table data +tilesize - array of length NAXIS that specifies the dimensions of + the image compression tiles +ttype - label or name for table column (null-terminated) +tunit - physical unit for table column (null-terminated) +typechar - symbolic code of the table column data type +typecode - data type code of the table column. The negative of + the value indicates a variable length array column. + Datatype typecode Mnemonic + bit, X 1 TBIT + byte, B 11 TBYTE + logical, L 14 TLOGICAL + ASCII character, A 16 TSTRING + short integer, I 21 TSHORT + integer, J 41 TINT32BIT (same as TLONG) + long long integer, K 81 TLONGLONG + real, E 42 TFLOAT + double precision, D 82 TDOUBLE + complex, C 83 TCOMPLEX + double complex, M 163 TDBLCOMPLEX +unit - the physical unit string (e.g., 'km/s') for a keyword +unused - number of unused bytes in the binary table heap +urltype - the file type of the FITS file (file://, ftp://, mem://, etc.) +validheap- returned value = FALSE if any of the variable length array + address are outside the valid range of addresses in the heap +value - the keyword value string (70 char max, null-terminated) +version - current version number of the CFITSIO library +width - width of the character string field +xcol - number of the column containing the X coordinate values +xinc - X axis coordinate increment at reference pixel (deg) +xpix - X axis pixel location +xpos - X axis celestial coordinate (usually RA) (deg) +xrefpix - X axis reference pixel array location +xrefval - X axis coordinate value at the reference pixel (deg) +ycol - number of the column containing the X coordinate values +year - calendar year (e.g. 1999, 2000, etc) +yinc - Y axis coordinate increment at reference pixel (deg) +ypix - y axis pixel location +ypos - y axis celestial coordinate (usually DEC) (deg) +yrefpix - Y axis reference pixel array location +yrefval - Y axis coordinate value at the reference pixel (deg) +zero - scaling offset; true value = (FITS value) * scale + zero +\end{verbatim} + +\chapter{CFITSIO Error Status Codes } + +The following table lists all the error status codes used by CFITSIO. +Programmers are encouraged to use the symbolic mnemonics (defined in +the file fitsio.h) rather than the actual integer status values to +improve the readability of their code. + +\begin{verbatim} + Symbolic Const Value Meaning + -------------- ----- ----------------------------------------- + 0 OK, no error + SAME_FILE 101 input and output files are the same + TOO_MANY_FILES 103 tried to open too many FITS files at once + FILE_NOT_OPENED 104 could not open the named file + FILE_NOT_CREATED 105 could not create the named file + WRITE_ERROR 106 error writing to FITS file + END_OF_FILE 107 tried to move past end of file + READ_ERROR 108 error reading from FITS file + FILE_NOT_CLOSED 110 could not close the file + ARRAY_TOO_BIG 111 array dimensions exceed internal limit + READONLY_FILE 112 Cannot write to readonly file + MEMORY_ALLOCATION 113 Could not allocate memory + BAD_FILEPTR 114 invalid fitsfile pointer + NULL_INPUT_PTR 115 NULL input pointer to routine + SEEK_ERROR 116 error seeking position in file + + BAD_URL_PREFIX 121 invalid URL prefix on file name + TOO_MANY_DRIVERS 122 tried to register too many IO drivers + DRIVER_INIT_FAILED 123 driver initialization failed + NO_MATCHING_DRIVER 124 matching driver is not registered + URL_PARSE_ERROR 125 failed to parse input file URL + RANGE_PARSE_ERROR 126 parse error in range list + + SHARED_BADARG 151 bad argument in shared memory driver + SHARED_NULPTR 152 null pointer passed as an argument + SHARED_TABFULL 153 no more free shared memory handles + SHARED_NOTINIT 154 shared memory driver is not initialized + SHARED_IPCERR 155 IPC error returned by a system call + SHARED_NOMEM 156 no memory in shared memory driver + SHARED_AGAIN 157 resource deadlock would occur + SHARED_NOFILE 158 attempt to open/create lock file failed + SHARED_NORESIZE 159 shared memory block cannot be resized at the moment + + HEADER_NOT_EMPTY 201 header already contains keywords + KEY_NO_EXIST 202 keyword not found in header + KEY_OUT_BOUNDS 203 keyword record number is out of bounds + VALUE_UNDEFINED 204 keyword value field is blank + NO_QUOTE 205 string is missing the closing quote + BAD_INDEX_KEY 206 illegal indexed keyword name (e.g. 'TFORM1000') + BAD_KEYCHAR 207 illegal character in keyword name or card + BAD_ORDER 208 required keywords out of order + NOT_POS_INT 209 keyword value is not a positive integer + NO_END 210 couldn't find END keyword + BAD_BITPIX 211 illegal BITPIX keyword value + BAD_NAXIS 212 illegal NAXIS keyword value + BAD_NAXES 213 illegal NAXISn keyword value + BAD_PCOUNT 214 illegal PCOUNT keyword value + BAD_GCOUNT 215 illegal GCOUNT keyword value + BAD_TFIELDS 216 illegal TFIELDS keyword value + NEG_WIDTH 217 negative table row size + NEG_ROWS 218 negative number of rows in table + COL_NOT_FOUND 219 column with this name not found in table + BAD_SIMPLE 220 illegal value of SIMPLE keyword + NO_SIMPLE 221 Primary array doesn't start with SIMPLE + NO_BITPIX 222 Second keyword not BITPIX + NO_NAXIS 223 Third keyword not NAXIS + NO_NAXES 224 Couldn't find all the NAXISn keywords + NO_XTENSION 225 HDU doesn't start with XTENSION keyword + NOT_ATABLE 226 the CHDU is not an ASCII table extension + NOT_BTABLE 227 the CHDU is not a binary table extension + NO_PCOUNT 228 couldn't find PCOUNT keyword + NO_GCOUNT 229 couldn't find GCOUNT keyword + NO_TFIELDS 230 couldn't find TFIELDS keyword + NO_TBCOL 231 couldn't find TBCOLn keyword + NO_TFORM 232 couldn't find TFORMn keyword + NOT_IMAGE 233 the CHDU is not an IMAGE extension + BAD_TBCOL 234 TBCOLn keyword value < 0 or > rowlength + NOT_TABLE 235 the CHDU is not a table + COL_TOO_WIDE 236 column is too wide to fit in table + COL_NOT_UNIQUE 237 more than 1 column name matches template + BAD_ROW_WIDTH 241 sum of column widths not = NAXIS1 + UNKNOWN_EXT 251 unrecognizable FITS extension type + UNKNOWN_REC 252 unknown record; 1st keyword not SIMPLE or XTENSION + END_JUNK 253 END keyword is not blank + BAD_HEADER_FILL 254 Header fill area contains non-blank chars + BAD_DATA_FILL 255 Illegal data fill bytes (not zero or blank) + BAD_TFORM 261 illegal TFORM format code + BAD_TFORM_DTYPE 262 unrecognizable TFORM data type code + BAD_TDIM 263 illegal TDIMn keyword value + BAD_HEAP_PTR 264 invalid BINTABLE heap pointer is out of range + + BAD_HDU_NUM 301 HDU number < 1 + BAD_COL_NUM 302 column number < 1 or > tfields + NEG_FILE_POS 304 tried to move to negative byte location in file + NEG_BYTES 306 tried to read or write negative number of bytes + BAD_ROW_NUM 307 illegal starting row number in table + BAD_ELEM_NUM 308 illegal starting element number in vector + NOT_ASCII_COL 309 this is not an ASCII string column + NOT_LOGICAL_COL 310 this is not a logical data type column + BAD_ATABLE_FORMAT 311 ASCII table column has wrong format + BAD_BTABLE_FORMAT 312 Binary table column has wrong format + NO_NULL 314 null value has not been defined + NOT_VARI_LEN 317 this is not a variable length column + BAD_DIMEN 320 illegal number of dimensions in array + BAD_PIX_NUM 321 first pixel number greater than last pixel + ZERO_SCALE 322 illegal BSCALE or TSCALn keyword = 0 + NEG_AXIS 323 illegal axis length < 1 + + NOT_GROUP_TABLE 340 Grouping function error + HDU_ALREADY_MEMBER 341 + MEMBER_NOT_FOUND 342 + GROUP_NOT_FOUND 343 + BAD_GROUP_ID 344 + TOO_MANY_HDUS_TRACKED 345 + HDU_ALREADY_TRACKED 346 + BAD_OPTION 347 + IDENTICAL_POINTERS 348 + BAD_GROUP_ATTACH 349 + BAD_GROUP_DETACH 350 + + NGP_NO_MEMORY 360 malloc failed + NGP_READ_ERR 361 read error from file + NGP_NUL_PTR 362 null pointer passed as an argument. + Passing null pointer as a name of + template file raises this error + NGP_EMPTY_CURLINE 363 line read seems to be empty (used + internally) + NGP_UNREAD_QUEUE_FULL 364 cannot unread more then 1 line (or single + line twice) + NGP_INC_NESTING 365 too deep include file nesting (infinite + loop, template includes itself ?) + NGP_ERR_FOPEN 366 fopen() failed, cannot open template file + NGP_EOF 367 end of file encountered and not expected + NGP_BAD_ARG 368 bad arguments passed. Usually means + internal parser error. Should not happen + NGP_TOKEN_NOT_EXPECT 369 token not expected here + + BAD_I2C 401 bad int to formatted string conversion + BAD_F2C 402 bad float to formatted string conversion + BAD_INTKEY 403 can't interpret keyword value as integer + BAD_LOGICALKEY 404 can't interpret keyword value as logical + BAD_FLOATKEY 405 can't interpret keyword value as float + BAD_DOUBLEKEY 406 can't interpret keyword value as double + BAD_C2I 407 bad formatted string to int conversion + BAD_C2F 408 bad formatted string to float conversion + BAD_C2D 409 bad formatted string to double conversion + BAD_DATATYPE 410 illegal datatype code value + BAD_DECIM 411 bad number of decimal places specified + NUM_OVERFLOW 412 overflow during data type conversion + DATA_COMPRESSION_ERR 413 error compressing image + DATA_DECOMPRESSION_ERR 414 error uncompressing image + + BAD_DATE 420 error in date or time conversion + + PARSE_SYNTAX_ERR 431 syntax error in parser expression + PARSE_BAD_TYPE 432 expression did not evaluate to desired type + PARSE_LRG_VECTOR 433 vector result too large to return in array + PARSE_NO_OUTPUT 434 data parser failed not sent an out column + PARSE_BAD_COL 435 bad data encounter while parsing column + PARSE_BAD_OUTPUT 436 Output file not of proper type + + ANGLE_TOO_BIG 501 celestial angle too large for projection + BAD_WCS_VAL 502 bad celestial coordinate or pixel value + WCS_ERROR 503 error in celestial coordinate calculation + BAD_WCS_PROJ 504 unsupported type of celestial projection + NO_WCS_KEY 505 celestial coordinate keywords not found + APPROX_WCS_KEY 506 approximate wcs keyword values were returned +\end{verbatim} +\end{document} + diff --git a/software/cfitsio3040/cfitsio.toc b/software/cfitsio3040/cfitsio.toc new file mode 100644 index 000000000..1f2df362f --- /dev/null +++ b/software/cfitsio3040/cfitsio.toc @@ -0,0 +1,120 @@ +\contentsline {chapter}{\numberline {1}Introduction }{1} +\contentsline {section}{\numberline {1.1} A Brief Overview}{1} +\contentsline {section}{\numberline {1.2}Sources of FITS Software and Information}{1} +\contentsline {section}{\numberline {1.3}Acknowledgements}{2} +\contentsline {section}{\numberline {1.4}Legal Stuff}{4} +\contentsline {chapter}{\numberline {2} Creating the CFITSIO Library }{5} +\contentsline {section}{\numberline {2.1}Building the Library}{5} +\contentsline {subsection}{\numberline {2.1.1}Unix Systems}{5} +\contentsline {subsection}{\numberline {2.1.2}VMS}{7} +\contentsline {subsection}{\numberline {2.1.3}Windows PCs}{7} +\contentsline {subsection}{\numberline {2.1.4}Macintosh PCs}{7} +\contentsline {section}{\numberline {2.2}Testing the Library}{8} +\contentsline {section}{\numberline {2.3}Linking Programs with CFITSIO}{9} +\contentsline {section}{\numberline {2.4}Getting Started with CFITSIO}{9} +\contentsline {section}{\numberline {2.5}Example Program}{10} +\contentsline {chapter}{\numberline {3} A FITS Primer }{11} +\contentsline {chapter}{\numberline {4} Programming Guidelines }{13} +\contentsline {section}{\numberline {4.1}CFITSIO Definitions}{13} +\contentsline {section}{\numberline {4.2}Current Header Data Unit (CHDU)}{15} +\contentsline {section}{\numberline {4.3}Function Names and Variable Datatypes}{16} +\contentsline {section}{\numberline {4.4}Support for Unsigned Integers and Signed Bytes}{18} +\contentsline {section}{\numberline {4.5}Dealing with Character Strings}{20} +\contentsline {section}{\numberline {4.6}Implicit Data Type Conversion}{21} +\contentsline {section}{\numberline {4.7}Data Scaling}{21} +\contentsline {section}{\numberline {4.8}Support for IEEE Special Values}{22} +\contentsline {section}{\numberline {4.9}Error Status Values and the Error Message Stack}{22} +\contentsline {section}{\numberline {4.10}Variable-Length Arrays in Binary Tables}{23} +\contentsline {section}{\numberline {4.11}Multiple Access to the Same FITS File}{24} +\contentsline {section}{\numberline {4.12}When the Final Size of the FITS HDU is Unknown}{25} +\contentsline {section}{\numberline {4.13}CFITSIO Size Limitations}{25} +\contentsline {chapter}{\numberline {5}Basic CFITSIO Interface Routines }{27} +\contentsline {section}{\numberline {5.1}CFITSIO Error Status Routines}{27} +\contentsline {section}{\numberline {5.2}FITS File Access Routines}{28} +\contentsline {section}{\numberline {5.3}HDU Access Routines}{31} +\contentsline {section}{\numberline {5.4}Header Keyword Read/Write Routines}{33} +\contentsline {subsection}{\numberline {5.4.1}Keyword Reading Routines}{33} +\contentsline {subsection}{\numberline {5.4.2}Keyword Writing Routines}{35} +\contentsline {section}{\numberline {5.5}Primary Array or IMAGE Extension I/O Routines}{37} +\contentsline {section}{\numberline {5.6}Image Compression}{41} +\contentsline {section}{\numberline {5.7}ASCII and Binary Table Routines}{46} +\contentsline {subsection}{\numberline {5.7.1}Create New Table}{46} +\contentsline {subsection}{\numberline {5.7.2}Column Information Routines}{46} +\contentsline {subsection}{\numberline {5.7.3}Routines to Edit Rows or Columns}{49} +\contentsline {subsection}{\numberline {5.7.4}Read and Write Column Data Routines}{51} +\contentsline {subsection}{\numberline {5.7.5}Row Selection and Calculator Routines}{53} +\contentsline {section}{\numberline {5.8}Utility Routines}{54} +\contentsline {subsection}{\numberline {5.8.1}File Checksum Routines}{54} +\contentsline {subsection}{\numberline {5.8.2}Date and Time Utility Routines}{56} +\contentsline {subsection}{\numberline {5.8.3}General Utility Routines}{57} +\contentsline {chapter}{\numberline {6} The CFITSIO Iterator Function }{67} +\contentsline {section}{\numberline {6.1}The Iterator Work Function}{68} +\contentsline {section}{\numberline {6.2}The Iterator Driver Function}{70} +\contentsline {section}{\numberline {6.3}Guidelines for Using the Iterator Function}{71} +\contentsline {section}{\numberline {6.4}Complete List of Iterator Routines}{72} +\contentsline {chapter}{\numberline {7} World Coordinate System Routines }{75} +\contentsline {section}{\numberline {7.1} Self-contained WCS Routines}{76} +\contentsline {chapter}{\numberline {8} Hierarchical Grouping Routines }{79} +\contentsline {section}{\numberline {8.1}Grouping Table Routines}{80} +\contentsline {section}{\numberline {8.2}Group Member Routines}{82} +\contentsline {chapter}{\numberline {9} Specialized CFITSIO Interface Routines }{85} +\contentsline {section}{\numberline {9.1}FITS File Access Routines}{85} +\contentsline {section}{\numberline {9.2}HDU Access Routines}{88} +\contentsline {section}{\numberline {9.3}Specialized Header Keyword Routines}{91} +\contentsline {subsection}{\numberline {9.3.1}Header Information Routines}{91} +\contentsline {subsection}{\numberline {9.3.2}Read and Write the Required Keywords}{91} +\contentsline {subsection}{\numberline {9.3.3}Write Keyword Routines}{93} +\contentsline {subsection}{\numberline {9.3.4}Insert Keyword Routines}{95} +\contentsline {subsection}{\numberline {9.3.5}Read Keyword Routines}{96} +\contentsline {subsection}{\numberline {9.3.6}Modify Keyword Routines}{98} +\contentsline {subsection}{\numberline {9.3.7}Update Keyword Routines}{99} +\contentsline {section}{\numberline {9.4}Define Data Scaling and Undefined Pixel Parameters}{99} +\contentsline {section}{\numberline {9.5}Specialized FITS Primary Array or IMAGE Extension I/O Routines}{100} +\contentsline {section}{\numberline {9.6}Specialized FITS ASCII and Binary Table Routines}{104} +\contentsline {subsection}{\numberline {9.6.1}General Column Routines}{104} +\contentsline {subsection}{\numberline {9.6.2}Low-Level Table Access Routines}{105} +\contentsline {subsection}{\numberline {9.6.3}Write Column Data Routines}{106} +\contentsline {subsection}{\numberline {9.6.4}Read Column Data Routines}{107} +\contentsline {chapter}{\numberline {10} Extended File Name Syntax }{111} +\contentsline {section}{\numberline {10.1}Overview}{111} +\contentsline {section}{\numberline {10.2}Filetype}{114} +\contentsline {subsection}{\numberline {10.2.1}Notes about HTTP proxy servers}{114} +\contentsline {subsection}{\numberline {10.2.2}Notes about the gsiftp filetype}{115} +\contentsline {subsection}{\numberline {10.2.3}Notes about the root filetype}{115} +\contentsline {subsection}{\numberline {10.2.4}Notes about the shmem filetype:}{117} +\contentsline {section}{\numberline {10.3}Base Filename}{117} +\contentsline {section}{\numberline {10.4}Output File Name when Opening an Existing File}{119} +\contentsline {section}{\numberline {10.5}Template File Name when Creating a New File}{121} +\contentsline {section}{\numberline {10.6}Image Tile-Compression Specification}{121} +\contentsline {section}{\numberline {10.7}HDU Location Specification}{121} +\contentsline {section}{\numberline {10.8}Image Section}{122} +\contentsline {section}{\numberline {10.9}Image Transform Filters}{123} +\contentsline {section}{\numberline {10.10}Column and Keyword Filtering Specification}{125} +\contentsline {section}{\numberline {10.11}Row Filtering Specification}{127} +\contentsline {subsection}{\numberline {10.11.1}General Syntax}{127} +\contentsline {subsection}{\numberline {10.11.2}Bit Masks}{130} +\contentsline {subsection}{\numberline {10.11.3}Vector Columns}{131} +\contentsline {subsection}{\numberline {10.11.4}Good Time Interval Filtering}{132} +\contentsline {subsection}{\numberline {10.11.5}Spatial Region Filtering}{133} +\contentsline {subsection}{\numberline {10.11.6}Example Row Filters}{135} +\contentsline {section}{\numberline {10.12} Binning or Histogramming Specification}{136} +\contentsline {chapter}{\numberline {11}Template Files }{141} +\contentsline {section}{\numberline {11.1}Detailed Template Line Format}{141} +\contentsline {section}{\numberline {11.2}Auto-indexing of Keywords}{142} +\contentsline {section}{\numberline {11.3}Template Parser Directives}{143} +\contentsline {section}{\numberline {11.4}Formal Template Syntax}{143} +\contentsline {section}{\numberline {11.5}Errors}{144} +\contentsline {section}{\numberline {11.6}Examples}{144} +\contentsline {chapter}{\numberline {12} Local FITS Conventions }{147} +\contentsline {section}{\numberline {12.1}64-Bit Long Integers}{147} +\contentsline {section}{\numberline {12.2}Long String Keyword Values.}{147} +\contentsline {section}{\numberline {12.3}Arrays of Fixed-Length Strings in Binary Tables}{149} +\contentsline {section}{\numberline {12.4}Keyword Units Strings}{149} +\contentsline {section}{\numberline {12.5}HIERARCH Convention for Extended Keyword Names}{150} +\contentsline {section}{\numberline {12.6}Tile-Compressed Image Format}{150} +\contentsline {chapter}{\numberline {13} Optimizing Programs }{153} +\contentsline {section}{\numberline {13.1}How CFITSIO Manages Data I/O}{153} +\contentsline {section}{\numberline {13.2}Optimization Strategies}{154} +\contentsline {chapter}{\numberline {A}Index of Routines }{157} +\contentsline {chapter}{\numberline {B}Parameter Definitions }{161} +\contentsline {chapter}{\numberline {C}CFITSIO Error Status Codes }{167} diff --git a/software/cfitsio3040/cfitsio_mac.sit.hqx b/software/cfitsio3040/cfitsio_mac.sit.hqx new file mode 100644 index 000000000..0a3dbdfb3 --- /dev/null +++ b/software/cfitsio3040/cfitsio_mac.sit.hqx @@ -0,0 +1 @@ +(This file must be converted with BinHex 4.0) :$f0QDA4cD@pIE@&M,R0TG!"6594%8dP8)3#3"%11!*!%4HY6593K!!%!!%11FNa KG3*6!*!$&ZlZ)#!,BfCTG(0TEepYB@-!N"AR#BB"&J!9!U)"eJ#3!`-!N!q'!!! $([q3"!2JYCR`K,@Cp[N!N!8"mK%!N!C$#2r`rrJ!!-0!!!"0Y`!0$N0'DA4cD@p 38%-ZE@0`!*!4Da3*KJ#3$aB!!$i$!*!$&[q3"%e08(*$9dP&!3#[H%fHYCRfmJ# 3"3(U0!#3"Md0!!"9XJ#3"[8H"[LUJEpCRC+&h2,Qp5XR2!PhHq4S2H%,ApKQqmJ LNkpp8AlddNfr[1A)MP#1Tai![I"-haEmadlZiRN5eLh2&pPQYb@hMpc#pMQahU[ MjF@A)`YEb',mbF)EN!#&l)[`r)9RmFZHm#-lbAEK#qr)l6MKLpjbR($&#Ur-Vr0 fK0r#Ma`RA-)l22Q&,13AFTY-&L1cK5jN"9K($6SEG(C1mZ4R0R4JEhDp%a[NjC! $GhCHIV6,b@DM((4ffHR#LbqH!ph[phRj4[C&&ShX)r[YiRdmbHkebmMq[(KN$cV cFa#2l)[X86b,,-plB#b!Vl2VCAikk,fqbH,(bq[*l53meJ,!&[`"jhIkI5f1'd% 3,!Q#dUUJp-!lJY+$p5"BH5ma(bKeP6LDVcDZZdeKNN4a8UiQm9CAbqCLA5QIqP[ XPi0Jl8H#i"hHrpUqXi,J3lqkj2T6Yh"H2r[XNdTd(rB03A$L`5"Bk[dc2RMIZPh "b@rE'34[ackdki2h"FF(`H@c#NqI)P4GS[!F,Pp*9ei&5TqF6!e5'Z+9D"fM`h3 SKb"@J#a`!MD',FIf`[E'9Q$lB2YLqf(lBdr#RS`GJ$d&1a!l&(XDGKKf1,B5HcV f$1`)l*RBNGLcX'GMcm'HKld!Hb&f0$D-(B3GV&F8@iSYXeH9XJm!'S'I``l"RSX p(cX+1aCEK4f((@pf`QYP)SqYmP[j5"8[%qfa(pAKIHX%hY3A6jljZ2T8+l$Y9P+ 9ZSABJ5Ud2KH'fm*+)da6PhC[$C1M&eJq8#d2EIU0kPcTFK1[N!#9EL'@!Z3P+,c -9icR6L[c8`j9I`iR[I25%D#SDkA4H$YaNp&-Gc1XG32c$IHfjC@#kiCLM)K%k9U d0C!!+Y"B$PJ09iKRp+T'ImNm&#%J!p"afpL5RV[@,,R`mrF[ZH#ElqrD[qq5V[h AhHR6KErIYIm6PcaA6"*I""A*,da(Ij9Gqfr-+elX!'`CYKcE#pX2#j!!mKDmMrF f[!P[`aGVCh(5hqLkFX8[lETZ[FY'fki@68BZ'4rrPF(qU1%Ur52RpBmU,(M&e-r [ZMjp9qrk4M`40Y,amE22fMMRMCjalUk29a)ACUirLCZM'DkYiq-#6)e-2)$BNji $[H19,-l5)CG-ZI*`jkGdGbVIp'Te-(q&F1rJqXfekDJZ"VeXY&TjXIkPJR"+B'p X,f`j0LE!&GXAfcq[XZ"cN!$HrL9`cYkY)A1@E%VP'l5+hlRcbk0[mTDf2KX`YaX e[DrL-$5@ED`1G2ZkcR%$Fa@`J+rA8&Ll`)9ePk4(B5"I%%P5e4$j5bD8ZL99"C' %"%)')C`36FJTK2"&@%JPj,)HqlYBb1JU,136iJN"K@"#6L'VI1!b4*@kJP$@BGG L4Gh4a",#Z4rl8L`BHMX@BVS-#r0EJEd4Za,lHpJef*Z`P0R0f&Z`eGL*@0jl&aD -K&[`XMABGGK*f-RBLl$)*TGJT`JBa8l$6XI1`0CLRiqGLGf"[3%,JGq$I3N@rVF HHkYa$AMM[GJAB+r&3Z`KlK"pb2NXib@3!(k)1%)!K2[P15X)"&GM)IQ)!4"pq!T #!&`#-@!$&R5![%2Qlm4HJpf%I4lfaGM0@05cV9J)r6EXE1`Fl+ABZGKjf-Z`ml% ,X*GM&f,"JLZ`,m3ZaYiPU$4)UGRfhGJP@0',!Vq$[4Ul&,YDF#,f+Zc[B+r%hS0 YCr+j6bUTE-2`KTkK[Zkqc5UCjSmUeDA%`6[rejF4)l,TiR`brVA3*Hm,%a+b-,* 3m2Vmm)Grm!5eR`CPMk%khMkK4`-Vr9'@4R'j@Uf8aebD5H$HN!#%3R@q1)AA(!- ,*PeY!S[6i&1kHG`*(+DSEhGqHe)rN3YqQb2j1!RK3Fcr%)dV5eHAPR@*'(UI%,* )f"hrVb$680&UjfB4V1HqC*df[aL&i!5iCF2hhkV$Xr!4rp,Nc`R6Uq!!q&D2TeQ B,2,38L0LY!''CqYC[k2Ei6&eaif6jJX[#J$6`Cm+2mfIND*raNQlmN!cYD6qDhR iehPEAiE`T##&'[YlPQU9DGfVFiN+aG3d"p9Cr"U,Il(jejT5GAfZ@k+UQ[MRfAQ c2FC,l,`Pec"4*3dBEV-mfqdq1r+cj1VIXf&dS&`T9q*@'MGFZEpRl,pCY8HMYE" hS,I"43%j5H+E+PXTX"5C[L@5"*hjT*ck(p+-T'pPA6eAME"lC``ZA"'DN9&,k4l 3V35k$q"r4B!'5-[V2ffqh+G,[2'9A[C+-mQ4Hce6diRfMY3c"p(TcH-lB&51Ndq [$2IfR9iq[EGRV)IMSS(+Q"TA(#UI-kB[e`fL%R@hP1SR6VjaNXdRhjpH,Bp,dX- 85VFXPH*+Ve+iDrm(e&0&Ve"NH8pG[9G[aNDV88Xp2hqKFUUVaZSTqNGXbG"!4Xq 8bTZ'GimiHUU8),CXb,ASJe,U*bV2S1[LSrHS&biT)+AqS0jakVLrZJPI4G4Sb2F KI(e'Ym6dEDP[iqYl396Ar5"4rBELEIL#kKRV6eqQj!ZUEqNNA2)f3I8iREc$9HK &#UVhD8!MdYX%2iA[&-[h-AbRCT8ahLri(A`$XmE&p*Q&T$F-LPS9hLDN(V6"PDa ",eG)Z[q3!%E()H'(e&meY,&XP$Z&e&pfQ[Lcq2i3hl$H*#3qp(Pm`mH5N!#qYG" Am9@Z)&"m2m3RI@k)kQ(eJCh4UMYU+kbqY4'4VK%i6Ve5CrSqeV#8FGk"12VGk!r $pa!(5f(#AqC!2adqDY(fiN@NcG"I4`Pc2VpVrar!jb2U@EXJ1+&1r868mdCr(MR S4k1h$YmIF"MYm5$bjrM'H$b)2)"[V-H$b02iUM`H409R0XlM395pGH-p(N69qcA "id&8Me[Ym5#UrVf*(JqLYq#VmAJ3r5+q54i2SUV,b4i2BY+4,[*i%"0ZAHca)#E "i"+2"c(edNhap4h6@dleH"$6@dlcH"#l(Crdl9&rXDrMQf(jrN8BD2#J4$ed-cd HP+JAF*E(Ja,9j@b2"bAUmC[MmD"%IAQAHM`S89h1pAK3mL9mmc`HP$b+lc+2"k8 5$HCl2#K92b5pGG,69kSq3hVXj+e,e50*Vaep[26@JFY5ck9-Cp#pGb+2P0l"'5b @[X(5KcR6FbFpJDA2F1DY"&r+K$(df8Q2AjNN#RV[D)AQE[4,#T%S8lI3e4Hj5kR 4-Y@Pp!U'`BNbeHAbJ@DEZLN6hUqSELU$ifArJ1rDLi,cHEpb[HA+4PY[@*lhGPD [8FYJZIM%kNEj21URA2fAer@A"lKRZCT**#re9hiG[M8HrmVr'YpDMhrPUX[Vam+ %ZLNAaXM!MNTk+hZT6h$pU-Y)dNYeZD'-8hc8aNBh'X*EHUQ2%8iL$6Qpe)F)&i" Z[)8$[!2I"cR3qiM[#3kf@kUh-'EEijG)[ZNYE"A9X6Fb@1qmVr06Tk9I`3FhZQ& UEINqI25GlR`m&i&k#f0f5C38hr[`lHETjEkpralI(QT,F+Zh4QcFL'STp95KZVa THQd2H&#KZYbl*48Z93J,ETDL+6lHlKDAPDRV#YAPmrhp+X4ME[AhUp#dNaHdfa( [A[(2q&iS495S%lfKYjhILAMR2Z*aq`+5L`pFS2F5HJ@hi!haJ@(dkq*l0`GkGI( "AH"Sq,l,!Ei$(D-h&@k)MjjFqPcaJ5P`,RcdfG)ELZr9(+K(I1!@ICriU(AH&Kr FL$jKB)aq9[J12VJ42Dri`$,H#Kq#*Afdq(kI!p0,m,fI`rhQq`+(9jM[D3k[p,l qkUGpPIRJ%16(4mm`Ei@2IPfCQ+*pVqG!MH0$#RfYq6l2!4c$pkmFb!-9T5rh!I2 "Ym"Y69(PS&[6a8H0[G&m$h*iNrR!@VJN[Up`J"FE1!m%0jZ2AQ[i1$kDcmL2Mcj TX!iIp3b'ib2[@mhh%3j[-aqm"$b"*S0rEcFII2%GjU-Iq*hQJr[#FI"4jqmb(hF $0r"pQ!1F%4riqV$hR5)qqKlc`6RIDcl`'mc%4rr`RjL2HRl%I0bCZXEhF3l`1(` #[`(K#45(RZX2Q)qHG$J&2[UBVAapUM$ecmd(VX%&m&&,F(Cme"rk!ckd"pj6[S' 5T)R&"pHKM["4hr"@I1!([!mI[%dQlfJIZ)$QJ)qhi`haJAr`GhcJabHmEj!!qVi rD6l`$jc("liqEMjkh)@(D"pi*ra%qkM$6jX2[Jk'ii0,`8IN'b`"L9Kmp,6rMIR SdIjEmr&qi"Xqm)Lh`NHGJ+[ii)*Ip,iK`Sm[Q3m0!Nk+$rjNCh)-%Ik"DILS[kq D$hcL,[LS5HS1hcFiJ#(b$C@fK#D!$r`!Zr$4RdiHI25pIp0mF",d%(aJ)PL"MjV mP[QHj2"YlcY0'XChc%G0`hI``5HrCcii#6`,(aJRlGRDalYc&rQ'5926ij6%"ip mbRa`EMJ12ZB4r,2ji#(8*Mk`$#d#(l8"*XJhA'm2VmG(EF&Pm-(RIQ3qCK[)j#E YJdZBKS2!,i06RZ3hR$VaY-&+HR)BCD0pdVR!U!cY%rk[V(HP%TkZE,j&*4LJV21 m%La6[PFR8+BfY1iRhqQ3!"5PZ32iC,k#XZ&"Ti-V5[L-6rLRm[e$J90d*p-E&$K &8kUBJB#21m%aj6Z$'+8q&(`bld'*fq)6,UM8RB42hPjTlJ3qiA)U*d[L%kaAiT, i"&18Y"hj4R"rTEN(q%6c8MD$B!6m@`N(m%R6K4)1ia0m9H+-q)5V+"0J4i#$5V- Em%QY+XePN!$[61+91#!qi@G+I!fID"h+jPbF#6iTm3Km`Tq8G#eme"ED*Ml"%@A khdMH9jRq0e,eD[@rNHKH-J(0q!5cPI!"Rf#U-[e[*&a#L42K%ka4QVdKheR5)Uh qGaEDJM,plbcTY,U[4Ac#GC8d"(c#Se6HkL)q`@@Pq4[bRDekdYd[iT2l+'N#q%5 I8MB)kQc9+0SJ2Z($5[-hm)&2k$Ri")Z9jQl)G`ieVc4r!jr-he$5ar#*0UE`Dap B`P`1I033A!DIm#*Pc86RJ*8UEp!@D96U5QPZ"ci4UT4`(KmD0CS92Z(j5T`&Rr! pC6hIjm)IP'CNb(FH'+5N1H160e,Lb2L%IfZY'jr`HbAZL8riZC)`KSpDK,2J%`k JT2R)GciiSU6riC2l+r%&I05LkB31R)NHSD6ri411UU6ri42HSU6rbAH"-"KHJ%p U3%Nc`3IfS2rK%ae(L8[L%be!5DI&*aa5D9B)2[#-H4hbA3Jf+Fe9`3G1S,AL%`e 'LI2L%ae%5EI%*aa4L8[L!hIYh+C4F!1PH5li`(+d3Aab0bAY!Kpe3lm"2Y%[P$J M2Z'd5[UEI+-e$3JY!TpJNl*T1+1&$I!eI+*Y+G2r4ZXH9[mE$3G@T[q0d6fXrMG '2!$p%"mD-9S%2UN6C3eBBlL2N[D,$fjN1pI(L"m`4`DID!R+QN2'S%FScB("ar[ "fI%*MeALJ2L%[bPV[KX,$e(LFIJ%aj8d0(b#IFSDmmH#"8VD&$jk)Y#kmFPE+-e N`5HkQa*ra`GqfbEqX@J$b[5rX@J0b[5rXA"eCIVI@''`eIr'`L&eMiCm9A!YCIT I&Ca%QIjA*IbcqPq9"K0BrDq+qP5Qre@T&Uhq9i@ZSdcrUd,E8UEr9D'c+02rUX4 6VIih6K1BV2ih$JkM62mETlYDr@mFpDa-raY(,QAkhcLpYpAraSN6@2e[($aFQIi h(XkQ62mE,jjKpEra`L5VrifRaT6TIq24pC6TIq24UT6TIq24!*6TIq09deErQb# 1CI@r#F*1Urp08(eBr@q#kX2UIa1)9kEr64"rYIVI"(36CITIYDCH@[f['JkT62q VKQmSdrqUK3G@rkY@69MpVaTG6jRq9bd-X2TIY6LheImQ`Vf9kAm6iA[+p,q*F!p PqYp%m@1Vrde869[pEb*kRc,pEk,iK0Ar*UVQV2jA)kjMpEmDiBI9rfVJ)FVd[aV a4D[reBMh@2f[4M9YpEmD0#aPqPm01SXbr@q5F06UIj2%JDcq0dPFfHTrNm"LCIV I*1'heImQkAj@rjXNc,$khb6d(@Akhf6a2k[r6BDl+Y2r*N[RX2VIC$#DbCY1Q3r PUGI)m,#a8r0&eSpX0(SE@2U'3ph*@k+**%a%KDVl"`Elb$c1cZ2Y2-(1ARb0R6I Cq@)lAf,R+ADHDZGTGTjZjaPfVVAc6$[2X[0X1mqamk9fRQ[RHADqc-lclEc!cTI EHD'G&pQjbXjAf(Q*RCIDq8SlAfARCADqfXlAf(QjR9IBq9SlVl6c+MZ[Y[0eGUk cmaSlVlAcHMY[X20'R4QRD2eEl,c9cY[X[(fKRS1[ca[ejqI&[%PGB)%ZZdBr1rG I5+G1BX"G+P[)XT6EZCHGbaDbPLe9`a@6MlL#66"J)8(jm[PHGbm&F`R9mMIP+G6 199HAPTr8cMVT@ppq8Y6+bT16mQpH03NBV@I5Bq8CNqdX16B3XA9FTSpccS'T%Dd 6a6TlfeeId-ZiA,F#p%CIKPll'2SfFYB3,HI`iJ#3!-`NXe%!81m40qN5ekU4Bcd c8mf`B!e[$H-fRA!IC'YVU"C)YdX4Y03&l6V*83$Z@a"ea3aSG0B-SN-(%cXH1`& EMDh"EX*HM,d%1`A,hJ(6X01a-l#ef*PBV@1*RB1p&$XA1`pl'ABqGJ(fFZa#l#* X&IB+l",X8Zb9f+Z`bl"ABkr",XHZ`&k,ABPGK9f0[3jEKef$ABYGMpf!hBMG)U! AZ`flAB43E"!E`SDa6F``*bPZAcaQVT!!#f(B[NrMM8l@TEAGAJP@lE`m1'lANU" mmEU6ejkQMR$h,Iph+Fb86idDE*i)l`JB3"QDfphM1@``eKN`"GY&mECQP3(DCC& 5D)qPlCDf@YTMDBZP(CD''0TZDBHPcC!!pN,D#QQ*T4@@&PKDAfPjTG@9&PGD@fP TTC@9'U$eN!#@3eS0D6'N$C2f5pSZDEHNMC-f6GSYDE1N[C)f6pSiDDpNE!MM3KJ 63SXPVC@d90*+53XPVC1d60)U5BXNVC'dJc*+K"%LM!jKC!JYXE6#dJ*,kbXYYE6 -d[T+bbZYVV6FdP*,UbXYN!#d2Y,b5,XVEDkdYp,@5MXVEDbdVp+f5VXUEDUdjY) @56XNEC!!M$pTfN(&@aQ#m3@-,@"F!@-6')[!Z!*[0aA'%M#1J$%%6EZQ-&l!@qH "-3+-9fKDhB(fFpV1D6HRcCcfGGV6D61R[CbfFYVED9rheQI`eQ9)VXS!2D)Yh&[ c)ENq"'h`Y(V6iZfY'q'Y%m+S$'3e2BP8V,GALaf*%Grki0Lq,ibZB'3&SbVS&'0 -"H-T["eJ[,8N''-!@$-@JE%(b48I'*X!BKpDpB%a!i`AS(Z-F3+-%8#@C)3!S`- B'F#S!-E)b2JBhHl2k"K'aL!m-'U'N6'-LQ&8#Qh"Y-VbCV6MmfkdS20fM)TK4)b -2p(M0'3X$+-dp!J0aX)`GS*DCK3-)f!BrF,)&aReSXF2b,JE4Q``@S14'S`BB*` 'Bc4S#kFGR$C`fVpTqkEPR*CbfVjTpkE0QjCd@XYT+DIeR(C[fVaTlkDYQhCZfVK ThkCYQhCY@YTT@DGGQcCYfV0TbkBGQcCXfU0TLkBGQMCSfTpT[DDeQ[CRfTjTGkB eQaCV@UYT`DEYQACRfTaTEkDYQACQfTKTAkCYQGCZ@VGT@kCGQ6CPfT0T5kBGQI% XM'9K(!)M@4M&`SJA4VJ`LS84,)aHB33-ia-BmD&l4aM43#XiidBBad(E-f-!"(F CYm*S$dCk-'k&-5Z-@'$%#U09'+R#+"9'U$#HJ6%bM2aJe!FM2KM"`(J2aRS`KS2 a'icGB0`')cdBfF'i$FCX-&k$N4q-lQ#X"b-f'+h"5!e'D6"#Jp%CM-aJ9!BM-KL 0`8J-4Q%`!S24&ibmB03&Bd)BFm&i#mCD--j#Ml&Jc)q-pp%M*aMY`dJI4J8a#SL 42ScbBB32Sd!BT`'2BI3'A)C4([!B4[N``SIa'A!D'G[$'"BpIS@a2B`'J'm`USI a#Y!#16#+4ir!B2b#m"l'XM#1K6%AM',4)eJB9F#S%PVA'Bh*q!hDj)@6-)U#F4' -L@!m"+-X'%R"+!T'9M!QJ[%3M)@JCB!a%)arB1`$iaiBmm!S$%CG-1D"m3k-G@# F!f-F[2%0MS)2rM2k16(CU!5M$ZalURYfpJNEUH*SqmBHf[c'ai8a"rBp!lkHEL0 b('hI1*(94Pbiim#q*lma1hZhM8&cXRdZXadr4,pU@[Y"cm$pfHF%DFjdKFb`pkU MH5Upr4`8A5*Lk$Uid6E,1l"-95+9lNcSbD1l&hVbk!k(RMad39aEj+&,BQq4Kmk *L88H1JPULMad)H`UmS#TZiXmG#rX+I,3q6#Tb%2Aa13L$jd9&a9jk,kiZ-K$KmB P44kk0kB8HHM`Q&VNS3YN@T%(pA9kNBFZNKP&(MT0DSXmG+2-,2,3XA*VNBHZPPP &(P6&'iSmG-IX,2,33I1#)JmG0V1,2(6Kc#Rbd+PcDC'(ETkj44kkIHB9HHJ)ZUc )3pI3r#)2R88,LMadF&eHj+(lDf'4Kik3!%9&(VU1VLMbd('fZ-K$pp4Y44kkS*B 8HHKkfeINSIYNDC'(lT8VLcaddYeHj+(ElUSL$aej0aGjk0DlXmK$4ppG44kkrZi ZmY!CH-qL!Zpp1)m$k(2,,8VMVYR"bUf`E&rk5br5U1BQAcTK2PdCMSIkG-p8)c- bjAMD2(-r@##5KrlrB88HCJ--,r)`,f$S5hRL%'TA(kdXmM"[B0P,#N3b$l-)4QR 2S)C)rGPamcS2X`Xb(45qdkcjSdUeC*C2I2eV58KIXPRcCmI5+Mh3CXfIG41G+4C b[90jDUXa2G"QcCrYH@Z,@I1RVUd9AS,IiES$rAh-QMm,`MCeDYEmf65c$(ABV2Q M5P&UpaiDCXY4qmfD2lZA9EAbMelcCdCBQfDjd-H8Cee@4CN+D6C"T4YC6aG"Q+H 1VrNcJRZIiHm6*PE2Zj!![[Z`9$lQBB$'c"SC5CjbZcGpj9,cBFhaJ)",$hjBXaA S,qpI+KhhY1@4qSbSpTLE)HH)HX6T-jHHqmJ'lR1"ca04Qa4c0)3$4$5MK(NDV!M %h)l4j)RCIHbD$a(09V"V2N4jUm!j0,a('5GjTZ8KMQi%ZqC$9!SMA5Tb[qK[Fjp URbHUf5,-jC!![[@SjT6B04qLQJNa5H9[lc0jZU3kL!QrQ0NKq@*kViZe"T(N'6C rlfEFNf92jAh#c,[XUcc"rGH[mrH4&GGNKGLeE[N'YhepVpX@eIapYZIe,HjebeN Kad5Z@miU30C9ASNEF9)UYHV+)b[Ul$dRMbJID'ec#@X,LDpda)80bl-Z8jkkLBC EXE&GCmhA4G'-d'9"11d'aK4AbXT%UK6QH(Cp[4)hfkrMjV@0b,@bJGi961rDcCS lXeTCFZQ+8LPeqEh&bIX3*50jBqrUl8X5(N&#PV'5d2C5+9QQ2(YQF1[Vl-iI41T K%I8!CkJ-6JM[,j@@hZTakR+Rp`rZrkMLi5M%rq@K(LQTXbYmrEbalHXRF+IU4ee @ZTcYa9E6ec4HGj-mebQ2HNrT[F69-4,[qHCESac1JPY&JL9[U'JJYpPhNLR"68K !2ekU*mqK32Y5YrCiYEF%U01"(lX%aMBjLp4R*pNh`(30PeNVqUmqGdeMJ92P@c! kd,GbS*@jT-95Al0QfNK(khkiq@VR0pIjY+2FM'e&iecl[[c1GCd,"mD#ffkfMC) 8qiia14*5-KdCH0SC+frl@([P,BpFP8rm(FSSViUK[JdE%D*Z'4dE1CAckk[9@0, C"dHLZPUX2a%kl@SAH)KiE[AerSCfPJXm-6DN84Q"JpSQ9'jBK[Dj#ch[&,@&LAp 8lm!Bm@TYlq#`KV60MQSCpe)M[8QX)@+VMP[B86XFjF-0p8j!iDhj!%1plia#STD MhRp+aTd0+G[H4M,q6-4ZZbr22Se8X$[8l-[($EJS0[6dR@N*mTQ&,ZeH9@khca( )&Fh1,rU-*iM1(j,2lY6PJ2X!"6TZG2q(E"AUT-1&a'E9UmHM9T4&B52Dm6pXmMR GI[8iC(KVe++jcK&4)rqjDh-kU20,l1cUU&J&S'Y,NL-pCA4+Z`+kd`k[e@4fDY9 ITCT'6b33P,D5rpVVblAb49JC)0Qc[@[,$lZfDCD3!,"d,lF$i6[3TY'FiaGhFXj -3XQ0Gfhph#C5KrYfp4Uhh"3qedCcjh-AFYaqhLL9%`q%m4Q2IYS@bTEa'BrqK4E I&CmGRr(S*br4q)bcY1f$Zf4m4T!!@BP#V3bj!PPGCT!!Gq6EQ'AYYDYAEf9)bDL ddqUZaFh9l55ZGfTCZRTVIAVefGeRVkl(YA4ef)jX-A$(b'IQ*0#r`jb%dNAZjL3 X'"eF'fahbA4D(Xh#9Me-kVBjlFf+VD`Q$[cF`Gl!ejF[F'(G*BZ83BQ2#c'2#h@ eiG(bD+IGC[bdbidpq,J3@V4ZVNU*HP30AC!!YQJKMpZQIk*PZd!rIc#!hJ0EG*2 Y8dQSV9aF+Cp66Q28RiZLlr8DKK8Xakl!ASYGL9f&ABfp$PZ(AB0GLef2hB$GL0f #hBVGKQ8VRZkEHTY!R)JJp2SpXXefX*0H[dFZCqX5[pI[NI6HP6Gmqm'hD'GDPhU [RkYQ9T[$p3X1Imhf(T*pJ4CqDpeKIK!F[PGl8l[-2KI[,#Dhh+5q30IVmj9XcI3 $@9+,N!$C!i0p$0,SBqHqkdFfDP012R856DqTE#(,8QlRAREZ[C!!Y@bTfJ2T$Z3 +*'!e06p"qI,4YQ2B!QQm&(+(@&qL8E$KhlIcAIlX[F@*"-,iGaGYLdh6jh`Crfl feVCEDbrS0,)Sk)m54KiXF9009J!-V2AA&'@NFU#Tm8'bfrCP`9"edf(hM,$4L1- @-k@fY)1K6HA+kXUCCrT%bmV9-+f&MGblf1d)URhpKe1R(S#eZH81@q*0FG+SGpH J,22,P@lb92D(Umk0aYI8hpV08qLiaCe@&M8G`5DN,Y[#1CjVp1&FmK`YYf$1L9l AMaa,"SBhEPB@(CYk&aN%%9Kl0++T,NJ5Ih[VY'q29qcdY"PXVJchca@!MN[8Jdj UAiX,aPm[lY@#`2U`jKCH2&N-bDcQ2Ef)KZH63Y22P`UDh6-@V"ebbC3V$a2EN!" 4JJpNE,f'9aT0"4N[1hZa908hKc5PS6UD3jV5m)V0)C12EQMSqldCDC*NpNZ62l) M39)TIE%[QG!2@p1CR+3$9k"Yl54Mf$E&mQadYHQddm5eVKjPYEKKRShe$KiZXPB UcYTJbPQdFDbCmi#9aT0)XfR1ml`jcqBj6q)@2)Eal*P2ZFGbERDAiYJDeleM4mF H`$Ki!12K!Bb("c!HEQ-mA-CiH!$M5Gb#"c!HRYYk%XRe8iM,[!"iZUf6Cpqe2@c $AGILZUQ@GV*)3EZT-JRDJ+ZTiRHT$,R,MYT032r5@U--6QT)mV*Hf!ae(BENlA5 T(LBp#kQfNfCaXhb4Zh4lR066S+G@)j-JrHiYD6!@JTk3!+IG@G5D5Z&5d#Tj*Zf GdBNDGE5mh8QB"VhD%(5$5mSqCm$c"KD`P*ab6HeH&LBYIj'P9Dkic6@#JC(bF"Z XPh9hGJE',q*CV6qHPRHVMHYZ[@[P[TP4UN@rYV,iT54,2#SZ)5,Q[$2HbXUAPV$ B@`Yc5pab3a*hfX+(RHd`59dLZ,SaE)a2(R*S!-0"a@k-+"KG90ZR*l$LZMlCPJM qV'ZV%rEK%Dh6HREj))Y'*0f8K*1UD(&Yi8SEQ9qB`!J5l(468BbN%E$F!JUl1S+ SJeLmYPCl'EhhcXc-KrVS[56Z*$9A(NXF,3,a!VEF5aI2R%Bm33%Q+R46F`&-GM5 L@'jahG!*bAU,5Q!RLhhDU'@p[B1$clrAaM"apHITLeP@T#',af*p)XK9#+'9Ifl ,!MAF5E+YFEB`rm660dl+P3VcbCUSJ59,KYkYPRh@1`ehlEr`9XkX64S*MKr@-Y1 X@LS,C1L2*F'paJ9@5#eTD#eUXk5dV-L[2`4X6`9Kr9E@M1@l&mZJ8li(X$*QS%6 $%Gk,VE#iMf,l((`NU(2q'VE[a&Dj!XpLq`9[r$Xp)rGRK9KmJr,he-0EP0C326R 1%bVT)U`25`i@+QIe9h`XhbdM$A3q9RJG'2bH4LbShm)hU*dV,@SA"ePK9IYHcQ' )q@4PRm#E'r"bmE(dh'RXc5ip)HTfI-0q0MLCqP*I`$GF1l'+lh-F+VQS[*&kc0H DZYV@Lch$"#-'3Bm)lRJ,F8(G8eCFr3&E!J@erLUV`C+$qM[,Vd`De*,KCr[pMi* kVA1#%fqLI64i&Ejc[4i8[)EcHGVi6AbmdrPqilIJjr"GB(Ik,!G@A-A(ficLIP* 6`Ar$0pSM48Je1FDV6b&KJeh*0D5&jKP2MBmPbPNi(jrFd9[*0E5$`i5HUXC5K+l %9leqFideB%-I%,B)S5I(UcR8j*X3"CCSa-3NeB[ihXlC6UB+#4XZ#Zii$8`+I4E IaG5(e&Y)Up8bAS)FRq%`KIH6@JSpM'qUAi3PT(I9qTMiRZ6!Zq%$5eL&&VJ$5r4 VL!p-B@PkI&,EHM&kI+a$5`hL3beP$9amV"2,%[2iZ!q,bZ160pI,b10MZA8@MXF (AK+,$qaKFAKm9"M,`H0l)3I`#KmeEAZ-`X*1&RR(pcS1LmhhS'%b[SFiX*`l2M# *"GcaIB3$li!2!'@4GRaIi-#bl2LqaB&Da[F$$Lbp$J@J2X!FI'!Sq)N2hX##k[M !!TC3adFGk0%KiZ-GHA0ma,!`1Mj'V0Q&Db,##4BrahFA"`hfiJ-EE$Y,4'r-dZI ihX@"2LamImV"$Lk*h-2"-*(!mF)!kJZI`%)!h0'qTcR!Ck!c[+XGp4CP[9h0Ar# "`CBb4B9jGP1qU0E,K52J!hGXNdj8p8mM'6lUdfUe8G@2V!QXIEb['Bm51%&[FC2 jL,'E@dA&NfifhpdFU!YmVq"JPGbS10UYjRXV"pEfaFGUZq!'2M$b0[0pR)-G2K- 94YT9L+1UHcJ1[LFi[-Kmm"+`@VkBq-mGjQ0GAeB3aXGk[#mf(eJ'4Z'MYPRY&aq e4#hMidej6hcFl4lc`32fQimhVMFIY8iX2YB2&PkNIAr&!5k'MbfU`%0m2q4`RrF j,MkNqG%LL(i%[P%(pMh926[lK(%(4pXh&M'Q#4I'(0Mh$$cXG1-@MVC[($*'%bl FF@$INpqBREhli+*ZZ2#bI*ZR"Pai+AcKEE1cepkjL"XU1'G(HTYQ'HI+jjiEkHf H(c9C0fRp@$*UXSl4cmP4NhA@`Z8dqDaZ1NVVVGSb5(kf2dVRS6*HhM@h3'YUXmC i9XP$i,e&([TrlL[bX*lKX0IbR&K4I!kBmI41ZB(6hQJX2F"TmT(KA6CSpT!!"Ki DTqR(0-2fc)3Y%jFFf*@)5)hY5S5PKddP3QfACb+!k9kqemliLNFN*RfCN!$8[#m 6XLaUMHKa8N&lejahj,f)Q$96Fcb+M0p,ABV3YMFM029Q"(L[j$EkJX'*'q,@XI( 3DQLSZJK!ac$MPQ6`90fV$FMpr&bSiaq0,02EEC[RFr`HYF2[YaP"Z8rQI2+`(6P U'qQ2jR8FZXHmVFPN0rECGf@`f)*0&CYRGE`q&Sq1f)bXirGBfVGjV(YLBGHFjLm eCEEYdrIBQ$ArVrMe2CL5r&bpkRX8X*1TZ-9[q8"9Drhm&Mp!i194fqD9(ApA'4& YCeJGVrZGD@)c[SlIJfp8V3&,2[kZqKjk*YlaHaKqcqcE0VScC2%*TV0JD0!Qhq@ qaLR3"epqdH#2%1E`2C`"$'AKq4Iq'$NEaPQhISi+TP2!cY3SlSjlR(rQBJ(hk(b 3!*rHS`1!Ihk2)T)IZBFXd["rY@qBkI&kKERVHa4HSf(UH[ipGM#)f"&`Ml@[[Qc aA4P&k0fM(BPqHSmGVl,6iV['lq%%B1lk(VZF6DEmcHHHB0`bK,KVL%VMV2r@EeI @@56J(RbM+**Rhj@4UVibIc"*E2%*jZkSB+C1!14d+b$9SDpVKTEl3p14Tfelq@F dRG`ph#DUmc%Y*PXG[p"LZZja9)[TZXG4,DEl(NHdQ1)ph!YD60Ylr%U,b6hX-eT -m4j(YCLfDra5LqQkac%YjZ"&A!4D6'F1ZkG(amF5(m@lTKIpD2kF(jT1&SKqSHR N%GmCS1N8aelfV`aZY&Rj[rRSVh&2G&'i!lSIA#IG"PZ1-5rTHU@c+0(lf[$&'BT lSQ[KHUemHI`cpcL1`('QA'$FrriHlT[ZKpf,!Bb'PfE[FHH8&lUbddAp(ia!,Y* 4dFFB3GFpMM+#VRXF4I,ZHaa"mZ)pMQP9EIIiP9D9Hj!!Cj!!XhL2SmMCGSeI)QI A2BjT93F[%Vp(3Bk4HqKT#Zdjc$hd+R,CMdZX5ifmjr1i!638IBr#i'4INFJMQYa $9R&T[mI#LDdr[SGlGUTjFY&!GmVRSTYUIZ)10-f'lCG9[M0B%1@PC('jb4BXPb0 V62mNAeJj##l)8YH6JqdZQ8l,SeRBUSG*rG!+km6+hLakRf`4GkkRdD1ZlT*&bU$ %ai@Sa`AGdV@NdaEAF,Qa"amA3MNZ10b3!+$Kmh%KY[MXp$`VRlK@#Z#%Gf%R@2M !#@E#BUNR[K(kL&kLA$-LGK9hc(d+@0JD4Uh&RUT3aS[%1&ic[d9m5Vq)1b921FH ZEH-PLVNP`iXm[6QH9Z6T`h&SNBFK3*9&R[iFVhiT6hbVHiNkLH10Vp@&5$kIi6# S9'V9e8NY[X&C0@3D6@JP[L%0laZV0icJ8k8P'j3(Rm3a*@EBdVk'DkB-[5*SmhR ,H[XUSkA5H@[bqlcZQT-ICjPLh[BRXrrbR[RhNErXZlH@5YIZprF1RM`lqp4Q3Xr %MX5HK@AKBZEMMH$jcV(h18re+IB-,$1&,X"HL"f&(8fH-CDR#MX11ail!FZFQSR B'ZcTj*PNH5l#ASaP`#*,)c""4pifm'lXD[*iGF'XYKAB99LQK6-CD41@'YK-RLf @"dD`(FXXTaZ`G+%c*BJ"3#[*XmIbh)6GLi9C#Xr81&CLY4NQ6kRP!EGX5@YX!RF UX1"+Ar,dXcc81h8f!(X+pP6X308f45jj"PZHSF)YXFa"C-)4%hpRBDGJTj0RYZ@ j&(X*PL%YFl(cX-`eBi,b![*S("!I`iHZ`#l'-U0a+IC+l&ABUH4CCRQZ`5iAAL5 "5*Vf`cNJbDXE[(MYRH!&G6!02"J[j%TZ0a,2drMa5)(JjV1#kkkrPraPj"'mN6a 5%HSA5mHVU'kE9I`$`L2UMI[GAb*4iMl[2QFbrfl$Ip[Xi92LI4iiDal2IR$l[q2 C!ffl$r([1aS[q9qQr2(h14$r6VZIi1*69j)RD(Pi3M#!HZ(p)PerqYAbrqZ"pN0 acXqHR,jKG!#&EPXD0eajU02)SV@96TV&cI*&lY,YF9*2AdJa[9Cc+(Z,`Qc,Lr& ,3rS!GjG(ACC&VDNA8ma'%U`F#Y[YPa2-k%50HVP[*NYJcFha6!QSMHYZ[@Zp($i c5K%Jec8RT$kfjE"#69[dSL6HkQVCLf@LUA&Fh-aQ@"BQVCIIZ,Cr5+T8Fq6FNI* `1iZDdBlrZ*ZH#E1`Nl8l,ck1$XmrRSkrDZL&8,q68`TmQfZmN!$%m[RfelFTfTq ITX"m#40H,''rVl!Y@MSQXU'j!M(p,,N#N!#qQBlAed*&4`C8`[cMqb*L@l6hH[C FQ52Ur)LpV9-*UpG-(i0d%Z3!RHJ11#G"(X`*cd%jd9NJpi*c'1"PD#N8,lDeb(9 4j!%m%Am3[h4m-hJ6Pi0ZSV2!(3r12PJVD"0BJ'a5G!#fRb$hh&Q`pS)lbc3$e&j X'UEMJCPbb%%dd6Q!*VSGRSR2JV-AR(R+*$#RJZ@e1Q'B"$NB*VS$KNQ3!)GK`R- `6(3@KVhJA(el'9U+`S[0&88HKK2a"h&*acI$-(%j'#Bk#m2ai1b$YF)`J38B*N8 ($2X*FXqGK@%[Z,0--c$XaDCK1"kB+BFF$"1GJf'Lff'Bq#`-Hm'CTmc#m1bHX@- `6))F$"2G!F-Nb--`i6NB*MS,`ej`VVkp$#e&iFAQLL)2`iRiJlLNijYKQ,JF$"1 GKH&iF2E"@Q'B`!)-Nk)$K[d%ZHI1`V!Ah&QQ'4MfBY-`(!r-P%-1KSR1`6$4l6" -I"D'[H$-8ak!i4jCULK-p8K6AH*88CiU#&5(*+T1NDSJ8h8,9Ge598kX+XT9Km@ P(RQT4f!U5%b(4+C1Q5N[0"@NTU,B9*5EHU5IS[M6)rpd#8"&#DJJ!Kf5J6U&S)) 8e#d'GFY"18'S+!NG&R"k**`H%DFJia`5FMUPR,bB8j!!FiU#6P(5kC&ALJ*,Mm6 5*E)8CCD#d(*)DZN8@`Tb5lIJdLfjj%5ASZab@#6TN8PkK*+#9(*),1Q85r+#58% b+BSQ4GQNd-a4E1I)0h4d0bJ8@K3kQa3+E3S&GEbSMqF9mQl&Yk$jGUUq"Gfh)$F @"FHmj0JYS49%Y%iC,5ZN0DmEPqCF,6P5T+XP342VDXR43,YD-U4i9dZ#*2(+a+F )35D*,CG-H%Hp0*!!Veb+1,&T6@(S9dYSLRqe*%K#86Dqp3RR,L33-'T*IS$GY@4 *%V0-I&FKqY3X%`ihbmEQLc6&cPS5T1KC-X&5Pc)IDfFmPB609l%aP5J,N!#T,1d SQ8U8JmT8QLaHTV*N3$1G*&Z`k8c09C[1d9+H$F@9!p,Q2+eSfT!!j`#NTZ+cZ*V +NJ(A!dQk(VJ&CP-*1V%fP5S$Z1NN4iUi$AV61CV`pd##BK&NN6L9*3[(5pU1$@, *e3('ITSX&2XjfS(B6j1$B6p*&S6p("N)ENb4VGh'2-f9fjLKT5b6TC5$hR5@9Z" 0CMN!Zhjd&R6p("R)E8T4H03@Z2A$1m(@6j5"fXB8KiUe$@BE-c5"E&0ijl0R!GE 2NB9AM`l2G"1GU5QAP$dbYZDB29CpK9$VkTXIYUBk)A1m-aPQaV9M[,e40XlRk*! !9aSeYCB859%Y%cpVTZC!,e(6mLr[bfqCm#k@e&jrU83(Lr!!l@bYa(5D6$Nf-,K m6EBNkQEUqHT-jFQ8D$T*4jfQXa@*EkCLI8"YVpFNJ@bYeLE1dPUVM8NbPCSN![N k2C!!TNMVmMAUCmP8D'1+M[TXc0A*PlTVFffYpTp5!CPke!,5("%-b(4)-b"2Mfa !QL0!3kCZMF(,dX0F[93GaHJPkDR(3hT$)P%"Qh5LGY9"ef%"HXR4)dk3!1B35-I cG1JBm5cG*A-%p-Pd60JJea'1i'IU+F9Z[F6,FK4iZP36,dP11)PRk+UH([Q%0$d #*@N1XbB5G4-R,mY4lZ5PkbUFBMr3NVL6e&aj,('-`Zc3LKCh@S$R3E%(AM#R%8m !)Ch0,2J1*q,G1K+P1(cf&3r+,Le2QHjSq1RYZaieV6GdC22jErCG@m5*PPGY&)U 2hE[V44XjHMVAXYlH`F(RRmq%0(&e%jALj5DNLB1EU!DqE@*5h0U%T'ZL-Fc5Da1 9T0+*L"4l5B5e[E62RK-"(ZlDPfpJaFQJ11fb3BEY'ZF"[QILNM`X%G(mDUfeR!K 0[CT(Xha[kJe6p-Q%T+L5#@QN45BS5B%5%@QkN`KYHc1Ip53#@SRIaM"ap9FJe-4 hL%FQ48ie-[%GFT&*NGH*6)+F3'6L1e'q-8H,HQ45C'@M4(L1YLGbG(+$4*i@HTU )cPGYZi58c("3X,!CQN8M%eR38%b5V0#4##q@5MH05Z6*P8UVpZ'(jUSSThDBq*c -BH,Ep3f6)5YX*-)l&Be%RN1&NT%m%Y%(Ud(QDVF6!F)lH3!CmM5!m%i@3)Cf%N" mRJ-3AU!!U45Y$)!-13,J4HG"c8Y4+&8[6@ZPHX'j3Zh!rN5#0ZMA#9U3!*r!)[# 6)iIlAR5K3RT3hdZ6VC!!JjJIMmc@6Kla#Fm$2Z%GH%q#(0ald3@dpp,de%F@kle JV`UF5CqkYUj&(,HQfC&Y*BDcbH-T1iPVh+PS2PXTaK6AZ)1R@XAK(1,BcY(r2[A (@Lc4h#rdMr0aRbG1hd2ZPi`V[B`P"HcpNR'Vf1kap-&QPZpiP0bNmX-FRLD1R3r mZ0$6(#UE@ASNRp*D"[DGN[IVp4AZFN'cR4k*@r)P&MqFhmbQMVa6@&XqpZAH[,G r[jRD&Z,6cDc"HbAM*[`CprZckL$cQ82Iiqhe0TAb$IiDKe(YK+e$3RGp"KpE9FT h$aZaK!Gmh2YlP-2Q1eHA0h%2[4IID"phhkFiR1RMIU)FGLAr)GTUXFc(rGd`2MD [*0rM(1l0im,R2S52E5cPZeml,mccq4l8FMKX)mQ9EeqS*hq,K'dIeM+9YLlpZ-M 0(2CCAITaBH'%9cGqA&5EC`keZ[(MpYdbAamIdhD6GSZ2I3r1emFfE9eTGiLkij6 jqRMdER`,I0aGfJV5eXG,@IBaS+dhLI[#I(eFYaiI'e-5pr@jqJMYH4)I@e6+GlH fac6e%4j66E+GTP6kcSmXe)'r(QL81SlAJ4mArZK#25AcIA#K2[bi'2H,eiFI0dL EE*Vk#&qKQVEiqe%``pC(q'HZ*X$Z$R'UDXM84rJbl49P0h9mA*KNkL0mP6E*[0& i!29UkL0mm4I`X8%RqIjk(Mp'DKm0kJ+mCpF*@aq[%TEFl12k#*pUmVLq2a$'[F4 `p`dFH[Zi4l3Tk*hfVYqIbpG[ac*m$rLiJF*eQqq*hIM),eqrlmlIljZ2iRZ2MqZ [c8C0[RklKB[[pA&pYEQRHHr!pi9re"h[)AK[hcY`81rdQ)ql6(R0H`Iq4MjUJAZ `SjTjlm"REX)((`'R(jkrhkHI`XHpL101jRiUqD3+eF60qrVmrCl8Qhl-lXe@4HC qUNGepR'lamUjq`9M[4re5(f$8qCq`6F+Ym!%q9CqFqjq`HekXdrjZ$fU$h1ri)l 2iK-HT2%*(Q0`)R,5,q$lQ[%RkRb`MhZ0DSLkNqq2`0Q5YSm,kLfqlH2HIJHBGV+ 2Up,Z(YraeiL#0j9rjH0@LdYqeqjh,cEQmH16fZ6dHmEcK'F%l"jVK5AJ!h(ic(Y (hUQY8rr*iUM4#Rq2KiAh6eUp2U6,QlK(YENV03,ZISR$&"rhT,C#IFTi*29XlK' jm6&m2c4FNHeFe8-qVYHr%N#0JarJE#prMbm+qm!Vm!Rq8HAcVEJ0(cRPZi8kL&4 ph$4aPAme(JchXMMp0['-Ic-H`#DTDqcHi-(6aVHNEVckZ&YFlNIfIY5cVBpc2SE [aclZC'fiqL&r[fq)GpUY5%qqKhFGk11qqNrc&,C#m3rkHfb$0hLVcFD%XjCrI"q I-ZifK)e6JeB(Ei&2H#[6KS9h&PGQ82G+'#*IL6BZ+S1AJcXq[jQ+$K%U+epXpkr aCNVEbI*dXMeV++qRf1i9TjVq!-6GKkq[MkZ(@bYK[RbIH"rjq[ZiNm!QTBeQ`8Z iKHB0XGhh8@2+0Q)j9CaEmiEBqjk&HbPY2-XlNIF-Rkm5,&$'ef2S&UEqBVY[)*F b[PkLYp4i'G[p1Ef0jHX$a&%d(XGfGm(2e&NqVPceq6`Ipa%`5)%cZQlJ*b90pLT ,e)Cq*p&[!KpUKNGhAbX4(cEhVYr-9VNUhrK9q,&XH4YHjq1Q28#FfE&CR3l[-$J GfhX&@mFUEE[+m`S1'Cb1lAN%A&6#4[P1S`i-6XIfDQPETHeKjCXcAkreer2f#Vp q$lQIVBrkc@b4Ue4he-dr(-+Rf0irr#*aXTbXcJIqDGb0lGd%cLREb(B''mmDr)l Y$H"-5Y[CNNq`bZ"hE1m0ZJFEfa)(cl6hH#Am4QQ,@qLmE'aVm$Zfjbkp"j[Gb[F DX0$L5[e[`Qf8YYQ&(m#A0*l&pYccF@'-LGXXc$"i8lm6V85*Ji$Im(jlMhI`4SS Dj(XGA-6JI@c2RGmLMXf#jAX6ZSc&TrSEU3QPlAQTErL$a[[BRZpG54akMRbRL0F Ch0Vr-&LSE11AQ2L*`DhpGi%T5TbD1RMPI2fK"5MHAlp6R0r(p[kPhS-YGZ8E*Yc 4r##fG`IF58PMNDm@hF6`JpMH')kUT)2"ekN6c3pLHem(Pe2DJ"IHrm3KIL$i)4L Pa#APfiM@B[L"h%0d,28QidrS$JCIpcm+*e$D(*JiH*jp[dAS@1TYaZGiAiYc`IZ *XlVA32&JJkreTm+TP1PHmm!2Lkre[`kI8kClKD89fAZ-q50mFKGJlA,UfI$Df0j 2#!2Bh&MLVJ)$,&lZ[d[Da'Gph%e`"3m[[k)D%icPQi9qjZ(PD186rBV[IYl9`m[ TUPIi(Hq"eQMIqir&rG!*LB2[fATpC!mqZ$rm$lbf1,G!R"`p3Ei9UN@,Pkq(f`@ NGj%2($&iZIpCm$)JIB!ikX2HBk5`!&iXheid#3m[2kbDrRXIYdFkVF@jkQ[*`CE $8$MZBqYl`+IaIGR(E8AImI"bJIL0h8`iV$UhpbMrAAaImA%28cm@,qY6m@2"+,l h``-p[(`[R&qCRMTEqT("brTedP$J&q#Ik+mHAMi'Pe@fi9G)R0lJCAdGV89*2k3 1@1h-eTr@@RKciQK0X2AhQ',3#H@l9RU"`F[pMdQMK0m"0E)KQBHA&G*DV)Dm5hU (aFYDD3bm!lL1CQ$`X[l0dNVJ0I+pkX[cH$Ri6`K!db$IQqIamR%d+D80RAQR""q Y[dEB)abCEr!#AXj%Te&k%rPZ%kjB[0`RIX`fd2!Ep%',Pj23m*9d@RJ'HN1*jrF 2`1(9Z)rl!,JFbHXlF0a"Z*Db4@0,a31Y(V!6M&#f#QaIEE&XiL)R`&'9l8Sd8"K QimD+hjKGM03PB*9h[he`"LAq+mGedS00A138DPMC)T,$a5[X[GmRhQ#hqjUR,C* Yh2IJR-TfcC`R,,4a6iQAQ&fE9%6GH[Hq(Crb1U[DaqE0hVfMD!E+G0D9iZ[fr5k rN6LVXki8cl$hqaal-bRMlCY9ccEZafJJbVDT'b3F2kNC(qfV#1FiC2@5Z&lqr`d !"8PMEfi0D@p38%-ZE@0`!*!4H$-*KJ#3$iB!!$q)!*!$&J#3"'PMEfj038063!# eQI#%YCR`K!!!!HB!N!B"&3#3""F@!*!)JE)4!!JF[-XKL%Vqkr)IQ(qRr&[Nla6 hDYcMFCFjq"YaTmHeLN[2GdpFcRaEjcXYAk0m21qMq8VPh6[[,ARVj-h+FeLHar* XRZHi20im2E`Aj5RJ6I0HR2Y9EqIFjhU,j8l,I9eZP$XeGilF20HCZF[QV*!!Frm F0q9-c,&GMVGcP-Pa@1aj14V(GSQp1qE4f25BR@-hL'NEFkrRVTMdQ%GLYiSj-,D qXmMT%0kG+6`p!r+B3c"H,b-CF*54$%p[fY"-D$T(Emh-i#$Rk@eK'$HR8'ZQ(!T cYqY-%A+HIQQ%K@(XR2`ZdLmbcpr'-b3U-8II58AYQIfMclTCrUa,aK5GkLJ8DZY dYLC!(J4+k5cqV!ZZX3#3!`d0$&*&384045j0B@028f0`!*!4KZB*KJ#3$Mi$!!" $(J#3!aErN!4849K8G(4iG!%!VZP",E@CpXm!!!'X!!!%5`#3!md!!!*C*YQfB3# 3"M&!%3!)(1ad#')JLFI%1Rb*Jij4$SQpPB0bK,62fc8T)G'Ij216P-l"P'KkQ)V "9!65Xe)GTD5H!!J3)B2Y3fARKLIIKp0[UTHYN!"1TZXCRhC&(mcFBpDR'HL$*'B bTRkDJEjBKM3rJcd9[(l15!U(i9GF#&#aYR)HIf+0dbT$lV2bl"JXUUC$EZHE"al 2iakBaArh`'Q21'8UXp'm)bLH6D%Jj*ZT4*peCGa0ec5-ImP4+,3"j!m%ZqTYqZ6 3G)IlBUBS06Yib'K"cmeeX!8+SJ#!)!1BM"JC-!+`$L,X(*!!!I2)5Sk5@mQapmK 4)jc-'!()lfAi9c`$q#LHiJRk%3`%F23LI'9'RJd))mKJ"$&X*HX$!2R!j-"86Di hP&T,(j5qZD143lS3BL2ThP2PI'XI5AP$NipTUQ[5Y8[4mDG"DGPqH44E5H18D(G GRYhHlZ5J4h+q)$f2NA("kX4KNAR[25[cBc!alGMBre3)MJ2G"UBhKAa3RC@#L!k YLdqqiJYGlkUJ`N*eRJ92AV,"NXVII@4++M3fa6*3F@STdf5#C'1L-A!6e&"Bmk- i@SYrMNqP%#KPLKKmkB3@RNJV6mT!k,10E!"'#$la2"5TmcHT!P5IN3-mIH58Q96 #$lKPhbr8+NLf&J("!%4ND4QlQ0dA*j@UqNA-l&mPQMPd'+DhCae+d4&89pQj2k, C$*%#4#&Sih`6FaYB&mlVIM,@B(82mSImU#!"I(BSTA4f0&K[0Bhpe#"`31l*&!Q GjeQd21Fj9$,cK*Z5-6*A$6f@S"H0)mXXp68BV-T,`8&6,QpI3ZUC1dK"1cN)G&H &59X*!0YIFKAPj&eMT@k&q-$'e8kVj0K(+E'e@DqffpAjf3A41$Y%i#mMa'&E0V( @dUZSC--2ZAjm2YUCDYGEa'#3!%!*lImdGq`IE-J"rMa-*q8HPC2dkekJ#P#K3!U 6KaS80)bpFKkS&H0D+KTFM!Makqek*cDEeIVmVlaVp`MSlqK9EiHF[1p`(jN120# 90cC%kk9BRkifTk[eqXJhZ,jECVAm"V`IMITMrqNXlklhKl[p$@hPqZ48LRmK)3Y MCQPdFfP[AfeKB`#3&JQ'!4B!&3+L!GB!N!-"!!!rL!#3"aB!N!1'!!!$([q3"!2 JYCR`K,@Cp[N!N!8"mK%!N!C#Q2r`rrJ!!-0!!!!3DBZi!!!: \ No newline at end of file diff --git a/software/cfitsio3040/cfortran.doc b/software/cfitsio3040/cfortran.doc new file mode 100644 index 000000000..6c6f4b3ae --- /dev/null +++ b/software/cfitsio3040/cfortran.doc @@ -0,0 +1,2051 @@ +/* cfortran.doc 4.3 */ +/* www-zeus.desy.de/~burow OR anonymous ftp@zebra.desy.de */ +/* Burkhard Burow burow@desy.de 1990 - 1998. */ + + + cfortran.h : Interfacing C or C++ and FORTRAN + +Supports: Alpha and VAX VMS, Alpha OSF, DECstation and VAX Ultrix, IBM RS/6000, + Silicon Graphics, Sun, CRAY, Apollo, HP9000, LynxOS, Convex, Absoft, + f2c, g77, NAG f90, PowerStation Fortran with Visual C++, NEC SX-4, + Portland Group. + +C and C++ are generally equivalent as far as cfortran.h is concerned. +Unless explicitly noted otherwise, mention of C implicitly includes C++. +C++ compilers tested include: + SunOS> CC +p +w # Clean compiles. + IRIX> CC # Clean compiles. + IRIX> CC -fullwarn # Still some warnings to be overcome. + GNU> g++ -Wall # Compiles are clean, other than warnings for unused + # cfortran.h static routines. + +N.B.: The best documentation on interfacing C or C++ and Fortran is in + the chapter named something like 'Interfacing C and Fortran' + to be found in the user's guide of almost every Fortran compiler. + Understanding this information for one or more Fortran compilers + greatly clarifies the aims and actions of cfortran.h. + Such a chapter generally also addresses issues orthogonal to cfortran.h, + for example the order of array indices, the index of the first element, + as well as compiling and linking issues. + + +0 Short Summary of the Syntax Required to Create the Interface +-------------------------------------------------------------- + +e.g. Prototyping a FORTRAN subroutine for C: + +/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */ + + PROTOCCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT) +#define SUB_NAME(A,B) CCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT, A,B) + + ^ - - + number of arguments _____| | STRING BYTE PBYTE BYTEV(..)| + / | STRINGV DOUBLE PDOUBLE DOUBLEV(..)| + / | PSTRING FLOAT PFLOAT FLOATV(..)| + types of arguments ____ / | PNSTRING INT PINT INTV(..)| + \ | PPSTRING LOGICAL PLOGICAL LOGICALV(..)| + \ | PSTRINGV LONG PLONG LONGV(..)| + \ | ZTRINGV SHORT PSHORT SHORTV(..)| + | PZTRINGV ROUTINE PVOID SIMPLE | + - - + + +e.g. Prototyping a FORTRAN function for C: +/* PROTOCCALLSFFUNn is mandatory for both C and C++. */ +PROTOCCALLSFFUN1(INT,FUN_NAME,fun_name,STRING) +#define FUN_NAME(A) CCALLSFFUN1(FUN_NAME,fun_name,STRING, A) + +e.g. calling FUN_NAME from C: {int a; a = FUN_NAME("hello");} + + +e.g. Creating a FORTRAN-callable wrapper for + a C function returning void, with a 7 dimensional integer array argument: + [Not supported from C++.] +FCALLSCSUB1(csub_name,CSUB_NAME,csub_name,INTVVVVVVV) + + +e.g. Creating a FORTRAN-callable wrapper for other C functions: +FCALLSCFUN1(STRING,cfun_name,CFUN_NAME,cfun_name,INT) + [ ^-- BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, VOID + are other types returned by functions. ] + + +e.g. COMMON BLOCKs: +FORTRAN: common /fcb/ v,w,x + character *(13) v, w(4), x(3,2) +C: +typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF; +#define FCB COMMON_BLOCK(FCB,fcb) +COMMON_BLOCK_DEF(FCB_DEF,FCB); +FCB_DEF FCB; /* Define, i.e. allocate memory, in exactly one *.c file. */ + +e.g. accessing FCB in C: printf("%.13s",FCB.v); + + + +I Introduction +-------------- + +cfortran.h is an easy-to-use powerful bridge between C and FORTRAN. +It provides a completely transparent, machine independent interface between +C and FORTRAN routines (= subroutines and/or functions) and global data, +i.e. structures and COMMON blocks. + +The complete cfortran.h package consists of 4 files: the documentation in +cfortran.doc, the engine cfortran.h, examples in cfortest.c and +cfortex.f/or. [cfortex.for under VMS, cfortex.f on other machines.] + +The cfortran.h package continues to be developed. The most recent version is +available via www at http://www-zeus.desy.de/~burow +or via anonymous ftp at zebra.desy.de (131.169.2.244). + +The examples may be run using one of the following sets of instructions: + +N.B. Unlike earlier versions, cfortran.h 3.0 and later versions + automatically uses the correct ANSI ## or pre-ANSI /**/ + preprocessor operator as required by the C compiler. + +N.B. As a general rule when trying to determine how to link C and Fortran, + link a trivial Fortran program using the Fortran compilers verbose option, + in order to see how the Fortran compiler drives the linker. e.g. + unix> cat f.f + END + unix> f77 -v f.f + .. lots of info. follows ... + +N.B. If using a C main(), i.e. Fortran PROGRAM is not entry of the executable, + and if the link bombs with a complaint about + a missing "MAIN" (e.g. MAIN__, MAIN_, f90_main or similar), + then Fortran has hijacked the entry point to the executable + and wishes to call the rest of the executable via "MAIN". + This can usually be satisfied by doing e.g. 'cc -Dmain=MAIN__ ...' + but often kills the command line arguments in argv and argc. + The f77 verbose option, usually -v, may point to a solution. + + +RS/6000> # Users are strongly urged to use f77 -qextname and cc -Dextname +RS/6000> # Use -Dextname=extname if extname is a symbol used in the C code. +RS/6000> xlf -c -qextname cfortex.f +RS/6000> cc -c -Dextname cfortest.c +RS/6000> xlf -o cfortest cfortest.o cfortex.o && cfortest + +DECFortran> #Only DECstations with DECFortran for Ultrix RISC Systems. +DECFortran> cc -c -DDECFortran cfortest.c +DECFortran> f77 -o cfortest cfortest.o cfortex.f && cfortest + +IRIX xxxxxx 5.2 02282015 IP20 mips +MIPS> # DECstations and Silicon Graphics using the MIPS compilers. +MIPS> cc -o cfortest cfortest.c cfortex.f -lI77 -lU77 -lF77 && cfortest +MIPS> # Can also let f77 drive linking, e.g. +MIPS> cc -c cfortest.c +MIPS> f77 -o cfortest cfortest.o cfortex.f && cfortest + +Apollo> # Some 'C compiler 68K Rev6.8' break. [See Section II o) Notes: Apollo] +Apollo> f77 -c cfortex.f && cc -o cfortest cfortest.c cfortex.o && cfortest + +VMS> define lnk$library sys$library:vaxcrtl +VMS> cc cfortest.c +VMS> fortran cfortex.for +VMS> link/exec=cfortest cfortest,cfortex +VMS> run cfortest + +OSF1 xxxxxx V3.0 347 alpha +Alpha/OSF> # Probably better to let cc drive linking, e.g. +Alpha/OSF> f77 -c cfortex.f +Alpha/OSF> cc -o cfortest cfortest.c cfortex.o -lUfor -lfor -lFutil -lots -lm +Alpha/OSF> cfortest +Alpha/OSF> # Else may need 'cc -Dmain=MAIN__' to let f77 drive linking. + +Sun> # Some old cc(1) need a little help. [See Section II o) Notes: Sun] +Sun> f77 -o cfortest cfortest.c cfortex.f -lc -lm && cfortest +Sun> # Some older f77 may require 'cc -Dmain=MAIN_'. + +CRAY> cft77 cfortex.f +CRAY> cc -c cfortest.c +CRAY> segldr -o cfortest.e cfortest.o cfortex.o +CRAY> ./cfortest.e + +NEC> cc -c -Xa cfortest.c +NEC> f77 -o cfortest cfortest.o cfortex.f && cfortest + +VAX/Ultrix/cc> # For cc on VAX Ultrix only, do the following once to cfortran.h. +VAX/Ultrix/cc> mv cfortran.h cftmp.h && grep -v "^#pragma" cfortran.h + +VAX/Ultrix/f77> # In the following, 'CC' is either 'cc' or 'gcc -ansi'. NOT'vcc' +VAX/Ultrix/f77> CC -c -Dmain=MAIN_ cfortest.c +VAX/Ultrix/f77> f77 -o cfortest cfortex.f cfortest.o && cfortest + +LynxOS> # In the following, 'CC' is either 'cc' or 'gcc -ansi'. +LynxOS> # Unfortunately cc is easily overwhelmed by cfortran.h, +LynxOS> # and won't compile some of the cfortest.c demos. +LynxOS> f2c -R cfortex.f +LynxOS> CC -Dlynx -o cfortest cfortest.c cfortex.c -lf2c && cfortest + +HP9000> # Tested with HP-UX 7.05 B 9000/380 and with A.08.07 A 9000/730 +HP9000> # CC may be either 'c89 -Aa' or 'cc -Aa' +HP9000> # Depending on the compiler version, you may need to include the +HP9000> # option '-tp,/lib/cpp' or worse, you'll have to stick to the K&R C. +HP9000> # [See Section II o) Notes: HP9000] +HP9000> # Users are strongly urged to use f77 +ppu and cc -Dextname +HP9000> # Use -Dextname=extname if extname is a symbol used in the C code. +HP9000> CC -Dextname -c cfortest.c +HP9000> f77 +ppu cfortex.f -o cfortest cfortest.o && cfortest +HP9000> # Older f77 may need +HP9000> f77 -c cfortex.f +HP9000> CC -o cfortest cfortest.c cfortex.o -lI77 -lF77 && cfortest + +HP0000> # If old-style f77 +800 compiled objects are required: +HP9000> # #define hpuxFortran800 +HP9000> cc -c -Aa -DhpuxFortran800 cfortest.c +HP9000> f77 +800 -o cfortest cfortest.o cfortex.f + +f2c> # In the following, 'CC' is any C compiler. +f2c> f2c -R cfortex.f +f2c> CC -o cfortest -Df2cFortran cfortest.c cfortex.c -lf2c && cfortest + +Portland Group $ # Presumably other C compilers also work. +Portland Group $ pgcc -DpgiFortran -c cfortest.c +Portland Group $ pgf77 -o cfortest cfortex.f cfortest.o && cfortest + +NAGf90> # cfortex.f is distributed with Fortran 77 style comments. +NAGf90> # To convert to f90 style comments do the following once to cfortex.f: +NAGf90> mv cfortex.f cf_temp.f && sed 's/^C/\!/g' cf_temp.f > cfortex.f +NAGf90> # In the following, 'CC' is any C compiler. +NAGf90> CC -c -DNAGf90Fortran cfortest.c +NAGf90> f90 -o cfortest cfortest.o cfortex.f && cfortest + +PC> # On a PC with PowerStation Fortran and Visual_C++ +PC> cl /c cftest.c +PC> fl32 cftest.obj cftex.for + +GNU> # GNU Fortran +GNU> # See Section VI caveat on using 'gcc -traditional'. +GNU> gcc -ansi -Wall -O -c -Df2cFortran cfortest.c +GNU> g77 -ff2c -o cfortest cfortest.o cfortex.f && cfortest + +AbsoftUNIX> # Absoft Fortran for all UNIX based operating systems. +AbsoftUNIX> # e.g. Linux or Next on Intel or Motorola68000. +AbsoftUNIX> # Absoft f77 -k allows Fortran routines to be safely called from C. +AbsoftUNIX> gcc -ansi -Wall -O -c -DAbsoftUNIXFortran cfortest.c +AbsoftUNIX> f77 -k -o cfortest cfortest.o cfortex.f && cfortest + +AbsoftPro> # Absoft Pro Fortran for MacOS +AbsoftPro> # Use #define AbsoftProFortran + +CLIPPER> # INTERGRAPH CLIX using CLIPPER C and Fortran compilers. +CLIPPER> # N.B. - User, not cfortran.h, is responsible for +CLIPPER> # f77initio() and f77uninitio() if required. +CLIPPER> # - LOGICAL values are not mentioned in CLIPPER doc.s, +CLIPPER> # so they may not yet be correct in cfortran.h. +CLIPPER> # - K&R mode (-knr or Ac=knr) breaks FLOAT functions +CLIPPER> # (see CLIPPER doc.s) and cfortran.h does not fix it up. +CLIPPER> # [cfortran.h ok for old sun C which made the same mistake.] +CLIPPER> acc cfortest.c -c -DCLIPPERFortran +CLIPPER> af77 cfortex.f cfortest.o -o cfortest + + +By changing the SELECTion ifdef of cfortest.c and recompiling one can try out +a few dozen different few-line examples. + + + +The benefits of using cfortran.h include: +1. Machine/OS/compiler independent mixing of C and FORTRAN. + +2. Identical (within syntax) calls across languages, e.g. +C FORTRAN + CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.) +/* C*/ + HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.); + +3. Each routine need only be set up once in its lifetime. e.g. +/* Setting up a FORTRAN routine to be called by C. + ID,...,VMX are merely the names of arguments. + These tags must be unique w.r.t. each other but are otherwise arbitrary. */ +PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT) +#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \ + CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \ + ID,CHTITLE,NX,XMI,XMA,VMX) + +4. Source code is NOT required for the C routines exported to FORTRAN, nor for + the FORTRAN routines imported to C. In fact, routines are most easily + prototyped using the information in the routines' documentation. + +5. Routines, and the code calling them, can be coded naturally in the language + of choice. C routines may be coded with the natural assumption of being + called only by C code. cfortran.h does all the required work for FORTRAN + code to call C routines. Similarly it also does all the work required for C + to call FORTRAN routines. Therefore: + - C programmers need not embed FORTRAN argument passing mechanisms into + their code. + - FORTRAN code need not be converted into C code. i.e. The honed and + time-honored FORTRAN routines are called by C. + +6. cfortran.h is a single ~1700 line C include file; portable to most + remaining, if not all, platforms. + +7. STRINGS and VECTORS of STRINGS along with the usual simple arguments to + routines are supported as are functions returning STRINGS or numbers. Arrays + of pointers to strings and values of structures as C arguments, will soon be + implemented. After learning the machinery of cfortran.h, users can expand + it to create custom types of arguments. [This requires no modification to + cfortran.h, all the preprocessor directives required to implement the + custom types can be defined outside cfortran.h] + +8. cfortran.h requires each routine to be exported to be explicitly set up. + While is usually only be done once in a header file it would be best if + applications were required to do no work at all in order to cross languages. + cfortran.h's simple syntax could be a convenient back-end for a program + which would export FORTRAN or C routines directly from the source code. + + + ----- + +Example 1 - cfortran.h has been used to make the C header file hbook.h, + which then gives any C programmer, e.g. example.c, full and + completely transparent access to CERN's HBOOK library of routines. + Each HBOOK routine required about 3 lines of simple code in + hbook.h. The example also demonstrates how FORTRAN common blocks + are defined and used. + +/* hbook.h */ +#include "cfortran.h" + : +PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT) +#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \ + CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \ + ID,CHTITLE,NX,XMI,XMA,VMX) + : +/* end hbook.h */ + +/* example.c */ +#include "hbook.h" + : +typedef struct { + int lines; + int status[SIZE]; + float p[SIZE]; /* momentum */ +} FAKE_DEF; +#define FAKE COMMON_BLOCK(FAKE,fake) +COMMON_BLOCK_DEF(FAKE_DEF,FAKE); + : +main () +{ + : + HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.); +/* c.f. the call in FORTRAN: + CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.) +*/ + : + FAKE.p[7]=1.0; + : +} + +N.B. i) The routine is language independent. + ii) hbook.h is machine independent. + iii) Applications using routines via cfortran.h are machine independent. + + ----- + +Example 2 - Many VMS System calls are most easily called from FORTRAN, but + cfortran.h now gives that ease in C. + +#include "cfortran.h" + +PROTOCCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING) +#define LIB$SPAWN(command,input_file,output_file) \ + CCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING, \ + command,input_file,output_file) + +main () +{ +LIB$SPAWN("set term/width=132","",""); +} + +Obviously the cfortran.h command above could be put into a header file along +with the description of the other system calls, but as this example shows, it's +not much hassle to set up cfortran.h for even a single call. + + ----- + +Example 3 - cfortran.h and the source cstring.c create the cstring.obj library + which gives FORTRAN access to all the functions in C's system + library described by the system's C header file string.h. + +C EXAMPLE.FOR + PROGRAM EXAMPLE + DIMENSION I(20), J(30) + : + CALL MEMCPY(I,J,7) + : + END + +/* cstring.c */ +#include /* string.h prototypes memcpy() */ +#include "cfortran.h" + + : +FCALLSCSUB3(memcpy,MEMCPY,memcpy,PVOID,PVOID,INT) + : + + +The simplicity exhibited in the above example exists for many but not all +machines. Note 4. of Section II ii) details the limitations and describes tools +which try to maintain the best possible interface when FORTRAN calls C +routines. + + ----- + + +II Using cfortran.h +------------------- + +The user is asked to look at the source files cfortest.c and cfortex.f +for clarification by example. + +o) Notes: + +o Specifying the Fortran compiler + cfortran.h generates interfaces for the default Fortran compiler. The default +can be overridden by defining, + . in the code, e.g.: #define NAGf90Fortran + OR . in the compile directive, e.g.: unix> cc -DNAGf90Fortran +one of the following before including cfortran.h: + NAGf90Fortran f2cFortran hpuxFortran apolloFortran sunFortran + IBMR2Fortran CRAYFortran mipsFortran DECFortran vmsFortran + CONVEXFortran PowerStationFortran AbsoftUNIXFortran + SXFortran pgiFortran AbsoftProFortran +This also allows crosscompilation. +If wanted, NAGf90Fortran, f2cFortran, DECFortran, AbsoftUNIXFortran, +AbsoftProFortran and pgiFortran must be requested by the user. + +o /**/ + cfortran.h (ab)uses the comment kludge /**/ when the ANSI C preprocessor +catenation operator ## doesn't exist. In at least MIPS C, this kludge is +sensitive to blanks surrounding arguments to macros. + Therefore, for applications using non-ANSI C compilers, the argtype_i, +routine_name, routine_type and common_block_name arguments to the +PROTOCCALLSFFUNn, CCALLSFSUB/FUNn, FCALLSCSUB/FUNn and COMMON_BLOCK macros +--- MUST NOT --- be followed by any white space characters such as +blanks, tabs or newlines. + +o LOGICAL + FORTRAN LOGICAL values of .TRUE. and .FALSE. do not agree with the C +representation of TRUE and FALSE on all machines. cfortran.h does the +conversion for LOGICAL and PLOGICAL arguments and for functions returning +LOGICAL. Users must convert arrays of LOGICALs from C to FORTRAN with the +C2FLOGICALV(array_name, elements_in_array); macro. Similarly, arrays of LOGICAL +values may be converted from the FORTRAN into C representation by using +F2CLOGICALV(array_name, elements_in_array); + + When C passes or returns LOGICAL values to FORTRAN, by default cfortran.h +only makes the minimal changes required to the value. [e.g. Set/Unset the +single relevant bit or do nothing for FORTRAN compilers which use 0 as FALSE +and treat all other values as TRUE.] Therefore cfortran.h will pass LOGICALs +to FORTRAN which do not have an identical representation to .TRUE. or .FALSE. +This is fine except for abuses of FORTRAN/77 in the style of: + logical l + if (l .eq. .TRUE.) ! (1) +instead of the correct: + if (l .eqv. .TRUE.) ! (2) +or: + if (l) ! (3) +For FORTRAN code which treats LOGICALs from C in the method of (1), +LOGICAL_STRICT must be defined before including cfortran.h, either in the +code, "#define LOGICAL_STRICT", or compile with "cc -DLOGICAL_STRICT". +There is no reason to use LOGICAL_STRICT for FORTRAN code which does not do (1). +At least the IBM's xlf and the Apollo's f77 do not even allow code along the +lines of (1). + + DECstations' DECFortran and MIPS FORTRAN compilers use different internal +representations for LOGICAL values. [Both compilers are usually called f77, +although when both are installed on a single machine the MIPS' one is usually +renamed. (e.g. f772.1 for version 2.10.)] cc doesn't know which FORTRAN +compiler is present, so cfortran.h assumes MIPS f77. To use cc with DECFortran +define the preprocessor constant 'DECFortran'. +e.g. i) cc -DDECFortran -c the_code.c + or ii) #define DECFortran /* in the C code or add to cfortran.h. */ + + MIPS f77 [SGI and DECstations], f2c, and f77 on VAX Ultrix treat +.eqv./.neqv. as .eq./.ne.. Therefore, for these compilers, LOGICAL_STRICT is +defined by default in cfortran.h. [The Sun and HP compilers have not been +tested, so they may also require LOGICAL_STRICT as the default.] + +o SHORT and BYTE + They are irrelevant for the CRAY where FORTRAN has no equivalent to C's short. +Similarly BYTE is irrelevant for f2c and for VAX Ultrix f77 and fort. The +author has tested SHORT and BYTE with a modified cfortest.c/cfortex.f on all +machines supported except for the HP9000 and the Sun. + + BYTE is a signed 8-bit quantity, i.e. values are -128 to 127, on all machines +except for the SGI [at least for MIPS Computer Systems 2.0.] On the SGI it is +an unsigned 8-bit quantity, i.e. values are 0 to 255, although the SGI 'FORTRAN +77 Programmers Guide' claims BYTE is signed. Perhaps MIPS 2.0 is dated, since +the DECstations using MIPS 2.10 f77 have a signed BYTE. + + To minimize the difficulties of signed and unsigned BYTE, cfortran.h creates +the type 'INTEGER_BYTE' to agree with FORTRAN's BYTE. Users may define +SIGNED_BYTE or UNSIGNED_BYTE, before including cfortran.h, to specify FORTRAN's +BYTE. If neither is defined, cfortran.h assumes SIGNED_BYTE. + +o CRAY + The type DOUBLE in cfortran.h corresponds to FORTRAN's DOUBLE PRECISION. + The type FLOAT in cfortran.h corresponds to FORTRAN's REAL. + +On a classic CRAY [i.e. all models except for the t3e]: +( 64 bit) C float == C double == Fortran REAL +(128 bit) C long double == Fortran DOUBLE PRECISION +Therefore when moving a mixed C and FORTRAN app. to/from a classic CRAY, +either the C code will have to change, +or the FORTRAN code and cfortran.h declarations will have to change. +DOUBLE_PRECISION is a cfortran.h macro which provides the former option, +i.e. the C code is automatically changed. +DOUBLE_PRECISION is 'long double' on classic CRAY and 'double' elsewhere. +DOUBLE_PRECISION thus corresponds to FORTRAN's DOUBLE PRECISION +on all machines, including classic CRAY. + +On a classic CRAY with the fortran compiler flag '-dp': +Fortran DOUBLE PRECISION thus is also the faster 64bit type. +(This switch is often used since the application is usually satisfied by + 64 bit precision and the application needs the speed.) +DOUBLE_PRECISION is thus not required in this case, +since the classic CRAY behaves like all other machines. +If DOUBLE_PRECISION is used nonetheless, then on the classic CRAY +the default cfortran.h behavior must be overridden, +for example by the C compiler option '-DDOUBLE_PRECISION=double'. + +On a CRAY t3e: +(32 bit) C float == Fortran Unavailable +(64 bit) C double == C long double == Fortran REAL == Fortran DOUBLE PRECISION +Notes: +- (32 bit) is available as Fortran REAL*4 and + (64 bit) is available as Fortran REAL*8. + Since cfortran.h is all about more portability, not about less portability, + the use of the nonstandard REAL*4 and REAL*8 is strongly discouraged. +- Fortran DOUBLE PRECISION is folded to REAL with the following warning: + 'DOUBLE PRECISION is not supported on this platform. REAL will be used.' + Similarly, Fortran REAL*16 is mapped to REAL*8 with a warning. +This behavior differs from that of other machines, including the classic CRAY. +FORTRAN_REAL is thus introduced for the t3e, +just as DOUBLE_PRECISION is introduced for the classic CRAY. +FORTRAN_REAL is 'double' on t3e and 'float' elsewhere. +FORTRAN_REAL thus corresponds to FORTRAN's REAL on all machines, including t3e. + + +o f2c + f2c, by default promotes REAL functions to double. cfortran.h does not (yet) +support this, so the f2c -R option must be used to turn this promotion off. + +o f2c +[Thanks to Dario Autiero for pointing out the following.] +f2c has a strange feature in that either one or two underscores are appended +to a Fortran name of a routine or common block, +depending on whether or not the original name contains an underscore. + + S.I. Feldman et al., "A fortran to C converter", + Computing Science Technical Report No. 149. + + page 2, chapter 2: INTERLANGUAGE conventions + ........... + To avoid conflict with the names of library routines and with names that + f2c generates, + Fortran names may have one or two underscores appended. Fortran names are + forced to lower case (unless the -U option described in Appendix B is in + effect); external names, i.e. the names of fortran procedures and common + blocks, have a single underscore appended if they do not contain any + underscore and have a pair of underscores appended if they do contain + underscores. Thus fortran subroutines names ABC, A_B_C and A_B_C_ result + in C functions named abc_, a_b_c__ and a_b_c___. + ........... + +cfortran.h is unable to change the naming convention on a name by name basis. +Fortran routine and common block names which do not contain an underscore +are unaffected by this feature. +Names which do contain an underscore may use the following work-around: + +/* First 2 lines are a completely standard cfortran.h interface + to the Fortran routine E_ASY . */ + PROTOCCALLSFSUB2(E_ASY,e_asy, PINT, INT) +#define E_ASY(A,B) CCALLSFSUB2(E_ASY,e_asy, PINT, INT, A, B) +#ifdef f2cFortran +#define e_asy_ e_asy__ +#endif +/* Last three lines are a work-around for the strange f2c naming feature. */ + +o NAG f90 + The Fortran 77 subset of Fortran 90 is supported. Extending cfortran.h to +interface C with all of Fortran 90 has not yet been examined. + The NAG f90 library hijacks the main() of any program and starts the user's +program with a call to: void f90_main(void); +While this in itself is only a minor hassle, a major problem arises because +NAG f90 provides no mechanism to access command line arguments. + At least version 'NAGWare f90 compiler Version 1.1(334)' appended _CB to +common block names instead of the usual _. To fix, add this to cfortran.h: +#ifdef old_NAG_f90_CB_COMMON +#define COMMON_BLOCK CFC_ /* for all other Fortran compilers */ +#else +#define COMMON_BLOCK(UN,LN) _(LN,_CB) +#endif + +o RS/6000 + Using "xlf -qextname ...", which appends an underscore, '_', to all FORTRAN +external references, requires "cc -Dextname ..." so that cfortran.h also +generates these underscores. +Use -Dextname=extname if extname is a symbol used in the C code. +The use of "xlf -qextname" is STRONGLY ENCOURAGED, since it allows for +transparent naming schemes when mixing C and Fortran. + +o HP9000 + Using "f77 +ppu ...", which appends an underscore, '_', to all FORTRAN +external references, requires "cc -Dextname ..." so that cfortran.h also +generates these underscores. +Use -Dextname=extname if extname is a symbol used in the C code. +The use of "f77 +ppu" is STRONGLY ENCOURAGED, since it allows for +transparent naming schemes when mixing C and Fortran. + + At least one release of the HP /lib/cpp.ansi preprocessor is broken and will +go into an infinite loop when trying to process cfortran.h with the +## catenation operator. The K&R version of cfortran.h must then be used and the +K&R preprocessor must be specified. e.g. + HP9000> cc -Aa -tp,/lib/cpp -c source.c +The same problem with a similar solution exists on the Apollo. +An irrelevant error message '0: extraneous name /usr/include' will appear for +each source file due to another HP bug, and can be safely ignored. +e.g. 'cc -v -c -Aa -tp,/lib/cpp cfortest.c' will show that the driver passes +'-I /usr/include' instead of '-I/usr/include' to /lib/cpp + +On some machines the above error causes compilation to stop; one must then use +K&R C, as with old HP compilers which don't support function prototyping. +cfortran.h has to be informed that K&R C is to being used, e.g. +HP9000> cc -D__CF__KnR -c source.c + +o AbsoftUNIXFortran +By default, cfortran.h follows the default AbsoftUNIX/ProFortran and prepends _C +to each COMMON BLOCK name. To override the cfortran.h behavior +#define COMMON_BLOCK(UN,LN) before #including cfortran.h. +[Search for COMMON_BLOCK in cfortran.h for examples.] + +o Apollo +On at least one release, 'C compiler 68K Rev6.8(168)', the default C +preprocessor, from cc -A xansi or cc -A ansi, enters an infinite loop when +using cfortran.h. This Apollo bug can be circumvented by using: + . cc -DANSI_C_preprocessor=0 to force use of /**/, instead of '##'. + AND . The pre-ANSI preprocessor, i.e. use cc -Yp,/usr/lib +The same problem with a similar solution exists on the HP. + +o Sun +Old versions of cc(1), say <~1986, may require help for cfortran.h applications: + . #pragma may not be understood, hence cfortran.h and cfortest.c may require + sun> mv cfortran.h cftmp.h && grep -v "^#pragma" cfortran.h + sun> mv cfortest.c cftmp.c && grep -v "^#pragma" cfortest.c + . Old copies of math.h may not include the following from a newer math.h. + [For an ancient math.h on a 386 or sparc, get similar from a new math.h.] + #ifdef mc68000 /* 5 lines Copyright (c) 1988 by Sun Microsystems, Inc. */ + #define FLOATFUNCTIONTYPE int + #define RETURNFLOAT(x) return (*(int *)(&(x))) + #define ASSIGNFLOAT(x,y) *(int *)(&x) = y + #endif + +o CRAY, Sun, Apollo [pre 6.8 cc], VAX Ultrix and HP9000 + Only FORTRAN routines with less than 15 arguments can be prototyped for C, +since these compilers don't allow more than 31 arguments to a C macro. This can +be overcome, [see Section IV], with access to any C compiler without this +limitation, e.g. gcc, on ANY machine. + +o VAX Ultrix + vcc (1) with f77 is not supported. Although: +VAXUltrix> f77 -c cfortex.f +VAXUltrix> vcc -o cfortest cfortest.c cfortex.o -lI77 -lU77 -lF77 && cfortest +will link and run. However, the FORTRAN standard I/O is NOT merged with the +stdin and stdout of C, and instead uses the files fort.6 and fort.5. For vcc, +f77 can't drive the linking, as for gcc and cc, since vcc objects must be +linked using lk (1). f77 -v doesn't tell much, and without VAX Ultrix manuals, +the author can only wait for the info. required. + + fort (1) is not supported. Without VAX Ultrix manuals the author cannot +convince vcc/gcc/cc and fort to generate names of routines and COMMON blocks +that match at the linker, lk (1). i.e. vcc/gcc/cc prepend a single underscore +to external references, e.g. NAME becomes _NAME, while fort does not modify the +references. So ... either fort has prepend an underscore to external +references, or vcc/gcc/cc have to generate unmodified names. man 1 fort +mentions JBL, is JBL the only way? + +o VAX VMS C + The compiler 'easily' exhausts its table space and generates: +%CC-F-BUGCHECK, Compiler bug check during parser phase . + Submit an SPR with a problem description. + At line number 777 in DISK:[DIR]FILE.C;1. +where the line given, '777', includes a call across C and FORTRAN via +cfortran.h, usually with >7 arguments and/or very long argument expressions. +This SPR can be staved off, with the simple modification to cfortran.h, such +that the relevant CCALLSFSUBn (or CCALLSFFUNn or FCALLSCFUNn) is not +cascaded up to CCALLSFSUB14, and instead has its own copy of the contents of +CCALLSFSUB14. [If these instructions are not obvious after examining cfortran.h +please contact the author.] +[Thanks go to Mark Kyprianou (kyp@stsci.edu) for this solution.] + +o Mips compilers + e.g. DECstations and SGI, require applications with a C main() and calls to +GETARG(3F), i.e. FORTRAN routines returning the command line arguments, to use +two macros as shown: + : +CF_DECLARE_GETARG; /* This must be external to all routines. */ + : +main(int argc, char *argv[]) +{ + : +CF_SET_GETARG(argc,argv); /* This must precede any calls to GETARG(3F). */ + : +} +The macros are null and benign on all other systems. Sun's GETARG(3F) also +doesn't work with a generic C main() and perhaps a workaround similar to the +Mips' one exists. + +o Alpha/OSF +Using the DEC Fortran and the DEC C compilers of DEC OSF/1 [RT] V1.2 (Rev. 10), +Fortran, when called from C, has occasional trouble using a routine received as +a dummy argument. + +e.g. In the following the Fortran routine 'e' will crash when it tries to use + the C routine 'c' or the Fortran routine 'f'. + The example works on other systems. + +C FORTRAN /* C */ + integer function f() #include + f = 2 int f_(); + return int e_(int (*u)()); + end + int c(){ return 1;} + integer function e(u) int d (int (*u)()) { return u();} + integer u + external u main() + e=u() { /* Calls to d work. */ + return printf("d (c ) returns %d.\n",d (c )); + end printf("d (f_) returns %d.\n",d (f_)); + /* Calls to e_ crash. */ + printf("e_(c ) returns %d.\n",e_(c )); + printf("e_(f_) returns %d.\n",e_(f_)); + } + +Solutions to the problem are welcomed! +A kludge which allows the above example to work correctly, requires an extra +argument to be given when calling the dummy argument function. +i.e. Replacing 'e=u()' by 'e=u(1)' allows the above example to work. + + +o The FORTRAN routines are called using macro expansions, therefore the usual +caveats for expressions in arguments apply. The expressions to the routines may +be evaluated more than once, leading to lower performance and in the worst case +bizarre bugs. + +o For those who wish to use cfortran.h in large applications. [See Section IV.] +This release is intended to make it easy to get applications up and running. +This implies that applications are not as efficient as they could be: +- The current mechanism is inefficient if a single header file is used to + describe a large library of FORTRAN functions. Code for a static wrapper fn. + is generated in each piece of C source code for each FORTRAN function + specified with the CCALLSFFUNn statement, irrespective of whether or not the + function is ever called. +- Code for several static utility routines internal to cfortran.h is placed + into any source code which #includes cfortran.h. These routines should + probably be in a library. + + +i) Calling FORTRAN routines from C: + -------------------------------- + +The FORTRAN routines are defined by one of the following two instructions: + +for a SUBROUTINE: +/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */ +PROTOCCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n) +#define Routine_name(argname_1,..,argname_n) \ +CCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \ + argname_1,..,argname_n) + +for a FUNCTION: +PROTOCCALLSFFUNn(routine_type,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n) +#define Routine_name(argname_1,..,argname_n) \ +CCALLSFFUNn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \ + argname_1,..,argname_n) + +Where: +'n' = 0->14 [SUBROUTINE's ->27] (easily expanded in cfortran.h to > 14 [27]) is + the number of arguments to the routine. +Routine_name = C name of the routine (IN UPPER CASE LETTERS).[see 2.below] +ROUTINE_NAME = FORTRAN name of the routine (IN UPPER CASE LETTERS). +routine_name = FORTRAN name of the routine (IN lower case LETTERS). +routine_type = the type of argument returned by FORTRAN functions. + = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID. + [Instead of VOID one would usually use CCALLSFSUBn. + VOID forces a wrapper function to be used.] +argtype_i = the type of argument passed to the FORTRAN routine and must be + consistent in the definition and prototyping of the routine s.a. + = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING. + For vectors, i.e. 1 dim. arrays use + = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV, + STRINGV, ZTRINGV. + For vectors of vectors, i.e. 2 dim. arrays use + = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV. + For n-dim. arrays, 1<=n<=7 [7 is the maximum in Fortran 77], + = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V, + LONGV..V, SHORTV..V. + N.B. Array dimensions and types are checked by the C compiler. + For routines changing the values of an argument, the keyword is + prepended by a 'P'. + = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT, + PSTRING, PSTRINGV, PZTRINGV. + For EXTERNAL procedures passed as arguments use + = ROUTINE. + For exceptional arguments which require no massaging to fit the + argument passing mechanisms use + = PVOID. + The argument is cast and passed as (void *). + Although PVOID could be used to describe all array arguments on + most (all?) machines , it shouldn't be because the C compiler + can no longer check the type and dimension of the array. +argname_i = any valid unique C tag, but must be consistent in the definition + as shown. + +Notes: + +1. cfortran.h may be expanded to handle a more argument type. To suppport new +arguments requiring complicated massaging when passed between Fortran and C, +the user will have to understand cfortran.h and follow its code and mechanisms. + +To define types requiring little or no massaging when passed between Fortran +and C, the pseudo argument type SIMPLE may be used. +For a user defined type called 'newtype', the definitions required are: + +/* The following 7 lines are required verbatim. + 'newtype' is the name of the new user defined argument type. +*/ +#define newtype_cfV( T,A,B,F) SIMPLE_cfV(T,A,B,F) +#define newtype_cfSEP(T, B) SIMPLE_cfSEP(T,B) +#define newtype_cfINT(N,A,B,X,Y,Z) SIMPLE_cfINT(N,A,B,X,Y,Z) +#define newtype_cfSTR(N,T,A,B,C,D,E) SIMPLE_cfSTR(N,T,A,B,C,D,E) +#define newtype_cfCC( T,A,B) SIMPLE_cfCC(T,A,B) +#define newtype_cfAA( T,A,B) newtype_cfB(T,A) /* Argument B not used. */ +#define newtype_cfU( T,A) newtype_cfN(T,A) + +/* 'parameter_type(A)' is a declaration for 'A' and describes the type of the +parameter expected by the Fortran function. This type will be used in the +prototype for the function, if using ANSI C, and to declare the argument used +by the intermediate function if calling a Fortran FUNCTION. +Valid 'parameter_type(A)' include: int A + void (*A)() + double A[17] +*/ +#define newtype_cfN( T,A) parameter_type(A) /* Argument T not used. */ + +/* Before any argument of the new type is passed to the Fortran routine, it may +be massaged as given by 'massage(A)'. +*/ +#define newtype_cfB( T,A) massage(A) /* Argument T not used. */ + +An example of a simple user defined type is given cfortex.f and cfortest.c. +Two uses of SIMPLE user defined types are [don't show the 7 verbatim #defines]: + +/* Pass the address of a structure, using a type called PSTRUCT */ +#define PSTRUCT_cfN( T,A) void *A +#define PSTRUCT_cfB( T,A) (void *) &(A) + +/* Pass an integer by value, (not standard F77 ), using a type called INTVAL */ +#define INTVAL_cfN( T,A) int A +#define INTVAL_cfB( T,A) (A) + +[If using VAX VMS, surrounding the #defines with "#pragma (no)standard" allows + the %CC-I-PARAMNOTUSED messages to be avoided.] + +Upgrades to cfortran.h try to be, and have been, backwards compatible. This +compatibility cannot be offered to user defined types. SIMPLE user defined +types are less of a risk since they require so little effort in their creation. +If a user defined type is required in more than one C header file of interfaces +to libraries of Fortran routines, good programming practice, and ease of code +maintenance, suggests keeping any user defined type within a single file which +is #included as required. To date, changes to the SIMPLE macros were introduced +in versions 2.6, 3.0 and 3.2 of cfortran.h. + + +2. Routine_name is the name of the macro which the C programmer will use in +order to call a FORTRAN routine. In theory Routine_name could be any valid and +unique name, but in practice, the name of the FORTRAN routine in UPPER CASE +works everywhere and would seem to be an obvious choice. + + +3. + +cfortran.h encourages the exact specification of the type and dimension of +array parameters because it allows the C compiler to detect errors in the +arguments when calling the routine. + +cfortran.h does not strictly require the exact specification since the argument +is merely the address of the array and is passed on to the calling routine. +Any array parameter could be declared as PVOID, but this circumvents +C's compiletime ability to check the correctness of arguments and is therefore +discouraged. + +Passing the address of these arguments implies that PBYTEV, PFLOATV, ... , +PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the +calling code share the same array, i.e. the same values at the same memory +location. + +These comments do NOT apply to arrays of (P)S/ZTRINGV. For these parameters, +cfortran.h passes a massaged copy of the array to the routine. When the routine +returns, S/ZTRINGV ignores the copy, while PS/ZTRINGV replaces the calling +code's original array with copy, which may have been modified by the called +routine. + + +4. (P)STRING(V): +- STRING - If the argument is a fixed length character array, e.g. char ar[8];, +the string is blank, ' ', padded on the right to fill out the array before +being passed to the FORTRAN routine. The useful size of the string is the same +in both languages, e.g. ar[8] is passed as character*7. If the argument is a +pointer, the string cannot be blank padded, so the length is passed as +strlen(argument). On return from the FORTRAN routine, pointer arguments are not +disturbed, but arrays have the terminating '\0' replaced to its original +position. i.e. The padding blanks are never visible to the C code. + +- PSTRING - The argument is massaged as with STRING before being passed to the +FORTRAN routine. On return, the argument has all trailing blanks removed, +regardless of whether the argument was a pointer or an array. + +- (P)STRINGV - Passes a 1- or 2-dimensional char array. e.g. char a[7],b[6][8]; +STRINGV may thus also pass a string constant, e.g. "hiho". +(P)STRINGV does NOT pass a pointer, e.g. char *, to either a 1- or a +2-dimensional array, since it cannot determine the array dimensions. +A pointer can only be passed using (P)ZTRINGV. +N.B. If a C routine receives a character array argument, e.g. char a[2][3], + such an argument is actually a pointer and my thus not be passed by + (P)STRINGV. Instead (P)ZTRINGV must be used. + +- STRINGV - The elements of the argument are copied into space malloc'd, and +each element is padded with blanks. The useful size of each element is the same +in both languages. Therefore char bb[6][8]; is equivalent to character*7 bb(6). +On return from the routine the malloc'd space is simply released. + +- PSTRINGV - Since FORTRAN has no trailing '\0', elements in an array of +strings are contiguous. Therefore each element of the C array is padded with +blanks and strip out C's trailing '\0'. After returning from the routine, the +trailing '\0' is reinserted and kill the trailing blanks in each element. + +- SUMMARY: STRING(V) arguments are blank padded during the call to the FORTRAN +routine, but remain original in the C code. (P)STRINGV arguments are blank +padded for the FORTRAN call, and after returning from FORTRAN trailing blanks +are stripped off. + + +5. (P)ZTRINGV: +- (P)ZTRINGV - is identical to (P)STRINGV, +except that the dimensions of the array of strings is explicitly specified, +which thus also allows a pointer to be passed. +(P)ZTRINGV can thus pass a 1- or 2-dimensional char array, e.g. char b[6][8], +or it can pass a pointer to such an array, e.g. char *p;. +ZTRINGV may thus also pass a string constant, e.g. "hiho". +If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1. +[Users of (P)ZTRINGV should examine cfortest.c for examples.]: + +- (P)ZTRINGV must thus be used instead of (P)STRINGV whenever sizeof() +can't be used to determine the dimensions of the array of string or strings. +e.g. when calling FORTRAN from C with a char * received by C as an argument. + +- There is no (P)ZTRING type, since (P)ZTRINGV can pass a 1-dimensional +array or a pointer to such an array, e.g. char a[7], *b; +If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1. + +- To specify the numbers of elements, +routine_name_ELEMS_j and routine_name_ELEMLEN_j must be defined as shown below +before interfacing the routine with CCALLSFSUBn, PROTOCCALLSFFUNn, etc. + +#define routine_name_ELEMS_j ZTRINGV_ARGS(k) + [..ARGS for subroutines, ..ARGF for functions.] +or +#define routine_name_ELEMS_j ZTRINGV_NUM(l) +Where: routine_name is as above. + j [1-n], is the argument being specifying. + k [1-n], the value of the k'th argument is the dynamic number + of elements for argument j. The k'th argument must be + of type BYTE, DOUBLE, FLOAT, INT, LONG or SHORT. + l the number of elements for argument j. This must be an + integer constant available at compile time. + i.e. it is static. + +- Similarly to specify the useful length, [i.e. don't count C's trailing '\0',] +of each element: +#define routine_name_ELEMLEN_j ZTRINGV_ARGS(m) + [..ARGS for subroutines, ..ARGF for functions.] +or +#define routine_name_ELEMLEN_j ZTRINGV_NUM(q) +Where: m [1-n], as for k but this is the length of each element. + q as for l but this is the length of each element. + + +6. ROUTINE +The argument is an EXTERNAL procedure. + +When C passes a routine to Fortran, the language of the function must be +specified as follows: [The case of some_*_function must be given as shown.] + +When C passes a C routine to a Fortran: + FORTRAN_ROUTINE(arg1, .... , + C_FUNCTION(SOME_C_FUNCTION,some_c_function), + ...., argn); + +and similarly when C passes a Fortran routine to Fortran: + FORTRAN_ROUTINE(arg1, .... , + FORTRAN_FUNCTION(SOME_FORT_FUNCTION,some_fort_function), + ...., argn); + +If fcallsc has been redefined; the same definition of fcallsc used when creating +the wrapper for 'some_c_function' must also be defined when C_FUNCTION is used. +See ii) 4. of this section for when and how to redefine fcallsc. + +ROUTINE was introduced with cfortran.h version 2.6. Earlier versions of +cfortran.h used PVOID to pass external procedures as arguments. Using PVOID for +this purpose is no longer recommended since it won't work 'as is' for +apolloFortran, hpuxFortran800, AbsoftUNIXFortran, AbsoftProFortran. + +7. CRAY only: +In a given piece of source code, where FFUNC is any FORTRAN routine, +FORTRAN_FUNCTION(FFUNC,ffunc) +disallows a previous +#define FFUNC(..) CCALLSFSUBn(FFUNC,ffunc,...) [ or CCALLSFFUNn] +in order to make the UPPER CASE FFUNC callable from C. +#define Ffunc(..) ... is OK though, as are obviously any other names. + + +ii) Calling C routines from FORTRAN: + -------------------------------- + +Each of the following two statements to export a C routine to FORTRAN create +FORTRAN 'wrappers', written in C, which must be compiled and linked along with +the original C routines and with the FORTRAN calling code. + +FORTRAN callable 'wrappers' may also be created for C macros. i.e. in this +section, the term 'C function' may be replaced by 'C macro'. + +for C functions returning void: +FCALLSCSUBn( Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n) + +for all other C functions: +FCALLSCFUNn(routine_type,Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n) + +Where: +'n' = 0->27 (easily expanded to > 27) stands for the number of arguments to the + routine. +Routine_name = the C name of the routine. [see 9. below] +ROUTINE_NAME = the FORTRAN name of the routine (IN UPPER CASE LETTERS). +routine_name = the FORTRAN name of the routine (IN lower case LETTERS). +routine_type = the type of argument returned by C functions. + = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID. + [Instead of VOID, FCALLSCSUBn is recommended.] +argtype_i = the type of argument passed to the FORTRAN routine and must be + consistent in the definition and prototyping of the routine + = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING. + For vectors, i.e. 1 dim. arrays use + = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV, STRINGV. + For vectors of vectors, 2 dim. arrays use + = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV. + For n-dim. arrays use + = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V, + LONGV..V, SHORTV..V. + For routines changing the values of an argument, the keyword is + prepended by a 'P'. + = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT, + PSTRING, PNSTRING, PPSTRING, PSTRINGV. + For EXTERNAL procedures passed as arguments use + = ROUTINE. + For exceptional arguments which require no massaging to fit the + argument passing mechanisms use + = PVOID. + The argument is cast and passed as (void *). + + +Notes: + +0. For Fortran calling C++ routines, C++ does NOT easily allow support for: + STRINGV. + BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV. + BYTEV..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V, LONGV..V, SHORTV..V. +Though there are ways to get around this restriction, +the restriction is not serious since these types are unlikely to be used as +arguments for a C++ routine. + +1. FCALLSCSUB/FUNn expect that the routine to be 'wrapped' has been properly +prototyped, or at least declared. + + +2. cfortran.h may be expanded to handle a new argument type not already among +the above. + + +3. + +cfortran.h encourages the exact specification of the type and dimension of +array parameters because it allows the C compiler to detect errors in the +arguments when declaring the routine using FCALLSCSUB/FUNn, assuming the +routine to be 'wrapped' has been properly prototyped. + +cfortran.h does not strictly require the exact specification since the argument +is merely the address of the array and is passed on to the calling routine. +Any array parameter could be declared as PVOID, but this circumvents +C's compiletime ability to check the correctness of arguments and is therefore +discouraged. + +Passing the address of these arguments implies that PBYTEV, PFLOATV, ... , +PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the +calling code share the same array, i.e. the same values at the same memory +location. + +These comments do NOT apply to arrays of (P)STRINGV. For these parameters, +cfortran.h passes a massaged copy of the array to the routine. When the routine +returns, STRINGV ignores the copy, while PSTRINGV replaces the calling +code's original array with copy, which may have been modified by the called +routine. + + +4. (P(N))STRING arguments have any trailing blanks removed before being passed +to C, the same holds true for each element in (P)STRINGV. Space is malloc'd in +all cases big enough to hold the original string (elements) as well as C's +terminating '\0'. i.e. The useful size of the string (elements) is the same in +both languages. P(N)STRING(V) => the string (elements) will be copied from the +malloc'd space back into the FORTRAN bytes. If one of the two escape mechanisms +mentioned below for PNSTRING has been used, the copying back to FORTRAN is +obviously not relevant. + + +5. (PN)STRING's, [NOT PSTRING's nor (P)STRINGV's,] behavior may be overridden +in two cases. In both cases PNSTRING and STRING behave identically. + +a) If a (PN)STRING argument's first 4 bytes are all the NUL character, +i.e. '\0\0\0\0' the NULL pointer is passed to the C routine. + +b) If the characters of a (PN)STRING argument contain at least one HEX-00, i.e. +the NUL character, i.e. C strings' terminating '\0', the address of the string +is simply passed to the C routine. i.e. The argument is treated in this case as +it would be with PPSTRING, to which we refer the reader for more detail. + +Mechanism a) overrides b). Therefore, to use this mechanism to pass the NULL +string, "", to C, the first character of the string must obviously be the NUL +character, but of the first 4 characters in the string, at least one must not +be HEX-00. + +Example: +C FORTRAN /* C */ + character*40 str #include "cfortran.h" +C Set up a NULL as : void cs(char *s) {if (s) printf("%s.\n",s);} +C i) 4 NUL characters. FCALLSCSUB1(cs,CS,cs,STRING) +C ii) NULL pointer. + character*4 NULL + NULL = CHAR(0)//CHAR(0)//CHAR(0)//CHAR(0) + + data str/'just some string'/ + +C Passing the NULL pointer to cs. + call cs(NULL) +C Passing a copy of 'str' to cs. + call cs(str) +C Passing address of 'str' to cs. Trailing blanks NOT killed. + str(40:) = NULL + call cs(str) + end + +Strings passed from Fortran to C via (PN)STRING must not have undefined +contents, otherwise undefined behavior will result, since one of the above two +escape mechanisms may occur depending on the contents of the string. + +This is not be a problem for STRING arguments, which are read-only in the C +routine and hence must have a well defined value when being passed in. + +PNSTRING arguments require special care. Even if they are write-only in the C +routine, PNSTRING's above two escape mechanisms require that the value of the +argument be well defined when being passed in from Fortran to C. Therefore, +unless one or both of PNSTRING's escape mechanisms are required, PSTRING should +be used instead of PNSTRING. +Prior to version 2.8, PSTRING did have the above two escape mechanisms, +but they were removed from PSTRING to allow strings with undefined contents to +be passed in. PNSTRING behaves like the old PSTRING. +[Thanks go to Paul Dubois (dubios@icf.llnl.gov) for pointing out that PSTRING + must allow for strings with undefined contents to be passed in.] + +Example: +C FORTRAN /* C */ + character*10 s,sn #include "cfortran.h" + void ps(char *s) {strcpy(s,"hello");} +C Can call ps with undef. s. FCALLSCSUB1(ps,PS,ps,PSTRING) + call ps(s) FCALLSCSUB1(ps,PNS,pns,PNSTRING) + print *,s,'=s' + +C Can't call pns with undef. s. +C e.g. If first 4 bytes of s were +C "\0\0\0\0", ps would try +C to copy to NULL because +C of PNSTRING mechanism. + sn = "" + call pns(sn) + print *,sn,'=sn' + + end + + +6. PPSTRING +The address of the string argument is simply passed to the C routine. Therefore +the C routine and the FORTRAN calling code share the same string at the same +memory location. If the C routine modifies the string, the string will also be +modified for the FORTRAN calling code. +The user is responsible for negociating the differences in representation of a +string in Fortran and in C, i.e. the differences are not automatically resolved +as they are for (P(N)STRING(V). +This mechanism is provided for two reasons: + - Some C routines require the string to exist at the given memory location, + after the C routine has exited. Recall that for the usual (P(N)STRING(V) + mechanism, a copy of the FORTRAN string is given to the C routine, and this + copy ceases to exist after returning to the FORTRAN calling code. + - This mechanism can save runtime CPU cycles over (P(N)STRING(V), since it + does not perform their malloc, copy and kill trailing blanks of the string + to be passed. + Only in a small minority of cases does the potential benefit of the saved + CPU cycles outweigh the programming effort required to manually resolve + the differences in representation of a string in Fortran and in C. + +For arguments passed via PPSTRING, the argument passed may also be an array of +strings. + + +7. ROUTINE +ANSI C requires that the type of the value returned by the routine be known, +For all ROUTINE arguments passed from Fortran to C, the type of ROUTINE is +specified by defining a cast as follows: + +#undef ROUTINE_j +#define ROUTINE_j (cast) +where: + j [1-n], is the argument being specifying. + (cast) is a cast matching that of the argument expected by the C + function protoytpe for which a wrapper is being defined. + +e.g. To create a Fortran wrapper for qsort(3C): +#undef ROUTINE_4 +#define ROUTINE_4 (int (*)(void *,void *)) +FCALLSCSUB4(qsort,FQSORT,fqsort,PVOID,INT,INT,ROUTINE) + +In order to maintain backward compatibility, cfortran.h defines a generic cast +for ROUTINE_1, ROUTINE_2, ..., ROUTINE_27. The user's definition is therefore +strictly required only for DEC C, which at the moment is the only compiler +which insists on the correct cast for pointers to functions. + +When using the ROUTINE argument inside some Fortran code: +- it is difficult to pass a C routine as the parameter, + since in many Fortran implementations, + Fortran has no access to the normal C namespace. + e.g. For most UNIX, + Fortran implicitly only has access to C routines ending in _. + If the calling Fortran code receives the routine as a parameter + it can of course easily pass it along. +- if a Fortran routine is passed directly as the parameter, + the called C routine must call the parameter routine + using the Fortran argument passing conventions. +- if a Fortran routine is to be passed as the parameter, + but if Fortran can be made to pass a C routine as the parameter, + then it may be best to pass a C-callable wrapper for the Fortran routine. + The called C routine is thus spared all Fortran argument passing conventions. + cfortran.h can be used to create such a C-callable wrapper + to the parameter Fortran routine. + +ONLY PowerStationFortran: +This Fortran provides no easy way to pass a Fortran routine as an argument to a +C routine. The problem arises because in Fortran the stack is cleared by the +called routine, while in C/C++ it is cleared by the caller. +The C/C++ stack clearing behavior can be changed to that of Fortran by using +stdcall__ in the function prototype. The stdcall__ cannot be applied in this +case since the called C routine expects the ROUTINE parameter to be a C routine +and does not know that it should apply stdcall__. +In principle the cfortran.h generated Fortran callable wrapper for the called C +routine should be able to massage the ROUTINE argument such that stdcall__ is +performed, but it is not yet known how this could be easily done. + + +8. THE FOLLOWING INSTRUCTIONS ARE NOT REQUIRED FOR VAX VMS + ------------ +(P)STRINGV information [NOT required for VAX VMS]: cfortran.h cannot convert +the FORTRAN vector of STRINGS to the required C vector of STRINGS without +explicitly knowing the number of elements in the vector. The application must +do one of the following for each (P)STRINGV argument in a routine before that +routine's FCALLSCFUNn/SUBn is called: + +#define routine_name_STRV_Ai NUM_ELEMS(j) + or +#define routine_name_STRV_Ai NUM_ELEM_ARG(k) + or +#define routine_name_STRV_Ai TERM_CHARS(l,m) + +where: routine_name is as above. + i [i=1->n.] specifies the argument number of a STRING VECTOR. + j would specify a fixed number of elements. + k [k=1->n. k!=i] would specify an integer argument which specifies the + number of elements. + l [char] the terminating character at the beginning of an + element, indicating to cfortran.h that the preceding + elements in the vector are the valid ones. + m [m=1-...] the number of terminating characters required to appear + at the beginning of the terminating string element. + The terminating element is NOT passed on to + the C routine. + +e.g. #define ce_STRV_A1 TERM_CHARS(' ',2) + FCALLSCSUB1(ce,CE,ce,STRINGV) + +cfortran.h will pass on all elements, in the 1st and only argument to the C +routine ce, of the STRING VECTOR until, but not including, the first string +element beginning with 2 blank, ' ', characters. + + +9. INSTRUCTIONS REQUIRED ONLY FOR FORTRAN COMPILERS WHICH GENERATE + ------------- + ROUTINE NAMES WHICH ARE UNDISTINGUISHABLE FROM C ROUTINE NAMES + i.e. VAX VMS + AbsoftUNIXFortran (AbsoftProFortran ok, since it uses Uppercase names.) + HP9000 if not using the +ppu option of f77 + IBM RS/6000 if not using the -qextname option of xlf + Call them the same_namespace compilers. + +FCALLSCSUBn(...) and FCALLSCFUNn(...), when compiled, are expanded into +'wrapper' functions, so called because they wrap around the original C +functions and interface the format of the original C functions' arguments and +return values with the format of the FORTRAN call. + +Ideally one wants to be able to call the C routine from FORTRAN using the same +name as the original C name. This is not a problem for FORTRAN compilers which +append an underscore, '_', to the names of routines, since the original C +routine has the name 'name', and the FORTRAN wrapper is called 'name_'. +Similarly, if the FORTRAN compiler generates upper case names for routines, the +original C routine 'name' can have a wrapper called 'NAME', [Assuming the C +routine name is not in upper case.] For these compilers, e.g. Mips, CRAY, IBM +RS/6000 'xlf -qextname', HP-UX 'f77 +ppu', the naming of the wrappers is done +automatically. + +For same_namespace compilers things are not as simple, but cfortran.h tries to +provide tools and guidelines to minimize the costs involved in meeting their +constraints. The following two options can provide same_namespace compilers +with distinct names for the wrapper and the original C function. + +These compilers are flagged by cfortran.h with the CF_SAME_NAMESPACE constant, +so that the change in the C name occurs only when required. + +For the remainder of the discussion, routine names generated by FORTRAN +compilers are referred to in lower case, these names should be read as upper +case for the appropriate compilers. + + +HP9000: (When f77 +ppu is not used.) +f77 has a -U option which forces uppercase external names to be generated. +Unfortunately, cc does not handle recursive macros. Hence, if one wished to use +-U for separate C and FORTRAN namespaces, one would have to adopt a different +convention of naming the macros which allow C to call FORTRAN subroutines. +(Functions are not a problem.) The macros are currently the uppercase of the +original FORTRAN name, and would have to be changed to lower case or mixed +case, or to a different name. (Lower case would of course cause conflicts on +many other machines.) Therefore, it is suggested that f77 -U not be used, and +instead that Option a) or Option b) outlined below be used. + + +VAX/VMS: +For the name used by FORTRAN in calling a C routine to be the same as that of +the C routine, the source code of the C routine is required. A preprocessor +directive can then force the C compiler to generate a different name for the C +routine. +e.g. #if defined(vms) + #define name name_ + #endif + void name() {printf("name: was called.\n");} + FCALLSCSUB0(name,NAME,name) + +In the above, the C compiler generates the original routine with the name +'name_' and a wrapper called 'NAME'. This assumes that the name of the routine, +as seen by the C programmer, is not in upper case. The VAX VMS linker is not +case sensitive, allowing cfortran.h to export the upper case name as the +wrapper, which then doesn't conflict with the routine name in C. Since the IBM, +HP and AbsoftUNIXFortran platforms have case sensitive linkers +this technique is not available to them. + +The above technique is required even if the C name is in mixed case, see +Option a) for the other compilers, but is obviously not required when +Option b) is used. + + +Option a) Mixed Case names for the C routines to be called by FORTRAN. + +If the original C routines have mixed case names, there are no name space +conflicts. + +Nevertheless for VAX/VMS, the technique outlined above must also used. + + +Option b) Modifying the names of C routines when used by FORTRAN: + +The more robust naming mechanism, which guarantees portability to all machines, +'renames' C routines when called by FORTRAN. Indeed, one must change the names +on same_namespace compilers when FORTRAN calls C routines for which the source +is unavailable. [Even when the source is available, renaming may be preferable +to Option a) for large libraries of C routines.] + +Obviously, if done for a single type of machine, it must be done for all +machines since the names of routines used in FORTRAN code cannot be easily +redefined for different machines. + +The simplest way to achieve this end is to do explicitly give the modified +FORTRAN name in the FCALLSCSUBn(...) and FCALLSCFUNn(...) declarations. e.g. + +FCALLSCSUB0(name,CFNAME,cfname) + +This allows FORTRAN to call the C routine 'name' as 'cfname'. Any name can of +course be used for a given routine when it is called from FORTRAN, although +this is discouraged due to the confusion it is sure to cause. e.g. Bizarre, +but valid and allowing C's 'call_back' routine to be called from FORTRAN as +'abcd': + +FCALLSCSUB0(call_back,ABCD,abcd) + + +cfortran.h also provides preprocessor directives for a systematic 'renaming' of +the C routines when they are called from FORTRAN. This is done by redefining +the fcallsc macro before the FCALLSCSUB/FUN/n declarations as follows: + +#undef fcallsc +#define fcallsc(UN,LN) preface_fcallsc(CF,cf,UN,LN) + +FCALLSCSUB0(hello,HELLO,hello) + +Will cause C's routine 'hello' to be known in FORTRAN as 'cfhello'. Similarly +all subsequent FCALLSCSUB/FUN/n declarations will generate wrappers to allow +FORTRAN to call C with the C routine's name prefaced by 'cf'. The following has +the same effect, with subsequent FCALLSCSUB/FUN/n's appending the modifier to +the original C routines name. + +#undef fcallsc +#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN) + +FCALLSCSUB0(Xroutine,ROUTINE,routine) + +Hence, C's Xroutine is called from FORTRAN as: + CALL XROUTINEY() + +The original behavior of FCALLSCSUB/FUN/n, where FORTRAN routine names are left +identical to those of C, is returned using: + +#undef fcallsc +#define fcallsc(UN,LN) orig_fcallsc(UN,LN) + + +In C, when passing a C routine, i.e. its wrapper, as an argument to a FORTRAN +routine, the FORTRAN name declared is used and the correct fcallsc must be in +effect. E.g. Passing 'name' and 'routine' of the above examples to the FORTRAN +routines, FT1 and FT2, respectively: + +/* This might not be needed if fcallsc is already orig_fcallsc. */ +#undef fcallsc +#define fcallsc(UN,LN) orig_fcallsc(UN,LN) +FT1(C_FUNCTION(CFNAME,cfname)); + +#undef fcallsc +#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN) +FT1(C_FUNCTION(XROUTINE,xroutine)); + +If the names of C routines are modified when used by FORTRAN, fcallsc would +usually be defined once in a header_file.h for the application. This definition +would then be used and be valid for the entire application and fcallsc would at +no point need to be redefined. + + +ONCE AGAIN: THE DEFINITIONS, INSTRUCTIONS, DECLARATIONS AND DIFFICULTIES +DESCRIBED HERE, NOTE 9. of II ii), +APPLY ONLY FOR VAX VMS, + IBM RS/6000 WITHOUT THE -qextname OPTION FOR xlf, OR + HP-UX WITHOUT THE +ppu OPTION FOR f77 + AbsoftUNIXFortran +AND APPLY ONLY WHEN CREATING WRAPPERS WHICH ENABLE FORTRAN TO CALL C ROUTINES. + + + +iii) Using C to manipulate FORTRAN COMMON BLOCKS: + ------------------------------------------------------- + +FORTRAN common blocks are set up with the following three constructs: + +1. +#define Common_block_name COMMON_BLOCK(COMMON_BLOCK_NAME,common_block_name) + +Common_block_name is in UPPER CASE. +COMMON_BLOCK_NAME is in UPPER CASE. +common_block_name is in lower case. +[Common_block_name actually follows the same 'rules' as Routine_name in Note 2. + of II i).] This construct exists to ensure that C code accessing the common +block is machine independent. + +2. +COMMON_BLOCK_DEF(TYPEDEF_OF_STRUCT, Common_block_name); + +where +typedef { ... } TYPEDEF_OF_STRUCT; +declares the structure which maps on to the common block. The #define of +Common_block_name must come before the use of COMMON_BLOCK_DEF. + +3. +In exactly one of the C source files, storage should be set aside for the +common block with the definition: + +TYPEDEF_OF_STRUCT Common_block_name; + +The above definition may have to be omitted on some machines for a common block +which is initialized by Fortran BLOCK DATA or is declared with a smaller size +in the C routines than in the Fortran routines. + +The rules for common blocks are not well defined when linking/loading a mixture +of C and Fortran, but the following information may help resolve problems. + +From the 2nd or ANSI ed. of K&R C, p.31, last paragraph: +i) + An external variable must be defined, exactly once, outside of any function; + this sets aside storage for it. +ii) + The variable must also be declared in each function that wants to access it; + ... + The declaration ... may be implicit from context. + +In Fortran, every routine says 'common /bar/ foo', +i.e. part ii) of the above, but there's no part i) requirement. +cc/ld on some machines don't require i) either. +Therefore, when handling Fortran, and sometimes C, +the loader/linker must automagically set aside storage for common blocks. + +Some loaders, including at least one for the CRAY, turn off the +'automagically set aside storage' capability for Fortran common blocks, +if any C object declares that common block. +Therefore, C code should define, i.e. set aside storage, +for the the common block as shown above. + +e.g. +C Fortran + common /fcb/ v,w,x + character *(13) v, w(4), x(3,2) + +/* C */ +typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF; +#define Fcb COMMON_BLOCK(FCB,fcb) +COMMON_BLOCK_DEF(FCB_DEF,Fcb); +FCB_DEF Fcb; /* Definition, which sets aside storage for Fcb, */ + /* may appear in at most one C source file. */ + + +C programs can place a string (or a multidimensional array of strings) into a +FORTRAN common block using the following call: + +C2FCBSTR( CSTR, FSTR,DIMENSIONS); + +where: + +CSTR is a pointer to the first element of C's copy of the string (array). + The C code must use a duplicate of, not the original, common block string, + because the FORTRAN common block does not allocate space for C strings' + terminating '\0'. + +FSTR is a pointer to the first element of the string (array) in the common + block. + +DIMENSIONS is the number of dimensions of string array. + e.g. char a[10] has DIMENSIONS=0. + char aa[10][17] has DIMENSIONS=1. + etc... + +C2FCBSTR will copy the string (array) from CSTR to FSTR, padding with blanks, +' ', the trailing characters as required. C2FCBSTR uses DIMENSIONS and FSTR to +determine the lengths of the individual string elements and the total number of +elements in the string array. + +Note that: +- the number of string elements in CSTR and FSTR are identical. +- for arrays of strings, the useful lengths of strings in CSTR and FSTR must be + the same. i.e. CSTR elements each have 1 extra character to accommodate the + terminating '\0'. +- On most non-ANSI compilers, the DIMENSION argument cannot be prepended by any + blanks. + + +FCB2CSTR( FSTR, CSTR,DIMENSIONS) + +is the inverse of C2FCBSTR, and shares the same arguments and caveats. +FCB2CSTR copies each string element of FSTR to CSTR, minus FORTRAN strings' +trailing blanks. + + +cfortran.h USERS ARE STRONGLY URGED TO EXAMINE THE COMMON BLOCK EXAMPLES IN +cfortest.c AND cfortex.f. The use of strings in common blocks is +demonstrated, along with a suggested way for C to imitate FORTRAN EQUIVALENCE'd +variables. + + + ===> USERS OF CFORTRAN.H NEED READ NO FURTHER <=== + + +III Some Musings +---------------- + +cfortran.h is simple enough to be used by the most basic of applications, i.e. +making a single C/FORTRAN routine available to the FORTRAN/C programmers. Yet +cfortran.h is powerful enough to easily make entire C/FORTRAN libraries +available to FORTRAN/C programmers. + + +cfortran.h is the ideal tool for FORTRAN libraries which are being (re)written +in C, but are to (continue to) support FORTRAN users. It allows the routines to +be written in 'natural C', without having to consider the FORTRAN argument +passing mechanisms of any machine. It also allows C code accessing these +rewritten routines, to use the C entry point. Without cfortran.h, one risks the +perverse practice of C code calling a C function using FORTRAN argument passing +mechanisms! + + +Perhaps the philosophy and mechanisms of cfortran.h could be used and extended +to create other language bridges such as ADAFORTRAN, CPASCAL, COCCAM, etc. + + +The code generation machinery inside cfortran.h, i.e. the global structure is +quite good, being clean and workable as seen by its ability to meet the needs +and constraints of many different compilers. Though the individual instructions +of the A..., C..., T..., R... and K... tables deserve to be cleaned up. + + + +IV Getting Serious with cfortran.h +----------------------------------- + +cfortran.h is set up to be as simple as possible for the casual user. While +this ease of use will always be present, 'hooks', i.e. preprocessor directives, +are required in cfortran.h so that some of the following 'inefficiencies' can +be eliminated if they cause difficulties: + +o cfortran.h contains a few small routines for string manipulation. These +routines are declared static and are included and compiled in all source code +which uses cfortran.h. Hooks should be provided in cfortran.h to create an +object file of these routines, allowing cfortran.h to merely prototypes +these routines in the application source code. This is the only 'problem' which +afflicts both halves of cfortran.h. The remaining discussion refers to the C +calls FORTRAN half only. + +o Similar to the above routines, cfortran.h generates code for a 'wrapper' +routine for each FUNCTION exported from FORTRAN. Again cfortran.h needs +preprocessor directives to create a single object file of these routines, +and to merely prototype them in the applications. + +o Libraries often contain hundreds of routines. While the preprocessor makes +quick work of generating the required interface code from cfortran.h and the +application.h's, it may be convenient for very large stable libraries to have +final_application.h's which already contain the interface code, i.e. these +final_application.h's would not require cfortran.h. [The convenience can be +imagined for the VAX VMS CC compiler which has a fixed amount of memory for +preprocessor directives. Not requiring cfortran.h, with its hundreds of +directives, could help prevent this compiler from choking on its internal +limits quite so often.] + +With a similar goal in mind, cfortran.h defines 100's of preprocessor +directives. There is always the potential that these will clash with other tags +in the users code, so final_applications.h, which don't require cfortran.h, +also provide the solution. + +In the same vein, routines with more than 14 arguments can not be interfaced by +cfortran.h with compilers which limit C macros to 31 arguments. To resolve this +difficulty, final_application.h's can be created on a compiler without this +limitation. + +Therefore, new machinery is required to do: + +application.h + cfortran.h => final_application.h + +The following example may help clarify the means and ends: + +If the following definition of the HBOOK1 routine, the /*commented_out_part*/, +is passed through the preprocessor [perhaps #undefing and #defining preprocessor +constants if creating an application.h for compiler other than that of the +preprocessor being used, e.g. cpp -Umips -DCRAY ... ] : + +#include "cfortran.h" +PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT) +/*#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \*/ + CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \ + ID,CHTITLE,NX,XMI,XMA,VMX) + +A function prototype is produced by the PROTOCCALLSFSUB6(...). +Interface code is produced, based on the 'variables', +ID,CHTITLE,NX,XMI,XMA,VMX, which will correctly massage a HBOOK1 call. +Therefore, adding the #define line: + +'prototype code' +#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \ + 'interface code'(ID,CHTITLE,NX,XMI,XMA,VMX) + +which is placed into final_application.h. + +The only known limitation of the above method does not allow the 'variable' +names to include B1,B2,...,B9,BA,BB,... + +Obviously the machinery to automatically generate final_applications.h from +cfortran.h and applications.h needs more than just some preprocessor +directives, but a fairly simple unix shell script should be sufficient. Any +takers? + + + +V Machine Dependencies of cfortran.h +------------------------------------ + +Porting cfortran.h applications, e.g. the hbook.h and cstring.c mentioned +above, to other machines is trivial since they are machine independent. Porting +cfortran.h requires a solid knowledge of the new machines C preprocessor, and +its FORTRAN argument passing mechanisms. Logically cfortran.h exists as two +halves, a "C CALLS FORTRAN" and a "FORTRAN CALLS C" utility. In some cases it +may be perfectly reasonable to port only 'one half' of cfortran.h onto a new +system. + + +The lucky programmer porting cfortran.h to a new machine, must discover the +FORTRAN argument passing mechanisms. A safe starting point is to assume that +variables and arrays are simply passed by reference, but nothing is guaranteed. +Strings, and n-dimensional arrays of strings are a different story. It is +doubtful that any systems do it quite like VAX VMS does it, so that a UNIX or +f2c versions may provide an easier starting point. + + +cfortran.h uses and abuses the preprocessor's ## operator. Although the ## +operator does not exist in many compilers, many kludges do. cfortran.h uses +/**/ with no space allowed between the slashes, '/', and the macros or tags +to be concatenated. e.g. +#define concat(a,b) a/**/b /* works*/ +main() +{ + concat(pri,ntf)("hello"); /* e.g. */ +} +N.B. On some compilers without ##, /**/ may also not work. The author may be +able to offer alternate kludges. + + + +VI Bugs in vendors C compilers and other curiosities +---------------------------------------------------- + +1. ULTRIX xxxxxx 4.3 1 RISC + +Condolences to long suffering ultrix users! +DEC supplies a working C front end for alpha/OSF, but not for ultrix. + +From K&R ANSI C p. 231: + ultrix> cat cat.c + #define cat(x, y) x ## y + #define xcat(x,y) cat(x,y) + cat(cat(1,2),3) + xcat(xcat(1,2),3) + ultrix> cc -E cat.c + 123 <---- Should be: cat(1,2)3 + 123 <---- Correct. + ultrix> + +The problem for cfortran.h, preventing use of -std and -std1: + ultrix> cat c.c + #define cat(x, y) x ## y + #define xcat(x,y) cat(x,y) + #define AB(X) X+X + #define C(E,F,G) cat(E,F)(G) + #define X(E,F,G) xcat(E,F)(G) + C(A,B,2) + X(A,B,2) + ultrix> cc -std1 -E c.c + 2+2 + AB (2) <---- ????????????? + ultrix> + ultrix> cc -std0 -E c.c + 2+2 + AB(2) <---- ????????????? + ultrix> + +Due to further ultrix preprocessor problems, +for all definitions of definitions with arguments, +cfortran.h >= 3.0 includes the arguments and recommends the same, +even though it is not required by ANSI C. +e.g. Users are advised to do + #define fcallsc(UN,LN) orig_fcallsc(UN,LN) +instead of + #define fcallsc orig_fcallsc +since ultrix fails to properly preprocess the latter example. +CRAY used to (still does?) occasionally trip up on this problem. + + +2. ConvexOS convex C210 11.0 convex + +In a program with a C main, output to LUN=6=* from Fortran goes into +$pwd/fort.6 instead of stdout. Presumably, a magic incantation can be called +from the C main in order to properly initialize the Fortran I/O. + + +3. SunOS 5.3 Generic_101318-69 sun4m sparc + +The default data and code alignments produced by cc, gcc and f77 are compatible. +If deviating from the defaults, consistent alignment options must be used +across all objects compiled by cc and f77. [Does gcc provide such options?] + + +4. SunOS 5.3 Generic_101318-69 sun4m sparc with cc: SC3.0.1 13 Jul 1994 + or equivalently + ULTRIX 4.4 0 RISC using cc -oldc + are K&R C preprocessors that suffer from infinite loop macros, e.g. + + zedy03> cat src.c + #include "cfortran.h" + PROTOCCALLSFFUN1(INT,FREV,frev, INTV) + #define FREV(A1) CCALLSFFUN1( FREV,frev, INTV, A1) + /* To avoid the problem, deletete these ---^^^^--- spaces. */ + main() { static int a[] = {1,2}; FREV(a); return EXIT_SUCCESS; } + + zedy03> cc -c -Xs -v -DMAX_PREPRO_ARGS=31 -D__CF__KnR src.c + "src.c", line 4: FREV: actuals too long + "src.c", line 4: FREV: actuals too long + .... 3427 more lines of the same message + "src.c", line 4: FREV: actuals too long + cc : Fatal error in /usr/ccs/lib/cpp + Segmentation fault (core dumped) + + +5. Older sun C compilers + +To link to f77 objects, older sun C compilers require the math.h macros: + +#define RETURNFLOAT(x) { union {double _d; float _f; } _kluge; \ + _kluge._f = (x); return _kluge._d; } +#define ASSIGNFLOAT(x,y) { union {double _d; float _f; } _kluge; \ + _kluge._d = (y); x = _kluge._f; } + +Unfortunately, in at least some copies of the sun math.h, the semi-colon +for 'float _f;' is left out, leading to compiler warnings. + +The solution is to correct math.h, or to change cfortran.h to #define +RETURNFLOAT(x) and ASSIGNFLOAT(x,y) instead of including math.h. + + +6. gcc version 2.6.3 and probably all other versions as well + +Unlike all other C compilers supported by cfortran.h, +'gcc -traditional' promotes to double all functions returning float +as demonstrated bu the following example. + +/* m.c */ +#include +int main() { FLOAT_FUNCTION d(); float f; f = d(); printf("%f\n",f); return 0; } + +/* d.c */ +float d() { return -123.124; } + +burow[29] gcc -c -traditional d.c +burow[30] gcc -DFLOAT_FUNCTION=float m.c d.o && a.out +0.000000 +burow[31] gcc -DFLOAT_FUNCTION=double m.c d.o && a.out +-123.124001 +burow[32] + +Thus, 'gcc -traditional' is not supported by cfortran.h. +Support would require the same RETURNFLOAT, etc. macro machinery +present in old sun math.h, before sun gave up the same promotion. + + +7. CRAY + +At least some versions of the t3e and t3d C preprocessor are broken +in the fashion described below. +At least some versions of the t90 C preprocessor do not have this problem. + +On the CRAY, all Fortran names are converted to uppercase. +Generally the uppercase name is also used for the macro interface +created by cfortran.h. + +For example, in the following interface, +EASY is both the name of the macro in the original C code +and EASY is the name of the resulting function to be called. + +#define EASY(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B) + +The fact that a macro called EASY() expands to a function called EASY() +is not a problem for a working C preprocessor. +From Kernighan and Ritchie, 2nd edition, p.230: + + In both kinds of macro, the replacement token sequence is repeatedly + rescanned for more identifiers. However, once a given identifier has been + replaced in a given expansion, it is not replaced if it turns up again during + rescanning; instead it is left unchanged. + +Unfortunately, some CRAY preprocessors are broken and don't obey the above rule. +A work-around is for the user to NOT use the uppercase name +of the name of the macro interface provided by cfortran.h. For example: + +#define Easy(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B) + +Luckily, the above work-around is not required since the following +work-around within cfortran.h also circumvents the bug: + + /* (UN), not UN, is required in order to get around CRAY preprocessor bug.*/ + #define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */ + +Aside: The Visual C++ compiler is happy with UN, but barfs on (UN), + so either (UN) causes nonstandard C/C++ or Visual C++ is broken. + + +VII History and Acknowledgements +-------------------------------- + +1.0 - Supports VAX VMS using C 3.1 and FORTRAN 5.4. Oct. '90. +1.0 - Supports Silicon Graphics w. Mips Computer 2.0 f77 and cc. Feb. '91. + [Port of C calls FORTRAN half only.] +1.1 - Supports Mips Computer System 2.0 f77 and cc. Mar. '91. + [Runs on at least: Silicon Graphics IRIX 3.3.1 + DECstations with Ultrix V4.1] +1.2 - Internals made simpler, smaller, faster, stronger. May '91. + - Mips version works on IBM RS/6000, this is now called the unix version. +1.3 - UNIX and VAX VMS versions are merged into a single cfortran.h. July '91. + - C can help manipulate (arrays of) strings in FORTRAN common blocks. + - Dimensions of string arrays arguments can be explicit. + - Supports Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. + +2.0 - Improved code generation machinery creates K&R or ANSI C. Aug. '91. + - Supports Sun, CRAY. f2c with vcc on VAX Ultrix. + - cfortran.h macros now require routine and COMMON block names in both + upper and lower case. No changes required to applications though. + - PROTOCCALLSFSUBn is eliminated, with no loss to cfortran.h performance. + - Improved tools and guidelines for naming C routines called by FORTRAN. +2.1 - LOGICAL correctly supported across all machines. Oct. '91. + - Improved support for DOUBLE PRECISION on the CRAY. + - HP9000 fully supported. + - VAX Ultrix cc or gcc with f77 now supported. +2.2 - SHORT, i.e. INTEGER*2, and BYTE now supported. Dec. '91. + - LOGICAL_STRICT introduced. More compact and robust internal tables. + - typeV and typeVV for type = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG,SHORT. + - FORTRAN passing strings and NULL pointer to C routines improved. +2.3 - Extraneous arguments removed from many internal tables. May '92. + - Introduce pseudo argument type SIMPLE for user defined types. + - LynxOS using f2c supported. (Tested with LynxOS 2.0 386/AT.) +2.4 - Separation of internal C and Fortran compilation directives. Oct. '92. + - f2c and NAG f90 supported on all machines. +2.5 - Minor mod.s to source and/or doc for HP9000, f2c, and NAG f90. Nov. '92. +2.6 - Support external procedures as arguments with type ROUTINE. Dec. '92. +2.7 - Support Alpha VMS. Support HP9000 f77 +ppu Jan. '93. + - Support arrays with up to 7 dimensions. + - Minor mod. of Fortran NULL to C via (P)STRING. + - Specify the type of ROUTINE passed from Fortran to C [ANSI C requirement.] + - Macros never receive a null parameter [RS/6000 requirement.] +2.8 - PSTRING for Fortran calls C no longer provides escape to pass April'93. + NULL pointer nor to pass address of original string. + PNSTRING introduced with old PSTRING's behavior. + PPSTRING introduced to always pass original address of string. + - Support Alpha/OSF. + - Document that common blocks used in C should be declared AND defined. + +3.0 - Automagic handling of ANSI ## versus K&R /**/ preprocessor op. March'95. + - Less chance of name space collisions between cfortran.h and other codes. + - SIMPLE macros, supporting user defined types, have changed names. +3.1 - Internal macro name _INT not used. Conflicted with IRIX 5.3. May '95. + - SunOS, all versions, should work out of the box. + - ZTRINGV_ARGS|F(k) may no longer point to a PDOUBLE or PFLOAT argument. + - ConvexOS 11.0 supported. +3.2 - __hpux no longer needs to be restricted to MAX_PREPRO_ARGS=31. Oct. '95. + - PSTRING bug fixed. + - ZTRINGV_ARGS|F(k) may not point to a PBYTE,PINT,PLONG or PSHORT argument. + - (P)ZTRINGV machinery improved. Should lead to fewer compiler warnings. + (P)ZTRINGV no longer limits recursion or the nesting of routines. + - SIMPLE macros, supporting user defined types, have changed slightly. +3.3 - Supports PowerStation Fortran with Visual C++. Nov. '95. + - g77 should work using f2cFortran, though no changes made for it. + - (PROTO)CCALLSFFUN10 extended to (PROTO)CCALLSFFUN14. + - FCALLSCFUN10 and SUB10 extended to FCALLSCFUN14 and SUB14. +3.4 - C++ supported, Dec. '95. + but it required the reintroduction of PROTOCCALLSFSUBn for users. + - HP-UX f77 +800 supported. +3.5 - Absoft UNIX Fortran supported. Sept.'96. +3.6 - Minor corrections to cfortran.doc. Oct. '96. + - Fixed bug for 15th argument. [Thanks to Tom Epperly at Aspen Tech.] + - For AbsoftUNIXFortran, obey default of prepending _C to COMMON BLOCK name. + - Fortran calling C with ROUTINE argument fixed and cleaned up. +3.7 - Circumvent IBM and HP "null argument" preprocessor warning. Oct. '96 +3.8 - (P)STRINGV and (P)ZTRINGV can pass a 1- or 2-dim. char array. Feb. '97 + (P)ZTRINGV thus effectively also provides (P)ZTRING. + - (P)ZTRINGV accepts a (char *) pointer. +3.9 - Bug fixed for *VVVVV. May '97 + - f2c: Work-around for strange underscore-dependent naming feature. + - NEC SX-4 supported. + - CRAY: LOGICAL conversion uses _btol and _ltob from CRAY's fortran.h. + - CRAY: Avoid bug of some versions of the C preprocessor. + - CRAY T3E: FORTRAN_REAL introduced. + +4.0 - new/delete now used for C++. malloc/free still used for C. Jan. '98 + - FALSE no longer is defined by cfortran.h . + - Absoft Pro Fortran for MacOS supported. +4.1 - COMMA and COLON no longer are defined by cfortran.h . April'98 + - Bug fixed when 10th arg. or beyond is a string. + [Rob Lucchesi of NASA-Goddard pointed out this bug.] + - CCALLSFSUB/FUN extended from 14 to 27 arguments. + - Workaround SunOS CC 4.2 cast bug. [Thanks to Savrak SAR of CERN.] +4.2 - Portland Group needs -DpgiFortran . [Thank George Lai of NASA.] June '98 +4.3 - (PROTO)CCALLSFSUB extended from 20 to 27 arguments. July '98 + + +['Support' implies these and more recent releases of the respective + OS/compilers/linkers can be used with cfortran.h. + Earlier releases may also work.] + + +Acknowledgements: +- CERN very generously sponsored a week in 1994 for me to work on cfortran.h. +- M.L.Luvisetto (Istituto Nazionale Fisica Nucleare - Centro Nazionale + Analisi Fotogrammi, Bologna, Italy) provided all the support for the port to + the CRAY. Marisa's encouragement and enthusiasm was also much appreciated. +- J.Bunn (CERN) supported the port to PowerStation Fortran with Visual C++. +- Paul Schenk (UC Riverside, CERN PPE/OPAL) in June 1993 extended cfortran.h 2.7 + to have C++ call Fortran. This was the starting point for full C++ in 3.4. +- Glenn P.Davis of University Corp. for Atmospheric Research (UCAR) / Unidata + supported the NEC SX-4 port and helped understand the CRAY. +- Tony Goelz of Absoft Corporation ported cfortran.h to Absoft. +- Though cfortran.h has been created in my 'copious' free time, I thank + NSERC for their generous support of my grad. student and postdoc years. +- Univ.Toronto, DESY, CERN and others have provided time on their computers. + + +THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE +PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND +THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE +FOLLOWING RESTRICTIONS: +- YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE. +- YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA + (E.G. TAPE, DISK, COMPUTER, PAPER.) +- YOU MAY NOT PREVENT OTHERS FROM COPYING IT FREELY. +- YOU MAY NOT DISTRIBUTE MODIFIED VERSIONS WITHOUT CLEARLY DOCUMENTING YOUR + CHANGES AND NOTIFYING THE AUTHOR. +- YOU MAY NOT MISREPRESENTED THE ORIGIN OF THIS SOFTWARE, EITHER BY EXPLICIT + CLAIM OR BY OMISSION. + +THE INTENT OF THE ABOVE TERMS IS TO ENSURE THAT THE CFORTRAN.H PACKAGE NOT BE +USED FOR PROFIT MAKING ACTIVITIES UNLESS SOME ROYALTY ARRANGEMENT IS ENTERED +INTO WITH ITS AUTHOR. + +THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST +OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE AUTHOR IS NOT RESPONSIBLE +FOR ANY SUPPORT OR SERVICE OF THE CFORTRAN.H PACKAGE. + + Burkhard Burow + burow@desy.de + +P.S. Your comments and questions are welcomed and usually promptly answered. + +VAX VMS and Ultrix, Alpha, OSF, Silicon Graphics (SGI), DECstation, Mips RISC, +Sun, CRAY, Convex, IBM RS/6000, Apollo DomainOS, HP, LynxOS, f2c, NAG, Absoft, +NEC SX-4, PowerStation and Visual C++ are registered trademarks of their +respective owners. + +/* end: cfortran.doc */ diff --git a/software/cfitsio3040/cfortran.h b/software/cfitsio3040/cfortran.h new file mode 100644 index 000000000..dfb5de4a2 --- /dev/null +++ b/software/cfitsio3040/cfortran.h @@ -0,0 +1,2509 @@ +/* cfortran.h 4.4 */ +/* http://www-zeus.desy.de/~burow/cfortran/ */ +/* Burkhard Burow burow@desy.de 1990 - 2002. */ + +#ifndef __CFORTRAN_LOADED +#define __CFORTRAN_LOADED + +/* + THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU + SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING, + MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE. +*/ + +/* The following modifications were made by the authors of CFITSIO or by me. + * They are flagged below with CFITSIO, the author's initials, or KMCCARTY. + * PDW = Peter Wilson + * DM = Doug Mink + * LEB = Lee E Brotzman + * MR = Martin Reinecke + * WDP = William D Pence + * -- Kevin McCarty, for Debian (19 Dec. 2005) */ + +/******* + Modifications: + Oct 1997: Changed symbol name extname to appendus (PDW/HSTX) + (Conflicted with a common variable name in FTOOLS) + Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX) + Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat + single strings as vectors with single elements + Nov 1999: If macintoxh defined, also define f2cfortran (for Mac OS-X) + Apr 2000: If WIN32 defined, also define PowerStationFortran and + VISUAL_CPLUSPLUS (Visual C++) + Jun 2000: If __GNUC__ and linux defined, also define f2cFortran + (linux/gcc environment detection) + Apr 2002: If __CYGWIN__ is defined, also define f2cFortran + Nov 2002: If __APPLE__ defined, also define f2cfortran (for Mac OS-X) + + Nov 2003: If __INTEL_COMPILER or INTEL_COMPILER defined, also define + f2cFortran (KMCCARTY) + Dec 2005: If f2cFortran is defined, enforce REAL functions in FORTRAN + returning "double" in C. This was one of the items on + Burkhard's TODO list. (KMCCARTY) + Dec 2005: Modifications to support 8-byte integers. (MR) + USE AT YOUR OWN RISK! + Feb 2006 Added logic to typedef the symbol 'LONGLONG' to an appropriate + intrinsic 8-byte integer datatype (WDP) + Apr 2006: Modifications to support gfortran (and g77 with -fno-f2c flag) + since by default it returns "float" for FORTRAN REAL function. + (KMCCARTY) + *******/ + +/* + Avoid symbols already used by compilers and system *.h: + __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c + +*/ + +/* + Determine what 8-byte integer data type is available. + 'long long' is now supported by most compilers, but older + MS Visual C++ compilers before V7.0 use '__int64' instead. (WDP) +*/ + +#ifndef LONGLONG_TYPE /* this may have been previously defined */ +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + +#if (_MSC_VER < 1300) /* versions earlier than V7.0 do not have 'long long' */ + typedef __int64 LONGLONG; +#else /* newer versions do support 'long long' */ + typedef long long LONGLONG; +#endif + +#else + typedef long long LONGLONG; +#endif + +#define LONGLONG_TYPE +#endif + + +/* First prepare for the C compiler. */ + +#ifndef ANSI_C_preprocessor /* i.e. user can override. */ +#ifdef __CF__KnR +#define ANSI_C_preprocessor 0 +#else +#ifdef __STDC__ +#define ANSI_C_preprocessor 1 +#else +#define _cfleft 1 +#define _cfright +#define _cfleft_cfright 0 +#define ANSI_C_preprocessor _cfleft/**/_cfright +#endif +#endif +#endif + +#if ANSI_C_preprocessor +#define _0(A,B) A##B +#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */ +#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */ +#define _3(A,B,C) _(A,_(B,C)) +#else /* if it turns up again during rescanning. */ +#define _(A,B) A/**/B +#define _2(A,B) A/**/B +#define _3(A,B,C) A/**/B/**/C +#endif + +#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__)) +#define VAXUltrix +#endif + +#include /* NULL [in all machines stdio.h] */ +#include /* strlen, memset, memcpy, memchr. */ +#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) ) +#include /* malloc,free */ +#else +#include /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/ +#ifdef apollo +#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */ +#endif +#endif + +#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx)) +#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */ + /* Manually define __CF__KnR for HP if desired/required.*/ +#endif /* i.e. We will generate Kernighan and Ritchie C. */ +/* Note that you may define __CF__KnR before #include cfortran.h, in order to +generate K&R C instead of the default ANSI C. The differences are mainly in the +function prototypes and declarations. All machines, except the Apollo, work +with either style. The Apollo's argument promotion rules require ANSI or use of +the obsolete std_$call which we have not implemented here. Hence on the Apollo, +only C calling FORTRAN subroutines will work using K&R style.*/ + + +/* Remainder of cfortran.h depends on the Fortran compiler. */ + +/* 11/29/2003 (KMCCARTY): add *INTEL_COMPILER symbols here */ +/* 04/05/2006 (KMCCARTY): add gFortran symbol here */ +#if defined(CLIPPERFortran) || defined(pgiFortran) || defined(__INTEL_COMPILER) || defined(INTEL_COMPILER) || defined(gFortran) +#define f2cFortran +#endif + +/* VAX/VMS does not let us \-split long #if lines. */ +/* Split #if into 2 because some HP-UX can't handle long #if */ +#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran)) +#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran)) +/* If no Fortran compiler is given, we choose one for the machines we know. */ +#if defined(lynx) || defined(VAXUltrix) +#define f2cFortran /* Lynx: Only support f2c at the moment. + VAXUltrix: f77 behaves like f2c. + Support f2c or f77 with gcc, vcc with f2c. + f77 with vcc works, missing link magic for f77 I/O.*/ +#endif +/* 04/13/00 DM (CFITSIO): Add these lines for NT */ +/* with PowerStationFortran and and Visual C++ */ +#if defined(WIN32) && !defined(__CYGWIN__) +#define PowerStationFortran +#define VISUAL_CPLUSPLUS +#endif +#if defined(g77Fortran) /* 11/03/97 PDW (CFITSIO) */ +#define f2cFortran +#endif +#if defined(__CYGWIN__) /* 04/11/02 LEB (CFITSIO) */ +#define f2cFortran +#endif +#if defined(__GNUC__) && defined(linux) /* 06/21/00 PDW (CFITSIO) */ +#define f2cFortran +#endif +#if defined(macintosh) /* 11/1999 (CFITSIO) */ +#define f2cFortran +#endif +#if defined(__APPLE__) /* 11/2002 (CFITSIO) */ +#define f2cFortran +#endif +#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */ +#define hpuxFortran /* Should also allow hp9000s7/800 use.*/ +#endif +#if defined(apollo) +#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */ +#endif +#if defined(sun) || defined(__sun) +#define sunFortran +#endif +#if defined(_IBMR2) +#define IBMR2Fortran +#endif +#if defined(_CRAY) +#define CRAYFortran /* _CRAYT3E also defines some behavior. */ +#endif +#if defined(_SX) +#define SXFortran +#endif +#if defined(mips) || defined(__mips) +#define mipsFortran +#endif +#if defined(vms) || defined(__vms) +#define vmsFortran +#endif +#if defined(__alpha) && defined(__unix__) +#define DECFortran +#endif +#if defined(__convex__) +#define CONVEXFortran +#endif +#if defined(VISUAL_CPLUSPLUS) +#define PowerStationFortran +#endif +#endif /* ...Fortran */ +#endif /* ...Fortran */ + +/* Split #if into 2 because some HP-UX can't handle long #if */ +#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran)) +#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran)) +/* If your compiler barfs on ' #error', replace # with the trigraph for # */ + #error "cfortran.h: Can't find your environment among:\ + - GNU gcc (g77) on Linux. \ + - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \ + - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \ + - VAX VMS CC 3.1 and FORTRAN 5.4. \ + - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \ + - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \ + - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \ + - CRAY \ + - NEC SX-4 SUPER-UX \ + - CONVEX \ + - Sun \ + - PowerStation Fortran with Visual C++ \ + - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \ + - LynxOS: cc or gcc with f2c. \ + - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \ + - f77 with vcc works; but missing link magic for f77 I/O. \ + - NO fort. None of gcc, cc or vcc generate required names.\ + - f2c/g77: Use #define f2cFortran, or cc -Df2cFortran \ + - gfortran: Use #define gFortran, or cc -DgFortran \ + (also necessary for g77 with -fno-f2c option) \ + - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \ + - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran \ + - Absoft Pro Fortran: Use #define AbsoftProFortran \ + - Portland Group Fortran: Use #define pgiFortran \ + - Intel Fortran: Use #define INTEL_COMPILER" +/* Compiler must throw us out at this point! */ +#endif +#endif + + +#if defined(VAXC) && !defined(__VAXC) +#define OLD_VAXC +#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */ +#endif + +/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */ + +/* "extname" changed to "appendus" below (CFITSIO) */ +#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) +#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */ +#define orig_fcallsc(UN,LN) CFC_(UN,LN) +#else +#if defined(CRAYFortran) || defined(PowerStationFortran) || defined(AbsoftProFortran) +#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */ +#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */ +#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */ +#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */ +#endif +#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */ +#else /* For following machines one may wish to change the fcallsc default. */ +#define CF_SAME_NAMESPACE +#ifdef vmsFortran +#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */ + /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/ + /* because VAX/VMS doesn't do recursive macros. */ +#define orig_fcallsc(UN,LN) UN +#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */ +#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */ +#define orig_fcallsc(UN,LN) CFC_(UN,LN) +#endif /* vmsFortran */ +#endif /* CRAYFortran PowerStationFortran */ +#endif /* ....Fortran */ + +#define fcallsc(UN,LN) orig_fcallsc(UN,LN) +#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN)) +#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p)) + +#define C_FUNCTION(UN,LN) fcallsc(UN,LN) +#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN) + +#ifndef COMMON_BLOCK +#ifndef CONVEXFortran +#ifndef CLIPPERFortran +#if !(defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)) +#define COMMON_BLOCK(UN,LN) CFC_(UN,LN) +#else +#define COMMON_BLOCK(UN,LN) _(_C,LN) +#endif /* AbsoftUNIXFortran or AbsoftProFortran */ +#else +#define COMMON_BLOCK(UN,LN) _(LN,__) +#endif /* CLIPPERFortran */ +#else +#define COMMON_BLOCK(UN,LN) _3(_,LN,_) +#endif /* CONVEXFortran */ +#endif /* COMMON_BLOCK */ + +#ifndef DOUBLE_PRECISION +#if defined(CRAYFortran) && !defined(_CRAYT3E) +#define DOUBLE_PRECISION long double +#else +#define DOUBLE_PRECISION double +#endif +#endif + +#ifndef FORTRAN_REAL +#if defined(CRAYFortran) && defined(_CRAYT3E) +#define FORTRAN_REAL double +#else +#define FORTRAN_REAL float +#endif +#endif + +#ifdef CRAYFortran +#ifdef _CRAY +#include +#else +#include "fortran.h" /* i.e. if crosscompiling assume user has file. */ +#endif +#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */ +/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/ +#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine + arg.'s have been declared float *, or double *. */ +#else +#define FLOATVVVVVVV_cfPP +#define VOIDP +#endif + +#ifdef vmsFortran +#if defined(vms) || defined(__vms) +#include +#else +#include "descrip.h" /* i.e. if crosscompiling assume user has file. */ +#endif +#endif + +#ifdef sunFortran +#if defined(sun) || defined(__sun) +#include /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */ +#else +#include "math.h" /* i.e. if crosscompiling assume user has file. */ +#endif +/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3, + * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in + * , since sun C no longer promotes C float return values to doubles. + * Therefore, only use them if defined. + * Even if gcc is being used, assume that it exhibits the Sun C compiler + * behavior in order to be able to use *.o from the Sun C compiler. + * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc. + */ +#endif + +#ifndef apolloFortran +/* "extern" removed (CFITSIO) */ +#define COMMON_BLOCK_DEF(DEFINITION, NAME) /* extern */ DEFINITION NAME +#define CF_NULL_PROTO +#else /* HP doesn't understand #elif. */ +/* Without ANSI prototyping, Apollo promotes float functions to double. */ +/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */ +#define CF_NULL_PROTO ... +#ifndef __CF__APOLLO67 +#define COMMON_BLOCK_DEF(DEFINITION, NAME) \ + DEFINITION NAME __attribute((__section(NAME))) +#else +#define COMMON_BLOCK_DEF(DEFINITION, NAME) \ + DEFINITION NAME #attribute[section(NAME)] +#endif +#endif + +#ifdef __cplusplus +#undef CF_NULL_PROTO +#define CF_NULL_PROTO ... +#endif + + +#ifndef USE_NEW_DELETE +#ifdef __cplusplus +#define USE_NEW_DELETE 1 +#else +#define USE_NEW_DELETE 0 +#endif +#endif +#if USE_NEW_DELETE +#define _cf_malloc(N) new char[N] +#define _cf_free(P) delete[] P +#else +#define _cf_malloc(N) (char *)malloc(N) +#define _cf_free(P) free(P) +#endif + +#ifdef mipsFortran +#define CF_DECLARE_GETARG int f77argc; char **f77argv +#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV +#else +#define CF_DECLARE_GETARG +#define CF_SET_GETARG(ARGC,ARGV) +#endif + +#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ +#pragma standard +#endif + +#define AcfCOMMA , +#define AcfCOLON ; + +/*-------------------------------------------------------------------------*/ + +/* UTILITIES USED WITHIN CFORTRAN.H */ + +#define _cfMIN(A,B) (As) { /* Need this to handle NULL string.*/ + while (e>s && *--e==t); /* Don't follow t's past beginning. */ + e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */ +} return s; } + +/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally +points to the terminating '\0' of s, but may actually point to anywhere in s. +s's new '\0' will be placed at e or earlier in order to remove any trailing t's. +If es) { /* Watch out for neg. length string.*/ + while (e>s && *--e==t); /* Don't follow t's past beginning. */ + e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */ +} return s; } + +/* Note the following assumes that any element which has t's to be chopped off, +does indeed fill the entire element. */ +#ifndef __CF__KnR +static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t) +#else +static char *vkill_trailing( cstr, elem_len, sizeofcstr, t) + char* cstr; int elem_len; int sizeofcstr; char t; +#endif +{ int i; +for (i=0; i= 4.3 gives message: + zow35> cc -c -DDECFortran cfortest.c + cfe: Fatal: Out of memory: cfortest.c + zow35> + Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine + if using -Aa, otherwise we have a problem. + */ +#ifndef MAX_PREPRO_ARGS +#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR))) +#define MAX_PREPRO_ARGS 31 +#else +#define MAX_PREPRO_ARGS 99 +#endif +#endif + +#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) +/* In addition to explicit Absoft stuff, only Absoft requires: + - DEFAULT coming from _cfSTR. + DEFAULT could have been called e.g. INT, but keep it for clarity. + - M term in CFARGT14 and CFARGT14FS. + */ +#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0) +#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0) +#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0) +#define DEFAULT_cfABSOFT1 +#define LOGICAL_cfABSOFT1 +#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING +#define DEFAULT_cfABSOFT2 +#define LOGICAL_cfABSOFT2 +#define STRING_cfABSOFT2 ,unsigned D0 +#define DEFAULT_cfABSOFT3 +#define LOGICAL_cfABSOFT3 +#define STRING_cfABSOFT3 ,D0 +#else +#define ABSOFT_cf1(T0) +#define ABSOFT_cf2(T0) +#define ABSOFT_cf3(T0) +#endif + +/* _Z introduced to cicumvent IBM and HP silly preprocessor warning. + e.g. "Macro CFARGT14 invoked with a null argument." + */ +#define _Z + +#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ + S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) +#define CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ + S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \ + S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \ + S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27) + +#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ + F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ + M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define CFARGT27FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ + F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ + F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \ + F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \ + M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) + +#if !(defined(PowerStationFortran)||defined(hpuxFortran800)) +/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields: + SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c + "c.c", line 406: warning: argument mismatch + Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok. + Behavior is most clearly seen in example: + #define A 1 , 2 + #define C(X,Y,Z) x=X. y=Y. z=Z. + #define D(X,Y,Z) C(X,Y,Z) + D(x,A,z) + Output from preprocessor is: x = x . y = 1 . z = 2 . + #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +*/ +#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ + F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ + M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ + F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ + F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \ + F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \ + M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) + +#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ + F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ + F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) \ + S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ + S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \ + S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) +#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \ + F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \ + F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \ + F(TD,AD,13,1) F(TE,AE,14,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \ + S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \ + S(TB,11) S(TC,12) S(TD,13) S(TE,14) +#if MAX_PREPRO_ARGS>31 +#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ + F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \ + F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \ + F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \ + F(TJ,AJ,19,1) F(TK,AK,20,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \ + S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \ + S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) S(TG,16) \ + S(TH,17) S(TI,18) S(TJ,19) S(TK,20) +#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \ + F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \ + F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \ + F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \ + F(TJ,AJ,19,1) F(TK,AK,20,1) F(TL,AL,21,1) F(TM,AM,22,1) F(TN,AN,23,1) F(TO,AO,24,1) \ + F(TP,AP,25,1) F(TQ,AQ,26,1) F(TR,AR,27,1) S(T1,1) S(T2,2) S(T3,3) \ + S(T4,4) S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) \ + S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) \ + S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \ + S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27) +#endif +#else +#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ + F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ + F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ + F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) +#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ + F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ + F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ + F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \ + F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) \ + F(TL,21,1) S(TL,21) F(TM,22,1) S(TM,22) F(TN,23,1) S(TN,23) F(TO,24,1) S(TO,24) \ + F(TP,25,1) S(TP,25) F(TQ,26,1) S(TQ,26) F(TR,27,1) S(TR,27) + +#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ + F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ + F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ + F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \ + F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) +#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \ + F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \ + F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \ + F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \ + F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \ + F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) +#if MAX_PREPRO_ARGS>31 +#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ + F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \ + F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \ + F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \ + F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \ + F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \ + F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \ + F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20) +#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \ + F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \ + F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \ + F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \ + F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \ + F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \ + F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \ + F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20) F(TL,AL,21,1) S(TL,21) \ + F(TM,AM,22,1) S(TM,22) F(TN,AN,23,1) S(TN,23) F(TO,AO,24,1) S(TO,24) \ + F(TP,AP,25,1) S(TP,25) F(TQ,AQ,26,1) S(TQ,26) F(TR,AR,27,1) S(TR,27) +#endif +#endif + + +#define PROTOCCALLSFSUB1( UN,LN,T1) \ + PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) +#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) + + +#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0) +#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0) + +#define PROTOCCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0) +#define PROTOCCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0) +#define PROTOCCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0) + + +#ifndef FCALLSC_QUALIFIER +#ifdef VISUAL_CPLUSPLUS +#define FCALLSC_QUALIFIER __stdcall +#else +#define FCALLSC_QUALIFIER +#endif +#endif + +#ifdef __cplusplus +#define CFextern extern "C" +#else +#define CFextern extern +#endif + + +#ifdef CFSUBASFUN +#define PROTOCCALLSFSUB0(UN,LN) \ + PROTOCCALLSFFUN0( VOID,UN,LN) +#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\ + PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) +#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\ + PROTOCCALLSFFUN27(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) +#else +/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after + #include-ing cfortran.h if calling the FORTRAN wrapper within the same + source code where the wrapper is created. */ +#define PROTOCCALLSFSUB0(UN,LN) _(VOID,_cfPU)(CFC_(UN,LN))(); +#ifndef __CF__KnR +#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ); +#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\ + _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT20(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) ); +#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\ + _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT27(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) ); +#else +#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + PROTOCCALLSFSUB0(UN,LN) +#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + PROTOCCALLSFSUB0(UN,LN) +#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + PROTOCCALLSFSUB0(UN,LN) +#endif +#endif + + +#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ +#pragma standard +#endif + + +#define CCALLSFSUB1( UN,LN,T1, A1) \ + CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0) +#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \ + CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0) +#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \ + CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0) +#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\ + CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0) +#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \ + CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0) +#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \ + CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0) +#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \ + CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0) +#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \ + CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0) +#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\ + CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0) +#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\ + CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0) +#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\ + CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0) +#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\ + CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0) +#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\ + CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0) + +#ifdef __cplusplus +#define CPPPROTOCLSFSUB0( UN,LN) +#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) +#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) +#else +#define CPPPROTOCLSFSUB0(UN,LN) \ + PROTOCCALLSFSUB0(UN,LN) +#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) +#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) +#endif + +#ifdef CFSUBASFUN +#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN) +#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ + CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) +#else +/* do{...}while(0) allows if(a==b) FORT(); else BORT(); */ +#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(0) +#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ +do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \ + VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \ + VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) \ + CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \ + ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \ + ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) \ + ACF(LN,TC,AC,12) ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) \ + CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\ + WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ + WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) \ + WCF(TB,AB,11) WCF(TC,AC,12) WCF(TD,AD,13) WCF(TE,AE,14) }while(0) +#endif + + +#if MAX_PREPRO_ARGS>31 +#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\ + CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0) +#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\ + CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0) +#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\ + CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0) +#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\ + CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0) +#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\ + CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0) + +#ifdef CFSUBASFUN +#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ + TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ + CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ + TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) +#else +#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ + TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ +do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \ + VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \ + VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \ + VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \ + CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \ + ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \ + ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \ + ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \ + ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \ + CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \ + WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \ + WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \ + WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \ + WCF(TJ,AJ,19) WCF(TK,AK,20) }while(0) +#endif +#endif /* MAX_PREPRO_ARGS */ + +#if MAX_PREPRO_ARGS>31 +#define CCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,0,0,0,0,0,0) +#define CCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,0,0,0,0,0) +#define CCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,0,0,0,0) +#define CCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,0,0,0) +#define CCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,0,0) +#define CCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ)\ + CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,0) + +#ifdef CFSUBASFUN +#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \ + A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \ + CCALLSFFUN27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \ + A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) +#else +#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \ + A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \ +do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \ + VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \ + VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \ + VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \ + VVCF(TL,AL,B21) VVCF(TM,AM,B22) VVCF(TN,AN,B23) VVCF(TO,AO,B24) VVCF(TP,AP,B25) \ + VVCF(TQ,AQ,B26) VVCF(TR,AR,B27) \ + CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \ + ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \ + ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \ + ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \ + ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \ + ACF(LN,TL,AL,21) ACF(LN,TM,AM,22) ACF(LN,TN,AN,23) ACF(LN,TO,AO,24) \ + ACF(LN,TP,AP,25) ACF(LN,TQ,AQ,26) ACF(LN,TR,AR,27) \ + CFC_(UN,LN)( CFARGTA27(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,\ + A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) ); \ + WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \ + WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \ + WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \ + WCF(TJ,AJ,19) WCF(TK,AK,20) WCF(TL,AL,21) WCF(TM,AM,22) WCF(TN,AN,23) WCF(TO,AO,24) \ + WCF(TP,AP,25) WCF(TQ,AQ,26) WCF(TR,AR,27) }while(0) +#endif +#endif /* MAX_PREPRO_ARGS */ + +/*-------------------------------------------------------------------------*/ + +/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */ + +/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN + function is called. Therefore, especially for creator's of C header files + for large FORTRAN libraries which include many functions, to reduce + compile time and object code size, it may be desirable to create + preprocessor directives to allow users to create code for only those + functions which they use. */ + +/* The following defines the maximum length string that a function can return. + Of course it may be undefine-d and re-define-d before individual + PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived + from the individual machines' limits. */ +#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE + +/* The following defines a character used by CFORTRAN.H to flag the end of a + string coming out of a FORTRAN routine. */ +#define CFORTRAN_NON_CHAR 0x7F + +#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */ +#pragma nostandard +#endif + +#define _SEP_(TN,C,cfCOMMA) _(__SEP_,C)(TN,cfCOMMA) +#define __SEP_0(TN,cfCOMMA) +#define __SEP_1(TN,cfCOMMA) _Icf(2,SEP,TN,cfCOMMA,0) +#define INT_cfSEP(T,B) _(A,B) +#define INTV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B) +#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B) +#define PINT_cfSEP(T,B) INT_cfSEP(T,B) +#define PVOID_cfSEP(T,B) INT_cfSEP(T,B) +#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B) +#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B) +#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/ +#define STRING_cfSEP(T,B) INT_cfSEP(T,B) +#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B) +#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B) +#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B) +#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B) +#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B) +#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B) +#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B) + +#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE) +#ifdef OLD_VAXC +#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */ +#else +#define INTEGER_BYTE signed char /* default */ +#endif +#else +#define INTEGER_BYTE unsigned char +#endif +#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE +#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION +#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL +#define INTVVVVVVV_cfTYPE int +#define LOGICALVVVVVVV_cfTYPE int +#define LONGVVVVVVV_cfTYPE long +#define LONGLONGVVVVVVV_cfTYPE LONGLONG /* added by MR December 2005 */ +#define SHORTVVVVVVV_cfTYPE short +#define PBYTE_cfTYPE INTEGER_BYTE +#define PDOUBLE_cfTYPE DOUBLE_PRECISION +#define PFLOAT_cfTYPE FORTRAN_REAL +#define PINT_cfTYPE int +#define PLOGICAL_cfTYPE int +#define PLONG_cfTYPE long +#define PLONGLONG_cfTYPE LONGLONG /* added by MR December 2005 */ +#define PSHORT_cfTYPE short + +#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A) +#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V) +#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W) +#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X) +#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y) +#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z) + +#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0) +#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z) +#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0) +#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define LONGLONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) +#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0) +#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define PLONGLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) +#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0) +#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0) +#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0) +#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0) +#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0) +#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0) +#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0) +#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define LONGLONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */ +#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) +#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) +#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) +#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) +#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) +#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) +#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) +#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0) +#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +/*CRAY coughs on the first, + i.e. the usual trouble of not being able to + define macros to macros with arguments. + New ultrix is worse, it coughs on all such uses. + */ +/*#define SIMPLE_cfINT PVOID_cfINT*/ +#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) +#define CF_0_cfINT(N,A,B,X,Y,Z) + + +#define UCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,U,TN,_(A,I),0) +#define UUCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _SEP_(TN,1,I) +#define UUUCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,U,TN,_(A,I),0) +#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A +#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A +#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A +#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A +#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A +#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A +#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A +#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A +#define PINT_cfU(T,A) _(T,_cfTYPE) * A +#define PVOID_cfU(T,A) void *A +#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO) +#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */ +#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */ +#define STRINGV_cfU(T,A) char *A +#define PSTRING_cfU(T,A) char *A +#define PSTRINGV_cfU(T,A) char *A +#define ZTRINGV_cfU(T,A) char *A +#define PZTRINGV_cfU(T,A) char *A + +/* VOID breaks U into U and UU. */ +#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A +#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */ +#define STRING_cfUU(T,A) char *A + + +#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A +#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A +#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A +#else +#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A +#endif +#else +#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A +#endif +#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A +#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A +#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A +#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A +#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A +#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A + +#define BYTE_cfE INTEGER_BYTE A0; +#define DOUBLE_cfE DOUBLE_PRECISION A0; +#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) +#define FLOAT_cfE FORTRAN_REAL A0; +#else +#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0; +#endif +#define INT_cfE int A0; +#define LOGICAL_cfE int A0; +#define LONG_cfE long A0; +#define SHORT_cfE short A0; +#define VOID_cfE +#ifdef vmsFortran +#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ + static fstring A0 = \ + {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\ + memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\ + *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0'; +#else +#ifdef CRAYFortran +#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ + static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\ + memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\ + A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING); +#else +/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1]; + * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */ +#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ + memset(A0, CFORTRAN_NON_CHAR, \ + MAX_LEN_FORTRAN_FUNCTION_STRING); \ + *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0'; +#endif +#endif +/* ESTRING must use static char. array which is guaranteed to exist after + function returns. */ + +/* N.B.i) The diff. for 0 (Zero) and >=1 arguments. + ii)That the following create an unmatched bracket, i.e. '(', which + must of course be matched in the call. + iii)Commas must be handled very carefully */ +#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)( +#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)( +#ifdef vmsFortran +#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0 +#else +#if defined(CRAYFortran) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) +#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0 +#else +#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING +#endif +#endif + +#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN) +#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN) +#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/ + +#define BYTEVVVVVVV_cfPP +#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */ +#define DOUBLEVVVVVVV_cfPP +#define LOGICALVVVVVVV_cfPP +#define LONGVVVVVVV_cfPP +#define SHORTVVVVVVV_cfPP +#define PBYTE_cfPP +#define PINT_cfPP +#define PDOUBLE_cfPP +#define PLOGICAL_cfPP +#define PLONG_cfPP +#define PSHORT_cfPP +#define PFLOAT_cfPP FLOATVVVVVVV_cfPP + +#define BCF(TN,AN,C) _SEP_(TN,C,cfCOMMA) _Icf(2,B,TN,AN,0) +#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A +#define INTV_cfB(T,A) A +#define INTVV_cfB(T,A) (A)[0] +#define INTVVV_cfB(T,A) (A)[0][0] +#define INTVVVV_cfB(T,A) (A)[0][0][0] +#define INTVVVVV_cfB(T,A) (A)[0][0][0][0] +#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0] +#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0] +#define PINT_cfB(T,A) _(T,_cfPP)&A +#define STRING_cfB(T,A) (char *) A +#define STRINGV_cfB(T,A) (char *) A +#define PSTRING_cfB(T,A) (char *) A +#define PSTRINGV_cfB(T,A) (char *) A +#define PVOID_cfB(T,A) (void *) A +#define ROUTINE_cfB(T,A) (cfCAST_FUNCTION)A +#define ZTRINGV_cfB(T,A) (char *) A +#define PZTRINGV_cfB(T,A) (char *) A + +#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0) +#define DEFAULT_cfS(M,I,A) +#define LOGICAL_cfS(M,I,A) +#define PLOGICAL_cfS(M,I,A) +#define STRING_cfS(M,I,A) ,sizeof(A) +#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \ + +secondindexlength(A)) +#define PSTRING_cfS(M,I,A) ,sizeof(A) +#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A) +#define ZTRINGV_cfS(M,I,A) +#define PZTRINGV_cfS(M,I,A) + +#define HCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA, H,_(C,I),0,0) +#define HHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA,HH,_(C,I),0,0) +#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOLON, H,_(C,I),0,0) +#define H_CF_SPECIAL unsigned +#define HH_CF_SPECIAL +#define DEFAULT_cfH(M,I,A) +#define LOGICAL_cfH(S,U,B) +#define PLOGICAL_cfH(S,U,B) +#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B +#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B) +#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B) +#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B) +#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B) +#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B) +#define ZTRINGV_cfH(S,U,B) +#define PZTRINGV_cfH(S,U,B) + +/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */ +/* No spaces inside expansion. They screws up macro catenation kludge. */ +#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E) +#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define LONGLONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E) +#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define PLONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */ +#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E) +#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E) +#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E) +#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E) +#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E) +#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E) +#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) +#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E) +#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E) +#define CF_0_cfSTR(N,T,A,B,C,D,E) + +/* See ACF table comments, which explain why CCF was split into two. */ +#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I)) +#define DEFAULT_cfC(M,I,A,B,C) +#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A); +#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A); +#ifdef vmsFortran +#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \ + C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \ + (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0')); + /* PSTRING_cfC to beware of array A which does not contain any \0. */ +#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \ + B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \ + memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1)); +#else +#define STRING_cfC(M,I,A,B,C) (B.nombre=A,B.clen=strlen(A), \ + C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \ + (memset(B.nombre+B.clen,' ',C-B.clen-1),B.nombre[B.flen=C-1]='\0')); +#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \ + (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1)); +#endif + /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */ +#define STRINGV_cfC(M,I,A,B,C) \ + AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF) +#define PSTRINGV_cfC(M,I,A,B,C) \ + APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF) +#define ZTRINGV_cfC(M,I,A,B,C) \ + AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \ + (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 ) +#define PZTRINGV_cfC(M,I,A,B,C) \ + APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \ + (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 ) + +#define BYTE_cfCCC(A,B) &A +#define DOUBLE_cfCCC(A,B) &A +#if !defined(__CF__KnR) +#define FLOAT_cfCCC(A,B) &A + /* Although the VAX doesn't, at least the */ +#else /* HP and K&R mips promote float arg.'s of */ +#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */ +#endif /* use A here to pass the argument to FORTRAN. */ +#define INT_cfCCC(A,B) &A +#define LOGICAL_cfCCC(A,B) &A +#define LONG_cfCCC(A,B) &A +#define SHORT_cfCCC(A,B) &A +#define PBYTE_cfCCC(A,B) A +#define PDOUBLE_cfCCC(A,B) A +#define PFLOAT_cfCCC(A,B) A +#define PINT_cfCCC(A,B) A +#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */ +#define PLONG_cfCCC(A,B) A +#define PSHORT_cfCCC(A,B) A + +#define CCCF(TN,I,M) _SEP_(TN,M,cfCOMMA) _Icf(3,CC,TN,_(A,I),_(B,I)) +#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B) +#define INTV_cfCC(T,A,B) A +#define INTVV_cfCC(T,A,B) A +#define INTVVV_cfCC(T,A,B) A +#define INTVVVV_cfCC(T,A,B) A +#define INTVVVVV_cfCC(T,A,B) A +#define INTVVVVVV_cfCC(T,A,B) A +#define INTVVVVVVV_cfCC(T,A,B) A +#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B) +#define PVOID_cfCC(T,A,B) A +#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) +#define ROUTINE_cfCC(T,A,B) &A +#else +#define ROUTINE_cfCC(T,A,B) A +#endif +#define SIMPLE_cfCC(T,A,B) A +#ifdef vmsFortran +#define STRING_cfCC(T,A,B) &B.f +#define STRINGV_cfCC(T,A,B) &B +#define PSTRING_cfCC(T,A,B) &B +#define PSTRINGV_cfCC(T,A,B) &B +#else +#ifdef CRAYFortran +#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen) +#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen) +#define PSTRING_cfCC(T,A,B) _cptofcd(A,B) +#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen) +#else +#define STRING_cfCC(T,A,B) A +#define STRINGV_cfCC(T,A,B) B.fs +#define PSTRING_cfCC(T,A,B) A +#define PSTRINGV_cfCC(T,A,B) B.fs +#endif +#endif +#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B) +#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B) + +#define BYTE_cfX return A0; +#define DOUBLE_cfX return A0; +#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) +#define FLOAT_cfX return A0; +#else +#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0; +#endif +#define INT_cfX return A0; +#define LOGICAL_cfX return F2CLOGICAL(A0); +#define LONG_cfX return A0; +#define SHORT_cfX return A0; +#define VOID_cfX return ; +#if defined(vmsFortran) || defined(CRAYFortran) +#define STRING_cfX return kill_trailing( \ + kill_trailing(AA0,CFORTRAN_NON_CHAR),' '); +#else +#define STRING_cfX return kill_trailing( \ + kill_trailing( A0,CFORTRAN_NON_CHAR),' '); +#endif + +#define CFFUN(NAME) _(__cf__,NAME) + +/* Note that we don't use LN here, but we keep it for consistency. */ +#define CCALLSFFUN0(UN,LN) CFFUN(UN)() + +#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ +#pragma standard +#endif + +#define CCALLSFFUN1( UN,LN,T1, A1) \ + CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0) +#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \ + CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0) +#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \ + CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0) +#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\ + CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0) +#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \ + CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0) +#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \ + CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0) +#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \ + CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0) +#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \ + CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0) +#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\ + CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0) +#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\ + CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0) +#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\ + CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0) +#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\ + CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0) +#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\ + CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0) + +#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ +((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \ + BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \ + BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \ + SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \ + SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \ + SCF(T9,LN,9,A9) SCF(TA,LN,10,AA) SCF(TB,LN,11,AB) SCF(TC,LN,12,AC) \ + SCF(TD,LN,13,AD) SCF(TE,LN,14,AE)))) + +/* N.B. Create a separate function instead of using (call function, function +value here) because in order to create the variables needed for the input +arg.'s which may be const.'s one has to do the creation within {}, but these +can never be placed within ()'s. Therefore one must create wrapper functions. +gcc, on the other hand may be able to avoid the wrapper functions. */ + +/* Prototypes are needed to correctly handle the value returned correctly. N.B. +Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN +functions returning strings have extra arg.'s. Don't bother, since this only +causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn +for the same function in the same source code. Something done by the experts in +debugging only.*/ + +#define PROTOCCALLSFFUN0(F,UN,LN) \ +_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \ +static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)} + +#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \ + PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \ + PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \ + PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0) +#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \ + PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0) +#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \ + PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \ + PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ + PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ + PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0) +#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ + PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0) +#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ + PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ + PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) +#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ + PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) +#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ + PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) + +/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */ + +#ifndef __CF__KnR +#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \ + CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ +{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \ + CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \ + CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \ + CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \ + CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \ + WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ + WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \ + WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)} +#else +#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \ + CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ + CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \ +{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \ + CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \ + CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \ + CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \ + CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \ + WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ + WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \ + WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)} +#endif + +/*-------------------------------------------------------------------------*/ + +/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */ + +#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */ +#pragma nostandard +#endif + +#if defined(vmsFortran) || defined(CRAYFortran) +#define DCF(TN,I) +#define DDCF(TN,I) +#define DDDCF(TN,I) +#else +#define DCF(TN,I) HCF(TN,I) +#define DDCF(TN,I) HHCF(TN,I) +#define DDDCF(TN,I) HHHCF(TN,I) +#endif + +#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0) +#define DEFAULT_cfQ(B) +#define LOGICAL_cfQ(B) +#define PLOGICAL_cfQ(B) +#define STRINGV_cfQ(B) char *B; unsigned int _(B,N); +#define STRING_cfQ(B) char *B=NULL; +#define PSTRING_cfQ(B) char *B=NULL; +#define PSTRINGV_cfQ(B) STRINGV_cfQ(B) +#define PNSTRING_cfQ(B) char *B=NULL; +#define PPSTRING_cfQ(B) + +#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */ +#define ROUTINE_orig *(void**)& +#else +#define ROUTINE_orig (void *) +#endif + +#define ROUTINE_1 ROUTINE_orig +#define ROUTINE_2 ROUTINE_orig +#define ROUTINE_3 ROUTINE_orig +#define ROUTINE_4 ROUTINE_orig +#define ROUTINE_5 ROUTINE_orig +#define ROUTINE_6 ROUTINE_orig +#define ROUTINE_7 ROUTINE_orig +#define ROUTINE_8 ROUTINE_orig +#define ROUTINE_9 ROUTINE_orig +#define ROUTINE_10 ROUTINE_orig +#define ROUTINE_11 ROUTINE_orig +#define ROUTINE_12 ROUTINE_orig +#define ROUTINE_13 ROUTINE_orig +#define ROUTINE_14 ROUTINE_orig +#define ROUTINE_15 ROUTINE_orig +#define ROUTINE_16 ROUTINE_orig +#define ROUTINE_17 ROUTINE_orig +#define ROUTINE_18 ROUTINE_orig +#define ROUTINE_19 ROUTINE_orig +#define ROUTINE_20 ROUTINE_orig +#define ROUTINE_21 ROUTINE_orig +#define ROUTINE_22 ROUTINE_orig +#define ROUTINE_23 ROUTINE_orig +#define ROUTINE_24 ROUTINE_orig +#define ROUTINE_25 ROUTINE_orig +#define ROUTINE_26 ROUTINE_orig +#define ROUTINE_27 ROUTINE_orig + +#define TCF(NAME,TN,I,M) _SEP_(TN,M,cfCOMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I)) +#define BYTE_cfT(M,I,A,B,D) *A +#define DOUBLE_cfT(M,I,A,B,D) *A +#define FLOAT_cfT(M,I,A,B,D) *A +#define INT_cfT(M,I,A,B,D) *A +#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A) +#define LONG_cfT(M,I,A,B,D) *A +#define LONGLONG_cfT(M,I,A,B,D) *A /* added by MR December 2005 */ +#define SHORT_cfT(M,I,A,B,D) *A +#define BYTEV_cfT(M,I,A,B,D) A +#define DOUBLEV_cfT(M,I,A,B,D) A +#define FLOATV_cfT(M,I,A,B,D) VOIDP A +#define INTV_cfT(M,I,A,B,D) A +#define LOGICALV_cfT(M,I,A,B,D) A +#define LONGV_cfT(M,I,A,B,D) A +#define LONGLONGV_cfT(M,I,A,B,D) A /* added by MR December 2005 */ +#define SHORTV_cfT(M,I,A,B,D) A +#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/ +#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */ +#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */ +#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */ +#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */ +#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */ +#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A +#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A +#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A +#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A +#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A +#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A +#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define INTVV_cfT(M,I,A,B,D) (void *)A +#define INTVVV_cfT(M,I,A,B,D) (void *)A +#define INTVVVV_cfT(M,I,A,B,D) (void *)A +#define INTVVVVV_cfT(M,I,A,B,D) (void *)A +#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A +#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A +#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define LONGVV_cfT(M,I,A,B,D) (void *)A +#define LONGVVV_cfT(M,I,A,B,D) (void *)A +#define LONGVVVV_cfT(M,I,A,B,D) (void *)A +#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A +#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A +#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define LONGLONGVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define LONGLONGVVVVVVV_cfT(M,I,A,B,D) (void *)A /* added by MR December 2005 */ +#define SHORTVV_cfT(M,I,A,B,D) (void *)A +#define SHORTVVV_cfT(M,I,A,B,D) (void *)A +#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A +#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A +#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A +#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A +#define PBYTE_cfT(M,I,A,B,D) A +#define PDOUBLE_cfT(M,I,A,B,D) A +#define PFLOAT_cfT(M,I,A,B,D) VOIDP A +#define PINT_cfT(M,I,A,B,D) A +#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A) +#define PLONG_cfT(M,I,A,B,D) A +#define PLONGLONG_cfT(M,I,A,B,D) A /* added by MR December 2005 */ +#define PSHORT_cfT(M,I,A,B,D) A +#define PVOID_cfT(M,I,A,B,D) A +#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) +#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A) +#else +#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A +#endif +/* A == pointer to the characters + D == length of the string, or of an element in an array of strings + E == number of elements in an array of strings */ +#define TTSTR( A,B,D) \ + ((B=_cf_malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' ')) +#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \ + memchr(A,'\0',D) ?A : TTSTR(A,B,D) +#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=_cf_malloc(_(B,N)*(D+1)), (void *) \ + vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' ')) +#ifdef vmsFortran +#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length) +#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \ + A->dsc$w_length , A->dsc$l_m[0]) +#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length) +#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer +#else +#ifdef CRAYFortran +#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A)) +#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \ + num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I))) +#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A)) +#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A) +#else +#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D) +#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I))) +#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D) +#define PPSTRING_cfT(M,I,A,B,D) A +#endif +#endif +#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D) +#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D) +#define CF_0_cfT(M,I,A,B,D) + +#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0) +#define DEFAULT_cfR(A,B,D) +#define LOGICAL_cfR(A,B,D) +#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A); +#define STRING_cfR(A,B,D) if (B) _cf_free(B); +#define STRINGV_cfR(A,B,D) _cf_free(B); +/* A and D as defined above for TSTRING(V) */ +#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \ + (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), _cf_free(B); +#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), _cf_free(B); +#ifdef vmsFortran +#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length) +#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length) +#else +#ifdef CRAYFortran +#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A)) +#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A)) +#else +#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D) +#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D) +#endif +#endif +#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D) +#define PPSTRING_cfR(A,B,D) + +#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define LONGLONG_cfFZ(UN,LN) LONGLONG FCALLSC_QUALIFIER fcallsc(UN,LN)( /* added by MR December 2005 */ +#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)( +#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)( +#ifndef __CF__KnR +/* The void is req'd by the Apollo, to make this an ANSI function declaration. + The Apollo promotes K&R float functions to double. */ +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(void +#else +#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void +#endif +#ifdef vmsFortran +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS +#else +#ifdef CRAYFortran +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS +#else +#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS +#else +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0 +#endif +#endif +#endif +#else +#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( +#else +#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( +#endif +#else +#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)( +#endif +#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran) +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS +#else +#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0 +#endif +#endif + +#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN) +#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN) +#ifndef __CF_KnR +#if defined (f2cFortran) && ! defined (gFortran) +/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */ +#define FLOAT_cfF(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( +#else +#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( +#endif +#else +#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN) +#endif +#define INT_cfF(UN,LN) INT_cfFZ(UN,LN) +#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN) +#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN) +#define LONGLONG_cfF(UN,LN) LONGLONG_cfFZ(UN,LN) /* added by MR December 2005 */ +#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN) +#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN) +#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN), + +#define INT_cfFF +#define VOID_cfFF +#ifdef vmsFortran +#define STRING_cfFF fstring *AS; +#else +#ifdef CRAYFortran +#define STRING_cfFF _fcd AS; +#else +#define STRING_cfFF char *AS; unsigned D0; +#endif +#endif + +#define INT_cfL A0= +#define STRING_cfL A0= +#define VOID_cfL + +#define INT_cfK +#define VOID_cfK +/* KSTRING copies the string into the position provided by the caller. */ +#ifdef vmsFortran +#define STRING_cfK \ + memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\ + AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \ + memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \ + AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0; +#else +#ifdef CRAYFortran +#define STRING_cfK \ + memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \ + _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \ + memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \ + _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0; +#else +#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \ + D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \ + ' ', D0-(A0==NULL?0:strlen(A0))):0; +#endif +#endif + +/* Note that K.. and I.. can't be combined since K.. has to access data before +R.., in order for functions returning strings which are also passed in as +arguments to work correctly. Note that R.. frees and hence may corrupt the +string. */ +#define BYTE_cfI return A0; +#define DOUBLE_cfI return A0; +#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) +#define FLOAT_cfI return A0; +#else +#define FLOAT_cfI RETURNFLOAT(A0); +#endif +#define INT_cfI return A0; +#ifdef hpuxFortran800 +/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */ +#define LOGICAL_cfI return ((A0)?1:0); +#else +#define LOGICAL_cfI return C2FLOGICAL(A0); +#endif +#define LONG_cfI return A0; +#define LONGLONG_cfI return A0; /* added by MR December 2005 */ +#define SHORT_cfI return A0; +#define STRING_cfI return ; +#define VOID_cfI return ; + +#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ +#pragma standard +#endif + +#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN) +#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1) +#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2) +#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3) +#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \ + FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4) +#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \ + FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5) +#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \ + FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6) +#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ + FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) +#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ + FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) +#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ + FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) +#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ + FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) +#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ + FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) +#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ + FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) +#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ + FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) +#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) +#define FCALLSCSUB15(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ + FCALLSCFUN15(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) +#define FCALLSCSUB16(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ + FCALLSCFUN16(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) +#define FCALLSCSUB17(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ + FCALLSCFUN17(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) +#define FCALLSCSUB18(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ + FCALLSCFUN18(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) +#define FCALLSCSUB19(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ + FCALLSCFUN19(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) +#define FCALLSCSUB20(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + FCALLSCFUN20(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) +#define FCALLSCSUB21(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \ + FCALLSCFUN21(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) +#define FCALLSCSUB22(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \ + FCALLSCFUN22(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) +#define FCALLSCSUB23(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \ + FCALLSCFUN23(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) +#define FCALLSCSUB24(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \ + FCALLSCFUN24(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) +#define FCALLSCSUB25(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \ + FCALLSCFUN25(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) +#define FCALLSCSUB26(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \ + FCALLSCFUN26(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) +#define FCALLSCSUB27(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + FCALLSCFUN27(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) + + +#define FCALLSCFUN1( T0,CN,UN,LN,T1) \ + FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \ + FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0) +#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \ + FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0) +#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \ + FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0) +#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \ + FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \ + FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ + FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0) +#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ + FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0) +#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ + FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0) +#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ + FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ + FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) +#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ + FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) +#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ + FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) + + +#define FCALLSCFUN15(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ + FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN16(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ + FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN17(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ + FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0) +#define FCALLSCFUN18(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ + FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0) +#define FCALLSCFUN19(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ + FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0) +#define FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN21(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN22(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN23(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0) +#define FCALLSCFUN24(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0) +#define FCALLSCFUN25(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0) +#define FCALLSCFUN26(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \ + FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0) + + +#ifndef __CF__KnR +#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \ + {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)} + +#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + CFextern _(T0,_cfF)(UN,LN) \ + CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ + { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ + TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ + TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ + TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \ + CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) } + +#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + CFextern _(T0,_cfF)(UN,LN) \ + CFARGT27(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) ) \ + { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ + TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ + TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ + TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \ + TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \ + TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \ + CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI) } + +#else +#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\ + {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)} + +#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + CFextern _(T0,_cfF)(UN,LN) \ + CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \ + CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \ + { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ + _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ + TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ + TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ + TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \ + CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)} + +#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + CFextern _(T0,_cfF)(UN,LN) \ + CFARGT27(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)) _Icf(0,FF,T0,0,0) \ + CFARGT27FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR); \ + { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ + _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ + TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ + TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ + TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \ + TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \ + TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \ + CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI)} + +#endif + + +#endif /* __CFORTRAN_LOADED */ diff --git a/software/cfitsio3040/changes.txt b/software/cfitsio3040/changes.txt new file mode 100644 index 000000000..08c77d3c9 --- /dev/null +++ b/software/cfitsio3040/changes.txt @@ -0,0 +1,2977 @@ + Log of Changes Made to CFITSIO + +Version 3.04 - 3 April 2007 + + - modified putkey.c to support USHORT_IMG when calling fits_create_img + to create a signed byte datatype image. + + - enhanced the column histrogramming function to propagate any TCn_k and + TPn_k keywords in the table header to the corresponding CDi_j and PCi_j + keywords in the image header. + + - The various table calculator routines (fits_select_rows, etc.) implicitly + assumed that the input table has not been modified immediately prior to + the call. To cover cases where the table has been modified a call to + ffrdef has been added to ffprs. + + - enhanced the random, randomn, and randomp functions in the lexical + parser to take a vector column name argument to specify the length + of the vector of random numbers that should be generated (provided by + Craig Markwardt, GSFC) + + - enhanced the ffmcrd routine (to modify an existing header card) to + support long string keywords so that any CONTINUE keywords associated + with the previous keyword will be deleted. + + - modified the ffgtbp routine to recognize the TDIMn keyword for + ASCII string columns in a binary table. The first dimension is + taken to be the size of a unit string. (The TFORMn = 'rAw' + syntax may also be used to specify the unit string size). + + - in fits_img_decompress, the fits_get_img_param function was called + with an invalid dimension size, which caused a fatal error on at + least 1 platform. + + - in ffopentest, set the status value before returning in case of error. + + - in the drvrnet.c file, the string terminators needed to be changed + from "\n" to "\r\n" to support the strict interpretation of the + http and ftp standard that is enforced by some newer web servers. + +Version 3.03 - 11 December 2006 + + New Routine + + - fits_write_hdu writes the current HDU to a FILE stream (e.g. stdout). + + Changes + + - modified the region parsing code to support region files where the + keyword "physical" is on a separate line preceeding the region shape + token. (However, "physical" coordinates are not fully supported, and + are treated identically to "image" coordinates). + + - enhanced the iterator routines to support calculations on 64-bit + integer columns and images. Currently, the values are cast to + double precision when doing the calculations, which can cause a + loss of precision for integer values greater than about 2**52. + + - added support for accessing FITS files on the computational grid. + Giuliano Taffoni and Andrea Barisani, at INAF, University of Trieste, + Italy, implemented the necessary I/O driver routines in drvrgsiftp.c. + + - modified the tiled image compression/uncompression routines to + preserve/restore the original CHECKSUM and DATASUM keywords if they + exist. (saved as ZHECKSUM and ZDATASUM in the compressed image) + + - split fits_select_image_section into 2 routines: a higher level routine + that creates the output file and copies other HDUs from the input file + to the output file, and a lower level routine that extracts the image + section from the input image into an output image HDU. + + - Improved the error messages that get generated if one tries to + use the lexical parser to perform calculations on variable-length + array columns. + + - added "#define MACHINE NATIVE" in fitsio2.h for all machies where + BYTESWAPPED == FALSE. This may improve the file writing performance + by eliminating the need to allocate a temporary buffer in some cases. + + - modified the configure.in and configure script to fix problems with + testing if network services are available, which affects the definition + of the HAVE_NET_SERIVES flag. + + - added explicit type casting to all malloc statements, and deleted + declarations of unreferenced variables in the image compression code + to suppress compiler warnings. + + - fixed incorrect logic in fitsio2.h in the way it determined if numerical + values are byteswapped or not on MIPS and ARM architectures. + + - added __BORLANDC__ to the list of environments in fitsio.h that don't + use %lld in printf for longlong integers + + - added "#if defined(unix)" around "#include " statements in + several C source files, to make them compatible with Windows. + + +Version 3.02 - 18 Sept 2006 + + - applied the security patch to the gzip code, available at + http://security.FreeBSD.org/patches/SA-06:21/gzip.patch + The insufficient bounds checks in buffer use can cause gzip to crash, + and may permit the execution of arbitrary code. The NULL pointer + deference can cause gzip to crash. The infinite loop can cause a + Denial-of-Service situation where gzip uses all available CPU time. + + - added HCOMPRESS as one of the compression algorithm options in the + tiled image compression code. (code provided by Richard White (STScI)) + Made other improvements to preserve the exact header structure in the + compressed image file so that the compressed-and-then-uncompressed FITS + image will be as identical as possible to the original FITS image file. + + New Routines + + - the following new routines were added to support reading and writing + non-standard extension types: + fits_write_exthdr - write required keywords for a conforming extension + fits_write_ext - write data to the extension + fits_read_ext - read data from the extension + + - added new routines to compute the RMS noise in the background pixels + of an image: fits_rms_float and fits_rms_short (take an input + array of floats or shorts, respectively). + + Fixes + + - added the missing 64-bit integer case to set of "if (datatype)" + statements in the routine that returns information about a + particular column (ffgbclll). + + - fixed a parsing error in ffexts in cases where an extension number + is followed by a semi-colon and then the column and row number of an + array in a binary table. Also removed an extraneous HISTORY keyword + that was being written when specifying an input image in a table cel. + + - modified the routine that reads a table column returning a string + value (ffgcls) so that if the displayed numerical value is too + wide to fit in the specified length string, then it will return + a string of "*" characters instead of the number string. + + - small change to fitsio.h to support a particular Fortran and C + compiler combination on a SGI Altix system + + - added a test in the gunzip code to prevent seg. fault when trying + to uncompress a corrupted file (at least in some cases). + + - fixed a rarely-occurring bug in the routine that copies a table + cell into an image; had to call the ffflsh call a few lines earlier. + +Version 3.01 - (in FTOOLS 6.1 release) + + - modified fits_copy_image2cell to correctly copy all the appropriate + header keywords when copying an image into a table cell + + - in eval.y, explicitly included the code for the lgamma function + instead of assuming it is available in a system library (e.g., the + lgamma function is currently not included in MS Visual++ libraries) + + - modified the logic in fits_pixel_filter so that the default data + type of the output image will be promoted to at least BITPIX = -32 + (a single precision floating point) if the expression that is being + evaluated resolves to a floating point result. If the expression + resolves to an integer result, the output image will have the same + BITPIX as the input image. + + - in fits_copy_cell2image, added 5 more WCS keywords to the list of + keywords related to other columns that should be deleted in the + output image header. + + - disabled code in cfileio.c that would write HISTORY keywords to the + output file in fits_copy_image2cell and cell2image, because some tasks + would not want these extraneous HISTORY keywords. + + - added 2 new random number functions to the CFITSIO parser + RANDOMN() - produces a normal deviate (mean=0, stddev=1) + RANDOMP(X) - produces a Poisson deviate for an expected # of counts X + + - in f77_wrap.h, removed the restriction that "g77Fortran" must be + defined on 64-bit Itanium machines before assuming that + sizeof(long) = 8. It appears that "long"s are always + 8 bytes long on this machine, regardless of what compilers are used. + + - added test in fitsio.h so that LONGLONG cannot be multiply defined + + - modified longnam.h so that both "fits_write_nulrows" and + "fits_write_nullrows" get replace by the string "ffprwu". This + fixes a documentation error regarding the long name of this + routine. + + Bug fixes + + - fixed a potential null character string dereferencing error in the + the ffphtb and ffphbn routines that write the FITS table keywords. + This concerned the optional TUNITn keywords. + + - fixed a few issues in fits_copy_cell2image and fits_copy_image2cell + related to converting some WCS keyword between the image extension + form and the table cell form of the keyword. (cfileio.c) + + - fixed bug in fits_translate_keyword (fitscore.c) that, e.g., caused + 'EQUINOX' to be translated to EQUINOXA' if the pattern is 'EQUINOXa' + + - fixed 2 bugs that could affect 'tile compressed' floating point + images that contain NaN pixels (null pixels). First, the + ZBLANK keyword was not being written, and second, an integer + overflow could occur when computing the BZERO offset in the + compressed array. (quantize.c and imcompress.c) + +Version 3.006 - 20 February 2006 -(first full release of v3) + + - enhanced the 'col' extended filename syntax to support keyword name + expressions like + [col error=sqrt(rate); #TUNIT# = 'counts/s'], + in which the trailing '#' will be replaced by the column number + of the most recently referenced column. + + - fixed bug in the parse_data iterator work function that caused it + to fail to return a value of -1 in cases where only a selected + set of rows were to be processed. (affected Fv) + + - added code to fitsio.h and cfortran.h to typedef LONGLONG to + the appropriate 8-byte integer data type. Most compilers now + support the 'long long' data type, but older MS Visual C++ + compilers used '__int64' instead. + + - made several small changes based on testing by Martin Reinecke: + o in eval.y, change 'int undef' to 'long undef' + o in getcold.c and getcole.c, fixed a couple format conversion + specifiers when displaying the value of long long variables. + o in fitsio.h, modified the definition of USE_LL_SUFFIX in the + case of Athon64 machines. + o in fitsio2.h, defined BYTESWAPPED in the case of SGI machines. + o in group.c, added 'include unistd.h' to get rid of compiler warning. + +Version 3.005 - 20 December 2005 (beta) + + - cfortran.h has been enhanced to support 64-bit integer parameters + when calling C routines from Fortran. This modification was kindly + provided by Martin Reinecke (MPE, Garching). + + - Many new Fortran wrapper routines have been added to support reading + and writing 64-bit integer values in FITS files. These new routines + are documented in the updated version of the 'FITSIO User's Guide' + for Fortran programmers. + + - fixed a problem in the fits_get_keyclass routine that caused it + to not recognize the special COMMENT keywords at the beginning + of most FITS files that defines the FITS format. + + - added a new check to the ffifile routine that parses the + input extended file name, to distinguish between a FITS extension + name that begins with 'pix', and a pixel filtering operator that + begins with the 'pix' keyword. + + - small change to the WCSLIB interface routine, fits_read_wcstab, to + be more permissive in allowing the TDIMn keyword to be omitted for + degenerate coordinate array. + +Version 3.004 - 16 September 2005 (3rd public beta release) + + - a major enhancement to the CFITSIO virtual file parser was provided + by Robert Wiegand (GSFC). One can now specify filtering operations + that will be applied on the fly to the pixel values in a FITS image. + For example [pix sqrt(X)] will create a virtual FITS image where the + pixel values are the square root of the input image pixels. + + - modified region.c so that it interprets the position angles of regions + in a SAO style region file in the same way as DS9. In particular, if + the region parameters are given in WCS units, then the position angle + should be relative to the WCS coordinates of the image (increasing CCW + from West) instead of relative to the X/Y pixel coordinate system. + This only affects rotated images (e.g. with non-zero CROTA2 keyword) + with elliptical or rectangular regions. + + - cleaned up fitsio.h and fitsio2.h to make the definition of LONGLONG + and BYTESWAPPED and MACHINE more logical. + + - removed HAVE_LONGLONG everywhere since it is no longer needed (the + compiler now must have an 8-byte integer datatype to build CFITSIO). + + - added support for the 64-bit IBM AIX platform + + - modifed eval.y so that the circle, ellipse, box, and near functions + can operate on vectors as well as scalars. This allows region filtering + on images that are stored in a vector cell in a binary table. + (provided by Craig Markwardt, GSFC) + + New Routines + + - added new fits_read_wcstab routine that serves as an interface to + Mark Calabretta's wcslib library for reading WCS information when + the -TAB table lookup convention is used in the FITS file. + + - added new fits_write_nullrows routine, which writes null values into + every column of a specified range of rows in a FITS table. + + - added the fits_translate_keyword and fits_translate_keywords utility + routines for converting the names of keywords when moving columns and + images around. + + - added fits_copy_cell2image and fits_copy_image2cell routines for + copying an image extension (or primary array) to or from a cell + in a binary table vector column. + + Bug fixes + + - fixed a memory leak in eval.y; was fixed by changing a call to malloc + to cmalloc instead. + + - changed the definition of several global variables at the beginning + of buffers.c to make them 'static' and thus invisible to applications + programs. + + - in fits_copy_image_cell, added a call to flush the internal buffers + before reading from the file, in case any records had been modified. + +Version 3.003 - 28 July 2005 - 2nd public beta release (used in HEASOFT) + + Enhancements + + - enhanced the string column reading routing fits_get_col_str to + support cases where the user enters a null pointer (rather than + a null string) as the nulval parameter. + + - modified the low level ffread and ffwrite routines that physically + read and write data from the FITS file so that they write the name + of the file to the CFITSIO error stack if an error occurs. + + - changed the definition of fits_open_file into a macro that will test + that the version of the fitsio.h include file that was used to + build the CFITSIO library is the same version as included when + compiling the application program. + + - made a simple modification to region.c to support regions files + of type "linear", for compatibility with ds9 and fv. + + - modified the internal ffgpr routine (and renamed it ffgprll) so + that it returns the TNULL value as a LONGLONG parameter instead + of 'long'. + + - in fits_get_col_display_width, added support for TFORM = 'k' + + - modified fitsio.h, fitsio2.h, and f77_wrap.h to add test for (_SX) + to identify NEC SX supercomputers. + + - modified eval_f.c to treat table columns of TULONG (unsigned long) + as a double. Also added support for TLONGLONG (8-byte integers) as + a double, which is only a temporary fix, since doubles only have about + 52 bits of precision. + + - changed the 'blank' parameter in the internal ffgphd function to + to type LONGLONG to support integer*8 FITS images. + + - when reading the TNULL keyword value, now use ffc2jj instead of + ffc2ii, to support integer*8 values. + + Bug fixes + + - fixed a significant bug when writing character strings to a variable + length array column of a binary table. This bug would result in some + unused space in the variable length heap, making the heap somewhat + larger than necessary. This in itself is usually a minor issue, since + the FITS files are perfectly valid, and other software should have + no problems reading back the characters strings. In some cases, however, + this problem could cause the program that is writing the table + to exit with a status = 108 disk read error. + + - modified the standalone imcopy.c utility program to fix a memory allocation + bug when running on 64-bit platforms where sizeof(long) = 8 bytes. + + - added an immediate 'return' statement to ffgtcl if the input status >0, + to prevent a segfault on some platforms. + +Version 3.002 - 15 April 2005 - first public beta release + + - in drvrfile.c, if it fails to open the file for some reason, then + it should reset file_outfile to a null string, to avoid errors on + a subsequent call to open a file. + + - updated fits_get_keyclass to recognize most of the WCS keywords + defined in the WCS Papers I and II. + +Version 3.001 - 15 March 2005 - released with HEASOFT 6.0 + + - numerous minor changes to the code to get rid of compiler warning + messages, mainly dealing with numerical data type casting and the + subsequent possible loss of precision in the result. + +Version 3.000 - 1 March 2005 (internal beta release) + + Enhancements: + + - Made major changes to many of the CFITSIO routines to more generally + support Large Files (> 2.1 GB). These changes are intended to + be 100% backward compatible with software that used the previous + versions of CFITSIO. The datatype of many of the integer parameters + in the CFITSIO functions has been changed from 'long' to 'LONGLONG', + which is typedef'ed to be equivalent to an 8-byte integer datatype on + each platform. With these changes, CFITSIO supports the following: + - integer FITS keywords with absolute values > 2**31 + - FITS files with total sizes > 2**31 bytes + - FITS tables in which the number of rows, the row width, or + the size of the heap is > 2**31 bytes + - FITS images with dimensions > 2**31 bytes (support is still + somewhat limited, with full support to be added later). + + - added another lexical parser function (thanks to Craig Markwardt, + GSFC): angsep computes the angular separation between 2 positions + on the celestial sphere. + + - modified the image subset extraction code (e.g., when specifying + an image subregion when opening the file, such as + 'myimage.fits[21:40, 81:90]') so that in addition to + updating the values of the primary WCS keywords CRPIXk, CDELTi, and + CDj_i in the extracted/binned image, it also looks for and updates + any secondary WCS keywords (e.g., 'CRPIX1P'). + + - made cosmetic change to group.c, so that when a group table is + copied, any extra columns will be appended after the last existing + column, instead of being inserted before the last column. + + - modified the routines that read tile compressed images to support + NULL as the input value for the 'anynul' parameter (meaning the + calling program does not want the value of 'anynul' returned to it). + + - when constructing or parsing a year/month/day character string, + (e.g, when writing the DATE keyword) the routines now rigorously + verify that the input day value is valid for the given month + (including leap years). + + - added some checks in cfileio.c to detect if some vital parameters + that are stored in memory have been corrupted. This can occur if + a user's program writes to areas of memory that it did not allocate. + + - added the wcsutil_alternate.c source code file which contains + non-working stubs for the 2 Classic AIPS world coordinate + conversion routines that are distributed under the GNU General + Public License. Users who are unwilling or unable to distribute + their software under the General Public License may use this + alternate source file which has no GPL restrictions, instead + of wcsutil.c. This will have no effect on programs that use + CFITSIO as long as they do not call the fits_pix_to_world/ffwldp + or fits_world_to_pix/ffxypx routines. + + Bug Fixes + + - in ffdtdm (which parses the TDIMn keyword value), the check for + consistency between the length of the array defined by TDIMn and + the size of the TFORMn repeat value, is now not performed for variable + length array columns (which always have repeat = 1). + + - fixed byteswapping problem when writing null values to non-standard + long integer FITS images with BITPIX = 64 and FITS table columns with + TFORMn = 'K'. + + - fixed buffer overflow problem in fits_parse_template/ffgthd that + occurred only if the input template keyword value string was much + longer than can fit in an 80-char header record. + +Version 2.510 - 2 December 2004 + + New Routines: + + - added fits_open_diskfile and fits_create_diskfile routines that simply + open or create a FITS file with a specified name. CFITSIO does not + try to parse the name using the extended filename syntax. + + - 2 new C functions, CFITS2Unit and CUnit2FITS, were added to convert + between the C fitsfile pointer value and the Fortran unit number. + These functions may be useful in mixed language C and Fortran programs. + + Enhancements: + + - added the ability to recognize and open a compressed FITS file + (compressed with gzip or unix compress) on the stdin standard input + stream. + + - Craig Markwardt (GSFC) provided 2 more lexical parser functions: + accum(x) and seqdiff(x) that compute the cummulative sum and the + sequential difference of the values of x. + + - modified putcole.c and putcold.c so that when writing arrays of + pixels to the FITS image or column that contain null values, and + there are also numerical overflows when converting some of the + non-null values to the FITS values, CFITSIO will now ignore the + overflow error until after all the data have been written. Previously, + in some circumstances CFITSIO would have simply stopped writing any + data after the first overflow error. + + - modified fitsio2.h to try to eliminate compiler warning messages + on some platforms about the use of 'long long' constants when + defining the value of LONGLONG_MAX (whether to use L or LL + suffix). + + - modified region.c to support 'physical' regions in addition to + 'image', 'fk4', etc. + + - modified ffiurl (input filename parsing routine) to increase the + maximum allowed extension number that can be specified from 9999 + to 99999 (e.g. 'myfile.fits+99999') + + Bug Fixes: + + - added check to fits_create_template to force it to start with + the primary array in the template file, in case an extension + number was specified as part of the template FITS file name. + +Version 2.500 - 28 & 30 July 2004 + + New Routine: + + - fits_file_exists tests whether the specified input file, or a + compressed version of the file, exists on disk. + + Enhancements: + + - modified the way CFITSIO reads and writes data in COMPLEX ('C') and + DBLCOMPLEX 'M' columns. Now, in all cases, when referring to the + number of elements in the vector, or the value of the offset to a + particular element within the vector, CFITSIO considers each pair of + numbers (the imaginary and real parts) as a single element instead of + treating each single number as an element. In particular, this changes + the behavior of fits_write_col_null when writing to complex columns. + It also changes the length of the 'nullarray' vector in the + fits_read_colnull routine; it is now only 1/2 as long as before. + Each element of the nullarray is set = 1 if either the real or + imaginary parts of the corresponding complex value have a null + value.(this change was added to version 2.500 on 30 July). + + - Craig Markwardt, at GSFC, provided a number of significant enhancements + to the CFITSIO lexical parser that is used to evaluate expressions: + + - the parser now can operate on bit columns ('X') in a similar + way as for other numeric columns (e.g., 'B' or 'I' columns) + + - range checking has been implemented, so that the following + conditions return a Null value, rather than returning an error: + divide by zero, sqrt(negative), arccos(>1), arcsin(>1), + log(negative), log10(negative) + + - new vector functions: MEDIAN, AVERAGE, STDDEV, and + NVALID (returns the number of non-null values in the vector) + + - all the new functions (and SUM, MIN and MAX) ignore null values + + - modified the iterator to support variable-length array columns + + - modified configure to support AIX systems that have flock in a non- + standard location. + + - modified configure to remove the -D_FILE_OFFSET_BITS flag when running + on Mac Darwin systems. This caused conflicts with the Fortran + wrappers, and should only be needed in any case when using CFITSIO + to read/write FITS files greater than 2.1 GB in size. + + - modified fitsio2.h to support compilers that define LONG_LONG_MAX. + + - modified ffrsim (resize an existing image) so that it supports changing + the datatype to an unsigned integer image using the USHORT_IMG and + ULONG_IMG definitions. + + - modified the disk file driver (drvrfile.c) so that if an output + file is specified when opening an ordinary file (e.g. with the syntax + 'myfile.fits(outputfile.fits)' then it will make a copy of the file, + close the original file and open the copy. Previously, the + specified output file would be ignored unless the file was compressed. + + - modified f77_wrap.h and f77_wrap3.c to support the Fortran wrappers + on 64-bit AMD Opteron machines + + Bug fixes: + + - made small change to ffsrow in eval_f.c to avoid potential array + bounds overflow. + + - made small change to group.c to fix problem where an 'int' was + incorrectly being cast to a 'long'. + + - corrected a memory allocation error in the new fits_hdr2str routine + that was added in version 2.48 + + - The on-the-fly row-selection filtering would fail with a segfault + if the length of a table row (NAXIS1 value) was greater than + 500000 bytes. A small change to eval_f.c was required to fix this. + +Version 2.490 - 11 February 2004 + + Bug fixes: + + - fixed a bug that was introduced in the previous release, which caused + the CFITSIO parser to no longer move to a named extension when opening + a FITS file, e.g., when opening myfile.fit[events] CFITSIO would just + open the primary array instead of moving to the EVENTS extension. + + - new group.c file from the INTEGRAL Science Data Center. It fixes + a problem when you attach a child to a parent and they are both + is the same file, but, that parent contains groups in other files. + In certain cases the attach would not happen because it seemed that + the new child was already in the parent group. + + - fixed bug in fits_calculator_rng when performing a calculation + on a range of rows in a table, so that it does not reset the + value in all the other rows that are not in the range = 0. + + - modified fits_write_chksum so that it updates the TFORMn + keywords for any variable length vector table columns BEFORE + calculating the CHECKSUM values. Otherwise the CHECKSUM + value is invalidated when the HDU is subsequently closed. + +Version 2.480 - 28 January 2004 + + New Routines: + + - fits_get_img_equivtype - just like fits_get_img_type, except in + the case of scaled integer images, it returns the 'equivalent' + data type that is necessary to store the scaled data values. + + - fits_hdr2str copies all the header keywords in the current HDU + into a single long character string. This is a convenient method + of passing the header information to other subroutines. + The user may exclude any specified keywords from the list. + + Enhancements: + + - modified the filename parser so that it accepts extension + names that begin with digits, as in 'myfile.fits[123TEST]'. + In this case CFITSIO will try to open the extension with + EXTNAME = '123TEST' instead of trying to move to the 123rd + extension in the file. + + - the template keyword parser now preserves the comments on the + the mandatory FITS keywords if present, otherwise a standard + default comment is provided. + + - modified the ftp driver file (drvrnet.c) to overcome a timeout + or hangup problem caused by some firewall software at the user's + end (Thanks to Bruce O'Neel for this fix). + + - modified iraffits.c to incorporate Doug Mink's latest changes to + his wcstools library routines. The biggest change is that now + the actual image dimensions, rather than the physically stored + dimensions, are used when converting an IRAF file to FITS. + + Bug fixes: + + - when writing to ASCII FITS tables, the 'elemnum' parameter was + supposed to be ignored if it did not have the default value of 1. + In some cases however setting elemnum to a value other than 1 + could cause the wrong number of rows to be produced in the output + table. + + - If a cfitsio calculator expression was imported from a text file + (e.g. using the extended filename syntax 'file.fits[col @file.calc]') + and if any individual lines in that text file were greater than + 255 characters long, then a space character would be inserted + after the 255th character. This could corrupt the line if the space + was inserted within a column name or keyword name token. + +Version 2.480beta (used in the FTOOLS 5.3 release, 1 Nov 2003) + + New Routines: + + - fits_get_eqcoltype - just like fits_get_coltype, except in the + case of scaled integer columns, it returns the 'equivalent' + data type that is necessary to store the scaled data values. + + - fits_split_names - splits an input string containing a comma or + space delimited list of names (typically file names or column + names) into individual name tokens. + + Enhancements: + + - changed fhist in histo.c so that it can make histograms of ASCII + table columns as well as binary table columns (as long as they + contain numeric data). + + Bug fixes: + + - removed an erroneous reference to listhead.c in makefile.vcc, that is + used to build the cfitsio dll under Windows. This caused a 'main' + routine to be added to the library, which causes problems when linking + fortran programs to cfitsio under windows. + + - if an error occurs when opening for a 2nd time (with ffopen) a file that + is already open (e.g., the specified extension doesn't exist), and + if the file had been modified before attempting to reopen it, then + the modified buffers may not get written to disk and the internal + state of the file may become corrupted. ffclos was modified to + always set status=0 before calling ffflsh if the file has been + concurrently opened more than once. + +Version 2.470 - 18 August 2003 + + Enhancements: + + - defined 'TSBYTE' to represent the 'signed char' datatype (similar to + 'TBYTE' that represents the 'unsigned char' datatype) and added + support for this datatype to all the routines that read or write + data to a FITS image or table. This was implemented by adding 2 + new C source code files to the package: getcolsb.c and putcolsb.c. + + - Defined a new '1S' shorthand data code for a signed byte column in + a binary table. CFITSIO will write TFORMn = '1B' and + TZEROn = -128 in this case, which is the convention used to + store signed byte values in a 'B' type column. + + - in fitsio2.h, added test of whether `__x86_64__` is defined, to + support the new AMD Opteron 64-bit processor + + - modified configure to not use the -fast compiler flag on Solaris + platforms when using the proprietary Solaris cc compiler. This + flag causes compilation problems in eval_y.c (compiler just + hangs forever). + + Bug fixes: + + - In the special case of writing 0 elements to a vector table column + that contains 0 rows, ffgcpr no longer adds a blank row to the table. + + - added error checking code for cases where a ASCII string column + in a binary table is greater than 28800 characters wide, to avoid + going into an infinite loop. + + - the fits_get_col_display_width routine was incorrectly returning + width = 0 for a 'A' binary table column that did not have an + explicit vector length character. + +Version 2.460 - 20 May 2003 + + Enhancements: + + - modified the HTTP driver in drvrnet.c so that CFITSIO can read + FITS files via a proxy HTTP server. (This code was contributed by + Philippe Prugniel, Obs. de Lyon). To use this feature, the + 'http_proxy' environment variable must be defined with the + address (URL) and port number of the proxy server, i.e., + > setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 + will use port 3128 on heasarc.gsfc.nasa.gov + + - suppressed some compiler warnings by casting a variable of + type 'size_t' to type 'int' in fftkey (in fitscore.c) and + iraftofits and irafrdimge (in iraffits.c). + +Version 2.450 - 30 April 2003 + + Enhancements: + + - modified the WCS keyword reading routine (ffgics) to support cases + where some of the CDi_j keywords are omitted (with an assumed + value = 0). + + - Made a change to http_open_network in drvrnet.c to add a 'Host: ' + string to the open request. This is required by newer HTTP 1.1 + servers (so-called virtual servers). + + - modified ffgcll (read logical table column) to return the illegal + character value itself if the FITS file contains a logical value that is + not equal to T, F or zero. Previously it treated this case the + same as if the FITS file value was = 0. + + - modified fits_movnam_hdu (ffmnhd) so that it will move to a tile- + compressed image (that is stored in a binary table) if the input + desired HDU type is BINARY_TBL as well as if the HDU type = IMAGE_HDU. + + Bug fixes: + + - in the routine that checks the data fill bytes (ffcdfl), the call + to ffmbyt should not ignore an EOF error when trying to read the bytes. + This is a little-used routine that is not called by any other CFITSIO + routine. + + - fits_copy_file was not reporting an error if it hit the End Of File + while copying the last extension in the input file to the output file. + + - fixed inconsistencies in the virtual file column filter parser + (ffedit_columns) to properly support expressions which create or + modify a keyword, instead of a column. Previously it was only possible + to modify keywords in a table extension (not an image), and the + keyword filtering could cause some of the table columns to not + get propagated into the virtual file. Also, spaces are now + allowed within the specified keyword comment field. + + - ffdtyp was incorrectly returning the data type of FITS keyword + values of the form '1E-09' (i.e., an exponential value without + a decimal point) as integer rather than floating point. + + - The enhancement in the previous 2.440 release to allow more files to be + opened at one time introduced a bug: if ffclos is called with + a non-zero status value, then any subsequent call to ffopen will likely + cause a segmentation fault. The fits_clear_Fptr routine was modified + to fix this. + + - rearranged the order of some computations in fits_resize_img so as + to not exceed the range of a 32-bit integer when dealing with + large images. + + - the template parser routine, ngp_read_xtension, was testing for + "ASCIITABLE" instead of "TABLE" as the XTENSION value of an ASCII + table, and it did not allow for optional trailing spaces in the IMAGE" + or "TABLE" string value. + +Version 2.440 - 8 January 2003 + + Enhancements: + + - modified the iterator function, ffiter, to operate on random + groups files. + + - decoupled the NIOBUF (= 40) parameter from the limit on the number + FITS files that can be opened, so that more files may be opened + without the overhead of having to increase the number of NIOBUF + buffers. A new NMAXFILES parameter is defined in fitsio2.h which sets + the maximum number of opened FITS files. It is set = 300 by default. + Note however, that the underlying compiler or operating system may + not allow this many files to be opened at one time. + + - updated the version of cfortran.h that is distributed with CFITSIO from + version 3.9 to version 4.4. This required changes to f77_wrap.h + and f77_wrap3.c. The original cfortran.h v4.4 file was modified + slightly to support CFITSIO and ftools (see comments in the header + of cfortran.h). + + - modified ffhist so that it copies all the non-structural keywords from + the original binary table header to the binned image header. + + - modified fits_get_keyclass so that it recognizes EXTNAME = + COMPRESSED_IMAGE as a special tile compression keyword. + + - modified Makefile.in to support the standard --prefix convention + for specifying the install target directory. + + Bug fixes: + + - in fits_decompress_img, needed to add a call to ffpscl to turn + off the BZERO and BSCALE scaling when reading the compressed image. + +Version 2.430 - 4 November 2002 + + Enhancements: + + - modified fits_create_hdu/ffcrhd so that it returns without doing + anything and does not generate an error if the current HDU is + already an empty HDU. There is no need in this case to append + a new empty HDU to the file. + + - new version of group.c (supplied by B. O'Neel at the ISDC) fixes 2 + limitations: 1 - Groups now have 256 characters rather than 160 + for the path lengths in the group tables. - ISDC SPR 1720. 2 - + Groups now can have backpointers longer than 68 chars using the long + string convention. - ISDC SPR 1738. + + - small change to f77_wrap.h and f77_wrap3.c to support the fortran + wrappers on SUN solaris 64-bit sparc systems (see also change to v2.033) + + - small change to find_column in eval_f.c to support unsigned long + columns in binary tables (with TZEROn = 2147483648.0) + + - small modification to cfortran.h to support Mac OS-X, (Darwin) + + Bug fixes: + + - When reading tile-compress images, the BSCALE and BZERO scaling + keywords were not being applied, if present. + + - Previous changes to the error message stack code caused the + tile compressed image routines to not clean up spurious error + messages properly. + + - fits_open_image was not skipping over null primary arrays. + +Version 2.420 - 19 July 2002 + + Enhancements: + + - modified the virtual filename parser to support exponential notation + when specifing the min, max or binsize in a binning specifier, as in: + myfile.fits[binr X=1:10:1.0E-01, Y=1:10:1.0E-01] + + - removed the limitation on the maximum number of HDUs in a FITS file + (limit used to be 1000 HDUs per file). Now any number of HDUs + can be written/read in a FITS file. (BUT files that have huge numbers + of HDUs can be difficult to manage and are not recommended); + + - modified grparser.c to support HIERARCH keywords, based on + code supplied by Richard Mathar (Max-Planck) + + - moved the ffflsh (fits_flush_buffer) from the private to the + public interface, since this routine may be useful for some + applications. It is much faster than ffflus. + + - small change to the definition of OFF_T in fitsio.h to support + large files on IBM AIX operating systems. + + Bug fixes: + + - fixed potential problem reading beyond array bounds in ffpkls. This + would not have affected the content of any previously generated FITS + files. + + - in the net driver code in drvrnet.c, the requested protocol string + was changed from "http/1.0" to "HTTP/1.0" to support apache 1.3.26. + + - When using the virtual file syntax to open a vector cell in a binary + table as if it were a primary array image, there was a bug + in fits_copy_image_cell which garbled the data if the vector + was more than 30000 bytes long. + + - fixed problem that caused fits_report_error to crash under Visual + C++ on Windows systems. The fix is to use the '/MD' switch + on the cl command line, or, in Visual Studio, under project + settings / C++ select use runtime library multithreaded DLL + + - modified ffpscl so it does not attempt to reset the scaling values + in the internal structure if the image is tile-compressed. + + - fixed multiple bugs in mem_rawfile_open which affected the case + where a raw binary file is read and converted on the fly into + a FITS file. + + - several small changes to group.c to suppress compiler warnings. + +Version 2.410 - 22 April 2002 (used in the FTOOLS 5.2 release) + + New Routines: + + - fits_open_data behaves similarly to fits_open_file except that it + also will move to the first HDU containing significant data if + and an explicit HDU name or number to open was not specified. + This is useful for automatically skipping over a null primary + array when opening the file. + + - fits_open_table and fits_open_image behaves similarly to + fits_open_data, except they move to the first table or image + HDU in the file, respectively. + + - fits_write_errmark and fits_clear_errmark routines can be use + to write an invisible marker to the CFITSIO error stack, and + then clear any more recent messages on the stack, back to + that mark. This preserves any older messages on the stack. + + - fits_parse_range utility routine parses a row list string + and returns integer arrays giving the min and max row in each + range. + + - fits_delete_rowrange deletes a specified list of rows or row + ranges. + + - fits_copy_file copies all or part of the HDUs in the input file + to the output file. + + - added fits_insert_card/ffikey to the publicly defined set + of routines (previously, it was a private routine). + + Enhancements: + + - changed the default numeric display format in ffgkys from 'E' format + to 'G' format, and changed the format for 'X' columns to a + string of 8 1s or 0s representing each bit value. + + - modified ffflsh so the system 'fflush' call is not made in cases + where the file was opened with 'READONLY' access. + + - modified the output filename parser so the "-.gz", and "stdout.gz" + now cause the output file to be initially created in memory, + and then compressed and written out to the stdout stream when + the file is closed. + + - modified the routines that delete rows from a table to also + update the variable length array heap, to remove any orphaned + data from the heap. + + - modified ffedit_columns so that wild card characters may be + used when specifying column names in the 'col' file filter + specifier (e.g., file.fits[col TIME; *RAW] will create a + virtual table contain only the TIME column and any other columns + whose name ends with 'RAW'). + + - modified the keyword classifier utility, fits_get_keyclass, to + support cases where the input string is just the keyword name, + not the entire 80-character card. + + - modified configure.in and configure to see if a proprietary + C compiler is available (e.g. 'cc'), and only use 'gcc' if not. + + - modified ffcpcl (copy columns from one table to another) so that + it also copies any WCS keywords related to that column. + + - included an alternate source file that can be used to replace + compress.c, which is distributed under the GNU General Public + License. The alternate file contains non-functional stubs for + the compression routines, which can be used to make a version of + CFITSIO that does not have the GPL restrictions (and is also less + functional since it cannot read or write compressed FITS files). + + - modifications to the iterator routine (ffiter) to support writing + tile compressed output images. + + - modified ffourl to support the [compress] qualifier when specifying + the optional output file name. E.g., file.fit(out.file[compress])[3] + + - modified imcomp_compress_tile to fully support implicit data type + conversion when writing to tile-compressed images. Previously, + one could not write a floating point array to an integer compressed + image. + + - increased the number of internal 2880-byte I/O buffers allocated + by CFITSIO from 25 to 40, in recognition of the larger amount + of memory available on typical machines today compared with + a few years ago. The number of buffers can be set by the user + with the NIOBUF parameter in fitsio2.h. (Setting this too large + can actually hurt performance). + + - modified the #if statements in fitsio2.h, f77_wrap.h and f77_wrap1.c + to support the new Itanium 64-bit Intel PC. + + - a couple minor modifications to fitsio.h needed to support the off_t + datatype on debian linux systems. + + - increased internal buffer sizes in ffshft and ffsrow to improve + the I/O performance. + + Bug fixes: + + - fits_get_keyclass could sometimes try to append to an unterminated + string, causing an overflow of a string array. + + - fits_create_template no longer worked because of improvements made + to other routines. Had to modify ffghdt to not try to rescan + the header keywords if the file is still empty and contains no + keywords yet. + + - ffrtnm, which returns the root filename, sometimes did not work + properly when testing if the 'filename+n' convention was used for + specifying an extension number. + + - fixed minor problem in the keyword template parsing routine, ffgthd + which in rare cases could cause an improperly terminated string to + be returned. + + - the routine to compare 2 strings, ffcmps, failed to find a match + in comparing strings like "*R" and "ERROR" where the match occurs + on the last character, but where the same matching character occurs + previously in the 2nd string. + + - the region file reading routine (ffrrgn) did not work correctly if + the region file (created by POW and perhaps other programs) had an + 'exclude' region (beginning with a '-' sign) as the first region + in the file. In this case all points outside the excluded region + should be accepted, but in fact no points were being accepted + in this case. + +Version 2.401 - 28 Jan 2002 + + - added the imcopy example program to the release (and Makefile) + + Bug fixes: + + - fixed typo in the imcompress code which affected compression + of 3D datacubes. + + - made small change to fficls (insert column) to allow colums with + TFORMn = '1PU' and '1PV' to be inserted in a binary table. The + 'U' and 'V' are codes only used within CFITSIO to represent unsigned + 16-bit and 32-bit integers; They get replaced by '1PI' and '1PJ' + respectively in the FITS table header, along with the appropriate + TZEROn keyword. + +Version 2.400 - 18 Jan 2002 + + (N.B.: Application programs must be recompiled, not just relinked + with the new CFITSIO library because of changes made to fitsio.h) + + New Routines: + + - fits_write_subset/ffpss writes a rectangular subset (or the whole + image) to a FITS image. + + - added a whole new family of routines to read and write arrays of + 'long long' integers (64-bit) to FITS images or table columns. The + new routine names all end in 'jj': ffpprjj, ffppnjj, ffp2djj, + ffp3djj, ffppssjj, ffpgpjj, ffpcljj, ffpcnjj. ffgpvjj, ffgpfjj, + ffg2djj, ffg3djj, ffgsvjj, ffgsfjj, ffggpjj, ffgcvjj, and ffgcfjj. + + - added a set of helper routines that are used in conjunction with + the new support for tiled image compression. 3 routines set the + parameters that should be used when CFITSIO compresses an image: + fits_set_compression_type + fits_set_tile_dim + fits_set_noise_bits + + 3 corresponding routines report back the current settings: + fits_get_compression_type + fits_get_tile_dim + fits_get_noise_bits + + Enhancements: + + - major enhancement was made to support writing to tile-compressed + images. In this format, the image is divided up into a rectangular + grid of tiles, and each tile of pixels is compressed individually + and stored in a row of a variable-length array column in a binary + table. CFITSIO has been able to transparently read this compressed + image format ever since version 2.1. Now all the CFITSIO image + writing routines also transparently support this format. There are + 2 ways to force CFITSIO to write compressed images: 1) call the + fits_set_compression_type routine before writing the image header + keywords, or 2), specify that the image should be compressed when + entering the name of the output FITS file, using a new extended + filename syntax. (examples: "myfile.fits[compress]" will use the + default compression parameters, and "myfile.fits[compress GZIP + 100,100] will use the GZIP compression algorithm with 100 x 100 + pixel tiles. + + - added new driver to support creating output .gz compressed fits + files. If the name of the output FITS file to be created ends with + '.gz' then CFITSIO will initially write the FITS file in memory and + then, when the FITS file is closed, CFITSIO will gzip the entire + file before writing it out to disk. + + - when over-writing vectors in a variable length array in a binary + table, if the new vector to be written is less than or equal to + the length of the previously written vector, then CFITSIO will now + reuse the existing space in the heap, rather than always appending + the new array to the end of the heap. + + - modified configure.in to support building cfitsio as a dynamic + library on Mac OS X. Use 'make shared' like on other UNIX platforms, + but a .dylib file will be created instead of .so. If installed in a + nonstandard location, add its location to the DYLD_LIBRARY_PATH + environment variable so that the library can be found at run time. + + - made various modifications to better support the 8-byte long integer + datatype on more platforms. The 'LONGLONG' datatype is typedef'ed + to equal 'long long' on most Unix platforms and MacOS, and equal + to '__int64' on Windows machines. + + - modified configure.in and makefile.in to better support cases + where the system has no Fortran compiler and thus the f77 wrapper + routines should not be compiled. + + - made small modification to eval.y and eval_y.f to get rid of warning + on some platforms about redefinition of the 'alloca'. + + Bug fixes: + + - other recent bug fixes in ffdblk (delete blocks) caused ffdhdu (delete + HDU) to fail when trying to replace the primary array with a null + primary array. + + - fixed bug that prevented inserting a new variable length column + into a table that already contained variable length data. + + - modified fits_delete_file so that it will delete the file even if + the input status value is not equal to zero. + + - in fits_resize_image, it was sometimes necessary to call ffrdef to + force the image structure to be defined. + + - modified the filename parser to support input files with names like: + "myfile.fits.gz(mem://tmp)" in which the url type is specified for + the output file but not for the input file itself. This required + modifications to ffiurl and ffrtnm. + +Version 2.301 - 7 Dec 2001 + + Enhancements: + + - modified the http file driver so that if the filename to be opened + contains a '?' character (most likely a cgi related string) then it + will not attempt to append a .gz or .Z as it would normally do. + + - added support for the '!' clobber character when specifying + the output disk file name in CFITSIO's extended filename syntax, e.g., + 'http://a.b.c.d/myfile.fits.gz(!outfile.fits)' + + - added new device driver which is used when opening a compressed FITS + file on disk by uncompressing it into memory with READWRITE + access. This happens when specifying an output filename + 'mem://'. + + - added 2 other device drivers to open http and ftp files in memory + with write access. + + - improved the error trapping and reporting in cases where program + attempts to write to a READONLY file (especially in cases where the + 'file' resides in memory, as is the case when opening an ftp or http + file. + + - modified the extended filename parser so that it is does not confuse + the bracket character '[' which is sometimes used in the root name + of files of type 'http://', as the start of an extname or row filter + expression. If the file is of type 'http://', the parser now + checks to see if the last character in the extended file name is + a ')' or ']'. If not, it does not try to parse the file name + any further. + + - improved the efficiency when writing FITS files in memory, by + initially allocating enough memory for the entire HDU when it is + created, rather than incrementally reallocing memory 2880 bytes + at a time (modified ffrhdu and mem_truncate). This change also + means that the program will fail much sooner if it cannot allocate + enough memory to hold the entire FITS HDU. + + Bug fixes: + + - There was an error in the definition of the Fortran ftphtb wrapper + routine (writes required ASCII table header keywords) that caused + it to fail on DEC OSF and other platforms where sizeof(long) = 8. + +Version 2.300 - 23 Oct 2001 + + New Routines: + + - fits_comp_img and fits_decomp_img are now fully supported and + documented. These routine compress and decompress, respective, + a FITS image using a new algorithm in which the image is first + divided into a grid of rectangular tiles, then the compressed byte + stream from each tile is stored in a row of a binary table. + CFITSIO can transparently read FITS images stored in this + compressed format. Compression ratios of 3 - 6 are typically + achieved. Large compression ratios are achieved for floating + point images by throwing away non-significant noise bits in the + pixel values. + + - fits_test_heap tests the integrity of the binary table heap and + returns statistics on the amount of unused space in the heap and + the amount of space that is pointed to by more than 1 descriptor. + + - fits_compress_heap which will reorder the arrays in the binary + table heap, recovering any unused space. + + Enhancements: + + - made substantial internal changes to the code to support FITS + files containing 64-bit integer data values. These files have + BITPIX = 64 or TFORMn = 'K'. This new feature in CFITSIO is + currently only enabled if SUPPORT_64BIT_INTEGERS is defined = 1 in + the beginning of the fitsio2.h file. By default support for + 64-bit integers is not enabled. + + - improved the ability to read and return a table column value as a + formatted string by supporting quasi-legal TDISPn values which + have a lowercase format code letter, and by completely ignoring + other unrecognizable TDISPn values. Previously, unrecognized + TDISPn values could cause zero length strings to be returned. + + - made fits_write_key_longstr more efficient when writing keywords + using the long string CONTINUE convention. It previously did not + use all the available space on each card when the string to be + written contained many single quote characters. + + - added a new "CFITSIO Quick Start Guide" which provides all the + basic information needed to write C programs using CFITSIO. + + - updated the standard COMMENT keywords that are written at the + beginning of every primary array to refer to the newly published + FITS Standard document in Astronomy and Astrophysics. + Note: because of this change, any FITS file created with this + version of CFITSIO will not be identical to the same file written + with a previous version of CFITSIO. + + - replaced the 2 routines in pliocomp.c with new versions provided by + D Tody and N Zarate. These routines compress/uncompress image pixels + using the IRAF pixel list compression algorithm. + + - modified fits_copy_hdu so that when copying a Primary Array + to an Image extension, the COMMENT cards which give the reference + to the A&A journal article about FITS are not copied. In the + inverse case the COMMENT keywords are inserted in the header. + + - modified configure and Makefile.in to add capability to build a + shared version of the CFITSIO library. Type 'make shared' or + 'make libcfitsio.so' to invoke this option. + + - disabled some uninformative error messages on the error stack: + 1) when calling ffclos (and then ffchdu) with input status > 0 + 2) when ffmahd tries to move beyond the end of file. + The returned status value remains the same as before, but the + annoying error messages no longer get written to the error stack. + + - The syntax for column filtering has been modified so that + if one only specifies a list of column names, then only those + columns will be copied into the output file. This provides a simple + way to make a copy of a table containing only a specified list of + columns. If the column specifier explicitly deletes a column, however, + than all the other columns will be copied to the filtered input + file, regardless of whether the columns were listed or not. + Similarly, if the expression specifies only a column to be modified + or created, then all the other columns in the table will be + copied. + + mytable.fit[1][col Time;Rate] - only the Time and Rate + columns will be copied to the filtered input file. + + mytable.fit[1][col -Time ] - all but the Time column are copied + to the filtered input file. + + mytable.fit[1][col Rate;-Time] - same as above. + + - changed a '#if defined' statement in f77_wrap.h and f77_wrap1.c + to support the fortran wrappers on 64-bit IBM/RS6000 systems + + - modified group.c so that when attaching one group (the child) to + another (the parent), check in each file for the existence of a + pointer to the other before adding the link. This is to prevent + multiple links from forming under all circumstances. + + - modified the filename parser to accept 'STDIN', 'stdin', + 'STDOUT' and 'stdout' in addition to '-' to mean read the + file from standard input or write to standard output. + + - Added support for reversing an axis when reading a subsection + of a compressed image using the extended filename syntax, as in + myfile.fits+1[-*, *] or myfile.fits+1[600:501,501:600] + + - When copying a compressed image to a uncompressed image, the + EXTNAME keyword is no longer copied if the value is equal to + 'COMPRESSED_IMAGE'. + + - slight change to the comment field of the DATE keyword to reflect + the fact that the Unix system date and time is not true UTC time. + + Bug fixes: + + - fits_write_key_longstr was not writing the keyword if a null + input string value was given. + + - writing data to a variable length column, if that binary table is not + the last HDU in the FITS file, might overwrite the following HDU. + Fixed this by changing the order of a couple operations in ffgcpr. + + - deleting a column from a table containing variable length columns + could cause the last few FITS blocks of the file to be reset = 0. + This bug occurred as a result of modifications to ffdblk in v2.202. + This mainly affects users of the 'compress_fits' utility + program. + + - fixed obscure problem when writing bits to a variable length 'B' + column. + + - when reading a subsection of an image, the BSCALE and BZERO pixel + scaling may not have been applied when reading image pixel values + (even though the scaling keywords were properly written in the + header). + + - fits_get_keyclass was not returning 'TYP_STRUCT_KEY' for the + END keyword. + +Version 2.204 - 26 July 2001 + + Bug fixes: + + - Re-write of fits_clean_url in group.c to solve various problems + with invalid bounds checking. + +Version 2.203 - 19 July 2001 (version in FTOOLS v5.1) + + Enhancements: + + - When a row selection or calculator expression is written in + an external file (and read by CFITSIO with the '@filename' syntax) + the file can now contain comment lines. The comment line must + begin with 2 slash characters as the first 2 characters on the + line. CFITSIO will ignore the entire line when reading the + expression. + + Bug fixes: + + - With previous versions of CFITSIO, the pixel values in a FITS + image could be read incorrectly in the following case: when + opening a subset of a FITS image (using the + 'filename.fits[Xmin:Xmax,Ymin:Ymax]' notation) on a PC linux, PC + Windows, or DEC OSF machine (but not on a SUN or Mac). This + problem only occurs when reading more than 8640 bytes of data + (2160 4-byte integers) at a time, and usually only occurs if the + reading program reads the pixel data immediately after opening the + file, without first reading any header keywords. This error would + cause strips of zero valued pixels to appear at semi-random + positions in the image, where each strip usually would be 2880 + bytes long. This problem does not affect cases where the input + subsetted image is simply copied to a new output FITS file. + + +Version 2.202 - 22 May 2001 + + Enhancements: + + - revised the logic in the routine that tests if a point is + within a region: if the first region is an excluded region, + then it implicitly assumes a prior include region covering + the entire detector. It also now supports cases where a + smaller include region is within a prior exclude region. + + - made enhancement to ffgclb (read bytes) so that it can + also read values from a logical column, returning an array + of 1s and 0s. + + - defined 2 new grouping error status values (349, 350) in + cfitsio.h and made minor changes to group.c to use these new + status values. + + - modified fits_open_file so that if it encounters an error while + trying to move to a user-specified extension (or select a subset + of the rows in an input table, or make a histogram of the + column values) it will close the input file instead of leaving + it open. + + - when using the extended filename syntax to filter the rows in + an input table, or create a histogram image from the values in + a table column, CFITSIO now writes HISTORY keywords in the + output file to document the filtering expression that was used. + + Bug fixes: + + - ffdblk (called by ffdrow) could overwrite the last FITS block(s) in + the file in some cases where one writes data to a variable length + column and then calls ffdrow to delete rows in the table. This + bug was similar to the ffiblk bug that was fixed in v2.033. + + - modified fits_write_col_null to fix a problem which under unusual + circumstances would cause a End-of-File error when trying to + read back the value in an ASCII string column, after initializing + if by writing a null value to it. + + - fixed obscure bug in the calculator function that caused an + error when trying to modify the value of a keyword in a HDU + that does not have a NAXIS2 keyword (e.g., a null primary array). + + - the iterator function (in putcol.c) had a bug when calculating + the optimum number rows to process in the case where the table + has very wide rows (>33120 bytes) and the calculator expression + involves columns from more than one FITS table. This could + cause an infinite loop in calls to the ffcalc calculator function. + + - fixed bug in ffmvec, which modifies the length of an + existing vector column in a binary table. If the vector + was reduced in length, the FITS file could sometimes be left + in a corrupted state, and in all cases the values in the remaining + vector elements of that column would be altered. + + - in drvrfile.c, replaced calls to fsetpos and fgetpos with + fseek and ftell (or fseeko and ftello) because the fpos_t + filetype used in fsetpos is incompatible with the off_t + filetype used in fseek, at least on some platforms (Linux 7.0). + (This fix was inserted into the V2.201 release on April 4). + + - added "#define fits_write_pixnull ffppxn" to longnam.h + +Version 2.201 - 15 March 2001 + + Enhancements + + - enhanced the keyword reading routines so that they will do + implicit datatype conversion from a string keyword value + to a numeric keyword value, if the string consist of a + valid number enclosed in quotes. For example, the keyword + mykey = '37.5' can be read by ffgkye. + + - modified ffiimg so that it is possible to insert a new + primary array at the beginning of the file. The original + primary array is then converted into an IMAGE extension. + + - modified ffcpdt (copy data unit) to support the case where + the data unit is being copied between 2 HDUs in the same file. + + - enhanced the fits_read_pix and fits_read_pixnull routines so + that they support the tiled image compression format that the + other image reading routines also support. + + - modified the Extended File Name syntax to also accept a + minus sign (-) as well as an exclamation point (!) as + the leading character when specifying a column or or keyword + to be deleted, as in [col -time] will delete the TIME column. + + - now completely support reading subimages, including pixel + increments in each dimension, for tile-compressed images + (where the compressed image tiles are stored in a binary + table). + + Bug fixes: + + - fixed confusion in the use of the fpos_t and off_t datatypes + in the fgetpos and fsetpos routines in drvrfile.c which caused + problems with the Windows VC++ compiler. (fpos_t is not + necessarily identical to off_t) + + - fixed a typo in the fits_get_url function in group.c which + caused problems when determining the relative URL to a compressed + FITS file. + + - included fitsio.h in the shared memory utility program, + smem.c, in order to define OFF_T. + + - fixed typo in the datatype of 'nullvalue' in ffgsvi, which caused + attempts to read subsections of a short integer tiled compressed + image to fail with a bus error. + + - fixed bug in ffdkey which sometimes worked incorrectly if one + tried to delete a nonexistent keyword beyond the end of the header. + + - fixed problem in fits_select_image_section when it writes a dummy + value to the last pixel of the section. If the image contains + scaled integer pixels, then in some cases the pixel value could end + up out of range. + + - fixed obscure bug in the ffpcn_ family of routines which gave + a floating exception when trying to write zero number of pixels to + a zero length array (why would anyone do this?) + +Version 2.200 - 26 Jan 2001 + + Enhancements + + - updated the region filtering code to support the latest region + file formats that are generated by the POW, SAOtng and ds9 + programs. Region positions may now be given in HH:MM:SS.s, + DD:MM:SS.s format, and region sizes may be given arcsec or arcmin + instead of only in pixel units. Also changed the logic so that if + multiple 'include' regions are specified in the region file, they + are ORed together, instead of ANDed, so that the filtering keeps + points that are located within any of the 'include' regions, not + just the intersection of the regions. + + - added support for reading raw binary data arrays by converting + them on the fly into virtual FITS files. + + - modified ffpmsg, which writes error messages to CFITSIO's internal + error stack, so that messages > 80 characters long will be wrapped + around into multiple 80 character messages, instead of just + being truncated at 80 characters. + + - modified the CFITSIO parser so that expression which involve + scaled integer columns get cast to double rather than int. + + - Modified the keyword template parsing routine, ffgthd, to + support the HIERARCH keyword. + + - modified ffainit and ffbinit so that they don't unnecessarily + allocate 0 bytes of memory if there are no columns (TFIELDS = 0) + in the table that is being opened. + + - modified fitsio2.h to support NetBSD on Alpha OSF platforms + (NetBSD does not define the '__unix__' symbol). + + - changed the way OFF_T is defined in fitsio.h for greater + portability. + + - changed drvrsmem.c so it is compiled only when HAVE_SHMEM_SERVICES + is defined in order to removed the conditional logic from the Makefile + + - reorganized the CFITSIO User's guide to make it + clearer and easier for new users to learn the basic routines. + + - fixed ffhdef (which reserves space for more header keywords) so + that is also updates the start position of the next HDU. This + affected the offset values returned by ffghof. + +Version 2.100 - 18 Oct 2000 + + Enhancements + + - made substantial modification to the code to support Large files, + i.e., files larger than 2**31 bytes = 2.1GB. FITS files up to + 6 terabytes in size may now be read and written on platforms + that support Large files (currently only Solaris). + + - modified ffpcom and ffphis, which write COMMENT and HISTORY + keywords, respectively, so that they now use columns 9 - 80, + instead of only columns 11 - 80. Previously, these routines + avoided using columns 9 and 10, but this is was unnecessarily + restrictive. + + - modified ffdhdu so that instead of refusing to delete the + primary array, it will replace the current primary array + with a null primary array containing the bare minimum of + required keywords and no data. + + New Routines + + - fits_read_pix, fits_read_pixnull, fits_read_subset, and fits_write_pix + routines were added to enable reading and writing of Large images, + with more than 2.1e9 pixels. These new routines are now recommended + as the basic routines for reading and writing all images. + + - fits_get_hduoff returns the byte offset in the file to + the start and end of the current HDU. This routine replaces the + now obsolete fits_get_hduaddr routine; it uses 'off_t' instead of + 'long' as the datatype of the arguments and can support offsets + in files greater than 2.1GB in size. + + Bug fixes: + + - fixed bug in fits_select_image_section that caused an integer + overflow when reading very large image sections (bigger than + 8192 x 8192 4-byte pixels). + + - improved ffptbb, the low-level table writing routine, so that + it will insert additional rows in the table if the table is + not already big enough. Previously it would have just over- + written any HDUs following the table in the FITS file. + + - fixed a bug in the fits_write_col_bit/ffpclx routine which + could not write to a bit 'X' column if that was the first column + in the table to be written to. This bug would not appear if + any other datatype column was written to first. + + - nonsensible (but still formally legal) binary table TFORM values + such as '8A15', or '1A8' or 'A8' would confuse CFITSIO and cause it + to return a 308 error. When parsing the TFORMn = 'rAw' value, + the ffbnfm routine has been modified to ignore the 'w' value in cases + where w > r. + + - fixed bug in the blsearch routine in iraffits.c which sometimes + caused an out-of-bounds string pointer to be returned when searching + for blank space in the header just before the 'END' keyword. + + - fixed minor problem in ffgtcr in group.c, which sometimes failed + while trying to move to the end of file before appending a + grouping table. + + - on Solaris, with Sun CC 5.0, one must check for '__unix' rather + than '__unix__' or 'unix' as it's symbol. Needed to modify this + in drvrfile.c in 3 places. + + - in ffextn, the FITS file would be left open if the named + extension doesn't exist, thus preventing the file from being + opened again later with write access. + + - fixed bug in ffiimg that would cause attempts to insert a new + image extension following a table extension, and in front of any + other type of extension, to fail. + +Version 2.037 - 6 July 2000 + + Enhancements + + - added support in the extended filename syntax for flipping + an image along any axis either by specifying a starting + section pixel number greater than the ending pixel number, + or by using '-*' to flip the whole axis. Examples: + "myfile.fits[1:100, 50:10]" or "myfile.fits[-*,*]". + + - when reading a section of an image with the extended filename + syntax (e.g. image.fits[1:100:2, 1:100:2), any CDi_j WCS keywords + will be updated if necessary to transfer the world coordinate + system from the imput image to the output image section. + + - on UNIX platforms, added support for filenames that begin + with "~/" or "~user/". The "~" symbol will get expanded + into a string that gives the user's home directory. + + - changed the filename parser to support disk file names that + begin with a minus sign. Previously, the leading minus sign would + cause CFITSIO to try to read/write the file from/to stdin/stdout. + + - modified the general fits_update_key routine, which writes + or updates a keyword value, to use the 'G' display format + instead of the 'E' format for floating point keyword values. + This will eliminate trailing zeros from appearing in the value. + + - added support for the "-CAR" celestial coordinate projection + in the ffwldp and ffxypx routines. The "-CAR" projection is + the default simplest possible linear projection. + + - added new fits_create_memfile/ffimem routine to create a new + fits file at a designated memory location. + + - ported f77_wrap.h and f77_wrap1.c so that the Fortran interface + wrappers work correctly on 64-bit SGI operating systems. In this + environment, C 'long's are 8-bytes long, but Fortran 'integers' + are still only 4-bytes long, so the words have to be converted + by the wrappers. + + - minor modification to cfortran.h to automatically detect when it + is running on a linux platform, and then define f2cFortran in that + case. This eliminates the need to define -Df2cFortran on the + command line. + + - modified group.c to support multiple "/" characters in + the path name of the file to be opened/created. + + - minor modifications to the parser (eval.y, eval_f.c, eval_y.c) + to a) add the unary '+' operator, and b) support copying the + TDIMn keyword from the input to the output image under certain + circumstances. + + - modified the lexical parser in eval_l.y and eval_l.c to + support #NULL and #SNULL constants which act to set the + value to Null. Support was also added for the C-conditional + expression: 'boolean ? trueVal : falseVal'. + + - small modification to eval_f.c to write an error message to + the error stack if numerical overflow occurs when evaluating + an expression. + + - configure and configure.in now support the egcs g77 compiler + on Linux platforms. + + Bug fixes: + + - fixed a significant bug when using the extended filename binning + syntax to generate a 2-dimensional image from a histogram of the + values in 2 table columns. This bug would cause table events that + should have been located in the row just below the bottom row of + the image (and thus should have been excluded from the histogram) + to be instead added into the first row of the image. Similarly, + the first plane of a 3-D or 4-D data cube would include the events + that should have been excluded as falling in the previous plane of + the cube. + + - fixed minor bug when parsing an extended filename that contains + nested pairs of square brackets (e.g., '[col newcol=oldcol[9]]'). + + - fixed bug when reading unsigned integer values from a table or + image with fits_read_col_uint/ffgcvuk. This bug only occurred on + systems like Digital Unix (now Tru64 Unix) in which 'long' + integers are 8 bytes long, and only when reading more than 7200 + elements at a time. This bug would generally cause the program to + crash with a segmentation fault. + + - modified ffgcpr to update 'heapstart' as well as 'numrows' when + writing more rows beyond the end of the table. heapstart + is needed to calculate if more space needs to be inserted in the + table when inserting columns into the table. + + - modified fficls (insert column), ffmvec, ffdrow and ffdcol to + not use the value of the NAXIS2 keyword as the number of rows + in the table, and instead use the value that is stored in + an internal structure, because the keyword value may not + be up to date. + + - Fixed bug in the iterator function that affected the handling + of null values in string columns in ASCII and binary tables. + + - Reading a subsample of pixels in very large images, (e.g., + file = myfile.fits[1:10000:10,1:10000:10], could cause a + long integer overflow (value > 2**31) in the computation of the + starting byte offset in the file, and cause a return error status + = 304 (negative byte address). This was fixed by changing the + order of the arithmetic operations in calculating the value of + 'readptr' in the ffgcli, ffgclj, ffgcle, ffgcld, etc. routines. + + - In version 2.031, a fix to prevent compressed files from being + opened with write privilege was implemented incorrectly. The fix + was intended to not allow a compressed FITS file to be opened + except when a local uncompressed copy of the file is being + produced (then the copy is opened with write access), but in fact + the opposite behavior occurred: Compressed files could be opened + with write access, EXCEPT when a local copy is produced. This + has been fixed in the mem_compress_open and file_compress_open + routines. + + - in iraffits.c, a global variable called 'val' caused multiply + defined symbols warning when linking cfitsio and IRAF libraries. + This was fixed by making 'val' a local variable within the + routine. + +Version 2.036 - 1 Feb 2000 + + - added 2 new generic routines, ffgpf and ffgcf which are analogous + to ffgpv and ffgcv but return an array of null flag values instead + of setting null pixels to a reserved value. + + - minor change to eval_y.c and eval.y to "define alloca malloc" + on all platforms, not just VMS. + + - added support for the unsigned int datatype (TUINT) in the + generic ffuky routine and changed ffpky so that unsigned ints + are cast to double instead of long before being written to + the header. + + - modified ffs2c so that if a null string is given as input then + a null FITS string (2 successive single quotes) will be returned. + Previously this routine would just return a string with a single + quote, which could cause an illegal keyword record to be written. + + - The file flush operation on Windows platforms apparently + changes the internal file position pointer (!) in violation of the + C standard. Put a patch into the file_flush routine to explicitly + seek back to the original file position. + + - changed the name of imcomp_get_compressed_image_parms to + imcomp_get_compressed_image_par to not exceed the 31 character + limit on some compilers. + + - modified the filename parser (which is used when moving to a + named HDU) to support EXTNAME values which contain embedded blanks. + + - modified drvrnet.c to deal with ftp compressed files better so + that even fits files returned from cgi queries which have the wrong + mime types and/or wrong types of file names should still decompress. + + - modified ffgics to reduce the tolerance for acceptable skewness + between the axes, and added a new warning return status = + APPROX_WCS_KEY in cases where there is significant skewness + between the axes. + + - fixed bug in ffgics that affected cases where the first coordinate + axis was DEC, not RA, and the image was a mirror image of the sky. + + - fixed bug in ffhist when trying to read the default binning + factor keyword, TDBIN. + + - modified ffhist so that is correctly computes the rotation angle + in a 2-D image if the first histogram column has a CROTA type + keyword but the 2nd column does not. + + - modified ffcpcl so that it preserves the comment fields on the + TTYPE and TFORM keywords when the column is copied to a new file. + + - make small change to configure.in to support FreeBSD Linux + by setting CFLAGS = -Df2cFortran instead of -Dg77Fortran. Then + regenerated configure with autoconf 2.13 instead of 2.12. + +Version 2.035 - 7 Dec 1999 (internal release only, FTOOLS 5.0.2) + + - added new routine called fits_get_keyclass/ffgkcl that returns + the general class of the keyword, e.g., required structural + keyword, WCS keyword, Comment keyword, etc. 15 classes of + keywords have been defined in fitsio.h + + - added new routine called fits_get_img_parm/ffgipr that is similar + to ffgphd but it only return the bitpix, naxis, and naxisn values. + + - added 3 new routines that support the long string keyword + convention: fits_insert_key_longstr, fits_modify_key_longstr + fits_update_key_longstr. + + - modified ffgphd which reads image header keywords to support + the new experimental compressed image format. + + - when opening a .Z compressed file, CFITSIO tries to allocate + memory equal to 3 times the file size, which may be excessive + in some cases. This was changed so that if the allocation fails, + then CFITSIO will try again to allocate only enough memory + equal to 1 times the file size. More memory will be allocated + later if this turns out to be too small. + + - improved the error checking in the fits_insert_key routine + to check for illegal characters in the keyword. + +Version 2.034 - 23 Nov 1999 + + - enhanced support for the new 'CD' matrix world coordinate system + keywords in the ffigics routine. This routine has been enhanced + to look for the new 'CD' keywords, if present, and convert them + back to the old CDELTn and CROTAn values, which are then returned. + The routine will also swap the WCS parameters for the 2 axes if + the declination-like axis is the first WCS axis. + + - modified ffphbn in putkey.c to support the 'U' and 'V" TFORM characters + (which represent unsigned short and unsigned int columns) in variable + length array columns. (previously only supported these types in + fixed length columns). + + - added checks when reading gzipped files to detect unexpected EOF. + Previously, the 'inflate_codes' routine would just sit in an infinite + loop if the file ended unexpectedly. + + - modified fits_verify_chksum/ffvcks so that checksum keywords with + a blank value string are treated as undefined, the same as + if the keyword did not exist at all. + + - fixed ffghtb and ffghbn so that they return the extname value + in cases where there are no columns in the table. + + - fixed bug in the ffgtwcs routine (this is a little utility + routine to aid in interfacing to Doug Mink's WCS routines); + it was not correctly padding the length of string-valued keywords + in the returned string. + + - fixed bug in 'iraffits.c' that prevented Type-2 IRAF images from + being correctly byte-swapped on PCs and DEC-OSF machines. + + - fixed tiny memory leak in irafncmp in iraffits.c. Only relevant when + reading IRAF .imh files. + + - fixed a bug (introduced in version 2.027) that caused the keyword + reading routines to sometimes not find a matching keyword if the + input name template used the '*' wildcard as the last character. + (e.g., if input name = 'COMMENT*' then it would not find the + 'COMMENT' keywords. (It would have found longer keywords like + 'COMMENTX' correctly). The fix required a minor change to ffgcrd + in getkey.c + + - modified the routine (ffswap8) that does byteswapping of + double precision numbers. Some linux systems have reported floating + point exceptions because they were trying to interpret the bytes + as a double before the bytes had been swapped. + + - fixed bug in the calculation of the position of the last byte + in the string of bits to be read in ffgcxuk and ffgcxui. This + bug generally caused no harm, but could cause the routine to + exit with an invalid error message about trying to read + beyond the size of the field. + + - If a unix machine did not have '__unix__', 'unix', or '__unix' + C preprocessor symbols defined, then CFITSIO would correctly open + one FITS file, but would not correctly open subsequent files. Instead + it would think that the same file was being opened multiple times. + This problem has only been seen on an IBM/AIX machine. The fits_path2url + and fits_url2path routines in group.c were modified to fix the problem. + + - fixed bug in group.c, which affected WINDOWS platforms only, that + caused programs to go into infinite loop when trying to open + certain files. + + - the ftrsim Fortran wrapper routine to ffrsim was not defined + correctly, which caused the naxis(2) value to be passed incorrectly + on Dec OSF machines, where sizeof(long) != sizeof(int). + +Version 2.033 - 17 Sept 1999 + + - New Feature: enhanced the row selection parser so that comparisons + between values in different rows of the table are allowed, and the + string comparisons with <, >, <=, and >= are supported. + + - added new routine the returns the name of the keyword in the + input keyword record string. The name is usually the first + 8 characters of the record, except if the HIERARCH convention + is being used in which case the name may be up to 67 characters + long. + + - added new routine called fits_null_check/ffnchk that checks to + see if the current header contains any null (ASCII 0) characters. + These characters are illegal in FITS headers, but they go undetected + by the other CFITSIO routines that read the header keywords. + + - the group.c file has been replaced with a new version as supplied + by the ISDC. The changes are mainly to support partial URLs and + absolute URLs more robustly. Host dependent directory paths are + now converted to true URLs before being read from/written to + grouping tables. + + - modified ffnmhd slightly so that it will move to the first extension + in which either the EXTNAME or the HDUNAME keyword is equal to the + user-specified name. Previously, it only checked for HDUNAME if + the EXTNAME keyword did not exist. + + - made small change to drvrnet.c so that it uncompress files + which end in .Z and .gz just as for ftp files. + + - rewrote ffcphd (copy header) to handle the case where the + input and output HDU are in the same physical FITS file. + + - fixed bug in how long string keyword values (using the CONTINUE + convention) were read. If the string keyword value ended in an + '&' character, then fits_read_key_longstr, fits_modify_key_str, + and fits_delete_key would interpret the following keyword as + a continuation, regardless of whether that keyword name was + 'CONTINUE' as required by this convention. There was also a bug + in that if the string keyword value was all blanks, then + fits_modify_key_str could in certain unusual cases think + that the keyword ended in an '&' and go into an infinite loop. + + - modified ffgpv so that it calls the higher level ffgpv_ routine + rather than directly calling the lower level ffgcl_ routine. This + change is needed to eventually support reading compressed images. + + - added 3 new routines to get the image datatype, image dimensions, + and image axes length. These support the case where the image is + compressed and stored in a binary table. + + - fixed bug in ffiblk that could sometimes cause it to insert a + new block in a file somewhere in the middle of the data, instead + of at the end of the HDU. This fortunately is a rare problem, + mainly only occurring in certain cases when inserting rows in a binary + table that contains variable length array data (i.e., has a heap). + + - modified fits_write_tdim so that it double checks the TFORMn + value directly if the column repeat count stored in the internal + structure is not equal to the product of all the dimensions. + + - fixed bug that prevented ffitab or ffibin from inserting a new + table after a null primary array (can't read NAXIS2 keyword). + Required a small change to ffrdef. + + - modified testprog.c so that it will continue to run even if + it cannot open or process the template file testprog.tpt. + + - modified the logic in lines 1182-1185 of grparser.c so that + it returns the correct status value in case of an error. + + - added test in fitsio2.h to see if __sparcv9 is defined; this + identifies a machine running Solaris 7 in 64-bit mode where + long integers are 64 bits long. + +Version 2.032 - 25 May 1999 + + - the distribution .tar file was changed so that all the files + will be untarred into a subdirectory by default instead of + into the current directory. + + - modified ffclos so that it always frees the space allocated by + the fptr pointer, even when another fptr points to the same file. + + - plugged a potential (but rare in practice) memory leak in ffpinit + + - fixed bug in all the ffp3d_ and ffg3d_ routines in cases where + the data cube that has been allocated in memory has more planes + than the data cube in the FITS file. + + - modified drvrsmem.c so that it allocates a small shared + memory segment only if CFITSIO tries to read or write a + FITS file in shared memory. Previously it always allocated + the segment whether it was needed or not. Also, this small + segment is removed if 0 shared memory segments remain in + the system. + + - put "static" in front of 7 DECLARE macros in compress.c + because these global variables were causing conflicts with other + applications programs that had variables with the same names. + + - modified ffasfm to return datatype = TDOUBLE instead of TFLOAT + if the ASCII table column has TFORMn = 'Ew.d' with d > 6. + + - modified the column reading routines to a) print out the offending + entry if an error occurs when trying to read a numeric ASCII table + column, and b) print out the column number that had the error + (the messages are written to CFITSIOs error stack) + + - major updates to the Fortran FITSIO User's Guide to include many + new functions that have been added to CFITSIO in the past year. + + - modified fitsio2.h so that the test for __D_FLOAT etc. is only + made on Alpha VMS machines, to avoid syntax errors on some other + platforms. + + - modified ffgthd so that it recognizes a floating point value + that uses the 'd' or 'D' exponent character. + + - removed the range check in fftm2s that returned an error if + 'decimals' was less than zero. A negative value is OK and is + used to return only the date and not the time in the string. + +Version 2.031 - 31 Mar 1999 + + - moved the code that updates the NAXIS2 and PCOUNT keywords from + ffchdu into the lower lever ffrdef routine. This ensures that + other routines which call ffrdef will correctly update these 2 + keywords if required. Otherwise, for instance, calling + fits_write_checksum before closing the HDU could cause the NAXIS2 + keyword (number of rows in the table) to not be updated. + + - fixed bug (introduced in version 2.030) when writing null values + to a primary array or image extension. If trying to set more + than 1 pixel to null at a time, then typically only 1 null would + be written. Also fixed related bug when writing null values to + rows in a table that are beyond the currently defined size of the + table (the size of the table was not being expanded properly). + + - enhanced the extended filename parser to support '*' in image + section specifiers, to mean use the whole range of the axis. + myfile.fits[*,1:100] means use the whole range of the first + axis and pixels 1 to 100 in the second axis. Also supports + an increment, as in myfile.fits[*:2, *:2] to use just the + odd numbered rows and columns. + + - modified fitscore.c to set the initial max size of the header, when + first reading it, to the current size of the file, rather than to + 2 x 10**9 to avoid rare cases where CFITSIO ends up writing a huge + file to disk. + + - modified file_compress_open so that it will not allow a compressed + FITS file to be opened with write access. Otherwise, a program + could write to the temporary copy of the uncompressed file, but + the modification would be lost when the program exits. + +Version 2.030 - 24 Feb 1999 + + - fixed bug in ffpclu when trying to write a null value to a row + beyond the current size of the table (wouldn't append new rows + like it should). + + - major new feature: enhanced the routines that read ASCII string + columns in tables so that they can read any table column, including + logical and numeric valued columns. The column values are returned + as a formatted string. The format is determined by the TDISPn + keyword if present, otherwise a default format based on the + datatype of the column is used. + + - new routine: fits_get_col_display_width/ffgcdw returns the length + of the formatted strings that will be returned by the routines that + read table columns as strings. + + - major new feature: added support for specifying an 'image section' + when opening an image: e.g, myfile.fits[1:512:2,2:512:2] to + open a 256x256 pixel image consisting of the odd columns and the + even numbered rows of the input image. + + - added supporting project files and instructions for building + CFITSIO under Windows NT with the Microsoft Visual C++ compiler. + + - changed the variable 'template' to 'templt' in testprog.c since + it conflicted with a reserved word on some compilers. + + - modified group.c to conditionally include sys/stat.h only on + unix platforms + + - fixed bug in the ffiter iterator function that caused it to always + pass 'firstn' = 1 to the work function when reading from the + primary array or IMAGE extension. It worked correctly for tables. + + - fixed bug in the template header keyword parser (ffgthd) in cases + where the input template line contains a logical valued keyword + (T or F) without any following comment string. It was previously + interpreting this as a string-valued keyword. + + - modified ffrhdu that reads and opens a new HDU, so that it + ignores any leading blank characters in the XTENSION name, e.g., + XTENSION= ' BINTABLE' will not cause any errors, even though + this technically violates the FITS Standard. + + - modified ffgtbp that reads the required table keywords to make + it more lenient and not exit with an error if the THEAP keyword + in binary tables cannot be read as an integer. Now it will + simply ignore this keyword if it cannot be read. + + - added test for 'WIN32' as well as '__WIN32__' in fitsio2.h, + eval.l and eval_l.c in a preprocessor statement. + + - changed definition of strcasecmp and strncasecmp in fitsio2.h, + eval.l and eval_l.c to conform to the function prototypes under + the Alpha VMS v7.1 compiler. + + - corrected the long function names in longnam.h for the new WCS + utility functions in wcssubs.c + +Version 2.029 - 11 Feb 1999 + + - fixed bug in the way NANs and underflows were being detected on + VAX and Alpha VMS machines. + + - enhanced the filename parser to distinguish between a VMS-style + directory name (e.g. disk:[directory]myfile.fits) and a CFITSIO + filter specifier at the end of the name. + + - modified ffgthd to support the HIERARCH convention for keyword + names that are longer than 8 characters or contain characters + that would be illegal in standard FITS keyword names. + + - modified the include statements in grparser.c so that malloc.h + and memory.h are only included on the few platforms that really + need them. + + - modified the file_read routine in drvrfile.c to ignore the last + record in the FITS file it it only contains a single character that + is equal to 0, 10 or 32. Text editors sometimes append a character + like this to the end of the file, so CFITSIO will ignore it and + treat it as if it had reached the end of file. + + - minor modifications to fitsio.h to help support the ROOT environment. + + - installed new version of group.c and group.h; the main change + is to support relative paths (e.g. "../filename") in the URLs + + - modified the histogramming routines so that it looks for the + default preferred column axes in a keyword of the form + CPREF = 'Xcol, Ycol' + instead of separate keywords of the form + CPREF1 = 'Xcol' + CPREF2 = 'Ycol' + + - fixed bug so that if the binning spec is just a single integer, + as in [bin 4] then this will be interpreted as meaning to make + a 2D histogram using the preferred or default axes, with the + integer taken as the binning factor in both axes. + +Version 2.028 - 27 Jan 1999 + + - if the TNULLn keyword value was outside the range of a 'I' or 'B' + column, an overflow would occur when setting the short or char + to the TNULLn value, leading to incorrect values being flagged as + being undefined. This has been fixed so that CFITSIO will ignore + TNULLn values that are beyond the range of the column data type. + + - changed a few instances of the string {"\0"} to {'\0'} in the + file groups.c + + - installed new version of the grparser.c file from the ISDC + + - added new WCS support routines (in wcssub.c) which make it easier + to call Doug Mink's WCSlib routines for converting between plate + and sky coordinates. The CFITSIO routines themselves never + call a WCSlib routine, so CFITSIO is not dependent on WCSlib. + + - modified ffopen so that if you use the extended filename + syntax to both select rows in a table and then bin columns into + a histogram, then CFITSIO will simply construct an array listing + the good row numbers to be used when making the histogram, + instead of making a whole new temporary FITS file containing + the selected rows. + + - modified ffgphd which parses the primary array header keywords + when opening a file, to not choke on minor format errors in + optional keywords. Otherwise, this prevents CFITSIO from + even opening the file. + + - changed a few more variable declarations in compress.c from global + to static. + +Version 2.027 - 12 Jan 1999 + + - modified the usage of the output filename specifier so that it, + a) gives the name of the binned image, if specified, else, + b) gives the name of column filtered and/or row filtered table, if + specified, else + c) is the name for a local copy of the ftp or http file, else, + d) is the name for the local uncompressed version of the compressed + FITS file, else, + e) the output filename is ignored. + + - fixed minor bug in ffcmps, when comparing 2 strings while using + a '*' wild card character. + + - fixed bug in ftgthd that affected cases where the template string + started with a minus sign and contained 2 tokens (to rename a + keyword). + + - added support for the HIERARCH keyword convention for reading + and writing keywords longer than 8 characters or that contain + ASCII characters not allowed in normal FITS keywords. + + - modified the extended filename syntax to support opening images + that are contained in a single cell of a binary table with syntax: + filename.fits[extname; col_name(row_expression)] + +Version 2.026 - 23 Dec 1998 + + - modified the group parser to: + a) support CFITSIO_INCLUDE_FILES environment variable, which can + point to the location of template files, and, + b) the FITS file parameter passed to the parser no longer has to point + to an empty file. If there are already HDUs in the file, then the + parser appends new HDUs to the end of the file. + + - make a small change to the drvrnet.c file to accommodate creating + a static version of the CFITSIO library. + + - added 2 new routines to read consecutive bits as an unsigned integer + from a Bit 'X' or Byte 'B' column (ffgcxui and ffgcxuk). + + - modified the logic for determining histogram boundaries in ffhisto + to add one more bin by default, to catch values that are right on + the upper boundary of the histogram, or are in the last partial bin. + + - modified cfitsio2.h to support the new Solaris 7 64-bit mode operating + system. + + - Add utility routine, CFits2Unit, to the Fortran wrappers which searches + the gFitsFiles array for a fptr, returning its element (Fortran unit + number), or allocating a new element if one doesn't already + exists... for C calling Fortran calling CFITSIO. + + - modified configure so that it does not use the compiler optimizer + when using gcc 2.8.x on Linux + + - (re)added the fitsio.* documentation files that describe the + Fortran-callable FITSIO interface to the C routines. + + - modified the lexical parser in eval_f.c to fix bug in null detections + and bug in ffsrow when nrows = 0. + + - modified ffcalc so that it creates a TNULLn keyword if appropriate + when a new column is created. Also fixed detection of OVERFLOWs + so that it ignores null values. + + - added hyperbolic trig and rounding functions to + the lexical parser in the eval* files. + + - improved error message that gets written when the group number is + out of range when reading a 'random groups' array. + + - added description of shared memory, grouping, and template parsing + error messages to ffgerr and to the User's Guide. Moved the error + code definitions from drvsmem.h to fitsio.h. + + - modified grparser.c to compile correctly on Alpha/OSF machines + + - modified drvrnet.c to eliminate compiler warnings + + - Modified Makefile.in to include targets for building all the sample + programs that are included with CFITSIO. + +Version 2.025 - 1 Dec 1998 + + - modified ffgphd and ffgtbp so that they ignores BLANK and TNULLn keywords + that do not have a valid integer value. Also, any error while reading + the BSCALE, BZERO, TSCALn, or TZEROn keywords will be ignored. + Previously, CFITSIO would have simply refused to read an HDU that had + such an invalid keyword. + + - modified the parser in eval_f.c to accept out of order times in GTIs + + - updated cfitsio_mac.sit.hqx to fix bad target parameters for Mac's + speed test program + + - modified template parser in grparser.c to: 1) not write GRPNAME keyword + twice, and 2) assign correct value for EXTVERS keyword. + + - fixed minor bugs in group.c; mainly would only affect users of the + INTEGRAL Data Access Layer. + + - temporarily removed the prototype for ffiwcs from fitsio.h until + full WCS support is added to CFITSIO in the near future. + + - modified the HTTP driver to send a User-Agent string: + HEASARC/CFITSIO/ + + - declared local variables in compress.c as 'static' to avoid + conflicts with other libraries. + +Version 2.024 - 9 Nov 1998 + + - added new function fits_url_type which returns the driver prefix string + associated with a particular FITS file pointer. + +Version 2.023 - 1 Nov 1998 - first full release of CFITSIO 2.0 + + - slightly modified the way real keyword values are formatted, to ensure + that it includes a decimal point. E.g., '1.0E-09' instead of '1E-09' + + - added new function to support template files when creating new FITS files. + + - support the TCROTn WCS keyword in tables, when reading the WCS keywords. + + - modified the iterator to support null values in logical columns in + binary tables. + + - fixed bug in iterator to support null values in integer columns in + ASCII tables. + + - changed the values for FLOATNULLVALUE and DOUBLENULLVALUE to make them + less likely to duplicate actual values in the data. + + - fixed major bug when freeing memory in the iterator function. It caused + mysterious crashes on a few platforms, but had no effect on most others. + + - added support for reading IRAF format image (.imh files) + + - added more error checking to return an error if the size of the FITS + file exceeds the largest value of a long integer (2.1 GB on 32-bit + platforms). + + - CFITSIO now will automatically insert space for additional table rows + or add space to the data heap, if one writes beyond the current end + of the table or heap. This prevents any HDUs which might follow + the current HDU from being overwritten. It is thus no longer necessary + to explicitly call fits_insert_rows before writing new rows of data + to the FITS file. + + - CFITSIO now automatically keeps track of the number of rows that have + been written to a FITS table, and updates the NAXIS2 keyword accordingly + when the table is closed. It is no longer necessary for the application + program to updated NAXIS2. + + - When reading from a FITS table, CFITSIO will now return an error if the + application tries to read beyond the end of the table. + + - added 2 routines to get the number of rows or columns in a table. + + - improved the undocumented feature that allows a '20A' column to be + read as though it were a '20B' column by fits_read_col_byt. + + - added overflow error checking when reading keywords. Previously, the + returned value could be silently truncated to the maximum allowed value + for that data type. Now an error status is returned whenever an + overflow occurs. + + - added new set of routines dealing with hierarchical groups of files. + These were provided by Don Jennings of the INTEGRAL Science Data Center. + + - added new URL parsing routines. + + - changed the calling sequence to ffghad (get HDU address) from + ffghad(fitsfile *fptr, > long *headstart, long *dataend) to + ffghad(fitsfile *fptr, > long *headstart, long datastart, + long *dataend, int *status) + + - major modification to support opening the same FITS file more + than once. Now one can open the same file multiple times and + read and write simultaneously to different HDUs within the file. + fits_open_file automatically detects if the file is already opened. + + - added the ability to clobber/overwrite an existing file + with the same name when creating a new output file. Just + preceed the output file name with '!' (an exclamation mark) + + - changed the ffpdat routine which writes the DATE keyword + to use the new 'YYYY-MM-DDThh:mm:ss' format. + + - added several new routines to create or parse the new date/time + format string. + + - changed ifdef for DECFortran in f77_wrap.h and f77_wrap1.c: + expanded to recognize Linux/Alpha + + - added new lexical parsing routines (from Peter Wilson): + eval_l.c, eval_y.c, eval_f.c, eval_defs.h, and eval_tab.h. + These are used when doing on-the-fly table row selections. + + - added new family of routines to support reading and writing + 'unsigned int' data type values in keywords, images or tables. + + - restructured all the putcol and getcol routines to provide + simpler and more robust support for machines which have + sizeof(long) = 8. Defined a new datatype INT32BIT which is + always 32 bits long (platform independent) and is used internally + in CFITSIO when reading or writing BITPIX = 32 images or 'J' + columns. This eliminated the need for specialize routines like + ffswaplong, ffunswaplong, and ffpacklong. + + - overhauled cfileio.c (and other files) to use loadable drivers for + doing data I/O to different devices. Now CFITSIO support network + access to ftp:// and http:// files, and to shared memory files. + + - removed the ffsmem routine and replaced it with ffomem. This will + only affect software that reads an existing file in core memory. + (written there by some other process). + + - modified all the ffgkn[] routines (get an array of keywords) so + that the 'nfound' parameter is = the number of keywords returned, + not the highest index value on the returned keywords. This makes + no difference if the starting index value to look for = 1. + This change is not backward compatible with previous versions + of CFITSIO, but is the way that FITSIO behaved. + + - added new error code = 1 for any application error external + to CFITSIO. Also reports "unknown error status" if the + value doesn't match a known CFITSIO error. + +Version 1.42 - 30 April 1998 (included in FTOOLS 4.1 release) + + - modified the routines which read a FITS float values into + a float array, or read FITS double values into a double array, + so that the array value is also explicitly set in addition + to setting the array of flag values, if the FITS value is a NaN. + This ensures that no NaN values get passed back to the calling + program, which can cause serious problems on some platforms (OSF). + + - added calls to ffrdef at the beginning of the insert + or delete rows or columns routines in editcol.c to make sure + that CFITSIO has correctly initialized the HDU information. + + - added new routine ffdrws to delete a list of rows in a table + + - added ffcphd to copy the header keywords from one hdu to another + + - made the anynul parameter in the ffgcl* routines optional + by first checking to see if the pointer is not null before + initializing it. + + - modified ffbinit and ffainit to ignore minor format + errors in header keywords so that cfitsio can at least + move to an extension that contains illegal keywords. + + - modified all the ffgcl* routines to simply return without + error if nelem = 0. + + - added check to ffclose to check the validity of the fitsfile + pointer before closing it. This should prevent program crashes + when someone tries to close the same file more than once. + + - replaced calls to strcmp and strncmp with macros FSTRCMP and + FSTRNCMP in a few places to improve performance when reading + header keywords (suggested by Mike Noble) + + Bug Fixes: + + - fixed typo in macro definition of error 504 in the file fitsio.h. + + - in ffopen, reserved space for 4 more characters in the input + file name in case a '.zip' suffix needs to be added. + + - small changes to ffpclx to fix problems when writing bit (X) data + columns beyond the current end of file. + + - fixed small bug in ffcrhd where a dummy pointer was not initialized + + - initialized the dummy variable in ffgcfe and ffgcfd which + was causing crashes under OSF in some cases. + + - increased the length of the allocated string ffgkls by 2 + to support the case of reading a numeric keyword as a string + which doesn't have the enclosing quote characters. + +Version 1.4 - 6 Feb 1998 + + - major restructuring of the CFITSIO User's Guide + + - added the new 'iterator' function. The fortran wrapper is + in f77_iter.c for now. + + - enhanced ffcrtb so that it writes a dummy primary array + if none currently exists before appending the table. + + - removed the ffgcl routine and replaced it with ffgcvl + + - modified ffpcnl to just take a single input null value instead + of an entire array of null value flags. + + - modified ffcmps and ffgnxk so that, for example, the string 'rate' + is not considered a match to the string 'rate2', and 'rate*' + is a match to the string 'rate'. + + - modified ffgrsz to also work with images, in which case + it returns the optimum number of pixels to process at + one time. + + - modified ffgthd to support null valued keywords + + - added a new source file 'f77_wrap.c' that includes all the + Fortran77 wrapper routines for calling CFITSIO. This will + eventually replace the Fortran FITSIO library. + + - added new routines: + ffppn - generic write primary array with null values + ffpprn - write null values to primary array + + ffuky - 'update' a keyword value, with any specified datatype. + + ffrprt - write out report of error status and error messages + ffiter - apply a user function iteratively to all the rows of a table + ffpkyc - write complex-valued keyword + ffpkym - write double complex-valued keyword + ffpkfc - write complex-valued keyword in fixed format + ffpkfm - write double complex-valued keyword in fixed format + + ffgkyc - read complex-valued keyword + ffgkym - read double complex-valued keyword + + ffmkyc - modify complex-valued keyword + ffmkym - modify double complex-valued keyword + ffmkfc - modify complex-valued keyword in fixed format + ffmkfm - modify double complex-valued keyword in fixed format + + ffukyc - update complex-valued keyword + ffukym - update double complex-valued keyword + ffukfc - update complex-valued keyword in fixed format + ffukfm - update double complex-valued keyword in fixed format + + ffikyc - insert complex-valued keyword + ffikym - insert double complex-valued keyword + ffikfc - insert complex-valued keyword in fixed format + ffikfm - insert double complex-valued keyword in fixed format + + ffpktp - write or modify keywords using ASCII template file + ffcpcl - copy a column from one table to another + ffcpky - copy an indexed keyword from one HDU to another + ffpcnl - write logical values, including nulls, to binary table + ffpcns - write string values, including nulls, to table + ffmnhd - move to HDU with given exttype, EXTNAME and EXTVERS values + ffthdu - return the total number of HDUs in the file + ffghdt - return the type of the CHDU + ffflnm - return the name of the open FITS file + ffflmd - return the mode of the file (READONLY or READWRITE) + + - modified ffmahd and ffmrhd (to move to a new extension) so that + a null pointer may be given for the returned HDUTYPE argument. + + - worked around a bug in the Mac CWpro2 compiler by changing all + the statements like "#if BYTESWAPPED == TRUE" to "if BYTESWAPPED". + + - modified ffitab (insert new ASCII table) to allow tables with + zero number of columns + + - modified Makefile.in and configure to define the -Dg77Fortran + CFLAGS variable on Linux platforms. This is needed to + compile the new f77_wrap.c file (which includes cfortran.h) + + Bug Fixes: + + - fixed small bug in ffgrz (get optimum row size) which sometimes + caused it to return slightly less than the maximum optimum size. + This bug would have done no harm to application programs. + + - fixed bug in ffpclk and ffgclk to add an 'else' case + if size of int is not equal to size of short or size of long. + + - added test to ffgkls to check if the input string is not null before + allocating memory for it. + +Version 1.32 - 21 November 1997 (internal release only) + + - fixed bug in the memory deallocation (free) statements + in the ffopen routine in the cfileio.c file. + + - modified ffgphd to tolerate minor violations of the FITS + standard in the format of the XTENSION = 'IMAGE ' + keyword when reading FITS files. Extra trailing spaces + are now allowed in the keyword value. (FITS standard + will be changed so that this is not a violation). + +Version 1.31 - 4 November 1997 (internal release only) + + Enhancements: + + - added support for directly reading compressed FITS files + by copying the algorithms from the gzip program. This + supports the Unix compress, gzip and pkzip algorithms. + + - modified ffiimg, ffitab, and ffibin (insert HDUs into + a FITS file) so that if the inserted HDU is at the end of + the FITS file, then it simply appends a new empty HDU + and writes the required keywords. This allows space + to be reserved for additional keywords in the header + if desired. + + - added the ffchfl and ffcdfl routines to check the header and + data fill values, for compatibility with the Fortran FITSIO + library. + + - added the ffgsdt routine to return the system date + for compatibility with the Fortran FITSIO library. + + - added a diagnostic error message (written to the error stack) + if the routines that read data from image or column fail. + + - modified ffgclb so that it simply copies the bytes from + an ASCII 'nA' or 'An' format column into the user's byte + array. Previously, CFITSIO would return an error when + trying to read an 'A' column with ffgclb. + + - modified ffpclb so that it simply copies the input array + of bytes to an ASCII 'nA' or 'An' format column. + Previously, CFITSIO would return an error when + trying to write to an 'A' column with ffpclb. + + Bug Fixes: + + - ffgkls was allocating one too few bytes when reading continued + string keyword values. + + - in testprog.c added code to properly free the memory that + had been allocated for string arrays. + + - corrected typographical errors in the User's Guide. + +Version 1.30 - 11 September 1997 + + - major overhaul to support reading and writing FITS files + in memory. The new routines fits_set_mem_buff and + fits_write_mem_buff have been added to initialize and + copy out the memory buffer, respectively. + + - added support for reading FITS files piped in on 'stdin' + and piped out on 'stdout'. Just specify the file name as '-' + when opening or creating the FITS file. + + - added support for 64-bit SGI IRIX machines. This required + adding routines to pack and unpack 32-bit integers into + 64-bit integers. + + - cleaned up the code that supports G_FLOAT and IEEE_FLOAT + on Alpha VMS systems. Now, the type of float is determined + at compile time, not run time. + + Bug Fixes: + + - replaced the malloc calls in the error message stack routines + with a static fixed size array. The malloc's cause more + problems than they solved, and were prone to cause memory + leaks if users don't clear the error message stack when + closing the FITS file. + + - when writing float or double keywords, test that the value + is not a special IEEE value such as a NaN. Some + compilers would write the string 'NaN' in this case into + the output value string. + + - fixed bug in ffiblk, to ignore EOF status return if it is + inserting blocks at the end of the file. + + - removed the 'l' from printf format string that is constructed + in the ffcfmt routine. This 'l' is non-standard and causes problems + with the Metrowerks compiler on a Mac. + + - the default null value in images was mistakenly being set + equal to NO_NULL = 314, rather than NULL_UNDEFINED = 1234554321 + in the ffgphd routine. + + - check status value in ffgkls to make sure the keyword exists + before allocating memory for the value string. + + - fixed the support for writing and reading unsigned long integer + keyword values in ffpky and ffgky by internally treating + the values as doubles. This required changes to ffc2r and + ffc2d as well. + + - added explicit cast to 'double' in one place in putcolb.c and + 6 places in pubcolui.c, to get rid of warning messages issued + by one compiler. + + - in ffbinit and ffainit, it is necessary to test that tfield > 0 + before trying to allocate memory with calloc. Otherwise, some + compilers return a null pointer which CFITSIO interprets to + mean the memory allocation failed. + + - had to explicitly cast the null buffer pointer to a char + pointer (cptr = (char *)buffer;) in 4 places in the buffers.c + file to satisfy a picky C++ compiler. + + - changed the test for an ALPHA VMS system to see if + '__VMS' is defined, rather than 'VMS'. The latter + is not defined by at least one C++ compiler. + + - modified ffpcls so that it can write a null string to + a variable length string column, without going into + an infinite loop. + + - fixed bug in ffgcfl that caused the 'next' variable to be + incremented twice. + + - fixed bug in ffgcpr that caused it write 2x the number of + complex elements into the descriptor when writing to + a complex or double complex variable length array column. + + - added call to ffrdef at the end of ffrsim to ensure that + the internal structures are updated to correspond to the + modified header keywords + +Version 1.25 - 7 July 1997 + + - improved the efficiency of the ffiblk routine, when inserting + more than one block into the file. + + - fixed bug in ffwend that in rare instances caused the beginning + of the following extension to be overwritten by blank fill. + + - added new routine to modify the size of an existing primary + array or image extension: fits_resize_img/ffrsim. + + - added support for null-valued keywords, e.g., keywords that + have no defined value. These keywords have an equal sign and + space in columns 9-10, but have not value string. Example: + KEYNAME = / null-valued keyword + Support for this feature required the following changes: + - modified ffpsvc to return a null value string without error + - modified ffc2[ilrd] to return error VALUE_UNDEFINED in this case + - modified ffgkn[sljed] to continue reading additional keywords + even if one or more keywords have undefined values. + - added 4 new routines: ffpkyu, ffikyu, ffmkyu, ffukyu to + write, insert, modify, or update an undefined keyword + + - a new makefile.os2 file was added, for building CFITSIO + on OS/2 systems. + + - modified ffgtkn so that if it finds an unexpected keyword + name, the returned error status = BAD_ORDER instead of + NOT_POS_INT. + + - added 2 new routines, fits_write_key_unit/ffpunt and + fits_read_key_unit/ffgunt to write/read the physical + units of a keyword value. These routines use a local + FITS convention for storing the units in square brackets + following the '/' comment field separator, as in: + VELOCITY= 12 / [km/s] orbit speed + The testprog.c program was modified to test these + new routines. + + - in the test of Alpha OSF/1 machines in fitsio2.h, + change 'defined(unix)' to 'defined(__unix__)' which + appears to be a more robust test. + + - remove test for linux environment variable from fitsio2.h + +Version 1.24 - 2 May 1997 + + - fixed bug in ffpbyt that incorrectly computed the current + location in the FITS file when writing > 10000 bytes. + + - changed the datatype of the 'nbytes' parameter in ffpbyt + from 'int' to 'long'. Made corresponding datatype change + to some internal variables in ffshft. + + - changed '(unsigned short *)' to '(short *)' in getcolui.c, and + changed '(unsigned long *)' to '(long *)' in getcoluj.c, to + work around problem with the VAX/VMS cc compiler. + +Version 1.23 - 24 April 1997 + + - modified ffcins and ffdins (in editcol.c) to simply return + without error if there are no (zero) rows in the table. + +Version 1.22 - 18 April 1997 + + - fixed bug in ffgcpr that caused it to think that all values were + undefined in ASCII tables columns that have TNULLn = ' ' + (i.e., the TNULLn keyword value is a string of blanks. + + - fixed bug in the ffgcl[bdeijk,ui,uj] family of routines + when parsing a numeric value in an ASCII table. The + returned values would have the decimal place shifted to + the left if the table field contained an explicit decimal + point followed by blanks. Example: in an F5.2 column, + the value '16. ' would be returned as 0.16. If the + trailing zeros were present, then cfitsio returned the + correct value (e.g., '16.00' returns 16.). + + - fixed another bug in the ffgcl[bdeijk,ui,uj] family of routines + that caused them to misread values in an ASCII table in rows + following an undefined value when all the values were read + at once in a single call to the routine. + +Version 1.21 - 26 March 1997 + + - added general support for reading and writing unsigned integer + keywords, images, and binary table column values. + + - fixed bug in the way the column number was used in ffgsve and + similar routines. This bug caused cfitsio to read (colnum - 1) + rather than the desired column. + + - fixed a bug in ftgkls that prevented it from reading more than one + continuation line of a long string keyword value. + + - fixed the definition of fits_write_longwarn in longnam.h + +Version 1.20 - 29 Jan 1997 + + - when creating a binary table with variable length vector columns, if the + calling routine does not specify a value for the maximum length of + the vector (e.g., TFORMn = '1PE(400)') then cfitsio will automatically + calculate the maximum value and append it to the TFORM value + when the binary table is first closed. + + - added the set of routines to do coordinate system transformations + + - added support for wildcards ('*', '?', and '#') in the input + keyword name when reading, modifying, or deleting keywords. + + - added new general keyword reading routine, ffgnxk, to return + the next keyword whose name matches a list of template names, + but does not match any names on a second template list. + + - modified ftgrec so that it simply moves to the beginning + of the header if the input keyword number = 0 + + - added check in ffdelt to make sure the input fits file pointer is + not already null + + - added check in ffcopy to make sure the output HDU does not + already contain any keywords (it must be empty). + + - modified ffgcls so that it does not test if each string column + value equals the null string value if the null string value + is longer than the width of the column. + + - fixed bug in ftgtdm that caused it to fail if the TDIMn + keyword did not exist in the FITS file + + - modified testprog.c to include tests of keyword wildcards + and the WCS coordinate transformation routines. + + - added a test for 'EMX' in fitsio2.h so that cfitsio builds + correctly on a PC running OS/2. + +Version 1.11 - 04 Dec 1996 + + - modified the testprog.c program that is included with the + distribution, so that the output FITS file is identical to + that produced by the Fortran FITSIO test program. + + - changed all instances of the 'extname' variable to 'extnm' + to avoid a conflict with the -Dextname switch in cfortran.h + on HP machines. + + - in all the routines like ffi4fi1, which convert an array + of values to integers just prior to writing them to the FITS + file, the integer value is now rounded to the nearest integer + rather than truncated. (ffi4fi1, ffi4fi2, ffi4fi4, etc) + + - changed ffgcfl (and hence ffgcl) so that the input value + of the logical array element is not changed if the corresponding + FITS value is undefined. + + - in ffgacl, the returned value of TBCOL was off by 1 (too small) + + - fixed the comment of EXTNAME keyword to read 'binary table' + instead of 'ASCII table' in the header of binary tables. + +Version 1.101 - 17 Nov 1996 + + - Made major I/O efficiency improvements by adding internal buffers + rather than directly reading or writing to disk. Access to + columns in binary tables is now 50 - 150 times faster. Access to + FITS image is also slightly faster. + + - made significant speed improvements when reading numerical data + in FITS ASCII tables by writing my own number parsing routines + rather than using the sscanf C library routine. This change + requires that the -lm argument now be included when linking + a program that calls cfitsio (under UNIX). + + - regrouped the source files into logically related sets of routines. + The Makefile now runs much faster since every single routine is + not split into a separate file. + + - now use the memcpy function, rather than a 'for' loop in several + places for added efficiency + + - redesigned the low-level binary table read and write routines + (ffpbytoff and ffgbytoff) for greater efficiency. + + - added a new error status: 103 = too many open FITS files. + + - added a 'extern "C"' statement around the function prototypes + in fitsio.h, to support use of cfitsio by C++ compilers. + + - fixed routines for writing or reading fixed-length substrings + within a binary table ASCII column, with TFORM values of + of the form 'rAw' where 'r' is the total width of the ASCII + column and 'w' is the width of a substring within the column. + + - no longer automatically rewrite the END card and following fill + values if they are already correct. + + - all the 'get keyword value and comment' routines have been changed + so that the comment is not returned if the input pointer is NULL. + + - added new routine to return the optimum number of tables rows + that should be read or written at one time for optimum efficiency. + + - modified the way numerical values in ASCII tables are parsed so + that embedded spaces in the value are ignored, and implicit + decimal points are now supported. (e.g, the string '123E 12' + in a 'E10.2' format column will be interpreted as 1.23 * 10**12). + + - modified ffpcl and ffgcl to support binary table columns of + all datatype (added logical, bit, complex, and double complex) + + - when writing numerical data to ASCII table columns, the ffpcl_ + routines now return an overflow error if a value is too large + to be expressed in the column format. + + - closed small memory leak in ffpcls. + + - initialized the 'incre' variable in ffgcpr to eliminate compiler warning. + +Version 1.04 - 17 Sept 1996 + + - added README.MacOS and cfitsio_mac.sit.hqx to the distribution + to support the Mac platforms. + + - fixed bug in ffpdfl that caused an EOF error (107) when a program + creates a new extension that is an exact multiple of 2880 bytes long, + AND the program does not write a value to the last element + in the table or image. + + - fixed bug in all the ffgsf* and ffgcv* routines which caused + core dumps when reading null values in a table. + +Version 1.03 - 20 August 1996 + + - added full support for reading and writing the C 'int' + data type. This was a problem on Alpha/OSF where short, + int, and long datatypes are 2, 4, and 8 bytes long, respectively. + + - cleaned up the code in the byte-swapping routines. + + - renamed the file 'longname.h' to 'longnam.h' to avoid conflict + with a file with the same name in another unrelated package. + +Version 1.02 - 15 August 1996 + + - ffgtbp was not correctly reading the THEAP keyword, hence would + not correctly read variable length data in binary tables if + the heap was not at the default starting location (i.e., + starting immediately after the fixed length table). + + - now force the cbuff variable in ffpcl_ and ffgcl_ to be + aligned on a double word boundary. Non-alignment can + cause program to crash on some systems. + +Version 1.01 - 12 August 1996 + + - initial public release diff --git a/software/cfitsio3040/checksum.c b/software/cfitsio3040/checksum.c new file mode 100644 index 000000000..c52b9ef5a --- /dev/null +++ b/software/cfitsio3040/checksum.c @@ -0,0 +1,508 @@ +/* This file, checksum.c, contains the checksum-related routines in the */ +/* FITSIO library. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" +/*------------------------------------------------------------------------*/ +int ffcsum(fitsfile *fptr, /* I - FITS file pointer */ + long nrec, /* I - number of 2880-byte blocks to sum */ + unsigned long *sum, /* IO - accumulated checksum */ + int *status) /* IO - error status */ +/* + Calculate a 32-bit 1's complement checksum of the FITS 2880-byte blocks. + This routine is based on the C algorithm developed by Rob + Seaman at NOAO that was presented at the 1994 ADASS conference, + published in the Astronomical Society of the Pacific Conference Series. + This uses a 32-bit 1's complement checksum in which the overflow bits + are permuted back into the sum and therefore all bit positions are + sampled evenly. +*/ +{ + long ii, jj; + unsigned short sbuf[1440]; + unsigned long hi, lo, hicarry, locarry; + + if (*status > 0) + return(*status); + /* + Sum the specified number of FITS 2880-byte records. This assumes that + the FITSIO file pointer points to the start of the records to be summed. + Read each FITS block as 1440 short values (do byte swapping if needed). + */ + for (jj = 0; jj < nrec; jj++) + { + ffgbyt(fptr, 2880, sbuf, status); + +#if BYTESWAPPED + + ffswap2( (short *)sbuf, 1440); /* reverse order of bytes in each value */ + +#endif + + hi = (*sum >> 16); + lo = *sum & 0xFFFF; + + for (ii = 0; ii < 1440; ii += 2) + { + hi += sbuf[ii]; + lo += sbuf[ii+1]; + } + + hicarry = hi >> 16; /* fold carry bits in */ + locarry = lo >> 16; + + while (hicarry | locarry) + { + hi = (hi & 0xFFFF) + locarry; + lo = (lo & 0xFFFF) + hicarry; + hicarry = hi >> 16; + locarry = lo >> 16; + } + + *sum = (hi << 16) + lo; + } + return(*status); +} +/*-------------------------------------------------------------------------*/ +void ffesum(unsigned long sum, /* I - accumulated checksum */ + int complm, /* I - = 1 to encode complement of the sum */ + char *ascii) /* O - 16-char ASCII encoded checksum */ +/* + encode the 32 bit checksum by converting every + 2 bits of each byte into an ASCII character (32 bit word encoded + as 16 character string). Only ASCII letters and digits are used + to encode the values (no ASCII punctuation characters). + + If complm=TRUE, then the complement of the sum will be encoded. + + This routine is based on the C algorithm developed by Rob + Seaman at NOAO that was presented at the 1994 ADASS conference, + published in the Astronomical Society of the Pacific Conference Series. +*/ +{ + unsigned int exclude[13] = { 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, + 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60 }; + unsigned long mask[4] = { 0xff000000, 0xff0000, 0xff00, 0xff }; + + int offset = 0x30; /* ASCII 0 (zero) */ + + unsigned long value; + int byte, quotient, remainder, ch[4], check, ii, jj, kk; + char asc[32]; + + if (complm) + value = 0xFFFFFFFF - sum; /* complement each bit of the value */ + else + value = sum; + + for (ii = 0; ii < 4; ii++) + { + byte = (value & mask[ii]) >> (24 - (8 * ii)); + quotient = byte / 4 + offset; + remainder = byte % 4; + for (jj = 0; jj < 4; jj++) + ch[jj] = quotient; + + ch[0] += remainder; + + for (check = 1; check;) /* avoid ASCII punctuation */ + for (check = 0, kk = 0; kk < 13; kk++) + for (jj = 0; jj < 4; jj += 2) + if ((unsigned char) ch[jj] == exclude[kk] || + (unsigned char) ch[jj+1] == exclude[kk]) + { + ch[jj]++; + ch[jj+1]--; + check++; + } + + for (jj = 0; jj < 4; jj++) /* assign the bytes */ + asc[4*jj+ii] = ch[jj]; + } + + for (ii = 0; ii < 16; ii++) /* shift the bytes 1 to the right */ + ascii[ii] = asc[(ii+15)%16]; + + ascii[16] = '\0'; +} +/*-------------------------------------------------------------------------*/ +unsigned long ffdsum(char *ascii, /* I - 16-char ASCII encoded checksum */ + int complm, /* I - =1 to decode complement of the */ + unsigned long *sum) /* O - 32-bit checksum */ +/* + decode the 16-char ASCII encoded checksum into an unsigned 32-bit long. + If complm=TRUE, then the complement of the sum will be decoded. + + This routine is based on the C algorithm developed by Rob + Seaman at NOAO that was presented at the 1994 ADASS conference, + published in the Astronomical Society of the Pacific Conference Series. +*/ +{ + char cbuf[16]; + unsigned long hi = 0, lo = 0, hicarry, locarry; + int ii; + + /* remove the permuted FITS byte alignment and the ASCII 0 offset */ + for (ii = 0; ii < 16; ii++) + { + cbuf[ii] = ascii[(ii+1)%16]; + cbuf[ii] -= 0x30; + } + + for (ii = 0; ii < 16; ii += 4) + { + hi += (cbuf[ii] << 8) + cbuf[ii+1]; + lo += (cbuf[ii+2] << 8) + cbuf[ii+3]; + } + + hicarry = hi >> 16; + locarry = lo >> 16; + while (hicarry || locarry) + { + hi = (hi & 0xFFFF) + locarry; + lo = (lo & 0xFFFF) + hicarry; + hicarry = hi >> 16; + locarry = lo >> 16; + } + + *sum = (hi << 16) + lo; + if (complm) + *sum = 0xFFFFFFFF - *sum; /* complement each bit of the value */ + + return(*sum); +} +/*------------------------------------------------------------------------*/ +int ffpcks(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Create or update the checksum keywords in the CHDU. These keywords + provide a checksum verification of the FITS HDU based on the ASCII + coded 1's complement checksum algorithm developed by Rob Seaman at NOAO. +*/ +{ + char datestr[20], checksum[FLEN_VALUE], datasum[FLEN_VALUE]; + char comm[FLEN_COMMENT], chkcomm[FLEN_COMMENT], datacomm[FLEN_COMMENT]; + int tstatus; + long nrec; + LONGLONG headstart, datastart, dataend; + unsigned long dsum, olddsum, sum; + double tdouble; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* generate current date string and construct the keyword comments */ + ffgstm(datestr, NULL, status); + strcpy(chkcomm, "HDU checksum updated "); + strcat(chkcomm, datestr); + strcpy(datacomm, "data unit checksum updated "); + strcat(datacomm, datestr); + + /* write the CHECKSUM keyword if it does not exist */ + tstatus = *status; + if (ffgkys(fptr, "CHECKSUM", checksum, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + strcpy(checksum, "0000000000000000"); + ffpkys(fptr, "CHECKSUM", checksum, chkcomm, status); + } + + /* write the DATASUM keyword if it does not exist */ + tstatus = *status; + if (ffgkys(fptr, "DATASUM", datasum, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + olddsum = 0; + ffpkys(fptr, "DATASUM", " 0", datacomm, status); + + /* set the CHECKSUM keyword as undefined, if it isn't already */ + if (strcmp(checksum, "0000000000000000") ) + { + strcpy(checksum, "0000000000000000"); + ffmkys(fptr, "CHECKSUM", checksum, chkcomm, status); + } + } + else + { + /* decode the datasum into an unsigned long variable */ + + /* olddsum = strtoul(datasum, 0, 10); doesn't work on SUN OS */ + + tdouble = atof(datasum); + olddsum = (unsigned long) tdouble; + } + + /* close header: rewrite END keyword and following blank fill */ + /* and re-read the required keywords to determine the structure */ + if (ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->heapsize > 0) + ffuptf(fptr, status); /* update the variable length TFORM values */ + + /* write the correct data fill values, if they are not already correct */ + if (ffpdfl(fptr, status) > 0) + return(*status); + + /* calc size of data unit, in FITS 2880-byte blocks */ + if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) + return(*status); + + nrec = (long) ((dataend - datastart) / 2880); + dsum = 0; + + if (nrec > 0) + { + /* accumulate the 32-bit 1's complement checksum */ + ffmbyt(fptr, datastart, REPORT_EOF, status); + if (ffcsum(fptr, nrec, &dsum, status) > 0) + return(*status); + } + + if (dsum != olddsum) + { + /* update the DATASUM keyword with the correct value */ + sprintf(datasum, "%lu", dsum); + ffmkys(fptr, "DATASUM", datasum, datacomm, status); + + /* set the CHECKSUM keyword as undefined, if it isn't already */ + if (strcmp(checksum, "0000000000000000") ) + { + strcpy(checksum, "0000000000000000"); + ffmkys(fptr, "CHECKSUM", checksum, chkcomm, status); + } + } + + if (strcmp(checksum, "0000000000000000") ) + { + /* check if CHECKSUM is still OK; move to the start of the header */ + ffmbyt(fptr, headstart, REPORT_EOF, status); + + /* accumulate the header checksum into the previous data checksum */ + nrec = (long) ((datastart - headstart) / 2880); + sum = dsum; + if (ffcsum(fptr, nrec, &sum, status) > 0) + return(*status); + + if (sum == 0 || sum == 0xFFFFFFFF) + return(*status); /* CHECKSUM is correct */ + + /* Zero the CHECKSUM and recompute the new value */ + ffmkys(fptr, "CHECKSUM", "0000000000000000", chkcomm, status); + } + + /* move to the start of the header */ + ffmbyt(fptr, headstart, REPORT_EOF, status); + + /* accumulate the header checksum into the previous data checksum */ + nrec = (long) ((datastart - headstart) / 2880); + sum = dsum; + if (ffcsum(fptr, nrec, &sum, status) > 0) + return(*status); + + /* encode the COMPLEMENT of the checksum into a 16-character string */ + ffesum(sum, TRUE, checksum); + + /* update the CHECKSUM keyword value with the new string */ + ffmkys(fptr, "CHECKSUM", checksum, "&", status); + + return(*status); +} +/*------------------------------------------------------------------------*/ +int ffupck(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Update the CHECKSUM keyword value. This assumes that the DATASUM + keyword exists and has the correct value. +*/ +{ + char datestr[20], chkcomm[FLEN_COMMENT], comm[FLEN_COMMENT]; + char checksum[FLEN_VALUE], datasum[FLEN_VALUE]; + int tstatus; + long nrec; + LONGLONG headstart, datastart, dataend; + unsigned long sum, dsum; + double tdouble; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* generate current date string and construct the keyword comments */ + ffgstm(datestr, NULL, status); + strcpy(chkcomm, "HDU checksum updated "); + strcat(chkcomm, datestr); + + /* get the DATASUM keyword and convert it to a unsigned long */ + if (ffgkys(fptr, "DATASUM", datasum, comm, status) == KEY_NO_EXIST) + { + ffpmsg("DATASUM keyword not found (ffupck"); + return(*status); + } + + tdouble = atof(datasum); /* read as a double as a workaround */ + dsum = (unsigned long) tdouble; + + /* get size of the HDU */ + if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) + return(*status); + + /* get the checksum keyword, if it exists */ + tstatus = *status; + if (ffgkys(fptr, "CHECKSUM", checksum, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + strcpy(checksum, "0000000000000000"); + ffpkys(fptr, "CHECKSUM", checksum, chkcomm, status); + } + else + { + /* check if CHECKSUM is still OK */ + /* rewrite END keyword and following blank fill */ + if (ffwend(fptr, status) > 0) + return(*status); + + /* move to the start of the header */ + ffmbyt(fptr, headstart, REPORT_EOF, status); + + /* accumulate the header checksum into the previous data checksum */ + nrec = (long) ((datastart - headstart) / 2880); + sum = dsum; + if (ffcsum(fptr, nrec, &sum, status) > 0) + return(*status); + + if (sum == 0 || sum == 0xFFFFFFFF) + return(*status); /* CHECKSUM is already correct */ + + /* Zero the CHECKSUM and recompute the new value */ + ffmkys(fptr, "CHECKSUM", "0000000000000000", chkcomm, status); + } + + /* move to the start of the header */ + ffmbyt(fptr, headstart, REPORT_EOF, status); + + /* accumulate the header checksum into the previous data checksum */ + nrec = (long) ((datastart - headstart) / 2880); + sum = dsum; + if (ffcsum(fptr, nrec, &sum, status) > 0) + return(*status); + + /* encode the COMPLEMENT of the checksum into a 16-character string */ + ffesum(sum, TRUE, checksum); + + /* update the CHECKSUM keyword value with the new string */ + ffmkys(fptr, "CHECKSUM", checksum, "&", status); + + return(*status); +} +/*------------------------------------------------------------------------*/ +int ffvcks(fitsfile *fptr, /* I - FITS file pointer */ + int *datastatus, /* O - data checksum status */ + int *hdustatus, /* O - hdu checksum status */ + /* 1 verification is correct */ + /* 0 checksum keyword is not present */ + /* -1 verification not correct */ + int *status) /* IO - error status */ +/* + Verify the HDU by comparing the value of the computed checksums against + the values of the DATASUM and CHECKSUM keywords if they are present. +*/ +{ + int tstatus; + double tdouble; + unsigned long datasum, hdusum, olddatasum; + char chksum[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + *datastatus = -1; + *hdustatus = -1; + + tstatus = *status; + if (ffgkys(fptr, "CHECKSUM", chksum, comm, status) == KEY_NO_EXIST) + { + *hdustatus = 0; /* CHECKSUM keyword does not exist */ + *status = tstatus; + } + if (chksum[0] == '\0') + *hdustatus = 0; /* all blank checksum means it is undefined */ + + if (ffgkys(fptr, "DATASUM", chksum, comm, status) == KEY_NO_EXIST) + { + *datastatus = 0; /* DATASUM keyword does not exist */ + *status = tstatus; + } + if (chksum[0] == '\0') + *datastatus = 0; /* all blank checksum means it is undefined */ + + if ( *status > 0 || (!(*hdustatus) && !(*datastatus)) ) + return(*status); /* return if neither keywords exist */ + + /* convert string to unsigned long */ + + /* olddatasum = strtoul(chksum, 0, 10); doesn't work w/ gcc on SUN OS */ + /* sscanf(chksum, "%u", &olddatasum); doesn't work w/ cc on VAX/VMS */ + + tdouble = atof(chksum); /* read as a double as a workaround */ + olddatasum = (unsigned long) tdouble; + + /* calculate the data checksum and the HDU checksum */ + if (ffgcks(fptr, &datasum, &hdusum, status) > 0) + return(*status); + + if (*datastatus) + if (datasum == olddatasum) + *datastatus = 1; + + if (*hdustatus) + if (hdusum == 0 || hdusum == 0xFFFFFFFF) + *hdustatus = 1; + + return(*status); +} +/*------------------------------------------------------------------------*/ +int ffgcks(fitsfile *fptr, /* I - FITS file pointer */ + unsigned long *datasum, /* O - data checksum */ + unsigned long *hdusum, /* O - hdu checksum */ + int *status) /* IO - error status */ + + /* calculate the checksums of the data unit and the total HDU */ +{ + long nrec; + LONGLONG headstart, datastart, dataend; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* get size of the HDU */ + if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) + return(*status); + + nrec = (long) ((dataend - datastart) / 2880); + + *datasum = 0; + + if (nrec > 0) + { + /* accumulate the 32-bit 1's complement checksum */ + ffmbyt(fptr, datastart, REPORT_EOF, status); + if (ffcsum(fptr, nrec, datasum, status) > 0) + return(*status); + } + + /* move to the start of the header and calc. size of header */ + ffmbyt(fptr, headstart, REPORT_EOF, status); + nrec = (long) ((datastart - headstart) / 2880); + + /* accumulate the header checksum into the previous data checksum */ + *hdusum = *datasum; + ffcsum(fptr, nrec, hdusum, status); + + return(*status); +} + diff --git a/software/cfitsio3040/compress.c b/software/cfitsio3040/compress.c new file mode 100644 index 000000000..40463a634 --- /dev/null +++ b/software/cfitsio3040/compress.c @@ -0,0 +1,5271 @@ +#include "compress.h" +local void error OF((char *m)); + +/* ====================================================================== + +This file contains source code that was copied and modified from the +original gzip-1.2.4 program, which contained the following copyright +and warranty notices: + +"gzip is free software, you can redistribute it and/or modify it under +the terms of the GNU General Public License, a copy of which is +provided below. The latest version of gzip are always available by ftp +in prep.ai.mit.edu:/pub/gnu, or in any of the prep mirror sites." + + * gzip (GNU zip) -- compress files with zip algorithm and 'compress' interface + * Copyright (C) 1992-1993 Jean-loup Gailly + * The unzip code was written and put in the public domain by Mark Adler. + * Portions of the lzw code are derived from the public domain 'compress' + * written by Spencer Thomas, Joe Orost, James Woods, Jim McKie, Steve Davies, + * Ken Turkowski, Dave Mack and Peter Jannesen. + * + * See the license_msg below and the file COPYING for the software license. + * See the file algorithm.doc for the compression algorithms and file formats. + + * unlzh.c -- decompress files in SCO compress -H (LZH) format. + * The code in this file is directly derived from the public domain 'ar002' + * written by Haruhiko Okumura. + +---------- Beginning of GNU GENERAL PUBLIC LICENSE ---------------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + +------------- End of GNU GENERAL PUBLIC LICENSE ---------------- +=========================================================================== +*/ + + /* global buffers */ + +static DECLARE(uch, inbuf, INBUFSIZ +INBUF_EXTRA); +static DECLARE(uch, outbuf, OUTBUFSIZ+OUTBUF_EXTRA); +static DECLARE(ush, d_buf, DIST_BUFSIZE); +static DECLARE(uch, window, 2L*WSIZE); + +#ifndef MAXSEG_64K + static DECLARE(ush, tab_prefix, 1L< 0) + return(*status); + + /* save input parameters into global variables */ + strcpy(ifname, filename); + ifd = diskfile; + memptr = (void **) buffptr; + memsize = buffsize; + realloc_fn = mem_realloc; + in_memptr = NULL; /* signal that we are reading from file, not memory */ + + /* clear input and output buffers */ + + outcnt = 0; + insize = inptr = 0; + bytes_in = bytes_out = 0L; + + part_nb = 0; + + method = get_method(ifd); + if (method < 0) + { + return(*status = 414); /* error message already emitted */ + } + + /* Actually do the compression/decompression. Loop over zipped members. + */ + for (;;) { + if ((*work)(ifd, ofd) != OK) { + method = -1; /* force cleanup */ + *status = 414; /* report some sort of decompression error */ + break; + } + if (last_member || inptr == insize) break; + /* end of file */ + + method = get_method(ifd); + if (method < 0) break; /* error message already emitted */ + bytes_out = 0; /* required for length check */ + } + +/* + *buffptr = *memptr; + *buffsize = *memsize; +*/ + *filesize = bytes_out; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int uncompress2mem_from_mem( + char *inmemptr, /* I - memory pointer to compressed bytes */ + size_t inmemsize, /* I - size of input compressed file */ + char **buffptr, /* IO - memory pointer */ + size_t *buffsize, /* IO - size of buffer, in bytes */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + size_t *filesize, /* O - size of file, in bytes */ + int *status) /* IO - error status */ + +/* + Uncompress the file into memory. Fill whatever amount of memory has + already been allocated, then realloc more memory, using the supplied + input function, if necessary. +*/ +{ + if (*status > 0) + return(*status); + + /* save input parameters into global variables */ + in_memptr = inmemptr; + in_memsize = inmemsize; + memptr = (void **) buffptr; + memsize = buffsize; + realloc_fn = mem_realloc; + + /* clear input and output buffers */ + + outcnt = 0; + insize = inptr = 0; + bytes_in = bytes_out = 0L; + + part_nb = 0; + + method = get_method(ifd); + if (method < 0) + { + return(*status = 414); /* error message already emitted */ + } + + /* Actually do the compression/decompression. Loop over zipped members. + */ + for (;;) { + if ((*work)(ifd, ofd) != OK) { + method = -1; /* force cleanup */ + *status = 414; /* report some sort of decompression error */ + break; + } + if (last_member || inptr == insize) break; + /* end of file */ + + method = get_method(ifd); + if (method < 0) break; /* error message already emitted */ + bytes_out = 0; /* required for length check */ + } + +/* + *buffptr = *memptr; + *buffsize = *memsize; +*/ + *filesize = bytes_out; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int uncompress2file(char *filename, /* name of input file */ + FILE *indiskfile, /* I - input file pointer */ + FILE *outdiskfile, /* I - output file pointer */ + int *status) /* IO - error status */ + +/* + Uncompress the file into file. +*/ +{ + if (*status > 0) + return(*status); + + /* save input parameters into global variables */ + strcpy(ifname, filename); + ifd = indiskfile; + ofd = outdiskfile; + realloc_fn = NULL; /* a null reallocation fn signals that the file is */ + /* to be uncompressed to a file on disk, not memory */ + in_memptr = NULL; /* signal that we are reading from file, not memory */ + + /* clear input and output buffers */ + outcnt = 0; + insize = inptr = 0; + bytes_in = bytes_out = 0L; + + part_nb = 0; + + method = get_method(ifd); + if (method < 0) + { + return(*status = 1); /* error message already emitted */ + } + + /* Actually do the compression/decompression. Loop over zipped members. + */ + for (;;) { + if ((*work)(ifd, ofd) != OK) { + method = -1; /* force cleanup */ + break; + } + if (last_member || inptr == insize) break; + /* end of file */ + + method = get_method(ifd); + if (method < 0) break; /* error message already emitted */ + bytes_out = 0; /* required for length check */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int compress2mem_from_mem( + char *inmemptr, /* I - memory pointer to uncompressed bytes */ + size_t inmemsize, /* I - size of input uncompressed file */ + char **buffptr, /* IO - memory pointer for compressed file */ + size_t *buffsize, /* IO - size of buffer, in bytes */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + size_t *filesize, /* O - size of file, in bytes */ + int *status) /* IO - error status */ + +/* + Compress the file into memory. Fill whatever amount of memory has + already been allocated, then realloc more memory, using the supplied + input function, if necessary. +*/ +{ + uch flags = 0; /* general purpose bit flags */ + ush attr = 0; /* ascii/binary flag */ + ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */ + + if (*status > 0) + return(*status); + + /* save input parameters into global variables */ + in_memptr = inmemptr; + in_memsize = inmemsize; + memptr = (void **) buffptr; + memsize = buffsize; + realloc_fn = mem_realloc; + + /* clear input and output buffers */ + + outcnt = 0; + insize = inptr = 0; + bytes_in = bytes_out = 0L; + + part_nb = 0; + + method = DEFLATED; + + /* write gzip header bytes */ + + put_byte(GZIP_MAGIC[0]); /* magic header */ + put_byte(GZIP_MAGIC[1]); + put_byte(DEFLATED); /* compression method */ + put_byte(flags); + +/* + just write zero as dummy value for the timestamp + put_long(time_stamp); +*/ + put_long(0); /* dummy time stamp */ + + /* Write deflated file to zip file */ + crc_value = updcrc(0, 0); + + bi_init(NO_FILE); + ct_init(&attr, &method); + lm_init(level, &deflate_flags); + + put_byte((uch)deflate_flags); /* extra flags */ + put_byte(0); /* OS identifier; 0 = default */ + + header_bytes = (long)outcnt; + + (void)deflate(); + + /* Write the crc and uncompressed size */ + put_long(crc_value); + put_long(isize); + header_bytes += 2*sizeof(long); + + flush_outbuf(); + + *buffptr = *memptr; + *buffsize = *memsize; + *filesize = bytes_out; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int compress2file_from_mem( + char *inmemptr, /* I - memory pointer to uncompressed bytes */ + size_t inmemsize, /* I - size of input uncompressed file */ + FILE *outdiskfile, + size_t *filesize, /* O - size of file, in bytes */ + int *status) +/* + Compress the memory file into disk file. +*/ +{ + uch flags = 0; /* general purpose bit flags */ + ush attr = 0; /* ascii/binary flag */ + ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */ + + if (*status > 0) + return(*status); + + /* save input parameters into global variables */ + in_memptr = inmemptr; + in_memsize = inmemsize; + + ofd = outdiskfile; + + realloc_fn = NULL; /* a null reallocation fn signals that the file is */ + /* to be compressed to a file on disk, not memory */ + + + /* clear input and output buffers */ + + outcnt = 0; + insize = inptr = 0; + bytes_in = bytes_out = 0L; + + part_nb = 0; + + method = DEFLATED; + + /* write gzip header bytes */ + + put_byte(GZIP_MAGIC[0]); /* magic header */ + put_byte(GZIP_MAGIC[1]); + put_byte(DEFLATED); /* compression method */ + put_byte(flags); + +/* + just write zero as dummy value for the timestamp + put_long(time_stamp); +*/ + put_long(0); /* dummy time stamp */ + + /* Write deflated file to zip file */ + crc_value = updcrc(0, 0); + + bi_init(NO_FILE); + ct_init(&attr, &method); + lm_init(level, &deflate_flags); + + put_byte((uch)deflate_flags); /* extra flags */ + put_byte(0); /* OS identifier; 0 = default */ + + header_bytes = (long)outcnt; + + (void)deflate(); + + /* Write the crc and uncompressed size */ + put_long(crc_value); + put_long(isize); + header_bytes += 2*sizeof(long); + + flush_outbuf(); + + *filesize = bytes_out; + return(*status); +} +/*--------------------------------------------------------------------------*/ +/* ****************************** */ +/* The following came from gzip.c */ +/* ****************************** */ + +/* ======================================================================== + * Check the magic number of the input file and update ofname if an + * original name was given and to_stdout is not set. + * Return the compression method, -1 for error, -2 for warning. + * Set inptr to the offset of the next byte to be processed. + * Updates time_stamp if there is one and --no-time is not used. + * This function may be called repeatedly for an input file consisting + * of several contiguous gzip'ed members. + * IN assertions: there is at least one remaining compressed member. + * If the member is a zip file, it must be the only one. + */ +local int get_method(in) + FILE *in; /* input file descriptor */ +{ + uch flags; /* compression flags */ + char magic[2]; /* magic header */ + + magic[0] = (char)get_byte(); + magic[1] = (char)get_byte(); + + method = -1; /* unknown yet */ + part_nb++; /* number of parts in gzip file */ + header_bytes = 0; + last_member = RECORD_IO; + /* assume multiple members in gzip file except for record oriented I/O */ + + if (memcmp(magic, GZIP_MAGIC, 2) == 0 + || memcmp(magic, OLD_GZIP_MAGIC, 2) == 0) { + + method = (int)get_byte(); + if (method != DEFLATED) { + error("unknown compression method -- get newer version of gzip"); + exit_code = ERROR; + return -1; + } + + work = unzip; + flags = (uch)get_byte(); + + if ((flags & ENCRYPTED) != 0) { + error("input file is encrypted -- get newer version of gzip"); + exit_code = ERROR; + return -1; + } + if ((flags & CONTINUATION) != 0) { + error( + "file is a a multi-part gzip file -- get newer version of gzip"); + exit_code = ERROR; + if (force <= 1) return -1; + } + if ((flags & RESERVED) != 0) { + error("file has flags 0x%x -- get newer version of gzip"); + exit_code = ERROR; + if (force <= 1) return -1; + } + (void)get_byte(); /* Ignore time stamp */ + (void)get_byte(); + (void)get_byte(); + (void)get_byte(); + + (void)get_byte(); /* Ignore extra flags for the moment */ + (void)get_byte(); /* Ignore OS type for the moment */ + + if ((flags & CONTINUATION) != 0) { + (void)get_byte(); + (void)get_byte(); + } + + if ((flags & EXTRA_FIELD) != 0) { + unsigned len = (unsigned)get_byte(); + len |= ((unsigned)get_byte())<<8; + while (len--) (void)get_byte(); + } + + /* Get original file name if it was truncated */ + if ((flags & ORIG_NAME) != 0) { + /* Discard the old name */ + char c; /* dummy used for NeXTstep 3.0 cc optimizer bug */ + do {c=get_byte();} while (c != 0); + } /* ORIG_NAME */ + + /* Discard file comment if any */ + if ((flags & COMMENT) != 0) { + while (get_char() != 0) /* null */ ; + } + if (part_nb == 1) { + header_bytes = inptr + 2*sizeof(long); /* include crc and size */ + } + + } else if (memcmp(magic, PKZIP_MAGIC, 2) == 0 && inptr == 2 + && memcmp((char*)inbuf, PKZIP_MAGIC, 4) == 0) { + /* To simplify the code, we support a zip file when alone only. + * We are thus guaranteed that the entire local header fits in inbuf. + */ + inptr = 0; + work = unzip; + if (check_zipfile(in) != OK) return -1; + /* check_zipfile may get ofname from the local header */ + last_member = 1; + + } else if (memcmp(magic, PACK_MAGIC, 2) == 0) { + work = unpack; + method = PACKED; + + } else if (memcmp(magic, LZW_MAGIC, 2) == 0) { + work = unlzw; + method = COMPRESSED; + last_member = 1; + + } else if (memcmp(magic, LZH_MAGIC, 2) == 0) { + work = unlzh; + method = LZHED; + last_member = 1; + + } + if (method >= 0) return method; + + if (part_nb == 1) { + error("file not in gzip format:"); + exit_code = ERROR; + return -1; + } else { + /* decompression OK, trailing garbage ignored */ + return -2; + } +} + +/* ========================================================================*/ +/* this marks the start of the code that was originally in the */ +/* gzip source file called 'util.c' */ + +/* util.c -- utility functions for gzip support + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + */ + +extern ulg crc_32_tab[]; /* crc table, defined below */ + +/* =========================================================================== + * Run a set of bytes through the crc shift register. If s is a NULL + * pointer, then initialize the crc shift register contents instead. + * Return the current crc in either case. + */ +local ulg updcrc(s, n) + uch *s; /* pointer to bytes to pump through */ + unsigned n; /* number of bytes in s[] */ +{ + register ulg c; /* temporary variable */ + + static ulg crc = (ulg)0xffffffffL; /* shift register contents */ + + if (s == NULL) { + c = 0xffffffffUL; + } else { + c = crc; + if (n) do { + c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8); + } while (--n); + } + crc = c; + return c ^ 0xffffffffUL; /* (instead of ~c for 64-bit machines) */ +} + +/* =========================================================================== + * Fill the input buffer. This is called only when the buffer is empty. + */ +local int fill_inbuf(eof_ok) + int eof_ok; /* set if EOF acceptable as a result */ +{ + int len; + + if (in_memptr) + { + /* read from memory, not from a file */ + if (in_memsize < INBUFSIZ) + insize = in_memsize; + else + insize = INBUFSIZ; + + memcpy( (char*)inbuf, in_memptr, insize); + in_memptr += insize; + in_memsize -= insize; + } + else + { + + /* Read as much as possible from file */ + insize = 0; + do { + +/* len = read(ifd, (char*)inbuf+insize, INBUFSIZ-insize); */ + len = fread((char*)inbuf+insize, 1, INBUFSIZ-insize, ifd); + if (len == 0 || len == EOF) break; + insize += len; + } while (insize < INBUFSIZ); + + } + + if (insize == 0) { + if (eof_ok) return EOF; + error("unexpected end of file"); + exit_code = ERROR; + return ERROR; + } + + bytes_in += (ulg)insize; + inptr = 1; + return inbuf[0]; +} + +/* =========================================================================== + * Read a new buffer from the current input file, perform end-of-line + * translation, and update the crc and input file size. + * IN assertion: size >= 2 (for end-of-line translation) + (this routine came from zip.c, and was modified to read and write from/to memory) + */ +int file_read(buf, size) + char *buf; + unsigned size; +{ + unsigned len; + + Assert(insize == 0, "inbuf not empty"); + + len = in_memsize - isize; /* number of bytes left to compress */ + if (size < len) + len = size; /* only copy the requested number of bytes */ + + memcpy(buf, in_memptr + isize, len); +/* + len = read(ifd, buf, size); + if (len == (unsigned)(-1) || len == 0) return (int)len; +*/ + crc_value = updcrc((uch*)buf, len); + isize += (ulg)len; + return (int)len; +} + +/* =========================================================================== + * Write the output buffer outbuf[0..outcnt-1] and update bytes_out. + * (used for the compressed data only) + */ + +local void flush_outbuf() +{ + if (outcnt == 0) return; + + write_buf((char *)outbuf, outcnt); + bytes_out += (ulg)outcnt; + outcnt = 0; +} + + + +/* =========================================================================== + * Write the output window window[0..outcnt-1] and update crc and bytes_out. + * (Used for the decompressed data only.) + */ +local void flush_window() +{ + if (exit_code != OK) return; + + if (outcnt == 0) return; + updcrc(window, outcnt); + + write_buf((char *)window, outcnt); + + bytes_out += (ulg)outcnt; + outcnt = 0; +} + +/* =========================================================================== + * copy buffer into memory; allocate more memory if required + */ +local void write_buf(buf, cnt) + voidp buf; + unsigned cnt; +{ + if (!realloc_fn) + { + /* append buffer to file */ + /* added 'unsigned' to get rid of compiler warning (WDP 1/1/99) */ + if ((unsigned long) fwrite(buf, 1, cnt, ofd) != cnt) + { + error + ("failed to write buffer to uncompressed output file (write_buf)"); + exit_code = ERROR; + return; + } + } + else + { + /* copy/append buffer into memory */ + + /* get more memory if current buffer is too small */ + if (bytes_out + cnt > *memsize) + { + *memptr = realloc_fn(*memptr, bytes_out + cnt); + *memsize = bytes_out + cnt; /* new memory buffer size */ + } + + if (!(*memptr)) + { + error("malloc failed while uncompressing (write_buf)"); + exit_code = ERROR; + return; + } + + /* copy into memory buffer */ + memcpy((char *) *memptr + bytes_out, (char *) buf, cnt); + } +} + +/* ======================================================================== + * Error handlers. + */ + +local void error(m) + char *m; +{ + ffpmsg(ifname); + ffpmsg(m); +} +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by makecrc.c) + */ +ulg crc_32_tab[] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; + + +/* ******************************************** */ +/* ** the following code came from unlzh.c **** */ +/* ******************************************** */ + + +#define DICBIT 13 /* 12(-lh4-) or 13(-lh5-) */ +#define DICSIZ ((unsigned) 1 << DICBIT) + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +#ifndef UCHAR_MAX +# define UCHAR_MAX 255 +#endif + +#define BITBUFSIZ (CHAR_BIT * 2 * sizeof(char)) +/* Do not use CHAR_BIT * sizeof(bitbuf), does not work on machines + * for which short is not on 16 bits (Cray). + */ + +/* encode.c and decode.c */ + +#define MAXMATCH 256 /* formerly F (not more than UCHAR_MAX + 1) */ +#define THRESHOLD 3 /* choose optimal value */ + +/* huf.c */ + +#define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) + /* alphabet = {0, 1, 2, ..., NC - 1} */ +#define CBIT 9 /* $\lfloor \log_2 NC \rfloor + 1$ */ +#define CODE_BIT 16 /* codeword length */ + +#define NP (DICBIT + 1) +#define NT (CODE_BIT + 3) +#define PBIT 4 /* smallest integer such that (1U << PBIT) > NP */ +#define TBIT 5 /* smallest integer such that (1U << TBIT) > NT */ +#if NT > NP +# define NPT NT +#else +# define NPT NP +#endif + +/* local ush left[2 * NC - 1]; */ +/* local ush right[2 * NC - 1]; */ +#define left prev +#define right head +#if NC > (1<<(BITS-2)) + error cannot overlay left+right and prev +#endif + +/* local uch c_len[NC]; */ +#define c_len outbuf +#if NC > OUTBUFSIZ + error cannot overlay c_len and outbuf +#endif + +local uch pt_len[NPT]; +local unsigned blocksize; +local ush pt_table[256]; + +/* local ush c_table[4096]; */ +#define c_table d_buf +#if (DIST_BUFSIZE-1) < 4095 + error cannot overlay c_table and d_buf +#endif + +/*********************************************************** + io.c -- input/output +***********************************************************/ + +local ush bitbuf; +local unsigned subbitbuf; +local int bitcount; + +local void fillbuf(n) /* Shift bitbuf n bits left, read n bits */ + int n; +{ + bitbuf <<= n; + while (n > bitcount) { + bitbuf |= subbitbuf << (n -= bitcount); + subbitbuf = (unsigned)try_byte(); + if ((int)subbitbuf == EOF) subbitbuf = 0; + bitcount = CHAR_BIT; + } + bitbuf |= subbitbuf >> (bitcount -= n); +} + +local unsigned getbits(n) + int n; +{ + unsigned x; + + x = bitbuf >> (BITBUFSIZ - n); fillbuf(n); + return x; +} + +local void init_getbits() +{ + bitbuf = 0; subbitbuf = 0; bitcount = 0; + fillbuf(BITBUFSIZ); +} + +/*********************************************************** + maketbl.c -- make table for decoding +***********************************************************/ + +local void make_table(nchar, bitlen, tablebits, table) + int nchar; + uch bitlen[]; + int tablebits; + ush table[]; +{ + ush count[17], weight[17], start[18], *p; + unsigned i, k, len, ch, jutbits, avail, nextcode, mask; + + for (i = 1; i <= 16; i++) count[i] = 0; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + for (i = 0; i < (unsigned)nchar; i++) count[bitlen[i]]++; +*/ + for (i = 0; i < (unsigned)nchar; i++) { + if (bitlen[i] > 16) + error("Bad table (case a)\n"); + else count[bitlen[i]]++; + } + + start[1] = 0; + for (i = 1; i <= 16; i++) + start[i + 1] = start[i] + (count[i] << (16 - i)); + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + if ((start[17] & 0xffff) != 0) + { + error("Bad table\n"); +*/ + if ((start[17] & 0xffff) != 0 || tablebits > 16) /* 16 for weight below */ + { + error("Bad table (case b)\n"); + + exit_code = ERROR; + return; + } + + jutbits = 16 - tablebits; + for (i = 1; i <= (unsigned)tablebits; i++) { + start[i] >>= jutbits; + weight[i] = (unsigned) 1 << (tablebits - i); + } + while (i <= 16) { + weight[i] = (unsigned) 1 << (16 - i); + i++; + } + + i = start[tablebits + 1] >> jutbits; + if (i != 0) { + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + k = 1 << tablebits; + while (i != k) table[i++] = 0; +*/ + + k = MINZIP(1 << tablebits, DIST_BUFSIZE); + while (i < k) table[i++] = 0; + } + + avail = nchar; + mask = (unsigned) 1 << (15 - tablebits); + for (ch = 0; ch < (unsigned)nchar; ch++) { + if ((len = bitlen[ch]) == 0) continue; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + nextcode = start[len] + weight[len]; +*/ + nextcode = MINZIP(start[len] + weight[len], DIST_BUFSIZE); + + if (len <= (unsigned)tablebits) { + for (i = start[len]; i < nextcode; i++) table[i] = ch; + } else { + k = start[len]; + p = &table[k >> jutbits]; + i = len - tablebits; + while (i != 0) { + if (*p == 0) { + right[avail] = left[avail] = 0; + *p = avail++; + } + if (k & mask) p = &right[*p]; + else p = &left[*p]; + k <<= 1; i--; + } + *p = ch; + } + start[len] = nextcode; + } +} + +/*********************************************************** + huf.c -- static Huffman +***********************************************************/ + +local void read_pt_len(nn, nbit, i_special) + int nn; + int nbit; + int i_special; +{ + int i, c, n; + unsigned mask; + + n = getbits(nbit); + if (n == 0) { + c = getbits(nbit); + for (i = 0; i < nn; i++) pt_len[i] = 0; + for (i = 0; i < 256; i++) pt_table[i] = c; + } else { + i = 0; + + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + while (i < n) { +*/ + while (i < MINZIP(n,NPT)) { + + c = bitbuf >> (BITBUFSIZ - 3); + if (c == 7) { + mask = (unsigned) 1 << (BITBUFSIZ - 1 - 3); + while (mask & bitbuf) { mask >>= 1; c++; } + } + fillbuf((c < 7) ? 3 : c - 3); + pt_len[i++] = c; + if (i == i_special) { + c = getbits(2); + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + while (--c >= 0) pt_len[i++] = 0; +*/ + while (--c >= 0 && i < NPT) pt_len[i++] = 0; + + } + } + while (i < nn) pt_len[i++] = 0; + make_table(nn, pt_len, 8, pt_table); + } +} + +local void read_c_len() +{ + int i, c, n; + unsigned mask; + + n = getbits(CBIT); + if (n == 0) { + c = getbits(CBIT); + for (i = 0; i < NC; i++) c_len[i] = 0; + for (i = 0; i < 4096; i++) c_table[i] = c; + } else { + i = 0; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + while (i < n) { +*/ + while (i < MINZIP(n,NC)) { + + c = pt_table[bitbuf >> (BITBUFSIZ - 8)]; + if (c >= NT) { + mask = (unsigned) 1 << (BITBUFSIZ - 1 - 8); + do { + if (bitbuf & mask) c = right[c]; + else c = left [c]; + mask >>= 1; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + } while (c >= NT); +*/ + } while (c >= NT && (mask || c != left[c])); + + } + fillbuf((int) pt_len[c]); + if (c <= 2) { + if (c == 0) c = 1; + else if (c == 1) c = getbits(4) + 3; + else c = getbits(CBIT) + 20; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + while (--c >= 0) c_len[i++] = 0; +*/ + while (--c >= 0 && i < NC) c_len[i++] = 0; + + + } else c_len[i++] = c - 2; + } + while (i < NC) c_len[i++] = 0; + make_table(NC, c_len, 12, c_table); + } +} + +local unsigned decode_c() +{ + unsigned j = 0, mask; + + if (blocksize == 0) { + blocksize = getbits(16); + if (blocksize == 0) { + return NC; /* end of file */ + } + read_pt_len(NT, TBIT, 3); + if (exit_code != OK) + return j; + + read_c_len(); + if (exit_code != OK) + return j; + + read_pt_len(NP, PBIT, -1); + if (exit_code != OK) + return j; + + } + blocksize--; + j = c_table[bitbuf >> (BITBUFSIZ - 12)]; + if (j >= NC) { + mask = (unsigned) 1 << (BITBUFSIZ - 1 - 12); + do { + if (bitbuf & mask) j = right[j]; + else j = left [j]; + mask >>= 1; + + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + } while (j >= NC); +*/ + } while (j >= NC && (mask || j != left[j])); + + } + fillbuf((int) c_len[j]); + return j; +} + +local unsigned decode_p() +{ + unsigned j, mask; + + j = pt_table[bitbuf >> (BITBUFSIZ - 8)]; + if (j >= NP) { + mask = (unsigned) 1 << (BITBUFSIZ - 1 - 8); + do { + if (bitbuf & mask) j = right[j]; + else j = left [j]; + mask >>= 1; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + } while (j >= NP); +*/ + } while (j >= NP && (mask || j != left[j])); + + } + fillbuf((int) pt_len[j]); + if (j != 0) j = ((unsigned) 1 << (j - 1)) + getbits((int) (j - 1)); + return j; +} + +local void huf_decode_start() +{ + init_getbits(); blocksize = 0; +} + +/*********************************************************** + decode.c +***********************************************************/ +/* changed 'j' to 'jj1' to avoid conflicts - WDP 1/1/99) */ + +local int jj1; /* remaining bytes to copy */ +local int done; /* set at end of input */ + +local void decode_start() +{ + huf_decode_start(); + jj1 = 0; + done = 0; +} + +/* Decode the input and return the number of decoded bytes put in buffer + */ +local unsigned decode(count, buffer) + unsigned count; + uch buffer[]; + /* The calling function must keep the number of + bytes to be processed. This function decodes + either 'count' bytes or 'DICSIZ' bytes, whichever + is smaller, into the array 'buffer[]' of size + 'DICSIZ' or more. + Call decode_start() once for each new file + before calling this function. + */ +{ + local unsigned i; + unsigned r, c; + + r = 0; + while (--jj1 >= 0) { + buffer[r] = buffer[i]; + i = (i + 1) & (DICSIZ - 1); + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + if (++r == count) return r; +*/ + if (++r >= count) return r; + + } + for ( ; ; ) { + c = decode_c(); + if (exit_code != OK) + return r; + + if (c == NC) { + done = 1; + return r; + } + if (c <= UCHAR_MAX) { + buffer[r] = c; + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + if (++r == count) return r; +*/ + if (++r >= count) return r; + + } else { + jj1 = c - (UCHAR_MAX + 1 - THRESHOLD); + i = (r - decode_p() - 1) & (DICSIZ - 1); + while (--jj1 >= 0) { + buffer[r] = buffer[i]; + i = (i + 1) & (DICSIZ - 1); + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + if (++r == count) return r; +*/ + if (++r >= count) return r; + + } + } + } +} + + +/* =========================================================================== + * Unlzh in to out. Return OK or ERROR. + */ +local int unlzh(in, out) + FILE *in; + FILE *out; +{ + unsigned n; + ifd = in; + ofd = out; + + decode_start(); + while (!done) { + n = decode((unsigned) DICSIZ, window); + if (exit_code != OK) + return ERROR; + + if (n > 0) { + write_buf((char*)window, n); + } + } + return OK; +} + +/*=========================================================================*/ +/* this marks the begining of the original file 'unlzw.c' */ +/*=========================================================================*/ + +/* unlzw.c -- decompress files in LZW format. + * The code in this file is directly derived from the public domain 'compress' + * written by Spencer Thomas, Joe Orost, James Woods, Jim McKie, Steve Davies, + * Ken Turkowski, Dave Mack and Peter Jannesen. + * + * This is a temporary version which will be rewritten in some future version + * to accommodate in-memory decompression. + */ + + +typedef unsigned char char_type; +typedef long code_int; +typedef unsigned long count_int; +typedef unsigned short count_short; +typedef unsigned long cmp_code_int; + +#define MAXCODE(n) (1L << (n)) + +#ifndef REGISTERS +# define REGISTERS 2 +#endif +#define REG1 +#define REG2 +#define REG3 +#define REG4 +#define REG5 +#define REG6 +#define REG7 +#define REG8 +#define REG9 +#define REG10 +#define REG11 +#define REG12 +#define REG13 +#define REG14 +#define REG15 +#define REG16 +#if REGISTERS >= 1 +# undef REG1 +# define REG1 register +#endif +#if REGISTERS >= 2 +# undef REG2 +# define REG2 register +#endif +#if REGISTERS >= 3 +# undef REG3 +# define REG3 register +#endif +#if REGISTERS >= 4 +# undef REG4 +# define REG4 register +#endif +#if REGISTERS >= 5 +# undef REG5 +# define REG5 register +#endif +#if REGISTERS >= 6 +# undef REG6 +# define REG6 register +#endif +#if REGISTERS >= 7 +# undef REG7 +# define REG7 register +#endif +#if REGISTERS >= 8 +# undef REG8 +# define REG8 register +#endif +#if REGISTERS >= 9 +# undef REG9 +# define REG9 register +#endif +#if REGISTERS >= 10 +# undef REG10 +# define REG10 register +#endif +#if REGISTERS >= 11 +# undef REG11 +# define REG11 register +#endif +#if REGISTERS >= 12 +# undef REG12 +# define REG12 register +#endif +#if REGISTERS >= 13 +# undef REG13 +# define REG13 register +#endif +#if REGISTERS >= 14 +# undef REG14 +# define REG14 register +#endif +#if REGISTERS >= 15 +# undef REG15 +# define REG15 register +#endif +#if REGISTERS >= 16 +# undef REG16 +# define REG16 register +#endif + +#ifndef BYTEORDER +# define BYTEORDER 0000 +#endif + +#ifndef NOALLIGN +# define NOALLIGN 0 +#endif + + +union bytes { + long word; + struct { +#if BYTEORDER == 4321 + char_type b1; + char_type b2; + char_type b3; + char_type b4; +#else +#if BYTEORDER == 1234 + char_type b4; + char_type b3; + char_type b2; + char_type b1; +#else +# undef BYTEORDER + int dummy; +#endif +#endif + } bytes; +}; + +#if BYTEORDER == 4321 && NOALLIGN == 1 +# define input(b,o,c,n,m){ \ + (c) = (*(long *)(&(b)[(o)>>3])>>((o)&0x7))&(m); \ + (o) += (n); \ + } +#else +# define input(b,o,c,n,m){ \ + REG1 char_type *p = &(b)[(o)>>3]; \ + (c) = ((((long)(p[0]))|((long)(p[1])<<8)| \ + ((long)(p[2])<<16))>>((o)&0x7))&(m); \ + (o) += (n); \ + } +#endif + +#ifndef MAXSEG_64K + /* DECLARE(ush, tab_prefix, (1<>1] +# define clear_tab_prefixof() \ + memzero(tab_prefix0, 128), \ + memzero(tab_prefix1, 128); +#endif +#define de_stack ((char_type *)(&d_buf[DIST_BUFSIZE-1])) +#define tab_suffixof(i) tab_suffix[i] + +int block_mode = BLOCK_MODE; /* block compress mode -C compatible with 2.0 */ + +/* ============================================================================ + * Decompress in to out. This routine adapts to the codes in the + * file building the "string" table on-the-fly; requiring no table to + * be stored in the compressed file. + * IN assertions: the buffer inbuf contains already the beginning of + * the compressed data, from offsets iptr to insize-1 included. + * The magic header has already been checked and skipped. + * bytes_in and bytes_out have been initialized. + */ +local int unlzw(in, out) + FILE *in, *out; /* input and output file descriptors */ +{ + REG2 char_type *stackp; + REG3 code_int code; + REG4 int finchar; + REG5 code_int oldcode; + REG6 code_int incode; + REG7 long inbits; + REG8 long posbits; + REG9 int outpos; +/* REG10 int insize; (global) */ + REG11 unsigned bitmask; + REG12 code_int free_ent; + REG13 code_int maxcode; + REG14 code_int maxmaxcode; + REG15 int n_bits; + REG16 int rsize; + + ofd = out; + +#ifdef MAXSEG_64K + tab_prefix[0] = tab_prefix0; + tab_prefix[1] = tab_prefix1; +#endif + maxbits = get_byte(); + block_mode = maxbits & BLOCK_MODE; + if ((maxbits & LZW_RESERVED) != 0) { + error( "warning, unknown flags in unlzw decompression"); + } + maxbits &= BIT_MASK; + maxmaxcode = MAXCODE(maxbits); + + if (maxbits > BITS) { + error("compressed with too many bits; cannot handle file"); + exit_code = ERROR; + return ERROR; + } + rsize = insize; + maxcode = MAXCODE(n_bits = INIT_BITS)-1; + bitmask = (1<= 0 ; --code) { + tab_suffixof(code) = (char_type)code; + } + do { + REG1 int i; + int e; + int o; + + resetbuf: + e = insize-(o = (posbits>>3)); + + for (i = 0 ; i < e ; ++i) { + inbuf[i] = inbuf[i+o]; + } + insize = e; + posbits = 0; + + if (insize < INBUF_EXTRA) { +/* modified to use fread instead of read - WDP 10/22/97 */ +/* if ((rsize = read(in, (char*)inbuf+insize, INBUFSIZ)) == EOF) { */ + + if ((rsize = fread((char*)inbuf+insize, 1, INBUFSIZ, in)) == EOF) { + error("unexpected end of file"); + exit_code = ERROR; + return ERROR; + } + insize += rsize; + bytes_in += (ulg)rsize; + } + inbits = ((rsize != 0) ? ((long)insize - insize%n_bits)<<3 : + ((long)insize<<3)-(n_bits-1)); + + while (inbits > posbits) { + if (free_ent > maxcode) { + posbits = ((posbits-1) + + ((n_bits<<3)-(posbits-1+(n_bits<<3))%(n_bits<<3))); + ++n_bits; + if (n_bits == maxbits) { + maxcode = maxmaxcode; + } else { + maxcode = MAXCODE(n_bits)-1; + } + bitmask = (1<= 256) { + error("corrupt input."); + exit_code = ERROR; + return ERROR; + } + + outbuf[outpos++] = (char_type)(finchar = (int)(oldcode=code)); + continue; + } + if (code == CLEAR && block_mode) { + clear_tab_prefixof(); + free_ent = FIRST - 1; + posbits = ((posbits-1) + + ((n_bits<<3)-(posbits-1+(n_bits<<3))%(n_bits<<3))); + maxcode = MAXCODE(n_bits = INIT_BITS)-1; + bitmask = (1<= free_ent) { /* Special case for KwKwK string. */ + if (code > free_ent) { + if (outpos > 0) { + write_buf((char*)outbuf, outpos); + bytes_out += (ulg)outpos; + } + error("corrupt input."); + exit_code = ERROR; + return ERROR; + + } + *--stackp = (char_type)finchar; + code = oldcode; + } + + while ((cmp_code_int)code >= (cmp_code_int)256) { + /* Generate output characters in reverse order */ + *--stackp = tab_suffixof(code); + code = tab_prefixof(code); + } + *--stackp = (char_type)(finchar = tab_suffixof(code)); + + /* And put them out in forward order */ + { + /* REG1 int i; already defined above (WDP) */ + + if (outpos+(i = (de_stack-stackp)) >= OUTBUFSIZ) { + do { + if (i > OUTBUFSIZ-outpos) i = OUTBUFSIZ-outpos; + + if (i > 0) { + memcpy(outbuf+outpos, stackp, i); + outpos += i; + } + if (outpos >= OUTBUFSIZ) { + write_buf((char*)outbuf, outpos); + bytes_out += (ulg)outpos; + outpos = 0; + } + stackp+= i; + } while ((i = (de_stack-stackp)) > 0); + } else { + memcpy(outbuf+outpos, stackp, i); + outpos += i; + } + } + + if ((code = free_ent) < maxmaxcode) { /* Generate the new entry. */ + + tab_prefixof(code) = (unsigned short)oldcode; + tab_suffixof(code) = (char_type)finchar; + free_ent = code+1; + } + oldcode = incode; /* Remember previous code. */ + } + } while (rsize != 0); + + if (outpos > 0) { + write_buf((char*)outbuf, outpos); + bytes_out += (ulg)outpos; + } + return OK; +} + +/*=========================================================================*/ +/* This marks the beginning of the original file 'unpack.c' */ +/*=========================================================================*/ + +/* unpack.c -- decompress files in pack format. + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + */ + +#define MIN(a,b) ((a) <= (b) ? (a) : (b)) +/* The arguments must not have side effects. */ + +#define MAX_BITLEN 25 +/* Maximum length of Huffman codes. (Minor modifications to the code + * would be needed to support 32 bits codes, but pack never generates + * more than 24 bits anyway.) + */ + +#define LITERALS 256 +/* Number of literals, excluding the End of Block (EOB) code */ + +#define MAX_PEEK 12 +/* Maximum number of 'peek' bits used to optimize traversal of the + * Huffman tree. + */ + +local ulg orig_len; /* original uncompressed length */ +local int max_len; /* maximum bit length of Huffman codes */ + +local uch literal[LITERALS]; +/* The literal bytes present in the Huffman tree. The EOB code is not + * represented. + */ + +local int lit_base[MAX_BITLEN+1]; +/* All literals of a given bit length are contiguous in literal[] and + * have contiguous codes. literal[code+lit_base[len]] is the literal + * for a code of len bits. + */ + +local int leaves [MAX_BITLEN+1]; /* Number of leaves for each bit length */ +local int parents[MAX_BITLEN+1]; /* Number of parents for each bit length */ + +local int peek_bits; /* Number of peek bits currently used */ + +/* local uch prefix_len[1 << MAX_PEEK]; */ +#define prefix_len outbuf +/* For each bit pattern b of peek_bits bits, prefix_len[b] is the length + * of the Huffman code starting with a prefix of b (upper bits), or 0 + * if all codes of prefix b have more than peek_bits bits. It is not + * necessary to have a huge table (large MAX_PEEK) because most of the + * codes encountered in the input stream are short codes (by construction). + * So for most codes a single lookup will be necessary. + */ +#if (1< OUTBUFSIZ + error cannot overlay prefix_len and outbuf +#endif + +local ulg bitbufulg; + +/* Bits are added on the low part of bitbufulg and read from the high part. */ + +local int valid; /* number of valid bits in bitbufulg */ +/* all bits above the last valid bit are always zero */ + +/* Set code to the next 'bits' input bits without skipping them. code + * must be the name of a simple variable and bits must not have side effects. + * IN assertions: bits <= 25 (so that we still have room for an extra byte + * when valid is only 24), and mask = (1<> (valid-(bits))) & (mask); \ +} + +/* Skip the given number of bits (after having peeked at them): */ +#define skip_bits(bits) (valid -= (bits)) + +#define clear_bitbuf() (valid = 0, bitbufulg = 0) + +/* =========================================================================== + * Read the Huffman tree. + */ +local void read_tree() +{ + int len; /* bit length */ + int base; /* base offset for a sequence of leaves */ + int n; + + /* Read the original input size, MSB first */ + orig_len = 0; + for (n = 1; n <= 4; n++) orig_len = (orig_len << 8) | (ulg)get_byte(); + + max_len = (int)get_byte(); /* maximum bit length of Huffman codes */ + if (max_len > MAX_BITLEN) { + error("invalid compressed data -- Huffman code > 32 bits"); + } + + /* Get the number of leaves at each bit length */ + n = 0; + for (len = 1; len <= max_len; len++) { + leaves[len] = (int)get_byte(); + n += leaves[len]; + } + if (n > LITERALS) { + error("too many leaves in Huffman tree"); + } + Trace((stderr, "orig_len %ld, max_len %d, leaves %d\n", + orig_len, max_len, n)); + /* There are at least 2 and at most 256 leaves of length max_len. + * (Pack arbitrarily rejects empty files and files consisting of + * a single byte even repeated.) To fit the last leaf count in a + * byte, it is offset by 2. However, the last literal is the EOB + * code, and is not transmitted explicitly in the tree, so we must + * adjust here by one only. + */ + leaves[max_len]++; + + /* Now read the leaves themselves */ + base = 0; + for (len = 1; len <= max_len; len++) { + /* Remember where the literals of this length start in literal[] : */ + lit_base[len] = base; + /* And read the literals: */ + +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + for (n = leaves[len]; n > 0; n--) { +*/ + for (n = leaves[len]; n > 0 && base < LITERALS; n--) { + + literal[base++] = (uch)get_byte(); + } + } + leaves[max_len]++; /* Now include the EOB code in the Huffman tree */ +} + +/* =========================================================================== + * Build the Huffman tree and the prefix table. + */ +local void build_tree_unpack() +{ + int nodes = 0; /* number of nodes (parents+leaves) at current bit length */ + int len; /* current bit length */ + uch *prefixp; /* pointer in prefix_len */ + + for (len = max_len; len >= 1; len--) { + /* The number of parent nodes at this level is half the total + * number of nodes at parent level: + */ + nodes >>= 1; + parents[len] = nodes; + /* Update lit_base by the appropriate bias to skip the parent nodes + * (which are not represented in the literal array): + */ + lit_base[len] -= nodes; + /* Restore nodes to be parents+leaves: */ + nodes += leaves[len]; + } + /* Construct the prefix table, from shortest leaves to longest ones. + * The shortest code is all ones, so we start at the end of the table. + */ + peek_bits = MIN(max_len, MAX_PEEK); + prefixp = &prefix_len[1< prefix_len) *--prefixp = (uch)len; + + } + /* The length of all other codes is unknown: */ + while (prefixp > prefix_len) *--prefixp = 0; +} + +/* =========================================================================== + * Unpack in to out. This routine does not support the old pack format + * with magic header \037\037. + * + * IN assertions: the buffer inbuf contains already the beginning of + * the compressed data, from offsets inptr to insize-1 included. + * The magic header has already been checked. The output buffer is cleared. + */ +local int unpack(in, out) + FILE *in, *out; /* input and output file descriptors */ +{ + int len; /* Bit length of current code */ + unsigned eob; /* End Of Block code */ + register unsigned peek; /* lookahead bits */ + unsigned peek_mask; /* Mask for peek_bits bits */ + + ifd = in; + ofd = out; + + read_tree(); /* Read the Huffman tree */ + build_tree_unpack(); /* Build the prefix table */ + clear_bitbuf(); /* Initialize bit input */ + peek_mask = (1< 0) { + peek >>= peek_bits - len; /* discard the extra bits */ + } else { + /* Code of more than peek_bits bits, we must traverse the tree */ + ulg mask = peek_mask; + len = peek_bits; + do { + len++, mask = (mask<<1)+1; + look_bits(peek, len, mask); + } while (peek < (unsigned)parents[len]); + /* loop as long as peek is a parent node */ + } + /* At this point, peek is the next complete code, of len bits */ + if (peek == eob && len == max_len) break; /* end of file? */ + put_ubyte(literal[peek+lit_base[len]]); + Tracev((stderr,"%02d %04x %c\n", len, peek, + literal[peek+lit_base[len]])); + skip_bits(len); + } /* for (;;) */ + + flush_window(); + Trace((stderr, "bytes_out %ld\n", bytes_out)); + if (orig_len != (ulg)bytes_out) { + error("invalid compressed data--length error"); + return ERROR; + } + return OK; +} +/*=======================================================================*/ +/* This marks the beginning of the original file 'unzip.c' */ +/*=======================================================================*/ + +/* unzip.c -- decompress files in gzip or pkzip format. + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + * + * The code in this file is derived from the file funzip.c written + * and put in the public domain by Mark Adler. + */ + +/* + This version can extract files in gzip or pkzip format. + For the latter, only the first entry is extracted, and it has to be + either deflated or stored. + */ + +/* PKZIP header definitions */ +#define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */ +#define LOCFLG 6 /* offset of bit flag */ +#define CRPFLG 1 /* bit for encrypted entry */ +#define EXTFLG 8 /* bit for extended local header */ +#define LOCHOW 8 /* offset of compression method */ +#define LOCTIM 10 /* file mod time (for decryption) */ +#define LOCCRC 14 /* offset of crc */ +#define LOCSIZ 18 /* offset of compressed size */ +#define LOCLEN 22 /* offset of uncompressed length */ +#define LOCFIL 26 /* offset of file name field length */ +#define LOCEXT 28 /* offset of extra field length */ +#define LOCHDR 30 /* size of local header, including sig */ +#define EXTHDR 16 /* size of extended local header, inc sig */ + + +/* Globals */ +/* added 'static' to the following 4 lines - WDP (1/1/99) */ + +static int decrypt; /* flag to turn on decryption */ +/* static char *key; */ /* not used--needed to link crypt.c */ +static int pkzip = 0; /* set for a pkzip file */ +static int ext_header = 0; /* set if extended local header */ + +/* =========================================================================== + * Check zip file and advance inptr to the start of the compressed data. + * Get ofname from the local header if necessary. + */ +local int check_zipfile(in) + FILE *in; /* input file descriptors */ +{ + uch *h = inbuf + inptr; /* first local header */ + + ifd = in; + + /* Check validity of local header, and skip name and extra fields */ + inptr += LOCHDR + SH(h + LOCFIL) + SH(h + LOCEXT); + + if (inptr > insize || LG(h) != LOCSIG) { + error("not a valid zip file"); + exit_code = ERROR; + return ERROR; + } + method = h[LOCHOW]; + if (method != STORED && method != DEFLATED) { + error("first entry not deflated or stored -- use unzip"); + exit_code = ERROR; + return ERROR; + } + + /* If entry encrypted, decrypt and validate encryption header */ + if ((decrypt = h[LOCFLG] & CRPFLG) != 0) { + error("encrypted file -- use unzip"); + exit_code = ERROR; + return ERROR; + } + + /* Save flags for unzip() */ + ext_header = (h[LOCFLG] & EXTFLG) != 0; + pkzip = 1; + + /* Get ofname and time stamp from local header (to be done) */ + return OK; +} + +/* =========================================================================== + * Unzip in to out. This routine works on both gzip and pkzip files. + * + * IN assertions: the buffer inbuf contains already the beginning of + * the compressed data, from offsets inptr to insize-1 included. + * The magic header has already been checked. The output buffer is cleared. + */ +local int unzip(in, out) + FILE *in, *out; /* input and output file descriptors */ +{ + ulg orig_crc = 0; /* original crc */ + +/* orig_len has already been defined statically before */ +/* ulg orig_len = 0; */ /* original uncompressed length */ + + int n; + uch buf[EXTHDR]; /* extended local header */ + + ifd = in; + ofd = out; + + updcrc(NULL, 0); /* initialize crc */ + + if (pkzip && !ext_header) { /* crc and length at the end otherwise */ + orig_crc = LG(inbuf + LOCCRC); + orig_len = LG(inbuf + LOCLEN); + } + + /* Decompress */ + if (method == DEFLATED) { + + int res = inflate(); + + if (res == 3) { + error("out of memory"); + return ERROR; + } else if (res != 0) { + error("invalid compressed data--format violated"); + return ERROR; + } + + } else if (pkzip && method == STORED) { + + /* 'nn' here was originally declared 'n' which conflicts with the */ + /* previous local declaration of 'n'. It was changed to 'nn' on 1/4/99 */ + register ulg nn = LG(inbuf + LOCLEN); + + if (nn != LG(inbuf + LOCSIZ) - (decrypt ? 12 : 0)) { + error("invalid compressed data--length mismatch"); + return ERROR; + } + while (nn--) { + uch c = (uch)get_byte(); +#ifdef CRYPT + if (decrypt) zdecode(c); +#endif + put_ubyte(c); + } + flush_window(); + } else { + error("internal error, invalid method"); + return ERROR; + } + + /* Get the crc and original length */ + if (!pkzip) { + /* crc32 (see algorithm.doc) + * uncompressed input size modulo 2^32 + */ + for (n = 0; n < 8; n++) { + buf[n] = (uch)get_byte(); /* may cause an error if EOF */ + } + orig_crc = LG(buf); + orig_len = LG(buf+4); + + } else if (ext_header) { /* If extended header, check it */ + /* signature - 4bytes: 0x50 0x4b 0x07 0x08 + * CRC-32 value + * compressed size 4-bytes + * uncompressed size 4-bytes + */ + for (n = 0; n < EXTHDR; n++) { + buf[n] = (uch)get_byte(); /* may cause an error if EOF */ + } + orig_crc = LG(buf+4); + orig_len = LG(buf+12); + } + + /* Validate decompression */ + if (orig_crc != updcrc(outbuf, 0)) { + error("invalid compressed data--crc error"); + return ERROR; + } + if (orig_len != (ulg)bytes_out) { + error("invalid compressed data--length error"); + return ERROR; + } + + /* Check if there are more entries in a pkzip file */ + if (pkzip && inptr + 4 < insize && LG(inbuf+inptr) == LOCSIG) { + /* Don't destroy the input zip file */ + error("file has more than one entry -- unchanged"); + exit_code = ERROR; + ext_header = pkzip = 0; + return ERROR; + } + ext_header = pkzip = 0; /* for next file */ + return OK; +} + +/*======================================================================*/ +/* This marks the start of the code originally in the file 'inflate.c' */ +/*======================================================================*/ + +/* inflate.c -- Not copyrighted 1992 by Mark Adler + version c10p1, 10 January 1993 */ + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + [The history has been moved to the file ChangeLog.] + */ + +/* + Inflate deflated (PKZIP's method 8 compressed) data. The compression + method searches for as much of the current string of bytes (up to a + length of 258) in the previous 32K bytes. If it doesn't find any + matches (of at least length 3), it codes the next byte. Otherwise, it + codes the length of the matched string and its distance backwards from + the current position. There is a single Huffman code that codes both + single bytes (called "literals") and match lengths. A second Huffman + code codes the distance information, which follows a length code. Each + length or distance code actually represents a base value and a number + of "extra" (sometimes zero) bits to get to add to the base value. At + the end of each deflated block is a special end-of-block (EOB) literal/ + length code. The decoding process is basically: get a literal/length + code; if EOB then done; if a literal, emit the decoded byte; if a + length then get the distance and emit the referred-to bytes from the + sliding window of previously emitted data. + + There are (currently) three kinds of inflate blocks: stored, fixed, and + dynamic. The compressor deals with some chunk of data at a time, and + decides which method to use on a chunk-by-chunk basis. A chunk might + typically be 32K or 64K. If the chunk is uncompressible, then the + "stored" method is used. In this case, the bytes are simply stored as + is, eight bits per byte, with none of the above coding. The bytes are + preceded by a count, since there is no longer an EOB code. + + If the data is compressible, then either the fixed or dynamic methods + are used. In the dynamic method, the compressed data is preceded by + an encoding of the literal/length and distance Huffman codes that are + to be used to decode this block. The representation is itself Huffman + coded, and so is preceded by a description of that code. These code + descriptions take up a little space, and so for small blocks, there is + a predefined set of codes, called the fixed codes. The fixed method is + used if the block codes up smaller that way (usually for quite small + chunks), otherwise the dynamic method is used. In the latter case, the + codes are customized to the probabilities in the current block, and so + can code it much better than the pre-determined fixed codes. + + The Huffman codes themselves are decoded using a mutli-level table + lookup, in order to maximize the speed of decoding plus the speed of + building the decoding tables. See the comments below that precede the + lbits and dbits tuning parameters. + */ + +#define slide window + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). + Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16 + means that v is a literal, 16 < e < 32 means that v is a pointer to + the next table, which codes e - 16 bits, and lastly e == 99 indicates + an unused code. If a code with e == 99 is looked up, this implies an + error in the data. */ + +/* The inflate algorithm uses a sliding 32K byte window on the uncompressed + stream to find repeated byte strings. This is implemented here as a + circular buffer. The index is updated simply by incrementing and then + and'ing with 0x7fff (32K-1). */ +/* It is left to other modules to supply the 32K area. It is assumed + to be usable as if it were declared "uch slide[32768];" or as just + "uch *slide;" and then malloc'ed in the latter case. The definition + must be in unzip.h, included above. */ +/* unsigned wp; current position in slide */ +#define wp outcnt +#define flush_output(w) (wp=(w),flush_window()) + +/* Tables for deflate from PKZIP's appnote.txt. */ +static unsigned border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +static ush cplens[] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* note: see note #13 above about the 258 in this list. */ +static ush cplext[] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ +static ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +static ush cpdext[] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed, and are initialized at the beginning of a + routine that uses these macros from a global bit buffer and count. + + If we assume that EOB will be the longest code, then we will never + ask for bits with NEEDBITS that are beyond the end of the stream. + So, NEEDBITS should not read any more bytes than are needed to + meet the request. Then no bytes need to be "returned" to the buffer + at the end of the last block. + + However, this assumption is not true for fixed blocks--the EOB code + is 7 bits, but the other literal/length codes can be 8 or 9 bits. + (The EOB code is shorter than other codes because fixed blocks are + generally short. So, while a block always has an EOB, many other + literal/length codes have a significantly lower probability of + showing up at all.) However, by making the first table have a + lookup of seven bits, the EOB code will be found in that first + lookup, and so will not require that too many bits be pulled from + the stream. + */ + +static ulg bb; /* bit buffer */ +static unsigned bk; /* bits in bit buffer */ + +static ush mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + +#ifdef CRYPT + uch cc; +# define NEXTBYTE() \ + (decrypt ? (cc = get_byte(), zdecode(cc), cc) : get_byte()) +#else +# define NEXTBYTE() (uch)get_byte() +#endif +#define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<>=(n);k-=(n);} + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + +static int lbits = 9; /* bits in base literal/length lookup table */ +static int dbits = 6; /* bits in base distance lookup table */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ +#define BMAX 16 /* maximum bit length of any code (16 for explode) */ +#define N_MAX 288 /* maximum number of codes in any set */ + +static unsigned hufts; /* track memory usage */ + +local int huft_build(b, n, s, d, e, t, m) +unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ +unsigned n; /* number of codes (assumed <= N_MAX) */ +unsigned s; /* number of simple-valued codes (0..s-1) */ +ush *d; /* list of base values for non-simple codes */ +ush *e; /* list of extra bits for non-simple codes */ +struct huft **t; /* result: starting table */ +int *m; /* maximum lookup bits, returns actual */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return zero on success, one if + the given code set is incomplete (the tables are still built in this + case), two if the input is invalid (all zero length codes or an + oversubscribed set of lengths), and three if not enough memory. */ +{ + unsigned a; /* counter for codes of length k */ + unsigned c[BMAX+1]; /* bit length count table */ + unsigned f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register unsigned i; /* counter, current code */ + register unsigned j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + register unsigned *p; /* pointer into c[], b[], or v[] */ + register struct huft *q; /* points to current table */ + struct huft r; /* table entry for structure assignment */ + struct huft *u[BMAX]; /* table stack */ + unsigned v[N_MAX]; /* values in order of bit length */ + register int w; /* bits before this table == (l * h) */ + unsigned x[BMAX+1]; /* bit offsets, then code stack */ + unsigned *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + unsigned z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + memzero(c, sizeof(c)); + p = b; i = n; + do { + Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"), + n-i, *p)); + c[*p]++; /* assume all entries <= BMAX */ + p++; /* Can't combine with above line (Solaris bug) */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (struct huft *)NULL; + *m = 0; +/* FreeBSD-SA-06:21.gzip security patch; applied 22-09-2006 (WDP) + return 0; +*/ + return 2; + } + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((unsigned)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((unsigned)l > i) + l = i; + *m = l; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return 2; /* bad input: more codes than bits */ + if ((y -= c[i]) < 0) + return 2; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = (struct huft *)NULL; /* just to keep compilers happy */ + q = (struct huft *)NULL; /* ditto */ + z = 0; /* ditto */ + + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + + a = c[k]; + + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = (z = g - w) > (unsigned)l ? l : z; /* upper limit on table size */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + z = 1 << j; /* table entries for j-bit table */ + + /* allocate and link in new table */ + if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == + (struct huft *)NULL) + { + if (h) + huft_free(u[0]); + return 3; /* not enough memory */ + } + hufts += z + 1; /* track memory usage */ + *t = q + 1; /* link to list for huft_free() */ + *(t = &(q->v.t)) = (struct huft *)NULL; + u[h] = ++q; /* table starts after link */ + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.b = (uch)l; /* bits to dump before this table */ + r.e = (uch)(16 + j); /* bits in this table */ + r.v.t = q; /* pointer to this table */ + j = i >> (w - l); /* (get around Turbo C bug) */ + u[h-1][j] = r; /* connect to last table */ + } + } + + /* set up table entry in r */ + r.b = (uch)(k - w); + if (p >= v + n) { + r.e = 99; /* out of values--invalid code */ + } + else if (*p < s) + { + r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ + r.v.n = (ush)(*p); /* simple code is just the value */ + p++; /* one compiler does not like *p++ */ + } + else + { +/* WDP added this to prevent seg fault reading a particular currupted .gz file */ +if (*p > 1000000)return 4; + + r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ + + r.v.n = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + while ((i & ((1 << w) - 1)) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + } + } + } + + + /* Return true (1) if we were given an incomplete table */ + return y != 0 && g != 1; +} + +local int huft_free(t) +struct huft *t; /* table to free */ +/* Free the malloc'ed tables built by huft_build(), which makes a linked + list of the tables it made, with the links in a dummy first entry of + each table. */ +{ + register struct huft *p, *q; + + + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + p = t; + while (p != (struct huft *)NULL) + { + q = (--p)->v.t; + free((char*)p); + p = q; + } + return 0; +} + + +local int inflate_codes(tl, td, bl, bd) +struct huft *tl, *td; /* literal/length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* inflate (decompress) the codes in a deflated (compressed) block. + Return an error code or zero if it all goes ok. */ +{ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + register int nloop = 0; + + + /* make local copies of globals */ + b = bb; /* initialize bit buffer */ + k = bk; + w = wp; /* initialize window position */ + + /* inflate the coded data */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + for (;;) /* do until end of block */ + { + +/* +The NEEDBITS macro (which calls NEXTBYTE, which calls get_byte, which +finally calls fill_inbuf) has no way to return an error in the case of +unexpected EOF. The original gunzip program simply exits in this case, +but that is not acceptable for CFITSIO. Therefore, we will check how +many times this loop is executed and if it looks like it is in an +infinite loop then we will return with an error. +WDP - Nov 1999. +*/ + +nloop++; +if (nloop > 500000) +{ + error("'inflate_codes' is in infinite loop; corrupt compressed file??"); + return(1); +} + NEEDBITS((unsigned)bl) + if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + if (e == 16) /* then it's a literal */ + { + slide[w++] = (uch)t->v.n; + Tracevv((stderr, "%c", slide[w-1])); + if (w == WSIZE) + { + flush_output(w); + w = 0; + } + } + else /* it's an EOB or a length */ + { + /* exit if end of block */ + if (e == 15) + break; + + /* get length of block to copy */ + NEEDBITS(e) + n = t->v.n + ((unsigned)b & mask_bits[e]); + DUMPBITS(e); + + /* decode distance of block to copy */ + NEEDBITS((unsigned)bd) + if ((e = (t = td + ((unsigned)b & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + NEEDBITS(e) + d = w - t->v.n - ((unsigned)b & mask_bits[e]); + DUMPBITS(e) + Tracevv((stderr,"\\[%d,%d]", w-d, n)); + + /* do the copy */ + do { + n -= (e = (e = WSIZE - ((d &= WSIZE-1) > w ? d : w)) > n ? n : e); +#if !defined(NOMEMCPY) && !defined(DEBUG) + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(slide + w, slide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + slide[w++] = slide[d++]; + Tracevv((stderr, "%c", slide[w-1])); + } while (--e); + if (w == WSIZE) + { + flush_output(w); + w = 0; + } + } while (n); + } + } + + /* restore the globals from the locals */ + wp = w; /* restore global window pointer */ + bb = b; /* restore global bit buffer */ + bk = k; + + /* done */ + return 0; +} + +local int inflate_stored() +/* "decompress" an inflated type 0 (stored) block. */ +{ + unsigned n; /* number of bytes in block */ + unsigned w; /* current window position */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + b = bb; /* initialize bit buffer */ + k = bk; + w = wp; /* initialize window position */ + + + /* go to byte boundary */ + n = k & 7; + DUMPBITS(n); + + + /* get the length and its complement */ + NEEDBITS(16) + n = ((unsigned)b & 0xffff); + DUMPBITS(16) + NEEDBITS(16) + if (n != (unsigned)((~b) & 0xffff)) + return 1; /* error in compressed data */ + DUMPBITS(16) + + + /* read and output the compressed data */ + while (n--) + { + NEEDBITS(8) + slide[w++] = (uch)b; + if (w == WSIZE) + { + flush_output(w); + w = 0; + } + DUMPBITS(8) + } + + /* restore the globals from the locals */ + wp = w; /* restore global window pointer */ + bb = b; /* restore global bit buffer */ + bk = k; + return 0; +} + + +local int inflate_fixed() +/* decompress an inflated type 1 (fixed Huffman codes) block. We should + either replace this with a custom decoder, or at least precompute the + Huffman tables. */ +{ + int i; /* temporary variable */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned l[288]; /* length list for huft_build */ + + + /* set up literal table */ + for (i = 0; i < 144; i++) + l[i] = 8; + for (; i < 256; i++) + l[i] = 9; + for (; i < 280; i++) + l[i] = 7; + for (; i < 288; i++) /* make a complete, but wrong code set */ + l[i] = 8; + bl = 7; + if ((i = huft_build(l, 288, 257, cplens, cplext, &tl, &bl)) != 0) + return i; + + + /* set up distance table */ + for (i = 0; i < 30; i++) /* make an incomplete code set */ + l[i] = 5; + bd = 5; + if ((i = huft_build(l, 30, 0, cpdist, cpdext, &td, &bd)) > 1) + { + huft_free(tl); + return i; + } + + + /* decompress until an end-of-block code */ + if (inflate_codes(tl, td, bl, bd)) + return 1; + + + /* free the decoding tables, return */ + huft_free(tl); + huft_free(td); + return 0; +} + +local int inflate_dynamic() +/* decompress an inflated type 2 (dynamic Huffman codes) block. */ +{ + int i; /* temporary variables */ + unsigned j; + unsigned l; /* last length */ + unsigned m; /* mask for bit lengths table */ + unsigned n; /* number of lengths to get */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned nb; /* number of bit length codes */ + unsigned nl; /* number of literal/length codes */ + unsigned nd; /* number of distance codes */ +#ifdef PKZIP_BUG_WORKAROUND + unsigned ll[288+32]; /* literal/length and distance code lengths */ +#else + unsigned ll[286+30]; /* literal/length and distance code lengths */ +#endif + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + /* make local bit buffer */ + b = bb; + k = bk; + + /* read in table lengths */ + NEEDBITS(5) + nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ + DUMPBITS(5) + NEEDBITS(5) + nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ + DUMPBITS(5) + NEEDBITS(4) + nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ + DUMPBITS(4) +#ifdef PKZIP_BUG_WORKAROUND + if (nl > 288 || nd > 32) +#else + if (nl > 286 || nd > 30) +#endif + return 1; /* bad lengths */ + + + /* read in bit-length-code lengths */ + for (j = 0; j < nb; j++) + { + NEEDBITS(3) + ll[border[j]] = (unsigned)b & 7; + DUMPBITS(3) + } + for (; j < 19; j++) + ll[border[j]] = 0; + + + /* build decoding table for trees--single level, 7 bit lookup */ + bl = 7; + + if ((i = huft_build(ll, 19, 19, NULL, NULL, &tl, &bl)) != 0) + { + if (i == 1) + huft_free(tl); + return i; /* incomplete code set */ + } + + /* read in literal and distance code lengths */ + n = nl + nd; + m = mask_bits[bl]; + i = l = 0; + while ((unsigned)i < n) + { + NEEDBITS((unsigned)bl) + j = (td = tl + ((unsigned)b & m))->b; + DUMPBITS(j) + j = td->v.n; + if (j < 16) /* length of code in bits (0..15) */ + ll[i++] = l = j; /* save last length in l */ + else if (j == 16) /* repeat last length 3 to 6 times */ + { + NEEDBITS(2) + j = 3 + ((unsigned)b & 3); + DUMPBITS(2) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = l; + } + else if (j == 17) /* 3 to 10 zero length codes */ + { + NEEDBITS(3) + j = 3 + ((unsigned)b & 7); + DUMPBITS(3) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + else /* j == 18: 11 to 138 zero length codes */ + { + NEEDBITS(7) + j = 11 + ((unsigned)b & 0x7f); + DUMPBITS(7) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + } + + /* free decoding table for trees */ + huft_free(tl); + + + /* restore the global bit buffer */ + bb = b; + bk = k; + + + /* build the decoding tables for literal/length and distance codes */ + bl = lbits; + + if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) + { + if (i == 1) { + error(" incomplete literal tree in inflate_dynamic"); + huft_free(tl); + } + return i; /* incomplete code set */ + } + bd = dbits; + if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0) + { + if (i == 1) { + error(" incomplete distance tree in inflate_dynamic"); +#ifdef PKZIP_BUG_WORKAROUND + i = 0; + } +#else + huft_free(td); + } + huft_free(tl); + return i; /* incomplete code set */ +#endif + } + + /* decompress until an end-of-block code */ + if (inflate_codes(tl, td, bl, bd)) + return 1; + + + /* free the decoding tables, return */ + huft_free(tl); + huft_free(td); + return 0; +} + +local int inflate_block(e) +int *e; /* last block flag */ +/* decompress an inflated block */ +{ + unsigned t; /* block type */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + /* make local bit buffer */ + b = bb; + k = bk; + + /* read in last block bit */ + NEEDBITS(1) + *e = (int)b & 1; + DUMPBITS(1) + + /* read in block type */ + NEEDBITS(2) + t = (unsigned)b & 3; + DUMPBITS(2) + + /* restore the global bit buffer */ + bb = b; + bk = k; + + /* inflate that block type */ + if (t == 2) + return inflate_dynamic(); + if (t == 0) + return inflate_stored(); + if (t == 1) + return inflate_fixed(); + + /* bad block type */ + return 2; +} + +local int inflate() +/* decompress an inflated entry */ +{ + int e; /* last block flag */ + int r; /* result code */ + unsigned h; /* maximum struct huft's malloc'ed */ + + /* initialize window, bit buffer */ + wp = 0; + bk = 0; + bb = 0; + + /* decompress until the last block */ + h = 0; + do { + hufts = 0; + if ((r = inflate_block(&e)) != 0) + return r; + if (hufts > h) + h = hufts; + } while (!e); + + /* Undo too much lookahead. The next read will be byte aligned so we + * can discard unused bits in the last meaningful byte. + */ + while (bk >= 8) { + bk -= 8; + inptr--; + } + + /* flush out slide */ + flush_output(wp); + + return 0; +} + +/* *********************** */ +/* start of file deflate.c */ +/* *********************** */ + +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + */ + +/* + * PURPOSE + * + * Identify new text as repetitions of old text within a fixed- + * length sliding window trailing behind the new text. + * + * DISCUSSION + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many info-zippers for bug reports and testing. + * + * REFERENCES + * + * APPNOTE.TXT documentation file in PKZIP 1.93a distribution. + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + * INTERFACE + * + * void lm_init (int pack_level, ush *flags) + * Initialize the "longest match" routines for a new file + * + * ulg deflate (void) + * Processes a new input file and return its compressed length. Sets + * the compressed length, crc, deflate flags and internal file + * attributes. + */ + +/* =========================================================================== + * Configuration parameters + */ + +/* Compile with MEDIUM_MEM to reduce the memory requirements or + * with SMALL_MEM to use as little memory as possible. Use BIG_MEM if the + * entire input file can be held in memory (not possible on 16 bit systems). + * Warning: defining these symbols affects HASH_BITS (see below) and thus + * affects the compression ratio. The compressed output + * is still correct, and might even be smaller in some cases. + */ + +#ifdef SMALL_MEM +# define HASH_BITS 13 /* Number of bits used to hash strings */ +#endif +#ifdef MEDIUM_MEM +# define HASH_BITS 14 +#endif +#ifndef HASH_BITS +# define HASH_BITS 15 + /* For portability to 16 bit machines, do not use values above 15. */ +#endif + +/* To save space (see unlzw.c), we overlay prev+head with tab_prefix and + * window with tab_suffix. Check that we can do this: + */ +#if (WSIZE<<1) > (1< BITS-1 + error: cannot overlay head with tab_prefix1 +#endif + +#define HASH_SIZE (unsigned)(1<= HASH_BITS + */ + +unsigned int near prev_length; +/* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + unsigned near strstart; /* start of string to insert */ + unsigned near match_start; /* start of matching string */ +local int eofile; /* flag set at end of input file */ +local unsigned lookahead; /* number of valid bytes ahead in window */ + +unsigned near max_chain_length; +/* To speed up deflation, hash chains are never searched beyond this length. + * A higher limit improves compression ratio but degrades the speed. + */ + +local unsigned int max_lazy_match; +/* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +#define max_insert_length max_lazy_match +/* Insert new strings in the hash table only if the match length + * is not greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + +local int compr_level; +/* compression level (1..9) */ + +unsigned near good_match; +/* Use a faster search when the previous match is longer than this */ + + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ + +typedef struct config { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; +} config; + +#ifdef FULL_SEARCH +# define nice_match MAX_MATCH +#else + int near nice_match; /* Stop searching when current match exceeds this */ +#endif + +local config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0}, /* store only */ +/* 1 */ {4, 4, 8, 4}, /* maximum speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8}, +/* 3 */ {4, 6, 32, 32}, + +/* 4 */ {4, 4, 16, 16}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32}, +/* 6 */ {8, 16, 128, 128}, +/* 7 */ {8, 32, 128, 256}, +/* 8 */ {32, 128, 258, 1024}, +/* 9 */ {32, 258, 258, 4096}}; /* maximum compression */ + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +/* =========================================================================== + * Prototypes for local functions. + */ +local void fill_window OF((void)); +local ulg deflate_fast OF((void)); + + int longest_match OF((IPos cur_match)); +#ifdef ASMV + void match_init OF((void)); /* asm code initialization */ +#endif + +#ifdef DEBUG +local void check_match OF((IPos start, IPos match, int length)); +#endif + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to to UPDATE_HASH are made with consecutive + * input characters, so that a running hash key can be computed from the + * previous key instead of complete recalculation each time. + */ +#define UPDATE_HASH(h,c) (h = (((h)< 9) error("bad pack level"); + compr_level = pack_level; + + /* Initialize the hash table. */ +#if defined(MAXSEG_64K) && HASH_BITS == 15 + for (j = 0; j < HASH_SIZE; j++) head[j] = NIL; +#else + memzero((char*)head, HASH_SIZE*sizeof(*head)); +#endif + /* prev will be initialized on the fly */ + + /* Set the default configuration parameters: + */ + max_lazy_match = configuration_table[pack_level].max_lazy; + good_match = configuration_table[pack_level].good_length; +#ifndef FULL_SEARCH + nice_match = configuration_table[pack_level].nice_length; +#endif + + max_chain_length = configuration_table[pack_level].max_chain; + if (pack_level == 1) { + *flags |= FAST; + } else if (pack_level == 9) { + *flags |= SLOW; + } + /* ??? reduce max_chain_length for binary files */ + + + strstart = 0; + block_start = 0L; +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif + + lookahead = read_buf((char*)window, + sizeof(int) <= 2 ? (unsigned)WSIZE : 2*WSIZE); + + if (lookahead == 0 || lookahead == (unsigned)EOF) { + eofile = 1, lookahead = 0; + return; + } + + eofile = 0; + /* Make sure that we always have enough lookahead. This is important + * if input comes from a device such as a tty. + */ + while (lookahead < MIN_LOOKAHEAD && !eofile) fill_window(); + + ins_h = 0; + for (j=0; j= 1 + */ +#ifndef ASMV +/* For MSDOS, OS/2 and 386 Unix, an optimized version is in match.asm or + * match.s. The code is functionally equivalent, so you can use the C version + * if desired. + */ +int longest_match(cur_match) + IPos cur_match; /* current match */ +{ + unsigned chain_length = max_chain_length; /* max hash chain length */ + register uch *scan = window + strstart; /* current string */ + register uch *match; /* matched string */ + register int len; /* length of current match */ + int best_len = prev_length; /* best match length so far */ + IPos limit = strstart > (IPos)MAX_DIST ? strstart - (IPos)MAX_DIST : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + +/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ +#if HASH_BITS < 8 || MAX_MATCH != 258 + error: Code too clever +#endif + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register uch *strend = window + strstart + MAX_MATCH - 1; + register ush scan_start = *(ush*)scan; + register ush scan_end = *(ush*)(scan+best_len-1); +#else + register uch *strend = window + strstart + MAX_MATCH; + register uch scan_end1 = scan[best_len-1]; + register uch scan_end = scan[best_len]; +#endif + + /* Do not waste too much time if we already have a good match: */ + if (prev_length >= good_match) { + chain_length >>= 2; + } + Assert(strstart <= window_size-MIN_LOOKAHEAD, "insufficient lookahead"); + + do { + Assert(cur_match < strstart, "no future"); + match = window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2: + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ush*)(match+best_len-1) != scan_end || + *(ush*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + scan++, match++; + do { + } while (*(ush*)(scan+=2) == *(ush*)(match+=2) && + *(ush*)(scan+=2) == *(ush*)(match+=2) && + *(ush*)(scan+=2) == *(ush*)(match+=2) && + *(ush*)(scan+=2) == *(ush*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= window+(unsigned)(window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ush*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & WMASK]) > limit + && --chain_length != 0); + + return best_len; +} +#endif /* ASMV */ + +#ifdef DEBUG +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(start, match, length) + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (memcmp((char*)window + match, + (char*)window + start, length) != EQUAL) { + fprintf(stderr, + " start %d, match %d, length %d\n", + start, match, length); + error("invalid match"); + } + if (verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(start, match, length) +#endif + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead, and sets eofile if end of input file. + * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0 + * OUT assertions: at least one byte has been read, or eofile is set; + * file reads are performed for at least two bytes (required for the + * translate_eol option). + */ +local void fill_window() +{ + register unsigned n, m; + unsigned more = (unsigned)(window_size - (ulg)lookahead - (ulg)strstart); + /* Amount of free space at the end of the window. */ + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (more == (unsigned)EOF) { + /* Very unlikely, but possible on 16 bit machine if strstart == 0 + * and lookahead == 1 (input done one byte at time) + */ + more--; + } else if (strstart >= WSIZE+MAX_DIST) { + /* By the IN assertion, the window is not empty so we can't confuse + * more == 0 with more == 64K on a 16 bit machine. + */ + Assert(window_size == (ulg)2*WSIZE, "no sliding with BIG_MEM"); + + memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE); + match_start -= WSIZE; + strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */ + + block_start -= (long) WSIZE; + + for (n = 0; n < HASH_SIZE; n++) { + m = head[n]; + head[n] = (Pos)(m >= WSIZE ? m-WSIZE : NIL); + } + for (n = 0; n < WSIZE; n++) { + m = prev[n]; + prev[n] = (Pos)(m >= WSIZE ? m-WSIZE : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } + more += WSIZE; + } + /* At this point, more >= 2 */ + if (!eofile) { + n = read_buf((char*)window+strstart+lookahead, more); + if (n == 0 || n == (unsigned)EOF) { + eofile = 1; + } else { + lookahead += n; + } + } +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK(eof) \ + flush_block(block_start >= 0L ? (char*)&window[(unsigned)block_start] : \ + (char*)NULL, (long)strstart - block_start, (eof)) + +/* =========================================================================== + * Processes a new input file and return its compressed length. This + * function does not perform lazy evaluationof matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local ulg deflate_fast() +{ + IPos hash_head; /* head of the hash chain */ + int flush; /* set if current block must be flushed */ + unsigned match_length = 0; /* length of best match */ + + prev_length = MIN_MATCH-1; + while (lookahead != 0) { + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + INSERT_STRING(strstart, hash_head); + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && strstart - hash_head <= MAX_DIST) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + match_length = longest_match (hash_head); + /* longest_match() sets match_start */ + if (match_length > lookahead) match_length = lookahead; + } + if (match_length >= MIN_MATCH) { + check_match(strstart, match_start, match_length); + + flush = ct_tally(strstart-match_start, match_length - MIN_MATCH); + + lookahead -= match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (match_length <= max_insert_length) { + match_length--; /* string at strstart already in hash table */ + do { + strstart++; + INSERT_STRING(strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH + * these bytes are garbage, but it does not matter since + * the next lookahead bytes will be emitted as literals. + */ + } while (--match_length != 0); + strstart++; + } else { + strstart += match_length; + match_length = 0; + ins_h = window[strstart]; + UPDATE_HASH(ins_h, window[strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c",window[strstart])); + flush = ct_tally (0, window[strstart]); + lookahead--; + strstart++; + } + if (flush) FLUSH_BLOCK(0), block_start = strstart; + + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + while (lookahead < MIN_LOOKAHEAD && !eofile) fill_window(); + + } + return FLUSH_BLOCK(1); /* eof */ +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +ulg deflate() +{ + IPos hash_head; /* head of hash chain */ + IPos prev_match; /* previous match */ + int flush; /* set if current block must be flushed */ + int match_available = 0; /* set if previous match exists */ + register unsigned match_length = MIN_MATCH-1; /* length of best match */ +#ifdef DEBUG + extern long isize; /* byte length of input file, for debug only */ +#endif + + if (compr_level <= 3) return deflate_fast(); /* optimized for speed */ + + /* Process the input block. */ + while (lookahead != 0) { + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + INSERT_STRING(strstart, hash_head); + + /* Find the longest match, discarding those <= prev_length. + */ + prev_length = match_length, prev_match = match_start; + match_length = MIN_MATCH-1; + + if (hash_head != NIL && prev_length < max_lazy_match && + strstart - hash_head <= MAX_DIST) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + match_length = longest_match (hash_head); + /* longest_match() sets match_start */ + if (match_length > lookahead) match_length = lookahead; + + /* Ignore a length 3 match if it is too distant: */ + if (match_length == MIN_MATCH && strstart-match_start > TOO_FAR){ + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + match_length--; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (prev_length >= MIN_MATCH && match_length <= prev_length) { + + check_match(strstart-1, prev_match, prev_length); + + flush = ct_tally(strstart-1-prev_match, prev_length - MIN_MATCH); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. + */ + lookahead -= prev_length-1; + prev_length -= 2; + do { + strstart++; + INSERT_STRING(strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH + * these bytes are garbage, but it does not matter since the + * next lookahead bytes will always be emitted as literals. + */ + } while (--prev_length != 0); + match_available = 0; + match_length = MIN_MATCH-1; + strstart++; + if (flush) FLUSH_BLOCK(0), block_start = strstart; + + } else if (match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c",window[strstart-1])); + if (ct_tally (0, window[strstart-1])) { + FLUSH_BLOCK(0), block_start = strstart; + } + strstart++; + lookahead--; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + match_available = 1; + strstart++; + lookahead--; + } + Assert (strstart <= isize && lookahead <= isize, "a bit too far"); + + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + while (lookahead < MIN_LOOKAHEAD && !eofile) fill_window(); + } + if (match_available) ct_tally (0, window[strstart-1]); + + return FLUSH_BLOCK(1); /* eof */ +} + +/* ********************** */ +/* start of file trees.c */ +/* ********************** */ + +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + */ + +/* + * PURPOSE + * + * Encode various sets of source values using variable-length + * binary code trees. + * + * DISCUSSION + * + * The PKZIP "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in the ZIP file in a compressed form + * which is itself a Huffman encoding of the lengths of + * all the code strings (in ascending order by source values). + * The actual code strings are reconstructed from the lengths in + * the UNZIP process, as described in the "application note" + * (APPNOTE.TXT) distributed as part of PKWARE's PKZIP program. + * + * REFERENCES + * + * Lynch, Thomas J. + * Data Compression: Techniques and Applications, pp. 53-55. + * Lifetime Learning Publications, 1985. ISBN 0-534-03418-7. + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + * + * INTERFACE + * + * void ct_init (ush *attr, int *methodp) + * Allocate the match buffer, initialize the various tables and save + * the location of the internal file attribute (ascii/binary) and + * method (DEFLATE/STORE) + * + * void ct_tally (int dist, int lc); + * Save the match info and tally the frequency counts. + * + * long flush_block (char *buf, ulg stored_len, int eof) + * Determine the best encoding for the current block: dynamic trees, + * static trees or store, and output the encoded block to the zip + * file. Returns the total compressed length for the file so far. + * + */ + + + +/* =========================================================================== + * Constants + */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + + +local int near extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local int near extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local int near extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#ifndef LIT_BUFSIZE +# ifdef SMALL_MEM +# define LIT_BUFSIZE 0x2000 +# else +# ifdef MEDIUM_MEM +# define LIT_BUFSIZE 0x4000 +# else +# define LIT_BUFSIZE 0x8000 +# endif +# endif +#endif +#ifndef DIST_BUFSIZE +# define DIST_BUFSIZE LIT_BUFSIZE +#endif +/* Sizes of match buffers for literals/lengths and distances. There are + * 4 reasons for limiting LIT_BUFSIZE to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input data is + * still in the window so we can still emit a stored block even when input + * comes from standard input. (This can also be done for all blocks if + * LIT_BUFSIZE is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting trees + * more frequently. + * - I can't count above 4 + * The current code is general and allows DIST_BUFSIZE < LIT_BUFSIZE (to save + * memory at the expense of compression). Some optimizations would be possible + * if we rely on DIST_BUFSIZE == LIT_BUFSIZE. + */ +#if LIT_BUFSIZE > INBUFSIZ + error cannot overlay l_buf and inbuf +#endif + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* =========================================================================== + * Local data + */ + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +local ct_data near dyn_ltree[HEAP_SIZE]; /* literal and length tree */ +local ct_data near dyn_dtree[2*D_CODES+1]; /* distance tree */ + +local ct_data near static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see ct_init + * below). + */ + +local ct_data near static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +local ct_data near bl_tree[2*BL_CODES+1]; +/* Huffman tree for the bit lengths */ + +typedef struct tree_desc { + ct_data near *dyn_tree; /* the dynamic tree */ + ct_data near *static_tree; /* corresponding static tree or NULL */ + int near *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ + int max_code; /* largest code with non zero frequency */ +} tree_desc; + +local tree_desc near l_desc = +{dyn_ltree, static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS, 0}; + +local tree_desc near d_desc = +{dyn_dtree, static_dtree, extra_dbits, 0, D_CODES, MAX_BITS, 0}; + +local tree_desc near bl_desc = +{bl_tree, (ct_data near *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS, 0}; + + +local ush near bl_count[MAX_BITS+1]; +/* number of codes at each bit length for an optimal tree */ + +local uch near bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +local int near heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ +local int heap_len; /* number of elements in the heap */ +local int heap_max; /* element of largest frequency */ +/* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + +local uch near depth[2*L_CODES+1]; +/* Depth of each subtree used as tie breaker for trees of equal frequency */ + +local uch length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local uch dist_code[512]; +/* distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +local int near base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int near base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#define l_buf inbuf +/* DECLARE(uch, l_buf, LIT_BUFSIZE); buffer for literals or lengths */ + +/* DECLARE(ush, d_buf, DIST_BUFSIZE); buffer for distances */ + +local uch near flag_buf[(LIT_BUFSIZE/8)]; +/* flag_buf is a bit array distinguishing literals from lengths in + * l_buf, thus indicating the presence or absence of a distance. + */ + +local unsigned last_lit; /* running index in l_buf */ +local unsigned last_dist; /* running index in d_buf */ +local unsigned last_flags; /* running index in flag_buf */ +local uch flags; /* current flags not yet saved in flag_buf */ +local uch flag_bit; /* current bit used in flags */ +/* bits are filled in flags starting at bit 0 (least significant). + * Note: these flags are overkill in the current code since we don't + * take advantage of DIST_BUFSIZE == LIT_BUFSIZE. + */ + +local ulg opt_len; /* bit length of current block with optimal trees */ +local ulg static_len; /* bit length of current block with static trees */ + +local ulg compressed_len; /* total bit length of compressed file */ + +local ulg input_len; /* total byte length of input file */ +/* input_len is for debugging only since we can get it by other means. */ + +int *file_method; /* pointer to DEFLATE or STORE */ + +#ifdef DEBUG +extern ulg bits_sent; /* bit length of the compressed data */ +extern long isize; /* byte length of input file */ +#endif + +extern long block_start; /* window offset of current block */ +extern unsigned near strstart; /* window offset of current string */ + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void init_block OF((void)); +local void pqdownheap OF((ct_data near *tree, int k)); +local void gen_bitlen OF((tree_desc near *desc)); +local void gen_codes OF((ct_data near *tree, int max_code)); +local void build_tree OF((tree_desc near *desc)); +local void scan_tree OF((ct_data near *tree, int max_code)); +local void send_tree OF((ct_data near *tree, int max_code)); +local int build_bl_tree OF((void)); +local void send_all_trees OF((int lcodes, int dcodes, int blcodes)); +local void compress_block OF((ct_data near *ltree, ct_data near *dtree)); + +# define send_code(c, tree) send_bits(tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#define d_code(dist) \ + ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. dist_code[256] and dist_code[257] are never + * used. + */ + +#define MAX(a,b) (a >= b ? a : b) +/* the arguments must not have side effects */ + +/* =========================================================================== + * Allocate the match buffer, initialize the various tables and save the + * location of the internal file attribute (ascii/binary) and method + * (DEFLATE/STORE). + */ +void ct_init(attr, methodp) + ush *attr; /* pointer to internal file attribute */ + int *methodp; /* pointer to compression method */ +{ + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + + file_method = methodp; + compressed_len = input_len = 0L; + + if (static_dtree[0].Len != 0) return; /* ct_init already called */ + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "ct_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data near *)static_ltree, L_CODES+1); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse(n, 5); + } + + /* Initialize the first block of the first file: */ + init_block(); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block() +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) bl_tree[n].Freq = 0; + + dyn_ltree[END_BLOCK].Freq = 1; + opt_len = static_len = 0L; + last_lit = last_dist = last_flags = 0; + flags = 0; flag_bit = 1; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(tree, top) \ +{\ + top = heap[SMALLEST]; \ + heap[SMALLEST] = heap[heap_len--]; \ + pqdownheap(tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(tree, k) + ct_data near *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = heap[k]; + int j = k << 1; /* left son of k */ + while (j <= heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < heap_len && smaller(tree, heap[j+1], heap[j])) j++; + + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, heap[j])) break; + + /* Exchange v with the smallest son */ + heap[k] = heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(desc) + tree_desc near *desc; /* the tree descriptor */ +{ + ct_data near *tree = desc->dyn_tree; + int near *extra = desc->extra_bits; + int base = desc->extra_base; + int max_code = desc->max_code; + int max_length = desc->max_length; + ct_data near *stree = desc->static_tree; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[heap[heap_max]].Len = 0; /* root of the heap */ + + for (h = heap_max+1; h < HEAP_SIZE; h++) { + n = heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + opt_len += (ulg)f * (bits + xbits); + if (stree) static_len += (ulg)f * (stree[n].Len + xbits); + } + if (overflow == 0) return; + + Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (bl_count[bits] == 0) bits--; + bl_count[bits]--; /* move one leaf down the tree */ + bl_count[bits+1] += 2; /* move one overflow item as its brother */ + bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = bl_count[bits]; + while (n != 0) { + m = heap[--h]; + if (m > max_code) continue; + if (tree[m].Len != (unsigned) bits) { + Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + opt_len += ((long)bits-(long)tree[m].Len)*(long)tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code) + ct_data near *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + ush code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits-1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + ct_data near *stree = desc->static_tree; + int elems = desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node = elems; /* next internal node of the tree */ + int new; /* WDP added this, instead of declaring it below */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + heap_len = 0, heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + heap[++heap_len] = max_code = n; + depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (heap_len < 2) { +/* int new = heap[++heap_len] = (max_code < 2 ? ++max_code : 0); */ + new = heap[++heap_len] = (max_code < 2 ? ++max_code : 0); + tree[new].Freq = 1; + depth[new] = 0; + opt_len--; if (stree) static_len -= stree[new].Len; + /* new is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = heap_len/2; n >= 1; n--) pqdownheap(tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + do { + pqremove(tree, n); /* n = node of least frequency */ + m = heap[SMALLEST]; /* m = node of next least frequency */ + + heap[--heap_max] = n; /* keep the nodes sorted by frequency */ + heap[--heap_max] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + depth[node] = (uch) (MAX(depth[n], depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + heap[SMALLEST] = node++; + pqdownheap(tree, SMALLEST); + + } while (heap_len >= 2); + + heap[--heap_max] = heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen((tree_desc near *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data near *)tree, max_code); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. Updates opt_len to take into account the repeat + * counts. (The contribution of the bit length codes will be added later + * during the construction of bl_tree.) + */ +local void scan_tree (tree, max_code) + ct_data near *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) bl_tree[curlen].Freq++; + bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + bl_tree[REPZ_3_10].Freq++; + } else { + bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (tree, max_code) + ct_data near *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(curlen, bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(curlen, bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(REP_3_6, bl_tree); send_bits(count-3, 2); + + } else if (count <= 10) { + send_code(REPZ_3_10, bl_tree); send_bits(count-3, 3); + + } else { + send_code(REPZ_11_138, bl_tree); send_bits(count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree() +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree((ct_data near *)dyn_ltree, l_desc.max_code); + scan_tree((ct_data near *)dyn_dtree, d_desc.max_code); + + /* Build the bit length tree: */ + build_tree((tree_desc near *)(&bl_desc)); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + opt_len += 3*(max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", opt_len, static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(lcodes, dcodes, blcodes) + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(dcodes-1, 5); + send_bits(blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", bits_sent)); + + send_tree((ct_data near *)dyn_ltree, lcodes-1); /* send the literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", bits_sent)); + + send_tree((ct_data near *)dyn_dtree, dcodes-1); /* send the distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", bits_sent)); +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. This function + * returns the total compressed length for the file so far. + */ +ulg flush_block(buf, stored_len, eof) + char *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex; /* index of last bit length code of non zero freq */ + + flag_buf[last_flags] = flags; /* Save the flags for the last 8 items */ + + /* Construct the literal and distance trees */ + build_tree((tree_desc near *)(&l_desc)); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", opt_len, static_len)); + + build_tree((tree_desc near *)(&d_desc)); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", opt_len, static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(); + + /* Determine the best encoding. Compute first the block length in bytes */ + opt_lenb = (opt_len+3+7)>>3; + static_lenb = (static_len+3+7)>>3; + input_len += stored_len; /* for debugging only */ + + Trace((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ", + opt_lenb, opt_len, static_lenb, static_len, stored_len, + last_lit, last_dist)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + /* If compression failed and this is the first and last block, + * and if the zip file can be seeked (to rewrite the local header), + * the whole file is transformed into a stored file: + */ +#ifdef FORCE_METHOD + if (level == 1 && eof && compressed_len == 0L) { /* force stored file */ +#else + if (stored_len <= opt_lenb && eof && compressed_len == 0L && seekable()) { +#endif + /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ + if (buf == (char*)0) error ("block vanished"); + + copy_block(buf, (unsigned)stored_len, 0); /* without header */ + compressed_len = stored_len << 3; + *file_method = STORED; + +#ifdef FORCE_METHOD + } else if (level == 2 && buf != (char*)0) { /* force stored block */ +#else + } else if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + send_bits((STORED_BLOCK<<1)+eof, 3); /* send block type */ + compressed_len = (compressed_len + 3 + 7) & ~7L; + compressed_len += (stored_len + 4) << 3; + + copy_block(buf, (unsigned)stored_len, 1); /* with header */ + +#ifdef FORCE_METHOD + } else if (level == 3) { /* force static trees */ +#else + } else if (static_lenb == opt_lenb) { +#endif + send_bits((STATIC_TREES<<1)+eof, 3); + compress_block((ct_data near *)static_ltree, (ct_data near *)static_dtree); + compressed_len += 3 + static_len; + } else { + send_bits((DYN_TREES<<1)+eof, 3); + send_all_trees(l_desc.max_code+1, d_desc.max_code+1, max_blindex+1); + compress_block((ct_data near *)dyn_ltree, (ct_data near *)dyn_dtree); + compressed_len += 3 + opt_len; + } + Assert (compressed_len == bits_sent, "bad compressed size"); + init_block(); + + if (eof) { + Assert (input_len == isize, "bad input size"); + bi_windup(); + compressed_len += 7; /* align on byte boundary */ + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", compressed_len>>3, + compressed_len-7*eof)); + + return compressed_len >> 3; +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int ct_tally (dist, lc) + int dist; /* distance of matched string */ + int lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + l_buf[last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + dyn_ltree[lc].Freq++; + } else { + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "ct_tally: bad match"); + + dyn_ltree[length_code[lc]+LITERALS+1].Freq++; + dyn_dtree[d_code(dist)].Freq++; + + d_buf[last_dist++] = (ush)dist; + flags |= flag_bit; + } + flag_bit <<= 1; + + /* Output the flags if they fill a byte: */ + if ((last_lit & 7) == 0) { + flag_buf[last_flags++] = flags; + flags = 0, flag_bit = 1; + } + /* Try to guess if it is profitable to stop the current block here */ + if (level > 2 && (last_lit & 0xfff) == 0) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)last_lit*8L; + ulg in_length = (ulg)strstart-block_start; + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)dyn_dtree[dcode].Freq*(5L+extra_dbits[dcode]); + } + out_length >>= 3; + Trace((stderr,"\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ", + last_lit, last_dist, in_length, out_length, + 100L - out_length*100L/in_length)); + if (last_dist < last_lit/2 && out_length < in_length/2) return 1; + } + return (last_lit == LIT_BUFSIZE-1 || last_dist == DIST_BUFSIZE); + /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(ltree, dtree) + ct_data near *ltree; /* literal tree */ + ct_data near *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned dx = 0; /* running index in d_buf */ + unsigned fx = 0; /* running index in flag_buf */ + uch flag = 0; /* current flags */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (last_lit != 0) do { + if ((lx & 7) == 0) flag = flag_buf[fx++]; + lc = l_buf[lx++]; + if ((flag & 1) == 0) { + send_code(lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = length_code[lc]; + send_code(code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(lc, extra); /* send the extra length bits */ + } + dist = d_buf[dx++]; + /* Here, dist is the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= base_dist[code]; + send_bits(dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + flag >>= 1; + } while (lx < last_lit); + + send_code(END_BLOCK, ltree); +} + +/* ********************** */ +/* start of file bits.c */ +/* ********************** */ + +/* bits.c -- output variable-length bit strings + * Copyright (C) 1992-1993 Jean-loup Gailly + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License, see the file COPYING. + */ + + +/* + * PURPOSE + * + * Output variable-length bit strings. Compression can be done + * to a file or to memory. (The latter is not supported in this version.) + * + * DISCUSSION + * + * The PKZIP "deflate" file format interprets compressed file data + * as a sequence of bits. Multi-bit strings in the file may cross + * byte boundaries without restriction. + * + * The first bit of each byte is the low-order bit. + * + * The routines in this file allow a variable-length bit value to + * be output right-to-left (useful for literal values). For + * left-to-right output (useful for code strings from the tree routines), + * the bits must have been reversed first with bi_reverse(). + * + * For in-memory compression, the compressed bit stream goes directly + * into the requested output buffer. The input data is read in blocks + * by the mem_read() function. The buffer is limited to 64K on 16 bit + * machines. + * + * INTERFACE + * + * void bi_init (FILE *zipfile) + * Initialize the bit string routines. + * + * void send_bits (int value, int length) + * Write out a bit string, taking the source bits right to + * left. + * + * int bi_reverse (int value, int length) + * Reverse the bits of a bit string, taking the source bits left to + * right and emitting them right to left. + * + * void bi_windup (void) + * Write out any remaining bits in an incomplete byte. + * + * void copy_block(char *buf, unsigned len, int header) + * Copy a stored block to the zip file, storing first the length and + * its one's complement if requested. + * + */ + +/* #include "tailor.h" */ +/* #include "gzip.h" */ +/* #include "crypt.h" */ + +/* =========================================================================== + * Local data used by the "bit string" routines. + */ + +local file_t zfile; /* output gzip file */ + +local unsigned short bi_buf; +/* Output buffer. bits are inserted starting at the bottom (least significant + * bits). + */ + +#define Buf_size (8 * 2*sizeof(char)) +/* Number of bits used within bi_buf. (bi_buf might be implemented on + * more than 16 bits on some systems.) + */ + +local int bi_valid; +/* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + +/* int (*read_buf) OF((char *buf, unsigned size)); */ +/* Current input function. Set to mem_read for in-memory compression */ + +#ifdef DEBUG + ulg bits_sent; /* bit length of the compressed data */ +#endif + +/* =========================================================================== + * Initialize the bit string routines. + */ +void bi_init (zipfile) + file_t zipfile; /* output zip file, NO_FILE for in-memory compression */ +{ + zfile = zipfile; + bi_buf = 0; + bi_valid = 0; +#ifdef DEBUG + bits_sent = 0L; +#endif + + /* Set the defaults for file compression. They are set by memcompress + * for in-memory compression. + */ + + read_buf = file_read; + +/* + if (zfile != NO_FILE) { + read_buf = file_read; + } +*/ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +void send_bits(value, length) + int value; /* value to send */ + int length; /* number of bits */ +{ +#ifdef DEBUG + Tracev((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + bits_sent += (ulg)length; +#endif + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (bi_valid > (int)Buf_size - length) { + bi_buf |= (value << bi_valid); + put_short(bi_buf); + bi_buf = (ush)value >> (Buf_size - bi_valid); + bi_valid += length - Buf_size; + } else { + bi_buf |= value << bi_valid; + bi_valid += length; + } +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Write out any remaining bits in an incomplete byte. + */ +void bi_windup() +{ + if (bi_valid > 8) { + put_short(bi_buf); + } else if (bi_valid > 0) { + put_byte(bi_buf); + } + bi_buf = 0; + bi_valid = 0; +#ifdef DEBUG + bits_sent = (bits_sent+7) & ~7; +#endif +} + +/* =========================================================================== + * Copy a stored block to the zip file, storing first the length and its + * one's complement if requested. + */ +void copy_block(buf, len, header) + char *buf; /* the input data */ + unsigned len; /* its length */ + int header; /* true if block header must be written */ +{ + bi_windup(); /* align on byte boundary */ + + if (header) { + put_short((ush)len); + put_short((ush)~len); +#ifdef DEBUG + bits_sent += 2*16; +#endif + } +#ifdef DEBUG + bits_sent += (ulg)len<<3; +#endif + while (len--) { +#ifdef CRYPT + int t; + if (key) zencode(*buf, t); +#endif + put_byte(*buf++); + } +} diff --git a/software/cfitsio3040/compress.h b/software/cfitsio3040/compress.h new file mode 100644 index 000000000..0be9e0751 --- /dev/null +++ b/software/cfitsio3040/compress.h @@ -0,0 +1,215 @@ +/* compress.h -- definitions for the decompression routines used in CFITSIO */ + +/* Blatantly copied and modified from the original gzip-1.2.4 source code. */ + +#include +#include +#include +#include + +/* 'near' is only relevant for 16-bit PC with small memory model */ +# define near + +#if defined(VAXC) || defined(VMS) +# define RECORD_IO 1 +#else +# define RECORD_IO 0 +#endif + +#define get_char() get_byte() + +/* gzip.h -- common declarations for all gzip modules */ + +#define OF(args) args +typedef void *voidp; + +#define memzero(s, n) memset ((voidp)(s), 0, (n)) + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + +/* private version of MIN function */ +#define MINZIP(a,b) ((a) <= (b) ? (a) : (b)) + +/* Return codes from gzip */ +#define OK 0 +#define ERROR 1 +#define WARNING 2 + +/* Compression methods (see algorithm.doc) */ +#define STORED 0 +#define COMPRESSED 1 +#define PACKED 2 +#define LZHED 3 +/* methods 4 to 7 reserved */ +#define DEFLATED 8 +#define MAX_METHODS 9 + +#define INBUFSIZ 0x8000 /* input buffer size */ +#define INBUF_EXTRA 64 /* required by unlzw() */ +#define OUTBUFSIZ 16384 /* output buffer size */ +#define OUTBUF_EXTRA 2048 /* required by unlzw() */ +#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */ +#define WSIZE 0x8000 /* window size--must be a power of two, and */ + +#define DECLARE(type, array, size) type array[size] + +#define tab_suffix window +#define tab_prefix prev /* hash link (see deflate.c) */ +#define head (prev+WSIZE) /* hash head (see deflate.c) */ + +#define PACK_MAGIC "\037\036" /* Magic header for packed files */ +#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */ +#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */ +#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/ +#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */ +#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ +#define RESERVED 0xC0 /* bit 6,7: reserved */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +#define MAX_DIST (WSIZE-MIN_LOOKAHEAD) +#define translate_eol 0 /* no option -a yet */ + +#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0)) +#define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1)) +#define put_ubyte(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\ + flush_window();} + +/* Macros for getting two-byte and four-byte header values */ +#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)) +#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)) + +/* Diagnostic functions */ +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) + +/* lzw.h -- define the lzw functions. */ + +#ifndef BITS +# define BITS 16 +#endif +#define INIT_BITS 9 /* Initial number of bits per code */ +#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */ +#define BLOCK_MODE 0x80 +#define LZW_RESERVED 0x60 /* reserved bits */ +#define CLEAR 256 /* flush the dictionary */ +#define FIRST (CLEAR+1) /* first free entry */ + +/* prototypes */ + +#define local static +void ffpmsg(const char *err_message); + +local int get_method OF((FILE *in)); + +local ulg updcrc OF((uch *s, unsigned n)); +local int fill_inbuf OF((int eof_ok)); +local void flush_outbuf OF((void)); +local void flush_window OF((void)); +local void write_buf OF((voidp buf, unsigned cnt)); +local void error OF((char *m)); +local ulg flush_block OF((char *buf, ulg stored_len, int eof)); +typedef int file_t; /* Do not use stdio */ +#define NO_FILE (-1) /* in memory compression */ +local int file_read OF((char *buf, unsigned size)); +local void send_bits OF((int value, int length)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((void)); +local void copy_block OF((char *buf, unsigned len, int header)); +local int (*read_buf) OF((char *buf, unsigned size)); +local void lm_init OF((int pack_level, ush *flags)); +local ulg deflate OF((void)); +local void ct_init OF((ush *attr, int *method)); +local int ct_tally OF((int dist, int lc)); +local void bi_init OF((file_t zipfile)); + +#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\ + flush_outbuf();} + +/* Output a 16 bit value, lsb first */ +#define put_short(w) \ +{ if (outcnt < OUTBUFSIZ-2) { \ + outbuf[outcnt++] = (uch) ((w) & 0xff); \ + outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \ + } else { \ + put_byte((uch)((w) & 0xff)); \ + put_byte((uch)((ush)(w) >> 8)); \ + } \ +} + +/* Output a 32 bit value to the bit stream, lsb first */ +#define put_long(n) { \ + put_short((n) & 0xffff); \ + put_short(((ulg)(n)) >> 16); \ +} + +#define seekable() 0 /* force sequential output */ + +/* io.c */ +local void fillbuf OF((int n)); +local unsigned getbits OF((int n)); +local void init_getbits OF((void)); + +/* maketbl.c */ +local void make_table OF((int nchar, uch bitlen[], + int tablebits, ush table[])); + +/* huf.c */ +local void read_pt_len OF((int nn, int nbit, int i_special)); +local void read_c_len OF((void)); +local unsigned decode_c OF((void)); +local unsigned decode_p OF((void)); +local void huf_decode_start OF((void)); + +/* decode.c */ +local void decode_start OF((void)); +local unsigned decode OF((unsigned count, uch buffer[])); + +local int unlzh OF((FILE *in, FILE *out)); +local int unlzw OF((FILE *in, FILE *out)); + +local void read_tree OF((void)); +local void build_tree_unpack OF((void)); + +local int unpack OF((FILE *in, FILE *out)); +local int check_zipfile OF((FILE *in)); +local int unzip OF((FILE *in, FILE *out)); + +int (*work) OF((FILE *infile, FILE *outfile)) = unzip; /* function to call */ + +/* inflate.c */ +struct huft { + uch e; /* number of extra bits or operation */ + uch b; /* number of bits in this code or subcode */ + union { + ush n; /* literal, length base, or distance base */ + struct huft *t; /* pointer to next level of table */ + } v; +}; + +local int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *, + struct huft **, int *)); +local int huft_free OF((struct huft *)); +local int inflate_codes OF((struct huft *, struct huft *, int, int)); +local int inflate_stored OF((void)); +local int inflate_fixed OF((void)); +local int inflate_dynamic OF((void)); +local int inflate_block OF((int *)); +local int inflate OF((void)); + +/* end of compress.h include file */ diff --git a/software/cfitsio3040/compress_alternate.c b/software/cfitsio3040/compress_alternate.c new file mode 100644 index 000000000..7ae5a91b9 --- /dev/null +++ b/software/cfitsio3040/compress_alternate.c @@ -0,0 +1,155 @@ +#include +#include + +/* ====================================================================== + +This file contains stubs for the compression and uncompression routines +that are contained in the source file compress.c. Those routines (in +compress.c) can only be used by software which adheres to the terms of +the GNU General Public License. Users who want to use CFITSIO but are +unwilling to release their code under the terms of the GNU General +Public License should replace the compress.c file with this current +file before building the CFITSIO library. This alternative version of +CFITSIO will behave the same as the standard version, except that it +will not support reading or writing of FITS files in compressed format. + +======================================================================== */ +/* prototype for the following functions */ + +void ffpmsg(const char *err_message); + +int uncompress2mem(char *filename, + FILE *diskfile, + char **buffptr, + size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, + int *status); + +int uncompress2mem_from_mem( + char *inmemptr, + size_t inmemsize, + char **buffptr, + size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, + int *status); + +int uncompress2file(char *filename, + FILE *indiskfile, + FILE *outdiskfile, + int *status); + +int compress2mem_from_mem( + char *inmemptr, + size_t inmemsize, + char **buffptr, + size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, + int *status); + +int compress2file_from_mem( + char *inmemptr, + size_t inmemsize, + FILE *outdiskfile, + size_t *filesize, /* O - size of file, in bytes */ + int *status); +/*--------------------------------------------------------------------------*/ +int uncompress2mem(char *filename, /* name of input file */ + FILE *diskfile, /* I - file pointer */ + char **buffptr, /* IO - memory pointer */ + size_t *buffsize, /* IO - size of buffer, in bytes */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + size_t *filesize, /* O - size of file, in bytes */ + int *status) /* IO - error status */ + +/* + Uncompress the file into memory. Fill whatever amount of memory has + already been allocated, then realloc more memory, using the supplied + input function, if necessary. +*/ +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support compressed files"); + return(*status = 414); +} +/*--------------------------------------------------------------------------*/ +int uncompress2mem_from_mem( + char *inmemptr, /* I - memory pointer to compressed bytes */ + size_t inmemsize, /* I - size of input compressed file */ + char **buffptr, /* IO - memory pointer */ + size_t *buffsize, /* IO - size of buffer, in bytes */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + size_t *filesize, /* O - size of file, in bytes */ + int *status) /* IO - error status */ + +/* + Uncompress the file into memory. Fill whatever amount of memory has + already been allocated, then realloc more memory, using the supplied + input function, if necessary. +*/ +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support compressed files"); + return(*status = 414); +} +/*--------------------------------------------------------------------------*/ +int uncompress2file(char *filename, /* name of input file */ + FILE *indiskfile, /* I - input file pointer */ + FILE *outdiskfile, /* I - output file pointer */ + int *status) /* IO - error status */ + +/* + Uncompress the file into file. +*/ +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support compressed files"); + return(*status = 414); +} +/*--------------------------------------------------------------------------*/ +int compress2mem_from_mem( + char *inmemptr, /* I - memory pointer to uncompressed bytes */ + size_t inmemsize, /* I - size of input uncompressed file */ + char **buffptr, /* IO - memory pointer for compressed file */ + size_t *buffsize, /* IO - size of buffer, in bytes */ + void *(*mem_realloc)(void *p, size_t newsize), /* function */ + size_t *filesize, /* O - size of file, in bytes */ + int *status) /* IO - error status */ + +/* + Compress the file into memory. Fill whatever amount of memory has + already been allocated, then realloc more memory, using the supplied + input function, if necessary. +*/ +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support compressed files"); + return(*status = 413); +} +/*--------------------------------------------------------------------------*/ +int compress2file_from_mem( + char *inmemptr, /* I - memory pointer to uncompressed bytes */ + size_t inmemsize, /* I - size of input uncompressed file */ + FILE *outdiskfile, + size_t *filesize, /* O - size of file, in bytes */ + int *status) +/* + Compress the memory file into disk file. +*/ +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support compressed files"); + return(*status = 413); +} diff --git a/software/cfitsio3040/config.log b/software/cfitsio3040/config.log new file mode 100644 index 000000000..ab838f79c --- /dev/null +++ b/software/cfitsio3040/config.log @@ -0,0 +1,694 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by configure, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ ./configure + +## --------- ## +## Platform. ## +## --------- ## + +hostname = cosmos.phys.soton.ac.uk +uname -m = x86_64 +uname -r = 12.2.0 +uname -s = Darwin +uname -v = Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 + +/usr/bin/uname -p = i386 +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +hostinfo = Mach kernel version: + Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 +Kernel configured for up to 8 processors. +4 processors are physically available. +8 processors are logically available. +Processor type: i486 (Intel 80486) +Processors active: 0 1 2 3 4 5 6 7 +Primary memory available: 16.00 gigabytes +Default processor set: 204 tasks, 1104 threads, 8 processors +Load average: 0.92, Mach factor: 7.07 +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /opt/gcc-4.8.1/bin +PATH: /Applications/scisoft//all/bin +PATH: /opt/local/bin +PATH: /opt/local/sbin +PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin +PATH: /sw/bin +PATH: /sw/sbin +PATH: /usr/bin +PATH: /bin +PATH: /usr/sbin +PATH: /sbin +PATH: /usr/local/bin +PATH: /opt/X11/bin +PATH: /usr/local/git/bin +PATH: /usr/texbin +PATH: /usr/X11R6/bin +PATH: . +PATH: /Applications/scisoft//all/bin +PATH: /Applications/scisoft//ppc/ppc/bin +PATH: /Users/jmatthews/Documents/Analysis_Scripts/bin +PATH: /Users/jmatthews/Documents/pyprogs +PATH: /Users/jmatthews/Documents/struct2class +PATH: /Users/jmatthews/Documents/Analysis_Scripts/bin +PATH: /Users/jmatthews/Documents/Python/bin +PATH: /Users/jmatthews/Documents/Cloudy/bin +PATH: /Users/jmatthews/Documents/Analysis_Scripts/pybin +PATH: /Users/jmatthews/Documents/disky/Utilities/ +PATH: /Users/jmatthews/Documents/cobra/source +PATH: /Users/jmatthews/Documents/disky/ +PATH: /Users/jmatthews/Documents/disky/zephyr/ +PATH: /Users/jmatthews/Documents/pyprogs +PATH: . +PATH: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tardis_sn-0.9.dev702-py2.7-macosx-10.6-intel.egg/ +PATH: /Users/jmatthews/Documents/pyprogs/ +PATH: /Users/jmatthews/Documents/disky/disk +PATH: /Users/jmatthews/Documents/atomjm +PATH: /Applications/scisoft//ppc/ppc/bin +PATH: /Users/jmatthews/Documents/utils +PATH: /Users/jmatthews/Documents/utils + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:1377: checking for uname +configure:1393: found /usr/bin/uname +configure:1404: result: 1 +configure:1509: checking for gcc +configure:1535: result: cc +configure:1779: checking for C compiler version +configure:1782: cc --version &5 +Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) +Target: x86_64-apple-darwin12.2.0 +Thread model: posix +configure:1785: $? = 0 +configure:1787: cc -v &5 +Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) +Target: x86_64-apple-darwin12.2.0 +Thread model: posix +configure:1790: $? = 0 +configure:1792: cc -V &5 +clang: error: argument to '-V' is missing (expected 1 value) +clang: error: no input files +configure:1795: $? = 1 +configure:1818: checking for C compiler default output file name +configure:1821: cc conftest.c >&5 +configure:1824: $? = 0 +configure:1870: result: a.out +configure:1875: checking whether the C compiler works +configure:1881: ./a.out +configure:1884: $? = 0 +configure:1901: result: yes +configure:1908: checking whether we are cross compiling +configure:1910: result: no +configure:1913: checking for suffix of executables +configure:1915: cc -o conftest conftest.c >&5 +configure:1918: $? = 0 +configure:1943: result: +configure:1949: checking for suffix of object files +configure:1970: cc -c conftest.c >&5 +configure:1973: $? = 0 +configure:1995: result: o +configure:1999: checking whether we are using the GNU C compiler +configure:2023: cc -c conftest.c >&5 +configure:2029: $? = 0 +configure:2033: test -z + || test ! -s conftest.err +configure:2036: $? = 0 +configure:2039: test -s conftest.o +configure:2042: $? = 0 +configure:2055: result: yes +configure:2061: checking whether cc accepts -g +configure:2082: cc -c -g conftest.c >&5 +configure:2088: $? = 0 +configure:2092: test -z + || test ! -s conftest.err +configure:2095: $? = 0 +configure:2098: test -s conftest.o +configure:2101: $? = 0 +configure:2112: result: yes +configure:2129: checking for cc option to accept ANSI C +configure:2199: cc -c -g -O2 conftest.c >&5 +configure:2205: $? = 0 +configure:2209: test -z + || test ! -s conftest.err +configure:2212: $? = 0 +configure:2215: test -s conftest.o +configure:2218: $? = 0 +configure:2236: result: none needed +configure:2254: cc -c -g -O2 conftest.c >&5 +conftest.c:2:3: error: unknown type name 'choke' + choke me + ^ +conftest.c:2:11: error: expected ';' after top level declarator + choke me + ^ + ; +2 errors generated. +configure:2260: $? = 1 +configure: failed program was: +| #ifndef __cplusplus +| choke me +| #endif +configure:2398: checking for f77 +configure:2427: result: no +configure:2398: checking for xlf +configure:2427: result: no +configure:2398: checking for cf77 +configure:2427: result: no +configure:2398: checking for gf77 +configure:2427: result: no +configure:2398: checking for g77 +configure:2414: found /usr/local/bin/g77 +configure:2424: result: g77 +configure:2504: checking for ranlib +configure:2531: result: ranlib +configure:2550: checking how to run the C preprocessor +configure:2585: cc -E conftest.c +configure:2591: $? = 0 +configure:2623: cc -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:2629: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| +| #define PACKAGE_NAME "" +| #define PACKAGE_TARNAME "" +| #define PACKAGE_VERSION "" +| #define PACKAGE_STRING "" +| #define PACKAGE_BUGREPORT "" +| /* end confdefs.h. */ +| #include +configure:2668: result: cc -E +configure:2692: cc -E conftest.c +configure:2698: $? = 0 +configure:2730: cc -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:2736: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| +| #define PACKAGE_NAME "" +| #define PACKAGE_TARNAME "" +| #define PACKAGE_VERSION "" +| #define PACKAGE_STRING "" +| #define PACKAGE_BUGREPORT "" +| /* end confdefs.h. */ +| #include +configure:2780: checking for egrep +configure:2790: result: grep -E +configure:2795: checking for ANSI C header files +configure:2820: cc -c -g -O2 conftest.c >&5 +configure:2826: $? = 0 +configure:2830: test -z + || test ! -s conftest.err +configure:2833: $? = 0 +configure:2836: test -s conftest.o +configure:2839: $? = 0 +configure:2928: cc -o conftest -g -O2 conftest.c >&5 +conftest.c:26:7: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' + exit(2); + ^ +conftest.c:26:7: note: please include the header or explicitly provide a declaration for 'exit' +1 warning generated. +configure:2931: $? = 0 +configure:2933: ./conftest +configure:2936: $? = 0 +configure:2951: result: yes +configure:2975: checking for sys/types.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for sys/stat.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for stdlib.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for string.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for memory.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for strings.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for inttypes.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for stdint.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:2975: checking for unistd.h +configure:2991: cc -c -g -O2 conftest.c >&5 +configure:2997: $? = 0 +configure:3001: test -z + || test ! -s conftest.err +configure:3004: $? = 0 +configure:3007: test -s conftest.o +configure:3010: $? = 0 +configure:3021: result: yes +configure:3041: checking for stdlib.h +configure:3046: result: yes +configure:3041: checking for string.h +configure:3046: result: yes +configure:3050: checking math.h usability +configure:3062: cc -c -g -O2 conftest.c >&5 +configure:3068: $? = 0 +configure:3072: test -z + || test ! -s conftest.err +configure:3075: $? = 0 +configure:3078: test -s conftest.o +configure:3081: $? = 0 +configure:3091: result: yes +configure:3095: checking math.h presence +configure:3105: cc -E conftest.c +configure:3111: $? = 0 +configure:3131: result: yes +configure:3166: checking for math.h +configure:3173: result: yes +configure:3050: checking limits.h usability +configure:3062: cc -c -g -O2 conftest.c >&5 +configure:3068: $? = 0 +configure:3072: test -z + || test ! -s conftest.err +configure:3075: $? = 0 +configure:3078: test -s conftest.o +configure:3081: $? = 0 +configure:3091: result: yes +configure:3095: checking limits.h presence +configure:3105: cc -E conftest.c +configure:3111: $? = 0 +configure:3131: result: yes +configure:3166: checking for limits.h +configure:3173: result: yes +configure:3204: cc -c -g -O2 conftest.c >&5 +configure:3210: $? = 0 +configure:3214: test -z + || test ! -s conftest.err +configure:3217: $? = 0 +configure:3220: test -s conftest.o +configure:3223: $? = 0 +configure:3432: checking "whether ftruncate works" +configure:3453: cc -o conftest -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3459: $? = 0 +configure:3463: test -z + || test ! -s conftest.err +configure:3466: $? = 0 +configure:3469: test -s conftest +configure:3472: $? = 0 +configure:3479: result: "yes" +configure:3496: checking "whether long long is defined" +configure:3517: cc -c -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3523: $? = 0 +configure:3527: test -z + || test ! -s conftest.err +configure:3530: $? = 0 +configure:3533: test -s conftest.o +configure:3536: $? = 0 +configure:3543: result: "yes" +configure:3567: checking "whether system V style IPC services are supported" +configure:3593: cc -o conftest -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3599: $? = 0 +configure:3603: test -z + || test ! -s conftest.err +configure:3606: $? = 0 +configure:3609: test -s conftest +configure:3612: $? = 0 +configure:3620: result: "yes" +configure:3639: checking "do we have flock_t defined in sys/fcntl.h" +configure:3660: cc -c -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +conftest.c:34:1: error: use of undeclared identifier 'flock_t'; did you mean 'flock'? +flock_t filler; +^~~~~~~ +flock +/usr/include/sys/fcntl.h:491:5: note: 'flock' declared here +int flock(int, int); + ^ +conftest.c:34:8: error: expected ';' after expression +flock_t filler; + ^ + ; +conftest.c:34:9: error: use of undeclared identifier 'filler' +flock_t filler; + ^ +conftest.c:34:1: warning: expression result unused [-Wunused-value] +flock_t filler; +^~~~~~~ +1 warning and 3 errors generated. +configure:3666: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| +| #define PACKAGE_NAME "" +| #define PACKAGE_TARNAME "" +| #define PACKAGE_VERSION "" +| #define PACKAGE_STRING "" +| #define PACKAGE_BUGREPORT "" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MATH_H 1 +| #define HAVE_LIMITS_H 1 +| #define _LARGEFILE_SOURCE 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FTRUNCATE 1 +| #define HAVE_LONGLONG 1 +| #define HAVE_SHMEM_SERVICES 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| +| flock_t filler; +| +| ; +| return 0; +| } +configure:3693: result: "no" +configure:3699: checking "do we have flock_t defined in sys/flock.h" +configure:3720: cc -c -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +conftest.c:28:10: fatal error: 'sys/flock.h' file not found +#include + ^ +1 error generated. +configure:3726: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| +| #define PACKAGE_NAME "" +| #define PACKAGE_TARNAME "" +| #define PACKAGE_VERSION "" +| #define PACKAGE_STRING "" +| #define PACKAGE_BUGREPORT "" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MATH_H 1 +| #define HAVE_LIMITS_H 1 +| #define _LARGEFILE_SOURCE 1 +| #define _FILE_OFFSET_BITS 64 +| #define HAVE_FTRUNCATE 1 +| #define HAVE_LONGLONG 1 +| #define HAVE_SHMEM_SERVICES 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| +| flock_t filler; +| +| ; +| return 0; +| } +configure:3753: result: "no" +configure:3764: checking "do we have union semun defined" +configure:3787: cc -c -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3793: $? = 0 +configure:3797: test -z + || test ! -s conftest.err +configure:3800: $? = 0 +configure:3803: test -s conftest.o +configure:3806: $? = 0 +configure:3813: result: "yes" +configure:3828: checking for library containing gethostbyname +configure:3858: cc -o conftest -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3864: $? = 0 +configure:3868: test -z + || test ! -s conftest.err +configure:3871: $? = 0 +configure:3874: test -s conftest +configure:3877: $? = 0 +configure:3947: result: none required +configure:3956: checking for library containing connect +configure:3986: cc -o conftest -O -O2 -Dg77Fortran -fPIC -fno-common conftest.c >&5 +configure:3992: $? = 0 +configure:3996: test -z + || test ! -s conftest.err +configure:3999: $? = 0 +configure:4002: test -s conftest +configure:4005: $? = 0 +configure:4075: result: none required +configure:4223: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by config.status, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on cosmos.phys.soton.ac.uk + +config.status:645: creating Makefile +configure:5145: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by config.status, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on cosmos.phys.soton.ac.uk + +config.status:646: creating Makefile +config.status:646: creating cfitsio.pc +configure:5942: result: +configure:5944: result: Congratulations, Makefile update was successful. +configure:5946: result: You may want to run "make" now. +configure:5948: result: + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_c_compiler_gnu=yes +ac_cv_env_CC_set=set +ac_cv_env_CC_value=cc +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_exeext= +ac_cv_header_inttypes_h=yes +ac_cv_header_limits_h=yes +ac_cv_header_math_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_objext=o +ac_cv_prog_CPP='cc -E' +ac_cv_prog_FC=g77 +ac_cv_prog_ac_ct_CC=cc +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_cc_g=yes +ac_cv_prog_cc_stdc= +ac_cv_prog_egrep='grep -E' +ac_cv_prog_uname_found=1 +ac_cv_search_connect='none required' +ac_cv_search_gethostbyname='none required' + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ARCH='i386' +CC='cc' +CFLAGS='-O -O2 -Dg77Fortran -fPIC -fno-common' +CPP='cc -E' +CPPFLAGS='' +DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MATH_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DHAVE_FTRUNCATE=1 -DHAVE_LONGLONG=1 -DHAVE_SHMEM_SERVICES=1 -DHAVE_UNION_SEMUN=1 -DHAVE_NET_SERVICES=1 ' +ECHO_C='ECHO_N='' +ECHO_T='' +EGREP='grep -E' +EXEEXT='' +F77_WRAPPERS='${FITSIO_SRC}' +FC='g77' +GCCVERSION='' +INSTALL_ROOT='${prefix}' +LDFLAGS='' +LIBOBJS='' +LIBPRE='' +LIBS='' +LTLIBOBJS='' +OBJEXT='o' +PACKAGE_BUGREPORT='' +PACKAGE_NAME='' +PACKAGE_STRING='' +PACKAGE_TARNAME='' +PACKAGE_VERSION='' +PATH_SEPARATOR=':' +RANLIB='ranlib' +SHELL='/bin/sh' +SHLIB_LD='cc -dynamiclib' +SHLIB_SUFFIX='.dylib' +ac_ct_CC='cc' +ac_ct_RANLIB='ranlib' +bindir='${exec_prefix}/bin' +build_alias='' +datadir='${prefix}/share' +exec_prefix='${prefix}' +host_alias='' +includedir='${prefix}/include' +infodir='${prefix}/info' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localstatedir='${prefix}/var' +mandir='${prefix}/man' +my_shmem='${SOURCES_SHMEM}' +oldincludedir='/usr/include' +prefix='/Users/jmatthews/Documents/Python/software/cfitsio3040' +program_transform_name='s,x,x,' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target_alias='' +uname_found='1' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +#define HAVE_FTRUNCATE 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LONGLONG 1 +#define HAVE_MATH_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_NET_SERVICES 1 +#define HAVE_SHMEM_SERVICES 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNION_SEMUN 1 +#define HAVE_UNISTD_H 1 +#define PACKAGE_BUGREPORT "" +#define PACKAGE_NAME "" +#define PACKAGE_STRING "" +#define PACKAGE_TARNAME "" +#define PACKAGE_VERSION "" +#define STDC_HEADERS 1 +#define _FILE_OFFSET_BITS 64 +#define _LARGEFILE_SOURCE 1 + +configure: exit 0 diff --git a/software/cfitsio3040/config.status b/software/cfitsio3040/config.status new file mode 100755 index 000000000..adeca9f61 --- /dev/null +++ b/software/cfitsio3040/config.status @@ -0,0 +1,719 @@ +#! /bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=${CONFIG_SHELL-/bin/sh} +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +config_files=" Makefile cfitsio.pc" + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +ac_cs_version="\ +config.status +configured by ./configure, generated by GNU Autoconf 2.59, + with options \" 'CC=cc'\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=. +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + echo "running /bin/sh ./configure " 'CC=cc' $ac_configure_extra_args " --no-create --no-recursion" >&6 + exec /bin/sh ./configure 'CC=cc' $ac_configure_extra_args --no-create --no-recursion +fi + +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "cfitsio.pc" ) CONFIG_FILES="$CONFIG_FILES cfitsio.pc" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF +s,@SHELL@,/bin/sh,;t t +s,@PATH_SEPARATOR@,:,;t t +s,@PACKAGE_NAME@,,;t t +s,@PACKAGE_TARNAME@,,;t t +s,@PACKAGE_VERSION@,,;t t +s,@PACKAGE_STRING@,,;t t +s,@PACKAGE_BUGREPORT@,,;t t +s,@exec_prefix@,${prefix},;t t +s,@prefix@,/Users/jmatthews/Documents/Python/software/cfitsio3040,;t t +s,@program_transform_name@,s,x,x,,;t t +s,@bindir@,${exec_prefix}/bin,;t t +s,@sbindir@,${exec_prefix}/sbin,;t t +s,@libexecdir@,${exec_prefix}/libexec,;t t +s,@datadir@,${prefix}/share,;t t +s,@sysconfdir@,${prefix}/etc,;t t +s,@sharedstatedir@,${prefix}/com,;t t +s,@localstatedir@,${prefix}/var,;t t +s,@libdir@,${exec_prefix}/lib,;t t +s,@includedir@,${prefix}/include,;t t +s,@oldincludedir@,/usr/include,;t t +s,@infodir@,${prefix}/info,;t t +s,@mandir@,${prefix}/man,;t t +s,@build_alias@,,;t t +s,@host_alias@,,;t t +s,@target_alias@,,;t t +s,@DEFS@,-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MATH_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DHAVE_FTRUNCATE=1 -DHAVE_LONGLONG=1 -DHAVE_SHMEM_SERVICES=1 -DHAVE_UNION_SEMUN=1 -DHAVE_NET_SERVICES=1 ,;t t +s,@ECHO_C@,\c,;t t +s,@ECHO_N@,,;t t +s,@ECHO_T@,,;t t +s,@LIBS@,,;t t +s,@INSTALL_ROOT@,${prefix},;t t +s,@uname_found@,1,;t t +s,@CC@,cc,;t t +s,@CFLAGS@,-O -O2 -Dg77Fortran -fPIC -fno-common,;t t +s,@LDFLAGS@,,;t t +s,@CPPFLAGS@,,;t t +s,@ac_ct_CC@,cc,;t t +s,@EXEEXT@,,;t t +s,@OBJEXT@,o,;t t +s,@FC@,g77,;t t +s,@RANLIB@,ranlib,;t t +s,@ac_ct_RANLIB@,ranlib,;t t +s,@CPP@,cc -E,;t t +s,@EGREP@,grep -E,;t t +s,@GCCVERSION@,,;t t +s,@ARCH@,i386,;t t +s,@LIBPRE@,,;t t +s,@SHLIB_LD@,cc -dynamiclib,;t t +s,@SHLIB_SUFFIX@,.dylib,;t t +s,@F77_WRAPPERS@,${FITSIO_SRC},;t t +s,@my_shmem@,${SOURCES_SHMEM},;t t +s,@LIBOBJS@,,;t t +s,@LTLIBOBJS@,,;t t +CEOF + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + sed "/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done + +{ (exit 0); exit 0; } diff --git a/software/cfitsio3040/configure b/software/cfitsio3040/configure new file mode 100755 index 000000000..7a25bf995 --- /dev/null +++ b/software/cfitsio3040/configure @@ -0,0 +1,5950 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="fitscore.c" +ac_default_prefix=`pwd` +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_ROOT uname_found CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT FC RANLIB ac_ct_RANLIB CPP EGREP GCCVERSION ARCH LIBPRE SHLIB_LD SHLIB_SUFFIX F77_WRAPPERS my_shmem LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-hera Build for HERA project (for LHEA use only) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gsiftp-flavour[=PATH] Enable Globus Toolkit gsiftp protocol support + --with-gsiftp[=PATH] Enable Globus Toolkit gsiftp protocol support + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + +#-------------------------------------------------------------------- +# Command options +#-------------------------------------------------------------------- + +# Check whether --enable-hera or --disable-hera was given. +if test "${enable_hera+set}" = set; then + enableval="$enable_hera" + if test $enableval = yes; then BUILD_HERA=yes; fi + +fi; +if test "x$BUILD_HERA" = xyes; then + cat >>confdefs.h <<\_ACEOF +#define BUILD_HERA 1 +_ACEOF + +fi + + +# Check whether --with-gsiftp-flavour or --without-gsiftp-flavour was given. +if test "${with_gsiftp_flavour+set}" = set; then + withval="$with_gsiftp_flavour" + if test "x$withval" != "xno"; then + + if test "x$withval" != "xyes" ; then + GSIFTP_FLAVOUR=${withval} + fi + +cat >>confdefs.h <<\_ACEOF +#define GSIFTP_FLAVOUR 1 +_ACEOF + + fi + + +fi; + + +# Check whether --with-gsiftp or --without-gsiftp was given. +if test "${with_gsiftp+set}" = set; then + withval="$with_gsiftp" + if test "x$withval" != "xno"; then + + if test "x$withval" != "xyes" ; then + CFLAGS="$CFLAGS -I${withval}/include/${GSIFTP_FLAVOUR}" + LDFLAGS="$LDFLAGS -L${withval}/lib -lglobus_ftp_client_${GSIFTP_FLAVOUR}" + HAVE_GSIFTP=yes + fi + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GSIFTP 1 +_ACEOF + + fi + + +fi; + +#-------------------------------------------------------------------- +# Check for install location prefix +#-------------------------------------------------------------------- + + + +# make will complain about duplicate targets for the install directories +# if prefix == exec_prefix +INSTALL_ROOT='${prefix}' + +test "$exec_prefix" != NONE -a "$prefix" != "$exec_prefix" \ + && INSTALL_ROOT="$INSTALL_ROOT "'${exec_prefix}' + + +#-------------------------------------------------------------------- +# Check "uname" to determine system type +#-------------------------------------------------------------------- +# Extract the first word of "uname", so it can be a program name with args. +set dummy uname; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_uname_found+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$uname_found"; then + ac_cv_prog_uname_found="$uname_found" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_uname_found="1" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_uname_found" && ac_cv_prog_uname_found="0" +fi +fi +uname_found=$ac_cv_prog_uname_found +if test -n "$uname_found"; then + echo "$as_me:$LINENO: result: $uname_found" >&5 +echo "${ECHO_T}$uname_found" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test $uname_found -eq 0 ; then + echo "cfitsio: No uname found; setting system type to unknown." + system="unknown" +else + system=`uname -s`-`uname -r` +fi + + + +# Try first to find a proprietary C compiler, then gcc +if test "x$CC" = x; then + for ac_prog in cc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break +done + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +for ac_prog in f77 xlf cf77 gf77 g77 af77 ncf f2c ifort g95 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_FC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + echo "$as_me:$LINENO: result: $FC" >&5 +echo "${ECHO_T}$FC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$FC" && break +done +test -n "$FC" || FC="nope" + +if test $FC = 'nope' ; then + { echo "$as_me:$LINENO: WARNING: cfitsio: == No acceptable f77 found in \$PATH" >&5 +echo "$as_me: WARNING: cfitsio: == No acceptable f77 found in \$PATH" >&2;} + { echo "$as_me:$LINENO: WARNING: cfitsio: == Cfitsio will be built without Fortran wrapper support" >&5 +echo "$as_me: WARNING: cfitsio: == Cfitsio will be built without Fortran wrapper support" >&2;} + FC= + F77_WRAPPERS= +else + CFORTRANFLAGS= + F77_WRAPPERS="\${FITSIO_SRC}" + echo $ac_n "checking whether we are using GNU Fortran""... $ac_c" 1>&6 + if test `$FC --version -c < /dev/null 2> /dev/null | grep -c GNU` -gt 0 -o \ + `$FC --version -c < /dev/null 2> /dev/null | grep -ic egcs` -gt 0 + then + echo "$ac_t""yes" 1>&6 + echo $ac_n "cfitsio: == Adding wrapper support for GNU Fortran""... $ac_c" 1>&6 + CFORTRANFLAGS="-Dg77Fortran" + echo "$ac_t"" done" 1>&6 + else + echo "$ac_t""no" 1>&6 + if test $FC = 'f2c' ; then + echo $ac_n "cfitsio: == Adding wrapper support for f2c""... $ac_c" 1>&6 + CFORTRANFLAGS="-Df2cFortran" + echo "$ac_t"" done" 1>&6 + fi + fi +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + +for ac_header in stdlib.h string.h math.h limits.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ANSI_HEADER=yes +else + ANSI_HEADER=no +fi + +done + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +void d( int , double) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + PROTO=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +PROTO=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ANSI_HEADER = no -o $PROTO = no; then + echo " *********** WARNING: CFITSIO CONFIGURE FAILURE ************ " + echo "cfitsio: ANSI C environment NOT found. Aborting cfitsio configure." + if test $ANSI_HEADER = no; then + echo "cfitsio: You're missing a needed ANSI header file." + fi + if test $PROTO = no; then + echo "cfitsio: Your compiler can't do ANSI function prototypes." + fi + echo "cfitsio: You need an ANSI C compiler and all ANSI trappings" + echo "cfitsio: to build cfitsio. " + echo " ******************************************************* " + exit 0; +fi + +CFLAGS="$CFLAGS" +LIBPRE="" + +case $system in + Darwin-*) + # Darwin can be powerpc or i386 + ARCH=`uname -p` + EXT="darwin" + # For large file support (but may break Absoft compilers): + cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + + ;; + SunOS-4*) + ARCH="sun" + EXT="sun" + ;; + HP-UX-*) + ARCH="hp" + EXT="hpu" + if test "x$CFORTRANFLAGS" = x ; then + CFORTRANFLAGS="-Dappendus" + fi + CFLAGS="$CFLAGS -DPG_PPU" + LIBPRE="-Wl," + ;; + SunOS-5*) + ARCH="solaris" + EXT="sol" + if test "x$CFORTRANFLAGS" = x ; then + CFORTRANFLAGS="-Dsolaris" + fi + # For large file support: + cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + + ;; + OSF1*) + ARCH="alpha" + EXT="osf" + ;; + IRIX*) + ARCH="sgi" + EXT="sgi" + CFLAGS="$CFLAGS -DHAVE_POSIX_SIGNALS" + RANLIB="touch" + ;; + ULTRIX*) + ARCH="dec" + EXT="dec" + ;; + Linux*) + ARCH="linux" + EXT="lnx" + # For large file support: + cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + + ;; + FREEBSD*|FreeBSD*) + ARCH="linux" + EXT="lnx" + ;; + CYGWIN*) + ARCH="cygwin" + EXT="cygwin" + CFLAGS="$CFLAGS -DHAVE_POSIX_SIGNALS" + ;; + *) + echo "cfitsio: == Don't know what do do with $system" + ;; +esac + +CFLAGS="$CFLAGS $CFORTRANFLAGS" + +case $CC in + gcc) + GCCVERSION="`gcc -dumpversion 2>&1`" + echo "cfitsio: == Using gcc version $GCCVERSION" + + + gcc_test=`echo $GCCVERSION | grep -c '2\.[45678]'` + + if test $gcc_test -gt 0 + then + + CFLAGS=`echo $CFLAGS | sed 's:-O[^ ]* *::'` + + { echo "$as_me:$LINENO: WARNING: This gcc is pretty old. Disabling optimization to be safe." >&5 +echo "$as_me: WARNING: This gcc is pretty old. Disabling optimization to be safe." >&2;} + fi + ;; + cc) + echo "cfitsio: Old CFLAGS is $CFLAGS" + CFLAGS=`echo $CFLAGS | sed -e "s/-g/-O/"` + case $system in + SunOS-5*) + + if test `echo $CFLAGS | grep -c fast` -gt 0 + then + echo "cfitsio: Replacing -fast with -O3" + CFLAGS=`echo $CFLAGS | sed 's:-fast:-O3:'` + fi + + CFLAGS="$CFLAGS -DHAVE_ALLOCA_H -DHAVE_POSIX_SIGNALS" + ;; + *) + echo "== No special changes for $system" + ;; + esac + echo "New CFLAGS is $CFLAGS" + ;; + *) + # Don't do anything now + ;; +esac + +# Shared library section +#------------------------------------------------------------------------------- +SHLIB_LD=: +SHLIB_SUFFIX=".so" +lhea_shlib_cflags= +case $EXT in + cygwin) + SHLIB_LD="$CC -shared" + SHLIB_SUFFIX=".dll" + ;; + darwin) + SHLIB_LD="$CC -dynamiclib" + SHLIB_SUFFIX=".dylib" + lhea_shlib_cflags="-fPIC -fno-common" + ;; + hpu) + SHLIB_LD="ld -b" + SHLIB_SUFFIX=".sl" + ;; + lnx) + SHLIB_LD=":" + ;; + osf) + SHLIB_LD="ld -shared -expect_unresolved '*'" + LD_FLAGS="-taso" + ;; + sol) + SHLIB_LD="/usr/ccs/bin/ld -G" + lhea_shlib_cflags="-KPIC" + ;; + sgi) + SHLIB_LD="ld -shared -rdata_shared" + ;; + *) + { echo "$as_me:$LINENO: WARNING: Unable to determine how to make a shared library" >&5 +echo "$as_me: WARNING: Unable to determine how to make a shared library" >&2;} + ;; +esac +# Darwin uses gcc (=cc), but needs different flags (see above) +# if test "x$GCC" = xyes; then +if test "x$GCC" = xyes && test "x$EXT" != xdarwin && test "x$EXT" != xcygwin; then + SHLIB_LD="$CC -shared" + lhea_shlib_cflags='-fPIC' +fi +if test "x$lhea_shlib_cflags" != x; then + CFLAGS="$CFLAGS $lhea_shlib_cflags" +fi + + + +# ================= test for the unix ftruncate function ================ + +echo "$as_me:$LINENO: checking \"whether ftruncate works\"" >&5 +echo $ECHO_N "checking \"whether ftruncate works\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ + +ftruncate(0, 0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FTRUNCATE 1 +_ACEOF + +echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +# --------------------------------------------------------- +# some systems define long long for 64-bit ints +# --------------------------------------------------------- + +echo "$as_me:$LINENO: checking \"whether long long is defined\"" >&5 +echo $ECHO_N "checking \"whether long long is defined\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ + +long long filler; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONGLONG 1 +_ACEOF + +echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +# ==================== SHARED MEMORY DRIVER SECTION ======================= +# +# 09-Mar-98 : modified by JB/ISDC +# 3 checks added to support autoconfiguration of shared memory +# driver. First generic check is made whether shared memory is supported +# at all, then 2 more specific checks are made (architecture dependent). +# Currently tested on : sparc-solaris, intel-linux, sgi-irix, dec-alpha-osf + +# ------------------------------------------------------------------------- +# check is System V IPC is supported on this machine +# ------------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking \"whether system V style IPC services are supported\"" >&5 +echo $ECHO_N "checking \"whether system V style IPC services are supported\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ + +shmat(0, 0, 0); +shmdt(0); +shmget(0, 0, 0); +semget(0, 0, 0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHMEM_SERVICES 1 +_ACEOF + +my_shmem=\${SOURCES_SHMEM} +echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + +# ------------------------------------------------------------------------- +# some systems define flock_t, for others we have to define it ourselves +# ------------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking \"do we have flock_t defined in sys/fcntl.h\"" >&5 +echo $ECHO_N "checking \"do we have flock_t defined in sys/fcntl.h\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ + +flock_t filler; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FLOCK_T 1 +_ACEOF + +echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test "$HAVE_FLOCK_T" != 1; then + echo "$as_me:$LINENO: checking \"do we have flock_t defined in sys/flock.h\"" >&5 +echo $ECHO_N "checking \"do we have flock_t defined in sys/flock.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ + + flock_t filler; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_FLOCK_T 1 +_ACEOF + + echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +# ------------------------------------------------------------------------- +# there are some idiosyncrasies with semun defs (used in semxxx). Solaris +# does not define it at all +# ------------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking \"do we have union semun defined\"" >&5 +echo $ECHO_N "checking \"do we have union semun defined\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ + +union semun filler; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNION_SEMUN 1 +_ACEOF + +echo "$as_me:$LINENO: result: \"yes\"" >&5 +echo "${ECHO_T}\"yes\"" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: \"no\"" >&5 +echo "${ECHO_T}\"no\"" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +# ==================== END OF SHARED MEMORY DRIVER SECTION ================ +# ================= test for the unix networking functions ================ + +echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_gethostbyname=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_gethostbyname" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 +if test "$ac_cv_search_gethostbyname" != no; then + test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" + cfitsio_have_nsl=1 +else + cfitsio_have_nsl=0 +fi + +echo "$as_me:$LINENO: checking for library containing connect" >&5 +echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 +if test "${ac_cv_search_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_connect=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_connect="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_connect" = no; then + for ac_lib in socket; do + LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_connect="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +echo "${ECHO_T}$ac_cv_search_connect" >&6 +if test "$ac_cv_search_connect" != no; then + test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" + cfitsio_have_socket=1 +else + cfitsio_have_socket=0 +fi + + +if test "$cfitsio_have_nsl" = 1 -a "$cfitsio_have_socket" = 1; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_NET_SERVICES 1 +_ACEOF + +fi + +# ==================== END OF unix networking SECTION ================ + + + ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_ROOT@,$INSTALL_ROOT,;t t +s,@uname_found@,$uname_found,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@FC@,$FC,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@GCCVERSION@,$GCCVERSION,;t t +s,@ARCH@,$ARCH,;t t +s,@LIBPRE@,$LIBPRE,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@F77_WRAPPERS@,$F77_WRAPPERS,;t t +s,@my_shmem@,$my_shmem,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + ac_config_files="$ac_config_files cfitsio.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "cfitsio.pc" ) CONFIG_FILES="$CONFIG_FILES cfitsio.pc" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_ROOT@,$INSTALL_ROOT,;t t +s,@uname_found@,$uname_found,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@FC@,$FC,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@GCCVERSION@,$GCCVERSION,;t t +s,@ARCH@,$ARCH,;t t +s,@LIBPRE@,$LIBPRE,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@F77_WRAPPERS@,$F77_WRAPPERS,;t t +s,@my_shmem@,$my_shmem,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + + +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: Congratulations, Makefile update was successful." >&5 +echo "${ECHO_T} Congratulations, Makefile update was successful." >&6 +echo "$as_me:$LINENO: result: You may want to run \"make\" now." >&5 +echo "${ECHO_T} You may want to run \"make\" now." >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + diff --git a/software/cfitsio3040/configure.in b/software/cfitsio3040/configure.in new file mode 100644 index 000000000..e68045600 --- /dev/null +++ b/software/cfitsio3040/configure.in @@ -0,0 +1,423 @@ +# +# configure.in for cfitsio +# +# /redshift/sgi6/lheavc/ftools/cfitsio/configure.in,v 3.4 1996/07/26 20:27:53 pence Exp +# +# copied from host and modified +# + +dnl Process this file with autoconf to produce a configure script. +AC_INIT +AC_CONFIG_SRCDIR([fitscore.c]) + +#-------------------------------------------------------------------- +# Command options +#-------------------------------------------------------------------- + +AC_ARG_ENABLE( + hera, + [ --enable-hera Build for HERA project (for LHEA use only) ], + [ if test $enableval = yes; then BUILD_HERA=yes; fi ] +) +if test "x$BUILD_HERA" = xyes; then + AC_DEFINE(BUILD_HERA) +fi + +AC_ARG_WITH( + gsiftp-flavour, + [ --with-gsiftp-flavour[[=PATH]] Enable Globus Toolkit gsiftp protocol support ], + [ if test "x$withval" != "xno"; then + + if test "x$withval" != "xyes" ; then + GSIFTP_FLAVOUR=${withval} + fi + AC_DEFINE(GSIFTP_FLAVOUR,1,[Define Globus Toolkit architecture]) + fi + ] +) + +AC_ARG_WITH( + gsiftp, + [ --with-gsiftp[[=PATH]] Enable Globus Toolkit gsiftp protocol support ], + [ if test "x$withval" != "xno"; then + + if test "x$withval" != "xyes" ; then + CFLAGS="$CFLAGS -I${withval}/include/${GSIFTP_FLAVOUR}" + LDFLAGS="$LDFLAGS -L${withval}/lib -lglobus_ftp_client_${GSIFTP_FLAVOUR}" + HAVE_GSIFTP=yes + fi + AC_DEFINE(HAVE_GSIFTP,1,[Define if you want Globus Toolkit gsiftp protocol support]) + fi + ] +) + +#-------------------------------------------------------------------- +# Check for install location prefix +#-------------------------------------------------------------------- + +AC_PREFIX_DEFAULT(`pwd`) + +# make will complain about duplicate targets for the install directories +# if prefix == exec_prefix +AC_SUBST(INSTALL_ROOT,'${prefix}') +test "$exec_prefix" != NONE -a "$prefix" != "$exec_prefix" \ + && INSTALL_ROOT="$INSTALL_ROOT "'${exec_prefix}' + + +#-------------------------------------------------------------------- +# Check "uname" to determine system type +#-------------------------------------------------------------------- +AC_CHECK_PROG([uname_found],[uname],[1],[0]) +if test $uname_found -eq 0 ; then + echo "cfitsio: No uname found; setting system type to unknown." + system="unknown" +else + system=`uname -s`-`uname -r` +fi + + +dnl Checks for programs. + +# Try first to find a proprietary C compiler, then gcc +if test "x$CC" = x; then + AC_CHECK_PROGS(CC, cc) +fi +AC_PROG_CC + +AC_CHECK_PROGS(FC, f77 xlf cf77 gf77 g77 af77 ncf f2c ifort g95 , nope) +if test $FC = 'nope' ; then + AC_MSG_WARN(cfitsio: == No acceptable f77 found in \$PATH) + AC_MSG_WARN(cfitsio: == Cfitsio will be built without Fortran wrapper support) + FC= + F77_WRAPPERS= +else + CFORTRANFLAGS= + F77_WRAPPERS="\${FITSIO_SRC}" + echo $ac_n "checking whether we are using GNU Fortran""... $ac_c" 1>&6 + if test `$FC --version -c < /dev/null 2> /dev/null | grep -c GNU` -gt 0 -o \ + `$FC --version -c < /dev/null 2> /dev/null | grep -ic egcs` -gt 0 + then + echo "$ac_t""yes" 1>&6 + echo $ac_n "cfitsio: == Adding wrapper support for GNU Fortran""... $ac_c" 1>&6 + CFORTRANFLAGS="-Dg77Fortran" + echo "$ac_t"" done" 1>&6 + else + echo "$ac_t""no" 1>&6 + if test $FC = 'f2c' ; then + echo $ac_n "cfitsio: == Adding wrapper support for f2c""... $ac_c" 1>&6 + CFORTRANFLAGS="-Df2cFortran" + echo "$ac_t"" done" 1>&6 + fi + fi +fi + +AC_PROG_RANLIB + +dnl Checks for ANSI stdlib.h. +AC_CHECK_HEADERS(stdlib.h string.h math.h limits.h ,ANSI_HEADER=yes,ANSI_HEADER=no)dnl + +dnl Check if prototyping is allowed. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void d( int , double) ]])],[PROTO=yes],[PROTO=no])dnl + +if test $ANSI_HEADER = no -o $PROTO = no; then + echo " *********** WARNING: CFITSIO CONFIGURE FAILURE ************ " + echo "cfitsio: ANSI C environment NOT found. Aborting cfitsio configure." + if test $ANSI_HEADER = no; then + echo "cfitsio: You're missing a needed ANSI header file." + fi + if test $PROTO = no; then + echo "cfitsio: Your compiler can't do ANSI function prototypes." + fi + echo "cfitsio: You need an ANSI C compiler and all ANSI trappings" + echo "cfitsio: to build cfitsio. " + echo " ******************************************************* " + exit 0; +fi + +CFLAGS="$CFLAGS" +LIBPRE="" + +case $system in + Darwin-*) + # Darwin can be powerpc or i386 + ARCH=`uname -p` + EXT="darwin" + # For large file support (but may break Absoft compilers): + AC_DEFINE(_LARGEFILE_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) + ;; + SunOS-4*) + ARCH="sun" + EXT="sun" + ;; + HP-UX-*) + ARCH="hp" + EXT="hpu" + if test "x$CFORTRANFLAGS" = x ; then + CFORTRANFLAGS="-Dappendus" + fi + CFLAGS="$CFLAGS -DPG_PPU" + LIBPRE="-Wl," + ;; + SunOS-5*) + ARCH="solaris" + EXT="sol" + if test "x$CFORTRANFLAGS" = x ; then + CFORTRANFLAGS="-Dsolaris" + fi + # For large file support: + AC_DEFINE(_LARGEFILE_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) + ;; + OSF1*) + ARCH="alpha" + EXT="osf" + ;; + IRIX*) + ARCH="sgi" + EXT="sgi" + CFLAGS="$CFLAGS -DHAVE_POSIX_SIGNALS" + RANLIB="touch" + ;; + ULTRIX*) + ARCH="dec" + EXT="dec" + ;; + Linux*) + ARCH="linux" + EXT="lnx" + # For large file support: + AC_DEFINE(_LARGEFILE_SOURCE) + AC_DEFINE(_FILE_OFFSET_BITS,64) + ;; + FREEBSD*|FreeBSD*) + ARCH="linux" + EXT="lnx" + ;; + CYGWIN*) + ARCH="cygwin" + EXT="cygwin" + CFLAGS="$CFLAGS -DHAVE_POSIX_SIGNALS" + ;; + *) + echo "cfitsio: == Don't know what do do with $system" + ;; +esac + +CFLAGS="$CFLAGS $CFORTRANFLAGS" + +case $CC in + gcc) + GCCVERSION="`gcc -dumpversion 2>&1`" + echo "cfitsio: == Using gcc version $GCCVERSION" + AC_SUBST(GCCVERSION) + changequote(,) + gcc_test=`echo $GCCVERSION | grep -c '2\.[45678]'` + changequote([,]) + if test $gcc_test -gt 0 + then + changequote(,) + CFLAGS=`echo $CFLAGS | sed 's:-O[^ ]* *::'` + changequote([,]) + AC_MSG_WARN(This gcc is pretty old. Disabling optimization to be safe.) + fi + ;; + cc) + echo "cfitsio: Old CFLAGS is $CFLAGS" + CFLAGS=`echo $CFLAGS | sed -e "s/-g/-O/"` + case $system in + SunOS-5*) + changequote(,) + if test `echo $CFLAGS | grep -c fast` -gt 0 + then + echo "cfitsio: Replacing -fast with -O3" + CFLAGS=`echo $CFLAGS | sed 's:-fast:-O3:'` + fi + changequote([,]) + CFLAGS="$CFLAGS -DHAVE_ALLOCA_H -DHAVE_POSIX_SIGNALS" + ;; + *) + echo "== No special changes for $system" + ;; + esac + echo "New CFLAGS is $CFLAGS" + ;; + *) + # Don't do anything now + ;; +esac + +# Shared library section +#------------------------------------------------------------------------------- +SHLIB_LD=: +SHLIB_SUFFIX=".so" +lhea_shlib_cflags= +case $EXT in + cygwin) + SHLIB_LD="$CC -shared" + SHLIB_SUFFIX=".dll" + ;; + darwin) + SHLIB_LD="$CC -dynamiclib" + SHLIB_SUFFIX=".dylib" + lhea_shlib_cflags="-fPIC -fno-common" + ;; + hpu) + SHLIB_LD="ld -b" + SHLIB_SUFFIX=".sl" + ;; + lnx) + SHLIB_LD=":" + ;; + osf) + SHLIB_LD="ld -shared -expect_unresolved '*'" + LD_FLAGS="-taso" + ;; + sol) + SHLIB_LD="/usr/ccs/bin/ld -G" + lhea_shlib_cflags="-KPIC" + ;; + sgi) + SHLIB_LD="ld -shared -rdata_shared" + ;; + *) + AC_MSG_WARN(Unable to determine how to make a shared library) + ;; +esac +# Darwin uses gcc (=cc), but needs different flags (see above) +# if test "x$GCC" = xyes; then +if test "x$GCC" = xyes && test "x$EXT" != xdarwin && test "x$EXT" != xcygwin; then + SHLIB_LD="$CC -shared" + lhea_shlib_cflags='-fPIC' +fi +if test "x$lhea_shlib_cflags" != x; then + CFLAGS="$CFLAGS $lhea_shlib_cflags" +fi + +AC_SUBST(ARCH)dnl +AC_SUBST(CFLAGS)dnl +AC_SUBST(CC)dnl +AC_SUBST(FC)dnl +AC_SUBST(LIBPRE)dnl +AC_SUBST(SHLIB_LD)dnl +AC_SUBST(SHLIB_SUFFIX)dnl +AC_SUBST(F77_WRAPPERS) + +# ================= test for the unix ftruncate function ================ + +AC_MSG_CHECKING("whether ftruncate works") +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +]], [[ +ftruncate(0, 0); +]])],[ +AC_DEFINE(HAVE_FTRUNCATE) +AC_MSG_RESULT("yes") +],[AC_MSG_RESULT("no") ]) + +# --------------------------------------------------------- +# some systems define long long for 64-bit ints +# --------------------------------------------------------- + +AC_MSG_CHECKING("whether long long is defined") +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +]], [[ +long long filler; +]])],[ +AC_DEFINE(HAVE_LONGLONG) +AC_MSG_RESULT("yes") +],[AC_MSG_RESULT("no") ]) + +# ==================== SHARED MEMORY DRIVER SECTION ======================= +# +# 09-Mar-98 : modified by JB/ISDC +# 3 checks added to support autoconfiguration of shared memory +# driver. First generic check is made whether shared memory is supported +# at all, then 2 more specific checks are made (architecture dependent). +# Currently tested on : sparc-solaris, intel-linux, sgi-irix, dec-alpha-osf + +# ------------------------------------------------------------------------- +# check is System V IPC is supported on this machine +# ------------------------------------------------------------------------- + +AC_MSG_CHECKING("whether system V style IPC services are supported") +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include +#include +]], [[ +shmat(0, 0, 0); +shmdt(0); +shmget(0, 0, 0); +semget(0, 0, 0); +]])],[ +AC_DEFINE(HAVE_SHMEM_SERVICES) +my_shmem=\${SOURCES_SHMEM} +AC_MSG_RESULT("yes") +],[AC_MSG_RESULT("no") ]) + +AC_SUBST(my_shmem) + +# ------------------------------------------------------------------------- +# some systems define flock_t, for others we have to define it ourselves +# ------------------------------------------------------------------------- + +AC_MSG_CHECKING("do we have flock_t defined in sys/fcntl.h") +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +]], [[ +flock_t filler; +]])],[ +AC_DEFINE(HAVE_FLOCK_T) +AC_MSG_RESULT("yes") +],[AC_MSG_RESULT("no") ]) + +if test "$HAVE_FLOCK_T" != 1; then + AC_MSG_CHECKING("do we have flock_t defined in sys/flock.h") + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + ]], [[ + flock_t filler; + ]])],[ + AC_DEFINE(HAVE_FLOCK_T) + AC_MSG_RESULT("yes") + ],[AC_MSG_RESULT("no") ]) +fi + +# ------------------------------------------------------------------------- +# there are some idiosyncrasies with semun defs (used in semxxx). Solaris +# does not define it at all +# ------------------------------------------------------------------------- + +AC_MSG_CHECKING("do we have union semun defined") +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#include +#include +]], [[ +union semun filler; +]])],[ +AC_DEFINE(HAVE_UNION_SEMUN) +AC_MSG_RESULT("yes") +],[AC_MSG_RESULT("no") ]) + +# ==================== END OF SHARED MEMORY DRIVER SECTION ================ +# ================= test for the unix networking functions ================ + +AC_SEARCH_LIBS([gethostbyname], [nsl], cfitsio_have_nsl=1, cfitsio_have_nsl=0) +AC_SEARCH_LIBS([connect], [socket], cfitsio_have_socket=1, + cfitsio_have_socket=0, [-lnsl]) + +if test "$cfitsio_have_nsl" = 1 -a "$cfitsio_have_socket" = 1; then + AC_DEFINE(HAVE_NET_SERVICES) +fi + +# ==================== END OF unix networking SECTION ================ + + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +AC_CONFIG_FILES([cfitsio.pc]) +AC_OUTPUT + + +AC_MSG_RESULT([]) +AC_MSG_RESULT([ Congratulations, Makefile update was successful.]) +AC_MSG_RESULT([ You may want to run \"make\" now.]) +AC_MSG_RESULT([]) + diff --git a/software/cfitsio3040/cookbook.c b/software/cfitsio3040/cookbook.c new file mode 100644 index 000000000..3b42ac617 --- /dev/null +++ b/software/cfitsio3040/cookbook.c @@ -0,0 +1,571 @@ +#include +#include +#include + +/* + Every program which uses the CFITSIO interface must include the + the fitsio.h header file. This contains the prototypes for all + the routines and defines the error status values and other symbolic + constants used in the interface. +*/ +#include "fitsio.h" + +int main( void ); +void writeimage( void ); +void writeascii( void ); +void writebintable( void ); +void copyhdu( void ); +void selectrows( void ); +void readheader( void ); +void readimage( void ); +void readtable( void ); +void printerror( int status); + +int main() +{ +/************************************************************************* + This is a simple main program that calls the following routines: + + writeimage - write a FITS primary array image + writeascii - write a FITS ASCII table extension + writebintable - write a FITS binary table extension + copyhdu - copy a header/data unit from one FITS file to another + selectrows - copy selected row from one HDU to another + readheader - read and print the header keywords in every extension + readimage - read a FITS image and compute the min and max value + readtable - read columns of data from ASCII and binary tables + +**************************************************************************/ + + writeimage(); + writeascii(); + writebintable(); + copyhdu(); + selectrows(); + readheader(); + readimage(); + readtable(); + + printf("\nAll the cfitsio cookbook routines ran successfully.\n"); + return(0); +} +/*--------------------------------------------------------------------------*/ +void writeimage( void ) + + /******************************************************/ + /* Create a FITS primary array containing a 2-D image */ + /******************************************************/ +{ + fitsfile *fptr; /* pointer to the FITS file, defined in fitsio.h */ + int status, ii, jj; + long fpixel, nelements, exposure; + unsigned short *array[200]; + + /* initialize FITS image parameters */ + char filename[] = "atestfil.fit"; /* name for new FITS file */ + int bitpix = USHORT_IMG; /* 16-bit unsigned short pixel values */ + long naxis = 2; /* 2-dimensional image */ + long naxes[2] = { 300, 200 }; /* image is 300 pixels wide by 200 rows */ + + /* allocate memory for the whole image */ + array[0] = (unsigned short *)malloc( naxes[0] * naxes[1] + * sizeof( unsigned short ) ); + + /* initialize pointers to the start of each row of the image */ + for( ii=1; ii 0) + { + nbuffer = npixels; + if (npixels > buffsize) + nbuffer = buffsize; /* read as many pixels as will fit in buffer */ + + /* Note that even though the FITS images contains unsigned integer */ + /* pixel values (or more accurately, signed integer pixels with */ + /* a bias of 32768), this routine is reading the values into a */ + /* float array. Cfitsio automatically performs the datatype */ + /* conversion in cases like this. */ + + if ( fits_read_img(fptr, TFLOAT, fpixel, nbuffer, &nullval, + buffer, &anynull, &status) ) + printerror( status ); + + for (ii = 0; ii < nbuffer; ii++) { + if ( buffer[ii] < datamin ) + datamin = buffer[ii]; + + if ( buffer[ii] > datamax ) + datamax = buffer[ii]; + } + npixels -= nbuffer; /* increment remaining number of pixels */ + fpixel += nbuffer; /* next pixel to be read in image */ + } + + printf("\nMin and max image pixels = %.0f, %.0f\n", datamin, datamax); + + if ( fits_close_file(fptr, &status) ) + printerror( status ); + + return; +} +/*--------------------------------------------------------------------------*/ +void readtable( void ) + + /************************************************************/ + /* read and print data values from an ASCII or binary table */ + /************************************************************/ +{ + fitsfile *fptr; /* pointer to the FITS file, defined in fitsio.h */ + int status, hdunum, hdutype, nfound, anynull, ii; + long frow, felem, nelem, longnull, dia[6]; + float floatnull, den[6]; + char strnull[10], *name[6], *ttype[3]; + + char filename[] = "atestfil.fit"; /* name of existing FITS file */ + + status = 0; + + if ( fits_open_file(&fptr, filename, READONLY, &status) ) + printerror( status ); + + for (ii = 0; ii < 3; ii++) /* allocate space for the column labels */ + ttype[ii] = (char *) malloc(FLEN_VALUE); /* max label length = 69 */ + + for (ii = 0; ii < 6; ii++) /* allocate space for string column value */ + name[ii] = (char *) malloc(10); + + for (hdunum = 2; hdunum <= 3; hdunum++) /*read ASCII, then binary table */ + { + /* move to the HDU */ + if ( fits_movabs_hdu(fptr, hdunum, &hdutype, &status) ) + printerror( status ); + + if (hdutype == ASCII_TBL) + printf("\nReading ASCII table in HDU %d:\n", hdunum); + else if (hdutype == BINARY_TBL) + printf("\nReading binary table in HDU %d:\n", hdunum); + else + { + printf("Error: this HDU is not an ASCII or binary table\n"); + printerror( status ); + } + + /* read the column names from the TTYPEn keywords */ + fits_read_keys_str(fptr, "TTYPE", 1, 3, ttype, &nfound, &status); + + printf(" Row %10s %10s %10s\n", ttype[0], ttype[1], ttype[2]); + + frow = 1; + felem = 1; + nelem = 6; + strcpy(strnull, " "); + longnull = 0; + floatnull = 0.; + + /* read the columns */ + fits_read_col(fptr, TSTRING, 1, frow, felem, nelem, strnull, name, + &anynull, &status); + fits_read_col(fptr, TLONG, 2, frow, felem, nelem, &longnull, dia, + &anynull, &status); + fits_read_col(fptr, TFLOAT, 3, frow, felem, nelem, &floatnull, den, + &anynull, &status); + + for (ii = 0; ii < 6; ii++) + printf("%5d %10s %10ld %10.2f\n", ii + 1, name[ii], dia[ii], den[ii]); + } + + for (ii = 0; ii < 3; ii++) /* free the memory for the column labels */ + free( ttype[ii] ); + + for (ii = 0; ii < 6; ii++) /* free the memory for the string column */ + free( name[ii] ); + + if ( fits_close_file(fptr, &status) ) + printerror( status ); + + return; +} +/*--------------------------------------------------------------------------*/ +void printerror( int status) +{ + /*****************************************************/ + /* Print out cfitsio error messages and exit program */ + /*****************************************************/ + + + if (status) + { + fits_report_error(stderr, status); /* print error report */ + + exit( status ); /* terminate the program, returning error status */ + } + return; +} diff --git a/software/cfitsio3040/cookbook.f b/software/cfitsio3040/cookbook.f new file mode 100644 index 000000000..8becfdd20 --- /dev/null +++ b/software/cfitsio3040/cookbook.f @@ -0,0 +1,772 @@ + program main + +C This is the FITSIO cookbook program that contains an annotated listing of +C various computer programs that read and write files in FITS format +C using the FITSIO subroutine interface. These examples are +C working programs which users may adapt and modify for their own +C purposes. This Cookbook serves as a companion to the FITSIO User's +C Guide that provides more complete documentation on all the +C available FITSIO subroutines. + +C Call each subroutine in turn: + + call writeimage + call writeascii + call writebintable + call copyhdu + call selectrows + call readheader + call readimage + call readtable + print * + print *,"All the fitsio cookbook routines ran successfully." + + end +C ************************************************************************* + subroutine writeimage + +C Create a FITS primary array containing a 2-D image + + integer status,unit,blocksize,bitpix,naxis,naxes(2) + integer i,j,group,fpixel,nelements,array(300,200) + character filename*80 + logical simple,extend + +C The STATUS parameter must be initialized before using FITSIO. A +C positive value of STATUS is returned whenever a serious error occurs. +C FITSIO uses an `inherited status' convention, which means that if a +C subroutine is called with a positive input value of STATUS, then the +C subroutine will exit immediately, preserving the status value. For +C simplicity, this program only checks the status value at the end of +C the program, but it is usually better practice to check the status +C value more frequently. + + status=0 + +C Name of the FITS file to be created: + filename='ATESTFILEZ.FITS' + +C Delete the file if it already exists, so we can then recreate it. +C The deletefile subroutine is listed at the end of this file. + call deletefile(filename,status) + +C Get an unused Logical Unit Number to use to open the FITS file. +C This routine is not required; programmers can choose any unused +C unit number to open the file. + call ftgiou(unit,status) + +C Create the new empty FITS file. The blocksize parameter is a +C historical artifact and the value is ignored by FITSIO. + blocksize=1 + call ftinit(unit,filename,blocksize,status) + +C Initialize parameters about the FITS image. +C BITPIX = 16 means that the image pixels will consist of 16-bit +C integers. The size of the image is given by the NAXES values. +C The EXTEND = TRUE parameter indicates that the FITS file +C may contain extensions following the primary array. + simple=.true. + bitpix=16 + naxis=2 + naxes(1)=300 + naxes(2)=200 + extend=.true. + +C Write the required header keywords to the file + call ftphpr(unit,simple,bitpix,naxis,naxes,0,1,extend,status) + +C Initialize the values in the image with a linear ramp function + do j=1,naxes(2) + do i=1,naxes(1) + array(i,j)=i - 1 +j - 1 + end do + end do + +C Write the array to the FITS file. +C The last letter of the subroutine name defines the datatype of the +C array argument; in this case the 'J' indicates that the array has an +C integer*4 datatype. ('I' = I*2, 'E' = Real*4, 'D' = Real*8). +C The 2D array is treated as a single 1-D array with NAXIS1 * NAXIS2 +C total number of pixels. GROUP is seldom used parameter that should +C almost always be set = 1. + group=1 + fpixel=1 + nelements=naxes(1)*naxes(2) + call ftpprj(unit,group,fpixel,nelements,array,status) + +C Write another optional keyword to the header +C The keyword record will look like this in the FITS file: +C +C EXPOSURE= 1500 / Total Exposure Time +C + call ftpkyj(unit,'EXPOSURE',1500,'Total Exposure Time',status) + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any errors, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine writeascii + +C Create an ASCII table containing 3 columns and 6 rows. For convenience, +C the ASCII table extension is appended to the FITS image file created +C previously by the WRITEIMAGE subroutine. + + integer status,unit,readwrite,blocksize,tfields,nrows,rowlen + integer nspace,tbcol(3),diameter(6), colnum,frow,felem + real density(6) + character filename*40,extname*16 + character*16 ttype(3),tform(3),tunit(3),name(6) + data ttype/'Planet','Diameter','Density'/ + data tform/'A8','I6','F4.2'/ + data tunit/' ','km','g/cm'/ + data name/'Mercury','Venus','Earth','Mars','Jupiter','Saturn'/ + data diameter/4880,12112,12742,6800,143000,121000/ + data density/5.1,5.3,5.52,3.94,1.33,0.69/ + +C The STATUS parameter must always be initialized. + status=0 + +C Name of the FITS file to append the ASCII table to: + filename='ATESTFILEZ.FITS' + +C Get an unused Logical Unit Number to use to open the FITS file. + call ftgiou(unit,status) + +C Open the FITS file with write access. +C (readwrite = 0 would open the file with readonly access). + readwrite=1 + call ftopen(unit,filename,readwrite,blocksize,status) + +C FTCRHD creates a new empty FITS extension following the current +C extension and moves to it. In this case, FITSIO was initially +C positioned on the primary array when the FITS file was first opened, so +C FTCRHD appends an empty extension and moves to it. All future FITSIO +C calls then operate on the new extension (which will be an ASCII +C table). + call ftcrhd(unit,status) + +C define parameters for the ASCII table (see the above data statements) + tfields=3 + nrows=6 + extname='PLANETS_ASCII' + +C FTGABC is a convenient subroutine for calculating the total width of +C the table and the starting position of each column in an ASCII table. +C Any number of blank spaces (including zero) may be inserted between +C each column of the table, as specified by the NSPACE parameter. + nspace=1 + call ftgabc(tfields,tform,nspace,rowlen,tbcol,status) + +C FTPHTB writes all the required header keywords which define the +C structure of the ASCII table. NROWS and TFIELDS give the number of +C rows and columns in the table, and the TTYPE, TBCOL, TFORM, and TUNIT +C arrays give the column name, starting position, format, and units, +C respectively of each column. The values of the ROWLEN and TBCOL parameters +C were previously calculated by the FTGABC routine. + call ftphtb(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit, + & extname,status) + +C Write names to the first column, diameters to 2nd col., and density to 3rd +C FTPCLS writes the string values to the NAME column (column 1) of the +C table. The FTPCLJ and FTPCLE routines write the diameter (integer) and +C density (real) value to the 2nd and 3rd columns. The FITSIO routines +C are column oriented, so it is usually easier to read or write data in a +C table in a column by column order rather than row by row. + frow=1 + felem=1 + colnum=1 + call ftpcls(unit,colnum,frow,felem,nrows,name,status) + colnum=2 + call ftpclj(unit,colnum,frow,felem,nrows,diameter,status) + colnum=3 + call ftpcle(unit,colnum,frow,felem,nrows,density,status) + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine writebintable + +C This routine creates a FITS binary table, or BINTABLE, containing +C 3 columns and 6 rows. This routine is nearly identical to the +C previous WRITEASCII routine, except that the call to FTGABC is not +C needed, and FTPHBN is called rather than FTPHTB to write the +C required header keywords. + + integer status,unit,readwrite,blocksize,hdutype,tfields,nrows + integer varidat,diameter(6), colnum,frow,felem + real density(6) + character filename*40,extname*16 + character*16 ttype(3),tform(3),tunit(3),name(6) + data ttype/'Planet','Diameter','Density'/ + data tform/'8A','1J','1E'/ + data tunit/' ','km','g/cm'/ + data name/'Mercury','Venus','Earth','Mars','Jupiter','Saturn'/ + data diameter/4880,12112,12742,6800,143000,121000/ + data density/5.1,5.3,5.52,3.94,1.33,0.69/ + +C The STATUS parameter must always be initialized. + status=0 + +C Name of the FITS file to append the ASCII table to: + filename='ATESTFILEZ.FITS' + +C Get an unused Logical Unit Number to use to open the FITS file. + call ftgiou(unit,status) + +C Open the FITS file, with write access. + readwrite=1 + call ftopen(unit,filename,readwrite,blocksize,status) + +C Move to the last (2nd) HDU in the file (the ASCII table). + call ftmahd(unit,2,hdutype,status) + +C Append/create a new empty HDU onto the end of the file and move to it. + call ftcrhd(unit,status) + +C Define parameters for the binary table (see the above data statements) + tfields=3 + nrows=6 + extname='PLANETS_BINARY' + varidat=0 + +C FTPHBN writes all the required header keywords which define the +C structure of the binary table. NROWS and TFIELDS gives the number of +C rows and columns in the table, and the TTYPE, TFORM, and TUNIT arrays +C give the column name, format, and units, respectively of each column. + call ftphbn(unit,nrows,tfields,ttype,tform,tunit, + & extname,varidat,status) + +C Write names to the first column, diameters to 2nd col., and density to 3rd +C FTPCLS writes the string values to the NAME column (column 1) of the +C table. The FTPCLJ and FTPCLE routines write the diameter (integer) and +C density (real) value to the 2nd and 3rd columns. The FITSIO routines +C are column oriented, so it is usually easier to read or write data in a +C table in a column by column order rather than row by row. Note that +C the identical subroutine calls are used to write to either ASCII or +C binary FITS tables. + frow=1 + felem=1 + colnum=1 + call ftpcls(unit,colnum,frow,felem,nrows,name,status) + colnum=2 + call ftpclj(unit,colnum,frow,felem,nrows,diameter,status) + colnum=3 + call ftpcle(unit,colnum,frow,felem,nrows,density,status) + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine copyhdu + +C Copy the 1st and 3rd HDUs from the input file to a new FITS file + + integer status,inunit,outunit,readwrite,blocksize,morekeys,hdutype + character infilename*40,outfilename*40 + +C The STATUS parameter must always be initialized. + status=0 + +C Name of the FITS files: + infilename='ATESTFILEZ.FITS' + outfilename='BTESTFILEZ.FITS' + +C Delete the file if it already exists, so we can then recreate it +C The deletefile subroutine is listed at the end of this file. + call deletefile(outfilename,status) + +C Get unused Logical Unit Numbers to use to open the FITS files. + call ftgiou(inunit,status) + call ftgiou(outunit,status) + +C Open the input FITS file, with readonly access + readwrite=0 + call ftopen(inunit,infilename,readwrite,blocksize,status) + +C Create the new empty FITS file (value of blocksize is ignored) + blocksize=1 + call ftinit(outunit,outfilename,blocksize,status) + +C FTCOPY copies the current HDU from the input FITS file to the output +C file. The MOREKEY parameter allows one to reserve space for additional +C header keywords when the HDU is created. FITSIO will automatically +C insert more header space if required, so programmers do not have to +C reserve space ahead of time, although it is more efficient to do so if +C it is known that more keywords will be appended to the header. + morekeys=0 + call ftcopy(inunit,outunit,morekeys,status) + +C Append/create a new empty extension on the end of the output file + call ftcrhd(outunit,status) + +C Skip to the 3rd extension in the input file which in this case +C is the binary table created by the previous WRITEBINARY routine. + call ftmahd(inunit,3,hdutype,status) + +C FTCOPY now copies the binary table from the input FITS file +C to the output file. + call ftcopy(inunit,outunit,morekeys,status) + +C The FITS files must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. +C Giving -1 for the value of the first argument causes all previously +C allocated unit numbers to be released. + + call ftclos(inunit, status) + call ftclos(outunit, status) + call ftfiou(-1, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine selectrows + +C This routine copies selected rows from an input table into a new output +C FITS table. In this example all the rows in the input table that have +C a value of the DENSITY column less that 3.0 are copied to the output +C table. This program illustrates several generally useful techniques, +C including: +C how to locate the end of a FITS file +C how to create a table when the total number of rows in the table +C is not known until the table is completed +C how to efficiently copy entire rows from one table to another. + + integer status,inunit,outunit,readwrite,blocksize,hdutype + integer nkeys,nspace,naxes(2),nfound,colnum,frow,felem + integer noutrows,irow,temp(100),i + real nullval,density(6) + character infilename*40,outfilename*40,record*80 + logical exact,anynulls + +C The STATUS parameter must always be initialized. + status=0 + +C Names of the FITS files: + infilename='ATESTFILEZ.FITS' + outfilename='BTESTFILEZ.FITS' + +C Get unused Logical Unit Numbers to use to open the FITS files. + call ftgiou(inunit,status) + call ftgiou(outunit,status) + +C The input FITS file is opened with READONLY access, and the output +C FITS file is opened with WRITE access. + readwrite=0 + call ftopen(inunit,infilename,readwrite,blocksize,status) + readwrite=1 + call ftopen(outunit,outfilename,readwrite,blocksize,status) + +C move to the 3rd HDU in the input file (a binary table in this case) + call ftmahd(inunit,3,hdutype,status) + +C This do-loop illustrates how to move to the last extension in any FITS +C file. The call to FTMRHD moves one extension at a time through the +C FITS file until an `End-of-file' status value (= 107) is returned. + do while (status .eq. 0) + call ftmrhd(outunit,1,hdutype,status) + end do + +C After locating the end of the FITS file, it is necessary to reset the +C status value to zero and also clear the internal error message stack +C in FITSIO. The previous `End-of-file' error will have produced +C an unimportant message on the error stack which can be cleared with +C the call to the FTCMSG routine (which has no arguments). + + if (status .eq. 107)then + status=0 + call ftcmsg + end if + +C Create a new empty extension in the output file. + call ftcrhd(outunit,status) + +C Find the number of keywords in the input table header. + call ftghsp(inunit,nkeys,nspace,status) + +C This do-loop of calls to FTGREC and FTPREC copies all the keywords from +C the input to the output FITS file. Notice that the specified number +C of rows in the output table, as given by the NAXIS2 keyword, will be +C incorrect. This value will be modified later after it is known how many +C rows will be in the table, so it does not matter how many rows are specified +C initially. + do i=1,nkeys + call ftgrec(inunit,i,record,status) + call ftprec(outunit,record,status) + end do + +C FTGKNJ is used to get the value of the NAXIS1 and NAXIS2 keywords, +C which define the width of the table in bytes, and the number of +C rows in the table. + call ftgknj(inunit,'NAXIS',1,2,naxes,nfound,status) + +C FTGCNO gets the column number of the `DENSITY' column; the column +C number is needed when reading the data in the column. The EXACT +C parameter determines whether or not the match to the column names +C will be case sensitive. + exact=.false. + call ftgcno(inunit,exact,'DENSITY',colnum,status) + +C FTGCVE reads all 6 rows of data in the `DENSITY' column. The number +C of rows in the table is given by NAXES(2). Any null values in the +C table will be returned with the corresponding value set to -99 +C (= the value of NULLVAL). The ANYNULLS parameter will be set to TRUE +C if any null values were found while reading the data values in the table. + frow=1 + felem=1 + nullval=-99. + call ftgcve(inunit,colnum,frow,felem,naxes(2),nullval, + & density,anynulls,status) + +C If the density is less than 3.0, copy the row to the output table. +C FTGTBB and FTPTBB are low-level routines to read and write, respectively, +C a specified number of bytes in the table, starting at the specified +C row number and beginning byte within the row. These routines do +C not do any interpretation of the bytes, and simply pass them to or +C from the FITS file without any modification. This is a faster +C way of transferring large chunks of data from one FITS file to another, +C than reading and then writing each column of data individually. +C In this case an entire row of bytes (the row length is specified +C by the naxes(1) parameter) is transferred. The datatype of the +C buffer array (TEMP in this case) is immaterial so long as it is +C declared large enough to hold the required number of bytes. + noutrows=0 + do irow=1,naxes(2) + if (density(irow) .lt. 3.0)then + noutrows=noutrows+1 + call ftgtbb(inunit,irow,1,naxes(1),temp,status) + call ftptbb(outunit,noutrows,1,naxes(1),temp,status) + end if + end do + +C Update the NAXIS2 keyword with the correct no. of rows in the output file. +C After all the rows have been written to the output table, the +C FTMKYJ routine is used to overwrite the NAXIS2 keyword value with +C the correct number of rows. Specifying `\&' for the comment string +C tells FITSIO to keep the current comment string in the keyword and +C only modify the value. Because the total number of rows in the table +C was unknown when the table was first created, any value (including 0) +C could have been used for the initial NAXIS2 keyword value. + call ftmkyj(outunit,'NAXIS2',noutrows,'&',status) + +C The FITS files must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(inunit, status) + call ftclos(outunit, status) + call ftfiou(-1, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine readheader + +C Print out all the header keywords in all extensions of a FITS file + + integer status,unit,readwrite,blocksize,nkeys,nspace,hdutype,i,j + character filename*80,record*80 + +C The STATUS parameter must always be initialized. + status=0 + +C Get an unused Logical Unit Number to use to open the FITS file. + call ftgiou(unit,status) + +C name of FITS file + filename='ATESTFILEZ.FITS' + +C open the FITS file, with read-only access. The returned BLOCKSIZE +C parameter is obsolete and should be ignored. + readwrite=0 + call ftopen(unit,filename,readwrite,blocksize,status) + + j = 0 +100 continue + j = j + 1 + + print *,'Header listing for HDU', j + +C The FTGHSP subroutine returns the number of existing keywords in the +C current header data unit (CHDU), not counting the required END keyword, + call ftghsp(unit,nkeys,nspace,status) + +C Read each 80-character keyword record, and print it out. + do i = 1, nkeys + call ftgrec(unit,i,record,status) + print *,record + end do + +C Print out an END record, and a blank line to mark the end of the header. + if (status .eq. 0)then + print *,'END' + print *,' ' + end if + +C Try moving to the next extension in the FITS file, if it exists. +C The FTMRHD subroutine attempts to move to the next HDU, as specified by +C the second parameter. This subroutine moves by a relative number of +C HDUs from the current HDU. The related FTMAHD routine may be used to +C move to an absolute HDU number in the FITS file. If the end-of-file is +C encountered when trying to move to the specified extension, then a +C status = 107 is returned. + call ftmrhd(unit,1,hdutype,status) + + if (status .eq. 0)then +C success, so jump back and print out keywords in this extension + go to 100 + + else if (status .eq. 107)then +C hit end of file, so quit + status=0 + end if + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine readimage + +C Read a FITS image and determine the minimum and maximum pixel value. +C Rather than reading the entire image in +C at once (which could require a very large array), the image is read +C in pieces, 100 pixels at a time. + + integer status,unit,readwrite,blocksize,naxes(2),nfound + integer group,firstpix,nbuffer,npixels,i + real datamin,datamax,nullval,buffer(100) + logical anynull + character filename*80 + +C The STATUS parameter must always be initialized. + status=0 + +C Get an unused Logical Unit Number to use to open the FITS file. + call ftgiou(unit,status) + +C Open the FITS file previously created by WRITEIMAGE + filename='ATESTFILEZ.FITS' + readwrite=0 + call ftopen(unit,filename,readwrite,blocksize,status) + +C Determine the size of the image. + call ftgknj(unit,'NAXIS',1,2,naxes,nfound,status) + +C Check that it found both NAXIS1 and NAXIS2 keywords. + if (nfound .ne. 2)then + print *,'READIMAGE failed to read the NAXISn keywords.' + return + end if + +C Initialize variables + npixels=naxes(1)*naxes(2) + group=1 + firstpix=1 + nullval=-999 + datamin=1.0E30 + datamax=-1.0E30 + + do while (npixels .gt. 0) +C read up to 100 pixels at a time + nbuffer=min(100,npixels) + + call ftgpve(unit,group,firstpix,nbuffer,nullval, + & buffer,anynull,status) + +C find the min and max values + do i=1,nbuffer + datamin=min(datamin,buffer(i)) + datamax=max(datamax,buffer(i)) + end do + +C increment pointers and loop back to read the next group of pixels + npixels=npixels-nbuffer + firstpix=firstpix+nbuffer + end do + + print * + print *,'Min and max image pixels = ',datamin,datamax + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine readtable + +C Read and print data values from an ASCII or binary table +C This example reads and prints out all the data in the ASCII and +C the binary tables that were previously created by WRITEASCII and +C WRITEBINTABLE. Note that the exact same FITSIO routines are +C used to read both types of tables. + + integer status,unit,readwrite,blocksize,hdutype,ntable + integer felem,nelems,nullj,diameter,nfound,irow,colnum + real nulle,density + character filename*40,nullstr*1,name*8,ttype(3)*10 + logical anynull + +C The STATUS parameter must always be initialized. + status=0 + +C Get an unused Logical Unit Number to use to open the FITS file. + call ftgiou(unit,status) + +C Open the FITS file previously created by WRITEIMAGE + filename='ATESTFILEZ.FITS' + readwrite=0 + call ftopen(unit,filename,readwrite,blocksize,status) + +C Loop twice, first reading the ASCII table, then the binary table + do ntable=2,3 + +C Move to the next extension + call ftmahd(unit,ntable,hdutype,status) + + print *,' ' + if (hdutype .eq. 1)then + print *,'Reading ASCII table in HDU ',ntable + else if (hdutype .eq. 2)then + print *,'Reading binary table in HDU ',ntable + end if + +C Read the TTYPEn keywords, which give the names of the columns + call ftgkns(unit,'TTYPE',1,3,ttype,nfound,status) + write(*,2000)ttype +2000 format(2x,"Row ",3a10) + +C Read the data, one row at a time, and print them out + felem=1 + nelems=1 + nullstr=' ' + nullj=0 + nulle=0. + do irow=1,6 +C FTGCVS reads the NAMES from the first column of the table. + colnum=1 + call ftgcvs(unit,colnum,irow,felem,nelems,nullstr,name, + & anynull,status) + +C FTGCVJ reads the DIAMETER values from the second column. + colnum=2 + call ftgcvj(unit,colnum,irow,felem,nelems,nullj,diameter, + & anynull,status) + +C FTGCVE reads the DENSITY values from the third column. + colnum=3 + call ftgcve(unit,colnum,irow,felem,nelems,nulle,density, + & anynull,status) + write(*,2001)irow,name,diameter,density +2001 format(i5,a10,i10,f10.2) + end do + end do + +C The FITS file must always be closed before exiting the program. +C Any unit numbers allocated with FTGIOU must be freed with FTFIOU. + call ftclos(unit, status) + call ftfiou(unit, status) + +C Check for any error, and if so print out error messages. +C The PRINTERROR subroutine is listed near the end of this file. + if (status .gt. 0)call printerror(status) + end +C ************************************************************************* + subroutine printerror(status) + +C This subroutine prints out the descriptive text corresponding to the +C error status value and prints out the contents of the internal +C error message stack generated by FITSIO whenever an error occurs. + + integer status + character errtext*30,errmessage*80 + +C Check if status is OK (no error); if so, simply return + if (status .le. 0)return + +C The FTGERR subroutine returns a descriptive 30-character text string that +C corresponds to the integer error status number. A complete list of all +C the error numbers can be found in the back of the FITSIO User's Guide. + call ftgerr(status,errtext) + print *,'FITSIO Error Status =',status,': ',errtext + +C FITSIO usually generates an internal stack of error messages whenever +C an error occurs. These messages provide much more information on the +C cause of the problem than can be provided by the single integer error +C status value. The FTGMSG subroutine retrieves the oldest message from +C the stack and shifts any remaining messages on the stack down one +C position. FTGMSG is called repeatedly until a blank message is +C returned, which indicates that the stack is empty. Each error message +C may be up to 80 characters in length. Another subroutine, called +C FTCMSG, is available to simply clear the whole error message stack in +C cases where one is not interested in the contents. + call ftgmsg(errmessage) + do while (errmessage .ne. ' ') + print *,errmessage + call ftgmsg(errmessage) + end do + end +C ************************************************************************* + subroutine deletefile(filename,status) + +C A simple little routine to delete a FITS file + + integer status,unit,blocksize + character*(*) filename + +C Simply return if status is greater than zero + if (status .gt. 0)return + +C Get an unused Logical Unit Number to use to open the FITS file + call ftgiou(unit,status) + +C Try to open the file, to see if it exists + call ftopen(unit,filename,1,blocksize,status) + + if (status .eq. 0)then +C file was opened; so now delete it + call ftdelt(unit,status) + else if (status .eq. 103)then +C file doesn't exist, so just reset status to zero and clear errors + status=0 + call ftcmsg + else +C there was some other error opening the file; delete the file anyway + status=0 + call ftcmsg + call ftdelt(unit,status) + end if + +C Free the unit number for later reuse + call ftfiou(unit, status) + end diff --git a/software/cfitsio3040/drvrfile.c b/software/cfitsio3040/drvrfile.c new file mode 100644 index 000000000..95bbb0ad2 --- /dev/null +++ b/software/cfitsio3040/drvrfile.c @@ -0,0 +1,742 @@ +/* This file, drvrfile.c contains driver routines for disk files. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" + +#if defined(unix) || defined(__unix__) || defined(__unix) +#include /* needed in file_openfile */ + +#ifdef REPLACE_LINKS +#include +#include +#endif + +#endif + +#ifdef HAVE_FTRUNCATE +#if defined(unix) || defined(__unix__) || defined(__unix) +#include /* needed for getcwd prototype on unix machines */ +#endif +#endif + +#define IO_SEEK 0 /* last file I/O operation was a seek */ +#define IO_READ 1 /* last file I/O operation was a read */ +#define IO_WRITE 2 /* last file I/O operation was a write */ + +static char file_outfile[FLEN_FILENAME]; + +typedef struct /* structure containing disk file structure */ +{ + FILE *fileptr; + LONGLONG currentpos; + int last_io_op; +} diskdriver; + +static diskdriver handleTable[NMAXFILES]; /* allocate diskfile handle tables */ + +/*--------------------------------------------------------------------------*/ +int file_init(void) +{ + int ii; + + for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ + { + handleTable[ii].fileptr = 0; + } + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_setoptions(int options) +{ + /* do something with the options argument, to stop compiler warning */ + options = 0; + return(options); +} +/*--------------------------------------------------------------------------*/ +int file_getoptions(int *options) +{ + *options = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_getversion(int *version) +{ + *version = 10; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_shutdown(void) +{ + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_open(char *filename, int rwmode, int *handle) +{ + FILE *diskfile; + int copyhandle, ii, status; + char recbuf[2880]; + size_t nread; + + /* + if an output filename has been specified as part of the input + file, as in "inputfile.fits(outputfile.fit)" then we have to + create the output file, copy the input to it, then reopen the + the new copy. + */ + + if (*file_outfile) + { + /* open the original file, with readonly access */ + status = file_openfile(filename, READONLY, &diskfile); + if (status) { + file_outfile[0] = '\0'; + return(status); + } + + /* create the output file */ + status = file_create(file_outfile,handle); + if (status) + { + ffpmsg("Unable to create output file for copy of input file:"); + ffpmsg(file_outfile); + file_outfile[0] = '\0'; + return(status); + } + + /* copy the file from input to output */ + while(0 != (nread = fread(recbuf,1,2880, diskfile))) + { + status = file_write(*handle, recbuf, nread); + if (status) { + file_outfile[0] = '\0'; + return(status); + } + } + + /* close both files */ + fclose(diskfile); + copyhandle = *handle; + file_close(*handle); + *handle = copyhandle; /* reuse the old file handle */ + + /* reopen the new copy, with correct rwmode */ + status = file_openfile(file_outfile, rwmode, &diskfile); + file_outfile[0] = '\0'; + } + else + { + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ + { + if (handleTable[ii].fileptr == 0) + { + *handle = ii; + break; + } + } + + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + /*open the file */ + status = file_openfile(filename, rwmode, &diskfile); + } + + handleTable[*handle].fileptr = diskfile; + handleTable[*handle].currentpos = 0; + handleTable[*handle].last_io_op = IO_SEEK; + + return(status); +} +/*--------------------------------------------------------------------------*/ +int file_openfile(char *filename, int rwmode, FILE **diskfile) +/* + lowest level routine to physically open a disk file +*/ +{ + char mode[4]; + +#if defined(unix) || defined(__unix__) || defined(__unix) + char tempname[512], *cptr, user[80]; + struct passwd *pwd; + int ii = 0; + +#if defined(REPLACE_LINKS) + struct stat stbuf; + int success = 0; + size_t n; + FILE *f1, *f2; + char buf[BUFSIZ]; +#endif + +#endif + + if (rwmode == READWRITE) + { + strcpy(mode, "r+b"); /* open existing file with read-write */ + } + else + { + strcpy(mode, "rb"); /* open existing file readonly */ + } + +#if MACHINE == ALPHAVMS || MACHINE == VAXVMS + /* specify VMS record structure: fixed format, 2880 byte records */ + /* but force stream mode access to enable random I/O access */ + *diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); + +#elif defined(unix) || defined(__unix__) || defined(__unix) + + /* support the ~user/file.fits or ~/file.fits filenames in UNIX */ + + if (*filename == '~') + { + if (filename[1] == '/') + { + cptr = getenv("HOME"); + if (cptr) + { + strcpy(tempname, cptr); + strcat(tempname, filename+1); + } + else + { + strcpy(tempname, filename); + } + } + else + { + /* copy user name */ + cptr = filename+1; + while (*cptr && (*cptr != '/')) + { + user[ii] = *cptr; + cptr++; + ii++; + } + user[ii] = '\0'; + + /* get structure that includes name of user's home directory */ + pwd = getpwnam(user); + + /* copy user's home directory */ + strcpy(tempname, pwd->pw_dir); + strcat(tempname, cptr); + } + + *diskfile = fopen(tempname, mode); + } + else + { + /* don't need to expand the input file name */ + *diskfile = fopen(filename, mode); + +#if defined(REPLACE_LINKS) + + if (!(*diskfile) && (rwmode == READWRITE)) + { + /* failed to open file with READWRITE privilege. Test if */ + /* the file we are trying to open is a soft link to a file that */ + /* doesn't have write privilege. */ + + lstat(filename, &stbuf); + if ((stbuf.st_mode & S_IFMT) == S_IFLNK) /* is this a soft link? */ + { + if ((f1 = fopen(filename, "rb")) != 0) /* try opening READONLY */ + { + strcpy(tempname, filename); + strcat(tempname, ".TmxFil"); + if ((f2 = fopen(tempname, "wb")) != 0) /* create temp file */ + { + success = 1; + while ((n = fread(buf, 1, BUFSIZ, f1)) > 0) + { + /* copy linked file to local temporary file */ + if (fwrite(buf, 1, n, f2) != n) + { + success = 0; + break; + } + } + fclose(f2); + } + fclose(f1); + + if (success) + { + /* delete link and rename temp file to previous link name */ + remove(filename); + rename(tempname, filename); + + /* try once again to open the file with write access */ + *diskfile = fopen(filename, mode); + } + else + remove(tempname); /* clean up the failed copy */ + } + } + } +#endif + + } + +#else + + /* other non-UNIX machines */ + *diskfile = fopen(filename, mode); + +#endif + + if (!(*diskfile)) /* couldn't open file */ + { + return(FILE_NOT_OPENED); + } + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_create(char *filename, int *handle) +{ + FILE *diskfile; + int ii; + char mode[4]; + + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ + { + if (handleTable[ii].fileptr == 0) + { + *handle = ii; + break; + } + } + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + strcpy(mode, "w+b"); /* create new file with read-write */ + + diskfile = fopen(filename, "r"); /* does file already exist? */ + + if (diskfile) + { + fclose(diskfile); /* close file and exit with error */ + return(FILE_NOT_CREATED); + } + +#if MACHINE == ALPHAVMS || MACHINE == VAXVMS + /* specify VMS record structure: fixed format, 2880 byte records */ + /* but force stream mode access to enable random I/O access */ + diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); +#else + diskfile = fopen(filename, mode); +#endif + + if (!(diskfile)) /* couldn't create file */ + { + return(FILE_NOT_CREATED); + } + + handleTable[ii].fileptr = diskfile; + handleTable[ii].currentpos = 0; + handleTable[ii].last_io_op = IO_SEEK; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_truncate(int handle, LONGLONG filesize) +/* + truncate the diskfile to a new smaller size +*/ +{ + +#ifdef HAVE_FTRUNCATE + int fdesc; + + fdesc = fileno(handleTable[handle].fileptr); + ftruncate(fdesc, (OFF_T) filesize); + + handleTable[handle].currentpos = filesize; + handleTable[handle].last_io_op = IO_WRITE; + +#endif + + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_size(int handle, LONGLONG *filesize) +/* + return the size of the file in bytes +*/ +{ + OFF_T position1,position2; + FILE *diskfile; + + diskfile = handleTable[handle].fileptr; + +#if _FILE_OFFSET_BITS - 0 == 64 + +/* call the newer ftello and fseeko routines , which support */ +/* Large Files (> 2GB) if they are supported. */ + + position1 = ftello(diskfile); /* save current postion */ + if (position1 < 0) + return(SEEK_ERROR); + + if (fseeko(diskfile, 0, 2) != 0) /* seek to end of file */ + return(SEEK_ERROR); + + position2 = ftello(diskfile); /* get file size */ + if (position2 < 0) + return(SEEK_ERROR); + + if (fseeko(diskfile, position1, 0) != 0) /* seek back to original pos */ + return(SEEK_ERROR); + +#else + + position1 = ftell(diskfile); /* save current postion */ + if (position1 < 0) + return(SEEK_ERROR); + + if (fseek(diskfile, 0, 2) != 0) /* seek to end of file */ + return(SEEK_ERROR); + + position2 = ftell(diskfile); /* get file size */ + if (position2 < 0) + return(SEEK_ERROR); + + if (fseek(diskfile, position1, 0) != 0) /* seek back to original pos */ + return(SEEK_ERROR); + +#endif + + *filesize = (LONGLONG) position2; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_close(int handle) +/* + close the file +*/ +{ + + if (fclose(handleTable[handle].fileptr) ) + return(FILE_NOT_CLOSED); + + handleTable[handle].fileptr = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_remove(char *filename) +/* + delete the file from disk +*/ +{ + remove(filename); + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_flush(int handle) +/* + flush the file +*/ +{ + if (fflush(handleTable[handle].fileptr) ) + return(WRITE_ERROR); + + /* The flush operation is not supposed to move the internal */ + /* file pointer, but it does on some Windows-95 compilers and */ + /* perhaps others, so seek to original position to be sure. */ + /* This seek will do no harm on other systems. */ + +#if MACHINE == IBMPC + + if (file_seek(handle, handleTable[handle].currentpos)) + return(SEEK_ERROR); + +#endif + + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_seek(int handle, LONGLONG offset) +/* + seek to position relative to start of the file +*/ +{ + +#if _FILE_OFFSET_BITS - 0 == 64 + + if (fseeko(handleTable[handle].fileptr, (OFF_T) offset, 0) != 0) + return(SEEK_ERROR); + +#else + + if (fseek(handleTable[handle].fileptr, (OFF_T) offset, 0) != 0) + return(SEEK_ERROR); + +#endif + + handleTable[handle].currentpos = offset; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_read(int hdl, void *buffer, long nbytes) +/* + read bytes from the current position in the file +*/ +{ + long nread; + char *cptr; + + if (handleTable[hdl].last_io_op == IO_WRITE) + { + if (file_seek(hdl, handleTable[hdl].currentpos)) + return(SEEK_ERROR); + } + + nread = (long) fread(buffer, 1, nbytes, handleTable[hdl].fileptr); + + if (nread == 1) + { + cptr = (char *) buffer; + + /* some editors will add a single end-of-file character to a file */ + /* Ignore it if the character is a zero, 10, or 32 */ + if (*cptr == 0 || *cptr == 10 || *cptr == 32) + return(END_OF_FILE); + else + return(READ_ERROR); + } + else if (nread != nbytes) + { + return(READ_ERROR); + } + + handleTable[hdl].currentpos += nbytes; + handleTable[hdl].last_io_op = IO_READ; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_write(int hdl, void *buffer, long nbytes) +/* + write bytes at the current position in the file +*/ +{ + if (handleTable[hdl].last_io_op == IO_READ) + { + if (file_seek(hdl, handleTable[hdl].currentpos)) + return(SEEK_ERROR); + } + + if((long) fwrite(buffer, 1, nbytes, handleTable[hdl].fileptr) != nbytes) + return(WRITE_ERROR); + + handleTable[hdl].currentpos += nbytes; + handleTable[hdl].last_io_op = IO_WRITE; + return(0); +} +/*--------------------------------------------------------------------------*/ +int file_compress_open(char *filename, int rwmode, int *hdl) +/* + This routine opens the compressed diskfile by creating a new uncompressed + file then opening it. The input file name (the name of the compressed + file) gets replaced with the name of the uncompressed file, which is + initially stored in the global file_outfile string. file_outfile + then gets set to a null string. +*/ +{ + FILE *indiskfile, *outdiskfile; + int status, clobber = 0; + char *cptr; + + /* open the compressed disk file */ + status = file_openfile(filename, READONLY, &indiskfile); + if (status) + { + ffpmsg("failed to open compressed disk file (file_compress_open)"); + ffpmsg(filename); + return(status); + } + + /* name of the output uncompressed file is stored in the */ + /* global variable called 'file_outfile'. */ + + cptr = file_outfile; + if (*cptr == '!') + { + /* clobber any existing file with the same name */ + clobber = 1; + cptr++; + remove(cptr); + } + else + { + outdiskfile = fopen(file_outfile, "r"); /* does file already exist? */ + + if (outdiskfile) + { + ffpmsg("uncompressed file already exists: (file_compress_open)"); + ffpmsg(file_outfile); + fclose(outdiskfile); /* close file and exit with error */ + file_outfile[0] = '\0'; + return(FILE_NOT_CREATED); + } + } + + outdiskfile = fopen(cptr, "w+b"); /* create new file */ + if (!outdiskfile) + { + ffpmsg("could not create uncompressed file: (file_compress_open)"); + ffpmsg(file_outfile); + file_outfile[0] = '\0'; + return(FILE_NOT_CREATED); + } + + /* uncompress file into another file */ + uncompress2file(filename, indiskfile, outdiskfile, &status); + fclose(indiskfile); + fclose(outdiskfile); + + if (status) + { + ffpmsg("error in file_compress_open: failed to uncompressed file:"); + ffpmsg(filename); + ffpmsg(" into new output file:"); + ffpmsg(file_outfile); + file_outfile[0] = '\0'; + return(status); + } + + strcpy(filename, cptr); /* switch the names */ + file_outfile[0] = '\0'; + + status = file_open(filename, rwmode, hdl); + + return(status); +} +/*--------------------------------------------------------------------------*/ +int file_is_compressed(char *filename) /* I - FITS file name */ +/* + Test if the disk file is compressed. Returns 1 if compressed, 0 if not. + This may modify the filename string by appending a compression suffex. +*/ +{ + FILE *diskfile; + unsigned char buffer[2]; + char tmpfilename[FLEN_FILENAME]; + + /* Open file. Try various suffix combinations */ + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(tmpfilename,filename); + strcat(filename,".gz"); + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename, tmpfilename); + strcat(filename,".Z"); + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename, tmpfilename); + strcat(filename,".z"); /* it's often lower case on CDROMs */ + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename, tmpfilename); + strcat(filename,".zip"); + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename, tmpfilename); + strcat(filename,"-z"); /* VMS suffix */ + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename, tmpfilename); + strcat(filename,"-gz"); /* VMS suffix */ + if (file_openfile(filename, 0, &diskfile)) + { + strcpy(filename,tmpfilename); /* restore original name */ + return(0); /* file not found */ + } + } + } + } + } + } + } + + if (fread(buffer, 1, 2, diskfile) != 2) /* read 2 bytes */ + { + fclose(diskfile); /* error reading file so just return */ + return(0); + } + + fclose(diskfile); + + /* see if the 2 bytes have the magic values for a compressed file */ + if ( (memcmp(buffer, "\037\213", 2) == 0) || /* GZIP */ + (memcmp(buffer, "\120\113", 2) == 0) || /* PKZIP */ + (memcmp(buffer, "\037\036", 2) == 0) || /* PACK */ + (memcmp(buffer, "\037\235", 2) == 0) || /* LZW */ + (memcmp(buffer, "\037\240", 2) == 0) ) /* LZH */ + { + return(1); /* this is a compressed file */ + } + else + { + return(0); /* not a compressed file */ + } +} +/*--------------------------------------------------------------------------*/ +int file_checkfile (char *urltype, char *infile, char *outfile) +{ + /* special case: if file:// driver, check if the file is compressed */ + if ( file_is_compressed(infile) ) + { + /* if output file has been specified, save the name for future use: */ + /* This is the name of the uncompressed file to be created on disk. */ + if (strlen(outfile)) + { + if (!strncmp(outfile, "mem:", 4) ) + { + /* uncompress the file in memory, with READ and WRITE access */ + strcpy(urltype, "compressmem://"); /* use special driver */ + *file_outfile = '\0'; + } + else + { + strcpy(urltype, "compressfile://"); /* use special driver */ + + /* don't copy the "file://" prefix, if present. */ + if (!strncmp(outfile, "file://", 7) ) + strcpy(file_outfile,outfile+7); + else + strcpy(file_outfile,outfile); + } + } + else + { + /* uncompress the file in memory */ + strcpy(urltype, "compress://"); /* use special driver */ + *file_outfile = '\0'; /* no output file was specified */ + } + } + else /* an ordinary, uncompressed FITS file on disk */ + { + /* save the output file name for later use when opening the file. */ + /* In this case, the file to be opened will be opened READONLY, */ + /* and copied to this newly created output file. The original file */ + /* will be closed, and the copy will be opened by CFITSIO for */ + /* subsequent processing (possibly with READWRITE access). */ + if (strlen(outfile)) + strcpy(file_outfile,outfile); + } + + return 0; +} + + + diff --git a/software/cfitsio3040/drvrgsiftp.c b/software/cfitsio3040/drvrgsiftp.c new file mode 100644 index 000000000..ab9aaed4e --- /dev/null +++ b/software/cfitsio3040/drvrgsiftp.c @@ -0,0 +1,522 @@ + +/* This file, drvrgsiftp.c contains driver routines for gsiftp files. */ +/* Andrea Barisani */ +/* Taffoni Giuliano */ +#ifdef HAVE_NET_SERVICES +#ifdef HAVE_GSIFTP + +#include +#include +#include +#include +#include +#include "fitsio2.h" + +#include + +#define MAXLEN 1200 +#define NETTIMEOUT 80 +#define MAX_BUFFER_SIZE_R 1024 +#define MAX_BUFFER_SIZE_W (64*1024) + +static int gsiftpopen = 0; +static int global_offset = 0; +static int gsiftp_get(char *filename, FILE **gsiftpfile, int num_streams); + +static globus_mutex_t lock; +static globus_cond_t cond; +static globus_bool_t done; + +static char *gsiftp_tmpfile; +static char *gsiftpurl = NULL; +static char gsiftp_tmpdir[MAXLEN]; + +static jmp_buf env; /* holds the jump buffer for setjmp/longjmp pairs */ +static void signal_handler(int sig); + +int gsiftp_init(void) +{ + + if (getenv("GSIFTP_TMPFILE")) { + gsiftp_tmpfile = getenv("GSIFTP_TMPFILE"); + } else { + strncpy(gsiftp_tmpdir, "/tmp/gsiftp_XXXXXX", sizeof gsiftp_tmpdir); + if (mkdtemp(gsiftp_tmpdir) == NULL) { + ffpmsg("Cannot create temporary directory!"); + return (FILE_NOT_OPENED); + } + gsiftp_tmpfile = malloc(strlen(gsiftp_tmpdir) + strlen("/gsiftp_buffer.tmp")); + strcat(gsiftp_tmpfile, gsiftp_tmpdir); + strcat(gsiftp_tmpfile, "/gsiftp_buffer.tmp"); + } + + return file_init(); +} + +int gsiftp_shutdown(void) +{ + free(gsiftpurl); + free(gsiftp_tmpfile); + free(gsiftp_tmpdir); + + return file_shutdown(); +} + +int gsiftp_setoptions(int options) +{ + return file_setoptions(options); +} + +int gsiftp_getoptions(int *options) +{ + return file_getoptions(options); +} + +int gsiftp_getversion(int *version) +{ + return file_getversion(version); +} + +int gsiftp_checkfile(char *urltype, char *infile, char *outfile) +{ + return file_checkfile(urltype, infile, outfile); +} + +int gsiftp_open(char *filename, int rwmode, int *handle) +{ + FILE *gsiftpfile; + int num_streams; + + if (getenv("GSIFTP_STREAMS")) { + num_streams = (int)getenv("GSIFTP_STREAMS"); + } else { + num_streams = 1; + } + + if (rwmode) { + gsiftpopen = 2; + } else { + gsiftpopen = 1; + } + + if (gsiftpurl) + free(gsiftpurl); + + gsiftpurl = strdup(filename); + + if (setjmp(env) != 0) { + ffpmsg("Timeout (gsiftp_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + alarm(NETTIMEOUT); + + if (gsiftp_get(filename,&gsiftpfile,num_streams)) { + alarm(0); + ffpmsg("Unable to open gsiftp file (gsiftp_open)"); + ffpmsg(filename); + goto error; + } + + fclose(gsiftpfile); + + signal(SIGALRM, SIG_DFL); + alarm(0); + + return file_open(gsiftp_tmpfile, rwmode, handle); + + error: + alarm(0); + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +int gsiftp_create(char *filename, int *handle) +{ + if (gsiftpurl) + free(gsiftpurl); + + gsiftpurl = strdup(filename); + + return file_create(gsiftp_tmpfile, handle); +} + +int gsiftp_truncate(int handle, LONGLONG filesize) +{ + return file_truncate(handle, filesize); +} + +int gsiftp_size(int handle, LONGLONG *filesize) +{ + return file_size(handle, filesize); +} + +int gsiftp_flush(int handle) +{ + FILE *gsiftpfile; + int num_streams; + + if (getenv("GSIFTP_STREAMS")) { + num_streams = (int)getenv("GSIFTP_STREAMS"); + } else { + num_streams = 1; + } + + int rc = file_flush(handle); + + if (gsiftpopen != 1) { + + if (setjmp(env) != 0) { + ffpmsg("Timeout (gsiftp_write)"); + goto error; + } + + signal(SIGALRM, signal_handler); + alarm(NETTIMEOUT); + + if (gsiftp_put(gsiftpurl,&gsiftpfile,num_streams)) { + alarm(0); + ffpmsg("Unable to open gsiftp file (gsiftp_flush)"); + ffpmsg(gsiftpurl); + goto error; + } + + fclose(gsiftpfile); + + signal(SIGALRM, SIG_DFL); + alarm(0); + } + + return rc; + + error: + alarm(0); + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +int gsiftp_seek(int handle, LONGLONG offset) +{ + return file_seek(handle, offset); +} + +int gsiftp_read(int hdl, void *buffer, long nbytes) +{ + return file_read(hdl, buffer, nbytes); +} + +int gsiftp_write(int hdl, void *buffer, long nbytes) +{ + return file_write(hdl, buffer, nbytes); +} + +int gsiftp_close(int handle) +{ + unlink(gsiftp_tmpfile); + + if (gsiftp_tmpdir) + rmdir(gsiftp_tmpdir); + + return file_close(handle); +} + +static void done_cb( void * user_arg, + globus_ftp_client_handle_t * handle, + globus_object_t * err) +{ + + if(err){ + fprintf(stderr, "%s", globus_object_printable_to_string(err)); + } + + globus_mutex_lock(&lock); + done = GLOBUS_TRUE; + globus_cond_signal(&cond); + globus_mutex_unlock(&lock); + return; +} + +static void data_cb_read( void * user_arg, + globus_ftp_client_handle_t * handle, + globus_object_t * err, + globus_byte_t * buffer, + globus_size_t length, + globus_off_t offset, + globus_bool_t eof) +{ + if(err) { + fprintf(stderr, "%s", globus_object_printable_to_string(err)); + } + else { + FILE* fd = (FILE*) user_arg; + int rc = fwrite(buffer, 1, length, fd); + if (ferror(fd)) { + printf("Read error in function data_cb_read; errno = %d\n", errno); + return; + } + + if (!eof) { + globus_ftp_client_register_read(handle, + buffer, + MAX_BUFFER_SIZE_R, + data_cb_read, + (void*) fd); + } + } + return; +} + +static void data_cb_write( void * user_arg, + globus_ftp_client_handle_t * handle, + globus_object_t * err, + globus_byte_t * buffer, + globus_size_t length, + globus_off_t offset, + globus_bool_t eof) +{ + int curr_offset; + if(err) { + fprintf(stderr, "%s", globus_object_printable_to_string(err)); + } + else { + if (!eof) { + FILE* fd = (FILE*) user_arg; + int rc; + globus_mutex_lock(&lock); + curr_offset = global_offset; + rc = fread(buffer, 1, MAX_BUFFER_SIZE_W, fd); + global_offset += rc; + globus_mutex_unlock(&lock); + if (ferror(fd)) { + printf("Read error in function data_cb_write; errno = %d\n", errno); + return; + } + + globus_ftp_client_register_write(handle, + buffer, + rc, + curr_offset, + feof(fd) != 0, + data_cb_write, + (void*) fd); + } else { + globus_libc_free(buffer); + } + } + return; +} + +int gsiftp_get(char *filename, FILE **gsiftpfile, int num_streams) +{ + char gsiurl[MAXLEN]; + + globus_ftp_client_handle_t handle; + globus_ftp_client_operationattr_t attr; + globus_ftp_client_handleattr_t handle_attr; + globus_ftp_control_parallelism_t parallelism; + globus_ftp_control_layout_t layout; + globus_byte_t buffer[MAX_BUFFER_SIZE_R]; + globus_size_t buffer_length = sizeof(buffer); + globus_result_t result; + globus_ftp_client_restart_marker_t restart; + globus_ftp_control_type_t filetype; + + globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); + globus_mutex_init(&lock, GLOBUS_NULL); + globus_cond_init(&cond, GLOBUS_NULL); + globus_ftp_client_handle_init(&handle, GLOBUS_NULL); + globus_ftp_client_handleattr_init(&handle_attr); + globus_ftp_client_operationattr_init(&attr); + layout.mode = GLOBUS_FTP_CONTROL_STRIPING_NONE; + globus_ftp_client_restart_marker_init(&restart); + globus_ftp_client_operationattr_set_mode( + &attr, + GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK); + + if (num_streams >= 1) + { + parallelism.mode = GLOBUS_FTP_CONTROL_PARALLELISM_FIXED; + parallelism.fixed.size = num_streams; + + globus_ftp_client_operationattr_set_parallelism( + &attr, + ¶llelism); + } + + globus_ftp_client_operationattr_set_layout(&attr, + &layout); + + filetype = GLOBUS_FTP_CONTROL_TYPE_IMAGE; + globus_ftp_client_operationattr_set_type (&attr, + filetype); + + globus_ftp_client_handle_init(&handle, &handle_attr); + + done = GLOBUS_FALSE; + + strcpy(gsiurl,"gsiftp://"); + strcat(gsiurl,filename); + + *gsiftpfile = fopen(gsiftp_tmpfile,"w+"); + + if (!*gsiftpfile) { + ffpmsg("Unable to open temporary file!"); + return (FILE_NOT_OPENED); + } + + result = globus_ftp_client_get(&handle, + gsiurl, + &attr, + &restart, + done_cb, + 0); + if(result != GLOBUS_SUCCESS) { + globus_object_t * err; + err = globus_error_get(result); + fprintf(stderr, "%s", globus_object_printable_to_string(err)); + done = GLOBUS_TRUE; + } + else { + globus_ftp_client_register_read(&handle, + buffer, + buffer_length, + data_cb_read, + (void*) *gsiftpfile); + } + + globus_mutex_lock(&lock); + + while(!done) { + globus_cond_wait(&cond, &lock); + } + + globus_mutex_unlock(&lock); + globus_ftp_client_handle_destroy(&handle); + globus_module_deactivate_all(); + + return 0; +} + +int gsiftp_put(char *filename, FILE **gsiftpfile, int num_streams) +{ + int i; + char gsiurl[MAXLEN]; + + globus_ftp_client_handle_t handle; + globus_ftp_client_operationattr_t attr; + globus_ftp_client_handleattr_t handle_attr; + globus_ftp_control_parallelism_t parallelism; + globus_ftp_control_layout_t layout; + globus_byte_t * buffer; + globus_size_t buffer_length = sizeof(buffer); + globus_result_t result; + globus_ftp_client_restart_marker_t restart; + globus_ftp_control_type_t filetype; + + globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); + globus_mutex_init(&lock, GLOBUS_NULL); + globus_cond_init(&cond, GLOBUS_NULL); + globus_ftp_client_handle_init(&handle, GLOBUS_NULL); + globus_ftp_client_handleattr_init(&handle_attr); + globus_ftp_client_operationattr_init(&attr); + layout.mode = GLOBUS_FTP_CONTROL_STRIPING_NONE; + globus_ftp_client_restart_marker_init(&restart); + globus_ftp_client_operationattr_set_mode( + &attr, + GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK); + + if (num_streams >= 1) + { + parallelism.mode = GLOBUS_FTP_CONTROL_PARALLELISM_FIXED; + parallelism.fixed.size = num_streams; + + globus_ftp_client_operationattr_set_parallelism( + &attr, + ¶llelism); + } + + globus_ftp_client_operationattr_set_layout(&attr, + &layout); + + filetype = GLOBUS_FTP_CONTROL_TYPE_IMAGE; + globus_ftp_client_operationattr_set_type (&attr, + filetype); + + globus_ftp_client_handle_init(&handle, &handle_attr); + + done = GLOBUS_FALSE; + + strcpy(gsiurl,"gsiftp://"); + strcat(gsiurl,filename); + + *gsiftpfile = fopen(gsiftp_tmpfile,"r"); + + if (!*gsiftpfile) { + ffpmsg("Unable to open temporary file!"); + return (FILE_NOT_OPENED); + } + + result = globus_ftp_client_put(&handle, + gsiurl, + &attr, + &restart, + done_cb, + 0); + if(result != GLOBUS_SUCCESS) { + globus_object_t * err; + err = globus_error_get(result); + fprintf(stderr, "%s", globus_object_printable_to_string(err)); + done = GLOBUS_TRUE; + } + else { + int rc; + int curr_offset; + + for (i = 0; i< 2 * num_streams && feof(*gsiftpfile) == 0; i++) + { + buffer = malloc(MAX_BUFFER_SIZE_W); + globus_mutex_lock(&lock); + curr_offset = global_offset; + rc = fread(buffer, 1, MAX_BUFFER_SIZE_W, *gsiftpfile); + global_offset += rc; + globus_mutex_unlock(&lock); + globus_ftp_client_register_write( + &handle, + buffer, + rc, + curr_offset, + feof(*gsiftpfile) != 0, + data_cb_write, + (void*) *gsiftpfile); + } + } + + globus_mutex_lock(&lock); + + while(!done) { + globus_cond_wait(&cond, &lock); + } + + globus_mutex_unlock(&lock); + globus_ftp_client_handle_destroy(&handle); + globus_module_deactivate_all(); + + return 0; +} + +static void signal_handler(int sig) { + + switch (sig) { + case SIGALRM: /* process for alarm */ + longjmp(env,sig); + + default: { + /* Hmm, shouldn't have happend */ + exit(sig); + } + } +} + +#endif +#endif diff --git a/software/cfitsio3040/drvrgsiftp.h b/software/cfitsio3040/drvrgsiftp.h new file mode 100644 index 000000000..bd0ec0d4a --- /dev/null +++ b/software/cfitsio3040/drvrgsiftp.h @@ -0,0 +1,21 @@ +#ifndef _GSIFTP_H +#define _GSIFTP_H + +int gsiftp_init(void); +int gsiftp_setoptions(int options); +int gsiftp_getoptions(int *options); +int gsiftp_getversion(int *version); +int gsiftp_shutdown(void); +int gsiftp_checkfile(char *urltype, char *infile, char *outfile); +int gsiftp_open(char *filename, int rwmode, int *driverhandle); +int gsiftp_create(char *filename, int *driverhandle); +int gsiftp_truncate(int driverhandle, LONGLONG filesize); +int gsiftp_size(int driverhandle, LONGLONG *filesize); +int gsiftp_close(int driverhandle); +int gsiftp_remove(char *filename); +int gsiftp_flush(int driverhandle); +int gsiftp_seek(int driverhandle, LONGLONG offset); +int gsiftp_read (int driverhandle, void *buffer, long nbytes); +int gsiftp_write(int driverhandle, void *buffer, long nbytes); + +#endif diff --git a/software/cfitsio3040/drvrmem.c b/software/cfitsio3040/drvrmem.c new file mode 100644 index 000000000..813bacfd5 --- /dev/null +++ b/software/cfitsio3040/drvrmem.c @@ -0,0 +1,1163 @@ +/* This file, drvrmem.c, contains driver routines for memory files. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include /* apparently needed to define size_t */ +#include "fitsio2.h" + +#define RECBUFLEN 1000 + +static char stdin_outfile[FLEN_FILENAME]; + +typedef struct /* structure containing mem file structure */ +{ + char **memaddrptr; /* Pointer to memory address pointer; */ + /* This may or may not point to memaddr. */ + char *memaddr; /* Pointer to starting memory address; may */ + /* not always be used, so use *memaddrptr instead */ + size_t *memsizeptr; /* Pointer to the size of the memory allocation. */ + /* This may or may not point to memsize. */ + size_t memsize; /* Size of the memory allocation; this may not */ + /* always be used, so use *memsizeptr instead. */ + size_t deltasize; /* Suggested increment for reallocating memory */ + void *(*mem_realloc)(void *p, size_t newsize); /* realloc function */ + LONGLONG currentpos; /* current file position, relative to start */ + LONGLONG fitsfilesize; /* size of the FITS file (always <= *memsizeptr) */ + FILE *fileptr; /* pointer to compressed output disk file */ +} memdriver; + +static memdriver memTable[NMAXFILES]; /* allocate mem file handle tables */ + +/*--------------------------------------------------------------------------*/ +int mem_init(void) +{ + int ii; + + for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ + { + memTable[ii].memaddrptr = 0; + memTable[ii].memaddr = 0; + } + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_setoptions(int options) +{ + /* do something with the options argument, to stop compiler warning */ + options = 0; + return(options); +} +/*--------------------------------------------------------------------------*/ +int mem_getoptions(int *options) +{ + *options = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_getversion(int *version) +{ + *version = 10; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_shutdown(void) +{ + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_create(char *filename, int *handle) +/* + Create a new empty memory file for subsequent writes. + The file name is ignored in this case. +*/ +{ + int status; + + /* initially allocate 1 FITS block = 2880 bytes */ + status = mem_createmem(2880L, handle); + + if (status) + { + ffpmsg("failed to create empty memory file (mem_create)"); + return(status); + } + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_create_comp(char *filename, int *handle) +/* + Create a new empty memory file for subsequent writes. + Also create an empty compressed .gz file. The memory file + will be compressed and written to the disk file when the file is closed. +*/ +{ + FILE *diskfile; + char mode[4]; + int status; + + /* first, create disk file for the compressed output */ + + + if ( !strcmp(filename, "-.gz") || !strcmp(filename, "stdout.gz") || + !strcmp(filename, "STDOUT.gz") ) + { + /* special case: create uncompressed FITS file in memory, then + compress it an write it out to 'stdout' when it is closed. */ + + diskfile = stdout; + } + else + { + /* normal case: create disk file for the compressed output */ + + strcpy(mode, "w+b"); /* create file with read-write */ + + diskfile = fopen(filename, "r"); /* does file already exist? */ + + if (diskfile) + { + fclose(diskfile); /* close file and exit with error */ + return(FILE_NOT_CREATED); + } + +#if MACHINE == ALPHAVMS || MACHINE == VAXVMS + /* specify VMS record structure: fixed format, 2880 byte records */ + /* but force stream mode access to enable random I/O access */ + diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); +#else + diskfile = fopen(filename, mode); +#endif + + if (!(diskfile)) /* couldn't create file */ + { + return(FILE_NOT_CREATED); + } + } + + /* now create temporary memory file */ + + /* initially allocate 1 FITS block = 2880 bytes */ + status = mem_createmem(2880L, handle); + + if (status) + { + ffpmsg("failed to create empty memory file (mem_create_comp)"); + return(status); + } + + memTable[*handle].fileptr = diskfile; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_openmem(void **buffptr, /* I - address of memory pointer */ + size_t *buffsize, /* I - size of buffer, in bytes */ + size_t deltasize, /* I - increment for future realloc's */ + void *(*memrealloc)(void *p, size_t newsize), /* function */ + int *handle) +/* + lowest level routine to open a pre-existing memory file. +*/ +{ + int ii; + + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in handle table */ + { + if (memTable[ii].memaddrptr == 0) + { + *handle = ii; + break; + } + } + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + memTable[ii].memaddrptr = (char **) buffptr; /* pointer to start addres */ + memTable[ii].memsizeptr = buffsize; /* allocated size of memory */ + memTable[ii].deltasize = deltasize; /* suggested realloc increment */ + memTable[ii].fitsfilesize = *buffsize; /* size of FITS file (upper limit) */ + memTable[ii].currentpos = 0; /* at beginning of the file */ + memTable[ii].mem_realloc = memrealloc; /* memory realloc function */ + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_createmem(size_t msize, int *handle) +/* + lowest level routine to allocate a memory file. +*/ +{ + int ii; + + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in handle table */ + { + if (memTable[ii].memaddrptr == 0) + { + *handle = ii; + break; + } + } + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + /* use the internally allocated memaddr and memsize variables */ + memTable[ii].memaddrptr = &memTable[ii].memaddr; + memTable[ii].memsizeptr = &memTable[ii].memsize; + + /* allocate initial block of memory for the file */ + if (msize > 0) + { + memTable[ii].memaddr = (char *) malloc(msize); + if ( !(memTable[ii].memaddr) ) + { + ffpmsg("malloc of initial memory failed (mem_createmem)"); + return(FILE_NOT_OPENED); + } + } + + /* set initial state of the file */ + memTable[ii].memsize = msize; + memTable[ii].deltasize = 2880; + memTable[ii].fitsfilesize = 0; + memTable[ii].currentpos = 0; + memTable[ii].mem_realloc = realloc; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_truncate(int handle, LONGLONG filesize) +/* + truncate the file to a new size +*/ +{ + char *ptr; + + /* call the memory reallocation function, if defined */ + if ( memTable[handle].mem_realloc ) + { /* explicit LONGLONG->size_t cast */ + ptr = (memTable[handle].mem_realloc)( + *(memTable[handle].memaddrptr), + (size_t) filesize); + if (!ptr) + { + ffpmsg("Failed to reallocate memory (mem_truncate)"); + return(MEMORY_ALLOCATION); + } + + /* if allocated more memory, initialize it to zero */ + if ( filesize > *(memTable[handle].memsizeptr) ) + { + memset(ptr + *(memTable[handle].memsizeptr), + 0, + ((size_t) filesize) - *(memTable[handle].memsizeptr) ); + } + + *(memTable[handle].memaddrptr) = ptr; + *(memTable[handle].memsizeptr) = (size_t) (filesize); + } + + memTable[handle].fitsfilesize = filesize; + return(0); +} +/*--------------------------------------------------------------------------*/ +int stdin_checkfile(char *urltype, char *infile, char *outfile) +/* + do any special case checking when opening a file on the stdin stream +*/ +{ + if (strlen(outfile)) + { + strcpy(stdin_outfile,outfile); /* an output file is specified */ + strcpy(urltype,"stdinfile://"); + } + else + *stdin_outfile = '\0'; /* no output file was specified */ + + return(0); +} +/*--------------------------------------------------------------------------*/ +int stdin_open(char *filename, int rwmode, int *handle) +/* + open a FITS file from the stdin file stream by copying it into memory + The file name is ignored in this case. +*/ +{ + int status = 0; + char cbuff; + + if (*stdin_outfile) + { + /* copy the stdin stream to the specified disk file then open the file */ + + /* Create the output file */ + status = file_create(stdin_outfile,handle); + + if (status) + { + ffpmsg("Unable to create output file to copy stdin (stdin_open):"); + ffpmsg(stdin_outfile); + return(status); + } + + /* copy the whole stdin stream to the file */ + status = stdin2file(*handle); + file_close(*handle); + + if (status) + { + ffpmsg("failed to copy stdin to file (stdin_open)"); + ffpmsg(stdin_outfile); + return(status); + } + + /* reopen file with proper rwmode attribute */ + status = file_open(stdin_outfile, rwmode, handle); + } + else + { + + /* get the first character, then put it back */ + cbuff = fgetc(stdin); + ungetc(cbuff, stdin); + + /* compressed files begin with 037 or 'P' */ + if (cbuff == 31 || cbuff == 75) + { + /* looks like the input stream is compressed */ + status = mem_compress_stdin_open(filename, rwmode, handle); + + } + else + { + /* copy the stdin stream into memory then open file in memory */ + + if (rwmode != READONLY) + { + ffpmsg("cannot open stdin with WRITE access"); + return(READONLY_FILE); + } + + status = mem_createmem(2880L, handle); + + if (status) + { + ffpmsg("failed to create empty memory file (stdin_open)"); + return(status); + } + + /* copy the whole stdin stream into memory */ + status = stdin2mem(*handle); + + if (status) + { + ffpmsg("failed to copy stdin into memory (stdin_open)"); + free(memTable[*handle].memaddr); + } + } + } + + return(status); +} +/*--------------------------------------------------------------------------*/ +int stdin2mem(int hd) /* handle number */ +/* + Copy the stdin stream into memory. Fill whatever amount of memory + has already been allocated, then realloc more memory if necessary. +*/ +{ + size_t nread, memsize, delta; + LONGLONG filesize; + char *memptr; + char simple[] = "SIMPLE"; + int c, ii, jj; + + memptr = *memTable[hd].memaddrptr; + memsize = *memTable[hd].memsizeptr; + delta = memTable[hd].deltasize; + + filesize = 0; + ii = 0; + + for(jj = 0; (c = fgetc(stdin)) != EOF && jj < 2000; jj++) + { + /* Skip over any garbage at the beginning of the stdin stream by */ + /* reading 1 char at a time, looking for 'S', 'I', 'M', 'P', 'L', 'E' */ + /* Give up if not found in the first 2000 characters */ + + if (c == simple[ii]) + { + ii++; + if (ii == 6) /* found the complete string? */ + { + memcpy(memptr, simple, 6); /* copy "SIMPLE" to buffer */ + filesize = 6; + break; + } + } + else + ii = 0; /* reset search to beginning of the string */ + } + + if (filesize == 0) + { + ffpmsg("Couldn't find the string 'SIMPLE' in the stdin stream."); + ffpmsg("This does not look like a FITS file."); + return(FILE_NOT_OPENED); + } + + /* fill up the remainder of the initial memory allocation */ + nread = fread(memptr + 6, 1, memsize - 6, stdin); + nread += 6; /* add in the 6 characters in 'SIMPLE' */ + + if (nread < memsize) /* reached the end? */ + { + memTable[hd].fitsfilesize = nread; + return(0); + } + + filesize = nread; + + while (1) + { + /* allocate memory for another FITS block */ + memptr = realloc(memptr, memsize + delta); + + if (!memptr) + { + ffpmsg("realloc failed while copying stdin (stdin2mem)"); + return(MEMORY_ALLOCATION); + } + memsize += delta; + + /* read another FITS block */ + nread = fread(memptr + filesize, 1, delta, stdin); + + filesize += nread; + + if (nread < delta) /* reached the end? */ + break; + } + + memTable[hd].fitsfilesize = filesize; + *memTable[hd].memaddrptr = memptr; + *memTable[hd].memsizeptr = memsize; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int stdin2file(int handle) /* handle number */ +/* + Copy the stdin stream to a file. . +*/ +{ + size_t nread = 0; + char simple[] = "SIMPLE"; + int c, ii, jj, status = 0; + char recbuf[RECBUFLEN]; + + ii = 0; + for(jj = 0; (c = fgetc(stdin)) != EOF && jj < 2000; jj++) + { + /* Skip over any garbage at the beginning of the stdin stream by */ + /* reading 1 char at a time, looking for 'S', 'I', 'M', 'P', 'L', 'E' */ + /* Give up if not found in the first 2000 characters */ + + if (c == simple[ii]) + { + ii++; + if (ii == 6) /* found the complete string? */ + { + memcpy(recbuf, simple, 6); /* copy "SIMPLE" to buffer */ + break; + } + } + else + ii = 0; /* reset search to beginning of the string */ + } + + if (ii != 6) + { + ffpmsg("Couldn't find the string 'SIMPLE' in the stdin stream"); + return(FILE_NOT_OPENED); + } + + /* fill up the remainder of the buffer */ + nread = fread(recbuf + 6, 1, RECBUFLEN - 6, stdin); + nread += 6; /* add in the 6 characters in 'SIMPLE' */ + + status = file_write(handle, recbuf, nread); + if (status) + return(status); + + /* copy the rest of stdin stream */ + while(0 != (nread = fread(recbuf,1,RECBUFLEN, stdin))) + { + status = file_write(handle, recbuf, nread); + if (status) + return(status); + } + + return(status); +} +/*--------------------------------------------------------------------------*/ +int stdout_close(int handle) +/* + copy the memory file to stdout, then free the memory +*/ +{ + int status = 0; + + /* copy from memory to standard out. explicit LONGLONG->size_t cast */ + if(fwrite(memTable[handle].memaddr, 1, + ((size_t) memTable[handle].fitsfilesize), stdout) != + (size_t) memTable[handle].fitsfilesize ) + { + ffpmsg("failed to copy memory file to stdout (stdout_close)"); + status = WRITE_ERROR; + } + + free( memTable[handle].memaddr ); /* free the memory */ + memTable[handle].memaddrptr = 0; + memTable[handle].memaddr = 0; + return(status); +} +/*--------------------------------------------------------------------------*/ +int mem_compress_openrw(char *filename, int rwmode, int *hdl) +/* + This routine opens the compressed diskfile and creates an empty memory + buffer with an appropriate size, then calls mem_uncompress2mem. It allows + the memory 'file' to be opened with READWRITE access. +*/ +{ + return(mem_compress_open(filename, READONLY, hdl)); +} +/*--------------------------------------------------------------------------*/ +int mem_compress_open(char *filename, int rwmode, int *hdl) +/* + This routine opens the compressed diskfile and creates an empty memory + buffer with an appropriate size, then calls mem_uncompress2mem. +*/ +{ + FILE *diskfile; + int status, estimated = 1; + unsigned char buffer[4]; + size_t finalsize; + char *ptr; + + if (rwmode != READONLY) + { + ffpmsg( + "cannot open compressed file with WRITE access (mem_compress_open)"); + ffpmsg(filename); + return(READONLY_FILE); + } + + /* open the compressed disk file */ + status = file_openfile(filename, READONLY, &diskfile); + if (status) + { + ffpmsg("failed to open compressed disk file (compress_open)"); + ffpmsg(filename); + return(status); + } + + if (fread(buffer, 1, 2, diskfile) != 2) /* read 2 bytes */ + { + fclose(diskfile); + return(READ_ERROR); + } + + if (memcmp(buffer, "\037\213", 2) == 0) /* GZIP */ + { + /* the uncompressed file size is give at the end of the file */ + + fseek(diskfile, 0, 2); /* move to end of file */ + fseek(diskfile, -4L, 1); /* move back 4 bytes */ + fread(buffer, 1, 4L, diskfile); /* read 4 bytes */ + + /* have to worry about integer byte order */ + finalsize = buffer[0]; + finalsize |= buffer[1] << 8; + finalsize |= buffer[2] << 16; + finalsize |= buffer[3] << 24; + + estimated = 0; /* file size is known, not estimated */ + } + else if (memcmp(buffer, "\120\113", 2) == 0) /* PKZIP */ + { + /* the uncompressed file size is give at byte 22 the file */ + + fseek(diskfile, 22L, 0); /* move to byte 22 */ + fread(buffer, 1, 4L, diskfile); /* read 4 bytes */ + + /* have to worry about integer byte order */ + finalsize = buffer[0]; + finalsize |= buffer[1] << 8; + finalsize |= buffer[2] << 16; + finalsize |= buffer[3] << 24; + + estimated = 0; /* file size is known, not estimated */ + } + else if (memcmp(buffer, "\037\036", 2) == 0) /* PACK */ + finalsize = 0; /* for most methods we can't determine final size */ + else if (memcmp(buffer, "\037\235", 2) == 0) /* LZW */ + finalsize = 0; /* for most methods we can't determine final size */ + else if (memcmp(buffer, "\037\240", 2) == 0) /* LZH */ + finalsize = 0; /* for most methods we can't determine final size */ + else + { + /* not a compressed file; this should never happen */ + fclose(diskfile); + return(1); + } + + if (finalsize == 0) /* estimate uncompressed file size */ + { + fseek(diskfile, 0, 2); /* move to end of the compressed file */ + finalsize = ftell(diskfile); /* position = size of file */ + finalsize = finalsize * 3; /* assume factor of 3 compression */ + } + + fseek(diskfile, 0, 0); /* move back to beginning of file */ + + /* create a memory file big enough (hopefully) for the uncompressed file */ + status = mem_createmem(finalsize, hdl); + + if (status && estimated) + { + /* memory allocation failed, so try a smaller estimated size */ + finalsize = finalsize / 3; + status = mem_createmem(finalsize, hdl); + } + + if (status) + { + fclose(diskfile); + ffpmsg("failed to create empty memory file (compress_open)"); + return(status); + } + + /* uncompress file into memory */ + status = mem_uncompress2mem(filename, diskfile, *hdl); + + fclose(diskfile); + + if (status) + { + mem_close_free(*hdl); /* free up the memory */ + ffpmsg("failed to uncompress file into memory (compress_open)"); + return(status); + } + + /* if we allocated too much memory initially, then free it */ + if (*(memTable[*hdl].memsizeptr) > + (( (size_t) memTable[*hdl].fitsfilesize) + 256L) ) + { + ptr = realloc(*(memTable[*hdl].memaddrptr), + ((size_t) memTable[*hdl].fitsfilesize) ); + if (!ptr) + { + ffpmsg("Failed to reduce size of allocated memory (compress_open)"); + return(MEMORY_ALLOCATION); + } + + *(memTable[*hdl].memaddrptr) = ptr; + *(memTable[*hdl].memsizeptr) = (size_t) (memTable[*hdl].fitsfilesize); + } + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_compress_stdin_open(char *filename, int rwmode, int *hdl) +/* + This routine reads the compressed input stream and creates an empty memory + buffer, then calls mem_uncompress2mem. +*/ +{ + int status; + char *ptr; + + if (rwmode != READONLY) + { + ffpmsg( + "cannot open compressed input stream with WRITE access (mem_compress_stdin_open)"); + return(READONLY_FILE); + } + + /* create a memory file for the uncompressed file */ + status = mem_createmem(28800, hdl); + + if (status) + { + ffpmsg("failed to create empty memory file (compress_stdin_open)"); + return(status); + } + + /* uncompress file into memory */ + status = mem_uncompress2mem(filename, stdin, *hdl); + + if (status) + { + mem_close_free(*hdl); /* free up the memory */ + ffpmsg("failed to uncompress stdin into memory (compress_stdin_open)"); + return(status); + } + + /* if we allocated too much memory initially, then free it */ + if (*(memTable[*hdl].memsizeptr) > + (( (size_t) memTable[*hdl].fitsfilesize) + 256L) ) + { + ptr = realloc(*(memTable[*hdl].memaddrptr), + ((size_t) memTable[*hdl].fitsfilesize) ); + if (!ptr) + { + ffpmsg("Failed to reduce size of allocated memory (compress_stdin_open)"); + return(MEMORY_ALLOCATION); + } + + *(memTable[*hdl].memaddrptr) = ptr; + *(memTable[*hdl].memsizeptr) = (size_t) (memTable[*hdl].fitsfilesize); + } + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_iraf_open(char *filename, int rwmode, int *hdl) +/* + This routine creates an empty memory buffer, then calls iraf2mem to + open the IRAF disk file and convert it to a FITS file in memeory. +*/ +{ + int status; + size_t filesize = 0; + + /* create a memory file with size = 0 for the FITS converted IRAF file */ + status = mem_createmem(filesize, hdl); + if (status) + { + ffpmsg("failed to create empty memory file (mem_iraf_open)"); + return(status); + } + + /* convert the iraf file into a FITS file in memory */ + status = iraf2mem(filename, memTable[*hdl].memaddrptr, + memTable[*hdl].memsizeptr, &filesize, &status); + + if (status) + { + mem_close_free(*hdl); /* free up the memory */ + ffpmsg("failed to convert IRAF file into memory (mem_iraf_open)"); + return(status); + } + + memTable[*hdl].currentpos = 0; /* save starting position */ + memTable[*hdl].fitsfilesize=filesize; /* and initial file size */ + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_rawfile_open(char *filename, int rwmode, int *hdl) +/* + This routine creates an empty memory buffer, writes a minimal + image header, then copies the image data from the raw file into + memory. It will byteswap the pixel values if the raw array + is in little endian byte order. +*/ +{ + FILE *diskfile; + fitsfile *fptr; + short *sptr; + int status, endian, datatype, bytePerPix, naxis; + long dim[5] = {1,1,1,1,1}, ii, nvals, offset = 0; + size_t filesize = 0, datasize; + char rootfile[FLEN_FILENAME], *cptr = 0, *cptr2 = 0; + void *ptr; + + if (rwmode != READONLY) + { + ffpmsg( + "cannot open raw binary file with WRITE access (mem_rawfile_open)"); + ffpmsg(filename); + return(READONLY_FILE); + } + + cptr = strchr(filename, '['); /* search for opening bracket [ */ + + if (!cptr) + { + ffpmsg("binary file name missing '[' character (mem_rawfile_open)"); + ffpmsg(filename); + return(URL_PARSE_ERROR); + } + + *rootfile = '\0'; + strncat(rootfile, filename, cptr - filename); /* store the rootname */ + + cptr++; + + while (*cptr == ' ') + cptr++; /* skip leading blanks */ + + /* Get the Data Type of the Image */ + + if (*cptr == 'b' || *cptr == 'B') + { + datatype = BYTE_IMG; + bytePerPix = 1; + } + else if (*cptr == 'i' || *cptr == 'I') + { + datatype = SHORT_IMG; + bytePerPix = 2; + } + else if (*cptr == 'u' || *cptr == 'U') + { + datatype = USHORT_IMG; + bytePerPix = 2; + + } + else if (*cptr == 'j' || *cptr == 'J') + { + datatype = LONG_IMG; + bytePerPix = 4; + } + else if (*cptr == 'r' || *cptr == 'R' || *cptr == 'f' || *cptr == 'F') + { + datatype = FLOAT_IMG; + bytePerPix = 4; + } + else if (*cptr == 'd' || *cptr == 'D') + { + datatype = DOUBLE_IMG; + bytePerPix = 8; + } + else + { + ffpmsg("error in raw binary file datatype (mem_rawfile_open)"); + ffpmsg(filename); + return(URL_PARSE_ERROR); + } + + cptr++; + + /* get Endian: Big or Little; default is same as the local machine */ + + if (*cptr == 'b' || *cptr == 'B') + { + endian = 0; + cptr++; + } + else if (*cptr == 'l' || *cptr == 'L') + { + endian = 1; + cptr++; + } + else + endian = BYTESWAPPED; /* byteswapped machines are little endian */ + + /* read each dimension (up to 5) */ + + naxis = 1; + dim[0] = strtol(cptr, &cptr2, 10); + + if (cptr2 && *cptr2 == ',') + { + naxis = 2; + dim[1] = strtol(cptr2+1, &cptr, 10); + + if (cptr && *cptr == ',') + { + naxis = 3; + dim[2] = strtol(cptr+1, &cptr2, 10); + + if (cptr2 && *cptr2 == ',') + { + naxis = 4; + dim[3] = strtol(cptr2+1, &cptr, 10); + + if (cptr && *cptr == ',') + naxis = 5; + dim[4] = strtol(cptr+1, &cptr2, 10); + } + } + } + + cptr = maxvalue(cptr, cptr2); + + if (*cptr == ':') /* read starting offset value */ + offset = strtol(cptr+1, 0, 10); + + nvals = dim[0] * dim[1] * dim[2] * dim[3] * dim[4]; + datasize = nvals * bytePerPix; + filesize = nvals * bytePerPix + 2880; + filesize = ((filesize - 1) / 2880 + 1) * 2880; + + /* open the raw binary disk file */ + status = file_openfile(rootfile, READONLY, &diskfile); + if (status) + { + ffpmsg("failed to open raw binary file (mem_rawfile_open)"); + ffpmsg(rootfile); + return(status); + } + + /* create a memory file with corrct size for the FITS converted raw file */ + status = mem_createmem(filesize, hdl); + if (status) + { + ffpmsg("failed to create memory file (mem_rawfile_open)"); + fclose(diskfile); + return(status); + } + + /* open this piece of memory as a new FITS file */ + ffimem(&fptr, (void **) memTable[*hdl].memaddrptr, &filesize, 0, 0, &status); + + /* write the required header keywords */ + ffcrim(fptr, datatype, naxis, dim, &status); + + /* close the FITS file, but keep the memory allocated */ + ffclos(fptr, &status); + + if (status > 0) + { + ffpmsg("failed to write basic image header (mem_rawfile_open)"); + fclose(diskfile); + mem_close_free(*hdl); /* free up the memory */ + return(status); + } + + if (offset > 0) + fseek(diskfile, offset, 0); /* offset to start of the data */ + + /* read the raw data into memory */ + ptr = *memTable[*hdl].memaddrptr + 2880; + + if (fread((char *) ptr, 1, datasize, diskfile) != datasize) + status = READ_ERROR; + + fclose(diskfile); /* close the raw binary disk file */ + + if (status) + { + mem_close_free(*hdl); /* free up the memory */ + ffpmsg("failed to copy raw file data into memory (mem_rawfile_open)"); + return(status); + } + + if (datatype == USHORT_IMG) /* have to subtract 32768 from each unsigned */ + { /* value to conform to FITS convention. More */ + /* efficient way to do this is to just flip */ + /* the most significant bit. */ + + sptr = (short *) ptr; + + if (endian == BYTESWAPPED) /* working with native format */ + { + for (ii = 0; ii < nvals; ii++, sptr++) + { + *sptr = ( *sptr ) ^ 0x8000; + } + } + else /* pixels are byteswapped WRT the native format */ + { + for (ii = 0; ii < nvals; ii++, sptr++) + { + *sptr = ( *sptr ) ^ 0x80; + } + } + } + + if (endian) /* swap the bytes if array is in little endian byte order */ + { + if (datatype == SHORT_IMG || datatype == USHORT_IMG) + { + ffswap2( (short *) ptr, nvals); + } + else if (datatype == LONG_IMG || datatype == FLOAT_IMG) + { + ffswap4( (INT32BIT *) ptr, nvals); + } + + else if (datatype == DOUBLE_IMG) + { + ffswap8( (double *) ptr, nvals); + } + } + + memTable[*hdl].currentpos = 0; /* save starting position */ + memTable[*hdl].fitsfilesize=filesize; /* and initial file size */ + + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl) +{ +/* + lower level routine to uncompress a file into memory. The file + has already been opened and the memory buffer has been allocated. +*/ + + size_t finalsize; + int status; + /* uncompress file into memory */ + status = 0; + uncompress2mem(filename, diskfile, + memTable[hdl].memaddrptr, /* pointer to memory address */ + memTable[hdl].memsizeptr, /* pointer to size of memory */ + realloc, /* reallocation function */ + &finalsize, &status); /* returned file size nd status*/ + memTable[hdl].currentpos = 0; /* save starting position */ + memTable[hdl].fitsfilesize=finalsize; /* and initial file size */ + return status; +} +/*--------------------------------------------------------------------------*/ +int mem_size(int handle, LONGLONG *filesize) +/* + return the size of the file; only called when the file is first opened +*/ +{ + *filesize = memTable[handle].fitsfilesize; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_close_free(int handle) +/* + close the file and free the memory. +*/ +{ + free( *(memTable[handle].memaddrptr) ); + + memTable[handle].memaddrptr = 0; + memTable[handle].memaddr = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_close_keep(int handle) +/* + close the memory file but do not free the memory. +*/ +{ + memTable[handle].memaddrptr = 0; + memTable[handle].memaddr = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_close_comp(int handle) +/* + compress the memory file, writing it out to the fileptr (which might + be stdout) +*/ +{ + int status = 0; + size_t compsize; + + /* compress file in memory to a .gz disk file */ + + if(compress2file_from_mem(memTable[handle].memaddr, + (size_t) (memTable[handle].fitsfilesize), + memTable[handle].fileptr, + &compsize, &status ) ) + { + ffpmsg("failed to copy memory file to file (mem_close_comp)"); + status = WRITE_ERROR; + } + + free( memTable[handle].memaddr ); /* free the memory */ + memTable[handle].memaddrptr = 0; + memTable[handle].memaddr = 0; + + /* close the compressed disk file (except if it is 'stdout' */ + if (memTable[handle].fileptr != stdout) + fclose(memTable[handle].fileptr); + + return(status); +} +/*--------------------------------------------------------------------------*/ +int mem_seek(int handle, LONGLONG offset) +/* + seek to position relative to start of the file. +*/ +{ + if (offset > memTable[handle].fitsfilesize ) + return(END_OF_FILE); + + memTable[handle].currentpos = offset; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_read(int hdl, void *buffer, long nbytes) +/* + read bytes from the current position in the file +*/ +{ + if (memTable[hdl].currentpos + nbytes > memTable[hdl].fitsfilesize) + return(END_OF_FILE); + + memcpy(buffer, + *(memTable[hdl].memaddrptr) + memTable[hdl].currentpos, + nbytes); + + memTable[hdl].currentpos += nbytes; + return(0); +} +/*--------------------------------------------------------------------------*/ +int mem_write(int hdl, void *buffer, long nbytes) +/* + write bytes at the current position in the file +*/ +{ + size_t newsize; + char *ptr; + + if ((size_t) (memTable[hdl].currentpos + nbytes) > + *(memTable[hdl].memsizeptr) ) + { + + if (!(memTable[hdl].mem_realloc)) + { + ffpmsg("realloc function not defined (mem_write)"); + return(WRITE_ERROR); + } + + /* + Attempt to reallocate additional memory: + the memory buffer size is incremented by the larger of: + 1 FITS block (2880 bytes) or + the defined 'deltasize' parameter + */ + + newsize = maxvalue( (size_t) + (((memTable[hdl].currentpos + nbytes - 1) / 2880) + 1) * 2880, + *(memTable[hdl].memsizeptr) + memTable[hdl].deltasize); + + /* call the realloc function */ + ptr = (memTable[hdl].mem_realloc)( + *(memTable[hdl].memaddrptr), + newsize); + if (!ptr) + { + ffpmsg("Failed to reallocate memory (mem_write)"); + return(MEMORY_ALLOCATION); + } + + *(memTable[hdl].memaddrptr) = ptr; + *(memTable[hdl].memsizeptr) = newsize; + } + + /* now copy the bytes from the buffer into memory */ + memcpy( *(memTable[hdl].memaddrptr) + memTable[hdl].currentpos, + buffer, + nbytes); + + memTable[hdl].currentpos += nbytes; + memTable[hdl].fitsfilesize = + maxvalue(memTable[hdl].fitsfilesize, + memTable[hdl].currentpos); + return(0); +} diff --git a/software/cfitsio3040/drvrnet.c b/software/cfitsio3040/drvrnet.c new file mode 100644 index 000000000..b384351c6 --- /dev/null +++ b/software/cfitsio3040/drvrnet.c @@ -0,0 +1,2644 @@ +/* This file, drvrhttp.c contains driver routines for http, ftp and root + files. */ + +/* This file was written by Bruce O'Neel at the ISDC, Switzerland */ +/* The FITSIO software is maintained by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + + +/* Notes on the drivers: + + The ftp driver uses passive mode exclusivly. If your remote system can't + deal with passive mode then it'll fail. Since Netscape Navigator uses + passive mode as well there shouldn't be too many ftp servers which have + problems. + + + The http driver works properly with 301 and 302 redirects. For many more + gory details see http://www.w3c.org/Protocols/rfc2068/rfc2068. The only + catch to the 301/302 redirects is that they have to redirect to another + http:// url. If not, things would have to change a lot in cfitsio and this + was thought to be too difficult. + + Redirects look like + + + + 301 Moved Permanently + +

Moved Permanently

+ The document has moved here.

+ + + This redirect was from apache 1.2.5 but most of the other servers produce + something very similiar. The parser for the redirects finds the first + anchor tag in the body and goes there. If that wasn't what was intended + by the remote system then hopefully the error stack, which includes notes + about the redirect will help the user fix the problem. + + + + Root protocal doesn't have any real docs, so, the emperical docs are as + follows. + + First, you must use a slightly modified rootd server. The modifications + include implimentation of the stat command which returns the size of the + remote file. Without that it's impossible for cfitsio to work properly + since fitsfiles don't include any information about the size of the files + in the headers. The rootd server closes the connections on any errors, + including reading beyond the end of the file or seeking beyond the end + of the file. The rootd:// driver doesn't reopen a closed connection, if + the connection is closed you're pretty much done. + + The messages are of the form + + + + All binary information is transfered in network format, so use htonl and + ntohl to convert back and forth. + + :== 4 byte length, in network format, the len doesn't include the + length of + :== one of the message opcodes below, 4 bytes, network format + :== depends on opcode + + The response is of the same form with the same opcode sent. Success is + indicated by being 0. + + Root is a NFSish protocol where each read/write includes the byte + offset to read or write to. As a result, seeks will always succeed + in the driver even if they would cause a fatal error when you try + to read because you're beyond the end of the file. + + There is file locking on the host such that you need to possibly + create /usr/tmp/rootdtab on the host system. There is one file per + socket connection, though the rootd daemon can support multiple + files open at once. + + The messages are sent in the following order: + + ROOTD_USER - user name, is the user name, trailing + null is sent though it's not required it seems. A ROOTD_AUTH + message is returned with any sort of error meaning that the user + name is wrong. + + ROOTD_PASS - password, ones complemented, stored in . Once + again the trailing null is sent. Once again a ROOTD_AUTH message is + returned + + ROOTD_OPEN - includes filename and one of + {create|update|read} as the file mode. ~ seems to be dealt with + as the username's login directory. A ROOTD_OPEN message is + returned. + + Once the file is opened any of the following can be sent: + + ROOTD_STAT - file status and size + returns a message where is the file length in bytes + + ROOTD_FLUSH - flushes the file, not sure this has any real effect + on the daemon since the daemon uses open/read/write/close rather + than the buffered fopen/fread/fwrite/fclose. + + ROOTD_GET - on send includes a text message of + offset and length to get. Return is a status message first with a + status value, then, the raw bytes for the length that you + requested. It's an error to seek or read past the end of the file, + and, the rootd daemon exits and won't respond anymore. Ie, don't + do this. + + ROOTD_PUT - on send includes a text message of + offset and length to put. Then send the raw bytes you want to + write. Then recieve a status message + + + When you are finished then you send the message: + + ROOTD_CLOSE - closes the file + + Once the file is closed then the socket is closed. + +$Id: drvrnet.c,v 3.45 2005/12/21 18:18:01 pence Exp $ + +$Log: drvrnet.c,v $ +Revision 3.45 2005/12/21 18:18:01 pence +New beta 3.005 release. Contains new cfortran.h to support integer*8 +parameters when calling cfitsio from Fortran tasks. Also has modified +fitsio.h file that now assumes that the 'long long' data type is supported +by the C compiler (which may not be the case for older compilers). + +Revision 1.56 2000/01/04 11:58:31 oneel +Updates so that compressed network files are dealt with regardless of +their file names and/or mime types. + +Revision 1.55 2000/01/04 10:52:40 oneel +cfitsio 2.034 + +Revision 1.51 1999/08/10 12:13:40 oneel +Make the http code a bit less picky about the types of files it +uncompresses. Now it also uncompresses files which end in .Z or .gz. + +Revision 1.50 1999/08/04 12:38:46 oneel +Don's 2.0.32 patch with dal 1.3 + +Revision 1.39 1998/12/02 15:31:33 oneel +Updates to drvrnet.c so that less compiler warnings would be +generated. Fixes the signal handling. + +Revision 1.38 1998/11/23 10:03:24 oneel +Added in a useragent string, as suggested by: +Tim Kimball � Data Systems Division � kimball@stsci.edu � 410-338-4417 +Space Telescope Science Institute � http://www.stsci.edu/~kimball/ +3700 San Martin Drive � http://archive.stsci.edu/ +Baltimore MD 21218 USA � http://faxafloi.stsci.edu:4547/ + + + */ + +#ifdef HAVE_NET_SERVICES +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(unix) || defined(__unix__) || defined(__unix) +#include +#endif + +#include +#include +#include "fitsio2.h" + +static jmp_buf env; /* holds the jump buffer for setjmp/longjmp pairs */ +static void signal_handler(int sig); + +/* Network routine error codes */ +#define NET_OK 0 +#define NOT_INET_ADDRESS -1000 +#define UNKNOWN_INET_HOST -1001 +#define CONNECTION_ERROR -1002 + +/* Network routine constants */ +#define NET_DEFAULT 0 +#define NET_OOB 1 +#define NET_PEEK 2 + +#define NETTIMEOUT 180 /* in secs */ + +/* local defines and variables */ +#define MAXLEN 1200 +#define SHORTLEN 100 +static char netoutfile[MAXLEN]; + + +#define ROOTD_USER 2000 /*user id follows */ +#define ROOTD_PASS 2001 /*passwd follows */ +#define ROOTD_AUTH 2002 /*authorization status (to client) */ +#define ROOTD_FSTAT 2003 /*filename follows */ +#define ROOTD_OPEN 2004 /*filename follows + mode */ +#define ROOTD_PUT 2005 /*offset, number of bytes and buffer */ +#define ROOTD_GET 2006 /*offset, number of bytes */ +#define ROOTD_FLUSH 2007 /*flush file */ +#define ROOTD_CLOSE 2008 /*close file */ +#define ROOTD_STAT 2009 /*return rootd statistics */ +#define ROOTD_ACK 2010 /*acknowledgement (all OK) */ +#define ROOTD_ERR 2011 /*error code and message follow */ + +typedef struct /* structure containing disk file structure */ +{ + int sock; + LONGLONG currentpos; +} rootdriver; + +static rootdriver handleTable[NMAXFILES]; /* allocate diskfile handle tables */ + +/* static prototypes */ + +static int NET_TcpConnect(char *hostname, int port); +static int NET_SendRaw(int sock, const void *buf, int length, int opt); +static int NET_RecvRaw(int sock, void *buffer, int length); +static int NET_ParseUrl(const char *url, char *proto, char *host, int *port, + char *fn); +static int CreateSocketAddress(struct sockaddr_in *sockaddrPtr, + char *host,int port); +static int ftp_status(FILE *ftp, char *statusstr); +static int http_open_network(char *url, FILE **httpfile, char *contentencoding, + int *contentlength); +static int ftp_open_network(char *url, FILE **ftpfile, FILE **command, + int *sock); + +static int root_send_buffer(int sock, int op, char *buffer, int buflen); +static int root_recv_buffer(int sock, int *op, char *buffer,int buflen); +static int root_openfile(char *filename, char *rwmode, int *sock); + +/***************************/ +/* Static variables */ + +static int closehttpfile; +static int closememfile; +static int closefdiskfile; +static int closediskfile; +static int closefile; +static int closeoutfile; +static int closecommandfile; +static int closeftpfile; +static FILE *diskfile; +static FILE *outfile; + +/*--------------------------------------------------------------------------*/ +/* This creates a memory file handle with a copy of the URL in filename. The + file is uncompressed if necessary */ + +int http_open(char *filename, int rwmode, int *handle) +{ + + FILE *httpfile; + char contentencoding[SHORTLEN]; + char newfilename[MAXLEN]; + char errorstr[MAXLEN]; + char recbuf[MAXLEN]; + long len; + int contentlength; + int status; + char firstchar; + + closehttpfile = 0; + closememfile = 0; + + /* don't do r/w files */ + if (rwmode != 0) { + ffpmsg("Can't open http:// type file with READWRITE access"); + ffpmsg(" Specify an outfile for r/w access (http_open)"); + goto error; + } + + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + (void) signal(SIGALRM, signal_handler); + + /* Open the network connection */ + + /* Does the file have a .Z or .gz in it */ + /* Also, if file has a '?' in it (probably cgi script) */ + if (strstr(filename,".Z") || strstr(filename,".gz") || + strstr(filename,"?")) { + alarm(NETTIMEOUT); + if (http_open_network(filename,&httpfile,contentencoding, + &contentlength)) { + alarm(0); + ffpmsg("Unable to open http file (http_open):"); + ffpmsg(filename); + goto error; + } + } else { + alarm(NETTIMEOUT); + /* Try the .gz one */ + strcpy(newfilename,filename); + strcat(newfilename,".gz"); + + if (http_open_network(newfilename,&httpfile,contentencoding, + &contentlength)) { + alarm(0); + /* Now the .Z one */ + strcpy(newfilename,filename); + strcat(newfilename,".Z"); + alarm(NETTIMEOUT); + if (http_open_network(newfilename,&httpfile,contentencoding, + &contentlength)) { + alarm(0); + alarm(NETTIMEOUT); + if (http_open_network(filename,&httpfile,contentencoding, + &contentlength)) { + alarm(0); + ffpmsg("Unable to open http file (http_open)"); + ffpmsg(filename); + goto error; + } + } + } + } + + closehttpfile++; + + /* Create the memory file */ + if ((status = mem_create(filename,handle))) { + ffpmsg("Unable to create memory file (http_open)"); + goto error; + } + + closememfile++; + + /* Now, what do we do with the file */ + /* Check to see what the first character is */ + firstchar = fgetc(httpfile); + ungetc(firstchar,httpfile); + if (!strcmp(contentencoding,"x-gzip") || + !strcmp(contentencoding,"x-compress") || + strstr(filename,".gz") || + strstr(filename,".Z") || + ('\037' == firstchar)) { + /* do the compress dance, which is the same as the gzip dance */ + /* Using the cfitsio routine */ + + status = 0; + /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, + Given the choices for nettimeout above they'll probaby ^C before, but + it's always worth a shot*/ + + alarm(NETTIMEOUT*10); + status = mem_uncompress2mem(filename, httpfile, *handle); + alarm(0); + if (status) { + ffpmsg("Error writing compressed memory file (http_open)"); + ffpmsg(filename); + goto error; + } + + } else { + /* It's not compressed, bad choice, but we'll copy it anyway */ + if (contentlength % 2880) { + sprintf(errorstr,"Content-Length not a multiple of 2880 (http_open) %d", + contentlength); + ffpmsg(errorstr); + } + + /* write a memory file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { + alarm(0); /* cancel alarm */ + status = mem_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error copying http file into memory (http_open)"); + ffpmsg(filename); + goto error; + } + alarm(NETTIMEOUT); /* rearm the alarm */ + } + } + + fclose(httpfile); + + signal(SIGALRM, SIG_DFL); + alarm(0); + return mem_seek(*handle,0); + + error: + alarm(0); /* clear it */ + if (closehttpfile) { + fclose(httpfile); + } + if (closememfile) { + mem_close_free(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} +/*--------------------------------------------------------------------------*/ +/* This creates a memory file handle with a copy of the URL in filename. The + file must be compressed and is copied (still compressed) to disk first. + The compressed disk file is then uncompressed into memory (READONLY). +*/ + +int http_compress_open(char *url, int rwmode, int *handle) +{ + FILE *httpfile; + char contentencoding[SHORTLEN]; + char recbuf[MAXLEN]; + long len; + int contentlength; + int ii, flen, status; + char firstchar; + + closehttpfile = 0; + closediskfile = 0; + closefdiskfile = 0; + closememfile = 0; + + /* cfileio made a mistake, should set the netoufile first otherwise + we don't know where to write the output file */ + + flen = strlen(netoutfile); + if (!flen) { + ffpmsg + ("Output file not set, shouldn't have happened (http_compress_open)"); + goto error; + } + + if (rwmode != 0) { + ffpmsg("Can't open compressed http:// type file with READWRITE access"); + ffpmsg(" Specify an UNCOMPRESSED outfile (http_compress_open)"); + goto error; + } + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + + /* Open the http connectin */ + alarm(NETTIMEOUT); + if ((status = http_open_network(url,&httpfile,contentencoding, + &contentlength))) { + alarm(0); + ffpmsg("Unable to open http file (http_compress_open)"); + ffpmsg(url); + goto error; + } + + closehttpfile++; + + /* Better be compressed */ + + firstchar = fgetc(httpfile); + ungetc(firstchar,httpfile); + if (!strcmp(contentencoding,"x-gzip") || + !strcmp(contentencoding,"x-compress") || + ('\037' == firstchar)) { + + if (*netoutfile == '!') + { + /* user wants to clobber file, if it already exists */ + for (ii = 0; ii < flen; ii++) + netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ + + status = file_remove(netoutfile); + } + + /* Create the new file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output disk file (http_compress_open):"); + ffpmsg(netoutfile); + goto error; + } + + closediskfile++; + + /* write a file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { + alarm(0); + status = file_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error writing disk file (http_compres_open)"); + ffpmsg(netoutfile); + goto error; + } + alarm(NETTIMEOUT); + } + file_close(*handle); + fclose(httpfile); + closehttpfile--; + closediskfile--; + + /* File is on disk, let's uncompress it into memory */ + + if (NULL == (diskfile = fopen(netoutfile,"r"))) { + ffpmsg("Unable to reopen disk file (http_compress_open)"); + ffpmsg(netoutfile); + goto error; + } + closefdiskfile++; + + /* Create the memory handle to hold it */ + if ((status = mem_create(url,handle))) { + ffpmsg("Unable to create memory file (http_compress_open)"); + goto error; + } + closememfile++; + + /* Uncompress it */ + status = 0; + status = mem_uncompress2mem(url,diskfile,*handle); + fclose(diskfile); + closefdiskfile--; + if (status) { + ffpmsg("Error uncompressing disk file to memory (http_compress_open)"); + ffpmsg(netoutfile); + goto error; + } + + } else { + /* Opps, this should not have happened */ + ffpmsg("Can only have compressed files here (http_compress_open)"); + goto error; + } + + signal(SIGALRM, SIG_DFL); + alarm(0); + return mem_seek(*handle,0); + + error: + alarm(0); /* clear it */ + if (closehttpfile) { + fclose(httpfile); + } + if (closefdiskfile) { + fclose(diskfile); + } + if (closememfile) { + mem_close_free(*handle); + } + if (closediskfile) { + file_close(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +/*--------------------------------------------------------------------------*/ +/* This creates a file handle with a copy of the URL in filename. The http + file is copied to disk first. If it's compressed then it is + uncompressed when copying to the disk */ + +int http_file_open(char *url, int rwmode, int *handle) +{ + FILE *httpfile; + char contentencoding[SHORTLEN]; + char errorstr[MAXLEN]; + char recbuf[MAXLEN]; + long len; + int contentlength; + int ii, flen, status; + char firstchar; + + /* Check if output file is actually a memory file */ + if (!strncmp(netoutfile, "mem:", 4) ) + { + /* allow the memory file to be opened with write access */ + return( http_open(url, READONLY, handle) ); + } + + closehttpfile = 0; + closefile = 0; + closeoutfile = 0; + + /* cfileio made a mistake, we need to know where to write the file */ + flen = strlen(netoutfile); + if (!flen) { + ffpmsg("Output file not set, shouldn't have happened (http_file_open)"); + return (FILE_NOT_OPENED); + } + + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + + /* Open the network connection */ + alarm(NETTIMEOUT); + if ((status = http_open_network(url,&httpfile,contentencoding, + &contentlength))) { + alarm(0); + ffpmsg("Unable to open http file (http_file_open)"); + ffpmsg(url); + goto error; + } + + closehttpfile++; + + if (*netoutfile == '!') + { + /* user wants to clobber disk file, if it already exists */ + for (ii = 0; ii < flen; ii++) + netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ + + status = file_remove(netoutfile); + } + + firstchar = fgetc(httpfile); + ungetc(firstchar,httpfile); + if (!strcmp(contentencoding,"x-gzip") || + !strcmp(contentencoding,"x-compress") || + ('\037' == firstchar)) { + + /* to make this more cfitsioish we use the file driver calls to create + the disk file */ + + /* Create the output file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output file (http_file_open)"); + ffpmsg(netoutfile); + goto error; + } + + file_close(*handle); + if (NULL == (outfile = fopen(netoutfile,"w"))) { + ffpmsg("Unable to reopen the output file (http_file_open)"); + ffpmsg(netoutfile); + goto error; + } + closeoutfile++; + status = 0; + + /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, + Given the choices for nettimeout above they'll probaby ^C before, but + it's always worth a shot*/ + + alarm(NETTIMEOUT*10); + status = uncompress2file(url,httpfile,outfile,&status); + alarm(0); + if (status) { + ffpmsg("Error uncompressing http file to disk file (http_file_open)"); + ffpmsg(url); + ffpmsg(netoutfile); + goto error; + } + fclose(outfile); + closeoutfile--; + } else { + + /* Create the output file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output file (http_file_open)"); + ffpmsg(netoutfile); + goto error; + } + + /* Give a warning message. This could just be bad padding at the end + so don't treat it like an error. */ + closefile++; + + if (contentlength % 2880) { + sprintf(errorstr, + "Content-Length not a multiple of 2880 (http_file_open) %d", + contentlength); + ffpmsg(errorstr); + } + + /* write a file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { + alarm(0); + status = file_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error copying http file to disk file (http_file_open)"); + ffpmsg(url); + ffpmsg(netoutfile); + goto error; + } + } + file_close(*handle); + closefile--; + } + + fclose(httpfile); + closehttpfile--; + + signal(SIGALRM, SIG_DFL); + alarm(0); + + return file_open(netoutfile,rwmode,handle); + + error: + alarm(0); /* clear it */ + if (closehttpfile) { + fclose(httpfile); + } + if (closeoutfile) { + fclose(outfile); + } + if (closefile) { + file_close(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +/*--------------------------------------------------------------------------*/ +/* This is the guts of the code to get a file via http. + url is the input url + httpfile is set to be the file connected to the socket which you can + read the file from + contentencoding is the mime type of the file, returned if the http server + returns it + contentlength is the lenght of the file, returned if the http server returns + it +*/ +static int http_open_network(char *url, FILE **httpfile, char *contentencoding, + int *contentlength) +{ + + int status; + int sock; + int tmpint; + char recbuf[MAXLEN]; + char tmpstr[MAXLEN]; + char tmpstr1[SHORTLEN]; + char errorstr[MAXLEN]; + char proto[SHORTLEN]; + char host[SHORTLEN]; + char fn[MAXLEN]; + char turl[MAXLEN]; + char *scratchstr; + int port; + float version; + + char pproto[SHORTLEN]; + char phost[SHORTLEN]; /* address of the proxy server */ + int pport; /* port number of the proxy server */ + char pfn[MAXLEN]; + char *proxy; /* URL of the proxy server */ + + /* Parse the URL apart again */ + strcpy(turl,"http://"); + strcat(turl,url); + if (NET_ParseUrl(turl,proto,host,&port,fn)) { + sprintf(errorstr,"URL Parse Error (http_open) %s",url); + ffpmsg(errorstr); + return (FILE_NOT_OPENED); + } + + /* Ph. Prugniel 2003/04/03 + Are we using a proxy? + + We use a proxy if the environment variable "http_proxy" is set to an + address, eg. http://wwwcache.nottingham.ac.uk:3128 + ("http_proxy" is also used by wget) + */ + proxy = getenv("http_proxy"); + + /* Connect to the remote host */ + if (proxy) { + if (NET_ParseUrl(proxy,pproto,phost,&pport,pfn)) { + sprintf(errorstr,"URL Parse Error (http_open) %s",proxy); + ffpmsg(errorstr); + return (FILE_NOT_OPENED); + } + sock = NET_TcpConnect(phost,pport); + } + else + sock = NET_TcpConnect(host,port); + + if (sock < 0) { + if (proxy) { + ffpmsg("Couldn't connect to host via proxy server (http_open_network)"); + ffpmsg(proxy); + } + return (FILE_NOT_OPENED); + } + + /* Make the socket a stdio file */ + if (NULL == (*httpfile = fdopen(sock,"r"))) { + ffpmsg ("fdopen failed to convert socket to file (http_open_network)"); + close(sock); + return (FILE_NOT_OPENED); + } + + /* Send the GET request to the remote server */ + /* Ph. Prugniel 2003/04/03 + One must add the Host: command because of HTTP 1.1 servers (ie. virtual + hosts) */ + + if (proxy) + sprintf(tmpstr,"GET http://%s:%-d%s HTTP/1.0\r\n",host,port,fn); + else + sprintf(tmpstr,"GET %s HTTP/1.0\r\n",fn); + + sprintf(tmpstr1,"User-Agent: HEASARC/CFITSIO/%-8.3f\r\n",ffvers(&version)); + strcat(tmpstr,tmpstr1); + + /* HTTP 1.1 servers require the following 'Host: ' string */ + sprintf(tmpstr1,"Host: %s:%-d\r\n\r\n",host,port); + strcat(tmpstr,tmpstr1); + + status = NET_SendRaw(sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + + /* read the header */ + if (!(fgets(recbuf,MAXLEN,*httpfile))) { + sprintf (errorstr,"http header short (http_open_network) %s",recbuf); + ffpmsg(errorstr); + fclose(*httpfile); + return (FILE_NOT_OPENED); + } + *contentlength = 0; + contentencoding[0] = '\0'; + + /* Our choices are 200, ok, 301, temporary redirect, or 302 perm redirect */ + sscanf(recbuf,"%s %d",tmpstr,&status); + if (status != 200){ + if (status == 301 || status == 302) { + /* got a redirect */ + if (status == 301) { + ffpmsg("Note: Web server replied with a temporary redirect from"); + } else { + ffpmsg("Note: Web server replied with a redirect from"); + } + ffpmsg(turl); + /* now, let's not write the most sophisticated parser here */ + + while (fgets(recbuf,MAXLEN,*httpfile)) { + scratchstr = strstr(recbuf," 3) { + recbuf[strlen(recbuf)-1] = '\0'; + recbuf[strlen(recbuf)-1] = '\0'; + } + sscanf(recbuf,"%s %d",tmpstr,&tmpint); + /* Did we get a content-length header ? */ + if (!strcmp(tmpstr,"Content-Length:")) { + *contentlength = tmpint; + } + /* Did we get the content-encoding header ? */ + if (!strcmp(tmpstr,"Content-Encoding:")) { + if (NULL != (scratchstr = strstr(recbuf,":"))) { + /* Found the : */ + scratchstr++; /* skip the : */ + scratchstr++; /* skip the extra space */ + strcpy(contentencoding,scratchstr); + } + } + } + + /* we're done, so return */ + return 0; +} + + +/*--------------------------------------------------------------------------*/ +/* This creates a memory file handle with a copy of the URL in filename. The + file is uncompressed if necessary */ + +int ftp_open(char *filename, int rwmode, int *handle) +{ + + FILE *ftpfile; + FILE *command; + int sock; + char newfilename[MAXLEN]; + char recbuf[MAXLEN]; + long len; + int status; + char firstchar; + + closememfile = 0; + closecommandfile = 0; + closeftpfile = 0; + + /* don't do r/w files */ + if (rwmode != 0) { + ffpmsg("Can't open ftp:// type file with READWRITE access"); + ffpmsg("Specify an outfile for r/w access (ftp_open)"); + return (FILE_NOT_OPENED); + } + + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + + /* Open the ftp connetion. ftpfile is connected to the file port, + command is connected to port 21. sock is the socket on port 21 */ + + alarm(NETTIMEOUT); + strcpy(newfilename,filename); + /* Does the file have a .Z or .gz in it */ + if (strstr(newfilename,".Z") || strstr(newfilename,".gz")) { + alarm(NETTIMEOUT); + if (ftp_open_network(filename,&ftpfile,&command,&sock)) { + + alarm(0); + ffpmsg("Unable to open ftp file (ftp_open)"); + ffpmsg(filename); + goto error; + } + } else { + /* Try the .gz one */ + strcpy(newfilename,filename); + strcat(newfilename,".gz"); + alarm(NETTIMEOUT); + if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { + + alarm(0); + strcpy(newfilename,filename); + strcat(newfilename,".Z"); + alarm(NETTIMEOUT); + if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { + + /* Now as given */ + alarm(0); + strcpy(newfilename,filename); + alarm(NETTIMEOUT); + if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { + alarm(0); + ffpmsg("Unable to open ftp file (ftp_open)"); + ffpmsg(newfilename); + goto error; + } + } + } + } + + closeftpfile++; + closecommandfile++; + + /* create the memory file */ + if ((status = mem_create(filename,handle))) { + ffpmsg ("Could not create memory file to passive port (ftp_open)"); + ffpmsg(filename); + goto error; + } + closememfile++; + /* This isn't quite right, it'll fail if the file has .gzabc at the end + for instance */ + + /* Decide if the file is compressed */ + firstchar = fgetc(ftpfile); + ungetc(firstchar,ftpfile); + + if (strstr(newfilename,".gz") || + strstr(newfilename,".Z") || + ('\037' == firstchar)) { + + status = 0; + /* A bit arbritary really, the user will probably hit ^C */ + alarm(NETTIMEOUT*10); + status = mem_uncompress2mem(filename, ftpfile, *handle); + alarm(0); + if (status) { + ffpmsg("Error writing compressed memory file (ftp_open)"); + ffpmsg(filename); + goto error; + } + } else { + /* write a memory file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { + alarm(0); + status = mem_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error writing memory file (http_open)"); + ffpmsg(filename); + goto error; + } + alarm(NETTIMEOUT); + } + } + + /* close and clean up */ + fclose(ftpfile); + closeftpfile--; + + NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); + fclose(command); + closecommandfile--; + + signal(SIGALRM, SIG_DFL); + alarm(0); + + return mem_seek(*handle,0); + + error: + alarm(0); /* clear it */ + if (closecommandfile) { + fclose(command); + } + if (closeftpfile) { + fclose(ftpfile); + } + if (closememfile) { + mem_close_free(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} +/*--------------------------------------------------------------------------*/ +/* This creates a file handle with a copy of the URL in filename. The + file must be uncompressed and is copied to disk first */ + +int ftp_file_open(char *url, int rwmode, int *handle) +{ + FILE *ftpfile; + FILE *command; + char recbuf[MAXLEN]; + long len; + int sock; + int ii, flen, status; + char firstchar; + + /* Check if output file is actually a memory file */ + if (!strncmp(netoutfile, "mem:", 4) ) + { + /* allow the memory file to be opened with write access */ + return( ftp_open(url, READONLY, handle) ); + } + + closeftpfile = 0; + closecommandfile = 0; + closefile = 0; + closeoutfile = 0; + + /* cfileio made a mistake, need to know where to write the output file */ + flen = strlen(netoutfile); + if (!flen) + { + ffpmsg("Output file not set, shouldn't have happened (ftp_file_open)"); + return (FILE_NOT_OPENED); + } + + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + + /* open the network connection to url. ftpfile holds the connection to + the input file, command holds the connection to port 21, and sock is + the socket connected to port 21 */ + + alarm(NETTIMEOUT); + if ((status = ftp_open_network(url,&ftpfile,&command,&sock))) { + alarm(0); + ffpmsg("Unable to open http file (ftp_file_open)"); + ffpmsg(url); + goto error; + } + closeftpfile++; + closecommandfile++; + + if (*netoutfile == '!') + { + /* user wants to clobber file, if it already exists */ + for (ii = 0; ii < flen; ii++) + netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ + + status = file_remove(netoutfile); + } + + /* Now, what do we do with the file */ + firstchar = fgetc(ftpfile); + ungetc(firstchar,ftpfile); + + if (strstr(url,".gz") || + strstr(url,".Z") || + ('\037' == firstchar)) { + + /* to make this more cfitsioish we use the file driver calls to create + the file */ + /* Create the output file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output file (ftp_file_open)"); + ffpmsg(netoutfile); + goto error; + } + + file_close(*handle); + if (NULL == (outfile = fopen(netoutfile,"w"))) { + ffpmsg("Unable to reopen the output file (ftp_file_open)"); + ffpmsg(netoutfile); + goto error; + } + closeoutfile++; + status = 0; + + /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, + Given the choices for nettimeout above they'll probaby ^C before, but + it's always worth a shot*/ + + alarm(NETTIMEOUT*10); + status = uncompress2file(url,ftpfile,outfile,&status); + alarm(0); + if (status) { + ffpmsg("Unable to uncompress the output file (ftp_file_open)"); + ffpmsg(url); + ffpmsg(netoutfile); + goto error; + } + fclose(outfile); + closeoutfile--; + + } else { + + /* Create the output file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output file (ftp_file_open)"); + ffpmsg(netoutfile); + goto error; + } + closefile++; + + /* write a file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { + alarm(0); + status = file_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error writing file (ftp_file_open)"); + ffpmsg(url); + ffpmsg(netoutfile); + goto error; + } + alarm(NETTIMEOUT); + } + file_close(*handle); + } + fclose(ftpfile); + closeftpfile--; + + NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); + fclose(command); + closecommandfile--; + + signal(SIGALRM, SIG_DFL); + alarm(0); + + return file_open(netoutfile,rwmode,handle); + + error: + alarm(0); /* clear it */ + if (closeftpfile) { + fclose(ftpfile); + } + if (closecommandfile) { + fclose(command); + } + if (closeoutfile) { + fclose(outfile); + } + if (closefile) { + file_close(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +/*--------------------------------------------------------------------------*/ +/* This creates a memory handle with a copy of the URL in filename. The + file must be compressed and is copied to disk first */ + +int ftp_compress_open(char *url, int rwmode, int *handle) +{ + FILE *ftpfile; + FILE *command; + char recbuf[MAXLEN]; + long len; + int ii, flen, status; + int sock; + char firstchar; + + closeftpfile = 0; + closecommandfile = 0; + closememfile = 0; + closefdiskfile = 0; + closediskfile = 0; + + /* don't do r/w files */ + if (rwmode != 0) { + ffpmsg("Compressed files must be r/o"); + return (FILE_NOT_OPENED); + } + + /* Need to know where to write the output file */ + flen = strlen(netoutfile); + if (!flen) + { + ffpmsg( + "Output file not set, shouldn't have happened (ftp_compress_open)"); + return (FILE_NOT_OPENED); + } + + /* do the signal handler bits */ + if (setjmp(env) != 0) { + /* feels like the second time */ + /* this means something bad happened */ + ffpmsg("Timeout (http_open)"); + goto error; + } + + signal(SIGALRM, signal_handler); + + /* Open the network connection to url, ftpfile is connected to the file + port, command is connected to port 21. sock is for writing to port 21 */ + alarm(NETTIMEOUT); + + if ((status = ftp_open_network(url,&ftpfile,&command,&sock))) { + alarm(0); + ffpmsg("Unable to open ftp file (ftp_compress_open)"); + ffpmsg(url); + goto error; + } + closeftpfile++; + closecommandfile++; + + /* Now, what do we do with the file */ + firstchar = fgetc(ftpfile); + ungetc(firstchar,ftpfile); + + if (strstr(url,".gz") || + strstr(url,".Z") || + ('\037' == firstchar)) { + + if (*netoutfile == '!') + { + /* user wants to clobber file, if it already exists */ + for (ii = 0; ii < flen; ii++) + netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ + + status = file_remove(netoutfile); + } + + /* Create the output file */ + if ((status = file_create(netoutfile,handle))) { + ffpmsg("Unable to create output file (ftp_compress_open)"); + ffpmsg(netoutfile); + goto error; + } + closediskfile++; + + /* write a file */ + alarm(NETTIMEOUT); + while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { + alarm(0); + status = file_write(*handle,recbuf,len); + if (status) { + ffpmsg("Error writing file (ftp_compres_open)"); + ffpmsg(url); + ffpmsg(netoutfile); + goto error; + } + alarm(NETTIMEOUT); + } + + file_close(*handle); + closediskfile--; + fclose(ftpfile); + closeftpfile--; + /* Close down the ftp connection */ + NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); + fclose(command); + closecommandfile--; + + /* File is on disk, let's uncompress it into memory */ + + if (NULL == (diskfile = fopen(netoutfile,"r"))) { + ffpmsg("Unable to reopen disk file (ftp_compress_open)"); + ffpmsg(netoutfile); + return (FILE_NOT_OPENED); + } + closefdiskfile++; + + if ((status = mem_create(url,handle))) { + ffpmsg("Unable to create memory file (ftp_compress_open)"); + ffpmsg(url); + goto error; + } + closememfile++; + + status = 0; + status = mem_uncompress2mem(url,diskfile,*handle); + fclose(diskfile); + closefdiskfile--; + + if (status) { + ffpmsg("Error writing compressed memory file (ftp_compress_open)"); + goto error; + } + + } else { + /* Opps, this should not have happened */ + ffpmsg("Can only compressed files here (ftp_compress_open)"); + goto error; + } + + + signal(SIGALRM, SIG_DFL); + alarm(0); + return mem_seek(*handle,0); + + error: + alarm(0); /* clear it */ + if (closeftpfile) { + fclose(ftpfile); + } + if (closecommandfile) { + fclose(command); + } + if (closefdiskfile) { + fclose(diskfile); + } + if (closememfile) { + mem_close_free(*handle); + } + if (closediskfile) { + file_close(*handle); + } + + signal(SIGALRM, SIG_DFL); + return (FILE_NOT_OPENED); +} + +/*--------------------------------------------------------------------------*/ +/* Open a ftp connection to filename (really a URL), return ftpfile set to + the file connection, and command set to the control connection, with sock + also set to the control connection */ + +int ftp_open_network(char *filename, FILE **ftpfile, FILE **command, int *sock) +{ + int status; + int sock1; + int tmpint; + char recbuf[MAXLEN]; + char errorstr[MAXLEN]; + char tmpstr[MAXLEN]; + char proto[SHORTLEN]; + char host[SHORTLEN]; + char *newhost; + char *username; + char *password; + char fn[MAXLEN]; + char *newfn; + char *passive; + char *tstr; + char ip[SHORTLEN]; + char turl[MAXLEN]; + int port; + + /* parse the URL */ + strcpy(turl,"ftp://"); + strcat(turl,filename); + if (NET_ParseUrl(turl,proto,host,&port,fn)) { + sprintf(errorstr,"URL Parse Error (ftp_open) %s",filename); + ffpmsg(errorstr); + return (FILE_NOT_OPENED); + } +#ifdef DEBUG + printf ("proto, %s, host, %s, port %d, fn %s\n",proto,host,port,fn); +#endif + + port = 21; + /* we might have a user name */ + username = "anonymous"; + password = "user@host.com"; + /* is there an @ sign */ + if (NULL != (newhost = strrchr(host,'@'))) { + *newhost = '\0'; /* make it a null, */ + newhost++; /* Now newhost points to the host name and host points to the + user name, password combo */ + username = host; + /* is there a : for a password */ + if (NULL != strchr(username,':')) { + password = strchr(username,':'); + *password = '\0'; + password++; + } + } else { + newhost = host; + } + +#ifdef DEBUG + printf("User %s pass %s\n",username,password); +#endif + + /* Connect to the host on the required port */ + *sock = NET_TcpConnect(newhost,port); + /* convert it to a stdio file */ + if (NULL == (*command = fdopen(*sock,"r"))) { + ffpmsg ("fdopen failed to convert socket to stdio file (ftp_open)"); + return (FILE_NOT_OPENED); + + } + + /* Wait for the 220 response */ + if (ftp_status(*command,"220 ")) { + ffpmsg ("error connecting to remote server, no 220 seen (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + /* Send the user name and wait for the right response */ + sprintf(tmpstr,"USER %s\n",username); + status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + + if (ftp_status(*command,"331 ")) { + ffpmsg ("USER error no 331 seen (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + + } + + /* Send the password and wait for the right response */ + sprintf(tmpstr,"PASS %s\n",password); + status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + + if (ftp_status(*command,"230 ")) { + ffpmsg ("PASS error, no 230 seen (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + + /* now do the cwd command */ + newfn = strrchr(fn,'/'); + if (newfn == NULL) { + strcpy(tmpstr,"CWD /\n"); + newfn = fn; + } else { + *newfn = '\0'; + newfn++; + if (strlen(fn) == 0) { + strcpy(tmpstr,"CWD /\n"); + } else { + /* remove the leading slash */ + if (fn[0] == '/') { + sprintf(tmpstr,"CWD %s\n",&fn[1]); + } else { + sprintf(tmpstr,"CWD %s\n",fn); + } + } + } + +#ifdef DEBUG + printf("CWD command is %s\n",tmpstr); +#endif + status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + + if (ftp_status(*command,"250 ")) { + ffpmsg ("CWD error, no 250 seen (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + if (!strlen(newfn)) { + ffpmsg("Null file name (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + + /* Always use binary mode */ + sprintf(tmpstr,"TYPE I\n"); + status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + + if (ftp_status(*command,"200 ")) { + ffpmsg ("TYPE I error, 200 not seen (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + status = NET_SendRaw(*sock,"PASV\n",5,NET_DEFAULT); + if (!(fgets(recbuf,MAXLEN,*command))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + /* Passive mode response looks like + 227 Entering Passive Mode (129,194,67,8,210,80) */ + if (recbuf[0] == '2' && recbuf[1] == '2' && recbuf[2] == '7') { + /* got a good passive mode response, find the opening ( */ + + if (!(passive = strchr(recbuf,'('))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + *passive = '\0'; + passive++; + ip[0] = '\0'; + + /* Messy parsing of response from PASV *command */ + + if (!(tstr = strtok(passive,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + strcpy(ip,tstr); + strcat(ip,"."); + + if (!(tstr = strtok(NULL,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + strcat(ip,tstr); + strcat(ip,"."); + + if (!(tstr = strtok(NULL,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + strcat(ip,tstr); + strcat(ip,"."); + + if (!(tstr = strtok(NULL,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + strcat(ip,tstr); + + /* Done the ip number, now do the port # */ + if (!(tstr = strtok(NULL,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + sscanf(tstr,"%d",&port); + port *= 256; + + if (!(tstr = strtok(NULL,",)"))) { + ffpmsg ("PASV error (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + sscanf(tstr,"%d",&tmpint); + port += tmpint; + + + if (!strlen(newfn)) { + ffpmsg("Null file name (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + +#ifdef DEBUG + puts("connection to passive port"); +#endif + /* COnnect to the data port */ + sock1 = NET_TcpConnect(ip,port); + if (NULL == (*ftpfile = fdopen(sock1,"r"))) { + ffpmsg ("Could not connect to passive port (ftp_open)"); + fclose(*command); + return (FILE_NOT_OPENED); + } + + /* now we return */ + + /* Send the retrieve command */ + sprintf(tmpstr,"RETR %s\n",newfn); + status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); + +#ifdef DEBUG + puts("Sent RETR command"); +#endif + if (ftp_status(*command,"150 ")) { + ffpmsg ("RETR error, most likely file is not there (ftp_open)"); + fclose(*command); +#ifdef DEBUG + puts("File not there"); +#endif + return (FILE_NOT_OPENED); + } + return 0; + } + + /* no passive mode */ + + NET_SendRaw(*sock,"QUIT\n",5,NET_DEFAULT); + fclose(*command); + return (FILE_NOT_OPENED); +} + +/*--------------------------------------------------------------------------*/ +/* return a socket which results from connection to hostname on port port */ +static int NET_TcpConnect(char *hostname, int port) +{ + /* Connect to hostname on port */ + + struct sockaddr_in sockaddr; + int sock; + int stat; + int val = 1; + + CreateSocketAddress(&sockaddr,hostname,port); + /* Create socket */ + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + ffpmsg("Can't create socket"); + return CONNECTION_ERROR; + } + + if ((stat = connect(sock, (struct sockaddr*) &sockaddr, + sizeof(sockaddr))) + < 0) { + close(sock); +/* + perror("NET_Tcpconnect - Connection error"); + ffpmsg("Can't connect to host, connection error"); +*/ + return CONNECTION_ERROR; + } + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); + setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char *)&val, sizeof(val)); + + val = 65536; + setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&val, sizeof(val)); + setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&val, sizeof(val)); + return sock; +} + +/*--------------------------------------------------------------------------*/ +/* Write len bytes from buffer to socket sock */ +static int NET_SendRaw(int sock, const void *buffer, int length, int opt) +{ + + char * buf = (char *) buffer; + + int flag; + int n, nsent = 0; + + switch (opt) { + case NET_DEFAULT: + flag = 0; + break; + case NET_OOB: + flag = MSG_OOB; + break; + case NET_PEEK: + default: + flag = 0; + break; + } + + if (sock < 0) return -1; + + for (n = 0; n < length; n += nsent) { + if ((nsent = send(sock, buf+n, length-n, flag)) <= 0) { + return nsent; + } +#ifdef DEBUG + printf ("send raw, sent %d bytes\n",nsent); +#endif + } +#ifdef DEBUG + printf ("send raw end, sent %d bytes\n",n); +#endif + return n; +} + +/*--------------------------------------------------------------------------*/ + +static int NET_RecvRaw(int sock, void *buffer, int length) +{ + /* Receive exactly length bytes into buffer. Returns number of bytes */ + /* received. Returns -1 in case of error. */ + + + int nrecv, n; + char *buf = (char *)buffer; + + if (sock < 0) return -1; + for (n = 0; n < length; n += nrecv) { + while ((nrecv = recv(sock, buf+n, length-n, 0)) == -1 && errno == EINTR) + errno = 0; /* probably a SIGCLD that was caught */ + if (nrecv < 0) + return nrecv; + else if (nrecv == 0) + break; /*/ EOF */ + } + + return n; +} + +/*--------------------------------------------------------------------------*/ +/* Yet Another URL Parser + url - input url + proto - input protocol + host - output host + port - output port + fn - output filename +*/ + +static int NET_ParseUrl(const char *url, char *proto, char *host, int *port, + char *fn) +{ + /* parses urls into their bits */ + /* returns 1 if error, else 0 */ + + char *urlcopy, *urlcopyorig; + char *ptrstr; + char *thost; + int isftp = 0; + + /* figure out if there is a http: or ftp: */ + + urlcopyorig = urlcopy = (char *) malloc(strlen(url)+1); + strcpy(urlcopy,url); + + /* set some defaults */ + *port = 80; + strcpy(proto,"http:"); + strcpy(host,"localhost"); + strcpy(fn,"/"); + + ptrstr = strstr(urlcopy,"http:"); + if (ptrstr == NULL) { + /* Nope, not http: */ + ptrstr = strstr(urlcopy,"root:"); + if (ptrstr == NULL) { + /* Nope, not root either */ + ptrstr = strstr(urlcopy,"ftp:"); + if (ptrstr != NULL) { + if (ptrstr == urlcopy) { + strcpy(proto,"ftp:"); + *port = 21; + isftp++; + urlcopy += 4; /* move past ftp: */ + } else { + /* not at the beginning, bad url */ + free(urlcopyorig); + return 1; + } + } + } else { + if (ptrstr == urlcopy) { + urlcopy += 5; /* move past root: */ + } else { + /* not at the beginning, bad url */ + free(urlcopyorig); + return 1; + } + } + } else { + if (ptrstr == urlcopy) { + urlcopy += 5; /* move past http: */ + } else { + free(urlcopyorig); + return 1; + } + } + + /* got the protocol */ + /* get the hostname */ + if (urlcopy[0] == '/' && urlcopy[1] == '/') { + /* we have a hostname */ + urlcopy += 2; /* move past the // */ + } + /* do this only if http */ + if (!strcmp(proto,"http:")) { + strcpy(host,urlcopy); + thost = host; + while (*urlcopy != '/' && *urlcopy != ':' && *urlcopy) { + thost++; + urlcopy++; + } + /* we should either be at the end of the string, have a /, or have a : */ + *thost = '\0'; + if (*urlcopy == ':') { + /* follows a port number */ + urlcopy++; + sscanf(urlcopy,"%d",port); + while (*urlcopy != '/' && *urlcopy) urlcopy++; /* step to the */ + } + } else { + /* do this for ftp */ + strcpy(host,urlcopy); + thost = host; + while (*urlcopy != '/' && *urlcopy) { + thost++; + urlcopy++; + } + *thost = '\0'; + /* Now, we should either be at the end of the string, or have a / */ + + } + /* Now the rest is a fn */ + + if (*urlcopy) { + strcpy(fn,urlcopy); + } + free(urlcopyorig); + return 0; +} + +/*--------------------------------------------------------------------------*/ + +/* Small helper functions to set the netoutfile static string */ +/* Called by cfileio after parsing the output file off of the input file url */ + +int http_checkfile (char *urltype, char *infile, char *outfile1) +{ + char newinfile[MAXLEN]; + FILE *httpfile; + char contentencoding[MAXLEN]; + int contentlength; + + /* default to http:// if there is no output file */ + + strcpy(urltype,"http://"); + + if (strlen(outfile1)) { + /* there is an output file */ + + /* don't copy the "file://" prefix, if present. */ + if (!strncmp(outfile1, "file://", 7) ) + strcpy(netoutfile,outfile1+7); + else + strcpy(netoutfile,outfile1); + + if (!strncmp(outfile1, "mem:", 4) ) { + /* copy the file to memory, with READ and WRITE access + In this case, it makes no difference whether the http file + and or the output file are compressed or not. */ + + strcpy(urltype, "httpmem://"); /* use special driver */ + return 0; + } + + if (strstr(infile, "?")) { + /* file name contains a '?' so probably a cgi string; don't open it */ + strcpy(urltype,"httpfile://"); + return 0; + } + + if (!http_open_network(infile,&httpfile,contentencoding,&contentlength)) { + fclose(httpfile); + /* It's there, we're happy */ + if (strstr(infile,".gz") || (strstr(infile,".Z"))) { + /* It's compressed */ + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"httpcompress://"); + } else { + strcpy(urltype,"httpfile://"); + } + } else { + strcpy(urltype,"httpfile://"); + } + return 0; + } + + /* Ok, let's try the .gz one */ + strcpy(newinfile,infile); + strcat(newinfile,".gz"); + if (!http_open_network(newinfile,&httpfile,contentencoding, + &contentlength)) { + fclose(httpfile); + strcpy(infile,newinfile); + /* It's there, we're happy, and, it's compressed */ + /* It's compressed */ + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"httpcompress://"); + } else { + strcpy(urltype,"httpfile://"); + } + return 0; + } + + /* Ok, let's try the .Z one */ + strcpy(newinfile,infile); + strcat(newinfile,".Z"); + if (!http_open_network(newinfile,&httpfile,contentencoding, + &contentlength)) { + fclose(httpfile); + strcpy(infile,newinfile); + /* It's there, we're happy, and, it's compressed */ + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"httpcompress://"); + } else { + strcpy(urltype,"httpfile://"); + } + return 0; + } + + } + return 0; +} +/*--------------------------------------------------------------------------*/ +int ftp_checkfile (char *urltype, char *infile, char *outfile1) +{ + char newinfile[MAXLEN]; + FILE *ftpfile; + FILE *command; + int sock; + + + /* default to ftp:// */ + + strcpy(urltype,"ftp://"); + + if (strlen(outfile1)) { + /* there is an output file */ + + /* don't copy the "file://" prefix, if present. */ + if (!strncmp(outfile1, "file://", 7) ) + strcpy(netoutfile,outfile1+7); + else + strcpy(netoutfile,outfile1); + + if (!strncmp(outfile1, "mem:", 4) ) { + /* copy the file to memory, with READ and WRITE access + In this case, it makes no difference whether the ftp file + and or the output file are compressed or not. */ + + strcpy(urltype, "ftpmem://"); /* use special driver */ + return 0; + } + + if (!ftp_open_network(infile,&ftpfile,&command,&sock)) { + fclose(ftpfile); + fclose(command); + /* It's there, we're happy */ + if (strstr(infile,".gz") || (strstr(infile,".Z"))) { + /* It's compressed */ + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"ftpcompress://"); + } else { + strcpy(urltype,"ftpfile://"); + } + } else { + strcpy(urltype,"ftpfile://"); + } + return 0; + } + + /* Ok, let's try the .gz one */ + strcpy(newinfile,infile); + strcat(newinfile,".gz"); + if (!ftp_open_network(newinfile,&ftpfile,&command,&sock)) { + fclose(ftpfile); + fclose(command); + strcpy(infile,newinfile); + /* It's there, we're happy, and, it's compressed */ + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"ftpcompress://"); + } else { + strcpy(urltype,"ftpfile://"); + } + return 0; + } + + /* Ok, let's try the .Z one */ + strcpy(newinfile,infile); + strcat(newinfile,".Z"); + if (!ftp_open_network(newinfile,&ftpfile,&command,&sock)) { + fclose(ftpfile); + fclose(command); + strcpy(infile,newinfile); + if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { + strcpy(urltype,"ftpcompress://"); + } else { + strcpy(urltype,"ftpfile://"); + } + return 0; + } + + } + return 0; +} +/*--------------------------------------------------------------------------*/ +/* A small helper function to wait for a particular status on the ftp + connectino */ +static int ftp_status(FILE *ftp, char *statusstr) +{ + /* read through until we find a string beginning with statusstr */ + /* This needs a timeout */ + + char recbuf[MAXLEN]; + int len; + + len = strlen(statusstr); + while (1) { + if (!(fgets(recbuf,MAXLEN,ftp))) { +#ifdef DEBUG + puts("error reading response in ftp_status"); +#endif + return 1; /* error reading */ + } + +#ifdef DEBUG + printf("ftp_status, return string was %s\n",recbuf); +#endif + + recbuf[len] = '\0'; /* make it short */ + if (!strcmp(recbuf,statusstr)) { + return 0; /* we're ok */ + } + if (recbuf[0] > '3') { + /* oh well, some sort of error */ + return 1; + } + } +} + + +/* + *---------------------------------------------------------------------- + * + * CreateSocketAddress -- + * + * This function initializes a sockaddr structure for a host and port. + * + * Results: + * 1 if the host was valid, 0 if the host could not be converted to + * an IP address. + * + * Side effects: + * Fills in the *sockaddrPtr structure. + * + *---------------------------------------------------------------------- + */ + +static int +CreateSocketAddress( + struct sockaddr_in *sockaddrPtr, /* Socket address */ + char *host, /* Host. NULL implies INADDR_ANY */ + int port) /* Port number */ +{ + struct hostent *hostent; /* Host database entry */ + struct in_addr addr; /* For 64/32 bit madness */ + char localhost[MAXLEN]; + + strcpy(localhost,host); + + memset((void *) sockaddrPtr, '\0', sizeof(struct sockaddr_in)); + sockaddrPtr->sin_family = AF_INET; + sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); + if (host == NULL) { + addr.s_addr = INADDR_ANY; + } else { + addr.s_addr = inet_addr(localhost); + if (addr.s_addr == 0xFFFFFFFF) { + hostent = gethostbyname(localhost); + if (hostent != NULL) { + memcpy((void *) &addr, + (void *) hostent->h_addr_list[0], + (size_t) hostent->h_length); + } else { +#ifdef EHOSTUNREACH + errno = EHOSTUNREACH; +#else +#ifdef ENXIO + errno = ENXIO; +#endif +#endif + return 0; /* error */ + } + } + } + + /* + * NOTE: On 64 bit machines the assignment below is rumored to not + * do the right thing. Please report errors related to this if you + * observe incorrect behavior on 64 bit machines such as DEC Alphas. + * Should we modify this code to do an explicit memcpy? + */ + + sockaddrPtr->sin_addr.s_addr = addr.s_addr; + return 1; /* Success. */ +} + +/* Signal handler for timeouts */ + +static void signal_handler(int sig) { + + switch (sig) { + case SIGALRM: /* process for alarm */ + longjmp(env,sig); + + default: { + /* Hmm, shouldn't have happend */ + exit(sig); + } + } +} + +/**************************************************************/ + +/* Root driver */ + +/*--------------------------------------------------------------------------*/ +int root_init(void) +{ + int ii; + + for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ + { + handleTable[ii].sock = 0; + handleTable[ii].currentpos = 0; + } + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_setoptions(int options) +{ + /* do something with the options argument, to stop compiler warning */ + options = 0; + return(options); +} +/*--------------------------------------------------------------------------*/ +int root_getoptions(int *options) +{ + *options = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_getversion(int *version) +{ + *version = 10; + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_shutdown(void) +{ + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_open(char *url, int rwmode, int *handle) +{ + int ii, status; + int sock; + + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ + { + if (handleTable[ii].sock == 0) + { + *handle = ii; + break; + } + } + + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + /*open the file */ + if (rwmode) { + status = root_openfile(url, "update", &sock); + } else { + status = root_openfile(url, "read", &sock); + } + if (status) + return(status); + + handleTable[ii].sock = sock; + handleTable[ii].currentpos = 0; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_create(char *filename, int *handle) +{ + int ii, status; + int sock; + + *handle = -1; + for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ + { + if (handleTable[ii].sock == 0) + { + *handle = ii; + break; + } + } + + if (*handle == -1) + return(TOO_MANY_FILES); /* too many files opened */ + + /*open the file */ + status = root_openfile(filename, "create", &sock); + + if (status) { + ffpmsg("Unable to create file"); + return(status); + } + + handleTable[ii].sock = sock; + handleTable[ii].currentpos = 0; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_size(int handle, LONGLONG *filesize) +/* + return the size of the file in bytes +*/ +{ + + int sock; + int offset; + int status; + int op; + + sock = handleTable[handle].sock; + + status = root_send_buffer(sock,ROOTD_STAT,NULL,0); + status = root_recv_buffer(sock,&op,(char *)&offset, 4); + *filesize = (LONGLONG) ntohl(offset); + + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_close(int handle) +/* + close the file +*/ +{ + + int status; + int sock; + + sock = handleTable[handle].sock; + status = root_send_buffer(sock,ROOTD_CLOSE,NULL,0); + close(sock); + handleTable[handle].sock = 0; + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_flush(int handle) +/* + flush the file +*/ +{ + int status; + int sock; + + sock = handleTable[handle].sock; + status = root_send_buffer(sock,ROOTD_FLUSH,NULL,0); + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_seek(int handle, LONGLONG offset) +/* + seek to position relative to start of the file +*/ +{ + handleTable[handle].currentpos = offset; + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_read(int hdl, void *buffer, long nbytes) +/* + read bytes from the current position in the file +*/ +{ + char msg[SHORTLEN]; + int op; + int status; + int astat; + + /* we presume here that the file position will never be > 2**31 = 2.1GB */ + sprintf(msg,"%ld %ld ",(long) handleTable[hdl].currentpos,nbytes); + status = root_send_buffer(handleTable[hdl].sock,ROOTD_GET,msg,strlen(msg)); + if ((unsigned) status != strlen(msg)) { + return (READ_ERROR); + } + astat = 0; + status = root_recv_buffer(handleTable[hdl].sock,&op,(char *) &astat,4); + if (astat != 0) { + return (READ_ERROR); + } +#ifdef DEBUG + printf("root_read, op %d astat %d\n",op,astat); +#endif + status = NET_RecvRaw(handleTable[hdl].sock,buffer,nbytes); + if (status != nbytes) { + return (READ_ERROR); + } + handleTable[hdl].currentpos += nbytes; + + return(0); +} +/*--------------------------------------------------------------------------*/ +int root_write(int hdl, void *buffer, long nbytes) +/* + write bytes at the current position in the file +*/ +{ + + char msg[SHORTLEN]; + int len; + int sock; + int status; + int astat; + int op; + + sock = handleTable[hdl].sock; + /* we presume here that the file position will never be > 2**31 = 2.1GB */ + sprintf(msg,"%ld %ld ",(long) handleTable[hdl].currentpos,nbytes); + + len = strlen(msg); + status = root_send_buffer(sock,ROOTD_PUT,msg,len+1); + if (status != len+1) { + return (WRITE_ERROR); + } + status = NET_SendRaw(sock,buffer,nbytes,NET_DEFAULT); + if (status != nbytes) { + return (WRITE_ERROR); + } + astat = 0; + status = root_recv_buffer(handleTable[hdl].sock,&op,(char *) &astat,4); +#ifdef DEBUG + printf("root_read, op %d astat %d\n",op,astat); +#endif + if (astat != 0) { + return (WRITE_ERROR); + } + handleTable[hdl].currentpos += nbytes; + return(0); +} + +/*--------------------------------------------------------------------------*/ +int root_openfile(char *url, char *rwmode, int *sock) + /* + lowest level routine to physically open a root file + */ +{ + + int status; + char recbuf[MAXLEN]; + char errorstr[MAXLEN]; + char proto[SHORTLEN]; + char host[SHORTLEN]; + char fn[MAXLEN]; + char turl[MAXLEN]; + int port; + int op; + int ii; + int authstat; + + + /* Parse the URL apart again */ + strcpy(turl,"root://"); + strcat(turl,url); + if (NET_ParseUrl(turl,proto,host,&port,fn)) { + sprintf(errorstr,"URL Parse Error (root_open) %s",url); + ffpmsg(errorstr); + return (FILE_NOT_OPENED); + } + +#ifdef DEBUG + printf("Connecting to %s on port %d\n",host,port); +#endif + /* Connect to the remote host */ + *sock = NET_TcpConnect(host,port); + if (*sock < 0) { + ffpmsg("Couldn't connect to host (http_open_network)"); + return (FILE_NOT_OPENED); + } + + /* get the username */ + if (NULL != getenv("ROOTUSERNAME")) { + strcpy(recbuf,getenv("ROOTUSERNAME")); + } else { + printf("Username: "); + fgets(recbuf,MAXLEN,stdin); + recbuf[strlen(recbuf)-1] = '\0'; + } + + status = root_send_buffer(*sock, ROOTD_USER, recbuf,strlen(recbuf)); + if (status < 0) { + ffpmsg("error talking to remote system on username "); + return (FILE_NOT_OPENED); + } + + status = root_recv_buffer(*sock,&op,(char *)&authstat,4); + if (!status) { + ffpmsg("error talking to remote system on username"); + return (FILE_NOT_OPENED); + } + +#ifdef DEBUG + printf("op is %d and authstat is %d\n",op,authstat); +#endif + + if (op != ROOTD_AUTH) { + ffpmsg("ERROR on ROOTD_USER"); + ffpmsg(recbuf); + return (FILE_NOT_OPENED); + } + + + /* now the password */ + if (NULL != getenv("ROOTPASSWORD")) { + strcpy(recbuf,getenv("ROOTPASSWORD")); + } else { + printf("Password: "); + fgets(recbuf,MAXLEN,stdin); + recbuf[strlen(recbuf)-1] = '\0'; + } + /* ones complement the password */ + for (ii=0;(unsigned) ii + + + + includes the 4 bytes for the op, the length bytes (4) are implicit + + + if buffer is null don't send it, not everything needs something sent */ + + int len; + int status; + + int hdr[2]; + + len = 4; + + if (buffer != NULL) { + len += buflen; + } + + hdr[0] = htonl(len); + +#ifdef DEBUG + printf("len sent is %x\n",hdr[0]); +#endif + + hdr[1] = htonl(op); +#ifdef DEBUG + printf("op sent is %x\n",hdr[1]); +#endif + + +#ifdef DEBUG + printf("Sending op %d and length of %d\n",op,len); +#endif + + status = NET_SendRaw(sock,hdr,sizeof(hdr),NET_DEFAULT); + if (status < 0) { + return status; + } + if (buffer != NULL) { + status = NET_SendRaw(sock,buffer,buflen,NET_DEFAULT); + } + return status; +} + +static int root_recv_buffer(int sock, int *op, char *buffer, int buflen) +{ + /* recv a buffer, the form is + + + + + */ + + int recv1 = 0; + int len; + int status; + char recbuf[MAXLEN]; + + status = NET_RecvRaw(sock,&len,4); +#ifdef DEBUG + printf("Recv: status from rec is %d\n",status); +#endif + if (status < 0) { + return status; + } + recv1 += status; + + len = ntohl(len); +#ifdef DEBUG + printf ("Recv: length is %d\n",len); +#endif + + /* ok, have the length, recive the operation */ + len -= 4; + status = NET_RecvRaw(sock,op,4); + if (status < 0) { + return status; + } + + recv1 += status; + + *op = ntohl(*op); +#ifdef DEBUG + printf ("Recv: Operation is %d\n",*op); +#endif + + if (len > MAXLEN) { + len = MAXLEN; + } + + if (len > 0) { /* Get the rest of the message */ + status = NET_RecvRaw(sock,recbuf,len); + if (len > buflen) { + len = buflen; + } + memcpy(buffer,recbuf,len); + if (status < 0) { + return status; + } + } + + recv1 += status; + return recv1; + +} +#endif diff --git a/software/cfitsio3040/drvrsmem.c b/software/cfitsio3040/drvrsmem.c new file mode 100644 index 000000000..c5fda751f --- /dev/null +++ b/software/cfitsio3040/drvrsmem.c @@ -0,0 +1,973 @@ +/* S H A R E D M E M O R Y D R I V E R + ======================================= + + by Jerzy.Borkowski@obs.unige.ch + +09-Mar-98 : initial version 1.0 released +23-Mar-98 : shared_malloc now accepts new handle as an argument +23-Mar-98 : shmem://0, shmem://1, etc changed to shmem://h0, etc due to bug + in url parser. +10-Apr-98 : code cleanup +13-May-99 : delayed initialization added, global table deleted on exit when + no shmem segments remain, and last process terminates +*/ + +#ifdef HAVE_SHMEM_SERVICES +#include "fitsio2.h" /* drvrsmem.h is included by it */ + +#include +#include +#include +#include +#include +#include +#include + +#if defined(unix) || defined(__unix__) || defined(__unix) +#include +#endif + + +static int shared_kbase = 0; /* base for shared memory handles */ +static int shared_maxseg = 0; /* max number of shared memory blocks */ +static int shared_range = 0; /* max number of tried entries */ +static int shared_fd = SHARED_INVALID; /* handle of global access lock file */ +static int shared_gt_h = SHARED_INVALID; /* handle of global table segment */ +static SHARED_LTAB *shared_lt = NULL; /* local table pointer */ +static SHARED_GTAB *shared_gt = NULL; /* global table pointer */ +static int shared_create_mode = 0666; /* permission flags for created objects */ +static int shared_debug = 1; /* simple debugging tool, set to 0 to disable messages */ +static int shared_init_called = 0; /* flag whether shared_init() has been called, used for delayed init */ + + /* static support routines prototypes */ + +static int shared_clear_entry(int idx); /* unconditionally clear entry */ +static int shared_destroy_entry(int idx); /* unconditionally destroy sema & shseg and clear entry */ +static int shared_mux(int idx, int mode); /* obtain exclusive access to specified segment */ +static int shared_demux(int idx, int mode); /* free exclusive access to specified segment */ + +static int shared_process_count(int sem); /* valid only for time of invocation */ +static int shared_delta_process(int sem, int delta); /* change number of processes hanging on segment */ +static int shared_attach_process(int sem); +static int shared_detach_process(int sem); +static int shared_get_free_entry(int newhandle); /* get free entry in shared_key, or -1, entry is set rw locked */ +static int shared_get_hash(long size, int idx);/* return hash value for malloc */ +static long shared_adjust_size(long size); /* size must be >= 0 !!! */ +static int shared_check_locked_index(int idx); /* verify that given idx is valid */ +static int shared_map(int idx); /* map all tables for given idx, check for validity */ +static int shared_validate(int idx, int mode); /* use intrnally inside crit.sect !!! */ + + /* support routines - initialization */ + + +static int shared_clear_entry(int idx) /* unconditionally clear entry */ + { if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + shared_gt[idx].key = SHARED_INVALID; /* clear entries in global table */ + shared_gt[idx].handle = SHARED_INVALID; + shared_gt[idx].sem = SHARED_INVALID; + shared_gt[idx].semkey = SHARED_INVALID; + shared_gt[idx].nprocdebug = 0; + shared_gt[idx].size = 0; + shared_gt[idx].attr = 0; + + return(SHARED_OK); + } + +static int shared_destroy_entry(int idx) /* unconditionally destroy sema & shseg and clear entry */ + { int r, r2; + union semun filler; + + if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + r2 = r = SHARED_OK; + filler.val = 0; /* this is to make cc happy (warning otherwise) */ + if (SHARED_INVALID != shared_gt[idx].sem) r = semctl(shared_gt[idx].sem, 0, IPC_RMID, filler); /* destroy semaphore */ + if (SHARED_INVALID != shared_gt[idx].handle) r2 = shmctl(shared_gt[idx].handle, IPC_RMID, 0); /* destroy shared memory segment */ + if (SHARED_OK == r) r = r2; /* accumulate error code in r, free r2 */ + r2 = shared_clear_entry(idx); + return((SHARED_OK == r) ? r2 : r); + } + +void shared_cleanup(void) /* this must (should) be called during exit/abort */ + { int i, j, r, oktodelete, filelocked, segmentspresent; + flock_t flk; + struct shmid_ds ds; + + if (shared_debug) printf("shared_cleanup:"); + if (NULL != shared_lt) + { if (shared_debug) printf(" deleting segments:"); + for (i=0; i>\n"); + return; + } + + +int shared_init(int debug_msgs) /* initialize shared memory stuff, you have to call this routine once */ + { int i; + char buf[1000], *p; + mode_t oldumask; + + shared_init_called = 1; /* tell everybody no need to call us for the 2nd time */ + shared_debug = debug_msgs; /* set required debug mode */ + + if (shared_debug) printf("shared_init:"); + + shared_kbase = 0; /* adapt to current env. settings */ + if (NULL != (p = getenv(SHARED_ENV_KEYBASE))) shared_kbase = atoi(p); + if (0 == shared_kbase) shared_kbase = SHARED_KEYBASE; + if (shared_debug) printf(" keybase=%d", shared_kbase); + + shared_maxseg = 0; + if (NULL != (p = getenv(SHARED_ENV_MAXSEG))) shared_maxseg = atoi(p); + if (0 == shared_maxseg) shared_maxseg = SHARED_MAXSEG; + if (shared_debug) printf(" maxseg=%d", shared_maxseg); + + shared_range = 3 * shared_maxseg; + + if (SHARED_INVALID == shared_fd) /* create rw locking file (this file is never deleted) */ + { if (shared_debug) printf(" lockfileinit="); + sprintf(buf, "%s.%d.%d", SHARED_FDNAME, shared_kbase, shared_maxseg); + oldumask = umask(0); + + shared_fd = open(buf, O_TRUNC | O_EXCL | O_CREAT | O_RDWR, shared_create_mode); + umask(oldumask); + if (SHARED_INVALID == shared_fd) /* or just open rw locking file, in case it already exists */ + { shared_fd = open(buf, O_TRUNC | O_RDWR, shared_create_mode); + if (SHARED_INVALID == shared_fd) return(SHARED_NOFILE); + if (shared_debug) printf("slave"); + + } + else + { if (shared_debug) printf("master"); + } + } + + if (SHARED_INVALID == shared_gt_h) /* global table not attached, try to create it in shared memory */ + { if (shared_debug) printf(" globalsharedtableinit="); + shared_gt_h = shmget(shared_kbase, shared_maxseg * sizeof(SHARED_GTAB), IPC_CREAT | IPC_EXCL | shared_create_mode); /* try open as a master */ + if (SHARED_INVALID == shared_gt_h) /* if failed, try to open as a slave */ + { shared_gt_h = shmget(shared_kbase, shared_maxseg * sizeof(SHARED_GTAB), shared_create_mode); + if (SHARED_INVALID == shared_gt_h) return(SHARED_IPCERR); /* means deleted ID residing in system, shared mem unusable ... */ + shared_gt = (SHARED_GTAB *)shmat(shared_gt_h, 0, 0); /* attach segment */ + if (((SHARED_GTAB *)SHARED_INVALID) == shared_gt) return(SHARED_IPCERR); + if (shared_debug) printf("slave"); + } + else + { shared_gt = (SHARED_GTAB *)shmat(shared_gt_h, 0, 0); /* attach segment */ + if (((SHARED_GTAB *)SHARED_INVALID) == shared_gt) return(SHARED_IPCERR); + for (i=0; i>\n"); + return(SHARED_OK); + } + + +int shared_recover(int id) /* try to recover dormant segments after applic crash */ + { int i, r, r2; + + if (NULL == shared_gt) return(SHARED_NOTINIT); /* not initialized */ + if (NULL == shared_lt) return(SHARED_NOTINIT); /* not initialized */ + r = SHARED_OK; + for (i=0; i r2) || (0 == r2)) + { if (shared_debug) printf("Bogus handle=%d nproc=%d sema=%d:", i, shared_gt[i].nprocdebug, r2); + r = shared_destroy_entry(i); + if (shared_debug) + { printf("%s", r ? "error couldn't clear handle" : "handle cleared"); + } + } + shared_demux(i, SHARED_RDWRITE); + } + return(r); /* table full */ + } + + /* API routines - mutexes and locking */ + +static int shared_mux(int idx, int mode) /* obtain exclusive access to specified segment */ + { flock_t flk; + + int r; + + if (0 == shared_init_called) /* delayed initialization */ + { if (SHARED_OK != (r = shared_init(0))) return(r); + + } + if (SHARED_INVALID == shared_fd) return(SHARED_NOTINIT); + if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + flk.l_type = ((mode & SHARED_RDWRITE) ? F_WRLCK : F_RDLCK); + flk.l_whence = 0; + flk.l_start = idx; + flk.l_len = 1; + if (shared_debug) printf(" [mux (%d): ", idx); + if (-1 == fcntl(shared_fd, ((mode & SHARED_NOWAIT) ? F_SETLK : F_SETLKW), &flk)) + { switch (errno) + { case EAGAIN: ; + + case EACCES: if (shared_debug) printf("again]"); + return(SHARED_AGAIN); + default: if (shared_debug) printf("err]"); + return(SHARED_IPCERR); + } + } + if (shared_debug) printf("ok]"); + return(SHARED_OK); + } + + + +static int shared_demux(int idx, int mode) /* free exclusive access to specified segment */ + { flock_t flk; + + if (SHARED_INVALID == shared_fd) return(SHARED_NOTINIT); + if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + flk.l_type = F_UNLCK; + flk.l_whence = 0; + flk.l_start = idx; + flk.l_len = 1; + if (shared_debug) printf(" [demux (%d): ", idx); + if (-1 == fcntl(shared_fd, F_SETLKW, &flk)) + { switch (errno) + { case EAGAIN: ; + case EACCES: if (shared_debug) printf("again]"); + return(SHARED_AGAIN); + default: if (shared_debug) printf("err]"); + return(SHARED_IPCERR); + } + + } + if (shared_debug) printf("mode=%d ok]", mode); + return(SHARED_OK); + } + + + +static int shared_process_count(int sem) /* valid only for time of invocation */ + { union semun su; + + su.val = 0; /* to force compiler not to give warning messages */ + return(semctl(sem, 0, GETVAL, su)); /* su is unused here */ + } + + +static int shared_delta_process(int sem, int delta) /* change number of processes hanging on segment */ + { struct sembuf sb; + + if (SHARED_INVALID == sem) return(SHARED_BADARG); /* semaphore not attached */ + sb.sem_num = 0; + sb.sem_op = delta; + sb.sem_flg = SEM_UNDO; + return((-1 == semop(sem, &sb, 1)) ? SHARED_IPCERR : SHARED_OK); + } + + +static int shared_attach_process(int sem) + { if (shared_debug) printf(" [attach process]"); + return(shared_delta_process(sem, 1)); + } + + +static int shared_detach_process(int sem) + { if (shared_debug) printf(" [detach process]"); + return(shared_delta_process(sem, -1)); + } + + /* API routines - hashing and searching */ + + +static int shared_get_free_entry(int newhandle) /* get newhandle, or -1, entry is set rw locked */ + { + if (NULL == shared_gt) return(-1); /* not initialized */ + if (NULL == shared_lt) return(-1); /* not initialized */ + if (newhandle < 0) return(-1); + if (newhandle >= shared_maxseg) return(-1); + if (shared_lt[newhandle].tcnt) return(-1); /* somebody (we) is using it */ + if (shared_mux(newhandle, SHARED_NOWAIT | SHARED_RDWRITE)) return(-1); /* used by others */ + if (SHARED_INVALID == shared_gt[newhandle].key) return(newhandle); /* we have found free slot, lock it and return index */ + shared_demux(newhandle, SHARED_RDWRITE); + if (shared_debug) printf("[free_entry - ERROR - entry unusable]"); + return(-1); /* table full */ + } + + +static int shared_get_hash(long size, int idx) /* return hash value for malloc */ + { static int counter = 0; + int hash; + + hash = (counter + size * idx) % shared_range; + counter = (counter + 1) % shared_range; + return(hash); + } + + +static long shared_adjust_size(long size) /* size must be >= 0 !!! */ + { return(((size + sizeof(BLKHEAD) + SHARED_GRANUL - 1) / SHARED_GRANUL) * SHARED_GRANUL); } + + + /* API routines - core : malloc/realloc/free/attach/detach/lock/unlock */ + +int shared_malloc(long size, int mode, int newhandle) /* return idx or SHARED_INVALID */ + { int h, i, r, idx, key; + union semun filler; + BLKHEAD *bp; + + if (0 == shared_init_called) /* delayed initialization */ + { if (SHARED_OK != (r = shared_init(0))) return(r); + } + if (shared_debug) printf("malloc (size = %ld, mode = %d):", size, mode); + if (size < 0) return(SHARED_INVALID); + if (-1 == (idx = shared_get_free_entry(newhandle))) return(SHARED_INVALID); + if (shared_debug) printf(" idx=%d", idx); + for (i = 0; ; i++) + { if (i >= shared_range) /* table full, signal error & exit */ + { shared_demux(idx, SHARED_RDWRITE); + return(SHARED_INVALID); + } + key = shared_kbase + ((i + shared_get_hash(size, idx)) % shared_range); + if (shared_debug) printf(" key=%d", key); + h = shmget(key, shared_adjust_size(size), IPC_CREAT | IPC_EXCL | shared_create_mode); + if (shared_debug) printf(" handle=%d", h); + if (SHARED_INVALID == h) continue; /* segment already accupied */ + bp = (BLKHEAD *)shmat(h, 0, 0); /* try attach */ + if (shared_debug) printf(" p=%p", bp); + if (((BLKHEAD *)SHARED_INVALID) == bp) /* cannot attach, delete segment, try with another key */ + { shmctl(h, IPC_RMID, 0); + continue; + } /* now create semaphor counting number of processes attached */ + if (SHARED_INVALID == (shared_gt[idx].sem = semget(key, 1, IPC_CREAT | IPC_EXCL | shared_create_mode))) + { shmdt((void *)bp); /* cannot create segment, delete everything */ + shmctl(h, IPC_RMID, 0); + continue; /* try with another key */ + } + if (shared_debug) printf(" sem=%d", shared_gt[idx].sem); + if (shared_attach_process(shared_gt[idx].sem)) /* try attach process */ + { semctl(shared_gt[idx].sem, 0, IPC_RMID, filler); /* destroy semaphore */ + shmdt((char *)bp); /* detach shared mem segment */ + shmctl(h, IPC_RMID, 0); /* destroy shared mem segment */ + continue; /* try with another key */ + } + bp->s.tflag = BLOCK_SHARED; /* fill in data in segment's header (this is really not necessary) */ + bp->s.ID[0] = SHARED_ID_0; + bp->s.ID[1] = SHARED_ID_1; + bp->s.handle = idx; /* used in yorick */ + if (mode & SHARED_RESIZE) + { if (shmdt((char *)bp)) r = SHARED_IPCERR; /* if segment is resizable, then detach segment */ + shared_lt[idx].p = NULL; + } + else { shared_lt[idx].p = bp; } + shared_lt[idx].tcnt = 1; /* one thread using segment */ + shared_lt[idx].lkcnt = 0; /* no locks at the moment */ + shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ + shared_gt[idx].handle = h; /* fill in data in global table */ + shared_gt[idx].size = size; + shared_gt[idx].attr = mode; + shared_gt[idx].semkey = key; + shared_gt[idx].key = key; + shared_gt[idx].nprocdebug = 0; + + break; + } + shared_demux(idx, SHARED_RDWRITE); /* hope this will not fail */ + return(idx); + } + + +int shared_attach(int idx) + { int r, r2; + + if (SHARED_OK != (r = shared_mux(idx, SHARED_RDWRITE | SHARED_WAIT))) return(r); + if (SHARED_OK != (r = shared_map(idx))) + { shared_demux(idx, SHARED_RDWRITE); + return(r); + } + if (shared_attach_process(shared_gt[idx].sem)) /* try attach process */ + { shmdt((char *)(shared_lt[idx].p)); /* cannot attach process, detach everything */ + shared_lt[idx].p = NULL; + shared_demux(idx, SHARED_RDWRITE); + return(SHARED_BADARG); + } + shared_lt[idx].tcnt++; /* one more thread is using segment */ + if (shared_gt[idx].attr & SHARED_RESIZE) /* if resizeable, detach and return special pointer */ + { if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* if segment is resizable, then detach segment */ + shared_lt[idx].p = NULL; + } + shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ + r2 = shared_demux(idx, SHARED_RDWRITE); + return(r ? r : r2); + } + + + +static int shared_check_locked_index(int idx) /* verify that given idx is valid */ + { int r; + + if (0 == shared_init_called) /* delayed initialization */ + { if (SHARED_OK != (r = shared_init(0))) return(r); + + } + if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + if (NULL == shared_lt[idx].p) return(SHARED_BADARG); /* NULL pointer, not attached ?? */ + if (0 == shared_lt[idx].lkcnt) return(SHARED_BADARG); /* not locked ?? */ + if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || + (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) /* invalid data in segment */ + return(SHARED_BADARG); + return(SHARED_OK); + } + + + +static int shared_map(int idx) /* map all tables for given idx, check for validity */ + { int h; /* have to obtain excl. access before calling shared_map */ + BLKHEAD *bp; + + if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); + if (SHARED_INVALID == shared_gt[idx].key) return(SHARED_BADARG); + if (SHARED_INVALID == (h = shmget(shared_gt[idx].key, 1, shared_create_mode))) return(SHARED_BADARG); + if (((BLKHEAD *)SHARED_INVALID) == (bp = (BLKHEAD *)shmat(h, 0, 0))) return(SHARED_BADARG); + if ((SHARED_ID_0 != bp->s.ID[0]) || (SHARED_ID_1 != bp->s.ID[1]) || (BLOCK_SHARED != bp->s.tflag) || (h != shared_gt[idx].handle)) + { shmdt((char *)bp); /* invalid segment, detach everything */ + return(SHARED_BADARG); + + } + if (shared_gt[idx].sem != semget(shared_gt[idx].semkey, 1, shared_create_mode)) /* check if sema is still there */ + { shmdt((char *)bp); /* cannot attach semaphore, detach everything */ + return(SHARED_BADARG); + } + shared_lt[idx].p = bp; /* store pointer to shmem data */ + return(SHARED_OK); + } + + +static int shared_validate(int idx, int mode) /* use intrnally inside crit.sect !!! */ + { int r; + + if (SHARED_OK != (r = shared_mux(idx, mode))) return(r); /* idx checked by shared_mux */ + if (NULL == shared_lt[idx].p) + if (SHARED_OK != (r = shared_map(idx))) + { shared_demux(idx, mode); + return(r); + } + if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) + { shared_demux(idx, mode); + return(r); + } + return(SHARED_OK); + } + + +SHARED_P shared_realloc(int idx, long newsize) /* realloc shared memory segment */ + { int h, key, i, r; + BLKHEAD *bp; + long transfersize; + + r = SHARED_OK; + if (newsize < 0) return(NULL); + if (shared_check_locked_index(idx)) return(NULL); + if (0 == (shared_gt[idx].attr & SHARED_RESIZE)) return(NULL); + if (-1 != shared_lt[idx].lkcnt) return(NULL); /* check for RW lock */ + if (shared_adjust_size(shared_gt[idx].size) == shared_adjust_size(newsize)) + { shared_gt[idx].size = newsize; + + return((SHARED_P)((shared_lt[idx].p) + 1)); + } + for (i = 0; ; i++) + { if (i >= shared_range) return(NULL); /* table full, signal error & exit */ + key = shared_kbase + ((i + shared_get_hash(newsize, idx)) % shared_range); + h = shmget(key, shared_adjust_size(newsize), IPC_CREAT | IPC_EXCL | shared_create_mode); + if (SHARED_INVALID == h) continue; /* segment already accupied */ + bp = (BLKHEAD *)shmat(h, 0, 0); /* try attach */ + if (((BLKHEAD *)SHARED_INVALID) == bp) /* cannot attach, delete segment, try with another key */ + { shmctl(h, IPC_RMID, 0); + continue; + } + *bp = *(shared_lt[idx].p); /* copy header, then data */ + transfersize = ((newsize < shared_gt[idx].size) ? newsize : shared_gt[idx].size); + if (transfersize > 0) + memcpy((void *)(bp + 1), (void *)((shared_lt[idx].p) + 1), transfersize); + if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* try to detach old segment */ + if (shmctl(shared_gt[idx].handle, IPC_RMID, 0)) if (SHARED_OK == r) r = SHARED_IPCERR; /* destroy old shared memory segment */ + shared_gt[idx].size = newsize; /* signal new size */ + shared_gt[idx].handle = h; /* signal new handle */ + shared_gt[idx].key = key; /* signal new key */ + shared_lt[idx].p = bp; + break; + } + return((SHARED_P)(bp + 1)); + } + + +int shared_free(int idx) /* detach segment, if last process & !PERSIST, destroy segment */ + { int cnt, r, r2; + + if (SHARED_OK != (r = shared_validate(idx, SHARED_RDWRITE | SHARED_WAIT))) return(r); + if (SHARED_OK != (r = shared_detach_process(shared_gt[idx].sem))) /* update number of processes using segment */ + { shared_demux(idx, SHARED_RDWRITE); + return(r); + } + shared_lt[idx].tcnt--; /* update number of threads using segment */ + if (shared_lt[idx].tcnt > 0) return(shared_demux(idx, SHARED_RDWRITE)); /* if more threads are using segment we are done */ + if (shmdt((char *)(shared_lt[idx].p))) /* if, we are the last thread, try to detach segment */ + { shared_demux(idx, SHARED_RDWRITE); + return(SHARED_IPCERR); + } + shared_lt[idx].p = NULL; /* clear entry in local table */ + shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ + if (-1 == (cnt = shared_process_count(shared_gt[idx].sem))) /* get number of processes hanging on segment */ + { shared_demux(idx, SHARED_RDWRITE); + return(SHARED_IPCERR); + } + if ((0 == cnt) && (0 == (shared_gt[idx].attr & SHARED_PERSIST))) r = shared_destroy_entry(idx); /* no procs on seg, destroy it */ + r2 = shared_demux(idx, SHARED_RDWRITE); + return(r ? r : r2); + } + + +SHARED_P shared_lock(int idx, int mode) /* lock given segment for exclusive access */ + { int r; + + if (shared_mux(idx, mode)) return(NULL); /* idx checked by shared_mux */ + if (0 != shared_lt[idx].lkcnt) /* are we already locked ?? */ + if (SHARED_OK != (r = shared_map(idx))) + { shared_demux(idx, mode); + return(NULL); + } + if (NULL == shared_lt[idx].p) /* stupid pointer ?? */ + if (SHARED_OK != (r = shared_map(idx))) + { shared_demux(idx, mode); + return(NULL); + } + if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) + { shared_demux(idx, mode); + return(NULL); + } + if (mode & SHARED_RDWRITE) + { shared_lt[idx].lkcnt = -1; + + shared_gt[idx].nprocdebug++; + } + + else shared_lt[idx].lkcnt++; + shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ + return((SHARED_P)((shared_lt[idx].p) + 1)); + } + + +int shared_unlock(int idx) /* unlock given segment, assumes seg is locked !! */ + { int r, r2, mode; + + if (SHARED_OK != (r = shared_check_locked_index(idx))) return(r); + if (shared_lt[idx].lkcnt > 0) + { shared_lt[idx].lkcnt--; /* unlock read lock */ + mode = SHARED_RDONLY; + } + else + { shared_lt[idx].lkcnt = 0; /* unlock write lock */ + shared_gt[idx].nprocdebug--; + mode = SHARED_RDWRITE; + } + if (0 == shared_lt[idx].lkcnt) if (shared_gt[idx].attr & SHARED_RESIZE) + { if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* segment is resizable, then detach segment */ + shared_lt[idx].p = NULL; /* signal detachment in local table */ + } + r2 = shared_demux(idx, mode); /* unlock segment, rest is only parameter checking */ + return(r ? r : r2); + } + + /* API routines - support and info routines */ + + +int shared_attr(int idx) /* get the attributes of the shared memory segment */ + { int r; + + if (shared_check_locked_index(idx)) return(SHARED_INVALID); + r = shared_gt[idx].attr; + return(r); + } + + +int shared_set_attr(int idx, int newattr) /* get the attributes of the shared memory segment */ + { int r; + + if (shared_check_locked_index(idx)) return(SHARED_INVALID); + if (-1 != shared_lt[idx].lkcnt) return(SHARED_INVALID); /* ADDED - check for RW lock */ + r = shared_gt[idx].attr; + shared_gt[idx].attr = newattr; + return(r); + + } + + +int shared_set_debug(int mode) /* set/reset debug mode */ + { int r = shared_debug; + + shared_debug = mode; + return(r); + } + + +int shared_set_createmode(int mode) /* set/reset debug mode */ + { int r = shared_create_mode; + + shared_create_mode = mode; + return(r); + } + + + + +int shared_list(int id) + { int i, r; + + if (NULL == shared_gt) return(SHARED_NOTINIT); /* not initialized */ + if (NULL == shared_lt) return(SHARED_NOTINIT); /* not initialized */ + if (shared_debug) printf("shared_list:"); + r = SHARED_OK; + printf(" Idx Key Nproc Size Flags\n"); + printf("==============================================\n"); + for (i=0; i= SHARED_ERRBASE) + { printf(" cannot clear PERSIST attribute"); + } + if (shared_free(i)) + { printf(" delete failed\n"); + } + else + { printf(" deleted\n"); + } + } + if (shared_debug) printf(" done\n"); + return(r); /* table full */ + } + + +/************************* CFITSIO DRIVER FUNCTIONS ***************************/ + +int smem_init(void) + { return(0); + } + +int smem_shutdown(void) + + { if (shared_init_called) shared_cleanup(); + return(0); + } + +int smem_setoptions(int option) + { option = 0; + return(0); + } + + +int smem_getoptions(int *options) + { if (NULL == options) return(SHARED_NULPTR); + *options = 0; + return(0); + } + +int smem_getversion(int *version) + { if (NULL == version) return(SHARED_NULPTR); + *version = 10; + return(0); + } + + +int smem_open(char *filename, int rwmode, int *driverhandle) + { int h, nitems, r; + DAL_SHM_SEGHEAD *sp; + + + if (NULL == filename) return(SHARED_NULPTR); + if (NULL == driverhandle) return(SHARED_NULPTR); + nitems = sscanf(filename, "h%d", &h); + if (1 != nitems) return(SHARED_BADARG); + + if (SHARED_OK != (r = shared_attach(h))) return(r); + + if (NULL == (sp = (DAL_SHM_SEGHEAD *)shared_lock(h, + ((READWRITE == rwmode) ? SHARED_RDWRITE : SHARED_RDONLY)))) + { shared_free(h); + return(SHARED_BADARG); + } + + if ((h != sp->h) || (DAL_SHM_SEGHEAD_ID != sp->ID)) + { shared_unlock(h); + shared_free(h); + + return(SHARED_BADARG); + } + + *driverhandle = h; + return(0); + } + + +int smem_create(char *filename, int *driverhandle) + { DAL_SHM_SEGHEAD *sp; + int h, sz, nitems; + + if (NULL == filename) return(SHARED_NULPTR); /* currently ignored */ + if (NULL == driverhandle) return(SHARED_NULPTR); + nitems = sscanf(filename, "h%d", &h); + if (1 != nitems) return(SHARED_BADARG); + + if (SHARED_INVALID == (h = shared_malloc(sz = 2880 + sizeof(DAL_SHM_SEGHEAD), + SHARED_RESIZE | SHARED_PERSIST, h))) + return(SHARED_NOMEM); + + if (NULL == (sp = (DAL_SHM_SEGHEAD *)shared_lock(h, SHARED_RDWRITE))) + { shared_free(h); + return(SHARED_BADARG); + } + + sp->ID = DAL_SHM_SEGHEAD_ID; + sp->h = h; + sp->size = sz; + sp->nodeidx = -1; + + *driverhandle = h; + + return(0); + } + + +int smem_close(int driverhandle) + { int r; + + if (SHARED_OK != (r = shared_unlock(driverhandle))) return(r); + return(shared_free(driverhandle)); + } + +int smem_remove(char *filename) + { int nitems, h, r; + + if (NULL == filename) return(SHARED_NULPTR); + nitems = sscanf(filename, "h%d", &h); + if (1 != nitems) return(SHARED_BADARG); + + if (0 == shared_check_locked_index(h)) /* are we locked ? */ + + { if (-1 != shared_lt[h].lkcnt) /* are we locked RO ? */ + { if (SHARED_OK != (r = shared_unlock(h))) return(r); /* yes, so relock in RW */ + if (NULL == shared_lock(h, SHARED_RDWRITE)) return(SHARED_BADARG); + } + + } + else /* not locked */ + { if (SHARED_OK != (r = smem_open(filename, READWRITE, &h))) + return(r); /* so open in RW mode */ + } + + shared_set_attr(h, SHARED_RESIZE); /* delete PERSIST attribute */ + return(smem_close(h)); /* detach segment (this will delete it) */ + } + +int smem_size(int driverhandle, LONGLONG *size) + { + if (NULL == size) return(SHARED_NULPTR); + if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); + *size = (LONGLONG) (shared_gt[driverhandle].size - sizeof(DAL_SHM_SEGHEAD)); + return(0); + } + +int smem_flush(int driverhandle) + { + if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); + return(0); + } + +int smem_seek(int driverhandle, LONGLONG offset) + { + if (offset < 0) return(SHARED_BADARG); + if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); + shared_lt[driverhandle].seekpos = offset; + return(0); + } + +int smem_read(int driverhandle, void *buffer, long nbytes) + { + if (NULL == buffer) return(SHARED_NULPTR); + if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); + if (nbytes < 0) return(SHARED_BADARG); + if ((shared_lt[driverhandle].seekpos + nbytes) > shared_gt[driverhandle].size) + return(SHARED_BADARG); /* read beyond EOF */ + + memcpy(buffer, + ((char *)(((DAL_SHM_SEGHEAD *)(shared_lt[driverhandle].p + 1)) + 1)) + + shared_lt[driverhandle].seekpos, + nbytes); + + shared_lt[driverhandle].seekpos += nbytes; + return(0); + } + +int smem_write(int driverhandle, void *buffer, long nbytes) + { + if (NULL == buffer) return(SHARED_NULPTR); + if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); + if (-1 != shared_lt[driverhandle].lkcnt) return(SHARED_INVALID); /* are we locked RW ? */ + + if (nbytes < 0) return(SHARED_BADARG); + if ((unsigned long)(shared_lt[driverhandle].seekpos + nbytes) > (unsigned long)(shared_gt[driverhandle].size - sizeof(DAL_SHM_SEGHEAD))) + { /* need to realloc shmem */ + if (NULL == shared_realloc(driverhandle, shared_lt[driverhandle].seekpos + nbytes + sizeof(DAL_SHM_SEGHEAD))) + return(SHARED_NOMEM); + } + + memcpy(((char *)(((DAL_SHM_SEGHEAD *)(shared_lt[driverhandle].p + 1)) + 1)) + + shared_lt[driverhandle].seekpos, + buffer, + nbytes); + + shared_lt[driverhandle].seekpos += nbytes; + return(0); + } +#endif diff --git a/software/cfitsio3040/drvrsmem.h b/software/cfitsio3040/drvrsmem.h new file mode 100644 index 000000000..52ac7d7c8 --- /dev/null +++ b/software/cfitsio3040/drvrsmem.h @@ -0,0 +1,179 @@ +/* S H A R E D M E M O R Y D R I V E R + ======================================= + + by Jerzy.Borkowski@obs.unige.ch + +09-Mar-98 : initial version 1.0 released +23-Mar-98 : shared_malloc now accepts new handle as an argument +*/ + + +#include /* this is necessary for Solaris/Linux */ +#include +#include + +#ifdef _AIX +#include +#else +#include +#endif + + /* configuration parameters */ + +#define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */ + +#define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */ +#define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */ + +#define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */ +#define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */ + + /* useful constants */ + +#define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */ +#define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */ +#define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */ +#define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */ +#define SHARED_NOLOCK (0x100) /* flag for shared_validate function */ + +#define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */ +#define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */ + +#define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */ + +#define SHARED_EMPTY (0) /* entries for shared_used table */ +#define SHARED_USED (1) + +#define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */ + + + + /* checkpoints in shared memory segments - might be omitted */ + +#define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */ +#define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */ + +#define BLOCK_REG (0) /* value for tflag member of BLKHEAD */ +#define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */ + + /* generic error codes */ + +#define SHARED_OK (0) + +#define SHARED_ERR_MIN_IDX SHARED_BADARG +#define SHARED_ERR_MAX_IDX SHARED_NORESIZE + + +#define DAL_SHM_FREE (0) +#define DAL_SHM_USED (1) + +#define DAL_SHM_ID0 ('D') +#define DAL_SHM_ID1 ('S') +#define DAL_SHM_ID2 ('M') + +#define DAL_SHM_SEGHEAD_ID (0x19630114) + + + + /* data types */ + +/* BLKHEAD object is placed at the beginning of every memory segment (both + shared and regular) to allow automatic recognition of segments type */ + +typedef union + { struct BLKHEADstruct + { char ID[2]; /* ID = 'JB', just as a checkpoint */ + char tflag; /* is it shared memory or regular one ? */ + int handle; /* this is not necessary, used only for non-resizeable objects via ptr */ + } s; + double d; /* for proper alignment on every machine */ + } BLKHEAD; + +typedef void *SHARED_P; /* generic type of shared memory pointer */ + +typedef struct SHARED_GTABstruct /* data type used in global table */ + { int sem; /* access semaphore (1 field): process count */ + int semkey; /* key value used to generate semaphore handle */ + int key; /* key value used to generate shared memory handle (realloc changes it) */ + int handle; /* handle of shared memory segment */ + int size; /* size of shared memory segment */ + int nprocdebug; /* attached proc counter, helps remove zombie segments */ + char attr; /* attributes of shared memory object */ + } SHARED_GTAB; + +typedef struct SHARED_LTABstruct /* data type used in local table */ + { BLKHEAD *p; /* pointer to segment (may be null) */ + int tcnt; /* number of threads in this process attached to segment */ + int lkcnt; /* >=0 <- number of read locks, -1 - write lock */ + long seekpos; /* current pointer position, read/write/seek operations change it */ + } SHARED_LTAB; + + + /* system dependent definitions */ + +#ifndef HAVE_FLOCK_T +typedef struct flock flock_t; +#define HAVE_FLOCK_T +#endif + +#ifndef HAVE_UNION_SEMUN +union semun + { int val; + struct semid_ds *buf; + unsigned short *array; + }; +#define HAVE_UNION_SEMUN +#endif + + +typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD; + +struct DAL_SHM_SEGHEAD_STRUCT + { int ID; /* ID for debugging */ + int h; /* handle of sh. mem */ + int size; /* size of data area */ + int nodeidx; /* offset of root object (node struct typically) */ + }; + + /* API routines */ + +#ifdef __cplusplus +extern "C" { +#endif + +void shared_cleanup(void); /* must be called at exit/abort */ +int shared_init(int debug_msgs); /* must be called before any other shared memory routine */ +int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */ +int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */ +int shared_attach(int idx); /* attach to segment given index to table */ +int shared_free(int idx); /* release shared memory */ +SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */ +SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */ +int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ +int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ +int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ +int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */ +int shared_set_debug(int debug_msgs); /* set/reset debug mode */ +int shared_set_createmode(int mode); /* set/reset debug mode */ +int shared_list(int id); /* list segment(s) */ +int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */ +int shared_getaddr(int id, char **address); /* get starting address of FITS file in segment */ + +int smem_init(void); +int smem_shutdown(void); +int smem_setoptions(int options); +int smem_getoptions(int *options); +int smem_getversion(int *version); +int smem_open(char *filename, int rwmode, int *driverhandle); +int smem_create(char *filename, int *driverhandle); +int smem_close(int driverhandle); +int smem_remove(char *filename); +int smem_size(int driverhandle, LONGLONG *size); +int smem_flush(int driverhandle); +int smem_seek(int driverhandle, LONGLONG offset); +int smem_read(int driverhandle, void *buffer, long nbytes); +int smem_write(int driverhandle, void *buffer, long nbytes); + +#ifdef __cplusplus +} +#endif diff --git a/software/cfitsio3040/editcol.c b/software/cfitsio3040/editcol.c new file mode 100644 index 000000000..8f22bbf79 --- /dev/null +++ b/software/cfitsio3040/editcol.c @@ -0,0 +1,2384 @@ +/* This file, editcol.c, contains the set of FITSIO routines that */ +/* insert or delete rows or columns in a table or resize an image */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffrsim(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + long *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + resize an existing primary array or IMAGE extension. +*/ +{ + LONGLONG tnaxes[99]; + int ii; + + if (*status > 0) + return(*status); + + for (ii = 0; (ii < naxis) && (ii < 99); ii++) + tnaxes[ii] = naxes[ii]; + + ffrsimll(fptr, bitpix, naxis, tnaxes, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrsimll(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + LONGLONG *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + resize an existing primary array or IMAGE extension. +*/ +{ + int ii, simple, obitpix, onaxis, extend, nmodify; + long nblocks, longval; + long pcount, gcount, longbitpix; + LONGLONG onaxes[99], newsize, oldsize; + char comment[FLEN_COMMENT], keyname[FLEN_KEYWORD], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + /* get current image size parameters */ + if (ffghprll(fptr, 99, &simple, &obitpix, &onaxis, onaxes, &pcount, + &gcount, &extend, status) > 0) + return(*status); + + longbitpix = bitpix; + + /* test for the 2 special cases that represent unsigned integers */ + if (longbitpix == USHORT_IMG) + longbitpix = SHORT_IMG; + else if (longbitpix == ULONG_IMG) + longbitpix = LONG_IMG; + + /* test that the new values are legal */ + + if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && + longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && + longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) + { + sprintf(message, + "Illegal value for BITPIX keyword: %d", bitpix); + ffpmsg(message); + return(*status = BAD_BITPIX); + } + + if (naxis < 0 || naxis > 999) + { + sprintf(message, + "Illegal value for NAXIS keyword: %d", naxis); + ffpmsg(message); + return(*status = BAD_NAXIS); + } + + if (naxis == 0) + newsize = 0; + else + newsize = 1; + + for (ii = 0; ii < naxis; ii++) + { + if (naxes[ii] < 0) + { + sprintf(message, + "Illegal value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); + ffpmsg(message); + return(*status = BAD_NAXES); + } + + newsize *= naxes[ii]; /* compute new image size, in pixels */ + } + + /* compute size of old image, in bytes */ + + if (onaxis == 0) + oldsize = 0; + else + { + oldsize = 1; + for (ii = 0; ii < onaxis; ii++) + oldsize *= onaxes[ii]; + oldsize = (oldsize + pcount) * gcount * (abs(obitpix) / 8); + } + + oldsize = (oldsize + 2879) / 2880; /* old size, in blocks */ + + newsize = (newsize + pcount) * gcount * (abs(longbitpix) / 8); + newsize = (newsize + 2879) / 2880; /* new size, in blocks */ + + if (newsize > oldsize) /* have to insert new blocks for image */ + { + nblocks = (long) (newsize - oldsize); + if (ffiblk(fptr, nblocks, 1, status) > 0) + return(*status); + } + else if (oldsize > newsize) /* have to delete blocks from image */ + { + nblocks = (long) (oldsize - newsize); + if (ffdblk(fptr, nblocks, status) > 0) + return(*status); + } + + /* now update the header keywords */ + + strcpy(comment,"&"); /* special value to leave comments unchanged */ + + if (longbitpix != obitpix) + { /* update BITPIX value */ + ffmkyj(fptr, "BITPIX", longbitpix, comment, status); + } + + if (naxis != onaxis) + { /* update NAXIS value */ + longval = naxis; + ffmkyj(fptr, "NAXIS", longval, comment, status); + } + + /* modify the existing NAXISn keywords */ + nmodify = minvalue(naxis, onaxis); + for (ii = 0; ii < nmodify; ii++) + { + ffkeyn("NAXIS", ii+1, keyname, status); + ffmkyj(fptr, keyname, naxes[ii], comment, status); + } + + if (naxis > onaxis) /* insert additional NAXISn keywords */ + { + strcpy(comment,"length of data axis"); + for (ii = onaxis; ii < naxis; ii++) + { + ffkeyn("NAXIS", ii+1, keyname, status); + ffikyj(fptr, keyname, naxes[ii], comment, status); + } + } + else if (onaxis > naxis) /* delete old NAXISn keywords */ + { + for (ii = naxis; ii < onaxis; ii++) + { + ffkeyn("NAXIS", ii+1, keyname, status); + ffdkey(fptr, keyname, status); + } + } + + /* Update the BSCALE and BZERO keywords, if an unsigned integer image */ + if (bitpix == USHORT_IMG) + { + strcpy(comment, "offset data range to that of unsigned short"); + ffukyg(fptr, "BZERO", 32768., 0, comment, status); + strcpy(comment, "default scaling factor"); + ffukyg(fptr, "BSCALE", 1.0, 0, comment, status); + } + else if (bitpix == ULONG_IMG) + { + strcpy(comment, "offset data range to that of unsigned long"); + ffukyg(fptr, "BZERO", 2147483648., 0, comment, status); + strcpy(comment, "default scaling factor"); + ffukyg(fptr, "BSCALE", 1.0, 0, comment, status); + } + + /* re-read the header, to make sure structures are updated */ + ffrdef(fptr, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffirow(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstrow, /* I - insert space AFTER this row */ + /* 0 = insert space at beginning of table */ + LONGLONG nrows, /* I - number of rows to insert */ + int *status) /* IO - error status */ +/* + insert NROWS blank rows immediated after row firstrow (1 = first row). + Set firstrow = 0 to insert space at the beginning of the table. +*/ +{ + int tstatus; + LONGLONG naxis1, naxis2; + LONGLONG datasize, firstbyte, nshift, nbytes; + LONGLONG freespace; + long nblock; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only add rows to TABLE or BINTABLE extension (ffirow)"); + return(*status = NOT_TABLE); + } + + if (nrows < 0 ) + return(*status = NEG_BYTES); + else if (nrows == 0) + return(*status); /* no op, so just return */ + + /* get the current size of the table */ + /* use internal structure since NAXIS2 keyword may not be up to date */ + naxis1 = (fptr->Fptr)->rowlength; + naxis2 = (fptr->Fptr)->numrows; + + if (firstrow > naxis2) + { + ffpmsg( + "Insert position greater than the number of rows in the table (ffirow)"); + return(*status = BAD_ROW_NUM); + } + else if (firstrow < 0) + { + ffpmsg("Insert position is less than 0 (ffirow)"); + return(*status = BAD_ROW_NUM); + } + + /* current data size */ + datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; + nshift = naxis1 * nrows; /* no. of bytes to add to table */ + + if ( (freespace - nshift) < 0) /* not enough existing space? */ + { + nblock = (long) ((nshift - freespace + 2879) / 2880); /* number of blocks */ + ffiblk(fptr, nblock, 1, status); /* insert the blocks */ + } + + firstbyte = naxis1 * firstrow; /* relative insert position */ + nbytes = datasize - firstbyte; /* no. of bytes to shift down */ + firstbyte += ((fptr->Fptr)->datastart); /* absolute insert position */ + + ffshft(fptr, firstbyte, nbytes, nshift, status); /* shift rows and heap */ + + /* update the heap starting address */ + (fptr->Fptr)->heapstart += nshift; + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); + + /* update the NAXIS2 keyword */ + ffmkyj(fptr, "NAXIS2", naxis2 + nrows, "&", status); + ((fptr->Fptr)->numrows) += nrows; + ((fptr->Fptr)->origrows) += nrows; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdrow(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstrow, /* I - first row to delete (1 = first) */ + LONGLONG nrows, /* I - number of rows to delete */ + int *status) /* IO - error status */ +/* + delete NROWS rows from table starting with firstrow (1 = first row of table). +*/ +{ + int tstatus; + LONGLONG naxis1, naxis2; + LONGLONG datasize, firstbyte, nbytes, nshift; + LONGLONG freespace; + long nblock; + char comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrow)"); + return(*status = NOT_TABLE); + } + + if (nrows < 0 ) + return(*status = NEG_BYTES); + else if (nrows == 0) + return(*status); /* no op, so just return */ + + ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* get the current */ + + /* ffgkyj(fptr, "NAXIS2", &naxis2, comm, status);*/ /* size of the table */ + + /* the NAXIS2 keyword may not be up to date, so use the structure value */ + naxis2 = (fptr->Fptr)->numrows; + + if (firstrow > naxis2) + { + ffpmsg( + "Delete position greater than the number of rows in the table (ffdrow)"); + return(*status = BAD_ROW_NUM); + } + else if (firstrow < 1) + { + ffpmsg("Delete position is less than 1 (ffdrow)"); + return(*status = BAD_ROW_NUM); + } + else if (firstrow + nrows - 1 > naxis2) + { + ffpmsg("No. of rows to delete exceeds size of table (ffdrow)"); + return(*status = BAD_ROW_NUM); + } + + nshift = naxis1 * nrows; /* no. of bytes to delete from table */ + /* cur size of data */ + datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + + firstbyte = naxis1 * (firstrow + nrows - 1); /* relative del pos */ + nbytes = datasize - firstbyte; /* no. of bytes to shift up */ + firstbyte += ((fptr->Fptr)->datastart); /* absolute delete position */ + + ffshft(fptr, firstbyte, nbytes, nshift * (-1), status); /* shift data */ + + freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; + nblock = (long) ((nshift + freespace) / 2880); /* number of blocks */ + + /* delete integral number blocks */ + if (nblock > 0) + ffdblk(fptr, nblock, status); + + /* update the heap starting address */ + (fptr->Fptr)->heapstart -= nshift; + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (long)(fptr->Fptr)->heapstart, "&", &tstatus); + + /* update the NAXIS2 keyword */ + ffmkyj(fptr, "NAXIS2", naxis2 - nrows, "&", status); + ((fptr->Fptr)->numrows) -= nrows; + ((fptr->Fptr)->origrows) -= nrows; + + /* Update the heap data, if any. This will remove any orphaned data */ + /* that was only pointed to by the rows that have been deleted */ + ffcmph(fptr, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdrrg(fitsfile *fptr, /* I - FITS file pointer to table */ + char *ranges, /* I - ranges of rows to delete (1 = first) */ + int *status) /* IO - error status */ +/* + delete the ranges of rows from the table (1 = first row of table). + +The 'ranges' parameter typically looks like: + '10-20, 30 - 40, 55' or '50-' +and gives a list of rows or row ranges separated by commas. +*/ +{ + char *cptr; + int nranges, nranges2, ii; + long *minrow, *maxrow, nrows, *rowarray, jj, kk; + LONGLONG naxis2; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrrg)"); + return(*status = NOT_TABLE); + } + + /* the NAXIS2 keyword may not be up to date, so use the structure value */ + naxis2 = (fptr->Fptr)->numrows; + + /* find how many ranges were specified ( = no. of commas in string + 1) */ + cptr = ranges; + for (nranges = 1; (cptr = strchr(cptr, ',')); nranges++) + cptr++; + + minrow = calloc(nranges, sizeof(long)); + maxrow = calloc(nranges, sizeof(long)); + + if (!minrow || !maxrow) { + *status = MEMORY_ALLOCATION; + ffpmsg("failed to allocate memory for row ranges (ffdrrg)"); + if (maxrow) free(maxrow); + if (minrow) free(minrow); + return(*status); + } + + /* parse range list into array of range min and max values */ + ffrwrg(ranges, naxis2, nranges, &nranges2, minrow, maxrow, status); + if (*status > 0 || nranges2 == 0) { + free(maxrow); + free(minrow); + return(*status); + } + + /* determine total number or rows to delete */ + nrows = 0; + for (ii = 0; ii < nranges2; ii++) { + nrows = nrows + maxrow[ii] - minrow[ii] + 1; + } + + rowarray = calloc(nrows, sizeof(long)); + if (!rowarray) { + *status = MEMORY_ALLOCATION; + ffpmsg("failed to allocate memory for row array (ffdrrg)"); + return(*status); + } + + for (kk = 0, ii = 0; ii < nranges2; ii++) { + for (jj = minrow[ii]; jj <= maxrow[ii]; jj++) { + rowarray[kk] = jj; + kk++; + } + } + + /* delete the rows */ + ffdrws(fptr, rowarray, nrows, status); + + free(rowarray); + free(maxrow); + free(minrow); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdrws(fitsfile *fptr, /* I - FITS file pointer */ + long *rownum, /* I - list of rows to delete (1 = first) */ + long nrows, /* I - number of rows to delete */ + int *status) /* IO - error status */ +/* + delete the list of rows from the table (1 = first row of table). +*/ +{ + LONGLONG naxis1, naxis2, insertpos, nextrowpos; + long ii, nextrow; + char comm[FLEN_COMMENT]; + unsigned char *buffer; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrws)"); + return(*status = NOT_TABLE); + } + + if (nrows < 0 ) + return(*status = NEG_BYTES); + else if (nrows == 0) + return(*status); /* no op, so just return */ + + ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* row width */ + ffgkyjj(fptr, "NAXIS2", &naxis2, comm, status); /* number of rows */ + + /* check that input row list is in ascending order */ + for (ii = 1; ii < nrows; ii++) + { + if (rownum[ii - 1] >= rownum[ii]) + { + ffpmsg("row numbers are not in increasing order (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + } + + if (rownum[0] < 1) + { + ffpmsg("first row to delete is less than 1 (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + else if (rownum[nrows - 1] > naxis2) + { + ffpmsg("last row to delete exceeds size of table (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + + buffer = (unsigned char *) malloc( (size_t) naxis1); /* buffer for one row */ + + if (!buffer) + { + ffpmsg("malloc failed (ffdrws)"); + return(*status = MEMORY_ALLOCATION); + } + + /* byte location to start of first row to delete, and the next row */ + insertpos = (fptr->Fptr)->datastart + ((rownum[0] - 1) * naxis1); + nextrowpos = insertpos + naxis1; + nextrow = rownum[0] + 1; + + /* work through the list of rows to delete */ + for (ii = 1; ii < nrows; nextrow++, nextrowpos += naxis1) + { + if (nextrow < rownum[ii]) + { /* keep this row, so copy it to the new position */ + + ffmbyt(fptr, nextrowpos, REPORT_EOF, status); + ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ + + ffmbyt(fptr, insertpos, IGNORE_EOF, status); + ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ + + if (*status > 0) + { + ffpmsg("error while copying good rows in table (ffdrws)"); + free(buffer); + return(*status); + } + insertpos += naxis1; + } + else + { /* skip over this row since it is in the list */ + ii++; + } + } + + /* finished with all the rows to delete; copy remaining rows */ + while(nextrow <= naxis2) + { + ffmbyt(fptr, nextrowpos, REPORT_EOF, status); + ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ + + ffmbyt(fptr, insertpos, IGNORE_EOF, status); + ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ + + if (*status > 0) + { + ffpmsg("failed to copy remaining rows in table (ffdrws)"); + free(buffer); + return(*status); + } + insertpos += naxis1; + nextrowpos += naxis1; + nextrow++; + } + free(buffer); + + /* now delete the empty rows at the end of the table */ + ffdrow(fptr, naxis2 - nrows + 1, nrows, status); + + /* Update the heap data, if any. This will remove any orphaned data */ + /* that was only pointed to by the rows that have been deleted */ + ffcmph(fptr, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdrwsll(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG *rownum, /* I - list of rows to delete (1 = first) */ + LONGLONG nrows, /* I - number of rows to delete */ + int *status) /* IO - error status */ +/* + delete the list of rows from the table (1 = first row of table). +*/ +{ + LONGLONG insertpos, nextrowpos; + LONGLONG naxis1, naxis2, ii, nextrow; + char comm[FLEN_COMMENT]; + unsigned char *buffer; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrws)"); + return(*status = NOT_TABLE); + } + + if (nrows < 0 ) + return(*status = NEG_BYTES); + else if (nrows == 0) + return(*status); /* no op, so just return */ + + ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* row width */ + ffgkyjj(fptr, "NAXIS2", &naxis2, comm, status); /* number of rows */ + + /* check that input row list is in ascending order */ + for (ii = 1; ii < nrows; ii++) + { + if (rownum[ii - 1] >= rownum[ii]) + { + ffpmsg("row numbers are not in increasing order (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + } + + if (rownum[0] < 1) + { + ffpmsg("first row to delete is less than 1 (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + else if (rownum[nrows - 1] > naxis2) + { + ffpmsg("last row to delete exceeds size of table (ffdrws)"); + return(*status = BAD_ROW_NUM); + } + + buffer = (unsigned char *) malloc( (size_t) naxis1); /* buffer for one row */ + + if (!buffer) + { + ffpmsg("malloc failed (ffdrwsll)"); + return(*status = MEMORY_ALLOCATION); + } + + /* byte location to start of first row to delete, and the next row */ + insertpos = (fptr->Fptr)->datastart + ((rownum[0] - 1) * naxis1); + nextrowpos = insertpos + naxis1; + nextrow = rownum[0] + 1; + + /* work through the list of rows to delete */ + for (ii = 1; ii < nrows; nextrow++, nextrowpos += naxis1) + { + if (nextrow < rownum[ii]) + { /* keep this row, so copy it to the new position */ + + ffmbyt(fptr, nextrowpos, REPORT_EOF, status); + ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ + + ffmbyt(fptr, insertpos, IGNORE_EOF, status); + ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ + + if (*status > 0) + { + ffpmsg("error while copying good rows in table (ffdrws)"); + free(buffer); + return(*status); + } + insertpos += naxis1; + } + else + { /* skip over this row since it is in the list */ + ii++; + } + } + + /* finished with all the rows to delete; copy remaining rows */ + while(nextrow <= naxis2) + { + ffmbyt(fptr, nextrowpos, REPORT_EOF, status); + ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ + + ffmbyt(fptr, insertpos, IGNORE_EOF, status); + ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ + + if (*status > 0) + { + ffpmsg("failed to copy remaining rows in table (ffdrws)"); + free(buffer); + return(*status); + } + insertpos += naxis1; + nextrowpos += naxis1; + nextrow++; + } + free(buffer); + + /* now delete the empty rows at the end of the table */ + ffdrow(fptr, naxis2 - nrows + 1, nrows, status); + + /* Update the heap data, if any. This will remove any orphaned data */ + /* that was only pointed to by the rows that have been deleted */ + ffcmph(fptr, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrwrg( + char *rowlist, /* I - list of rows and row ranges */ + LONGLONG maxrows, /* I - number of rows in the table */ + int maxranges, /* I - max number of ranges to be returned */ + int *numranges, /* O - number ranges returned */ + long *minrow, /* O - first row in each range */ + long *maxrow, /* O - last row in each range */ + int *status) /* IO - status value */ +{ +/* + parse the input list of row ranges, returning the number of ranges, + and the min and max row value in each range. + + The only characters allowed in the input rowlist are + decimal digits, minus sign, and comma (and non-significant spaces) + + Example: + + list = "10-20, 30-35,50" + + would return numranges = 3, minrow[] = {10, 30, 50}, maxrow[] = {20, 35, 50} + + error is returned if min value of range is > max value of range or if the + ranges are not monotonically increasing. +*/ + char *next; + long minval, maxval; + + if (*status > 0) + return(*status); + + if (maxrows <= 0 ) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)"); + return(*status); + } + + next = rowlist; + *numranges = 0; + + while (*next == ' ')next++; /* skip spaces */ + + while (*next != '\0') { + + /* find min value of next range; *next must be '-' or a digit */ + if (*next == '-') { + minval = 1; /* implied minrow value = 1 */ + } else if ( isdigit((int) *next) ) { + minval = strtol(next, &next, 10); + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + + while (*next == ' ')next++; /* skip spaces */ + + /* find max value of next range; *next must be '-', or ',' */ + if (*next == '-') { + next++; + while (*next == ' ')next++; /* skip spaces */ + + if ( isdigit((int) *next) ) { + maxval = strtol(next, &next, 10); + } else if (*next == ',' || *next == '\0') { + maxval = (long) maxrows; /* implied max value */ + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + } else if (*next == ',' || *next == '\0') { + maxval = minval; /* only a single integer in this range */ + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + + if (*numranges + 1 > maxranges) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)"); + return(*status); + } + + if (minval < 1 ) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list: row number < 1"); + ffpmsg(rowlist); + return(*status); + } + + if (maxval < minval) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list: min > max"); + ffpmsg(rowlist); + return(*status); + } + + if (*numranges > 0) { + if (minval <= maxrow[(*numranges) - 1]) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list. Range minimum is"); + ffpmsg(" less than or equal to previous range maximum"); + ffpmsg(rowlist); + return(*status); + } + } + + if (minval <= maxrows) { /* ignore range if greater than maxrows */ + if (maxval > maxrows) + maxval = (long) maxrows; + + minrow[*numranges] = minval; + maxrow[*numranges] = maxval; + + (*numranges)++; + } + + while (*next == ' ')next++; /* skip spaces */ + if (*next == ',') { + next++; + while (*next == ' ')next++; /* skip more spaces */ + } + } + + if (*numranges == 0) { /* a null string was entered */ + minrow[0] = 1; + maxrow[0] = (long) maxrows; + *numranges = 1; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrwrgll( + char *rowlist, /* I - list of rows and row ranges */ + LONGLONG maxrows, /* I - number of rows in the list */ + int maxranges, /* I - max number of ranges to be returned */ + int *numranges, /* O - number ranges returned */ + LONGLONG *minrow, /* O - first row in each range */ + LONGLONG *maxrow, /* O - last row in each range */ + int *status) /* IO - status value */ +{ +/* + parse the input list of row ranges, returning the number of ranges, + and the min and max row value in each range. + + The only characters allowed in the input rowlist are + decimal digits, minus sign, and comma (and non-significant spaces) + + Example: + + list = "10-20, 30-35,50" + + would return numranges = 3, minrow[] = {10, 30, 50}, maxrow[] = {20, 35, 50} + + error is returned if min value of range is > max value of range or if the + ranges are not monotonically increasing. +*/ + char *next; + LONGLONG minval, maxval; + double dvalue; + + if (*status > 0) + return(*status); + + if (maxrows <= 0 ) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)"); + return(*status); + } + + next = rowlist; + *numranges = 0; + + while (*next == ' ')next++; /* skip spaces */ + + while (*next != '\0') { + + /* find min value of next range; *next must be '-' or a digit */ + if (*next == '-') { + minval = 1; /* implied minrow value = 1 */ + } else if ( isdigit((int) *next) ) { + + /* read as a double, because the string to LONGLONG function */ + /* is platform dependent (strtoll, strtol, _atoI64) */ + + dvalue = strtod(next, &next); + minval = (LONGLONG) (dvalue + 0.1); + + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + + while (*next == ' ')next++; /* skip spaces */ + + /* find max value of next range; *next must be '-', or ',' */ + if (*next == '-') { + next++; + while (*next == ' ')next++; /* skip spaces */ + + if ( isdigit((int) *next) ) { + + /* read as a double, because the string to LONGLONG function */ + /* is platform dependent (strtoll, strtol, _atoI64) */ + + dvalue = strtod(next, &next); + maxval = (LONGLONG) (dvalue + 0.1); + + } else if (*next == ',' || *next == '\0') { + maxval = maxrows; /* implied max value */ + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + } else if (*next == ',' || *next == '\0') { + maxval = minval; /* only a single integer in this range */ + } else { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list:"); + ffpmsg(rowlist); + return(*status); + } + + if (*numranges + 1 > maxranges) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)"); + return(*status); + } + + if (minval < 1 ) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list: row number < 1"); + ffpmsg(rowlist); + return(*status); + } + + if (maxval < minval) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list: min > max"); + ffpmsg(rowlist); + return(*status); + } + + if (*numranges > 0) { + if (minval <= maxrow[(*numranges) - 1]) { + *status = RANGE_PARSE_ERROR; + ffpmsg("Syntax error in this row range list. Range minimum is"); + ffpmsg(" less than or equal to previous range maximum"); + ffpmsg(rowlist); + return(*status); + } + } + + if (minval <= maxrows) { /* ignore range if greater than maxrows */ + if (maxval > maxrows) + maxval = maxrows; + + minrow[*numranges] = minval; + maxrow[*numranges] = maxval; + + (*numranges)++; + } + + while (*next == ' ')next++; /* skip spaces */ + if (*next == ',') { + next++; + while (*next == ' ')next++; /* skip more spaces */ + } + } + + if (*numranges == 0) { /* a null string was entered */ + minrow[0] = 1; + maxrow[0] = maxrows; + *numranges = 1; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fficol(fitsfile *fptr, /* I - FITS file pointer */ + int numcol, /* I - position for new col. (1 = 1st) */ + char *ttype, /* I - name of column (TTYPE keyword) */ + char *tform, /* I - format of column (TFORM keyword) */ + int *status) /* IO - error status */ +/* + Insert a new column into an existing table at position numcol. If + numcol is greater than the number of existing columns in the table + then the new column will be appended as the last column in the table. +*/ +{ + char *name, *format; + + name = ttype; + format = tform; + + fficls(fptr, numcol, 1, &name, &format, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fficls(fitsfile *fptr, /* I - FITS file pointer */ + int fstcol, /* I - position for first new col. (1 = 1st) */ + int ncols, /* I - number of columns to insert */ + char **ttype, /* I - array of column names(TTYPE keywords) */ + char **tform, /* I - array of formats of column (TFORM) */ + int *status) /* IO - error status */ +/* + Insert 1 or more new columns into an existing table at position numcol. If + fstcol is greater than the number of existing columns in the table + then the new column will be appended as the last column in the table. +*/ +{ + int colnum, datacode, decims, tfields, tstatus, ii; + LONGLONG datasize, firstbyte, nbytes, nadd, naxis1, naxis2, freespace; + LONGLONG tbcol, firstcol, delbyte; + long nblock, width, repeat; + char tfm[FLEN_VALUE], keyname[FLEN_KEYWORD], comm[FLEN_COMMENT], *cptr; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg("Can only add columns to TABLE or BINTABLE extension (fficol)"); + return(*status = NOT_TABLE); + } + + /* is the column number valid? */ + tfields = (fptr->Fptr)->tfield; + if (fstcol < 1 ) + return(*status = BAD_COL_NUM); + else if (fstcol > tfields) + colnum = tfields + 1; /* append as last column */ + else + colnum = fstcol; + + /* parse the tform value and calc number of bytes to add to each row */ + delbyte = 0; + for (ii = 0; ii < ncols; ii++) + { + strcpy(tfm, tform[ii]); + ffupch(tfm); /* make sure format is in upper case */ + + if ((fptr->Fptr)->hdutype == ASCII_TBL) + { + ffasfm(tfm, &datacode, &width, &decims, status); + delbyte += width + 1; /* add one space between the columns */ + } + else + { + ffbnfm(tfm, &datacode, &repeat, &width, status); + + if (datacode < 0) /* variable length array column */ + delbyte += 8; + else if (datacode == 1) /* bit column; round up */ + delbyte += (repeat + 7) / 8; /* to multiple of 8 bits */ + else if (datacode == 16) /* ASCII string column */ + delbyte += repeat; + else /* numerical data type */ + delbyte += (datacode / 10) * repeat; + } + } + + if (*status > 0) + return(*status); + + /* get the current size of the table */ + /* use internal structure since NAXIS2 keyword may not be up to date */ + naxis1 = (fptr->Fptr)->rowlength; + naxis2 = (fptr->Fptr)->numrows; + + /* current size of data */ + datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; + nadd = delbyte * naxis2; /* no. of bytes to add to table */ + + if ( (freespace - nadd) < 0) /* not enough existing space? */ + { + nblock = (long) ((nadd - freespace + 2879) / 2880); /* number of blocks */ + if (ffiblk(fptr, nblock, 1, status) > 0) /* insert the blocks */ + return(*status); + } + + /* shift heap down (if it exists) */ + if ((fptr->Fptr)->heapsize > 0) + { + nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift down */ + + /* absolute heap pos */ + firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; + + if (ffshft(fptr, firstbyte, nbytes, nadd, status) > 0) /* move heap */ + return(*status); + } + + /* update the heap starting address */ + (fptr->Fptr)->heapstart += nadd; + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); + + /* calculate byte position in the row where to insert the new column */ + if (colnum > tfields) + firstcol = naxis1; + else + { + colptr = (fptr->Fptr)->tableptr; + colptr += (colnum - 1); + firstcol = colptr->tbcol; + } + + /* insert delbyte bytes in every row, at byte position firstcol */ + ffcins(fptr, naxis1, naxis2, delbyte, firstcol, status); + + if ((fptr->Fptr)->hdutype == ASCII_TBL) + { + /* adjust the TBCOL values of the existing columns */ + for(ii = 0; ii < tfields; ii++) + { + ffkeyn("TBCOL", ii + 1, keyname, status); + ffgkyjj(fptr, keyname, &tbcol, comm, status); + if (tbcol > firstcol) + { + tbcol += delbyte; + ffmkyj(fptr, keyname, tbcol, "&", status); + } + } + } + + /* update the mandatory keywords */ + ffmkyj(fptr, "TFIELDS", tfields + ncols, "&", status); + ffmkyj(fptr, "NAXIS1", naxis1 + delbyte, "&", status); + + /* increment the index value on any existing column keywords */ + if(colnum <= tfields) + ffkshf(fptr, colnum, tfields, ncols, status); + + /* add the required keywords for the new columns */ + for (ii = 0; ii < ncols; ii++, colnum++) + { + strcpy(comm, "label for field"); + ffkeyn("TTYPE", colnum, keyname, status); + ffpkys(fptr, keyname, ttype[ii], comm, status); + + strcpy(comm, "format of field"); + strcpy(tfm, tform[ii]); + ffupch(tfm); /* make sure format is in upper case */ + ffkeyn("TFORM", colnum, keyname, status); + + if (abs(datacode) == TSBYTE) + { + /* Replace the 'S' with an 'B' in the TFORMn code */ + cptr = tfm; + while (*cptr != 'S') + cptr++; + + *cptr = 'B'; + ffpkys(fptr, keyname, tfm, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", colnum, keyname, status); + strcpy(comm, "offset for signed bytes"); + + ffpkyg(fptr, keyname, -128., 0, comm, status); + + ffkeyn("TSCAL", colnum, keyname, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, keyname, 1., 0, comm, status); + } + else if (abs(datacode) == TUSHORT) + { + /* Replace the 'U' with an 'I' in the TFORMn code */ + cptr = tfm; + while (*cptr != 'U') + cptr++; + + *cptr = 'I'; + ffpkys(fptr, keyname, tfm, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", colnum, keyname, status); + strcpy(comm, "offset for unsigned integers"); + + ffpkyg(fptr, keyname, 32768., 0, comm, status); + + ffkeyn("TSCAL", colnum, keyname, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, keyname, 1., 0, comm, status); + } + else if (abs(datacode) == TULONG) + { + /* Replace the 'V' with an 'J' in the TFORMn code */ + cptr = tfm; + while (*cptr != 'V') + cptr++; + + *cptr = 'J'; + ffpkys(fptr, keyname, tfm, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", colnum, keyname, status); + strcpy(comm, "offset for unsigned integers"); + + ffpkyg(fptr, keyname, 2147483648., 0, comm, status); + + ffkeyn("TSCAL", colnum, keyname, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, keyname, 1., 0, comm, status); + } + else + { + ffpkys(fptr, keyname, tfm, comm, status); + } + + if ((fptr->Fptr)->hdutype == ASCII_TBL) /* write the TBCOL keyword */ + { + if (colnum == tfields + 1) + tbcol = firstcol + 2; /* allow space between preceding col */ + else + tbcol = firstcol + 1; + + strcpy(comm, "beginning column of field"); + ffkeyn("TBCOL", colnum, keyname, status); + ffpkyj(fptr, keyname, tbcol, comm, status); + + /* increment the column starting position for the next column */ + ffasfm(tfm, &datacode, &width, &decims, status); + firstcol += width + 1; /* add one space between the columns */ + } + } + ffrdef(fptr, status); /* initialize the new table structure */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmvec(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - position of col to be modified */ + LONGLONG newveclen, /* I - new vector length of column (TFORM) */ + int *status) /* IO - error status */ +/* + Modify the vector length of a column in a binary table, larger or smaller. + E.g., change a column from TFORMn = '1E' to '20E'. +*/ +{ + int datacode, tfields, tstatus; + LONGLONG datasize, size, firstbyte, nbytes, nadd, ndelete; + LONGLONG naxis1, naxis2, firstcol, freespace; + LONGLONG width, delbyte, repeat; + long nblock; + char tfm[FLEN_VALUE], keyname[FLEN_KEYWORD], tcode[2]; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype != BINARY_TBL) + { + ffpmsg( + "Can only change vector length of a column in BINTABLE extension (ffmvec)"); + return(*status = NOT_TABLE); + } + + /* is the column number valid? */ + tfields = (fptr->Fptr)->tfield; + if (colnum < 1 || colnum > tfields) + return(*status = BAD_COL_NUM); + + /* look up the current vector length and element width */ + + colptr = (fptr->Fptr)->tableptr; + colptr += (colnum - 1); + + datacode = colptr->tdatatype; /* datatype of the column */ + repeat = colptr->trepeat; /* field repeat count */ + width = colptr->twidth; /* width of a single element in chars */ + + if (datacode < 0) + { + ffpmsg( + "Can't modify vector length of variable length column (ffmvec)"); + return(*status = BAD_TFORM); + } + + if (repeat == newveclen) + return(*status); /* column already has the desired vector length */ + + if (datacode == TSTRING) + width = 1; /* width was equal to width of unit string */ + + naxis1 = (fptr->Fptr)->rowlength; /* current width of the table */ + naxis2 = (fptr->Fptr)->numrows; + + delbyte = (newveclen - repeat) * width; /* no. of bytes to insert */ + if (datacode == TBIT) /* BIT column is a special case */ + delbyte = ((newveclen + 1) / 8) - ((repeat + 1) / 8); + + if (delbyte > 0) /* insert space for more elements */ + { + /* current size of data */ + datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; + + nadd = (LONGLONG)delbyte * naxis2; /* no. of bytes to add to table */ + + if ( (freespace - nadd) < 0) /* not enough existing space? */ + { + nblock = (long) ((nadd - freespace + 2879) / 2880); /* number of blocks */ + if (ffiblk(fptr, nblock, 1, status) > 0) /* insert the blocks */ + return(*status); + } + + /* shift heap down (if it exists) */ + if ((fptr->Fptr)->heapsize > 0) + { + nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift down */ + + /* absolute heap pos */ + firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; + + if (ffshft(fptr, firstbyte, nbytes, nadd, status) > 0) /* move heap */ + return(*status); + } + + /* update the heap starting address */ + (fptr->Fptr)->heapstart += nadd; + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); + + firstcol = colptr->tbcol + (repeat * width); /* insert position */ + + /* insert delbyte bytes in every row, at byte position firstcol */ + ffcins(fptr, naxis1, naxis2, delbyte, firstcol, status); + } + else if (delbyte < 0) + { + /* current size of table */ + size = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + freespace = ((size + 2879) / 2880) * 2880 - size - ((LONGLONG)delbyte * naxis2); + nblock = (long) (freespace / 2880); /* number of empty blocks to delete */ + firstcol = colptr->tbcol + (newveclen * width); /* delete position */ + + /* delete elements from the vector */ + ffcdel(fptr, naxis1, naxis2, -delbyte, firstcol, status); + + /* abs heap pos */ + firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; + ndelete = (LONGLONG)delbyte * naxis2; /* size of shift (negative) */ + + /* shift heap up (if it exists) */ + if ((fptr->Fptr)->heapsize > 0) + { + nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift up */ + if (ffshft(fptr, firstbyte, nbytes, ndelete, status) > 0) + return(*status); + } + + /* delete the empty blocks at the end of the HDU */ + if (nblock > 0) + ffdblk(fptr, nblock, status); + + /* update the heap starting address */ + (fptr->Fptr)->heapstart += ndelete; /* ndelete is negative */ + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); + } + + /* construct the new TFORM keyword for the column */ + if (datacode == TBIT) + strcpy(tcode,"X"); + else if (datacode == TBYTE) + strcpy(tcode,"B"); + else if (datacode == TLOGICAL) + strcpy(tcode,"L"); + else if (datacode == TSTRING) + strcpy(tcode,"A"); + else if (datacode == TSHORT) + strcpy(tcode,"I"); + else if (datacode == TLONG) + strcpy(tcode,"J"); + else if (datacode == TLONGLONG) + strcpy(tcode,"K"); + else if (datacode == TFLOAT) + strcpy(tcode,"E"); + else if (datacode == TDOUBLE) + strcpy(tcode,"D"); + else if (datacode == TCOMPLEX) + strcpy(tcode,"C"); + else if (datacode == TDBLCOMPLEX) + strcpy(tcode,"M"); + + /* write as a double value because the LONGLONG conversion */ + /* character in sprintf is platform dependent ( %lld, %ld, %I64d ) */ + + sprintf(tfm,"%.0f%s",(double) newveclen, tcode); + + ffkeyn("TFORM", colnum, keyname, status); /* Keyword name */ + ffmkys(fptr, keyname, tfm, "&", status); /* modify TFORM keyword */ + + ffmkyj(fptr, "NAXIS1", naxis1 + delbyte, "&", status); /* modify NAXIS1 */ + + ffrdef(fptr, status); /* reinitialize the new table structure */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcpcl(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int incol, /* I - number of input column */ + int outcol, /* I - number for output column */ + int create_col, /* I - create new col if TRUE, else overwrite */ + int *status) /* IO - error status */ +/* + copy a column from infptr and insert it in the outfptr table. +*/ +{ + int tstatus, colnum, typecode, anynull; + long tfields, repeat, width, nrows, outrows; + long inloop, outloop, maxloop, ndone, ntodo, npixels; + long firstrow, firstelem, ii; + char keyname[FLEN_KEYWORD], ttype[FLEN_VALUE], tform[FLEN_VALUE]; + char ttype_comm[FLEN_COMMENT],tform_comm[FLEN_COMMENT]; + char *lvalues = 0, nullflag, **strarray = 0; + char nulstr[] = {'\5', '\0'}; /* unique null string value */ + double dnull = 0.l, *dvalues = 0; + float fnull = 0., *fvalues = 0; + + if (*status > 0) + return(*status); + + if (infptr->HDUposition != (infptr->Fptr)->curhdu) + { + ffmahd(infptr, (infptr->HDUposition) + 1, NULL, status); + } + else if ((infptr->Fptr)->datastart == DATA_UNDEFINED) + ffrdef(infptr, status); /* rescan header */ + + if (outfptr->HDUposition != (outfptr->Fptr)->curhdu) + { + ffmahd(outfptr, (outfptr->HDUposition) + 1, NULL, status); + } + else if ((outfptr->Fptr)->datastart == DATA_UNDEFINED) + ffrdef(outfptr, status); /* rescan header */ + + if (*status > 0) + return(*status); + + if ((infptr->Fptr)->hdutype == IMAGE_HDU || (outfptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg + ("Can not copy columns to or from IMAGE HDUs (ffcpcl)"); + return(*status = NOT_TABLE); + } + + if ( (infptr->Fptr)->hdutype == BINARY_TBL && (outfptr->Fptr)->hdutype == ASCII_TBL) + { + ffpmsg + ("Copying from Binary table to ASCII table is not supported (ffcpcl)"); + return(*status = NOT_BTABLE); + } + + /* get the datatype and vector repeat length of the column */ + ffgtcl(infptr, incol, &typecode, &repeat, &width, status); + + if (typecode < 0) + { + ffpmsg("Variable-length columns are not supported (ffcpcl)"); + return(*status = BAD_TFORM); + } + + if (create_col) /* insert new column in output table? */ + { + tstatus = 0; + ffkeyn("TTYPE", incol, keyname, &tstatus); + ffgkys(infptr, keyname, ttype, ttype_comm, &tstatus); + ffkeyn("TFORM", incol, keyname, &tstatus); + + if (ffgkys(infptr, keyname, tform, tform_comm, &tstatus) ) + { + ffpmsg + ("Could not find TTYPE and TFORM keywords in input table (ffcpcl)"); + return(*status = NO_TFORM); + } + + if ((infptr->Fptr)->hdutype == ASCII_TBL && (outfptr->Fptr)->hdutype == BINARY_TBL) + { + /* convert from ASCII table to BINARY table format string */ + if (typecode == TSTRING) + ffnkey(width, "A", tform, status); + + else if (typecode == TLONG) + strcpy(tform, "1J"); + + else if (typecode == TSHORT) + strcpy(tform, "1I"); + + else if (typecode == TFLOAT) + strcpy(tform,"1E"); + + else if (typecode == TDOUBLE) + strcpy(tform,"1D"); + } + + if (ffgkyj(outfptr, "TFIELDS", &tfields, 0, &tstatus)) + { + ffpmsg + ("Could not read TFIELDS keyword in output table (ffcpcl)"); + return(*status = NO_TFIELDS); + } + + colnum = minvalue((int) tfields + 1, outcol); /* output col. number */ + + /* create the empty column */ + if (fficol(outfptr, colnum, ttype, tform, status) > 0) + { + ffpmsg + ("Could not append new column to output file (ffcpcl)"); + return(*status); + } + + /* copy the comment strings from the input file for TTYPE and TFORM */ + tstatus = 0; + ffkeyn("TTYPE", colnum, keyname, &tstatus); + ffmcom(outfptr, keyname, ttype_comm, &tstatus); + ffkeyn("TFORM", colnum, keyname, &tstatus); + ffmcom(outfptr, keyname, tform_comm, &tstatus); + + /* copy other column-related keywords if they exist */ + + ffcpky(infptr, outfptr, incol, colnum, "TUNIT", status); + ffcpky(infptr, outfptr, incol, colnum, "TSCAL", status); + ffcpky(infptr, outfptr, incol, colnum, "TZERO", status); + ffcpky(infptr, outfptr, incol, colnum, "TDISP", status); + ffcpky(infptr, outfptr, incol, colnum, "TLMIN", status); + ffcpky(infptr, outfptr, incol, colnum, "TLMAX", status); + ffcpky(infptr, outfptr, incol, colnum, "TDIM", status); + + /* WCS keywords */ + ffcpky(infptr, outfptr, incol, colnum, "TCTYP", status); + ffcpky(infptr, outfptr, incol, colnum, "TCUNI", status); + ffcpky(infptr, outfptr, incol, colnum, "TCRVL", status); + ffcpky(infptr, outfptr, incol, colnum, "TCRPX", status); + ffcpky(infptr, outfptr, incol, colnum, "TCDLT", status); + ffcpky(infptr, outfptr, incol, colnum, "TCROT", status); + + if ((infptr->Fptr)->hdutype == ASCII_TBL && (outfptr->Fptr)->hdutype == BINARY_TBL) + { + /* binary tables only have TNULLn keyword for integer columns */ + if (typecode == TLONG || typecode == TSHORT) + { + /* check if null string is defined; replace with integer */ + ffkeyn("TNULL", incol, keyname, &tstatus); + if (ffgkys(infptr, keyname, ttype, 0, &tstatus) <= 0) + { + ffkeyn("TNULL", colnum, keyname, &tstatus); + if (typecode == TLONG) + ffpkyj(outfptr, keyname, -9999999L, "Null value", status); + else + ffpkyj(outfptr, keyname, -32768L, "Null value", status); + } + } + } + else + { + ffcpky(infptr, outfptr, incol, colnum, "TNULL", status); + } + + /* rescan header to recognize the new keywords */ + if (ffrdef(outfptr, status) ) + return(*status); + } + else + { + colnum = outcol; + } + + ffgkyj(infptr, "NAXIS2", &nrows, 0, status); /* no. of input rows */ + ffgkyj(outfptr, "NAXIS2", &outrows, 0, status); /* no. of output rows */ + nrows = minvalue(nrows, outrows); + + if (typecode == TBIT) + repeat = (repeat - 1) / 8 + 1; /* convert from bits to bytes */ + else if (typecode == TSTRING && (infptr->Fptr)->hdutype == BINARY_TBL) + repeat = repeat / width; /* convert from chars to unit strings */ + + /* get optimum number of rows to copy at one time */ + ffgrsz(infptr, &inloop, status); + ffgrsz(outfptr, &outloop, status); + + /* adjust optimum number, since 2 tables are open at once */ + maxloop = minvalue(inloop, outloop); /* smallest of the 2 tables */ + maxloop = maxvalue(1, maxloop / 2); /* at least 1 row */ + maxloop = minvalue(maxloop, nrows); /* max = nrows to be copied */ + maxloop *= repeat; /* mult by no of elements in a row */ + + /* allocate memory for arrays */ + if (typecode == TLOGICAL) + { + lvalues = (char *) calloc(maxloop, sizeof(char) ); + if (!lvalues) + { + ffpmsg + ("malloc failed to get memory for logicals (ffcpcl)"); + return(*status = ARRAY_TOO_BIG); + } + } + else if (typecode == TSTRING) + { + /* allocate array of pointers */ + strarray = (char **) calloc(maxloop, sizeof(strarray)); + + /* allocate space for each string */ + for (ii = 0; ii < maxloop; ii++) + strarray[ii] = (char *) calloc(width+1, sizeof(char)); + } + else if (typecode == TCOMPLEX) + { + fvalues = (float *) calloc(maxloop * 2, sizeof(float) ); + if (!fvalues) + { + ffpmsg + ("malloc failed to get memory for complex (ffcpcl)"); + return(*status = ARRAY_TOO_BIG); + } + fnull = 0.; + } + else if (typecode == TDBLCOMPLEX) + { + dvalues = (double *) calloc(maxloop * 2, sizeof(double) ); + if (!dvalues) + { + ffpmsg + ("malloc failed to get memory for dbl complex (ffcpcl)"); + return(*status = ARRAY_TOO_BIG); + } + dnull = 0.; + } + else /* numerical datatype; read them all as doubles */ + { + dvalues = (double *) calloc(maxloop, sizeof(double) ); + if (!dvalues) + { + ffpmsg + ("malloc failed to get memory for doubles (ffcpcl)"); + return(*status = ARRAY_TOO_BIG); + } + dnull = -9.99991999E31; /* use an unlikely value for nulls */ + } + + npixels = nrows * repeat; /* total no. of pixels to copy */ + ntodo = minvalue(npixels, maxloop); /* no. to copy per iteration */ + ndone = 0; /* total no. of pixels that have been copied */ + + while (ntodo) /* iterate through the table */ + { + firstrow = ndone / repeat + 1; + firstelem = ndone - ((firstrow - 1) * repeat) + 1; + + /* read from input table */ + if (typecode == TLOGICAL) + ffgcl(infptr, incol, firstrow, firstelem, ntodo, + lvalues, status); + else if (typecode == TSTRING) + ffgcvs(infptr, incol, firstrow, firstelem, ntodo, + nulstr, strarray, &anynull, status); + + else if (typecode == TCOMPLEX) + ffgcvc(infptr, incol, firstrow, firstelem, ntodo, fnull, + fvalues, &anynull, status); + + else if (typecode == TDBLCOMPLEX) + ffgcvm(infptr, incol, firstrow, firstelem, ntodo, dnull, + dvalues, &anynull, status); + + else /* all numerical types */ + ffgcvd(infptr, incol, firstrow, firstelem, ntodo, dnull, + dvalues, &anynull, status); + + if (*status > 0) + { + ffpmsg("Error reading input copy of column (ffcpcl)"); + break; + } + + /* write to output table */ + if (typecode == TLOGICAL) + { + nullflag = 2; + + ffpcnl(outfptr, colnum, firstrow, firstelem, ntodo, + lvalues, nullflag, status); + + } + + else if (typecode == TSTRING) + { + if (anynull) + ffpcns(outfptr, colnum, firstrow, firstelem, ntodo, + strarray, nulstr, status); + else + ffpcls(outfptr, colnum, firstrow, firstelem, ntodo, + strarray, status); + } + + else if (typecode == TCOMPLEX) + { /* doesn't support writing nulls */ + ffpclc(outfptr, colnum, firstrow, firstelem, ntodo, + fvalues, status); + } + + else if (typecode == TDBLCOMPLEX) + { /* doesn't support writing nulls */ + ffpclm(outfptr, colnum, firstrow, firstelem, ntodo, + dvalues, status); + } + + else /* all other numerical types */ + { + if (anynull) + ffpcnd(outfptr, colnum, firstrow, firstelem, ntodo, + dvalues, dnull, status); + else + ffpcld(outfptr, colnum, firstrow, firstelem, ntodo, + dvalues, status); + } + + if (*status > 0) + { + ffpmsg("Error writing output copy of column (ffcpcl)"); + break; + } + + npixels -= ntodo; + ndone += ntodo; + ntodo = minvalue(npixels, maxloop); + } + + /* free the previously allocated memory */ + if (typecode == TLOGICAL) + { + free(lvalues); + } + else if (typecode == TSTRING) + { + for (ii = 0; ii < maxloop; ii++) + free(strarray[ii]); + + free(strarray); + } + else + { + free(dvalues); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcpky(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int incol, /* I - input index number */ + int outcol, /* I - output index number */ + char *rootname, /* I - root name of the keyword to be copied */ + int *status) /* IO - error status */ +/* + copy an indexed keyword from infptr to outfptr. +*/ +{ + int tstatus = 0; + char keyname[FLEN_KEYWORD]; + char value[FLEN_VALUE], comment[FLEN_COMMENT], card[FLEN_CARD]; + + ffkeyn(rootname, incol, keyname, &tstatus); + if (ffgkey(infptr, keyname, value, comment, &tstatus) <= 0) + { + ffkeyn(rootname, outcol, keyname, &tstatus); + ffmkky(keyname, value, comment, card, status); + ffprec(outfptr, card, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdcol(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column to delete (1 = 1st) */ + int *status) /* IO - error status */ +/* + Delete a column from a table. +*/ +{ + int ii, tstatus; + LONGLONG firstbyte, size, ndelete, nbytes, naxis1, naxis2, firstcol, delbyte, freespace; + LONGLONG tbcol; + long nblock, nspace; + char keyname[FLEN_KEYWORD], comm[FLEN_COMMENT]; + tcolumn *colptr, *nextcol; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffpmsg + ("Can only delete column from TABLE or BINTABLE extension (ffdcol)"); + return(*status = NOT_TABLE); + } + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield ) + return(*status = BAD_COL_NUM); + + colptr = (fptr->Fptr)->tableptr; + colptr += (colnum - 1); + firstcol = colptr->tbcol; /* starting byte position of the column */ + + /* use column width to determine how many bytes to delete in each row */ + if ((fptr->Fptr)->hdutype == ASCII_TBL) + { + delbyte = colptr->twidth; /* width of ASCII column */ + + if (colnum < (fptr->Fptr)->tfield) /* check for space between next column */ + { + nextcol = colptr + 1; + nspace = (long) ((nextcol->tbcol) - (colptr->tbcol) - delbyte); + if (nspace > 0) + delbyte++; + } + else if (colnum > 1) /* check for space between last 2 columns */ + { + nextcol = colptr - 1; + nspace = (long) ((colptr->tbcol) - (nextcol->tbcol) - (nextcol->twidth)); + if (nspace > 0) + { + delbyte++; + firstcol--; /* delete the leading space */ + } + } + } + else /* a binary table */ + { + if (colnum < (fptr->Fptr)->tfield) + { + nextcol = colptr + 1; + delbyte = (nextcol->tbcol) - (colptr->tbcol); + } + else + { + delbyte = ((fptr->Fptr)->rowlength) - (colptr->tbcol); + } + } + + naxis1 = (fptr->Fptr)->rowlength; /* current width of the table */ + naxis2 = (fptr->Fptr)->numrows; + + /* current size of table */ + size = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; + freespace = ((LONGLONG)delbyte * naxis2) + ((size + 2879) / 2880) * 2880 - size; + nblock = (long) (freespace / 2880); /* number of empty blocks to delete */ + + ffcdel(fptr, naxis1, naxis2, delbyte, firstcol, status); /* delete col */ + + /* absolute heap position */ + firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; + ndelete = (LONGLONG)delbyte * naxis2; /* size of shift */ + + /* shift heap up (if it exists) */ + if ((fptr->Fptr)->heapsize > 0) + { + nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift up */ + + if (ffshft(fptr, firstbyte, nbytes, -ndelete, status) > 0) /* mv heap */ + return(*status); + } + + /* delete the empty blocks at the end of the HDU */ + if (nblock > 0) + ffdblk(fptr, nblock, status); + + /* update the heap starting address */ + (fptr->Fptr)->heapstart -= ndelete; + + /* update the THEAP keyword if it exists */ + tstatus = 0; + ffmkyj(fptr, "THEAP", (long)(fptr->Fptr)->heapstart, "&", &tstatus); + + if ((fptr->Fptr)->hdutype == ASCII_TBL) + { + /* adjust the TBCOL values of the remaining columns */ + for (ii = 1; ii <= (fptr->Fptr)->tfield; ii++) + { + ffkeyn("TBCOL", ii, keyname, status); + ffgkyjj(fptr, keyname, &tbcol, comm, status); + if (tbcol > firstcol) + { + tbcol = tbcol - delbyte; + ffmkyj(fptr, keyname, tbcol, "&", status); + } + } + } + + /* update the mandatory keywords */ + ffmkyj(fptr, "TFIELDS", ((fptr->Fptr)->tfield) - 1, "&", status); + ffmkyj(fptr, "NAXIS1", naxis1 - delbyte, "&", status); + /* + delete the index keywords starting with 'T' associated with the + deleted column and subtract 1 from index of all higher keywords + */ + ffkshf(fptr, colnum, (fptr->Fptr)->tfield, -1, status); + + ffrdef(fptr, status); /* initialize the new table structure */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcins(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis1, /* I - width of the table, in bytes */ + LONGLONG naxis2, /* I - number of rows in the table */ + LONGLONG ninsert, /* I - number of bytes to insert in each row */ + LONGLONG bytepos, /* I - rel. position in row to insert bytes */ + int *status) /* IO - error status */ +/* + Insert 'ninsert' bytes into each row of the table at position 'bytepos'. +*/ +{ + unsigned char buffer[10000], cfill; + LONGLONG newlen, fbyte, nbytes, irow, nseg, ii; + + if (*status > 0) + return(*status); + + if (naxis2 == 0) + return(*status); /* just return if there are 0 rows in the table */ + + /* select appropriate fill value */ + if ((fptr->Fptr)->hdutype == ASCII_TBL) + cfill = 32; /* ASCII tables use blank fill */ + else + cfill = 0; /* primary array and binary tables use zero fill */ + + newlen = naxis1 + ninsert; + + if (newlen <= 10000) + { + /******************************************************************* + CASE #1: optimal case where whole new row fits in the work buffer + *******************************************************************/ + + for (ii = 0; ii < ninsert; ii++) + buffer[ii] = cfill; /* initialize buffer with fill value */ + + /* first move the trailing bytes (if any) in the last row */ + fbyte = bytepos + 1; + nbytes = naxis1 - bytepos; + ffgtbb(fptr, naxis2, fbyte, nbytes, &buffer[ninsert], status); + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + /* write the row (with leading fill bytes) in the new place */ + nbytes += ninsert; + ffptbb(fptr, naxis2, fbyte, nbytes, buffer, status); + (fptr->Fptr)->rowlength = naxis1; /* reset to orig. value */ + + /* now move the rest of the rows */ + for (irow = naxis2 - 1; irow > 0; irow--) + { + /* read the row to be shifted (work backwards thru the table) */ + ffgtbb(fptr, irow, fbyte, naxis1, &buffer[ninsert], status); + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + /* write the row (with the leading fill bytes) in the new place */ + ffptbb(fptr, irow, fbyte, newlen, buffer, status); + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + } + } + else + { + /***************************************************************** + CASE #2: whole row doesn't fit in work buffer; move row in pieces + ****************************************************************** + first copy the data, then go back and write fill into the new column + start by copying the trailing bytes (if any) in the last row. */ + + nbytes = naxis1 - bytepos; + nseg = (nbytes + 9999) / 10000; + fbyte = (nseg - 1) * 10000 + bytepos + 1; + nbytes = naxis1 - fbyte + 1; + + for (ii = 0; ii < nseg; ii++) + { + ffgtbb(fptr, naxis2, fbyte, nbytes, buffer, status); + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + ffptbb(fptr, naxis2, fbyte + ninsert, nbytes, buffer, status); + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + + fbyte -= 10000; + nbytes = 10000; + } + + /* now move the rest of the rows */ + nseg = (naxis1 + 9999) / 10000; + for (irow = naxis2 - 1; irow > 0; irow--) + { + fbyte = (nseg - 1) * 10000 + bytepos + 1; + nbytes = naxis1 - (nseg - 1) * 10000; + for (ii = 0; ii < nseg; ii++) + { + /* read the row to be shifted (work backwards thru the table) */ + ffgtbb(fptr, irow, fbyte, nbytes, buffer, status); + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + /* write the row in the new place */ + ffptbb(fptr, irow, fbyte + ninsert, nbytes, buffer, status); + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + + fbyte -= 10000; + nbytes = 10000; + } + } + + /* now write the fill values into the new column */ + nbytes = minvalue(ninsert, 10000); + memset(buffer, cfill, (size_t) nbytes); /* initialize with fill value */ + + nseg = (ninsert + 9999) / 10000; + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + for (irow = 1; irow <= naxis2; irow++) + { + fbyte = bytepos + 1; + nbytes = ninsert - ((nseg - 1) * 10000); + for (ii = 0; ii < nseg; ii++) + { + ffptbb(fptr, irow, fbyte, nbytes, buffer, status); + fbyte += nbytes; + nbytes = 10000; + } + } + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcdel(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis1, /* I - width of the table, in bytes */ + LONGLONG naxis2, /* I - number of rows in the table */ + LONGLONG ndelete, /* I - number of bytes to delete in each row */ + LONGLONG bytepos, /* I - rel. position in row to delete bytes */ + int *status) /* IO - error status */ +/* + delete 'ndelete' bytes from each row of the table at position 'bytepos'. */ +{ + unsigned char buffer[10000]; + LONGLONG i1, i2, ii, irow, nseg; + LONGLONG newlen, remain, nbytes; + + if (*status > 0) + return(*status); + + if (naxis2 == 0) + return(*status); /* just return if there are 0 rows in the table */ + + newlen = naxis1 - ndelete; + + if (newlen <= 10000) + { + /******************************************************************* + CASE #1: optimal case where whole new row fits in the work buffer + *******************************************************************/ + i1 = bytepos + 1; + i2 = i1 + ndelete; + for (irow = 1; irow < naxis2; irow++) + { + ffgtbb(fptr, irow, i2, newlen, buffer, status); /* read row */ + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + ffptbb(fptr, irow, i1, newlen, buffer, status); /* write row */ + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + } + + /* now do the last row */ + remain = naxis1 - (bytepos + ndelete); + + if (remain > 0) + { + ffgtbb(fptr, naxis2, i2, remain, buffer, status); /* read row */ + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + ffptbb(fptr, naxis2, i1, remain, buffer, status); /* write row */ + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + } + } + else + { + /***************************************************************** + CASE #2: whole row doesn't fit in work buffer; move row in pieces + ******************************************************************/ + + nseg = (newlen + 9999) / 10000; + for (irow = 1; irow < naxis2; irow++) + { + i1 = bytepos + 1; + i2 = i1 + ndelete; + + nbytes = newlen - (nseg - 1) * 10000; + for (ii = 0; ii < nseg; ii++) + { + ffgtbb(fptr, irow, i2, nbytes, buffer, status); /* read bytes */ + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + ffptbb(fptr, irow, i1, nbytes, buffer, status); /* rewrite bytes */ + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + + i1 += nbytes; + i2 += nbytes; + nbytes = 10000; + } + } + + /* now do the last row */ + remain = naxis1 - (bytepos + ndelete); + + if (remain > 0) + { + nseg = (remain + 9999) / 10000; + i1 = bytepos + 1; + i2 = i1 + ndelete; + nbytes = remain - (nseg - 1) * 10000; + for (ii = 0; ii < nseg; ii++) + { + ffgtbb(fptr, naxis2, i2, nbytes, buffer, status); + (fptr->Fptr)->rowlength = newlen; /* new row length */ + + ffptbb(fptr, naxis2, i1, nbytes, buffer, status); /* write row */ + (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ + + i1 += nbytes; + i2 += nbytes; + nbytes = 10000; + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffkshf(fitsfile *fptr, /* I - FITS file pointer */ + int colmin, /* I - starting col. to be incremented; 1 = 1st */ + int colmax, /* I - last column to be incremented */ + int incre, /* I - shift index number by this amount */ + int *status) /* IO - error status */ +/* + shift the index value on any existing column keywords + This routine will modify the name of any keyword that begins with 'T' + and has an index number in the range COLMIN - COLMAX, inclusive. + + if incre is positive, then the index values will be incremented. + if incre is negative, then the kewords with index = COLMIN + will be deleted and the index of higher numbered keywords will + be decremented. +*/ +{ + int nkeys, nmore, nrec, tstatus, i1; + long ivalue; + char rec[FLEN_CARD], q[FLEN_KEYWORD], newkey[FLEN_KEYWORD]; + + ffghsp(fptr, &nkeys, &nmore, status); /* get number of keywords */ + + /* go thru header starting with the 9th keyword looking for 'TxxxxNNN' */ + + for (nrec = 9; nrec <= nkeys; nrec++) + { + ffgrec(fptr, nrec, rec, status); + + if (rec[0] == 'T') + { + i1 = 0; + strncpy(q, &rec[1], 4); + if (!strncmp(q, "BCOL", 4) || !strncmp(q, "FORM", 4) || + !strncmp(q, "TYPE", 4) || !strncmp(q, "SCAL", 4) || + !strncmp(q, "UNIT", 4) || !strncmp(q, "NULL", 4) || + !strncmp(q, "ZERO", 4) || !strncmp(q, "DISP", 4) || + !strncmp(q, "LMIN", 4) || !strncmp(q, "LMAX", 4) || + !strncmp(q, "DMIN", 4) || !strncmp(q, "DMAX", 4) || + !strncmp(q, "CTYP", 4) || !strncmp(q, "CRPX", 4) || + !strncmp(q, "CRVL", 4) || !strncmp(q, "CDLT", 4) || + !strncmp(q, "CROT", 4) || !strncmp(q, "CUNI", 4) ) + i1 = 5; + else if (!strncmp(rec, "TDIM", 4) ) + i1 = 4; + + if (i1) + { + /* try reading the index number suffix */ + q[0] = '\0'; + strncat(q, &rec[i1], 8 - i1); + + tstatus = 0; + ffc2ii(q, &ivalue, &tstatus); + + if (tstatus == 0 && ivalue >= colmin && ivalue <= colmax) + { + if (incre <= 0 && ivalue == colmin) + { + ffdrec(fptr, nrec, status); /* delete keyword */ + nkeys = nkeys - 1; + nrec = nrec - 1; + } + else + { + ivalue = ivalue + incre; + q[0] = '\0'; + strncat(q, rec, i1); + + ffkeyn(q, ivalue, newkey, status); + strncpy(rec, " ", 8); /* erase old keyword name */ + i1 = strlen(newkey); + strncpy(rec, newkey, i1); /* overwrite new keyword name */ + ffmrec(fptr, nrec, rec, status); /* modify the record */ + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffshft(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstbyte, /* I - position of first byte in block to shift */ + LONGLONG nbytes, /* I - size of block of bytes to shift */ + LONGLONG nshift, /* I - size of shift in bytes (+ or -) */ + int *status) /* IO - error status */ +/* + Shift block of bytes by nshift bytes (positive or negative). + A positive nshift value moves the block down further in the file, while a + negative value shifts the block towards the beginning of the file. +*/ +{ +#define shftbuffsize 100000 + long ntomov; + LONGLONG ptr, ntodo; + char buffer[shftbuffsize]; + + if (*status > 0) + return(*status); + + ntodo = nbytes; /* total number of bytes to shift */ + + if (nshift > 0) + /* start at the end of the block and work backwards */ + ptr = firstbyte + nbytes; + else + /* start at the beginning of the block working forwards */ + ptr = firstbyte; + + while (ntodo) + { + /* number of bytes to move at one time */ + ntomov = (long) (minvalue(ntodo, shftbuffsize)); + + if (nshift > 0) /* if moving block down ... */ + ptr -= ntomov; + + /* move to position and read the bytes to be moved */ + + ffmbyt(fptr, ptr, REPORT_EOF, status); + ffgbyt(fptr, ntomov, buffer, status); + + /* move by shift amount and write the bytes */ + ffmbyt(fptr, ptr + nshift, IGNORE_EOF, status); + if (ffpbyt(fptr, ntomov, buffer, status) > 0) + { + ffpmsg("Error while shifting block (ffshft)"); + return(*status); + } + + ntodo -= ntomov; + if (nshift < 0) /* if moving block up ... */ + ptr += ntomov; + } + + /* now overwrite the old data with fill */ + if ((fptr->Fptr)->hdutype == ASCII_TBL) + memset(buffer, 32, shftbuffsize); /* fill ASCII tables with spaces */ + else + memset(buffer, 0, shftbuffsize); /* fill other HDUs with zeros */ + + + if (nshift < 0) + { + ntodo = -nshift; + /* point to the end of the shifted block */ + ptr = firstbyte + nbytes + nshift; + } + else + { + ntodo = nshift; + /* point to original beginning of the block */ + ptr = firstbyte; + } + + ffmbyt(fptr, ptr, REPORT_EOF, status); + + while (ntodo) + { + ntomov = (long) (minvalue(ntodo, shftbuffsize)); + ffpbyt(fptr, ntomov, buffer, status); + ntodo -= ntomov; + } + return(*status); +} diff --git a/software/cfitsio3040/edithdu.c b/software/cfitsio3040/edithdu.c new file mode 100644 index 000000000..2c86bf40b --- /dev/null +++ b/software/cfitsio3040/edithdu.c @@ -0,0 +1,855 @@ +/* This file, edithdu.c, contains the FITSIO routines related to */ +/* copying, inserting, or deleting HDUs in a FITS file */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffcopy(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int morekeys, /* I - reserve space in output header */ + int *status) /* IO - error status */ +/* + copy the CHDU from infptr to the CHDU of outfptr. + This will also allocate space in the output header for MOREKY keywords +*/ +{ + if (*status > 0) + return(*status); + + if (infptr == outfptr) + return(*status = SAME_FILE); + + if (ffcphd(infptr, outfptr, status) ) /* copy the header keywords */ + return(*status); + + if (morekeys > 0) + ffhdef(outfptr, morekeys, status); /* reserve space for more keywords */ + + ffcpdt(infptr, outfptr, status); /* now copy the data unit */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcpfl(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int previous, /* I - copy any previous HDUs? */ + int current, /* I - copy the current HDU? */ + int following, /* I - copy any following HDUs? */ + int *status) /* IO - error status */ +/* + copy all or part of the input file to the output file. +*/ +{ + int hdunum, ii; + + if (*status > 0) + return(*status); + + if (infptr == outfptr) + return(*status = SAME_FILE); + + ffghdn(infptr, &hdunum); + + if (previous) { /* copy any previous HDUs */ + for (ii=1; ii < hdunum; ii++) { + ffmahd(infptr, ii, NULL, status); + ffcopy(infptr, outfptr, 0, status); + } + } + + if (current && (*status <= 0) ) { /* copy current HDU */ + ffmahd(infptr, hdunum, NULL, status); + ffcopy(infptr, outfptr, 0, status); + } + + if (following && (*status <= 0) ) { /* copy any remaining HDUs */ + ii = hdunum + 1; + while (1) + { + if (ffmahd(infptr, ii, NULL, status) ) { + /* reset expected end of file status */ + if (*status == END_OF_FILE) + *status = 0; + break; + } + + if (ffcopy(infptr, outfptr, 0, status)) + break; /* quit on unexpected error */ + + ii++; + } + } + + ffmahd(infptr, hdunum, NULL, status); /* restore initial position */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcphd(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int *status) /* IO - error status */ +/* + copy the header keywords from infptr to outfptr. +*/ +{ + int nkeys, ii, inPrim = 0, outPrim = 0; + long naxis, naxes[1]; + char *card, comm[FLEN_COMMENT]; + char *tmpbuff = NULL; + + if (*status > 0) + return(*status); + + if (infptr == outfptr) + return(*status = SAME_FILE); + + /* set the input pointer to the correct HDU */ + if (infptr->HDUposition != (infptr->Fptr)->curhdu) + ffmahd(infptr, (infptr->HDUposition) + 1, NULL, status); + + if (ffghsp(infptr, &nkeys, NULL, status) > 0) /* get no. of keywords */ + return(*status); + + /* create a memory buffer to hold the header records */ + tmpbuff = (char*) malloc(nkeys*FLEN_CARD*sizeof(char)); + if (!tmpbuff) + return(*status = MEMORY_ALLOCATION); + + /* read all of the header records in the input HDU */ + for (ii = 0; ii < nkeys; ii++) + ffgrec(infptr, ii+1, tmpbuff + (ii * FLEN_CARD), status); + + if (infptr->HDUposition == 0) /* set flag if this is the Primary HDU */ + inPrim = 1; + + /* if input is an image hdu, get the number of axes */ + naxis = -1; /* negative if HDU is a table */ + if ((infptr->Fptr)->hdutype == IMAGE_HDU) + ffgkyj(infptr, "NAXIS", &naxis, NULL, status); + + /* set the output pointer to the correct HDU */ + if (outfptr->HDUposition != (outfptr->Fptr)->curhdu) + ffmahd(outfptr, (outfptr->HDUposition) + 1, NULL, status); + + /* check if output header is empty; if not create new empty HDU */ + if ((outfptr->Fptr)->headend != + (outfptr->Fptr)->headstart[(outfptr->Fptr)->curhdu] ) + ffcrhd(outfptr, status); + + if (outfptr->HDUposition == 0) + { + if (naxis < 0) + { + /* the input HDU is a table, so we have to create */ + /* a dummy Primary array before copying it to the output */ + ffcrim(outfptr, 8, 0, naxes, status); + ffcrhd(outfptr, status); /* create new empty HDU */ + } + else + { + /* set flag that this is the Primary HDU */ + outPrim = 1; + } + } + + if (*status > 0) /* check for errors before proceeding */ + { + free(tmpbuff); + return(*status); + } + if ( inPrim == 1 && outPrim == 0 ) + { + /* copying from primary array to image extension */ + strcpy(comm, "IMAGE extension"); + ffpkys(outfptr, "XTENSION", "IMAGE", comm, status); + + /* copy BITPIX through NAXISn keywords */ + for (ii = 1; ii < 3 + naxis; ii++) + { + card = tmpbuff + (ii * FLEN_CARD); + ffprec(outfptr, card, status); + } + + strcpy(comm, "number of random group parameters"); + ffpkyj(outfptr, "PCOUNT", 0, comm, status); + + strcpy(comm, "number of random groups"); + ffpkyj(outfptr, "GCOUNT", 1, comm, status); + + + /* copy remaining keywords, excluding EXTEND, and reference COMMENT keywords */ + for (ii = 3 + naxis ; ii < nkeys; ii++) + { + card = tmpbuff+(ii * FLEN_CARD); + if (FSTRNCMP(card, "EXTEND ", 8) && + FSTRNCMP(card, "COMMENT FITS (Flexible Image Transport System) format is", 58) && + FSTRNCMP(card, "COMMENT and Astrophysics', volume 376, page 3", 47) ) + { + ffprec(outfptr, card, status); + } + } + } + else if ( inPrim == 0 && outPrim == 1 ) + { + /* copying between image extension and primary array */ + strcpy(comm, "file does conform to FITS standard"); + ffpkyl(outfptr, "SIMPLE", TRUE, comm, status); + + /* copy BITPIX through NAXISn keywords */ + for (ii = 1; ii < 3 + naxis; ii++) + { + card = tmpbuff + (ii * FLEN_CARD); + ffprec(outfptr, card, status); + } + + /* add the EXTEND keyword */ + strcpy(comm, "FITS dataset may contain extensions"); + ffpkyl(outfptr, "EXTEND", TRUE, comm, status); + + /* write standard block of self-documentating comments */ + ffprec(outfptr, + "COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy", + status); + ffprec(outfptr, + "COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H", + status); + + /* copy remaining keywords, excluding pcount, gcount */ + for (ii = 3 + naxis; ii < nkeys; ii++) + { + card = tmpbuff+(ii * FLEN_CARD); + if (FSTRNCMP(card, "PCOUNT ", 8) && FSTRNCMP(card, "GCOUNT ", 8)) + { + ffprec(outfptr, card, status); + } + } + } + else + { + /* input and output HDUs are same type; simply copy all keywords */ + for (ii = 0; ii < nkeys; ii++) + { + card = tmpbuff+(ii * FLEN_CARD); + ffprec(outfptr, card, status); + } + } + + free(tmpbuff); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcpdt(fitsfile *infptr, /* I - FITS file pointer to input file */ + fitsfile *outfptr, /* I - FITS file pointer to output file */ + int *status) /* IO - error status */ +{ +/* + copy the data unit from the CHDU of infptr to the CHDU of outfptr. + This will overwrite any data already in the outfptr CHDU. +*/ + long nb, ii; + LONGLONG indatastart, indataend, outdatastart; + char buffer[2880]; + + if (*status > 0) + return(*status); + + if (infptr == outfptr) + return(*status = SAME_FILE); + + ffghadll(infptr, NULL, &indatastart, &indataend, status); + ffghadll(outfptr, NULL, &outdatastart, NULL, status); + + /* Calculate the number of blocks to be copied */ + nb = (long) ((indataend - indatastart) / 2880); + + if (nb > 0) + { + if (infptr->Fptr == outfptr->Fptr) + { + /* copying between 2 HDUs in the SAME file */ + for (ii = 0; ii < nb; ii++) + { + ffmbyt(infptr, indatastart, REPORT_EOF, status); + ffgbyt(infptr, 2880L, buffer, status); /* read input block */ + + ffmbyt(outfptr, outdatastart, IGNORE_EOF, status); + ffpbyt(outfptr, 2880L, buffer, status); /* write output block */ + + indatastart += 2880; /* move address */ + outdatastart += 2880; /* move address */ + } + } + else + { + /* copying between HDUs in separate files */ + /* move to the initial copy position in each of the files */ + ffmbyt(infptr, indatastart, REPORT_EOF, status); + ffmbyt(outfptr, outdatastart, IGNORE_EOF, status); + + for (ii = 0; ii < nb; ii++) + { + ffgbyt(infptr, 2880L, buffer, status); /* read input block */ + ffpbyt(outfptr, 2880L, buffer, status); /* write output block */ + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffwrhdu(fitsfile *infptr, /* I - FITS file pointer to input file */ + FILE *outstream, /* I - stream to write HDU to */ + int *status) /* IO - error status */ +{ +/* + write the data unit from the CHDU of infptr to the output file stream +*/ + long nb, ii; + LONGLONG hdustart, hduend; + char buffer[2880]; + + if (*status > 0) + return(*status); + + ffghadll(infptr, &hdustart, NULL, &hduend, status); + + nb = (long) ((hduend - hdustart) / 2880); /* number of blocks to copy */ + + if (nb > 0) + { + + /* move to the start of the HDU */ + ffmbyt(infptr, hdustart, REPORT_EOF, status); + + for (ii = 0; ii < nb; ii++) + { + ffgbyt(infptr, 2880L, buffer, status); /* read input block */ + fwrite(buffer, 1, 2880, outstream ); /* write to output stream */ + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffiimg(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + long *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + insert an IMAGE extension following the current HDU +*/ +{ + LONGLONG tnaxes[99]; + int ii; + + if (*status > 0) + return(*status); + + if (naxis > 99) { + ffpmsg("NAXIS value is too large (>99) (ffiimg)"); + return(*status = 212); + } + + for (ii = 0; (ii < naxis); ii++) + tnaxes[ii] = naxes[ii]; + + ffiimgll(fptr, bitpix, naxis, tnaxes, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffiimgll(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + LONGLONG *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + insert an IMAGE extension following the current HDU +*/ +{ + int bytlen, nexthdu, maxhdu, ii, onaxis; + long nblocks; + LONGLONG npixels, newstart, datasize; + char errmsg[FLEN_ERRMSG], card[FLEN_CARD], naxiskey[FLEN_KEYWORD]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + maxhdu = (fptr->Fptr)->maxhdu; + + if (*status != PREPEND_PRIMARY) + { + /* if the current header is completely empty ... */ + if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) + /* or, if we are at the end of the file, ... */ + || ( (((fptr->Fptr)->curhdu) == maxhdu ) && + ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) + { + /* then simply append new image extension */ + ffcrimll(fptr, bitpix, naxis, naxes, status); + return(*status); + } + } + + if (bitpix == 8) + bytlen = 1; + else if (bitpix == 16) + bytlen = 2; + else if (bitpix == 32 || bitpix == -32) + bytlen = 4; + else if (bitpix == 64 || bitpix == -64) + bytlen = 8; + else + { + sprintf(errmsg, + "Illegal value for BITPIX keyword: %d", bitpix); + ffpmsg(errmsg); + return(*status = BAD_BITPIX); /* illegal bitpix value */ + } + if (naxis < 0 || naxis > 999) + { + sprintf(errmsg, + "Illegal value for NAXIS keyword: %d", naxis); + ffpmsg(errmsg); + return(*status = BAD_NAXIS); + } + + for (ii = 0; ii < naxis; ii++) + { + if (naxes[ii] < 0) + { + sprintf(errmsg, + "Illegal value for NAXIS%d keyword: %ld", ii + 1, (long) naxes[ii]); + ffpmsg(errmsg); + return(*status = BAD_NAXES); + } + } + + /* calculate number of pixels in the image */ + if (naxis == 0) + npixels = 0; + else + npixels = naxes[0]; + + for (ii = 1; ii < naxis; ii++) + npixels = npixels * naxes[ii]; + + datasize = npixels * bytlen; /* size of image in bytes */ + nblocks = (long) (((datasize + 2879) / 2880) + 1); /* +1 for the header */ + + if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ + { /* close the CHDU */ + ffrdef(fptr, status); /* scan header to redefine structure */ + ffpdfl(fptr, status); /* insure correct data file values */ + } + else + return(*status = READONLY_FILE); + + if (*status == PREPEND_PRIMARY) + { + /* inserting a new primary array; the current primary */ + /* array must be transformed into an image extension. */ + + *status = 0; + ffmahd(fptr, 1, NULL, status); /* move to the primary array */ + + ffgidm(fptr, &onaxis, status); + if (onaxis > 0) + ffkeyn("NAXIS",onaxis, naxiskey, status); + else + strcpy(naxiskey, "NAXIS"); + + ffgcrd(fptr, naxiskey, card, status); /* read last NAXIS keyword */ + + ffikyj(fptr, "PCOUNT", 0, "required keyword", status); /* add PCOUNT and */ + ffikyj(fptr, "GCOUNT", 1, "required keyword", status); /* GCOUNT keywords */ + + if (*status > 0) + return(*status); + + if (ffdkey(fptr, "EXTEND", status) ) /* delete the EXTEND keyword */ + *status = 0; + + /* redefine internal structure for this HDU */ + ffrdef(fptr, status); + + + /* insert space for the primary array */ + if (ffiblk(fptr, nblocks, -1, status) > 0) /* insert the blocks */ + return(*status); + + nexthdu = 0; /* number of the new hdu */ + newstart = 0; /* starting addr of HDU */ + } + else + { + nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ + newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ + + (fptr->Fptr)->hdutype = IMAGE_HDU; /* so that correct fill value is used */ + /* ffiblk also increments headstart for all following HDUs */ + if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ + return(*status); + } + + ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ + for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) + (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ + + if (nexthdu == 0) + (fptr->Fptr)->headstart[1] = nblocks * 2880; /* start of the old Primary array */ + + (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ + + /* set default parameters for this new empty HDU */ + (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ + fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + 2880; + (fptr->Fptr)->hdutype = IMAGE_HDU; /* might need to be reset... */ + + /* write the required header keywords */ + ffphprll(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); + + /* redefine internal structure for this HDU */ + ffrdef(fptr, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffitab(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis1, /* I - width of row in the table */ + LONGLONG naxis2, /* I - number of rows in the table */ + int tfields, /* I - number of columns in the table */ + char **ttype, /* I - name of each column */ + long *tbcol, /* I - byte offset in row to each column */ + char **tform, /* I - value of TFORMn keyword for each column */ + char **tunit, /* I - value of TUNITn keyword for each column */ + char *extnm, /* I - value of EXTNAME keyword, if any */ + int *status) /* IO - error status */ +/* + insert an ASCII table extension following the current HDU +*/ +{ + int nexthdu, maxhdu, ii, nunit, nhead, ncols, gotmem = 0; + long nblocks, rowlen; + LONGLONG datasize, newstart; + char errmsg[81]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + maxhdu = (fptr->Fptr)->maxhdu; + /* if the current header is completely empty ... */ + if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + /* or, if we are at the end of the file, ... */ + || ( (((fptr->Fptr)->curhdu) == maxhdu ) && + ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) + { + /* then simply append new image extension */ + ffcrtb(fptr, ASCII_TBL, naxis2, tfields, ttype, tform, tunit, + extnm, status); + return(*status); + } + + if (naxis1 < 0) + return(*status = NEG_WIDTH); + else if (naxis2 < 0) + return(*status = NEG_ROWS); + else if (tfields < 0 || tfields > 999) + { + sprintf(errmsg, + "Illegal value for TFIELDS keyword: %d", tfields); + ffpmsg(errmsg); + return(*status = BAD_TFIELDS); + } + + /* count number of optional TUNIT keywords to be written */ + nunit = 0; + for (ii = 0; ii < tfields; ii++) + { + if (tunit && *tunit && *tunit[ii]) + nunit++; + } + + if (extnm && *extnm) + nunit++; /* add one for the EXTNAME keyword */ + + rowlen = (long) naxis1; + + if (!tbcol || !tbcol[0] || (!naxis1 && tfields)) /* spacing not defined? */ + { + /* allocate mem for tbcol; malloc may have problems allocating small */ + /* arrays, so allocate at least 20 bytes */ + + ncols = maxvalue(5, tfields); + tbcol = (long *) calloc(ncols, sizeof(long)); + + if (tbcol) + { + gotmem = 1; + + /* calculate width of a row and starting position of each column. */ + /* Each column will be separated by 1 blank space */ + ffgabc(tfields, tform, 1, &rowlen, tbcol, status); + } + } + + nhead = (9 + (3 * tfields) + nunit + 35) / 36; /* no. of header blocks */ + datasize = (LONGLONG)rowlen * naxis2; /* size of table in bytes */ + nblocks = (long) (((datasize + 2879) / 2880) + nhead); /* size of HDU */ + + if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ + { /* close the CHDU */ + ffrdef(fptr, status); /* scan header to redefine structure */ + ffpdfl(fptr, status); /* insure correct data file values */ + } + else + return(*status = READONLY_FILE); + + nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ + newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ + + (fptr->Fptr)->hdutype = ASCII_TBL; /* so that correct fill value is used */ + /* ffiblk also increments headstart for all following HDUs */ + if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ + { + if (gotmem) + free(tbcol); + return(*status); + } + + ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ + for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) + (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ + + (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ + + /* set default parameters for this new empty HDU */ + (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ + fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + (nhead * 2880); + (fptr->Fptr)->hdutype = ASCII_TBL; /* might need to be reset... */ + + /* write the required header keywords */ + + ffphtb(fptr, rowlen, naxis2, tfields, ttype, tbcol, tform, tunit, + extnm, status); + + if (gotmem) + free(tbcol); + + /* redefine internal structure for this HDU */ + + ffrdef(fptr, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffibin(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis2, /* I - number of rows in the table */ + int tfields, /* I - number of columns in the table */ + char **ttype, /* I - name of each column */ + char **tform, /* I - value of TFORMn keyword for each column */ + char **tunit, /* I - value of TUNITn keyword for each column */ + char *extnm, /* I - value of EXTNAME keyword, if any */ + LONGLONG pcount, /* I - size of special data area (heap) */ + int *status) /* IO - error status */ +/* + insert a Binary table extension following the current HDU +*/ +{ + int nexthdu, maxhdu, ii, nunit, nhead, datacode; + LONGLONG naxis1; + long nblocks, repeat, width; + LONGLONG datasize, newstart; + char errmsg[81]; + + if (*status > 0) + return(*status); + + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + maxhdu = (fptr->Fptr)->maxhdu; + /* if the current header is completely empty ... */ + if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + /* or, if we are at the end of the file, ... */ + || ( (((fptr->Fptr)->curhdu) == maxhdu ) && + ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) + { + /* then simply append new image extension */ + ffcrtb(fptr, BINARY_TBL, naxis2, tfields, ttype, tform, tunit, + extnm, status); + return(*status); + } + + if (naxis2 < 0) + return(*status = NEG_ROWS); + else if (tfields < 0 || tfields > 999) + { + sprintf(errmsg, + "Illegal value for TFIELDS keyword: %d", tfields); + ffpmsg(errmsg); + return(*status = BAD_TFIELDS); + } + + /* count number of optional TUNIT keywords to be written */ + nunit = 0; + for (ii = 0; ii < tfields; ii++) + { + if (tunit && *tunit && *tunit[ii]) + nunit++; + } + + if (extnm && *extnm) + nunit++; /* add one for the EXTNAME keyword */ + + nhead = (9 + (2 * tfields) + nunit + 35) / 36; /* no. of header blocks */ + + /* calculate total width of the table */ + naxis1 = 0; + for (ii = 0; ii < tfields; ii++) + { + ffbnfm(tform[ii], &datacode, &repeat, &width, status); + + if (datacode == TBIT) + naxis1 = naxis1 + ((repeat + 7) / 8); + else if (datacode == TSTRING) + naxis1 += repeat; + else + naxis1 = naxis1 + (repeat * width); + } + + datasize = ((LONGLONG)naxis1 * naxis2) + pcount; /* size of table in bytes */ + nblocks = (long) ((datasize + 2879) / 2880) + nhead; /* size of HDU */ + + if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ + { /* close the CHDU */ + ffrdef(fptr, status); /* scan header to redefine structure */ + ffpdfl(fptr, status); /* insure correct data file values */ + } + else + return(*status = READONLY_FILE); + + nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ + newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ + + (fptr->Fptr)->hdutype = BINARY_TBL; /* so that correct fill value is used */ + + /* ffiblk also increments headstart for all following HDUs */ + if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ + return(*status); + + ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ + for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) + (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ + + (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ + + /* set default parameters for this new empty HDU */ + (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ + fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; + (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + (nhead * 2880); + (fptr->Fptr)->hdutype = BINARY_TBL; /* might need to be reset... */ + + /* write the required header keywords. This will write PCOUNT = 0 */ + /* so that the variable length data will be written at the right place */ + ffphbn(fptr, naxis2, tfields, ttype, tform, tunit, extnm, pcount, + status); + + /* redefine internal structure for this HDU (with PCOUNT = 0) */ + ffrdef(fptr, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdhdu(fitsfile *fptr, /* I - FITS file pointer */ + int *hdutype, /* O - type of the new CHDU after deletion */ + int *status) /* IO - error status */ +/* + Delete the CHDU. If the CHDU is the primary array, then replace the HDU + with an empty primary array with no data. Return the + type of the new CHDU after the old CHDU is deleted. +*/ +{ + int tmptype = 0; + long nblocks, ii, naxes[1]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->curhdu == 0) /* replace primary array with null image */ + { + /* ignore any existing keywords */ + (fptr->Fptr)->headend = 0; + (fptr->Fptr)->nextkey = 0; + + /* write default primary array header */ + ffphpr(fptr,1,8,0,naxes,0,1,1,status); + + /* calc number of blocks to delete (leave just 1 block) */ + nblocks = (long) (( (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1] - + 2880 ) / 2880); + + /* ffdblk also updates the starting address of all following HDUs */ + if (nblocks > 0) + { + if (ffdblk(fptr, nblocks, status) > 0) /* delete the HDU */ + return(*status); + } + + /* this might not be necessary, but is doesn't hurt */ + (fptr->Fptr)->datastart = DATA_UNDEFINED; + + ffrdef(fptr, status); /* reinitialize the primary array */ + } + else + { + + /* calc number of blocks to delete */ + nblocks = (long) (( (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1] - + (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) / 2880); + + /* ffdblk also updates the starting address of all following HDUs */ + if (ffdblk(fptr, nblocks, status) > 0) /* delete the HDU */ + return(*status); + + /* delete the CHDU from the list of HDUs */ + for (ii = (fptr->Fptr)->curhdu + 1; ii <= (fptr->Fptr)->maxhdu; ii++) + (fptr->Fptr)->headstart[ii] = (fptr->Fptr)->headstart[ii + 1]; + + (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] = 0; + ((fptr->Fptr)->maxhdu)--; /* decrement the known number of HDUs */ + + if (ffrhdu(fptr, &tmptype, status) > 0) /* initialize next HDU */ + { + /* failed (end of file?), so move back one HDU */ + *status = 0; + ffcmsg(); /* clear extraneous error messages */ + ffgext(fptr, ((fptr->Fptr)->curhdu) - 1, &tmptype, status); + } + } + + if (hdutype) + *hdutype = tmptype; + + return(*status); +} + diff --git a/software/cfitsio3040/eval.l b/software/cfitsio3040/eval.l new file mode 100644 index 000000000..4b9e0deb5 --- /dev/null +++ b/software/cfitsio3040/eval.l @@ -0,0 +1,512 @@ +%{ +/************************************************************************/ +/* */ +/* CFITSIO Lexical Parser */ +/* */ +/* This file is one of 3 files containing code which parses an */ +/* arithmetic expression and evaluates it in the context of an input */ +/* FITS file table extension. The CFITSIO lexical parser is divided */ +/* into the following 3 parts/files: the CFITSIO "front-end", */ +/* eval_f.c, contains the interface between the user/CFITSIO and the */ +/* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ +/* input string and parses it into tokens and identifies the FITS */ +/* information required to evaluate the expression (ie, keywords and */ +/* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ +/* receives the FLEX output and determines and performs the actual */ +/* operations. The files eval_l.c and eval_y.c are produced from */ +/* running flex and bison on the files eval.l and eval.y, respectively. */ +/* (flex and bison are available from any GNU archive: see www.gnu.org) */ +/* */ +/* The grammar rules, rather than evaluating the expression in situ, */ +/* builds a tree, or Nodal, structure mapping out the order of */ +/* operations and expression dependencies. This "compilation" process */ +/* allows for much faster processing of multiple rows. This technique */ +/* was developed by Uwe Lammers of the XMM Science Analysis System, */ +/* although the CFITSIO implementation is entirely code original. */ +/* */ +/* */ +/* Modification History: */ +/* */ +/* Kent Blackburn c1992 Original parser code developed for the */ +/* FTOOLS software package, in particular, */ +/* the fselect task. */ +/* Kent Blackburn c1995 BIT column support added */ +/* Peter D Wilson Feb 1998 Vector column support added */ +/* Peter D Wilson May 1998 Ported to CFITSIO library. User */ +/* interface routines written, in essence */ +/* making fselect, fcalc, and maketime */ +/* capabilities available to all tools */ +/* via single function calls. */ +/* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ +/* create a run-time evaluation tree, */ +/* inspired by the work of Uwe Lammers, */ +/* resulting in a speed increase of */ +/* 10-100 times. */ +/* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ +/* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ +/* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ +/* allowing a purely vector-based usage */ +/* */ +/************************************************************************/ + +#include +#include +#include +#ifdef sparc +#include +#else +#include +#endif +#include "eval_defs.h" + +ParseData gParse; /* Global structure holding all parser information */ + +/***** Internal functions *****/ + + int yyGetVariable( char *varName, YYSTYPE *varVal ); + +static int find_variable( char *varName ); +static int expr_read( char *buf, int nbytes ); + +/***** Definitions *****/ + +#define YY_NO_UNPUT /* Don't include YYUNPUT function */ +#define YY_NEVER_INTERACTIVE 1 + +#define MAXCHR 256 +#define MAXBIT 128 + +#define OCT_0 "000" +#define OCT_1 "001" +#define OCT_2 "010" +#define OCT_3 "011" +#define OCT_4 "100" +#define OCT_5 "101" +#define OCT_6 "110" +#define OCT_7 "111" +#define OCT_X "xxx" + +#define HEX_0 "0000" +#define HEX_1 "0001" +#define HEX_2 "0010" +#define HEX_3 "0011" +#define HEX_4 "0100" +#define HEX_5 "0101" +#define HEX_6 "0110" +#define HEX_7 "0111" +#define HEX_8 "1000" +#define HEX_9 "1001" +#define HEX_A "1010" +#define HEX_B "1011" +#define HEX_C "1100" +#define HEX_D "1101" +#define HEX_E "1110" +#define HEX_F "1111" +#define HEX_X "xxxx" + +/* + MJT - 13 June 1996 + read from buffer instead of stdin + (as per old ftools.skel) +*/ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( (result = expr_read( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "read() in flex scanner failed" ); + +%} +bit ([bB][01xX]+) +oct ([oO][01234567xX]+) +hex ([hH][0123456789aAbBcCdDeEfFxX]+) +integer [0-9]+ +boolean (t|f|T|F) +real ([0-9]*"."[0-9]+)|([0-9]*"."*[0-9]+[eEdD][+-]?[0-9]+)|([0-9]*".") +constant ("#"[a-zA-Z0-9_]+)|("#""$"[^\n]*"$") +string ([\"][^\"\n]*[\"])|([\'][^\'\n]*[\']) +variable ([a-zA-Z_][a-zA-Z0-9_]*)|("$"[^$\n]*"$") +function [a-zA-Z][a-zA-Z0-9]+"(" +intcast ("(int)"|"(INT)") +fltcast ("(float)"|"(FLOAT)"|"(double)"|"(DOUBLE)") +power ("^"|"**") +not ("!"|".not."|".NOT."|"not."|"NOT.") +or ("||"|".or."|".OR."|"or."|"OR.") +and ("&&"|".and."|".AND."|"and."|"AND.") +equal ("=="|".eq."|".EQ."|"eq."|"EQ.") +not_equal ("!="|".ne."|".NE."|"ne."|"NE.") +greater (">"|".gt."|".GT."|"gt."|"GT.") +lesser ("<"|".lt."|".LT."|"lt."|"LT.") +greater_eq (">="|"=>"|".ge."|".GE."|"ge."|"GE.") +lesser_eq ("<="|"=<"|".le."|".LE."|"le."|"LE.") +nl \n + +%% + +[ \t]+ ; +{bit} { + int len; + len = strlen(yytext); + while (yytext[len] == ' ') + len--; + len = len - 1; + strncpy(yylval.str,&yytext[1],len); + yylval.str[len] = '\0'; + return( BITSTR ); + } +{oct} { + int len; + char tmpstring[256]; + char bitstring[256]; + len = strlen(yytext); + while (yytext[len] == ' ') + len--; + len = len - 1; + strncpy(tmpstring,&yytext[1],len); + tmpstring[len] = '\0'; + bitstring[0] = '\0'; + len = 0; + while ( tmpstring[len] != '\0') + { + switch ( tmpstring[len] ) + { + case '0': + strcat(bitstring,OCT_0); + break; + case '1': + strcat(bitstring,OCT_1); + break; + case '2': + strcat(bitstring,OCT_2); + break; + case '3': + strcat(bitstring,OCT_3); + break; + case '4': + strcat(bitstring,OCT_4); + break; + case '5': + strcat(bitstring,OCT_5); + break; + case '6': + strcat(bitstring,OCT_6); + break; + case '7': + strcat(bitstring,OCT_7); + break; + case 'x': + case 'X': + strcat(bitstring,OCT_X); + break; + } + len++; + } + strcpy( yylval.str, bitstring ); + return( BITSTR ); + } +{hex} { + int len; + char tmpstring[256]; + char bitstring[256]; + len = strlen(yytext); + while (yytext[len] == ' ') + len--; + len = len - 1; + strncpy(tmpstring,&yytext[1],len); + tmpstring[len] = '\0'; + bitstring[0] = '\0'; + len = 0; + while ( tmpstring[len] != '\0') + { + switch ( tmpstring[len] ) + { + case '0': + strcat(bitstring,HEX_0); + break; + case '1': + strcat(bitstring,HEX_1); + break; + case '2': + strcat(bitstring,HEX_2); + break; + case '3': + strcat(bitstring,HEX_3); + break; + case '4': + strcat(bitstring,HEX_4); + break; + case '5': + strcat(bitstring,HEX_5); + break; + case '6': + strcat(bitstring,HEX_6); + break; + case '7': + strcat(bitstring,HEX_7); + break; + case '8': + strcat(bitstring,HEX_8); + break; + case '9': + strcat(bitstring,HEX_9); + break; + case 'a': + case 'A': + strcat(bitstring,HEX_A); + break; + case 'b': + case 'B': + strcat(bitstring,HEX_B); + break; + case 'c': + case 'C': + strcat(bitstring,HEX_C); + break; + case 'd': + case 'D': + strcat(bitstring,HEX_D); + break; + case 'e': + case 'E': + strcat(bitstring,HEX_E); + break; + case 'f': + case 'F': + strcat(bitstring,HEX_F); + break; + case 'x': + case 'X': + strcat(bitstring,HEX_X); + break; + } + len++; + } + + strcpy( yylval.str, bitstring ); + return( BITSTR ); + } +{integer} { + yylval.lng = atol(yytext); + return( LONG ); + } +{boolean} { + if ((yytext[0] == 't') || (yytext[0] == 'T')) + yylval.log = 1; + else + yylval.log = 0; + return( BOOLEAN ); + } +{real} { + yylval.dbl = atof(yytext); + return( DOUBLE ); + } +{constant} { + if( !strcasecmp(yytext,"#PI") ) { + yylval.dbl = (double)(4) * atan((double)(1)); + return( DOUBLE ); + } else if( !strcasecmp(yytext,"#E") ) { + yylval.dbl = exp((double)(1)); + return( DOUBLE ); + } else if( !strcasecmp(yytext,"#DEG") ) { + yylval.dbl = ((double)4)*atan((double)1)/((double)180); + return( DOUBLE ); + } else if( !strcasecmp(yytext,"#ROW") ) { + return( ROWREF ); + } else if( !strcasecmp(yytext,"#NULL") ) { + return( NULLREF ); + } else if( !strcasecmp(yytext,"#SNULL") ) { + return( SNULLREF ); + } else { + int len; + if (yytext[1] == '$') { + len = strlen(yytext) - 3; + yylval.str[0] = '#'; + strncpy(yylval.str+1,&yytext[2],len); + yylval.str[len+1] = '\0'; + yytext = yylval.str; + } + return( (*gParse.getData)(yytext, &yylval) ); + } + } +{string} { + int len; + len = strlen(yytext) - 2; + strncpy(yylval.str,&yytext[1],len); + yylval.str[len] = '\0'; + return( STRING ); + } +{variable} { + int len,type; + + if (yytext[0] == '$') { + len = strlen(yytext) - 2; + strncpy(yylval.str,&yytext[1],len); + yylval.str[len] = '\0'; + yytext = yylval.str; + } + type = yyGetVariable(yytext, &yylval); + return( type ); + } +{function} { + char *fname; + int len=0; + fname = &yylval.str[0]; + while( (fname[len]=toupper(yytext[len])) ) len++; + + if( FSTRCMP(fname,"BOX(")==0 + || FSTRCMP(fname,"CIRCLE(")==0 + || FSTRCMP(fname,"ELLIPSE(")==0 + || FSTRCMP(fname,"NEAR(")==0 + || FSTRCMP(fname,"ISNULL(")==0 + ) + /* Return type is always boolean */ + return( BFUNCTION ); + + else if( FSTRCMP(fname,"GTIFILTER(")==0 ) + return( GTIFILTER ); + + else if( FSTRCMP(fname,"REGFILTER(")==0 ) + return( REGFILTER ); + + else + return( FUNCTION ); + } +{intcast} { return( INTCAST ); } +{fltcast} { return( FLTCAST ); } +{power} { return( POWER ); } +{not} { return( NOT ); } +{or} { return( OR ); } +{and} { return( AND ); } +{equal} { return( EQ ); } +{not_equal} { return( NE ); } +{greater} { return( GT ); } +{lesser} { return( LT ); } +{greater_eq} { return( GTE ); } +{lesser_eq} { return( LTE ); } +{nl} { return( '\n' ); } +. { return( yytext[0] ); } +%% + +int yywrap() +{ + /* MJT -- 13 June 1996 + Supplied for compatibility with + pre-2.5.1 versions of flex which + do not recognize %option noyywrap + */ + return(1); +} + +/* + expr_read is lifted from old ftools.skel. + Now we can use any version of flex with + no .skel file necessary! MJT - 13 June 1996 + + keep a memory of how many bytes have been + read previously, so that an unlimited-sized + buffer can be supported. PDW - 28 Feb 1998 +*/ + +static int expr_read(char *buf, int nbytes) +{ + int n; + + n = 0; + if( !gParse.is_eobuf ) { + do { + buf[n++] = gParse.expr[gParse.index++]; + } while ((nlng = varNum; + } + return( type ); +} + +static int find_variable(char *varName) +{ + int i; + + if( gParse.nCols ) + for( i=0; i c2) return(1); + if (c1 == 0) return(0); + s1++; + s2++; + } +} + +int strncasecmp(const char *s1, const char *s2, size_t n) +{ + char c1, c2; + + for (; n-- ;) { + c1 = toupper( *s1 ); + c2 = toupper( *s2 ); + + if (c1 < c2) return(-1); + if (c1 > c2) return(1); + if (c1 == 0) return(0); + s1++; + s2++; + } + return(0); +} + +#endif diff --git a/software/cfitsio3040/eval.y b/software/cfitsio3040/eval.y new file mode 100644 index 000000000..a117901c1 --- /dev/null +++ b/software/cfitsio3040/eval.y @@ -0,0 +1,5572 @@ +%{ +/************************************************************************/ +/* */ +/* CFITSIO Lexical Parser */ +/* */ +/* This file is one of 3 files containing code which parses an */ +/* arithmetic expression and evaluates it in the context of an input */ +/* FITS file table extension. The CFITSIO lexical parser is divided */ +/* into the following 3 parts/files: the CFITSIO "front-end", */ +/* eval_f.c, contains the interface between the user/CFITSIO and the */ +/* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ +/* input string and parses it into tokens and identifies the FITS */ +/* information required to evaluate the expression (ie, keywords and */ +/* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ +/* receives the FLEX output and determines and performs the actual */ +/* operations. The files eval_l.c and eval_y.c are produced from */ +/* running flex and bison on the files eval.l and eval.y, respectively. */ +/* (flex and bison are available from any GNU archive: see www.gnu.org) */ +/* */ +/* The grammar rules, rather than evaluating the expression in situ, */ +/* builds a tree, or Nodal, structure mapping out the order of */ +/* operations and expression dependencies. This "compilation" process */ +/* allows for much faster processing of multiple rows. This technique */ +/* was developed by Uwe Lammers of the XMM Science Analysis System, */ +/* although the CFITSIO implementation is entirely code original. */ +/* */ +/* */ +/* Modification History: */ +/* */ +/* Kent Blackburn c1992 Original parser code developed for the */ +/* FTOOLS software package, in particular, */ +/* the fselect task. */ +/* Kent Blackburn c1995 BIT column support added */ +/* Peter D Wilson Feb 1998 Vector column support added */ +/* Peter D Wilson May 1998 Ported to CFITSIO library. User */ +/* interface routines written, in essence */ +/* making fselect, fcalc, and maketime */ +/* capabilities available to all tools */ +/* via single function calls. */ +/* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ +/* create a run-time evaluation tree, */ +/* inspired by the work of Uwe Lammers, */ +/* resulting in a speed increase of */ +/* 10-100 times. */ +/* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ +/* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ +/* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ +/* allowing a purely vector-based usage */ +/* Craig B Markwardt Jun 2004 Add MEDIAN() function */ +/* Craig B Markwardt Jun 2004 Add SUM(), and MIN/MAX() for bit arrays */ +/* Craig B Markwardt Jun 2004 Allow subscripting of nX bit arrays */ +/* Craig B Markwardt Jun 2004 Implement statistical functions */ +/* NVALID(), AVERAGE(), and STDDEV() */ +/* for integer and floating point vectors */ +/* Craig B Markwardt Jun 2004 Use NULL values for range errors instead*/ +/* of throwing a parse error */ +/* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */ +/* Craig B Markwardt Feb 2005 Add ANGSEP() function */ +/* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/ +/* functions now accept vector arguments */ +/* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */ +/* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/ +/* determine the output dimensions */ +/* */ +/************************************************************************/ + +#define APPROX 1.0e-7 +#include "eval_defs.h" +#include "region.h" +#include + +#include + +#ifndef alloca +#define alloca malloc +#endif + + /* Shrink the initial stack depth to keep local data <32K (mac limit) */ + /* yacc will allocate more space if needed, though. */ +#define YYINITDEPTH 100 + +/***************************************************************/ +/* Replace Bison's BACKUP macro with one that fixes a bug -- */ +/* must update state after popping the stack -- and allows */ +/* popping multiple terms at one time. */ +/***************************************************************/ + +#define YYNEWBACKUP(token, value) \ + do \ + if (yychar == YYEMPTY ) \ + { yychar = (token); \ + memcpy( &yylval, &(value), sizeof(value) ); \ + yychar1 = YYTRANSLATE (yychar); \ + while (yylen--) YYPOPSTACK; \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ + while (0) + +/***************************************************************/ +/* Useful macros for accessing/testing Nodes */ +/***************************************************************/ + +#define TEST(a) if( (a)<0 ) YYERROR +#define SIZE(a) gParse.Nodes[ a ].value.nelem +#define TYPE(a) gParse.Nodes[ a ].type +#define PROMOTE(a,b) if( TYPE(a) > TYPE(b) ) \ + b = New_Unary( TYPE(a), 0, b ); \ + else if( TYPE(a) < TYPE(b) ) \ + a = New_Unary( TYPE(b), 0, a ); + +/***** Internal functions *****/ + +#ifdef __cplusplus +extern "C" { +#endif + +static int Alloc_Node ( void ); +static void Free_Last_Node( void ); +static void Evaluate_Node ( int thisNode ); + +static int New_Const ( int returnType, void *value, long len ); +static int New_Column( int ColNum ); +static int New_Offset( int ColNum, int offset ); +static int New_Unary ( int returnType, int Op, int Node1 ); +static int New_BinOp ( int returnType, int Node1, int Op, int Node2 ); +static int New_Func ( int returnType, funcOp Op, int nNodes, + int Node1, int Node2, int Node3, int Node4, + int Node5, int Node6, int Node7 ); +static int New_Deref ( int Var, int nDim, + int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ); +static int New_GTI ( char *fname, int Node1, char *start, char *stop ); +static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames ); +static int New_Vector( int subNode ); +static int Close_Vec ( int vecNode ); +static int Locate_Col( Node *this ); +static int Test_Dims ( int Node1, int Node2 ); +static void Copy_Dims ( int Node1, int Node2 ); + +static void Allocate_Ptrs( Node *this ); +static void Do_Unary ( Node *this ); +static void Do_Offset ( Node *this ); +static void Do_BinOp_bit ( Node *this ); +static void Do_BinOp_str ( Node *this ); +static void Do_BinOp_log ( Node *this ); +static void Do_BinOp_lng ( Node *this ); +static void Do_BinOp_dbl ( Node *this ); +static void Do_Func ( Node *this ); +static void Do_Deref ( Node *this ); +static void Do_GTI ( Node *this ); +static void Do_REG ( Node *this ); +static void Do_Vector ( Node *this ); + +static long Search_GTI ( double evtTime, long nGTI, double *start, + double *stop, int ordered ); + +static char saobox (double xcen, double ycen, double xwid, double ywid, + double rot, double xcol, double ycol); +static char ellipse(double xcen, double ycen, double xrad, double yrad, + double rot, double xcol, double ycol); +static char circle (double xcen, double ycen, double rad, + double xcol, double ycol); +static char bnear (double x, double y, double tolerance); +static char bitcmp (char *bitstrm1, char *bitstrm2); +static char bitlgte(char *bits1, int oper, char *bits2); + +static void bitand(char *result, char *bitstrm1, char *bitstrm2); +static void bitor (char *result, char *bitstrm1, char *bitstrm2); +static void bitnot(char *result, char *bits); + +static void yyerror(char *msg); + +#ifdef __cplusplus + } +#endif + +%} + +%union { + int Node; /* Index of Node */ + double dbl; /* real value */ + long lng; /* integer value */ + char log; /* logical value */ + char str[256]; /* string value */ +} + +%token BOOLEAN /* First 3 must be in order of */ +%token LONG /* increasing promotion for later use */ +%token DOUBLE +%token STRING +%token BITSTR +%token FUNCTION +%token BFUNCTION +%token GTIFILTER +%token REGFILTER +%token COLUMN +%token BCOLUMN +%token SCOLUMN +%token BITCOL +%token ROWREF +%token NULLREF +%token SNULLREF + +%type expr +%type bexpr +%type sexpr +%type bits +%type vector +%type bvector + +%left ',' '=' ':' '{' '}' +%right '?' +%left OR +%left AND +%left EQ NE '~' +%left GT LT LTE GTE +%left '+' '-' '%' +%left '*' '/' +%left '|' '&' +%right POWER +%left NOT +%left INTCAST FLTCAST +%left UMINUS +%left '[' + +%right ACCUM DIFF + +%% + +lines: /* nothing ; was | lines line */ + | lines line + ; + +line: '\n' {} + | expr '\n' + { if( $1<0 ) { + yyerror("Couldn't build node structure: out of memory?"); + YYERROR; } + gParse.resultNode = $1; + } + | bexpr '\n' + { if( $1<0 ) { + yyerror("Couldn't build node structure: out of memory?"); + YYERROR; } + gParse.resultNode = $1; + } + | sexpr '\n' + { if( $1<0 ) { + yyerror("Couldn't build node structure: out of memory?"); + YYERROR; } + gParse.resultNode = $1; + } + | bits '\n' + { if( $1<0 ) { + yyerror("Couldn't build node structure: out of memory?"); + YYERROR; } + gParse.resultNode = $1; + } + | error '\n' { yyerrok; } + ; + +bvector: '{' bexpr + { $$ = New_Vector( $2 ); TEST($$); } + | bvector ',' bexpr + { + if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { + $1 = Close_Vec( $1 ); TEST($1); + $$ = New_Vector( $1 ); TEST($$); + } else { + $$ = $1; + } + gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] + = $3; + } + ; + +vector: '{' expr + { $$ = New_Vector( $2 ); TEST($$); } + | vector ',' expr + { + if( TYPE($1) < TYPE($3) ) + TYPE($1) = TYPE($3); + if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { + $1 = Close_Vec( $1 ); TEST($1); + $$ = New_Vector( $1 ); TEST($$); + } else { + $$ = $1; + } + gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] + = $3; + } + | vector ',' bexpr + { + if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { + $1 = Close_Vec( $1 ); TEST($1); + $$ = New_Vector( $1 ); TEST($$); + } else { + $$ = $1; + } + gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] + = $3; + } + | bvector ',' expr + { + TYPE($1) = TYPE($3); + if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { + $1 = Close_Vec( $1 ); TEST($1); + $$ = New_Vector( $1 ); TEST($$); + } else { + $$ = $1; + } + gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] + = $3; + } + ; + +expr: vector '}' + { $$ = Close_Vec( $1 ); TEST($$); } + ; + +bexpr: bvector '}' + { $$ = Close_Vec( $1 ); TEST($$); } + ; + +bits: BITSTR + { + $$ = New_Const( BITSTR, $1, strlen($1)+1 ); TEST($$); + SIZE($$) = strlen($1); + } + | BITCOL + { $$ = New_Column( $1 ); TEST($$); } + | BITCOL '{' expr '}' + { + if( TYPE($3) != LONG + || gParse.Nodes[$3].operation != CONST_OP ) { + yyerror("Offset argument must be a constant integer"); + YYERROR; + } + $$ = New_Offset( $1, $3 ); TEST($$); + } + | bits '&' bits + { $$ = New_BinOp( BITSTR, $1, '&', $3 ); TEST($$); + SIZE($$) = ( SIZE($1)>SIZE($3) ? SIZE($1) : SIZE($3) ); } + | bits '|' bits + { $$ = New_BinOp( BITSTR, $1, '|', $3 ); TEST($$); + SIZE($$) = ( SIZE($1)>SIZE($3) ? SIZE($1) : SIZE($3) ); } + | bits '+' bits + { $$ = New_BinOp( BITSTR, $1, '+', $3 ); TEST($$); + SIZE($$) = SIZE($1) + SIZE($3); } + | bits '[' expr ']' + { $$ = New_Deref( $1, 1, $3, 0, 0, 0, 0 ); TEST($$); } + | bits '[' expr ',' expr ']' + { $$ = New_Deref( $1, 2, $3, $5, 0, 0, 0 ); TEST($$); } + | bits '[' expr ',' expr ',' expr ']' + { $$ = New_Deref( $1, 3, $3, $5, $7, 0, 0 ); TEST($$); } + | bits '[' expr ',' expr ',' expr ',' expr ']' + { $$ = New_Deref( $1, 4, $3, $5, $7, $9, 0 ); TEST($$); } + | bits '[' expr ',' expr ',' expr ',' expr ',' expr ']' + { $$ = New_Deref( $1, 5, $3, $5, $7, $9, $11 ); TEST($$); } + | NOT bits + { $$ = New_Unary( BITSTR, NOT, $2 ); TEST($$); } + + | '(' bits ')' + { $$ = $2; } + ; + +expr: LONG + { $$ = New_Const( LONG, &($1), sizeof(long) ); TEST($$); } + | DOUBLE + { $$ = New_Const( DOUBLE, &($1), sizeof(double) ); TEST($$); } + | COLUMN + { $$ = New_Column( $1 ); TEST($$); } + | COLUMN '{' expr '}' + { + if( TYPE($3) != LONG + || gParse.Nodes[$3].operation != CONST_OP ) { + yyerror("Offset argument must be a constant integer"); + YYERROR; + } + $$ = New_Offset( $1, $3 ); TEST($$); + } + | ROWREF + { $$ = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } + | NULLREF + { $$ = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } + | expr '%' expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '%', $3 ); + TEST($$); } + | expr '+' expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '+', $3 ); + TEST($$); } + | expr '-' expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '-', $3 ); + TEST($$); } + | expr '*' expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '*', $3 ); + TEST($$); } + | expr '/' expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '/', $3 ); + TEST($$); } + | expr POWER expr + { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, POWER, $3 ); + TEST($$); } + | '+' expr %prec UMINUS + { $$ = $2; } + | '-' expr %prec UMINUS + { $$ = New_Unary( TYPE($2), UMINUS, $2 ); TEST($$); } + | '(' expr ')' + { $$ = $2; } + | expr '*' bexpr + { $3 = New_Unary( TYPE($1), 0, $3 ); + $$ = New_BinOp( TYPE($1), $1, '*', $3 ); + TEST($$); } + | bexpr '*' expr + { $1 = New_Unary( TYPE($3), 0, $1 ); + $$ = New_BinOp( TYPE($3), $1, '*', $3 ); + TEST($$); } + | bexpr '?' expr ':' expr + { + PROMOTE($3,$5); + if( ! Test_Dims($3,$5) ) { + yyerror("Incompatible dimensions in '?:' arguments"); + YYERROR; + } + $$ = New_Func( 0, ifthenelse_fct, 3, $3, $5, $1, + 0, 0, 0, 0 ); + TEST($$); + if( SIZE($3)=SIZE($4) && Test_Dims( $2, $4 ) ) { + PROMOTE($2,$4); + $$ = New_Func( 0, defnull_fct, 2, $2, $4, 0, + 0, 0, 0, 0 ); + TEST($$); + } else { + yyerror("Dimensions of DEFNULL arguments " + "are not compatible"); + YYERROR; + } + } else if (FSTRCMP($1,"ARCTAN2(") == 0) { + if( TYPE($2) != DOUBLE ) $2 = New_Unary( DOUBLE, 0, $2 ); + if( TYPE($4) != DOUBLE ) $4 = New_Unary( DOUBLE, 0, $4 ); + if( Test_Dims( $2, $4 ) ) { + $$ = New_Func( 0, atan2_fct, 2, $2, $4, 0, 0, 0, 0, 0 ); + TEST($$); + if( SIZE($2)=SIZE($4) && Test_Dims( $2, $4 ) ) { + $$ = New_Func( 0, defnull_fct, 2, $2, $4, 0, + 0, 0, 0, 0 ); + TEST($$); + } else { + yyerror("Dimensions of DEFNULL arguments are not compatible"); + YYERROR; + } + } else { + yyerror("Boolean Function(expr,expr) not supported"); + YYERROR; + } + } + | BFUNCTION expr ',' expr ',' expr ')' + { + if( TYPE($2) != DOUBLE ) $2 = New_Unary( DOUBLE, 0, $2 ); + if( TYPE($4) != DOUBLE ) $4 = New_Unary( DOUBLE, 0, $4 ); + if( TYPE($6) != DOUBLE ) $6 = New_Unary( DOUBLE, 0, $6 ); + if( ! (Test_Dims( $2, $4 ) && Test_Dims( $4, $6 ) ) ) { + yyerror("Dimensions of NEAR arguments " + "are not compatible"); + YYERROR; + } else { + if (FSTRCMP($1,"NEAR(") == 0) { + $$ = New_Func( BOOLEAN, near_fct, 3, $2, $4, $6, + 0, 0, 0, 0 ); + } else { + yyerror("Boolean Function not supported"); + YYERROR; + } + TEST($$); + + if( SIZE($$)SIZE($2) ) SIZE($$) = SIZE($4); + } + } + ; + +%% + +/*************************************************************************/ +/* Start of "New" routines which build the expression Nodal structure */ +/*************************************************************************/ + +static int Alloc_Node( void ) +{ + /* Use this for allocation to guarantee *Nodes */ + Node *newNodePtr; /* survives on failure, making it still valid */ + /* while working our way out of this error */ + + if( gParse.nNodes == gParse.nNodesAlloc ) { + if( gParse.Nodes ) { + gParse.nNodesAlloc += gParse.nNodesAlloc; + newNodePtr = (Node *)realloc( gParse.Nodes, + sizeof(Node)*gParse.nNodesAlloc ); + } else { + gParse.nNodesAlloc = 100; + newNodePtr = (Node *)malloc ( sizeof(Node)*gParse.nNodesAlloc ); + } + + if( newNodePtr ) { + gParse.Nodes = newNodePtr; + } else { + gParse.status = MEMORY_ALLOCATION; + return( -1 ); + } + } + + return ( gParse.nNodes++ ); +} + +static void Free_Last_Node( void ) +{ + if( gParse.nNodes ) gParse.nNodes--; +} + +static int New_Const( int returnType, void *value, long len ) +{ + Node *this; + int n; + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = CONST_OP; /* Flag a constant */ + this->DoOp = NULL; + this->nSubNodes = 0; + this->type = returnType; + memcpy( &(this->value.data), value, len ); + this->value.undef = NULL; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } + return(n); +} + +static int New_Column( int ColNum ) +{ + Node *this; + int n, i; + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = -ColNum; + this->DoOp = NULL; + this->nSubNodes = 0; + this->type = gParse.varData[ColNum].type; + this->value.nelem = gParse.varData[ColNum].nelem; + this->value.naxis = gParse.varData[ColNum].naxis; + for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; + } + return(n); +} + +static int New_Offset( int ColNum, int offsetNode ) +{ + Node *this; + int n, i, colNode; + + colNode = New_Column( ColNum ); + if( colNode<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = '{'; + this->DoOp = Do_Offset; + this->nSubNodes = 2; + this->SubNodes[0] = colNode; + this->SubNodes[1] = offsetNode; + this->type = gParse.varData[ColNum].type; + this->value.nelem = gParse.varData[ColNum].nelem; + this->value.naxis = gParse.varData[ColNum].naxis; + for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; + } + return(n); +} + +static int New_Unary( int returnType, int Op, int Node1 ) +{ + Node *this, *that; + int i,n; + + if( Node1<0 ) return(-1); + that = gParse.Nodes + Node1; + + if( !Op ) Op = returnType; + + if( (Op==DOUBLE || Op==FLTCAST) && that->type==DOUBLE ) return( Node1 ); + if( (Op==LONG || Op==INTCAST) && that->type==LONG ) return( Node1 ); + if( (Op==BOOLEAN ) && that->type==BOOLEAN ) return( Node1 ); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = Op; + this->DoOp = Do_Unary; + this->nSubNodes = 1; + this->SubNodes[0] = Node1; + this->type = returnType; + + that = gParse.Nodes + Node1; /* Reset in case .Nodes mv'd */ + this->value.nelem = that->value.nelem; + this->value.naxis = that->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that->value.naxes[i]; + + if( that->operation==CONST_OP ) this->DoOp( this ); + } + return( n ); +} + +static int New_BinOp( int returnType, int Node1, int Op, int Node2 ) +{ + Node *this,*that1,*that2; + int n,i,constant; + + if( Node1<0 || Node2<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = Op; + this->nSubNodes = 2; + this->SubNodes[0]= Node1; + this->SubNodes[1]= Node2; + this->type = returnType; + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + constant = (that1->operation==CONST_OP + && that2->operation==CONST_OP); + if( that1->type!=STRING && that1->type!=BITSTR ) + if( !Test_Dims( Node1, Node2 ) ) { + Free_Last_Node(); + yyerror("Array sizes/dims do not match for binary operator"); + return(-1); + } + if( that1->value.nelem == 1 ) that1 = that2; + + this->value.nelem = that1->value.nelem; + this->value.naxis = that1->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that1->value.naxes[i]; + + if ( Op == ACCUM && that1->type == BITSTR ) { + /* ACCUM is rank-reducing on bit strings */ + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } + + /* Both subnodes should be of same time */ + switch( that1->type ) { + case BITSTR: this->DoOp = Do_BinOp_bit; break; + case STRING: this->DoOp = Do_BinOp_str; break; + case BOOLEAN: this->DoOp = Do_BinOp_log; break; + case LONG: this->DoOp = Do_BinOp_lng; break; + case DOUBLE: this->DoOp = Do_BinOp_dbl; break; + } + if( constant ) this->DoOp( this ); + } + return( n ); +} + +static int New_Func( int returnType, funcOp Op, int nNodes, + int Node1, int Node2, int Node3, int Node4, + int Node5, int Node6, int Node7 ) +/* If returnType==0 , use Node1's type and vector sizes as returnType, */ +/* else return a single value of type returnType */ +{ + Node *this, *that; + int i,n,constant; + + if( Node1<0 || Node2<0 || Node3<0 || Node4<0 || + Node5<0 || Node6<0 || Node7<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = (int)Op; + this->DoOp = Do_Func; + this->nSubNodes = nNodes; + this->SubNodes[0] = Node1; + this->SubNodes[1] = Node2; + this->SubNodes[2] = Node3; + this->SubNodes[3] = Node4; + this->SubNodes[4] = Node5; + this->SubNodes[5] = Node6; + this->SubNodes[6] = Node7; + i = constant = nNodes; /* Functions with zero params are not const */ + if (Op == poirnd_fct) constant = 0; /* Nor is Poisson deviate */ + + while( i-- ) + constant = ( constant && + gParse.Nodes[ this->SubNodes[i] ].operation==CONST_OP ); + + if( returnType ) { + this->type = returnType; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } else { + that = gParse.Nodes + Node1; + this->type = that->type; + this->value.nelem = that->value.nelem; + this->value.naxis = that->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that->value.naxes[i]; + } + if( constant ) this->DoOp( this ); + } + return( n ); +} + +static int New_Deref( int Var, int nDim, + int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ) +{ + int n, idx, constant; + long elem=0; + Node *this, *theVar, *theDim[MAXDIMS]; + + if( Var<0 || Dim1<0 || Dim2<0 || Dim3<0 || Dim4<0 || Dim5<0 ) return(-1); + + theVar = gParse.Nodes + Var; + if( theVar->operation==CONST_OP || theVar->value.nelem==1 ) { + yyerror("Cannot index a scalar value"); + return(-1); + } + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->nSubNodes = nDim+1; + theVar = gParse.Nodes + (this->SubNodes[0]=Var); + theDim[0] = gParse.Nodes + (this->SubNodes[1]=Dim1); + theDim[1] = gParse.Nodes + (this->SubNodes[2]=Dim2); + theDim[2] = gParse.Nodes + (this->SubNodes[3]=Dim3); + theDim[3] = gParse.Nodes + (this->SubNodes[4]=Dim4); + theDim[4] = gParse.Nodes + (this->SubNodes[5]=Dim5); + constant = theVar->operation==CONST_OP; + for( idx=0; idxoperation==CONST_OP); + + for( idx=0; idxvalue.nelem>1 ) { + Free_Last_Node(); + yyerror("Cannot use an array as an index value"); + return(-1); + } else if( theDim[idx]->type!=LONG ) { + Free_Last_Node(); + yyerror("Index value must be an integer type"); + return(-1); + } + + this->operation = '['; + this->DoOp = Do_Deref; + this->type = theVar->type; + + if( theVar->value.naxis == nDim ) { /* All dimensions specified */ + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } else if( nDim==1 ) { /* Dereference only one dimension */ + elem=1; + this->value.naxis = theVar->value.naxis-1; + for( idx=0; idxvalue.naxis; idx++ ) { + elem *= ( this->value.naxes[idx] = theVar->value.naxes[idx] ); + } + this->value.nelem = elem; + } else { + Free_Last_Node(); + yyerror("Must specify just one or all indices for vector"); + return(-1); + } + if( constant ) this->DoOp( this ); + } + return(n); +} + +extern int yyGetVariable( char *varName, YYSTYPE *varVal ); + +static int New_GTI( char *fname, int Node1, char *start, char *stop ) +{ + fitsfile *fptr; + Node *this, *that0, *that1; + int type,i,n, startCol, stopCol, Node0; + int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat; + char extname[100]; + long nrows; + double timeZeroI[2], timeZeroF[2], dt, timeSpan; + char xcol[20], xexpr[20]; + YYSTYPE colVal; + + if( Node1==-99 ) { + type = yyGetVariable( "TIME", &colVal ); + if( type==COLUMN ) { + Node1 = New_Column( (int)colVal.lng ); + } else { + yyerror("Could not build TIME column for GTIFILTER"); + return(-1); + } + } + Node1 = New_Unary( DOUBLE, 0, Node1 ); + Node0 = Alloc_Node(); /* This will hold the START/STOP times */ + if( Node1<0 || Node0<0 ) return(-1); + + /* Record current HDU number in case we need to move within this file */ + + fptr = gParse.def_fptr; + ffghdn( fptr, &evthdu ); + + /* Look for TIMEZERO keywords in current extension */ + + tstat = 0; + if( ffgkyd( fptr, "TIMEZERO", timeZeroI, NULL, &tstat ) ) { + tstat = 0; + if( ffgkyd( fptr, "TIMEZERI", timeZeroI, NULL, &tstat ) ) { + timeZeroI[0] = timeZeroF[0] = 0.0; + } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF, NULL, &tstat ) ) { + timeZeroF[0] = 0.0; + } + } else { + timeZeroF[0] = 0.0; + } + + /* Resolve filename parameter */ + + switch( fname[0] ) { + case '\0': + samefile = 1; + hdunum = 1; + break; + case '[': + samefile = 1; + i = 1; + while( fname[i] != '\0' && fname[i] != ']' ) i++; + if( fname[i] ) { + fname[i] = '\0'; + fname++; + ffexts( fname, &hdunum, extname, &extvers, &movetotype, + xcol, xexpr, &gParse.status ); + if( *extname ) { + ffmnhd( fptr, movetotype, extname, extvers, &gParse.status ); + ffghdn( fptr, &hdunum ); + } else if( hdunum ) { + ffmahd( fptr, ++hdunum, &hdutype, &gParse.status ); + } else if( !gParse.status ) { + yyerror("Cannot use primary array for GTI filter"); + return( -1 ); + } + } else { + yyerror("File extension specifier lacks closing ']'"); + return( -1 ); + } + break; + case '+': + samefile = 1; + hdunum = atoi( fname ) + 1; + if( hdunum>1 ) + ffmahd( fptr, hdunum, &hdutype, &gParse.status ); + else { + yyerror("Cannot use primary array for GTI filter"); + return( -1 ); + } + break; + default: + samefile = 0; + if( ! ffopen( &fptr, fname, READONLY, &gParse.status ) ) + ffghdn( fptr, &hdunum ); + break; + } + if( gParse.status ) return(-1); + + /* If at primary, search for GTI extension */ + + if( hdunum==1 ) { + while( 1 ) { + hdunum++; + if( ffmahd( fptr, hdunum, &hdutype, &gParse.status ) ) break; + if( hdutype==IMAGE_HDU ) continue; + tstat = 0; + if( ffgkys( fptr, "EXTNAME", extname, NULL, &tstat ) ) continue; + ffupch( extname ); + if( strstr( extname, "GTI" ) ) break; + } + if( gParse.status ) { + if( gParse.status==END_OF_FILE ) + yyerror("GTI extension not found in this file"); + return(-1); + } + } + + /* Locate START/STOP Columns */ + + ffgcno( fptr, CASEINSEN, start, &startCol, &gParse.status ); + ffgcno( fptr, CASEINSEN, stop, &stopCol, &gParse.status ); + if( gParse.status ) return(-1); + + /* Look for TIMEZERO keywords in GTI extension */ + + tstat = 0; + if( ffgkyd( fptr, "TIMEZERO", timeZeroI+1, NULL, &tstat ) ) { + tstat = 0; + if( ffgkyd( fptr, "TIMEZERI", timeZeroI+1, NULL, &tstat ) ) { + timeZeroI[1] = timeZeroF[1] = 0.0; + } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) { + timeZeroF[1] = 0.0; + } + } else { + timeZeroF[1] = 0.0; + } + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + this->nSubNodes = 2; + this->SubNodes[1] = Node1; + this->operation = (int)gtifilt_fct; + this->DoOp = Do_GTI; + this->type = BOOLEAN; + that1 = gParse.Nodes + Node1; + this->value.nelem = that1->value.nelem; + this->value.naxis = that1->value.naxis; + for( i=0; i < that1->value.naxis; i++ ) + this->value.naxes[i] = that1->value.naxes[i]; + + /* Init START/STOP node to be treated as a "constant" */ + + this->SubNodes[0] = Node0; + that0 = gParse.Nodes + Node0; + that0->operation = CONST_OP; + that0->DoOp = NULL; + that0->value.data.ptr= NULL; + + /* Read in START/STOP times */ + + if( ffgkyj( fptr, "NAXIS2", &nrows, NULL, &gParse.status ) ) + return(-1); + that0->value.nelem = nrows; + if( nrows ) { + + that0->value.data.dblptr = (double*)malloc( 2*nrows*sizeof(double) ); + if( !that0->value.data.dblptr ) { + gParse.status = MEMORY_ALLOCATION; + return(-1); + } + + ffgcvd( fptr, startCol, 1L, 1L, nrows, 0.0, + that0->value.data.dblptr, &i, &gParse.status ); + ffgcvd( fptr, stopCol, 1L, 1L, nrows, 0.0, + that0->value.data.dblptr+nrows, &i, &gParse.status ); + if( gParse.status ) { + free( that0->value.data.dblptr ); + return(-1); + } + + /* Test for fully time-ordered GTI... both START && STOP */ + + that0->type = 1; /* Assume yes */ + i = nrows; + while( --i ) + if( that0->value.data.dblptr[i-1] + >= that0->value.data.dblptr[i] + || that0->value.data.dblptr[i-1+nrows] + >= that0->value.data.dblptr[i+nrows] ) { + that0->type = 0; + break; + } + + /* Handle TIMEZERO offset, if any */ + + dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]); + timeSpan = that0->value.data.dblptr[nrows+nrows-1] + - that0->value.data.dblptr[0]; + + if( fabs( dt / timeSpan ) > 1e-12 ) { + for( i=0; i<(nrows+nrows); i++ ) + that0->value.data.dblptr[i] += dt; + } + } + if( gParse.Nodes[Node1].operation==CONST_OP ) + this->DoOp( this ); + } + + if( samefile ) + ffmahd( fptr, evthdu, &hdutype, &gParse.status ); + else + ffclos( fptr, &gParse.status ); + + return( n ); +} + +static int New_REG( char *fname, int NodeX, int NodeY, char *colNames ) +{ + Node *this, *that0; + int type, n, Node0; + int Xcol, Ycol, tstat; + WCSdata wcs; + SAORegion *Rgn; + char *cX, *cY; + YYSTYPE colVal; + + if( NodeX==-99 ) { + type = yyGetVariable( "X", &colVal ); + if( type==COLUMN ) { + NodeX = New_Column( (int)colVal.lng ); + } else { + yyerror("Could not build X column for REGFILTER"); + return(-1); + } + } + if( NodeY==-99 ) { + type = yyGetVariable( "Y", &colVal ); + if( type==COLUMN ) { + NodeY = New_Column( (int)colVal.lng ); + } else { + yyerror("Could not build Y column for REGFILTER"); + return(-1); + } + } + NodeX = New_Unary( DOUBLE, 0, NodeX ); + NodeY = New_Unary( DOUBLE, 0, NodeY ); + Node0 = Alloc_Node(); /* This will hold the Region Data */ + if( NodeX<0 || NodeY<0 || Node0<0 ) return(-1); + + if( ! (Test_Dims( NodeX, NodeY ) ) ) { + yyerror("Dimensions of REGFILTER arguments are not compatible"); + return (-1); + } + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + this->nSubNodes = 3; + this->SubNodes[0] = Node0; + this->SubNodes[1] = NodeX; + this->SubNodes[2] = NodeY; + this->operation = (int)regfilt_fct; + this->DoOp = Do_REG; + this->type = BOOLEAN; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + + Copy_Dims(n, NodeX); + if( SIZE(NodeX)operation = CONST_OP; + that0->DoOp = NULL; + + /* Identify what columns to use for WCS information */ + + Xcol = Ycol = 0; + if( *colNames ) { + /* Use the column names in this string for WCS info */ + while( *colNames==' ' ) colNames++; + cX = cY = colNames; + while( *cY && *cY!=' ' && *cY!=',' ) cY++; + if( *cY ) + *(cY++) = '\0'; + while( *cY==' ' ) cY++; + if( !*cY ) { + yyerror("Could not extract valid pair of column names from REGFILTER"); + Free_Last_Node(); + return( -1 ); + } + fits_get_colnum( gParse.def_fptr, CASEINSEN, cX, &Xcol, + &gParse.status ); + fits_get_colnum( gParse.def_fptr, CASEINSEN, cY, &Ycol, + &gParse.status ); + if( gParse.status ) { + yyerror("Could not locate columns indicated for WCS info"); + Free_Last_Node(); + return( -1 ); + } + + } else { + /* Try to find columns used in X/Y expressions */ + Xcol = Locate_Col( gParse.Nodes + NodeX ); + Ycol = Locate_Col( gParse.Nodes + NodeY ); + if( Xcol<0 || Ycol<0 ) { + yyerror("Found multiple X/Y column references in REGFILTER"); + Free_Last_Node(); + return( -1 ); + } + } + + /* Now, get the WCS info, if it exists, from the indicated columns */ + wcs.exists = 0; + if( Xcol>0 && Ycol>0 ) { + tstat = 0; + ffgtcs( gParse.def_fptr, Xcol, Ycol, + &wcs.xrefval, &wcs.yrefval, + &wcs.xrefpix, &wcs.yrefpix, + &wcs.xinc, &wcs.yinc, + &wcs.rot, wcs.type, + &tstat ); + if( tstat==NO_WCS_KEY ) { + wcs.exists = 0; + } else if( tstat ) { + gParse.status = tstat; + Free_Last_Node(); + return( -1 ); + } else { + wcs.exists = 1; + } + } + + /* Read in Region file */ + + fits_read_rgnfile( fname, &wcs, &Rgn, &gParse.status ); + if( gParse.status ) { + Free_Last_Node(); + return( -1 ); + } + + that0->value.data.ptr = Rgn; + + if( gParse.Nodes[NodeX].operation==CONST_OP + && gParse.Nodes[NodeY].operation==CONST_OP ) + this->DoOp( this ); + } + + return( n ); +} + +static int New_Vector( int subNode ) +{ + Node *this, *that; + int n; + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + that = gParse.Nodes + subNode; + this->type = that->type; + this->nSubNodes = 1; + this->SubNodes[0] = subNode; + this->operation = '{'; + this->DoOp = Do_Vector; + } + + return( n ); +} + +static int Close_Vec( int vecNode ) +{ + Node *this; + int n, nelem=0; + + this = gParse.Nodes + vecNode; + for( n=0; n < this->nSubNodes; n++ ) { + if( TYPE( this->SubNodes[n] ) != this->type ) { + this->SubNodes[n] = New_Unary( this->type, 0, this->SubNodes[n] ); + if( this->SubNodes[n]<0 ) return(-1); + } + nelem += SIZE(this->SubNodes[n]); + } + this->value.naxis = 1; + this->value.nelem = nelem; + this->value.naxes[0] = nelem; + + return( vecNode ); +} + +static int Locate_Col( Node *this ) +/* Locate the TABLE column number of any columns in "this" calculation. */ +/* Return ZERO if none found, or negative if more than 1 found. */ +{ + Node *that; + int i, col=0, newCol, nfound=0; + + if( this->nSubNodes==0 + && this->operation<=0 && this->operation!=CONST_OP ) + return gParse.colData[ - this->operation].colnum; + + for( i=0; inSubNodes; i++ ) { + that = gParse.Nodes + this->SubNodes[i]; + if( that->operation>0 ) { + newCol = Locate_Col( that ); + if( newCol<=0 ) { + nfound += -newCol; + } else { + if( !nfound ) { + col = newCol; + nfound++; + } else if( col != newCol ) { + nfound++; + } + } + } else if( that->operation!=CONST_OP ) { + /* Found a Column */ + newCol = gParse.colData[- that->operation].colnum; + if( !nfound ) { + col = newCol; + nfound++; + } else if( col != newCol ) { + nfound++; + } + } + } + if( nfound!=1 ) + return( - nfound ); + else + return( col ); +} + +static int Test_Dims( int Node1, int Node2 ) +{ + Node *that1, *that2; + int valid, i; + + if( Node1<0 || Node2<0 ) return(0); + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + + if( that1->value.nelem==1 || that2->value.nelem==1 ) + valid = 1; + else if( that1->type==that2->type + && that1->value.nelem==that2->value.nelem + && that1->value.naxis==that2->value.naxis ) { + valid = 1; + for( i=0; ivalue.naxis; i++ ) { + if( that1->value.naxes[i]!=that2->value.naxes[i] ) + valid = 0; + } + } else + valid = 0; + return( valid ); +} + +static void Copy_Dims( int Node1, int Node2 ) +{ + Node *that1, *that2; + int i; + + if( Node1<0 || Node2<0 ) return; + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + + that1->value.nelem = that2->value.nelem; + that1->value.naxis = that2->value.naxis; + for( i=0; ivalue.naxis; i++ ) + that1->value.naxes[i] = that2->value.naxes[i]; +} + +/********************************************************************/ +/* Routines for actually evaluating the expression start here */ +/********************************************************************/ + +void Evaluate_Parser( long firstRow, long nRows ) + /***********************************************************************/ + /* Reset the parser for processing another batch of data... */ + /* firstRow: Row number of the first element to evaluate */ + /* nRows: Number of rows to be processed */ + /* Initialize each COLUMN node so that its UNDEF and DATA pointers */ + /* point to the appropriate column arrays. */ + /* Finally, call Evaluate_Node for final node. */ + /***********************************************************************/ +{ + int i, column; + long offset, rowOffset; + + gParse.firstRow = firstRow; + gParse.nRows = nRows; + + /* Reset Column Nodes' pointers to point to right data and UNDEF arrays */ + + rowOffset = firstRow - gParse.firstDataRow; + for( i=0; i 0 + || gParse.Nodes[i].operation == CONST_OP ) continue; + + column = -gParse.Nodes[i].operation; + offset = gParse.varData[column].nelem * rowOffset; + + gParse.Nodes[i].value.undef = gParse.varData[column].undef + offset; + + switch( gParse.Nodes[i].type ) { + case BITSTR: + gParse.Nodes[i].value.data.strptr = + (char**)gParse.varData[column].data + rowOffset; + gParse.Nodes[i].value.undef = NULL; + break; + case STRING: + gParse.Nodes[i].value.data.strptr = + (char**)gParse.varData[column].data + rowOffset; + gParse.Nodes[i].value.undef = gParse.varData[column].undef + rowOffset; + break; + case BOOLEAN: + gParse.Nodes[i].value.data.logptr = + (char*)gParse.varData[column].data + offset; + break; + case LONG: + gParse.Nodes[i].value.data.lngptr = + (long*)gParse.varData[column].data + offset; + break; + case DOUBLE: + gParse.Nodes[i].value.data.dblptr = + (double*)gParse.varData[column].data + offset; + break; + } + } + + Evaluate_Node( gParse.resultNode ); +} + +static void Evaluate_Node( int thisNode ) + /**********************************************************************/ + /* Recursively evaluate thisNode's subNodes, then call one of the */ + /* Do_ functions pointed to by thisNode's DoOp element. */ + /**********************************************************************/ +{ + Node *this; + int i; + + if( gParse.status ) return; + + this = gParse.Nodes + thisNode; + if( this->operation>0 ) { /* <=0 indicate constants and columns */ + i = this->nSubNodes; + while( i-- ) { + Evaluate_Node( this->SubNodes[i] ); + if( gParse.status ) return; + } + this->DoOp( this ); + } +} + +static void Allocate_Ptrs( Node *this ) +{ + long elem, row, size; + + if( this->type==BITSTR || this->type==STRING ) { + + this->value.data.strptr = (char**)malloc( gParse.nRows + * sizeof(char*) ); + if( this->value.data.strptr ) { + this->value.data.strptr[0] = (char*)malloc( gParse.nRows + * (this->value.nelem+2) + * sizeof(char) ); + if( this->value.data.strptr[0] ) { + row = 0; + while( (++row)value.data.strptr[row] = + this->value.data.strptr[row-1] + this->value.nelem+1; + } + if( this->type==STRING ) { + this->value.undef = this->value.data.strptr[row-1] + + this->value.nelem+1; + } else { + this->value.undef = NULL; /* BITSTRs don't use undef array */ + } + } else { + gParse.status = MEMORY_ALLOCATION; + free( this->value.data.strptr ); + } + } else { + gParse.status = MEMORY_ALLOCATION; + } + + } else { + + elem = this->value.nelem * gParse.nRows; + switch( this->type ) { + case DOUBLE: size = sizeof( double ); break; + case LONG: size = sizeof( long ); break; + case BOOLEAN: size = sizeof( char ); break; + default: size = 1; break; + } + + this->value.data.ptr = calloc(size+1, elem); + + if( this->value.data.ptr==NULL ) { + gParse.status = MEMORY_ALLOCATION; + } else { + this->value.undef = (char *)this->value.data.ptr + elem*size; + } + } +} + +static void Do_Unary( Node *this ) +{ + Node *that; + long elem; + + that = gParse.Nodes + this->SubNodes[0]; + + if( that->operation==CONST_OP ) { /* Operating on a constant! */ + switch( this->operation ) { + case DOUBLE: + case FLTCAST: + if( that->type==LONG ) + this->value.data.dbl = (double)that->value.data.lng; + else if( that->type==BOOLEAN ) + this->value.data.dbl = ( that->value.data.log ? 1.0 : 0.0 ); + break; + case LONG: + case INTCAST: + if( that->type==DOUBLE ) + this->value.data.lng = (long)that->value.data.dbl; + else if( that->type==BOOLEAN ) + this->value.data.lng = ( that->value.data.log ? 1L : 0L ); + break; + case BOOLEAN: + if( that->type==DOUBLE ) + this->value.data.log = ( that->value.data.dbl != 0.0 ); + else if( that->type==LONG ) + this->value.data.log = ( that->value.data.lng != 0L ); + break; + case UMINUS: + if( that->type==DOUBLE ) + this->value.data.dbl = - that->value.data.dbl; + else if( that->type==LONG ) + this->value.data.lng = - that->value.data.lng; + break; + case NOT: + if( that->type==BOOLEAN ) + this->value.data.log = ( ! that->value.data.log ); + else if( that->type==BITSTR ) + bitnot( this->value.data.str, that->value.data.str ); + break; + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if( this->type!=BITSTR ) { + elem = gParse.nRows; + if( this->type!=STRING ) + elem *= this->value.nelem; + while( elem-- ) + this->value.undef[elem] = that->value.undef[elem]; + } + + elem = gParse.nRows * this->value.nelem; + + switch( this->operation ) { + + case BOOLEAN: + if( that->type==DOUBLE ) + while( elem-- ) + this->value.data.logptr[elem] = + ( that->value.data.dblptr[elem] != 0.0 ); + else if( that->type==LONG ) + while( elem-- ) + this->value.data.logptr[elem] = + ( that->value.data.lngptr[elem] != 0L ); + break; + + case DOUBLE: + case FLTCAST: + if( that->type==LONG ) + while( elem-- ) + this->value.data.dblptr[elem] = + (double)that->value.data.lngptr[elem]; + else if( that->type==BOOLEAN ) + while( elem-- ) + this->value.data.dblptr[elem] = + ( that->value.data.logptr[elem] ? 1.0 : 0.0 ); + break; + + case LONG: + case INTCAST: + if( that->type==DOUBLE ) + while( elem-- ) + this->value.data.lngptr[elem] = + (long)that->value.data.dblptr[elem]; + else if( that->type==BOOLEAN ) + while( elem-- ) + this->value.data.lngptr[elem] = + ( that->value.data.logptr[elem] ? 1L : 0L ); + break; + + case UMINUS: + if( that->type==DOUBLE ) { + while( elem-- ) + this->value.data.dblptr[elem] = + - that->value.data.dblptr[elem]; + } else if( that->type==LONG ) { + while( elem-- ) + this->value.data.lngptr[elem] = + - that->value.data.lngptr[elem]; + } + break; + + case NOT: + if( that->type==BOOLEAN ) { + while( elem-- ) + this->value.data.logptr[elem] = + ( ! that->value.data.logptr[elem] ); + } else if( that->type==BITSTR ) { + elem = gParse.nRows; + while( elem-- ) + bitnot( this->value.data.strptr[elem], + that->value.data.strptr[elem] ); + } + break; + } + } + } + + if( that->operation>0 ) { + free( that->value.data.ptr ); + } +} + +static void Do_Offset( Node *this ) +{ + Node *col; + long fRow, nRowOverlap, nRowReload, rowOffset; + long nelem, elem, offset, nRealElem; + int status; + + col = gParse.Nodes + this->SubNodes[0]; + rowOffset = gParse.Nodes[ this->SubNodes[1] ].value.data.lng; + + Allocate_Ptrs( this ); + + fRow = gParse.firstRow + rowOffset; + if( this->type==STRING || this->type==BITSTR ) + nRealElem = 1; + else + nRealElem = this->value.nelem; + + nelem = nRealElem; + + if( fRow < gParse.firstDataRow ) { + + /* Must fill in data at start of array */ + + nRowReload = gParse.firstDataRow - fRow; + if( nRowReload > gParse.nRows ) nRowReload = gParse.nRows; + nRowOverlap = gParse.nRows - nRowReload; + + offset = 0; + + /* NULLify any values falling out of bounds */ + + while( fRow<1 && nRowReload>0 ) { + if( this->type == BITSTR ) { + nelem = this->value.nelem; + this->value.data.strptr[offset][ nelem ] = '\0'; + while( nelem-- ) this->value.data.strptr[offset][nelem] = '0'; + offset++; + } else { + while( nelem-- ) + this->value.undef[offset++] = 1; + } + nelem = nRealElem; + fRow++; + nRowReload--; + } + + } else if( fRow + gParse.nRows > gParse.firstDataRow + gParse.nDataRows ) { + + /* Must fill in data at end of array */ + + nRowReload = (fRow+gParse.nRows) - (gParse.firstDataRow+gParse.nDataRows); + if( nRowReload>gParse.nRows ) { + nRowReload = gParse.nRows; + } else { + fRow = gParse.firstDataRow + gParse.nDataRows; + } + nRowOverlap = gParse.nRows - nRowReload; + + offset = nRowOverlap * nelem; + + /* NULLify any values falling out of bounds */ + + elem = gParse.nRows * nelem; + while( fRow+nRowReload>gParse.totalRows && nRowReload>0 ) { + if( this->type == BITSTR ) { + nelem = this->value.nelem; + elem--; + this->value.data.strptr[elem][ nelem ] = '\0'; + while( nelem-- ) this->value.data.strptr[elem][nelem] = '0'; + } else { + while( nelem-- ) + this->value.undef[--elem] = 1; + } + nelem = nRealElem; + nRowReload--; + } + + } else { + + nRowReload = 0; + nRowOverlap = gParse.nRows; + offset = 0; + + } + + if( nRowReload>0 ) { + switch( this->type ) { + case BITSTR: + case STRING: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.strptr+offset, + this->value.undef+offset ); + break; + case BOOLEAN: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.logptr+offset, + this->value.undef+offset ); + break; + case LONG: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.lngptr+offset, + this->value.undef+offset ); + break; + case DOUBLE: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.dblptr+offset, + this->value.undef+offset ); + break; + } + } + + /* Now copy over the overlapping region, if any */ + + if( nRowOverlap <= 0 ) return; + + if( rowOffset>0 ) + elem = nRowOverlap * nelem; + else + elem = gParse.nRows * nelem; + + offset = nelem * rowOffset; + while( nRowOverlap-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + if( this->type != BITSTR ) + this->value.undef[elem] = col->value.undef[elem+offset]; + switch( this->type ) { + case BITSTR: + strcpy( this->value.data.strptr[elem ], + col->value.data.strptr[elem+offset] ); + break; + case STRING: + strcpy( this->value.data.strptr[elem ], + col->value.data.strptr[elem+offset] ); + break; + case BOOLEAN: + this->value.data.logptr[elem] = col->value.data.logptr[elem+offset]; + break; + case LONG: + this->value.data.lngptr[elem] = col->value.data.lngptr[elem+offset]; + break; + case DOUBLE: + this->value.data.dblptr[elem] = col->value.data.dblptr[elem+offset]; + break; + } + } + nelem = nRealElem; + } +} + +static void Do_BinOp_bit( Node *this ) +{ + Node *that1, *that2; + char *sptr1=NULL, *sptr2=NULL; + int const1, const2; + long rows; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + const1 = ( that1->operation==CONST_OP ); + const2 = ( that2->operation==CONST_OP ); + sptr1 = ( const1 ? that1->value.data.str : NULL ); + sptr2 = ( const2 ? that2->value.data.str : NULL ); + + if( const1 && const2 ) { + switch( this->operation ) { + case NE: + this->value.data.log = !bitcmp( sptr1, sptr2 ); + break; + case EQ: + this->value.data.log = bitcmp( sptr1, sptr2 ); + break; + case GT: + case LT: + case LTE: + case GTE: + this->value.data.log = bitlgte( sptr1, this->operation, sptr2 ); + break; + case '|': + bitor( this->value.data.str, sptr1, sptr2 ); + break; + case '&': + bitand( this->value.data.str, sptr1, sptr2 ); + break; + case '+': + strcpy( this->value.data.str, sptr1 ); + strcat( this->value.data.str, sptr2 ); + break; + case ACCUM: + this->value.data.lng = 0; + while( *sptr1 ) { + if ( *sptr1 == '1' ) this->value.data.lng ++; + sptr1 ++; + } + break; + + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + rows = gParse.nRows; + switch( this->operation ) { + + /* BITSTR comparisons */ + + case NE: + case EQ: + case GT: + case LT: + case LTE: + case GTE: + while( rows-- ) { + if( !const1 ) + sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) + sptr2 = that2->value.data.strptr[rows]; + switch( this->operation ) { + case NE: this->value.data.logptr[rows] = + !bitcmp( sptr1, sptr2 ); + break; + case EQ: this->value.data.logptr[rows] = + bitcmp( sptr1, sptr2 ); + break; + case GT: + case LT: + case LTE: + case GTE: this->value.data.logptr[rows] = + bitlgte( sptr1, this->operation, sptr2 ); + break; + } + this->value.undef[rows] = 0; + } + break; + + /* BITSTR AND/ORs ... no UNDEFS in or out */ + + case '|': + case '&': + case '+': + while( rows-- ) { + if( !const1 ) + sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) + sptr2 = that2->value.data.strptr[rows]; + if( this->operation=='|' ) + bitor( this->value.data.strptr[rows], sptr1, sptr2 ); + else if( this->operation=='&' ) + bitand( this->value.data.strptr[rows], sptr1, sptr2 ); + else { + strcpy( this->value.data.strptr[rows], sptr1 ); + strcat( this->value.data.strptr[rows], sptr2 ); + } + } + break; + + /* Accumulate 1 bits */ + case ACCUM: + { + long i, previous, curr; + + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.data.strptr[i]; + for (curr = 0; *sptr1; sptr1 ++) { + if ( *sptr1 == '1' ) curr ++; + } + previous += curr; + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.strptr[0] ); + free( that1->value.data.strptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.strptr[0] ); + free( that2->value.data.strptr ); + } +} + +static void Do_BinOp_str( Node *this ) +{ + Node *that1, *that2; + char *sptr1, *sptr2, null1=0, null2=0; + int const1, const2, val; + long rows; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + const1 = ( that1->operation==CONST_OP ); + const2 = ( that2->operation==CONST_OP ); + sptr1 = ( const1 ? that1->value.data.str : NULL ); + sptr2 = ( const2 ? that2->value.data.str : NULL ); + + if( const1 && const2 ) { /* Result is a constant */ + switch( this->operation ) { + + /* Compare Strings */ + + case NE: + case EQ: + val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); + this->value.data.log = ( this->operation==EQ ? val : !val ); + break; + case GT: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) > 0 ); + break; + case LT: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) < 0 ); + break; + case GTE: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) >= 0 ); + break; + case LTE: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) <= 0 ); + break; + + /* Concat Strings */ + + case '+': + strcpy( this->value.data.str, sptr1 ); + strcat( this->value.data.str, sptr2 ); + break; + } + this->operation = CONST_OP; + + } else { /* Not a constant */ + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + rows = gParse.nRows; + switch( this->operation ) { + + /* Compare Strings */ + + case NE: + case EQ: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); + this->value.data.logptr[rows] = + ( this->operation==EQ ? val : !val ); + } + } + break; + + case GT: + case LT: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) ); + this->value.data.logptr[rows] = + ( this->operation==GT ? val>0 : val<0 ); + } + } + break; + + case GTE: + case LTE: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) ); + this->value.data.logptr[rows] = + ( this->operation==GTE ? val>=0 : val<=0 ); + } + } + break; + + /* Concat Strings */ + + case '+': + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + strcpy( this->value.data.strptr[rows], sptr1 ); + strcat( this->value.data.strptr[rows], sptr2 ); + } + } + break; + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.strptr[0] ); + free( that1->value.data.strptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.strptr[0] ); + free( that2->value.data.strptr ); + } +} + +static void Do_BinOp_log( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + char val1=0, val2=0, null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.log; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.log; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + switch( this->operation ) { + case OR: + this->value.data.log = (val1 || val2); + break; + case AND: + this->value.data.log = (val1 && val2); + break; + case EQ: + this->value.data.log = ( (val1 && val2) || (!val1 && !val2) ); + break; + case NE: + this->value.data.log = ( (val1 && !val2) || (!val1 && val2) ); + break; + case ACCUM: + this->value.data.lng = val1; + break; + } + this->operation=CONST_OP; + } else if (this->operation == ACCUM) { + long i, previous, curr; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.logptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + + } else { + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if (this->operation == ACCUM) { + long i, previous, curr; + + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.logptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + + while( rows-- ) { + while( nelem-- ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.logptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.logptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.logptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.logptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + + case OR: + /* This is more complicated than others to suppress UNDEFs */ + /* in those cases where the other argument is DEF && TRUE */ + + if( !null1 && !null2 ) { + this->value.data.logptr[elem] = (val1 || val2); + } else if( (null1 && !null2 && val2) + || ( !null1 && null2 && val1 ) ) { + this->value.data.logptr[elem] = 1; + this->value.undef[elem] = 0; + } + break; + + case AND: + /* This is more complicated than others to suppress UNDEFs */ + /* in those cases where the other argument is DEF && FALSE */ + + if( !null1 && !null2 ) { + this->value.data.logptr[elem] = (val1 && val2); + } else if( (null1 && !null2 && !val2) + || ( !null1 && null2 && !val1 ) ) { + this->value.data.logptr[elem] = 0; + this->value.undef[elem] = 0; + } + break; + + case EQ: + this->value.data.logptr[elem] = + ( (val1 && val2) || (!val1 && !val2) ); + break; + + case NE: + this->value.data.logptr[elem] = + ( (val1 && !val2) || (!val1 && val2) ); + break; + } + } + nelem = this->value.nelem; + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +static void Do_BinOp_lng( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + long val1=0, val2=0; + char null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.lng; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.lng; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + + switch( this->operation ) { + case '~': /* Treat as == for LONGS */ + case EQ: this->value.data.log = (val1 == val2); break; + case NE: this->value.data.log = (val1 != val2); break; + case GT: this->value.data.log = (val1 > val2); break; + case LT: this->value.data.log = (val1 < val2); break; + case LTE: this->value.data.log = (val1 <= val2); break; + case GTE: this->value.data.log = (val1 >= val2); break; + + case '+': this->value.data.lng = (val1 + val2); break; + case '-': this->value.data.lng = (val1 - val2); break; + case '*': this->value.data.lng = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.lng = (val1 % val2); + else yyerror("Divide by Zero"); + break; + case '/': + if( val2 ) this->value.data.lng = (val1 / val2); + else yyerror("Divide by Zero"); + break; + case POWER: + this->value.data.lng = (long)pow((double)val1,(double)val2); + break; + case ACCUM: + this->value.data.lng = val1; + break; + case DIFF: + this->value.data.lng = 0; + break; + } + this->operation=CONST_OP; + + } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { + long i, previous, curr; + long undef; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.lng; + undef = (long) that2->value.undef; + + if (this->operation == ACCUM) { + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.lngptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + } else { + /* Sequential difference for this chunk */ + for (i=0; ivalue.data.lngptr[i]; + if (that1->value.undef[i] || undef) { + /* Either this, or previous, value was undefined */ + this->value.data.lngptr[i] = 0; + this->value.undef[i] = 1; + } else { + /* Both defined, we are okay! */ + this->value.data.lngptr[i] = curr - previous; + this->value.undef[i] = 0; + } + + previous = curr; + undef = that1->value.undef[i]; + } + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ + } + + } else { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + while( rows-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.lngptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.lngptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.lngptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.lngptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + case '~': /* Treat as == for LONGS */ + case EQ: this->value.data.logptr[elem] = (val1 == val2); break; + case NE: this->value.data.logptr[elem] = (val1 != val2); break; + case GT: this->value.data.logptr[elem] = (val1 > val2); break; + case LT: this->value.data.logptr[elem] = (val1 < val2); break; + case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; + case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; + + case '+': this->value.data.lngptr[elem] = (val1 + val2); break; + case '-': this->value.data.lngptr[elem] = (val1 - val2); break; + case '*': this->value.data.lngptr[elem] = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.lngptr[elem] = (val1 % val2); + else { + this->value.data.lngptr[elem] = 0; + this->value.undef[elem] = 1; + } + break; + case '/': + if( val2 ) this->value.data.lngptr[elem] = (val1 / val2); + else { + this->value.data.lngptr[elem] = 0; + this->value.undef[elem] = 1; + } + break; + case POWER: + this->value.data.lngptr[elem] = (long)pow((double)val1,(double)val2); + break; + } + } + nelem = this->value.nelem; + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +static void Do_BinOp_dbl( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + double val1=0.0, val2=0.0; + char null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.dbl; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.dbl; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + + switch( this->operation ) { + case '~': this->value.data.log = ( fabs(val1-val2) < APPROX ); break; + case EQ: this->value.data.log = (val1 == val2); break; + case NE: this->value.data.log = (val1 != val2); break; + case GT: this->value.data.log = (val1 > val2); break; + case LT: this->value.data.log = (val1 < val2); break; + case LTE: this->value.data.log = (val1 <= val2); break; + case GTE: this->value.data.log = (val1 >= val2); break; + + case '+': this->value.data.dbl = (val1 + val2); break; + case '-': this->value.data.dbl = (val1 - val2); break; + case '*': this->value.data.dbl = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.dbl = val1 - val2*((int)(val1/val2)); + else yyerror("Divide by Zero"); + break; + case '/': + if( val2 ) this->value.data.dbl = (val1 / val2); + else yyerror("Divide by Zero"); + break; + case POWER: + this->value.data.dbl = (double)pow(val1,val2); + break; + case ACCUM: + this->value.data.dbl = val1; + break; + case DIFF: + this->value.data.dbl = 0; + break; + } + this->operation=CONST_OP; + + } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { + long i; + long undef; + double previous, curr; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.dbl; + undef = (long) that2->value.undef; + + if (this->operation == ACCUM) { + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.dblptr[i]; + previous += curr; + } + this->value.data.dblptr[i] = previous; + this->value.undef[i] = 0; + } + } else { + /* Sequential difference for this chunk */ + for (i=0; ivalue.data.dblptr[i]; + if (that1->value.undef[i] || undef) { + /* Either this, or previous, value was undefined */ + this->value.data.dblptr[i] = 0; + this->value.undef[i] = 1; + } else { + /* Both defined, we are okay! */ + this->value.data.dblptr[i] = curr - previous; + this->value.undef[i] = 0; + } + + previous = curr; + undef = that1->value.undef[i]; + } + } + + /* Store final cumulant for next pass */ + that2->value.data.dbl = previous; + that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ + } + + } else { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + while( rows-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.dblptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.dblptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.dblptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.dblptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + case '~': this->value.data.logptr[elem] = + ( fabs(val1-val2) < APPROX ); break; + case EQ: this->value.data.logptr[elem] = (val1 == val2); break; + case NE: this->value.data.logptr[elem] = (val1 != val2); break; + case GT: this->value.data.logptr[elem] = (val1 > val2); break; + case LT: this->value.data.logptr[elem] = (val1 < val2); break; + case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; + case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; + + case '+': this->value.data.dblptr[elem] = (val1 + val2); break; + case '-': this->value.data.dblptr[elem] = (val1 - val2); break; + case '*': this->value.data.dblptr[elem] = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.dblptr[elem] = + val1 - val2*((int)(val1/val2)); + else { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } + break; + case '/': + if( val2 ) this->value.data.dblptr[elem] = (val1 / val2); + else { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } + break; + case POWER: + this->value.data.dblptr[elem] = (double)pow(val1,val2); + break; + } + } + nelem = this->value.nelem; + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +/* + * This Quickselect routine is based on the algorithm described in + * "Numerical recipes in C", Second Edition, + * Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 + * This code by Nicolas Devillard - 1998. Public domain. + * http://ndevilla.free.fr/median/median/src/quickselect.c + */ + +#define ELEM_SWAP(a,b) { register long t=(a);(a)=(b);(b)=t; } + +/* + * qselect_median_lng - select the median value of a long array + * + * This routine selects the median value of the long integer array + * arr[]. If there are an even number of elements, the "lower median" + * is selected. + * + * The array arr[] is scrambled, so users must operate on a scratch + * array if they wish the values to be preserved. + * + * long arr[] - array of values + * int n - number of elements in arr + * + * RETURNS: the lower median value of arr[] + * + */ +long qselect_median_lng(long arr[], int n) +{ + int low, high ; + int median; + int middle, ll, hh; + + low = 0 ; high = n-1 ; median = (low + high) / 2; + for (;;) { + + if (high <= low) { /* One element only */ + return arr[median]; + } + + if (high == low + 1) { /* Two elements only */ + if (arr[low] > arr[high]) + ELEM_SWAP(arr[low], arr[high]) ; + return arr[median]; + } + + /* Find median of low, middle and high items; swap into position low */ + middle = (low + high) / 2; + if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; + if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; + + /* Swap low item (now in position middle) into position (low+1) */ + ELEM_SWAP(arr[middle], arr[low+1]) ; + + /* Nibble from each end towards middle, swapping items when stuck */ + ll = low + 1; + hh = high; + for (;;) { + do ll++; while (arr[low] > arr[ll]) ; + do hh--; while (arr[hh] > arr[low]) ; + + if (hh < ll) + break; + + ELEM_SWAP(arr[ll], arr[hh]) ; + } + + /* Swap middle item (in position low) back into correct position */ + ELEM_SWAP(arr[low], arr[hh]) ; + + /* Re-set active partition */ + if (hh <= median) + low = ll; + if (hh >= median) + high = hh - 1; + } +} + +#undef ELEM_SWAP + +#define ELEM_SWAP(a,b) { register double t=(a);(a)=(b);(b)=t; } + +/* + * qselect_median_dbl - select the median value of a double array + * + * This routine selects the median value of the double array + * arr[]. If there are an even number of elements, the "lower median" + * is selected. + * + * The array arr[] is scrambled, so users must operate on a scratch + * array if they wish the values to be preserved. + * + * double arr[] - array of values + * int n - number of elements in arr + * + * RETURNS: the lower median value of arr[] + * + */ +double qselect_median_dbl(double arr[], int n) +{ + int low, high ; + int median; + int middle, ll, hh; + + low = 0 ; high = n-1 ; median = (low + high) / 2; + for (;;) { + if (high <= low) { /* One element only */ + return arr[median] ; + } + + if (high == low + 1) { /* Two elements only */ + if (arr[low] > arr[high]) + ELEM_SWAP(arr[low], arr[high]) ; + return arr[median] ; + } + + /* Find median of low, middle and high items; swap into position low */ + middle = (low + high) / 2; + if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; + if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; + + /* Swap low item (now in position middle) into position (low+1) */ + ELEM_SWAP(arr[middle], arr[low+1]) ; + + /* Nibble from each end towards middle, swapping items when stuck */ + ll = low + 1; + hh = high; + for (;;) { + do ll++; while (arr[low] > arr[ll]) ; + do hh--; while (arr[hh] > arr[low]) ; + + if (hh < ll) + break; + + ELEM_SWAP(arr[ll], arr[hh]) ; + } + + /* Swap middle item (in position low) back into correct position */ + ELEM_SWAP(arr[low], arr[hh]) ; + + /* Re-set active partition */ + if (hh <= median) + low = ll; + if (hh >= median) + high = hh - 1; + } +} + +#undef ELEM_SWAP + +/* + * angsep_calc - compute angular separation between celestial coordinates + * + * This routine computes the angular separation between to coordinates + * on the celestial sphere (i.e. RA and Dec). Note that all units are + * in DEGREES, unlike the other trig functions in the calculator. + * + * double ra1, dec1 - RA and Dec of the first position in degrees + * double ra2, dec2 - RA and Dec of the second position in degrees + * + * RETURNS: (double) angular separation in degrees + * + */ +double angsep_calc(double ra1, double dec1, double ra2, double dec2) +{ + double cd; + static double deg = 0; + if (deg == 0) deg = ((double)4)*atan((double)1)/((double)180); + /* deg = 1.0; **** UNCOMMENT IF YOU WANT RADIANS */ + + cd = sin(dec1*deg)*sin(dec2*deg) + + cos(dec1*deg)*cos(dec2*deg)*cos((ra1-ra2)*deg); + if (cd < (-1)) cd = -1; + if (cd > (+1)) cd = +1; + return acos(cd)/deg; +} + +static double ran1() +{ + static double dval = 0.0; + double rndVal; + + if (dval == 0.0) { + if( rand()<32768 && rand()<32768 ) + dval = 32768.0; + else + dval = 2147483648.0; + } + + rndVal = (double)rand(); + while( rndVal > dval ) dval *= 2.0; + return rndVal/dval; +} + +/* Gaussian deviate routine from Numerical Recipes */ +static double gasdev() +{ + static int iset = 0; + static double gset; + double fac, rsq, v1, v2; + + if (iset == 0) { + do { + v1 = 2.0*ran1()-1.0; + v2 = 2.0*ran1()-1.0; + rsq = v1*v1 + v2*v2; + } while (rsq >= 1.0 || rsq == 0.0); + fac = sqrt(-2.0*log(rsq)/rsq); + gset = v1*fac; + iset = 1; + return v2*fac; + } else { + iset = 0; + return gset; + } + +} + +/* lgamma function - from Numerical Recipes */ + +float gammaln(float xx) + /* Returns the value ln Gamma[(xx)] for xx > 0. */ +{ + /* + Internal arithmetic will be done in double precision, a nicety + that you can omit if five-figure accuracy is good enough. */ + double x,y,tmp,ser; + static double cof[6]={76.18009172947146,-86.50532032941677, + 24.01409824083091,-1.231739572450155, + 0.1208650973866179e-2,-0.5395239384953e-5}; + int j; + y=x=xx; + tmp=x+5.5; + tmp -= (x+0.5)*log(tmp); + ser=1.000000000190015; + for (j=0;j<=5;j++) ser += cof[j]/++y; + return (float) -tmp+log(2.5066282746310005*ser/x); +} + +/* Poisson deviate - derived from Numerical Recipes */ +static long poidev(double xm) +{ + static double sq, alxm, g, oldm = -1.0; + static double pi = 0; + double em, t, y; + + if (pi == 0) pi = ((double)4)*atan((double)1); + + if (xm < 20.0) { + if (xm != oldm) { + oldm = xm; + g = exp(-xm); + } + em = -1; + t = 1.0; + do { + em += 1; + t *= ran1(); + } while (t > g); + } else { + if (xm != oldm) { + oldm = xm; + sq = sqrt(2.0*xm); + alxm = log(xm); + g = xm*alxm-gammaln( (float) (xm+1.0)); + } + do { + do { + y = tan(pi*ran1()); + em = sq*y+xm; + } while (em < 0.0); + em = floor(em); + t = 0.9*(1.0+y*y)*exp(em*alxm-gammaln( (float) (em+1.0) )-g); + } while (ran1() > t); + } + + /* Return integer version */ + return (long int) floor(em+0.5); +} + +static void Do_Func( Node *this ) +{ + Node *theParams[MAXSUBS]; + int vector[MAXSUBS], allConst; + lval pVals[MAXSUBS]; + char pNull[MAXSUBS]; + long ival; + double dval; + int i, valInit; + long row, elem, nelem; + + i = this->nSubNodes; + allConst = 1; + while( i-- ) { + theParams[i] = gParse.Nodes + this->SubNodes[i]; + vector[i] = ( theParams[i]->operation!=CONST_OP ); + if( vector[i] ) { + allConst = 0; + vector[i] = theParams[i]->value.nelem; + } else { + if( theParams[i]->type==DOUBLE ) { + pVals[i].data.dbl = theParams[i]->value.data.dbl; + } else if( theParams[i]->type==LONG ) { + pVals[i].data.lng = theParams[i]->value.data.lng; + } else if( theParams[i]->type==BOOLEAN ) { + pVals[i].data.log = theParams[i]->value.data.log; + } else + strcpy(pVals[i].data.str, theParams[i]->value.data.str); + pNull[i] = 0; + } + } + + if( this->nSubNodes==0 ) allConst = 0; /* These do produce scalars */ + if( this->operation == poirnd_fct ) allConst = 0; + if( this->operation == gasrnd_fct ) allConst = 0; + if( this->operation == rnd_fct ) allConst = 0; + + if( allConst ) { + + switch( this->operation ) { + + /* Non-Trig single-argument functions */ + + case sum_fct: + if( theParams[0]->type==BOOLEAN ) + this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); + else if( theParams[0]->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( theParams[0]->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( theParams[0]->type==BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case average_fct: + if( theParams[0]->type==LONG ) + this->value.data.dbl = pVals[0].data.lng; + else if( theParams[0]->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + break; + case stddev_fct: + this->value.data.dbl = 0; /* Standard deviation of a constant = 0 */ + break; + case median_fct: + if( theParams[0]->type==BOOLEAN ) + this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); + else if( theParams[0]->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else + this->value.data.dbl = pVals[0].data.dbl; + break; + + case poirnd_fct: + if( theParams[0]->type==DOUBLE ) + this->value.data.lng = poidev(pVals[0].data.dbl); + else + this->value.data.lng = poidev(pVals[0].data.lng); + break; + + case abs_fct: + if( theParams[0]->type==DOUBLE ) { + dval = pVals[0].data.dbl; + this->value.data.dbl = (dval>0.0 ? dval : -dval); + } else { + ival = pVals[0].data.lng; + this->value.data.lng = (ival> 0 ? ival : -ival); + } + break; + + /* Special Null-Handling Functions */ + + case nonnull_fct: + this->value.data.lng = 1; /* Constants are always 1-element and defined */ + break; + case isnull_fct: /* Constants are always defined */ + this->value.data.log = 0; + break; + case defnull_fct: + if( this->type==BOOLEAN ) + this->value.data.log = pVals[0].data.log; + else if( this->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type==STRING ) + strcpy(this->value.data.str,pVals[0].data.str); + break; + + /* Math functions with 1 double argument */ + + case sin_fct: + this->value.data.dbl = sin( pVals[0].data.dbl ); + break; + case cos_fct: + this->value.data.dbl = cos( pVals[0].data.dbl ); + break; + case tan_fct: + this->value.data.dbl = tan( pVals[0].data.dbl ); + break; + case asin_fct: + dval = pVals[0].data.dbl; + if( dval<-1.0 || dval>1.0 ) + yyerror("Out of range argument to arcsin"); + else + this->value.data.dbl = asin( dval ); + break; + case acos_fct: + dval = pVals[0].data.dbl; + if( dval<-1.0 || dval>1.0 ) + yyerror("Out of range argument to arccos"); + else + this->value.data.dbl = acos( dval ); + break; + case atan_fct: + this->value.data.dbl = atan( pVals[0].data.dbl ); + break; + case sinh_fct: + this->value.data.dbl = sinh( pVals[0].data.dbl ); + break; + case cosh_fct: + this->value.data.dbl = cosh( pVals[0].data.dbl ); + break; + case tanh_fct: + this->value.data.dbl = tanh( pVals[0].data.dbl ); + break; + case exp_fct: + this->value.data.dbl = exp( pVals[0].data.dbl ); + break; + case log_fct: + dval = pVals[0].data.dbl; + if( dval<=0.0 ) + yyerror("Out of range argument to log"); + else + this->value.data.dbl = log( dval ); + break; + case log10_fct: + dval = pVals[0].data.dbl; + if( dval<=0.0 ) + yyerror("Out of range argument to log10"); + else + this->value.data.dbl = log10( dval ); + break; + case sqrt_fct: + dval = pVals[0].data.dbl; + if( dval<0.0 ) + yyerror("Out of range argument to sqrt"); + else + this->value.data.dbl = sqrt( dval ); + break; + case ceil_fct: + this->value.data.dbl = ceil( pVals[0].data.dbl ); + break; + case floor_fct: + this->value.data.dbl = floor( pVals[0].data.dbl ); + break; + case round_fct: + this->value.data.dbl = floor( pVals[0].data.dbl + 0.5 ); + break; + + /* Two-argument Trig Functions */ + + case atan2_fct: + this->value.data.dbl = + atan2( pVals[0].data.dbl, pVals[1].data.dbl ); + break; + + /* Four-argument ANGSEP function */ + case angsep_fct: + this->value.data.dbl = + angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl); + + /* Min/Max functions taking 1 or 2 arguments */ + + case min1_fct: + /* No constant vectors! */ + if( this->type == DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type == LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type == BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case min2_fct: + if( this->type == DOUBLE ) + this->value.data.dbl = + minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + else if( this->type == LONG ) + this->value.data.lng = + minvalue( pVals[0].data.lng, pVals[1].data.lng ); + break; + case max1_fct: + /* No constant vectors! */ + if( this->type == DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type == LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type == BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case max2_fct: + if( this->type == DOUBLE ) + this->value.data.dbl = + maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + else if( this->type == LONG ) + this->value.data.lng = + maxvalue( pVals[0].data.lng, pVals[1].data.lng ); + break; + + /* Boolean SAO region Functions... scalar or vector dbls */ + + case near_fct: + this->value.data.log = bnear( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl ); + break; + case circle_fct: + this->value.data.log = circle( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl ); + break; + case box_fct: + this->value.data.log = saobox( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + break; + case elps_fct: + this->value.data.log = + ellipse( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + break; + + /* C Conditional expression: bool ? expr : expr */ + + case ifthenelse_fct: + switch( this->type ) { + case BOOLEAN: + this->value.data.log = ( pVals[2].data.log ? + pVals[0].data.log : pVals[1].data.log ); + break; + case LONG: + this->value.data.lng = ( pVals[2].data.log ? + pVals[0].data.lng : pVals[1].data.lng ); + break; + case DOUBLE: + this->value.data.dbl = ( pVals[2].data.log ? + pVals[0].data.dbl : pVals[1].data.dbl ); + break; + case STRING: + strcpy(this->value.data.str, ( pVals[2].data.log ? + pVals[0].data.str : + pVals[1].data.str ) ); + break; + } + break; + + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + row = gParse.nRows; + elem = row * this->value.nelem; + + if( !gParse.status ) { + switch( this->operation ) { + + /* Special functions with no arguments */ + + case row_fct: + while( row-- ) { + this->value.data.lngptr[row] = gParse.firstRow + row; + this->value.undef[row] = 0; + } + break; + case null_fct: + if( this->type==LONG ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + this->value.undef[row] = 1; + } + } else if( this->type==STRING ) { + while( row-- ) { + this->value.data.strptr[row][0] = '\0'; + this->value.undef[row] = 1; + } + } + break; + case rnd_fct: + while( elem-- ) { + this->value.data.dblptr[elem] = ran1(); + this->value.undef[elem] = 0; + } + break; + + case gasrnd_fct: + while( elem-- ) { + this->value.data.dblptr[elem] = gasdev(); + this->value.undef[elem] = 0; + } + break; + + case poirnd_fct: + if( theParams[0]->type==DOUBLE ) { + if (theParams[0]->operation == CONST_OP) { + while( elem-- ) { + this->value.undef[elem] = (pVals[0].data.dbl < 0); + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = poidev(pVals[0].data.dbl); + } + } + } else { + while( elem-- ) { + this->value.undef[elem] = theParams[0]->value.undef[elem]; + if (theParams[0]->value.data.dblptr[elem] < 0) + this->value.undef[elem] = 1; + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = + poidev(theParams[0]->value.data.dblptr[elem]); + } + } /* while */ + } /* ! CONST_OP */ + } else { + /* LONG */ + if (theParams[0]->operation == CONST_OP) { + while( elem-- ) { + this->value.undef[elem] = (pVals[0].data.lng < 0); + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = poidev(pVals[0].data.lng); + } + } + } else { + while( elem-- ) { + this->value.undef[elem] = theParams[0]->value.undef[elem]; + if (theParams[0]->value.data.lngptr[elem] < 0) + this->value.undef[elem] = 1; + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = + poidev(theParams[0]->value.data.lngptr[elem]); + } + } /* while */ + } /* ! CONST_OP */ + } /* END LONG */ + break; + + + /* Non-Trig single-argument functions */ + + case sum_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==BOOLEAN ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.lngptr[row] += + ( theParams[0]->value.data.logptr[elem] ? 1 : 0 ); + this->value.undef[row] = 0; + } + } + } + } else if( theParams[0]->type==LONG ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.lngptr[row] += + theParams[0]->value.data.lngptr[elem]; + this->value.undef[row] = 0; + } + } + } + } else if( theParams[0]->type==DOUBLE ){ + while( row-- ) { + this->value.data.dblptr[row] = 0.0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.dblptr[row] += + theParams[0]->value.data.dblptr[elem]; + this->value.undef[row] = 0; + } + } + } + } else { /* BITSTR */ + nelem = theParams[0]->value.nelem; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + this->value.data.lngptr[row] = 0; + this->value.undef[row] = 0; + while (*sptr1) { + if (*sptr1 == '1') this->value.data.lngptr[row] ++; + sptr1++; + } + } + } + break; + + case average_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + while( row-- ) { + int count = 0; + this->value.data.dblptr[row] = 0; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + this->value.data.dblptr[row] += + theParams[0]->value.data.lngptr[elem]; + count ++; + } + } + if (count == 0) { + this->value.undef[row] = 1; + } else { + this->value.undef[row] = 0; + this->value.data.dblptr[row] /= count; + } + } + } else if( theParams[0]->type==DOUBLE ){ + while( row-- ) { + int count = 0; + this->value.data.dblptr[row] = 0; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + this->value.data.dblptr[row] += + theParams[0]->value.data.dblptr[elem]; + count ++; + } + } + if (count == 0) { + this->value.undef[row] = 1; + } else { + this->value.undef[row] = 0; + this->value.data.dblptr[row] /= count; + } + } + } + break; + case stddev_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + + /* Compute the mean value */ + while( row-- ) { + int count = 0; + double sum = 0, sum2 = 0; + + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + sum += theParams[0]->value.data.lngptr[elem]; + count ++; + } + } + if (count > 1) { + sum /= count; + + /* Compute the sum of squared deviations */ + nelem = theParams[0]->value.nelem; + elem += nelem; /* Reset elem for second pass */ + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + double dx = (theParams[0]->value.data.lngptr[elem] - sum); + sum2 += (dx*dx); + } + } + + sum2 /= (double)count-1; + + this->value.undef[row] = 0; + this->value.data.dblptr[row] = sqrt(sum2); + } else { + this->value.undef[row] = 0; /* STDDEV => 0 */ + this->value.data.dblptr[row] = 0; + } + } + } else if( theParams[0]->type==DOUBLE ){ + + /* Compute the mean value */ + while( row-- ) { + int count = 0; + double sum = 0, sum2 = 0; + + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + sum += theParams[0]->value.data.dblptr[elem]; + count ++; + } + } + if (count > 1) { + sum /= count; + + /* Compute the sum of squared deviations */ + nelem = theParams[0]->value.nelem; + elem += nelem; /* Reset elem for second pass */ + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + double dx = (theParams[0]->value.data.dblptr[elem] - sum); + sum2 += (dx*dx); + } + } + + sum2 /= (double)count-1; + + this->value.undef[row] = 0; + this->value.data.dblptr[row] = sqrt(sum2); + } else { + this->value.undef[row] = 0; /* STDDEV => 0 */ + this->value.data.dblptr[row] = 0; + } + } + } + break; + + case median_fct: + elem = row * theParams[0]->value.nelem; + nelem = theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + long *dptr = theParams[0]->value.data.lngptr; + char *uptr = theParams[0]->value.undef; + long *mptr = (long *) malloc(sizeof(long)*nelem); + int irow; + + /* Allocate temporary storage for this row, since the + quickselect function will scramble the contents */ + if (mptr == 0) { + yyerror("Could not allocate temporary memory in median function"); + free( this->value.data.ptr ); + break; + } + + for (irow=0; irow 0) { + this->value.undef[irow] = 0; + this->value.data.lngptr[irow] = qselect_median_lng(mptr, nelem1); + } else { + this->value.undef[irow] = 1; + this->value.data.lngptr[irow] = 0; + } + + } + + free(mptr); + } else { + double *dptr = theParams[0]->value.data.dblptr; + char *uptr = theParams[0]->value.undef; + double *mptr = (double *) malloc(sizeof(double)*nelem); + int irow; + + /* Allocate temporary storage for this row, since the + quickselect function will scramble the contents */ + if (mptr == 0) { + yyerror("Could not allocate temporary memory in median function"); + free( this->value.data.ptr ); + break; + } + + for (irow=0; irow 0) { + this->value.undef[irow] = 0; + this->value.data.dblptr[irow] = qselect_median_dbl(mptr, nelem1); + } else { + this->value.undef[irow] = 1; + this->value.data.dblptr[irow] = 0; + } + + } + free(mptr); + } + break; + case abs_fct: + if( theParams[0]->type==DOUBLE ) + while( elem-- ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = (dval>0.0 ? dval : -dval); + this->value.undef[elem] = theParams[0]->value.undef[elem]; + } + else + while( elem-- ) { + ival = theParams[0]->value.data.lngptr[elem]; + this->value.data.lngptr[elem] = (ival> 0 ? ival : -ival); + this->value.undef[elem] = theParams[0]->value.undef[elem]; + } + break; + + /* Special Null-Handling Functions */ + + case nonnull_fct: + nelem = theParams[0]->value.nelem; + if ( theParams[0]->type==STRING ) nelem = 1; + elem = row * nelem; + while( row-- ) { + int nelem1 = nelem; + + this->value.undef[row] = 0; /* Initialize to 0 (defined) */ + this->value.data.lngptr[row] = 0; + while( nelem1-- ) { + elem --; + if ( theParams[0]->value.undef[elem] == 0 ) this->value.data.lngptr[row] ++; + } + } + break; + case isnull_fct: + if( theParams[0]->type==STRING ) elem = row; + while( elem-- ) { + this->value.data.logptr[elem] = theParams[0]->value.undef[elem]; + this->value.undef[elem] = 0; + } + break; + case defnull_fct: + switch( this->type ) { + case BOOLEAN: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.log = + theParams[i]->value.data.logptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.log = + theParams[i]->value.data.logptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.logptr[elem] = pVals[1].data.log; + } else { + this->value.undef[elem] = 0; + this->value.data.logptr[elem] = pVals[0].data.log; + } + } + } + break; + case LONG: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } + } + } + break; + case DOUBLE: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } + } + } + break; + case STRING: + while( row-- ) { + i=2; while( i-- ) + if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + strcpy(pVals[i].data.str, + theParams[i]->value.data.strptr[row]); + } + if( pNull[0] ) { + this->value.undef[row] = pNull[1]; + strcpy(this->value.data.strptr[row],pVals[1].data.str); + } else { + this->value.undef[elem] = 0; + strcpy(this->value.data.strptr[row],pVals[0].data.str); + } + } + } + break; + + /* Math functions with 1 double argument */ + + case sin_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + sin( theParams[0]->value.data.dblptr[elem] ); + } + break; + case cos_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + cos( theParams[0]->value.data.dblptr[elem] ); + } + break; + case tan_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + tan( theParams[0]->value.data.dblptr[elem] ); + } + break; + case asin_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<-1.0 || dval>1.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = asin( dval ); + } + break; + case acos_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<-1.0 || dval>1.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = acos( dval ); + } + break; + case atan_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = atan( dval ); + } + break; + case sinh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + sinh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case cosh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + cosh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case tanh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + tanh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case exp_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = exp( dval ); + } + break; + case log_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<=0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = log( dval ); + } + break; + case log10_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<=0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = log10( dval ); + } + break; + case sqrt_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = sqrt( dval ); + } + break; + case ceil_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + ceil( theParams[0]->value.data.dblptr[elem] ); + } + break; + case floor_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + floor( theParams[0]->value.data.dblptr[elem] ); + } + break; + case round_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + floor( theParams[0]->value.data.dblptr[elem] + 0.5); + } + break; + + /* Two-argument Trig Functions */ + + case atan2_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1]) ) ) + this->value.data.dblptr[elem] = + atan2( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + break; + + /* Four-argument ANGSEP Function */ + + case angsep_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=4; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3]) ) ) + this->value.data.dblptr[elem] = + angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl); + } + } + break; + + + + /* Min/Max functions taking 1 or 2 arguments */ + + case min1_fct: + elem = row * theParams[0]->value.nelem; + if( this->type==LONG ) { + long minVal=0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + minVal = theParams[0]->value.data.lngptr[elem]; + } else { + minVal = minvalue( minVal, + theParams[0]->value.data.lngptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.lngptr[row] = minVal; + } + } else if( this->type==DOUBLE ) { + double minVal=0.0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + minVal = theParams[0]->value.data.dblptr[elem]; + } else { + minVal = minvalue( minVal, + theParams[0]->value.data.dblptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.dblptr[row] = minVal; + } + } else if( this->type==BITSTR ) { + char minVal; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + minVal = '1'; + while (*sptr1) { + if (*sptr1 == '0') minVal = '0'; + sptr1++; + } + this->value.data.strptr[row][0] = minVal; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } + break; + case min2_fct: + if( this->type==LONG ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.lngptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = + minvalue( pVals[0].data.lng, pVals[1].data.lng ); + } + } + } + } else if( this->type==DOUBLE ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.dblptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = + minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + } + } + break; + + case max1_fct: + elem = row * theParams[0]->value.nelem; + if( this->type==LONG ) { + long maxVal=0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + maxVal = theParams[0]->value.data.lngptr[elem]; + } else { + maxVal = maxvalue( maxVal, + theParams[0]->value.data.lngptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.lngptr[row] = maxVal; + } + } else if( this->type==DOUBLE ) { + double maxVal=0.0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + maxVal = theParams[0]->value.data.dblptr[elem]; + } else { + maxVal = maxvalue( maxVal, + theParams[0]->value.data.dblptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.dblptr[row] = maxVal; + } + } else if( this->type==BITSTR ) { + char maxVal; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + maxVal = '0'; + while (*sptr1) { + if (*sptr1 == '1') maxVal = '1'; + sptr1++; + } + this->value.data.strptr[row][0] = maxVal; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } + break; + case max2_fct: + if( this->type==LONG ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.lngptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = + maxvalue( pVals[0].data.lng, pVals[1].data.lng ); + } + } + } + } else if( this->type==DOUBLE ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.dblptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = + maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + } + } + break; + + /* Boolean SAO region Functions... scalar or vector dbls */ + + case near_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=3; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2]) ) ) + this->value.data.logptr[elem] = + bnear( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl ); + } + } + break; + + case circle_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=5; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4]) ) ) + this->value.data.logptr[elem] = + circle( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl ); + } + } + break; + + case box_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=7; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4] || pNull[5] || + pNull[6] ) ) ) + this->value.data.logptr[elem] = + saobox( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + } + } + break; + + case elps_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=7; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4] || pNull[5] || + pNull[6] ) ) ) + this->value.data.logptr[elem] = + ellipse( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + } + } + break; + + /* C Conditional expression: bool ? expr : expr */ + + case ifthenelse_fct: + switch( this->type ) { + case BOOLEAN: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.log = + theParams[i]->value.data.logptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.log = + theParams[i]->value.data.logptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.logptr[elem] = pVals[0].data.log; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.logptr[elem] = pVals[1].data.log; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case LONG: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.lngptr[elem] = pVals[0].data.lng; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.lngptr[elem] = pVals[1].data.lng; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case DOUBLE: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.dblptr[elem] = pVals[0].data.dbl; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.dblptr[elem] = pVals[1].data.dbl; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case STRING: + while( row-- ) { + if( vector[2] ) { + pVals[2].data.log = theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i] ) { + strcpy( pVals[i].data.str, + theParams[i]->value.data.strptr[row] ); + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[row] = pNull[2]) ) { + if( pVals[2].data.log ) { + strcpy( this->value.data.strptr[row], + pVals[0].data.str ); + this->value.undef[row] = pNull[0]; + } else { + strcpy( this->value.data.strptr[row], + pVals[1].data.str ); + this->value.undef[row] = pNull[1]; + } + } else { + this->value.data.strptr[row][0] = '\0'; + } + } + break; + + } + break; + + } + } + } + + i = this->nSubNodes; + while( i-- ) { + if( theParams[i]->operation>0 ) { + /* Currently only numeric params allowed */ + free( theParams[i]->value.data.ptr ); + } + } +} + +static void Do_Deref( Node *this ) +{ + Node *theVar, *theDims[MAXDIMS]; + int isConst[MAXDIMS], allConst; + long dimVals[MAXDIMS]; + int i, nDims; + long row, elem, dsize; + + theVar = gParse.Nodes + this->SubNodes[0]; + + i = nDims = this->nSubNodes-1; + allConst = 1; + while( i-- ) { + theDims[i] = gParse.Nodes + this->SubNodes[i+1]; + isConst[i] = ( theDims[i]->operation==CONST_OP ); + if( isConst[i] ) + dimVals[i] = theDims[i]->value.data.lng; + else + allConst = 0; + } + + if( this->type==DOUBLE ) { + dsize = sizeof( double ); + } else if( this->type==LONG ) { + dsize = sizeof( long ); + } else if( this->type==BOOLEAN ) { + dsize = sizeof( char ); + } else + dsize = 0; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if( allConst && theVar->value.naxis==nDims ) { + + /* Dereference completely using constant indices */ + + elem = 0; + i = nDims; + while( i-- ) { + if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; + elem = theVar->value.naxes[i]*elem + dimVals[i]-1; + } + if( i<0 ) { + for( row=0; rowtype==STRING ) + this->value.undef[row] = theVar->value.undef[row]; + else if( this->type==BITSTR ) + this->value.undef; /* Dummy - BITSTRs do not have undefs */ + else + this->value.undef[row] = theVar->value.undef[elem]; + + if( this->type==DOUBLE ) + this->value.data.dblptr[row] = + theVar->value.data.dblptr[elem]; + else if( this->type==LONG ) + this->value.data.lngptr[row] = + theVar->value.data.lngptr[elem]; + else if( this->type==BOOLEAN ) + this->value.data.logptr[row] = + theVar->value.data.logptr[elem]; + else { + /* XXX Note, the below expression uses knowledge of + the layout of the string format, namely (nelem+1) + characters per string, followed by (nelem+1) + "undef" values. */ + this->value.data.strptr[row][0] = + theVar->value.data.strptr[0][elem+row]; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + elem += theVar->value.nelem; + } + } else { + yyerror("Index out of range"); + free( this->value.data.ptr ); + } + + } else if( allConst && nDims==1 ) { + + /* Reduce dimensions by 1, using a constant index */ + + if( dimVals[0] < 1 || + dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { + yyerror("Index out of range"); + free( this->value.data.ptr ); + } else if ( this->type == BITSTR || this->type == STRING ) { + elem = this->value.nelem * (dimVals[0]-1); + for( row=0; rowvalue.undef) + this->value.undef[row] = theVar->value.undef[row]; + memcpy( (char*)this->value.data.strptr[0] + + row*sizeof(char)*(this->value.nelem+1), + (char*)theVar->value.data.strptr[0] + elem*sizeof(char), + this->value.nelem * sizeof(char) ); + /* Null terminate */ + this->value.data.strptr[row][this->value.nelem] = 0; + elem += theVar->value.nelem+1; + } + } else { + elem = this->value.nelem * (dimVals[0]-1); + for( row=0; rowvalue.undef + row*this->value.nelem, + theVar->value.undef + elem, + this->value.nelem * sizeof(char) ); + memcpy( (char*)this->value.data.ptr + + row*dsize*this->value.nelem, + (char*)theVar->value.data.ptr + elem*dsize, + this->value.nelem * dsize ); + elem += theVar->value.nelem; + } + } + + } else if( theVar->value.naxis==nDims ) { + + /* Dereference completely using an expression for the indices */ + + for( row=0; rowvalue.undef[row] ) { + yyerror("Null encountered as vector index"); + free( this->value.data.ptr ); + break; + } else + dimVals[i] = theDims[i]->value.data.lngptr[row]; + } + } + if( gParse.status ) break; + + elem = 0; + i = nDims; + while( i-- ) { + if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; + elem = theVar->value.naxes[i]*elem + dimVals[i]-1; + } + if( i<0 ) { + elem += row*theVar->value.nelem; + + if( this->type==STRING ) + this->value.undef[row] = theVar->value.undef[row]; + else if( this->type==BITSTR ) + this->value.undef; /* Dummy - BITSTRs do not have undefs */ + else + this->value.undef[row] = theVar->value.undef[elem]; + + if( this->type==DOUBLE ) + this->value.data.dblptr[row] = + theVar->value.data.dblptr[elem]; + else if( this->type==LONG ) + this->value.data.lngptr[row] = + theVar->value.data.lngptr[elem]; + else if( this->type==BOOLEAN ) + this->value.data.logptr[row] = + theVar->value.data.logptr[elem]; + else { + /* XXX Note, the below expression uses knowledge of + the layout of the string format, namely (nelem+1) + characters per string, followed by (nelem+1) + "undef" values. */ + this->value.data.strptr[row][0] = + theVar->value.data.strptr[0][elem+row]; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } else { + yyerror("Index out of range"); + free( this->value.data.ptr ); + } + } + + } else { + + /* Reduce dimensions by 1, using a nonconstant expression */ + + for( row=0; rowvalue.undef[row] ) { + yyerror("Null encountered as vector index"); + free( this->value.data.ptr ); + break; + } else + dimVals[0] = theDims[0]->value.data.lngptr[row]; + + if( dimVals[0] < 1 || + dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { + yyerror("Index out of range"); + free( this->value.data.ptr ); + } else if ( this->type == BITSTR || this->type == STRING ) { + elem = this->value.nelem * (dimVals[0]-1); + elem += row*(theVar->value.nelem+1); + if (this->value.undef) + this->value.undef[row] = theVar->value.undef[row]; + memcpy( (char*)this->value.data.strptr[0] + + row*sizeof(char)*(this->value.nelem+1), + (char*)theVar->value.data.strptr[0] + elem*sizeof(char), + this->value.nelem * sizeof(char) ); + /* Null terminate */ + this->value.data.strptr[row][this->value.nelem] = 0; + } else { + elem = this->value.nelem * (dimVals[0]-1); + elem += row*theVar->value.nelem; + memcpy( this->value.undef + row*this->value.nelem, + theVar->value.undef + elem, + this->value.nelem * sizeof(char) ); + memcpy( (char*)this->value.data.ptr + + row*dsize*this->value.nelem, + (char*)theVar->value.data.ptr + elem*dsize, + this->value.nelem * dsize ); + } + } + } + } + + if( theVar->operation>0 ) { + if (theVar->type == STRING || theVar->type == BITSTR) + free(theVar->value.data.strptr[0] ); + else + free( theVar->value.data.ptr ); + } + for( i=0; ioperation>0 ) { + free( theDims[i]->value.data.ptr ); + } +} + +static void Do_GTI( Node *this ) +{ + Node *theExpr, *theTimes; + double *start, *stop, *times; + long elem, nGTI, gti; + int ordered; + + theTimes = gParse.Nodes + this->SubNodes[0]; + theExpr = gParse.Nodes + this->SubNodes[1]; + + nGTI = theTimes->value.nelem; + start = theTimes->value.data.dblptr; + stop = theTimes->value.data.dblptr + nGTI; + ordered = theTimes->type; + + if( theExpr->operation==CONST_OP ) { + + this->value.data.log = + (Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered )>=0); + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + times = theExpr->value.data.dblptr; + if( !gParse.status ) { + + elem = gParse.nRows * this->value.nelem; + if( nGTI ) { + gti = -1; + while( elem-- ) { + if( (this->value.undef[elem] = theExpr->value.undef[elem]) ) + continue; + + /* Before searching entire GTI, check the GTI found last time */ + if( gti<0 || times[elem]stop[gti] ) { + gti = Search_GTI( times[elem], nGTI, start, stop, ordered ); + } + this->value.data.logptr[elem] = ( gti>=0 ); + } + } else + while( elem-- ) { + this->value.data.logptr[elem] = 0; + this->value.undef[elem] = 0; + } + } + } + + if( theExpr->operation>0 ) + free( theExpr->value.data.ptr ); +} + +static long Search_GTI( double evtTime, long nGTI, double *start, + double *stop, int ordered ) +{ + long gti, step; + + if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */ + /* use "FAST" Binary search algorithm */ + if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) { + gti = step = (nGTI >> 1); + while(1) { + if( step>1L ) step >>= 1; + + if( evtTime>stop[gti] ) { + if( evtTime>=start[gti+1] ) + gti += step; + else { + gti = -1L; + break; + } + } else if( evtTime=start[gti] && evtTime<=stop[gti] ) + break; + } + return( gti ); +} + +static void Do_REG( Node *this ) +{ + Node *theRegion, *theX, *theY; + double Xval=0.0, Yval=0.0; + char Xnull=0, Ynull=0; + int Xvector, Yvector; + long nelem, elem, rows; + + theRegion = gParse.Nodes + this->SubNodes[0]; + theX = gParse.Nodes + this->SubNodes[1]; + theY = gParse.Nodes + this->SubNodes[2]; + + Xvector = ( theX->operation!=CONST_OP ); + if( Xvector ) + Xvector = theX->value.nelem; + else { + Xval = theX->value.data.dbl; + } + + Yvector = ( theY->operation!=CONST_OP ); + if( Yvector ) + Yvector = theY->value.nelem; + else { + Yval = theY->value.data.dbl; + } + + if( !Xvector && !Yvector ) { + + this->value.data.log = + ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) + != 0 ); + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = rows*nelem; + + while( rows-- ) { + while( nelem-- ) { + elem--; + + if( Xvector>1 ) { + Xval = theX->value.data.dblptr[elem]; + Xnull = theX->value.undef[elem]; + } else if( Xvector ) { + Xval = theX->value.data.dblptr[rows]; + Xnull = theX->value.undef[rows]; + } + + if( Yvector>1 ) { + Yval = theY->value.data.dblptr[elem]; + Ynull = theY->value.undef[elem]; + } else if( Yvector ) { + Yval = theY->value.data.dblptr[rows]; + Ynull = theY->value.undef[rows]; + } + + this->value.undef[elem] = ( Xnull || Ynull ); + if( this->value.undef[elem] ) + continue; + + this->value.data.logptr[elem] = + ( fits_in_region( Xval, Yval, + (SAORegion *)theRegion->value.data.ptr ) + != 0 ); + } + nelem = this->value.nelem; + } + } + } + + if( theX->operation>0 ) + free( theX->value.data.ptr ); + if( theY->operation>0 ) + free( theY->value.data.ptr ); +} + +static void Do_Vector( Node *this ) +{ + Node *that; + long row, elem, idx, jdx, offset=0; + int node; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + for( node=0; nodenSubNodes; node++ ) { + + that = gParse.Nodes + this->SubNodes[node]; + + if( that->operation == CONST_OP ) { + + idx = gParse.nRows*this->value.nelem + offset; + while( (idx-=this->value.nelem)>=0 ) { + + this->value.undef[idx] = 0; + + switch( this->type ) { + case BOOLEAN: + this->value.data.logptr[idx] = that->value.data.log; + break; + case LONG: + this->value.data.lngptr[idx] = that->value.data.lng; + break; + case DOUBLE: + this->value.data.dblptr[idx] = that->value.data.dbl; + break; + } + } + + } else { + + row = gParse.nRows; + idx = row * that->value.nelem; + while( row-- ) { + elem = that->value.nelem; + jdx = row*this->value.nelem + offset; + while( elem-- ) { + this->value.undef[jdx+elem] = + that->value.undef[--idx]; + + switch( this->type ) { + case BOOLEAN: + this->value.data.logptr[jdx+elem] = + that->value.data.logptr[idx]; + break; + case LONG: + this->value.data.lngptr[jdx+elem] = + that->value.data.lngptr[idx]; + break; + case DOUBLE: + this->value.data.dblptr[jdx+elem] = + that->value.data.dblptr[idx]; + break; + } + } + } + } + offset += that->value.nelem; + } + + } + + for( node=0; node < this->nSubNodes; node++ ) + if( gParse.Nodes[this->SubNodes[node]].operation>0 ) + free( gParse.Nodes[this->SubNodes[node]].value.data.ptr ); +} + +/*****************************************************************************/ +/* Utility routines which perform the calculations on bits and SAO regions */ +/*****************************************************************************/ + +static char bitlgte(char *bits1, int oper, char *bits2) +{ + int val1, val2, nextbit; + char result; + int i, l1, l2, length, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bits1); + l2 = strlen(bits2); + if (l1 < l2) + { + length = l2; + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bits1++); + stream[i] = '\0'; + bits1 = stream; + } + else if (l2 < l1) + { + length = l1; + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bits2++); + stream[i] = '\0'; + bits2 = stream; + } + else + length = l1; + + val1 = val2 = 0; + nextbit = 1; + + while( length-- ) + { + chr1 = bits1[length]; + chr2 = bits2[length]; + if ((chr1 != 'x')&&(chr1 != 'X')&&(chr2 != 'x')&&(chr2 != 'X')) + { + if (chr1 == '1') val1 += nextbit; + if (chr2 == '1') val2 += nextbit; + nextbit *= 2; + } + } + result = 0; + switch (oper) + { + case LT: + if (val1 < val2) result = 1; + break; + case LTE: + if (val1 <= val2) result = 1; + break; + case GT: + if (val1 > val2) result = 1; + break; + case GTE: + if (val1 >= val2) result = 1; + break; + } + return (result); +} + +static void bitand(char *result,char *bitstrm1,char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while ( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ((chr1 == 'x') || (chr2 == 'x')) + *result = 'x'; + else if ((chr1 == '1') && (chr2 == '1')) + *result = '1'; + else + *result = '0'; + result++; + } + *result = '\0'; +} + +static void bitor(char *result,char *bitstrm1,char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while ( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ((chr1 == '1') || (chr2 == '1')) + *result = '1'; + else if ((chr1 == '0') || (chr2 == '0')) + *result = '0'; + else + *result = 'x'; + result++; + } + *result = '\0'; +} + +static void bitnot(char *result,char *bits) +{ + int length; + char chr; + + length = strlen(bits); + while( length-- ) { + chr = *(bits++); + *(result++) = ( chr=='1' ? '0' : ( chr=='0' ? '1' : chr ) ); + } + *result = '\0'; +} + +static char bitcmp(char *bitstrm1, char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ( ((chr1 == '0') && (chr2 == '1')) + || ((chr1 == '1') && (chr2 == '0')) ) + return( 0 ); + } + return( 1 ); +} + +static char bnear(double x, double y, double tolerance) +{ + if (fabs(x - y) < tolerance) + return ( 1 ); + else + return ( 0 ); +} + +static char saobox(double xcen, double ycen, double xwid, double ywid, + double rot, double xcol, double ycol) +{ + double x,y,xprime,yprime,xmin,xmax,ymin,ymax,theta; + + theta = (rot / 180.0) * myPI; + xprime = xcol - xcen; + yprime = ycol - ycen; + x = xprime * cos(theta) + yprime * sin(theta); + y = -xprime * sin(theta) + yprime * cos(theta); + xmin = - 0.5 * xwid; xmax = 0.5 * xwid; + ymin = - 0.5 * ywid; ymax = 0.5 * ywid; + if ((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)) + return ( 1 ); + else + return ( 0 ); +} + +static char circle(double xcen, double ycen, double rad, + double xcol, double ycol) +{ + double r2,dx,dy,dlen; + + dx = xcol - xcen; + dy = ycol - ycen; + dx *= dx; dy *= dy; + dlen = dx + dy; + r2 = rad * rad; + if (dlen <= r2) + return ( 1 ); + else + return ( 0 ); +} + +static char ellipse(double xcen, double ycen, double xrad, double yrad, + double rot, double xcol, double ycol) +{ + double x,y,xprime,yprime,dx,dy,dlen,theta; + + theta = (rot / 180.0) * myPI; + xprime = xcol - xcen; + yprime = ycol - ycen; + x = xprime * cos(theta) + yprime * sin(theta); + y = -xprime * sin(theta) + yprime * cos(theta); + dx = x / xrad; dy = y / yrad; + dx *= dx; dy *= dy; + dlen = dx + dy; + if (dlen <= 1.0) + return ( 1 ); + else + return ( 0 ); +} + +static void yyerror(char *s) +{ + char msg[80]; + + if( !gParse.status ) gParse.status = PARSE_SYNTAX_ERR; + + strncpy(msg, s, 80); + msg[79] = '\0'; + ffpmsg(msg); +} diff --git a/software/cfitsio3040/eval_defs.h b/software/cfitsio3040/eval_defs.h new file mode 100644 index 000000000..801d77ba6 --- /dev/null +++ b/software/cfitsio3040/eval_defs.h @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#if defined(__sgi) || defined(__hpux) +#include +#endif +#ifdef sparc +#include +#endif +#include "fitsio2.h" + +#ifndef FFBISON +#include "eval_tab.h" +#endif + +#define MAXDIMS 5 +#define MAXSUBS 10 +#define MAXVARNAME 80 +#define CONST_OP -1000 +#define pERROR -1 + + +typedef struct { + char name[MAXVARNAME+1]; + int type; + long nelem; + int naxis; + long naxes[MAXDIMS]; + char *undef; + void *data; + } DataInfo; + +typedef struct { + long nelem; + int naxis; + long naxes[MAXDIMS]; + char *undef; + union { + double dbl; + long lng; + char log; + char str[256]; + double *dblptr; + long *lngptr; + char *logptr; + char **strptr; + void *ptr; + } data; + } lval; + +typedef struct Node { + int operation; + void (*DoOp)(struct Node *this); + int nSubNodes; + int SubNodes[MAXSUBS]; + int type; + lval value; + } Node; + +typedef struct { + fitsfile *def_fptr; + int (*getData)( char *dataName, void *dataValue ); + int (*loadData)( int varNum, long fRow, long nRows, + void *data, char *undef ); + + int compressed; + int timeCol; + int parCol; + int valCol; + + char *expr; + int index; + int is_eobuf; + + Node *Nodes; + int nNodes; + int nNodesAlloc; + int resultNode; + + long firstRow; + long nRows; + + int nCols; + iteratorCol *colData; + DataInfo *varData; + PixelFilter *pixFilter; + + long firstDataRow; + long nDataRows; + long totalRows; + + int datatype; + int hdutype; + + int status; + } ParseData; + +typedef enum { + rnd_fct = 1001, + sum_fct, + nelem_fct, + sin_fct, + cos_fct, + tan_fct, + asin_fct, + acos_fct, + atan_fct, + sinh_fct, + cosh_fct, + tanh_fct, + exp_fct, + log_fct, + log10_fct, + sqrt_fct, + abs_fct, + atan2_fct, + ceil_fct, + floor_fct, + round_fct, + min1_fct, + min2_fct, + max1_fct, + max2_fct, + near_fct, + circle_fct, + box_fct, + elps_fct, + isnull_fct, + defnull_fct, + gtifilt_fct, + regfilt_fct, + ifthenelse_fct, + row_fct, + null_fct, + median_fct, + average_fct, + stddev_fct, + nonnull_fct, + angsep_fct, + gasrnd_fct, + poirnd_fct + } funcOp; + +extern ParseData gParse; + +#ifdef __cplusplus +extern "C" { +#endif + + int ffparse(void); + int fflex(void); + void ffrestart(FILE*); + + void Evaluate_Parser( long firstRow, long nRows ); + +#ifdef __cplusplus + } +#endif diff --git a/software/cfitsio3040/eval_f.c b/software/cfitsio3040/eval_f.c new file mode 100644 index 000000000..bb40f0e98 --- /dev/null +++ b/software/cfitsio3040/eval_f.c @@ -0,0 +1,2781 @@ +/************************************************************************/ +/* */ +/* CFITSIO Lexical Parser */ +/* */ +/* This file is one of 3 files containing code which parses an */ +/* arithmetic expression and evaluates it in the context of an input */ +/* FITS file table extension. The CFITSIO lexical parser is divided */ +/* into the following 3 parts/files: the CFITSIO "front-end", */ +/* eval_f.c, contains the interface between the user/CFITSIO and the */ +/* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ +/* input string and parses it into tokens and identifies the FITS */ +/* information required to evaluate the expression (ie, keywords and */ +/* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ +/* receives the FLEX output and determines and performs the actual */ +/* operations. The files eval_l.c and eval_y.c are produced from */ +/* running flex and bison on the files eval.l and eval.y, respectively. */ +/* (flex and bison are available from any GNU archive: see www.gnu.org) */ +/* */ +/* The grammar rules, rather than evaluating the expression in situ, */ +/* builds a tree, or Nodal, structure mapping out the order of */ +/* operations and expression dependencies. This "compilation" process */ +/* allows for much faster processing of multiple rows. This technique */ +/* was developed by Uwe Lammers of the XMM Science Analysis System, */ +/* although the CFITSIO implementation is entirely code original. */ +/* */ +/* */ +/* Modification History: */ +/* */ +/* Kent Blackburn c1992 Original parser code developed for the */ +/* FTOOLS software package, in particular, */ +/* the fselect task. */ +/* Kent Blackburn c1995 BIT column support added */ +/* Peter D Wilson Feb 1998 Vector column support added */ +/* Peter D Wilson May 1998 Ported to CFITSIO library. User */ +/* interface routines written, in essence */ +/* making fselect, fcalc, and maketime */ +/* capabilities available to all tools */ +/* via single function calls. */ +/* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ +/* create a run-time evaluation tree, */ +/* inspired by the work of Uwe Lammers, */ +/* resulting in a speed increase of */ +/* 10-100 times. */ +/* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ +/* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ +/* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ +/* allowing a purely vector-based usage */ +/* Peter D Wilson Aug 1999 Add row-offset capability */ +/* Peter D Wilson Sep 1999 Add row-range capability to ffcalc_rng */ +/* */ +/************************************************************************/ + +#include +#include +#include "eval_defs.h" +#include "region.h" + +typedef struct { + int datatype; /* Data type to cast parse results into for user */ + void *dataPtr; /* Pointer to array of results, NULL if to use iterCol */ + void *nullPtr; /* Pointer to nulval, use zero if NULL */ + long maxRows; /* Max No. of rows to process, -1=all, 0=1 iteration */ + int anyNull; /* Flag indicating at least 1 undef value encountered */ +} parseInfo; + +/* Internal routines needed to allow the evaluator to operate on FITS data */ + +static void Setup_DataArrays( int nCols, iteratorCol *cols, + long fRow, long nRows ); +static int find_column( char *colName, void *itslval ); +static int find_keywd ( char *key, void *itslval ); +static int allocateCol( int nCol, int *status ); +static int load_column( int varNum, long fRow, long nRows, + void *data, char *undef ); + +static int DEBUG_PIXFILTER; + +#define FREE(x) { if (x) free(x); else printf("invalid free(" #x ") at %s:%d\n", __FILE__, __LINE__); } + +/*---------------------------------------------------------------------------*/ +int fffrow( fitsfile *fptr, /* I - Input FITS file */ + char *expr, /* I - Boolean expression */ + long firstrow, /* I - First row of table to eval */ + long nrows, /* I - Number of rows to evaluate */ + long *n_good_rows, /* O - Number of rows eval to True */ + char *row_status, /* O - Array of boolean results */ + int *status ) /* O - Error status */ +/* */ +/* Evaluate a boolean expression using the indicated rows, returning an */ +/* array of flags indicating which rows evaluated to TRUE/FALSE */ +/*---------------------------------------------------------------------------*/ +{ + parseInfo Info; + int naxis, constant; + long nelem, naxes[MAXDIMS], elem; + char result; + + if( *status ) return( *status ); + + if( ffiprs( fptr, 0, expr, MAXDIMS, &Info.datatype, &nelem, &naxis, + naxes, status ) ) { + ffcprs(); + return( *status ); + } + if( nelem<0 ) { + constant = 1; + nelem = -nelem; + } else + constant = 0; + + if( Info.datatype!=TLOGICAL || nelem!=1 ) { + ffcprs(); + ffpmsg("Expression does not evaluate to a logical scalar."); + return( *status = PARSE_BAD_TYPE ); + } + + if( constant ) { /* No need to call parser... have result from ffiprs */ + result = gParse.Nodes[gParse.resultNode].value.data.log; + *n_good_rows = nrows; + for( elem=0; elem1 ? firstrow : 1); + Info.dataPtr = row_status; + Info.nullPtr = NULL; + Info.maxRows = nrows; + + if( ffiter( gParse.nCols, gParse.colData, firstrow-1, 0, + parse_data, (void*)&Info, status ) == -1 ) + *status = 0; /* -1 indicates exitted without error before end... OK */ + + if( *status ) { + + /***********************/ + /* Error... Do nothing */ + /***********************/ + + } else { + + /***********************************/ + /* Count number of good rows found */ + /***********************************/ + + *n_good_rows = 0L; + for( elem=0; elemHDUposition != (infptr->Fptr)->curhdu ) + ffmahd( infptr, (infptr->HDUposition) + 1, NULL, status ); + if( *status ) { + ffcprs(); + return( *status ); + } + inExt.rowLength = (long) (infptr->Fptr)->rowlength; + inExt.numRows = (infptr->Fptr)->numrows; + inExt.heapSize = (infptr->Fptr)->heapsize; + if( inExt.numRows == 0 ) { /* Nothing to copy */ + ffcprs(); + return( *status ); + } + + if( outfptr->HDUposition != (outfptr->Fptr)->curhdu ) + ffmahd( outfptr, (outfptr->HDUposition) + 1, NULL, status ); + if( (outfptr->Fptr)->datastart < 0 ) + ffrdef( outfptr, status ); + if( *status ) { + ffcprs(); + return( *status ); + } + outExt.rowLength = (long) (outfptr->Fptr)->rowlength; + outExt.numRows = (outfptr->Fptr)->numrows; + if( !outExt.numRows ) + (outfptr->Fptr)->heapsize = 0L; + outExt.heapSize = (outfptr->Fptr)->heapsize; + + if( inExt.rowLength != outExt.rowLength ) { + ffpmsg("Output table has different row length from input"); + ffcprs(); + return( *status = PARSE_BAD_OUTPUT ); + } + + /***********************************/ + /* Fill out Info data for parser */ + /***********************************/ + + Info.dataPtr = (char *)malloc( (size_t) ((inExt.numRows + 1) * sizeof(char)) ); + Info.nullPtr = NULL; + Info.maxRows = (long) inExt.numRows; + if( !Info.dataPtr ) { + ffpmsg("Unable to allocate memory for row selection"); + ffcprs(); + return( *status = MEMORY_ALLOCATION ); + } + + /* make sure array is zero terminated */ + ((char*)Info.dataPtr)[inExt.numRows] = 0; + + if( constant ) { /* Set all rows to the same value from constant result */ + + result = gParse.Nodes[gParse.resultNode].value.data.log; + for( ntodo = 0; ntodo 1) + ffirow( outfptr, outExt.numRows, nGood, status ); + } + + do { + if( ((char*)Info.dataPtr)[inloc-1] ) { + ffgtbb( infptr, inloc, 1L, rdlen, buffer+rdlen*nbuff, status ); + nbuff++; + if( nbuff==maxrows ) { + ffptbb( outfptr, outloc, 1L, rdlen*nbuff, buffer, status ); + outloc += nbuff; + nbuff = 0; + } + } + inloc++; + } while( !*status && inloc<=inExt.numRows ); + + if( nbuff ) { + ffptbb( outfptr, outloc, 1L, rdlen*nbuff, buffer, status ); + outloc += nbuff; + } + + if( infptr==outfptr ) { + + if( outloc<=inExt.numRows ) + ffdrow( infptr, outloc, inExt.numRows-outloc+1, status ); + + } else if( inExt.heapSize && nGood ) { + + /* Copy heap, if it exists and at least one row copied */ + + /********************************************************/ + /* Get location information from the output extension */ + /********************************************************/ + + if( outfptr->HDUposition != (outfptr->Fptr)->curhdu ) + ffmahd( outfptr, (outfptr->HDUposition) + 1, NULL, status ); + outExt.dataStart = (outfptr->Fptr)->datastart; + outExt.heapStart = (outfptr->Fptr)->heapstart; + + /*************************************************/ + /* Insert more space into outfptr if necessary */ + /*************************************************/ + + hsize = outExt.heapStart + outExt.heapSize; + freespace = (long) (( ( (hsize + 2879) / 2880) * 2880) - hsize); + ntodo = inExt.heapSize; + + if ( (freespace - ntodo) < 0) { /* not enough existing space? */ + ntodo = (ntodo - freespace + 2879) / 2880; /* number of blocks */ + ffiblk(outfptr, (long) ntodo, 1, status); /* insert the blocks */ + } + ffukyj( outfptr, "PCOUNT", inExt.heapSize+outExt.heapSize, + NULL, status ); + + /*******************************************************/ + /* Get location information from the input extension */ + /*******************************************************/ + + if( infptr->HDUposition != (infptr->Fptr)->curhdu ) + ffmahd( infptr, (infptr->HDUposition) + 1, NULL, status ); + inExt.dataStart = (infptr->Fptr)->datastart; + inExt.heapStart = (infptr->Fptr)->heapstart; + + /**********************************/ + /* Finally copy heap to outfptr */ + /**********************************/ + + ntodo = inExt.heapSize; + inbyteloc = inExt.heapStart + inExt.dataStart; + outbyteloc = outExt.heapStart + outExt.dataStart + outExt.heapSize; + + while ( ntodo && !*status ) { + rdlen = (long) minvalue(ntodo,500000); + ffmbyt( infptr, inbyteloc, REPORT_EOF, status ); + ffgbyt( infptr, rdlen, buffer, status ); + ffmbyt( outfptr, outbyteloc, IGNORE_EOF, status ); + ffpbyt( outfptr, rdlen, buffer, status ); + inbyteloc += rdlen; + outbyteloc += rdlen; + ntodo -= rdlen; + } + + /***********************************************************/ + /* But must update DES if data is being appended to a */ + /* pre-existing heap space. Edit each new entry in file */ + /***********************************************************/ + + if( outExt.heapSize ) { + LONGLONG repeat, offset, j; + int i; + for( i=1; i<=(outfptr->Fptr)->tfield; i++ ) { + if( (outfptr->Fptr)->tableptr[i-1].tdatatype<0 ) { + for( j=outExt.numRows+1; j<=outExt.numRows+nGood; j++ ) { + ffgdesll( outfptr, i, j, &repeat, &offset, status ); + offset += outExt.heapSize; + ffpdes( outfptr, i, j, repeat, offset, status ); + } + } + } + } + + } /* End of HEAP copy */ + + FREE(buffer); + } + + FREE(Info.dataPtr); + ffcprs(); + + ffcmph(outfptr, status); /* compress heap, deleting any orphaned data */ + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffcrow( fitsfile *fptr, /* I - Input FITS file */ + int datatype, /* I - Datatype to return results as */ + char *expr, /* I - Arithmetic expression */ + long firstrow, /* I - First row to evaluate */ + long nelements, /* I - Number of elements to return */ + void *nulval, /* I - Ptr to value to use as UNDEF */ + void *array, /* O - Array of results */ + int *anynul, /* O - Were any UNDEFs encountered? */ + int *status ) /* O - Error status */ +/* */ +/* Calculate an expression for the indicated rows of a table, returning */ +/* the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If */ +/* nulval==NULL, UNDEFs will be zeroed out. For vector results, the number */ +/* of elements returned may be less than nelements if nelements is not an */ +/* even multiple of the result dimension. Call fftexp to obtain the */ +/* dimensions of the results. */ +/*---------------------------------------------------------------------------*/ +{ + parseInfo Info; + int naxis; + long nelem1, naxes[MAXDIMS]; + + if( *status ) return( *status ); + + if( ffiprs( fptr, 0, expr, MAXDIMS, &Info.datatype, &nelem1, &naxis, + naxes, status ) ) { + ffcprs(); + return( *status ); + } + if( nelem1<0 ) nelem1 = - nelem1; + + if( nelements1 ? firstrow : 1); + + if( datatype ) Info.datatype = datatype; + + Info.dataPtr = array; + Info.nullPtr = nulval; + Info.maxRows = nelements / nelem1; + + if( ffiter( gParse.nCols, gParse.colData, firstrow-1, 0, + parse_data, (void*)&Info, status ) == -1 ) + *status=0; /* -1 indicates exitted without error before end... OK */ + + *anynul = Info.anyNull; + ffcprs(); + return( *status ); +} + +/*--------------------------------------------------------------------------*/ +int ffcalc( fitsfile *infptr, /* I - Input FITS file */ + char *expr, /* I - Arithmetic expression */ + fitsfile *outfptr, /* I - Output fits file */ + char *parName, /* I - Name of output parameter */ + char *parInfo, /* I - Extra information on parameter */ + int *status ) /* O - Error status */ +/* */ +/* Evaluate an expression for all rows of a table. Call ffcalc_rng with */ +/* a row range of 1-MAX. */ +{ + long start=1, end=LONG_MAX; + + return ffcalc_rng( infptr, expr, outfptr, parName, parInfo, + 1, &start, &end, status ); +} + +/*--------------------------------------------------------------------------*/ +int ffcalc_rng( fitsfile *infptr, /* I - Input FITS file */ + char *expr, /* I - Arithmetic expression */ + fitsfile *outfptr, /* I - Output fits file */ + char *parName, /* I - Name of output parameter */ + char *parInfo, /* I - Extra information on parameter */ + int nRngs, /* I - Row range info */ + long *start, /* I - Row range info */ + long *end, /* I - Row range info */ + int *status ) /* O - Error status */ +/* */ +/* Evaluate an expression using the data in the input FITS file and place */ +/* the results into either a column or keyword in the output fits file, */ +/* depending on the value of parName (keywords normally prefixed with '#') */ +/* and whether the expression evaluates to a constant or a table column. */ +/* The logic is as follows: */ +/* (1) If a column exists with name, parName, put results there. */ +/* (2) If parName starts with '#', as in #NAXIS, put result there, */ +/* with parInfo used as the comment. If expression does not evaluate */ +/* to a constant, flag an error. */ +/* (3) If a keyword exists with name, parName, and expression is a */ +/* constant, put result there, using parInfo as the new comment. */ +/* (4) Else, create a new column with name parName and TFORM parInfo. */ +/* If parInfo is NULL, use a default data type for the column. */ +/*--------------------------------------------------------------------------*/ +{ + parseInfo Info; + int naxis, constant, typecode, newNullKwd=0; + long nelem, naxes[MAXDIMS], repeat, width; + int col_cnt, colNo; + Node *result; + char card[81], tform[16], nullKwd[9], tdimKwd[9]; + + if( *status ) return( *status ); + + if( ffiprs( infptr, 0, expr, MAXDIMS, &Info.datatype, &nelem, &naxis, + naxes, status ) ) { + + ffcprs(); + return( *status ); + } + if( nelem<0 ) { + constant = 1; + nelem = -nelem; + } else + constant = 0; + + /* Case (1): If column exists put it there */ + + colNo = 0; + if( ffgcno( outfptr, CASEINSEN, parName, &colNo, status )==COL_NOT_FOUND ) { + + /* Output column doesn't exist. Test for keyword. */ + + /* Case (2): Does parName indicate result should be put into keyword */ + + *status = 0; + if( parName[0]=='#' ) { + if( ! constant ) { + ffcprs(); + ffpmsg( "Cannot put tabular result into keyword (ffcalc)" ); + return( *status = PARSE_BAD_TYPE ); + } + parName++; + + } else if( constant ) { + + /* Case (3): Does a keyword named parName already exist */ + + if( ffgcrd( outfptr, parName, card, status )==KEY_NO_EXIST ) { + colNo = -1; + } else if( *status ) { + ffcprs(); + return( *status ); + } + + } else + colNo = -1; + + if( colNo<0 ) { + + /* Case (4): Create new column */ + + *status = 0; + ffgncl( outfptr, &colNo, status ); + colNo++; + if( parInfo==NULL || *parInfo=='\0' ) { + /* Figure out best default column type */ + if( gParse.hdutype==BINARY_TBL ) { + sprintf(tform,"%ld",nelem); + switch( Info.datatype ) { + case TLOGICAL: strcat(tform,"L"); break; + case TLONG: strcat(tform,"J"); break; + case TDOUBLE: strcat(tform,"D"); break; + case TSTRING: strcat(tform,"A"); break; + case TBIT: strcat(tform,"X"); break; + case TLONGLONG: strcat(tform,"K"); break; + } + } else { + switch( Info.datatype ) { + case TLOGICAL: + ffcprs(); + ffpmsg("Cannot create LOGICAL column in ASCII table"); + return( *status = NOT_BTABLE ); + break; + case TLONG: strcpy(tform,"I11"); break; + case TDOUBLE: strcpy(tform,"D23.15"); break; + case TSTRING: + case TBIT: sprintf(tform,"A%ld",nelem); break; + } + } + parInfo = tform; + } else if( !(isdigit((int) *parInfo)) && gParse.hdutype==BINARY_TBL ) { + if( Info.datatype==TBIT && *parInfo=='B' ) + nelem = (nelem+7)/8; + sprintf(tform,"%ld%s",nelem,parInfo); + parInfo = tform; + } + fficol( outfptr, colNo, parName, parInfo, status ); + if( naxis>1 ) + ffptdm( outfptr, colNo, naxis, naxes, status ); + + /* Setup TNULLn keyword in case NULLs are encountered */ + + ffkeyn("TNULL", colNo, nullKwd, status); + if( ffgcrd( outfptr, nullKwd, card, status )==KEY_NO_EXIST ) { + *status = 0; + if( gParse.hdutype==BINARY_TBL ) { + LONGLONG nullVal=0; + fits_binary_tform( parInfo, &typecode, &repeat, &width, status ); + if( typecode==TBYTE ) + nullVal = UCHAR_MAX; + else if( typecode==TSHORT ) + nullVal = SHRT_MIN; + else if( typecode==TINT ) + nullVal = INT_MIN; + else if( typecode==TLONG ) + nullVal = LONG_MIN; + else if( typecode==TLONGLONG ) + nullVal = LONGLONG_MIN; + + if( nullVal ) { + ffpkyj( outfptr, nullKwd, nullVal, "Null value", status ); + fits_set_btblnull( outfptr, colNo, nullVal, status ); + newNullKwd = 1; + } + } else if( gParse.hdutype==ASCII_TBL ) { + ffpkys( outfptr, nullKwd, "NULL", "Null value string", status ); + fits_set_atblnull( outfptr, colNo, "NULL", status ); + newNullKwd = 1; + } + } + + } + + } else if( *status ) { + ffcprs(); + return( *status ); + } else { + + /********************************************************/ + /* Check if a TDIM keyword should be written/updated. */ + /********************************************************/ + + ffkeyn("TDIM", colNo, tdimKwd, status); + ffgcrd( outfptr, tdimKwd, card, status ); + if( *status==0 ) { + /* TDIM exists, so update it with result's dimension */ + ffptdm( outfptr, colNo, naxis, naxes, status ); + } else if( *status==KEY_NO_EXIST ) { + /* TDIM does not exist, so clear error stack and */ + /* write a TDIM only if result is multi-dimensional */ + *status = 0; + ffcmsg(); + if( naxis>1 ) + ffptdm( outfptr, colNo, naxis, naxes, status ); + } + if( *status ) { + /* Either some other error happened in ffgcrd */ + /* or one happened in ffptdm */ + ffcprs(); + return( *status ); + } + + } + + if( colNo>0 ) { + + /* Output column exists (now)... put results into it */ + + int anyNull = 0; + int nPerLp, i; + long totaln; + + ffgkyj(infptr, "NAXIS2", &totaln, 0, status); + + /*************************************/ + /* Create new iterator Output Column */ + /*************************************/ + + col_cnt = gParse.nCols; + if( allocateCol( col_cnt, status ) ) { + ffcprs(); + return( *status ); + } + + fits_iter_set_by_num( gParse.colData+col_cnt, outfptr, + colNo, 0, OutputCol ); + gParse.nCols++; + + for( i=0; i= 10) && (nRngs == 1) && + (start[0] == 1) && (end[0] == totaln)) + nPerLp = 0; + else + nPerLp = Info.maxRows; + + if( ffiter( gParse.nCols, gParse.colData, start[i]-1, + nPerLp, parse_data, (void*)&Info, status ) == -1 ) + *status = 0; + else if( *status ) { + ffcprs(); + return( *status ); + } + if( Info.anyNull ) anyNull = 1; + } + + if( newNullKwd && !anyNull ) { + ffdkey( outfptr, nullKwd, status ); + } + + } else { + + /* Put constant result into keyword */ + + result = gParse.Nodes + gParse.resultNode; + switch( Info.datatype ) { + case TDOUBLE: + ffukyd( outfptr, parName, result->value.data.dbl, 15, + parInfo, status ); + break; + case TLONG: + ffukyj( outfptr, parName, result->value.data.lng, parInfo, status ); + break; + case TLOGICAL: + ffukyl( outfptr, parName, result->value.data.log, parInfo, status ); + break; + case TBIT: + case TSTRING: + ffukys( outfptr, parName, result->value.data.str, parInfo, status ); + break; + } + } + + ffcprs(); + return( *status ); +} + +/*--------------------------------------------------------------------------*/ +int fftexp( fitsfile *fptr, /* I - Input FITS file */ + char *expr, /* I - Arithmetic expression */ + int maxdim, /* I - Max Dimension of naxes */ + int *datatype, /* O - Data type of result */ + long *nelem, /* O - Vector length of result */ + int *naxis, /* O - # of dimensions of result */ + long *naxes, /* O - Size of each dimension */ + int *status ) /* O - Error status */ +/* */ +/* Evaluate the given expression and return information on the result. */ +/*--------------------------------------------------------------------------*/ +{ + ffiprs( fptr, 0, expr, maxdim, datatype, nelem, naxis, naxes, status ); + ffcprs(); + return( *status ); +} + +/*--------------------------------------------------------------------------*/ +int ffiprs( fitsfile *fptr, /* I - Input FITS file */ + int compressed, /* I - Is FITS file hkunexpanded? */ + char *expr, /* I - Arithmetic expression */ + int maxdim, /* I - Max Dimension of naxes */ + int *datatype, /* O - Data type of result */ + long *nelem, /* O - Vector length of result */ + int *naxis, /* O - # of dimensions of result */ + long *naxes, /* O - Size of each dimension */ + int *status ) /* O - Error status */ +/* */ +/* Initialize the parser and determine what type of result the expression */ +/* produces. */ +/*--------------------------------------------------------------------------*/ +{ + Node *result; + int i,lexpr, tstatus = 0; + int xaxis, bitpix; + long xaxes[9]; + static iteratorCol dmyCol; + + if( *status ) return( *status ); + + /* make sure all internal structures for this HDU are current */ + if ( ffrdef(fptr, status) ) return(*status); + + /* Initialize the Parser structure */ + + gParse.def_fptr = fptr; + gParse.compressed = compressed; + gParse.nCols = 0; + gParse.colData = NULL; + gParse.varData = NULL; + gParse.getData = find_column; + gParse.loadData = load_column; + gParse.Nodes = NULL; + gParse.nNodesAlloc= 0; + gParse.nNodes = 0; + gParse.hdutype = 0; + gParse.status = 0; + + fits_get_hdu_type(fptr, &gParse.hdutype, status ); + + if (gParse.hdutype == IMAGE_HDU) { + + fits_get_img_param(fptr, 9, &bitpix, &xaxis, xaxes, status); + if (*status) { + ffpmsg("ffiprs: unable to get image dimensions"); + return( *status ); + } + gParse.totalRows = xaxis > 0 ? 1 : 0; + for (i = 0; i < xaxis; ++i) + gParse.totalRows *= xaxes[i]; + if (DEBUG_PIXFILTER) + printf("naxis=%d, gParse.totalRows=%ld\n", xaxis, gParse.totalRows); + } + else if( ffgkyj(fptr, "NAXIS2", &gParse.totalRows, 0, &tstatus) ) + { + /* this might be a 1D or null image with no NAXIS2 keyword */ + gParse.totalRows = 0; + } + + + /* Copy expression into parser... read from file if necessary */ + + + if( expr[0]=='@' ) { + if( ffimport_file( expr+1, &gParse.expr, status ) ) return( *status ); + lexpr = strlen(gParse.expr); + } else { + lexpr = strlen(expr); + gParse.expr = (char*)malloc( (2+lexpr)*sizeof(char)); + strcpy(gParse.expr,expr); + } + strcat(gParse.expr + lexpr,"\n"); + gParse.index = 0; + gParse.is_eobuf = 0; + + /* Parse the expression, building the Nodes and determing */ + /* which columns are needed and what data type is returned */ + + ffrestart(NULL); + if( ffparse() ) { + return( *status = PARSE_SYNTAX_ERR ); + } + /* Check results */ + + *status = gParse.status; + if( *status ) return(*status); + + if( !gParse.nNodes ) { + ffpmsg("Blank expression"); + return( *status = PARSE_SYNTAX_ERR ); + } + if( !gParse.nCols ) { + dmyCol.fptr = fptr; /* This allows iterator to know value of */ + gParse.colData = &dmyCol; /* fptr when no columns are referenced */ + } + + result = gParse.Nodes + gParse.resultNode; + + *naxis = result->value.naxis; + *nelem = result->value.nelem; + for( i=0; i<*naxis && ivalue.naxes[i]; + + switch( result->type ) { + case BOOLEAN: + *datatype = TLOGICAL; + break; + case LONG: + *datatype = TLONG; + break; + case DOUBLE: + *datatype = TDOUBLE; + break; + case BITSTR: + *datatype = TBIT; + break; + case STRING: + *datatype = TSTRING; + break; + default: + *datatype = 0; + ffpmsg("Bad return data type"); + *status = gParse.status = PARSE_BAD_TYPE; + break; + } + gParse.datatype = *datatype; + FREE(gParse.expr); + + if( result->operation==CONST_OP ) *nelem = - *nelem; + return(*status); +} + +/*--------------------------------------------------------------------------*/ +void ffcprs( void ) /* No parameters */ +/* */ +/* Clear the parser, making it ready to accept a new expression. */ +/*--------------------------------------------------------------------------*/ +{ + int col, node, i; + + if( gParse.nCols > 0 ) { + FREE( gParse.colData ); + for( col=0; col 0 ) { + node = gParse.nNodes; + while( node-- ) { + if( gParse.Nodes[node].operation==gtifilt_fct ) { + i = gParse.Nodes[node].SubNodes[0]; + FREE( gParse.Nodes[ i ].value.data.ptr ); + } + else if( gParse.Nodes[node].operation==regfilt_fct ) { + i = gParse.Nodes[node].SubNodes[0]; + fits_free_region( (SAORegion *)gParse.Nodes[ i ].value.data.ptr ); + } + } + gParse.nNodes = 0; + } + if( gParse.Nodes ) free( gParse.Nodes ); + gParse.Nodes = NULL; + + gParse.hdutype = ANY_HDU; + gParse.pixFilter = 0; +} + +/*---------------------------------------------------------------------------*/ +int parse_data( long totalrows, /* I - Total rows to be processed */ + long offset, /* I - Number of rows skipped at start*/ + long firstrow, /* I - First row of this iteration */ + long nrows, /* I - Number of rows in this iter */ + int nCols, /* I - Number of columns in use */ + iteratorCol *colData, /* IO- Column information/data */ + void *userPtr ) /* I - Data handling instructions */ +/* */ +/* Iterator work function which calls the parser and copies the results */ +/* into either an OutputCol or a data pointer supplied in the userPtr */ +/* structure. */ +/*---------------------------------------------------------------------------*/ +{ + int status, constant=0, anyNullThisTime=0; + long jj, kk, idx, remain, ntodo; + Node *result; + iteratorCol * outcol; + + /* declare variables static to preserve their values between calls */ + static void *Data, *Null; + static int datasize; + static long lastRow, repeat, resDataSize; + LONGLONG jnull; + static parseInfo *userInfo; + static long zeros[4] = {0,0,0,0}; + + if (DEBUG_PIXFILTER) + printf("parse_data(total=%ld, offset=%ld, first=%ld, rows=%ld, cols=%d)\n", + totalrows, offset, firstrow, nrows, nCols); + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + outcol = colData + (nCols - 1); + if (firstrow == offset+1) + { + userInfo = (parseInfo*)userPtr; + userInfo->anyNull = 0; + + if( userInfo->maxRows>0 ) + userInfo->maxRows = minvalue(totalrows,userInfo->maxRows); + else if( userInfo->maxRows<0 ) + userInfo->maxRows = totalrows; + else + userInfo->maxRows = nrows; + + lastRow = firstrow + userInfo->maxRows - 1; + + if( userInfo->dataPtr==NULL ) { + + if( outcol->iotype == InputCol ) { + ffpmsg("Output column for parser results not found!"); + return( PARSE_NO_OUTPUT ); + } + /* Data gets set later */ + Null = outcol->array; + userInfo->datatype = outcol->datatype; + + /* Check for a TNULL/BLANK keyword for output column/image */ + + status = 0; + jnull = 0; + if (gParse.hdutype == IMAGE_HDU) { + if (gParse.pixFilter->blank) + jnull = (LONGLONG) gParse.pixFilter->blank; + } + else { + ffgknjj( outcol->fptr, "TNULL", outcol->colnum, + 1, &jnull, (int*)&jj, &status ); + + if( status==BAD_INTKEY ) { + /* Probably ASCII table with text TNULL keyword */ + switch( userInfo->datatype ) { + case TSHORT: jnull = (LONGLONG) SHRT_MIN; break; + case TINT: jnull = (LONGLONG) INT_MIN; break; + case TLONG: jnull = (LONGLONG) LONG_MIN; break; + } + } + } + repeat = outcol->repeat; + if (DEBUG_PIXFILTER) + printf("using null value %ld\n", jnull); + } else { + + Data = userInfo->dataPtr; + Null = (userInfo->nullPtr ? userInfo->nullPtr : zeros); + repeat = gParse.Nodes[gParse.resultNode].value.nelem; + + } + + /* Determine the size of each element of the returned result */ + + switch( userInfo->datatype ) { + case TBIT: /* Fall through to TBYTE */ + case TLOGICAL: /* Fall through to TBYTE */ + case TBYTE: datasize = sizeof(char); break; + case TSHORT: datasize = sizeof(short); break; + case TINT: datasize = sizeof(int); break; + case TLONG: datasize = sizeof(long); break; + case TLONGLONG: datasize = sizeof(LONGLONG); break; + case TFLOAT: datasize = sizeof(float); break; + case TDOUBLE: datasize = sizeof(double); break; + case TSTRING: datasize = sizeof(char*); break; + } + + /* Determine the size of each element of the calculated result */ + /* (only matters for numeric/logical data) */ + + switch( gParse.Nodes[gParse.resultNode].type ) { + case BOOLEAN: resDataSize = sizeof(char); break; + case LONG: resDataSize = sizeof(long); break; + case DOUBLE: resDataSize = sizeof(double); break; + } + } + + /*-------------------------------------------*/ + /* Main loop: process all the rows of data */ + /*-------------------------------------------*/ + + /* If writing to output column, set first element to appropriate */ + /* null value. If no NULLs encounter, zero out before returning. */ + + if( userInfo->dataPtr == NULL ) { + /* First, reset Data pointer to start of output array */ + Data = (char*) outcol->array + datasize; + + switch( userInfo->datatype ) { + case TLOGICAL: *(char *)Null = 'U'; break; + case TBYTE: *(char *)Null = (char )jnull; break; + case TSHORT: *(short *)Null = (short)jnull; break; + case TINT: *(int *)Null = (int )jnull; break; + case TLONG: *(long *)Null = (long )jnull; break; + case TLONGLONG: *(LONGLONG *)Null = (LONGLONG )jnull; break; + case TFLOAT: *(float *)Null = FLOATNULLVALUE; break; + case TDOUBLE: *(double*)Null = DOUBLENULLVALUE; break; + case TSTRING: (*(char **)Null)[0] = '\1'; + (*(char **)Null)[1] = '\0'; break; + } + } + + /* Alter nrows in case calling routine didn't want to do all rows */ + + nrows = minvalue(nrows,lastRow-firstrow+1); + + Setup_DataArrays( nCols, colData, firstrow, nrows ); + + /* Parser allocates arrays for each column and calculation it performs. */ + /* Limit number of rows processed during each pass to reduce memory */ + /* requirements... In most cases, iterator will limit rows to less */ + /* than 2500 rows per iteration, so this is really only relevant for */ + /* hk-compressed files which must be decompressed in memory and sent */ + /* whole to parse_data in a single iteration. */ + + remain = nrows; + while( remain ) { + ntodo = minvalue(remain,2500); + Evaluate_Parser ( firstrow, ntodo ); + if( gParse.status ) break; + + firstrow += ntodo; + remain -= ntodo; + + /* Copy results into data array */ + + result = gParse.Nodes + gParse.resultNode; + if( result->operation==CONST_OP ) constant = 1; + + switch( result->type ) { + + case BOOLEAN: + case LONG: + case DOUBLE: + if( constant ) { + char undef=0; + for( kk=0; kkvalue.data), + &undef, result->value.nelem /* 1 */, + userInfo->datatype, Null, + (char*)Data + (kk*repeat+jj)*datasize, + &anyNullThisTime, &gParse.status ); + } else { + if ( repeat == result->value.nelem ) { + ffcvtn( gParse.datatype, + result->value.data.ptr, + result->value.undef, + result->value.nelem*ntodo, + userInfo->datatype, Null, Data, + &anyNullThisTime, &gParse.status ); + } else if( result->value.nelem == 1 ) { + for( kk=0; kkvalue.data.ptr + kk*resDataSize, + (char*)result->value.undef + kk, + 1, userInfo->datatype, Null, + (char*)Data + (kk*repeat+jj)*datasize, + &anyNullThisTime, &gParse.status ); + } + } else { + int nCopy; + nCopy = minvalue( repeat, result->value.nelem ); + for( kk=0; kkvalue.data.ptr + + kk*result->value.nelem*resDataSize, + (char*)result->value.undef + + kk*result->value.nelem, + nCopy, userInfo->datatype, Null, + (char*)Data + (kk*repeat)*datasize, + &anyNullThisTime, &gParse.status ); + if( nCopy < repeat ) { + memset( (char*)Data + (kk*repeat+nCopy)*datasize, + 0, (repeat-nCopy)*datasize); + } + } + + } + if( result->operation>0 ) { + FREE( result->value.data.ptr ); + } + } + if( gParse.status==OVERFLOW_ERR ) { + gParse.status = NUM_OVERFLOW; + ffpmsg("Numerical overflow while converting expression to necessary datatype"); + } + break; + + case BITSTR: + switch( userInfo->datatype ) { + case TBYTE: + idx = -1; + for( kk=0; kkvalue.nelem; jj++ ) { + if( jj%8 == 0 ) + ((char*)Data)[++idx] = 0; + if( constant ) { + if( result->value.data.str[jj]=='1' ) + ((char*)Data)[idx] |= 128>>(jj%8); + } else { + if( result->value.data.strptr[kk][jj]=='1' ) + ((char*)Data)[idx] |= 128>>(jj%8); + } + } + } + break; + case TBIT: + case TLOGICAL: + if( constant ) { + for( kk=0; kkvalue.nelem; jj++ ) { + ((char*)Data)[ jj+kk*result->value.nelem ] = + ( result->value.data.str[jj]=='1' ); + } + } else { + for( kk=0; kkvalue.nelem; jj++ ) { + ((char*)Data)[ jj+kk*result->value.nelem ] = + ( result->value.data.strptr[kk][jj]=='1' ); + } + } + break; + case TSTRING: + if( constant ) { + for( jj=0; jjvalue.data.str ); + } + } else { + for( jj=0; jjvalue.data.strptr[jj] ); + } + } + break; + default: + ffpmsg("Cannot convert bit expression to desired type."); + gParse.status = PARSE_BAD_TYPE; + break; + } + if( result->operation>0 ) { + FREE( result->value.data.strptr[0] ); + FREE( result->value.data.strptr ); + } + break; + + case STRING: + if( userInfo->datatype==TSTRING ) { + if( constant ) { + for( jj=0; jjvalue.data.str ); + } else { + for( jj=0; jjvalue.undef[jj] ) { + anyNullThisTime = 1; + strcpy( ((char**)Data)[jj], + *(char **)Null ); + } else { + strcpy( ((char**)Data)[jj], + result->value.data.strptr[jj] ); + } + } + } else { + ffpmsg("Cannot convert string expression to desired type."); + gParse.status = PARSE_BAD_TYPE; + } + if( result->operation>0 ) { + FREE( result->value.data.strptr[0] ); + FREE( result->value.data.strptr ); + } + break; + } + + if( gParse.status ) break; + + /* Increment Data to point to where the next block should go */ + + if( result->type==BITSTR && userInfo->datatype==TBYTE ) + Data = (char*)Data + + datasize * ( (result->value.nelem+7)/8 ) * ntodo; + else if( result->type==STRING ) + Data = (char*)Data + datasize * ntodo; + else + Data = (char*)Data + datasize * ntodo * repeat; + } + + /* If no NULLs encountered during this pass, set Null value to */ + /* zero to make the writing of the output column data faster */ + + if( anyNullThisTime ) + userInfo->anyNull = 1; + else if( userInfo->dataPtr == NULL ) { + if( userInfo->datatype == TSTRING ) + memcpy( *(char **)Null, zeros, 2 ); + else + memcpy( Null, zeros, datasize ); + } + + /*-------------------------------------------------------*/ + /* Clean up procedures: after processing all the rows */ + /*-------------------------------------------------------*/ + + /* if the calling routine specified that only a limited number */ + /* of rows in the table should be processed, return a value of -1 */ + /* once all the rows have been done, if no other error occurred. */ + + if (gParse.hdutype != IMAGE_HDU && firstrow - 1 == lastRow) { + if (!gParse.status && userInfo->maxRowsiotype == OutputCol ) continue; + + nelem = varData->nelem; + len = nelem * nRows; + + switch ( varData->type ) { + + case BITSTR: + /* No need for UNDEF array, but must make string DATA array */ + len = (nelem+1)*nRows; /* Count '\0' */ + bitStrs = (char**)varData->data; + if( bitStrs ) FREE( bitStrs[0] ); + free( bitStrs ); + bitStrs = (char**)malloc( nRows*sizeof(char*) ); + if( bitStrs==NULL ) { + varData->data = varData->undef = NULL; + gParse.status = MEMORY_ALLOCATION; + break; + } + bitStrs[0] = (char*)malloc( len*sizeof(char) ); + if( bitStrs[0]==NULL ) { + free( bitStrs ); + varData->data = varData->undef = NULL; + gParse.status = MEMORY_ALLOCATION; + break; + } + + for( row=0; rowarray)[idx] & (1<<(7-len%8)) ) + bitStrs[row][len] = '1'; + else + bitStrs[row][len] = '0'; + if( len%8==7 ) idx++; + } + bitStrs[row][len] = '\0'; + } + varData->undef = (char*)bitStrs; + varData->data = (char*)bitStrs; + break; + + case STRING: + sptr = (char**)icol->array; + if (varData->undef) + free( varData->undef ); + varData->undef = (char*)malloc( nRows*sizeof(char) ); + if( varData->undef==NULL ) { + gParse.status = MEMORY_ALLOCATION; + break; + } + row = nRows; + while( row-- ) + varData->undef[row] = + ( **sptr != '\0' && FSTRCMP( sptr[0], sptr[row+1] )==0 ); + varData->data = sptr + 1; + break; + + case BOOLEAN: + barray = (char*)icol->array; + if (varData->undef) + free( varData->undef ); + varData->undef = (char*)malloc( len*sizeof(char) ); + if( varData->undef==NULL ) { + gParse.status = MEMORY_ALLOCATION; + break; + } + while( len-- ) { + varData->undef[len] = + ( barray[0]!=0 && barray[0]==barray[len+1] ); + } + varData->data = barray + 1; + break; + + case LONG: + iarray = (long*)icol->array; + if (varData->undef) + free( varData->undef ); + varData->undef = (char*)malloc( len*sizeof(char) ); + if( varData->undef==NULL ) { + gParse.status = MEMORY_ALLOCATION; + break; + } + while( len-- ) { + varData->undef[len] = + ( iarray[0]!=0L && iarray[0]==iarray[len+1] ); + } + varData->data = iarray + 1; + break; + + case DOUBLE: + rarray = (double*)icol->array; + if (varData->undef) + free( varData->undef ); + varData->undef = (char*)malloc( len*sizeof(char) ); + if( varData->undef==NULL ) { + gParse.status = MEMORY_ALLOCATION; + break; + } + while( len-- ) { + varData->undef[len] = + ( rarray[0]!=0.0 && rarray[0]==rarray[len+1]); + } + varData->data = rarray + 1; + break; + + default: + sprintf(msg, "SetupDataArrays, unhandled type %d\n", + varData->type); + ffpmsg(msg); + } + + if( gParse.status ) { /* Deallocate NULL arrays of previous columns */ + while( i-- ) { + varData = gParse.varData + i; + if( varData->type==BITSTR ) + FREE( ((char**)varData->data)[0] ); + FREE( varData->undef ); + varData->undef = NULL; + } + return; + } + } +} + +/*--------------------------------------------------------------------------*/ +int ffcvtn( int inputType, /* I - Data type of input array */ + void *input, /* I - Input array of type inputType */ + char *undef, /* I - Array of flags indicating UNDEF elems */ + long ntodo, /* I - Number of elements to process */ + int outputType, /* I - Data type of output array */ + void *nulval, /* I - Ptr to value to use for UNDEF elements */ + void *output, /* O - Output array of type outputType */ + int *anynull, /* O - Any nulls flagged? */ + int *status ) /* O - Error status */ +/* */ +/* Convert an array of any input data type to an array of any output */ +/* data type, using an array of UNDEF flags to assign nulvals to */ +/*--------------------------------------------------------------------------*/ +{ + long i; + + switch( outputType ) { + + case TLOGICAL: + switch( inputType ) { + case TLOGICAL: + case TBYTE: + for( i=0; i UCHAR_MAX ) { + *status = OVERFLOW_ERR; + ((unsigned char*)output)[i] = UCHAR_MAX; + } else + ((unsigned char*)output)[i] = + (unsigned char) ((long*)input)[i]; + } + } + return( *status ); + break; + case TFLOAT: + fffr4i1((float*)input,ntodo,1.,0.,0,0,NULL,NULL, + (unsigned char*)output,status); + break; + case TDOUBLE: + fffr8i1((double*)input,ntodo,1.,0.,0,0,NULL,NULL, + (unsigned char*)output,status); + break; + default: + *status = BAD_DATATYPE; + break; + } + for(i=0;i SHRT_MAX ) { + *status = OVERFLOW_ERR; + ((short*)output)[i] = SHRT_MAX; + } else + ((short*)output)[i] = (short) ((long*)input)[i]; + } + } + return( *status ); + break; + case TFLOAT: + fffr4i2((float*)input,ntodo,1.,0.,0,0,NULL,NULL, + (short*)output,status); + break; + case TDOUBLE: + fffr8i2((double*)input,ntodo,1.,0.,0,0,NULL,NULL, + (short*)output,status); + break; + default: + *status = BAD_DATATYPE; + break; + } + for(i=0;i=0 ) { + found[parNo] = 1; /* Flag this parameter as found */ + switch( gParse.colData[parNo].datatype ) { + case TLONG: + ffgcvj( fptr, gParse.valCol, row, 1L, 1L, + ((long*)gParse.colData[parNo].array)[0], + ((long*)gParse.colData[parNo].array)+currelem, + &anynul, status ); + break; + case TDOUBLE: + ffgcvd( fptr, gParse.valCol, row, 1L, 1L, + ((double*)gParse.colData[parNo].array)[0], + ((double*)gParse.colData[parNo].array)+currelem, + &anynul, status ); + break; + case TSTRING: + ffgcvs( fptr, gParse.valCol, row, 1L, 1L, + ((char**)gParse.colData[parNo].array)[0], + ((char**)gParse.colData[parNo].array)+currelem, + &anynul, status ); + break; + } + if( *status ) return( *status ); + } + } + + if( currelemoperation==CONST_OP ) { + + if( result->value.data.log ) { + *(long*)userPtr = firstrow; + return( -1 ); + } + + } else { + + for( idx=0; idxvalue.data.logptr[idx] && !result->value.undef[idx] ) { + *(long*)userPtr = firstrow + idx; + return( -1 ); + } + } + } + + return( gParse.status ); +} + + +static int set_image_col_types (fitsfile * fptr, const char * name, int bitpix, + DataInfo * varInfo, iteratorCol *colIter) { + + int istatus; + double tscale, tzero; + char temp[80]; + + switch (bitpix) { + case BYTE_IMG: + case SHORT_IMG: + case LONG_IMG: + istatus = 0; + if (fits_read_key(fptr, TDOUBLE, "BZERO", &tzero, NULL, &istatus)) + tzero = 0.0; + + istatus = 0; + if (fits_read_key(fptr, TDOUBLE, "BSCALE", &tscale, NULL, &istatus)) + tscale = 1.0; + + if (tscale == 1.0 && (tzero == 0.0 || tzero == 32768.0 )) { + varInfo->type = LONG; + colIter->datatype = TLONG; + } + else { + varInfo->type = DOUBLE; + colIter->datatype = TDOUBLE; + if (DEBUG_PIXFILTER) + printf("use DOUBLE for %s with BSCALE=%g/BZERO=%g\n", + name, tscale, tzero); + } + break; + + case LONGLONG_IMG: + case FLOAT_IMG: + case DOUBLE_IMG: + varInfo->type = DOUBLE; + colIter->datatype = TDOUBLE; + break; + default: + sprintf(temp, "set_image_col_types: unrecognized image bitpix [%d]\n", + bitpix); + ffpmsg(temp); + return gParse.status = PARSE_BAD_TYPE; + } + return 0; +} + + +/************************************************************************* + + Functions used by the evaluator to access FITS data + (find_column, find_keywd, allocateCol, load_column) + + *************************************************************************/ + +static int find_column( char *colName, void *itslval ) +{ + FFSTYPE *thelval = (FFSTYPE*)itslval; + int col_cnt, status; + int colnum, typecode, type; + long repeat, width; + fitsfile *fptr; + char temp[80]; + double tzero,tscale; + int istatus; + DataInfo *varInfo; + iteratorCol *colIter; + +if (DEBUG_PIXFILTER) + printf("find_column(%s)\n", colName); + + if( *colName == '#' ) + return( find_keywd( colName + 1, itslval ) ); + + fptr = gParse.def_fptr; + + status = 0; + col_cnt = gParse.nCols; + +if (gParse.hdutype == IMAGE_HDU) { + int i; + if (!gParse.pixFilter) { + gParse.status = COL_NOT_FOUND; + ffpmsg("find_column: IMAGE_HDU but no PixelFilter"); + return pERROR; + } + + colnum = -1; + for (i = 0; i < gParse.pixFilter->count; ++i) { + if (!strcasecmp(colName, gParse.pixFilter->tag[i])) + colnum = i; + } + if (colnum < 0) { + sprintf(temp, "find_column: PixelFilter tag %s not found", colName); + ffpmsg(temp); + gParse.status = COL_NOT_FOUND; + return pERROR; + } + + if( allocateCol( col_cnt, &gParse.status ) ) return pERROR; + + varInfo = gParse.varData + col_cnt; + colIter = gParse.colData + col_cnt; + + fptr = gParse.pixFilter->ifptr[colnum]; + fits_get_img_param(fptr, + MAXDIMS, + &typecode, /* actually bitpix */ + &varInfo->naxis, + &varInfo->naxes[0], + &status); + varInfo->nelem = 1; + type = COLUMN; + if (set_image_col_types(fptr, colName, typecode, varInfo, colIter)) + return pERROR; + colIter->fptr = fptr; + colIter->iotype = InputCol; +} +else { /* HDU holds a table */ + if( gParse.compressed ) + colnum = gParse.valCol; + else + if( fits_get_colnum( fptr, CASEINSEN, colName, &colnum, &status ) ) { + if( status == COL_NOT_FOUND ) { + type = find_keywd( colName, itslval ); + if( type != pERROR ) ffcmsg(); + return( type ); + } + gParse.status = status; + return pERROR; + } + + if( fits_get_coltype( fptr, colnum, &typecode, + &repeat, &width, &status ) ) { + gParse.status = status; + return pERROR; + } + + if( allocateCol( col_cnt, &gParse.status ) ) return pERROR; + + varInfo = gParse.varData + col_cnt; + colIter = gParse.colData + col_cnt; + + fits_iter_set_by_num( colIter, fptr, colnum, 0, InputCol ); +} + + /* Make sure we don't overflow variable name array */ + strncpy(varInfo->name,colName,MAXVARNAME); + varInfo->name[MAXVARNAME] = '\0'; + +if (gParse.hdutype != IMAGE_HDU) { + switch( typecode ) { + case TBIT: + varInfo->type = BITSTR; + colIter->datatype = TBYTE; + type = BITCOL; + break; + case TBYTE: + case TSHORT: + case TLONG: + /* The datatype of column with TZERO and TSCALE keywords might be + float or double. + */ + sprintf(temp,"TZERO%d",colnum); + istatus = 0; + if(fits_read_key(fptr,TDOUBLE,temp,&tzero,NULL,&istatus)) { + tzero = 0.0; + } + sprintf(temp,"TSCAL%d",colnum); + istatus = 0; + if(fits_read_key(fptr,TDOUBLE,temp,&tscale,NULL,&istatus)) { + tscale = 1.0; + } + if (tscale == 1.0 && (tzero == 0.0 || tzero == 32768.0 )) { + varInfo->type = LONG; + colIter->datatype = TLONG; +/* Reading an unsigned long column as a long can cause overflow errors. + Treat the column as a double instead. + } else if (tscale == 1.0 && tzero == 2147483648.0 ) { + varInfo->type = LONG; + colIter->datatype = TULONG; + */ + + } + else { + varInfo->type = DOUBLE; + colIter->datatype = TDOUBLE; + } + type = COLUMN; + break; +/* + For now, treat 8-byte integer columns as type double. + This can lose precision, so the better long term solution + will be to add support for TLONGLONG as a separate datatype. +*/ + case TLONGLONG: + case TFLOAT: + case TDOUBLE: + varInfo->type = DOUBLE; + colIter->datatype = TDOUBLE; + type = COLUMN; + break; + case TLOGICAL: + varInfo->type = BOOLEAN; + colIter->datatype = TLOGICAL; + type = BCOLUMN; + break; + case TSTRING: + varInfo->type = STRING; + colIter->datatype = TSTRING; + type = SCOLUMN; + if( gParse.hdutype == ASCII_TBL ) repeat = width; + break; + default: + if (typecode < 0) { + sprintf(temp, "variable-length array columns are not supported. typecode = %d", typecode); + ffpmsg(temp); + } + gParse.status = PARSE_BAD_TYPE; + return pERROR; + } + varInfo->nelem = repeat; + if( repeat>1 && typecode!=TSTRING ) { + if( fits_read_tdim( fptr, colnum, MAXDIMS, + &varInfo->naxis, + &varInfo->naxes[0], &status ) + ) { + gParse.status = status; + return pERROR; + } + } else { + varInfo->naxis = 1; + varInfo->naxes[0] = 1; + } +} + gParse.nCols++; + thelval->lng = col_cnt; + + return( type ); +} + +static int find_keywd(char *keyname, void *itslval ) +{ + FFSTYPE *thelval = (FFSTYPE*)itslval; + int status, type; + char keyvalue[FLEN_VALUE], dtype; + fitsfile *fptr; + double rval; + int bval; + long ival; + + status = 0; + fptr = gParse.def_fptr; + if( fits_read_keyword( fptr, keyname, keyvalue, NULL, &status ) ) { + if( status == KEY_NO_EXIST ) { + /* Do this since ffgkey doesn't put an error message on stack */ + sprintf(keyvalue, "ffgkey could not find keyword: %s",keyname); + ffpmsg(keyvalue); + } + gParse.status = status; + return( pERROR ); + } + + if( fits_get_keytype( keyvalue, &dtype, &status ) ) { + gParse.status = status; + return( pERROR ); + } + + switch( dtype ) { + case 'C': + fits_read_key_str( fptr, keyname, keyvalue, NULL, &status ); + type = STRING; + strcpy( thelval->str , keyvalue ); + break; + case 'L': + fits_read_key_log( fptr, keyname, &bval, NULL, &status ); + type = BOOLEAN; + thelval->log = bval; + break; + case 'I': + fits_read_key_lng( fptr, keyname, &ival, NULL, &status ); + type = LONG; + thelval->lng = ival; + break; + case 'F': + fits_read_key_dbl( fptr, keyname, &rval, NULL, &status ); + type = DOUBLE; + thelval->dbl = rval; + break; + default: + type = pERROR; + break; + } + + if( status ) { + gParse.status=status; + return pERROR; + } + + return( type ); +} + +static int allocateCol( int nCol, int *status ) +{ + if( (nCol%25)==0 ) { + if( nCol ) { + gParse.colData = (iteratorCol*) realloc( gParse.colData, + (nCol+25)*sizeof(iteratorCol) ); + gParse.varData = (DataInfo *) realloc( gParse.varData, + (nCol+25)*sizeof(DataInfo) ); + } else { + gParse.colData = (iteratorCol*) malloc( 25*sizeof(iteratorCol) ); + gParse.varData = (DataInfo *) malloc( 25*sizeof(DataInfo) ); + } + if( gParse.colData == NULL + || gParse.varData == NULL ) { + if( gParse.colData ) free(gParse.colData); + if( gParse.varData ) free(gParse.varData); + gParse.colData = NULL; + gParse.varData = NULL; + return( *status = MEMORY_ALLOCATION ); + } + } + gParse.varData[nCol].data = NULL; + gParse.varData[nCol].undef = NULL; + return 0; +} + +static int load_column( int varNum, long fRow, long nRows, + void *data, char *undef ) +{ + iteratorCol *var = gParse.colData+varNum; + long nelem,nbytes,row,len,idx; + char **bitStrs, msg[80]; + unsigned char *bytes; + int status = 0, anynul; + + if (gParse.hdutype == IMAGE_HDU) { + /* This test would need to be on a per varNum basis to support + * cross HDU operations */ + fits_read_imgnull(var->fptr, var->datatype, fRow, nRows, + data, undef, &anynul, &status); + if (DEBUG_PIXFILTER) + printf("load_column: IMAGE_HDU fRow=%ld, nRows=%ld => %d\n", + fRow, nRows, status); + } else { + + nelem = nRows * var->repeat; + + switch( var->datatype ) { + case TBYTE: + nbytes = ((var->repeat+7)/8) * nRows; + bytes = (unsigned char *)malloc( nbytes * sizeof(char) ); + + ffgcvb(var->fptr, var->colnum, fRow, 1L, nbytes, + 0, bytes, &anynul, &status); + + nelem = var->repeat; + bitStrs = (char **)data; + for( row=0; rowfptr, var->colnum, fRow, 1L, nRows, + (char **)data, undef, &anynul, &status); + break; + case TLOGICAL: + ffgcfl(var->fptr, var->colnum, fRow, 1L, nelem, + (char *)data, undef, &anynul, &status); + break; + case TLONG: + ffgcfj(var->fptr, var->colnum, fRow, 1L, nelem, + (long *)data, undef, &anynul, &status); + break; + case TDOUBLE: + ffgcfd(var->fptr, var->colnum, fRow, 1L, nelem, + (double *)data, undef, &anynul, &status); + break; + default: + sprintf(msg,"load_column: unexpected datatype %d", var->datatype); + ffpmsg(msg); + } + } + if( status ) { + gParse.status = status; + return pERROR; + } + + return 0; +} + + +/*--------------------------------------------------------------------------*/ +int fits_pixel_filter (PixelFilter * filter, int * status) +/* Evaluate an expression using the data in the input FITS file(s) */ +/*--------------------------------------------------------------------------*/ +{ + parseInfo Info = { 0 }; + int naxis, constant, bitpix; + long nelem, naxes[MAXDIMS]; + int col_cnt; + Node *result; + int datatype; + fitsfile * infptr; + fitsfile * outfptr; + char * DEFAULT_TAGS[] = { "X" }; + char msg[256]; + int writeBlankKwd = 0; /* write BLANK if any output nulls? */ + + DEBUG_PIXFILTER = getenv("DEBUG_PIXFILTER") ? 1 : 0; + + if (*status) + return (*status); + + if (!filter->tag || !filter->tag[0] || !filter->tag[0][0]) { + filter->tag = DEFAULT_TAGS; + if (DEBUG_PIXFILTER) + printf("using default tag '%s'\n", filter->tag[0]); + } + + infptr = filter->ifptr[0]; + outfptr = filter->ofptr; + gParse.pixFilter = filter; + + if (ffiprs(infptr, 0, filter->expression, MAXDIMS, + &Info.datatype, &nelem, &naxis, naxes, status)) { + goto CLEANUP; + } + if (nelem < 0) { + constant = 1; + nelem = -nelem; + } + else + constant = 0; + + { + /* validate result type */ + const char * type = 0; + switch (Info.datatype) { + case TLOGICAL: type = "LOGICAL"; break; + case TLONG: type = "LONG"; break; + case TDOUBLE: type = "DOUBLE"; break; + case TSTRING: type = "STRING"; + *status = pERROR; + ffpmsg("pixel_filter: cannot have string image"); + case TBIT: type = "BIT"; + if (DEBUG_PIXFILTER) + printf("hmm, image from bits?\n"); + break; + default: type = "UNKNOWN?!"; + *status = pERROR; + ffpmsg("pixel_filter: unexpected result datatype"); + } + if (DEBUG_PIXFILTER) + printf("result type is %s [%d]\n", type, Info.datatype); + if (*status) + goto CLEANUP; + } + + if (fits_get_img_param(infptr, MAXDIMS, + &bitpix, &naxis, &naxes[0], status)) { + ffpmsg("pixel_filter: unable to read input image parameters"); + goto CLEANUP; + } + + if (DEBUG_PIXFILTER) + printf("input bitpix %d\n", bitpix); + + if (Info.datatype == TDOUBLE) { + /* for floating point expressions, set the default output image to + bitpix = -32 (float) unless the default is already a double */ + if (bitpix != DOUBLE_IMG) + bitpix = FLOAT_IMG; + } + + /* override output image bitpix if specified by caller */ + if (filter->bitpix) + bitpix = filter->bitpix; + if (DEBUG_PIXFILTER) + printf("output bitpix %d\n", bitpix); + + if (fits_create_img(outfptr, bitpix, naxis, naxes, status)) { + ffpmsg("pixel_filter: unable to create output image"); + goto CLEANUP; + } + + /* transfer keycards */ + { + int i, ncards, more; + if (fits_get_hdrspace(infptr, &ncards, &more, status)) { + ffpmsg("pixel_filter: unable to determine number of keycards"); + goto CLEANUP; + } + + for (i = 1; i <= ncards; ++i) { + + int keyclass; + char card[FLEN_CARD]; + + if (fits_read_record(infptr, i, card, status)) { + sprintf(msg, "pixel_filter: unable to read keycard %d", i); + ffpmsg(msg); + goto CLEANUP; + } + + keyclass = fits_get_keyclass(card); + if (keyclass == TYP_STRUC_KEY) { + /* output structure defined by fits_create_img */ + } + else if (keyclass == TYP_COMM_KEY && i < 12) { + /* assume this is one of the FITS standard comments */ + } + else if (keyclass == TYP_NULL_KEY && bitpix < 0) { + /* do not transfer BLANK to real output image */ + } + else if (keyclass == TYP_SCAL_KEY && bitpix < 0) { + /* do not transfer BZERO, BSCALE to real output image */ + } + else if (fits_write_record(outfptr, card, status)) { + sprintf(msg, "pixel_filter: unable to write keycard '%s' [%d]\n", + card, *status); + ffpmsg(msg); + goto CLEANUP; + } + } + } + + switch (bitpix) { + case BYTE_IMG: datatype = TLONG; Info.datatype = TBYTE; break; + case SHORT_IMG: datatype = TLONG; Info.datatype = TSHORT; break; + case LONG_IMG: datatype = TLONG; Info.datatype = TLONG; break; + case FLOAT_IMG: datatype = TDOUBLE; Info.datatype = TFLOAT; break; + case DOUBLE_IMG: datatype = TDOUBLE; Info.datatype = TDOUBLE; break; + + default: + sprintf(msg, "pixel_filter: unexpected output bitpix %d\n", bitpix); + ffpmsg(msg); + *status = pERROR; + goto CLEANUP; + } + + if (bitpix > 0) { /* arrange for NULLs in output */ + long nullVal = filter->blank; + if (!filter->blank) { + int tstatus = 0; + if (fits_read_key_lng(infptr, "BLANK", &nullVal, 0, &tstatus)) { + + writeBlankKwd = 1; + + if (bitpix == BYTE_IMG) + nullVal = UCHAR_MAX; + else if (bitpix == SHORT_IMG) + nullVal = SHRT_MIN; + else if (bitpix == LONG_IMG) + nullVal = LONG_MIN; + else + printf("unhandled positive output BITPIX %d\n", bitpix); + } + + filter->blank = nullVal; + } + + fits_set_imgnull(outfptr, filter->blank, status); + if (DEBUG_PIXFILTER) + printf("using blank %ld\n", nullVal); + + } + + if (!filter->keyword[0]) { + iteratorCol * colIter; + DataInfo * varInfo; + + /*************************************/ + /* Create new iterator Output Column */ + /*************************************/ + col_cnt = gParse.nCols; + if (allocateCol(col_cnt, status)) + goto CLEANUP; + gParse.nCols++; + + colIter = &gParse.colData[col_cnt]; + colIter->fptr = filter->ofptr; + colIter->iotype = OutputCol; + varInfo = &gParse.varData[col_cnt]; + set_image_col_types(colIter->fptr, "CREATED", bitpix, varInfo, colIter); + + Info.maxRows = -1; + + if (ffiter(gParse.nCols, gParse.colData, 0, + 0, parse_data, &Info, status) == -1) + *status = 0; + else if (*status) + goto CLEANUP; + + if (Info.anyNull) { + if (writeBlankKwd) { + fits_update_key_lng(outfptr, "BLANK", filter->blank, "NULL pixel value", status); + if (*status) + ffpmsg("pixel_filter: unable to write BLANK keyword"); + if (DEBUG_PIXFILTER) { + printf("output has NULLs\n"); + printf("wrote blank [%d]\n", *status); + } + } + } + else if (bitpix > 0) /* never used a null */ + if (fits_set_imgnull(outfptr, -1234554321, status)) + ffpmsg("pixel_filter: unable to reset imgnull"); + } + else { + + /* Put constant result into keyword */ + char * parName = filter->keyword; + char * parInfo = filter->comment; + + result = gParse.Nodes + gParse.resultNode; + switch (Info.datatype) { + case TDOUBLE: + ffukyd(outfptr, parName, result->value.data.dbl, 15, parInfo, status); + break; + case TLONG: + ffukyj(outfptr, parName, result->value.data.lng, parInfo, status); + break; + case TLOGICAL: + ffukyl(outfptr, parName, result->value.data.log, parInfo, status); + break; + case TBIT: + case TSTRING: + ffukys(outfptr, parName, result->value.data.str, parInfo, status); + break; + default: + sprintf(msg, "pixel_filter: unexpected constant result type [%d]\n", + Info.datatype); + ffpmsg(msg); + } + } + +CLEANUP: + ffcprs(); + return (*status); +} diff --git a/software/cfitsio3040/eval_l.c b/software/cfitsio3040/eval_l.c new file mode 100644 index 000000000..45b9919d8 --- /dev/null +++ b/software/cfitsio3040/eval_l.c @@ -0,0 +1,2219 @@ +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define FF_FLEX_MAJOR_VERSION 2 +#define FF_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define FF_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define FF_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define FF_USE_PROTOS +#define FF_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define FF_USE_CONST +#define FF_USE_PROTOS +#endif + +#ifdef FF_USE_CONST +#define ffconst const +#else +#define ffconst +#endif + + +#ifdef FF_USE_PROTOS +#define FF_PROTO(proto) proto +#else +#define FF_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define FF_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define FF_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN ff_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The FFSTATE alias is for lex + * compatibility. + */ +#define FF_START ((ff_start - 1) / 2) +#define FFSTATE FF_START + +/* Action number for EOF rule of a given start state. */ +#define FF_STATE_EOF(state) (FF_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define FF_NEW_FILE ffrestart( ffin ) + +#define FF_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define FF_BUF_SIZE 16384 + +typedef struct ff_buffer_state *FF_BUFFER_STATE; + +extern int ffleng; +extern FILE *ffin, *ffout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * ffless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the ffless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define ffless(n) \ + do \ + { \ + /* Undo effects of setting up fftext. */ \ + *ff_cp = ff_hold_char; \ + FF_RESTORE_FF_MORE_OFFSET \ + ff_c_buf_p = ff_cp = ff_bp + n - FF_MORE_ADJ; \ + FF_DO_BEFORE_ACTION; /* set up fftext again */ \ + } \ + while ( 0 ) + +#define unput(c) ffunput( c, fftext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int ff_size_t; + + +struct ff_buffer_state + { + FILE *ff_input_file; + + char *ff_ch_buf; /* input buffer */ + char *ff_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + ff_size_t ff_buf_size; + + /* Number of characters read into ff_ch_buf, not including EOB + * characters. + */ + int ff_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int ff_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int ff_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int ff_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int ff_fill_buffer; + + int ff_buffer_status; +#define FF_BUFFER_NEW 0 +#define FF_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as FF_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via ffrestart()), so that the user can continue scanning by + * just pointing ffin at a new input file. + */ +#define FF_BUFFER_EOF_PENDING 2 + }; + +static FF_BUFFER_STATE ff_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define FF_CURRENT_BUFFER ff_current_buffer + + +/* ff_hold_char holds the character lost when fftext is formed. */ +static char ff_hold_char; + +static int ff_n_chars; /* number of characters read into ff_ch_buf */ + + +int ffleng; + +/* Points to current character in buffer. */ +static char *ff_c_buf_p = (char *) 0; +static int ff_init = 1; /* whether we need to initialize */ +static int ff_start = 0; /* start state number */ + +/* Flag which is used to allow ffwrap()'s to do buffer switches + * instead of setting up a fresh ffin. A bit of a hack ... + */ +static int ff_did_buffer_switch_on_eof; + +void ffrestart FF_PROTO(( FILE *input_file )); + +void ff_switch_to_buffer FF_PROTO(( FF_BUFFER_STATE new_buffer )); +void ff_load_buffer_state FF_PROTO(( void )); +FF_BUFFER_STATE ff_create_buffer FF_PROTO(( FILE *file, int size )); +void ff_delete_buffer FF_PROTO(( FF_BUFFER_STATE b )); +void ff_init_buffer FF_PROTO(( FF_BUFFER_STATE b, FILE *file )); +void ff_flush_buffer FF_PROTO(( FF_BUFFER_STATE b )); +#define FF_FLUSH_BUFFER ff_flush_buffer( ff_current_buffer ) + +FF_BUFFER_STATE ff_scan_buffer FF_PROTO(( char *base, ff_size_t size )); +FF_BUFFER_STATE ff_scan_string FF_PROTO(( ffconst char *ff_str )); +FF_BUFFER_STATE ff_scan_bytes FF_PROTO(( ffconst char *bytes, int len )); + +static void *ff_flex_alloc FF_PROTO(( ff_size_t )); +static void *ff_flex_realloc FF_PROTO(( void *, ff_size_t )); +static void ff_flex_free FF_PROTO(( void * )); + +#define ff_new_buffer ff_create_buffer + +#define ff_set_interactive(is_interactive) \ + { \ + if ( ! ff_current_buffer ) \ + ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); \ + ff_current_buffer->ff_is_interactive = is_interactive; \ + } + +#define ff_set_bol(at_bol) \ + { \ + if ( ! ff_current_buffer ) \ + ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); \ + ff_current_buffer->ff_at_bol = at_bol; \ + } + +#define FF_AT_BOL() (ff_current_buffer->ff_at_bol) + +typedef unsigned char FF_CHAR; +FILE *ffin = (FILE *) 0, *ffout = (FILE *) 0; +typedef int ff_state_type; +extern char *fftext; +#define fftext_ptr fftext + +static ff_state_type ff_get_previous_state FF_PROTO(( void )); +static ff_state_type ff_try_NUL_trans FF_PROTO(( ff_state_type current_state )); +static int ff_get_next_buffer FF_PROTO(( void )); +static void ff_fatal_error FF_PROTO(( ffconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up fftext. + */ +#define FF_DO_BEFORE_ACTION \ + fftext_ptr = ff_bp; \ + ffleng = (int) (ff_cp - ff_bp); \ + ff_hold_char = *ff_cp; \ + *ff_cp = '\0'; \ + ff_c_buf_p = ff_cp; + +#define FF_NUM_RULES 26 +#define FF_END_OF_BUFFER 27 +static ffconst short int ff_accept[160] = + { 0, + 0, 0, 27, 25, 1, 24, 15, 25, 25, 25, + 25, 25, 25, 25, 7, 5, 21, 25, 20, 10, + 10, 10, 10, 6, 10, 10, 10, 10, 10, 14, + 10, 10, 10, 10, 10, 10, 10, 25, 1, 19, + 0, 9, 0, 8, 0, 10, 17, 0, 0, 0, + 0, 0, 0, 0, 14, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, + 5, 0, 23, 18, 22, 10, 10, 10, 2, 10, + 10, 10, 4, 10, 10, 10, 10, 3, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 16, 0, + + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, 11, 10, + 20, 21, 10, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 12, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0 + } ; + +static ffconst int ff_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 7, 1, 8, 9, 10, + 11, 12, 13, 1, 13, 14, 1, 15, 15, 16, + 16, 16, 16, 16, 16, 17, 17, 1, 1, 18, + 19, 20, 1, 1, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 30, 31, 30, 32, 33, 30, + 34, 35, 30, 36, 37, 30, 30, 38, 30, 30, + 1, 1, 1, 39, 40, 1, 41, 42, 23, 43, + + 44, 45, 46, 28, 47, 30, 30, 48, 30, 49, + 50, 30, 51, 52, 30, 53, 54, 30, 30, 38, + 30, 30, 1, 55, 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, 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, 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, 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, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static ffconst int ff_meta[56] = + { 0, + 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1 + } ; + +static ffconst short int ff_base[167] = + { 0, + 0, 0, 367, 368, 364, 368, 346, 359, 356, 355, + 353, 351, 32, 347, 66, 103, 339, 44, 338, 25, + 52, 316, 26, 315, 34, 133, 48, 61, 125, 368, + 0, 29, 45, 60, 81, 82, 93, 299, 351, 368, + 347, 368, 344, 343, 342, 368, 368, 339, 314, 315, + 313, 294, 295, 293, 368, 121, 164, 307, 301, 70, + 117, 43, 296, 276, 271, 58, 86, 79, 269, 152, + 168, 181, 368, 368, 368, 151, 162, 0, 180, 189, + 190, 191, 309, 196, 199, 205, 204, 211, 214, 207, + 223, 224, 232, 238, 243, 245, 222, 246, 368, 311, + + 310, 279, 282, 278, 259, 262, 258, 252, 286, 295, + 294, 293, 292, 291, 290, 267, 288, 258, 285, 284, + 278, 270, 268, 259, 218, 252, 264, 272, 368, 251, + 368, 368, 260, 280, 283, 236, 222, 230, 193, 184, + 212, 208, 202, 173, 156, 368, 133, 126, 368, 104, + 98, 119, 132, 80, 94, 92, 368, 78, 368, 323, + 325, 329, 333, 68, 67, 337 + } ; + +static ffconst short int ff_def[167] = + { 0, + 159, 1, 159, 159, 159, 159, 159, 160, 161, 162, + 159, 163, 159, 159, 159, 159, 159, 159, 159, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 159, + 165, 164, 164, 164, 164, 164, 164, 159, 159, 159, + 160, 159, 166, 161, 162, 159, 159, 163, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 164, 164, 165, 164, 164, + 164, 164, 26, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 159, 166, + + 166, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 164, + 159, 159, 164, 164, 164, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 0, 159, + 159, 159, 159, 159, 159, 159 + } ; + +static ffconst short int ff_nxt[424] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 4, 14, 4, 15, 16, 16, 16, 17, 18, 19, + 20, 21, 22, 22, 23, 24, 25, 26, 22, 22, + 27, 28, 29, 22, 22, 24, 22, 22, 30, 31, + 32, 21, 22, 33, 24, 34, 22, 35, 36, 37, + 22, 22, 24, 22, 38, 49, 77, 50, 81, 80, + 51, 73, 74, 75, 78, 78, 79, 115, 78, 82, + 78, 76, 84, 78, 52, 116, 53, 90, 54, 56, + 57, 57, 57, 85, 78, 86, 58, 78, 157, 79, + 59, 78, 60, 87, 111, 91, 61, 62, 63, 78, + + 78, 120, 157, 92, 157, 112, 64, 88, 88, 65, + 121, 66, 93, 67, 68, 69, 70, 71, 71, 71, + 78, 78, 124, 158, 94, 96, 72, 72, 125, 122, + 88, 97, 78, 95, 56, 108, 108, 108, 123, 88, + 88, 113, 157, 156, 98, 72, 72, 83, 83, 83, + 155, 154, 114, 83, 83, 83, 83, 83, 83, 89, + 129, 153, 88, 152, 78, 56, 57, 57, 57, 146, + 83, 129, 78, 83, 83, 83, 83, 83, 57, 57, + 57, 70, 71, 71, 71, 130, 47, 72, 72, 129, + 78, 72, 72, 127, 79, 128, 128, 128, 129, 129, + + 129, 78, 74, 75, 131, 129, 72, 72, 129, 73, + 72, 72, 132, 129, 129, 146, 129, 79, 40, 78, + 129, 47, 149, 129, 151, 88, 88, 99, 78, 78, + 78, 129, 129, 129, 150, 78, 74, 75, 78, 133, + 149, 129, 148, 78, 78, 131, 78, 129, 88, 134, + 78, 73, 129, 78, 129, 129, 132, 147, 40, 99, + 129, 78, 78, 78, 47, 99, 108, 108, 108, 129, + 145, 78, 40, 146, 135, 72, 72, 78, 128, 128, + 128, 132, 78, 73, 78, 78, 128, 128, 128, 129, + 78, 131, 129, 47, 72, 72, 146, 75, 74, 78, + + 144, 99, 143, 40, 132, 73, 131, 75, 74, 142, + 141, 140, 139, 138, 137, 136, 101, 101, 129, 78, + 126, 119, 78, 41, 118, 41, 41, 44, 44, 45, + 117, 45, 45, 48, 110, 48, 48, 100, 109, 100, + 100, 107, 106, 105, 104, 103, 102, 42, 46, 159, + 101, 42, 39, 99, 78, 78, 75, 73, 55, 42, + 47, 46, 43, 42, 40, 39, 159, 3, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159 + } ; + +static ffconst short int ff_chk[424] = + { 0, + 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, + 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, 13, 20, 13, 25, 23, + 13, 18, 18, 18, 20, 23, 21, 62, 32, 25, + 165, 164, 27, 25, 13, 62, 13, 32, 13, 15, + 15, 15, 15, 27, 33, 28, 15, 27, 158, 21, + 15, 21, 15, 28, 60, 33, 15, 15, 15, 34, + + 28, 66, 156, 34, 155, 60, 15, 37, 37, 15, + 66, 15, 34, 15, 15, 15, 16, 16, 16, 16, + 35, 36, 68, 154, 35, 36, 16, 16, 68, 67, + 37, 36, 37, 35, 56, 56, 56, 56, 67, 29, + 29, 61, 153, 152, 37, 16, 16, 26, 26, 26, + 151, 150, 61, 26, 26, 26, 26, 26, 26, 29, + 76, 148, 29, 147, 29, 70, 70, 70, 70, 145, + 26, 77, 26, 26, 26, 26, 26, 26, 57, 57, + 57, 71, 71, 71, 71, 77, 144, 57, 57, 79, + 76, 71, 71, 72, 79, 72, 72, 72, 80, 81, + + 82, 77, 80, 81, 82, 84, 57, 57, 85, 84, + 71, 71, 85, 87, 86, 143, 90, 79, 86, 79, + 88, 142, 141, 89, 140, 88, 88, 89, 80, 81, + 82, 97, 91, 92, 139, 84, 91, 92, 85, 87, + 138, 93, 137, 87, 86, 93, 90, 94, 88, 90, + 88, 94, 95, 89, 96, 98, 95, 136, 96, 98, + 130, 97, 91, 92, 130, 126, 108, 108, 108, 133, + 125, 93, 124, 133, 97, 108, 108, 94, 127, 127, + 127, 123, 95, 122, 96, 98, 128, 128, 128, 134, + 130, 121, 135, 134, 108, 108, 135, 120, 119, 133, + + 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, + 107, 106, 105, 104, 103, 102, 101, 100, 83, 134, + 69, 65, 135, 160, 64, 160, 160, 161, 161, 162, + 63, 162, 162, 163, 59, 163, 163, 166, 58, 166, + 166, 54, 53, 52, 51, 50, 49, 48, 45, 44, + 43, 41, 39, 38, 24, 22, 19, 17, 14, 12, + 11, 10, 9, 8, 7, 5, 3, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159 + } ; + +static ff_state_type ff_last_accepting_state; +static char *ff_last_accepting_cpos; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define ffmore() ffmore_used_but_not_detected +#define FF_MORE_ADJ 0 +#define FF_RESTORE_FF_MORE_OFFSET +char *fftext; +#line 1 "eval.l" +#define INITIAL 0 +#line 2 "eval.l" +/************************************************************************/ +/* */ +/* CFITSIO Lexical Parser */ +/* */ +/* This file is one of 3 files containing code which parses an */ +/* arithmetic expression and evaluates it in the context of an input */ +/* FITS file table extension. The CFITSIO lexical parser is divided */ +/* into the following 3 parts/files: the CFITSIO "front-end", */ +/* eval_f.c, contains the interface between the user/CFITSIO and the */ +/* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ +/* input string and parses it into tokens and identifies the FITS */ +/* information required to evaluate the expression (ie, keywords and */ +/* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ +/* receives the FLEX output and determines and performs the actual */ +/* operations. The files eval_l.c and eval_y.c are produced from */ +/* running flex and bison on the files eval.l and eval.y, respectively. */ +/* (flex and bison are available from any GNU archive: see www.gnu.org) */ +/* */ +/* The grammar rules, rather than evaluating the expression in situ, */ +/* builds a tree, or Nodal, structure mapping out the order of */ +/* operations and expression dependencies. This "compilation" process */ +/* allows for much faster processing of multiple rows. This technique */ +/* was developed by Uwe Lammers of the XMM Science Analysis System, */ +/* although the CFITSIO implementation is entirely code original. */ +/* */ +/* */ +/* Modification History: */ +/* */ +/* Kent Blackburn c1992 Original parser code developed for the */ +/* FTOOLS software package, in particular, */ +/* the fselect task. */ +/* Kent Blackburn c1995 BIT column support added */ +/* Peter D Wilson Feb 1998 Vector column support added */ +/* Peter D Wilson May 1998 Ported to CFITSIO library. User */ +/* interface routines written, in essence */ +/* making fselect, fcalc, and maketime */ +/* capabilities available to all tools */ +/* via single function calls. */ +/* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ +/* create a run-time evaluation tree, */ +/* inspired by the work of Uwe Lammers, */ +/* resulting in a speed increase of */ +/* 10-100 times. */ +/* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ +/* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ +/* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ +/* allowing a purely vector-based usage */ +/* */ +/************************************************************************/ + +#include +#include +#include +#ifdef sparc +#include +#else +#include +#endif +#include "eval_defs.h" + +ParseData gParse; /* Global structure holding all parser information */ + +/***** Internal functions *****/ + + int ffGetVariable( char *varName, FFSTYPE *varVal ); + +static int find_variable( char *varName ); +static int expr_read( char *buf, int nbytes ); + +/***** Definitions *****/ + +#define FF_NO_UNPUT /* Don't include FFUNPUT function */ +#define FF_NEVER_INTERACTIVE 1 + +#define MAXCHR 256 +#define MAXBIT 128 + +#define OCT_0 "000" +#define OCT_1 "001" +#define OCT_2 "010" +#define OCT_3 "011" +#define OCT_4 "100" +#define OCT_5 "101" +#define OCT_6 "110" +#define OCT_7 "111" +#define OCT_X "xxx" + +#define HEX_0 "0000" +#define HEX_1 "0001" +#define HEX_2 "0010" +#define HEX_3 "0011" +#define HEX_4 "0100" +#define HEX_5 "0101" +#define HEX_6 "0110" +#define HEX_7 "0111" +#define HEX_8 "1000" +#define HEX_9 "1001" +#define HEX_A "1010" +#define HEX_B "1011" +#define HEX_C "1100" +#define HEX_D "1101" +#define HEX_E "1110" +#define HEX_F "1111" +#define HEX_X "xxxx" + +/* + MJT - 13 June 1996 + read from buffer instead of stdin + (as per old ftools.skel) +*/ +#undef FF_INPUT +#define FF_INPUT(buf,result,max_size) \ + if ( (result = expr_read( (char *) buf, max_size )) < 0 ) \ + FF_FATAL_ERROR( "read() in flex scanner failed" ); + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef FF_SKIP_FFWRAP +#ifdef __cplusplus +extern "C" int ffwrap FF_PROTO(( void )); +#else +extern int ffwrap FF_PROTO(( void )); +#endif +#endif + +#ifndef FF_NO_UNPUT +static void ffunput FF_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef fftext_ptr +static void ff_flex_strncpy FF_PROTO(( char *, ffconst char *, int )); +#endif + +#ifdef FF_NEED_STRLEN +static int ff_flex_strlen FF_PROTO(( ffconst char * )); +#endif + +#ifndef FF_NO_INPUT +#ifdef __cplusplus +static int ffinput FF_PROTO(( void )); +#else +static int input FF_PROTO(( void )); +#endif +#endif + +#if FF_STACK_USED +static int ff_start_stack_ptr = 0; +static int ff_start_stack_depth = 0; +static int *ff_start_stack = 0; +#ifndef FF_NO_PUSH_STATE +static void ff_push_state FF_PROTO(( int new_state )); +#endif +#ifndef FF_NO_POP_STATE +static void ff_pop_state FF_PROTO(( void )); +#endif +#ifndef FF_NO_TOP_STATE +static int ff_top_state FF_PROTO(( void )); +#endif + +#else +#define FF_NO_PUSH_STATE 1 +#define FF_NO_POP_STATE 1 +#define FF_NO_TOP_STATE 1 +#endif + +#ifdef FF_MALLOC_DECL +FF_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef FF_READ_BUF_SIZE +#define FF_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( fftext, ffleng, 1, ffout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or FF_NULL, + * is returned in "result". + */ +#ifndef FF_INPUT +#define FF_INPUT(buf,result,max_size) \ + if ( ff_current_buffer->ff_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( ffin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( ffin ) ) \ + FF_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, ffin )) == 0) \ + && ferror( ffin ) ) \ + FF_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "ffterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef ffterminate +#define ffterminate() return FF_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef FF_START_STACK_INCR +#define FF_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef FF_FATAL_ERROR +#define FF_FATAL_ERROR(msg) ff_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef FF_DECL +#define FF_DECL int fflex FF_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after fftext and ffleng + * have been set up. + */ +#ifndef FF_USER_ACTION +#define FF_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef FF_BREAK +#define FF_BREAK break; +#endif + +#define FF_RULE_SETUP \ + FF_USER_ACTION + +FF_DECL + { + register ff_state_type ff_current_state; + register char *ff_cp, *ff_bp; + register int ff_act; + +#line 142 "eval.l" + + + + if ( ff_init ) + { + ff_init = 0; + +#ifdef FF_USER_INIT + FF_USER_INIT; +#endif + + if ( ! ff_start ) + ff_start = 1; /* first start state */ + + if ( ! ffin ) + ffin = stdin; + + if ( ! ffout ) + ffout = stdout; + + if ( ! ff_current_buffer ) + ff_current_buffer = + ff_create_buffer( ffin, FF_BUF_SIZE ); + + ff_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + ff_cp = ff_c_buf_p; + + /* Support of fftext. */ + *ff_cp = ff_hold_char; + + /* ff_bp points to the position in ff_ch_buf of the start of + * the current run. + */ + ff_bp = ff_cp; + + ff_current_state = ff_start; +ff_match: + do + { + register FF_CHAR ff_c = ff_ec[FF_SC_TO_UI(*ff_cp)]; + if ( ff_accept[ff_current_state] ) + { + ff_last_accepting_state = ff_current_state; + ff_last_accepting_cpos = ff_cp; + } + while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) + { + ff_current_state = (int) ff_def[ff_current_state]; + if ( ff_current_state >= 160 ) + ff_c = ff_meta[(unsigned int) ff_c]; + } + ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; + ++ff_cp; + } + while ( ff_base[ff_current_state] != 368 ); + +ff_find_action: + ff_act = ff_accept[ff_current_state]; + if ( ff_act == 0 ) + { /* have to back up */ + ff_cp = ff_last_accepting_cpos; + ff_current_state = ff_last_accepting_state; + ff_act = ff_accept[ff_current_state]; + } + + FF_DO_BEFORE_ACTION; + + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( ff_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of FF_DO_BEFORE_ACTION */ + *ff_cp = ff_hold_char; + ff_cp = ff_last_accepting_cpos; + ff_current_state = ff_last_accepting_state; + goto ff_find_action; + +case 1: +FF_RULE_SETUP +#line 144 "eval.l" +; + FF_BREAK +case 2: +FF_RULE_SETUP +#line 145 "eval.l" +{ + int len; + len = strlen(fftext); + while (fftext[len] == ' ') + len--; + len = len - 1; + strncpy(fflval.str,&fftext[1],len); + fflval.str[len] = '\0'; + return( BITSTR ); + } + FF_BREAK +case 3: +FF_RULE_SETUP +#line 155 "eval.l" +{ + int len; + char tmpstring[256]; + char bitstring[256]; + len = strlen(fftext); + while (fftext[len] == ' ') + len--; + len = len - 1; + strncpy(tmpstring,&fftext[1],len); + tmpstring[len] = '\0'; + bitstring[0] = '\0'; + len = 0; + while ( tmpstring[len] != '\0') + { + switch ( tmpstring[len] ) + { + case '0': + strcat(bitstring,OCT_0); + break; + case '1': + strcat(bitstring,OCT_1); + break; + case '2': + strcat(bitstring,OCT_2); + break; + case '3': + strcat(bitstring,OCT_3); + break; + case '4': + strcat(bitstring,OCT_4); + break; + case '5': + strcat(bitstring,OCT_5); + break; + case '6': + strcat(bitstring,OCT_6); + break; + case '7': + strcat(bitstring,OCT_7); + break; + case 'x': + case 'X': + strcat(bitstring,OCT_X); + break; + } + len++; + } + strcpy( fflval.str, bitstring ); + return( BITSTR ); + } + FF_BREAK +case 4: +FF_RULE_SETUP +#line 205 "eval.l" +{ + int len; + char tmpstring[256]; + char bitstring[256]; + len = strlen(fftext); + while (fftext[len] == ' ') + len--; + len = len - 1; + strncpy(tmpstring,&fftext[1],len); + tmpstring[len] = '\0'; + bitstring[0] = '\0'; + len = 0; + while ( tmpstring[len] != '\0') + { + switch ( tmpstring[len] ) + { + case '0': + strcat(bitstring,HEX_0); + break; + case '1': + strcat(bitstring,HEX_1); + break; + case '2': + strcat(bitstring,HEX_2); + break; + case '3': + strcat(bitstring,HEX_3); + break; + case '4': + strcat(bitstring,HEX_4); + break; + case '5': + strcat(bitstring,HEX_5); + break; + case '6': + strcat(bitstring,HEX_6); + break; + case '7': + strcat(bitstring,HEX_7); + break; + case '8': + strcat(bitstring,HEX_8); + break; + case '9': + strcat(bitstring,HEX_9); + break; + case 'a': + case 'A': + strcat(bitstring,HEX_A); + break; + case 'b': + case 'B': + strcat(bitstring,HEX_B); + break; + case 'c': + case 'C': + strcat(bitstring,HEX_C); + break; + case 'd': + case 'D': + strcat(bitstring,HEX_D); + break; + case 'e': + case 'E': + strcat(bitstring,HEX_E); + break; + case 'f': + case 'F': + strcat(bitstring,HEX_F); + break; + case 'x': + case 'X': + strcat(bitstring,HEX_X); + break; + } + len++; + } + + strcpy( fflval.str, bitstring ); + return( BITSTR ); + } + FF_BREAK +case 5: +FF_RULE_SETUP +#line 286 "eval.l" +{ + fflval.lng = atol(fftext); + return( LONG ); + } + FF_BREAK +case 6: +FF_RULE_SETUP +#line 290 "eval.l" +{ + if ((fftext[0] == 't') || (fftext[0] == 'T')) + fflval.log = 1; + else + fflval.log = 0; + return( BOOLEAN ); + } + FF_BREAK +case 7: +FF_RULE_SETUP +#line 297 "eval.l" +{ + fflval.dbl = atof(fftext); + return( DOUBLE ); + } + FF_BREAK +case 8: +FF_RULE_SETUP +#line 301 "eval.l" +{ + if( !strcasecmp(fftext,"#PI") ) { + fflval.dbl = (double)(4) * atan((double)(1)); + return( DOUBLE ); + } else if( !strcasecmp(fftext,"#E") ) { + fflval.dbl = exp((double)(1)); + return( DOUBLE ); + } else if( !strcasecmp(fftext,"#DEG") ) { + fflval.dbl = ((double)4)*atan((double)1)/((double)180); + return( DOUBLE ); + } else if( !strcasecmp(fftext,"#ROW") ) { + return( ROWREF ); + } else if( !strcasecmp(fftext,"#NULL") ) { + return( NULLREF ); + } else if( !strcasecmp(fftext,"#SNULL") ) { + return( SNULLREF ); + } else { + int len; + if (fftext[1] == '$') { + len = strlen(fftext) - 3; + fflval.str[0] = '#'; + strncpy(fflval.str+1,&fftext[2],len); + fflval.str[len+1] = '\0'; + fftext = fflval.str; + } + return( (*gParse.getData)(fftext, &fflval) ); + } + } + FF_BREAK +case 9: +FF_RULE_SETUP +#line 329 "eval.l" +{ + int len; + len = strlen(fftext) - 2; + strncpy(fflval.str,&fftext[1],len); + fflval.str[len] = '\0'; + return( STRING ); + } + FF_BREAK +case 10: +FF_RULE_SETUP +#line 336 "eval.l" +{ + int len,type; + + if (fftext[0] == '$') { + len = strlen(fftext) - 2; + strncpy(fflval.str,&fftext[1],len); + fflval.str[len] = '\0'; + fftext = fflval.str; + } + type = ffGetVariable(fftext, &fflval); + return( type ); + } + FF_BREAK +case 11: +FF_RULE_SETUP +#line 348 "eval.l" +{ + char *fname; + int len=0; + fname = &fflval.str[0]; + while( (fname[len]=toupper(fftext[len])) ) len++; + + if( FSTRCMP(fname,"BOX(")==0 + || FSTRCMP(fname,"CIRCLE(")==0 + || FSTRCMP(fname,"ELLIPSE(")==0 + || FSTRCMP(fname,"NEAR(")==0 + || FSTRCMP(fname,"ISNULL(")==0 + ) + /* Return type is always boolean */ + return( BFUNCTION ); + + else if( FSTRCMP(fname,"GTIFILTER(")==0 ) + return( GTIFILTER ); + + else if( FSTRCMP(fname,"REGFILTER(")==0 ) + return( REGFILTER ); + + else + return( FUNCTION ); + } + FF_BREAK +case 12: +FF_RULE_SETUP +#line 372 "eval.l" +{ return( INTCAST ); } + FF_BREAK +case 13: +FF_RULE_SETUP +#line 373 "eval.l" +{ return( FLTCAST ); } + FF_BREAK +case 14: +FF_RULE_SETUP +#line 374 "eval.l" +{ return( POWER ); } + FF_BREAK +case 15: +FF_RULE_SETUP +#line 375 "eval.l" +{ return( NOT ); } + FF_BREAK +case 16: +FF_RULE_SETUP +#line 376 "eval.l" +{ return( OR ); } + FF_BREAK +case 17: +FF_RULE_SETUP +#line 377 "eval.l" +{ return( AND ); } + FF_BREAK +case 18: +FF_RULE_SETUP +#line 378 "eval.l" +{ return( EQ ); } + FF_BREAK +case 19: +FF_RULE_SETUP +#line 379 "eval.l" +{ return( NE ); } + FF_BREAK +case 20: +FF_RULE_SETUP +#line 380 "eval.l" +{ return( GT ); } + FF_BREAK +case 21: +FF_RULE_SETUP +#line 381 "eval.l" +{ return( LT ); } + FF_BREAK +case 22: +FF_RULE_SETUP +#line 382 "eval.l" +{ return( GTE ); } + FF_BREAK +case 23: +FF_RULE_SETUP +#line 383 "eval.l" +{ return( LTE ); } + FF_BREAK +case 24: +FF_RULE_SETUP +#line 384 "eval.l" +{ return( '\n' ); } + FF_BREAK +case 25: +FF_RULE_SETUP +#line 385 "eval.l" +{ return( fftext[0] ); } + FF_BREAK +case 26: +FF_RULE_SETUP +#line 386 "eval.l" +ECHO; + FF_BREAK +case FF_STATE_EOF(INITIAL): + ffterminate(); + + case FF_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int ff_amount_of_matched_text = (int) (ff_cp - fftext_ptr) - 1; + + /* Undo the effects of FF_DO_BEFORE_ACTION. */ + *ff_cp = ff_hold_char; + FF_RESTORE_FF_MORE_OFFSET + + if ( ff_current_buffer->ff_buffer_status == FF_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed ffin at a new source and called + * fflex(). If so, then we have to assure + * consistency between ff_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + ff_n_chars = ff_current_buffer->ff_n_chars; + ff_current_buffer->ff_input_file = ffin; + ff_current_buffer->ff_buffer_status = FF_BUFFER_NORMAL; + } + + /* Note that here we test for ff_c_buf_p "<=" to the position + * of the first EOB in the buffer, since ff_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( ff_c_buf_p <= &ff_current_buffer->ff_ch_buf[ff_n_chars] ) + { /* This was really a NUL. */ + ff_state_type ff_next_state; + + ff_c_buf_p = fftext_ptr + ff_amount_of_matched_text; + + ff_current_state = ff_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * ff_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + ff_next_state = ff_try_NUL_trans( ff_current_state ); + + ff_bp = fftext_ptr + FF_MORE_ADJ; + + if ( ff_next_state ) + { + /* Consume the NUL. */ + ff_cp = ++ff_c_buf_p; + ff_current_state = ff_next_state; + goto ff_match; + } + + else + { + ff_cp = ff_c_buf_p; + goto ff_find_action; + } + } + + else switch ( ff_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + ff_did_buffer_switch_on_eof = 0; + + if ( ffwrap() ) + { + /* Note: because we've taken care in + * ff_get_next_buffer() to have set up + * fftext, we can now set up + * ff_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * FF_NULL, it'll still work - another + * FF_NULL will get returned. + */ + ff_c_buf_p = fftext_ptr + FF_MORE_ADJ; + + ff_act = FF_STATE_EOF(FF_START); + goto do_action; + } + + else + { + if ( ! ff_did_buffer_switch_on_eof ) + FF_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + ff_c_buf_p = + fftext_ptr + ff_amount_of_matched_text; + + ff_current_state = ff_get_previous_state(); + + ff_cp = ff_c_buf_p; + ff_bp = fftext_ptr + FF_MORE_ADJ; + goto ff_match; + + case EOB_ACT_LAST_MATCH: + ff_c_buf_p = + &ff_current_buffer->ff_ch_buf[ff_n_chars]; + + ff_current_state = ff_get_previous_state(); + + ff_cp = ff_c_buf_p; + ff_bp = fftext_ptr + FF_MORE_ADJ; + goto ff_find_action; + } + break; + } + + default: + FF_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of fflex */ + + +/* ff_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int ff_get_next_buffer() + { + register char *dest = ff_current_buffer->ff_ch_buf; + register char *source = fftext_ptr; + register int number_to_move, i; + int ret_val; + + if ( ff_c_buf_p > &ff_current_buffer->ff_ch_buf[ff_n_chars + 1] ) + FF_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( ff_current_buffer->ff_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( ff_c_buf_p - fftext_ptr - FF_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (ff_c_buf_p - fftext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( ff_current_buffer->ff_buffer_status == FF_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + ff_current_buffer->ff_n_chars = ff_n_chars = 0; + + else + { + int num_to_read = + ff_current_buffer->ff_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef FF_USES_REJECT + FF_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + FF_BUFFER_STATE b = ff_current_buffer; + + int ff_c_buf_p_offset = + (int) (ff_c_buf_p - b->ff_ch_buf); + + if ( b->ff_is_our_buffer ) + { + int new_size = b->ff_buf_size * 2; + + if ( new_size <= 0 ) + b->ff_buf_size += b->ff_buf_size / 8; + else + b->ff_buf_size *= 2; + + b->ff_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + ff_flex_realloc( (void *) b->ff_ch_buf, + b->ff_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->ff_ch_buf = 0; + + if ( ! b->ff_ch_buf ) + FF_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + ff_c_buf_p = &b->ff_ch_buf[ff_c_buf_p_offset]; + + num_to_read = ff_current_buffer->ff_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > FF_READ_BUF_SIZE ) + num_to_read = FF_READ_BUF_SIZE; + + /* Read in more data. */ + FF_INPUT( (&ff_current_buffer->ff_ch_buf[number_to_move]), + ff_n_chars, num_to_read ); + + ff_current_buffer->ff_n_chars = ff_n_chars; + } + + if ( ff_n_chars == 0 ) + { + if ( number_to_move == FF_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + ffrestart( ffin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + ff_current_buffer->ff_buffer_status = + FF_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + ff_n_chars += number_to_move; + ff_current_buffer->ff_ch_buf[ff_n_chars] = FF_END_OF_BUFFER_CHAR; + ff_current_buffer->ff_ch_buf[ff_n_chars + 1] = FF_END_OF_BUFFER_CHAR; + + fftext_ptr = &ff_current_buffer->ff_ch_buf[0]; + + return ret_val; + } + + +/* ff_get_previous_state - get the state just before the EOB char was reached */ + +static ff_state_type ff_get_previous_state() + { + register ff_state_type ff_current_state; + register char *ff_cp; + + ff_current_state = ff_start; + + for ( ff_cp = fftext_ptr + FF_MORE_ADJ; ff_cp < ff_c_buf_p; ++ff_cp ) + { + register FF_CHAR ff_c = (*ff_cp ? ff_ec[FF_SC_TO_UI(*ff_cp)] : 1); + if ( ff_accept[ff_current_state] ) + { + ff_last_accepting_state = ff_current_state; + ff_last_accepting_cpos = ff_cp; + } + while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) + { + ff_current_state = (int) ff_def[ff_current_state]; + if ( ff_current_state >= 160 ) + ff_c = ff_meta[(unsigned int) ff_c]; + } + ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; + } + + return ff_current_state; + } + + +/* ff_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = ff_try_NUL_trans( current_state ); + */ + +#ifdef FF_USE_PROTOS +static ff_state_type ff_try_NUL_trans( ff_state_type ff_current_state ) +#else +static ff_state_type ff_try_NUL_trans( ff_current_state ) +ff_state_type ff_current_state; +#endif + { + register int ff_is_jam; + register char *ff_cp = ff_c_buf_p; + + register FF_CHAR ff_c = 1; + if ( ff_accept[ff_current_state] ) + { + ff_last_accepting_state = ff_current_state; + ff_last_accepting_cpos = ff_cp; + } + while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) + { + ff_current_state = (int) ff_def[ff_current_state]; + if ( ff_current_state >= 160 ) + ff_c = ff_meta[(unsigned int) ff_c]; + } + ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; + ff_is_jam = (ff_current_state == 159); + + return ff_is_jam ? 0 : ff_current_state; + } + + +#ifndef FF_NO_UNPUT +#ifdef FF_USE_PROTOS +static void ffunput( int c, register char *ff_bp ) +#else +static void ffunput( c, ff_bp ) +int c; +register char *ff_bp; +#endif + { + register char *ff_cp = ff_c_buf_p; + + /* undo effects of setting up fftext */ + *ff_cp = ff_hold_char; + + if ( ff_cp < ff_current_buffer->ff_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = ff_n_chars + 2; + register char *dest = &ff_current_buffer->ff_ch_buf[ + ff_current_buffer->ff_buf_size + 2]; + register char *source = + &ff_current_buffer->ff_ch_buf[number_to_move]; + + while ( source > ff_current_buffer->ff_ch_buf ) + *--dest = *--source; + + ff_cp += (int) (dest - source); + ff_bp += (int) (dest - source); + ff_current_buffer->ff_n_chars = + ff_n_chars = ff_current_buffer->ff_buf_size; + + if ( ff_cp < ff_current_buffer->ff_ch_buf + 2 ) + FF_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--ff_cp = (char) c; + + + fftext_ptr = ff_bp; + ff_hold_char = *ff_cp; + ff_c_buf_p = ff_cp; + } +#endif /* ifndef FF_NO_UNPUT */ + + +#ifdef __cplusplus +static int ffinput() +#else +static int input() +#endif + { + int c; + + *ff_c_buf_p = ff_hold_char; + + if ( *ff_c_buf_p == FF_END_OF_BUFFER_CHAR ) + { + /* ff_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( ff_c_buf_p < &ff_current_buffer->ff_ch_buf[ff_n_chars] ) + /* This was really a NUL. */ + *ff_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = ff_c_buf_p - fftext_ptr; + ++ff_c_buf_p; + + switch ( ff_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because ff_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + ffrestart( ffin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( ffwrap() ) + return EOF; + + if ( ! ff_did_buffer_switch_on_eof ) + FF_NEW_FILE; +#ifdef __cplusplus + return ffinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + ff_c_buf_p = fftext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) ff_c_buf_p; /* cast for 8-bit char's */ + *ff_c_buf_p = '\0'; /* preserve fftext */ + ff_hold_char = *++ff_c_buf_p; + + + return c; + } + + +#ifdef FF_USE_PROTOS +void ffrestart( FILE *input_file ) +#else +void ffrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! ff_current_buffer ) + ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); + + ff_init_buffer( ff_current_buffer, input_file ); + ff_load_buffer_state(); + } + + +#ifdef FF_USE_PROTOS +void ff_switch_to_buffer( FF_BUFFER_STATE new_buffer ) +#else +void ff_switch_to_buffer( new_buffer ) +FF_BUFFER_STATE new_buffer; +#endif + { + if ( ff_current_buffer == new_buffer ) + return; + + if ( ff_current_buffer ) + { + /* Flush out information for old buffer. */ + *ff_c_buf_p = ff_hold_char; + ff_current_buffer->ff_buf_pos = ff_c_buf_p; + ff_current_buffer->ff_n_chars = ff_n_chars; + } + + ff_current_buffer = new_buffer; + ff_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (ffwrap()) processing, but the only time this flag + * is looked at is after ffwrap() is called, so it's safe + * to go ahead and always set it. + */ + ff_did_buffer_switch_on_eof = 1; + } + + +#ifdef FF_USE_PROTOS +void ff_load_buffer_state( void ) +#else +void ff_load_buffer_state() +#endif + { + ff_n_chars = ff_current_buffer->ff_n_chars; + fftext_ptr = ff_c_buf_p = ff_current_buffer->ff_buf_pos; + ffin = ff_current_buffer->ff_input_file; + ff_hold_char = *ff_c_buf_p; + } + + +#ifdef FF_USE_PROTOS +FF_BUFFER_STATE ff_create_buffer( FILE *file, int size ) +#else +FF_BUFFER_STATE ff_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + FF_BUFFER_STATE b; + + b = (FF_BUFFER_STATE) ff_flex_alloc( sizeof( struct ff_buffer_state ) ); + if ( ! b ) + FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" ); + + b->ff_buf_size = size; + + /* ff_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->ff_ch_buf = (char *) ff_flex_alloc( b->ff_buf_size + 2 ); + if ( ! b->ff_ch_buf ) + FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" ); + + b->ff_is_our_buffer = 1; + + ff_init_buffer( b, file ); + + return b; + } + + +#ifdef FF_USE_PROTOS +void ff_delete_buffer( FF_BUFFER_STATE b ) +#else +void ff_delete_buffer( b ) +FF_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == ff_current_buffer ) + ff_current_buffer = (FF_BUFFER_STATE) 0; + + if ( b->ff_is_our_buffer ) + ff_flex_free( (void *) b->ff_ch_buf ); + + ff_flex_free( (void *) b ); + } + + +#ifndef FF_ALWAYS_INTERACTIVE +#ifndef FF_NEVER_INTERACTIVE +extern int isatty FF_PROTO(( int )); +#endif +#endif + +#ifdef FF_USE_PROTOS +void ff_init_buffer( FF_BUFFER_STATE b, FILE *file ) +#else +void ff_init_buffer( b, file ) +FF_BUFFER_STATE b; +FILE *file; +#endif + + + { + ff_flush_buffer( b ); + + b->ff_input_file = file; + b->ff_fill_buffer = 1; + +#if FF_ALWAYS_INTERACTIVE + b->ff_is_interactive = 1; +#else +#if FF_NEVER_INTERACTIVE + b->ff_is_interactive = 0; +#else + b->ff_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef FF_USE_PROTOS +void ff_flush_buffer( FF_BUFFER_STATE b ) +#else +void ff_flush_buffer( b ) +FF_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->ff_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->ff_ch_buf[0] = FF_END_OF_BUFFER_CHAR; + b->ff_ch_buf[1] = FF_END_OF_BUFFER_CHAR; + + b->ff_buf_pos = &b->ff_ch_buf[0]; + + b->ff_at_bol = 1; + b->ff_buffer_status = FF_BUFFER_NEW; + + if ( b == ff_current_buffer ) + ff_load_buffer_state(); + } + + +#ifndef FF_NO_SCAN_BUFFER +#ifdef FF_USE_PROTOS +FF_BUFFER_STATE ff_scan_buffer( char *base, ff_size_t size ) +#else +FF_BUFFER_STATE ff_scan_buffer( base, size ) +char *base; +ff_size_t size; +#endif + { + FF_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != FF_END_OF_BUFFER_CHAR || + base[size-1] != FF_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (FF_BUFFER_STATE) ff_flex_alloc( sizeof( struct ff_buffer_state ) ); + if ( ! b ) + FF_FATAL_ERROR( "out of dynamic memory in ff_scan_buffer()" ); + + b->ff_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->ff_buf_pos = b->ff_ch_buf = base; + b->ff_is_our_buffer = 0; + b->ff_input_file = 0; + b->ff_n_chars = b->ff_buf_size; + b->ff_is_interactive = 0; + b->ff_at_bol = 1; + b->ff_fill_buffer = 0; + b->ff_buffer_status = FF_BUFFER_NEW; + + ff_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef FF_NO_SCAN_STRING +#ifdef FF_USE_PROTOS +FF_BUFFER_STATE ff_scan_string( ffconst char *ff_str ) +#else +FF_BUFFER_STATE ff_scan_string( ff_str ) +ffconst char *ff_str; +#endif + { + int len; + for ( len = 0; ff_str[len]; ++len ) + ; + + return ff_scan_bytes( ff_str, len ); + } +#endif + + +#ifndef FF_NO_SCAN_BYTES +#ifdef FF_USE_PROTOS +FF_BUFFER_STATE ff_scan_bytes( ffconst char *bytes, int len ) +#else +FF_BUFFER_STATE ff_scan_bytes( bytes, len ) +ffconst char *bytes; +int len; +#endif + { + FF_BUFFER_STATE b; + char *buf; + ff_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) ff_flex_alloc( n ); + if ( ! buf ) + FF_FATAL_ERROR( "out of dynamic memory in ff_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = FF_END_OF_BUFFER_CHAR; + + b = ff_scan_buffer( buf, n ); + if ( ! b ) + FF_FATAL_ERROR( "bad buffer in ff_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->ff_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef FF_NO_PUSH_STATE +#ifdef FF_USE_PROTOS +static void ff_push_state( int new_state ) +#else +static void ff_push_state( new_state ) +int new_state; +#endif + { + if ( ff_start_stack_ptr >= ff_start_stack_depth ) + { + ff_size_t new_size; + + ff_start_stack_depth += FF_START_STACK_INCR; + new_size = ff_start_stack_depth * sizeof( int ); + + if ( ! ff_start_stack ) + ff_start_stack = (int *) ff_flex_alloc( new_size ); + + else + ff_start_stack = (int *) ff_flex_realloc( + (void *) ff_start_stack, new_size ); + + if ( ! ff_start_stack ) + FF_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + ff_start_stack[ff_start_stack_ptr++] = FF_START; + + BEGIN(new_state); + } +#endif + + +#ifndef FF_NO_POP_STATE +static void ff_pop_state() + { + if ( --ff_start_stack_ptr < 0 ) + FF_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(ff_start_stack[ff_start_stack_ptr]); + } +#endif + + +#ifndef FF_NO_TOP_STATE +static int ff_top_state() + { + return ff_start_stack[ff_start_stack_ptr - 1]; + } +#endif + +#ifndef FF_EXIT_FAILURE +#define FF_EXIT_FAILURE 2 +#endif + +#ifdef FF_USE_PROTOS +static void ff_fatal_error( ffconst char msg[] ) +#else +static void ff_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( FF_EXIT_FAILURE ); + } + + + +/* Redefine ffless() so it works in section 3 code. */ + +#undef ffless +#define ffless(n) \ + do \ + { \ + /* Undo effects of setting up fftext. */ \ + fftext[ffleng] = ff_hold_char; \ + ff_c_buf_p = fftext + n; \ + ff_hold_char = *ff_c_buf_p; \ + *ff_c_buf_p = '\0'; \ + ffleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef fftext_ptr +#ifdef FF_USE_PROTOS +static void ff_flex_strncpy( char *s1, ffconst char *s2, int n ) +#else +static void ff_flex_strncpy( s1, s2, n ) +char *s1; +ffconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef FF_NEED_STRLEN +#ifdef FF_USE_PROTOS +static int ff_flex_strlen( ffconst char *s ) +#else +static int ff_flex_strlen( s ) +ffconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef FF_USE_PROTOS +static void *ff_flex_alloc( ff_size_t size ) +#else +static void *ff_flex_alloc( size ) +ff_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef FF_USE_PROTOS +static void *ff_flex_realloc( void *ptr, ff_size_t size ) +#else +static void *ff_flex_realloc( ptr, size ) +void *ptr; +ff_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef FF_USE_PROTOS +static void ff_flex_free( void *ptr ) +#else +static void ff_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if FF_MAIN +int main() + { + fflex(); + return 0; + } +#endif +#line 386 "eval.l" + + +int ffwrap() +{ + /* MJT -- 13 June 1996 + Supplied for compatibility with + pre-2.5.1 versions of flex which + do not recognize %option noffwrap + */ + return(1); +} + +/* + expr_read is lifted from old ftools.skel. + Now we can use any version of flex with + no .skel file necessary! MJT - 13 June 1996 + + keep a memory of how many bytes have been + read previously, so that an unlimited-sized + buffer can be supported. PDW - 28 Feb 1998 +*/ + +static int expr_read(char *buf, int nbytes) +{ + int n; + + n = 0; + if( !gParse.is_eobuf ) { + do { + buf[n++] = gParse.expr[gParse.index++]; + } while ((nlng = varNum; + } + return( type ); +} + +static int find_variable(char *varName) +{ + int i; + + if( gParse.nCols ) + for( i=0; i c2) return(1); + if (c1 == 0) return(0); + s1++; + s2++; + } +} + +int strncasecmp(const char *s1, const char *s2, size_t n) +{ + char c1, c2; + + for (; n-- ;) { + c1 = toupper( *s1 ); + c2 = toupper( *s2 ); + + if (c1 < c2) return(-1); + if (c1 > c2) return(1); + if (c1 == 0) return(0); + s1++; + s2++; + } + return(0); +} + +#endif diff --git a/software/cfitsio3040/eval_tab.h b/software/cfitsio3040/eval_tab.h new file mode 100644 index 000000000..2715f0fd9 --- /dev/null +++ b/software/cfitsio3040/eval_tab.h @@ -0,0 +1,41 @@ +typedef union { + int Node; /* Index of Node */ + double dbl; /* real value */ + long lng; /* integer value */ + char log; /* logical value */ + char str[256]; /* string value */ +} FFSTYPE; +#define BOOLEAN 258 +#define LONG 259 +#define DOUBLE 260 +#define STRING 261 +#define BITSTR 262 +#define FUNCTION 263 +#define BFUNCTION 264 +#define GTIFILTER 265 +#define REGFILTER 266 +#define COLUMN 267 +#define BCOLUMN 268 +#define SCOLUMN 269 +#define BITCOL 270 +#define ROWREF 271 +#define NULLREF 272 +#define SNULLREF 273 +#define OR 274 +#define AND 275 +#define EQ 276 +#define NE 277 +#define GT 278 +#define LT 279 +#define LTE 280 +#define GTE 281 +#define POWER 282 +#define NOT 283 +#define INTCAST 284 +#define FLTCAST 285 +#define UMINUS 286 +#define ACCUM 287 +#define DIFF 288 + + +extern FFSTYPE fflval; diff --git a/software/cfitsio3040/eval_y.c b/software/cfitsio3040/eval_y.c new file mode 100644 index 000000000..6cff65227 --- /dev/null +++ b/software/cfitsio3040/eval_y.c @@ -0,0 +1,7042 @@ + +/* A Bison parser, made from eval.y + by GNU Bison version 1.25 + */ + +#define FFBISON 1 /* Identify Bison output. */ + +#define BOOLEAN 258 +#define LONG 259 +#define DOUBLE 260 +#define STRING 261 +#define BITSTR 262 +#define FUNCTION 263 +#define BFUNCTION 264 +#define GTIFILTER 265 +#define REGFILTER 266 +#define COLUMN 267 +#define BCOLUMN 268 +#define SCOLUMN 269 +#define BITCOL 270 +#define ROWREF 271 +#define NULLREF 272 +#define SNULLREF 273 +#define OR 274 +#define AND 275 +#define EQ 276 +#define NE 277 +#define GT 278 +#define LT 279 +#define LTE 280 +#define GTE 281 +#define POWER 282 +#define NOT 283 +#define INTCAST 284 +#define FLTCAST 285 +#define UMINUS 286 +#define ACCUM 287 +#define DIFF 288 + +#line 1 "eval.y" + +/************************************************************************/ +/* */ +/* CFITSIO Lexical Parser */ +/* */ +/* This file is one of 3 files containing code which parses an */ +/* arithmetic expression and evaluates it in the context of an input */ +/* FITS file table extension. The CFITSIO lexical parser is divided */ +/* into the following 3 parts/files: the CFITSIO "front-end", */ +/* eval_f.c, contains the interface between the user/CFITSIO and the */ +/* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ +/* input string and parses it into tokens and identifies the FITS */ +/* information required to evaluate the expression (ie, keywords and */ +/* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ +/* receives the FLEX output and determines and performs the actual */ +/* operations. The files eval_l.c and eval_y.c are produced from */ +/* running flex and bison on the files eval.l and eval.y, respectively. */ +/* (flex and bison are available from any GNU archive: see www.gnu.org) */ +/* */ +/* The grammar rules, rather than evaluating the expression in situ, */ +/* builds a tree, or Nodal, structure mapping out the order of */ +/* operations and expression dependencies. This "compilation" process */ +/* allows for much faster processing of multiple rows. This technique */ +/* was developed by Uwe Lammers of the XMM Science Analysis System, */ +/* although the CFITSIO implementation is entirely code original. */ +/* */ +/* */ +/* Modification History: */ +/* */ +/* Kent Blackburn c1992 Original parser code developed for the */ +/* FTOOLS software package, in particular, */ +/* the fselect task. */ +/* Kent Blackburn c1995 BIT column support added */ +/* Peter D Wilson Feb 1998 Vector column support added */ +/* Peter D Wilson May 1998 Ported to CFITSIO library. User */ +/* interface routines written, in essence */ +/* making fselect, fcalc, and maketime */ +/* capabilities available to all tools */ +/* via single function calls. */ +/* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ +/* create a run-time evaluation tree, */ +/* inspired by the work of Uwe Lammers, */ +/* resulting in a speed increase of */ +/* 10-100 times. */ +/* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ +/* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ +/* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ +/* allowing a purely vector-based usage */ +/* Craig B Markwardt Jun 2004 Add MEDIAN() function */ +/* Craig B Markwardt Jun 2004 Add SUM(), and MIN/MAX() for bit arrays */ +/* Craig B Markwardt Jun 2004 Allow subscripting of nX bit arrays */ +/* Craig B Markwardt Jun 2004 Implement statistical functions */ +/* NVALID(), AVERAGE(), and STDDEV() */ +/* for integer and floating point vectors */ +/* Craig B Markwardt Jun 2004 Use NULL values for range errors instead*/ +/* of throwing a parse error */ +/* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */ +/* Craig B Markwardt Feb 2005 Add ANGSEP() function */ +/* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/ +/* functions now accept vector arguments */ +/* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */ +/* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/ +/* determine the output dimensions */ +/* */ +/************************************************************************/ + +#define APPROX 1.0e-7 +#include "eval_defs.h" +#include "region.h" +#include + +#include + +#ifndef alloca +#define alloca malloc +#endif + + /* Shrink the initial stack depth to keep local data <32K (mac limit) */ + /* yacc will allocate more space if needed, though. */ +#define FFINITDEPTH 100 + +/***************************************************************/ +/* Replace Bison's BACKUP macro with one that fixes a bug -- */ +/* must update state after popping the stack -- and allows */ +/* popping multiple terms at one time. */ +/***************************************************************/ + +#define FFNEWBACKUP(token, value) \ + do \ + if (ffchar == FFEMPTY ) \ + { ffchar = (token); \ + memcpy( &fflval, &(value), sizeof(value) ); \ + ffchar1 = FFTRANSLATE (ffchar); \ + while (fflen--) FFPOPSTACK; \ + ffstate = *ffssp; \ + goto ffbackup; \ + } \ + else \ + { fferror ("syntax error: cannot back up"); FFERROR; } \ + while (0) + +/***************************************************************/ +/* Useful macros for accessing/testing Nodes */ +/***************************************************************/ + +#define TEST(a) if( (a)<0 ) FFERROR +#define SIZE(a) gParse.Nodes[ a ].value.nelem +#define TYPE(a) gParse.Nodes[ a ].type +#define PROMOTE(a,b) if( TYPE(a) > TYPE(b) ) \ + b = New_Unary( TYPE(a), 0, b ); \ + else if( TYPE(a) < TYPE(b) ) \ + a = New_Unary( TYPE(b), 0, a ); + +/***** Internal functions *****/ + +#ifdef __cplusplus +extern "C" { +#endif + +static int Alloc_Node ( void ); +static void Free_Last_Node( void ); +static void Evaluate_Node ( int thisNode ); + +static int New_Const ( int returnType, void *value, long len ); +static int New_Column( int ColNum ); +static int New_Offset( int ColNum, int offset ); +static int New_Unary ( int returnType, int Op, int Node1 ); +static int New_BinOp ( int returnType, int Node1, int Op, int Node2 ); +static int New_Func ( int returnType, funcOp Op, int nNodes, + int Node1, int Node2, int Node3, int Node4, + int Node5, int Node6, int Node7 ); +static int New_Deref ( int Var, int nDim, + int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ); +static int New_GTI ( char *fname, int Node1, char *start, char *stop ); +static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames ); +static int New_Vector( int subNode ); +static int Close_Vec ( int vecNode ); +static int Locate_Col( Node *this ); +static int Test_Dims ( int Node1, int Node2 ); +static void Copy_Dims ( int Node1, int Node2 ); + +static void Allocate_Ptrs( Node *this ); +static void Do_Unary ( Node *this ); +static void Do_Offset ( Node *this ); +static void Do_BinOp_bit ( Node *this ); +static void Do_BinOp_str ( Node *this ); +static void Do_BinOp_log ( Node *this ); +static void Do_BinOp_lng ( Node *this ); +static void Do_BinOp_dbl ( Node *this ); +static void Do_Func ( Node *this ); +static void Do_Deref ( Node *this ); +static void Do_GTI ( Node *this ); +static void Do_REG ( Node *this ); +static void Do_Vector ( Node *this ); + +static long Search_GTI ( double evtTime, long nGTI, double *start, + double *stop, int ordered ); + +static char saobox (double xcen, double ycen, double xwid, double ywid, + double rot, double xcol, double ycol); +static char ellipse(double xcen, double ycen, double xrad, double yrad, + double rot, double xcol, double ycol); +static char circle (double xcen, double ycen, double rad, + double xcol, double ycol); +static char bnear (double x, double y, double tolerance); +static char bitcmp (char *bitstrm1, char *bitstrm2); +static char bitlgte(char *bits1, int oper, char *bits2); + +static void bitand(char *result, char *bitstrm1, char *bitstrm2); +static void bitor (char *result, char *bitstrm1, char *bitstrm2); +static void bitnot(char *result, char *bits); + +static void fferror(char *msg); + +#ifdef __cplusplus + } +#endif + + +#line 181 "eval.y" +typedef union { + int Node; /* Index of Node */ + double dbl; /* real value */ + long lng; /* integer value */ + char log; /* logical value */ + char str[256]; /* string value */ +} FFSTYPE; +#include + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif + + + +#define FFFINAL 281 +#define FFFLAG -32768 +#define FFNTBASE 53 + +#define FFTRANSLATE(x) ((unsigned)(x) <= 288 ? fftranslate[x] : 61) + +static const char fftranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 49, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 36, 40, 2, 51, + 52, 37, 34, 19, 35, 2, 38, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 21, 2, 2, + 20, 2, 24, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 46, 2, 50, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 22, 39, 23, 29, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 25, 26, 27, 28, 30, 31, 32, + 33, 41, 42, 43, 44, 45, 47, 48 +}; + +#if FFDEBUG != 0 +static const short ffprhs[] = { 0, + 0, 1, 4, 6, 9, 12, 15, 18, 21, 24, + 28, 31, 35, 39, 43, 46, 49, 51, 53, 58, + 62, 66, 70, 75, 82, 91, 102, 115, 118, 122, + 124, 126, 128, 133, 135, 137, 141, 145, 149, 153, + 157, 161, 164, 167, 171, 175, 179, 185, 191, 197, + 200, 204, 208, 212, 216, 222, 232, 237, 244, 253, + 264, 277, 280, 283, 286, 289, 291, 293, 298, 302, + 306, 310, 314, 318, 322, 326, 330, 334, 338, 342, + 346, 350, 354, 358, 362, 366, 370, 374, 378, 382, + 386, 390, 396, 402, 406, 410, 414, 420, 428, 440, + 456, 459, 463, 469, 479, 483, 491, 501, 506, 513, + 522, 533, 546, 549, 553, 555, 557, 562, 564, 568, + 572, 578 +}; + +static const short ffrhs[] = { -1, + 53, 54, 0, 49, 0, 57, 49, 0, 58, 49, + 0, 60, 49, 0, 59, 49, 0, 1, 49, 0, + 22, 58, 0, 55, 19, 58, 0, 22, 57, 0, + 56, 19, 57, 0, 56, 19, 58, 0, 55, 19, + 57, 0, 56, 23, 0, 55, 23, 0, 7, 0, + 15, 0, 15, 22, 57, 23, 0, 59, 40, 59, + 0, 59, 39, 59, 0, 59, 34, 59, 0, 59, + 46, 57, 50, 0, 59, 46, 57, 19, 57, 50, + 0, 59, 46, 57, 19, 57, 19, 57, 50, 0, + 59, 46, 57, 19, 57, 19, 57, 19, 57, 50, + 0, 59, 46, 57, 19, 57, 19, 57, 19, 57, + 19, 57, 50, 0, 42, 59, 0, 51, 59, 52, + 0, 4, 0, 5, 0, 12, 0, 12, 22, 57, + 23, 0, 16, 0, 17, 0, 57, 36, 57, 0, + 57, 34, 57, 0, 57, 35, 57, 0, 57, 37, + 57, 0, 57, 38, 57, 0, 57, 41, 57, 0, + 34, 57, 0, 35, 57, 0, 51, 57, 52, 0, + 57, 37, 58, 0, 58, 37, 57, 0, 58, 24, + 57, 21, 57, 0, 58, 24, 58, 21, 57, 0, + 58, 24, 57, 21, 58, 0, 8, 52, 0, 8, + 58, 52, 0, 8, 60, 52, 0, 8, 59, 52, + 0, 8, 57, 52, 0, 8, 57, 19, 57, 52, + 0, 8, 57, 19, 57, 19, 57, 19, 57, 52, + 0, 57, 46, 57, 50, 0, 57, 46, 57, 19, + 57, 50, 0, 57, 46, 57, 19, 57, 19, 57, + 50, 0, 57, 46, 57, 19, 57, 19, 57, 19, + 57, 50, 0, 57, 46, 57, 19, 57, 19, 57, + 19, 57, 19, 57, 50, 0, 43, 57, 0, 43, + 58, 0, 44, 57, 0, 44, 58, 0, 3, 0, + 13, 0, 13, 22, 57, 23, 0, 59, 27, 59, + 0, 59, 28, 59, 0, 59, 31, 59, 0, 59, + 32, 59, 0, 59, 30, 59, 0, 59, 33, 59, + 0, 57, 30, 57, 0, 57, 31, 57, 0, 57, + 33, 57, 0, 57, 32, 57, 0, 57, 29, 57, + 0, 57, 27, 57, 0, 57, 28, 57, 0, 60, + 27, 60, 0, 60, 28, 60, 0, 60, 30, 60, + 0, 60, 33, 60, 0, 60, 31, 60, 0, 60, + 32, 60, 0, 58, 26, 58, 0, 58, 25, 58, + 0, 58, 27, 58, 0, 58, 28, 58, 0, 57, + 20, 57, 21, 57, 0, 58, 24, 58, 21, 58, + 0, 9, 57, 52, 0, 9, 58, 52, 0, 9, + 60, 52, 0, 8, 58, 19, 58, 52, 0, 9, + 57, 19, 57, 19, 57, 52, 0, 9, 57, 19, + 57, 19, 57, 19, 57, 19, 57, 52, 0, 9, + 57, 19, 57, 19, 57, 19, 57, 19, 57, 19, + 57, 19, 57, 52, 0, 10, 52, 0, 10, 6, + 52, 0, 10, 6, 19, 57, 52, 0, 10, 6, + 19, 57, 19, 6, 19, 6, 52, 0, 11, 6, + 52, 0, 11, 6, 19, 57, 19, 57, 52, 0, + 11, 6, 19, 57, 19, 57, 19, 6, 52, 0, + 58, 46, 57, 50, 0, 58, 46, 57, 19, 57, + 50, 0, 58, 46, 57, 19, 57, 19, 57, 50, + 0, 58, 46, 57, 19, 57, 19, 57, 19, 57, + 50, 0, 58, 46, 57, 19, 57, 19, 57, 19, + 57, 19, 57, 50, 0, 42, 58, 0, 51, 58, + 52, 0, 6, 0, 14, 0, 14, 22, 57, 23, + 0, 18, 0, 51, 60, 52, 0, 60, 34, 60, + 0, 58, 24, 60, 21, 60, 0, 8, 60, 19, + 60, 52, 0 +}; + +#endif + +#if FFDEBUG != 0 +static const short ffrline[] = { 0, + 232, 233, 236, 237, 243, 249, 255, 261, 264, 266, + 279, 281, 294, 305, 319, 323, 327, 332, 334, 343, + 346, 349, 352, 354, 356, 358, 360, 362, 365, 369, + 371, 373, 375, 384, 386, 388, 391, 394, 397, 400, + 403, 406, 408, 410, 412, 416, 420, 439, 458, 477, + 490, 504, 516, 541, 637, 689, 713, 715, 717, 719, + 721, 723, 725, 727, 729, 733, 735, 737, 746, 749, + 752, 755, 758, 761, 764, 767, 770, 773, 776, 779, + 782, 785, 788, 791, 794, 797, 800, 803, 805, 807, + 809, 812, 819, 836, 849, 862, 873, 889, 913, 941, + 978, 982, 986, 989, 993, 997, 1000, 1004, 1006, 1008, + 1010, 1012, 1014, 1016, 1020, 1023, 1025, 1034, 1036, 1038, + 1041, 1053 +}; +#endif + + +#if FFDEBUG != 0 || defined (FFERROR_VERBOSE) + +static const char * const fftname[] = { "$","error","$undefined.","BOOLEAN", +"LONG","DOUBLE","STRING","BITSTR","FUNCTION","BFUNCTION","GTIFILTER","REGFILTER", +"COLUMN","BCOLUMN","SCOLUMN","BITCOL","ROWREF","NULLREF","SNULLREF","','","'='", +"':'","'{'","'}'","'?'","OR","AND","EQ","NE","'~'","GT","LT","LTE","GTE","'+'", +"'-'","'%'","'*'","'/'","'|'","'&'","POWER","NOT","INTCAST","FLTCAST","UMINUS", +"'['","ACCUM","DIFF","'\\n'","']'","'('","')'","lines","line","bvector","vector", +"expr","bexpr","bits","sexpr", NULL +}; +#endif + +static const short ffr1[] = { 0, + 53, 53, 54, 54, 54, 54, 54, 54, 55, 55, + 56, 56, 56, 56, 57, 58, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 60, 60, 60, 60, 60, 60, + 60, 60 +}; + +static const short ffr2[] = { 0, + 0, 2, 1, 2, 2, 2, 2, 2, 2, 3, + 2, 3, 3, 3, 2, 2, 1, 1, 4, 3, + 3, 3, 4, 6, 8, 10, 12, 2, 3, 1, + 1, 1, 4, 1, 1, 3, 3, 3, 3, 3, + 3, 2, 2, 3, 3, 3, 5, 5, 5, 2, + 3, 3, 3, 3, 5, 9, 4, 6, 8, 10, + 12, 2, 2, 2, 2, 1, 1, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 5, 5, 3, 3, 3, 5, 7, 11, 15, + 2, 3, 5, 9, 3, 7, 9, 4, 6, 8, + 10, 12, 2, 3, 1, 1, 4, 1, 3, 3, + 5, 5 +}; + +static const short ffdefact[] = { 1, + 0, 0, 66, 30, 31, 115, 17, 0, 0, 0, + 0, 32, 67, 116, 18, 34, 35, 118, 0, 0, + 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, + 0, 0, 0, 8, 50, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, + 11, 9, 0, 42, 0, 43, 0, 113, 28, 62, + 63, 64, 65, 0, 0, 0, 0, 0, 16, 0, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 54, 0, 51, 53, 0, + 52, 0, 94, 95, 96, 0, 102, 0, 105, 0, + 0, 0, 0, 44, 114, 29, 119, 14, 10, 12, + 13, 0, 80, 81, 79, 75, 76, 78, 77, 37, + 38, 36, 39, 45, 40, 41, 0, 0, 0, 0, + 89, 88, 90, 91, 46, 0, 0, 0, 69, 70, + 73, 71, 72, 74, 22, 21, 20, 0, 82, 83, + 84, 86, 87, 85, 120, 0, 0, 0, 0, 0, + 0, 33, 68, 117, 19, 0, 0, 57, 0, 0, + 0, 0, 108, 28, 0, 0, 23, 0, 55, 97, + 122, 0, 0, 103, 0, 92, 0, 47, 49, 48, + 93, 121, 0, 0, 0, 0, 0, 0, 0, 58, + 0, 109, 0, 24, 0, 0, 98, 0, 0, 106, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 110, 0, 25, 56, 0, 104, 107, 0, 0, 0, + 0, 0, 60, 0, 111, 0, 26, 0, 99, 0, + 0, 0, 0, 61, 112, 27, 0, 0, 100, 0, + 0 +}; + +static const short ffdefgoto[] = { 1, + 27, 28, 29, 57, 55, 42, 53 +}; + +static const short ffpact[] = {-32768, + 294, -20,-32768,-32768,-32768,-32768,-32768, 343, 393, -2, + 24, 2, 33, 41, 43,-32768,-32768,-32768, 393, 393, + 393, 393, 393, 393,-32768, 393,-32768, 8, 67, 1056, + 213, 1336, -17,-32768,-32768, 419, 16, 287, 122, 447, + 72, 1376, 389, -14,-32768, -13, 393, 393, 393, 393, + 1303, 218, 1423, 45, 218, 45, 1303, 57, 59, 45, + 57, 45, 57, 614, 140, 336, 1320, 393,-32768, 393, +-32768, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393,-32768, 393, 393, 393, + 393, 393, 393, 393,-32768, -6, -6, -6, -6, -6, + -6, -6, -6, -6, 393,-32768, 393, 393, 393, 393, + 393, 393, 393,-32768, 393,-32768, 393,-32768,-32768, 393, +-32768, 393,-32768,-32768,-32768, 393,-32768, 393,-32768, 1179, + 1199, 1219, 1239,-32768,-32768,-32768,-32768, 1303, 218, 1303, + 218, 1261, 1393, 1393, 1393, 1406, 1406, 1406, 1406, 134, + 134, 134, 15, 57, 15, 15, 696, 1283, 245, 247, + 132, -25, -9, -9, 15, 720, -6, -6, 20, 20, + 20, 20, 20, 20, 49, 59, 59, 744, 253, 253, + 73, 73, 73, 73,-32768, 475, 163, 1328, 1079, 503, + 1099,-32768,-32768,-32768,-32768, 393, 393,-32768, 393, 393, + 393, 393,-32768, 59, 18, 393,-32768, 393,-32768,-32768, +-32768, 393, 100,-32768, 393, 1359, 768, 1359, 218, 1359, + 218, 1423, 792, 816, 1119, 531, 89, 559, 393,-32768, + 393,-32768, 393,-32768, 393, 393,-32768, 104, 105,-32768, + 840, 864, 888, 641, 1139, 68, 71, 393,-32768, 393, +-32768, 393,-32768,-32768, 393,-32768,-32768, 912, 936, 960, + 587, 393,-32768, 393,-32768, 393,-32768, 393,-32768, 984, + 1008, 1032, 1159,-32768,-32768,-32768, 393, 668,-32768, 126, +-32768 +}; + +static const short ffpgoto[] = {-32768, +-32768,-32768,-32768, -1, 93, 121, 25 +}; + + +#define FFLAST 1457 + + +static const short fftable[] = { 30, + 7, 91, 92, 44, 126, 128, 36, 40, 15, 107, + 108, 93, 109, 110, 111, 112, 113, 51, 54, 56, + 94, 60, 62, 47, 64, 33, 68, 93, 34, 46, + 69, 114, 39, 43, 117, 167, 94, 127, 129, 88, + 89, 90, 91, 92, 168, 130, 131, 132, 133, 45, + 67, 102, 93, 102, 48, 85, 103, 104, 103, 104, + 86, 94, 49, 105, 50, 105, 138, 118, 140, 136, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 155, 156, 157, 70, 158, 103, 104, 71, + 86, 165, 166, 31, 105, 88, 89, 90, 91, 92, + 37, 41, 94, 178, 105, 227, 113, 238, 93, 246, + 247, 52, 160, 186, 58, 61, 63, 94, 65, 256, + 189, 32, 257, 124, 190, 281, 191, 0, 38, 0, + 0, 179, 180, 181, 182, 183, 184, 185, 0, 0, + 120, 0, 59, 0, 188, 0, 66, 0, 107, 108, + 0, 109, 110, 111, 112, 113, 0, 90, 91, 92, + 139, 0, 141, 88, 89, 90, 91, 92, 93, 0, + 83, 84, 0, 121, 85, 154, 93, 94, 0, 86, + 159, 161, 162, 163, 164, 94, 88, 89, 90, 91, + 92, 135, 0, 0, 216, 217, 0, 218, 220, 93, + 223, 0, 0, 0, 224, 0, 225, 0, 94, 187, + 226, 0, 0, 228, 210, 0, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 222, 0, 241, 0, 242, + 0, 243, 0, 244, 245, 0, 88, 89, 90, 91, + 92, 88, 89, 90, 91, 92, 258, 0, 259, 93, + 260, 0, 0, 261, 93, 0, 0, 0, 94, 0, + 270, 95, 271, 94, 272, 200, 273, 201, 88, 89, + 90, 91, 92, 107, 108, 278, 109, 110, 111, 112, + 113, 93, 109, 110, 111, 112, 113, 204, 205, 0, + 94, 219, 221, 280, 2, 0, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 0, 96, 97, 19, 98, 99, 100, 101, + 102, 0, 0, 0, 0, 103, 104, 20, 21, 0, + 0, 0, 105, 0, 0, 22, 23, 24, 119, 0, + 0, 0, 25, 0, 26, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 0, 96, 97, 19, 98, 99, 100, 101, 102, + 0, 0, 0, 0, 103, 104, 20, 21, 0, 0, + 0, 105, 0, 0, 22, 23, 24, 136, 0, 0, + 0, 0, 0, 26, 35, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 0, 0, 0, 19, 107, 108, 0, 109, 110, + 111, 112, 113, 0, 0, 0, 20, 21, 0, 0, + 0, 0, 0, 0, 22, 23, 24, 115, 72, 0, + 125, 0, 0, 26, 0, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 0, 85, + 0, 0, 0, 0, 86, 122, 72, 0, 0, 0, + 116, 0, 0, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 0, 0, 85, 0, 0, + 0, 0, 86, 208, 72, 0, 0, 0, 123, 0, + 0, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 0, 0, 85, 0, 0, 0, 0, + 86, 213, 72, 0, 0, 0, 209, 0, 0, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 0, 85, 0, 0, 0, 0, 86, 236, + 72, 0, 0, 0, 214, 0, 0, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, + 0, 85, 0, 0, 0, 0, 86, 239, 72, 0, + 0, 0, 237, 0, 0, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 0, 85, + 0, 0, 0, 0, 86, 268, 72, 0, 0, 0, + 240, 0, 0, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 0, 0, 85, 0, 0, + 0, 0, 86, 72, 0, 0, 0, 0, 269, 0, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 0, 0, 85, 0, 0, 0, 0, 86, + 72, 0, 0, 0, 0, 134, 0, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, + 0, 85, 0, 0, 0, 0, 86, 72, 0, 0, + 0, 0, 254, 0, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 0, 0, 85, 0, + 0, 0, 0, 86, 197, 72, 0, 0, 0, 279, + 0, 0, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 0, 0, 85, 0, 202, 72, + 0, 86, 0, 0, 0, 198, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, + 85, 0, 206, 72, 0, 86, 0, 0, 0, 203, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 0, 0, 85, 0, 229, 72, 0, 86, + 0, 0, 0, 207, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 0, 0, 85, 0, + 231, 72, 0, 86, 0, 0, 0, 230, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 0, 0, 85, 0, 233, 72, 0, 86, 0, 0, + 0, 232, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 0, 0, 85, 0, 248, 72, + 0, 86, 0, 0, 0, 234, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, + 85, 0, 250, 72, 0, 86, 0, 0, 0, 249, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 0, 0, 85, 0, 252, 72, 0, 86, + 0, 0, 0, 251, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 0, 0, 85, 0, + 262, 72, 0, 86, 0, 0, 0, 253, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 0, 0, 85, 0, 264, 72, 0, 86, 0, 0, + 0, 263, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 0, 0, 85, 0, 266, 72, + 0, 86, 0, 0, 0, 265, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 0, 0, + 85, 0, 0, 72, 0, 86, 0, 0, 0, 267, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 0, 0, 85, 0, 0, 72, 0, 86, + 0, 0, 0, 274, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 0, 0, 85, 0, + 0, 72, 0, 86, 0, 0, 0, 275, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 0, 0, 85, 0, 0, 72, 0, 86, 0, 0, + 0, 276, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 0, 0, 85, 212, 72, 0, + 0, 86, 0, 0, 87, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 215, 72, 85, + 0, 0, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 235, 72, 85, + 0, 0, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 255, 72, 85, + 0, 0, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 277, 72, 85, + 0, 0, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 72, 85, + 0, 192, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 72, 85, + 0, 193, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 72, 85, + 0, 194, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 72, 85, + 0, 195, 0, 0, 86, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 0, 85, + 72, 196, 0, 0, 86, 0, 0, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 0, + 0, 85, 72, 199, 0, 0, 86, 0, 0, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 72, 85, 0, 0, 0, 0, 86, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 0, 85, 0, 0, 107, 108, 86, 109, + 110, 111, 112, 113, 107, 108, 0, 109, 110, 111, + 112, 113, 96, 97, 0, 98, 99, 100, 101, 102, + 0, 137, 0, 0, 103, 104, 0, 0, 0, 211, + 0, 105, 0, 0, 106, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 0, 0, 85, + 0, 0, 96, 97, 86, 98, 99, 100, 101, 102, + 0, 0, 0, 0, 103, 104, 0, 0, 0, 0, + 0, 105, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 0, 0, 85, 0, 0, 0, 0, 86, 80, + 81, 82, 83, 84, 0, 0, 85, 0, 0, 107, + 108, 86, 109, 110, 111, 112, 113 +}; + +static const short ffcheck[] = { 1, + 7, 27, 28, 6, 19, 19, 8, 9, 15, 27, + 28, 37, 30, 31, 32, 33, 34, 19, 20, 21, + 46, 23, 24, 22, 26, 1, 19, 37, 49, 6, + 23, 49, 8, 9, 19, 42, 46, 52, 52, 24, + 25, 26, 27, 28, 51, 47, 48, 49, 50, 52, + 26, 34, 37, 34, 22, 41, 39, 40, 39, 40, + 46, 46, 22, 46, 22, 46, 68, 52, 70, 52, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 19, 88, 39, 40, 23, + 46, 93, 94, 1, 46, 24, 25, 26, 27, 28, + 8, 9, 46, 105, 46, 6, 34, 19, 37, 6, + 6, 19, 88, 115, 22, 23, 24, 46, 26, 52, + 122, 1, 52, 52, 126, 0, 128, -1, 8, -1, + -1, 107, 108, 109, 110, 111, 112, 113, -1, -1, + 19, -1, 22, -1, 120, -1, 26, -1, 27, 28, + -1, 30, 31, 32, 33, 34, -1, 26, 27, 28, + 68, -1, 70, 24, 25, 26, 27, 28, 37, -1, + 37, 38, -1, 52, 41, 83, 37, 46, -1, 46, + 88, 89, 90, 91, 92, 46, 24, 25, 26, 27, + 28, 52, -1, -1, 196, 197, -1, 199, 200, 37, + 202, -1, -1, -1, 206, -1, 208, -1, 46, 117, + 212, -1, -1, 215, 52, -1, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 201, -1, 229, -1, 231, + -1, 233, -1, 235, 236, -1, 24, 25, 26, 27, + 28, 24, 25, 26, 27, 28, 248, -1, 250, 37, + 252, -1, -1, 255, 37, -1, -1, -1, 46, -1, + 262, 49, 264, 46, 266, 21, 268, 21, 24, 25, + 26, 27, 28, 27, 28, 277, 30, 31, 32, 33, + 34, 37, 30, 31, 32, 33, 34, 167, 168, -1, + 46, 199, 200, 0, 1, -1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, -1, 27, 28, 22, 30, 31, 32, 33, + 34, -1, -1, -1, -1, 39, 40, 34, 35, -1, + -1, -1, 46, -1, -1, 42, 43, 44, 52, -1, + -1, -1, 49, -1, 51, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, -1, 27, 28, 22, 30, 31, 32, 33, 34, + -1, -1, -1, -1, 39, 40, 34, 35, -1, -1, + -1, 46, -1, -1, 42, 43, 44, 52, -1, -1, + -1, -1, -1, 51, 52, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, -1, -1, -1, 22, 27, 28, -1, 30, 31, + 32, 33, 34, -1, -1, -1, 34, 35, -1, -1, + -1, -1, -1, -1, 42, 43, 44, 19, 20, -1, + 52, -1, -1, 51, -1, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, -1, 41, + -1, -1, -1, -1, 46, 19, 20, -1, -1, -1, + 52, -1, -1, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, -1, -1, 41, -1, -1, + -1, -1, 46, 19, 20, -1, -1, -1, 52, -1, + -1, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, -1, -1, 41, -1, -1, -1, -1, + 46, 19, 20, -1, -1, -1, 52, -1, -1, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, -1, -1, 41, -1, -1, -1, -1, 46, 19, + 20, -1, -1, -1, 52, -1, -1, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, + -1, 41, -1, -1, -1, -1, 46, 19, 20, -1, + -1, -1, 52, -1, -1, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, -1, 41, + -1, -1, -1, -1, 46, 19, 20, -1, -1, -1, + 52, -1, -1, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, -1, -1, 41, -1, -1, + -1, -1, 46, 20, -1, -1, -1, -1, 52, -1, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, -1, -1, 41, -1, -1, -1, -1, 46, + 20, -1, -1, -1, -1, 52, -1, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, + -1, 41, -1, -1, -1, -1, 46, 20, -1, -1, + -1, -1, 52, -1, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, -1, -1, 41, -1, + -1, -1, -1, 46, 19, 20, -1, -1, -1, 52, + -1, -1, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, -1, -1, 41, -1, 19, 20, + -1, 46, -1, -1, -1, 50, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, -1, -1, + 41, -1, 19, 20, -1, 46, -1, -1, -1, 50, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, -1, -1, 41, -1, 19, 20, -1, 46, + -1, -1, -1, 50, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, -1, -1, 41, -1, + 19, 20, -1, 46, -1, -1, -1, 50, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + -1, -1, 41, -1, 19, 20, -1, 46, -1, -1, + -1, 50, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, -1, -1, 41, -1, 19, 20, + -1, 46, -1, -1, -1, 50, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, -1, -1, + 41, -1, 19, 20, -1, 46, -1, -1, -1, 50, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, -1, -1, 41, -1, 19, 20, -1, 46, + -1, -1, -1, 50, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, -1, -1, 41, -1, + 19, 20, -1, 46, -1, -1, -1, 50, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + -1, -1, 41, -1, 19, 20, -1, 46, -1, -1, + -1, 50, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, -1, -1, 41, -1, 19, 20, + -1, 46, -1, -1, -1, 50, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, -1, -1, + 41, -1, -1, 20, -1, 46, -1, -1, -1, 50, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, -1, -1, 41, -1, -1, 20, -1, 46, + -1, -1, -1, 50, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, -1, -1, 41, -1, + -1, 20, -1, 46, -1, -1, -1, 50, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + -1, -1, 41, -1, -1, 20, -1, 46, -1, -1, + -1, 50, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, -1, -1, 41, 19, 20, -1, + -1, 46, -1, -1, 49, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 19, 20, 41, + -1, -1, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 19, 20, 41, + -1, -1, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 19, 20, 41, + -1, -1, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 19, 20, 41, + -1, -1, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, 20, 41, + -1, 23, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, 20, 41, + -1, 23, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, 20, 41, + -1, 23, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, 20, 41, + -1, 23, -1, -1, 46, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, -1, 41, + 20, 21, -1, -1, 46, -1, -1, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, + -1, 41, 20, 21, -1, -1, 46, -1, -1, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, -1, 20, 41, -1, -1, -1, -1, 46, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, -1, -1, 41, -1, -1, 27, 28, 46, 30, + 31, 32, 33, 34, 27, 28, -1, 30, 31, 32, + 33, 34, 27, 28, -1, 30, 31, 32, 33, 34, + -1, 52, -1, -1, 39, 40, -1, -1, -1, 52, + -1, 46, -1, -1, 49, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, -1, -1, 41, + -1, -1, 27, 28, 46, 30, 31, 32, 33, 34, + -1, -1, -1, -1, 39, 40, -1, -1, -1, -1, + -1, 46, 30, 31, 32, 33, 34, 35, 36, 37, + 38, -1, -1, 41, -1, -1, -1, -1, 46, 34, + 35, 36, 37, 38, -1, -1, 41, -1, -1, 27, + 28, 46, 30, 31, 32, 33, 34 +}; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr1/local/share/bison.simple" + +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#include +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include + #pragma alloca +#else /* not MSDOS, __TURBOC__, or _AIX */ +#ifdef __hpux +#ifdef __cplusplus +extern "C" { +void *alloca (unsigned int); +}; +#else /* not __cplusplus */ +void *alloca (); +#endif /* not __cplusplus */ +#endif /* __hpux */ +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc. */ +#endif /* not GNU C. */ +#endif /* alloca not defined. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + +#define fferrok (fferrstatus = 0) +#define ffclearin (ffchar = FFEMPTY) +#define FFEMPTY -2 +#define FFEOF 0 +#define FFACCEPT return(0) +#define FFABORT return(1) +#define FFERROR goto fferrlab1 +/* Like FFERROR except do call fferror. + This remains here temporarily to ease the + transition to the new meaning of FFERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define FFFAIL goto fferrlab +#define FFRECOVERING() (!!fferrstatus) +#define FFBACKUP(token, value) \ +do \ + if (ffchar == FFEMPTY && fflen == 1) \ + { ffchar = (token), fflval = (value); \ + ffchar1 = FFTRANSLATE (ffchar); \ + FFPOPSTACK; \ + goto ffbackup; \ + } \ + else \ + { fferror ("syntax error: cannot back up"); FFERROR; } \ +while (0) + +#define FFTERROR 1 +#define FFERRCODE 256 + +#ifndef FFPURE +#define FFLEX fflex() +#endif + +#ifdef FFPURE +#ifdef FFLSP_NEEDED +#ifdef FFLEX_PARAM +#define FFLEX fflex(&fflval, &fflloc, FFLEX_PARAM) +#else +#define FFLEX fflex(&fflval, &fflloc) +#endif +#else /* not FFLSP_NEEDED */ +#ifdef FFLEX_PARAM +#define FFLEX fflex(&fflval, FFLEX_PARAM) +#else +#define FFLEX fflex(&fflval) +#endif +#endif /* not FFLSP_NEEDED */ +#endif + +/* If nonreentrant, generate the variables here */ + +#ifndef FFPURE + +int ffchar; /* the lookahead symbol */ +FFSTYPE fflval; /* the semantic value of the */ + /* lookahead symbol */ + +#ifdef FFLSP_NEEDED +FFLTYPE fflloc; /* location data for the lookahead */ + /* symbol */ +#endif + +int ffnerrs; /* number of parse errors so far */ +#endif /* not FFPURE */ + +#if FFDEBUG != 0 +int ffdebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif + +/* FFINITDEPTH indicates the initial size of the parser's stacks */ + +#ifndef FFINITDEPTH +#define FFINITDEPTH 200 +#endif + +/* FFMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ + +#if FFMAXDEPTH == 0 +#undef FFMAXDEPTH +#endif + +#ifndef FFMAXDEPTH +#define FFMAXDEPTH 10000 +#endif + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +int ffparse (void); +#endif + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __ff_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__ff_memcpy (to, from, count) + char *to; + char *from; + int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__ff_memcpy (char *to, char *from, int count) +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#endif +#endif + +#line 196 "/usr1/local/share/bison.simple" + +/* The user can define FFPARSE_PARAM as the name of an argument to be passed + into ffparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef FFPARSE_PARAM +#ifdef __cplusplus +#define FFPARSE_PARAM_ARG void *FFPARSE_PARAM +#define FFPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define FFPARSE_PARAM_ARG FFPARSE_PARAM +#define FFPARSE_PARAM_DECL void *FFPARSE_PARAM; +#endif /* not __cplusplus */ +#else /* not FFPARSE_PARAM */ +#define FFPARSE_PARAM_ARG +#define FFPARSE_PARAM_DECL +#endif /* not FFPARSE_PARAM */ + +int +ffparse(FFPARSE_PARAM_ARG) + FFPARSE_PARAM_DECL +{ + register int ffstate; + register int ffn; + register short *ffssp; + register FFSTYPE *ffvsp; + int fferrstatus; /* number of tokens to shift before error messages enabled */ + int ffchar1 = 0; /* lookahead token as an internal (translated) token number */ + + short ffssa[FFINITDEPTH]; /* the state stack */ + FFSTYPE ffvsa[FFINITDEPTH]; /* the semantic value stack */ + + short *ffss = ffssa; /* refer to the stacks thru separate pointers */ + FFSTYPE *ffvs = ffvsa; /* to allow ffoverflow to reallocate them elsewhere */ + +#ifdef FFLSP_NEEDED + FFLTYPE fflsa[FFINITDEPTH]; /* the location stack */ + FFLTYPE *ffls = fflsa; + FFLTYPE *fflsp; + +#define FFPOPSTACK (ffvsp--, ffssp--, fflsp--) +#else +#define FFPOPSTACK (ffvsp--, ffssp--) +#endif + + int ffstacksize = FFINITDEPTH; + +#ifdef FFPURE + int ffchar; + FFSTYPE fflval; + int ffnerrs; +#ifdef FFLSP_NEEDED + FFLTYPE fflloc; +#endif +#endif + + FFSTYPE ffval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ + + int fflen; + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Starting parse\n"); +#endif + + ffstate = 0; + fferrstatus = 0; + ffnerrs = 0; + ffchar = FFEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + ffssp = ffss - 1; + ffvsp = ffvs; +#ifdef FFLSP_NEEDED + fflsp = ffls; +#endif + +/* Push a new state, which is found in ffstate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +ffnewstate: + + *++ffssp = ffstate; + + if (ffssp >= ffss + ffstacksize - 1) + { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + FFSTYPE *ffvs1 = ffvs; + short *ffss1 = ffss; +#ifdef FFLSP_NEEDED + FFLTYPE *ffls1 = ffls; +#endif + + /* Get the current used size of the three stacks, in elements. */ + int size = ffssp - ffss + 1; + +#ifdef ffoverflow + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef FFLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if ffoverflow is a macro. */ + ffoverflow("parser stack overflow", + &ffss1, size * sizeof (*ffssp), + &ffvs1, size * sizeof (*ffvsp), + &ffls1, size * sizeof (*fflsp), + &ffstacksize); +#else + ffoverflow("parser stack overflow", + &ffss1, size * sizeof (*ffssp), + &ffvs1, size * sizeof (*ffvsp), + &ffstacksize); +#endif + + ffss = ffss1; ffvs = ffvs1; +#ifdef FFLSP_NEEDED + ffls = ffls1; +#endif +#else /* no ffoverflow */ + /* Extend the stack our own way. */ + if (ffstacksize >= FFMAXDEPTH) + { + fferror("parser stack overflow"); + return 2; + } + ffstacksize *= 2; + if (ffstacksize > FFMAXDEPTH) + ffstacksize = FFMAXDEPTH; + ffss = (short *) alloca (ffstacksize * sizeof (*ffssp)); + __ff_memcpy ((char *)ffss, (char *)ffss1, size * sizeof (*ffssp)); + ffvs = (FFSTYPE *) alloca (ffstacksize * sizeof (*ffvsp)); + __ff_memcpy ((char *)ffvs, (char *)ffvs1, size * sizeof (*ffvsp)); +#ifdef FFLSP_NEEDED + ffls = (FFLTYPE *) alloca (ffstacksize * sizeof (*fflsp)); + __ff_memcpy ((char *)ffls, (char *)ffls1, size * sizeof (*fflsp)); +#endif +#endif /* no ffoverflow */ + + ffssp = ffss + size - 1; + ffvsp = ffvs + size - 1; +#ifdef FFLSP_NEEDED + fflsp = ffls + size - 1; +#endif + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Stack size increased to %d\n", ffstacksize); +#endif + + if (ffssp >= ffss + ffstacksize - 1) + FFABORT; + } + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Entering state %d\n", ffstate); +#endif + + goto ffbackup; + ffbackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* ffresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + ffn = ffpact[ffstate]; + if (ffn == FFFLAG) + goto ffdefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* ffchar is either FFEMPTY or FFEOF + or a valid token in external form. */ + + if (ffchar == FFEMPTY) + { +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Reading a token: "); +#endif + ffchar = FFLEX; + } + + /* Convert token to internal form (in ffchar1) for indexing tables with */ + + if (ffchar <= 0) /* This means end of input. */ + { + ffchar1 = 0; + ffchar = FFEOF; /* Don't call FFLEX any more */ + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Now at end of input.\n"); +#endif + } + else + { + ffchar1 = FFTRANSLATE(ffchar); + +#if FFDEBUG != 0 + if (ffdebug) + { + fprintf (stderr, "Next token is %d (%s", ffchar, fftname[ffchar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef FFPRINT + FFPRINT (stderr, ffchar, fflval); +#endif + fprintf (stderr, ")\n"); + } +#endif + } + + ffn += ffchar1; + if (ffn < 0 || ffn > FFLAST || ffcheck[ffn] != ffchar1) + goto ffdefault; + + ffn = fftable[ffn]; + + /* ffn is what to do for this token type in this state. + Negative => reduce, -ffn is rule number. + Positive => shift, ffn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (ffn < 0) + { + if (ffn == FFFLAG) + goto fferrlab; + ffn = -ffn; + goto ffreduce; + } + else if (ffn == 0) + goto fferrlab; + + if (ffn == FFFINAL) + FFACCEPT; + + /* Shift the lookahead token. */ + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Shifting token %d (%s), ", ffchar, fftname[ffchar1]); +#endif + + /* Discard the token being shifted unless it is eof. */ + if (ffchar != FFEOF) + ffchar = FFEMPTY; + + *++ffvsp = fflval; +#ifdef FFLSP_NEEDED + *++fflsp = fflloc; +#endif + + /* count tokens shifted since error; after three, turn off error status. */ + if (fferrstatus) fferrstatus--; + + ffstate = ffn; + goto ffnewstate; + +/* Do the default action for the current state. */ +ffdefault: + + ffn = ffdefact[ffstate]; + if (ffn == 0) + goto fferrlab; + +/* Do a reduction. ffn is the number of a rule to reduce with. */ +ffreduce: + fflen = ffr2[ffn]; + if (fflen > 0) + ffval = ffvsp[1-fflen]; /* implement default value of the action */ + +#if FFDEBUG != 0 + if (ffdebug) + { + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + ffn, ffrline[ffn]); + + /* Print the symbols being reduced, and their result. */ + for (i = ffprhs[ffn]; ffrhs[i] > 0; i++) + fprintf (stderr, "%s ", fftname[ffrhs[i]]); + fprintf (stderr, " -> %s\n", fftname[ffr1[ffn]]); + } +#endif + + + switch (ffn) { + +case 3: +#line 236 "eval.y" +{; + break;} +case 4: +#line 238 "eval.y" +{ if( ffvsp[-1].Node<0 ) { + fferror("Couldn't build node structure: out of memory?"); + FFERROR; } + gParse.resultNode = ffvsp[-1].Node; + ; + break;} +case 5: +#line 244 "eval.y" +{ if( ffvsp[-1].Node<0 ) { + fferror("Couldn't build node structure: out of memory?"); + FFERROR; } + gParse.resultNode = ffvsp[-1].Node; + ; + break;} +case 6: +#line 250 "eval.y" +{ if( ffvsp[-1].Node<0 ) { + fferror("Couldn't build node structure: out of memory?"); + FFERROR; } + gParse.resultNode = ffvsp[-1].Node; + ; + break;} +case 7: +#line 256 "eval.y" +{ if( ffvsp[-1].Node<0 ) { + fferror("Couldn't build node structure: out of memory?"); + FFERROR; } + gParse.resultNode = ffvsp[-1].Node; + ; + break;} +case 8: +#line 261 "eval.y" +{ fferrok; ; + break;} +case 9: +#line 265 "eval.y" +{ ffval.Node = New_Vector( ffvsp[0].Node ); TEST(ffval.Node); ; + break;} +case 10: +#line 267 "eval.y" +{ + if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { + ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); + ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); + } else { + ffval.Node = ffvsp[-2].Node; + } + gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] + = ffvsp[0].Node; + ; + break;} +case 11: +#line 280 "eval.y" +{ ffval.Node = New_Vector( ffvsp[0].Node ); TEST(ffval.Node); ; + break;} +case 12: +#line 282 "eval.y" +{ + if( TYPE(ffvsp[-2].Node) < TYPE(ffvsp[0].Node) ) + TYPE(ffvsp[-2].Node) = TYPE(ffvsp[0].Node); + if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { + ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); + ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); + } else { + ffval.Node = ffvsp[-2].Node; + } + gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] + = ffvsp[0].Node; + ; + break;} +case 13: +#line 295 "eval.y" +{ + if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { + ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); + ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); + } else { + ffval.Node = ffvsp[-2].Node; + } + gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] + = ffvsp[0].Node; + ; + break;} +case 14: +#line 306 "eval.y" +{ + TYPE(ffvsp[-2].Node) = TYPE(ffvsp[0].Node); + if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { + ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); + ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); + } else { + ffval.Node = ffvsp[-2].Node; + } + gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] + = ffvsp[0].Node; + ; + break;} +case 15: +#line 320 "eval.y" +{ ffval.Node = Close_Vec( ffvsp[-1].Node ); TEST(ffval.Node); ; + break;} +case 16: +#line 324 "eval.y" +{ ffval.Node = Close_Vec( ffvsp[-1].Node ); TEST(ffval.Node); ; + break;} +case 17: +#line 328 "eval.y" +{ + ffval.Node = New_Const( BITSTR, ffvsp[0].str, strlen(ffvsp[0].str)+1 ); TEST(ffval.Node); + SIZE(ffval.Node) = strlen(ffvsp[0].str); + ; + break;} +case 18: +#line 333 "eval.y" +{ ffval.Node = New_Column( ffvsp[0].lng ); TEST(ffval.Node); ; + break;} +case 19: +#line 335 "eval.y" +{ + if( TYPE(ffvsp[-1].Node) != LONG + || gParse.Nodes[ffvsp[-1].Node].operation != CONST_OP ) { + fferror("Offset argument must be a constant integer"); + FFERROR; + } + ffval.Node = New_Offset( ffvsp[-3].lng, ffvsp[-1].Node ); TEST(ffval.Node); + ; + break;} +case 20: +#line 344 "eval.y" +{ ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '&', ffvsp[0].Node ); TEST(ffval.Node); + SIZE(ffval.Node) = ( SIZE(ffvsp[-2].Node)>SIZE(ffvsp[0].Node) ? SIZE(ffvsp[-2].Node) : SIZE(ffvsp[0].Node) ); ; + break;} +case 21: +#line 347 "eval.y" +{ ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '|', ffvsp[0].Node ); TEST(ffval.Node); + SIZE(ffval.Node) = ( SIZE(ffvsp[-2].Node)>SIZE(ffvsp[0].Node) ? SIZE(ffvsp[-2].Node) : SIZE(ffvsp[0].Node) ); ; + break;} +case 22: +#line 350 "eval.y" +{ ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '+', ffvsp[0].Node ); TEST(ffval.Node); + SIZE(ffval.Node) = SIZE(ffvsp[-2].Node) + SIZE(ffvsp[0].Node); ; + break;} +case 23: +#line 353 "eval.y" +{ ffval.Node = New_Deref( ffvsp[-3].Node, 1, ffvsp[-1].Node, 0, 0, 0, 0 ); TEST(ffval.Node); ; + break;} +case 24: +#line 355 "eval.y" +{ ffval.Node = New_Deref( ffvsp[-5].Node, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0 ); TEST(ffval.Node); ; + break;} +case 25: +#line 357 "eval.y" +{ ffval.Node = New_Deref( ffvsp[-7].Node, 3, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0 ); TEST(ffval.Node); ; + break;} +case 26: +#line 359 "eval.y" +{ ffval.Node = New_Deref( ffvsp[-9].Node, 4, ffvsp[-7].Node, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, 0 ); TEST(ffval.Node); ; + break;} +case 27: +#line 361 "eval.y" +{ ffval.Node = New_Deref( ffvsp[-11].Node, 5, ffvsp[-9].Node, ffvsp[-7].Node, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node ); TEST(ffval.Node); ; + break;} +case 28: +#line 363 "eval.y" +{ ffval.Node = New_Unary( BITSTR, NOT, ffvsp[0].Node ); TEST(ffval.Node); ; + break;} +case 29: +#line 366 "eval.y" +{ ffval.Node = ffvsp[-1].Node; ; + break;} +case 30: +#line 370 "eval.y" +{ ffval.Node = New_Const( LONG, &(ffvsp[0].lng), sizeof(long) ); TEST(ffval.Node); ; + break;} +case 31: +#line 372 "eval.y" +{ ffval.Node = New_Const( DOUBLE, &(ffvsp[0].dbl), sizeof(double) ); TEST(ffval.Node); ; + break;} +case 32: +#line 374 "eval.y" +{ ffval.Node = New_Column( ffvsp[0].lng ); TEST(ffval.Node); ; + break;} +case 33: +#line 376 "eval.y" +{ + if( TYPE(ffvsp[-1].Node) != LONG + || gParse.Nodes[ffvsp[-1].Node].operation != CONST_OP ) { + fferror("Offset argument must be a constant integer"); + FFERROR; + } + ffval.Node = New_Offset( ffvsp[-3].lng, ffvsp[-1].Node ); TEST(ffval.Node); + ; + break;} +case 34: +#line 385 "eval.y" +{ ffval.Node = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); ; + break;} +case 35: +#line 387 "eval.y" +{ ffval.Node = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); ; + break;} +case 36: +#line 389 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '%', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 37: +#line 392 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '+', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 38: +#line 395 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '-', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 39: +#line 398 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 40: +#line 401 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '/', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 41: +#line 404 "eval.y" +{ PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, POWER, ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 42: +#line 407 "eval.y" +{ ffval.Node = ffvsp[0].Node; ; + break;} +case 43: +#line 409 "eval.y" +{ ffval.Node = New_Unary( TYPE(ffvsp[0].Node), UMINUS, ffvsp[0].Node ); TEST(ffval.Node); ; + break;} +case 44: +#line 411 "eval.y" +{ ffval.Node = ffvsp[-1].Node; ; + break;} +case 45: +#line 413 "eval.y" +{ ffvsp[0].Node = New_Unary( TYPE(ffvsp[-2].Node), 0, ffvsp[0].Node ); + ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 46: +#line 417 "eval.y" +{ ffvsp[-2].Node = New_Unary( TYPE(ffvsp[0].Node), 0, ffvsp[-2].Node ); + ffval.Node = New_BinOp( TYPE(ffvsp[0].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); + TEST(ffval.Node); ; + break;} +case 47: +#line 421 "eval.y" +{ + PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); + if( ! Test_Dims(ffvsp[-2].Node,ffvsp[0].Node) ) { + fferror("Incompatible dimensions in '?:' arguments"); + FFERROR; + } + ffval.Node = New_Func( 0, ifthenelse_fct, 3, ffvsp[-2].Node, ffvsp[0].Node, ffvsp[-4].Node, + 0, 0, 0, 0 ); + TEST(ffval.Node); + if( SIZE(ffvsp[-2].Node)=SIZE(ffvsp[-1].Node) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { + PROMOTE(ffvsp[-3].Node,ffvsp[-1].Node); + ffval.Node = New_Func( 0, defnull_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, + 0, 0, 0, 0 ); + TEST(ffval.Node); + } else { + fferror("Dimensions of DEFNULL arguments " + "are not compatible"); + FFERROR; + } + } else if (FSTRCMP(ffvsp[-4].str,"ARCTAN2(") == 0) { + if( TYPE(ffvsp[-3].Node) != DOUBLE ) ffvsp[-3].Node = New_Unary( DOUBLE, 0, ffvsp[-3].Node ); + if( TYPE(ffvsp[-1].Node) != DOUBLE ) ffvsp[-1].Node = New_Unary( DOUBLE, 0, ffvsp[-1].Node ); + if( Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { + ffval.Node = New_Func( 0, atan2_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0, 0 ); + TEST(ffval.Node); + if( SIZE(ffvsp[-3].Node)=SIZE(ffvsp[-1].Node) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { + ffval.Node = New_Func( 0, defnull_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, + 0, 0, 0, 0 ); + TEST(ffval.Node); + } else { + fferror("Dimensions of DEFNULL arguments are not compatible"); + FFERROR; + } + } else { + fferror("Boolean Function(expr,expr) not supported"); + FFERROR; + } + ; + break;} +case 98: +#line 890 "eval.y" +{ + if( TYPE(ffvsp[-5].Node) != DOUBLE ) ffvsp[-5].Node = New_Unary( DOUBLE, 0, ffvsp[-5].Node ); + if( TYPE(ffvsp[-3].Node) != DOUBLE ) ffvsp[-3].Node = New_Unary( DOUBLE, 0, ffvsp[-3].Node ); + if( TYPE(ffvsp[-1].Node) != DOUBLE ) ffvsp[-1].Node = New_Unary( DOUBLE, 0, ffvsp[-1].Node ); + if( ! (Test_Dims( ffvsp[-5].Node, ffvsp[-3].Node ) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) ) { + fferror("Dimensions of NEAR arguments " + "are not compatible"); + FFERROR; + } else { + if (FSTRCMP(ffvsp[-6].str,"NEAR(") == 0) { + ffval.Node = New_Func( BOOLEAN, near_fct, 3, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, + 0, 0, 0, 0 ); + } else { + fferror("Boolean Function not supported"); + FFERROR; + } + TEST(ffval.Node); + + if( SIZE(ffval.Node)SIZE(ffvsp[-3].Node) ) SIZE(ffval.Node) = SIZE(ffvsp[-1].Node); + } + ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +#line 498 "/usr1/local/share/bison.simple" + + ffvsp -= fflen; + ffssp -= fflen; +#ifdef FFLSP_NEEDED + fflsp -= fflen; +#endif + +#if FFDEBUG != 0 + if (ffdebug) + { + short *ssp1 = ffss - 1; + fprintf (stderr, "state stack now"); + while (ssp1 != ffssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + + *++ffvsp = ffval; + +#ifdef FFLSP_NEEDED + fflsp++; + if (fflen == 0) + { + fflsp->first_line = fflloc.first_line; + fflsp->first_column = fflloc.first_column; + fflsp->last_line = (fflsp-1)->last_line; + fflsp->last_column = (fflsp-1)->last_column; + fflsp->text = 0; + } + else + { + fflsp->last_line = (fflsp+fflen-1)->last_line; + fflsp->last_column = (fflsp+fflen-1)->last_column; + } +#endif + + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ + + ffn = ffr1[ffn]; + + ffstate = ffpgoto[ffn - FFNTBASE] + *ffssp; + if (ffstate >= 0 && ffstate <= FFLAST && ffcheck[ffstate] == *ffssp) + ffstate = fftable[ffstate]; + else + ffstate = ffdefgoto[ffn - FFNTBASE]; + + goto ffnewstate; + +fferrlab: /* here on detecting error */ + + if (! fferrstatus) + /* If not already recovering from an error, report this error. */ + { + ++ffnerrs; + +#ifdef FFERROR_VERBOSE + ffn = ffpact[ffstate]; + + if (ffn > FFFLAG && ffn < FFLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -ffn if nec to avoid negative indexes in ffcheck. */ + for (x = (ffn < 0 ? -ffn : 0); + x < (sizeof(fftname) / sizeof(char *)); x++) + if (ffcheck[x + ffn] == x) + size += strlen(fftname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (ffn < 0 ? -ffn : 0); + x < (sizeof(fftname) / sizeof(char *)); x++) + if (ffcheck[x + ffn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, fftname[x]); + strcat(msg, "'"); + count++; + } + } + fferror(msg); + free(msg); + } + else + fferror ("parse error; also virtual memory exceeded"); + } + else +#endif /* FFERROR_VERBOSE */ + fferror("parse error"); + } + + goto fferrlab1; +fferrlab1: /* here on error raised explicitly by an action */ + + if (fferrstatus == 3) + { + /* if just tried and failed to reuse lookahead token after an error, discard it. */ + + /* return failure if at end of input */ + if (ffchar == FFEOF) + FFABORT; + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Discarding token %d (%s).\n", ffchar, fftname[ffchar1]); +#endif + + ffchar = FFEMPTY; + } + + /* Else will try to reuse lookahead token + after shifting the error token. */ + + fferrstatus = 3; /* Each real token shifted decrements this */ + + goto fferrhandle; + +fferrdefault: /* current state does not do anything special for the error token. */ + +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + ffn = ffdefact[ffstate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (ffn) goto ffdefault; +#endif + +fferrpop: /* pop the current state because it cannot handle the error token */ + + if (ffssp == ffss) FFABORT; + ffvsp--; + ffstate = *--ffssp; +#ifdef FFLSP_NEEDED + fflsp--; +#endif + +#if FFDEBUG != 0 + if (ffdebug) + { + short *ssp1 = ffss - 1; + fprintf (stderr, "Error: state stack now"); + while (ssp1 != ffssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + +fferrhandle: + + ffn = ffpact[ffstate]; + if (ffn == FFFLAG) + goto fferrdefault; + + ffn += FFTERROR; + if (ffn < 0 || ffn > FFLAST || ffcheck[ffn] != FFTERROR) + goto fferrdefault; + + ffn = fftable[ffn]; + if (ffn < 0) + { + if (ffn == FFFLAG) + goto fferrpop; + ffn = -ffn; + goto ffreduce; + } + else if (ffn == 0) + goto fferrpop; + + if (ffn == FFFINAL) + FFACCEPT; + +#if FFDEBUG != 0 + if (ffdebug) + fprintf(stderr, "Shifting error token, "); +#endif + + *++ffvsp = fflval; +#ifdef FFLSP_NEEDED + *++fflsp = fflloc; +#endif + + ffstate = ffn; + goto ffnewstate; +} +#line 1064 "eval.y" + + +/*************************************************************************/ +/* Start of "New" routines which build the expression Nodal structure */ +/*************************************************************************/ + +static int Alloc_Node( void ) +{ + /* Use this for allocation to guarantee *Nodes */ + Node *newNodePtr; /* survives on failure, making it still valid */ + /* while working our way out of this error */ + + if( gParse.nNodes == gParse.nNodesAlloc ) { + if( gParse.Nodes ) { + gParse.nNodesAlloc += gParse.nNodesAlloc; + newNodePtr = (Node *)realloc( gParse.Nodes, + sizeof(Node)*gParse.nNodesAlloc ); + } else { + gParse.nNodesAlloc = 100; + newNodePtr = (Node *)malloc ( sizeof(Node)*gParse.nNodesAlloc ); + } + + if( newNodePtr ) { + gParse.Nodes = newNodePtr; + } else { + gParse.status = MEMORY_ALLOCATION; + return( -1 ); + } + } + + return ( gParse.nNodes++ ); +} + +static void Free_Last_Node( void ) +{ + if( gParse.nNodes ) gParse.nNodes--; +} + +static int New_Const( int returnType, void *value, long len ) +{ + Node *this; + int n; + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = CONST_OP; /* Flag a constant */ + this->DoOp = NULL; + this->nSubNodes = 0; + this->type = returnType; + memcpy( &(this->value.data), value, len ); + this->value.undef = NULL; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } + return(n); +} + +static int New_Column( int ColNum ) +{ + Node *this; + int n, i; + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = -ColNum; + this->DoOp = NULL; + this->nSubNodes = 0; + this->type = gParse.varData[ColNum].type; + this->value.nelem = gParse.varData[ColNum].nelem; + this->value.naxis = gParse.varData[ColNum].naxis; + for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; + } + return(n); +} + +static int New_Offset( int ColNum, int offsetNode ) +{ + Node *this; + int n, i, colNode; + + colNode = New_Column( ColNum ); + if( colNode<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = '{'; + this->DoOp = Do_Offset; + this->nSubNodes = 2; + this->SubNodes[0] = colNode; + this->SubNodes[1] = offsetNode; + this->type = gParse.varData[ColNum].type; + this->value.nelem = gParse.varData[ColNum].nelem; + this->value.naxis = gParse.varData[ColNum].naxis; + for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; + } + return(n); +} + +static int New_Unary( int returnType, int Op, int Node1 ) +{ + Node *this, *that; + int i,n; + + if( Node1<0 ) return(-1); + that = gParse.Nodes + Node1; + + if( !Op ) Op = returnType; + + if( (Op==DOUBLE || Op==FLTCAST) && that->type==DOUBLE ) return( Node1 ); + if( (Op==LONG || Op==INTCAST) && that->type==LONG ) return( Node1 ); + if( (Op==BOOLEAN ) && that->type==BOOLEAN ) return( Node1 ); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = Op; + this->DoOp = Do_Unary; + this->nSubNodes = 1; + this->SubNodes[0] = Node1; + this->type = returnType; + + that = gParse.Nodes + Node1; /* Reset in case .Nodes mv'd */ + this->value.nelem = that->value.nelem; + this->value.naxis = that->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that->value.naxes[i]; + + if( that->operation==CONST_OP ) this->DoOp( this ); + } + return( n ); +} + +static int New_BinOp( int returnType, int Node1, int Op, int Node2 ) +{ + Node *this,*that1,*that2; + int n,i,constant; + + if( Node1<0 || Node2<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = Op; + this->nSubNodes = 2; + this->SubNodes[0]= Node1; + this->SubNodes[1]= Node2; + this->type = returnType; + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + constant = (that1->operation==CONST_OP + && that2->operation==CONST_OP); + if( that1->type!=STRING && that1->type!=BITSTR ) + if( !Test_Dims( Node1, Node2 ) ) { + Free_Last_Node(); + fferror("Array sizes/dims do not match for binary operator"); + return(-1); + } + if( that1->value.nelem == 1 ) that1 = that2; + + this->value.nelem = that1->value.nelem; + this->value.naxis = that1->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that1->value.naxes[i]; + + if ( Op == ACCUM && that1->type == BITSTR ) { + /* ACCUM is rank-reducing on bit strings */ + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } + + /* Both subnodes should be of same time */ + switch( that1->type ) { + case BITSTR: this->DoOp = Do_BinOp_bit; break; + case STRING: this->DoOp = Do_BinOp_str; break; + case BOOLEAN: this->DoOp = Do_BinOp_log; break; + case LONG: this->DoOp = Do_BinOp_lng; break; + case DOUBLE: this->DoOp = Do_BinOp_dbl; break; + } + if( constant ) this->DoOp( this ); + } + return( n ); +} + +static int New_Func( int returnType, funcOp Op, int nNodes, + int Node1, int Node2, int Node3, int Node4, + int Node5, int Node6, int Node7 ) +/* If returnType==0 , use Node1's type and vector sizes as returnType, */ +/* else return a single value of type returnType */ +{ + Node *this, *that; + int i,n,constant; + + if( Node1<0 || Node2<0 || Node3<0 || Node4<0 || + Node5<0 || Node6<0 || Node7<0 ) return(-1); + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->operation = (int)Op; + this->DoOp = Do_Func; + this->nSubNodes = nNodes; + this->SubNodes[0] = Node1; + this->SubNodes[1] = Node2; + this->SubNodes[2] = Node3; + this->SubNodes[3] = Node4; + this->SubNodes[4] = Node5; + this->SubNodes[5] = Node6; + this->SubNodes[6] = Node7; + i = constant = nNodes; /* Functions with zero params are not const */ + if (Op == poirnd_fct) constant = 0; /* Nor is Poisson deviate */ + + while( i-- ) + constant = ( constant && + gParse.Nodes[ this->SubNodes[i] ].operation==CONST_OP ); + + if( returnType ) { + this->type = returnType; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } else { + that = gParse.Nodes + Node1; + this->type = that->type; + this->value.nelem = that->value.nelem; + this->value.naxis = that->value.naxis; + for( i=0; ivalue.naxis; i++ ) + this->value.naxes[i] = that->value.naxes[i]; + } + if( constant ) this->DoOp( this ); + } + return( n ); +} + +static int New_Deref( int Var, int nDim, + int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ) +{ + int n, idx, constant; + long elem=0; + Node *this, *theVar, *theDim[MAXDIMS]; + + if( Var<0 || Dim1<0 || Dim2<0 || Dim3<0 || Dim4<0 || Dim5<0 ) return(-1); + + theVar = gParse.Nodes + Var; + if( theVar->operation==CONST_OP || theVar->value.nelem==1 ) { + fferror("Cannot index a scalar value"); + return(-1); + } + + n = Alloc_Node(); + if( n>=0 ) { + this = gParse.Nodes + n; + this->nSubNodes = nDim+1; + theVar = gParse.Nodes + (this->SubNodes[0]=Var); + theDim[0] = gParse.Nodes + (this->SubNodes[1]=Dim1); + theDim[1] = gParse.Nodes + (this->SubNodes[2]=Dim2); + theDim[2] = gParse.Nodes + (this->SubNodes[3]=Dim3); + theDim[3] = gParse.Nodes + (this->SubNodes[4]=Dim4); + theDim[4] = gParse.Nodes + (this->SubNodes[5]=Dim5); + constant = theVar->operation==CONST_OP; + for( idx=0; idxoperation==CONST_OP); + + for( idx=0; idxvalue.nelem>1 ) { + Free_Last_Node(); + fferror("Cannot use an array as an index value"); + return(-1); + } else if( theDim[idx]->type!=LONG ) { + Free_Last_Node(); + fferror("Index value must be an integer type"); + return(-1); + } + + this->operation = '['; + this->DoOp = Do_Deref; + this->type = theVar->type; + + if( theVar->value.naxis == nDim ) { /* All dimensions specified */ + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + } else if( nDim==1 ) { /* Dereference only one dimension */ + elem=1; + this->value.naxis = theVar->value.naxis-1; + for( idx=0; idxvalue.naxis; idx++ ) { + elem *= ( this->value.naxes[idx] = theVar->value.naxes[idx] ); + } + this->value.nelem = elem; + } else { + Free_Last_Node(); + fferror("Must specify just one or all indices for vector"); + return(-1); + } + if( constant ) this->DoOp( this ); + } + return(n); +} + +extern int ffGetVariable( char *varName, FFSTYPE *varVal ); + +static int New_GTI( char *fname, int Node1, char *start, char *stop ) +{ + fitsfile *fptr; + Node *this, *that0, *that1; + int type,i,n, startCol, stopCol, Node0; + int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat; + char extname[100]; + long nrows; + double timeZeroI[2], timeZeroF[2], dt, timeSpan; + char xcol[20], xexpr[20]; + FFSTYPE colVal; + + if( Node1==-99 ) { + type = ffGetVariable( "TIME", &colVal ); + if( type==COLUMN ) { + Node1 = New_Column( (int)colVal.lng ); + } else { + fferror("Could not build TIME column for GTIFILTER"); + return(-1); + } + } + Node1 = New_Unary( DOUBLE, 0, Node1 ); + Node0 = Alloc_Node(); /* This will hold the START/STOP times */ + if( Node1<0 || Node0<0 ) return(-1); + + /* Record current HDU number in case we need to move within this file */ + + fptr = gParse.def_fptr; + ffghdn( fptr, &evthdu ); + + /* Look for TIMEZERO keywords in current extension */ + + tstat = 0; + if( ffgkyd( fptr, "TIMEZERO", timeZeroI, NULL, &tstat ) ) { + tstat = 0; + if( ffgkyd( fptr, "TIMEZERI", timeZeroI, NULL, &tstat ) ) { + timeZeroI[0] = timeZeroF[0] = 0.0; + } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF, NULL, &tstat ) ) { + timeZeroF[0] = 0.0; + } + } else { + timeZeroF[0] = 0.0; + } + + /* Resolve filename parameter */ + + switch( fname[0] ) { + case '\0': + samefile = 1; + hdunum = 1; + break; + case '[': + samefile = 1; + i = 1; + while( fname[i] != '\0' && fname[i] != ']' ) i++; + if( fname[i] ) { + fname[i] = '\0'; + fname++; + ffexts( fname, &hdunum, extname, &extvers, &movetotype, + xcol, xexpr, &gParse.status ); + if( *extname ) { + ffmnhd( fptr, movetotype, extname, extvers, &gParse.status ); + ffghdn( fptr, &hdunum ); + } else if( hdunum ) { + ffmahd( fptr, ++hdunum, &hdutype, &gParse.status ); + } else if( !gParse.status ) { + fferror("Cannot use primary array for GTI filter"); + return( -1 ); + } + } else { + fferror("File extension specifier lacks closing ']'"); + return( -1 ); + } + break; + case '+': + samefile = 1; + hdunum = atoi( fname ) + 1; + if( hdunum>1 ) + ffmahd( fptr, hdunum, &hdutype, &gParse.status ); + else { + fferror("Cannot use primary array for GTI filter"); + return( -1 ); + } + break; + default: + samefile = 0; + if( ! ffopen( &fptr, fname, READONLY, &gParse.status ) ) + ffghdn( fptr, &hdunum ); + break; + } + if( gParse.status ) return(-1); + + /* If at primary, search for GTI extension */ + + if( hdunum==1 ) { + while( 1 ) { + hdunum++; + if( ffmahd( fptr, hdunum, &hdutype, &gParse.status ) ) break; + if( hdutype==IMAGE_HDU ) continue; + tstat = 0; + if( ffgkys( fptr, "EXTNAME", extname, NULL, &tstat ) ) continue; + ffupch( extname ); + if( strstr( extname, "GTI" ) ) break; + } + if( gParse.status ) { + if( gParse.status==END_OF_FILE ) + fferror("GTI extension not found in this file"); + return(-1); + } + } + + /* Locate START/STOP Columns */ + + ffgcno( fptr, CASEINSEN, start, &startCol, &gParse.status ); + ffgcno( fptr, CASEINSEN, stop, &stopCol, &gParse.status ); + if( gParse.status ) return(-1); + + /* Look for TIMEZERO keywords in GTI extension */ + + tstat = 0; + if( ffgkyd( fptr, "TIMEZERO", timeZeroI+1, NULL, &tstat ) ) { + tstat = 0; + if( ffgkyd( fptr, "TIMEZERI", timeZeroI+1, NULL, &tstat ) ) { + timeZeroI[1] = timeZeroF[1] = 0.0; + } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) { + timeZeroF[1] = 0.0; + } + } else { + timeZeroF[1] = 0.0; + } + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + this->nSubNodes = 2; + this->SubNodes[1] = Node1; + this->operation = (int)gtifilt_fct; + this->DoOp = Do_GTI; + this->type = BOOLEAN; + that1 = gParse.Nodes + Node1; + this->value.nelem = that1->value.nelem; + this->value.naxis = that1->value.naxis; + for( i=0; i < that1->value.naxis; i++ ) + this->value.naxes[i] = that1->value.naxes[i]; + + /* Init START/STOP node to be treated as a "constant" */ + + this->SubNodes[0] = Node0; + that0 = gParse.Nodes + Node0; + that0->operation = CONST_OP; + that0->DoOp = NULL; + that0->value.data.ptr= NULL; + + /* Read in START/STOP times */ + + if( ffgkyj( fptr, "NAXIS2", &nrows, NULL, &gParse.status ) ) + return(-1); + that0->value.nelem = nrows; + if( nrows ) { + + that0->value.data.dblptr = (double*)malloc( 2*nrows*sizeof(double) ); + if( !that0->value.data.dblptr ) { + gParse.status = MEMORY_ALLOCATION; + return(-1); + } + + ffgcvd( fptr, startCol, 1L, 1L, nrows, 0.0, + that0->value.data.dblptr, &i, &gParse.status ); + ffgcvd( fptr, stopCol, 1L, 1L, nrows, 0.0, + that0->value.data.dblptr+nrows, &i, &gParse.status ); + if( gParse.status ) { + free( that0->value.data.dblptr ); + return(-1); + } + + /* Test for fully time-ordered GTI... both START && STOP */ + + that0->type = 1; /* Assume yes */ + i = nrows; + while( --i ) + if( that0->value.data.dblptr[i-1] + >= that0->value.data.dblptr[i] + || that0->value.data.dblptr[i-1+nrows] + >= that0->value.data.dblptr[i+nrows] ) { + that0->type = 0; + break; + } + + /* Handle TIMEZERO offset, if any */ + + dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]); + timeSpan = that0->value.data.dblptr[nrows+nrows-1] + - that0->value.data.dblptr[0]; + + if( fabs( dt / timeSpan ) > 1e-12 ) { + for( i=0; i<(nrows+nrows); i++ ) + that0->value.data.dblptr[i] += dt; + } + } + if( gParse.Nodes[Node1].operation==CONST_OP ) + this->DoOp( this ); + } + + if( samefile ) + ffmahd( fptr, evthdu, &hdutype, &gParse.status ); + else + ffclos( fptr, &gParse.status ); + + return( n ); +} + +static int New_REG( char *fname, int NodeX, int NodeY, char *colNames ) +{ + Node *this, *that0; + int type, n, Node0; + int Xcol, Ycol, tstat; + WCSdata wcs; + SAORegion *Rgn; + char *cX, *cY; + FFSTYPE colVal; + + if( NodeX==-99 ) { + type = ffGetVariable( "X", &colVal ); + if( type==COLUMN ) { + NodeX = New_Column( (int)colVal.lng ); + } else { + fferror("Could not build X column for REGFILTER"); + return(-1); + } + } + if( NodeY==-99 ) { + type = ffGetVariable( "Y", &colVal ); + if( type==COLUMN ) { + NodeY = New_Column( (int)colVal.lng ); + } else { + fferror("Could not build Y column for REGFILTER"); + return(-1); + } + } + NodeX = New_Unary( DOUBLE, 0, NodeX ); + NodeY = New_Unary( DOUBLE, 0, NodeY ); + Node0 = Alloc_Node(); /* This will hold the Region Data */ + if( NodeX<0 || NodeY<0 || Node0<0 ) return(-1); + + if( ! (Test_Dims( NodeX, NodeY ) ) ) { + fferror("Dimensions of REGFILTER arguments are not compatible"); + return (-1); + } + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + this->nSubNodes = 3; + this->SubNodes[0] = Node0; + this->SubNodes[1] = NodeX; + this->SubNodes[2] = NodeY; + this->operation = (int)regfilt_fct; + this->DoOp = Do_REG; + this->type = BOOLEAN; + this->value.nelem = 1; + this->value.naxis = 1; + this->value.naxes[0] = 1; + + Copy_Dims(n, NodeX); + if( SIZE(NodeX)operation = CONST_OP; + that0->DoOp = NULL; + + /* Identify what columns to use for WCS information */ + + Xcol = Ycol = 0; + if( *colNames ) { + /* Use the column names in this string for WCS info */ + while( *colNames==' ' ) colNames++; + cX = cY = colNames; + while( *cY && *cY!=' ' && *cY!=',' ) cY++; + if( *cY ) + *(cY++) = '\0'; + while( *cY==' ' ) cY++; + if( !*cY ) { + fferror("Could not extract valid pair of column names from REGFILTER"); + Free_Last_Node(); + return( -1 ); + } + fits_get_colnum( gParse.def_fptr, CASEINSEN, cX, &Xcol, + &gParse.status ); + fits_get_colnum( gParse.def_fptr, CASEINSEN, cY, &Ycol, + &gParse.status ); + if( gParse.status ) { + fferror("Could not locate columns indicated for WCS info"); + Free_Last_Node(); + return( -1 ); + } + + } else { + /* Try to find columns used in X/Y expressions */ + Xcol = Locate_Col( gParse.Nodes + NodeX ); + Ycol = Locate_Col( gParse.Nodes + NodeY ); + if( Xcol<0 || Ycol<0 ) { + fferror("Found multiple X/Y column references in REGFILTER"); + Free_Last_Node(); + return( -1 ); + } + } + + /* Now, get the WCS info, if it exists, from the indicated columns */ + wcs.exists = 0; + if( Xcol>0 && Ycol>0 ) { + tstat = 0; + ffgtcs( gParse.def_fptr, Xcol, Ycol, + &wcs.xrefval, &wcs.yrefval, + &wcs.xrefpix, &wcs.yrefpix, + &wcs.xinc, &wcs.yinc, + &wcs.rot, wcs.type, + &tstat ); + if( tstat==NO_WCS_KEY ) { + wcs.exists = 0; + } else if( tstat ) { + gParse.status = tstat; + Free_Last_Node(); + return( -1 ); + } else { + wcs.exists = 1; + } + } + + /* Read in Region file */ + + fits_read_rgnfile( fname, &wcs, &Rgn, &gParse.status ); + if( gParse.status ) { + Free_Last_Node(); + return( -1 ); + } + + that0->value.data.ptr = Rgn; + + if( gParse.Nodes[NodeX].operation==CONST_OP + && gParse.Nodes[NodeY].operation==CONST_OP ) + this->DoOp( this ); + } + + return( n ); +} + +static int New_Vector( int subNode ) +{ + Node *this, *that; + int n; + + n = Alloc_Node(); + if( n >= 0 ) { + this = gParse.Nodes + n; + that = gParse.Nodes + subNode; + this->type = that->type; + this->nSubNodes = 1; + this->SubNodes[0] = subNode; + this->operation = '{'; + this->DoOp = Do_Vector; + } + + return( n ); +} + +static int Close_Vec( int vecNode ) +{ + Node *this; + int n, nelem=0; + + this = gParse.Nodes + vecNode; + for( n=0; n < this->nSubNodes; n++ ) { + if( TYPE( this->SubNodes[n] ) != this->type ) { + this->SubNodes[n] = New_Unary( this->type, 0, this->SubNodes[n] ); + if( this->SubNodes[n]<0 ) return(-1); + } + nelem += SIZE(this->SubNodes[n]); + } + this->value.naxis = 1; + this->value.nelem = nelem; + this->value.naxes[0] = nelem; + + return( vecNode ); +} + +static int Locate_Col( Node *this ) +/* Locate the TABLE column number of any columns in "this" calculation. */ +/* Return ZERO if none found, or negative if more than 1 found. */ +{ + Node *that; + int i, col=0, newCol, nfound=0; + + if( this->nSubNodes==0 + && this->operation<=0 && this->operation!=CONST_OP ) + return gParse.colData[ - this->operation].colnum; + + for( i=0; inSubNodes; i++ ) { + that = gParse.Nodes + this->SubNodes[i]; + if( that->operation>0 ) { + newCol = Locate_Col( that ); + if( newCol<=0 ) { + nfound += -newCol; + } else { + if( !nfound ) { + col = newCol; + nfound++; + } else if( col != newCol ) { + nfound++; + } + } + } else if( that->operation!=CONST_OP ) { + /* Found a Column */ + newCol = gParse.colData[- that->operation].colnum; + if( !nfound ) { + col = newCol; + nfound++; + } else if( col != newCol ) { + nfound++; + } + } + } + if( nfound!=1 ) + return( - nfound ); + else + return( col ); +} + +static int Test_Dims( int Node1, int Node2 ) +{ + Node *that1, *that2; + int valid, i; + + if( Node1<0 || Node2<0 ) return(0); + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + + if( that1->value.nelem==1 || that2->value.nelem==1 ) + valid = 1; + else if( that1->type==that2->type + && that1->value.nelem==that2->value.nelem + && that1->value.naxis==that2->value.naxis ) { + valid = 1; + for( i=0; ivalue.naxis; i++ ) { + if( that1->value.naxes[i]!=that2->value.naxes[i] ) + valid = 0; + } + } else + valid = 0; + return( valid ); +} + +static void Copy_Dims( int Node1, int Node2 ) +{ + Node *that1, *that2; + int i; + + if( Node1<0 || Node2<0 ) return; + + that1 = gParse.Nodes + Node1; + that2 = gParse.Nodes + Node2; + + that1->value.nelem = that2->value.nelem; + that1->value.naxis = that2->value.naxis; + for( i=0; ivalue.naxis; i++ ) + that1->value.naxes[i] = that2->value.naxes[i]; +} + +/********************************************************************/ +/* Routines for actually evaluating the expression start here */ +/********************************************************************/ + +void Evaluate_Parser( long firstRow, long nRows ) + /***********************************************************************/ + /* Reset the parser for processing another batch of data... */ + /* firstRow: Row number of the first element to evaluate */ + /* nRows: Number of rows to be processed */ + /* Initialize each COLUMN node so that its UNDEF and DATA pointers */ + /* point to the appropriate column arrays. */ + /* Finally, call Evaluate_Node for final node. */ + /***********************************************************************/ +{ + int i, column; + long offset, rowOffset; + + gParse.firstRow = firstRow; + gParse.nRows = nRows; + + /* Reset Column Nodes' pointers to point to right data and UNDEF arrays */ + + rowOffset = firstRow - gParse.firstDataRow; + for( i=0; i 0 + || gParse.Nodes[i].operation == CONST_OP ) continue; + + column = -gParse.Nodes[i].operation; + offset = gParse.varData[column].nelem * rowOffset; + + gParse.Nodes[i].value.undef = gParse.varData[column].undef + offset; + + switch( gParse.Nodes[i].type ) { + case BITSTR: + gParse.Nodes[i].value.data.strptr = + (char**)gParse.varData[column].data + rowOffset; + gParse.Nodes[i].value.undef = NULL; + break; + case STRING: + gParse.Nodes[i].value.data.strptr = + (char**)gParse.varData[column].data + rowOffset; + gParse.Nodes[i].value.undef = gParse.varData[column].undef + rowOffset; + break; + case BOOLEAN: + gParse.Nodes[i].value.data.logptr = + (char*)gParse.varData[column].data + offset; + break; + case LONG: + gParse.Nodes[i].value.data.lngptr = + (long*)gParse.varData[column].data + offset; + break; + case DOUBLE: + gParse.Nodes[i].value.data.dblptr = + (double*)gParse.varData[column].data + offset; + break; + } + } + + Evaluate_Node( gParse.resultNode ); +} + +static void Evaluate_Node( int thisNode ) + /**********************************************************************/ + /* Recursively evaluate thisNode's subNodes, then call one of the */ + /* Do_ functions pointed to by thisNode's DoOp element. */ + /**********************************************************************/ +{ + Node *this; + int i; + + if( gParse.status ) return; + + this = gParse.Nodes + thisNode; + if( this->operation>0 ) { /* <=0 indicate constants and columns */ + i = this->nSubNodes; + while( i-- ) { + Evaluate_Node( this->SubNodes[i] ); + if( gParse.status ) return; + } + this->DoOp( this ); + } +} + +static void Allocate_Ptrs( Node *this ) +{ + long elem, row, size; + + if( this->type==BITSTR || this->type==STRING ) { + + this->value.data.strptr = (char**)malloc( gParse.nRows + * sizeof(char*) ); + if( this->value.data.strptr ) { + this->value.data.strptr[0] = (char*)malloc( gParse.nRows + * (this->value.nelem+2) + * sizeof(char) ); + if( this->value.data.strptr[0] ) { + row = 0; + while( (++row)value.data.strptr[row] = + this->value.data.strptr[row-1] + this->value.nelem+1; + } + if( this->type==STRING ) { + this->value.undef = this->value.data.strptr[row-1] + + this->value.nelem+1; + } else { + this->value.undef = NULL; /* BITSTRs don't use undef array */ + } + } else { + gParse.status = MEMORY_ALLOCATION; + free( this->value.data.strptr ); + } + } else { + gParse.status = MEMORY_ALLOCATION; + } + + } else { + + elem = this->value.nelem * gParse.nRows; + switch( this->type ) { + case DOUBLE: size = sizeof( double ); break; + case LONG: size = sizeof( long ); break; + case BOOLEAN: size = sizeof( char ); break; + default: size = 1; break; + } + + this->value.data.ptr = calloc(size+1, elem); + + if( this->value.data.ptr==NULL ) { + gParse.status = MEMORY_ALLOCATION; + } else { + this->value.undef = (char *)this->value.data.ptr + elem*size; + } + } +} + +static void Do_Unary( Node *this ) +{ + Node *that; + long elem; + + that = gParse.Nodes + this->SubNodes[0]; + + if( that->operation==CONST_OP ) { /* Operating on a constant! */ + switch( this->operation ) { + case DOUBLE: + case FLTCAST: + if( that->type==LONG ) + this->value.data.dbl = (double)that->value.data.lng; + else if( that->type==BOOLEAN ) + this->value.data.dbl = ( that->value.data.log ? 1.0 : 0.0 ); + break; + case LONG: + case INTCAST: + if( that->type==DOUBLE ) + this->value.data.lng = (long)that->value.data.dbl; + else if( that->type==BOOLEAN ) + this->value.data.lng = ( that->value.data.log ? 1L : 0L ); + break; + case BOOLEAN: + if( that->type==DOUBLE ) + this->value.data.log = ( that->value.data.dbl != 0.0 ); + else if( that->type==LONG ) + this->value.data.log = ( that->value.data.lng != 0L ); + break; + case UMINUS: + if( that->type==DOUBLE ) + this->value.data.dbl = - that->value.data.dbl; + else if( that->type==LONG ) + this->value.data.lng = - that->value.data.lng; + break; + case NOT: + if( that->type==BOOLEAN ) + this->value.data.log = ( ! that->value.data.log ); + else if( that->type==BITSTR ) + bitnot( this->value.data.str, that->value.data.str ); + break; + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if( this->type!=BITSTR ) { + elem = gParse.nRows; + if( this->type!=STRING ) + elem *= this->value.nelem; + while( elem-- ) + this->value.undef[elem] = that->value.undef[elem]; + } + + elem = gParse.nRows * this->value.nelem; + + switch( this->operation ) { + + case BOOLEAN: + if( that->type==DOUBLE ) + while( elem-- ) + this->value.data.logptr[elem] = + ( that->value.data.dblptr[elem] != 0.0 ); + else if( that->type==LONG ) + while( elem-- ) + this->value.data.logptr[elem] = + ( that->value.data.lngptr[elem] != 0L ); + break; + + case DOUBLE: + case FLTCAST: + if( that->type==LONG ) + while( elem-- ) + this->value.data.dblptr[elem] = + (double)that->value.data.lngptr[elem]; + else if( that->type==BOOLEAN ) + while( elem-- ) + this->value.data.dblptr[elem] = + ( that->value.data.logptr[elem] ? 1.0 : 0.0 ); + break; + + case LONG: + case INTCAST: + if( that->type==DOUBLE ) + while( elem-- ) + this->value.data.lngptr[elem] = + (long)that->value.data.dblptr[elem]; + else if( that->type==BOOLEAN ) + while( elem-- ) + this->value.data.lngptr[elem] = + ( that->value.data.logptr[elem] ? 1L : 0L ); + break; + + case UMINUS: + if( that->type==DOUBLE ) { + while( elem-- ) + this->value.data.dblptr[elem] = + - that->value.data.dblptr[elem]; + } else if( that->type==LONG ) { + while( elem-- ) + this->value.data.lngptr[elem] = + - that->value.data.lngptr[elem]; + } + break; + + case NOT: + if( that->type==BOOLEAN ) { + while( elem-- ) + this->value.data.logptr[elem] = + ( ! that->value.data.logptr[elem] ); + } else if( that->type==BITSTR ) { + elem = gParse.nRows; + while( elem-- ) + bitnot( this->value.data.strptr[elem], + that->value.data.strptr[elem] ); + } + break; + } + } + } + + if( that->operation>0 ) { + free( that->value.data.ptr ); + } +} + +static void Do_Offset( Node *this ) +{ + Node *col; + long fRow, nRowOverlap, nRowReload, rowOffset; + long nelem, elem, offset, nRealElem; + int status; + + col = gParse.Nodes + this->SubNodes[0]; + rowOffset = gParse.Nodes[ this->SubNodes[1] ].value.data.lng; + + Allocate_Ptrs( this ); + + fRow = gParse.firstRow + rowOffset; + if( this->type==STRING || this->type==BITSTR ) + nRealElem = 1; + else + nRealElem = this->value.nelem; + + nelem = nRealElem; + + if( fRow < gParse.firstDataRow ) { + + /* Must fill in data at start of array */ + + nRowReload = gParse.firstDataRow - fRow; + if( nRowReload > gParse.nRows ) nRowReload = gParse.nRows; + nRowOverlap = gParse.nRows - nRowReload; + + offset = 0; + + /* NULLify any values falling out of bounds */ + + while( fRow<1 && nRowReload>0 ) { + if( this->type == BITSTR ) { + nelem = this->value.nelem; + this->value.data.strptr[offset][ nelem ] = '\0'; + while( nelem-- ) this->value.data.strptr[offset][nelem] = '0'; + offset++; + } else { + while( nelem-- ) + this->value.undef[offset++] = 1; + } + nelem = nRealElem; + fRow++; + nRowReload--; + } + + } else if( fRow + gParse.nRows > gParse.firstDataRow + gParse.nDataRows ) { + + /* Must fill in data at end of array */ + + nRowReload = (fRow+gParse.nRows) - (gParse.firstDataRow+gParse.nDataRows); + if( nRowReload>gParse.nRows ) { + nRowReload = gParse.nRows; + } else { + fRow = gParse.firstDataRow + gParse.nDataRows; + } + nRowOverlap = gParse.nRows - nRowReload; + + offset = nRowOverlap * nelem; + + /* NULLify any values falling out of bounds */ + + elem = gParse.nRows * nelem; + while( fRow+nRowReload>gParse.totalRows && nRowReload>0 ) { + if( this->type == BITSTR ) { + nelem = this->value.nelem; + elem--; + this->value.data.strptr[elem][ nelem ] = '\0'; + while( nelem-- ) this->value.data.strptr[elem][nelem] = '0'; + } else { + while( nelem-- ) + this->value.undef[--elem] = 1; + } + nelem = nRealElem; + nRowReload--; + } + + } else { + + nRowReload = 0; + nRowOverlap = gParse.nRows; + offset = 0; + + } + + if( nRowReload>0 ) { + switch( this->type ) { + case BITSTR: + case STRING: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.strptr+offset, + this->value.undef+offset ); + break; + case BOOLEAN: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.logptr+offset, + this->value.undef+offset ); + break; + case LONG: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.lngptr+offset, + this->value.undef+offset ); + break; + case DOUBLE: + status = (*gParse.loadData)( -col->operation, fRow, nRowReload, + this->value.data.dblptr+offset, + this->value.undef+offset ); + break; + } + } + + /* Now copy over the overlapping region, if any */ + + if( nRowOverlap <= 0 ) return; + + if( rowOffset>0 ) + elem = nRowOverlap * nelem; + else + elem = gParse.nRows * nelem; + + offset = nelem * rowOffset; + while( nRowOverlap-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + if( this->type != BITSTR ) + this->value.undef[elem] = col->value.undef[elem+offset]; + switch( this->type ) { + case BITSTR: + strcpy( this->value.data.strptr[elem ], + col->value.data.strptr[elem+offset] ); + break; + case STRING: + strcpy( this->value.data.strptr[elem ], + col->value.data.strptr[elem+offset] ); + break; + case BOOLEAN: + this->value.data.logptr[elem] = col->value.data.logptr[elem+offset]; + break; + case LONG: + this->value.data.lngptr[elem] = col->value.data.lngptr[elem+offset]; + break; + case DOUBLE: + this->value.data.dblptr[elem] = col->value.data.dblptr[elem+offset]; + break; + } + } + nelem = nRealElem; + } +} + +static void Do_BinOp_bit( Node *this ) +{ + Node *that1, *that2; + char *sptr1=NULL, *sptr2=NULL; + int const1, const2; + long rows; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + const1 = ( that1->operation==CONST_OP ); + const2 = ( that2->operation==CONST_OP ); + sptr1 = ( const1 ? that1->value.data.str : NULL ); + sptr2 = ( const2 ? that2->value.data.str : NULL ); + + if( const1 && const2 ) { + switch( this->operation ) { + case NE: + this->value.data.log = !bitcmp( sptr1, sptr2 ); + break; + case EQ: + this->value.data.log = bitcmp( sptr1, sptr2 ); + break; + case GT: + case LT: + case LTE: + case GTE: + this->value.data.log = bitlgte( sptr1, this->operation, sptr2 ); + break; + case '|': + bitor( this->value.data.str, sptr1, sptr2 ); + break; + case '&': + bitand( this->value.data.str, sptr1, sptr2 ); + break; + case '+': + strcpy( this->value.data.str, sptr1 ); + strcat( this->value.data.str, sptr2 ); + break; + case ACCUM: + this->value.data.lng = 0; + while( *sptr1 ) { + if ( *sptr1 == '1' ) this->value.data.lng ++; + sptr1 ++; + } + break; + + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + rows = gParse.nRows; + switch( this->operation ) { + + /* BITSTR comparisons */ + + case NE: + case EQ: + case GT: + case LT: + case LTE: + case GTE: + while( rows-- ) { + if( !const1 ) + sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) + sptr2 = that2->value.data.strptr[rows]; + switch( this->operation ) { + case NE: this->value.data.logptr[rows] = + !bitcmp( sptr1, sptr2 ); + break; + case EQ: this->value.data.logptr[rows] = + bitcmp( sptr1, sptr2 ); + break; + case GT: + case LT: + case LTE: + case GTE: this->value.data.logptr[rows] = + bitlgte( sptr1, this->operation, sptr2 ); + break; + } + this->value.undef[rows] = 0; + } + break; + + /* BITSTR AND/ORs ... no UNDEFS in or out */ + + case '|': + case '&': + case '+': + while( rows-- ) { + if( !const1 ) + sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) + sptr2 = that2->value.data.strptr[rows]; + if( this->operation=='|' ) + bitor( this->value.data.strptr[rows], sptr1, sptr2 ); + else if( this->operation=='&' ) + bitand( this->value.data.strptr[rows], sptr1, sptr2 ); + else { + strcpy( this->value.data.strptr[rows], sptr1 ); + strcat( this->value.data.strptr[rows], sptr2 ); + } + } + break; + + /* Accumulate 1 bits */ + case ACCUM: + { + long i, previous, curr; + + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.data.strptr[i]; + for (curr = 0; *sptr1; sptr1 ++) { + if ( *sptr1 == '1' ) curr ++; + } + previous += curr; + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.strptr[0] ); + free( that1->value.data.strptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.strptr[0] ); + free( that2->value.data.strptr ); + } +} + +static void Do_BinOp_str( Node *this ) +{ + Node *that1, *that2; + char *sptr1, *sptr2, null1=0, null2=0; + int const1, const2, val; + long rows; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + const1 = ( that1->operation==CONST_OP ); + const2 = ( that2->operation==CONST_OP ); + sptr1 = ( const1 ? that1->value.data.str : NULL ); + sptr2 = ( const2 ? that2->value.data.str : NULL ); + + if( const1 && const2 ) { /* Result is a constant */ + switch( this->operation ) { + + /* Compare Strings */ + + case NE: + case EQ: + val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); + this->value.data.log = ( this->operation==EQ ? val : !val ); + break; + case GT: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) > 0 ); + break; + case LT: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) < 0 ); + break; + case GTE: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) >= 0 ); + break; + case LTE: + this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) <= 0 ); + break; + + /* Concat Strings */ + + case '+': + strcpy( this->value.data.str, sptr1 ); + strcat( this->value.data.str, sptr2 ); + break; + } + this->operation = CONST_OP; + + } else { /* Not a constant */ + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + rows = gParse.nRows; + switch( this->operation ) { + + /* Compare Strings */ + + case NE: + case EQ: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); + this->value.data.logptr[rows] = + ( this->operation==EQ ? val : !val ); + } + } + break; + + case GT: + case LT: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) ); + this->value.data.logptr[rows] = + ( this->operation==GT ? val>0 : val<0 ); + } + } + break; + + case GTE: + case LTE: + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + val = ( FSTRCMP( sptr1, sptr2 ) ); + this->value.data.logptr[rows] = + ( this->operation==GTE ? val>=0 : val<=0 ); + } + } + break; + + /* Concat Strings */ + + case '+': + while( rows-- ) { + if( !const1 ) null1 = that1->value.undef[rows]; + if( !const2 ) null2 = that2->value.undef[rows]; + this->value.undef[rows] = (null1 || null2); + if( ! this->value.undef[rows] ) { + if( !const1 ) sptr1 = that1->value.data.strptr[rows]; + if( !const2 ) sptr2 = that2->value.data.strptr[rows]; + strcpy( this->value.data.strptr[rows], sptr1 ); + strcat( this->value.data.strptr[rows], sptr2 ); + } + } + break; + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.strptr[0] ); + free( that1->value.data.strptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.strptr[0] ); + free( that2->value.data.strptr ); + } +} + +static void Do_BinOp_log( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + char val1=0, val2=0, null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.log; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.log; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + switch( this->operation ) { + case OR: + this->value.data.log = (val1 || val2); + break; + case AND: + this->value.data.log = (val1 && val2); + break; + case EQ: + this->value.data.log = ( (val1 && val2) || (!val1 && !val2) ); + break; + case NE: + this->value.data.log = ( (val1 && !val2) || (!val1 && val2) ); + break; + case ACCUM: + this->value.data.lng = val1; + break; + } + this->operation=CONST_OP; + } else if (this->operation == ACCUM) { + long i, previous, curr; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.logptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + + } else { + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if (this->operation == ACCUM) { + long i, previous, curr; + + previous = that2->value.data.lng; + + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.logptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + } + + while( rows-- ) { + while( nelem-- ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.logptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.logptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.logptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.logptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + + case OR: + /* This is more complicated than others to suppress UNDEFs */ + /* in those cases where the other argument is DEF && TRUE */ + + if( !null1 && !null2 ) { + this->value.data.logptr[elem] = (val1 || val2); + } else if( (null1 && !null2 && val2) + || ( !null1 && null2 && val1 ) ) { + this->value.data.logptr[elem] = 1; + this->value.undef[elem] = 0; + } + break; + + case AND: + /* This is more complicated than others to suppress UNDEFs */ + /* in those cases where the other argument is DEF && FALSE */ + + if( !null1 && !null2 ) { + this->value.data.logptr[elem] = (val1 && val2); + } else if( (null1 && !null2 && !val2) + || ( !null1 && null2 && !val1 ) ) { + this->value.data.logptr[elem] = 0; + this->value.undef[elem] = 0; + } + break; + + case EQ: + this->value.data.logptr[elem] = + ( (val1 && val2) || (!val1 && !val2) ); + break; + + case NE: + this->value.data.logptr[elem] = + ( (val1 && !val2) || (!val1 && val2) ); + break; + } + } + nelem = this->value.nelem; + } + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +static void Do_BinOp_lng( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + long val1=0, val2=0; + char null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.lng; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.lng; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + + switch( this->operation ) { + case '~': /* Treat as == for LONGS */ + case EQ: this->value.data.log = (val1 == val2); break; + case NE: this->value.data.log = (val1 != val2); break; + case GT: this->value.data.log = (val1 > val2); break; + case LT: this->value.data.log = (val1 < val2); break; + case LTE: this->value.data.log = (val1 <= val2); break; + case GTE: this->value.data.log = (val1 >= val2); break; + + case '+': this->value.data.lng = (val1 + val2); break; + case '-': this->value.data.lng = (val1 - val2); break; + case '*': this->value.data.lng = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.lng = (val1 % val2); + else fferror("Divide by Zero"); + break; + case '/': + if( val2 ) this->value.data.lng = (val1 / val2); + else fferror("Divide by Zero"); + break; + case POWER: + this->value.data.lng = (long)pow((double)val1,(double)val2); + break; + case ACCUM: + this->value.data.lng = val1; + break; + case DIFF: + this->value.data.lng = 0; + break; + } + this->operation=CONST_OP; + + } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { + long i, previous, curr; + long undef; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.lng; + undef = (long) that2->value.undef; + + if (this->operation == ACCUM) { + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.lngptr[i]; + previous += curr; + } + this->value.data.lngptr[i] = previous; + this->value.undef[i] = 0; + } + } else { + /* Sequential difference for this chunk */ + for (i=0; ivalue.data.lngptr[i]; + if (that1->value.undef[i] || undef) { + /* Either this, or previous, value was undefined */ + this->value.data.lngptr[i] = 0; + this->value.undef[i] = 1; + } else { + /* Both defined, we are okay! */ + this->value.data.lngptr[i] = curr - previous; + this->value.undef[i] = 0; + } + + previous = curr; + undef = that1->value.undef[i]; + } + } + + /* Store final cumulant for next pass */ + that2->value.data.lng = previous; + that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ + } + + } else { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + while( rows-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.lngptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.lngptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.lngptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.lngptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + case '~': /* Treat as == for LONGS */ + case EQ: this->value.data.logptr[elem] = (val1 == val2); break; + case NE: this->value.data.logptr[elem] = (val1 != val2); break; + case GT: this->value.data.logptr[elem] = (val1 > val2); break; + case LT: this->value.data.logptr[elem] = (val1 < val2); break; + case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; + case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; + + case '+': this->value.data.lngptr[elem] = (val1 + val2); break; + case '-': this->value.data.lngptr[elem] = (val1 - val2); break; + case '*': this->value.data.lngptr[elem] = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.lngptr[elem] = (val1 % val2); + else { + this->value.data.lngptr[elem] = 0; + this->value.undef[elem] = 1; + } + break; + case '/': + if( val2 ) this->value.data.lngptr[elem] = (val1 / val2); + else { + this->value.data.lngptr[elem] = 0; + this->value.undef[elem] = 1; + } + break; + case POWER: + this->value.data.lngptr[elem] = (long)pow((double)val1,(double)val2); + break; + } + } + nelem = this->value.nelem; + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +static void Do_BinOp_dbl( Node *this ) +{ + Node *that1, *that2; + int vector1, vector2; + double val1=0.0, val2=0.0; + char null1=0, null2=0; + long rows, nelem, elem; + + that1 = gParse.Nodes + this->SubNodes[0]; + that2 = gParse.Nodes + this->SubNodes[1]; + + vector1 = ( that1->operation!=CONST_OP ); + if( vector1 ) + vector1 = that1->value.nelem; + else { + val1 = that1->value.data.dbl; + } + + vector2 = ( that2->operation!=CONST_OP ); + if( vector2 ) + vector2 = that2->value.nelem; + else { + val2 = that2->value.data.dbl; + } + + if( !vector1 && !vector2 ) { /* Result is a constant */ + + switch( this->operation ) { + case '~': this->value.data.log = ( fabs(val1-val2) < APPROX ); break; + case EQ: this->value.data.log = (val1 == val2); break; + case NE: this->value.data.log = (val1 != val2); break; + case GT: this->value.data.log = (val1 > val2); break; + case LT: this->value.data.log = (val1 < val2); break; + case LTE: this->value.data.log = (val1 <= val2); break; + case GTE: this->value.data.log = (val1 >= val2); break; + + case '+': this->value.data.dbl = (val1 + val2); break; + case '-': this->value.data.dbl = (val1 - val2); break; + case '*': this->value.data.dbl = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.dbl = val1 - val2*((int)(val1/val2)); + else fferror("Divide by Zero"); + break; + case '/': + if( val2 ) this->value.data.dbl = (val1 / val2); + else fferror("Divide by Zero"); + break; + case POWER: + this->value.data.dbl = (double)pow(val1,val2); + break; + case ACCUM: + this->value.data.dbl = val1; + break; + case DIFF: + this->value.data.dbl = 0; + break; + } + this->operation=CONST_OP; + + } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { + long i; + long undef; + double previous, curr; + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + previous = that2->value.data.dbl; + undef = (long) that2->value.undef; + + if (this->operation == ACCUM) { + /* Cumulative sum of this chunk */ + for (i=0; ivalue.undef[i]) { + curr = that1->value.data.dblptr[i]; + previous += curr; + } + this->value.data.dblptr[i] = previous; + this->value.undef[i] = 0; + } + } else { + /* Sequential difference for this chunk */ + for (i=0; ivalue.data.dblptr[i]; + if (that1->value.undef[i] || undef) { + /* Either this, or previous, value was undefined */ + this->value.data.dblptr[i] = 0; + this->value.undef[i] = 1; + } else { + /* Both defined, we are okay! */ + this->value.data.dblptr[i] = curr - previous; + this->value.undef[i] = 0; + } + + previous = curr; + undef = that1->value.undef[i]; + } + } + + /* Store final cumulant for next pass */ + that2->value.data.dbl = previous; + that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ + } + + } else { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = this->value.nelem * rows; + + Allocate_Ptrs( this ); + + while( rows-- && !gParse.status ) { + while( nelem-- && !gParse.status ) { + elem--; + + if( vector1>1 ) { + val1 = that1->value.data.dblptr[elem]; + null1 = that1->value.undef[elem]; + } else if( vector1 ) { + val1 = that1->value.data.dblptr[rows]; + null1 = that1->value.undef[rows]; + } + + if( vector2>1 ) { + val2 = that2->value.data.dblptr[elem]; + null2 = that2->value.undef[elem]; + } else if( vector2 ) { + val2 = that2->value.data.dblptr[rows]; + null2 = that2->value.undef[rows]; + } + + this->value.undef[elem] = (null1 || null2); + switch( this->operation ) { + case '~': this->value.data.logptr[elem] = + ( fabs(val1-val2) < APPROX ); break; + case EQ: this->value.data.logptr[elem] = (val1 == val2); break; + case NE: this->value.data.logptr[elem] = (val1 != val2); break; + case GT: this->value.data.logptr[elem] = (val1 > val2); break; + case LT: this->value.data.logptr[elem] = (val1 < val2); break; + case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; + case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; + + case '+': this->value.data.dblptr[elem] = (val1 + val2); break; + case '-': this->value.data.dblptr[elem] = (val1 - val2); break; + case '*': this->value.data.dblptr[elem] = (val1 * val2); break; + + case '%': + if( val2 ) this->value.data.dblptr[elem] = + val1 - val2*((int)(val1/val2)); + else { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } + break; + case '/': + if( val2 ) this->value.data.dblptr[elem] = (val1 / val2); + else { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } + break; + case POWER: + this->value.data.dblptr[elem] = (double)pow(val1,val2); + break; + } + } + nelem = this->value.nelem; + } + } + + if( that1->operation>0 ) { + free( that1->value.data.ptr ); + } + if( that2->operation>0 ) { + free( that2->value.data.ptr ); + } +} + +/* + * This Quickselect routine is based on the algorithm described in + * "Numerical recipes in C", Second Edition, + * Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 + * This code by Nicolas Devillard - 1998. Public domain. + * http://ndevilla.free.fr/median/median/src/quickselect.c + */ + +#define ELEM_SWAP(a,b) { register long t=(a);(a)=(b);(b)=t; } + +/* + * qselect_median_lng - select the median value of a long array + * + * This routine selects the median value of the long integer array + * arr[]. If there are an even number of elements, the "lower median" + * is selected. + * + * The array arr[] is scrambled, so users must operate on a scratch + * array if they wish the values to be preserved. + * + * long arr[] - array of values + * int n - number of elements in arr + * + * RETURNS: the lower median value of arr[] + * + */ +long qselect_median_lng(long arr[], int n) +{ + int low, high ; + int median; + int middle, ll, hh; + + low = 0 ; high = n-1 ; median = (low + high) / 2; + for (;;) { + + if (high <= low) { /* One element only */ + return arr[median]; + } + + if (high == low + 1) { /* Two elements only */ + if (arr[low] > arr[high]) + ELEM_SWAP(arr[low], arr[high]) ; + return arr[median]; + } + + /* Find median of low, middle and high items; swap into position low */ + middle = (low + high) / 2; + if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; + if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; + + /* Swap low item (now in position middle) into position (low+1) */ + ELEM_SWAP(arr[middle], arr[low+1]) ; + + /* Nibble from each end towards middle, swapping items when stuck */ + ll = low + 1; + hh = high; + for (;;) { + do ll++; while (arr[low] > arr[ll]) ; + do hh--; while (arr[hh] > arr[low]) ; + + if (hh < ll) + break; + + ELEM_SWAP(arr[ll], arr[hh]) ; + } + + /* Swap middle item (in position low) back into correct position */ + ELEM_SWAP(arr[low], arr[hh]) ; + + /* Re-set active partition */ + if (hh <= median) + low = ll; + if (hh >= median) + high = hh - 1; + } +} + +#undef ELEM_SWAP + +#define ELEM_SWAP(a,b) { register double t=(a);(a)=(b);(b)=t; } + +/* + * qselect_median_dbl - select the median value of a double array + * + * This routine selects the median value of the double array + * arr[]. If there are an even number of elements, the "lower median" + * is selected. + * + * The array arr[] is scrambled, so users must operate on a scratch + * array if they wish the values to be preserved. + * + * double arr[] - array of values + * int n - number of elements in arr + * + * RETURNS: the lower median value of arr[] + * + */ +double qselect_median_dbl(double arr[], int n) +{ + int low, high ; + int median; + int middle, ll, hh; + + low = 0 ; high = n-1 ; median = (low + high) / 2; + for (;;) { + if (high <= low) { /* One element only */ + return arr[median] ; + } + + if (high == low + 1) { /* Two elements only */ + if (arr[low] > arr[high]) + ELEM_SWAP(arr[low], arr[high]) ; + return arr[median] ; + } + + /* Find median of low, middle and high items; swap into position low */ + middle = (low + high) / 2; + if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; + if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; + if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; + + /* Swap low item (now in position middle) into position (low+1) */ + ELEM_SWAP(arr[middle], arr[low+1]) ; + + /* Nibble from each end towards middle, swapping items when stuck */ + ll = low + 1; + hh = high; + for (;;) { + do ll++; while (arr[low] > arr[ll]) ; + do hh--; while (arr[hh] > arr[low]) ; + + if (hh < ll) + break; + + ELEM_SWAP(arr[ll], arr[hh]) ; + } + + /* Swap middle item (in position low) back into correct position */ + ELEM_SWAP(arr[low], arr[hh]) ; + + /* Re-set active partition */ + if (hh <= median) + low = ll; + if (hh >= median) + high = hh - 1; + } +} + +#undef ELEM_SWAP + +/* + * angsep_calc - compute angular separation between celestial coordinates + * + * This routine computes the angular separation between to coordinates + * on the celestial sphere (i.e. RA and Dec). Note that all units are + * in DEGREES, unlike the other trig functions in the calculator. + * + * double ra1, dec1 - RA and Dec of the first position in degrees + * double ra2, dec2 - RA and Dec of the second position in degrees + * + * RETURNS: (double) angular separation in degrees + * + */ +double angsep_calc(double ra1, double dec1, double ra2, double dec2) +{ + double cd; + static double deg = 0; + if (deg == 0) deg = ((double)4)*atan((double)1)/((double)180); + /* deg = 1.0; **** UNCOMMENT IF YOU WANT RADIANS */ + + cd = sin(dec1*deg)*sin(dec2*deg) + + cos(dec1*deg)*cos(dec2*deg)*cos((ra1-ra2)*deg); + if (cd < (-1)) cd = -1; + if (cd > (+1)) cd = +1; + return acos(cd)/deg; +} + +static double ran1() +{ + static double dval = 0.0; + double rndVal; + + if (dval == 0.0) { + if( rand()<32768 && rand()<32768 ) + dval = 32768.0; + else + dval = 2147483648.0; + } + + rndVal = (double)rand(); + while( rndVal > dval ) dval *= 2.0; + return rndVal/dval; +} + +/* Gaussian deviate routine from Numerical Recipes */ +static double gasdev() +{ + static int iset = 0; + static double gset; + double fac, rsq, v1, v2; + + if (iset == 0) { + do { + v1 = 2.0*ran1()-1.0; + v2 = 2.0*ran1()-1.0; + rsq = v1*v1 + v2*v2; + } while (rsq >= 1.0 || rsq == 0.0); + fac = sqrt(-2.0*log(rsq)/rsq); + gset = v1*fac; + iset = 1; + return v2*fac; + } else { + iset = 0; + return gset; + } + +} + +/* lgamma function - from Numerical Recipes */ + +float gammaln(float xx) + /* Returns the value ln Gamma[(xx)] for xx > 0. */ +{ + /* + Internal arithmetic will be done in double precision, a nicety + that you can omit if five-figure accuracy is good enough. */ + double x,y,tmp,ser; + static double cof[6]={76.18009172947146,-86.50532032941677, + 24.01409824083091,-1.231739572450155, + 0.1208650973866179e-2,-0.5395239384953e-5}; + int j; + y=x=xx; + tmp=x+5.5; + tmp -= (x+0.5)*log(tmp); + ser=1.000000000190015; + for (j=0;j<=5;j++) ser += cof[j]/++y; + return (float) -tmp+log(2.5066282746310005*ser/x); +} + +/* Poisson deviate - derived from Numerical Recipes */ +static long poidev(double xm) +{ + static double sq, alxm, g, oldm = -1.0; + static double pi = 0; + double em, t, y; + + if (pi == 0) pi = ((double)4)*atan((double)1); + + if (xm < 20.0) { + if (xm != oldm) { + oldm = xm; + g = exp(-xm); + } + em = -1; + t = 1.0; + do { + em += 1; + t *= ran1(); + } while (t > g); + } else { + if (xm != oldm) { + oldm = xm; + sq = sqrt(2.0*xm); + alxm = log(xm); + g = xm*alxm-gammaln( (float) (xm+1.0)); + } + do { + do { + y = tan(pi*ran1()); + em = sq*y+xm; + } while (em < 0.0); + em = floor(em); + t = 0.9*(1.0+y*y)*exp(em*alxm-gammaln( (float) (em+1.0) )-g); + } while (ran1() > t); + } + + /* Return integer version */ + return (long int) floor(em+0.5); +} + +static void Do_Func( Node *this ) +{ + Node *theParams[MAXSUBS]; + int vector[MAXSUBS], allConst; + lval pVals[MAXSUBS]; + char pNull[MAXSUBS]; + long ival; + double dval; + int i, valInit; + long row, elem, nelem; + + i = this->nSubNodes; + allConst = 1; + while( i-- ) { + theParams[i] = gParse.Nodes + this->SubNodes[i]; + vector[i] = ( theParams[i]->operation!=CONST_OP ); + if( vector[i] ) { + allConst = 0; + vector[i] = theParams[i]->value.nelem; + } else { + if( theParams[i]->type==DOUBLE ) { + pVals[i].data.dbl = theParams[i]->value.data.dbl; + } else if( theParams[i]->type==LONG ) { + pVals[i].data.lng = theParams[i]->value.data.lng; + } else if( theParams[i]->type==BOOLEAN ) { + pVals[i].data.log = theParams[i]->value.data.log; + } else + strcpy(pVals[i].data.str, theParams[i]->value.data.str); + pNull[i] = 0; + } + } + + if( this->nSubNodes==0 ) allConst = 0; /* These do produce scalars */ + if( this->operation == poirnd_fct ) allConst = 0; + if( this->operation == gasrnd_fct ) allConst = 0; + if( this->operation == rnd_fct ) allConst = 0; + + if( allConst ) { + + switch( this->operation ) { + + /* Non-Trig single-argument functions */ + + case sum_fct: + if( theParams[0]->type==BOOLEAN ) + this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); + else if( theParams[0]->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( theParams[0]->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( theParams[0]->type==BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case average_fct: + if( theParams[0]->type==LONG ) + this->value.data.dbl = pVals[0].data.lng; + else if( theParams[0]->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + break; + case stddev_fct: + this->value.data.dbl = 0; /* Standard deviation of a constant = 0 */ + break; + case median_fct: + if( theParams[0]->type==BOOLEAN ) + this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); + else if( theParams[0]->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else + this->value.data.dbl = pVals[0].data.dbl; + break; + + case poirnd_fct: + if( theParams[0]->type==DOUBLE ) + this->value.data.lng = poidev(pVals[0].data.dbl); + else + this->value.data.lng = poidev(pVals[0].data.lng); + break; + + case abs_fct: + if( theParams[0]->type==DOUBLE ) { + dval = pVals[0].data.dbl; + this->value.data.dbl = (dval>0.0 ? dval : -dval); + } else { + ival = pVals[0].data.lng; + this->value.data.lng = (ival> 0 ? ival : -ival); + } + break; + + /* Special Null-Handling Functions */ + + case nonnull_fct: + this->value.data.lng = 1; /* Constants are always 1-element and defined */ + break; + case isnull_fct: /* Constants are always defined */ + this->value.data.log = 0; + break; + case defnull_fct: + if( this->type==BOOLEAN ) + this->value.data.log = pVals[0].data.log; + else if( this->type==LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type==DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type==STRING ) + strcpy(this->value.data.str,pVals[0].data.str); + break; + + /* Math functions with 1 double argument */ + + case sin_fct: + this->value.data.dbl = sin( pVals[0].data.dbl ); + break; + case cos_fct: + this->value.data.dbl = cos( pVals[0].data.dbl ); + break; + case tan_fct: + this->value.data.dbl = tan( pVals[0].data.dbl ); + break; + case asin_fct: + dval = pVals[0].data.dbl; + if( dval<-1.0 || dval>1.0 ) + fferror("Out of range argument to arcsin"); + else + this->value.data.dbl = asin( dval ); + break; + case acos_fct: + dval = pVals[0].data.dbl; + if( dval<-1.0 || dval>1.0 ) + fferror("Out of range argument to arccos"); + else + this->value.data.dbl = acos( dval ); + break; + case atan_fct: + this->value.data.dbl = atan( pVals[0].data.dbl ); + break; + case sinh_fct: + this->value.data.dbl = sinh( pVals[0].data.dbl ); + break; + case cosh_fct: + this->value.data.dbl = cosh( pVals[0].data.dbl ); + break; + case tanh_fct: + this->value.data.dbl = tanh( pVals[0].data.dbl ); + break; + case exp_fct: + this->value.data.dbl = exp( pVals[0].data.dbl ); + break; + case log_fct: + dval = pVals[0].data.dbl; + if( dval<=0.0 ) + fferror("Out of range argument to log"); + else + this->value.data.dbl = log( dval ); + break; + case log10_fct: + dval = pVals[0].data.dbl; + if( dval<=0.0 ) + fferror("Out of range argument to log10"); + else + this->value.data.dbl = log10( dval ); + break; + case sqrt_fct: + dval = pVals[0].data.dbl; + if( dval<0.0 ) + fferror("Out of range argument to sqrt"); + else + this->value.data.dbl = sqrt( dval ); + break; + case ceil_fct: + this->value.data.dbl = ceil( pVals[0].data.dbl ); + break; + case floor_fct: + this->value.data.dbl = floor( pVals[0].data.dbl ); + break; + case round_fct: + this->value.data.dbl = floor( pVals[0].data.dbl + 0.5 ); + break; + + /* Two-argument Trig Functions */ + + case atan2_fct: + this->value.data.dbl = + atan2( pVals[0].data.dbl, pVals[1].data.dbl ); + break; + + /* Four-argument ANGSEP function */ + case angsep_fct: + this->value.data.dbl = + angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl); + + /* Min/Max functions taking 1 or 2 arguments */ + + case min1_fct: + /* No constant vectors! */ + if( this->type == DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type == LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type == BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case min2_fct: + if( this->type == DOUBLE ) + this->value.data.dbl = + minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + else if( this->type == LONG ) + this->value.data.lng = + minvalue( pVals[0].data.lng, pVals[1].data.lng ); + break; + case max1_fct: + /* No constant vectors! */ + if( this->type == DOUBLE ) + this->value.data.dbl = pVals[0].data.dbl; + else if( this->type == LONG ) + this->value.data.lng = pVals[0].data.lng; + else if( this->type == BITSTR ) + strcpy(this->value.data.str, pVals[0].data.str); + break; + case max2_fct: + if( this->type == DOUBLE ) + this->value.data.dbl = + maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + else if( this->type == LONG ) + this->value.data.lng = + maxvalue( pVals[0].data.lng, pVals[1].data.lng ); + break; + + /* Boolean SAO region Functions... scalar or vector dbls */ + + case near_fct: + this->value.data.log = bnear( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl ); + break; + case circle_fct: + this->value.data.log = circle( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl ); + break; + case box_fct: + this->value.data.log = saobox( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + break; + case elps_fct: + this->value.data.log = + ellipse( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + break; + + /* C Conditional expression: bool ? expr : expr */ + + case ifthenelse_fct: + switch( this->type ) { + case BOOLEAN: + this->value.data.log = ( pVals[2].data.log ? + pVals[0].data.log : pVals[1].data.log ); + break; + case LONG: + this->value.data.lng = ( pVals[2].data.log ? + pVals[0].data.lng : pVals[1].data.lng ); + break; + case DOUBLE: + this->value.data.dbl = ( pVals[2].data.log ? + pVals[0].data.dbl : pVals[1].data.dbl ); + break; + case STRING: + strcpy(this->value.data.str, ( pVals[2].data.log ? + pVals[0].data.str : + pVals[1].data.str ) ); + break; + } + break; + + } + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + row = gParse.nRows; + elem = row * this->value.nelem; + + if( !gParse.status ) { + switch( this->operation ) { + + /* Special functions with no arguments */ + + case row_fct: + while( row-- ) { + this->value.data.lngptr[row] = gParse.firstRow + row; + this->value.undef[row] = 0; + } + break; + case null_fct: + if( this->type==LONG ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + this->value.undef[row] = 1; + } + } else if( this->type==STRING ) { + while( row-- ) { + this->value.data.strptr[row][0] = '\0'; + this->value.undef[row] = 1; + } + } + break; + case rnd_fct: + while( elem-- ) { + this->value.data.dblptr[elem] = ran1(); + this->value.undef[elem] = 0; + } + break; + + case gasrnd_fct: + while( elem-- ) { + this->value.data.dblptr[elem] = gasdev(); + this->value.undef[elem] = 0; + } + break; + + case poirnd_fct: + if( theParams[0]->type==DOUBLE ) { + if (theParams[0]->operation == CONST_OP) { + while( elem-- ) { + this->value.undef[elem] = (pVals[0].data.dbl < 0); + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = poidev(pVals[0].data.dbl); + } + } + } else { + while( elem-- ) { + this->value.undef[elem] = theParams[0]->value.undef[elem]; + if (theParams[0]->value.data.dblptr[elem] < 0) + this->value.undef[elem] = 1; + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = + poidev(theParams[0]->value.data.dblptr[elem]); + } + } /* while */ + } /* ! CONST_OP */ + } else { + /* LONG */ + if (theParams[0]->operation == CONST_OP) { + while( elem-- ) { + this->value.undef[elem] = (pVals[0].data.lng < 0); + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = poidev(pVals[0].data.lng); + } + } + } else { + while( elem-- ) { + this->value.undef[elem] = theParams[0]->value.undef[elem]; + if (theParams[0]->value.data.lngptr[elem] < 0) + this->value.undef[elem] = 1; + if (! this->value.undef[elem]) { + this->value.data.lngptr[elem] = + poidev(theParams[0]->value.data.lngptr[elem]); + } + } /* while */ + } /* ! CONST_OP */ + } /* END LONG */ + break; + + + /* Non-Trig single-argument functions */ + + case sum_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==BOOLEAN ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.lngptr[row] += + ( theParams[0]->value.data.logptr[elem] ? 1 : 0 ); + this->value.undef[row] = 0; + } + } + } + } else if( theParams[0]->type==LONG ) { + while( row-- ) { + this->value.data.lngptr[row] = 0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.lngptr[row] += + theParams[0]->value.data.lngptr[elem]; + this->value.undef[row] = 0; + } + } + } + } else if( theParams[0]->type==DOUBLE ){ + while( row-- ) { + this->value.data.dblptr[row] = 0.0; + /* Default is UNDEF until a defined value is found */ + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( ! theParams[0]->value.undef[elem] ) { + this->value.data.dblptr[row] += + theParams[0]->value.data.dblptr[elem]; + this->value.undef[row] = 0; + } + } + } + } else { /* BITSTR */ + nelem = theParams[0]->value.nelem; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + this->value.data.lngptr[row] = 0; + this->value.undef[row] = 0; + while (*sptr1) { + if (*sptr1 == '1') this->value.data.lngptr[row] ++; + sptr1++; + } + } + } + break; + + case average_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + while( row-- ) { + int count = 0; + this->value.data.dblptr[row] = 0; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + this->value.data.dblptr[row] += + theParams[0]->value.data.lngptr[elem]; + count ++; + } + } + if (count == 0) { + this->value.undef[row] = 1; + } else { + this->value.undef[row] = 0; + this->value.data.dblptr[row] /= count; + } + } + } else if( theParams[0]->type==DOUBLE ){ + while( row-- ) { + int count = 0; + this->value.data.dblptr[row] = 0; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + this->value.data.dblptr[row] += + theParams[0]->value.data.dblptr[elem]; + count ++; + } + } + if (count == 0) { + this->value.undef[row] = 1; + } else { + this->value.undef[row] = 0; + this->value.data.dblptr[row] /= count; + } + } + } + break; + case stddev_fct: + elem = row * theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + + /* Compute the mean value */ + while( row-- ) { + int count = 0; + double sum = 0, sum2 = 0; + + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + sum += theParams[0]->value.data.lngptr[elem]; + count ++; + } + } + if (count > 1) { + sum /= count; + + /* Compute the sum of squared deviations */ + nelem = theParams[0]->value.nelem; + elem += nelem; /* Reset elem for second pass */ + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + double dx = (theParams[0]->value.data.lngptr[elem] - sum); + sum2 += (dx*dx); + } + } + + sum2 /= (double)count-1; + + this->value.undef[row] = 0; + this->value.data.dblptr[row] = sqrt(sum2); + } else { + this->value.undef[row] = 0; /* STDDEV => 0 */ + this->value.data.dblptr[row] = 0; + } + } + } else if( theParams[0]->type==DOUBLE ){ + + /* Compute the mean value */ + while( row-- ) { + int count = 0; + double sum = 0, sum2 = 0; + + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + sum += theParams[0]->value.data.dblptr[elem]; + count ++; + } + } + if (count > 1) { + sum /= count; + + /* Compute the sum of squared deviations */ + nelem = theParams[0]->value.nelem; + elem += nelem; /* Reset elem for second pass */ + while( nelem-- ) { + elem--; + if (theParams[0]->value.undef[elem] == 0) { + double dx = (theParams[0]->value.data.dblptr[elem] - sum); + sum2 += (dx*dx); + } + } + + sum2 /= (double)count-1; + + this->value.undef[row] = 0; + this->value.data.dblptr[row] = sqrt(sum2); + } else { + this->value.undef[row] = 0; /* STDDEV => 0 */ + this->value.data.dblptr[row] = 0; + } + } + } + break; + + case median_fct: + elem = row * theParams[0]->value.nelem; + nelem = theParams[0]->value.nelem; + if( theParams[0]->type==LONG ) { + long *dptr = theParams[0]->value.data.lngptr; + char *uptr = theParams[0]->value.undef; + long *mptr = (long *) malloc(sizeof(long)*nelem); + int irow; + + /* Allocate temporary storage for this row, since the + quickselect function will scramble the contents */ + if (mptr == 0) { + fferror("Could not allocate temporary memory in median function"); + free( this->value.data.ptr ); + break; + } + + for (irow=0; irow 0) { + this->value.undef[irow] = 0; + this->value.data.lngptr[irow] = qselect_median_lng(mptr, nelem1); + } else { + this->value.undef[irow] = 1; + this->value.data.lngptr[irow] = 0; + } + + } + + free(mptr); + } else { + double *dptr = theParams[0]->value.data.dblptr; + char *uptr = theParams[0]->value.undef; + double *mptr = (double *) malloc(sizeof(double)*nelem); + int irow; + + /* Allocate temporary storage for this row, since the + quickselect function will scramble the contents */ + if (mptr == 0) { + fferror("Could not allocate temporary memory in median function"); + free( this->value.data.ptr ); + break; + } + + for (irow=0; irow 0) { + this->value.undef[irow] = 0; + this->value.data.dblptr[irow] = qselect_median_dbl(mptr, nelem1); + } else { + this->value.undef[irow] = 1; + this->value.data.dblptr[irow] = 0; + } + + } + free(mptr); + } + break; + case abs_fct: + if( theParams[0]->type==DOUBLE ) + while( elem-- ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = (dval>0.0 ? dval : -dval); + this->value.undef[elem] = theParams[0]->value.undef[elem]; + } + else + while( elem-- ) { + ival = theParams[0]->value.data.lngptr[elem]; + this->value.data.lngptr[elem] = (ival> 0 ? ival : -ival); + this->value.undef[elem] = theParams[0]->value.undef[elem]; + } + break; + + /* Special Null-Handling Functions */ + + case nonnull_fct: + nelem = theParams[0]->value.nelem; + if ( theParams[0]->type==STRING ) nelem = 1; + elem = row * nelem; + while( row-- ) { + int nelem1 = nelem; + + this->value.undef[row] = 0; /* Initialize to 0 (defined) */ + this->value.data.lngptr[row] = 0; + while( nelem1-- ) { + elem --; + if ( theParams[0]->value.undef[elem] == 0 ) this->value.data.lngptr[row] ++; + } + } + break; + case isnull_fct: + if( theParams[0]->type==STRING ) elem = row; + while( elem-- ) { + this->value.data.logptr[elem] = theParams[0]->value.undef[elem]; + this->value.undef[elem] = 0; + } + break; + case defnull_fct: + switch( this->type ) { + case BOOLEAN: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.log = + theParams[i]->value.data.logptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.log = + theParams[i]->value.data.logptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.logptr[elem] = pVals[1].data.log; + } else { + this->value.undef[elem] = 0; + this->value.data.logptr[elem] = pVals[0].data.log; + } + } + } + break; + case LONG: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } + } + } + break; + case DOUBLE: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pNull[i] = theParams[i]->value.undef[elem]; + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + } else if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + } + if( pNull[0] ) { + this->value.undef[elem] = pNull[1]; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } + } + } + break; + case STRING: + while( row-- ) { + i=2; while( i-- ) + if( vector[i] ) { + pNull[i] = theParams[i]->value.undef[row]; + strcpy(pVals[i].data.str, + theParams[i]->value.data.strptr[row]); + } + if( pNull[0] ) { + this->value.undef[row] = pNull[1]; + strcpy(this->value.data.strptr[row],pVals[1].data.str); + } else { + this->value.undef[elem] = 0; + strcpy(this->value.data.strptr[row],pVals[0].data.str); + } + } + } + break; + + /* Math functions with 1 double argument */ + + case sin_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + sin( theParams[0]->value.data.dblptr[elem] ); + } + break; + case cos_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + cos( theParams[0]->value.data.dblptr[elem] ); + } + break; + case tan_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + tan( theParams[0]->value.data.dblptr[elem] ); + } + break; + case asin_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<-1.0 || dval>1.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = asin( dval ); + } + break; + case acos_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<-1.0 || dval>1.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = acos( dval ); + } + break; + case atan_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = atan( dval ); + } + break; + case sinh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + sinh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case cosh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + cosh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case tanh_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + tanh( theParams[0]->value.data.dblptr[elem] ); + } + break; + case exp_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + this->value.data.dblptr[elem] = exp( dval ); + } + break; + case log_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<=0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = log( dval ); + } + break; + case log10_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<=0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = log10( dval ); + } + break; + case sqrt_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + dval = theParams[0]->value.data.dblptr[elem]; + if( dval<0.0 ) { + this->value.data.dblptr[elem] = 0.0; + this->value.undef[elem] = 1; + } else + this->value.data.dblptr[elem] = sqrt( dval ); + } + break; + case ceil_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + ceil( theParams[0]->value.data.dblptr[elem] ); + } + break; + case floor_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + floor( theParams[0]->value.data.dblptr[elem] ); + } + break; + case round_fct: + while( elem-- ) + if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { + this->value.data.dblptr[elem] = + floor( theParams[0]->value.data.dblptr[elem] + 0.5); + } + break; + + /* Two-argument Trig Functions */ + + case atan2_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1]) ) ) + this->value.data.dblptr[elem] = + atan2( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + break; + + /* Four-argument ANGSEP Function */ + + case angsep_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=4; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3]) ) ) + this->value.data.dblptr[elem] = + angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl); + } + } + break; + + + + /* Min/Max functions taking 1 or 2 arguments */ + + case min1_fct: + elem = row * theParams[0]->value.nelem; + if( this->type==LONG ) { + long minVal=0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + minVal = theParams[0]->value.data.lngptr[elem]; + } else { + minVal = minvalue( minVal, + theParams[0]->value.data.lngptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.lngptr[row] = minVal; + } + } else if( this->type==DOUBLE ) { + double minVal=0.0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + minVal = theParams[0]->value.data.dblptr[elem]; + } else { + minVal = minvalue( minVal, + theParams[0]->value.data.dblptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.dblptr[row] = minVal; + } + } else if( this->type==BITSTR ) { + char minVal; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + minVal = '1'; + while (*sptr1) { + if (*sptr1 == '0') minVal = '0'; + sptr1++; + } + this->value.data.strptr[row][0] = minVal; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } + break; + case min2_fct: + if( this->type==LONG ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.lngptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = + minvalue( pVals[0].data.lng, pVals[1].data.lng ); + } + } + } + } else if( this->type==DOUBLE ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.dblptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = + minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + } + } + break; + + case max1_fct: + elem = row * theParams[0]->value.nelem; + if( this->type==LONG ) { + long maxVal=0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + maxVal = theParams[0]->value.data.lngptr[elem]; + } else { + maxVal = maxvalue( maxVal, + theParams[0]->value.data.lngptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.lngptr[row] = maxVal; + } + } else if( this->type==DOUBLE ) { + double maxVal=0.0; + while( row-- ) { + valInit = 1; + this->value.undef[row] = 1; + nelem = theParams[0]->value.nelem; + while( nelem-- ) { + elem--; + if ( !theParams[0]->value.undef[elem] ) { + if ( valInit ) { + valInit = 0; + maxVal = theParams[0]->value.data.dblptr[elem]; + } else { + maxVal = maxvalue( maxVal, + theParams[0]->value.data.dblptr[elem] ); + } + this->value.undef[row] = 0; + } + } + this->value.data.dblptr[row] = maxVal; + } + } else if( this->type==BITSTR ) { + char maxVal; + while( row-- ) { + char *sptr1 = theParams[0]->value.data.strptr[row]; + maxVal = '0'; + while (*sptr1) { + if (*sptr1 == '1') maxVal = '1'; + sptr1++; + } + this->value.data.strptr[row][0] = maxVal; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } + break; + case max2_fct: + if( this->type==LONG ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.lngptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[1].data.lng; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = pVals[0].data.lng; + } else { + this->value.undef[elem] = 0; + this->value.data.lngptr[elem] = + maxvalue( pVals[0].data.lng, pVals[1].data.lng ); + } + } + } + } else if( this->type==DOUBLE ) { + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( pNull[0] && pNull[1] ) { + this->value.undef[elem] = 1; + this->value.data.dblptr[elem] = 0; + } else if (pNull[0]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[1].data.dbl; + } else if (pNull[1]) { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = pVals[0].data.dbl; + } else { + this->value.undef[elem] = 0; + this->value.data.dblptr[elem] = + maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); + } + } + } + } + break; + + /* Boolean SAO region Functions... scalar or vector dbls */ + + case near_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=3; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2]) ) ) + this->value.data.logptr[elem] = + bnear( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl ); + } + } + break; + + case circle_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=5; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4]) ) ) + this->value.data.logptr[elem] = + circle( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl ); + } + } + break; + + case box_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=7; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4] || pNull[5] || + pNull[6] ) ) ) + this->value.data.logptr[elem] = + saobox( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + } + } + break; + + case elps_fct: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + i=7; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || + pNull[2] || pNull[3] || + pNull[4] || pNull[5] || + pNull[6] ) ) ) + this->value.data.logptr[elem] = + ellipse( pVals[0].data.dbl, pVals[1].data.dbl, + pVals[2].data.dbl, pVals[3].data.dbl, + pVals[4].data.dbl, pVals[5].data.dbl, + pVals[6].data.dbl ); + } + } + break; + + /* C Conditional expression: bool ? expr : expr */ + + case ifthenelse_fct: + switch( this->type ) { + case BOOLEAN: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.log = + theParams[i]->value.data.logptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.log = + theParams[i]->value.data.logptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.logptr[elem] = pVals[0].data.log; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.logptr[elem] = pVals[1].data.log; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case LONG: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.lng = + theParams[i]->value.data.lngptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.lngptr[elem] = pVals[0].data.lng; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.lngptr[elem] = pVals[1].data.lng; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case DOUBLE: + while( row-- ) { + nelem = this->value.nelem; + while( nelem-- ) { + elem--; + if( vector[2]>1 ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[elem]; + pNull[2] = theParams[2]->value.undef[elem]; + } else if( vector[2] ) { + pVals[2].data.log = + theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i]>1 ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[elem]; + pNull[i] = theParams[i]->value.undef[elem]; + } else if( vector[i] ) { + pVals[i].data.dbl = + theParams[i]->value.data.dblptr[row]; + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[elem] = pNull[2]) ) { + if( pVals[2].data.log ) { + this->value.data.dblptr[elem] = pVals[0].data.dbl; + this->value.undef[elem] = pNull[0]; + } else { + this->value.data.dblptr[elem] = pVals[1].data.dbl; + this->value.undef[elem] = pNull[1]; + } + } + } + } + break; + case STRING: + while( row-- ) { + if( vector[2] ) { + pVals[2].data.log = theParams[2]->value.data.logptr[row]; + pNull[2] = theParams[2]->value.undef[row]; + } + i=2; while( i-- ) + if( vector[i] ) { + strcpy( pVals[i].data.str, + theParams[i]->value.data.strptr[row] ); + pNull[i] = theParams[i]->value.undef[row]; + } + if( !(this->value.undef[row] = pNull[2]) ) { + if( pVals[2].data.log ) { + strcpy( this->value.data.strptr[row], + pVals[0].data.str ); + this->value.undef[row] = pNull[0]; + } else { + strcpy( this->value.data.strptr[row], + pVals[1].data.str ); + this->value.undef[row] = pNull[1]; + } + } else { + this->value.data.strptr[row][0] = '\0'; + } + } + break; + + } + break; + + } + } + } + + i = this->nSubNodes; + while( i-- ) { + if( theParams[i]->operation>0 ) { + /* Currently only numeric params allowed */ + free( theParams[i]->value.data.ptr ); + } + } +} + +static void Do_Deref( Node *this ) +{ + Node *theVar, *theDims[MAXDIMS]; + int isConst[MAXDIMS], allConst; + long dimVals[MAXDIMS]; + int i, nDims; + long row, elem, dsize; + + theVar = gParse.Nodes + this->SubNodes[0]; + + i = nDims = this->nSubNodes-1; + allConst = 1; + while( i-- ) { + theDims[i] = gParse.Nodes + this->SubNodes[i+1]; + isConst[i] = ( theDims[i]->operation==CONST_OP ); + if( isConst[i] ) + dimVals[i] = theDims[i]->value.data.lng; + else + allConst = 0; + } + + if( this->type==DOUBLE ) { + dsize = sizeof( double ); + } else if( this->type==LONG ) { + dsize = sizeof( long ); + } else if( this->type==BOOLEAN ) { + dsize = sizeof( char ); + } else + dsize = 0; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + if( allConst && theVar->value.naxis==nDims ) { + + /* Dereference completely using constant indices */ + + elem = 0; + i = nDims; + while( i-- ) { + if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; + elem = theVar->value.naxes[i]*elem + dimVals[i]-1; + } + if( i<0 ) { + for( row=0; rowtype==STRING ) + this->value.undef[row] = theVar->value.undef[row]; + else if( this->type==BITSTR ) + this->value.undef; /* Dummy - BITSTRs do not have undefs */ + else + this->value.undef[row] = theVar->value.undef[elem]; + + if( this->type==DOUBLE ) + this->value.data.dblptr[row] = + theVar->value.data.dblptr[elem]; + else if( this->type==LONG ) + this->value.data.lngptr[row] = + theVar->value.data.lngptr[elem]; + else if( this->type==BOOLEAN ) + this->value.data.logptr[row] = + theVar->value.data.logptr[elem]; + else { + /* XXX Note, the below expression uses knowledge of + the layout of the string format, namely (nelem+1) + characters per string, followed by (nelem+1) + "undef" values. */ + this->value.data.strptr[row][0] = + theVar->value.data.strptr[0][elem+row]; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + elem += theVar->value.nelem; + } + } else { + fferror("Index out of range"); + free( this->value.data.ptr ); + } + + } else if( allConst && nDims==1 ) { + + /* Reduce dimensions by 1, using a constant index */ + + if( dimVals[0] < 1 || + dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { + fferror("Index out of range"); + free( this->value.data.ptr ); + } else if ( this->type == BITSTR || this->type == STRING ) { + elem = this->value.nelem * (dimVals[0]-1); + for( row=0; rowvalue.undef) + this->value.undef[row] = theVar->value.undef[row]; + memcpy( (char*)this->value.data.strptr[0] + + row*sizeof(char)*(this->value.nelem+1), + (char*)theVar->value.data.strptr[0] + elem*sizeof(char), + this->value.nelem * sizeof(char) ); + /* Null terminate */ + this->value.data.strptr[row][this->value.nelem] = 0; + elem += theVar->value.nelem+1; + } + } else { + elem = this->value.nelem * (dimVals[0]-1); + for( row=0; rowvalue.undef + row*this->value.nelem, + theVar->value.undef + elem, + this->value.nelem * sizeof(char) ); + memcpy( (char*)this->value.data.ptr + + row*dsize*this->value.nelem, + (char*)theVar->value.data.ptr + elem*dsize, + this->value.nelem * dsize ); + elem += theVar->value.nelem; + } + } + + } else if( theVar->value.naxis==nDims ) { + + /* Dereference completely using an expression for the indices */ + + for( row=0; rowvalue.undef[row] ) { + fferror("Null encountered as vector index"); + free( this->value.data.ptr ); + break; + } else + dimVals[i] = theDims[i]->value.data.lngptr[row]; + } + } + if( gParse.status ) break; + + elem = 0; + i = nDims; + while( i-- ) { + if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; + elem = theVar->value.naxes[i]*elem + dimVals[i]-1; + } + if( i<0 ) { + elem += row*theVar->value.nelem; + + if( this->type==STRING ) + this->value.undef[row] = theVar->value.undef[row]; + else if( this->type==BITSTR ) + this->value.undef; /* Dummy - BITSTRs do not have undefs */ + else + this->value.undef[row] = theVar->value.undef[elem]; + + if( this->type==DOUBLE ) + this->value.data.dblptr[row] = + theVar->value.data.dblptr[elem]; + else if( this->type==LONG ) + this->value.data.lngptr[row] = + theVar->value.data.lngptr[elem]; + else if( this->type==BOOLEAN ) + this->value.data.logptr[row] = + theVar->value.data.logptr[elem]; + else { + /* XXX Note, the below expression uses knowledge of + the layout of the string format, namely (nelem+1) + characters per string, followed by (nelem+1) + "undef" values. */ + this->value.data.strptr[row][0] = + theVar->value.data.strptr[0][elem+row]; + this->value.data.strptr[row][1] = 0; /* Null terminate */ + } + } else { + fferror("Index out of range"); + free( this->value.data.ptr ); + } + } + + } else { + + /* Reduce dimensions by 1, using a nonconstant expression */ + + for( row=0; rowvalue.undef[row] ) { + fferror("Null encountered as vector index"); + free( this->value.data.ptr ); + break; + } else + dimVals[0] = theDims[0]->value.data.lngptr[row]; + + if( dimVals[0] < 1 || + dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { + fferror("Index out of range"); + free( this->value.data.ptr ); + } else if ( this->type == BITSTR || this->type == STRING ) { + elem = this->value.nelem * (dimVals[0]-1); + elem += row*(theVar->value.nelem+1); + if (this->value.undef) + this->value.undef[row] = theVar->value.undef[row]; + memcpy( (char*)this->value.data.strptr[0] + + row*sizeof(char)*(this->value.nelem+1), + (char*)theVar->value.data.strptr[0] + elem*sizeof(char), + this->value.nelem * sizeof(char) ); + /* Null terminate */ + this->value.data.strptr[row][this->value.nelem] = 0; + } else { + elem = this->value.nelem * (dimVals[0]-1); + elem += row*theVar->value.nelem; + memcpy( this->value.undef + row*this->value.nelem, + theVar->value.undef + elem, + this->value.nelem * sizeof(char) ); + memcpy( (char*)this->value.data.ptr + + row*dsize*this->value.nelem, + (char*)theVar->value.data.ptr + elem*dsize, + this->value.nelem * dsize ); + } + } + } + } + + if( theVar->operation>0 ) { + if (theVar->type == STRING || theVar->type == BITSTR) + free(theVar->value.data.strptr[0] ); + else + free( theVar->value.data.ptr ); + } + for( i=0; ioperation>0 ) { + free( theDims[i]->value.data.ptr ); + } +} + +static void Do_GTI( Node *this ) +{ + Node *theExpr, *theTimes; + double *start, *stop, *times; + long elem, nGTI, gti; + int ordered; + + theTimes = gParse.Nodes + this->SubNodes[0]; + theExpr = gParse.Nodes + this->SubNodes[1]; + + nGTI = theTimes->value.nelem; + start = theTimes->value.data.dblptr; + stop = theTimes->value.data.dblptr + nGTI; + ordered = theTimes->type; + + if( theExpr->operation==CONST_OP ) { + + this->value.data.log = + (Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered )>=0); + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + times = theExpr->value.data.dblptr; + if( !gParse.status ) { + + elem = gParse.nRows * this->value.nelem; + if( nGTI ) { + gti = -1; + while( elem-- ) { + if( (this->value.undef[elem] = theExpr->value.undef[elem]) ) + continue; + + /* Before searching entire GTI, check the GTI found last time */ + if( gti<0 || times[elem]stop[gti] ) { + gti = Search_GTI( times[elem], nGTI, start, stop, ordered ); + } + this->value.data.logptr[elem] = ( gti>=0 ); + } + } else + while( elem-- ) { + this->value.data.logptr[elem] = 0; + this->value.undef[elem] = 0; + } + } + } + + if( theExpr->operation>0 ) + free( theExpr->value.data.ptr ); +} + +static long Search_GTI( double evtTime, long nGTI, double *start, + double *stop, int ordered ) +{ + long gti, step; + + if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */ + /* use "FAST" Binary search algorithm */ + if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) { + gti = step = (nGTI >> 1); + while(1) { + if( step>1L ) step >>= 1; + + if( evtTime>stop[gti] ) { + if( evtTime>=start[gti+1] ) + gti += step; + else { + gti = -1L; + break; + } + } else if( evtTime=start[gti] && evtTime<=stop[gti] ) + break; + } + return( gti ); +} + +static void Do_REG( Node *this ) +{ + Node *theRegion, *theX, *theY; + double Xval=0.0, Yval=0.0; + char Xnull=0, Ynull=0; + int Xvector, Yvector; + long nelem, elem, rows; + + theRegion = gParse.Nodes + this->SubNodes[0]; + theX = gParse.Nodes + this->SubNodes[1]; + theY = gParse.Nodes + this->SubNodes[2]; + + Xvector = ( theX->operation!=CONST_OP ); + if( Xvector ) + Xvector = theX->value.nelem; + else { + Xval = theX->value.data.dbl; + } + + Yvector = ( theY->operation!=CONST_OP ); + if( Yvector ) + Yvector = theY->value.nelem; + else { + Yval = theY->value.data.dbl; + } + + if( !Xvector && !Yvector ) { + + this->value.data.log = + ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) + != 0 ); + this->operation = CONST_OP; + + } else { + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + rows = gParse.nRows; + nelem = this->value.nelem; + elem = rows*nelem; + + while( rows-- ) { + while( nelem-- ) { + elem--; + + if( Xvector>1 ) { + Xval = theX->value.data.dblptr[elem]; + Xnull = theX->value.undef[elem]; + } else if( Xvector ) { + Xval = theX->value.data.dblptr[rows]; + Xnull = theX->value.undef[rows]; + } + + if( Yvector>1 ) { + Yval = theY->value.data.dblptr[elem]; + Ynull = theY->value.undef[elem]; + } else if( Yvector ) { + Yval = theY->value.data.dblptr[rows]; + Ynull = theY->value.undef[rows]; + } + + this->value.undef[elem] = ( Xnull || Ynull ); + if( this->value.undef[elem] ) + continue; + + this->value.data.logptr[elem] = + ( fits_in_region( Xval, Yval, + (SAORegion *)theRegion->value.data.ptr ) + != 0 ); + } + nelem = this->value.nelem; + } + } + } + + if( theX->operation>0 ) + free( theX->value.data.ptr ); + if( theY->operation>0 ) + free( theY->value.data.ptr ); +} + +static void Do_Vector( Node *this ) +{ + Node *that; + long row, elem, idx, jdx, offset=0; + int node; + + Allocate_Ptrs( this ); + + if( !gParse.status ) { + + for( node=0; nodenSubNodes; node++ ) { + + that = gParse.Nodes + this->SubNodes[node]; + + if( that->operation == CONST_OP ) { + + idx = gParse.nRows*this->value.nelem + offset; + while( (idx-=this->value.nelem)>=0 ) { + + this->value.undef[idx] = 0; + + switch( this->type ) { + case BOOLEAN: + this->value.data.logptr[idx] = that->value.data.log; + break; + case LONG: + this->value.data.lngptr[idx] = that->value.data.lng; + break; + case DOUBLE: + this->value.data.dblptr[idx] = that->value.data.dbl; + break; + } + } + + } else { + + row = gParse.nRows; + idx = row * that->value.nelem; + while( row-- ) { + elem = that->value.nelem; + jdx = row*this->value.nelem + offset; + while( elem-- ) { + this->value.undef[jdx+elem] = + that->value.undef[--idx]; + + switch( this->type ) { + case BOOLEAN: + this->value.data.logptr[jdx+elem] = + that->value.data.logptr[idx]; + break; + case LONG: + this->value.data.lngptr[jdx+elem] = + that->value.data.lngptr[idx]; + break; + case DOUBLE: + this->value.data.dblptr[jdx+elem] = + that->value.data.dblptr[idx]; + break; + } + } + } + } + offset += that->value.nelem; + } + + } + + for( node=0; node < this->nSubNodes; node++ ) + if( gParse.Nodes[this->SubNodes[node]].operation>0 ) + free( gParse.Nodes[this->SubNodes[node]].value.data.ptr ); +} + +/*****************************************************************************/ +/* Utility routines which perform the calculations on bits and SAO regions */ +/*****************************************************************************/ + +static char bitlgte(char *bits1, int oper, char *bits2) +{ + int val1, val2, nextbit; + char result; + int i, l1, l2, length, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bits1); + l2 = strlen(bits2); + if (l1 < l2) + { + length = l2; + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bits1++); + stream[i] = '\0'; + bits1 = stream; + } + else if (l2 < l1) + { + length = l1; + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bits2++); + stream[i] = '\0'; + bits2 = stream; + } + else + length = l1; + + val1 = val2 = 0; + nextbit = 1; + + while( length-- ) + { + chr1 = bits1[length]; + chr2 = bits2[length]; + if ((chr1 != 'x')&&(chr1 != 'X')&&(chr2 != 'x')&&(chr2 != 'X')) + { + if (chr1 == '1') val1 += nextbit; + if (chr2 == '1') val2 += nextbit; + nextbit *= 2; + } + } + result = 0; + switch (oper) + { + case LT: + if (val1 < val2) result = 1; + break; + case LTE: + if (val1 <= val2) result = 1; + break; + case GT: + if (val1 > val2) result = 1; + break; + case GTE: + if (val1 >= val2) result = 1; + break; + } + return (result); +} + +static void bitand(char *result,char *bitstrm1,char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while ( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ((chr1 == 'x') || (chr2 == 'x')) + *result = 'x'; + else if ((chr1 == '1') && (chr2 == '1')) + *result = '1'; + else + *result = '0'; + result++; + } + *result = '\0'; +} + +static void bitor(char *result,char *bitstrm1,char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while ( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ((chr1 == '1') || (chr2 == '1')) + *result = '1'; + else if ((chr1 == '0') || (chr2 == '0')) + *result = '0'; + else + *result = 'x'; + result++; + } + *result = '\0'; +} + +static void bitnot(char *result,char *bits) +{ + int length; + char chr; + + length = strlen(bits); + while( length-- ) { + chr = *(bits++); + *(result++) = ( chr=='1' ? '0' : ( chr=='0' ? '1' : chr ) ); + } + *result = '\0'; +} + +static char bitcmp(char *bitstrm1, char *bitstrm2) +{ + int i, l1, l2, ldiff; + char stream[256]; + char chr1, chr2; + + l1 = strlen(bitstrm1); + l2 = strlen(bitstrm2); + if (l1 < l2) + { + ldiff = l2 - l1; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l1-- ) stream[i++] = *(bitstrm1++); + stream[i] = '\0'; + bitstrm1 = stream; + } + else if (l2 < l1) + { + ldiff = l1 - l2; + i=0; + while( ldiff-- ) stream[i++] = '0'; + while( l2-- ) stream[i++] = *(bitstrm2++); + stream[i] = '\0'; + bitstrm2 = stream; + } + while( (chr1 = *(bitstrm1++)) ) + { + chr2 = *(bitstrm2++); + if ( ((chr1 == '0') && (chr2 == '1')) + || ((chr1 == '1') && (chr2 == '0')) ) + return( 0 ); + } + return( 1 ); +} + +static char bnear(double x, double y, double tolerance) +{ + if (fabs(x - y) < tolerance) + return ( 1 ); + else + return ( 0 ); +} + +static char saobox(double xcen, double ycen, double xwid, double ywid, + double rot, double xcol, double ycol) +{ + double x,y,xprime,yprime,xmin,xmax,ymin,ymax,theta; + + theta = (rot / 180.0) * myPI; + xprime = xcol - xcen; + yprime = ycol - ycen; + x = xprime * cos(theta) + yprime * sin(theta); + y = -xprime * sin(theta) + yprime * cos(theta); + xmin = - 0.5 * xwid; xmax = 0.5 * xwid; + ymin = - 0.5 * ywid; ymax = 0.5 * ywid; + if ((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)) + return ( 1 ); + else + return ( 0 ); +} + +static char circle(double xcen, double ycen, double rad, + double xcol, double ycol) +{ + double r2,dx,dy,dlen; + + dx = xcol - xcen; + dy = ycol - ycen; + dx *= dx; dy *= dy; + dlen = dx + dy; + r2 = rad * rad; + if (dlen <= r2) + return ( 1 ); + else + return ( 0 ); +} + +static char ellipse(double xcen, double ycen, double xrad, double yrad, + double rot, double xcol, double ycol) +{ + double x,y,xprime,yprime,dx,dy,dlen,theta; + + theta = (rot / 180.0) * myPI; + xprime = xcol - xcen; + yprime = ycol - ycen; + x = xprime * cos(theta) + yprime * sin(theta); + y = -xprime * sin(theta) + yprime * cos(theta); + dx = x / xrad; dy = y / yrad; + dx *= dx; dy *= dy; + dlen = dx + dy; + if (dlen <= 1.0) + return ( 1 ); + else + return ( 0 ); +} + +static void fferror(char *s) +{ + char msg[80]; + + if( !gParse.status ) gParse.status = PARSE_SYNTAX_ERR; + + strncpy(msg, s, 80); + msg[79] = '\0'; + ffpmsg(msg); +} diff --git a/software/cfitsio3040/f77.inc b/software/cfitsio3040/f77.inc new file mode 100644 index 000000000..51e05e498 --- /dev/null +++ b/software/cfitsio3040/f77.inc @@ -0,0 +1,31 @@ +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) + diff --git a/software/cfitsio3040/f77_wrap.h b/software/cfitsio3040/f77_wrap.h new file mode 100644 index 000000000..adce50daf --- /dev/null +++ b/software/cfitsio3040/f77_wrap.h @@ -0,0 +1,287 @@ +#define UNSIGNED_BYTE + +#include "cfortran.h" + +/************************************************************************ + Some platforms creates longs as 8-byte integers. On other machines, ints + and longs are both 4-bytes, so both are compatible with Fortrans + default integer which is 4-bytes. To support 8-byte longs, we must redefine + LONGs and convert them to 8-bytes when going to C, and restore them + to 4-bytes when returning to Fortran. Ugh!!! +*************************************************************************/ + +#if defined(DECFortran) || (defined(__alpha) && defined(g77Fortran)) \ + || (defined(mipsFortran) && _MIPS_SZLONG==64) \ + || (defined(IBMR2Fortran) && defined(__64BIT__)) \ + || defined(__ia64__) \ + || defined (__sparcv9) \ + || defined (__x86_64__) \ + || defined (_SX) \ + || defined (__powerpc64__) /* this may be the same as IBMR2Fortran, above */ + +#define LONG8BYTES_INT4BYTES + +#undef LONGV_cfSTR +#undef PLONG_cfSTR +#undef LONGVVVVVVV_cfTYPE +#undef PLONG_cfTYPE +#undef LONGV_cfT +#undef PLONG_cfT + +#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E) +#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E) +#define LONGVVVVVVV_cfTYPE int +#define PLONG_cfTYPE int +#define LONGV_cfQ(B) long *B, _(B,N); +#define PLONG_cfQ(B) long B; +#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \ + B = F2Clongv(_(B,N),A) ) +#define PLONG_cfT(M,I,A,B,D) ((B=*A),&B) +#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B); +#define PLONG_cfR(A,B,D) *A=B; +#define LONGV_cfH(S,U,B) +#define PLONG_cfH(S,U,B) + +static long *F2Clongv(long size, int *A) +{ + long i; + long *B; + + B=(long *)malloc( size*sizeof(long) ); + for(i=0;idsc$a_pointer + +/* We want single strings to be equivalent to string vectors with */ +/* a single element, so ignore the number of elements info in the */ +/* vector structure, and rely on the NUM_ELEM definitions. */ + +#undef STRINGV_cfT +#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \ + A->dsc$w_length, \ + num_elem(A->dsc$a_pointer, \ + A->dsc$w_length, \ + _3(M,_STRV_A,I) ) ) +#else +#ifdef CRAYFortran +#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A) +#else +#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A +#endif +#endif + +#define _cfMAX(A,B) ( (A>B) ? A : B ) +#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M); +#define STRINGV_cfR(A,B,D) free(B[0]); free(B); +#define TTSTR( A,B,D) \ + ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \ + kill_trailing(B,' ')) +#define TTTTSTRV( A,B,D,E) ( \ + _(B,N)=_cfMAX(E,1), \ + _(B,M)=_cfMAX(D,gMinStrLen)+1, \ + B=(char**)malloc(_(B,N)*sizeof(char*)), \ + B[0]=(char*)malloc(_(B,N)*_(B,M)), \ + vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \ + ) +#define RRRRPSTRV(A,B,D) \ + c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \ + free(B[0]), \ + free(B); + +static char **vindex(char **B, int elem_len, int nelem, char *B0) +{ + int i; + if( nelem ) + for( i=0;idsc$a_pointer)[0]) +#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)A->dsc$a_pointer +#else +#ifdef CRAYFortran +#define BYTE_cfN(T,A) _fcd A +#define BYTEV_cfN(T,A) _fcd A +#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((_fcdtocp(A))[0]) +#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)_fcdtocp(A) +#else +#define BYTE_cfN(T,A) INTEGER_BYTE * A +#define BYTEV_cfN(T,A) INTEGER_BYTE * A +#define BYTE_cfT(M,I,A,B,D) A[0] +#define BYTEV_cfT(M,I,A,B,D) A +#endif +#endif + +/************************************************************************ + The following definitions and functions handle conversions between + C and Fortran arrays of LOGICALS. Individually, LOGICALS are + treated as int's but as char's when in an array. cfortran defines + (F2C/C2F)LOGICALV but never uses them, so these routines also + handle TRUE/FALSE conversions. +*************************************************************************/ + +#undef LOGICALV_cfSTR +#undef LOGICALV_cfT +#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E) +#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N); +#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \ + B=F2CcopyLogVect(_(B,N),A)) +#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B); +#define LOGICALV_cfH(S,U,B) + +static char *F2CcopyLogVect(long size, int *A) +{ + long i; + char *B; + + B=(char *)malloc(size*sizeof(char)); + for( i=0; i0 ) return; + for( i=50;i0 ) return; + if( unit == -1 ) { + int i; for( i=50; i=MAXFITSFILES ) { + *status = BAD_FILEPTR; + ffpmsg("Cfffiou was sent an unacceptable unit number."); + } else gFitsFiles[unit]=NULL; +} +FCALLSCSUB2(Cfffiou,FTFIOU,ftfiou,INT,PINT) + + +int CFITS2Unit( fitsfile *fptr ) + /* Utility routine to convert a fitspointer to a Fortran unit number */ + /* for use when a C program is calling a Fortran routine which could */ + /* in turn call CFITSIO... Modelled after code by Ning Gan. */ +{ + static fitsfile *last_fptr = (fitsfile *)NULL; /* Remember last fptr */ + static int last_unit = 0; /* Remember last unit */ + int status = 0; + + /* Test whether we are repeating the last lookup */ + + if( last_unit && fptr==gFitsFiles[last_unit] ) + return( last_unit ); + + /* Check if gFitsFiles has an entry for this fptr. */ + /* Allows Fortran to call C to call Fortran to */ + /* call CFITSIO... OUCH!!! */ + + last_fptr = fptr; + for( last_unit=1; last_unit=MAXFITSFILES ) + return(0); + + return(gFitsFiles[unit]); +} + + /**************************************************/ + /* Start of wrappers for routines in fitsio.h */ + /**************************************************/ + +/*---------------- FITS file URL parsing routines -------------*/ + +FCALLSCSUB9(ffiurl,FTIURL,ftiurl,STRING,PSTRING,PSTRING,PSTRING,PSTRING,PSTRING,PSTRING,PSTRING,PINT) +FCALLSCSUB3(ffrtnm,FTRTNM,ftrtnm,STRING,PSTRING,PINT) +FCALLSCSUB3(ffexist,FTEXIST,ftexest,STRING,PINT,PINT) +FCALLSCSUB3(ffextn,FTEXTN,ftextn,STRING,PINT,PINT) +FCALLSCSUB7(ffrwrg,FTRWRG,ftrwrg,STRING,LONG,INT,PINT,PLONG,PLONG,PINT) + +/*---------------- FITS file I/O routines ---------------*/ + +void Cffopen( fitsfile **fptr, const char *filename, int iomode, int *blocksize, int *status ); +void Cffopen( fitsfile **fptr, const char *filename, int iomode, int *blocksize, int *status ) +{ + int hdutype; + + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffopen( fptr, filename, iomode, status ); + ffmahd( *fptr, 1, &hdutype, status ); + *blocksize = 1; + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffopen tried to use an already opened unit."); + } +} +FCALLSCSUB5(Cffopen,FTOPEN,ftopen,PFITSUNIT,STRING,INT,PINT,PINT) + +void Cffdkopn( fitsfile **fptr, const char *filename, int iomode, int *blocksize, int *status ); +void Cffdkopn( fitsfile **fptr, const char *filename, int iomode, int *blocksize, int *status ) +{ + int hdutype; + + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffdkopn( fptr, filename, iomode, status ); + ffmahd( *fptr, 1, &hdutype, status ); + *blocksize = 1; + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffdkopn tried to use an already opened unit."); + } +} +FCALLSCSUB5(Cffdkopn,FTDKOPN,ftdkopn,PFITSUNIT,STRING,INT,PINT,PINT) + + +void Cffnopn( fitsfile **fptr, const char *filename, int iomode, int *status ); +void Cffnopn( fitsfile **fptr, const char *filename, int iomode, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffopen( fptr, filename, iomode, status ); + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffnopn tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cffnopn,FTNOPN,ftnopn,PFITSUNIT,STRING,INT,PINT) + +void Cffdopn( fitsfile **fptr, const char *filename, int iomode, int *status ); +void Cffdopn( fitsfile **fptr, const char *filename, int iomode, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffdopn( fptr, filename, iomode, status ); + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffdopn tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cffdopn,FTDOPN,ftdopn,PFITSUNIT,STRING,INT,PINT) + +void Cfftopn( fitsfile **fptr, const char *filename, int iomode, int *status ); +void Cfftopn( fitsfile **fptr, const char *filename, int iomode, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + fftopn( fptr, filename, iomode, status ); + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cfftopn tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cfftopn,FTTOPN,fttopn,PFITSUNIT,STRING,INT,PINT) + +void Cffiopn( fitsfile **fptr, const char *filename, int iomode, int *status ); +void Cffiopn( fitsfile **fptr, const char *filename, int iomode, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffiopn( fptr, filename, iomode, status ); + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffiopn tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cffiopn,FTIOPN,ftiopn,PFITSUNIT,STRING,INT,PINT) + +void Cffreopen( fitsfile *openfptr, fitsfile **newfptr, int *status ); +void Cffreopen( fitsfile *openfptr, fitsfile **newfptr, int *status ) +{ + if( *newfptr==NULL || *newfptr==(fitsfile*)1 ) { + ffreopen( openfptr, newfptr, status ); + } else { + *status = FILE_NOT_OPENED; + ffpmsg("Cffreopen tried to use an already opened unit."); + } +} +FCALLSCSUB3(Cffreopen,FTREOPEN,ftreopen,FITSUNIT,PFITSUNIT,PINT) + +void Cffinit( fitsfile **fptr, const char *filename, int blocksize, int *status ); +void Cffinit( fitsfile **fptr, const char *filename, int blocksize, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffinit( fptr, filename, status ); + } else { + *status = FILE_NOT_CREATED; + ffpmsg("Cffinit tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cffinit,FTINIT,ftinit,PFITSUNIT,STRING,INT,PINT) + +void Cffdkinit( fitsfile **fptr, const char *filename, int blocksize, int *status ); +void Cffdkinit( fitsfile **fptr, const char *filename, int blocksize, int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + ffdkinit( fptr, filename, status ); + } else { + *status = FILE_NOT_CREATED; + ffpmsg("Cffdkinit tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cffdkinit,FTDKINIT,ftdkinit,PFITSUNIT,STRING,INT,PINT) + +void Cfftplt( fitsfile **fptr, const char *filename, const char *tempname, + int *status ); +void Cfftplt( fitsfile **fptr, const char *filename, const char *tempname, + int *status ) +{ + if( *fptr==NULL || *fptr==(fitsfile*)1 ) { + fftplt( fptr, filename, tempname, status ); + } else { + *status = FILE_NOT_CREATED; + ffpmsg("Cfftplt tried to use an already opened unit."); + } +} +FCALLSCSUB4(Cfftplt,FTTPLT,fttplt,PFITSUNIT,STRING,STRING,PINT) + +FCALLSCSUB2(ffflus,FTFLUS,ftflus,FITSUNIT,PINT) +FCALLSCSUB3(ffflsh,FTFLSH,ftflsh,FITSUNIT, INT, PINT) + +void Cffclos( int unit, int *status ); +void Cffclos( int unit, int *status ) +{ + if( gFitsFiles[unit]!=NULL && gFitsFiles[unit]!=(void*)1 ) { + ffclos( gFitsFiles[unit], status ); /* Flag unit number as unavailable */ + gFitsFiles[unit]=(fitsfile*)1; /* in case want to reuse it */ + } +} +FCALLSCSUB2(Cffclos,FTCLOS,ftclos,INT,PINT) + +void Cffdelt( int unit, int *status ); +void Cffdelt( int unit, int *status ) +{ + if( gFitsFiles[unit]!=NULL && gFitsFiles[unit]!=(void*)1 ) { + ffdelt( gFitsFiles[unit], status ); /* Flag unit number as unavailable */ + gFitsFiles[unit]=(fitsfile*)1; /* in case want to reuse it */ + } +} +FCALLSCSUB2(Cffdelt,FTDELT,ftdelt,INT,PINT) + +FCALLSCSUB3(ffflnm,FTFLNM,ftflnm,FITSUNIT,PSTRING,PINT) +FCALLSCSUB3(ffflmd,FTFLMD,ftflmd,FITSUNIT,PINT,PINT) + +/*--------------- utility routines ---------------*/ +FCALLSCSUB1(ffvers,FTVERS,ftvers,PFLOAT) +FCALLSCSUB1(ffupch,FTUPCH,ftupch,PSTRING) +FCALLSCSUB2(ffgerr,FTGERR,ftgerr,INT,PSTRING) +FCALLSCSUB1(ffpmsg,FTPMSG,ftpmsg,STRING) +FCALLSCSUB1(ffgmsg,FTGMSG,ftgmsg,PSTRING) +FCALLSCSUB0(ffcmsg,FTCMSG,ftcmsg) +FCALLSCSUB0(ffpmrk,FTPMRK,ftpmrk) +FCALLSCSUB0(ffcmrk,FTCMRK,ftcmrk) + +void Cffrprt( char *fname, int status ); +void Cffrprt( char *fname, int status ) +{ + if( !strcmp(fname,"STDOUT") || !strcmp(fname,"stdout") ) + ffrprt( stdout, status ); + else if( !strcmp(fname,"STDERR") || !strcmp(fname,"stderr") ) + ffrprt( stderr, status ); + else { + FILE *fptr; + + fptr = fopen(fname, "a"); + if (fptr==NULL) + printf("file pointer is null.\n"); + else { + ffrprt(fptr,status); + fclose(fptr); + } + } +} +FCALLSCSUB2(Cffrprt,FTRPRT,ftrprt,STRING,INT) + +FCALLSCSUB5(ffcmps,FTCMPS,ftcmps,STRING,STRING,LOGICAL,PLOGICAL,PLOGICAL) +FCALLSCSUB2(fftkey,FTTKEY,fttkey,STRING,PINT) +FCALLSCSUB2(fftrec,FTTREC,fttrec,STRING,PINT) +FCALLSCSUB2(ffnchk,FTNCHK,ftnchk,FITSUNIT,PINT) +FCALLSCSUB4(ffkeyn,FTKEYN,ftkeyn,STRING,INT,PSTRING,PINT) +FCALLSCSUB4(ffgknm,FTGKNM,ftgknm,STRING,PSTRING, PINT, PINT) +FCALLSCSUB4(ffnkey,FTNKEY,ftnkey,INT,STRING,PSTRING,PINT) +FCALLSCSUB3(ffdtyp,FTDTYP,ftdtyp,STRING,PSTRING,PINT) +FCALLSCFUN1(INT,ffgkcl,FTGKCL,ftgkcl,STRING) +FCALLSCSUB4(ffpsvc,FTPSVC,ftpsvc,STRING,PSTRING,PSTRING,PINT) +FCALLSCSUB4(ffgthd,FTGTHD,ftgthd,STRING,PSTRING,PINT,PINT) +FCALLSCSUB5(ffasfm,FTASFM,ftasfm,STRING,PINT,PLONG,PINT,PINT) +FCALLSCSUB5(ffbnfm,FTBNFM,ftbnfm,STRING,PINT,PLONG,PLONG,PINT) + +#define ftgabc_STRV_A2 NUM_ELEM_ARG(1) +#define ftgabc_LONGV_A5 A1 +FCALLSCSUB6(ffgabc,FTGABC,ftgabc,INT,STRINGV,INT,PLONG,LONGV,PINT) + diff --git a/software/cfitsio3040/f77_wrap2.c b/software/cfitsio3040/f77_wrap2.c new file mode 100644 index 000000000..03b93afab --- /dev/null +++ b/software/cfitsio3040/f77_wrap2.c @@ -0,0 +1,605 @@ +/************************************************************************ + + f77_wrap1.c and f77_wrap2.c have now been split into 4 files to + prevent compile-time memory errors (from expansion of compiler commands). + f77_wrap1.c was split into f77_wrap1.c and f77_wrap3.c, and + f77_wrap2.c was split into f77_wrap2.c and f77_wrap4.c: + + f77_wrap1.c contains routines operating on whole files and some + utility routines. + + f77_wrap2.c contains routines operating on primary array, image, + or column elements. + + f77_wrap3.c contains routines operating on headers & keywords. + + f77_wrap4.c contains miscellaneous routines. + + Peter's original comments: + + Together, f77_wrap1.c and f77_wrap2.c contain C wrappers for all + the CFITSIO routines prototyped in fitsio.h, except for the + generic datatype routines and features not supported in fortran + (eg, unsigned integers), a few routines prototyped in fitsio2.h, + which only a handful of FTOOLS use, plus a few obsolete FITSIO + routines not present in CFITSIO. This file allows Fortran code + to use the CFITSIO library instead of the FITSIO library without + modification. It also gives access to new routines not present + in FITSIO. Fortran FTOOLS must continue using the old routine + names from FITSIO (ie, ftxxxx), but most of the C-wrappers simply + redirect those calls to the corresponding CFITSIO routines (ie, + ffxxxx), with appropriate parameter massaging where necessary. + The main exception are read/write routines ending in j (ie, long + data) which get redirected to C routines ending in k (ie, int + data). This is more consistent with the default integer type in + Fortran. f77_wrap1.c primarily holds routines operating on whole + files and extension headers. f77_wrap2.c handle routines which + read and write the data portion, plus miscellaneous extra routines. + + File created by Peter Wilson (HSTX), Oct-Dec. 1997 +************************************************************************/ + +#include "fitsio2.h" +#include "f77_wrap.h" + + +FCALLSCSUB5(ffgextn,FTGEXTN,ftgextn,FITSUNIT,LONG,LONG,BYTEV,PINT) +FCALLSCSUB5(ffpextn,FTPEXTN,ftpextn,FITSUNIT,LONG,LONG,BYTEV,PINT) + +/*------------ read primary array or image elements -------------*/ +FCALLSCSUB8(ffgpvb,FTGPVB,ftgpvb,FITSUNIT,LONG,LONG,LONG,BYTE,BYTEV,PLOGICAL,PINT) +FCALLSCSUB8(ffgpvi,FTGPVI,ftgpvi,FITSUNIT,LONG,LONG,LONG,SHORT,SHORTV,PLOGICAL,PINT) +FCALLSCSUB8(ffgpvk,FTGPVJ,ftgpvj,FITSUNIT,LONG,LONG,LONG,INT,INTV,PLOGICAL,PINT) +FCALLSCSUB8(ffgpvjj,FTGPVK,ftgpvk,FITSUNIT,LONG,LONG,LONG,LONGLONG,LONGLONGV,PLOGICAL,PINT) +FCALLSCSUB8(ffgpve,FTGPVE,ftgpve,FITSUNIT,LONG,LONG,LONG,FLOAT,FLOATV,PLOGICAL,PINT) +FCALLSCSUB8(ffgpvd,FTGPVD,ftgpvd,FITSUNIT,LONG,LONG,LONG,DOUBLE,DOUBLEV,PLOGICAL,PINT) + + +#define ftgpfb_LOGV_A6 A4 +FCALLSCSUB8(ffgpfb,FTGPFB,ftgpfb,FITSUNIT,LONG,LONG,LONG,BYTEV,LOGICALV,PLOGICAL,PINT) + +#define ftgpfi_LOGV_A6 A4 +FCALLSCSUB8(ffgpfi,FTGPFI,ftgpfi,FITSUNIT,LONG,LONG,LONG,SHORTV,LOGICALV,PLOGICAL,PINT) + +#define ftgpfj_LOGV_A6 A4 +FCALLSCSUB8(ffgpfk,FTGPFJ,ftgpfj,FITSUNIT,LONG,LONG,LONG,INTV,LOGICALV,PLOGICAL,PINT) + +#define ftgpfk_LOGV_A6 A4 +FCALLSCSUB8(ffgpfjj,FTGPFK,ftgpfk,FITSUNIT,LONG,LONG,LONG,LONGLONGV,LOGICALV,PLOGICAL,PINT) + +#define ftgpfe_LOGV_A6 A4 +FCALLSCSUB8(ffgpfe,FTGPFE,ftgpfe,FITSUNIT,LONG,LONG,LONG,FLOATV,LOGICALV,PLOGICAL,PINT) + +#define ftgpfd_LOGV_A6 A4 +FCALLSCSUB8(ffgpfd,FTGPFD,ftgpfd,FITSUNIT,LONG,LONG,LONG,DOUBLEV,LOGICALV,PLOGICAL,PINT) + +FCALLSCSUB9(ffg2db,FTG2DB,ftg2db,FITSUNIT,LONG,BYTE,LONG,LONG,LONG,BYTEV,PLOGICAL,PINT) +FCALLSCSUB9(ffg2di,FTG2DI,ftg2di,FITSUNIT,LONG,SHORT,LONG,LONG,LONG,SHORTV,PLOGICAL,PINT) +FCALLSCSUB9(ffg2dk,FTG2DJ,ftg2dj,FITSUNIT,LONG,INT,LONG,LONG,LONG,INTV,PLOGICAL,PINT) +FCALLSCSUB9(ffg2djj,FTG2DK,ftg2dk,FITSUNIT,LONG,LONGLONG,LONG,LONG,LONG,LONGLONGV,PLOGICAL,PINT) +FCALLSCSUB9(ffg2de,FTG2DE,ftg2de,FITSUNIT,LONG,FLOAT,LONG,LONG,LONG,FLOATV,PLOGICAL,PINT) +FCALLSCSUB9(ffg2dd,FTG2DD,ftg2dd,FITSUNIT,LONG,DOUBLE,LONG,LONG,LONG,DOUBLEV,PLOGICAL,PINT) + +FCALLSCSUB11(ffg3db,FTG3DB,ftg3db,FITSUNIT,LONG,BYTE,LONG,LONG,LONG,LONG,LONG,BYTEV,PLOGICAL,PINT) +FCALLSCSUB11(ffg3di,FTG3DI,ftg3di,FITSUNIT,LONG,SHORT,LONG,LONG,LONG,LONG,LONG,SHORTV,PLOGICAL,PINT) +FCALLSCSUB11(ffg3dk,FTG3DJ,ftg3dj,FITSUNIT,LONG,INT,LONG,LONG,LONG,LONG,LONG,INTV,PLOGICAL,PINT) +FCALLSCSUB11(ffg3djj,FTG3DK,ftg3dk,FITSUNIT,LONG,LONGLONG,LONG,LONG,LONG,LONG,LONG,LONGLONGV,PLOGICAL,PINT) +FCALLSCSUB11(ffg3de,FTG3DE,ftg3de,FITSUNIT,LONG,FLOAT,LONG,LONG,LONG,LONG,LONG,FLOATV,PLOGICAL,PINT) +FCALLSCSUB11(ffg3dd,FTG3DD,ftg3dd,FITSUNIT,LONG,DOUBLE,LONG,LONG,LONG,LONG,LONG,DOUBLEV,PLOGICAL,PINT) + + /* The follow LONGV definitions have +1 appended because the */ + /* routines use of NAXIS+1 elements of the long vectors. */ + +#define ftgsvb_LONGV_A4 A3+1 +#define ftgsvb_LONGV_A5 A3+1 +#define ftgsvb_LONGV_A6 A3+1 +#define ftgsvb_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsvb,FTGSVB,ftgsvb,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,BYTE,BYTEV,PLOGICAL,PINT) + +#define ftgsvi_LONGV_A4 A3+1 +#define ftgsvi_LONGV_A5 A3+1 +#define ftgsvi_LONGV_A6 A3+1 +#define ftgsvi_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsvi,FTGSVI,ftgsvi,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,SHORT,SHORTV,PLOGICAL,PINT) + +#define ftgsvj_LONGV_A4 A3+1 +#define ftgsvj_LONGV_A5 A3+1 +#define ftgsvj_LONGV_A6 A3+1 +#define ftgsvj_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsvk,FTGSVJ,ftgsvj,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,INT,INTV,PLOGICAL,PINT) + +#define ftgsvk_LONGV_A4 A3+1 +#define ftgsvk_LONGV_A5 A3+1 +#define ftgsvk_LONGV_A6 A3+1 +#define ftgsvk_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsvjj,FTGSVK,ftgsvk,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,LONGLONG,LONGLONGV,PLOGICAL,PINT) + +#define ftgsve_LONGV_A4 A3+1 +#define ftgsve_LONGV_A5 A3+1 +#define ftgsve_LONGV_A6 A3+1 +#define ftgsve_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsve,FTGSVE,ftgsve,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,FLOAT,FLOATV,PLOGICAL,PINT) + +#define ftgsvd_LONGV_A4 A3+1 +#define ftgsvd_LONGV_A5 A3+1 +#define ftgsvd_LONGV_A6 A3+1 +#define ftgsvd_LONGV_A7 A3+1 +FCALLSCSUB11(ffgsvd,FTGSVD,ftgsvd,FITSUNIT,INT,INT,LONGV,LONGV,LONGV,LONGV,DOUBLE,DOUBLEV,PLOGICAL,PINT) + + +/* Must handle LOGICALV conversion manually */ +void Cffgsfb( fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned char *array, int *flagval, int *anynul, int *status ); +void Cffgsfb( fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned char *array, int *flagval, int *anynul, int *status ) +{ + char *Cflagval; + long nflagval; + int i; + + for( nflagval=1, i=0; iFwork_fn(&a1,&a2,&a3,&a4,&n_cols,units,colnum,datatype, + iotype,repeat,&status,f->userData, + ptrs[ 0], ptrs[ 1], ptrs[ 2], ptrs[ 3], ptrs[ 4], + ptrs[ 5], ptrs[ 6], ptrs[ 7], ptrs[ 8], ptrs[ 9], + ptrs[10], ptrs[11], ptrs[12], ptrs[13], ptrs[14], + ptrs[15], ptrs[16], ptrs[17], ptrs[18], ptrs[19], + ptrs[20], ptrs[21], ptrs[22], ptrs[23], ptrs[24] ); + } + + /* Check whether there are any LOGICAL or STRING columns being outputted */ + nstr=0; + for( i=0;i +#include +#include +#include +#include "fitsio2.h" + +static long noutchar; +static long noutmax; + +static int htrans(int a[],int nx,int ny); +static void digitize(int a[], int nx, int ny, int scale); +static int encode(char *outfile, long *nlen, int a[], int nx, int ny, int scale); +static void shuffle(int a[], int n, int n2, int tmp[]); + +static int htrans64(LONGLONG a[],int nx,int ny); +static void digitize64(LONGLONG a[], int nx, int ny, int scale); +static int encode64(char *outfile, long *nlen, LONGLONG a[], int nx, int ny, int scale); +static void shuffle64(LONGLONG a[], int n, int n2, LONGLONG tmp[]); + +static void writeint(char *outfile, int a); +static void writelonglong(char *outfile, LONGLONG a); +static int qwrite(char *outfile, char *a, int n); +static int doencode(char *outfile, int a[], int nx, int ny, unsigned char nbitplanes[3]); +static int doencode64(char *outfile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]); +static int mywrite(char *file, char buffer[], int n); + +static int qtree_encode(char *outfile, int a[], int n, int nqx, int nqy, int nbitplanes); +static int qtree_encode64(char *outfile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes); +static void start_outputing_bits(); +static void done_outputing_bits(char *outfile); +static void output_nbits(char *outfile, int bits, int n); + +static void qtree_onebit(int a[], int n, int nx, int ny, unsigned char b[], int bit); +static void qtree_onebit64(LONGLONG a[], int n, int nx, int ny, unsigned char b[], int bit); +static void qtree_reduce(unsigned char a[], int n, int nx, int ny, unsigned char b[]); +static int bufcopy(unsigned char a[], int n, unsigned char buffer[], int *b, int bmax); +static void write_bdirect(char *outfile, int a[], int n,int nqx, int nqy, unsigned char scratch[], int bit); +static void write_bdirect64(char *outfile, LONGLONG a[], int n,int nqx, int nqy, unsigned char scratch[], int bit); + +#define output_nybble(outfile,c) output_nbits(outfile,c,4) +#define output_huffman(outfile,c) output_nbits(outfile,code[c],ncode[c]) + +/* ---------------------------------------------------------------------- */ +int fits_hcompress(int *a, int ny, int nx, int scale, char *output, + long *nbytes, int *status) +{ + /* + compress the input image using the H-compress algorithm + + a - input image array + nx - size of X axis of image + ny - size of Y axis of image + scale - quantization scale factor. Larger values results in more (lossy) compression + scale = 0 does lossless compression + output - pre-allocated array to hold the output compressed stream of bytes + nbyts - input value = size of the output buffer; + returned value = size of the compressed byte stream, in bytes + + NOTE: the nx and ny dimensions as defined within this code are reversed from + the usual FITS notation. ny is the fastest varying dimension, which is + usually considered the X axis in the FITS image display + + */ + + int stat; + + if (*status > 0) return(*status); + + /* H-transform */ + stat = htrans(a, nx, ny); + if (stat) { + *status = stat; + return(*status); + } + + /* digitize */ + digitize(a, nx, ny, scale); + + /* encode and write to output array */ + + noutmax = *nbytes; /* input value is the allocated size of the array */ + *nbytes = 0; /* reset */ + + stat = encode(output, nbytes, a, nx, ny, scale); + + *status = stat; + return(*status); +} +/* ---------------------------------------------------------------------- */ +int fits_hcompress64(LONGLONG *a, int ny, int nx, int scale, char *output, + long *nbytes, int *status) +{ + /* + compress the input image using the H-compress algorithm + + a - input image array + nx - size of X axis of image + ny - size of Y axis of image + scale - quantization scale factor. Larger values results in more (lossy) compression + scale = 0 does lossless compression + output - pre-allocated array to hold the output compressed stream of bytes + nbyts - size of the compressed byte stream, in bytes + + NOTE: the nx and ny dimensions as defined within this code are reversed from + the usual FITS notation. ny is the fastest varying dimension, which is + usually considered the X axis in the FITS image display + + */ + + int stat; + + if (*status > 0) return(*status); + + /* H-transform */ + stat = htrans64(a, nx, ny); + if (stat) { + *status = stat; + return(*status); + } + + /* digitize */ + digitize64(a, nx, ny, scale); + + /* encode and write to output array */ + noutmax = *nbytes; /* input value is the allocated size of the array */ + *nbytes = 0; /* reset */ + + stat = encode64(output, nbytes, a, nx, ny, scale); + + *status = stat; + return(*status); +} + + +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* htrans.c H-transform of NX x NY integer image + * + * Programmer: R. White Date: 11 May 1992 + */ + +/* ######################################################################### */ +static int htrans(int a[],int nx,int ny) +{ +int nmax, log2n, h0, hx, hy, hc, nxtop, nytop, i, j, k; +int oddx, oddy; +int shift, mask, mask2, prnd, prnd2, nrnd2; +int s10, s00; +int *tmp; + + /* + * log2n is log2 of max(nx,ny) rounded up to next power of 2 + */ + nmax = (nx>ny) ? nx : ny; + log2n = (int) (log((float) nmax)/log(2.0)+0.5); + if ( nmax > (1<> shift; + hx = (a[s10+1] + a[s10] - a[s00+1] - a[s00]) >> shift; + hy = (a[s10+1] - a[s10] + a[s00+1] - a[s00]) >> shift; + hc = (a[s10+1] - a[s10] - a[s00+1] + a[s00]) >> shift; + /* + * Throw away the 2 bottom bits of h0, bottom bit of hx,hy. + * To get rounding to be same for positive and negative + * numbers, nrnd2 = prnd2 - 1. + */ + a[s10+1] = hc; + a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; + a[s00+1] = ( (hy>=0) ? (hy+prnd) : hy ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 2; + s10 += 2; + } + if (oddy) { + /* + * do last element in row if row length is odd + * s00+1, s10+1 are off edge + */ + h0 = (a[s10] + a[s00]) << (1-shift); + hx = (a[s10] - a[s00]) << (1-shift); + a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 1; + s10 += 1; + } + } + if (oddx) { + /* + * do last row if column length is odd + * s10, s10+1 are off edge + */ + s00 = i*ny; + for (j = 0; j=0) ? (hy+prnd) : hy ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 2; + } + if (oddy) { + /* + * do corner element if both row and column lengths are odd + * s00+1, s10, s10+1 are off edge + */ + h0 = a[s00] << (2-shift); + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + } + } + /* + * now shuffle in each dimension to group coefficients by order + */ + for (i = 0; i>1; + nytop = (nytop+1)>>1; + /* + * divisor doubles after first reduction + */ + shift = 1; + /* + * masks, rounding values double after each iteration + */ + mask = mask2; + prnd = prnd2; + mask2 = mask2 << 1; + prnd2 = prnd2 << 1; + nrnd2 = prnd2 - 1; + } + free(tmp); + return(0); +} +/* ######################################################################### */ + +static int htrans64(LONGLONG a[],int nx,int ny) +{ +int nmax, log2n, nxtop, nytop, i, j, k; +int oddx, oddy; +int shift; +int s10, s00; +LONGLONG h0, hx, hy, hc, prnd, prnd2, nrnd2, mask, mask2; +LONGLONG *tmp; + + /* + * log2n is log2 of max(nx,ny) rounded up to next power of 2 + */ + nmax = (nx>ny) ? nx : ny; + log2n = (int) (log((float) nmax)/log(2.0)+0.5); + if ( nmax > (1<> shift; + hx = (a[s10+1] + a[s10] - a[s00+1] - a[s00]) >> shift; + hy = (a[s10+1] - a[s10] + a[s00+1] - a[s00]) >> shift; + hc = (a[s10+1] - a[s10] - a[s00+1] + a[s00]) >> shift; + /* + * Throw away the 2 bottom bits of h0, bottom bit of hx,hy. + * To get rounding to be same for positive and negative + * numbers, nrnd2 = prnd2 - 1. + */ + a[s10+1] = hc; + a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; + a[s00+1] = ( (hy>=0) ? (hy+prnd) : hy ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 2; + s10 += 2; + } + if (oddy) { + /* + * do last element in row if row length is odd + * s00+1, s10+1 are off edge + */ + h0 = (a[s10] + a[s00]) << (1-shift); + hx = (a[s10] - a[s00]) << (1-shift); + a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 1; + s10 += 1; + } + } + if (oddx) { + /* + * do last row if column length is odd + * s10, s10+1 are off edge + */ + s00 = i*ny; + for (j = 0; j=0) ? (hy+prnd) : hy ) & mask ; + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + s00 += 2; + } + if (oddy) { + /* + * do corner element if both row and column lengths are odd + * s00+1, s10, s10+1 are off edge + */ + h0 = a[s00] << (2-shift); + a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; + } + } + /* + * now shuffle in each dimension to group coefficients by order + */ + for (i = 0; i>1; + nytop = (nytop+1)>>1; + /* + * divisor doubles after first reduction + */ + shift = 1; + /* + * masks, rounding values double after each iteration + */ + mask = mask2; + prnd = prnd2; + mask2 = mask2 << 1; + prnd2 = prnd2 << 1; + nrnd2 = prnd2 - 1; + } + free(tmp); + return(0); +} + +/* ######################################################################### */ +static void +shuffle(int a[], int n, int n2, int tmp[]) +{ + +/* +int a[]; array to shuffle +int n; number of elements to shuffle +int n2; second dimension +int tmp[]; scratch storage +*/ + +int i; +int *p1, *p2, *pt; + + /* + * copy odd elements to tmp + */ + pt = tmp; + p1 = &a[n2]; + for (i=1; i < n; i += 2) { + *pt = *p1; + pt += 1; + p1 += (n2+n2); + } + /* + * compress even elements into first half of A + */ + p1 = &a[n2]; + p2 = &a[n2+n2]; + for (i=2; i0) ? (*p+d) : (*p-d))/scale; +} + +/* ######################################################################### */ +static void +digitize64(LONGLONG a[], int nx, int ny, int scale) +{ +LONGLONG d, *p, scale64; + + /* + * round to multiple of scale + */ + if (scale <= 1) return; + d=(scale+1)/2-1; + scale64 = scale; /* use a 64-bit int for efficiency in the big loop */ + + for (p=a; p <= &a[nx*ny-1]; p++) *p = ((*p>0) ? (*p+d) : (*p-d))/scale64; +} +/* ######################################################################### */ +/* ######################################################################### */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* encode.c encode H-transform and write to outfile + * + * Programmer: R. White Date: 2 February 1994 + */ + +static char code_magic[2] = { (char)0xDD, (char)0x99 }; + + +/* ######################################################################### */ +static int encode(char *outfile, long *nlength, int a[], int nx, int ny, int scale) +{ + +/* FILE *outfile; - change outfile to a char array */ +/* + long * nlength returned length (in bytes) of the encoded array) + int a[]; input H-transform array (nx,ny) + int nx,ny; size of H-transform array + int scale; scale factor for digitization +*/ +int nel, nx2, ny2, i, j, k, q, vmax[3], nsign, bits_to_go; +unsigned char nbitplanes[3]; +unsigned char *signbits; +int stat = 0; + + noutchar = 0; /* initialize the number of compressed bytes that have been written */ + nel = nx*ny; + /* + * write magic value + */ + qwrite(outfile, code_magic, sizeof(code_magic)); + writeint(outfile, nx); /* size of image */ + writeint(outfile, ny); + writeint(outfile, scale); /* scale factor for digitization */ + /* + * write first value of A (sum of all pixels -- the only value + * which does not compress well) + */ + writelonglong(outfile, (LONGLONG) a[0]); + + a[0] = 0; + /* + * allocate array for sign bits and save values, 8 per byte + */ + signbits = (unsigned char *) malloc((nel+7)/8); + if (signbits == (unsigned char *) NULL) { +/* fprintf(stderr, "encode: insufficient memory\n"); + exit(-1); */ + ffpmsg("encode: insufficient memory"); + return(DATA_COMPRESSION_ERR); + } + nsign = 0; + bits_to_go = 8; + signbits[0] = 0; + for (i=0; i 0) { + /* + * positive element, put zero at end of buffer + */ + signbits[nsign] <<= 1; + bits_to_go -= 1; + } else if (a[i] < 0) { + /* + * negative element, shift in a one + */ + signbits[nsign] <<= 1; + signbits[nsign] |= 1; + bits_to_go -= 1; + /* + * replace a by absolute value + */ + a[i] = -a[i]; + } + if (bits_to_go == 0) { + /* + * filled up this byte, go to the next one + */ + bits_to_go = 8; + nsign += 1; + signbits[nsign] = 0; + } + } + if (bits_to_go != 8) { + /* + * some bits in last element + * move bits in last byte to bottom and increment nsign + */ + signbits[nsign] <<= bits_to_go; + nsign += 1; + } + + /* + * calculate number of bit planes for 3 quadrants + * + * quadrant 0=bottom left, 1=bottom right or top left, 2=top right, + */ + for (q=0; q<3; q++) { + vmax[q] = 0; + } + /* + * get maximum absolute value in each quadrant + */ + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + j=0; /* column counter */ + k=0; /* row counter */ + for (i=0; i=ny2) + (k>=nx2); + if (vmax[q] < a[i]) vmax[q] = a[i]; + if (++j >= ny) { + j = 0; + k += 1; + } + } + /* + * now calculate number of bits for each quadrant + */ + for (q = 0; q < 3; q++) { + nbitplanes[q] = (int) (log((float) (vmax[q]+1))/log(2.0)+0.5); + if ( (vmax[q]+1) > (1< 0) { + + if ( 0 == qwrite(outfile, (char *) signbits, nsign)) { + free(signbits); + *nlength = noutchar; + ffpmsg("encode: output buffer too small"); + return(DATA_COMPRESSION_ERR); + } + } + + free(signbits); + *nlength = noutchar; + + if (noutchar >= noutmax) { + ffpmsg("encode: output buffer too small"); + return(DATA_COMPRESSION_ERR); + } + + return(stat); +} +/* ######################################################################### */ +static int encode64(char *outfile, long *nlength, LONGLONG a[], int nx, int ny, int scale) +{ + +/* FILE *outfile; - change outfile to a char array */ +/* + long * nlength returned length (in bytes) of the encoded array) + LONGLONG a[]; input H-transform array (nx,ny) + int nx,ny; size of H-transform array + int scale; scale factor for digitization +*/ +int nel, nx2, ny2, i, j, k, q, nsign, bits_to_go; +LONGLONG vmax[3]; +unsigned char nbitplanes[3]; +unsigned char *signbits; +int stat = 0; + + noutchar = 0; /* initialize the number of compressed bytes that have been written */ + nel = nx*ny; + /* + * write magic value + */ + qwrite(outfile, code_magic, sizeof(code_magic)); + writeint(outfile, nx); /* size of image */ + writeint(outfile, ny); + writeint(outfile, scale); /* scale factor for digitization */ + /* + * write first value of A (sum of all pixels -- the only value + * which does not compress well) + */ + + writelonglong(outfile, a[0]); + a[0] = 0; + /* + * allocate array for sign bits and save values, 8 per byte + */ + signbits = (unsigned char *) malloc((nel+7)/8); + if (signbits == (unsigned char *) NULL) { +/* fprintf(stderr, "encode: insufficient memory\n"); + exit(-1); */ + ffpmsg("encode64: insufficient memory"); + return(DATA_COMPRESSION_ERR); + } + nsign = 0; + bits_to_go = 8; + signbits[0] = 0; + for (i=0; i 0) { + /* + * positive element, put zero at end of buffer + */ + signbits[nsign] <<= 1; + bits_to_go -= 1; + } else if (a[i] < 0) { + /* + * negative element, shift in a one + */ + signbits[nsign] <<= 1; + signbits[nsign] |= 1; + bits_to_go -= 1; + /* + * replace a by absolute value + */ + a[i] = -a[i]; + } + if (bits_to_go == 0) { + /* + * filled up this byte, go to the next one + */ + bits_to_go = 8; + nsign += 1; + signbits[nsign] = 0; + } + } + if (bits_to_go != 8) { + /* + * some bits in last element + * move bits in last byte to bottom and increment nsign + */ + signbits[nsign] <<= bits_to_go; + nsign += 1; + } + /* + * calculate number of bit planes for 3 quadrants + * + * quadrant 0=bottom left, 1=bottom right or top left, 2=top right, + */ + for (q=0; q<3; q++) { + vmax[q] = 0; + } + /* + * get maximum absolute value in each quadrant + */ + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + + i = 0; + for (k=0; k=ny2) + (k>=nx2); + vmax[q] |= a[i]; + i++; + } + } + + /* + * now calculate number of bits for each quadrant + */ + + /* this is a more efficient way to do this, */ + + + for (q = 0; q < 3; q++) { + for (nbitplanes[q] = 0; vmax[q]>0; vmax[q] = vmax[q]>>1, nbitplanes[q]++) ; + } + + +/* + for (q = 0; q < 3; q++) { + nbitplanes[q] = log((float) (vmax[q]+1))/log(2.0)+0.5; + if ( (vmax[q]+1) > (((LONGLONG) 1)< 0) { + + if ( 0 == qwrite(outfile, (char *) signbits, nsign)) { + free(signbits); + *nlength = noutchar; + ffpmsg("encode: output buffer too small"); + return(DATA_COMPRESSION_ERR); + } + } + + free(signbits); + + *nlength = noutchar; + + if (noutchar >= noutmax) { + ffpmsg("encode64: output buffer too small"); + return(DATA_COMPRESSION_ERR); + } + + return(stat); +} +/* ######################################################################### */ +/* ######################################################################### */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* qwrite.c Write binary data + * + * Programmer: R. White Date: 11 March 1991 + */ + +/* ######################################################################### */ +static void +writeint(char *outfile, int a) +{ +int i; +unsigned char b[4]; + + /* Write integer A one byte at a time to outfile. + * + * This is portable from Vax to Sun since it eliminates the + * need for byte-swapping. + */ + for (i=3; i>=0; i--) { + b[i] = a & 0x000000ff; + a >>= 8; + } + for (i=0; i<4; i++) qwrite(outfile, (char *) &b[i],1); +} + +/* ######################################################################### */ +static void +writelonglong(char *outfile, LONGLONG a) +{ +int i; +unsigned char b[8]; + + /* Write integer A one byte at a time to outfile. + * + * This is portable from Vax to Sun since it eliminates the + * need for byte-swapping. + */ + for (i=7; i>=0; i--) { + b[i] = (unsigned char) (a & 0x000000ff); + a >>= 8; + } + for (i=0; i<8; i++) qwrite(outfile, (char *) &b[i],1); +} + +/* ######################################################################### */ +static int qwrite(char *outfile, char *a, int n) +{ +int nwrite; + + nwrite = mywrite(outfile, a, n); + return(nwrite); /* added by WDP to prevent compiler warning */ +} + +/* ######################################################################### */ +static int +mywrite(char *file, char buffer[], int n) +{ + /* + * write n bytes from buffer into file + * returns number of bytes read (=n) if successful, <=0 if not + */ + + if (noutchar + n > noutmax) return(0); /* buffer overflow */ + + memcpy(&file[noutchar], buffer, n); + noutchar += n; + + return(n); +} +/* ######################################################################### */ +/* ######################################################################### */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* doencode.c Encode 2-D array and write stream of characters on outfile + * + * This version assumes that A is positive. + * + * Programmer: R. White Date: 7 May 1991 + */ + +/* ######################################################################### */ +static int +doencode(char *outfile, int a[], int nx, int ny, unsigned char nbitplanes[3]) +{ +/* char *outfile; output data stream +int a[]; Array of values to encode +int nx,ny; Array dimensions [nx][ny] +unsigned char nbitplanes[3]; Number of bit planes in quadrants +*/ + +int nx2, ny2, stat = 0; + + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + /* + * Initialize bit output + */ + start_outputing_bits(); + /* + * write out the bit planes for each quadrant + */ + stat = qtree_encode(outfile, &a[0], ny, nx2, ny2, nbitplanes[0]); + + if (!stat) + stat = qtree_encode(outfile, &a[ny2], ny, nx2, ny/2, nbitplanes[1]); + + if (!stat) + stat = qtree_encode(outfile, &a[ny*nx2], ny, nx/2, ny2, nbitplanes[1]); + + if (!stat) + stat = qtree_encode(outfile, &a[ny*nx2+ny2], ny, nx/2, ny/2, nbitplanes[2]); + /* + * Add zero as an EOF symbol + */ + output_nybble(outfile, 0); + done_outputing_bits(outfile); + + return(stat); +} +/* ######################################################################### */ +static int +doencode64(char *outfile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]) +{ +/* char *outfile; output data stream +LONGLONG a[]; Array of values to encode +int nx,ny; Array dimensions [nx][ny] +unsigned char nbitplanes[3]; Number of bit planes in quadrants +*/ + +int nx2, ny2, stat = 0; + + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + /* + * Initialize bit output + */ + start_outputing_bits(); + /* + * write out the bit planes for each quadrant + */ + stat = qtree_encode64(outfile, &a[0], ny, nx2, ny2, nbitplanes[0]); + + if (!stat) + stat = qtree_encode64(outfile, &a[ny2], ny, nx2, ny/2, nbitplanes[1]); + + if (!stat) + stat = qtree_encode64(outfile, &a[ny*nx2], ny, nx/2, ny2, nbitplanes[1]); + + if (!stat) + stat = qtree_encode64(outfile, &a[ny*nx2+ny2], ny, nx/2, ny/2, nbitplanes[2]); + /* + * Add zero as an EOF symbol + */ + output_nybble(outfile, 0); + done_outputing_bits(outfile); + + return(stat); +} +/* ######################################################################### */ +/* ######################################################################### */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* BIT OUTPUT ROUTINES */ + + +static LONGLONG bitcount; + +/* THE BIT BUFFER */ + +static int buffer2; /* Bits buffered for output */ +static int bits_to_go2; /* Number of bits free in buffer */ + + +/* ######################################################################### */ +/* INITIALIZE FOR BIT OUTPUT */ + +static void +start_outputing_bits() +{ + buffer2 = 0; /* Buffer is empty to start */ + bits_to_go2 = 8; /* with */ + bitcount = 0; +} + +/* ######################################################################### */ +/* OUTPUT N BITS (N must be <= 8) */ + +static void +output_nbits(char *outfile, int bits, int n) +{ + /* + * insert bits at end of buffer + */ + buffer2 <<= n; + buffer2 |= ( bits & ((1<>(-bits_to_go2)) & 0xff,outfile); */ + + outfile[noutchar] = ((buffer2>>(-bits_to_go2)) & 0xff); + + if (noutchar < noutmax) noutchar++; + + bits_to_go2 += 8; + } + bitcount += n; +} + + +/* ######################################################################### */ +/* FLUSH OUT THE LAST BITS */ + +static void +done_outputing_bits(char *outfile) +{ + if(bits_to_go2 < 8) { +/* putc(buffer2<nqy) ? nqx : nqy; + log2n = (int) (log((float) nqmax)/log(2.0)+0.5); + if (nqmax > (1<= 0; bit--) { + /* + * initial bit buffer + */ + b = 0; + bitbuffer = 0; + bits_to_go3 = 0; + /* + * on first pass copy A to scratch array + */ + qtree_onebit(a,n,nqx,nqy,scratch,bit); + nx = (nqx+1)>>1; + ny = (nqy+1)>>1; + /* + * copy non-zero values to output buffer, which will be written + * in reverse order + */ + if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { + /* + * quadtree is expanding data, + * change warning code and just fill buffer with bit-map + */ + write_bdirect(outfile,a,n,nqx,nqy,scratch,bit); + goto bitplane_done; + } + /* + * do log2n reductions + */ + for (k = 1; k>1; + ny = (ny+1)>>1; + if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { + write_bdirect(outfile,a,n,nqx,nqy,scratch,bit); + goto bitplane_done; + } + } + /* + * OK, we've got the code in buffer + * Write quadtree warning code, then write buffer in reverse order + */ + output_nybble(outfile,0xF); + if (b==0) { + if (bits_to_go3>0) { + /* + * put out the last few bits + */ + output_nbits(outfile, bitbuffer & ((1<0) { + /* + * put out the last few bits + */ + output_nbits(outfile, bitbuffer & ((1<=0; i--) { + output_nbits(outfile,buffer[i],8); + } + } + bitplane_done: ; + } + free(buffer); + free(scratch); + return(0); +} +/* ######################################################################### */ +static int +qtree_encode64(char *outfile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes) +{ + +/* +LONGLONG a[]; +int n; physical dimension of row in a +int nqx; length of row +int nqy; length of column (<=n) +int nbitplanes; number of bit planes to output +*/ + +int log2n, i, k, bit, b, nqmax, nqx2, nqy2, nx, ny; +int bmax; /* this potentially needs to be made a 64-bit int to support large arrays */ +unsigned char *scratch, *buffer; + + /* + * log2n is log2 of max(nqx,nqy) rounded up to next power of 2 + */ + nqmax = (nqx>nqy) ? nqx : nqy; + log2n = (int) (log((float) nqmax)/log(2.0)+0.5); + if (nqmax > (1<= 0; bit--) { + /* + * initial bit buffer + */ + b = 0; + bitbuffer = 0; + bits_to_go3 = 0; + /* + * on first pass copy A to scratch array + */ + qtree_onebit64(a,n,nqx,nqy,scratch,bit); + nx = (nqx+1)>>1; + ny = (nqy+1)>>1; + /* + * copy non-zero values to output buffer, which will be written + * in reverse order + */ + if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { + /* + * quadtree is expanding data, + * change warning code and just fill buffer with bit-map + */ + write_bdirect64(outfile,a,n,nqx,nqy,scratch,bit); + goto bitplane_done; + } + /* + * do log2n reductions + */ + for (k = 1; k>1; + ny = (ny+1)>>1; + if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { + write_bdirect64(outfile,a,n,nqx,nqy,scratch,bit); + goto bitplane_done; + } + } + /* + * OK, we've got the code in buffer + * Write quadtree warning code, then write buffer in reverse order + */ + output_nybble(outfile,0xF); + if (b==0) { + if (bits_to_go3>0) { + /* + * put out the last few bits + */ + output_nbits(outfile, bitbuffer & ((1<0) { + /* + * put out the last few bits + */ + output_nbits(outfile, bitbuffer & ((1<=0; i--) { + output_nbits(outfile,buffer[i],8); + } + } + bitplane_done: ; + } + free(buffer); + free(scratch); + return(0); +} + +/* ######################################################################### */ +/* + * copy non-zero codes from array to buffer + */ +static int +bufcopy(unsigned char a[], int n, unsigned char buffer[], int *b, int bmax) +{ +int i; + + for (i = 0; i < n; i++) { + if (a[i] != 0) { + /* + * add Huffman code for a[i] to buffer + */ + bitbuffer |= code[a[i]] << bits_to_go3; + bits_to_go3 += ncode[a[i]]; + if (bits_to_go3 >= 8) { + buffer[*b] = bitbuffer & 0xFF; + *b += 1; + /* + * return warning code if we fill buffer + */ + if (*b >= bmax) return(1); + bitbuffer >>= 8; + bits_to_go3 -= 8; + } + } + } + return(0); +} + +/* ######################################################################### */ +/* + * Do first quadtree reduction step on bit BIT of array A. + * Results put into B. + * + */ +static void +qtree_onebit(int a[], int n, int nx, int ny, unsigned char b[], int bit) +{ +int i, j, k; +int b0, b1, b2, b3; +int s10, s00; + + /* + * use selected bit to get amount to shift + */ + b0 = 1<> bit; + k += 1; + s00 += 2; + s10 += 2; + } + if (j < ny) { + /* + * row size is odd, do last element in row + * s00+1,s10+1 are off edge + */ + b[k] = ( ((a[s10 ]<<1) & b1) + | ((a[s00 ]<<3) & b3) ) >> bit; + k += 1; + } + } + if (i < nx) { + /* + * column size is odd, do last row + * s10,s10+1 are off edge + */ + s00 = n*i; + for (j = 0; j> bit; + k += 1; + s00 += 2; + } + if (j < ny) { + /* + * both row and column size are odd, do corner element + * s00+1, s10, s10+1 are off edge + */ + b[k] = ( ((a[s00 ]<<3) & b3) ) >> bit; + k += 1; + } + } +} +/* ######################################################################### */ +/* + * Do first quadtree reduction step on bit BIT of array A. + * Results put into B. + * + */ +static void +qtree_onebit64(LONGLONG a[], int n, int nx, int ny, unsigned char b[], int bit) +{ +int i, j, k; +LONGLONG b0, b1, b2, b3; +int s10, s00; + + /* + * use selected bit to get amount to shift + */ + b0 = ((LONGLONG) 1)<> bit); + k += 1; + s00 += 2; + s10 += 2; + } + if (j < ny) { + /* + * row size is odd, do last element in row + * s00+1,s10+1 are off edge + */ + b[k] = (unsigned char) (( ((a[s10 ]<<1) & b1) + | ((a[s00 ]<<3) & b3) ) >> bit); + k += 1; + } + } + if (i < nx) { + /* + * column size is odd, do last row + * s10,s10+1 are off edge + */ + s00 = n*i; + for (j = 0; j> bit); + k += 1; + s00 += 2; + } + if (j < ny) { + /* + * both row and column size are odd, do corner element + * s00+1, s10, s10+1 are off edge + */ + b[k] = (unsigned char) (( ((a[s00 ]<<3) & b3) ) >> bit); + k += 1; + } + } +} + +/* ######################################################################### */ +/* + * do one quadtree reduction step on array a + * results put into b (which may be the same as a) + */ +static void +qtree_reduce(unsigned char a[], int n, int nx, int ny, unsigned char b[]) +{ +int i, j, k; +int s10, s00; + + k = 0; /* k is index of b[i/2,j/2] */ + for (i = 0; i +#include +#include +#include +#include "fitsio2.h" + +/* WDP added test to see if min and max are already defined */ +#ifndef min +#define min(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef max +#define max(a,b) (((a)>(b))?(a):(b)) +#endif + +#define input_nybble(infile) input_nbits(infile,4) + +static long nextchar; + +static int decode(unsigned char *infile, int *a, int *nx, int *ny, int *scale); +static int decode64(unsigned char *infile, LONGLONG *a, int *nx, int *ny, int *scale); +static int hinv(int a[], int nx, int ny, int smooth ,int scale); +static int hinv64(LONGLONG a[], int nx, int ny, int smooth ,int scale); +static void undigitize(int a[], int nx, int ny, int scale); +static void undigitize64(LONGLONG a[], int nx, int ny, int scale); +static void unshuffle(int a[], int n, int n2, int tmp[]); +static void unshuffle64(LONGLONG a[], int n, int n2, LONGLONG tmp[]); +static void hsmooth(int a[], int nxtop, int nytop, int ny, int scale); +static void hsmooth64(LONGLONG a[], int nxtop, int nytop, int ny, int scale); +static void qread(unsigned char *infile,char *a, int n); +static int readint(unsigned char *infile); +static LONGLONG readlonglong(unsigned char *infile); +static int dodecode(unsigned char *infile, int a[], int nx, int ny, unsigned char nbitplanes[3]); +static int dodecode64(unsigned char *infile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]); +static int qtree_decode(unsigned char *infile, int a[], int n, int nqx, int nqy, int nbitplanes); +static int qtree_decode64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes); +static void start_inputing_bits(); +static int input_bit(unsigned char *infile); +static int input_nbits(unsigned char *infile, int n); + +static void qtree_expand(unsigned char *infile, unsigned char a[], int nx, int ny, unsigned char b[]); +static void qtree_bitins(unsigned char a[], int nx, int ny, int b[], int n, int bit); +static void qtree_bitins64(unsigned char a[], int nx, int ny, LONGLONG b[], int n, int bit); +static void qtree_copy(unsigned char a[], int nx, int ny, unsigned char b[], int n); +static void read_bdirect(unsigned char *infile, int a[], int n, int nqx, int nqy, unsigned char scratch[], int bit); +static void read_bdirect64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, unsigned char scratch[], int bit); +static int input_huffman(unsigned char *infile); +static int myread(unsigned char *file, char buffer[], int n); + +/* ---------------------------------------------------------------------- */ +int fits_hdecompress(unsigned char *input, int smooth, int *a, int *ny, int *nx, + int *scale, int *status) +{ + /* + decompress the input byte stream using the H-compress algorithm + + input - input array of compressed bytes + a - pre-allocated array to hold the output uncompressed image + nx - returned X axis size + ny - returned Y axis size + + NOTE: the nx and ny dimensions as defined within this code are reversed from + the usual FITS notation. ny is the fastest varying dimension, which is + usually considered the X axis in the FITS image display + + */ +int stat; + + if (*status > 0) return(*status); + + /* decode the input array */ + + stat = decode(input, a, nx, ny, scale); + *status = stat; + if (stat) return(*status); + + /* + * Un-Digitize + */ + undigitize(a, *nx, *ny, *scale); + + /* + * Inverse H-transform + */ + stat = hinv(a, *nx, *ny, smooth, *scale); + *status = stat; + + return(*status); +} +/* ---------------------------------------------------------------------- */ +int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *ny, int *nx, + int *scale, int *status) +{ + /* + decompress the input byte stream using the H-compress algorithm + + input - input array of compressed bytes + a - pre-allocated array to hold the output uncompressed image + nx - returned X axis size + ny - returned Y axis size + + NOTE: the nx and ny dimensions as defined within this code are reversed from + the usual FITS notation. ny is the fastest varying dimension, which is + usually considered the X axis in the FITS image display + + */ + int stat, *iarray, ii, nval; + + if (*status > 0) return(*status); + + /* decode the input array */ + + stat = decode64(input, a, nx, ny, scale); + *status = stat; + if (stat) return(*status); + + /* + * Un-Digitize + */ + undigitize64(a, *nx, *ny, *scale); + + /* + * Inverse H-transform + */ + stat = hinv64(a, *nx, *ny, smooth, *scale); + + *status = stat; + + /* pack the I*8 values back into an I*4 array */ + iarray = (int *) a; + nval = (*nx) * (*ny); + + for (ii = 0; ii < nval; ii++) + iarray[ii] = (int) a[ii]; + + return(*status); +} + +/* ############################################################################ */ +/* ############################################################################ */ + +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* hinv.c Inverse H-transform of NX x NY integer image + * + * Programmer: R. White Date: 23 July 1993 + */ + +/* ############################################################################ */ +static int +hinv(int a[], int nx, int ny, int smooth ,int scale) +/* +int smooth; 0 for no smoothing, else smooth during inversion +int scale; used if smoothing is specified +*/ +{ +int nmax, log2n, i, j, k; +int nxtop,nytop,nxf,nyf,c; +int oddx,oddy; +int shift, bit0, bit1, bit2, mask0, mask1, mask2, + prnd0, prnd1, prnd2, nrnd0, nrnd1, nrnd2, lowbit0, lowbit1; +int h0, hx, hy, hc; +int s10, s00; +int *tmp; + + /* + * log2n is log2 of max(nx,ny) rounded up to next power of 2 + */ + nmax = (nx>ny) ? nx : ny; + log2n = (int) (log((float) nmax)/log(2.0)+0.5); + if ( nmax > (1<> 1; + prnd1 = bit1 >> 1; + prnd2 = bit2 >> 1; + nrnd0 = prnd0 - 1; + nrnd1 = prnd1 - 1; + nrnd2 = prnd2 - 1; + /* + * round h0 to multiple of bit2 + */ + a[0] = (a[0] + ((a[0] >= 0) ? prnd2 : nrnd2)) & mask2; + /* + * do log2n expansions + * + * We're indexing a as a 2-D array with dimensions (nx,ny). + */ + nxtop = 1; + nytop = 1; + nxf = nx; + nyf = ny; + c = 1<=0; k--) { + /* + * this somewhat cryptic code generates the sequence + * ntop[k-1] = (ntop[k]+1)/2, where ntop[log2n] = n + */ + c = c>>1; + nxtop = nxtop<<1; + nytop = nytop<<1; + if (nxf <= c) { nxtop -= 1; } else { nxf -= c; } + if (nyf <= c) { nytop -= 1; } else { nyf -= c; } + /* + * double shift and fix nrnd0 (because prnd0=0) on last pass + */ + if (k == 0) { + nrnd0 = 0; + shift = 2; + } + /* + * unshuffle in each dimension to interleave coefficients + */ + for (i = 0; i= 0) ? prnd1 : nrnd1)) & mask1; + hy = (hy + ((hy >= 0) ? prnd1 : nrnd1)) & mask1; + hc = (hc + ((hc >= 0) ? prnd0 : nrnd0)) & mask0; + /* + * propagate bit0 of hc to hx,hy + */ + lowbit0 = hc & bit0; + hx = (hx >= 0) ? (hx - lowbit0) : (hx + lowbit0); + hy = (hy >= 0) ? (hy - lowbit0) : (hy + lowbit0); + /* + * Propagate bits 0 and 1 of hc,hx,hy to h0. + * This could be simplified if we assume h0>0, but then + * the inversion would not be lossless for images with + * negative pixels. + */ + lowbit1 = (hc ^ hx ^ hy) & bit1; + h0 = (h0 >= 0) + ? (h0 + lowbit0 - lowbit1) + : (h0 + ((lowbit0 == 0) ? lowbit1 : (lowbit0-lowbit1))); + /* + * Divide sums by 2 (4 last time) + */ + a[s10+1] = (h0 + hx + hy + hc) >> shift; + a[s10 ] = (h0 + hx - hy - hc) >> shift; + a[s00+1] = (h0 - hx + hy - hc) >> shift; + a[s00 ] = (h0 - hx - hy + hc) >> shift; + s00 += 2; + s10 += 2; + } + if (oddy) { + /* + * do last element in row if row length is odd + * s00+1, s10+1 are off edge + */ + h0 = a[s00 ]; + hx = a[s10 ]; + hx = ((hx >= 0) ? (hx+prnd1) : (hx+nrnd1)) & mask1; + lowbit1 = hx & bit1; + h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); + a[s10 ] = (h0 + hx) >> shift; + a[s00 ] = (h0 - hx) >> shift; + } + } + if (oddx) { + /* + * do last row if column length is odd + * s10, s10+1 are off edge + */ + s00 = ny*i; + for (j = 0; j= 0) ? (hy+prnd1) : (hy+nrnd1)) & mask1; + lowbit1 = hy & bit1; + h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); + a[s00+1] = (h0 + hy) >> shift; + a[s00 ] = (h0 - hy) >> shift; + s00 += 2; + } + if (oddy) { + /* + * do corner element if both row and column lengths are odd + * s00+1, s10, s10+1 are off edge + */ + h0 = a[s00 ]; + a[s00 ] = h0 >> shift; + } + } + /* + * divide all the masks and rounding values by 2 + */ + bit2 = bit1; + bit1 = bit0; + bit0 = bit0 >> 1; + mask1 = mask0; + mask0 = mask0 >> 1; + prnd1 = prnd0; + prnd0 = prnd0 >> 1; + nrnd1 = nrnd0; + nrnd0 = prnd0 - 1; + } + free(tmp); + return(0); +} +/* ############################################################################ */ +static int +hinv64(LONGLONG a[], int nx, int ny, int smooth ,int scale) +/* +int smooth; 0 for no smoothing, else smooth during inversion +int scale; used if smoothing is specified +*/ +{ +int nmax, log2n, i, j, k; +int nxtop,nytop,nxf,nyf,c; +int oddx,oddy; +int shift; +LONGLONG mask0, mask1, mask2, prnd0, prnd1, prnd2, bit0, bit1, bit2; +LONGLONG nrnd0, nrnd1, nrnd2, lowbit0, lowbit1; +LONGLONG h0, hx, hy, hc; +int s10, s00; +LONGLONG *tmp; + + /* + * log2n is log2 of max(nx,ny) rounded up to next power of 2 + */ + nmax = (nx>ny) ? nx : ny; + log2n = (int) (log((float) nmax)/log(2.0)+0.5); + if ( nmax > (1<> 1; + prnd1 = bit1 >> 1; + prnd2 = bit2 >> 1; + nrnd0 = prnd0 - 1; + nrnd1 = prnd1 - 1; + nrnd2 = prnd2 - 1; + /* + * round h0 to multiple of bit2 + */ + a[0] = (a[0] + ((a[0] >= 0) ? prnd2 : nrnd2)) & mask2; + /* + * do log2n expansions + * + * We're indexing a as a 2-D array with dimensions (nx,ny). + */ + nxtop = 1; + nytop = 1; + nxf = nx; + nyf = ny; + c = 1<=0; k--) { + /* + * this somewhat cryptic code generates the sequence + * ntop[k-1] = (ntop[k]+1)/2, where ntop[log2n] = n + */ + c = c>>1; + nxtop = nxtop<<1; + nytop = nytop<<1; + if (nxf <= c) { nxtop -= 1; } else { nxf -= c; } + if (nyf <= c) { nytop -= 1; } else { nyf -= c; } + /* + * double shift and fix nrnd0 (because prnd0=0) on last pass + */ + if (k == 0) { + nrnd0 = 0; + shift = 2; + } + /* + * unshuffle in each dimension to interleave coefficients + */ + for (i = 0; i= 0) ? prnd1 : nrnd1)) & mask1; + hy = (hy + ((hy >= 0) ? prnd1 : nrnd1)) & mask1; + hc = (hc + ((hc >= 0) ? prnd0 : nrnd0)) & mask0; + /* + * propagate bit0 of hc to hx,hy + */ + lowbit0 = hc & bit0; + hx = (hx >= 0) ? (hx - lowbit0) : (hx + lowbit0); + hy = (hy >= 0) ? (hy - lowbit0) : (hy + lowbit0); + /* + * Propagate bits 0 and 1 of hc,hx,hy to h0. + * This could be simplified if we assume h0>0, but then + * the inversion would not be lossless for images with + * negative pixels. + */ + lowbit1 = (hc ^ hx ^ hy) & bit1; + h0 = (h0 >= 0) + ? (h0 + lowbit0 - lowbit1) + : (h0 + ((lowbit0 == 0) ? lowbit1 : (lowbit0-lowbit1))); + /* + * Divide sums by 2 (4 last time) + */ + a[s10+1] = (h0 + hx + hy + hc) >> shift; + a[s10 ] = (h0 + hx - hy - hc) >> shift; + a[s00+1] = (h0 - hx + hy - hc) >> shift; + a[s00 ] = (h0 - hx - hy + hc) >> shift; + s00 += 2; + s10 += 2; + } + if (oddy) { + /* + * do last element in row if row length is odd + * s00+1, s10+1 are off edge + */ + h0 = a[s00 ]; + hx = a[s10 ]; + hx = ((hx >= 0) ? (hx+prnd1) : (hx+nrnd1)) & mask1; + lowbit1 = hx & bit1; + h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); + a[s10 ] = (h0 + hx) >> shift; + a[s00 ] = (h0 - hx) >> shift; + } + } + if (oddx) { + /* + * do last row if column length is odd + * s10, s10+1 are off edge + */ + s00 = ny*i; + for (j = 0; j= 0) ? (hy+prnd1) : (hy+nrnd1)) & mask1; + lowbit1 = hy & bit1; + h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); + a[s00+1] = (h0 + hy) >> shift; + a[s00 ] = (h0 - hy) >> shift; + s00 += 2; + } + if (oddy) { + /* + * do corner element if both row and column lengths are odd + * s00+1, s10, s10+1 are off edge + */ + h0 = a[s00 ]; + a[s00 ] = h0 >> shift; + } + } + /* + * divide all the masks and rounding values by 2 + */ + bit2 = bit1; + bit1 = bit0; + bit0 = bit0 >> 1; + mask1 = mask0; + mask0 = mask0 >> 1; + prnd1 = prnd0; + prnd0 = prnd0 >> 1; + nrnd1 = nrnd0; + nrnd0 = prnd0 - 1; + } + free(tmp); + return(0); +} + +/* ############################################################################ */ +static void +unshuffle(int a[], int n, int n2, int tmp[]) +/* +int a[]; array to shuffle +int n; number of elements to shuffle +int n2; second dimension +int tmp[]; scratch storage +*/ +{ +int i; +int nhalf; +int *p1, *p2, *pt; + + /* + * copy 2nd half of array to tmp + */ + nhalf = (n+1)>>1; + pt = tmp; + p1 = &a[n2*nhalf]; /* pointer to a[i] */ + for (i=nhalf; i= 0; i--) { + *p1 = *p2; + p2 -= n2; + p1 -= (n2+n2); + } + /* + * now distribute 2nd half of array (in tmp) to odd elements + */ + pt = tmp; + p1 = &a[n2]; /* pointer to a[i] */ + for (i=1; i>1; + pt = tmp; + p1 = &a[n2*nhalf]; /* pointer to a[i] */ + for (i=nhalf; i= 0; i--) { + *p1 = *p2; + p2 -= n2; + p1 -= (n2+n2); + } + /* + * now distribute 2nd half of array (in tmp) to odd elements + */ + pt = tmp; + p1 = &a[n2]; /* pointer to a[i] */ + for (i=1; i> 1); + if (smax <= 0) return; + ny2 = ny << 1; + /* + * We're indexing a as a 2-D array with dimensions (nxtop,ny) of which + * only (nxtop,nytop) are used. The coefficients on the edge of the + * array are not adjusted (which is why the loops below start at 2 + * instead of 0 and end at nxtop-2 instead of nxtop.) + */ + /* + * Adjust x difference hx + */ + for (i = 2; i=0, dmin<=0. + */ + if (dmin < dmax) { + diff = max( min(diff, dmax), dmin); + /* + * Compute change in slope limited to range +/- smax. + * Careful with rounding negative numbers when using + * shift for divide by 8. + */ + s = diff-(a[s10]<<3); + s = (s>=0) ? (s>>3) : ((s+7)>>3) ; + s = max( min(s, smax), -smax); + a[s10] = a[s10]+s; + } + s00 += 2; + s10 += 2; + } + } + /* + * Adjust y difference hy + */ + for (i = 0; i=0) ? (s>>3) : ((s+7)>>3) ; + s = max( min(s, smax), -smax); + a[s00+1] = a[s00+1]+s; + } + s00 += 2; + s10 += 2; + } + } + /* + * Adjust curvature difference hc + */ + for (i = 2; i=0, dmin<=0. + */ + if (dmin < dmax) { + diff = max( min(diff, dmax), dmin); + /* + * Compute change in slope limited to range +/- smax. + * Careful with rounding negative numbers when using + * shift for divide by 64. + */ + s = diff-(a[s10+1]<<6); + s = (s>=0) ? (s>>6) : ((s+63)>>6) ; + s = max( min(s, smax), -smax); + a[s10+1] = a[s10+1]+s; + } + s00 += 2; + s10 += 2; + } + } +} +/* ############################################################################ */ +static void +hsmooth64(LONGLONG a[], int nxtop, int nytop, int ny, int scale) +/* +LONGLONG a[]; array of H-transform coefficients +int nxtop,nytop; size of coefficient block to use +int ny; actual 1st dimension of array +int scale; truncation scale factor that was used +*/ +{ +int i, j; +int ny2, s10, s00; +LONGLONG hm, h0, hp, hmm, hpm, hmp, hpp, hx2, hy2, diff, dmax, dmin, s, smax, m1, m2; + + /* + * Maximum change in coefficients is determined by scale factor. + * Since we rounded during division (see digitize.c), the biggest + * permitted change is scale/2. + */ + smax = (scale >> 1); + if (smax <= 0) return; + ny2 = ny << 1; + /* + * We're indexing a as a 2-D array with dimensions (nxtop,ny) of which + * only (nxtop,nytop) are used. The coefficients on the edge of the + * array are not adjusted (which is why the loops below start at 2 + * instead of 0 and end at nxtop-2 instead of nxtop.) + */ + /* + * Adjust x difference hx + */ + for (i = 2; i=0, dmin<=0. + */ + if (dmin < dmax) { + diff = max( min(diff, dmax), dmin); + /* + * Compute change in slope limited to range +/- smax. + * Careful with rounding negative numbers when using + * shift for divide by 8. + */ + s = diff-(a[s10]<<3); + s = (s>=0) ? (s>>3) : ((s+7)>>3) ; + s = max( min(s, smax), -smax); + a[s10] = a[s10]+s; + } + s00 += 2; + s10 += 2; + } + } + /* + * Adjust y difference hy + */ + for (i = 0; i=0) ? (s>>3) : ((s+7)>>3) ; + s = max( min(s, smax), -smax); + a[s00+1] = a[s00+1]+s; + } + s00 += 2; + s10 += 2; + } + } + /* + * Adjust curvature difference hc + */ + for (i = 2; i=0, dmin<=0. + */ + if (dmin < dmax) { + diff = max( min(diff, dmax), dmin); + /* + * Compute change in slope limited to range +/- smax. + * Careful with rounding negative numbers when using + * shift for divide by 64. + */ + s = diff-(a[s10+1]<<6); + s = (s>=0) ? (s>>6) : ((s+63)>>6) ; + s = max( min(s, smax), -smax); + a[s10+1] = a[s10+1]+s; + } + s00 += 2; + s10 += 2; + } + } +} + + +/* ############################################################################ */ +/* ############################################################################ */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* undigitize.c undigitize H-transform + * + * Programmer: R. White Date: 9 May 1991 + */ + +/* ############################################################################ */ +static void +undigitize(int a[], int nx, int ny, int scale) +{ +int *p; + + /* + * multiply by scale + */ + if (scale <= 1) return; + for (p=a; p <= &a[nx*ny-1]; p++) *p = (*p)*scale; +} +/* ############################################################################ */ +static void +undigitize64(LONGLONG a[], int nx, int ny, int scale) +{ +LONGLONG *p, scale64; + + /* + * multiply by scale + */ + if (scale <= 1) return; + scale64 = (LONGLONG) scale; /* use a 64-bit int for efficiency in the big loop */ + + for (p=a; p <= &a[nx*ny-1]; p++) *p = (*p)*scale64; +} + +/* ############################################################################ */ +/* ############################################################################ */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* decode.c read codes from infile and construct array + * + * Programmer: R. White Date: 2 February 1994 + */ + + +static char code_magic[2] = { (char)0xDD, (char)0x99 }; + +/* ############################################################################ */ +static int decode(unsigned char *infile, int *a, int *nx, int *ny, int *scale) +/* +char *infile; input file +int *a; address of output array [nx][ny] +int *nx,*ny; size of output array +int *scale; scale factor for digitization +*/ +{ +LONGLONG sumall; +int nel, stat; +unsigned char nbitplanes[3]; +char tmagic[2]; + + /* initialize the byte read position to the beginning of the array */; + nextchar = 0; + + /* + * File starts either with special 2-byte magic code or with + * FITS keyword "SIMPLE =" + */ + qread(infile, tmagic, sizeof(tmagic)); + /* + * check for correct magic code value + */ + if (memcmp(tmagic,code_magic,sizeof(code_magic)) != 0) { + ffpmsg("bad file format"); + return(DATA_DECOMPRESSION_ERR); + } + *nx =readint(infile); /* x size of image */ + *ny =readint(infile); /* y size of image */ + *scale=readint(infile); /* scale factor for digitization */ + + nel = (*nx) * (*ny); + + /* sum of all pixels */ + sumall=readlonglong(infile); + /* # bits in quadrants */ + + qread(infile, (char *) nbitplanes, sizeof(nbitplanes)); + + stat = dodecode(infile, a, *nx, *ny, nbitplanes); + /* + * put sum of all pixels back into pixel 0 + */ + a[0] = (int) sumall; + return(stat); +} +/* ############################################################################ */ +static int decode64(unsigned char *infile, LONGLONG *a, int *nx, int *ny, int *scale) +/* +char *infile; input file +LONGLONG *a; address of output array [nx][ny] +int *nx,*ny; size of output array +int *scale; scale factor for digitization +*/ +{ +int nel, stat; +LONGLONG sumall; +unsigned char nbitplanes[3]; +char tmagic[2]; + + /* initialize the byte read position to the beginning of the array */; + nextchar = 0; + + /* + * File starts either with special 2-byte magic code or with + * FITS keyword "SIMPLE =" + */ + qread(infile, tmagic, sizeof(tmagic)); + /* + * check for correct magic code value + */ + if (memcmp(tmagic,code_magic,sizeof(code_magic)) != 0) { + ffpmsg("bad file format"); + return(DATA_DECOMPRESSION_ERR); + } + *nx =readint(infile); /* x size of image */ + *ny =readint(infile); /* y size of image */ + *scale=readint(infile); /* scale factor for digitization */ + + nel = (*nx) * (*ny); + + /* sum of all pixels */ + sumall=readlonglong(infile); + /* # bits in quadrants */ + + qread(infile, (char *) nbitplanes, sizeof(nbitplanes)); + + stat = dodecode64(infile, a, *nx, *ny, nbitplanes); + /* + * put sum of all pixels back into pixel 0 + */ + a[0] = sumall; + + return(stat); +} + + +/* ############################################################################ */ +/* ############################################################################ */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ +/* dodecode.c Decode stream of characters on infile and return array + * + * This version encodes the different quadrants separately + * + * Programmer: R. White Date: 9 May 1991 + */ + +/* ############################################################################ */ +static int +dodecode(unsigned char *infile, int a[], int nx, int ny, unsigned char nbitplanes[3]) + +/* int a[]; + int nx,ny; Array dimensions are [nx][ny] + unsigned char nbitplanes[3]; Number of bit planes in quadrants +*/ +{ +int i, nel, nx2, ny2, stat; + + nel = nx*ny; + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + + /* + * initialize a to zero + */ + for (i=0; inqy) ? nqx : nqy; + log2n = (int) (log((float) nqmax)/log(2.0)+0.5); + if (nqmax > (1<= 0; bit--) { + /* + * Was bitplane was quadtree-coded or written directly? + */ + b = input_nybble(infile); + + if(b == 0) { + /* + * bit map was written directly + */ + read_bdirect(infile,a,n,nqx,nqy,scratch,bit); + } else if (b != 0xf) { + ffpmsg("qtree_decode: bad format code"); + return(DATA_DECOMPRESSION_ERR); + } else { + /* + * bitmap was quadtree-coded, do log2n expansions + * + * read first code + */ + scratch[0] = input_huffman(infile); + /* + * now do log2n expansions, reading codes from file as necessary + */ + nx = 1; + ny = 1; + nfx = nqx; + nfy = nqy; + c = 1<>1; + nx = nx<<1; + ny = ny<<1; + if (nfx <= c) { nx -= 1; } else { nfx -= c; } + if (nfy <= c) { ny -= 1; } else { nfy -= c; } + qtree_expand(infile,scratch,nx,ny,scratch); + } + /* + * now copy last set of 4-bit codes to bitplane bit of array a + */ + qtree_bitins(scratch,nqx,nqy,a,n,bit); + } + } + free(scratch); + return(0); +} +/* ############################################################################ */ +static int +qtree_decode64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes) + +/* +char *infile; +LONGLONG a[]; a is 2-D array with dimensions (n,n) +int n; length of full row in a +int nqx; partial length of row to decode +int nqy; partial length of column (<=n) +int nbitplanes; number of bitplanes to decode +*/ +{ +int log2n, k, bit, b, nqmax; +int nx,ny,nfx,nfy,c; +int nqx2, nqy2; +unsigned char *scratch; + + /* + * log2n is log2 of max(nqx,nqy) rounded up to next power of 2 + */ + nqmax = (nqx>nqy) ? nqx : nqy; + log2n = (int) (log((float) nqmax)/log(2.0)+0.5); + if (nqmax > (1<= 0; bit--) { + /* + * Was bitplane was quadtree-coded or written directly? + */ + b = input_nybble(infile); + + if(b == 0) { + /* + * bit map was written directly + */ + read_bdirect64(infile,a,n,nqx,nqy,scratch,bit); + } else if (b != 0xf) { + ffpmsg("qtree_decode64: bad format code"); + return(DATA_DECOMPRESSION_ERR); + } else { + /* + * bitmap was quadtree-coded, do log2n expansions + * + * read first code + */ + scratch[0] = input_huffman(infile); + /* + * now do log2n expansions, reading codes from file as necessary + */ + nx = 1; + ny = 1; + nfx = nqx; + nfy = nqy; + c = 1<>1; + nx = nx<<1; + ny = ny<<1; + if (nfx <= c) { nx -= 1; } else { nfx -= c; } + if (nfy <= c) { ny -= 1; } else { nfy -= c; } + qtree_expand(infile,scratch,nx,ny,scratch); + } + /* + * now copy last set of 4-bit codes to bitplane bit of array a + */ + qtree_bitins64(scratch,nqx,nqy,a,n,bit); + } + } + free(scratch); + return(0); +} + + +/* ############################################################################ */ +/* + * do one quadtree expansion step on array a[(nqx+1)/2,(nqy+1)/2] + * results put into b[nqx,nqy] (which may be the same as a) + */ +static void +qtree_expand(unsigned char *infile, unsigned char a[], int nx, int ny, unsigned char b[]) +{ +int i; + + /* + * first copy a to b, expanding each 4-bit value + */ + qtree_copy(a,nx,ny,b,ny); + /* + * now read new 4-bit values into b for each non-zero element + */ + for (i = nx*ny-1; i >= 0; i--) { + if (b[i] != 0) b[i] = input_huffman(infile); + } +} + +/* ############################################################################ */ +/* + * copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding + * each value to 2x2 pixels + * a,b may be same array + */ +static void +qtree_copy(unsigned char a[], int nx, int ny, unsigned char b[], int n) +/* int n; declared y dimension of b */ +{ +int i, j, k, nx2, ny2; +int s00, s10; + + /* + * first copy 4-bit values to b + * start at end in case a,b are same array + */ + nx2 = (nx+1)/2; + ny2 = (ny+1)/2; + k = ny2*(nx2-1)+ny2-1; /* k is index of a[i,j] */ + for (i = nx2-1; i >= 0; i--) { + s00 = 2*(n*i+ny2-1); /* s00 is index of b[2*i,2*j] */ + for (j = ny2-1; j >= 0; j--) { + b[s00] = a[k]; + k -= 1; + s00 -= 2; + } + } + /* + * now expand each 2x2 block + */ + for (i = 0; i>1) & 1; + b[s00+1] = (b[s00]>>2) & 1; + b[s00 ] = (b[s00]>>3) & 1; + s00 += 2; + s10 += 2; + } + if (j < ny) { + /* + * row size is odd, do last element in row + * s00+1, s10+1 are off edge + */ + b[s10 ] = (b[s00]>>1) & 1; + b[s00 ] = (b[s00]>>3) & 1; + } + } + if (i < nx) { + /* + * column size is odd, do last row + * s10, s10+1 are off edge + */ + s00 = n*i; + for (j = 0; j>2) & 1; + b[s00 ] = (b[s00]>>3) & 1; + s00 += 2; + } + if (j < ny) { + /* + * both row and column size are odd, do corner element + * s00+1, s10, s10+1 are off edge + */ + b[s00 ] = (b[s00]>>3) & 1; + } + } +} + +/* ############################################################################ */ +/* + * Copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding + * each value to 2x2 pixels and inserting into bitplane BIT of B. + * A,B may NOT be same array (it wouldn't make sense to be inserting + * bits into the same array anyway.) + */ +static void +qtree_bitins(unsigned char a[], int nx, int ny, int b[], int n, int bit) +/* + int n; declared y dimension of b +*/ +{ +int i, j, k; +int s00, s10; + + /* + * expand each 2x2 block + */ + k = 0; /* k is index of a[i/2,j/2] */ + for (i = 0; i>1) & 1) << bit; + b[s00+1] |= ((a[k]>>2) & 1) << bit; + b[s00 ] |= ((a[k]>>3) & 1) << bit; + s00 += 2; + s10 += 2; + k += 1; + } + if (j < ny) { + /* + * row size is odd, do last element in row + * s00+1, s10+1 are off edge + */ + b[s10 ] |= ((a[k]>>1) & 1) << bit; + b[s00 ] |= ((a[k]>>3) & 1) << bit; + k += 1; + } + } + if (i < nx) { + /* + * column size is odd, do last row + * s10, s10+1 are off edge + */ + s00 = n*i; + for (j = 0; j>2) & 1) << bit; + b[s00 ] |= ((a[k]>>3) & 1) << bit; + s00 += 2; + k += 1; + } + if (j < ny) { + /* + * both row and column size are odd, do corner element + * s00+1, s10, s10+1 are off edge + */ + b[s00 ] |= ((a[k]>>3) & 1) << bit; + k += 1; + } + } +} +/* ############################################################################ */ +/* + * Copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding + * each value to 2x2 pixels and inserting into bitplane BIT of B. + * A,B may NOT be same array (it wouldn't make sense to be inserting + * bits into the same array anyway.) + */ +static void +qtree_bitins64(unsigned char a[], int nx, int ny, LONGLONG b[], int n, int bit) +/* + int n; declared y dimension of b +*/ +{ +int i, j, k; +int s00, s10; + + /* + * expand each 2x2 block + */ + k = 0; /* k is index of a[i/2,j/2] */ + for (i = 0; i>1) & 1) << bit; + b[s00+1] |= ((((LONGLONG)a[k])>>2) & 1) << bit; + b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; + s00 += 2; + s10 += 2; + k += 1; + } + if (j < ny) { + /* + * row size is odd, do last element in row + * s00+1, s10+1 are off edge + */ + b[s10 ] |= ((((LONGLONG)a[k])>>1) & 1) << bit; + b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; + k += 1; + } + } + if (i < nx) { + /* + * column size is odd, do last row + * s10, s10+1 are off edge + */ + s00 = n*i; + for (j = 0; j>2) & 1) << bit; + b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; + s00 += 2; + k += 1; + } + if (j < ny) { + /* + * both row and column size are odd, do corner element + * s00+1, s10, s10+1 are off edge + */ + b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; + k += 1; + } + } +} + +/* ############################################################################ */ +static void +read_bdirect(unsigned char *infile, int a[], int n, int nqx, int nqy, unsigned char scratch[], int bit) +{ +int i; + + /* + * read bit image packed 4 pixels/nybble + */ + for (i = 0; i < ((nqx+1)/2) * ((nqy+1)/2); i++) { + scratch[i] = input_nybble(infile); + } + /* + * insert in bitplane BIT of image A + */ + qtree_bitins(scratch,nqx,nqy,a,n,bit); +} +/* ############################################################################ */ +static void +read_bdirect64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, unsigned char scratch[], int bit) +{ +int i; + + /* + * read bit image packed 4 pixels/nybble + */ + for (i = 0; i < ((nqx+1)/2) * ((nqy+1)/2); i++) { + scratch[i] = input_nybble(infile); + } + /* + * insert in bitplane BIT of image A + */ + qtree_bitins64(scratch,nqx,nqy,a,n,bit); +} + +/* ############################################################################ */ +/* + * Huffman decoding for fixed codes + * + * Coded values range from 0-15 + * + * Huffman code values (hex): + * + * 3e, 00, 01, 08, 02, 09, 1a, 1b, + * 03, 1c, 0a, 1d, 0b, 1e, 3f, 0c + * + * and number of bits in each code: + * + * 6, 3, 3, 4, 3, 4, 5, 5, + * 3, 5, 4, 5, 4, 5, 6, 4 + */ +static int input_huffman(unsigned char *infile) +{ +int c; + + /* + * get first 3 bits to start + */ + c = input_nbits(infile,3); + if (c < 4) { + /* + * this is all we need + * return 1,2,4,8 for c=0,1,2,3 + */ + return(1< 0) { + total += nread; + if (total==n) return(total); + } +*/ + + memcpy(buffer, &file[nextchar], n); + nextchar += n; + + return(n); +} + +/* ############################################################################ */ +/* ############################################################################ */ +/* Copyright (c) 1993 Association of Universities for Research + * in Astronomy. All rights reserved. Produced under National + * Aeronautics and Space Administration Contract No. NAS5-26555. + */ + +/* BIT INPUT ROUTINES */ + +/* THE BIT BUFFER */ + +static int buffer2; /* Bits waiting to be input */ +static int bits_to_go; /* Number of bits still in buffer */ + + +/* INITIALIZE BIT INPUT */ + +/* ############################################################################ */ +static void start_inputing_bits() +{ + /* + * Buffer starts out with no bits in it + */ + bits_to_go = 0; +} + + +/* ############################################################################ */ +/* INPUT A BIT */ + +static int input_bit(unsigned char *infile) +{ + if (bits_to_go == 0) { /* Read the next byte if no */ + /* buffer2 = getc(infile); */ /* bits are left in buffer */ + + buffer2 = infile[nextchar]; + nextchar++; + + /* if (buffer2 == EOF) { */ + /* + * end of file is an error for this application + */ +/* + fprintf(stderr, "input_bit: unexpected end-of-file\n"); + exit(-1); + } +*/ + bits_to_go = 8; + } + /* + * Return the next bit + */ + bits_to_go -= 1; + return((buffer2>>bits_to_go) & 1); +} + + +/* ############################################################################ */ +/* INPUT N BITS (N must be <= 8) */ + +static int input_nbits(unsigned char *infile, int n) +{ +int c; + + if (bits_to_go < n) { + /* + * need another byte's worth of bits + */ + buffer2 <<= 8; + +/* c = getc(infile); */ + + c = infile[nextchar]; + nextchar++; + +/* if (c == EOF) { */ + /* + * end of file is an error for this application + */ +/* + fprintf(stderr, "input_nbits: unexpected end-of-file\n"); + exit(-1); + } +*/ + buffer2 |= c; + bits_to_go += 8; + } + /* + * now pick off the first n bits + */ + bits_to_go -= n; + return( (buffer2>>bits_to_go) & ((1< +#include "fitsio.h" + +int main(int argc, char *argv[]) +{ + fitsfile *infptr, *outfptr; /* FITS file pointers defined in fitsio.h */ + int status = 0; /* status must always be initialized = 0 */ + + if (argc != 3) + { + printf("Usage: fitscopy inputfile outputfile\n"); + printf("\n"); + printf("Copy an input file to an output file, optionally filtering\n"); + printf("the file in the process. This seemingly simple program can\n"); + printf("apply powerful filters which transform the input file as\n"); + printf("it is being copied. Filters may be used to extract a\n"); + printf("subimage from a larger image, select rows from a table,\n"); + printf("filter a table with a GTI time extension or a SAO region file,\n"); + printf("create or delete columns in a table, create an image by\n"); + printf("binning (histogramming) 2 table columns, and convert IRAF\n"); + printf("format *.imh or raw binary data files into FITS images.\n"); + printf("See the CFITSIO User's Guide for a complete description of\n"); + printf("the Extended File Name filtering syntax.\n"); + printf("\n"); + printf("Examples:\n"); + printf("\n"); + printf("fitscopy in.fit out.fit (simple file copy)\n"); + printf("fitscopy - - (stdin to stdout)\n"); + printf("fitscopy in.fit[11:50,21:60] out.fit (copy a subimage)\n"); + printf("fitscopy iniraf.imh out.fit (IRAF image to FITS)\n"); + printf("fitscopy in.dat[i512,512] out.fit (raw array to FITS)\n"); + printf("fitscopy in.fit[events][pi>35] out.fit (copy rows with pi>35)\n"); + printf("fitscopy in.fit[events][bin X,Y] out.fit (bin an image) \n"); + printf("fitscopy in.fit[events][col x=.9*y] out.fit (new x column)\n"); + printf("fitscopy in.fit[events][gtifilter()] out.fit (time filter)\n"); + printf("fitscopy in.fit[2][regfilter(\"pow.reg\")] out.fit (spatial filter)\n"); + printf("\n"); + printf("Note that it may be necessary to enclose the input file name\n"); + printf("in single quote characters on the Unix command line.\n"); + return(0); + } + /* Open the input file */ + if ( !fits_open_file(&infptr, argv[1], READONLY, &status) ) + { + /* Create the output file */ + if ( !fits_create_file(&outfptr, argv[2], &status) ) + { + + /* copy the previous, current, and following HDUs */ + fits_copy_file(infptr, outfptr, 1, 1, 1, &status); + + fits_close_file(outfptr, &status); + } + fits_close_file(infptr, &status); + } + + /* if error occured, print out error message */ + if (status) fits_report_error(stderr, status); + return(status); +} diff --git a/software/cfitsio3040/fitscore.c b/software/cfitsio3040/fitscore.c new file mode 100644 index 000000000..b429fd6e2 --- /dev/null +++ b/software/cfitsio3040/fitscore.c @@ -0,0 +1,8379 @@ +/* This file, fitscore.c, contains the core set of FITSIO routines. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ +/* + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +*/ + + +#include +#include +#include +#include +#include +#include +/* stddef.h is apparently needed to define size_t with some compilers ?? */ +#include +#include "fitsio2.h" + +#define errmsgsiz 25 +#define ESMARKER 27 /* Escape character is used as error stack marker */ + +#define DelAll 1 /* delete all messages on the error stack */ +#define DelMark 2 /* delete newest messages back to and including marker */ +#define DelNewest 3 /* delete the newest message from the stack */ +#define GetMesg 4 /* pop and return oldest message, ignoring marks */ +#define PutMesg 5 /* add a new message to the stack */ +#define PutMark 6 /* add a marker to the stack */ + +/*--------------------------------------------------------------------------*/ +float ffvers(float *version) /* IO - version number */ +/* + return the current version number of the FITSIO software +*/ +{ + *version = (float) 3.04; + +/* 12 March 2007 + + + Previous releases: + *version = 3.03 11 Dec 2006 + *version = 3.02 18 Sep 2006 + *version = 3.01 May 2006 included in FTOOLS 6.1 release + *version = 3.006 20 Feb 2006 + *version = 3.005 20 Dec 2005 (beta, in heasoft swift release + *version = 3.004 16 Sep 2005 (beta, in heasoft swift release + *version = 3.003 28 Jul 2005 (beta, in heasoft swift release + *version = 3.002 15 Apr 2005 (beta) + *version = 3.001 15 Mar 2005 (beta) released with heasoft 6.0 + *version = 3.000 1 Mar 2005 (internal release only) + *version = 2.51 2 Dec 2004 + *version = 2.50 28 Jul 2004 + *version = 2.49 11 Feb 2004 + *version = 2.48 28 Jan 2004 + *version = 2.470 18 Aug 2003 + *version = 2.460 20 May 2003 + *version = 2.450 30 Apr 2003 (internal release only) + *version = 2.440 8 Jan 2003 + *version = 2.430; 4 Nov 2002 + *version = 2.420; 19 Jul 2002 + *version = 2.410; 22 Apr 2002 used in ftools v5.2 + *version = 2.401; 28 Jan 2002 + *version = 2.400; 18 Jan 2002 + *version = 2.301; 7 Dec 2001 + *version = 2.300; 23 Oct 2001 + *version = 2.204; 26 Jul 2001 + *version = 2.203; 19 Jul 2001 used in ftools v5.1 + *version = 2.202; 22 May 2001 + *version = 2.201; 15 Mar 2001 + *version = 2.200; 26 Jan 2001 + *version = 2.100; 26 Sep 2000 + *version = 2.037; 6 Jul 2000 + *version = 2.036; 1 Feb 2000 + *version = 2.035; 7 Dec 1999 (internal release only) + *version = 2.034; 23 Nov 1999 + *version = 2.033; 17 Sep 1999 + *version = 2.032; 25 May 1999 + *version = 2.031; 31 Mar 1999 + *version = 2.030; 24 Feb 1999 + *version = 2.029; 11 Feb 1999 + *version = 2.028; 26 Jan 1999 + *version = 2.027; 12 Jan 1999 + *version = 2.026; 23 Dec 1998 + *version = 2.025; 1 Dec 1998 + *version = 2.024; 9 Nov 1998 + *version = 2.023; 1 Nov 1998 first full release of V2.0 + *version = 1.42; 30 Apr 1998 + *version = 1.40; 6 Feb 1998 + *version = 1.33; 16 Dec 1997 (internal release only) + *version = 1.32; 21 Nov 1997 (internal release only) + *version = 1.31; 4 Nov 1997 (internal release only) + *version = 1.30; 11 Sep 1997 + *version = 1.27; 3 Sep 1997 (internal release only) + *version = 1.25; 2 Jul 1997 + *version = 1.24; 2 May 1997 + *version = 1.23; 24 Apr 1997 + *version = 1.22; 18 Apr 1997 + *version = 1.21; 26 Mar 1997 + *version = 1.2; 29 Jan 1997 + *version = 1.11; 04 Dec 1996 + *version = 1.101; 13 Nov 1996 + *version = 1.1; 6 Nov 1996 + *version = 1.04; 17 Sep 1996 + *version = 1.03; 20 Aug 1996 + *version = 1.02; 15 Aug 1996 + *version = 1.01; 12 Aug 1996 +*/ + + return(*version); +} +/*--------------------------------------------------------------------------*/ +int ffflnm(fitsfile *fptr, /* I - FITS file pointer */ + char *filename, /* O - name of the file */ + int *status) /* IO - error status */ +/* + return the name of the FITS file +*/ +{ + strcpy(filename,(fptr->Fptr)->filename); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffflmd(fitsfile *fptr, /* I - FITS file pointer */ + int *filemode, /* O - open mode of the file */ + int *status) /* IO - error status */ +/* + return the access mode of the FITS file +*/ +{ + *filemode = (fptr->Fptr)->writemode; + return(*status); +} +/*--------------------------------------------------------------------------*/ +void ffgerr(int status, /* I - error status value */ + char *errtext) /* O - error message (max 30 char long + null) */ +/* + Return a short descriptive error message that corresponds to the input + error status value. The message may be up to 30 characters long, plus + the terminating null character. +*/ +{ + errtext[0] = '\0'; + + if (status >= 0 && status < 300) + { + switch (status) { + + case 0: + strcpy(errtext, "OK - no error"); + break; + case 1: + strcpy(errtext, "non-CFITSIO program error"); + break; + case 101: + strcpy(errtext, "same input and output files"); + break; + case 103: + strcpy(errtext, "attempt to open too many files"); + break; + case 104: + strcpy(errtext, "could not open the named file"); + break; + case 105: + strcpy(errtext, "couldn't create the named file"); + break; + case 106: + strcpy(errtext, "error writing to FITS file"); + break; + case 107: + strcpy(errtext, "tried to move past end of file"); + break; + case 108: + strcpy(errtext, "error reading from FITS file"); + break; + case 110: + strcpy(errtext, "could not close the file"); + break; + case 111: + strcpy(errtext, "array dimensions too big"); + break; + case 112: + strcpy(errtext, "cannot write to readonly file"); + break; + case 113: + strcpy(errtext, "could not allocate memory"); + break; + case 114: + strcpy(errtext, "invalid fitsfile pointer"); + break; + case 115: + strcpy(errtext, "NULL input pointer"); + break; + case 116: + strcpy(errtext, "error seeking file position"); + break; + case 121: + strcpy(errtext, "invalid URL prefix"); + break; + case 122: + strcpy(errtext, "too many I/O drivers"); + break; + case 123: + strcpy(errtext, "I/O driver init failed"); + break; + case 124: + strcpy(errtext, "no I/O driver for this URLtype"); + break; + case 125: + strcpy(errtext, "parse error in input file URL"); + break; + case 126: + strcpy(errtext, "parse error in range list"); + break; + case 151: + strcpy(errtext, "bad argument (shared mem drvr)"); + break; + case 152: + strcpy(errtext, "null ptr arg (shared mem drvr)"); + break; + case 153: + strcpy(errtext, "no free shared memory handles"); + break; + case 154: + strcpy(errtext, "share mem drvr not initialized"); + break; + case 155: + strcpy(errtext, "IPC system error (shared mem)"); + break; + case 156: + strcpy(errtext, "no memory (shared mem drvr)"); + break; + case 157: + strcpy(errtext, "share mem resource deadlock"); + break; + case 158: + strcpy(errtext, "lock file open/create failed"); + break; + case 159: + strcpy(errtext, "can't resize share mem block"); + break; + case 201: + strcpy(errtext, "header already has keywords"); + break; + case 202: + strcpy(errtext, "keyword not found in header"); + break; + case 203: + strcpy(errtext, "keyword number out of bounds"); + break; + case 204: + strcpy(errtext, "keyword value is undefined"); + break; + case 205: + strcpy(errtext, "string missing closing quote"); + break; + case 206: + strcpy(errtext, "error in indexed keyword name"); + break; + case 207: + strcpy(errtext, "illegal character in keyword"); + break; + case 208: + strcpy(errtext, "required keywords out of order"); + break; + case 209: + strcpy(errtext, "keyword value not positive int"); + break; + case 210: + strcpy(errtext, "END keyword not found"); + break; + case 211: + strcpy(errtext, "illegal BITPIX keyword value"); + break; + case 212: + strcpy(errtext, "illegal NAXIS keyword value"); + break; + case 213: + strcpy(errtext, "illegal NAXISn keyword value"); + break; + case 214: + strcpy(errtext, "illegal PCOUNT keyword value"); + break; + case 215: + strcpy(errtext, "illegal GCOUNT keyword value"); + break; + case 216: + strcpy(errtext, "illegal TFIELDS keyword value"); + break; + case 217: + strcpy(errtext, "negative table row size"); + break; + case 218: + strcpy(errtext, "negative number of rows"); + break; + case 219: + strcpy(errtext, "named column not found"); + break; + case 220: + strcpy(errtext, "illegal SIMPLE keyword value"); + break; + case 221: + strcpy(errtext, "first keyword not SIMPLE"); + break; + case 222: + strcpy(errtext, "second keyword not BITPIX"); + break; + case 223: + strcpy(errtext, "third keyword not NAXIS"); + break; + case 224: + strcpy(errtext, "missing NAXISn keywords"); + break; + case 225: + strcpy(errtext, "first keyword not XTENSION"); + break; + case 226: + strcpy(errtext, "CHDU not an ASCII table"); + break; + case 227: + strcpy(errtext, "CHDU not a binary table"); + break; + case 228: + strcpy(errtext, "PCOUNT keyword not found"); + break; + case 229: + strcpy(errtext, "GCOUNT keyword not found"); + break; + case 230: + strcpy(errtext, "TFIELDS keyword not found"); + break; + case 231: + strcpy(errtext, "missing TBCOLn keyword"); + break; + case 232: + strcpy(errtext, "missing TFORMn keyword"); + break; + case 233: + strcpy(errtext, "CHDU not an IMAGE extension"); + break; + case 234: + strcpy(errtext, "illegal TBCOLn keyword value"); + break; + case 235: + strcpy(errtext, "CHDU not a table extension"); + break; + case 236: + strcpy(errtext, "column exceeds width of table"); + break; + case 237: + strcpy(errtext, "more than 1 matching col. name"); + break; + case 241: + strcpy(errtext, "row width not = field widths"); + break; + case 251: + strcpy(errtext, "unknown FITS extension type"); + break; + case 252: + strcpy(errtext, "1st key not SIMPLE or XTENSION"); + break; + case 253: + strcpy(errtext, "END keyword is not blank"); + break; + case 254: + strcpy(errtext, "Header fill area not blank"); + break; + case 255: + strcpy(errtext, "Data fill area invalid"); + break; + case 261: + strcpy(errtext, "illegal TFORM format code"); + break; + case 262: + strcpy(errtext, "unknown TFORM datatype code"); + break; + case 263: + strcpy(errtext, "illegal TDIMn keyword value"); + break; + case 264: + strcpy(errtext, "invalid BINTABLE heap pointer"); + break; + default: + strcpy(errtext, "unknown error status"); + break; + } + } + else if (status < 600) + { + switch(status) { + + case 301: + strcpy(errtext, "illegal HDU number"); + break; + case 302: + strcpy(errtext, "column number < 1 or > tfields"); + break; + case 304: + strcpy(errtext, "negative byte address"); + break; + case 306: + strcpy(errtext, "negative number of elements"); + break; + case 307: + strcpy(errtext, "bad first row number"); + break; + case 308: + strcpy(errtext, "bad first element number"); + break; + case 309: + strcpy(errtext, "not an ASCII (A) column"); + break; + case 310: + strcpy(errtext, "not a logical (L) column"); + break; + case 311: + strcpy(errtext, "bad ASCII table datatype"); + break; + case 312: + strcpy(errtext, "bad binary table datatype"); + break; + case 314: + strcpy(errtext, "null value not defined"); + break; + case 317: + strcpy(errtext, "not a variable length column"); + break; + case 320: + strcpy(errtext, "illegal number of dimensions"); + break; + case 321: + strcpy(errtext, "1st pixel no. > last pixel no."); + break; + case 322: + strcpy(errtext, "BSCALE or TSCALn = 0."); + break; + case 323: + strcpy(errtext, "illegal axis length < 1"); + break; + case 340: + strcpy(errtext, "not group table"); + break; + case 341: + strcpy(errtext, "HDU already member of group"); + break; + case 342: + strcpy(errtext, "group member not found"); + break; + case 343: + strcpy(errtext, "group not found"); + break; + case 344: + strcpy(errtext, "bad group id"); + break; + case 345: + strcpy(errtext, "too many HDUs tracked"); + break; + case 346: + strcpy(errtext, "HDU alread tracked"); + break; + case 347: + strcpy(errtext, "bad Grouping option"); + break; + case 348: + strcpy(errtext, "identical pointers (groups)"); + break; + case 360: + strcpy(errtext, "malloc failed in parser"); + break; + case 361: + strcpy(errtext, "file read error in parser"); + break; + case 362: + strcpy(errtext, "null pointer arg (parser)"); + break; + case 363: + strcpy(errtext, "empty line (parser)"); + break; + case 364: + strcpy(errtext, "cannot unread > 1 line"); + break; + case 365: + strcpy(errtext, "parser too deeply nested"); + break; + case 366: + strcpy(errtext, "file open failed (parser)"); + break; + case 367: + strcpy(errtext, "hit EOF (parser)"); + break; + case 368: + strcpy(errtext, "bad argument (parser)"); + break; + case 369: + strcpy(errtext, "unexpected token (parser)"); + break; + case 401: + strcpy(errtext, "bad int to string conversion"); + break; + case 402: + strcpy(errtext, "bad float to string conversion"); + break; + case 403: + strcpy(errtext, "keyword value not integer"); + break; + case 404: + strcpy(errtext, "keyword value not logical"); + break; + case 405: + strcpy(errtext, "keyword value not floating pt"); + break; + case 406: + strcpy(errtext, "keyword value not double"); + break; + case 407: + strcpy(errtext, "bad string to int conversion"); + break; + case 408: + strcpy(errtext, "bad string to float conversion"); + break; + case 409: + strcpy(errtext, "bad string to double convert"); + break; + case 410: + strcpy(errtext, "illegal datatype code value"); + break; + case 411: + strcpy(errtext, "illegal no. of decimals"); + break; + case 412: + strcpy(errtext, "datatype conversion overflow"); + break; + case 413: + strcpy(errtext, "error compressing image"); + break; + case 414: + strcpy(errtext, "error uncompressing image"); + break; + case 420: + strcpy(errtext, "bad date or time conversion"); + break; + case 431: + strcpy(errtext, "syntax error in expression"); + break; + case 432: + strcpy(errtext, "expression result wrong type"); + break; + case 433: + strcpy(errtext, "vector result too large"); + break; + case 434: + strcpy(errtext, "missing output column"); + break; + case 435: + strcpy(errtext, "bad data in parsed column"); + break; + case 436: + strcpy(errtext, "output extension of wrong type"); + break; + case 501: + strcpy(errtext, "WCS angle too large"); + break; + case 502: + strcpy(errtext, "bad WCS coordinate"); + break; + case 503: + strcpy(errtext, "error in WCS calculation"); + break; + case 504: + strcpy(errtext, "bad WCS projection type"); + break; + case 505: + strcpy(errtext, "WCS keywords not found"); + break; + default: + strcpy(errtext, "unknown error status"); + break; + } + } + else + { + strcpy(errtext, "unknown error status"); + } + return; +} +/*--------------------------------------------------------------------------*/ +void ffpmsg(const char *err_message) +/* + put message on to error stack +*/ +{ + ffxmsg(PutMesg, (char *)err_message); + return; +} +/*--------------------------------------------------------------------------*/ +void ffpmrk(void) +/* + write a marker to the stack. It is then possible to pop only those + messages following the marker off of the stack, leaving the previous + messages unaffected. + + The marker is ignored by the ffgmsg routine. +*/ +{ + char *dummy = 0; + + ffxmsg(PutMark, dummy); + return; +} +/*--------------------------------------------------------------------------*/ +int ffgmsg(char *err_message) +/* + get oldest message from error stack, ignoring markers +*/ +{ + ffxmsg(GetMesg, err_message); + return(*err_message); +} +/*--------------------------------------------------------------------------*/ +void ffcmsg(void) +/* + erase all messages in the error stack +*/ +{ + char *dummy = 0; + + ffxmsg(DelAll, dummy); + return; +} +/*--------------------------------------------------------------------------*/ +void ffcmrk(void) +/* + erase newest messages in the error stack, stopping if a marker is found. + The marker is also erased in this case. +*/ +{ + char *dummy = 0; + + ffxmsg(DelMark, dummy); + return; +} +/*--------------------------------------------------------------------------*/ +void ffxmsg( int action, + char *errmsg) +/* + general routine to get, put, or clear the error message stack. + Use a static array rather than allocating memory as needed for + the error messages because it is likely to be more efficient + and simpler to implement. + + Action Code: +DelAll 1 delete all messages on the error stack +DelMark 2 delete messages back to and including the 1st marker +DelNewest 3 delete the newest message from the stack +GetMesg 4 pop and return oldest message, ignoring marks +PutMesg 5 add a new message to the stack +PutMark 6 add a marker to the stack + +*/ +{ + int ii; + char markflag; + static char *txtbuff[errmsgsiz], *tmpbuff, *msgptr; + static char errbuff[errmsgsiz][81]; /* initialize all = \0 */ + static int nummsg = 0; + + if (action == DelAll) /* clear the whole message stack */ + { + for (ii = 0; ii < nummsg; ii ++) + *txtbuff[ii] = '\0'; + + nummsg = 0; + } + else if (action == DelMark) /* clear up to and including first marker */ + { + while (nummsg > 0) { + nummsg--; + markflag = *txtbuff[nummsg]; /* store possible marker character */ + *txtbuff[nummsg] = '\0'; /* clear the buffer for this msg */ + + if (markflag == ESMARKER) + break; /* found a marker, so quit */ + } + } + else if (action == DelNewest) /* remove newest message from stack */ + { + if (nummsg > 0) + { + nummsg--; + *txtbuff[nummsg] = '\0'; /* clear the buffer for this msg */ + } + } + else if (action == GetMesg) /* pop and return oldest message from stack */ + { /* ignoring markers */ + while (nummsg > 0) + { + strcpy(errmsg, txtbuff[0]); /* copy oldest message to output */ + + *txtbuff[0] = '\0'; /* clear the buffer for this msg */ + + nummsg--; + for (ii = 0; ii < nummsg; ii++) + txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ + + if (errmsg[0] != ESMARKER) /* quit if this is not a marker */ + return; + } + errmsg[0] = '\0'; /* no messages in the stack */ + } + else if (action == PutMesg) /* add new message to stack */ + { + msgptr = errmsg; + while (strlen(msgptr)) + { + if (nummsg == errmsgsiz) + { + tmpbuff = txtbuff[0]; /* buffers full; reuse oldest buffer */ + *txtbuff[0] = '\0'; /* clear the buffer for this msg */ + + nummsg--; + for (ii = 0; ii < nummsg; ii++) + txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ + + txtbuff[nummsg] = tmpbuff; /* set pointer for the new message */ + } + else + { + for (ii = 0; ii < errmsgsiz; ii++) + { + if (*errbuff[ii] == '\0') /* find first empty buffer */ + { + txtbuff[nummsg] = errbuff[ii]; + break; + } + } + } + + strncat(txtbuff[nummsg], msgptr, 80); + nummsg++; + + msgptr += minvalue(80, strlen(msgptr)); + } + } + else if (action == PutMark) /* put a marker on the stack */ + { + if (nummsg == errmsgsiz) + { + tmpbuff = txtbuff[0]; /* buffers full; reuse oldest buffer */ + *txtbuff[0] = '\0'; /* clear the buffer for this msg */ + + nummsg--; + for (ii = 0; ii < nummsg; ii++) + txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ + + txtbuff[nummsg] = tmpbuff; /* set pointer for the new message */ + } + else + { + for (ii = 0; ii < errmsgsiz; ii++) + { + if (*errbuff[ii] == '\0') /* find first empty buffer */ + { + txtbuff[nummsg] = errbuff[ii]; + break; + } + } + } + + *txtbuff[nummsg] = ESMARKER; /* write the marker */ + *(txtbuff[nummsg] + 1) = '\0'; + nummsg++; + + } + return; +} +/*--------------------------------------------------------------------------*/ +int ffpxsz(int datatype) +/* + return the number of bytes per pixel associated with the datatype +*/ +{ + if (datatype == TBYTE) + return(sizeof(char)); + else if (datatype == TUSHORT) + return(sizeof(short)); + else if (datatype == TSHORT) + return(sizeof(short)); + else if (datatype == TULONG) + return(sizeof(long)); + else if (datatype == TLONG) + return(sizeof(long)); + else if (datatype == TINT) + return(sizeof(int)); + else if (datatype == TUINT) + return(sizeof(int)); + else if (datatype == TFLOAT) + return(sizeof(float)); + else if (datatype == TDOUBLE) + return(sizeof(double)); + else if (datatype == TLOGICAL) + return(sizeof(char)); + else + return(0); +} +/*--------------------------------------------------------------------------*/ +int fftkey(char *keyword, /* I - keyword name */ + int *status) /* IO - error status */ +/* + Test that the keyword name conforms to the FITS standard. Must contain + only capital letters, digits, minus or underscore chars. Trailing spaces + are allowed. If the input status value is less than zero, then the test + is modified so that upper or lower case letters are allowed, and no + error messages are printed if the keyword is not legal. +*/ +{ + size_t maxchr, ii; + int spaces=0; + char msg[81], testchar; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + maxchr=strlen(keyword); + if (maxchr > 8) + maxchr = 8; + + for (ii = 0; ii < maxchr; ii++) + { + if (*status == 0) + testchar = keyword[ii]; + else + testchar = toupper(keyword[ii]); + + if ( (testchar >= 'A' && testchar <= 'Z') || + (testchar >= '0' && testchar <= '9') || + testchar == '-' || testchar == '_' ) + { + if (spaces) + { + if (*status == 0) + { + /* don't print error message if status < 0 */ + sprintf(msg, + "Keyword name contains embedded space(s): %.8s", + keyword); + ffpmsg(msg); + } + return(*status = BAD_KEYCHAR); + } + } + else if (keyword[ii] == ' ') + spaces = 1; + + else + { + if (*status == 0) + { + /* don't print error message if status < 0 */ + sprintf(msg, "Character %d in this keyword is illegal: %.8s", + (int) (ii+1), keyword); + ffpmsg(msg); + + /* explicitly flag the 2 most common cases */ + if (keyword[ii] == 0) + ffpmsg(" (This a NULL (0) character)."); + else if (keyword[ii] == 9) + ffpmsg(" (This an ASCII TAB (9) character)."); + } + + return(*status = BAD_KEYCHAR); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftrec(char *card, /* I - keyword card to test */ + int *status) /* IO - error status */ +/* + Test that the keyword card conforms to the FITS standard. Must contain + only printable ASCII characters; +*/ +{ + size_t ii, maxchr; + char msg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + maxchr = strlen(card); + + for (ii = 8; ii < maxchr; ii++) + { + if (card[ii] < 32 || card[ii] > 126) + { + sprintf(msg, + "Character %d in this keyword is illegal. Hex Value = %X", + (int) (ii+1), (int) card[ii] ); + ffpmsg(msg); + + strncpy(msg, card, 80); + msg[80] = '\0'; + ffpmsg(msg); + return(*status = BAD_KEYCHAR); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +void ffupch(char *string) +/* + convert string to upper case, in place. +*/ +{ + size_t len, ii; + + len = strlen(string); + for (ii = 0; ii < len; ii++) + string[ii] = toupper(string[ii]); + return; +} +/*--------------------------------------------------------------------------*/ +int ffmkky(char *keyname, /* I - keyword name */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + char *card, /* O - constructed keyword card */ + int *status) /* IO - status value */ +/* + Make a complete FITS 80-byte keyword card from the input name, value and + comment strings. Output card is null terminated without any trailing blanks. +*/ +{ + size_t namelen, len, ii; + char tmpname[FLEN_KEYWORD], *cptr; + int tstatus = -1; + + if (*status > 0) + return(*status); + + *tmpname = '\0'; + *card = '\0'; + + cptr = keyname; + while(*cptr == ' ') /* skip leading blanks in the name */ + cptr++; + + strncat(tmpname, cptr, FLEN_KEYWORD - 1); + + namelen = strlen(tmpname); + if (namelen) + { + cptr = tmpname + namelen - 1; + + while(*cptr == ' ') /* skip trailing blanks */ + { + *cptr = '\0'; + cptr--; + } + + namelen = cptr - tmpname + 1; + } + + if (namelen <= 8 && (fftkey(keyname, &tstatus) <= 0) ) + { + /* a normal FITS keyword */ + strcat(card, tmpname); /* copy keyword name to buffer */ + + for (ii = namelen; ii < 8; ii++) + card[ii] = ' '; /* pad keyword name with spaces */ + + card[8] = '='; /* append '= ' in columns 9-10 */ + card[9] = ' '; + card[10] = '\0'; /* terminate the partial string */ + namelen = 10; + } + else + { + /* use the ESO HIERARCH convention for longer keyword names */ + + /* check that the name does not contain an '=' (equals sign) */ + if (strchr(tmpname, '=') ) + { + ffpmsg("Illegal keyword name; contains an equals sign (=)"); + ffpmsg(tmpname); + return(*status = BAD_KEYCHAR); + } + + /* Don't repeat HIERARCH if the keyword already contains it */ + if (FSTRNCMP(tmpname, "HIERARCH ", 9) && + FSTRNCMP(tmpname, "hierarch ", 9)) + strcat(card, "HIERARCH "); + else + namelen -= 9; /* deleted the string 'HIERARCH ' */ + + strcat(card, tmpname); + strcat(card, " = "); + namelen += 12; + } + + len = strlen(value); + if (len > 0) + { + if (value[0] == '\'') /* is this a quoted string value? */ + { + if (namelen > 77) + { + ffpmsg( + "The following keyword + value is too long to fit on a card:"); + ffpmsg(keyname); + ffpmsg(value); + return(*status = BAD_KEYCHAR); + } + + strncat(card, value, 80 - namelen); /* append the value string */ + len = minvalue(80, namelen + len); + + /* restore the closing quote if it got truncated */ + if (len == 80) + { + card[79] = '\''; + } + + if (comm) + { + if (comm[0] != 0) + { + if (len < 30) + { + for (ii = len; ii < 30; ii++) + card[ii] = ' '; /* fill with spaces to col 30 */ + + card[30] = '\0'; + len = 30; + } + } + } + } + else + { + if (namelen + len > 80) + { + ffpmsg( + "The following keyword + value is too long to fit on a card:"); + ffpmsg(keyname); + ffpmsg(value); + return(*status = BAD_KEYCHAR); + } + else if (namelen + len < 30) + { + /* add spaces so field ends at least in col 30 */ + strncat(card, " ", 30 - (namelen + len)); + } + + strncat(card, value, 80 - namelen); /* append the value string */ + len = minvalue(80, namelen + len); + len = maxvalue(30, len); + } + + if (comm) + { + if ((len < 77) && ( strlen(comm) > 0) ) /* room for a comment? */ + { + strcat(card, " / "); /* append comment separator */ + strncat(card, comm, 77 - len); /* append comment (what fits) */ + } + } + } + else + { + if (namelen == 10) /* This case applies to normal keywords only */ + { + card[8] = ' '; /* keywords with no value have no '=' */ + if (comm) + { + strncat(card, comm, 80 - namelen); /* append comment (what fits) */ + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkey(fitsfile *fptr, /* I - FITS file pointer */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +/* + replace the previously read card (i.e. starting 80 bytes before the + (fptr->Fptr)->nextkey position) with the contents of the input card. +*/ +{ + char tcard[81]; + size_t len, ii; + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + strncpy(tcard,card,80); + tcard[80] = '\0'; + + len = strlen(tcard); + for (ii=len; ii < 80; ii++) /* fill card with spaces if necessary */ + tcard[ii] = ' '; + + for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ + tcard[ii] = toupper(tcard[ii]); + + fftkey(tcard, status); /* test keyword name contains legal chars */ + fftrec(tcard, status); /* test rest of keyword for legal chars */ + + /* move position of keyword to be over written */ + ffmbyt(fptr, ((fptr->Fptr)->nextkey) - 80, REPORT_EOF, status); + ffpbyt(fptr, 80, tcard, status); /* write the 80 byte card */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffkeyn(char *keyroot, /* I - root string for keyword name */ + int value, /* I - index number to be appended to root name */ + char *keyname, /* O - output root + index keyword name */ + int *status) /* IO - error status */ +/* + Construct a keyword name string by appending the index number to the root. + e.g., if root = "TTYPE" and value = 12 then keyname = "TTYPE12". +*/ +{ + char suffix[16]; + size_t rootlen; + + keyname[0] = '\0'; /* initialize output name to null */ + rootlen = strlen(keyroot); + + if (rootlen == 0 || rootlen > 7 || value < 0 ) + return(*status = 206); + + sprintf(suffix, "%d", value); /* construct keyword suffix */ + + if ( strlen(suffix) + rootlen > 8) + return(*status = 206); + + strcpy(keyname, keyroot); /* copy root string to name string */ + strcat(keyname, suffix); /* append suffix to the root */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffnkey(int value, /* I - index number to be appended to root name */ + char *keyroot, /* I - root string for keyword name */ + char *keyname, /* O - output root + index keyword name */ + int *status) /* IO - error status */ +/* + Construct a keyword name string by appending the root string to the index + number. e.g., if root = "TTYPE" and value = 12 then keyname = "12TTYPE". +*/ +{ + size_t rootlen; + + keyname[0] = '\0'; /* initialize output name to null */ + rootlen = strlen(keyroot); + + if (rootlen == 0 || rootlen > 7 || value < 0 ) + return(*status = 206); + + sprintf(keyname, "%d", value); /* construct keyword prefix */ + + if (rootlen + strlen(keyname) > 8) + return(*status = 206); + + strcat(keyname, keyroot); /* append root to the prefix */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpsvc(char *card, /* I - FITS header card (nominally 80 bytes long) */ + char *value, /* O - value string parsed from the card */ + char *comm, /* O - comment string parsed from the card */ + int *status) /* IO - error status */ +/* + ParSe the Value and Comment strings from the input header card string. + If the card contains a quoted string value, the returned value string + includes the enclosing quote characters. If comm = NULL, don't return + the comment string. +*/ +{ + int jj; + size_t ii, cardlen, nblank, valpos; + + if (*status > 0) + return(*status); + + value[0] = '\0'; + if (comm) + comm[0] = '\0'; + + cardlen = strlen(card); + + /* support for ESO HIERARCH keywords; find the '=' */ + if (FSTRNCMP(card, "HIERARCH ", 9) == 0) + { + valpos = strcspn(card, "="); + + if (valpos == cardlen) /* no value indicator ??? */ + { + if (comm != NULL) + { + if (cardlen > 8) + { + strcpy(comm, &card[8]); + + jj=cardlen - 8; + for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ + { + if (comm[jj] == ' ') + comm[jj] = '\0'; + else + break; + } + } + } + return(*status); /* no value indicator */ + } + valpos++; /* point to the position after the '=' */ + } + else if (cardlen < 9 || + FSTRNCMP(card, "COMMENT ", 8) == 0 || /* keywords with no value */ + FSTRNCMP(card, "HISTORY ", 8) == 0 || + FSTRNCMP(card, "END ", 8) == 0 || + FSTRNCMP(card, " ", 8) == 0 || + FSTRNCMP(&card[8], "= ", 2) != 0 ) /* no '= ' in cols 9-10 */ + { + /* no value, so the comment extends from cols 9 - 80 */ + if (comm != NULL) + { + if (cardlen > 8) + { + strcpy(comm, &card[8]); + + jj=cardlen - 8; + for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ + { + if (comm[jj] == ' ') + comm[jj] = '\0'; + else + break; + } + } + } + return(*status); + } + else + { + valpos = 10; /* starting position of the value field */ + } + + nblank = strspn(&card[valpos], " "); /* find number of leading blanks */ + + if (nblank + valpos == cardlen) + { + /* the absence of a value string is legal, and simply indicates + that the keyword value is undefined. Don't write an error + message in this case. + */ + return(*status); + } + + ii = valpos + nblank; + + if (card[ii] == '/' ) /* slash indicates start of the comment */ + { + ii++; + } + else if (card[ii] == '\'' ) /* is this a quoted string value? */ + { + value[0] = card[ii]; + for (jj=1, ii++; ii < cardlen; ii++, jj++) + { + if (card[ii] == '\'') /* is this the closing quote? */ + { + if (card[ii+1] == '\'') /* 2 successive quotes? */ + { + value[jj] = card[ii]; + ii++; + jj++; + } + else + { + value[jj] = card[ii]; + break; /* found the closing quote, so exit this loop */ + } + } + value[jj] = card[ii]; /* copy the next character to the output */ + } + + if (ii == cardlen) + { + value[jj] = '\0'; /* terminate the bad value string */ + ffpmsg("This keyword string value has no closing quote:"); + ffpmsg(card); + return(*status = NO_QUOTE); + } + else + { + value[jj+1] = '\0'; /* terminate the good value string */ + ii++; /* point to the character following the value */ + } + } + else if (card[ii] == '(' ) /* is this a complex value? */ + { + nblank = strcspn(&card[ii], ")" ); /* find closing ) */ + if (nblank == strlen( &card[ii] ) ) + { + ffpmsg("This complex keyword value has no closing ')':"); + ffpmsg(card); + return(*status = NO_QUOTE); + } + + nblank++; + strncpy(value, &card[ii], nblank); + value[nblank] = '\0'; + ii = ii + nblank; + } + else /* an integer, floating point, or logical FITS value string */ + { + nblank = strcspn(&card[ii], " /"); /* find the end of the token */ + strncpy(value, &card[ii], nblank); + value[nblank] = '\0'; + ii = ii + nblank; + } + + /* now find the comment string, if any */ + if (comm) + { + nblank = strspn(&card[ii], " "); /* find next non-space character */ + ii = ii + nblank; + + if (ii < 80) + { + if (card[ii] == '/') /* ignore the slash separator */ + { + ii++; + if (card[ii] == ' ') /* also ignore the following space */ + ii++; + } + strcat(comm, &card[ii]); /* copy the remaining characters */ + + jj=strlen(comm); + for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ + { + if (comm[jj] == ' ') + comm[jj] = '\0'; + else + break; + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgthd(char *tmplt, /* I - input header template string */ + char *card, /* O - returned FITS header record */ + int *hdtype, /* O - how to interpreter the returned card string */ + /* + -2 = modify the name of a keyword; the old keyword name + is returned starting at address chars[0]; the new name + is returned starting at address char[40] (to be consistent + with the Fortran version). Both names are null terminated. + -1 = card contains the name of a keyword that is to be deleted + 0 = append this keyword if it doesn't already exist, or + modify the value if the keyword already exists. + 1 = append this comment keyword ('HISTORY', + 'COMMENT', or blank keyword name) + 2 = this is the END keyword; do not write it to the header + */ + int *status) /* IO - error status */ +/* + 'Get Template HeaDer' + parse a template header line and create a formated + character string which is suitable for appending to a FITS header +*/ +{ + char keyname[FLEN_KEYWORD], value[140], comment[140]; + char *tok, *suffix, *loc, tvalue[140]; + int len, vlen, more, tstatus; + double dval; + + if (*status > 0) + return(*status); + + card[0] = '\0'; + *hdtype = 0; + + if (!FSTRNCMP(tmplt, " ", 8) ) + { + /* if first 8 chars of template are blank, then this is a comment */ + strncat(card, tmplt, 80); + *hdtype = 1; + return(*status); + } + + tok = tmplt; /* point to start of template string */ + + keyname[0] = '\0'; + value[0] = '\0'; + comment[0] = '\0'; + + len = strspn(tok, " "); /* no. of spaces before keyword */ + tok += len; + + if (tok[0] == '-') /* is there a leading minus sign? */ + { + /* first token is name of keyword to be deleted or renamed */ + *hdtype = -1; + tok++; + len = strspn(tok, " "); /* no. of spaces before keyword */ + tok += len; + if (len < 8) /* not a blank name? */ + { + len = strcspn(tok, " ="); /* length of name */ + if (len >= FLEN_KEYWORD) + return(*status = BAD_KEYCHAR); + + strncat(card, tok, len); + + /* + The HIERARCH convention supports non-standard characters + in the keyword name, so don't always convert to upper case or + abort if there are illegal characters in the name or if the + name is greater than 8 characters long. + */ + + if (len < 9) /* this is possibly a normal FITS keyword name */ + { + ffupch(card); + tstatus = 0; + if (fftkey(card, &tstatus) > 0) + { + /* name contained non-standard characters, so reset */ + card[0] = '\0'; + strncat(card, tok, len); + } + } + + tok += len; + } + + /* second token, if present, is the new name for the keyword */ + + len = strspn(tok, " "); /* no. of spaces before next token */ + tok += len; + + if (tok[0] == '\0' || tok[0] == '=') + return(*status); /* no second token */ + + *hdtype = -2; + len = strcspn(tok, " "); /* length of new name */ + if (len > 40) /* name has to fit on columns 41-80 of card */ + return(*status = BAD_KEYCHAR); + + /* copy the new name to card + 40; This is awkward, */ + /* but is consistent with the way the Fortran FITSIO works */ + strcat(card," "); + strncpy(&card[40], tok, len+1); /* copy len+1 to get terminator */ + + /* + The HIERARCH convention supports non-standard characters + in the keyword name, so don't always convert to upper case or + abort if there are illegal characters in the name or if the + name is greater than 8 characters long. + */ + + if (len < 9) /* this is possibly a normal FITS keyword name */ + { + ffupch(&card[40]); + tstatus = 0; + if (fftkey(&card[40], &tstatus) > 0) + { + /* name contained non-standard characters, so reset */ + strncpy(&card[40], tok, len); + } + } + } + else /* no negative sign at beginning of template */ + { + /* get the keyword name token */ + + len = strcspn(tok, " ="); /* length of keyword name */ + if (len >= FLEN_KEYWORD) + return(*status = BAD_KEYCHAR); + + strncat(keyname, tok, len); + + /* + The HIERARCH convention supports non-standard characters + in the keyword name, so don't always convert to upper case or + abort if there are illegal characters in the name or if the + name is greater than 8 characters long. + */ + + if (len < 9) /* this is possibly a normal FITS keyword name */ + { + ffupch(keyname); + tstatus = 0; + if (fftkey(keyname, &tstatus) > 0) + { + /* name contained non-standard characters, so reset */ + keyname[0] = '\0'; + strncat(keyname, tok, len); + } + } + + if (!FSTRCMP(keyname, "END") ) + { + strcpy(card, "END"); + *hdtype = 2; + return(*status); + } + + tok += len; /* move token pointer to end of the keyword */ + + if (!FSTRCMP(keyname, "COMMENT") || !FSTRCMP(keyname, "HISTORY") + || !FSTRCMP(keyname, "HIERARCH") ) + { + *hdtype = 1; /* simply append COMMENT and HISTORY keywords */ + strcpy(card, keyname); + strncat(card, tok, 73); + return(*status); + } + + /* look for the value token */ + len = strspn(tok, " ="); /* spaces or = between name and value */ + tok += len; + + if (*tok == '\'') /* is value enclosed in quotes? */ + { + more = TRUE; + while (more) + { + tok++; /* temporarily move past the quote char */ + len = strcspn(tok, "'"); /* length of quoted string */ + tok--; + strncat(value, tok, len + 2); + + tok += len + 1; + if (tok[0] != '\'') /* check there is a closing quote */ + return(*status = NO_QUOTE); + + tok++; + if (tok[0] != '\'') /* 2 quote chars = literal quote */ + more = FALSE; + } + } + else if (*tok == '/' || *tok == '\0') /* There is no value */ + { + strcat(value, " "); + } + else /* not a quoted string value */ + { + len = strcspn(tok, " /"); /* length of value string */ + + strncat(value, tok, len); + if (!( (tok[0] == 'T' || tok[0] == 'F') && + (tok[1] == ' ' || tok[1] == '/' || tok[1] == '\0') )) + { + /* not a logical value */ + + dval = strtod(value, &suffix); /* try to read value as number */ + + if (*suffix != '\0' && *suffix != ' ' && *suffix != '/') + { + /* value not recognized as a number; might be because it */ + /* contains a 'd' or 'D' exponent character */ + strcpy(tvalue, value); + loc = strchr(tvalue, 'D'); + if (loc) + { + *loc = 'E'; /* replace D's with E's. */ + dval = strtod(tvalue, &suffix); /* read value again */ + } + else + { + loc = strchr(tvalue, 'd'); + if (loc) + { + *loc = 'E'; /* replace d's with E's. */ + dval = strtod(tvalue, &suffix); /* read value again */ + } + } + } + + if (*suffix != '\0' && *suffix != ' ' && *suffix != '/') + { + /* value is not a number; must enclose it in quotes */ + strcpy(value, "'"); + strncat(value, tok, len); + strcat(value, "'"); + + /* the following useless statement stops the compiler warning */ + /* that dval is not used anywhere */ + if (dval == 0.) + len += (int) dval; + } + else + { + /* value is a number; convert any 'e' to 'E', or 'd' to 'D' */ + loc = strchr(value, 'e'); + if (loc) + { + *loc = 'E'; + } + else + { + loc = strchr(value, 'd'); + if (loc) + { + *loc = 'D'; + } + } + } + } + tok += len; + } + + len = strspn(tok, " /"); /* no. of spaces between value and comment */ + tok += len; + + vlen = strlen(value); + if (vlen > 0 && vlen < 10 && value[0] == '\'') + { + /* pad quoted string with blanks so it is at least 8 chars long */ + value[vlen-1] = '\0'; + strncat(value, " ", 10 - vlen); + strcat(&value[9], "'"); + } + + /* get the comment string */ + strncat(comment, tok, 70); + + /* construct the complete FITS header card */ + ffmkky(keyname, value, comment, card, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_translate_keyword( + char *inrec, /* I - input string */ + char *outrec, /* O - output converted string, or */ + /* a null string if input does not */ + /* match any of the patterns */ + char *patterns[][2],/* I - pointer to input / output string */ + /* templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *pat_num, /* O - matched pattern number (0 based) or -1 */ + int *i, /* O - value of i, if any, else 0 */ + int *j, /* O - value of j, if any, else 0 */ + int *m, /* O - value of m, if any, else 0 */ + int *n, /* O - value of n, if any, else 0 */ + + int *status) /* IO - error status */ + +/* + +Translate a keyword name to a new name, based on a set of patterns. +The user passes an array of patterns to be matched. Input pattern +number i is pattern[i][0], and output pattern number i is +pattern[i][1]. Keywords are matched against the input patterns. If a +match is found then the keyword is re-written according to the output +pattern. + +Order is important. The first match is accepted. The fastest match +will be made when templates with the same first character are grouped +together. + +Several characters have special meanings: + + i,j - single digits, preserved in output template + n - column number of one or more digits, preserved in output template + m - generic number of one or more digits, preserved in output template + a - coordinate designator, preserved in output template + # - number of one or more digits + ? - any character + * - only allowed in first character position, to match all + keywords; only useful as last pattern in the list + +i, j, n, and m are returned by the routine. + +For example, the input pattern "iCTYPn" will match "1CTYP5" (if n_value +is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". +Notice that "i" is preserved. + +The following output patterns are special + +Special output pattern characters: + + "-" - do not copy a keyword that matches the corresponding input pattern + + "+" - copy the input unchanged + +The inrec string could be just the 8-char keyword name, or the entire +80-char header record. Characters 9 = 80 in the input string simply get +appended to the translated keyword name. + +If n_range = 0, then only keywords with 'n' equal to n_value will be +considered as a pattern match. If n_range = +1, then all values of +'n' greater than or equal to n_value will be a match, and if -1, +then values of 'n' less than or equal to n_value will match. + + This routine was written by Craig Markwardt, GSFC +*/ + +{ + int i1 = 0, j1 = 0, n1 = 0, m1 = 0; + int fac; + char a = ' '; + char oldp = ' '; + char c, s; + int ip, ic, pat, pass = 0, firstfail = 0; + char *spat; + + if (*status > 0) + return(*status); + if ((inrec == 0) || (outrec == 0)) + return (*status = NULL_INPUT_PTR); + + *outrec = '\0'; + if (*inrec == '\0') return 0; + + oldp = '\0'; + firstfail = 0; + + /* ===== Pattern match stage */ + for (pat=0; pat < npat; pat++) { + + spat = patterns[pat][0]; + + i1 = 0; j1 = 0; m1 = -1; n1 = -1; a = ' '; /* Initialize the place-holders */ + pass = 0; + + /* Pass the wildcard pattern */ + if (spat[0] == '*') { + pass = 1; + break; + } + + /* Optimization: if we have seen this initial pattern character before, + then it must have failed, and we can skip the pattern */ + if (firstfail && spat[0] == oldp) continue; + oldp = spat[0]; + + /* + ip = index of pattern character being matched + ic = index of keyname character being matched + firstfail = 1 if we fail on the first characteor (0=not) + */ + + for (ip=0, ic=0, firstfail=1; + (spat[ip]) && (ic < 8); + ip++, ic++, firstfail=0) { + c = inrec[ic]; + s = spat[ip]; + + if (s == 'i') { + /* Special pattern: 'i' placeholder */ + if (isdigit(c)) { i1 = c - '0'; pass = 1;} + } else if (s == 'j') { + /* Special pattern: 'j' placeholder */ + if (isdigit(c)) { j1 = c - '0'; pass = 1;} + } else if ((s == 'n')||(s == 'm')||(s == '#')) { + /* Special patterns: multi-digit number */ + int val = 0; + pass = 0; + if (isdigit(c)) { + pass = 1; /* NOTE, could fail below */ + + /* Parse decimal number */ + while (ic<8 && isdigit(c)) { + val = val*10 + (c - '0'); + ic++; c = inrec[ic]; + } + ic--; c = inrec[ic]; + + if (s == 'n') { + + /* Is it a column number? */ + if ( val >= 1 && val <= 999 && /* Row range check */ + (((n_range == 0) && (val == n_value)) || /* Strict equality */ + ((n_range == -1) && (val <= n_value)) || /* n <= n_value */ + ((n_range == +1) && (val >= n_value))) ) { /* n >= n_value */ + n1 = val; + } else { + pass = 0; + } + } else if (s == 'm') { + + /* Generic number */ + m1 = val; + } + } + } else if (s == 'a') { + /* Special pattern: coordinate designator */ + if (isupper(c) || c == ' ') { a = c; pass = 1;} + } else if (s == '?') { + /* Match any individual character */ + pass = 1; + } else if (c == s) { + /* Match a specific character */ + pass = 1; + } else { + /* FAIL */ + pass = 0; + } + + if (!pass) break; + } + + + /* Must pass to the end of the keyword. No partial matches allowed */ + if (pass && (ic >= 8 || inrec[ic] == ' ')) break; + } + + + /* Transfer the pattern-matched numbers to the output parameters */ + if (i) { *i = i1; } + if (j) { *j = j1; } + if (n) { *n = n1; } + if (m) { *m = m1; } + if (pat_num) { *pat_num = pat; } + + /* ===== Keyword rewriting and output stage */ + spat = patterns[pat][1]; + + /* Return case: no match, or explicit deletion pattern */ + if (pass == 0 || spat[0] == '\0' || spat[0] == '-') return 0; + + /* A match: we start by copying the input record to the output */ + strcpy(outrec, inrec); + + /* Return case: return the input record unchanged */ + if (spat[0] == '+') return 0; + + + /* Final case: a new output pattern */ + for (ip=0, ic=0; spat[ip]; ip++, ic++) { + s = spat[ip]; + if (s == 'i') { + outrec[ic] = (i1+'0'); + } else if (s == 'j') { + outrec[ic] = (j1+'0'); + } else if (s == 'n') { + if (n1 == -1) { n1 = n_value; } + if (n1 > 0) { + n1 += n_offset; + for (fac = 1; (n1/fac) > 0; fac *= 10); + fac /= 10; + while(fac > 0) { + outrec[ic] = ((n1/fac) % 10) + '0'; + fac /= 10; + ic ++; + } + ic--; + } + } else if (s == 'm' && m1 >= 0) { + for (fac = 1; (m1/fac) > 0; fac *= 10); + fac /= 10; + while(fac > 0) { + outrec[ic] = ((m1/fac) % 10) + '0'; + fac /= 10; + ic ++; + } + ic --; + } else if (s == 'a') { + outrec[ic] = a; + } else { + outrec[ic] = s; + } + } + + /* Pad the keyword name with spaces */ + for ( ; ic<8; ic++) { outrec[ic] = ' '; } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_translate_keywords( + fitsfile *infptr, /* I - pointer to input HDU */ + fitsfile *outfptr, /* I - pointer to output HDU */ + int firstkey, /* I - first HDU record number to start with */ + char *patterns[][2],/* I - pointer to input / output keyword templates */ + int npat, /* I - number of templates passed */ + int n_value, /* I - base 'n' template value of interest */ + int n_offset, /* I - offset to be applied to the 'n' */ + /* value in the output string */ + int n_range, /* I - controls range of 'n' template */ + /* values of interest (-1,0, or +1) */ + int *status) /* IO - error status */ +/* + Copy relevant keywords from the table header into the newly + created primary array header. Convert names of keywords where + appropriate. See fits_translate_keyword() for the definitions. + + Translation begins at header record number 'firstkey', and + continues to the end of the header. + + This routine was written by Craig Markwardt, GSFC +*/ +{ + int nrec, nkeys, nmore; + char rec[FLEN_CARD]; + int i = 0, j = 0, n = 0, m = 0; + int pat_num = 0; + char outrec[FLEN_CARD]; + + if (*status > 0) + return(*status); + + ffghsp(infptr, &nkeys, &nmore, status); /* get number of keywords */ + + for (nrec = firstkey; nrec <= nkeys; nrec++) { + outrec[0] = '\0'; + + ffgrec(infptr, nrec, rec, status); + + fits_translate_keyword(rec, outrec, patterns, npat, + n_value, n_offset, n_range, + &pat_num, &i, &j, &m, &n, status); + + if (outrec[0]) { + ffprec(outfptr, outrec, status); /* copy the keyword */ + rec[8] = 0; outrec[8] = 0; + } else { + rec[8] = 0; outrec[8] = 0; + } + } + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffasfm(char *tform, /* I - format code from the TFORMn keyword */ + int *dtcode, /* O - numerical datatype code */ + long *twidth, /* O - width of the field, in chars */ + int *decimals, /* O - number of decimal places (F, E, D format) */ + int *status) /* IO - error status */ +{ +/* + parse the ASCII table TFORM column format to determine the data + type, the field width, and number of decimal places (if relevant) +*/ + int ii, datacode; + long longval, width; + float fwidth; + char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + if (dtcode) + *dtcode = 0; + + if (twidth) + *twidth = 0; + + if (decimals) + *decimals = 0; + + ii = 0; + while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ + ii++; + + strcpy(temp, &tform[ii]); /* copy format string */ + ffupch(temp); /* make sure it is in upper case */ + form = temp; /* point to start of format string */ + + + if (form[0] == 0) + { + ffpmsg("Error: ASCII table TFORM code is blank"); + return(*status = BAD_TFORM); + } + + /*-----------------------------------------------*/ + /* determine default datatype code */ + /*-----------------------------------------------*/ + if (form[0] == 'A') + datacode = TSTRING; + else if (form[0] == 'I') + datacode = TLONG; + else if (form[0] == 'F') + datacode = TFLOAT; + else if (form[0] == 'E') + datacode = TFLOAT; + else if (form[0] == 'D') + datacode = TDOUBLE; + else + { + sprintf(message, + "Illegal ASCII table TFORMn datatype: \'%s\'", tform); + ffpmsg(message); + return(*status = BAD_TFORM_DTYPE); + } + + if (dtcode) + *dtcode = datacode; + + form++; /* point to the start of field width */ + + if (datacode == TSTRING || datacode == TLONG) + { + /*-----------------------------------------------*/ + /* A or I data formats: */ + /*-----------------------------------------------*/ + + if (ffc2ii(form, &width, status) <= 0) /* read the width field */ + { + if (width <= 0) + { + width = 0; + *status = BAD_TFORM; + } + else + { + /* set to shorter precision if I4 or less */ + if (width <= 4 && datacode == TLONG) + datacode = TSHORT; + } + } + } + else + { + /*-----------------------------------------------*/ + /* F, E or D data formats: */ + /*-----------------------------------------------*/ + + if (ffc2rr(form, &fwidth, status) <= 0) /* read ww.dd width field */ + { + if (fwidth <= 0.) + *status = BAD_TFORM; + else + { + width = (long) fwidth; /* convert from float to long */ + + if (width > 7 && *temp == 'F') + datacode = TDOUBLE; /* type double if >7 digits */ + + if (width < 10) + form = form + 1; /* skip 1 digit */ + else + form = form + 2; /* skip 2 digits */ + + if (form[0] == '.') /* should be a decimal point here */ + { + form++; /* point to start of decimals field */ + + if (ffc2ii(form, &longval, status) <= 0) /* read decimals */ + { + if (decimals) + *decimals = longval; /* long to short convertion */ + + if (longval >= width) /* width < no. of decimals */ + *status = BAD_TFORM; + + if (longval > 6 && *temp == 'E') + datacode = TDOUBLE; /* type double if >6 digits */ + } + } + + } + } + } + if (*status > 0) + { + *status = BAD_TFORM; + sprintf(message,"Illegal ASCII table TFORMn code: \'%s\'", tform); + ffpmsg(message); + } + + if (dtcode) + *dtcode = datacode; + + if (twidth) + *twidth = width; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbnfm(char *tform, /* I - format code from the TFORMn keyword */ + int *dtcode, /* O - numerical datatype code */ + long *trepeat, /* O - repeat count of the field */ + long *twidth, /* O - width of the field, in chars */ + int *status) /* IO - error status */ +{ +/* + parse the binary table TFORM column format to determine the data + type, repeat count, and the field width (if it is an ASCII (A) field) +*/ + size_t ii, nchar; + int datacode, variable, iread; + long width, repeat; + char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + if (dtcode) + *dtcode = 0; + + if (trepeat) + *trepeat = 0; + + if (twidth) + *twidth = 0; + + nchar = strlen(tform); + + for (ii = 0; ii < nchar; ii++) + { + if (tform[ii] != ' ') /* find first non-space char */ + break; + } + + if (ii == nchar) + { + ffpmsg("Error: binary table TFORM code is blank (ffbnfm)."); + return(*status = BAD_TFORM); + } + + strcpy(temp, &tform[ii]); /* copy format string */ + ffupch(temp); /* make sure it is in upper case */ + form = temp; /* point to start of format string */ + + /*-----------------------------------------------*/ + /* get the repeat count */ + /*-----------------------------------------------*/ + + ii = 0; + while(isdigit((int) form[ii])) + ii++; /* look for leading digits in the field */ + + if (ii == 0) + repeat = 1; /* no explicit repeat count */ + else + sscanf(form,"%ld", &repeat); /* read repeat count */ + + /*-----------------------------------------------*/ + /* determine datatype code */ + /*-----------------------------------------------*/ + + form = form + ii; /* skip over the repeat field */ + + if (form[0] == 'P' || form[0] == 'Q') + { + variable = 1; /* this is a variable length column */ + repeat = 1; /* disregard any other repeat value */ + form++; /* move to the next data type code char */ + } + else + variable = 0; + + if (form[0] == 'U') /* internal code to signify unsigned integer */ + { + datacode = TUSHORT; + width = 2; + } + else if (form[0] == 'I') + { + datacode = TSHORT; + width = 2; + } + else if (form[0] == 'V') /* internal code to signify unsigned integer */ + { + datacode = TULONG; + width = 4; + } + else if (form[0] == 'J') + { + datacode = TLONG; + width = 4; + } + else if (form[0] == 'K') + { + datacode = TLONGLONG; + width = 8; + } + else if (form[0] == 'E') + { + datacode = TFLOAT; + width = 4; + } + else if (form[0] == 'D') + { + datacode = TDOUBLE; + width = 8; + } + else if (form[0] == 'A') + { + datacode = TSTRING; + + /* + the following code is used to support the non-standard + datatype of the form rAw where r = total width of the field + and w = width of fixed-length substrings within the field. + */ + iread = 0; + if (form[1] != 0) + { + if (form[1] == '(' ) /* skip parenthesis around */ + form++; /* variable length column width */ + + iread = sscanf(&form[1],"%ld", &width); + } + + if (iread != 1 || (!variable && (width > repeat)) ) + width = repeat; + + } + else if (form[0] == 'L') + { + datacode = TLOGICAL; + width = 1; + } + else if (form[0] == 'X') + { + datacode = TBIT; + width = 1; + } + else if (form[0] == 'B') + { + datacode = TBYTE; + width = 1; + } + else if (form[0] == 'S') /* internal code to signify signed byte */ + { + datacode = TSBYTE; + width = 1; + } + else if (form[0] == 'C') + { + datacode = TCOMPLEX; + width = 8; + } + else if (form[0] == 'M') + { + datacode = TDBLCOMPLEX; + width = 16; + } + else + { + sprintf(message, + "Illegal binary table TFORMn datatype: \'%s\' ", tform); + ffpmsg(message); + return(*status = BAD_TFORM_DTYPE); + } + + if (variable) + datacode = datacode * (-1); /* flag variable cols w/ neg type code */ + + if (dtcode) + *dtcode = datacode; + + if (trepeat) + *trepeat = repeat; + + if (twidth) + *twidth = width; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbnfmll(char *tform, /* I - format code from the TFORMn keyword */ + int *dtcode, /* O - numerical datatype code */ + LONGLONG *trepeat, /* O - repeat count of the field */ + long *twidth, /* O - width of the field, in chars */ + int *status) /* IO - error status */ +{ +/* + parse the binary table TFORM column format to determine the data + type, repeat count, and the field width (if it is an ASCII (A) field) +*/ + size_t ii, nchar; + int datacode, variable, iread; + long width; + LONGLONG repeat; + char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; + double drepeat; + + if (*status > 0) + return(*status); + + if (dtcode) + *dtcode = 0; + + if (trepeat) + *trepeat = 0; + + if (twidth) + *twidth = 0; + + nchar = strlen(tform); + + for (ii = 0; ii < nchar; ii++) + { + if (tform[ii] != ' ') /* find first non-space char */ + break; + } + + if (ii == nchar) + { + ffpmsg("Error: binary table TFORM code is blank (ffbnfm)."); + return(*status = BAD_TFORM); + } + + strcpy(temp, &tform[ii]); /* copy format string */ + ffupch(temp); /* make sure it is in upper case */ + form = temp; /* point to start of format string */ + + /*-----------------------------------------------*/ + /* get the repeat count */ + /*-----------------------------------------------*/ + + ii = 0; + while(isdigit((int) form[ii])) + ii++; /* look for leading digits in the field */ + + if (ii == 0) + repeat = 1; /* no explicit repeat count */ + else { + /* read repeat count */ + + /* print as double, because the string-to-64-bit int conversion */ + /* character is platform dependent (%lld, %ld, %I64d) */ + + sscanf(form,"%lf", &drepeat); + repeat = (LONGLONG) (drepeat + 0.1); + } + /*-----------------------------------------------*/ + /* determine datatype code */ + /*-----------------------------------------------*/ + + form = form + ii; /* skip over the repeat field */ + + if (form[0] == 'P' || form[0] == 'Q') + { + variable = 1; /* this is a variable length column */ + repeat = 1; /* disregard any other repeat value */ + form++; /* move to the next data type code char */ + } + else + variable = 0; + + if (form[0] == 'U') /* internal code to signify unsigned integer */ + { + datacode = TUSHORT; + width = 2; + } + else if (form[0] == 'I') + { + datacode = TSHORT; + width = 2; + } + else if (form[0] == 'V') /* internal code to signify unsigned integer */ + { + datacode = TULONG; + width = 4; + } + else if (form[0] == 'J') + { + datacode = TLONG; + width = 4; + } + else if (form[0] == 'K') + { + datacode = TLONGLONG; + width = 8; + } + else if (form[0] == 'E') + { + datacode = TFLOAT; + width = 4; + } + else if (form[0] == 'D') + { + datacode = TDOUBLE; + width = 8; + } + else if (form[0] == 'A') + { + datacode = TSTRING; + + /* + the following code is used to support the non-standard + datatype of the form rAw where r = total width of the field + and w = width of fixed-length substrings within the field. + */ + iread = 0; + if (form[1] != 0) + { + if (form[1] == '(' ) /* skip parenthesis around */ + form++; /* variable length column width */ + + iread = sscanf(&form[1],"%ld", &width); + } + + if (iread != 1 || (!variable && (width > repeat)) ) + width = (long) repeat; + + } + else if (form[0] == 'L') + { + datacode = TLOGICAL; + width = 1; + } + else if (form[0] == 'X') + { + datacode = TBIT; + width = 1; + } + else if (form[0] == 'B') + { + datacode = TBYTE; + width = 1; + } + else if (form[0] == 'S') /* internal code to signify signed byte */ + { + datacode = TSBYTE; + width = 1; + } + else if (form[0] == 'C') + { + datacode = TCOMPLEX; + width = 8; + } + else if (form[0] == 'M') + { + datacode = TDBLCOMPLEX; + width = 16; + } + else + { + sprintf(message, + "Illegal binary table TFORMn datatype: \'%s\' ", tform); + ffpmsg(message); + return(*status = BAD_TFORM_DTYPE); + } + + if (variable) + datacode = datacode * (-1); /* flag variable cols w/ neg type code */ + + if (dtcode) + *dtcode = datacode; + + if (trepeat) + *trepeat = repeat; + + if (twidth) + *twidth = width; + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +void ffcfmt(char *tform, /* value of an ASCII table TFORMn keyword */ + char *cform) /* equivalent format code in C language syntax */ +/* + convert the FITS format string for an ASCII Table extension column into the + equivalent C format string that can be used in a printf statement, after + the values have been read as a double. +*/ +{ + int ii; + + cform[0] = '\0'; + ii = 0; + while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ + ii++; + + if (tform[ii] == 0) + return; /* input format string was blank */ + + cform[0] = '%'; /* start the format string */ + + strcpy(&cform[1], &tform[ii + 1]); /* append the width and decimal code */ + + + if (tform[ii] == 'A') + strcat(cform, "s"); + else if (tform[ii] == 'I') + strcat(cform, ".0f"); /* 0 precision to suppress decimal point */ + if (tform[ii] == 'F') + strcat(cform, "f"); + if (tform[ii] == 'E') + strcat(cform, "E"); + if (tform[ii] == 'D') + strcat(cform, "E"); + + return; +} +/*--------------------------------------------------------------------------*/ +void ffcdsp(char *tform, /* value of an ASCII table TFORMn keyword */ + char *cform) /* equivalent format code in C language syntax */ +/* + convert the FITS TDISPn display format into the equivalent C format + suitable for use in a printf statement. +*/ +{ + int ii; + + cform[0] = '\0'; + ii = 0; + while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ + ii++; + + if (tform[ii] == 0) + { + cform[0] = '\0'; + return; /* input format string was blank */ + } + + cform[0] = '%'; /* start the format string */ + + strcpy(&cform[1], &tform[ii + 1]); /* append the width and decimal code */ + + if (tform[ii] == 'A' || tform[ii] == 'a') + strcat(cform, "s"); + else if (tform[ii] == 'I' || tform[ii] == 'i') + strcat(cform, "d"); + else if (tform[ii] == 'O' || tform[ii] == 'o') + strcat(cform, "o"); + else if (tform[ii] == 'Z' || tform[ii] == 'z') + strcat(cform, "X"); + else if (tform[ii] == 'F' || tform[ii] == 'f') + strcat(cform, "f"); + else if (tform[ii] == 'E' || tform[ii] == 'e') + strcat(cform, "E"); + else if (tform[ii] == 'D' || tform[ii] == 'd') + strcat(cform, "E"); + else if (tform[ii] == 'G' || tform[ii] == 'g') + strcat(cform, "G"); + else + cform[0] = '\0'; /* unrecognized tform code */ + + return; +} +/*--------------------------------------------------------------------------*/ +int ffgcno( fitsfile *fptr, /* I - FITS file pionter */ + int casesen, /* I - case sensitive string comparison? 0=no */ + char *templt, /* I - input name of column (w/wildcards) */ + int *colnum, /* O - number of the named column; 1=first col */ + int *status) /* IO - error status */ +/* + Determine the column number corresponding to an input column name. + The first column of the table = column 1; + This supports the * and ? wild cards in the input template. +*/ +{ + char colname[FLEN_VALUE]; /* temporary string to hold column name */ + + ffgcnn(fptr, casesen, templt, colname, colnum, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcnn( fitsfile *fptr, /* I - FITS file pointer */ + int casesen, /* I - case sensitive string comparison? 0=no */ + char *templt, /* I - input name of column (w/wildcards) */ + char *colname, /* O - full column name up to 68 + 1 chars long*/ + int *colnum, /* O - number of the named column; 1=first col */ + int *status) /* IO - error status */ +/* + Return the full column name and column number of the next column whose + TTYPEn keyword value matches the input template string. + The template may contain the * and ? wildcards. Status = 237 is + returned if the match is not unique. If so, one may call this routine + again with input status=237 to get the next match. A status value of + 219 is returned when there are no more matching columns. +*/ +{ + char errmsg[FLEN_ERRMSG]; + static int startcol; + int tstatus, ii, founde, foundw, match, exact, unique; + long ivalue; + tcolumn *colptr; + + if (*status <= 0) + { + startcol = 0; /* start search with first column */ + tstatus = 0; + } + else if (*status == COL_NOT_UNIQUE) /* start search from previous spot */ + { + tstatus = COL_NOT_UNIQUE; + *status = 0; + } + else + return(*status); /* bad input status value */ + + colname[0] = 0; /* initialize null return */ + *colnum = 0; + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header to get col struct */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (startcol); /* offset to starting column */ + + founde = FALSE; /* initialize 'found exact match' flag */ + foundw = FALSE; /* initialize 'found wildcard match' flag */ + unique = FALSE; + + for (ii = startcol; ii < (fptr->Fptr)->tfield; ii++, colptr++) + { + ffcmps(templt, colptr->ttype, casesen, &match, &exact); + if (match) + { + if (founde && exact) + { + /* warning: this is the second exact match we've found */ + /*reset pointer to first match so next search starts there */ + startcol = *colnum; + return(*status = COL_NOT_UNIQUE); + } + else if (founde) /* a wildcard match */ + { + /* already found exact match so ignore this non-exact match */ + } + else if (exact) + { + /* this is the first exact match we have found, so save it. */ + strcpy(colname, colptr->ttype); + *colnum = ii + 1; + founde = TRUE; + } + else if (foundw) + { + /* we have already found a wild card match, so not unique */ + /* continue searching for other matches */ + unique = FALSE; + } + else + { + /* this is the first wild card match we've found. save it */ + strcpy(colname, colptr->ttype); + *colnum = ii + 1; + startcol = *colnum; + foundw = TRUE; + unique = TRUE; + } + } + } + + /* OK, we've checked all the names now see if we got any matches */ + if (founde) + { + if (tstatus == COL_NOT_UNIQUE) /* we did find 1 exact match but */ + *status = COL_NOT_UNIQUE; /* there was a previous match too */ + } + else if (foundw) + { + /* found one or more wildcard matches; report error if not unique */ + if (!unique || tstatus == COL_NOT_UNIQUE) + *status = COL_NOT_UNIQUE; + } + else + { + /* didn't find a match; check if template is a positive integer */ + ffc2ii(templt, &ivalue, &tstatus); + if (tstatus == 0 && ivalue <= (fptr->Fptr)->tfield && ivalue > 0) + { + *colnum = ivalue; + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (ivalue - 1); /* offset to correct column */ + strcpy(colname, colptr->ttype); + } + else + { + *status = COL_NOT_FOUND; + if (tstatus != COL_NOT_UNIQUE) + { + sprintf(errmsg, "ffgcnn could not find column: %.45s", templt); + ffpmsg(errmsg); + } + } + } + + startcol = *colnum; /* save pointer for next time */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +void ffcmps(char *templt, /* I - input template (may have wildcards) */ + char *colname, /* I - full column name up to 68 + 1 chars long */ + int casesen, /* I - case sensitive string comparison? 1=yes */ + int *match, /* O - do template and colname match? 1=yes */ + int *exact) /* O - do strings exactly match, or wildcards */ +/* + compare the template to the string and test if they match. + The strings are limited to 68 characters or less (the max. length + of a FITS string keyword value. This routine reports whether + the two strings match and whether the match is exact or + involves wildcards. + + This algorithm is very similar to the way unix filename wildcards + work except that this first treats a wild card as a literal character + when looking for a match. If there is no literal match, then + it interpretes it as a wild card. So the template 'AB*DE' + is considered to be an exact rather than a wild card match to + the string 'AB*DE'. The '#' wild card in the template string will + match any consecutive string of decimal digits in the colname. + +*/ +{ + int ii, found, t1, s1, wildsearch = 0, tsave = 0, ssave = 0; + char temp[FLEN_VALUE], col[FLEN_VALUE]; + + *match = FALSE; + *exact = TRUE; + + strncpy(temp, templt, FLEN_VALUE); /* copy strings to work area */ + strncpy(col, colname, FLEN_VALUE); + temp[FLEN_VALUE - 1] = '\0'; /* make sure strings are terminated */ + col[FLEN_VALUE - 1] = '\0'; + + /* truncate trailing non-significant blanks */ + for (ii = strlen(temp) - 1; ii >= 0 && temp[ii] == ' '; ii--) + temp[ii] = '\0'; + + for (ii = strlen(col) - 1; ii >= 0 && col[ii] == ' '; ii--) + col[ii] = '\0'; + + if (!casesen) + { /* convert both strings to uppercase before comparison */ + ffupch(temp); + ffupch(col); + } + + if (!FSTRCMP(temp, col) ) + { + *match = TRUE; /* strings exactly match */ + return; + } + + *exact = FALSE; /* strings don't exactly match */ + + t1 = 0; /* start comparison with 1st char of each string */ + s1 = 0; + + while(1) /* compare corresponding chars in each string */ + { + if (temp[t1] == '\0' && col[s1] == '\0') + { + /* completely scanned both strings so they match */ + *match = TRUE; + return; + } + else if (temp[t1] == '\0') + { + if (wildsearch) + { + /* + the previous wildcard search may have been going down + a blind alley. Backtrack, and resume the wildcard + search with the next character in the string. + */ + t1 = tsave; + s1 = ssave + 1; + } + else + { + /* reached end of template string so they don't match */ + return; + } + } + else if (col[s1] == '\0') + { + /* reached end of other string; they match if the next */ + /* character in the template string is a '*' wild card */ + + if (temp[t1] == '*' && temp[t1 + 1] == '\0') + { + *match = TRUE; + } + + return; + } + + if (temp[t1] == col[s1] || (temp[t1] == '?') ) + { + s1++; /* corresponding chars in the 2 strings match */ + t1++; /* increment both pointers and loop back again */ + } + else if (temp[t1] == '#' && isdigit((int) col[s1]) ) + { + s1++; /* corresponding chars in the 2 strings match */ + t1++; /* increment both pointers */ + + /* find the end of the string of digits */ + while (isdigit((int) col[s1]) ) + s1++; + } + else if (temp[t1] == '*') + { + + /* save current string locations, in case we need to restart */ + wildsearch = 1; + tsave = t1; + ssave = s1; + + /* get next char from template and look for it in the col name */ + t1++; + if (temp[t1] == '\0' || temp[t1] == ' ') + { + /* reached end of template so strings match */ + *match = TRUE; + return; + } + + found = FALSE; + while (col[s1] && !found) + { + if (temp[t1] == col[s1]) + { + t1++; /* found matching characters; incre both pointers */ + s1++; /* and loop back to compare next chars */ + found = TRUE; + } + else + s1++; /* increment the column name pointer and try again */ + } + + if (!found) + { + return; /* hit end of column name and failed to find a match */ + } + } + else + { + if (wildsearch) + { + /* + the previous wildcard search may have been going down + a blind alley. Backtrack, and resume the wildcard + search with the next character in the string. + */ + t1 = tsave; + s1 = ssave + 1; + } + else + { + return; /* strings don't match */ + } + } + } +} +/*--------------------------------------------------------------------------*/ +int ffgtcl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int *typecode, /* O - datatype code (21 = short, etc) */ + long *repeat, /* O - repeat count of field */ + long *width, /* O - if ASCII, width of field or unit string */ + int *status) /* IO - error status */ +/* + Get Type of table column. + Returns the datatype code of the column, as well as the vector + repeat count and (if it is an ASCII character column) the + width of the field or a unit string within the field. This supports the + TFORMn = 'rAw' syntax for specifying arrays of substrings, so + if TFORMn = '60A12' then repeat = 60 and width = 12. +*/ +{ + LONGLONG trepeat, twidth; + + ffgtclll(fptr, colnum, typecode, &trepeat, &twidth, status); + + if (*status > 0) + return(*status); + + if (repeat) + *repeat= (long) trepeat; + + if (width) + *width = (long) twidth; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtclll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int *typecode, /* O - datatype code (21 = short, etc) */ + LONGLONG *repeat, /* O - repeat count of field */ + LONGLONG *width, /* O - if ASCII, width of field or unit string */ + int *status) /* IO - error status */ +/* + Get Type of table column. + Returns the datatype code of the column, as well as the vector + repeat count and (if it is an ASCII character column) the + width of the field or a unit string within the field. This supports the + TFORMn = 'rAw' syntax for specifying arrays of substrings, so + if TFORMn = '60A12' then repeat = 60 and width = 12. +*/ +{ + tcolumn *colptr; + int hdutype, decims; + long tmpwidth; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (colnum - 1); /* offset to correct column */ + + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == ASCII_TBL) + { + ffasfm(colptr->tform, typecode, &tmpwidth, &decims, status); + *width = tmpwidth; + + if (repeat) + *repeat = 1; + } + else + { + if (typecode) + *typecode = colptr->tdatatype; + + if (width) + *width = colptr->twidth; + + if (repeat) + *repeat = colptr->trepeat; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffeqty( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int *typecode, /* O - datatype code (21 = short, etc) */ + long *repeat, /* O - repeat count of field */ + long *width, /* O - if ASCII, width of field or unit string */ + int *status) /* IO - error status */ +/* + Get the 'equivalent' table column type. + + This routine is similar to the ffgtcl routine (which returns the physical + datatype of the column, as stored in the FITS file) except that if the + TSCALn and TZEROn keywords are defined for the column, then it returns + the 'equivalent' datatype. Thus, if the column is defined as '1I' (short + integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' + depending on the TSCALn and TZEROn values. + + Returns the datatype code of the column, as well as the vector + repeat count and (if it is an ASCII character column) the + width of the field or a unit string within the field. This supports the + TFORMn = 'rAw' syntax for specifying arrays of substrings, so + if TFORMn = '60A12' then repeat = 60 and width = 12. +*/ +{ + LONGLONG trepeat, twidth; + + ffeqtyll(fptr, colnum, typecode, &trepeat, &twidth, status); + + if (repeat) + *repeat= (long) trepeat; + + if (width) + *width = (long) twidth; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffeqtyll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int *typecode, /* O - datatype code (21 = short, etc) */ + LONGLONG *repeat, /* O - repeat count of field */ + LONGLONG *width, /* O - if ASCII, width of field or unit string */ + int *status) /* IO - error status */ +/* + Get the 'equivalent' table column type. + + This routine is similar to the ffgtcl routine (which returns the physical + datatype of the column, as stored in the FITS file) except that if the + TSCALn and TZEROn keywords are defined for the column, then it returns + the 'equivalent' datatype. Thus, if the column is defined as '1I' (short + integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' + depending on the TSCALn and TZEROn values. + + Returns the datatype code of the column, as well as the vector + repeat count and (if it is an ASCII character column) the + width of the field or a unit string within the field. This supports the + TFORMn = 'rAw' syntax for specifying arrays of substrings, so + if TFORMn = '60A12' then repeat = 60 and width = 12. +*/ +{ + tcolumn *colptr; + int hdutype, decims, tcode, effcode; + double tscale, tzero, min_val, max_val; + long lngscale = 1, lngzero = 0, tmpwidth; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (colnum - 1); /* offset to correct column */ + + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == ASCII_TBL) + { + ffasfm(colptr->tform, typecode, &tmpwidth, &decims, status); + *width = tmpwidth; + + if (repeat) + *repeat = 1; + } + else + { + if (typecode) + *typecode = colptr->tdatatype; + + if (width) + *width = colptr->twidth; + + if (repeat) + *repeat = colptr->trepeat; + } + + /* return if caller is not interested in the typecode value */ + if (!typecode) + return(*status); + + /* check if the tscale and tzero keywords are defined, which might + change the effective datatype of the column */ + + tscale = colptr->tscale; + tzero = colptr->tzero; + + if (tscale == 1.0 && tzero == 0.0) /* no scaling */ + return(*status); + + tcode = abs(*typecode); + + switch (tcode) + { + case TBYTE: /* binary table 'rB' column */ + min_val = 0.; + max_val = 255.0; + break; + + case TSHORT: + min_val = -32768.0; + max_val = 32767.0; + break; + + case TLONG: + + min_val = -2147483648.0; + max_val = 2147483647.0; + break; + + default: /* don't have to deal with other data types */ + return(*status); + } + + if (tscale >= 0.) { + min_val = tzero + tscale * min_val; + max_val = tzero + tscale * max_val; + } else { + max_val = tzero + tscale * min_val; + min_val = tzero + tscale * max_val; + } + if (tzero < 2147483648.) /* don't exceed range of 32-bit integer */ + lngzero = (long) tzero; + lngscale = (long) tscale; + + if ((tzero != 2147483648.) && /* special value that exceeds integer range */ + (lngzero != tzero || lngscale != tscale)) { /* not integers? */ + /* floating point scaled values; just decide on required precision */ + if (tcode == TBYTE || tcode == TSHORT) + effcode = TFLOAT; + else + effcode = TDOUBLE; + + /* + In all the remaining cases, TSCALn and TZEROn are integers, + and not equal to 1 and 0, respectively. + */ + + } else if ((min_val == -128.) && (max_val == 127.)) { + effcode = TSBYTE; + + } else if ((min_val >= -32768.0) && (max_val <= 32767.0)) { + effcode = TSHORT; + + } else if ((min_val >= 0.0) && (max_val <= 65535.0)) { + effcode = TUSHORT; + + } else if ((min_val >= -2147483648.0) && (max_val <= 2147483647.0)) { + effcode = TLONG; + + } else if ((min_val >= 0.0) && (max_val < 4294967296.0)) { + effcode = TULONG; + + } else { /* exceeds the range of a 32-bit integer */ + effcode = TDOUBLE; + } + + /* return the effective datatype code (negative if variable length col.) */ + if (*typecode < 0) /* variable length array column */ + *typecode = -effcode; + else + *typecode = effcode; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgncl( fitsfile *fptr, /* I - FITS file pointer */ + int *ncols, /* O - number of columns in the table */ + int *status) /* IO - error status */ +/* + Get the number of columns in the table (= TFIELDS keyword) +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + return(*status = NOT_TABLE); + + *ncols = (fptr->Fptr)->tfield; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgnrw( fitsfile *fptr, /* I - FITS file pointer */ + long *nrows, /* O - number of rows in the table */ + int *status) /* IO - error status */ +/* + Get the number of rows in the table (= NAXIS2 keyword) +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + return(*status = NOT_TABLE); + + /* the NAXIS2 keyword may not be up to date, so use the structure value */ + *nrows = (long) (fptr->Fptr)->numrows; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgnrwll( fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG *nrows, /* O - number of rows in the table */ + int *status) /* IO - error status */ +/* + Get the number of rows in the table (= NAXIS2 keyword) +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + return(*status = NOT_TABLE); + + /* the NAXIS2 keyword may not be up to date, so use the structure value */ + *nrows = (fptr->Fptr)->numrows; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgacl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + char *ttype, /* O - TTYPEn keyword value */ + long *tbcol, /* O - TBCOLn keyword value */ + char *tunit, /* O - TUNITn keyword value */ + char *tform, /* O - TFORMn keyword value */ + double *tscal, /* O - TSCALn keyword value */ + double *tzero, /* O - TZEROn keyword value */ + char *tnull, /* O - TNULLn keyword value */ + char *tdisp, /* O - TDISPn keyword value */ + int *status) /* IO - error status */ +/* + get ASCII column keyword values +*/ +{ + char name[FLEN_KEYWORD], comm[FLEN_COMMENT]; + tcolumn *colptr; + int tstatus; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + /* get what we can from the column structure */ + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (colnum -1); /* offset to correct column */ + + if (ttype) + strcpy(ttype, colptr->ttype); + + if (tbcol) + *tbcol = (long) ((colptr->tbcol) + 1); /* first col is 1, not 0 */ + + if (tform) + strcpy(tform, colptr->tform); + + if (tscal) + *tscal = colptr->tscale; + + if (tzero) + *tzero = colptr->tzero; + + if (tnull) + strcpy(tnull, colptr->strnull); + + /* read keywords to get additional parameters */ + + if (tunit) + { + ffkeyn("TUNIT", colnum, name, status); + tstatus = 0; + *tunit = '\0'; + ffgkys(fptr, name, tunit, comm, &tstatus); + } + + if (tdisp) + { + ffkeyn("TDISP", colnum, name, status); + tstatus = 0; + *tdisp = '\0'; + ffgkys(fptr, name, tdisp, comm, &tstatus); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgbcl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + char *ttype, /* O - TTYPEn keyword value */ + char *tunit, /* O - TUNITn keyword value */ + char *dtype, /* O - datatype char: I, J, E, D, etc. */ + long *repeat, /* O - vector column repeat count */ + double *tscal, /* O - TSCALn keyword value */ + double *tzero, /* O - TZEROn keyword value */ + long *tnull, /* O - TNULLn keyword value integer cols only */ + char *tdisp, /* O - TDISPn keyword value */ + int *status) /* IO - error status */ +/* + get BINTABLE column keyword values +*/ +{ + LONGLONG trepeat, ttnull; + + if (*status > 0) + return(*status); + + ffgbclll(fptr, colnum, ttype, tunit, dtype, &trepeat, tscal, tzero, + &ttnull, tdisp, status); + + if (repeat) + *repeat = (long) trepeat; + + if (tnull) + *tnull = (long) ttnull; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgbclll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + char *ttype, /* O - TTYPEn keyword value */ + char *tunit, /* O - TUNITn keyword value */ + char *dtype, /* O - datatype char: I, J, E, D, etc. */ + LONGLONG *repeat, /* O - vector column repeat count */ + double *tscal, /* O - TSCALn keyword value */ + double *tzero, /* O - TZEROn keyword value */ + LONGLONG *tnull, /* O - TNULLn keyword value integer cols only */ + char *tdisp, /* O - TDISPn keyword value */ + int *status) /* IO - error status */ +/* + get BINTABLE column keyword values +*/ +{ + char name[FLEN_KEYWORD], comm[FLEN_COMMENT]; + tcolumn *colptr; + int tstatus; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + /* get what we can from the column structure */ + + colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ + colptr += (colnum -1); /* offset to correct column */ + + if (ttype) + strcpy(ttype, colptr->ttype); + + if (dtype) + { + if (colptr->tdatatype < 0) /* add the "P" prefix for */ + strcpy(dtype, "P"); /* variable length columns */ + else + dtype[0] = 0; + + if (abs(colptr->tdatatype) == TBIT) + strcat(dtype, "X"); + else if (abs(colptr->tdatatype) == TBYTE) + strcat(dtype, "B"); + else if (abs(colptr->tdatatype) == TLOGICAL) + strcat(dtype, "L"); + else if (abs(colptr->tdatatype) == TSTRING) + strcat(dtype, "A"); + else if (abs(colptr->tdatatype) == TSHORT) + strcat(dtype, "I"); + else if (abs(colptr->tdatatype) == TLONG) + strcat(dtype, "J"); + else if (abs(colptr->tdatatype) == TLONGLONG) + strcat(dtype, "K"); + else if (abs(colptr->tdatatype) == TFLOAT) + strcat(dtype, "E"); + else if (abs(colptr->tdatatype) == TDOUBLE) + strcat(dtype, "D"); + else if (abs(colptr->tdatatype) == TCOMPLEX) + strcat(dtype, "C"); + else if (abs(colptr->tdatatype) == TDBLCOMPLEX) + strcat(dtype, "M"); + } + + if (repeat) + *repeat = colptr->trepeat; + + if (tscal) + *tscal = colptr->tscale; + + if (tzero) + *tzero = colptr->tzero; + + if (tnull) + *tnull = colptr->tnull; + + /* read keywords to get additional parameters */ + + if (tunit) + { + ffkeyn("TUNIT", colnum, name, status); + tstatus = 0; + *tunit = '\0'; + ffgkys(fptr, name, tunit, comm, &tstatus); + } + + if (tdisp) + { + ffkeyn("TDISP", colnum, name, status); + tstatus = 0; + *tdisp = '\0'; + ffgkys(fptr, name, tdisp, comm, &tstatus); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghdn(fitsfile *fptr, /* I - FITS file pointer */ + int *chdunum) /* O - number of the CHDU; 1 = primary array */ +/* + Return the number of the Current HDU in the FITS file. The primary array + is HDU number 1. Note that this is one of the few cfitsio routines that + does not return the error status value as the value of the function. +*/ +{ + *chdunum = (fptr->HDUposition) + 1; + return(*chdunum); +} +/*--------------------------------------------------------------------------*/ +int ffghadll(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG *headstart, /* O - byte offset to beginning of CHDU */ + LONGLONG *datastart, /* O - byte offset to beginning of next HDU */ + LONGLONG *dataend, /* O - byte offset to beginning of next HDU */ + int *status) /* IO - error status */ +/* + Return the address (= byte offset) in the FITS file to the beginning of + the current HDU, the beginning of the data unit, and the end of the data unit. +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + if (ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status) > 0) + return(*status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if (ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + if (headstart) + *headstart = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; + + if (datastart) + *datastart = (fptr->Fptr)->datastart; + + if (dataend) + *dataend = (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghof(fitsfile *fptr, /* I - FITS file pointer */ + OFF_T *headstart, /* O - byte offset to beginning of CHDU */ + OFF_T *datastart, /* O - byte offset to beginning of next HDU */ + OFF_T *dataend, /* O - byte offset to beginning of next HDU */ + int *status) /* IO - error status */ +/* + Return the address (= byte offset) in the FITS file to the beginning of + the current HDU, the beginning of the data unit, and the end of the data unit. +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + if (ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status) > 0) + return(*status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if (ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + if (headstart) + *headstart = (OFF_T) (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; + + if (datastart) + *datastart = (OFF_T) (fptr->Fptr)->datastart; + + if (dataend) + *dataend = (OFF_T) (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghad(fitsfile *fptr, /* I - FITS file pointer */ + long *headstart, /* O - byte offset to beginning of CHDU */ + long *datastart, /* O - byte offset to beginning of next HDU */ + long *dataend, /* O - byte offset to beginning of next HDU */ + int *status) /* IO - error status */ +/* + Return the address (= byte offset) in the FITS file to the beginning of + the current HDU, the beginning of the data unit, and the end of the data unit. +*/ +{ + LONGLONG shead, sdata, edata; + + if (*status > 0) + return(*status); + + ffghadll(fptr, &shead, &sdata, &edata, status); + + if (headstart) + { + if (shead > LONG_MAX) + *status = NUM_OVERFLOW; + else + *headstart = (long) shead; + } + + if (datastart) + { + if (sdata > LONG_MAX) + *status = NUM_OVERFLOW; + else + *datastart = (long) sdata; + } + + if (dataend) + { + if (edata > LONG_MAX) + *status = NUM_OVERFLOW; + else + *dataend = (long) edata; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrhdu(fitsfile *fptr, /* I - FITS file pointer */ + int *hdutype, /* O - type of HDU */ + int *status) /* IO - error status */ +/* + read the required keywords of the CHDU and initialize the corresponding + structure elements that describe the format of the HDU +*/ +{ + int ii, tstatus; + char card[FLEN_CARD]; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xname[FLEN_VALUE], *xtension, urltype[20]; + + if (*status > 0) + return(*status); + + if (ffgrec(fptr, 1, card, status) > 0 ) /* get the 80-byte card */ + { + ffpmsg("Cannot read first keyword in header (ffrhdu)."); + return(*status); + } + strncpy(name,card,8); /* first 8 characters = the keyword name */ + name[8] = '\0'; + + for (ii=7; ii >= 0; ii--) /* replace trailing blanks with nulls */ + { + if (name[ii] == ' ') + name[ii] = '\0'; + else + break; + } + + if (ffpsvc(card, value, comm, status) > 0) /* parse value and comment */ + { + ffpmsg("Cannot read value of first keyword in header (ffrhdu):"); + ffpmsg(card); + return(*status); + } + + if (!strcmp(name, "SIMPLE")) /* this is the primary array */ + { + + ffpinit(fptr, status); /* initialize the primary array */ + + if (hdutype != NULL) + *hdutype = 0; + } + + else if (!strcmp(name, "XTENSION")) /* this is an XTENSION keyword */ + { + if (ffc2s(value, xname, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + xtension = xname; + while (*xtension == ' ') /* ignore any leading spaces in name */ + xtension++; + + if (!strcmp(xtension, "TABLE")) + { + ffainit(fptr, status); /* initialize the ASCII table */ + if (hdutype != NULL) + *hdutype = 1; + } + + else if (!strcmp(xtension, "BINTABLE") || + !strcmp(xtension, "A3DTABLE") || + !strcmp(xtension, "3DTABLE") ) + { + ffbinit(fptr, status); /* initialize the binary table */ + if (hdutype != NULL) + *hdutype = 2; + } + + else + { + tstatus = 0; + ffpinit(fptr, &tstatus); /* probably an IMAGE extension */ + + if (tstatus == UNKNOWN_EXT && hdutype != NULL) + *hdutype = -1; /* don't recognize this extension type */ + else + { + *status = tstatus; + if (hdutype != NULL) + *hdutype = 0; + } + } + } + + else /* not the start of a new extension */ + { + if (card[0] == 0 || + card[0] == 10) /* some editors append this character to EOF */ + { + *status = END_OF_FILE; + } + else + { + *status = UNKNOWN_REC; /* found unknown type of record */ + ffpmsg + ("Extension doesn't start with SIMPLE or XTENSION keyword. (ffrhdu)"); + ffpmsg(card); + } + } + + /* compare the starting position of the next HDU (if any) with the size */ + /* of the whole file to see if this is the last HDU in the file */ + + if ((fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] < + (fptr->Fptr)->logfilesize ) + { + (fptr->Fptr)->lasthdu = 0; /* no, not the last HDU */ + } + else + { + (fptr->Fptr)->lasthdu = 1; /* yes, this is the last HDU */ + + /* special code for mem:// type files (FITS file in memory) */ + /* Allocate enough memory to hold the entire HDU. */ + /* Without this code, CFITSIO would repeatedly realloc memory */ + /* to incrementally increase the size of the file by 2880 bytes */ + /* at a time, until it reached the final size */ + + ffurlt(fptr, urltype, status); + if (!strcmp(urltype,"mem://") || !strcmp(urltype,"memkeep://")) + { + fftrun(fptr, (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1], + status); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpinit(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + initialize the parameters defining the structure of the primary array + or an Image extension +*/ +{ + int groups, tstatus, simple, bitpix, naxis, extend, nspace; + int ttype = 0, bytlen = 0, ii; + long pcount, gcount; + LONGLONG naxes[999], npix, blank; + double bscale, bzero; + char comm[FLEN_COMMENT]; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->hdutype = IMAGE_HDU; /* primary array or IMAGE extension */ + (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ + + groups = 0; + tstatus = *status; + + /* get all the descriptive info about this HDU */ + ffgphd(fptr, 999, &simple, &bitpix, &naxis, naxes, &pcount, &gcount, + &extend, &bscale, &bzero, &blank, &nspace, status); + + if (*status == NOT_IMAGE) + *status = tstatus; /* ignore 'unknown extension type' error */ + else if (*status > 0) + return(*status); + + /* + the logical end of the header is 80 bytes before the current position, + minus any trailing blank keywords just before the END keyword. + */ + (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); + + /* the data unit begins at the beginning of the next logical block */ + (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) + * 2880; + + if (naxis > 0 && naxes[0] == 0) /* test for 'random groups' */ + { + tstatus = 0; + if (ffgkyl(fptr, "GROUPS", &groups, comm, &tstatus)) + groups = 0; /* GROUPS keyword not found */ + } + + if (bitpix == BYTE_IMG) /* test bitpix and set the datatype code */ + { + ttype=TBYTE; + bytlen=1; + } + else if (bitpix == SHORT_IMG) + { + ttype=TSHORT; + bytlen=2; + } + else if (bitpix == LONG_IMG) + { + ttype=TLONG; + bytlen=4; + } + else if (bitpix == LONGLONG_IMG) + { + ttype=TLONGLONG; + bytlen=8; + } + else if (bitpix == FLOAT_IMG) + { + ttype=TFLOAT; + bytlen=4; + } + else if (bitpix == DOUBLE_IMG) + { + ttype=TDOUBLE; + bytlen=8; + } + + /* calculate the size of the primary array */ + if (naxis == 0) + { + npix = 0; + } + else + { + if (groups) + { + npix = 1; /* NAXIS1 = 0 is a special flag for 'random groups' */ + } + else + { + npix = naxes[0]; + } + + for (ii=1; ii < naxis; ii++) + { + npix = npix*naxes[ii]; /* calc number of pixels in the array */ + } + } + + /* + now we know everything about the array; just fill in the parameters: + the next HDU begins in the next logical block after the data + */ + + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = + (fptr->Fptr)->datastart + + ( (LONGLONG)(pcount + npix) * bytlen * gcount + 2879) / 2880 * 2880; + + /* + initialize the fictitious heap starting address (immediately following + the array data) and a zero length heap. This is used to find the + end of the data when checking the fill values in the last block. + */ + (fptr->Fptr)->heapstart = (npix + pcount) * bytlen * gcount; + (fptr->Fptr)->heapsize = 0; + + (fptr->Fptr)->compressimg = 0; /* this is not a compressed image */ + + if (naxis == 0) + { + (fptr->Fptr)->rowlength = 0; /* rows have zero length */ + (fptr->Fptr)->tfield = 0; /* table has no fields */ + + if ((fptr->Fptr)->tableptr) + free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ + + (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ + (fptr->Fptr)->numrows = 0; + (fptr->Fptr)->origrows = 0; + } + else + { + /* + The primary array is actually interpreted as a binary table. There + are two columns: the first column contains the group parameters if any. + The second column contains the primary array of data as a single vector + column element. In the case of 'random grouped' format, each group + is stored in a separate row of the table. + */ + /* the number of rows is equal to the number of groups */ + (fptr->Fptr)->numrows = gcount; + (fptr->Fptr)->origrows = gcount; + + (fptr->Fptr)->rowlength = (npix + pcount) * bytlen; /* total size */ + (fptr->Fptr)->tfield = 2; /* 2 fields: group params and the image */ + + if ((fptr->Fptr)->tableptr) + free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ + + colptr = (tcolumn *) calloc(2, sizeof(tcolumn) ) ; + + if (!colptr) + { + ffpmsg + ("malloc failed to get memory for FITS array descriptors (ffpinit)"); + (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ + return(*status = ARRAY_TOO_BIG); + } + + /* copy the table structure address to the fitsfile structure */ + (fptr->Fptr)->tableptr = colptr; + + /* the first column represents the group parameters, if any */ + colptr->tbcol = 0; + colptr->tdatatype = ttype; + colptr->twidth = bytlen; + colptr->trepeat = (LONGLONG) pcount; + colptr->tscale = 1.; + colptr->tzero = 0.; + colptr->tnull = blank; + + colptr++; /* increment pointer to the second column */ + + /* the second column represents the image array */ + colptr->tbcol = pcount * bytlen; /* col starts after the group parms */ + colptr->tdatatype = ttype; + colptr->twidth = bytlen; + colptr->trepeat = npix; + colptr->tscale = bscale; + colptr->tzero = bzero; + colptr->tnull = blank; + } + + /* reset next keyword pointer to the start of the header */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffainit(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +{ +/* + initialize the parameters defining the structure of an ASCII table +*/ + int ii, nspace; + long tfield; + LONGLONG pcount, rowlen, nrows, tbcoln; + tcolumn *colptr = 0; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char message[FLEN_ERRMSG], errmsg[81]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->hdutype = ASCII_TBL; /* set that this is an ASCII table */ + (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ + + /* get table parameters and test that the header is a valid: */ + if (ffgttb(fptr, &rowlen, &nrows, &pcount, &tfield, status) > 0) + return(*status); + + if (pcount != 0) + { + ffpmsg("PCOUNT keyword not equal to 0 in ASCII table (ffainit)."); + sprintf(errmsg, " PCOUNT = %ld", (long) pcount); + ffpmsg(errmsg); + return(*status = BAD_PCOUNT); + } + + (fptr->Fptr)->rowlength = rowlen; /* store length of a row */ + (fptr->Fptr)->tfield = tfield; /* store number of table fields in row */ + + if ((fptr->Fptr)->tableptr) + free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ + + /* mem for column structures ; space is initialized = 0 */ + if (tfield > 0) + { + colptr = (tcolumn *) calloc(tfield, sizeof(tcolumn) ); + if (!colptr) + { + ffpmsg + ("malloc failed to get memory for FITS table descriptors (ffainit)"); + (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ + return(*status = ARRAY_TOO_BIG); + } + } + + /* copy the table structure address to the fitsfile structure */ + (fptr->Fptr)->tableptr = colptr; + + /* initialize the table field parameters */ + for (ii = 0; ii < tfield; ii++, colptr++) + { + colptr->ttype[0] = '\0'; /* null column name */ + colptr->tscale = 1.; + colptr->tzero = 0.; + colptr->strnull[0] = ASCII_NULL_UNDEFINED; /* null value undefined */ + colptr->tbcol = -1; /* initialize to illegal value */ + colptr->tdatatype = -9999; /* initialize to illegal value */ + } + + /* + Initialize the fictitious heap starting address (immediately following + the table data) and a zero length heap. This is used to find the + end of the table data when checking the fill values in the last block. + There is no special data following an ASCII table. + */ + (fptr->Fptr)->numrows = nrows; + (fptr->Fptr)->origrows = nrows; + (fptr->Fptr)->heapstart = rowlen * nrows; + (fptr->Fptr)->heapsize = 0; + + (fptr->Fptr)->compressimg = 0; /* this is not a compressed image */ + + /* now search for the table column keywords and the END keyword */ + + for (nspace = 0, ii = 8; 1; ii++) /* infinite loop */ + { + ffgkyn(fptr, ii, name, value, comm, status); + + /* try to ignore minor syntax errors */ + if (*status == NO_QUOTE) + { + strcat(value, "'"); + *status = 0; + } + else if (*status == BAD_KEYCHAR) + { + *status = 0; + } + + if (*status == END_OF_FILE) + { + ffpmsg("END keyword not found in ASCII table header (ffainit)."); + return(*status = NO_END); + } + else if (*status > 0) + return(*status); + + else if (name[0] == 'T') /* keyword starts with 'T' ? */ + ffgtbp(fptr, name, value, status); /* test if column keyword */ + + else if (!FSTRCMP(name, "END")) /* is this the END keyword? */ + break; + + if (!name[0] && !value[0] && !comm[0]) /* a blank keyword? */ + nspace++; + + else + nspace = 0; + } + + /* test that all required keywords were found and have legal values */ + colptr = (fptr->Fptr)->tableptr; + for (ii = 0; ii < tfield; ii++, colptr++) + { + tbcoln = colptr->tbcol; /* the starting column number (zero based) */ + + if (colptr->tdatatype == -9999) + { + ffkeyn("TFORM", ii+1, name, status); /* construct keyword name */ + sprintf(message,"Required %s keyword not found (ffainit).", name); + ffpmsg(message); + return(*status = NO_TFORM); + } + + else if (tbcoln == -1) + { + ffkeyn("TBCOL", ii+1, name, status); /* construct keyword name */ + sprintf(message,"Required %s keyword not found (ffainit).", name); + ffpmsg(message); + return(*status = NO_TBCOL); + } + + else if ((fptr->Fptr)->rowlength != 0 && + (tbcoln < 0 || tbcoln >= (fptr->Fptr)->rowlength ) ) + { + ffkeyn("TBCOL", ii+1, name, status); /* construct keyword name */ + sprintf(message,"Value of %s keyword out of range: %ld (ffainit).", + name, (long) tbcoln); + ffpmsg(message); + return(*status = BAD_TBCOL); + } + + else if ((fptr->Fptr)->rowlength != 0 && + tbcoln + colptr->twidth > (fptr->Fptr)->rowlength ) + { + sprintf(message,"Column %d is too wide to fit in table (ffainit)", + ii+1); + ffpmsg(message); + sprintf(message, " TFORM = %s and NAXIS1 = %ld", + colptr->tform, (long) (fptr->Fptr)->rowlength); + ffpmsg(message); + return(*status = COL_TOO_WIDE); + } + } + + /* + now we know everything about the table; just fill in the parameters: + the 'END' record is 80 bytes before the current position, minus + any trailing blank keywords just before the END keyword. + */ + (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); + + /* the data unit begins at the beginning of the next logical block */ + (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) + * 2880; + + /* the next HDU begins in the next logical block after the data */ + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = + (fptr->Fptr)->datastart + + ( ((LONGLONG)rowlen * nrows + 2879) / 2880 * 2880 ); + + /* reset next keyword pointer to the start of the header */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbinit(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +{ +/* + initialize the parameters defining the structure of a binary table +*/ + int ii, nspace; + long tfield; + LONGLONG pcount, rowlen, nrows, totalwidth; + tcolumn *colptr = 0; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->hdutype = BINARY_TBL; /* set that this is a binary table */ + (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ + + /* get table parameters and test that the header is valid: */ + if (ffgttb(fptr, &rowlen, &nrows, &pcount, &tfield, status) > 0) + return(*status); + + (fptr->Fptr)->rowlength = rowlen; /* store length of a row */ + (fptr->Fptr)->tfield = tfield; /* store number of table fields in row */ + + if ((fptr->Fptr)->tableptr) + free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ + + /* mem for column structures ; space is initialized = 0 */ + if (tfield > 0) + { + colptr = (tcolumn *) calloc(tfield, sizeof(tcolumn) ); + if (!colptr) + { + ffpmsg + ("malloc failed to get memory for FITS table descriptors (ffbinit)"); + (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ + return(*status = ARRAY_TOO_BIG); + } + } + + /* copy the table structure address to the fitsfile structure */ + (fptr->Fptr)->tableptr = colptr; + + /* initialize the table field parameters */ + for (ii = 0; ii < tfield; ii++, colptr++) + { + colptr->ttype[0] = '\0'; /* null column name */ + colptr->tscale = 1.; + colptr->tzero = 0.; + colptr->tnull = NULL_UNDEFINED; /* (integer) null value undefined */ + colptr->tdatatype = -9999; /* initialize to illegal value */ + colptr->trepeat = 1; + colptr->strnull[0] = '\0'; /* for ASCII string columns (TFORM = rA) */ + } + + /* + Initialize the heap starting address (immediately following + the table data) and the size of the heap. This is used to find the + end of the table data when checking the fill values in the last block. + */ + (fptr->Fptr)->numrows = nrows; + (fptr->Fptr)->origrows = nrows; + (fptr->Fptr)->heapstart = rowlen * nrows; + (fptr->Fptr)->heapsize = pcount; + + (fptr->Fptr)->compressimg = 0; /* initialize as not a compressed image */ + + /* now search for the table column keywords and the END keyword */ + + for (nspace = 0, ii = 8; 1; ii++) /* infinite loop */ + { + ffgkyn(fptr, ii, name, value, comm, status); + + /* try to ignore minor syntax errors */ + if (*status == NO_QUOTE) + { + strcat(value, "'"); + *status = 0; + } + else if (*status == BAD_KEYCHAR) + { + *status = 0; + } + + if (*status == END_OF_FILE) + { + ffpmsg("END keyword not found in binary table header (ffbinit)."); + return(*status = NO_END); + } + else if (*status > 0) + return(*status); + + else if (name[0] == 'T') /* keyword starts with 'T' ? */ + ffgtbp(fptr, name, value, status); /* test if column keyword */ + + else if (!FSTRCMP(name, "ZIMAGE")) + { + if (value[0] == 'T') + (fptr->Fptr)->compressimg = 1; /* this is a compressed image */ + } + else if (!FSTRCMP(name, "END")) /* is this the END keyword? */ + break; + + + if (!name[0] && !value[0] && !comm[0]) /* a blank keyword? */ + nspace++; + + else + nspace = 0; /* reset number of consecutive spaces before END */ + } + + /* test that all the required keywords were found and have legal values */ + colptr = (fptr->Fptr)->tableptr; /* set pointer to first column */ + + for (ii = 0; ii < tfield; ii++, colptr++) + { + if (colptr->tdatatype == -9999) + { + ffkeyn("TFORM", ii+1, name, status); /* construct keyword name */ + sprintf(message,"Required %s keyword not found (ffbinit).", name); + ffpmsg(message); + return(*status = NO_TFORM); + } + } + + /* + now we know everything about the table; just fill in the parameters: + the 'END' record is 80 bytes before the current position, minus + any trailing blank keywords just before the END keyword. + */ + + (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); + + /* the data unit begins at the beginning of the next logical block */ + (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) + * 2880; + + /* the next HDU begins in the next logical block after the data */ + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = + (fptr->Fptr)->datastart + + ( (rowlen * nrows + pcount + 2879) / 2880 * 2880 ); + + /* determine the byte offset to the beginning of each column */ + ffgtbc(fptr, &totalwidth, status); + + if (totalwidth != rowlen) + { + sprintf(message, + "NAXIS1 = %ld is not equal to the sum of column widths: %ld", + (long) rowlen, (long) totalwidth); + ffpmsg(message); + *status = BAD_ROW_WIDTH; + } + + /* reset next keyword pointer to the start of the header */ + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; + + if ( (fptr->Fptr)->compressimg == 1) /* Is this a compressed image */ + imcomp_get_compressed_image_par(fptr, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgabc(int tfields, /* I - number of columns in the table */ + char **tform, /* I - value of TFORMn keyword for each column */ + int space, /* I - number of spaces to leave between cols */ + long *rowlen, /* O - total width of a table row */ + long *tbcol, /* O - starting byte in row for each column */ + int *status) /* IO - error status */ +/* + calculate the starting byte offset of each column of an ASCII table + and the total length of a row, in bytes. The input space value determines + how many blank spaces to leave between each column (1 is recommended). +*/ +{ + int ii, datacode, decims; + long width; + + if (*status > 0) + return(*status); + + *rowlen=0; + + if (tfields <= 0) + return(*status); + + tbcol[0] = 1; + + for (ii = 0; ii < tfields; ii++) + { + tbcol[ii] = *rowlen + 1; /* starting byte in row of column */ + + ffasfm(tform[ii], &datacode, &width, &decims, status); + + *rowlen += (width + space); /* total length of row */ + } + + *rowlen -= space; /* don't add space after the last field */ + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtbc(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG *totalwidth, /* O - total width of a table row */ + int *status) /* IO - error status */ +{ +/* + calculate the starting byte offset of each column of a binary table. + Use the values of the datatype code and repeat counts in the + column structure. Return the total length of a row, in bytes. +*/ + int tfields, ii; + LONGLONG nbytes; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + tfields = (fptr->Fptr)->tfield; + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + + *totalwidth = 0; + + for (ii = 0; ii < tfields; ii++, colptr++) + { + colptr->tbcol = *totalwidth; /* byte offset in row to this column */ + + if (colptr->tdatatype == TSTRING) + { + nbytes = colptr->trepeat; /* one byte per char */ + } + else if (colptr->tdatatype == TBIT) + { + nbytes = ( colptr->trepeat + 7) / 8; + } + else if (colptr->tdatatype > 0) + { + nbytes = colptr->trepeat * (colptr->tdatatype / 10); + } + else if ((colptr->tform[0] == 'P') || (colptr->tform[1] == 'P')) + /* this is a 'P' variable length descriptor (neg. tdatatype) */ + nbytes = 8; + else + /* this is a 'Q' variable length descriptor (neg. tdatatype) */ + nbytes = 16; + + *totalwidth = *totalwidth + nbytes; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtbp(fitsfile *fptr, /* I - FITS file pointer */ + char *name, /* I - name of the keyword */ + char *value, /* I - value string of the keyword */ + int *status) /* IO - error status */ +{ +/* + Get TaBle Parameter. The input keyword name begins with the letter T. + Test if the keyword is one of the table column definition keywords + of an ASCII or binary table. If so, decode it and update the value + in the structure. +*/ + int tstatus, datacode, decimals; + long width, repeat, nfield, ivalue; + LONGLONG jjvalue; + double dvalue; + char tvalue[FLEN_VALUE], *loc; + char message[FLEN_ERRMSG]; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + tstatus = 0; + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if(!FSTRNCMP(name + 1, "TYPE", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ + return(*status); + + strcpy(colptr->ttype, tvalue); /* copy col name to structure */ + } + else if(!FSTRNCMP(name + 1, "FORM", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ + return(*status); + + strncpy(colptr->tform, tvalue, 9); /* copy TFORM to structure */ + colptr->tform[9] = '\0'; /* make sure it is terminated */ + + if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ + { + if (ffasfm(tvalue, &datacode, &width, &decimals, status) > 0) + return(*status); /* bad format code */ + + colptr->tdatatype = TSTRING; /* store datatype code */ + colptr->trepeat = 1; /* field repeat count == 1 */ + colptr->twidth = width; /* the width of the field, in bytes */ + } + else /* binary table */ + { + if (ffbnfm(tvalue, &datacode, &repeat, &width, status) > 0) + return(*status); /* bad format code */ + + colptr->tdatatype = datacode; /* store datatype code */ + colptr->trepeat = (LONGLONG) repeat; /* field repeat count */ + + /* Don't overwrite the unit string width if it was previously */ + /* set by a TDIMn keyword and has a legal value */ + if (datacode == TSTRING) { + if (colptr->twidth == 0 || colptr->twidth > repeat) + colptr->twidth = width; /* width of a unit string */ + + } else { + colptr->twidth = width; /* width of a unit value in chars */ + } + } + } + else if(!FSTRNCMP(name + 1, "BCOL", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if ((fptr->Fptr)->hdutype == BINARY_TBL) + return(*status); /* binary tables don't have TBCOL keywords */ + + if (ffc2ii(value, &ivalue, status) > 0) + { + sprintf(message, + "Error reading value of %s as an integer: %s", name, value); + ffpmsg(message); + return(*status); + } + colptr->tbcol = ivalue - 1; /* convert to zero base */ + } + else if(!FSTRNCMP(name + 1, "SCAL", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if (ffc2dd(value, &dvalue, &tstatus) > 0) + { + sprintf(message, + "Error reading value of %s as a double: %s", name, value); + ffpmsg(message); + + /* ignore this error, so don't return error status */ + return(*status); + } + colptr->tscale = dvalue; + } + else if(!FSTRNCMP(name + 1, "ZERO", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if (ffc2dd(value, &dvalue, &tstatus) > 0) + { + sprintf(message, + "Error reading value of %s as a double: %s", name, value); + ffpmsg(message); + + /* ignore this error, so don't return error status */ + return(*status); + } + colptr->tzero = dvalue; + } + else if(!FSTRNCMP(name + 1, "NULL", 4) ) + { + /* get the index number */ + if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ + { + if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ + return(*status); + + strncpy(colptr->strnull, tvalue, 17); /* copy TNULL string */ + colptr->strnull[17] = '\0'; /* terminate the strnull field */ + + } + else /* binary table */ + { + if (ffc2jj(value, &jjvalue, &tstatus) > 0) + { + sprintf(message, + "Error reading value of %s as an integer: %s", name, value); + ffpmsg(message); + + /* ignore this error, so don't return error status */ + return(*status); + } + colptr->tnull = jjvalue; /* null value for integer column */ + } + } + else if(!FSTRNCMP(name + 1, "DIM", 3) ) + { + if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ + return(*status); /* ASCII tables don't support TDIMn keyword */ + + /* get the index number */ + if( ffc2ii(name + 4, &nfield, &tstatus) > 0) /* read index no. */ + return(*status); /* must not be an indexed keyword */ + + if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ + colptr = colptr + nfield - 1; /* point to the correct column */ + + /* uninitialized columns have tdatatype set = -9999 */ + if (colptr->tdatatype != -9999 && colptr->tdatatype != TSTRING) + return(*status); /* this is not an ASCII string column */ + + loc = strchr(value, '(' ); /* find the opening parenthesis */ + if (!loc) + return(*status); /* not a proper TDIM keyword */ + + loc++; + width = strtol(loc, &loc, 10); /* read size of first dimension */ + if (colptr->trepeat != 1 && colptr->trepeat < width) + return(*status); /* string length is greater than column width */ + + colptr->twidth = width; /* set width of a unit string in chars */ + } + else if (!FSTRNCMP(name + 1, "HEAP", 4) ) + { + if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ + return(*status); /* ASCII tables don't have a heap */ + + if (ffc2jj(value, &jjvalue, &tstatus) > 0) + { + sprintf(message, + "Error reading value of %s as an integer: %s", name, value); + ffpmsg(message); + + /* ignore this error, so don't return error status */ + return(*status); + } + (fptr->Fptr)->heapstart = jjvalue; /* starting byte of the heap */ + return(*status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcprll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ + LONGLONG firstelem, /* I - first element within vector (1 = 1st) */ + LONGLONG nelem, /* I - number of elements to read or write */ + int writemode, /* I - = 1 if writing data, = 0 if reading data */ + /* If = 2, then writing data, but don't modify */ + /* the returned values of repeat and incre. */ + /* If = -1, then reading data in reverse */ + /* direction. */ + double *scale, /* O - FITS scaling factor (TSCALn keyword value) */ + double *zero, /* O - FITS scaling zero pt (TZEROn keyword value) */ + char *tform, /* O - ASCII column format: value of TFORMn keyword */ + long *twidth, /* O - width of ASCII column (characters) */ + int *tcode, /* O - column datatype code: I*4=41, R*4=42, etc */ + int *maxelem, /* O - max number of elements that fit in buffer */ + LONGLONG *startpos,/* O - offset in file to starting row & column */ + LONGLONG *elemnum, /* O - starting element number ( 0 = 1st element) */ + long *incre, /* O - byte offset between elements within a row */ + LONGLONG *repeat, /* O - number of elements in a row (vector column) */ + LONGLONG *rowlen, /* O - length of a row, in bytes */ + int *hdutype, /* O - HDU type: 0, 1, 2 = primary, table, bintable */ + LONGLONG *tnull, /* O - null value for integer columns */ + char *snull, /* O - null value for ASCII table columns */ + int *status) /* IO - error status */ +/* + Get Column PaRameters, and test starting row and element numbers for + validity. This is a workhorse routine that is call by nearly every + other routine that reads or writes to FITS files. +*/ +{ + int nulpos, rangecheck = 1, tstatus = 0; + LONGLONG datastart, endpos; + long nblock; + LONGLONG heapoffset, lrepeat, endrow, nrows, tbcol; + char message[81]; + tcolumn *colptr; + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + /* Do sanity check of input parameters */ + if (firstrow < 1) + { + if ((fptr->Fptr)->hdutype == IMAGE_HDU) /* Primary Array or IMAGE */ + { + sprintf(message, "Image group number is less than 1: %.0f", + (double) firstrow); + ffpmsg(message); + return(*status = BAD_ROW_NUM); + } + else + { + sprintf(message, "Starting row number is less than 1: %.0f", + (double) firstrow); + ffpmsg(message); + return(*status = BAD_ROW_NUM); + } + } + else if ((fptr->Fptr)->hdutype != ASCII_TBL && firstelem < 1) + { + sprintf(message, "Starting element number less than 1: %ld", + (long) firstelem); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + else if (nelem < 0) + { + sprintf(message, "Tried to read or write less than 0 elements: %.0f", + (double) nelem); + ffpmsg(message); + return(*status = NEG_BYTES); + } + else if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d", + colnum); + ffpmsg(message); + sprintf(message, " There are %d columns in this table.", + (fptr->Fptr)->tfield ); + ffpmsg(message); + + return(*status = BAD_COL_NUM); + } + + /* copy relevant parameters from the structure */ + + *hdutype = (fptr->Fptr)->hdutype; /* image, ASCII table, or BINTABLE */ + *rowlen = (fptr->Fptr)->rowlength; /* width of the table, in bytes */ + datastart = (fptr->Fptr)->datastart; /* offset in file to start of table */ + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + *scale = colptr->tscale; /* value scaling factor; default = 1.0 */ + *zero = colptr->tzero; /* value scaling zeropoint; default = 0.0 */ + *tnull = colptr->tnull; /* null value for integer columns */ + tbcol = colptr->tbcol; /* offset to start of column within row */ + *twidth = colptr->twidth; /* width of a single datum, in bytes */ + *incre = colptr->twidth; /* increment between datums, in bytes */ + + *tcode = colptr->tdatatype; + *repeat = colptr->trepeat; + + strcpy(tform, colptr->tform); /* value of TFORMn keyword */ + strcpy(snull, colptr->strnull); /* null value for ASCII table columns */ + + if (*hdutype == ASCII_TBL && snull[0] == '\0') + { + /* In ASCII tables, a null value is equivalent to all spaces */ + + strcpy(snull, " "); /* maximum of 17 spaces */ + nulpos = minvalue(17, *twidth); /* truncate to width of column */ + snull[nulpos] = '\0'; + } + + /* Special case: interpret writemode = -1 as reading data, but */ + /* don't do error check for exceeding the range of pixels */ + if (writemode == -1) + { + writemode = 0; + rangecheck = 0; + } + + /* Special case: interprete 'X' column as 'B' */ + if (abs(*tcode) == TBIT) + { + *tcode = *tcode / TBIT * TBYTE; + *repeat = (*repeat + 7) / 8; + } + + /* Special case: support the 'rAw' format in BINTABLEs */ + if (*hdutype == BINARY_TBL && *tcode == TSTRING) { + *repeat = *repeat / *twidth; /* repeat = # of unit strings in field */ + } + else if (*hdutype == BINARY_TBL && *tcode == -TSTRING) { + /* variable length string */ + *incre = 1; + *twidth = (long) nelem; + } + + if (*hdutype == ASCII_TBL) + *elemnum = 0; /* ASCII tables don't have vector elements */ + else + *elemnum = firstelem - 1; + + /* interprete complex and double complex as pairs of floats or doubles */ + if (abs(*tcode) >= TCOMPLEX) + { + if (*tcode > 0) + *tcode = (*tcode + 1) / 2; + else + *tcode = (*tcode - 1) / 2; + + *repeat = *repeat * 2; + *twidth = *twidth / 2; + *incre = *incre / 2; + } + + /* calculate no. of pixels that fit in buffer */ + /* allow for case where floats are 8 bytes long */ + if (abs(*tcode) == TFLOAT) + *maxelem = DBUFFSIZE / sizeof(float); + else if (abs(*tcode) == TDOUBLE) + *maxelem = DBUFFSIZE / sizeof(double); + else if (abs(*tcode) == TSTRING) + { + *maxelem = (DBUFFSIZE - 1)/ *twidth; /* leave room for final \0 */ + if (*maxelem == 0) { + sprintf(message, + "ASCII string column is too wide: %ld; max supported width is %d", + *twidth, DBUFFSIZE - 1); + ffpmsg(message); + return(*status = COL_TOO_WIDE); + } + } + else + *maxelem = DBUFFSIZE / *twidth; + + /* calc starting byte position to 1st element of col */ + /* (this does not apply to variable length columns) */ + *startpos = datastart + ((LONGLONG)(firstrow - 1) * *rowlen) + tbcol; + + if (*hdutype == IMAGE_HDU && writemode) /* Primary Array or IMAGE */ + { /* + For primary arrays, set the repeat count greater than the total + number of pixels to be written. This prevents an out-of-range + error message in cases where the final image array size is not + yet known or defined. + */ + if (*repeat < *elemnum + nelem) + *repeat = *elemnum + nelem; + } + else if (*tcode > 0) /* Fixed length table column */ + { + if (*elemnum >= *repeat) + { + sprintf(message, + "First element to write is too large: %ld; max allowed value is %ld", + (long) ((*elemnum) + 1), (long) *repeat); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + + /* last row number to be read or written */ + endrow = ((*elemnum + nelem - 1) / *repeat) + firstrow; + + if (writemode) + { + /* check if we are writing beyond the current end of table */ + if ((endrow > (fptr->Fptr)->numrows) && (nelem > 0) ) + { + /* if there are more HDUs following the current one, or */ + /* if there is a data heap, then we must insert space */ + /* for the new rows. */ + if ( !((fptr->Fptr)->lasthdu) || (fptr->Fptr)->heapsize > 0) + { + nrows = endrow - ((fptr->Fptr)->numrows); + if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) + { + sprintf(message, + "Failed to add space for %.0f new rows in table.", + (double) nrows); + ffpmsg(message); + return(*status); + } + } + else + { + /* update heap starting address */ + (fptr->Fptr)->heapstart += + ((LONGLONG)(endrow - (fptr->Fptr)->numrows) * + (fptr->Fptr)->rowlength ); + + (fptr->Fptr)->numrows = endrow; /* update number of rows */ + } + } + } + else /* reading from the file */ + { + if ( endrow > (fptr->Fptr)->numrows && rangecheck) + { + if (*hdutype == IMAGE_HDU) /* Primary Array or IMAGE */ + { + if (firstrow > (fptr->Fptr)->numrows) + { + sprintf(message, + "Attempted to read from group %ld of the HDU,", (long) firstrow); + ffpmsg(message); + + sprintf(message, + "however the HDU only contains %ld group(s).", + (long) ((fptr->Fptr)->numrows) ); + ffpmsg(message); + } + else + { + ffpmsg("Attempt to read past end of array:"); + sprintf(message, + " Image has %ld elements;", (long) *repeat); + ffpmsg(message); + + sprintf(message, + " Tried to read %ld elements starting at element %ld.", + (long) nelem, (long) firstelem); + ffpmsg(message); + } + } + else + { + ffpmsg("Attempt to read past end of table:"); + sprintf(message, + " Table has %.0f rows with %.0f elements per row;", + (double) ((fptr->Fptr)->numrows), (double) *repeat); + ffpmsg(message); + + sprintf(message, + " Tried to read %.0f elements starting at row %.0f, element %.0f.", + (double) nelem, (double) firstrow, (double) ((*elemnum) + 1)); + ffpmsg(message); + + } + return(*status = BAD_ROW_NUM); + } + } + + if (*repeat == 1 && nelem > 1 && writemode != 2) + { /* + When accessing a scalar column, fool the calling routine into + thinking that this is a vector column with very big elements. + This allows multiple values (up to the maxelem number of elements + that will fit in the buffer) to be read or written with a single + routine call, which increases the efficiency. + + If writemode == 2, then the calling program does not want to + have this efficiency trick applied. + */ + *incre = (long) *rowlen; + *repeat = nelem; + } + } + else /* Variable length Binary Table column */ + { + *tcode *= (-1); + + if (writemode) /* return next empty heap address for writing */ + { + + *repeat = nelem + *elemnum; /* total no. of elements in the field */ + + /* first, check if we are overwriting an existing row, and */ + /* if so, if the existing space is big enough for the new vector */ + + if ( firstrow <= (fptr->Fptr)->numrows ) + { + ffgdesll(fptr, colnum, firstrow, &lrepeat, &heapoffset, &tstatus); + if (!tstatus) + { + if (colptr->tdatatype <= -TCOMPLEX) + lrepeat = lrepeat * 2; /* no. of float or double values */ + else if (colptr->tdatatype == -TBIT) + lrepeat = (lrepeat + 7) / 8; /* convert from bits to bytes */ + + if (lrepeat >= *repeat) /* enough existing space? */ + { + *startpos = datastart + heapoffset + (fptr->Fptr)->heapstart; + + /* write the descriptor into the fixed length part of table */ + if (colptr->tdatatype <= -TCOMPLEX) + { + /* divide repeat count by 2 to get no. of complex values */ + ffpdes(fptr, colnum, firstrow, *repeat / 2, + heapoffset, status); + } + else + { + ffpdes(fptr, colnum, firstrow, *repeat, + heapoffset, status); + } + return(*status); + } + } + } + + /* Add more rows to the table, if writing beyond the end. */ + /* It is necessary to shift the heap down in this case */ + if ( firstrow > (fptr->Fptr)->numrows) + { + nrows = firstrow - ((fptr->Fptr)->numrows); + if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) + { + sprintf(message, + "Failed to add space for %.0f new rows in table.", + (double) nrows); + ffpmsg(message); + return(*status); + } + } + + /* calculate starting position (for writing new data) in the heap */ + *startpos = datastart + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize; + + /* write the descriptor into the fixed length part of table */ + if (colptr->tdatatype <= -TCOMPLEX) + { + /* divide repeat count by 2 to get no. of complex values */ + ffpdes(fptr, colnum, firstrow, *repeat / 2, + (fptr->Fptr)->heapsize, status); + } + else + { + ffpdes(fptr, colnum, firstrow, *repeat, (fptr->Fptr)->heapsize, + status); + } + + /* If this is not the last HDU in the file, then check if */ + /* extending the heap would overwrite the following header. */ + /* If so, then have to insert more blocks. */ + if ( !((fptr->Fptr)->lasthdu) ) + { + endpos = datastart + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize + ( *repeat * (*incre)); + + if (endpos > (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1]) + { + /* calc the number of blocks that need to be added */ + nblock = (long) (((endpos - 1 - + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] ) + / 2880) + 1); + + if (ffiblk(fptr, nblock, 1, status) > 0) /* insert blocks */ + { + sprintf(message, + "Failed to extend the size of the variable length heap by %ld blocks.", + nblock); + ffpmsg(message); + return(*status); + } + } + } + + /* increment the address to the next empty heap position */ + (fptr->Fptr)->heapsize += ( *repeat * (*incre)); + } + else /* get the read start position in the heap */ + { + if ( firstrow > (fptr->Fptr)->numrows) + { + ffpmsg("Attempt to read past end of table"); + sprintf(message, + " Table has %.0f rows and tried to read row %.0f.", + (double) ((fptr->Fptr)->numrows), (double) firstrow); + ffpmsg(message); + return(*status = BAD_ROW_NUM); + } + + ffgdesll(fptr, colnum, firstrow, &lrepeat, &heapoffset, status); + *repeat = lrepeat; + + if (colptr->tdatatype <= -TCOMPLEX) + *repeat = *repeat * 2; /* no. of float or double values */ + else if (colptr->tdatatype == -TBIT) + *repeat = (*repeat + 7) / 8; /* convert from bits to bytes */ + + if (*elemnum >= *repeat) + { + sprintf(message, + "Starting element to read in variable length column is too large: %ld", + (long) firstelem); + ffpmsg(message); + sprintf(message, + " This row only contains %ld elements", (long) *repeat); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + + *startpos = datastart + heapoffset + (fptr->Fptr)->heapstart; + } + } + return(*status); +} +/*---------------------------------------------------------------------------*/ +int fftheap(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG *heapsz, /* O - current size of the heap */ + LONGLONG *unused, /* O - no. of unused bytes in the heap */ + LONGLONG *overlap, /* O - no. of bytes shared by > 1 descriptors */ + int *valid, /* O - are all the heap addresses valid? */ + int *status) /* IO - error status */ +/* + Tests the contents of the binary table variable length array heap. + Returns the number of bytes that are currently not pointed to by any + of the descriptors, and also the number of bytes that are pointed to + by more than one descriptor. It returns valid = FALSE if any of the + descriptors point to addresses that are out of the bounds of the + heap. +*/ +{ + int jj, typecode, pixsize; + long ii, kk, theapsz, nbytes; + LONGLONG repeat, offset, tunused = 0, toverlap = 0; + char *buffer, message[81]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if ( fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header to make sure everything is up to date */ + else if ( ffrdef(fptr, status) > 0) + return(*status); + + if (valid) *valid = TRUE; + if (heapsz) *heapsz = (fptr->Fptr)->heapsize; + if (unused) *unused = 0; + if (overlap) *overlap = 0; + + /* return if this is not a binary table HDU or if the heap is empty */ + if ( (fptr->Fptr)->hdutype != BINARY_TBL || (fptr->Fptr)->heapsize == 0 ) + return(*status); + + if ((fptr->Fptr)->heapsize > LONG_MAX) { + ffpmsg("Heap is too big to test ( > 2**31 bytes). (fftheap)"); + return(*status = MEMORY_ALLOCATION); + } + + theapsz = (long) (fptr->Fptr)->heapsize; + buffer = calloc(1, theapsz); /* allocate temp space */ + if (!buffer ) + { + sprintf(message,"Failed to allocate buffer to test the heap"); + ffpmsg(message); + return(*status = MEMORY_ALLOCATION); + } + + /* loop over all cols */ + for (jj = 1; jj <= (fptr->Fptr)->tfield && *status <= 0; jj++) + { + ffgtcl(fptr, jj, &typecode, NULL, NULL, status); + if (typecode > 0) + continue; /* ignore fixed length columns */ + + pixsize = -typecode / 10; + + for (ii = 1; ii <= (fptr->Fptr)->numrows; ii++) + { + ffgdesll(fptr, jj, ii, &repeat, &offset, status); + if (typecode == -TBIT) + nbytes = (long) (repeat + 7) / 8; + else + nbytes = (long) repeat * pixsize; + + if (offset < 0 || offset + nbytes > theapsz) + { + if (valid) *valid = FALSE; /* address out of bounds */ + sprintf(message, + "Descriptor in row %ld, column %d has invalid heap address", + ii, jj); + ffpmsg(message); + } + else + { + for (kk = 0; kk < nbytes; kk++) + buffer[kk + offset]++; /* increment every used byte */ + } + } + } + + for (kk = 0; kk < theapsz; kk++) + { + if (buffer[kk] == 0) + tunused++; + else if (buffer[kk] > 1) + toverlap++; + } + + if (heapsz) *heapsz = theapsz; + if (unused) *unused = tunused; + if (overlap) *overlap = toverlap; + + free(buffer); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcmph(fitsfile *fptr, /* I -FITS file pointer */ + int *status) /* IO - error status */ +/* + compress the binary table heap by reordering the contents heap and + recovering any unused space +*/ +{ + fitsfile *tptr; + int jj, typecode, pixsize, valid; + long ii, buffsize = 10000, nblock, nbytes; + LONGLONG unused, overlap; + LONGLONG repeat, offset; + char *buffer, *tbuff = 0, comm[FLEN_COMMENT]; + char message[81]; + LONGLONG pcount; + LONGLONG readheapstart, writeheapstart, endpos, t1heapsize, t2heapsize; + + if (*status > 0) + return(*status); + + /* get information about the current heap */ + fftheap(fptr, NULL, &unused, &overlap, &valid, status); + + if (!valid) + return(*status = BAD_HEAP_PTR); /* bad heap pointers */ + + /* return if this is not a binary table HDU or if the heap is OK as is */ + if ( (fptr->Fptr)->hdutype != BINARY_TBL || (fptr->Fptr)->heapsize == 0 || + (unused == 0 && overlap == 0) || *status > 0 ) + return(*status); + + /* copy the current HDU to a temporary file in memory */ + if (ffinit( &tptr, "mem://tempheapfile", status) ) + { + sprintf(message,"Failed to create temporary file for the heap"); + ffpmsg(message); + return(*status); + } + if ( ffcopy(fptr, tptr, 0, status) ) + { + sprintf(message,"Failed to create copy of the heap"); + ffpmsg(message); + ffclos(tptr, status); + return(*status); + } + + buffer = (char *) malloc(buffsize); /* allocate initial buffer */ + if (!buffer) + { + sprintf(message,"Failed to allocate buffer to copy the heap"); + ffpmsg(message); + ffclos(tptr, status); + return(*status = MEMORY_ALLOCATION); + } + + readheapstart = (tptr->Fptr)->datastart + (tptr->Fptr)->heapstart; + writeheapstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; + + t1heapsize = (fptr->Fptr)->heapsize; /* save original heap size */ + (fptr->Fptr)->heapsize = 0; /* reset heap to zero */ + + /* loop over all cols */ + for (jj = 1; jj <= (fptr->Fptr)->tfield && *status <= 0; jj++) + { + ffgtcl(tptr, jj, &typecode, NULL, NULL, status); + if (typecode > 0) + continue; /* ignore fixed length columns */ + + pixsize = -typecode / 10; + + /* copy heap data, row by row */ + for (ii = 1; ii <= (fptr->Fptr)->numrows; ii++) + { + ffgdesll(tptr, jj, ii, &repeat, &offset, status); + if (typecode == -TBIT) + nbytes = (long) (repeat + 7) / 8; + else + nbytes = (long) repeat * pixsize; + + /* increase size of buffer if necessary to read whole array */ + if (nbytes > buffsize) + { + tbuff = realloc(buffer, nbytes); + + if (tbuff) + { + buffer = tbuff; + buffsize = nbytes; + } + else + *status = MEMORY_ALLOCATION; + } + + /* If this is not the last HDU in the file, then check if */ + /* extending the heap would overwrite the following header. */ + /* If so, then have to insert more blocks. */ + if ( !((fptr->Fptr)->lasthdu) ) + { + endpos = writeheapstart + (fptr->Fptr)->heapsize + nbytes; + + if (endpos > (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1]) + { + /* calc the number of blocks that need to be added */ + nblock = (long) (((endpos - 1 - + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] ) + / 2880) + 1); + + if (ffiblk(fptr, nblock, 1, status) > 0) /* insert blocks */ + { + sprintf(message, + "Failed to extend the size of the variable length heap by %ld blocks.", + nblock); + ffpmsg(message); + } + } + } + + /* read arrray of bytes from temporary copy */ + ffmbyt(tptr, readheapstart + offset, REPORT_EOF, status); + ffgbyt(tptr, nbytes, buffer, status); + + /* write arrray of bytes back to original file */ + ffmbyt(fptr, writeheapstart + (fptr->Fptr)->heapsize, + IGNORE_EOF, status); + ffpbyt(fptr, nbytes, buffer, status); + + /* write descriptor */ + ffpdes(fptr, jj, ii, repeat, + (fptr->Fptr)->heapsize, status); + + (fptr->Fptr)->heapsize += nbytes; /* update heapsize */ + + if (*status > 0) + { + free(buffer); + ffclos(tptr, status); + return(*status); + } + } + } + + free(buffer); + ffclos(tptr, status); + + /* delete any empty blocks at the end of the HDU */ + nblock = (long) (( (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] - + (writeheapstart + (fptr->Fptr)->heapsize) ) / 2880); + + if (nblock > 0) + { + t2heapsize = (fptr->Fptr)->heapsize; /* save new heap size */ + (fptr->Fptr)->heapsize = t1heapsize; /* restore original heap size */ + + ffdblk(fptr, nblock, status); + (fptr->Fptr)->heapsize = t2heapsize; /* reset correct heap size */ + } + + /* update the PCOUNT value (size of heap) */ + ffgkyjj(fptr, "PCOUNT", &pcount, comm, status); + if ((fptr->Fptr)->heapsize != pcount) + { + ffmkyj(fptr, "PCOUNT", (fptr->Fptr)->heapsize, comm, status); + } + ffrdef(fptr, status); /* rescan new HDU structure */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgdes(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG rownum, /* I - row number (1 = 1st row of table) */ + long *length, /* O - number of elements in the row */ + long *heapaddr, /* O - heap pointer to the data */ + int *status) /* IO - error status */ +/* + get (read) the variable length vector descriptor from the table. +*/ +{ + LONGLONG lengthjj, heapaddrjj; + + if (ffgdesll(fptr, colnum, rownum, &lengthjj, &heapaddrjj, status) > 0) + return(*status); + + /* convert the temporary 8-byte values to 4-byte values */ + /* check for overflow */ + if (length) { + if (lengthjj > LONG_MAX) + *status = NUM_OVERFLOW; + else + *length = (long) lengthjj; + } + + if (heapaddr) { + if (heapaddrjj > LONG_MAX) + *status = NUM_OVERFLOW; + else + *heapaddr = (long) heapaddrjj; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgdesll(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG rownum, /* I - row number (1 = 1st row of table) */ + LONGLONG *length, /* O - number of elements in the row */ + LONGLONG *heapaddr, /* O - heap pointer to the data */ + int *status) /* IO - error status */ +/* + get (read) the variable length vector descriptor from the binary table. + This is similar to ffgdes, except it supports the full 8-byte range of the + length and offset values in 'Q' columns, as well as 'P' columns. +*/ +{ + LONGLONG bytepos; + unsigned int descript4[2] = {0,0}; + LONGLONG descript8[2] = {0,0}; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* offset to the correct column */ + + if (colptr->tdatatype >= 0) { + *status = NOT_VARI_LEN; + return(*status); + } + + bytepos = (fptr->Fptr)->datastart + + ((fptr->Fptr)->rowlength * (rownum - 1)) + + colptr->tbcol; + + if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') + { + /* read 4-byte descriptor */ + if (ffgi4b(fptr, bytepos, 2, 4, (INT32BIT *) descript4, status) <= 0) + { + if (length) + *length = (LONGLONG) descript4[0]; /* 1st word is the length */ + if (heapaddr) + *heapaddr = (LONGLONG) descript4[1]; /* 2nd word is the address */ + } + + } + else /* this is for 'Q' columns */ + { + /* read 8 byte descriptor */ + if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) + { + if (length) + *length = descript8[0]; /* 1st word is the length */ + if (heapaddr) + *heapaddr = descript8[1]; /* 2nd word is the address */ + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgdess(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ + LONGLONG nrows, /* I - number or rows to read */ + long *length, /* O - number of elements in the row */ + long *heapaddr, /* O - heap pointer to the data */ + int *status) /* IO - error status */ +/* + get (read) a range of variable length vector descriptors from the table. +*/ +{ + LONGLONG rowsize, bytepos; + long ii; + INT32BIT descript4[2] = {0,0}; + LONGLONG descript8[2] = {0,0}; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* offset to the correct column */ + + if (colptr->tdatatype >= 0) { + *status = NOT_VARI_LEN; + return(*status); + } + + rowsize = (fptr->Fptr)->rowlength; + bytepos = (fptr->Fptr)->datastart + + (rowsize * (firstrow - 1)) + + colptr->tbcol; + + if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') + { + /* read 4-byte descriptors */ + for (ii = 0; ii < nrows; ii++) + { + /* read descriptors */ + if (ffgi4b(fptr, bytepos, 2, 4, descript4, status) <= 0) + { + if (length) { + *length = (long) descript4[0]; /* 1st word is the length */ + length++; + } + + if (heapaddr) { + *heapaddr = (long) descript4[1]; /* 2nd word is the address */ + heapaddr++; + } + bytepos += rowsize; + } + else + return(*status); + } + } + else /* this is for 'Q' columns */ + { + /* read 8-byte descriptors */ + for (ii = 0; ii < nrows; ii++) + { + /* read descriptors */ + if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) + { + if (length) { + if (descript8[0] > LONG_MAX)*status = NUM_OVERFLOW; + *length = (long) descript8[0]; /* 1st word is the length */ + length++; + } + if (heapaddr) { + if (descript8[1] > LONG_MAX)*status = NUM_OVERFLOW; + *heapaddr = (long) descript8[1]; /* 2nd word is the address */ + heapaddr++; + } + bytepos += rowsize; + } + else + return(*status); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgdessll(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ + LONGLONG nrows, /* I - number or rows to read */ + LONGLONG *length, /* O - number of elements in the row */ + LONGLONG *heapaddr, /* O - heap pointer to the data */ + int *status) /* IO - error status */ +/* + get (read) a range of variable length vector descriptors from the table. +*/ +{ + LONGLONG rowsize, bytepos; + long ii; + unsigned int descript4[2] = {0,0}; + LONGLONG descript8[2] = {0,0}; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* offset to the correct column */ + + if (colptr->tdatatype >= 0) { + *status = NOT_VARI_LEN; + return(*status); + } + + rowsize = (fptr->Fptr)->rowlength; + bytepos = (fptr->Fptr)->datastart + + (rowsize * (firstrow - 1)) + + colptr->tbcol; + + if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') + { + /* read 4-byte descriptors */ + for (ii = 0; ii < nrows; ii++) + { + /* read descriptors */ + if (ffgi4b(fptr, bytepos, 2, 4, (INT32BIT *) descript4, status) <= 0) + { + if (length) { + *length = (LONGLONG) descript4[0]; /* 1st word is the length */ + length++; + } + + if (heapaddr) { + *heapaddr = (LONGLONG) descript4[1]; /* 2nd word is the address */ + heapaddr++; + } + bytepos += rowsize; + } + else + return(*status); + } + } + else /* this is for 'Q' columns */ + { + /* read 8-byte descriptors */ + for (ii = 0; ii < nrows; ii++) + { + /* read descriptors */ + /* cast to type (long *) even though it is actually (LONGLONG *) */ + if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) + { + if (length) { + *length = descript8[0]; /* 1st word is the length */ + length++; + } + + if (heapaddr) { + *heapaddr = descript8[1]; /* 2nd word is the address */ + heapaddr++; + } + bytepos += rowsize; + } + else + return(*status); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpdes(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number (1 = 1st column of table) */ + LONGLONG rownum, /* I - row number (1 = 1st row of table) */ + LONGLONG length, /* I - number of elements in the row */ + LONGLONG heapaddr, /* I - heap pointer to the data */ + int *status) /* IO - error status */ +/* + put (write) the variable length vector descriptor to the table. +*/ +{ + LONGLONG bytepos; + unsigned int descript4[2]; + LONGLONG descript8[2]; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* offset to the correct column */ + + if (colptr->tdatatype >= 0) + *status = NOT_VARI_LEN; + + bytepos = (fptr->Fptr)->datastart + + ((fptr->Fptr)->rowlength * (rownum - 1)) + + colptr->tbcol; + + ffmbyt(fptr, bytepos, IGNORE_EOF, status); /* move to element */ + + if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') + { + if (length > UINT_MAX || length < 0 || + heapaddr > UINT_MAX || heapaddr < 0) { + ffpmsg("P variable length column descriptor is out of range"); + *status = NUM_OVERFLOW; + return(*status); + } + + descript4[0] = (unsigned int) length; /* 1st word is the length */ + descript4[1] = (unsigned int) heapaddr; /* 2nd word is the address */ + + ffpi4b(fptr, 2, 4, (INT32BIT *) descript4, status); /* write the descriptor */ + } + else /* this is a 'Q' descriptor column */ + { + descript8[0] = length; /* 1st word is the length */ + descript8[1] = heapaddr; /* 2nd word is the address */ + + ffpi8b(fptr, 2, 8, (long *) descript8, status); /* write the descriptor */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffchdu(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +{ +/* + close the current HDU. If we have write access to the file, then: + - write the END keyword and pad header with blanks if necessary + - check the data fill values, and rewrite them if not correct +*/ + char message[FLEN_ERRMSG]; + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + /* no need to do any further updating of the HDU */ + } + else if ((fptr->Fptr)->writemode == 1) + { + ffrdef(fptr, status); /* scan header to redefine structure */ + if ((fptr->Fptr)->heapsize > 0) + ffuptf(fptr, status); /* update the variable length TFORM values */ + ffpdfl(fptr, status); /* insure correct data file values */ + } + + if ((fptr->Fptr)->open_count == 1) + { + /* free memory for the CHDU structure only if no other files are using it */ + if ((fptr->Fptr)->tableptr) + { + free((fptr->Fptr)->tableptr); + (fptr->Fptr)->tableptr = NULL; + } + } + + if (*status > 0 && *status != NO_CLOSE_ERROR) + { + sprintf(message, + "Error while closing HDU number %d (ffchdu).", (fptr->Fptr)->curhdu); + ffpmsg(message); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuptf(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Update the value of the TFORM keywords for the variable length array + columns to make sure they all have the form 1Px(len) or Px(len) where + 'len' is the maximum length of the vector in the table (e.g., '1PE(400)') +*/ +{ + int ii; + long tflds; + LONGLONG length, addr, maxlen, naxis2, jj; + char comment[FLEN_COMMENT], keyname[FLEN_KEYWORD]; + char tform[FLEN_VALUE], newform[FLEN_VALUE], lenval[40]; + char card[FLEN_CARD]; + char message[FLEN_ERRMSG]; + + ffgkyj(fptr, "TFIELDS", &tflds, comment, status); + ffgkyjj(fptr, "NAXIS2", &naxis2, comment, status); + + for (ii = 1; ii <= tflds; ii++) /* loop over all the columns */ + { + ffkeyn("TFORM", ii, keyname, status); /* construct name */ + if (ffgkys(fptr, keyname, tform, comment, status) > 0) + { + sprintf(message, + "Error while updating variable length vector TFORMn values (ffuptf)."); + ffpmsg(message); + return(*status); + } + /* is this a variable array length column ? */ + if (tform[0] == 'P' || tform[1] == 'P' || tform[0] == 'Q' || tform[1] == 'Q') + { + if (strlen(tform) < 5) /* is maxlen field missing? */ + { + /* get the max length */ + maxlen = 0; + for (jj=1; jj <= naxis2; jj++) + { + ffgdesll(fptr, ii, jj, &length, &addr, status); + if (length > maxlen) + maxlen = length; + } + + /* construct the new keyword value */ + strcpy(newform, "'"); + strcat(newform, tform); + + /* print as double, because the string-to-64-bit */ + /* conversion is platform dependent (%lld, %ld, %I64d) */ + + sprintf(lenval, "(%.0f)", (double) maxlen); + + strcat(newform,lenval); + while(strlen(newform) < 9) + strcat(newform," "); /* append spaces 'till length = 8 */ + strcat(newform,"'" ); /* append closing parenthesis */ + /* would be simpler to just call ffmkyj here, but this */ + /* would force linking in all the modkey & putkey routines */ + ffmkky(keyname, newform, comment, card, status); /* make new card */ + ffmkey(fptr, card, status); /* replace last read keyword */ + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffrdef(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + ReDEFine the structure of a data unit. This routine re-reads + the CHDU header keywords to determine the structure and length of the + current data unit. This redefines the start of the next HDU. +*/ +{ + int dummy, tstatus = 0; + LONGLONG naxis2; + LONGLONG pcount; + char card[FLEN_CARD], comm[FLEN_COMMENT], valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->writemode == 1) /* write access to the file? */ + { + /* don't need to check NAXIS2 and PCOUNT if data hasn't been written */ + if ((fptr->Fptr)->datastart != DATA_UNDEFINED) + { + /* update NAXIS2 keyword if more rows were written to the table */ + /* and if the user has not explicitly reset the NAXIS2 value */ + if ((fptr->Fptr)->hdutype != IMAGE_HDU) + { + if (ffgkyjj(fptr, "NAXIS2", &naxis2, comm, &tstatus) > 0) + { + /* Couldn't read NAXIS2 (odd!); in certain circumstances */ + /* this may be normal, so ignore the error. */ + naxis2 = (fptr->Fptr)->numrows; + } + + if ((fptr->Fptr)->numrows > naxis2 + && (fptr->Fptr)->origrows == naxis2) + /* if origrows is not equal to naxis2, then the user must */ + /* have manually modified the NAXIS2 keyword value, and */ + /* we will assume that the current value is correct. */ + { + /* would be simpler to just call ffmkyj here, but this */ + /* would force linking in all the modkey & putkey routines */ + + /* print as double because the 64-bit int conversion */ + /* is platform dependent (%lld, %ld, %I64 ) */ + + sprintf(valstring, "%.0f", (double) ((fptr->Fptr)->numrows)); + + ffmkky("NAXIS2", valstring, comm, card, status); + ffmkey(fptr, card, status); + } + } + + /* if data has been written to variable length columns in a */ + /* binary table, then we may need to update the PCOUNT value */ + if ((fptr->Fptr)->heapsize > 0) + { + ffgkyjj(fptr, "PCOUNT", &pcount, comm, status); + if ((fptr->Fptr)->heapsize > pcount) + { + ffmkyj(fptr, "PCOUNT", (fptr->Fptr)->heapsize, comm, status); + } + } + } + + if (ffwend(fptr, status) <= 0) /* rewrite END keyword and fill */ + { + ffrhdu(fptr, &dummy, status); /* re-scan the header keywords */ + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffhdef(fitsfile *fptr, /* I - FITS file pointer */ + int morekeys, /* I - reserve space for this many keywords */ + int *status) /* IO - error status */ +/* + based on the number of keywords which have already been written, + plus the number of keywords to reserve space for, we then can + define where the data unit should start (it must start at the + beginning of a 2880-byte logical block). + + This routine will only have any effect if the starting location of the + data unit following the header is not already defined. In any case, + it is always possible to add more keywords to the header even if the + data has already been written. It is just more efficient to reserve + the space in advance. +*/ +{ + LONGLONG delta; + + if (*status > 0 || morekeys < 1) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + ffrdef(fptr, status); + + /* ffrdef defines the offset to datastart and the start of */ + /* the next HDU based on the number of existing keywords. */ + /* We need to increment both of these values based on */ + /* the number of new keywords to be added. */ + + delta = (((fptr->Fptr)->headend + (morekeys * 80)) / 2880 + 1) + * 2880 - (fptr->Fptr)->datastart; + + (fptr->Fptr)->datastart += delta; + + (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] += delta; + + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffwend(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + write the END card and following fill (space chars) in the current header +*/ +{ + int ii, tstatus; + LONGLONG endpos; + long nspace; + char blankkey[FLEN_CARD], endkey[FLEN_CARD], keyrec[FLEN_CARD]; + + if (*status > 0) + return(*status); + + endpos = (fptr->Fptr)->headend; + + /* we assume that the HDUposition == curhdu in all cases */ + + /* calc the data starting position if not currently defined */ + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + (fptr->Fptr)->datastart = ( endpos / 2880 + 1 ) * 2880; + + /* calculate the number of blank keyword slots in the header */ + nspace = (long) (( (fptr->Fptr)->datastart - endpos ) / 80); + + /* construct a blank and END keyword (80 spaces ) */ + strcpy(blankkey, " "); + strcat(blankkey, " "); + strcpy(endkey, "END "); + strcat(endkey, " "); + + /* check if header is already correctly terminated with END and fill */ + tstatus=0; + ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to header end */ + for (ii=0; ii < nspace; ii++) + { + ffgbyt(fptr, 80, keyrec, &tstatus); /* get next keyword */ + if (strncmp(keyrec, blankkey, 80) && strncmp(keyrec, endkey, 80)) + break; + } + + if (ii == nspace && !tstatus) + { + /* check if the END keyword exists at the correct position */ + endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) ); + ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to END position */ + ffgbyt(fptr, 80, keyrec, &tstatus); /* read the END keyword */ + if ( !strncmp(keyrec, endkey, 80) && !tstatus) + return(*status); /* END card was already correct */ + } + + /* header was not correctly terminated, so write the END and blank fill */ + endpos = (fptr->Fptr)->headend; + ffmbyt(fptr, endpos, IGNORE_EOF, status); /* move to header end */ + for (ii=0; ii < nspace; ii++) + ffpbyt(fptr, 80, blankkey, status); /* write the blank keywords */ + + /* + The END keyword must either be placed immediately after the last + keyword that was written (as indicated by the headend value), or + must be in the first 80 bytes of the 2880-byte FITS record immediately + preceeding the data unit, whichever is further in the file. The + latter will occur if space has been reserved for more header keywords + which have not yet been written. + */ + + endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) ); + ffmbyt(fptr, endpos, REPORT_EOF, status); /* move to END position */ + + ffpbyt(fptr, 80, endkey, status); /* write the END keyword to header */ + + if (*status > 0) + ffpmsg("Error while writing END card (ffwend)."); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpdfl(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Write the Data Unit Fill values if they are not already correct. + The fill values are used to fill out the last 2880 byte block of the HDU. + Fill the data unit with zeros or blanks depending on the type of HDU + from the end of the data to the end of the current FITS 2880 byte block +*/ +{ + char chfill, fill[2880]; + LONGLONG fillstart; + int nfill, tstatus, ii; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + return(*status); /* fill has already been correctly written */ + + if ((fptr->Fptr)->heapstart == 0) + return(*status); /* null data unit, so there is no fill */ + + fillstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize; + + nfill = (long) ((fillstart + 2879) / 2880 * 2880 - fillstart); + + if ((fptr->Fptr)->hdutype == ASCII_TBL) + chfill = 32; /* ASCII tables are filled with spaces */ + else + chfill = 0; /* all other extensions are filled with zeros */ + + tstatus = 0; + + if (!nfill) /* no fill bytes; just check that entire table exists */ + { + fillstart--; + nfill = 1; + ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to last byte */ + ffgbyt(fptr, nfill, fill, &tstatus); /* get the last byte */ + + if (tstatus == 0) + return(*status); /* no EOF error, so everything is OK */ + } + else + { + ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to fill area */ + ffgbyt(fptr, nfill, fill, &tstatus); /* get the fill bytes */ + + if (tstatus == 0) + { + for (ii = 0; ii < nfill; ii++) + { + if (fill[ii] != chfill) + break; + } + + if (ii == nfill) + return(*status); /* all the fill values were correct */ + } + } + + /* fill values are incorrect or have not been written, so write them */ + + memset(fill, chfill, nfill); /* fill the buffer with the fill value */ + + ffmbyt(fptr, fillstart, IGNORE_EOF, status); /* move to fill area */ + ffpbyt(fptr, nfill, fill, status); /* write the fill bytes */ + + if (*status > 0) + ffpmsg("Error writing Data Unit fill bytes (ffpdfl)."); + + return(*status); +} +/********************************************************************** + ffchfl : Check Header Fill values + + Check that the header unit is correctly filled with blanks from + the END card to the end of the current FITS 2880-byte block + + Function parameters: + fptr Fits file pointer + status output error status + + Translated ftchfl into C by Peter Wilson, Oct. 1997 +**********************************************************************/ +int ffchfl( fitsfile *fptr, int *status) +{ + int nblank,i,gotend; + LONGLONG endpos; + char rec[FLEN_CARD]; + char *blanks=" "; /* 80 spaces */ + + if( *status > 0 ) return (*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* calculate the number of blank keyword slots in the header */ + + endpos=(fptr->Fptr)->headend; + nblank=(long) (((fptr->Fptr)->datastart-endpos)/80); + + /* move the i/o pointer to the end of the header keywords */ + + ffmbyt(fptr,endpos,TRUE,status); + + /* find the END card (there may be blank keywords perceeding it) */ + + gotend=FALSE; + for(i=0;i 0 ) { + rec[FLEN_CARD - 1] = '\0'; /* make sure string is null terminated */ + ffpmsg(rec); + return( *status ); + } + } + return( *status ); +} + +/********************************************************************** + ffcdfl : Check Data Unit Fill values + + Check that the data unit is correctly filled with zeros or + blanks from the end of the data to the end of the current + FITS 2880 byte block + + Function parameters: + fptr Fits file pointer + status output error status + + Translated ftcdfl into C by Peter Wilson, Oct. 1997 +**********************************************************************/ +int ffcdfl( fitsfile *fptr, int *status) +{ + int nfill,i; + LONGLONG filpos; + char chfill,chbuff[2880]; + + if( *status > 0 ) return( *status ); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* check if the data unit is null */ + if( (fptr->Fptr)->heapstart==0 ) return( *status ); + + /* calculate starting position of the fill bytes, if any */ + filpos = (fptr->Fptr)->datastart + + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize; + + /* calculate the number of fill bytes */ + nfill = (long) ((filpos + 2879) / 2880 * 2880 - filpos); + if( nfill == 0 ) return( *status ); + + /* move to the beginning of the fill bytes */ + ffmbyt(fptr, filpos, FALSE, status); + + if( ffgbyt(fptr, nfill, chbuff, status) > 0) + { + ffpmsg("Error reading data unit fill bytes (ffcdfl)."); + return( *status ); + } + + if( (fptr->Fptr)->hdutype==ASCII_TBL ) + chfill = 32; /* ASCII tables are filled with spaces */ + else + chfill = 0; /* all other extensions are filled with zeros */ + + /* check for all zeros or blanks */ + + for(i=0;iFptr)->hdutype==ASCII_TBL ) + ffpmsg("Warning: remaining bytes following ASCII table data are not filled with blanks."); + else + ffpmsg("Warning: remaining bytes following data are not filled with zeros."); + return( *status ); + } + } + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int ffcrhd(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + CReate Header Data unit: Create, initialize, and move the i/o pointer + to a new extension appended to the end of the FITS file. +*/ +{ + int tstatus = 0; + LONGLONG bytepos, *ptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* If the current header is empty, we don't have to do anything */ + if ((fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + return(*status); + + while (ffmrhd(fptr, 1, 0, &tstatus) == 0); /* move to end of file */ + + if ((fptr->Fptr)->maxhdu == (fptr->Fptr)->MAXHDU) + { + /* allocate more space for the headstart array */ + ptr = (LONGLONG*) realloc( (fptr->Fptr)->headstart, + ((fptr->Fptr)->MAXHDU + 1001) * sizeof(LONGLONG) ); + + if (ptr == NULL) + return (*status = MEMORY_ALLOCATION); + else { + (fptr->Fptr)->MAXHDU = (fptr->Fptr)->MAXHDU + 1000; + (fptr->Fptr)->headstart = ptr; + } + } + + if (ffchdu(fptr, status) <= 0) /* close the current HDU */ + { + bytepos = (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1]; /* last */ + ffmbyt(fptr, bytepos, IGNORE_EOF, status); /* move file ptr to it */ + (fptr->Fptr)->maxhdu++; /* increment the known number of HDUs */ + (fptr->Fptr)->curhdu = (fptr->Fptr)->maxhdu; /* set current HDU loc */ + fptr->HDUposition = (fptr->Fptr)->maxhdu; /* set current HDU loc */ + (fptr->Fptr)->nextkey = bytepos; /* next keyword = start of header */ + (fptr->Fptr)->headend = bytepos; /* end of header */ + (fptr->Fptr)->datastart = DATA_UNDEFINED; /* start data unit undefined */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdblk(fitsfile *fptr, /* I - FITS file pointer */ + long nblocks, /* I - number of 2880-byte blocks to delete */ + int *status) /* IO - error status */ +/* + Delete the specified number of 2880-byte blocks from the end + of the CHDU by shifting all following extensions up this + number of blocks. +*/ +{ + char buffer[2880]; + int tstatus, ii; + LONGLONG readpos, writepos; + + if (*status > 0 || nblocks <= 0) + return(*status); + + tstatus = 0; + /* pointers to the read and write positions */ + + readpos = (fptr->Fptr)->datastart + + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize; + readpos = ((readpos + 2879) / 2880) * 2880; /* start of block */ + +/* the following formula is wrong because the current data unit + may have been extended without updating the headstart value + of the following HDU. + + readpos = (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; +*/ + writepos = readpos - ((LONGLONG)nblocks * 2880); + + while ( !ffmbyt(fptr, readpos, REPORT_EOF, &tstatus) && + !ffgbyt(fptr, 2880L, buffer, &tstatus) ) + { + ffmbyt(fptr, writepos, REPORT_EOF, status); + ffpbyt(fptr, 2880L, buffer, status); + + if (*status > 0) + { + ffpmsg("Error deleting FITS blocks (ffdblk)"); + return(*status); + } + readpos += 2880; /* increment to next block to transfer */ + writepos += 2880; + } + + /* now fill the last nblock blocks with zeros */ + memset(buffer, 0, 2880); + ffmbyt(fptr, writepos, REPORT_EOF, status); + + for (ii = 0; ii < nblocks; ii++) + ffpbyt(fptr, 2880L, buffer, status); + + /* move back before the deleted blocks, since they may be deleted */ + /* and we do not want to delete the current active buffer */ + ffmbyt(fptr, writepos - 1, REPORT_EOF, status); + + /* truncate the file to the new size, if supported on this device */ + fftrun(fptr, writepos, status); + + /* recalculate the starting location of all subsequent HDUs */ + for (ii = (fptr->Fptr)->curhdu; ii <= (fptr->Fptr)->maxhdu; ii++) + (fptr->Fptr)->headstart[ii + 1] -= ((LONGLONG)nblocks * 2880); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghdt(fitsfile *fptr, /* I - FITS file pointer */ + int *exttype, /* O - type of extension, 0, 1, or 2 */ + /* for IMAGE_HDU, ASCII_TBL, or BINARY_TBL */ + int *status) /* IO - error status */ +/* + Return the type of the CHDU. This returns the 'logical' type of the HDU, + not necessarily the physical type, so in the case of a compressed image + stored in a binary table, this will return the type as an Image, not a + binary table. +*/ +{ + if (*status > 0) + return(*status); + + if (fptr->HDUposition == 0 && (fptr->Fptr)->headend == 0) { + /* empty primary array is alway an IMAGE_HDU */ + *exttype = IMAGE_HDU; + } + else { + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + /* rescan header if data structure is undefined */ + if ( ffrdef(fptr, status) > 0) + return(*status); + } + + *exttype = (fptr->Fptr)->hdutype; /* return the type of HDU */ + + /* check if this is a compressed image */ + if ((fptr->Fptr)->compressimg) + *exttype = IMAGE_HDU; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_is_compressed_image(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Returns TRUE if the CHDU is a compressed image, else returns zero. +*/ +{ + if (*status > 0) + return(0); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + /* rescan header if data structure is undefined */ + if ( ffrdef(fptr, status) > 0) + return(*status); + } + + /* check if this is a compressed image */ + if ((fptr->Fptr)->compressimg) + return(1); + + return(0); +} +/*--------------------------------------------------------------------------*/ +int ffgipr(fitsfile *infptr, /* I - FITS file pointer */ + int maxaxis, /* I - max number of axes to return */ + int *bitpix, /* O - image data type */ + int *naxis, /* O - image dimension (NAXIS value) */ + long *naxes, /* O - size of image dimensions */ + int *status) /* IO - error status */ + +/* + get the datatype and size of the input image +*/ +{ + + if (*status > 0) + return(*status); + + /* don't return the parameter if a null pointer was given */ + + if (bitpix) + fits_get_img_type(infptr, bitpix, status); /* get BITPIX value */ + + if (naxis) + fits_get_img_dim(infptr, naxis, status); /* get NAXIS value */ + + if (naxes) + fits_get_img_size(infptr, maxaxis, naxes, status); /* get NAXISn values */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgiprll(fitsfile *infptr, /* I - FITS file pointer */ + int maxaxis, /* I - max number of axes to return */ + int *bitpix, /* O - image data type */ + int *naxis, /* O - image dimension (NAXIS value) */ + LONGLONG *naxes, /* O - size of image dimensions */ + int *status) /* IO - error status */ + +/* + get the datatype and size of the input image +*/ +{ + + if (*status > 0) + return(*status); + + /* don't return the parameter if a null pointer was given */ + + if (bitpix) + fits_get_img_type(infptr, bitpix, status); /* get BITPIX value */ + + if (naxis) + fits_get_img_dim(infptr, naxis, status); /* get NAXIS value */ + + if (naxes) + fits_get_img_sizell(infptr, maxaxis, naxes, status); /* get NAXISn values */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgidt( fitsfile *fptr, /* I - FITS file pointer */ + int *imgtype, /* O - image data type */ + int *status) /* IO - error status */ +/* + Get the datatype of the image (= BITPIX keyword for normal image, or + ZBITPIX for a compressed image) +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffgky(fptr, TINT, "BITPIX", imgtype, NULL, status); + } + else if ((fptr->Fptr)->compressimg) + { + /* this is a binary table containing a compressed image */ + ffgky(fptr, TINT, "ZBITPIX", imgtype, NULL, status); + } + else + { + *status = NOT_IMAGE; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgiet( fitsfile *fptr, /* I - FITS file pointer */ + int *imgtype, /* O - image data type */ + int *status) /* IO - error status */ +/* + Get the effective datatype of the image (= BITPIX keyword for normal image, + or ZBITPIX for a compressed image) +*/ +{ + int tstatus; + long lngscale = 1, lngzero = 0; + double bscale, bzero, min_val, max_val; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffgky(fptr, TINT, "BITPIX", imgtype, NULL, status); + tstatus = 0; + ffgky(fptr, TDOUBLE, "BSCALE", &bscale, NULL, &tstatus); + if (tstatus) + bscale = 1.0; + + tstatus = 0; + ffgky(fptr, TDOUBLE, "BZERO", &bzero, NULL, &tstatus); + if (tstatus) + bzero = 0.0; + + } + else if ((fptr->Fptr)->compressimg) + { + /* this is a binary table containing a compressed image */ + ffgky(fptr, TINT, "ZBITPIX", imgtype, NULL, status); + } + else + { + *status = NOT_IMAGE; + return(*status); + + } + + /* check if the BSCALE and BZERO keywords are defined, which might + change the effective datatype of the image */ + tstatus = 0; + ffgky(fptr, TDOUBLE, "BSCALE", &bscale, NULL, &tstatus); + if (tstatus) + bscale = 1.0; + + tstatus = 0; + ffgky(fptr, TDOUBLE, "BZERO", &bzero, NULL, &tstatus); + if (tstatus) + bzero = 0.0; + + if (bscale == 1.0 && bzero == 0.0) /* no scaling */ + return(*status); + + switch (*imgtype) + { + case BYTE_IMG: /* 8-bit image */ + min_val = 0.; + max_val = 255.0; + break; + + case SHORT_IMG: + min_val = -32768.0; + max_val = 32767.0; + break; + + case LONG_IMG: + + min_val = -2147483648.0; + max_val = 2147483647.0; + break; + + default: /* don't have to deal with other data types */ + return(*status); + } + + if (bscale >= 0.) { + min_val = bzero + bscale * min_val; + max_val = bzero + bscale * max_val; + } else { + max_val = bzero + bscale * min_val; + min_val = bzero + bscale * max_val; + } + if (bzero < 2147483648.) /* don't exceed range of 32-bit integer */ + lngzero = (long) bzero; + lngscale = (long) bscale; + + if ((bzero != 2147483648.) && /* special value that exceeds integer range */ + (lngzero != bzero || lngscale != bscale)) { /* not integers? */ + /* floating point scaled values; just decide on required precision */ + if (*imgtype == BYTE_IMG || *imgtype == SHORT_IMG) + *imgtype = FLOAT_IMG; + else + *imgtype = DOUBLE_IMG; + + /* + In all the remaining cases, BSCALE and BZERO are integers, + and not equal to 1 and 0, respectively. + */ + + } else if ((min_val == -128.) && (max_val == 127.)) { + *imgtype = SBYTE_IMG; + + } else if ((min_val >= -32768.0) && (max_val <= 32767.0)) { + *imgtype = SHORT_IMG; + + } else if ((min_val >= 0.0) && (max_val <= 65535.0)) { + *imgtype = USHORT_IMG; + + } else if ((min_val >= -2147483648.0) && (max_val <= 2147483647.0)) { + *imgtype = LONG_IMG; + + } else if ((min_val >= 0.0) && (max_val < 4294967296.0)) { + *imgtype = ULONG_IMG; + + } else { /* exceeds the range of a 32-bit integer */ + *imgtype = DOUBLE_IMG; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgidm( fitsfile *fptr, /* I - FITS file pointer */ + int *naxis , /* O - image dimension (NAXIS value) */ + int *status) /* IO - error status */ +/* + Get the dimension of the image (= NAXIS keyword for normal image, or + ZNAXIS for a compressed image) +*/ +{ + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + ffgky(fptr, TINT, "NAXIS", naxis, NULL, status); + } + else if ((fptr->Fptr)->compressimg) + { + /* this is a binary table containing a compressed image */ + ffgky(fptr, TINT, "ZNAXIS", naxis, NULL, status); + } + else + { + *status = NOT_IMAGE; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgisz( fitsfile *fptr, /* I - FITS file pointer */ + int nlen, /* I - number of axes to return */ + long *naxes, /* O - size of image dimensions */ + int *status) /* IO - error status */ +/* + Get the size of the image dimensions (= NAXISn keywords for normal image, or + ZNAXISn for a compressed image) +*/ +{ + int ii, naxis; + char keyroot[FLEN_KEYWORD], keyname[FLEN_KEYWORD]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + strcpy(keyroot, "NAXIS"); + } + else if ((fptr->Fptr)->compressimg) + { + /* this is a binary table containing a compressed image */ + strcpy(keyroot, "ZNAXIS"); + } + else + { + return(*status = NOT_IMAGE); + } + + /* initialize to 1 */ + for (ii = 0; ii < nlen; ii++) + naxes[ii] = 1; + + /* get number of dimensions */ + fits_get_img_dim(fptr, &naxis, status); + naxis = minvalue(naxis, nlen); + + for (ii = 0; ii < naxis; ii++) + { + ffkeyn(keyroot, ii + 1, keyname, status); + ffgkyj(fptr, keyname, naxes + ii, NULL, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgiszll( fitsfile *fptr, /* I - FITS file pointer */ + int nlen, /* I - number of axes to return */ + LONGLONG *naxes, /* O - size of image dimensions */ + int *status) /* IO - error status */ +/* + Get the size of the image dimensions (= NAXISn keywords for normal image, or + ZNAXISn for a compressed image) +*/ +{ + int ii, naxis; + char keyroot[FLEN_KEYWORD], keyname[FLEN_KEYWORD]; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ((fptr->Fptr)->hdutype == IMAGE_HDU) + { + strcpy(keyroot, "NAXIS"); + } + else if ((fptr->Fptr)->compressimg) + { + /* this is a binary table containing a compressed image */ + strcpy(keyroot, "ZNAXIS"); + } + else + { + return(*status = NOT_IMAGE); + } + + /* initialize to 1 */ + for (ii = 0; ii < nlen; ii++) + naxes[ii] = 1; + + /* get number of dimensions */ + fits_get_img_dim(fptr, &naxis, status); + naxis = minvalue(naxis, nlen); + + for (ii = 0; ii < naxis; ii++) + { + ffkeyn(keyroot, ii + 1, keyname, status); + ffgkyjj(fptr, keyname, naxes + ii, NULL, status); + } + + return(*status); +}/*--------------------------------------------------------------------------*/ +int ffmahd(fitsfile *fptr, /* I - FITS file pointer */ + int hdunum, /* I - number of the HDU to move to */ + int *exttype, /* O - type of extension, 0, 1, or 2 */ + int *status) /* IO - error status */ +/* + Move to Absolute Header Data unit. Move to the specified HDU + and read the header to initialize the table structure. Note that extnum + is one based, so the primary array is extnum = 1. +*/ +{ + int moveto, tstatus; + char message[FLEN_ERRMSG]; + LONGLONG *ptr; + + if (*status > 0) + return(*status); + else if (hdunum < 1 ) + return(*status = BAD_HDU_NUM); + else if (hdunum >= (fptr->Fptr)->MAXHDU ) + { + /* allocate more space for the headstart array */ + ptr = (LONGLONG*) realloc( (fptr->Fptr)->headstart, + (hdunum + 1001) * sizeof(LONGLONG) ); + + if (ptr == NULL) + return (*status = MEMORY_ALLOCATION); + else { + (fptr->Fptr)->MAXHDU = hdunum + 1000; + (fptr->Fptr)->headstart = ptr; + } + } + + /* set logical HDU position to the actual position, in case they differ */ + fptr->HDUposition = (fptr->Fptr)->curhdu; + + while( ((fptr->Fptr)->curhdu) + 1 != hdunum) /* at the correct HDU? */ + { + /* move directly to the extension if we know that it exists, + otherwise move to the highest known extension. */ + + moveto = minvalue(hdunum - 1, ((fptr->Fptr)->maxhdu) + 1); + + /* test if HDU exists */ + if ((fptr->Fptr)->headstart[moveto] < (fptr->Fptr)->logfilesize ) + { + if (ffchdu(fptr, status) <= 0) /* close out the current HDU */ + { + if (ffgext(fptr, moveto, exttype, status) > 0) + { /* failed to get the requested extension */ + + tstatus = 0; + ffrhdu(fptr, exttype, &tstatus); /* restore the CHDU */ + } + } + } + else + *status = END_OF_FILE; + + if (*status > 0) + { + if (*status != END_OF_FILE) + { + /* don't clutter up the message stack in the common case of */ + /* simply hitting the end of file (often an expected error) */ + + sprintf(message, + "Failed to move to HDU number %d (ffmahd).", hdunum); + ffpmsg(message); + } + return(*status); + } + } + + /* return the type of HDU; tile compressed images which are stored */ + /* in a binary table will return exttype = IMAGE_HDU, not BINARY_TBL */ + if (exttype != NULL) + ffghdt(fptr, exttype, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmrhd(fitsfile *fptr, /* I - FITS file pointer */ + int hdumov, /* I - rel. no. of HDUs to move by (+ or -) */ + int *exttype, /* O - type of extension, 0, 1, or 2 */ + int *status) /* IO - error status */ +/* + Move a Relative number of Header Data units. Offset to the specified + extension and read the header to initialize the HDU structure. +*/ +{ + int extnum; + + if (*status > 0) + return(*status); + + extnum = fptr->HDUposition + 1 + hdumov; /* the absolute HDU number */ + ffmahd(fptr, extnum, exttype, status); /* move to the HDU */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmnhd(fitsfile *fptr, /* I - FITS file pointer */ + int exttype, /* I - desired extension type */ + char *hduname, /* I - desired EXTNAME value for the HDU */ + int hduver, /* I - desired EXTVERS value for the HDU */ + int *status) /* IO - error status */ +/* + Move to the next HDU with a given extension type (IMAGE_HDU, ASCII_TBL, + BINARY_TBL, or ANY_HDU), extension name (EXTNAME or HDUNAME keyword), + and EXTVERS keyword values. If hduvers = 0, then move to the first HDU + with the given type and name regardless of EXTVERS value. If no matching + HDU is found in the file, then the current open HDU will remain unchanged. +*/ +{ + char extname[FLEN_VALUE]; + int ii, hdutype, alttype, extnum, tstatus, match, exact; + long extver; + + if (*status > 0) + return(*status); + + extnum = fptr->HDUposition + 1; /* save the current HDU number */ + + for (ii=1; 1; ii++) /* loop until EOF */ + { + tstatus = 0; + if (ffmahd(fptr, ii, &hdutype, &tstatus)) /* move to next HDU */ + { + ffmahd(fptr, extnum, 0, status); /* restore file position */ + return(*status = BAD_HDU_NUM); /* couldn't find desired HDU */ + } + + alttype = -1; + if (fits_is_compressed_image(fptr, status)) + alttype = BINARY_TBL; + + /* matching type? */ + if (exttype == ANY_HDU || hdutype == exttype || hdutype == alttype) + { + if (ffgkys(fptr, "EXTNAME", extname, 0, &tstatus) > 0) /* name */ + { + tstatus = 0; + /* look for HDUNAME, since EXTNAME didn't exist */ + ffgkys(fptr, "HDUNAME", extname, 0, &tstatus); + } + else + { + /* check if EXTNAME is the name we are looking for. */ + /* If not, try reading the HDUNAME keyword. */ + ffcmps(extname, hduname, CASEINSEN, &match, &exact); + if (!exact) + ffgkys(fptr, "HDUNAME", extname, 0, &tstatus); + } + + if (tstatus <= 0) + { + ffcmps(extname, hduname, CASEINSEN, &match, &exact); + if (exact) /* names match? */ + { + if (hduver) /* need to check if version numbers match? */ + { + if (ffgkyj(fptr, "EXTVER", &extver, 0, &tstatus) > 0) + extver = 1; /* assume default EXTVER value */ + + if ( (int) extver == hduver) + { + return(*status); /* found matching name and vers */ + } + } + else + { + return(*status); /* found matching name */ + } + } + } + } + } +} +/*--------------------------------------------------------------------------*/ +int ffthdu(fitsfile *fptr, /* I - FITS file pointer */ + int *nhdu, /* O - number of HDUs in the file */ + int *status) /* IO - error status */ +/* + Return the number of HDUs that currently exist in the file. +*/ +{ + int ii, extnum, tstatus; + + if (*status > 0) + return(*status); + + extnum = fptr->HDUposition + 1; /* save the current HDU number */ + *nhdu = extnum - 1; + + /* if the CHDU is empty or not completely defined, just return */ + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + return(*status); + + tstatus = 0; + + /* loop until EOF */ + for (ii=extnum; ffmahd(fptr, ii, 0, &tstatus) <= 0; ii++) + { + *nhdu = ii; + } + + ffmahd(fptr, extnum, 0, status); /* restore orig file position */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgext(fitsfile *fptr, /* I - FITS file pointer */ + int hdunum, /* I - no. of HDU to move get (0 based) */ + int *exttype, /* O - type of extension, 0, 1, or 2 */ + int *status) /* IO - error status */ +/* + Get Extension. Move to the specified extension and initialize the + HDU structure. +*/ +{ + int xcurhdu, xmaxhdu; + LONGLONG xheadend; + + if (*status > 0) + return(*status); + + if (ffmbyt(fptr, (fptr->Fptr)->headstart[hdunum], REPORT_EOF, status) <= 0) + { + /* temporarily save current values, in case of error */ + xcurhdu = (fptr->Fptr)->curhdu; + xmaxhdu = (fptr->Fptr)->maxhdu; + xheadend = (fptr->Fptr)->headend; + + /* set new parameter values */ + (fptr->Fptr)->curhdu = hdunum; + fptr->HDUposition = hdunum; + (fptr->Fptr)->maxhdu = maxvalue((fptr->Fptr)->maxhdu, hdunum); + (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ + + if (ffrhdu(fptr, exttype, status) > 0) + { /* failed to get the new HDU, so restore previous values */ + (fptr->Fptr)->curhdu = xcurhdu; + fptr->HDUposition = xcurhdu; + (fptr->Fptr)->maxhdu = xmaxhdu; + (fptr->Fptr)->headend = xheadend; + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffiblk(fitsfile *fptr, /* I - FITS file pointer */ + long nblock, /* I - no. of blocks to insert */ + int headdata, /* I - insert where? 0=header, 1=data */ + /* -1=beginning of file */ + int *status) /* IO - error status */ +/* + insert 2880-byte blocks at the end of the current header or data unit +*/ +{ + int tstatus, savehdu, typhdu; + LONGLONG insertpt, jpoint; + long ii, nshift; + char charfill; + char buff1[2880], buff2[2880]; + char *inbuff, *outbuff, *tmpbuff; + char card[FLEN_CARD]; + + if (*status > 0 || nblock <= 0) + return(*status); + + tstatus = *status; + + if (headdata == 0 || (fptr->Fptr)->hdutype == ASCII_TBL) + charfill = 32; /* headers and ASCII tables have space (32) fill */ + else + charfill = 0; /* images and binary tables have zero fill */ + + if (headdata == 0) + insertpt = (fptr->Fptr)->datastart; /* insert just before data, or */ + else if (headdata == -1) + { + insertpt = 0; + strcpy(card, "XTENSION= 'IMAGE ' / IMAGE extension"); + } + else /* at end of data, */ + { + insertpt = (fptr->Fptr)->datastart + + (fptr->Fptr)->heapstart + + (fptr->Fptr)->heapsize; + insertpt = ((insertpt + 2879) / 2880) * 2880; /* start of block */ + + /* the following formula is wrong because the current data unit + may have been extended without updating the headstart value + of the following HDU. + */ + /* insertpt = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1]; */ + } + + inbuff = buff1; /* set pointers to input and output buffers */ + outbuff = buff2; + + memset(outbuff, charfill, 2880); /* initialize buffer with fill */ + + if (nblock == 1) /* insert one block */ + { + if (headdata == -1) + ffmrec(fptr, 1, card, status); /* change SIMPLE -> XTENSION */ + + ffmbyt(fptr, insertpt, REPORT_EOF, status); /* move to 1st point */ + ffgbyt(fptr, 2880, inbuff, status); /* read first block of bytes */ + + while (*status <= 0) + { + ffmbyt(fptr, insertpt, REPORT_EOF, status); /* insert point */ + ffpbyt(fptr, 2880, outbuff, status); /* write the output buffer */ + + if (*status > 0) + return(*status); + + tmpbuff = inbuff; /* swap input and output pointers */ + inbuff = outbuff; + outbuff = tmpbuff; + insertpt += 2880; /* increment insert point by 1 block */ + + ffmbyt(fptr, insertpt, REPORT_EOF, status); /* move to next block */ + ffgbyt(fptr, 2880, inbuff, status); /* read block of bytes */ + } + + *status = tstatus; /* reset status value */ + ffmbyt(fptr, insertpt, IGNORE_EOF, status); /* move back to insert pt */ + ffpbyt(fptr, 2880, outbuff, status); /* write the final block */ + } + + else /* inserting more than 1 block */ + + { + savehdu = (fptr->Fptr)->curhdu; /* save the current HDU number */ + tstatus = *status; + while(*status <= 0) /* find the last HDU in file */ + ffmrhd(fptr, 1, &typhdu, status); + + if (*status == END_OF_FILE) + { + *status = tstatus; + } + + ffmahd(fptr, savehdu + 1, &typhdu, status); /* move back to CHDU */ + if (headdata == -1) + ffmrec(fptr, 1, card, status); /* NOW change SIMPLE -> XTENSION */ + + /* number of 2880-byte blocks that have to be shifted down */ + nshift = (long) (((fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] - insertpt) + / 2880); + /* position of last block in file to be shifted */ + jpoint = (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] - 2880; + + /* move all the blocks starting at end of file working backwards */ + for (ii = 0; ii < nshift; ii++) + { + /* move to the read start position */ + if (ffmbyt(fptr, jpoint, REPORT_EOF, status) > 0) + return(*status); + + ffgbyt(fptr, 2880, inbuff,status); /* read one record */ + + /* move forward to the write postion */ + ffmbyt(fptr, jpoint + (nblock * 2880), IGNORE_EOF, status); + + ffpbyt(fptr, 2880, inbuff, status); /* write the record */ + + jpoint -= 2880; + } + + /* move back to the write start postion (might be EOF) */ + ffmbyt(fptr, insertpt, IGNORE_EOF, status); + + for (ii = 0; ii < nblock; ii++) /* insert correct fill value */ + ffpbyt(fptr, 2880, outbuff, status); + } + + if (headdata == 0) /* update data start address */ + (fptr->Fptr)->datastart += ((LONGLONG)nblock * 2880); + + /* update following HDU addresses */ + for (ii = (fptr->Fptr)->curhdu; ii <= (fptr->Fptr)->maxhdu; ii++) + (fptr->Fptr)->headstart[ii + 1] += ((LONGLONG)nblock * 2880); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkcl(char *tcard) + +/* + Return the type classification of the input header record + + TYP_STRUC_KEY: SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, + GROUPS, PCOUNT, GCOUNT, END + XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, + and the first 4 COMMENT keywords in the primary array + that define the FITS format. + + TYP_CMPRS_KEY: + The experimental keywords used in the compressed image format + ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, ZTILEn, + ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK, + EXTNAME = 'COMPRESSED_IMAGE' + ZSIMPLE, ZTENSION, ZEXTEND, ZBLOCKED, ZPCOUNT, ZGCOUNT + + TYP_SCAL_KEY: BSCALE, BZERO, TSCALn, TZEROn + + TYP_NULL_KEY: BLANK, TNULLn + + TYP_DIM_KEY: TDIMn + + TYP_RANG_KEY: TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX + + TYP_UNIT_KEY: BUNIT, TUNITn + + TYP_DISP_KEY: TDISPn + + TYP_HDUID_KEY: EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL + + TYP_CKSUM_KEY CHECKSUM, DATASUM + + TYP_WCS_KEY: + Primary array: + WCAXES, CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn + CDj_is, PVj_ms, LONPOLEs, LATPOLEs + + Pixel list: + TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, TCRPks, + TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn + + Bintable vector: + jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, iCRPns, + jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn + + TYP_REFSYS_KEY: + EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs + + TYP_COMM_KEY: COMMENT, HISTORY, (blank keyword) + + TYP_CONT_KEY: CONTINUE + + TYP_USER_KEY: all other keywords + +*/ +{ + char card[20], *card1, *card5; + + card[0] = '\0'; + strncat(card, tcard, 8); /* copy the keyword name */ + strcat(card, " "); /* append blanks to make at least 8 chars long */ + ffupch(card); /* make sure it is in upper case */ + + card1 = card + 1; /* pointer to 2nd character */ + card5 = card + 5; /* pointer to 6th character */ + + /* the strncmp function is slow, so try to be more efficient */ + if (*card == 'Z') + { + if (FSTRNCMP (card1, "IMAGE ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "CMPTYPE", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "NAME", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_CMPRS_KEY); + } + else if (FSTRNCMP (card1, "VAL", 3) == 0) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_CMPRS_KEY); + } + else if (FSTRNCMP (card1, "TILE", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_CMPRS_KEY); + } + else if (FSTRNCMP (card1, "BITPIX ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "NAXIS", 5) == 0) + { + if ( ( *(card + 6) >= '0' && *(card + 6) <= '9' ) + || (*(card + 6) == ' ') ) + return (TYP_CMPRS_KEY); + } + else if (FSTRNCMP (card1, "SCALE ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "ZERO ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "BLANK ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "SIMPLE ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "TENSION", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "EXTEND ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "BLOCKED", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "PCOUNT ", 7) == 0) + return (TYP_CMPRS_KEY); + else if (FSTRNCMP (card1, "GCOUNT ", 7) == 0) + return (TYP_CMPRS_KEY); + } + else if (*card == ' ') + { + return (TYP_COMM_KEY); + } + else if (*card == 'B') + { + if (FSTRNCMP (card1, "ITPIX ", 7) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (card1, "LOCKED ", 7) == 0) + return (TYP_STRUC_KEY); + + if (FSTRNCMP (card1, "LANK ", 7) == 0) + return (TYP_NULL_KEY); + + if (FSTRNCMP (card1, "SCALE ", 7) == 0) + return (TYP_SCAL_KEY); + if (FSTRNCMP (card1, "ZERO ", 7) == 0) + return (TYP_SCAL_KEY); + + if (FSTRNCMP (card1, "UNIT ", 7) == 0) + return (TYP_UNIT_KEY); + } + else if (*card == 'C') + { + if (FSTRNCMP (card1, "OMMENT",6) == 0) + { + /* new comment string starting Oct 2001 */ + if (FSTRNCMP (tcard, "COMMENT and Astrophysics', volume 376, page 3", + 47) == 0) + return (TYP_STRUC_KEY); + + /* original COMMENT strings from 1993 - 2001 */ + if (FSTRNCMP (tcard, "COMMENT FITS (Flexible Image Transport System", + 47) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (tcard, "COMMENT Astrophysics Supplement Series v44/p3", + 47) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (tcard, "COMMENT Contact the NASA Science Office of St", + 47) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (tcard, "COMMENT FITS Definition document #100 and oth", + 47) == 0) + return (TYP_STRUC_KEY); + + if (*(card + 7) == ' ') + return (TYP_COMM_KEY); + else + return (TYP_USER_KEY); + } + + if (FSTRNCMP (card1, "HECKSUM", 7) == 0) + return (TYP_CKSUM_KEY); + + if (FSTRNCMP (card1, "ONTINUE", 7) == 0) + return (TYP_CONT_KEY); + + if (FSTRNCMP (card1, "TYPE",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "UNIT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "RVAL",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "RPIX",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "ROTA",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "RDER",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "SYER",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "DELT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (*card1 == 'D') + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + } + else if (*card == 'D') + { + if (FSTRNCMP (card1, "ATASUM ", 7) == 0) + return (TYP_CKSUM_KEY); + if (FSTRNCMP (card1, "ATAMIN ", 7) == 0) + return (TYP_RANG_KEY); + if (FSTRNCMP (card1, "ATAMAX ", 7) == 0) + return (TYP_RANG_KEY); + if (FSTRNCMP (card1, "ATE-OBS", 7) == 0) + return (TYP_REFSYS_KEY); } + else if (*card == 'E') + { + if (FSTRNCMP (card1, "XTEND ", 7) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (card1, "ND ", 7) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (card1, "XTNAME ", 7) == 0) + { + /* check for special compressed image value */ + if (FSTRNCMP(tcard, "EXTNAME = 'COMPRESSED_IMAGE'", 28) == 0) + return (TYP_CMPRS_KEY); + else + return (TYP_HDUID_KEY); + } + if (FSTRNCMP (card1, "XTVER ", 7) == 0) + return (TYP_HDUID_KEY); + if (FSTRNCMP (card1, "XTLEVEL", 7) == 0) + return (TYP_HDUID_KEY); + + if (FSTRNCMP (card1, "QUINOX", 6) == 0) + return (TYP_REFSYS_KEY); + if (FSTRNCMP (card1, "QUI",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_REFSYS_KEY); + } + if (FSTRNCMP (card1, "POCH ", 7) == 0) + return (TYP_REFSYS_KEY); + } + else if (*card == 'G') + { + if (FSTRNCMP (card1, "COUNT ", 7) == 0) + return (TYP_STRUC_KEY); + if (FSTRNCMP (card1, "ROUPS ", 7) == 0) + return (TYP_STRUC_KEY); + } + else if (*card == 'H') + { + if (FSTRNCMP (card1, "DUNAME ", 7) == 0) + return (TYP_HDUID_KEY); + if (FSTRNCMP (card1, "DUVER ", 7) == 0) + return (TYP_HDUID_KEY); + if (FSTRNCMP (card1, "DULEVEL", 7) == 0) + return (TYP_HDUID_KEY); + + if (FSTRNCMP (card1, "ISTORY",6) == 0) + { + if (*(card + 7) == ' ') + return (TYP_COMM_KEY); + else + return (TYP_USER_KEY); + } + } + else if (*card == 'L') + { + if (FSTRNCMP (card1, "ONPOLE",6) == 0) + return (TYP_WCS_KEY); + if (FSTRNCMP (card1, "ATPOLE",6) == 0) + return (TYP_WCS_KEY); + if (FSTRNCMP (card1, "ONP",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "ATP",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + } + else if (*card == 'M') + { + if (FSTRNCMP (card1, "JD-OBS ", 7) == 0) + return (TYP_REFSYS_KEY); + if (FSTRNCMP (card1, "JDOB",4) == 0) + { + if (*(card+5) >= '0' && *(card+5) <= '9') + return (TYP_REFSYS_KEY); + } + } + else if (*card == 'N') + { + if (FSTRNCMP (card1, "AXIS", 4) == 0) + { + if ((*card5 >= '0' && *card5 <= '9') + || (*card5 == ' ')) + return (TYP_STRUC_KEY); + } + } + else if (*card == 'P') + { + if (FSTRNCMP (card1, "COUNT ", 7) == 0) + return (TYP_STRUC_KEY); + if (*card1 == 'C') + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (*card1 == 'V') + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (*card1 == 'S') + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + } + else if (*card == 'R') + { + if (FSTRNCMP (card1, "ADECSYS", 7) == 0) + return (TYP_REFSYS_KEY); + if (FSTRNCMP (card1, "ADESYS", 6) == 0) + return (TYP_REFSYS_KEY); + if (FSTRNCMP (card1, "ADE",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_REFSYS_KEY); + } + } + else if (*card == 'S') + { + if (FSTRNCMP (card1, "IMPLE ", 7) == 0) + return (TYP_STRUC_KEY); + } + else if (*card == 'T') + { + if (FSTRNCMP (card1, "TYPE", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_STRUC_KEY); + } + else if (FSTRNCMP (card1, "FORM", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_STRUC_KEY); + } + else if (FSTRNCMP (card1, "BCOL", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_STRUC_KEY); + } + else if (FSTRNCMP (card1, "FIELDS ", 7) == 0) + return (TYP_STRUC_KEY); + else if (FSTRNCMP (card1, "HEAP ", 7) == 0) + return (TYP_STRUC_KEY); + + else if (FSTRNCMP (card1, "NULL", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_NULL_KEY); + } + + else if (FSTRNCMP (card1, "DIM", 3) == 0) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_DIM_KEY); + } + + else if (FSTRNCMP (card1, "UNIT", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_UNIT_KEY); + } + + else if (FSTRNCMP (card1, "DISP", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_DISP_KEY); + } + + else if (FSTRNCMP (card1, "SCAL", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_SCAL_KEY); + } + else if (FSTRNCMP (card1, "ZERO", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_SCAL_KEY); + } + + else if (FSTRNCMP (card1, "LMIN", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_RANG_KEY); + } + else if (FSTRNCMP (card1, "LMAX", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_RANG_KEY); + } + else if (FSTRNCMP (card1, "DMIN", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_RANG_KEY); + } + else if (FSTRNCMP (card1, "DMAX", 4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_RANG_KEY); + } + + else if (FSTRNCMP (card1, "CTYP",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CTY",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CUNI",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CUN",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRVL",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRV",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRPX",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRP",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CROT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CDLT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CDE",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRD",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CSY",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "WCS",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "C",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "P",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "V",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "S",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + } + else if (*card == 'X') + { + if (FSTRNCMP (card1, "TENSION", 7) == 0) + return (TYP_STRUC_KEY); + } + else if (*card == 'W') + { + if (FSTRNCMP (card1, "CSAXES", 6) == 0) + return (TYP_WCS_KEY); + if (FSTRNCMP (card1, "CSNAME", 6) == 0) + return (TYP_WCS_KEY); + if (FSTRNCMP (card1, "CAX", 3) == 0) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CSN", 3) == 0) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_WCS_KEY); + } + } + + else if (*card >= '0' && *card <= '9') + { + if (*card1 == 'C') + { + if (FSTRNCMP (card1, "CTYP",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CTY",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CUNI",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CUN",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRVL",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRV",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRPX",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRP",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CROT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CDLT",4) == 0) + { + if (*card5 >= '0' && *card5 <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CDE",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CRD",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "CSY",3) == 0) + { + if (*(card+4) >= '0' && *(card+4) <= '9') + return (TYP_WCS_KEY); + } + } + else if (FSTRNCMP (card1, "V",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (FSTRNCMP (card1, "S",1) == 0) + { + if (*(card + 2) >= '0' && *(card + 2) <= '9') + return (TYP_WCS_KEY); + } + else if (*card1 >= '0' && *card1 <= '9') + { /* 2 digits at beginning of keyword */ + + if ( (*(card + 2) == 'P') && (*(card + 3) == 'C') ) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_WCS_KEY); /* ijPCn keyword */ + } + else if ( (*(card + 2) == 'C') && (*(card + 3) == 'D') ) + { + if (*(card + 4) >= '0' && *(card + 4) <= '9') + return (TYP_WCS_KEY); /* ijCDn keyword */ + } + } + + } + + return (TYP_USER_KEY); /* by default all others are user keywords */ +} +/*--------------------------------------------------------------------------*/ +int ffdtyp(char *cval, /* I - formatted string representation of the value */ + char *dtype, /* O - datatype code: C, L, F, I, or X */ + int *status) /* IO - error status */ +/* + determine implicit datatype of input string. + This assumes that the string conforms to the FITS standard + for keyword values, so may not detect all invalid formats. +*/ +{ + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); + else if (cval[0] == '\'') + *dtype = 'C'; /* character string starts with a quote */ + else if (cval[0] == 'T' || cval[0] == 'F') + *dtype = 'L'; /* logical = T or F character */ + else if (cval[0] == '(') + *dtype = 'X'; /* complex datatype "(1.2, -3.4)" */ + else if (strchr(cval,'.')) + *dtype = 'F'; /* float usualy contains a decimal point */ + else if (strchr(cval,'E') || strchr(cval,'D') ) + *dtype = 'F'; /* exponential contains a E or D */ + else + *dtype = 'I'; /* if none of the above assume it is integer */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2x(char *cval, /* I - formatted string representation of the value */ + char *dtype, /* O - datatype code: C, L, F, I or X */ + + /* Only one of the following will be defined, depending on datatype */ + long *ival, /* O - integer value */ + int *lval, /* O - logical value */ + char *sval, /* O - string value */ + double *dval, /* O - double value */ + + int *status) /* IO - error status */ +/* + high level routine to convert formatted character string to its + intrinsic data type +*/ +{ + ffdtyp(cval, dtype, status); /* determine the datatype */ + + if (*dtype == 'I') + ffc2ii(cval, ival, status); + else if (*dtype == 'F') + ffc2dd(cval, dval, status); + else if (*dtype == 'L') + ffc2ll(cval, lval, status); + else + ffc2s(cval, sval, status); /* C and X formats */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2xx(char *cval, /* I - formatted string representation of the value */ + char *dtype, /* O - datatype code: C, L, F, I or X */ + + /* Only one of the following will be defined, depending on datatype */ + LONGLONG *ival, /* O - integer value */ + int *lval, /* O - logical value */ + char *sval, /* O - string value */ + double *dval, /* O - double value */ + + int *status) /* IO - error status */ +/* + high level routine to convert formatted character string to its + intrinsic data type +*/ +{ + ffdtyp(cval, dtype, status); /* determine the datatype */ + + if (*dtype == 'I') + ffc2jj(cval, ival, status); + else if (*dtype == 'F') + ffc2dd(cval, dval, status); + else if (*dtype == 'L') + ffc2ll(cval, lval, status); + else + ffc2s(cval, sval, status); /* C and X formats */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2i(char *cval, /* I - string representation of the value */ + long *ival, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert formatted string to an integer value, doing implicit + datatype conversion if necessary. +*/ +{ + char dtype, sval[81], msg[81]; + int lval; + double dval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); /* null value string */ + + /* convert the keyword to its native datatype */ + ffc2x(cval, &dtype, ival, &lval, sval, &dval, status); + + if (dtype == 'X' ) + { + *status = BAD_INTKEY; + } + else if (dtype == 'C') + { + /* try reading the string as a number */ + if (ffc2dd(sval, &dval, status) <= 0) + { + if (dval > (double) LONG_MAX || dval < (double) LONG_MIN) + *status = NUM_OVERFLOW; + else + *ival = (long) dval; + } + } + else if (dtype == 'F') + { + if (dval > (double) LONG_MAX || dval < (double) LONG_MIN) + *status = NUM_OVERFLOW; + else + *ival = (long) dval; + } + else if (dtype == 'L') + { + *ival = (long) lval; + } + + if (*status > 0) + { + *ival = 0; + strcpy(msg,"Error in ffc2i evaluating string as an integer: "); + strncat(msg,cval,30); + ffpmsg(msg); + return(*status); + } + + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2j(char *cval, /* I - string representation of the value */ + LONGLONG *ival, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert formatted string to a LONGLONG integer value, doing implicit + datatype conversion if necessary. +*/ +{ + char dtype, sval[81], msg[81]; + int lval; + double dval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); /* null value string */ + + /* convert the keyword to its native datatype */ + ffc2xx(cval, &dtype, ival, &lval, sval, &dval, status); + + if (dtype == 'X' ) + { + *status = BAD_INTKEY; + } + else if (dtype == 'C') + { + /* try reading the string as a number */ + if (ffc2dd(sval, &dval, status) <= 0) + { + if (dval > (double) LONGLONG_MAX || dval < (double) LONGLONG_MIN) + *status = NUM_OVERFLOW; + else + *ival = (LONGLONG) dval; + } + } + else if (dtype == 'F') + { + if (dval > (double) LONGLONG_MAX || dval < (double) LONGLONG_MIN) + *status = NUM_OVERFLOW; + else + *ival = (LONGLONG) dval; + } + else if (dtype == 'L') + { + *ival = (LONGLONG) lval; + } + + if (*status > 0) + { + *ival = 0; + strcpy(msg,"Error in ffc2j evaluating string as a long integer: "); + strncat(msg,cval,30); + ffpmsg(msg); + return(*status); + } + + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2l(char *cval, /* I - string representation of the value */ + int *lval, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert formatted string to a logical value, doing implicit + datatype conversion if necessary +*/ +{ + char dtype, sval[81], msg[81]; + long ival; + double dval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); /* null value string */ + + /* convert the keyword to its native datatype */ + ffc2x(cval, &dtype, &ival, lval, sval, &dval, status); + + if (dtype == 'C' || dtype == 'X' ) + *status = BAD_LOGICALKEY; + + if (*status > 0) + { + *lval = 0; + strcpy(msg,"Error in ffc2l evaluating string as a logical: "); + strncat(msg,cval,30); + ffpmsg(msg); + return(*status); + } + + if (dtype == 'I') + { + if (ival) + *lval = 1; + else + *lval = 0; + } + else if (dtype == 'F') + { + if (dval) + *lval = 1; + else + *lval = 0; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2r(char *cval, /* I - string representation of the value */ + float *fval, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert formatted string to a real float value, doing implicit + datatype conversion if necessary +*/ +{ + char dtype, sval[81], msg[81]; + int lval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); /* null value string */ + + ffdtyp(cval, &dtype, status); /* determine the datatype */ + + if (dtype == 'I' || dtype == 'F') + ffc2rr(cval, fval, status); + else if (dtype == 'L') + { + ffc2ll(cval, &lval, status); + *fval = (float) lval; + } + else if (dtype == 'C') + { + /* try reading the string as a number */ + ffc2s(cval, sval, status); + ffc2rr(sval, fval, status); + } + else + *status = BAD_FLOATKEY; + + if (*status > 0) + { + *fval = 0.; + strcpy(msg,"Error in ffc2r evaluating string as a float: "); + strncat(msg,cval,30); + ffpmsg(msg); + return(*status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2d(char *cval, /* I - string representation of the value */ + double *dval, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert formatted string to a double value, doing implicit + datatype conversion if necessary +*/ +{ + char dtype, sval[81], msg[81]; + int lval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == '\0') + return(*status = VALUE_UNDEFINED); /* null value string */ + + ffdtyp(cval, &dtype, status); /* determine the datatype */ + + if (dtype == 'I' || dtype == 'F') + ffc2dd(cval, dval, status); + else if (dtype == 'L') + { + ffc2ll(cval, &lval, status); + *dval = (double) lval; + } + else if (dtype == 'C') + { + /* try reading the string as a number */ + ffc2s(cval, sval, status); + ffc2dd(sval, dval, status); + } + else + *status = BAD_DOUBLEKEY; + + if (*status > 0) + { + *dval = 0.; + strcpy(msg,"Error in ffc2d evaluating string as a double: "); + strncat(msg,cval,30); + ffpmsg(msg); + return(*status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2ii(char *cval, /* I - string representation of the value */ + long *ival, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert null-terminated formatted string to an integer value +*/ +{ + char *loc, msg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + errno = 0; + *ival = 0; + *ival = strtol(cval, &loc, 10); /* read the string as an integer */ + + /* check for read error, or junk following the integer */ + if (*loc != '\0' && *loc != ' ' ) + *status = BAD_C2I; + + if (errno == ERANGE) + { + strcpy(msg,"Range Error in ffc2ii converting string to long int: "); + strncat(msg,cval,25); + ffpmsg(msg); + + *status = NUM_OVERFLOW; + errno = 0; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2jj(char *cval, /* I - string representation of the value */ + LONGLONG *ival, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert null-terminated formatted string to an long long integer value +*/ +{ + char *loc, msg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + errno = 0; + *ival = 0; + +#if defined(_MSC_VER) + + /* Microsoft Visual C++ 6.0 does not have the strtoll function */ + *ival = _atoi64(cval); + loc = cval; + while (*loc == ' ') loc++; /* skip spaces */ + if (*loc == '-') loc++; /* skip minus sign */ + if (*loc == '+') loc++; /* skip plus sign */ + while (isdigit(*loc)) loc++; /* skip digits */ + +#elif (USE_LL_SUFFIX == 1) + *ival = strtoll(cval, &loc, 10); /* read the string as an integer */ +#else + *ival = strtol(cval, &loc, 10); /* read the string as an integer */ +#endif + + /* check for read error, or junk following the integer */ + if (*loc != '\0' && *loc != ' ' ) + *status = BAD_C2I; + + if (errno == ERANGE) + { + strcpy(msg,"Range Error in ffc2jj converting string to longlong int: "); + strncat(msg,cval,25); + ffpmsg(msg); + + *status = NUM_OVERFLOW; + errno = 0; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2ll(char *cval, /* I - string representation of the value: T or F */ + int *lval, /* O - numerical value of the input string: 1 or 0 */ + int *status) /* IO - error status */ +/* + convert null-terminated formatted string to a logical value +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (cval[0] == 'T') + *lval = 1; + else + *lval = 0; /* any character besides T is considered false */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2s(char *instr, /* I - null terminated quoted input string */ + char *outstr, /* O - null terminated output string without quotes */ + int *status) /* IO - error status */ +/* + convert an input quoted string to an unquoted string by removing + the leading and trailing quote character. Also, replace any + pairs of single quote characters with just a single quote + character (FITS used a pair of single quotes to represent + a literal quote character within the string). +*/ +{ + int jj; + size_t len, ii; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (instr[0] != '\'') + { + strcpy(outstr, instr); /* no leading quote, so return input string */ + return(*status); + } + + len = strlen(instr); + + for (ii=1, jj=0; ii < len; ii++, jj++) + { + if (instr[ii] == '\'') /* is this the closing quote? */ + { + if (instr[ii+1] == '\'') /* 2 successive quotes? */ + ii++; /* copy only one of the quotes */ + else + break; /* found the closing quote, so exit this loop */ + } + outstr[jj] = instr[ii]; /* copy the next character to the output */ + } + + outstr[jj] = '\0'; /* terminate the output string */ + + if (ii == len) + { + ffpmsg("This string value has no closing quote (ffc2s):"); + ffpmsg(instr); + return(*status = 205); + } + + for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ + { + if (outstr[jj] == ' ') + outstr[jj] = 0; + else + break; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2rr(char *cval, /* I - string representation of the value */ + float *fval, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert null-terminated formatted string to a float value +*/ +{ + char *loc, msg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + errno = 0; + *fval = 0.; + *fval = (float) strtod(cval, &loc); /* read the string as an float */ + + /* check for read error, or junk following the value */ + if (*loc != '\0' && *loc != ' ' ) + { + strcpy(msg,"Error in ffc2rr converting string to float: "); + strncat(msg,cval,30); + ffpmsg(msg); + + *status = BAD_C2F; + } + + if (errno == ERANGE) + { + strcpy(msg,"Error in ffc2rr converting string to float: "); + strncat(msg,cval,30); + ffpmsg(msg); + + *status = NUM_OVERFLOW; + errno = 0; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffc2dd(char *cval, /* I - string representation of the value */ + double *dval, /* O - numerical value of the input string */ + int *status) /* IO - error status */ +/* + convert null-terminated formatted string to a double value +*/ +{ + char msg[81], tval[73], *loc; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + + strcpy(tval, cval); + loc = strchr(tval, 'D'); + + if (loc) /* The C language does not support a 'D' */ + *loc = 'E'; /* exponent so replace any D's with E's. */ + errno = 0; + *dval = 0.; + *dval = strtod(tval, &loc); /* read the string as an double */ + + /* check for read error, or junk following the value */ + if (*loc != '\0' && *loc != ' ' ) + { + strcpy(msg,"Error in ffc2dd converting string to double: "); + strncat(msg,cval,30); + ffpmsg(msg); + + *status = BAD_C2D; + } + + if (errno == ERANGE) + { + strcpy(msg,"Error in ffc2dd converting string to double: "); + strncat(msg,cval,30); + ffpmsg(msg); + + *status = NUM_OVERFLOW; + errno = 0; + } + + return(*status); +} + diff --git a/software/cfitsio3040/fitsio.doc b/software/cfitsio3040/fitsio.doc new file mode 100644 index 000000000..827d70312 --- /dev/null +++ b/software/cfitsio3040/fitsio.doc @@ -0,0 +1,6418 @@ + FITSIO - An Interface to FITS Format Files for Fortran Programmers + + William D Pence, HEASARC, NASA/GSFC + Version 3.0 + + +[Note: This file contains various formatting command symbols in the first +column which are used when generating the LATeX version of this document.] + +*I. Introduction + +This document describes the Fortran-callable subroutine interface that +is provided as part of the CFITSIO library (which is written in ANSI +C). This is a companion document to the CFITSIO User's Guide which +should be consulted for further information about the underlying +CFITSIO library. In the remainder of this document, the terms FITSIO +and CFITSIO are interchangeable and refer to the same library. + +FITSIO/CFITSIO is a machine-independent library of routines for reading +and writing data files in the FITS (Flexible Image Transport System) +data format. It can also read IRAF format image files and raw binary +data arrays by converting them on the fly into a virtual FITS format +file. This library was written to provide a powerful yet simple +interface for accessing FITS files which will run on most commonly used +computers and workstations. FITSIO supports all the features described +in the official NOST definition of the FITS format and can read and +write all the currently defined types of extensions, including ASCII +tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. The +FITSIO subroutines insulate the programmer from having to deal with the +complicated formatting details in the FITS file, however, it is assumed +that users have a general knowledge about the structure and usage of +FITS files. + +The CFITSIO package was initially developed by the HEASARC (High Energy +Astrophysics Science Archive Research Center) at the NASA Goddard Space +Flight Center to convert various existing and newly acquired +astronomical data sets into FITS format and to further analyze data +already in FITS format. New features continue to be added to CFITSIO +in large part due to contributions of ideas or actual code from users +of the package. The Integral Science Data Center in Switzerland, and +the XMM/ESTEC project in The Netherlands made especially significant +contributions that resulted in many of the new features that appeared +in v2.0 of CFITSIO. + +The latest version of the CFITSIO source code, documentation, and +example programs are available on the World-Wide Web or via anonymous +ftp from: +- + http://heasarc.gsfc.nasa.gov/fitsio + ftp://legacy.gsfc.nasa.gov/software/fitsio/c +- +\newpage +Any questions, bug reports, or suggested enhancements related to the CFITSIO +package should be sent to the primary author: +- + Dr. William Pence Telephone: (301) 286-4599 + HEASARC, Code 662 E-mail: pence@tetra.gsfc.nasa.gov + NASA/Goddard Space Flight Center + Greenbelt, MD 20771, USA +- +This User's Guide assumes that readers already have a general +understanding of the definition and structure of FITS format files. +Further information about FITS formats is available from the FITS Support +Office at {\tt http://fits.gsfc.nasa.gov}. In particular, the +'NOST FITS Standard' gives the authoritative definition of the FITS data +format, and the `FITS User's Guide' provides additional historical background +and practical advice on using FITS files. + +CFITSIO users may also be interested in the FTOOLS package of programs +that can be used to manipulate and analyze FITS format files. +Information about FTOOLS can be obtained on the Web or via anonymous +ftp at: +- + http://heasarc.gsfc.nasa.gov/ftools + ftp://legacy.gsfc.nasa.gov/software/ftools/release +- + +*II. Creating FITSIO/CFITSIO + +**A. Building the Library + +To use the FITSIO subroutines one must first build the CFITSIO library, +which requires a C compiler. gcc is ideal, or most other ANSI-C +compilers will also work. The CFITSIO code is contained in about 40 C +source files (*.c) and header files (*.h). On VAX/VMS systems 2 +assembly-code files (vmsieeed.mar and vmsieeer.mar) are also needed. + +The Fortran interface subroutines to the C CFITSIO routines are located +in the f77\_wrap1.c, through f77\_wrap4.c files. These are relatively simple +'wrappers' that translate the arguments in the Fortran subroutine into +the appropriate format for the corresponding C routine. This +translation is performed transparently to the user by a set of C macros +located in the cfortran.h file. Unfortunately cfortran.h does not +support every combination of C and Fortran compilers so the Fortran +interface is not supported on all platforms. (see further notes below). + +A standard combination of C and Fortran compilers will be assumed by +default, but one may also specify a particular Fortran compiler by +doing: +- + > setenv CFLAGS -DcompilerName=1 +- +(where 'compilerName' is the name of the compiler) before running +the configure command. The currently recognized compiler +names are: +- + g77Fortran + IBMR2Fortran + CLIPPERFortran + pgiFortran + NAGf90Fortran + f2cFortran + hpuxFortran + apolloFortran + sunFortran + CRAYFortran + mipsFortran + DECFortran + vmsFortran + CONVEXFortran + PowerStationFortran + AbsoftUNIXFortran + AbsoftProFortran + SXFortran +- +Alternatively, one may edit the CFLAGS line in the Makefile to add the +'-DcompilerName' flag after running the './configure' command. + +The CFITSIO library is built on Unix systems by typing: +- + > ./configure [--prefix=/target/installation/path] + > make (or 'make shared') + > make install (this step is optional) +- +at the operating system prompt. The configure command customizes the +Makefile for the particular system, then the `make' command compiles the +source files and builds the library. Type `./configure' and not simply +`configure' to ensure that the configure script in the current directory +is run and not some other system-wide configure script. The optional +'prefix' argument to configure gives the path to the directory where +the CFITSIO library and include files should be installed via the later +'make install' command. For example, +- + > ./configure --prefix=/usr1/local +- +will cause the 'make install' command to copy the CFITSIO libcfitsio file +to /usr1/local/lib and the necessary include file to /usr1/local/include +(assuming of course that the process has permission to write to these +directories). + +By default this also builds the set of Fortran-callable +wrapper routines whose calling sequences are described later in this +document. + +The 'make shared' option builds a shared or dynamic version of the +CFITSIO library. When using the shared library the executable code is +not copied into your program at link time and instead the program +locates the necessary library code at run time, normally through +LD\_LIBRARY\_PATH or some other method. The advantages of using a shared +library are: +- + 1. Less disk space if you build more than 1 program + 2. Less memory if more than one copy of a program using the shared + library is running at the same time since the system is smart + enough to share copies of the shared library at run time. + 3. Possibly easier maintenance since a new version of the shared + library can be installed without relinking all the software + that uses it (as long as the subroutine names and calling + sequences remain unchanged). + 4. No run-time penalty. +- +The disadvantages are: +- + 1. More hassle at runtime. You have to either build the programs + specially or have LD_LIBRARY_PATH set right. + 2. There may be a slight start up penalty, depending on where you are + reading the shared library and the program from and if your CPU is + either really slow or really heavily loaded. +- + +On HP/UX systems, the environment variable CFLAGS should be set +to -Ae before running configure to enable "extended ANSI" features. + +It may not be possible to staticly link programs that use CFITSIO on +some platforms (namely, on Solaris 2.6) due to the network drivers +(which provide FTP and HTTP access to FITS files). It is possible to +make both a dynamic and a static version of the CFITSIO library, but +network file access will not be possible using the static version. + +On VAX/VMS and ALPHA/VMS systems the make\_gfloat.com command file may +be executed to build the cfitsio.olb object library using the default +G-floating point option for double variables. The make\_dfloat.com and +make\_ieee.com files may be used instead to build the library with the +other floating point options. Note that the getcwd function that is +used in the group.c module may require that programs using CFITSIO be +linked with the ALPHA\$LIBRARY:VAXCRTL.OLB library. See the example +link line in the next section of this document. + +On Windows IBM-PC type platforms the situation is more complicated +because of the wide variety of Fortran compilers that are available and +because of the inherent complexities of calling the CFITSIO C routines +from Fortran. Two different versions of the CFITSIO dll library are +available, compiled with the Borland C++ compiler and the Microsoft +Visual C++ compiler, respectively, in the files +cfitsiodll\_2xxx\_borland.zip and cfitsiodll\_2xxx\_vcc.zip, where +'2xxx' represents the current release number. Both these dll libraries +contain a set of Fortran wrapper routines which may be compatible with +some, but probably not all, available Fortran compilers. To test if +they are compatible, compile the program testf77.f and try linking to +these dll libraries. If these libraries do not work with a particular +Fortran compiler, then there are 2 possible solutions. The first +solution would be to modify the file cfortran.h for that particular +combination of C and Fortran compilers, and then rebuild the CFITSIO +dll library. This will require, however, a some expertise in +mixed language programming. +The other solution is to use the older v5.03 Fortran-77 implementation +of FITSIO that is still available from the FITSIO web-site. This +version is no longer supported, but it does provide the basic functions +for reading and writing FITS files and should be compatible with most +Fortran compilers. + +CFITSIO has currently been tested on the following platforms: +- + OPERATING SYSTEM COMPILER + Sun OS gcc and cc (3.0.1) + Sun Solaris gcc and cc + Silicon Graphics IRIX gcc and cc + Silicon Graphics IRIX64 MIPS + Dec Alpha OSF/1 gcc and cc + DECstation Ultrix gcc + Dec Alpha OpenVMS cc + DEC VAX/VMS gcc and cc + HP-UX gcc + IBM AIX gcc + Linux gcc + MkLinux DR3 + Windows 95/98/NT Borland C++ V4.5 + Windows 95/98/NT/ME/XP Microsoft/Compaq Visual C++ v5.0, v6.0 + Windows 95/98/NT Cygwin gcc + OS/2 gcc + EMX + MacOS 7.1 or greater Metrowerks 10.+ +- +CFITSIO will probably run on most other Unix platforms. Cray +supercomputers are currently not supported. + +**B. Testing the Library + +The CFITSIO library should be tested by building and running +the testprog.c program that is included with the release. +On Unix systems type: +- + % make testprog + % testprog > testprog.lis + % diff testprog.lis testprog.out + % cmp testprog.fit testprog.std +- + On VMS systems, +(assuming cc is the name of the C compiler command), type: +- + $ cc testprog.c + $ link testprog, cfitsio/lib, alpha$library:vaxcrtl/lib + $ run testprog +- +The testprog program should produce a FITS file called `testprog.fit' +that is identical to the `testprog.std' FITS file included with this +release. The diagnostic messages (which were piped to the file +testprog.lis in the Unix example) should be identical to the listing +contained in the file testprog.out. The 'diff' and 'cmp' commands +shown above should not report any differences in the files. (There +may be some minor formatting differences, such as the presence or +absence of leading zeros, or 3 digit exponents in numbers, +which can be ignored). + +The Fortran wrappers in CFITSIO may be tested with the testf77 +program. On Unix systems the fortran compilation and link command +may be called 'f77' or 'g77', depending on the system. +- + % f77 -o testf77 testf77.f -L. -lcfitsio -lnsl -lsocket + or + % f77 -f -o testf77 testf77.f -L. -lcfitsio (under SUN O/S) + or + % f77 -o testf77 testf77.f -Wl,-L. -lcfitsio -lm -lnsl -lsocket (HP/UX) + or + % g77 -o testf77 -s testf77.f -lcfitsio -lcc_dynamic -lncurses (Mac OS-X) + + % testf77 > testf77.lis + % diff testf77.lis testf77.out + % cmp testf77.fit testf77.std +- +On machines running SUN O/S, Fortran programs must be compiled with the +'-f' option to force double precision variables to be aligned on 8-byte +boundarys to make the fortran-declared variables compatible with C. A +similar compiler option may be required on other platforms. Failing to +use this option may cause the program to crash on FITSIO routines that +read or write double precision variables. + +Also note that on some systems, the output listing of the testf77 +program may differ slightly from the testf77.std template, if leading +zeros are not printed by default before the decimal point when using F +format. + +A few other utility programs are included with CFITSIO: +- + speed - measures the maximum throughput (in MB per second) + for writing and reading FITS files with CFITSIO + + listhead - lists all the header keywords in any FITS file + + fitscopy - copies any FITS file (especially useful in conjunction + with the CFITSIO's extended input filename syntax) + + cookbook - a sample program that performs common read and + write operations on a FITS file. + + iter_a, iter_b, iter_c - examples of the CFITSIO iterator routine +- + +The first 4 of these utility programs can be compiled and linked by typing +- + % make program_name +- + +**C. Linking Programs with FITSIO + +When linking applications software with the FITSIO library, several system libraries usually need to be specified on the link command line. On +Unix systems, the most reliable way to determine what libraries are required +is to type 'make testprog' and see what libraries the configure script has +added. The typical libraries that may need to be added are -lm (the math +library) and -lnsl and -lsocket (needed only for FTP and HTTP file access). +These latter 2 libraries are not needed on VMS and Windows platforms, +because FTP file access is not currently supported on those platforms. + +Note that when upgrading to a newer version of CFITSIO it is usually +necessay to recompile, as well as relink, the programs that use CFITSIO, +because the definitions in fitsio.h often change. + +**D. Getting Started with FITSIO + +In order to effectively use the FITSIO library as quickly as possible, +it is recommended that new users follow these steps: + +1. Read the following `FITS Primer' chapter for a brief +overview of the structure of FITS files. This is especially important +for users who have not previously dealt with the FITS table and image +extensions. + +2. Write a simple program to read or write a FITS file using the Basic +Interface routines. + +3. Refer to the cookbook.f program that is included with this release +for examples of routines that perform various common FITS file +operations. + +4. Read Chapters 4 and 5 to become familiar with the conventions and +advanced features of the FITSIO interface. + +5. Scan through the more extensive set of routines that are provided +in the `Advanced Interface'. These routines perform more specialized +functions than are provided by the Basic Interface routines. + +**E. Example Program + +The following listing shows an example of how to use the FITSIO +routines in a Fortran program. Refer to the cookbook.f program that +is included with the FITSIO distribution for examples of other +FITS programs. +- + program writeimage + +C Create a FITS primary array containing a 2-D image + + integer status,unit,blocksize,bitpix,naxis,naxes(2) + integer i,j,group,fpixel,nelements,array(300,200) + character filename*80 + logical simple,extend + + status=0 +C Name of the FITS file to be created: + filename='ATESTFILE.FITS' + +C Get an unused Logical Unit Number to use to create the FITS file + call ftgiou(unit,status) + +C create the new empty FITS file + blocksize=1 + call ftinit(unit,filename,blocksize,status) + +C initialize parameters about the FITS image (300 x 200 16-bit integers) + simple=.true. + bitpix=16 + naxis=2 + naxes(1)=300 + naxes(2)=200 + extend=.true. + +C write the required header keywords + call ftphpr(unit,simple,bitpix,naxis,naxes,0,1,extend,status) + +C initialize the values in the image with a linear ramp function + do j=1,naxes(2) + do i=1,naxes(1) + array(i,j)=i+j + end do + end do + +C write the array to the FITS file + group=1 + fpixel=1 + nelements=naxes(1)*naxes(2) + call ftpprj(unit,group,fpixel,nelements,array,status) + +C write another optional keyword to the header + call ftpkyj(unit,'EXPOSURE',1500,'Total Exposure Time',status) + +C close the file and free the unit number + call ftclos(unit, status) + call ftfiou(unit, status) + end +- + +**F. Legal Stuff + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. +(However, see the restriction on the use of the gzip compression code, +below). + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +The file compress.c contains (slightly modified) source code that +originally came from gzip-1.2.4, copyright (C) 1992-1993 by Jean-loup +Gailly. This gzip code is distributed under the GNU General Public +License and thus requires that any software that uses the CFITSIO +library (which in turn uses the gzip code) must conform to the +provisions in the GNU General Public License. A copy of the GNU +license is included at the beginning of compress.c file. + +Similarly, the file wcsutil.c contains 2 slightly modified routines +from the Classic AIPS package that are also distributed under the GNU +General Public License. + +Alternate versions of the compress.c and wcsutil.c files (called +compress\_alternate.c and wcsutil\_alternate.c) are provided for users +who want to use the CFITSIO +library but are unwilling or unable to publicly release their software +under the terms of the GNU General Public License. These alternate +versions contains non-functional stubs for the file compression and +uncompression routines and the world coordinate transformation routines +used by CFITSIO. Replace the file `compress.c' +with `compress\_alternate.c' and 'wcsutil.c' with 'wcsutil\_alternate.c +before compiling the CFITSIO library. This +will produce a version of CFITSIO which does not support reading or +writing compressed FITS files, or doing image coordinate transformations, +but is otherwise identical to the standard version. + + +**G. Acknowledgements + +The development of many of the powerful features in CFITSIO was made +possible through collaborations with many people or organizations from +around the world. The following, in particular, have made especially +significant contributions: + +Programmers from the Integral Science Data Center, Switzerland (namely, +Jurek Borkowski, Bruce O'Neel, and Don Jennings), designed the concept +for the plug-in I/O drivers that was introduced with CFITSIO 2.0. The +use of `drivers' greatly simplified the low-level I/O, which in turn +made other new features in CFITSIO (e.g., support for compressed FITS +files and support for IRAF format image files) much easier to +implement. Jurek Borkowski wrote the Shared Memory driver, and Bruce +O'Neel wrote the drivers for accessing FITS files over the network +using the FTP, HTTP, and ROOT protocols. + +The ISDC also provided the template parsing routines (written by Jurek +Borkowski) and the hierarchical grouping routines (written by Don +Jennings). The ISDC DAL (Data Access Layer) routines are layered on +top of CFITSIO and make extensive use of these features. + +Uwe Lammers (XMM/ESA/ESTEC, The Netherlands) designed the +high-performance lexical parsing algorithm that is used to do +on-the-fly filtering of FITS tables. This algorithm essentially +pre-compiles the user-supplied selection expression into a form that +can be rapidly evaluated for each row. Peter Wilson (RSTX, NASA/GSFC) +then wrote the parsing routines used by CFITSIO based on Lammers' +design, combined with other techniques such as the CFITSIO iterator +routine to further enhance the data processing throughput. This effort +also benefited from a much earlier lexical parsing routine that was +developed by Kent Blackburn (NASA/GSFC). More recently, Craig Markwardt +(NASA/GSFC) implemented additional functions (median, average, stddev) +and other enhancements to the lexical parser. + +The CFITSIO iterator function is loosely based on similar ideas +developed for the XMM Data Access Layer. + +Peter Wilson (RSTX, NASA/GSFC) wrote the complete set of +Fortran-callable wrappers for all the CFITSIO routines, which in turn +rely on the CFORTRAN macro developed by Burkhard Burow. + +The syntax used by CFITSIO for filtering or binning input FITS files is +based on ideas developed for the AXAF Science Center Data Model by +Jonathan McDowell, Antonella Fruscione, Aneta Siemiginowska and Bill +Joye. See http://heasarc.gsfc.nasa.gov/docs/journal/axaf7.html for +further description of the AXAF Data Model. + +The file decompression code were taken directly from the gzip (GNU zip) +program developed by Jean-loup Gailly and others. + +Doug Mink, SAO, provided the routines for converting IRAF format +images into FITS format. + +Martin Reinecke (Max Planck Institute, Garching)) provided the modifications to +cfortran.h that are necessary to support 64-bit integer values when calling +C routines from fortran programs. The cfortran.h macros were originally developed +by Burkhard Burow (CERN). + +In addition, many other people have made valuable contributions to the +development of CFITSIO. These include (with apologies to others that may +have inadvertently been omitted): + +Steve Allen, Carl Akerlof, Keith Arnaud, Morten Krabbe Barfoed, Kent +Blackburn, G Bodammer, Romke Bontekoe, Lucio Chiappetti, Keith Costorf, +Robin Corbet, John Davis, Richard Fink, Ning Gan, Emily Greene, Joe +Harrington, Cheng Ho, Phil Hodge, Jim Ingham, Yoshitaka Ishisaki, Diab +Jerius, Mark Levine, Todd Karakaskian, Edward King, Scott Koch, Claire +Larkin, Rob Managan, Eric Mandel, John Mattox, Carsten Meyer, Emi +Miyata, Stefan Mochnacki, Mike Noble, Oliver Oberdorf, Clive Page, +Arvind Parmar, Jeff Pedelty, Tim Pearson, Maren Purves, Scott Randall, +Chris Rogers, Arnold Rots, Barry Schlesinger, Robin Stebbins, Andrew +Szymkowiak, Allyn Tennant, Peter Teuben, James Theiler, Doug Tody, +Shiro Ueno, Steve Walton, Archie Warnock, Alan Watson, Dan Whipple, Wim +Wimmers, Peter Young, Jianjun Xu, and Nelson Zarate. + + +*III. A FITS Primer + +This section gives a brief overview of the structure of FITS files. +Users should refer to the documentation available from the NOST, as +described in the introduction, for more detailed information on FITS +formats. + +FITS was first developed in the late 1970's as a standard data +interchange format between various astronomical observatories. Since +then FITS has become the defacto standard data format supported by most +astronomical data analysis software packages. + +A FITS file consists of one or more Header + Data Units (HDUs), where +the first HDU is called the `Primary HDU', or `Primary Array'. The +primary array contains an N-dimensional array of pixels, such as a 1-D +spectrum, a 2-D image, or a 3-D data cube. Six different primary +datatypes are supported: Unsigned 8-bit bytes, 16, 32, and 64-bit signed +integers, and 32 and 64-bit floating point reals. FITS also has a +convention for storing unsigned integers (see the later +section entitled `Unsigned Integers' for more details). The primary HDU +may also consist of only a header with a null array containing no +data pixels. + +Any number of additional HDUs may follow the primary array; these +additional HDUs are called FITS `extensions'. There are currently 3 +types of extensions defined by the FITS standard: + +\begin{itemize} +\item + Image Extension - a N-dimensional array of pixels, like in a primary array +\item + ASCII Table Extension - rows and columns of data in ASCII character format +\item + Binary Table Extension - rows and columns of data in binary representation +\end{itemize} + +In each case the HDU consists of an ASCII Header Unit followed by an optional +Data Unit. For historical reasons, each Header or Data unit must be an +exact multiple of 2880 8-bit bytes long. Any unused space is padded +with fill characters (ASCII blanks or zeros). + +Each Header Unit consists of any number of 80-character keyword records +or `card images' which have the general form: +- + KEYNAME = value / comment string + NULLKEY = / comment: This keyword has no value +- +The keyword names may be up to 8 characters long and can only contain +uppercase letters, the digits 0-9, the hyphen, and the underscore +character. The keyword name is (usually) followed by an equals sign and +a space character (= ) in columns 9 - 10 of the record, followed by the +value of the keyword which may be either an integer, a floating point +number, a character string (enclosed in single quotes), or a boolean +value (the letter T or F). A keyword may also have a null or undefined +value if there is no specified value string, as in the second example. + +The last keyword in the header is always the `END' keyword which has no +value or comment fields. There are many rules governing the exact +format of a keyword record (see the NOST FITS Standard) so it is better +to rely on standard interface software like FITSIO to correctly +construct or to parse the keyword records rather than try to deal +directly with the raw FITS formats. + +Each Header Unit begins with a series of required keywords which depend +on the type of HDU. These required keywords specify the size and +format of the following Data Unit. The header may contain other +optional keywords to describe other aspects of the data, such as the +units or scaling values. Other COMMENT or HISTORY keywords are also +frequently added to further document the data file. + +The optional Data Unit immediately follows the last 2880-byte block in +the Header Unit. Some HDUs do not have a Data Unit and only consist of +the Header Unit. + +If there is more than one HDU in the FITS file, then the Header Unit of +the next HDU immediately follows the last 2880-byte block of the +previous Data Unit (or Header Unit if there is no Data Unit). + +The main required keywords in FITS primary arrays or image extensions are: +\begin{itemize} +\item +BITPIX -- defines the datatype of the array: 8, 16, 32, 64, -32, -64 for +unsigned 8--bit byte, 16--bit signed integer, 32--bit signed integer, +64--bit signed integer, +32--bit IEEE floating point, and 64--bit IEEE double precision floating +point, respectively. +\item +NAXIS -- the number of dimensions in the array, usually 0, 1, 2, 3, or 4. +\item +NAXISn -- (n ranges from 1 to NAXIS) defines the size of each dimension. +\end{itemize} + +FITS tables start with the keyword XTENSION = `TABLE' (for ASCII +tables) or XTENSION = `BINTABLE' (for binary tables) and have the +following main keywords: +\begin{itemize} +\item +TFIELDS -- number of fields or columns in the table +\item +NAXIS2 -- number of rows in the table +\item +TTYPEn -- for each column (n ranges from 1 to TFIELDS) gives the +name of the column +\item +TFORMn -- the datatype of the column +\item +TUNITn -- the physical units of the column (optional) +\end{itemize} + +Users should refer to the FITS Support Office at {\tt http://fits.gsfc.nasa.gov} +for futher information about the FITS format and related software +packages. + + + +*V. FITSIO Conventions and Guidelines + +**A. CFITSIO Size Limitations + +CFITSIO places few restrictions on the size of FITS files that it +reads or writes. There are a few limits, however, which may affect +some extreme cases: + +1. The maximum number of FITS files that may be simultaneously opened +by CFITSIO is set by NMAXFILES as defined in fitsio2.h. It is currently +set = 300 by default. CFITSIO will allocate about 80 * NMAXFILES bytes +of memory for internal use. Note that the underlying C compiler or +operating system, may have a smaller limit on the number of opened files. +The C symbolic constant FOPEN\_MAX is intended to define the maximum +number of files that may open at once (including any other text or +binary files that may be open, not just FITS files). On some systems it +has been found that gcc supports a maximum of 255 opened files. + +Note that opening and operating on many FITS files simultaneously in +parallel may be less efficient than operating on smaller groups of files +in series. CFITSIO only has NIOBUF number of internal buffers (set = 40 +by default) that are used for temporary storage of the most recent data +records that have been read or written in the FITS files. If the number +of opened files is greater than NIOBUF, then CFITSIO may waste more time +flushing and re-reading or re-writing the same records in the FITS files. + +2. By default, CFITSIO can handle FITS files up to 2.1 GB in size (2**31 +bytes). This file size limit is often imposed by 32-bit operating +systems. More recently, as 64-bit operating systems become more common, an +industry-wide standard (at least on Unix systems) has been developed to +support larger sized files (see http://ftp.sas.com/standards/large.file/). +Starting with version 2.1 of CFITSIO, larger FITS files up to 6 terabytes +in size may be read and written on supported platforms. In order +to support these larger files, CFITSIO must be compiled with the +'-D\_LARGEFILE\_SOURCE' and `-D\_FILE\_OFFSET\_BITS=64' compiler flags. +Some platforms may also require the `-D\_LARGE\_FILES' compiler flag. + This causes the compiler to allocate 8-bytes instead of +4-bytes for the `off\_t' datatype which is used to store file offset +positions. It appears that in most cases it is not necessary to +also include these compiler flags when compiling programs that link to +the CFITSIO library. + +If CFITSIO is compiled with the -D\_LARGEFILE\_SOURCE +and -D\_FILE\_OFFSET\_BITS=64 flags on a +platform that supports large files, then it can read and write FITS +files that contain up to 2**31 2880-byte FITS records, or approximately +6 terabytes in size. It is still required that the value of the NAXISn +and PCOUNT keywords in each extension be within the range of a signed +4-byte integer (max value = 2,147,483,648). Thus, each dimension of an +image (given by the NAXISn keywords), the total width of a table +(NAXIS1 keyword), the number of rows in a table (NAXIS2 keyword), and +the total size of the variable-length array heap in binary tables +(PCOUNT keyword) must be less than this limit. + +Currently, support for large files within CFITSIO has been tested +on the Linux, Solaris, and IBM AIX operating systems. + +**B. Multiple Access to the Same FITS File + +CFITSIO supports simultaneous read and write access to multiple HDUs in +the same FITS file. Thus, one can open the same FITS file twice within +a single program and move to 2 different HDUs in the file, and then +read and write data or keywords to the 2 extensions just as if one were +accessing 2 completely separate FITS files. Since in general it is +not possible to physically open the same file twice and then expect to +be able to simultaneously (or in alternating succession) write to 2 +different locations in the file, CFITSIO recognizes when the file to be +opened (in the call to fits\_open\_file) has already been opened and +instead of actually opening the file again, just logically links the +new file to the old file. (This only applies if the file is opened +more than once within the same program, and does not prevent the same +file from being simultaneously opened by more than one program). Then +before CFITSIO reads or writes to either (logical) file, it makes sure +that any modifications made to the other file have been completely +flushed from the internal buffers to the file. Thus, in principle, one +could open a file twice, in one case pointing to the first extension +and in the other pointing to the 2nd extension and then write data to +both extensions, in any order, without danger of corrupting the file, +There may be some efficiency penalties in doing this however, since +CFITSIO has to flush all the internal buffers related to one file +before switching to the other, so it would still be prudent to +minimize the number of times one switches back and forth between doing +I/O to different HDUs in the same file. + +**C. Current Header Data Unit (CHDU) + +In general, a FITS file can contain multiple Header Data Units, also +called extensions. CFITSIO only operates within one HDU at any given +time, and the currently selected HDU is called the Current Header Data +Unit (CHDU). When a FITS file is first created or opened the CHDU is +automatically defined to be the first HDU (i.e., the primary array). +CFITSIO routines are provided to move to and open any other existing +HDU within the FITS file or to append or insert a new HDU in the FITS +file which then becomes the CHDU. + +**D. Subroutine Names + +All FITSIO subroutine names begin with the letters 'ft' to distinguish +them from other subroutines and are 5 or 6 characters long. Users should +not name their own subroutines beginning with 'ft' to avoid conflicts. +(The SPP interface routines all begin with 'fs'). Subroutines which read +or get information from the FITS file have names beginning with +'ftg...'. Subroutines which write or put information into the FITS file +have names beginning with 'ftp...'. + +**E. Subroutine Families and Datatypes + +Many of the subroutines come in families which differ only in the +datatype of the associated parameter(s) . The datatype of these +subroutines is indicated by the last letter of the subroutine name +(e.g., 'j' in 'ftpkyj') as follows: +- + x - bit + b - character*1 (unsigned byte) + i - short integer (I*2) + j - integer (I*4, 32-bit integer) + k - long long integer (I*8, 64-bit integer) + e - real exponential floating point (R*4) + f - real fixed-format floating point (R*4) + d - double precision real floating-point (R*8) + g - double precision fixed-format floating point (R*8) + c - complex reals (pairs of R*4 values) + m - double precision complex (pairs of R*8 values) + l - logical (L*4) + s - character string +- + +When dealing with the FITS byte datatype, it is important to remember +that the raw values (before any scaling by the BSCALE and BZERO, or +TSCALn and TZEROn keyword values) in byte arrays (BITPIX = 8) or byte +columns (TFORMn = 'B') are interpreted as unsigned bytes with values +ranging from 0 to 255. Some Fortran compilers support a non-standard +byte datatype such as INTEGER*1, LOGICAL*1, or BYTE, which can sometimes +be used instead of CHARACTER*1 variables. Many machines permit passing a +numeric datatype (such as INTEGER*1) to the FITSIO subroutines which are +expecting a CHARACTER*1 datatype, but this technically violates the +Fortran-77 standard and is not supported on all machines (e.g., on a VAX/VMS +machine one must use the VAX-specific \%DESCR function). + +One feature of the CFITSIO routines is that they can operate on a `X' +(bit) column in a binary table as though it were a `B' (byte) column. +For example a `11X' datatype column can be interpreted the same as a +`2B' column (i.e., 2 unsigned 8-bit bytes). In some instances, it can +be more efficient to read and write whole bytes at a time, rather than +reading or writing each individual bit. + +The double precision complex datatype is not a standard Fortran-77 +datatype. If a particular Fortran compiler does not directly support +this datatype, then one may instead pass an array of pairs of double +precision values to these subroutines. The first value in each pair +is the real part, and the second is the imaginary part. + +**F. Implicit Data Type Conversion + +The FITSIO routines that read and write numerical data can perform +implicit data type conversion. This means that the data type of the +variable or array in the program does not need to be the same as the +data type of the value in the FITS file. Data type conversion is +supported for numerical and string data types (if the string contains a +valid number enclosed in quotes) when reading a FITS header keyword +value and for numeric values when reading or writing values in the +primary array or a table column. CFITSIO returns status = +NUM\_OVERFLOW if the converted data value exceeds the range of the +output data type. Implicit data type conversion is not supported +within binary tables for string, logical, complex, or double complex +data types. + +In addition, any table column may be read as if it contained string values. +In the case of numeric columns the returned string will be formatted +using the TDISPn display format if it exists. + +**G. Data Scaling + +When reading numerical data values in the primary array or a +table column, the values will be scaled automatically by the BSCALE and +BZERO (or TSCALn and TZEROn) header keyword values if they are +present in the header. The scaled data that is returned to the reading +program will have +- + output value = (FITS value) * BSCALE + BZERO +- +(a corresponding formula using TSCALn and TZEROn is used when reading +from table columns). In the case of integer output values the floating +point scaled value is truncated to an integer (not rounded to the +nearest integer). The ftpscl and fttscl subroutines may be used to +override the scaling parameters defined in the header (e.g., to turn +off the scaling so that the program can read the raw unscaled values +from the FITS file). + +When writing numerical data to the primary array or to a table +column the data values will generally be automatically inversely scaled +by the value of the BSCALE and BZERO (or TSCALn and TZEROn) header +keyword values if they they exist in the header. These keywords must +have been written to the header before any data is written for them to +have any effect. Otherwise, one may use the ftpscl and fttscl +subroutines to define or override the scaling keywords in the header +(e.g., to turn off the scaling so that the program can write the raw +unscaled values into the FITS file). If scaling is performed, the +inverse scaled output value that is written into the FITS file will +have +- + FITS value = ((input value) - BZERO) / BSCALE +- +(a corresponding formula using TSCALn and TZEROn is used when +writing to table columns). Rounding to the nearest integer, rather +than truncation, is performed when writing integer datatypes to the +FITS file. + +**H. Error Status Values and the Error Message Stack + +The last parameter in nearly every FITSIO subroutine is the error +status value which is both an input and an output parameter. A +returned positive value for this parameter indicates an error was +detected. A listing of all the FITSIO status code values is given at +the end of this document. + +The FITSIO library uses an `inherited status' convention for the status +parameter which means that if a subroutine is called with a positive +input value of the status parameter, then the subroutine will exit +immediately without changing the value of the status parameter. Thus, +if one passes the status value returned from each FITSIO routine as +input to the next FITSIO subroutine, then whenever an error is detected +all further FITSIO processing will cease. This convention can simplify +the error checking in application programs because it is not necessary +to check the value of the status parameter after every single FITSIO +subroutine call. If a program contains a sequence of several FITSIO +calls, one can just check the status value after the last call. Since +the returned status values are generally distinctive, it should be +possible to determine which subroutine originally returned the error +status. + +FITSIO also maintains an internal stack of error messages (80-character +maximum length) which in many cases provide a more detailed explanation +of the cause of the error than is provided by the error status number +alone. It is recommended that the error message stack be printed out +whenever a program detects a FITSIO error. To do this, call the FTGMSG +routine repeatedly to get the successive messages on the stack. When the +stack is empty FTGMSG will return a blank string. Note that this is a +`First In -- First Out' stack, so the oldest error message is returned +first by ftgmsg. + +**I. Variable-Length Array Facility in Binary Tables + +FITSIO provides easy-to-use support for reading and writing data in +variable length fields of a binary table. The variable length columns +have TFORMn keyword values of the form `1Pt(len)' or `1Qt(len)' where `t' is the +datatype code (e.g., I, J, E, D, etc.) and `len' is an integer +specifying the maximum length of the vector in the table. If the value +of `len' is not specified when the table is created (e.g., if the TFORM +keyword value is simply specified as '1PE' instead of '1PE(400) ), then +FITSIO will automatically scan the table when it is closed to +determine the maximum length of the vector and will append this value +to the TFORMn value. + +The same routines which read and write data in an ordinary fixed length +binary table extension are also used for variable length fields, +however, the subroutine parameters take on a slightly different +interpretation as described below. + +All the data in a variable length field is written into an area called +the `heap' which follows the main fixed-length FITS binary table. The +size of the heap, in bytes, is specified with the PCOUNT keyword in the +FITS header. When creating a new binary table, the initial value of +PCOUNT should usually be set to zero. FITSIO will recompute the size +of the heap as the data is written and will automatically update the +PCOUNT keyword value when the table is closed. When writing variable +length data to a table, CFITSIO will automatically extend the size +of the heap area if necessary, so that any following HDUs do not +get overwritten. + +By default the heap data area starts immediately after the last row of +the fixed-length table. This default starting location may be +overridden by the THEAP keyword, but this is not recommended. +If additional rows of data are added to the table, CFITSIO will +automatically shift the the heap down to make room for the new +rows, but it is obviously be more efficient to initially +create the table with the necessary number of blank rows, so that +the heap does not needed to be constantly moved. + +When writing to a variable length field, the entire array of values for +a given row of the table must be written with a single call to FTPCLx. +The total length of the array is calculated from (NELEM+FELEM-1). One +cannot append more elements to an existing field at a later time; any +attempt to do so will simply overwrite all the data which was previously +written. Note also that the new data will be written to a new area of +the heap and the heap space used by the previous write cannot be +reclaimed. For this reason it is advised that each row of a variable +length field only be written once. An exception to this general rule +occurs when setting elements of an array as undefined. One must first +write a dummy value into the array with FTPCLx, and then call FTPCLU to +flag the desired elements as undefined. (Do not use the FTPCNx family +of routines with variable length fields). Note that the rows of a table, +whether fixed or variable length, do not have to be written +consecutively and may be written in any order. + +When writing to a variable length ASCII character field (e.g., TFORM = +'1PA') only a single character string written. FTPCLS writes the whole +length of the input string (minus any trailing blank characters), thus +the NELEM and FELEM parameters are ignored. If the input string is +completely blank then FITSIO will write one blank character to the FITS +file. Similarly, FTGCVS and FTGCFS read the entire string (truncated +to the width of the character string argument in the subroutine call) +and also ignore the NELEM and FELEM parameters. + +The FTPDES subroutine is useful in situations where multiple rows of a +variable length column have the identical array of values. One can +simply write the array once for the first row, and then use FTPDES to +write the same descriptor values into the other rows (use the FTGDES +routine to read the first descriptor value); all the rows will then +point to the same storage location thus saving disk space. + +When reading from a variable length array field one can only read as +many elements as actually exist in that row of the table; reading does +not automatically continue with the next row of the table as occurs +when reading an ordinary fixed length table field. Attempts to read +more than this will cause an error status to be returned. One can +determine the number of elements in each row of a variable column with +the FTGDES subroutine. + +**I. Support for IEEE Special Values + +The ANSI/IEEE-754 floating-point number standard defines certain +special values that are used to represent such quantities as +Not-a-Number (NaN), denormalized, underflow, overflow, and infinity. +(See the Appendix in the NOST FITS standard or the NOST FITS User's +Guide for a list of these values). The FITSIO subroutines that read +floating point data in FITS files recognize these IEEE special values +and by default interpret the overflow and infinity values as being +equivalent to a NaN, and convert the underflow and denormalized values +into zeros. In some cases programmers may want access to the raw IEEE +values, without any modification by FITSIO. This can be done by +calling the FTGPVx or FTGCVx routines while specifying 0.0 as the value +of the NULLVAL parameter. This will force FITSIO to simply pass the +IEEE values through to the application program, without any +modification. This does not work for double precision values on +VAX/VMS machines, however, where there is no easy way to bypass the +default interpretation of the IEEE special values. + +**J. When the Final Size of the FITS HDU is Unknown + +It is not required to know the total size of a FITS data array or table +before beginning to write the data to the FITS file. In the case of +the primary array or an image extension, one should initially create +the array with the size of the highest dimension (largest NAXISn +keyword) set to a dummy value, such as 1. Then after all the data have +been written and the true dimensions are known, then the NAXISn value +should be updated using the fits\_ update\_key routine before moving to +another extension or closing the FITS file. + +When writing to FITS tables, CFITSIO automatically keeps track of the +highest row number that is written to, and will increase the size of +the table if necessary. CFITSIO will also automatically insert space +in the FITS file if necessary, to ensure that the data 'heap', if it +exists, and/or any additional HDUs that follow the table do not get +overwritten as new rows are written to the table. + +As a general rule it is best to specify the initial number of rows = 0 +when the table is created, then let CFITSIO keep track of the number of +rows that are actually written. The application program should not +manually update the number of rows in the table (as given by the NAXIS2 +keyword) since CFITSIO does this automatically. If a table is +initially created with more than zero rows, then this will usually be +considered as the minimum size of the table, even if fewer rows are +actually written to the table. Thus, if a table is initially created +with NAXIS2 = 20, and CFITSIO only writes 10 rows of data before +closing the table, then NAXIS2 will remain equal to 20. If however, 30 +rows of data are written to this table, then NAXIS2 will be increased +from 20 to 30. The one exception to this automatic updating of the +NAXIS2 keyword is if the application program directly modifies the +value of NAXIS2 (up or down) itself just before closing the table. In this +case, CFITSIO does not update NAXIS2 again, since it assumes that the +application program must have had a good reason for changing the value +directly. This is not recommended, however, and is only provided for +backward compatibility with software that initially creates a table +with a large number of rows, than decreases the NAXIS2 value to the +actual smaller value just before closing the table. + +**K. Local FITS Conventions supported by FITSIO + +CFITSIO supports several local FITS conventions which are not +defined in the official NOST FITS standard and which are not +necessarily recognized or supported by other FITS software packages. +Programmers should be cautious about using these features, especially +if the FITS files that are produced are expected to be processed by +other software systems which do not use the CFITSIO interface. + +***1. Support for Long String Keyword Values. + +The length of a standard FITS string keyword is limited to 68 +characters because it must fit entirely within a single FITS header +keyword record. In some instances it is necessary to encode strings +longer than this limit, so FITSIO supports a local convention in which +the string value is continued over multiple keywords. This +continuation convention uses an ampersand character at the end of each +substring to indicate that it is continued on the next keyword, and the +continuation keywords all have the name CONTINUE without an equal sign +in column 9. The string value may be continued in this way over as many +additional CONTINUE keywords as is required. The following lines +illustrate this continuation convention which is used in the value of +the STRKEY keyword: +- +LONGSTRN= 'OGIP 1.0' / The OGIP Long String Convention may be used. +STRKEY = 'This is a very long string keyword&' / Optional Comment +CONTINUE ' value that is continued over 3 keywords in the & ' +CONTINUE 'FITS header.' / This is another optional comment. +- +It is recommended that the LONGSTRN keyword, as shown +here, always be included in any HDU that uses this longstring +convention. A subroutine called FTPLSW +has been provided in CFITSIO to write this keyword if it does not +already exist. + +This long string convention is supported by the following FITSIO +subroutines that deal with string-valued keywords: +- + ftgkys - read a string keyword + ftpkls - write (append) a string keyword + ftikls - insert a string keyword + ftmkls - modify the value of an existing string keyword + ftukls - update an existing keyword, or write a new keyword + ftdkey - delete a keyword +- +These routines will transparently read, write, or delete a long string +value in the FITS file, so programmers in general do not have to be +concerned about the details of the convention that is used to encode +the long string in the FITS header. When reading a long string, one +must ensure that the character string parameter used in these +subroutine calls has been declared long enough to hold the entire +string, otherwise the returned string value will be truncated. + +Note that the more commonly used FITSIO subroutine to write string +valued keywords (FTPKYS) does NOT support this long string convention +and only supports strings up to 68 characters in length. This has been +done deliberately to prevent programs from inadvertently writing +keywords using this non-standard convention without the explicit intent +of the programmer or user. The FTPKLS subroutine must be called +instead to write long strings. This routine can also be used to write +ordinary string values less than 68 characters in length. + +***2. Arrays of Fixed-Length Strings in Binary Tables + +CFITSIO supports 2 ways to specify that a character column in a binary +table contains an array of fixed-length strings. The first way, which +is offically supported by the FITS Standard document, uses the TDIMn keyword. +For example, if TFORMn = '60A' and TDIMn = '(12,5)' then that +column will be interpreted as containing an array of 5 strings, each 12 +characters long. + +FITSIO also supports a +local convention for the format of the TFORMn keyword value of the form +'rAw' where 'r' is an integer specifying the total width in characters +of the column, and 'w' is an integer specifying the (fixed) length of +an individual unit string within the vector. For example, TFORM1 = +'120A10' would indicate that the binary table column is 120 characters +wide and consists of 12 10-character length strings. This convention +is recognized by the FITSIO subroutines that read or write strings in +binary tables. The Binary Table definition document specifies that +other optional characters may follow the datatype code in the TFORM +keyword, so this local convention is in compliance with the +FITS standard, although other FITS readers are not required to +recognize this convention. + +The Binary Table definition document that was approved by the IAU in +1994 contains an appendix describing an alternate convention for +specifying arrays of fixed or variable length strings in a binary table +character column (with the form 'rA:SSTRw/nnn)'. This appendix was not +officially voted on by the IAU and hence is still provisional. FITSIO +does not currently support this proposal. + +***3. Keyword Units Strings + +One deficiency of the current FITS Standard is that it does not define +a specific convention for recording the physical units of a keyword +value. The TUNITn keyword can be used to specify the physical units of +the values in a table column, but there is no analogous convention for +keyword values. The comment field of the keyword is often used for +this purpose, but the units are usually not specified in a well defined +format that FITS readers can easily recognize and extract. + +To solve this deficiency, FITSIO uses a local convention in which the +keyword units are enclosed in square brackets as the first token in the +keyword comment field; more specifically, the opening square bracket +immediately follows the slash '/' comment field delimiter and a single +space character. The following examples illustrate keywords that use +this convention: + +- +EXPOSURE= 1800.0 / [s] elapsed exposure time +V_HELIO = 16.23 / [km s**(-1)] heliocentric velocity +LAMBDA = 5400. / [angstrom] central wavelength +FLUX = 4.9033487787637465E-30 / [J/cm**2/s] average flux +- + +In general, the units named in the IAU(1988) Style Guide are +recommended, with the main exception that the preferred unit for angle +is 'deg' for degrees. + +The FTPUNT and FTGUNT subroutines in FITSIO write and read, +respectively, the keyword unit strings in an existing keyword. + +***4. HIERARCH Convention for Extended Keyword Names + +CFITSIO supports the HIERARCH keyword convention which allows keyword +names that are longer then 8 characters and may contain the full range +of printable ASCII text characters. This convention +was developed at the European Southern Observatory (ESO) to support +hierarchical FITS keyword such as: +- +HIERARCH ESO INS FOCU POS = -0.00002500 / Focus position +- +Basically, this convention uses the FITS keyword 'HIERARCH' to indicate +that this convention is being used, then the actual keyword name +({\tt'ESO INS FOCU POS'} in this example) begins in column 10 and can +contain any printable ASCII text characters, including spaces. The +equals sign marks the end of the keyword name and is followed by the +usual value and comment fields just as in standard FITS keywords. +Further details of this convention are described at +http://arcdev.hq.eso.org/dicb/dicd/dic-1-1.4.html (search for +HIERARCH). + +This convention allows a much broader range of keyword names +than is allowed by the FITS Standard. Here are more examples +of such keywords: +- +HIERARCH LongKeyword = 47.5 / Keyword has > 8 characters, and mixed case +HIERARCH XTE$TEMP = 98.6 / Keyword contains the '$' character +HIERARCH Earth is a star = F / Keyword contains embedded spaces +- +CFITSIO will transparently read and write these keywords, so application +programs do not in general need to know anything about the specific +implementation details of the HIERARCH convention. In particular, +application programs do not need to specify the `HIERARCH' part of the +keyword name when reading or writing keywords (although it +may be included if desired). When writing a keyword, CFITSIO first +checks to see if the keyword name is legal as a standard FITS keyword +(no more than 8 characters long and containing only letters, digits, or +a minus sign or underscore). If so it writes it as a standard FITS +keyword, otherwise it uses the hierarch convention to write the +keyword. The maximum keyword name length is 67 characters, which +leaves only 1 space for the value field. A more practical limit is +about 40 characters, which leaves enough room for most keyword values. +CFITSIO returns an error if there is not enough room for both the +keyword name and the keyword value on the 80-character card, except for +string-valued keywords which are simply truncated so that the closing +quote character falls in column 80. In the current implementation, +CFITSIO preserves the case of the letters when writing the keyword +name, but it is case-insensitive when reading or searching for a +keyword. The current implementation allows any ASCII text character +(ASCII 32 to ASCII 126) in the keyword name except for the '=' +character. A space is also required on either side of the equal sign. + +**L. Optimizing Code for Maximum Processing Speed + +CFITSIO has been carefully designed to obtain the highest possible +speed when reading and writing FITS files. In order to achieve the +best performance, however, application programmers must be careful to +call the CFITSIO routines appropriately and in an efficient sequence; +inappropriate usage of CFITSIO routines can greatly slow down the +execution speed of a program. + +The maximum possible I/O speed of CFITSIO depends of course on the type +of computer system that it is running on. As a rough guide, the +current generation of workstations can achieve speeds of 2 -- 10 MB/s +when reading or writing FITS images and similar, or slightly slower +speeds with FITS binary tables. Reading of FITS files can occur at +even higher rates (30MB/s or more) if the FITS file is still cached in +system memory following a previous read or write operation on the same +file. To more accurately predict the best performance that is possible +on any particular system, a diagnostic program called ``speed.c'' is +included with the CFITSIO distribution which can be run to +approximately measure the maximum possible speed of writing and reading +a test FITS file. + +The following 2 sections provide some background on how CFITSIO +internally manages the data I/O and describes some strategies that may +be used to optimize the processing speed of software that uses +CFITSIO. + +***1. Background Information: How CFITSIO Manages Data I/O + +Many CFITSIO operations involve transferring only a small number of +bytes to or from the FITS file (e.g, reading a keyword, or writing a +row in a table); it would be very inefficient to physically read or +write such small blocks of data directly in the FITS file on disk, +therefore CFITSIO maintains a set of internal Input--Output (IO) +buffers in RAM memory that each contain one FITS block (2880 bytes) of +data. Whenever CFITSIO needs to access data in the FITS file, it first +transfers the FITS block containing those bytes into one of the IO +buffers in memory. The next time CFITSIO needs to access bytes in the +same block it can then go to the fast IO buffer rather than using a +much slower system disk access routine. The number of available IO +buffers is determined by the NIOBUF parameter (in fitsio2.h) and is +currently set to 40. + +Whenever CFITSIO reads or writes data it first checks to see if that +block of the FITS file is already loaded into one of the IO buffers. +If not, and if there is an empty IO buffer available, then it will load +that block into the IO buffer (when reading a FITS file) or will +initialize a new block (when writing to a FITS file). If all the IO +buffers are already full, it must decide which one to reuse (generally +the one that has been accessed least recently), and flush the contents +back to disk if it has been modified before loading the new block. + +The one major exception to the above process occurs whenever a large +contiguous set of bytes are accessed, as might occur when reading or +writing a FITS image. In this case CFITSIO bypasses the internal IO +buffers and simply reads or writes the desired bytes directly in the +disk file with a single call to a low-level file read or write +routine. The minimum threshold for the number of bytes to read or +write this way is set by the MINDIRECT parameter and is currently set +to 3 FITS blocks = 8640 bytes. This is the most efficient way to read +or write large chunks of data and can achieve IO transfer rates of +5 -- 10MB/s or greater. Note that this fast direct IO process is not +applicable when accessing columns of data in a FITS table because the +bytes are generally not contiguous since they are interleaved by the +other columns of data in the table. This explains why the speed for +accessing FITS tables is generally slower than accessing +FITS images. + +Given this background information, the general strategy for efficiently +accessing FITS files should now be apparent: when dealing with FITS +images, read or write large chunks of data at a time so that the direct +IO mechanism will be invoked; when accessing FITS headers or FITS +tables, on the other hand, once a particular FITS block has been +loading into one of the IO buffers, try to access all the needed +information in that block before it gets flushed out of the IO buffer. +It is important to avoid the situation where the same FITS block is +being read then flushed from a IO buffer multiple times. + +The following section gives more specific suggestions for optimizing +the use of CFITSIO. + +1. When dealing with a FITS primary array or IMAGE extension, it is +more efficient to read or write large chunks of the image at a time +(at least 3 FITS blocks = 8640 bytes) so that the direct IO mechanism +will be used as described in the previous section. Smaller chunks of +data are read or written via the IO buffers, which is somewhat less +efficient because of the extra copy operation and additional +bookkeeping steps that are required. In principle it is more efficient +to read or write as big an array of image pixels at one time as +possible, however, if the array becomes so large that the operating +system cannot store it all in RAM, then the performance may be degraded +because of the increased swapping of virtual memory to disk. + +2. When dealing with FITS tables, the most important efficiency factor +in the software design is to read or write the data in the FITS file in +a single pass through the file. An example of poor program design +would be to read a large, 3-column table by sequentially reading the +entire first column, then going back to read the 2nd column, and +finally the 3rd column; this obviously requires 3 passes through the +file which could triple the execution time of an I/O limited program. +For small tables this is not important, but when reading multi-megabyte +sized tables these inefficiencies can become significant. The more +efficient procedure in this case is to read or write only as many rows +of the table as will fit into the available internal I/O buffers, then +access all the necessary columns of data within that range of rows. +Then after the program is completely finished with the data in those +rows it can move on to the next range of rows that will fit in the +buffers, continuing in this way until the entire file has been +processed. By using this procedure of accessing all the columns of a +table in parallel rather than sequentially, each block of the FITS file +will only be read or written once. + +The optimal number of rows to read or write at one time in a given +table depends on the width of the table row, on the number of I/O +buffers that have been allocated in FITSIO, and also on the number of +other FITS files that are open at the same time (since one I/O buffer +is always reserved for each open FITS file). Fortunately, a FITSIO +routine is available that will return the optimal number of rows for a +given table: call ftgrsz(unit, nrows, status). It is not critical to +use exactly the value of nrows returned by this routine, as long as one +does not exceed it. Using a very small value however can also lead to +poor performance because of the overhead from the larger number of +subroutine calls. + +The optimal number of rows returned by ftgrsz is valid only as long as +the application program is only reading or writing data in the +specified table. Any other calls to access data in the table header or +in any other FITS file would cause additional blocks of data to be +loaded into the I/O buffers displacing data from the original table, +and should be avoided during the critical period while the table is +being read or written. + +Occasionally it is necessary to simultaneously access more than one +FITS table, for example when transferring values from an input table to +an output table. In cases like this, one should call ftgrsz to get the +optimal number of rows for each table separately, than reduce the +number of rows proportionally. For example, if the optimal number of +rows in the input table is 3600 and is 1400 in the output table, then +these values should be cut in half to 1800 and 700, respectively, if +both tables are going to be accessed at the same time. + +3. Use binary table extensions rather than ASCII table +extensions for better efficiency when dealing with tabular data. The +I/O to ASCII tables is slower because of the overhead in formatting or +parsing the ASCII data fields, and because ASCII tables are about twice +as large as binary tables with the same information content. + +4. Design software so that it reads the FITS header keywords in the +same order in which they occur in the file. When reading keywords, +FITSIO searches forward starting from the position of the last keyword +that was read. If it reaches the end of the header without finding the +keyword, it then goes back to the start of the header and continues the +search down to the position where it started. In practice, as long as +the entire FITS header can fit at one time in the available internal I/O +buffers, then the header keyword access will be very fast and it makes +little difference which order they are accessed. + +5. Avoid the use of scaling (by using the BSCALE and BZERO or TSCAL and +TZERO keywords) in FITS files since the scaling operations add to the +processing time needed to read or write the data. In some cases it may +be more efficient to temporarily turn off the scaling (using ftpscl or +fttscl) and then read or write the raw unscaled values in the FITS +file. + +6. Avoid using the 'implicit datatype conversion' capability in +FITSIO. For instance, when reading a FITS image with BITPIX = -32 +(32-bit floating point pixels), read the data into a single precision +floating point data array in the program. Forcing FITSIO to convert +the data to a different datatype can significantly slow the program. + +7. Where feasible, design FITS binary tables using vector column +elements so that the data are written as a contiguous set of bytes, +rather than as single elements in multiple rows. For example, it is +faster to access the data in a table that contains a single row +and 2 columns with TFORM keywords equal to '10000E' and '10000J', than +it is to access the same amount of data in a table with 10000 rows +which has columns with the TFORM keywords equal to '1E' and '1J'. In +the former case the 10000 floating point values in the first column are +all written in a contiguous block of the file which can be read or +written quickly, whereas in the second case each floating point value +in the first column is interleaved with the integer value in the second +column of the same row so CFITSIO has to explicitly move to the +position of each element to be read or written. + +8. Avoid the use of variable length vector columns in binary tables, +since any reading or writing of these data requires that CFITSIO first +look up or compute the starting address of each row of data in the +heap. + +9. When copying data from one FITS table to another, it is faster to +transfer the raw bytes instead of reading then writing each column of +the table. The FITSIO subroutines FTGTBS and FTPTBS (for ASCII +tables), and FTGTBB and FTPTBB (for binary tables) will perform +low-level reads or writes of any contiguous range of bytes in a table +extension. These routines can be used to read or write a whole row (or +multiple rows) of a table with a single subroutine call. These +routines are fast because they bypass all the usual data scaling, error +checking and machine dependent data conversion that is normally done by +FITSIO, and they allow the program to write the data to the output file +in exactly the same byte order. For these same reasons, use of these +routines can be somewhat risky because no validation or machine +dependent conversion is performed by these routines. In general these +routines are only recommended for optimizing critical pieces of code +and should only be used by programmers who thoroughly understand the +internal byte structure of the FITS tables they are reading or +writing. + +10. Another strategy for improving the speed of writing a FITS table, +similar to the previous one, is to directly construct the entire byte +stream for a whole table row (or multiple rows) within the application +program and then write it to the FITS file with +ftptbb. This avoids all the overhead normally present +in the column-oriented CFITSIO write routines. This technique should +only be used for critical applications, because it makes the code more +difficult to understand and maintain, and it makes the code more system +dependent (e.g., do the bytes need to be swapped before writing to the +FITS file?). + +11. Finally, external factors such as the type of magnetic disk +controller (SCSI or IDE), the size of the disk cache, the average seek +speed of the disk, the amount of disk fragmentation, and the amount of +RAM available on the system can all have a significant impact on +overall I/O efficiency. For critical applications, a system +administrator should review the proposed system hardware to identify any +potential I/O bottlenecks. + + + +*VII. Basic Interface Routines + +This section defines a basic set of subroutines that can be +used to perform the most common types of read and write operations +on FITS files. New users should start with these subroutines and +then, as needed, explore the more advance routines described in +the following chapter to perform more complex or specialized operations. + +A right arrow symbol ($>$) is used to separate the input parameters from +the output parameters in the definition of each routine. This symbol +is not actually part of the calling sequence. Note that +the status parameter is both an input and an output parameter +and must be initialized = 0 prior to calling the FITSIO subroutines. + +Refer to Chapter 9 for the definition of all the parameters +used by these interface routines. + +**A. FITSIO Error Status Routines \label{FTVERS} + +>1 Return the current version number of the fitsio library. + The version number will be incremented with each new +> release of CFITSIO. +- + FTVERS( > version) +- +>2 Return the descriptive text string corresponding to a FITSIO error + status code. The 30-character length string contains a brief +> description of the cause of the error. +- + FTGERR(status, > errtext) +- +>3 Return the top (oldest) 80-character error message from the + internal FITSIO stack of error messages and shift any remaining + messages on the stack up one level. Any FITSIO error will + generate one or more messages on the stack. Call this routine + repeatedly to get each message in sequence. The error stack is empty +> when a blank string is returned. +- + FTGMSG( > errmsg) +- +>4 The FTPMRK routine puts an invisible marker on the + CFITSIO error stack. The FTCMRK routine can then be + used to delete any more recent error messages on the stack, back to + the position of the marker. This preserves any older error messages + on the stack. FTCMSG simply clears the entire error message stack. +> These routines are called without any arguments. +- + FTPMRK + FTCMRK + FTCMSG +- + +>5 Print out the error message corresponding to the input status + value and all the error messages on the FITSIO stack to the specified + file stream (stream can be either the string 'STDOUT' or 'STDERR'). +> If the input status value = 0 then this routine does nothing. +- + FTRPRT (stream, > status) +- +>6 Write an 80-character message to the FITSIO error stack. Application + programs should not normally write to the stack, but there may be +> some situations where this is desirable. +- + FTPMSG(errmsg) +- + +**B. File I/O Routines + +>1 Open an existing FITS file with readonly or readwrite access. + This routine always opens the primary array (the first HDU) of + the file, and does not move to a following extension, if one was + specified as part of the filename. Use the FTNOPN routine to + automatically move to the extension. This routine will also + open IRAF images (.imh format files) and raw binary data arrays + with READONLY access by first converting them on the fly into + virtual FITS images. See the `Extended File Name Syntax' chapter + for more details. The FTDKOPEN routine simply opens the specified + file without trying to interpret the filename using the extended +> filename syntax. +- + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) +- +>2 Open an existing FITS file with readonly or readwrite access + and move to a following extension, if one was specified as + part of the filename. (e.g., 'filename.fits+2' or + 'filename.fits[2]' will move to the 3rd HDU in the file). + Note that this routine differs from FTOPEN in that it does not +> have the redundant blocksize argument. +- + FTNOPN(unit,filename,rwmode, > status) +- +>3 Open an existing FITS file with readonly or readwrite access + and then move to the first HDU containing significant data, if a) an HDU + name or number to open was not explicitly specified as part of the + filename, and b) if the FITS file contains a null primary array (i.e., + NAXIS = 0). In this case, it will look for the first IMAGE HDU with + NAXIS > 0, or the first table that does not contain the strings `GTI' + (Good Time Interval) or `OBSTABLE' in the EXTNAME keyword value. FTTOPN + is similar, except it will move to the first significant table HDU + (skipping over any image HDUs) in the file if a specific HDU name + or number is not specified. FTIOPN will move to the first non-null +> image HDU, skipping over any tables. +- + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) +- +>4 Open and initialize a new empty FITS file. A template file may also be + specified to define the structure of the new file (see section 4.2.4). + The FTDKINIT routine simply creates the specified + file without trying to interpret the filename using the extended +> filename syntax. +- + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) +- +>>5 Close a FITS file previously opened with ftopen or ftinit +- + FTCLOS(unit, > status) +- +>6 Move to a specified (absolute) HDU in the FITS file (nhdu = 1 for the +> FITS primary array) +- + FTMAHD(unit,nhdu, > hdutype,status) +- +>7 Create a primary array (if none already exists), or insert a + new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = -9 prior + to calling the routine. In this case the existing primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. The FTIIMGLL routine is identical + to the FTIIMG routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array +> of 32-bit integers. +- + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTIIMGLL(unit,bitpix,naxis,naxesll, > status) +- +>8 Insert a new ASCII TABLE extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new table extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTITABLL + routine is identical + to the FTITAB routine except that the 2nd and 3rd parameters (that give + the size of the table) are 64-bit integers rather than +> 32-bit integers. +- + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTITABLL(unit,rowlenll,nrowsll,tfields,ttype,tbcol,tform,tunit,extname, > + status) +- +>9 Insert a new binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new bintable extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTIBINLL + routine is identical + to the FTIBIN routine except that the 2nd parameter (that gives + the length of the table) is a 64-bit integer rather than +> a 32-bit integer. +- + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTIBINLL(unit,nrowsll,tfields,ttype,tform,tunit,extname,varidat > status) + +- +**C. Keyword I/O Routines + +>>1 Put (append) an 80-character record into the CHU. +- + FTPREC(unit,card, > status) +- +>2 Put (append) a new keyword of the appropriate datatype into the CHU. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, +> depending on the magnitude of the value. +- + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +- +>3 Get the nth 80-character header record from the CHU. The first keyword + in the header is at key\_no = 1; if key\_no = 0 then this subroutine + simple moves the internal pointer to the beginning of the header + so that subsequent keyword operations will start at the top of +> the header; it also returns a blank card value in this case. +- + FTGREC(unit,key_no, > card,status) +- +>4 Get a keyword value (with the appropriate datatype) and comment from +> the CHU +- + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) +- +>>5 Delete an existing keyword record. +- + FTDKEY(unit,keyword, > status) +- + +**D. Data I/O Routines + +The following routines read or write data values in the current HDU of +the FITS file. Automatic datatype conversion +will be attempted for numerical datatypes if the specified datatype is +different from the actual datatype of the FITS array or table column. + +>>1 Write elements into the primary data array or image extension. +- + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) +- +>2 Read elements from the primary data array or image extension. + Undefined array elements will be + returned with a value = nullval, unless nullval = 0 in which case no + checks for undefined pixels will be performed. The anyf parameter is + set to true (= .true.) if any of the returned +> elements were undefined. +- + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) +- +>3 Write elements into an ASCII or binary table column. The `felem' + parameter applies only to vector columns in binary tables and is +> ignored when writing to ASCII tables. +- + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) +- +>4 Read elements from an ASCII or binary table column. Undefined + array elements will be returned with a value = nullval, unless nullval = 0 + (or = ' ' for ftgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned + elements are undefined. + + Any column, regardless of it's intrinsic datatype, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column + as a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + datatype of the column. The length of the returned strings can be + determined with the ftgcdw routine. The following TDISPn display + formats are currently supported: +- + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +- + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the +> decimal. The .m field is optional. + +- + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) +- +>5 Get the table column number and full name of the column whose name + matches the input template string. See the `Advanced Interface Routines' +> chapter for a full description of this routine. +- + FTGCNN(unit,casesen,coltemplate, > colname,colnum,status) +- + + +*VIII Advanced Interface Subroutines + +This chapter defines all the available subroutines in the FITSIO user +interface. For completeness, the basic subroutines described in the +previous chapter are also repeated here. A right arrow symbol is used +here to separate the input parameters from the output parameters in the +definition of each subroutine. This symbol is not actually part of the +calling sequence. An alphabetical list and definition of all the +parameters is given at the end of this section. + +**A. FITS File Open and Close Subroutines: \label{FTOPEN} + +>1 Open an existing FITS file with readonly or readwrite access. The +FTDKOPEN routine simply opens the specified file without trying to +interpret the filename using the extended filename syntax. FTDOPN opens +the file and +also moves to the first HDU containing significant data, if no specific +HDU is specified as part of the filename. FTTOPN and FTIOPN are similar +except that they will move to the first table HDU or image HDU, respectively, +>if a HDU name or number is not specified as part of the filename. +- + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) + + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) +- + +>2 Open an existing FITS file with readonly or readwrite access + and move to a following extension, if one was specified as + part of the filename. (e.g., 'filename.fits+2' or + 'filename.fits[2]' will move to the 3rd HDU in the file). + Note that this routine differs from FTOPEN in that it does not +> have the redundant blocksize argument. +- + FTNOPN(unit,filename,rwmode, > status) +- +>3 Reopen a FITS file that was previously opened with + FTOPEN, FTNOPN, or FTINIT. The newunit number + may then be treated as a separate file, and one may + simultaneously read or write to 2 (or more) different extensions in + the same file. The FTOPEN and FTNOPN routines (above) automatically + detects cases where a previously opened file is being opened again, + and then internally call FTREOPEN, so programs should rarely +> need to explicitly call this routine. +- + FTREOPEN(unit, > newunit, status) +- +>4 Open and initialize a new empty FITS file. + The FTDKINIT routine simply creates the specified + file without trying to interpret the filename using the extended +> filename syntax. +- + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) +- + +>5 Create a new FITS file, using a template file to define its + initial size and structure. The template may be another FITS HDU + or an ASCII template file. If the input template file name + is blank, then this routine behaves the same as FTINIT. + The currently supported format of the ASCII template file is described + under the fits\_parse\_template routine (in the general Utilities + section), but this may change slightly later releases of +> CFITSIO. +- + FTTPLT(unit, filename, tplfilename, > status) +- +>6 Flush internal buffers of data to the output FITS file + previously opened with ftopen or ftinit. The routine usually + never needs to be called, but doing so will ensure that + if the program subsequently aborts, then the FITS file will +> have at least been closed properly. +- + FTFLUS(unit, > status) +- +>>7 Close a FITS file previously opened with ftopen or ftinit +- + FTCLOS(unit, > status) +- +>8 Close and DELETE a FITS file previously opened with ftopen or ftinit. + This routine may be useful in cases where a FITS file is created, but +> an error occurs which prevents the complete file from being written. +- + FTDELT(unit, > status) +- +>9 Get the value of an unused I/O unit number which may then be used + as input to FTOPEN or FTINIT. This routine searches for the first + unused unit number in the range from with 99 down to 50. This + routine just keeps an internal list of the allocated unit numbers + and does not physically check that the Fortran unit is available (to be + compatible with the SPP version of FITSIO). Thus users must not + independently allocate any unit numbers in the range 50 - 99 + if this routine is also to be used in the same program. This + routine is provided for convenience only, and it is not required +> that the unit numbers used by FITSIO be allocated by this routine. +- + FTGIOU( > iounit, status) +- +>10 Free (deallocate) an I/O unit number which was previously allocated + with FTGIOU. All previously allocated unit numbers may be +> deallocated at once by calling FTFIOU with iounit = -1. +- + FTFIOU(iounit, > status) +- +>11 Return the Fortran unit number that corresponds to the C fitsfile +pointer value, or vice versa. These 2 C routines may be useful in +mixed language programs where both C and Fortran subroutines need +to access the same file. For example, if a FITS file is opened +with unit 12 by a Fortran subroutine, then a C routine within the +same program could get the fitfile pointer value to access the same file +by calling 'fptr = CUnit2FITS(12)'. These routines return a value +>of zero if an error occurs. +- + int CFITS2Unit(fitsfile *ptr); + fitsfile* CUnit2FITS(int unit); +- + +>11 Parse the input filename and return the HDU number that would be +moved to if the file were opened with FTNOPN. The returned HDU +number begins with 1 for the primary array, so for example, if the +input filename = `myfile.fits[2]' then hdunum = 3 will be returned. +FITSIO does not open the file to check if the extension actually exists +if an extension number is specified. If an extension *name* is included +in the file name specification (e.g. `myfile.fits[EVENTS]' then this +routine will have to open the FITS file and look for the position of +the named extension, then close file again. This is not possible if +the file is being read from the stdin stream, and an error will be +returned in this case. If the filename does not specify an explicit +extension (e.g. 'myfile.fits') then hdunum = -99 will be returned, +which is functionally equivalent to hdunum = 1. This routine is mainly +used for backward compatibility in the ftools software package and is +not recommended for general use. It is generally better and more +efficient to first open the FITS file with FTNOPN, then use FTGHDN to +determine which HDU in the file has been opened, rather than calling +> FTEXTN followed by a call to FTNOPN. +- + FTEXTN(filename, > nhdu, status) +- +>>12 Return the name of the opened FITS file. +- + FTFLNM(unit, > filename, status) +- +>>13 Return the I/O mode of the open FITS file (READONLY = 0, READWRITE = 1). +- + FTFLMD(unit, > iomode, status) +- +>14 Return the file type of the opened FITS file (e.g. 'file://', 'ftp://', +> etc.). +- + FTURLT(unit, > urltype, status) +- +>15 Parse the input filename or URL into its component parts: the file +type (file://, ftp://, http://, etc), the base input file name, the +name of the output file that the input file is to be copied to prior +to opening, the HDU or extension specification, the filtering +specifier, the binning specifier, and the column specifier. Blank +strings will be returned for any components that are not present +>in the input file name. +- + FTIURL(filename, > filetype, infile, outfile, extspec, filter, + binspec, colspec, status) +- +>16 Parse the input file name and return the root file name. The root +name includes the file type if specified, (e.g. 'ftp://' or 'http://') +and the full path name, to the extent that it is specified in the input +filename. It does not include the HDU name or number, or any filtering +>specifications. +- + FTRTNM(filename, > rootname, status) +- + +>16 Test if the input file or a compressed version of the file (with +a .gz, .Z, .z, or .zip extension) exists on disk. The returned value of +the 'exists' parameter will have 1 of the 4 following values: +- + 2: the file does not exist, but a compressed version does exist + 1: the disk file does exist + 0: neither the file nor a compressed version of the file exist + -1: the input file name is not a disk file (could be a ftp, http, + smem, or mem file, or a file piped in on the STDIN stream) +- +> +- + FTEXIST(filename, > exists, status); +- +**B. HDU-Level Operations \label{FTMAHD} + +When a FITS file is first opened or created, the internal buffers in +FITSIO automatically point to the first HDU in the file. The following +routines may be used to move to another HDU in the file. Note that +the HDU numbering convention used in FITSIO denotes the primary array +as the first HDU, the first extension in a FITS file is the second HDU, +and so on. + +>1 Move to a specified (absolute) HDU in the FITS file (nhdu = 1 for the +> FITS primary array) +- + FTMAHD(unit,nhdu, > hdutype,status) +- +>>2 Move to a new (existing) HDU forward or backwards relative to the CHDU +- + FTMRHD(unit,nmove, > hdutype,status) +- +>3 Move to the (first) HDU which has the specified extension type and + EXTNAME (or HDUNAME) and EXTVER keyword values. The hdutype parameter + may have + a value of IMAGE\_HDU (0), ASCII\_TBL (1), BINARY\_TBL (2), or ANY\_HDU (-1) + where ANY\_HDU means that only the extname and extver values will be + used to locate the correct extension. If the input value of + extver is 0 then the EXTVER keyword is ignored and the first HDU + with a matching EXTNAME (or HDUNAME) keyword will be found. If no + matching HDU is found in the file then the current HDU will remain + unchanged +> and a status = BAD\_HDU\_NUM (301) will be returned. +- + FTMNHD(unit, hdutype, extname, extver, > status) +- +>>4 Get the number of the current HDU in the FITS file (primary array = 1) +- + FTGHDN(unit, > nhdu) +- +>5 Return the type of the current HDU in the FITS file. The possible +> values for hdutype are IMAGE\_HDU (0), ASCII\_TBL (1), or BINARY\_TBL (2). +- + FTGHDT(unit, > hdutype, status) +- +>6 Return the total number of HDUs in the FITS file. +> The CHDU remains unchanged. +- + FTTHDU(unit, > hdunum, status) +- +>7 Create (append) a new empty HDU following the last extension that + has been previously accessed by the program. This will overwrite + any extensions in an existing FITS file if the program has not already + moved to that (or a later) extension using the FTMAHD or FTMRHD routines. + For example, if an existing FITS file contains a primary array and 5 + extensions and a program (1) opens the FITS file, (2) moves to + extension 4, (3) moves back to the primary array, and (4) then calls + FTCRHD, then the new extension will be written following the 4th +> extension, overwriting the existing 5th extension. +- + FTCRHD(unit, > status) +- + +>8 Create a primary array (if none already exists), or insert a + new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = -9 prior + to calling the routine. In this case the existing primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. The FTIIMGLL routine is identical + to the FTIIMG routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array +> of 32-bit integers. +- + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTIIMGLL(unit,bitpix,naxis,naxesll, > status) +- +>9 Insert a new ASCII TABLE extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new table extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTITABLL + routine is identical + to the FTITAB routine except that the 2nd and 3rd parameters (that give + the size of the table) are 64-bit integers rather than +> 32-bit integers. +- + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTITABLL(unit,rowlenll,nrowsll,tfields,ttype,tbcol,tform,tunit,extname, > + status) +- + +>10 Insert a new binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new bintable extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTIBINLL + routine is identical + to the FTIBIN routine except that the 2nd parameter (that gives + the length of the table) is a 64-bit integer rather than +> a 32-bit integer. +- + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTIBINLL(unit,nrowsll,tfields,ttype,tform,tunit,extname,varidat > status) + +- + +>11 Resize an image by modifing the size, dimensions, and/or datatype of the + current primary array or image extension. If the new image, as specified + by the input arguments, is larger than the current existing image + in the FITS file then zero fill data will be inserted at the end + of the current image and any following extensions will be moved + further back in the file. Similarly, if the new image is + smaller than the current image then any following extensions + will be shifted up towards the beginning of the FITS file + and the image data will be truncated to the new size. + This routine rewrites the BITPIX, NAXIS, and NAXISn keywords + with the appropriate values for new image. The FTRSIMLL routine is identical + to the FTRSIM routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array +> of 32-bit integers. +- + FTRSIM(unit,bitpix,naxis,naxes,status) + FTRSIMLL(unit,bitpix,naxis,naxesll,status) +- +>12 Delete the CHDU in the FITS file. Any following HDUs will be shifted + forward in the file, to fill in the gap created by the deleted + HDU. In the case of deleting the primary array (the first HDU in + the file) then the current primary array will be replace by a null + primary array containing the minimum set of required keywords and + no data. If there are more extensions in the file following the + one that is deleted, then the the CHDU will be redefined to point + to the following extension. If there are no following extensions + then the CHDU will be redefined to point to the previous HDU. The + output HDUTYPE parameter indicates the type of the new CHDU after +> the previous CHDU has been deleted. +- + FTDHDU(unit, > hdutype,status) +- +>13 Copy all or part of the input FITS file and append it + to the end of the output FITS file. If 'previous' (an integer parameter) is + not equal to 0, then any HDUs preceding the current HDU in the input file + will be copied to the output file. Similarly, 'current' and 'following' + determine whether the current HDU, and/or any following HDUs in the input + file will be copied to the output file. If all 3 parameters are not equal + to zero, then the entire input file will be copied. On return, the current + HDU in the input file will be unchanged, and the last copied HDU will be the +> current HDU in the output file. +- + FTCPFL(iunit, ounit, previous, current, following, > status) +- +>14 Copy the entire CHDU from the FITS file associated with IUNIT to the CHDU + of the FITS file associated with OUNIT. The output HDU must be empty and + not already contain any keywords. Space will be reserved for MOREKEYS + additional keywords in the output header if there is not already enough +> space. +- + FTCOPY(iunit,ounit,morekeys, > status) +- +>15 Copy the header (and not the data) from the CHDU associated with inunit + to the CHDU associated with outunit. If the current output HDU + is not completely empty, then the CHDU will be closed and a new + HDU will be appended to the output file. This routine will automatically + transform the necessary keywords when copying a primary array to + and image extension, or an image extension to a primary array. +> An empty output data unit will be created (all values = 0). +- + FTCPHD(inunit, outunit, > status) +- +>16 Copy just the data from the CHDU associated with IUNIT + to the CHDU associated with OUNIT. This will overwrite + any data previously in the OUNIT CHDU. This low level routine is used + by FTCOPY, but it may also be useful in certain application programs + which want to copy the data from one FITS file to another but also + want to modify the header keywords in the process. all the required + header keywords must be written to the OUNIT CHDU before calling +> this routine +- + FTCPDT(iunit,ounit, > status) +- + +**C. Define or Redefine the structure of the CHDU \label{FTRDEF} + +It should rarely be necessary to call the subroutines in this section. +FITSIO internally calls these routines whenever necessary, so any calls +to these routines by application programs will likely be redundant. + +>1 This routine forces FITSIO to scan the current header keywords that + define the structure of the HDU (such as the NAXISn, PCOUNT and GCOUNT + keywords) so that it can initialize the internal buffers that describe + the HDU structure. This routine may be used instead of the more + complicated calls to ftpdef, ftadef or ftbdef. This routine is + also very useful for reinitializing the structure of an HDU, + if the number of rows in a table, as specified by the NAXIS2 keyword, +> has been modified from its initial value. +- + FTRDEF(unit, > status) (DEPRECATED) +- +>2 Define the structure of the primary array or IMAGE extension. When + writing GROUPed FITS files that by convention set the NAXIS1 keyword + equal to 0, ftpdef must be called with naxes(1) = 1, NOT 0, otherwise + FITSIO will report an error status=308 when trying to write data + to a group. Note: it is usually simpler to call FTRDEF rather +> than this routine. +- + FTPDEF(unit,bitpix,naxis,naxes,pcount,gcount, > status) (DEPRECATED) +- +>3 Define the structure of an ASCII table (TABLE) extension. Note: it +> is usually simpler to call FTRDEF rather than this routine. +- + FTADEF(unit,rowlen,tfields,tbcol,tform,nrows > status) (DEPRECATED) +- +>4 Define the structure of a binary table (BINTABLE) extension. Note: it +> is usually simpler to call FTRDEF rather than this routine. +- + FTBDEF(unit,tfields,tform,varidat,nrows > status) (DEPRECATED) +- +>5 Define the size of the Current Data Unit, overriding the length + of the data unit as previously defined by ftpdef, ftadef, or ftbdef. + This is useful if one does not know the total size of the data unit until + after the data have been written. The size (in bytes) of an ASCII or + Binary table is given by NAXIS1 * NAXIS2. (Note that to determine the + value of NAXIS1 it is often more convenient to read the value of the + NAXIS1 keyword from the output file, rather than computing the row + length directly from all the TFORM keyword values). Note: it +> is usually simpler to call FTRDEF rather than this routine. +- + FTDDEF(unit,bytlen, > status) (DEPRECATED) +- +>6 Define the zero indexed byte offset of the 'heap' measured from + the start of the binary table data. By default the heap is assumed + to start immediately following the regular table data, i.e., at + location NAXIS1 x NAXIS2. This routine is only relevant for + binary tables which contain variable length array columns (with + TFORMn = 'Pt'). This subroutine also automatically writes + the value of theap to a keyword in the extension header. This + subroutine must be called after the required keywords have been + written (with ftphbn) and after the table structure has been defined +> (with ftbdef) but before any data is written to the table. +- + FTPTHP(unit,theap, > status) +- + +**D. FITS Header I/O Subroutines + +***1. Header Space and Position Routines \label{FTHDEF} + +>1 Reserve space in the CHU for MOREKEYS more header keywords. + This subroutine may be called to reserve space for keywords which are + to be written at a later time, after the data unit or subsequent + extensions have been written to the FITS file. If this subroutine is + not explicitly called, then the initial size of the FITS header will be + limited to the space available at the time that the first data is written + to the associated data unit. FITSIO has the ability to dynamically + add more space to the header if needed, however it is more efficient +> to preallocate the required space if the size is known in advance. +- + FTHDEF(unit,morekeys, > status) +- +>2 Return the number of existing keywords in the CHU (NOT including the + END keyword which is not considered a real keyword) and the remaining + space available to write additional keywords in the CHU. (returns + KEYSADD = -1 if the header has not yet been closed). + Note that FITSIO will attempt to dynamically add space for more +> keywords if required when appending new keywords to a header. +- + FTGHSP(iunit, > keysexist,keysadd,status) +- +>3 Return the number of keywords in the header and the current position + in the header. This returns the number of the keyword record that + will be read next (or one greater than the position of the last keyword + that was read or written). A value of 1 is returned if the pointer is +> positioned at the beginning of the header. +- + FTGHPS(iunit, > keysexist,key_no,status) +- +***2. Read or Write Standard Header Routines \label{FTPHPR} + +These subroutines provide a simple method of reading or writing most of +the keyword values that are normally required in a FITS files. These +subroutines are provided for convenience only and are not required to +be used. If preferred, users may call the lower-level subroutines +described in the previous section to individually read or write the +required keywords. Note that in most cases, the required keywords such +as NAXIS, TFIELD, TTYPEn, etc, which define the structure of the HDU +must be written to the header before any data can be written to the +image or table. + +>1 Put the primary header or IMAGE extension keywords into the CHU. +There are 2 available routines: The simpler FTPHPS routine is +equivalent to calling ftphpr with the default values of SIMPLE = true, +pcount = 0, gcount = 1, and EXTEND = true. PCOUNT, GCOUNT and EXTEND +keywords are not required in the primary header and are only written if +pcount is not equal to zero, gcount is not equal to zero or one, and if +extend is TRUE, respectively. When writing to an IMAGE extension, the +>SIMPLE and EXTEND parameters are ignored. +- + FTPHPS(unit,bitpix,naxis,naxes, > status) + + FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status) +- +>2 Get primary header or IMAGE extension keywords from the CHU. When + reading from an IMAGE extension the SIMPLE and EXTEND parameters are +> ignored. +- + FTGHPR(unit,maxdim, > simple,bitpix,naxis,naxes,pcount,gcount,extend, + status) +- +>3 Put the ASCII table header keywords into the CHU. The optional +TUNITn and EXTNAME keywords are written only if the input string +>values are not blank. +- + FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) +- +>>4 Get the ASCII table header keywords from the CHU +- + FTGHTB(unit,maxdim, > rowlen,nrows,tfields,ttype,tbcol,tform,tunit, + extname,status) +- +>5 Put the binary table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input string + values are not blank. The pcount parameter, which specifies the + size of the variable length array heap, should initially = 0; + FITSIO will automatically update the PCOUNT keyword value if any + variable length array data is written to the heap. The TFORM keyword + value for variable length vector columns should have the form 'Pt(len)' + or '1Pt(len)' where `t' is the data type code letter (A,I,J,E,D, etc.) + and `len' is an integer specifying the maximum length of the vectors + in that column (len must be greater than or equal to the longest + vector in the column). If `len' is not specified when the table is + created (e.g., the input TFORMn value is just '1Pt') then FITSIO will + scan the column when the table is first closed and will append the + maximum length to the TFORM keyword value. Note that if the table + is subsequently modified to increase the maximum length of the vectors + then the modifying program is responsible for also updating the TFORM +> keyword value. + +- + FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat, > status) +- +>>6 Get the binary table header keywords from the CHU +- + FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat, + status) +- +***3. Write Keyword Subroutines \label{FTPREC} + +>>1 Put (append) an 80-character record into the CHU. +- + FTPREC(unit,card, > status) +- +>2 Put (append) a COMMENT keyword into the CHU. Multiple COMMENT keywords +> will be written if the input comment string is longer than 72 characters. +- + FTPCOM(unit,comment, > status) +- +>3 Put (append) a HISTORY keyword into the CHU. Multiple HISTORY keywords +> will be written if the input history string is longer than 72 characters. +- + FTPHIS(unit,history, > status) +- +>4 Put (append) the DATE keyword into the CHU. The keyword value will contain + the current system date as a character string in 'dd/mm/yy' format. If + a DATE keyword already exists in the header, then this subroutine will +> simply update the keyword value in-place with the current date. +- + FTPDAT(unit, > status) +- +>5 Put (append) a new keyword of the appropriate datatype into the CHU. + Note that FTPKYS will only write string values up to 68 characters in + length; longer strings will be truncated. The FTPKLS routine can be + used to write longer strings, using a non-standard FITS convention. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, +> depending on the magnitude of the value. +- + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +- +>6 Put (append) a string valued keyword into the CHU which may be longer + than 68 characters in length. This uses the Long String Keyword + convention that is described in the "Usage Guidelines and Suggestions" + section of this document. Since this uses a non-standard FITS + convention to encode the long keyword string, programs which use + this routine should also call the FTPLSW routine to add some COMMENT + keywords to warn users of the FITS file that this convention is + being used. FTPLSW also writes a keyword called LONGSTRN to record + the version of the longstring convention that has been used, in case + a new convention is adopted at some point in the future. If the + LONGSTRN keyword is already present in the header, then FTPLSW will +> simply return and will not write duplicate keywords. +- + FTPKLS(unit,keyword,keyval,comment, > status) + FTPLSW(unit, > status) +- +>7 Put (append) a new keyword with an undefined, or null, value into the CHU. +> The value string of the keyword is left blank in this case. +- + FTPKYU(unit,keyword,comment, > status) +- +>8 Put (append) a numbered sequence of keywords into the CHU. One may + append the same comment to every keyword (and eliminate the need + to have an array of identical comment strings, one for each keyword) by + including the ampersand character as the last non-blank character in the + (first) COMMENTS string parameter. This same string + will then be used for the comment field in all the keywords. (Note + that the SPP version of these routines only supports a single comment +> string). +- + FTPKN[JKLS](unit,keyroot,startno,no_keys,keyvals,comments, > status) + FTPKN[EDFG](unit,keyroot,startno,no_keys,keyvals,decimals,comments, > + status) +- +>9 Copy an indexed keyword from one HDU to another, modifying + the index number of the keyword name in the process. For example, + this routine could read the TLMIN3 keyword from the input HDU + (by giving keyroot = "TLMIN" and innum = 3) and write it to the + output HDU with the keyword name TLMIN4 (by setting outnum = 4). + If the input keyword does not exist, then this routine simply +> returns without indicating an error. +- + FTCPKY(inunit, outunit, innum, outnum, keyroot, > status) +- +>10 Put (append) a 'triple precision' keyword into the CHU in F28.16 format. + The floating point keyword value is constructed by concatenating the + input integer value with the input double precision fraction value + (which must have a value between 0.0 and 1.0). The FTGKYT routine should + be used to read this keyword value, because the other keyword reading +> subroutines will not preserve the full precision of the value. +- + FTPKYT(unit,keyword,intval,dblval,comment, > status) +- +>11 Write keywords to the CHDU that are defined in an ASCII template file. + The format of the template file is described under the ftgthd +> routine below. +- + FTPKTP(unit, filename, > status) +- +>12 Append the physical units string to an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the +> beginning of the keyword comment field. + +- + VELOCITY= 12.3 / [km/s] orbital speed + + FTPUNT(unit,keyword,units, > status) +- +***4. Insert Keyword Subroutines \label{FTIREC} + +>1 Insert a new keyword record into the CHU at the specified position + (i.e., immediately preceding the (keyno)th keyword in the header.) + This 'insert record' subroutine is somewhat less efficient + then the 'append record' subroutine (FTPREC) described above because +> the remaining keywords in the header have to be shifted down one slot. +- + FTIREC(unit,key_no,card, > status) +- +>2 Insert a new keyword into the CHU. The new keyword is inserted + immediately following the last keyword that has been read from the header. + The FTIKLS subroutine works the same as the FTIKYS subroutine, except + it also supports long string values greater than 68 characters in length. + These 'insert keyword' subroutines are somewhat less efficient then + the 'append keyword' subroutines described above because the remaining +> keywords in the header have to be shifted down one slot. +- + FTIKEY(unit, card, > status) + FTIKY[JKLS](unit,keyword,keyval,comment, > status) + FTIKLS(unit,keyword,keyval,comment, > status) + FTIKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +- +>3 Insert a new keyword with an undefined, or null, value into the CHU. +> The value string of the keyword is left blank in this case. +- + FTIKYU(unit,keyword,comment, > status) +- +***5. Read Keyword Subroutines \label{FTGREC} + +These routines return the value of the specified keyword(s). Wild card +characters (*, ?, or \#) may be used when specifying the name of the keyword +to be read: a '?' will match any single character at that position in the +keyword name and a '*' will match any length (including zero) string of +characters. The '\#' character will match any consecutive string of +decimal digits (0 - 9). Note that when a wild card is used in the input +keyword name, the routine will only search for a match from the current +header position to the end of the header. It will not resume the search +from the top of the header back to the original header position as is done +when no wildcards are included in the keyword name. If the desired +keyword string is 8-characters long (the maximum length of a keyword +name) then a '*' may be appended as the ninth character of the input +name to force the keyword search to stop at the end of the header +(e.g., 'COMMENT *' will search for the next COMMENT keyword). The +ffgrec routine may be used to set the starting position when doing +wild card searches. + +>1 Get the nth 80-character header record from the CHU. The first keyword + in the header is at key\_no = 1; if key\_no = 0 then this subroutine + simple moves the internal pointer to the beginning of the header + so that subsequent keyword operations will start at the top of +> the header; it also returns a blank card value in this case. +- + FTGREC(unit,key_no, > card,status) +- +>2 Get the name, value (as a string), and comment of the nth keyword in CHU. + This routine also checks that the returned keyword name (KEYWORD) contains + only legal ASCII characters. Call FTGREC and FTPSVC to bypass this error +> check. +- + FTGKYN(unit,key_no, > keyword,value,comment,status) +- +>>3 Get the 80-character header record for the named keyword +- + FTGCRD(unit,keyword, > card,status) +- +>4 Get the next keyword whose name matches one of the strings in + 'inclist' but does not match any of the strings in 'exclist'. + The strings in inclist and exclist may contain wild card characters + (*, ?, and \#) as described at the beginning of this section. + This routine searches from the current header position to the + end of the header, only, and does not continue the search from + the top of the header back to the original position. The current + header position may be reset with the ftgrec routine. Note + that nexc may be set = 0 if there are no keywords to be excluded. + This routine returns status = 202 if a matching +> keyword is not found. +- + FTGNXK(unit,inclist,ninc,exclist,nexc, > card,status) +- +>5 Get the literal keyword value as a character string. Regardless + of the datatype of the keyword, this routine simply returns the + string of characters in the value field of the keyword along with +> the comment field. +- + FTGKEY(unit,keyword, > value,comment,status) +- +>6 Get a keyword value (with the appropriate datatype) and comment from +> the CHU +- + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) +- +>7 Get a sequence of numbered keyword values. These +> routines do not support wild card characters in the root name. +- + FTGKN[EDJKLS](unit,keyroot,startno,max_keys, > keyvals,nfound,status) +- +>8 Get the value of a floating point keyword, returning the integer and + fractional parts of the value in separate subroutine arguments. + This subroutine may be used to read any keyword but is especially +> useful for reading the 'triple precision' keywords written by FTPKYT. +- + FTGKYT(unit,keyword, > intval,dblval,comment,status) +- +>9 Get the physical units string in an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are + enclosed in square brackets in the beginning of the keyword comment + field. A blank string is returned if no units are defined +> for the keyword. +- + VELOCITY= 12.3 / [km/s] orbital speed + + FTGUNT(unit,keyword, > units,status) +- +***6. Modify Keyword Subroutines \label{FTMREC} + +Wild card characters, as described in the Read Keyword section, above, +may be used when specifying the name of the keyword to be modified. + +>>1 Modify (overwrite) the nth 80-character header record in the CHU +- + FTMREC(unit,key_no,card, > status) +- +>2 Modify (overwrite) the 80-character header record for the named keyword + in the CHU. This can be used to overwrite the name of the keyword as +> well as its value and comment fields. +- + FTMCRD(unit,keyword,card, > status) +- +>3 Modify (overwrite) the name of an existing keyword in the CHU +> preserving the current value and comment fields. +- + FTMNAM(unit,oldkey,keyword, > status) +- +>>4 Modify (overwrite) the comment field of an existing keyword in the CHU +- + FTMCOM(unit,keyword,comment, > status) +- +>5 Modify the value and comment fields of an existing keyword in the CHU. + The FTMKLS subroutine works the same as the FTMKYS subroutine, except + it also supports long string values greater than 68 characters in length. + Optionally, one may modify only the value field and leave the comment + field unchanged by setting the input COMMENT parameter equal to + the ampersand character (\&). + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, +> depending on the magnitude of the value. +- + FTMKY[JKLS](unit,keyword,keyval,comment, > status) + FTMKLS(unit,keyword,keyval,comment, > status) + FTMKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +- +>6 Modify the value of an existing keyword to be undefined, or null. + The value string of the keyword is set to blank. + Optionally, one may leave the comment field unchanged by setting the +> input COMMENT parameter equal to the ampersand character (\&). +- + FTMKYU(unit,keyword,comment, > status) +- +***7. Update Keyword Subroutines \label{FTUCRD} + +>1 Update an 80-character record in the CHU. If the specified keyword + already exists then that header record will be replaced with + the input CARD string. If it does not exist then the new record will + be added to the header. + The FTUKLS subroutine works the same as the FTUKYS subroutine, except +> it also supports long string values greater than 68 characters in length. +- + FTUCRD(unit,keyword,card, > status) +- +>2 Update the value and comment fields of a keyword in the CHU. + The specified keyword is modified if it already exists (by calling + FTMKYx) otherwise a new keyword is created by calling FTPKYx. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, +> depending on the magnitude of the value. +- + FTUKY[JKLS](unit,keyword,keyval,comment, > status) + FTUKLS(unit,keyword,keyval,comment, > status) + FTUKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +- +>3 Update the value of an existing keyword to be undefined, or null, + or insert a new undefined-value keyword if it doesn't already exist. +> The value string of the keyword is left blank in this case. +- + FTUKYU(unit,keyword,comment, > status) +- +***8. Delete Keyword Subroutines \label{FTDREC} + +>1 Delete an existing keyword record. The space previously occupied by + the keyword is reclaimed by moving all the following header records up + one row in the header. The first routine deletes a keyword at a + specified position in the header (the first keyword is at position 1), + whereas the second routine deletes a specifically named keyword. + Wild card characters, as described in the Read Keyword section, above, + may be used when specifying the name of the keyword to be deleted +> (be careful!). +- + FTDREC(unit,key_no, > status) + FTDKEY(unit,keyword, > status) +- + +**F. Data Scaling and Undefined Pixel Parameters \label{FTPSCL} + +These subroutines define or modify the internal parameters used by +FITSIO to either scale the data or to represent undefined pixels. +Generally FITSIO will scale the data according to the values of the BSCALE +and BZERO (or TSCALn and TZEROn) keywords, however these subroutines +may be used to override the keyword values. This may be useful when +one wants to read or write the raw unscaled values in the FITS file. +Similarly, FITSIO generally uses the value of the BLANK or TNULLn +keyword to signify an undefined pixel, but these routines may be used +to override this value. These subroutines do not create or modify the +corresponding header keyword values. + +>1 Reset the scaling factors in the primary array or image extension; does + not change the BSCALE and BZERO keyword values and only affects the + automatic scaling performed when the data elements are written/read + to/from the FITS file. When reading from a FITS file the returned + data value = (the value given in the FITS array) * BSCALE + BZERO. + The inverse formula is used when writing data values to the FITS + file. (NOTE: BSCALE and BZERO must be declared as Double Precision +> variables). +- + FTPSCL(unit,bscale,bzero, > status) +- +>2 Reset the scaling parameters for a table column; does not change + the TSCALn or TZEROn keyword values and only affects the automatic + scaling performed when the data elements are written/read to/from + the FITS file. When reading from a FITS file the returned data + value = (the value given in the FITS array) * TSCAL + TZERO. The + inverse formula is used when writing data values to the FITS file. + (NOTE: TSCAL and TZERO must be declared as Double Precision +> variables). +- + FTTSCL(unit,colnum,tscal,tzero, > status) +- +>3 Define the integer value to be used to signify undefined pixels in the + primary array or image extension. This is only used if BITPIX = 8, 16, + 32. or 64 This does not create or change the value of the BLANK keyword in + the header. FTPNULLL is identical to FTPNUL except that the blank +> value is a 64-bit integer instead of a 32-bit integer. +- + FTPNUL(unit,blank, > status) + FTPNULLL(unit,blankll, > status) +- +>4 Define the string to be used to signify undefined pixels in + a column in an ASCII table. This does not create or change the value +> of the TNULLn keyword. +- + FTSNUL(unit,colnum,snull > status) +- +>5 Define the value to be used to signify undefined pixels in + an integer column in a binary table (where TFORMn = 'B', 'I', 'J', or 'K'). + This does not create or change the value of the TNULLn keyword. + FTTNULLL is identical to FTTNUL except that the tnull +> value is a 64-bit integer instead of a 32-bit integer. +- + FTTNUL(unit,colnum,tnull > status) + FTTNULLL(unit,colnum,tnullll > status) +- + +**G. FITS Primary Array or IMAGE Extension I/O Subroutines \label{FTPPR} + + These subroutines put or get data values in the primary data array +(i.e., the first HDU in the FITS file) or an IMAGE extension. The +data array is represented as a single one-dimensional array of +pixels regardless of the actual dimensionality of the array, and the +FPIXEL parameter gives the position within this 1-D array of the first +pixel to read or write. Automatic data type conversion is performed +for numeric data (except for complex data types) if the data type of +the primary array (defined by the BITPIX keyword) differs from the data +type of the array in the calling subroutine. The data values are also +scaled by the BSCALE and BZERO header values as they are being written +or read from the FITS array. The ftpscl subroutine MUST be +called to define the scaling parameters when writing data to the FITS +array or to override the default scaling value given in the header when +reading the FITS array. + + Two sets of subroutines are provided to read the data array which +differ in the way undefined pixels are handled. The first set of +routines (FTGPVx) simply return an array of data elements in which +undefined pixels are set equal to a value specified by the user in the +'nullval' parameter. An additional feature of these subroutines is +that if the user sets nullval = 0, then no checks for undefined pixels +will be performed, thus increasing the speed of the program. The +second set of routines (FTGPFx) returns the data element array and, in +addition, a logical array which defines whether the corresponding data +pixel is undefined. The latter set of subroutines may be more +convenient to use in some circumstances, however, it requires an +additional array of logical values which can be unwieldy when working +with large data arrays. Also for programmer convenience, sets of +subroutines to directly read or write 2 and 3 dimensional arrays have +been provided, as well as a set of subroutines to read or write any +contiguous rectangular subset of pixels within the n-dimensional array. + +>1 Get the data type of the image (= BITPIX value). Possible returned + values are: 8, 16, 32, 64, -32, or -64 corresponding to unsigned byte, + signed 2-byte integer, signed 4-byte integer, signed 8-byte integer, + real, and double. + + The second subroutine is similar to FTGIDT, except that if the image + pixel values are scaled, with non-default values for the BZERO and + BSCALE keywords, then this routine will return the 'equivalent' + data type that is needed to store the scaled values. For example, + if BITPIX = 16 and BSCALE = 0.1 then the equivalent data type is + floating point, and -32 will be returned. There are 2 special cases: + if the image contains unsigned 2-byte integer values, with BITPIX = + 16, BSCALE = 1, and BZERO = 32768, then this routine will return + a non-standard value of 20 for the bitpix value. Similarly if the + image contains unsigned 4-byte integers, then bitpix will +> be returned with a value of 40. + +- + FTGIDT(unit, > bitpix,status) + FTGIET(unit, > bitpix,status) +- +>>2 Get the dimension (number of axes = NAXIS) of the image +- + FTGIDM(unit, > naxis,status) +- +>3 Get the size of all the dimensions of the image. The FTGISZLL +> routine returns an array of 64-bit integers instead of 32-bit integers. +- + FTGISZ(unit, maxdim, > naxes,status) + FTGISZLL(unit, maxdim, > naxesll,status) +- +>4 Get the parameters that define the type and size of the image. This + routine simply combines calls to the above 3 routines. The FTGIPRLL +> routine returns an array of 64-bit integers instead of 32-bit integers. + +- + FTGIPR(unit, maxdim, > bitpix, naxis, naxes, int *status) + FTGIPRLL(unit, maxdim, > bitpix, naxis, naxesll, int *status) +- +>>5 Put elements into the data array +- + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) +- +>6 Put elements into the data array, substituting the appropriate FITS null + value for all elements which are equal to the value of NULLVAL. For + integer FITS arrays, the null value defined by the previous call to FTPNUL + will be substituted; for floating point FITS arrays (BITPIX = -32 + or -64) then the special IEEE NaN (Not-a-Number) value will be +> substituted. +- + FTPPN[BIJKED](unit,group,fpixel,nelements,values,nullval > status) +- +>>7 Set data array elements as undefined +- + FTPPRU(unit,group,fpixel,nelements, > status) +- +>8 Get elements from the data array. Undefined array elements will be + returned with a value = nullval, unless nullval = 0 in which case no +> checks for undefined pixels will be performed. +- + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) +- +>9 Get elements and nullflags from data array. + Any undefined array elements will have the corresponding flagvals element +> set equal to .TRUE. +- + FTGPF[BIJKED](unit,group,fpixel,nelements, > values,flagvals,anyf,status) +- +>>10 Put values into group parameters +- + FTPGP[BIJKED](unit,group,fparm,nparm,values, > status) +- +>>11 Get values from group parameters +- + FTGGP[BIJKED](unit,group,fparm,nparm, > values,status) +- +The following 4 subroutines transfer FITS images with 2 or 3 dimensions +to or from a data array which has been declared in the calling program. +The dimensionality of the FITS image is passed by the naxis1, naxis2, +and naxis3 parameters and the declared dimensions of the program array +are passed in the dim1 and dim2 parameters. Note that the program array +does not have to have the same dimensions as the FITS array, but must +be at least as big. For example if a FITS image with NAXIS1 = NAXIS2 = 400 +is read into a program array which is dimensioned as 512 x 512 pixels, +then the image will just fill the lower left corner of the array +with pixels in the range 1 - 400 in the X an Y directions. This has +the effect of taking a contiguous set of pixel value in the FITS array +and writing them to a non-contiguous array in program memory +(i.e., there are now some blank pixels around the edge of the image +in the program array). + +>>11 Put 2-D image into the data array +- + FTP2D[BIJKED](unit,group,dim1,naxis1,naxis2,image, > status) +- +>>12 Put 3-D cube into the data array +- + FTP3D[BIJKED](unit,group,dim1,dim2,naxis1,naxis2,naxis3,cube, > status) +- +>13 Get 2-D image from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will +> be performed. +- + FTG2D[BIJKED](unit,group,nullval,dim1,naxis1,naxis2, > image,anyf,status) +- +>14 Get 3-D cube from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will +> be performed. +- + FTG3D[BIJKED](unit,group,nullval,dim1,dim2,naxis1,naxis2,naxis3, > + cube,anyf,status) +- + +The following subroutines transfer a rectangular subset of the pixels +in a FITS N-dimensional image to or from an array which has been +declared in the calling program. The fpixels and lpixels parameters +are integer arrays which specify the starting and ending pixels in each +dimension of the FITS image that are to be read or written. (Note that +these are the starting and ending pixels in the FITS image, not in the +declared array). The array parameter is treated simply as a large +one-dimensional array of the appropriate datatype containing the pixel +values; The pixel values in the FITS array are read/written from/to +this program array in strict sequence without any gaps; it is up to +the calling routine to correctly interpret the dimensionality of this +array. The two families of FITS reading routines (FTGSVx and FTGSFx +subroutines) also have an 'incs' parameter which defines the +data sampling interval in each dimension of the FITS array. For +example, if incs(1)=2 and incs(2)=3 when reading a 2-dimensional +FITS image, then only every other pixel in the first dimension +and every 3rd pixel in the second dimension will be returned in +the 'array' parameter. [Note: the FTGSSx family of routines which +were present in previous versions of FITSIO have been superseded +by the more general FTGSVx family of routines.] + +>>15 Put an arbitrary data subsection into the data array. +- + FTPSS[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,array, > status) +- +>16 Get an arbitrary data subsection from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will +> be performed. +- + FTGSV[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) +- +>17 Get an arbitrary data subsection from the data array. Any Undefined + pixels in the array will have the corresponding 'flagvals' +> element set equal to .TRUE. +- + FTGSF[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +- + +**H. FITS ASCII and Binary Table Data I/O Subroutines + +***1. Column Information Subroutines \label{FTGCNO} + +>1 Get the number of rows or columns in the current FITS table. + The number of rows is given by the NAXIS2 keyword and the + number of columns is given by the TFIELDS keyword in the header + of the table. The FTGNRWLL routine is identical to FTGNRW except + that the number of rows is returned as a 64-bit integer rather +> than a 32-bit integer. +- + FTGNRW(unit, > nrows, status) + FTGNRWLL(unit, > nrowsll, status) + FTGNCL(unit, > ncols, status) +- +>2 Get the table column number (and name) of the column whose name +matches an input template name. The table column names are defined by +the TTYPEn keywords in the FITS header. If a column does not have a +TTYPEn keyword, then these routines assume that the name consists of +all blank characters. These 2 subroutines perform the same function +except that FTGCNO only returns the number of the matching column whereas +FTGCNN also returns the name of the column. If CASESEN = .true. then +the column name match will be case-sensitive. + +The input column name template (COLTEMPLATE) is (1) either the exact +name of the column to be searched for, or (2) it may contain wild cards +characters (*, ?, or \#), or (3) it may contain the number of the desired +column (where the number is expressed as ASCII digits). The first 2 wild +cards behave similarly to UNIX filename matching: the '*' character matches +any sequence of characters (including zero characters) and the '?' +character matches any single character. The \# wildcard will match +any consecutive string of decimal digits (0-9). As an example, the template +strings 'AB?DE', 'AB*E', and 'AB*CDE' will all match the string +'ABCDE'. If more than one column name in the table matches the +template string, then the first match is returned and the status value +will be set to 237 as a warning that a unique match was not found. To +find the other cases that match the template, simply call the +subroutine again leaving the input status value equal to 237 and the +next matching name will then be returned. Repeat this process until a +status = 219 (column name not found) is returned. If these subroutines +fail to match the template to any of the columns in the table, they +lastly check if the template can be interpreted as a simple positive +integer (e.g., '7', or '512') and if so, they return that column +number. If no matches are found then a status = 219 error is +returned. + +Note that the FITS Standard recommends that only letters, digits, and +the underscore character be used in column names (with no embedded +spaces in the name). Trailing blank characters are not significant. +It is recommended that the column names in a given table be unique +>within the first 8 characters. +- + FTGCNO(unit,casesen,coltemplate, > colnum,status) + FTGCNN(unit,casesen,coltemplate, > colname,colnum,status) +- +>3 Get the datatype of a column in an ASCII or binary table. This + routine returns an integer code value corresponding to the datatype + of the column. (See the FTBNFM and FTASFM subroutines in the Utilities + section of this document for a list of the code values). The vector + repeat count (which is alway 1 for ASCII table columns) is also returned. + If the specified column has an ASCII character datatype (code = 16) then + the width of a unit string in the column is also returned. Note that + this routine supports the local convention for specifying arrays of + strings within a binary table character column, using the syntax + TFORM = 'rAw' where 'r' is the total number of characters (= the width + of the column) and 'w' is the width of a unit string within the column. + Thus if the column has TFORM = '60A12' then this routine will return + datacode = 16, repeat = 60, and width = 12. (The TDIMn + keyword may also be used to specify the unit string length; The pair + of keywords TFORMn = '60A' and TDIMn = '(12,5)' would have the + same effect as TFORMn = '60A12'). + + The second routine, FTEQTY is similar except that in + the case of scaled integer columns it returns the 'equivalent' data + type that is needed to store the scaled values, and not necessarily + the physical data type of the unscaled values as stored in the FITS + table. For example if a '1I' column in a binary table has TSCALn = + 1 and TZEROn = 32768, then this column effectively contains unsigned + short integer values, and thus the returned value of typecode will + be the code for an unsigned short integer, not a signed short integer. + Similarly, if a column has TTYPEn = '1I' + and TSCALn = 0.12, then the returned typecode +> will be the code for a 'real' column. +- + FTGTCL(unit,colnum, > datacode,repeat,width,status) + FTEQTY(unit,colnum, > datacode,repeat,width,status) +- +>4 Return the display width of a column. This is the length + of the string that will be returned + when reading the column as a formatted string. The display width is + determined by the TDISPn keyword, if present, otherwise by the data +> type of the column. +- + FTGCDW(unit, colnum, > dispwidth, status) +- +>5 Get information about an existing ASCII table column. (NOTE: TSCAL and + TZERO must be declared as Double Precision variables). All the +> returned parameters are scalar quantities. +- + FTGACL(unit,colnum, > + ttype,tbcol,tunit,tform,tscal,tzero,snull,tdisp,status) +- +>6 Get information about an existing binary table column. (NOTE: TSCAL and + TZERO must be declared as Double Precision variables). DATATYPE is a + character string which returns the datatype of the column as defined + by the TFORMn keyword (e.g., 'I', 'J','E', 'D', etc.). In the case + of an ASCII character column, DATATYPE will have a value of the + form 'An' where 'n' is an integer expressing the width of the field + in characters. For example, if TFORM = '160A8' then FTGBCL will return + DATATYPE='A8' and REPEAT=20. All the returned parameters are scalar +> quantities. +- + FTGBCL(unit,colnum, > + ttype,tunit,datatype,repeat,tscal,tzero,tnull,tdisp,status) +- +>7 Put (append) a TDIMn keyword whose value has the form '(l,m,n...)' + where l, m, n... are the dimensions of a multidimension array +> column in a binary table. +- + FTPTDM(unit,colnum,naxis,naxes, > status) +- +>8 Return the number of and size of the dimensions of a table column. + Normally this information is given by the TDIMn keyword, but if + this keyword is not present then this routine returns NAXIS = 1 +> and NAXES(1) equal to the repeat count in the TFORM keyword. +- + FTGTDM(unit,colnum,maxdim, > naxis,naxes,status) +- +>9 Decode the input TDIMn keyword string (e.g. '(100,200)') and return the + number of and size of the dimensions of a binary table column. If the input + tdimstr character string is null, then this routine returns naxis = 1 + and naxes[0] equal to the repeat count in the TFORM keyword. This routine +> is called by FTGTDM. +- + FTDTDM(unit,tdimstr,colnum,maxdim, > naxis,naxes, status) +- +>10 Return the optimal number of rows to read or write at one time for + maximum I/O efficiency. Refer to the ``Optimizing Code'' section +> in Chapter 5 for more discussion on how to use this routine. + +- + FFGRSZ(unit, > nrows,status) +- + +***2. Low-Level Table Access Subroutines \label{FTGTBS} + +The following subroutines provide low-level access to the data in ASCII +or binary tables and are mainly useful as an efficient way to copy all +or part of a table from one location to another. These routines simply +read or write the specified number of consecutive bytes in an ASCII or +binary table, without regard for column boundaries or the row length in +the table. The first two subroutines read or write consecutive bytes +in a table to or from a character string variable, while the last two +subroutines read or write consecutive bytes to or from a variable +declared as a numeric data type (e.g., INTEGER, INTEGER*2, REAL, DOUBLE +PRECISION). These routines do not perform any machine dependent data +conversion or byte swapping, except that conversion to/from ASCII +format is performed by the FTGTBS and FTPTBS routines on machines which +do not use ASCII character codes in the internal data representations +(e.g., on IBM mainframe computers). + +>1 Read a consecutive string of characters from an ASCII table + into a character variable (spanning columns and multiple rows if necessary) + This routine should not be used with binary tables because of +> complications related to passing string variables between C and Fortran. +- + FTGTBS(unit,frow,startchar,nchars, > string,status) +- +>2 Write a consecutive string of characters to an ASCII table + from a character variable (spanning columns and multiple rows if necessary) + This routine should not be used with binary tables because of +> complications related to passing string variables between C and Fortran. +- + FTPTBS(unit,frow,startchar,nchars,string, > status) +- +>3 Read a consecutive array of bytes from an ASCII or binary table + into a numeric variable (spanning columns and multiple rows if necessary). + The array parameter may be declared as any numerical datatype as long + as the array is at least 'nchars' bytes long, e.g., if nchars = 17, +> then declare the array as INTEGER*4 ARRAY(5). +- + FTGTBB(unit,frow,startchar,nchars, > array,status) +- +>4 Write a consecutive array of bytes to an ASCII or binary table + from a numeric variable (spanning columns and multiple rows if necessary) + The array parameter may be declared as any numerical datatype as long + as the array is at least 'nchars' bytes long, e.g., if nchars = 17, +> then declare the array as INTEGER*4 ARRAY(5). +- + FTPTBB(unit,frow,startchar,nchars,array, > status) +- + +***3. Edit Rows or Columns \label{FTIROW} + +>1 Insert blank rows into an existing ASCII or binary table (in the CDU). + All the rows FOLLOWING row FROW are shifted down by NROWS rows. If + FROW or FROWLL equals 0 then the blank rows are inserted at the beginning of the + table. These routines modify the NAXIS2 keyword to reflect the new +> number of rows in the table. +- + FTIROW(unit,frow,nrows, > status) + FTIROWLL(unit,frowll,nrowsll, > status) +- +>2 Delete rows from an existing ASCII or binary table (in the CDU). + The NROWS (or NROWSLL) is the number of rows are deleted, starting + with row FROW (or FROWLL), and + any remaining rows in the table are shifted up to fill in the space. + These routines modify the NAXIS2 keyword to reflect the new number +> of rows in the table. +- + FTDROW(unit,frow,nrows, > status) + FTDROWLL(unit,frowll,nrowsll, > status) +- +>3 Delete a list of rows from an ASCII or binary table (in the CDU). + In the first routine, 'rowrange' is a character string listing the + rows or row ranges to delete (e.g., '2-4, 5, 8-9'). In the second + routine, 'rowlist' is an integer array of row numbers to be deleted + from the table. nrows is the number of row numbers in the list. + The first row in the table is 1 not 0. The list of row numbers +> must be sorted in ascending order. +- + FTDRRG(unit,rowrange, > status) + FTDRWS(unit,rowlist,nrows, > status) +- +>4 Insert a blank column (or columns) into an existing ASCII or binary + table (in the CDU). COLNUM specifies the column number that the (first) + new column should occupy in the table. NCOLS specifies how many + columns are to be inserted. Any existing columns from this position and + higher are moved over to allow room for the new column(s). + The index number on all the following keywords will be incremented + if necessary to reflect the new position of the column(s) in the table: + TBCOLn, TFORMn, TTYPEn, TUNITn, TNULLn, TSCALn, TZEROn, TDISPn, TDIMn, + TLMINn, TLMAXn, TDMINn, TDMAXn, TCTYPn, TCRPXn, TCRVLn, TCDLTn, TCROTn, +> and TCUNIn. +- + FTICOL(unit,colnum,ttype,tform, > status) + FTICLS(unit,colnum,ncols,ttype,tform, > status) +- +>5 Modify the vector length of a binary table column (e.g., + change a column from TFORMn = '1E' to '20E'). The vector +> length may be increased or decreased from the current value. +- + FTMVEC(unit,colnum,newveclen, > status) +- +>6 Delete a column from an existing ASCII or binary table (in the CDU). + The index number of all the keywords listed above (for FTICOL) will be + decremented if necessary to reflect the new position of the column(s) in + the table. Those index keywords that refer to the deleted column will + also be deleted. Note that the physical size of the FITS file will + not be reduced by this operation, and the empty FITS blocks if any +> at the end of the file will be padded with zeros. +- + FTDCOL(unit,colnum, > status) +- +>7 Copy a column from one HDU to another (or to the same HDU). If + createcol = TRUE, then a new column will be inserted in the output + table, at position `outcolumn', otherwise the existing output column will + be overwritten (in which case it must have a compatible datatype). +> Note that the first column in a table is at colnum = 1. +- + FTCPCL(inunit,outunit,incolnum,outcolnum,createcol, > status); +- +***4. Read and Write Column Data Routines \label{FTPCLS} + +These subroutines put or get data values in the current ASCII or Binary table +extension. Automatic data type conversion is performed for numerical data +types (B,I,J,E,D) if the data type of the column (defined by the TFORM keyword) +differs from the data type of the calling subroutine. The data values are also +scaled by the TSCALn and TZEROn header values as they are being written to +or read from the FITS array. The fttscl subroutine MUST be used to define the +scaling parameters when writing data to the table or to override the default +scaling values given in the header +when reading from the table. + + In the case of binary tables with vector elements, the 'felem' +parameter defines the starting pixel within the element vector. This +parameter is ignored with ASCII tables. Similarly, in the case of +binary tables the 'nelements' parameter specifies the total number of +vector values read or written (continuing on subsequent rows if +required) and not the number of table elements. Two sets of +subroutines are provided to get the column data which differ in the way +undefined pixels are handled. The first set of routines (FTGCV) +simply return an array of data elements in which undefined pixels are +set equal to a value specified by the user in the 'nullval' parameter. +An additional feature of these subroutines is that if the user sets +nullval = 0, then no checks for undefined pixels will be performed, +thus increasing the speed of the program. The second set of routines +(FTGCF) returns the data element array and in addition a logical array +of flags which defines whether the corresponding data pixel is undefined. + + Any column, regardless of it's intrinsic datatype, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column as + a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + datatype of the column. The length of the returned strings can be + determined with the ftgcdw routine. The following TDISPn display + formats are currently supported: +- + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +- + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the + decimal. The .m field is optional. + +>1 Put elements into an ASCII or binary table column (in the CDU). + (The SPP FSPCLS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st +> dimension of this 2-D CHAR array). +- + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) +- +>2 Put elements into an ASCII or binary table column (in the CDU) + substituting the appropriate FITS null value for any elements that + are equal to NULLVAL. For ASCII TABLE extensions, the + null value defined by the previous call to FTSNUL will be substituted; + For integer FITS columns, in a binary table the null value + defined by the previous call to FTTNUL will be substituted; + For floating point FITS columns a special IEEE NaN (Not-a-Number) +> value will be substituted. +- + FTPCN[BIJKED](unit,colnum,frow,felem,nelements,values,nullval > status) +- +>3 Put bit values into a binary byte ('B') or bit ('X') table column (in the + CDU). LRAY is an array of logical values corresponding to the sequence of + bits to be written. If LRAY is true then the corresponding bit is + set to 1, otherwise the bit is set to 0. Note that in the case of + 'X' columns, FITSIO will write to all 8 bits of each byte whether + they are formally valid or not. Thus if the column is defined as + '4X', and one calls FTPCLX with fbit=1 and nbit=8, then all 8 bits + will be written into the first byte (as opposed to writing the + first 4 bits into the first row and then the next 4 bits into the + next row), even though the last 4 bits of each byte are formally +> not defined. +- + FTPCLX(unit,colnum,frow,fbit,nbit,lray, > status) +- +>>4 Set table elements in a column as undefined +- + FTPCLU(unit,colnum,frow,felem,nelements, > status) +- +>5 Get elements from an ASCII or binary table column (in the CDU). These + routines return the values of the table column array elements. Undefined + array elements will be returned with a value = nullval, unless nullval = 0 + (or = ' ' for ftgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned + elements are undefined. (Note: the ftgcl routine simple gets an array + of logical data values without any checks for undefined values; use + the ftgcfl routine to check for undefined logical elements). + (The SPP FSGCVS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st +> dimension of this 2-D CHAR array). +- + FTGCL(unit,colnum,frow,felem,nelements, > values,status) + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) +- +>6 Get elements and null flags from an ASCII or binary table column (in the + CHDU). These routines return the values of the table column array elements. + Any undefined array elements will have the corresponding flagvals element + set equal to .TRUE. The ANYF parameter is set to true if any of the + returned elements are undefined. + (The SPP FSGCFS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st +> dimension of this 2-D CHAR array). +- + FTGCF[SLBIJKEDCM](unit,colnum,frow,felem,nelements, > + values,flagvals,anyf,status) +- +>7 Get an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Undefined pixels + in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will + be performed. The first and last rows in the table to be read + are specified by fpixels(naxis+1) and lpixels(naxis+1), and hence + are treated as the next higher dimension of the FITS N-dimensional + array. The INCS parameter specifies the sampling interval in +> each dimension between the data elements that will be returned. +- + FTGSV[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) +- +>8 Get an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Any Undefined + pixels in the array will have the corresponding 'flagvals' + element set equal to .TRUE. The first and last rows in the table + to be read are specified by fpixels(naxis+1) and lpixels(naxis+1), + and hence are treated as the next higher dimension of the FITS + N-dimensional array. The INCS parameter specifies the sampling + interval in each dimension between the data elements that will be +> returned. +- + FTGSF[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +- +>9 Get bit values from a byte ('B') or bit (`X`) table column (in the + CDU). LRAY is an array of logical values corresponding to the + sequence of bits to be read. If LRAY is true then the + corresponding bit was set to 1, otherwise the bit was set to 0. + Note that in the case of 'X' columns, FITSIO will read all 8 bits + of each byte whether they are formally valid or not. Thus if the + column is defined as '4X', and one calls FTGCX with fbit=1 and + nbit=8, then all 8 bits will be read from the first byte (as + opposed to reading the first 4 bits from the first row and then the + first 4 bits from the next row), even though the last 4 bits of +> each byte are formally not defined. +- + FTGCX(unit,colnum,frow,fbit,nbit, > lray,status) +- +>10 Read any consecutive set of bits from an 'X' or 'B' column and + interpret them as an unsigned n-bit integer. NBIT must be less than + or equal to 16 when calling FTGCXI, and less than or equal to 32 when + calling FTGCXJ; there is no limit on the value of NBIT for FTGCXD, but + the returned double precision value only has 48 bits of precision on + most 32-bit word machines. The NBITS bits are interpreted as an + unsigned integer unless NBITS = 16 (in FTGCXI) or 32 (in FTGCXJ) in which + case the string of bits are interpreted as 16-bit or 32-bit 2's + complement signed integers. If NROWS is greater than 1 then the + same set of bits will be read from sequential rows in the table + starting with row FROW. Note that the numbering convention + used here for the FBIT parameter adopts 1 for the first element of the +> vector of bits; this is the Most Significant Bit of the integer value. +- + FTGCX[IJD](unit,colnum,frow,nrows,fbit,nbit, > array,status) +- +>11 Get the descriptor for a variable length column in a binary table. + The descriptor consists of 2 integer parameters: the number of elements + in the array and the starting offset relative to the start of the heap. + The first routine returns a single descriptor whereas the second routine +> returns the descriptors for a range of rows in the table. +- + FTGDES(unit,colnum,rownum, > nelements,offset,status) + FTGDESLL(unit,colnum,rownum, > nelementsll,offsetll,status) + + FFGDESS(unit,colnum,firstrow,nrows > nelements,offset, status) + FFGDESSLL(unit,colnum,firstrow,nrows > nelementsll,offsetll, status) +- +>12 Write the descriptor for a variable length column in a binary table. + These subroutines can be used in conjunction with FTGDES to enable + 2 or more arrays to point to the same storage location to save +> storage space if the arrays are identical. +- + FTPDES(unit,colnum,rownum,nelements,offset, > status) + FTPDESLL(unit,colnum,rownum,nelementsll,offsetll, > status) +- + +**I. Row Selection and Calculator Routines \label{FTFROW} + +These routines all parse and evaluate an input string containing a user +defined arithmetic expression. The first 3 routines select rows in a +FITS table, based on whether the expression evaluates to true (not +equal to zero) or false (zero). The other routines evaluate the +expression and calculate a value for each row of the table. The +allowed expression syntax is described in the row filter section in the +earlier `Extended File Name Syntax' chapter of this document. The +expression may also be written to a text file, and the name of the +file, prepended with a '@' character may be supplied for the 'expr' +parameter (e.g. '@filename.txt'). The expression in the file can +be arbitrarily complex and extend over multiple lines of the file. +Lines that begin with 2 slash characters ('//') will be ignored and +may be used to add comments to the file. + +>1 Evaluate a boolean expression over the indicated rows, returning an +> array of flags indicating which rows evaluated to TRUE/FALSE +- + FTFROW(unit,expr,firstrow, nrows, > n_good_rows, row_status, status) +- +>>2 Find the first row which satisfies the input boolean expression +- + FTFFRW(unit, expr, > rownum, status) +- +>3 Evaluate an expression on all rows of a table. If the input and output +files are not the same, copy the TRUE rows to the output file. If the +>files are the same, delete the FALSE rows (preserve the TRUE rows). +- + FTSROW(inunit, outunit, expr, > status) +- +>4 Calculate an expression for the indicated rows of a table, returning +the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If +nulval==NULL, UNDEFs will be zeroed out. For vector results, the number +of elements returned may be less than nelements if nelements is not an +even multiple of the result dimension. Call FTTEXP to obtain +>the dimensions of the results. +- + FTCROW(unit,datatype,expr,firstrow,nelements,nulval, > + array,anynul,status) +- +>5 Evaluate an expression and write the result either to a column (if +the expression is a function of other columns in the table) or to a +keyword (if the expression evaluates to a constant and is not a +function of other columns in the table). In the former case, the +parName parameter is the name of the column (which may or may not already +exist) into which to write the results, and parInfo contains an +optional TFORM keyword value if a new column is being created. If a +TFORM value is not specified then a default format will be used, +depending on the expression. If the expression evaluates to a constant, +then the result will be written to the keyword name given by the +parName parameter, and the parInfo parameter may be used to supply an +optional comment for the keyword. If the keyword does not already +exist, then the name of the keyword must be preceded with a '\#' character, +>otherwise the result will be written to a column with that name. + +- + FTCALC(inunit, expr, outunit, parName, parInfo, > status) +- +>6 This calculator routine is similar to the previous routine, except +that the expression is only evaluated over the specified +row ranges. nranges specifies the number of row ranges, and firstrow +>and lastrow give the starting and ending row number of each range. +- + FTCALC_RNG(inunit, expr, outunit, parName, parInfo, + nranges, firstrow, lastrow, > status) +- +>>7 Evaluate the given expression and return information on the result. +- + FTTEXP(unit, expr, > datatype, nelem, naxis, naxes, status) +- + + +**J. Celestial Coordinate System Subroutines \label{FTGICS} + +The FITS community has adopted a set of keyword conventions that define +the transformations needed to convert between pixel locations in an +image and the corresponding celestial coordinates on the sky, or more +generally, that define world coordinates that are to be associated with +any pixel location in an n-dimensional FITS array. CFITSIO is distributed +with a couple of self-contained World Coordinate System (WCS) routines, +however, these routines DO NOT support all the latest WCS conventions, +so it is STRONGLY RECOMMENDED that software developers use a more robust +external WCS library. Several recommended libraries are: +- + WCSLIB - supported by Mark Calabretta + WCSTools - supported by Doug Mink + AST library - developed by the U.K. Starlink project +- + +More information about the WCS keyword conventions and links to all of +these WCS libraries can be found on the FITS Support Office web site at +http://fits.gsfc.nasa.gov under the WCS link. + +The functions provided in these external WCS libraries will need access to +the WCS information contained in the FITS file headers. One convenient +way to pass this information to the extermal library is to use FITSIO +to copy the header keywords into one long character string, and then +pass this string to an interface routine in the external library that +will extract the necessary WCS information (e.g., see the astFitsChan +and astPutCards routines in the Starlink AST library). + +The following FITSIO routines DO NOT support the more recent WCS conventions +that have been approved as part of the FITS standard. Consequently, +the following routines ARE NOW DEPRECATED. It is STRONGLY RECOMMENDED +that software developers not use these routines, and instead use an +external WCS library, as described above. + +These routines are included mainly for backward compatibility with +existing software. They support the following standard map +projections: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, and -AIT (these are the +legal values for the coordtype parameter). These routines are based +on similar functions in Classic AIPS. All the angular quantities are +given in units of degrees. + +>1 Get the values of all the standard FITS celestial coordinate system + keywords from the header of a FITS image (i.e., the primary array or + an image extension). These values may then be passed to the subroutines + that perform the coordinate transformations. If any or all of the WCS + keywords are not present, then default values will be returned. If + the first coordinate axis is the declination-like coordinate, then + this routine will swap them so that the longitudinal-like coordinate + is returned as the first axis. + + If the file uses the newer 'CDj\_i' WCS transformation matrix + keywords instead of old style 'CDELTn' and 'CROTA2' keywords, then + this routine will calculate and return the values of the equivalent + old-style keywords. Note that the conversion from the new-style + keywords to the old-style values is sometimes only an + approximation, so if the approximation is larger than an internally + defined threshold level, then CFITSIO will still return the + approximate WCS keyword values, but will also return with status = + 506, to warn the calling program that approximations have been + made. It is then up to the calling program to decide whether the + approximations are sufficiently accurate for the particular + application, or whether more precise WCS transformations must be +> performed using new-style WCS keywords directly. +- + FTGICS(unit, > xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) +- +>2 Get the values of all the standard FITS celestial coordinate system + keywords from the header of a FITS table where the X and Y (or RA and + DEC coordinates are stored in 2 separate columns of the table. + These values may then be passed to the subroutines that perform the +> coordinate transformations. +- + FTGTCS(unit,xcol,ycol, > + xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) +- +>3 Calculate the celestial coordinate corresponding to the input +> X and Y pixel location in the image. +- + FTWLDP(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpos,ypos,status) +- +>4 Calculate the X and Y pixel location corresponding to the input +> celestial coordinate in the image. +- + FTXYPX(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpix,ypix,status) +- + +**K. File Checksum Subroutines \label{FTPCKS} + +The following routines either compute or validate the checksums for the +CHDU. The DATASUM keyword is used to store the numerical value of the +32-bit, 1's complement checksum for the data unit alone. If there is +no data unit then the value is set to zero. The numerical value is +stored as an ASCII string of digits, enclosed in quotes, because the +value may be too large to represent as a 32-bit signed integer. The +CHECKSUM keyword is used to store the ASCII encoded COMPLEMENT of the +checksum for the entire HDU. Storing the complement, rather than the +actual checksum, forces the checksum for the whole HDU to equal zero. +If the file has been modified since the checksums were computed, then +the HDU checksum will usually not equal zero. These checksum keyword +conventions are based on a paper by Rob Seaman published in the +proceedings of the ADASS IV conference in Baltimore in November 1994 +and a later revision in June 1995. + +>1 Compute and write the DATASUM and CHECKSUM keyword values for the CHDU + into the current header. The DATASUM value is the 32-bit checksum + for the data unit, expressed as a decimal integer enclosed in single + quotes. The CHECKSUM keyword value is a 16-character string which + is the ASCII-encoded value for the complement of the checksum for + the whole HDU. If these keywords already exist, their values + will be updated only if necessary (i.e., if the file has been modified +> since the original keyword values were computed). +- + FTPCKS(unit, > status) +- +>2 Update the CHECKSUM keyword value in the CHDU, assuming that the + DATASUM keyword exists and already has the correct value. This routine + calculates the new checksum for the current header unit, adds it to the + data unit checksum, encodes the value into an ASCII string, and writes +> the string to the CHECKSUM keyword. +- + FTUCKS(unit, > status) +- +>3 Verify the CHDU by computing the checksums and comparing + them with the keywords. The data unit is verified correctly + if the computed checksum equals the value of the DATASUM + keyword. The checksum for the entire HDU (header plus data unit) is + correct if it equals zero. The output DATAOK and HDUOK parameters + in this subroutine are integers which will have a value = 1 + if the data or HDU is verified correctly, a value = 0 + if the DATASUM or CHECKSUM keyword is not present, or value = -1 +> if the computed checksum is not correct. +- + FTVCKS(unit, > dataok,hduok,status) +- +>4 Compute and return the checksum values for the CHDU (as + double precision variables) without creating or modifying the + CHECKSUM and DATASUM keywords. This routine is used internally by +> FTVCKS, but may be useful in other situations as well. +- + FTGCKS(unit, > datasum,hdusum,status) +- +>5 Encode a checksum value (stored in a double precision variable) + into a 16-character string. If COMPLEMENT = .true. then the 32-bit +> sum value will be complemented before encoding. +- + FTESUM(sum,complement, > checksum) +- +>6 Decode a 16 character checksum string into a double precision value. + If COMPLEMENT = .true. then the 32-bit sum value will be complemented +> after decoding. +- + FTDSUM(checksum,complement, > sum) +- + +**L. Date and Time Utility Routines \label{FTGSDT} + +The following routines help to construct or parse the FITS date/time +strings. Starting in the year 2000, the FITS DATE keyword values (and +the values of other `DATE-' keywords) must have the form 'YYYY-MM-DD' +(date only) or 'YYYY-MM-DDThh:mm:ss.ddd...' (date and time) where the +number of decimal places in the seconds value is optional. These times +are in UTC. The older 'dd/mm/yy' date format may not be used for dates +after 01 January 2000. + +>1 Get the current system date. The returned year has 4 digits +> (1999, 2000, etc.) +- + FTGSDT( > day, month, year, status ) +- + +>2 Get the current system date and time string ('YYYY-MM-DDThh:mm:ss'). +The time will be in UTC/GMT if available, as indicated by a returned timeref +value = 0. If the returned value of timeref = 1 then this indicates that +it was not possible to convert the local time to UTC, and thus the local +>time was returned. +- + FTGSTM(> datestr, timeref, status) +- + +>3 Construct a date string from the input date values. If the year +is between 1900 and 1998, inclusive, then the returned date string will +have the old FITS format ('dd/mm/yy'), otherwise the date string will +have the new FITS format ('YYYY-MM-DD'). Use FTTM2S instead +> to always return a date string using the new FITS format. +- + FTDT2S( year, month, day, > datestr, status) +- + +>4 Construct a new-format date + time string ('YYYY-MM-DDThh:mm:ss.ddd...'). + If the year, month, and day values all = 0 then only the time is encoded + with format 'hh:mm:ss.ddd...'. The decimals parameter specifies how many + decimal places of fractional seconds to include in the string. If `decimals' +> is negative, then only the date will be return ('YYYY-MM-DD'). +- + FTTM2S( year, month, day, hour, minute, second, decimals, + > datestr, status) +- + +>5 Return the date as read from the input string, where the string may be +in either the old ('dd/mm/yy') or new ('YYYY-MM-DDThh:mm:ss' or +>'YYYY-MM-DD') FITS format. +- + FTS2DT(datestr, > year, month, day, status) +- + +>6 Return the date and time as read from the input string, where the +string may be in either the old or new FITS format. The returned hours, +minutes, and seconds values will be set to zero if the input string +does not include the time ('dd/mm/yy' or 'YYYY-MM-DD') . Similarly, +the returned year, month, and date values will be set to zero if the +>date is not included in the input string ('hh:mm:ss.ddd...'). +- + FTS2TM(datestr, > year, month, day, hour, minute, second, status) +- + +**M. General Utility Subroutines \label{FTGHAD} + +The following utility subroutines may be useful for certain applications: + +>>1 Return the starting byte address of the CHDU and the next HDU. +- + FTGHAD(iunit, > curaddr, nextaddr) +- +>>2 Convert a character string to uppercase (operates in place). +- + FTUPCH(string) +- +>3 Compare the input template string against the reference string + to see if they match. The template string may contain wildcard + characters: '*' will match any sequence of characters (including + zero characters) and '?' will match any single character in the + reference string. The '\#' character will match any consecutive string + of decimal digits (0 - 9). If CASESN = .true. then the match will be + case sensitive. The returned MATCH parameter will be .true. if + the 2 strings match, and EXACT will be .true. if the match is + exact (i.e., if no wildcard characters were used in the match). +> Both strings must be 68 characters or less in length. +- + FTCMPS(str_template, string, casesen, > match, exact) +- + +>4 Test that the keyword name contains only legal characters: A-Z,0-9, +> hyphen, and underscore. +- + FTTKEY(keyword, > status) +- +>5 Test that the keyword record contains only legal printable ASCII +> characters +- + FTTREC(card, > status) +- +>6 Test whether the current header contains any NULL (ASCII 0) characters. + These characters are illegal in the header, but they will go undetected + by most of the CFITSIO keyword header routines, because the null is + interpreted as the normal end-of-string terminator. This routine returns + the position of the first null character in the header, or zero if there + are no nulls. For example a returned value of 110 would indicate that + the first NULL is located in the 30th character of the second keyword + in the header (recall that each header record is 80 characters long). + Note that this is one of the few FITSIO routines in which the returned +> value is not necessarily equal to the status value). +- + FTNCHK(unit, > status) +- +>7 Parse a header keyword record and return the name of the keyword + and the length of the name. + The keyword name normally occupies the first 8 characters of the + record, except under the HIERARCH convention where the name can +> be up to 70 characters in length. +- + FTGKNM(card, > keyname, keylength, staThe '\#' character will match any consecutive string + of decimal digits (0 - 9). tus) +- +>8 Parse a header keyword record. + This subroutine parses the input header record to return the value (as + a character string) and comment strings. If the keyword has no + value (columns 9-10 not equal to '= '), then the value string is returned + blank and the comment string is set equal to column 9 - 80 of the +> input string. +- + FTPSVC(card, > value,comment,status) +- +>9 Construct a sequence keyword name (ROOT + nnn). + This subroutine appends the sequence number to the root string to create +> a keyword name (e.g., 'NAXIS' + 2 = 'NAXIS2') +- + FTKEYN(keyroot,seq_no, > keyword,status) +- +>10 Construct a sequence keyword name (n + ROOT). + This subroutine concatenates the sequence number to the front of the +> root string to create a keyword name (e.g., 1 + 'CTYP' = '1CTYP') +- + FTNKEY(seq_no,keyroot, > keyword,status) +- +>11 Determine the datatype of a keyword value string. + This subroutine parses the keyword value string (usually columns 11-30 +> of the header record) to determine its datatype. +- + FTDTYP(value, > dtype,status) +- +>11 Return the class of input header record. The record is classified + into one of the following categories (the class values are + defined in fitsio.h). Note that this is one of the few FITSIO +> routines that does not return a status value. +- + Class Value Keywords + TYP_STRUC_KEY 10 SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, + GROUPS, PCOUNT, GCOUNT, END + XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, + and the first 4 COMMENT keywords in the primary array + that define the FITS format. + TYP_CMPRS_KEY 20 The experimental keywords used in the compressed + image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, + ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK + TYP_SCAL_KEY 30 BSCALE, BZERO, TSCALn, TZEROn + TYP_NULL_KEY 40 BLANK, TNULLn + TYP_DIM_KEY 50 TDIMn + TYP_RANG_KEY 60 TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX + TYP_UNIT_KEY 70 BUNIT, TUNITn + TYP_DISP_KEY 80 TDISPn + TYP_HDUID_KEY 90 EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL + TYP_CKSUM_KEY 100 CHECKSUM, DATASUM + TYP_WCS_KEY 110 CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn + CDj_is, PVj_ms, LONPOLEs, LATPOLEs + TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, + TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn + jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, + iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn + (i,j,m,n are integers, s is any letter) + TYP_REFSYS_KEY 120 EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs + TYP_COMM_KEY 130 COMMENT, HISTORY, (blank keyword) + TYP_CONT_KEY 140 CONTINUE + TYP_USER_KEY 150 all other keywords + + class = FTGKCL (char *card) +- +>12 Parse the 'TFORM' binary table column format string. + This subroutine parses the input TFORM character string and returns the + integer datatype code, the repeat count of the field, and, in the case + of character string fields, the length of the unit string. The following + datatype codes are returned (the negative of the value is returned +> if the column contains variable-length arrays): +- + Datatype DATACODE value + bit, X 1 + byte, B 11 + logical, L 14 + ASCII character, A 16 + short integer, I 21 + integer, J 41 + real, E 42 + double precision, D 82 + complex 83 + double complex 163 + + FTBNFM(tform, > datacode,repeat,width,status) +- +>13 Parse the 'TFORM' keyword value that defines the column format in + an ASCII table. This routine parses the input TFORM character + string and returns the datatype code, the width of the column, + and (if it is a floating point column) the number of decimal places + to the right of the decimal point. The returned datatype codes are + the same as for the binary table, listed above, with the following + additional rules: integer columns that are between 1 and 4 characters + wide are defined to be short integers (code = 21). Wider integer + columns are defined to be regular integers (code = 41). Similarly, + Fixed decimal point columns (with TFORM = 'Fw.d') are defined to + be single precision reals (code = 42) if w is between 1 and 7 characters + wide, inclusive. Wider 'F' columns will return a double precision + data code (= 82). 'Ew.d' format columns will have datacode = 42, +> and 'Dw.d' format columns will have datacode = 82. +- + FTASFM(tform, > datacode,width,decimals,status) +- +>14 Calculate the starting column positions and total ASCII table width + based on the input array of ASCII table TFORM values. The SPACE input + parameter defines how many blank spaces to leave between each column + (it is recommended to have one space between columns for better human +> readability). +- + FTGABC(tfields,tform,space, > rowlen,tbcol,status) +- +>15 Parse a template string and return a formatted 80-character string + suitable for appending to (or deleting from) a FITS header file. + This subroutine is useful for parsing lines from an ASCII template file + and reformatting them into legal FITS header records. The formatted + string may then be passed to the FTPREC, FTMCRD, or FTDKEY subroutines +> to append or modify a FITS header record. +- + FTGTHD(template, > card,hdtype,status) +- + The input TEMPLATE character string generally should contain 3 tokens: + (1) the KEYNAME, (2) the VALUE, and (3) the COMMENT string. The + TEMPLATE string must adhere to the following format: + +>- The KEYNAME token must begin in columns 1-8 and be a maximum of 8 + characters long. If the first 8 characters of the template line are + blank then the remainder of the line is considered to be a FITS comment + (with a blank keyword name). A legal FITS keyword name may only + contain the characters A-Z, 0-9, and '-' (minus sign) and + underscore. This subroutine will automatically convert any lowercase + characters to uppercase in the output string. If KEYNAME = 'COMMENT' + or 'HISTORY' then the remainder of the line is considered to be a FITS +> COMMENT or HISTORY record, respectively. + +>- The VALUE token must be separated from the KEYNAME token by one or more + spaces and/or an '=' character. The datatype of the VALUE token + (numeric, logical, or character string) is automatically determined + and the output CARD string is formatted accordingly. The value + token may be forced to be interpreted as a string (e.g. if it is a +> string of numeric digits) by enclosing it in single quotes. + +>- The COMMENT token is optional, but if present must be separated from + the VALUE token by at least one blank space. A leading '/' character + may be used to mark the beginning of the comment field, otherwise the + comment field begins with the first non-blank character following the +> value token. + +>- One exception to the above rules is that if the first non-blank + character in the template string is a minus sign ('-') followed + by a single token, or a single token followed by an equal sign, + then it is interpreted as the name of a keyword which is to be +> deleted from the FITS header. + +>- The second exception is that if the template string starts with + a minus sign and is followed by 2 tokens then the second token + is interpreted as the new name for the keyword specified by + first token. In this case the old keyword name (first token) + is returned in characters 1-8 of the returned CARD string, and + the new keyword name (the second token) is returned in characters + 41-48 of the returned CARD string. These old and new names + may then be passed to the FTMNAM subroutine which will change +> the keyword name. + + The HDTYPE output parameter indicates how the returned CARD string + should be interpreted: +- + hdtype interpretation + ------ ------------------------------------------------- + -2 Modify the name of the keyword given in CARD(1:8) + to the new name given in CARD(41:48) + + -1 CARD(1:8) contains the name of a keyword to be deleted + from the FITS header. + + 0 append the CARD string to the FITS header if the + keyword does not already exist, otherwise update + the value/comment if the keyword is already present + in the header. + + 1 simply append this keyword to the FITS header (CARD + is either a HISTORY or COMMENT keyword). + + 2 This is a FITS END record; it should not be written + to the FITS header because FITSIO automatically + appends the END record when the header is closed. +- + EXAMPLES: The following lines illustrate valid input template strings: +- + INTVAL 7 This is an integer keyword + RVAL 34.6 / This is a floating point keyword + EVAL=-12.45E-03 This is a floating point keyword in exponential notation + lval F This is a boolean keyword + This is a comment keyword with a blank keyword name + SVAL1 = 'Hello world' / this is a string keyword + SVAL2 '123.5' this is also a string keyword + sval3 123+ / this is also a string keyword with the value '123+ ' + # the following template line deletes the DATE keyword + - DATE + # the following template line modifies the NAME keyword to OBJECT + - NAME OBJECT +- +>16 Parse the input string containing a list of rows or row ranges, and + return integer arrays containing the first and last row in each + range. For example, if rowlist = "3-5, 6, 8-9" then it will + return numranges = 3, rangemin = 3, 6, 8 and rangemax = 5, 6, 9. + At most, 'maxranges' number of ranges will be returned. 'maxrows' + is the maximum number of rows in the table; any rows or ranges + larger than this will be ignored. The rows must be specified in + increasing order, and the ranges must not overlap. A minus sign + may be use to specify all the rows to the upper or lower bound, so + "50-" means all the rows from 50 to the end of the table, and "-" +> means all the rows in the table, from 1 - maxrows. +- + FTRWRG(rowlist, maxrows, maxranges, > + numranges, rangemin, rangemax, status) +- + + + +*VI. The CFITSIO Iterator Function + +The fits\_iterate\_data function in CFITSIO provides a unique method of +executing an arbitrary user-supplied `work' function that operates on +rows of data in FITS tables or on pixels in FITS images. Rather than +explicitly reading and writing the FITS images or columns of data, one +instead calls the CFITSIO iterator routine, passing to it the name of +the user's work function that is to be executed along with a list of +all the table columns or image arrays that are to be passed to the work +function. The CFITSIO iterator function then does all the work of +allocating memory for the arrays, reading the input data from the FITS +file, passing them to the work function, and then writing any output +data back to the FITS file after the work function exits. Because +it is often more efficient to process only a subset of the total table +rows at one time, the iterator function can determine the optimum +amount of data to pass in each iteration and repeatly call the work +function until the entire table been processed. + +For many applications this single CFITSIO iterator function can +effectively replace all the other CFITSIO routines for reading or +writing data in FITS images or tables. Using the iterator has several +important advantages over the traditional method of reading and writing +FITS data files: + +\begin{itemize} +\item +It cleanly separates the data I/O from the routine that operates on +the data. This leads to a more modular and `object oriented' +programming style. + +\item +It simplifies the application program by eliminating the need to allocate +memory for the data arrays and eliminates most of the calls to the CFITSIO +routines that explicitly read and write the data. + +\item +It ensures that the data are processed as efficiently as possible. +This is especially important when processing tabular data since +the iterator function will calculate the most efficient number +of rows in the table to be passed at one time to the user's work +function on each iteration. + +\item +Makes it possible for larger projects to develop a library of work +functions that all have a uniform calling sequence and are all +independent of the details of the FITS file format. + +\end{itemize} + +There are basically 2 steps in using the CFITSIO iterator function. +The first step is to design the work function itself which must have a +prescribed set of input parameters. One of these parameters is a +structure containing pointers to the arrays of data; the work function +can perform any desired operations on these arrays and does not need to +worry about how the input data were read from the file or how the +output data get written back to the file. + +The second step is to design the driver routine that opens all the +necessary FITS files and initializes the input parameters to the +iterator function. The driver program calls the CFITSIO iterator +function which then reads the data and passes it to the user's work +function. + +Further details on using the iterator function can be found in the +companion CFITSIO User's Guide, and in the iter\_a.f, iter\_b.f and +iter\_c.f example programs. + + + +*IV. Extended File Name Syntax + +**A. Overview + +CFITSIO supports an extended syntax when specifying the name of the +data file to be opened or created that includes the following +features: + +\begin{itemize} +\item +CFITSIO can read IRAF format images which have header file names that +end with the '.imh' extension, as well as reading and writing FITS +files, This feature is implemented in CFITSIO by first converting the +IRAF image into a temporary FITS format file in memory, then opening +the FITS file. Any of the usual CFITSIO routines then may be used to +read the image header or data. Similarly, raw binary data arrays can +be read by converting them on the fly into virtual FITS images. + +\item +FITS files on the internet can be read (and sometimes written) using the FTP, +HTTP, or ROOT protocols. + +\item +FITS files can be piped between tasks on the stdin and stdout streams. + +\item +FITS files can be read and written in shared memory. This can potentially +achieve much better data I/O performance compared to reading and +writing the same FITS files on magnetic disk. + +\item +Compressed FITS files in gzip or Unix COMPRESS format can be directly read. + +\item +Output FITS files can be written directly in compressed gzip format, +thus saving disk space. + +\item +FITS table columns can be created, modified, or deleted 'on-the-fly' as +the table is opened by CFITSIO. This creates a virtual FITS file containing +the modifications that is then opened by the application program. + +\item +Table rows may be selected, or filtered out, on the fly when the table +is opened by CFITSIO, based on an arbitrary user-specified expression. +Only rows for which the expression evaluates to 'TRUE' are retained +in the copy of the table that is opened by the application program. + +\item +Histogram images may be created on the fly by binning the values in +table columns, resulting in a virtual N-dimensional FITS image. The +application program then only sees the FITS image (in the primary +array) instead of the original FITS table. +\end{itemize} + +The latter 3 features in particular add very powerful data processing +capabilities directly into CFITSIO, and hence into every task that uses +CFITSIO to read or write FITS files. For example, these features +transform a very simple program that just copies an input FITS file to +a new output file (like the `fitscopy' program that is distributed with +CFITSIO) into a multipurpose FITS file processing tool. By appending +fairly simple qualifiers onto the name of the input FITS file, the user +can perform quite complex table editing operations (e.g., create new +columns, or filter out rows in a table) or create FITS images by +binning or histogramming the values in table columns. In addition, +these functions have been coded using new state-of-the art algorithms +that are, in some cases, 10 - 100 times faster than previous widely +used implementations. + +Before describing the complete syntax for the extended FITS file names +in the next section, here are a few examples of FITS file names that +give a quick overview of the allowed syntax: + +\begin{itemize} +\item +{\tt 'myfile.fits'}: the simplest case of a FITS file on disk in the current +directory. + +\item +{\tt 'myfile.imh'}: opens an IRAF format image file and converts it on the +fly into a temporary FITS format image in memory which can then be read with +any other CFITSIO routine. + +\item +{\tt rawfile.dat[i512,512]}: opens a raw binary data array (a 512 x 512 +short integer array in this case) and converts it on the fly into a +temporary FITS format image in memory which can then be read with any +other CFITSIO routine. + +\item +{\tt myfile.fits.gz}: if this is the name of a new output file, the '.gz' +suffix will cause it to be compressed in gzip format when it is written to +disk. + +\item +{\tt 'myfile.fits.gz[events, 2]'}: opens and uncompresses the gzipped file +myfile.fits then moves to the extension which has the keywords EXTNAME += 'EVENTS' and EXTVER = 2. + +\item +{\tt '-'}: a dash (minus sign) signifies that the input file is to be read +from the stdin file stream, or that the output file is to be written to +the stdout stream. + +\item +{\tt 'ftp://legacy.gsfc.nasa.gov/test/vela.fits'}: FITS files in any ftp +archive site on the internet may be directly opened with read-only +access. + +\item +{\tt 'http://legacy.gsfc.nasa.gov/software/test.fits'}: any valid URL to a +FITS file on the Web may be opened with read-only access. + +\item +{\tt 'root://legacy.gsfc.nasa.gov/test/vela.fits'}: similar to ftp access +except that it provides write as well as read access to the files +across the network. This uses the root protocol developed at CERN. + +\item +{\tt 'shmem://h2[events]'}: opens the FITS file in a shared memory segment and +moves to the EVENTS extension. + +\item +{\tt 'mem://'}: creates a scratch output file in core computer memory. The +resulting 'file' will disappear when the program exits, so this +is mainly useful for testing purposes when one does not want a +permanent copy of the output file. + +\item +{\tt 'myfile.fits[3; Images(10)]'}: opens a copy of the image contained in the +10th row of the 'Images' column in the binary table in the 3th extension +of the FITS file. The application just sees this single image as the +primary array. + +\item +{\tt 'myfile.fits[1:512:2, 1:512:2]'}: opens a section of the input image +ranging from the 1st to the 512th pixel in X and Y, and selects every +second pixel in both dimensions, resulting in a 256 x 256 pixel image +in this case. + +\item +{\tt 'myfile.fits[EVENTS][col Rad = sqrt(X**2 + Y**2)]'}: creates and opens +a temporary file on the fly (in memory or on disk) that is identical to +myfile.fits except that it will contain a new column in the EVENTS +extension called 'Rad' whose value is computed using the indicated +expresson which is a function of the values in the X and Y columns. + +\item +{\tt 'myfile.fits[EVENTS][PHA > 5]'}: creates and opens a temporary FITS +files that is identical to 'myfile.fits' except that the EVENTS table +will only contain the rows that have values of the PHA column greater +than 5. In general, any arbitrary boolean expression using a C or +Fortran-like syntax, which may combine AND and OR operators, +may be used to select rows from a table. + +\item +{\tt 'myfile.fits[EVENTS][bin (X,Y)=1,2048,4]'}: creates a temporary FITS +primary array image which is computed on the fly by binning (i.e, +computing the 2-dimensional histogram) of the values in the X and Y +columns of the EVENTS extension. In this case the X and Y coordinates +range from 1 to 2048 and the image pixel size is 4 units in both +dimensions, so the resulting image is 512 x 512 pixels in size. + +\item +The final example combines many of these feature into one complex +expression (it is broken into several lines for clarity): +- + 'ftp://legacy.gsfc.nasa.gov/data/sample.fits.gz[EVENTS] + [col phacorr = pha * 1.1 - 0.3][phacorr >= 5.0 && phacorr <= 14.0] + [bin (X,Y)=32]' +- +In this case, CFITSIO (1) copies and uncompresses the FITS file from +the ftp site on the legacy machine, (2) moves to the 'EVENTS' +extension, (3) calculates a new column called 'phacorr', (4) selects +the rows in the table that have phacorr in the range 5 to 14, and +finally (5) bins the remaining rows on the X and Y column coordinates, +using a pixel size = 32 to create a 2D image. All this processing is +completely transparent to the application program, which simply sees +the final 2-D image in the primary array of the opened file. +\end{itemize} + +The full extended CFITSIO FITS file name can contain several different +components depending on the context. These components are described in +the following sections: +- +When creating a new file: + filetype://BaseFilename(templateName) + +When opening an existing primary array or image HDU: + filetype://BaseFilename(outName)[HDUlocation][ImageSection] + +When opening an existing table HDU: + filetype://BaseFilename(outName)[HDUlocation][colFilter][rowFilter][binSpec] +- +The filetype, BaseFilename, outName, HDUlocation, and ImageSection +components, if present, must be given in that order, but the colFilter, +rowFilter, and binSpec specifiers may follow in any order. Regardless +of the order, however, the colFilter specifier, if present, will be +processed first by CFITSIO, followed by the rowFilter specifier, and +finally by the binSpec specifier. + +**A. Filetype + +The type of file determines the medium on which the file is located +(e.g., disk or network) and, hence, which internal device driver is used by +CFITSIO to read and/or write the file. Currently supported types are +- + file:// - file on local magnetic disk (default) + ftp:// - a readonly file accessed with the anonymous FTP protocol. + It also supports ftp://username:password@hostname/... + for accessing password-protected ftp sites. + http:// - a readonly file accessed with the HTTP protocol. It + does not support username:password like the ftp driver. + Proxy HTTP servers are supported using the http_proxy + environment variable. + root:// - uses the CERN root protocol for writing as well as + reading files over the network. + shmem:// - opens or creates a file which persists in the computer's + shared memory. + mem:// - opens a temporary file in core memory. The file + disappears when the program exits so this is mainly + useful for test purposes when a permanent output file + is not desired. +- +If the filetype is not specified, then type file:// is assumed. +The double slashes '//' are optional and may be omitted in most cases. + +***1. Notes about HTTP proxy servers + +A proxy HTTP server may be used by defining the address (URL) and port +number of the proxy server with the http\_proxy environment variable. +For example +- + setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 +- +will cause CFITSIO to use port 3128 on the heasarc proxy server whenever +reading a FITS file with HTTP. + +***2. Notes about the root filetype + +The original rootd server can be obtained from: +\verb-ftp://root.cern.ch/root/rootd.tar.gz- +but, for it to work correctly with CFITSIO one has to use a modified +version which supports a command to return the length of the file. +This modified version is available in rootd subdirectory +in the CFITSIO ftp area at +- + ftp://legacy.gsfc.nasa.gov/software/fitsio/c/root/rootd.tar.gz. +- + +This small server is started either by inetd when a client requests a +connection to a rootd server or by hand (i.e. from the command line). +The rootd server works with the ROOT TNetFile class. It allows remote +access to ROOT database files in either read or write mode. By default +TNetFile assumes port 432 (which requires rootd to be started as root). +To run rootd via inetd add the following line to /etc/services: +- + rootd 432/tcp +- +and to /etc/inetd.conf, add the following line: +- + rootd stream tcp nowait root /user/rdm/root/bin/rootd rootd -i +- +Force inetd to reread its conf file with "kill -HUP ". +You can also start rootd by hand running directly under your private +account (no root system privileges needed). For example to start +rootd listening on port 5151 just type: \verb+rootd -p 5151+ +Notice: no \& is needed. Rootd will go into background by itself. +- + Rootd arguments: + -i says we were started by inetd + -p port# specifies a different port to listen on + -d level level of debug info written to syslog + 0 = no debug (default) + 1 = minimum + 2 = medium + 3 = maximum +- +Rootd can also be configured for anonymous usage (like anonymous ftp). +To setup rootd to accept anonymous logins do the following (while being +logged in as root): +- + - Add the following line to /etc/passwd: + + rootd:*:71:72:Anonymous rootd:/var/spool/rootd:/bin/false + + where you may modify the uid, gid (71, 72) and the home directory + to suite your system. + + - Add the following line to /etc/group: + + rootd:*:72:rootd + + where the gid must match the gid in /etc/passwd. + + - Create the directories: + + mkdir /var/spool/rootd + mkdir /var/spool/rootd/tmp + chmod 777 /var/spool/rootd/tmp + + Where /var/spool/rootd must match the rootd home directory as + specified in the rootd /etc/passwd entry. + + - To make writeable directories for anonymous do, for example: + + mkdir /var/spool/rootd/pub + chown rootd:rootd /var/spool/rootd/pub +- +That's all. Several additional remarks: you can login to an anonymous +server either with the names "anonymous" or "rootd". The password should +be of type user@host.do.main. Only the @ is enforced for the time +being. In anonymous mode the top of the file tree is set to the rootd +home directory, therefore only files below the home directory can be +accessed. Anonymous mode only works when the server is started via +inetd. + +***3. Notes about the shmem filetype: + +Shared memory files are currently supported on most Unix platforms, +where the shared memory segments are managed by the operating system +kernel and `live' independently of processes. They are not deleted (by +default) when the process which created them terminates, although they +will disappear if the system is rebooted. Applications can create +shared memory files in CFITSIO by calling: +- + fit_create_file(&fitsfileptr, "shmem://h2", &status); +- +where the root `file' names are currently restricted to be 'h0', 'h1', +'h2', 'h3', etc., up to a maximumn number defined by the the value of +SHARED\_MAXSEG (equal to 16 by default). This is a prototype +implementation of the shared memory interface and a more robust +interface, which will have fewer restrictions on the number of files +and on their names, may be developed in the future. + +When opening an already existing FITS file in shared memory one calls +the usual CFITSIO routine: +- + fits_open_file(&fitsfileptr, "shmem://h7", mode, &status) +- +The file mode can be READWRITE or READONLY just as with disk files. +More than one process can operate on READONLY mode files at the same +time. CFITSIO supports proper file locking (both in READONLY and +READWRITE modes), so calls to fits\_open\_file may be locked out until +another other process closes the file. + +When an application is finished accessing a FITS file in a shared +memory segment, it may close it (and the file will remain in the +system) with fits\_close\_file, or delete it with fits\_delete\_file. +Physical deletion is postponed until the last process calls +ffclos/ffdelt. fits\_delete\_file tries to obtain a READWRITE lock on +the file to be deleted, thus it can be blocked if the object was not +opened in READWRITE mode. + +A shared memory management utility program called `smem', is included +with the CFITSIO distribution. It can be built by typing `make smem'; +then type `smem -h' to get a list of valid options. Executing smem +without any options causes it to list all the shared memory segments +currently residing in the system and managed by the shared memory +driver. To get a list of all the shared memory objects, run the system +utility program `ipcs [-a]'. + +**B. Base Filename + +The base filename is the name of the file optionally including the +director/subdirectory path, and in the case of `ftp', `http', and `root' +filetypes, the machine identifier. Examples: +- + myfile.fits + !data.fits + /data/myfile.fits + fits.gsfc.nasa.gov/ftp/sampledata/myfile.fits.gz +- + +When creating a new output file on magnetic disk (of type file://) if +the base filename begins with an exclamation point (!) then any +existing file with that same basename will be deleted prior to creating +the new FITS file. Otherwise if the file to be created already exists, +then CFITSIO will return an error and will not overwrite the existing +file. Note that the exclamation point, '!', is a special UNIX character, +so if it is used on the command line rather than entered at a task +prompt, it must be preceded by a backslash to force the UNIX +shell to pass it verbatim to the application program. + +If the output disk file name ends with the suffix '.gz', then CFITSIO +will compress the file using the gzip compression algorithm before +writing it to disk. This can reduce the amount of disk space used by +the file. Note that this feature requires that the uncompressed file +be constructed in memory before it is compressed and written to disk, +so it can fail if there is insufficient available memory. + +An input FITS file may be compressed with the gzip or Unix compress +algorithms, in which case CFITSIO will uncompress the file on the fly +into a temporary file (in memory or on disk). Compressed files may +only be opened with read-only permission. When specifying the name of +a compressed FITS file it is not necessary to append the file suffix +(e.g., `.gz' or `.Z'). If CFITSIO cannot find the input file name +without the suffix, then it will automatically search for a compressed +file with the same root name. In the case of reading ftp and http type +files, CFITSIO generally looks for a compressed version of the file +first, before trying to open the uncompressed file. By default, +CFITSIO copies (and uncompressed if necessary) the ftp or http FITS +file into memory on the local machine before opening it. This will +fail if the local machine does not have enough memory to hold the whole +FITS file, so in this case, the output filename specifier (see the next +section) can be used to further control how CFITSIO reads ftp and http +files. + +If the input file is an IRAF image file (*.imh file) then CFITSIO will +automatically convert it on the fly into a virtual FITS image before it +is opened by the application program. IRAF images can only be opened +with READONLY file access. + +Similarly, if the input file is a raw binary data array, then CFITSIO +will convert it on the fly into a virtual FITS image with the basic set +of required header keywords before it is opened by the application +program (with READONLY access). In this case the data type and +dimensions of the image must be specified in square brackets following +the filename (e.g. rawfile.dat[ib512,512]). The first character (case +insensitive) defines the datatype of the array: +- + b 8-bit unsigned byte + i 16-bit signed integer + u 16-bit unsigned integer + j 32-bit signed integer + r or f 32-bit floating point + d 64-bit floating point +- +An optional second character specifies the byte order of the array +values: b or B indicates big endian (as in FITS files and the native +format of SUN UNIX workstations and Mac PCs) and l or L indicates +little endian (native format of DEC OSF workstations and IBM PCs). If +this character is omitted then the array is assumed to have the native +byte order of the local machine. These datatype characters are then +followed by a series of one or more integer values separated by commas +which define the size of each dimension of the raw array. Arrays with +up to 5 dimensions are currently supported. Finally, a byte offset to +the position of the first pixel in the data file may be specified by +separating it with a ':' from the last dimension value. If omitted, it +is assumed that the offset = 0. This parameter may be used to skip +over any header information in the file that precedes the binary data. +Further examples: +- + raw.dat[b10000] 1-dimensional 10000 pixel byte array + raw.dat[rb400,400,12] 3-dimensional floating point big-endian array + img.fits[ib512,512:2880] reads the 512 x 512 short integer array in + a FITS file, skipping over the 2880 byte header +- + +One special case of input file is where the filename = `-' (a dash or +minus sign) or 'stdin' or 'stdout', which signifies that the input file +is to be read from the stdin stream, or written to the stdout stream if +a new output file is being created. In the case of reading from stdin, +CFITSIO first copies the whole stream into a temporary FITS file (in +memory or on disk), and subsequent reading of the FITS file occurs in +this copy. When writing to stdout, CFITSIO first constructs the whole +file in memory (since random access is required), then flushes it out +to the stdout stream when the file is closed. In addition, if the +output filename = '-.gz' or 'stdout.gz' then it will be gzip compressed +before being written to stdout. + +This ability to read and write on the stdin and stdout steams allows +FITS files to be piped between tasks in memory rather than having to +create temporary intermediate FITS files on disk. For example if task1 +creates an output FITS file, and task2 reads an input FITS file, the +FITS file may be piped between the 2 tasks by specifying +- + task1 - | task2 - +- +where the vertical bar is the Unix piping symbol. This assumes that the 2 +tasks read the name of the FITS file off of the command line. + +**C. Output File Name when Opening an Existing File + +An optional output filename may be specified in parentheses immediately +following the base file name to be opened. This is mainly useful in +those cases where CFITSIO creates a temporary copy of the input FITS +file before it is opened and passed to the application program. This +happens by default when opening a network FTP or HTTP-type file, when +reading a compressed FITS file on a local disk, when reading from the +stdin stream, or when a column filter, row filter, or binning specifier +is included as part of the input file specification. By default this +temporary file is created in memory. If there is not enough memory to +create the file copy, then CFITSIO will exit with an error. In these +cases one can force a permanent file to be created on disk, instead of +a temporary file in memory, by supplying the name in parentheses +immediately following the base file name. The output filename can +include the '!' clobber flag. + +Thus, if the input filename to CFITSIO is: +\verb+file1.fits.gz(file2.fits)+ +then CFITSIO will uncompress `file1.fits.gz' into the local disk file +`file2.fits' before opening it. CFITSIO does not automatically delete +the output file, so it will still exist after the application program +exits. + +In some cases, several different temporary FITS files will be created +in sequence, for instance, if one opens a remote file using FTP, then +filters rows in a binary table extension, then create an image by +binning a pair of columns. In this case, the remote file will be +copied to a temporary local file, then a second temporary file will be +created containing the filtered rows of the table, and finally a third +temporary file containing the binned image will be created. In cases +like this where multiple files are created, the outfile specifier will +be interpreted the name of the final file as described below, in descending +priority: + +\begin{itemize} +\item +as the name of the final image file if an image within a single binary +table cell is opened or if an image is created by binning a table column. +\item +as the name of the file containing the filtered table if a column filter +and/or a row filter are specified. +\item +as the name of the local copy of the remote FTP or HTTP file. +\item +as the name of the uncompressed version of the FITS file, if a +compressed FITS file on local disk has been opened. +\item +otherwise, the output filename is ignored. +\end{itemize} + + +The output file specifier is useful when reading FTP or HTTP-type +FITS files since it can be used to create a local disk copy of the file +that can be reused in the future. If the output file name = `*' then a +local file with the same name as the network file will be created. +Note that CFITSIO will behave differently depending on whether the +remote file is compressed or not as shown by the following examples: +\begin{itemize} +\item +`ftp://remote.machine/tmp/myfile.fits.gz(*)' - the remote compressed +file is copied to the local compressed file `myfile.fits.gz', which +is then uncompressed in local memory before being opened and passed +to the application program. + +\item +`ftp://remote.machine/tmp/myfile.fits.gz(myfile.fits)' - the remote +compressed file is copied and uncompressed into the local file +`myfile.fits'. This example requires less local memory than the +previous example since the file is uncompressed on disk instead of +in memory. + +\item +`ftp://remote.machine/tmp/myfile.fits(myfile.fits.gz)' - this will +usually produce an error since CFITSIO itself cannot compress files. +\end{itemize} + +The exact behavior of CFITSIO in the latter case depends on the type of +ftp server running on the remote machine and how it is configured. In +some cases, if the file `myfile.fits.gz' exists on the remote machine, +then the server will copy it to the local machine. In other cases the +ftp server will automatically create and transmit a compressed version +of the file if only the uncompressed version exists. This can get +rather confusing, so users should use a certain amount of caution when +using the output file specifier with FTP or HTTP file types, to make +sure they get the behavior that they expect. + +**D. Template File Name when Creating a New File + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described below. + +**E. Image Tile-Compression Specification + +When specifying the name of the output FITS file to be created, the +user can indicate that images should be written in tile-compressed +format (see section 5.5, ``Primary Array or IMAGE Extension I/O +Routines'') by enclosing the compression parameters in square brackets +following the root disk file name. Here are some examples of the +syntax for specifying tile-compressed output images: +- + myfile.fit[compress] - use Rice algorithm and default tile size + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + + myfile.fit[compress Rice 100,100] - use 100 x 100 pixel tile size + myfile.fit[compress Rice 100,100;2] - as above, and use noisebits = 2 +- + +**F. HDU Location Specification + +The optional HDU location specifier defines which HDU (Header-Data +Unit, also known as an `extension') within the FITS file to initially +open. It must immediately follow the base file name (or the output +file name if present). If it is not specified then the first HDU (the +primary array) is opened. The HDU location specifier is required if +the colFilter, rowFilter, or binSpec specifiers are present, because +the primary array is not a valid HDU for these operations. The HDU may +be specified either by absolute position number, starting with 0 for +the primary array, or by reference to the HDU name, and optionally, the +version number and the HDU type of the desired extension. The location +of an image within a single cell of a binary table may also be +specified, as described below. + +The absolute position of the extension is specified either by enclosed +the number in square brackets (e.g., `[1]' = the first extension +following the primary array) or by preceded the number with a plus sign +(`+1'). To specify the HDU by name, give the name of the desired HDU +(the value of the EXTNAME or HDUNAME keyword) and optionally the +extension version number (value of the EXTVER keyword) and the +extension type (value of the XTENSION keyword: IMAGE, ASCII or TABLE, +or BINTABLE), separated by commas and all enclosed in square brackets. +If the value of EXTVER and XTENSION are not specified, then the first +extension with the correct value of EXTNAME is opened. The extension +name and type are not case sensitive, and the extension type may be +abbreviated to a single letter (e.g., I = IMAGE extension or primary +array, A or T = ASCII table extension, and B = binary table BINTABLE +extension). If the HDU location specifier is equal to `[PRIMARY]' or +`[P]', then the primary array (the first HDU) will be opened. + +FITS images are most commonly stored in the primary array or an image +extension, but images can also be stored as a vector in a single cell +of a binary table (i.e. each row of the vector column contains a +different image). Such an image can be opened with CFITSIO by +specifying the desired column name and the row number after the binary +table HDU specifier as shown in the following examples. The column name +is separated from the HDU specifier by a semicolon and the row number +is enclosed in parentheses. In this case CFITSIO copies the image from +the table cell into a temporary primary array before it is opened. The +application program then just sees the image in the primary array, +without any extensions. The particular row to be opened may be +specified either by giving an absolute integer row number (starting +with 1 for the first row), or by specifying a boolean expression that +evaluates to TRUE for the desired row. The first row that satisfies +the expression will be used. The row selection expression has the same +syntax as described in the Row Filter Specifier section, below. + + Examples: +- + myfile.fits[3] - open the 3rd HDU following the primary array + myfile.fits+3 - same as above, but using the FTOOLS-style notation + myfile.fits[EVENTS] - open the extension that has EXTNAME = 'EVENTS' + myfile.fits[EVENTS, 2] - same as above, but also requires EXTVER = 2 + myfile.fits[events,2,b] - same, but also requires XTENSION = 'BINTABLE' + myfile.fits[3; images(17)] - opens the image in row 17 of the 'images' + column in the 3rd extension of the file. + myfile.fits[3; images(exposure > 100)] - as above, but opens the image + in the first row that has an 'exposure' column value + greater than 100. +- + +**G. Image Section + +A virtual file containing a rectangular subsection of an image can be +extracted and opened by specifying the range of pixels (start:end) +along each axis to be extracted from the original image. One can also +specify an optional pixel increment (start:end:step) for each axis of +the input image. A pixel step = 1 will be assumed if it is not +specified. If the start pixel is larger then the end pixel, then the +image will be flipped (producing a mirror image) along that dimension. +An asterisk, '*', may be used to specify the entire range of an axis, +and '-*' will flip the entire axis. The input image can be in the +primary array, in an image extension, or contained in a vector cell of +a binary table. In the later 2 cases the extension name or number must +be specified before the image section specifier. + + Examples: +- + myfile.fits[1:512:2, 2:512:2] - open a 256x256 pixel image + consisting of the odd numbered columns (1st axis) and + the even numbered rows (2nd axis) of the image in the + primary array of the file. + + myfile.fits[*, 512:256] - open an image consisting of all the columns + in the input image, but only rows 256 through 512. + The image will be flipped along the 2nd axis since + the starting pixel is greater than the ending pixel. + + myfile.fits[*:2, 512:256:2] - same as above but keeping only + every other row and column in the input image. + + myfile.fits[-*, *] - copy the entire image, flipping it along + the first axis. + + myfile.fits[3][1:256,1:256] - opens a subsection of the image that + is in the 3rd extension of the file. + + myfile.fits[4; images(12)][1:10,1:10] - open an image consisting + of the first 10 pixels in both dimensions. The original + image resides in the 12th row of the 'images' vector + column in the table in the 4th extension of the file. +- + +When CFITSIO opens an image section it first creates a temporary file +containing the image section plus a copy of any other HDUs in the +file. This temporary file is then opened by the application program, +so it is not possible to write to or modify the input file when +specifying an image section. Note that CFITSIO automatically updates +the world coordinate system keywords in the header of the image +section, if they exist, so that the coordinate associated with each +pixel in the image section will be computed correctly. + +**H. Image Transform Filters + +CFITSIO can apply a user-specified mathematical function to the value +of every pixel in a FITS image, thus creating a new virtual image +in computer memory that is then opened and read by the application +program. The original FITS image is not modified by this process. + +The image tranformation specifier is appended to the input +FITS file name and is enclosed in square brackets. It begins with the +letters 'PIX' to distinguish it from other types of FITS file filters +that are recognized by CFITSIO. The image transforming function may +use any of the mathmatical operators listed in the following +'Row Filtering Specification' section of this document. +Some examples of image transform filters are: +- + [pix X * 2.0] - multiply each pixel by 2.0 + [pix sqrt(X)] - take the square root of each pixel + [pix X + #ZEROPT - add the value of the ZEROPT keyword + [pix X>0 ? log10(X) : -99.] - if the pixel value is greater + than 0, compute the base 10 log, + else set the pixel = -99. +- +Use the letter 'X' in the expression to represent the current pixel value +in the image. The expression is evaluated +independently for each pixel in the image and may be a function of 1) the +original pixel value, 2) the value of other pixels in the image at +a given relative offset from the position of the pixel that is being +evaluated, and 3) the value of +any header keywords. Header keyword values are represented +by the name of the keyword preceded by the '\#' sign. + + +To access the the value of adjacent pixels in the image, +specify the (1-D) offset from the current pixel in curly brackets. +For example +- + [pix (x{-1} + x + x{+1}) / 3] +- +will replace each pixel value with the running mean of the values of that +pixel and it's 2 neighboring pixels. Note that in this notation the image +is treated as a 1-D array, where each row of the image (or higher dimensional +cube) is appended one after another in one long array of pixels. +It is possible to refer to pixels +in the rows above or below the current pixel by using the value of the +NAXIS1 header keyword. For example +- + [pix (x{-#NAXIS1} + x + x{#NAXIS1}) / 3] +- +will compute the mean of each image pixel and the pixels immediately +above and below it in the adjacent rows of the image. +The following more complex example +creates a smoothed virtual image where each pixel +is a 3 x 3 boxcar average of the input image pixels: +- + [pix (X + X{-1} + X{+1} + + X{-#NAXIS1} + X{-#NAXIS1 - 1} + X{-#NAXIS1 + 1} + + X{#NAXIS1} + X{#NAXIS1 - 1} + X{#NAXIS1 + 1}) / 9.] +- +If the pixel offset +extends beyond the first or last pixel in the image, the function will +evaluate to undefined, or NULL. + +For complex or commonly used image filtering operations, +one can write the expression into an external text file and +then import it into the +filter using the syntax '[pix @filename.txt]'. The mathematical +expression can +extend over multiple lines of text in the file. +Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +By default, the datatype of the resulting image will be the same as +the original image, but one may force a different datatype by appended +a code letter to the 'pix' keyword: +- + pixb - 8-bit byte image with BITPIX = 8 + pixi - 16-bit integer image with BITPIX = 16 + pixj - 32-bit integer image with BITPIX = 32 + pixr - 32-bit float image with BITPIX = -32 + pixd - 64-bit float image with BITPIX = -64 +- +Also by default, any other HDUs in the input file will be copied without +change to the +output virtual FITS file, but one may discard the other HDUs by adding +the number '1' to the 'pix' keyword (and following any optional datatype code +letter). For example: +- + myfile.fits[3][pixr1 sqrt(X)] +- +will create a virtual FITS file containing only a primary array image +with 32-bit floating point pixels that have a value equal to the square +root of the pixels in the image that is in the 3rd extension +of the 'myfile.fits' file. + + + +**I. Column and Keyword Filtering Specification + +The optional column/keyword filtering specifier is used to modify the +column structure and/or the header keywords in the HDU that was +selected with the previous HDU location specifier. This filtering +specifier must be enclosed in square brackets and can be distinguished +from a general row filter specifier (described below) by the fact that +it begins with the string 'col ' and is not immediately followed by an +equals sign. The original file is not changed by this filtering +operation, and instead the modifications are made on a copy of the +input FITS file (usually in memory), which also contains a copy of all +the other HDUs in the file. This temporary file is passed to the +application program and will persist only until the file is closed or +until the program exits, unless the outfile specifier (see above) is +also supplied. + +The column/keyword filter can be used to perform the following +operations. More than one operation may be specified by separating +them with semi-colons. + +\begin{itemize} + +\item +Copy only a specified list of columns columns to the filtered input file. +The list of column name should be separated by semi-colons. Wild card +characters may be used in the column names to match multiple columns. +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table (i.e., there is no need to explicitly list the columns to +be included if any columns are being deleted). + +\item +Delete a column or keyword by listing the name preceded by a minus +sign or an exclamation mark (!), e.g., '-TIME' will delete the TIME +column if it exists, otherwise the TIME keyword. An error is returned +if neither a column nor keyword with this name exists. Note that the +exclamation point, '!', is a special UNIX character, so if it is used +on the command line rather than entered at a task prompt, it must be +preceded by a backslash to force the UNIX shell to ignore it. + +\item +Rename an existing column or keyword with the syntax 'NewName == +OldName'. An error is returned if neither a column nor keyword with +this name exists. + +\item +Append a new column or keyword to the table. To create a column, +give the new name, optionally followed by the datatype in parentheses, +followed by a single equals sign and an expression to be used to +compute the value (e.g., 'newcol(1J) = 0' will create a new 32-bit +integer column called 'newcol' filled with zeros). The datatype is +specified using the same syntax that is allowed for the value of the +FITS TFORMn keyword (e.g., 'I', 'J', 'E', 'D', etc. for binary tables, +and 'I8', F12.3', 'E20.12', etc. for ASCII tables). If the datatype is +not specified then an appropriate datatype will be chosen depending on +the form of the expression (may be a character string, logical, bit, long +integer, or double column). An appropriate vector count (in the case +of binary tables) will also be added if not explicitly specified. + +When creating a new keyword, the keyword name must be preceded by a +pound sign '\#', and the expression must evaluate to a scalar +(i.e., cannot have a column name in the expression). The comment +string for the keyword may be specified in parentheses immediately +following the keyword name (instead of supplying a datatype as in +the case of creating a new column). If the keyword name ends with a +pound sign '\#', then cfitsio will substitute the number of the +most recently referenced column for the \# character . +This is especially useful when writing +a column-related keyword like TUNITn for a newly created column, +as shown in the following examples. + +\item +Recompute (overwrite) the values in an existing column or keyword by +giving the name followed by an equals sign and an arithmetic +expression. +\end{itemize} + +The expression that is used when appending or recomputing columns or +keywords can be arbitrarily complex and may be a function of other +header keyword values and other columns (in the same row). The full +syntax and available functions for the expression are described below +in the row filter specification section. + +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table. If no columns to be deleted are specified, then only the +columns that are explicitely listed will be included in the filtered +output table. To include all the columns, add the '*' wildcard +specifier at the end of the list, as shown in the examples. + +For complex or commonly used operations, one can also place the +operations into an external text file and import it into the column +filter using the syntax '[col @filename.txt]'. The operations can +extend over multiple lines of the file, but multiple operations must +still be separated by semicolons. Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +Examples: +- + [col Time;rate] - only the Time and rate columns will + appear in the filtered input file. + + [col Time;*raw] - include the Time column and any other + columns whose name ends with 'raw'. + + [col -TIME; Good == STATUS] - deletes the TIME column and + renames the status column to 'Good' + + [col PI=PHA * 1.1 + 0.2; #TUNIT#(column units) = 'counts';*] + - creates new PI column from PHA values + and also writes the TUNITn keyword + for the new column. The final '*' + expression means preserve all the + columns in the input table in the + virtual output table; without the '*' + the output table would only contain + the single 'PI' column. + + [col rate = rate/exposure; TUNIT#(&) = 'counts/s';*] + - recomputes the rate column by dividing + it by the EXPOSURE keyword value. This + also modifies the value of the TUNITn + keyword for this column. The use of the + '&' character for the keyword comment + string means preserve the existing + comment string for that keyword. The + final '*' preserves all the columns + in the input table in the virtual + output table. +- + +**J. Row Filtering Specification + + When entering the name of a FITS table that is to be opened by a + program, an optional row filter may be specified to select a subset + of the rows in the table. A temporary new FITS file is created on + the fly which contains only those rows for which the row filter + expression evaluates to true. (The primary array and any other + extensions in the input file are also copied to the temporary + file). The original FITS file is closed and the new virtual file + is opened by the application program. The row filter expression is + enclosed in square brackets following the file name and extension + name (e.g., 'file.fits[events][GRADE==50]' selects only those rows + where the GRADE column value equals 50). When dealing with tables + where each row has an associated time and/or 2D spatial position, + the row filter expression can also be used to select rows based on + the times in a Good Time Intervals (GTI) extension, or on spatial + position as given in a SAO-style region file. + +***1. General Syntax + + The row filtering expression can be an arbitrarily complex series + of operations performed on constants, keyword values, and column + data taken from the specified FITS TABLE extension. The expression + must evaluate to a boolean value for each row of the table, where + a value of FALSE means that the row will be excluded. + + For complex or commonly used filters, one can place the expression + into a text file and import it into the row filter using the syntax + '[@filename.txt]'. The expression can be arbitrarily complex and + extend over multiple lines of the file. Any lines in the external + text file that begin with 2 slash characters ('//') will be ignored + and may be used to add comments into the file. + + Keyword and column data are referenced by name. Any string of + characters not surrounded by quotes (ie, a constant string) or + followed by an open parentheses (ie, a function name) will be + initially interpreted as a column name and its contents for the + current row inserted into the expression. If no such column exists, + a keyword of that name will be searched for and its value used, if + found. To force the name to be interpreted as a keyword (in case + there is both a column and keyword with the same name), precede the + keyword name with a single pound sign, '\#', as in '\#NAXIS2'. Due to + the generalities of FITS column and keyword names, if the column or + keyword name contains a space or a character which might appear as + an arithmetic term then inclose the name in '\$' characters as in + \$MAX PHA\$ or \#\$MAX-PHA\$. Names are case insensitive. + + To access a table entry in a row other than the current one, follow + the column's name with a row offset within curly braces. For + example, 'PHA\{-3\}' will evaluate to the value of column PHA, 3 rows + above the row currently being processed. One cannot specify an + absolute row number, only a relative offset. Rows that fall outside + the table will be treated as undefined, or NULLs. + + Boolean operators can be used in the expression in either their + Fortran or C forms. The following boolean operators are available: +- + "equal" .eq. .EQ. == "not equal" .ne. .NE. != + "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< + "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => + "or" .or. .OR. || "and" .and. .AND. && + "negation" .not. .NOT. ! "approx. equal(1e-7)" ~ +- + +Note that the exclamation +point, '!', is a special UNIX character, so if it is used on the +command line rather than entered at a task prompt, it must be preceded +by a backslash to force the UNIX shell to ignore it. + + The expression may also include arithmetic operators and functions. + Trigonometric functions use radians, not degrees. The following + arithmetic operators and functions can be used in the expression + (function names are case insensitive). A null value will be returned + in case of illegal operations such as divide by zero, sqrt(negative) + log(negative), log10(negative), arccos(.gt. 1), arcsin(.gt. 1). + +- + "addition" + "subtraction" - + "multiplication" * "division" / + "negation" - "exponentiation" ** ^ + "absolute value" abs(x) "cosine" cos(x) + "sine" sin(x) "tangent" tan(x) + "arc cosine" arccos(x) "arc sine" arcsin(x) + "arc tangent" arctan(x) "arc tangent" arctan2(y,x) + "hyperbolic cos" cosh(x) "hyperbolic sin" sinh(x) + "hyperbolic tan" tanh(x) "round to nearest int" round(x) + "round down to int" floor(x) "round up to int" ceil(x) + "exponential" exp(x) "square root" sqrt(x) + "natural log" log(x) "common log" log10(x) + "modulus" x % y "random # [0.0,1.0)" random() + "random Gausian" randomn() "random Poisson" randomp(x) + "minimum" min(x,y) "maximum" max(x,y) + "cumulative sum" accum(x) "sequential difference" seqdiff(x) + "if-then-else" b?x:y + "angular separation" angsep(ra1,dec1,ra2,de2) (all in degrees) +- +Three different random number functions are provided: random(), with no +arguments, produces a uniform random deviate between 0 and 1; randomn(), +also with no arguments, produces a normal (Gaussian) random deviate with +zero mean and unit standard deviation; randomp(x) produces a Poisson random +deviate whose expected number of counts is X. X may be any positive real +number of expected counts, including fractional values, but the return value +is an integer. + +When the random functions are used in a vector expresion, by default +the same random value will be used when evalutating each element of the vector. +If different random numbers are desired, then the name of a vector +column should be supplied as the single argument to the random +function (e.g., "flux + 0.1 * random(flux)", where "flux' is the +name of a vector column). This will create a vector of +random numbers that will be used in sequence when evaluating each +element of the vector expression. + + An alternate syntax for the min and max functions has only a single + argument which should be a vector value (see below). The result + will be the minimum/maximum element contained within the vector. + + The accum(x) function forms the cumulative sum of x, element by element. + Vector columns are supported simply by performing the summation process + through all the values. Null values are treated as 0. The seqdiff(x) + function forms the sequential difference of x, element by element. + The first value of seqdiff is the first value of x. A single null + value in x causes a pair of nulls in the output. The seqdiff and + accum functions are functional inverses, i.e., seqdiff(accum(x)) == x + as long as no null values are present. + + The angsep function computes the angular separation in degrees + between 2 celestial positions, where the first 2 parameters + give the RA-like and Dec-like coordinates (in decimal degrees) + of the first position, and the 3rd and 4th parameters give the + coordinates of the second position. + + The following type casting operators are available, where the + inclosing parentheses are required and taken from the C language + usage. Also, the integer to real casts values to double precision: +- + "real to integer" (int) x (INT) x + "integer to real" (float) i (FLOAT) i +- + + In addition, several constants are built in for use in numerical + expressions: + +- + #pi 3.1415... #e 2.7182... + #deg #pi/180 #row current row number + #null undefined value #snull undefined string +- + + A string constant must be enclosed in quotes as in 'Crab'. The + "null" constants are useful for conditionally setting table values + to a NULL, or undefined, value (eg., "col1==-99 ? \#NULL : col1"). + + There is also a function for testing if two values are close to + each other, i.e., if they are "near" each other to within a user + specified tolerance. The arguments, value\_1 and value\_2 can be + integer or real and represent the two values who's proximity is + being tested to be within the specified tolerance, also an integer + or real: +- + near(value_1, value_2, tolerance) +- + When a NULL, or undefined, value is encountered in the FITS table, + the expression will evaluate to NULL unless the undefined value is + not actually required for evaluation, e.g. "TRUE .or. NULL" + evaluates to TRUE. The following two functions allow some NULL + detection and handling: +- + "a null value?" ISNULL(x) + "define a value for null" DEFNULL(x,y) +- + The former + returns a boolean value of TRUE if the argument x is NULL. The + later "defines" a value to be substituted for NULL values; it + returns the value of x if x is not NULL, otherwise it returns the + value of y. + +***2. Bit Masks + + Bit masks can be used to select out rows from bit columns (TFORMn = + \#X) in FITS files. To represent the mask, binary, octal, and hex + formats are allowed: + +- + binary: b0110xx1010000101xxxx0001 + octal: o720x1 -> (b111010000xxx001) + hex: h0FxD -> (b00001111xxxx1101) +- + + In all the representations, an x or X is allowed in the mask as a + wild card. Note that the x represents a different number of wild + card bits in each representation. All representations are case + insensitive. + + To construct the boolean expression using the mask as the boolean + equal operator described above on a bit table column. For example, + if you had a 7 bit column named flags in a FITS table and wanted + all rows having the bit pattern 0010011, the selection expression + would be: + +- + flags == b0010011 + or + flags .eq. b10011 +- + + It is also possible to test if a range of bits is less than, less + than equal, greater than and greater than equal to a particular + boolean value: + +- + flags <= bxxx010xx + flags .gt. bxxx100xx + flags .le. b1xxxxxxx +- + + Notice the use of the x bit value to limit the range of bits being + compared. + + It is not necessary to specify the leading (most significant) zero + (0) bits in the mask, as shown in the second expression above. + + Bit wise AND, OR and NOT operations are also possible on two or + more bit fields using the '\&'(AND), '$|$'(OR), and the '!'(NOT) + operators. All of these operators result in a bit field which can + then be used with the equal operator. For example: + +- + (!flags) == b1101100 + (flags & b1000001) == bx000001 +- + + Bit fields can be appended as well using the '+' operator. Strings + can be concatenated this way, too. + +***3. Vector Columns + + Vector columns can also be used in building the expression. No + special syntax is required if one wants to operate on all elements + of the vector. Simply use the column name as for a scalar column. + Vector columns can be freely intermixed with scalar columns or + constants in virtually all expressions. The result will be of the + same dimension as the vector. Two vectors in an expression, though, + need to have the same number of elements and have the same + dimensions. The only places a vector column cannot be used (for + now, anyway) are the SAO region functions and the NEAR boolean + function. + + Arithmetic and logical operations are all performed on an element by + element basis. Comparing two vector columns, eg "COL1 == COL2", + thus results in another vector of boolean values indicating which + elements of the two vectors are equal. + + Eight functions are available that operate on a vector and return a + scalar result: +- + "minimum" MIN(V) "maximum" MAX(V) + "average" AVERAGE(V) "median" MEDIAN(V) + "sumation" SUM(V) "standard deviation" STDDEV(V) + "# of values" NELEM(V) "# of non-null values" NVALID(V) +- + where V represents the name of a vector column or a manually + constructed vector using curly brackets as described below. The + first 6 of these functions ignore any null values in the vector when + computing the result. + + The SUM function literally sums all the elements in x, returning a + scalar value. If x is a boolean vector, SUM returns the number + of TRUE elements. The NELEM function returns the number of elements + in vector x whereas NVALID return the number of non-null elements in + the vector. (NELEM also operates on bit and string columns, + returning their column widths.) As an example, to test whether all + elements of two vectors satisfy a given logical comparison, one can + use the expression +- + SUM( COL1 > COL2 ) == NELEM( COL1 ) +- + + which will return TRUE if all elements of COL1 are greater than + their corresponding elements in COL2. + + To specify a single element of a vector, give the column name + followed by a comma-separated list of coordinates enclosed in + square brackets. For example, if a vector column named PHAS exists + in the table as a one dimensional, 256 component list of numbers + from which you wanted to select the 57th component for use in the + expression, then PHAS[57] would do the trick. Higher dimensional + arrays of data may appear in a column. But in order to interpret + them, the TDIMn keyword must appear in the header. Assuming that a + (4,4,4,4) array is packed into each row of a column named ARRAY4D, + the (1,2,3,4) component element of each row is accessed by + ARRAY4D[1,2,3,4]. Arrays up to dimension 5 are currently + supported. Each vector index can itself be an expression, although + it must evaluate to an integer value within the bounds of the + vector. Vector columns which contain spaces or arithmetic operators + must have their names enclosed in "\$" characters as with + \$ARRAY-4D\$[1,2,3,4]. + + A more C-like syntax for specifying vector indices is also + available. The element used in the preceding example alternatively + could be specified with the syntax ARRAY4D[4][3][2][1]. Note the + reverse order of indices (as in C), as well as the fact that the + values are still ones-based (as in Fortran -- adopted to avoid + ambiguity for 1D vectors). With this syntax, one does not need to + specify all of the indices. To extract a 3D slice of this 4D + array, use ARRAY4D[4]. + + Variable-length vector columns are not supported. + + Vectors can be manually constructed within the expression using a + comma-separated list of elements surrounded by curly braces ('\{\}'). + For example, '\{1,3,6,1\}' is a 4-element vector containing the values + 1, 3, 6, and 1. The vector can contain only boolean, integer, and + real values (or expressions). The elements will be promoted to the + highest datatype present. Any elements which are themselves + vectors, will be expanded out with each of its elements becoming an + element in the constructed vector. + +***4. Good Time Interval Filtering + + A common filtering method involves selecting rows which have a time + value which lies within what is called a Good Time Interval or GTI. + The time intervals are defined in a separate FITS table extension + which contains 2 columns giving the start and stop time of each + good interval. The filtering operation accepts only those rows of + the input table which have an associated time which falls within + one of the time intervals defined in the GTI extension. A high + level function, gtifilter(a,b,c,d), is available which evaluates + each row of the input table and returns TRUE or FALSE depending + whether the row is inside or outside the good time interval. The + syntax is +- + gtifilter( [ "gtifile" [, expr [, "STARTCOL", "STOPCOL" ] ] ] ) +- + where each "[]" demarks optional parameters. Note that the quotes + around the gtifile and START/STOP column are required. Either single + or double quotes may be used. In cases where this expression is + entered on the Unix command line, enclose the entire expression in + double quotes, and then use single quotes within the expression to + enclose the 'gtifile' and other terms. It is also usually possible + to do the reverse, and enclose the whole expression in single quotes + and then use double quotes within the expression. The gtifile, + if specified, can be blank ("") which will mean to use the first + extension with the name "*GTI*" in the current file, a plain + extension specifier (eg, "+2", "[2]", or "[STDGTI]") which will be + used to select an extension in the current file, or a regular + filename with or without an extension specifier which in the latter + case will mean to use the first extension with an extension name + "*GTI*". Expr can be any arithmetic expression, including simply + the time column name. A vector time expression will produce a + vector boolean result. STARTCOL and STOPCOL are the names of the + START/STOP columns in the GTI extension. If one of them is + specified, they both must be. + + In its simplest form, no parameters need to be provided -- default + values will be used. The expression "gtifilter()" is equivalent to +- + gtifilter( "", TIME, "*START*", "*STOP*" ) +- + This will search the current file for a GTI extension, filter the + TIME column in the current table, using START/STOP times taken from + columns in the GTI extension with names containing the strings + "START" and "STOP". The wildcards ('*') allow slight variations in + naming conventions such as "TSTART" or "STARTTIME". The same + default values apply for unspecified parameters when the first one + or two parameters are specified. The function automatically + searches for TIMEZERO/I/F keywords in the current and GTI + extensions, applying a relative time offset, if necessary. + +***5. Spatial Region Filtering + + Another common filtering method selects rows based on whether the + spatial position associated with each row is located within a given + 2-dimensional region. The syntax for this high-level filter is +- + regfilter( "regfilename" [ , Xexpr, Yexpr [ , "wcs cols" ] ] ) +- + where each "[]" demarks optional parameters. The region file name + is required and must be enclosed in quotes. The remaining + parameters are optional. The region file is an ASCII text file + which contains a list of one or more geometric shapes (circle, + ellipse, box, etc.) which defines a region on the celestial sphere + or an area within a particular 2D image. The region file is + typically generated using an image display program such as fv/POW + (distribute by the HEASARC), or ds9 (distributed by the Smithsonian + Astrophysical Observatory). Users should refer to the documentation + provided with these programs for more details on the syntax used in + the region files. + + In its simpliest form, (e.g., regfilter("region.reg") ) the + coordinates in the default 'X' and 'Y' columns will be used to + determine if each row is inside or outside the area specified in + the region file. Alternate position column names, or expressions, + may be entered if needed, as in +- + regfilter("region.reg", XPOS, YPOS) +- + Region filtering can be applied most unambiguously if the positions + in the region file and in the table to be filtered are both give in + terms of absolute celestial coordinate units. In this case the + locations and sizes of the geometric shapes in the region file are + specified in angular units on the sky (e.g., positions given in + R.A. and Dec. and sizes in arcseconds or arcminutes). Similarly, + each row of the filtered table will have a celestial coordinate + associated with it. This association is usually implemented using + a set of so-called 'World Coordinate System' (or WCS) FITS keywords + that define the coordinate transformation that must be applied to + the values in the 'X' and 'Y' columns to calculate the coordinate. + + Alternatively, one can perform spatial filtering using unitless + 'pixel' coordinates for the regions and row positions. In this + case the user must be careful to ensure that the positions in the 2 + files are self-consistent. A typical problem is that the region + file may be generated using a binned image, but the unbinned + coordinates are given in the event table. The ROSAT events files, + for example, have X and Y pixel coordinates that range from 1 - + 15360. These coordinates are typically binned by a factor of 32 to + produce a 480x480 pixel image. If one then uses a region file + generated from this image (in image pixel units) to filter the + ROSAT events file, then the X and Y column values must be converted + to corresponding pixel units as in: +- + regfilter("rosat.reg", X/32.+.5, Y/32.+.5) +- + Note that this binning conversion is not necessary if the region + file is specified using celestial coordinate units instead of pixel + units because CFITSIO is then able to directly compare the + celestial coordinate of each row in the table with the celestial + coordinates in the region file without having to know anything + about how the image may have been binned. + + The last "wcs cols" parameter should rarely be needed. If supplied, + this string contains the names of the 2 columns (space or comma + separated) which have the associated WCS keywords. If not supplied, + the filter will scan the X and Y expressions for column names. + If only one is found in each expression, those columns will be + used, otherwise an error will be returned. + + These region shapes are supported (names are case insensitive): +- + Point ( X1, Y1 ) <- One pixel square region + Line ( X1, Y1, X2, Y2 ) <- One pixel wide region + Polygon ( X1, Y1, X2, Y2, ... ) <- Rest are interiors with + Rectangle ( X1, Y1, X2, Y2, A ) | boundaries considered + Box ( Xc, Yc, Wdth, Hght, A ) V within the region + Diamond ( Xc, Yc, Wdth, Hght, A ) + Circle ( Xc, Yc, R ) + Annulus ( Xc, Yc, Rin, Rout ) + Ellipse ( Xc, Yc, Rx, Ry, A ) + Elliptannulus ( Xc, Yc, Rinx, Riny, Routx, Routy, Ain, Aout ) + Sector ( Xc, Yc, Amin, Amax ) +- + where (Xc,Yc) is the coordinate of the shape's center; (X\#,Y\#) are + the coordinates of the shape's edges; Rxxx are the shapes' various + Radii or semimajor/minor axes; and Axxx are the angles of rotation + (or bounding angles for Sector) in degrees. For rotated shapes, the + rotation angle can be left off, indicating no rotation. Common + alternate names for the regions can also be used: rotbox = box; + rotrectangle = rectangle; (rot)rhombus = (rot)diamond; and pie + = sector. When a shape's name is preceded by a minus sign, '-', + the defined region is instead the area *outside* its boundary (ie, + the region is inverted). All the shapes within a single region + file are OR'd together to create the region, and the order is + significant. The overall way of looking at region files is that if + the first region is an excluded region then a dummy included region + of the whole detector is inserted in the front. Then each region + specification as it is processed overrides any selections inside of + that region specified by previous regions. Another way of thinking + about this is that if a previous excluded region is completely + inside of a subsequent included region the excluded region is + ignored. + + The positional coordinates may be given either in pixel units, + decimal degrees or hh:mm:ss.s, dd:mm:ss.s units. The shape sizes + may be given in pixels, degrees, arcminutes, or arcseconds. Look + at examples of region file produced by fv/POW or ds9 for further + details of the region file format. + + There are three functions that are primarily for use with SAO region + files and the FSAOI task, but they can be used directly. They + return a boolean true or false depending on whether a two + dimensional point is in the region or not: +- + "point in a circular region" + circle(xcntr,ycntr,radius,Xcolumn,Ycolumn) + + "point in an elliptical region" + ellipse(xcntr,ycntr,xhlf_wdth,yhlf_wdth,rotation,Xcolumn,Ycolumn) + + "point in a rectangular region" + box(xcntr,ycntr,xfll_wdth,yfll_wdth,rotation,Xcolumn,Ycolumn) + + where + (xcntr,ycntr) are the (x,y) position of the center of the region + (xhlf_wdth,yhlf_wdth) are the (x,y) half widths of the region + (xfll_wdth,yfll_wdth) are the (x,y) full widths of the region + (radius) is half the diameter of the circle + (rotation) is the angle(degrees) that the region is rotated with + respect to (xcntr,ycntr) + (Xcoord,Ycoord) are the (x,y) coordinates to test, usually column + names + NOTE: each parameter can itself be an expression, not merely a + column name or constant. +- + +***5. Example Row Filters +- + [ binary && mag <= 5.0] - Extract all binary stars brighter + than fifth magnitude (note that + the initial space is necessary to + prevent it from being treated as a + binning specification) + + [#row >= 125 && #row <= 175] - Extract row numbers 125 through 175 + + [IMAGE[4,5] .gt. 100] - Extract all rows that have the + (4,5) component of the IMAGE column + greater than 100 + + [abs(sin(theta * #deg)) < 0.5] - Extract all rows having the + absolute value of the sine of theta + less than a half where the angles + are tabulated in degrees + + [SUM( SPEC > 3*BACKGRND )>=1] - Extract all rows containing a + spectrum, held in vector column + SPEC, with at least one value 3 + times greater than the background + level held in a keyword, BACKGRND + + [VCOL=={1,4,2}] - Extract all rows whose vector column + VCOL contains the 3-elements 1, 4, and + 2. + + [@rowFilter.txt] - Extract rows using the expression + contained within the text file + rowFilter.txt + + [gtifilter()] - Search the current file for a GTI + extension, filter the TIME + column in the current table, using + START/STOP times taken from + columns in the GTI extension + + [regfilter("pow.reg")] - Extract rows which have a coordinate + (as given in the X and Y columns) + within the spatial region specified + in the pow.reg region file. + + [regfilter("pow.reg", Xs, Ys)] - Same as above, except that the + Xs and Ys columns will be used to + determine the coordinate of each + row in the table. +- + +**K. Binning or Histogramming Specification + +The optional binning specifier is enclosed in square brackets and can +be distinguished from a general row filter specification by the fact +that it begins with the keyword 'bin' not immediately followed by an +equals sign. When binning is specified, a temporary N-dimensional FITS +primary array is created by computing the histogram of the values in +the specified columns of a FITS table extension. After the histogram +is computed the input FITS file containing the table is then closed and +the temporary FITS primary array is opened and passed to the +application program. Thus, the application program never sees the +original FITS table and only sees the image in the new temporary file +(which has no additional extensions). Obviously, the application +program must be expecting to open a FITS image and not a FITS table in +this case. + +The data type of the FITS histogram image may be specified by appending +'b' (for 8-bit byte), 'i' (for 16-bit integers), 'j' (for 32-bit +integer), 'r' (for 32-bit floating points), or 'd' (for 64-bit double +precision floating point) to the 'bin' keyword (e.g. '[binr X]' +creates a real floating point image). If the datatype is not +explicitly specified then a 32-bit integer image will be created by +default, unless the weighting option is also specified in which case +the image will have a 32-bit floating point data type by default. + +The histogram image may have from 1 to 4 dimensions (axes), depending +on the number of columns that are specified. The general form of the +binning specification is: +- + [bin{bijrd} Xcol=min:max:binsize, Ycol= ..., Zcol=..., Tcol=...; weight] +- +in which up to 4 columns, each corresponding to an axis of the image, +are listed. The column names are case insensitive, and the column +number may be given instead of the name, preceded by a pound sign +(e.g., [bin \#4=1:512]). If the column name is not specified, then +CFITSIO will first try to use the 'preferred column' as specified by +the CPREF keyword if it exists (e.g., 'CPREF = 'DETX,DETY'), otherwise +column names 'X', 'Y', 'Z', and 'T' will be assumed for each of the 4 +axes, respectively. In cases where the column name could be confused +with an arithmetic expression, enclose the column name in parentheses to +force the name to be interpreted literally. + +Each column name may be followed by an equals sign and then the lower +and upper range of the histogram, and the size of the histogram bins, +separated by colons. Spaces are allowed before and after the equals +sign but not within the 'min:max:binsize' string. The min, max and +binsize values may be integer or floating point numbers, or they may be +the names of keywords in the header of the table. If the latter, then +the value of that keyword is substituted into the expression. + +Default values for the min, max and binsize quantities will be +used if not explicitly given in the binning expression as shown +in these examples: +- + [bin x = :512:2] - use default minimum value + [bin x = 1::2] - use default maximum value + [bin x = 1:512] - use default bin size + [bin x = 1:] - use default maximum value and bin size + [bin x = :512] - use default minimum value and bin size + [bin x = 2] - use default minimum and maximum values + [bin x] - use default minimum, maximum and bin size + [bin 4] - default 2-D image, bin size = 4 in both axes + [bin] - default 2-D image +- +CFITSIO will use the value of the TLMINn, TLMAXn, and TDBINn keywords, +if they exist, for the default min, max, and binsize, respectively. If +they do not exist then CFITSIO will use the actual minimum and maximum +values in the column for the histogram min and max values. The default +binsize will be set to 1, or (max - min) / 10., whichever is smaller, +so that the histogram will have at least 10 bins along each axis. + +A shortcut notation is allowed if all the columns/axes have the same +binning specification. In this case all the column names may be listed +within parentheses, followed by the (single) binning specification, as +in: +- + [bin (X,Y)=1:512:2] + [bin (X,Y) = 5] +- + +The optional weighting factor is the last item in the binning specifier +and, if present, is separated from the list of columns by a +semi-colon. As the histogram is accumulated, this weight is used to +incremented the value of the appropriated bin in the histogram. If the +weighting factor is not specified, then the default weight = 1 is +assumed. The weighting factor may be a constant integer or floating +point number, or the name of a keyword containing the weighting value. +Or the weighting factor may be the name of a table column in which case +the value in that column, on a row by row basis, will be used. + +In some cases, the column or keyword may give the reciprocal of the +actual weight value that is needed. In this case, precede the weight +keyword or column name by a slash '/' to tell CFITSIO to use the +reciprocal of the value when constructing the histogram. + +For complex or commonly used histograms, one can also place its +description into a text file and import it into the binning +specification using the syntax '[bin @filename.txt]'. The file's +contents can extend over multiple lines, although it must still +conform to the no-spaces rule for the min:max:binsize syntax and each +axis specification must still be comma-separated. Any lines in the +external text file that begin with 2 slash characters ('//') will be +ignored and may be used to add comments into the file. + + Examples: + +- + [bini detx, dety] - 2-D, 16-bit integer histogram + of DETX and DETY columns, using + default values for the histogram + range and binsize + + [bin (detx, dety)=16; /exposure] - 2-D, 32-bit real histogram of DETX + and DETY columns with a bin size = 16 + in both axes. The histogram values + are divided by the EXPOSURE keyword + value. + + [bin time=TSTART:TSTOP:0.1] - 1-D lightcurve, range determined by + the TSTART and TSTOP keywords, + with 0.1 unit size bins. + + [bin pha, time=8000.:8100.:0.1] - 2-D image using default binning + of the PHA column for the X axis, + and 1000 bins in the range + 8000. to 8100. for the Y axis. + + [bin @binFilter.txt] - Use the contents of the text file + binFilter.txt for the binning + specifications. + +- + + +*V. Template Files + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following sections. + +**A Detailed Template Line Format + +The format of each ASCII template line closely follows the format of a +FITS keyword record: +- + KEYWORD = KEYVALUE / COMMENT +- +except that free format may be used (e.g., the equals sign may appear +at any position in the line) and TAB characters are allowed and are +treated the same as space characters. The KEYVALUE and COMMENT fields +are optional. The equals sign character is also optional, but it is +recommended that it be included for clarity. Any template line that +begins with the pound '\#' character is ignored by the template parser +and may be use to insert comments into the template file itself. + +The KEYWORD name field is limited to 8 characters in length and only +the letters A-Z, digits 0-9, and the hyphen and underscore characters +may be used, without any embedded spaces. Lowercase letters in the +template keyword name will be converted to uppercase. Leading spaces +in the template line preceding the keyword name are generally ignored, +except if the first 8 characters of a template line are all blank, then +the entire line is treated as a FITS comment keyword (with a blank +keyword name) and is copied verbatim into the FITS header. + +The KEYVALUE field may have any allowed FITS data type: character +string, logical, integer, real, complex integer, or complex real. The +character string values need not be enclosed in single quote characters +unless they are necessary to distinguish the string from a different +data type (e.g. 2.0 is a real but '2.0' is a string). The keyword has +an undefined (null) value if the template record only contains blanks +following the "=" or between the "=" and the "/" comment field +delimiter. + +String keyword values longer than 68 characters (the maximum length +that will fit in a single FITS keyword record) are permitted using the +CFITSIO long string convention. They can either be specified as a +single long line in the template, or by using multiple lines where the +continuing lines contain the 'CONTINUE' keyword, as in this example: +- + LONGKEY = 'This is a long string value that is contin&' + CONTINUE 'ued over 2 records' / comment field goes here +- +The format of template lines with CONTINUE keyword is very strict: 3 +spaces must follow CONTINUE and the rest of the line is copied verbatim +to the FITS file. + +The start of the optional COMMENT field must be preceded by "/", which +is used to separate it from the keyword value field. Exceptions are if +the KEYWORD name field contains COMMENT, HISTORY, CONTINUE, or if the +first 8 characters of the template line are blanks. + +More than one Header-Data Unit (HDU) may be defined in the template +file. The start of an HDU definition is denoted with a SIMPLE or +XTENSION template line: + +1) SIMPLE begins a Primary HDU definition. SIMPLE may only appear as +the first keyword in the template file. If the template file begins +with XTENSION instead of SIMPLE, then a default empty Primary HDU is +created, and the template is then assumed to define the keywords +starting with the first extension following the Primary HDU. + +2) XTENSION marks the beginning of a new extension HDU definition. The +previous HDU will be closed at this point and processing of the next +extension begins. + +**B Auto-indexing of Keywords + +If a template keyword name ends with a "\#" character, it is said to be +'auto-indexed'. Each "\#" character will be replaced by the current +integer index value, which gets reset = 1 at the start of each new HDU +in the file (or 7 in the special case of a GROUP definition). The +FIRST indexed keyword in each template HDU definition is used as the +'incrementor'; each subsequent occurrence of this SAME keyword will +cause the index value to be incremented. This behavior can be rather +subtle, as illustrated in the following examples in which the TTYPE +keyword is the incrementor in both cases: +- + TTYPE# = TIME + TFORM# = 1D + TTYPE# = RATE + TFORM# = 1E +- +will create TTYPE1, TFORM1, TTYPE2, and TFORM2 keywords. But if the +template looks like, +- + TTYPE# = TIME + TTYPE# = RATE + TFORM# = 1D + TFORM# = 1E +- +this results in a FITS files with TTYPE1, TTYPE2, TFORM2, and TFORM2, +which is probably not what was intended! + +**C Template Parser Directives + +In addition to the template lines which define individual keywords, the +template parser recognizes 3 special directives which are each preceded +by the backslash character: \verb+ \include, \group+, and \verb+ \end+. + +The 'include' directive must be followed by a filename. It forces the +parser to temporarily stop reading the current template file and begin +reading the include file. Once the parser reaches the end of the +include file it continues parsing the current template file. Include +files can be nested, and HDU definitions can span multiple template +files. + +The start of a GROUP definition is denoted with the 'group' directive, +and the end of a GROUP definition is denoted with the 'end' directive. +Each GROUP contains 0 or more member blocks (HDUs or GROUPs). Member +blocks of type GROUP can contain their own member blocks. The GROUP +definition itself occupies one FITS file HDU of special type (GROUP +HDU), so if a template specifies 1 group with 1 member HDU like: +- +\group +grpdescr = 'demo' +xtension bintable +# this bintable has 0 cols, 0 rows +\end +- +then the parser creates a FITS file with 3 HDUs : +- +1) dummy PHDU +2) GROUP HDU (has 1 member, which is bintable in HDU number 3) +3) bintable (member of GROUP in HDU number 2) +- +Technically speaking, the GROUP HDU is a BINTABLE with 6 columns. Applications +can define additional columns in a GROUP HDU using TFORMn and TTYPEn +(where n is 7, 8, ....) keywords or their auto-indexing equivalents. + +For a more complicated example of a template file using the group directives, +look at the sample.tpl file that is included in the CFITSIO distribution. + +**D Formal Template Syntax + +The template syntax can formally be defined as follows: +- + TEMPLATE = BLOCK [ BLOCK ... ] + + BLOCK = { HDU | GROUP } + + GROUP = \GROUP [ BLOCK ... ] \END + + HDU = XTENSION [ LINE ... ] { XTENSION | \GROUP | \END | EOF } + + LINE = [ KEYWORD [ = ] ] [ VALUE ] [ / COMMENT ] + + X ... - X can be present 1 or more times + { X | Y } - X or Y + [ X ] - X is optional +- + +At the topmost level, the template defines 1 or more template blocks. Blocks +can be either HDU (Header Data Unit) or a GROUP. For each block the parser +creates 1 (or more for GROUPs) FITS file HDUs. + + +**E Errors + +In general the fits\_execute\_template() function tries to be as atomic +as possible, so either everything is done or nothing is done. If an +error occurs during parsing of the template, fits\_execute\_template() +will (try to) delete the top level BLOCK (with all its children if any) +in which the error occurred, then it will stop reading the template file +and it will return with an error. + +**F Examples + +1. This template file will create a 200 x 300 pixel image, with 4-byte +integer pixel values, in the primary HDU: +- + SIMPLE = T + BITPIX = 32 + NAXIS = 2 / number of dimensions + NAXIS1 = 100 / length of first axis + NAXIS2 = 200 / length of second axis + OBJECT = NGC 253 / name of observed object +- +The allowed values of BITPIX are 8, 16, 32, -32, or -64, +representing, respectively, 8-bit integer, 16-bit integer, 32-bit +integer, 32-bit floating point, or 64 bit floating point pixels. + +2. To create a FITS table, the template first needs to include +XTENSION = TABLE or BINTABLE to define whether it is an ASCII or binary +table, and NAXIS2 to define the number of rows in the table. Two +template lines are then needed to define the name (TTYPEn) and FITS data +format (TFORMn) of the columns, as in this example: +- + xtension = bintable + naxis2 = 40 + ttype# = Name + tform# = 10a + ttype# = Npoints + tform# = j + ttype# = Rate + tunit# = counts/s + tform# = e +- +The above example defines a null primary array followed by a 40-row +binary table extension with 3 columns called 'Name', 'Npoints', and +'Rate', with data formats of '10A' (ASCII character string), '1J' +(integer) and '1E' (floating point), respectively. Note that the other +required FITS keywords (BITPIX, NAXIS, NAXIS1, PCOUNT, GCOUNT, TFIELDS, +and END) do not need to be explicitly defined in the template because +their values can be inferred from the other keywords in the template. +This example also illustrates that the templates are generally +case-insensitive (the keyword names and TFORMn values are converted to +upper-case in the FITS file) and that string keyword values generally +do not need to be enclosed in quotes. + + +*IX Summary of all FITSIO User-Interface Subroutines + + Error Status Routines page~\pageref{FTVERS} +- + FTVERS( > version) + FTGERR(status, > errtext) + FTGMSG( > errmsg) + FTRPRT (stream, > status) + FTPMSG(errmsg) + FTPMRK + FTCMSG + FTCMRK +- + FITS File Open and Close Subroutines: page~\pageref{FTOPEN} +- + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) + FTNOPN(unit,filename,rwmode, > status) + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) + FTREOPEN(unit, > newunit, status) + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) + FTTPLT(unit, filename, tplfilename, > status) + FTFLUS(unit, > status) + FTCLOS(unit, > status) + FTDELT(unit, > status) + FTGIOU( > iounit, status) + FTFIOU(iounit, > status) + CFITS2Unit(fitsfile *ptr) (C routine) + CUnit2FITS(int unit) (C routine) + FTEXTN(filename, > nhdu, status) + FTFLNM(unit, > filename, status) + FTFLMD(unit, > iomode, status) + FFURLT(unit, > urltype, status) + FTIURL(filename, > filetype, infile, outfile, extspec, filter, + binspec, colspec, status) + FTRTNM(filename, > rootname, status) + FTEXIST(filename, > exist, status) +- + HDU-Level Operations: page~\pageref{FTMAHD} +- + FTMAHD(unit,nhdu, > hdutype,status) + FTMRHD(unit,nmove, > hdutype,status) + FTGHDN(unit, > nhdu) + FTMNHD(unit, hdutype, extname, extver, > status) + FTGHDT(unit, > hdutype, status) + FTTHDU(unit, > hdunum, status) + FTCRHD(unit, > status) + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTRSIM(unit,bitpix,naxis,naxes,status) + FTDHDU(unit, > hdutype,status) + FTCPFL(iunit,ounit,previous, current, following, > status) + FTCOPY(iunit,ounit,morekeys, > status) + FTCPHD(inunit, outunit, > status) + FTCPDT(iunit,ounit, > status) +- + Subroutines to specify or modify the structure of the CHDU: page~\pageref{FTRDEF} +- + FTRDEF(unit, > status) (DEPRECATED) + FTPDEF(unit,bitpix,naxis,naxes,pcount,gcount, > status) (DEPRECATED) + FTADEF(unit,rowlen,tfields,tbcol,tform,nrows > status) (DEPRECATED) + FTBDEF(unit,tfields,tform,varidat,nrows > status) (DEPRECATED) + FTDDEF(unit,bytlen, > status) (DEPRECATED) + FTPTHP(unit,theap, > status) +- + Header Space and Position Subroutines: page~\pageref{FTHDEF} +- + FTHDEF(unit,morekeys, > status) + FTGHSP(iunit, > keysexist,keysadd,status) + FTGHPS(iunit, > keysexist,key_no,status) +- + Read or Write Standard Header Subroutines: page~\pageref{FTPHPR} +- + FTPHPS(unit,bitpix,naxis,naxes, > status) + FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status) + FTGHPR(unit,maxdim, > simple,bitpix,naxis,naxes,pcount,gcount,extend, + status) + FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTGHTB(unit,maxdim, > rowlen,nrows,tfields,ttype,tbcol,tform,tunit, + extname,status) + FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat, + status) +- + Write Keyword Subroutines: page~\pageref{FTPREC} +- + FTPREC(unit,card, > status) + FTPCOM(unit,comment, > status) + FTPHIS(unit,history, > status) + FTPDAT(unit, > status) + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTPKLS(unit,keyword,keyval,comment, > status) + FTPLSW(unit, > status) + FTPKYU(unit,keyword,comment, > status) + FTPKN[JKLS](unit,keyroot,startno,no_keys,keyvals,comments, > status) + FTPKN[EDFG](unit,keyroot,startno,no_keys,keyvals,decimals,comments, > + status) + FTCPKYinunit, outunit, innum, outnum, keyroot, > status) + FTPKYT(unit,keyword,intval,dblval,comment, > status) + FTPKTP(unit, filename, > status) + FTPUNT(unit,keyword,units, > status) +- + Insert Keyword Subroutines: page~\pageref{FTIREC} +- + FTIREC(unit,key_no,card, > status) + FTIKY[JKLS](unit,keyword,keyval,comment, > status) + FTIKLS(unit,keyword,keyval,comment, > status) + FTIKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTIKYU(unit,keyword,comment, > status) +- + Read Keyword Subroutines: page~\pageref{FTGREC} +- + FTGREC(unit,key_no, > card,status) + FTGKYN(unit,key_no, > keyword,value,comment,status) + FTGCRD(unit,keyword, > card,status) + FTGNXK(unit,inclist,ninc,exclist,nexc, > card,status) + FTGKEY(unit,keyword, > value,comment,status) + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) + FTGKN[EDJKLS](unit,keyroot,startno,max_keys, > keyvals,nfound,status) + FTGKYT(unit,keyword, > intval,dblval,comment,status) + FTGUNT(unit,keyword, > units,status) +- + Modify Keyword Subroutines: page~\pageref{FTMREC} +- + FTMREC(unit,key_no,card, > status) + FTMCRD(unit,keyword,card, > status) + FTMNAM(unit,oldkey,keyword, > status) + FTMCOM(unit,keyword,comment, > status) + FTMKY[JKLS](unit,keyword,keyval,comment, > status) + FTMKLS(unit,keyword,keyval,comment, > status) + FTMKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTMKYU(unit,keyword,comment, > status) +- + Update Keyword Subroutines: page~\pageref{FTUCRD} +- + FTUCRD(unit,keyword,card, > status) + FTUKY[JKLS](unit,keyword,keyval,comment, > status) + FTUKLS(unit,keyword,keyval,comment, > status) + FTUKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTUKYU(unit,keyword,comment, > status) +- + Delete Keyword Subroutines: page~\pageref{FTDREC} +- + FTDREC(unit,key_no, > status) + FTDKEY(unit,keyword, > status) +- + Define Data Scaling Parameters and Undefined Pixel Flags: page~\pageref{FTPSCL} +- + FTPSCL(unit,bscale,bzero, > status) + FTTSCL(unit,colnum,tscal,tzero, > status) + FTPNUL(unit,blank, > status) + FTSNUL(unit,colnum,snull > status) + FTTNUL(unit,colnum,tnull > status) +- + FITS Primary Array or IMAGE Extension I/O Subroutines: page~\pageref{FTPPR} +- + FTGIDT(unit, > bitpix,status) + FTGIET(unit, > bitpix,status) + FTGIDM(unit, > naxis,status) + FTGISZ(unit, maxdim, > naxes,status) + FTGIPR(unit, maxdim, > bitpix,naxis,naxes,status) + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) + FTPPN[BIJKED](unit,group,fpixel,nelements,values,nullval > status) + FTPPRU(unit,group,fpixel,nelements, > status) + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) + FTGPF[BIJKED](unit,group,fpixel,nelements, > values,flagvals,anyf,status) + FTPGP[BIJKED](unit,group,fparm,nparm,values, > status) + FTGGP[BIJKED](unit,group,fparm,nparm, > values,status) + FTP2D[BIJKED](unit,group,dim1,naxis1,naxis2,image, > status) + FTP3D[BIJKED](unit,group,dim1,dim2,naxis1,naxis2,naxis3,cube, > status) + FTG2D[BIJKED](unit,group,nullval,dim1,naxis1,naxis2, > image,anyf,status) + FTG3D[BIJKED](unit,group,nullval,dim1,dim2,naxis1,naxis2,naxis3, > + cube,anyf,status) + FTPSS[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,array, > status) + FTGSV[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) + FTGSF[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +- + Table Column Information Subroutines: page~\pageref{FTGCNO} +- + FTGNRW(unit, > nrows, status) + FTGNCL(unit, > ncols, status) + FTGCNO(unit,casesen,coltemplate, > colnum,status) + FTGCNN(unit,casesen,coltemplate, > colnam,colnum,status) + FTGTCL(unit,colnum, > datacode,repeat,width,status) + FTEQTY(unit,colnum, > datacode,repeat,width,status) + FTGCDW(unit,colnum, > dispwidth,status) + FTGACL(unit,colnum, > + ttype,tbcol,tunit,tform,tscal,tzero,snull,tdisp,status) + FTGBCL(unit,colnum, > + ttype,tunit,datatype,repeat,tscal,tzero,tnull,tdisp,status) + FTPTDM(unit,colnum,naxis,naxes, > status) + FTGTDM(unit,colnum,maxdim, > naxis,naxes,status) + FTDTDM(unit,tdimstr,colnum,maxdim, > naxis,naxes, status) + FFGRSZ(unit, > nrows,status) +- + Low-Level Table Access Subroutines: page~\pageref{FTGTBS} +- + FTGTBS(unit,frow,startchar,nchars, > string,status) + FTPTBS(unit,frow,startchar,nchars,string, > status) + FTGTBB(unit,frow,startchar,nchars, > array,status) + FTPTBB(unit,frow,startchar,nchars,array, > status) +- + Edit Rows or Columns page~\pageref{FTIROW} +- + FTIROW(unit,frow,nrows, > status) + FTDROW(unit,frow,nrows, > status) + FTDRRG(unit,rowrange, > status) + FTDRWS(unit,rowlist,nrows, > status) + FTICOL(unit,colnum,ttype,tform, > status) + FTICLS(unit,colnum,ncols,ttype,tform, > status) + FTMVEC(unit,colnum,newveclen, > status) + FTDCOL(unit,colnum, > status) + FTCPCL(inunit,outunit,incolnum,outcolnum,createcol, > status); +- + Read and Write Column Data Routines page~\pageref{FTPCLS} +- + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) + FTPCN[BIJKED](unit,colnum,frow,felem,nelements,values,nullval > status) + FTPCLX(unit,colnum,frow,fbit,nbit,lray, > status) + FTPCLU(unit,colnum,frow,felem,nelements, > status) + FTGCL(unit,colnum,frow,felem,nelements, > values,status) + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) + FTGCF[SLBIJKEDCM](unit,colnum,frow,felem,nelements, > + values,flagvals,anyf,status) + FTGSV[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) + FTGSF[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) + FTGCX(unit,colnum,frow,fbit,nbit, > lray,status) + FTGCX[IJD](unit,colnum,frow,nrows,fbit,nbit, > array,status) + FTGDES(unit,colnum,rownum, > nelements,offset,status) + FTPDES(unit,colnum,rownum,nelements,offset, > status) +- + Row Selection and Calculator Routines: page~\pageref{FTFROW} +- + FTFROW(unit,expr,firstrow, nrows, > n_good_rows, row_status, status) + FTFFRW(unit, expr, > rownum, status) + FTSROW(inunit, outunit, expr, > status ) + FTCROW(unit,datatype,expr,firstrow,nelements,nulval, > + array,anynul,status) + FTCALC(inunit, expr, outunit, parName, parInfo, > status) + FTCALC_RNG(inunit, expr, outunit, parName, parInfo, + nranges, firstrow, lastrow, > status) + FTTEXP(unit, expr, > datatype, nelem, naxis, naxes, status) +- + Celestial Coordinate System Subroutines: page~\pageref{FTGICS} +- + FTGICS(unit, > xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) + FTGTCS(unit,xcol,ycol, > + xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) + FTWLDP(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpos,ypos,status) + FTXYPX(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpix,ypix,status) +- + File Checksum Subroutines: page~\pageref{FTPCKS} +- + FTPCKS(unit, > status) + FTUCKS(unit, > status) + FTVCKS(unit, > dataok,hduok,status) + FTGCKS(unit, > datasum,hdusum,status) + FTESUM(sum,complement, > checksum) + FTDSUM(checksum,complement, > sum) + +- + Time and Date Utility Subroutines: page~\pageref{FTGSDT} +- + FTGSDT( > day, month, year, status ) + FTGSTM(> datestr, timeref, status) + FTDT2S( year, month, day, > datestr, status) + FTTM2S( year, month, day, hour, minute, second, decimals, + > datestr, status) + FTS2DT(datestr, > year, month, day, status) + FTS2TM(datestr, > year, month, day, hour, minute, second, status) +- + General Utility Subroutines: page~\pageref{FTGHAD} +- + FTGHAD(unit, > curaddr,nextaddr) + FTUPCH(string) + FTCMPS(str_template,string,casesen, > match,exact) + FTTKEY(keyword, > status) + FTTREC(card, > status) + FTNCHK(unit, > status) + FTGKNM(unit, > keyword, keylength, status) + FTPSVC(card, > value,comment,status) + FTKEYN(keyroot,seq_no, > keyword,status) + FTNKEY(seq_no,keyroot, > keyword,status) + FTDTYP(value, > dtype,status) + class = FTGKCL(card) + FTASFM(tform, > datacode,width,decimals,status) + FTBNFM(tform, > datacode,repeat,width,status) + FTGABC(tfields,tform,space, > rowlen,tbcol,status) + FTGTHD(template, > card,hdtype,status) + FTRWRG(rowlist, maxrows, maxranges, > numranges, rangemin, + rangemax, status) +- + +*X. Parameter Definitions +- +anyf - (logical) set to TRUE if any of the returned data values are undefined +array - (any datatype except character) array of bytes to be read or written. +bitpix - (integer) bits per pixel: 8, 16, 32, -32, or -64 +blank - (integer) value used for undefined pixels in integer primary array +blank - (integer*8) value used for undefined pixels in integer primary array +blocksize - (integer) 2880-byte logical record blocking factor + (if 0 < blocksize < 11) or the actual block size in bytes + (if 10 < blocksize < 28800). As of version 3.3 of FITSIO, + blocksizes greater than 2880 are no longer supported. +bscale - (double precision) scaling factor for the primary array +bytlen - (integer) length of the data unit, in bytes +bzero - (double precision) zero point for primary array scaling +card - (character*80) header record to be read or written +casesen - (logical) will string matching be case sensitive? +checksum - (character*16) encoded checksum string +colname - (character) ASCII name of the column +colnum - (integer) number of the column (first column = 1) +coltemplate - (character) template string to be matched to column names +comment - (character) the keyword comment field +comments - (character array) keyword comment fields +compid - (integer) the type of computer that the program is running on +complement - (logical) should the checksum be complemented? +coordtype - (character) type of coordinate projection (-SIN, -TAN, -ARC, + -NCP, -GLS, -MER, or -AIT) +cube - 3D data cube of the appropriate datatype +curaddr - (integer) starting address (in bytes) of the CHDU +current - (integer) if not equal to 0, copy the current HDU +datacode - (integer) symbolic code of the binary table column datatype +dataok - (integer) was the data unit verification successful (=1) or + not (= -1). Equals zero if the DATASUM keyword is not present. +datasum - (double precision) 32-bit 1's complement checksum for the data unit +datatype - (character) datatype (format) of the binary table column +datestr - (string) FITS date/time string: 'YYYY-MM-DDThh:mm:ss.ddd', + 'YYYY-MM-dd', or 'dd/mm/yy' +day - (integer) current day of the month +dblval - (double precision) fractional part of the keyword value +decimals - (integer) number of decimal places to be displayed +dim1 - (integer) actual size of the first dimension of the image or cube array +dim2 - (integer) actual size of the second dimension of the cube array +dispwidth - (integer) - the display width (length of string) for a column +dtype - (character) datatype of the keyword ('C', 'L', 'I', or 'F') + C = character string + L = logical + I = integer + F = floating point number +errmsg - (character*80) oldest error message on the internal stack +errtext - (character*30) descriptive error message corresponding to error number +casesen - (logical) true if column name matching is case sensitive +exact - (logical) do the strings match exactly, or were wildcards used? +exclist (character array) list of names to be excluded from search +exists - flag indicating whether the file or compressed file exists on disk +extend - (logical) true if there may be extensions following the primary data +extname - (character) value of the EXTNAME keyword (if not blank) +fbit - (integer) first bit in the field to be read or written +felem - (integer) first pixel of the element vector (ignored for ASCII tables) +filename - (character) name of the FITS file +flagvals - (logical array) True if corresponding data element is undefined +following - (integer) if not equal to 0, copy all following HDUs in the input file +fparm - (integer) sequence number of the first group parameter to read or write +fpixel - (integer) the first pixel position +fpixels - (integer array) the first included pixel in each dimension +frow - (integer) beginning row number (first row of table = 1) +frowll - (integer*8) beginning row number (first row of table = 1) +gcount - (integer) value of the GCOUNT keyword (usually = 1) +group - (integer) sequence number of the data group (=0 for non-grouped data) +hdtype - (integer) header record type: -1=delete; 0=append or replace; + 1=append; 2=this is the END keyword +hduok - (integer) was the HDU verification successful (=1) or + not (= -1). Equals zero if the CHECKSUM keyword is not present. +hdusum - (double precision) 32 bit 1's complement checksum for the entire CHDU +hdutype - (integer) type of HDU: 0 = primary array or IMAGE, 1 = ASCII table, + 2 = binary table, -1 = any HDU type or unknown type +history - (character) the HISTORY keyword comment string +hour - (integer) hour from 0 - 23 +image - 2D image of the appropriate datatype +inclist (character array) list of names to be included in search +incs - (integer array) sampling interval for pixels in each FITS dimension +intval - (integer) integer part of the keyword value +iounit - (integer) value of an unused I/O unit number +iunit - (integer) logical unit number associated with the input FITS file, 1-199 +key_no - (integer) sequence number (starting with 1) of the keyword record +keylength - (integer) length of the keyword name +keyroot - (character) root string for the keyword name +keysadd -(integer) number of new keyword records which can fit in the CHU +keysexist - (integer) number of existing keyword records in the CHU +keyval - value of the keyword in the appropriate datatype +keyvals - (array) value of the keywords in the appropriate datatype +keyword - (character*8) name of a keyword +lray - (logical array) array of logical values corresponding to the bit array +lpixels - (integer array) the last included pixel in each dimension +match - (logical) do the 2 strings match? +maxdim - (integer) dimensioned size of the NAXES, TTYPE, TFORM or TUNIT arrays +max_keys - (integer) maximum number of keywords to search for +minute - (integer) minute of an hour (0 - 59) +month - (integer) current month of the year (1 - 12) +morekeys - (integer) will leave space in the header for this many more keywords +naxes - (integer array) size of each dimension in the FITS array +naxesll - (integer*8 array) size of each dimension in the FITS array +naxis - (integer) number of dimensions in the FITS array +naxis1 - (integer) length of the X/first axis of the FITS array +naxis2 - (integer) length of the Y/second axis of the FITS array +naxis3 - (integer) length of the Z/third axis of the FITS array +nbit - (integer) number of bits in the field to read or write +nchars - (integer) number of characters to read and return +ncols - (integer) number of columns +nelements - (integer) number of data elements to read or write +nelementsll - (integer*8) number of data elements to read or write +nexc (integer) number of names in the exclusion list (may = 0) +nhdu - (integer) absolute number of the HDU (1st HDU = 1) +ninc (integer) number of names in the inclusion list +nmove - (integer) number of HDUs to move (+ or -), relative to current position +nfound - (integer) number of keywords found (highest keyword number) +no_keys - (integer) number of keywords to write in the sequence +nparm - (integer) number of group parameters to read or write +nrows - (integer) number of rows in the table +nrowsll - (integer*8) number of rows in the table +nullval - value to represent undefined pixels, of the appropriate datatype +nextaddr - (integer) starting address (in bytes) of the HDU following the CHDU +offset - (integer) byte offset in the heap to the first element of the array +offsetll - (integer*8) byte offset in the heap to the first element of the array +oldkey - (character) old name of keyword to be modified +ounit - (integer) logical unit number associated with the output FITS file 1-199 +pcount - (integer) value of the PCOUNT keyword (usually = 0) +previous - (integer) if not equal to 0, copy all previous HDUs in the input file +repeat - (integer) length of element vector (e.g. 12J); ignored for ASCII table +rot - (double precision) celestial coordinate rotation angle (degrees) +rowlen - (integer) length of a table row, in characters or bytes +rowlenll - (integer*8) length of a table row, in characters or bytes +rowlist - (integer array) list of row numbers to be deleted in increasing order +rownum - (integer) number of the row (first row = 1) +rowrange- (string) list of rows or row ranges to be deleted +rwmode - (integer) file access mode: 0 = readonly, 1 = readwrite +second (double)- second within minute (0 - 60.9999999999) (leap second!) +seq_no - (integer) the sequence number to append to the keyword root name +simple - (logical) does the FITS file conform to all the FITS standards +snull - (character) value used to represent undefined values in ASCII table +space - (integer) number of blank spaces to leave between ASCII table columns +startchar - (integer) first character in the row to be read +startno - (integer) value of the first keyword sequence number (usually 1) +status - (integer) returned error status code (0 = OK) +str_template (character) template string to be matched to reference string +stream - (character) output stream for the report: either 'STDOUT' or 'STDERR' +string - (character) character string +sum - (double precision) 32 bit unsigned checksum value +tbcol - (integer array) column number of the first character in the field(s) +tdisp - (character) Fortran type display format for the table column +template-(character) template string for a FITS header record +tfields - (integer) number of fields (columns) in the table +tform - (character array) format of the column(s); allowed values are: + For ASCII tables: Iw, Aw, Fww.dd, Eww.dd, or Dww.dd + For binary tables: rL, rX, rB, rI, rJ, rA, rAw, rE, rD, rC, rM + where 'w'=width of the field, 'd'=no. of decimals, 'r'=repeat count + Note that the 'rAw' form is non-standard extension to the + TFORM keyword syntax that is not specifically defined in the + Binary Tables definition document. +theap - (integer) zero indexed byte offset of starting address of the heap + relative to the beginning of the binary table data +tnull - (integer) value used to represent undefined values in binary table +tnullll - (integer*8) value used to represent undefined values in binary table +ttype - (character array) label for table column(s) +tscal - (double precision) scaling factor for table column +tunit - (character array) physical unit for table column(s) +tzero - (double precision) scaling zero point for table column +unit - (integer) logical unit number associated with the FITS file (1-199) +units - (character) the keyword units string (e.g., 'km/s') +value - (character) the keyword value string +values - array of data values of the appropriate datatype +varidat - (integer) size in bytes of the 'variable length data area' + following the binary table data (usually = 0) +version - (real) current revision number of the library +width - (integer) width of the character string field +xcol - (integer) number of the column containing the X coordinate values +xinc - (double precision) X axis coordinate increment at reference pixel (deg) +xpix - (double precision) X axis pixel location +xpos - (double precision) X axis celestial coordinate (usually RA) (deg) +xrpix - (double precision) X axis reference pixel array location +xrval - (double precision) X axis coordinate value at the reference pixel (deg) +ycol - (integer) number of the column containing the X coordinate values +year - (integer) last 2 digits of the year (00 - 99) +yinc - (double precision) Y axis coordinate increment at reference pixel (deg) +ypix - (double precision) y axis pixel location +ypos - (double precision) y axis celestial coordinate (usually DEC) (deg) +yrpix - (double precision) Y axis reference pixel array location +yrval - (double precision) Y axis coordinate value at the reference pixel (deg) +- + +*XI. FITSIO Error Status Codes +- +Status codes in the range -99 to -999 and 1 to 999 are reserved for future +FITSIO use. + + 0 OK, no error +101 input and output files are the same +103 too many FITS files open at once; all internal buffers full +104 error opening existing file +105 error creating new FITS file; (does a file with this name already exist?) +106 error writing record to FITS file +107 end-of-file encountered while reading record from FITS file +108 error reading record from file +110 error closing FITS file +111 internal array dimensions exceeded +112 Cannot modify file with readonly access +113 Could not allocate memory +114 illegal logical unit number; must be between 1 - 199, inclusive +115 NULL input pointer to routine +116 error seeking position in file + +121 invalid URL prefix on file name +122 tried to register too many IO drivers +123 driver initialization failed +124 matching driver is not registered +125 failed to parse input file URL +126 parse error in range list + +151 bad argument in shared memory driver +152 null pointer passed as an argument +153 no more free shared memory handles +154 shared memory driver is not initialized +155 IPC error returned by a system call +156 no memory in shared memory driver +157 resource deadlock would occur +158 attempt to open/create lock file failed +159 shared memory block cannot be resized at the moment + + +201 header not empty; can't write required keywords +202 specified keyword name was not found in the header +203 specified header record number is out of bounds +204 keyword value field is blank +205 keyword value string is missing the closing quote character +206 illegal indexed keyword name (e.g. 'TFORM1000') +207 illegal character in keyword name or header record +208 keyword does not have expected name. Keyword out of sequence? +209 keyword does not have expected integer value +210 could not find the required END header keyword +211 illegal BITPIX keyword value +212 illegal NAXIS keyword value +213 illegal NAXISn keyword value: must be 0 or positive integer +214 illegal PCOUNT keyword value +215 illegal GCOUNT keyword value +216 illegal TFIELDS keyword value +217 negative ASCII or binary table width value (NAXIS1) +218 negative number of rows in ASCII or binary table (NAXIS2) +219 column name (TTYPE keyword) not found +220 illegal SIMPLE keyword value +221 could not find the required SIMPLE header keyword +222 could not find the required BITPIX header keyword +223 could not find the required NAXIS header keyword +224 could not find all the required NAXISn keywords in the header +225 could not find the required XTENSION header keyword +226 the CHDU is not an ASCII table extension +227 the CHDU is not a binary table extension +228 could not find the required PCOUNT header keyword +229 could not find the required GCOUNT header keyword +230 could not find the required TFIELDS header keyword +231 could not find all the required TBCOLn keywords in the header +232 could not find all the required TFORMn keywords in the header +233 the CHDU is not an IMAGE extension +234 illegal TBCOL keyword value; out of range +235 this operation only allowed for ASCII or BINARY table extension +236 column is too wide to fit within the specified width of the ASCII table +237 the specified column name template matched more than one column name +241 binary table row width is not equal to the sum of the field widths +251 unrecognizable type of FITS extension +252 unrecognizable FITS record +253 END keyword contains non-blank characters in columns 9-80 +254 Header fill area contains non-blank characters +255 Data fill area contains non-blank on non-zero values +261 unable to parse the TFORM keyword value string +262 unrecognizable TFORM datatype code +263 illegal TDIMn keyword value + +301 illegal HDU number; less than 1 or greater than internal buffer size +302 column number out of range (1 - 999) +304 attempt to move to negative file record number +306 attempted to read or write a negative number of bytes in the FITS file +307 illegal starting row number for table read or write operation +308 illegal starting element number for table read or write operation +309 attempted to read or write character string in non-character table column +310 attempted to read or write logical value in non-logical table column +311 illegal ASCII table TFORM format code for attempted operation +312 illegal binary table TFORM format code for attempted operation +314 value for undefined pixels has not been defined +317 attempted to read or write descriptor in a non-descriptor field +320 number of array dimensions out of range +321 first pixel number is greater than the last pixel number +322 attempt to set BSCALE or TSCALn scaling parameter = 0 +323 illegal axis length less than 1 + +340 NOT_GROUP_TABLE 340 Grouping function error +341 HDU_ALREADY_MEMBER +342 MEMBER_NOT_FOUND +343 GROUP_NOT_FOUND +344 BAD_GROUP_ID +345 TOO_MANY_HDUS_TRACKED +346 HDU_ALREADY_TRACKED +347 BAD_OPTION +348 IDENTICAL_POINTERS +349 BAD_GROUP_ATTACH +350 BAD_GROUP_DETACH + +360 NGP_NO_MEMORY malloc failed +361 NGP_READ_ERR read error from file +362 NGP_NUL_PTR null pointer passed as an argument. + Passing null pointer as a name of + template file raises this error +363 NGP_EMPTY_CURLINE line read seems to be empty (used + internally) +364 NGP_UNREAD_QUEUE_FULL cannot unread more then 1 line (or single + line twice) +365 NGP_INC_NESTING too deep include file nesting (infinite + loop, template includes itself ?) +366 NGP_ERR_FOPEN fopen() failed, cannot open template file +367 NGP_EOF end of file encountered and not expected +368 NGP_BAD_ARG bad arguments passed. Usually means + internal parser error. Should not happen +369 NGP_TOKEN_NOT_EXPECT token not expected here + +401 error attempting to convert an integer to a formatted character string +402 error attempting to convert a real value to a formatted character string +403 cannot convert a quoted string keyword to an integer +404 attempted to read a non-logical keyword value as a logical value +405 cannot convert a quoted string keyword to a real value +406 cannot convert a quoted string keyword to a double precision value +407 error attempting to read character string as an integer +408 error attempting to read character string as a real value +409 error attempting to read character string as a double precision value +410 bad keyword datatype code +411 illegal number of decimal places while formatting floating point value +412 numerical overflow during implicit datatype conversion +413 error compressing image +414 error uncompressing image +420 error in date or time conversion + +431 syntax error in parser expression +432 expression did not evaluate to desired type +433 vector result too large to return in array +434 data parser failed not sent an out column +435 bad data encounter while parsing column +436 parse error: output file not of proper type + +501 celestial angle too large for projection +502 bad celestial coordinate or pixel value +503 error in celestial coordinate calculation +504 unsupported type of celestial projection +505 required celestial coordinate keywords not found +506 approximate wcs keyword values were returned +- +\end{document} diff --git a/software/cfitsio3040/fitsio.h b/software/cfitsio3040/fitsio.h new file mode 100644 index 000000000..609825552 --- /dev/null +++ b/software/cfitsio3040/fitsio.h @@ -0,0 +1,1791 @@ +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ +/* + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +*/ + +#ifndef _FITSIO_H +#define _FITSIO_H + +#define CFITSIO_VERSION 3.04 + +#include + +/* the following was provided by Michael Greason (GSFC) to fix a */ +/* C/Fortran compatibility problem on an SGI Altix system running */ +/* SGI ProPack 4 [this is a Novell SuSE Enterprise 9 derivative] */ +/* and using the Intel C++ and Fortran compilers (version 9.1) */ +#if defined(__INTEL_COMPILER) && defined(__itanium__) +# define mipsFortran 1 +# define _MIPS_SZLONG 64 +#endif + +#if defined(linux) || defined(__APPLE__) || defined(__sgi) +# include /* apparently needed on debian linux systems */ +#endif /* to define off_t */ + +#include /* apparently needed to define size_t with gcc 2.8.1 */ +#include /* needed for LLONG_MAX and INT64_MAX definitions */ + +/* Define the datatype for variables which store file offset values. */ +/* The newer 'off_t' datatype should be used for this purpose, but some */ +/* older compilers do not recognize this type, in which case we use 'long' */ +/* instead. Note that _OFF_T is defined (or not) in stdio.h depending */ +/* on whether _LARGEFILE_SOURCE is defined in sys/feature_tests.h */ +/* (at least on Solaris platforms using cc) */ + +/* Debian systems require the 2nd test, below, */ +/* i.e, "(defined(linux) && defined(__off_t_defined))" */ +#if defined(_OFF_T) || (defined(linux) && defined(__off_t_defined)) || defined(_MIPS_SZLONG) || defined(__APPLE__) || defined(_AIX) +# define OFF_T off_t +#else +# define OFF_T long +#endif + +/* this block determines if the the string function name is + strtol or strtoll, and whether to use %ld or %lld in printf statements */ + +/* + The following 2 cases for that Athon64 were removed on 4 Jan 2006; + they appear to be incorrect now that LONGLONG is always typedef'ed + to 'long long' + || defined(__ia64__) \ + || defined(__x86_64__) \ +*/ +#if (defined(__alpha) && ( defined(__unix__) || defined(__NetBSD__) )) \ + || defined(__sparcv9) \ + || defined(__powerpc64__) || defined(__64BIT__) \ + || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) \ + || defined( _MSC_VER)|| defined(__BORLANDC__) + +# define USE_LL_SUFFIX 0 +#else +# define USE_LL_SUFFIX 1 +#endif + +/* + Determine what 8-byte integer data type is available. + 'long long' is now supported by most compilers, but + older MS Visual C++ compilers before V7.0 use '__int64' instead. +*/ + +#ifndef LONGLONG_TYPE /* this may have been previously defined */ +#if defined(_MSC_VER) /* Microsoft Visual C++ */ + +#if (_MSC_VER < 1300) /* versions earlier than V7.0 do not have 'long long' */ + typedef __int64 LONGLONG; +#else /* newer versions do support 'long long' */ + typedef long long LONGLONG; +#endif + +#else + typedef long long LONGLONG; +#endif + +#define LONGLONG_TYPE +#endif + + +/* ================================================================= */ + + +/* The following exclusion if __CINT__ is defined is needed for ROOT */ +#ifndef __CINT__ +#include "longnam.h" +#endif + +/* global variables */ + +#define FLEN_FILENAME 1025 /* max length of a filename */ +#define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */ +#define FLEN_CARD 81 /* length of a FITS header card */ +#define FLEN_VALUE 71 /* max length of a keyword value string */ +#define FLEN_COMMENT 73 /* max length of a keyword comment string */ +#define FLEN_ERRMSG 81 /* max length of a FITSIO error message */ +#define FLEN_STATUS 31 /* max length of a FITSIO status text string */ + +#define TBIT 1 /* codes for FITS table data types */ +#define TBYTE 11 +#define TSBYTE 12 +#define TLOGICAL 14 +#define TSTRING 16 +#define TUSHORT 20 +#define TSHORT 21 +#define TUINT 30 +#define TINT 31 +#define TULONG 40 +#define TLONG 41 +#define TINT32BIT 41 /* used when returning datatype of a column */ +#define TFLOAT 42 +#define TLONGLONG 81 +#define TDOUBLE 82 +#define TCOMPLEX 83 +#define TDBLCOMPLEX 163 + +#define TYP_STRUC_KEY 10 +#define TYP_CMPRS_KEY 20 +#define TYP_SCAL_KEY 30 +#define TYP_NULL_KEY 40 +#define TYP_DIM_KEY 50 +#define TYP_RANG_KEY 60 +#define TYP_UNIT_KEY 70 +#define TYP_DISP_KEY 80 +#define TYP_HDUID_KEY 90 +#define TYP_CKSUM_KEY 100 +#define TYP_WCS_KEY 110 +#define TYP_REFSYS_KEY 120 +#define TYP_COMM_KEY 130 +#define TYP_CONT_KEY 140 +#define TYP_USER_KEY 150 + + +#define INT32BIT int /* 32-bit integer datatype. Currently this */ + /* datatype is an 'int' on all useful platforms */ + /* however, it is possible that that are cases */ + /* where 'int' is a 2-byte integer, in which case */ + /* INT32BIT would need to be defined as 'long'. */ + +#define BYTE_IMG 8 /* BITPIX code values for FITS image types */ +#define SHORT_IMG 16 +#define LONG_IMG 32 +#define LONGLONG_IMG 64 +#define FLOAT_IMG -32 +#define DOUBLE_IMG -64 + /* The following 2 codes are not true FITS */ + /* datatypes; these codes are only used internally */ + /* within cfitsio to make it easier for users */ + /* to deal with unsigned integers. */ +#define SBYTE_IMG 10 +#define USHORT_IMG 20 +#define ULONG_IMG 40 + +#define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */ +#define ASCII_TBL 1 /* ASCII table HDU */ +#define BINARY_TBL 2 /* Binary table HDU */ +#define ANY_HDU -1 /* matches any HDU type */ + +#define READONLY 0 /* options when opening a file */ +#define READWRITE 1 + +/* adopt a hopefully obscure number to use as a null value flag */ +/* could be problems if the FITS files contain data with these values */ +#define FLOATNULLVALUE -9.11912E-36F +#define DOUBLENULLVALUE -9.1191291391491E-36 + +/* Image compression algorithm types */ +#define MAX_COMPRESS_DIM 6 +#define RICE_1 11 +#define GZIP_1 21 +#define PLIO_1 31 +#define HCOMPRESS_1 41 + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#define CASESEN 1 /* do case-sensitive string match */ +#define CASEINSEN 0 /* do case-insensitive string match */ + +#define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */ +#define GT_ID_REF 1 +#define GT_ID_POS 2 +#define GT_ID_ALL 3 +#define GT_ID_REF_URI 11 +#define GT_ID_POS_URI 12 + +#define OPT_RM_GPT 0 +#define OPT_RM_ENTRY 1 +#define OPT_RM_MBR 2 +#define OPT_RM_ALL 3 + +#define OPT_GCP_GPT 0 +#define OPT_GCP_MBR 1 +#define OPT_GCP_ALL 2 + +#define OPT_MCP_ADD 0 +#define OPT_MCP_NADD 1 +#define OPT_MCP_REPL 2 +#define OPT_MCP_MOV 3 + +#define OPT_MRG_COPY 0 +#define OPT_MRG_MOV 1 + +#define OPT_CMT_MBR 1 +#define OPT_CMT_MBR_DEL 11 + +typedef struct /* structure used to store table column information */ +{ + char ttype[70]; /* column name = FITS TTYPEn keyword; */ + LONGLONG tbcol; /* offset in row to first byte of each column */ + int tdatatype; /* datatype code of each column */ + LONGLONG trepeat; /* repeat count of column; number of elements */ + double tscale; /* FITS TSCALn linear scaling factor */ + double tzero; /* FITS TZEROn linear scaling zero point */ + LONGLONG tnull; /* FITS null value for int image or binary table cols */ + char strnull[20]; /* FITS null value string for ASCII table columns */ + char tform[10]; /* FITS tform keyword value */ + long twidth; /* width of each ASCII table column */ +}tcolumn; + +#define VALIDSTRUC 555 /* magic value used to identify if structure is valid */ + +typedef struct /* structure used to store basic FITS file information */ +{ + int filehandle; /* handle returned by the file open function */ + int driver; /* defines which set of I/O drivers should be used */ + int open_count; /* number of opened 'fitsfiles' using this structure */ + char *filename; /* file name */ + int validcode; /* magic value used to verify that structure is valid */ + LONGLONG filesize; /* current size of the physical disk file in bytes */ + LONGLONG logfilesize; /* logical size of file, including unflushed buffers */ + int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */ + LONGLONG bytepos; /* current logical I/O pointer position in file */ + LONGLONG io_pos; /* current I/O pointer position in the physical file */ + int curbuf; /* number of I/O buffer currently in use */ + int curhdu; /* current HDU number; 0 = primary array */ + int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */ + int writemode; /* 0 = readonly, 1 = readwrite */ + int maxhdu; /* highest numbered HDU known to exist in the file */ + int MAXHDU; /* dynamically allocated dimension of headstart array */ + LONGLONG *headstart; /* byte offset in file to start of each HDU */ + LONGLONG headend; /* byte offest in file to end of the current HDU header */ + LONGLONG nextkey; /* byte offset in file to beginning of next keyword */ + LONGLONG datastart; /* byte offset in file to start of the current data unit */ + int tfield; /* number of fields in the table (primary array has 2 */ + LONGLONG origrows; /* original number of rows (value of NAXIS2 keyword) */ + LONGLONG numrows; /* number of rows in the table (dynamically updated) */ + LONGLONG rowlength; /* length of a table row or image size (bytes) */ + tcolumn *tableptr; /* pointer to the table structure */ + LONGLONG heapstart; /* heap start byte relative to start of data unit */ + LONGLONG heapsize; /* size of the heap, in bytes */ + + /* the following elements are related to compressed images */ + int request_compress_type; /* requested image compression algorithm */ + long request_tilesize[MAX_COMPRESS_DIM]; /* requested tiling size */ + int request_noise_nbits; /* requested noise bit parameter value */ + int request_hcomp_scale; /* requested HCOMPRESS scale factor */ + int request_hcomp_smooth; /* requested HCOMPRESS smooth parameter */ + + int compressimg; /* 1 if HDU contains a compressed image, else 0 */ + char zcmptype[12]; /* compression type string */ + int compress_type; /* type of compression algorithm */ + int zbitpix; /* FITS data type of image (BITPIX) */ + int zndim; /* dimension of image */ + long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */ + long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */ + long maxtilelen; /* max number of pixels in each image tile */ + long maxelem; /* maximum length of variable length arrays */ + + int cn_compressed; /* column number for COMPRESSED_DATA column */ + int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */ + int cn_zscale; /* column number for ZSCALE column */ + int cn_zzero; /* column number for ZZERO column */ + int cn_zblank; /* column number for the ZBLANK column */ + + double zscale; /* scaling value, if same for all tiles */ + double zzero; /* zero pt, if same for all tiles */ + double cn_bscale; /* value of the BSCALE keyword in header */ + double cn_bzero; /* value of the BZERO keyword in header */ + int zblank; /* value for null pixels, if not a column */ + + int rice_blocksize; /* first compression parameter */ + int noise_nbits; /* floating point noise parameter */ + int hcomp_scale; /* 1st hcompress compression parameter */ + int hcomp_smooth; /* 2nd hcompress compression parameter */ + +} FITSfile; + +typedef struct /* structure used to store basic HDU information */ +{ + int HDUposition; /* HDU position in file; 0 = first HDU */ + FITSfile *Fptr; /* pointer to FITS file structure */ +}fitsfile; + +typedef struct /* structure for the iterator function column information */ +{ + /* elements required as input to fits_iterate_data: */ + + fitsfile *fptr; /* pointer to the HDU containing the column */ + int colnum; /* column number in the table (use name if < 1) */ + char colname[70]; /* name (= TTYPEn value) of the column (optional) */ + int datatype; /* output datatype (converted if necessary */ + int iotype; /* = InputCol, InputOutputCol, or OutputCol */ + + /* output elements that may be useful for the work function: */ + + void *array; /* pointer to the array (and the null value) */ + long repeat; /* binary table vector repeat value */ + long tlmin; /* legal minimum data value */ + long tlmax; /* legal maximum data value */ + char tunit[70]; /* physical unit string */ + char tdisp[70]; /* suggested display format */ + +} iteratorCol; + +#define InputCol 0 /* flag for input only iterator column */ +#define InputOutputCol 1 /* flag for input and output iterator column */ +#define OutputCol 2 /* flag for output only iterator column */ + +/*============================================================================= +* +* The following wtbarr typedef is used in the fits_read_wcstab() routine, +* which is intended for use with the WCSLIB library written by Mark +* Calabretta, http://www.atnf.csiro.au/~mcalabre/index.html +* +* In order to maintain WCSLIB and CFITSIO as independent libraries it +* was not permissible for any CFITSIO library code to include WCSLIB +* header files, or vice versa. However, the CFITSIO function +* fits_read_wcstab() accepts an array of structs defined by wcs.h within +* WCSLIB. The problem then was to define this struct within fitsio.h +* without including wcs.h, especially noting that wcs.h will often (but +* not always) be included together with fitsio.h in an applications +* program that uses fits_read_wcstab(). +* +* Of the various possibilities, the solution adopted was for WCSLIB to +* define "struct wtbarr" while fitsio.h defines "typedef wtbarr", a +* untagged struct with identical members. This allows both wcs.h and +* fitsio.h to define a wtbarr data type without conflict by virtue of +* the fact that structure tags and typedef names share different +* namespaces in C. Therefore, declarations within WCSLIB look like +* +* struct wtbarr *w; +* +* while within CFITSIO they are simply +* +* wtbarr *w; +* +* but as suggested by the commonality of the names, these are really the +* same aggregate data type. However, in passing a (struct wtbarr *) to +* fits_read_wcstab() a cast to (wtbarr *) is formally required. +*===========================================================================*/ + +#ifndef WCSLIB_GETWCSTAB +#define WCSLIB_GETWCSTAB + +typedef struct { + int i; /* Image axis number. */ + int m; /* Array axis number for index vectors. */ + int kind; /* Array type, 'c' (coord) or 'i' (index). */ + char extnam[72]; /* EXTNAME of binary table extension. */ + int extver; /* EXTVER of binary table extension. */ + int extlev; /* EXTLEV of binary table extension. */ + char ttype[72]; /* TTYPEn of column containing the array. */ + long row; /* Table row number. */ + int ndim; /* Expected array dimensionality. */ + int *dimlen; /* Where to write the array axis lengths. */ + double **arrayp; /* Where to write the address of the array */ + /* allocated to store the array. */ +} wtbarr; + +int fits_read_wcstab(fitsfile *fptr, int nwtb, wtbarr *wtb, int *status); + +#endif /* WCSLIB_GETWCSTAB */ + +/* error status codes */ + +#define CREATE_DISK_FILE -106 /* create disk file, without extended filename syntax */ +#define OPEN_DISK_FILE -105 /* open disk file, without extended filename syntax */ +#define SKIP_TABLE -104 /* move to 1st image when opening file */ +#define SKIP_IMAGE -103 /* move to 1st table when opening file */ +#define SKIP_NULL_PRIMARY -102 /* skip null primary array when opening file */ +#define USE_MEM_BUFF -101 /* use memory buffer when opening file */ +#define OVERFLOW_ERR -11 /* overflow during datatype conversion */ +#define PREPEND_PRIMARY -9 /* used in ffiimg to insert new primary array */ +#define SAME_FILE 101 /* input and output files are the same */ +#define TOO_MANY_FILES 103 /* tried to open too many FITS files */ +#define FILE_NOT_OPENED 104 /* could not open the named file */ +#define FILE_NOT_CREATED 105 /* could not create the named file */ +#define WRITE_ERROR 106 /* error writing to FITS file */ +#define END_OF_FILE 107 /* tried to move past end of file */ +#define READ_ERROR 108 /* error reading from FITS file */ +#define FILE_NOT_CLOSED 110 /* could not close the file */ +#define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */ +#define READONLY_FILE 112 /* Cannot write to readonly file */ +#define MEMORY_ALLOCATION 113 /* Could not allocate memory */ +#define BAD_FILEPTR 114 /* invalid fitsfile pointer */ +#define NULL_INPUT_PTR 115 /* NULL input pointer to routine */ +#define SEEK_ERROR 116 /* error seeking position in file */ + +#define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */ +#define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */ +#define DRIVER_INIT_FAILED 123 /* driver initialization failed */ +#define NO_MATCHING_DRIVER 124 /* matching driver is not registered */ +#define URL_PARSE_ERROR 125 /* failed to parse input file URL */ +#define RANGE_PARSE_ERROR 126 /* failed to parse input file URL */ + +#define SHARED_ERRBASE (150) +#define SHARED_BADARG (SHARED_ERRBASE + 1) +#define SHARED_NULPTR (SHARED_ERRBASE + 2) +#define SHARED_TABFULL (SHARED_ERRBASE + 3) +#define SHARED_NOTINIT (SHARED_ERRBASE + 4) +#define SHARED_IPCERR (SHARED_ERRBASE + 5) +#define SHARED_NOMEM (SHARED_ERRBASE + 6) +#define SHARED_AGAIN (SHARED_ERRBASE + 7) +#define SHARED_NOFILE (SHARED_ERRBASE + 8) +#define SHARED_NORESIZE (SHARED_ERRBASE + 9) + +#define HEADER_NOT_EMPTY 201 /* header already contains keywords */ +#define KEY_NO_EXIST 202 /* keyword not found in header */ +#define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */ +#define VALUE_UNDEFINED 204 /* keyword value field is blank */ +#define NO_QUOTE 205 /* string is missing the closing quote */ +#define BAD_INDEX_KEY 206 /* illegal indexed keyword name */ +#define BAD_KEYCHAR 207 /* illegal character in keyword name or card */ +#define BAD_ORDER 208 /* required keywords out of order */ +#define NOT_POS_INT 209 /* keyword value is not a positive integer */ +#define NO_END 210 /* couldn't find END keyword */ +#define BAD_BITPIX 211 /* illegal BITPIX keyword value*/ +#define BAD_NAXIS 212 /* illegal NAXIS keyword value */ +#define BAD_NAXES 213 /* illegal NAXISn keyword value */ +#define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */ +#define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */ +#define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */ +#define NEG_WIDTH 217 /* negative table row size */ +#define NEG_ROWS 218 /* negative number of rows in table */ +#define COL_NOT_FOUND 219 /* column with this name not found in table */ +#define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */ +#define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */ +#define NO_BITPIX 222 /* Second keyword not BITPIX */ +#define NO_NAXIS 223 /* Third keyword not NAXIS */ +#define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */ +#define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */ +#define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */ +#define NOT_BTABLE 227 /* the CHDU is not a binary table extension */ +#define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */ +#define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */ +#define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */ +#define NO_TBCOL 231 /* couldn't find TBCOLn keyword */ +#define NO_TFORM 232 /* couldn't find TFORMn keyword */ +#define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */ +#define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */ +#define NOT_TABLE 235 /* the CHDU is not a table */ +#define COL_TOO_WIDE 236 /* column is too wide to fit in table */ +#define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */ +#define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */ +#define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */ +#define UNKNOWN_REC 252 /* unrecognizable FITS record */ +#define END_JUNK 253 /* END keyword is not blank */ +#define BAD_HEADER_FILL 254 /* Header fill area not blank */ +#define BAD_DATA_FILL 255 /* Data fill area not blank or zero */ +#define BAD_TFORM 261 /* illegal TFORM format code */ +#define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */ +#define BAD_TDIM 263 /* illegal TDIMn keyword value */ +#define BAD_HEAP_PTR 264 /* invalid BINTABLE heap address */ + +#define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */ +#define BAD_COL_NUM 302 /* column number < 1 or > tfields */ +#define NEG_FILE_POS 304 /* tried to move before beginning of file */ +#define NEG_BYTES 306 /* tried to read or write negative bytes */ +#define BAD_ROW_NUM 307 /* illegal starting row number in table */ +#define BAD_ELEM_NUM 308 /* illegal starting element number in vector */ +#define NOT_ASCII_COL 309 /* this is not an ASCII string column */ +#define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */ +#define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */ +#define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */ +#define NO_NULL 314 /* null value has not been defined */ +#define NOT_VARI_LEN 317 /* this is not a variable length column */ +#define BAD_DIMEN 320 /* illegal number of dimensions in array */ +#define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */ +#define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */ +#define NEG_AXIS 323 /* illegal axis length < 1 */ + +#define NOT_GROUP_TABLE 340 +#define HDU_ALREADY_MEMBER 341 +#define MEMBER_NOT_FOUND 342 +#define GROUP_NOT_FOUND 343 +#define BAD_GROUP_ID 344 +#define TOO_MANY_HDUS_TRACKED 345 +#define HDU_ALREADY_TRACKED 346 +#define BAD_OPTION 347 +#define IDENTICAL_POINTERS 348 +#define BAD_GROUP_ATTACH 349 +#define BAD_GROUP_DETACH 350 + +#define BAD_I2C 401 /* bad int to formatted string conversion */ +#define BAD_F2C 402 /* bad float to formatted string conversion */ +#define BAD_INTKEY 403 /* can't interprete keyword value as integer */ +#define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */ +#define BAD_FLOATKEY 405 /* can't interprete keyword value as float */ +#define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */ +#define BAD_C2I 407 /* bad formatted string to int conversion */ +#define BAD_C2F 408 /* bad formatted string to float conversion */ +#define BAD_C2D 409 /* bad formatted string to double conversion */ +#define BAD_DATATYPE 410 /* bad keyword datatype code */ +#define BAD_DECIM 411 /* bad number of decimal places specified */ +#define NUM_OVERFLOW 412 /* overflow during datatype conversion */ + +# define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */ +# define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */ +# define NO_COMPRESSED_TILE 415 /* compressed tile doesn't exist */ + +#define BAD_DATE 420 /* error in date or time conversion */ + +#define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */ +#define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */ +#define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */ +#define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */ +#define PARSE_BAD_COL 435 /* bad data encounter while parsing column */ +#define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */ + +#define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */ +#define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */ +#define WCS_ERROR 503 /* error in celestial coordinate calculation */ +#define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */ +#define NO_WCS_KEY 505 /* celestial coordinate keywords not found */ +#define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */ + +#define NO_CLOSE_ERROR 999 /* special value used internally to switch off */ + /* the error message from ffclos and ffchdu */ + +/*------- following error codes are used in the grparser.c file -----------*/ +#define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */ +#define NGP_OK (0) +#define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */ +#define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */ +#define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */ +#define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */ +#define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */ +#define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */ +#define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */ +#define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */ +#define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */ +#define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */ + +/* The following exclusion if __CINT__ is defined is needed for ROOT */ +#ifndef __CINT__ +/* the following 3 lines are needed to support C++ compilers */ +#ifdef __cplusplus +extern "C" { +#endif +#endif + +int CFITS2Unit( fitsfile *fptr ); +fitsfile* CUnit2FITS(int unit); + +/*---------------- FITS file URL parsing routines -------------*/ +int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber); +char *fits_split_names(char *list); +int ffiurl( char *url, char *urltype, char *infile, + char *outfile, char *extspec, char *rowfilter, + char *binspec, char *colspec, int *status); +int ffifile (char *url, char *urltype, char *infile, + char *outfile, char *extspec, char *rowfilter, + char *binspec, char *colspec, char *pixfilter, int *status); +int ffrtnm(char *url, char *rootname, int *status); +int ffexist(const char *infile, int *exists, int *status); +int ffexts(char *extspec, int *extnum, char *extname, int *extvers, + int *hdutype, char *colname, char *rowexpress, int *status); +int ffextn(char *url, int *extension_num, int *status); +int ffurlt(fitsfile *fptr, char *urlType, int *status); +int ffbins(char *binspec, int *imagetype, int *haxis, + char colname[4][FLEN_VALUE], double *minin, + double *maxin, double *binsizein, + char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], + char binname[4][FLEN_VALUE], double *weight, char *wtname, + int *recip, int *status); +int ffbinr(char **binspec, char *colname, double *minin, + double *maxin, double *binsizein, char *minname, + char *maxname, char *binname, int *status); +int fits_copy_cell2image(fitsfile *fptr, fitsfile *newptr, char *colname, + long rownum, int *status); +int fits_copy_image2cell(fitsfile *fptr, fitsfile *newptr, char *colname, + long rownum, int copykeyflag, int *status); +int ffimport_file( char *filename, char **contents, int *status ); +int ffrwrg( char *rowlist, LONGLONG maxrows, int maxranges, int *numranges, + long *minrow, long *maxrow, int *status); +int ffrwrgll( char *rowlist, LONGLONG maxrows, int maxranges, int *numranges, + LONGLONG *minrow, LONGLONG *maxrow, int *status); +/*---------------- FITS file I/O routines -------------*/ +int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr, + size_t *buffsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), + int *status); +int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status); +int ffopentest(double version, fitsfile **fptr, const char *filename, int iomode, int *status); + +int ffdopn(fitsfile **fptr, const char *filename, int iomode, int *status); +int fftopn(fitsfile **fptr, const char *filename, int iomode, int *status); +int ffiopn(fitsfile **fptr, const char *filename, int iomode, int *status); +int ffdkopn(fitsfile **fptr, const char *filename, int iomode, int *status); +int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status); +int ffinit( fitsfile **fptr, const char *filename, int *status); +int ffdkinit(fitsfile **fptr, const char *filename, int *status); +int ffimem(fitsfile **fptr, void **buffptr, + size_t *buffsize, size_t deltasize, + void *(*mem_realloc)(void *p, size_t newsize), + int *status); +int fftplt(fitsfile **fptr, const char *filename, const char *tempname, + int *status); +int ffflus(fitsfile *fptr, int *status); +int ffflsh(fitsfile *fptr, int clearbuf, int *status); +int ffclos(fitsfile *fptr, int *status); +int ffdelt(fitsfile *fptr, int *status); +int ffflnm(fitsfile *fptr, char *filename, int *status); +int ffflmd(fitsfile *fptr, int *filemode, int *status); + +/*---------------- utility routines -------------*/ + +float ffvers(float *version); +void ffupch(char *string); +void ffgerr(int status, char *errtext); +void ffpmsg(const char *err_message); +void ffpmrk(void); +int ffgmsg(char *err_message); +void ffcmsg(void); +void ffcmrk(void); +void ffrprt(FILE *stream, int status); +void ffcmps(char *templt, char *colname, int casesen, int *match, + int *exact); +int fftkey(char *keyword, int *status); +int fftrec(char *card, int *status); +int ffnchk(fitsfile *fptr, int *status); +int ffkeyn(char *keyroot, int value, char *keyname, int *status); +int ffnkey(int value, char *keyroot, char *keyname, int *status); +int ffgkcl(char *card); +int ffdtyp(char *cval, char *dtype, int *status); +int ffpsvc(char *card, char *value, char *comm, int *status); +int ffgknm(char *card, char *name, int *length, int *status); +int ffgthd(char *tmplt, char *card, int *hdtype, int *status); +int fits_translate_keyword(char *inrec, char *outrec, char *patterns[][2], + int npat, int n_value, int n_offset, int n_range, int *pat_num, + int *i, int *j, int *m, int *n, int *status); +int fits_translate_keywords(fitsfile *infptr, fitsfile *outfptr, + int firstkey, char *patterns[][2], + int npat, int n_value, int n_offset, int n_range, int *status); +int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status); +int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status); +int ffbnfmll(char *tform, int *datacode, LONGLONG *repeat, long *width, int *status); +int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol, + int *status); +int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre, + int *status); +/* ffmbyt should not normally be used in application programs, but it is + defined here as a publicly available routine because there are a few + rare cases where it is needed +*/ +int ffmbyt(fitsfile *fptr, LONGLONG bytpos, int ignore_err, int *status); +/*----------------- write single keywords --------------*/ +int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value, + char *comm, int *status); +int ffprec(fitsfile *fptr, const char *card, int *status); +int ffpcom(fitsfile *fptr, const char *comm, int *status); +int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status); +int ffphis(fitsfile *fptr, const char *history, int *status); +int ffpdat(fitsfile *fptr, int *status); +int ffverifydate(int year, int month, int day, int *status); +int ffgstm(char *timestr, int *timeref, int *status); +int ffgsdt(int *day, int *month, int *year, int *status); +int ffdt2s(int year, int month, int day, char *datestr, int *status); +int fftm2s(int year, int month, int day, int hour, int minute, double second, + int decimals, char *datestr, int *status); +int ffs2dt(char *datestr, int *year, int *month, int *day, int *status); +int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour, + int *minute, double *second, int *status); +int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status); +int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffplsw(fitsfile *fptr, int *status); +int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status); +int ffpkyj(fitsfile *fptr, char *keyname, LONGLONG value, char *comm, int *status); +int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); +int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); +int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm, + int *status); +int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status); +int ffptdmll( fitsfile *fptr, int colnum, int naxis, LONGLONG naxes[], int *status); + +/*----------------- write array of keywords --------------*/ +int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[], + char *comm[], int *status); +int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value, + char *comm[], int *status); +int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value, + char *comm[], int *status); +int ffpknjj(fitsfile *fptr, char *keyroot, int nstart, int nkey, LONGLONG *value, + char *comm[], int *status); +int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value, + int decim, char *comm[], int *status); +int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value, + int decim, char *comm[], int *status); +int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value, + int decim, char *comm[], int *status); +int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value, + int decim, char *comm[], int *status); +int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol, + char *rootname, int *status); + +/*----------------- write required header keywords --------------*/ +int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status); +int ffphpsll( fitsfile *fptr, int bitpix, int naxis, LONGLONG naxes[], int *status); +int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[], + LONGLONG pcount, LONGLONG gcount, int extend, int *status); +int ffphprll( fitsfile *fptr, int simple, int bitpix, int naxis, LONGLONG naxes[], + LONGLONG pcount, LONGLONG gcount, int extend, int *status); +int ffphtb(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, int tfields, char **ttype, + long *tbcol, char **tform, char **tunit, char *extname, int *status); +int ffphbn(fitsfile *fptr, LONGLONG naxis2, int tfields, char **ttype, + char **tform, char **tunit, char *extname, LONGLONG pcount, int *status); +int ffphext( fitsfile *fptr, char *xtension, int bitpix, int naxis, long naxes[], + LONGLONG pcount, LONGLONG gcount, int *status); +/*----------------- write template keywords --------------*/ +int ffpktp(fitsfile *fptr, const char *filename, int *status); + +/*------------------ get header information --------------*/ +int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status); +int ffghps(fitsfile *fptr, int *nexist, int *position, int *status); + +/*------------------ move position in header -------------*/ +int ffmaky(fitsfile *fptr, int nrec, int *status); +int ffmrky(fitsfile *fptr, int nrec, int *status); + +/*------------------ read single keywords -----------------*/ +int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist, + int nexc, char *card, int *status); +int ffgrec(fitsfile *fptr, int nrec, char *card, int *status); +int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status); +int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status); +int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm, + int *status); +int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm, + int *status); + +int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value, + char *comm, int *status); +int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status); +int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status) +; +int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status); +int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status); +int ffgkyjj(fitsfile *fptr, char *keyname, LONGLONG *value, char *comm, int *status); +int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status); +int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status); +int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status); +int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status); +int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue, + char *comm, int *status); +int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[], + int *status); +int ffgtdmll(fitsfile *fptr, int colnum, int maxdim, int *naxis, LONGLONG naxes[], + int *status); +int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim, + int *naxis, long naxes[], int *status); +int ffdtdmll(fitsfile *fptr, char *tdimstr, int colnum, int maxdim, + int *naxis, LONGLONG naxes[], int *status); + +/*------------------ read array of keywords -----------------*/ +int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[], + int *nfound, int *status); +int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value, + int *nfound, int *status); +int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value, + int *nfound, int *status); +int ffgknjj(fitsfile *fptr, char *keyname, int nstart, int nmax, LONGLONG *value, + int *nfound, int *status); +int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value, + int *nfound, int *status); +int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value, + int *nfound, int *status); +int ffh2st(fitsfile *fptr, char **header, int *status); +int ffhdr2str( fitsfile *fptr, int exclude_comm, char **exclist, + int nexc, char **header, int *nkeys, int *status); + +/*----------------- read required header keywords --------------*/ +int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, + long naxes[], long *pcount, long *gcount, int *extend, int *status); + +int ffghprll(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, + LONGLONG naxes[], long *pcount, long *gcount, int *extend, int *status); + +int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2, + int *tfields, char **ttype, long *tbcol, char **tform, char **tunit, + char *extname, int *status); + +int ffghtbll(fitsfile *fptr,int maxfield, LONGLONG *naxis1, LONGLONG *naxis2, + int *tfields, char **ttype, LONGLONG *tbcol, char **tform, char **tunit, + char *extname, int *status); + + +int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + long *pcount, int *status); + +int ffghbnll(fitsfile *fptr, int maxfield, LONGLONG *naxis2, int *tfields, + char **ttype, char **tform, char **tunit, char *extname, + LONGLONG *pcount, int *status); + +/*--------------------- update keywords ---------------*/ +int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value, + char *comm, int *status); +int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status); +int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status); +int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status); +int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status); +int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status); +int ffukyj(fitsfile *fptr, char *keyname, LONGLONG value, char *comm, int *status); +int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); +int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); + +/*--------------------- modify keywords ---------------*/ +int ffmrec(fitsfile *fptr, int nkey, char *card, int *status); +int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status); +int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status); +int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status); +int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status); +int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status); +int ffmkyj(fitsfile *fptr, char *keyname, LONGLONG value, char *comm, int *status); +int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); +int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); + +/*--------------------- insert keywords ---------------*/ +int ffirec(fitsfile *fptr, int nkey, char *card, int *status); +int ffikey(fitsfile *fptr, char *card, int *status); +int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status); +int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status); +int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status); +int ffikyj(fitsfile *fptr, char *keyname, LONGLONG value, char *comm, int *status); +int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm, + int *status); +int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm, + int *status); +int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); +int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm, + int *status); +int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm, + int *status); + +/*--------------------- delete keywords ---------------*/ +int ffdkey(fitsfile *fptr, char *keyname, int *status); +int ffdrec(fitsfile *fptr, int keypos, int *status); + +/*--------------------- get HDU information -------------*/ +int ffghdn(fitsfile *fptr, int *chdunum); +int ffghdt(fitsfile *fptr, int *exttype, int *status); +int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend, + int *status); +int ffghadll(fitsfile *fptr, LONGLONG *headstart, LONGLONG *datastart, + LONGLONG *dataend, int *status); +int ffghof(fitsfile *fptr, OFF_T *headstart, OFF_T *datastart, OFF_T *dataend, + int *status); +int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis, + long *naxes, int *status); +int ffgiprll(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis, + LONGLONG *naxes, int *status); +int ffgidt(fitsfile *fptr, int *imgtype, int *status); +int ffgiet(fitsfile *fptr, int *imgtype, int *status); +int ffgidm(fitsfile *fptr, int *naxis, int *status); +int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status); +int ffgiszll(fitsfile *fptr, int nlen, LONGLONG *naxes, int *status); + +/*--------------------- HDU operations -------------*/ +int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status); +int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status); +int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers, + int *status); +int ffthdu(fitsfile *fptr, int *nhdu, int *status); +int ffcrhd(fitsfile *fptr, int *status); +int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); +int ffcrimll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); +int ffcrtb(fitsfile *fptr, int tbltype, LONGLONG naxis2, int tfields, char **ttype, + char **tform, char **tunit, char *extname, int *status); +int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); +int ffiimgll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); +int ffitab(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, int tfields, char **ttype, + long *tbcol, char **tform, char **tunit, char *extname, int *status); +int ffibin(fitsfile *fptr, LONGLONG naxis2, int tfields, char **ttype, char **tform, + char **tunit, char *extname, LONGLONG pcount, int *status); +int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); +int ffrsimll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); +int ffdhdu(fitsfile *fptr, int *hdutype, int *status); +int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status); +int ffcpfl(fitsfile *infptr, fitsfile *outfptr, int prev, int cur, int follow, + int *status); +int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status); +int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status); +int ffchfl(fitsfile *fptr, int *status); +int ffcdfl(fitsfile *fptr, int *status); +int ffwrhdu(fitsfile *fptr, FILE *outstream, int *status); + +int ffrdef(fitsfile *fptr, int *status); +int ffhdef(fitsfile *fptr, int morekeys, int *status); +int ffpthp(fitsfile *fptr, long theap, int *status); + +int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status); +void ffesum(unsigned long sum, int complm, char *ascii); +unsigned long ffdsum(char *ascii, int complm, unsigned long *sum); +int ffpcks(fitsfile *fptr, int *status); +int ffupck(fitsfile *fptr, int *status); +int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status); +int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum, + int *status); + +/*--------------------- define scaling or null values -------------*/ +int ffpscl(fitsfile *fptr, double scale, double zero, int *status); +int ffpnul(fitsfile *fptr, LONGLONG nulvalue, int *status); +int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status); +int fftnul(fitsfile *fptr, int colnum, LONGLONG nulvalue, int *status); +int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status); + +/*--------------------- get column information -------------*/ +int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum, + int *status); +int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname, + int *colnum, int *status); + +int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat, + long *width, int *status); +int ffgtclll(fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status); +int ffeqty(fitsfile *fptr, int colnum, int *typecode, long *repeat, + long *width, int *status); +int ffeqtyll(fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, + LONGLONG *width, int *status); +int ffgncl(fitsfile *fptr, int *ncols, int *status); +int ffgnrw(fitsfile *fptr, long *nrows, int *status); +int ffgnrwll(fitsfile *fptr, LONGLONG *nrows, int *status); +int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol, + char *tunit, char *tform, double *tscal, double *tzero, + char *tnull, char *tdisp, int *status); +int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit, + char *dtype, long *repeat, double *tscal, double *tzero, + long *tnull, char *tdisp, int *status); +int ffgbclll(fitsfile *fptr, int colnum, char *ttype, char *tunit, + char *dtype, LONGLONG *repeat, double *tscal, double *tzero, + LONGLONG *tnull, char *tdisp, int *status); +int ffgrsz(fitsfile *fptr, long *nrows, int *status); +int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status); + +/*--------------------- read primary array or image elements -------------*/ +int ffgpxv(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, + void *nulval, void *array, int *anynul, int *status); +int ffgpxvll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, + void *nulval, void *array, int *anynul, int *status); +int ffgpxf(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, + void *array, char *nullarray, int *anynul, int *status); +int ffgpxfll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, + void *array, char *nullarray, int *anynul, int *status); +int ffgsv(fitsfile *fptr, int datatype, long *blc, long *trc, long *inc, + void *nulval, void *array, int *anynul, int *status); + +int ffgpv(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, + void *nulval, void *array, int *anynul, int *status); +int ffgpf(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, + void *array, char *nullarray, int *anynul, int *status); +int ffgpvb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned + char nulval, unsigned char *array, int *anynul, int *status); +int ffgpvsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, signed + char nulval, signed char *array, int *anynul, int *status); +int ffgpvui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned short nulval, unsigned short *array, int *anynul, + int *status); +int ffgpvi(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + short nulval, short *array, int *anynul, int *status); +int ffgpvuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned long nulval, unsigned long *array, int *anynul, + int *status); +int ffgpvj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + long nulval, long *array, int *anynul, int *status); +int ffgpvjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + LONGLONG nulval, LONGLONG *array, int *anynul, int *status); +int ffgpvuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned int nulval, unsigned int *array, int *anynul, int *status); +int ffgpvk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + int nulval, int *array, int *anynul, int *status); +int ffgpve(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + float nulval, float *array, int *anynul, int *status); +int ffgpvd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + double nulval, double *array, int *anynul, int *status); + +int ffgpfb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned char *array, char *nularray, int *anynul, int *status); +int ffgpfsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + signed char *array, char *nularray, int *anynul, int *status); +int ffgpfui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned short *array, char *nularray, int *anynul, int *status); +int ffgpfi(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + short *array, char *nularray, int *anynul, int *status); +int ffgpfuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned long *array, char *nularray, int *anynul, int *status); +int ffgpfj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + long *array, char *nularray, int *anynul, int *status); +int ffgpfjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + LONGLONG *array, char *nularray, int *anynul, int *status); +int ffgpfuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned int *array, char *nularray, int *anynul, int *status); +int ffgpfk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + int *array, char *nularray, int *anynul, int *status); +int ffgpfe(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + float *array, char *nularray, int *anynul, int *status); +int ffgpfd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + double *array, char *nularray, int *anynul, int *status); + +int ffg2db(fitsfile *fptr, long group, unsigned char nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, unsigned char *array, + int *anynul, int *status); +int ffg2dsb(fitsfile *fptr, long group, signed char nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, signed char *array, + int *anynul, int *status); +int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, unsigned short *array, + int *anynul, int *status); +int ffg2di(fitsfile *fptr, long group, short nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, short *array, + int *anynul, int *status); +int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, unsigned long *array, + int *anynul, int *status); +int ffg2dj(fitsfile *fptr, long group, long nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, long *array, + int *anynul, int *status); +int ffg2djj(fitsfile *fptr, long group, LONGLONG nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, LONGLONG *array, + int *anynul, int *status); +int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, unsigned int *array, + int *anynul, int *status); +int ffg2dk(fitsfile *fptr, long group, int nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, int *array, + int *anynul, int *status); +int ffg2de(fitsfile *fptr, long group, float nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, float *array, + int *anynul, int *status); +int ffg2dd(fitsfile *fptr, long group, double nulval, LONGLONG ncols, + LONGLONG naxis1, LONGLONG naxis2, double *array, + int *anynul, int *status); + +int ffg3db(fitsfile *fptr, long group, unsigned char nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + unsigned char *array, int *anynul, int *status); +int ffg3dsb(fitsfile *fptr, long group, signed char nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + signed char *array, int *anynul, int *status); +int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + unsigned short *array, int *anynul, int *status); +int ffg3di(fitsfile *fptr, long group, short nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + short *array, int *anynul, int *status); +int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + unsigned long *array, int *anynul, int *status); +int ffg3dj(fitsfile *fptr, long group, long nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + long *array, int *anynul, int *status); +int ffg3djj(fitsfile *fptr, long group, LONGLONG nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + LONGLONG *array, int *anynul, int *status); +int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + unsigned int *array, int *anynul, int *status); +int ffg3dk(fitsfile *fptr, long group, int nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + int *array, int *anynul, int *status); +int ffg3de(fitsfile *fptr, long group, float nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + float *array, int *anynul, int *status); +int ffg3dd(fitsfile *fptr, long group, double nulval, LONGLONG ncols, + LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, + double *array, int *anynul, int *status); + +int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned char nulval, unsigned char *array, + int *anynul, int *status); +int ffgsvsb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, signed char nulval, signed char *array, + int *anynul, int *status); +int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned short nulval, unsigned short *array, + int *anynul, int *status); +int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, short nulval, short *array, int *anynul, int *status); +int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned long nulval, unsigned long *array, + int *anynul, int *status); +int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, long nulval, long *array, int *anynul, int *status); +int ffgsvjj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, LONGLONG nulval, LONGLONG *array, int *anynul, + int *status); +int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned int nulval, unsigned int *array, + int *anynul, int *status); +int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, int nulval, int *array, int *anynul, int *status); +int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, float nulval, float *array, int *anynul, int *status); +int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, double nulval, double *array, int *anynul, + int *status); + +int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned char *array, char *flagval, + int *anynul, int *status); +int ffgsfsb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, signed char *array, char *flagval, + int *anynul, int *status); +int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned short *array, char *flagval, int *anynul, + int *status); +int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, short *array, char *flagval, int *anynul, int *status); +int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned long *array, char *flagval, int *anynul, + int *status); +int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, long *array, char *flagval, int *anynul, int *status); +int ffgsfjj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, LONGLONG *array, char *flagval, int *anynul, + int *status); +int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, unsigned int *array, char *flagval, int *anynul, + int *status); +int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, int *array, char *flagval, int *anynul, int *status); +int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, float *array, char *flagval, int *anynul, int *status); +int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, + long *trc, long *inc, double *array, char *flagval, int *anynul, + int *status); + +int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem, + unsigned char *array, int *status); +int ffggpsb(fitsfile *fptr, long group, long firstelem, long nelem, + signed char *array, int *status); +int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem, + unsigned short *array, int *status); +int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem, + short *array, int *status); +int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem, + unsigned long *array, int *status); +int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem, + long *array, int *status); +int ffggpjj(fitsfile *fptr, long group, long firstelem, long nelem, + LONGLONG *array, int *status); +int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem, + unsigned int *array, int *status); +int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem, + int *array, int *status); +int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem, + float *array, int *status); +int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem, + double *array, int *status); + +/*--------------------- read column elements -------------*/ +int ffgcv( fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelem, void *nulval, void *array, int *anynul, + int *status); +int ffgcf( fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelem, void *array, char *nullarray, + int *anynul, int *status); +int ffgcvs(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char *nulval, char **array, int *anynul, int *status); +int ffgcl (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char *array, int *status); +int ffgcvl (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char nulval, char *array, int *anynul, int *status); +int ffgcvb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned char nulval, unsigned char *array, + int *anynul, int *status); +int ffgcvsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, signed char nulval, signed char *array, + int *anynul, int *status); +int ffgcvui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned short nulval, unsigned short *array, + int *anynul, int *status); +int ffgcvi(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, short nulval, short *array, int *anynul, int *status); +int ffgcvuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned long nulval, unsigned long *array, int *anynul, + int *status); +int ffgcvj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long nulval, long *array, int *anynul, int *status); +int ffgcvjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, LONGLONG nulval, LONGLONG *array, int *anynul, + int *status); +int ffgcvuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned int nulval, unsigned int *array, int *anynul, + int *status); +int ffgcvk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int nulval, int *array, int *anynul, int *status); +int ffgcve(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float nulval, float *array, int *anynul, int *status); +int ffgcvd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double nulval, double *array, int *anynul, int *status); +int ffgcvc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float nulval, float *array, int *anynul, int *status); +int ffgcvm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double nulval, double *array, int *anynul, int *status); + +int ffgcx(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstbit, + LONGLONG nbits, char *larray, int *status); +int ffgcxui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, + long firstbit, int nbits, unsigned short *array, int *status); +int ffgcxuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, + long firstbit, int nbits, unsigned int *array, int *status); + +int ffgcfs(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char **array, char *nularray, int *anynul, int *status); +int ffgcfl(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char *array, char *nularray, int *anynul, int *status); +int ffgcfb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned char *array, char *nularray, int *anynul, int *status); +int ffgcfsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, signed char *array, char *nularray, int *anynul, int *status); +int ffgcfui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned short *array, char *nularray, int *anynul, + int *status); +int ffgcfi(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, short *array, char *nularray, int *anynul, int *status); +int ffgcfuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned long *array, char *nularray, int *anynul, + int *status); +int ffgcfj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long *array, char *nularray, int *anynul, int *status); +int ffgcfjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, LONGLONG *array, char *nularray, int *anynul, int *status); +int ffgcfuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned int *array, char *nularray, int *anynul, + int *status); +int ffgcfk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int *array, char *nularray, int *anynul, int *status); +int ffgcfe(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float *array, char *nularray, int *anynul, int *status); +int ffgcfd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double *array, char *nularray, int *anynul, int *status); +int ffgcfc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float *array, char *nularray, int *anynul, int *status); +int ffgcfm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double *array, char *nularray, int *anynul, int *status); + +int ffgdes(fitsfile *fptr, int colnum, LONGLONG rownum, long *length, + long *heapaddr, int *status); +int ffgdesll(fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG *length, + LONGLONG *heapaddr, int *status); +int ffgdess(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, long *length, + long *heapaddr, int *status); +int ffgdessll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, LONGLONG *length, + LONGLONG *heapaddr, int *status); +int ffpdes(fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG length, + LONGLONG heapaddr, int *status); +int fftheap(fitsfile *fptr, LONGLONG *heapsize, LONGLONG *unused, LONGLONG *overlap, + int *valid, int *status); +int ffcmph(fitsfile *fptr, int *status); + +int ffgtbb(fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + unsigned char *values, int *status); + +int ffgextn(fitsfile *fptr, LONGLONG offset, LONGLONG nelem, void *array, int *status); +int ffpextn(fitsfile *fptr, LONGLONG offset, LONGLONG nelem, void *array, int *status); + +/*------------ write primary array or image elements -------------*/ +int ffppx(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, + void *array, int *status); +int ffppxll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, + void *array, int *status); +int ffppxn(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, + void *array, void *nulval, int *status); +int ffppxnll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, + void *array, void *nulval, int *status); +int ffppr(fitsfile *fptr, int datatype, LONGLONG firstelem, + LONGLONG nelem, void *array, int *status); +int ffpprb(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, unsigned char *array, int *status); +int ffpprsb(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, signed char *array, int *status); +int ffpprui(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, unsigned short *array, int *status); +int ffppri(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, short *array, int *status); +int ffppruj(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, unsigned long *array, int *status); +int ffpprj(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, long *array, int *status); +int ffppruk(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, unsigned int *array, int *status); +int ffpprk(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, int *array, int *status); +int ffppre(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, float *array, int *status); +int ffpprd(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, double *array, int *status); +int ffpprjj(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, LONGLONG *array, int *status); + +int ffppru(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + int *status); +int ffpprn(fitsfile *fptr, LONGLONG firstelem, LONGLONG nelem, int *status); + +int ffppn(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, + void *array, void *nulval, int *status); +int ffppnb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned char *array, unsigned char nulval, int *status); +int ffppnsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + signed char *array, signed char nulval, int *status); +int ffppnui(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, unsigned short *array, unsigned short nulval, + int *status); +int ffppni(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, short *array, short nulval, int *status); +int ffppnj(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, long *array, long nulval, int *status); +int ffppnuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned long *array, unsigned long nulval, int *status); +int ffppnuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, + unsigned int *array, unsigned int nulval, int *status); +int ffppnk(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, int *array, int nulval, int *status); +int ffppne(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, float *array, float nulval, int *status); +int ffppnd(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, double *array, double nulval, int *status); +int ffppnjj(fitsfile *fptr, long group, LONGLONG firstelem, + LONGLONG nelem, LONGLONG *array, LONGLONG nulval, int *status); + +int ffp2db(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, unsigned char *array, int *status); +int ffp2dsb(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, signed char *array, int *status); +int ffp2dui(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, unsigned short *array, int *status); +int ffp2di(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, short *array, int *status); +int ffp2duj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, unsigned long *array, int *status); +int ffp2dj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, long *array, int *status); +int ffp2duk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, unsigned int *array, int *status); +int ffp2dk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, int *array, int *status); +int ffp2de(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, float *array, int *status); +int ffp2dd(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, double *array, int *status); +int ffp2djj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG *array, int *status); + +int ffp3db(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, unsigned char *array, int *status); +int ffp3dsb(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, signed char *array, int *status); +int ffp3dui(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, unsigned short *array, int *status); +int ffp3di(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, short *array, int *status); +int ffp3duj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, unsigned long *array, int *status); +int ffp3dj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, long *array, int *status); +int ffp3duk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, unsigned int *array, int *status); +int ffp3dk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, int *array, int *status); +int ffp3de(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, float *array, int *status); +int ffp3dd(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, double *array, int *status); +int ffp3djj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, + LONGLONG naxis2, LONGLONG naxis3, LONGLONG *array, int *status); + +int ffpss(fitsfile *fptr, int datatype, + long *fpixel, long *lpixel, void *array, int *status); +int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, unsigned char *array, int *status); +int ffpsssb(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, signed char *array, int *status); +int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, unsigned short *array, int *status); +int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, short *array, int *status); +int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, unsigned long *array, int *status); +int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, long *array, int *status); +int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, unsigned int *array, int *status); +int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, int *array, int *status); +int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, float *array, int *status); +int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, double *array, int *status); +int ffpssjj(fitsfile *fptr, long group, long naxis, long *naxes, + long *fpixel, long *lpixel, LONGLONG *array, int *status); + +int ffpgpb(fitsfile *fptr, long group, long firstelem, + long nelem, unsigned char *array, int *status); +int ffpgpsb(fitsfile *fptr, long group, long firstelem, + long nelem, signed char *array, int *status); +int ffpgpui(fitsfile *fptr, long group, long firstelem, + long nelem, unsigned short *array, int *status); +int ffpgpi(fitsfile *fptr, long group, long firstelem, + long nelem, short *array, int *status); +int ffpgpuj(fitsfile *fptr, long group, long firstelem, + long nelem, unsigned long *array, int *status); +int ffpgpj(fitsfile *fptr, long group, long firstelem, + long nelem, long *array, int *status); +int ffpgpuk(fitsfile *fptr, long group, long firstelem, + long nelem, unsigned int *array, int *status); +int ffpgpk(fitsfile *fptr, long group, long firstelem, + long nelem, int *array, int *status); +int ffpgpe(fitsfile *fptr, long group, long firstelem, + long nelem, float *array, int *status); +int ffpgpd(fitsfile *fptr, long group, long firstelem, + long nelem, double *array, int *status); +int ffpgpjj(fitsfile *fptr, long group, long firstelem, + long nelem, LONGLONG *array, int *status); + +/*--------------------- iterator functions -------------*/ +int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname, + int datatype, int iotype); +int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum, + int datatype, int iotype); +int fits_iter_set_file(iteratorCol *col, fitsfile *fptr); +int fits_iter_set_colname(iteratorCol *col, char *colname); +int fits_iter_set_colnum(iteratorCol *col, int colnum); +int fits_iter_set_datatype(iteratorCol *col, int datatype); +int fits_iter_set_iotype(iteratorCol *col, int iotype); + +fitsfile * fits_iter_get_file(iteratorCol *col); +char * fits_iter_get_colname(iteratorCol *col); +int fits_iter_get_colnum(iteratorCol *col); +int fits_iter_get_datatype(iteratorCol *col); +int fits_iter_get_iotype(iteratorCol *col); +void * fits_iter_get_array(iteratorCol *col); +long fits_iter_get_tlmin(iteratorCol *col); +long fits_iter_get_tlmax(iteratorCol *col); +long fits_iter_get_repeat(iteratorCol *col); +char * fits_iter_get_tunit(iteratorCol *col); +char * fits_iter_get_tdisp(iteratorCol *col); + +int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop, + int (*workFn)( long totaln, long offset, long firstn, + long nvalues, int narrays, iteratorCol *data, void *userPointer), + void *userPointer, int *status); + +/*--------------------- write column elements -------------*/ +int ffpcl(fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, + LONGLONG firstelem, LONGLONG nelem, void *array, int *status); +int ffpcls(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char **array, int *status); +int ffpcll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char *array, int *status); +int ffpclb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned char *array, int *status); +int ffpclsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, signed char *array, int *status); +int ffpclui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned short *array, int *status); +int ffpcli(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, short *array, int *status); +int ffpcluj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned long *array, int *status); +int ffpclj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long *array, int *status); +int ffpcluk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned int *array, int *status); +int ffpclk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int *array, int *status); +int ffpcle(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float *array, int *status); +int ffpcld(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double *array, int *status); +int ffpclc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float *array, int *status); +int ffpclm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double *array, int *status); +int ffpclu(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int *status); +int ffprwu(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); +int ffpcljj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, LONGLONG *array, int *status); +int ffpclx(fitsfile *fptr, int colnum, LONGLONG frow, long fbit, long nbit, + char *larray, int *status); + +int ffpcn(fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, void *array, void *nulval, int *status); +int ffpcns( fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char **array, char *nulvalue, int *status); +int ffpcnl( fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, char *array, char nulvalue, int *status); +int ffpcnb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned char *array, unsigned char nulvalue, + int *status); +int ffpcnsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, signed char *array, signed char nulvalue, + int *status); +int ffpcnui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned short *array, unsigned short nulvalue, + int *status); +int ffpcni(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, short *array, short nulvalue, int *status); +int ffpcnuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned long *array, unsigned long nulvalue, + int *status); +int ffpcnj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long *array, long nulvalue, int *status); +int ffpcnuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, unsigned int *array, unsigned int nulvalue, + int *status); +int ffpcnk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int *array, int nulvalue, int *status); +int ffpcne(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, float *array, float nulvalue, int *status); +int ffpcnd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, double *array, double nulvalue, int *status); +int ffpcnjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, LONGLONG *array, LONGLONG nulvalue, int *status); +int ffptbb(fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, + unsigned char *values, int *status); + +int ffirow(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); +int ffdrow(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); +int ffdrrg(fitsfile *fptr, char *ranges, int *status); +int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status); +int ffdrwsll(fitsfile *fptr, LONGLONG *rownum, LONGLONG nrows, int *status); +int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status); +int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype, + char **tform, int *status); +int ffmvec(fitsfile *fptr, int colnum, LONGLONG newveclen, int *status); +int ffdcol(fitsfile *fptr, int numcol, int *status); +int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol, + int create_col, int *status); + +/*--------------------- WCS Utilities ------------------*/ +int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix, + double *yrpix, double *xinc, double *yinc, double *rot, + char *type, int *status); +int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval, + double *yrval, double *xrpix, double *yrpix, double *xinc, + double *yinc, double *rot, char *type, int *status); +int ffwldp(double xpix, double ypix, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *type, double *xpos, double *ypos, int *status); +int ffxypx(double xpos, double ypos, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, + double rot, char *type, double *xpix, double *ypix, int *status); + +/* WCS support routines (provide interface to Doug Mink's WCS library */ +int ffgiwcs(fitsfile *fptr, char **header, int *status); +int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status); + +/*--------------------- lexical parsing routines ------------------*/ +int fftexp( fitsfile *fptr, char *expr, int maxdim, + int *datatype, long *nelem, int *naxis, + long *naxes, int *status ); + +int fffrow( fitsfile *infptr, char *expr, + long firstrow, long nrows, + long *n_good_rows, char *row_status, int *status); + +int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status); + +int fffrwc( fitsfile *fptr, char *expr, char *timeCol, + char *parCol, char *valCol, long ntimes, + double *times, char *time_status, int *status ); + +int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr, + int *status); + +int ffcrow( fitsfile *fptr, int datatype, char *expr, + long firstrow, long nelements, void *nulval, + void *array, int *anynul, int *status ); + +int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr, + char *parName, char *parInfo, int nRngs, + long *start, long *end, int *status ); + +int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr, + char *parName, char *parInfo, int *status ); + + /* ffhist is not really intended as a user-callable routine */ + /* but it may be useful for some specialized applications */ + +int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis, + char colname[4][FLEN_VALUE], + double *minin, double *maxin, double *binsizein, + char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], + char binname[4][FLEN_VALUE], + double weightin, char wtcol[FLEN_VALUE], + int recip, char *rowselect, int *status); + +int fits_select_image_section(fitsfile **fptr, char *outfile, + char *imagesection, int *status); +int fits_copy_image_section(fitsfile *infptr, fitsfile *outfile, + char *imagesection, int *status); + +typedef struct +{ + /* input(s) */ + int count; + char ** path; + char ** tag; + fitsfile ** ifptr; + + char * expression; + + /* output control */ + int bitpix; + long blank; + fitsfile * ofptr; + char keyword[FLEN_KEYWORD]; + char comment[FLEN_COMMENT]; +} PixelFilter; + + +int fits_pixel_filter (PixelFilter * filter, int * status); + + +/*--------------------- grouping routines ------------------*/ + +int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status); +int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status); +int ffgtch(fitsfile *gfptr, int grouptype, int *status); +int ffgtrm(fitsfile *gfptr, int rmopt, int *status); +int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status); +int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status); +int ffgtcm(fitsfile *gfptr, int cmopt, int *status); +int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status); +int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status); +int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status); +int ffgtnm(fitsfile *gfptr, long *nmembers, int *status); +int ffgmng(fitsfile *mfptr, long *nmembers, int *status); +int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status); +int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt, + int *status); +int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt, + int *status); +int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status); + +/*--------------------- group template parser routines ------------------*/ + +int fits_execute_template(fitsfile *ff, char *ngp_template, int *status); + +/*--------------------- image compression routines ------------------*/ + +int fits_set_compression_type(fitsfile *fptr, int ctype, int *status); +int fits_set_tile_dim(fitsfile *fptr, int ndim, long *dims, int *status); +int fits_set_noise_bits(fitsfile *fptr, int noisebits, int *status); +int fits_set_hcomp_scale(fitsfile *fptr, int scale, int *status); +int fits_set_hcomp_smooth(fitsfile *fptr, int smooth, int *status); + +int fits_get_compression_type(fitsfile *fptr, int *ctype, int *status); +int fits_get_tile_dim(fitsfile *fptr, int ndim, long *dims, int *status); +int fits_get_noise_bits(fitsfile *fptr, int *noisebits, int *status); +int fits_get_hcomp_scale(fitsfile *fptr, int *scale, int *status); +int fits_get_hcomp_smooth(fitsfile *fptr, int *smooth, int *status); + +int fits_img_compress(fitsfile *infptr, fitsfile *outfptr, int *status); +int fits_compress_img(fitsfile *infptr, fitsfile *outfptr, int compress_type, + long *tilesize, int parm1, int parm2, int *status); +int fits_is_compressed_image(fitsfile *fptr, int *status); +int fits_decompress_img (fitsfile *infptr, fitsfile *outfptr, int *status); +int fits_img_decompress (fitsfile *infptr, fitsfile *outfptr, int *status); + +/* H-compress routines */ +int fits_hcompress(int *a, int nx, int ny, int scale, char *output, + long *nbytes, int *status); +int fits_hcompress64(LONGLONG *a, int nx, int ny, int scale, char *output, + long *nbytes, int *status); +int fits_hdecompress(unsigned char *input, int smooth, int *a, int *nx, + int *ny, int *scale, int *status); +int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *nx, + int *ny, int *scale, int *status); +int fits_rms_float (float fdata[], int nx, float in_null_value, + double *rms, int *status); + +int fits_rms_short (short fdata[], int nx, short in_null_value, + double *rms, int *status); + + +/* The following exclusion if __CINT__ is defined is needed for ROOT */ +#ifndef __CINT__ +#ifdef __cplusplus +} +#endif +#endif + +#endif + diff --git a/software/cfitsio3040/fitsio.ps b/software/cfitsio3040/fitsio.ps new file mode 100644 index 0000000000000000000000000000000000000000..3022d2d973297fdfea70b6370f214a6ebd3fa8bb GIT binary patch literal 689413 zcmeF)>u)62l_mP`@mJ*F!hj8ol<~@p3;_dlL_Yd@ZoAr}(zw+l=mU$)s^XYM(j-fz zYC`|}{jJC(iz>;s{OBj_ZWZ$xk8}3fd+oK?KKZl%_Uq@L3};s__MgX4>RH#<-r8K9zJ0U5yxUz}-Z{qlSL2u7TmS0wLH?_SyTVK7&fo_YRZGQ91UqAn+{fk`JXS1Kbd-v|so5S7g-|s&? zy?XPD<7e`flgqPzIKT9{X*gz|JS&ekcl^w+Pi{`$?CGjQ3@w5L{%zbZjetI`+%5rAl?`CKFmpRz<;){H5{_Ngs-}!Go-oH4%Jj+ME zdp3W5?>MhL`11aF@$9>CKHQ(Zz4rHu&+qSUPA+dRPVV;JKEJ)VoxMD{xZTg5&A+)l z|Cjx&s%Bk1d-L|fE3cbvuo`<$mNO!n8OSC^+JcV5fMKHuM7UA(UBeIov154^8(r-BkH-XA>xVxX; zaJKJWUfrBrTpT`FU%l-cB zzPP)Y9v^YQKZ#o7Ax z$<2NKnV#)$jLr7)^eVn&maBU<<6vgP{ru(C)yxRKbk^_cVmg>bdi{QO`i)c1F0M|_ z+=6R0F!SU6d}T0hUmox5J`XEbdAQmP((GArykj3cdwF}$-twt051;vJ`ffS%CnlSL zd^Y>=h3)+ikQKD<@r zy>IWUdNq6c)#l;-{LM$+fA8z{tzS=flqc_|_3JeT za(Z(5dVjY6=KOS@H+(9~<->CL##JHyv*^JCFZ4j8ESC zk^8+brdJJ|ztgeuu`g#g@4mbL`=clN?);4~_2%UEx3io5t-!oDlz)GJ@0`XigZ=8d z@aQL&e=PiBe){^=z1i{f zaPaoS0H0rqaNh{`*2m-HAy<$C_+y2hedDl~{7w#Nrrm}!p2uP@ZeJgdTpyNQu4eF| z{qLq_ATA8Eda-zTUN743?u&TMxYoSE;pL8|zgIVpV{?cjiKe;#T)@porz$=^RlWM? zWXyhgx z=ELXB5b`O;ogk48rB*hX9dTe?GnQJRZ1;cZxk7-RZ%f zvALs(AJ&HtX3aWQk<OeDeD0>bJAs zUS7Ssye}S}JKFsDFK3f8dp0{jBt}qLsNd}GuI9g)9e~33VS~%9rgb|^*knQk<>7@1 zZe(qI+V{Z_^Z)f5^YQs_jtk=u(8QG(#$+7N=6e@fxQL?{nLS>#H=bVf!_$nw?dz*| z*W6Dq2Q+bWcV9eyZF>IniyvN?29M)?ikZHgKLJx;78Uf9!JdQ19Gsw;cwH}+he*$R zh)WX!FiKTizQ%el1T7hkjBqy0V{=J@m?#{JP-2Xi^#NUPz|YadI+9jE-R3ExYwY{*W=e&!Bw>Ud5}2==I%?9_aA( z1Fp|OKR!_LAq;*v($OuCtp9j%mwWaKE=`FIkMiaTgnkOF&p&+Numoq*jNV)TVs}?2 z)x89@J-p!E1Bg4mFnRLXi+rc8uH6W zvySu8c$2*R@Z|LVlXmv29P$2>W_qx{|D>KCyi6XIw_e?s{z7c8IrqG9E;Qut|Ghta z<+t~TW4!ah52wGlzn(exJ0E#-qdAw;mn7bm!6G zNZ&fe^Wwuv-n)eQ0NmgNUw?5W*Lcn$2h=59*?YnB2h$h>*Na2CeoTXZkQKk|UM$a= zy8Lv1d0PBz_QmTf*l4zuYv26$*=Bz_u@j&2-7hZAPiJS|J-;k|=97AtLfi<`uFxCoWk({XKycGPhY+{{+lD*RGokF{hNIK zCf~lvm-E%bpM320V)b~O+l%S_+p6^XEp}u2lW*VN=Igh&hxd<{dV70zdN|bW`ID=; z_3ZG~^Xl;3^Hsike)#h54oCXkdH#NLcb9KY+`_}CJ`U1X#r*G2uphJeX0p-w7q9nB zb^Z@0Z(f}F`{ns;{%ij|KYx`E{qO7B^9woq{MWDZ#;t$;@y-6#Nil!B|fM zO%L+u>% zeMq=se#uqk$kVXj?%$jrA0F=R4F2%Z-ys8XqcR7S%HhR_XKu=2hS_|a&DZ96Hs8+X zyV?BjXY>DeHvi>p{y%5)|Idui=D(WFpBYFKJDdNn+5B_UKAV4G)@P8*{GV7uG5_b; z{QqRSPELQjH@6v)hw(i;JHB-sq0{pl#NNvb`CE+Pu~LV1h|y_%NH+Ro}B)bfXnSg!nZK~;ZFkp-CaWa-CaM0^@nr*)xx^Pk+3dw+}vEf zd&})k4;})GczP>B12#l@cx`)BiS&Tr3O032~z50`cfHsZe^ z@{>aUF`|7O`o;60fS(fjCqVI|p}+X)q2J~Hp3omiRXhZJ$%(>_koYv-gGE0v-ka$^ z5btL{7Vlq({YOaiG}ssOliSnt^FzcJn~}CRx2K5A<9Pnma1RCkzHo1bzaQ>%{{0bm z1jkL!rx`k4%?~2}_f6!Fd+q-quIDj${F_|QaRL2=s9*en%;1NE`+J?ragqKpr!ry4 zKbTPbD?o$qTg(US_`}=#_?3T?x%&8|kCyVo2YX8sT7eF_oYoL?quJ*25g%%nxKFje%s^Xm%<)kA)Z zwU&{ganBFw)5#l2W?mE%CBDbwOn;7vu(a=D|Mcot`-d}Ft<&>|BOjk(VUKU5 zc6;O5)%E`J#oLPuZ2$c5cZz@K-<;gOe{+3zb%z5=K=cB7G{OI7pQKaSPO;*{vn2O< z9v?C#&G5w`ejZb3)B)CEe|S?)f*-hg_welY{LT497o4CNuD(4Uz{4E&c&3MEPtWw` zts4Ksi4IR5&hvN*@hVX37$o!X0ciXP0-HYi;wqCeJ-ocSxqH1gTgRi^lAcV@B{qj^ zKHlB|#l0|)N!%ZvJv|eg^!ECA7>^IY?%{(UpYk2NcRb8=%ER*vfeS)JoLn%FoAWp3 z2Cl^<*qEnK^dxJ^5pXT}VmjJ?D_?2HC9~E;t80Lchg=)W?d!}lg+b#gO7=*bjf2d3z$ zS$tEd)ji_EcUe@g8NyTqnIC0Wp|KucyF7UjYA?fr5o9RSkldnoo{m(WAC}hb?~XQ% zvzb=$hZi0O_3Y#orjVnW{!W(*vY$A7X7%(!HJ=lkoEM5|ug>M**C+95)2-zG{}v^%zHe>{ADLxz9Y#{bKY&rd?CCnx*1ZC?JhDsXSqub@+Z!e6~P z4`6+B9>DtMJb?AhRIGY4Rj}TitJfWY>%(O{1+G6KG5rZ8tCNfC*CNo1so?eMPz5_w zYUleyovTt)nBJZK0jW|NJ6Fa~n6P%0y%dr~E8^N&}G`PG4EJD$*oa}wvhKKGBK_;)%?UV5F^9wQY1^O^+o32;nU_R8@y zQ}jN5=;=$}|5RiwhqyN#I8TpZ{{fAC^z;A{Qp>u!IJ>=j9}-Ya>*2{na6LT9?Wl2m zc$!+*lV_mZhi7VE4^LF_QUiN<3elw&_Tg!Wu@BF{fr)E7R^Q^24O*&$kLccWvKB)q z=7Wo8=P5i4e^rX?C0xk{=s=(u=c85yFmEs3-n`h$A>5LOCoc$rpuF4DoAYZQXB~e+ z@e51BCLGkbvZx=hVLw)FeYaQaqGvhDpnL-fc<_y z^JAm)K!E*8p2vLs!1J)7Khg8R3Qs)`6N(Z1acJ6`CE|Yxj2g)^K?Sm*#8_|q{DZ+6oILe?y2M8(s@zw9OmON1>$`&Sl<%4WLy$Vy~ zLRnCe&VRKR0Z(tIc9N+L=fl-Mij1b7n_2F2(y&g+?EdCKCSM#?nGw&)J@YZ0GLsze zyZf&mgn0KkFC|@iBo4CAT-d|er&o%+0<%7R<*1=Oe&+E?kIg94bz(K9Z`?nO^mK*f zBKRW2sE{5iDgx{R}c4}-8x2NWd^jmzLo{Lu9-4Us8eUk8t^Ym>emwD` zV0QY%=lcmH?x)YByWqJ&y?k{$yP@_!{q6mSrjdi}Fj;_W`DzkR=BhLTeE8BNtegbC zGptgK@WEStIL@T5JWR}^viSk1-hVwEA>(?F^MpKz)NX$JFo&eV51)KAvD`&8m_J@( z&TXYN?$GP@*w2@jKdC;g9^RUHT&5Xr>hMD|ZPW*~<@Nn?_CJkh-OS4FvqkgSqN7S% zKeqe*eEo}jsGALM0IJiI%Ne75ttA0l2GKmfIz4AOpUwsi8lMM`-KK9!yTJbJ(?Sc` zhvjkT0s7_T%PUP1)5{s#V|!58yAWbOpDyzkM1dz~SC`o4-241lsNDVR=YN&U`uN~G z8UHi(@9@(g{^0!+{OzE&|^zijx(>NYI)ZvAEZ1Pw} zKckoDM^ExqI?oR6U5}5x{^%@^_V=jA);BYWuxF26W3u4~!;e({yBY6OWJ1di&>&L! z?@wedWz^+G(pt|xsTU4hwyRmUD8Kvu2OmBDqFi;&YBAl($4=+?T%QET6(?V8`pt5= zTQ<$OYL`RbjmuU3Y}>`qY|3FM7j@q?)w=J8Zq=^W<94+e+rDqcdb=Gr+oBn(dee6G z*sXVqcDbmwySl1Yi>g`<%YGQEvR`gD?Ko`e-LhRSo5i-Q`f=G--Fn@1W3g!J-Dx2w&rFW2L4*sj}dxf>eacX8`g)h*Wjuv=8kZfg*$eqC=in|e8J z)(+Y?{c7xY?WSxt3(q#Yb=fzipPS>RDD@37h}1u7sF^kn{Bb&uB(-4AIn9xs(oP`OIKevo4#$Tt{l65 zp{szZf7kCe^!xJb;AzI#im)U)}320{MB;RH`}gjTf^$`+j4Bn)wo_RH|wo|W->-~)o$w2X!M)K zs;t`0a#*cabz>IjoCmW$?0QDh4Xmc!EQWd<>(M#-da-UbIh1A7FZy-6+&1fNHPpLu zJFMGrSD3P~sTbRJ*)|Kdy)4J|qTRUo^=eo%M6;Gl8`i6?bl>YPi^j5P>ULa}tAcTu zmbR|kPqVEo8>?es!B&g471h?|a<$rS`gOIbyH#Iq*UQzo>DKz07duy7RGVRJ7+KGh zcD}q_tli6E;Y{6jGjz?e+H}l&>-J6OxY}BUuCX3E1H9c9rSDj4>t)&XrZ1P>th;qz zE$goDmad^=s0_d|8OEXaS=PVYbp5Vs`m!(j#V|DeSnkTEDw(4Z-|XD90bDGX{jRI~ z(kSn0c4)pA^7v*jo7)!nF>P6q|Mr&wYFFjjsx9zaq@ig7C zF|zG$v1=BM(Oq`C?WQi8?a(=_mp*O1Qep@c5MYC$g&CpiXv1W3X#6QK`?5e&Ptkx~3 z)LIMm#`3C`O9MAH<#N5~+0sx}+iEv(_wCrb&CRgpw>+!bZM${_HB;{D6~Dml+D+B0 zo0dDMR+d>ey6Dx&=PWy48W>IH+%zxiU1xN13k<(mvZJkSuXDf4)1u5q{PEr@@W8io2IHo(#unqwP%SOG zon=3aoU_w(MQ$Vm$=Pvx*TT?h=W9DdyQlZ)C>2TQEB zlGX(i{EPngw*yEn{-P1|<^KQ&c#@JGI+21{XAgZydGfFgiH$iP_D;#m54qN~LrL{v zFO{d6Ry7;mzS5$krSG$*{cK@Jlz-PutNb`a`8Uh6GD;txeD|m4StGjtrum9&vuomc$dZC*V68gglR#^&df4u|?oPZbrqP}dm@LIWnP0DfAKs;3e zs`JM@uP|H>8`ycV+6@EXQ8i-n5*l1qyG}k+jS|0Mg!dLw4ERf{DxzuGKzJ}RD< z+XNQhu11HEYr(eyL?@K*x?~uD+c-)s)JBG~C0Yum=+w}%GEq7fzZnv;tUv9Py$TP@_);q&i zjMYl2AyF8%u1GQ{M}sG}gUk$im9|Vm+>Q`X@x)j!N3biyzO0k4-dIlyLcUfcaU~Ro>)(fC}*=&mC zYH0hitIYVaN`@dQ(`d~sB>cm2T$g~Xp^e0D3zg(-%QcQwqhTvfZ} zxZFvmWUZ1TsSOZ>8;}S=TitE}(@EMahEkSgYGtYQvW8KbZ5ay+Gq4D7TS#|TLpT9w z9abM)@&+7rH6wNcF(LCZxywzl>wOg7VFBx1xv`ccRgz`P0LW=~a-&Ua#Dl+KTpwZt zZ8cPZTiZ;dY^_HHv`h!Sbm|>@*j28PHA;<=9!u(hJ8+sEN<|nG8iFm?3~6*B{Wd8V z#v`a0(%w2(+n_zhzCmeJ@`HtX;uM;<>AbH8ZyW!@g`+h4D0O%LzO))@~&OTh&rK8BGoDFS=c6hA=E9 z(G-`kqVy9V(3FiaF91PH2~m=C*y80QJjX}KuAGHGX<%#qsX`yQu66H>J9gJp!v<4Q z$kCUwSo3Zyy1I1cj?>vnbayOKl8JATdi6={7Iljm8anCp63EWUi)}qro$OH-5vO52 zg1hjr3}iHq-AXRB=B1KjCj}js9k1TRP-_&n#z>pCS+aAwp*`^|FGOt*oN(bN4JuOn!~dqhe{$U z9oul=o>$wYEY-QIRlBl!%;iF2w&d5wl?7?+*4Bi};f^^Wlhtq6b(e`;NtBUA+X6;+ z@3M(F^(`kVx!~dBH+yH6iPodcpkc*$B?c*tmRt1b4sMVsH>DJ6=y^CN>$;B5k@F?> zZH_to~9s$T~cL@xZTrIU~*P{WgErwkwQ@2VjEOTw5 z%lNDnhSI3G;vFv`DVM1m8RUW>DyQC{2;@@ehNfK>@^AhqWI*3ZoaI%u7+wiR@$QJy zMT_(jN!{~CGL>{psN+Hzy!BKp2N^4_$a36l;w+?Sp6&2uOM_nTB*yK4_h4VrO%6(A z;k32}NxWYaD@LEtzOEB2>r6VT!M}?#DZMF?{#qbw{ENsc-`pmR>@ie5iyv`DA)y4F zB~~nC+PbZCuX1w4lyPc@)qp@kL}D{IY(ON@vmUskVbvmFSEHaY4xKS~Vda{4z_D?> ze3BTC9zwz3fpV%+18G1qGpt4siw^_7oe}jOO zy^DN?s&`K#i)nF2^7%?Tz@{6)7I(SmyN$K8;1QEpH;qIe8^KYSRE`nx6UWBgEV=!v z;QsKQ9K8r6Igf2%K-;**6=2p`l*?M!-r@NwCes5O$WiNIBEr{}b7NumeTXqJDwB&u zv>0m0#qA+&jK>0*n&A~O5F3t#s|LF2W@R}eFmRbX5JW=Lp$-K+ zj9md2^$6rGe1RhXEw(ipa|1>RMkPkF9$PCKO2F}TTi55FczwQ~JuQXzkP$79VKw^r zSepBwS2UiG2(Dq6Im=FnF!lA;4D#}8E2@EZR`^pWLxDih;THH%t9{^c-7uKK;0>k% zL}O_qoM4RgR)mJ6FoI!i`=SJFAuKD+D&xdfO}y!vZMb+OiBDmW+7-eCJmU)i2=Uz5 zxJ_`HCHerW5{SUfcN;nOS`b)6scfJ(B=LM>DcqsoD&f$GVfCHXZEY6-hGE9)E)dsY zwlHX15+B&c8vE@EdS6>c13J~r7$FeFAe1fA2t8Z?Xu^)5x*Yz4nUxP*B zTnPcQ7~GJ82kTb*Fa(I(dbwU!#fU~rl(4!HMFT|cHd$RFF4n(dr(21@L<){j7%02t z=wQmV0SSzlU7aDjKp>C&!v1r1%S+}gy zVg~O*cZaPsm({iutWtB5p0GI(2Y)P#L0mi03&>_qOoXAO1Om{N&>hQF52#pR)mB?E zvPK$)Kty|ky4<({;V_0RiZt#)+~y*9*@R+V6hmEY7+%>+SJZlTYo=pOIMZ6rv|TQE zK|w?%#AJ0!KY%o#YVyjhpqCs8vU3s8vg*qKBe5{K&CV@gQ4y};N4YXcm{ovtTV)V+ zA43R|S|1?vvah?cR|;xZwv0`p7Bthy8$qB(^y2?ujm@|=g#f|22ZVt2juD65UBY4t zT43Z#D#p{|nqjj#%Q?)j;uGJLpo}BNrJ7P>#Z(d7az?!H0vhF<8IlTG&||sa9m~Sn zz;E(&Wl~X}SMy=s<+yZLf>f_!DBD{v7lSI8<;QIq%~HL_AS;K6G?{2VYLQBZyhdG! zPg?cdL2YPTV6zVI2_H&HC6#0A@>L6P>8rKHX&p+oSgE2UKGyuZU{M*zp4a8X zmNEpGC!@OIv>CQ*O>xKV8=2&WJ8^;6SSXAtPM8GinZw&!@e9r(SvdEYuolW%PHf?B zq{`|-o$KVfwq=n>&bq|0S`4V+i9jWTRe4i6bQEw>RNn4VPBi7bEEG1R66EgG z=49@pTBZyG=&_zm;|>g2TbWY6_(0>W3dli7)VVX`*DH+&UkyrD%n^=EMX6Uy^{Jwk zyZIVuQ46k|E`yTFa)ohiJCmuvBfhh5IpmH5bV-sUbv3D5KNdKNq&1+Kkjgz-uhJJW z1dYFuT$ncL)E4&-;tT?a>>cA`XfQ1shNP|yq$pu+JWT6xupsEHbpL#OBBH6HjUX96E)=kF?z*n9tDk;D& zQphy-PO9Jo>X@-qG`mn_0oB0Qf_))x3bCB;RkDX%0z@;}jVc!Ksd_w0M;XNkuK|UX zMUHnHBLGPvI*e5I(z5_uTel~E4)Ni|bSi$!2}vbJ>8p+Vvbq+?c%!4ru)0RzudE>z%) z(HOWIewYWB*kOSfko=xhM$R{+evaD`BEZ#vgEhmhR;yPO1+omp zMqp{7Y{ClTw^fNoPR8hy@yib^J_)W0E!GGuvNQg(>5ZpxzL8OG})@1cCu*23e4xh*?DX%Do!svkNoJ z`&5epjt4tAlCHyD=FTw)xM)EzXkX;EsL@!AIVvW>U?oF0Gpq?$Yc&GkivL1;(3 zBqV-VtC6^LMi8}wkm>EF5c`?C_$}juI>1^>1=^y;TPkBL19j1;StO>#+D!t*B4zOa z#SS4Ua+2MN{4o(r+}Z_hjXFCHf=6TV?~vk@---%uLC_5c&Bb%7ay%Ck@32O8L+L;z zD#Hx`$~$TYs7fV(978gKeM1S$?_7Z}poCMRCj|J4Zw)aX-JjUP5n=te$auke z!#sup+_W~$2X}dZ@lu0DR8%kx(khdTTnkZL;x@!oz5?5m+7f_)gpvG93N}as?6g>s zp@zq62H0Au>RxQmw8F(O3it*ff=U!Q)d+SMi2Qgslu)P_oSn>s;zXo!+x&ztNR9Ye z`Euy{ROSR@bQ3fQbs!+3LaHjr(tKc+@C(8e8g#Wpv{OOCcSAMJs@D*atLG+p=qF44OU1Z7M{-&=v+96qEJKo?SAK zkn;qRlhlDEQdzt_!humqJva#Lx&#ir0Uc8Qh=~?U(1Yb<@Z=h~3B;XHiBRGa!h6sz zq9($A$urCEu z3eOc-pacRfvL3+&dXXsN%Y+$1&(ugtbm|&bmXN4tnj2wKY(YLJp7H4;A0UL`*(Ko{ zK`oq&2;sV-j)hId>0*?*gl12uHXI`{B4>pGlHEA2fXrkRQ)Mixk(EFefVptii_@*p zRx*YJHFm>LA_7AymQlH)0AkD_AZ|;|m|p|`Tn}6Vz={Xl*oe^t(iA)hB9q^Tk49YL z0}O)b8O}u7EbO9o7?mV1r5a#M`GbrO%#$lf*~Suk$JAIA*J|vQLBRPM`Gx?7|M@f@ zLg&c$a(oUSqFoDZiQKhPfJ})OL8xR#g&CQml%GTi0|6^yxIqT=F9rpKHw+>DIaS7o zeKj9}0+2iJAHre)tMGp~Nl7~sl4PQD*g(n;0K6itY38#?i$N5N16APbuG{fB@vt^) zArP*BANXrTNOX{B4cxqZTbPz#b{&sII8}oi$@dVtQeTQ$$||)E@=L3_Gw7;rlwYbB zau2V7WC4K2TWFJNiCyre)Dqj=gv1uteMUG?EmlVuI#J&;Xj>&Sb$5Q3xvkjAI%!{c z5sbs2kQ$(unyoM#?r9@QQU&oZg&VjiZbmhUdBYRHeb}32LFFv0Y*2!DGbpY^>-4;* zRj=j}C1xU~q&Ff>HXzeieC0=BicpJS9i$DRvpC6Y+^Er7}g8bAuGRi`T&(^5&6UTFjVxVMn$mZkV%GgMMidLEe<)D-)Rn z+%+?F4$C8!>b7zucLn~)NC0Xs5*?w4OR#E!-7>r(!k`0rYe|9XTnWy}y4@0H7ox!_ zxqpUkZOd3NwXy+ZKu&Dvcb%mVsp7GaX(ERO$s8ny1f_BW%T2+6A#E1qkg0g#<4gpi zP+h`IbHH+gLRGDjzNm;OWTk2@m6w^C1n~e5DMOG*smIqJs;T7#b9hYwD~Dx~K`1Hkr%*xTx+zprQ9sT&r3X|H@@t1rIt)4n zsz}YEhvwYHDuK@`;!u>p9C@X1jV2wXUn&O@6M4!+(#mPT9@EOgIjRK|#kX2$p*xuy z9J#?QkV+H{C@Nh{&Ap=ECC3LmydadZL>OcWY_$In2P#II+EQ@uz&J|;@l~K!gu9#~ zqHT#O6O~(0OIRgxdMh+YWRz~GDyn#5{|uH7;^yR7g`sjrB@M-76s|iI8YKx67Laj< zU9@sg&{mro8lQxycV{vuyxkT?N=2x$7$8(>pVGRNf@da28BNR*U+i zoo`*D>tz2-)?hlM3YuMK+{>%v8Q0aCpQ?xVz|__=yOQ6q4djaK93N4uiWzP*RRip0Niu znG8q8GbK8|T*F@kwYf4h4Rfp18cmt0<8fI%0W@%8O(~eDxEUdi2ITE{W$s)Qm%QsV zuv94% za0Q$j&NHv^dawl7ikeF8v_MUXr(!;@$Sul9`71W32BAiqg1WjU(YOfj(yeG^eAfU= zhZtdr2}qib#QUk$rR<|G0{3LQyo;19WXULjkIo$rD+tI8k=7_P>?a)x4~f86Bnlr3 zWC&H9jJp!kFhZPz>^wXVIB#{6BmkjcDD#dGu&_*NzWLhZg;+IYW5gf;o6G0(Xwy^? zp*YADqQ^l%U*vX9p{%OD;Ew%~i?a-A8Q7gfOCpO@sH8B4dwQ;D zJ507k%zjg)O!paxD5=J%fxT&EAeNENMd`x37D_GZ=*jSTRY^9(F@Ii*qEALZryz{r zby9C7)064Y6G+2S8O9?NxJhB1uEVS_KtaVw#%W_RAW=02#5oUT5(KKS`)XC1KipWD z>Mp%YQaV>BvGA@hK?zVM{@?mihhP&5f9bfw_oTc+v5D^j=R?MJ1@RCM1mvMYR2Y^V zkW?fSfw_i}IIwMmR+d`YVx)j*q-j0E$DjmRnR$~_y7r_8@&*_#suTQH%4R|pAkAcS z5Lug4hozw7QrV;nq(hPOs0=7qP>(da2LvXT-^drCd)E-DTZB9aqNR)wV+r6!za#v! zxCtu@-XaHG7>$@Ssgvwq9g{j|>%8(!qBGwJmvCswvc@vZzXq3WxP(hlw#DI~dP`5tD2>PHTn2ri%-8YNF64spXMNQda9B+Q(;5f((0zqMBAX}Ciei>uoGI1BFdGO7{@4Wxm6mP z)Xou*+yS?OMq3m}Lg9lWC4&%`c_WJ?R6O~Kdl3zghVW7tMo|YqXSmTQLEKK;7T7m) z&o_zL;gCZ8bC& zWUYG*NP+treLGZjj3*@l=BFhWwT^I*8!55FL4cEiASzNj~*lPfBc39}DNP!k;UWLVsxnkHVy3WI%Q7d#lykZ!%@fby}r(;t)w zglbJ&5h7*;*c5H0cRaN}5U=FCLfl84qn-{I5OD}Q+M7UBKn{$SMo8CS9s_}Kp$1ak zP=JH!;kit_kR?(xNo-W0N29LhiB*m%RkTjlE+B;2g&_*A#aT!Kl9akyY<#L4ER_o^ zRcCxrJi>}{x}rR76`~L!i>PE@Zh;4ry?5y^OT#2IkB1ZeWRa#EwwuTpZFpqLa#Pu) z+94?buPsYSp(@>OrY>U62LA(gEK4<8i5y%^zo9N4xy@FvWggroPe#dS;iep*1r1dJ zjpCQ0hC@xpb%4rgPn79W=?KYka}|D9EYe6wqIk&)wFnEon;Dn{LncR!l0tEoG|5!B zU$RCEi$QZkY|N~(CzLTO7ML(LMF=YiDu#r6AZn7El3uGt3%Zts964f(p#M|{<4OdM z+^r^nNVL@6C25i)DVX&@1S-A9-xzDiR79bwQg~3)u^fd>HA0LO>5!8jXX=FJK$CaX|K^&Bn+zQ;*YvH=XmGPcpKTpPn5~_g#RREDl z0htkoXOS?YH-Jry2ARG>PQ+n&Bz@+5xB%m;j11+K+u+G!E+PYLDv=a8D27};b_huo zRHy1kr>YB3FGck8Fq0Kxib$s+ZgmcNKA2s!mR~sti4OQ40Vl-+t($nP;u)v`O$aZB z2xSz`Oyot9K+8BF9D%hgQ54rT63Dn9E)q#DFv@-kNtj5}gSC=W7Aj{!QMU1pDPXDa zj)-mO8(VLreH873`V@Q=0b9JXwt3JPm(C*)H%SwmAdr!A;83_v)FuFdbg zGrU6Fw}Fe`G{;CS7YAjAA}zEq-6A4Q{E#jpgD@YK1RjhUO|H$-l$zHCEdo4(Dk#Nf ztZ4kXat^ z27E<(cH}b1JQpSKas7x0_yFt*=tTQbfs-)_(JLj#WEr6Vn7Y?7%B|pv;7~e{q4EOO zjOkHem)k~xXt{_D{7Xmf9M!(mHk_^yGrAd~`NG&uWG*^Qs;<_EK#iaWY!-rX0sKBv z0i`B!N!5b1S=a?5h00ukOAEV2RYk49xhjRQf@Ba8S}2HNK;!{*ir|SO0_zB#;3ENw zza+5~BczcGa1_MYE}wu9H*S%fD_SV{5Dq2<@j}#pk^zHc7)4NcR5!}PdcoWE;NBnGDA*A z2L=Bj#YPEb3CfL)SE@bIB}T9K4uP*zBX`jPd30||mPE}xY8vMtv;pWLgevZb^H8*7 z2AmABT&Tef&JV6qWC4G1U+|A|7wo&)Mz zFaS3cl^?nmg0^J^SE+iNyvqV%9`J?K5r-0ptR@;FThPSuTd?{`jJ;)Nd@XXhD)4Ar z^slps(DioFpz6Xm>Ml%%h&~gUk{0p8JS2Cc*sHNEDa)Tu2evf;Nz4E$*aH- z$dTu@NeD(Qxf`?-uy1k4O38h6OmN?5VNsMHVZ7;FWKQ1YT?mn+1qcz;LKMe=`kHDI zA(;@)#;rteg_t&PI9(oBx+s&wHYw(DtJYjAsEBuw!JAtCJ!(hS%d_LG2@x$}o9HAZ zg1zOt04-?AMsa-+iUBc{BH%86n02HUraFKF;W!~nN^X2ak)SV?01zazI08ga#JK1d ziB{xOXx;cC1sjy2Q?Ms@p{9x&FikXB@^$$t&JM`W#x-JKp89kuH`KF061H~QaE5S= z^=$32vE#F%|1KmmUR30R+2z!{uqdczKqtr1V7$ybU`uDi?Og6Kdj=3xQDU z&GmCx3S4ZK>k<~#@~|YbOlmGT$RYS8l?Bk54dg8GIZ|KNhk#R9Oyw2A!-8g?4!J-y z)GO)>=|#%fQrMky;d=Fi!Zd~fy(Q_2#td?BM^OO7o6$nS!+pbP^i5JVqHRP-E?V``32Pm1gkkQBtDbU_?g3dBdOHWg+1#MET* zuVy*hJV^9ZI#jsaszf$bJC_=e6alN3Qmh~bl524O!@7`Ba7PJ;DIXi3lvpsiNx>xl z@<-IFO10jq@RMj#B@x;t9E_;7-bEEgyny-hj<_F{4!o33z3iA__30Xcssc6To}v7b z$V3arkxSJ;-N08UJN+JjEoLzm#9t+pBk>_R={ed_byy-Pt4m)OXpGe{o~UuWpD{PO zDY8i4Q1xy$Ttvd2yfh^wvOZ%>WlKQ?Ip}tATiNAR`y&wX&l3pm|Gx-26OxA0PO{r;&96w@rEdlO0 zZ3VLpv`Dxf7)Ii`-4 z3MZ)(sBNd_B0EBUp^P%w1@tH$Emb&3G-&X{Pw-Akd})T7WH9O{3hSJ2(%M6@C^2w(%qreP9+NmKSC&G7;lfpR@KPPY{-!cu#952-0Ja?Xwo{6o zzVNLURfK}HWg&db7BC1H^9d;)^LkPbwI=aWa)w7D40a&Z{0tbXfwVx>v!GKcNzEUt z#4!jY?1vSHY38fJRpdE_(I6UAiMJRmg^||EMO1ev3SAX_S46!=-x`BQRFk4NCy26Y zX(iR7)Y>q)JPG;*!eb(-bs7;ltV>XPqGsZ+!peXIid>>iyeeWiEcgoZe zkz<)%42%iXOSKK9o?QSved~~QTy)5P1uoR9X|&f%^p<8_i3Q~@8b&6MD6)_PEP^a} zL9q#8OgS0xg9I#&xKbWSEgbkyS(3`Cbse^k82$hq9KQmGbNLq!e3hUf)o2vAG{ij+iq3cWJ2daHQ^UI!$gXC|Q2 z2EZ~eSP1$s>s)z67ArgC?O<2|Rs}I&HFf7`2ei=O4@h^+EKo{QV)~?BxLLXeV0Pl~X z#+e_SuTS}=f%YA7U2!ThJhfL07#tbA%Oe^R*_2KTi~vGXoN-*PS1aEjK_W}g)? zcvll4SVcLBh{>F6ZQBIRMF4_ti~s<)!x96#CE!dTo=b#7jDw7%3g%S#nJ2MQuybh@ zv3x9B!zu+7dXx)UuW?fVVw~;}O2Ee`9Vvzhk(#%->NE&bse|IF))*`t2jnTskg+6B zNn#?wu}grUhu~5!BfLl(l(acyKb);14D+i2C_zQ+f)hsbrNRLShyk(-t}#LziHM7w z2st^P`%wdyU!@sG_6=hQ>gGNDg4yE3ELb7ZlSqSrL+}W%=u~2-tRL?xl&c?r#$2kl z30KBTix+rMXhqR>YWWliSfJEOkvZ)oqL3;iKF$(IvmEg;yGOaZ2Au?|bQl}Hf2|cq z4MjG}uwf`m+Y(hx3-hBWOw*|}V3UHV z-k4GHy@~df6lvL3a!`H+sU+-JgNICyjLgo6jdbaw(c418+$)MNt}No$d^xI+sVs6*>0wA5}1 zyT_WN8w3ZT=j>c))#4(vJ6|;Bkr=9YDO?LMDbh=3^x1 z!bAS{Ho^dF#bh`Uz(`j|HYrS{3wdHr)B0jL!B;*-2Aif~7rD3y?%J7Loy)0QB*oDiJ7#~k2YyjSN+6h6nJWMjh@+h5-uMM9IFVQSfmLn5=uqI&fs|wP@(`wDf7}E|r06Htnpy&B z#v`qxiwI*0!k86KAvy^9V4ydG5gv$?hR4Tfvl1v+jGHpMWN7#k`K`icsiU^nGF7+JT%7-WF5YT?iAhFgqU1k5iBeuK-0 z0XTc9Rbr!9XDxuryr0z%+jC?DuUI@zOe}}eBUTTU-xXY$+%P@X0I4#6(lVAEcqZA% z{wdLdBNc@sH!e#;;iT`83q*LAG}{iVvd0%=p|aOQ_E^F;Qm9f-q}0kugJXI~XbbcP zQmIJ|(#jD*w8Ay!FuDd=7l|WA4VuTETWH*w+7}u|K4-@9bG${`CiO3;hJwU}R6$NJ zs*&Oz9Ry=aauoQjR+^GuD0Re0z&QZx2o?<=oIWh6;SN?#E1k$g2ruu)dP(gj0tl@< z?N_W|E-ppRD44>O+;l{y^g>ZU;MOr%@_*xluTgR$O9@9isn=j{Yc-oZz|Yus6pR)= zmD#9)BmHx=C=eGNLR+!}w?%cqHsMxUnG{RFco2y5lIy7N;~Ei!;-B*)CfET$A#S;O z>kA<{rSt%N28358lea*4=e>e1Zse;K;fFi17uf}g z6Q*5>B8m!&7)au&ggB8_J}t{y6yz$PvQ=jAqaYyKLXF}NASW<8A%#Q5O-8>9+B_KStw1DMm7T#&)iRV2^~3W!~rZZ&SDb20<#JiLD{E=By%BUY|}j07jI zMEr!bM@>MhJTQKa6OR-Mmj)@M6`m{CE1De%1TCI`m0I&5IJssmk8Ip~e7riKn367O z0h#M4B7BZwoWDj|8({}iT8Q%04QMY)Z9@oBJLWk#E2|IiO5{o+wTbXuiff%>!&m`7 z3f56TXeqUc5yxpQ$k24RiwqW5lmzL=OtTMKKyanpRay#~VHfE)5GjPwwBtqqVjZT1 z#kD5{%SKgpFl9UnO1VZ&_{}4~7BYlf)2hMXM4eI&y`6M08XK5;pn{R?fZ~09pD8EGRah ztItkX^19R@*qhXY+oNAjUzTkZNITPaElm_D3$ahS0Q#tIB5$EsX@HqgWx&<3RzoQm zDt4GR{AAn^&@E7dA(9}2$VsFRkQ+{2lTJjalPtInl&B2~)d%@D>r%cFy>_@y09`R0 zxI%%bo}{b_WQ6wwFL2h7J*$aonOUK2DF@SM31m#s16=nx7;8SYZwvfq>@NHhf5oLa{5Z*D!wdKhXW~gH#XC|FoZR5tN7w z6h^sN8NL!TN`U4Fw6I;j+*M&z=tWcmKxkK#fU=zsVISa#spMh)o(%DM|t9`D(>Ja z#x_E`h{rWJsA_}#_UKiI(MnDmgAa57C^K86!arCHF%7+vUxbO)D=eqMh@?nCEw_zx zq5%>(iH78zGKxYdHd@igXuCna(aqZxP3a_sr6D`x;5|@#dTvB$#Y;s72pka|4U`RX zB_IgFXsF~gvSm<2p%Miv!&*pn_4r2qTA{(dDfr6tC$?F_A;66S0%B0Bd$eIx2l1OD7$%brI12lxI5~|hH z261vBT1G5}OlWG-u=$}|NFQF5jv*w|(5;N)S|VtpY>3EB)*{YJ`}8spqv^&5&V<@z z=?13&f}&xd0#OijTXb@1hNUu+t|)q9l_euEPC!q7mAnMxvQ1hUy z$69t+k=)yAg2^e@pk-)^;k;n!f(Xfe8t6whj)0OIt94}G%oI7O|5Dqtx_yZp9fFrYUZRzvDs@Q7EE!aMfrMp6%R7h;B7Y%^h z#0rILRy{i;w)7KnN;#JNfaKArgc&Im5Gki|M@S7+p!=4;BHEo1mmYG3JV%m>*$pov zVKCaM)KkObUg`qxkDWB@Np008agqvh7N%{+ENyz=z}z(5O1GsP%*Ql^88OjHng!Mi zBhD^xPF6Goiyg*WstZ`dDs1v5>2avBI63JeU#Mylay@rfSasxOs=1O!bPUY{VTpT5 zHCx)ElI%5=3DPm{6A7H6U8=eM=;@@1p?pwr$lfWo2UcawW)13~SrVZ`Q+4Hs6~XCA zsU~FV^vV>npfPyNsaoPVX2fmw;G%!z388CADiW0kWdN+py7j>n_}H(-Pf9O)ngpjx zHZt;bJo%_gBH~QnG9M>3$iBAe8IFhGf$fa#FC7Clu#!#0AByN%OHPV?iUCIZijd

L%&TR#eDn zOv#XqVZyFPk4y(3bL8OdkC1Kl(8`i#*&0R>^_YSiHGtAqHtFFlHD9NHgtjD611*6h zXO~1=(an=+DSSylL^!vUD52_?0mJhdJ&73^lm0{*B+||lt6~(>9!nC?^w$}FQSHD{ z=uB1%U`B+LloV3Q>|e(}MZAc2C2vXvRzpgZ=u;1-d?yFzm>81L$~JK+*CR8eaMc};bLP{ zG@&W_TTb%V$VvX9w9uFT1I)rtORK*4;`gRic`Ip^U(fs5&wlU&ne}YAzM0iazg75I zTl@ci@1Jcc$B(m{f3qKM$w+;C@_&`o>X0gYKdHLAdApx7h(G+(nA2?jC(fx_Kindz zMC#7Sy#HWETnCD(SY*$T zNXH~MNNvE8E;Sm+{Im!DGK6|IjE@*oGm#X{+)vG4vBBJb-*C@Ww0Yx^Xp-K*v-}jOHl2@wpQgf?>MEa1U;GNZ=K&-I4 zQ~uLAxD`YxL4Y&~c_oH;g=8(1v5M{5 zSrOAknp6NTRT{IebWEj#-iLpY5vk!tbr9vWmt0*`ovKL@yvr>${^*MaHO-1+ptfzt zfFAJ^r0V?;xI&Q4so+>w6~QpA1Uv`mlUgXuWB0Z2k^R|~41XShBt~ETM%_1?XF|>)Nq?3APlE!tSYMr2{XgW8EGl7OcBA74coBm{wL+JCP=pE zZL*bvu}R}5IePZbNpmR0BSmn4x)wU>n{0ZKHUlD|6niEWkWD^_CunH=N^Vf7gVHT! z>)*(-lxWp5@Fd1d$wZZ2q9-BCZx@2LicC|(0ri4Ok(?OND9Zc%IA}Uj(hq|#QD~sw zm$F(yvN{qC^h~flt&lENwGh>2r72YwD~Fs@S}HA&u^2?XdWHbwfR&*8w3xU9Ii0N{ zKwiXJK)(x@ILLC%n)LLSE>X~m7=%w3q6ET5FXERyJ7q>+rwg{Hd36{Kh_ zLm^5t#7eR@A{dc{mJRz*66bX6wxCGQwa8VJyEF&L^L!Y$mEX})%?!z+=$D_*;`eOu z&*pIj`b(sgk=ROmXw0P1ky|O@r7O$66hw!qG!yia$;!?mF|%d)mK~%+4|PPTM)G3k zKa`52*pY`25kVzOq$ZS2X3r9CGqr275cjQ=scq0&h*hVhi}fn?@t}%=(b2F|U84~S zQH@%l*_SNsmxvNYKecbJFp?Xd+Vv5HU|2MkMmiN92~kMrZVzcWp{@~fP5rx4*0i&U zV_aCaf3?pd;i5a@(6Dq-2q`3+uk@bt{rCg%EREPy3K|#?9kwJu`AOA<7gMGt$3hg} zNl5rS5pmj-g_utP8$(6DntmA(ExrC60)-gYC?ACVScxFUMrhX4C_o3qDXFRp#D+!b9jQs{OM5T4F)3TiN34xP(Bm8h5?7BI z#FO&1&P!ruIq{EaQB_i=7bj}qJZXbD4-#a*u&UWcHDAXfL6)9NqyjTX9}q*S+*4&C z-Xl3RoHUkcXk_D5CEy0egdv$FQV_k@2&FNN&^+s?gpy_{B`6u46J}f49fJ@6Rx9(V6iqcd>^0Iq;qabAG z%}5<0hK2ZWhVG11LzhAN2GRXtt!>XmO_5)`*7||9)k#RmAa2>T6duLda$q*JB8rRz zFS;UP5t23}9(<<<9FIf>kf>t2D0Y~AMj0f9Jq$qMYrHU^%r^>g(1;$6+8B>7$WOgD z#0xZdC~W?35?Ilk^1W>Y^5`a8?@TR=e2?u6kYykaAw|XtT^T`A+R;H2Tb+WK2^oT3 zew4i6ponv*V6u}YUvJQ|L7p|^x?onEJPsMjxe4#;1g8=tteX19@ZmNlplJ-4Bi30Rd@x=}qI|h`o!7zwLkU9IN`r#K-o86!+ z(GdIOeHdvDk4(unGufh^F8>G-_gmBwLy=3E`bhbfU(zn zt@SO<#KbW|ZGKjcPvlwgvvQ8i9Tb&qki_O`04O3c#p&I)BtRg-YQn!bX5m8Fg`zl~ zL+H#_EhMMe-6)kf;hvwR@xl=sT+S~$by+>ueKwre;UT&MsSq)#2UT+fAnNg}MMoPA;4MiIidFO8i$;YXGS=68*K30rZ{Snrt4Seuc6HhRj>GszZz$xHJ(E z?pZa0EQS;8R{-I!oYGfdaSj2J3=$@Cs$nG5D8;i@9$TAa7Y2SXKM+oX&k1UmBy%$# zf+}?+psUW7)-2^ss<`|>AS5Dhq@h8ebK6XjH(>IpU2Z-}r8|mhkm@zQ5(a|rWnwnr z;#$bhL=HKuJ_BV3T}?tcJjg|6H!IR!;x2bjyu_8HPjxYg5sBV%f{kWUGJb1a#15{t zSj1);KOTkTmo|{Q)MK7j4{kfRV}*%k`F*=6hqrqZFq4rU|!U8KL&ETh|zV8l^)` zy-XQM_LIa@gfq0DgXoscl~{N9dNl!oE-e;rM;>N~O>~+eMW?ig(o5pKiJEn*a4zJ7 zLOTU9Gp7Y(vMSZwu?iVqWrJu)Uakw9fM7;Y^AI567ej3Prd9x=OVT^_SW-4w25kPb)HgT#727aPUMykB6M4io%QU;w0&psJx(AE~@Y?w6KmG(NJz$Y~Q&k0R<)T!OU~wA~}Yx1^57b=nguF3w(3 zDwXz10mf6hk}rtyRL{_VdVYlh?O5r=!A;0Vv(bUZeJLdLppu}uJod{cORLiYsDfs~ z5e(9KGny~~lyMx2X*veP5YgM|)KwrD^n@S3(XXyO0$LDE7!Lg#e=UJi@b#XHgtKI{@;FL4ww-c4>87&*PSw2q*=^%he5fsP6A3z`0PxgZl z*x88q8s#)O10KYL8U$%X)}k_ONDkeNlB+6ht-jNP<;lxgErU22l-lB7@F(;SqkNw2kv42vCUw^U_B^ zLSauW$Y!EQn1)ap=omG#2o-p= zspng0)?1&>Zdolq2MNmVqLz>mw8Y_pRCddADUuR>S;7p8AkBu7Zb||Wo5U4+03!*f zFqaA!Ord(s#Qm~dlp8Q4JmzgVJwsJ;lg`GK>SIaEk)k}Ai+N6lCG*PuliHKu9ywFy z3-%$I1~Q^TR|AB$6w?f+49zly4}czpQk~|uct8}{jy$3iu~C^c2m*8gu+1XviOqam ztUzhr6~og>l%lIFEqglo_X=t+l!C+5qkghDBNnl3anWCo|aSiDu)rglZeL_fgC(1YkV zMS)~z59?R0KRGxD5;X!fXXp>hEJ9^_`s$a_!2wwEy26tlI9^*nq|NEF#Ylc+&^CNH zL-9cwIuJE&v>HkBqdD0z6|A9_kHjE*N9g+FULr3dbAd8hKiCuHGbl?r9=KuKSM3!% zjAL0=92-0;A69|o%8;yB97_+fr9e;@m$_IrWZ+5WbePGF0_>y-yg1b77RZOQeGtVC z$Ro~cr3opas|K^3t^7G@&3@TXz`-PrJd;glB(6>>v>PG<s&kp5Tc$F+? z(F)m!gmsDOso>AU4^z8XhG-xLk{zem7W9UZa60%(qLXF@&7@HiiA+*Toa@vjlK5=_ z%Wa5#Tncv{?K*}8+$NvV37tMqeMN*eW;A=8@WT}H=zia_b1z3G9e|1gkXa27Y_&?q z!gC=iD9E7_e#B3f!uIf#MFbT?2KgGe5~-I}!?iGT_N*a+2XmMF2u=#4KvXUnw6%QP zJmQ9eiL4+(EWRSYXQJcMF8QctvJsOistF$9z|uO*&*O5z17w_3M}9(DM?GZKM{@4R z@$jtZ_w?c^6(9uMlGbDho^8nV{Zyai(@E^$Bj%6-5oAgJw%Vdx2bZSPg@Q!J&ADX* zE(#+u6Zr!e2s&pE3K$BB-~gl_n8!3ah{>2~c>pq$MP^_uM*Z*U$kM|L%weeCFcc$Ee#&v+sVzkuFd$JI0gKg2Ip}}d=9`4iE z4Z4_^j|&nZLOEBx@8(0+#cf6zr4u0=vPiycf5W-(DYPRPZ`BiBqR11-IGlhajZ`JM zJ0`()46XzlX(5~M$hWlK+1V}If`TLL2<-|aVZNE%ITvI0D-ysJM8?4iPHcd-@ zGL1#6%NR+RAK_1CKQ%%Ld-jQm-DJyo4mPORmpDw$uz(8%-ca2M=fofYY*HD-mn=WM zE7QWawLfdi{*CqqNj`zTK!9tgO>+!O)PrZI2W2%A?K-#+7(`yJlg$)?Ba*`Kiu5do zj!U92q$uLjvZaMi@5Gi#%q2+>nM^6RG1L@roqhgsSJ}OX@J2=ml8R@kaoF}m4a9D^ zuz7ydR5yX(l~9|lVZz-aEV8Kxmv8eM^$~*)F9~vq;x=&dGYe7*?6rI;8kv-6Fpz3a zY)MNvbP0M&0psz~C?$g<%k)hSkG-g|;DqdGp({`(jLx-58{C5Zlx#W*cYB9Or6fq;xk2tZNEirh+eufhGw2`u~2diFO> zPq$#HZ3J&2-8L55d0_PX?jUcO5Q+WLI!pH0%UFaLZECJeNh+EncF!pjasqdPc{Ucq z$54w&V#2ndb0iQF|D*sC4orwe2=mBQ;8Hul0IFCKoV$$ywZK`sDrpP=@J*Y3ej3cQ z!PFQ4zeJ6qU{Q?FW+>RXG?-dC8ETw|1OOg!GeVVL4Pt73YR|SL(zi%nEoi&n#ypwA zR6^C&mf!W3v&&D@J!{&eZ-NNlW5FnY%1+Qk!Z{2gAHrm%u@{w<4Kq1Il`%L_M~#cj z4qk54QL#e|2Th5h(S5}D87*foNZTe6yC|S(KPEO52n7OeNHq*1h5SJ$RBPB|tfVal zQ32WCOOKlnL$Ov^chkP@G?&vJN}+P0%&>UiJ`pFVq5u|7RVxw+q$Q4;q`b9tB+%dh zm@$JN)H+AW_bB-Xv+c(l)!4m9JJ^21Nk0fxA!FQ0k2~N z3S=m1#}70p4w9sE?)u?OXSUPPR2bbRNab4M+f)1(+-0!#K@9ma*i%fORus0d44ll5 zO|oL?pB8q}Hkn79pt**9B{r0!iup-vvZ;%;pumw|fg*s%G6>7sD5b5FVh=wk`vI@b z9I++)l`wG(d=c;@O4=8dQ{{T5Iw`&mJY%8otUuv0IDXcKKa~z;i_-jx6o$`22CNs}L~Tu5)*+ZfqHyZ?z|0z}gbi>&S{m7aOvE5go5jE- z>N!AqaE9UMkK~4cy}3gZXL2BI`(O75W*hd*xAZ z#s<{JJ`CJOOi6RoMS$Rej8g69leluP>8A&f-X{yiNE6@fWz~ zBat?ERX~X;TY=Qn5`RilszF$R84A=w9q(rv<%t%QD3?zWz zWDp?8fF@fq0htsi%8+2>z320-jt3TEBd`-EL41Grd9Edq-RGRWch#!3R@LDERukg> zAg#LPdsiM?JXO`xbr0^(rP_x)$C4_#B--EkR372@h}pujY2-s6!)rKNrBE*j6!kq+ zVy!V&&aD%qs=)*JrOurlQLAXue)-qKcgs5J34;FCJB%P*?3VwAcC3{Qsi2U^U5WAr z3#Gr+p)Y{Ye&lI%mSR+nR57ZZq4A)Jy$HNx{vhN~g{`V+_5?Bhy_p`-%3Fh{qo%8^ z(uwVNjg3-*WZ@JDaw0rt8Q&IQ1Or-9d&MDE93p1@Z)n7JQw4fDY=P5+=5XXv_pUMTE%<0;O>hhyVy|?}a6#AxIZIDiJ>#=TST>%1Tpke| z%)DBU9>*?IqX;73s?hRKPL^B2>Wv{NGTB%iD$L6qWDdhwVjqbx6fZx|_kjk>(SYKW zFCg4XTX65NS5-1$srRd8T(L46>6oG1b?7B#1Wy4or=hw_)~+|&jwf0qUVG^YT1;*x zt(ZlD8o;@Tu!<)sl5v7{-ouJL@({3QD9peQ*#HlVtUK`m%`$4lh||_k57G~artm}! zgAzWM%2eY#Gfa(CN-W46(;|u|sju)MXA}Yp@^zFUD5%k;3c6%?Jr^FN;!ho@)V7xD z0;&kjPn9a_8)hw>N@kG`sO*>t^jZx}Uj9Pal1d~}0iRTeFHAvI#-;QGGqC$1Mw?xa zy$M@U)ex%vP&Bd^Wfj1~A*m(Z7LF(eD-m%hK%s)lqb4eyg8DXhy<8r-oaFio*4S?+ z1fQWU#HNT?0>4fH;nJ8Elp97fWlO@Aa%DcZLZzqo+phd&y~8zVJ*>WvN8(VUN)Sy^ z5!%EV{>0|VL^ETeJTj&Dz6DKAw|O=CM8yO_ZPf`B`lTImSXb$5vRjQcZItS76Nm_t zspGf>{D1;2Z$>Ltr?*l>Kt!K%Wa+MwQ&|_X(jZdpzMwh#fwJ1@TQ>t)Kojn$6|!ID zGu|&XNm3O8LE<`TY@C?TPT-gQY)k%n9r5mxZlJV-c~ zCAb=dI@>3-*Z6QiOa~Qi+zc2_F2#}>j3Wv>_IaTNd(_4r#G_Ici4kBbVqb5M0R7k_ z5el`^c%0gMNF59KV29(OlPGX8Gfglb6v7DMAS%Ha_Hu_8ag9Nc(F(obF!0GnA~f-u zsPo7yb|Gf1;lJ=e9b37M8X%`Im#XxI8$*W+Oq}W zMuI!`gq>yx-y-d>5(z>MNNrP!hb98Y4H4Yy2a8b>SqMSm6|CPxG$$G*#zgG3E17H) zNC``}k=&ypC>Mh~M+k2^Lrf6jMbT4Kf@Y(hQ<;!!k4UEZuWSLcb16oRFYb*i(mK)w zU}wsO;4!u;093itfbnoHoTyOR$i__zE|M6thyn3T8nWi8;5h9kAql*zAm4kDJwlHd zD&q99=^<5}Ls3_@0%jX3;kr#Ikel3|{opjE4hF;w(vXv!NCyU^;yiN3S!a(4is|sf z{wDniTxQlNO9keZ9#=-TjCmxOL4YC(pr9Z?qe-rCq2~{UFrtW%1WDLV(2E)KC~aBs zhGhxe1EG0T5|t2}G6HI0^BhL(e3S`%U^!Iy0($XBqahVG+$mL1>N9;}HkcJjF3^(5 z>AmnMc#N?lG$Ugm0_{si6cK*vjs*XS!Gf{?A;>hpA_$K9%+n}JHmyRz4SqND4?BRB z#OkQ-)K?^l{Eix(jIwGwp&57F@i0{!z;x%1TcCRiYBh@lZ@Zm6}XL|(^ z$(=@2f1Ds9ZBrN!7C0?`2cTgt97sHk6F_wo`P44Jh;V64F~Xp+Xl8oi_ymqTb&O3C z2MJTAvEkrJ=TkOQvuaw!XTcM^CF)g+0bv+k%Z<>gmiv7$xs{?-`?;Bx&XA)ctw#<@ zYP2x7V0(3v8n*0Jl_<^{X2~PG;hiQ(#IFHaTvE6QS)w3jS?l`7cVR{{icm_$O|Kkr z7%8K~8!p@>+F zgR=Z~hN1_&KozKybL6WZgk?{FsY38NmKV}XdU;!^6T(SR1;@o|6tXO)GHN1Dak`0) znkcLj%ds_Aba9R2$`HKJ8*rvo6g!@jQAfQaNxZjrfpcV|ypwB{;dnMO_90hQF9b8t z$Epz%od$+2!+@$yXrn?M?%63MwqT?#SOBFkjZ-lG~FTNF7+*~+V-62=gs-2)k!CIRFS`V^A1DgAZ3xh|=M3}`P zZ;^=c>lUc7L5{lP1ngwTR9Y}qqrZhW?1n9GKPE4GA(&ZG&Sk19!afXD991iNZekwa ztLbPa4>ypRbIYhpVMVb~vT^Le7j3ktL5>f`adit`2!&=MLsKA?m`s}(&iH7>q%CQG zK@##l0IsW`!36v2;%@j=U#6QDn%nX`JB^1gFC)48V~z6{kb= zdBjK%RK{rXlgU(gc)6QjK>CHkJr zf`DSpae;)wC`he2K~RUzK#djr^%XCbTmYFQKXW>1t_3WQMVEoXpU#Hj#f(@lY=aGf z$^vFl~3QU&>s-9H@wL?_->msQiy0#oh z4A#ih94&|@@+3IzGRyNo`4mJ^EK?&f-Bp-R*zz)M!~5h=B{E&1anyP~(B~3}$c~&+ zZsfv==8&5_e3do>5tgmnWbPBTfFXY+qV*y!2!Oyq08+9#xhR2VdpXbWzMiG*KsJSk ziEKfwEYM(o!f0Q)otj`Pi;45xV*+(^M40vY8LCBjbgB}>O%_G@?o3NL#e}M819N`a zA1+1Uv2IjI7{iejV^mV8J(8uzfH_TC@N_>TItN;n`}~J%ne7vDvqr(N3m^;3`z$V7kB1T?b(?6Y(PBX>xGH5?0{I-V7PA zr!($7(C#TazK2DL6=E5$#&P1{p)%!2AK@$`$zbZ3J<%K)qhyfp@JQHWAYK@aEs+y^ zx^f=PCCbBpJbCmHA)}Y;Sz(hmrRUy}B+(8rEvacaAh>dsse776tzhOPI; zH2fl|0$(mHpce^CrW_ix;pliqU}Jxq{}H{Y!I93?9`^Dm8hl!quT9P_fKbl&R86@q|vdS zZZX?pBE|$^SDP2I7U?7`lOEIN>kLi8#2RZFqlEf&Cjkt~mBem|jFWPS6^@GwQj5}x zGU}teoB`E~8s#y8P6A3~!D#zC=NU^6x;Ejj@hG;6Lx3irk5Ne#$!;EfFN;#I{e17= zZR&=C7>}F?CzrZ#-RY24+$s&Cj<$Y~1&njC!m(Y?k!DbPg}1Pv^Q*Ffng*k)-~EsN zMpj5dLx(`Pt17elA!A~(#9|+4+|0kp1+O+%dD<0z9V(GFl>f*%`Be%6`2m9pmrMkp ziS>{8QX1#v_9ZF&-5fHYE+KK;OO$*6v+Nk7S()i$dsDr9o{Jn&#P4Q#8z16;;Gr1S z&091_NBQaW6D&n(+XpCjqAT#_CQ+ZIluDxzDoQc+@~Pwy#P>p>7MXRszFSclrju3y zoiv`rT_=a$fmU`b=OP&wzguc(TXUoH#H-N2BnS zWsy^!d!B6+Z-=b*B}^=mq0S(5lHMF}7GOgAlQ}RJ{6hAuxWteUVm8&rYn*#84-DQ! zdlD_#GZrSq&5@5T>w0@BjMPesrb^H+)yWnu?~a-&pRHB~Ae=fOU((lXT<)v-Z#g%c zm&_jHw`o{hW#$BFKcj^9@(cwrLQ<89otDZ$0SXJs2_NA>I0MK-v`b?=m2}Q7hq?LI zBz0A@kVzGRQ1D1iC6$KpCt|r_#8dwiOMnMkDiPd((s5g76@}?y5IL_MesZBrqBui+ z;M+8K0x=MdldGuU$n@==hOQhN^n?ddY#DAgJ*dk-vKdACXCc?!;G~ zs+&~(q!QZ;Xn_vc8p)3!4HCXBqI#EtZ6Y4c`a!Ci=z`tw7%4l-?@JjHki2n>Ve%K%L5vK9;yGH5*Y zG)`2GLn8PW3;a%qaCKT4a*GXg|nmAyyZASwF1?>m`7U zcMD^q4q2jlCmJJ=Ld)BA>d(>+02XRRP&Ub?a-&bfI+^Ij;AVr=FQIUdJRl}ei9cH@ z4#)Xw$=o-{9U?k8-4u1?ABYpsB(ej-SThE#W=ZS8#P3QV$PN%!?}L<$Y|g*Q5?`xA zBj+UxucGR{sKxX{2mozBbQZkHfienWBM2qI04ew*aaLLs5PPMr`@_S*lsW>7NU5vSJPM#tTxhx?WrHx?APlIEdPDWaBFO4YUnm@LL!T7D5MY)7Yw{D! zEF*H<1^E9m)==GmFF{mSS@H?%ZN?7_0Pr+psC)TzP6q1-PeR)MUNO+zykzU7H&!zC z6pW@VlZ%uTWS^lh(44e$kzOI^po7pgVq{Z-%vhCd8jv&JguRIZX%It{D%FG4!I?&D zIGSo#h{(F90Z-cG^(npNV6>w&AvTlv8R1&O@lXX(9X160FS^jb7&%EfaG4Z6DO)oEQqRn0Mcx6=t4nCC#x7ja2kKG+U#OK5Hp)ztw+n_wvjzFsJb{=`yVbi4L|9&3+k(vK z>)dVW(P4319Z8&+nj4#;`9$xB$L9sZaaqhr$SBm0AJorO!6OW3!h_cpEP4%GReLp% zplwN-ryHUn1>5o%L_qmN2LdxkTK7Ft%^vmx%FGtRjO;)`lazF$4u-W2mcX!yX2pi6Wq7Hl-it zLR|`#umFe%D*$tjJNO`vq1nVZZzM-X*L2v_0;P@Bsr0Ztoox>m1{K;R3jCK^!<2eM zQbcYg4_-<2UR~Dgdh-U|cAZACQ694JKv{%yZ~&}5DYl+}ELcr5&T2Onv#lOY0U&rN z^U*U2LO``IhZ5`<@Tpkt0P>PiT<{nTH|2e7xPcFBj{KJA6c2+Dq?HMeiC~BjW?0FfYmoP(b;>z49zty)R|GKo`Nlb!A}* zgfvX4*x-EGmyB(e+(SoAf_rvi<)m9+P!xt@!)hr6O`=obb|nhY7Q80?Ny!MR&WW>J zPo1EkfRL|+FgZo-HDQLRiLv9bv^AVIh9)~T!O^;6-;}Aqe>3T27AHR`uXkV0tB6&* zt~H9&b)jX{30|{6W{%=!SW;y;EF!q>BBx)hl`P87G3k zJItr5R?`!2=KWrlnO2V@P`8VSptM^MU`!UFzSIG&|AW9ml|Y{8T~Y3c@C^>Awa%+& zvJ2+8@?ddiP!c4NMWfNS_&6*~s8^oFb^Alo^j zjHTkXRCXvnk$8ABii`0Acwz9GDVRrq$J<+!(7r+j`0G3fCX95-em)&>h5`vt;U+l= z1q=vUjPdwoEY~AsJwM7JX*!B>sCU>}b_P1T3?HCSlBJz{%BDlYha(l?YomjDmxYrB zV`VS2vh^)$=k6togiB~1S=LwKQ#b^%_0XtCR4bZeq7uN_K=n#{jELYo4P@ zsX?K(Fn$3HL6VkL(Jh_~;ZjhSqxB>T`99Aos77R3I+j;l6>o@ub$fjOvWfzsl0K>)@8E4W@I zmAw*Fn!Le4An01fEDOq22$6V?brp)3?<|aIB$72U&Qe+~(Mv3-?(_&;w<5Vwb7Dzt zdkv8DMJrp2bE;jujtJfNfeRIYc%~Bd`~YJcAeGg=OX5*HNxU9~(3eCa3^f3kXl~aP zk3da<7sDX~Xi&%)DEol7@S*fBPk3ImNc^iRGh!OxXuJUk*WfpTvCuDKl5x3qhueg8 zWJ$}-MTw9xP|c^tvLojqGyxNJi=;^AfOT!-hUTeO&6eQ((hTAYyK3gGKdw5Iu8T0;BeT+aiwg(k#{VnjH`I!_42 zk>5C707MIx+pP?^YF~7uDh#IqO4>g>b-fe4OGo;lXzj%5I`rIS27pu%>USipdT@Z9 z2AU*D!_rD5zohJAc4dlmlP;l`;<1Wj`WV=FLd6-cXLZeBPehVD%`f3&7#W==EXr{` z9I8F4Dy%>e1}&UgMQ>BViXbv#^}9l|3W+5b%uXSae{EFJmP-^KRKN4|(5mfENWwEg zH8pSrv!tYH14wlRR~t)S6_7EEqo8B=iI9S(JU}8ebks|dSd{_SjRfI2-=MCL;W#_v$p zg+y$u-fFIY2ryzry%10B!y!C248kTsAejqZxjwn3gErt%_()j zT#uuY^3)U%87SK!dV_}#WeJiQGNnwS-`4xa2vC8jk4ug3R;`bV5ZF8&kqi=IwN&}p zj|w3~Fed1%tt?uL@u`ELB7SUMNF`I)vEUcdT44t9Kvd13;&9aGq=m5(F1)q3FWKWdKhr^XQN$5GHz0AfLGr zY6B73={ zQNyEIAZ|=lg{dtZiin4yUQyt`IRGBJQlA8h;Y9g$1jvq}mV!$)LSWunMuvUWvi$B4 z>mow_I*PWBoQJUy9N1x0GqO6%dcniPBj|ZNy(cCt4IrsTtPu0@$9 zz}s1=%W{KCvQ7efNX2g#kOyex6$;5TI7O$@k^md_s@-7$6*Q7He~ZMHrG+ocF^0#+ z|JH;i%1*nUeuNNEyq2E^n0kVgAJ5LaSF@&Jx;3OJgKgQY7H+s+9-OR#(H8-3ggANF zB8uu>t_Pt4ow^h#nj|^oS99>4n+tSGyO9r1)bSg3BsMo7^6-R45i1Q`J@RE0L6v zc)QY^q3g^c4SHZxY8)yRiNkyTE`Yth$p2>6CebZh#(f5 z_ys+ciWa-{augitjDMpLlT&m%OULhDw-iu;QqDZE#2nJ2D@nxDQ?*z5+{a zyrowZW^Ry&eRDvF%9mlXW}YZs;ZzCk$}{zgit0b1op_+2#|Io>b$y_m8xIeLN~F9& z`o~c#n6ut*tAqhlQmWbG=4~|$0etSZFwGk^PEiz-l&*Dc0e-wnh_p#&_Bt{{tV_1% z$xXIbcBT7g;?p;sod^klHpIv(eZeG_)VHYr_`I zM-ppDs5YVsTgKLsSDzEr*M~K~1>~NlMNuJagn@F_QZ#Yh(l50y4>~BU56e@h+SBNu zL%gK_q7Fxcpli*dVQNAk`nrn2rnWR45FLoOX=s+9sJApKka`62MN**q8pud6w?6VV zeL;+Yqw-sTE6#}Q%y(2eush*q8N{Zv^faF2V~7ZN0*r83$Rs5P)Z}b%tYD3mQuGC) z5D7y_QoaLoHG_~n1qWUNq>W^cVV%K2%0}0sU$17roNBs+nlbG{q*_?o_u;A|lptO7 zkceuR5Y(K@KtTgmY%`}L9r-Mhm}+?!g}}O^USR9i5Q9xB(>eQ&5)dudg;{i= zWv8&`?MK{-=-jXb2~>s;iR-9p5Ria`YnOvea*9W(&0S{_WT?f!#{fIxI(o-3P=o-m zXaa<~O@q~ya&V~-x2yowWzK~!;8rd(Qi%GGY+8?G;0p-j&_Gt<%`jN}%JkyqR}^dk zGE6)Y0!7e1S3RJpka3tq9(2!I*bGN&4qNIl3COUk6HG-wSwrf+Mup()_WG)Z z5_gX^24Ppy1Yi6^TBAzUmPIH*X-zhQR$Q_Y1UZ6V$5%Gy$M2enCr^n^ zNJ4R;-Y?JIgQ+C!ibN##2M+NWday zE0?bM9z}L%LGdL1AkE0TqK&|bCdnK{sAaBHWu!3zE@~qDL%i#PTd@yDHaWB^00ExF z2h?VF07}TMBqzB>tC58tO9bR4^gr=f%B1#!lvsC=bCQb|D+QNgi$0uuGNTLBDc z6VT9&g^wsL(O9AfUMp4RjdkjK7E3UZX|2jj^k7WG4GCsh@vTPvEciQz(#RQWqLT%A zkFaZ*F@VClGwmn?M3^Q-sRSV3P@=&}OE3CrE>QRhW^q>{hb+lNg_~0Ld3MDEA0gdA zE+QdWmCYCuaB|wqen@Sr@uy*X;1Q>ef3Flu@4#AX$x@L>Scn7m-!>bWfALQHmR>o3*959IgE0W!kTazE(F@yT>&M4(LvZ+Ng4uimj*`v}v#78z(U4)~h< zAHashs>HHm9ZYhitiL?_rYGhW&%$n@u)3J6nI%nJMCH}*A_Q?L`g-6Bns65IkBL*} zAJn^He`tGG@!_Q1T?Vpl)!~!*jMlPk2*|D^aY5&VByX97AxsvVD}lEjQ2!$H;yTHm z4luJYwaP`oRhAZw;2h`Lci^EZKWIb?xKFv!(agb&U=Ul!mSoq}@Qo4|tm_~~2}sp~ zK8#h>EFM}BlnL=(9Fu8s2gV1WdGgWg_ptD6OF5M!7AR5WDV4BiRYQxmL_SM>>K0^T zu3GhK_9YZkVyTVIgILD^yldAe*^qwD4nm1h4;E3AH7LMKZ4jB(NCK%RjB5mpZ>|XW zf<}-{0e%w9>=(35^Yc+?{@2$dWxSalQ>0L@X_Den*bpfiIOjph)AFda?3g<1O7P-| zMB(hfqsmo^B&b{RBR$y3!2{751qjKzH;px@8H|wU;|3~GoHC?}HN*~de7VAyJ9?Fe zv|L|+^MKJ1s<9Ux?#5>7c<2Ai=&E?J;LbPa3E={mLycogMWm>@bPUp*vPUYH0%!%P z;@L_iL_$|%-AI1Ib(z^0a%T?#!J3CmakdnyMS z$F092U9c==+u0rVK5(5y4k_YV$e9uaZ!=e$vJ1tITTfY0%=-r#Sbkq}4?xuPHi$fN zP_FB^`Tj_bq>Mao`>w}`DBVhKvbQ+8ckr;MNj zVBkI_K{II$rD!unm(<-@gXB03Nzi|(1skSWps5w878I+E0sL@m2~)0sK@C0!k*tCw z=qUqd@-`hpF;wDiPG&@d=>x*P;Vhi%14*S^4?t{FJ`PG_#fKj_+GJy!vO&^nA>qqj zW%E@QmCkCoW5wXjkztU>N_tjx80y5RFF{JQND{zQ^Pmb#4l|z{&m-WkFPmPY+{7^m zPolHDEkqkt0x&82K&Qrf$;h5}EDKaBd^8*}kctEH{X&R(Fzb^eYI`v+120Y^<=Yc5 zoD6zv%UMb_IQb4!WDBVf2n$$f*v9&zLpkmxVNP5SQn9v`nbgEK9GwewjVWYgA#bKm zsFT1JyA!U$O=z_>AQM(mdyA493l+5{^I+vfJt%z6$B@T0L`90 zeF@t}tW+RbG2?TvO7k8L+sAMrW)H$SN*l?+ZtS!W+#Iv%Ef6-;G15km*%;Mcfh~J* zL^bLQD!`=LBA7)-PKg$uk2OXGA!@pavXcy-cy624`rJExomCBzNNPt&b%OMEhB9C| zTn4tmg>P#ii< zxdS~o3mt!o)F@@ui>Pk+&$6q(0C@)#3E!4t7d9pvsKo{%^)pH!i^#bE0%NL`3lvFu z*`s_mc%rb)`t4?U5~x4Q1MSM50uU;N*ekhd<;LENCe(ZSnR(P*nwiim`hzQ1JsN}? zd$0~JrYa4dcte7QGlog>xF`bOjAPV*n5K5Xdh@rZ)0bAAQy?n#d!0|v~C@v3z zU}<|q7D-8rc)T}akdg>~u(tJe%bE$eNjF$Ji3O!Dfx16116xlv7N<%_UFot9TqjwxzOKxL!K#>poH9b-%UkqZ*#h`X zhDG(1FebeVx|nz`IHv(wNu?MMJ+|04yBn(l=IdsV+A(?7tlAj_6IuWSLX{vupG3Ui zRBCb7+&-_wQGcTB>~!Ua`0czo#3*qpxgVWY0?SO zCmbJhWPF0tnmv?j0%cMas4WdD0262e)?PIMYo)U{Fbp~uY3)#Sbn|8a3;B+LD~%i{ zO$DYFJTg-#~ z<^;QK3D~oTAe5wTO@ zHR^x(-H*OTy?^R8>i_5^>W7wAxB2+#CmVeB z!_CPzyW6Xa^Xtv;&+oq8eRF>253e?VxVgC6-MzoJIeGPJ^JTyBX7lCl&F=Qw-Q_)R z4BT8^UEFQH+P%EGUZ0)aT;F|u{o-cxaR1krZ(o1^Pv7ot-(1~XZ$5UBpKNY-=a)Cv zuikGicQ4jwzuGI*drBXE`M>2A>YqNoceLH#+|`@2t9QH0FRtz`zTUhzfAwZJfB)0( zQJ>|UXY84Y2a-xgEU|4}ulyv_BJs^Xjo9BONTn52RmfU;0?4I1M`?)99C z5!t$#!N4%+4?gO3HEe@&iLKCdO4?9h)^5&0*hKbb*l|DTmLeEQ$M8Ich;pMOlYevC zxGsu&zF3tR9!VDsmZkbad90q&+5GUpYX$M4iYhLQv6VF=qY*)kz*b4ZU<|k*>B!QQ zHd1KaC`v?dgHS;`P-?2Pls3lZ-w z1t29BArt{<1!0pJpp_a|5QuRY5F3(90z+{yiXvw{1V#qJhmy`+*S~@HpFUDGc4d_3 zjWnp$L@+^xVXQ$yPB#w`&*H0snV^&EqBw*E1Z};|1{>C?V2PUVLXl+1YWgE*ESL>LsPdSmuw(k2j)2Iz-y4UJdj(?4E?-fH z2UC2ybmXgosv!reZhtq4ro zF$@c~E3za*9lN$U=BN-S6a}Mr#0%QQLvAYVjb8)FRKfhiO03Aae0Q)YCfRx^RaAGq zQ*(wlsFO{vgznW}sYVaH+R!e@2aP%5`A}3^2K9npXUr#gprBP|`n6D*IHnrO zur>KP(<4=OeXRXq8R-vE$LWwBt!8MYLG%%;3#yL?xMO7<>f`bg7&yCyjH3V)W(dL7 zPIz&wVcpupPzZ6voQ|Bpz$R~kD98B1G6@3bH@CRn5U0s%2*TsZFo}t zN+7G$U3?08mwKV9FsgXLoBEUWAR19E zIyJ(vqc7GpyOxp6&7v~pzTSj}*dQC$|AQ3qPmPPBLznS91>}e@rlwM;cmz~hC00{9 zQ9&vj4^Tzs3FH2;02!5|x5rL^iOIt+a@A0TKd`O2B2}IgqY7MfCSK78=tbdau}Bfo zQ4Z3LIO;iD5D$G!j4TO!$~L@5?j4Pu^fU{Jo6F;#HUSJEVr^KZ&aTK_%Qvl6FSQ^b zD~SCF{H%5G1)GS$dKeN>*&bKEx&VWpFzvN(bXza1*5EUdpYfM2O!XBtBy}p)({le4KIcOjXc|UuMM{Vai&QiYr%OdD_EAMNQ z^B38}EiONdiWb?2LQt87)B#5;2P(T=UTWMX z?RW)s#QQc5T;O--B@c`aT&AM6u13d!jMHXlFtSrDB4CYbQ)6r~SpeUm(nl;?JxU9% zfX<3mc1-aNb{X=!SIeROsC#ghb1pBS#q2MXFBX~jPTDse&4*JiX*U#5540RNz8T#j zjd96Q>0Ph<5Q=s@yRK<-#BFPIFt*jPW3SS<#ud`QCGlR{HUy;ePf&Cb3qwB&Xz3AmprgQ}o4*K*>Fz zb3;ciuH01q!r?Uf;vi@=EC&AF{MBcHwaP;z(D>;RCRaQl8oHK zKE5c8%aaU|%_~~~13QZ_)MOpQ5NgGt&Vmrj!U2>ugR!pUPPSnfEe(H-+_X(4V#@_u zT8E90zHgE4_*g^vUXGytB>+98s9 z$Up{Z4Q`?XHigoTVPGjo>*3=QVrkM|9t5rs!jx_X6?CO71*a#UX&nb( zC+3(F>= z;md7#T!rF{Tn13&lV%SIs30yyM4<(3Uq3rlMKso}1{7iz#eV~5Is35VapA!6-XjbX zgT90#*pdbcOtH$VS^-y!H5{ehN}Jvv1Qc*XwUM1U{#$n^ypgibsV=P}f9bapgvm={ zW@RA1AI#_e@XU3PHU!b`lg4c}kAmey=tZDHq9{+QIssMdJQ>{QN?{DR>Hf+lwO+5- z6y4Rp4Gqd`t%KvxL@;iLls>|w*solHV%ay8{CIPz%w@~)eW$5A?PbU*)M&i{$TkV= zUQdXk4`)tr(b>V@YtvBOWj(2==g5v@%qN^_S90V^OV2o7IQ*c^nFuSa%f}jdONC;>P+Y}|beqn{73nV7TO7Jj^1uUjpD^vLl z5%a;_9G@4XgTPO%x2IKMq##K}6{Ajd&&0=kI`%V2n=75yD0?Ts)Sw)`b=pG2!MwoS zTEKHS=ON8uth|bRNcz@9f0>)uuH;EhrGlc^k;#65xefw@vZ5~_06+x>NeUn}R*=-o z1A~_W8ZDxu9Qy9ndm^m=zl1CLAWkF>M7>LM3G9ZXraa=>d|Z1iq_$#ed4;Eqm7-yv za3JaWKm*WtD_bpY$+b>-wonZT0+iMn#${`uIH1SC$^t>1bueX}q57;GQoBv?1`TBi zqXBXU@dWhRB`yV(5}d+b;$hj!5~5Zk(IcaaJY;_)gJ6bKl5!%8e$idL1(4XBlkH_E znVPAB8=~r6UwG{Vio9B~WQmSSY(Dh?fD=#}bp(mX=Ww$UNV-AiM7y_=A2q2@GC=2o(D(SRDD@U1auyn}lpNt57ajvZ;2k~uDuh(7NSIQz zBiZ2yfKH?4BoE0G78QHgLbrmdon3ZTB3Q0WT!Lz2*=P-*q$^<#7OrhxHF=c*#on2TG-}`W zKx8e|8lM4IkaQ#KqE)zhe7;D}B*={AYdhNHQ}1&3o6WPOijaX?qq<*p2{6GVifM`Q ze4SB|OT}33MtU@ORXK{yLsdl5_0((=MFTliN1;l|PH=Sb88eR+pm93fk`=O;us?S=UxJjH5p~!AeXg9pr{c^RX}*XP2w}f~VMJ zx-B_cKJptjH5-p6b_m7p;q_!#V%}GNvq^D`RfcDDa9H6N%kN{GD!~+^EY!7aj{yE> znj1!xR#4e7dO2yK3N6^S@~%N(iNdln!*%2cYbR7$JBXGI5W-A-!n|Y^q7YX#s6whL zD_XkW2ZHQm9yxB1MljjP+;%-tzaoFTCoSoCMogr7h%w7DGjC}OH~CY0jQ$DfxcG@O}!uRo@4R%Qmxg6@F5p(TBn00W%U%`@sNMwH;5oeoupHDgqRZcC@sb)XQAs00D)h_T2Wc zyM$gEccc96ipsoWUbX7j+ZN4?!?FeK?MxLgK0sO$6!_H%!|a=&GFKB9lz6A)Y0{L( zr_o2Y$mee*C6B~n`PXkjaZ;Vg*i?WzE=%u-FtG@k0qbH;l@mqfAZtTabC&xAdX>}K4M><+8r(lG!n-nw=q};dHvJ{YM4wdpdY8S7e_dCmP`->WKkV?&Vg>O!us_24;O3 zq7VVy(KH?tGVVPNh@Tod(EW{V!Ai1(24>)+=F@3@#2bo#&Fgg@plOgy|0dI#jcFTO z5zK&iUmq&(M-M~|D4T_bpFLWE7FDY=gv;jMt4cAY$I~!V5Z)1tYzx3pEz5f2*xEF? zUi`e>aF*Ks7x<7L)EIgLlYUb4DLA#U=3b{g+yW+;gc z1v=I7Ig)%S+|auru@(woi9ra7*LTCtpYAv{^s|+5!-gtp*zhu>qbtHPIyQj7-D+y3 z`gp=zOpT3%g`IpPGAEAU>7_lwxfLLb0rt%jQpe~!Q{c%4d^^Ac0EmQhj)X-Y587n#7lX~f~hQkc&wmHz}GfYz^7`*md3HM zjAamb8k0t25f===EJ*1l7uzDBC7urnWjkhtS9D@?k`5s!zc>34!m=m%f@xn)dGxwPS)TXT2Uc{G$H8=E7;Y*RsMO0y{^Rga=^xNLch z;|rinBA1)NL)ZXbbPA z8?v=#0rkO(|K2HMv-e^f(m2MTp+YendJFOG6i-(3Din1+dfGF9r#%~oRbe+>?OuyF zCA4kB^<2oSu__REK4a*@7sFf%fU*?VI+_HV=Ydz$MsP^(qL`A0 z>mFAo6c8*G97=DeOUe)(l+`A{gNTAgvON}4E$R+cavqH0Q{$$eSG_5XtJcs!2s=OI zVyqSeuOy>zQ-jfM;1L44k`Cu1McM{LJN_^I)mT=n02)?v!~9=ml%>J|*iJb@fe1lN z-rzAt_YenI0i0h03%~-A-?xfFEXmp{oDY?(plOPO;U%bjP+RH}$)pEHZ$~c*H+Ecg zNDMb^GQ${As`pD&R6@7Xrs}FtMf~;P(HeGnlj>2FDiYn+>M|BKjyd(G2x^PSmBzKm z+IC&T2n8&vNX zw$W(>Kz&@%@zrW}ux%uqCvSQEfboPqdN5(%TCZ6QG|>51y9$;_~$l5u#XeHJ{eJ18`{KMh1(g{krMgv?}$2 zuPne@9;8A{zo3F7kUErcP_6$Kzp2c$as*+vd?(xIxIHjWQEb<0%EALR63r1b_aAb! zwnAbp zCB~_VEMh#3xBfK#j+IgcWrX?!j~oOELRpwKQxRiEoebhH^NRxOO69&oE(LEAZ1nwK*5JH9j& zm>QFXU-m4sy7)D?+T+LFI~UkI1+*p(RBhgQ=MY7QAOg174M;I=47{$JRO1~gH;zen zEB4u0LH$+w^5KBSLXDy=0l~2~kpV9ApNL9Ci7yjOve6pUWVC|jZ79u(rGYX(X1dRbq~Q!Zk>4jb<=&&c-3uJO01Kbus zz#pvFD{tb}0V{e{&08u`P+8-jAH%Fr1IPk&F)R)yA~lI3prQaAWOxLfI78Xy^2H-X zC{P@GQ-{|Akt*VaM_5DBvg`wlUn<4?g7O$)zp*J?w+j(hQcF2X@CG^4eRL~ z7DlCb9XrTm_G*S3;XlU&I9-_X0DXmSUGWARXk-HZz{ZC-Jv>+#D}azJsY>Y9MS}sF z6;YgR0MBXDAv~k&u%li`WSgI{k>C`hN&wJv5>TpqoL|UBqQG_dNJXx(r(y#VTgJ1d zLNa{q2^kmznDe8dU7!&OOtI(ua#Z0`nQlnhAfNrkOOH3upQh0s;E#q)Yoqz|bBLQVUUk0l1Y%5W z=Tf<-4}nGD+4x48X&RCf@bvJtz0nA(nkOw8CB{a})>NY^UIg3(W(J1hV0w3LN0X|l zWD?-TGp;Y3s!gZmN2INBhUo5u)W;z6)zd3mklR~900;iYC5VY><-RdV3P#eeRm&iY zk;=GAu}Q*`kOQErL`X$O>dP$E)|e;_&-5aH{UoF<8Zt}O3K1+)T4$5Hdt zYk4C9gYUAj`p@O}0&Ef6(~wYC(+E&}5|D8wHVbsY@L?g{PoYbtCi_F{(k=3aeMvVX z`I~41~%YKF$wrcF zpy-~+E_F^Lpky|xL`}-HymPO~(t zPfe6UFEQbM2N$D)1vVJQ9C0eG1K312QCHY;CoA(+#3c`6q7sYwW`wE29PztqfHybTp6iUU{0TcM5<3z)=#Vxb zhMvKp!b9e<!%QYHYAsV`MjSB*+{0!fS6V<5RH$aT$yelUE#gUz8~ zfjDnwDAJOxkd`P;nz#Ujxq>Q^A?aCQ!6G|X!J($8Cs52y(h<;nenY!RdLkg1%-cS# zULnukX)K81i{(oQ!-g7J1M})zwG-kG9aLPFXBO9+u>-o}?7^c+=)_lr3Tj6DrrhYc z1TawbWGN+o2T|mK0dTld97=@APcB_BB8J#w>7%AK zF|eqTk=PJqLM=)IpQz%HR&wyUDLta7eL(@u=z6CD&-&(+GRC-YI$L@Z4xq6-hAV>b z2p2mKml&vawsNp22K@?vBaW+pGBYS%gjBgoz!InFjH)hvW$TU@C-x0?@lk+fgkKaN zUYdw5j-%wTd@2IRjm)ARQ^Tvva430*gjj#(UlIX3R>F>Bz%yfYeO2OX7Gs&tE+URw zOrIOIZ6cj1A&MkyBM<**$}B*z7~cUk0c}7{rL@B{*b7LbL^%?q&jh(tEaD^pCtqgj zKyb+|_JiF{{b3|0+zJEoge$|0*5>K|*aY@XQ)5q7o-;0T2ii{T`N9kW4RNWGDWxO&X-2@ZE-h=oNMgTp}t01SDR zBf~X6R{N-=nEApNR!Ujpw^Wyrycj|55G;%&>7TI~H9A6*cop25WfTwnwAxSIU4dku z2;e9SVhG_9<>BF@8l1TLX$j!0%XP3KQqXd~ltxfbW;~K=& z0~QL;*a|`)fTASKsv#yy_D#ITm`UA@zEKJ2ZO)k8KFM=U`V_PbM^MGv*seoqMB&Z8 zNvcJO!4v|aJ;orJL|8|Lv(ShSS>LPyilCs1YfHKj2%R7TU5sEB2TT*57Bh%L5{Xf3 zsO-FFL~Zq$sO5@}&G{gs*xS9P3UxNIKQ$37sp@2@7YKAU;PC=N3IgRo=^r~Hm(Uli ziyg&E4bbsJr4NE{GOM{nZopZlE#OZpU7~74968gz5jRc7VWFs>(Nw91IwF8NDGA@g z5ko4e$%JESj`~qj;E&DiN?t;)2;s>02FjT;LtmE{>|#LQ!5~s|Zz1pknYCj|6}Zg0 zwdHsBl-CqC%owIE-%jJwP?3+qRrujI0ZUL82wL}&Uf}=a+OTEh2Lg~(suZA@dly?y zV;kDOaDZWA6k-*U;>>L-+=w0qhY2T8Hv3_M2k6O8gwbIuYxFF?6;i-1!R;e*=Z(Tx zeW!_ji$t}oBq=amYK+v7o&lS>rj0Iga@Z&VKc101Lv2;Hf_N^_los6qvXq-mttvh> zIZ#m^Z1#jXqOh}wY6TkR3zne?x?oC1N<4}JcuxI`zD6)awew?SauE&*5cf@A5>Ie0 z87yp8-KNS=AK@GtX}}*&IhA;Q3r+#wn3GcG1{~n}-XwtvYkr#uh6wU>q=Vpxnj|Za zbwCN_886{07vyQ`3r3EQOMJ#fvz4hcd?;F2HiWklonTHEsjSX<#+~;(>jzIj_ZCyG zG;542k_*t}dyKL1`08lq$|1rvA~YjkW7>c|+Z4C~9~*(?+^J@%bqVSW&#*Gbz1ZII zbZX}e=5u-?i(_nZEo(bn9GVY$3Tu2QA*kT_jk3*jr1-wmlM6N9m!wEt-0%656Nna z8EF$LB(-SZ+aL@#gdIb@qtf`Hth~ch<6KH}x1Q{Z)r_V7@$OI@BA(;b6hKd|l8_M9YtUO?l7`ed#Q#TrS zSyAFa`F5QQR+(sN_Jc4|6N6m*6_0<^XX4IT8ClpJbDOqnIF3u9P8OAg*a(0Cp@UIgm}*kZrc z2Zs0sGOgG;T(s1R>6So;VNl4NnaR;lsM2hq=ujbx%2UK=8iSU3xujtG%I*7itcP%n zB`}A<9oKRR|9ik=3Bx#x>|$VLpHdh%AgViNO@ehr^{qCqh4U4P)(?RcZ?=^1B4D(& zqyRPu+Iyo{^nNsHkK?7O_q>fTGquvb&D!9cDJW`ps6tm5D0>_Pl~WENAWNK;t2qCm zQPdKBlL?s0+sp{jM06hc2g53=^3r;~>S$zAZ29SmOsQ`RjVkmhS3GHUb7)HCXNhua zaG^G~6K016bWGTWB024q158sG_~$d7mDF&jSqbU1qYlihSM4Yn)7ID~8uMVeoCJzX zl7s_m{u8o4Vitdj8p@)9xM!WUl9*5Bt%Aj5A_@iM4Jud+boej)pWi;<|7oDZ>7Rad zphN%EKnE?~AAR&xpZ%Tb3D3^&c2AntaDQ{Q`^ta#-zUdMPrT#$KRnXm;Pk_}3cuP= zho01jU;ZnY6I-hGR_R6krz%@f}da%@jLw) zLSR=wRN&q8dDCAxBh`aYXKjxFg&&1^*&zV>%n^vFUh_>vB-?`$5;9F0ED2FhubSf2 zmC@0eiU23MTKee?Xg~nrOwI<&qT7&4D&FuIlR&)?5Ud=hXjI>rrXYK`g9tAbe{Czd za*~a4Q%Z7FWX1-L8MB6XR}>axT9pwpuYRWnA*ud`3YA|G4!|MqSuu@9QJZ1=8H40l zbYEUqB^1?rvREk=Lkk|dYC;97O$kD@_F4*rd6SJ$D)3LE6R1nE3>tG%t`KW=rjm73 zp-?0sU>_hV%l+^P=+eXrU4)n99O82RGt_n7Fozn3beS;Ds}Lh=9D;tdsFB09#>>?v*3}iuyhAE ziUYehaJ%MuNc-5f+nKez-8(pG9_U|`Jju z6;N~|OI0q+zIZ!Dbn1F9C*gKf;Q-bsJLYm1&C$XE!`0ph>QpziseMgHSBZA+oIKqz zVt^KtChSpTD0_A`CkuYW_yH}B^)q}ru>8mFp^tKf0K1T;h@W=`R+_A4q9{77%T7J<2n=b92l z^sD1WRf5%Xz_9l@f>M$y>fjO5aE(fg(VA3{(|i(&OBR5(cz9Q>gcFE$uOFYIK(Ikn zh#bC(ApC}%bTOI+$*fH@}3Wi#XxI~b`_{rj4(+nL&!XzTFNs+`P z1uce2dE|?;h&1EWbQ8&eL~nSk`?NP2#w{Wy1*^H9U{V~IGXi$QkE*(5K2Ds_xb_AZ(!Q?IAyH)RsihR84 zA*CKq7ZHfb0&|AI(4C4}#j)|Fh{ecp>xE8o7sL#i$ti4d2MUD)kgH47S)L!GWu#?EuakP*zbd5CJ z4>6D}R0Za1-8p9oUWJc2eqMhAQ_J3~&Hawjs&7hbtJXw&&^Gmo0(Wi0XA$#089WzF zS8XO8@Zz{kb|o58{kNz{OhP7@ibGmf{E`;gyvbV3wi%_$q#$Iz%h3^1Pb>9V49Vgl((Cv3=Xx<3L|LDe-U8fhjy~il zNfUGuA;o&i9zG%@)7=ZgD+S@!7EObfE5hgCSt@`#P7TXWb z#DUrFc2EXxaz>4zPAJ&q>FGyzzYq$)F#<`(BYc2yy<=@jVl$&9^s8PJWEcX499H+h z@^3bX$n#Ip(dkY_2I zuH4zgAs6pS*=Aw~)`@Y;KWkw?GS>~6ZCgn6bKErgK#Z$EKT7w^asWjyT!?iGabU7@ zbA$J6uyl0ntOUY3BTncEX$}Gx5SXgn!!3ig3|yhddW{*D#b8EshywkG6laS;)WI7% zs&ryzy%L=ecZoW~>(4YF03els5GtmyjZ6<>?J9>TURfk{y4Yugnb>0==N7Vm^*&2T ze2=(0Tp@Fra|LYI6GAb~k^Bh2u%#Ptfzjq96Eiug6gU1TqiWR?=BheC0-g%WumoQe zq#Qym#3P{1-qvAR9 zTW&&zEvr;T;Hgu0?Zny}tPF1xp4GFHkW_9yHQPUHp`Y)CM)aewmYR&ZEVOwFj%s$v zY!z-+Ceg)1EwFusK--wwsd7|oWyAJtR88s?3A(Y?)+OaYa}(p1m}18XRSF^TN=56` zWYU84d+b@@8Yx3i%LXpN=55X!!b)U747*Cbc|eFb&*aEfqoGWNLpz}wS$P6Oc(sXf zcD*k5Ch|~M+0;`A#Uip2UEcOVw2nL17jHGbfi$X*}CxTHqAjVJv zWzh(gvdwmpxX73aye2SNEwa5$DeJLI(g;ajQj@UnoHx)|LE$#xF$WCs4!%&`fW+F* zq=gI>VxQ`=Grv?Toe8M|K@MW{ZU(ggze*Kf{n$JSEWq+JoZghh=^7~mdT4dgJ5`n2 zDOOJVbQD@AF<)*4j(XV!^)ASQ@+X+1@pYl707N4B0X|?k6Ws{>r86y3pcfXQv1d+i zg$omPZ>vEe0IoBlL^V7y(W4QS`F}`d9w4h%ji1y2<{2wZ-TMN?lZD+eB^B1vRe=JejomC# zyPP^c^BLAbCBBPz&cAT}sOBaJRoj*)RilPFjZ_CPh{CiN8&Lh}7RInx=_+LUJu<)Q z-;QG3WnF-62n5a_E+JzI@_`QnHlQ~(7^%0kzF8}v5C(@%6i>4r)j=z)Lk8;!cRK^zJ(I(PyjPqs?(v! zb}G;~>XrxycgB09^B!%~@IkzlSg2YsCME14`H5dmU{mt}%c>;z-1H3~nDi%j)8OMQ zwGU7R)dn&K^)!!UhAf3=-AoN^!CCSDYPV1yGE?D6O`!A5fEpZ`7exK8lEv~gl-}t< zgq*o(AqUvCZ^9+^CprjE22dU8ig8p0e&!=7#uEhAmE~a$z!fQ^sUW7H*C5cu8^)XMbKrt2!sEIbT{NX)tE?;SNKjG7#M6oRzM^XgGsz`JML6|$!A z@ACoOdZ`?&S`1+ccdh{d2vqzKw6iq(TPU7ps$?{_OMS~p6?hVDK|8ZduVi{> zs-bL6jxgHPgX0Rac7iL^-K@)6GO|B*>M&*XKiN5rAV4z#cx5r=DJ;@E#nkZH6KpGJ zUZlXVpr*Mr1QLCym@|D2+G%7|G2Y&WaDf)JM=me@+Zs?B*;z^e8k8WAQq~U`r5=Zl zEzK7pGKL)3O%2g;*CQcA^VOIw!*qrZ1YQtL4bZ|;AxPE8ep^qr!i}v1DwVL+qR0-| zTYoEVLI%NXt9V#7S_#FD189qikmVrBx)z@LPUT~{1jGeCcme3sMtA6S@C-PSfKP%w zDz3pcTo)sW^QZA&+8PZ=3Y;~mAr2WRs=Q%|^gv~2)r!EU23M0d%aIQa?nY!5uhDu+ zMfu6wzCA)YI{|d|C97UlckvfQ5yIz=W&LKEBb%0x zP0not*{B}R#r5`877*F!W^uqmmP0V_TvV5+?S*r*a8x8=Kjx(1Ao`$Aap=zT5{#T- zJOP@f)><2V2w#>k3xx=Akn10+P4y9(Nd3=L;M<^N0Z4>(YV>P{+7P2kY2if$0}Q}J z+;vUjl@e6&ED=1XMUKcxW~4|;sE?Q%0XFO)N$UePsRyxSW$ZnBl%OF zIy77qk*-8Q*UrKK$+_Z~WZi3jxn_|?qFeJC*c4TZ772njbR)Xa*;**V85bh@$9mL`5@;P#()qW0|>Xav;8&S9%Dsabu3 zE+Qe{ZTc5s0PM^ZX~}VBa9cWw1=J+MfvN<==(|!V#qM>*Fd3(3o~h;pdtN#z$Xl)g zXp^YjbZx;L`*wE9lwZ?9E$oQ-Xb286{qaf;7IN_%cfqEo&@eDk*@Z%vXJr->fce$c zIRFtG5iBErsa-6*jVK-vF5pD51t7Fz8L*fpb-yxiK~Ij6T}36O)?s8C!m01V$MmkR zOwLi}Hd6iKu1sRx!zw^GngQ2Ac4_)1xFa{_?P|UU1nzXpP7RiW1#|`xMSVLZ05lz2 z4kA^EM6!77?xRE^r7N4{T6jk1bZy<(tX!K$)L0P3RswG>O`twwk8Psp!ciHI0jn+umBk7=L1QQrL`BLD0zsa%Ulj;CLK@brdC)?79`?Pbt@i9SiEOS4{X`xq%u$=N zyPkeFG6PDbNQXeaRs49)78G9;zw1b11aK(ku=r7O6c$89>NJYy_2i)VVF0M#O9#QAs0|Yk2`6x+_T+*fm+3+hP?+`$pfUpG^S>x^JL^lE(jd?Za*q$OTMr48fv!WZxuRCelj9~u;XlTT`fty#Lmt;4Xpu;uFhHomS3X57a|lq= zb$1b^s2awCO4Ud{wVnqE?KEnpPH5*r1Gp*#^Q#-n(Sv0apwc|>tVauSX&63@Wrl?T zC$?YM0Ug=6bZW(;WzP#G3P80~198TLfb=fC_;BAewGUj0y@g!Z-|#!c2=!UO#)}%s zTu!Q>>;^#yBmpHbxehZ0#8QwP3;PNLL2H2ZaB0e#TPh~H)=Y~Iqos&lxA@+0<*Lc6 z3JuSK_G@aC1C2PW0T1f~{gqp|bd7V=z$Kj^h@ftp5SuCes4rj%Ei`U{Ibq+b*;}za zM-;0Y@N|44DoneBV}kmr!@vmiup5U5a!}Ng)6n>;pwvpiOc1ecP)U$=;^@g~+B;oO z$jL0)xNn(FJW-X@YS2J*+mD3U1R`ZVXh!MxaEvYkKF-)B)fJ+$5`=jl7hX*P=!9#5 z3;+q2flZI=caF>4a=qHq>PlqC`L8pZG+G}Fg{O)@5R=`?U1Fou4As+(s1)&SIZ`In zPn)UI#b^SfpiK@GVNZ!At4YGD5@9%NwOKYqo<^4fz@n0=GstC(Zd$i@DX2kIl^7h= ztsIe~A~9akPf{UhsW&}EzEti39_q@|JpXcyM`{uZ?H!;GABn9vdz}N^!eF|7j>;)} z$Qnc(*#}mZyNA4J#zsV^DQCxvj7T+%9Bd*E4#K2?TsiJnP>O19kWkz&*^L6?K~plF z2bWv0Tb{FWxEZRf7{aoR+ObMlQNASPo5yIq@X!r#6_VVM?^EupOG&0qhu^Jf1Mqid z>!eCmMAg^-nsuPb)S6a$Q+iYWT39T0>^13PF#)N`p>pY#-K8||;n{Lv8O6lm(nnKc zqie(6+Az#E6bC2D#;EyOW3T^}V?6`(VPY%FHWeC7b787`u|`FiREu>0KLLJUsSSjd z59Y}e_E74wPr^J&JL6ohqDHq8SQgfK|e+`Pbm5U?o3YJ3ZO zHXRW)*PKRp2Lw=7dYnMGCmoad9a@l`<{wVWrE zX{*uvBeDBjAPCZ?C<$(GI$_L5DKTXW$lo^5C)8F}vh{X5$BPfi$f~AuVd4-ixOI$T zC6Gu{L8^XJd8&*^0NhBRoB0{Ghc)ogAd{}-hHApW>|3C-jEGxh&M^r9V5mUAhgEt5 zZnl7pMAH@TU~ol;&|uO~q%;QI?!+oJRWzj(NAK1&nTkG5`h;5L3fiZ#NWhl8)+2r{HAj&RK*X9Zl0 znotFR)>1CAd{Ov$4g|rby@=ShEP6D3kaR8~0Vn_m;sXGMf_r1L{>EO{Zs!p|)Voe~ zU1>BtPp|yRa^A~h@IK5~X;8bg2vzU;e9xO^!ajmA3Rt0|tzJ4$al~&B$EM!N(>dsrKqJ5-g_ay28!LM)@eAX%8ei<>KS} z#x()dapNjYwF6HV6&HJeZ({opeB@hX3yP8;ZbxLTvB&W0u&Wsd&^mbDm|=X6T3W`G z+u?LCI~l9yT^+uQdcf@7+4Et#jF)Kg=)akWDG1dHwIVgNRS*A z^0biP5juNvloRXWk&TgnLNJaZf)P3qkpNRz2~`Am3lMfXEP{c+XG4R` z`H)j9PQY-Un<#swt}7Mna-E8Ywk3Qp=ePbsT0pPuaiV$|NR!rKBwDM|MUbIBH#z{~ zA;UF7!+s~FdLK8!h&pP|sIsjH_MA9`fYvF-F{r9UXkmKbUXKY2VIv7R5dB05CJqo$ zn!(`OL+A=MC$N~6!NF7pYZJ1kWHfd%ys78ScmiB${S$FHB*jo=lTuHW9C4+ZQ!r(( zmHy#ZFc#~;q=1lep5bgUaY`pKhOM}+S>>b;S12grr&$YIV<7=9$DWs0s6jd_OBIVE zIbKE#^SRP|{saGP12H%__f{MEiT|uO+6~5!BqyxX)3%=bmz;_>E^Ey6~ zlP5q`2Cb506dHx2z8d=^Wf_wOL~fRxyqUZP&fii~=^ zh`^7)h)gQ`M{!YNa~+NY6p8QED9#VcrD71Y*5*!<*NY_0r!|5*bouxmG>Zc-fo6wx zW>Gmj1!5w_c_xoLkhFMTLw@z(urAGQk*wv;nz0kAg7FpuPorMZeg?q++tyJT0#c|m zdM$wr0BSS?j}1m^VYWS9k~D17C-5`2AQ(?IPP+{UC(mi%p(SG4X&lpHnjj08_z}3b6rpf{ucfep6*GjstZbbCf;5I30p{Q# zJJO~#P?D!|rF~UPn(QnTUi<0+?i7Qs9Cky})AT{Hjw0 zT=-8$ty34Wx5V5@A_sFU6Eu`0zL&McCF>6BD0!?D4{tB3z#2A4ju*{ZWsK%!0BU;^ zn0bc@5&p5l1%Hh(cI`&on!h3uur=f{HY5fO3!}@DjDlw8#Epu#fM2|Zv`GodViYp+ zt~)!CS}LYPeZBW0OG25xu|}5El@m1#x`7Gpa*UOoOoJ6OO-d!r8g{q{peivwJB_JL z&XP{$awIFgwQg`mU6`R)^3mtxAnIT+C<0upQ<^~G8l%Rg?l8CENWCV6{UZ01enbZd zGDbBucVJr8bix&o)RA&3YCI7I8WUUu9twM9bVr)<2!n!v0njj_22s8QXHQVFBTFwF zvP*R<9H9*r0MTvTblP}dbOs|#q*aIfL2+B8&m#D1|FJmJ1qq?tH@ZI{9AQbE=F6Fr(A^U(Bm z-wIr)YcgdEqV}TLtlmk%By^Ape7{l_b8C+SD77}@RqRbqn`|s{X40}j@C>qKW?+75 zjsS5QJmrY-hvp7I^j}Riw%m3bh=P0KZ!av}6VUbLlx^8t0d&V?ZF`IDIoJAxI zKc%E9u6F_T@z?B(eYex?V<5xJ60~mCEdl^Ur?b5XqX0O>!P4S%%82s3qX~L?A%!Q6 z?eY!10Yp=CUOG6K70Q>FIbFVAtoIju6d;`f(Lzgx9g7-w^lOa8Z)5%IwUz%xOR9jP z2BMXP^E|=3WLoCa_7HB{1_$D8IaHXmO-GQQQ{zNn(XgT8)#Q?jQ#6_rq729bynR2O zi)afsn})WUd7xFH(Swcf3{(X-MZzX&WnEWjiuL9nP!zv{>+o8w`nGc~aLfG*s*wXgy>PP{uPQZnUR zRWo_u7CJwVAX-~eC>VFcRGPfh##Cmb4qUy+4xvkPXf74B1j#v1WcP3?KJ(u95)zIX zq7XodJy%G;@92JXoMp?9BJ$d-b~S#Acu(gu5?y)`+imOS4nkE~E){615@$BCC0*N7 zhietllu1EFD}cpZFrjhOq7Pe_z=y%I6Dp$W`xjCYpq%$+HcO4nZ#INcF#?E%P~`yI zFogcHf|0TZLrB-j_U(c9Rvs{=4W?~P{!)lR{#GXqGQN(5Lcq3+cvuxcL_+)D@e{Vt zu@YkgZX{Qnj^ob@>F?q6+7xK9utw&8l$1Ghl8q|dL2&y<451!vY&0LYB8wQ{F7=R# zmC0a(vLhaoSc;IeLAZIq3=)mKtK4h0aZ`5X3%J_Vik)b560Rr;G zoOnBcgJ2)2fXTVefKRg-u%D>COwPEdc0o!lazI$4FqyvQ>QNgaGSY%;trs%Z?-6Oz z#^ujJ$~g}bgs7mPKma@KqAY5Pnkv0BN1}S0hXwjdYJX$z-kR&WuI!G#pHH##;0lmx zQMh0H6kddms#+bDC?}mlkF){pTTVi`}$Uu~U_#-BwGy00(=o zz1Ey#jxpxk$Y-fV%9LN^9NSkNG}#u3VMC-WIM?28l?M$C#AK0RrAo4w=)w>PH~{oo93Djr>*cP{bRGk_O(t{+wnBzBd&MSzI}s&%dH7zqt%Y~2 zJaM?~M5Cd8Yt3`>l&~B#wv-)&((rs(oT{=X4RUMSB9?RWzRFoYF8P6UCNscCuB?#L+l2()+>?~oa98!K%wJIt9VgsCfIx z-ZWB7Q;`EBI_DzuQwh;P{gG+S;<#doe$xa~D;K&)cnbAmpGbt(VaIgtKtIwS%Po*A zVx}xh>s}8NY0N~SQKXGf#~RR%AGG>1zT(ZqFpvh!w6>8|NK{}%Euc(4F-d^_Ran9= zNckw>dJPnY7&u=FK&s8vkTR2F3EL>T6=>p|;v7%0B15?;>Z|J@NJ?PXSdWZ2fNMa$ zhzG#DDqPL)+^g6yiy)NZ072D@iaJ<8j8u$zv6J#F*s;l69u^<9blmF__*vf`wjK%Kt zJ75A58l#T^Y*UKn#E3dT97UNLf{-I6Gop!5tY)gpQ;2C_gWka=cpW8d6o!=pVp8kS z7s>>wQ#7T?2G@MP@MHUv${NB1%QHsjqnvFh#hXm4?Jv&wO0Is1NfeLIM-VFrN zMbf-&jEQ64@%vuLUjOT(mH2U*0ZGSn_}ihd=WT*gvEjfdNb~Jk*gx_}Z~lB20=L z>`^czqx5WHfX=po?9BPW>ItWK8D4P?05gGzjHbBS{{~@`!Qwc{;Lx0BCp_k&l`J}P zkIz<2d+KAi2DeB7>XjxUaimbMOjQx&Jk}hA;(o>iRxMYhl8iY8xmtswF)Jls1(RoT zdt^2$Pc1KjCs*RaRHLR+`3^`25o1i4gO7_^#piQO`BPFM(y>>|B#>JhqQ2OwO0za_ zrjG`BtZJ{j=iY%=@n^()1&~%y|A#?Ul^1{V{=kI58EcGMEC33U2|$V(mUA1DXWK9` z)VO?vFS9gM2e8nSNA>|~xEULf+Q#11i-|9qxV6RU$Kz1NIONIF-kJ27B3}Zu8@!kVzQW%?ka581kurgAT0t zK=64$&*)FMEw#VTPE(P684jJIN@q1~<6Qkt#Twzn6ECr6@RKj4dCf<*oiBw31In0hQ@7a5B`anKjsoSdapsxG zs@-r1!6e747o)gB)_nI(PY`yDLSXn)$gq(pCsmGuAteJ+(p!M4QG-N_^u2nJU=iRg}D%37`-V8a(AdqYH^Xp3QVI#FzRYza}<>sUkYPA_u0k zVbr9thMLXUS(@}Hl49fBh0k>>s<)c@Nc-YbJsxHka|}@9SZ#AVB860avJl);;~?xv zk_8|{8o_HUYN&yv2Gv~EpeLP!_0a6}dF5OkD!>W)Ow);zDe5$m)Z+)VoEcn3_FLT& z5a>iWrSYn z6c!l(2nKXV$UMwc^)#MVIU^csr!0}#k3Joo5q50_!rPhoZ+ybUwg%btic`RlPACp3 z+6hkFWS%OxiasFExm@24!Ky$cSMqGud!QF>Z&%`-Z2`Cx)79`-7?If3tImvBqNEbM ztRj5s7ZxI1J8yU4-p|yoB&s(Qimj=-pD0JcF3M1dH1^N@XzgKjlb71C>_XTvD-F9B zN0)$(h6YZO&6>+h3j%|BjS6T1TRS2EI}z5>K=)V=nwdd@;6T!}@S+T*=aCID@o2bm z!VLF90NKXEwaQw~Q2^kfp(lo@=aIvRTYrlv0&F}EO^k`*vrr;^@T6jbS>{d7ic-B<%FmYet7Rt%fH=xc;YvBKx-uCSi_5{p`Ppzz z+6}*zglscf5CDy$65kZ+CHV_iUj8n7C^Hnwh*xs1(GP$*Wx3&`f(}Y9x(pQndg@-Z z!|)Y^bWKa%VB)15Xt2~%X~!o}lVx;|MFlM&LqXCc)FC$^BRoT3z_F336dLW*m9@e8 z3JQE>IPVDBNsI8h9bXRt_N<`>)dM(@NmoLO-~!O?5$jlK@Eq26X}Dl-yKuIp^f8B#=IsTI`8cA!MxOb-kooG$J)Y!Z{0QG%o)6e*P)5+Pso zLDdPFUOSFFmyF84P!glNW5qW>D*KkXEIKpfJdl(r*J z39dy|0Dn#&R@PO4ON9yZH4^V}9#}Pu45$xT*yE6687vW-r7i-D-#(A6`!g*82!YcO zRvIr^EK3YHa&ZsLs6rLvFy{;>5Lt#2etAR!D%!?SHmfw$8u)Th7i?aE$=XY7?nE%p z45djcLdUXJV^S~`8P(WK$)BLDsAJ!O5aJvgmzglw63r=-GIijnaRnnHv@OCf#6Ij0 zh`pB965%}T0Stkx+boS(u4E!)fs`YF_*U$l>P?f+*uOnkh!>NLIo5in%YxNIO;7U3 zg4sK%P@;~RkSCz4S@B;w6u4R3tqMlK_aG8bFnz9>*w!R|Pk0=#6=xO z7!u^H_^Z11z`;%EnGy#?uMz>RnB1heZxDYo3b?2|$QG%Qe=@wIAa#L$@{e*_?y`&g z6$*r7H(QokArjCYA#K>Uw4_FEpbcT_d^8yFic?bz2!nh&Q41mhq)MtKgV_7B_l z{CSYnDgoAGt%oUdFoxN}Kr2#=I=YSJ^c-qaE#v|dnS_xpb|klIFEjSI9dy4@h5L1i zpyQiD<{xq-UeF<`Wn0&q!=7!))NdJ21QBKQDaj`dc|=a2UjPrn9o0gmtZoynlteo3 zA?}QwahyVV>7Nuvm$22aBN_U1XF^va_(YE*FQ^^pM2J8-5>(-MM4;Gk+AB09F6uc} z&UIR6pM)Zt-2w3UUOkX_QYqU+AqROEz)%i}1H?^%Mm`qNWmY?-PG6bHUILtzJ$0?r zIc#HaW83gfxJ3*A2>~h8&<&;p@@ZCnB8O-gx5bB|^vawdTk7`UTylA;D&SOS9oUr& zq1e=?UKnY{kGGRl$8mLv^jJHT0f4Uz&2!Lmbz3tw$xc))xlFGGwY!=|jp3(zu|PyQ z@cQW-6Mkz<eDfg{~OaHzgb^hzkB`Z2mQ6?MfNbS{@)!J zNs#$4E|MQ{@%F+$IWF>afA00gyZig~?Zegei-%=>d$s!T`J}vvUAf>7YmNDj>_t$%R?X(EDMCy0qk)XfXKDhzNrS1pLPYVWyUfHR zg<-Gh)B8lC%)JVpLcmS3$#w4wTmz~K&y&HaPIfXgx&%^I?q;^mnOffrU=un5-;wUg zTNFzIjO0lWK8%qk)NHk04`Q?6olJ4U<`@aXuc1a`8^zQhc6^u0i19YmVy zr~M5grn=Y4#lnYsL~3H$iM$&8oS9yUAOxwu*sL)}cD)bIDwhw21z!C`O~qVOlxwc0 zxOV{t^U!uN4GG+q+^dZh`wAk6m;k{5g88SYpfWsBoyBJ6VQ?BHEk-6mktMGmgwK$x~dpI=n2`;s#re0YEkP+Em4M~ z7mFEjTxxZ!mK{Ufqu4PRx^6+k^`*zqpYSG3a3mn&lCXyWP^I-wD}|S!lV6V_SR-`~ z5gSgSVtSIAr5DN};jn+2YW+kTxjT!GQgKh%QOl_ws$4O5St_ZUy`Zm-KcPTLi19%V zn(h_@fGf2_s3?&kL@?a}o;J#t>s1iq{t!LHJDw(Is%a}ippR?R0kZ~~$eOAH*LbAuys)2_?^q>`Sn+_7U4B>|FQ%2Cc z&aUK0D@NAZJNWt8G&MPSz*C@i>KC z4VV_%iLSj4tRor5_y-47arsl_Hz<`Quc0Dhi19bR66Y^m^NT2Y`{ zc<}_MooJ7XK-O3XA|r;SsaOifrn}U$j2~x&Mxz(+s5^Ke?v>y~!(=%CfWv56FeGhpo5o@&Fw2gXFdN+!oCo=U7hB?o)4JSIj2rY|G z!;lEK#PqDK2@Xs(4l;h4oXI`w+4P1iZHAN;FF|d5Me`8iU@03B<*0j6fYDYrQI7CT z8t5RAi-S?%!tbY-P(mFhkrw!n?VS2r?6}jUBpV>s2ZO>W)oW+#N^L5PG?=3Wtwv3u zM#edL+Ja50GCISwM>j9XODeVvva-A#qZflDK~D<~QL0u2LbdmA;J@*1aXn}qwjcXS zyO>O?8zYw$4~gi~gLLb;$z*t9I96DU)DtV3GE;CG;N8fxlrQNGRM0<;oQG#HVp<0s zVW|QIl7~{?DN+rwNsc0F=`Q4Es4-m($eTiuuCtDG=LaGH@LLJ*dKq{c{24SN88#~i zV#Bx8kJnIZT(bv4p@MO_;+$R1(GBH+hBDT|69&h8f$r3rRed9jWE+wG{m_PK&{R+r z=yqH0Z+*;m1>R z&&VLW72=vI0}3=S$Xg3+eGiAkC0+$CPHX@@-gB z(TlF{51O<_Z6%q2ys8L-4`RuMx@m40!M{%xk>q4HAqNjv3mott3gxbmegjz;1cq56 zT$pnK3wlt3j`dHpFhn*_tBz!r32t-&ph=R>zI)&h0I5OThD&+wjU&!2S~ryZ+Ghi4 zxJT|6oLr5M@oVkB&T9N@**j%Z#BaO3_0hB-w1 zI6foUgbN)$#F~ky@(66$BsZD{rkY!-At>gCH2Wtuv_2p7Jw$^T&C6H6B}{{$ZvE@c zvRg2>q@()VV|%G$bVfhdDta8Y5be$?qGU0M;H~uRtmc+8BZ#ZakJ4L0t3fDc0rN&- zi91)8MJF@(w}=AMupTy!lJMhMG1gPo8;pk%?%h{(Rz5ZTEmnfNy7&4f?otZjVZoC@ z#3O;RsZi<)TT`BsopmbpGC1FgfejSPpF$eNGVf+$j12)F`Oyt_DSX=J?uOo0Tejqa zXOtCSc3O{+lb6Cf%79kM45s(sDeP8~lgYDebPw4a<=b0=Y*G!bt`5;jaSGHoibf-0 zET}2t^dfTr6f@FQVOx?<1gQxd^x-gwq>Sg)ZBnOgBU`JtbRtq~xzAWJaMwLSATA}S zApzU~G$?J!V3ntujsbO(;0qAYm<10jlPe(?(T@>K5za3pf`S?{TGN#pG!EE=*W^55 zO(k_&Pd!#!&vIh)c zcZw{JGa@fK5=~KJg7o7_q^M%e)uFSZUflDH!8fVeJ(;&jzGOXwj(}5!)FErMisVAtn3QVmAQAG_(kJ@zW$Dcvopgpin=1 z8c7yZD?nrvSv%h`Rg>093*nNgR1yrqz2}-Zpaad+D03A^{Kai&$wOd*kZqX~bct&Z z^RtV?6iPR$iX&F2<&|TWPKSCPApplV^5dHjZt{k}N&BId0!2QS4l2>xi)v8OMwMWD z1Q;!c4?rzY-D@4Q=NZ)Hhc>qOMi`}RGkkC)=832~r$Sy(c8*eSPl(+4J3Ovlj0t#~ zhh)T;Fy~S7+GI&2Y2{=nbh>u?k-e<0Gd`Sm64B*{^xj)iNoGE5B<*VO6YWt_@3t?#Tl@ z@?9gGtei^Iw}SJwMNYpgeRc}qZR`gMD;$WEYLp2_8yT6M#WK4uc}!T83Y-tiIjBIl zKtt2&Z&lqJNHq<6)6pqh!MVbxn5#JpLTc#+7nLrw134=jMKr#FJe&dvJE8ZMG#V%% z&+RA;tK{;;>g}mOVm-36$@4zIS#eBN<+;UZ^A-*);1r<#f%7Ud`^ym&m8_)sbmsIa zE98BXW!*^2o7-Ms=-nS4hzle?>F!g?0S%hS7!y2$9Zpo0tsKED5C7-`sf9(G4{?`6 zAYl`L@iV#Zj`aZo+c+r3Am&7Ps`h5_Glv&bMKdI%i?Iu0domZp73HD~l)~7``L-to zk%p7!caW&{T6^#$T(hOKYIu%TvH=mjWP$6v)QGzR4P~ZA_^Jr7kg2d34-H$jf7_{f z05i_i(+Fjg>!dF+$%){?07RM6*sp|cgB}R!jtH+v$Jc=HXbhE)stNRTk}V@dQ2QGj zDcdtJZ4vc{t4VlcJ(0=kP4+vrN<5$v4*IEg$B0h~3?!CLQMrxB=BS7bU)WxJy}>n! zR$#X8ScxTP_y#|T4w=aw{3*&9K-+4BZ{iq6m*h^s;xI`9!?qF@rRFzzTzM@-;e{kz zsV;YboG3N;e~;H+pe%^34y5KO=3B?rw;@%zt}T_G7vPdP2~N?ur|y%FbK9y2n_BBj zfm}8!z*djEFOW@Ky<)RT7)~%rS5KF%DH7NM@x^My3?CY2i|nk^4xHR;t{BhS{1B+A z=2;}5`V;8kv11ugP)qH&LhA_&Y5k7o=P+X;6C{+9I?znA;EsZ^gJ>GJ>P|tKc(Mp_ zH5=5#(FAOw7Qk~z3uPkrA+jW-m9D#HqPt5Kkog2E7fBFUB-Zn@WBlB$x-P0rYE|lS zQD$I}chr?fhO>!v9x2PB(E(^d0JRYpE(GOZ11OoC2zG2hgA9x-;v$eQC0JfF?<`~p zawRO_hD)F^p*`chc)$Em6?rq%+jWhoz_emKK@Q=be}glH#ffi6^yRo3pJ3fzHn<0h zqChUebQsVE=EMc%05xyWRJ!3Lg4kuB4;5NE_*x1 z(+9wDNj&3nu#%A73t5D$iqGT*sdjUDdK;VdjQaDF& zio>AE>aM=w2?kPS^HF>H9XqjXiQSh;t*SVTMah@PAIez?qBLcO84e=G&?}Ui8)zrm zbM}ScoXMgWce3d5S5O3`JJw54R(u4DJigj7#7#wAj^R$bL4`JiA;Gb<7*xs#=aO5r z&-fS7eoZ;F`>c}VVUw3a-AHfw#6IEDoCptGP^hkf_Zx#HopV%zQ=Dfmy5=;CfYB9D z@YdWGSQtefLPA)dPANE|xj#uVPypVIwUk>E{#6Pv)?oJJDD1yEyiToU@qk5Q?cMex zoR%TJ3iTF3SQ3i!zlb@YpNUz@a%}+yqC{1fXy9arBqB~PgBnk~S>;^B z9gxuKz_!h(G{Pgfhq*fzv0eiVShNv?%yeLBlZqJebqruiOF$Z{DJe8mBi0IqeUNz) zPpQpK#o!r>X0o4sTEk>emF-LAfyHT{o51fMryE{xQh;l1epY^GMpyV%q2z|(NF!=< zTZzxLtP&550fGy(4t0MXky^P4jha80djM76J-HA+O|244F?e7$_CZ!bUm2|)`A8^) z3Hkro5nV85Sk!N#SFg-dC$yeQPEr>X<1j$%4nlq3%uiTG(jqqB*VU(+G{Y(;8#>qq zN7SN0xv6RqAY?^_c*Ap0rnTJaeG23AHYy$vGoS&i&g<)8HYh!*2Ll3@KI<-pJb#u+2^6Vb zs}Nd2dKIpPNCj!LTpe1;*-ms6;3eB3CXqo;`(a2{5cM;~Yu#Q@q8J8nHikpnqy8if zQ_eIV1fvOf)#T}hFfo3Filzd;4x>m~(Nm1lJZiR%C)eQcY9HQY(n*<#ldCDtnfZ~A*9N)V7ja=hvy?|O!BH_s|-WpOCM_R@1VbcWt(q02B3NjwA9Vruw zXc7r-h&YNRg9o)TiwG3YUVK40vurksgWS6X>^n81fg^f$xCRG6Du=n#i7U^~g0(V6XJ%DWvtOY{sZy{4YBIUST;mf-AY;X)a~QRx_8zn*XLO#hWP8FA@y8(- zA91=!Y}g^jn2w}*O5d`~jqlSbB(XM5%jVRS;$iBxvMVG)96@C&AKf6dsPeN-56gAiFAj=hRo?Dqlp|Qi$>e&%VC2eOd{8fi^ zt&28ga8#XA%MYd${>F0}-DwFp0yGQi4l*Y2&~AgVZ?r!Clw_MAEks* z0_|sF56D7ZM?H!=)IKQ6PZ|M{%psJDL#|369QU;oMwHGuf3NZ`dFtl!C(4Q#I(q+xzQi@II zOff2B`0#2?0fx4mdnhX6&{5#o#x-KUvS;VyMv|sWq8{X}y1r0$(7&Gz#w$k^D~JTr ziYK8dv2E=rk@=Lqah2pSP?=I)(+SKBW2;FDHDHPI%&rQW=#i!%qJ*(8=9=gnL`+)@ z(27*2_EZaUVB#JuMg5UJMjoOa^9{5LRn-o4oS`0G6(JD{e;^3<9<`aLL2;VrWATVA z8H5NGqILbgo}kmAm{2JubI6W`v?^xE2mS{y0A!**mO`Y+W*|VT;ynlq0b+%;515pv zwZ+@Bie^)Q?P1AeXd_r2Ic$hRHVfCK!Bl+2M-caPy=dEm@Ifl{o6gt5 zs5vzn7|Dg8>Ha+1EoO03@oVK-h?6;Mt+s$D&d`eQG>Uc1P8JJ z>tHvqJ^jWC>Zy)3>U0>fsu4TZwSGBgr6eH1H6BhxMg}5kuzfZq3diY@_)$S-VYOp= zQ=5U69)5-uY%Ez+#C8b|$=S-`6N69O<@EzMYp-}rg3KGi55R4&#&lo+KKmp0 z{4>KATx@UJmC~dfVhx80X(y(~FZ|LDafB7^1d3*kHfj}QR=_k_!xc#U=zkQxtt)7g ziOf;5k3faShr<8f=%(zb`%~U%IxVhFBvlP)^fh~x9F|$fqjonwy_ihv#=Tj2>nmca zEu9V|RFb&t%a+7bkLA#^g0EG8WD-XqHjPyxVo5++)k>r@;iwe1C%qsWc^|d`gC;o$u#!A^22qssn40TfI9=v(Y9`vkgR2R7$cI}y@ zSV^M_1HP03fQLrzVhN$Uid_mg^*_$Fmk3iblqj%#IvT$k2D>ig*d2(bSmUx?r9{D_ zz!fNWXx)Nz;dFDwgbd8lAewYl1%py70oT;{op`6L^GCBYRFN@EL9gL#Kp=ztM zLn9qP(>!9KS)r442ci`AdT{BkbWWgM%w=C`7#vZ?xVql?i9~4P4OAh(ize}4v{GT3 zw#E;LQA|5%I3yQvMw=->1bxIZPnK{1o*E{D@@K_>yooRlvCx*01Z?1465Rlm23&if zn({my6cIS7U8A=LSx9#Z`>C@9O_3b@(VC25#cavjq>-l08R*v2(c}%t>V@KPI9XL~ zD@6ngDlkN_8Q7D00nb7Q7;M^J)Egd6Nc1NN5rU%7<&wPD%pR<>tGA-X!#HscE#d%O z9P_VoulhDop#jt&4B(CLp>T){yU(0P!NBo^&y~JVRR%@24om?W03!hSIG28)3@_d| z#CoyVI|ZVqtM+y|2vHF4trlQWlW+xjMph5b@)FUYCSTal8Q99DHlxYW>Jn7>h-vUh zjZ&!!2mtRonFLpdp9~MGV>v<8At`X_u(y1auvingA6s6Kb(HOLCYBFelK$~G0x69U z=q9G1N8Eu)u2Mvlw7SC2L-o{HYzb0}%?j}VReY*}%&H!7HaF42lnS+lO~L(=_YJxr z7X$9iRrR7o4QLP?L#7Y z)e)9eome8*vq+Rsb}9*>3JNmCLwC0HZyRX%VoX+_!-epKyHj*wPHp;BPc|PeLqHC| zqu#*}`I^|U>;nT+o4|;lW&|O^gAlff^W$srS(z(iI#CHVKne_eVU_=oKbwn=RA}4& z&~B=c9lk_m&g+z$HY#T+mt`s+YN8KD8tqDy;4s7aplu*7_5s@!#o2@ol&6BMu_qZO zT)l9n-c`U!6<9SSCMf|77Z+Jkv`jmV3KP?FOg8W&RIEfv`(2EiDAN1bj2y4%r_lK^caXF>O_RTw33?hiBrCd_=iIA2 ztUzun&4BJ7NEF_{1J6!0%9Upf2$s%{M#X!Scr5-zj!`)iwazUlaN94)6IC^*zY5rP zPNcHKkfx3gf2bW@Du8e(gl4PRYi{4SsGTeghRjbCw5rV5i&T#q%~AXfcgRm7Z*i$) zUrx?HZCqrm1R`1-70(FlV0q*yl!bCuN;qDQw8E{CUwB^|kbI>dGc%Uq?#d(p&|e^n zfhLhBvIm1tz{SofM?~f*HF4B523f~A0{j{fl3h^EWDudSseUA6NZ4?V{BQfhNOT@n z%5?j(yk*a1jCd7IOU@2xjm6d|Km+{ZWzp%y3#pI5txbY>;}HQ`IPwO0un<{Bv>Vh1 zRhXHfmUaoKk9-&|m~A^}pjwF&#P)3RiBhMLFs{d=mz=^51U-<+%uQ8IU7p@;gHVG; zeF*c6TjV!!pX31W9srqI4?!Z&-lR^gp<&j%z)8cDTmzWjBxyz zR0e7%LOI3b7RUZ8Dou*OXw#W&MbVu_(d35c9SRE&#%HV2RH;C!j*mqow6QeEB;u1> zidT1i?t&6Gy#sg-PB5msnt{PFj~&D3eO9XU+#y6$Ezu5}*r^1?#X&>%OF&%Lx?11Q z^g!xZqTVAfpi%)+M1p$+M<~`7QNrpF0?=F^sm zEMiKXyl)gmwm2AK2L8ap$}5-w5halt}{I+oUKGP#tU#99$JITo*UA_fT^5B> z?E_&3B(lJ^r6^_{;7?_DCXz0l!a?aFntIqa7VIgQ3NyS+c%gbeBx>Ov%x4UiAvsP| z2{sPmlkBPrVR%-)!|Qm`&N7lL!w?+pG}!bmJ2eg?tGipV3&Pvrcmb3Y{~>Z7xx5$bBQsM*TgQHZJ&pAv`Jb&a1c%sRQ2LC zvbT_cVWjkw+C%`iI#g&waFSpSo;slJ!Hxv)GMI?Z$dTmboMkgxQ9x;`@(AmOpJi9T z+zYWbG%l1DMlDxubxJ*qCiOD3(Ol9f8NiV9s&E9P50(Xxv?MZB8|$IXO8s)^WlPQ@ zE>iw9fF<8x6%I_}ad_(}A|ahtP3r6_lR$s8Cq~K!cRhJ`+vql!ffGi>$v=fMwWC+F zkYQKS9xHtVjQ?a;(%#Aa83l?Az;TxJ13AFq6S^lmDV;$ zbA?Fi3u9`KD&#@v3V|&&JJmW3Y%-4MdMwf4MG^K%CqYaXlZamYiH<6{#eNt4SR$Q! zxCU30If;~t`N3v89=)op>4$c=G+EMstDf*|quta3fH4OxOOfQ{6bY?dm%3Z8uG8s@(wkm)Y zU>ybAI7g*{9UpDO0OqI@iu}&`j7z;MhmV<{7CaAt%6>4$ek$fZRdPD^$ z8`aT37qT2p!46S3)+**fD}l#p16QGvc=y5SWK4;~R2UmULQm#(z*Hy|zes(7n+;u7 z@L)Khxs0&2>2BHT$kFsxIln)AR|z=R02g!o};{jL`@24xWeaq)6%+yS)A&?NRS ziDJu@K*B1yM58y=Fb+jKnq1Q;))pN-tS+_hSyB~9jV_gWmH+AcyoIoYieKf4s*0-M zI!RDL65(CE;(|8~gF=)O04bFX!4p8;LX&DhD(6CNP?;5_UAI91*$(H1@ONA(u0C@i z^H!EM)SX2^1KDIXtKg4%(+K_!#cDg+nPdUUlSr1vh_7f8RAGvS0i~noQ?hVrVu!Ov zh~d=pobidM*91M8A$N`1qA_n-1wF@{r&iS_@^tDKp}C6XD$oM4Zxn%eB{)S~gjnO` zLS+qT4=l=i_!tMS$4K}am#C#+J+Z%ByMANH%1|Cw9DW8-FKaGx23p*tTSjcfp_J6s*7L>Co)h9 z491fo=509i373d?D=qkW3>ugORTJh*N^~%L#iQyEj6+9TgZN$KZ-xz4d-+u8^88Rz z=-ad$3@@@v@{lWlNF=oz;UIJgB(d6&nvMtmA(rX8x}vy@yst%42&+3koBrqt`UHNl z)`Jt?c~U|$>;uBS5-7iigeV(1^iu;fFhVi_bSAAK(_OyR7SZ8Rd&xG^Br1G2?ayI_ zUlhM^6T@H@3pcd*|aKgV)8+eV{ zXF0H-11u@RSLrWSN`vTnKhS(Rt=1wMrd~XviP_H#?|qSeex!rF43E^FCLW5ULZy7I ze5@L5jIeGO02ZETdbbb^lY20B2O?g2f%MJSs_tZ5Vh;c(k(+P_64nl8H|{M%I-&EM zPgj>!V!p6r?A57!a~aubxKk-#;caI*rd(q7rXEjSsa$3bFUTxvqAvJpX%I}mxa1fS z2PB(o?YvEAAgNnREsm-fo(vrnWd%`!m|!PUCP6QCG$`!{A`twMc!%)fOR;%?5pDAx zG^ND3*3aY?m0iGtQdzk!4LkTLflf7g!vjToBllFwv2Q#MMB0XD*f>m$qp_3%uF^_?C4htwzNQ!S{T`= z0KzX5t|ehv5*zFKt6mhv9yr-VsfP|HHrZwc1B!>t4$mhAIW|-aP|#}zAP3BC&8ol^ zX^B-5t*y>-H~@xvW9V$?U`#SOM1rdoqlN(N6}PbO!OS@|gW>ChO}s-$`4R`-?uCv3 zR0)*YB|)0k36bhsgCcs95{#y@AW*)r2Q8xl+!#M!XU&^w$)sKK2>NU#U?P5W`v|YVjPY=_+Mz(RBNR$9_hC&nlG;!dAAI4U zYH7E{RZb`q8!S$DL^*iVqO4M}8v}1c=`i7V5a@x#0BVg_&bBrY@X%2JbJga|5dL07 z`Dz8pvvJwu78g6F%Jd*1oSH&ZbwmM&Oih&-P%S_LfrgaiiaqD@gg^lZYz9R{FGB|E zRx=supV7P)nXkgb?}&ydH8m{O327}KE1Kv`bb1F#lVk#2J)Mpq0@8WOl~c{?IQSuo zVALBLMZA(4GR{axhWI*DZUx-tHA3v9K%|X|$1L)CjJ4=jd!J!r=H^feHjbP5S{^0&AgQvk}Ox*2)dyE<7oK44AAqK#tBk zd1h!p5Vd6!$!%AnII0V?kPC>XfK%1mV{F{Mv+Gi7UmzfL4BT`@3)n79u60c zQnYvSWJ9C&xPsooC?v|f!!ogvz~MFiK(($vKMN|vQPIT$Bg$wMWp0!?m~^gRI*5cQ zgXe3YaA4G0$?kmWRgSPGYDD%`c*srB!x9@PD1#uTIih4m*8F^8mdu8+cG(2$&E`#& z6`E10xnDG7Y*J~7y6QC>oxg>xECFHIu#R9@5iQ$90f>(f?&#L|i!O{IQe~h%@o1aO$=;qR=1_89jZKq^acMtNh@nV(%;F2^)9HE0l#Lm z2ynQBvK%4Av8nVK-Z<)@woL6OtTMuibn8@ls~Cybr{gVLc1^}PcWqamQE34h!v4uU z_)|8qQZtrJQmHvX--4OkHUDTE7tg47`AAg0ol2aMoUJOB@f|9P7d+|Yj!54-me}ji z9|Q`}sd&T9W@iE2JW1ditkLnIZV4c0I-0lV%25SG7V)!wW@UC79WlF*m}C_Yi>?)E z55&VM_9oK~-UvJ-;L1uK4^-APT@1Q1_|S_EIC)T}G*i1rG?vs6E}S9uGZTV*hev7* zfKwsth3*aA&Xz*dwTO;#3II5d3>T}VqP9Hunds&r%JGmcwocdyvoRY&dUfa%p>+{r zvRpxLLtt{GBeoD$zRS#)#MECll{$Ec=v69P-eTE0svq>^61C|BEPR_P3F;@j)Vc{W zh1m?hBD*^^NX`e=p!M0A*$tY)hLMIvcVX+Z=Q2J<|fDA-=W31})p5%=}-A!#`W6c-+v(=8b~ z3o*gaNK#gtDDVSjD#{60juSJFZ?;oh8%RP!cC9uUt{c@ZH7eAkv5XVpvc_eosO3fZ zAF%L6TJw}4jm_fo!L=zYDw;7f_BzE%H0Igk(8Z?UA9@jp3|>d1@3YTDWv7G!Ce-C8 z^uZoC0+SCark&T-*`(xQ=G9zo#9q%u;;=(r_!&LlGK$;6Or<4=G%8zYtlC^BdhZ)R z44_DCX?3E|tHToO(rX&A-8K?R0c>P=QGr(CJGI80;11P;wI6^_WEwIoPRkkXRSou2 zCbSO4(Q4{Kop_RqUX3IH;7-srAmu)*6^afJQ-uROU2&NV$-@Cs-zYi0*AsR? zva#BgK318B>Xg6GmM|N8H4#G}m!DcMkKSxxtk-xXtEjE2WI#5_$btewjoCpJTPysb zE!6ApXvKNtp6%d~BxVd&1xVncu0!QLHj;+l+cCW>QDkS$&DJE%+9mddZI-UNOK-Fx z99nuUw}r#nQi)o!tsfkJB67+(qz?6tyKW9PBQACZSds9Fb&1JcCrDSDs+z7MTXzx1 zi${upq#=zlN(X~R*G9$=zo+0oI&&77`pLr-6*Z@_&l%$1mwBs>phHhx`3eyv=aLFU z@zn4Vw!;eQq7m@53|4a|IcWq;-ZzpT4jwT`4;AV1#WOKTig*LnD@aQx`+H3xte8{aNhpou=LpdtEoLw zA)d;h1t~bo5*t26!Z(u1_z9#y=*kzkm=5*W>9y_)_ri%wupbCC47FMhYKRcNkkT5& zvdD=0BAI$5gelIzI@+&DB+MgfXDopj>0~-0PBEy#=Bd8oNRj1aLFGL~)K^$;j5LTH9^gwZe zfe?skNN(}~qJ?XI0a=y8N+!RQ8 z4$$O+ge{pvzxHmR&Q`7}BWu#77P|)0s+@=ahsZ&MO;3HR#{ImC(#7cnChEmYh{NsnlylEs! zBXLUIoh3p=21ER05i-ahHLD?-tYuP{9ZEDObm^ajkvM?R^D05)K*b9jjfrT2gkY@a zTraJIn$~955Dizt4N=J*jMZ2+K#eq8$S$S`sw@>iY6o%2&-Zu8Z4H#b5}TQIG8>2_ zsIKEP!{i}9gK-oQ)9KWLN?aSgG6gk3zQlw97dUzRf?`o2QTgvRE_u}*aB-;yzzQXr zA=O%WRVyQZL|vZzX|j=n0zLu%4!W~#0HemBfDgI?N#=|Ixw)g_%0YHJqj&YO^M~PS z_h>coR7W8kMrvYU$ifA^D@zm^DLOWx^XzLP7k!?)g0--K`en!^)c^0$m zNPZKsB?K%EBo4T-gyOI8NtnevkH{_gO76!=j9AKl%gyIK1@#({=STpN8>%l0s6Ro~ zSxux?6GO`vS>Uk;$g$p;YenJw6HTHbH+-)yRA^#%==|bS>Mr6VQd^-3WcxG-hz1MI zOZ?n2&9S35vC^pil(cnx5_LQRupI_2BOo=9vf!zQX7hXSiYiY73xN$%Tv8>;#>i@F z2EockRxwjNDfjdkxUDzaK*A{$NK7FX%zy)HiUJkTRQN>hpv0wGKP0%KRD~@;U#(o= z1i8gnKTqzmeTgW>DRcZ{#M_le2#5wm+A3C%`fD7s7CTXf1x1VpZJ-NfadUB;ff79| zTl0a>?7eYbDvpFAN-5F=h-|VDot>|n(+Rd`(da~6$5k-`!T_~Q`t*3Yw7T9**&-R( zt%P+J#3ZYYncJlaDy9)@fB*)h7m^h^fYfoNs$a2vr{3`=V%Vv94I~BFnq|Nt;LZi9 zvB$aGGuq{o$^?NQN`yX1M#G4hU2cAap5l@Y7GkyY9j_sgGyBVj4xNK;SJdZn| zbBvXe^~*k}H^bEv(!q9SF60^v3ZAGmVIA}b(xOU9nb%MPlA10dqbO_|!Otx?9m2ZW zmvbGXx$z zfvoq(R37AY{t(ivpbc)zr1@Mi4;BvjgMlW6IJ+VVy%){FkOd_nYiy#7EW9CL4D}hu z$u0@w!KPv{Cq81!;dTKK5FDF9F7$(IF^&J4t6Uyc0f#yemMcGPnB-dnGX&7=BL~L|#)Pk{k#kN$T29QbY4@M9* zORa^NEV#{G(wylJAux#)n_fwWo;IzlD%Gd~dFBenvDV6>tfHP^#!y;S+I=)kAe`tuSdUAAO!<>Z~;KK+H(H1_Uzo zL$uHsCeWJKu_@Flm>^OfFYktzN9|1+SJ%)f+j|kv@lwR8#g*!uzr4+6w}~l&w0;_= z6APrW6urG!jmwc#ExZU`o)XQs3J$31ElBgfY43#Zofa{%Zj}g7_E-6qHxGO3Ts2uw z?xIoRyye&#eIl*1N+=R+tO%&Ks2vwhOJ|Sv$d?9ZS_|Bpt%W@o)7ZlyZ`>%#2arNE z#ZgYN3{RPjW=5h=!JsG9Xc85GAw4k`$>RR-n{~Z7*I=^#3bnkrz|LAzg@zjW2F+sn z8%ERKr@bR#mDx-^;A^rTA`D=%5io$ljf#p-CR#3is8M{-71Rr?+CO{JyW{FKvG_LY z)Uokmv$7m@+ux%{peHenGeKn#)o+nVX$^9K#aL}~qN0oB+$OtA)EQOn_Ax_65Q{Zq z5SFi$&iGV6Le({GmWpqvvDyPg!)Tu|UHWX~l4Bbyf$$Xyu-@R7r_u;O$yTmXTPrZ! zf_4wed9ACGR^&B)P&A=Qp|VuY!aN*7A0pB!X+`9`kCDWcSL8yMlHtUYZcK^9qJ-i2 zP~a%%V4LI{p$~}A$!dSX56DN*!c!3{xI|s0RD(};uBc<_ju(jqbk87Og%#Uc&qJYASFHK-k z57a2&JNPwO_k9C4O>4hEEscOaZA6f7X!Tw==In|xV8!7+tPETT3_?|YZ}kU%fT*nh zkb6Uja=tV5%Ot7T0y;XQQSO2pOm#|Uf+D7aSj0jgJ2?Pc5lizhCoVaq5{HXoMpC^V3{)_pwVpj$ON81thCbr>tVUSdUSsD2qUMj5s37 zK4;FeAq9QvvD0BFZ2_JaNdHvywI_ND+PbD)68m8w&t8Aq!GjVwCU?^v{IEVa@q^&u) zqSQc8L*3|8_=AKzPNhu0(nr206)B{~k0kbGBjJ??edKATQHmCMIWu_ahroZV1_R>3zlsi6ktFJFj1b<+mgfO#M$ zcnj8G=K#vaPmU$pkAOGqN8nI`b#`rMp6URV;OogqE4Vbu2PwgEu=K)5Ee4(gpMi&9 zpayo;?ImktdX!$$CChEtS~U|!wTOfW{Dl>$Yq+;*@(0tW_42^em93@P}H6W=24&4VsD-(T1=@**V&5o7(iyg2~H>^7>UJCma-h zkwufqK{PW!#@Qy?;zGr55g|uB+l}WAM9VeK8?aILA+5jT!mw5Oq;5|pW`mJZn}Y$n zYcwQm*u5k=A4x~AMG_zf>^**+x8j}BhYegO~xXCykrXRLB>>(wuA!3t&o`Y&E6-VJ2h4^DwO;s^ePvF zRTV{gngj?xL)|DMOF|V;f|%_ZXtR}dd63@*2p{9FbuUMP*I?A&xezZR#Y_7p#HagV~Gv{WfO@W^pBt$yXmmnad2 zK%_D~KqP~f*@5zfC--1GY$pjA%!9fyG6HRIwtc`_CXuk+QUNGiktj+~t3W~tZUgJ> zT5(7_?(W&j^?K4Ki(rCdmm!1tdBI2Pg)G6WGMH8N!C&|R*ry(H$j((Ff4yz8iZ-IA z!Ul0}L(2UI(mA1+IN+Lr&N;_~RNvZF2%S2QY(FFyGERLgt_r{nBNl=cQ;>pk!~R!A zAu2o7L|L5=}FMtm0Hb^!Ah(e_?j@p-Xu}qE!F#gvX*be>-Dy?D9 zB2&y%H*97;31flK(L~^L93%cj^;rX)n)X%7Yy1{yYq}4bFXIeHHo-m=_{ zWmiguf}?|wc?xFnG44RRicgbO(SUZo%1cyh2xWa$oQSRs6M!d^~1%C25^QE>h9Jpfo;_>BV{VelZbaCBL#m}`5YM_PA+hs5Q}NFpADY) z+FJ_pJ%BNIT|rnam6^>4iJXu*YC?2(I>3Eic#x+z*LZMBX|$mdF@d52gU%}@XWULL z@HCY(Y)edbG*utM?2DYrGs&aE)})cn5p!9|De6IHHoHqY!K#vsK_seX<)O&y)iVYt zCw|8Tnn&DT1_9-4GR?LYoz2^J`t1x4=@lLocbzwlK>2zVL8Ak@QVvjw@>@cUV47{xlJd1^yOzG42d@hJ`?{tn6wBcswVW&*;RW3KG03SLHZl zh%%LN%%j8na4~xe2G}U6mQ=$yI>kv*>=3Q{Wa+RBd)H(cvZ` zK&T`saN7OV?BX_aai|FSvCwSHZ8GTOVlUlR#YXdE`98e-6O=8ka!x3M zn{Nd<%4jKWqK2g180iL0gG=5`AjjD{CXgJe+SFl6YL8mOaE_|Tet}aRQ46t1Q}R|c zsWxn0)M$*6A2zNc*|`o*PeN}+t-B~RSLodx7;>Zl)jglAofixhA4Fi)35>-^=Bq`W zl`{x|IukiGN45qPkF_fxk4MSB>=m154d!;x2m?R3T^K@uk02HSaNP*gb1;K%7#jcYM zWOh}c?gQ^~DOu?AWa6;=P_&EAI7QW_)YY)eI@KGuF*+hit~yb+k>wd`vGg#mMjyFY zb`JBgDiJzG!x0lLRl@_s7a3J_t>+wx3c5A{%)fo(aPwlYA(X1}3UtQ{*GD8!G60)U zkeH&mvowSasZ0_MPyn9Fb@PdrjAz(DcCCY zrqb94JtQGi#lqkRSnx3TYC=!Xvsb#wLQ)q>Q$&aaB8a3d*(M@JoB~o$$&ojYYbd@D znq;V@GGGgHv8lQ7&3>BO#U$h9>6&;3b#kxO!|9WhxD;sbZGF!WzA&YxPJvn&JwxpR ziX~7%GDN~?;V5g1&<;_82rQ^fM2Y${OVxM+rO@b~0)P@LSB)*f%D{ORU_eM!2B5ET z%k}ZW0%ISLBVc$4W#Df_sap^Q=}EbfFk?25Y4yE~s&-Wgo9E4xK3MMzo5#rH`6<)Y z;#>hjpv^8F)!wfB5z>O8AVhbrB&?CaQ^hmN1j2fXE8x?xa{&n6TyZ<CY-WtAJEk#@2vxh1D5l11Y|Ft4+o*t$H^n<8C;SR3N6X9f&bilG z0g3ofjsxWsxZvT`ag!7l@5W}@8D(shFacw#5yfb(Lih>eV9kEbWjZP0}TX&IxYwX9(hRz_fS#Q3?|8=0Xgj;bY3$s z$@}y$*;Z)bUgv=#nG$jc2RH#ar%23*qRRL21S`l*spEb!>NTK5^=C2d7WXD+kS@4^ zG#4bt>O8iJP22K4QVzK9P-|sy4>i3-CknpeUPCre`wCDyR|7=DA#Hvv4EGU{J9}m_ zMpa9I!7IQxTLBidVPXyEreQaYNHE6@tEab^#K(Me0 zBAAf+!cICVyn*tt&R7S*N(x|C$KoI+fMkdd!5}e09*8hCb8MW}P32*DS#}_)Ap9xR zIfB~EgdHzpV{A(jvV)~@5}afYd?5B{&rn?p1K?$tS5DeHJU>zj2`716CAVvuDYA{+ zrxPyoAjVog0tCLYe z&XfHO?!Y(*80gKC6H!>#bUoCo=N24&t7Z&}oS*fP4Y&EX8HDi*f|{MKjL$wRq&RW) zo7R|=7LQnAt@Fc3LKKRqGpNUQM*?tAsd3zVvm{Vpjt?gST2dd4S_@R_&>C|^r~)@? zccNi1q`Z%xSV{@tzbX-~ z%f)EZBUU4$ls^(YMnvFNMv@EB3r*=nx-i-}{b>zEJ^@w=trwlyKv}Ar!1>G9$tR%c zUSIN%r}zW&;HqgIPAlj?NGMy7JI-OZo>>^w`l>b5n6g071)=J4q;fR+k0-!RMo!`9 zEHhPHpNgx-PxwKqabmQeP9XFLE>7@A<1*yn2atvr`)3un4D9ELIajioPH*%&YL2@P|pEQGd{8^k2ygWWc!4_JCixc04LlrJZ$`Y0DzJ6)?%Cnz@o(NB($ zB+}oy8Coipw-(^1#-%&r1rSsn#A_FdPwqq!j6;_PgjsXKAPYw}p3nB+vrs%}nvu_$ zzO(y#l1dPNgYSYUz?0$;B!m|srP|~qMr4ZM#+LyQ%mjRkC)F>?|SAY%1 zTT^;)z)&}xeQ=i_Dc2+hQjDZ@h<=`pl1FLl+>07HV4DVqY^ppPQL{1Rge(YDK=FFF z`WDc9fPE}XR%=hgF~-BQ4am(^S#1%fZzUm(JCe#54`7CaWvH)5ILzKD zHkc0JQA0Q~sz{s3Oj*m?Ak-D$d;#Ga`{sghU*eYs0b!zESsegb7#hnIONW3=OQ$)) zO_&BtTq^`HjDU~@fgpztWNN1xN}ym;E1I)A?PRq=h&fq)Wb5fy^|eH6G?G>v#Fk4E zc$Lo1m@r?n1;~|?0zHxapstZVOL_%|JTgcif27m1a#|G!LNb-D?g_cxee#Z}#6u}k z3|>%S2WJZ~xs1i=Cg35DF(=+hV-rcW89)&i4ZU*99G$i%*h62k$*I@?E;i2>0=+Vy zBMEMD3F8xOS^+F)gCce&w?b(63D8<~i$S!2F3@KRc-#e81r>#)i+5x8&D4!mBFHIi zsQ*e;c>&{tUng4Y@gjflbOC8%zd*~Bg)1)cFykIS^QtlSVFY2eGjyy!1r%(0#Aq9U zjU0!BDzdyd*lb63gO(Kg!?l?KVV9z8)R8k}6n%j(tbn!U;19UK_i0T48uBoL=xNcS zSHl!MAe1P!8vGZ9oe?!Fc~i`^=#(fFACH%$T5f}CxZrz7hsxl3Izf$0Euv& z3fC^o56ga{E>4)Ce>bwIsj6Bhz@^N37+DCNvnHKM-R=*-Bl3vsfcnY6kVNEEsD`O_ zu-;H$1{(vS;ulH1DXlt8PQ2IGc0=|l(zHtgwz4aihbqb9@DAXVNe_BI@acFW zqy-c$)q2>@d-pA=cBGmE%?o!fD=+8k-6R|OT!S~ z)HP)tu&UF=4^kaSVu#FH58Z?4|_|3>8-r@w*jlBVaQi<%(mKHrj`G)ibRp-s4 zlhGLWI2Mtb#C~8)v_TapQB$tGat`L!V+Kvx+@f?u60~GBY7DRB@MtQ790oDj&!RC% zR0uO{i)gQ($t{V6)*XRj-}NdHfv_ST+1|T>u(r`)GAIT>jOw&2a)5G_lttv$1=3Tx zkwa2%W9vmhQBUX*F5{2vCy^IbK*-7Wi5MWfC@{su+EH|DH02})uD61kx1*%^i~jF# zA3y;6i&oG#|6lL{FK*Ts_YZfkFYbT6`o%B4y1hEPyM0*v^2z$u^=-fTt8O(SIgsfua>=?W%uZp z`zOC7*ZpF7diUo2{q?IK9+s`A+kMgT^7!@o{`$qm?efjV!w>7%KI6s3&GP*2#r68( z{iEga&CT*%-|=?&ZvA$B|C{yIBNMlmtLqmJ%Vih2`mzi9`u64Ba=iKDt9Nfc{?%{R z_itU)vgIPT7ngW-cYE`Gxmv$meff`fe%9KR{53A>(+@v;cXRWP7q9#HmhWHv^~LM! zoA)2S;O_OCcMt3P<(s>!_5JOqU;5wIn+5x3eRcir^{0RP^~1%@^^3>1uWr`M&gQ5=c}JS!7k;=le-^(`^Emj@`WmHfs__a z&cFNV*Zu1D`d{9yzkar;0!nIgBQM_F->+{UW+Pdf)ra4|ytb0-^^fZp)M0gp91i)& z_v%^^*ndzRG);OqsFvSRl4**xW(IH@YDF$8*d;6TxN&R#N!ir!B$FC&1AsO|jeU^c zs@JUJSEG%UEBG5FDboa802CU~NAn)HeXT_Z`bH998QJxvMG?F;vyqB7CLxw)ZrB1jS-CYX%5my0Pc*g*APDO;M?QH5HPP-1&@*~xIU zUX&a;-3ui!nXXF(YqfPgG;2fQN5qj#F^`Isni6!uf-?HwG^Q~Kx;Is}yH{hgjY{$g zXO0W1D;dLxN=Z_&1oUM#1;Y?kx`mz^;ES!6L(yF6=QH6x*RPTvGVp;7=>~X%+r9p$ zHER~B@ym#vBa<33Wm8>X0t!7jiv&s`$YP9`VEEN#c>YU2&AUDws#9D2=gjf1XmDA)3M`HAZ4p zk2o3#zpX6}i&L*FO%9f>MpwA0@=-rzhNf-t@uA9;-yuppX0VisR;#i6GZ25Y|@~CJsZ^%_W3@-oDISU09&nMw_&tw8jLn@hQDYcwwa?j zc^g$pzp$FFQ#nZnwXjYH2dXn+%Zluh&ndD4qu z+@39I5K3YuGd9XjFB5J$0>(u$(BgC~T4W8rk)Y-(YP|Ds6k%!{aim5rXU=1EU@~|j z;^ST#reaQ1HIu$*9`WW4aQn2+$y^O>r|&WTk!YMpbe~OtR#E8pF=|%Yzi&~YSWmAo zZZHIP73HF}sredY!`}4f6kyFrTU?0j(LP2a8a=^|Ky)yQ&^CH|4!IV`r|zxOAGq(j z$DHoC!^C+^#DdI2)-mXNBH~fBYx}q5jKgxFxHgszz}bqTI&C0@XC zQ3Y=5kwIISMGqH!B;0zojUy2~#Hhq2m>T-Hgj-WjEgr_5Z9OZx%M~t^ znF%SJy}lRUGvbmnONFy=noGqgca9@h+0^aA=g{ZbGO_WV%JBw7#T`Egk)g{tl)C$6(e}X6cM%0jP|nQJrO4Dljv@O16r|n*C4uuGg%2GF=x<(x~v+qAyxi| zJ4AbWBzy|Bag=k7zaf&=#nY~Fjh3%*u>Q}J%pX*Xiika_0Z%8fVm8iH`OOs}_8B4W z;oHSnRyU<8MK|ew%kb(!NUe>pQpDRX4a3Y>>=(vixyp_fE(FbFvtbU{7 zWgRN$IC_ASh31kJB%=DIIOup`HERf19X+fN;|sb>ti~7Plk5^i3ao(SMbkJS>R0q< zG9`BFl!K07R?{LjxCt))PjQL^((<15Mw#w8BkIk(y8%h|JBwSaHnH56 zu>UwE;3JYJcMq_E`4>2w<*>h^1`+(^O+09(UebL6SM7A}LdmaT2rr>~g5^Y3kiBuR zOej9tKIJag9f#z?*N`N8(`d3KPOP5NqB+N>lu&f9Xhg?P^i3?W;CvUrH_pnqUH;u@7O)A4#;=1@XJ- zBET})c$!7>iQs1G>`sD{>tS#LGtgiCvW;MGXmtpMZJ5S+ZJoVOp1yl;;=oN&xjgHXGcJJk5T9jX~paY}=&ZtKcND8b$@hut78~ z6EGH4Etaz#`rlYk8^PcsNr~2@mN7J-1(r4#^HJ!ai5-~00*vw>k<+CHwsu_`NL^+N zNJEWb(-36qxorHXK8~6}`T#t34Ta1)m~BeU7?ME>-UX6woHg^h9vz`YFyt!MT1+nD zBEm&W?>uMRRBjT;U}S*oL2v?%6Tt^%!vz2#6+4iiAzyhSxUf`UAPs4UM3y;ma7~>s zX&`;k2ElXsF5lzt*bq712w5mJtXX|zjc#C#5$%lxQ^8nxM_1Tkoa8Ub0aRU-Jg+H9 zzreVr@LhgV{dtm;fWcw8hkwRK=HP&kIIwgeQ_yo=oYGVOXSpWtZE8E>D9JS9s)a|3Wi3Gi(FOoQcVI9sK+Kp20!L^ zZLTrB!u`XDWK+-G))Z8|Z&i>LMxiY~Oge|_49Iag9Z5<2SLDc^7oLDrZ zQp7)+Tm8+4DcGdpqOZvv4D!8IGP7z!gjo#O8^-iE!){c$Dr;Ln6IU~7_!_x9RPvUj z;isn8WIs!GYIsaec9B&Ov=p58JXvCtnhwY8bP&G<4}~XBgJ+>s(KeWOi*jMtaDjo5 z$obybArf$33AN5XKVl;a%of$YqY{#usuc(*z2n#vWJ_YhJ3|R=+Az60HR|yYxF)+? zcehAwjoQy{1$?zfoSX(R=#OuI(~jibG&k`*Ux=9vRyjt3kvPwTg=28j+JdNdT68uk zI7oI+^uNixkeUb4$Sq}?pH$4GKUi&gQis6LLTcBK+#BBDQ+Z*$VP;X=xjLETGj4Q0 z!eyp{&`Z@EiUy}j)S1OmIt6uAI5vU;MUrF|q02h`Qe87D#KjPe z7{uOCnWM|a5!2;FjIY%ZJYHE$*8|KNV&_;35&WOsiZ3GxG#dVu^}oV^Q9rPYF)^s zmCDEs?1MQB)cXpydi$|MIJAhY?jbJ2o?Ojv9OR-_G_8e^i}JCwT-3`JWI9$Z1B3+| z6HdfKPmnhk5LbxA^6p!{$;3ZZU%tIOcPe!HF=G|1s5eM9vxjsNX|n|(peLutj+AG) z$AG!Yhvp|SWr>$LcAFvy{d)FwoHc=i;Q$W>!8RqX{tbl#SzknAb*z0=7zdB4v`Eu} zbV8_Pu(Hxw1Isyg6;5>F56uYW2`6lFwC`3|< zo{k${=EGbd8kya~&)O^(-Xs>xW(QUg&$!&uHcnRW0rVp93MA|#VtJlkem{fr8mqxo zEDqJHBi5rj$lb6!5>5rfYQ+y##Z}cOONq(|R#`%(cLI1g^@hiI7Cbdv>eW#4g53~f z{uPiNT+${9q(OCJk(G_MK;SuD5oC^YUOc&66HN23>~OXXM1sZv*|dRn@`SY$Vr)FC zmLBL6(}smy!>HJq?UCV3_0t)pBWUr++4?=m-q;8Pl#InREK8HQ!BH*7zOZQx-ia=u zVw;8vta9#Y*u@xFT}2s^neBS9gqlh*n(M3@R)}FrQ6K0DcBjmK@UVSn=P3txKbT4w z!_n%@m8r*l=k>e(9OopqhEe93(EER0nWJaDqd-p z^jthOt~|Ivfye|X@B&H>7$~d;M5rO7JQfB@Ut}RgV+A@hb%t}KLqmxoyEtgrjvOiJ zu`&D&1GPs$FjY_!)nI<<5bqaUVtGS^iq!gWtxp~LOoD|p_)PJOzsaA$B%t6Cs_;Cu zJBv%zo}#95Z8|KPg8=b~Q7|RY7d0-c`_V8QIRSa0o10wU%UAG>IQ7bD6+>MvBzDSm zg(v{ttj4d*q81vPUS!mp%BsNxvYfgdoeL(~OU^W76{yiv1U?5CK3-4gl!+Uc3H`G! zy9LE0*d>=X#thWrHTQ&|CoKck0fa!7vi*h8)uQeU39{!3BpNVGY7mDT-Z_(kJGbJ-gkt1TRYGqJ4^r}HLel|J*o6(A=-rQ(u81#rL| zhuA%XcB-^zBk}Cj$RLn`Q1yEi$GxJ1L$)pu3dzp^${rC$mFUdWmHoZUStK1R#8QyB=p{ zn1XZB2^3;a?QEsXm7qANU(nB=haL;1wK-9UPhVVxHRiKSsrcl8|0 z8E}XT$`W*dt)aA0?*e(W2g9SQ z-&}96{`1=hZjI&3vkTsd{qy79A2m>Z zA@zUr_3qAc|I)`?E~5MS;pyU^6IXER^Ol2y`Nwsf8?a8a_h+a3OILX6&-~XP_+yeg z!M$I*QvW_!PR||EMMyn4T8>Zp!;=HwaeUl=3G)j5<;ZXR>ioc8p7hW0&T{N;k5(?= zWXE?eNBxZ5b3fwW{Ad2gSL`1z`+HsD?uRvad3e< zW)WU2#zmg*9WHz42ZxJ)PLBG;?%`%-FE1~yP=zl)^Qi_t|6ygH|BsI=du3(!&yU>O zZvXJP^ov6ec{$u)dRy4J-&qX*HbkPE@dZ|Q{=}ajSlaoHKEqcYwz~VLe7<|uaerZA z=v(cQ-SgA_$anAfgFTD-;g{zg%>0=$+_KIC@Qs$CJ+{|6A9o3#|Hm5wx-zS=f8Lev zEqljZw}-pCyIGz;v*;!rkU}4+DL*dyX6LP4>FN2w$?}z&h=mzOUuUVLWvIhTL5{l5R+ySrvjzqI{Mds4PphgPw+ z9M8Y^&h3N!bKA%I15~yZila^OnSTyWe%6EDH4^i9?-8c{rw{rS``2M-`A9%GDUfV_ zapZK{;=aofZtwf!6DQ;2Ihe2W$D5dRBr^GkgZXA>l^vm7`6vEyp7(cr!H0GHGuw3E zmHp8%{)dn2_`@bZI=3yQe;wLYyYtU}e{eDf+La$$P633Xw)wMtanxV>YWL|Ej^ysS z@OJDLJ&Gb=0YTXHh35wZ*>k_@9{rIo6F?pCQx9!(?mqKxbh}U5cdvV0%+HL3ir_!G zTaoZXI=FVXn;>ZA=J>dvZbPv3BTP~L_*)C_4_&2Y_635DU-%P$?$>rzzux>?xm#%M z3;owueReC%F8Ht)Onm;Z7Y>A=&u<2cc(C6;eqmemqyFT!*z6czV{`a--_G{$xAToX z61V8j=ik0y_vGBK-A(^^;rheYF?KvI?`;Ra= zAA`r{;%;WWP;_>7=WX+=(|)3yciIw4Bks%c^k2;b7H(GWG!--dKu2(<7 zm8(B|(#P-p_Tp8}+-3KtU+GVFmdm?0aF4&kZ7mne+0EA3*WW+?`oC`5d6!$iV!Zv2 zZ?|7<{r$V^tMxWBO7GP>UEVKezutPh4fZ)r9S%Z{^9=OcAKC6 za?7&3y1#hMH0(Q6TyUvxb0Pn{_1}ECJK5S;ez(Q+%dLI3UwKJm4GyF)yWaXQUp;>Q z_`B`b9LSA!6U;%-_gui+Z@0R+J_7r_-9T8qX*R(7t-qhYyt=r*+J3q9{LSXB&TbfU zea?fsdb+;tSL^$2e1}nK=!(AWem#GF>7&;-4}a&Izj@}XHEbU5Zr6$6gza?0zk2@I zclJ^z8ujLOy8F4E%lmg1_wP6NLsmT6ezUASuFX!_JXFB!lZR?w&qH+}Jt$A~dh7c7 z-}p`u=acW;U-mwHCjs_&vl*V=-EM!;PIz!XueKiEZp&EM&93x^t=(<-{<4Q|3GQd9 z-o0pNZd20wuH9{yfgNz8)^+#PbKKa)Z(nVTGM67V+m}y2Y`O?if4bi@Sa_Q}pKbuW z*mlG(x1PMazR6SU^L-iHxP|?P>&yF=$wggmJ=zw;`_B*l|9=tprd@4i*}CR;enpHk z@(znkgH3A_cSMcC7~5pfxBy2}|ch0rQqI-yQ{joZQ^LC#Sf$wfgTszo4(k z=OGZk`P z5kM!yf65ryA6^b`+^RHPL<|eJANa3{*sp#5DjtRSum1Rr-vW>IGMK%JLDO0<%HiO4 zbTc#yOD}A9I=!i+sBJ2#zJBY3J|n&{rWY`qFsHno-_n5qR(Aak@J&*>^JC-2nhLB0 zFqklE1br%jom+L;u#-1oS-qhJ3pyCI=o4%6KU#Bc7JIGtt(`Y7-@RX4r1$lEsl5Tk zeGq;ZKhJ?rw9mE z)riMKvC*<3Q)zu!(jUYce%pN~bU(^ydR|D(?9hBq^K${HuyOOZ=I8!A70vuOM_~{B zcE?5u4G^o+5HYXndDi`*t zx4L+t8?6~3Kx0A#_z-~K{H-af1NczLxNS0=)|a;e_yXu;*ghNemiBvBeau#lM?ePC z#VASx?7~4EILQ1G{><*fF ztF*MPtor|~p8Vz>tm53`xl-8^Tu%S5_h4VXF$^ArZ@{`uIb}U*W9OnZt@aD2qtiMw z!CfpAJBc7%Lj}$6!TjHM_UpTrK&d`aNXy-!f(HxpVF!XIbHRi4AJ8ELCz@f0k8lkg z+h;$#>bG`|4o`Ov2?Q~=MVngLYx3=F>E2JL`(tDxbV}Q?Km6SL@(GNL3CJMZ3a?72 zEH4t%YoO-N(vuwLQS_jQthj4+Rge=m4nemf7oHZ=S|%XWWUoVi7-VY0E|LS%H1MK7 z#6!P`hrz6PAQtr%;J<4j+ShqtsdNoVAkW-5ZeY*hE*W7munUAkJtpG~^LY9$Fu2|K zeT~c>dT4+TN>|s6YqFhTQG)FCfd9?j?s0_h-UPZEy1wub%aMp%=(Tn~6SeBXMg3M| z;r+Dbi0|Da;O+o8zY@z@AQYeD?<9n4A)Jn`Z*VgH8Nm-$Qeune8Q45%e;!^!zO?fX z|1yoYx*mvSrgad;T4BByp=|p^a?#3k?JBAV8a0+-eD&iZxv#U< z8#}3q_;lM)+3hPd_7s(EW2WEQdvdf$5Bzsfb4{=txP_D$Jq=G1x6YpAi}rNbS#%_E z&)b`UaRcqu*ZL@?s9o|J__f^K*5bsJ!|kKhOVt z?~QZ!Rl446vSuC5C=il1T2Z=&4Q8~=)Vj{=y+G?XXh%>y1j$2C%^0l@J>;R^95IgN zI5$9C+9t_HaTRMDer_SoTii=j55A8D&+p@(CaQa1(A?x$kfJegkhSqZ(cB2&bU#MW zzkSs~9C<(H_^);-VL_$O2--(5hLJ|8+&9gF?4|7;GoWdC*gCS+d4(Ark)55GrJ_j-qewtn()=je?5MVx{$sLlye3Q-y=qDLTQia7F zxz0Zx>+>!RKLqgCe)B@U_G9@z7E^-4)K_US$$2k(#7@`A)P=1w5!>~;<;yUf2d(MN zgftG>Mt-jBX%?YK%_2#q2bNoaxDV6*ZC;%=FEr%qVM22nPHcnXF*7t&1(Jf>8Z_e| z#Y5Ih*@tgJ*zUYk2XK;SDq-a~oB9<@9K` ztZrCKa;kj30)7FjfcdTE%zz(sl2~R4d4h~hM#3KtaRx>pXy}_>Q^p|fW_${YwbnOmi7^|aK);^Q?_H5|&zNZga9p4&&rbZCw&#C0W*=IVFcWY;3%Ds5 zw_H(#F|b|}N&{+4tp?QO+yiLCKL5V?zaQKUG3fVj^E}|3y;=ZA+nHProVOmHlW3O< z)_@+rr~&{2ztRDKEzgb_KxDPR zb_URE8?VG^LvnWsDHZ)GKl3e~{|G&VJYQ(FsaIj8Dp+wjOJxeqV|V`V8R8O|H@}$w zY$DkRt*OD9mWB$Jv*)$tr8HawC95FjfG7%2-aFVv`Mlo6=(NMEv3ab-+I3-OPne{c z4DA0k0eNTzwE?{m2DGMI8OjWT*HCVs?Ce3)dw?a&a8P0;GojR=cJByrO#4JlKJ9|9 zh7oWFvhNk-T3+DRvYJK}LT@68XQ9u*!48F3mqa5aHyZ9T*lPkrGkH^3-vNmC6sG^y zZ!-=}6aRC-Qk{x+4q%HWCk9E1dCr#20u)841Fe~6oL#~HE;D4~xn%~8kE*>ArmfS# z-fp*Ke2%>g1=AeIjxCTz{HiLi@Kh8=^~D@#eGB{LzI*+NAeCGI2T|t&ids+g$Wlbu z=d(tNf-6Z&=MhC|8c}!rpaO^B{a%=L-5u&N%$p(cGG@KGoH?ApGeiN%CrIq5>xx`F zIkxtwb31C^um=rL$zM0Dk{R&s!~LIuy{x&yeZanUPh}ewv~$5}N^EC?)6IA^4U-B{ z4=FpygoC#(vq3v7o$4%w?xn9B&?ERv(g78Q%K9?B>0Qn-Jmc2p&`_YCU-A6k&Fl2r zogFKJLKg-G!fU1R&`_78PaQPc8T6b-n-X)JwSFmhHJGzjK?TCR-uV`+)s2AG{9Nr= z6ZYokScj_!sHay^B#{G33+4MD<u`k+G(~FqE*fKj8Rv@2WQ`$)5)3b3!(?#8so}+f&MGdaXU|8;b!~?JD1RdljOBu#oKiXAbQ$QhM$rmEM3$2^>=S7|DqbC@xR9;h-@7V7165Bm;SZ4BZ*!vWam>k)_upMlM^Q$)GQ^H2Il7 zWJIf2>mkGLf$g2a#kWCcX99FhbP_KMblXw zR`_0A&Hy`4Q!_uZ{N_Vr6B;X_-9J}iqv{(gnGP<|Yt(1WuYQAy7J?{_r_R~7=taq z%VcJ;!avVTCgJGzh8fu5PgsKwLMrxKpH%g5UIORJ7vfdX8X=!;7}eu+SV)jk_;n8s zzPg;U6U`;ef3|{tUc%$F`Uqq>#;l}Nuv3*)scOR!X;xr1=va&sjfn^FVXMvFA0o1q zC9lyFTYjVJJ6oMGdRk?r^~EJyyLG~S>nL4I#gV>*BLgz zrjJhORkpB5{qm}L@MiwjdYTu`{P-t+^QOdFLXl%|E42T-cp7_`u@QiIl5Ph5&JB`i zLec#E5JcrVWAmX4zw5XA_Ev9*Wks%qc_qQj={b~T)l5P!(^NV2sKbKx9UHQhG^5!H z>@%SK+qProsdM{SuPKYwnH%D*Dt<*X;vtKCuCgN5BreC0yN`onTW1ZK=5ikbuK8QV zBu$d`Zfu1+tD$27dDe|J{n>ATNf+QfBD4vnK3CGe3D^AR`M;YF@o(DJ<{FxxV?9xL zMAuyifE5nlh{~fGx58$#t>(Fc-G?BUX@+{}!f*X{NATWVMx<+)3KYE0GO~c`g(5q` z_(6O6fqLU8%eeqA^KYI1yF%vwUf$S>+zq2Ug5Oz+%BvvlEJs6#5f|~AN_dI_h=xG> z>O#bhO^SHv!f*Zd9ec8wA$k{!<5jJ=&WeS&?a_IWFh=Zl6Ku^Q9LfX4!g6V)6Ki&2 zC`V(N)&AVGm*4vBySPga2_}iO6h}?2*+gU|8&NSvnl+*~0`!<;W6HSOhz@OFy7?1`#yhj z0Zpo_R`ZR0({=9RqwzbkCd_q;6|54z0pV0aUkS_hSXm*rOSy?J5z@jm*w z_qT%JKotAML|scF#z<`?o`-IE!UW9AK@viZ=NMKMu;5yTN`#?L^7Kx4O;PFK73 z*ERL+(TGQ6HE-XODVB;o;%O7qgUn@JC5$*6!l7(NczofHczSSsBBAsn5%*;A#guX)Du&;Sel%&-kT>d>rroC-MEKu88$P=w@g8*MlTTM zW@^KEYiH2DM$OZ`rUw}iiXzZ7BiUgwl!17o^kg@uE@;?7nVE1ppyR~~sOvKG+w3b| zq{hG7n|3Bc#a+>7J-5qvK8G|=%-mR_S!EPiVSPER>R@;z=o&Vwu`hT46Ful|P*ygA zw;vf7BJZ%R)~{cX<1`S4kss>}S6t+>0(8mhOk)6F9-0)C!)CM`^?CGx zr|p>_k(*}Qpcmm5v``$SUgHR2GrNSDDDJ;xot;FDK;t3rTdzjF&qLKg3|kSpIk)Ks zwJUC;U`EwK7g=ALmce+uAzCHShO&pl}Dj z=!xef5D--$wOK86_jo(Z@Cm5SNIKJ2cwXMw&Td5UNOXyb`h~T~m>3CADkPvtz8#++ z2i~%w2gP;^I&sd&;pFBP#gAPooEW_Zav{N527wHAQA8-Di!@HzodGanOU*K@NyHLi zfyXms2Xyc@Bh#x=X6O7?lKl&Rlk}qcc<8wm1-fkcNG2ob?LPQ$9t>x-b%K`8gTUcggnK5oC*-+jOMIHoRScPzp% zu9L`rv3EFgX+(jvD4=7+G03aR)NB&ekgz9Gfv3p1#zY~2t#uYVBVZBNN>LPqLzX#E zii^)DV^whs#A_c#Tu3&}uIlz+h@AZLlreao&>$v4OT*yk8k*60YH9)4B}5N5$_JE? zVvmd9_pTu(gUcTS${<>*ApPK3eK)+J(80R2J*8^HdejzxLh*AXtfZ4t4=~j}`V~y0mbMUcDl{eQD6^+`yvVeoX`ptNdn*ZJemS%9 z2FP|-24H?$lL?oj(AyITWEgfK>WteFO=35zFJv6XsVCf}k z71QzU#Pb4kCm#ddtSRdZtc0W4MaESx=UZI}vl8U;WMsz5m=PC7h8`=47?=0jd#CDESkm1t4626f;m*QwJc5}@}iRyl2Odn12 z8Wo9))@u!JZmxfP@?-$LB6ODf)AP>q6`vQ!t>ylBag6kSaz5lQ4f&3H8Ii<>@ks6) zG4QJMrM_*s&!yv!PxyB_KEL6ApR`sU(|F3b^`ygSBz);;-dAjA5M9b0B_Yd66bt80PR)!xWERzS}w7J352}s>z3t0QnDo+|#*WA;^yzJ%CSoblA;$keorl#RtaEMww)5o#c_G{HSM14Q`;xtX zYmLKsHQ?fuD$(n~_^S6KbIJJoeG7XY&EniUM;|TGPe2<7hD;U*hKk#HEFR+UcNVS5 zlN_YL&AUr@cO!bP5f{h}z2^VC=`jhjNe*L%D?o6Zz9c0go%Q7PxH~hbGSwA+C%ndi z=QwS?MZ+C)MCDmMoRTSv8cwNEm6}OO`5%XrDcmqbMq!QECQKK3Sh>hyp-5<@#E?n} z8>OfhY_Bk@BnQO7yrEbtnBH<@v9GVvjzp|n*fT>fL|%=4*(8ehe zfSGEvG1P+U9h>;z051j$q9Gwj){$HF|Yi=5C+u2WGUWvIIAiA13Y_q_GU&O&9Z zm43WO+CdIZLge+s3X;1Wv>p`hS!iJ&A#Izu#!)I$RMNPpUFonf6j{(lg#PHa{_t`m zDp${oePq6p87kioM`(e039?Nw4!o*d05oh>j?LD)ik7)Zt3c}2B3$A;T=R(O)DCCJA$;>YB7`Sdl-iMW8rH7IkFlSt$6_4-f{VBl|0CS@b%6NDkZpjC)RVxlN4ek{cR`iS| z>{2}DoG>6-G!a{&NS9rrihdi=3IGBJ3iJtKXZR#n27;T?mn0^#Mq}QWq6@#O^-}4f z?ofKNm@OhX8-10#8?^jYl_!lS%{3n57fBX!LZl?opVN3Kyy_uRf2anYDYKA&?@@LP z%AZqqYd>JhdQ=Ugs_zT7k`UCq=M1)1g=;?K!3 zCI}!)yxVd}1w{_**h&iy(Jt)(Re6SFs3S4SbNq!=7*9Ur!%q=q4tW*0b!!;)4g!O; zP0x@>dpF3~KDe2*qW$yM`qRaQA?pBjVO3U)!&mQHe_igNmoLn0$R2Ae)}6csn7U-3 z(6VdLj;_Ly{Uv8IZ~yk>mxGh={-^H!5aw374^2pz?XqMl!#w!Wyf*L~wk( zoDO@vUUwO*Lz2kCG{2naOGOtEb{Ki`)CeK=@et|N@5oU>!rN%vAv-UX2Sia`wR17oiD7(SkzHDa*emID?QiG#Gp9 zKYY~4{!c_;+t(}09o(V?oJvXIn*mS8b+&5|w_*|z_2k!I>YLV=JN0I;1d zTMLQGAn1fz0{%i4$O6!Ds3XwD8ub>0xjQO+G3G&-wnmE`>UgulM&KiZ#84G55=G$O z@Z$JD5PmWiE*kr74H)~4lg;b&mgRv~6r`*j0@8O&b$z*k)Y}{c_z#biD z0EA45JSIgw=?vg904B#2sUb#EkChfbEKnAkV{UVVwx*zgSBhUd%NMI6ry0HgRt^UQ zR?s^%SRkf3e=TFiik`}chlqrAbg%>c@4+HIqm1^F{ORc_EHbq&*d%x_apLHqUbPK$ zHh5#G{M=%ZsCKNmNHQVPa)2Gk55J~fED>+Tx3#sQ;!DI3ONtjOw$tsMw}}8?FfO1Z zq%@>NwBf!W1u}?u&M66BS|#Q{JA7z_+UDeoS8g% z8`K>DjxYq5*V;#-G%&>GA=JpJ+(une+&hGPu0+xOn0dlWFw79NcHfXc0%&~=dtf$l z?mz-HBV)oc|AZ6uoY0v7C2*`&IkW*(ED&SQ&_JIv{&G8oA~}78w_h9_uQtEt2tU5w z+24EncK5jcfi`5UJw!l%Sbs^}!5ub-+po_#l(Bv|E}Wc^^VLrMB^66_{(Wf;u5Ulr z-*SwXM^Ut|$D`4>`8~%ka`p7~s{WFr6FuN?=Xm?~^6gyQ;l9R9&IEfpXNz%m*nHrD zj#&=-y(jRn$}D|5$UDco+hIAK?j61k{tJVtvdcg$(FnP(z1HRMdRn05dx8M0=jHBB zFg9X*w>ni&J#qLHmRJAUl4}dZI93`EK#*2CYZ4jQI!xhf6lveT3Oc*kkQ;hZQ6N z3r`h=@o4!;gRR7@6<={XM}xCq@s{8$)^43lgt5b@)pF#mXkhebE-qG=bDl)vv|35B z>mqYF0v+vBWDbBCj`N|JJ7OyT&(adD9_Pc)KRsc%f4_J0gzONp^>K@$2YDA#J4Dl{ z9p!(6|5yCG%FJ;fmK@`mm+cQ&tUe>z_BnB|YgQ~A5NKtl;25WnXJPnlh)^UK0WHh~+ZK^Z(M&2Oz7t7&z$&@C zCXByeMJ;qYFVolHcOjZBfuIZNaH(ZGyI*5O8So>B}VY_Ohwv(Q#64Ny)+&9$pwM69vq zI?u|ZyDl#r6JsnptE6-QuX_ZwOTT@7#3CBDZ!8cRn_Ws3Fp71^-Ef~8>@W}(YUiO|6AuYJT}-dL zOdaN%s$-NkmJJeCr1msJwLB#(8C?ZOj#Ndf8b$>T1E;d%Cr}$TjnYfvIgyo2f%EiU{2t5 z+VbEF9an(KiuO_z4l9JuY81%sz_&8fQexLRk)FsKI_?NXP7#!NX6)H{>q)|+i`t_n zx;(NY1jdCaUt&Z(Dy(QTh z7icRqd!zdWLz6N!GE`!N$g|Dl_6j3*8xm7w9^&FxHI~{vi%6kNRz-? z-ynd9AuYj!cg?~dray3tc2DJkhj+RjGGKEfazo9=M>L0jzF2Bef?{$Iwo{2ReUfRnpqeFqTd zg9a2Q{eV(@z2EXiq&Q+)s!@VvohJ+x%CaTO#^NXN3Tf z(#7+scNJQr+NpBoDp7>GR6Sx+6DvfP6~PP~p-Tmw?w=BCBO%Yer4!Y=a-=FHv>AX$ znV6-ifVi>%?r?{R*)ZkXaaqtY>4vQdQS9j3G2)OoVYtDBu7}p~s_Dc#R_YV(4xkBC z@+76_sn2U>(dS|C0>ZJY5tR7{p`uo&JyaGnM<{@25KGI$x-djAMT3n%AnuDZ%zkdT zhPHlOEGInRXUI86%A;^bn$iy0iTTBcJfN-^CM05CIMkD>)Iz3uPt&`sWUF$$LIh7^ zkO&mh?{%dJjK(rnKhStc+*~1fC}7EQ0~G}NMmJxU@5uvjbmRQ_hkS*_)ErvhR}i0= zw32Qw-tFzb4F8fnJAJduqGvgu$+^5=Mu29VIQwmn#&H3->s}Vtqmij*Pfl#M6=Cl5 zS`Nf2)b7ftVG0_G4Jv%YVf3e*eeYZ6ucqjgVB6VSj)JA!$PLTG|_iN4D`gfqK~%AD`)? zNOh_TDVf2TJn$8}s0xYP7t-A-KIgA2*tKI<>_*9+2s;C;GTYLRrMNfDzoH(cKnj_M zwwPNm0AxvDMA3?HlP$gT_8tGi{K5&H2Qnio^zlAbsqv!GST!-mP=0x?e8I;dKPya1 zo?Ef_1xFh^%8vmIZRV*G&<%98SN+(>qfR*t(g zuq)3?h!4OB+}daww3fDoc3aGNWkj~%o)m}jtgc8zkjNtD5rxI}fI*ZjPZ&kD&i&SZ zxRf%g^;KH`AHr>^1d^dbM}Z!&r%kPbhSKl_B-joG7Ba2SBT`nekq)>ThHmc_5g#%_ zdN?y)#Xxba6|6}?BATjTE0p-&B7}!!=))mbhzIDlaP)|rj7f^KrJhyIv2hOhsj#f! zt{{gzRVPzV0M?yEOof_Cy`xHt>FtzjMcx`XUon=ZxS=_tCd!a`hOO6E1TgdnjCEQB zC9hm449;+#o}ybEVYd2i;>tQ^s9=I@w?rtG0k4FYV3o?a6BX-A&||#v$4A|Br>?3_ z=14530aUOi=@BvDc}xW4f_8;67yRQmZA`iXt>B;MpVjt0?9<7jd;OQDDpXL)w+DT?tpH*y(sanL# z;_~8am3>h*t0LgClrUp4Q_UAVblm~GkfN>|)w>n4D4y8zcytE($7hXlKB=LC>|((b zO<4IX3$52n31J}2Xbj_64|JRdB2a*Z%H#2EFlaFYLqL#v0LTqT5)r|RWY8UrG67xV zlIT2ZepOO!;Zv*IL`f)M(zO*Hk$xO4o!1M6%1Ii1RBs0{3;l_;!tiF?Cgjk%B}pQdqRJv4^Bq!dbB`5;{TEL^qvJ zuD~v{$MlQMK}3SfK?B-ixeZz>Fu5k#C>vMS_pP;Ut`h`5OXcI_coY!%iIo8?iBSl@ z2(W@5M_Wy*3SM~ii4;=fBJjV=*bzVe!n3x2V+VJRx&Cy2`Dp)zcKNwgQ;kQt2&jq^ z<(w4i2|SlV$n>G)syV>}4vW&fLdNsQG^eXT%}z2o;5c7tDf(J_YD)oLb&CC0dX1dN zlD$l#V(G2&mPB0%ziPXrMrvtYUdlA{TZhNFiESVbZ*M|ud0mR;oh8GUjL=Ef#=j^XpUi-t zPWh=-6hR4gyQ_-dwd(yc7>Za;cO(Q&UGqVh#Fl(TI16*D7d~V4DqLP$^Ng3o8O7*I z={AUV*m^;ItT2RmvGcdTfy{zmRoK04&dyU;WT=QbVn8DRo$ALj?6ON zNokm@AzYwZ_xang0YwzyhUuf@VZ>9k%j+jqfBwwZTcoYZ*OF}7+*rr* zKZh=0l1gpJb%_B#5R-z_tn~ibC!!iR{ry6Iubt?0^f*Nk!i*)BBLEaTrplF-2Hj|@ zVl9oBu!36~J}(?M3^$OBf;6-UjbWW+z{Oh=+!19IUdS#mb@QAEl>sdah;0@v%1bqs zhX16PX&8&pa^!A#PDu``CbAI#qY|ht{iqC~N?`)&GoM#(n9w@hEh>P)qh&4$M#h_v zAuFRRBkBw@Q}%L%gs`n2Q@(#68%m(f@IurU6jDP4xF=U_LcCig)7;<^a~L$s74@PB z%~4*aFn&EBKt<{(2U0@#wbV054w*kp>Jc)QVul;XjSoC=m_SiDvCzg_~YWX8{m z9K>7rPPnlAFl(VrnN#f=Y(dE*P7!Nnb8*we^<(7{Sa1EQJq81(rq^Qk*+POM9Lwx# zV15zx!JquuDEX)pMabXi^@!3{U8VvLLj9$}Bjc4S+7jyTE*p$igrKUTbaVl+y?WRz1w7vk`uvd>IE80d1uU2Wq$P*$g9Ih=4ySWbPH2-}djh%WXA zuUP&GgwXqJ-A4k<^k8*+se|8y!qsO|QAo}Ht%^h|=jRg3udxZ1cVP+P*yS#P1@vWN zTPcMiI>sZl{GtIimY=Ti|5u9(w(NsCmMF-IvS#&9rh^#@*l{+XTEnmY;<{4sVx3f* zNx1F|)m86H;ZE?AY9ffGQRW;a(maILI46&>CyaMQV5S3KUKQ#bt<+e3!bdSn|5Dbf}~hz!r9*?*Z1ylGfM zNWKULT5Y|Zt0F_RD6aweP>PV~HDJ`W%Rv<2J)%xz+XWG>|2z4e&Z7g!T*>8~ql345 z`*d(Pj26WrC&a)Vb2>U{gS2GdedXo|Jbv}&P1lM5@4?<%7NJOM#1mgK z^V)0M9$gQl2air(Jz2pizkij!GlGlMh1kOeR;T6PjcBg=Oc}n^ji9`H7$&i*)w!}3 zg|B8Ki!^xrJL*~tX(?>EyGkN!Do>5V1c24$RlN&egQ{P$gtfV8EUnsc-4f+6Z{98u z#vKg-2}u01gIk_pST4x=nEm0^?dSQMvpVMBL;Si$4G5z*jv0o^lUJfV z#?HnkQWP?Nw>F+^J%2)PaFB5^L>>K@7{|Ly4H ziAD!=Qe+`>KKu>x-#q}kf_&4nJrCL)II-W-@e+Z7?V`59T=k|WtD-XHS5ZB#twBi@(UK}^CyzTe@gu8kk4h>= zm%M5Tl*^hCXH>os8>G!Q8xxGM)0LQbWFJ z&6RS#iA}y#AiuhZjwP&`>d)zoTlF_-Q}QO2^-3C5%av8tC?-G;O2GhPu_GHLoDnU; z;pB>9`bl#};gE(2+=Dyn2BYNfFCm?HeghfmjaI-CJdPd`;-!Cq_MoH2)1>`vZxx!2kWIb|xU^s4 zdL+?ey6~Oc&|5Nq5$%-?3#4gag9&ITB;xvuaYA)z4d$roGT34NE*wTR=C5o>u0pj zsy~r8L@Fre2pg8Z`Elv}?X`3Y>H3zdPP)TBf~A|z6{P|uVxf!G;XTONXv9W%24smj z2}+bTQNlazY5q^UJRwJ?kD2fo^|$>WFw-9Z;+CUKgc2EhL}lWLD^l zKGfY(ad#?G#G#8iEdJTvTKoeJspC}_dxLYwFpI+ycw}EYQC2IVP$YDw*==>pr3e)y%U6p!Z!O`x!KS&$V26mA z@Z0_}gs?P90m^%qMs(c(#1h?0oezX>DX&ZW9JplpWEr_%!>EdQhg6eZ^w4`28ZTO* zZe29)PU5h@PTn2z-lHcch=c1N<`1ubhOIbfuk#h2!F(maT2=z=?;ZZ^LI4T6w{CiW zeY}lkV}QUOnR4hULJb^rf!QyC|BS_!et1`EvD}5Q#P37u*Vg*$=&|rB92UGHCznQ- zMzzoj;tP5uW1V_t)x157_{213J6b9c4L#&$Hr~4=xtd!`5KP-wUdf*GN9P|U9m)QT zt}yzhDcG@Gf#>LC>9_O})6Vzns)sIi7cfpxML|BxwoPig-xrhil5G;~CCbu8HJ#Zq zQ5{0q`o1MBllmGNCSlCz{;*3ppqSJAv@fztRQgxX9J4B`YKTNReNm1E6Dat`j+fw@ zoRw7CPG=xAoCxUAP2N6>_g!>-G|7;jDP0duFU&6e1bsj z3_UqxzD|Jnih{yUK9|?GM+iL2q_L#n^CernZb;K5I@z5n(CK2wnwB=wOarn*$N)DQ zOZ+T#dmWPLeo&o#iCIl5+>hR_I`*64GnWSMEc4=RP(n{083rkm%6O|XoRCvWt|F>c z^ivJJG4RDPX?i5ui;Ra7my#m!tBpj3$>a&4h1F~b)fhjC=}J`c>XP5ln(O#4^rNcg z&ZIq6i8C-XLR?j3JZ&teFxmkX{3yGyB!Z>nF$I8aUG5Ql7Y^Jjd1zs(*ty(zu3yz* zcTUM1XyT#TBBI~rys!!<;$gwc6Dk`wYU8*uearC4R-Y?oFNH|$6iadVVF_}%Bxyru z00u+si%K~@4=*uLv>aEG>O2?q`+^4&WG}R?hX^t-p z_f&RvSWTg2xZs=whNM>J42m1PVE1vwr~HU2)Z5Ifmk_!7)5~>ySBUPnvi14A^`ZCW z6DQiqMh8f+(Y{h1CH(-s%#O|)ClClm+#}a+#*?!w5=?SahE^dB-=$@f>8q>FU{cNc zv-vJp?&_lC>#0&*pzK&Fn;9oM*TzVR9ws5hkug+icqOz3ChRlHfVtwxFz^{@cxF4d zGai39l_jsNR^xqVmS{SA?;p%ff@P^{IX_d7mYg zQgvS0oLk>ez@Rc5T@>utg#(ZIs(*OH8#b>a2-2hO(!6-V8qH&^SKzoqh`1AMte%S zPBj#^I8?Ul`aRfHzO+&{PRGfEX7r$1E+_&)oJGv4PD2775qVX3feKqAmFjic35oCa z9zD>WIS;8?S#b2wEZRuo4H6V`ZPfzJ7KPTTUli1Oi~Y ztQUqfji6H%=4A#`1y&GOQ<>&_(=1bxqvOfrupbQev-|6!>o@EnO*9OJD*6q5;fH)xZVc z6Y!1>EAt>^FW*&N;jTe)*4VQf!uxaN3pH$!<$8JX^3?|gGDMt}V$v&8GdTxb^@d4* zH1@ItUz!t~QkO>u8%5W|c&_q|L^#;>w#Gl>+nSy4TQYk8ys<31Ii*HW@0w0cg(h`{LdD6W86&O()M zz=>=@H%(xAVm~-Z%nzz1lCBQJAQ1-rV*IhPm}|rL z?FbCD|ITF|OYKL6iT9+sR|x>n%g$dK35cDKM1-+d~u}1hi4qttp_PP+!p1 zM;%sbog5}Frb{)26(a&qaae4xU{9iWtYy=ql3cG~dFU``siTU?s^Enfy{eoTrzUu8 zB4JZ{^puO?Xlnx~GNL8a7(*{)2lPH_N+~GU++mt1fHBl$n6{Nc7%g8BltN?V_-dw} z$@6NC<;7RrqQAoJ0-lzUV-;;XnOJO(m1)mu9*F8C#%*|kHy9EX=X-?FG%*_y@lu2- z=Ha|}7X*-64!2`cP6jA0oV|pn&dU+qF<8eQXYLdiZ!YZQjxnr9;Zy&8ASQy!D^R8q zVj_;nv+^HuQm_co8Am>Mz}4muo#I9*BxvfV$*Sl z4K_`YloMI2CZf`@7u=NHW-_G_cGD>DXEm;aOJP2bbCxbQPn45C}B8tQBb0oRz|u zLG$(LTsiTnyj`%-$4IOpjBOqAqb{`F9H43;|2B+mUCM-aT^fm2qj*mGm5>9BnK=yc zfT2zD24Z%XY8PiXK&>gtYAjKjTMaG>n5@+(H;>O&y)^=FUd*}%Q*xM>jv)vkT_=w2 ze5SL)Z$rhUuWtZK&rz~rB~WJ8Z~aGk8hdG{rHT&_7792@bMYCb=gBq8b940Qcz-Xl=f9{yiBkJ-!E@R)?rxNp}0 z`ibdZk0Uw|*Th7fSl>@iq3LW?EoePdcc^_*dBzQj%oj=+OB0;g5k?bX{`}}itJ(_E zQ+Pve>`#xjPZ{w1iqfiO?Tv zt5+n+6f}_V*$RBimKV!-b(Z|+)QAjka)D(dM8Fz`EFy-kpkt9L1kS&=^kad5NQabd z$$9ipe4L<1(JlK4%}E=!&y;8gOQ5oQf|cY$igwRipT%VUw6eJ*uCY8Zcj<*fTGUDf zf&R3Nm50Ht@3TaTn_!clRyOrznH&Vm4W~abd|B5;MHFArQ`Vvc?; z;Uqe)h5gTuuNbAX&|)FA5Fu@Bj$e7q)an+>nSU9ap4)WGU*0ClhA3D}Iz{Tu>=S2^dKuT89jh}f<{j&-o<;gKLRnbZdV4}N^FW7_O-!9_Tbr0CWDS?=HfY8TKO%;$; z-(mDTm!b`hWMySb;Dy+dknI*lp_fWzF`}z}=oZlf2K=H!ui;4TKdn0gI|Oii$EXyK zBrei;`cq9&e=VzK1A=O)6>@1)B~O@ac##|36z<$0`Og1bYpg-$+HD_7!{&cM_~_4@ zYHMko@My(*Xpph$tXaNyBy5Pb!A(hiY>!1^U?quDt6$r6!YlwK=6rMg;Y)$^(e7_= zk51kl?>>6G0vH=lp9;7~r?f-Otx!Pxi4QKE;=N)D)Qgd?Hhy$gtMW0UX6=uG*y?+|H;;RGSEF9#k2{u>thib%}t=dULqk1@PtF zhYs00qPtBU$`#|VqaHcpnQ_(!F|B-rN~NG5aj%|+i-Qj$^Pc$ww)VW{#*!n5hB6wp zAt~VqF;&!eE}WyReT5O_MgAu(~$T6v}jk8uGL?6@Gzk(!Oz?6)kr9;uT?g2)fw z-Mx;AkR(izz|H_*bULbUBO}~)v?9`38M={ybbzaln-d?j8xja21H>DUYeYuNM4Kp8 zi4c*Lr|h8T3XYz`76?#nKOD|*X$7kLh%D?OZ=C{UP0ve|WE0&kv=R{<2*ynnMLA>< z6Tk(J25U_N)iTcQRXQY&Y3x_{jl?Ui<6tpP`-F?w5!_T%8Gx>N&>!!KHXdy)g%shs zfa(a_fJ4n_RdKH5G3O?#N92q;yo9KAc`i|xbT`LTY+@%G{A?<|w`AHCu^`hC!%^5vxna(8d( zp4xX_zcPOaslG$@G>tyap`eah$uo>Q!l}*kB$y`g-D4futrFb@3&+8Si2CE*lapP8 zxp(k(e@`E&^*Cm$I7rLXzRiM8-<|SZzx6v~u(g?chdcZ4UQ*ek^}PTm15VyL<);0; zgS}Hw$LWGcYLSf4t?*$YxEE!oZ^}%{*b40uEfQsycwMzizwYht^BbcjU$IL^#|MJ# zNLRnz-PwD!w^N?Pu^JSj*gn?FixHb^4BvMan7!STXbEQr2QBD^7l3Ul=v~UP{bFx_ z@09i1y~LF`1aT}r;NT9S>1|?6s5;%-dAHB3BTr&}`|eo6Fw9!i>n=@o3M6eGippLc z@9w@lI?&TxB6Yyy_6}bigWuhQ-NRGpT$90HazRkmEabmO$4~=}j&lYYUmor7X6BE0 z_U1c1uCc8;eZ-R3h^1z@Myz&_4b@Wyxfu%;&j__5b}jUNko?pDi48oB>-8{5JSKfs z8!SAC4OLxaI0#0H0(Os$4c$W6dD5H8MRRnLo+mGFHcar-slSK48 zZ$da7@=1HpuLTk`1;c5F0*-~1@NEtO9Og86xc&|@eS_pfrxtFD%>XG1bp85fmo3vK zd#3{-FSZdFeD&@v#M5}`v8ABU$(?2W(a3RnEMyC5U8pMOf1SoaO(D`xKk};}F}--t zEFy(cV6aq*P0^zN{;nD$W==9oa3=!WeOo8*D*3f{s5MJCzmQm_*~?oKe%%RzB2YQB z_+M~0SRx(HlKnReo?r^_^qbg{V#X$-pphhq8AsdR?71$Vt9(LEp+>=%D%7jD3u=D_o_>1ISteceg@Z zMj7NpBsOfK$!@KU&9F7)Nnr-sn3C}repOuwlev5EMxy{6yN+kyPOh}C>+bX*;wFnP z9x%INP)Hepq0_6_WmN#_2_>M+rWE5;R+}J?S2z|oiwrbpU_pILMu8A6ZVoamHhF}N zi3qqwU2qk&fx_3=>~s(jc`;)L`@Kd_=4M&tdwc4zio26+-xC{kB-5`Yv*^i@s|=wauNnaG z9}&L&!ttCK6T?>QO|OtQ@y>Dlt@C>gpNZI7#GENSo4dS*qi>M+pvffu! zO`so|4Q*`lbGIkMghoeD89_x={3|#H8mK++usCH<*H_8w5&%@B@L5I*w>yg?9~wMr zee$8fnjkSEs>`0xDTswsa>Ax;AL8pXd~?zS>oR`J`JxR*&iWmNaYQQZ7=?Gln}wh9H17*;hDGF168${9*c5gV%rChI^ZS3~h-#jQVcHT|Hj zxuJ?v%Ys5@>vyPB{q_N`iUX}bXCe?bSLE!eK%(10{9xEi%xTXezek{L1R_uJJllR8 zXA2TJ5t2nAbVX*3vus)O{Io^a#{8W^_YbfnJ@^`JMtBUhF#RyZn9#KO7ZWwDvfM3~ z;2%9YBp``{t@uEM4PQD;_V=Fc7Ds#$Tg=XmrWIL)5`UN-ogQ=aLk1Tc;(B!3Ujn)K zOivUjX$)>OJ=i)*s z&)ur|gSz_V{xVT4`95`BW<+(QyJ}O!c8LX2shJX$hwf_JNmZckqmb`-`;}l?W7CP= zS`S4)E2LH>)@s{1geaStlZ;V8PMS5w&|nCQ5Q2s*qG~cS6#>(yiThtl3gu*g0V3IT z5W}P!(>ldg8=MFYfLcg6#il>pYZIQNL_Dw9IrUCfq!l%<63G`WW2jq1w)P(yPpQdY z+F;dr7W+j!pd`I+mV+a`tCHFhSl4hZSO4Z0j$6t~5xfp**dumm2BihQh^2EZqHOjO z<>jHSgWo%OsV4ZGbYHxYC{og!fiAmp_=xNYpk@kd=)Fc+srpm((NQWMd(m(3vp0fm z4Z}2+b$8kcT@WkJ=Cb_yj+j6*;;S_OvrO|lZ1OYluFKZ1`@1hA9C$+Y!iM6+QY$Mu z^C<=>4;Y4>$F#e|!>6J-@hD_B$CPmj**)u;7c*3JDui?jrfl{Yo#!nFul7|s^S+$$ zy&W~scyE%`8dcxZDSRdTTiIcb$I3d++*Vv^MnlAbH!>C$AkC9)wDCj=O3NM0(kxJm zf)AH}n%J!4i++^Ger|SrXZ0CTt^GD-uSkA8xKIsm%70)XWcnMk*0ik6URbx!lHFnl)EY%>?8>;*HT!JSa4bI zt>pvFWJxk^q+BCU{VA&)59O=d^*R>YZ`pp;T%+KScyEY74v1TixUaIt0e%A_KC z#fvVMIRG}foAGR1m}TEs&+Me!%Nu4ZVKrY3b+R{qmr($SDE=(sySx^S$3mTirJIV> zp!!l2Qf9gm2~~Ob_0f5G@V9{BWe`la&8bZ8Qj&mF<_yY_Nasm?4lrXbxl^$w7$eg) z=Q7)s-gEH4TX*I2Zz5BiW|9gG9s5cBh5DL6DQw`v%EnU}ScMO4Tvf=fRv|cM4UgI= zc4MQESGM8jAYHzBfu9BfKb(aT@P2Nym)V+_0`KDXxNR7ERsid ztjY>i0LnAD6x6p2W{z&Zh%MG`LK+33p{F$3k{h48CMfd0Z=8>a)xAU zsUtu+Z&aEo8izv^jcMl2V~i&1*tMeOuBd$tK*XnEarPxV`TSCpMxf{^1C$9Ag(|S6 z($EG{&m8xwD=HR_G(@m4#?jYUxUz3d*>J2R)`*HTHcZ9IDf?&UJ=Vw7I6&5%P{Gg{ z?0s8o%3_B^0Q^;-wpy6)L!niCNdPGRt}SGiF9HM^glZ(vz+OB?Y6}7-rf%znv`41b zd`2i&-a)9STt~5yMZKMTz;Ki2#7F1QwaKfD!U1X8WHq%}+)`WWevn4-2GlBbu&2ye zY*ABV*!?E@QAIwZ4Kz#OQ@cncnMPo}nk?|SO$=&|b4Xx>j`r9YVB2s{r{3pit!b5c z%-F%?c`$=oNy-ldWTei~=C#6)C*xX^&?3Q~QV+&JXryvyc@ zBF`uqjf!@*h7de5_2&A=Cr_xL;xwqv%yIMF_VGznbWERIkh>s3@udB^z4)I@<)C>8 z?a0T=Q3Uvfs&F`OCtyn|k7Lyo`HG{EVvxDbTvU9~R>o*D8Unr`&*ZU%_6+hUbH`0) zC92|x8yv%yc__5aAQ@n+DJ&}CJC2SrEvFZ+tsF-6g#=rK6UnhyBw|T>{*t}WS)wRn zo50Fb_qEg+6|X9jDrqQZWJbn2!AQ5fyhJ^*@PlmZI*|p8C+I?S;o3b0A%IvzrMwH( zN9^4&FbESmlmVzr}We_R^GMdk7vHni%bje&8uc@8cfY*UASVgqrv0 z4jroamPw`YJ=oaexH4vUtIMC@Yq7W;0+tfDLbI98FobMZIDpk}H9|`AEF3AT@#46=F_W2`(#POz z8lj3J>}!cQ6UnQb7en}bQ-;Q=ds`Hah!gyvIb1Lt0T$GjKpm?vAF|AyG}wM$7)sUH zk0$6cztt)vcS|lRvc^1YyN$nTHNBMcN@A7Z7xUX#6e+En5ae*cHY3q6SJWtv1;?&$ zd-nchG(Hyv|J)ORe2Y-K?aI8xywZ#Mt)D0Dv#{(Dp>4XY!fcbFQ|vYLSi@d3NARo{ z7De{J9OGjc9}%46@nsxP!LFlCSqKp`h04%0+Ry!4ggoon84UBBa@s5fP=E+FcWCb( zPXL>|_!vdU|98d{gLtDa|2`hb4R~q8Oy$)dTE`K@jyUft3mmrgP&@##V(#B-nRAq) zU>PYl^O|Bo=^85xU}HgVsN3b1n=u!XvSZi=fsF;K;B?j70ST#|O5%{evIDtss082M zRe#XF)T4h7TVXsM3?-3C6%ZCgJ?-(uw5=#1E;lXff+@xd{v9`v_7g6Z`N~W8=|B`z zB>F=s`gIvD`I-9sqWB0pYCUdE+U=&{%kzI`0lNL9Gro}>{4)>0&SD1!jP_F=k`p-f zBHlOT0q4Roe;>53+5~~Uk(`$XaqUvp7bQ>p)>Rx+r~>s}F1|rXT~g#8P3w>xO{Daq zDW!7Ii&y}^$vy+$`TbDeV`1h^5brr6$VFJzg9h>{`~q+VPKH5Ah~vXC88)r!XcX;i z(zojyPI?`gG$vis4C#`*LVKncdap>kPQWaPRE*f)qaO(SUQj52#9jjtwq{wV=Q+ey z0;=cwvC*CQot26_ykV@E_Sf4e1GaS;SO=$ItSxhgIQ28TQ9FYPHhULr(|P0_hZUJ+ z%@dBtsv75n0mx70aOmNk2I zy-8HYb3XB8FvRGkr-wu2z|=x5rp{H@q@FHPYQmz+EVn0K?@&3g@-wJ`&GbF1aXrO0 z%2`_;$9I+MZoC<0f|vZx^9Msh9Z(7%*)+;|hK>*kVQ&?gR(lJd3#;CWTa1Ul!%vK2 z0f^sjwMN;LiXJ&EF=+kY@SbLS-xCX5#eJKP1@axd(2NBV-(%G4f4}5bJX9!p#ymQ04 z>%npkq-yTf?3gB%o`$(=I#B^O1Wvn31XLnxEcq)q!brj&R+8SPtF53?4Rd&OLNyx; zAlK&j57Rl!0OC!wPchy3h%ze)6%{;-OymaW{2YX;d_t{coE!)4jQSf*#k7h5XlZq?S0P*{H`LVjGU&I~ji8eX(>yI^4o*Kt4ZH2pm#O2nbH!JREOsO@ipIs$ zkQGQdi()+6k=64ON>T~PF*A9ZdjlNU)j6M_5F(+*Dv0C_iFC^#9U|k1%h2tQVj@cJ zU%qo%kb(l7$}%Sc6;LPvGv%cULJYGEeb$ThtTS3;T-inI53#R$V}0!-=@wDxLi2}h zIs@3|FOQn30hKhCzFLSVFX3frJx9d|ge5U~xYVVygXQX6c3x3k?xZ&$t=JoO6D$hL zQhX*%Dw#28tvLKTlohTA_Xo_gXJJ(7FuikP*HOylohVNszOf~ z7-VT)#=Ajh5IavR%L)QQ#g}87G%SYd83l#qiYb(PZ7W{$K7I_Z=pC!{R6#35W(p4V zND~-+JA!UyQ~$257R}KsE*ncLx!n*T^4+)v^Hdt9%RR`)_?TXvy?-6yhW;0D>rUz$ zrg#K*QH`NQnPWAkK|47P_72TZfy0ImZA2)B5Hd?;K5!>*fVOVS`kb1TbP$kSNs%YP zlaPRvpCDzF9xVzW&vL|1HW6xgnZ(#16}qZ+d_9iv`hC(8YS-prXq+O^y?OOsiPYr+ zic+=x3TB%c#bh8H9#h2Au99hkxK1#a9WrQG2;8)@Bm~@!MtaPBgl$ylWDZnOO3ENz zyME7NrkPzyw z+oih3>@_G)3mUEYe#qWM1W}wkIRsg%JRha>$JB-u% zL86ZwtAnJeU3$srYVbyp&x{Hr_q4w9%#%ht5?Ty_MXV^lx##9o@9=Kq{h&t8eA70O z?wOG%u!na^5mm#4JXSlsxown=fdfAwMhYrbwUPt-0fqMbn8r2-%J#|59y_-eWgFQ> z5%z&>;#u(6i3s9~BgCny)f(Mix(wR;ZhA>zsz;X*L)pfU9h^GLDB4g^^M_Y+aJ?W3 zfZR5YW}%WNRUu7d2Pq`B!Ef8kwrT;&=&I62wi56etPd3DR?aWPVi+eF)z4jRws(c& zQ1W$D)9Ng)(8WdPRN9R&gUJL%fFn|n*=wb43xx)VHOXUn*O?%;%$7yf=!#1rwN57j zEs;5+rOE=p!s}Ze+<+S`p(RVhW)e~m2f!pz;0Dwp0<3iXTvb^jvZ*GIz&F#@U+<|14cG_M_gr7V~{f+RQ2_~#w#P-@qRe)0`p2`Egmu&Q8UVBwg|fH zW|nnWR`20?Qc~5H)jK8;<|*RMA>xuZtd{{~PnYbEB`ADjC;W>HLMCKd_jGbprZN0S zM`0HX5(i@+DFjs|SyV&gl-M9laRpq%X69LaDKwOl-c=2W1wSH5cmAZP0o|D ztQh$TJTgEv?@dBG-m|hr28`%}3k0#N*X|kgz)XkLr}J*tIrb6ASd&VLr$PMoSj~=*y^BFg#i1h?vwH!&n!qumWszAUo}E}IX*t58@2U0m@VYNEtM73UVGMbZwK&>;mz3(8a0ERh&V zd-cVNNy0-cBiAegYp6nl7GH@Ven4fZqu)xC;VcGB)D?r(10dx<;fe!GZ^+$}6Bcb@ zGRmOSw&?6OWKOXz9ZYZ41BTPCVLMDl+#=m9=~QnJ4^FmI)eT1-Xe5AYDR`60QL_5` zs*ktrqRIcfrKT;N8YG4+Q{|R&rWmu6wFxt55W|)+l|gd6^pvG>JDrsheM5MLvAw_r z8}qM3Qy@bY18bM5DAwjTJI?x!E4)IiKrA+)NL>_?!7B0q_-JP=4zISvs(2_fQ%IG` zW6DEVNV3cN>y#46*+uxqK$Nj4dIdw7?~)D8=wrUiX;D%nS(|do-n*cKo)L-g`9+!p zMIeJ#n!7yNUjGP8EU-+NPAWv#oVWhiJ$$Lc&H2YvG}I7)^^`TO-9Q*kA#r)G5?5Ka zBDD2JUAz#9RNb^VRkK@!L<=b*(jodNrq-1f)^RQ; zZ&TV0Es8@-U_W1(CEt1|7LLtf4FWfYO8V5n3|w?YbBg)k;7nyd$rj_yAy>$}YZoiG z3hF0!!OmupUo|^tj?jElsky*3@bMc+4UxW`Q3Kg>U z7(wG53Qjf9OM;I#Qf!`7W}xE=)mYCQEjVL|y11B^ha5zNP42tU7UL{ucP_}9PDwVt~O13CUUkC%7CIJg1AW< zK@pR*Qnd6Gi-@&AYnoh@>Q1O=i9Ld#2j6|39BKSer(_X{8XTNv)mSZA4 zI^$pLP%%4HyDW55D-3(rkr;rLIhk8gfcTO6DM;}-;Z&t?>ZoI%c%#gWC50gQ-{w01 zBJ6m2Be?hcUvgq?fnp`8wuM?bqMsg%wzBD8U1gUsOY=mA14TJ&tG)!;A2CfB3#3&S zTmXbGAh;M8G~!WaRQel z47u{=vmDqA5eIO^Hi%;h2w4u}gaZ{M1rW%HOxo3K68i5B<6MhaaL zTENk>1j$g?6ID@8a}k^77bG#sOfALbOLwWyYLfSx|4T4MMn#7BrHeT=P`bn{0@b=$ z9jd@!qSQETgP>Rx{fx%o*WXTe4=HLqtK2{32f zWA&7Co&rQ+u>bL5ubPDt&r{_=JdcQF1iuhCQ4MCX1QSPlE+ zUp(vHw~=iq(ZU(!(0KYYXma-H8Xtdp`up46Jh$y%Y=T4zK1&sD3ZUUekscftq(|T{ zn%`GM(l&JxE2ciDjg>X7G>s-eSoZ{jX$pY?tXlU11M{G|JL^7;^4tT+U-5!}aewgI zeR5P#z=+M~a(srev3H;Q?r`r^JmrT5goq|08Hh|;_-$*4vDMI)3Y!>W1tp4|!eWUI zuDNX_^4UbJ24fv3FK0%{?BvXVJQ?exNF=FtSm+Q=CY;o zWWtV$Y`c@C_tZ*kP*E@+Gvhmu{ZOgGx}4*xR6%IM*P{KC;WQZDOZxB;V!{Gtzet!& z<43_v@#ZasrW%5&Cf-#l*R|ZVC! z&CTXAhIP)8)k_(LW~MeYrn>M!EL?jbKC2EwQGn_KQ5X70UDk588pFr;4W?kmp5@0pT93_@KxoPghb%9g?rHxp)A z@@$3tbSwb29*19lX>lw-bwY`k?_-`q5#AL$$;~F|k{`z&7axj_3kVSiQV@`q1wCto z-`Qso;&k{rRlTfeJCi^C;)UmqQK^Daz8%rmv>1qlS(uI za4Qa;k<+Icf#(F=LH1vHW)1XAn!y_RGWtKmri;J?sMHvZ5qFbmU~?2Ti{n1RQ!rJD zopXH6=!9U*1w2s*DM=G#vMc-rJkETVNW!%jvGLg zk3^EPBl!vo*z;;AfET8N-ri^&WipXuOsL8nfF`#>qIFo=P~pe|j50#TZG5j}%zWxN!zVc#p$Fp-ox+&g;l z?iC<%X3eb2k;X@ovIPO~#W>|N54lwd2PA6Qb>R%gI#~*x-YaU;2`3g^Hm;3tRYr)6 zoVYA)80xE*tfC)TB&q}~6*+p2_f$Nt(k3TW@xu~T8Osi3a00&0tU*d)WEpmc0G#(*Co1IIb&{0h^PS6!dn>WB4{UHmOf!? zDjHBF5#*FxPU@U^se1&LV_E7r%9p``1B=<34WeNamhUy1^wu}shlRefrmkf!q{TV2 zr1+pNVOVBwp>7d6B0yZKY;5`tH`mM4He>z9mrn|)(heJmP%rh`>XA;vI*fldR_(w_Rg6n#zL9-yyH0K}ld6G1wuz`|lW>C7S; zY)AqX87&^-Pw`YOC}1eDD5!~o_h%A0A;09e(0hghBd-Qq!w$sWRY`M2-I$%#24;KW zdUD?=v|L4nT8V_hN~Snl3r^VujFp+C{fL~5>|e8WOo(|zDdROg>02=}CTB!x*6bw% zO=ZE_nvoNXiJ$YRPL3FuNl!d+ld}9j;yIcvU#^tN6AxIREt#UM#uJWSy*k-F<B8EEMX!nIP*=LS~+ZU*?2^HW^t1vcoDXr1bd7dHH4B7&5 z!uph}eaqaUg%50j{A~fIi*;yla}84n)^;Bnm3#?FBiMYlUx_TRY4s{12G+F3Rn;TF z89f8w72&DN4pDCEf|OZ4-FG!rMhHaP$Xdp5i;6>5)(O!0LAgmc0=F58z?cvflvJ24 z(Hv%G39C4oWLI&PxZMvA&jS)h;Z9u+$TrZRgT_-bHfPjiD;3=-5e~7IbxIyBCFLCT zTsCSDxoHQ>NW^uEllxHbjz(YwM44r2aI@ZZEm(z25X-_v59d3TQ*9_&FQ|v0go=!Bnd{y0!WIimBFc5vyMsOa*!i(y9SBNGlKP zkTYMHiI2wCyj5-aBa1GaB{aFEi5jxlQf;uKzqMGbPvxGIyH(7=c}t!WiA$6{;%>}o zy;b#7Yh?rKW?I+}cuNcadu5`8hgc<1OHaqGDMWT;4 z*Pq*W43WzN)Vt^=_zKoKV*o7yi$d*^{gE|OSz|_jWd<1>?Sfa3*txgt$>l?CA<(rF zAU7@@#NLAO>5lcAcw|JhwIn}|0Q79^UWaTT(c>w?K{Jh$UP1|#r`MrUl)1;Qg3+vW zn#ptM=`j>Uv>}0C0JY)k=a=P{il>PWF=k*Iou`ASn5xo6gz|dy6dMrGl~ud}4S`3Q zc1c8YDGG(2%XIc)me_YFmWe%F%K>lC&A=pXgWP2oF(zlHdHQWLcQs=nNh1PF$R`Uq zIrZ$4q%wq7yG-XcbCrOkaLUdUmYxhV1xRWWVc*nwOM5AetYe<5F5j?q=(l}wptZ&9 zoNaQdb4EPuQn>_N=QBAY;7k9VU7-U4b}sStkuW*t#FDSnOr6O2LN}${d__|i?~G!P znJ}-3X5avbj46JD z*2L0sjppiUq&9^kK~V`zh36dvV>S9r`2f!VKTxMD05G|LF^&g~J&~_Nu!{d=VQ4%J z>H@s=6fpvn^FkJ>h?f@^tcjw*%`qG=u@pGt$T+?)>IjR=4heIds;R-V2_~0^lzj_v z0f=!tsCUmML%f}5Ry&s%^F|Ae%=gmXJG}4x3Fe0q^+I4ReeVMh$5 zk;?k;5TsIrqw;z78VvD*M2h|CW(|@Ut0_QYJwUqUx&f1Jb?_(qyBD#k}iwQ9HHe@ zwC6Hr?=PxOBBl_k;+sm?p>vQ+xOb9O;&ZcG7GkS@JU0&7DfYWYqFOHGI7C0h2eDOV zCD1A4L0Ff=M}Y920W(Td5OI=0RCWtc*fmMX3RR6rYpr`@;&h6)D4Zcs$)1D<>6p*eu z+*GL-Zk95%DASWdSwYfLR@|i8KoJhl7WY;6p{a8vr5P_c9)*vY4W|ge)zn3NTJ|B(>u$yhqS`R7Wo^Io4DwJs47%g4fbRWS$G9*hFLXib*w2Uk?&0C;H zW?DeK6qm$XVF>J!2pLLcBZr!7OUw&pTxZH0o|nL}+H&G2w5}{PdC04B)=o@U}a_9GB(fgj$;BJDqq5Q z@X1wmNrb0*AgV6Xnrhl1lAo-A2g-LJF87utxkYoBBc)0fxU;~q(wjv?`q|Y4G7xP2 z>0nGNCcssr+=0M`?One@yHX{CSy?SJ#p*#Qw1$Qx5Ukbym!-_&6vM*3} zg6omilSxl*&k|uV2vH|>YbzrfD))06Y3j4N^m3wSN_bTF;AHrQlrhBS_+9LfFQ-T& zy7>6}(K&JI7*eO=Rip5hBTvH=)%=_+cP~7l{2fQO?M6K(P04ZC%EM{GB9319h+L38I z1&nR}Q}N`y=ZAj`7GkOa!8M8H5OE32BeNdy4|_u`V0dj9-8&%2iU-sc4BZfonB zG)n{#=j`piuJ5||a*7@z5!U{kj;C?Hb90tW18)WSd>Y}!*pMN62_kwGFFQCjr4dd& zzjEcuMYfvZ9V^+2g_hsLluM@s{~2jNC`? z5$$OnpK+4R-nHDwWv(N4!Bad22OOxd@X1b#DUki#@mO+rePSWSqP4PC#l|rBDK5wt zN%iu=;S|Y3fqI*!B1SDAzdPjufuxpcu};m>GmqEIby z{MJFpcE&gS76uI$;`xcpQejn(c8-7Vwd#5Q)okKre|UTdFT#g%j-#6$l;}KQeDRPj zzh6mz)mt>Cyd?iIrBd$_SRDVJGa?=eNzcT&$6UK+#H;?gSk&GFv80Q@N^d_gS)RQ= zd)*Ug2--N5A#<4P{QIk8CD*STlA0q}J>nT7I-XtzqSrL3`3%C0JVOkzdd88{$95D3 zpV0?8%n*$89Eq>BYU4?l>p61%!S5+Xgq+md4CTDS;y0hOu`=2y$L_|;Fq5lC5^)EM zb75N^S&6`3Ad<8adOxD!`HX67bcy>te}7eTlj#A`7eoSyP*feG|C`Gi54K>@4+Mos zRkp_$Hy?PAjug{bKCp8NEb7tDoynMktC{31)bK-7e9?|Njf{?0o0!%ouoJ&%f6(I` z8Eii~lrILfm6hD*W=-3Po|vTwIuQ{1-MwO?F*EUtOr(Dmb&ng+xpXyH)#ta`WE-eQ zMZ`mjb=>VyeI+p;%cg@2f=+`uPB{)+()NxKvk$+$dFK{{(fl%p^xtv?Fuf@4Ku-L< zbyI&&#N5BvV$O1oV9;N#YGN`r)vnmqQA@+d%p+o8*=iblWG6)qd}%T58&+83S_Ljx zzT~vWnGadG9B4om{l>*_+Jpr%^UnBvl%wn?mW}?bVU2n)kHJqR@FR}v0l}cy?j<9a zAXH8hUgJB*7vMM3qY3)4ld8HrLHspkWd+yLgd91)W0q zU@IFY;Jp_;LfsA@_!!d(9i_UhI{X0N+WRM_ft?q)4Yzk5X$eQlKQ_{biMfVsN3szZIkRb|~ENS|po&o7@{`K;Dlmk<5#c_{zuO5DP>*2Q#SlYOH zK@`oSxO$8Y-{TF2591CuU%EiJ5dh;d>cWpypUe}*_$6P!OtTukf>Z~ZrM|>Jv_wXq zfBWl2{=^ENeL^7S@g+sMKQU^;B-B#XVRaR&B2OuHe&WCp*YpBK>=7{o<_TitjsO4c z8@rS=vN1@!0ud~mM2sdTpG>WX^{|S3oiluUd#vx=$yN6>4ntK9GIpN@Z`m+nq3Riv z9YOq+#VXL21@5y#!=jw6(n?kag7d|y^)P-|*X|8vCrcA*n(~fG-)n=D{7i6N(2?WjjVc1qvZ%CR0Ma2pvKYDs6CGXmJAFvdM-{=GO;ws%AMZ86$Zt*qSbiFpL^j9=nVw=J(|nhLh&aXz9qNH0bIEl5wPX zMaGSZD5#YBju1qBF(n&02}5>%EmzVjYzEK#neDPQ5H%BJ)T`+4WO7!aifS8GhLpfx z^B>9T6zLvsrN~v;)N~}-0^tqcYUGnHn{nFJuYPe}@e#G;?L-JaV_EA&2-%9G|A^)- zPu|fL7Ta`8dHw7OT9`(R@2bFmG6Q9{^)06GHROAZ)v9je3rBT=FNKb>zwH|#+OV`z z5#{TQ#=wD9oFVSlNR(Gbsmd?&+3KGwJ8THU>%B233+(m-=&Y1=7_FTXl_j4r?-jj~ zX_G0eQbS<6kvMGyc>8_)tRIE3;S(#@u?axx?vmtWRx%s`QdDNi(mdYKscJMZdznxh zf$c2El$2OnqW#?r?Z;U}qWQI&&O^uI#@dF2jkPJsG1+q=ow&xIAoi&NiXFq$)K52_ zI0?t*i?NYo+P&vNB352!P}l~Pn*8bl9>bcFNb8^`3U_YpY6d>Tc&gN@KdmQ?6j+~7 z=`@0KYoy}xxOy$`?zn}vl8tFsIJz<0ibr%C>|)X-W5OrMOqT)nnr1EwA5WJkBS8iR zdcGU727Q!sK@8c!vVESo`XuJ4kY7p%9C$D{@NECkm!TMK`9CCpcda=5MGkajS#SyCd=)6fFA%zkCD}7cI=Ec zZ?Ka`&ojXd*1ByifeAY_vxlL^O2*`=H!&?!q1I9cEzKA5_Q-N^BL(~92v64%4P}lp zgsKE<`ZC|IJn$cT!i!kOA^qN7%wjU?G6ZMKzAsrTD zt9Ar_?cuciXc7n#l<8b&ppDUbV=o7h<7N|Mimh9G5cURawsbCx>Q)~adX)M5A>Olf zjlj$<1AQ{hm;kkmN2HM}*9;J+2B& zro|-!1<;icE2r=VJUu0QQXiS#&RbP}edIZ|JW&_%uo0#6BRnIWrPOoS#x4nzwVb3C z{3P%}Br{~|=93~oSzwf-Ss6?mC}Q!d)5et+8KWh^$t8muS-vvXg$`Y+h7WVt#vA-f;va1GXZdhif$TrI<*f&hVoH=QQ zpuhNHD9}3J!F#Z1-cg9}g1QI&VIDG`&zeo#wdj|v9ily=TZLX$-vF}JxHXQUR@&9! z02{nnR8$S?{9rvcVvaHv!s}#6jSq+=%mfWlw)@_KZ42xjXFeB z$%B=g8m~|-d1t=X!_3-#vb>rDP@kLm=SsjdO5C=i=b#_^8E8oZ${PGn+*y#6GLwZZ z##2o_$$7>|=rBViu7O`2sd&vNt{<^Rw}A$ginr8XhoV z>O>-&7Hoc0^EkB4p8UmJ4bqOf`DjI&Av7i{AmTl?_y*+)tc3Chg^ zu+T%admci})tZBK%m@CW&WqXBI?o#LC#|7;ne_o7CpEYtZ0dSRiNd}$CEFng$W)lZ zpUqJ+%-3?7d*m}iJ(#3^gYcr?m7H9j%<{I?+s2!^whlpmCa0CIIUn91!R>z}{XU~xM#b!W!@OB6y(cqJIY0+v{T%8 z0FO3Zw^g%vYqarM=8d;nlZ7F#RlqO4TZ?kecRvlrgtYo@1yJ$W_T5Y~o;9by72#_T zTKn!{M57XjNjx`}w?T55-aa1rKu73X96c^aE0q7TC;UoC+G$Anh4>(V<$P()Pd!i1 zx8^LL$g-B866jp*eL7d(r)sYv5EQW!R;*?f0)!1@aXUfqh51l4+#hb|ruZ2Ozs^nB zq;u3wI=3FAN9O_ZiF`8&ILDN3O7b5cmeBrX)C%tWxY@FE@~2zuZ9aiZ5pO+wc=Hl{ zi{IZu3YLd)+WOCzj-0S#(RA;I8?51PrnAVC9q5H_efWT}s9>QY;Ag2Zq$?z-w+0X- zZ>(j0-e2Lx3>X6*$ zyTeeiLMnVX3&z&eYBzG7m9L#urA|(2+0)CcVcz}SjcR&`4!z_@i7`^fX-%h@e>9Tx zkxEA0n>${ib44vjo8x~mzAL9*_eJR=^krH4d?33W{UlnANOJAS!+Ghju-suGL=JE{ z7vAIaDgHw@*dzB}ci&*wZmd4F8NCpz0sRa=lh3da!CKRAzrq3i{20X9Qi|uotPr}v zIrB!A3V;eyJ|9e`?ui$dX@$k%dz?tdb;;^nY~9>*rqWM6d<7dJ^Rm;woxQ~Ya@;_q zQ46$~v&v2c(`3e5je}F&mAT$clFQZO!w)B;8Rn9lrSxVCkdgsWtP7~Yo_yEzmI|Mg z$GjU}cHKGSe`@A}=hcg;n67DQm!fo4(`V*$C5V&Bt2}>53GQ9q&$7)2m;=fY4zQ0! zuJx$eYBoa}T_>b|(Zz4@h|k;fL@Dmi<$Q@!7K73Bd9tC}0hTjmmK?&P4N|i}?!f?g zucW4ga;gC}Mn@*T*jb7KEdU&5X8ELB0X z{BZ8q-Zd;$x+xM6mFBcF8oC0}svbLrI6ob)5WAxccqA-W!Ts=pBn5*`JU^{7N)|ki z-;~Rp7R#jEVQKR04DD9vgmIkO6vow>0zAUIy0+Q3z0~Z{ZQyC8x@=j$*09JNQXpuC zL9mD9c_OM+@>(VypzDSstEc;%^O6w@a$Yi6>5=1p7c0lg9zUZ!Qv}|$)+|e+oVlA! zT{z_Xp>mIq6KUCxqpA&_z7{Kla;5I>Fl;WLqi8mjg)4g0GcgA~8S|=H;7ZE-sb%DSR{SD4 zqFruCsVmsxAC|z4z#%sJN!t<-j0|0k(hRS84UPne+2<<5S-$IqpPb~7PSeIgy{RA4 zZ@I);a5VBpCIso|tav#Bu<0+8GCa8MCz{Z3#uE%YBx7SS>?tp#1gW#q)Q@8?5JIxQ z^8F@ShW^p(EfR>LKl;LLJgc#4O#R8B@noFl=Ah-(40PswPVMupieTnBmQe8%d+&Lx zb&o#6H!rVb`Sgx(<51lXMFiyf%Al1-#aWIYjfFRsM9m_&38;C=(&}mAH1nK&)T`d` z%DKAG^=W+bT(mY0TXIZ$rZy!n@O-G30Qvm(ROPlYpbcu8kQ&TM>!l^ggJ`@@_Xz`V z53KHbuB~5N$<$ZYnn)HSFd~41Z%%`ow{~bM21SFr!y8ZU3O&MZjS+t}H0Soo_dh)R zo~H~0Z_+Zr+e8>}j-_Ls%uk}iG&p7mWieu$!)^D9(;i}D_sD6pt2TaN=M^h6<@_%m zNT?b%JP2+WLKySNthc~;R@{s05DRNodcmWmM=qptWjD}Pa$U*K^Ads9U9Ni>s2>C& zUwC+71z5@t{&t(zN&VHaOLeYr{eW?|pEEdTFic%Xp=vuw-Rq~x>>;3GGVL0ToAC$6 z+*5bSp%G;G60%;q93ATUKD?8r^EV%#qrA)(@_bn3`)_nf+E^iYy~i@#sj&$Si%uZzco4we#tS?59x$zWYfuGy91n~q z$SW{7Lr0PbNBaJ@cmET|XiqtIe$mBNz)xHdbnv&m|9kmuO0ndgXi$nUMY5wcRg75z zRo=27`jM33pqr_TfA&BcJ%-#h;UA};o?OAs=1OzpoTL-~#(Hef${R4W)5cf2d^D9k z%ivYy?MAMubt%@{=6Foo-ZT88U3qDEG@I*hJ*gCq_7;*0XjL0&nemMpzMQ0r*_r^B zT4aD-wFQ7i-e2+r_q@4i#`iu4$|u`EDv0g?6o=it+!=??%$ig)9$uI^ZzIAP-K%_k zBdZ8aR{Wg_e-RO-O;t%Mq0n?16yb%NQ0TYMigmC}Jr=$ow?BQ8i{c)k@2>BcS=+C_>; zQad+Z@(or?Xu1n00SL&BM@(v6QEr1nn|eZLiKShcJj4OibGXcXjy&HWsyM{1P~wXd z-j|T18|m7ysE-pLRM#2Xt8iWGA=8tcjR4yUU}l$`@EACwF{QJg$MiNmE>TxX&IJ8D z+w7xJKeL^=DkYfcRVBD`0G1C7nP}@2bTyU0w`rYvlr`y?v@KTTB7~K!>lgf-8tTW_XS6}$@%5`fN?x*@s5R}GyK7OjU^Kg|3;rbNLd@|zNn5ijkMDc zl1s)w8wbgksWM2cK&eJz^lmKOY26kn;*fVvyeu-Q>Sf+s3{KBi!eG6~(Q&fC)e1VU z?}+SH2x3%b0wOV`w{$`^1E%5arC_Um04%BJ*xOi%Oo$4yUQ<-2D-DYLP*O4gl62Hy zCJv}v$e0MYQR;u{Bv(>b0LwOfp!_e7j^Z^#J3|Sxbuo>ny@)oLSp@NauK!a!CKE&n z1C%V5s%0J)U!`H4;jd*d)8OC6Cv+1aHjkEh`%eblwoEyW!&`A3T2T}V6*v5-atXCs zY4BMl#?4yT_7tFw4>6squLEp`pIuEw-wdAYLtEVuc2>7PrQNQ(S1&X;UrNHw9gRch z!kNT7hc5HTT5qo|1b`)3C1T{vRoT8yWnqbuS*Wivq`Gce3VQsRMoO3haa z$|d!gtjzfnvM3LSiZ`eF`7_wLPQKH7z55^07)lkP22#Vz>|YhO9SXS}DV|Y~?-CB3>y>8Q@R1ZhCNb!=xBkc+x>yMw$2nXkF={Rd6Z$YObG9E6I=brQAh( zl@a21g`3Cd{?N+xEoiQ#xuESCrvnm;#U#AkYR*9z7#scU(@@vQOIcagREJ*)Epsv& zg%Kt6BpKery2z<>@+_B5XP26fGKIb9K>{-SNtzlzy_0mgjteh2x*l+T)fK8>Vz_(Z=!QB~_9AK(n?LNxqJ?NA?_J0K9hX#?2_TtkCM2rcg(epe!sA?Yi`B_t-ojD8_1H?C#2`T!r zz9ySA+#wzj@crN{+OI{Jec~|Jysi5cTO*Pgr^$H0Bsiv@#cfjLqF7 z6td~$wMPL=u26a~ug&UeU>|cCZ{4}|!+*Z*pO^P6WTsc}9vQky^ge#87UH{C;5hO} zZ2X#ogyEdGKA0PlAY1IAJ|Azga)vKTRYpI&;xn`dVc-TI|J{Y?GNL>( z9~$d-UDq*Mj3-LmKwwz>8ksdlBw;>ZKZexk5tp%SoFOs?)dm*~%iZm~59`xn^Z4oC z>E{3d8&pDrr5Iw03{w8g&f?|V;+FOum~xxaIi!H)9s$96PRx@k3-HoGGKj-rAUGj3 zyGd@$?qOSrnXbg@TF83I%RoObwRJ7JCdR~6d}Z_q85yoo;B!-2S+{iO-BVjw+zqsh zthe2pEMRpTF|>0jQ41AuXmts=i7lk7LpNpo>E}0o1cedhUDYHoOmz?B+QVORi(e9wvZzR+ae)Tw?!gd zj{&Qtc*535TWw-UnkY`r=&j_cKiK$w*BN-TOmWBXR= zu{Jxc&Qml20J^HvClvn@`i2ITKiF>8o?l7;KP?eLV%$nGmwq5 zIT$2@Xcqx(K0H1fZQs}E1}2Y8W#m=GoNGEDS4>~^-a#hq0A^5W^;X5;420e;k2SoH z@8hSdoP}0F&E(ol+UC%Y3o)I7&gCiR)(mKcvDec#P)7wat2F0wYMBvgvsxX3wogNl zV>>i|zIJ?gy&> z4|!eMQAbQ$4qaG;r!8)nWbB?KtO@Xsbqp9)6Q5f-i@F=Dwx|)7Vr@S>9}O0Qd)R9+ zAe{n!F^F_k2(&2r`gQV(rDgHQ_@?lL)%hjtQ85#v#=anISi5Sb$WelWy&Rx9@ip2v ztQlvCUB$)=VPJX`pM7@Z1`8ByFdDQjo}-}xTO)R?Uho=POy}-9Ta7S0_CyQ}^D?d6~4a z@Ita``C6dHXsZq}-~&TmQhceWBDKxBQKmzR4hf9GW}5W~b2*P1Tj_q{3&|IrU&W(K z|5$ZQq2oBqxxBlv9j{hvQ~Rj}OA@vm&&=PmR}%$&9n(gfEcMC;vD9nnJo%V%jHWJP zPf7h1&kyF)I~-iUVTCc?Ap+~J{4_bly2>+y9kv`qJ~^%HN@j*f81|*Q4Qet`6|fL$ zK!Gu9fpH4p8{nQ_Vui<;Tx%yeK2_b#X))C>0TQDQLc?_eq+-s0q{=+@@g(6Pk%Eq0 zw1J#$WXLjnOUVeiNdY!C8nB>m!OvJ*J6uXg-i?*qhm1;mOq|ulJxLU}8=}r_y z5HLDNyJx0x#i|MkPlb3BR5D4ziY$; zT3pg^!C=3zdZ02N*%mj=PTMja8A3j|vnc6eUzKYbu5(l?_kEJKN-X=(qUtAT&%t9; zI)>WRqP`TF5i6%^s` zLok=u`a8};K%h|9bD$<7o<3&I46$8zoF@)@1LW1pTK}@EC~IXq3Gqum+ub#K?Vs!$o}}Q=ms2n z3OwPmN0R^adwX<*1bp_(u70*&vxLa~W0b{&mqy+BTv`V2cQ;fCXpl>XoZ)1#k9Hn% zPgV3sY2qg6kpejTBJImCOrE+)U1uDMVorjIIZX_P z9C9V1@0y7ZtB>dU1Pt34g3j9563gQD1Em!99%KN-N;+a1)~jtV6K6Uyq9enaFu^69 zez4M2&*$mqxQC^ykZ_xK74b~ZnzzU3MYhXx(4j`;(lzOVc?BJiP>j3VNJG8y#VL-Y zKv=GWsWl^2?@K);(y%FPd`y`_-_}COPUaic*raSFcbw;rH5u?(@-D|6?e|pVReO}z z95Ay-eeV|gj<-0@%aclRL^A6;9NGdd$Ew1qO`Y|q3MA8V*>bcBGtQ0n=9hzMC1h8S ztCPxAYkY|gN5J@03_q(3^)0RZ>%=WDW0{}Y&vXATzbNHOy-=Kgv4Jc5Y7DY&K-=Vj_NPG=;oa-+#du4=Wgn)N&`Qm)U>WN z*yg{-wZn|VroQ(lu69j7R(0*)KEBJdvDe4{b_-(NyUh~EZ=y#vv-Vh(`tk0c@7{xR z|8n=zjq4;@?7-P);#1G!oN-tmDF~UK(#;vzC;6ZY~cE(pFw?5kB9X;5BE_gmZ9a3%NM z2ipzH?v115cFp4La*};hTI=n}(fy@4db6f2jq8M#flJit)64Wi3$jtIAKf^Cx)tLV z1XK8Ic49@*s%#BICzy#4_xP4F=9`vl7_KVO)5|?fH_}@c@^@8xSQ*IR-nDVS^U&Nb z?yVNEJud{e+F3agk%8|f6-BFqVBn!O?_?kcughd#$b94^F}>RH)!TP8gfXzz9PYR{ z{Fp)RM)KB~I@{GZ0%jaUY%18ODCdG77$u_z}7c4^42VlMmxln;3d^`Gs$SRKCXDjeU!`;fG$QWJO~jx+l*-8;i0pIK#{G3ZFwvY zS30~>g+6Y^Pv#vx=K~b=^YTq6fgB)c`2^Rh_{*X<4;k?_DeOgdW9%$SCQBE&d`$di z5|+*E13aAl0aco%r2}>)^f%b(X{k)bSPC)UBxd8AQT1x2D9jQbN5L>p(WLb4j(RQ0 z%8jTo_1kRV^u75Q(uE@I+0`wX3G;^Z%~*$QFdrL0Tb!-zrtY&38fIk}iUJGGbHz_K z%K6zqMx#9e?kZUk!C#rfu?e_$uJZx?#cOEr#_rnPAdreBB{0-+bH5Po8gANqGcqKd zkRoNHhOlmT%VO{--b@Z}DffR!sI`z43Nm-REgb%)xGE;PN3;2@H*A0Yg%{im9Bv{dZn-|Bi)b8?A(LNzqv|Xpu~fG# ztxQ++EVId1`X_7o1=Jb}s-zG$)L!6W5;3NwLBSgrM-<#HFN3zknsPfJmW?$#shQT# zaZg!N%a|pwk*e!Tk@lzX%umEF|24wG}B%7Q>>0bgrTIMZ6}aF#HnnaEq(Eq4C~ z6xRhD9AreW!O$We-4R!Pv7!|GhWR2b{kW?t(#TJ&OOY_P)Q8ZEXiAcDV@lDLkXY2h zQ&zD-R_u%FtdcG*R_PhlZRb+DwyT){J9H{#opNSVK)$G9aG*3Sx#@X6FW=`K0;k`k z7_F38(K-qef{_Wi`Pbuz`|Qrj)&4GPhAUWJ7I>H;u|pA%>bD@25?TVzXFGcaOJn^l zR54|v2c;p|ri<$JPe*+^mcVXhg9*O$Y@#Z})xm|B1lDuyhW2EC*CIArqJ#+1&Li=& zodcDBEDci{*0h-|A`b&MZ5NU-mlnfp(y*zsh)4;BDpUSQxk%oa+xT`}dt!#e&*#<86fLGAo}W>*;s&+3R^L3tIZ3^%rhco$|(MG9dD6V zPTTLWB4mjvL_M)bxPq*XvBFrtU-O_x?3;2|h&bhi+JW7Mc%)Q)f%A1y-q|OvkI}y5 z$X)u^U}Qw08qM8O>CvVr1GP;slNA%Rv71!)gxpr^hZsJcR-~c}<_VZ-g14fdUL8)o zFO(A@ml?v{Gv<=LNwu*5T9H=q2Yp$#hgqfH;Fa2hh)8eTb z=eQ6sN!6{BtaSh(HPk74*c@BHx{ZF&{Dmyxp#VhxOWezBfIk(bON~aqr8K26q zK~QxrD5ANW;tFs2NJ5uU-h6xW;}AH)+5tdh6)Ijm(%uZ~C1w-zwe>Ya?liZKsJ(Gj zfO+Q~`F1i=b*IVgieJA)9D25=f2o=$hcjk&9{0k;+Z?W{p!fKmIm0AoP2mjTuZHw_ zQc60kPQ$(&r7?Y3UX2M|Wf&!Nz5AsZuu71F^TWxi6ph@x$Qx8pYN~4^?77yJf@GvS z&>*qY`Pq@*e--Z`^6D30h)jlzmeT=_ZFEsr`u0m(X(EoxIWUOQv)&QFii3Dc?TfCp z4M}t?Z-pb3geB57_UWwa{Zi;;I#XMn2x^#fDn(G{vvs=1{>-GM)6}QV5_w?g@tvQk zGGLD|X-me1tpH9sr_Sekjg?3!(2yoC2?1N{u6L}A2IKP+_L=z9-%>vsSD6NKAjNT} z*c)$)^cyyG`#VENl@q!lm|B{1H0j%c`PJkGN+i6N+tq~xb4yExjLrNi{6}8u{vF2a zp1T{Ji5OVut=uL*Bl)w=ZIXaQIsW(GjsBB4)BP)?vi3v)DRsd(N?mCQ(D=SU9WlD3 zPODMk+0LIQM7=~V?Jt)u8<};jpI&2c`cU6a(DbA(xJuPD7YICvmdW9~bOdOIfa54ZqZUTQMuMZ`^J7E|Svbu-G=kTT56)tZk1lam{%6?Rd*(zP#t zW7(81Khi5kh=OtCA`y=$e)y=n4qN~&kX*5o7i%QvOF`#o6==)=PeQ^`SmqeP=bw7h zWS@<7#=IEb5Fg!A6^UG}lqRs)85|U@8mY%LIACLIw<8@>T^t(?1U#WOdu}io%jDcK zWHs-X^796Is!ip3Bbfi~y}R5!_Tw$ytW0Zv!4DFsVgTEPo+qJdtlFjV7dtnuTspEJ z?u4bM(QfME+Qa8JTN4gp`qhjmTTvs#NL3cWk{*FwOU|CW^CBUzj?9Py5R@bB@G1|( z4HRQTTR>ftkU)}Wv+t1_N1Tjl+(!g;;}{N}j!a)WiR{k3yWjJ{ zyML@%@fYuXe|#Uo+`F=S@zP;NW_-Qevh{o?zkXf@n;hE1(I5BiySIP$s-{Tjo5wk< zp)YpDy7;{tNlW*VZV3H&qXmeIC(;EI7LxOqzn^AUR4$Rykf(VL_TUq+h5zTpON>|k zi8*Nb_Pz8)1LPddF5b@Igx#c+CvPdK@E#@(@V%P1c3SE-a!l`7`CC;CP|NGt{{ai> zH_Eh0@#j1L=cOCg8a?#AzejNY>moy^I~Ri~va+)2S1$6*uQ8I@W$_V(X)FL@8|znF zvVN(xPy183xMRvR>6n%}tC%8kAGD%^0^$cB`NamiwcrRcu;WFFIcf|zgkTL#cs-Ry zNcB@JoH-DtigWp_!3P_Uf|u%8!en(cov`gTSh14QvqV(3P3^F2B%58id*&Nki7l_{!6~{jxl%`2(5*gj1*lT-8)L2mjfp&&y&yzwa!CPauF8kC-ONcplg~cJ5xsftb~^FC1J;%k8sI zPx)!D_$f_=$$&_n@nO!RbbL(xL_VS z!Xt>ua?ljo$!c2rjN%GC*>y&r84T{Z?8VsM(5-=((g(MfPQ5tD;Jm=A1^X6k^7N*W z#!AM{@4XH8dO(f-L)B14i`{w7l+_TPYVmTvlW{<5NF*TkbEYP%Ev4Uvk8?Szu>rhi z%iE`_wipG(UW4f@46URwxBxX~k_-%K8*S-eK7DewdYIYC$r;G=l%y1=`v;($amzxU zYzr1-tnK{ZXu;%_t*INmS8aSNM_hqBuNc#`wWZ9&HT1aaSRSD&ZmdnfQB`6`72b!WE5kjO*6=sn2~;R|Ih#W5M#xPt}#@WiysY? zKyImM+`V^_w++*s{p;h3q|>@>2R+mDS7EewvA6(-nHJrYaTgF4#-p%CdbAK3y{57-MY8YL^r?y_GN?-B>{BdGU+Qf z++0XgwW*DKniZ1R9%|g{#uD+Pq!17jCNEqYd3=a=Bd25JGRJX}8DELc61k6qf)Ky( z2U@+%c!6qo+aQTHq=WH>mK6&i6v=^)b^!<03$yyT#?XNXG8?c+!fm@km3r_?c7SQ| z_&;8>b!zjX$MWS2ZR#|YkN-l7BJ#pBhNPJHlM27P-Dwz7JW0dc>?W8l`le)XJ9nkt zsb24w7aH4ZSrEcGM2bnlosQ`lQp+viBQ-@G)OM4hI11OkB81@S6~G(q5=LsSi^tdj zuqvXFNq>*P%BfuU>O#T%y`W35O6aeDq<`s{67KkpNrafb;4@W{ab$-%@ z?KcfJtg0i%Y4CPJ)xAYe$v`Khh(8At!t($K}-dAm0(TqbF)e=J3glX)P0(4PXlHE)b zmVeOC9VH5FGUm*FECNBpN;f=hsFyZnoFeKb*cowzdD7G1T-+P~@IK>pTg?U;H=G>{ zTtx*HeN9Ws#N>pqK9T2L{BZNN)n_Bc2gF+$V#GQydI@jx_H!hJ64!_BCN3Wq#RR8 zA~V!WzY~SDjyI+HA@lk|&kGm30ZMHEzZ(OSy%?c@I{u*My5tK<+<)6?=z-* zNOm1E-QT^rM=k||u=q^uF~EMBYsY8a%XXxoHyll?r*OKy)yXI^XS*i%M`}Y9DYe6Np1;bR)rz+2O2oa z__deYh1g(dO74j%w1s>GWyjJ97Q45X2HQ|E z1*En7vg>JM9+i9)abR@30!hseH~;XE%LsQ=pr{(BMYUK#3vDcHKXD*J5r@6TN1Q7v&NL42zAZ(#ozcfn6<&^Xpslu#8CV^a zZ@ZHo%MsCyt_)^lEZGz2HXSjf>!^ii=1kN_A4pR1uySP$pbr{A|9PoUrjGd|jzmlQ zFexv>A}$$&*2(F3NYSncIr`*`eazVr+6d@B7sWqZJ)fSqkR&@QFWiY>^HZ2u|#FJFMUyb#bJMTY#DB(>m zaPA7B7!=ZYquQf~l9e(so|S6HNv=eZ=jhW!T&N%mRI5+Z_qQ~kP#DuhAeb&7^4a1$ zyamFoT?8?I-0CFZhe?nC;eN4SH&;#^8~{C-8d~AVyN=r5y^iSejqDOHzE-84m=}_^ z>OWz7c=1~J{}5Uu7G&FJDA(3+i=&V`;*Us3K#X0@8D!^tpX1=n7G>oh>4fC>8T-g3 z85-J12Dag)M)8y_Xbfcchi;?J2Rup2gV3(}z@|Luk}M8ISmt2Pf8?2Iq$QyQ-vWlC z^9ew^seMkpr#&&uO`wD6tCh0yL$DN6MAoYzSjpckRml!Rk@3n2opd@%O)f zwBro2|0;5P0o~p`p`!VL7A?!7uitSswM`}6?|A3t58r%u^AZy@ET-0T51B*^@oX2# z5@~28a((xPC(@F{vl3(e{FtW|?&oRMhIsqVkALOHCd>3)nZ0`D#x5Fpbp1NRWDl-$ zbp6(4I(Fk^yZriJ{`u=CZ+`##{jVVfaWl2kzBK6B>(2run)A9>=eS29ceOyUSwd8L zMdJ!rzvvIpf>yx`4FZVzZyX&F&z<2GQGs8Po70^-H9hokRT|Zv2j|YmRG%`2hA~M$7NS`r+AW+ej@hlB2&>2ed-T)9J{^{v+lMrS6`NxOTYGor;8w-Yh zaH)C5gZy~cL~_Ms9CP)bfclxmj`X_cHeM_~=|)mvcAC_53bQ42w3T&U#xD&WuQ6s$ zQr(bz-jh90z&T3Rzmpi{e?sW8&ZES&<8HSAphC%W3?2_1dk)LcuR+G<2Jm z9RbbIRE)jOVUtu~sVt^#1*Qr+&dTaQxaA(Ap@X!n0!5L(BObj5(yp@1+Z={f>&f7R zl0}5+vpy82B2G#Z-rn0O-~}`bLTAdrGT7>qT|V?D@!Meb zP9^b`kw|16d!Bev7cG${EZ@*Xeq^F5hk_Tq+ZZVKCB6Gf15~Xs74he!A?ipALBVh({f zvv{DfKzbfJl$9u~db*kt@7~B&PN~_!F~DRxWjgp!2>Jr1k9uK(S+Y-2}fC;duRv> zQdd}VFPgngF|N62^h@eTrh1OChefPAEvT`0is^@UY3F6~XsrB5cYle+(i{My#77Co zgNw%_r&?hHVOuOHVs?#-8-JZi0$5;-{U@W>nAeI?di2sn$&oj_@i4Yq4iv+iR9x)R zw#B=H1JrewI{)#~s|!0t7?9%Wqypa{dW1OgVcxEzi>{hcxY2W>i}}CQL-X z>z$H|eSN<3*OOcS>EzZAj>!Ha7Uss$m1|qCd8((^t?I^AA1HJ2KUu1HGG545IMOXE zi^W)OZckx|`3pV;r7Jc>xDDRDGyOKd|5|@I_OkJk(>FhzW_mV(ljn;CEi~yhwjG7f zn#*izihRwNdv$nwsdRz7zyj#7Z8AN(VB(jw;_A#(?y;(ReNx#qIINlkyktw{Il6Ij z=FW-J>m-1YhZm!aIme@kcEa++abmoNS5Bik#mJ!#k^=mvy=Z#EWwuWAqY90%oi6U-v zT4^?}kEieoNHHxg>oTg_IuXlm+wkT{a!!eL*Nlz8XRe$$L683SAzmn+cOR)aid@ zjuortodra<9<^*cs`2{tdBVit#sur5N)0>O1aZ-pdb>dd+BqJXH)H2D<)bZIceX4L zR)(a5YB;#XKTBMSE*^wC^^7;^bd=#0=N_MvVeQsCY>6+yL6JrbvWl1GdpWYZn~w2} zXZlE5^HlQ2Ngs0-)iNHM)hvn{0^OmF9P1t1R)S5FouwAQaq14nXIF5l36KU5S{wo?TT=5N81r1anY*!z%*NEvzBl z5IL(D2iI~QdD6b(V$*khTh{FCg950PTTCL@#!Br7YUd~H))Pj zLe7Cq>y5=FZQRC7#d*-=g!Lq?yCMgYc+N}1s|i#2dqq7aIMc#2vkYLB^H~Py@MuXy zJlQ$eH`vog)%Py!9P{_R{cB0f!Ms7ojRiNA_)iPqD1U~XfVMvdw5>FqloLtQG-co9 znPqRHW*BED!03`0<7b8rZ;sGltIl|wdhQGee`-#}Hz4;tnLziDN0S~ko0ajK)bdgn z@(jtFv;QXPb07M*9uDS7r7bUZe#p&uubqzbZ0A18&Cy{x@%;Q8&&hIF_%$XTq~tf` z4+P5OgJ9xd0C+F*CCNx0$i7Mez;k<{@vMPq?|$0I7cGN&%>9kKWa+$3DvTwjc@rrt%H!#G9q~Vs8PP`+*feLOE9OL)$9={BsI#F~zI>hN@UvImO1Zk6 z42ephJl;I7z_zTDW>4;0LZzM4034;{RAbY?s}5X%=dK(V@k^%XE4B*<8dE+>#U!qXP`+2rW7VTlc?p~c zts`6rW_huWD7&hfLfSd=#eLJ?ox&1*G9K}uI(oCyq{QBjSi^uXRP z_MG2w893d_rUSZP3t2LO^a?QMk2TI!E#4H)W%nbOOsVAgGGFQ$u*!a!+wc`i7 z*?U%w+657_(*a~$TxF4aarHJofoHZku0q-;MRtr%ik{Hq*N=>S=5udOd8lVxW{yf) z63JP|vgbU9_Iorr;-#@3Shw=g&G?AqkdBNLrvgFp7^6^&Lbgn*%?fd0VWSOA78EJ< zH&Q+&6|_285c?Y(xM{lhVnY^pyP;fJ&Gejjnk7!tgXRP@d8gZ^y z_n`aP?%h8*{^9uFj_-b74ZGjo`|cK$s+L0j@&hwve)#bRR(#*m%e`-JJ$&egN!Z`N zMepv7>*$>s)cr$w8aMy+>@n8`z``e0r)dkrcSgJW&Z9@edR%$(fA9!r?IuSJXe{r*wF2cDxmW$U8dwWe4VB6WXgIj(q^!<*AWQNi z?~lDQ zPg8E*mWRhOv@GbZ_Hr*mA2c|a^B%sb9*8DV4%QsM4Qi0Kf2ezo{!~OuBh?TuVb|M` zi3^V%yjPyi+^30$3rIO1$fg6b#`kR0bT4I4wBJC0YC0T!B##q^4m-LxPjAW#GiRlAt6vMzoqVC>XQg>q$rCDjKHJ>KccDRvu#m zGMm*&j5d-#2m^0`VainuuPJ9ROFW0SH?T#+Taj1#iyNl#;lg2J5>BLV;2$IbFppxH zBCi&&kieC>=A+~(SV(D?;ANzZk(Q>>Pt{wam!`JSPCL@fS-@p()hap&ZN}J378oRi z9eKsJ*%6+rMo_KwC)Inaqvm^A+KnV79@ihB8(NqG&AU*b8<3-+P}wd9ThB zyx_6*%9n&|5aPg4uY=A9H-F&c?ZVm_5blj8fBRY#hKA*yuWGkUU_S^zoJQ7eH+LRC z+Sxxk+O2-oAug$u#-U3d<2anyzYq#GRHpA0u^2K;EgD@EuE8V#$P*Qne}%Ly0;R|s zvPSL{v#rb1SK3~L@iPsLpvxY=!YcQZe8@M0&(@ph%_>~uL^8TJ=K@6sp4H{4xAX$drFH)q-FRyHBbZNu|^|_#; zNZ+|KH-%`*XcII6>QX`Y%`7k|VnFNnh)cb^6dS|(=koa&W<)p@;l$in_|#;ml#udj zG7zic4J)x)5* z*`78ZB2jeqn9wkMd-qAxUBLp2i@F7t3a9uvf8Gu_V;R15~Q1P(yUV0=Y& z0wiG+3C`q2h#oQYa%KWg&cOwQSPq{O5NA{n#4Iv zjfd-*k3B)oNt)Ot9#c2CuIca1Wl3_8Y1+-2pC^k`sa(%k!?0Lo#Kt2uWjts?tMtO_U%j5BLPvT_k(k5J>6DZg^L#;l);%?p zlv!FN9pVsiwgn;gbJWO0Qakr7VRcCZ>*&P+uH2-;QCPP4FQe!#U2#fvWfp@O{*x$+ z`%TeGv3m*IW1hFiV50hb8Vn-R6qN*I@J2ypVM=~G0#s#RX&8P^K}TV0sNkf;+4Il# zSeHF%e==MrPfjZqjjDJ}#uPQ(Q4fzPK@vjRvx>!`?RYVSiWHW?krEZSFC{#eGQ$0e z_Q{87tB%Qs`QP-#7;z&gi(`@j;EZ3r4FJmp4X+)VT`Sg>`Is1F?M>WY;rdRVWBydW zHimupNpUCwcWn>?PEued2dqNiM_vhfMq*aDs&ftp*RSb9b0`23qppc=5w z!Q2Z6HN0eQGw7(blm#G7g6xqn2wPYW&l*9GkvnlwoKc>_cO)W7pX0mV9Y47B?FoNh zT-~(O#s|Zvl}j6s$?Fef?~NNCIf!A*De{#H$vRuUj;>L&S`Z1YL6n~+l6)mDpca%` z6q!J1yksNSyJ6+Brbuu4i@ns=y*QZ50r+LyqO^Pq?rt9ya9AdXMC#tIITI02X~|YL z_gL64u%T~DvM8?e`OYCfAZvDkKB{%zC<)FSvNvg*=?#hJIs$EN362_a>O*){<_rwm z5GPD#b$?IGW9iH;zL6*v*p$UUflJlZU4U)XhI+f$$Qs5TC0OZk^-y+3xhD0M2h=*M zwgSeoC?n%&BEGr`Sk(bG54siNZ?gpCAQ_^~gN4M{fVi00q3g43YFn1C*2SN;0FGmH zWBIXeYOL!Imap~kr%qqdff|eGI1iyaU4BlihQ3_A%BZwqac1Z~s+|kf>I}C_@zL(P z6s3Da*!PmG4qkPKK`P5LCWfkfC{E)7M;(0q_h+&Ebq7`?d^00rcr_z^J#;C+Xi$L$ zoyd^JYwguul&B#If|UVUc`rCEPojpgWsPGIuyhkBGJO!>h|)OcLzqov=+~G{ zisua}%#?F?3hOHUiSNq8@P?}xnEV(1c#V<<4CypX zOk0J}#_R)2uyM9Hkag+c2zzA8?&a;lLWF;`_@~4mXpYGo5w^9wFd06HkwgRVJ{QP=c=BmI_kKmJ6gWgXfqZ|2AtVZQVA^-ET0vMMb-ZN^G zb%^W<@BR4sxmVhxf-^c0JWbs-*HK#(k0TM#e1fekqe>IpR}*mdFHv6M*-&0}B+V6y zXbGi72Xq)2($s$_n9z~T@eem)#P_%OFlFz$rbSHvXm^`)T2gnRT>=4u`fnF^bf(d+hN&aLfT#FU3_Y+}jf zu*$mW4A!yLv*gMWFR%2_d|{~qVI%#(=>Sp#P!@vF_L^b;M!DPezZd1>!7CcmQ@RXT z=aPUdbqDD2(IPbbkN{DT0?=}kw~cX|=5kny9FZ=574z>5ctXpp8~T}^OuJ@siY%_igRtU;Tj%0EXvqxBnKT=;1&?N*e-TbX|*hev0+ASbc|luIk?;%ZUkRam=9F6z?x}QDwJB2 z5|+eVt(pcF00ou;u!yj_15>0d?ON`7t_O41+sql_o4MH4mWGjD;z=y6(ZXQQeoBqw z>lj4-T_BsY?+J}$1%sR6NWXfFmXb(WpGbj&X5Wg zs&6^vl`0AJlgk{folA^eGgZJTn+tGZM2O(^#w z{BNM@*Lnp=m+WS&u8F#;wXupOE`T(x3st!y-8-_a3EaZ7$P%;&NJe~={yNae4#FpVZ3=#kc+0*KiW|EbGsG$fnW1U~xzY$N8o$|E5d*$i zJC4|%kyMz1pYT0XZb=W?vg6o14gO1aQ26Ee9!E7R*REIq{E&lz%t+|&a@{kTM`e3O zy|ny?fR(aCJT{m(K{U?{3M{-BvWb=DJ7VLpP4vyM4r|1j!=w%ewKwe;6hWWJ*{-a~*I;pJ-2YbXYPQUm-a%M;#8!DFYh^%t-n^;Rbw3&B0yicDUM-|^ZN+y#|N?@h) z*#JvnYoYX}ITjp+6F6zb*dUk-b{5+)WYR)a2Dog~c1toV2~b#VTipIoegCOaBuB@H z@(&;X8`qdIjX^==K~Yw<7{WLn)M19`?@z^Rag z1s`N?ODXN@JVYO^5D1PJ^6feLc)@KkiEz5Q%vMtY`Tb_ApfNgE>W>v+8+b`@y&-Nw-;#z8xOLnn}xL>;;RH$7Y%?aFEhZ zXyAgxhdiAx7Q}-PHNqhYD`wJp`fgfIM9PJ zd@hB$fpYTTfCfF4F;00jh)DM*>#K|})E!}%hOh}UY7rY2gGcDdD~9pJkSc-@FSpeK zcb6QmAU@bAE9vFM0r87&q`)&{jDc?^%v>e25&&={ns*%sv*0*U(Ah@{98U^l^fODe z3d=Fj|u}BrCC&rAO%ER>HiUV4eP~bsQe?N@Zobh{7$n9lwz?4VaJCv9Y_iY zw3V?kf)Id8F6mrTw~<}8=}OmW!1Ag%ZYB9D)0BA3y(d6x@}00S&37}kxZu**BZA|z z4jCT5J*5QB$MHLz>IQCCk~)wCvZs5Ynb)MK5j4Q9U$~(t0cC;`YeY5Yz5BmHhD`36 z`tX@>Be=FT88I<#w_Of;#r4002l9|#!G~(4gQF$6Tv3u*d7f%0q5pV&mh2OM(=b+r zfv{tiYO3v6Q8)}1FY8_bOw3bVaU5OT#5!@-D!I*_%C~vqVF*TAdHBbHKuAWP3i9Fr z$D}aBi;(mQ8tlz(S*=pKZM-7t%Udjc1*ZdBl^?SFgUO?_&FFi&-s&i7*66#;Q%$ip z13rM<1`?tAV1%;lE!eE&vH0Ud!k{h%;KUpZTcLaWIPJLJbIRR_p3>z3GQ=$oF7^|w zaq)}J))$XFJz-xu({T zvQ6K5Y!P-2Fe0#kB;KhAF>^|St7Xg?WOrs43Tjm%W7F6SH9^rqQ0aAKgBV&77`p|5 z37!vkGX|a(`$QK%vc(K$>H`=p&3s`N12npu(ZGx4B;3#pOx(s7glBDsJhJTb!2YT5 zXWV17(u+ABr{L&ZrJ4Y5+AVI0Eqef-Z)ydpFwG`O+gt*U%Yn~>d$_!&Q^Wx9S-l)s zURJQ-%Hg~2w`6GBmB(7AdQ3NdpKfP6(C#3R9tA33Qk6@oJJ&D@@fGMY!O*053qVwL z_>=jKreJVyaP&O+3xAU*Jc~vqc`)*|`Nt;94Cv`))aR|jYAmY!M?p5rfgRDBL)*!y z!NbGk(is!Nm0dsWd{-&SR2R3J-=V86xDjyj;yV7yW~nf3k=yfTuoTiU2c+-`^v?(Q z;TF$2YnOU1{&!xD=ZA!)hu4_uMg)jnc&KHzCXT06TnTK{23I;)06YN6YMcZ{s(9im zk1a6Iv!)pAxQ|NA20}RyBND(bEF8itRt*eNK|RNsI0{+%!ic8p+~d7nRpMue@&6A8 zUal(*sS~^4Bxx8b2V{1Xp*&dE%OfXdc8S};a~IJ z&zE;=ZcTGVwgbF$?VumOio}hx#r%DBAaOjKB+LeLu~bn@*La}{PIrY6nxauBXN8+BVfT>cQ6+i7sqC4g#6JWC`Br^l{;Bv>c} z{ivfLZ;f4v;Dw!U9&!)FEx6>;U+jGIZ?|%UOrq<#PW-hii7cIr->zsxN)$^%t(nEu zzJdA9hQ#IF8RP-ym^$f(c^(Nni(w; zJS=>qv`QaYS=Ex-gGQxUq&TAvPa$+Qqazw_Mb1iL6;D<0-^if{1as7}K;PpJHOn?R z5SAgYO|G`O&Fzx22oG?rpWc6bVh$p1wP(&h`}Bz)LeS(CC4AGZK-JtZV5By>?Ergc-Hq;bks5Qy`b|6ewAp z5eCP{-XNE9)L@4(JCOJNZL^Mn1%KZUt)cl6BT66L^<6SL-a@22al1s>@?$Jr%*#TarydNn?gtUxHao$Sb9c5N4x2tXm|0Fvic%L8hH&2=&t3Jll-+m$g2T)X}8Eb;jmYXA}2HZ*kOd4??p zio-m`wx(!IuvvL~^nmHKJ)utL3;t4^*~wT?c8q3g zI?REGGzllH>l7aSpdeQAcXiOm7eE_KlZ#Y+6I8F)6RGZ--nwh5N-gw)kj{#aoD8ki z%n%UzF<+R)BBB-kXfN%V4Pu9rI+u~`DV6WNB3Br178MfuUkNhwuujK85uxu~c7>3< zq5Rc8-x{Tnf-L-CUOfRJzc81^_WChJ!{zN<^ycW@TWY&cWtd}r@Xr@3l!SPkd5;Dr z{Z_(RI~v?8h|ZnLoScoIVi*limYqU>DN$R6Xg!5S#Sc)+E7jiA7hL1S(D-+FCta!r z#A7z%gSp?W;VLqsHp((k#gxe$W-wVq7gUwfbR+ z(9um(v=MAqulN!x=us{5kIhJOu^A$g=93}uoe!+mp+bQ}+*g@9HKpd$Kv5&EalT>Mt&&_X>`kq3uS$Qp{T?B{=n zG}zmHrq*C@(SoETq;Pq)4FX}h)!VYcryn*tv)gen638#l4>{L&8x^6^oxb8^GI_TnylW>bg zs)wTXiMOG0(1UqXDAWwo@gM9XU%&1gVYy8$Oh}pOaz)RojvyWjLHfRt5PgmlTa5N% zQ1GFU9l5E=7VIRZ-sqt4pwJVEStrg{7%onqa!h(oV+~kR@=>u0hGX4W(ym}OiL&EG zQA|{WR9|5mKEFo_A%drjGROpSxJ_8JM7bbP5>)A9F{&H%P4+E4OJO#|yP9KSSxch! zVp4*M_o42!OsU|e^8j}IVmH-wGoSlwe9^TNQkXe#)d+2x_3{DKh;XePET&F4{RFR0 z|3s&DF~P;Xi4D8)gy|nb8GH+9k}X`%S+CGm5phMKh?1_H)DH#;24}6TL?ViIS*Dvr zgifGl+G!fB0323h&4GI--=BQ*kf-Y?5OnTh^xrJyi0=cQQq??LXOl{33Yrxp&O^R| zi}5!75dU4@Ch1lJ2UQ|)0BXD0>;{RgtsXo?p^{@c=p<%+T>wZ*Xs&|H8I5Iwh{OP- zMCRGLjxK_$9bTK)Ghu^sydxy0{}AswV1g>>!-ls`Z)f!ycYPMxA>DaJmkxD6Yty?q z!y!sd0(v*-oz=#sWTg_A|NqQ^D~;l`M2|}PM^93%Bu)aHluc5UIpCDr4 zDO)1u@SdGI-sBFljMWYT$+)2);5~uQmC82S7Endua6@vk;vArb&1+B{RG)1%&cu&!y4CSkJ*Z1% zH6>6MtR&tVv@ebtxg|ba^p*3mH4XIrh?c(?R>q^78uJ?#b#+$<=eJ7ms@yU{Hy(gY zDMwYh9x*`Y6I=Ae2FWcTWtKTsIJEl$V^SM{AyXe2tE7pZmOoqJL&UR_s|5+H+2qXD z@H4a1nUB(Fx^gh(|dmTV%NGmNLPQ*s6fupO~=EG=g6Jhvu)Mudp~ge^M8QtQOO zgC~%Vg|p0SIm9)V-xm28du+rq&L4$Ae15ghDmMT|E$`}a>P8c5iFFMGHf(ip0Sl?s zL?!s}`!f#zs=~3aBeW>mAoYF*AyZlFVZ4r)}=ZkEHUcxN8$8l4^_5@MGAuC@Y#T>>U1jAZNGAF?>1 z8TBKMuB=c*CUCJh;d#L?o9}wM6qJ9<=UCYuHYtVrm-!@7vFEEoH$iP!7TDEl8&V7SF{Tj7@KiuZ;J!=a(0|CmEVd!7I@=YQK~5VU!8WNOr{#d7W9 zYb;3}K}hzdFBM^HgkEuM@Me_`t3VEJF@e(oX*lGXywEW314F?Q9X{H5`0c}E6B|e! z=a;^_B|@zyLVL$yjC#(ru>CMGUA!E&344UiAy69HNGcrk=yAGJ2R>}t!;+nPjB!AT z>?&yzb8gZv(;}Yntj?Lm&niEQf0$>7X3iy}npy30kFW6ZT2qz&M~Owlj>kUjcTb@e zreYMu*fszlnz0`&Qp3HSQ{37bDL*C`lQUJ z)8%bjDqq>Jac<}FQ->177sZHA+oH>097d5et;H2;qc}7b)z>e)WMdzmR&7+|ht81o zt?~`+MKOllJ3yFshmwubRD%G1#> zt}{6N-Q(ZgW;WJ~$L~!TGNbD!PU}-uy5{Wv-`##)x5->$LKel$x0f!bbrY!M6>It7 zgKGCo7dPD+HLW&oBH(D8>l8d|4&DN36b*M+0Ozyh2@55!wzu}mf(%;VGg(9TN&>$QA*-dPc1G8h7^hpf z9zPv8*yGfhG&FpoVzP0>G3mUa{aXibV@itq5y=gza*89bV|j&~<7`awz<0W-4y*U>Wl&PHG_^to{R@y&c+|C<_e{)9y@& zMcmBdWI!+&)h3UELuM{Ew$V*g>B_}6=Mtl!Mb>B3I8AzmzX>?e1J7$cabSb3yLTOK zo6FACfBVqI@v;Vncb`PDZW5~`Y1BFW0NSczi~BQPL7XIr zN46G8S|&8v7xhOzWM>#BJCOhqFT080V9T9v%zXW3q36y!`bU7ix0;y!}`#&5O26QGGTSz1f$zN_gc!(Bf2;D!iaISE4uV}J8 zq()LwYk!+s8I)esD%(XjV_^VnIA{!><9JmSn8_U+-33S)z@No*kn^75D>;rF*5Jm8>5*8NpkntuY-@M$R#O45Z$KbMp| zI7dnCQN8mM?u>lT&b!yp)Gxl^B81EAP>|JIs^9&*kCoCZKl|~;8HaacoXmT{OC%98hOx^xg6qZt@}_!G zrQnl{bG{UPiMga3cHR^uandViGt2PMF4USE`OnG@_RJIaWN_J1Svd5YrNr0aVT%s! z{kK=q>4|SenrS+)FBz7$MPY9rDoyAqBCLL672A-Pato=dCN`_OK-Zz^L!6PweYyd` zvQk?5n5_g`1o83FympQNG@D|L0NV2ZpI$$HYsXiMY@DctoI2c4B4_M&VTjxh55He) zEtGrn@i`L11+Is`JIp*69rFH-0-6_yFE9MVKintW_=7X3DcGN!{`ETsWdH6bCJDdI z&p?x#p&XaJ?p^n~+uz-0?(?5+-anyfD9!QoCGG9G;csp}JpQ(}e0-N*lW>G(@E7)e zd#iqtMx!53j_=+g_fNDO>-}Qq>ePf#Eur1X{U09u8Nx5z!5zw3ykm(rePFa;kP_lk z-l?Zh>3j-3Ms-Kkjff&#fJ+KLB1r`45sTIPzV&^IT1}@O?@dapq8wDycaK2304>Hu zE6>%&9Q5QbEKhMpPAcLi;Z$J&zpF*ytcRTD@Mg)Wy%xPT6o5nCMzh+g{f5#Ha zv{jhWV5dB*zf%_mDUf$5Sx`p~C3V9Mp3tcY8BLCn(M|U9c*Gah7jxXC3xv9T@-3p5 zwK3*_Bv#L|OV7#^Tn^A06>?Fl%-Vd*c!`=bc``0F!Sm-a&4ffAGy$r_yg`6J@&(Z9gc3t1 z$%NPs9Vs^1j1Pj}B&E3M4!%XD5y8SHaYz-1=Xzl zRlEolp0)d3yzk4&?m!q6ugKCI7#v%xO@j2BOQM3Ov+2(ED&sRPVE`h7_pc`Eo$1%4 z>Sp06rC$gtPM@X&u!wB3CU~Xlotrh1_D7aA#!acE>D4d=9+#MaM3eUM?1L%y(xv_D zBy6WH>2whMay1+|+x29hx9J>S*&j&U15^QOraqqSJZR)@@Npn;zpw$m?7k#kAX*I&oi!90t8u|?(0{xA{w$vVtKujTE zsx0@(OBrx*m71l~KIk|E!$-fPvcAC-V` z9+j9Dnc68K@S%91+=p0U4C$HasoL6=lDH#+94>Tav~@zo2-wcwZjF1>`I36|V&|^i zM%+5}YuwV~UoP?v{c~poO`}958i({Xog8v8Rd@n}YZ}VQcYo$f_wL`i%fkjYlq!ym ziEZ1fBW*)Fh7~_2W(NCN+H}rH!-rpu5L&E@2B#lDA`-B~tiF~j@5~nY@e&}m5W%tP zD&wx=&RNmw^VPUIC{T9lDrblXICfioUi=wU%ROx$etvW5-Of91^?Jw2vm9CcC+^q& z-A~BM>vvCHnZy5Tx`+hHb)V{ONcF`B@}Qs5fp=I;9%w@Z57g*<;dxYBbHsTwlpeM( znFnkiq1~{3J(qa8>ViH{Xw&o=ybRNaFPc(YNMfa-;RGfDmTVZ9RbL9DgXDjoa%K{@ zd(qh7D3Fy{lP%_hzNU>qRC?&Sxx9s2h@NqJz*H0h+^FDWfo1|nH=YRWO z_W$d}n15q9MWT*6ul85oIHGl$Nku#do6MIGzB25?B8y8n^FLB{W%y!H;s#d}5xN@K zcSR&Ui5{M`*6?6uIp3t{=emsY(c)q0<2RC3L_Hy4T*P_ai z#Y@y5Cbad$nj(3~xbESMHPZhhAupM9hf}gG0q(}5uTv325~Eq0UKnQHCO${>ifM`i zkdXguieic8rWfWzk;I@R$+hBG5b6lleYDo~G)xOA8LbE@yAanI2b|p23?!auOP&}H z=SY1vUYH%!lURIPm>5NAy&n0&>qS$G(`i9(7p)YliV0zQUgOLbd3`Y4S|fa;$1z?&NUHNPOtciyIe^1 zkP6rzV>>E@-c`X8KOc7oWc13y&_^sKYcYQ72E7P9-I~>BQQ}bEv*lq<>wFo}s8$NT zUvDmC&oSdv2a68i!y!)mKqSjMqo>MM1=K@B?NM5Mx-{TP@lOeja7x;@zkPple3Ab? z+WB4`_5aqOPHJ=~yG*`qhI0@+O>q&qzuo)hVP95u^P4*~l#d?oc6K|r{(5rv<`1_* zz#5#Gl*TwcT4#et?TAnj<0bcRpJ0dX*1?NJNqB6kwz)sM@7e@>tSG&$dSw)s7HXPu z&M6l<8u~q(YT5NqVyjnYHG(jMC?^z5uZ#pSkyht*UijrgX^?l*7W*NQDSiop2WpJ5 zvCs2P7*v2q*KqE5KB;k`p*&>ud>xG)6E+H0^(e*LC&!_dX1@{ViXQD8gSpni^OpO| zhboNSoVhHq_#^<1kNp-NMABl=bBHFi8!3qc8%rxh{qBFwawlbRHQk@Z{Qm{(pJyDV z#8)KwUwDQ`pDOpgPT@@tB5Kg`=y^$0J+{>7w7_v$2pNSp+(fK|bbvQJ3nsBLhcO}s{ zJpIh${)kL^AA5qmz$?DkR2V*+m$uKwBe}7IgCeA5zaMV?>AT*TkA(QPF}OSa_3795 zt6+%4&0$%u7dzKyzU}@6a*d^Qgesn-X(($+H&v-wsk^(G~0`^gJ%p; zR6;TUV^DX?Z%VM*;WymuSrc7Uq=P!ox)Ii-%Bre!6L{=((SQT&KCe21T_`jP2 z;$X!`qPHsamPk_bT17cS+=S+k?q+$tB(OKv0_vdbtg_F9NY~gVr!gz7^o@*0LEr2k z6*y#<%$#ynmkDd#y2p^e(VPJ)Ap=pte+3w|KN6CwB#h?uxJMiW<%Bwc9tRv}Wrg_D z@%4;P7+!d;bQtUUSY>H7kYO2Y%n@A!Sqx4XHlg0Mg=Mrsl=5PhrUcvJ{q$;+zPEDW-H8@0xgST|U458eBue@oLbF8f^ccJfZ@f^um zLfcZZEN(9?HqEynzDgFsv(p-*k|Kx6{!cy9lD*`jl{Cc5@N~_nrdN1~uQA9z zMx>8_`2Nlv^V7qjb`5oQ-`RPe^$%1zzsHltm$WudPJtZ66$t|d^1ezG8%ADDBm8Vj zsclx0mzfTyZ=WaJO$yaE3ySD3ka#YIZ&YiH0R0ww%Ww1PYgcm?JxK^-1dbY}^jt@c z(+1D?^5vC;=F7}mu7m7ZA*ElHQxj89Nj`vNjTf;Lsyv2TZO}RY&I$Lg-nv3OEPvt8 zUp(g=WM!HPp_*Py*KqYly7{4Bh<@%tJiuvQ?||dKm_qyLoogfMwVhztV=7I2;?eXL z$7S9tlMc^fE|zm&kYW`iReZZh7=UMG^S3fs#Z3%oNzn6Qh`*dkuhx;i#9aG?CHD5J z4o4@RY@?f!Q;cpy$}bq*_+XScSe)Czx{aQWVvt@Q?lsi9a5Z_z+pEbL93aoDO3FQGgj?R@t)jU_4+xM8e(HP(5 zr6wuK8nms6s!zHUcQ|bxDj{bJzwgv@7JW@TyQ$=mcN7?69p<--QgubhctW~_Tj@2d z81}NSY^kQ58=%xg^Nl7%L;QUFY^TSP_7@qNWEfMLIarAYd>SB|t=-oQ6bjAb!xA$vc97e~6u<`ih<~MB| zKD_%G+xQjJQGbq=`SeU9!2~eP!&jd^@gHC$e}47pCxAY+o!4LaLm}(Coi|^7`pkba z)AgM)?mrCmSLu1~bh=PEr43tEDV$o%ojV(=!79Dw2`q^}W24^fe0p}qX*R+Q4!*dU zPrvdX@U3tBi5@e4^HtVPT}cbayj=cd)~sv!R7Sz#4RS}_1Os%zNZRJdeZQMw%c_}n|1);oIXp{Dlt&h#;b+163`Ho(u zu=HgMhqXx1vBs6gv4tzw$+-cW=X=OUX+VLMDHyQKY2h4ntIqf{$hWalwB!PVjRh$4 zQTj$co0Y7LDMZuneSu(QZir$>nEfSa8KhPC5!AG4;}#5`_0$>f6W$#dzh%qW%6a?d zf?4+3yy46c&To$I0$$e1fG?P}Evv?Nv}YIg4s+e-v}a<$wr9W{?b!f4nloVT=%Wr8 zD}#4oXWqE=?Q7Q~QN`+JrGv(` zIJktzE3&K|hG!3YY8Fygo!k&A--|gVFZLNBp!ra%_JPZsR>n9(@pXFr}p%Qq}0*0|TaLW6%J(E?w@?jdjPe#Fm6@`q!W5eIp_> z=UjqvRbO_0ut8$2IWr^U`o<-t6`3P0h$3v67Dg#1s}ZuMApB=ePDUoHLz0B{{~Vh| zZP7d3kqsPWzH*ONenn7JYeClveA9s#Krc~?Af;23514zsoNW(q)xSF*H;^*Ki$PDu z1}$D+{prvD^wsm%|B^EHJ>sAfK(pQZUXI3xABkmgPw<-gLj{deIAfv0RIzQYxyc#9 z<;hPTfBAIj$+HK;v^)~N<^Si`_rfD1tm4NDy+}!=EMOQUev^?`L7yF&0v%&u zLRD9s6j^y|d{ZjJ>*;q$v7{*#al?$ZAr_8$m0TcJbNO-Lu6~G?fynULK}&mGTQW)c z>fZ*(gO?+IuH52;RjMu#=CWzk)To{vvV>Z+CM85xTq5u| zD$$J);1Nvl!Rgjjs3B<#l1D>$CMLgn@~5eOn$o8AWCVvolhPWPnf zXYM7ZI|7jPUFjGTXA*_p)dfl~pVxebxLB`HBf( zr?6qM1?R#yHr;!#{`|$WfBNdl<1(=)1ZMBBoA-|Oe_daxA1?d{eR{U20!wLCp}3zP zC(tXaZh{0M-OM_z3w$L$bWzZ_y|6It}_SZ;kj)#S*bK*rLVP@SXs~Z^#78 zVbZNBPFpmhyq(Z9O@w?MqBw<71s+si5)zO)Q_lX9lGj*PbL07Wa~YZXuWb4I3*U`; zIQ~1o#s{*HRwICgtW74=C_y>u_TW@Og5IqWF`pnBW#lF>1OhcG-O zjH0|o&$kwRtSS_8qepSgH4Ja&VTUUy_QAwO&7^+Ho{?fb66wPHWdAM~7rrS1eLSs^AJN@R}hTcoE-e9 z9A1VPUD4pyNz=weP z!p$q7jjKZ|Zexh7;O0)ZyR^z_LFtcQi0C1kk{ zeWs|E@TYirTz*1@3?GZ_Dg4zUrABcM=Kzm!7v13kk>G;Z6naSnZ|b8*cBPp{D<$!#!Xg~rr;x1U>Vx?}4dTySuLW5l>Lk*5TO>Kqye29eT^|8Cg8JgF zNDB90g5ou=DekxtNG9Y!#VXv9NX$Sjs2${^)n`B5|KaY!&fT+%!0Y({JtuB?dZ~Xs z;ZCv}+^bEEn?D;rMCTEF@z4DczhlH?LY&MtVI#xGiL>1w^yN?Y5A%&*;s66=E2=r> z{x`Qok&*!75H7#Nbb*EDT0ZIDc=Gc*A#fg%VcPrmNL}&0$A9(r$SU!@r~P|R z8N0+iuYf+{3Q$8~N8SOxiFBw7pN|QcG@D0LKYi&gC58ZF7KF!|r8oRgR9|6M zX!5h16EyK|lYx*4)o5BKbX5_Y7)4yl6DNwNiJH19@7C1!CW>p0D{O)_OmPLU0lh zlR1;t&9BPqRf#RmS9}Ds5`GYT7#dJ^NFCi`vBjEGxvgm1kY(ssSU}p)t&MVy^qSMv ze|tC%#3J04ulG!RS3`ejhDjVp9@}j_jsj+KA8iJWdobZuZ3mI@+7=$&o!QiYy%w9p z_?Aa6DlI9mk2#lsZs&5lfmU=-%1wpW&GMsbP-GHe^vMg{_~wM)(iH?4y_mBwzr%4h zH1?6PZrg%D+E_PJizO>4JwQ!x;f2YyJmBqhgQaho@n(r1Nr?>)D8L2?mM8-rxv}Xz zz{;X^)O$ALUntizT`z`yHL^0CrLNbK>K&#LYb!vTz9^j`bHF9E<;S!)F^Hq*962{a z?TX#vtZk#ML*hbvv1*llvx{MqxOsTG;{1ZD?Lly=`nps&h@?Tecx_W?`eF_~QzF*` z-zI~@>>*g|v*~)6NT~R5HucQ5K;ptOD_t*@KFNr{@cPKCD9P@g#Rj!L4%dQYG3O12 zAMb|lhlKFS;O|Qo?DS98Zc?7PFb$Nqx5Z^4;AVJr*pIr7^VDEd`7X>jLx}mQT%mP6g>O zBwuy&fI~Z6$K}S|Rwf-y9O6EO35ifB$o9{HGQ(#%w7^-oefS@hsvfVQOPdFTI@A$F zy^E9^HT?=TBDq8U#b+U2;Zt5^^+Rb15_Rm7!t$D<@)tX`YbRj_xNv@G)lS@0IrA#b z_Q$+1%8yyt&|qRufIX=b%M}A{(SZ%qSQzVr9-IgcvE-H5vBf{~+az0MfAsk)m@N9! zWcI9dvRhQsF38&IL-OyjEPP#|X>>Z%kp);H2hhgKrAi~oh-BS@mV7w=6Z>U#cyb`j z>cY%u*dm&n5FIE}m-}3;dir~8jB*qa0lW#tgm7`5>fN)o+SoR1mE}H8lSf1=##gwO zP(r5)&$*o_1*fU41RJj)GeF^NViOPMw))+yE8}f05a+<*b3CFS?gMToh3lBeDj!nB z9s6q4&mjSpV&N2~e2Bcs2kwLm9W(M-*ys&qV-w@NwFCe5mVVUTEgkr(ciCL{I@4d) z(Z4cg#6R{xrq4iz;OWeqO(zZz^)8PbAn=T9>zy9lB<1UesG;+3eh6LNeuxGRnZN-a*mDz+3CYsCVCDNTvuC#Ak3LKu$oEWJmh9_Lc#8u=q0(8 z6QtH6gaQtPt(KKu{C3W4$Xw`}5Yzws2?bkg>pG8Nf9N=Q1=11!HzyP<7+3pWI-x+7 zi;L{%Rr!HPZgUI8AmT5FpY+?VP_3)QB=myOEwl#ObI5EmW&EqliMt?I@ zjDCLcZ2vwF-pLWWE{>|ZbhI-966R>z9#;Qy=-x5 zUP|7LvOrSF1YQ>mt?n*AOg7A+{yBF&)CKW&9X#o8B_{o?ZfxB$Pa5;aH3PGpJikL@ zk2!f_=WP<{v<6Pb{CPY$mqgM*jg&o9w*L1u+waArCy&F^xP9gy2lV=zFDA1LM8g>T z=Z-(4qUHTqFxDYU-J?L>MI{yjF*x0xcOGv0k!sO-Yu0R>+E7UY>n&?f$Ok+ ztdpUCIvh1*3T0!rAg;KbtOGM$*?NyY(u^#wEg+UBELFhBGXn`y@rxR~j($A5e18q! zVRbQn@?JUrfmN}NS+^Gmb>~hoTNJpzIl+&)C;Q8)v8d)MZ`v_(%)l3P=|KL={Z~(9 zBn4QxET|0_qj!OsdB80wJx05zf*E85X9er(TvTt>7}wXXqPef<0tY6)7-WwT)BsZqe_@?aFqG zYWQ0p@5CmBY-zOb21P}!se7Wm)4(L{otnii&PP0E1AIOYPQ9X&i7#BkjmpP$Hh!rU zn^f80Da)-`JiwJtD&N{c-P)(YCO+PZttagOvVNi!TVNCukodowTvU?ykpv^z^q4b$ z%GCK9pPY@rF~kVAj?F8zXnN4g zp2-J6(}6LP-c(x=730iq%IUf0G#_rJJE4yQ(L43E%DEpIKOP)g!7&=>$>dDY3b zej*-~)KD3$DvX{a5$Hl4atBa06F$bF<8doq6~&%VtL3#BLOS0!uX3zCgJ9lMotI$71SPAl+;MQtM6|kX7B!$DUE2mzou37IEv=}Go32%m59{IC z($dBf`}Az&iQ8t;4x#_{_ny~~gqQ>0+<(4$^X|O=sP>_8bN~}~HAPtdwuVqfA;p*H z@2^h-3uV`(=UHdF&78#Ig9u+h}9z1_36M+Ln ze%#X#B5_F3zu00Q9)H^~2n}w3Z)=DvRJm8x`ybI|B}P!-9u5%sb3S-POTk+YsXU~S zT~-g`Yw;P*(k<>Qs^D(CIE3lA_(|)Jn~}t%6!pvd2jS|)uAH4KIKy;b-MDJp0+rmo zJV+rknO(4WrM*X;yKn-p-6DA)T*%f_oeBbeu6SY1btkN(3ZS)7eEIyFPtS{ZATUga zK1@=`Sr#&Y(0-yhS;=sEa3c#ycjA`gv-_&VWSeC{Cc1S9PiI-6wq^`To-qT!-nW}` zHp)03uRebA{K@_kmW3W)iM9SsoEDxoHH*n%)+Q{?Xy7~D%JP9q8>?R&T7Eo@ z>Lhk=^{GF^4$8M6=hO^9i6}%$y4fODjz@|oZ+x;ZLKC#gogl>5!EeUY z5}Y+#IxfUbmX|D&2HKj}BrDuBFGLecl4@Dn^DMNCs^F0UB9m9L4v&xAD+QcrNPI!e z=J)3wZ%yMQ`b|?ZX$3VHVl4Cv0&FGyLW* zowL9jD{2;aV01M>ha>dQ(`PTg8ShLWMu&Z7G3t)MMcL=Y+TD}ScuwXluQZugO8Hx2 zlz||w9)uqc^QJFzBr-Ess)7i7VY((~-Ud;jOGh#j3t7@?;gX(*j`Z;dVv5DCra8ex z0X0~1=a2AevdFqu0qD$UW|b2EaaV^DGD+5@*pJ{ejyha9nK9_H|0VR~NvRNmnjDR1 zL8?JOA*8A;n{uMyB2S?d3*wnhjcfd{zOJpJa~nhUKCTK(4WmSOfKDN& zM6-T8Yy@1S7W4^yq+S*elog$1@SVWySP&3o;PYWXU}LMb4zzeGQG0UOBdW!e##fAw z8Vv}{!rQzqw5PRR4?U7=o|E8TgZyviE_CcUhiFhemtyDiz}_~hOQ zRv3uOPvT1ybh;6_l^#rJkhf5=V{Vs`3Kbg!LU)r4z-I*omT{MgrV&B_2o^8yN%YkX z%7Vj57^zBb=ve?u5%V{8iv7u+BBm0ex2t!K-`%LVO5@xfeFH7lMY(UG$G3OyB*?IT zs#}eXGYp&)6~20@O~*Qgs`GUzGw0}4owSgM)8XalDqz&Sou+xZ@GKWft#8z@e--Zu zh5ByQq3^oZ#(nExGKy&LGFys&`W1`+_U>=vtD7GAUZ40CM>lRr&r@>-PvHv`1w7DD zZ|m8`-7`t}9tP3CfNh&7C?hVvvT##lD1nl*k46A})Co<#FxR?G^rdn0xWlc9S;Tbc z@DCVa&R-`e5}6YU!sADMRb3cj%=I1AY|FO$dscsfBt14ioE)8gtk3pc$H^xxVZ2D}7Pbv?-82@_JCvvSiY< zRBJ1hSQrM4>ay0muRm_CJ#gFplM)$B1Wdwej@etTuxep@^AT&i6r9NOfsMmRZLGQY zN)Cm+!J52V{$3#uu}tWg;=<1gCPwGhpny(PtkIg9_)x1{5tgmNf@lGHK%C;icq5|ov+NWO>1hu-Z-<<&lOJsO4M^j1yU{h>! zE(Lpi$whXIa^pW$-Qd%5BQZaGpQao**!C`?DtTwYdFqx{3wDpyPVz#!b7d@8Ejmxt zjn6QdGK(<9X?+4(nTEUWRxu|5{^$;Ay+=lfwXi9rJ+=>gi8^IU7Sd3KLOyWAjXRb? z$(+R?t~NqErsuKYKz*Fmaj3*TzkB>b92>21n``b*X}t~6Y}$_gBu8&sLPl2Rfv2vr z@J4vS04I|?SES9y!+4=7BRMH)6e^@a=X{|RcR+hYsX_~=M8%B?>+xvR=t-=Tx~eRz zOL&+YDZk+;A1I$BZ}j2xfdIEPj8EGPBNgRgoJVP zS{$n?rC0obotrF*PklSwX9F|-DR|QNzzXivWj9d%53imX#ihFrpF`k`sJmtGGN}9I z^RH__aOHKsCusYDdZv4DqdJYMBp z5ERJl{m8txn*(R)6kX`iSRyQ_S2eo(s4I!19uz!e;l!zNOcTG#l-HmMC-~=- z4tj%Bv&>VL?Xb~<%XeomowPJf49axz@AhMGy&)O4M085_M44%idOLz6$KHvIVazhi zUUu*5I~mGg0i+e9_5kIdHM(5h5OF9Wea@TqvV2?bM9QW!t+>c;Ba|(xlVoJ-%w#vegOX@chBx~*wh(+=*uRwwDw}%#zaOHq$!*=>PoQ= zuo!!U*Wv_Wwn;pf2aM`bQ3-e3lp=iwlTH;oJ4nSYb)Ry<vu;7 za%T7)q`r4oQyal!6uCp#_*XIgdHfaUpljyEt_rHH&9+0EH3=)XV#ZeC>+(9A^de*1 zG_g05B_B4$Ct7N_)>sF#4<|Y7sE_5-B%_Wcj8pNUvODI~^)(k)4`S#+D8xMT3P@2W zBMW-NyRr;O%KUw&%c=awl`2FNlOxX2C`1B4$Yn@m$WTZ@xTijAF|ScWe6hfM#J-F+ zQ2u8W3dx%m(;N)dd5p5J*T5H=7KT^l&o=)#c`V73WDb|5odo-ufC0?>5+7Jrg^)>o z6-84Ry;N>qoGmrNGxhevq;y-fZ0f6hS$lC^(8OVHGU?UjC4&m3yCz1TdWZ5rwnKU6 z7+WrT<|Y>rBpR2xG8{A;dlK4XQU3uD_*z+M&`0(XS9Y_ZK{YmA{jHHO_AbBb{>i^f z$=v^EH1g5veg9x4xc~2Gn)%dX4H&@`iSE!0tKVWFSOkrP-xI5;nM>?zaC6WdEhcy` z*os}XRndGOPtt8VSQtnoXBf0{IZ!2HV0Z1SCyX?ZS{i1eO8GEtK_+E*rHmE|iBSmY zn63ZjF8%LeYNAV(Gvir@mn7K2$w!rYT@n`MgH2}}#U%4#U5m~K@_YV*UbV8J_kCDh z%-oxy<*IC9X!z0cAR>1(}u2}vv=^a?1R2g_JUguX(Lz65K+2Va%Wr3^@b6oW_~*~5Upc2?GsyDNZ9z3Ajc;u! z{VEUr4+^QG(1f+x?{4Cmu7!kd60vz(A^`?E%7D9#XSc1w2jt>CU#8SGr<24Bl!gPc zos^&2h}&C>2T&o3hobn#ljC&0J#;L+$VWA4uKk;*dYAn%>M#+lw>?S0z13BU96$(q z!x6fT0AYLU&f&Fktx&Hu@i)3gcz3}}p_DY;Y4d@TurDs@t$Z7Hqt+K*m54L+l!U)D zrbe9{76hf*LaRbv6tM$j({uvX;c5bHTjd)xzi>+e3oIlRE<^>8+ii5w;Xz6dt&N+W z%IMe8j;@|LR?32Bm>-&rFIUrVrY!9eSIrk;NhIVaz|?jt0ll~q9p@x{j#gIrb*F0} z;?6Me?U^BkKmL1fk=fc51|C7;Uv-NNqvkSB?9*c>yOegST}Blto{RJ)hmY_F$nW7T z1qWG|AUlEN@LPoCiV8H%DxsDScnaglPkwBivL-d(RxH2!+2+SxWHhj0#rTUQX=c8E%{qX{QNGxHow)3BZ6L~w!_GhPbsIWKO3YEZAm>Va3)ZFRyK zti~aNuCEJsVI|~7AGMa^)4zZ6ir2R(Abd%JFxqP(l;%k&B-H&wi!qcQMzR5^x?OwOtpUaD$=75wDG^=U0h)cu^N!}5{itxs=I6`s#tfx_`=bnwv|l1M!!V=wfSK}gd zUMa4mHGXxCIFPN8^Go5YJdGL8+oUGXpUyZNWjrI=F=Y-OwFyg!4)XHdYC66wq?AzE z*2rJMcfp*6S2qd$U@!S|&@xgGvi7~)n;*0%IUTe7CZ`!{|l7DCgknnTXH=f3kk9g6$XIe9aQSUENp{vnu5dYFl+fMtp!S zlrXL6fG|qMAUolR3H$o`MN@uwZtBRbt5)oDuX$RW1eqS7x;OcbqDg(`%zioa5cE9|Hpq*&I_O$PY2@7{$!h{7* z$J)0FYv_Yq3zT+M0Rlr%-L)a!agPv}R<0;IJB6Ur#6iVmmAB`)F)SPM=5^T>^z62 zxRgB603|R6&Z9h2c(e`2K}ZDFG_fV`qJ%;Dgeb#00{7P05urxa0;(^L5*qv2*oYPZ z?Ps6IcTU38rLUmrBSWBrL~vVQO2klO?%*S?i=7VYm+oUvacxnxSXJ0C2?|1DjwnXL zNhW{R)I3{E*j3q~lz-GyluT!R8aC&^IXhk0C*yPw2!@H0r7`J<_ae$xhwCEBRISZ1 zzKRAy;Z+h5-q)5SYbasRKMm6v%1<8z8ptIA4{7`jw{{@n(Qsf6j*M3Tn{|UB`nAVB zX%zJow=UQ-QdDpn{UnI`0Icx$Y=vqn#+NbjY0Dfcu~M7Ps^cg|XHymbh&4F=p$bdx z&a~)*w~PGcJoD^{Hed~oq*wvQL2Xv!4UQ146k9-n$8>uQJBXGW?&gynvact;)^>|- z@K@+4Oj+1}hROE!Ix#hER|GAXydmW?#Q27~-_kxg{ z3l~Z{_%q7Zw&&6^vPkmT?Gf<;u6AW7Hm_0cDDr%{|A=#t9r8bvGhwN*nM$9zRa}J6 z#E((z&le}6B=3j$7=o^}*n?HwMK|nMAivjzl+pitpqXc!FKY_6ZQ#-!m+)9VK6Q_tkKif0D9au zv0AoZME1)I`X6w)XZBy<(EJa)+%sI}X zU-*SLkJ@GRD8QC&RWKMM80ZfBMHi1!3lTSuqU>@KUwaxiDXb^JxO5Mn8%Z=YByhzB z?))|Pj*_kz(@)_whL*jLj!zRYv-Eita(KQpMF?i9dq>$ry0mk9pzIXvuzV?>sylsy z(bOKO33np6gFQ%VN$7?Pu4*&k4>-aF(oZ%ebGBGGQ{H@vK2)p&`6i>>$7l*`pXKSf zrJPY#XaK?EyQuJq*#}0Eq#%g2C$rpS7AsBQ-Vp01EoS5t+W}lY&d%r6&yGFJAO%t>F5M9o>@CD>1yFUHP#-HXT^Hv2pR} zc-3cW1#ZkbKGQn>ma9Hj=68K+QR{1ha{8ixn;5tk?($-dTy1pWJ_`rerlq23*YGIc z1pin{-VPiKN-#LO2;)Qu!^bP;ZJLDy>ZpH~BC_>Ofa|&+P4Lk#)+(B}pduBLv|38< zylD(cR>}&rk@ltR3GQkP1X<5CtM!qbm`$ zewVUI$OA$~KjKYnth>i8h}$%VZyUYszE2LLG?#`p$AzE2 z^uEtqmH_y+4X-<#UQoXhg}t6!W8~kCc+FspfPyRx$Ok399#rY7K=CRVH#bfzgg)f* z0WMZx+JDyk{n`RLy<{BH4{K`EruSINqE^)ebZ{XGi>|2JpViuc z`>3(-or+b&sML1stc0%0<=$MKa4(hlg{@@MvhO%hJ&3t0YZSb^9VcG~klQK60n&;U z8|P~_T7WAaMaFGjfq2#(a50$1846ENX&R;UWZ)Do*#O8x6^7DiY9#O%FK*XKm|=0& z{js9Vu7M~a8XuI$__*Fqcd5K2`f?lWqo%au_g7M~0`)V;4W*WF1td==^g5=9lJd(A zF(QALlxfA3{7c(uM}hW|U*b|r6<+`gaEM%Jdd{2jAc~;5L(nx9FxLKfiZwxOP|ZO@ zS=ImyyGd0!p+Y>U9Vy7ei(2eT@o||}l{i#`208pFh0T_px(d-1VeoqF!=Prva)a)L z&DC0SP|n2BhMdfgx={X7*=S6LIR!?M5%9`3eBqU35IG3k9y&3r=)0z;Rb*fU+IXei z%`cwq?>+mYvQ#e~Qk^8gFcNM4QMRr!;ZT%RxSYS}-N+q{w+?z8o4&qkNRi@=>sZ4| zYq>Cl4w8brK+B1_WuzGh_xjn_%U4kIal5#Xz&@_GU&vy7iA9wy(qSGPy^DUO%`L(x z@etB6WR-Wheehjrg9`E6L<8>GR$!64T zj#VNb9tRXf_DeJa(Jx&GmwJSGh@{17B9$(lkqAVtamI(TFWO=NpeTQSR8t?>MHD4% z>C|GI7{gGHQXr{6B16Ln6jfzN*TD!X^8^WY_6o{6=2x_+Vmzm)RD1n56^;11Q@Ohhg_G4r7F2rt}@YISY?)MvUe+c%^)n zk%r>0fYTtHyRDbVnWnR6X4$L-F>XlZXyXO~SETI!X-^dB*eTy;J`ZL?b(JMkLwSNb zy5i8amY8EI8+A||@a9+r-|1Qnt4KPZQlO$Idv^$=syMALLT5ANz`^$sI`=WlUdn4# zet*COxn6@oB-XDR;gCNfDJjP+a)I_v>`}8%IXQzHU7o8|EsIXEC`Y3qT8IQK52_G= zZN&J9SjCX#Hdw2}d)w**2X(xyCsDe-|6hZ zC-k|feex64B3SpR#9>)`(1@g&?BVe}+WQhX@k|3rsP~kcmE(x;LQ43w`FIbX$sp$^ zghjuf7olw^mbQ}FjDbauO375RS}H-}tHU`9bx5k<3d}7SwMrwJOu?ns)QB^R@GRpL zM+zkJzIg$RZTXHEDe~Yfv8%4sGCK5i+;+IKvF%5m`chB5&tvy(xRZj=Qq;wBVC@=y zSCJ~{V-*X9I+P0{9oXvtA{i+kN9ro0VXtV*(eu=k5&v-vuj$Iip_A5|uqn)~rot=d zHU;Y`06JOy`sJ%9+*&;`gH5PdKvQ^4+m4UVj&VX@ zF}q3VRAOaz#ly3@0SkR``JR!nfDG4KYO(Y4TqYrg^D+0fq zy`sFbIuEy|OvEWh;|}&QmMo0JT2a{?S*;KYIe?gh96OnQb$JfcgU`Sd#KmSslAyKm@o^Hz`mv4f*ln}5cm;FLr#4gO6b&N$%^ME_5}7U0}w3LOcvas22&Y&zzaxR zoYioQ*nSOmU{=zg8l*XB&Qs4-wSR&TBYg!!E4Be8s4;5d}i6MlTeM3Ku)BnjjoL(rsP;PEoQW zIqLF5(l&P2dTG<1N}J9uCR*IQD1H5pci&Dr=QkJdW$5VbsUvt;b3MBd@%=$JqXh?P z=qfp7h(3d^lFI>{d;tazsmX8XB&h#VX>{sc6Vja3ii8>xn01a_i4t$c_~$ZJh|Pcv zoW?^rN-aV`c0QPSJ_6WKf#)%^S#Dx6vDf4QV6H<)+Y_d1N{m5FJnly*HgS?VBzYUr zX&YcCwU4bT}d=^*SP3~2u67fEs^EsO zYRlXkSFCMNaUzxfxQ6%pQdisOS1rWXIe7atbG|>g(Xj7`wV=8^4)0)%86+_o<*d!q z$?GeG{rUEa@+wFD8D|#*XLxSD>HT-f+)}3;RqmgD{}>d{`3OrDztA#hMPp+~j2hQ# zy!9X&IpRDKY>MRte$$={2cf2sCIDSUwu4Sj>*X*L;b_4IRuPWKBG-B{2E9GAV`dX^ z5o4XuGi}=tXw>SYo%?(;?DEt2(WZVBb{sa(!q@s; zK#pp~M6x5rSopMW&PhX9&jg|(?lxftX61Eb2eF?7Ab50raCH`LQILmyhws#ON&lUM zH^{BOb#l+flUC!eP@wA@jaPHXAp+HHG17lA(<)p#V@1kj1okjL4{>I*=m(aP2EAt84XN|)mB`=7KFs}}HIcuJ)nV`h{(-*y9|%%hBH zaEcd*%TGqdEVB*{J_%dILUTB5NEO?F*zUn5nt9l`h3^gSRQOE{;b_p=E5OeVojDd6 zZl>UBT!{TGlm7Q!J$dwS|H)$*bdC8bnzW!0SKYe-hBk!{ts_8LlAh4T9lb{w%9X@B zn*IGYi1~gIr)gT*fbes;6hCc6@AF6!N zb+kx$bDGYz5ZAnTxzAt0>_i*H{OYGOtPX{1VWHBGR@0D?U0*#3(-Ms5K-aL)|3E{N z9^nXreO)I-(#BZW$s<=C~u zNg`-HyC_`Z!Gj&)QUc5$cEUyl9c4FXOue{VJ#>ouWil9XRk{54k0skM|6qF%CTl1kMKB=uCIAgS(* zO2haOlG?+UAabdV!eB`#YBy;r4^u+NahO@tU2GwenN{OnfI)($Uv!$9m{5{hrYL*- z5yHK>Iy=-KH}@|11G4k~zk-(AH6%H1+fr+5r)A}a#WA=CHpN=FT$o3h&vZKTv0_DT zOfuHV$K`7r&c9yH>wm4cKlJGPyd znu9{%MuVkyS$KFLQrf9v(wc+G@f932d^JT@ZEO#^|9kSD3TbQO(W4o~Q~a_4qF(0? zx`DedMGkdavLpQwb41P|U?ivFQOx;?5c_nTG+@n+Ng_s%#x6vGfp}W1L7t&oV z6VMW_#Ug0{*l{!#5F;Rk_k;0vT;TCVPPD-5dh`C=m^CWTP>SkKEG;12R2pVqE?NRV zz^UD_=vu+#P_-6*syO!Ky{_VBMQPKu0$?wKp8H4l6|dk>>MW`Lkvgf1eS~PaD!Q@q z&x2fUX_Q?kI3cDL$`CpzaP*uGy<4zcNTj{fsI8Gf0f!4Ek)+YL+Dw=1=4Hib9WRX* z4#J9h*43G};*hbGWHmQjU1J&@sX!)Y#Q_*5=X-1vLt8 z+j(F65(Z9<6ZE1oU7jZ;C*haNPSpx^kAi<)3Y!`tb}FSMU5)S!0W<&NfGbR0a|QTy z1p6}6wMfs#nJlvW^d&dlgkzLB3k^eHg{YV4WEx~QQ3R?|ywyP9sfU43fYK)LVGcEG z@jGrPy7js5NRyRZFyF$0*hANf{ z*wf!OKFE2A$%Gu+)LC{SJdmzO04f($acwy3jB#p;XK(*^dl^YWs5eZ2bI>(uF}|gj zZ3ED84n6TZPHlvqRKc^E6+8-nLZ|+Y0mjS}qHyfjFInXD0-(EGP>OuHP-jDEonWN^ zDK`_O^pgzB{w`8!0FCja0WDnnY-ep(j`Me3!y<1%&Tp8#B2mftximr1XpO|DyeNF| zYesu9+9&YZiA-uaB}C47nyW(*D#0a$NspGQLA9Ci8oAy0Idnf zac*(PCJawqyVa>ng2KWlD@qg@5~5qg?53e11+B81e(59RX`(M}IEZ12HcX6{+2pYE zbHvj;pwfD?+5OhZBk9ondc_5qRxfRXFEGcr-<#}wb%gu!bdiP1Rq9j?;VB-scNiti zcGTNK@;sNyCeA789{PB#jOs|F8s*4`y{P-!M7d37y`aQcY>yE{ZLiGdpa;x7W zd<>mgoB+{6VLvjIqfNZh^^lao16-rPWuv-Ql(UZ@06-|>8hu3UW@jMb$lE6DyVir3 zJ71$=RzBVBT^TEp$aqK7{UC;36HrJE;h}?Hv6rAX2}4FBQl0?`9@g=2jaF#S#jbb< zw+-BikuD90(<;BGKtP@wB0P_@X*}aHW9hQM-=;Ha%AhXaZ<5T`x+czMwp7U=mMZi> zc1~(XUVv~Y_T&k~qX+%Om#>uxj2d>n(3AlCj*?PJ1*BLcG4@WbDLRjom&#-b3lwin zpM#x}N$T-JOvcgciyPpjTUcI-4y_Z~M!Og)LA>8Fv8EHIQ4X`9eS5;Nwr-7kpYMLl z;z&;64IQtlu;k(6$1t)ypwAZ~iQ*%Dp_~o<1zs0Bve#40DO{*cTLoGTL^Xn(CmPNo zNCy&Q zI(seK)*h_g{?}$d8{_ZtS!B|^GDt=YWZ8p58zi~wO8al@a zU7*N_LOK#xgRtbwiQ*q+?zTdQj8fE`?9wSk4knIn$PncvUwNBN$gNUC{e(HT!JPy; z+Q_6ru!${rd|vLcr&}(u57C3f;A_sS={REXUPQlu{ucL!_OPKN`^-X8S?nGN;4E`|*0&T^x|Kp^kIq zNdEE-XTIoQ+HOH%*!#FA_x*FzEy; z+77HpUt9N2pZ;!-+teB>LWw0-{MU=iffIo@;+Bwb{78LrQ~P(TuY_aR?Sml4tADur zxg^;@y3hah4eZ6_Q8w_qaLtZJCvbB^vy$YM?#E?r0t>o>AtkJ$0jxP{l4nS|0wdrr z%*e*Rk!Dc0w<)Z%k+{MR;sKpb{P@Eq#(apvmzhpS#(p#=lSU#f!`#OpiA|Xo0Lz%- zf2DRXg$9Ghu$|D->_TJv!+lbfgP0<=hI*ZD4V}(2JsT=FD2A|S8`+q=gY5$B$o&)< z42QhxyP9&*tVtw8%d40GE04*JgrmT}d%$wL{n7w%SwEG> z!0giCSD&{E8NkFLGB^N5YdKZLZ%`%t6J{E36IUR8S4X~-GxTSc8b}RDgR6d?Q?9$y zEoRPqq5#ZKh3NVir%si0-LgLP6|Yiw)X@J;A;9V?DR!N!3Vy8s6Er=M$^Z# zmq|XGg&4|E$q#pSK6%dkD}Vtt1%NM+a=JMX{?=?i_qtCr=}7#LISJN{ttkV|nsz)l zy#n%zOM;;lg4*b@7k#M}Yo>;rhOiB-Ro1+8Xb(S3d*f(Q>rwNT!sCFO8O)zC+TRvz zEJ4_#(#hR+S^>H#%i-EuGA?;ma}b9FCPbT)S7~#2%WR+r+TFU(g7(QdXkigRtwZJ8 z+#DeQ#6&PyqDQ`-B?K?9-hvegEB5!$d^~6ZG;wCWvTG$lUr5YyLYK3u7_mh zyDQR~h7?N87UmWMe48GTPsNR`@|w|4E(M~YZtwXMwy2?^q|claSI&||UA$FS37%xC zQ|Y_-ttM$^E>sHONW)jd>68nm2O-|#{-~{BcAJ`=va-VK*o@mq__6_|_Wjvulv;E7&WU0q&4+vY07Le7w(lomW?AYYx5ZK~cS9*?g5x36Z_$OgB%V@s$5Z z? z(E=om$n6OiWyt)C)Qins(4&e+_KMs;y!n}N3O&Y_(>fkOHvWq6ZrHu|?(U_E)6q_J z?A|*$;E(#@NM{4(mEf%_hSn6u4ROt4R~^F2uJpLZMx}t6p^5-0%8WyzLEVBxpslTz z1u2&$$&Cd;S6;qTT`i$Cex?eNxwiQoYpqN8gMs7eq~$)&5^x(0N7 z2l0vU{)*W`9PU5r?x&UYO}EwcgZXUz0gj{(Cdw4#o6n|3w;5p+(D-1!Unw(iG$-CH zO(_^fT)45evE8|_ZTdDY90?JH8LB0?`2Ybl44a+bTAx9+JD*S!lg1To!1kOhCcw83 z_5Ct3c`JKMqLe`UoiXC9_~PuA&1Qh@UMo8?q4`tlTkBAQK1h9`{+SHy-JTia?U znXw_kk8SIW4Q9gC+?q#?uLnMlkRh5aJQq4QbhFRu_)2t9^Vxs-ZdT@ag+k0p!p`vJR!Yw_y2>`Y# z;Y+_;O+?a8b!c8>+y#MOnPF!7@G2`)+$oi1TV1I}zJJ>qb(X$nT^3wnV`L4r^dhkS zr4iV!&B2X;3lw)GHZ^s`7Z*YFUe1w`g%-OB5DqW$_#dDgxz2C(K<;3N{ygb$_0D4Q zI|}RIufx@UqdQeG;9oSX{X%$_f?Gm9O`d{4|<-dLw4yp2Xk@q{kSd#fjCibYB)i-~S0SEX~faU4n0T&fSW zUFDz&5SjU9$&r{+Vg}xcRyK$e9#Axz^?iXm01Y_M@j*{ zaZT&evLzl~_MlBA?8z&U1gE1#i3L-<<_5Qh9T@}l$Hnw^Y=%xN!ye{mooQHQbdJiS zbp3c!nfh)>4&GDM{mfNT*FC0`Z2ab~78IW5-tWGs+aB!Eq#+MqhX40rV^mcVbmEC> z5X{Ay{>{@E75d-yR?zH^HolXjiGg?rh&nAzsUcj=_Z z(UcdnwMF@C^QGGkZ}VctUE6)ZcWDKYICI$#h@*#(!lrRk_&=M~L>#ISJs2l^nXLz& zFW>fhOBulypv^o^CVmtTMVwLr) z1)LH*imD)~Cfl}9wUl5MS!DC0H69=nvNO>mwj+#Mj_sUuUnU+CRk*J3WxFWK9@VFb z*Z{(Th_i>tOimsmQ$8VPM?oR$%6d3DP_lVtGQscM(s{~NYnQ$uZ=@vFBq%9{<%#iOT&8NcgaZc?7*#oGX~!uBGCLTFA$@3?Zo6pg`U5>tav$w~ zBQN4>Rj-YN>RcM04`q^vhrj;ehhKmApgU3JfWD!g!oZB&A9>0unwf1^bewKi_DsnH z=_t-Cq;ak{Af&bMl$(p@+l~L1+pg!0hSd=@_Uhklg z2Tuqn1#))rdCbU?c!xIv`6S$2-5$tVQNmKo{s!{H*IWhF*EKFG7= za2ndW4rMBbsvpP^;4>Y>{(-KGQ%H(mU4n}#kctpz;?Eaj;gkhKBno41$@)emHQ;<- zc`$`(scmm?uOvFnxQa(uD_)XElH%4w$4Ji!=Z5fDZjHv;-kI@IdhN_q48Q5O>@7tV zhs?ULsn+VuW`{NS5H3@Bpv1w8+g?*Ru2nyO9q~sc4^*KnqZCzLk!52o^5`;YMF7~; zZN6EEb6#{4RKL9V9GQ9F7RXi=5JiZ zAob=h%5`pSw0!8a$9loFE)8*7`Iz8EEy#IVh8N=W@z?Jh5=)T)y;ktmkVbaQ3rwmV z>b)p#IXbB;CNqox+f>=NnBr{p&QnP=7w94c>`@JhA>RD9rWop@l|MXLz4Jsb%nw1* znI3mTeufWGRO7xRIj&ySF6uRBk_mEX0_qI^gtx#rB%n8Mz7LOC3r2x_cTK!3hEz&+ zXbg~%apHL(Ot{gZj@8`<#dI2oZ>w~6{-qSjdqj$kc&~JGP5u;|_~z_f3ou}#6bRK% zama_HVHHF9YF7k6VykSkO3!@{3R;qn4rG*J3fGCUJi=`fBgs%MH438Y@rQ1m1Gd$h z5BOXxX+e=k5Ko1YCseh)cf_uJhnP<&7;0)W8_2AtzWURj{|V9gmvkSfa`{R19r(K6 zgC#Q}{YO^9Pq-}nA+JSFfAcP!H?M2x9azxs#d%td{Q1e_FQ0zo$?d^#Esun8`TzO# zJ!92)M|!uq5=}57N>(6l#G&=q`oF@2Dj9axEI7aIQ$DCB7I^R?i+d+3 zHukn+hlztZT&3zF;i=M*Is!H~Jlc=woo-e9Zc^%a^XC3Zl}(qz!}zgDjI1 zMX$soUPvUZea5#GqIs|+d+N^M z)79rMUp!^@dbUg5ai;03>ohm{f;*0h@YoKJ_>%%*6|V+2V2A zX#Gmwnw33zH3VFxe{lG1MDY4rHe2SDoD({ka}rqPW5OCp|MFC&u>}p6s9*pY6?KJ= z=Yk>pTN($$T%L4F%wP%DFNRtf{99QPX?Gq!Jl$)HBzE(0rFO&(c|JVFW`&i8V=Ht> zWqjHIGTQuJfsAmI-7`e;eGILUyMR=TjCX7PdK*|~j!W=6eEAWVAb-96-=4q5KuztF zsxb{UoePUnI4yf|G#ZR0%T!nPi0AWZNX8UfSlOv7HTxx$HY>}J2egN<=DL~E!SZJ0 zVE>bOCe>rAQTT@V#Rg2=m1Q675rGp@87x=`Xp5%z@pdN0Ji@G$BIyO@MhIjaB7&(h z43@<0J{Frey%d~S>M!cA5?)xx5h{4$t3TDy()17H4j2Qw5FXY;$(#9^Em;1rnhZg9+!bDz2I|;jM>|eD zdPyu>7*bK*5{B2BK}`j&gX;_N^0r+b6laaQN$kMZ;%Yq>m=nqef7ogESs^QrP)Py#Kv$0E+$fN%g)M)R)B$uJM{4xIAd`H6KOTMucFz(H%Ap zEBKn-H_hLo6w0IIFoYMRJf}~ld2I;}*>CTaa$(Ej{1}VQ`Qa}|?j?3O9A^yCR)*fX zmlLp`uFnk&WwNPKQ2<8vBfG{UeX4lu>%Bd`G?+G;NyV4^t9*$T%ZW7|HH%#9F?Ic# zh(dPeiqR)50+zqVEF0h-R?9PjMoKElt40_*MD^8+xyycaiRMQRIVN@Q-^fY7yhoEc zgD3t~e*7ve8Zpb!m^FSjzw0tw10LD6S~x`i(WhVEpmZ~Q`WJJb{-du(AAkJS3RPKw zqE-Gto9KrOF4RmSJ@}7zcPUw?c2EIzTMxL~b|EMIzOsHI}aJr5tbI2rm z7zv6S%?o5OBdv_2QjjgX}cg-&$laAE~@;d_vU9;<3_9kPWb%mXD>E*{?z2N z)uG_Y47qFMBv4d)G^%e^$$qH}y7%QWBFUlmsP%?(6~X=k8uah{roUt3p##q@k}j&A zq;e=CuW(PQM40xbbdW>va#H1qhdXIe%;C^!+kB>LEAM=&cgb*?mK6AEvzu1LHD93L zbIHSVMTcGySLC8*L|j3XMiP*IsjPRHq-8#-sSQ!h$m;0#FoF{OAW^Fj4RiC@Vd|zy z(zPQN6v@Ox&l0pZZfoE%I3egv(r$wO2qaD;8Pu$XOsHg(N5oHxQhkRu2q62^ZQ79O z=!3*jfBi=Y-DPHlh#^t`#aaw$jbPbouGvM7Ogiaw^$y`?WIq~20xDE|kmLUN?9A}G z5zD_No?G9!zu1O50>eP32Ew9vP;XsZY+ZswIc6I@Z*xHm(VU+8fjuROcdM&_>}msN zs+T6+U~dKX1!l!>HSZmptXI6XA**aT8;ONyA;Rc^483%881Vj?aFnZFXJa&43(Ve5?ka=sceSvFoHzUp&%8eZ}#q?yY&j-S= zv~xvzo&1JUE3_Oam~a=3bM|Cc0+lLQzFgU}i<=%w9DaA6KO_)^Val+AZO_YN!J%9X zArH4M&LY7ovRLI&M>j(>IVaZQ4!jr1wI9z+G9iqx57R?PII05kvXks zX36G}edy!srV@$Zai2yD>)VI znxx)YYuan?tNm)S58ZWq2I7UoEdx7MPXJJL1?plw)YC(|Nh(v#Iu5PDV+cN6+eyax zLoJG&=}nrhCRV1BLbo&?v~QQLo&8LUdI^YSKtyn_w{5a3Qm1eN4lx2AwRUt~sQ3z; zNW!Ue@?j;9jzc=sUxBl&347rn5BO7=?Y2xiDYZG4W3->>Ckkr(eH>`+O5h(*Am5>M zc)!06H6-V>Td1dj)ubmL=TseN4Yymy1z6tbgql5YnaOOBD%{!>)~tN<@1Hz>`RLjH zpZ?*l#tnS8x>&!z5rE&XIix>-|HH4Z|Alv7UQr(o5jmlE3Wnsz#uNq%A~PmuF})5H zakKx21kHu*mQo5eaLgeK5nu{g{0Ap8JeZeKP`~d|io8G5TJWo$lx4cZpxjhNvDBec zH*d-b`6!A|r4v5$Wk4EMR~RpT6NMGZ4I>+EQnNi&K3zIq;k&;ImQ*^>%Vl&4=N6^&VoYb`Y%dTd9B5m(a1T zDV{?=9JG`!b1x&(BwaI@wb-K8|3lt($c1V=UFEN|Z~-m2-2)+_jD}TJ$T*9pkUVeX%g#WOh*)Z1EivFhxqk4E#7VnNZ92 zQDlTKxKmKPZciv9pCPgVY;h-Rg0-@UE?MDfO(lr=_P`T?ykA~@-xDsz9RQR=l``N_ zIzDu|9zkXtRHQ#b0A9QE6zzq=7LJZU4sm|ekit`Gslv-kFNzn*U8uTL?^S$F28jp{ zW}GCDRu;R2g)sy`r&l?o9H1in!I4cDx(R>IWKSKuvLmdlq)#QcNFP&5Bz;Zd9Nm^d zfrx{==>XT)T){tkm#ZT>t@O63)UEuLVmI?BwM^OEg52WdA^u$4yu^jnaPW@K=k$yL zE=mD3u|ugD66kWbzA3(p602v7RVdWhbuJ-wZxK13HlQVpMKIHtUFJZ|m|JZbP;9Q? z4>&qgtKn%*1lb_aw$DCTd1gCN1>K1aVCOI4;S|}Zt|Qj@iA-(J0e>`A`-w~~GZuF3 zH;m0hrGOMRwc3`cDuw$yh|UpDP;?xARn$AYzXe5CLKVhvxnXD--8G{QuN4f_5{#~o zH_-&j>56G%VZ}7zYvsJKSQ3_p!{oEFR=EZ>n}t@nFR zw{OLAe6U+yc?oY0e-oF#yoqMwJ9phz`M>YP1Yzggteh#^@CH~hcufo+OW1Z+Cr3B^ znhF!-n?>$LQPd`HY>gj3=Wn}W8y7*i5)BfnJ62X#L{#D}&t24D5h9G)%K5Bh z4*Q~U@CDgWVK${M=_QAs#UB;>wUQ-+^=R{>H&=1q=pCgLA}VYfSJdyx4)!~O|DaYM zUW)~?6T(9A!?7!Q^1N6a7?P&g*5oM$ZjOt}pq{aHl}noFu!S?bB#^1F$R|wJIhMdf zKxXcVfLy_22q4~Y+*j3aWo`>1EWF}u)Q5?d%=JfCcwatlQ4;-7wvyuri6qlt{y5aR z=ydH>2xb#MVrC)Pwma>ccRcqU1Jeb_(5?m0Ds~7;;WYT-k>#&6t!;(8qvG?i;wB0U z&1`y-cz3zC$R(7}>_K$kvymy+giI=E&~l8&@K;G?yGN#K3~>!x9Afv^^omVzW2y|2 z?i?OPkJlj~5n;%i5!MLTSq-GZf&;0dfr2|uxao05$mYxJZ0j$g0jP`CK*}Lb6w?_1 zm@*w7>WxKrs$S)ARjMb84*(sySXe4bj4sp^!SZ(9iCEAnyhja|6fs z050vaIIFE<8`l1o9UN8qzbhWY>$=JjGGn;gxbl!{juVC%ZY_M_u~kPmN`w3yk@BNm z!eupv^4e7aZm!i*MfJ%1xFmSq=3CKQ4Wa7m#y zO^1lN;jEbAw-t3Z@x8n6KHK2B3I7gDwfWhPRO^2B6Y3%g^fY~9@!Npj&yM4F?VCC; zfAjb4OPXVGjA9<#eFf)Z#KXTw>p7fDnk=heYiwS%dH5z8KH+l-&Ib{uss?=%tS6tG zq`PdTt$e{#E=FojSkt7uHNGik_If5W6{loGru5e)_Q-d(B{QckWQHA## zO%dJNoI_ds4lOvVzS;TjuD*G?1UO7OBDCvq6xEKdewP&W=A2oJdRXB}6dW|BoI;1y z%Qe5fE66nRivu!gqgG;qTGdg)mvbgC-J9G&e!N|hWfVBpQF7QTyQl;zKj7q3G!am0 zfC2DX>6tbW>~@DjnE1Dvy7vdZ{qmLW9ijHq<%=3^tR300P{I3&LFESJAL_k>#flno zu5FfBJW`3mTjg>%02UK2AsE){-}9nJJl4WQ#)}B;9g{A-U~^gBt1;{U8bh(jmbHR@iAyHy*qf0C_Aby1+pRE9f#{h43;&XL*wxlkB zvgK)oO$lE>mTG#W3W66qIxk{!@8A*Sb|OFpVP5TI3v=FFU)#-Fm3zyMmKt^Cq2guD z=01Rme=l7p8iskLdBN_fmoGF}RdiKrV}J*77UT!fr6fmQ^Ng7}MTTKTR|2qAyLQdF zR63pG{a`46eO<>T4ukV_9<2AgWQpAUH7+_$qkr*aaK+Wd!$;%zDCg~P)iqA35Hr~xU|)O>A~513J^ z2_g}0D9gtxma}}yZpZvf-J?Y>jr+J~RiDkPceOlba0ZYHMS?=8X1UF>6>! zxmXJ@ik7S^8JBsH#?hpt!0vA|vNjLdRmwI)UkEvec(1TkSBD0J9c{EIg=n6u1ty(k z&3PJ5$|<6pO0wzEqpn}F-(NC}3%*<_qy2Qug2(7k#+B;KkgTZT)KrGv^HWj9rV9N= zEND&@bfEhMB!C-Ro<15iM@3QeT`$4J;Z&a8sZiOVjR*WMap9*O7hX0&&~a`(#dO$B z;-$4HOQdJjC`k_$9pdVZd4RO@V$^FzB3diM6exPqdelH=FV`@_asFUoiAtA0kEyDwC-=wW&;O0Cg&LHD08v?UgZh|wb z3XVsDCRy}XHh1N*MWWy-<(W$a<4aUzQkjL!q=CTNdUM|QD)gCN27s4sZ=_S!4rvkB9wQX>?m^k4{_ zoe6*p*G`oyQKe4-9#Pe6h;L8}lf@|V3y4pY)qby!R0$kCd_7^rQr}#iR8Nu0a>Knr zby_7&KAEPa#&H7vb=Uy&B&b}Ggk7s;*^*agz0R?7V})IZnmfovmL6@y^K?(+p&iwz zlM-3N5cirnltrsdy2HOtC@P1q#tkV69K~w*^ptA_D~nqzAoY^uUz8f^Xt>n3)Esl*71)74(88*1 zCh2Qc8D&+EWdeOtO=S_q%()Cr6D3OlkIK=kF*({ME^k!zEEV+(sF2t*<}pq{6N8B1 zWzOF!pS}&7XjSm{@2+?r>BDIL3Iqdl9GL=3f`mrCl7UQnMn-wZEwH0rtR|wxeX0uN z28B5h047}SE~uT5tF%;01XKL-TA~$hZ&o=QaqMy_5yiP#KIHWds&i$Lb2DNr3cXCO z<@s7AUn=+xX8Nj^^QZ%|Mhy6Bl%1H0a+X;x=`UN5X(|X+{#NnNEaz>247!CaaR%>X zb$D9~e58A)MJWnEW)3vBe~zg!4$!#Q!P)1?-eT9cdq4tSJMg?yGbfi(dMbnF9aWo*_UREt%`Iq93IAE1r( z`FaVNvgaJ_8_QYLbq`^hLQ})ijY#(zptkh4KCGiptoQ&?@su04!8eN_S}%hb-W5io zxm@=-*9cXRp!FR`{F+=~8#l>-LJL*sCUrTrSRUVQH~}$!UU%v2kjBnrg*`2x7JrSj8lcz^YtSkp$Ob&l0?e*s1=FZW zs*NkQ6sF6CHgyKNAkG;c1YyABOTB%$|MiQ9HJa!0{1A^WkSdIG_|JH-si`6$Wru5@ zZFt7GNYinufi#NGZX-uXm!%%I5p9CzZY=-|GH{LR(zkOTDG4^HCp?9 zYG_NJ7Jzel+P7U&$P56h|Jl$MuWi?LMR--~z6QvU$7D=N-yX-QAa*jg#X9gJI*?ea zX0||*+lIE_#r4a9oxP3|oeXVZNh_4#OTRf$mesGk)!v2BZ@y~3878IGMryN+&cwZ& zO`oJi#DL1jCbmp4jeh0JKneE`MOpj8)o)t9VV)LbQ9L3Rw+VIjF!vxK^Y9jgwq~}R zxhe+VEV|ZmI;{f*ow?v&G3R7p3!z?+P`oAe32$Vfy$k5Z$t}bZL>LDy8v)YSoPx>Z zmP6zUPe+>&%2)$ih9ZDy2v1>iNJw0!^5?X(pPtt;ttli;(TfUivBAQ!wzgfy9C~o3 z*o8kRm?XGFvv)NwwDMz*d!UiD%FUn-=e?r0RzH5UsPGf>UzS5!PGW0&7Sif>AO_R? z>DJnRdHyuRUYWW+-f}Q?(lsH4qh59BiZL^LDYztIBsrTKGq_oq@N^76Sr{qyNxkL{ zwZX8!!0=d_oPqu3;iI%whQgpO5@sa=kbN+<%zO(l=J(4cCU9ft#xicvh}W(tQ-dg7 z(jwIEugr`?wf3oO<7T3O!Z^6oHbUdF5>#K+ynR-@WF(OHr4IN>Jd(D-S;sXs`!o^! z8>b;`NX1qa=Yxzqzfs8M;d`DzHN=9m$dg2CxRv8wFT=NGNzhCu%TqWjJW&HA|1REZ zH^)5_ydK=B;E|xBb&5Mu$tcBXVo@JGeD#>61&gBNRqoDW&C&Q$XU?H2g?g0Ou9p;>sa={W77vUQ#H5Z^ zons>*k3%^mWX{Gq_&UiE;iyUzZC%pre7XP4=rCqAL30p;r&+c_F$fk(`Dhzm#LYo^ z0-mDNk)yLHnLjw<);#c@)=5AnWbhR+EKXZAXK|7hz*!U!R&Jt}0zY^d)jWMm3pK1D z;a=>z2B*A5F+0Ns?5Q82#lQJvTnAy6;yNO9wYy9E^$L*Arp^zF-=>)xL%ZQ~4cegL zRXXKx^dagDu~6Au<6%4ZF)dRUU+Q!}%FpD=aIHjy^_U{~!w7aHr%60Gj?Vk3nw5pD zR(ZSzjYbNu$d>PC!Z-ph_IdTw87T=Ej7Qu$EXKv;=s+YZ8WO?@_OfD_U_D#W3PADC z>SE`d_aUMiOv_z8X5MB_DbE>$4GXXfS-2=E<+&0@mxlx}QzT~$%8hmI7B4k|94~1H zzWp%H8ax=ZtiXgNXVw02G**yDle?;wexeDcIo5xR zyDC6u*KHsp*41_5dZid9>OAt8<}gPcAN2^4PGvYTWms=yb3eaT>I_w-c#m_>a z)uSi1#uucQ5Z&Q>pHE#yUo{~JVjArE!Y!)@Ysf5vxwsS7D_jNj$KlDUBqMc}xZ*>ywxjH#jPPRUR9a zm(CSDKH@?Q#9E_726t`N_sfV%-4r7`*zZuUugdwhZElA;-)*(argv>+uQ0bRm?pIS z@$B;bH7E^7j6@$CynlB#K~Y4+WgkuonkN3EgY!3BuASh`jwY%n{Bn?Wy7Xs%}RKyjpA|W2^>slSoEo<(6QR=DX*RutrZ6@+f0fNPLcwH0fSw7q$ z17VGPiZQGOHPP{_?oduv_~;}Ql!5<$1lS?tE0m8rfgnHi@lqM~1q+a#g*N+}PfA-=j z-1^YBlz;Pr+tr`F;Kskx)xBqbeDa)s*^8M_4_`g}`Uw{RzNSwNr=9x)&sMh?7SDgKPq?GvH-E)d92wHT(06h~?Lb76C9oK02Kps z6^-s-hy)FpRBdYQv)zT*MM-Ami1>zzF$DF6O9R0MOC~j-J(8LM76&LPOOL%938>?0(kz*CkiXjvw zWA)$(hsA=iIfFst4p$Ekv(qdeAT79}{d3V>9@#Ph>xw!;)j zuwSfh(^39FH#ua|L}r}uz$UzdGl$nmjVn154#~rY*l4Q=U<+QKDozm&q%Xn>OUY5W z26L}w&PQu2iwD@vnV0kmW*&<2Ll1-wJ7&h#B^qkXQ>x&qZoC}_YihOpo*~!6y|2H8 zPpV#?(Z& zLvB#i-dm;GO?YGk#M;`SofiDkD~f33ovEq_wH8vz%B2Cls9oxJ2nAM_F@TlFO^q|FNya54ExTTH7DVnJNd0z&s8 z7C41=40Nf;x_qsH3uBZEg9h0GD;RvmoCuEY&0G7>hNr8);^nDOk5~Uc{gBEM?H-d! z%otTOfKH47bUgk&_Zf(C>kHozhFDl(kBC94pxC}iJ>}Q<#-RUAm#%8K*GY-_7ccjp z&{-~X(AFBPP^)DpH3Y68NYilLw}cU5qN_N3EP^=waZH{&S>3~H_k9KYvWOVB3A*)O zzRmg;^FI(L`9yoKA3e_y`8%u5d*7)i{8LH#^#|&^pJI0*jb@XOjpEhGeYP=-){ZSE zGA~(+%j15FJ}Z$keA}dMB6LS(2yG5fjm;3ox$U^IeyUUrcor#q{fMJWQ9D!EB>I}* zl>~Ib171zRi)M%}cbd`F1P`!Tf(P_B$Qye_-o#QHYi_BZ$Q^3&F9@Eeh*g;;1jUA|A0qjLlk8^zZbZDuR{xHBYNtK`J8NzfB(m&|l$89dMYWS5;F@^KNZE0%jSE{`#shQm6Rj9Sr-+Rb&Rns4 zICI^o;}Gi_l))gK4d4Y2L%qt?dmfKwaqMdx;%$OsP~vmECzCr~7)}pNW_&%$*{}k- zbefN8k?kzqJuF{YMtFPka|Y_^JvR7RfDe#&lRmU|qYrMZ`-5nY{z*s7%&pLP-LwuY zzpR7a4NEGVn#{wOMcL%CMiyK99lxT{J7d2>i?TgV!MV<{g6%dw&J47?6n0jTzSRW8 z z6)L5VI4u#3TzBPCnM@pUKxZgCOc*MTfzgo-xOm-sr^$<4LQO|26V6kMv#u#dD1+KMKE{XmBEGQy zke6NxkM5&YiHM$FL@DaJr&Nzs>))L(?g(Fl%iCC}<`if)72$elx-hn(91f@#1tmgL-8pO3Mb6mvyh z&Ysz2f|Dh)I@gIu8P=JH%5UzM_MN(JH7Ju1djeR2D6RjO7s#MiqBA5kkqDe>rR-&j0Q8^dm-XGc$s8qI7 zb12RK;kR2JK{&h?mtYDp(`_a)RQ9y&lkH_RdAj;g4$!$eqaEd+tUmktAwNGAob%*o z#!JiOad^*u{SwZ7Jp|B(FBZCgwn1n@aHsf;hP@pf-`5|ct6Vkmo!&8K%tt=SK!}FBQ^t0}d|m-VYcahqd&uE)K72=JtX@f`ku8z#sw>cLwY_0G9mHjxuq1Meh)9 z%TxWwq=20YRkLthM;w8*#o}|7v9z~}lWH*$IV$s!Af-%;>|jRj_O%R(DGLNgJbZt1 zNe-NQ$Q<~X@SLZ1sdZ@e(Rv;w^U0koLpY1a{rh7DE=0CElY>7TUGd!HDzQ?lMo~Wx zL+_}|V21I}ta0hRYBPhm`e|giG+CLpjUqISZvkwe=#Gc~f7_sC1#yKC>wBl=HNsqz zIMA;@JaeFDaA+6?kUN61olK!VYcc(7BxfZbc9r?x)`Uae$yrDwsW4ib38c1d&f2Z?WT~@QDVUH4Gh*74Z}bDv}JA z=VYqDg6jQ=U^Eg~DBw2v%i5y-n&X>y*9Yeue5V8_^Yu5c_l3F?sw{$8%+10rJs?34 z3{!zNE9ABvVun_nC-diEJ1+gzHd?^#XXycn2jPg6nhD2@F!lual(IZLI)1}d z&it)jAE9z;*U(=r2(}GXi<1i_^wz@yG84(}GwcH>q+|9Y6y!0RPHXMEHY|7rSX16S zlAyY--c_c-VQ`D@sDn#?#KRD;cxQQRS`GUV3^7r)t?3Y%C<%aAFmj+Bkd`M3Lw5u= zB!5`p78r2Tt+s+%#;IT#TL1A@RX-bipuco$B7D|Uc#!B!Z)#&2vHW!J_o{x9V~M^H z&>c7-e-Yw6IX@}FP!*`w0a{^c+r~H9#sR$1E?)dd1Q4s%qBxK!^o;n6jd!Tb_eRJ8 zU8)Nkl?*!~{Ez``G{i+s_pQm|ok%`49+qa{T5>_4553F7L-34Cjne~x%#tdfy!8vf zj-=8sa^7+;Sy;uIyJM^p+*`-9X)j2 zG5R^u5!Ig7^=*_^l}JYdy&$o8yk4)9W|#$xsUesw%JR9AWQB9BUPC~zqF0wEBo^nq zl-Y5pV9y7UfPlNkKN~|?`2m z{PHBO+v;B!dUz#HiMuF)vaxVq9%_mgUxnZ9ZDST^$&V(brm8d~26$4HLrrPq&(N>> z3wJq?B~=yxS|pQ<>cN>j5Qz`$xI*L~E|FB$weDo-VD&F*N_u5Sjk|CrVrLFXcT(ae zoLzBSCxIn5bS`BTrA9?1{3l88|9Q{&MQs83G3m<4hqAe@x|8c7 zm)R_chofiAXm!A~4A61Y8B$Bx+wjn)CtzKC2q6w`P-<|Q^)j5UIMqHHJ6Y$yKpZ#t z+u(`n_i49eyHB(J60OI#eWb`O^5&WutN&~tW@TGWgG!4Z5!EcQ6DH-k?D34t z>+3UJ*yA^}RMiAv1EQ4pVLg5mi~|m7pRSO|m|wHGM%Lm3K{@SAs;KyUV_iTcWIbH{ z-00+z4#4S=S3=4fbj7yZCguiS15n9d9<2h@X}2U-9hxPgD@~gpIa~$wyY(Y02Co*> zp>PLDyyReYr+wJgt3A(ocEGyePK_VaT}GZZr(rKjZ|>XMNv*67#qv)0k^u_Lxl-u- z$ky=2_Mbj`ybm4V;V4@dPqcV+p zuJq!gqNq&(rZ@yh)Aowm_!RIl(PTZqO`F_D;opSY4L)#h{3azS9ro5 zX~eb@1Q$A|KVXH#;p@mEB9nE5Dq-KLv^=)5bAx9^G# zz!Z*OZyhBg`H&(+KsMHS&!pReRWfcD@aaRkhVnEi*R-bzJxVBfz7%SCYqmG4@Vu6^ zat`d=AD!xlRBJhTu}R=4Y%Wa#kd6Gw#6g5NOvD|Pj|LAqQ8r0eNIkfZAxY|0=+e7| zwKn@cXo+clD~xjk=TO>3*uIILE4OI%0zuPB((3Ddb%VTDv-?1U_9i!G8y0Fz$dEZp zgQ10WP1X*}7o;I=fC6U~6b!XtS%MTGd9RG|1DfnYBbQDTqL8C3Rj|_3SJzEi<<{D+ zlo4)5>K$lVEx?krT7|5*fzWbg2IZVWFED@Hn~ffOJ6_#fO9*{Kh1-E2N)aUp$g!{| zp^gtXEW;#%*wliGCo{j;jI8`W@*gz918*rF@#$jSz4Wz-`Z9&t!#6RF z`X)KJ_Fcd!@5@u<4_&PnXswW70>&m)0GhTL#Jr z8qZ29f)5A)&>>tzdI(XFs-Q_wf+)lYuuRA%<}iFptd;aa!*k$;4gRTO!fq&{{$4cN zd&NO_6JF|5`C{UW0WC?s$pa3TE3H7T%Xf9Pb9Ve`NzJ1U!x46aqt;pd|HQp}Q(f7S z?fXBUqT+UR2>D1V*u33g_d$SE*b>qes9a^M!%e~FAt6uza+S`fzrQgubFR5IsBCxK zKJ5srB-necIdkT7o;{+Rz&@I5xQ9oKf)-6T(Gq`d=Z>kUTpI>?JUJb zlSOEy)NAaq9<6I21`Z;A$mb$3`C!#u2XF99J^8$QG9bW`K!8djhHCSDpfU(UEUlm* z1VFy57$eI~I@vJ^Ru$T1R{8atzdYUj!yk9H|09=s%F%sN?Zb)wbh$DAxTNZsN(f@n zD=v@0QqX3uQHlB?|ElcgsCHZEg~}MU@S(9f77h#b3$KG3xN0U;Y;~Y+gC^FwJ-=1! zfhzDquZ+eiRvk{lFL0a86E9V@UxK7KqG%R07O9dB%M!l>Y{-LbK-Q6B4n7@Fl}m;A zSIB2?_o_JdRH#4QpR4ARhs9X`2txW}S>zxU(A$9vs<^R~@*j&|g|IyS2Pgfqfq8?z-Zg$A$p{)-Zj0zg0| zd6;(&^h!Vcnm8=2RZy+5njy#gGN+PbGkhnhcZ%1fAA1~7qP*mpVNH~)ZOSr?01wj3 z`o!ZUy{;vmP1Q2vbfR2|77El}zOr8+p+YZBa{;_?E zUb7TDo})~i4^BCx$c@c9n%EjX)C-)mpTS_vD^i4#qS8KuPb&xT^JU(X*8Sdc6u&kg z3-`g(Lb4iut?-2(gU{kuBZO__e5B$KqW(m(9=z>js9EdNcwvWdZ3jE_`uqPP3t~Z} z7lP|%hdD_OgcJ5r~3LhxU;MI6T#lD`26*=fA~n|MuxFBg?R!e7l)_(wH*cL#i(8W zR34W5PL|t^qYDqGa@U)2Z#xnw>phi$C&g_;jRSD>Q$R^!Y*@y9-WYlcR=B zmExgb24qhLfXPUgHz!Va+3IFE>Xa-{FB~oi#u(d@+|(`#_da(*gHSJG1hA=E8XiQHrL2sKu&%#BZ!h1Ka1a-p9-nstDUPW)IK3lK4;8ItmijoSjr(8Ok%;Sj-rgc z2=kO}_CF?kMgLe{(2YkhM_dZXPY0z)l4Ursj;mF%kXD@+YSZnw4fmVDSGdjmeEt_+ zp}&y`j5Lb!O^a&)fOe>BGDh)fGh6RJLxm_2!X&3qXaEe1?re~N@4SQ(dq!6yFKT=? zUTcVQWpP~6SyF}qAeY8HQS3q2@g+3^8#hm`8>;;Q&)?~~AA|ptE+WA#fI5mrpn@%m zggbZue+)yarYBY!kWEa2lj8+l#~CP)UQDV#h?HhuYG<%QFk`K)z{$2&}kUw8Nis zt9zzbsq%3(Hv#LynsiJOUSXf^i^v^7o@2M1L7Lc8YG3D!3zz2-tx$fvr*^7Dm%?}i z-Hw+n(@Y#cq3*0eT<-`}_V2{;D}tTU`JZfm&Cnm8%d#&%(si}M_xMl$kGc8DqjSvz zRpZ^P3)z{g$-1&?iVcvBleykYS@P14K8N4#sa0OQ$quPz{X|DDT|vdU7r$GGZz4H&10FS!io>Ub%`WZ|1TYRhvjCD%=T3UyPOQWI8_eM- z$NFoGItR!kpO|8qL;dGb@ojgmjc@sxPP})p>^0m8c9yJQe8|h;TZb!%eG=EwgOFTH zKb$Tk3N8E9fY$ZNqf?e?%TqRp)lkt=a#$XvPs(QIA#>itDaT7kZPJlP3T@<5<~98( zv;M;i3h%!f+zzMA-@bmzG)nwq$2olnyc+jehnuass%|I>VPQ+0-#ipC%D$X6JWb(rgzDVxXji8g|ah+$_%kr<>!8AC*T25OZY;BG>a<6>A zLR3WzH-746(|Ja6NTXmQJ>#LsHuX(eXZ*Z*WkLjD{2((y-GcgLgS0M1iXcJ1cD6ps z5^ONT3Z-v|*MjbfiXX~rNk@nnh7$3+rMd^d8>mMnTX>dqJ^oEwKHdiF2R@itKMPxQ zYJ}6T`&NAXX+1O=K;22UiHVkVLB~K$c?d)CrT~;?Cc5Z_6=1*F(=DY!F?}wpHhGfH zL(WnZTd}f<;!BNk7%`%pngEyu-9qB9OYFS6k0=yimsIjFVVowVmE#0OBF@MM$y+-M zb(2?cisgnv`TheDxkEEn=>{ni{HOwgwm{{AbSNr}`nD>h1AqEfXDvR1AgyAIzjfc` z`EfG|{w%zR!sP}JJx+lJSw_(-P%6eToF0B+-H5U7#?3A$9(}F}NvMS@s{OR%fY5^i znd9PT5@fl@fK*X#mJ!MH8th%6QSeh^?s535U+Y+7?XDZ_oeGiBft!vaij&b|hgA2R zt5VNhQHU)kc^m|cegv(tCE4_J7iR8%uet&;vrB^ZpYhKT#sDG(5mk`)9+krz-I}1E z$y0bh9Vuh;klz|U!w*9V(8;OAL_<_%C2o>z@VqLaQMbB+MN4yiqY4kM#TYhc5eIW> z$k}}gVPMv~#pMoGGo~H_&ww=R+7}L2B?;QXJ57W7-Q=E&T@k|7#aS$ipP@Epv-oRw zviPle@x;@C7(cPQH%2 zmY9XPX!B}J&V$5f__OsKQp5D<4l2P%9iowiZ1CdneF>`5Rf9&)3vO&}%b$KwA`f4p zkBTuBam9S$zX)Vuz=K>hz0EVsfb;hE73y1(RH=&qq0dsNWgnYy!_Ju!vI#?r6#wuB zT6#@NkSZkxGAYjH0X#8?%&4T3UYfEj7-Cam;o(+HjaAa)8mJ3Af};qStCWtbhfz{7 z_eM`;`G|5`e!i?$|KvZ6;|U0`@4M2F&;~6d&(b&~qpzb0v?Nr8q=pJ&gQ~ldpAzTf z52dCOzMqOpQ0d~b{2SaqVWqG4_rDg8Udp{!oeBTJ(^HIg^XP;>#a#RcocuzO9slHC zOoGw}ea2VwUz*=%P_+wB7gu$qq--5gSO!!3{H!Vl}lZ7Em{kCLHMKzT620CM%VJU0i$kp<@2XO3LnZT+*1JW0OjK zeN`AZHT*a+-Dc*$ME{;+hQL|JQexE@Eu+Ob5qz@hI_Ay_LVQ$IFlcGwWcb zZC?IP4s4tPo13hw@S)D`t0}O*b9R89mf`!)Zgg4{GfQmqxMmY&U6zased5kW^#C)A z-I-sz+OFKO<-MKXl}@wKd0M^g7+mxc@}lB$*K=-%D{@~G@X|``Uzd%oQE?kNsjcXo z_YlloE_b|EPbZDUvn|9+IfbvEAZoZ_jU&;?WiGWVIw#FkU zrS86?mMf_l39@Ymyuq=NSg$LR&{O5+>m{Hy)>L{`>!UNG6jS=b?38U!*nM^gBx{Lq zC~U%4Ue|3xJ85r|?vUxg)(1@vp6%|u*xu(eqq6VVz1BuSziLPH>ErpI%D`J%5m%smeUStMT3|Pz)G^U$fj=e#rWEIOhC|wrOhqJq`p}a zaBqlW*Wp-sS=G5=-!Vt}x6y)8bz79GvGbg)ErAb1&ByPlU(8y9WsNaSsoi_?rz$*a z#kH5$S3hG$6%FMbuYzEgS3G6ZyM;dWttlzX_w)XW28IyXkG`}@EaDosy*4$62fKQd z6Cb}tpvO82MP_*zE-#U=4;IHC!za4=6tl!spQ43YXz$0VYknYaF=_A_{~X=>Z&OSigRUp2b5`}0+p1Es7v!4BEkuwE}Y9(aWN~2#I@At_GCBQ;t$C*wvm^$zZ zrY#-(_sxh2^A=Cz-s)4x{<3fQapK(1eNSJ=5m#<%JLW6@H zq%9sGk~nPUzf%Ad(wF7zlG+7gNq#XwBxAhVbO}TtUu^q?lC8!_ja@#x4ms5@RhU7U zeB~Q-*%#p~KXhMX8>BfjjIa`@AzV&(7ixii5D}nRP+`=&`QPYy|1LeIhtB^?Oo8U_ zQY%Y5|DJl5)o)fOvlswBLnZVW0QD>yM)KcV&teiP(wDOeAwIwhVLm07{7r})I~TbJ z_d@Zb!b$DA5I&V{+|Upy=qFD@Cu)Yz2asvyi6t@$WqE*27q<}5QyN2nZMz!Op#@gt zf6CRALNc9~5$_qdDuh7oLH2L^6Z1MdErtqcvtPwU3O(QMdGeT^!@Vbxx{>()HdKun zPJYmX-{@k8kvcLb1{zSJgdP__k+kg4K@)8B?O=UkkBiSnQ%-y<8G9MAo9&Y9R5d$4 zVD2-*^zV4$T2}wzAWXLuQ8AE!T#_}1`n5GsdGuWkIttAi&;6Gqs_*Yi%!GNBY5jzW zj4W=uIl()M=7e!5mc$D{oVY+;|-s!S`#+2c7P{K zLAQIAgA1E^DcNnQuZ(&;6CcKbEw|n@Q zJ)0-iPUy4wR9}9Ara;wlKcbrSq?^1tjWQk>K3oWX(1a$PN4`*RgELB=+D?j8Za1Uh zgSa}YK^$RgQ3DjF{_pTT_@Uj*R>>OSNjLzgr*N%!U5AdxkPFj6<42+tHZsGO2D$-w zEJ8@Q%Kw3;IN|Gt%G-X2^RVcqEAWAHpl@E%R)rOT@BIj6Cy+DWSYNFn0e8@nT|*>b z>hf6v351|(>@%HsVbM+)@GR+6#hytDTnU}4czrPv*gi}}M?)G;+d7p_JFm;f#Gzqo z1R8(x)$d8T@!<o5-uOT;VCARZnsh-1HYYI7NzhwsneQ?nMA>PS(`VTN{VWZJiSP zDHCC!;!nq}WZ*EeF6cyVr@+LJ%$yc^`4TqI{OOQ3O1NOktlQ=j8fhDR2lorAkG`yoaDL^90C|d%XRE^WNRC!7A3d6} z5fsEmZ^2B%sH7#>OVIi#v5f11Bc|O)kZa0@HllHAe`^<^7p{kBsJyfvSxGuyp1{Ew zr{~DM(4E3sT+_jMJM5Nrk){yOEHQYSV>yzp<`xAbz#|(hvAzSd+NxBDKeLfeYZkLe zOYoR?^ZV0$g-D zcGa?^*!n|AfiT0IH_vy7t@u-vz95|EuTVaOUbGKFjOT5HFK-It%WDaC95vEE7P{=| zMBL`Vx2Z_r5KOi(d%Qv6MQf(0ULu zi&$E?5LOhd*U~N#G(A^5rzrW$FyLAEPZGrTW@|fKn2aBx?42W)wJt)b6nSyg_JlJL z)}y0QfOCwp!=OQ43;}OI_*Ddu&bF;q(A|q$^Q59&9E@tK=P7h$k2G(=`7Wz}^Qx7) zlqDY@dZyWZcl%_XtxJ&cNMas?V@98%wV+_^Xz?4aUyK`pSQ}Mco>o-Z33&nLneyrt ze_Nf&6;;Emg%d&)ZWb3cL_7{5Vv~#N9Sj@4W9CM$#d_IR*ja2#gGLxvV7|y9hqs1)e zL&)BAq8JuDrikN8cw(y6g-x6qHr-edf_OoAvMi_+qD#N*)t30MLb12_SwJR__#K?2 zQ5ovIFM-w}aBKZS4a(5HJ3%SYZjssFj`iQ6gV7Mu@(0_yFXh*bfKO)DC0KF!UR^B~ybjm4ReFkzGwOTYE!MDf~5M$MsqKbZWYW|p2rJ@}DjTQ?*=!WPF#2^=^ai>A<(<4u0fVU{+mWdzII zN`0W6B<;(qo~0j-CtRc$CkTK41RbNg;vu~h!sG-UrDJlikRF~RbP!Uh?tX#}|3WDl zk7_AvH7v#mU7bo?_(DW9RXlZgeU1xj28t_!wK!XxPiK1ljdM6zYBXBXNUqzxM5Ctg zbRc|QUZni!&QY_I%|oTxB(vDLuFgnKYBjhx-0>>c9ZMcEUFN~!t}&_baC}e>ZNTY9 z4h@GImMQO;3QkoQOsJr`7@;^R$JC&xa@CP zF*j#d+&DR6n)k*j_)>J12Cg3~Lwj0*75`QE0&nzw6&0o~XMjf<$COFU+_zTDY#M2= z&$h?~h7r%cFQgN*wPe{^vRHP%wl z1dB3qWy35mD{dI|i5*woMHeIhN$I@HZsb```OWz}bDXGTejoZekU|8eQR_as808j( z5acKd7cIhr63l1WK$%F3Js^v5p)~{_IGCVhY`B5%`9aIy@e%p)1VkK8_A7>MIG#Sj z7U0=Evf3w#AQ%|3@`@!^xSbDW9y+RGiS|G!_YXc0FbrFJ4;T-;yfh2O^D~0C9*oz` zegA_6d23aWr&Q-K%jHer2~OyVgB5h&ka`sF!zN)%BV)qxb%z!AZQ7QL`2;EG`)VMQ z$>T4b^WI#H^a|6?!!AJhux;ZmJs$GW2MBco)bP{-v3Sla#9v7Er>M?Qn{)kqzpKGfVfjRPU#mhP$~ zD2cEw>LqAIrorQKwc0}0ld`ov&Y71$#Ka$MF4$jVwOb&qj?^eg=`VM1a$9QTd{ihB zLvpI-m_2nD$+iHbbDV7`pt2yox}nMgM80xS4*r$(uM~Eu2^}(3G6HN`tH667>fAqk zQ;su#n?SbiG71K4%tZdSYApxEOBS70^7DDRTOzv-gfceo(LU_;_arw~ znKvXv2QT~f%ctq1+n+d(N4N6+9^EQitb#yY(Id#?ku*|Wlf_jW`WaOVe1Kzf8R4wb zQr98g9SiBl()`M~(L!L%nGMP3B6bec_-?rKcTP?DCIOpe#SzUqwNmanH70^fgO5)Q zOLfn^V#C#c-7k@rjBxqXCgeD6R>Oq~v)2$b5%VwvL zH~#$<7X00V_Jr{9-|W2J$w_wyznd^H&^9+K&`y5Kh5LH`)TjozJ9L8qyL zpq_!U@PMj|wU&Lq!-5WCxOLQXgbK3qk$v$$6(0k-;ucBK+^E^~aIA^AKZX)!X0r^c zX#Ue9)vl_TivP&j5nif;mnPCgpeXKlg|;R~Q1$f5arosiA6C48>bN($7B5{n-s=LX zsQry_B6!8@r&3YW=Ep~uPo5w)5277Bc+sFaOU9bW(&`g&leH+@d<31q66BGN8fFO? zWziySinRCJ^Y&}4zPgT-hW1TF353b19!Ei8E|xsTHO$59gEp-&ZL|7*qZHWXE z(5|!6G#C*}h{nTEqw>oNmL|lM`D~d9m!BZG5qBwUV9Mbrifmhxs9Ni3ABF$N4rRYt z%bp5GeSxtO4Gzx~0qQiOj?@HQ_kFbNi8B9)&?LO+Fu}y=RMgLX$1lVt?w>_=r384$ ztR_X1SPMrkWN@goW{I)>!zbF{KAuy0U*f;CVQ9qlpnS;K4LGOomSIyyxYo!51Sc#{G+{U$hdZ3$;d)4v0vHiE;tgex)MTIzgKk_S z6^ZT@6*~;$kG26_G7%u$KWJU4=Aiiupaj9vSgMRjX-CSw`6{wS!NjAp}fLYp&0B#;--N}AeXGP=g>f^P&mX&f-z+Hec;L(qQ(Ue-cR0x9~Ew7 zWs{5?BIp+*o^^SHB;`&(T<93ns8YGj0Iac~72MN_c1)zLTJn9X3whyDB7HCKnRLTdJG^ zk>xyePFD}1YR_SUO+2696!VdL8>P2qsURXS456n2n~t+g^~d*H1D{be-rKUc&_6P8 z#Euo4MX(IAtHl%RQe!D4qd!%_Bumtm4>^}S`>EeVw50PnUXAn3-CZ)v_bokE4vU(z z{PCPPr`Ua_vDKvMa-@~zFF84z?L2@2{ILRP$N;7Bv`p6|S2g7MsZ z{{1(A&zPK@%@>+$y#4B}`jF4&U%%Pe+SMp=#nJQ-nB`&W$U#YHDJQ@cko!pUH#`&9 z4C%!yzK{^slmKexwH*lnKh}L5rkskRaQb+Jm4%s|FF0^^zbqg2F(%8i$Qz6Kr%#v{ z1tWKoU6Huxo*xVc3)x9C-SrRLE;ORau4R?ih zR{e8C4{VjnJR`XFpltL~p(boxdL*b7Caho3+J@4fBY#V7rb%Ze9rL?QI7LK%IC&m;d=*o z+HT>_!nM?~xtH)o&|)eT^%sr~b;{P`u($|)K{C?w*5KspsmiEi9;^g3El@sFs|Xnq zk%{7kV)Bzq5ltPWZSke#$t=>n*2J0!lO`*=*1p1|r-WoiEs%(xRsMB-dvu1YdPsu> zjn_wKiknpk*bh+(RXG%kF|=$=Fo^usp@Hj9S&k>I7xx>nwL8kM)UJXWqfkvJORLFl zi&M&BKtu8OVwFxsj`-xR#tfij%qHvBND=&$!$JKk`bMC{eO!WO%M|lJ#3uK1NlWIA z*~BB7@3P6)xg>4HSJ(uLg{_uI5!}dr-OnZwMN&I(hflz6$VVlgNU{A2pFo$!Ct zHD65%xsP_5YYm{ayt+1902oR|q31nH1sAV?Ay-Ugj!5PnkFxk+Mx$UUnqyf>llM}a z=t?_q@Rqe>n#`fTJ}8%cDb_Ag+DfFO5@D;FYTuHgkg(y1^}Hi9z>Dak#p9jPFbS90 zABqCh9JSMp{^V;}3say!6Y_>(PS|__E4;zA4qVx_p=^MD5W8`Wlc7j`#d0=-D&pVE)XU99pN>A^;qnNK4^K z+Wrn(T3;ty0!m4VjMQA9$bF9|x-t%ZJYVqYWUs|LO@`%jhoSmP@XHvxA z&FjU1hM&#vwa@Pl@662BF4e%U&T5}Q-q;Shr2T|p0Es-x-PZM6)?N6Rb1SQ!=&aos zEv@e6()lPcfD2(ABC-}pJxn~n3shKfdLBNj)kS&o886#z9yq@80ksed@pA;A0eT7- z9f;%r218%bM>~SYae?heT?-*uiHbvgQC{!Qj@N88_`^;@YX==RV^|@+k_)^C9^3e4 zb!8SF<7eO>Jv{b5T!FLU&IX2J)$EzwH?OLy!!B?RLAcj(A^)1=tDYU`du|>h`eUwLV5lv(IeKz&bDC%MiQ^X$#Fvrf4vtJqi++mcG z%42Vbiyu`hKtvH?jDsWvRWRDm+R`9tRvIh>eb5%7btuOu-^xUgO;J>=BX$_l1LDhnu4P8HmXlJ6j}-8(HLAf9DPP|Fwnh_jDXEU9-0Ia&kqtf7C?;S zSnwo~i!opk3A7*n6(LL$88Rr$fh9X4s;yZi$C;ul5Km;H;-)6+~T^bM#auUFHfNk7aTflW5tja%ORAj`8ImtA% zCaF9t@!x}>pU0s;2)5pE(I{+<%LYS@BS%$kxe`BCEj|mlrx;i61Dsm6QXHvK>*?eP z%d#lrNEgz=A|{WyWp+BhqP*Dp;|)@NgaESftl#z{L^Z3r#n_WYHzT&47@f_{h@A4o z!&6sq4EttvD(awl(lXGBJWAq5JO+zdur8 z;&DPnMIYM5UEJCM8%LbWxRb6*EGx)Nbi(eSj_OUMv5Xwl(bgfb!X~jP4f>Iuq=ENB z)J~|OjVlY|DLl?>*hb)43wiNN9vT~=QwX4mLyI{7(zt$O?Ac*WwKL{CrSb6QC}+LO zo2MZ%WOA~iJ2U5=DKOc7^X7R5CKw6xN@p2ZRkIAL?xE!&%4E0S{HY>t*%oLb>+&;( z#aImA%K)Z*T^FtEBFu5DlA5%wLjZv#;OR=EkA4R*Tg{B@>>I*z+p1<2C* ze%P9{J)-i`!kQuhhKKCEeW_%pL(*)(vh>(mMcBgW)p2yTCRssi%u!)9IBTjHM7qcn%qIPD1$pzS)ou8gL zSt{$ML@CcU$nEq}{X<6-P)AO)=HG}R-Y1>~FZ3A(J>?44euyfiq3ZJ9u!ZNq^S{{W zE-hO()d`i?_+E%I_8N;?Ds!Ae9E>CHk4Y>p2CMFFQS1o&9$5gS43SnneG5)mAiI$& zX`XCZL@nQ>Td^kUY34u~MVKEI@G3U(CRypMB4JL5T3QaC!U~rpe>|Tk3kmo);BU-M zl0rXV=Ewm*1TofCe*DdAShYflf`0u-kNY!s7*UMCNAP^2q*>O$Wg~vTi3sj{Y6+74O|*HvtmUsJ76m8+IW?YA`6L762FADqyA17L7!9)ue&P zy!E0~T0ZBJ|GN5?C-NLs@$w%P@A99oJ(JoTZpe#iVJj^q@v`}3wv^&&!Ff!kbsMUt zM7Sb8u^B;(8MkVjd!`mZ}_^81~w@sT1we^U$h5y=stTbU@hxXT)RGphg1obFp~(>AZDJK)YrN0EjCA=$HwLM==6-|IZ9D!qiV|TrFePLv6;@PfmKX3#_SegUN(DhCo$E#H1 zb^Q6rtRI+;o{mlQDwmfvz?F&)Wtp8slSWpwn0~9q9XR>TqWn7SOw@58c^^a>gWe9n;xuxhYQ}-T1{?qBFve5h7@WJ|Mok9M$-tEJR&sQ(eMgBl36oxK zUfkWzCd!=Y^B1VhRJ+5+2`|ba|vZKBdc`K`GYglB1#jeD-C@%&!^>saJws(8=H;JyQTi}f^g+`xQ}@yqe48sCgF&_wrE(gH=shx zriw-qJh)~&AIS=)MZbQ&&2mSHm~Lf&C8&z%#q?zUKlxZZ_kofhE&}@b9GoEduG4hz z>0God<&#~mmt0%vCi5Xjk z_z9_C9}qL~c6?xqOA9|OyppCEDrQX)CX1sO#*S#Xqdn^gyHMyNSsG18T?RM#Q2K;2 zg^WE&gkn**cSSU`^;!)*=a)`7Llpm)En;{$S`3dG4Dl$Su>QmIxS;8y?`aYP$mdWI z?igO{-ep+*p=XRe%o&O(^0{e{7z<4X@cXG zeKc0E`T6!rwc$tF^!kD#aKAN%lEM!y?bnK6ge+wlCFd5Sl3IOBwuolvr79v1gYYvs z@Ag2VHBC`^`e^sjA0F*I+E&mgU0Qng&KG!5Q>D#4fUFxdaj6(-7?5gTJ#>8}262MF zQpBsc4-2MYJxjte8eS?jlJxIaJ+lbh1c5t{bvQ^&TB3egW2H0Hb#KV+7i6<}R4N!o zyF~1j<}tg}t8FQC3eMjC*5(WACrk?etT;f6&mqM_xq@!u4L81$vo2P2h-aIqB{Ll; z^@H^$;Sl`7Di=YNH290!ocDztix%w$#Rd%JIQ|t?MI7)6Tlte)T2wBe+&~Y?pkBV+ zKj3F&`>9{a0u_{sg0N+k4p$yRBnZT;B@A`-2(w_7VRKU{O=B!RK4d=Wb$=pFAxQRA z5UJ8@*VigGEwUa@PYx;5;82H`>VR}AK}FSFwib!bfjTX+yR}MpD@>MFbyu(`r-dB{ z@#0M^FWfCYw&Iz_y9#oH$E=E@oTo(-d`(}Fdy#@Ro5*?1wr4l`S5DPS1n9bp}1+%WaCA7Z!8~jr~lm<6V?#j>Ufm0Q-D%yD@2l#e?xj1bfGGON+IQR8(r3# z>699if+PO)a1Jl8fkoj&vY=ld<fhbruoF4gg>_;@-j*nbTA!CDnxRiO~$*Y%UK6UN$F6{IO87E6|8%+&-{N zXGN#%7b9}`vEDQ|eTs&%^5>|z1J`MDi?W5AWW_yP38U#k1i>paH=QbXPZ{ zx>QalVBPv9uYh`ptU?S&Ba;0v%Zl(Sca#Zsp6>U7`19WBZ z=PeyhTIx+Stnk*PH5fqL1SleRUhB?_nK2rgk}u&uunvVX-5d?j&}g$)jXK9QMv-KT@-i&X zq)=v4%3&mv@-*7;jnZSagFvcTa7%2<-9&OJq|_8;!cb~tH0^-A6dM)$W-uHIkpU4+aq@9h~mtbHKLJ($9W=a-45`h5|W`w(XOPE22oV;HN9TrDbwsr8AK`!#8$* z`2>)2d3&z)NZ;Q7J!a5y+S~v1_m*6W@O=2*^SH+B-(rziFNv;qkjR~9wVt4Lbzfr) z0ede+Os?*BOF3)bS_(IU0X4ctg<7D)80XklL8u}oS z&%gkPw79TYQBNjwt^7wkBOYFY#B7^tsJu^g@bntBi_={9BaYvbok%i5Fd++WYcIWs zhOv%S9UD)i2;n$Jw6h9jCS#x1=clr{@^d=rOWr{Wg!~^!*GLM?gfdc^6_Kx0=jj!_ zCQt4e#6-6PwcRstB|pPk?cvJ**)p)zMWo+1Bl;@1mPLB4J~-{VcO?yaL9Wb)S4>n$ z4K7RuH8@&!;VY-hAvlpyEYK>kVh-Zz{Qm3LoaD28K(T$9tMpQgZwHWhhGk38icgl$ zfdJN`+HJe1)CpVdsK)D%qR8?hPUgSQ+l@9~yxrN4O3|LVc~+}=X&wrz8F{$H$N~!k z(sbjw!NSHw*jZ1EJ+65V-SxaO$XqSC&D*xVqPk2~92FaM*GRXr%E)FUMk!V3wY`E&a5k?=yDoq<9$naU;NqHrNAvlEIN>JEP9 zA^77Ph{O$c%YKC$I@}JCqv7D6;|3&3!6dUs1U8oMfx+sp*%i%c+!F@nJjPKVbk0L` ziU-?|;L0nPql$pb{`5z>|W`CdYJxR#kj#aJltt`oN5;jwtnW_9@3rHM}-i5P?P8GMdk_h#<=WM!JjMT>$j_#9+fspwv&=kY!)#Uqiv{4C+Wh@Z8r+Dz&EWO*&~ z)9OD4w(?h0QSEPFIH0}yO>Wxi%zV6w7qAfSRuYJTN0SGYO5Yyk@QM2#)! zi@rhb^M-4lq%sI-%931IQ#fxTVK@T{OLujF0soD4@)y>r7g?w4f-0>Pq_1k?Ym3_W zOaLn~irC&_#OZqT{30$Jkp;>k!iS&{^24Xo>(HlDTdA~99;owIuH(06>w03PF7W^C zwwa9U8rPwN;c-pUBQd&HOdmW;ZXMq`r{S3tC}P( zxsa00XiigoI<0rkoEMQ3p7GK)ARaw3S1Nmy&OJy(Bve)m>(R4f+5E+H@3oBLU;1H| ze;^}C`VR*Y>;Yt6LD2;zHtJQzqW-`tG7>t0u)kBSWO$R(75d5gqlYm>dqKq_+R7!7 zp2(oNNIpEN;z8@8ba`gWM>L5EKm~?xa9`0%6SW<$UwLd51F4*`S5<+$MDJLbfb*_C<3N`bdlbMakL#HP!<%=LOEQ+YY!+$`6qw-+BO-ji9jUeE z9M~12pPfXUUO7Qhm#E6plRv51lJd}>_z$xWr3~q5<4<6``-^y(VC{Tn-{ZEAblLU2 z2Zqj?P*p$)lX5B;CsTa&xkG|oW#pj}gA@1mD~rDCut~YIXqC6#zv|_sDm@y?zBG@~ zs%Y%zL|qhKl+LU9EC&0Z_O8^=mEzXk=FR!@Ts56l` z?((KO=eQ_4P_UHxkg*~AkrCM2jed)O zo|-h%Icqi$7fzP(zDuL|FlX0lLc$}o63qEuylZYDrj)% zE9AYymZbp5U&^44fX&##8mB#ziXB`Lxm!Vls0tD`BNv3hWLB#jl{U4x_v15G*>HEZ zKQ>3OfQ%YHmZ?o&8vn@lQYT&v;Ml)sJ(GEzzCB$nt;6W#1EE&Il-(;Xnh#}TGKxqt zG!_4WYMnD1K<}ZLKw@S_ZVV7h8JvLkkpUT6M4bV3H<8pmg$(fsg#^+^%NrCB0-)B_!2Jq?%nMo1tcN9CFSEOt@{YsdOLbx8{yq2m@LYzM9Fx@ z%kKw7pCdERwH#$V)nPKNg{?dSRC+c@)^EiQw(GwZBhRfYuQrqLe0DajErOzAD9N9A z&iap1!TcvZ=aF*#TMTG#VXzc<4F8TK++X(Z1mLc{Y2Lc(bcw+K&O4ifF4NT1`{Dvc z?ivd&d5(n~UVb?lda>^*g`0dsrhW!n;%5kTk1bIO$3U$A<{LNL1g^dkR_4e#y^fd7 zmA<4v9)tp5N=!2)lr<~XF?7h*uvwSIzArz|VSQ6_~q`*CCeGd0Y77RW?CqpIvv=zX*4`u*IFltMq8ct6M zkI2wzvk2&o*lmvqt0y5dExb9)FEHlvp6@XPiZ1WfYR~pNMS5nf=J)AL^N!691$4lJ z>uN*;w6|ApoY=3RfVMj$_0~{8LYM&toKM+v=uPbDBQ1RbMt##7~-TpXVA z*PBO8_n@Ob%VD8DZB1rUweG{%T}ik_1s>pFt_hm153g0Fm8oMPHF?ukN;joEHs5=X z8%^+^bXaZbhd}`qRo?MUyBd}%+6dFQxNg(fdx^9PDJv{H$OFRwjb0OuV%DATfrzL> zPBP*Rqu$y4uFhnrU`U{ZXw%?ydWj8}Y+wJ~LVTU&n1MIeRkPi=>o|h+^Z}Wa;porT zJKu3b#`Oev65;BB5V`=oTs`9z67U$0kzep>Ks=lXI@J>82sOLFphjaY9?-OSVw}_YG3$X46zdsvLWj4Et5B8Qy{&!T zG$=+?!`Qizv`@Gk4>=OU7^om!&NwTa_ll>d*NqQyp1iW`6&Hh73~NprD>1A(BTcai zMU!GRijUY~;@IYA#H+miQo#v28aa#b`T73$_k)gsFLDHJPV_G*0L_UetH5dLA7}^u z!`bnt=7dL5|6fopG;0cUOsnqDpjR|h@r0srP*L(8&)+fb19B9Smy%EMi%U%;N2ZFH7e>p%yH3~@ z;34cvr8Q~qgkAg^`IUQwUBW>!TYjws`@_9bA5-b9Jwxs#l(MKL_x#(}QiejFk@u14 zWbmLbKij3NhG`BSq%udJrUKC>X2$wE(MQxN<_yFUA(l^K(MPA&$b2C`GqN8lhyy8k zx3!TI(#gAPs7%ZG{T3tlxDihFSicNjeq7U~$R4ZwL;wyQxiAg9~Uk zo)z$0frvx$0fnzpLw{G1!GHenpTClPC~0lU=sx+-K>hS?(m`?fszY1mVgwGYh3#_v z$Ey|4a*v1`5QtN~H~)YV=Oeu)KLoc?kCT%RV$DAJptsnYG)`kvfjbtMv)8#~AMegW zs9bYC!Nsh?@xlZ0tI0sX?6Vn&plc2jmfq;TK^6k^xv~(-9i?6BbW2|%uH=JP$Gv4x zF`_x)og$+|mqdhaPBhwX{e${(yx2kSHtx-ch8|J|LOnuJJZJ$`?pF$>%Roe`i1i*` zC<7rHnsJ6FF$URU6(Q*&Zw|+ns zIQ77SID?jYh;b4638{zo@+Rym&MmKbDwnqJ7_7^|q-`nx&xGQs8kSScjX_zyCJccp zB`@mhWT^TmY)n! z#U7k{f0W@g(U^+iN~dY-zLW!C4^%~r@PaNg_W-H{H)Xf*#mq##nCGQ1YH@)R@hp36 ztDQ#ljO?g#TeCxCZST$PK7l-8_>ItpTo9 zyg&RKOJJ||B#=}cGC#Rs{=TR{_d-a>xSqWRB;Yt`pD?C(;T3K_y06A-=^IKqXK*-v zhMMkiIMsNqQwuEKXk(qC3t)fe#m?3Nlcd?*=AMg!HeYPLeNh+uym}K+w!ilFV0Vwg zCBOj^Ln`50T?!Jptw?v8*msc}5!($g%<=Y zyDzWvar2uC=tvT@ucA40z#l0ul%ZIfm|4OyP!a1D1?o1;wkDU8_xAEKcS}Ryect9* zl!nG!*nJYO67daesym^RO9Sb_!WruMz%R^q$38MW(UUe;S-qh_aZtc(!Dl!GE>AN1 zAU=s7`j>y;m-dInRe24!636Z=2<4P`w?j)?L|9ACj_k|K>TM7Z_0=Q~tfa*Rq?SZ` zKR==393k`wJfU`cZcr}-$HLmU~FC_HCPsrQG5AJxBhkwk|fAn{r7(K@wSBUPFQ1ix+I2~T$g z0|%0xgH|hYC6p${=&Ep}IrwGW#+v2<-qC0na0K!)0-7!VHvGIG4)9qB_TbkOUK~@# zsU84T0ffZ+vqS7exYdA6c8o3#a(aOiN*I)gBU<-_jSumAQ4=Mk4O##2N1ee-Ne)Gi z^q8q>b6NG;teqb{wNqwYuO$S4P`p0O{6=KMNHO5sKJ+xS-d}eAu-z&IGdYfR^0*{s zl+;u{rzu$9R}EJRb98{Hpac8tis`_FaPT65fV9?ZKP(Fex+K?Fp%`P#&s)&X z%?@7XhT8x|HUn$^ZoD~65?J^2@Dt}NA=l=SP%!dx(o)$QBnQiF-KO1S!EJwGGUUeUvjnQ`RP_>z2FeZ!d3slnzG_SoYz-b~CzAhQ z(#g^yqrB3S+Sb)qZg%JRRlNao`WDLZlp75gx5&{=admP6L5Fmh>*$sdf6dZ)&I8-L zzTuIuHV>DBrZgLbOqZ-Zl_8b!T>fH4=NkgM{csu+@DRBkhlkHB_vD-oYpP7pVhp%M zr1;Mjv#s4Rp-E(%ReMP-J$lEQJoz1Ku7t^V%=Y-@O6^)sFB7?%uo0H7 z;jp&J1@aKM*b9wD|0)Ufx5F|J&uZKT@_`QHmZMnB1o%c#KFE6Bc>{mTk-X{gy!r}X z*2qkLO}tpjK32fM38|`d6!LlxwaJBuEG@6Y&LJYNza}Co3mwY3=c@!1l?6g8l@mGT zf!P}u$X{Gq^>sXyzx}$zU?#F839kW0&l#?I3#Baa8r^Hw7@qgF7rB#-PNHv~9n0m# zQ`PCexq5g3ob8gneZ;zsGW`9m!;7QOXiA%oHc0%Hh zm_hEa#`btDO0|I5&oUasr`xV(Ur&^xw_`SVQNPMK7&zUBtPxa)oJT1Y1s@zWH^W0o zDV-P!nBhByCORV1-`3;PwZu74k-v!VuMqyV=1I-V>((%xzxfh}tzlVq#zNOQaD~=( zT+2ah?x~LRLe8|Hu3%XMywG*kwO6s4>EZRoIiG@f|GA^NB*#9!XSyWmoI-Mx%E|nG zEx<*$FhO4N))MFT4jJ4{Che&DSMc{M8|4=FZcEHLlmhZhjEftU4Mz|TDc4+cRfVXP zy9)-tRkAEF8%^~osfmqT#!}@0g|84btNNg$KPSF&cUHpqK>X&x|9-%OW)kSRIxI+m z18V<+PRjl1m?7f2ORw~9#~cr|J&~umYy3UN&pn(oy7=IK`$*9BAE!@lf4TJ#xhP`r z6FT~Y=}3)$VTe#GzjHeQ6?omq5=tk;_iQ?wrBt60x`P85mamEVif;^BwTbyVgZN6# z8g$TX04++k@`?*Hq`tZnL4t#Tre8UujB3LOD%Njqr0~A*LlxvvHY4z`%s79A#$KK~ z$-#f}5snB^Rdl(lsG-I0CP>J%C^aENt@} z?&h;$uCzAyNbVrFfx7rBOrrcWLD|YC{hqyC{`K_g>iDnm(<8OE{ruOkmy)YyIq#|Q zTKmkwgd>oWT*doHD1HDM$aI9fKw9U0Sd0840JAW6ihF{(2ZmfQ7L5` zW;wWdU>r$Z8Co5|oV)nLJ9_r)O--rK0y7;0Zx^i{OAtt)@pWx<7OyO<N%K{ZDqK{cjQ%T1h$l4#3+KUth)d&t2A-gaIN=Bu z@T~8I`|r#*1jSl<6Y+;+D=KZ4^t3Ukyv> zUrzNbo(cjTaV=TYY=pBcSjy|Yj%1fSN93KLK|H4jbRAd6t7^5u52R%{4=OAWDH`>g zySs0R%0XxmD6tPmh^QnB8T;jQ$-lNkWy)6p62s**?Jf?0x3L82kj`gCEN0pEg#KN9+zo8wK3i77Jj^O(~2HS`X zmidsuoO7Ab(a+o>C4QT5Ga=EKoY^#Ud=!Na@Fp8EHp$Ht3y0Bh@!6Jlrx4zC6>v;u z)t((3?ELVW&)61R{d7xUAQ87{w(sebd2sxkB?0L88my#JF!y8yz#(I~t-)NFJ2cpr zk*!yVjO%I)CSVLvT#DXi%9QnyC>f?OuSHy|)D})wb#I5wq6=#H)PRp@I#OJPaK;V7 z>u`;t{#li$i@SXQoyrS`5Tv$RzpPdo{icLMct066WANobWDg8DdJ$%1_wmG}?j=$u z6~v2jOADN#r(uyK&Bw;W#K3lpEN!7>iBwQ;a>ac<(!Px0z!&@CflwqJ@Cmendjcht z`p8`&P*PhB4^kaLB;0PHgb-NVWZ5*B4a`bP*nYV<4$|<_wuRt>%#!oVTDl{IkQJ69 zP{KM-^1geSMYJX=PB7P5*#{%w%Zx7%!u!pbVeo^!o){g+dd#_^4RSK;vTHZ(K$;KK zMGK~3ie%ZJ!wcnoi6x+?=9ie*oB#xoZE255;RxmkLi;2c8V9ACrhux@&^y_^JaJD; zi?v+^EUQ|B6WD~t8glaymy^$48Zul%=Ny%4A2{Nu{?K64B0C4;bK;&cnqJBi1XEE^ z8S_$W`qnO3v7V#D?B*#BumQ$HxGT@AUbIowk2EN>w_^ae48!+yo@y!2_Q?v!;$lqc z_;$6c)`!xJtohDruu%!DfoZjQysFS>`Vg%jV$)-q#WblCN#5wm!x*2+J# zeKD{yv)$T)a8|9)bZf(JkVerWIk1fv)UzTk)mMoBil4hKBT+*v67%s$N*-P(qYNy6 zUUtKkFfb;E?fAuuT6cLhTm9g%GQ@9UIv(5DN@?&4ZTPA}PN!ldHKRSCvn`zPh0a~8 zJ|BOAZzwRQ6p{x?6%cfk$mm3n71^hUnXaVi=@ zv9^6S{I=F`!yr$lrVl4)yxv%owD2)tNrsK{d7Ub}Iyt=`W1Nw;>wSDu*!5QLb zce7w4j_(6LZzL>0&vX=YhMhB3il@T}Dw~4frrqB>CP7}OKQG;ymmy0ryJ#*xI|v(( zOputRi)70!l9GT+TM=}5=&UGi#UcBzsPZ!J$Z>LKq*+=} zMCt<(>RqgKI>Ps6zwr!7by=(BwGH_La_$w61`?J|lGsRPGVSXrtRkFwl+%ctsbB@f z5}|EZx#V|{^ZS;B*Ox$D?$Vqxx3U1}Q4SEC^4B+eT>R3wMHCEfu@`zT!#HUtrSJ#< zWr-0?Diti^iHjoc*31(I*n4yQ^$v5bEaPb#yBPWwX8j;J)xi!;iH#i?GG0(cN>gnu z;uO{;Wv_e$$zc6R4^Tc%j%E^}Py;{%xt5vqx*M}LzYu+BzgJtjR24Q_1ztG(MK#z$ zt}~*&2Ps(jW^Hj6Dd1-?+-w!fMpmJ0QFgL_u)FypaNDg{uik9$?p4vrPIxN&Kkgsw zykvX(Z=a6qPZlsWu0L6+@j-$3ZwT>+pj*U|^e|8#;Q5JLR}XKc?dUglbh-cK=9V%f zH1huEVPfaPH|q*0_1pvKY0UGP;Bk31AFU=YNm@s_v8z-#8s+ZMl;L4U-qo)ENXh#N zV&M!H@N77|kT~fBD)8F~-#klQ6MfUpS;KobJcsgfYRzofLhs1V(fW)2KY2<4_oF9#}NiqKm!&T>Nn1^`RoVsT#g!sz$Jn!8Y-C08?I2>(l2*k zMMNy6PS}U?JEuBo)}kI=eO7OA`SPS`P96_=AwJF8Ceme6%%|VR%ZRQy{F^@XV{d=eiJwujRy*H#=LeUcTG`N!a%K zY%XuEPKu#*(DHk|hl{*)LK!W*Gc8=6irI^`ExShg`sycL9cGCUntsi^G(MC|7I^-X z8^`hxombpX8u3Y^9@L)Mos&~k-#9mp$a;SJ5aWl1z_k%Z_@}M?7rRdb;&{xj5CzdO zt}FAfl%I3~*2}}|4+t3$z~N7*cIKPwDeH?WNahg-SGtksgqfLuwC(F)Dk>P=rU;eq zzC6GD;BRfn%+R%Zzz=IX`l<;vg-R@&p*VW2&hK>o?UO$~;XnIWUUCN?6b3TN^*w1O z&UE5AmQsT+C8s7_Z*yP;1MP+w<9SI;=s(tbmFK*p_rm|yyR8L1*~iWz$}=2g9cLX< z?J7vFEDEb+m?fJIVOPNb4eihi?Gt_l&XmP;ijI#$V{6A(_$aI7$fI0v`V%kVMlbP{ zIgNoYz#+Gve*5jWa%PwTae8xd^yKpJ=J3gB_+9TQAK`+zQdW9YZeMrVTz()mJ2xRW z%i<0oHf?B$J7}llY0zjG+iv!%jA8QTNj(p8#%adB6IGK1VAY35M+UOweTMTnd~f6; zuo@#mDVRc*ctC1@9bYDaE9t_&DF9-J6#RKG{VQN0<9oeipNDXx5q?I<17l+^3fMoP zc)cXK$;xduGsdI&M4XSXZZ=E}ve9A(>w2H$g8b6am#6Y{f;XWIY{o1lqYK_snkO$TKCW$w{06c(P2R&L z4ywUW>Nvs$=K@=N&`!B{S~=8A%4NL7N3IW%#1K{u!O=;(w{@;q1Csf6>ly0Sby?_) zskW-)MO<%gpHU6Cb>BYj`xDWWidIW z>N8_n-`9B^6(LmCCF3%(EjlEDTUsbFclZTp+vKh$T7p{caiG%v!)0efK}@YsS$_Rj0aB45lR!r(Qxcl$|bm0hjLY&Nozyzxh1 z5RBzLRuVlnwvvK;W~^l32NW|SP)*A=PQ^=rU`xtYSq7vc@RJXvZERh|=0Y4&PgyGJ5}bC_OTIqY<~5ETyE z@!tnj5SHI)26o!F?VMkvtB!(_-*?2i@xydB$ohy4Y|FlgKjO5XH34t7M}aPCVG#Ec z&UoTC;fYTNL!=gt#bLB@qQUTRltD%GtG`$AS2O^)$pR zeJ;a_%Qi&K@(014C+ia1;Tzm%E|%I=z1< z1JHv@ZV3&}lP-IZ_p%0hu{q(F(tTqlYmAhKgHgS6IE5ikIaw)h9HKz-%FF7KKV}hX zs=yzdo3z^<2Z-}QEq~4l3O0_E4V!!1w$}N-mI7E+n982-hKvFc;+%MM=Tiwga$8n* z*_6z3Qp2-5LWhKjomZIR5-K6SV`2~A=~`XgLoInRXWd+>sMWVXB}1+Xwm%Xad7eo$JdsZk=6MUjZYxWgdOI-lh>ciB&ja!*A(PtaS`)Ib zHWR{Y3|K$Lr?K}znGxUDz`vD+RaVP3L@jFs;Nn;mW}Xep`Edw(dVToOQV<=XY!If1 zi`4q18>2kwUF+0^)K>kg?*0_7_ z6C+-)YGcV~HiC-xso1@7 z^OtK?lYH@?zgz>t@^}7J{mC!5b6i0A=!*utTpp?Z-HSABwwI~#!dGqP&Avev{yW_!tk0$Cm zV-;ZhQ4@S(6H=EOcA$7Kwt%-j+a0R!`KOzuBsTUae&BC17$-!1a`o*9F`!y3&W}$C zB)9nG$Z!u%vYJ9*x{T*1{N-k<{5Eo-g>b2es}r1dy}>9o--_2~=S&VHf$#0-^g1d^ z$i^;X6$MMw>@s4r2l?;aM8}?}oROax0f~feF@pBd##sN@0l@8;6TdAkFSd#1&kq{I z{X#tP2{vyC^zJJ5T0+fOx?LKSG*&5RbKLJJhq0&MhDHko{eJlIH6t2^ zUH$(>Kf32sb9fK^q&Ia^9sQP;R*>n)gfih_(FOl*1aaD7>x>bz7hJeaZXfKw3)_Tp z#0}Y*`c!e=2Fz~$fc3t=V`J+7az;AS% zF*Z}_hy(sLo!{nDn-AxVBnfle+<*Jh0Eg$sj~yp#alDQ!&auLgS0wWtM@K1<0!eyW z;uhU*`n%>1q!ozIswZE~@~UiDRA0O|7@gNtoyu<>Z-gHVPzugu+)|5HQqE4OMBK-5 zNbqG>2?i!Us_ZChwBM>aIQH#tpU2m{o*}W{Y2Ii%_m(5uY!$1fDfwc&KtyzeKic-l z!|b0?R>EK%t}?8!VL-0UK%L0LOSs#;=gMdjO9B@H1_I4_aJ&JYDTob`2EX|b@WIic zfWy3qR2Q$cIj7MZmjbF;B9@kv-L-D)r`j_l{w}m1&!jR^bh8S$*^>pUD`kim*gg$S1(_` z*dcFu0M}qjS<#}yYH>Jx#L5T$S1;(mHzJ}ohNs7Zm>?UOxhppc24jY#wGjXio;dT6 zN6T%+c^6!x7hw{PZa)M1%`&QviZ_x+5G*$FOgVi4_-eee@xp#47}D~)3*%#=3NA>p zoaosDA=TZ*x6XV_hLPBz26mvIeW&TN920;wEQh@G`)H(!2jU&tY!0k=BJNstanKk=-16_y@0s@ETIT>qKQ z1fY3r3@oXm6V|rjv_uha zZ7o#36Yx#rM^~j^|5bVIOwKT&4O3K7qj}6M86qNI<%-I~c;305+gYuY?Sx$eAve?kvMrw{k|0h{ z0app>tkkUnxO2n!2wn^fp;b_Wz_e_~R}Cy3D^AT4=oP0=x9Lsv1(t$NPHX+KcQiUp zmM$JBWhw{R&Ks9wI~?Gu!*BtoR1ChxKF&t&9P-yI02y+$Gz&uTGZHO52%$Mti;GVf z|17_&|E)BvP9w5a z!4{3>XA(28*2ue(_D8gO4dR-B8~j$`XZnRBS3Q<$DKtx78P#-y({|&N5Ie?5s<@#w ziVGuzDb9llb@26O$1hX?j1Ey<=N4py%L=m4X4n9LEh0^~(y}^L4!B8SY|MHS&${Mf zI#s6%?M5bMQL5>^t~?Y>fKQ9zjr4*DUGuX4N!-8NiQ9I<`G zrr$?yfXL$H%aHXr@ihSGkLpASK`Z8wj%qf6dMU?41@!2nOnfj-3#}+o4Wzf+yAfA` zfG{T}J$@*)$W5`b5;7@vLGn!C713N77ms_A^M&*i9vfLC2C14WEiJVIZ*HrskkLNV zpw)Z1@%wN{f_s6cQZB@-ye({|*0{<{j4xxnEc-+cqzC0r&b&8J+gLJ*VcIF-P4eeKqoL*q$?<2+@9c_AzWO7J z<`Be_$8wbUfwAUDpNsUVPHYbc6pUrbMYJ2H6t^t7Xxl8Pn16BI*%jLx{`nIcf_M5X zd9YgE`$O<2lnGeWTdNt3a7`TH7(KjXN1gg=&k{(`z!O=cSI=`UB-#v11 zWIJ*>QW$6NWy1-XCX#NU>pJLIvi9$0H%^jNOq{h$v3)vimB+=vK!v*6>SGN}Ypa;$ zUsP&C9rQUdhhEUQA(602%qWuS`+lSd*bJbxDR}ka(b@55{%m%TBCKTvdGdCJ1=X?S&Ed|IVVBD!AFV8%+g!>8WFeIo6L%qpezP)ZQnH?TAl z73T{e5FL)xZz{S=KUP(__)Tt&48`fgfKr@?EU?mHcZN#1?DypJ1tj1(ghWsbBub$r zad1Rq$cc{Kj?YETJDP0hD*4P(eC@!|%sO%Xr#o^c9b}@R>uoJ406}Ap}))E<2C}uC^MVZK}290%kBT-N)?LJd+Av zx+4lJj6zNq!YVr>#_m)og=vQ}h@593w)xnGmj*0IiCO8srKmPY5@$x)p;(A`MvLTV zpzjPs+2~s+S-9>!dFQB%@)a{0gcy5ov}Me>Rg}bO+q5nEH3EazUy8;$d5w^RU6Q=Q zIh-TVI4wpmF4As}<1XLYq92~v0eO6wj`#~Qd7?+7uBq zWabg5mq=DJpJqXxu?c4?3v9X5J*ZBEBXTE#CO=(JAYG18p?5JBGCbAJ%!~PLwX3t1 zgB1-AVxXU(X{|_(LjZ0z18)zu1fudG{-mA*o4`6Jc8?z%AAkGttYg+CUSSlSk=JUXhq-@U-Anra;NhPa<~2fcBjb{s>|bgb+}1r7`MdTTY=~>M*M*+ zf5t5}KqUt@Gs^LjVXskMQT1nRw)mGiLR&Y$xlIPd-Q~3bAsL_ z4Qc!Kw-4UU*RUXYieIp`s(-k=JyS#D7lcICHw++u;UV`l0Iq+twmcjD^D|hv5C5q_ z&`3U7T!`NloNc~7*m=X=IK@?=0yq^X9IrBw!9uP1WNXl$v77`;=Pw078aW1a82Dezs2OylhWM;bduD?8F|RnQVq8=E+ew)`6*hyJzY+ zA9qXBPV!U4_V`?p2dkworb|3>Bf<{ zDZ{|}M<*QOz%bs)dhn67o+RS$u_P#hcyS&GoO%zt2(e}P2DR)*57)S3VX|R{_iux2H&NGWyg=Iu0f4Y}ZZsZ#w##74THdM)V>QhELia(>T2W z2i4Z#bSUhQr7XpFQerx^r6roam}fCkUSSCBIZM__JdcPw_yoAzeCoKDEe+575Zdu5 znKzWflCSy+Z)|@eZ%kUoR0E=D@mS~zbC4oIRwjXo4k!rC$K_$6w`N*`b? zgpiobqtZoj@|eow8pTFmI0JE4;5T$j!14Hg=JTa6Np?$e7cpS7WHC~>0 z8ovWr0c%CaQFdOiO0l9#PvAvl6n6B#!Vf4pq(5X7mpSH~5fPQour8%C1p4aS)iES( zhD#Qa;4A_7Le1g{hh~si2!8bt8em)C2{3n5xn4{e-`>d;6iehjzK8Z(Y)uhJRKyXQmNQAs{qqpZ$q^u8!w1H;F-fh3CxyBW0B8cZgG0{Mo!@3@s9#5AnEzI9!}Sb`^#AmCr@lt4@Yt#(2lSY1FSDWsJ~R>OO34WhRD>1cv&bq z^am3~M4nKjMn{|tm|wc#X{V#lb9(J7cC62HpoCPgjIau5ZTE|Hb3%+b_wDPg?}XvX zuQ$UjdV;0St`7*5&;u>gR^#wWr80qrM@w9rdyOJKg)abk(#)awh60{kyIoc^FAd&< z(8_hf|MhMujHWI+@>denMdnsYQ0sjbgnU?IRwxxNocIzghPpUDQcG>-0h5F%=qK1%s|tnt70Q$YRW|)O04b_{yDrAKKXPtla*nHW3CEI&M1u zfJAzlqqnIK9Ywi}oLy0wK&|gEmrS1kISDa=il1s34d!?O7^OGi^&2W^a z%FsU`G6wMn0vHA#-KEyzC@i0{bAxXg1(p2h9a%M+fcgK1SZ-PA1bN@`6Sp?^clP&q zS76GE^!u>7g6(w}Fc@y8J}Xx1P6c(4>kN&=S?E?NaS_+pq>IVxvf@9U(QMAi{L89w z*!nJ9_}-097N{rZg3NiViyKt9U{2qAMXJ(}FKCFiTc1XxNkbjY@BFZdz-}F|G(Wbv z6LYmuk7DPEEgF7mph|Pf~(%K_c)Ar@*?O7=1#SP7X3*T_- z(G)Lt<{UIlg6JDo%2y zQfZ{`09k_RzrFGn(;Mi+qvR)N~fDVIFeaI7ZNkbJqsZcFnRl!X3y!Uv)3;0i8 zL79&%d~q~{n@f5;vlfk^{B8El@}|xdbdg2;o|OYT(r<#wRt$Lcnb=O+EFf!>u~R9- z=FE<%va5H;xngZD{8uv13n*6~?V2am_M8~8q2C|&F2X-v-grbBR_W(Pud`woK_f`K zuqZ*!tdPWXyZ0q|NreEg2 z+a)UURG9D3(qWMde}|?Dr4evfe0MO;_`c;fxi*<)s-tF2o+XRxoN7LYV90V0P6ws& z4Xu9u$324c8Iy$_7F}ez`D=VNLvIlhl;hny9A(6$oOj+}m5;8rQv%@*FGWnYg~$>~ z|4l)1>eWTcf~aH^4#S}hiDR%>>YO#`MZlZnP_yyuCbPr1Y=hfkV)pA9M^TgK8}lv6 z>Z({KneQ&|#Q7k=5kDbEPU#KdyDEdp|2(S}PG28Tj->k83Am*1P^=*Sk!6GqH4-KgQ_xq_I& zEY9BG78>*8%8I8bM%7$&&6uG$XX@{`|2eM6W_Q(XI>O%K$$7M?{5os$)5YQC2jTLa z)WQ~RcP%z{5htYZ&6cqYDK|{33_g^$^O{qniJsVk*aLmtNuaEf@XR79{q%EFkO>U? z+`s(KI}Z{)?|yo^=|4|Z%fn4d z-7S?&vn@Tm(L`aZ)V1%T{+@}TrzDZUJufe9LW6vKXrSRrW#k# zKN8vAA#<|0;>*PDkXj3Zm=Tvxm0QtA1U#X1QF78&8etwMP)de%@Ff%!xdMopnNN(|?!H7k}vrXz3h@zMgcWWD3?N=i6Pjx7Y| zBb!-UM{i;>ohIz|?HHRWrEBhK5Y4wanRoM{OKMmLnN#=d4@~~eWKB1c8lO%ozlqdc z6%QO~v|Et1wCzcm#tN}Peskbn;G)f7!r}0ihr`LIav+9-lBJl@ta_eQVCL3-GZvMT#@7SaAN+<$UUWHuz#Y#GS^RTSxn{$S6WuXSsc@Ncl zNRaf?{P*Trz&HN>$AC?4G$=U3b&mS443>Pm^;ZP#A(wsqG>^)9Kfk}LCT0|!VhHXj zf4%#I96PJe_7^Z4vTHj(95ACn^$jNyKMXQ)~mOB2m0Xi z_BX!iPtRp!tY;D1@99$q&vtiSZ1YtvR%D$!ypEevo^HK*!Qb?2E^3LteYdmuI^J4g zt9*#^$~>T-hb$uvF;V(}vr4rss{~&~J~;@4no8&dDJYf9CBXoGAF`z0H?F!9Rb$DFVhr7IA97%>SA8I{or={?F~K z`MOV=AM@>f?%CiuXY+sl^UnWA+q-sGb!2I}-}x2ptT75X%UpB=iR`S?*oL&ao!|p< zUfOu11qdVzh!&7eYV?mk&-2b1YpuPd%hXNrZK{ypVkKY(c6s0Ei~vr#}X45V=>0g7|Yi- zV;=fUeQzhtMf~2^2fwecQGD=}PFOXCLq4u2cT*nglaKB`_}zE|l5}f4`t9!z9x$(h zz`yw*L;s=2apT@C}evRw5lY-x@ zPH=vc{^h+4a}i=g^*{i~MxcG(Y>fhxz*LUw(ELhhOnSefHfS-u{KFAo=V& ze&92xfB4nctfl6_0&7*H)!D0_;L8nvs>!^XCg@N3>(&kg(UM62V^jMiPs-`1>xRydH*g&Cl3YE%;vc6Jc@YED6!+|&#%hR$Xw}UkBUeTg4KFj1 zyb8Z`u0~`^#38lutN8Pl$+`H#(+Dhm245$HhS*j5C51R+&UM7?TCX%j+y~C8t0oQG zCGFkb)KkdEGBeC!D(P108nzvl8}-PlAl^@XZ6NPnl7^iR`Y!#Mf3D_fQ6 zfBMPd#(eKfFq1M~_2o*ozdn0O*GPNH>EV3)IeLXRZtm1GI^15v@zudW4Kg91?*CoV z70!sGXnAF&p6NGAxk_Hyx=bZ=Kuql0w=zA#8U(|mlHpa~&RhShZ|9kver7*6#SoY~ zJzsRMm$0*y>22TSI%kfDpV3~Xk8e%q*__|k@QmZ__2We3;S4iDfBSszroqqNb`3=o z!{3%e)nUEAp?0Lq=B@2S_1n8!wtu^S_~nE9AjuyTeP*Y;o1#|ao}E2E{sPGYQ264P z)8~{B8*XwWt*=j}u{rZd#JRnuct+_ulV8z2>xj@Ip;0NT$)`8I^Xl|MX9c9Aq$bb0 z@$n$)l{CG=-oW?OA(6v9t+?b=nwv|N4($q%Y^-?r^9?`Z32^CT-#NLW02X*>A)+Nk z#>J|RRT&1Z;PXjMjo2hqjC61B@5zyfYR(e0^2r+2YQ7;=PstT>T7#;X*iTjnWp>Xf zKBgk4x-_0uAkLqPNCh@9ClEK0lM6?_(5QXnYf(EL^vHQgF#EH^9keg8Ab?}avS08R zpIE8A7KW+`n4E?a4;>?!)}g2_U_08JR%-@!DqhD0gbP9l=Immv$Qu@{jTW@-12|5y zda~1z$rN?cymkEzQ%*ugfUB<}3t zu`xC0WUrTpJivljgqsHuM^E;hLOPbrWbp#L;CV(z5)~?b&()V=e_fk`(TNr+i&zFx z(vbQo0y1$CyRFUOzV6Z=8TXu5t}bH;kS5kwW|ONq`}}SoMIN(Y|2|I78~qQfJ5 zKCb|FF|$)EAmr|DO9BbD2{t!p7KonB{5vm0-1&H8XNxhraf01hB5@3bFt2ZNNoa_8 zDT%GaBoFhch=h{F@2Va}@QDEX6v#KA!oa)x%OC zsAHQh`<$pqOo-L$LUmzelVEjoZA5gzYIx1ycVwBJz>wbM3m9gwYBg!g94nNLs2fg} zRnKWd*Jey`^!(`QY2P-ZBwP|MZ*iD%JzVB9M072sXqmdG?SI_y*tL}6@9us{O7X*s z(?lBOpFtrQ{F$Ecq9XuT#N(BJ@!=^%TK2=(o9p%}({$~Nk)z~Ob4V?TGPq-}Qi>p7jg+n@0y5duuG z!?^b;ER$zP@tijDHC2dl?JLV8j=qRWqqI2zP(}U4EJ!qE0Zzb+z4R%W9j{R{!zl6+ z-i`p_RD745(nOnANjBtEZ2U4fs|n(uuM%LsVanw-XhEyyu8+<<9}DpOru7F%@~&Zm zlAQe4Ox{d}(I zbPQ^t)pqizXNg9<1}fnSNAuyl(E^yYn`;hitG}gh05r3g(`TjJ|1gfifBQYyZgg@* z22VD&dAha)m^8O$nxY?202v9UA4P6RHmxl`*Fe1(DyZ3f%aswt=U_!~mCf@y1Zz5joK`YMyGEc`=QQ$Soq}GVqcttykMY9p8BhO0KIA{MmxfKfw#SDZ zq!d5$E91Q3Mx6{`AM3;md;GB6D5cM0JUGU%)tVS%PM0I|1AVywCH zD;lb-n_AH{efzMLyDsaxo{F!U0&Nm`5>0rHo0i&WA)|(ittUmuf2&fm%O_eNFf*=? zw6LM7yrW5G=w{Lg>y)$Jo6StgHsIO-;sYjnI{NtG3=dIwhC)4KKV6SRXt`lfPej+q`ycs3mG}pUTlcAB zL8wTt8kRa79-8$GUZl%Y>D$z?Lv?c|yU+oymm1t%?{`r%gULXU!k%fb3H zezP0TE5@5l0uMe4qmKY~W}`SQ9N{QFN??*X>?IdPt)ajRob%<{ zvMhg^W+hw8Z`EgB;!RK?LwFc?DIqMPR4=S=xfKTi$CsFQai=P{@DB{C*DF)DcfjRUNKN>-E3FoWf57B% zE1sdk+CLZ^hqQp`tk=`00;;O#4I?cNqTLj91b~X13=FCq!pS_Lhr1R&ZTwkhm4Zfd z6g#M>NF$pPpvsJ%^mfFCk zs^=Qe4Ri!Z^xrKDp~f(9gHr5xU%xUjd70N{EA=xLzVXRH^YCv0yR}Sosmh;N3A;5y zn$rHLg0Mf@NHIp+`wvg%Sl!9S)f?-)&j4%tiK~WJ8~)P#bIYK2R7dNTMZ!?Om9kE3 z2S6EevpMN{=Tlm>sdlrerGZBrVu`hFfhlG2q7U;+@tjT$0 zHMUR-?Cg&ScHZ_wNFVX(6D6K0e0ChUXL?W_KArb=FvG${?5)y60Q)KM3;0HF4WS#G zg}6y2J}Q?!+qt$|?luvR1gvd~ux%|i%+W*J!DBsX=s5I9<~(A@Nh@=x1#;K7;KwwJ zZla^rr+ru_dpiZAm++O$kdwUA3`_78Rb8nvA6-*_@U|3v7tOW*<$gm8n?hWynCuxn zncQ{A-Gjp2(aH1GoB@OM!2!<}w*9|>DT`Cu30j#pdOX+)8w?d}B1_XzU|QhnzX z*E6L_{u_*YZD3rU**ZFPHq+JG%TB0B`zl|8mJ^jJDf--mY!Y>d7ea z_h-*-XPykQTR3qz%s5m<7m~1XT*Zu1j~-{AWJ~~#J9`M`<|c>dtDq%%*|AE=@Lv;f zFZ;{!&!#W$Y~I=N>&}dZfI1koc(#b$1Mu_kNx&m&qkte&Ek(bQ6ImBXI-r0(HH`B?3u zzRFaWG%5F?UxCW9)|A53+Plr$@urcPVUTMDMUbtVY2==*fe2js{f@vQT+_snnt8#z zw7*Xj-Ib6qE1@P{EF|APK81>cgw{cK4HXJB_G$9b>EK&s&PheFUt9E5VuUa?oD&!! zDKW;>2sdgM@?P{sJdwcL-(QFvwla*<)b`JWDZFn&lDK;IIoBOx)U$?v&gT&UUT@chKX2)L5d|^vvgKMc8O@6~^iF3JOQ6XL4;`wQ&T`w47x-R~1`@ zLw`=nI7=kVQ-1mzsIn@y|%e^eP{RHwVT^j>t4(tPVo;$n>Z>nhX<(J z25@-$;WTC2@I@);tf4AQUn6tO?mpkhD-whg7wYmoJ>w=V$S@Urqwe>qmQSy=Jl)$V zYYwTMDTVFoP{_ZJ&}S^T6>6rEd;B&Yvu+#XCz1WlvF<C#3Cn>Tc&iQ>Tt#(W-!-OOALBLmHJ7~hQ1hx`QkZ5hC0*~K7h59C$58*m zbZ`7`4Yu5xP^I)XMPxbl;K?F~+obk|lytG_J~;5Fjen}<)~aQ*Hjw2Pg#j09^u}p$ zcNmFTAgL<5r*pZWiI>i)WISh>Kf5-reN!>~Q&#eKUxVk}7~UJrtp`=cB1{G>WQ313 zTo1qeulMMR;!gDSZN4?n9*;i~%IuC%h9a|LNwGHk zh#|%G3}9+(sn#XLEdUkQ`3P5!0>z47h8NCK+R@@l3&oW)6-1si)C}mIHl*HA76l4S z?n{Hc)xHc=9uC690;CCb*dm-UQZSJqvva{5m&hcn3Szex-3*lP?qgs?i_v}FV`OQk zsR{Vi_O)GFr(D_K=4>hiuI>MdwJ;4^SYQacyN{kaM-6lU%H6CAhr;`c27C=!yRxw@ zG4hc?UX{)88J&-fCiZwqEvg`<=Ek-%e)2RoD!}VXu<+sJFq?PH8Wp zOihEw1Du$lW~bS=o=3qb)By{e){(d2Geb0;$&6cDEC$WDQ3=J4MhuHw%lfOT)!4)z z+4l;D;gaNNe^WEvPnaVF4+0OLEE#IB5wGm)+uZ`5MPo&?Owq-dKOr-HVxIS&A0o{` z6~?GD_!ifn@Pmz53tG{(ZVxpxB=Cb3CLFt&*aw{Sm}X~nmxIAv3(mCFGq_h?n#-w7 z!|S7W4Qbx3KzEMyE7Z5QXs9s4k~D{7b0X$rmN?+7-sx6p)NCcDY<7dNR4Kbk6z}FL}Q55+>tU*z<`6*odL~dYmZV){msV&X(zeF)jGNb(ct6>Fa#>M$I-hO;j8|q(59!~+R#?MDw zbSz9i?mWAAP<-dJy_@Ty;tt{CYN*IT@tyzhs*Z~-*>O*~LU}Ea2=mGz(9e;vosDwRd|odX`V;|=U$Gj>hv$G2&Os|UK$H8I&n zwK@3LJJT?q8_JHf=f0L~Rfde%ULKw-c=|**fBpRkT{{FfcqW$O#QGsJivJz*;?x zC?Ftt(7T1w-z{hTDCXcsjk@u*Gud$_aY|pGK0EzD==BQQR8T)iS{WH57LDuBf z0LMB7d1Wp7;j#T$D!(t(Yj%Za2Q}jAuyJqb3E@za3xhwOS>V=FCXs0j!|LrMfzfzm zC`+bz+a%MppyZauk|;7V^LB_vten%t-3wZdhx?{mxon&jW)jmH2oeX)%KGysWxxy3 z!}o8F$&zAyld^L|0i2+nTY*S=1iIZc_1@qmnO$`~;=nNUD~4EL>H|_&)V;OV>7>dUncR zQk>BlqH$p_=iwD}WVB*IFjU)^@Y#&0jl$37!{KAcHjhLfOXJ+ISx5H-g*fC5dpTr; z3z5>tf^ApLO^M?sKhz_M(X}&3z?*T3X(9bZNAsENqOVa!joM4)S1GUlLv9*g^*9#A z3JE4;$$|daFslh8cVNNb&;Ivs8fTcC@WtFRd&m9I$%;=}QmQu^M3te6QR zZ||hF+U)j6jOMCSU={RZri;pLf07D9Bm%DBWOxhQit?I>NzxuFvUs+4n-+CeK`@h6 zw&@GYoLp})H#^GCc-PGKuALjF;k64D>!#U!rBlFUaxa#3>g1(RbzKvt}IC3 zn)rQmYnClnjQ!yqv^gTX!(46==u_!;TplVIMfvz|Qi4n);*i{hJRcRqTe`c=db`T$f*aHHg zl;R1YgvmxOeZ(mUZwPk&}TNiNz#ajHUeDNdEi`vx%pKScZrQRlEUcom7rP+@nggpj>K}VjSy*xj9Lwq0r zL5NFeWZ5ZnAjIcn*QInwoE)&V(r>YZ+4lvj%jrElv>3_W< zgp-u0;@B#7WZ~fySM{4PBzQMf&bPCZ)`0SVlKQoaA>=I&KwZjEGB(X`KLU9(WL{TP zsWS-@1OsnX2RD%oodY?Opk65a4V^DM1V^c&{#cFerfQP0vL{w)}lsNMy(H!KnUqB zYNiPDCF3Bt7OIyfeU1OGLFXH%PZLTs95S2>)KHTj3Tb=f==Ru71OcLu<(C$2FV-Ir8N8bugt`l7sN5ma3n%5(L=8kk zkcrXDW!D5)EKnmdv4Wq}Nd$M+N0fQxvhT_n4+5tcdeE3<;=LWe7WkSH)5}K8gXH2t zwQr`oo}Hg2dN3)kSJnaJz(}VfF8GBhCAJ`lNVX9+$eRq${22JeO?qMMlfU@1aeKE? z%vV56<_2@OKH~$P!h`&Gq{0i5GrR@PJ^UP{%!a?m!%zkbFXMP6a0W{(kx+T zinJT3zuy1;!B>Yg*df^MtaF#L$-Q9oT(F29g0y{n>~32QeX~>EQ-F<|@ty|P36_iGGNs`P z6}_5fB?52Pcn5V($~wu@*}A1QEskg|=c}5nv;hPq5LAwI#(CmpO?K$_eE``maVDMCf3pZOX~UOIVD_bSjbR_hsx-U&4hbr$|ZM55#-O zn-caLKn2Mq%{UNPCGIcDkVY1f!BmNOq-44lbC zDZ3iu%=|u$$ZYDOgGnPK#F%tJlnA<{T<_sIPX2Z&)kN?yXzo+|A_d<8)qE($5acSmoH!dTBt zjPDCSVLChHLq2W%?qg1e#w#irVT__-MG7Eqd$_ZCdFwv&Os0Gw=OW~{Nr8cP!|YwB&rHC+hkyP2HS+S;Q_8%6Ao^zS zIYx};6(2;&(6d3$n_YUv3j4Jr8F&k-l2>Shu*7rTp>NlYsKCX6zB*Pa28+s>01Nm- zS7UHMX~MU0*3mO8U>BUZZ}Tn}zPyXNM+4a$mUt!Wk1D3kf-Z03Eh`4nTVXBU8vK-$ zT50U)zZV+^kM7=QTIDIodW|LGjnB21!_aQ%+;!EEtqu{$BMC#%IK<7-DZ$NAyc7V45L*|Nfe@|WZ149b!e=-LFDUKTN!gnHD) ztX*1-us9it93=K2OZSv7n>C!5arTR@x@z4-S>rb0rrH1#%br$>9Hm6+IUH3t$JS)= zdgF{SwNk+BCtowr4u}`?UQK4UxzLfx!9-Mx>8>`fEVRrjKnK8O%KdIx-LO8^yId^w z+(!@sh%r_>nUB_(>W{S)R$r6B5ayP`Dv-?@jHGzcpHV=y{+EL#Vlhko;t?7mUAPG= zUkfT};&7;;GE?`$%1SsN$Q$IRcV`LilM9CoyNP+VDS-t-tv$&_Uq{V&x${!C_`i+0!I{} zZ3!;F;WhCqj_L8yo1PAx4=;m6G99V}=jj;YE{$jNLdK>9raiCFpEsWn+o&y;a)qZK z@A(9+kfCdRky6oLG2RN`;lY&do>oMtWI)u9`3zSf6v?S^#bKvT+=h7*xd>HN2wJZ2 zkx{(Nnk%FF5XL%`hGe>i(rj7|!hcQNS~#b$hQjbE9CrGQ2cDn4|GDv{Z3`Mi5X8U_mSI1&8#F@K&E*D6;$$FqM{P>DOz^Pt)M zCG&V#2!FB?nZwY6u4=ivh{o7ZJnZ=m%u{_l_0Giau1VMA^lV58dE}Mn-Y1Oss}#kJ zhDI!+57H>zltcf0#!LNYU}~#qs?Wu`GOAw5Di~RmD;N~>gYNc;wtkM=o?D|e-_*er zJtn&#lowN#IpuLqXS8L80jPI85%ZZ@${x-Pq1RVY*>Ji-w6x}UoTcD5&9FSvX(zu} zVmFDE3#{1};e-S$#U9{SRZp?#C<6)ruN_13S5mlr4_w*upFUDe6X_U~4YiqiT(;ZX$bu&donH%kzEA+3&clj%7Xk6Wqt#$);EAN7Kk2Sq|sNVnno^^W# za9V3lu2wA=`Hnj(7rf&^!}0}WGD4CggIz zA^0tzT9Agn%8!a@dvP8NRI7j2ZHx)(+cUyRc*PTy!Y>$pfH!A!-69)csxB(F8_lpe zOZ@8gW%$+JXL~#Au^OL|p;^PP_CDXdMbW@T{A!Qa1iz{_()Ye@nCjr$du(V|KtBHS zgO+;w>n?yRNtwDeE>AQ(wb24*rvsb8#UOH6y~fFD!Nnu^e<&u<4PsF}ZrHm39?vI6C8FjGs%n+?VS-V))9?%nNbJ|ad|Vi)Tm3!Tsz{O8r`$B6n={kQ5$AIOy+sA@v2%ypdq9Qsxr>&fK0c)RA(4XF znXl^cxM_&@yN~BFS7$kwx;k?}lxncL$`Mt5BafWDmhK4mmniF&Z9XQTEzWsybb5{+ z$B|87$)f%TF+^Gab0=MP7M#0;ayl2Y2*)lZs;-10AC3_X=z}u4MoCk|z!bdtf|r8O z@D2STJ2|2Y+mkppgPW9+I$YW4OgY{_4rk|9!MF`2B_S9(IxVEF?+)Hhr}8JzWYbMgNr0zZm0Y0+!5r4Eu{z2LEz#JN9~ zK3nH;^xDe^KAgNMonC36bE~7u{21Q3i*?2**EssOO|B84{IQyEv*QT>(R9>92i8RZ zG=13rzn-4q%IXaR_l4zfG-A*fh(_&gu*zyw`lStqj=|Nz-A#jJA;pS%vwjuEA-=Js?TE+t~R{K$lj#I7rq6aEEgX17r3pXy< ze7WNYZ>-=7_)}gK2c=S~IYAHJg*;C$;MsC^$~g)O-zODchTs9GlKZs3UVANGL(tP3 ziT#QS$~*vm5)AtEI z9CPmW17P;EjjbQiK*gb{T%2S)KA}v4pYV2?;~>##CK+xv25o6a?)8m6)vwq6Cz*~& zoqNuGGs4Xv8O?N5Mp)>=GRiJkMu}ZW7t|rY5nrp(>XFmcL-c%nW!zo?X>w+b3o9NR za%a~71?xHszF)0J>E9)^Oh-?veC#rP3Dekas+C`nVpIpcSDP%_P{9t}hss)-mv5J) zRmoAvB1&U5eQHvL-QwO3meBcGKzrclYPS##TnyQM^1_i$ zv>k7HK&^v|!k9>B&9ebiaaE@CrW79aT9?p>9#k(ryt{MbhE2hqeY*bg{flSU-yXd` zy8e7 zsGh3ThQHc2}Qo{ITr*@zdhs3*>0ApGiQL@$b@L+a9@V z;0tvJSG{TNGHzgrO#~1`iEx7(JI^?;HCBI>#sg&}MI7;cPOXLHsa34Ld zK4HqO+nx`rlSPQw69Q0Pq^%;77w_z)w9DK5_VKWFwP%QqBflj)A_TG9T4x~H?9S#T{AK>DG#EB9Opt^PfQ0wh zx4Bk=!)NeQKpJ^DIx;)N)0ruSc$_uQz7amaSMh37y;mj_ zoi~m_)XIB{a-e*L&%9D`8Ls@W{TsI9Ao)vrb#VW?JXaA+3ZGk%Ab4hz#e~KLP)wG6 z6dMi)an2S*^@JNsZZ^HTTmR0KIMK1+mdzSV^`Yd!uGVDqzA9Kp+c8XuANs!BYUF9) z7W}bnE7ybbijG9%ae$MJTz2CM!?h7wXFZ4GtxF&_v#Q#{U|T;UIIRF;bdB)=sYZ~3 zr9}_L<>j-BuE~#_b|7>q}9XsVS67oyzl#{~OH|^R9vp!_+xu?r6uuT6C2lxJn zM)V>Px9s+QGSFSrH${Q|ac$Q(?+|j_p|d)DIQ!?nzwf-(IJHA{euAiDx$OlZ7zxaiAmTA=7A_9EMixvO1E^y9u!rB2I!rHLIq=1P`|X^uCzBx(Fuxg2jdEhS6* zYoR7wr=G3v6HbIB^b836;JFEpPr1jeD4bRm@9~A7v&gO8TMYC!EBE~oNzR;b)_Z-K zTL&1%UL|S!mH;jUZ8h-LOaGzt=#M|Z)K%Z`h#JDQTJW-^_y6Pk!;_6a{rcBiu=~G= zEdQCGm(rLl^rT2dugaO91XQ(;lq>_eE3R%iDDcp-UtFiCMabFE{=S5hrBQG&5B^xmfid z$?#yP@4o3)zW-X?Gk0f6j$s@;!_tapzypROAriaBGZ?w}6eHBA2$9WW+vCTNy-(+c z&$!#iqi-?-1x^a}RXBk{n>IxLV|bwdV9z{XS6-e(pyN(LJN{hiyn8Ijr6QNh^mD$M zdYC|Ti+P@RyarE&}Cs4ReeT~-sZcF|NN7O}tLy~tN2)2=UIUu7Wxf5^UE8%d9X4F}k2LyC#* z5Vi_`0?aZSjH0x>o9;!W7AW@SJ?t~S2ENwWd34`}I3dU|#J5zdlq-`Tm_2j6Laisk z!RUw;ZZTg_YHw@PKQ8oMObwC40->1{ACoN6M$dim=O>^4cJqs^n>%}7?9BX{4qAg> z!@N3+D=KZmriP(~ssmYbzFQn*Wxl1Zb-g-6j!}?fCb^Fu9Aa8}&|OSWxy%%!8n5S+ zWqs3q92YKctt5H@ut!1yeVM6n;Sy7U@v8K1rQxVR348@jN*SME@PM}z*O|OUx&WsBzOSXT$31 zU=>Ol+gv~9-NHzrqBCf=+;g}!wyXyKkt%hP$!;x3)gw!94VZ%Dfb*HrLHtSvb%`kJ z;FZC(wUaJf_NaW?N)1M?Bniq#0oeIyz!~n?7p$Mg(Z4F#mWkPL$B9&6fu16KCMXt( zxRZ2N1vRa>#~w{5nCp!8rgl{~X=$q8gXWKjtcI4(I`Ag86^@;U52}iTUU8 zj|5bn(9QjI<*%p$-<@zf+qq$w4hz3AyG>mv6m{mVoQ>d9#VA)>e)d7GFH}#NiDoqegUO2^$ply_{PslRHn4I={f!a z%9!(;F8#C10rhFQx?wfC#@ih(FE+Bw9%j+RR(mlTm%7G*9UnIbRfX2`Myw})sNEeI z3G_xry4uveN&-`j@ML2re%o-FhYA_WJ)+sVX9QC|1GBtXW;(Og+4y88%4wf<#V(6y zVeV$G0$0yekcEU{!X?(u&15W|Z0s_lAQ^0Q&JRINhDuxevXIV>yn?K+{~3C}m{g;l zlA_j5;i>|Yd}V0C+XN0uHMxJNCOa~{*x253%s#ohS+~Q-^rLt5;=8L|Yv!g7R(Ji5%-lPL|0twz%Nj#EgmzBB|^vfw*~m z^Ms$%VV9x3nC-Q%d12{D{vEYHVrP7qgFBOLOwltz+#YlZ?wjX#CDTv;eD60GXDxK&Jtm-9B z3xXct_<=>c;~KGQR+zUT1+*6JH`VbHoD6?|?xF75W!L9D^*n4{MDfG1_jvbo(vXlt z1b=TnXT193hX>yC#PmMrpC9-#|GYkX=7(hH`S05we>iaBG0B*T<7f4!xBT-XglZrs z^OnQ@&b-^v2acR4SYXTl@%*?!Wo?2^>Fo7=a}uvZ*z+HM5T8H$W%aYCe0KWw@w;rq zGjh709fP2NGv~bpFOw3J9 z^TL#*Hw07P7Qv)fL(U^J)m=&$hW7`ca5?9x1gUTXrV2pQ>eV;Tt7AgXp;kSqEs6SG z67SMkmACJk$_iT!ZD>>W9`|)YXbfbLylc@?6Vz8Yc_PkR=)}n(0$GyR8=u~N{$Zmk zl7WxV$_u?~X0Fc6T6---YaToNYAWTyWw6CsdMnST30Yz|b(VVF46T?Q z!0CAhb&+8DezZ zTefKnm-BN6NpaX576*rOlsQD1h149NHaqg>_>PBg=~esuzo4_h^o(Wr+yv|Kjq8Rl z8P-Cg02RLnGO$fn2V*FV3K zp?7oQ%WZd5z<@l((O~ zC3$Ey(O(Hh3j+$#_BL-533aY`g=nl`PK=oTWJ*5AKW>C9;XdfKKtCc}r@|y<_FrgI z%yayldF*3$?6+Dy?TQH#B(SiaJuC^6!zn-4Zf@U9*M*T(74~B1VVk+Aw&Y%oM8o4w6lHL0Z!Z|Dvxt?JCsvtOc}9 zR+B$O>^i1FyV{2|In9h$4RqK&lbf|cg74<~;b~Hv$!m5U6MD)0Jgy{Vs?91FN%-tq z81c&Xtw8%x%Q0AXLyAqI>QR($dJ@BeBqX~3p~$S)~DJRJn5|H9#D5$mx7ld);>@e zje8^EpIEAby%^az4ZS6cN*>=|b_I&{9~NPnlOblb^gO4o&?(1+fG~HzqnY2)oOH7u z2ezMDgib?&-TBU;m-x}t!pOG_1(n!v!q+RuJ}^JbD1Dsm7$=NIw->Zr>EneGd=ZUk zO$LpDkItXXHBlO#0@&_Qq{nZzAK2NiqKHmoRL-vZ{*UlE{z49aDK||*pb75GfwH1Z z$Qo=3E$W>V=e%go8 z3YP==Or|@wn?2E%Tz`g}aQ)dyeqk5KfzVHxoA^NLAVdIgbW-n+dXlkyovS;nN+3s4K0dV%`~-`>k*I~;4BWM$`EpoZba zrenJJ9psC~Jc-~TPPL6lRZY>coW0Ty%y9cAX=Ht!j@ni7=oQ&Zbxvxl@w33*d8ky+ zU_#rOy#*7(p&2+^k$>8`Cos@|Z2plos;U@D}!AP+Gmn?@)nBb>(33Evvth zVqnf}W$_&o@!&K|W59ez`&F!XyY6@Q#quXo&+S7)@6&IJ{x<(rvK2 zH^IRXEX^7F82XNAjH5~VKz-PebGkwn=d?zh6s}+T>#58zc*hfs6*L=6CcK&;1WkEP zhvtfj5b)*3jpGl`ZpfyDx}co_izYaK4KOLv#zay z3*j7f;gyYF{mkV!{QcTD-+u?S|MNTQcV#t3`qy6}MtW|4?o|HAZc&Ok!y0#x>yE1o z7A!GPnMfovzP+C?=VP5ye%0y_kbu;Nmmx#ePxAiRNBjB%0FPo~grref;$P6NkkJ1A-m@6&bXttJSZ^ApE&3NoHI4ORj17OJQJo4ej5w;3NFIxH<@tC>EH~PP%zP*v{#+k?)kC^AvF!ud<$2Tof6uH!*&Z|Bk;81D8hWBm6=w4h6p;1^xEU#el;kaiqxz3h_P zd_C9KyJ(y|d};2axosPX_wSCM)lD$D+RQA&^V1hEOr3atmyf~|u&)YQvO^AB3x*`v zN}tYas)^Se458fYwxCo0?2p)Wd&E8cXoBVR?Ta`)Xhz40P`m;c`ShMki$ABQ8zI{5 zq!>McXyTSVFiqpvwIVZ+;CyL$ z!g%G8av&6lScgd$=ev5NZTgUYAe(AR#!j^H4X zCdUr#)_q?1HULk#vg^~?M`-mX>8jjzG(c%0qEo_nFA;=uHK?~YzhJVrsenr9}q|NYkvK8-h$oa(vFEi>bwMT7;xw*Pz%lnf44wc9%A)hN`Qc1iE zl}5Y}LnD>8?v%}Wci~15@EcgrZ2fz6MsOqJEUUE^WS1A{djn~y zRWOZXF6F~BVXkt}>Q6dOZPJT1ifEOfkY-;6F;huoz_A6K{4XZzv*&Mq<}bWsol~+? zeGt5!@pWtLbmId#VYhUXhVBT`vlAGFdEdT$n;HDQr?2$YiGK{QUGi!UF1qlad*L`4 zSwd~!U@FrIgR5XVGDgm$u2LL2xy-)mmjM(;{Uu(gPgPXY!lJ0pKNb1V%4$U6$HSD$ z9)aSvFWQIi$6IZoP>35USPfD-3uZqP;!>Rn;-zY-7_x6i{QJ~=M_}bDwzh2H1vSrp z(JLtq?#W-W34YDShjli{80Y8%m?w1-uL1I7Q6A3~OFP@B9sE8p+-?GIRmb_yu*EG= zOS~4GmU7anN+9}B_EQ~}Dvy@NGl-gA0#_UnDrbHrs?fvB$sp4N_~qVo^{b`U^-iM@ z>{mlq>!)d@581gKxX6Avw{y3!?})`mD>t35Cs(NL(3x?&bwU4&d5G)J&#sG__K*)P zSWQ>R;;a86^={`x5Ppi+B(ZtV5(B!6C3i4kb-m8}(D$9PJfQ5f&SWnP7iv=j_*~v8 z*84ym$CzVyv7J`fkHdb!k$ttDj6>*p=}I6GUCK=NARlL!Cg$&+g78i7*z@WRU^xcM z9Nw}1S7zR)=4)P5s$9^}1?|iSf=BYG8!>2RCIihGPOmwurHZncB%=o;?a!y1Q`l~c zoDwt-v#=I+LxkaWRlL-(w((}2Tm9^QfnD2cV3(}yvPi49ltaT4P+;zKQ1nCB%@JA9R4F|jG|hRI@{9EF7?&>>Tkdk*?y!q;2{_3>pl%#x8SM!>^Opav1nrs| z6pT`2lMM;CtoLJc+TYvME^6U9S@M@!^IuH1JlXhX&zdCfa<=jA1Cy=6ut(OyhEw(GL7^c=6Qi1XWa@_}==@;biBXdwGvhhy4Hr_EUM~C0re>#9 zTP9Z%UzhPP3n4VT{o)8nW8`Cmg!&Sa^RuVr)%U2UA%)8=z~ND1BK)Nzg|$j&@RjIjT*BraxBbFdgdCh@oay9j3xz~r zVjpc)tn$W#H@?Er!%Aw+yP7e|E3O2tQ(t3k0b^Ipt(^d5NNA(YkIJ5!e!4>JJdq?K zXRuX!P@QmR3Dtm7E~kb@O~!}!e=)neE|Cc@j+) zx|_m1Bi}YkM7<5T6pD;k7)hxc1d$TeE8to0;f0wAd3cz z0c~|p3*y51r~g=QU%Mi|_ZV)z(MMw{>#@+lOtgY3XAK_opL{MCgFd8M8&)aJkhcRQzT=KOQZRWXebTqD{4)5| zKY0Rt{Ar5|4tvV#I;N{zFgA2vgK|lC>{szisN7KeK5$#sl*GdKg;_-g>)%jC3Yfly zQM?=6T)!NRKCX9O)_|SveS7=sp(~%kH_On~MALRBn!ddI_+Gicrkv8W51$erP4?Z} zc9KasMQY=_g>6?0qIHyOUT;rH!t0XHWjwF21;?vr(^!-dYZ4_sfS2p)quc7#` zCT?@RmHns7RsPr=^y_8vQ{t6s0jt?%dbmCWKP-I=P0b0wqeIJA-i}F!Qvl$1I-+^! zm6c%|8~x7I`lt8TSZ^PCwKyy%CNh9IJLnN%N;2X-88*a3gSz0hq7Nrjyok9n(=&%f zWeVO<=IvT<_yeO;rk!$&X$f0q_nihal`vxofVFt9{ReOU^cz58(HA%t!K*dEog0Q? zM+kNS6f2Sn9z97v^PJ4qNM)9|4mpGEY6@u+3%R=;F!Wy!U7jw+jYMKdbR?82mcDY+ zm;Pm}ZhHJUAo)NWl)V?Y-&N*JMh3aj)4pFBpVGbBA1AG^V8+ zZe7?wZ&q+Hd=E8i()@Q_^;o1c2VW@OwQ|qhT;+Eyg-jy2 z0}0KE%Vx%(s6L2*{nXV={8B#p^NpW6rn>5}wNh?#Pyltuc=LfW_G&tB?-wlgOjLKT zV8Bj90e^QAU~%|1DJt%q_3+GpGF5)v_%LZA&dCZBcslUt#)Yr!=jwAGo-3X#ce=sS z76%FO)}QBu2t(lB+Lul2fAj&W!-eeP_SQ}&ciLXNy*CoKw$IKE)FB!~(Y9KX4;RI) zSG3Z%USpV0gBWPm7h|KT48kHWv@%Lw)>>hiR{Y7yAO|tA%#-99MA45`b#r9>^$|F^ zrjc~3){rf?)Qn~|8~=&7#4U~L$`|-z6z?2$48({jw};SYB;wuH%)-MkWIGxiFb{(S z>yYS;Uw{T;jyt(=azQ@%zI)oOm3_78f5;Q(znnsY%o1}o!kRX({3;AvZ#MRsaFh{9 zrF4`!6gfHTeLi{PJ#mpI3u1r(h}7bi=_nnapJ(nB3TBC?F@=aI#Hw1hQI?UFz*KY0 zRug0$ruWGN4_Cl*iX%{1ZWF{B+XQn2W+3&*cmESY7-vT(Q>VdWrP{MmNQyI*Fz5RR z2Oh;HY%nxFKLX3hi4{Ekv>1#vz@1d%U>-D_@tmBy)dN+%HIi*tI8`n6Gg;UJI);Nt zh-r*jg&qtFsCqwRuiw1$)D3CWl*C|p=ynF7DxB{ff+M({tB&QBg>@9UDbY@9SbZb0 zN^+n%(BK4LZuIhSuTlNH*VLsbI6w2Q(en8zOs{ziTlhuBS^DZwukPe&2P1L0jc7hu z#Y;hNRq^I%k^)VkPJ+v!^O#7u-ZD z`SG%w=N}<;nG*;$U8syxp^F$AAYQppf_H^|MBwbk*RE0|)F}@g2=Dub;{9APA@BQ+ z_;2IdA~HIo>d3!^u^eWl-6NpfVh08@kuwM4;o85jBpPm%oJ+Qybl;n)g0}+Cb}9BC zBVW{k^1q6*bp-L(>b!|ki1c8`Hq35i9nsU}1~2b7L3F&{WPVsG zOq_#a{MpDbFP=a)rj*<~i&pu{GlPQ%15<)Mwc|ug+_K4L#QGICg&Szrld}jZVKE-& zZ|V0#*pc%C!vsR>^z zF>??zY^TWY++r~fJivQjV-a+`B7a$VXx!y3XwWhWp&d8%a~C8m_NF1cVaVketw7|! z=n8&X-dY&th1S9#c(2$6;tn;VH&MsQ(iH3`bq-I*Z2ffozh9MDFV$;vqgvpMn^+SY z-@NtBTf$S)ZF&!LTkQ~v)zhUdRaYU0n{5J!FW&ka-X#`GHP`V*y8}lbKb+}<7{Jv5 z0P4`$79jyMiKs6ISx^a_tI95FAIs{6sRt{y?=j&0(#7Z*ucta_49~eKtnh7XFE_Zf zp|!UI+#Ln`2#mZEVrwm$iS(IgmhUz?tOEkpIp;*vXIuj1p-y>})mX+eUDso9Cn6nP z-5z!kuGd%ZI)9(Tm$RZGa3up@4rZ)eGi~z$+INyW7{A~Z8{6D+D=7$NhQVL)!*Wm# z_rWlCUQG9wKr&nPtqvI7#-@*JG=mb=#EX8cmP{#YL~TkP~?y%Kqa(}38clU2#XmadPEM^v>j z<8oCl0tl*cvdkeIzfF#f=@#DF(~my_kDr{q)@iEw)20h}XAPTImzKMw8`*}gntjya zH`>;9q%at*y@{b(q+*<|C&c28UvEp-dF11EO62;OKN}OZr(qfyY7fT68isRT^bMZl zTE7qHoLnP*J4q)hcxNz$rN4DOyjwg>;=IQ#6kx6w%Y}A6+rPPvx$c0&u41l$sXPCE z#R8ViBf`q!DyJDJM4r}Tb@zrL4?QDjHb2onN1&usXA0-H5ID_PwK;boP*NRqS z7@QFJy+l1qJx9sjB8FA`@4SNSFnF5Q4f%-YJ73E8VhB=AurF$eBv|3g>|!ov3uf4p zpe@?hO`FrWnBvL7EwIZgFEfn{uZ@&#ZeA%!HDr2;7 zzmKbPF6wfWV;BVum&v7+iJ3N`!x9ZbH=<{C)iD$AlSrTWPAx&MSt^KD(7 zI>VXet^`E4288j8Piiyp#>Z|5Y6e(1DtBkxi`4p!DW`u#=bQ%GL43}6Y`DNumAC+t zJFBYTAe6<=C+nTUJ7R4$H*GG;p=>@9JTmE}0hnFg3cTFou>A~_QiUnrjuE=BR}iYU zD5aqWIa*7j%jl@dTuPg!H^VIK;?M|l7pz+CG`oUWi$;_Qz?dWMBkAOzD+*438^RMX zk($PXh91PLd?|Gssb*g(F?BMTT5(+K%yNGEB#?Uim-_Q{80Lr5r}Wy&#RsnWRWgyl zcR;E*KR$=uEfT~h>3CTewtNTd&0CsDaLT&sMpO!7?S9o3SH%Iu2{7k^P;ohi6&f7d zC5E@E?SMBb?j%pQckL;ApYqa=ya}jC!aV&1Sdj9)+uTq^r!5%L)a&N0`SI!D)3+aT z;XNoK1OW&|X2_)o`qvP_tNNMU*+7r!R zeDV4Wr!R2%J5VQF%+&B(USoT{WuBuQXpVD{VEKU8LRn%>*Z^XlNXj&wNJ#Wz z^Td`o>y=-l*r^98c~Of@C`LyTl?vwaG0J< z)a9&;HqXw`n)|Ho%9J%Mlg8rZ2=d5$h}p@t$pMy$K+op{W`dwDd?`B=Sr*H>=2@zv zy5P@b)%#;wbET{6NKJvX-Aq3QLXJ084KWUK*|eneRLzdLbT2W`94b0%(ba>51Y81? zWb_U{tvL_o&==dv^0u|P<(tPkcnK}W=1i51rC-s+L*esG`Xb{H3}0aKFMI~! zucGIuI^ zq7~0BYQ4yosC^KpRM51fSPR7)a9q?vLoC!P2rfL4<7uHsBBZlHsOlqklMqVte<%i* z2b?(9GDk5szJ#5t6?ZTZ8pA?AlMjPUVDIvFVJnngWAk|K6u$f)CSoanuVI zjVesc#kI*wC{>P6gF#SJo4&rhZpvzQTJCJ^?J;qRSv=%yWR^2r#Wpq(_5P)o=`3m* z*HcwGEaeNp7I{H@tW8owUfOJeLofQi(Yghguha3-O-*u}jkP7os66!jydVUb{Mai4 zR@F2=M1|!Zf*}>e^1wL@++__%8mhdiHHVK>Qr8}xm*)J$eK&z7)FQOB;G_5&RKvn+ zbmsxN(>Y0$mcLxh)ihRkPQMalgT4!_f?Y0}6ViRo?~bc+bYBsh@?s@mLH?}?5|p%p z83N&E=we5d>w9cKUyTD8%}q5*C=&rEZA2O2)MmMP_`!WII1|a!PV!c+5+gjSTpSBo zx#wxZRyvx^T;gF(2`|Lj2T-U8zEGm~4q%~<~ z=ovxDDCXgMT_PKQS7&h7-72@W7E~Lx zgaPZK4+)g`5-N~-Ncmih=Acep z*$|GkPASW(E!+K={w@Mxa8m=ZW+zq{3s<9dhfug64F7yO+)&tUH&+Mwvgpv1c3BDD z3{(|_eImvwz?bc`Vx=q1J&=-x*j~LB^qGmt`idma=A%f78_&EkEx}O+T-A4st-`<{ ztaQC-v)eK9lIMq9wP^OMTv_3sF>X;!b>(d~{gpx}bxVGW%^WE#Gn|1T%N6fV(kfBm z_*mTOls_~LhmZST!U>CPG*%`4f*5V4Zz@ z%v6+~Z2a+?dk^^S;dl2Q96b0P%e(u4Dc$?i!Q(@JKW4c+PW4LnI@zs5pO&6_Uc$L= zmJeXR>i^0A2T@ZOX`z@#xom4AJ92j8lDY7Lh@?)3n739d^f?`hAy4B2Xjwm{ow%h4 z-U}>SmanKQIyy>eekJabd+mX3ooOr2BYEtg-L&BOE z1CO;Do&i4O_=vSvV99Y`AC^LjH)r(~FMUwu*U^5g=;1rtKKA|T_^U4|sGBS6{R$)R zSOFjb0UUCSYXTgiX_sz6bl${{12e^-t_26AQGD6dQQ4qUkvVcUtHruGO}X}^jMeCh z(OTL@N~CuVzwmA0L_wt)I(JqJ7zQ%lXv1yjbNZl{CielkKl7%p|WLRzYkepE>VLh16V&||?K2UYb<}OuT#@fA{>;Rpk zqGgnYMB>QiG=F9H5E`6DLQ`H78ZPcun~dj}dYML&evx0HD40!5rg#cq8*j!cF1D(& z@T=7r%#!1K%(54q`VUAu`R<+72|iIW1~>wc^Ezp3ctDBmx`Ft?)}eOy^#5%=h+`2& zxIhk6fLa3XUN#;%4z_MSW%kbMgzGK4uC6!_|MzJK*3G6^^X}10-g1S; z_VpHoa;;j^X=z5%X34W)?(qe6Y|Un`vR8wkmF|GbQ`yuaDwQGt?$Rlf}Rmnc2L zR*zr^zEIW(b=ep-rK%f$M~7fAd>CY;)~iaAx$Xg9pxagwrU_5`&_qoO;9)hWFytCl zSH19PxGI}Vi6wJ5dQq5Ft!!x$>_eRD?u}Umu@mFtEPod6&j^rf!GVFzVL>rK^k}&~gd7wUb&zF+Z#zn0cHX%^r_Th6( z{nEw~FOc*MKqBX()3OF4tr!M2xcV7QEdFW=C_4W1q6~5P&K|9Nee9*?t7}Rw?q#Kv zZS2@V7*n4uXeKvk%`lK4FNWkHvS`%yZVGn|iVCkNnA=_U*;9HsthrerhfR?{4)Wv5 z`*Crw*Ss5+N`AT<#70fDQCv&1>N6c-5^mMtk4 z!Zx*9TQ9nAN3GH@$*Wc2v(0$z?BjTqA5+-JmKD>rFrI;s~yh?B6mU)%e75Em|A z;w8CD*NH6ynx$XhywHlh0TT-cIMD|6p8|fc&3a?uMP`zSrR5QxZgG58O{8&vpl4}b z_Bej11`TJ1EW*yscoMvT1?Jt*Q#l{%M>2?aA+7Dyl|HGr0M3_$((8rgQ!a~Na@q1H zM3GYc3a#QcNDwA7t#(yBDiT-`j}`=HE0`b!+BrpBGE8Z7#G@L~`$T)H?LzuMW!=0$ zXvgcG<~n$XFb2wMcJ*B^T}}IIQ02mEmIiXTc?n9(Qdue*O-x{e-i4#k_QJ=wWMGHXNp_ZX29ei=utOs(=(!kt4gF(a;x;f>%)5rVrP@1se8bvM=9KrOrlyfmJEx z;ZPha(E`ePReLmhQ{ZM8i!Mo&vkbbXXzk@C(ORtbn2-}GAeK>sOD?PE5-XcgZ$uFv zshpptV?H164Ic_@*-HqFIYt4+dcRniW?ui{}sxW?2ex zF3N40tF>P;niPq_l})>*AYWLLoAkvA*GPF{{2cJ z(KlBvyE*xE!{dB*n~u_=<UobfTzqa5a9o!Q-jP_kM zOl8^==(Zr|B%WwlU9_a}I9SX|xlLJP>Dtx^7u8dNVy*LXeR0Y5TX1Z(6B zUcocnN*G0H8wVRn;*xrFf7%#L5Vt2A_@Eo{ObrxDlyM0Edg@&)Q`b1YHWYSkM)O}S zb$J>EW|Y6DY0uyS|t|G5-Bx#UJ^C5tVLJI(dOWhTSP zr9}Xtj8`P9RP4b{9&u92qPWU1TNYUoM0ST$*Pc18En1+Z z?ZMOug1O@vjNDCwjhPHIH}_J6JcQDlU>t1J0cqOFKplP z0tCY#{ole88x0q#sd#50Ez7kdZ$UE=m9)c!NP3_Z%nc=#3VuSb>2*LcCH!GFwAczF z^J)b8RYl0!yaL`5t>_wQa zo?{al6Vq|DN}a8d{D=Xbs+g%N$_6y_n4!grub_0aE>KAansUAQ^EOwXWCpZg*_}GA zDAI0KhjrOsU&5<}da~R}(o^GSXv|tR0nSE=AG<1wEz%ULn52dBC z!2=@^!Y7h%a!c9PIe)isov9D+R2K6B<936`+%c8OyDV$+FmR*JbGX1&lp-VL{RVyc zQ8iJOrdPabF$)=rY;0T^iR%R^A41F2P)swJPIngd(36sHI~aM4M`bZaGp9ZpH6*5C z7#VE3**xY09HRH__!kV|3|~yUrDz2;DgnStRF-155*qk*g0GHYa)jWMbr#hA_BxrT zy~Ihobm?nW=3Sw%$Oyi^iyU2#!e!h*5fT{Py_#=rx%Ko2tKmMt>YZL)&i3HN>GEGOv)7hdIL! zZB;TLFnVvUBgY`E9*?DOe!Q|e!T+Eq zZXF!dmY~i`$2Eq|N(k+ZPPJj`lR7hvs-M0r1$7_N`ZUB7Z4eWW}tz30``NW|~zmBcw*Zqb9@w&JX`@(KN zrMlX75*>eMgWjHjnsNe6l>fIZaqF_vwYNW`wri~jjnAkTSVBs6G`!tKXqvSM!nY5< zx=VJDNgWjuyJu^2)$AcUfoO2tKL}9HC{th)w;M5C^`c1y4wpu)G5HGMx%u)F(#$>G{~k=NmtB!$)Cx!7%Y%jVSli%>1V*$4Os=il6jE(W{lupGxD~@|KeZxWy|@ z6Pu$lE6fGtOc=%iLXEe0ji((~eZz%L8&Msmt;*y37454MNZvGGfL%rx4Z&RpdeQz7 z39N>Jxm{rNOgD1%QdNI9P(0#c+|E?Etk9T7oO#3S{5csV_(f=JnYN-U5P_m2O$^ia zfgk9`5z5Wv4D{*;Jp}X17W2iFvRvHi3Yel|eIa%cNWncGg3WspJC;%*Geocf%Ahf= zB+&RBLO>>JYUew**Q)Pw!{lZXT7Bqfrj|m8y>=qG-*ALj7gx)R|F%m0;X2?EX`ZOv;@YUSL%dk^(jJ4VG=Tek4%Odj}JnIQ9tU2x@ z?f>;0ClS{-rD#%T;gGleJiy2KWSFYhaVm3K6pAjeXil#N1AymdA~x9^6P6^$s&WDe zN~V^W%De?#`512HLZ4N|Msv;%G*(<)=y)5|+tKIb@d|4(i9J&N<&R;v}om42D0xK{WYk65M{{0OyYo%5<()sf6bmaBzWiSEjzjk?qg z;dj$?;P|gWk%2>Qa^8w$G1xfk#ozIOmo*seVjqN7czd4rbM?UF&N#O zX~M_6$ET31=;&n#WOUQ)Swjr{x;W&?v1q0+;RVcg%d>3MhaaYX957bH!1ueHd?g}7 zEw{uW7Hw{)z<41PY~(`dE~pGv`easd^qNma(IjU~YTNsNozx%hJ*s9B>+`6J|JE+( z*eRr7uN0KnPxhx?1ff0RTBVuOi(YR0>G0kIZYq7ijCcXVjBuV?*8=Hw(87hN7IjWR zFmY>PV>H=9d`juu{qoy;q^5(H>gj)Z@L=&5Pub*e^8s7!gEEa|;V{?HTD1{88D%g@ zjUgQaUJ}(9)O05Fpigzl9@2k0*eg%&Vl`7Z9Y3N8TTbGOnF>f})!Jx@DpWC2i5ZzJXewxiMQG@;%ug*;tgjoDqhAfKB15=O*q{*}vLuUWi%qjGH`qcDMAD0fg zs3vHw&c1e}f^KTPbpnL)9Gyj%m=O>!isG0uj5T{iNSoTp#=w(dlP~X%2M-yDe7q%) zDxC#`jtZY?Sw!fNCG2I3f!{L31tYV{vL$)b0BPxA1PrIeS}fI7=iFlUFl!ON<{Tu2 zI}vlWa{MsjtK{ZFuAhGR?h%xDRLlD_8a-}ZsKDQTBr7|-$YFmjs&3e;bY0;klaGnM zvL-r^UPC7;F0rQ^VgOdkrJV&o(Vb4P#~84WZEdE$?kcS$5UexYt&5G%&l6eJX{@Xai)H>HPm+l!zS^aQzt0HKD2oK4hsG6%naw6BC9cIV zgJQAiQ_{2kdEjl)7lWI6$t%V^wjH9T@^={jrXt#}sTgPRLggXK+ijYPJz95{j#&Yp zpyI87aRWLctS(%he2G%t^DZAiQYG)S=+BTN8dD-K^H~?Y$;QAU%786TSr11FS@CHWNZMi?p+CU)aS4RIhHsU=opQX-S=u{0 z)xU}}(@esKWS$A}1{bgZU*i3?0z9Vmpc*O^A|Ydth%9Pd3XEVK;B@FT{8>O3;a zt^07W(lP52bRc%FB4W~bz!)NufCNIHeoA9K8elaiJFVX+w~Ww1s-plB(GGY?99}RI>%^0^Oa~2c~kS&S02^$VFcPuK+^(0 z2xK3x+He4~2Kv3~!ueuB{Pyv+_a8nHjz8CN46fp9u5=^Q#cO`J_lJ8A4j=yr`%LQ?BTd4amF4tmw&=>_ zS+PGR{a7YO4)BQ*Gyx z`93Z}=Fa9Xw!V1E4mAzOyMkp&HKw*32`&)`PnbJU7NSzk;yrs<4q02t9GgF7`H5ymy&Om z7CsJlG5dLQR+0xvsMJPuL(VAy0>}QwgCk?U$llp|)7~#P{*~2&!aM($%)fz`wf$JG z2|=ty?cZdwb-H{Zik06`qx=%_j5;atMz68@tK;Q1-)-*z2Q8uPB}JlpG)Y`X^!W^x zxkU6S65advD-va8qe%34<7Lv6=LOlO@b0Aq6EjP^@>#Hd-oBmFiP`VKyN_Gdfvxek zLiz93DZ05`qB^#)GyE9~C;GsOXpA7@GY&qzjH$%&vCT)NE4$uIiuP{kpZFVgq>Ln7 zlCJh1Xsn27@)h!!R+_2h%7!)Dl)FDlp;6rg|2DfO;UjOiNxZ}Pkb+b2#$K}B!w-jx zs80%zKU?)+E7O#^u}Zz=?EI7~8ggDGyk#PrGEr^%Lvri5TC5E-P%*`9Na3LTVc~bDFyz zdXUiZDEqJRK-|qgcb_yI4u#@wzni(TF#aJIxUAbZ{@6hgA!SKO=h(C;A~CGs97g;xHyt5K;fWv>JU-| zYAhZ=SoYGvztmrnhVtc1KGa|hX~K!87U>{;_zBf#Y#t5oj;&bWCxQhyj=<@vglGiA zb-#l8G)N9E*`f1loIGLfOm;t~_!EDy51#u!ppe6bx$4xV#`WFuRcUKb?$jy<+F7(r zC>m-BcvEf349(_^NdJO!z6@O2T^k0(P_EP&*w0N+thLig+?G8&C-?ZC=w zWd!ek*t|pH|IU`q25a1^-+qJzu9e#nM=cJpG1u1at-tYqbV~`e|`zr>%_-^45Fs>+{YI5*f#b?HgI2glkD9-@j3j|9Db?L|an#+i;*c$B) z)F^71xpjUD(%?^FlXYqc@U{pE{)(!+&sw)lktco}5>^t_gH4WD6-UHZ0B*SAo@7Ao z+~o4!7tRV%Oww&UALZjsruetdf zzy1*y@EU`IXME!KXa{_Vw;$B44693{QVNl^0}P)eZz%07cQ^q)k+VHOb|R{jSMOK~ zvr3)qACXt~`-}XSBmF<3rKvX2<_&K%c;K4PGi0!2!Cl7UFa?e`rvC=}=Hgk6%V?MR zAA8Iwl%3ri4qeh_2Zwp`mp8ZYkD2f$#WDP+idA-!g{tT;+%e{~kd!St<#0EMaV7FN zCRG%&j7B98{i8dOX+LF)S;AyOF-FI+L_`+DOJY<*%qbHgVhz6IJeR@9ijFLmLwQW@sF>>rRn6m+#Drea zZ5Q8bRyMO?K-zUEbd3rSucE=iklB3-LB&n#R+L4>@N7EEZz*OdVgb2MX2&Cy$ZfKo zagVAAOr0}mua}AGEAtzpD12a)PJr!d=yALlpiAhj4*0~`TF!5((B-Rc6r;K1g;zd6 z;i0^i7~XWcvRnC(%}eT4|9Z`%gry`3;L+2B79d1;dTHLq$bNwh$8-xfJzsiMLrZs1 zLg`ED{MVtY7>1#Tr@hix8@ocz2RYAJ9c1DVjvdE3t(>O#*;~MwM9{3!D5RSwb1p%Z zlnjGl9M+Zh6#R!IqeOKO}wO zhs+=5lz%ky%h?D^@err9M(!*i|J*Tn3PxlVM8!b{*`QU0&Vv`b7<$egSbj+9N@@5c zAX6BEe!TQ9-~G?fV{4UfdY{G*v1XyqCvZR9KOcU*a8>HlIa78Y8>Il!S zIJ{mD&2r#ttHBXFLe2EaG5<-AHmayOE|Yv6d&M{9o;kHAQBp!QlK#B^!!7m0*7{Cvw>QA`*M=n&J#G5wjcYG=0unH^RdYc`R zeumFcLN%05HlS2JT8mQ_)jgr03ns+gPPGKkQ03dT1k8>5gqhoFy$wN+*}4OI>Z^(p zR@Oz3BOB)gIKG)eT%GT$-yQr(R4NLSB5KRQK5|8M7U8MC1}(}EU>h|IDzF&d7})hy zM3oZt;+CiY&?d~5OX}Q9ysM1l{6AiNM{kLJt*~*bxNcTOX=%77U z8+NC6LW&Rl^yLcVUbU|lI1M$IS|50#cx)qGke+>PnCANDlt(??cx*8`bGwx&Y$O(| zcNj!&kJRX9QZaopx(F?0seRca1lBFRLb>@5$a^7pf8u+;W{j=txN*1XoI2s`Z$74N z%O}_qMCgR)hLU)SVIVrWe$zoYfh(_NL|O3s!;_6a37@LZr@=lP{jB>bhha*(AdKb< zXDQ|gtK=m^6FD$PYUhES=f5z|fBNtD9zFc-kXyT~TIhQ0BO=f-cp<0ls}x7~SEvV~ z7KpPaO#8~#Rt~ae+SCmFtEJrk5C4CC_Hy%PR=~RN7zym}UoQtYtw+km8Pn8Z3{nd} zDlsEMqQde2qwQV0>ngG|-S7Gpl&DS%5*uB8A&cx%VnezMY>p9`P?+u^WLc7tEn2n# zcXplMexB!@5wX_VGTC*;$gUcR?Y;L}5iw(4-#KFjq54iciwff%Z)|Ern-*jpMTy?4 zQP0<*KLD@x$=w_cJw6ZL+Nr)P^1cP4{>}^)y?x6%AdS)2{Cr$O*#((LuOY=z?S0r; zuBkjA+h9ypuFRzfH+9?R`5Jmzg_H~6W+D-x6kTEG54vWYjmFY$r#J{|1xiW^j~_$C z6x;;y;;c(Q5?r7bHn47e11f08kp?%SPjwq>!d(fMmTdChu^0^-QQM>+U^{{iVF?9L z6*24t6TMSFLW=rhTV~Zxlzl0ggh6fSS$VIuZ+;okEY;XNpM_u6H5jHqmtJ_gl><`z z;fVzf9ggzA(TM+P>Di%9Uo%K7ZNs0`O#oZdlB7PX(pVPp zb^_NFS*M@P%k7#zJ>6&yX6o&#+>VMIj?cje);|2X{LfgOMadtuo4pxdXpOrbgl9Dc z!4v0PiTa%iADmaSi8D-Swc?MTjC#-hY)KM#tiF4VudV3RnuCAb!c(8>I8}tLwRV5v zDlKxFEXwQf$+JV+Lty~pA4gW&c6Xr*ZwkS79}eucl$HsEt?PF~@Uhd_$3;$HCW{uq zqByu>8#}*h5BLdu9FSNWR-xgM-&YeLye(;Ra+oXCv#@85cpPn(@ma=i<9&e<`Q6f;vr5Va7quJqe%+8YH`p2bVO_(;C z!yK_29oiw*-7;L=nCrVVU?4W)?3AMn_GLQVALu1;VVp(597mL?gyb<7dVcI_x=vZ1 zpTk=?mx<6csYV7p((Hzmxl#De+)A{59ID6AEmoXghSeBthjG+t{@Lm9>rpDOMlY#L zOBJGj3X0)96`b{UiO-ty$OST0r!X;rWfu66OjN!3P1NbJY_P^ZP@;ht8zS?2e#I|3 zS75khm+2GKt)&z^6bAAQ{l|Rud%V>Cz5-F|eOF%BK496v+tgkB$CzCIrUs6NKZ%Cd z_q|$$0Dybv<_fyvXQ+iax^lL0XY(Idg#dn4ILn#E%CTZ46C>iUg!LN%SFC{ zH|yFrpTHCuh8BQ|K{WN3lwG}O;VBQJ?Sr%663x@n+Djj*A!`;inh2m52)?YNQJXA8 ziRNd-XB!W`{`_2%B``S5JCmNS%>G`O6L`H+76HD zX{hphvA_U4SqPFfbIOAr;JAo{VsY6=+%~EQq2Z-P2$(zm4w(|XS0s(5h|gRgb*upW zyC-##*OlWm#iG1osh(5Q#(Q#<`dW*{{TdC z`jDuNWX!W}++0#ljf`8-+9d(Lz*2F3PH}?95`JE{a?xEBW)KaHHF+3e1iT8kEKJ*a|Ft*-0w`HH#ll;feIrSYxd0{ z%?y%Qfv@ds1esE_v$rP{2L^=8nFSc=tyHb^!SY7F30qqFNn))c+ZI^z*Kyhd3YP0Y z?0}{)dRVv#+|x-OYOBGysX6(f7x;lQPj^=4TC6SfB|cP05-&S^aLNIr15h_c`Z%R) zKWyBNp`d!f9bnwE{?6nE+cll)tbTphL}sAc#S7KXT7QeYs>c;Pc>Wu}qu+D)AQ z*|(w0cD6IU?X8?e;%#P9R^OH@%~+0Z)8Ab&m_~o$c3=Wt_+(lykGH!&34^^T^gWJ} z&R@z8u9A_L-rR+WXZM0yH??gEW=9vtW#`Y-fN~Y5!C*s;L(*H(3Eczj5N*?k=7p*w zSKL+jvvtm^bD`FOD}@D=5IHlQdF2Y1E^VdlCq|&a5b7|YzQECf%b7=A{LVb< z!q9~~mr}V#Lgw0!@4rR(k~~7fI!-l?lgy0a%+Jm(xE5^0L!LLxu>4rlak=##SBX zI4#$tDgA2prfY4DbI|-E1wFEYJ86Za(T#nGJv$wKC?pphTEsFck2-V3#%s8Xof@*5 zzzPKhxEjmWzlKU+ioA>QOU=U9Er!j=e4{bs>%mW!aL-GiqTho+beIW%QJcDKzA4Dv zZ6~-+(~73Zz&h=6Oy0W+H3%6Cb9%b*Z=TgW7dwKSDR^nYCZ>h}$+bnKym@cR3zw}z#zslNykQmw*v`{MSK);~G(D=+ z^IJ^CVJ14~Y`@zSoX-AJSVAJ691uw2A&RZp)xcW4!=*=r#I510)>{KlB3YPzR?qr9 zhEE<|EFq`w=VXWyT|UF$S8CbVfqqa3Zr6Ef{Dy8?9_=o7r2Mc7uwv0?Iixrx0l4Ju z(M}3U*rk^`l28F9dbm%NA34Rr2HCC0%To}|tElKT{!;0`E&xyMR;iySondz6BTD;i zi7+;|ROU7I8xpGv8??mcQLTn}G2Oi??wZBcfe?mTWG}PWnn|m2jO^wug+NY-d79+( z%9iebI#(ISA#vb%<*9|pv&5+KnxAxXT@49xrRB|3j=7AKKu*m~OM%RCpv6oHmuUNk@X$<2~M%?7lOHwSp`OT7r6;*X-F8bM*X2S>L8v=>A)5B+V~ai zDw`$v>vvN!w}@p4zr4`q3z4GaR*+v!RK)@9r(R`8<1wvL z&%L(@p~*N8K!vKCmM}A^G$G3|Jf2IW0>?b(*UgvofF*6yz(#>U(=a=iFJ5Wa{0S4$ zb*ydyIt#?p{BJ>eV=*sMqNBXs{}v)OjCp9kOtuSGZ7bzf>q14dM1Q}2Qv5lM~Nl3{nQIz6KRDYTEf*&W)PUm!^is?~_yW7DzY$YA$1 zYK1kcLaLkTb4y!Ux$g&HxRQ@&}yGXoZiD00LXx)l-4ZtM+M9kMn&2v1;oKp zwvY(EG4Zz`cQ;a3FLI<`*qvLeSQno`@j2FICD9hAU~(VkCl5dW`ilpZP1}E94&dMJ zefw9|^YGDK)-o?9^8Uuyi+OJ?jkO&tz*=#R^j`0571h!Kt=&n*eyGdJB=yxmYTdz- zI;c^%C4oIXlUUx&Q++6;oKQejDaYmOMsmd6ysJ*@Vsn2zI{ry(>2o%bE_4gZpPwC_ zy@J=n8*Q}Nn@9UigKT9l7%M!{N9*<~3|`|IVw~MLzG2YAcnE##_C$j&9P}5*{I&_n zYy!@zIVdw^yk!s((`sq>2wEnZn1*amlr?S3GgL{}c2f1g^(!sE@8Yvj zoELf=!guvPW`aIHS^9u^JExosE1dMuKKwiKYNXNn)l9;vP8s)EBda#0QJeVss9ZMd z{LrEnY;_ubZ>Cg<0~kND|BpBRNvjJ;dgBBVQ|5F1;Qkk!?4wGnVVbqhqCT|uYyQy| z5_-Wf;#k#oSzsoH*NZ$FFvv%FY$bfWQ4`uuebPSXV08YgMR{{^xXb7DWiBORkKC9S z?HIF>SNH0f6xV<-#=@m$j#1gN7N)e(5Ea+EL+AGT%JHc%;{{GEy+!sJvZAxQDZce)=$#4a?aJ?733vbiCq~KX4bG|3n2R)r&=k9jp;beryE%$(Z;EV`7^aTDZ+1AWS~hN^1?U8h4bAB-dE)1(Q#Nk zDaP(Zv zUG!Y$x19!JGY24ys?yfhFxv_KR(GU?m`!xGi{g_~M7^O82cD$_q6@94&G>J)#Uip) zafxd*v~NaKR81(?ARnf-#wC~@sln2L^rWl8k6nWr7oXeK8Qq(4{KDumws79>d94~g zYjC*X&$tD{qSCoaWIf2Pftq*g>SIz$ULmR?5xVWAL)auT5r^nQ_A3f)vB_!Atbr&| zn?q4~auxsh-q@xX7~=8J^H$=H75evDJVO;U8~WoXv@zJB#rv40m6tZgniO+9VeVO$hNB{` zJds4<;bO{!EGl2%d^35->~4eZTRqZT^gcrQ#0wLpj%mcDt~LEXU;F&XW@P0~T1^~XRIppg-PUK^MH)-uSyXDN zw?5Ls)s8X0h$QZA>ts;wFI0bGeKjUXgDZGqYIwM;tTlmX?}ip`qXsR3WP04mEv*|6R0!e2_P^W|wT^=!yz8mB1Wqs{R@;bDoAZAN%nF@jq+%=mh_IgTYBkrpt z?Dv!sli;!*NE^9Oi9^2F7e-@_t$?pbI+~(v@96v08k$D$@`h$2ozYq-bthp>uh5Uz zOCF%gBUjwLM;vnK-UwxVYytQi-tA@TH1IcS1D?#&KJ6?*BmjG2fkX3@XK@khf<0C# z&|&b_{;6Kx`i(mEUCx!q#4gN!V%T~#77Q*dZ%qFThVw(!tCN8xIZ}7}{FtLiZslla zWC6i0o$i}nND6NHmZ#%(kWj$w@G7h9U^{3hXn_3JwW}=(fc-+b(#W;<+Tv^|>z;)O zLDfR3VGu5{WE_t?W5=1+%^Vu_eU_f(Myp!U735HP8>QpT*cRA)ve9xpGe@Uu|CyuI z?l|-H%oP@r|N88OV~1izL+hsri^mdGCM1rD(cVG#0TGRJ$TvB0f*49+>F_cDXXk-% z5(V`6+t*M2FRy>D$KBC@9*f>mpwOXTD++8Ly;3k5g$awtEOj`iz^^XPe%g{#E@>#wtQk)cw3K={Uc2GfH+XhG336sckFCi{TiM+l+Qo#(-xLjH-udWF%Zq;+Nr?(56!>+P! zL!)617R#8lKCi5XQ?p723lqAUNoL0xx3a#GZf=Q;0C#EDVt#`kqQNj#Y4$@YYb&gG zs!THav6cMsE0hSHxh%j#)x>vR!#D0FjhMQJrH{_qxpA?h!llN09H+CXq#Od?Ypn}? znCl@TIBqdHXA*Cz zR+-q1QnRR=YlYF*x=3AW@1v&p;g#~lIYSr27vq|ZtSZ%ei}r+Dv?OY0S!BQzwH?rX z=?_Q?~)G57xdH74Fgwk#mbCYUwv8VYRvnm^5?4YzN+Ee=l zXT{Ob6!Udk!q%Mv8}Q2@t1Wiu;5aSk7#S$ko`GC3ltY$Mi^4r2`#-Ss&n_+;2<(&t ztOxrCU(*(mW4aUZ%8-;v$V^QUOf$_yYif7ANRTMOsYuIO89ioRafrMV+0Ttqt~qe^ z7{npl4{)4s6%?)8N}^(E(U0)3^iX!D^YQ9CXFVan?Ho76Cvr|`sP zI-(N#b5=@u^dqkB)HF=iv7WjG@?{gJ%J`8EnDVl{pfUaggcx7dleZz*n^7q@j5K?u z|M7>KuUNdLjye5On>@|<&TUI3YOTHGv7UzDzvR+QUTex+-{nOv+|1Z)Q03EK+(#(T#UB!6^=aSWWinaZ5B|=p zDlDuw+$Qn;X5-rL#HEi;d+0vBNe$WG?<>W6UKN9KBGAyhAwHlwVa`Ba#hkT@mOeC& z%a9z%a|`>cw1KSvtBXo)Qcm=n|lH82=p*Q!vn<8O*^BGD|c@NNsV7KV7u6NFoRSxG9+^a5VVz5 zs`)1#o=%Ys6*LH&Hg@|3K`pDcqPW}YN68tsIlSIL9X#J^k84icq_aYk;A79E)+jxT z{?Ug{z=^9~bv)=c3@WppW>^vQc#wJW##G*N5RShLGOYyIV6$ue6f3HUbF9flr-=9R zHU2`vxyNB{qo^ofk_PFYm|Km<@l0I-y(jj{J!HR_gKkM2R!xH>h%;BqZM@yxQogKk zzp0s4x1Q~)_3+oX^=t~dFIOJ0W<#jx_lq6{r=X=VV>xV2Biq5HkKsBe-n6L|9rM;P zDVVM zXg8{=SE^iRIZTyUQLG(z$}zL%ewB+b_JsXuU-Uc}Q>${QYelUa{_*PNcd&|ZR${T2 z-+%Ynqy4-0KK^)blN&X%vJ$AeauwUDS}nhC;?g<{iPRRw@(LzUrjsXT2vx~NL-@D= zlqSfuR$4nI#3CYI`!E0HOAbVSWUt{ncUFTjJ|pWq55`guwbcruY{&kP|NXVZ_y1S` zrT=3A6wO75@lpV_BNh`BKRPjm4^NH{iE=z!)GGm!5n?B5*+3NI_S(h;P~tS8ZuHx- zV-*_HFhF@qDK}kFEZ2JZ6C9RvaA-A^{gqe~ljy2ub(v7DTG+N}dx=XkchF^{ARrx&^Y}bisr8#hPqw|CtMf8HNb$1vO zpWQ8M7xjpyoFTvQR|5GOLtpAxv3PQX?CwfLUjIbbKW86893OsRu_RC z7qk#GBEmY9OEdE&mlPqwW7DW?tz)tStc_ddJ>9bZ`B(QO^3Ax>KF2kLbW)v~Zwo*&#XQw%z??8=8WTYsV7mfUSLc%LRo#}nkzw|2iNV-ku%9mnhyA-Ot z+4!HYX;VpxQIv;l6yo{}F|~e`oOr1?C{e>;J=j;}eq=$R6mRX=q?Sp}YQ7t^yppn? zkI^$zJmK;Zm`9-D$)Y{e#1)Q=oV6QuDKU(!9bbZan0f&7&@gHehkp}KOU}-QdR_AH z@S9)72dc1gM)`7TFJi0MNFUFWemcIa{6?4Xik1c0wFcaJX9(IcnHzALDH)kNDVdk; zmaH+imcFf&1yf$yjfjnLo_Ps8WHW+|VLLmroq&*G?@+!JaWRw&t^4^HKOM^AFv`Ck z1KPfIGf^)!PO5~b@&q=+xM&m(CL78-)5fQ?ZJR~%3$-oDQK9d~9zcGLse3RM)U%;2 z$Jt6GcxAFk@$r4zl-C>L;9}@-Rshs^ADqYWC6!v-z7|IGBjm+EaxZ(~U7zr<)5o!2 zzG0Mo`q84hO_YL@NV@#M@r ziK>8@`LjP$OGTxy8crWDj}A0xd_Li)&(Cb0L0-#%29E|q^6c5@c!!BKYRFisi{Ne@Yl)4KYy`r13*yNf9BP!8A814hu8fG zdt&DEK@jGol`6a0ipCV(>6S=z@!HN#x`! zFLWg5aJ;CE%HkjNp!6T0QiQuDCanv)CXD@)Cl;O(*a0tH->H9|_y^xJ{Z=RxpHQl# zF<>5!Fz7=kPPPb6oj2k` zZZYUPz*Y=xGu21250rMOjH0Wlkr#Mp=U-EKmGkW`4(13)8L8&$QlBV>SEK4Eic{mP z(~y2Kxsvu-n#Cl;w{x50MfBmA{BZ<0LFqAww9QJvYO~(<`kr2cTZ+gy>QmaFV#tkS z*hw}HMsTJ+860Fs(OMkb^mOABcpZ!IoXLy>t7#cH_}g8AbazBRW4WiPLXsX^Ia4Dt zIq7P#%17_fsFaE%^A+|}S`Q?#4#j2b8^`~X(Pg@%qOIjShSf_|0qnx|NdH(YQpZb@i%NV8oo&lBm z58GH<0AS3>bYG42dB*yek1L1sF^@ZD^#fn;Z9=tNj+w?BH%`WopJm8D_96Sv10K&u zJ=wT%GDiF?BmS|E$kUDpxwzbezedc?C!1c+o#m{h03A_!L+rxT|Y| zG{|emRpw^K#C$rNV_Y#-seizKX?19rniu@Q38>uaOb%e(R!V}5Sr98EPw`RxBP>MI z%_+qv)9;McVgpU}kJ1t9Oo+`zw$8jQy81Zg+vOH#2wLx_#2M#lkugJ#v zco>J@6sml{!WQWC2zeS%Wi}*nG=t2IJf?3h%R(&1wcU+ZKWK@Xfdv-6ctI0m(m6*I zQL(e*hinr*sWU1F`SS3|8JSE@pHwZA)O&J_0BGIPG1fVAhFzz1R)48BL5)@Q;fkg~ z$1uC8c~|yVHQDnO|KlCqX19?H{n8sTPpjqm3XY7?zfulvyh5JITqC z6g5@DloDtF=Zy-#DE@y8Ft3!i50#bH9(m<+E2A!tjxJt4Mj@#N+&miVB8~18-{DvH z@BD=C-U==6f)H-5V#~YW%}Z>VLZ4j{e_N34olj3TKKb+hm-OYYlEd5NgSnRK2XAJ) z_u%fmyH))TE;pxU#-#+Nz**B`S-dYZ0W1}2TPNFZvX1|A(-MMx0RhYwc z*I&nZzn~o=V8v9*A$l zZ6oMAs|E7_y}4cX@fiks(CKE{Nv}`Lc+Q%sE(nlVzk@?~ZoQ?+@@5;mw^F+W5~$ws$Bpj_mMvc_KikW(s-}qATLDm0&$CXU#Ow3d zY~dbdQ9sb)GtCPgZ|?3vNU=tJm36$@Cl}9)*zdCX?>296lhF+lUh9@Q@ss++Pzbhgd$A77=?d)d2z<&C}9^poBHuj6PamtA9mzi_u2E;&-?uO zC%^gNjnfD)xBi@4r1AsAkoWS>@dJc-dpo5;>s%qgC7Eb$YKYv^m%g&8gCoAIflFv! z;=)GDxEH*VN|S~#rYijV~fV3wsf5 zoXWbcGq3JVHY7v_=UYB|3_Z3!cyfHS^}*%gHh;0Ndcz?NrlL|}1e+_s*TJwTD$-*- zIK@9GHNVpIkC>+IHDJ#&+Jhe^FQkGI+bRXnCT@GejR_*56C+^ETw=f?P??;jx;*K3 zH3Y^>bn5Mp z73T7avLq3!yBz-tyvXI3v#D78V&pYVMVNsZAaH_KF&g9nVPSa~dj8mFc8tGOGkaER zJ&vbDcN$_U230T(VJ^*%kT_ zF(;{=$dx5=R~4Q$8&KQH@#Vz20=R{IqbB((KyRSMZ*DNnZ=8Rj`TYnUWb}u2Zc7NA zylz|_w~5R$f2{Hhp)GZZ@HIoxVEETK!I_Yij1Ei?9abp6x$-nmo7)hNZ6zJ3vZ=;? z2vY|3@VSCF`(cIPtVTzhA0Z23u3UGjGrvQ3HKvrbc*O!3i_&l$sJY7IEr}6NG2q|~ zWb$fmu!F!uJ(tLqpN}hRa@nESer6DR$}H(%trFtnDTD z`hkjvbYQw`AXYhC!BWd-FYG;@w=rdSB=qWsN#H#W1-zz1PVat$%=XSnd={is(#-(o znZWYS7~vvrmw;*O+~Zp~yB^`KrX9hX*1?JPUjIr(L#dg7CLtitgD)Qsw~H`Ip*@ttWcN4KL?`?L1F$Z9uiwih$ zt6&r_=vI|ZsQfdZBSWXmHPZ^E7c9_|y%VJ+blfJVus9QV>FHrT)=6qnukJ}ibIg>v z47G$rF^M#4U*U7(+UR3o#Z)&mc!e;`^j-4~Af&cwR9m(Ik=0`&1NaK}2hu89B>WBo zednz)7Uy&wY1oT2f}`)`aC;T}_G~HNgq7zD&~rnyWp4iLeC^vrioo*vM>qtAcaS|2 zeaURhTUPI@Y)Wkd9e0PM;H%M!gkB_TtbsRL*R{8q!nky2pti=5;-9v4@Xs05%~r@( zLEm#;Ap5R-Hs~zbtG&RxvDjT5LV@yB4%E7l+bMm4|T4fK+m*=gM$3!R=JHBgh| z>;3q**-8r^?j9eF&z`ZMRP|lfrJBl7^3%12pRP{2#T>aUc0O^Iv7EUn!f2pAuh#v-p)nvFg67pNPhBKq2m2MD?qGy#0g{pe zQZq(%xs%*_pz>l(rOjFjNifgl^~{XRsAI%r!Ns*|Tk`&zO(l8jU9HX|%%OA@JgP_i zKVR!;xt)bkN{J}1QTT>r(5;F`>b0N9ALp`{H*t7Qfj?0&vgST@l#Ryzc|Cy*kl}jACE~7q(i7CRA1tz;R%ZL=q-;@qOJ|`Z(eh7 zjy*?TplDLhfLhj_$|uob&neQRYY9A10ZK~SKZ3=#xoCl|ZpjnA`_mcVq)y<@4bYOk z8#ic50($ks#=G2d4noO=Z8z|vxBViIZr{|KdKd9#d>;Rh?)`k@8s7Cv@q(Hv8{Kk? zb<=oVR9`Qt=qORD9keGHdpIjdPa1Fbu5sjjdN7kFISYO?yF2C%F zy*SG6WsbL~5Av`My%~hd@oGGPKx#ZXWvZZ9N}UEDR#Um0B(DvRkW4b^yvTg7#FRQe z#6H!p5ET1->*J5P{*c-HS9aFz@BK7rhUw&HSmc%>tz+b>2_$~KA zs2ApSrOm}DO@kFPR~juwWmoIht0ho8=J)-vywdF5X>j$k>Eg$Tyn_x=MdRTzp*z4) zV5vfN*x(jDxrxw(?SweI);Em~agCttSy|TD!nct!g>&4z2iu2j^nB!vxKB}|#F=h~ zi}Ow>j+yRNy}O#(tr1+4tLKK2!jI6(}j{!*w#bei5VK zFZ>;W$sUBkQ3wqXgYk7sqf}k$)2cs1&$jC93QDYJ>_v?Hyp^jgf^AqSDIjk-;ykp# zb%~!IPwPe9ZTM`GOnkO|1Jlx1O_Kb`i=z`{4PT-6>B;cLrb&ij`Q3ZLkV-bLA9%#% z>wERqs&Via&TCy%Vl(HQm&<^IWIEV^laTfN4VJ8|sOA>wpeWEF(yT%VA;Mu?>ir()eG^w5g)+f8`=7 zg5xnjwe%V2@)E90c{wogdv>?R9U;#Mfhx1K_jG|J@U!1lD3^dV^EKCQ zpcqXOE?sLfh|kQ^m(}n#HT>`F+)k#fzdkUFBP`2s6BT5HH-$w67uljThy7^BVrXJP z>Ddn(e`3C=!u^6)uEu$sNzU<^vwUT-hM()noBCU+`GQWuX6G=W+Jdmv#kYdB=4s3i>i;_yN&m`+pa)%IWG<`-%vrOw?$p# z=GNBcufO8CZ}NZq@hktgx%uA3#^zQ%S^W<#9ND@vZRN$S?ag1eDm!@nk1YN1#t&P( zC-2Df-Wi;6X>P!3Pmh1ifaMjwSGV`#pCJ`t(~O?U@NzKWg!8>BhE3o4+`fJQeawH=ObFq2Nj zRZK>J*b)pmADYjn5vZX;@k7!d6GVjSH91hOI{#Q?WUBj4xHM@ZI8Nt3cBp$ukEuBn{vq~wxl>IZr>vw})Yf8t>N z0X4gOa^-0&-1v4DR7=Q3M=f4ZkM;Xb35u)62y>Cz5qC=2Y}Q!`E~pZjQ#Xtf&DKJ@ z+Mp;rxRy_VKe1G=dB^FYPMdGLxF)uxe%>U#%2rDxffp)r z*9(Rd%|YR~1?OO!aD19}Ibm47{kfcH35O%bVps%cDTUMdKzT$wJr(9JxSAlkN`v`q z?t{?%FN=X|8>o%_d`pj@o5bSVs{y(nGQW9%PVvyqe_-(t7dK7O`O|Z$7_m?96eK^3 zOg&503L&^#JmXnR9LaisI!>!vAyWOC0A|y(OHmHkfJEAfn9~HR;bbq*tWhU$iKf@P zg+Pf^46gA00Zo$mP~Vo!`HmE@%KC>d^gQ!VG<&KS2|nar*{Bzt%J}TH*-}kx|ClLm zflK7ZD#LzQGLQ0;7-**e6ht#X3K4XQSH)!JNuYS82xU#=-SmfMWTb+YXVtnY^89d( zh~H$`pq(XW&`#yL*?&Y3ovTplN2gVqD}mL){2xBy)*Uld(ijDJ2FzXFV7OHTVjRKo zubQH;@Kql+>pf54Q5q%5t{_%HlS6!lM#~&WA{6E4;$$dbJm^gdH{NXA*AAo1QKPuS zh$d%OUcSVbb&B><))ciz83B&btF(lS=Ds%QBo?IBGjX6!0TLSH{lAV8O^rJxF0~MC zy(&039Yb`>95XRGoaOihQ`}BQ%s~zD8}vAj6EMyTg_ecw05nmpj^Gz;nA-t1s3(^1 z9zJS31rG4=fDcwm8Fe6oLcWFNTUjp4t9YD;4Jvb!@KADzh0k*dY-@uZJ;Q3OuS;u_ z$4(|?iaM6p>MX>wb{66>Q}jC~0_S&caa0;VcG^%g^{g{puT!K()Nnu%Q4XtF zU78P*0qu+kg1F7sR7u6nb~QR-?5kK zF&!?ROR|DbaJ&2jhUZQ`6o+yrYec!t_DZ%bZK2q;^F}$b7#{}zg>Cn~0Tw$q%^V{7 zy-DraRy0%jRocijxWLzsx?ctH1^pvvPNgL?07e4IJ1|5Qi!=|_U@aE}AnW)F`W8Dk zi%899-)TPkU*5YeSk*F&qOhN|j!V4bwmRR1^D7;%_ABG4GRY2J&U_Gti4NJ`0`M^6 zAf`?1OC%>rWXX>CfHTDY*>y&;81v*c%fvOD#o5>mpcx9U583B&%<{m+HH(DwP@pL^a#}sOFRa2UNX9G*Lx#%0=s1 zO&YEWhwA4y@O75NG@|dstjK7h;#2Cx0x+QY2<34^o^vCjW-VevI9aW+r+}!i7TKhq zf$dJxxUn<1r!*k?sSC)b?XVDjz;E(J6ZnCvG!&|t>84;^zXjWLR1)ZhC!j??zcV9e zjvyVB3QV{;zVqj-F(ppe^a1DyVUd{MiQP6IZALfu>7Y=I7t3!`!XUZRX~jNQOQB*N z;i37y6P!g=&fcO-nLtj-5Sg^TD9ibK1DWcpSSPP?v_7%!Zh)o3QV?Th5T-FoBt=_^ zB3Nia?VNnW)iLo$ONFzh+#C|QMlTiaT1-llyL}5@9*D|qsbaf1TZ&9!`x5H14JB~_ zXv|*15W3@hF_E6%wqmXMhh%8!A95zC)i$5R>Cj!s;fe`XWtz9~eP+cPxI$QkCPpHT zWJpdo*16Ye3p&KLmo^4klpE zNG#aehv_oEJD8t0RUcz{%zW+gIySZ&=xJH-#TZw2r~HZ7M7M@hJihbZnWtNGxOIZ{ z>c?yV-;4r+)=D|ZV+)kWzQxnl9vf+mQQbl~hy5&6$bU2Up=C-Nh&ybxBRN3>Q+<<) z-P-~QU)+E2c;hdcU`lGq)Ql2fgE79||E9jqTPosRKl~Z^|Ae|+5@5Vy|1b9*?SFQ! ze)p7D9DB^BpZ5CV-rf8AZH&C69U7yWCCG!N!y16EzW!n{kx}~@^DxRk%|)69`|9BC z-FttT&8>pR^>-^kifJRRHey@!{g+Fibr*dvws26ly2|x;r96sq!{bm32 z`*&-Yw{$DIMJ%&q6E;Q2pLlNA%SA4!wLwF1T=5%tJtTYq zJ?q3wRiLOC%D6~U-Drinn!+Ana%iph^%wlN3w3G<&M^6**)vPEUIIF3xa&3Z(xz_Y zEiO~9S(EF4k#DNO%1v0PEiApPdY_gGx*!cUcDKs^m;fds&rNgI(;kx#(o1l{M{P7| zCudwm)na%ldViz~L&jq<@75SZ0z_mZQnM`?tC_!__sot#Lq$S+BP2GJ9*v`nau8+4 zo2;{ymg1stDE|S@SZm*NpOaVR@}#1<@JMX3d~4=f6M%8ZatwNrZogtbc+Y%P3Zgok zIn%A~_SSYPp9#g(9929V$GM_OUY`bg43U^3k(CM=6^|K3HO zJ$ZHd@`h^Iz1nXju&}j735Ryd!Mj@9+DXYX&Q$XK4V8g^d7+Dy-&UQbsJF>(DZy+> zf&*#(5+(eyjRer}+=MtKtb~oG@`Ay73i95DXWRAuB>yxNbreCZAGlK zJW=pyXH;)9^?!r|wDioJm7kR9Z+e=~@+$!HBrUnutfHF{vPKeG2C-Sdk!fRL#2m=S z6@oD7P$Vzs2Y~@P?qsw8%_AHs*gLwoMEv!UEJcWncIIIhnYJ(Nd!|*%RIe#J1o^=AGFo*Fz8jn4RUHH8uV_ly=otdr#9mbHRJM%jT=t!RLq9 zrzYR+asyK2yJ=9$m|k?^GDoEvUQq8;7~mE!n}9!_<5I!*>sDrTB1b1@j5{Fp*Rx{0WGMT|^YK_pPDD(SC^otWv(o8EG=cMG5O znIvC~US%JFQh1c54H#t>KZWs-`J%;ld$+#lX9>Y9|MwUkbCMMN(Bsa}H-5x2XfXeb zqlpTLXFb9o0&}KyE4SG7wx0H2;`h*iAn@>&-oR)?HS53PDL=lNF2!uU7XM@uW?zsM zz%9``iSGC$Q7_^zv6&{VUf0U}(M|X6{V$9emknr`-tF9E*Q<>xJy9341le_*C`>3( zSD}DHXao0OVq_J`JQA0=oSVlRyC3BLQ5@Xec6nJ~3%7^`0HrmJbmM>VXKL1N=PX@R zIrkJMmq*l?)l`4(wyV@eLd*R}kM;|2`F0oVFHZ#2fIw9v}p8*?8u6s zMOP(>55kpw4%myD1FWJkt@bfYc&dudxNAXr82Gz3)c5M2ow`bUzb(CiQ=G?49L}kf z9w+m`p4_HbqfX$L`gieH?QOTEh{R@Ho|LpUxY|PrZ{HdE!DeP=}kBhW_Kzc za!o_ir_C*kmbJKv{wA$xZ2|bi8rS9v8|>7%-pK?BZ{i=z__Xw8lyp7{MiqNJMdmZ7 z!3HJMDxU@xY0+efH>RhuXZ~)fg$b|z+4H*dHWQk0G@`{DK@9>oJ=yr@8E0PKz5CBg z7V%Ux&;iVF1sC{DeDN^Drf3S8_+RZ zrrD<*6j<*p*guwvPjLQx8b<}-MKk2Pi7aRaz+|J>dKmZfR8EH) z*T|OO_Uk;bhA*#IQ&-XTJ{%Lhvv(U=8y31c@901OjWG_N(1|7#?3g8mEs#mUNFuVE}Nyl}YOhweD57{i(HMQYz(K;^i!Rgza?LE+txz!G47pj<|*kacvluzG3Ds zwy>EuKiI0*^tbS8ETNZ*vTGa*A4fN>fNJrKp2DP!OG}lc?%r%i+eW!pg9NA$INjJW zuDR)df-tXf2S|z60iu}Fm1zhR44V*CgkhW3PapS6myJjq`7RSx7RsYHzTFT!6&wmP zL@7`*o&-1biNH)77oqZ|whAYh%-m;CnY8eyn_0?KpQEGHa)?sPec;KS;T&R6aUk*d zBFE9?{6dRd{;?1Y^Vyff=w%?VH&NM0XIQ;r=Dhtmc0RNTsD7K)Av55CxHn2Flk5sv z|NbWkkx5!M*3u)B{}l&a+9lVsoI@501G~5ILcEHJ6%sO(y)RA}(jmy3IAUz1Vn@^d z)C9CF8(m+jVRZHo^FjHEsLR2Xrq^;ao0tQ<(|rq`)Uj2)Jd9zD_~sfewnOWqt#aZ3 zYy|8MV&*pvsMEUWl*F92YL(d8UiUJ)N1%L$Vtn~Zp?8wy1+jA}Xl%!65+{gipI0mD z<`<2kpkM3)nkE|vn5}@??a@lwtob*w^%Xi)ad%NEMuFbnH+Y9~0}Ixa%EMkX3s0}5 z(uln>vyno5ZDa-D0J;L#eR`joK;~NTZYvnVcJyY{{CdWill056+kDwIa2ktGDgo^Y zzAp?m&{McQ}Y06S_E z2D1=4>Y{L-QwdfrvZnKL-$c$joGaE=aPY~il)EUpI8-0}@WIgsPxRd)TgZ#e#?9i) zeO$mfL~yL{$?`BcUQhg$&RrwaYv*8{xw&`=&D@LQ*{CE53+K{r>Q&LWRNgaKotm() zQ+x9`sw+2pcc`$Lh8|_cwmN8QDj7S}drTrKwfQqCK*|1waAP_3o(|+bJ>}v3L0;%( zj~otF?BS_J|1{eCW*CIPPvUQP=>6IFKsF zseA&Sm5%q24FMjlN<$7&Q<9|}F?`yOW0}8+4WGhq3q0C;?!PE6)w0%j5Fw4zW_Mzo z@d#2Fz}#-KbQ;I&ca@V+$2{;{JAQSt@%4){%h%#n2K}~kp*z(ASC&#NU2ou&rmpMc zJzPg}-mTSoWBLQowp{c-m6RvKY93LNz{S5z0>;b8L{f_XH)P@j%6#ZRc{8GCe% zIVxYIze8lAPl`8sX8ZoDYX1@Xv;@HGmpwZckPm`cEeXYLr}Z@hhG~d%x;vgAk#!R# zPOe~|Q!l^ZxDl_JyMX+IRZ%B_>EbJdVdA)G1SYH=FCf0raGcCzLU-trMQ*z^Yo$q| z5jzwkTXcCfdKpA9S_4C8=oa@^0Buc26%n=S65L)+(OLxlcw?ROa6C3tA1+HZq)m4p z7(tw^rs^KR2foxqA3)${ZtESonqMYTFNrEVgoUoZk5YeM!3|w}4VGqtuJ|Gb4=U?R zaCGZjWJbgSPoBDns?TZb1v&Jr?7xcMRoNQn{?KwMM0`P zOfOZ%+O8g)Gam`5Yrx3OHTaovs(!9{Een}!Y+W6_st;D%BA#RSTW6afj`%-Sy<_oD zC6eQVEUf`14CO{RV&+y=l%#nxZoV6>SxTa28;7lM4E04`=Im#tB_U<^ep9f;t|@fo z6-}EUe!{c&+cnvf@8!>*D+0HYutom?m#rv+P_|uSfmr|p0i}R=h2JJzGt%0=!-6P7 z=D1;!2Y8%Fp_@~M<<=jmaHy%GoM5uP{3-=x3{%G{!=mH^ZQ@iQkdzhZs-!k6GyGOvPByvdV~QBd{W zQbCnp8XVs{V&6bjCGOc`Z3`5+mB%$qA^%s&8q9p@0vMKT6I;XSg%HQ z0g&w0Z9#}i!M8J*c!`yvDfws{shBknavd4)(5d{;)5^Kh+i^g&-oM6n5NG!kYrw=- z*;R!mJS-OIiOiO6iDqZ6PR=#TBvC8jmi!J@yM0IVJR0f>Hvrq><{n&`v*=80K`n<7 zYdLNi3rK&TEI`gqMWk23S8ufv3twLSeypG(+egIL8RYegrD(J85<{;a;m%F71u%*P zNxe){CX)rX4nifBDNgkUD9PbV^KALH%b`%cgZRc}Jqq*ZuU}nQCMGEHhHT#8dN`mC zqgt|?bL^7g-|5rKJz*c-|L{{5wn#NP@!#TQIRU3AEH~*z;41=IiBz^kXJXl}KX!z; z0V%R=KflNNJe6MC9yXbsvIwvoq!-Ld#n2$9y#_gb)oy`{*Z8QeHappvK}()OOeYGU zrBV2(&#fokyal$Wm~DcWuz+zr6uchL1m==F(j3y!_{Z z)hQ5bR&?nLbi?8Y!rjt(6y3-569`_h#(Xj|iUR^sRYOJ2)Ld#kU zVK)2W@I7q4`dDu0>;5>uWQIcQ&~g8(PwvAMpfe~HuHTydDDEf~N~g$CL;WUA-)x|O z=lL07LxDumJk9m3RHj$r^q%mz-=~LhTZC)4#{2B@sP2m+>2~&$@mOV8^eIx3cl_!o zrC19XCpGXLXHuJ38__lcBD{DT2zUp)Z*LU@^h2WfISBZVE)TtfGg;-KigetDsS}n? zT!MbWU3ob!Ia?|4+N9IPAyP15KVnBw&0W?^%c?X36l z%e)M9@soAkZ(gQx(AmaAZW|t;B(((eR7P&CGX9z`@IzyhDRf8~Pi|h5^*t2f4yCdO z9od`g#*g3!@pC;3qNCeEz9`&hJ_jO_7{ptZ<;ZgNA_02DB&X744&H=}j)TuVOY0{> z4W3N}koq0#cwxDP3^`rfye7^4Oc>l zznK;m-6cvGkVxJ2JRv0hUkQ??GKZNVLvhED!4NtfOtx6A`$`bFkp~4C40-8i7ri81 z;Yg4(({`=XyI%hI2Km}Xz@TQA=~ZTR{NcP&KoG(`y0L$w?F{$S9UsB+dOWTy*jX*E z0e4>8k+Z%bb=*%rLPFUJJ3yu(u)N5LK1zo!VU}K<;ip}E(OFd}2WjKiRb^wbO=nKF z9Zs5Gk@a-rbdj#|p!>AH)HTfY5^G)hzAY4m{cQbOzLL&mRy%pgs#17LT6Me_!tOv6 zFm<61j^MFcEn-YXnL|BecA6T>upl1%#r2Vsz4q6l!o?+qBoBSEm?==u8~RW^zs7=7 zPH>8K#Ox`;ttHcyxG1`f6fkq+*co%{PEJ{^(tAsSAhC1+c&X-Zrb_*o+lacmIUOGE zYJi7EO+ru_c_ZQIwu)x3Gfm`B_a)(6zJ$70-h?A8GN86sM3GmqONZw+07#zLX?hZ6 zPL3c?w}L=+y<4I_VuU;cPCq7@J7u2fRtCEuWXnZ&JA@|*OAlg-^Q<(3afRx0QPp{*ca{>@B zS2k|i4+PcPk*YFj?h$?r`4O8cBMqv1hW8KW(scVwcXj*LPhO&Ga=)d5@~n~GLLh2k z&tBLFk=N>%294UJM=KKgJ?45#E5~;0q6v}rBOTQ0=9I}y9eJNXi{1!0Swl$6stT*l2tXevVw-_~iymi!K2x1W#8E%#_1`Q!fEFRjhc?jJ^@Y9lp)$L5qc*5-fQo2Zp z2ediYqc%(`x5Qm*&fKCfIYqjAX|~^`HCs}SoX^N=87;lRVL7Xvube``S`|IX!RUDK zo1lhgFRE?nP7r$!-9W+)ad0;ehkfFPZ%zrJ2d zUYo?aTxg7Dhd1Kzsc)wlCu`gcUN7tHZANgc^-GITZC{5s2e(Hrthg&(&CXpfz??08 zSO%WSv0hy#1P=Tw8kevGaiY5L^shte^ycOlpL}}%;H&!&kx0gW79T&*l*!!C-m@jt z9=}2)+@17Q;cqTOlrN@y@*7g{u$&mEgr|qQyE34$=-Ez>a!oqGU7-fMKK#uem#a;c z^@x+YlniRZW_7LUB+<(->|d6cdF4!r4A`ktJ~pSZWkpQ z!?wtL?m{(JI|5vq!_aYeFPX`MJbq52WE91^)y{xs5s-jp1L|UoanZ#kN~!cv>@h#D zkOp<8M4~x@$5=^gj8U@4CgM5O;k$W$AVTXR=#-h{0d%<;w}8z_7~_}PJC$sC8v0Ku z=I1k`Fn6Do<1_c-H0pr(Ze&lN&goIc4RtVigV?E)=8UP{m*6z;eOHJg1xgQdyp=rE za*fV&D6MRDj<|7Xv~$D>_G3~+o*(SFeyOej8p^4iGN8sK7Z|9I4O~*r%Cb|16^YLs z-ipZ!=XKlqox#&6qiG1Sv??K+lkzPYxJ0**y}BF*h4LgEH^@7`#RK{Xp7N|(={+h2 z7#*ep{+QW_3FPBFWzyy+SlB^s9L(;QC&TuaHFA5e z)i2-ByOlAv;c3RGo8U4AV=c$v^r+ZQQ>$D+4ai+b^}oD0f5Y{dJgpP3I{W!3?uV_b zv!Gmg+sAq&%!55oL}^d&%QH`~m;_JBJA+ksxko5UVoP)h>pO*szN#XP899``+57i_B3#@)4Ka#O;RLRBFSn>AbQJf;KKAVq ztB>nb$fn9~;h&TnP~6rvRXR%_89ZU~k1xI0jF-Lp!ME@7vJ$v*HPqL$x2eVlK!iPN z*$rN|#vD1Zp>lq5a%^K-W5-8!q@z$ZfzEOYF9iyE#RPKgcB{)C(fRF+WykWpJbsQF z{hpscySV%i!timba}IxX5X*g2;kfTWn4V|~2ht3o588y8++ND#E-$>03$^rw1@o?! zenIkeLR8=N6xa4-0<~EXrC~?y#teJ`HOK5&iB4@^j=}(>?P;GfO0gDwWaq4=!mcOm zFAp5F`)2Cp&X1o4f5Fo3$V0P!F&1)e~|6@sh(;r>x|#%{I`F*N8E#W zLBGDsQ)(`VhuP_4euO8|zIakPMlQ^D5@Dzs`3W9RosUc;`B%fVYD%xSH8CI4yOUZu z*UZat91ICPxyN>h2bs{p`0{bX`S=BO`1BN1g0EfYg6+zOcuk;Aj=_Cmm;t5fH+TQO zahRDa{Qvh6bB)FOysAQ?&?n|3h$dY~p&fA{KtZ_I=f~UGV?rAOktv=b$`pl6N7ViE z)^M)|?aMYAYPO^n*6K8Y4w^N_?O-8rT6rB$>HBvraOA~Fb!~`44lcnm0J4BFNgFUv z$BBzu?@29!QkE~QvZ#~SA@XWhMtIU%q=Wtn*{6a^$|xYQE_g2yPIwYH`r^kH0?7G2 zMC-w>3(Z&!b2yu#IoEfIivTpV9fx(SJP#;ddWgB{TOYW;+Lh?D3gkTDYOAn^r$5^- z2MJj%qg7ahYuIXJs{=avp>|HbI8M-<(5f78sJRng6{x^{1*1y%0A=7|6p7m+L z?E+%$x&wPe@uW$EP(adTRc7W$*ikAS-kvCY2@3`+OIXFv+fg3tf-DcI68m<$Si|8O zMIhiV_pVY7G@Ajhk26)$6M_0Udb$(Rtbs){M11!N6?qaVdjMxRc$F!sGG8M?l)IjM~fx&tdOHBy9lJX-i`L;0dB{FTL}K2o z4~-TJyYm{}H?(pwHV8y@j@#M0iJ+x(+)otage?pyRP&CSGB zYQyakM=xGoe()y$y~MS|`MB8l;2VVWVk32?{Oj8z{vr6nAKn@4JO@u(ZH}A;Fi*X@%IqtY4@B@O;ZU#rm{nT#FlP_%> zQ$HYZ!Oew}W}kJV0DiLT6$Tju3fF?9b^gX+aV3@6v@>5B5+sdXfqc~#>$k?Bu8%YF z8DkJlicMqS1pVe1+&6X3V*dURYuq?ddGKOeW**TwttoZ@SKrwJljTf{`$aC+_O^0$ zdR*hl=)s0jjP^qURqORC2wA1@eQI&ScT4TLKo+{PfiJ02MPC;3uT8qMr;| z5D{Ii?|sDFaJy`;G(o@BIR?j}I>!(#h`=N2@ZTI=q+Jx)=rc}G2OrkA$asYejhstD zkg5nQ6p6S9)ABZeXA6Mm))j!qPf>Jpfaf1lq_=g4G92(B(IVPa_vZes9GI&EayQGp z*5IVdfpso_fznkD{4$y`H;bs1ziYTzt|s9}zxy3@Bk9Fo)7^gW#^(18^=bIzz1A87 zgdq|DUT-6K{16UAYYBh2JOev}o40P^j&chLI|(zss6Luc&z=JNMQj;{?9*$&N863C zF&dJvtxp2wMDdh;p@1}1#roHW>BAAHb81A7QN75BYg-&zL#*{b(J{P|)*~bx>#)EN z>2ePbCSEe0NG;%Ddz6dcd2}SG7|f0}q@nfW;cz>Uniu6q-{ls*lZ`)q%-iuecooD$ zWb*m3<`1}Ux%*hou5_D5;fbib^F#H`(x9qJ=Rx#ILJMOTd3=dov&kX zYlH6Cu3+4{5NAr`8XyxwZEpu^|BfOkk|Ad=9y=^8!;UxJM+Cju@bP<$$x8o)g>T+q zUB{%J&t^0#7Hdmj?uMAt>KkDr5y#J^DPyX$*M-T2Q1n>Rv;fPNPwZ^`PAkN zPcDEEAOe$~Q-I{FAqo)RT8ekt>@_`#c=OU43v{*A%gjbxjM6K^1;dnXXg*s4FZqV3 zyw=6&BX)C-iloFY7Kw5Ng;8^c9PgZUXNoCz5n2t4ZBS6Htl*H)y$;Ry)TTDCI zw?DP=nKZx)aPnu0=q{|{XY3O<;-~jstw4~xYg>Dz>v+HpY@6%oM{jtfyF62$KA{Z+ zIDjP(*P@v#URdR&+23V1S0t?9|2ek7`2=Rj++Lr(JcT8jl&VMA*{aSvce&jCh_dUo zj7e6Ceyd29Me_|fjg zU($=|xO%@*#A4mhgO!tQpHg(hNQG7TgVCdu{8Qb+!`q*=lz^G6MkGY*Ic;I&kuo<} z;LbUGB1&GQv76+qyI3`=No_lXTb(wxqKjY55c z;H^8UPm>@i(0=P17N$4QYES6>i)VQ<7HGIh!zY7Z*SiVCW`O!81?gDP{3 zCkD|N+H>>2i1lu!Mr}cpDk4xW{oP|+1k+W;l4%0=58CJb)13Gs~_+!g^439jj|EPwo_2BSVtQM>@ppXsKoEo*%^!64!*f%?ZRtj zT1_}gwoUIHpH%~b+O_foT%;N;6$Rv=S7vF_jc-MxOkv758c0z_dVfLPW zAM2X!?2^d1P>K}Oy`8gfGs${3tXNxKGCkF5LupLAQ)IOqAtrTI)cTB=Q1d{nc5hmG zm%oghht`6AZIq|T`9Dh1h-V4m5jvD5NlWTVq2*hyjOZqjd`jAt@oR$Ws_zJ5u%zvj zST1|meIh&>Pm-{y=#?TgdapTvOJA+&N`n2DRDay2u6>J4Mle1e_}dR>&n}<*N5y8~ zw&x$?D}F?A(nox02GN>sv@%%k`Nz2Sc!!kp3DEw#pR~Upw7>s><^LiF5#5s7iW{qE z34g?B4HhAK`-yi1@s+|n??D{2&PbgLIj!815ao@MOseMa*9g%}uV!bxnpN!ONltQG z+nEc=Wra+kMsjv_B)72S9HjNJ#=FWG4NPBRs#4+5qkCq+i_iz{H3;#QeQqk;mg=U2 z(;-s9k~etktcn~HT)aYnX+MyAZ`g=?QFTaYhae!ZD`?eC+KEc-w7_2U8NqH%?$p`u^5qWW%Z|?_-9$cK6=FHy`kyZ)v(BpG|k6clJ}9iXEsL`i80@ z%+t60!N2~UKgx^ar0{{$Us1PscAT=-skXL^Bx|n#iSNryXiG1Zph&2+%P-XFighWS8*K%o--sIDt%*GI{=RwUOM!^@jBDj&CB{0*_#jES*lphaMJW5RNYvZ?i); z`c;<;p4Nl;N0@1~z8|KhGt5vKYEwp=!l{`D z808H!AlI!&?R?fOm^vS9frr4pGSAT)R>WjLu`%5;_{g~C6I(CxMCG_lX6^wwzJ(9AqJ^PkW$9!}L*d3E@*W4QWnCq)orvepSkXn`FJZ#o z^}|!n{;>1;CG@;g7pvwS2@4=YKWSklv=8-Wcj^)T-Q(m%E3s0{&4veEUrd5kVC1UG z=@lulig-(Il7_9xO>(RAvsV!O-PWTix?@526n?3uIu){K_V@H+EcXmLwLP=vBl?1^ zz!aAH8Gfc7TqkI z0_}TkQM-k(wZ|rFsR<1JXu+_zaBB%a+BSEB=m5~FNHtD4b&WpoDhZS4_-gD-vP5F` z?d(Bbc$$l}c^hXRKk{W1r1F~IdK-?(%G>%C^vk#LGR^dq27KGxTo8m%bzHqC(5}y0 zn|H3@n|?}8agJ{$%WOU(iQqrofAHY`gU{eTsKTYz9Ba5wi@47o?SH|=jh`{1iJ$wQ z-v6W@K)wI)0aqt;M!F@LN%x40_mc!y3BUEx_vy;}f2I>!A!JuON9$#;vt)Oou+R)} z(l;X8ntk}s@9NuM-}*7Hyq;aLy5P6xJ~$>*Hf*m=Z;8ev(_8c8zUkk$!zFKL8(vZG z)ZOTBt0_kqI}=Eec9x;dc{eYf=rHm1_Vv3w*1Y1V;r^DA4Sf)3%{Mk!gu8V}k`ZdB z864qzj*tn!HfaVd*Qqg-VjZn|W)Ni7(x8t0mj-M?hUdIbMOK$g&H?Y_W zcz(kpg9x+pbe5~NF=@wJ!8`^o+F zaz`hh1=)&vnxn6=mJyXQ0>dkE<;`BgyJ93H$KIC^>oA~HcGv5wZrfdnP;yK>T zF-_4}0bSnpRWOT{Ej*q%Oib~%E$?bBeA7?`OcEO^@>OYSUbD3+i?g}>afl-&$~}4K zhLK6B+@XbdZZ6V}V|gxL9qAAyG-~DA8e`wFbhqR`Ka>U#&$u_!GEc6C2yNlGKpEMP<$c|c>( z1f`-)OvDlXt0oX}d`qhWf^3m5TQZktvvZjY)98auKHc)gy!B&Nw^h4?09UL|>AY~( z0TW63{_o6X1(kPujI;rB$~X2bC~NKkOJWbEP2oP%o`o&RY5jKOg84{0NELX|w@3A{ zkq){rfBb5h-)as$6|O6EU8wpNt2}J5w;KsIu=0cj->K&vT{&hklp$1$YiBdWR=e#j zOVaHTNwx(#jD8dyewGDtE%s#73Wd+FTTMW{gJ2Gu63~K)wk$BL#*B^a+6T~^$On4o z`uLcbf~uOCs#1ZV!#8si*nMynrRpUe9i^o3ijPST+V(_=^EsRGbRv5i@bKv%M(gmx zM?PoK#L-zh#bb(V?%gy)A6m23T^<*E(~pqFgdx?e>eg*zR7+w3&11dwHOH-Nzxdysz=lHq;3??y&b#+jzqGPyyRWgSTq?SGo2MM17(oOW}9fh zB`|Tx$$sO9K$QLY?!^qNkBbvTso>86)K_6sC)U(j5$Lgu;o8Q(ioen!95*7hWY@R= z(eVx-Sq84}IlCJ@m1fIWODk>*tHY8Mrl?DpEUcl|blyxBXVu(Leg@%o_=5+ z69GC@*S$BiZn6L{>Qy>kotV}&;7{rY<~J8Nq;=noZZLM%Tbs|^_K30@daK+?FplEJ z<>T-Ctmy5E^;a7dNx~iK26d&;sq5|nwR+Dc&A>nW&~D&@w9v5M%?I<<;WUOYOc7X1 z|5K>kk+SeOnm?Bu-b~YKlI;9cIq16`&n8?vY(!02g}7UH`L^JbV3k5nJ>_rye3hvGy64;5Nl6r7-~EV9lI3?H-BM_tnKD|)Sd zymj*r+MW-ArY`Jp<{dy*w6(Ri#HC630Okh0?@uu~2rZ1M}`GJcA?& z_~`0Vmv-~5$d4@tHm@K*d`e681@dEM8&}Z%!z$adnvVN0*;KCwL0}&N5N^O8s-cZNibs(7`@K1zECa&Lh4ouzP~mst!cDyJMv12z|H=rT zrc}6UrEgM_H8%0<0Jt?Swg!_HtIhHT?hz~9s*|&dZHfqa{o=KY`Ah*{7Qvx&L+-^v z5BBVBM}77X#jPu%=%>KM0b#jHVDFv7cRmFWIz8l4+{=pR?5DkTQ-tcBPtP~FOd?1d zb!KTkNyiAfP*8fC{*>wGC%%@d!Mf=X`dN-ODvFvBLf6Ocr;tT`Gt`T|cPzAfQZ5XX z`-w^^>Pfd9f+hjG@BB>Y^3E^4cK~1SP!6B3|FVY5{7bWTs(Uw~W%rt|tKVo{Sk^Eq z@u<%dp`l~K8vRt==rUiJ_ttBR$6%)%-YTP2=|q`)D!3Ha3;g0CKH|mBeeqpWWHmks zVFpFwzIBV)YGXiHs-HppY?=(nAYn1JTsjF@47C40o2fQx51I7%fRH|yaiFkk_Y4cYr$@K__BwaX+ z0_8rvp90W&$ao;8WYk==z^lAa_U!ln>i9jIL;;R$XM(zWN&?WDZ!74cC|mIkUY_TGULMg_UVqfSdv%s3%jeirr)fya zj|ruqt)3c)f?$&Cc&0ApWIMA$@pZD>f{IllF+jc$o-pkHY zZLnNVry@6#^jjT{rX~H@X`8Cuuw~61K5XaOl)U!Js3xrTBqU1`dvaeAfAk(L$~e4} zg81W&f4leXUmrfYTduFZ7$5v)|MRc!v11>y0iQhl;){C^4y4T;>in`Ax=eViA-4}C z7OQWAzUQ^S=g(RGB7i=Qr zHaE&!mG(wE)2GmGIR$nPQBbuY)Sv`Vq2Abl%j!|oJL`wTb4njGTXG-D@X>=lTOeUf<4)| z_O9hfbMo@fShU?8TkDSqGT>vc9`-$O+-zu40d%@y;T5AaMr)C5SwXlgMiA$Zo;Xmd zMVQDOZba<&Jj9&dK1_>bwZ(I=oV|3uaJ!BoYEVRJ8%UHY*>j4~S~~4qmw~FuB=9I} zM?F>5xQcIL@xVn+NN9E@ZH4Ww*sRbi84wcfU;lTV|0icBwsnGcH?QBZ(0=!3I-Qk= zUk~L@4lXy5iRyDm&s$I#z7yInXVGZaZAS^XoaH7~SGy*y6e9_rz&!whPh>E$3=4dk z#iG4RFGLD#YOtPWXMG_#u#;swS7_6f?@hL1pNVB>bF^&tTl)2qW!?R|dqekLnuw!02%1DUDJh4z7X)c*9!_zG3 zP<<-9nSt@_OTZUJ1B$Mi8%{^S3hjxy=ro1uvpRK(WH^$B{7M+Kc7Rg3kHsr&M;CNb zQyP+4y!?S2r8#0)VJ?Hsry@a`0w(QvJ1ckqy95KgqI}JYOtLo=!OR=ff-sB-E56xa zQD+k$rqyecE}Sa0KdM_S7K$p_tg0guRXV>ov9o(pYgvYe5s=BXc1ls0g~~)7ILO-| z-&%0}GL>Rt_w}Wo)8RRi)bl(6%@;Fx*2>sWq_a#!%d+N<$Vx&*4d`w}U{2W9iF@vYW`uVrR*QN~Rr@$jD| z=8~VyapwtLWL2ZwQyui_-@t6>i2?^d3yFC;z<+AKk~?2fTuB{xQiD0yQP8HrOH+B4 z3;hkkp{Tl!rPCUUaRKAU-ke7ArfFe`l6(l%su+=5GWiWWT0-S4xFGSvb=Kd6SJ^H7 zq8WOE-+Ue$bP0BI`}X$Q-kqF+;xewc;sRbtzI_E3@KYS&d2yBy-A%OW9g-REd`fcV z&--5-Fc}nw6aGE@$*hpyLajdjWbnEmgr z<>fhHj0<1Wt6I!!uc2-NL=J?DUXUMYQCPaiS}Igx=sTaDDS@XOCl?`BXa#o04UAI^ z8HF;BA!pb^r}N0hjLD#m7qo($lBZZG=WJc*5pB!Ds5>QiJ(D#hzvx>xs?I5bd-%Yd z+t$tWjmfUC3KdQ19+!&CvIyPdjj%6KzQ1AJV<6n_CQ_7H1tQX)<|Zv67xwJu36V+%r5trN$R6&uVlaXkY^-y7s_u z_U}Yj3i!ozm6)vXCv;e(gjH?L0l|2y{O%>H7KteOm&<1TO_=|55kJ%^4!&ydU>=jW zXo>&7;@-R|t}IFO{+~}#Gi_}O)rd?Y0+5t7S#5|dDM`RUs46w7Hkky$BC)7hQmMD6 zzx(@p9`|$Zy%7OYW!FrnSt5wI_bh(=_`c-!Bdyk6M~A=eg(Cb~$q&p~P(*U4`AC&H zL!Buyrxkz}(R5Y-RvaA@KZ`_s8iFHOU;-E1OY#_Ls#4QlN}0gI5yaRAAvz3NYMWmZ zV?XV^k`qCZby(6&E2k8VhV_~X>rUE8SyxdsF(i6L5(!z{C#-`nW(Ts?$yn=3C^>G} z6h6icIUHkov;^9cW%sw>QtK=dh@JL+9<6WF2xD7?IqMQW7!W^b=c=strPpUKu&#JB zRcR;Y2NT(K@kLuU!h+ad43-3)RlaPyK^0gt2B5K&0DEhC0!mwN=n?>va~8LRH6eVy zt;H8p8odo%%VCRfrijGQkadscF#zGq)UGpd(trgG9AU;8VI~Fi*)kM_axBvNCZH*9 z9Tv45Db44Ym~xZqI$bJ z01~${x`;1cx2Us4kxi!}@(6p1M-;0IaZ$u_BSo z;8#d|LD16Z3uGNaX^$(!M;uDl_3qRHjqIKlOpV1Ejy3`=HbFt_qAcx+;h27SEPD$O zpyI7CUC25CFhfa)=B89#utg?x5mq2dAN}N`ny+?jx=`rVg{;Tu5(E+ub?m%R5Cx_z zOc4~Q2@m?I#K+U`sPJJ(tkAZ4o|@qV88e>oPd=~Sb7eQ5apkaz5s|W;Q#gE zT&-4-YGdVFWMz(Rvr_P;7^MoEtHqTK>bfnGaKuAp98^yC@QEFQ#VlQ1Z$XlnKd>^$ z3hE%g1lM@%6=jGzzZU`1YL{&~)jECL+jO6(SGzpdMpoAg4_}qg6%cN0?d^}4#CwGZ zv%aUU2G_Z&@Do-BnkDqP9~BP*&%2j`M@>GGom=h|EQmb9u$i%;jB$DOKn2~)uz;#l zh8gb{=1_uBN&37XtO|q6f&(!CWX7aY?QG@cIveP&H?JKm^&M-dFpU#!S_%;Pkz}{= z(1_ucC9+H0B}P0;ug-HZMxEHDMW+$Q?v|oKVnM9bTJ7i1mTu&PituF!^%-3&=ua3d z53m+Qta4wFwUV18SPJ$Pu3%3S#O)r_VC z4Vynv)t+IB_s~`L;+i!~4AT>!fF(#1^8i#CTS{}$J-{fYnweWpLrHhb22`3Oy5Fpa z?mq|locrg0-lZ?x4+P;nmP$3H`|DE(U|aV;hQ1F`QAHQ4iqFmgzq!qBxD8hJ_H7X0 zskN=W_0`eVU(x&r3(`+@2+RnAl;+%AViSId8xed052z^ZE!Bn)jTKp-3ui-QIWn-+ zzj8|8PC1_$Oj3LVLpdqDD#U1Ff9h<7J!Wp{~M^J zn3BTk$SWH<4JF-$<*cnK?!x54OF;~k8>pTB%13O2LGX-+2X2cR{E}@;r5VxT@|A^lO# zn+*^FFPWyUA~ghLfkL$#MXW?U7cqiDioE|Z!V0^b8nS?~Lzm#qoAgRi%R%9?Z{Dc( z;wSJH#378{z(Qall8fq9_G9WL&L%(Owgl$m}LnTqs<(27NK%MYS8C8JS<);`{)Mcl_$0zWv z|JZCAv!-1Yk+%Y^Z%YgH(26z$c7zeo3q}N!S+ERI=Fc7TY^)dwQqbHHhqHJVq`NMY z_YWRo|0j+`CalE@v)~)PF%j;l@x^IkS$H*@owcOA zvNIN`J~CTzTCvVpzAj>fK*uR5A_P^0yb6~2)a+U?F%goG)0Id>Q{rt*ArgLk>KQHE zUPp#xxam8pE`SOwN*#h>5elT}-6{NVL!oCJNKrU5psCz}2gYU@z1oOaC{{crt37yU zQI50bJgTIHQZ)ec6KpUN}B|Z`KxUIHy=s3Ln@s=7_R)T#G1Zyv}q_-8$j; z>XRdHifvWZug2$>)Z`)y%RvQI8w9GvPdk$a$sWrd@cbuc58G|?u#;VChh3Tjsu zk0buT@ulj{ygG3A`XJ`~>1tXc`;Z-SNMsEc0dmw`c>hC&Q=LE=ynO_P;Bf?@98&Dp zpw&@n&%?*+`b3XiR&UdTI%bYqK8px`?-zmcFTFdiB85O>+$X)e<17j+|lIR{&LhK0;@ zHNm;e*BSMW)}ljMX{y|%C?{fDl{KqWLxm|-DTkXd5cAA&cos-akh-J1LM2?dh*VQrfkv`hPY&rmn@;$wZ`Ml}lYINAbNBh7s4Y zOT4)_gp_438$`IY?T9)O&4jD@yPHpE!i=bw7A!Ol(Qc0fQOXE1{s4YV2Z0tPTS{}v zoq)I1jwz{8jqFR5zU2sq%9+BG3?0P6k#)kujH|UAxBuk=>Gy`J9gH(n)XJPN7DP01 zRY2ek;7Q=?`W}Hu_LB>Kp{5W&jIovg%(o+maGu7qay#J0sCiypSKclFwf3tUhPk zzknn8`?SBK)J{T$x+zDW31&!JMD~ z{|7(>T^jfP0~3q8Rf2|vR_WTxA()Z16sM3LRc;I|A0-wk9YD)epCU)# z>mORl7vWJ?BvPO;Xa?Kl-a^Ww01;6s@KcW$NeKVWcN+8mFoZGy{)2z#{Ta7dW|`OI z9ccPUJJ53VIC&hC3ouctUM)obr_xbGwO54gP4QN#44=*~F-R)_%o-PQBq5VSxyz;E zx)$|ME#Lc`6AQxXtev!F+KzMv#a2q@v$nt%Au6WWMYv9Pb6DLF2^N;rPY8j|9-fEx z$lJ|xVmA-e)m|q@X_&2;t7Kg)d!?HsNWWaPMa3}L{00m@GKeUUi*$*r>jY%h-X42>#Y{%EA=c!koQ4@pS;{ zpyCoxeLk>9OmX69Hi4iq@Dv&JpjiAyB_5s0664{C|gVH&l1aeEc7HcFjE6rWkc z$`lD-02N)#yci(S1=4VFX@CIAI%ffiEj+b{*ao|g9KCAxfgqPaP^ymF?CEbwGE9y- z-CP$QC=@+S52R>gVitv(iME!4#{^^n7b zhB>xEtw)H2CFy1ANSe6x(WxV#1YGb$Viz7!29x)n{9y-7PhI*B8TqO~GhQe6zjs^On>yeK7#PrF4EDLVppX zL(XnhO_d>eXx#JLN{G|za7j&B-_NijOLG{FPUS-6(yGv>Mxa_;nP0&oUckL0kiDSx z)=0r+h$UyH?L7Mn7F13`Lu_xZ@^i2>Xu z4J2u4`P~@EQwKBnV_9r`HjH-Ez|=9WCm~ArmnBdSZEl^9e_%R?z4>KYihPj!tCknB zrXlQ4?bqcZp;$<9rB1dEBT7H3nuoYxhENjnYRglm=h`n+zeRVfsjTg{w5}}3%)Kf_ zm+kEAWi4kBPS#8G*rH^jC_3GG7|tUrU5v_O(Q8uojoN2oDAXj2^rzUvWl+rYB*d*T z2ZF3i9mZTKTo?UlWrINfb@7ES)a@RR?Z~t%yBO`pjRY2$Q?nk>#Z08ViwPx-RnqB| zRWgP0?a8q_0JfxwbP#?pvce$7`&4uLKj75j4supeWk?}9K{jH;16fKrf0ouBKu zScb3(MszjmT~wpKo>hdbZCIWG`lOhMk?ifPTePZDD2350;EZeKFcjVv*@)^ALH40J zb(^u2yc9^JsUSkrgTiLKZ-$<_>XuTHSP$hefg3NR3qb{-+@7}VE)`W7EQ(V=Um1)w zG;I#@5MCE)9o0NyZ-Dw}RW*NBUglGDiKQtGL!SbYwuT`e%yRl*)_-161j{};l<-pb zoRn&jsaovrLgZx7c-R(A#lqonbMxiXxVYE0719pnib}&b(z(i4{e^cLGphS`UvgJU zQ@qq7Ixl|EYb7bUJ=vZju9z(Kfg5GWmDwl?ON#9G8kA-l@)Y(ug9?MFMwYVL2#gB7 zTZmU{LO_j*zO9xfx^NM?D08ZD6?p)`p>Q3}_3A2;KBqhYC7?{=?Qw5$VLpqv_(XMC z6eVr*m&!?&7>R259YQ}SQ6_d&>>V;@Q#njVj0b|d%J*WY-ENVe>vj=efs4Q8zQq5P z0qX^Ub-By{9`qMh9!OSx(`2D_BfA+v8vO-5%WOG+0-gBMd(i*O0}KjI{7W(m{;OUE zH=mrHK0%rqv_&a9WHpSIT}q#X9#)`OJEnmA# z&(KI2`f-x$ng+i|l2BC;6DCpi;MQVLyQ@2|wns8_ZRT%4ceJs!{$g$4SD1aFmu|1I zO$ovL5x&2Sp@+mZmWJ_f1V_?C!f|hE=iuu1A1YD_L~x8y&>#v`K?{dc#0Hp-U|CWC zYB3|3-%3C2IyO!(YW-;kA(nwl;w&aC*l6hxAmYgEQh8j`MNq|!l#2lNV)+qPAUk}y z6P#@%j5dJ+LZh?}X^>_olKn-0xh?HP7rFBZoM{&x=fMcUW;vLaIjfGnEkrwsEGFqb zgi3LlunQS+1y9SZ(S@}p963Ld_c`2>^fRAhh-h#r2C$F)Ty)Sy03b!eE~u+dVQa@X z*ACfN2&nU07Z2y<-%gZ{?ia zD-Vi%6T!eK44%rmM8KiqW5s+oMt@!3+kevwgXEuigt%>mu5sgKhoa1e;!8G0o9laf zR0;IhvgH3+jN=M4`|TzkMGtkA8XkSQzsZP4JOer5q4R6#s3(T~O7Pkk?d|T3ctRs$ zx}bZZo>tn9)}C_@@mu@hT@TnDXs|3@Xk)bda_@Nz?a(?tS>6R8O^m5?QjtN@@K+Msk8WajOy(c~G+I(OOQF!@P{h>j%yDZW+5@i5Vc8bCgu zIS>PY75o%psGqk6lf!k^sbt6LjnQcLMOhR3sHkUW#iz68@A1?%bLA$V%EpUVP=eUJ zF8If0;RZma7;>Lp?9>Mjx({lHnb*e-*PBK8IkE^^7rex4K{2*=UO_RmI9x7>wG;3c zCCUJ<4a5^YT%MZP5V~Dtm)SWpc*RJxFv24(5Ij7X>;3W5%@y>e?`!j>w;Gj>lBVhl zQo#NYDPYzT`u$mjnuz!6_orGA`ctU%BsapKLWle5BruBRQo37bOS9OQE6P;h_t)Wx z#2GN|t-N@F+#+%XdpPR7B3x`9kK_8Dyh(N`!thtq@3{Z!Sp=Gbp;C3Uk>Vm*6(j~4 zNYbn7*nyscvuUkF2*W}wrh$b<2nA?kwEpvmE88HF&eJsK;^gpF5@hFOLpS2AUTnWC zD5aD7*c#!mdBx}zT9e*+xmMm0S0HHP@*L_pImuiqQX3nu_8L5kS#Gb+q(zBQb=D;n z3nL_Vn0MOS(QB@Gr5%=6kudp7f-;;mesyrS$_G(LNyaR7D||#MANhabu|ao@uQAHw zx%ZRAh_%q3s@m4oAU`8PM+2Krm;iYZSC^MJ<)iMa;l0suP};ryZtOb?Ww%HdV$(AE zquCzD!uc2JDT#pN;CqC>!tvEeNQls4a8Jxf@xY{Qabxsy<)?BuaquqAphE%;47bjD z=_nWc{^eft-npBF2H}|fR^K*B=)zBHg-;kbAA6cK!~-N}+a6idb{!k@Q5jLB58))h z=wm~&(OLc((Wt#hL|dC6JzXWDNw4Z?6NrR^BxI8jK<#2HuV6CmV5{+a5NTtO&juDI zc`Z7t8#j0?6PkpHt*w^`Ql^HO;4rd1vXKJbz%TrCr(=Sq?)0 z3CQ;7!hs|Vb92Nn&ceIwT|c_H;V-U@Cb)SI4??3nd!!FBa`5x~(akOYm^xnyxcWoZ zkd|D-RhXkVvV_L=YB2xXbi}5x#^q|f4A#&rfRThmnwihVQm=p{9|8pZ^N4z&{Nvpt zS^df%L<%12A0=KSN$O5a?4a4(9+vU1LK84>RW*MRLsjrMj(V+i)c0WTklsn2aCLVB z8guIN3!dh56c&4ld|qJ|p?(M)s{KRWy-HxArq8jPu0X6(xFHv=?(Dwqjx1N-N5&j~ zDI?z@$B{>pLNP%+;sstFw+j*%zv_mxCN}OOTZbC3y1T{|Y452DCml(L@S&%w6d@kk zlA%LGK?mdtTI4=BJ^I4IfnEd~%87QU57NIWaiNsq!U7^QX=vQ5c6%tk$y&`~KLl|C z5fv>Vt!8g+eIpM$G6p*045iA%@YdF8M72sxyzCp2F&2jjoZaU2yKmlQ?-M3CfPTT@ zUG|Rs2Wg7@HS<#5F)KZ_u}O+4tu(XdMfKfa>_gl^;QjjpT?wwFt}S*)e(Ems4{>2G zTQeyny6yG!PN{vW;58AMXU(K>6QKj;x_9o^qYLI?UHtreCtG$L90Fl8*ZVKzVO+pP zi)`CLpF2VISV41I_U`DX-8^7$;@u};u0!n{Gr}NtjX=Wm$UA3bKdTo>*CUus2K6kg z)Irv+!pD7D9EMOuPX`j`{H8N-WpmLMf!M^nyVeXIG zWDL{0!v)2pb|u4=Ypc83dG+nZW%DK`dyB)mhI_;$gula1k-vqsNf{%|jg~6vqj_KV}LNA^#P?5WvfY`N>YuxyXzf# zgLhxPnKw*#xCpF_g2BS0TvNXpInINDy|7V!+Iy(`L;MtU(-$o6v#;@TtE6G-XqICf89JfmLgdG2;QfVXYmfn zoFOuI@T3UEqurlI|8Kc|x-Z(RDMGQZwyvgtHq+ywxIU<)VOqL4Sw&MO&~ zoFzo&9|WM3y7&VD2r-b%l+#0rg8_;XVpTz4e}Dye%8Yg{JtWOZrcse_eE($+W7nYn z6kZjULov_1VF%ESSrpjv><|?cSMIUVw*MqXdr*qj=9V&Fr6)0#eSzd^)DPq)-CSa*XXs@JspC+qnHD-QNIk^pHpN8NckkjU%~!6tb?+Uohim zGxOI3V4~;i)D!3P`=;gqrJNAf>!~fHxl9;{B55EjflrAY9WDa?NyTW1xFdmc6@)3` zI5CPv99OK6^+_}WKJ>4ypsmG*KHIe~s6%fNlAgaVm!O;w#ve;{MvTMvXZeTuOgX!{ zW*Z~g*j-|fz>?>qB7dQDH#Uq@kgK(x&>o(+HZU*YZJfZ=q-%y#U}lFB5Sh~tX-mdtco0rFhK)*Sq3bLw0x0n++?$enY|(rz&4=dX)k zz&#O0blxm?$0dKG`CY9xGR4GxynC-799Y@^S^k%(awO0<2~G=jVx?3Uh+v zJ)#tb?q?W3^bvpXsW`-M7$V!kM|YF6#B-VnU;`bEe_o^h(I4KcGzFr$8V?X=HfgzD z{I9oM>vYz!c36^c0W&y@fH`?AjSI0_uQ_0@!xWzvnp<$mo3GKBf&p8n+#1dTzO>KH z=iAfcSrHdawh>7Nvm0TOID=FSc$Y+4QMwjejOnf)(OZQYdyVF%OI9r6tbUSg)-kkX z(R7w9YTjPC79d+zW6F|p5coMwh&%WxU|%P5MLc)_RG6?$$jD=d+ux& zK|idXTIe@(5~3zsa%{4a`#H$~dD1w^ME7x$I~mE`U}-rmjjv==q+TW#jjss_6*r}S zEG<|_7(7t~L*VAC--BWFKnM(b^^ZPX3KqdEMS5QSBTjcn4Li#nTIm1H(;brC;nQWJ z-*>vhCC<`f!dm1qxKhsZM*cgzTTbAR^Js~kH;%|Qyf#I4I<&8S4G>@5qf_4cSxgAr zNxxxzOQmL((&4t2@swe9%S51kLK-7KM3zTt>YbCJL1Ik_y?WIuwTck5d-~h>414*; z*}G%8=!CBgRb5Kc_oABQfw?w~?yur^Fu#0%&16`<)Gi?jQ!IIsv{LtsOdd(1qvmZK zm{K=xG>G25As&Hv9!W=qVNQ|_1lk}QyW6koBBJ{8w0#zmKDYQ-f%nY2-@K6XUSCjQ zwoWy@;wR2sV#QN$q9xt+CKgdiI!34_45*Y_JL;{J=vG%9KI(0~RNC3*Iw!DRLskLv z*7rN;IrmAZOM|c$6LwUH%I225Cq9|*z{^~nHqMGbVswpUy0u>42%ppBp75^Vq2wDIAVX*_NjT#qGY!mPM@&j!BmSJe+uCvG(rn{qk(2teAFpceiKH1E>DVM3z%?9!xvJ&`W*Rk>5L5 zP~^Ye-MvCPy(?yF_QN1&-j6i4))pr3OUYhEc-{T$>^;O5;NhY;GlA7!HV;&~sp`>e zMQKa#F1{Q!Xd~FAVOSGy{LYChy@7h=JV($&eytO-U?g>&XVJzoA_KF-=I(v-LWAvO zz93(ZQO@O7mg($P3YNw7*)+2R-LtW~CMZ}jIYXstRexz+HDETEX}YX^uy)tl4{deo zx4jwdKPY?fh~n{p1t)3eu-Hxq&%#J;)-n9*Y!b3h&&h0(?_YY&=`~fr{0Hj+`sFLF z?s_PDX7Bd>{VPz2Y;d2=ySIBGSL+!nj{bR6HqRfTaGtsDo)5K*Hr7Nk-V}0DSt#Y) z&AYdL=gg4Hfo4u85|Ci#`bPl-pPd4TvK*8!?!;3|y$3*M#*Lu@SejV(_wPFWhyZaz zH-jLMRgPg12maw|=oa%AKgVGub?yc>ZKVOs3YN%zYGCyKoiw7ExXjC;Kl;kVSTJlH z?Sc~e0pa-bLxUuHvuTN6X2FEWg^++Z_wOVl(`%cxG{T|VKq+f8OkycWB?u+4lu1Hk zDq|v}uy_YX$cU9?K%Cy<@Zi{>ADOz#8|;sCqxGJ-;(BnLy|^nWn04P=JsB- z#=G>PdAj0vrX!4oWJXz*+T5-ZU`7~SC>X8thN#St?1Ok=b$cfT0aqWyGtUdM9grX) zT#`;D8X}p(jTefH)(UJRaoOf=7QMP%>}mH5$GvG72sBAU5(++ZWGW%XLJ2-C3k~VC z8$p2b_wGQ!f}~iI694G)>EX=@?1;rT=jN?1$w&@>*Z-&~p6V|tt9^QGtxnhd^5N82eRgm@5(lurH< zDVD&lLv!d>5&e;-^_lJdHxw)p-TE{GGF0`Hd@R&^Hnk2>4Y^y1P?sSl*WlR&C@%@f zGm(HFOW`M0DV;!BO1N|ofc%8lqNV8Z&LJsqJrH_#RK?l^sm0o)y}am9xCj87a!%ftDA!pcKGf}`@A?f5w2ZHPU?ibD|@ah2QES3jaa+) zkI8Q9phk)-i4qEmYoAetg+$CH3M+?3GkR8{9=^U@;FL@-D1CQG+C!Jse#4L$k`YA( z39=*2VP|@XOMJQxZv7CKzN>ZZ`3QA74$WCL=a5Ap1KgIL%#5^A(D76&5{Dv#%af*j zT9N!$2chHU+S@6l(Z>^LJ%Kq%6m_m8m}l+pe6Of$YkPYof)?a;H(Ri%Wq$7*dC|Al z_Wo9Ip0~mU!!I1`6qdKvD&x8lW@~k4f=8K7@_G&2o4hRTVQ|mnFx9PJXdeGsiYkG+ zTtFB>iPpROdQ?s52=ivc#>gO>MBkR4lUt)2hg< z?uwhFgS&XQ$wZXv{!BBQZraCfXY`rA;xqlB>NfmC;Rk-gHD)dGPs+3tgEUcWg54D4 zH=YQ5VUepvI^2 zHRV=dPkpKZ>C^&<_z60=`r_xV=;bTS7)S3#pz%n)=N}@n7#DK*PTsEBXBF0V#|6P+ z0BSLBBvR(U)c?5$fX$L8aBhyY$drR81sD&k6XG!V36S(p*iU3W$rS?wiMfoM#)j^Z zM2ka-xqtm-e+n6lqY}0xRvgKq05*JO&UzL)62Z(XphUqFHHVO?{!Z&k#2ZN@*<9WD zX5^fSn(8lkOE1LGP=X)(s3^m_n#p|)7oQ$tGd>+VlQRW63kLlJ^Lh_ z!Vu*%2?sb{Qa(d&EDNlk9!B~84GlC=8sFI#`9me6vk7$>+` zjTtvuPR>vxvW5RM1fvKq627gi7dDwwFub)4i_>w5#1JsLVxg3E^7812#tfZhXGoE) zPxlO{lW!=f&xnKo&{&NgT6e~`wt@vYc_Avdio#>a{~WHEeTH%mWZ)?VaoAgZcXn`# znu`E7_o1dvXMdU$vYYImti?0F;`d1aO zK}ak0iZJ5PqT>q%!RhyRe|*()I%_h0z^16J)pFk(@6~Ttu!cup{PVXfXgI%zb?p)T zY(SEOM_;VI5vU|2u~p#Ul50jRy<)r(x5ksY|E#zrx-3u%cQS5CpCYf$a5hEUU)$L< zs>}ZkdiCgweiR`>f@3HfcWj8&&-K`mWWBm0Gxr;dsC7p+et^h4$A#i&DQ8f0lE1xJ z~2$AGDC=-PPwUY&GHSCR*ZjNLui!^=LRv>%zpQ`;VW5IQiGf z=P2)m)$8)(BXU0Z*?sE?!kf)#v)^JmsLnaHZq&Bsq7ljGm#yIdZc=VuWnAykVMp- z4Ei%+!v?smqlk+)SeD!v9CCACZf{DAcw!0(A-O;>&o3{q%|emBjAcuzEQpf3Q7vTf zxXP0wK=EhMEC3F1<8g8US?bmJs6z*JUQ|a98oxFgfC4;OCde68mQ72LEaf6+F=C6H zYM9}Ilt~U^^wPr|-#yI9f1vcLyhg z+rB#}#cgUymXYItO4y(MAqXnGQ(>cRVYp7*aja2DN|iOMXiKb5H8jN9mr zS1P9vc-oEcpwVe$tVodLSCT4^b*sv4%BzHJIW6h?e?^vx1xYx;wrt%_RKgUdJ8!9! z!mjb?Fut=6uE+n@36d7f$}+m|KS^S?ZLsBgWtgJpnwZUgzZOfOyVjdrDH}zo;tre5 zb>_=@CnW_>qS_BViL`b~5^A9PW|ffO#9dV32)m*!E1 z8Myc+DYV)u*K-w!{vO&jc zWdU|ljRmckf_SRfH`;r(&OcOdR)nFF>sJo?*8NaiR9a9az8#04F#K^RzQc6%YHbF&lVRIc* z=y)twgYZZt9#!C7Gcbnk0vfnW`l?mBYjIvvSn*Po7F}t)@1D~UamyQVx`&sy)Heo4 zDgAM9nuYaPheB!vRWK@`3V4B&rqxN5!z`DE;&sCX364=VfhRi1F`>1^Xg6cw)iPCcG^8C|vhkF={?j%`xz@Sthi|C{9(6+!v$Myaecq z-*~yAP?aA1@d>A%Qx-nRi9&m{$p`Z-kj4LsqRZX)Y zex*vg1iwIBi*xZSfoQ5Jt1hG*g1YolZ+rYN8uziSO+{;}12=2#FB{G@KPA9~*0sow zsetitPR2M-tX0Y)s?sZMFHQ1-XebLCtR;!cA@E2mdz2(oN7Wl^0`6bE9Qp?x~} zjeO%10|8YdA={&|V-Cdtb*vc5Yg&{|Sl@hdr{n3n6bmvtbIo9#HBY15sfv3RM-6z> z9rKtNex}EB@S%5gd*RO26x87m39GmFMlXjA+zS`mY$NP7O4pgLiG~C}3tG`<9Kgif z@%s2sxVjhxRjO%)$>*87dvsJ%7ds}E*p$x?hYip@tX2445ox-Y^ZQ%dQitb9EAj8j z-l}ON;rVv|%x|ymN_v~$e6ep%`f`0we{(lad-E&QLo`x7vA(XLM&m0z2G(?jNrn7* zTl(nH#Qo|LS|=OBVIx7PZVOHwPAHT=&0(x*kl#A<6?IV6qCwriC6)o50za+texh$oDwG3I=$B1 z?J2hI6ObH%4Tsgh8&8kaZ%YV3WwToc2OZs>8OlG3L^%CHO^>iE%a9;wh^B~y%<}-< zP+VJRUGRbLN^o_27cz+?&6t-W3@aF;c(dF{H&po$!%0S>QTN4-_~%jtpyT8$<_sx)8B=m*`R^Ie1z+PV)`)e`2;}$2py>w zdP>Qqcd`hyd92zaxD&wCflZZ?d^#(N2Tusem6O_oKbe-OKj%&__8R(o@TtlC1*6 zM)tkzZJbMRfgglN4_@=%{L7c~YipyElON8{f4IK>?(mQ%n)1jkL9xT8UZ3MD1))MV zKJfP8;rHj~-+%c+uf$BSz>?(~Bcjy4>{%m?+4Y3mUB;;rtzk15BZU1sl3+cEsO)U{ zt9K-|1mx#x+jn%MD()>N++b@6@M@3|ajaZ29AYx!JvR1c(Sl z@&!er9{Kc()T+6(loLj%9x9>CwZ<(%Gp@l9mRk!=77vZ(aFAxW&w#fO6O@E=MgP0N z8ni})Sv?{`9Z^(}Zh(T=|ITSk50>`4rtF2*CJ(4nMd*+=ZMzC9f?;*ZqUDdI8wnjA zi^nbD*|HVelS?hi^Gk@7l%J!k^64cd%*zH6-5}&#G zoEDa&VD{Y|EA?wJBi@nH^TaLSwqN_(YLF;kCJTkw8PV zhDKH4KU;ZO_=k!W*>+K<#qSr7ijW%MJn01Jt%Yk^Iz1B%XzjU4NT@?wQV&GA4)(3LfXhM~cp z2O8&Z)W3uE3kpUS?yFJbu}fcq7SRhku3Za~G$-SzI2F#y00mMwGN9=QZLywNNPafc z@H%rmby-Nl+yXti+{rK@|AsZ&E(+e~{ zJ~PU*(M1|qGCOe~vkwXP#x2$XQM)8xBBqTsCJyl^8&GqY)zWL?CnHGL0;&!^!{r6Z z-|LJVTEO3hd|R=2Cq4UpQViufY1+v-m^acs1pq^v!onu6miTs^m8 z1L{F*7Prf0DOD&d1`$Ge?wbbNh-y)~o-5aCVj9r+Fihks0Ny&>=%548+T;ZHKA0w% zR{TD8v4|9);iQoHJ(1NIE_)0h$>>MfMvHjY7@B?Gc_kWBwl7GU?iYIB|NAz|Pcq@HOt9LBo@&ImG%GnBI z`}x?P0O8GlRH!q+Aw}FT+t22{|O%6%P&%l0x)x) zbTHI%Xt4_7gf12IV6euFRkb>MoqxaH8k%<8=)u!!5 zbP0*bqv^G^#6n>w+oy8B#oR3KVN($utcorY)(qEPp1Ii~@}!ZeiUGj=`ug%fc1|QR z;)2zkE>tYJ@IuOvYYOm6*pRl_pC?R|y+qg`kRsxOuV+y1$}c*+j?jRxk7j>8+-R@@ zTRETwP+*Rtz#qSTxL=ADg)h>bq%-|6ai$$l)3n}ffw5Xl7|LZeXJ2A}1use^xiqWx z`dZ5?Lq={CL#jYFK$>qO8-T66-c*iOJ{(ioqj5*Xbn{hV)A16>LIF|jYy2SZgX|ybFuG zlks7j+O%wySd_y25u=Ky1OY9#zuY%#mc{OzaFXH$D5^c=t~vgYCXalr&e1Y9NLC8s z1qxZFlZ~dl0DPnBgEASsbJ65-g<7Pl#grsVH%}N&I?frEgpY@~$akT*7$ZTYcfP8cwM zApbQ2o8OU#M}{1@YShEwk!j*pXN06c&8uawSZ?U@xGrA}4IPP{f{UYlZS3s5WH3vL zqgU92%ZB9@OS=wJs#0O92`%oy%B8CRc6yF^zLGYhP(4%`1nekDeiZk)8gU{%l9fzv zC%;OOnrnF+ELk`qF@n%NH5v(-qHDUOjC7%~_G1ex1euq^HGm={gh=?;*T*?%r8&ZbMD`OGTkJcmGP^Arq zdsu25)6at)(0~#JA-mS!!jmf&y*qIw~IPZd__rceTsdg=9u}~-p{11L8C*3p^1gTWG`V+ zURf*P#MZ5_oz&s)Fg!3s8@P_{Rxn*N$DLDnn2?35WY3-xLN+-g(nIIXym+%cU)m#+rRF zX*IdH4DM@@txM&qB9c_5C9oNNWlokk-3p;kOCe5alC0(xRXLk&zU%-n%}cPVYNedK z!3JbZs*sd0u3%aFCc5C~+W4E{4vZAm6X#6MWLAKSthjdUlk9mq>=qY};0Z7?3?nMH zR|IT&+*;eLWGOsX3{Xp>Jl;N?br5 z?*y$BDK4&CW2Y9WLU%h&yHBx{L|*Mox~XBk2WQHLq*9a$L=~AJ!JaZ-aLh`#__C3l zLPUV%rY$8VEk^`~r><{HERuI;;uM#)_#;LAF|VoaT@zdT`QXi_P!92uAqJ^9iZ<8X zRu%(d9Oz3(c{+ovbQFanH!44qq6X+Rc8cs=Ei+tHbcGo#t!f-oYCY7lrPp`WdXh+` z*JlWYluUcnQmvm$JB>OH$#*k@rUa69Y|PQGou|u|*a#&VI!5Lo^J$m?vwy_~5;t-J z8^Z^e*2@TU${W#+a+0HjyHLil{Z7rLTURX%7@~FB;w&2uIdp@mZm9&HV%eFB>mLmM zu^}#zfDyLpX~Nx=8;k1+{Wv{og75gdAKdAYcOY$9L2nVq@=p? zQpjL;1Th^jUnJ^Eg{>*NO6evjNwFM|9TF;xIK;AyiB3-6U08)6du+hdOxoQ#8v{>u z!|hPP)}zGaR9WiX5pjp0BNb+JFyS=bg=V<(j(28Z5)deZ);x)g6=+MXS%`~l&yry^ z+K8;8)=U~o!rw(L0n`12?}H#D(@rpf{D?%G~%Y>!upHbzAc zLlUDf1hAM!j4po(*~gO#BZ^+34`ka;@uwJ!_}D2g^T4zfO@%Q*dkhKQi98AP@Q1M} zCC})tLXbGcZs)`7YbCEJ4E;W zz=yJly*n&CJgr8l(iHhEkoV0)q6e1n{^YlWIbg&z6{uRhG8xm5AtedkWtKfE3jH!%Y3|UZuAIlYG-J<>^LYjj`*mCrl?_EPOIJnHjk!M zD17FYupddJv!xL~tF;00;?0*Z;OkaxPGOFi1;;KvmlPB~PXJ}I#$wfYKfd`qHeo4& z>M@Ud8i(FhEL4_gv@fINhvx2Ti+NGn@lcin%0cCY^2QzhVGXRBqC9q5y}Qh-W5CSO z#DBtVUCv+OFe&~PS^JHhC52?<0HxAGm|aH%ugJmzC!;&H z^W4atW-6?EHUAWlblq62J=64L-%2aE*>DEL*di#eK}c!jI}=@`7y|`lIUJw$hvAC9 z#{{C6^|z4?u_(k5t=ms^@=cTmrc4%5i!s+48cEdK{%CFI)#w4gLb3^e9g_epDqZ`bBdPr6wRQB>S2cJ5dlsr>{nGFBcjJp|p^hyUR7gC9#+EU?H(Lt!K+r-2?EKKSwCQbMRf zRf3TH)zyO^Q^XbKNSW|9!fdsDY30ueD~0GjV08}|RN!ZMwkaxXq;M~BCP(nu{=#C4 zc4(M~ttvbTEj@&khKn0&W`XP{#%zY=PDs0uk(@|q4Oh2rZ3XWEX6QE`^ z;R|on@)lNle3JE zngAG$y&}nBN(eBI0>-?Utlm*Mp3FMkJP@1I*=J1HmPqJ|UZe3^H`0Rk(j}XYhkg*xs|aXMlDKDq1=T@r0MC#NLY@yEO?UJH7gFB&DiehMe2Y=&K%Ej~^`E);4} z!v`PFzrR)lJvNvK&k6kdmXWzd1zD?bk#Rcyyci+FhvfTMjq>#YuDJ9FU*0pQjCZQ|VkW@Rg2h+MGp}bqKLOcU9WGsBRo*|My{gg-%sQi?ee)TJAhf)uksQ%JlSeklG z#(Y1F$l~Zu3#;K>)1q`kZNil=A}zO$wiRVmAQn1ll;wDL#!!a}j_?Bh#q2gq!t@uG zr)HLsJQkd>vWzIrxGgQqwBjl-{e{O20D^GW<}Z)ty%M+YQS}g%bQFIb6>+FIcfvG3 zF}Nequ?bF$PZ=0kUw`3AcY)x6wsXfA3D+$6(x;w|F{c~{FCUzdF686r%tx6&S8<^s zNW4-{o5n0z9U8o@QD|~#5QZ`yD=AU2IqF(U9iTzHz54D#76Id`9k7b+Z=X`*q!5CI zBZFb0G)upq$hzuk86HK$ftOf`kPe(nI3~o7VoOBTxDE@gt#jpPXX9gZH!r-zkWP4X zg+b@H_R(OD#%@py;o&ct=WBwprMhH*3XvlUsd1qe%1Xpcw4;0xA?I;534K?duBBH{ z<^x`dTTn@_W*L@#e;VJe$K#K2A~g~v?U8w!SrLU6jOAz$X{cvnFU_kxB^e_j9w9k8 zNi%agaiEw2(8|U|P@t>vItE0}%y-jxeT6ZDLcubFi8v6ts0hZR9`p(Y2>HinbOsL>H&|S`~EMNlniMMR!)^2?|IfiXh7;EjqDa(o1 zsY-%KLDjWbdyZ?2@ZyPCp~R2iCEA$I_oJSmqL2`mDWU2@yd4kw<+u?Us}PhQSxa6! z_YGBW9SyAGwfE%enfAZCI<`d$+_!V)8f}GTDy7=Eh=^uzX^f~2LgHnNp|F&IRY4Ja z?Zg!DI!r`j4hCd?lo=Qy>VEW>@-Dy{ya)%DVlBW!%nQ>?IDt2a8!$o?^yn|;#mHyl zQckQGNN5pp1ob#|2575pphd6S*vi)KYOEw+D04H+E{yi?zkv1cfXH>$o+j{K3<6!% zJ+r9WoA4;RiFFv^XYD2dstOx(OST*SfrdK5hgs4EeR76VeR4?YMdp|eKUjW9Z)B>8 zO;^|$lnNUnkz51GCOteNRK?xd1>6e1k6!IZU5?cqirRzmE<`Qe7nf)373qLv zBs@8R^H6Vy*hirKIg0^Z9-yiNq)>4CGyyWzen(-v^G{GwQDD;(@zU?j8OL}9Jj#bc zR?C%}3+1)HgyfBI3xQf+EQ>ZwR5`|J7b{erYup%`$xH)GdyYF_y~7 z-XhOh?ibNk#(jVYK?00J)g&SP+bwx)!uE99iKb-U1rlkmPgPu+lXcxLQSg3!vIsyVb1sFmWhHKVK>BS~FLWJFMFEdba#7cxP%_FM0@Jg4C} zW+!*OreK3QUra~kpAeGLL%krHV0T#vDjbj)VWj=Br$}!YOv_>5UMO5HqiT19Pn1zziZHQvWP2O%yJsL=^2Bfn}=j9Fe<{ zF5N*taXVZmU?ZE(%l9S{fmnX--3AX`E94`QGk`AdEi%r4I#ZVB8lbb%{jHa~FV?3K zLhnUdz`(L7Q-1SZ$T5%0ZK#XmzGh0mph&3SJZRn&fR=ZxH7fNZT~A?PfmKxNzH2LQ zTfMh&k7g~E;*qYf!2J!l-8HDBo}}H)$VYLIiWJC`0R?1c<6ycRtQ1)o6v6kdc}#OU zi~o7FzKzhb%_Osc628}gMPklR?^~>NdU-Ogpumo3=;VR3qsCv1cpW(agF)V-`^I92 ziPz&2IXKrItoU0Io8#`>yWs|;fG)eVGs838-0k6xvnm}8$lag&lB547!UQ(liCo;^kP>n`rEp9Y#2zesl+`XCAu{sz| z-p2Mo$t@Tp1;83vq>Rs~@S3@cB1w<{nG~cOXs2$ z3{wquEqp4T*FjOsXANPynEZ9t4VaeF2f8ms5tmeFl364RIn3;s&iTFM!ABssF=fc8n|VmV8q zfo3eWXrhCn@~^3&rjOP`$xgvg@}A~U27AuoDu zZ3{ZrNS;-iE@~@%V`jXjL>~7_pklLBVQewNi@Z##uL2EGX{e|_uIp~oPc^tA?T3Ax zw;XQ3Izyiw7CpHNeT`T-gXZDrR_e2S87j z6}1L>q2!ASv6ILn>&DqgU1MQZYnp{M3;|O@)Dgg6FnQL%zBNn9C~4Uef^`HjTq zf`ZeG8=00=%~-x7Y}L2>L!E9eHR<6@wYMl<@m2~N91UPp46TAWRA!lINi*RFJlFv$ z2WLy6TGM}N^1!&$$)#}lCFd>_CMOX|V-iow-e%9CVuYcF4~woFKnM!y)ivRB8DStA zaMGBsR=xu6g+-ZWheP)At42MVu#>oS=87oz9N>d@A5u^r@4>TR?r zO9p%oi(;4{3F{zq{R3l}}aJdO=pAFar#We%KIy zfa2hU(-OlqO~p}Kqo^X?>;T#J&gkvt-p;Gtx1*J3tmLq#&m*yBQ}y4%0@x@zBys`5Nk%Vy~vwpZZ z1a)IIt*=Y|JiTc7`q|1_E_lnYhFUvZT;jXY&d%GHE8DN%vXK3^qrH{Y=j%LF(%0cd zJk(xfeWWCv4;LTj96P%zMJ@3=l*QrV6TaD6Ti+gSaY}D@ceb{vUA@opGvbzA5c&X$v@8Td5;^;#x?|Zpf>uv&Ll8awAK!Gb4)1D$*Kc zH=(qP5(ZhH3}xJZmB?`>Wvn2IvE>6dpHC0Qu?DKAdD}vGEn#bW_3ifh{%C7^^WoAm z5i#ryA63MWj1_clPp~ucQWCmQPAA7h_JU%zumUSBKcKV>^F-U0`GBlPRQogs65<>2gf90^{)~SMI zb*0g2F__c0PRQ8YSJckpyGUDyoWsqeDtlQXerxDByTsSV?WCo5OxmUcWm6DM=CCtN z9=9s_7OfmgXAQA|NYG-$Y?#TJRST@kd1y_FC*55-r2E}U|3 zzW>B7Y$HJ?EAT8TFgpp&gr;d<8Gi1oQ1bB85s!ei?j=f{Ef!_#UNlJfHAh>6xp5!` zz(fn0LrFD+7U*9`GTA)M2WAXkMxO#!(L4yl`T7j^Oils3{_r;YL7l3U=mF-+iRFvVIE$>R7xYn`f^?}bA0#S@ zs)iP!%U*P;7HT0YXGwa!f-%5NE_fwee~ZO?)q2H>FP0w31C|Ed%*3Xux<(fP)0D;3 zo;htMqcK*Rw3Eoo!mDiU++vFU#AW3cn=d28gW#;-O1vm&$8t<`QOO(!!O_@OS;haw zVkggv6kZH--kvEIGa|Fj;8~Md9EqrL|P}U=#dp+>Kfq2wo0o3$TSPU;TwHOG_-) z75=a#v$ys=Z3djkhXASAp({f+}mVvutsW2zf zp-bn%mU;U_fTTTUdrw7CS}J^}dNz%m&1p3916n~Eh=vQ@V%mFPcAP%{=tQ! S|GoVAAE!qIvaj!K%>Dn1UhY-^ literal 0 HcmV?d00001 diff --git a/software/cfitsio3040/fitsio.tex b/software/cfitsio3040/fitsio.tex new file mode 100644 index 000000000..6de01ff00 --- /dev/null +++ b/software/cfitsio3040/fitsio.tex @@ -0,0 +1,7493 @@ +\documentclass[11pt]{book} +\input{html.sty} +\htmladdtonavigation + {\begin{rawhtml} + FITSIO Home + \end{rawhtml}} +%\oddsidemargin=0.25in +\oddsidemargin=0.00in +\evensidemargin=0.00in +\textwidth=6.5in +%\topmargin=0.0in +\textheight=8.75in +\parindent=0cm +\parskip=0.2cm +\begin{document} +\pagenumbering{roman} + +\begin{titlepage} +\normalsize +\vspace*{4.6cm} +\begin{center} +{\Huge \bf FITSIO User's Guide}\\ +\end{center} +\medskip +\medskip +\begin{center} +{\LARGE \bf A Subroutine Interface to FITS Format Files}\\ +\end{center} +\begin{center} +{\LARGE \bf for Fortran Programmers}\\ +\end{center} +\medskip +\medskip +\begin{center} +{\Large Version 3.0\\} +\end{center} +\bigskip +\vskip 2.5cm +\begin{center} +{HEASARC\\ +Code 662\\ +Goddard Space Flight Center\\ +Greenbelt, MD 20771\\ +USA} +\end{center} + +\vfill +\bigskip +\begin{center} +{\Large February 2006\\} +\end{center} +\vfill +\end{titlepage} + +\clearpage + +\tableofcontents + +\chapter{Introduction } +\pagenumbering{arabic} + +This document describes the Fortran-callable subroutine interface that +is provided as part of the CFITSIO library (which is written in ANSI +C). This is a companion document to the CFITSIO User's Guide which +should be consulted for further information about the underlying +CFITSIO library. In the remainder of this document, the terms FITSIO +and CFITSIO are interchangeable and refer to the same library. + +FITSIO/CFITSIO is a machine-independent library of routines for reading +and writing data files in the FITS (Flexible Image Transport System) +data format. It can also read IRAF format image files and raw binary +data arrays by converting them on the fly into a virtual FITS format +file. This library was written to provide a powerful yet simple +interface for accessing FITS files which will run on most commonly used +computers and workstations. FITSIO supports all the features described +in the official NOST definition of the FITS format and can read and +write all the currently defined types of extensions, including ASCII +tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. The +FITSIO subroutines insulate the programmer from having to deal with the +complicated formatting details in the FITS file, however, it is assumed +that users have a general knowledge about the structure and usage of +FITS files. + +The CFITSIO package was initially developed by the HEASARC (High Energy +Astrophysics Science Archive Research Center) at the NASA Goddard Space +Flight Center to convert various existing and newly acquired +astronomical data sets into FITS format and to further analyze data +already in FITS format. New features continue to be added to CFITSIO +in large part due to contributions of ideas or actual code from users +of the package. The Integral Science Data Center in Switzerland, and +the XMM/ESTEC project in The Netherlands made especially significant +contributions that resulted in many of the new features that appeared +in v2.0 of CFITSIO. + +The latest version of the CFITSIO source code, documentation, and +example programs are available on the World-Wide Web or via anonymous +ftp from: + +\begin{verbatim} + http://heasarc.gsfc.nasa.gov/fitsio + ftp://legacy.gsfc.nasa.gov/software/fitsio/c +\end{verbatim} +\newpage +Any questions, bug reports, or suggested enhancements related to the CFITSIO +package should be sent to the primary author: + +\begin{verbatim} + Dr. William Pence Telephone: (301) 286-4599 + HEASARC, Code 662 E-mail: pence@tetra.gsfc.nasa.gov + NASA/Goddard Space Flight Center + Greenbelt, MD 20771, USA +\end{verbatim} +This User's Guide assumes that readers already have a general +understanding of the definition and structure of FITS format files. +Further information about FITS formats is available from the FITS Support +Office at {\tt http://fits.gsfc.nasa.gov}. In particular, the +'NOST FITS Standard' gives the authoritative definition of the FITS data +format, and the `FITS User's Guide' provides additional historical background +and practical advice on using FITS files. + +CFITSIO users may also be interested in the FTOOLS package of programs +that can be used to manipulate and analyze FITS format files. +Information about FTOOLS can be obtained on the Web or via anonymous +ftp at: + +\begin{verbatim} + http://heasarc.gsfc.nasa.gov/ftools + ftp://legacy.gsfc.nasa.gov/software/ftools/release +\end{verbatim} + +\chapter{ Creating FITSIO/CFITSIO } + + +\section{Building the Library} + +To use the FITSIO subroutines one must first build the CFITSIO library, +which requires a C compiler. gcc is ideal, or most other ANSI-C +compilers will also work. The CFITSIO code is contained in about 40 C +source files (*.c) and header files (*.h). On VAX/VMS systems 2 +assembly-code files (vmsieeed.mar and vmsieeer.mar) are also needed. + +The Fortran interface subroutines to the C CFITSIO routines are located +in the f77\_wrap1.c, through f77\_wrap4.c files. These are relatively simple +'wrappers' that translate the arguments in the Fortran subroutine into +the appropriate format for the corresponding C routine. This +translation is performed transparently to the user by a set of C macros +located in the cfortran.h file. Unfortunately cfortran.h does not +support every combination of C and Fortran compilers so the Fortran +interface is not supported on all platforms. (see further notes below). + +A standard combination of C and Fortran compilers will be assumed by +default, but one may also specify a particular Fortran compiler by +doing: + +\begin{verbatim} + > setenv CFLAGS -DcompilerName=1 +\end{verbatim} +(where 'compilerName' is the name of the compiler) before running +the configure command. The currently recognized compiler +names are: + +\begin{verbatim} + g77Fortran + IBMR2Fortran + CLIPPERFortran + pgiFortran + NAGf90Fortran + f2cFortran + hpuxFortran + apolloFortran + sunFortran + CRAYFortran + mipsFortran + DECFortran + vmsFortran + CONVEXFortran + PowerStationFortran + AbsoftUNIXFortran + AbsoftProFortran + SXFortran +\end{verbatim} +Alternatively, one may edit the CFLAGS line in the Makefile to add the +'-DcompilerName' flag after running the './configure' command. + +The CFITSIO library is built on Unix systems by typing: + +\begin{verbatim} + > ./configure [--prefix=/target/installation/path] + > make (or 'make shared') + > make install (this step is optional) +\end{verbatim} +at the operating system prompt. The configure command customizes the +Makefile for the particular system, then the `make' command compiles the +source files and builds the library. Type `./configure' and not simply +`configure' to ensure that the configure script in the current directory +is run and not some other system-wide configure script. The optional +'prefix' argument to configure gives the path to the directory where +the CFITSIO library and include files should be installed via the later +'make install' command. For example, + +\begin{verbatim} + > ./configure --prefix=/usr1/local +\end{verbatim} +will cause the 'make install' command to copy the CFITSIO libcfitsio file +to /usr1/local/lib and the necessary include file to /usr1/local/include +(assuming of course that the process has permission to write to these +directories). + +By default this also builds the set of Fortran-callable +wrapper routines whose calling sequences are described later in this +document. + +The 'make shared' option builds a shared or dynamic version of the +CFITSIO library. When using the shared library the executable code is +not copied into your program at link time and instead the program +locates the necessary library code at run time, normally through +LD\_LIBRARY\_PATH or some other method. The advantages of using a shared +library are: + +\begin{verbatim} + 1. Less disk space if you build more than 1 program + 2. Less memory if more than one copy of a program using the shared + library is running at the same time since the system is smart + enough to share copies of the shared library at run time. + 3. Possibly easier maintenance since a new version of the shared + library can be installed without relinking all the software + that uses it (as long as the subroutine names and calling + sequences remain unchanged). + 4. No run-time penalty. +\end{verbatim} +The disadvantages are: + +\begin{verbatim} + 1. More hassle at runtime. You have to either build the programs + specially or have LD_LIBRARY_PATH set right. + 2. There may be a slight start up penalty, depending on where you are + reading the shared library and the program from and if your CPU is + either really slow or really heavily loaded. +\end{verbatim} + +On HP/UX systems, the environment variable CFLAGS should be set +to -Ae before running configure to enable "extended ANSI" features. + +It may not be possible to staticly link programs that use CFITSIO on +some platforms (namely, on Solaris 2.6) due to the network drivers +(which provide FTP and HTTP access to FITS files). It is possible to +make both a dynamic and a static version of the CFITSIO library, but +network file access will not be possible using the static version. + +On VAX/VMS and ALPHA/VMS systems the make\_gfloat.com command file may +be executed to build the cfitsio.olb object library using the default +G-floating point option for double variables. The make\_dfloat.com and +make\_ieee.com files may be used instead to build the library with the +other floating point options. Note that the getcwd function that is +used in the group.c module may require that programs using CFITSIO be +linked with the ALPHA\$LIBRARY:VAXCRTL.OLB library. See the example +link line in the next section of this document. + +On Windows IBM-PC type platforms the situation is more complicated +because of the wide variety of Fortran compilers that are available and +because of the inherent complexities of calling the CFITSIO C routines +from Fortran. Two different versions of the CFITSIO dll library are +available, compiled with the Borland C++ compiler and the Microsoft +Visual C++ compiler, respectively, in the files +cfitsiodll\_2xxx\_borland.zip and cfitsiodll\_2xxx\_vcc.zip, where +'2xxx' represents the current release number. Both these dll libraries +contain a set of Fortran wrapper routines which may be compatible with +some, but probably not all, available Fortran compilers. To test if +they are compatible, compile the program testf77.f and try linking to +these dll libraries. If these libraries do not work with a particular +Fortran compiler, then there are 2 possible solutions. The first +solution would be to modify the file cfortran.h for that particular +combination of C and Fortran compilers, and then rebuild the CFITSIO +dll library. This will require, however, a some expertise in +mixed language programming. +The other solution is to use the older v5.03 Fortran-77 implementation +of FITSIO that is still available from the FITSIO web-site. This +version is no longer supported, but it does provide the basic functions +for reading and writing FITS files and should be compatible with most +Fortran compilers. + +CFITSIO has currently been tested on the following platforms: + +\begin{verbatim} + OPERATING SYSTEM COMPILER + Sun OS gcc and cc (3.0.1) + Sun Solaris gcc and cc + Silicon Graphics IRIX gcc and cc + Silicon Graphics IRIX64 MIPS + Dec Alpha OSF/1 gcc and cc + DECstation Ultrix gcc + Dec Alpha OpenVMS cc + DEC VAX/VMS gcc and cc + HP-UX gcc + IBM AIX gcc + Linux gcc + MkLinux DR3 + Windows 95/98/NT Borland C++ V4.5 + Windows 95/98/NT/ME/XP Microsoft/Compaq Visual C++ v5.0, v6.0 + Windows 95/98/NT Cygwin gcc + OS/2 gcc + EMX + MacOS 7.1 or greater Metrowerks 10.+ +\end{verbatim} +CFITSIO will probably run on most other Unix platforms. Cray +supercomputers are currently not supported. + + +\section{Testing the Library} + +The CFITSIO library should be tested by building and running +the testprog.c program that is included with the release. +On Unix systems type: + +\begin{verbatim} + % make testprog + % testprog > testprog.lis + % diff testprog.lis testprog.out + % cmp testprog.fit testprog.std +\end{verbatim} + On VMS systems, +(assuming cc is the name of the C compiler command), type: + +\begin{verbatim} + $ cc testprog.c + $ link testprog, cfitsio/lib, alpha$library:vaxcrtl/lib + $ run testprog +\end{verbatim} +The testprog program should produce a FITS file called `testprog.fit' +that is identical to the `testprog.std' FITS file included with this +release. The diagnostic messages (which were piped to the file +testprog.lis in the Unix example) should be identical to the listing +contained in the file testprog.out. The 'diff' and 'cmp' commands +shown above should not report any differences in the files. (There +may be some minor formatting differences, such as the presence or +absence of leading zeros, or 3 digit exponents in numbers, +which can be ignored). + +The Fortran wrappers in CFITSIO may be tested with the testf77 +program. On Unix systems the fortran compilation and link command +may be called 'f77' or 'g77', depending on the system. + +\begin{verbatim} + % f77 -o testf77 testf77.f -L. -lcfitsio -lnsl -lsocket + or + % f77 -f -o testf77 testf77.f -L. -lcfitsio (under SUN O/S) + or + % f77 -o testf77 testf77.f -Wl,-L. -lcfitsio -lm -lnsl -lsocket (HP/UX) + or + % g77 -o testf77 -s testf77.f -lcfitsio -lcc_dynamic -lncurses (Mac OS-X) + + % testf77 > testf77.lis + % diff testf77.lis testf77.out + % cmp testf77.fit testf77.std +\end{verbatim} +On machines running SUN O/S, Fortran programs must be compiled with the +'-f' option to force double precision variables to be aligned on 8-byte +boundarys to make the fortran-declared variables compatible with C. A +similar compiler option may be required on other platforms. Failing to +use this option may cause the program to crash on FITSIO routines that +read or write double precision variables. + +Also note that on some systems, the output listing of the testf77 +program may differ slightly from the testf77.std template, if leading +zeros are not printed by default before the decimal point when using F +format. + +A few other utility programs are included with CFITSIO: + +\begin{verbatim} + speed - measures the maximum throughput (in MB per second) + for writing and reading FITS files with CFITSIO + + listhead - lists all the header keywords in any FITS file + + fitscopy - copies any FITS file (especially useful in conjunction + with the CFITSIO's extended input filename syntax) + + cookbook - a sample program that performs common read and + write operations on a FITS file. + + iter_a, iter_b, iter_c - examples of the CFITSIO iterator routine +\end{verbatim} + +The first 4 of these utility programs can be compiled and linked by typing + +\begin{verbatim} + % make program_name +\end{verbatim} + + +\section{Linking Programs with FITSIO} + +When linking applications software with the FITSIO library, several system libraries usually need to be specified on the link comman +Unix systems, the most reliable way to determine what libraries are required +is to type 'make testprog' and see what libraries the configure script has +added. The typical libraries that may need to be added are -lm (the math +library) and -lnsl and -lsocket (needed only for FTP and HTTP file access). +These latter 2 libraries are not needed on VMS and Windows platforms, +because FTP file access is not currently supported on those platforms. + +Note that when upgrading to a newer version of CFITSIO it is usually +necessay to recompile, as well as relink, the programs that use CFITSIO, +because the definitions in fitsio.h often change. + + +\section{Getting Started with FITSIO} + +In order to effectively use the FITSIO library as quickly as possible, +it is recommended that new users follow these steps: + +1. Read the following `FITS Primer' chapter for a brief +overview of the structure of FITS files. This is especially important +for users who have not previously dealt with the FITS table and image +extensions. + +2. Write a simple program to read or write a FITS file using the Basic +Interface routines. + +3. Refer to the cookbook.f program that is included with this release +for examples of routines that perform various common FITS file +operations. + +4. Read Chapters 4 and 5 to become familiar with the conventions and +advanced features of the FITSIO interface. + +5. Scan through the more extensive set of routines that are provided +in the `Advanced Interface'. These routines perform more specialized +functions than are provided by the Basic Interface routines. + + +\section{Example Program} + +The following listing shows an example of how to use the FITSIO +routines in a Fortran program. Refer to the cookbook.f program that +is included with the FITSIO distribution for examples of other +FITS programs. + +\begin{verbatim} + program writeimage + +C Create a FITS primary array containing a 2-D image + + integer status,unit,blocksize,bitpix,naxis,naxes(2) + integer i,j,group,fpixel,nelements,array(300,200) + character filename*80 + logical simple,extend + + status=0 +C Name of the FITS file to be created: + filename='ATESTFILE.FITS' + +C Get an unused Logical Unit Number to use to create the FITS file + call ftgiou(unit,status) + +C create the new empty FITS file + blocksize=1 + call ftinit(unit,filename,blocksize,status) + +C initialize parameters about the FITS image (300 x 200 16-bit integers) + simple=.true. + bitpix=16 + naxis=2 + naxes(1)=300 + naxes(2)=200 + extend=.true. + +C write the required header keywords + call ftphpr(unit,simple,bitpix,naxis,naxes,0,1,extend,status) + +C initialize the values in the image with a linear ramp function + do j=1,naxes(2) + do i=1,naxes(1) + array(i,j)=i+j + end do + end do + +C write the array to the FITS file + group=1 + fpixel=1 + nelements=naxes(1)*naxes(2) + call ftpprj(unit,group,fpixel,nelements,array,status) + +C write another optional keyword to the header + call ftpkyj(unit,'EXPOSURE',1500,'Total Exposure Time',status) + +C close the file and free the unit number + call ftclos(unit, status) + call ftfiou(unit, status) + end +\end{verbatim} + + +\section{Legal Stuff} + +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. +(However, see the restriction on the use of the gzip compression code, +below). + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER." + +The file compress.c contains (slightly modified) source code that +originally came from gzip-1.2.4, copyright (C) 1992-1993 by Jean-loup +Gailly. This gzip code is distributed under the GNU General Public +License and thus requires that any software that uses the CFITSIO +library (which in turn uses the gzip code) must conform to the +provisions in the GNU General Public License. A copy of the GNU +license is included at the beginning of compress.c file. + +Similarly, the file wcsutil.c contains 2 slightly modified routines +from the Classic AIPS package that are also distributed under the GNU +General Public License. + +Alternate versions of the compress.c and wcsutil.c files (called +compress\_alternate.c and wcsutil\_alternate.c) are provided for users +who want to use the CFITSIO +library but are unwilling or unable to publicly release their software +under the terms of the GNU General Public License. These alternate +versions contains non-functional stubs for the file compression and +uncompression routines and the world coordinate transformation routines +used by CFITSIO. Replace the file `compress.c' +with `compress\_alternate.c' and 'wcsutil.c' with 'wcsutil\_alternate.c +before compiling the CFITSIO library. This +will produce a version of CFITSIO which does not support reading or +writing compressed FITS files, or doing image coordinate transformations, +but is otherwise identical to the standard version. + + + +\section{Acknowledgements} + +The development of many of the powerful features in CFITSIO was made +possible through collaborations with many people or organizations from +around the world. The following, in particular, have made especially +significant contributions: + +Programmers from the Integral Science Data Center, Switzerland (namely, +Jurek Borkowski, Bruce O'Neel, and Don Jennings), designed the concept +for the plug-in I/O drivers that was introduced with CFITSIO 2.0. The +use of `drivers' greatly simplified the low-level I/O, which in turn +made other new features in CFITSIO (e.g., support for compressed FITS +files and support for IRAF format image files) much easier to +implement. Jurek Borkowski wrote the Shared Memory driver, and Bruce +O'Neel wrote the drivers for accessing FITS files over the network +using the FTP, HTTP, and ROOT protocols. + +The ISDC also provided the template parsing routines (written by Jurek +Borkowski) and the hierarchical grouping routines (written by Don +Jennings). The ISDC DAL (Data Access Layer) routines are layered on +top of CFITSIO and make extensive use of these features. + +Uwe Lammers (XMM/ESA/ESTEC, The Netherlands) designed the +high-performance lexical parsing algorithm that is used to do +on-the-fly filtering of FITS tables. This algorithm essentially +pre-compiles the user-supplied selection expression into a form that +can be rapidly evaluated for each row. Peter Wilson (RSTX, NASA/GSFC) +then wrote the parsing routines used by CFITSIO based on Lammers' +design, combined with other techniques such as the CFITSIO iterator +routine to further enhance the data processing throughput. This effort +also benefited from a much earlier lexical parsing routine that was +developed by Kent Blackburn (NASA/GSFC). More recently, Craig Markwardt +(NASA/GSFC) implemented additional functions (median, average, stddev) +and other enhancements to the lexical parser. + +The CFITSIO iterator function is loosely based on similar ideas +developed for the XMM Data Access Layer. + +Peter Wilson (RSTX, NASA/GSFC) wrote the complete set of +Fortran-callable wrappers for all the CFITSIO routines, which in turn +rely on the CFORTRAN macro developed by Burkhard Burow. + +The syntax used by CFITSIO for filtering or binning input FITS files is +based on ideas developed for the AXAF Science Center Data Model by +Jonathan McDowell, Antonella Fruscione, Aneta Siemiginowska and Bill +Joye. See http://heasarc.gsfc.nasa.gov/docs/journal/axaf7.html for +further description of the AXAF Data Model. + +The file decompression code were taken directly from the gzip (GNU zip) +program developed by Jean-loup Gailly and others. + +Doug Mink, SAO, provided the routines for converting IRAF format +images into FITS format. + +Martin Reinecke (Max Planck Institute, Garching)) provided the modifications to +cfortran.h that are necessary to support 64-bit integer values when calling +C routines from fortran programs. The cfortran.h macros were originally developed +by Burkhard Burow (CERN). + +In addition, many other people have made valuable contributions to the +development of CFITSIO. These include (with apologies to others that may +have inadvertently been omitted): + +Steve Allen, Carl Akerlof, Keith Arnaud, Morten Krabbe Barfoed, Kent +Blackburn, G Bodammer, Romke Bontekoe, Lucio Chiappetti, Keith Costorf, +Robin Corbet, John Davis, Richard Fink, Ning Gan, Emily Greene, Joe +Harrington, Cheng Ho, Phil Hodge, Jim Ingham, Yoshitaka Ishisaki, Diab +Jerius, Mark Levine, Todd Karakaskian, Edward King, Scott Koch, Claire +Larkin, Rob Managan, Eric Mandel, John Mattox, Carsten Meyer, Emi +Miyata, Stefan Mochnacki, Mike Noble, Oliver Oberdorf, Clive Page, +Arvind Parmar, Jeff Pedelty, Tim Pearson, Maren Purves, Scott Randall, +Chris Rogers, Arnold Rots, Barry Schlesinger, Robin Stebbins, Andrew +Szymkowiak, Allyn Tennant, Peter Teuben, James Theiler, Doug Tody, +Shiro Ueno, Steve Walton, Archie Warnock, Alan Watson, Dan Whipple, Wim +Wimmers, Peter Young, Jianjun Xu, and Nelson Zarate. + + +\chapter{ A FITS Primer } + +This section gives a brief overview of the structure of FITS files. +Users should refer to the documentation available from the NOST, as +described in the introduction, for more detailed information on FITS +formats. + +FITS was first developed in the late 1970's as a standard data +interchange format between various astronomical observatories. Since +then FITS has become the defacto standard data format supported by most +astronomical data analysis software packages. + +A FITS file consists of one or more Header + Data Units (HDUs), where +the first HDU is called the `Primary HDU', or `Primary Array'. The +primary array contains an N-dimensional array of pixels, such as a 1-D +spectrum, a 2-D image, or a 3-D data cube. Six different primary +datatypes are supported: Unsigned 8-bit bytes, 16, 32, and 64-bit signed +integers, and 32 and 64-bit floating point reals. FITS also has a +convention for storing unsigned integers (see the later +section entitled `Unsigned Integers' for more details). The primary HDU +may also consist of only a header with a null array containing no +data pixels. + +Any number of additional HDUs may follow the primary array; these +additional HDUs are called FITS `extensions'. There are currently 3 +types of extensions defined by the FITS standard: + +\begin{itemize} +\item + Image Extension - a N-dimensional array of pixels, like in a primary array +\item + ASCII Table Extension - rows and columns of data in ASCII character format +\item + Binary Table Extension - rows and columns of data in binary representation +\end{itemize} + +In each case the HDU consists of an ASCII Header Unit followed by an optional +Data Unit. For historical reasons, each Header or Data unit must be an +exact multiple of 2880 8-bit bytes long. Any unused space is padded +with fill characters (ASCII blanks or zeros). + +Each Header Unit consists of any number of 80-character keyword records +or `card images' which have the general form: + +\begin{verbatim} + KEYNAME = value / comment string + NULLKEY = / comment: This keyword has no value +\end{verbatim} +The keyword names may be up to 8 characters long and can only contain +uppercase letters, the digits 0-9, the hyphen, and the underscore +character. The keyword name is (usually) followed by an equals sign and +a space character (= ) in columns 9 - 10 of the record, followed by the +value of the keyword which may be either an integer, a floating point +number, a character string (enclosed in single quotes), or a boolean +value (the letter T or F). A keyword may also have a null or undefined +value if there is no specified value string, as in the second example. + +The last keyword in the header is always the `END' keyword which has no +value or comment fields. There are many rules governing the exact +format of a keyword record (see the NOST FITS Standard) so it is better +to rely on standard interface software like FITSIO to correctly +construct or to parse the keyword records rather than try to deal +directly with the raw FITS formats. + +Each Header Unit begins with a series of required keywords which depend +on the type of HDU. These required keywords specify the size and +format of the following Data Unit. The header may contain other +optional keywords to describe other aspects of the data, such as the +units or scaling values. Other COMMENT or HISTORY keywords are also +frequently added to further document the data file. + +The optional Data Unit immediately follows the last 2880-byte block in +the Header Unit. Some HDUs do not have a Data Unit and only consist of +the Header Unit. + +If there is more than one HDU in the FITS file, then the Header Unit of +the next HDU immediately follows the last 2880-byte block of the +previous Data Unit (or Header Unit if there is no Data Unit). + +The main required keywords in FITS primary arrays or image extensions are: +\begin{itemize} +\item +BITPIX -- defines the datatype of the array: 8, 16, 32, 64, -32, -64 for +unsigned 8--bit byte, 16--bit signed integer, 32--bit signed integer, +64--bit signed integer, +32--bit IEEE floating point, and 64--bit IEEE double precision floating +point, respectively. +\item +NAXIS -- the number of dimensions in the array, usually 0, 1, 2, 3, or 4. +\item +NAXISn -- (n ranges from 1 to NAXIS) defines the size of each dimension. +\end{itemize} + +FITS tables start with the keyword XTENSION = `TABLE' (for ASCII +tables) or XTENSION = `BINTABLE' (for binary tables) and have the +following main keywords: +\begin{itemize} +\item +TFIELDS -- number of fields or columns in the table +\item +NAXIS2 -- number of rows in the table +\item +TTYPEn -- for each column (n ranges from 1 to TFIELDS) gives the +name of the column +\item +TFORMn -- the datatype of the column +\item +TUNITn -- the physical units of the column (optional) +\end{itemize} + +Users should refer to the FITS Support Office at {\tt http://fits.gsfc.nasa.gov} +for futher information about the FITS format and related software +packages. + + + +\chapter{FITSIO Conventions and Guidelines } + + +\section{CFITSIO Size Limitations} + +CFITSIO places few restrictions on the size of FITS files that it +reads or writes. There are a few limits, however, which may affect +some extreme cases: + +1. The maximum number of FITS files that may be simultaneously opened +by CFITSIO is set by NMAXFILES as defined in fitsio2.h. It is currently +set = 300 by default. CFITSIO will allocate about 80 * NMAXFILES bytes +of memory for internal use. Note that the underlying C compiler or +operating system, may have a smaller limit on the number of opened files. +The C symbolic constant FOPEN\_MAX is intended to define the maximum +number of files that may open at once (including any other text or +binary files that may be open, not just FITS files). On some systems it +has been found that gcc supports a maximum of 255 opened files. + +Note that opening and operating on many FITS files simultaneously in +parallel may be less efficient than operating on smaller groups of files +in series. CFITSIO only has NIOBUF number of internal buffers (set = 40 +by default) that are used for temporary storage of the most recent data +records that have been read or written in the FITS files. If the number +of opened files is greater than NIOBUF, then CFITSIO may waste more time +flushing and re-reading or re-writing the same records in the FITS files. + +2. By default, CFITSIO can handle FITS files up to 2.1 GB in size (2**31 +bytes). This file size limit is often imposed by 32-bit operating +systems. More recently, as 64-bit operating systems become more common, an +industry-wide standard (at least on Unix systems) has been developed to +support larger sized files (see http://ftp.sas.com/standards/large.file/). +Starting with version 2.1 of CFITSIO, larger FITS files up to 6 terabytes +in size may be read and written on supported platforms. In order +to support these larger files, CFITSIO must be compiled with the +'-D\_LARGEFILE\_SOURCE' and `-D\_FILE\_OFFSET\_BITS=64' compiler flags. +Some platforms may also require the `-D\_LARGE\_FILES' compiler flag. + This causes the compiler to allocate 8-bytes instead of +4-bytes for the `off\_t' datatype which is used to store file offset +positions. It appears that in most cases it is not necessary to +also include these compiler flags when compiling programs that link to +the CFITSIO library. + +If CFITSIO is compiled with the -D\_LARGEFILE\_SOURCE +and -D\_FILE\_OFFSET\_BITS=64 flags on a +platform that supports large files, then it can read and write FITS +files that contain up to 2**31 2880-byte FITS records, or approximately +6 terabytes in size. It is still required that the value of the NAXISn +and PCOUNT keywords in each extension be within the range of a signed +4-byte integer (max value = 2,147,483,648). Thus, each dimension of an +image (given by the NAXISn keywords), the total width of a table +(NAXIS1 keyword), the number of rows in a table (NAXIS2 keyword), and +the total size of the variable-length array heap in binary tables +(PCOUNT keyword) must be less than this limit. + +Currently, support for large files within CFITSIO has been tested +on the Linux, Solaris, and IBM AIX operating systems. + + +\section{Multiple Access to the Same FITS File} + +CFITSIO supports simultaneous read and write access to multiple HDUs in +the same FITS file. Thus, one can open the same FITS file twice within +a single program and move to 2 different HDUs in the file, and then +read and write data or keywords to the 2 extensions just as if one were +accessing 2 completely separate FITS files. Since in general it is +not possible to physically open the same file twice and then expect to +be able to simultaneously (or in alternating succession) write to 2 +different locations in the file, CFITSIO recognizes when the file to be +opened (in the call to fits\_open\_file) has already been opened and +instead of actually opening the file again, just logically links the +new file to the old file. (This only applies if the file is opened +more than once within the same program, and does not prevent the same +file from being simultaneously opened by more than one program). Then +before CFITSIO reads or writes to either (logical) file, it makes sure +that any modifications made to the other file have been completely +flushed from the internal buffers to the file. Thus, in principle, one +could open a file twice, in one case pointing to the first extension +and in the other pointing to the 2nd extension and then write data to +both extensions, in any order, without danger of corrupting the file, +There may be some efficiency penalties in doing this however, since +CFITSIO has to flush all the internal buffers related to one file +before switching to the other, so it would still be prudent to +minimize the number of times one switches back and forth between doing +I/O to different HDUs in the same file. + + +\section{Current Header Data Unit (CHDU)} + +In general, a FITS file can contain multiple Header Data Units, also +called extensions. CFITSIO only operates within one HDU at any given +time, and the currently selected HDU is called the Current Header Data +Unit (CHDU). When a FITS file is first created or opened the CHDU is +automatically defined to be the first HDU (i.e., the primary array). +CFITSIO routines are provided to move to and open any other existing +HDU within the FITS file or to append or insert a new HDU in the FITS +file which then becomes the CHDU. + + +\section{Subroutine Names} + +All FITSIO subroutine names begin with the letters 'ft' to distinguish +them from other subroutines and are 5 or 6 characters long. Users should +not name their own subroutines beginning with 'ft' to avoid conflicts. +(The SPP interface routines all begin with 'fs'). Subroutines which read +or get information from the FITS file have names beginning with +'ftg...'. Subroutines which write or put information into the FITS file +have names beginning with 'ftp...'. + + +\section{Subroutine Families and Datatypes} + +Many of the subroutines come in families which differ only in the +datatype of the associated parameter(s) . The datatype of these +subroutines is indicated by the last letter of the subroutine name +(e.g., 'j' in 'ftpkyj') as follows: + +\begin{verbatim} + x - bit + b - character*1 (unsigned byte) + i - short integer (I*2) + j - integer (I*4, 32-bit integer) + k - long long integer (I*8, 64-bit integer) + e - real exponential floating point (R*4) + f - real fixed-format floating point (R*4) + d - double precision real floating-point (R*8) + g - double precision fixed-format floating point (R*8) + c - complex reals (pairs of R*4 values) + m - double precision complex (pairs of R*8 values) + l - logical (L*4) + s - character string +\end{verbatim} + +When dealing with the FITS byte datatype, it is important to remember +that the raw values (before any scaling by the BSCALE and BZERO, or +TSCALn and TZEROn keyword values) in byte arrays (BITPIX = 8) or byte +columns (TFORMn = 'B') are interpreted as unsigned bytes with values +ranging from 0 to 255. Some Fortran compilers support a non-standard +byte datatype such as INTEGER*1, LOGICAL*1, or BYTE, which can sometimes +be used instead of CHARACTER*1 variables. Many machines permit passing a +numeric datatype (such as INTEGER*1) to the FITSIO subroutines which are +expecting a CHARACTER*1 datatype, but this technically violates the +Fortran-77 standard and is not supported on all machines (e.g., on a VAX/VMS +machine one must use the VAX-specific \%DESCR function). + +One feature of the CFITSIO routines is that they can operate on a `X' +(bit) column in a binary table as though it were a `B' (byte) column. +For example a `11X' datatype column can be interpreted the same as a +`2B' column (i.e., 2 unsigned 8-bit bytes). In some instances, it can +be more efficient to read and write whole bytes at a time, rather than +reading or writing each individual bit. + +The double precision complex datatype is not a standard Fortran-77 +datatype. If a particular Fortran compiler does not directly support +this datatype, then one may instead pass an array of pairs of double +precision values to these subroutines. The first value in each pair +is the real part, and the second is the imaginary part. + + +\section{Implicit Data Type Conversion} + +The FITSIO routines that read and write numerical data can perform +implicit data type conversion. This means that the data type of the +variable or array in the program does not need to be the same as the +data type of the value in the FITS file. Data type conversion is +supported for numerical and string data types (if the string contains a +valid number enclosed in quotes) when reading a FITS header keyword +value and for numeric values when reading or writing values in the +primary array or a table column. CFITSIO returns status = +NUM\_OVERFLOW if the converted data value exceeds the range of the +output data type. Implicit data type conversion is not supported +within binary tables for string, logical, complex, or double complex +data types. + +In addition, any table column may be read as if it contained string values. +In the case of numeric columns the returned string will be formatted +using the TDISPn display format if it exists. + + +\section{Data Scaling} + +When reading numerical data values in the primary array or a +table column, the values will be scaled automatically by the BSCALE and +BZERO (or TSCALn and TZEROn) header keyword values if they are +present in the header. The scaled data that is returned to the reading +program will have + +\begin{verbatim} + output value = (FITS value) * BSCALE + BZERO +\end{verbatim} +(a corresponding formula using TSCALn and TZEROn is used when reading +from table columns). In the case of integer output values the floating +point scaled value is truncated to an integer (not rounded to the +nearest integer). The ftpscl and fttscl subroutines may be used to +override the scaling parameters defined in the header (e.g., to turn +off the scaling so that the program can read the raw unscaled values +from the FITS file). + +When writing numerical data to the primary array or to a table +column the data values will generally be automatically inversely scaled +by the value of the BSCALE and BZERO (or TSCALn and TZEROn) header +keyword values if they they exist in the header. These keywords must +have been written to the header before any data is written for them to +have any effect. Otherwise, one may use the ftpscl and fttscl +subroutines to define or override the scaling keywords in the header +(e.g., to turn off the scaling so that the program can write the raw +unscaled values into the FITS file). If scaling is performed, the +inverse scaled output value that is written into the FITS file will +have + +\begin{verbatim} + FITS value = ((input value) - BZERO) / BSCALE +\end{verbatim} +(a corresponding formula using TSCALn and TZEROn is used when +writing to table columns). Rounding to the nearest integer, rather +than truncation, is performed when writing integer datatypes to the +FITS file. + + +\section{Error Status Values and the Error Message Stack} + +The last parameter in nearly every FITSIO subroutine is the error +status value which is both an input and an output parameter. A +returned positive value for this parameter indicates an error was +detected. A listing of all the FITSIO status code values is given at +the end of this document. + +The FITSIO library uses an `inherited status' convention for the status +parameter which means that if a subroutine is called with a positive +input value of the status parameter, then the subroutine will exit +immediately without changing the value of the status parameter. Thus, +if one passes the status value returned from each FITSIO routine as +input to the next FITSIO subroutine, then whenever an error is detected +all further FITSIO processing will cease. This convention can simplify +the error checking in application programs because it is not necessary +to check the value of the status parameter after every single FITSIO +subroutine call. If a program contains a sequence of several FITSIO +calls, one can just check the status value after the last call. Since +the returned status values are generally distinctive, it should be +possible to determine which subroutine originally returned the error +status. + +FITSIO also maintains an internal stack of error messages (80-character +maximum length) which in many cases provide a more detailed explanation +of the cause of the error than is provided by the error status number +alone. It is recommended that the error message stack be printed out +whenever a program detects a FITSIO error. To do this, call the FTGMSG +routine repeatedly to get the successive messages on the stack. When the +stack is empty FTGMSG will return a blank string. Note that this is a +`First In -- First Out' stack, so the oldest error message is returned +first by ftgmsg. + + +\section{Variable-Length Array Facility in Binary Tables} + +FITSIO provides easy-to-use support for reading and writing data in +variable length fields of a binary table. The variable length columns +have TFORMn keyword values of the form `1Pt(len)' or `1Qt(len)' where `t' is the +datatype code (e.g., I, J, E, D, etc.) and `len' is an integer +specifying the maximum length of the vector in the table. If the value +of `len' is not specified when the table is created (e.g., if the TFORM +keyword value is simply specified as '1PE' instead of '1PE(400) ), then +FITSIO will automatically scan the table when it is closed to +determine the maximum length of the vector and will append this value +to the TFORMn value. + +The same routines which read and write data in an ordinary fixed length +binary table extension are also used for variable length fields, +however, the subroutine parameters take on a slightly different +interpretation as described below. + +All the data in a variable length field is written into an area called +the `heap' which follows the main fixed-length FITS binary table. The +size of the heap, in bytes, is specified with the PCOUNT keyword in the +FITS header. When creating a new binary table, the initial value of +PCOUNT should usually be set to zero. FITSIO will recompute the size +of the heap as the data is written and will automatically update the +PCOUNT keyword value when the table is closed. When writing variable +length data to a table, CFITSIO will automatically extend the size +of the heap area if necessary, so that any following HDUs do not +get overwritten. + +By default the heap data area starts immediately after the last row of +the fixed-length table. This default starting location may be +overridden by the THEAP keyword, but this is not recommended. +If additional rows of data are added to the table, CFITSIO will +automatically shift the the heap down to make room for the new +rows, but it is obviously be more efficient to initially +create the table with the necessary number of blank rows, so that +the heap does not needed to be constantly moved. + +When writing to a variable length field, the entire array of values for +a given row of the table must be written with a single call to FTPCLx. +The total length of the array is calculated from (NELEM+FELEM-1). One +cannot append more elements to an existing field at a later time; any +attempt to do so will simply overwrite all the data which was previously +written. Note also that the new data will be written to a new area of +the heap and the heap space used by the previous write cannot be +reclaimed. For this reason it is advised that each row of a variable +length field only be written once. An exception to this general rule +occurs when setting elements of an array as undefined. One must first +write a dummy value into the array with FTPCLx, and then call FTPCLU to +flag the desired elements as undefined. (Do not use the FTPCNx family +of routines with variable length fields). Note that the rows of a table, +whether fixed or variable length, do not have to be written +consecutively and may be written in any order. + +When writing to a variable length ASCII character field (e.g., TFORM = +'1PA') only a single character string written. FTPCLS writes the whole +length of the input string (minus any trailing blank characters), thus +the NELEM and FELEM parameters are ignored. If the input string is +completely blank then FITSIO will write one blank character to the FITS +file. Similarly, FTGCVS and FTGCFS read the entire string (truncated +to the width of the character string argument in the subroutine call) +and also ignore the NELEM and FELEM parameters. + +The FTPDES subroutine is useful in situations where multiple rows of a +variable length column have the identical array of values. One can +simply write the array once for the first row, and then use FTPDES to +write the same descriptor values into the other rows (use the FTGDES +routine to read the first descriptor value); all the rows will then +point to the same storage location thus saving disk space. + +When reading from a variable length array field one can only read as +many elements as actually exist in that row of the table; reading does +not automatically continue with the next row of the table as occurs +when reading an ordinary fixed length table field. Attempts to read +more than this will cause an error status to be returned. One can +determine the number of elements in each row of a variable column with +the FTGDES subroutine. + + +\section{Support for IEEE Special Values} + +The ANSI/IEEE-754 floating-point number standard defines certain +special values that are used to represent such quantities as +Not-a-Number (NaN), denormalized, underflow, overflow, and infinity. +(See the Appendix in the NOST FITS standard or the NOST FITS User's +Guide for a list of these values). The FITSIO subroutines that read +floating point data in FITS files recognize these IEEE special values +and by default interpret the overflow and infinity values as being +equivalent to a NaN, and convert the underflow and denormalized values +into zeros. In some cases programmers may want access to the raw IEEE +values, without any modification by FITSIO. This can be done by +calling the FTGPVx or FTGCVx routines while specifying 0.0 as the value +of the NULLVAL parameter. This will force FITSIO to simply pass the +IEEE values through to the application program, without any +modification. This does not work for double precision values on +VAX/VMS machines, however, where there is no easy way to bypass the +default interpretation of the IEEE special values. + + +\section{When the Final Size of the FITS HDU is Unknown} + +It is not required to know the total size of a FITS data array or table +before beginning to write the data to the FITS file. In the case of +the primary array or an image extension, one should initially create +the array with the size of the highest dimension (largest NAXISn +keyword) set to a dummy value, such as 1. Then after all the data have +been written and the true dimensions are known, then the NAXISn value +should be updated using the fits\_ update\_key routine before moving to +another extension or closing the FITS file. + +When writing to FITS tables, CFITSIO automatically keeps track of the +highest row number that is written to, and will increase the size of +the table if necessary. CFITSIO will also automatically insert space +in the FITS file if necessary, to ensure that the data 'heap', if it +exists, and/or any additional HDUs that follow the table do not get +overwritten as new rows are written to the table. + +As a general rule it is best to specify the initial number of rows = 0 +when the table is created, then let CFITSIO keep track of the number of +rows that are actually written. The application program should not +manually update the number of rows in the table (as given by the NAXIS2 +keyword) since CFITSIO does this automatically. If a table is +initially created with more than zero rows, then this will usually be +considered as the minimum size of the table, even if fewer rows are +actually written to the table. Thus, if a table is initially created +with NAXIS2 = 20, and CFITSIO only writes 10 rows of data before +closing the table, then NAXIS2 will remain equal to 20. If however, 30 +rows of data are written to this table, then NAXIS2 will be increased +from 20 to 30. The one exception to this automatic updating of the +NAXIS2 keyword is if the application program directly modifies the +value of NAXIS2 (up or down) itself just before closing the table. In this +case, CFITSIO does not update NAXIS2 again, since it assumes that the +application program must have had a good reason for changing the value +directly. This is not recommended, however, and is only provided for +backward compatibility with software that initially creates a table +with a large number of rows, than decreases the NAXIS2 value to the +actual smaller value just before closing the table. + + +\section{Local FITS Conventions supported by FITSIO} + +CFITSIO supports several local FITS conventions which are not +defined in the official NOST FITS standard and which are not +necessarily recognized or supported by other FITS software packages. +Programmers should be cautious about using these features, especially +if the FITS files that are produced are expected to be processed by +other software systems which do not use the CFITSIO interface. + + +\subsection{Support for Long String Keyword Values.} + +The length of a standard FITS string keyword is limited to 68 +characters because it must fit entirely within a single FITS header +keyword record. In some instances it is necessary to encode strings +longer than this limit, so FITSIO supports a local convention in which +the string value is continued over multiple keywords. This +continuation convention uses an ampersand character at the end of each +substring to indicate that it is continued on the next keyword, and the +continuation keywords all have the name CONTINUE without an equal sign +in column 9. The string value may be continued in this way over as many +additional CONTINUE keywords as is required. The following lines +illustrate this continuation convention which is used in the value of +the STRKEY keyword: + +\begin{verbatim} +LONGSTRN= 'OGIP 1.0' / The OGIP Long String Convention may be used. +STRKEY = 'This is a very long string keyword&' / Optional Comment +CONTINUE ' value that is continued over 3 keywords in the & ' +CONTINUE 'FITS header.' / This is another optional comment. +\end{verbatim} +It is recommended that the LONGSTRN keyword, as shown +here, always be included in any HDU that uses this longstring +convention. A subroutine called FTPLSW +has been provided in CFITSIO to write this keyword if it does not +already exist. + +This long string convention is supported by the following FITSIO +subroutines that deal with string-valued keywords: + +\begin{verbatim} + ftgkys - read a string keyword + ftpkls - write (append) a string keyword + ftikls - insert a string keyword + ftmkls - modify the value of an existing string keyword + ftukls - update an existing keyword, or write a new keyword + ftdkey - delete a keyword +\end{verbatim} +These routines will transparently read, write, or delete a long string +value in the FITS file, so programmers in general do not have to be +concerned about the details of the convention that is used to encode +the long string in the FITS header. When reading a long string, one +must ensure that the character string parameter used in these +subroutine calls has been declared long enough to hold the entire +string, otherwise the returned string value will be truncated. + +Note that the more commonly used FITSIO subroutine to write string +valued keywords (FTPKYS) does NOT support this long string convention +and only supports strings up to 68 characters in length. This has been +done deliberately to prevent programs from inadvertently writing +keywords using this non-standard convention without the explicit intent +of the programmer or user. The FTPKLS subroutine must be called +instead to write long strings. This routine can also be used to write +ordinary string values less than 68 characters in length. + + +\subsection{Arrays of Fixed-Length Strings in Binary Tables} + +CFITSIO supports 2 ways to specify that a character column in a binary +table contains an array of fixed-length strings. The first way, which +is offically supported by the FITS Standard document, uses the TDIMn keyword. +For example, if TFORMn = '60A' and TDIMn = '(12,5)' then that +column will be interpreted as containing an array of 5 strings, each 12 +characters long. + +FITSIO also supports a +local convention for the format of the TFORMn keyword value of the form +'rAw' where 'r' is an integer specifying the total width in characters +of the column, and 'w' is an integer specifying the (fixed) length of +an individual unit string within the vector. For example, TFORM1 = +'120A10' would indicate that the binary table column is 120 characters +wide and consists of 12 10-character length strings. This convention +is recognized by the FITSIO subroutines that read or write strings in +binary tables. The Binary Table definition document specifies that +other optional characters may follow the datatype code in the TFORM +keyword, so this local convention is in compliance with the +FITS standard, although other FITS readers are not required to +recognize this convention. + +The Binary Table definition document that was approved by the IAU in +1994 contains an appendix describing an alternate convention for +specifying arrays of fixed or variable length strings in a binary table +character column (with the form 'rA:SSTRw/nnn)'. This appendix was not +officially voted on by the IAU and hence is still provisional. FITSIO +does not currently support this proposal. + + +\subsection{Keyword Units Strings} + +One deficiency of the current FITS Standard is that it does not define +a specific convention for recording the physical units of a keyword +value. The TUNITn keyword can be used to specify the physical units of +the values in a table column, but there is no analogous convention for +keyword values. The comment field of the keyword is often used for +this purpose, but the units are usually not specified in a well defined +format that FITS readers can easily recognize and extract. + +To solve this deficiency, FITSIO uses a local convention in which the +keyword units are enclosed in square brackets as the first token in the +keyword comment field; more specifically, the opening square bracket +immediately follows the slash '/' comment field delimiter and a single +space character. The following examples illustrate keywords that use +this convention: + + +\begin{verbatim} +EXPOSURE= 1800.0 / [s] elapsed exposure time +V_HELIO = 16.23 / [km s**(-1)] heliocentric velocity +LAMBDA = 5400. / [angstrom] central wavelength +FLUX = 4.9033487787637465E-30 / [J/cm**2/s] average flux +\end{verbatim} + +In general, the units named in the IAU(1988) Style Guide are +recommended, with the main exception that the preferred unit for angle +is 'deg' for degrees. + +The FTPUNT and FTGUNT subroutines in FITSIO write and read, +respectively, the keyword unit strings in an existing keyword. + + +\subsection{HIERARCH Convention for Extended Keyword Names} + +CFITSIO supports the HIERARCH keyword convention which allows keyword +names that are longer then 8 characters and may contain the full range +of printable ASCII text characters. This convention +was developed at the European Southern Observatory (ESO) to support +hierarchical FITS keyword such as: + +\begin{verbatim} +HIERARCH ESO INS FOCU POS = -0.00002500 / Focus position +\end{verbatim} +Basically, this convention uses the FITS keyword 'HIERARCH' to indicate +that this convention is being used, then the actual keyword name +({\tt'ESO INS FOCU POS'} in this example) begins in column 10 and can +contain any printable ASCII text characters, including spaces. The +equals sign marks the end of the keyword name and is followed by the +usual value and comment fields just as in standard FITS keywords. +Further details of this convention are described at +http://arcdev.hq.eso.org/dicb/dicd/dic-1-1.4.html (search for +HIERARCH). + +This convention allows a much broader range of keyword names +than is allowed by the FITS Standard. Here are more examples +of such keywords: + +\begin{verbatim} +HIERARCH LongKeyword = 47.5 / Keyword has > 8 characters, and mixed case +HIERARCH XTE$TEMP = 98.6 / Keyword contains the '$' character +HIERARCH Earth is a star = F / Keyword contains embedded spaces +\end{verbatim} +CFITSIO will transparently read and write these keywords, so application +programs do not in general need to know anything about the specific +implementation details of the HIERARCH convention. In particular, +application programs do not need to specify the `HIERARCH' part of the +keyword name when reading or writing keywords (although it +may be included if desired). When writing a keyword, CFITSIO first +checks to see if the keyword name is legal as a standard FITS keyword +(no more than 8 characters long and containing only letters, digits, or +a minus sign or underscore). If so it writes it as a standard FITS +keyword, otherwise it uses the hierarch convention to write the +keyword. The maximum keyword name length is 67 characters, which +leaves only 1 space for the value field. A more practical limit is +about 40 characters, which leaves enough room for most keyword values. +CFITSIO returns an error if there is not enough room for both the +keyword name and the keyword value on the 80-character card, except for +string-valued keywords which are simply truncated so that the closing +quote character falls in column 80. In the current implementation, +CFITSIO preserves the case of the letters when writing the keyword +name, but it is case-insensitive when reading or searching for a +keyword. The current implementation allows any ASCII text character +(ASCII 32 to ASCII 126) in the keyword name except for the '=' +character. A space is also required on either side of the equal sign. + + +\section{Optimizing Code for Maximum Processing Speed} + +CFITSIO has been carefully designed to obtain the highest possible +speed when reading and writing FITS files. In order to achieve the +best performance, however, application programmers must be careful to +call the CFITSIO routines appropriately and in an efficient sequence; +inappropriate usage of CFITSIO routines can greatly slow down the +execution speed of a program. + +The maximum possible I/O speed of CFITSIO depends of course on the type +of computer system that it is running on. As a rough guide, the +current generation of workstations can achieve speeds of 2 -- 10 MB/s +when reading or writing FITS images and similar, or slightly slower +speeds with FITS binary tables. Reading of FITS files can occur at +even higher rates (30MB/s or more) if the FITS file is still cached in +system memory following a previous read or write operation on the same +file. To more accurately predict the best performance that is possible +on any particular system, a diagnostic program called ``speed.c'' is +included with the CFITSIO distribution which can be run to +approximately measure the maximum possible speed of writing and reading +a test FITS file. + +The following 2 sections provide some background on how CFITSIO +internally manages the data I/O and describes some strategies that may +be used to optimize the processing speed of software that uses +CFITSIO. + + +\subsection{Background Information: How CFITSIO Manages Data I/O} + +Many CFITSIO operations involve transferring only a small number of +bytes to or from the FITS file (e.g, reading a keyword, or writing a +row in a table); it would be very inefficient to physically read or +write such small blocks of data directly in the FITS file on disk, +therefore CFITSIO maintains a set of internal Input--Output (IO) +buffers in RAM memory that each contain one FITS block (2880 bytes) of +data. Whenever CFITSIO needs to access data in the FITS file, it first +transfers the FITS block containing those bytes into one of the IO +buffers in memory. The next time CFITSIO needs to access bytes in the +same block it can then go to the fast IO buffer rather than using a +much slower system disk access routine. The number of available IO +buffers is determined by the NIOBUF parameter (in fitsio2.h) and is +currently set to 40. + +Whenever CFITSIO reads or writes data it first checks to see if that +block of the FITS file is already loaded into one of the IO buffers. +If not, and if there is an empty IO buffer available, then it will load +that block into the IO buffer (when reading a FITS file) or will +initialize a new block (when writing to a FITS file). If all the IO +buffers are already full, it must decide which one to reuse (generally +the one that has been accessed least recently), and flush the contents +back to disk if it has been modified before loading the new block. + +The one major exception to the above process occurs whenever a large +contiguous set of bytes are accessed, as might occur when reading or +writing a FITS image. In this case CFITSIO bypasses the internal IO +buffers and simply reads or writes the desired bytes directly in the +disk file with a single call to a low-level file read or write +routine. The minimum threshold for the number of bytes to read or +write this way is set by the MINDIRECT parameter and is currently set +to 3 FITS blocks = 8640 bytes. This is the most efficient way to read +or write large chunks of data and can achieve IO transfer rates of +5 -- 10MB/s or greater. Note that this fast direct IO process is not +applicable when accessing columns of data in a FITS table because the +bytes are generally not contiguous since they are interleaved by the +other columns of data in the table. This explains why the speed for +accessing FITS tables is generally slower than accessing +FITS images. + +Given this background information, the general strategy for efficiently +accessing FITS files should now be apparent: when dealing with FITS +images, read or write large chunks of data at a time so that the direct +IO mechanism will be invoked; when accessing FITS headers or FITS +tables, on the other hand, once a particular FITS block has been +loading into one of the IO buffers, try to access all the needed +information in that block before it gets flushed out of the IO buffer. +It is important to avoid the situation where the same FITS block is +being read then flushed from a IO buffer multiple times. + +The following section gives more specific suggestions for optimizing +the use of CFITSIO. + +1. When dealing with a FITS primary array or IMAGE extension, it is +more efficient to read or write large chunks of the image at a time +(at least 3 FITS blocks = 8640 bytes) so that the direct IO mechanism +will be used as described in the previous section. Smaller chunks of +data are read or written via the IO buffers, which is somewhat less +efficient because of the extra copy operation and additional +bookkeeping steps that are required. In principle it is more efficient +to read or write as big an array of image pixels at one time as +possible, however, if the array becomes so large that the operating +system cannot store it all in RAM, then the performance may be degraded +because of the increased swapping of virtual memory to disk. + +2. When dealing with FITS tables, the most important efficiency factor +in the software design is to read or write the data in the FITS file in +a single pass through the file. An example of poor program design +would be to read a large, 3-column table by sequentially reading the +entire first column, then going back to read the 2nd column, and +finally the 3rd column; this obviously requires 3 passes through the +file which could triple the execution time of an I/O limited program. +For small tables this is not important, but when reading multi-megabyte +sized tables these inefficiencies can become significant. The more +efficient procedure in this case is to read or write only as many rows +of the table as will fit into the available internal I/O buffers, then +access all the necessary columns of data within that range of rows. +Then after the program is completely finished with the data in those +rows it can move on to the next range of rows that will fit in the +buffers, continuing in this way until the entire file has been +processed. By using this procedure of accessing all the columns of a +table in parallel rather than sequentially, each block of the FITS file +will only be read or written once. + +The optimal number of rows to read or write at one time in a given +table depends on the width of the table row, on the number of I/O +buffers that have been allocated in FITSIO, and also on the number of +other FITS files that are open at the same time (since one I/O buffer +is always reserved for each open FITS file). Fortunately, a FITSIO +routine is available that will return the optimal number of rows for a +given table: call ftgrsz(unit, nrows, status). It is not critical to +use exactly the value of nrows returned by this routine, as long as one +does not exceed it. Using a very small value however can also lead to +poor performance because of the overhead from the larger number of +subroutine calls. + +The optimal number of rows returned by ftgrsz is valid only as long as +the application program is only reading or writing data in the +specified table. Any other calls to access data in the table header or +in any other FITS file would cause additional blocks of data to be +loaded into the I/O buffers displacing data from the original table, +and should be avoided during the critical period while the table is +being read or written. + +Occasionally it is necessary to simultaneously access more than one +FITS table, for example when transferring values from an input table to +an output table. In cases like this, one should call ftgrsz to get the +optimal number of rows for each table separately, than reduce the +number of rows proportionally. For example, if the optimal number of +rows in the input table is 3600 and is 1400 in the output table, then +these values should be cut in half to 1800 and 700, respectively, if +both tables are going to be accessed at the same time. + +3. Use binary table extensions rather than ASCII table +extensions for better efficiency when dealing with tabular data. The +I/O to ASCII tables is slower because of the overhead in formatting or +parsing the ASCII data fields, and because ASCII tables are about twice +as large as binary tables with the same information content. + +4. Design software so that it reads the FITS header keywords in the +same order in which they occur in the file. When reading keywords, +FITSIO searches forward starting from the position of the last keyword +that was read. If it reaches the end of the header without finding the +keyword, it then goes back to the start of the header and continues the +search down to the position where it started. In practice, as long as +the entire FITS header can fit at one time in the available internal I/O +buffers, then the header keyword access will be very fast and it makes +little difference which order they are accessed. + +5. Avoid the use of scaling (by using the BSCALE and BZERO or TSCAL and +TZERO keywords) in FITS files since the scaling operations add to the +processing time needed to read or write the data. In some cases it may +be more efficient to temporarily turn off the scaling (using ftpscl or +fttscl) and then read or write the raw unscaled values in the FITS +file. + +6. Avoid using the 'implicit datatype conversion' capability in +FITSIO. For instance, when reading a FITS image with BITPIX = -32 +(32-bit floating point pixels), read the data into a single precision +floating point data array in the program. Forcing FITSIO to convert +the data to a different datatype can significantly slow the program. + +7. Where feasible, design FITS binary tables using vector column +elements so that the data are written as a contiguous set of bytes, +rather than as single elements in multiple rows. For example, it is +faster to access the data in a table that contains a single row +and 2 columns with TFORM keywords equal to '10000E' and '10000J', than +it is to access the same amount of data in a table with 10000 rows +which has columns with the TFORM keywords equal to '1E' and '1J'. In +the former case the 10000 floating point values in the first column are +all written in a contiguous block of the file which can be read or +written quickly, whereas in the second case each floating point value +in the first column is interleaved with the integer value in the second +column of the same row so CFITSIO has to explicitly move to the +position of each element to be read or written. + +8. Avoid the use of variable length vector columns in binary tables, +since any reading or writing of these data requires that CFITSIO first +look up or compute the starting address of each row of data in the +heap. + +9. When copying data from one FITS table to another, it is faster to +transfer the raw bytes instead of reading then writing each column of +the table. The FITSIO subroutines FTGTBS and FTPTBS (for ASCII +tables), and FTGTBB and FTPTBB (for binary tables) will perform +low-level reads or writes of any contiguous range of bytes in a table +extension. These routines can be used to read or write a whole row (or +multiple rows) of a table with a single subroutine call. These +routines are fast because they bypass all the usual data scaling, error +checking and machine dependent data conversion that is normally done by +FITSIO, and they allow the program to write the data to the output file +in exactly the same byte order. For these same reasons, use of these +routines can be somewhat risky because no validation or machine +dependent conversion is performed by these routines. In general these +routines are only recommended for optimizing critical pieces of code +and should only be used by programmers who thoroughly understand the +internal byte structure of the FITS tables they are reading or +writing. + +10. Another strategy for improving the speed of writing a FITS table, +similar to the previous one, is to directly construct the entire byte +stream for a whole table row (or multiple rows) within the application +program and then write it to the FITS file with +ftptbb. This avoids all the overhead normally present +in the column-oriented CFITSIO write routines. This technique should +only be used for critical applications, because it makes the code more +difficult to understand and maintain, and it makes the code more system +dependent (e.g., do the bytes need to be swapped before writing to the +FITS file?). + +11. Finally, external factors such as the type of magnetic disk +controller (SCSI or IDE), the size of the disk cache, the average seek +speed of the disk, the amount of disk fragmentation, and the amount of +RAM available on the system can all have a significant impact on +overall I/O efficiency. For critical applications, a system +administrator should review the proposed system hardware to identify any +potential I/O bottlenecks. + + + +\chapter{ Basic Interface Routines } + +This section defines a basic set of subroutines that can be +used to perform the most common types of read and write operations +on FITS files. New users should start with these subroutines and +then, as needed, explore the more advance routines described in +the following chapter to perform more complex or specialized operations. + +A right arrow symbol ($>$) is used to separate the input parameters from +the output parameters in the definition of each routine. This symbol +is not actually part of the calling sequence. Note that +the status parameter is both an input and an output parameter +and must be initialized = 0 prior to calling the FITSIO subroutines. + +Refer to Chapter 9 for the definition of all the parameters +used by these interface routines. + + +\section{FITSIO Error Status Routines \label{FTVERS}} + + +\begin{description} +\item[1 ] Return the current version number of the fitsio library. + The version number will be incremented with each new + release of CFITSIO. +\end{description} + +\begin{verbatim} + FTVERS( > version) +\end{verbatim} + +\begin{description} +\item[2 ] Return the descriptive text string corresponding to a FITSIO error + status code. The 30-character length string contains a brief + description of the cause of the error. +\end{description} + +\begin{verbatim} + FTGERR(status, > errtext) +\end{verbatim} + +\begin{description} +\item[3 ] Return the top (oldest) 80-character error message from the + internal FITSIO stack of error messages and shift any remaining + messages on the stack up one level. Any FITSIO error will + generate one or more messages on the stack. Call this routine + repeatedly to get each message in sequence. The error stack is empty + when a blank string is returned. +\end{description} + +\begin{verbatim} + FTGMSG( > errmsg) +\end{verbatim} + +\begin{description} +\item[4 ]The FTPMRK routine puts an invisible marker on the + CFITSIO error stack. The FTCMRK routine can then be + used to delete any more recent error messages on the stack, back to + the position of the marker. This preserves any older error messages + on the stack. FTCMSG simply clears the entire error message stack. + These routines are called without any arguments. +\end{description} + +\begin{verbatim} + FTPMRK + FTCMRK + FTCMSG +\end{verbatim} + + +\begin{description} +\item[5 ] Print out the error message corresponding to the input status + value and all the error messages on the FITSIO stack to the specified + file stream (stream can be either the string 'STDOUT' or 'STDERR'). + If the input status value = 0 then this routine does nothing. +\end{description} + +\begin{verbatim} + FTRPRT (stream, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Write an 80-character message to the FITSIO error stack. Application + programs should not normally write to the stack, but there may be + some situations where this is desirable. +\end{description} + +\begin{verbatim} + FTPMSG(errmsg) +\end{verbatim} + + +\section{File I/O Routines} + + +\begin{description} +\item[1 ]Open an existing FITS file with readonly or readwrite access. + This routine always opens the primary array (the first HDU) of + the file, and does not move to a following extension, if one was + specified as part of the filename. Use the FTNOPN routine to + automatically move to the extension. This routine will also + open IRAF images (.imh format files) and raw binary data arrays + with READONLY access by first converting them on the fly into + virtual FITS images. See the `Extended File Name Syntax' chapter + for more details. The FTDKOPEN routine simply opens the specified + file without trying to interpret the filename using the extended + filename syntax. +\end{description} + +\begin{verbatim} + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) +\end{verbatim} + +\begin{description} +\item[2 ]Open an existing FITS file with readonly or readwrite access + and move to a following extension, if one was specified as + part of the filename. (e.g., 'filename.fits+2' or + 'filename.fits[2]' will move to the 3rd HDU in the file). + Note that this routine differs from FTOPEN in that it does not + have the redundant blocksize argument. +\end{description} + +\begin{verbatim} + FTNOPN(unit,filename,rwmode, > status) +\end{verbatim} + +\begin{description} +\item[3 ]Open an existing FITS file with readonly or readwrite access + and then move to the first HDU containing significant data, if a) an HDU + name or number to open was not explicitly specified as part of the + filename, and b) if the FITS file contains a null primary array (i.e., + NAXIS = 0). In this case, it will look for the first IMAGE HDU with + NAXIS > 0, or the first table that does not contain the strings `GTI' + (Good Time Interval) or `OBSTABLE' in the EXTNAME keyword value. FTTOPN + is similar, except it will move to the first significant table HDU + (skipping over any image HDUs) in the file if a specific HDU name + or number is not specified. FTIOPN will move to the first non-null + image HDU, skipping over any tables. +\end{description} + +\begin{verbatim} + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) +\end{verbatim} + +\begin{description} +\item[4 ]Open and initialize a new empty FITS file. A template file may also be + specified to define the structure of the new file (see section 4.2.4). + The FTDKINIT routine simply creates the specified + file without trying to interpret the filename using the extended + filename syntax. +\end{description} + +\begin{verbatim} + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) +\end{verbatim} + +\begin{description} +\item[5 ]Close a FITS file previously opened with ftopen or ftinit +\end{description} + +\begin{verbatim} + FTCLOS(unit, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Move to a specified (absolute) HDU in the FITS file (nhdu = 1 for the + FITS primary array) +\end{description} + +\begin{verbatim} + FTMAHD(unit,nhdu, > hdutype,status) +\end{verbatim} + +\begin{description} +\item[7 ] Create a primary array (if none already exists), or insert a + new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = -9 prior + to calling the routine. In this case the existing primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. The FTIIMGLL routine is identical + to the FTIIMG routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array + of 32-bit integers. +\end{description} + +\begin{verbatim} + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTIIMGLL(unit,bitpix,naxis,naxesll, > status) +\end{verbatim} + +\begin{description} +\item[8 ] Insert a new ASCII TABLE extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new table extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTITABLL + routine is identical + to the FTITAB routine except that the 2nd and 3rd parameters (that give + the size of the table) are 64-bit integers rather than + 32-bit integers. +\end{description} + +\begin{verbatim} + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTITABLL(unit,rowlenll,nrowsll,tfields,ttype,tbcol,tform,tunit,extname, > + status) +\end{verbatim} + +\begin{description} +\item[9 ] Insert a new binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new bintable extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTIBINLL + routine is identical + to the FTIBIN routine except that the 2nd parameter (that gives + the length of the table) is a 64-bit integer rather than + a 32-bit integer. +\end{description} + +\begin{verbatim} + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTIBINLL(unit,nrowsll,tfields,ttype,tform,tunit,extname,varidat > status) + +\end{verbatim} + +\section{Keyword I/O Routines} + + +\begin{description} +\item[1 ]Put (append) an 80-character record into the CHU. +\end{description} + +\begin{verbatim} + FTPREC(unit,card, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Put (append) a new keyword of the appropriate datatype into the CHU. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, + depending on the magnitude of the value. +\end{description} + +\begin{verbatim} + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +\end{verbatim} + +\begin{description} +\item[3 ]Get the nth 80-character header record from the CHU. The first keyword + in the header is at key\_no = 1; if key\_no = 0 then this subroutine + simple moves the internal pointer to the beginning of the header + so that subsequent keyword operations will start at the top of + the header; it also returns a blank card value in this case. +\end{description} + +\begin{verbatim} + FTGREC(unit,key_no, > card,status) +\end{verbatim} + +\begin{description} +\item[4 ] Get a keyword value (with the appropriate datatype) and comment from + the CHU +\end{description} + +\begin{verbatim} + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) +\end{verbatim} + +\begin{description} +\item[5 ] Delete an existing keyword record. +\end{description} + +\begin{verbatim} + FTDKEY(unit,keyword, > status) +\end{verbatim} + + +\section{Data I/O Routines} + +The following routines read or write data values in the current HDU of +the FITS file. Automatic datatype conversion +will be attempted for numerical datatypes if the specified datatype is +different from the actual datatype of the FITS array or table column. + + +\begin{description} +\item[1 ]Write elements into the primary data array or image extension. +\end{description} + +\begin{verbatim} + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Read elements from the primary data array or image extension. + Undefined array elements will be + returned with a value = nullval, unless nullval = 0 in which case no + checks for undefined pixels will be performed. The anyf parameter is + set to true (= .true.) if any of the returned + elements were undefined. +\end{description} + +\begin{verbatim} + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) +\end{verbatim} + +\begin{description} +\item[3 ] Write elements into an ASCII or binary table column. The `felem' + parameter applies only to vector columns in binary tables and is + ignored when writing to ASCII tables. +\end{description} + +\begin{verbatim} + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Read elements from an ASCII or binary table column. Undefined + array elements will be returned with a value = nullval, unless nullval = 0 + (or = ' ' for ftgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned + elements are undefined. + + Any column, regardless of it's intrinsic datatype, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column + as a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + datatype of the column. The length of the returned strings can be + determined with the ftgcdw routine. The following TDISPn display + formats are currently supported: + +\begin{verbatim} + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +\end{verbatim} + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the + decimal. The .m field is optional. +\end{description} + + +\begin{verbatim} + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) +\end{verbatim} + +\begin{description} +\item[5 ] Get the table column number and full name of the column whose name + matches the input template string. See the `Advanced Interface Routines' + chapter for a full description of this routine. +\end{description} + +\begin{verbatim} + FTGCNN(unit,casesen,coltemplate, > colname,colnum,status) +\end{verbatim} + + +\chapter{ Advanced Interface Subroutines } + +This chapter defines all the available subroutines in the FITSIO user +interface. For completeness, the basic subroutines described in the +previous chapter are also repeated here. A right arrow symbol is used +here to separate the input parameters from the output parameters in the +definition of each subroutine. This symbol is not actually part of the +calling sequence. An alphabetical list and definition of all the +parameters is given at the end of this section. + + +\section{FITS File Open and Close Subroutines: \label{FTOPEN}} + + +\begin{description} +\item[1 ]Open an existing FITS file with readonly or readwrite access. The +FTDKOPEN routine simply opens the specified file without trying to +interpret the filename using the extended filename syntax. FTDOPN opens +the file and +also moves to the first HDU containing significant data, if no specific +HDU is specified as part of the filename. FTTOPN and FTIOPN are similar +except that they will move to the first table HDU or image HDU, respectively, +if a HDU name or number is not specified as part of the filename. +\end{description} + +\begin{verbatim} + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) + + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) +\end{verbatim} + + +\begin{description} +\item[2 ]Open an existing FITS file with readonly or readwrite access + and move to a following extension, if one was specified as + part of the filename. (e.g., 'filename.fits+2' or + 'filename.fits[2]' will move to the 3rd HDU in the file). + Note that this routine differs from FTOPEN in that it does not + have the redundant blocksize argument. +\end{description} + +\begin{verbatim} + FTNOPN(unit,filename,rwmode, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Reopen a FITS file that was previously opened with + FTOPEN, FTNOPN, or FTINIT. The newunit number + may then be treated as a separate file, and one may + simultaneously read or write to 2 (or more) different extensions in + the same file. The FTOPEN and FTNOPN routines (above) automatically + detects cases where a previously opened file is being opened again, + and then internally call FTREOPEN, so programs should rarely + need to explicitly call this routine. +\end{description} + +\begin{verbatim} + FTREOPEN(unit, > newunit, status) +\end{verbatim} + +\begin{description} +\item[4 ]Open and initialize a new empty FITS file. + The FTDKINIT routine simply creates the specified + file without trying to interpret the filename using the extended + filename syntax. +\end{description} + +\begin{verbatim} + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) +\end{verbatim} + + +\begin{description} +\item[5 ] Create a new FITS file, using a template file to define its + initial size and structure. The template may be another FITS HDU + or an ASCII template file. If the input template file name + is blank, then this routine behaves the same as FTINIT. + The currently supported format of the ASCII template file is described + under the fits\_parse\_template routine (in the general Utilities + section), but this may change slightly later releases of + CFITSIO. +\end{description} + +\begin{verbatim} + FTTPLT(unit, filename, tplfilename, > status) +\end{verbatim} + +\begin{description} +\item[6 ]Flush internal buffers of data to the output FITS file + previously opened with ftopen or ftinit. The routine usually + never needs to be called, but doing so will ensure that + if the program subsequently aborts, then the FITS file will + have at least been closed properly. +\end{description} + +\begin{verbatim} + FTFLUS(unit, > status) +\end{verbatim} + +\begin{description} +\item[7 ]Close a FITS file previously opened with ftopen or ftinit +\end{description} + +\begin{verbatim} + FTCLOS(unit, > status) +\end{verbatim} + +\begin{description} +\item[8 ] Close and DELETE a FITS file previously opened with ftopen or ftinit. + This routine may be useful in cases where a FITS file is created, but + an error occurs which prevents the complete file from being written. +\end{description} + +\begin{verbatim} + FTDELT(unit, > status) +\end{verbatim} + +\begin{description} +\item[9 ] Get the value of an unused I/O unit number which may then be used + as input to FTOPEN or FTINIT. This routine searches for the first + unused unit number in the range from with 99 down to 50. This + routine just keeps an internal list of the allocated unit numbers + and does not physically check that the Fortran unit is available (to be + compatible with the SPP version of FITSIO). Thus users must not + independently allocate any unit numbers in the range 50 - 99 + if this routine is also to be used in the same program. This + routine is provided for convenience only, and it is not required + that the unit numbers used by FITSIO be allocated by this routine. +\end{description} + +\begin{verbatim} + FTGIOU( > iounit, status) +\end{verbatim} + +\begin{description} +\item[10] Free (deallocate) an I/O unit number which was previously allocated + with FTGIOU. All previously allocated unit numbers may be + deallocated at once by calling FTFIOU with iounit = -1. +\end{description} + +\begin{verbatim} + FTFIOU(iounit, > status) +\end{verbatim} + +\begin{description} +\item[11] Return the Fortran unit number that corresponds to the C fitsfile +pointer value, or vice versa. These 2 C routines may be useful in +mixed language programs where both C and Fortran subroutines need +to access the same file. For example, if a FITS file is opened +with unit 12 by a Fortran subroutine, then a C routine within the +same program could get the fitfile pointer value to access the same file +by calling 'fptr = CUnit2FITS(12)'. These routines return a value +of zero if an error occurs. +\end{description} + +\begin{verbatim} + int CFITS2Unit(fitsfile *ptr); + fitsfile* CUnit2FITS(int unit); +\end{verbatim} + + +\begin{description} +\item[11] Parse the input filename and return the HDU number that would be +moved to if the file were opened with FTNOPN. The returned HDU +number begins with 1 for the primary array, so for example, if the +input filename = `myfile.fits[2]' then hdunum = 3 will be returned. +FITSIO does not open the file to check if the extension actually exists +if an extension number is specified. If an extension *name* is included +in the file name specification (e.g. `myfile.fits[EVENTS]' then this +routine will have to open the FITS file and look for the position of +the named extension, then close file again. This is not possible if +the file is being read from the stdin stream, and an error will be +returned in this case. If the filename does not specify an explicit +extension (e.g. 'myfile.fits') then hdunum = -99 will be returned, +which is functionally equivalent to hdunum = 1. This routine is mainly +used for backward compatibility in the ftools software package and is +not recommended for general use. It is generally better and more +efficient to first open the FITS file with FTNOPN, then use FTGHDN to +determine which HDU in the file has been opened, rather than calling + FTEXTN followed by a call to FTNOPN. +\end{description} + +\begin{verbatim} + FTEXTN(filename, > nhdu, status) +\end{verbatim} + +\begin{description} +\item[12] Return the name of the opened FITS file. +\end{description} + +\begin{verbatim} + FTFLNM(unit, > filename, status) +\end{verbatim} + +\begin{description} +\item[13] Return the I/O mode of the open FITS file (READONLY = 0, READWRITE = 1). +\end{description} + +\begin{verbatim} + FTFLMD(unit, > iomode, status) +\end{verbatim} + +\begin{description} +\item[14] Return the file type of the opened FITS file (e.g. 'file://', 'ftp://', + etc.). +\end{description} + +\begin{verbatim} + FTURLT(unit, > urltype, status) +\end{verbatim} + +\begin{description} +\item[15] Parse the input filename or URL into its component parts: the file +type (file://, ftp://, http://, etc), the base input file name, the +name of the output file that the input file is to be copied to prior +to opening, the HDU or extension specification, the filtering +specifier, the binning specifier, and the column specifier. Blank +strings will be returned for any components that are not present +in the input file name. +\end{description} + +\begin{verbatim} + FTIURL(filename, > filetype, infile, outfile, extspec, filter, + binspec, colspec, status) +\end{verbatim} + +\begin{description} +\item[16] Parse the input file name and return the root file name. The root +name includes the file type if specified, (e.g. 'ftp://' or 'http://') +and the full path name, to the extent that it is specified in the input +filename. It does not include the HDU name or number, or any filtering +specifications. +\end{description} + +\begin{verbatim} + FTRTNM(filename, > rootname, status) +\end{verbatim} + + +\begin{description} +\item[16] Test if the input file or a compressed version of the file (with +a .gz, .Z, .z, or .zip extension) exists on disk. The returned value of +the 'exists' parameter will have 1 of the 4 following values: + +\begin{verbatim} + 2: the file does not exist, but a compressed version does exist + 1: the disk file does exist + 0: neither the file nor a compressed version of the file exist + -1: the input file name is not a disk file (could be a ftp, http, + smem, or mem file, or a file piped in on the STDIN stream) +\end{verbatim} + +\end{description} + +\begin{verbatim} + FTEXIST(filename, > exists, status); +\end{verbatim} + +\section{HDU-Level Operations \label{FTMAHD}} + +When a FITS file is first opened or created, the internal buffers in +FITSIO automatically point to the first HDU in the file. The following +routines may be used to move to another HDU in the file. Note that +the HDU numbering convention used in FITSIO denotes the primary array +as the first HDU, the first extension in a FITS file is the second HDU, +and so on. + + +\begin{description} +\item[1 ] Move to a specified (absolute) HDU in the FITS file (nhdu = 1 for the + FITS primary array) +\end{description} + +\begin{verbatim} + FTMAHD(unit,nhdu, > hdutype,status) +\end{verbatim} + +\begin{description} +\item[2 ]Move to a new (existing) HDU forward or backwards relative to the CHDU +\end{description} + +\begin{verbatim} + FTMRHD(unit,nmove, > hdutype,status) +\end{verbatim} + +\begin{description} +\item[3 ] Move to the (first) HDU which has the specified extension type and + EXTNAME (or HDUNAME) and EXTVER keyword values. The hdutype parameter + may have + a value of IMAGE\_HDU (0), ASCII\_TBL (1), BINARY\_TBL (2), or ANY\_HDU (-1) + where ANY\_HDU means that only the extname and extver values will be + used to locate the correct extension. If the input value of + extver is 0 then the EXTVER keyword is ignored and the first HDU + with a matching EXTNAME (or HDUNAME) keyword will be found. If no + matching HDU is found in the file then the current HDU will remain + unchanged + and a status = BAD\_HDU\_NUM (301) will be returned. +\end{description} + +\begin{verbatim} + FTMNHD(unit, hdutype, extname, extver, > status) +\end{verbatim} + +\begin{description} +\item[4 ]Get the number of the current HDU in the FITS file (primary array = 1) +\end{description} + +\begin{verbatim} + FTGHDN(unit, > nhdu) +\end{verbatim} + +\begin{description} +\item[5 ] Return the type of the current HDU in the FITS file. The possible + values for hdutype are IMAGE\_HDU (0), ASCII\_TBL (1), or BINARY\_TBL (2). +\end{description} + +\begin{verbatim} + FTGHDT(unit, > hdutype, status) +\end{verbatim} + +\begin{description} +\item[6 ] Return the total number of HDUs in the FITS file. + The CHDU remains unchanged. +\end{description} + +\begin{verbatim} + FTTHDU(unit, > hdunum, status) +\end{verbatim} + +\begin{description} +\item[7 ]Create (append) a new empty HDU following the last extension that + has been previously accessed by the program. This will overwrite + any extensions in an existing FITS file if the program has not already + moved to that (or a later) extension using the FTMAHD or FTMRHD routines. + For example, if an existing FITS file contains a primary array and 5 + extensions and a program (1) opens the FITS file, (2) moves to + extension 4, (3) moves back to the primary array, and (4) then calls + FTCRHD, then the new extension will be written following the 4th + extension, overwriting the existing 5th extension. +\end{description} + +\begin{verbatim} + FTCRHD(unit, > status) +\end{verbatim} + + +\begin{description} +\item[8 ] Create a primary array (if none already exists), or insert a + new IMAGE extension immediately following the CHDU, or + insert a new Primary Array at the beginning of the file. Any + following extensions in the file will be shifted down to make room + for the new extension. If the CHDU is the last HDU in the file + then the new image extension will simply be appended to the end of + the file. One can force a new primary array to be inserted at the + beginning of the FITS file by setting status = -9 prior + to calling the routine. In this case the existing primary array will be + converted to an IMAGE extension. The new extension (or primary + array) will become the CHDU. The FTIIMGLL routine is identical + to the FTIIMG routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array + of 32-bit integers. +\end{description} + +\begin{verbatim} + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTIIMGLL(unit,bitpix,naxis,naxesll, > status) +\end{verbatim} + +\begin{description} +\item[9 ] Insert a new ASCII TABLE extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new table extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTITABLL + routine is identical + to the FTITAB routine except that the 2nd and 3rd parameters (that give + the size of the table) are 64-bit integers rather than + 32-bit integers. +\end{description} + +\begin{verbatim} + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTITABLL(unit,rowlenll,nrowsll,tfields,ttype,tbcol,tform,tunit,extname, > + status) +\end{verbatim} + + +\begin{description} +\item[10] Insert a new binary table extension immediately following the CHDU. + Any following extensions will be shifted down to make room for + the new extension. If there are no other following extensions + then the new bintable extension will simply be appended to the + end of the file. The new extension will become the CHDU. The FTIBINLL + routine is identical + to the FTIBIN routine except that the 2nd parameter (that gives + the length of the table) is a 64-bit integer rather than + a 32-bit integer. +\end{description} + +\begin{verbatim} + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTIBINLL(unit,nrowsll,tfields,ttype,tform,tunit,extname,varidat > status) + +\end{verbatim} + + +\begin{description} +\item[11] Resize an image by modifing the size, dimensions, and/or datatype of the + current primary array or image extension. If the new image, as specified + by the input arguments, is larger than the current existing image + in the FITS file then zero fill data will be inserted at the end + of the current image and any following extensions will be moved + further back in the file. Similarly, if the new image is + smaller than the current image then any following extensions + will be shifted up towards the beginning of the FITS file + and the image data will be truncated to the new size. + This routine rewrites the BITPIX, NAXIS, and NAXISn keywords + with the appropriate values for new image. The FTRSIMLL routine is identical + to the FTRSIM routine except that the 4th parameter (the length + of each axis) is an array of 64-bit integers rather than an array + of 32-bit integers. +\end{description} + +\begin{verbatim} + FTRSIM(unit,bitpix,naxis,naxes,status) + FTRSIMLL(unit,bitpix,naxis,naxesll,status) +\end{verbatim} + +\begin{description} +\item[12] Delete the CHDU in the FITS file. Any following HDUs will be shifted + forward in the file, to fill in the gap created by the deleted + HDU. In the case of deleting the primary array (the first HDU in + the file) then the current primary array will be replace by a null + primary array containing the minimum set of required keywords and + no data. If there are more extensions in the file following the + one that is deleted, then the the CHDU will be redefined to point + to the following extension. If there are no following extensions + then the CHDU will be redefined to point to the previous HDU. The + output HDUTYPE parameter indicates the type of the new CHDU after + the previous CHDU has been deleted. +\end{description} + +\begin{verbatim} + FTDHDU(unit, > hdutype,status) +\end{verbatim} + +\begin{description} +\item[13] Copy all or part of the input FITS file and append it + to the end of the output FITS file. If 'previous' (an integer parameter) is + not equal to 0, then any HDUs preceding the current HDU in the input file + will be copied to the output file. Similarly, 'current' and 'following' + determine whether the current HDU, and/or any following HDUs in the input + file will be copied to the output file. If all 3 parameters are not equal + to zero, then the entire input file will be copied. On return, the current + HDU in the input file will be unchanged, and the last copied HDU will be the + current HDU in the output file. +\end{description} + +\begin{verbatim} + FTCPFL(iunit, ounit, previous, current, following, > status) +\end{verbatim} + +\begin{description} +\item[14] Copy the entire CHDU from the FITS file associated with IUNIT to the CHDU + of the FITS file associated with OUNIT. The output HDU must be empty and + not already contain any keywords. Space will be reserved for MOREKEYS + additional keywords in the output header if there is not already enough + space. +\end{description} + +\begin{verbatim} + FTCOPY(iunit,ounit,morekeys, > status) +\end{verbatim} + +\begin{description} +\item[15] Copy the header (and not the data) from the CHDU associated with inunit + to the CHDU associated with outunit. If the current output HDU + is not completely empty, then the CHDU will be closed and a new + HDU will be appended to the output file. This routine will automatically + transform the necessary keywords when copying a primary array to + and image extension, or an image extension to a primary array. + An empty output data unit will be created (all values = 0). +\end{description} + +\begin{verbatim} + FTCPHD(inunit, outunit, > status) +\end{verbatim} + +\begin{description} +\item[16] Copy just the data from the CHDU associated with IUNIT + to the CHDU associated with OUNIT. This will overwrite + any data previously in the OUNIT CHDU. This low level routine is used + by FTCOPY, but it may also be useful in certain application programs + which want to copy the data from one FITS file to another but also + want to modify the header keywords in the process. all the required + header keywords must be written to the OUNIT CHDU before calling + this routine +\end{description} + +\begin{verbatim} + FTCPDT(iunit,ounit, > status) +\end{verbatim} + + +\section{Define or Redefine the structure of the CHDU \label{FTRDEF}} + +It should rarely be necessary to call the subroutines in this section. +FITSIO internally calls these routines whenever necessary, so any calls +to these routines by application programs will likely be redundant. + + +\begin{description} +\item[1 ] This routine forces FITSIO to scan the current header keywords that + define the structure of the HDU (such as the NAXISn, PCOUNT and GCOUNT + keywords) so that it can initialize the internal buffers that describe + the HDU structure. This routine may be used instead of the more + complicated calls to ftpdef, ftadef or ftbdef. This routine is + also very useful for reinitializing the structure of an HDU, + if the number of rows in a table, as specified by the NAXIS2 keyword, + has been modified from its initial value. +\end{description} + +\begin{verbatim} + FTRDEF(unit, > status) (DEPRECATED) +\end{verbatim} + +\begin{description} +\item[2 ]Define the structure of the primary array or IMAGE extension. When + writing GROUPed FITS files that by convention set the NAXIS1 keyword + equal to 0, ftpdef must be called with naxes(1) = 1, NOT 0, otherwise + FITSIO will report an error status=308 when trying to write data + to a group. Note: it is usually simpler to call FTRDEF rather + than this routine. +\end{description} + +\begin{verbatim} + FTPDEF(unit,bitpix,naxis,naxes,pcount,gcount, > status) (DEPRECATED) +\end{verbatim} + +\begin{description} +\item[3 ] Define the structure of an ASCII table (TABLE) extension. Note: it + is usually simpler to call FTRDEF rather than this routine. +\end{description} + +\begin{verbatim} + FTADEF(unit,rowlen,tfields,tbcol,tform,nrows > status) (DEPRECATED) +\end{verbatim} + +\begin{description} +\item[4 ] Define the structure of a binary table (BINTABLE) extension. Note: it + is usually simpler to call FTRDEF rather than this routine. +\end{description} + +\begin{verbatim} + FTBDEF(unit,tfields,tform,varidat,nrows > status) (DEPRECATED) +\end{verbatim} + +\begin{description} +\item[5 ] Define the size of the Current Data Unit, overriding the length + of the data unit as previously defined by ftpdef, ftadef, or ftbdef. + This is useful if one does not know the total size of the data unit until + after the data have been written. The size (in bytes) of an ASCII or + Binary table is given by NAXIS1 * NAXIS2. (Note that to determine the + value of NAXIS1 it is often more convenient to read the value of the + NAXIS1 keyword from the output file, rather than computing the row + length directly from all the TFORM keyword values). Note: it + is usually simpler to call FTRDEF rather than this routine. +\end{description} + +\begin{verbatim} + FTDDEF(unit,bytlen, > status) (DEPRECATED) +\end{verbatim} + +\begin{description} +\item[6 ] Define the zero indexed byte offset of the 'heap' measured from + the start of the binary table data. By default the heap is assumed + to start immediately following the regular table data, i.e., at + location NAXIS1 x NAXIS2. This routine is only relevant for + binary tables which contain variable length array columns (with + TFORMn = 'Pt'). This subroutine also automatically writes + the value of theap to a keyword in the extension header. This + subroutine must be called after the required keywords have been + written (with ftphbn) and after the table structure has been defined + (with ftbdef) but before any data is written to the table. +\end{description} + +\begin{verbatim} + FTPTHP(unit,theap, > status) +\end{verbatim} + + +\section{FITS Header I/O Subroutines} + + +\subsection{Header Space and Position Routines \label{FTHDEF}} + + +\begin{description} +\item[1 ] Reserve space in the CHU for MOREKEYS more header keywords. + This subroutine may be called to reserve space for keywords which are + to be written at a later time, after the data unit or subsequent + extensions have been written to the FITS file. If this subroutine is + not explicitly called, then the initial size of the FITS header will be + limited to the space available at the time that the first data is written + to the associated data unit. FITSIO has the ability to dynamically + add more space to the header if needed, however it is more efficient + to preallocate the required space if the size is known in advance. +\end{description} + +\begin{verbatim} + FTHDEF(unit,morekeys, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Return the number of existing keywords in the CHU (NOT including the + END keyword which is not considered a real keyword) and the remaining + space available to write additional keywords in the CHU. (returns + KEYSADD = -1 if the header has not yet been closed). + Note that FITSIO will attempt to dynamically add space for more + keywords if required when appending new keywords to a header. +\end{description} + +\begin{verbatim} + FTGHSP(iunit, > keysexist,keysadd,status) +\end{verbatim} + +\begin{description} +\item[3 ] Return the number of keywords in the header and the current position + in the header. This returns the number of the keyword record that + will be read next (or one greater than the position of the last keyword + that was read or written). A value of 1 is returned if the pointer is + positioned at the beginning of the header. +\end{description} + +\begin{verbatim} + FTGHPS(iunit, > keysexist,key_no,status) +\end{verbatim} + +\subsection{Read or Write Standard Header Routines \label{FTPHPR}} + +These subroutines provide a simple method of reading or writing most of +the keyword values that are normally required in a FITS files. These +subroutines are provided for convenience only and are not required to +be used. If preferred, users may call the lower-level subroutines +described in the previous section to individually read or write the +required keywords. Note that in most cases, the required keywords such +as NAXIS, TFIELD, TTYPEn, etc, which define the structure of the HDU +must be written to the header before any data can be written to the +image or table. + + +\begin{description} +\item[1 ] Put the primary header or IMAGE extension keywords into the CHU. +There are 2 available routines: The simpler FTPHPS routine is +equivalent to calling ftphpr with the default values of SIMPLE = true, +pcount = 0, gcount = 1, and EXTEND = true. PCOUNT, GCOUNT and EXTEND +keywords are not required in the primary header and are only written if +pcount is not equal to zero, gcount is not equal to zero or one, and if +extend is TRUE, respectively. When writing to an IMAGE extension, the +SIMPLE and EXTEND parameters are ignored. +\end{description} + +\begin{verbatim} + FTPHPS(unit,bitpix,naxis,naxes, > status) + + FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Get primary header or IMAGE extension keywords from the CHU. When + reading from an IMAGE extension the SIMPLE and EXTEND parameters are + ignored. +\end{description} + +\begin{verbatim} + FTGHPR(unit,maxdim, > simple,bitpix,naxis,naxes,pcount,gcount,extend, + status) +\end{verbatim} + +\begin{description} +\item[3 ] Put the ASCII table header keywords into the CHU. The optional +TUNITn and EXTNAME keywords are written only if the input string +values are not blank. +\end{description} + +\begin{verbatim} + FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) +\end{verbatim} + +\begin{description} +\item[4 ] Get the ASCII table header keywords from the CHU +\end{description} + +\begin{verbatim} + FTGHTB(unit,maxdim, > rowlen,nrows,tfields,ttype,tbcol,tform,tunit, + extname,status) +\end{verbatim} + +\begin{description} +\item[5 ]Put the binary table header keywords into the CHU. The optional + TUNITn and EXTNAME keywords are written only if the input string + values are not blank. The pcount parameter, which specifies the + size of the variable length array heap, should initially = 0; + FITSIO will automatically update the PCOUNT keyword value if any + variable length array data is written to the heap. The TFORM keyword + value for variable length vector columns should have the form 'Pt(len)' + or '1Pt(len)' where `t' is the data type code letter (A,I,J,E,D, etc.) + and `len' is an integer specifying the maximum length of the vectors + in that column (len must be greater than or equal to the longest + vector in the column). If `len' is not specified when the table is + created (e.g., the input TFORMn value is just '1Pt') then FITSIO will + scan the column when the table is first closed and will append the + maximum length to the TFORM keyword value. Note that if the table + is subsequently modified to increase the maximum length of the vectors + then the modifying program is responsible for also updating the TFORM + keyword value. +\end{description} + + +\begin{verbatim} + FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat, > status) +\end{verbatim} + +\begin{description} +\item[6 ]Get the binary table header keywords from the CHU +\end{description} + +\begin{verbatim} + FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat, + status) +\end{verbatim} + +\subsection{Write Keyword Subroutines \label{FTPREC}} + + +\begin{description} +\item[1 ]Put (append) an 80-character record into the CHU. +\end{description} + +\begin{verbatim} + FTPREC(unit,card, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Put (append) a COMMENT keyword into the CHU. Multiple COMMENT keywords + will be written if the input comment string is longer than 72 characters. +\end{description} + +\begin{verbatim} + FTPCOM(unit,comment, > status) +\end{verbatim} + +\begin{description} +\item[3 ]Put (append) a HISTORY keyword into the CHU. Multiple HISTORY keywords + will be written if the input history string is longer than 72 characters. +\end{description} + +\begin{verbatim} + FTPHIS(unit,history, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Put (append) the DATE keyword into the CHU. The keyword value will contain + the current system date as a character string in 'dd/mm/yy' format. If + a DATE keyword already exists in the header, then this subroutine will + simply update the keyword value in-place with the current date. +\end{description} + +\begin{verbatim} + FTPDAT(unit, > status) +\end{verbatim} + +\begin{description} +\item[5 ] Put (append) a new keyword of the appropriate datatype into the CHU. + Note that FTPKYS will only write string values up to 68 characters in + length; longer strings will be truncated. The FTPKLS routine can be + used to write longer strings, using a non-standard FITS convention. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, + depending on the magnitude of the value. +\end{description} + +\begin{verbatim} + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Put (append) a string valued keyword into the CHU which may be longer + than 68 characters in length. This uses the Long String Keyword + convention that is described in the "Usage Guidelines and Suggestions" + section of this document. Since this uses a non-standard FITS + convention to encode the long keyword string, programs which use + this routine should also call the FTPLSW routine to add some COMMENT + keywords to warn users of the FITS file that this convention is + being used. FTPLSW also writes a keyword called LONGSTRN to record + the version of the longstring convention that has been used, in case + a new convention is adopted at some point in the future. If the + LONGSTRN keyword is already present in the header, then FTPLSW will + simply return and will not write duplicate keywords. +\end{description} + +\begin{verbatim} + FTPKLS(unit,keyword,keyval,comment, > status) + FTPLSW(unit, > status) +\end{verbatim} + +\begin{description} +\item[7 ] Put (append) a new keyword with an undefined, or null, value into the CHU. + The value string of the keyword is left blank in this case. +\end{description} + +\begin{verbatim} + FTPKYU(unit,keyword,comment, > status) +\end{verbatim} + +\begin{description} +\item[8 ] Put (append) a numbered sequence of keywords into the CHU. One may + append the same comment to every keyword (and eliminate the need + to have an array of identical comment strings, one for each keyword) by + including the ampersand character as the last non-blank character in the + (first) COMMENTS string parameter. This same string + will then be used for the comment field in all the keywords. (Note + that the SPP version of these routines only supports a single comment + string). +\end{description} + +\begin{verbatim} + FTPKN[JKLS](unit,keyroot,startno,no_keys,keyvals,comments, > status) + FTPKN[EDFG](unit,keyroot,startno,no_keys,keyvals,decimals,comments, > + status) +\end{verbatim} + +\begin{description} +\item[9 ]Copy an indexed keyword from one HDU to another, modifying + the index number of the keyword name in the process. For example, + this routine could read the TLMIN3 keyword from the input HDU + (by giving keyroot = "TLMIN" and innum = 3) and write it to the + output HDU with the keyword name TLMIN4 (by setting outnum = 4). + If the input keyword does not exist, then this routine simply + returns without indicating an error. +\end{description} + +\begin{verbatim} + FTCPKY(inunit, outunit, innum, outnum, keyroot, > status) +\end{verbatim} + +\begin{description} +\item[10] Put (append) a 'triple precision' keyword into the CHU in F28.16 format. + The floating point keyword value is constructed by concatenating the + input integer value with the input double precision fraction value + (which must have a value between 0.0 and 1.0). The FTGKYT routine should + be used to read this keyword value, because the other keyword reading + subroutines will not preserve the full precision of the value. +\end{description} + +\begin{verbatim} + FTPKYT(unit,keyword,intval,dblval,comment, > status) +\end{verbatim} + +\begin{description} +\item[11] Write keywords to the CHDU that are defined in an ASCII template file. + The format of the template file is described under the ftgthd + routine below. +\end{description} + +\begin{verbatim} + FTPKTP(unit, filename, > status) +\end{verbatim} + +\begin{description} +\item[12] Append the physical units string to an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are enclosed in square brackets in the + beginning of the keyword comment field. +\end{description} + + +\begin{verbatim} + VELOCITY= 12.3 / [km/s] orbital speed + + FTPUNT(unit,keyword,units, > status) +\end{verbatim} + +\subsection{Insert Keyword Subroutines \label{FTIREC}} + + +\begin{description} +\item[1 ] Insert a new keyword record into the CHU at the specified position + (i.e., immediately preceding the (keyno)th keyword in the header.) + This 'insert record' subroutine is somewhat less efficient + then the 'append record' subroutine (FTPREC) described above because + the remaining keywords in the header have to be shifted down one slot. +\end{description} + +\begin{verbatim} + FTIREC(unit,key_no,card, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Insert a new keyword into the CHU. The new keyword is inserted + immediately following the last keyword that has been read from the header. + The FTIKLS subroutine works the same as the FTIKYS subroutine, except + it also supports long string values greater than 68 characters in length. + These 'insert keyword' subroutines are somewhat less efficient then + the 'append keyword' subroutines described above because the remaining + keywords in the header have to be shifted down one slot. +\end{description} + +\begin{verbatim} + FTIKEY(unit, card, > status) + FTIKY[JKLS](unit,keyword,keyval,comment, > status) + FTIKLS(unit,keyword,keyval,comment, > status) + FTIKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Insert a new keyword with an undefined, or null, value into the CHU. + The value string of the keyword is left blank in this case. +\end{description} + +\begin{verbatim} + FTIKYU(unit,keyword,comment, > status) +\end{verbatim} + +\subsection{Read Keyword Subroutines \label{FTGREC}} + +These routines return the value of the specified keyword(s). Wild card +characters (*, ?, or \#) may be used when specifying the name of the keyword +to be read: a '?' will match any single character at that position in the +keyword name and a '*' will match any length (including zero) string of +characters. The '\#' character will match any consecutive string of +decimal digits (0 - 9). Note that when a wild card is used in the input +keyword name, the routine will only search for a match from the current +header position to the end of the header. It will not resume the search +from the top of the header back to the original header position as is done +when no wildcards are included in the keyword name. If the desired +keyword string is 8-characters long (the maximum length of a keyword +name) then a '*' may be appended as the ninth character of the input +name to force the keyword search to stop at the end of the header +(e.g., 'COMMENT *' will search for the next COMMENT keyword). The +ffgrec routine may be used to set the starting position when doing +wild card searches. + + +\begin{description} +\item[1 ]Get the nth 80-character header record from the CHU. The first keyword + in the header is at key\_no = 1; if key\_no = 0 then this subroutine + simple moves the internal pointer to the beginning of the header + so that subsequent keyword operations will start at the top of + the header; it also returns a blank card value in this case. +\end{description} + +\begin{verbatim} + FTGREC(unit,key_no, > card,status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the name, value (as a string), and comment of the nth keyword in CHU. + This routine also checks that the returned keyword name (KEYWORD) contains + only legal ASCII characters. Call FTGREC and FTPSVC to bypass this error + check. +\end{description} + +\begin{verbatim} + FTGKYN(unit,key_no, > keyword,value,comment,status) +\end{verbatim} + +\begin{description} +\item[3 ] Get the 80-character header record for the named keyword +\end{description} + +\begin{verbatim} + FTGCRD(unit,keyword, > card,status) +\end{verbatim} + +\begin{description} +\item[4 ] Get the next keyword whose name matches one of the strings in + 'inclist' but does not match any of the strings in 'exclist'. + The strings in inclist and exclist may contain wild card characters + (*, ?, and \#) as described at the beginning of this section. + This routine searches from the current header position to the + end of the header, only, and does not continue the search from + the top of the header back to the original position. The current + header position may be reset with the ftgrec routine. Note + that nexc may be set = 0 if there are no keywords to be excluded. + This routine returns status = 202 if a matching + keyword is not found. +\end{description} + +\begin{verbatim} + FTGNXK(unit,inclist,ninc,exclist,nexc, > card,status) +\end{verbatim} + +\begin{description} +\item[5 ] Get the literal keyword value as a character string. Regardless + of the datatype of the keyword, this routine simply returns the + string of characters in the value field of the keyword along with + the comment field. +\end{description} + +\begin{verbatim} + FTGKEY(unit,keyword, > value,comment,status) +\end{verbatim} + +\begin{description} +\item[6 ] Get a keyword value (with the appropriate datatype) and comment from + the CHU +\end{description} + +\begin{verbatim} + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) +\end{verbatim} + +\begin{description} +\item[7 ] Get a sequence of numbered keyword values. These + routines do not support wild card characters in the root name. +\end{description} + +\begin{verbatim} + FTGKN[EDJKLS](unit,keyroot,startno,max_keys, > keyvals,nfound,status) +\end{verbatim} + +\begin{description} +\item[8 ] Get the value of a floating point keyword, returning the integer and + fractional parts of the value in separate subroutine arguments. + This subroutine may be used to read any keyword but is especially + useful for reading the 'triple precision' keywords written by FTPKYT. +\end{description} + +\begin{verbatim} + FTGKYT(unit,keyword, > intval,dblval,comment,status) +\end{verbatim} + +\begin{description} +\item[9 ] Get the physical units string in an existing keyword. This + routine uses a local convention, shown in the following example, + in which the keyword units are + enclosed in square brackets in the beginning of the keyword comment + field. A blank string is returned if no units are defined + for the keyword. +\end{description} + +\begin{verbatim} + VELOCITY= 12.3 / [km/s] orbital speed + + FTGUNT(unit,keyword, > units,status) +\end{verbatim} + +\subsection{Modify Keyword Subroutines \label{FTMREC}} + +Wild card characters, as described in the Read Keyword section, above, +may be used when specifying the name of the keyword to be modified. + + +\begin{description} +\item[1 ] Modify (overwrite) the nth 80-character header record in the CHU +\end{description} + +\begin{verbatim} + FTMREC(unit,key_no,card, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Modify (overwrite) the 80-character header record for the named keyword + in the CHU. This can be used to overwrite the name of the keyword as + well as its value and comment fields. +\end{description} + +\begin{verbatim} + FTMCRD(unit,keyword,card, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Modify (overwrite) the name of an existing keyword in the CHU + preserving the current value and comment fields. +\end{description} + +\begin{verbatim} + FTMNAM(unit,oldkey,keyword, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Modify (overwrite) the comment field of an existing keyword in the CHU +\end{description} + +\begin{verbatim} + FTMCOM(unit,keyword,comment, > status) +\end{verbatim} + +\begin{description} +\item[5 ] Modify the value and comment fields of an existing keyword in the CHU. + The FTMKLS subroutine works the same as the FTMKYS subroutine, except + it also supports long string values greater than 68 characters in length. + Optionally, one may modify only the value field and leave the comment + field unchanged by setting the input COMMENT parameter equal to + the ampersand character (\&). + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, + depending on the magnitude of the value. +\end{description} + +\begin{verbatim} + FTMKY[JKLS](unit,keyword,keyval,comment, > status) + FTMKLS(unit,keyword,keyval,comment, > status) + FTMKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Modify the value of an existing keyword to be undefined, or null. + The value string of the keyword is set to blank. + Optionally, one may leave the comment field unchanged by setting the + input COMMENT parameter equal to the ampersand character (\&). +\end{description} + +\begin{verbatim} + FTMKYU(unit,keyword,comment, > status) +\end{verbatim} + +\subsection{Update Keyword Subroutines \label{FTUCRD}} + + +\begin{description} +\item[1 ] Update an 80-character record in the CHU. If the specified keyword + already exists then that header record will be replaced with + the input CARD string. If it does not exist then the new record will + be added to the header. + The FTUKLS subroutine works the same as the FTUKYS subroutine, except + it also supports long string values greater than 68 characters in length. +\end{description} + +\begin{verbatim} + FTUCRD(unit,keyword,card, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Update the value and comment fields of a keyword in the CHU. + The specified keyword is modified if it already exists (by calling + FTMKYx) otherwise a new keyword is created by calling FTPKYx. + The E and D versions of this routine have the added feature that + if the 'decimals' parameter is negative, then the 'G' display + format rather then the 'E' format will be used when constructing + the keyword value, taking the absolute value of 'decimals' for the + precision. This will suppress trailing zeros, and will use a + fixed format rather than an exponential format, + depending on the magnitude of the value. +\end{description} + +\begin{verbatim} + FTUKY[JKLS](unit,keyword,keyval,comment, > status) + FTUKLS(unit,keyword,keyval,comment, > status) + FTUKY[EDFG](unit,keyword,keyval,decimals,comment, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Update the value of an existing keyword to be undefined, or null, + or insert a new undefined-value keyword if it doesn't already exist. + The value string of the keyword is left blank in this case. +\end{description} + +\begin{verbatim} + FTUKYU(unit,keyword,comment, > status) +\end{verbatim} + +\subsection{Delete Keyword Subroutines \label{FTDREC}} + + +\begin{description} +\item[1 ] Delete an existing keyword record. The space previously occupied by + the keyword is reclaimed by moving all the following header records up + one row in the header. The first routine deletes a keyword at a + specified position in the header (the first keyword is at position 1), + whereas the second routine deletes a specifically named keyword. + Wild card characters, as described in the Read Keyword section, above, + may be used when specifying the name of the keyword to be deleted + (be careful!). +\end{description} + +\begin{verbatim} + FTDREC(unit,key_no, > status) + FTDKEY(unit,keyword, > status) +\end{verbatim} + + +\section{Data Scaling and Undefined Pixel Parameters \label{FTPSCL}} + +These subroutines define or modify the internal parameters used by +FITSIO to either scale the data or to represent undefined pixels. +Generally FITSIO will scale the data according to the values of the BSCALE +and BZERO (or TSCALn and TZEROn) keywords, however these subroutines +may be used to override the keyword values. This may be useful when +one wants to read or write the raw unscaled values in the FITS file. +Similarly, FITSIO generally uses the value of the BLANK or TNULLn +keyword to signify an undefined pixel, but these routines may be used +to override this value. These subroutines do not create or modify the +corresponding header keyword values. + + +\begin{description} +\item[1 ] Reset the scaling factors in the primary array or image extension; does + not change the BSCALE and BZERO keyword values and only affects the + automatic scaling performed when the data elements are written/read + to/from the FITS file. When reading from a FITS file the returned + data value = (the value given in the FITS array) * BSCALE + BZERO. + The inverse formula is used when writing data values to the FITS + file. (NOTE: BSCALE and BZERO must be declared as Double Precision + variables). +\end{description} + +\begin{verbatim} + FTPSCL(unit,bscale,bzero, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Reset the scaling parameters for a table column; does not change + the TSCALn or TZEROn keyword values and only affects the automatic + scaling performed when the data elements are written/read to/from + the FITS file. When reading from a FITS file the returned data + value = (the value given in the FITS array) * TSCAL + TZERO. The + inverse formula is used when writing data values to the FITS file. + (NOTE: TSCAL and TZERO must be declared as Double Precision + variables). +\end{description} + +\begin{verbatim} + FTTSCL(unit,colnum,tscal,tzero, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Define the integer value to be used to signify undefined pixels in the + primary array or image extension. This is only used if BITPIX = 8, 16, + 32. or 64 This does not create or change the value of the BLANK keyword in + the header. FTPNULLL is identical to FTPNUL except that the blank + value is a 64-bit integer instead of a 32-bit integer. +\end{description} + +\begin{verbatim} + FTPNUL(unit,blank, > status) + FTPNULLL(unit,blankll, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Define the string to be used to signify undefined pixels in + a column in an ASCII table. This does not create or change the value + of the TNULLn keyword. +\end{description} + +\begin{verbatim} + FTSNUL(unit,colnum,snull > status) +\end{verbatim} + +\begin{description} +\item[5 ] Define the value to be used to signify undefined pixels in + an integer column in a binary table (where TFORMn = 'B', 'I', 'J', or 'K'). + This does not create or change the value of the TNULLn keyword. + FTTNULLL is identical to FTTNUL except that the tnull + value is a 64-bit integer instead of a 32-bit integer. +\end{description} + +\begin{verbatim} + FTTNUL(unit,colnum,tnull > status) + FTTNULLL(unit,colnum,tnullll > status) +\end{verbatim} + + +\section{FITS Primary Array or IMAGE Extension I/O Subroutines \label{FTPPR}} + + These subroutines put or get data values in the primary data array +(i.e., the first HDU in the FITS file) or an IMAGE extension. The +data array is represented as a single one-dimensional array of +pixels regardless of the actual dimensionality of the array, and the +FPIXEL parameter gives the position within this 1-D array of the first +pixel to read or write. Automatic data type conversion is performed +for numeric data (except for complex data types) if the data type of +the primary array (defined by the BITPIX keyword) differs from the data +type of the array in the calling subroutine. The data values are also +scaled by the BSCALE and BZERO header values as they are being written +or read from the FITS array. The ftpscl subroutine MUST be +called to define the scaling parameters when writing data to the FITS +array or to override the default scaling value given in the header when +reading the FITS array. + + Two sets of subroutines are provided to read the data array which +differ in the way undefined pixels are handled. The first set of +routines (FTGPVx) simply return an array of data elements in which +undefined pixels are set equal to a value specified by the user in the +'nullval' parameter. An additional feature of these subroutines is +that if the user sets nullval = 0, then no checks for undefined pixels +will be performed, thus increasing the speed of the program. The +second set of routines (FTGPFx) returns the data element array and, in +addition, a logical array which defines whether the corresponding data +pixel is undefined. The latter set of subroutines may be more +convenient to use in some circumstances, however, it requires an +additional array of logical values which can be unwieldy when working +with large data arrays. Also for programmer convenience, sets of +subroutines to directly read or write 2 and 3 dimensional arrays have +been provided, as well as a set of subroutines to read or write any +contiguous rectangular subset of pixels within the n-dimensional array. + + +\begin{description} +\item[1 ] Get the data type of the image (= BITPIX value). Possible returned + values are: 8, 16, 32, 64, -32, or -64 corresponding to unsigned byte, + signed 2-byte integer, signed 4-byte integer, signed 8-byte integer, + real, and double. + + The second subroutine is similar to FTGIDT, except that if the image + pixel values are scaled, with non-default values for the BZERO and + BSCALE keywords, then this routine will return the 'equivalent' + data type that is needed to store the scaled values. For example, + if BITPIX = 16 and BSCALE = 0.1 then the equivalent data type is + floating point, and -32 will be returned. There are 2 special cases: + if the image contains unsigned 2-byte integer values, with BITPIX = + 16, BSCALE = 1, and BZERO = 32768, then this routine will return + a non-standard value of 20 for the bitpix value. Similarly if the + image contains unsigned 4-byte integers, then bitpix will + be returned with a value of 40. +\end{description} + + +\begin{verbatim} + FTGIDT(unit, > bitpix,status) + FTGIET(unit, > bitpix,status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the dimension (number of axes = NAXIS) of the image +\end{description} + +\begin{verbatim} + FTGIDM(unit, > naxis,status) +\end{verbatim} + +\begin{description} +\item[3 ] Get the size of all the dimensions of the image. The FTGISZLL + routine returns an array of 64-bit integers instead of 32-bit integers. +\end{description} + +\begin{verbatim} + FTGISZ(unit, maxdim, > naxes,status) + FTGISZLL(unit, maxdim, > naxesll,status) +\end{verbatim} + +\begin{description} +\item[4 ] Get the parameters that define the type and size of the image. This + routine simply combines calls to the above 3 routines. The FTGIPRLL + routine returns an array of 64-bit integers instead of 32-bit integers. +\end{description} + + +\begin{verbatim} + FTGIPR(unit, maxdim, > bitpix, naxis, naxes, int *status) + FTGIPRLL(unit, maxdim, > bitpix, naxis, naxesll, int *status) +\end{verbatim} + +\begin{description} +\item[5 ]Put elements into the data array +\end{description} + +\begin{verbatim} + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) +\end{verbatim} + +\begin{description} +\item[6 ]Put elements into the data array, substituting the appropriate FITS null + value for all elements which are equal to the value of NULLVAL. For + integer FITS arrays, the null value defined by the previous call to FTPNUL + will be substituted; for floating point FITS arrays (BITPIX = -32 + or -64) then the special IEEE NaN (Not-a-Number) value will be + substituted. +\end{description} + +\begin{verbatim} + FTPPN[BIJKED](unit,group,fpixel,nelements,values,nullval > status) +\end{verbatim} + +\begin{description} +\item[7 ]Set data array elements as undefined +\end{description} + +\begin{verbatim} + FTPPRU(unit,group,fpixel,nelements, > status) +\end{verbatim} + +\begin{description} +\item[8 ] Get elements from the data array. Undefined array elements will be + returned with a value = nullval, unless nullval = 0 in which case no + checks for undefined pixels will be performed. +\end{description} + +\begin{verbatim} + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) +\end{verbatim} + +\begin{description} +\item[9 ] Get elements and nullflags from data array. + Any undefined array elements will have the corresponding flagvals element + set equal to .TRUE. +\end{description} + +\begin{verbatim} + FTGPF[BIJKED](unit,group,fpixel,nelements, > values,flagvals,anyf,status) +\end{verbatim} + +\begin{description} +\item[10] Put values into group parameters +\end{description} + +\begin{verbatim} + FTPGP[BIJKED](unit,group,fparm,nparm,values, > status) +\end{verbatim} + +\begin{description} +\item[11] Get values from group parameters +\end{description} + +\begin{verbatim} + FTGGP[BIJKED](unit,group,fparm,nparm, > values,status) +\end{verbatim} +The following 4 subroutines transfer FITS images with 2 or 3 dimensions +to or from a data array which has been declared in the calling program. +The dimensionality of the FITS image is passed by the naxis1, naxis2, +and naxis3 parameters and the declared dimensions of the program array +are passed in the dim1 and dim2 parameters. Note that the program array +does not have to have the same dimensions as the FITS array, but must +be at least as big. For example if a FITS image with NAXIS1 = NAXIS2 = 400 +is read into a program array which is dimensioned as 512 x 512 pixels, +then the image will just fill the lower left corner of the array +with pixels in the range 1 - 400 in the X an Y directions. This has +the effect of taking a contiguous set of pixel value in the FITS array +and writing them to a non-contiguous array in program memory +(i.e., there are now some blank pixels around the edge of the image +in the program array). + + +\begin{description} +\item[11] Put 2-D image into the data array +\end{description} + +\begin{verbatim} + FTP2D[BIJKED](unit,group,dim1,naxis1,naxis2,image, > status) +\end{verbatim} + +\begin{description} +\item[12] Put 3-D cube into the data array +\end{description} + +\begin{verbatim} + FTP3D[BIJKED](unit,group,dim1,dim2,naxis1,naxis2,naxis3,cube, > status) +\end{verbatim} + +\begin{description} +\item[13] Get 2-D image from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will + be performed. +\end{description} + +\begin{verbatim} + FTG2D[BIJKED](unit,group,nullval,dim1,naxis1,naxis2, > image,anyf,status) +\end{verbatim} + +\begin{description} +\item[14] Get 3-D cube from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will + be performed. +\end{description} + +\begin{verbatim} + FTG3D[BIJKED](unit,group,nullval,dim1,dim2,naxis1,naxis2,naxis3, > + cube,anyf,status) +\end{verbatim} + +The following subroutines transfer a rectangular subset of the pixels +in a FITS N-dimensional image to or from an array which has been +declared in the calling program. The fpixels and lpixels parameters +are integer arrays which specify the starting and ending pixels in each +dimension of the FITS image that are to be read or written. (Note that +these are the starting and ending pixels in the FITS image, not in the +declared array). The array parameter is treated simply as a large +one-dimensional array of the appropriate datatype containing the pixel +values; The pixel values in the FITS array are read/written from/to +this program array in strict sequence without any gaps; it is up to +the calling routine to correctly interpret the dimensionality of this +array. The two families of FITS reading routines (FTGSVx and FTGSFx +subroutines) also have an 'incs' parameter which defines the +data sampling interval in each dimension of the FITS array. For +example, if incs(1)=2 and incs(2)=3 when reading a 2-dimensional +FITS image, then only every other pixel in the first dimension +and every 3rd pixel in the second dimension will be returned in +the 'array' parameter. [Note: the FTGSSx family of routines which +were present in previous versions of FITSIO have been superseded +by the more general FTGSVx family of routines.] + + +\begin{description} +\item[15] Put an arbitrary data subsection into the data array. +\end{description} + +\begin{verbatim} + FTPSS[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,array, > status) +\end{verbatim} + +\begin{description} +\item[16] Get an arbitrary data subsection from the data array. Undefined + pixels in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will + be performed. +\end{description} + +\begin{verbatim} + FTGSV[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) +\end{verbatim} + +\begin{description} +\item[17] Get an arbitrary data subsection from the data array. Any Undefined + pixels in the array will have the corresponding 'flagvals' + element set equal to .TRUE. +\end{description} + +\begin{verbatim} + FTGSF[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +\end{verbatim} + + +\section{FITS ASCII and Binary Table Data I/O Subroutines} + + +\subsection{Column Information Subroutines \label{FTGCNO}} + + +\begin{description} +\item[1 ] Get the number of rows or columns in the current FITS table. + The number of rows is given by the NAXIS2 keyword and the + number of columns is given by the TFIELDS keyword in the header + of the table. The FTGNRWLL routine is identical to FTGNRW except + that the number of rows is returned as a 64-bit integer rather + than a 32-bit integer. +\end{description} + +\begin{verbatim} + FTGNRW(unit, > nrows, status) + FTGNRWLL(unit, > nrowsll, status) + FTGNCL(unit, > ncols, status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the table column number (and name) of the column whose name +matches an input template name. The table column names are defined by +the TTYPEn keywords in the FITS header. If a column does not have a +TTYPEn keyword, then these routines assume that the name consists of +all blank characters. These 2 subroutines perform the same function +except that FTGCNO only returns the number of the matching column whereas +FTGCNN also returns the name of the column. If CASESEN = .true. then +the column name match will be case-sensitive. + +The input column name template (COLTEMPLATE) is (1) either the exact +name of the column to be searched for, or (2) it may contain wild cards +characters (*, ?, or \#), or (3) it may contain the number of the desired +column (where the number is expressed as ASCII digits). The first 2 wild +cards behave similarly to UNIX filename matching: the '*' character matches +any sequence of characters (including zero characters) and the '?' +character matches any single character. The \# wildcard will match +any consecutive string of decimal digits (0-9). As an example, the template +strings 'AB?DE', 'AB*E', and 'AB*CDE' will all match the string +'ABCDE'. If more than one column name in the table matches the +template string, then the first match is returned and the status value +will be set to 237 as a warning that a unique match was not found. To +find the other cases that match the template, simply call the +subroutine again leaving the input status value equal to 237 and the +next matching name will then be returned. Repeat this process until a +status = 219 (column name not found) is returned. If these subroutines +fail to match the template to any of the columns in the table, they +lastly check if the template can be interpreted as a simple positive +integer (e.g., '7', or '512') and if so, they return that column +number. If no matches are found then a status = 219 error is +returned. + +Note that the FITS Standard recommends that only letters, digits, and +the underscore character be used in column names (with no embedded +spaces in the name). Trailing blank characters are not significant. +It is recommended that the column names in a given table be unique +within the first 8 characters. +\end{description} + +\begin{verbatim} + FTGCNO(unit,casesen,coltemplate, > colnum,status) + FTGCNN(unit,casesen,coltemplate, > colname,colnum,status) +\end{verbatim} + +\begin{description} +\item[3 ] Get the datatype of a column in an ASCII or binary table. This + routine returns an integer code value corresponding to the datatype + of the column. (See the FTBNFM and FTASFM subroutines in the Utilities + section of this document for a list of the code values). The vector + repeat count (which is alway 1 for ASCII table columns) is also returned. + If the specified column has an ASCII character datatype (code = 16) then + the width of a unit string in the column is also returned. Note that + this routine supports the local convention for specifying arrays of + strings within a binary table character column, using the syntax + TFORM = 'rAw' where 'r' is the total number of characters (= the width + of the column) and 'w' is the width of a unit string within the column. + Thus if the column has TFORM = '60A12' then this routine will return + datacode = 16, repeat = 60, and width = 12. (The TDIMn + keyword may also be used to specify the unit string length; The pair + of keywords TFORMn = '60A' and TDIMn = '(12,5)' would have the + same effect as TFORMn = '60A12'). + + The second routine, FTEQTY is similar except that in + the case of scaled integer columns it returns the 'equivalent' data + type that is needed to store the scaled values, and not necessarily + the physical data type of the unscaled values as stored in the FITS + table. For example if a '1I' column in a binary table has TSCALn = + 1 and TZEROn = 32768, then this column effectively contains unsigned + short integer values, and thus the returned value of typecode will + be the code for an unsigned short integer, not a signed short integer. + Similarly, if a column has TTYPEn = '1I' + and TSCALn = 0.12, then the returned typecode + will be the code for a 'real' column. +\end{description} + +\begin{verbatim} + FTGTCL(unit,colnum, > datacode,repeat,width,status) + FTEQTY(unit,colnum, > datacode,repeat,width,status) +\end{verbatim} + +\begin{description} +\item[4 ] Return the display width of a column. This is the length + of the string that will be returned + when reading the column as a formatted string. The display width is + determined by the TDISPn keyword, if present, otherwise by the data + type of the column. +\end{description} + +\begin{verbatim} + FTGCDW(unit, colnum, > dispwidth, status) +\end{verbatim} + +\begin{description} +\item[5 ] Get information about an existing ASCII table column. (NOTE: TSCAL and + TZERO must be declared as Double Precision variables). All the + returned parameters are scalar quantities. +\end{description} + +\begin{verbatim} + FTGACL(unit,colnum, > + ttype,tbcol,tunit,tform,tscal,tzero,snull,tdisp,status) +\end{verbatim} + +\begin{description} +\item[6 ] Get information about an existing binary table column. (NOTE: TSCAL and + TZERO must be declared as Double Precision variables). DATATYPE is a + character string which returns the datatype of the column as defined + by the TFORMn keyword (e.g., 'I', 'J','E', 'D', etc.). In the case + of an ASCII character column, DATATYPE will have a value of the + form 'An' where 'n' is an integer expressing the width of the field + in characters. For example, if TFORM = '160A8' then FTGBCL will return + DATATYPE='A8' and REPEAT=20. All the returned parameters are scalar + quantities. +\end{description} + +\begin{verbatim} + FTGBCL(unit,colnum, > + ttype,tunit,datatype,repeat,tscal,tzero,tnull,tdisp,status) +\end{verbatim} + +\begin{description} +\item[7 ] Put (append) a TDIMn keyword whose value has the form '(l,m,n...)' + where l, m, n... are the dimensions of a multidimension array + column in a binary table. +\end{description} + +\begin{verbatim} + FTPTDM(unit,colnum,naxis,naxes, > status) +\end{verbatim} + +\begin{description} +\item[8 ] Return the number of and size of the dimensions of a table column. + Normally this information is given by the TDIMn keyword, but if + this keyword is not present then this routine returns NAXIS = 1 + and NAXES(1) equal to the repeat count in the TFORM keyword. +\end{description} + +\begin{verbatim} + FTGTDM(unit,colnum,maxdim, > naxis,naxes,status) +\end{verbatim} + +\begin{description} +\item[9 ] Decode the input TDIMn keyword string (e.g. '(100,200)') and return the + number of and size of the dimensions of a binary table column. If the input + tdimstr character string is null, then this routine returns naxis = 1 + and naxes[0] equal to the repeat count in the TFORM keyword. This routine + is called by FTGTDM. +\end{description} + +\begin{verbatim} + FTDTDM(unit,tdimstr,colnum,maxdim, > naxis,naxes, status) +\end{verbatim} + +\begin{description} +\item[10] Return the optimal number of rows to read or write at one time for + maximum I/O efficiency. Refer to the ``Optimizing Code'' section + in Chapter 5 for more discussion on how to use this routine. +\end{description} + + +\begin{verbatim} + FFGRSZ(unit, > nrows,status) +\end{verbatim} + + +\subsection{Low-Level Table Access Subroutines \label{FTGTBS}} + +The following subroutines provide low-level access to the data in ASCII +or binary tables and are mainly useful as an efficient way to copy all +or part of a table from one location to another. These routines simply +read or write the specified number of consecutive bytes in an ASCII or +binary table, without regard for column boundaries or the row length in +the table. The first two subroutines read or write consecutive bytes +in a table to or from a character string variable, while the last two +subroutines read or write consecutive bytes to or from a variable +declared as a numeric data type (e.g., INTEGER, INTEGER*2, REAL, DOUBLE +PRECISION). These routines do not perform any machine dependent data +conversion or byte swapping, except that conversion to/from ASCII +format is performed by the FTGTBS and FTPTBS routines on machines which +do not use ASCII character codes in the internal data representations +(e.g., on IBM mainframe computers). + + +\begin{description} +\item[1 ] Read a consecutive string of characters from an ASCII table + into a character variable (spanning columns and multiple rows if necessary) + This routine should not be used with binary tables because of + complications related to passing string variables between C and Fortran. +\end{description} + +\begin{verbatim} + FTGTBS(unit,frow,startchar,nchars, > string,status) +\end{verbatim} + +\begin{description} +\item[2 ] Write a consecutive string of characters to an ASCII table + from a character variable (spanning columns and multiple rows if necessary) + This routine should not be used with binary tables because of + complications related to passing string variables between C and Fortran. +\end{description} + +\begin{verbatim} + FTPTBS(unit,frow,startchar,nchars,string, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Read a consecutive array of bytes from an ASCII or binary table + into a numeric variable (spanning columns and multiple rows if necessary). + The array parameter may be declared as any numerical datatype as long + as the array is at least 'nchars' bytes long, e.g., if nchars = 17, + then declare the array as INTEGER*4 ARRAY(5). +\end{description} + +\begin{verbatim} + FTGTBB(unit,frow,startchar,nchars, > array,status) +\end{verbatim} + +\begin{description} +\item[4 ] Write a consecutive array of bytes to an ASCII or binary table + from a numeric variable (spanning columns and multiple rows if necessary) + The array parameter may be declared as any numerical datatype as long + as the array is at least 'nchars' bytes long, e.g., if nchars = 17, + then declare the array as INTEGER*4 ARRAY(5). +\end{description} + +\begin{verbatim} + FTPTBB(unit,frow,startchar,nchars,array, > status) +\end{verbatim} + + +\subsection{Edit Rows or Columns \label{FTIROW}} + + +\begin{description} +\item[1 ] Insert blank rows into an existing ASCII or binary table (in the CDU). + All the rows FOLLOWING row FROW are shifted down by NROWS rows. If + FROW or FROWLL equals 0 then the blank rows are inserted at the beginning of the + table. These routines modify the NAXIS2 keyword to reflect the new + number of rows in the table. +\end{description} + +\begin{verbatim} + FTIROW(unit,frow,nrows, > status) + FTIROWLL(unit,frowll,nrowsll, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Delete rows from an existing ASCII or binary table (in the CDU). + The NROWS (or NROWSLL) is the number of rows are deleted, starting + with row FROW (or FROWLL), and + any remaining rows in the table are shifted up to fill in the space. + These routines modify the NAXIS2 keyword to reflect the new number + of rows in the table. +\end{description} + +\begin{verbatim} + FTDROW(unit,frow,nrows, > status) + FTDROWLL(unit,frowll,nrowsll, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Delete a list of rows from an ASCII or binary table (in the CDU). + In the first routine, 'rowrange' is a character string listing the + rows or row ranges to delete (e.g., '2-4, 5, 8-9'). In the second + routine, 'rowlist' is an integer array of row numbers to be deleted + from the table. nrows is the number of row numbers in the list. + The first row in the table is 1 not 0. The list of row numbers + must be sorted in ascending order. +\end{description} + +\begin{verbatim} + FTDRRG(unit,rowrange, > status) + FTDRWS(unit,rowlist,nrows, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Insert a blank column (or columns) into an existing ASCII or binary + table (in the CDU). COLNUM specifies the column number that the (first) + new column should occupy in the table. NCOLS specifies how many + columns are to be inserted. Any existing columns from this position and + higher are moved over to allow room for the new column(s). + The index number on all the following keywords will be incremented + if necessary to reflect the new position of the column(s) in the table: + TBCOLn, TFORMn, TTYPEn, TUNITn, TNULLn, TSCALn, TZEROn, TDISPn, TDIMn, + TLMINn, TLMAXn, TDMINn, TDMAXn, TCTYPn, TCRPXn, TCRVLn, TCDLTn, TCROTn, + and TCUNIn. +\end{description} + +\begin{verbatim} + FTICOL(unit,colnum,ttype,tform, > status) + FTICLS(unit,colnum,ncols,ttype,tform, > status) +\end{verbatim} + +\begin{description} +\item[5 ] Modify the vector length of a binary table column (e.g., + change a column from TFORMn = '1E' to '20E'). The vector + length may be increased or decreased from the current value. +\end{description} + +\begin{verbatim} + FTMVEC(unit,colnum,newveclen, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Delete a column from an existing ASCII or binary table (in the CDU). + The index number of all the keywords listed above (for FTICOL) will be + decremented if necessary to reflect the new position of the column(s) in + the table. Those index keywords that refer to the deleted column will + also be deleted. Note that the physical size of the FITS file will + not be reduced by this operation, and the empty FITS blocks if any + at the end of the file will be padded with zeros. +\end{description} + +\begin{verbatim} + FTDCOL(unit,colnum, > status) +\end{verbatim} + +\begin{description} +\item[7 ] Copy a column from one HDU to another (or to the same HDU). If + createcol = TRUE, then a new column will be inserted in the output + table, at position `outcolumn', otherwise the existing output column will + be overwritten (in which case it must have a compatible datatype). + Note that the first column in a table is at colnum = 1. +\end{description} + +\begin{verbatim} + FTCPCL(inunit,outunit,incolnum,outcolnum,createcol, > status); +\end{verbatim} + +\subsection{Read and Write Column Data Routines \label{FTPCLS}} + +These subroutines put or get data values in the current ASCII or Binary table +extension. Automatic data type conversion is performed for numerical data +types (B,I,J,E,D) if the data type of the column (defined by the TFORM keyword) +differs from the data type of the calling subroutine. The data values are also +scaled by the TSCALn and TZEROn header values as they are being written to +or read from the FITS array. The fttscl subroutine MUST be used to define the +scaling parameters when writing data to the table or to override the default +scaling values given in the header +when reading from the table. + + In the case of binary tables with vector elements, the 'felem' +parameter defines the starting pixel within the element vector. This +parameter is ignored with ASCII tables. Similarly, in the case of +binary tables the 'nelements' parameter specifies the total number of +vector values read or written (continuing on subsequent rows if +required) and not the number of table elements. Two sets of +subroutines are provided to get the column data which differ in the way +undefined pixels are handled. The first set of routines (FTGCV) +simply return an array of data elements in which undefined pixels are +set equal to a value specified by the user in the 'nullval' parameter. +An additional feature of these subroutines is that if the user sets +nullval = 0, then no checks for undefined pixels will be performed, +thus increasing the speed of the program. The second set of routines +(FTGCF) returns the data element array and in addition a logical array +of flags which defines whether the corresponding data pixel is undefined. + + Any column, regardless of it's intrinsic datatype, may be read as a + string. It should be noted however that reading a numeric column + as a string is 10 - 100 times slower than reading the same column as + a number due to the large overhead in constructing the formatted + strings. The display format of the returned strings will be + determined by the TDISPn keyword, if it exists, otherwise by the + datatype of the column. The length of the returned strings can be + determined with the ftgcdw routine. The following TDISPn display + formats are currently supported: + +\begin{verbatim} + Iw.m Integer + Ow.m Octal integer + Zw.m Hexadecimal integer + Fw.d Fixed floating point + Ew.d Exponential floating point + Dw.d Exponential floating point + Gw.d General; uses Fw.d if significance not lost, else Ew.d +\end{verbatim} + where w is the width in characters of the displayed values, m is the minimum + number of digits displayed, and d is the number of digits to the right of the + decimal. The .m field is optional. + + +\begin{description} +\item[1 ] Put elements into an ASCII or binary table column (in the CDU). + (The SPP FSPCLS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st + dimension of this 2-D CHAR array). +\end{description} + +\begin{verbatim} + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Put elements into an ASCII or binary table column (in the CDU) + substituting the appropriate FITS null value for any elements that + are equal to NULLVAL. For ASCII TABLE extensions, the + null value defined by the previous call to FTSNUL will be substituted; + For integer FITS columns, in a binary table the null value + defined by the previous call to FTTNUL will be substituted; + For floating point FITS columns a special IEEE NaN (Not-a-Number) + value will be substituted. +\end{description} + +\begin{verbatim} + FTPCN[BIJKED](unit,colnum,frow,felem,nelements,values,nullval > status) +\end{verbatim} + +\begin{description} +\item[3 ] Put bit values into a binary byte ('B') or bit ('X') table column (in the + CDU). LRAY is an array of logical values corresponding to the sequence of + bits to be written. If LRAY is true then the corresponding bit is + set to 1, otherwise the bit is set to 0. Note that in the case of + 'X' columns, FITSIO will write to all 8 bits of each byte whether + they are formally valid or not. Thus if the column is defined as + '4X', and one calls FTPCLX with fbit=1 and nbit=8, then all 8 bits + will be written into the first byte (as opposed to writing the + first 4 bits into the first row and then the next 4 bits into the + next row), even though the last 4 bits of each byte are formally + not defined. +\end{description} + +\begin{verbatim} + FTPCLX(unit,colnum,frow,fbit,nbit,lray, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Set table elements in a column as undefined +\end{description} + +\begin{verbatim} + FTPCLU(unit,colnum,frow,felem,nelements, > status) +\end{verbatim} + +\begin{description} +\item[5 ] Get elements from an ASCII or binary table column (in the CDU). These + routines return the values of the table column array elements. Undefined + array elements will be returned with a value = nullval, unless nullval = 0 + (or = ' ' for ftgcvs) in which case no checking for undefined values will + be performed. The ANYF parameter is set to true if any of the returned + elements are undefined. (Note: the ftgcl routine simple gets an array + of logical data values without any checks for undefined values; use + the ftgcfl routine to check for undefined logical elements). + (The SPP FSGCVS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st + dimension of this 2-D CHAR array). +\end{description} + +\begin{verbatim} + FTGCL(unit,colnum,frow,felem,nelements, > values,status) + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) +\end{verbatim} + +\begin{description} +\item[6 ] Get elements and null flags from an ASCII or binary table column (in the + CHDU). These routines return the values of the table column array elements. + Any undefined array elements will have the corresponding flagvals element + set equal to .TRUE. The ANYF parameter is set to true if any of the + returned elements are undefined. + (The SPP FSGCFS routine has an additional integer argument after + the VALUES character string which specifies the size of the 1st + dimension of this 2-D CHAR array). +\end{description} + +\begin{verbatim} + FTGCF[SLBIJKEDCM](unit,colnum,frow,felem,nelements, > + values,flagvals,anyf,status) +\end{verbatim} + +\begin{description} +\item[7 ] Get an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Undefined pixels + in the array will be set equal to the value of 'nullval', + unless nullval=0 in which case no testing for undefined pixels will + be performed. The first and last rows in the table to be read + are specified by fpixels(naxis+1) and lpixels(naxis+1), and hence + are treated as the next higher dimension of the FITS N-dimensional + array. The INCS parameter specifies the sampling interval in + each dimension between the data elements that will be returned. +\end{description} + +\begin{verbatim} + FTGSV[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) +\end{verbatim} + +\begin{description} +\item[8 ] Get an arbitrary data subsection from an N-dimensional array + in a binary table vector column. Any Undefined + pixels in the array will have the corresponding 'flagvals' + element set equal to .TRUE. The first and last rows in the table + to be read are specified by fpixels(naxis+1) and lpixels(naxis+1), + and hence are treated as the next higher dimension of the FITS + N-dimensional array. The INCS parameter specifies the sampling + interval in each dimension between the data elements that will be + returned. +\end{description} + +\begin{verbatim} + FTGSF[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +\end{verbatim} + +\begin{description} +\item[9 ] Get bit values from a byte ('B') or bit (`X`) table column (in the + CDU). LRAY is an array of logical values corresponding to the + sequence of bits to be read. If LRAY is true then the + corresponding bit was set to 1, otherwise the bit was set to 0. + Note that in the case of 'X' columns, FITSIO will read all 8 bits + of each byte whether they are formally valid or not. Thus if the + column is defined as '4X', and one calls FTGCX with fbit=1 and + nbit=8, then all 8 bits will be read from the first byte (as + opposed to reading the first 4 bits from the first row and then the + first 4 bits from the next row), even though the last 4 bits of + each byte are formally not defined. +\end{description} + +\begin{verbatim} + FTGCX(unit,colnum,frow,fbit,nbit, > lray,status) +\end{verbatim} + +\begin{description} +\item[10] Read any consecutive set of bits from an 'X' or 'B' column and + interpret them as an unsigned n-bit integer. NBIT must be less than + or equal to 16 when calling FTGCXI, and less than or equal to 32 when + calling FTGCXJ; there is no limit on the value of NBIT for FTGCXD, but + the returned double precision value only has 48 bits of precision on + most 32-bit word machines. The NBITS bits are interpreted as an + unsigned integer unless NBITS = 16 (in FTGCXI) or 32 (in FTGCXJ) in which + case the string of bits are interpreted as 16-bit or 32-bit 2's + complement signed integers. If NROWS is greater than 1 then the + same set of bits will be read from sequential rows in the table + starting with row FROW. Note that the numbering convention + used here for the FBIT parameter adopts 1 for the first element of the + vector of bits; this is the Most Significant Bit of the integer value. +\end{description} + +\begin{verbatim} + FTGCX[IJD](unit,colnum,frow,nrows,fbit,nbit, > array,status) +\end{verbatim} + +\begin{description} +\item[11] Get the descriptor for a variable length column in a binary table. + The descriptor consists of 2 integer parameters: the number of elements + in the array and the starting offset relative to the start of the heap. + The first routine returns a single descriptor whereas the second routine + returns the descriptors for a range of rows in the table. +\end{description} + +\begin{verbatim} + FTGDES(unit,colnum,rownum, > nelements,offset,status) + FTGDESLL(unit,colnum,rownum, > nelementsll,offsetll,status) + + FFGDESS(unit,colnum,firstrow,nrows > nelements,offset, status) + FFGDESSLL(unit,colnum,firstrow,nrows > nelementsll,offsetll, status) +\end{verbatim} + +\begin{description} +\item[12] Write the descriptor for a variable length column in a binary table. + These subroutines can be used in conjunction with FTGDES to enable + 2 or more arrays to point to the same storage location to save + storage space if the arrays are identical. +\end{description} + +\begin{verbatim} + FTPDES(unit,colnum,rownum,nelements,offset, > status) + FTPDESLL(unit,colnum,rownum,nelementsll,offsetll, > status) +\end{verbatim} + + +\section{Row Selection and Calculator Routines \label{FTFROW}} + +These routines all parse and evaluate an input string containing a user +defined arithmetic expression. The first 3 routines select rows in a +FITS table, based on whether the expression evaluates to true (not +equal to zero) or false (zero). The other routines evaluate the +expression and calculate a value for each row of the table. The +allowed expression syntax is described in the row filter section in the +earlier `Extended File Name Syntax' chapter of this document. The +expression may also be written to a text file, and the name of the +file, prepended with a '@' character may be supplied for the 'expr' +parameter (e.g. '@filename.txt'). The expression in the file can +be arbitrarily complex and extend over multiple lines of the file. +Lines that begin with 2 slash characters ('//') will be ignored and +may be used to add comments to the file. + + +\begin{description} +\item[1 ] Evaluate a boolean expression over the indicated rows, returning an + array of flags indicating which rows evaluated to TRUE/FALSE +\end{description} + +\begin{verbatim} + FTFROW(unit,expr,firstrow, nrows, > n_good_rows, row_status, status) +\end{verbatim} + +\begin{description} +\item[2 ] Find the first row which satisfies the input boolean expression +\end{description} + +\begin{verbatim} + FTFFRW(unit, expr, > rownum, status) +\end{verbatim} + +\begin{description} +\item[3 ]Evaluate an expression on all rows of a table. If the input and output +files are not the same, copy the TRUE rows to the output file. If the +files are the same, delete the FALSE rows (preserve the TRUE rows). +\end{description} + +\begin{verbatim} + FTSROW(inunit, outunit, expr, > status) +\end{verbatim} + +\begin{description} +\item[4 ] Calculate an expression for the indicated rows of a table, returning +the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If +nulval==NULL, UNDEFs will be zeroed out. For vector results, the number +of elements returned may be less than nelements if nelements is not an +even multiple of the result dimension. Call FTTEXP to obtain +the dimensions of the results. +\end{description} + +\begin{verbatim} + FTCROW(unit,datatype,expr,firstrow,nelements,nulval, > + array,anynul,status) +\end{verbatim} + +\begin{description} +\item[5 ]Evaluate an expression and write the result either to a column (if +the expression is a function of other columns in the table) or to a +keyword (if the expression evaluates to a constant and is not a +function of other columns in the table). In the former case, the +parName parameter is the name of the column (which may or may not already +exist) into which to write the results, and parInfo contains an +optional TFORM keyword value if a new column is being created. If a +TFORM value is not specified then a default format will be used, +depending on the expression. If the expression evaluates to a constant, +then the result will be written to the keyword name given by the +parName parameter, and the parInfo parameter may be used to supply an +optional comment for the keyword. If the keyword does not already +exist, then the name of the keyword must be preceded with a '\#' character, +otherwise the result will be written to a column with that name. +\end{description} + + +\begin{verbatim} + FTCALC(inunit, expr, outunit, parName, parInfo, > status) +\end{verbatim} + +\begin{description} +\item[6 ] This calculator routine is similar to the previous routine, except +that the expression is only evaluated over the specified +row ranges. nranges specifies the number of row ranges, and firstrow +and lastrow give the starting and ending row number of each range. +\end{description} + +\begin{verbatim} + FTCALC_RNG(inunit, expr, outunit, parName, parInfo, + nranges, firstrow, lastrow, > status) +\end{verbatim} + +\begin{description} +\item[7 ]Evaluate the given expression and return information on the result. +\end{description} + +\begin{verbatim} + FTTEXP(unit, expr, > datatype, nelem, naxis, naxes, status) +\end{verbatim} + + + +\section{Celestial Coordinate System Subroutines \label{FTGICS}} + +The FITS community has adopted a set of keyword conventions that define +the transformations needed to convert between pixel locations in an +image and the corresponding celestial coordinates on the sky, or more +generally, that define world coordinates that are to be associated with +any pixel location in an n-dimensional FITS array. CFITSIO is distributed +with a couple of self-contained World Coordinate System (WCS) routines, +however, these routines DO NOT support all the latest WCS conventions, +so it is STRONGLY RECOMMENDED that software developers use a more robust +external WCS library. Several recommended libraries are: + +\begin{verbatim} + WCSLIB - supported by Mark Calabretta + WCSTools - supported by Doug Mink + AST library - developed by the U.K. Starlink project +\end{verbatim} + +More information about the WCS keyword conventions and links to all of +these WCS libraries can be found on the FITS Support Office web site at +http://fits.gsfc.nasa.gov under the WCS link. + +The functions provided in these external WCS libraries will need access to +the WCS information contained in the FITS file headers. One convenient +way to pass this information to the extermal library is to use FITSIO +to copy the header keywords into one long character string, and then +pass this string to an interface routine in the external library that +will extract the necessary WCS information (e.g., see the astFitsChan +and astPutCards routines in the Starlink AST library). + +The following FITSIO routines DO NOT support the more recent WCS conventions +that have been approved as part of the FITS standard. Consequently, +the following routines ARE NOW DEPRECATED. It is STRONGLY RECOMMENDED +that software developers not use these routines, and instead use an +external WCS library, as described above. + +These routines are included mainly for backward compatibility with +existing software. They support the following standard map +projections: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, and -AIT (these are the +legal values for the coordtype parameter). These routines are based +on similar functions in Classic AIPS. All the angular quantities are +given in units of degrees. + + +\begin{description} +\item[1 ] Get the values of all the standard FITS celestial coordinate system + keywords from the header of a FITS image (i.e., the primary array or + an image extension). These values may then be passed to the subroutines + that perform the coordinate transformations. If any or all of the WCS + keywords are not present, then default values will be returned. If + the first coordinate axis is the declination-like coordinate, then + this routine will swap them so that the longitudinal-like coordinate + is returned as the first axis. + + If the file uses the newer 'CDj\_i' WCS transformation matrix + keywords instead of old style 'CDELTn' and 'CROTA2' keywords, then + this routine will calculate and return the values of the equivalent + old-style keywords. Note that the conversion from the new-style + keywords to the old-style values is sometimes only an + approximation, so if the approximation is larger than an internally + defined threshold level, then CFITSIO will still return the + approximate WCS keyword values, but will also return with status = + 506, to warn the calling program that approximations have been + made. It is then up to the calling program to decide whether the + approximations are sufficiently accurate for the particular + application, or whether more precise WCS transformations must be + performed using new-style WCS keywords directly. +\end{description} + +\begin{verbatim} + FTGICS(unit, > xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) +\end{verbatim} + +\begin{description} +\item[2 ] Get the values of all the standard FITS celestial coordinate system + keywords from the header of a FITS table where the X and Y (or RA and + DEC coordinates are stored in 2 separate columns of the table. + These values may then be passed to the subroutines that perform the + coordinate transformations. +\end{description} + +\begin{verbatim} + FTGTCS(unit,xcol,ycol, > + xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) +\end{verbatim} + +\begin{description} +\item[3 ] Calculate the celestial coordinate corresponding to the input + X and Y pixel location in the image. +\end{description} + +\begin{verbatim} + FTWLDP(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpos,ypos,status) +\end{verbatim} + +\begin{description} +\item[4 ] Calculate the X and Y pixel location corresponding to the input + celestial coordinate in the image. +\end{description} + +\begin{verbatim} + FTXYPX(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpix,ypix,status) +\end{verbatim} + + +\section{File Checksum Subroutines \label{FTPCKS}} + +The following routines either compute or validate the checksums for the +CHDU. The DATASUM keyword is used to store the numerical value of the +32-bit, 1's complement checksum for the data unit alone. If there is +no data unit then the value is set to zero. The numerical value is +stored as an ASCII string of digits, enclosed in quotes, because the +value may be too large to represent as a 32-bit signed integer. The +CHECKSUM keyword is used to store the ASCII encoded COMPLEMENT of the +checksum for the entire HDU. Storing the complement, rather than the +actual checksum, forces the checksum for the whole HDU to equal zero. +If the file has been modified since the checksums were computed, then +the HDU checksum will usually not equal zero. These checksum keyword +conventions are based on a paper by Rob Seaman published in the +proceedings of the ADASS IV conference in Baltimore in November 1994 +and a later revision in June 1995. + + +\begin{description} +\item[1 ] Compute and write the DATASUM and CHECKSUM keyword values for the CHDU + into the current header. The DATASUM value is the 32-bit checksum + for the data unit, expressed as a decimal integer enclosed in single + quotes. The CHECKSUM keyword value is a 16-character string which + is the ASCII-encoded value for the complement of the checksum for + the whole HDU. If these keywords already exist, their values + will be updated only if necessary (i.e., if the file has been modified + since the original keyword values were computed). +\end{description} + +\begin{verbatim} + FTPCKS(unit, > status) +\end{verbatim} + +\begin{description} +\item[2 ] Update the CHECKSUM keyword value in the CHDU, assuming that the + DATASUM keyword exists and already has the correct value. This routine + calculates the new checksum for the current header unit, adds it to the + data unit checksum, encodes the value into an ASCII string, and writes + the string to the CHECKSUM keyword. +\end{description} + +\begin{verbatim} + FTUCKS(unit, > status) +\end{verbatim} + +\begin{description} +\item[3 ] Verify the CHDU by computing the checksums and comparing + them with the keywords. The data unit is verified correctly + if the computed checksum equals the value of the DATASUM + keyword. The checksum for the entire HDU (header plus data unit) is + correct if it equals zero. The output DATAOK and HDUOK parameters + in this subroutine are integers which will have a value = 1 + if the data or HDU is verified correctly, a value = 0 + if the DATASUM or CHECKSUM keyword is not present, or value = -1 + if the computed checksum is not correct. +\end{description} + +\begin{verbatim} + FTVCKS(unit, > dataok,hduok,status) +\end{verbatim} + +\begin{description} +\item[4 ] Compute and return the checksum values for the CHDU (as + double precision variables) without creating or modifying the + CHECKSUM and DATASUM keywords. This routine is used internally by + FTVCKS, but may be useful in other situations as well. +\end{description} + +\begin{verbatim} + FTGCKS(unit, > datasum,hdusum,status) +\end{verbatim} + +\begin{description} +\item[5 ] Encode a checksum value (stored in a double precision variable) + into a 16-character string. If COMPLEMENT = .true. then the 32-bit + sum value will be complemented before encoding. +\end{description} + +\begin{verbatim} + FTESUM(sum,complement, > checksum) +\end{verbatim} + +\begin{description} +\item[6 ] Decode a 16 character checksum string into a double precision value. + If COMPLEMENT = .true. then the 32-bit sum value will be complemented + after decoding. +\end{description} + +\begin{verbatim} + FTDSUM(checksum,complement, > sum) +\end{verbatim} + + +\section{ Date and Time Utility Routines \label{FTGSDT}} + +The following routines help to construct or parse the FITS date/time +strings. Starting in the year 2000, the FITS DATE keyword values (and +the values of other `DATE-' keywords) must have the form 'YYYY-MM-DD' +(date only) or 'YYYY-MM-DDThh:mm:ss.ddd...' (date and time) where the +number of decimal places in the seconds value is optional. These times +are in UTC. The older 'dd/mm/yy' date format may not be used for dates +after 01 January 2000. + + +\begin{description} +\item[1 ] Get the current system date. The returned year has 4 digits + (1999, 2000, etc.) +\end{description} + +\begin{verbatim} + FTGSDT( > day, month, year, status ) +\end{verbatim} + + +\begin{description} +\item[2 ] Get the current system date and time string ('YYYY-MM-DDThh:mm:ss'). +The time will be in UTC/GMT if available, as indicated by a returned timeref +value = 0. If the returned value of timeref = 1 then this indicates that +it was not possible to convert the local time to UTC, and thus the local +time was returned. +\end{description} + +\begin{verbatim} + FTGSTM(> datestr, timeref, status) +\end{verbatim} + + +\begin{description} +\item[3 ] Construct a date string from the input date values. If the year +is between 1900 and 1998, inclusive, then the returned date string will +have the old FITS format ('dd/mm/yy'), otherwise the date string will +have the new FITS format ('YYYY-MM-DD'). Use FTTM2S instead + to always return a date string using the new FITS format. +\end{description} + +\begin{verbatim} + FTDT2S( year, month, day, > datestr, status) +\end{verbatim} + + +\begin{description} +\item[4 ] Construct a new-format date + time string ('YYYY-MM-DDThh:mm:ss.ddd...'). + If the year, month, and day values all = 0 then only the time is encoded + with format 'hh:mm:ss.ddd...'. The decimals parameter specifies how many + decimal places of fractional seconds to include in the string. If `decimals' + is negative, then only the date will be return ('YYYY-MM-DD'). +\end{description} + +\begin{verbatim} + FTTM2S( year, month, day, hour, minute, second, decimals, + > datestr, status) +\end{verbatim} + + +\begin{description} +\item[5 ] Return the date as read from the input string, where the string may be +in either the old ('dd/mm/yy') or new ('YYYY-MM-DDThh:mm:ss' or +'YYYY-MM-DD') FITS format. +\end{description} + +\begin{verbatim} + FTS2DT(datestr, > year, month, day, status) +\end{verbatim} + + +\begin{description} +\item[6 ] Return the date and time as read from the input string, where the +string may be in either the old or new FITS format. The returned hours, +minutes, and seconds values will be set to zero if the input string +does not include the time ('dd/mm/yy' or 'YYYY-MM-DD') . Similarly, +the returned year, month, and date values will be set to zero if the +date is not included in the input string ('hh:mm:ss.ddd...'). +\end{description} + +\begin{verbatim} + FTS2TM(datestr, > year, month, day, hour, minute, second, status) +\end{verbatim} + + +\section{General Utility Subroutines \label{FTGHAD}} + +The following utility subroutines may be useful for certain applications: + + +\begin{description} +\item[1 ] Return the starting byte address of the CHDU and the next HDU. +\end{description} + +\begin{verbatim} + FTGHAD(iunit, > curaddr, nextaddr) +\end{verbatim} + +\begin{description} +\item[2 ] Convert a character string to uppercase (operates in place). +\end{description} + +\begin{verbatim} + FTUPCH(string) +\end{verbatim} + +\begin{description} +\item[3 ] Compare the input template string against the reference string + to see if they match. The template string may contain wildcard + characters: '*' will match any sequence of characters (including + zero characters) and '?' will match any single character in the + reference string. The '\#' character will match any consecutive string + of decimal digits (0 - 9). If CASESN = .true. then the match will be + case sensitive. The returned MATCH parameter will be .true. if + the 2 strings match, and EXACT will be .true. if the match is + exact (i.e., if no wildcard characters were used in the match). + Both strings must be 68 characters or less in length. +\end{description} + +\begin{verbatim} + FTCMPS(str_template, string, casesen, > match, exact) +\end{verbatim} + + +\begin{description} +\item[4 ] Test that the keyword name contains only legal characters: A-Z,0-9, + hyphen, and underscore. +\end{description} + +\begin{verbatim} + FTTKEY(keyword, > status) +\end{verbatim} + +\begin{description} +\item[5 ] Test that the keyword record contains only legal printable ASCII + characters +\end{description} + +\begin{verbatim} + FTTREC(card, > status) +\end{verbatim} + +\begin{description} +\item[6 ] Test whether the current header contains any NULL (ASCII 0) characters. + These characters are illegal in the header, but they will go undetected + by most of the CFITSIO keyword header routines, because the null is + interpreted as the normal end-of-string terminator. This routine returns + the position of the first null character in the header, or zero if there + are no nulls. For example a returned value of 110 would indicate that + the first NULL is located in the 30th character of the second keyword + in the header (recall that each header record is 80 characters long). + Note that this is one of the few FITSIO routines in which the returned + value is not necessarily equal to the status value). +\end{description} + +\begin{verbatim} + FTNCHK(unit, > status) +\end{verbatim} + +\begin{description} +\item[7 ] Parse a header keyword record and return the name of the keyword + and the length of the name. + The keyword name normally occupies the first 8 characters of the + record, except under the HIERARCH convention where the name can + be up to 70 characters in length. +\end{description} + +\begin{verbatim} + FTGKNM(card, > keyname, keylength, staThe '\#' character will match any consecutive string + of decimal digits (0 - 9). tus) +\end{verbatim} + +\begin{description} +\item[8 ] Parse a header keyword record. + This subroutine parses the input header record to return the value (as + a character string) and comment strings. If the keyword has no + value (columns 9-10 not equal to '= '), then the value string is returned + blank and the comment string is set equal to column 9 - 80 of the + input string. +\end{description} + +\begin{verbatim} + FTPSVC(card, > value,comment,status) +\end{verbatim} + +\begin{description} +\item[9 ] Construct a sequence keyword name (ROOT + nnn). + This subroutine appends the sequence number to the root string to create + a keyword name (e.g., 'NAXIS' + 2 = 'NAXIS2') +\end{description} + +\begin{verbatim} + FTKEYN(keyroot,seq_no, > keyword,status) +\end{verbatim} + +\begin{description} +\item[10] Construct a sequence keyword name (n + ROOT). + This subroutine concatenates the sequence number to the front of the + root string to create a keyword name (e.g., 1 + 'CTYP' = '1CTYP') +\end{description} + +\begin{verbatim} + FTNKEY(seq_no,keyroot, > keyword,status) +\end{verbatim} + +\begin{description} +\item[11] Determine the datatype of a keyword value string. + This subroutine parses the keyword value string (usually columns 11-30 + of the header record) to determine its datatype. +\end{description} + +\begin{verbatim} + FTDTYP(value, > dtype,status) +\end{verbatim} + +\begin{description} +\item[11] Return the class of input header record. The record is classified + into one of the following categories (the class values are + defined in fitsio.h). Note that this is one of the few FITSIO + routines that does not return a status value. +\end{description} + +\begin{verbatim} + Class Value Keywords + TYP_STRUC_KEY 10 SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, + GROUPS, PCOUNT, GCOUNT, END + XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, + and the first 4 COMMENT keywords in the primary array + that define the FITS format. + TYP_CMPRS_KEY 20 The experimental keywords used in the compressed + image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, + ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK + TYP_SCAL_KEY 30 BSCALE, BZERO, TSCALn, TZEROn + TYP_NULL_KEY 40 BLANK, TNULLn + TYP_DIM_KEY 50 TDIMn + TYP_RANG_KEY 60 TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX + TYP_UNIT_KEY 70 BUNIT, TUNITn + TYP_DISP_KEY 80 TDISPn + TYP_HDUID_KEY 90 EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL + TYP_CKSUM_KEY 100 CHECKSUM, DATASUM + TYP_WCS_KEY 110 CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn + CDj_is, PVj_ms, LONPOLEs, LATPOLEs + TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, + TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn + jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, + iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn + (i,j,m,n are integers, s is any letter) + TYP_REFSYS_KEY 120 EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs + TYP_COMM_KEY 130 COMMENT, HISTORY, (blank keyword) + TYP_CONT_KEY 140 CONTINUE + TYP_USER_KEY 150 all other keywords + + class = FTGKCL (char *card) +\end{verbatim} + +\begin{description} +\item[12] Parse the 'TFORM' binary table column format string. + This subroutine parses the input TFORM character string and returns the + integer datatype code, the repeat count of the field, and, in the case + of character string fields, the length of the unit string. The following + datatype codes are returned (the negative of the value is returned + if the column contains variable-length arrays): +\end{description} + +\begin{verbatim} + Datatype DATACODE value + bit, X 1 + byte, B 11 + logical, L 14 + ASCII character, A 16 + short integer, I 21 + integer, J 41 + real, E 42 + double precision, D 82 + complex 83 + double complex 163 + + FTBNFM(tform, > datacode,repeat,width,status) +\end{verbatim} + +\begin{description} +\item[13] Parse the 'TFORM' keyword value that defines the column format in + an ASCII table. This routine parses the input TFORM character + string and returns the datatype code, the width of the column, + and (if it is a floating point column) the number of decimal places + to the right of the decimal point. The returned datatype codes are + the same as for the binary table, listed above, with the following + additional rules: integer columns that are between 1 and 4 characters + wide are defined to be short integers (code = 21). Wider integer + columns are defined to be regular integers (code = 41). Similarly, + Fixed decimal point columns (with TFORM = 'Fw.d') are defined to + be single precision reals (code = 42) if w is between 1 and 7 characters + wide, inclusive. Wider 'F' columns will return a double precision + data code (= 82). 'Ew.d' format columns will have datacode = 42, + and 'Dw.d' format columns will have datacode = 82. +\end{description} + +\begin{verbatim} + FTASFM(tform, > datacode,width,decimals,status) +\end{verbatim} + +\begin{description} +\item[14] Calculate the starting column positions and total ASCII table width + based on the input array of ASCII table TFORM values. The SPACE input + parameter defines how many blank spaces to leave between each column + (it is recommended to have one space between columns for better human + readability). +\end{description} + +\begin{verbatim} + FTGABC(tfields,tform,space, > rowlen,tbcol,status) +\end{verbatim} + +\begin{description} +\item[15] Parse a template string and return a formatted 80-character string + suitable for appending to (or deleting from) a FITS header file. + This subroutine is useful for parsing lines from an ASCII template file + and reformatting them into legal FITS header records. The formatted + string may then be passed to the FTPREC, FTMCRD, or FTDKEY subroutines + to append or modify a FITS header record. +\end{description} + +\begin{verbatim} + FTGTHD(template, > card,hdtype,status) +\end{verbatim} + The input TEMPLATE character string generally should contain 3 tokens: + (1) the KEYNAME, (2) the VALUE, and (3) the COMMENT string. The + TEMPLATE string must adhere to the following format: + + +\begin{description} +\item[- ] The KEYNAME token must begin in columns 1-8 and be a maximum of 8 + characters long. If the first 8 characters of the template line are + blank then the remainder of the line is considered to be a FITS comment + (with a blank keyword name). A legal FITS keyword name may only + contain the characters A-Z, 0-9, and '-' (minus sign) and + underscore. This subroutine will automatically convert any lowercase + characters to uppercase in the output string. If KEYNAME = 'COMMENT' + or 'HISTORY' then the remainder of the line is considered to be a FITS + COMMENT or HISTORY record, respectively. +\end{description} + + +\begin{description} +\item[- ] The VALUE token must be separated from the KEYNAME token by one or more + spaces and/or an '=' character. The datatype of the VALUE token + (numeric, logical, or character string) is automatically determined + and the output CARD string is formatted accordingly. The value + token may be forced to be interpreted as a string (e.g. if it is a + string of numeric digits) by enclosing it in single quotes. +\end{description} + + +\begin{description} +\item[- ] The COMMENT token is optional, but if present must be separated from + the VALUE token by at least one blank space. A leading '/' character + may be used to mark the beginning of the comment field, otherwise the + comment field begins with the first non-blank character following the + value token. +\end{description} + + +\begin{description} +\item[- ] One exception to the above rules is that if the first non-blank + character in the template string is a minus sign ('-') followed + by a single token, or a single token followed by an equal sign, + then it is interpreted as the name of a keyword which is to be + deleted from the FITS header. +\end{description} + + +\begin{description} +\item[- ] The second exception is that if the template string starts with + a minus sign and is followed by 2 tokens then the second token + is interpreted as the new name for the keyword specified by + first token. In this case the old keyword name (first token) + is returned in characters 1-8 of the returned CARD string, and + the new keyword name (the second token) is returned in characters + 41-48 of the returned CARD string. These old and new names + may then be passed to the FTMNAM subroutine which will change + the keyword name. +\end{description} + + The HDTYPE output parameter indicates how the returned CARD string + should be interpreted: + +\begin{verbatim} + hdtype interpretation + ------ ------------------------------------------------- + -2 Modify the name of the keyword given in CARD(1:8) + to the new name given in CARD(41:48) + + -1 CARD(1:8) contains the name of a keyword to be deleted + from the FITS header. + + 0 append the CARD string to the FITS header if the + keyword does not already exist, otherwise update + the value/comment if the keyword is already present + in the header. + + 1 simply append this keyword to the FITS header (CARD + is either a HISTORY or COMMENT keyword). + + 2 This is a FITS END record; it should not be written + to the FITS header because FITSIO automatically + appends the END record when the header is closed. +\end{verbatim} + EXAMPLES: The following lines illustrate valid input template strings: + +\begin{verbatim} + INTVAL 7 This is an integer keyword + RVAL 34.6 / This is a floating point keyword + EVAL=-12.45E-03 This is a floating point keyword in exponential notation + lval F This is a boolean keyword + This is a comment keyword with a blank keyword name + SVAL1 = 'Hello world' / this is a string keyword + SVAL2 '123.5' this is also a string keyword + sval3 123+ / this is also a string keyword with the value '123+ ' + # the following template line deletes the DATE keyword + - DATE + # the following template line modifies the NAME keyword to OBJECT + - NAME OBJECT +\end{verbatim} + +\begin{description} +\item[16] Parse the input string containing a list of rows or row ranges, and + return integer arrays containing the first and last row in each + range. For example, if rowlist = "3-5, 6, 8-9" then it will + return numranges = 3, rangemin = 3, 6, 8 and rangemax = 5, 6, 9. + At most, 'maxranges' number of ranges will be returned. 'maxrows' + is the maximum number of rows in the table; any rows or ranges + larger than this will be ignored. The rows must be specified in + increasing order, and the ranges must not overlap. A minus sign + may be use to specify all the rows to the upper or lower bound, so + "50-" means all the rows from 50 to the end of the table, and "-" + means all the rows in the table, from 1 - maxrows. +\end{description} + +\begin{verbatim} + FTRWRG(rowlist, maxrows, maxranges, > + numranges, rangemin, rangemax, status) +\end{verbatim} + + + +\chapter{ The CFITSIO Iterator Function } + +The fits\_iterate\_data function in CFITSIO provides a unique method of +executing an arbitrary user-supplied `work' function that operates on +rows of data in FITS tables or on pixels in FITS images. Rather than +explicitly reading and writing the FITS images or columns of data, one +instead calls the CFITSIO iterator routine, passing to it the name of +the user's work function that is to be executed along with a list of +all the table columns or image arrays that are to be passed to the work +function. The CFITSIO iterator function then does all the work of +allocating memory for the arrays, reading the input data from the FITS +file, passing them to the work function, and then writing any output +data back to the FITS file after the work function exits. Because +it is often more efficient to process only a subset of the total table +rows at one time, the iterator function can determine the optimum +amount of data to pass in each iteration and repeatly call the work +function until the entire table been processed. + +For many applications this single CFITSIO iterator function can +effectively replace all the other CFITSIO routines for reading or +writing data in FITS images or tables. Using the iterator has several +important advantages over the traditional method of reading and writing +FITS data files: + +\begin{itemize} +\item +It cleanly separates the data I/O from the routine that operates on +the data. This leads to a more modular and `object oriented' +programming style. + +\item +It simplifies the application program by eliminating the need to allocate +memory for the data arrays and eliminates most of the calls to the CFITSIO +routines that explicitly read and write the data. + +\item +It ensures that the data are processed as efficiently as possible. +This is especially important when processing tabular data since +the iterator function will calculate the most efficient number +of rows in the table to be passed at one time to the user's work +function on each iteration. + +\item +Makes it possible for larger projects to develop a library of work +functions that all have a uniform calling sequence and are all +independent of the details of the FITS file format. + +\end{itemize} + +There are basically 2 steps in using the CFITSIO iterator function. +The first step is to design the work function itself which must have a +prescribed set of input parameters. One of these parameters is a +structure containing pointers to the arrays of data; the work function +can perform any desired operations on these arrays and does not need to +worry about how the input data were read from the file or how the +output data get written back to the file. + +The second step is to design the driver routine that opens all the +necessary FITS files and initializes the input parameters to the +iterator function. The driver program calls the CFITSIO iterator +function which then reads the data and passes it to the user's work +function. + +Further details on using the iterator function can be found in the +companion CFITSIO User's Guide, and in the iter\_a.f, iter\_b.f and +iter\_c.f example programs. + + + +\chapter{ Extended File Name Syntax } + + +\section{Overview} + +CFITSIO supports an extended syntax when specifying the name of the +data file to be opened or created that includes the following +features: + +\begin{itemize} +\item +CFITSIO can read IRAF format images which have header file names that +end with the '.imh' extension, as well as reading and writing FITS +files, This feature is implemented in CFITSIO by first converting the +IRAF image into a temporary FITS format file in memory, then opening +the FITS file. Any of the usual CFITSIO routines then may be used to +read the image header or data. Similarly, raw binary data arrays can +be read by converting them on the fly into virtual FITS images. + +\item +FITS files on the internet can be read (and sometimes written) using the FTP, +HTTP, or ROOT protocols. + +\item +FITS files can be piped between tasks on the stdin and stdout streams. + +\item +FITS files can be read and written in shared memory. This can potentially +achieve much better data I/O performance compared to reading and +writing the same FITS files on magnetic disk. + +\item +Compressed FITS files in gzip or Unix COMPRESS format can be directly read. + +\item +Output FITS files can be written directly in compressed gzip format, +thus saving disk space. + +\item +FITS table columns can be created, modified, or deleted 'on-the-fly' as +the table is opened by CFITSIO. This creates a virtual FITS file containing +the modifications that is then opened by the application program. + +\item +Table rows may be selected, or filtered out, on the fly when the table +is opened by CFITSIO, based on an arbitrary user-specified expression. +Only rows for which the expression evaluates to 'TRUE' are retained +in the copy of the table that is opened by the application program. + +\item +Histogram images may be created on the fly by binning the values in +table columns, resulting in a virtual N-dimensional FITS image. The +application program then only sees the FITS image (in the primary +array) instead of the original FITS table. +\end{itemize} + +The latter 3 features in particular add very powerful data processing +capabilities directly into CFITSIO, and hence into every task that uses +CFITSIO to read or write FITS files. For example, these features +transform a very simple program that just copies an input FITS file to +a new output file (like the `fitscopy' program that is distributed with +CFITSIO) into a multipurpose FITS file processing tool. By appending +fairly simple qualifiers onto the name of the input FITS file, the user +can perform quite complex table editing operations (e.g., create new +columns, or filter out rows in a table) or create FITS images by +binning or histogramming the values in table columns. In addition, +these functions have been coded using new state-of-the art algorithms +that are, in some cases, 10 - 100 times faster than previous widely +used implementations. + +Before describing the complete syntax for the extended FITS file names +in the next section, here are a few examples of FITS file names that +give a quick overview of the allowed syntax: + +\begin{itemize} +\item +{\tt 'myfile.fits'}: the simplest case of a FITS file on disk in the current +directory. + +\item +{\tt 'myfile.imh'}: opens an IRAF format image file and converts it on the +fly into a temporary FITS format image in memory which can then be read with +any other CFITSIO routine. + +\item +{\tt rawfile.dat[i512,512]}: opens a raw binary data array (a 512 x 512 +short integer array in this case) and converts it on the fly into a +temporary FITS format image in memory which can then be read with any +other CFITSIO routine. + +\item +{\tt myfile.fits.gz}: if this is the name of a new output file, the '.gz' +suffix will cause it to be compressed in gzip format when it is written to +disk. + +\item +{\tt 'myfile.fits.gz[events, 2]'}: opens and uncompresses the gzipped file +myfile.fits then moves to the extension which has the keywords EXTNAME += 'EVENTS' and EXTVER = 2. + +\item +{\tt '-'}: a dash (minus sign) signifies that the input file is to be read +from the stdin file stream, or that the output file is to be written to +the stdout stream. + +\item +{\tt 'ftp://legacy.gsfc.nasa.gov/test/vela.fits'}: FITS files in any ftp +archive site on the internet may be directly opened with read-only +access. + +\item +{\tt 'http://legacy.gsfc.nasa.gov/software/test.fits'}: any valid URL to a +FITS file on the Web may be opened with read-only access. + +\item +{\tt 'root://legacy.gsfc.nasa.gov/test/vela.fits'}: similar to ftp access +except that it provides write as well as read access to the files +across the network. This uses the root protocol developed at CERN. + +\item +{\tt 'shmem://h2[events]'}: opens the FITS file in a shared memory segment and +moves to the EVENTS extension. + +\item +{\tt 'mem://'}: creates a scratch output file in core computer memory. The +resulting 'file' will disappear when the program exits, so this +is mainly useful for testing purposes when one does not want a +permanent copy of the output file. + +\item +{\tt 'myfile.fits[3; Images(10)]'}: opens a copy of the image contained in the +10th row of the 'Images' column in the binary table in the 3th extension +of the FITS file. The application just sees this single image as the +primary array. + +\item +{\tt 'myfile.fits[1:512:2, 1:512:2]'}: opens a section of the input image +ranging from the 1st to the 512th pixel in X and Y, and selects every +second pixel in both dimensions, resulting in a 256 x 256 pixel image +in this case. + +\item +{\tt 'myfile.fits[EVENTS][col Rad = sqrt(X**2 + Y**2)]'}: creates and opens +a temporary file on the fly (in memory or on disk) that is identical to +myfile.fits except that it will contain a new column in the EVENTS +extension called 'Rad' whose value is computed using the indicated +expresson which is a function of the values in the X and Y columns. + +\item +{\tt 'myfile.fits[EVENTS][PHA > 5]'}: creates and opens a temporary FITS +files that is identical to 'myfile.fits' except that the EVENTS table +will only contain the rows that have values of the PHA column greater +than 5. In general, any arbitrary boolean expression using a C or +Fortran-like syntax, which may combine AND and OR operators, +may be used to select rows from a table. + +\item +{\tt 'myfile.fits[EVENTS][bin (X,Y)=1,2048,4]'}: creates a temporary FITS +primary array image which is computed on the fly by binning (i.e, +computing the 2-dimensional histogram) of the values in the X and Y +columns of the EVENTS extension. In this case the X and Y coordinates +range from 1 to 2048 and the image pixel size is 4 units in both +dimensions, so the resulting image is 512 x 512 pixels in size. + +\item +The final example combines many of these feature into one complex +expression (it is broken into several lines for clarity): + +\begin{verbatim} + 'ftp://legacy.gsfc.nasa.gov/data/sample.fits.gz[EVENTS] + [col phacorr = pha * 1.1 - 0.3][phacorr >= 5.0 && phacorr <= 14.0] + [bin (X,Y)=32]' +\end{verbatim} +In this case, CFITSIO (1) copies and uncompresses the FITS file from +the ftp site on the legacy machine, (2) moves to the 'EVENTS' +extension, (3) calculates a new column called 'phacorr', (4) selects +the rows in the table that have phacorr in the range 5 to 14, and +finally (5) bins the remaining rows on the X and Y column coordinates, +using a pixel size = 32 to create a 2D image. All this processing is +completely transparent to the application program, which simply sees +the final 2-D image in the primary array of the opened file. +\end{itemize} + +The full extended CFITSIO FITS file name can contain several different +components depending on the context. These components are described in +the following sections: + +\begin{verbatim} +When creating a new file: + filetype://BaseFilename(templateName) + +When opening an existing primary array or image HDU: + filetype://BaseFilename(outName)[HDUlocation][ImageSection] + +When opening an existing table HDU: + filetype://BaseFilename(outName)[HDUlocation][colFilter][rowFilter][binSpec] +\end{verbatim} +The filetype, BaseFilename, outName, HDUlocation, and ImageSection +components, if present, must be given in that order, but the colFilter, +rowFilter, and binSpec specifiers may follow in any order. Regardless +of the order, however, the colFilter specifier, if present, will be +processed first by CFITSIO, followed by the rowFilter specifier, and +finally by the binSpec specifier. + + +\section{Filetype} + +The type of file determines the medium on which the file is located +(e.g., disk or network) and, hence, which internal device driver is used by +CFITSIO to read and/or write the file. Currently supported types are + +\begin{verbatim} + file:// - file on local magnetic disk (default) + ftp:// - a readonly file accessed with the anonymous FTP protocol. + It also supports ftp://username:password@hostname/... + for accessing password-protected ftp sites. + http:// - a readonly file accessed with the HTTP protocol. It + does not support username:password like the ftp driver. + Proxy HTTP servers are supported using the http_proxy + environment variable. + root:// - uses the CERN root protocol for writing as well as + reading files over the network. + shmem:// - opens or creates a file which persists in the computer's + shared memory. + mem:// - opens a temporary file in core memory. The file + disappears when the program exits so this is mainly + useful for test purposes when a permanent output file + is not desired. +\end{verbatim} +If the filetype is not specified, then type file:// is assumed. +The double slashes '//' are optional and may be omitted in most cases. + + +\subsection{Notes about HTTP proxy servers} + +A proxy HTTP server may be used by defining the address (URL) and port +number of the proxy server with the http\_proxy environment variable. +For example + +\begin{verbatim} + setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 +\end{verbatim} +will cause CFITSIO to use port 3128 on the heasarc proxy server whenever +reading a FITS file with HTTP. + + +\subsection{Notes about the root filetype} + +The original rootd server can be obtained from: +\verb-ftp://root.cern.ch/root/rootd.tar.gz- +but, for it to work correctly with CFITSIO one has to use a modified +version which supports a command to return the length of the file. +This modified version is available in rootd subdirectory +in the CFITSIO ftp area at + +\begin{verbatim} + ftp://legacy.gsfc.nasa.gov/software/fitsio/c/root/rootd.tar.gz. +\end{verbatim} + +This small server is started either by inetd when a client requests a +connection to a rootd server or by hand (i.e. from the command line). +The rootd server works with the ROOT TNetFile class. It allows remote +access to ROOT database files in either read or write mode. By default +TNetFile assumes port 432 (which requires rootd to be started as root). +To run rootd via inetd add the following line to /etc/services: + +\begin{verbatim} + rootd 432/tcp +\end{verbatim} +and to /etc/inetd.conf, add the following line: + +\begin{verbatim} + rootd stream tcp nowait root /user/rdm/root/bin/rootd rootd -i +\end{verbatim} +Force inetd to reread its conf file with "kill -HUP ". +You can also start rootd by hand running directly under your private +account (no root system privileges needed). For example to start +rootd listening on port 5151 just type: \verb+rootd -p 5151+ +Notice: no \& is needed. Rootd will go into background by itself. + +\begin{verbatim} + Rootd arguments: + -i says we were started by inetd + -p port# specifies a different port to listen on + -d level level of debug info written to syslog + 0 = no debug (default) + 1 = minimum + 2 = medium + 3 = maximum +\end{verbatim} +Rootd can also be configured for anonymous usage (like anonymous ftp). +To setup rootd to accept anonymous logins do the following (while being +logged in as root): + +\begin{verbatim} + - Add the following line to /etc/passwd: + + rootd:*:71:72:Anonymous rootd:/var/spool/rootd:/bin/false + + where you may modify the uid, gid (71, 72) and the home directory + to suite your system. + + - Add the following line to /etc/group: + + rootd:*:72:rootd + + where the gid must match the gid in /etc/passwd. + + - Create the directories: + + mkdir /var/spool/rootd + mkdir /var/spool/rootd/tmp + chmod 777 /var/spool/rootd/tmp + + Where /var/spool/rootd must match the rootd home directory as + specified in the rootd /etc/passwd entry. + + - To make writeable directories for anonymous do, for example: + + mkdir /var/spool/rootd/pub + chown rootd:rootd /var/spool/rootd/pub +\end{verbatim} +That's all. Several additional remarks: you can login to an anonymous +server either with the names "anonymous" or "rootd". The password should +be of type user@host.do.main. Only the @ is enforced for the time +being. In anonymous mode the top of the file tree is set to the rootd +home directory, therefore only files below the home directory can be +accessed. Anonymous mode only works when the server is started via +inetd. + + +\subsection{Notes about the shmem filetype:} + +Shared memory files are currently supported on most Unix platforms, +where the shared memory segments are managed by the operating system +kernel and `live' independently of processes. They are not deleted (by +default) when the process which created them terminates, although they +will disappear if the system is rebooted. Applications can create +shared memory files in CFITSIO by calling: + +\begin{verbatim} + fit_create_file(&fitsfileptr, "shmem://h2", &status); +\end{verbatim} +where the root `file' names are currently restricted to be 'h0', 'h1', +'h2', 'h3', etc., up to a maximumn number defined by the the value of +SHARED\_MAXSEG (equal to 16 by default). This is a prototype +implementation of the shared memory interface and a more robust +interface, which will have fewer restrictions on the number of files +and on their names, may be developed in the future. + +When opening an already existing FITS file in shared memory one calls +the usual CFITSIO routine: + +\begin{verbatim} + fits_open_file(&fitsfileptr, "shmem://h7", mode, &status) +\end{verbatim} +The file mode can be READWRITE or READONLY just as with disk files. +More than one process can operate on READONLY mode files at the same +time. CFITSIO supports proper file locking (both in READONLY and +READWRITE modes), so calls to fits\_open\_file may be locked out until +another other process closes the file. + +When an application is finished accessing a FITS file in a shared +memory segment, it may close it (and the file will remain in the +system) with fits\_close\_file, or delete it with fits\_delete\_file. +Physical deletion is postponed until the last process calls +ffclos/ffdelt. fits\_delete\_file tries to obtain a READWRITE lock on +the file to be deleted, thus it can be blocked if the object was not +opened in READWRITE mode. + +A shared memory management utility program called `smem', is included +with the CFITSIO distribution. It can be built by typing `make smem'; +then type `smem -h' to get a list of valid options. Executing smem +without any options causes it to list all the shared memory segments +currently residing in the system and managed by the shared memory +driver. To get a list of all the shared memory objects, run the system +utility program `ipcs [-a]'. + + +\section{Base Filename} + +The base filename is the name of the file optionally including the +director/subdirectory path, and in the case of `ftp', `http', and `root' +filetypes, the machine identifier. Examples: + +\begin{verbatim} + myfile.fits + !data.fits + /data/myfile.fits + fits.gsfc.nasa.gov/ftp/sampledata/myfile.fits.gz +\end{verbatim} + +When creating a new output file on magnetic disk (of type file://) if +the base filename begins with an exclamation point (!) then any +existing file with that same basename will be deleted prior to creating +the new FITS file. Otherwise if the file to be created already exists, +then CFITSIO will return an error and will not overwrite the existing +file. Note that the exclamation point, '!', is a special UNIX character, +so if it is used on the command line rather than entered at a task +prompt, it must be preceded by a backslash to force the UNIX +shell to pass it verbatim to the application program. + +If the output disk file name ends with the suffix '.gz', then CFITSIO +will compress the file using the gzip compression algorithm before +writing it to disk. This can reduce the amount of disk space used by +the file. Note that this feature requires that the uncompressed file +be constructed in memory before it is compressed and written to disk, +so it can fail if there is insufficient available memory. + +An input FITS file may be compressed with the gzip or Unix compress +algorithms, in which case CFITSIO will uncompress the file on the fly +into a temporary file (in memory or on disk). Compressed files may +only be opened with read-only permission. When specifying the name of +a compressed FITS file it is not necessary to append the file suffix +(e.g., `.gz' or `.Z'). If CFITSIO cannot find the input file name +without the suffix, then it will automatically search for a compressed +file with the same root name. In the case of reading ftp and http type +files, CFITSIO generally looks for a compressed version of the file +first, before trying to open the uncompressed file. By default, +CFITSIO copies (and uncompressed if necessary) the ftp or http FITS +file into memory on the local machine before opening it. This will +fail if the local machine does not have enough memory to hold the whole +FITS file, so in this case, the output filename specifier (see the next +section) can be used to further control how CFITSIO reads ftp and http +files. + +If the input file is an IRAF image file (*.imh file) then CFITSIO will +automatically convert it on the fly into a virtual FITS image before it +is opened by the application program. IRAF images can only be opened +with READONLY file access. + +Similarly, if the input file is a raw binary data array, then CFITSIO +will convert it on the fly into a virtual FITS image with the basic set +of required header keywords before it is opened by the application +program (with READONLY access). In this case the data type and +dimensions of the image must be specified in square brackets following +the filename (e.g. rawfile.dat[ib512,512]). The first character (case +insensitive) defines the datatype of the array: + +\begin{verbatim} + b 8-bit unsigned byte + i 16-bit signed integer + u 16-bit unsigned integer + j 32-bit signed integer + r or f 32-bit floating point + d 64-bit floating point +\end{verbatim} +An optional second character specifies the byte order of the array +values: b or B indicates big endian (as in FITS files and the native +format of SUN UNIX workstations and Mac PCs) and l or L indicates +little endian (native format of DEC OSF workstations and IBM PCs). If +this character is omitted then the array is assumed to have the native +byte order of the local machine. These datatype characters are then +followed by a series of one or more integer values separated by commas +which define the size of each dimension of the raw array. Arrays with +up to 5 dimensions are currently supported. Finally, a byte offset to +the position of the first pixel in the data file may be specified by +separating it with a ':' from the last dimension value. If omitted, it +is assumed that the offset = 0. This parameter may be used to skip +over any header information in the file that precedes the binary data. +Further examples: + +\begin{verbatim} + raw.dat[b10000] 1-dimensional 10000 pixel byte array + raw.dat[rb400,400,12] 3-dimensional floating point big-endian array + img.fits[ib512,512:2880] reads the 512 x 512 short integer array in + a FITS file, skipping over the 2880 byte header +\end{verbatim} + +One special case of input file is where the filename = `-' (a dash or +minus sign) or 'stdin' or 'stdout', which signifies that the input file +is to be read from the stdin stream, or written to the stdout stream if +a new output file is being created. In the case of reading from stdin, +CFITSIO first copies the whole stream into a temporary FITS file (in +memory or on disk), and subsequent reading of the FITS file occurs in +this copy. When writing to stdout, CFITSIO first constructs the whole +file in memory (since random access is required), then flushes it out +to the stdout stream when the file is closed. In addition, if the +output filename = '-.gz' or 'stdout.gz' then it will be gzip compressed +before being written to stdout. + +This ability to read and write on the stdin and stdout steams allows +FITS files to be piped between tasks in memory rather than having to +create temporary intermediate FITS files on disk. For example if task1 +creates an output FITS file, and task2 reads an input FITS file, the +FITS file may be piped between the 2 tasks by specifying + +\begin{verbatim} + task1 - | task2 - +\end{verbatim} +where the vertical bar is the Unix piping symbol. This assumes that the 2 +tasks read the name of the FITS file off of the command line. + + +\section{Output File Name when Opening an Existing File} + +An optional output filename may be specified in parentheses immediately +following the base file name to be opened. This is mainly useful in +those cases where CFITSIO creates a temporary copy of the input FITS +file before it is opened and passed to the application program. This +happens by default when opening a network FTP or HTTP-type file, when +reading a compressed FITS file on a local disk, when reading from the +stdin stream, or when a column filter, row filter, or binning specifier +is included as part of the input file specification. By default this +temporary file is created in memory. If there is not enough memory to +create the file copy, then CFITSIO will exit with an error. In these +cases one can force a permanent file to be created on disk, instead of +a temporary file in memory, by supplying the name in parentheses +immediately following the base file name. The output filename can +include the '!' clobber flag. + +Thus, if the input filename to CFITSIO is: +\verb+file1.fits.gz(file2.fits)+ +then CFITSIO will uncompress `file1.fits.gz' into the local disk file +`file2.fits' before opening it. CFITSIO does not automatically delete +the output file, so it will still exist after the application program +exits. + +In some cases, several different temporary FITS files will be created +in sequence, for instance, if one opens a remote file using FTP, then +filters rows in a binary table extension, then create an image by +binning a pair of columns. In this case, the remote file will be +copied to a temporary local file, then a second temporary file will be +created containing the filtered rows of the table, and finally a third +temporary file containing the binned image will be created. In cases +like this where multiple files are created, the outfile specifier will +be interpreted the name of the final file as described below, in descending +priority: + +\begin{itemize} +\item +as the name of the final image file if an image within a single binary +table cell is opened or if an image is created by binning a table column. +\item +as the name of the file containing the filtered table if a column filter +and/or a row filter are specified. +\item +as the name of the local copy of the remote FTP or HTTP file. +\item +as the name of the uncompressed version of the FITS file, if a +compressed FITS file on local disk has been opened. +\item +otherwise, the output filename is ignored. +\end{itemize} + + +The output file specifier is useful when reading FTP or HTTP-type +FITS files since it can be used to create a local disk copy of the file +that can be reused in the future. If the output file name = `*' then a +local file with the same name as the network file will be created. +Note that CFITSIO will behave differently depending on whether the +remote file is compressed or not as shown by the following examples: +\begin{itemize} +\item +`ftp://remote.machine/tmp/myfile.fits.gz(*)' - the remote compressed +file is copied to the local compressed file `myfile.fits.gz', which +is then uncompressed in local memory before being opened and passed +to the application program. + +\item +`ftp://remote.machine/tmp/myfile.fits.gz(myfile.fits)' - the remote +compressed file is copied and uncompressed into the local file +`myfile.fits'. This example requires less local memory than the +previous example since the file is uncompressed on disk instead of +in memory. + +\item +`ftp://remote.machine/tmp/myfile.fits(myfile.fits.gz)' - this will +usually produce an error since CFITSIO itself cannot compress files. +\end{itemize} + +The exact behavior of CFITSIO in the latter case depends on the type of +ftp server running on the remote machine and how it is configured. In +some cases, if the file `myfile.fits.gz' exists on the remote machine, +then the server will copy it to the local machine. In other cases the +ftp server will automatically create and transmit a compressed version +of the file if only the uncompressed version exists. This can get +rather confusing, so users should use a certain amount of caution when +using the output file specifier with FTP or HTTP file types, to make +sure they get the behavior that they expect. + + +\section{Template File Name when Creating a New File} + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described below. + + +\section{Image Tile-Compression Specification} + +When specifying the name of the output FITS file to be created, the +user can indicate that images should be written in tile-compressed +format (see section 5.5, ``Primary Array or IMAGE Extension I/O +Routines'') by enclosing the compression parameters in square brackets +following the root disk file name. Here are some examples of the +syntax for specifying tile-compressed output images: + +\begin{verbatim} + myfile.fit[compress] - use Rice algorithm and default tile size + + myfile.fit[compress GZIP] - use the specified compression algorithm; + myfile.fit[compress Rice] only the first letter of the algorithm + myfile.fit[compress PLIO] name is required. + + myfile.fit[compress Rice 100,100] - use 100 x 100 pixel tile size + myfile.fit[compress Rice 100,100;2] - as above, and use noisebits = 2 +\end{verbatim} + + +\section{HDU Location Specification} + +The optional HDU location specifier defines which HDU (Header-Data +Unit, also known as an `extension') within the FITS file to initially +open. It must immediately follow the base file name (or the output +file name if present). If it is not specified then the first HDU (the +primary array) is opened. The HDU location specifier is required if +the colFilter, rowFilter, or binSpec specifiers are present, because +the primary array is not a valid HDU for these operations. The HDU may +be specified either by absolute position number, starting with 0 for +the primary array, or by reference to the HDU name, and optionally, the +version number and the HDU type of the desired extension. The location +of an image within a single cell of a binary table may also be +specified, as described below. + +The absolute position of the extension is specified either by enclosed +the number in square brackets (e.g., `[1]' = the first extension +following the primary array) or by preceded the number with a plus sign +(`+1'). To specify the HDU by name, give the name of the desired HDU +(the value of the EXTNAME or HDUNAME keyword) and optionally the +extension version number (value of the EXTVER keyword) and the +extension type (value of the XTENSION keyword: IMAGE, ASCII or TABLE, +or BINTABLE), separated by commas and all enclosed in square brackets. +If the value of EXTVER and XTENSION are not specified, then the first +extension with the correct value of EXTNAME is opened. The extension +name and type are not case sensitive, and the extension type may be +abbreviated to a single letter (e.g., I = IMAGE extension or primary +array, A or T = ASCII table extension, and B = binary table BINTABLE +extension). If the HDU location specifier is equal to `[PRIMARY]' or +`[P]', then the primary array (the first HDU) will be opened. + +FITS images are most commonly stored in the primary array or an image +extension, but images can also be stored as a vector in a single cell +of a binary table (i.e. each row of the vector column contains a +different image). Such an image can be opened with CFITSIO by +specifying the desired column name and the row number after the binary +table HDU specifier as shown in the following examples. The column name +is separated from the HDU specifier by a semicolon and the row number +is enclosed in parentheses. In this case CFITSIO copies the image from +the table cell into a temporary primary array before it is opened. The +application program then just sees the image in the primary array, +without any extensions. The particular row to be opened may be +specified either by giving an absolute integer row number (starting +with 1 for the first row), or by specifying a boolean expression that +evaluates to TRUE for the desired row. The first row that satisfies +the expression will be used. The row selection expression has the same +syntax as described in the Row Filter Specifier section, below. + + Examples: + +\begin{verbatim} + myfile.fits[3] - open the 3rd HDU following the primary array + myfile.fits+3 - same as above, but using the FTOOLS-style notation + myfile.fits[EVENTS] - open the extension that has EXTNAME = 'EVENTS' + myfile.fits[EVENTS, 2] - same as above, but also requires EXTVER = 2 + myfile.fits[events,2,b] - same, but also requires XTENSION = 'BINTABLE' + myfile.fits[3; images(17)] - opens the image in row 17 of the 'images' + column in the 3rd extension of the file. + myfile.fits[3; images(exposure > 100)] - as above, but opens the image + in the first row that has an 'exposure' column value + greater than 100. +\end{verbatim} + + +\section{Image Section} + +A virtual file containing a rectangular subsection of an image can be +extracted and opened by specifying the range of pixels (start:end) +along each axis to be extracted from the original image. One can also +specify an optional pixel increment (start:end:step) for each axis of +the input image. A pixel step = 1 will be assumed if it is not +specified. If the start pixel is larger then the end pixel, then the +image will be flipped (producing a mirror image) along that dimension. +An asterisk, '*', may be used to specify the entire range of an axis, +and '-*' will flip the entire axis. The input image can be in the +primary array, in an image extension, or contained in a vector cell of +a binary table. In the later 2 cases the extension name or number must +be specified before the image section specifier. + + Examples: + +\begin{verbatim} + myfile.fits[1:512:2, 2:512:2] - open a 256x256 pixel image + consisting of the odd numbered columns (1st axis) and + the even numbered rows (2nd axis) of the image in the + primary array of the file. + + myfile.fits[*, 512:256] - open an image consisting of all the columns + in the input image, but only rows 256 through 512. + The image will be flipped along the 2nd axis since + the starting pixel is greater than the ending pixel. + + myfile.fits[*:2, 512:256:2] - same as above but keeping only + every other row and column in the input image. + + myfile.fits[-*, *] - copy the entire image, flipping it along + the first axis. + + myfile.fits[3][1:256,1:256] - opens a subsection of the image that + is in the 3rd extension of the file. + + myfile.fits[4; images(12)][1:10,1:10] - open an image consisting + of the first 10 pixels in both dimensions. The original + image resides in the 12th row of the 'images' vector + column in the table in the 4th extension of the file. +\end{verbatim} + +When CFITSIO opens an image section it first creates a temporary file +containing the image section plus a copy of any other HDUs in the +file. This temporary file is then opened by the application program, +so it is not possible to write to or modify the input file when +specifying an image section. Note that CFITSIO automatically updates +the world coordinate system keywords in the header of the image +section, if they exist, so that the coordinate associated with each +pixel in the image section will be computed correctly. + + +\section{Image Transform Filters} + +CFITSIO can apply a user-specified mathematical function to the value +of every pixel in a FITS image, thus creating a new virtual image +in computer memory that is then opened and read by the application +program. The original FITS image is not modified by this process. + +The image tranformation specifier is appended to the input +FITS file name and is enclosed in square brackets. It begins with the +letters 'PIX' to distinguish it from other types of FITS file filters +that are recognized by CFITSIO. The image transforming function may +use any of the mathmatical operators listed in the following +'Row Filtering Specification' section of this document. +Some examples of image transform filters are: + +\begin{verbatim} + [pix X * 2.0] - multiply each pixel by 2.0 + [pix sqrt(X)] - take the square root of each pixel + [pix X + #ZEROPT - add the value of the ZEROPT keyword + [pix X>0 ? log10(X) : -99.] - if the pixel value is greater + than 0, compute the base 10 log, + else set the pixel = -99. +\end{verbatim} +Use the letter 'X' in the expression to represent the current pixel value +in the image. The expression is evaluated +independently for each pixel in the image and may be a function of 1) the +original pixel value, 2) the value of other pixels in the image at +a given relative offset from the position of the pixel that is being +evaluated, and 3) the value of +any header keywords. Header keyword values are represented +by the name of the keyword preceded by the '\#' sign. + + +To access the the value of adjacent pixels in the image, +specify the (1-D) offset from the current pixel in curly brackets. +For example + +\begin{verbatim} + [pix (x{-1} + x + x{+1}) / 3] +\end{verbatim} +will replace each pixel value with the running mean of the values of that +pixel and it's 2 neighboring pixels. Note that in this notation the image +is treated as a 1-D array, where each row of the image (or higher dimensional +cube) is appended one after another in one long array of pixels. +It is possible to refer to pixels +in the rows above or below the current pixel by using the value of the +NAXIS1 header keyword. For example + +\begin{verbatim} + [pix (x{-#NAXIS1} + x + x{#NAXIS1}) / 3] +\end{verbatim} +will compute the mean of each image pixel and the pixels immediately +above and below it in the adjacent rows of the image. +The following more complex example +creates a smoothed virtual image where each pixel +is a 3 x 3 boxcar average of the input image pixels: + +\begin{verbatim} + [pix (X + X{-1} + X{+1} + + X{-#NAXIS1} + X{-#NAXIS1 - 1} + X{-#NAXIS1 + 1} + + X{#NAXIS1} + X{#NAXIS1 - 1} + X{#NAXIS1 + 1}) / 9.] +\end{verbatim} +If the pixel offset +extends beyond the first or last pixel in the image, the function will +evaluate to undefined, or NULL. + +For complex or commonly used image filtering operations, +one can write the expression into an external text file and +then import it into the +filter using the syntax '[pix @filename.txt]'. The mathematical +expression can +extend over multiple lines of text in the file. +Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +By default, the datatype of the resulting image will be the same as +the original image, but one may force a different datatype by appended +a code letter to the 'pix' keyword: + +\begin{verbatim} + pixb - 8-bit byte image with BITPIX = 8 + pixi - 16-bit integer image with BITPIX = 16 + pixj - 32-bit integer image with BITPIX = 32 + pixr - 32-bit float image with BITPIX = -32 + pixd - 64-bit float image with BITPIX = -64 +\end{verbatim} +Also by default, any other HDUs in the input file will be copied without +change to the +output virtual FITS file, but one may discard the other HDUs by adding +the number '1' to the 'pix' keyword (and following any optional datatype code +letter). For example: + +\begin{verbatim} + myfile.fits[3][pixr1 sqrt(X)] +\end{verbatim} +will create a virtual FITS file containing only a primary array image +with 32-bit floating point pixels that have a value equal to the square +root of the pixels in the image that is in the 3rd extension +of the 'myfile.fits' file. + + + + +\section{Column and Keyword Filtering Specification} + +The optional column/keyword filtering specifier is used to modify the +column structure and/or the header keywords in the HDU that was +selected with the previous HDU location specifier. This filtering +specifier must be enclosed in square brackets and can be distinguished +from a general row filter specifier (described below) by the fact that +it begins with the string 'col ' and is not immediately followed by an +equals sign. The original file is not changed by this filtering +operation, and instead the modifications are made on a copy of the +input FITS file (usually in memory), which also contains a copy of all +the other HDUs in the file. This temporary file is passed to the +application program and will persist only until the file is closed or +until the program exits, unless the outfile specifier (see above) is +also supplied. + +The column/keyword filter can be used to perform the following +operations. More than one operation may be specified by separating +them with semi-colons. + +\begin{itemize} + +\item +Copy only a specified list of columns columns to the filtered input file. +The list of column name should be separated by semi-colons. Wild card +characters may be used in the column names to match multiple columns. +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table (i.e., there is no need to explicitly list the columns to +be included if any columns are being deleted). + +\item +Delete a column or keyword by listing the name preceded by a minus +sign or an exclamation mark (!), e.g., '-TIME' will delete the TIME +column if it exists, otherwise the TIME keyword. An error is returned +if neither a column nor keyword with this name exists. Note that the +exclamation point, '!', is a special UNIX character, so if it is used +on the command line rather than entered at a task prompt, it must be +preceded by a backslash to force the UNIX shell to ignore it. + +\item +Rename an existing column or keyword with the syntax 'NewName == +OldName'. An error is returned if neither a column nor keyword with +this name exists. + +\item +Append a new column or keyword to the table. To create a column, +give the new name, optionally followed by the datatype in parentheses, +followed by a single equals sign and an expression to be used to +compute the value (e.g., 'newcol(1J) = 0' will create a new 32-bit +integer column called 'newcol' filled with zeros). The datatype is +specified using the same syntax that is allowed for the value of the +FITS TFORMn keyword (e.g., 'I', 'J', 'E', 'D', etc. for binary tables, +and 'I8', F12.3', 'E20.12', etc. for ASCII tables). If the datatype is +not specified then an appropriate datatype will be chosen depending on +the form of the expression (may be a character string, logical, bit, long +integer, or double column). An appropriate vector count (in the case +of binary tables) will also be added if not explicitly specified. + +When creating a new keyword, the keyword name must be preceded by a +pound sign '\#', and the expression must evaluate to a scalar +(i.e., cannot have a column name in the expression). The comment +string for the keyword may be specified in parentheses immediately +following the keyword name (instead of supplying a datatype as in +the case of creating a new column). If the keyword name ends with a +pound sign '\#', then cfitsio will substitute the number of the +most recently referenced column for the \# character . +This is especially useful when writing +a column-related keyword like TUNITn for a newly created column, +as shown in the following examples. + +\item +Recompute (overwrite) the values in an existing column or keyword by +giving the name followed by an equals sign and an arithmetic +expression. +\end{itemize} + +The expression that is used when appending or recomputing columns or +keywords can be arbitrarily complex and may be a function of other +header keyword values and other columns (in the same row). The full +syntax and available functions for the expression are described below +in the row filter specification section. + +If the expression contains both a list of columns to be included and +columns to be deleted, then all the columns in the original table +except the explicitly deleted columns will appear in the filtered +table. If no columns to be deleted are specified, then only the +columns that are explicitely listed will be included in the filtered +output table. To include all the columns, add the '*' wildcard +specifier at the end of the list, as shown in the examples. + +For complex or commonly used operations, one can also place the +operations into an external text file and import it into the column +filter using the syntax '[col @filename.txt]'. The operations can +extend over multiple lines of the file, but multiple operations must +still be separated by semicolons. Any lines in the external text file +that begin with 2 slash characters ('//') will be ignored and may be +used to add comments into the file. + +Examples: + +\begin{verbatim} + [col Time;rate] - only the Time and rate columns will + appear in the filtered input file. + + [col Time;*raw] - include the Time column and any other + columns whose name ends with 'raw'. + + [col -TIME; Good == STATUS] - deletes the TIME column and + renames the status column to 'Good' + + [col PI=PHA * 1.1 + 0.2; #TUNIT#(column units) = 'counts';*] + - creates new PI column from PHA values + and also writes the TUNITn keyword + for the new column. The final '*' + expression means preserve all the + columns in the input table in the + virtual output table; without the '*' + the output table would only contain + the single 'PI' column. + + [col rate = rate/exposure; TUNIT#(&) = 'counts/s';*] + - recomputes the rate column by dividing + it by the EXPOSURE keyword value. This + also modifies the value of the TUNITn + keyword for this column. The use of the + '&' character for the keyword comment + string means preserve the existing + comment string for that keyword. The + final '*' preserves all the columns + in the input table in the virtual + output table. +\end{verbatim} + + +\section{Row Filtering Specification} + + When entering the name of a FITS table that is to be opened by a + program, an optional row filter may be specified to select a subset + of the rows in the table. A temporary new FITS file is created on + the fly which contains only those rows for which the row filter + expression evaluates to true. (The primary array and any other + extensions in the input file are also copied to the temporary + file). The original FITS file is closed and the new virtual file + is opened by the application program. The row filter expression is + enclosed in square brackets following the file name and extension + name (e.g., 'file.fits[events][GRADE==50]' selects only those rows + where the GRADE column value equals 50). When dealing with tables + where each row has an associated time and/or 2D spatial position, + the row filter expression can also be used to select rows based on + the times in a Good Time Intervals (GTI) extension, or on spatial + position as given in a SAO-style region file. + + +\subsection{General Syntax} + + The row filtering expression can be an arbitrarily complex series + of operations performed on constants, keyword values, and column + data taken from the specified FITS TABLE extension. The expression + must evaluate to a boolean value for each row of the table, where + a value of FALSE means that the row will be excluded. + + For complex or commonly used filters, one can place the expression + into a text file and import it into the row filter using the syntax + '[@filename.txt]'. The expression can be arbitrarily complex and + extend over multiple lines of the file. Any lines in the external + text file that begin with 2 slash characters ('//') will be ignored + and may be used to add comments into the file. + + Keyword and column data are referenced by name. Any string of + characters not surrounded by quotes (ie, a constant string) or + followed by an open parentheses (ie, a function name) will be + initially interpreted as a column name and its contents for the + current row inserted into the expression. If no such column exists, + a keyword of that name will be searched for and its value used, if + found. To force the name to be interpreted as a keyword (in case + there is both a column and keyword with the same name), precede the + keyword name with a single pound sign, '\#', as in '\#NAXIS2'. Due to + the generalities of FITS column and keyword names, if the column or + keyword name contains a space or a character which might appear as + an arithmetic term then inclose the name in '\$' characters as in + \$MAX PHA\$ or \#\$MAX-PHA\$. Names are case insensitive. + + To access a table entry in a row other than the current one, follow + the column's name with a row offset within curly braces. For + example, 'PHA\{-3\}' will evaluate to the value of column PHA, 3 rows + above the row currently being processed. One cannot specify an + absolute row number, only a relative offset. Rows that fall outside + the table will be treated as undefined, or NULLs. + + Boolean operators can be used in the expression in either their + Fortran or C forms. The following boolean operators are available: + +\begin{verbatim} + "equal" .eq. .EQ. == "not equal" .ne. .NE. != + "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< + "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => + "or" .or. .OR. || "and" .and. .AND. && + "negation" .not. .NOT. ! "approx. equal(1e-7)" ~ +\end{verbatim} + +Note that the exclamation +point, '!', is a special UNIX character, so if it is used on the +command line rather than entered at a task prompt, it must be preceded +by a backslash to force the UNIX shell to ignore it. + + The expression may also include arithmetic operators and functions. + Trigonometric functions use radians, not degrees. The following + arithmetic operators and functions can be used in the expression + (function names are case insensitive). A null value will be returned + in case of illegal operations such as divide by zero, sqrt(negative) + log(negative), log10(negative), arccos(.gt. 1), arcsin(.gt. 1). + + +\begin{verbatim} + "addition" + "subtraction" - + "multiplication" * "division" / + "negation" - "exponentiation" ** ^ + "absolute value" abs(x) "cosine" cos(x) + "sine" sin(x) "tangent" tan(x) + "arc cosine" arccos(x) "arc sine" arcsin(x) + "arc tangent" arctan(x) "arc tangent" arctan2(y,x) + "hyperbolic cos" cosh(x) "hyperbolic sin" sinh(x) + "hyperbolic tan" tanh(x) "round to nearest int" round(x) + "round down to int" floor(x) "round up to int" ceil(x) + "exponential" exp(x) "square root" sqrt(x) + "natural log" log(x) "common log" log10(x) + "modulus" x % y "random # [0.0,1.0)" random() + "random Gausian" randomn() "random Poisson" randomp(x) + "minimum" min(x,y) "maximum" max(x,y) + "cumulative sum" accum(x) "sequential difference" seqdiff(x) + "if-then-else" b?x:y + "angular separation" angsep(ra1,dec1,ra2,de2) (all in degrees) +\end{verbatim} +Three different random number functions are provided: random(), with no +arguments, produces a uniform random deviate between 0 and 1; randomn(), +also with no arguments, produces a normal (Gaussian) random deviate with +zero mean and unit standard deviation; randomp(x) produces a Poisson random +deviate whose expected number of counts is X. X may be any positive real +number of expected counts, including fractional values, but the return value +is an integer. + +When the random functions are used in a vector expresion, by default +the same random value will be used when evalutating each element of the vector. +If different random numbers are desired, then the name of a vector +column should be supplied as the single argument to the random +function (e.g., "flux + 0.1 * random(flux)", where "flux' is the +name of a vector column). This will create a vector of +random numbers that will be used in sequence when evaluating each +element of the vector expression. + + An alternate syntax for the min and max functions has only a single + argument which should be a vector value (see below). The result + will be the minimum/maximum element contained within the vector. + + The accum(x) function forms the cumulative sum of x, element by element. + Vector columns are supported simply by performing the summation process + through all the values. Null values are treated as 0. The seqdiff(x) + function forms the sequential difference of x, element by element. + The first value of seqdiff is the first value of x. A single null + value in x causes a pair of nulls in the output. The seqdiff and + accum functions are functional inverses, i.e., seqdiff(accum(x)) == x + as long as no null values are present. + + The angsep function computes the angular separation in degrees + between 2 celestial positions, where the first 2 parameters + give the RA-like and Dec-like coordinates (in decimal degrees) + of the first position, and the 3rd and 4th parameters give the + coordinates of the second position. + + The following type casting operators are available, where the + inclosing parentheses are required and taken from the C language + usage. Also, the integer to real casts values to double precision: + +\begin{verbatim} + "real to integer" (int) x (INT) x + "integer to real" (float) i (FLOAT) i +\end{verbatim} + + In addition, several constants are built in for use in numerical + expressions: + + +\begin{verbatim} + #pi 3.1415... #e 2.7182... + #deg #pi/180 #row current row number + #null undefined value #snull undefined string +\end{verbatim} + + A string constant must be enclosed in quotes as in 'Crab'. The + "null" constants are useful for conditionally setting table values + to a NULL, or undefined, value (eg., "col1==-99 ? \#NULL : col1"). + + There is also a function for testing if two values are close to + each other, i.e., if they are "near" each other to within a user + specified tolerance. The arguments, value\_1 and value\_2 can be + integer or real and represent the two values who's proximity is + being tested to be within the specified tolerance, also an integer + or real: + +\begin{verbatim} + near(value_1, value_2, tolerance) +\end{verbatim} + When a NULL, or undefined, value is encountered in the FITS table, + the expression will evaluate to NULL unless the undefined value is + not actually required for evaluation, e.g. "TRUE .or. NULL" + evaluates to TRUE. The following two functions allow some NULL + detection and handling: + +\begin{verbatim} + "a null value?" ISNULL(x) + "define a value for null" DEFNULL(x,y) +\end{verbatim} + The former + returns a boolean value of TRUE if the argument x is NULL. The + later "defines" a value to be substituted for NULL values; it + returns the value of x if x is not NULL, otherwise it returns the + value of y. + + +\subsection{Bit Masks} + + Bit masks can be used to select out rows from bit columns (TFORMn = + \#X) in FITS files. To represent the mask, binary, octal, and hex + formats are allowed: + + +\begin{verbatim} + binary: b0110xx1010000101xxxx0001 + octal: o720x1 -> (b111010000xxx001) + hex: h0FxD -> (b00001111xxxx1101) +\end{verbatim} + + In all the representations, an x or X is allowed in the mask as a + wild card. Note that the x represents a different number of wild + card bits in each representation. All representations are case + insensitive. + + To construct the boolean expression using the mask as the boolean + equal operator described above on a bit table column. For example, + if you had a 7 bit column named flags in a FITS table and wanted + all rows having the bit pattern 0010011, the selection expression + would be: + + +\begin{verbatim} + flags == b0010011 + or + flags .eq. b10011 +\end{verbatim} + + It is also possible to test if a range of bits is less than, less + than equal, greater than and greater than equal to a particular + boolean value: + + +\begin{verbatim} + flags <= bxxx010xx + flags .gt. bxxx100xx + flags .le. b1xxxxxxx +\end{verbatim} + + Notice the use of the x bit value to limit the range of bits being + compared. + + It is not necessary to specify the leading (most significant) zero + (0) bits in the mask, as shown in the second expression above. + + Bit wise AND, OR and NOT operations are also possible on two or + more bit fields using the '\&'(AND), '$|$'(OR), and the '!'(NOT) + operators. All of these operators result in a bit field which can + then be used with the equal operator. For example: + + +\begin{verbatim} + (!flags) == b1101100 + (flags & b1000001) == bx000001 +\end{verbatim} + + Bit fields can be appended as well using the '+' operator. Strings + can be concatenated this way, too. + + +\subsection{Vector Columns} + + Vector columns can also be used in building the expression. No + special syntax is required if one wants to operate on all elements + of the vector. Simply use the column name as for a scalar column. + Vector columns can be freely intermixed with scalar columns or + constants in virtually all expressions. The result will be of the + same dimension as the vector. Two vectors in an expression, though, + need to have the same number of elements and have the same + dimensions. The only places a vector column cannot be used (for + now, anyway) are the SAO region functions and the NEAR boolean + function. + + Arithmetic and logical operations are all performed on an element by + element basis. Comparing two vector columns, eg "COL1 == COL2", + thus results in another vector of boolean values indicating which + elements of the two vectors are equal. + + Eight functions are available that operate on a vector and return a + scalar result: + +\begin{verbatim} + "minimum" MIN(V) "maximum" MAX(V) + "average" AVERAGE(V) "median" MEDIAN(V) + "sumation" SUM(V) "standard deviation" STDDEV(V) + "# of values" NELEM(V) "# of non-null values" NVALID(V) +\end{verbatim} + where V represents the name of a vector column or a manually + constructed vector using curly brackets as described below. The + first 6 of these functions ignore any null values in the vector when + computing the result. + + The SUM function literally sums all the elements in x, returning a + scalar value. If x is a boolean vector, SUM returns the number + of TRUE elements. The NELEM function returns the number of elements + in vector x whereas NVALID return the number of non-null elements in + the vector. (NELEM also operates on bit and string columns, + returning their column widths.) As an example, to test whether all + elements of two vectors satisfy a given logical comparison, one can + use the expression + +\begin{verbatim} + SUM( COL1 > COL2 ) == NELEM( COL1 ) +\end{verbatim} + + which will return TRUE if all elements of COL1 are greater than + their corresponding elements in COL2. + + To specify a single element of a vector, give the column name + followed by a comma-separated list of coordinates enclosed in + square brackets. For example, if a vector column named PHAS exists + in the table as a one dimensional, 256 component list of numbers + from which you wanted to select the 57th component for use in the + expression, then PHAS[57] would do the trick. Higher dimensional + arrays of data may appear in a column. But in order to interpret + them, the TDIMn keyword must appear in the header. Assuming that a + (4,4,4,4) array is packed into each row of a column named ARRAY4D, + the (1,2,3,4) component element of each row is accessed by + ARRAY4D[1,2,3,4]. Arrays up to dimension 5 are currently + supported. Each vector index can itself be an expression, although + it must evaluate to an integer value within the bounds of the + vector. Vector columns which contain spaces or arithmetic operators + must have their names enclosed in "\$" characters as with + \$ARRAY-4D\$[1,2,3,4]. + + A more C-like syntax for specifying vector indices is also + available. The element used in the preceding example alternatively + could be specified with the syntax ARRAY4D[4][3][2][1]. Note the + reverse order of indices (as in C), as well as the fact that the + values are still ones-based (as in Fortran -- adopted to avoid + ambiguity for 1D vectors). With this syntax, one does not need to + specify all of the indices. To extract a 3D slice of this 4D + array, use ARRAY4D[4]. + + Variable-length vector columns are not supported. + + Vectors can be manually constructed within the expression using a + comma-separated list of elements surrounded by curly braces ('\{\}'). + For example, '\{1,3,6,1\}' is a 4-element vector containing the values + 1, 3, 6, and 1. The vector can contain only boolean, integer, and + real values (or expressions). The elements will be promoted to the + highest datatype present. Any elements which are themselves + vectors, will be expanded out with each of its elements becoming an + element in the constructed vector. + + +\subsection{Good Time Interval Filtering} + + A common filtering method involves selecting rows which have a time + value which lies within what is called a Good Time Interval or GTI. + The time intervals are defined in a separate FITS table extension + which contains 2 columns giving the start and stop time of each + good interval. The filtering operation accepts only those rows of + the input table which have an associated time which falls within + one of the time intervals defined in the GTI extension. A high + level function, gtifilter(a,b,c,d), is available which evaluates + each row of the input table and returns TRUE or FALSE depending + whether the row is inside or outside the good time interval. The + syntax is + +\begin{verbatim} + gtifilter( [ "gtifile" [, expr [, "STARTCOL", "STOPCOL" ] ] ] ) +\end{verbatim} + where each "[]" demarks optional parameters. Note that the quotes + around the gtifile and START/STOP column are required. Either single + or double quotes may be used. In cases where this expression is + entered on the Unix command line, enclose the entire expression in + double quotes, and then use single quotes within the expression to + enclose the 'gtifile' and other terms. It is also usually possible + to do the reverse, and enclose the whole expression in single quotes + and then use double quotes within the expression. The gtifile, + if specified, can be blank ("") which will mean to use the first + extension with the name "*GTI*" in the current file, a plain + extension specifier (eg, "+2", "[2]", or "[STDGTI]") which will be + used to select an extension in the current file, or a regular + filename with or without an extension specifier which in the latter + case will mean to use the first extension with an extension name + "*GTI*". Expr can be any arithmetic expression, including simply + the time column name. A vector time expression will produce a + vector boolean result. STARTCOL and STOPCOL are the names of the + START/STOP columns in the GTI extension. If one of them is + specified, they both must be. + + In its simplest form, no parameters need to be provided -- default + values will be used. The expression "gtifilter()" is equivalent to + +\begin{verbatim} + gtifilter( "", TIME, "*START*", "*STOP*" ) +\end{verbatim} + This will search the current file for a GTI extension, filter the + TIME column in the current table, using START/STOP times taken from + columns in the GTI extension with names containing the strings + "START" and "STOP". The wildcards ('*') allow slight variations in + naming conventions such as "TSTART" or "STARTTIME". The same + default values apply for unspecified parameters when the first one + or two parameters are specified. The function automatically + searches for TIMEZERO/I/F keywords in the current and GTI + extensions, applying a relative time offset, if necessary. + + +\subsection{Spatial Region Filtering} + + Another common filtering method selects rows based on whether the + spatial position associated with each row is located within a given + 2-dimensional region. The syntax for this high-level filter is + +\begin{verbatim} + regfilter( "regfilename" [ , Xexpr, Yexpr [ , "wcs cols" ] ] ) +\end{verbatim} + where each "[]" demarks optional parameters. The region file name + is required and must be enclosed in quotes. The remaining + parameters are optional. The region file is an ASCII text file + which contains a list of one or more geometric shapes (circle, + ellipse, box, etc.) which defines a region on the celestial sphere + or an area within a particular 2D image. The region file is + typically generated using an image display program such as fv/POW + (distribute by the HEASARC), or ds9 (distributed by the Smithsonian + Astrophysical Observatory). Users should refer to the documentation + provided with these programs for more details on the syntax used in + the region files. + + In its simpliest form, (e.g., regfilter("region.reg") ) the + coordinates in the default 'X' and 'Y' columns will be used to + determine if each row is inside or outside the area specified in + the region file. Alternate position column names, or expressions, + may be entered if needed, as in + +\begin{verbatim} + regfilter("region.reg", XPOS, YPOS) +\end{verbatim} + Region filtering can be applied most unambiguously if the positions + in the region file and in the table to be filtered are both give in + terms of absolute celestial coordinate units. In this case the + locations and sizes of the geometric shapes in the region file are + specified in angular units on the sky (e.g., positions given in + R.A. and Dec. and sizes in arcseconds or arcminutes). Similarly, + each row of the filtered table will have a celestial coordinate + associated with it. This association is usually implemented using + a set of so-called 'World Coordinate System' (or WCS) FITS keywords + that define the coordinate transformation that must be applied to + the values in the 'X' and 'Y' columns to calculate the coordinate. + + Alternatively, one can perform spatial filtering using unitless + 'pixel' coordinates for the regions and row positions. In this + case the user must be careful to ensure that the positions in the 2 + files are self-consistent. A typical problem is that the region + file may be generated using a binned image, but the unbinned + coordinates are given in the event table. The ROSAT events files, + for example, have X and Y pixel coordinates that range from 1 - + 15360. These coordinates are typically binned by a factor of 32 to + produce a 480x480 pixel image. If one then uses a region file + generated from this image (in image pixel units) to filter the + ROSAT events file, then the X and Y column values must be converted + to corresponding pixel units as in: + +\begin{verbatim} + regfilter("rosat.reg", X/32.+.5, Y/32.+.5) +\end{verbatim} + Note that this binning conversion is not necessary if the region + file is specified using celestial coordinate units instead of pixel + units because CFITSIO is then able to directly compare the + celestial coordinate of each row in the table with the celestial + coordinates in the region file without having to know anything + about how the image may have been binned. + + The last "wcs cols" parameter should rarely be needed. If supplied, + this string contains the names of the 2 columns (space or comma + separated) which have the associated WCS keywords. If not supplied, + the filter will scan the X and Y expressions for column names. + If only one is found in each expression, those columns will be + used, otherwise an error will be returned. + + These region shapes are supported (names are case insensitive): + +\begin{verbatim} + Point ( X1, Y1 ) <- One pixel square region + Line ( X1, Y1, X2, Y2 ) <- One pixel wide region + Polygon ( X1, Y1, X2, Y2, ... ) <- Rest are interiors with + Rectangle ( X1, Y1, X2, Y2, A ) | boundaries considered + Box ( Xc, Yc, Wdth, Hght, A ) V within the region + Diamond ( Xc, Yc, Wdth, Hght, A ) + Circle ( Xc, Yc, R ) + Annulus ( Xc, Yc, Rin, Rout ) + Ellipse ( Xc, Yc, Rx, Ry, A ) + Elliptannulus ( Xc, Yc, Rinx, Riny, Routx, Routy, Ain, Aout ) + Sector ( Xc, Yc, Amin, Amax ) +\end{verbatim} + where (Xc,Yc) is the coordinate of the shape's center; (X\#,Y\#) are + the coordinates of the shape's edges; Rxxx are the shapes' various + Radii or semimajor/minor axes; and Axxx are the angles of rotation + (or bounding angles for Sector) in degrees. For rotated shapes, the + rotation angle can be left off, indicating no rotation. Common + alternate names for the regions can also be used: rotbox = box; + rotrectangle = rectangle; (rot)rhombus = (rot)diamond; and pie + = sector. When a shape's name is preceded by a minus sign, '-', + the defined region is instead the area *outside* its boundary (ie, + the region is inverted). All the shapes within a single region + file are OR'd together to create the region, and the order is + significant. The overall way of looking at region files is that if + the first region is an excluded region then a dummy included region + of the whole detector is inserted in the front. Then each region + specification as it is processed overrides any selections inside of + that region specified by previous regions. Another way of thinking + about this is that if a previous excluded region is completely + inside of a subsequent included region the excluded region is + ignored. + + The positional coordinates may be given either in pixel units, + decimal degrees or hh:mm:ss.s, dd:mm:ss.s units. The shape sizes + may be given in pixels, degrees, arcminutes, or arcseconds. Look + at examples of region file produced by fv/POW or ds9 for further + details of the region file format. + + There are three functions that are primarily for use with SAO region + files and the FSAOI task, but they can be used directly. They + return a boolean true or false depending on whether a two + dimensional point is in the region or not: + +\begin{verbatim} + "point in a circular region" + circle(xcntr,ycntr,radius,Xcolumn,Ycolumn) + + "point in an elliptical region" + ellipse(xcntr,ycntr,xhlf_wdth,yhlf_wdth,rotation,Xcolumn,Ycolumn) + + "point in a rectangular region" + box(xcntr,ycntr,xfll_wdth,yfll_wdth,rotation,Xcolumn,Ycolumn) + + where + (xcntr,ycntr) are the (x,y) position of the center of the region + (xhlf_wdth,yhlf_wdth) are the (x,y) half widths of the region + (xfll_wdth,yfll_wdth) are the (x,y) full widths of the region + (radius) is half the diameter of the circle + (rotation) is the angle(degrees) that the region is rotated with + respect to (xcntr,ycntr) + (Xcoord,Ycoord) are the (x,y) coordinates to test, usually column + names + NOTE: each parameter can itself be an expression, not merely a + column name or constant. +\end{verbatim} + + +\subsection{Example Row Filters} + +\begin{verbatim} + [ binary && mag <= 5.0] - Extract all binary stars brighter + than fifth magnitude (note that + the initial space is necessary to + prevent it from being treated as a + binning specification) + + [#row >= 125 && #row <= 175] - Extract row numbers 125 through 175 + + [IMAGE[4,5] .gt. 100] - Extract all rows that have the + (4,5) component of the IMAGE column + greater than 100 + + [abs(sin(theta * #deg)) < 0.5] - Extract all rows having the + absolute value of the sine of theta + less than a half where the angles + are tabulated in degrees + + [SUM( SPEC > 3*BACKGRND )>=1] - Extract all rows containing a + spectrum, held in vector column + SPEC, with at least one value 3 + times greater than the background + level held in a keyword, BACKGRND + + [VCOL=={1,4,2}] - Extract all rows whose vector column + VCOL contains the 3-elements 1, 4, and + 2. + + [@rowFilter.txt] - Extract rows using the expression + contained within the text file + rowFilter.txt + + [gtifilter()] - Search the current file for a GTI + extension, filter the TIME + column in the current table, using + START/STOP times taken from + columns in the GTI extension + + [regfilter("pow.reg")] - Extract rows which have a coordinate + (as given in the X and Y columns) + within the spatial region specified + in the pow.reg region file. + + [regfilter("pow.reg", Xs, Ys)] - Same as above, except that the + Xs and Ys columns will be used to + determine the coordinate of each + row in the table. +\end{verbatim} + + +\section{ Binning or Histogramming Specification} + +The optional binning specifier is enclosed in square brackets and can +be distinguished from a general row filter specification by the fact +that it begins with the keyword 'bin' not immediately followed by an +equals sign. When binning is specified, a temporary N-dimensional FITS +primary array is created by computing the histogram of the values in +the specified columns of a FITS table extension. After the histogram +is computed the input FITS file containing the table is then closed and +the temporary FITS primary array is opened and passed to the +application program. Thus, the application program never sees the +original FITS table and only sees the image in the new temporary file +(which has no additional extensions). Obviously, the application +program must be expecting to open a FITS image and not a FITS table in +this case. + +The data type of the FITS histogram image may be specified by appending +'b' (for 8-bit byte), 'i' (for 16-bit integers), 'j' (for 32-bit +integer), 'r' (for 32-bit floating points), or 'd' (for 64-bit double +precision floating point) to the 'bin' keyword (e.g. '[binr X]' +creates a real floating point image). If the datatype is not +explicitly specified then a 32-bit integer image will be created by +default, unless the weighting option is also specified in which case +the image will have a 32-bit floating point data type by default. + +The histogram image may have from 1 to 4 dimensions (axes), depending +on the number of columns that are specified. The general form of the +binning specification is: + +\begin{verbatim} + [bin{bijrd} Xcol=min:max:binsize, Ycol= ..., Zcol=..., Tcol=...; weight] +\end{verbatim} +in which up to 4 columns, each corresponding to an axis of the image, +are listed. The column names are case insensitive, and the column +number may be given instead of the name, preceded by a pound sign +(e.g., [bin \#4=1:512]). If the column name is not specified, then +CFITSIO will first try to use the 'preferred column' as specified by +the CPREF keyword if it exists (e.g., 'CPREF = 'DETX,DETY'), otherwise +column names 'X', 'Y', 'Z', and 'T' will be assumed for each of the 4 +axes, respectively. In cases where the column name could be confused +with an arithmetic expression, enclose the column name in parentheses to +force the name to be interpreted literally. + +Each column name may be followed by an equals sign and then the lower +and upper range of the histogram, and the size of the histogram bins, +separated by colons. Spaces are allowed before and after the equals +sign but not within the 'min:max:binsize' string. The min, max and +binsize values may be integer or floating point numbers, or they may be +the names of keywords in the header of the table. If the latter, then +the value of that keyword is substituted into the expression. + +Default values for the min, max and binsize quantities will be +used if not explicitly given in the binning expression as shown +in these examples: + +\begin{verbatim} + [bin x = :512:2] - use default minimum value + [bin x = 1::2] - use default maximum value + [bin x = 1:512] - use default bin size + [bin x = 1:] - use default maximum value and bin size + [bin x = :512] - use default minimum value and bin size + [bin x = 2] - use default minimum and maximum values + [bin x] - use default minimum, maximum and bin size + [bin 4] - default 2-D image, bin size = 4 in both axes + [bin] - default 2-D image +\end{verbatim} +CFITSIO will use the value of the TLMINn, TLMAXn, and TDBINn keywords, +if they exist, for the default min, max, and binsize, respectively. If +they do not exist then CFITSIO will use the actual minimum and maximum +values in the column for the histogram min and max values. The default +binsize will be set to 1, or (max - min) / 10., whichever is smaller, +so that the histogram will have at least 10 bins along each axis. + +A shortcut notation is allowed if all the columns/axes have the same +binning specification. In this case all the column names may be listed +within parentheses, followed by the (single) binning specification, as +in: + +\begin{verbatim} + [bin (X,Y)=1:512:2] + [bin (X,Y) = 5] +\end{verbatim} + +The optional weighting factor is the last item in the binning specifier +and, if present, is separated from the list of columns by a +semi-colon. As the histogram is accumulated, this weight is used to +incremented the value of the appropriated bin in the histogram. If the +weighting factor is not specified, then the default weight = 1 is +assumed. The weighting factor may be a constant integer or floating +point number, or the name of a keyword containing the weighting value. +Or the weighting factor may be the name of a table column in which case +the value in that column, on a row by row basis, will be used. + +In some cases, the column or keyword may give the reciprocal of the +actual weight value that is needed. In this case, precede the weight +keyword or column name by a slash '/' to tell CFITSIO to use the +reciprocal of the value when constructing the histogram. + +For complex or commonly used histograms, one can also place its +description into a text file and import it into the binning +specification using the syntax '[bin @filename.txt]'. The file's +contents can extend over multiple lines, although it must still +conform to the no-spaces rule for the min:max:binsize syntax and each +axis specification must still be comma-separated. Any lines in the +external text file that begin with 2 slash characters ('//') will be +ignored and may be used to add comments into the file. + + Examples: + + +\begin{verbatim} + [bini detx, dety] - 2-D, 16-bit integer histogram + of DETX and DETY columns, using + default values for the histogram + range and binsize + + [bin (detx, dety)=16; /exposure] - 2-D, 32-bit real histogram of DETX + and DETY columns with a bin size = 16 + in both axes. The histogram values + are divided by the EXPOSURE keyword + value. + + [bin time=TSTART:TSTOP:0.1] - 1-D lightcurve, range determined by + the TSTART and TSTOP keywords, + with 0.1 unit size bins. + + [bin pha, time=8000.:8100.:0.1] - 2-D image using default binning + of the PHA column for the X axis, + and 1000 bins in the range + 8000. to 8100. for the Y axis. + + [bin @binFilter.txt] - Use the contents of the text file + binFilter.txt for the binning + specifications. + +\end{verbatim} + + +\chapter{Template Files } + +When a new FITS file is created with a call to fits\_create\_file, the +name of a template file may be supplied in parentheses immediately +following the name of the new file to be created. This template is +used to define the structure of one or more HDUs in the new file. The +template file may be another FITS file, in which case the newly created +file will have exactly the same keywords in each HDU as in the template +FITS file, but all the data units will be filled with zeros. The +template file may also be an ASCII text file, where each line (in +general) describes one FITS keyword record. The format of the ASCII +template file is described in the following sections. + + +\section{Detailed Template Line Format} + +The format of each ASCII template line closely follows the format of a +FITS keyword record: + +\begin{verbatim} + KEYWORD = KEYVALUE / COMMENT +\end{verbatim} +except that free format may be used (e.g., the equals sign may appear +at any position in the line) and TAB characters are allowed and are +treated the same as space characters. The KEYVALUE and COMMENT fields +are optional. The equals sign character is also optional, but it is +recommended that it be included for clarity. Any template line that +begins with the pound '\#' character is ignored by the template parser +and may be use to insert comments into the template file itself. + +The KEYWORD name field is limited to 8 characters in length and only +the letters A-Z, digits 0-9, and the hyphen and underscore characters +may be used, without any embedded spaces. Lowercase letters in the +template keyword name will be converted to uppercase. Leading spaces +in the template line preceding the keyword name are generally ignored, +except if the first 8 characters of a template line are all blank, then +the entire line is treated as a FITS comment keyword (with a blank +keyword name) and is copied verbatim into the FITS header. + +The KEYVALUE field may have any allowed FITS data type: character +string, logical, integer, real, complex integer, or complex real. The +character string values need not be enclosed in single quote characters +unless they are necessary to distinguish the string from a different +data type (e.g. 2.0 is a real but '2.0' is a string). The keyword has +an undefined (null) value if the template record only contains blanks +following the "=" or between the "=" and the "/" comment field +delimiter. + +String keyword values longer than 68 characters (the maximum length +that will fit in a single FITS keyword record) are permitted using the +CFITSIO long string convention. They can either be specified as a +single long line in the template, or by using multiple lines where the +continuing lines contain the 'CONTINUE' keyword, as in this example: + +\begin{verbatim} + LONGKEY = 'This is a long string value that is contin&' + CONTINUE 'ued over 2 records' / comment field goes here +\end{verbatim} +The format of template lines with CONTINUE keyword is very strict: 3 +spaces must follow CONTINUE and the rest of the line is copied verbatim +to the FITS file. + +The start of the optional COMMENT field must be preceded by "/", which +is used to separate it from the keyword value field. Exceptions are if +the KEYWORD name field contains COMMENT, HISTORY, CONTINUE, or if the +first 8 characters of the template line are blanks. + +More than one Header-Data Unit (HDU) may be defined in the template +file. The start of an HDU definition is denoted with a SIMPLE or +XTENSION template line: + +1) SIMPLE begins a Primary HDU definition. SIMPLE may only appear as +the first keyword in the template file. If the template file begins +with XTENSION instead of SIMPLE, then a default empty Primary HDU is +created, and the template is then assumed to define the keywords +starting with the first extension following the Primary HDU. + +2) XTENSION marks the beginning of a new extension HDU definition. The +previous HDU will be closed at this point and processing of the next +extension begins. + + +\section{Auto-indexing of Keywords} + +If a template keyword name ends with a "\#" character, it is said to be +'auto-indexed'. Each "\#" character will be replaced by the current +integer index value, which gets reset = 1 at the start of each new HDU +in the file (or 7 in the special case of a GROUP definition). The +FIRST indexed keyword in each template HDU definition is used as the +'incrementor'; each subsequent occurrence of this SAME keyword will +cause the index value to be incremented. This behavior can be rather +subtle, as illustrated in the following examples in which the TTYPE +keyword is the incrementor in both cases: + +\begin{verbatim} + TTYPE# = TIME + TFORM# = 1D + TTYPE# = RATE + TFORM# = 1E +\end{verbatim} +will create TTYPE1, TFORM1, TTYPE2, and TFORM2 keywords. But if the +template looks like, + +\begin{verbatim} + TTYPE# = TIME + TTYPE# = RATE + TFORM# = 1D + TFORM# = 1E +\end{verbatim} +this results in a FITS files with TTYPE1, TTYPE2, TFORM2, and TFORM2, +which is probably not what was intended! + + +\section{Template Parser Directives} + +In addition to the template lines which define individual keywords, the +template parser recognizes 3 special directives which are each preceded +by the backslash character: \verb+ \include, \group+, and \verb+ \end+. + +The 'include' directive must be followed by a filename. It forces the +parser to temporarily stop reading the current template file and begin +reading the include file. Once the parser reaches the end of the +include file it continues parsing the current template file. Include +files can be nested, and HDU definitions can span multiple template +files. + +The start of a GROUP definition is denoted with the 'group' directive, +and the end of a GROUP definition is denoted with the 'end' directive. +Each GROUP contains 0 or more member blocks (HDUs or GROUPs). Member +blocks of type GROUP can contain their own member blocks. The GROUP +definition itself occupies one FITS file HDU of special type (GROUP +HDU), so if a template specifies 1 group with 1 member HDU like: + +\begin{verbatim} +\group +grpdescr = 'demo' +xtension bintable +# this bintable has 0 cols, 0 rows +\end +\end{verbatim} +then the parser creates a FITS file with 3 HDUs : + +\begin{verbatim} +1) dummy PHDU +2) GROUP HDU (has 1 member, which is bintable in HDU number 3) +3) bintable (member of GROUP in HDU number 2) +\end{verbatim} +Technically speaking, the GROUP HDU is a BINTABLE with 6 columns. Applications +can define additional columns in a GROUP HDU using TFORMn and TTYPEn +(where n is 7, 8, ....) keywords or their auto-indexing equivalents. + +For a more complicated example of a template file using the group directives, +look at the sample.tpl file that is included in the CFITSIO distribution. + + +\section{Formal Template Syntax} + +The template syntax can formally be defined as follows: + +\begin{verbatim} + TEMPLATE = BLOCK [ BLOCK ... ] + + BLOCK = { HDU | GROUP } + + GROUP = \GROUP [ BLOCK ... ] \END + + HDU = XTENSION [ LINE ... ] { XTENSION | \GROUP | \END | EOF } + + LINE = [ KEYWORD [ = ] ] [ VALUE ] [ / COMMENT ] + + X ... - X can be present 1 or more times + { X | Y } - X or Y + [ X ] - X is optional +\end{verbatim} + +At the topmost level, the template defines 1 or more template blocks. Blocks +can be either HDU (Header Data Unit) or a GROUP. For each block the parser +creates 1 (or more for GROUPs) FITS file HDUs. + + + +\section{Errors} + +In general the fits\_execute\_template() function tries to be as atomic +as possible, so either everything is done or nothing is done. If an +error occurs during parsing of the template, fits\_execute\_template() +will (try to) delete the top level BLOCK (with all its children if any) +in which the error occurred, then it will stop reading the template file +and it will return with an error. + + +\section{Examples} + +1. This template file will create a 200 x 300 pixel image, with 4-byte +integer pixel values, in the primary HDU: + +\begin{verbatim} + SIMPLE = T + BITPIX = 32 + NAXIS = 2 / number of dimensions + NAXIS1 = 100 / length of first axis + NAXIS2 = 200 / length of second axis + OBJECT = NGC 253 / name of observed object +\end{verbatim} +The allowed values of BITPIX are 8, 16, 32, -32, or -64, +representing, respectively, 8-bit integer, 16-bit integer, 32-bit +integer, 32-bit floating point, or 64 bit floating point pixels. + +2. To create a FITS table, the template first needs to include +XTENSION = TABLE or BINTABLE to define whether it is an ASCII or binary +table, and NAXIS2 to define the number of rows in the table. Two +template lines are then needed to define the name (TTYPEn) and FITS data +format (TFORMn) of the columns, as in this example: + +\begin{verbatim} + xtension = bintable + naxis2 = 40 + ttype# = Name + tform# = 10a + ttype# = Npoints + tform# = j + ttype# = Rate + tunit# = counts/s + tform# = e +\end{verbatim} +The above example defines a null primary array followed by a 40-row +binary table extension with 3 columns called 'Name', 'Npoints', and +'Rate', with data formats of '10A' (ASCII character string), '1J' +(integer) and '1E' (floating point), respectively. Note that the other +required FITS keywords (BITPIX, NAXIS, NAXIS1, PCOUNT, GCOUNT, TFIELDS, +and END) do not need to be explicitly defined in the template because +their values can be inferred from the other keywords in the template. +This example also illustrates that the templates are generally +case-insensitive (the keyword names and TFORMn values are converted to +upper-case in the FITS file) and that string keyword values generally +do not need to be enclosed in quotes. + + +\chapter{ Summary of all FITSIO User-Interface Subroutines } + + Error Status Routines page~\pageref{FTVERS} + +\begin{verbatim} + FTVERS( > version) + FTGERR(status, > errtext) + FTGMSG( > errmsg) + FTRPRT (stream, > status) + FTPMSG(errmsg) + FTPMRK + FTCMSG + FTCMRK +\end{verbatim} + FITS File Open and Close Subroutines: page~\pageref{FTOPEN} + +\begin{verbatim} + FTOPEN(unit,filename,rwmode, > blocksize,status) + FTDKOPEN(unit,filename,rwmode, > blocksize,status) + FTNOPN(unit,filename,rwmode, > status) + FTDOPN(unit,filename,rwmode, > status) + FTTOPN(unit,filename,rwmode, > status) + FTIOPN(unit,filename,rwmode, > status) + FTREOPEN(unit, > newunit, status) + FTINIT(unit,filename,blocksize, > status) + FTDKINIT(unit,filename,blocksize, > status) + FTTPLT(unit, filename, tplfilename, > status) + FTFLUS(unit, > status) + FTCLOS(unit, > status) + FTDELT(unit, > status) + FTGIOU( > iounit, status) + FTFIOU(iounit, > status) + CFITS2Unit(fitsfile *ptr) (C routine) + CUnit2FITS(int unit) (C routine) + FTEXTN(filename, > nhdu, status) + FTFLNM(unit, > filename, status) + FTFLMD(unit, > iomode, status) + FFURLT(unit, > urltype, status) + FTIURL(filename, > filetype, infile, outfile, extspec, filter, + binspec, colspec, status) + FTRTNM(filename, > rootname, status) + FTEXIST(filename, > exist, status) +\end{verbatim} + HDU-Level Operations: page~\pageref{FTMAHD} + +\begin{verbatim} + FTMAHD(unit,nhdu, > hdutype,status) + FTMRHD(unit,nmove, > hdutype,status) + FTGHDN(unit, > nhdu) + FTMNHD(unit, hdutype, extname, extver, > status) + FTGHDT(unit, > hdutype, status) + FTTHDU(unit, > hdunum, status) + FTCRHD(unit, > status) + FTIIMG(unit,bitpix,naxis,naxes, > status) + FTITAB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTIBIN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTRSIM(unit,bitpix,naxis,naxes,status) + FTDHDU(unit, > hdutype,status) + FTCPFL(iunit,ounit,previous, current, following, > status) + FTCOPY(iunit,ounit,morekeys, > status) + FTCPHD(inunit, outunit, > status) + FTCPDT(iunit,ounit, > status) +\end{verbatim} + Subroutines to specify or modify the structure of the CHDU: page~\pageref{FTRDEF} + +\begin{verbatim} + FTRDEF(unit, > status) (DEPRECATED) + FTPDEF(unit,bitpix,naxis,naxes,pcount,gcount, > status) (DEPRECATED) + FTADEF(unit,rowlen,tfields,tbcol,tform,nrows > status) (DEPRECATED) + FTBDEF(unit,tfields,tform,varidat,nrows > status) (DEPRECATED) + FTDDEF(unit,bytlen, > status) (DEPRECATED) + FTPTHP(unit,theap, > status) +\end{verbatim} + Header Space and Position Subroutines: page~\pageref{FTHDEF} + +\begin{verbatim} + FTHDEF(unit,morekeys, > status) + FTGHSP(iunit, > keysexist,keysadd,status) + FTGHPS(iunit, > keysexist,key_no,status) +\end{verbatim} + Read or Write Standard Header Subroutines: page~\pageref{FTPHPR} + +\begin{verbatim} + FTPHPS(unit,bitpix,naxis,naxes, > status) + FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status) + FTGHPR(unit,maxdim, > simple,bitpix,naxis,naxes,pcount,gcount,extend, + status) + FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > + status) + FTGHTB(unit,maxdim, > rowlen,nrows,tfields,ttype,tbcol,tform,tunit, + extname,status) + FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status) + FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat, + status) +\end{verbatim} + Write Keyword Subroutines: page~\pageref{FTPREC} + +\begin{verbatim} + FTPREC(unit,card, > status) + FTPCOM(unit,comment, > status) + FTPHIS(unit,history, > status) + FTPDAT(unit, > status) + FTPKY[JKLS](unit,keyword,keyval,comment, > status) + FTPKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTPKLS(unit,keyword,keyval,comment, > status) + FTPLSW(unit, > status) + FTPKYU(unit,keyword,comment, > status) + FTPKN[JKLS](unit,keyroot,startno,no_keys,keyvals,comments, > status) + FTPKN[EDFG](unit,keyroot,startno,no_keys,keyvals,decimals,comments, > + status) + FTCPKYinunit, outunit, innum, outnum, keyroot, > status) + FTPKYT(unit,keyword,intval,dblval,comment, > status) + FTPKTP(unit, filename, > status) + FTPUNT(unit,keyword,units, > status) +\end{verbatim} + Insert Keyword Subroutines: page~\pageref{FTIREC} + +\begin{verbatim} + FTIREC(unit,key_no,card, > status) + FTIKY[JKLS](unit,keyword,keyval,comment, > status) + FTIKLS(unit,keyword,keyval,comment, > status) + FTIKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTIKYU(unit,keyword,comment, > status) +\end{verbatim} + Read Keyword Subroutines: page~\pageref{FTGREC} + +\begin{verbatim} + FTGREC(unit,key_no, > card,status) + FTGKYN(unit,key_no, > keyword,value,comment,status) + FTGCRD(unit,keyword, > card,status) + FTGNXK(unit,inclist,ninc,exclist,nexc, > card,status) + FTGKEY(unit,keyword, > value,comment,status) + FTGKY[EDJKLS](unit,keyword, > keyval,comment,status) + FTGKN[EDJKLS](unit,keyroot,startno,max_keys, > keyvals,nfound,status) + FTGKYT(unit,keyword, > intval,dblval,comment,status) + FTGUNT(unit,keyword, > units,status) +\end{verbatim} + Modify Keyword Subroutines: page~\pageref{FTMREC} + +\begin{verbatim} + FTMREC(unit,key_no,card, > status) + FTMCRD(unit,keyword,card, > status) + FTMNAM(unit,oldkey,keyword, > status) + FTMCOM(unit,keyword,comment, > status) + FTMKY[JKLS](unit,keyword,keyval,comment, > status) + FTMKLS(unit,keyword,keyval,comment, > status) + FTMKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTMKYU(unit,keyword,comment, > status) +\end{verbatim} + Update Keyword Subroutines: page~\pageref{FTUCRD} + +\begin{verbatim} + FTUCRD(unit,keyword,card, > status) + FTUKY[JKLS](unit,keyword,keyval,comment, > status) + FTUKLS(unit,keyword,keyval,comment, > status) + FTUKY[EDFG](unit,keyword,keyval,decimals,comment, > status) + FTUKYU(unit,keyword,comment, > status) +\end{verbatim} + Delete Keyword Subroutines: page~\pageref{FTDREC} + +\begin{verbatim} + FTDREC(unit,key_no, > status) + FTDKEY(unit,keyword, > status) +\end{verbatim} + Define Data Scaling Parameters and Undefined Pixel Flags: page~\pageref{FTPSCL} + +\begin{verbatim} + FTPSCL(unit,bscale,bzero, > status) + FTTSCL(unit,colnum,tscal,tzero, > status) + FTPNUL(unit,blank, > status) + FTSNUL(unit,colnum,snull > status) + FTTNUL(unit,colnum,tnull > status) +\end{verbatim} + FITS Primary Array or IMAGE Extension I/O Subroutines: page~\pageref{FTPPR} + +\begin{verbatim} + FTGIDT(unit, > bitpix,status) + FTGIET(unit, > bitpix,status) + FTGIDM(unit, > naxis,status) + FTGISZ(unit, maxdim, > naxes,status) + FTGIPR(unit, maxdim, > bitpix,naxis,naxes,status) + FTPPR[BIJKED](unit,group,fpixel,nelements,values, > status) + FTPPN[BIJKED](unit,group,fpixel,nelements,values,nullval > status) + FTPPRU(unit,group,fpixel,nelements, > status) + FTGPV[BIJKED](unit,group,fpixel,nelements,nullval, > values,anyf,status) + FTGPF[BIJKED](unit,group,fpixel,nelements, > values,flagvals,anyf,status) + FTPGP[BIJKED](unit,group,fparm,nparm,values, > status) + FTGGP[BIJKED](unit,group,fparm,nparm, > values,status) + FTP2D[BIJKED](unit,group,dim1,naxis1,naxis2,image, > status) + FTP3D[BIJKED](unit,group,dim1,dim2,naxis1,naxis2,naxis3,cube, > status) + FTG2D[BIJKED](unit,group,nullval,dim1,naxis1,naxis2, > image,anyf,status) + FTG3D[BIJKED](unit,group,nullval,dim1,dim2,naxis1,naxis2,naxis3, > + cube,anyf,status) + FTPSS[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,array, > status) + FTGSV[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) + FTGSF[BIJKED](unit,group,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) +\end{verbatim} + Table Column Information Subroutines: page~\pageref{FTGCNO} + +\begin{verbatim} + FTGNRW(unit, > nrows, status) + FTGNCL(unit, > ncols, status) + FTGCNO(unit,casesen,coltemplate, > colnum,status) + FTGCNN(unit,casesen,coltemplate, > colnam,colnum,status) + FTGTCL(unit,colnum, > datacode,repeat,width,status) + FTEQTY(unit,colnum, > datacode,repeat,width,status) + FTGCDW(unit,colnum, > dispwidth,status) + FTGACL(unit,colnum, > + ttype,tbcol,tunit,tform,tscal,tzero,snull,tdisp,status) + FTGBCL(unit,colnum, > + ttype,tunit,datatype,repeat,tscal,tzero,tnull,tdisp,status) + FTPTDM(unit,colnum,naxis,naxes, > status) + FTGTDM(unit,colnum,maxdim, > naxis,naxes,status) + FTDTDM(unit,tdimstr,colnum,maxdim, > naxis,naxes, status) + FFGRSZ(unit, > nrows,status) +\end{verbatim} + Low-Level Table Access Subroutines: page~\pageref{FTGTBS} + +\begin{verbatim} + FTGTBS(unit,frow,startchar,nchars, > string,status) + FTPTBS(unit,frow,startchar,nchars,string, > status) + FTGTBB(unit,frow,startchar,nchars, > array,status) + FTPTBB(unit,frow,startchar,nchars,array, > status) +\end{verbatim} + Edit Rows or Columns page~\pageref{FTIROW} + +\begin{verbatim} + FTIROW(unit,frow,nrows, > status) + FTDROW(unit,frow,nrows, > status) + FTDRRG(unit,rowrange, > status) + FTDRWS(unit,rowlist,nrows, > status) + FTICOL(unit,colnum,ttype,tform, > status) + FTICLS(unit,colnum,ncols,ttype,tform, > status) + FTMVEC(unit,colnum,newveclen, > status) + FTDCOL(unit,colnum, > status) + FTCPCL(inunit,outunit,incolnum,outcolnum,createcol, > status); +\end{verbatim} + Read and Write Column Data Routines page~\pageref{FTPCLS} + +\begin{verbatim} + FTPCL[SLBIJKEDCM](unit,colnum,frow,felem,nelements,values, > status) + FTPCN[BIJKED](unit,colnum,frow,felem,nelements,values,nullval > status) + FTPCLX(unit,colnum,frow,fbit,nbit,lray, > status) + FTPCLU(unit,colnum,frow,felem,nelements, > status) + FTGCL(unit,colnum,frow,felem,nelements, > values,status) + FTGCV[SBIJKEDCM](unit,colnum,frow,felem,nelements,nullval, > + values,anyf,status) + FTGCF[SLBIJKEDCM](unit,colnum,frow,felem,nelements, > + values,flagvals,anyf,status) + FTGSV[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs,nullval, > + array,anyf,status) + FTGSF[BIJKED](unit,colnum,naxis,naxes,fpixels,lpixels,incs, > + array,flagvals,anyf,status) + FTGCX(unit,colnum,frow,fbit,nbit, > lray,status) + FTGCX[IJD](unit,colnum,frow,nrows,fbit,nbit, > array,status) + FTGDES(unit,colnum,rownum, > nelements,offset,status) + FTPDES(unit,colnum,rownum,nelements,offset, > status) +\end{verbatim} + Row Selection and Calculator Routines: page~\pageref{FTFROW} + +\begin{verbatim} + FTFROW(unit,expr,firstrow, nrows, > n_good_rows, row_status, status) + FTFFRW(unit, expr, > rownum, status) + FTSROW(inunit, outunit, expr, > status ) + FTCROW(unit,datatype,expr,firstrow,nelements,nulval, > + array,anynul,status) + FTCALC(inunit, expr, outunit, parName, parInfo, > status) + FTCALC_RNG(inunit, expr, outunit, parName, parInfo, + nranges, firstrow, lastrow, > status) + FTTEXP(unit, expr, > datatype, nelem, naxis, naxes, status) +\end{verbatim} + Celestial Coordinate System Subroutines: page~\pageref{FTGICS} + +\begin{verbatim} + FTGICS(unit, > xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) + FTGTCS(unit,xcol,ycol, > + xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status) + FTWLDP(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpos,ypos,status) + FTXYPX(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + coordtype, > xpix,ypix,status) +\end{verbatim} + File Checksum Subroutines: page~\pageref{FTPCKS} + +\begin{verbatim} + FTPCKS(unit, > status) + FTUCKS(unit, > status) + FTVCKS(unit, > dataok,hduok,status) + FTGCKS(unit, > datasum,hdusum,status) + FTESUM(sum,complement, > checksum) + FTDSUM(checksum,complement, > sum) + +\end{verbatim} + Time and Date Utility Subroutines: page~\pageref{FTGSDT} + +\begin{verbatim} + FTGSDT( > day, month, year, status ) + FTGSTM(> datestr, timeref, status) + FTDT2S( year, month, day, > datestr, status) + FTTM2S( year, month, day, hour, minute, second, decimals, + > datestr, status) + FTS2DT(datestr, > year, month, day, status) + FTS2TM(datestr, > year, month, day, hour, minute, second, status) +\end{verbatim} + General Utility Subroutines: page~\pageref{FTGHAD} + +\begin{verbatim} + FTGHAD(unit, > curaddr,nextaddr) + FTUPCH(string) + FTCMPS(str_template,string,casesen, > match,exact) + FTTKEY(keyword, > status) + FTTREC(card, > status) + FTNCHK(unit, > status) + FTGKNM(unit, > keyword, keylength, status) + FTPSVC(card, > value,comment,status) + FTKEYN(keyroot,seq_no, > keyword,status) + FTNKEY(seq_no,keyroot, > keyword,status) + FTDTYP(value, > dtype,status) + class = FTGKCL(card) + FTASFM(tform, > datacode,width,decimals,status) + FTBNFM(tform, > datacode,repeat,width,status) + FTGABC(tfields,tform,space, > rowlen,tbcol,status) + FTGTHD(template, > card,hdtype,status) + FTRWRG(rowlist, maxrows, maxranges, > numranges, rangemin, + rangemax, status) +\end{verbatim} + +\chapter{ Parameter Definitions } + +\begin{verbatim} +anyf - (logical) set to TRUE if any of the returned data values are undefined +array - (any datatype except character) array of bytes to be read or written. +bitpix - (integer) bits per pixel: 8, 16, 32, -32, or -64 +blank - (integer) value used for undefined pixels in integer primary array +blank - (integer*8) value used for undefined pixels in integer primary array +blocksize - (integer) 2880-byte logical record blocking factor + (if 0 < blocksize < 11) or the actual block size in bytes + (if 10 < blocksize < 28800). As of version 3.3 of FITSIO, + blocksizes greater than 2880 are no longer supported. +bscale - (double precision) scaling factor for the primary array +bytlen - (integer) length of the data unit, in bytes +bzero - (double precision) zero point for primary array scaling +card - (character*80) header record to be read or written +casesen - (logical) will string matching be case sensitive? +checksum - (character*16) encoded checksum string +colname - (character) ASCII name of the column +colnum - (integer) number of the column (first column = 1) +coltemplate - (character) template string to be matched to column names +comment - (character) the keyword comment field +comments - (character array) keyword comment fields +compid - (integer) the type of computer that the program is running on +complement - (logical) should the checksum be complemented? +coordtype - (character) type of coordinate projection (-SIN, -TAN, -ARC, + -NCP, -GLS, -MER, or -AIT) +cube - 3D data cube of the appropriate datatype +curaddr - (integer) starting address (in bytes) of the CHDU +current - (integer) if not equal to 0, copy the current HDU +datacode - (integer) symbolic code of the binary table column datatype +dataok - (integer) was the data unit verification successful (=1) or + not (= -1). Equals zero if the DATASUM keyword is not present. +datasum - (double precision) 32-bit 1's complement checksum for the data unit +datatype - (character) datatype (format) of the binary table column +datestr - (string) FITS date/time string: 'YYYY-MM-DDThh:mm:ss.ddd', + 'YYYY-MM-dd', or 'dd/mm/yy' +day - (integer) current day of the month +dblval - (double precision) fractional part of the keyword value +decimals - (integer) number of decimal places to be displayed +dim1 - (integer) actual size of the first dimension of the image or cube array +dim2 - (integer) actual size of the second dimension of the cube array +dispwidth - (integer) - the display width (length of string) for a column +dtype - (character) datatype of the keyword ('C', 'L', 'I', or 'F') + C = character string + L = logical + I = integer + F = floating point number +errmsg - (character*80) oldest error message on the internal stack +errtext - (character*30) descriptive error message corresponding to error number +casesen - (logical) true if column name matching is case sensitive +exact - (logical) do the strings match exactly, or were wildcards used? +exclist (character array) list of names to be excluded from search +exists - flag indicating whether the file or compressed file exists on disk +extend - (logical) true if there may be extensions following the primary data +extname - (character) value of the EXTNAME keyword (if not blank) +fbit - (integer) first bit in the field to be read or written +felem - (integer) first pixel of the element vector (ignored for ASCII tables) +filename - (character) name of the FITS file +flagvals - (logical array) True if corresponding data element is undefined +following - (integer) if not equal to 0, copy all following HDUs in the input file +fparm - (integer) sequence number of the first group parameter to read or write +fpixel - (integer) the first pixel position +fpixels - (integer array) the first included pixel in each dimension +frow - (integer) beginning row number (first row of table = 1) +frowll - (integer*8) beginning row number (first row of table = 1) +gcount - (integer) value of the GCOUNT keyword (usually = 1) +group - (integer) sequence number of the data group (=0 for non-grouped data) +hdtype - (integer) header record type: -1=delete; 0=append or replace; + 1=append; 2=this is the END keyword +hduok - (integer) was the HDU verification successful (=1) or + not (= -1). Equals zero if the CHECKSUM keyword is not present. +hdusum - (double precision) 32 bit 1's complement checksum for the entire CHDU +hdutype - (integer) type of HDU: 0 = primary array or IMAGE, 1 = ASCII table, + 2 = binary table, -1 = any HDU type or unknown type +history - (character) the HISTORY keyword comment string +hour - (integer) hour from 0 - 23 +image - 2D image of the appropriate datatype +inclist (character array) list of names to be included in search +incs - (integer array) sampling interval for pixels in each FITS dimension +intval - (integer) integer part of the keyword value +iounit - (integer) value of an unused I/O unit number +iunit - (integer) logical unit number associated with the input FITS file, 1-199 +key_no - (integer) sequence number (starting with 1) of the keyword record +keylength - (integer) length of the keyword name +keyroot - (character) root string for the keyword name +keysadd -(integer) number of new keyword records which can fit in the CHU +keysexist - (integer) number of existing keyword records in the CHU +keyval - value of the keyword in the appropriate datatype +keyvals - (array) value of the keywords in the appropriate datatype +keyword - (character*8) name of a keyword +lray - (logical array) array of logical values corresponding to the bit array +lpixels - (integer array) the last included pixel in each dimension +match - (logical) do the 2 strings match? +maxdim - (integer) dimensioned size of the NAXES, TTYPE, TFORM or TUNIT arrays +max_keys - (integer) maximum number of keywords to search for +minute - (integer) minute of an hour (0 - 59) +month - (integer) current month of the year (1 - 12) +morekeys - (integer) will leave space in the header for this many more keywords +naxes - (integer array) size of each dimension in the FITS array +naxesll - (integer*8 array) size of each dimension in the FITS array +naxis - (integer) number of dimensions in the FITS array +naxis1 - (integer) length of the X/first axis of the FITS array +naxis2 - (integer) length of the Y/second axis of the FITS array +naxis3 - (integer) length of the Z/third axis of the FITS array +nbit - (integer) number of bits in the field to read or write +nchars - (integer) number of characters to read and return +ncols - (integer) number of columns +nelements - (integer) number of data elements to read or write +nelementsll - (integer*8) number of data elements to read or write +nexc (integer) number of names in the exclusion list (may = 0) +nhdu - (integer) absolute number of the HDU (1st HDU = 1) +ninc (integer) number of names in the inclusion list +nmove - (integer) number of HDUs to move (+ or -), relative to current position +nfound - (integer) number of keywords found (highest keyword number) +no_keys - (integer) number of keywords to write in the sequence +nparm - (integer) number of group parameters to read or write +nrows - (integer) number of rows in the table +nrowsll - (integer*8) number of rows in the table +nullval - value to represent undefined pixels, of the appropriate datatype +nextaddr - (integer) starting address (in bytes) of the HDU following the CHDU +offset - (integer) byte offset in the heap to the first element of the array +offsetll - (integer*8) byte offset in the heap to the first element of the array +oldkey - (character) old name of keyword to be modified +ounit - (integer) logical unit number associated with the output FITS file 1-199 +pcount - (integer) value of the PCOUNT keyword (usually = 0) +previous - (integer) if not equal to 0, copy all previous HDUs in the input file +repeat - (integer) length of element vector (e.g. 12J); ignored for ASCII table +rot - (double precision) celestial coordinate rotation angle (degrees) +rowlen - (integer) length of a table row, in characters or bytes +rowlenll - (integer*8) length of a table row, in characters or bytes +rowlist - (integer array) list of row numbers to be deleted in increasing order +rownum - (integer) number of the row (first row = 1) +rowrange- (string) list of rows or row ranges to be deleted +rwmode - (integer) file access mode: 0 = readonly, 1 = readwrite +second (double)- second within minute (0 - 60.9999999999) (leap second!) +seq_no - (integer) the sequence number to append to the keyword root name +simple - (logical) does the FITS file conform to all the FITS standards +snull - (character) value used to represent undefined values in ASCII table +space - (integer) number of blank spaces to leave between ASCII table columns +startchar - (integer) first character in the row to be read +startno - (integer) value of the first keyword sequence number (usually 1) +status - (integer) returned error status code (0 = OK) +str_template (character) template string to be matched to reference string +stream - (character) output stream for the report: either 'STDOUT' or 'STDERR' +string - (character) character string +sum - (double precision) 32 bit unsigned checksum value +tbcol - (integer array) column number of the first character in the field(s) +tdisp - (character) Fortran type display format for the table column +template-(character) template string for a FITS header record +tfields - (integer) number of fields (columns) in the table +tform - (character array) format of the column(s); allowed values are: + For ASCII tables: Iw, Aw, Fww.dd, Eww.dd, or Dww.dd + For binary tables: rL, rX, rB, rI, rJ, rA, rAw, rE, rD, rC, rM + where 'w'=width of the field, 'd'=no. of decimals, 'r'=repeat count + Note that the 'rAw' form is non-standard extension to the + TFORM keyword syntax that is not specifically defined in the + Binary Tables definition document. +theap - (integer) zero indexed byte offset of starting address of the heap + relative to the beginning of the binary table data +tnull - (integer) value used to represent undefined values in binary table +tnullll - (integer*8) value used to represent undefined values in binary table +ttype - (character array) label for table column(s) +tscal - (double precision) scaling factor for table column +tunit - (character array) physical unit for table column(s) +tzero - (double precision) scaling zero point for table column +unit - (integer) logical unit number associated with the FITS file (1-199) +units - (character) the keyword units string (e.g., 'km/s') +value - (character) the keyword value string +values - array of data values of the appropriate datatype +varidat - (integer) size in bytes of the 'variable length data area' + following the binary table data (usually = 0) +version - (real) current revision number of the library +width - (integer) width of the character string field +xcol - (integer) number of the column containing the X coordinate values +xinc - (double precision) X axis coordinate increment at reference pixel (deg) +xpix - (double precision) X axis pixel location +xpos - (double precision) X axis celestial coordinate (usually RA) (deg) +xrpix - (double precision) X axis reference pixel array location +xrval - (double precision) X axis coordinate value at the reference pixel (deg) +ycol - (integer) number of the column containing the X coordinate values +year - (integer) last 2 digits of the year (00 - 99) +yinc - (double precision) Y axis coordinate increment at reference pixel (deg) +ypix - (double precision) y axis pixel location +ypos - (double precision) y axis celestial coordinate (usually DEC) (deg) +yrpix - (double precision) Y axis reference pixel array location +yrval - (double precision) Y axis coordinate value at the reference pixel (deg) +\end{verbatim} + +\chapter{ FITSIO Error Status Codes } + +\begin{verbatim} +Status codes in the range -99 to -999 and 1 to 999 are reserved for future +FITSIO use. + + 0 OK, no error +101 input and output files are the same +103 too many FITS files open at once; all internal buffers full +104 error opening existing file +105 error creating new FITS file; (does a file with this name already exist?) +106 error writing record to FITS file +107 end-of-file encountered while reading record from FITS file +108 error reading record from file +110 error closing FITS file +111 internal array dimensions exceeded +112 Cannot modify file with readonly access +113 Could not allocate memory +114 illegal logical unit number; must be between 1 - 199, inclusive +115 NULL input pointer to routine +116 error seeking position in file + +121 invalid URL prefix on file name +122 tried to register too many IO drivers +123 driver initialization failed +124 matching driver is not registered +125 failed to parse input file URL +126 parse error in range list + +151 bad argument in shared memory driver +152 null pointer passed as an argument +153 no more free shared memory handles +154 shared memory driver is not initialized +155 IPC error returned by a system call +156 no memory in shared memory driver +157 resource deadlock would occur +158 attempt to open/create lock file failed +159 shared memory block cannot be resized at the moment + + +201 header not empty; can't write required keywords +202 specified keyword name was not found in the header +203 specified header record number is out of bounds +204 keyword value field is blank +205 keyword value string is missing the closing quote character +206 illegal indexed keyword name (e.g. 'TFORM1000') +207 illegal character in keyword name or header record +208 keyword does not have expected name. Keyword out of sequence? +209 keyword does not have expected integer value +210 could not find the required END header keyword +211 illegal BITPIX keyword value +212 illegal NAXIS keyword value +213 illegal NAXISn keyword value: must be 0 or positive integer +214 illegal PCOUNT keyword value +215 illegal GCOUNT keyword value +216 illegal TFIELDS keyword value +217 negative ASCII or binary table width value (NAXIS1) +218 negative number of rows in ASCII or binary table (NAXIS2) +219 column name (TTYPE keyword) not found +220 illegal SIMPLE keyword value +221 could not find the required SIMPLE header keyword +222 could not find the required BITPIX header keyword +223 could not find the required NAXIS header keyword +224 could not find all the required NAXISn keywords in the header +225 could not find the required XTENSION header keyword +226 the CHDU is not an ASCII table extension +227 the CHDU is not a binary table extension +228 could not find the required PCOUNT header keyword +229 could not find the required GCOUNT header keyword +230 could not find the required TFIELDS header keyword +231 could not find all the required TBCOLn keywords in the header +232 could not find all the required TFORMn keywords in the header +233 the CHDU is not an IMAGE extension +234 illegal TBCOL keyword value; out of range +235 this operation only allowed for ASCII or BINARY table extension +236 column is too wide to fit within the specified width of the ASCII table +237 the specified column name template matched more than one column name +241 binary table row width is not equal to the sum of the field widths +251 unrecognizable type of FITS extension +252 unrecognizable FITS record +253 END keyword contains non-blank characters in columns 9-80 +254 Header fill area contains non-blank characters +255 Data fill area contains non-blank on non-zero values +261 unable to parse the TFORM keyword value string +262 unrecognizable TFORM datatype code +263 illegal TDIMn keyword value + +301 illegal HDU number; less than 1 or greater than internal buffer size +302 column number out of range (1 - 999) +304 attempt to move to negative file record number +306 attempted to read or write a negative number of bytes in the FITS file +307 illegal starting row number for table read or write operation +308 illegal starting element number for table read or write operation +309 attempted to read or write character string in non-character table column +310 attempted to read or write logical value in non-logical table column +311 illegal ASCII table TFORM format code for attempted operation +312 illegal binary table TFORM format code for attempted operation +314 value for undefined pixels has not been defined +317 attempted to read or write descriptor in a non-descriptor field +320 number of array dimensions out of range +321 first pixel number is greater than the last pixel number +322 attempt to set BSCALE or TSCALn scaling parameter = 0 +323 illegal axis length less than 1 + +340 NOT_GROUP_TABLE 340 Grouping function error +341 HDU_ALREADY_MEMBER +342 MEMBER_NOT_FOUND +343 GROUP_NOT_FOUND +344 BAD_GROUP_ID +345 TOO_MANY_HDUS_TRACKED +346 HDU_ALREADY_TRACKED +347 BAD_OPTION +348 IDENTICAL_POINTERS +349 BAD_GROUP_ATTACH +350 BAD_GROUP_DETACH + +360 NGP_NO_MEMORY malloc failed +361 NGP_READ_ERR read error from file +362 NGP_NUL_PTR null pointer passed as an argument. + Passing null pointer as a name of + template file raises this error +363 NGP_EMPTY_CURLINE line read seems to be empty (used + internally) +364 NGP_UNREAD_QUEUE_FULL cannot unread more then 1 line (or single + line twice) +365 NGP_INC_NESTING too deep include file nesting (infinite + loop, template includes itself ?) +366 NGP_ERR_FOPEN fopen() failed, cannot open template file +367 NGP_EOF end of file encountered and not expected +368 NGP_BAD_ARG bad arguments passed. Usually means + internal parser error. Should not happen +369 NGP_TOKEN_NOT_EXPECT token not expected here + +401 error attempting to convert an integer to a formatted character string +402 error attempting to convert a real value to a formatted character string +403 cannot convert a quoted string keyword to an integer +404 attempted to read a non-logical keyword value as a logical value +405 cannot convert a quoted string keyword to a real value +406 cannot convert a quoted string keyword to a double precision value +407 error attempting to read character string as an integer +408 error attempting to read character string as a real value +409 error attempting to read character string as a double precision value +410 bad keyword datatype code +411 illegal number of decimal places while formatting floating point value +412 numerical overflow during implicit datatype conversion +413 error compressing image +414 error uncompressing image +420 error in date or time conversion + +431 syntax error in parser expression +432 expression did not evaluate to desired type +433 vector result too large to return in array +434 data parser failed not sent an out column +435 bad data encounter while parsing column +436 parse error: output file not of proper type + +501 celestial angle too large for projection +502 bad celestial coordinate or pixel value +503 error in celestial coordinate calculation +504 unsupported type of celestial projection +505 required celestial coordinate keywords not found +506 approximate wcs keyword values were returned +\end{verbatim} +\end{document} diff --git a/software/cfitsio3040/fitsio.toc b/software/cfitsio3040/fitsio.toc new file mode 100644 index 000000000..f3d7971a7 --- /dev/null +++ b/software/cfitsio3040/fitsio.toc @@ -0,0 +1,92 @@ +\contentsline {chapter}{\numberline {1}Introduction }{1} +\contentsline {chapter}{\numberline {2} Creating FITSIO/CFITSIO }{3} +\contentsline {section}{\numberline {2.1}Building the Library}{3} +\contentsline {section}{\numberline {2.2}Testing the Library}{6} +\contentsline {section}{\numberline {2.3}Linking Programs with FITSIO}{7} +\contentsline {section}{\numberline {2.4}Getting Started with FITSIO}{8} +\contentsline {section}{\numberline {2.5}Example Program}{8} +\contentsline {section}{\numberline {2.6}Legal Stuff}{9} +\contentsline {section}{\numberline {2.7}Acknowledgements}{10} +\contentsline {chapter}{\numberline {3} A FITS Primer }{13} +\contentsline {chapter}{\numberline {4}FITSIO Conventions and Guidelines }{15} +\contentsline {section}{\numberline {4.1}CFITSIO Size Limitations}{15} +\contentsline {section}{\numberline {4.2}Multiple Access to the Same FITS File}{16} +\contentsline {section}{\numberline {4.3}Current Header Data Unit (CHDU)}{16} +\contentsline {section}{\numberline {4.4}Subroutine Names}{16} +\contentsline {section}{\numberline {4.5}Subroutine Families and Datatypes}{17} +\contentsline {section}{\numberline {4.6}Implicit Data Type Conversion}{18} +\contentsline {section}{\numberline {4.7}Data Scaling}{18} +\contentsline {section}{\numberline {4.8}Error Status Values and the Error Message Stack}{19} +\contentsline {section}{\numberline {4.9}Variable-Length Array Facility in Binary Tables}{19} +\contentsline {section}{\numberline {4.10}Support for IEEE Special Values}{20} +\contentsline {section}{\numberline {4.11}When the Final Size of the FITS HDU is Unknown}{21} +\contentsline {section}{\numberline {4.12}Local FITS Conventions supported by FITSIO}{21} +\contentsline {subsection}{\numberline {4.12.1}Support for Long String Keyword Values.}{22} +\contentsline {subsection}{\numberline {4.12.2}Arrays of Fixed-Length Strings in Binary Tables}{22} +\contentsline {subsection}{\numberline {4.12.3}Keyword Units Strings}{23} +\contentsline {subsection}{\numberline {4.12.4}HIERARCH Convention for Extended Keyword Names}{23} +\contentsline {section}{\numberline {4.13}Optimizing Code for Maximum Processing Speed}{24} +\contentsline {subsection}{\numberline {4.13.1}Background Information: How CFITSIO Manages Data I/O}{25} +\contentsline {chapter}{\numberline {5} Basic Interface Routines }{29} +\contentsline {section}{\numberline {5.1}FITSIO Error Status Routines }{29} +\contentsline {section}{\numberline {5.2}File I/O Routines}{30} +\contentsline {section}{\numberline {5.3}Keyword I/O Routines}{32} +\contentsline {section}{\numberline {5.4}Data I/O Routines}{33} +\contentsline {chapter}{\numberline {6} Advanced Interface Subroutines }{35} +\contentsline {section}{\numberline {6.1}FITS File Open and Close Subroutines: }{35} +\contentsline {section}{\numberline {6.2}HDU-Level Operations }{38} +\contentsline {section}{\numberline {6.3}Define or Redefine the structure of the CHDU }{41} +\contentsline {section}{\numberline {6.4}FITS Header I/O Subroutines}{43} +\contentsline {subsection}{\numberline {6.4.1}Header Space and Position Routines }{43} +\contentsline {subsection}{\numberline {6.4.2}Read or Write Standard Header Routines }{43} +\contentsline {subsection}{\numberline {6.4.3}Write Keyword Subroutines }{45} +\contentsline {subsection}{\numberline {6.4.4}Insert Keyword Subroutines }{47} +\contentsline {subsection}{\numberline {6.4.5}Read Keyword Subroutines }{47} +\contentsline {subsection}{\numberline {6.4.6}Modify Keyword Subroutines }{49} +\contentsline {subsection}{\numberline {6.4.7}Update Keyword Subroutines }{50} +\contentsline {subsection}{\numberline {6.4.8}Delete Keyword Subroutines }{50} +\contentsline {section}{\numberline {6.5}Data Scaling and Undefined Pixel Parameters }{51} +\contentsline {section}{\numberline {6.6}FITS Primary Array or IMAGE Extension I/O Subroutines }{52} +\contentsline {section}{\numberline {6.7}FITS ASCII and Binary Table Data I/O Subroutines}{55} +\contentsline {subsection}{\numberline {6.7.1}Column Information Subroutines }{55} +\contentsline {subsection}{\numberline {6.7.2}Low-Level Table Access Subroutines }{58} +\contentsline {subsection}{\numberline {6.7.3}Edit Rows or Columns }{58} +\contentsline {subsection}{\numberline {6.7.4}Read and Write Column Data Routines }{60} +\contentsline {section}{\numberline {6.8}Row Selection and Calculator Routines }{63} +\contentsline {section}{\numberline {6.9}Celestial Coordinate System Subroutines }{65} +\contentsline {section}{\numberline {6.10}File Checksum Subroutines }{66} +\contentsline {section}{\numberline {6.11} Date and Time Utility Routines }{67} +\contentsline {section}{\numberline {6.12}General Utility Subroutines }{68} +\contentsline {chapter}{\numberline {7} The CFITSIO Iterator Function }{75} +\contentsline {chapter}{\numberline {8} Extended File Name Syntax }{77} +\contentsline {section}{\numberline {8.1}Overview}{77} +\contentsline {section}{\numberline {8.2}Filetype}{80} +\contentsline {subsection}{\numberline {8.2.1}Notes about HTTP proxy servers}{80} +\contentsline {subsection}{\numberline {8.2.2}Notes about the root filetype}{80} +\contentsline {subsection}{\numberline {8.2.3}Notes about the shmem filetype:}{82} +\contentsline {section}{\numberline {8.3}Base Filename}{83} +\contentsline {section}{\numberline {8.4}Output File Name when Opening an Existing File}{85} +\contentsline {section}{\numberline {8.5}Template File Name when Creating a New File}{86} +\contentsline {section}{\numberline {8.6}Image Tile-Compression Specification}{86} +\contentsline {section}{\numberline {8.7}HDU Location Specification}{87} +\contentsline {section}{\numberline {8.8}Image Section}{88} +\contentsline {section}{\numberline {8.9}Image Transform Filters}{89} +\contentsline {section}{\numberline {8.10}Column and Keyword Filtering Specification}{90} +\contentsline {section}{\numberline {8.11}Row Filtering Specification}{92} +\contentsline {subsection}{\numberline {8.11.1}General Syntax}{93} +\contentsline {subsection}{\numberline {8.11.2}Bit Masks}{95} +\contentsline {subsection}{\numberline {8.11.3}Vector Columns}{96} +\contentsline {subsection}{\numberline {8.11.4}Good Time Interval Filtering}{97} +\contentsline {subsection}{\numberline {8.11.5}Spatial Region Filtering}{98} +\contentsline {subsection}{\numberline {8.11.6}Example Row Filters}{101} +\contentsline {section}{\numberline {8.12} Binning or Histogramming Specification}{102} +\contentsline {chapter}{\numberline {9}Template Files }{105} +\contentsline {section}{\numberline {9.1}Detailed Template Line Format}{105} +\contentsline {section}{\numberline {9.2}Auto-indexing of Keywords}{106} +\contentsline {section}{\numberline {9.3}Template Parser Directives}{107} +\contentsline {section}{\numberline {9.4}Formal Template Syntax}{107} +\contentsline {section}{\numberline {9.5}Errors}{108} +\contentsline {section}{\numberline {9.6}Examples}{108} +\contentsline {chapter}{\numberline {10} Summary of all FITSIO User-Interface Subroutines }{111} +\contentsline {chapter}{\numberline {11} Parameter Definitions }{119} +\contentsline {chapter}{\numberline {12} FITSIO Error Status Codes }{125} diff --git a/software/cfitsio3040/fitsio2.h b/software/cfitsio3040/fitsio2.h new file mode 100644 index 000000000..0942986fc --- /dev/null +++ b/software/cfitsio3040/fitsio2.h @@ -0,0 +1,1150 @@ +#ifndef _FITSIO2_H +#define _FITSIO2_H + +#include "fitsio.h" + +/* + If REPLACE_LINKS is defined, then whenever CFITSIO fails to open + a file with write access because it is a soft link to a file that + only has read access, then CFITSIO will attempt to replace + the link with a local copy of the file, with write access. This + feature was originally added to support the ftools in the Hera + environment, where many of the user's data file are soft links. +*/ +#if defined(BUILD_HERA) +#define REPLACE_LINKS 1 +#endif + +#define USE_LARGE_VALUE -99 /* flag used when writing images */ + +#define DBUFFSIZE 28800 /* size of data buffer in bytes */ + +#define NIOBUF 40 /* number of IO buffers to create */ + /* !! Significantly increasing NIOBUF may degrade performance !! */ +#define NMAXFILES 300 /* maximum number of FITS files that can be opened */ + /* CFITSIO will allocate (NMAXFILES * 80) bytes of memory */ + +#define IOBUFLEN 2880 /* size in bytes of each IO buffer (DONT CHANGE!) */ +#define MINDIRECT 8640 /* minimum size for direct reads and writes */ + /* MINDIRECT must have a value >= 8640 */ + +/* it is useful to identify certain specific types of machines */ +#define NATIVE 0 /* machine that uses non-byteswapped IEEE formats */ +#define OTHERTYPE 1 /* any other type of machine */ +#define VAXVMS 3 /* uses an odd floating point format */ +#define ALPHAVMS 4 /* uses an odd floating point format */ +#define IBMPC 5 /* used in drvrfile.c to work around a bug on PCs */ +#define CRAY 6 /* requires a special NaN test algorithm */ + +#define GFLOAT 1 /* used for VMS */ +#define IEEEFLOAT 2 /* used for VMS */ + +/* ======================================================================= */ +/* The following logic is used to determine the type machine, */ +/* whether the bytes are swapped, and the number of bits in a long value */ +/* ======================================================================= */ + +/* The following platforms have sizeof(long) == 8 */ +/* This block of code should match a similar block in fitsio.h */ +/* and the block of code at the beginning of f77_wrap.h */ + +#if defined(__alpha) && ( defined(__unix__) || defined(__NetBSD__) ) + /* old Dec Alpha platforms running OSF */ +#define BYTESWAPPED TRUE +#define LONGSIZE 64 + +#elif defined(__sparcv9) + /* SUN Solaris7 in 64-bit mode */ +#define BYTESWAPPED FALSE +#define MACHINE NATIVE +#define LONGSIZE 64 + +#elif defined(__ia64__) || defined(__x86_64__) + /* Intel itanium 64-bit PC, or AMD opteron 64-bit PC */ +#define BYTESWAPPED TRUE +#define LONGSIZE 64 + +#elif defined(_SX) /* Nec SuperUx */ + +#define BYTESWAPPED FALSE +#define MACHINE NATIVE +#define LONGSIZE 64 + +#elif defined(__powerpc64__) || defined(__64BIT__) /* IBM 64-bit AIX powerpc*/ + /* could also test for __ppc64__ or __PPC64 */ +#define BYTESWAPPED FALSE +#define MACHINE NATIVE +#define LONGSIZE 64 + +#elif defined(_MIPS_SZLONG) + +# if defined(MIPSEL) +# define BYTESWAPPED TRUE +# else +# define BYTESWAPPED FALSE +# define MACHINE NATIVE +# endif + +# if _MIPS_SZLONG == 32 +# define LONGSIZE 32 +# elif _MIPS_SZLONG == 64 +# define LONGSIZE 64 +# else +# error "can't handle long size given by _MIPS_SZLONG" +# endif + +/* ============================================================== */ +/* the following are all 32-bit byteswapped platforms */ + +#elif defined(vax) && defined(VMS) + +#define MACHINE VAXVMS +#define BYTESWAPPED TRUE + +#elif defined(__alpha) && defined(__VMS) + +#if (__D_FLOAT == TRUE) + +/* this float option is the same as for VAX/VMS machines. */ +#define MACHINE VAXVMS +#define BYTESWAPPED TRUE + +#elif (__G_FLOAT == TRUE) + +/* G_FLOAT is the default for ALPHA VMS systems */ +#define MACHINE ALPHAVMS +#define BYTESWAPPED TRUE +#define FLOATTYPE GFLOAT + +#elif (__IEEE_FLOAT == TRUE) + +#define MACHINE ALPHAVMS +#define BYTESWAPPED TRUE +#define FLOATTYPE IEEEFLOAT + +#endif /* end of alpha VMS case */ + +#elif defined(ultrix) && defined(unix) + /* old Dec ultrix machines */ +#define BYTESWAPPED TRUE + +#elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) \ + || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__) \ + || defined(_NI_mswin_) || defined(__EMX__) + +/* generic 32-bit IBM PC */ +#define MACHINE IBMPC +#define BYTESWAPPED TRUE + +#elif defined(__arm__) + +/* This assumes all ARM are little endian. In the future, it might be */ +/* necessary to use "if defined(__ARMEL__)" to distinguish little from big. */ +/* (__ARMEL__ would be defined on little-endian, but not on big-endian). */ + +#define BYTESWAPPED TRUE + +#else + +/* assume all other machine uses the same IEEE formats as used in FITS files */ +/* e.g., Macs fall into this category */ + +#define MACHINE NATIVE +#define BYTESWAPPED FALSE + +#endif + +#ifndef MACHINE +#define MACHINE OTHERTYPE +#endif + +/* assume longs are 4 bytes long, unless previously set otherwise */ +#ifndef LONGSIZE +#define LONGSIZE 32 +#endif + +/* end of block that determine long size and byte swapping */ +/* ==================================================================== */ + +#define IGNORE_EOF 1 +#define REPORT_EOF 0 +#define DATA_UNDEFINED -1 +#define NULL_UNDEFINED 1234554321 +#define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */ + +#define maxvalue(A,B) ((A) > (B) ? (A) : (B)) +#define minvalue(A,B) ((A) < (B) ? (A) : (B)) + +/* faster string comparison macros */ +#define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b))) +#define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n))) + +#if defined(__VMS) || defined(VMS) + +#define FNANMASK 0xFFFF /* mask all bits */ +#define DNANMASK 0xFFFF /* mask all bits */ + +#else + +#define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */ + /* all 0 on underflow or 0. */ + +#define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */ + /* all 0 on underflow or 0. */ + +#endif + +#if MACHINE == CRAY + /* + Cray machines: the large negative integer corresponds + to the 3 most sig digits set to 1. If these + 3 bits are set in a floating point number (64 bits), then it represents + a reserved value (i.e., a NaN) + */ +#define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) ) + +#else + /* these functions work for both big and little endian machines */ + /* that use the IEEE floating point format for internal numbers */ + + /* These functions tests whether the float value is a reserved IEEE */ + /* value such as a Not-a-Number (NaN), or underflow, overflow, or */ + /* infinity. The functions returns 1 if the value is a NaN, overflow */ + /* or infinity; it returns 2 if the value is an denormalized underflow */ + /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */ + +#define fnan(L) \ + ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0) + +#define dnan(L) \ + ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0) + +#endif + +#define DSCHAR_MAX 127.49 /* max double value that fits in an signed char */ +#define DSCHAR_MIN -128.49 /* min double value that fits in an signed char */ +#define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */ +#define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */ +#define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/ +#define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */ +#define DSHRT_MAX 32767.49 /* max double value that fits in a short */ +#define DSHRT_MIN -32768.49 /* min double value that fits in a short */ + +#if LONGSIZE == 32 +# define DLONG_MAX 2147483647.49 /* max double value that fits in a long */ +# define DLONG_MIN -2147483648.49 /* min double value that fits in a long */ +# define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */ +#else +# define DLONG_MAX 9.2233720368547752E18 /* max double value long */ +# define DLONG_MIN -9.2233720368547752E18 /* min double value long */ +# define DULONG_MAX 1.84467440737095504E19 /* max double value ulong */ +#endif + +#define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */ +#define DLONGLONG_MAX 9.2233720368547755807E18 /* max double value longlong */ +#define DLONGLONG_MIN -9.2233720368547755808E18 /* min double value longlong */ +#define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */ +#define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */ +#define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */ +#define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */ + +#ifndef UINT32_MAX +#define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */ +#endif +#ifndef INT32_MAX +#define INT32_MAX 2147483647 /* max 32-bit integer */ +#endif +#ifndef INT32_MIN +#define INT32_MIN (-INT32_MAX -1) /* min 32-bit integer */ +#endif + +#ifndef LONGLONG_MAX + +#ifdef LLONG_MAX +/* Linux and Solaris definition */ +#define LONGLONG_MAX LLONG_MAX +#define LONGLONG_MIN LLONG_MIN + +#elif defined(LONG_LONG_MAX) +#define LONGLONG_MAX LONG_LONG_MAX +#define LONGLONG_MIN LONG_LONG_MIN + +#elif defined(__LONG_LONG_MAX__) +/* Mac OS X & CYGWIN defintion */ +#define LONGLONG_MAX __LONG_LONG_MAX__ +#define LONGLONG_MIN (-LONGLONG_MAX -1LL) + +#elif defined(INT64_MAX) +/* windows definition */ +#define LONGLONG_MAX INT64_MAX +#define LONGLONG_MIN INT64_MIN + +#elif defined(_I64_MAX) +/* windows definition */ +#define LONGLONG_MAX _I64_MAX +#define LONGLONG_MIN _I64_MIN + +#elif (LONGSIZE == 64) +/* sizeof(long) = 64 */ +#define LONGLONG_MAX 9223372036854775807L /* max 64-bit integer */ +#define LONGLONG_MIN (-LONGLONG_MAX -1L) /* min 64-bit integer */ + +#else +/* define a default value, even if it is never used */ +#define LONGLONG_MAX 9223372036854775807LL /* max 64-bit integer */ +#define LONGLONG_MIN (-LONGLONG_MAX -1LL) /* min 64-bit integer */ + +#endif +#endif /* end of ndef LONGLONG_MAX section */ + +#define COMPRESS_NULL_VALUE -2147483647 + +int ffmkky(char *keyname, char *keyval, char *comm, char *card, int *status); +int ffgnky(fitsfile *fptr, char *card, int *status); +void ffcfmt(char *tform, char *cform); +void ffcdsp(char *tform, char *cform); +void ffswap2(short *values, long nvalues); +void ffswap4(INT32BIT *values, long nvalues); +void ffswap8(double *values, long nvalues); +int ffi2c(LONGLONG ival, char *cval, int *status); +int ffl2c(int lval, char *cval, int *status); +int ffs2c(char *instr, char *outstr, int *status); +int ffr2f(float fval, int decim, char *cval, int *status); +int ffr2e(float fval, int decim, char *cval, int *status); +int ffd2f(double dval, int decim, char *cval, int *status); +int ffd2e(double dval, int decim, char *cval, int *status); +int ffc2ii(char *cval, long *ival, int *status); +int ffc2jj(char *cval, LONGLONG *ival, int *status); +int ffc2ll(char *cval, int *lval, int *status); +int ffc2rr(char *cval, float *fval, int *status); +int ffc2dd(char *cval, double *dval, int *status); +int ffc2x(char *cval, char *dtype, long *ival, int *lval, char *sval, + double *dval, int *status); +int ffc2s(char *instr, char *outstr, int *status); +int ffc2i(char *cval, long *ival, int *status); +int ffc2j(char *cval, LONGLONG *ival, int *status); +int ffc2r(char *cval, float *fval, int *status); +int ffc2d(char *cval, double *dval, int *status); +int ffc2l(char *cval, int *lval, int *status); +void ffxmsg(int action, char *err_message); +int ffgcnt(fitsfile *fptr, char *value, int *status); +int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status); +int ffgtknjj(fitsfile *fptr, int numkey, char *keyname, LONGLONG *value, int *status); +int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status); +int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, + LONGLONG naxes[], long *pcount, long *gcount, int *extend, double *bscale, + double *bzero, LONGLONG *blank, int *nspace, int *status); +int ffgttb(fitsfile *fptr, LONGLONG *rowlen, LONGLONG *nrows, LONGLONG *pcount, + long *tfield, int *status); + +int ffmkey(fitsfile *fptr, char *card, int *status); + +/* ffmbyt has been moved to fitsio.h */ +int ffgbyt(fitsfile *fptr, LONGLONG nbytes, void *buffer, int *status); +int ffpbyt(fitsfile *fptr, LONGLONG nbytes, void *buffer, int *status); +int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset, + void *buffer, int *status); +int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset, + void *buffer, int *status); +int ffldrc(fitsfile *fptr, long record, int err_mode, int *status); +int ffwhbf(fitsfile *fptr, int *nbuff); +int ffbfeof(fitsfile *fptr, int *status); +int ffbfwt(int nbuff, int *status); +int fits_get_num_files(void); +int ffpxsz(int datatype); + +int ffourl(char *url, char *urltype, char *outfile, char *tmplfile, + char *compspec, int *status); +int ffparsecompspec(fitsfile *fptr, char *compspec, int *status); +int ffoptplt(fitsfile *fptr, const char *tempname, int *status); +int fits_is_this_a_copy(char *urltype); +int fits_store_Fptr(FITSfile *Fptr, int *status); +int fits_clear_Fptr(FITSfile *Fptr, int *status); +int fits_already_open(fitsfile **fptr, char *url, + char *urltype, char *infile, char *extspec, char *rowfilter, + char *binspec, char *colspec, int mode,int *isopen, int *status); +int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status); +int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin, + float *datamax, int *status); +int ffwritehisto(long totaln, long offset, long firstn, long nvalues, + int narrays, iteratorCol *imagepars, void *userPointer); +int ffcalchist(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *colpars, void *userPointer); +int ffrhdu(fitsfile *fptr, int *hdutype, int *status); +int ffpinit(fitsfile *fptr, int *status); +int ffainit(fitsfile *fptr, int *status); +int ffbinit(fitsfile *fptr, int *status); +int ffchdu(fitsfile *fptr, int *status); +int ffwend(fitsfile *fptr, int *status); +int ffpdfl(fitsfile *fptr, int *status); +int ffuptf(fitsfile *fptr, int *status); + +int ffdblk(fitsfile *fptr, long nblocks, int *status); +int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status); +int ffgtbc(fitsfile *fptr, LONGLONG *totalwidth, int *status); +int ffgtbp(fitsfile *fptr, char *name, char *value, int *status); +int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status); +int ffshft(fitsfile *fptr, LONGLONG firstbyte, LONGLONG nbytes, LONGLONG nshift, + int *status); + + int ffgcprll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int writemode, double *scale, double *zero, char *tform, + long *twidth, int *tcode, int *maxelem, LONGLONG *startpos, + LONGLONG *elemnum, long *incre, LONGLONG *repeat, LONGLONG *rowlen, + int *hdutype, LONGLONG *tnull, char *snull, int *status); + +int ffflushx(FITSfile *fptr); +int ffseek(FITSfile *fptr, LONGLONG position); +int ffread(FITSfile *fptr, long nbytes, void *buffer, + int *status); +int ffwrite(FITSfile *fptr, long nbytes, void *buffer, + int *status); +int fftrun(fitsfile *fptr, LONGLONG filesize, int *status); + +int ffpcluc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int *status); + +int ffgcll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int nultyp, char nulval, char *array, char *nularray, + int *anynul, int *status); +int ffgcls(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int nultyp, char *nulval, + char **array, char *nularray, int *anynul, int *status); +int ffgcls2(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, int nultyp, char *nulval, + char **array, char *nularray, int *anynul, int *status); +int ffgclb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, unsigned char nulval, + unsigned char *array, char *nularray, int *anynul, int *status); +int ffgclsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, signed char nulval, + signed char *array, char *nularray, int *anynul, int *status); +int ffgclui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, unsigned short nulval, + unsigned short *array, char *nularray, int *anynul, int *status); +int ffgcli(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, short nulval, + short *array, char *nularray, int *anynul, int *status); +int ffgcluj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, unsigned long nulval, + unsigned long *array, char *nularray, int *anynul, int *status); +int ffgcljj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, LONGLONG nulval, + LONGLONG *array, char *nularray, int *anynul, int *status); +int ffgclj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, long nulval, long *array, + char *nularray, int *anynul, int *status); +int ffgcluk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, unsigned int nulval, + unsigned int *array, char *nularray, int *anynul, int *status); +int ffgclk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, int nulval, int *array, + char *nularray, int *anynul, int *status); +int ffgcle(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, float nulval, float *array, + char *nularray, int *anynul, int *status); +int ffgcld(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, + LONGLONG nelem, long elemincre, int nultyp, double nulval, + double *array, char *nularray, int *anynul, int *status); + +int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer, + int *status); +int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status); +int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer, + int *status); +int ffpi8b(fitsfile *fptr, long nelem, long incre, long *buffer, int *status); +int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status); +int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status); + +int ffgi1b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, + unsigned char *buffer, int *status); +int ffgi2b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, short *buffer, + int *status); +int ffgi4b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, INT32BIT *buffer, + int *status); +int ffgi8b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, long *buffer, + int *status); +int ffgr4b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, float *buffer, + int *status); +int ffgr8b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, double *buffer, + int *status); + +int ffcins(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, LONGLONG nbytes, + LONGLONG bytepos, int *status); +int ffcdel(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, LONGLONG nbytes, + LONGLONG bytepos, int *status); +int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status); + +int fffi1i1(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, unsigned char nullval, char + *nullarray, int *anynull, unsigned char *output, int *status); +int fffi2i1(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, unsigned char nullval, char *nullarray, + int *anynull, unsigned char *output, int *status); +int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray, + int *anynull, unsigned char *output, int *status); +int fffi8i1(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, unsigned char nullval, char *nullarray, + int *anynull, unsigned char *output, int *status); +int fffr4i1(float *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char nullval, char *nullarray, + int *anynull, unsigned char *output, int *status); +int fffr8i1(double *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char nullval, char *nullarray, + int *anynull, unsigned char *output, int *status); +int fffstri1(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + unsigned char nullval, char *nullarray, int *anynull, + unsigned char *output, int *status); + +int fffi1s1(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, signed char nullval, char + *nullarray, int *anynull, signed char *output, int *status); +int fffi2s1(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, signed char nullval, char *nullarray, + int *anynull, signed char *output, int *status); +int fffi4s1(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, signed char nullval, char *nullarray, + int *anynull, signed char *output, int *status); +int fffi8s1(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, signed char nullval, char *nullarray, + int *anynull, signed char *output, int *status); +int fffr4s1(float *input, long ntodo, double scale, double zero, + int nullcheck, signed char nullval, char *nullarray, + int *anynull, signed char *output, int *status); +int fffr8s1(double *input, long ntodo, double scale, double zero, + int nullcheck, signed char nullval, char *nullarray, + int *anynull, signed char *output, int *status); +int fffstrs1(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + signed char nullval, char *nullarray, int *anynull, + signed char *output, int *status); + +int fffi1u2(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, unsigned short nullval, + char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffi2u2(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, unsigned short nullval, char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffi8u2(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, unsigned short nullval, char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffr4u2(float *input, long ntodo, double scale, double zero, + int nullcheck, unsigned short nullval, char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffr8u2(double *input, long ntodo, double scale, double zero, + int nullcheck, unsigned short nullval, char *nullarray, + int *anynull, unsigned short *output, int *status); +int fffstru2(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + unsigned short nullval, char *nullarray, int *anynull, + unsigned short *output, int *status); + +int fffi1i2(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffi2i2(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffi8i2(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffr4i2(float *input, long ntodo, double scale, double zero, + int nullcheck, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffr8i2(double *input, long ntodo, double scale, double zero, + int nullcheck, short nullval, char *nullarray, + int *anynull, short *output, int *status); +int fffstri2(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + short nullval, char *nullarray, int *anynull, short *output, + int *status); + +int fffi1u4(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, unsigned long nullval, + char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffi2u4(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, unsigned long nullval, char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffi8u4(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, unsigned long nullval, char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffr4u4(float *input, long ntodo, double scale, double zero, + int nullcheck, unsigned long nullval, char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffr8u4(double *input, long ntodo, double scale, double zero, + int nullcheck, unsigned long nullval, char *nullarray, + int *anynull, unsigned long *output, int *status); +int fffstru4(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + unsigned long nullval, char *nullarray, int *anynull, + unsigned long *output, int *status); + +int fffi1i4(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffi2i4(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffi8i4(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffr4i4(float *input, long ntodo, double scale, double zero, + int nullcheck, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffr8i4(double *input, long ntodo, double scale, double zero, + int nullcheck, long nullval, char *nullarray, + int *anynull, long *output, int *status); +int fffstri4(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + long nullval, char *nullarray, int *anynull, long *output, + int *status); + +int fffi1int(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffi2int(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffi4int(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffi8int(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffr4int(float *input, long ntodo, double scale, double zero, + int nullcheck, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffr8int(double *input, long ntodo, double scale, double zero, + int nullcheck, int nullval, char *nullarray, + int *anynull, int *output, int *status); +int fffstrint(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + int nullval, char *nullarray, int *anynull, int *output, + int *status); + +int fffi1uint(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, unsigned int nullval, + char *nullarray, int *anynull, unsigned int *output, int *status); +int fffi2uint(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, unsigned int nullval, char *nullarray, + int *anynull, unsigned int *output, int *status); +int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray, + int *anynull, unsigned int *output, int *status); +int fffi8uint(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, unsigned int nullval, char *nullarray, + int *anynull, unsigned int *output, int *status); +int fffr4uint(float *input, long ntodo, double scale, double zero, + int nullcheck, unsigned int nullval, char *nullarray, + int *anynull, unsigned int *output, int *status); +int fffr8uint(double *input, long ntodo, double scale, double zero, + int nullcheck, unsigned int nullval, char *nullarray, + int *anynull, unsigned int *output, int *status); +int fffstruint(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + unsigned int nullval, char *nullarray, int *anynull, + unsigned int *output, int *status); + +int fffi1i8(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, LONGLONG nullval, + char *nullarray, int *anynull, LONGLONG *output, int *status); +int fffi2i8(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, LONGLONG nullval, char *nullarray, + int *anynull, LONGLONG *output, int *status); +int fffi4i8(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, LONGLONG nullval, char *nullarray, + int *anynull, LONGLONG *output, int *status); +int fffi8i8(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, LONGLONG nullval, char *nullarray, + int *anynull, LONGLONG *output, int *status); +int fffr4i8(float *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG nullval, char *nullarray, + int *anynull, LONGLONG *output, int *status); +int fffr8i8(double *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG nullval, char *nullarray, + int *anynull, LONGLONG *output, int *status); +int fffstri8(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, + int *status); + +int fffi1r4(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffi2r4(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffi8r4(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffr4r4(float *input, long ntodo, double scale, double zero, + int nullcheck, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffr8r4(double *input, long ntodo, double scale, double zero, + int nullcheck, float nullval, char *nullarray, + int *anynull, float *output, int *status); +int fffstrr4(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + float nullval, char *nullarray, int *anynull, float *output, + int *status); + +int fffi1r8(unsigned char *input, long ntodo, double scale, double zero, + int nullcheck, unsigned char tnull, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffi2r8(short *input, long ntodo, double scale, double zero, + int nullcheck, short tnull, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero, + int nullcheck, INT32BIT tnull, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffi8r8(LONGLONG *input, long ntodo, double scale, double zero, + int nullcheck, LONGLONG tnull, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffr4r8(float *input, long ntodo, double scale, double zero, + int nullcheck, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffr8r8(double *input, long ntodo, double scale, double zero, + int nullcheck, double nullval, char *nullarray, + int *anynull, double *output, int *status); +int fffstrr8(char *input, long ntodo, double scale, double zero, + long twidth, double power, int nullcheck, char *snull, + double nullval, char *nullarray, int *anynull, double *output, + int *status); + +int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffs1fi1(signed char *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffi2fi1(short *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffi4fi1(long *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffi8fi1(LONGLONG *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffintfi1(int *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffr4fi1(float *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); +int ffr8fi1(double *array, long ntodo, double scale, double zero, + unsigned char *buffer, int *status); + +int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffs1fi2(signed char *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffi2fi2(short *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffi4fi2(long *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffi8fi2(LONGLONG *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffintfi2(int *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffr4fi2(float *array, long ntodo, double scale, double zero, + short *buffer, int *status); +int ffr8fi2(double *array, long ntodo, double scale, double zero, + short *buffer, int *status); + +int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffs1fi4(signed char *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffi2fi4(short *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffi4fi4(long *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffi8fi4(LONGLONG *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffintfi4(int *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffr4fi4(float *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); +int ffr8fi4(double *array, long ntodo, double scale, double zero, + INT32BIT *buffer, int *status); + +int fflongfi8(long *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffi8fi8(LONGLONG *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffi2fi8(short *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffi1fi8(unsigned char *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffs1fi8(signed char *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffr4fi8(float *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffr8fi8(double *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffintfi8(int *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffu2fi8(unsigned short *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffu4fi8(unsigned long *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); +int ffuintfi8(unsigned int *array, long ntodo, double scale, double zero, + LONGLONG *buffer, int *status); + +int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffs1fr4(signed char *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffi2fr4(short *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffi4fr4(long *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffi8fr4(LONGLONG *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffintfr4(int *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffr4fr4(float *array, long ntodo, double scale, double zero, + float *buffer, int *status); +int ffr8fr4(double *array, long ntodo, double scale, double zero, + float *buffer, int *status); + +int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffs1fr8(signed char *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffi2fr8(short *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffi4fr8(long *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffi8fr8(LONGLONG *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffintfr8(int *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffr4fr8(float *array, long ntodo, double scale, double zero, + double *buffer, int *status); +int ffr8fr8(double *array, long ntodo, double scale, double zero, + double *buffer, int *status); + +int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffs1fstr(signed char *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffi2fstr(short *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffi4fstr(long *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffi8fstr(LONGLONG *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffintfstr(int *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffr4fstr(float *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); +int ffr8fstr(double *input, long ntodo, double scale, double zero, + char *cform, long twidth, char *output, int *status); + +/* the following 4 routines are VMS macros used on VAX or Alpha VMS */ +void ieevpd(double *inarray, double *outarray, long *nvals); +void ieevud(double *inarray, double *outarray, long *nvals); +void ieevpr(float *inarray, float *outarray, long *nvals); +void ieevur(float *inarray, float *outarray, long *nvals); + +/* routines related to the lexical parser */ +int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status); +int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim, + int *datatype, long *nelem, int *naxis, long *naxes, + int *status ); +void ffcprs( void ); +int ffcvtn( int inputType, void *input, char *undef, long ntodo, + int outputType, void *nulval, void *output, + int *anynull, int *status ); +int parse_data( long totalrows, long offset, long firstrow, + long nrows, int nCols, iteratorCol *colData, + void *userPtr ); +int uncompress_hkdata( fitsfile *fptr, long ntimes, + double *times, int *status ); +int ffffrw_work( long totalrows, long offset, long firstrow, + long nrows, int nCols, iteratorCol *colData, + void *userPtr ); + + +/* image compression routines */ +int fits_write_compressed_img(fitsfile *fptr, + int datatype, long *fpixel, long *lpixel, + int nullcheck, void *array, void *nulval, + int *status); +int fits_write_compressed_pixels(fitsfile *fptr, + int datatype, LONGLONG fpixel, LONGLONG npixels, + int nullcheck, void *array, void *nulval, + int *status); +int fits_write_compressed_img_plane(fitsfile *fptr, int datatype, + int bytesperpixel, long nplane, long *firstcoord, long *lastcoord, + long *naxes, int nullcheck, + void *array, void *nullval, long *nread, int *status); + +int imcomp_init_table(fitsfile *outfptr, + int bitpix, int naxis,long *naxes, int writebitpix, int *status); +int imcomp_calc_max_elem (int comptype, int nx, int zbitpix, int blocksize); +int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr, + int *status); +int imcomp_copy_img2comp(fitsfile *infptr, fitsfile *outfptr, int *status); +int imcomp_copy_comp2img(fitsfile *infptr, fitsfile *outfptr, + int norec, int *status); +int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr, + int *status); +int imcomp_compress_tile (fitsfile *outfptr, long row, + int datatype, void *tiledata, long tilelen, long nx, long ny, int *status); + +/* image decompression routines */ + +int fits_read_compressed_img(fitsfile *fptr, + int datatype, LONGLONG *fpixel,LONGLONG *lpixel,long *inc, + int nullcheck, void *nulval, void *array, char *nullarray, + int *anynul, int *status); +int fits_read_compressed_pixels(fitsfile *fptr, + int datatype, LONGLONG fpixel, LONGLONG npixels, + int nullcheck, void *nulval, void *array, char *nullarray, + int *anynul, int *status); +int fits_read_compressed_img_plane(fitsfile *fptr, int datatype, + int bytesperpixel, long nplane, LONGLONG *firstcoord, LONGLONG *lastcoord, + long *inc, long *naxes, int nullcheck, void *nullval, + void *array, char *nullarray, int *anynul, long *nread, int *status); + +int imcomp_get_compressed_image_par(fitsfile *infptr, int *status); +int imcomp_decompress_tile (fitsfile *infptr, + int nrow, int tilesize, int datatype, int nullcheck, + void *nulval, void *buffer, char *bnullarray, int *anynul, + int *status); +int imcomp_copy_overlap (char *tile, int pixlen, int ndim, + long *tfpixel, long *tlpixel, char *bnullarray, char *image, + long *fpixel, long *lpixel, long *inc, int nullcheck, char *nullarray, + int *status); +int imcomp_merge_overlap (char *tile, int pixlen, int ndim, + long *tfpixel, long *tlpixel, char *bnullarray, char *image, + long *fpixel, long *lpixel, int nullcheck, int *status); + +int fits_quantize_float (float fdata[], int nx, float in_null_value, + int noise_bits, int idata[], double *bscale, double *bzero, + int *iminval, int *imaxval); +int fits_quantize_double (double fdata[], int nx, double in_null_value, + int noise_bits, int idata[], double *bscale, double *bzero, + int *iminval, int *imaxval); +int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock); +int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx, + int nblock); + +int pl_p2li (int *pxsrc, int xs, short *lldst, int npix); +int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix); + +/* general driver routines */ + +int urltype2driver(char *urltype, int *driver); +int fits_init_cfitsio(void); + +int fits_register_driver( char *prefix, + int (*init)(void), + int (*fitsshutdown)(void), + int (*setoptions)(int option), + int (*getoptions)(int *options), + int (*getversion)(int *version), + int (*checkfile) (char *urltype, char *infile, char *outfile), + int (*fitsopen)(char *filename, int rwmode, int *driverhandle), + int (*fitscreate)(char *filename, int *driverhandle), + int (*fitstruncate)(int driverhandle, LONGLONG filesize), + int (*fitsclose)(int driverhandle), + int (*fremove)(char *filename), + int (*size)(int driverhandle, LONGLONG *size), + int (*flush)(int driverhandle), + int (*seek)(int driverhandle, LONGLONG offset), + int (*fitsread) (int driverhandle, void *buffer, long nbytes), + int (*fitswrite)(int driverhandle, void *buffer, long nbytes)); + +/* file driver I/O routines */ + +int file_init(void); +int file_setoptions(int options); +int file_getoptions(int *options); +int file_getversion(int *version); +int file_shutdown(void); +int file_checkfile(char *urltype, char *infile, char *outfile); +int file_open(char *filename, int rwmode, int *driverhandle); +int file_compress_open(char *filename, int rwmode, int *hdl); +int file_openfile(char *filename, int rwmode, FILE **diskfile); +int file_create(char *filename, int *driverhandle); +int file_truncate(int driverhandle, LONGLONG filesize); +int file_size(int driverhandle, LONGLONG *filesize); +int file_close(int driverhandle); +int file_remove(char *filename); +int file_flush(int driverhandle); +int file_seek(int driverhandle, LONGLONG offset); +int file_read (int driverhandle, void *buffer, long nbytes); +int file_write(int driverhandle, void *buffer, long nbytes); +int file_is_compressed(char *filename); + +/* memory driver I/O routines */ + +int mem_init(void); +int mem_setoptions(int options); +int mem_getoptions(int *options); +int mem_getversion(int *version); +int mem_shutdown(void); +int mem_create(char *filename, int *handle); +int mem_create_comp(char *filename, int *handle); +int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize, + void *(*memrealloc)(void *p, size_t newsize), int *handle); +int mem_createmem(size_t memsize, int *handle); +int stdin_checkfile(char *urltype, char *infile, char *outfile); +int stdin_open(char *filename, int rwmode, int *handle); +int stdin2mem(int hd); +int stdin2file(int hd); +int stdout_close(int handle); +int mem_compress_openrw(char *filename, int rwmode, int *hdl); +int mem_compress_open(char *filename, int rwmode, int *hdl); +int mem_compress_stdin_open(char *filename, int rwmode, int *hdl); +int mem_iraf_open(char *filename, int rwmode, int *hdl); +int mem_rawfile_open(char *filename, int rwmode, int *hdl); +int mem_size(int handle, LONGLONG *filesize); +int mem_truncate(int handle, LONGLONG filesize); +int mem_close_free(int handle); +int mem_close_keep(int handle); +int mem_close_comp(int handle); +int mem_seek(int handle, LONGLONG offset); +int mem_read(int hdl, void *buffer, long nbytes); +int mem_write(int hdl, void *buffer, long nbytes); +int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl); + +int iraf2mem(char *filename, char **buffptr, size_t *buffsize, + size_t *filesize, int *status); + +/* root driver I/O routines */ + +int root_init(void); +int root_setoptions(int options); +int root_getoptions(int *options); +int root_getversion(int *version); +int root_shutdown(void); +int root_open(char *filename, int rwmode, int *driverhandle); +int root_create(char *filename, int *driverhandle); +int root_close(int driverhandle); +int root_flush(int driverhandle); +int root_seek(int driverhandle, LONGLONG offset); +int root_read (int driverhandle, void *buffer, long nbytes); +int root_write(int driverhandle, void *buffer, long nbytes); +int root_size(int handle, LONGLONG *filesize); + +/* http driver I/O routines */ + +int http_checkfile(char *urltype, char *infile, char *outfile); +int http_open(char *filename, int rwmode, int *driverhandle); +int http_file_open(char *filename, int rwmode, int *driverhandle); +int http_compress_open(char *filename, int rwmode, int *driverhandle); + +/* ftp driver I/O routines */ + +int ftp_checkfile(char *urltype, char *infile, char *outfile); +int ftp_open(char *filename, int rwmode, int *driverhandle); +int ftp_file_open(char *filename, int rwmode, int *driverhandle); +int ftp_compress_open(char *filename, int rwmode, int *driverhandle); + +int uncompress2mem(char *filename, FILE *diskfile, + char **buffptr, size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, int *status); + +int uncompress2mem_from_mem( + char *inmemptr, + size_t inmemsize, + char **buffptr, + size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, + int *status); + +int uncompress2file(char *filename, + FILE *indiskfile, + FILE *outdiskfile, + int *status); + +int compress2mem_from_mem( + char *inmemptr, + size_t inmemsize, + char **buffptr, + size_t *buffsize, + void *(*mem_realloc)(void *p, size_t newsize), + size_t *filesize, + int *status); + +int compress2file_from_mem( + char *inmemptr, + size_t inmemsize, + FILE *outdiskfile, + size_t *filesize, /* O - size of file, in bytes */ + int *status); + + +#ifdef HAVE_GSIFTP +/* prototypes for gsiftp driver I/O routines */ +#include "drvrgsiftp.h" +#endif + +#ifdef HAVE_SHMEM_SERVICES +/* prototypes for shared memory driver I/O routines */ +#include "drvrsmem.h" +#endif + +#if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || (defined(macintosh) && !defined(TARGET_API_MAC_CARBON)) +/* A hack for nonunix machines, which lack strcasecmp and strncasecmp */ +int strcasecmp (const char *s1, const char *s2 ); +int strncasecmp(const char *s1, const char *s2, size_t n); +#endif + +/* end of the entire "ifndef _FITSIO2_H" block */ +#endif diff --git a/software/cfitsio3040/getcol.c b/software/cfitsio3040/getcol.c new file mode 100644 index 000000000..37682520f --- /dev/null +++ b/software/cfitsio3040/getcol.c @@ -0,0 +1,1008 @@ + +/* This file, getcol.c, contains routines that read data elements from */ +/* a FITS image or table. There are generic datatype routines. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpxv( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *firstpix, /* I - coord of first pixel to read (1s based) */ + LONGLONG nelem, /* I - number of values to read */ + void *nulval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + LONGLONG tfirstpix[99]; + int naxis, ii; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + + for (ii=0; ii < naxis; ii++) + tfirstpix[ii] = firstpix[ii]; + + ffgpxvll(fptr, datatype, tfirstpix, nelem, nulval, array, anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpxvll( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG *firstpix, /* I - coord of first pixel to read (1s based) */ + LONGLONG nelem, /* I - number of values to read */ + void *nulval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + int naxis, ii; + char cdummy; + int nullcheck = 1; + LONGLONG naxes[9]; + LONGLONG dimsize = 1, firstelem; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + /* calculate the position of the first element in the array */ + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, datatype, firstelem, nelem, + nullcheck, nulval, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (datatype == TBYTE) + { + if (nulval == 0) + ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (unsigned char *) array, &cdummy, anynul, status); + else + ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned char *) nulval, + (unsigned char *) array, &cdummy, anynul, status); + } + else if (datatype == TSBYTE) + { + if (nulval == 0) + ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (signed char *) array, &cdummy, anynul, status); + else + ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, *(signed char *) nulval, + (signed char *) array, &cdummy, anynul, status); + } + else if (datatype == TUSHORT) + { + if (nulval == 0) + ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (unsigned short *) array, &cdummy, anynul, status); + else + ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned short *) nulval, + (unsigned short *) array, &cdummy, anynul, status); + } + else if (datatype == TSHORT) + { + if (nulval == 0) + ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (short *) array, &cdummy, anynul, status); + else + ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, *(short *) nulval, + (short *) array, &cdummy, anynul, status); + } + else if (datatype == TUINT) + { + if (nulval == 0) + ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (unsigned int *) array, &cdummy, anynul, status); + else + ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned int *) nulval, + (unsigned int *) array, &cdummy, anynul, status); + } + else if (datatype == TINT) + { + if (nulval == 0) + ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (int *) array, &cdummy, anynul, status); + else + ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, *(int *) nulval, + (int *) array, &cdummy, anynul, status); + } + else if (datatype == TULONG) + { + if (nulval == 0) + ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (unsigned long *) array, &cdummy, anynul, status); + else + ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned long *) nulval, + (unsigned long *) array, &cdummy, anynul, status); + } + else if (datatype == TLONG) + { + if (nulval == 0) + ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (long *) array, &cdummy, anynul, status); + else + ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, *(long *) nulval, + (long *) array, &cdummy, anynul, status); + } + else if (datatype == TLONGLONG) + { + if (nulval == 0) + ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (LONGLONG *) array, &cdummy, anynul, status); + else + ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, *(LONGLONG *) nulval, + (LONGLONG *) array, &cdummy, anynul, status); + } + else if (datatype == TFLOAT) + { + if (nulval == 0) + ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (float *) array, &cdummy, anynul, status); + else + ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, *(float *) nulval, + (float *) array, &cdummy, anynul, status); + } + else if (datatype == TDOUBLE) + { + if (nulval == 0) + ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, 0, + (double *) array, &cdummy, anynul, status); + else + ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, *(double *) nulval, + (double *) array, &cdummy, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpxf( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *firstpix, /* I - coord of first pixel to read (1s based) */ + LONGLONG nelem, /* I - number of values to read */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - returned array of null value flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + The nullarray values will = 1 if the corresponding array value is null. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + LONGLONG tfirstpix[99]; + int naxis, ii; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + + for (ii=0; ii < naxis; ii++) + tfirstpix[ii] = firstpix[ii]; + + ffgpxfll(fptr, datatype, tfirstpix, nelem, array, nullarray, anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpxfll( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG *firstpix, /* I - coord of first pixel to read (1s based) */ + LONGLONG nelem, /* I - number of values to read */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - returned array of null value flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + The nullarray values will = 1 if the corresponding array value is null. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + int naxis, ii; + int nullcheck = 2; + LONGLONG naxes[9]; + LONGLONG dimsize = 1, firstelem; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + /* calculate the position of the first element in the array */ + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, datatype, firstelem, nelem, + nullcheck, NULL, array, nullarray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (datatype == TBYTE) + { + ffgclb(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (unsigned char *) array, nullarray, anynul, status); + } + else if (datatype == TSBYTE) + { + ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (signed char *) array, nullarray, anynul, status); + } + else if (datatype == TUSHORT) + { + ffgclui(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (unsigned short *) array, nullarray, anynul, status); + } + else if (datatype == TSHORT) + { + ffgcli(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (short *) array, nullarray, anynul, status); + } + else if (datatype == TUINT) + { + ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (unsigned int *) array, nullarray, anynul, status); + } + else if (datatype == TINT) + { + ffgclk(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (int *) array, nullarray, anynul, status); + } + else if (datatype == TULONG) + { + ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (unsigned long *) array, nullarray, anynul, status); + } + else if (datatype == TLONG) + { + ffgclj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (long *) array, nullarray, anynul, status); + } + else if (datatype == TLONGLONG) + { + ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (LONGLONG *) array, nullarray, anynul, status); + } + else if (datatype == TFLOAT) + { + ffgcle(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (float *) array, nullarray, anynul, status); + } + else if (datatype == TDOUBLE) + { + ffgcld(fptr, 2, 1, firstelem, nelem, 1, 2, 0, + (double *) array, nullarray, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsv( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc , /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dim. */ + void *nulval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an section of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + int naxis; + long naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgisz(fptr, 9, naxes, status); + + if (datatype == TBYTE) + { + if (nulval == 0) + ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (unsigned char *) array, anynul, status); + else + ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned char *) nulval, + (unsigned char *) array, anynul, status); + } + else if (datatype == TSBYTE) + { + if (nulval == 0) + ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (signed char *) array, anynul, status); + else + ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, *(signed char *) nulval, + (signed char *) array, anynul, status); + } + else if (datatype == TUSHORT) + { + if (nulval == 0) + ffgsvui(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (unsigned short *) array, anynul, status); + else + ffgsvui(fptr, 1, naxis, naxes,blc, trc, inc, *(unsigned short *) nulval, + (unsigned short *) array, anynul, status); + } + else if (datatype == TSHORT) + { + if (nulval == 0) + ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (short *) array, anynul, status); + else + ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, *(short *) nulval, + (short *) array, anynul, status); + } + else if (datatype == TUINT) + { + if (nulval == 0) + ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (unsigned int *) array, anynul, status); + else + ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned int *) nulval, + (unsigned int *) array, anynul, status); + } + else if (datatype == TINT) + { + if (nulval == 0) + ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (int *) array, anynul, status); + else + ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, *(int *) nulval, + (int *) array, anynul, status); + } + else if (datatype == TULONG) + { + if (nulval == 0) + ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (unsigned long *) array, anynul, status); + else + ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned long *) nulval, + (unsigned long *) array, anynul, status); + } + else if (datatype == TLONG) + { + if (nulval == 0) + ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (long *) array, anynul, status); + else + ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, *(long *) nulval, + (long *) array, anynul, status); + } + else if (datatype == TLONGLONG) + { + if (nulval == 0) + ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (LONGLONG *) array, anynul, status); + else + ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, *(LONGLONG *) nulval, + (LONGLONG *) array, anynul, status); + } + else if (datatype == TFLOAT) + { + if (nulval == 0) + ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (float *) array, anynul, status); + else + ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, *(float *) nulval, + (float *) array, anynul, status); + } + else if (datatype == TDOUBLE) + { + if (nulval == 0) + ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, 0, + (double *) array, anynul, status); + else + ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, *(double *) nulval, + (double *) array, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpv( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + void *nulval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (datatype == TBYTE) + { + if (nulval == 0) + ffgpvb(fptr, 1, firstelem, nelem, 0, + (unsigned char *) array, anynul, status); + else + ffgpvb(fptr, 1, firstelem, nelem, *(unsigned char *) nulval, + (unsigned char *) array, anynul, status); + } + else if (datatype == TSBYTE) + { + if (nulval == 0) + ffgpvsb(fptr, 1, firstelem, nelem, 0, + (signed char *) array, anynul, status); + else + ffgpvsb(fptr, 1, firstelem, nelem, *(signed char *) nulval, + (signed char *) array, anynul, status); + } + else if (datatype == TUSHORT) + { + if (nulval == 0) + ffgpvui(fptr, 1, firstelem, nelem, 0, + (unsigned short *) array, anynul, status); + else + ffgpvui(fptr, 1, firstelem, nelem, *(unsigned short *) nulval, + (unsigned short *) array, anynul, status); + } + else if (datatype == TSHORT) + { + if (nulval == 0) + ffgpvi(fptr, 1, firstelem, nelem, 0, + (short *) array, anynul, status); + else + ffgpvi(fptr, 1, firstelem, nelem, *(short *) nulval, + (short *) array, anynul, status); + } + else if (datatype == TUINT) + { + if (nulval == 0) + ffgpvuk(fptr, 1, firstelem, nelem, 0, + (unsigned int *) array, anynul, status); + else + ffgpvuk(fptr, 1, firstelem, nelem, *(unsigned int *) nulval, + (unsigned int *) array, anynul, status); + } + else if (datatype == TINT) + { + if (nulval == 0) + ffgpvk(fptr, 1, firstelem, nelem, 0, + (int *) array, anynul, status); + else + ffgpvk(fptr, 1, firstelem, nelem, *(int *) nulval, + (int *) array, anynul, status); + } + else if (datatype == TULONG) + { + if (nulval == 0) + ffgpvuj(fptr, 1, firstelem, nelem, 0, + (unsigned long *) array, anynul, status); + else + ffgpvuj(fptr, 1, firstelem, nelem, *(unsigned long *) nulval, + (unsigned long *) array, anynul, status); + } + else if (datatype == TLONG) + { + if (nulval == 0) + ffgpvj(fptr, 1, firstelem, nelem, 0, + (long *) array, anynul, status); + else + ffgpvj(fptr, 1, firstelem, nelem, *(long *) nulval, + (long *) array, anynul, status); + } + else if (datatype == TLONGLONG) + { + if (nulval == 0) + ffgpvjj(fptr, 1, firstelem, nelem, 0, + (LONGLONG *) array, anynul, status); + else + ffgpvjj(fptr, 1, firstelem, nelem, *(LONGLONG *) nulval, + (LONGLONG *) array, anynul, status); + } + else if (datatype == TFLOAT) + { + if (nulval == 0) + ffgpve(fptr, 1, firstelem, nelem, 0, + (float *) array, anynul, status); + else + ffgpve(fptr, 1, firstelem, nelem, *(float *) nulval, + (float *) array, anynul, status); + } + else if (datatype == TDOUBLE) + { + if (nulval == 0) + ffgpvd(fptr, 1, firstelem, nelem, 0, + (double *) array, anynul, status); + else + { + ffgpvd(fptr, 1, firstelem, nelem, *(double *) nulval, + (double *) array, anynul, status); + } + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpf( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - array of null value flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + The nullarray values will = 1 if the corresponding array value is null. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (datatype == TBYTE) + { + ffgpfb(fptr, 1, firstelem, nelem, + (unsigned char *) array, nullarray, anynul, status); + } + else if (datatype == TSBYTE) + { + ffgpfsb(fptr, 1, firstelem, nelem, + (signed char *) array, nullarray, anynul, status); + } + else if (datatype == TUSHORT) + { + ffgpfui(fptr, 1, firstelem, nelem, + (unsigned short *) array, nullarray, anynul, status); + } + else if (datatype == TSHORT) + { + ffgpfi(fptr, 1, firstelem, nelem, + (short *) array, nullarray, anynul, status); + } + else if (datatype == TUINT) + { + ffgpfuk(fptr, 1, firstelem, nelem, + (unsigned int *) array, nullarray, anynul, status); + } + else if (datatype == TINT) + { + ffgpfk(fptr, 1, firstelem, nelem, + (int *) array, nullarray, anynul, status); + } + else if (datatype == TULONG) + { + ffgpfuj(fptr, 1, firstelem, nelem, + (unsigned long *) array, nullarray, anynul, status); + } + else if (datatype == TLONG) + { + ffgpfj(fptr, 1, firstelem, nelem, + (long *) array, nullarray, anynul, status); + } + else if (datatype == TLONGLONG) + { + ffgpfjj(fptr, 1, firstelem, nelem, + (LONGLONG *) array, nullarray, anynul, status); + } + else if (datatype == TFLOAT) + { + ffgpfe(fptr, 1, firstelem, nelem, + (float *) array, nullarray, anynul, status); + } + else if (datatype == TDOUBLE) + { + ffgpfd(fptr, 1, firstelem, nelem, + (double *) array, nullarray, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcv( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + void *nulval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a table column. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of true if any pixels are undefined. +*/ +{ + char cdummy[2]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TBIT) + { + ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status); + } + else if (datatype == TBYTE) + { + if (nulval == 0) + ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (unsigned char *) array, cdummy, anynul, status); + else + ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned char *) + nulval, (unsigned char *) array, cdummy, anynul, status); + } + else if (datatype == TSBYTE) + { + if (nulval == 0) + ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (signed char *) array, cdummy, anynul, status); + else + ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(signed char *) + nulval, (signed char *) array, cdummy, anynul, status); + } + else if (datatype == TUSHORT) + { + if (nulval == 0) + ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (unsigned short *) array, cdummy, anynul, status); + else + ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, + *(unsigned short *) nulval, + (unsigned short *) array, cdummy, anynul, status); + } + else if (datatype == TSHORT) + { + if (nulval == 0) + ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (short *) array, cdummy, anynul, status); + else + ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(short *) + nulval, (short *) array, cdummy, anynul, status); + } + else if (datatype == TUINT) + { + if (nulval == 0) + ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (unsigned int *) array, cdummy, anynul, status); + else + ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, + *(unsigned int *) nulval, (unsigned int *) array, cdummy, anynul, + status); + } + else if (datatype == TINT) + { + if (nulval == 0) + ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (int *) array, cdummy, anynul, status); + else + ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(int *) + nulval, (int *) array, cdummy, anynul, status); + } + else if (datatype == TULONG) + { + if (nulval == 0) + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (unsigned long *) array, cdummy, anynul, status); + else + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, + *(unsigned long *) nulval, + (unsigned long *) array, cdummy, anynul, status); + } + else if (datatype == TLONG) + { + if (nulval == 0) + ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (long *) array, cdummy, anynul, status); + else + ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(long *) + nulval, (long *) array, cdummy, anynul, status); + } + else if (datatype == TLONGLONG) + { + if (nulval == 0) + ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, + (LONGLONG *) array, cdummy, anynul, status); + else + ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(LONGLONG *) + nulval, (LONGLONG *) array, cdummy, anynul, status); + } + else if (datatype == TFLOAT) + { + if (nulval == 0) + ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0., + (float *) array, cdummy, anynul, status); + else + ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(float *) + nulval,(float *) array, cdummy, anynul, status); + } + else if (datatype == TDOUBLE) + { + if (nulval == 0) + ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0., + (double *) array, cdummy, anynul, status); + else + ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(double *) + nulval, (double *) array, cdummy, anynul, status); + } + else if (datatype == TCOMPLEX) + { + if (nulval == 0) + ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, 0., (float *) array, cdummy, anynul, status); + else + ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, *(float *) nulval, (float *) array, cdummy, anynul, status); + } + else if (datatype == TDBLCOMPLEX) + { + if (nulval == 0) + ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, 0., (double *) array, cdummy, anynul, status); + else + ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, *(double *) nulval, (double *) array, cdummy, anynul, status); + } + + else if (datatype == TLOGICAL) + { + if (nulval == 0) + ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, 0, + (char *) array, cdummy, anynul, status); + else + ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, *(char *) nulval, + (char *) array, cdummy, anynul, status); + } + else if (datatype == TSTRING) + { + if (nulval == 0) + { + cdummy[0] = '\0'; + ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, + cdummy, (char **) array, cdummy, anynul, status); + } + else + ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, (char *) + nulval, (char **) array, cdummy, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcf( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - array of null value flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a table column. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + ANYNUL is returned with a value of true if any pixels are undefined. +*/ +{ + void *nulval; /* dummy argument */ + double dnulval = 0.; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + nulval = &dnulval; /* set to a harmless value; this is never used */ + + if (datatype == TBIT) + { + ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status); + } + else if (datatype == TBYTE) + { + ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(unsigned char *) + nulval, (unsigned char *) array, nullarray, anynul, status); + } + else if (datatype == TSBYTE) + { + ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(signed char *) + nulval, (signed char *) array, nullarray, anynul, status); + } + else if (datatype == TUSHORT) + { + ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 2, + *(unsigned short *) nulval, + (unsigned short *) array, nullarray, anynul, status); + } + else if (datatype == TSHORT) + { + ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(short *) + nulval, (short *) array, nullarray, anynul, status); + } + else if (datatype == TUINT) + { + ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, + *(unsigned int *) nulval, (unsigned int *) array, nullarray, anynul, + status); + } + else if (datatype == TINT) + { + ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(int *) + nulval, (int *) array, nullarray, anynul, status); + } + else if (datatype == TULONG) + { + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, + *(unsigned long *) nulval, + (unsigned long *) array, nullarray, anynul, status); + } + else if (datatype == TLONG) + { + ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(long *) + nulval, (long *) array, nullarray, anynul, status); + } + else if (datatype == TLONGLONG) + { + ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(LONGLONG *) + nulval, (LONGLONG *) array, nullarray, anynul, status); + } + else if (datatype == TFLOAT) + { + ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(float *) + nulval,(float *) array, nullarray, anynul, status); + } + else if (datatype == TDOUBLE) + { + ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(double *) + nulval, (double *) array, nullarray, anynul, status); + } + else if (datatype == TCOMPLEX) + { + ffgcfc(fptr, colnum, firstrow, firstelem, nelem, + (float *) array, nullarray, anynul, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffgcfm(fptr, colnum, firstrow, firstelem, nelem, + (double *) array, nullarray, anynul, status); + } + + else if (datatype == TLOGICAL) + { + ffgcll(fptr, colnum, firstrow, firstelem, nelem, 2, *(char *) nulval, + (char *) array, nullarray, anynul, status); + } + else if (datatype == TSTRING) + { + ffgcls(fptr, colnum, firstrow, firstelem, nelem, 2, (char *) + nulval, (char **) array, nullarray, anynul, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} + diff --git a/software/cfitsio3040/getcolb.c b/software/cfitsio3040/getcolb.c new file mode 100644 index 000000000..9bc102883 --- /dev/null +++ b/software/cfitsio3040/getcolb.c @@ -0,0 +1,2001 @@ +/* This file, getcolb.c, contains routines that read data elements from */ +/* a FITS image or table, with unsigned char (unsigned byte) data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned char nulval, /* I - value for undefined pixels */ + unsigned char *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + unsigned char nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TBYTE, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclb(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned char *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TBYTE, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclb(fptr, 2, row, firstelem, nelem, 1, 2, 0, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2db(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned char nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3db(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3db(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned char nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + LONGLONG narray, nfits; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}; + LONGLONG lpixel[3]; + unsigned char nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TBYTE, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgclb(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgclb(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned char nulval, /* I - value to set undefined pixels */ + unsigned char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii, i0, i1, i2, i3, i4, i5, i6, i7, i8, row, rstr, rstp, rinc; + long str[9], stp[9], incr[9], dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + unsigned char nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvb is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TBYTE, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvb: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgclb(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned char *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + unsigned char nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvb is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TBYTE, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvb: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgclb(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + unsigned char *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclb(fptr, 1, row, firstelem, nelem, 1, 1, 0, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned char nulval, /* I - value for null pixels */ + unsigned char *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned char *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + unsigned char dummy = 0; + + ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgclb( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + unsigned char nulval, /* I - value for null pixels if nultyp = 1 */ + unsigned char *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre, ntodo; + long ii, xwidth; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + union u_tag { + char charval; + unsigned char ucharval; + } u; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status); + + /* special case */ + if (tcode == TLOGICAL && elemincre == 1) + { + u.ucharval = nulval; + ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, + u.charval, (char *) array, nularray, anynul, status); + + return(*status); + } + + if (strchr(tform,'A') != NULL) + { + if (*status == BAD_ELEM_NUM) + { + /* ignore this error message */ + *status = 0; + ffcmsg(); /* clear error stack */ + } + + /* interpret a 'A' ASCII column as a 'B' byte column ('8A' == '8B') */ + /* This is an undocumented 'feature' in CFITSIO */ + + /* we have to reset some of the values returned by ffgcpr */ + + tcode = TBYTE; + incre = 1; /* each element is 1 byte wide */ + repeat = twidth; /* total no. of chars in the col */ + twidth = 1; /* width of each element */ + scale = 1.0; /* no scaling */ + zero = 0.0; + tnull = NULL_UNDEFINED; /* don't test for nulls */ + maxelem = DBUFFSIZE; + } + + if (*status > 0) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING && hdutype == ASCII_TBL) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default, check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TBYTE) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, &array[next], status); + if (convert) + fffi1i1(&array[next], ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2i1((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4i1((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8i1( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4i1((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8i1((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + /* interpret the string as an ASCII formated number */ + fffstri1((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read bytes from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclb).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclb).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgextn( fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG offset, /* I - byte offset from start of extension data */ + LONGLONG nelem, /* I - number of elements to read */ + void *buffer, /* I - stream of bytes to read */ + int *status) /* IO - error status */ +/* + Read a stream of bytes from the current FITS HDU. This primative routine is mainly + for reading non-standard "conforming" extensions and should not be used + for standard IMAGE, TABLE or BINTABLE extensions. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + /* move to write position */ + ffmbyt(fptr, (fptr->Fptr)->datastart+ offset, IGNORE_EOF, status); + + /* read the buffer */ + ffgbyt(fptr, nelem, buffer, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1i1(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { /* this routine is normally not called in this case */ + memcpy(output, input, ntodo ); + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2i1(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4i1(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8i1(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4i1(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + /* use redundant boolean logic in following statement */ + /* to suppress irritating Borland compiler warning message */ + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8i1(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output,/* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstri1(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + unsigned char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcold.c b/software/cfitsio3040/getcold.c new file mode 100644 index 000000000..2eefab5c6 --- /dev/null +++ b/software/cfitsio3040/getcold.c @@ -0,0 +1,1676 @@ +/* This file, getcold.c, contains routines that read data elements from */ +/* a FITS image or table, with double datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double nulval, /* I - value for undefined pixels */ + double *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + double nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcld(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcld(fptr, 2, row, firstelem, nelem, 1, 2, 0., + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2dd(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + double nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + double *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3dd(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3dd(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + double nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + double *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + LONGLONG nfits, narray; + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}; + LONGLONG lpixel[3]; + double nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TDOUBLE, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcld(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcld(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvd(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + double nulval, /* I - value to set undefined pixels */ + double *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + double nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvd is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TDOUBLE, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvd: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgcld(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfd(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + double *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + double nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvd is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TDOUBLE, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvd: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcld(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + double *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcld(fptr, 1, row, firstelem, nelem, 1, 1, 0., + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvd(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double nulval, /* I - value for null pixels */ + double *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvm(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double nulval, /* I - value for null pixels */ + double *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. + + TSCAL and ZERO should not be used with complex values. +*/ +{ + char cdummy; + + /* a complex double value is interpreted as a pair of double values, */ + /* thus need to multiply the first element and number of elements by 2 */ + + ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, nulval, array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfd(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + double dummy = 0; + + ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfm(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + double *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. + + TSCAL and ZERO should not be used with complex values. +*/ +{ + long ii, jj; + float dummy = 0; + char *carray; + + /* a complex double value is interpreted as a pair of double values, */ + /* thus need to multiply the first element and number of elements by 2 */ + + /* allocate temporary array */ + carray = (char *) calloc( (size_t) (nelem * 2), 1); + + ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 2, dummy, array, carray, anynul, status); + + for (ii = 0, jj = 0; jj < nelem; ii += 2, jj++) + { + if (carray[ii] || carray[ii + 1]) + nularray[jj] = 1; + else + nularray[jj] = 0; + } + + free(carray); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcld( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + double nulval, /* I - value for null pixels if nultyp = 1 */ + double *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1, dtemp; + int tcode, hdutype, xcode, decimals, maxelem; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TDOUBLE) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, &array[next], status); + if (convert) + fffr8r8(&array[next], ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1r8((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2r8((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4r8((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8r8( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4r8((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstrr8((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgcld).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgcld).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = (long) (elemnum / repeat); + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (long) ((-elemnum - 1) / repeat + 1); + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1r8(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (double) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = input[ii] * scale + zero; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2r8(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (double) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = input[ii] * scale + zero; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4r8(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (double) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = input[ii] * scale + zero; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8r8(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (double) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = input[ii] * scale + zero; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4r8(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + output[ii] = (double) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = zero; + } + else + output[ii] = input[ii] * scale + zero; + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8r8(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + memcpy(output, input, ntodo * sizeof(double) ); + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = input[ii] * scale + zero; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + { + nullarray[ii] = 1; + /* explicitly set value in case output contains a NaN */ + output[ii] = DOUBLENULLVALUE; + } + } + else /* it's an underflow */ + output[ii] = 0; + } + else + output[ii] = input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + { + nullarray[ii] = 1; + /* explicitly set value in case output contains a NaN */ + output[ii] = DOUBLENULLVALUE; + } + } + else /* it's an underflow */ + output[ii] = zero; + } + else + output[ii] = input[ii] * scale + zero; + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstrr8(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + double nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + double *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + output[ii] = (dvalue * scale + zero); /* apply the scaling */ + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcole.c b/software/cfitsio3040/getcole.c new file mode 100644 index 000000000..5b4ab9a16 --- /dev/null +++ b/software/cfitsio3040/getcole.c @@ -0,0 +1,1679 @@ +/* This file, getcole.c, contains routines that read data elements from */ +/* a FITS image or table, with float datatype */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpve( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float nulval, /* I - value for undefined pixels */ + float *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + float nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TFLOAT, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcle(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfe( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TFLOAT, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcle(fptr, 2, row, firstelem, nelem, 1, 2, 0.F, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2de(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + float nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + float *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3de(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3de(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + float nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + float *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + LONGLONG narray, nfits; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}; + LONGLONG lpixel[3]; + float nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TFLOAT, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcle(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcle(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsve(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + float nulval, /* I - value to set undefined pixels */ + float *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + float nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsve is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TFLOAT, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsve: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgcle(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfe(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + float *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + float nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsve is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TFLOAT, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsve: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcle(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpe( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + float *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcle(fptr, 1, row, firstelem, nelem, 1, 1, 0.F, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcve(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float nulval, /* I - value for null pixels */ + float *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvc(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float nulval, /* I - value for null pixels */ + float *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. + + TSCAL and ZERO should not be used with complex values. +*/ +{ + char cdummy; + + /* a complex value is interpreted as a pair of float values, thus */ + /* need to multiply the first element and number of elements by 2 */ + + ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem *2, + 1, 1, nulval, array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfe(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + float dummy = 0; + + ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfc(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + float *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. + + TSCAL and ZERO should not be used with complex values. +*/ +{ + long ii, jj; + float dummy = 0; + char *carray; + + /* a complex value is interpreted as a pair of float values, thus */ + /* need to multiply the first element and number of elements by 2 */ + + /* allocate temporary array */ + carray = (char *) calloc( (size_t) (nelem * 2), 1); + + ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 2, dummy, array, carray, anynul, status); + + for (ii = 0, jj = 0; jj < nelem; ii += 2, jj++) + { + if (carray[ii] || carray[ii + 1]) + nularray[jj] = 1; + else + nularray[jj] = 0; + } + + free(carray); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcle( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + float nulval, /* I - value for null pixels if nultyp = 1 */ + float *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TFLOAT) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, &array[next], status); + if (convert) + fffr4r4(&array[next], ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1r4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2r4((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4r4((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8r4( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8r4((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstrr4((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgcle).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgcle).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1r4(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (( (double) input[ii] ) * scale + zero); + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (float) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = (float) (( (double) input[ii] ) * scale + zero); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2r4(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (float) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4r4(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (float) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8r4(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (float) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4r4(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + memcpy(output, input, ntodo * sizeof(float) ); + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + { + nullarray[ii] = 1; + /* explicitly set value in case output contains a NaN */ + output[ii] = FLOATNULLVALUE; + } + } + else /* it's an underflow */ + output[ii] = 0; + } + else + output[ii] = input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + { + nullarray[ii] = 1; + /* explicitly set value in case output contains a NaN */ + output[ii] = FLOATNULLVALUE; + } + } + else /* it's an underflow */ + output[ii] = (float) zero; + } + else + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8r4(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + output[ii] = (float) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = (float) zero; + } + else + output[ii] = (float) (input[ii] * scale + zero); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstrr4(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + float nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + float *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + output[ii] = (float) (dvalue * scale + zero); /* apply the scaling */ + + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcoli.c b/software/cfitsio3040/getcoli.c new file mode 100644 index 000000000..28bebd437 --- /dev/null +++ b/software/cfitsio3040/getcoli.c @@ -0,0 +1,1901 @@ +/* This file, getcoli.c, contains routines that read data elements from */ +/* a FITS image or table, with short datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvi( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + short nulval, /* I - value for undefined pixels */ + short *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + short nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + fits_read_compressed_pixels(fptr, TSHORT, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcli(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfi( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + short *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TSHORT, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcli(fptr, 2, row, firstelem, nelem, 1, 2, 0, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2di(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + short nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3di(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3di(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + short nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + LONGLONG nfits, narray; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}; + LONGLONG lpixel[3]; + short nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TSHORT, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcli(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcli(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvi(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + short nulval, /* I - value to set undefined pixels */ + short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + short nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TSHORT, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgcli(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfi(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + short *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + short nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TSHORT, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcli(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpi( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + short *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcli(fptr, 1, row, firstelem, nelem, 1, 1, 0, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvi(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + short nulval, /* I - value for null pixels */ + short *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfi(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + short *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + short dummy = 0; + + ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcli( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + short nulval, /* I - value for null pixels if nultyp = 1 */ + short *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TSHORT) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, &array[next], status); + if (convert) + fffi2i2(&array[next], ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONGLONG): + + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8i2( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1i2((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4i2((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4i2((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8i2((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstri2((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgcli).", + dtemp+1, dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgcli).", + dtemp+1, dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1i2(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (short) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2i2(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + memcpy(output, input, ntodo * sizeof(short) ); + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4i2(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8i2(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4i2(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (zero > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8i2(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (zero > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstri2(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcolj.c b/software/cfitsio3040/getcolj.c new file mode 100644 index 000000000..271836141 --- /dev/null +++ b/software/cfitsio3040/getcolj.c @@ -0,0 +1,3726 @@ +/* This file, getcolj.c, contains routines that read data elements from */ +/* a FITS image or table, with long data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long nulval, /* I - value for undefined pixels */ + long *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + long nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TLONG, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TLONG, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclj(fptr, 2, row, firstelem, nelem, 1, 2, 0L, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2dj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3dj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3dj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3], nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TLONG, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgclj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgclj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + long nulval, /* I - value to set undefined pixels */ + long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + long nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TLONG, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgclj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + long *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + long nulval = 0; + int hdutype, anyf; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TLONG, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgclj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + long *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclj(fptr, 1, row, firstelem, nelem, 1, 1, 0L, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long nulval, /* I - value for null pixels */ + long *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + long dummy = 0; + + ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgclj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + long nulval, /* I - value for null pixels if nultyp = 1 */ + long *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TLONG) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0. && LONGSIZE == 32) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], + status); + if (convert) + fffi4i4((INT32BIT *) &array[next], ntodo, scale, zero, + nulcheck, (INT32BIT) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8i4((LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1i4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2i4((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4i4((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8i4((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstri4((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclj).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclj).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1i4(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (long) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2i4(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (long) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4i4(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; + + Process the array of data in reverse order, to handle the case where + the input data is 4-bytes and the output is 8-bytes and the conversion + is being done in place in the same array. +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + output[ii] = (long) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = input[ii]; + + } + } + else /* must scale the data */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8i4(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < LONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > LONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < LONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > LONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4i4(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (zero > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8i4(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (input[ii] > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (zero > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstri4(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MIN; + } + else if (dvalue > DLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONG_MAX; + } + else + output[ii] = (long) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} + +/* ======================================================================== */ +/* the following routines support the 'long long' data type */ +/* ======================================================================== */ + +/*--------------------------------------------------------------------------*/ +int ffgpvjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + LONGLONG nulval, /* I - value for undefined pixels */ + LONGLONG *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + LONGLONG nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TLONGLONG, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcljj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + LONGLONG *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + LONGLONG dummy = 0; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TLONGLONG, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcljj(fptr, 2, row, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2djj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG nulval ,/* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG *array,/* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3djj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3djj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + LONGLONG *array,/* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3]; + LONGLONG nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TLONGLONG, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcljj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcljj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvjj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + LONGLONG nulval,/* I - value to set undefined pixels */ + LONGLONG *array,/* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + LONGLONG nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TLONGLONG, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgcljj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfjj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + LONGLONG *array,/* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + LONGLONG nulval = 0; + int hdutype, anyf; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TLONGLONG, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcljj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + LONGLONG *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + LONGLONG dummy = 0; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcljj(fptr, 1, row, firstelem, nelem, 1, 1, dummy, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvjj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + LONGLONG nulval, /* I - value for null pixels */ + LONGLONG *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfjj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + LONGLONG *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + LONGLONG dummy = 0; + + ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcljj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + LONGLONG nulval, /* I - value for null pixels if nultyp = 1 */ + LONGLONG *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TLONGLONG) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) &array[next], + status); + if (convert) + fffi8i8((LONGLONG *) &array[next], ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4i8((INT32BIT *) buffer, ntodo, scale, zero, + nulcheck, (INT32BIT) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1i8((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2i8((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4i8((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8i8((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstri8((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclj).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclj).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1i8(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (LONGLONG) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2i8(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (LONGLONG) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4i8(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (LONGLONG) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (LONGLONG) input[ii]; + + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8i8(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = input[ii]; + + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4i8(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (zero > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8i8(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (zero > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstri8(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + LONGLONG *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcolk.c b/software/cfitsio3040/getcolk.c new file mode 100644 index 000000000..0b2a50248 --- /dev/null +++ b/software/cfitsio3040/getcolk.c @@ -0,0 +1,1894 @@ +/* This file, getcolk.c, contains routines that read data elements from */ +/* a FITS image or table, with 'int' data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + int nulval, /* I - value for undefined pixels */ + int *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + int nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TINT, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclk(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + int *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TINT, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclk(fptr, 2, row, firstelem, nelem, 1, 2, 0L, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2dk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + int nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3dk(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3dk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + int nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3]; + int nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TINT, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgclk(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgclk(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + int nulval, /* I - value to set undefined pixels */ + int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + int nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TINT, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvk: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgclk(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + int *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + long nulval = 0; + int hdutype, anyf; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TINT, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgclk(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + int *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclk(fptr, 1, row, firstelem, nelem, 1, 1, 0L, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + int nulval, /* I - value for null pixels */ + int *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + int *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + int dummy = 0; + + ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgclk( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + int nulval, /* I - value for null pixels if nultyp = 1 */ + int *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power, dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int convert, nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* call the 'short' or 'long' version of this routine, if possible */ + if (sizeof(int) == sizeof(short)) + ffgcli(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, + (short) nulval, (short *) array, nularray, anynul, status); + else if (sizeof(int) == sizeof(long)) + ffgclj(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, + (long) nulval, (long *) array, nularray, anynul, status); + else + { + /* + This is a special case: sizeof(int) is not equal to sizeof(short) or + sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, + int = 4 bytes, and long = 8 bytes. + */ + + buffer = cbuff; + power = 1.; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + convert = 1; + if (tcode == TLONG) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + + if (nulcheck == 0 && scale == 1. && zero == 0.) + convert = 0; /* no need to scale data or find nulls */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], + status); + if (convert) + fffi4int((INT32BIT *) &array[next], ntodo, scale, zero, + nulcheck, (INT32BIT) tnull, nulval, + &nularray[next], anynul, &array[next], status); + break; + case (TLONGLONG): + + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8int( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1int((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2int((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4int((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8int((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstrint((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclk).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclk).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + } /* end of DEC Alpha special case */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1int(unsigned char *input,/* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (int) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2int(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (int) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4int(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (int) input[ii]; /* copy input to output */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (int) input[ii]; + + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8int(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < INT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > INT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < INT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > INT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4int(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (zero > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8int(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (zero > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstrint(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT_MAX; + } + else + output[ii] = (long) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcoll.c b/software/cfitsio3040/getcoll.c new file mode 100644 index 000000000..427247d41 --- /dev/null +++ b/software/cfitsio3040/getcoll.c @@ -0,0 +1,614 @@ +/* This file, getcoll.c, contains routines that read data elements from */ +/* a FITS image or table, with logical datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffgcvl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + char nulval, /* I - value for null pixels */ + char *array, /* O - array of values */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of logical values from a column in the current FITS HDU. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcll( fptr, colnum, firstrow, firstelem, nelem, 1, nulval, array, + &cdummy, anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + char *array, /* O - array of values */ + int *status) /* IO - error status */ +/* + !!!! THIS ROUTINE IS DEPRECATED AND SHOULD NOT BE USED !!!!!! + !!!! USE ffgcvl INSTEAD !!!!!! + Read an array of logical values from a column in the current FITS HDU. + No checking for null values will be performed. +*/ +{ + char nulval = 0; + int anynul; + + ffgcvl( fptr, colnum, firstrow, firstelem, nelem, nulval, array, + &anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + char *array, /* O - array of values */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of logical values from a column in the current FITS HDU. +*/ +{ + char nulval = 0; + + ffgcll( fptr, colnum, firstrow, firstelem, nelem, 2, nulval, array, + nularray, anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + char nulval, /* I - value for null pixels if nultyp = 1 */ + char *array, /* O - array of values */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of logical values from a column in the current FITS HDU. +*/ +{ + double dtemp; + int tcode, maxelem, hdutype, ii, nulcheck; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, readptr, tnull, rowlen, rownum, remain, next; + double scale, zero; + char tform[20]; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + unsigned char buffer[DBUFFSIZE], *buffptr; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode != TLOGICAL) + return(*status = NOT_LOGICAL_COL); + + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default, check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + /*---------------------------------------------------------------------*/ + /* Now read the logical values from the FITS column. */ + /*---------------------------------------------------------------------*/ + + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + ntodo = (long) remain; /* max number of elements to read at one time */ + + while (ntodo) + { + /* + limit the number of pixels to read at one time to the number that + remain in the current vector. + */ + ntodo = (long) minvalue(ntodo, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + readptr = startpos + (rowlen * rownum) + (elemnum * incre); + + ffgi1b(fptr, readptr, ntodo, incre, buffer, status); + + /* convert from T or F to 1 or 0 */ + buffptr = buffer; + for (ii = 0; ii < ntodo; ii++, next++, buffptr++) + { + if (*buffptr == 'T') + array[next] = 1; + else if (*buffptr =='F') + array[next] = 0; + else if (*buffptr == 0) + { + array[next] = nulval; /* set null values to input nulval */ + if (anynul) + *anynul = 1; + + if (nulcheck == 2) + { + nularray[next] = 1; /* set null flags */ + } + } + else /* some other illegal character; return the char value */ + { + array[next] = (char) *buffptr; + } + } + + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + sprintf(message, + "Error reading elements %.0f thruough %.0f of logical array (ffgcl).", + dtemp+1., dtemp + ntodo); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + elemnum += ntodo; + + if (elemnum == repeat) /* completed a row; start on later row */ + { + elemnum = 0; + rownum++; + } + } + ntodo = (long) remain; /* this is the maximum number to do in next loop */ + + } /* End of main while Loop */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcx( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG frow, /* I - first row to write (1 = 1st row) */ + LONGLONG fbit, /* I - first bit to write (1 = 1st) */ + LONGLONG nbit, /* I - number of bits to write */ + char *larray, /* O - array of logicals corresponding to bits */ + int *status) /* IO - error status */ +/* + read an array of logical values from a specified bit or byte + column of the binary table. larray is set = TRUE, if the corresponding + bit = 1, otherwise it is set to FALSE. + The binary table column being read from must have datatype 'B' or 'X'. +*/ +{ + LONGLONG bstart; + long offset, ndone, ii, repeat, bitloc, fbyte; + LONGLONG rstart, estart; + int tcode, descrp; + unsigned char cbuff; + static unsigned char onbit[8] = {128, 64, 32, 16, 8, 4, 2, 1}; + tcolumn *colptr; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check input parameters */ + if (nbit < 1) + return(*status); + else if (frow < 1) + return(*status = BAD_ROW_NUM); + else if (fbit < 1) + return(*status = BAD_ELEM_NUM); + + /* position to the correct HDU */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + fbyte = (long) ((fbit + 7) / 8); + bitloc = (long) (fbit - 1 - ((fbit - 1) / 8 * 8)); + ndone = 0; + rstart = frow - 1; + estart = fbyte - 1; + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (abs(tcode) > TBYTE) + return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ + + if (tcode > 0) + { + descrp = FALSE; /* not a variable length descriptor column */ + /* N.B: REPEAT is the number of bytes, not number of bits */ + repeat = (long) colptr->trepeat; + + if (tcode == TBIT) + repeat = (repeat + 7) / 8; /* convert from bits to bytes */ + + if (fbyte > repeat) + return(*status = BAD_ELEM_NUM); + + /* calc the i/o pointer location to start of sequence of pixels */ + bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + + colptr->tbcol + estart; + } + else + { + descrp = TRUE; /* a variable length descriptor column */ + /* only bit arrays (tform = 'X') are supported for variable */ + /* length arrays. REPEAT is the number of BITS in the array. */ + + ffgdes(fptr, colnum, frow, &repeat, &offset, status); + + if (tcode == -TBIT) + repeat = (repeat + 7) / 8; + + if ((fbit + nbit + 6) / 8 > repeat) + return(*status = BAD_ELEM_NUM); + + /* calc the i/o pointer location to start of sequence of pixels */ + bstart = (fptr->Fptr)->datastart + offset + (fptr->Fptr)->heapstart + estart; + } + + /* move the i/o pointer to the start of the pixel sequence */ + if (ffmbyt(fptr, bstart, REPORT_EOF, status) > 0) + return(*status); + + /* read the next byte */ + while (1) + { + if (ffgbyt(fptr, 1, &cbuff, status) > 0) + return(*status); + + for (ii = bitloc; (ii < 8) && (ndone < nbit); ii++, ndone++) + { + if(cbuff & onbit[ii]) /* test if bit is set */ + larray[ndone] = TRUE; + else + larray[ndone] = FALSE; + } + + if (ndone == nbit) /* finished all the bits */ + return(*status); + + /* not done, so get the next byte */ + if (!descrp) + { + estart++; + if (estart == repeat) + { + /* move the i/o pointer to the next row of pixels */ + estart = 0; + rstart = rstart + 1; + bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + + colptr->tbcol; + + ffmbyt(fptr, bstart, REPORT_EOF, status); + } + } + bitloc = 0; + } +} +/*--------------------------------------------------------------------------*/ +int ffgcxui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG nrows, /* I - no. of rows to read */ + long input_first_bit, /* I - first bit to read (1 = 1st) */ + int input_nbits, /* I - number of bits to read (<= 32) */ + unsigned short *array, /* O - array of integer values */ + int *status) /* IO - error status */ +/* + Read a consecutive string of bits from an 'X' or 'B' column and + interprete them as an unsigned integer. The number of bits must be + less than or equal to 16 or the total number of bits in the column, + which ever is less. +*/ +{ + int ii, firstbit, nbits, bytenum, startbit, numbits, endbit; + int firstbyte, lastbyte, nbytes, rshift, lshift; + unsigned short colbyte[5]; + tcolumn *colptr; + char message[81]; + + if (*status > 0 || nrows == 0) + return(*status); + + /* check input parameters */ + if (firstrow < 1) + { + sprintf(message, "Starting row number is less than 1: %ld (ffgcxui)", + (long) firstrow); + ffpmsg(message); + return(*status = BAD_ROW_NUM); + } + else if (input_first_bit < 1) + { + sprintf(message, "Starting bit number is less than 1: %ld (ffgcxui)", + input_first_bit); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + else if (input_nbits > 16) + { + sprintf(message, "Number of bits to read is > 16: %d (ffgcxui)", + input_nbits); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + + /* position to the correct HDU */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype != BINARY_TBL) + { + ffpmsg("This is not a binary table extension (ffgcxui)"); + return(*status = NOT_BTABLE); + } + + if (colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d (ffgcxui)", + colnum); + ffpmsg(message); + sprintf(message, " There are %d columns in this table.", + (fptr->Fptr)->tfield ); + ffpmsg(message); + + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + if (abs(colptr->tdatatype) > TBYTE) + { + ffpmsg("Can only read bits from X or B type columns. (ffgcxui)"); + return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ + } + + firstbyte = (input_first_bit - 1 ) / 8 + 1; + lastbyte = (input_first_bit + input_nbits - 2) / 8 + 1; + nbytes = lastbyte - firstbyte + 1; + + if (colptr->tdatatype == TBIT && + input_first_bit + input_nbits - 1 > (long) colptr->trepeat) + { + ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)"); + return(*status = BAD_ELEM_NUM); + } + else if (colptr->tdatatype == TBYTE && lastbyte > (long) colptr->trepeat) + { + ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)"); + return(*status = BAD_ELEM_NUM); + } + + for (ii = 0; ii < nrows; ii++) + { + /* read the relevant bytes from the row */ + if (ffgcvui(fptr, colnum, firstrow+ii, firstbyte, nbytes, 0, + colbyte, NULL, status) > 0) + { + ffpmsg("Error reading bytes from column (ffgcxui)"); + return(*status); + } + + firstbit = (input_first_bit - 1) % 8; /* modulus operator */ + nbits = input_nbits; + + array[ii] = 0; + + /* select and shift the bits from each byte into the output word */ + while(nbits) + { + bytenum = firstbit / 8; + + startbit = firstbit % 8; + numbits = minvalue(nbits, 8 - startbit); + endbit = startbit + numbits - 1; + + rshift = 7 - endbit; + lshift = nbits - numbits; + + array[ii] = ((colbyte[bytenum] >> rshift) << lshift) | array[ii]; + + nbits -= numbits; + firstbit += numbits; + } + } + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffgcxuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG nrows, /* I - no. of rows to read */ + long input_first_bit, /* I - first bit to read (1 = 1st) */ + int input_nbits, /* I - number of bits to read (<= 32) */ + unsigned int *array, /* O - array of integer values */ + int *status) /* IO - error status */ +/* + Read a consecutive string of bits from an 'X' or 'B' column and + interprete them as an unsigned integer. The number of bits must be + less than or equal to 32 or the total number of bits in the column, + which ever is less. +*/ +{ + int ii, firstbit, nbits, bytenum, startbit, numbits, endbit; + int firstbyte, lastbyte, nbytes, rshift, lshift; + unsigned int colbyte[5]; + tcolumn *colptr; + char message[81]; + + if (*status > 0 || nrows == 0) + return(*status); + + /* check input parameters */ + if (firstrow < 1) + { + sprintf(message, "Starting row number is less than 1: %ld (ffgcxuk)", + (long) firstrow); + ffpmsg(message); + return(*status = BAD_ROW_NUM); + } + else if (input_first_bit < 1) + { + sprintf(message, "Starting bit number is less than 1: %ld (ffgcxuk)", + input_first_bit); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + else if (input_nbits > 32) + { + sprintf(message, "Number of bits to read is > 32: %d (ffgcxuk)", + input_nbits); + ffpmsg(message); + return(*status = BAD_ELEM_NUM); + } + + /* position to the correct HDU */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if ((fptr->Fptr)->hdutype != BINARY_TBL) + { + ffpmsg("This is not a binary table extension (ffgcxuk)"); + return(*status = NOT_BTABLE); + } + + if (colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d (ffgcxuk)", + colnum); + ffpmsg(message); + sprintf(message, " There are %d columns in this table.", + (fptr->Fptr)->tfield ); + ffpmsg(message); + + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + if (abs(colptr->tdatatype) > TBYTE) + { + ffpmsg("Can only read bits from X or B type columns. (ffgcxuk)"); + return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ + } + + firstbyte = (input_first_bit - 1 ) / 8 + 1; + lastbyte = (input_first_bit + input_nbits - 2) / 8 + 1; + nbytes = lastbyte - firstbyte + 1; + + if (colptr->tdatatype == TBIT && + input_first_bit + input_nbits - 1 > (long) colptr->trepeat) + { + ffpmsg("Too many bits. Tried to read past width of column (ffgcxuk)"); + return(*status = BAD_ELEM_NUM); + } + else if (colptr->tdatatype == TBYTE && lastbyte > (long) colptr->trepeat) + { + ffpmsg("Too many bits. Tried to read past width of column (ffgcxuk)"); + return(*status = BAD_ELEM_NUM); + } + + for (ii = 0; ii < nrows; ii++) + { + /* read the relevant bytes from the row */ + if (ffgcvuk(fptr, colnum, firstrow+ii, firstbyte, nbytes, 0, + colbyte, NULL, status) > 0) + { + ffpmsg("Error reading bytes from column (ffgcxuk)"); + return(*status); + } + + firstbit = (input_first_bit - 1) % 8; /* modulus operator */ + nbits = input_nbits; + + array[ii] = 0; + + /* select and shift the bits from each byte into the output word */ + while(nbits) + { + bytenum = firstbit / 8; + + startbit = firstbit % 8; + numbits = minvalue(nbits, 8 - startbit); + endbit = startbit + numbits - 1; + + rshift = 7 - endbit; + lshift = nbits - numbits; + + array[ii] = ((colbyte[bytenum] >> rshift) << lshift) | array[ii]; + + nbits -= numbits; + firstbit += numbits; + } + } + + return(*status); +} diff --git a/software/cfitsio3040/getcols.c b/software/cfitsio3040/getcols.c new file mode 100644 index 000000000..76eb1a309 --- /dev/null +++ b/software/cfitsio3040/getcols.c @@ -0,0 +1,826 @@ +/* This file, getcols.c, contains routines that read data elements from */ +/* a FITS image or table, with a character string datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +/* stddef.h is apparently needed to define size_t */ +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffgcvs( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of strings to read */ + char *nulval, /* I - string for null pixels */ + char **array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of string values from a column in the current FITS HDU. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = null in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy[2]; + + ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, nulval, + array, cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfs( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of strings to read */ + char **array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of string values from a column in the current FITS HDU. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + char dummy[2]; + + ffgcls(fptr, colnum, firstrow, firstelem, nelem, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcls( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of strings to read */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + char *nulval, /* I - value for null pixels if nultyp = 1 */ + char **array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of string values from a column in the current FITS HDU. + Returns a formated string value, regardless of the datatype of the column +*/ +{ + int tcode, hdutype, tstatus, scaled, intcol, dwidth, nulwidth, ll, dlen; + long ii, jj; + tcolumn *colptr; + char message[FLEN_ERRMSG], *carray, keyname[FLEN_KEYWORD]; + char cform[20], dispfmt[20], tmpstr[400], *flgarray, tmpnull[80]; + unsigned char byteval; + float *earray; + double *darray, tscale = 1.0; + LONGLONG *llarray; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d", + colnum); + ffpmsg(message); + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + tcode = abs(colptr->tdatatype); + + if (tcode == TSTRING) + { + /* simply call the string column reading routine */ + ffgcls2(fptr, colnum, firstrow, firstelem, nelem, nultyp, nulval, + array, nularray, anynul, status); + } + else if (tcode == TLOGICAL) + { + /* allocate memory for the array of logical values */ + carray = (char *) malloc((size_t) nelem); + + /* call the logical column reading routine */ + ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, *nulval, + carray, nularray, anynul, status); + + if (*status <= 0) + { + /* convert logical values to "T", "F", or "N" (Null) */ + for (ii = 0; ii < nelem; ii++) + { + if (carray[ii] == 1) + strcpy(array[ii], "T"); + else if (carray[ii] == 0) + strcpy(array[ii], "F"); + else /* undefined values = 2 */ + strcpy(array[ii],"N"); + } + } + + free(carray); /* free the memory */ + } + else if (tcode == TCOMPLEX) + { + /* allocate memory for the array of double values */ + earray = (float *) calloc((size_t) (nelem * 2), sizeof(float) ); + + ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, FLOATNULLVALUE, earray, nularray, anynul, status); + + if (*status <= 0) + { + + /* determine the format for the output strings */ + + ffgcdw(fptr, colnum, &dwidth, status); + dwidth = (dwidth - 3) / 2; + + /* use the TDISPn keyword if it exists */ + ffkeyn("TDISP", colnum, keyname, status); + tstatus = 0; + cform[0] = '\0'; + + if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) + { + /* convert the Fortran style format to a C style format */ + ffcdsp(dispfmt, cform); + } + + if (!cform[0]) + strcpy(cform, "%14.6E"); + + /* write the formated string for each value: "(real,imag)" */ + jj = 0; + for (ii = 0; ii < nelem; ii++) + { + strcpy(array[ii], "("); + + /* test for null value */ + if (earray[jj] == FLOATNULLVALUE) + { + strcpy(tmpstr, "NULL"); + if (nultyp == 2) + nularray[ii] = 1; + } + else + sprintf(tmpstr, cform, earray[jj]); + + strncat(array[ii], tmpstr, dwidth); + strcat(array[ii], ","); + jj++; + + /* test for null value */ + if (earray[jj] == FLOATNULLVALUE) + { + strcpy(tmpstr, "NULL"); + if (nultyp == 2) + nularray[ii] = 1; + } + else + sprintf(tmpstr, cform, earray[jj]); + + strncat(array[ii], tmpstr, dwidth); + strcat(array[ii], ")"); + jj++; + } + } + + free(earray); /* free the memory */ + } + else if (tcode == TDBLCOMPLEX) + { + /* allocate memory for the array of double values */ + darray = (double *) calloc((size_t) (nelem * 2), sizeof(double) ); + + ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + 1, 1, DOUBLENULLVALUE, darray, nularray, anynul, status); + + if (*status <= 0) + { + /* determine the format for the output strings */ + + ffgcdw(fptr, colnum, &dwidth, status); + dwidth = (dwidth - 3) / 2; + + /* use the TDISPn keyword if it exists */ + ffkeyn("TDISP", colnum, keyname, status); + tstatus = 0; + cform[0] = '\0'; + + if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) + { + /* convert the Fortran style format to a C style format */ + ffcdsp(dispfmt, cform); + } + + if (!cform[0]) + strcpy(cform, "%23.15E"); + + /* write the formated string for each value: "(real,imag)" */ + jj = 0; + for (ii = 0; ii < nelem; ii++) + { + strcpy(array[ii], "("); + + /* test for null value */ + if (darray[jj] == DOUBLENULLVALUE) + { + strcpy(tmpstr, "NULL"); + if (nultyp == 2) + nularray[ii] = 1; + } + else + sprintf(tmpstr, cform, darray[jj]); + + strncat(array[ii], tmpstr, dwidth); + strcat(array[ii], ","); + jj++; + + /* test for null value */ + if (darray[jj] == DOUBLENULLVALUE) + { + strcpy(tmpstr, "NULL"); + if (nultyp == 2) + nularray[ii] = 1; + } + else + sprintf(tmpstr, cform, darray[jj]); + + strncat(array[ii], tmpstr, dwidth); + strcat(array[ii], ")"); + jj++; + } + } + + free(darray); /* free the memory */ + } + else if (tcode == TLONGLONG) + { + /* allocate memory for the array of LONGLONG values */ + llarray = (LONGLONG *) calloc((size_t) nelem, sizeof(LONGLONG) ); + flgarray = (char *) calloc((size_t) nelem, sizeof(char) ); + dwidth = 20; /* max width of displayed long long integer value */ + + if (ffgcfjj(fptr, colnum, firstrow, firstelem, nelem, + llarray, flgarray, anynul, status) > 0) + { + free(flgarray); + free(llarray); + return(*status); + } + + /* write the formated string for each value */ + if (nulval) { + strcpy(tmpnull, nulval); + nulwidth = strlen(nulval); + } else { + strcpy(tmpnull, " "); + nulwidth = 1; + } + + for (ii = 0; ii < nelem; ii++) + { + if ( flgarray[ii] ) + { + *array[ii] = '\0'; + if (dwidth < nulwidth) + strncat(array[ii], tmpnull, dwidth); + else + sprintf(array[ii],"%*s",dwidth,tmpnull); + + if (nultyp == 2) + nularray[ii] = 1; + } + else + { + +#if defined(_MSC_VER) + /* Microsoft Visual C++ 6.0 uses '%I64d' syntax for 8-byte integers */ + sprintf(tmpstr, "%20I64d", llarray[ii]); +#elif (USE_LL_SUFFIX == 1) + sprintf(tmpstr, "%20lld", llarray[ii]); +#else + sprintf(tmpstr, "%20ld", llarray[ii]); +#endif + *array[ii] = '\0'; + strncat(array[ii], tmpstr, 20); + } + } + + free(flgarray); + free(llarray); /* free the memory */ + + } + else + { + /* allocate memory for the array of double values */ + darray = (double *) calloc((size_t) nelem, sizeof(double) ); + + /* read all other numeric type columns as doubles */ + if (ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, nultyp, + DOUBLENULLVALUE, darray, nularray, anynul, status) > 0) + { + free(darray); + return(*status); + } + + /* determine the format for the output strings */ + + ffgcdw(fptr, colnum, &dwidth, status); + + /* check if column is scaled */ + ffkeyn("TSCAL", colnum, keyname, status); + tstatus = 0; + scaled = 0; + if (ffgkyd(fptr, keyname, &tscale, NULL, &tstatus) == 0) + { + if (tscale != 1.0) + scaled = 1; /* yes, this is a scaled column */ + } + + intcol = 0; + if (tcode <= TLONG && !scaled) + intcol = 1; /* this is an unscaled integer column */ + + /* use the TDISPn keyword if it exists */ + ffkeyn("TDISP", colnum, keyname, status); + tstatus = 0; + cform[0] = '\0'; + + if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) + { + /* convert the Fortran style TDISPn to a C style format */ + ffcdsp(dispfmt, cform); + } + + if (!cform[0]) + { + /* no TDISPn keyword; use TFORMn instead */ + + ffkeyn("TFORM", colnum, keyname, status); + ffgkys(fptr, keyname, dispfmt, NULL, status); + + if (scaled && tcode <= TSHORT) + { + /* scaled short integer column == float */ + strcpy(cform, "%#14.6G"); + } + else if (scaled && tcode == TLONG) + { + /* scaled long integer column == double */ + strcpy(cform, "%#23.15G"); + } + else + { + ffghdt(fptr, &hdutype, status); + if (hdutype == ASCII_TBL) + { + /* convert the Fortran style TFORMn to a C style format */ + ffcdsp(dispfmt, cform); + } + else + { + /* this is a binary table, need to convert the format */ + if (tcode == TBIT) { /* 'X' */ + strcpy(cform, "%4d"); + } else if (tcode == TBYTE) { /* 'B' */ + strcpy(cform, "%4d"); + } else if (tcode == TSHORT) { /* 'I' */ + strcpy(cform, "%6d"); + } else if (tcode == TLONG) { /* 'J' */ + strcpy(cform, "%11.0f"); + intcol = 0; /* needed to support unsigned int */ + } else if (tcode == TFLOAT) { /* 'E' */ + strcpy(cform, "%#14.6G"); + } else if (tcode == TDOUBLE) { /* 'D' */ + strcpy(cform, "%#23.15G"); + } + } + } + } + + if (nulval) { + strcpy(tmpnull, nulval); + nulwidth = strlen(nulval); + } else { + strcpy(tmpnull, " "); + nulwidth = 1; + } + + /* write the formated string for each value */ + for (ii = 0; ii < nelem; ii++) + { + if (tcode == TBIT) + { + byteval = (char) darray[ii]; + + for (ll=0; ll < 8; ll++) + { + if ( ((unsigned char) (byteval << ll)) >> 7 ) + *(array[ii] + ll) = '1'; + else + *(array[ii] + ll) = '0'; + } + *(array[ii] + 8) = '\0'; + } + /* test for null value */ + else if ( (nultyp == 1 && darray[ii] == DOUBLENULLVALUE) || + (nultyp == 2 && nularray[ii]) ) + { + *array[ii] = '\0'; + if (dwidth < nulwidth) + strncat(array[ii], tmpnull, dwidth); + else + sprintf(array[ii],"%*s",dwidth,tmpnull); + } + else + { + if (intcol) + sprintf(tmpstr, cform, (int) darray[ii]); + else + sprintf(tmpstr, cform, darray[ii]); + + /* fill field with '*' if number is too wide */ + dlen = strlen(tmpstr); + if (dlen > dwidth) { + memset(tmpstr, '*', dwidth); + } + + *array[ii] = '\0'; + strncat(array[ii], tmpstr, dwidth); + } + } + + free(darray); /* free the memory */ + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcdw( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column (1 = 1st col) */ + int *width, /* O - display width */ + int *status) /* IO - error status */ +/* + Get Column Display Width. +*/ +{ + tcolumn *colptr; + char *cptr; + char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], dispfmt[20]; + int tcode, hdutype, tstatus, scaled; + double tscale; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d", + colnum); + ffpmsg(message); + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + tcode = abs(colptr->tdatatype); + + /* use the TDISPn keyword if it exists */ + ffkeyn("TDISP", colnum, keyname, status); + + *width = 0; + tstatus = 0; + if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) + { + /* parse TDISPn get the display width */ + cptr = dispfmt; + while(*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == 'A' || *cptr == 'a' || + *cptr == 'I' || *cptr == 'i' || + *cptr == 'O' || *cptr == 'o' || + *cptr == 'Z' || *cptr == 'z' || + *cptr == 'F' || *cptr == 'f' || + *cptr == 'E' || *cptr == 'e' || + *cptr == 'D' || *cptr == 'd' || + *cptr == 'G' || *cptr == 'g') + { + + while(!isdigit((int) *cptr) && *cptr != '\0') /* find 1st digit */ + cptr++; + + *width = atoi(cptr); + if (tcode >= TCOMPLEX) + *width = (2 * (*width)) + 3; + } + } + + if (*width == 0) + { + /* no valid TDISPn keyword; use TFORMn instead */ + + ffkeyn("TFORM", colnum, keyname, status); + ffgkys(fptr, keyname, dispfmt, NULL, status); + + /* check if column is scaled */ + ffkeyn("TSCAL", colnum, keyname, status); + tstatus = 0; + scaled = 0; + + if (ffgkyd(fptr, keyname, &tscale, NULL, &tstatus) == 0) + { + if (tscale != 1.0) + scaled = 1; /* yes, this is a scaled column */ + } + + if (scaled && tcode <= TSHORT) + { + /* scaled short integer col == float; default format is 14.6G */ + *width = 14; + } + else if (scaled && tcode == TLONG) + { + /* scaled long integer col == double; default format is 23.15G */ + *width = 23; + } + else + { + ffghdt(fptr, &hdutype, status); /* get type of table */ + if (hdutype == ASCII_TBL) + { + /* parse TFORMn get the display width */ + cptr = dispfmt; + while(!isdigit((int) *cptr) && *cptr != '\0') /* find 1st digit */ + cptr++; + + *width = atoi(cptr); + } + else + { + /* this is a binary table */ + if (tcode == TBIT) /* 'X' */ + *width = 8; + else if (tcode == TBYTE) /* 'B' */ + *width = 4; + else if (tcode == TSHORT) /* 'I' */ + *width = 6; + else if (tcode == TLONG) /* 'J' */ + *width = 11; + else if (tcode == TLONGLONG) /* 'K' */ + *width = 20; + else if (tcode == TFLOAT) /* 'E' */ + *width = 14; + else if (tcode == TDOUBLE) /* 'D' */ + *width = 23; + else if (tcode == TCOMPLEX) /* 'C' */ + *width = 31; + else if (tcode == TDBLCOMPLEX) /* 'M' */ + *width = 49; + else if (tcode == TLOGICAL) /* 'L' */ + *width = 1; + else if (tcode == TSTRING) /* 'A' */ + { + cptr = dispfmt; + while(!isdigit((int) *cptr) && *cptr != '\0') + cptr++; + + *width = atoi(cptr); + + if (*width < 1) + *width = 1; /* default is at least 1 column */ + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcls2 ( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of strings to read */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + char *nulval, /* I - value for null pixels if nultyp = 1 */ + char **array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of string values from a column in the current FITS HDU. +*/ +{ + double dtemp; + long nullen; + int tcode, maxelem, hdutype, nulcheck; + long twidth, incre; + long ii, jj, ntodo; + LONGLONG repeat, startpos, elemnum, readptr, tnull, rowlen, rownum, remain, next; + double scale, zero; + char tform[20]; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + tcolumn *colptr; + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + char *buffer, *arrayptr; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d", + colnum); + ffpmsg(message); + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + tcode = colptr->tdatatype; + + if (tcode == -TSTRING) /* variable length column in a binary table? */ + { + /* only read a single string; ignore value of firstelem */ + + if (ffgcprll( fptr, colnum, firstrow, 1, 1, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + remain = 1; + twidth = (long) repeat; + } + else if (tcode == TSTRING) + { + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + remain = nelem; + } + else + return(*status = NOT_ASCII_COL); + + nullen = strlen(snull); /* length of the undefined pixel string */ + if (nullen == 0) + nullen = 1; + + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (nultyp == 1 && nulval && nulval[0] == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; /* null value string in ASCII table not defined */ + + else if (nullen > twidth) + nulcheck = 0; /* null value string is longer than width of column */ + /* thus impossible for any column elements to = null */ + + /*---------------------------------------------------------------------*/ + /* Now read the strings one at a time from the FITS column. */ + /*---------------------------------------------------------------------*/ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + ffmbyt(fptr, readptr, REPORT_EOF, status); /* move to read position */ + + /* read the array of strings from the FITS file into the buffer */ + + if (incre == twidth) + ffgbyt(fptr, ntodo * twidth, cbuff, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, cbuff, status); + + /* copy from the buffer into the user's array of strings */ + /* work backwards from last char of last string to 1st char of 1st */ + + buffer = ((char *) cbuff) + (ntodo * twidth) - 1; + + for (ii = (long) (next + ntodo - 1); ii >= next; ii--) + { + arrayptr = array[ii] + twidth - 1; + + for (jj = twidth - 1; jj > 0; jj--) /* ignore trailing blanks */ + { + if (*buffer == ' ') + { + buffer--; + arrayptr--; + } + else + break; + } + *(arrayptr + 1) = 0; /* write the string terminator */ + + for (; jj >= 0; jj--) /* copy the string itself */ + { + *arrayptr = *buffer; + buffer--; + arrayptr--; + } + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (nulcheck && !strncmp(snull, array[ii], nullen) ) + { + *anynul = 1; /* this is a null value */ + if (nultyp == 1) { + + if (nulval) + strcpy(array[ii], nulval); + else + strcpy(array[ii], " "); + + } else + nularray[ii] = 1; + } + } + + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + sprintf(message, + "Error reading elements %.0f thru %.0f of data array (ffpcls).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + next += ntodo; + remain -= ntodo; + if (remain) + { + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + return(*status); +} + diff --git a/software/cfitsio3040/getcolsb.c b/software/cfitsio3040/getcolsb.c new file mode 100644 index 000000000..7f29ca0e9 --- /dev/null +++ b/software/cfitsio3040/getcolsb.c @@ -0,0 +1,1991 @@ +/* This file, getcolsb.c, contains routines that read data elements from */ +/* a FITS image or table, with signed char (signed byte) data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + signed char nulval, /* I - value for undefined pixels */ + signed char *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + signed char nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TSBYTE, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclsb(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + signed char *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TSBYTE, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclsb(fptr, 2, row, firstelem, nelem, 1, 2, 0, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2dsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + signed char nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + signed char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3dsb(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3dsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + signed char nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + signed char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + LONGLONG nfits, narray; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}; + LONGLONG lpixel[3]; + signed char nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TSBYTE, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgclsb(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgclsb(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvsb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + signed char nulval, /* I - value to set undefined pixels */ + signed char *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii, i0, i1, i2, i3, i4, i5, i6, i7, i8, row, rstr, rstp, rinc; + long str[9], stp[9], incr[9], dir[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + signed char nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvsb is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TSBYTE, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + dir[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + if (hdutype == IMAGE_HDU) + { + dir[ii] = -1; + } + else + { + sprintf(msg, "ffgsvsb: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + dsize[ii] = dsize[ii] * dir[ii]; + } + dsize[naxis] = dsize[naxis] * dir[naxis]; + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; + ninc = incr[0] * dir[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) + { + for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) + { + for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) + { + for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) + { + for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) + { + for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) + { + for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) + { + for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) + { + + felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; + + if ( ffgclsb(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfsb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + signed char *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + signed char nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvsb is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TSBYTE, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvsb: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgclsb(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpsb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + signed char *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclsb(fptr, 1, row, firstelem, nelem, 1, 1, 0, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvsb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + signed char nulval, /* I - value for null pixels */ + signed char *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfsb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + signed char *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + signed char dummy = 0; + + ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgclsb(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + signed char nulval, /* I - value for null pixels if nultyp = 1 */ + signed char *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int nulcheck, readcheck = 0; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + union u_tag { + char charval; + signed char scharval; + } u; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (elemincre < 0) + readcheck = -1; /* don't do range checking in this case */ + + ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status); + + /* special case: read column of T/F logicals */ + if (tcode == TLOGICAL && elemincre == 1) + { + u.scharval = nulval; + ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, + u.charval, (char *) array, nularray, anynul, status); + + return(*status); + } + + if (strchr(tform,'A') != NULL) + { + if (*status == BAD_ELEM_NUM) + { + /* ignore this error message */ + *status = 0; + ffcmsg(); /* clear error stack */ + } + + /* interpret a 'A' ASCII column as a 'B' byte column ('8A' == '8B') */ + /* This is an undocumented 'feature' in CFITSIO */ + + /* we have to reset some of the values returned by ffgcpr */ + + tcode = TBYTE; + incre = 1; /* each element is 1 byte wide */ + repeat = twidth; /* total no. of chars in the col */ + twidth = 1; /* width of each element */ + scale = 1.0; /* no scaling */ + zero = 0.0; + tnull = NULL_UNDEFINED; /* don't test for nulls */ + maxelem = DBUFFSIZE; + } + + if (*status > 0) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING && hdutype == ASCII_TBL) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default, check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + if (elemincre >= 0) + { + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + } + else + { + ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); + } + + readptr = startpos + (rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) &array[next], status); + fffi1s1((unsigned char *)&array[next], ntodo, scale, zero, + nulcheck, (unsigned char) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2s1((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4s1((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONGLONG): + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8s1( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4s1((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8s1((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + /* interpret the string as an ASCII formated number */ + fffstrs1((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read bytes from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclsb).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclsb).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + else if (elemnum < 0) /* completed a row; start on a previous row */ + { + rowincre = (-elemnum - 1) / repeat + 1; + rownum -= rowincre; + elemnum = (rowincre * repeat) + elemnum; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1s1(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == -128.) + { + /* Instead of subtracting 128, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(signed char *) &input[ii] ) ^ 0x80; + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; /* copy input */ + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == -128.) + { + /* Instead of subtracting 128, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = ( *(signed char *) &input[ii] ) ^ 0x80; + } + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2s1(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + + else + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4s1(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8s1(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < -128) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > 127) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4s1(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + /* use redundant boolean logic in following statement */ + /* to suppress irritating Borland compiler warning message */ + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (zero > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8s1(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (input[ii] > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (zero > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstrs1(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + signed char nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + signed char *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DSCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = -128; + } + else if (dvalue > DSCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = 127; + } + else + output[ii] = (signed char) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcolui.c b/software/cfitsio3040/getcolui.c new file mode 100644 index 000000000..5aaf4fd3d --- /dev/null +++ b/software/cfitsio3040/getcolui.c @@ -0,0 +1,1907 @@ +/* This file, getcolui.c, contains routines that read data elements from */ +/* a FITS image or table, with unsigned short datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvui( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned short nulval, /* I - value for undefined pixels */ + unsigned short *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + unsigned short nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TUSHORT, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclui(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfui( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned short *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TUSHORT, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclui(fptr, 2, row, firstelem, nelem, 1, 2, 0, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2dui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned short nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3dui(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3dui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned short nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3]; + unsigned short nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TUSHORT, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgclui(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgclui(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned short nulval, /* I - value to set undefined pixels */ + unsigned short *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + unsigned short nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvui is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TUSHORT, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvui: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + if ( ffgclui(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned short *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + int hdutype, anyf; + unsigned short nulval = 0; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TUSHORT, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgclui(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpui( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + unsigned short *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgclui(fptr, 1, row, firstelem, nelem, 1, 1, 0, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned short nulval, /* I - value for null pixels */ + unsigned short *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned short *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + unsigned short dummy = 0; + + ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgclui( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + unsigned short nulval, /* I - value for null pixels if nultyp = 1 */ + unsigned short *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int nulcheck; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + if (tcode == TSHORT) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, + (short *) &array[next], status); + fffi2u2((short *) &array[next], ntodo, scale, + zero, nulcheck, (short) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TLONGLONG): + + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8u2( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1u2((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, + status); + fffi4u2((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, + (INT32BIT) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4u2((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8u2((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstru2((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgclui).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgclui).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1u2(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (unsigned short) input[ii]; /* copy input */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2u2(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 32768.) + { + /* Instead of adding 32768, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000; + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned short) input[ii]; /* copy input */ + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 32768.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000; + } + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned short) input[ii]; /* copy input */ + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4u2(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > USHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > USHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8u2(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > USHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > USHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4u2(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8u2(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstru2(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned short *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DUSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = USHRT_MAX; + } + else + output[ii] = (unsigned short) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcoluj.c b/software/cfitsio3040/getcoluj.c new file mode 100644 index 000000000..2f4775d2b --- /dev/null +++ b/software/cfitsio3040/getcoluj.c @@ -0,0 +1,1901 @@ +/* This file, getcoluj.c, contains routines that read data elements from */ +/* a FITS image or table, with unsigned long data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvuj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned long nulval, /* I - value for undefined pixels */ + unsigned long *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + unsigned long nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TULONG, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfuj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned long *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TULONG, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluj(fptr, 2, row, firstelem, nelem, 1, 2, 0L, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2duj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned long nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3duj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3duj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned long nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3]; + unsigned long nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TULONG, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcluj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcluj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvuj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned long nulval, /* I - value to set undefined pixels */ + unsigned long *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + unsigned long nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvuj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TULONG, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvuj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcluj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfuj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned long *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + unsigned long nulval = 0; + int hdutype, anyf; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TULONG, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcluj(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpuj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + unsigned long *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluj(fptr, 1, row, firstelem, nelem, 1, 1, 0L, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvuj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned long nulval, /* I - value for null pixels */ + unsigned long *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfuj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned long *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + unsigned long dummy = 0; + + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcluj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + unsigned long nulval, /* I - value for null pixels if nultyp = 1 */ + unsigned long *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int nulcheck; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + if (tcode == TLONG) /* Special Case: */ + { /* no type convertion required, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], + status); + fffi4u4((INT32BIT *) &array[next], ntodo, scale, zero, + nulcheck, (INT32BIT) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TLONGLONG): + + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8u4( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1u4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2u4((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4u4((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8u4((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstru4((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgcluj).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgcluj).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1u4(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (unsigned long) input[ii]; /* copy input */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2u4(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4u4(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; + + Process the array of data in reverse order, to handle the case where + the input data is 4-bytes and the output is 8-bytes and the conversion + is being done in place in the same array. +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 2147483648.) + { + /* Instead of adding 2147483648, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = ntodo - 1; ii >= 0; ii--) + output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned long) input[ii]; /* copy input */ + } + } + else /* must scale the data */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 2147483648.) + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; + } + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned long) input[ii]; /* copy input */ + } + } + else /* must scale the data */ + { + for (ii = ntodo - 1; ii >= 0; ii--) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8u4(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > ULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > ULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4u4(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8u4(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstru4(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned long *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DULONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DULONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = ULONG_MAX; + } + else + output[ii] = (unsigned long) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getcoluk.c b/software/cfitsio3040/getcoluk.c new file mode 100644 index 000000000..5a927abb3 --- /dev/null +++ b/software/cfitsio3040/getcoluk.c @@ -0,0 +1,1916 @@ +/* This file, getcolk.c, contains routines that read data elements from */ +/* a FITS image or table, with 'unsigned int' data type. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffgpvuk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned int nulval, /* I - value for undefined pixels */ + unsigned int *array, /* O - array of values that are returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Undefined elements will be set equal to NULVAL, unless NULVAL=0 + in which case no checking for undefined values will be performed. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + char cdummy; + int nullcheck = 1; + unsigned int nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_pixels(fptr, TUINT, firstelem, nelem, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluk(fptr, 2, row, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgpfuk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned int *array, /* O - array of values that are returned */ + char *nularray, /* O - array of null pixel flags */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). + Any undefined pixels in the returned array will be set = 0 and the + corresponding nularray value will be set = 1. + ANYNUL is returned with a value of .true. if any pixels are undefined. +*/ +{ + long row; + int nullcheck = 2; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_read_compressed_pixels(fptr, TUINT, firstelem, nelem, + nullcheck, NULL, array, nularray, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluk(fptr, 2, row, firstelem, nelem, 1, 2, 0L, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg2duk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned int nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + /* call the 3D reading routine, with the 3rd dimension = 1 */ + + ffg3duk(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, + anynul, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffg3duk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + unsigned int nulval, /* set undefined pixels equal to this */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an entire 3-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being read). Any null + values in the array will be set equal to the value of nulval, unless + nulval = 0 in which case no null checking will be performed. +*/ +{ + long tablerow, ii, jj; + char cdummy; + int nullcheck = 1; + long inc[] = {1,1,1}; + LONGLONG fpixel[] = {1,1,1}, nfits, narray; + LONGLONG lpixel[3]; + unsigned int nullvalue; + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + lpixel[0] = ncols; + lpixel[1] = nrows; + lpixel[2] = naxis3; + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TUINT, fpixel, lpixel, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so read all at once */ + ffgcluk(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to read */ + narray = 0; /* next pixel in output array to be filled */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* reading naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffgcluk(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, + &array[narray], &cdummy, anynul, status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsvuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned int nulval, /* I - value to set undefined pixels */ + unsigned int *array, /* O - array to be filled and returned */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9]; + long nelem, nultyp, ninc, numcol; + LONGLONG felem, dsize[10], blcll[9], trcll[9]; + int hdutype, anyf; + char ldummy, msg[FLEN_ERRMSG]; + int nullcheck = 1; + unsigned int nullvalue; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvuk is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + nullvalue = nulval; /* set local variable */ + + fits_read_compressed_img(fptr, TUINT, blcll, trcll, inc, + nullcheck, &nullvalue, array, NULL, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 1; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvuk: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcluk(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &ldummy, &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsfuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read (1 = 1st) */ + int naxis, /* I - number of dimensions in the FITS array */ + long *naxes, /* I - size of each dimension */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc, /* I - 'top right corner' of the subsection */ + long *inc, /* I - increment to be applied in each dimension */ + unsigned int *array, /* O - array to be filled and returned */ + char *flagval, /* O - set to 1 if corresponding value is null */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a subsection of data values from an image or a table column. + This routine is set up to handle a maximum of nine dimensions. +*/ +{ + long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; + long str[9],stp[9],incr[9],dsize[10]; + LONGLONG blcll[9], trcll[9]; + long felem, nelem, nultyp, ninc, numcol; + long nulval = 0; + int hdutype, anyf; + char msg[FLEN_ERRMSG]; + int nullcheck = 2; + + if (naxis < 1 || naxis > 9) + { + sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); + ffpmsg(msg); + return(*status = BAD_DIMEN); + } + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + for (ii=0; ii < naxis; ii++) { + blcll[ii] = blc[ii]; + trcll[ii] = trc[ii]; + } + + fits_read_compressed_img(fptr, TUINT, blcll, trcll, inc, + nullcheck, NULL, array, flagval, anynul, status); + return(*status); + } + +/* + if this is a primary array, then the input COLNUM parameter should + be interpreted as the row number, and we will alway read the image + data from column 2 (any group parameters are in column 1). +*/ + if (ffghdt(fptr, &hdutype, status) > 0) + return(*status); + + if (hdutype == IMAGE_HDU) + { + /* this is a primary array, or image extension */ + if (colnum == 0) + { + rstr = 1; + rstp = 1; + } + else + { + rstr = colnum; + rstp = colnum; + } + rinc = 1; + numcol = 2; + } + else + { + /* this is a table, so the row info is in the (naxis+1) elements */ + rstr = blc[naxis]; + rstp = trc[naxis]; + rinc = inc[naxis]; + numcol = colnum; + } + + nultyp = 2; + if (anynul) + *anynul = FALSE; + + i0 = 0; + for (ii = 0; ii < 9; ii++) + { + str[ii] = 1; + stp[ii] = 1; + incr[ii] = 1; + dsize[ii] = 1; + } + + for (ii = 0; ii < naxis; ii++) + { + if (trc[ii] < blc[ii]) + { + sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); + ffpmsg(msg); + return(*status = BAD_PIX_NUM); + } + + str[ii] = blc[ii]; + stp[ii] = trc[ii]; + incr[ii] = inc[ii]; + dsize[ii + 1] = dsize[ii] * naxes[ii]; + } + + if (naxis == 1 && naxes[0] == 1) + { + /* This is not a vector column, so read all the rows at once */ + nelem = (rstp - rstr) / rinc + 1; + ninc = rinc; + rstp = rstr; + } + else + { + /* have to read each row individually, in all dimensions */ + nelem = (stp[0] - str[0]) / inc[0] + 1; + ninc = incr[0]; + } + + for (row = rstr; row <= rstp; row += rinc) + { + for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) + { + for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) + { + for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) + { + for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) + { + for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) + { + for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) + { + for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) + { + for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) + { + felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; + + if ( ffgcluk(fptr, numcol, row, felem, nelem, ninc, nultyp, + nulval, &array[i0], &flagval[i0], &anyf, status) > 0) + return(*status); + + if (anyf && anynul) + *anynul = TRUE; + + i0 += nelem; + } + } + } + } + } + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffggpuk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to read (1 = 1st group) */ + long firstelem, /* I - first vector element to read (1 = 1st) */ + long nelem, /* I - number of values to read */ + unsigned int *array, /* O - array of values that are returned */ + int *status) /* IO - error status */ +/* + Read an array of group parameters from the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being read). +*/ +{ + long row; + int idummy; + char cdummy; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffgcluk(fptr, 1, row, firstelem, nelem, 1, 1, 0L, + array, &cdummy, &idummy, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcvuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned int nulval, /* I - value for null pixels */ + unsigned int *array, /* O - array of values that are read */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Any undefined pixels will be set equal to the value of 'nulval' unless + nulval = 0 in which case no checks for undefined pixels will be made. +*/ +{ + char cdummy; + + ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, + array, &cdummy, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcfuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + unsigned int *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. Automatic + datatype conversion will be performed if the datatype of the column does not + match the datatype of the array parameter. The output values will be scaled + by the FITS TSCALn and TZEROn values if these values have been defined. + Nularray will be set = 1 if the corresponding array pixel is undefined, + otherwise nularray will = 0. +*/ +{ + int dummy = 0; + + ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, + array, nularray, anynul, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcluk( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to read (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ + LONGLONG nelem, /* I - number of values to read */ + long elemincre, /* I - pixel increment; e.g., 2 = every other */ + int nultyp, /* I - null value handling code: */ + /* 1: set undefined pixels = nulval */ + /* 2: set nularray=1 for undefined pixels */ + unsigned int nulval, /* I - value for null pixels if nultyp = 1 */ + unsigned int *array, /* O - array of values that are read */ + char *nularray, /* O - array of flags = 1 if nultyp = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read an array of values from a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer be a virtual column in a 1 or more grouped FITS primary + array or image extension. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The output array of values will be converted from the datatype of the column + and will be scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + double scale, zero, power = 1., dtemp; + int tcode, maxelem, hdutype, xcode, decimals; + long twidth, incre; + long ii, xwidth, ntodo; + int nulcheck; + LONGLONG repeat, startpos, elemnum, readptr, tnull; + LONGLONG rowlen, rownum, remain, next, rowincre; + char tform[20]; + char message[81]; + char snull[20]; /* the FITS null value if reading from ASCII table */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ + return(*status); + + /* call the 'short' or 'long' version of this routine, if possible */ + if (sizeof(int) == sizeof(short)) + ffgclui(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, + (unsigned short) nulval, (unsigned short *) array, nularray, anynul, + status); + else if (sizeof(int) == sizeof(long)) + ffgcluj(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, + (unsigned long) nulval, (unsigned long *) array, nularray, anynul, + status); + else + { + /* + This is a special case: sizeof(int) is not equal to sizeof(short) or + sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, + int = 4 bytes, and long = 8 bytes. + */ + + buffer = cbuff; + + if (anynul) + *anynul = 0; + + if (nultyp == 2) + memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) + return(*status); + + incre *= elemincre; /* multiply incre to just get every nth pixel */ + + if (tcode == TSTRING) /* setup for ASCII tables */ + { + /* get the number of implied decimal places if no explicit decmal point */ + ffasfm(tform, &xcode, &xwidth, &decimals, status); + for(ii = 0; ii < decimals; ii++) + power *= 10.; + } + /*------------------------------------------------------------------*/ + /* Decide whether to check for null values in the input FITS file: */ + /*------------------------------------------------------------------*/ + nulcheck = nultyp; /* by default check for null values in the FITS file */ + + if (nultyp == 1 && nulval == 0) + nulcheck = 0; /* calling routine does not want to check for nulls */ + + else if (tcode%10 == 1 && /* if reading an integer column, and */ + tnull == NULL_UNDEFINED) /* if a null value is not defined, */ + nulcheck = 0; /* then do not check for null values. */ + + else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) + nulcheck = 0; /* Impossible null value */ + + else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) + nulcheck = 0; + + /*----------------------------------------------------------------------*/ + /* If FITS column and output data array have same datatype, then we do */ + /* not need to use a temporary buffer to store intermediate datatype. */ + /*----------------------------------------------------------------------*/ + if (tcode == TLONG) /* Special Case: */ + { /* data are 4-bytes long, so read */ + maxelem = (int) nelem; /* data directly into output buffer. */ + } + + /*---------------------------------------------------------------------*/ + /* Now read the pixels from the FITS column. If the column does not */ + /* have the same datatype as the output array, then we have to read */ + /* the raw values into a temporary buffer (of limited size). In */ + /* the case of a vector colum read only 1 vector of values at a time */ + /* then skip to the next row if more values need to be read. */ + /* After reading the raw values, then call the fffXXYY routine to (1) */ + /* test for undefined values, (2) convert the datatype if necessary, */ + /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ + /* scaling parameters. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to read */ + next = 0; /* next element in array to be read */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to read at one time to the number that + will fit in the buffer or to the number of pixels that remain in + the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); + + readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); + + switch (tcode) + { + case (TLONG): + ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], + status); + fffi4uint((INT32BIT *) &array[next], ntodo, scale, zero, + nulcheck, (INT32BIT) tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TLONGLONG): + + ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); + fffi8uint( (LONGLONG *) buffer, ntodo, scale, zero, + nulcheck, tnull, nulval, &nularray[next], + anynul, &array[next], status); + break; + case (TBYTE): + ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, + status); + fffi1uint((unsigned char *) buffer, ntodo, scale, zero,nulcheck, + (unsigned char) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSHORT): + ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); + fffi2uint((short *) buffer, ntodo, scale, zero, nulcheck, + (short) tnull, nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TFLOAT): + ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); + fffr4uint((float *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TDOUBLE): + ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); + fffr8uint((double *) buffer, ntodo, scale, zero, nulcheck, + nulval, &nularray[next], anynul, + &array[next], status); + break; + case (TSTRING): + ffmbyt(fptr, readptr, REPORT_EOF, status); + + if (incre == twidth) /* contiguous bytes */ + ffgbyt(fptr, ntodo * twidth, buffer, status); + else + ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + fffstruint((char *) buffer, ntodo, scale, zero, twidth, power, + nulcheck, snull, nulval, &nularray[next], anynul, + &array[next], status); + break; + + default: /* error trap for invalid column format */ + sprintf(message, + "Cannot read numbers from column %d which has format %s", + colnum, tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous read operation */ + { + dtemp = (double) next; + if (hdutype > 0) + sprintf(message, + "Error reading elements %.0f thru %.0f from column %d (ffgcluk).", + dtemp+1., dtemp+ntodo, colnum); + else + sprintf(message, + "Error reading elements %.0f thru %.0f from image (ffgcluk).", + dtemp+1., dtemp+ntodo); + + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum = elemnum + (ntodo * elemincre); + + if (elemnum >= repeat) /* completed a row; start on later row */ + { + rowincre = elemnum / repeat; + rownum += rowincre; + elemnum = elemnum - (rowincre * repeat); + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while reading FITS data."); + *status = NUM_OVERFLOW; + } + + } /* end of DEC Alpha special case */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi1uint(unsigned char *input,/* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (unsigned int) input[ii]; /* copy input */ + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi2uint(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + short tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi4uint(INT32BIT *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 2147483648.) + { + /* Instead of adding 2147483648, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned int) input[ii]; /* copy to output */ + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 2147483648.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; + } + } + else if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffi8uint(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to tnull. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] == tnull) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr4uint(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr++; /* point to MSBs */ +#endif + + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 2) + { + if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffr8uint(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. + Check for null values and do datatype conversion and scaling if required. + The nullcheck code value determines how any null values in the input array + are treated. A null value is an input pixel that is equal to NaN. If + nullcheck = 0, then no checking for nulls is performed and any null values + will be transformed just like any other pixel. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + long ii; + double dvalue; + short *sptr, iret; + + if (nullcheck == 0) /* no null checking required */ + { + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + else /* must check for null values */ + { + sptr = (short *) input; + +#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS + sptr += 3; /* point to MSBs */ +#endif + if (scale == 1. && zero == 0.) /* no scaling */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + output[ii] = 0; + } + else + { + if (input[ii] < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) input[ii]; + } + } + } + else /* must scale the data */ + { + for (ii = 0; ii < ntodo; ii++, sptr += 4) + { + if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ + { + if (iret == 1) /* is it a NaN? */ + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + else /* it's an underflow */ + { + if (zero < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (zero > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) zero; + } + } + else + { + dvalue = input[ii] * scale + zero; + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (unsigned int) dvalue; + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fffstruint(char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + long twidth, /* I - width of each substring of chars */ + double implipower, /* I - power of 10 of implied decimal */ + int nullcheck, /* I - null checking code; 0 = don't check */ + /* 1:set null pixels = nullval */ + /* 2: if null pixel, set nullarray = 1 */ + char *snull, /* I - value of FITS null string, if any */ + unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ + char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ + int *anynull, /* O - set to 1 if any pixels are null */ + unsigned int *output, /* O - array of converted pixels */ + int *status) /* IO - error status */ +/* + Copy input to output following reading of the input from a FITS file. Check + for null values and do scaling if required. The nullcheck code value + determines how any null values in the input array are treated. A null + value is an input pixel that is equal to snull. If nullcheck= 0, then + no special checking for nulls is performed. If nullcheck = 1, then the + output pixel will be set = nullval if the corresponding input pixel is null. + If nullcheck = 2, then if the pixel is null then the corresponding value of + nullarray will be set to 1; the value of nullarray for non-null pixels + will = 0. The anynull parameter will be set = 1 if any of the returned + pixels are null, otherwise anynull will be returned with a value = 0; +*/ +{ + int nullen; + long ii; + double dvalue; + char *cstring, message[81]; + char *cptr, *tpos; + char tempstore, chrzero = '0'; + double val, power; + int exponent, sign, esign, decpt; + + nullen = strlen(snull); + cptr = input; /* pointer to start of input string */ + for (ii = 0; ii < ntodo; ii++) + { + cstring = cptr; + /* temporarily insert a null terminator at end of the string */ + tpos = cptr + twidth; + tempstore = *tpos; + *tpos = 0; + + /* check if null value is defined, and if the */ + /* column string is identical to the null string */ + if (snull[0] != ASCII_NULL_UNDEFINED && + !strncmp(snull, cptr, nullen) ) + { + if (nullcheck) + { + *anynull = 1; + if (nullcheck == 1) + output[ii] = nullval; + else + nullarray[ii] = 1; + } + cptr += twidth; + } + else + { + /* value is not the null value, so decode it */ + /* remove any embedded blank characters from the string */ + + decpt = 0; + sign = 1; + val = 0.; + power = 1.; + exponent = 0; + esign = 1; + + while (*cptr == ' ') /* skip leading blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for leading sign */ + { + if (*cptr == '-') + sign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and value */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + + if (*cptr == '.') /* check for decimal point */ + { + decpt = 1; /* set flag to show there was a decimal point */ + cptr++; + while (*cptr == ' ') /* skip any blanks */ + cptr++; + + while (*cptr >= '0' && *cptr <= '9') + { + val = val * 10. + *cptr - chrzero; /* accumulate the value */ + power = power * 10.; + cptr++; + + while (*cptr == ' ') /* skip embedded blanks in the value */ + cptr++; + } + } + + if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ + { + cptr++; + while (*cptr == ' ') /* skip blanks */ + cptr++; + + if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ + { + if (*cptr == '-') + esign = -1; + + cptr++; + + while (*cptr == ' ') /* skip blanks between sign and exp */ + cptr++; + } + + while (*cptr >= '0' && *cptr <= '9') + { + exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ + cptr++; + + while (*cptr == ' ') /* skip embedded blanks */ + cptr++; + } + } + + if (*cptr != 0) /* should end up at the null terminator */ + { + sprintf(message, "Cannot read number from ASCII table"); + ffpmsg(message); + sprintf(message, "Column field = %s.", cstring); + ffpmsg(message); + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + return(*status = BAD_C2D); + } + + if (!decpt) /* if no explicit decimal, use implied */ + power = implipower; + + dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); + + dvalue = dvalue * scale + zero; /* apply the scaling */ + + if (dvalue < DUINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UINT_MAX; + } + else + output[ii] = (long) dvalue; + } + /* restore the char that was overwritten by the null */ + *tpos = tempstore; + } + return(*status); +} diff --git a/software/cfitsio3040/getkey.c b/software/cfitsio3040/getkey.c new file mode 100644 index 000000000..0a96840e3 --- /dev/null +++ b/software/cfitsio3040/getkey.c @@ -0,0 +1,3133 @@ +/* This file, getkey.c, contains routines that read keywords from */ +/* a FITS header. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +/* stddef.h is apparently needed to define size_t */ +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffghsp(fitsfile *fptr, /* I - FITS file pointer */ + int *nexist, /* O - number of existing keywords in header */ + int *nmore, /* O - how many more keywords will fit */ + int *status) /* IO - error status */ +/* + returns the number of existing keywords (not counting the END keyword) + and the number of more keyword that will fit in the current header + without having to insert more FITS blocks. +*/ +{ + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + *nexist = (int) (( ((fptr->Fptr)->headend) - + ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80); + + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if (nmore) + *nmore = -1; /* data not written yet, so room for any keywords */ + } + else + { + /* calculate space available between the data and the END card */ + if (nmore) + *nmore = (int) (((fptr->Fptr)->datastart - (fptr->Fptr)->headend) / 80 - 1); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghps(fitsfile *fptr, /* I - FITS file pointer */ + int *nexist, /* O - number of existing keywords in header */ + int *position, /* O - position of next keyword to be read */ + int *status) /* IO - error status */ +/* + return the number of existing keywords and the position of the next + keyword that will be read. +*/ +{ + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + *nexist = (int) (( ((fptr->Fptr)->headend) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80); + *position = (int) (( ((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80 + 1); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffnchk(fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + function returns the position of the first null character (ASCII 0), if + any, in the current header. Null characters are illegal, but the other + CFITSIO routines that read the header will not detect this error, because + the null gets interpreted as a normal end of string character. +*/ +{ + long ii, nblock; + LONGLONG bytepos; + int length, nullpos; + char block[2881]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + return(0); /* Don't check a file that is just being created. */ + /* It cannot contain nulls since CFITSIO wrote it. */ + } + else + { + /* calculate number of blocks in the header */ + nblock = (long) (( (fptr->Fptr)->datastart - + (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) / 2880); + } + + bytepos = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; + ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move to read pos. */ + + block[2880] = '\0'; + for (ii = 0; ii < nblock; ii++) + { + if (ffgbyt(fptr, 2880, block, status) > 0) + return(0); /* read error of some sort */ + + length = strlen(block); + if (length != 2880) + { + nullpos = (ii * 2880) + length + 1; + return(nullpos); + } + } + + return(0); +} +/*--------------------------------------------------------------------------*/ +int ffmaky(fitsfile *fptr, /* I - FITS file pointer */ + int nrec, /* I - one-based keyword number to move to */ + int *status) /* IO - error status */ +{ +/* + move pointer to the specified absolute keyword position. E.g. this keyword + will then be read by the next call to ffgnky. +*/ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] + ( (nrec - 1) * 80); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmrky(fitsfile *fptr, /* I - FITS file pointer */ + int nmove, /* I - relative number of keywords to move */ + int *status) /* IO - error status */ +{ +/* + move pointer to the specified keyword position relative to the current + position. E.g. this keyword will then be read by the next call to ffgnky. +*/ + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->nextkey += (nmove * 80); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgnky(fitsfile *fptr, /* I - FITS file pointer */ + char *card, /* O - card string */ + int *status) /* IO - error status */ +/* + read the next keyword from the header - used internally by cfitsio +*/ +{ + int jj, nrec; + LONGLONG bytepos, endhead; + char message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + card[0] = '\0'; /* make sure card is terminated, even affer read error */ + +/* + Check that nextkey points to a legal keyword position. Note that headend + is the current end of the header, i.e., the position where a new keyword + would be appended, however, if there are more than 1 FITS block worth of + blank keywords at the end of the header (36 keywords per 2880 byte block) + then the actual physical END card must be located at a starting position + which is just 2880 bytes prior to the start of the data unit. +*/ + + bytepos = (fptr->Fptr)->nextkey; + endhead = maxvalue( ((fptr->Fptr)->headend), ((fptr->Fptr)->datastart - 2880) ); + + /* nextkey must be < endhead and > than headstart */ + if (bytepos > endhead || + bytepos < (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + { + nrec= (int) ((bytepos - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) / 80 + 1); + sprintf(message, "Cannot get keyword number %d. It does not exist.", + nrec); + ffpmsg(message); + return(*status = KEY_OUT_BOUNDS); + } + + ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move to read pos. */ + + card[80] = '\0'; /* make sure card is terminate, even if ffgbyt fails */ + + if (ffgbyt(fptr, 80, card, status) <= 0) + { + (fptr->Fptr)->nextkey += 80; /* increment pointer to next keyword */ + + /* strip off trailing blanks with terminated string */ + jj = 79; + while (jj >= 0 && card[jj] == ' ') + jj--; + + card[jj + 1] = '\0'; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgnxk( fitsfile *fptr, /* I - FITS file pointer */ + char **inclist, /* I - list of included keyword names */ + int ninc, /* I - number of names in inclist */ + char **exclist, /* I - list of excluded keyword names */ + int nexc, /* I - number of names in exclist */ + char *card, /* O - first matching keyword */ + int *status) /* IO - error status */ +/* + Return the next keyword that matches one of the names in inclist + but does not match any of the names in exclist. The search + goes from the current position to the end of the header, only. + Wild card characters may be used in the name lists ('*', '?' and '#'). +*/ +{ + int casesn, match, exact, namelen; + long ii, jj; + char keybuf[FLEN_CARD], keyname[FLEN_KEYWORD]; + + card[0] = '\0'; + if (*status > 0) + return(*status); + + casesn = FALSE; + + /* get next card, and return with an error if hit end of header */ + while( ffgcrd(fptr, "*", keybuf, status) <= 0) + { + ffgknm(keybuf, keyname, &namelen, status); /* get the keyword name */ + + /* does keyword match any names in the include list? */ + for (ii = 0; ii < ninc; ii++) + { + ffcmps(inclist[ii], keyname, casesn, &match, &exact); + if (match) + { + /* does keyword match any names in the exclusion list? */ + jj = -1; + while ( ++jj < nexc ) + { + ffcmps(exclist[jj], keyname, casesn, &match, &exact); + if (match) + break; + } + + if (jj >= nexc) + { + /* not in exclusion list, so return this keyword */ + strcat(card, keybuf); + return(*status); + } + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgky( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + char *keyname, /* I - name of keyword to read */ + void *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the keyword value and comment from the FITS header. + Reads a keyword value with the datatype specified by the 2nd argument. +*/ +{ + long longval; + double doubleval; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TSTRING) + { + ffgkys(fptr, keyname, (char *) value, comm, status); + } + else if (datatype == TBYTE) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > UCHAR_MAX || longval < 0) + *status = NUM_OVERFLOW; + else + *(unsigned char *) value = (unsigned char) longval; + } + } + else if (datatype == TSBYTE) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > 127 || longval < -128) + *status = NUM_OVERFLOW; + else + *(signed char *) value = (signed char) longval; + } + } + else if (datatype == TUSHORT) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > USHRT_MAX || longval < 0) + *status = NUM_OVERFLOW; + else + *(unsigned short *) value = (unsigned short) longval; + } + } + else if (datatype == TSHORT) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > SHRT_MAX || longval < SHRT_MIN) + *status = NUM_OVERFLOW; + else + *(short *) value = (short) longval; + } + } + else if (datatype == TUINT) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > (long) UINT_MAX || longval < 0) + *status = NUM_OVERFLOW; + else + *(unsigned int *) value = longval; + } + } + else if (datatype == TINT) + { + if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) + { + if (longval > INT_MAX || longval < INT_MIN) + *status = NUM_OVERFLOW; + else + *(int *) value = longval; + } + } + else if (datatype == TLOGICAL) + { + ffgkyl(fptr, keyname, (int *) value, comm, status); + } + else if (datatype == TULONG) + { + if (ffgkyd(fptr, keyname, &doubleval, comm, status) <= 0) + { + if (doubleval > (double) ULONG_MAX || doubleval < 0) + *status = NUM_OVERFLOW; + else + *(unsigned long *) value = (unsigned long) doubleval; + } + } + else if (datatype == TLONG) + { + ffgkyj(fptr, keyname, (long *) value, comm, status); + } + else if (datatype == TLONGLONG) + { + ffgkyjj(fptr, keyname, (LONGLONG *) value, comm, status); + } + else if (datatype == TFLOAT) + { + ffgkye(fptr, keyname, (float *) value, comm, status); + } + else if (datatype == TDOUBLE) + { + ffgkyd(fptr, keyname, (double *) value, comm, status); + } + else if (datatype == TCOMPLEX) + { + ffgkyc(fptr, keyname, (float *) value, comm, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffgkym(fptr, keyname, (double *) value, comm, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkey( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + char *keyval, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the keyword value and comment. + The value is just the literal string of characters in the value field + of the keyword. In the case of a string valued keyword, the returned + value includes the leading and closing quote characters. The value may be + up to 70 characters long, and the comment may be up to 72 characters long. + If the keyword has no value (no equal sign in column 9) then a null value + is returned. +*/ +{ + char card[FLEN_CARD]; + + keyval[0] = '\0'; + if (comm) + comm[0] = '\0'; + + if (*status > 0) + return(*status); + + if (ffgcrd(fptr, keyname, card, status) > 0) /* get the 80-byte card */ + return(*status); + + ffpsvc(card, keyval, comm, status); /* parse the value and comment */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgrec( fitsfile *fptr, /* I - FITS file pointer */ + int nrec, /* I - number of keyword to read */ + char *card, /* O - keyword card */ + int *status) /* IO - error status */ +/* + Read (get) the nrec-th keyword, returning the entire keyword card up to + 80 characters long. The first keyword in the header has nrec = 1, not 0. + The returned card value is null terminated with any trailing blank + characters removed. If nrec = 0, then this routine simply moves the + current header pointer to the top of the header. +*/ +{ + if (*status > 0) + return(*status); + + if (nrec == 0) + { + ffmaky(fptr, 1, status); /* simply move to beginning of header */ + card[0] = '\0'; /* and return null card */ + } + else if (nrec > 0) + { + ffmaky(fptr, nrec, status); + ffgnky(fptr, card, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcrd( fitsfile *fptr, /* I - FITS file pointer */ + char *name, /* I - name of keyword to read */ + char *card, /* O - keyword card */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the entire keyword card up to + 80 characters long. The first keyword in the header has nrec = 1, not 0. + The returned card value is null terminated with any trailing blank + characters removed. + + If the input name contains wild cards ('?' matches any single char + and '*' matches any sequence of chars, # matches any string of decimal + digits) then the search ends once the end of header is reached and does + not automatically resume from the top of the header. +*/ +{ + int nkeys, nextkey, ntodo, namelen, namelen_limit, namelenminus1, cardlen; + int ii = 0, jj, kk, wild, match, exact, hier = 0; + char keyname[FLEN_KEYWORD], cardname[FLEN_KEYWORD]; + char *ptr1, *ptr2, *gotstar; + + if (*status > 0) + return(*status); + + *keyname = '\0'; + + while (name[ii] == ' ') /* skip leading blanks in name */ + ii++; + + strncat(keyname, &name[ii], FLEN_KEYWORD - 1); + + namelen = strlen(keyname); + + while (namelen > 0 && keyname[namelen - 1] == ' ') + namelen--; /* ignore trailing blanks in name */ + + keyname[namelen] = '\0'; /* terminate the name */ + + for (ii=0; ii < namelen; ii++) + keyname[ii] = toupper(keyname[ii]); /* make upper case */ + + if (FSTRNCMP("HIERARCH", keyname, 8) == 0) + { + if (namelen == 8) + { + /* special case: just looking for any HIERARCH keyword */ + hier = 1; + } + else + { + /* ignore the leading HIERARCH and look for the 'real' name */ + /* starting with first non-blank character following HIERARCH */ + ptr1 = keyname; + ptr2 = &keyname[8]; + + while(*ptr2 == ' ') + ptr2++; + + namelen = 0; + while(*ptr2) + { + *ptr1 = *ptr2; + ptr1++; + ptr2++; + namelen++; + } + *ptr1 = '\0'; + } + } + + /* does input name contain wild card chars? ('?', '*', or '#') */ + /* wild cards are currently not supported with HIERARCH keywords */ + + namelen_limit = namelen; + gotstar = 0; + if (namelen < 9 && + (strchr(keyname,'?') || (gotstar = strchr(keyname,'*')) || + strchr(keyname,'#')) ) + { + wild = 1; + + /* if we found a '*' wild card in the name, there might be */ + /* more than one. Support up to 2 '*' in the template. */ + /* Thus we need to compare keywords whose names have at least */ + /* namelen - 2 characters. */ + if (gotstar) + namelen_limit -= 2; + } + else + wild = 0; + + ffghps(fptr, &nkeys, &nextkey, status); /* get no. keywords and position */ + + namelenminus1 = maxvalue(namelen - 1, 1); + ntodo = nkeys - nextkey + 1; /* first, read from next keyword to end */ + for (jj=0; jj < 2; jj++) + { + for (kk = 0; kk < ntodo; kk++) + { + ffgnky(fptr, card, status); /* get next keyword */ + + if (hier) + { + if (FSTRNCMP("HIERARCH", card, 8) == 0) + return(*status); /* found a HIERARCH keyword */ + } + else + { + ffgknm(card, cardname, &cardlen, status); /* get the keyword name */ + + if (cardlen >= namelen_limit) /* can't match if card < name */ + { + /* if there are no wild cards, lengths must be the same */ + if (!( !wild && cardlen != namelen) ) + { + for (ii=0; ii < cardlen; ii++) + { + /* make sure keyword is in uppercase */ + if (cardname[ii] > 96) + { + /* This assumes the ASCII character set in which */ + /* upper case characters start at ASCII(97) */ + /* Timing tests showed that this is 20% faster */ + /* than calling the isupper function. */ + + cardname[ii] = toupper(cardname[ii]); /* make upper case */ + } + } + + if (wild) + { + ffcmps(keyname, cardname, 1, &match, &exact); + if (match) + return(*status); /* found a matching keyword */ + } + else if (keyname[namelenminus1] == cardname[namelenminus1]) + { + /* test the last character of the keyword name first, on */ + /* the theory that it is less likely to match then the first */ + /* character since many keywords begin with 'T', for example */ + + if (FSTRNCMP(keyname, cardname, namelenminus1) == 0) + { + return(*status); /* found the matching keyword */ + } + } + } + } + } + } + + if (wild || jj == 1) + break; /* stop at end of header if template contains wildcards */ + + ffmaky(fptr, 1, status); /* reset pointer to beginning of header */ + ntodo = nextkey - 1; /* number of keyword to read */ + } + + return(*status = KEY_NO_EXIST); /* couldn't find the keyword */ +} +/*--------------------------------------------------------------------------*/ +int ffgknm( char *card, /* I - keyword card */ + char *name, /* O - name of the keyword */ + int *length, /* O - length of the keyword name */ + int *status) /* IO - error status */ + +/* + Return the name of the keyword, and the name length. This supports the + ESO HIERARCH convention where keyword names may be > 8 characters long. +*/ +{ + char *ptr1, *ptr2; + int ii; + + *name = '\0'; + *length = 0; + + /* support for ESO HIERARCH keywords; find the '=' */ + if (FSTRNCMP(card, "HIERARCH ", 9) == 0) + { + ptr2 = strchr(card, '='); + + if (!ptr2) /* no value indicator ??? */ + { + /* this probably indicates an error, so just return FITS name */ + strcat(name, "HIERARCH"); + *length = 8; + return(*status); + } + + /* find the start and end of the HIERARCH name */ + ptr1 = &card[9]; + while (*ptr1 == ' ') /* skip spaces */ + ptr1++; + + strncat(name, ptr1, ptr2 - ptr1); + ii = ptr2 - ptr1; + + while (ii > 0 && name[ii - 1] == ' ') /* remove trailing spaces */ + ii--; + + name[ii] = '\0'; + *length = ii; + } + else + { + for (ii = 0; ii < 8; ii++) + { + /* look for string terminator, or a blank */ + if (*(card+ii) != ' ' && *(card+ii) !='\0') + { + *(name+ii) = *(card+ii); + } + else + { + name[ii] = '\0'; + *length = ii; + return(*status); + } + } + + /* if we got here, keyword is 8 characters long */ + name[8] = '\0'; + *length = 8; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgunt( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + char *unit, /* O - keyword units */ + int *status) /* IO - error status */ +/* + Read (get) the units string from the comment field of the existing + keyword. This routine uses a local FITS convention (not defined in the + official FITS standard) in which the units are enclosed in + square brackets following the '/' comment field delimiter, e.g.: + + KEYWORD = 12 / [kpc] comment string goes here +*/ +{ + char valstring[FLEN_VALUE]; + char comm[FLEN_COMMENT]; + char *loc; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + + if (comm[0] == '[') + { + loc = strchr(comm, ']'); /* find the closing bracket */ + if (loc) + *loc = '\0'; /* terminate the string */ + + strcpy(unit, &comm[1]); /* copy the string */ + } + else + unit[0] = '\0'; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkys( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + char *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Get KeYword with a String value: + Read (get) a simple string valued keyword. The returned value may be up to + 68 chars long ( + 1 null terminator char). The routine does not support the + HEASARC convention for continuing long string values over multiple keywords. + The ffgkls routine may be used to read long continued strings. The returned + comment string may be up to 69 characters long (including null terminator). +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + value[0] = '\0'; + ffc2s(valstring, value, status); /* remove quotes from string */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkls( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + char **value, /* O - pointer to keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Get Keyword with possible Long String value: + Read (get) the named keyword, returning the value and comment. + The returned value string may be arbitrarily long (by using the HEASARC + convention for continuing long string values over multiple keywords) so + this routine allocates the required memory for the returned string value. + It is up to the calling routine to free the memory once it is finished + with the value string. The returned comment string may be up to 69 + characters long. +*/ +{ + char valstring[FLEN_VALUE]; + int contin; + size_t len; + + if (*status > 0) + return(*status); + + *value = NULL; /* initialize a null pointer in case of error */ + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + + if (*status > 0) + return(*status); + + if (!valstring[0]) /* null value string? */ + { + *value = (char *) malloc(1); /* allocate and return a null string */ + **value = '\0'; + } + else + { + /* allocate space, plus 1 for null */ + *value = (char *) malloc(strlen(valstring) + 1); + + ffc2s(valstring, *value, status); /* convert string to value */ + len = strlen(*value); + + /* If last character is a & then value may be continued on next keyword */ + contin = 1; + while (contin) + { + if (len && *(*value+len-1) == '&') /* is last char an anpersand? */ + { + ffgcnt(fptr, valstring, status); + if (*valstring) /* a null valstring indicates no continuation */ + { + *(*value+len-1) = '\0'; /* erase the trailing & char */ + len += strlen(valstring) - 1; + *value = (char *) realloc(*value, len + 1); /* increase size */ + strcat(*value, valstring); /* append the continued chars */ + } + else + contin = 0; + } + else + contin = 0; + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgcnt( fitsfile *fptr, /* I - FITS file pointer */ + char *value, /* O - continued string value */ + int *status) /* IO - error status */ +/* + Attempt to read the next keyword, returning the string value + if it is a continuation of the previous string keyword value. + This uses the HEASARC convention for continuing long string values + over multiple keywords. Each continued string is terminated with a + backslash character, and the continuation follows on the next keyword + which must have the name CONTINUE without an equal sign in column 9 + of the card. If the next card is not a continuation, then the returned + value string will be null. +*/ +{ + int tstatus; + char card[FLEN_CARD], strval[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + tstatus = 0; + value[0] = '\0'; + + if (ffgnky(fptr, card, &tstatus) > 0) /* read next keyword */ + return(*status); /* hit end of header */ + + if (strncmp(card, "CONTINUE ", 10) == 0) /* a continuation card? */ + { + strncpy(card, "D2345678= ", 10); /* overwrite a dummy keyword name */ + ffpsvc(card, strval, comm, &tstatus); /* get the string value */ + ffc2s(strval, value, &tstatus); /* remove the surrounding quotes */ + + if (tstatus) /* return null if error status was returned */ + value[0] = '\0'; + } + else + ffmrky(fptr, -1, status); /* reset the keyword pointer */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyl( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + int *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The returned value = 1 if the keyword is true, else = 0 if false. + The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + ffc2l(valstring, value, status); /* convert string to value */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + long *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The value will be implicitly converted to a (long) integer if it not + already of this datatype. The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + ffc2i(valstring, value, status); /* convert string to value */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyjj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + LONGLONG *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The value will be implicitly converted to a (long) integer if it not + already of this datatype. The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + ffc2j(valstring, value, status); /* convert string to value */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkye( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + float *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The value will be implicitly converted to a float if it not + already of this datatype. The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + ffc2r(valstring, value, status); /* convert string to value */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyd( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + double *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The value will be implicitly converted to a double if it not + already of this datatype. The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + ffc2d(valstring, value, status); /* convert string to value */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyc( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + float *value, /* O - keyword value (real,imag) */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The keyword must have a complex value. No implicit data conversion + will be performed. +*/ +{ + char valstring[FLEN_VALUE], message[81]; + int len; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + + if (valstring[0] != '(' ) /* test that this is a complex keyword */ + { + sprintf(message, "keyword %s does not have a complex value (ffgkyc):", + keyname); + ffpmsg(message); + ffpmsg(valstring); + return(*status = BAD_C2F); + } + + valstring[0] = ' '; /* delete the opening parenthesis */ + len = strcspn(valstring, ")" ); + valstring[len] = '\0'; /* delete the closing parenthesis */ + + len = strcspn(valstring, ","); + valstring[len] = '\0'; + + ffc2r(valstring, &value[0], status); /* convert the real part */ + ffc2r(&valstring[len + 1], &value[1], status); /* convert imag. part */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkym( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + double *value, /* O - keyword value (real,imag) */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The keyword must have a complex value. No implicit data conversion + will be performed. +*/ +{ + char valstring[FLEN_VALUE], message[81]; + int len; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + + if (valstring[0] != '(' ) /* test that this is a complex keyword */ + { + sprintf(message, "keyword %s does not have a complex value (ffgkym):", + keyname); + ffpmsg(message); + ffpmsg(valstring); + return(*status = BAD_C2D); + } + + valstring[0] = ' '; /* delete the opening parenthesis */ + len = strcspn(valstring, ")" ); + valstring[len] = '\0'; /* delete the closing parenthesis */ + + len = strcspn(valstring, ","); + valstring[len] = '\0'; + + ffc2d(valstring, &value[0], status); /* convert the real part */ + ffc2d(&valstring[len + 1], &value[1], status); /* convert the imag. part */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyt( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to read */ + long *ivalue, /* O - integer part of keyword value */ + double *fraction, /* O - fractional part of keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the named keyword, returning the value and comment. + The integer and fractional parts of the value are returned in separate + variables, to allow more numerical precision to be passed. This + effectively passes a 'triple' precision value, with a 4-byte integer + and an 8-byte fraction. The comment may be up to 69 characters long. +*/ +{ + char valstring[FLEN_VALUE]; + char *loc; + + if (*status > 0) + return(*status); + + ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ + + /* read the entire value string as a double, to get the integer part */ + ffc2d(valstring, fraction, status); + + *ivalue = (long) *fraction; + + *fraction = *fraction - *ivalue; + + /* see if we need to read the fractional part again with more precision */ + /* look for decimal point, without an exponential E or D character */ + + loc = strchr(valstring, '.'); + if (loc) + { + if (!strchr(valstring, 'E') && !strchr(valstring, 'D')) + ffc2d(loc, fraction, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkyn( fitsfile *fptr, /* I - FITS file pointer */ + int nkey, /* I - number of the keyword to read */ + char *keyname, /* O - name of the keyword */ + char *value, /* O - keyword value */ + char *comm, /* O - keyword comment */ + int *status) /* IO - error status */ +/* + Read (get) the nkey-th keyword returning the keyword name, value and comment. + The value is just the literal string of characters in the value field + of the keyword. In the case of a string valued keyword, the returned + value includes the leading and closing quote characters. The value may be + up to 70 characters long, and the comment may be up to 72 characters long. + If the keyword has no value (no equal sign in column 9) then a null value + is returned. If comm = NULL, then do not return the comment string. +*/ +{ + char card[FLEN_CARD], sbuff[FLEN_CARD]; + int namelen; + + keyname[0] = '\0'; + value[0] = '\0'; + if (comm) + comm[0] = '\0'; + + if (*status > 0) + return(*status); + + if (ffgrec(fptr, nkey, card, status) > 0 ) /* get the 80-byte card */ + return(*status); + + ffgknm(card, keyname, &namelen, status); /* get the keyword name */ + + if (ffpsvc(card, value, comm, status) > 0) /* parse value and comment */ + return(*status); + + if (fftrec(keyname, status) > 0) /* test keyword name; catches no END */ + { + sprintf(sbuff,"Name of keyword no. %d contains illegal character(s): %s", + nkey, keyname); + ffpmsg(sbuff); + + if (nkey % 36 == 0) /* test if at beginning of 36-card FITS record */ + ffpmsg(" (This may indicate a missing END keyword)."); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkns( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + char *value[], /* O - array of pointers to keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. + This routine does NOT support the HEASARC long string convention. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgrec(fptr, ii, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2s(svalue, value[ival-nstart], status); /* convert */ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgknl( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + int *value, /* O - array of keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. + The returned value = 1 if the keyword is true, else = 0 if false. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgnky(fptr, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2l(svalue, &value[ival-nstart], status); /* convert*/ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgknj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + long *value, /* O - array of keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgnky(fptr, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2i(svalue, &value[ival-nstart], status); /* convert */ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgknjj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + LONGLONG *value, /* O - array of keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgnky(fptr, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2j(svalue, &value[ival-nstart], status); /* convert */ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgkne( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + float *value, /* O - array of keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgnky(fptr, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2r(svalue, &value[ival-nstart], status); /* convert */ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgknd( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - root name of keywords to read */ + int nstart, /* I - starting index number */ + int nmax, /* I - maximum number of keywords to return */ + double *value, /* O - array of keyword values */ + int *nfound, /* O - number of values that were returned */ + int *status) /* IO - error status */ +/* + Read (get) an indexed array of keywords with index numbers between + NSTART and (NSTART + NMAX -1) inclusive. +*/ +{ + int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; + long ival; + char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; + char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + *nfound = 0; + nend = nstart + nmax - 1; + + keyroot[0] = '\0'; + strncat(keyroot, keyname, 8); + + lenroot = strlen(keyroot); + if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ + return(*status); + + for (ii=0; ii < lenroot; ii++) /* make sure upper case */ + keyroot[ii] = toupper(keyroot[ii]); + + ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ + + ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ + + undefinedval = FALSE; + for (ii=3; ii <= nkeys; ii++) + { + if (ffgnky(fptr, card, status) > 0) /* get next keyword */ + return(*status); + + if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ + { + keyindex[0] = '\0'; + strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ + + tstatus = 0; + if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ + { + if (ival <= nend && ival >= nstart) /* is index within range? */ + { + ffpsvc(card, svalue, comm, status); /* parse the value */ + ffc2d(svalue, &value[ival-nstart], status); /* convert */ + if (ival - nstart + 1 > *nfound) + *nfound = ival - nstart + 1; /* max found */ + + if (*status == VALUE_UNDEFINED) + { + undefinedval = TRUE; + *status = 0; /* reset status to read remaining values */ + } + } + } + } + } + if (undefinedval && (*status <= 0) ) + *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtdm(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *naxis, /* O - number of axes in the data array */ + long naxes[], /* O - length of each data axis */ + int *status) /* IO - error status */ +/* + read and parse the TDIMnnn keyword to get the dimensionality of a column +*/ +{ + int tstatus = 0; + char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffkeyn("TDIM", colnum, keyname, status); /* construct keyword name */ + + ffgkys(fptr, keyname, tdimstr, NULL, &tstatus); /* try reading keyword */ + + ffdtdm(fptr, tdimstr, colnum, maxdim,naxis, naxes, status); /* decode it */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtdmll(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of the column to read */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *naxis, /* O - number of axes in the data array */ + LONGLONG naxes[], /* O - length of each data axis */ + int *status) /* IO - error status */ +/* + read and parse the TDIMnnn keyword to get the dimensionality of a column +*/ +{ + int tstatus = 0; + char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + ffkeyn("TDIM", colnum, keyname, status); /* construct keyword name */ + + ffgkys(fptr, keyname, tdimstr, NULL, &tstatus); /* try reading keyword */ + + ffdtdmll(fptr, tdimstr, colnum, maxdim,naxis, naxes, status); /* decode it */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdtdm(fitsfile *fptr, /* I - FITS file pointer */ + char *tdimstr, /* I - TDIMn keyword value string. e.g. (10,10) */ + int colnum, /* I - number of the column */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *naxis, /* O - number of axes in the data array */ + long naxes[], /* O - length of each data axis */ + int *status) /* IO - error status */ +/* + decode the TDIMnnn keyword to get the dimensionality of a column. + Check that the value is legal and consistent with the TFORM value. +*/ +{ + long dimsize, totalpix = 1; + char *loc, *lastloc, message[81]; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ + colptr += (colnum - 1); /* increment to the correct column */ + + if (!tdimstr[0]) /* TDIMn keyword doesn't exist? */ + { + *naxis = 1; /* default = 1 dimensional */ + if (maxdim > 0) + naxes[0] = (long) colptr->trepeat; /* default length = repeat */ + } + else + { + *naxis = 0; + + loc = strchr(tdimstr, '(' ); /* find the opening quote */ + if (!loc) + { + sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); + return(*status = BAD_TDIM); + } + + while (loc) + { + loc++; + dimsize = strtol(loc, &loc, 10); /* read size of next dimension */ + if (*naxis < maxdim) + naxes[*naxis] = dimsize; + + if (dimsize < 0) + { + ffpmsg("one or more TDIM values are less than 0 (ffdtdm)"); + ffpmsg(tdimstr); + return(*status = BAD_TDIM); + } + + totalpix *= dimsize; + (*naxis)++; + lastloc = loc; + loc = strchr(loc, ','); /* look for comma before next dimension */ + } + + loc = strchr(lastloc, ')' ); /* check for the closing quote */ + if (!loc) + { + sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); + return(*status = BAD_TDIM); + } + + if ((colptr->tdatatype > 0) && ((long) colptr->trepeat != totalpix)) + { + sprintf(message, + "column vector length, %ld, does not equal TDIMn array size, %ld", + (long) colptr->trepeat, totalpix); + ffpmsg(message); + ffpmsg(tdimstr); + return(*status = BAD_TDIM); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdtdmll(fitsfile *fptr, /* I - FITS file pointer */ + char *tdimstr, /* I - TDIMn keyword value string. e.g. (10,10) */ + int colnum, /* I - number of the column */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *naxis, /* O - number of axes in the data array */ + LONGLONG naxes[], /* O - length of each data axis */ + int *status) /* IO - error status */ +/* + decode the TDIMnnn keyword to get the dimensionality of a column. + Check that the value is legal and consistent with the TFORM value. +*/ +{ + LONGLONG dimsize; + LONGLONG totalpix = 1; + char *loc, *lastloc, message[81]; + tcolumn *colptr; + double doublesize; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + return(*status = BAD_COL_NUM); + + colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ + colptr += (colnum - 1); /* increment to the correct column */ + + if (!tdimstr[0]) /* TDIMn keyword doesn't exist? */ + { + *naxis = 1; /* default = 1 dimensional */ + if (maxdim > 0) + naxes[0] = colptr->trepeat; /* default length = repeat */ + } + else + { + *naxis = 0; + + loc = strchr(tdimstr, '(' ); /* find the opening quote */ + if (!loc) + { + sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); + return(*status = BAD_TDIM); + } + + while (loc) + { + loc++; + + /* Read value as a double because the string to 64-bit int function is */ + /* platform dependent (strtoll, strtol, _atoI64). This still gives */ + /* about 48 bits of precision, which is plenty for this purpose. */ + + doublesize = strtod(loc, &loc); + dimsize = (LONGLONG) (doublesize + 0.1); + + if (*naxis < maxdim) + naxes[*naxis] = dimsize; + + if (dimsize < 0) + { + ffpmsg("one or more TDIM values are less than 0 (ffdtdm)"); + ffpmsg(tdimstr); + return(*status = BAD_TDIM); + } + + totalpix *= dimsize; + (*naxis)++; + lastloc = loc; + loc = strchr(loc, ','); /* look for comma before next dimension */ + } + + loc = strchr(lastloc, ')' ); /* check for the closing quote */ + if (!loc) + { + sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); + return(*status = BAD_TDIM); + } + + if ((colptr->tdatatype > 0) && (colptr->trepeat != totalpix)) + { + sprintf(message, + "column vector length, %.0f, does not equal TDIMn array size, %.0f", + (double) (colptr->trepeat), (double) totalpix); + ffpmsg(message); + ffpmsg(tdimstr); + return(*status = BAD_TDIM); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghpr(fitsfile *fptr, /* I - FITS file pointer */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *simple, /* O - does file conform to FITS standard? 1/0 */ + int *bitpix, /* O - number of bits per data value pixel */ + int *naxis, /* O - number of axes in the data array */ + long naxes[], /* O - length of each data axis */ + long *pcount, /* O - number of group parameters (usually 0) */ + long *gcount, /* O - number of random groups (usually 1 or 0) */ + int *extend, /* O - may FITS file haave extensions? */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the PRimary array: + Check that the keywords conform to the FITS standard and return the + parameters which determine the size and structure of the primary array + or IMAGE extension. +*/ +{ + int idummy, ii; + LONGLONG lldummy; + double ddummy; + LONGLONG tnaxes[99]; + + ffgphd(fptr, maxdim, simple, bitpix, naxis, tnaxes, pcount, gcount, extend, + &ddummy, &ddummy, &lldummy, &idummy, status); + + if (naxis && naxes) { + for (ii = 0; (ii < *naxis) && (ii < maxdim); ii++) + naxes[ii] = (long) tnaxes[ii]; + } else if (naxes) { + for (ii = 0; ii < maxdim; ii++) + naxes[ii] = (long) tnaxes[ii]; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghprll(fitsfile *fptr, /* I - FITS file pointer */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *simple, /* O - does file conform to FITS standard? 1/0 */ + int *bitpix, /* O - number of bits per data value pixel */ + int *naxis, /* O - number of axes in the data array */ + LONGLONG naxes[], /* O - length of each data axis */ + long *pcount, /* O - number of group parameters (usually 0) */ + long *gcount, /* O - number of random groups (usually 1 or 0) */ + int *extend, /* O - may FITS file haave extensions? */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the PRimary array: + Check that the keywords conform to the FITS standard and return the + parameters which determine the size and structure of the primary array + or IMAGE extension. +*/ +{ + int idummy; + LONGLONG lldummy; + double ddummy; + + ffgphd(fptr, maxdim, simple, bitpix, naxis, naxes, pcount, gcount, extend, + &ddummy, &ddummy, &lldummy, &idummy, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghtb(fitsfile *fptr, /* I - FITS file pointer */ + int maxfield, /* I - maximum no. of columns to read; */ + long *naxis1, /* O - length of table row in bytes */ + long *naxis2, /* O - number of rows in the table */ + int *tfields, /* O - number of columns in the table */ + char **ttype, /* O - name of each column */ + long *tbcol, /* O - byte offset in row to each column */ + char **tform, /* O - value of TFORMn keyword for each column */ + char **tunit, /* O - value of TUNITn keyword for each column */ + char *extnm, /* O - value of EXTNAME keyword, if any */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the ASCII TaBle: + Check that the keywords conform to the FITS standard and return the + parameters which describe the table. +*/ +{ + int ii, maxf, nfound, tstatus; + long fields; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xtension[FLEN_VALUE], message[81]; + LONGLONG llnaxis1, llnaxis2, pcount; + + if (*status > 0) + return(*status); + + /* read the first keyword of the extension */ + ffgkyn(fptr, 1, name, value, comm, status); + + if (!strcmp(name, "XTENSION")) + { + if (ffc2s(value, xtension, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + /* allow the quoted string value to begin in any column and */ + /* allow any number of trailing blanks before the closing quote */ + if ( (value[0] != '\'') || /* first char must be a quote */ + ( strcmp(xtension, "TABLE") ) ) + { + sprintf(message, + "This is not a TABLE extension: %s", value); + ffpmsg(message); + return(*status = NOT_ATABLE); + } + } + + else /* error: 1st keyword of extension != XTENSION */ + { + sprintf(message, + "First keyword of the extension is not XTENSION: %s", name); + ffpmsg(message); + return(*status = NO_XTENSION); + } + + if (ffgttb(fptr, &llnaxis1, &llnaxis2, &pcount, &fields, status) > 0) + return(*status); + + if (naxis1) + *naxis1 = (long) llnaxis1; + + if (naxis2) + *naxis2 = (long) llnaxis2; + + if (pcount != 0) + { + sprintf(message, "PCOUNT = %.0f is illegal in ASCII table; must = 0", + (double) pcount); + ffpmsg(message); + return(*status = BAD_PCOUNT); + } + + if (tfields) + *tfields = fields; + + if (maxfield < 0) + maxf = fields; + else + maxf = minvalue(maxfield, fields); + + if (maxf > 0) + { + for (ii = 0; ii < maxf; ii++) + { /* initialize optional keyword values */ + if (ttype) + *ttype[ii] = '\0'; + + if (tunit) + *tunit[ii] = '\0'; + } + + + if (ttype) + ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); + + if (tunit) + ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); + + if (*status > 0) + return(*status); + + if (tbcol) + { + ffgknj(fptr, "TBCOL", 1, maxf, tbcol, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TBCOL keyword(s) not found in ASCII table header (ffghtb)."); + return(*status = NO_TBCOL); + } + } + + if (tform) + { + ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TFORM keyword(s) not found in ASCII table header (ffghtb)."); + return(*status = NO_TFORM); + } + } + } + + if (extnm) + { + extnm[0] = '\0'; + + tstatus = *status; + ffgkys(fptr, "EXTNAME", extnm, comm, status); + + if (*status == KEY_NO_EXIST) + *status = tstatus; /* keyword not required, so ignore error */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghtbll(fitsfile *fptr, /* I - FITS file pointer */ + int maxfield, /* I - maximum no. of columns to read; */ + LONGLONG *naxis1, /* O - length of table row in bytes */ + LONGLONG *naxis2, /* O - number of rows in the table */ + int *tfields, /* O - number of columns in the table */ + char **ttype, /* O - name of each column */ + LONGLONG *tbcol, /* O - byte offset in row to each column */ + char **tform, /* O - value of TFORMn keyword for each column */ + char **tunit, /* O - value of TUNITn keyword for each column */ + char *extnm, /* O - value of EXTNAME keyword, if any */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the ASCII TaBle: + Check that the keywords conform to the FITS standard and return the + parameters which describe the table. +*/ +{ + int ii, maxf, nfound, tstatus; + long fields; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xtension[FLEN_VALUE], message[81]; + LONGLONG llnaxis1, llnaxis2, pcount; + + if (*status > 0) + return(*status); + + /* read the first keyword of the extension */ + ffgkyn(fptr, 1, name, value, comm, status); + + if (!strcmp(name, "XTENSION")) + { + if (ffc2s(value, xtension, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + /* allow the quoted string value to begin in any column and */ + /* allow any number of trailing blanks before the closing quote */ + if ( (value[0] != '\'') || /* first char must be a quote */ + ( strcmp(xtension, "TABLE") ) ) + { + sprintf(message, + "This is not a TABLE extension: %s", value); + ffpmsg(message); + return(*status = NOT_ATABLE); + } + } + + else /* error: 1st keyword of extension != XTENSION */ + { + sprintf(message, + "First keyword of the extension is not XTENSION: %s", name); + ffpmsg(message); + return(*status = NO_XTENSION); + } + + if (ffgttb(fptr, &llnaxis1, &llnaxis2, &pcount, &fields, status) > 0) + return(*status); + + if (naxis1) + *naxis1 = llnaxis1; + + if (naxis2) + *naxis2 = llnaxis2; + + if (pcount != 0) + { + sprintf(message, "PCOUNT = %.0f is illegal in ASCII table; must = 0", + (double) pcount); + ffpmsg(message); + return(*status = BAD_PCOUNT); + } + + if (tfields) + *tfields = fields; + + if (maxfield < 0) + maxf = fields; + else + maxf = minvalue(maxfield, fields); + + if (maxf > 0) + { + for (ii = 0; ii < maxf; ii++) + { /* initialize optional keyword values */ + if (ttype) + *ttype[ii] = '\0'; + + if (tunit) + *tunit[ii] = '\0'; + } + + + if (ttype) + ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); + + if (tunit) + ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); + + if (*status > 0) + return(*status); + + if (tbcol) + { + ffgknjj(fptr, "TBCOL", 1, maxf, tbcol, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TBCOL keyword(s) not found in ASCII table header (ffghtbll)."); + return(*status = NO_TBCOL); + } + } + + if (tform) + { + ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TFORM keyword(s) not found in ASCII table header (ffghtbll)."); + return(*status = NO_TFORM); + } + } + } + + if (extnm) + { + extnm[0] = '\0'; + + tstatus = *status; + ffgkys(fptr, "EXTNAME", extnm, comm, status); + + if (*status == KEY_NO_EXIST) + *status = tstatus; /* keyword not required, so ignore error */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghbn(fitsfile *fptr, /* I - FITS file pointer */ + int maxfield, /* I - maximum no. of columns to read; */ + long *naxis2, /* O - number of rows in the table */ + int *tfields, /* O - number of columns in the table */ + char **ttype, /* O - name of each column */ + char **tform, /* O - TFORMn value for each column */ + char **tunit, /* O - TUNITn value for each column */ + char *extnm, /* O - value of EXTNAME keyword, if any */ + long *pcount, /* O - value of PCOUNT keyword */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the BiNary table: + Check that the keywords conform to the FITS standard and return the + parameters which describe the table. +*/ +{ + int ii, maxf, nfound, tstatus; + long fields; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xtension[FLEN_VALUE], message[81]; + LONGLONG naxis1ll, naxis2ll, pcountll; + + if (*status > 0) + return(*status); + + /* read the first keyword of the extension */ + ffgkyn(fptr, 1, name, value, comm, status); + + if (!strcmp(name, "XTENSION")) + { + if (ffc2s(value, xtension, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + /* allow the quoted string value to begin in any column and */ + /* allow any number of trailing blanks before the closing quote */ + if ( (value[0] != '\'') || /* first char must be a quote */ + ( strcmp(xtension, "BINTABLE") && + strcmp(xtension, "A3DTABLE") && + strcmp(xtension, "3DTABLE") + ) ) + { + sprintf(message, + "This is not a BINTABLE extension: %s", value); + ffpmsg(message); + return(*status = NOT_BTABLE); + } + } + + else /* error: 1st keyword of extension != XTENSION */ + { + sprintf(message, + "First keyword of the extension is not XTENSION: %s", name); + ffpmsg(message); + return(*status = NO_XTENSION); + } + + if (ffgttb(fptr, &naxis1ll, &naxis2ll, &pcountll, &fields, status) > 0) + return(*status); + + if (naxis2) + *naxis2 = (long) naxis2ll; + + if (pcount) + *pcount = (long) pcountll; + + if (tfields) + *tfields = fields; + + if (maxfield < 0) + maxf = fields; + else + maxf = minvalue(maxfield, fields); + + if (maxf > 0) + { + for (ii = 0; ii < maxf; ii++) + { /* initialize optional keyword values */ + if (ttype) + *ttype[ii] = '\0'; + + if (tunit) + *tunit[ii] = '\0'; + } + + if (ttype) + ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); + + if (tunit) + ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); + + if (*status > 0) + return(*status); + + if (tform) + { + ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TFORM keyword(s) not found in binary table header (ffghbn)."); + return(*status = NO_TFORM); + } + } + } + + if (extnm) + { + extnm[0] = '\0'; + + tstatus = *status; + ffgkys(fptr, "EXTNAME", extnm, comm, status); + + if (*status == KEY_NO_EXIST) + *status = tstatus; /* keyword not required, so ignore error */ + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffghbnll(fitsfile *fptr, /* I - FITS file pointer */ + int maxfield, /* I - maximum no. of columns to read; */ + LONGLONG *naxis2, /* O - number of rows in the table */ + int *tfields, /* O - number of columns in the table */ + char **ttype, /* O - name of each column */ + char **tform, /* O - TFORMn value for each column */ + char **tunit, /* O - TUNITn value for each column */ + char *extnm, /* O - value of EXTNAME keyword, if any */ + LONGLONG *pcount, /* O - value of PCOUNT keyword */ + int *status) /* IO - error status */ +/* + Get keywords from the Header of the BiNary table: + Check that the keywords conform to the FITS standard and return the + parameters which describe the table. +*/ +{ + int ii, maxf, nfound, tstatus; + long fields; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xtension[FLEN_VALUE], message[81]; + LONGLONG naxis1ll, naxis2ll, pcountll; + + if (*status > 0) + return(*status); + + /* read the first keyword of the extension */ + ffgkyn(fptr, 1, name, value, comm, status); + + if (!strcmp(name, "XTENSION")) + { + if (ffc2s(value, xtension, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + /* allow the quoted string value to begin in any column and */ + /* allow any number of trailing blanks before the closing quote */ + if ( (value[0] != '\'') || /* first char must be a quote */ + ( strcmp(xtension, "BINTABLE") && + strcmp(xtension, "A3DTABLE") && + strcmp(xtension, "3DTABLE") + ) ) + { + sprintf(message, + "This is not a BINTABLE extension: %s", value); + ffpmsg(message); + return(*status = NOT_BTABLE); + } + } + + else /* error: 1st keyword of extension != XTENSION */ + { + sprintf(message, + "First keyword of the extension is not XTENSION: %s", name); + ffpmsg(message); + return(*status = NO_XTENSION); + } + + if (ffgttb(fptr, &naxis1ll, &naxis2ll, &pcountll, &fields, status) > 0) + return(*status); + + if (naxis2) + *naxis2 = naxis2ll; + + if (pcount) + *pcount = pcountll; + + if (tfields) + *tfields = fields; + + if (maxfield < 0) + maxf = fields; + else + maxf = minvalue(maxfield, fields); + + if (maxf > 0) + { + for (ii = 0; ii < maxf; ii++) + { /* initialize optional keyword values */ + if (ttype) + *ttype[ii] = '\0'; + + if (tunit) + *tunit[ii] = '\0'; + } + + if (ttype) + ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); + + if (tunit) + ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); + + if (*status > 0) + return(*status); + + if (tform) + { + ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); + + if (*status > 0 || nfound != maxf) + { + ffpmsg( + "Required TFORM keyword(s) not found in binary table header (ffghbn)."); + return(*status = NO_TFORM); + } + } + } + + if (extnm) + { + extnm[0] = '\0'; + + tstatus = *status; + ffgkys(fptr, "EXTNAME", extnm, comm, status); + + if (*status == KEY_NO_EXIST) + *status = tstatus; /* keyword not required, so ignore error */ + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgphd(fitsfile *fptr, /* I - FITS file pointer */ + int maxdim, /* I - maximum no. of dimensions to read; */ + int *simple, /* O - does file conform to FITS standard? 1/0 */ + int *bitpix, /* O - number of bits per data value pixel */ + int *naxis, /* O - number of axes in the data array */ + LONGLONG naxes[], /* O - length of each data axis */ + long *pcount, /* O - number of group parameters (usually 0) */ + long *gcount, /* O - number of random groups (usually 1 or 0) */ + int *extend, /* O - may FITS file haave extensions? */ + double *bscale, /* O - array pixel linear scaling factor */ + double *bzero, /* O - array pixel linear scaling zero point */ + LONGLONG *blank, /* O - value used to represent undefined pixels */ + int *nspace, /* O - number of blank keywords prior to END */ + int *status) /* IO - error status */ +{ +/* + Get the Primary HeaDer parameters. Check that the keywords conform to + the FITS standard and return the parameters which determine the size and + structure of the primary array or IMAGE extension. +*/ + int unknown, found_end, tstatus, ii, nextkey, namelen; + long longbitpix, longnaxis; + LONGLONG axislen; + char message[FLEN_ERRMSG], keyword[FLEN_KEYWORD]; + char card[FLEN_CARD]; + char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; + char xtension[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (simple) + *simple = 1; + + unknown = 0; + + /*--------------------------------------------------------------------*/ + /* Get 1st keyword of HDU and test whether it is SIMPLE or XTENSION */ + /*--------------------------------------------------------------------*/ + ffgkyn(fptr, 1, name, value, comm, status); + + if ((fptr->Fptr)->curhdu == 0) /* Is this the beginning of the FITS file? */ + { + if (!strcmp(name, "SIMPLE")) + { + if (value[0] == 'F') + { + if (simple) + *simple=0; /* not a simple FITS file */ + } + else if (value[0] != 'T') + return(*status = BAD_SIMPLE); + } + + else + { + sprintf(message, + "First keyword of the file is not SIMPLE: %s", name); + ffpmsg(message); + return(*status = NO_SIMPLE); + } + } + + else /* not beginning of the file, so presumably an IMAGE extension */ + { /* or it could be a compressed image in a binary table */ + + if (!strcmp(name, "XTENSION")) + { + if (ffc2s(value, xtension, status) > 0) /* get the value string */ + { + ffpmsg("Bad value string for XTENSION keyword:"); + ffpmsg(value); + return(*status); + } + + /* allow the quoted string value to begin in any column and */ + /* allow any number of trailing blanks before the closing quote */ + if ( (value[0] != '\'') || /* first char must be a quote */ + ( strcmp(xtension, "IMAGE") && + strcmp(xtension, "IUEIMAGE") ) ) + { + unknown = 1; /* unknown type of extension; press on anyway */ + sprintf(message, + "This is not an IMAGE extension: %s", value); + ffpmsg(message); + } + } + + else /* error: 1st keyword of extension != XTENSION */ + { + sprintf(message, + "First keyword of the extension is not XTENSION: %s", name); + ffpmsg(message); + return(*status = NO_XTENSION); + } + } + + if (unknown && (fptr->Fptr)->compressimg) + { + /* this is a compressed image, so read ZBITPIX, ZNAXIS keywords */ + unknown = 0; /* reset flag */ + ffxmsg(3, message); /* clear previous spurious error message */ + + if (bitpix) + { + ffgidt(fptr, bitpix, status); /* get bitpix value */ + + if (*status > 0) + { + ffpmsg("Error reading BITPIX value of compressed image"); + return(*status); + } + } + + if (naxis) + { + ffgidm(fptr, naxis, status); /* get NAXIS value */ + + if (*status > 0) + { + ffpmsg("Error reading NAXIS value of compressed image"); + return(*status); + } + } + + if (naxes) + { + ffgiszll(fptr, maxdim, naxes, status); /* get NAXISn value */ + + if (*status > 0) + { + ffpmsg("Error reading NAXISn values of compressed image"); + return(*status); + } + } + + nextkey = 9; /* skip required table keywords in the following search */ + } + else + { + + /*----------------------------------------------------------------*/ + /* Get 2nd keyword; test whether it is BITPIX with legal value */ + /*----------------------------------------------------------------*/ + ffgkyn(fptr, 2, name, value, comm, status); /* BITPIX = 2nd keyword */ + + if (strcmp(name, "BITPIX")) + { + sprintf(message, + "Second keyword of the extension is not BITPIX: %s", name); + ffpmsg(message); + return(*status = NO_BITPIX); + } + + if (ffc2ii(value, &longbitpix, status) > 0) + { + sprintf(message, + "Value of BITPIX keyword is not an integer: %s", value); + ffpmsg(message); + return(*status = BAD_BITPIX); + } + else if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && + longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && + longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) + { + sprintf(message, + "Illegal value for BITPIX keyword: %s", value); + ffpmsg(message); + return(*status = BAD_BITPIX); + } + if (bitpix) + *bitpix = longbitpix; /* do explicit type conversion */ + + /*---------------------------------------------------------------*/ + /* Get 3rd keyword; test whether it is NAXIS with legal value */ + /*---------------------------------------------------------------*/ + ffgtkn(fptr, 3, "NAXIS", &longnaxis, status); + + if (*status == BAD_ORDER) + return(*status = NO_NAXIS); + else if (*status == NOT_POS_INT || longnaxis > 999) + { + sprintf(message,"NAXIS = %ld is illegal", longnaxis); + ffpmsg(message); + return(*status = BAD_NAXIS); + } + else + if (naxis) + *naxis = longnaxis; /* do explicit type conversion */ + + /*---------------------------------------------------------*/ + /* Get the next NAXISn keywords and test for legal values */ + /*---------------------------------------------------------*/ + for (ii=0, nextkey=4; ii < longnaxis; ii++, nextkey++) + { + ffkeyn("NAXIS", ii+1, keyword, status); + ffgtknjj(fptr, 4+ii, keyword, &axislen, status); + + if (*status == BAD_ORDER) + return(*status = NO_NAXES); + else if (*status == NOT_POS_INT) + return(*status = BAD_NAXES); + else if (ii < maxdim) + if (naxes) + naxes[ii] = axislen; + } + } + + /*---------------------------------------------------------*/ + /* now look for other keywords of interest: */ + /* BSCALE, BZERO, BLANK, PCOUNT, GCOUNT, EXTEND, and END */ + /*---------------------------------------------------------*/ + + /* initialize default values in case keyword is not present */ + if (bscale) + *bscale = 1.0; + if (bzero) + *bzero = 0.0; + if (pcount) + *pcount = 0; + if (gcount) + *gcount = 1; + if (extend) + *extend = 0; + if (blank) + *blank = NULL_UNDEFINED; /* no default null value for BITPIX=8,16,32 */ + + *nspace = 0; + found_end = 0; + tstatus = *status; + + for (; !found_end; nextkey++) + { + /* get next keyword */ + /* don't use ffgkyn here because it trys to parse the card to read */ + /* the value string, thus failing to read the file just because of */ + /* minor syntax errors in optional keywords. */ + + if (ffgrec(fptr, nextkey, card, status) > 0 ) /* get the 80-byte card */ + { + if (*status == KEY_OUT_BOUNDS) + { + found_end = 1; /* simply hit the end of the header */ + *status = tstatus; /* reset error status */ + } + else + { + ffpmsg("Failed to find the END keyword in header (ffgphd)."); + } + } + else /* got the next keyword without error */ + { + ffgknm(card, name, &namelen, status); /* get the keyword name */ + + if (fftrec(name, status) > 0) /* test keyword name; catches no END */ + { + sprintf(message, + "Name of keyword no. %d contains illegal character(s): %s", + nextkey, name); + ffpmsg(message); + + if (nextkey % 36 == 0) /* test if at beginning of 36-card record */ + ffpmsg(" (This may indicate a missing END keyword)."); + } + + if (!strcmp(name, "BSCALE") && bscale) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2dd(value, bscale, status) > 0) /* convert to double */ + { + /* reset error status and continue, but still issue warning */ + *status = tstatus; + *bscale = 1.0; + + sprintf(message, + "Error reading BSCALE keyword value as a double: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "BZERO") && bzero) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2dd(value, bzero, status) > 0) /* convert to double */ + { + /* reset error status and continue, but still issue warning */ + *status = tstatus; + *bzero = 0.0; + + sprintf(message, + "Error reading BZERO keyword value as a double: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "BLANK") && blank) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2jj(value, blank, status) > 0) /* convert to LONGLONG */ + { + /* reset error status and continue, but still issue warning */ + *status = tstatus; + *blank = NULL_UNDEFINED; + + sprintf(message, + "Error reading BLANK keyword value as an integer: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "PCOUNT") && pcount) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2ii(value, pcount, status) > 0) /* convert to long */ + { + sprintf(message, + "Error reading PCOUNT keyword value as an integer: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "GCOUNT") && gcount) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2ii(value, gcount, status) > 0) /* convert to long */ + { + sprintf(message, + "Error reading GCOUNT keyword value as an integer: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "EXTEND") && extend) + { + *nspace = 0; /* reset count of blank keywords */ + ffpsvc(card, value, comm, status); /* parse value and comment */ + + if (ffc2ll(value, extend, status) > 0) /* convert to logical */ + { + /* reset error status and continue, but still issue warning */ + *status = tstatus; + *extend = 0; + + sprintf(message, + "Error reading EXTEND keyword value as a logical: %s", value); + ffpmsg(message); + } + } + + else if (!strcmp(name, "END")) + found_end = 1; + + else if (!card[0] ) + *nspace = *nspace + 1; /* this is a blank card in the header */ + + else + *nspace = 0; /* reset count of blank keywords immediately + before the END keyword to zero */ + } + + if (*status > 0) /* exit on error after writing error message */ + { + if ((fptr->Fptr)->curhdu == 0) + ffpmsg( + "Failed to read the required primary array header keywords."); + else + ffpmsg( + "Failed to read the required image extension header keywords."); + + return(*status); + } + } + + if (unknown) + *status = NOT_IMAGE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgttb(fitsfile *fptr, /* I - FITS file pointer*/ + LONGLONG *rowlen, /* O - length of a table row, in bytes */ + LONGLONG *nrows, /* O - number of rows in the table */ + LONGLONG *pcount, /* O - value of PCOUNT keyword */ + long *tfields, /* O - number of fields in the table */ + int *status) /* IO - error status */ +{ +/* + Get and Test TaBle; + Test that this is a legal ASCII or binary table and get some keyword values. + We assume that the calling routine has already tested the 1st keyword + of the extension to ensure that this is really a table extension. +*/ + if (*status > 0) + return(*status); + + if (fftkyn(fptr, 2, "BITPIX", "8", status) == BAD_ORDER) /* 2nd keyword */ + return(*status = NO_BITPIX); /* keyword not BITPIX */ + else if (*status == NOT_POS_INT) + return(*status = BAD_BITPIX); /* value != 8 */ + + if (fftkyn(fptr, 3, "NAXIS", "2", status) == BAD_ORDER) /* 3rd keyword */ + return(*status = NO_NAXIS); /* keyword not NAXIS */ + else if (*status == NOT_POS_INT) + return(*status = BAD_NAXIS); /* value != 2 */ + + if (ffgtknjj(fptr, 4, "NAXIS1", rowlen, status) == BAD_ORDER) /* 4th key */ + return(*status = NO_NAXES); /* keyword not NAXIS1 */ + else if (*status == NOT_POS_INT) + return(*status == BAD_NAXES); /* bad NAXIS1 value */ + + if (ffgtknjj(fptr, 5, "NAXIS2", nrows, status) == BAD_ORDER) /* 5th key */ + return(*status = NO_NAXES); /* keyword not NAXIS2 */ + else if (*status == NOT_POS_INT) + return(*status == BAD_NAXES); /* bad NAXIS2 value */ + + if (ffgtknjj(fptr, 6, "PCOUNT", pcount, status) == BAD_ORDER) /* 6th key */ + return(*status = NO_PCOUNT); /* keyword not PCOUNT */ + else if (*status == NOT_POS_INT) + return(*status = BAD_PCOUNT); /* bad PCOUNT value */ + + if (fftkyn(fptr, 7, "GCOUNT", "1", status) == BAD_ORDER) /* 7th keyword */ + return(*status = NO_GCOUNT); /* keyword not GCOUNT */ + else if (*status == NOT_POS_INT) + return(*status = BAD_GCOUNT); /* value != 1 */ + + if (ffgtkn(fptr, 8, "TFIELDS", tfields, status) == BAD_ORDER) /* 8th key*/ + return(*status = NO_TFIELDS); /* keyword not TFIELDS */ + else if (*status == NOT_POS_INT || *tfields > 999) + return(*status == BAD_TFIELDS); /* bad TFIELDS value */ + + + if (*status > 0) + ffpmsg( + "Error reading required keywords in the table header (FTGTTB)."); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtkn(fitsfile *fptr, /* I - FITS file pointer */ + int numkey, /* I - number of the keyword to read */ + char *name, /* I - expected name of the keyword */ + long *value, /* O - integer value of the keyword */ + int *status) /* IO - error status */ +{ +/* + test that keyword number NUMKEY has the expected name and get the + integer value of the keyword. Return an error if the keyword + name does not match the input name, or if the value of the + keyword is not a positive integer. +*/ + char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; + char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + keyname[0] = '\0'; + valuestring[0] = '\0'; + + if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) + { + if (strcmp(keyname, name) ) + *status = BAD_ORDER; /* incorrect keyword name */ + + else + { + ffc2ii(valuestring, value, status); /* convert to integer */ + + if (*status > 0 || *value < 0 ) + *status = NOT_POS_INT; + } + + if (*status > 0) + { + sprintf(message, + "ffgtkn found unexpected keyword or value for keyword no. %d.", + numkey); + ffpmsg(message); + + sprintf(message, + " Expected positive integer keyword %s, but instead", name); + ffpmsg(message); + + sprintf(message, + " found keyword %s with value %s", keyname, valuestring); + ffpmsg(message); + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtknjj(fitsfile *fptr, /* I - FITS file pointer */ + int numkey, /* I - number of the keyword to read */ + char *name, /* I - expected name of the keyword */ + LONGLONG *value, /* O - integer value of the keyword */ + int *status) /* IO - error status */ +{ +/* + test that keyword number NUMKEY has the expected name and get the + integer value of the keyword. Return an error if the keyword + name does not match the input name, or if the value of the + keyword is not a positive integer. +*/ + char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; + char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + keyname[0] = '\0'; + valuestring[0] = '\0'; + + if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) + { + if (strcmp(keyname, name) ) + *status = BAD_ORDER; /* incorrect keyword name */ + + else + { + ffc2jj(valuestring, value, status); /* convert to integer */ + + if (*status > 0 || *value < 0 ) + *status = NOT_POS_INT; + } + + if (*status > 0) + { + sprintf(message, + "ffgtknjj found unexpected keyword or value for keyword no. %d.", + numkey); + ffpmsg(message); + + sprintf(message, + " Expected positive integer keyword %s, but instead", name); + ffpmsg(message); + + sprintf(message, + " found keyword %s with value %s", keyname, valuestring); + ffpmsg(message); + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftkyn(fitsfile *fptr, /* I - FITS file pointer */ + int numkey, /* I - number of the keyword to read */ + char *name, /* I - expected name of the keyword */ + char *value, /* I - expected value of the keyword */ + int *status) /* IO - error status */ +{ +/* + test that keyword number NUMKEY has the expected name and the + expected value string. +*/ + char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; + char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + keyname[0] = '\0'; + valuestring[0] = '\0'; + + if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) + { + if (strcmp(keyname, name) ) + *status = BAD_ORDER; /* incorrect keyword name */ + + if (strcmp(value, valuestring) ) + *status = NOT_POS_INT; /* incorrect keyword value */ + } + + if (*status > 0) + { + sprintf(message, + "fftkyn found unexpected keyword or value for keyword no. %d.", + numkey); + ffpmsg(message); + + sprintf(message, + " Expected keyword %s with value %s, but", name, value); + ffpmsg(message); + + sprintf(message, + " found keyword %s with value %s", keyname, valuestring); + ffpmsg(message); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffh2st(fitsfile *fptr, /* I - FITS file pointer */ + char **header, /* O - returned header string */ + int *status) /* IO - error status */ + +/* + read header keywords into a long string of chars. This routine allocates + memory for the string, so the calling routine must eventually free the + memory when it is not needed any more. +*/ +{ + int nkeys; + long nrec; + LONGLONG headstart; + + if (*status > 0) + return(*status); + + /* get number of keywords in the header (doesn't include END) */ + if (ffghsp(fptr, &nkeys, NULL, status) > 0) + return(*status); + + nrec = (nkeys / 36 + 1); + + /* allocate memory for all the keywords (multiple of 2880 bytes) */ + *header = (char *) calloc ( nrec * 2880 + 1, 1); + if (!(*header)) + { + *status = MEMORY_ALLOCATION; + ffpmsg("failed to allocate memory to hold all the header keywords"); + return(*status); + } + + ffghadll(fptr, &headstart, NULL, NULL, status); /* get header address */ + ffmbyt(fptr, headstart, REPORT_EOF, status); /* move to header */ + ffgbyt(fptr, nrec * 2880, *header, status); /* copy header */ + *(*header + (nrec * 2880)) = '\0'; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffhdr2str( fitsfile *fptr, /* I - FITS file pointer */ + int exclude_comm, /* I - if TRUE, exclude commentary keywords */ + char **exclist, /* I - list of excluded keyword names */ + int nexc, /* I - number of names in exclist */ + char **header, /* O - returned header string */ + int *nkeys, /* O - returned number of 80-char keywords */ + int *status) /* IO - error status */ +/* + read header keywords into a long string of chars. This routine allocates + memory for the string, so the calling routine must eventually free the + memory when it is not needed any more. If exclude_comm is TRUE, then all + the COMMENT, HISTORY, and keywords will be excluded from the output + string of keywords. Any other list of keywords to be excluded may be + specified with the exclist parameter. +*/ +{ + int casesn, match, exact, totkeys; + long ii, jj; + char keybuf[162], keyname[FLEN_KEYWORD], *headptr; + + *nkeys = 0; + + if (*status > 0) + return(*status); + + /* get number of keywords in the header (doesn't include END) */ + if (ffghsp(fptr, &totkeys, NULL, status) > 0) + return(*status); + + /* allocate memory for all the keywords (multiple of 2880 bytes) */ + *header = (char *) calloc ( (totkeys + 1) * 80 + 1, 1); + if (!(*header)) + { + *status = MEMORY_ALLOCATION; + ffpmsg("failed to allocate memory to hold all the header keywords"); + return(*status); + } + + headptr = *header; + casesn = FALSE; + + /* read every keyword */ + for (ii = 1; ii <= totkeys; ii++) + { + ffgrec(fptr, ii, keybuf, status); + /* pad record with blanks so that it is at least 80 chars long */ + strcat(keybuf, + " "); + + keyname[0] = '\0'; + strncat(keyname, keybuf, 8); /* copy the keyword name */ + + if (exclude_comm) + { + if (!FSTRCMP("COMMENT ", keyname) || + !FSTRCMP("HISTORY ", keyname) || + !FSTRCMP(" ", keyname) ) + continue; /* skip this commentary keyword */ + } + + /* does keyword match any names in the exclusion list? */ + for (jj = 0; jj < nexc; jj++ ) + { + ffcmps(exclist[jj], keyname, casesn, &match, &exact); + if (match) + break; + } + + if (jj == nexc) + { + /* not in exclusion list, add this keyword to the string */ + strcpy(headptr, keybuf); + headptr += 80; + (*nkeys)++; + } + } + + /* add the END keyword */ + strcpy(headptr, + "END "); + headptr += 80; + (*nkeys)++; + + *headptr = '\0'; /* terminate the header string */ + /* minimize the allocated memory */ + *header = (char *) realloc(*header, (*nkeys *80) + 1); + + return(*status); +} diff --git a/software/cfitsio3040/group.c b/software/cfitsio3040/group.c new file mode 100644 index 000000000..9a4a6bd27 --- /dev/null +++ b/software/cfitsio3040/group.c @@ -0,0 +1,6428 @@ +/* This file, group.c, contains the grouping convention suport routines. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ +/* */ +/* The group.c module of CFITSIO was written by Donald G. Jennings of */ +/* the INTEGRAL Science Data Centre (ISDC) under NASA contract task */ +/* 66002J6. The above copyright laws apply. Copyright guidelines of The */ +/* University of Geneva might also apply. */ + +/* The following routines are designed to create, read, and manipulate */ +/* FITS Grouping Tables as defined in the FITS Grouping Convention paper */ +/* by Jennings, Pence, Folk and Schlesinger. The development of the */ +/* grouping structure was partially funded under the NASA AISRP Program. */ + +#include "fitsio2.h" +#include "group.h" +#include +#include +#include + +#if defined(WIN32) || defined(__WIN32__) +#include /* defines the getcwd function on Windows PCs */ +#endif + +#if defined(unix) || defined(__unix__) || defined(__unix) +#include /* needed for getcwd prototype on unix machines */ +#endif + +#define HEX_ESCAPE '%' + +/*--------------------------------------------------------------------------- + Change record: + +D. Jennings, 18/06/98, version 1.0 of group module delivered to B. Pence for + integration into CFITSIO 2.005 + +D. Jennings, 17/11/98, fixed bug in ffgtcpr(). Now use fits_find_nextkey() + correctly and insert auxiliary keyword records + directly before the TTYPE1 keyword in the copied + group table. + +D. Jennings, 22/01/99, ffgmop() now looks for relative file paths when + the MEMBER_LOCATION information is given in a + grouping table. + +D. Jennings, 01/02/99, ffgtop() now looks for relatve file paths when + the GRPLCn keyword value is supplied in the member + HDU header. + +D. Jennings, 01/02/99, ffgtam() now trys to construct relative file paths + from the member's file to the group table's file + (and visa versa) when both the member's file and + group table file are of access type FILE://. + +D. Jennings, 05/05/99, removed the ffgtcn() function; made obsolete by + fits_get_url(). + +D. Jennings, 05/05/99, updated entire module to handle partial URLs and + absolute URLs more robustly. Host dependent directory + paths are now converted to true URLs before being + read from/written to grouping tables. + +D. Jennings, 05/05/99, added the following new functions (note, none of these + are directly callable by the application) + + int fits_path2url() + int fits_url2path() + int fits_get_cwd() + int fits_get_url() + int fits_clean_url() + int fits_relurl2url() + int fits_encode_url() + int fits_unencode_url() + int fits_is_url_absolute() + +-----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------*/ +int ffgtcr(fitsfile *fptr, /* FITS file pointer */ + char *grpname, /* name of the grouping table */ + int grouptype, /* code specifying the type of + grouping table information: + GT_ID_ALL_URI 0 ==> defualt (all columns) + GT_ID_REF 1 ==> ID by reference + GT_ID_POS 2 ==> ID by position + GT_ID_ALL 3 ==> ID by ref. and position + GT_ID_REF_URI 11 ==> (1) + URI info + GT_ID_POS_URI 12 ==> (2) + URI info */ + int *status )/* return status code */ + +/* + create a grouping table at the end of the current FITS file. This + function makes the last HDU in the file the CHDU, then calls the + fits_insert_group() function to actually create the new grouping table. +*/ + +{ + int hdutype; + int hdunum; + + + if(*status != 0) return(*status); + + + *status = fits_get_num_hdus(fptr,&hdunum,status); + + /* If hdunum is 0 then we are at the beginning of the file and + we actually haven't closed the first header yet, so don't do + anything more */ + + if (0 != hdunum) { + + *status = fits_movabs_hdu(fptr,hdunum,&hdutype,status); + } + + /* Now, the whole point of the above two fits_ calls was to get to + the end of file. Let's ignore errors at this point and keep + going since any error is likely to mean that we are already at the + EOF, or the file is fatally corrupted. If we are at the EOF then + the next fits_ call will be ok. If it's corrupted then the + next call will fail, but that's not big deal at this point. + */ + + if (0 != *status ) *status = 0; + + *status = fits_insert_group(fptr,grpname,grouptype,status); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtis(fitsfile *fptr, /* FITS file pointer */ + char *grpname, /* name of the grouping table */ + int grouptype, /* code specifying the type of + grouping table information: + GT_ID_ALL_URI 0 ==> defualt (all columns) + GT_ID_REF 1 ==> ID by reference + GT_ID_POS 2 ==> ID by position + GT_ID_ALL 3 ==> ID by ref. and position + GT_ID_REF_URI 11 ==> (1) + URI info + GT_ID_POS_URI 12 ==> (2) + URI info */ + int *status) /* return status code */ + +/* + insert a grouping table just after the current HDU of the current FITS file. + This is the same as fits_create_group() only it allows the user to select + the place within the FITS file to add the grouping table. +*/ + +{ + + int tfields = 0; + int hdunum = 0; + int hdutype = 0; + int extver = 0; + int i; + + long pcount = 0; + + char *ttype[6]; + char *tform[6]; + + char ttypeBuff[102]; + char tformBuff[54]; + + char extname[] = "GROUPING"; + char keyword[FLEN_KEYWORD]; + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + do + { + + /* set up the ttype and tform character buffers */ + + for(i = 0; i < 6; ++i) + { + ttype[i] = ttypeBuff+(i*17); + tform[i] = tformBuff+(i*9); + } + + /* define the columns required according to the grouptype parameter */ + + *status = ffgtdc(grouptype,0,0,0,0,0,0,ttype,tform,&tfields,status); + + /* create the grouping table using the columns defined above */ + + *status = fits_insert_btbl(fptr,0,tfields,ttype,tform,NULL, + NULL,pcount,status); + + if(*status != 0) continue; + + /* + retrieve the hdu position of the new grouping table for + future use + */ + + fits_get_hdu_num(fptr,&hdunum); + + /* + add the EXTNAME and EXTVER keywords to the HDU just after the + TFIELDS keyword; for now the EXTVER value is set to 0, it will be + set to the correct value later on + */ + + fits_read_keyword(fptr,"TFIELDS",keyvalue,comment,status); + + fits_insert_key_str(fptr,"EXTNAME",extname, + "HDU contains a Grouping Table",status); + fits_insert_key_lng(fptr,"EXTVER",0,"Grouping Table vers. (this file)", + status); + + /* + if the grpname parameter value was defined (Non NULL and non zero + length) then add the GRPNAME keyword and value + */ + + if(grpname != NULL && strlen(grpname) > 0) + fits_insert_key_str(fptr,"GRPNAME",grpname,"Grouping Table name", + status); + + /* + add the TNULL keywords and values for each integer column defined; + integer null values are zero (0) for the MEMBER_POSITION and + MEMBER_VERSION columns. + */ + + for(i = 0; i < tfields && *status == 0; ++i) + { + if(strcasecmp(ttype[i],"MEMBER_POSITION") == 0 || + strcasecmp(ttype[i],"MEMBER_VERSION") == 0) + { + sprintf(keyword,"TFORM%d",i+1); + *status = fits_read_key_str(fptr,keyword,keyvalue,comment, + status); + + sprintf(keyword,"TNULL%d",i+1); + + *status = fits_insert_key_lng(fptr,keyword,0,"Column Null Value", + status); + } + } + + /* + determine the correct EXTVER value for the new grouping table + by finding the highest numbered grouping table EXTVER value + the currently exists + */ + + for(extver = 1; + (fits_movnam_hdu(fptr,ANY_HDU,"GROUPING",extver,status)) == 0; + ++extver); + + if(*status == BAD_HDU_NUM) *status = 0; + + /* + move back to the new grouping table HDU and update the EXTVER + keyword value + */ + + fits_movabs_hdu(fptr,hdunum,&hdutype,status); + + fits_modify_key_lng(fptr,"EXTVER",extver,"&",status); + + }while(0); + + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtch(fitsfile *gfptr, /* FITS pointer to group */ + int grouptype, /* code specifying the type of + grouping table information: + GT_ID_ALL_URI 0 ==> defualt (all columns) + GT_ID_REF 1 ==> ID by reference + GT_ID_POS 2 ==> ID by position + GT_ID_ALL 3 ==> ID by ref. and position + GT_ID_REF_URI 11 ==> (1) + URI info + GT_ID_POS_URI 12 ==> (2) + URI info */ + int *status) /* return status code */ + + +/* + Change the grouping table structure of the grouping table pointed to by + gfptr. The grouptype code specifies the new structure of the table. This + operation only adds or removes grouping table columns, it does not add + or delete group members (i.e., table rows). If the grouping table already + has the desired structure then no operations are performed and function + simply returns with a (0) success status code. If the requested structure + change creates new grouping table columns, then the column values for all + existing members will be filled with the appropriate null values. +*/ + +{ + int xtensionCol, extnameCol, extverCol, positionCol, locationCol, uriCol; + int ncols = 0; + int colnum = 0; + int nrows = 0; + int grptype = 0; + int i,j; + + long intNull = 0; + long tfields = 0; + + char *tform[6]; + char *ttype[6]; + + unsigned char charNull[1] = {'\0'}; + + char ttypeBuff[102]; + char tformBuff[54]; + + char keyword[FLEN_KEYWORD]; + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + + if(*status != 0) return(*status); + + do + { + /* set up the ttype and tform character buffers */ + + for(i = 0; i < 6; ++i) + { + ttype[i] = ttypeBuff+(i*17); + tform[i] = tformBuff+(i*9); + } + + /* retrieve positions of all Grouping table reserved columns */ + + *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, + &locationCol,&uriCol,&grptype,status); + + if(*status != 0) continue; + + /* determine the total number of grouping table columns */ + + *status = fits_read_key_lng(gfptr,"TFIELDS",&tfields,comment,status); + + /* define grouping table columns to be added to the configuration */ + + *status = ffgtdc(grouptype,xtensionCol,extnameCol,extverCol,positionCol, + locationCol,uriCol,ttype,tform,&ncols,status); + + /* + delete any grouping tables columns that exist but do not belong to + new desired configuration; note that we delete before creating new + columns for (file size) efficiency reasons + */ + + switch(grouptype) + { + + case GT_ID_ALL_URI: + + /* no columns to be deleted in this case */ + + break; + + case GT_ID_REF: + + if(positionCol != 0) + { + *status = fits_delete_col(gfptr,positionCol,status); + --tfields; + if(uriCol > positionCol) --uriCol; + if(locationCol > positionCol) --locationCol; + } + if(uriCol != 0) + { + *status = fits_delete_col(gfptr,uriCol,status); + --tfields; + if(locationCol > uriCol) --locationCol; + } + if(locationCol != 0) + *status = fits_delete_col(gfptr,locationCol,status); + + break; + + case GT_ID_POS: + + if(xtensionCol != 0) + { + *status = fits_delete_col(gfptr,xtensionCol,status); + --tfields; + if(extnameCol > xtensionCol) --extnameCol; + if(extverCol > xtensionCol) --extverCol; + if(uriCol > xtensionCol) --uriCol; + if(locationCol > xtensionCol) --locationCol; + } + if(extnameCol != 0) + { + *status = fits_delete_col(gfptr,extnameCol,status); + --tfields; + if(extverCol > extnameCol) --extverCol; + if(uriCol > extnameCol) --uriCol; + if(locationCol > extnameCol) --locationCol; + } + if(extverCol != 0) + { + *status = fits_delete_col(gfptr,extverCol,status); + --tfields; + if(uriCol > extverCol) --uriCol; + if(locationCol > extverCol) --locationCol; + } + if(uriCol != 0) + { + *status = fits_delete_col(gfptr,uriCol,status); + --tfields; + if(locationCol > uriCol) --locationCol; + } + if(locationCol != 0) + { + *status = fits_delete_col(gfptr,locationCol,status); + --tfields; + } + + break; + + case GT_ID_ALL: + + if(uriCol != 0) + { + *status = fits_delete_col(gfptr,uriCol,status); + --tfields; + if(locationCol > uriCol) --locationCol; + } + if(locationCol != 0) + { + *status = fits_delete_col(gfptr,locationCol,status); + --tfields; + } + + break; + + case GT_ID_REF_URI: + + if(positionCol != 0) + { + *status = fits_delete_col(gfptr,positionCol,status); + --tfields; + } + + break; + + case GT_ID_POS_URI: + + if(xtensionCol != 0) + { + *status = fits_delete_col(gfptr,xtensionCol,status); + --tfields; + if(extnameCol > xtensionCol) --extnameCol; + if(extverCol > xtensionCol) --extverCol; + } + if(extnameCol != 0) + { + *status = fits_delete_col(gfptr,extnameCol,status); + --tfields; + if(extverCol > extnameCol) --extverCol; + } + if(extverCol != 0) + { + *status = fits_delete_col(gfptr,extverCol,status); + --tfields; + } + + break; + + default: + + *status = BAD_OPTION; + ffpmsg("Invalid value for grouptype parameter specified (ffgtch)"); + break; + + } + + /* + add all the new grouping table columns that were not there + previously but are called for by the grouptype parameter + */ + + for(i = 0; i < ncols && *status == 0; ++i) + *status = fits_insert_col(gfptr,tfields+i+1,ttype[i],tform[i],status); + + /* + add the TNULL keywords and values for each new integer column defined; + integer null values are zero (0) for the MEMBER_POSITION and + MEMBER_VERSION columns. Insert a null ("/0") into each new string + column defined: MEMBER_XTENSION, MEMBER_NAME, MEMBER_URI_TYPE and + MEMBER_LOCATION. Note that by convention a null string is the + TNULL value for character fields so no TNULL is required. + */ + + for(i = 0; i < ncols && *status == 0; ++i) + { + if(strcasecmp(ttype[i],"MEMBER_POSITION") == 0 || + strcasecmp(ttype[i],"MEMBER_VERSION") == 0) + { + /* col contains int data; set TNULL and insert 0 for each col */ + + *status = fits_get_colnum(gfptr,CASESEN,ttype[i],&colnum, + status); + + sprintf(keyword,"TFORM%d",colnum); + + *status = fits_read_key_str(gfptr,keyword,keyvalue,comment, + status); + + sprintf(keyword,"TNULL%d",colnum); + + *status = fits_insert_key_lng(gfptr,keyword,0, + "Column Null Value",status); + + for(j = 1; j <= nrows && *status == 0; ++j) + *status = fits_write_col_lng(gfptr,colnum,j,1,1,&intNull, + status); + } + else if(strcasecmp(ttype[i],"MEMBER_XTENSION") == 0 || + strcasecmp(ttype[i],"MEMBER_NAME") == 0 || + strcasecmp(ttype[i],"MEMBER_URI_TYPE") == 0 || + strcasecmp(ttype[i],"MEMBER_LOCATION") == 0) + { + + /* new col contains character data; insert NULLs into each col */ + + *status = fits_get_colnum(gfptr,CASESEN,ttype[i],&colnum, + status); + + for(j = 1; j <= nrows && *status == 0; ++j) + /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ + *status = fits_write_col_byt(gfptr,colnum,j,1,1,charNull, + status); + } + } + + }while(0); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtrm(fitsfile *gfptr, /* FITS file pointer to group */ + int rmopt, /* code specifying if member + elements are to be deleted: + OPT_RM_GPT ==> remove only group table + OPT_RM_ALL ==> recursively remove members + and their members (if groups) */ + int *status) /* return status code */ + +/* + remove a grouping table, and optionally all its members. Any groups + containing the grouping table are updated, and all members (if not + deleted) have their GRPIDn and GRPLCn keywords updated accordingly. + If the (deleted) members are members of another grouping table then those + tables are also updated. The CHDU of the FITS file pointed to by gfptr must + be positioned to the grouping table to be deleted. +*/ + +{ + int hdutype; + + long i; + long nmembers = 0; + + HDUtracker HDU; + + + if(*status != 0) return(*status); + + /* + remove the grouping table depending upon the rmopt parameter + */ + + switch(rmopt) + { + + case OPT_RM_GPT: + + /* + for this option, the grouping table is deleted, but the member + HDUs remain; in this case we only have to remove each member from + the grouping table by calling fits_remove_member() with the + OPT_RM_ENTRY option + */ + + /* get the number of members contained by this table */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + /* loop over all grouping table members and remove them */ + + for(i = nmembers; i > 0 && *status == 0; --i) + *status = fits_remove_member(gfptr,i,OPT_RM_ENTRY,status); + + break; + + case OPT_RM_ALL: + + /* + for this option the entire Group is deleted -- this includes all + members and their members (if grouping tables themselves). Call + the recursive form of this function to perform the removal. + */ + + /* add the current grouping table to the HDUtracker struct */ + + HDU.nHDU = 0; + + *status = fftsad(gfptr,&HDU,NULL,NULL); + + /* call the recursive group remove function */ + + *status = ffgtrmr(gfptr,&HDU,status); + + /* free the memory allocated to the HDUtracker struct */ + + for(i = 0; i < HDU.nHDU; ++i) + { + free(HDU.filename[i]); + free(HDU.newFilename[i]); + } + + break; + + default: + + *status = BAD_OPTION; + ffpmsg("Invalid value for the rmopt parameter specified (ffgtrm)"); + break; + + } + + /* + if all went well then unlink and delete the grouping table HDU + */ + + *status = ffgmul(gfptr,0,status); + + *status = fits_delete_hdu(gfptr,&hdutype,status); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtcp(fitsfile *infptr, /* input FITS file pointer */ + fitsfile *outfptr, /* output FITS file pointer */ + int cpopt, /* code specifying copy options: + OPT_GCP_GPT (0) ==> copy only grouping table + OPT_GCP_ALL (2) ==> recusrively copy members + and their members (if + groups) */ + int *status) /* return status code */ + +/* + copy a grouping table, and optionally all its members, to a new FITS file. + If the cpopt is set to OPT_GCP_GPT (copy grouping table only) then the + existing members have their GRPIDn and GRPLCn keywords updated to reflect + the existance of the new group, since they now belong to another group. If + cpopt is set to OPT_GCP_ALL (copy grouping table and members recursively) + then the original members are not updated; the new grouping table is + modified to include only the copied member HDUs and not the original members. + + Note that the recursive version of this function, ffgtcpr(), is called + to perform the group table copy. In the case of cpopt == OPT_GCP_GPT + ffgtcpr() does not actually use recursion. +*/ + +{ + int i; + + HDUtracker HDU; + + + if(*status != 0) return(*status); + + /* make sure infptr and outfptr are not the same pointer */ + + if(infptr == outfptr) *status = IDENTICAL_POINTERS; + else + { + + /* initialize the HDUtracker struct */ + + HDU.nHDU = 0; + + *status = fftsad(infptr,&HDU,NULL,NULL); + + /* + call the recursive form of this function to copy the grouping table. + If the cpopt is OPT_GCP_GPT then there is actually no recursion + performed + */ + + *status = ffgtcpr(infptr,outfptr,cpopt,&HDU,status); + + /* free memory allocated for the HDUtracker struct */ + + for(i = 0; i < HDU.nHDU; ++i) + { + free(HDU.filename[i]); + free(HDU.newFilename[i]); + } + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtmg(fitsfile *infptr, /* FITS file ptr to source grouping table */ + fitsfile *outfptr, /* FITS file ptr to target grouping table */ + int mgopt, /* code specifying merge options: + OPT_MRG_COPY (0) ==> copy members to target + group, leaving source + group in place + OPT_MRG_MOV (1) ==> move members to target + group, source group is + deleted after merge */ + int *status) /* return status code */ + + +/* + merge two grouping tables by combining their members into a single table. + The source grouping table must be the CHDU of the fitsfile pointed to by + infptr, and the target grouping table must be the CHDU of the fitsfile to by + outfptr. All members of the source grouping table shall be copied to the + target grouping table. If the mgopt parameter is OPT_MRG_COPY then the source + grouping table continues to exist after the merge. If the mgopt parameter + is OPT_MRG_MOV then the source grouping table is deleted after the merge, + and all member HDUs are updated accordingly. +*/ +{ + long i ; + long nmembers = 0; + + fitsfile *tmpfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + + *status = fits_get_num_members(infptr,&nmembers,status); + + for(i = 1; i <= nmembers && *status == 0; ++i) + { + *status = fits_open_member(infptr,i,&tmpfptr,status); + *status = fits_add_group_member(outfptr,tmpfptr,0,status); + + if(*status == HDU_ALREADY_MEMBER) *status = 0; + + if(tmpfptr != NULL) + { + fits_close_file(tmpfptr,status); + tmpfptr = NULL; + } + } + + if(*status != 0) continue; + + if(mgopt == OPT_MRG_MOV) + *status = fits_remove_group(infptr,OPT_RM_GPT,status); + + }while(0); + + if(tmpfptr != NULL) + { + fits_close_file(tmpfptr,status); + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtcm(fitsfile *gfptr, /* FITS file pointer to grouping table */ + int cmopt, /* code specifying compact options + OPT_CMT_MBR (1) ==> compact only direct + members (if groups) + OPT_CMT_MBR_DEL (11) ==> (1) + delete all + compacted groups */ + int *status) /* return status code */ + +/* + "Compact" a group pointed to by the FITS file pointer gfptr. This + is achieved by flattening the tree structure of a group and its + (grouping table) members. All members HDUs of a grouping table which is + itself a member of the grouping table gfptr are added to gfptr. Optionally, + the grouping tables which are "compacted" are deleted. If the grouping + table contains no members that are themselves grouping tables then this + function performs a NOOP. +*/ + +{ + long i; + long nmembers = 0; + + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + fitsfile *mfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + if(cmopt != OPT_CMT_MBR && cmopt != OPT_CMT_MBR_DEL) + { + *status = BAD_OPTION; + ffpmsg("Invalid value for cmopt parameter specified (ffgtcm)"); + continue; + } + + /* reteive the number of grouping table members */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + /* + loop over all the grouping table members; if the member is a + grouping table then merge its members with the parent grouping + table + */ + + for(i = 1; i <= nmembers && *status == 0; ++i) + { + *status = fits_open_member(gfptr,i,&mfptr,status); + + if(*status != 0) continue; + + *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,comment,status); + + /* if no EXTNAME keyword then cannot be a grouping table */ + + if(*status == KEY_NO_EXIST) + { + *status = 0; + continue; + } + prepare_keyvalue(keyvalue); + + if(*status != 0) continue; + + /* if EXTNAME == "GROUPING" then process member as grouping table */ + + if(strcasecmp(keyvalue,"GROUPING") == 0) + { + /* merge the member (grouping table) into the grouping table */ + + *status = fits_merge_groups(mfptr,gfptr,OPT_MRG_COPY,status); + + *status = fits_close_file(mfptr,status); + mfptr = NULL; + + /* + remove the member from the grouping table now that all of + its members have been transferred; if cmopt is set to + OPT_CMT_MBR_DEL then remove and delete the member + */ + + if(cmopt == OPT_CMT_MBR) + *status = fits_remove_member(gfptr,i,OPT_RM_ENTRY,status); + else + *status = fits_remove_member(gfptr,i,OPT_RM_MBR,status); + } + else + { + /* not a grouping table; just close the opened member */ + + *status = fits_close_file(mfptr,status); + mfptr = NULL; + } + } + + }while(0); + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffgtvf(fitsfile *gfptr, /* FITS file pointer to group */ + long *firstfailed, /* Member ID (if positive) of first failed + member HDU verify check or GRPID index + (if negitive) of first failed group + link verify check. */ + int *status) /* return status code */ + +/* + check the integrity of a grouping table to make sure that all group members + are accessible and all the links to other grouping tables are valid. The + firstfailed parameter returns the member ID of the first member HDU to fail + verification if positive or the first group link to fail if negative; + otherwise firstfailed contains a return value of 0. +*/ + +{ + long i; + long nmembers = 0; + long ngroups = 0; + + char errstr[FLEN_VALUE]; + + fitsfile *fptr = NULL; + + + if(*status != 0) return(*status); + + *firstfailed = 0; + + do + { + /* + attempt to open all the members of the grouping table. We stop + at the first member which cannot be opened (which implies that it + cannot be located) + */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + for(i = 1; i <= nmembers && *status == 0; ++i) + { + *status = fits_open_member(gfptr,i,&fptr,status); + fits_close_file(fptr,status); + } + + /* + if the status is non-zero from the above loop then record the + member index that caused the error + */ + + if(*status != 0) + { + *firstfailed = i; + sprintf(errstr,"Group table verify failed for member %ld (ffgtvf)", + i); + ffpmsg(errstr); + continue; + } + + /* + attempt to open all the groups linked to this grouping table. We stop + at the first group which cannot be opened (which implies that it + cannot be located) + */ + + *status = fits_get_num_groups(gfptr,&ngroups,status); + + for(i = 1; i <= ngroups && *status == 0; ++i) + { + *status = fits_open_group(gfptr,i,&fptr,status); + fits_close_file(fptr,status); + } + + /* + if the status from the above loop is non-zero, then record the + GRPIDn index of the group that caused the failure + */ + + if(*status != 0) + { + *firstfailed = -1*i; + sprintf(errstr, + "Group table verify failed for GRPID index %ld (ffgtvf)",i); + ffpmsg(errstr); + continue; + } + + }while(0); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtop(fitsfile *mfptr, /* FITS file pointer to the member HDU */ + int grpid, /* group ID (GRPIDn index) within member HDU */ + fitsfile **gfptr, /* FITS file pointer to grouping table HDU */ + int *status) /* return status code */ + +/* + open the grouping table that contains the member HDU. The member HDU must + be the CHDU of the FITS file pointed to by mfptr, and the grouping table + is identified by the Nth index number of the GRPIDn keywords specified in + the member HDU's header. The fitsfile gfptr pointer is positioned with the + appropriate FITS file with the grouping table as the CHDU. If the group + grouping table resides in a file other than the member then an attempt + is first made to open the file readwrite, and failing that readonly. + + Note that it is possible for the GRPIDn/GRPLCn keywords in a member + header to be non-continuous, e.g., GRPID1, GRPID2, GRPID5, GRPID6. In + such cases, the grpid index value specified in the function call shall + identify the (grpid)th GRPID value. In the above example, if grpid == 3, + then the group specified by GRPID5 would be opened. +*/ +{ + int i; + int found; + + long ngroups = 0; + long grpExtver = 0; + + char keyword[FLEN_KEYWORD]; + char keyvalue[FLEN_FILENAME]; + char *tkeyvalue; + char location[FLEN_FILENAME]; + char location1[FLEN_FILENAME]; + char location2[FLEN_FILENAME]; + char comment[FLEN_COMMENT]; + + char *url[2]; + + + if(*status != 0) return(*status); + + do + { + /* set the grouping table pointer to NULL for error checking later */ + + *gfptr = NULL; + + /* + make sure that the group ID requested is valid ==> cannot be + larger than the number of GRPIDn keywords in the member HDU header + */ + + *status = fits_get_num_groups(mfptr,&ngroups,status); + + if(grpid > ngroups) + { + *status = BAD_GROUP_ID; + sprintf(comment, + "GRPID index %d larger total GRPID keywords %ld (ffgtop)", + grpid,ngroups); + ffpmsg(comment); + continue; + } + + /* + find the (grpid)th group that the member HDU belongs to and read + the value of the GRPID(grpid) keyword; fits_get_num_groups() + automatically re-enumerates the GRPIDn/GRPLCn keywords to fill in + any gaps + */ + + sprintf(keyword,"GRPID%d",grpid); + + *status = fits_read_key_lng(mfptr,keyword,&grpExtver,comment,status); + + if(*status != 0) continue; + + /* + if the value of the GRPIDn keyword is positive then the member is + in the same FITS file as the grouping table and we only have to + reopen the current FITS file. Else the member and grouping table + HDUs reside in different files and another FITS file must be opened + as specified by the corresponding GRPLCn keyword + + The DO WHILE loop only executes once and is used to control the + file opening logic. + */ + + do + { + if(grpExtver > 0) + { + /* + the member resides in the same file as the grouping + table, so just reopen the grouping table file + */ + + *status = fits_reopen_file(mfptr,gfptr,status); + continue; + } + + else if(grpExtver == 0) + { + /* a GRPIDn value of zero (0) is undefined */ + + *status = BAD_GROUP_ID; + sprintf(comment,"Invalid value of %ld for GRPID%d (ffgtop)", + grpExtver,grpid); + ffpmsg(comment); + continue; + } + + /* + The GRPLCn keyword value is negative, which implies that + the grouping table must reside in another FITS file; + search for the corresponding GRPLCn keyword + */ + + /* set the grpExtver value positive */ + + grpExtver = -1*grpExtver; + + /* read the GRPLCn keyword value */ + + sprintf(keyword,"GRPLC%d",grpid); + /* SPR 1738 */ + *status = fits_read_key_longstr(mfptr,keyword,&tkeyvalue,comment, + status); + if (0 == *status) { + strcpy(keyvalue,tkeyvalue); + free(tkeyvalue); + } + + + /* if the GRPLCn keyword was not found then there is a problem */ + + if(*status == KEY_NO_EXIST) + { + *status = BAD_GROUP_ID; + + sprintf(comment,"Cannot find GRPLC%d keyword (ffgtop)", + grpid); + ffpmsg(comment); + + continue; + } + + prepare_keyvalue(keyvalue); + + /* + if the GRPLCn keyword value specifies an absolute URL then + try to open the file; we cannot attempt any relative URL + or host-dependent file path reconstruction + */ + + if(fits_is_url_absolute(keyvalue)) + { + ffpmsg("Try to open group table file as absolute URL (ffgtop)"); + + *status = fits_open_file(gfptr,keyvalue,READWRITE,status); + + /* if the open was successful then continue */ + + if(*status == 0) continue; + + /* if READWRITE failed then try opening it READONLY */ + + ffpmsg("OK, try open group table file as READONLY (ffgtop)"); + + *status = 0; + *status = fits_open_file(gfptr,keyvalue,READONLY,status); + + /* continue regardless of the outcome */ + + continue; + } + + /* + see if the URL gives a file path that is absolute on the + host machine + */ + + *status = fits_url2path(keyvalue,location1,status); + + *status = fits_open_file(gfptr,location1,READWRITE,status); + + /* if the file opened then continue */ + + if(*status == 0) continue; + + /* if READWRITE failed then try opening it READONLY */ + + ffpmsg("OK, try open group table file as READONLY (ffgtop)"); + + *status = 0; + *status = fits_open_file(gfptr,location1,READONLY,status); + + /* if the file opened then continue */ + + if(*status == 0) continue; + + /* + the grouping table location given by GRPLCn must specify a + relative URL. We assume that this URL is relative to the + member HDU's FITS file. Try to construct a full URL location + for the grouping table's FITS file and then open it + */ + + *status = 0; + + /* retrieve the URL information for the member HDU's file */ + + url[0] = location1; url[1] = location2; + + *status = fits_get_url(mfptr,url[0],url[1],NULL,NULL,NULL,status); + + /* + It is possible that the member HDU file has an initial + URL it was opened with and a real URL that the file actually + exists at (e.g., an HTTP accessed file copied to a local + file). For each possible URL try to construct a + */ + + for(i = 0, found = 0, *gfptr = NULL; i < 2 && !found; ++i) + { + + /* the url string could be empty */ + + if(*url[i] == 0) continue; + + /* + create a full URL from the partial and the member + HDU file URL + */ + + *status = fits_relurl2url(url[i],keyvalue,location,status); + + /* if an error occured then contniue */ + + if(*status != 0) + { + *status = 0; + continue; + } + + /* + if the location does not specify an access method + then turn it into a host dependent path + */ + + if(! fits_is_url_absolute(location)) + { + *status = fits_url2path(location,url[i],status); + strcpy(location,url[i]); + } + + /* try to open the grouping table file READWRITE */ + + *status = fits_open_file(gfptr,location,READWRITE,status); + + if(*status != 0) + { + /* try to open the grouping table file READONLY */ + + ffpmsg("opening file as READWRITE failed (ffgtop)"); + ffpmsg("OK, try to open file as READONLY (ffgtop)"); + *status = 0; + *status = fits_open_file(gfptr,location,READONLY,status); + } + + /* either set the found flag or reset the status flag */ + + if(*status == 0) + found = 1; + else + *status = 0; + } + + }while(0); /* end of file opening loop */ + + /* if an error occured with the file opening then exit */ + + if(*status != 0) continue; + + if(*gfptr == NULL) + { + ffpmsg("Cannot open or find grouping table FITS file (ffgtop)"); + *status = GROUP_NOT_FOUND; + continue; + } + + /* search for the grouping table in its FITS file */ + + *status = fits_movnam_hdu(*gfptr,ANY_HDU,"GROUPING",(int)grpExtver, + status); + + if(*status != 0) *status = GROUP_NOT_FOUND; + + }while(0); + + if(*status != 0 && *gfptr != NULL) + { + fits_close_file(*gfptr,status); + *gfptr = NULL; + } + + return(*status); +} +/*---------------------------------------------------------------------------*/ +int ffgtam(fitsfile *gfptr, /* FITS file pointer to grouping table HDU */ + fitsfile *mfptr, /* FITS file pointer to member HDU */ + int hdupos, /* member HDU position IF in the same file as + the grouping table AND mfptr == NULL */ + int *status) /* return status code */ + +/* + add a member HDU to an existing grouping table. The fitsfile pointer gfptr + must be positioned with the grouping table as the CHDU. The member HDU + may either be identifed with the fitsfile *mfptr (which must be positioned + to the member HDU) or the hdupos parameter (the HDU number of the member + HDU) if both reside in the same FITS file. The hdupos value is only used + if the mfptr parameter has a value of NULL (0). The new member HDU shall + have the appropriate GRPIDn and GRPLCn keywords created in its header. + + Note that if the member HDU to be added to the grouping table is already + a member of the group then it will not be added a sceond time. +*/ + +{ + int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; + int memberPosition = 0; + int grptype = 0; + int hdutype = 0; + int useLocation = 0; + int nkeys = 6; + int found; + int i; + + int memberIOstate; + int groupIOstate; + int iomode; + + long memberExtver = 0; + long groupExtver = 0; + long memberID = 0; + long nmembers = 0; + long ngroups = 0; + long grpid = 0; + + char memberAccess1[FLEN_VALUE]; + char memberAccess2[FLEN_VALUE]; + char memberFileName[FLEN_FILENAME]; + char memberLocation[FLEN_FILENAME]; + char grplc[FLEN_FILENAME]; + char *tgrplc; + char memberHDUtype[FLEN_VALUE]; + char memberExtname[FLEN_VALUE]; + char memberURI[] = "URL"; + + char groupAccess1[FLEN_VALUE]; + char groupAccess2[FLEN_VALUE]; + char groupFileName[FLEN_FILENAME]; + char groupLocation[FLEN_FILENAME]; + + char cwd[FLEN_FILENAME]; + + char *keys[] = {"GRPNAME","EXTVER","EXTNAME","TFIELDS","GCOUNT","EXTEND"}; + char *tmpPtr[1]; + + char keyword[FLEN_KEYWORD]; + char card[FLEN_CARD]; + + unsigned char charNull[] = {'\0'}; + + fitsfile *tmpfptr = NULL; + + int parentStatus = 0; + + if(*status != 0) return(*status); + + do + { + /* + make sure the grouping table can be modified before proceeding + */ + + fits_file_mode(gfptr,&iomode,status); + + if(iomode != READWRITE) + { + ffpmsg("cannot modify grouping table (ffgtam)"); + *status = BAD_GROUP_ATTACH; + continue; + } + + /* + if the calling function supplied the HDU position of the member + HDU instead of fitsfile pointer then get a fitsfile pointer + */ + + if(mfptr == NULL) + { + *status = fits_reopen_file(gfptr,&tmpfptr,status); + *status = fits_movabs_hdu(tmpfptr,hdupos,&hdutype,status); + + if(*status != 0) continue; + } + else + tmpfptr = mfptr; + + /* + determine all the information about the member HDU that will + be needed later; note that we establish the default values for + all information values that are not explicitly found + */ + + *status = fits_read_key_str(tmpfptr,"XTENSION",memberHDUtype,card, + status); + + if(*status == KEY_NO_EXIST) + { + strcpy(memberHDUtype,"PRIMARY"); + *status = 0; + } + prepare_keyvalue(memberHDUtype); + + *status = fits_read_key_lng(tmpfptr,"EXTVER",&memberExtver,card,status); + + if(*status == KEY_NO_EXIST) + { + memberExtver = 1; + *status = 0; + } + + *status = fits_read_key_str(tmpfptr,"EXTNAME",memberExtname,card, + status); + + if(*status == KEY_NO_EXIST) + { + memberExtname[0] = 0; + *status = 0; + } + prepare_keyvalue(memberExtname); + + fits_get_hdu_num(tmpfptr,&memberPosition); + + /* + Determine if the member HDU's FITS file location needs to be + taken into account when building its grouping table reference + + If the member location needs to be used (==> grouping table and member + HDU reside in different files) then create an appropriate URL for + the member HDU's file and grouping table's file. Note that the logic + for this is rather complicated + */ + + /* SPR 3463, don't do this + if(tmpfptr->Fptr == gfptr->Fptr) + { */ + /* + member HDU and grouping table reside in the same file, no need + to use the location information */ + + /* printf ("same file\n"); + + useLocation = 0; + memberIOstate = 1; + *memberFileName = 0; + } + else + { */ + /* + the member HDU and grouping table FITS file location information + must be used. + + First determine the correct driver and file name for the group + table and member HDU files. If either are disk files then + construct an absolute file path for them. Finally, if both are + disk files construct relative file paths from the group(member) + file to the member(group) file. + + */ + + /* set the USELOCATION flag to true */ + + useLocation = 1; + + /* + get the location, access type and iostate (RO, RW) of the + member HDU file + */ + + *status = fits_get_url(tmpfptr,memberFileName,memberLocation, + memberAccess1,memberAccess2,&memberIOstate, + status); + + /* + if the memberFileName string is empty then use the values of + the memberLocation string. This corresponds to a file where + the "real" file is a temporary memory file, and we must assume + the the application really wants the original file to be the + group member + */ + + if(strlen(memberFileName) == 0) + { + strcpy(memberFileName,memberLocation); + strcpy(memberAccess1,memberAccess2); + } + + /* + get the location, access type and iostate (RO, RW) of the + grouping table file + */ + + *status = fits_get_url(gfptr,groupFileName,groupLocation, + groupAccess1,groupAccess2,&groupIOstate, + status); + + if(*status != 0) continue; + + /* + the grouping table file must be writable to continue + */ + + if(groupIOstate == 0) + { + ffpmsg("cannot modify grouping table (ffgtam)"); + *status = BAD_GROUP_ATTACH; + continue; + } + + /* + determine how to construct the resulting URLs for the member and + group files + */ + + if(strcasecmp(groupAccess1,"file://") && + strcasecmp(memberAccess1,"file://")) + { + *cwd = 0; + /* + nothing to do in this case; both the member and group files + must be of an access type that already gives valid URLs; + i.e., URLs that we can pass directly to the file drivers + */ + } + else + { + /* + retrieve the Current Working Directory as a Unix-like + URL standard string + */ + + *status = fits_get_cwd(cwd,status); + + /* + create full file path for the member HDU FITS file URL + if it is of access type file:// + */ + + if(strcasecmp(memberAccess1,"file://") == 0) + { + if(*memberFileName == '/') + { + strcpy(memberLocation,memberFileName); + } + else + { + strcpy(memberLocation,cwd); + strcat(memberLocation,"/"); + strcat(memberLocation,memberFileName); + } + + *status = fits_clean_url(memberLocation,memberFileName, + status); + } + + /* + create full file path for the grouping table HDU FITS file URL + if it is of access type file:// + */ + + if(strcasecmp(groupAccess1,"file://") == 0) + { + if(*groupFileName == '/') + { + strcpy(groupLocation,groupFileName); + } + else + { + strcpy(groupLocation,cwd); + strcat(groupLocation,"/"); + strcat(groupLocation,groupFileName); + } + + *status = fits_clean_url(groupLocation,groupFileName,status); + } + + /* + if both the member and group files are disk files then + create a relative path (relative URL) strings with + respect to the grouping table's file and the grouping table's + file with respect to the member HDU's file + */ + + if(strcasecmp(groupAccess1,"file://") == 0 && + strcasecmp(memberAccess1,"file://") == 0) + { + fits_url2relurl(memberFileName,groupFileName, + groupLocation,status); + fits_url2relurl(groupFileName,memberFileName, + memberLocation,status); + + /* + copy the resulting partial URL strings to the + memberFileName and groupFileName variables for latter + use in the function + */ + + strcpy(memberFileName,memberLocation); + strcpy(groupFileName,groupLocation); + } + } + /* beo done */ + /* } */ + + + /* retrieve the grouping table's EXTVER value */ + + *status = fits_read_key_lng(gfptr,"EXTVER",&groupExtver,card,status); + + /* + if useLocation is true then make the group EXTVER value negative + for the subsequent GRPIDn/GRPLCn matching + */ + /* SPR 3463 change test */ + if(tmpfptr->Fptr != gfptr->Fptr) groupExtver = -1*groupExtver; + + /* retrieve the number of group members */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + do { + + /* + make sure the member HDU is not already an entry in the + grouping table before adding it + */ + + *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, + memberPosition,memberFileName,&memberID,status); + + if(*status == MEMBER_NOT_FOUND) *status = 0; + else if(*status == 0) + { + parentStatus = HDU_ALREADY_MEMBER; + ffpmsg("Specified HDU is already a member of the Grouping table (ffgtam)"); + continue; + } + else continue; + + /* + if the member HDU is not already recorded in the grouping table + then add it + */ + + /* add a new row to the grouping table */ + + *status = fits_insert_rows(gfptr,nmembers,1,status); + ++nmembers; + + /* retrieve the grouping table column IDs and structure type */ + + *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, + &locationCol,&uriCol,&grptype,status); + + /* fill in the member HDU data in the new grouping table row */ + + *tmpPtr = memberHDUtype; + + if(xtensionCol != 0) + fits_write_col_str(gfptr,xtensionCol,nmembers,1,1,tmpPtr,status); + + *tmpPtr = memberExtname; + + if(extnameCol != 0) + { + if(strlen(memberExtname) != 0) + fits_write_col_str(gfptr,extnameCol,nmembers,1,1,tmpPtr,status); + else + /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ + fits_write_col_byt(gfptr,extnameCol,nmembers,1,1,charNull,status); + } + + if(extverCol != 0) + fits_write_col_lng(gfptr,extverCol,nmembers,1,1,&memberExtver, + status); + + if(positionCol != 0) + fits_write_col_int(gfptr,positionCol,nmembers,1,1, + &memberPosition,status); + + *tmpPtr = memberFileName; + + if(locationCol != 0) + { + /* Change the test for SPR 3463 */ + if(tmpfptr->Fptr != gfptr->Fptr) + fits_write_col_str(gfptr,locationCol,nmembers,1,1,tmpPtr,status); + else + /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ + fits_write_col_byt(gfptr,locationCol,nmembers,1,1,charNull,status); + } + + *tmpPtr = memberURI; + + if(uriCol != 0) + { + + /* Change the test for SPR 3463 */ + + if(tmpfptr->Fptr != gfptr->Fptr) + fits_write_col_str(gfptr,uriCol,nmembers,1,1,tmpPtr,status); + else + /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ + fits_write_col_byt(gfptr,uriCol,nmembers,1,1,charNull,status); + } + } while(0); + + if(0 != *status) continue; + /* + add GRPIDn/GRPLCn keywords to the member HDU header to link + it to the grouing table if the they do not already exist and + the member file is RW + */ + + fits_file_mode(tmpfptr,&iomode,status); + + if(memberIOstate == 0 || iomode != READWRITE) + { + ffpmsg("cannot add GRPID/LC keywords to member HDU: (ffgtam)"); + ffpmsg(memberFileName); + continue; + } + + *status = fits_get_num_groups(tmpfptr,&ngroups,status); + + /* + look for the GRPID/LC keywords in the member HDU; if the keywords + for the back-link to the grouping table already exist then no + need to add them again + */ + + for(i = 1, found = 0; i <= ngroups && !found && *status == 0; ++i) + { + sprintf(keyword,"GRPID%d",(int)ngroups); + *status = fits_read_key_lng(tmpfptr,keyword,&grpid,card,status); + + if(grpid == groupExtver) + { + if(grpid < 0) + { + + /* have to make sure the GRPLCn keyword matches too */ + + sprintf(keyword,"GRPLC%d",(int)ngroups); + /* SPR 1738 */ + *status = fits_read_key_longstr(mfptr,keyword,&tgrplc,card, + status); + if (0 == *status) { + strcpy(grplc,tgrplc); + free(tgrplc); + } + + /* + always compare files using absolute paths + the presence of a non-empty cwd indicates + that the file names may require conversion + to absolute paths + */ + + if(0 < strlen(cwd)) { + /* temp buffer for use in assembling abs. path(s) */ + char tmp[FLEN_FILENAME]; + + /* make grplc absolute if necessary */ + if(!fits_is_url_absolute(grplc)) { + fits_path2url(grplc,groupLocation,status); + + if(groupLocation[0] != '/') + { + strcpy(tmp, cwd); + strcat(tmp,"/"); + strcat(tmp,groupLocation); + fits_clean_url(tmp,grplc,status); + } + } + + /* make groupFileName absolute if necessary */ + if(!fits_is_url_absolute(groupFileName)) { + fits_path2url(groupFileName,groupLocation,status); + + if(groupLocation[0] != '/') + { + strcpy(tmp, cwd); + strcat(tmp,"/"); + strcat(tmp,groupLocation); + /* + note: use groupLocation (which is not used + below this block), to store the absolute + file name instead of using groupFileName. + The latter may be needed unaltered if the + GRPLC is written below + */ + + fits_clean_url(tmp,groupLocation,status); + } + } + } + /* + see if the grplc value and the group file name match + */ + + if(strcmp(grplc,groupLocation) == 0) found = 1; + } + else + { + /* the match is found with GRPIDn alone */ + found = 1; + } + } + } + + /* + if FOUND is true then no need to continue + */ + + if(found) + { + ffpmsg("HDU already has GRPID/LC keywords for group table (ffgtam)"); + continue; + } + + /* + add the GRPID/LC keywords to the member header for this grouping + table + + If NGROUPS == 0 then we must position the header pointer to the + record where we want to insert the GRPID/LC keywords (the pointer + is already correctly positioned if the above search loop activiated) + */ + + if(ngroups == 0) + { + /* + no GRPIDn/GRPLCn keywords currently exist in header so try + to position the header pointer to a desirable position + */ + + for(i = 0, *status = KEY_NO_EXIST; + i < nkeys && *status == KEY_NO_EXIST; ++i) + { + *status = 0; + *status = fits_read_card(tmpfptr,keys[i],card,status); + } + + /* all else fails: move write pointer to end of header */ + + if(*status == KEY_NO_EXIST) + { + *status = 0; + fits_get_hdrspace(tmpfptr,&nkeys,&i,status); + ffgrec(tmpfptr,nkeys,card,status); + } + + /* any other error status then abort */ + + if(*status != 0) continue; + } + + /* + now that the header pointer is positioned for the GRPID/LC + keyword insertion increment the number of group links counter for + the member HDU + */ + + ++ngroups; + + /* + if the member HDU and grouping table reside in the same FITS file + then there is no need to add a GRPLCn keyword + */ + /* SPR 3463 change test */ + if(tmpfptr->Fptr == gfptr->Fptr) + { + /* add the GRPIDn keyword only */ + + sprintf(keyword,"GRPID%d",(int)ngroups); + fits_insert_key_lng(tmpfptr,keyword,groupExtver, + "EXTVER of Group containing this HDU",status); + } + else + { + /* add the GRPIDn and GRPLCn keywords */ + + sprintf(keyword,"GRPID%d",(int)ngroups); + fits_insert_key_lng(tmpfptr,keyword,groupExtver, + "EXTVER of Group containing this HDU",status); + + sprintf(keyword,"GRPLC%d",(int)ngroups); + /* SPR 1738 */ + fits_insert_key_longstr(tmpfptr,keyword,groupFileName, + "URL of file containing Group",status); + fits_write_key_longwarn(tmpfptr,status); + + } + + }while(0); + + /* close the tmpfptr pointer if it was opened in this function */ + + if(mfptr == NULL) + { + *status = fits_close_file(tmpfptr,status); + } + + *status = 0 == *status ? parentStatus : *status; + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgtnm(fitsfile *gfptr, /* FITS file pointer to grouping table */ + long *nmembers, /* member count of the groping table */ + int *status) /* return status code */ + +/* + return the number of member HDUs in a grouping table. The fitsfile pointer + gfptr must be positioned with the grouping table as the CHDU. The number + of grouping table member HDUs is just the NAXIS2 value of the grouping + table. +*/ + +{ + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + + if(*status != 0) return(*status); + + *status = fits_read_keyword(gfptr,"EXTNAME",keyvalue,comment,status); + + if(*status == KEY_NO_EXIST) + *status = NOT_GROUP_TABLE; + else + { + prepare_keyvalue(keyvalue); + + if(strcasecmp(keyvalue,"GROUPING") != 0) + { + *status = NOT_GROUP_TABLE; + ffpmsg("Specified HDU is not a Grouping table (ffgtnm)"); + } + + *status = fits_read_key_lng(gfptr,"NAXIS2",nmembers,comment,status); + } + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffgmng(fitsfile *mfptr, /* FITS file pointer to member HDU */ + long *ngroups, /* total number of groups linked to HDU */ + int *status) /* return status code */ + +/* + return the number of groups to which a HDU belongs, as defined by the number + of GRPIDn/GRPLCn keyword records that appear in the HDU header. The + fitsfile pointer mfptr must be positioned with the member HDU as the CHDU. + Each time this function is called, the indicies of the GRPIDn/GRPLCn + keywords are checked to make sure they are continuous (ie no gaps) and + are re-enumerated to eliminate gaps if gaps are found to be present. +*/ + +{ + int offset; + int index; + int newIndex; + int i; + + long grpid; + + char *inclist[] = {"GRPID#"}; + char keyword[FLEN_KEYWORD]; + char newKeyword[FLEN_KEYWORD]; + char card[FLEN_CARD]; + char comment[FLEN_COMMENT]; + char *tkeyvalue; + + if(*status != 0) return(*status); + + *ngroups = 0; + + /* reset the member HDU keyword counter to the beginning */ + + *status = ffgrec(mfptr,0,card,status); + + /* + search for the number of GRPIDn keywords in the member HDU header + and count them with the ngroups variable + */ + + while(*status == 0) + { + /* read the next GRPIDn keyword in the series */ + + *status = fits_find_nextkey(mfptr,inclist,1,NULL,0,card,status); + + if(*status != 0) continue; + + ++(*ngroups); + } + + if(*status == KEY_NO_EXIST) *status = 0; + + /* + read each GRPIDn/GRPLCn keyword and adjust their index values so that + there are no gaps in the index count + */ + + for(index = 1, offset = 0, i = 1; i <= *ngroups && *status == 0; ++index) + { + sprintf(keyword,"GRPID%d",index); + + /* try to read the next GRPIDn keyword in the series */ + + *status = fits_read_key_lng(mfptr,keyword,&grpid,card,status); + + /* if not found then increment the offset counter and continue */ + + if(*status == KEY_NO_EXIST) + { + *status = 0; + ++offset; + } + else + { + /* + increment the number_keys_found counter and see if the index + of the keyword needs to be updated + */ + + ++i; + + if(offset > 0) + { + /* compute the new index for the GRPIDn/GRPLCn keywords */ + newIndex = index - offset; + + /* update the GRPIDn keyword index */ + + sprintf(newKeyword,"GRPID%d",newIndex); + fits_modify_name(mfptr,keyword,newKeyword,status); + + /* If present, update the GRPLCn keyword index */ + + sprintf(keyword,"GRPLC%d",index); + sprintf(newKeyword,"GRPLC%d",newIndex); + /* SPR 1738 */ + *status = fits_read_key_longstr(mfptr,keyword,&tkeyvalue,comment, + status); + if (0 == *status) { + fits_delete_key(mfptr,keyword,status); + fits_insert_key_longstr(mfptr,newKeyword,tkeyvalue,comment,status); + fits_write_key_longwarn(mfptr,status); + free(tkeyvalue); + } + + + if(*status == KEY_NO_EXIST) *status = 0; + } + } + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgmop(fitsfile *gfptr, /* FITS file pointer to grouping table */ + long member, /* member ID (row num) within grouping table */ + fitsfile **mfptr, /* FITS file pointer to member HDU */ + int *status) /* return status code */ + +/* + open a grouping table member, returning a pointer to the member's FITS file + with the CHDU set to the member HDU. The grouping table must be the CHDU of + the FITS file pointed to by gfptr. The member to open is identified by its + row number within the grouping table (first row/member == 1). + + If the member resides in a FITS file different from the grouping + table the member file is first opened readwrite and if this fails then + it is opened readonly. For access type of FILE:// the member file is + searched for assuming (1) an absolute path is given, (2) a path relative + to the CWD is given, and (3) a path relative to the grouping table file + but not relative to the CWD is given. If all of these fail then the + error FILE_NOT_FOUND is returned. +*/ + +{ + int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; + int grptype,hdutype; + int dummy; + + long hdupos = 0; + long extver = 0; + + char xtension[FLEN_VALUE]; + char extname[FLEN_VALUE]; + char uri[FLEN_VALUE]; + char grpLocation1[FLEN_FILENAME]; + char grpLocation2[FLEN_FILENAME]; + char mbrLocation1[FLEN_FILENAME]; + char mbrLocation2[FLEN_FILENAME]; + char mbrLocation3[FLEN_FILENAME]; + char cwd[FLEN_FILENAME]; + char card[FLEN_CARD]; + char nstr[] = {'\0'}; + char *tmpPtr[1]; + + + if(*status != 0) return(*status); + + do + { + /* + retrieve the Grouping Convention reserved column positions within + the grouping table + */ + + *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, + &locationCol,&uriCol,&grptype,status); + + if(*status != 0) continue; + + /* + extract the member information from grouping table + */ + + tmpPtr[0] = xtension; + + if(xtensionCol != 0) + { + + *status = fits_read_col_str(gfptr,xtensionCol,member,1,1,nstr, + tmpPtr,&dummy,status); + + /* convert the xtension string to a hdutype code */ + + if(strcasecmp(xtension,"PRIMARY") == 0) hdutype = IMAGE_HDU; + else if(strcasecmp(xtension,"IMAGE") == 0) hdutype = IMAGE_HDU; + else if(strcasecmp(xtension,"TABLE") == 0) hdutype = ASCII_TBL; + else if(strcasecmp(xtension,"BINTABLE") == 0) hdutype = BINARY_TBL; + else hdutype = ANY_HDU; + } + + tmpPtr[0] = extname; + + if(extnameCol != 0) + *status = fits_read_col_str(gfptr,extnameCol,member,1,1,nstr, + tmpPtr,&dummy,status); + + if(extverCol != 0) + *status = fits_read_col_lng(gfptr,extverCol,member,1,1,0, + (long*)&extver,&dummy,status); + + if(positionCol != 0) + *status = fits_read_col_lng(gfptr,positionCol,member,1,1,0, + (long*)&hdupos,&dummy,status); + + tmpPtr[0] = mbrLocation1; + + if(locationCol != 0) + *status = fits_read_col_str(gfptr,locationCol,member,1,1,nstr, + tmpPtr,&dummy,status); + tmpPtr[0] = uri; + + if(uriCol != 0) + *status = fits_read_col_str(gfptr,uriCol,member,1,1,nstr, + tmpPtr,&dummy,status); + + if(*status != 0) continue; + + /* + decide what FITS file the member HDU resides in and open the file + using the fitsfile* pointer mfptr; note that this logic is rather + complicated and is based primiarly upon if a URL specifier is given + for the member file in the grouping table + */ + + switch(grptype) + { + + case GT_ID_POS: + case GT_ID_REF: + case GT_ID_ALL: + + /* + no location information is given so we must assume that the + member HDU resides in the same FITS file as the grouping table; + if the grouping table was incorrectly constructed then this + assumption will be false, but there is nothing to be done about + it at this point + */ + + *status = fits_reopen_file(gfptr,mfptr,status); + + break; + + case GT_ID_REF_URI: + case GT_ID_POS_URI: + case GT_ID_ALL_URI: + + /* + The member location column exists. Determine if the member + resides in the same file as the grouping table or in a + separate file; open the member file in either case + */ + + if(strlen(mbrLocation1) == 0) + { + /* + since no location information was given we must assume + that the member is in the same FITS file as the grouping + table + */ + + *status = fits_reopen_file(gfptr,mfptr,status); + } + else + { + /* + make sure the location specifiation is "URL"; we cannot + decode any other URI types at this time + */ + + if(strcasecmp(uri,"URL") != 0) + { + *status = FILE_NOT_OPENED; + sprintf(card, + "Cannot open member HDU file with URI type %s (ffgmop)", + uri); + ffpmsg(card); + + continue; + } + + /* + The location string for the member is not NULL, so it + does not necessially reside in the same FITS file as the + grouping table. + + Three cases are attempted for opening the member's file + in the following order: + + 1. The URL given for the member's file is absolute (i.e., + access method supplied); try to open the member + + 2. The URL given for the member's file is not absolute but + is an absolute file path; try to open the member as a file + after the file path is converted to a host-dependent form + + 3. The URL given for the member's file is not absolute + and is given as a relative path to the location of the + grouping table's file. Create an absolute URL using the + grouping table's file URL and try to open the member. + + If all three cases fail then an error is returned. In each + case the file is first opened in read/write mode and failing + that readonly mode. + + The following DO loop is only used as a mechanism to break + (continue) when the proper file opening method is found + */ + + do + { + /* + CASE 1: + + See if the member URL is absolute (i.e., includes a + access directive) and if so open the file + */ + + if(fits_is_url_absolute(mbrLocation1)) + { + /* + the URL must specify an access method, which + implies that its an absolute reference + + regardless of the access method, pass the whole + URL to the open function for processing + */ + + ffpmsg("member URL is absolute, try open R/W (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation1,READWRITE, + status); + + if(*status == 0) continue; + + *status = 0; + + /* + now try to open file using full URL specs in + readonly mode + */ + + ffpmsg("OK, now try to open read-only (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation1,READONLY, + status); + + /* break from DO loop regardless of status */ + + continue; + } + + /* + CASE 2: + + If we got this far then the member URL location + has no access type ==> FILE:// Try to open the member + file using the URL as is, i.e., assume that it is given + as absolute, if it starts with a '/' character + */ + + ffpmsg("Member URL is of type FILE (ffgmop)"); + + if(*mbrLocation1 == '/') + { + ffpmsg("Member URL specifies abs file path (ffgmop)"); + + /* + convert the URL path to a host dependent path + */ + + *status = fits_url2path(mbrLocation1,mbrLocation2, + status); + + ffpmsg("Try to open member URL in R/W mode (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation2,READWRITE, + status); + + if(*status == 0) continue; + + *status = 0; + + /* + now try to open file using the URL as an absolute + path in readonly mode + */ + + ffpmsg("OK, now try to open read-only (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation2,READONLY, + status); + + /* break from the Do loop regardless of the status */ + + continue; + } + + /* + CASE 3: + + If we got this far then the URL does not specify an + absoulte file path or URL with access method. Since + the path to the group table's file is (obviously) valid + for the CWD, create a full location string for the + member HDU using the grouping table URL as a basis + + The only problem is that the grouping table file might + have two URLs, the original one used to open it and + the one that points to the real file being accessed + (i.e., a file accessed via HTTP but transferred to a + local disk file). Have to attempt to build a URL to + the member HDU file using both of these URLs if + defined. + */ + + ffpmsg("Try to open member file as relative URL (ffgmop)"); + + /* get the URL information for the grouping table file */ + + *status = fits_get_url(gfptr,grpLocation1,grpLocation2, + NULL,NULL,NULL,status); + + /* + if the "real" grouping table file URL is defined then + build a full url for the member HDU file using it + and try to open the member HDU file + */ + + if(*grpLocation1) + { + /* make sure the group location is absolute */ + + if(! fits_is_url_absolute(grpLocation1) && + *grpLocation1 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,grpLocation1); + strcpy(grpLocation1,cwd); + } + + /* create a full URL for the member HDU file */ + + *status = fits_relurl2url(grpLocation1,mbrLocation1, + mbrLocation2,status); + + if(*status != 0) continue; + + /* + if the URL does not have an access method given then + translate it into a host dependent file path + */ + + if(! fits_is_url_absolute(mbrLocation2)) + { + *status = fits_url2path(mbrLocation2,mbrLocation3, + status); + strcpy(mbrLocation2,mbrLocation3); + } + + /* try to open the member file READWRITE */ + + *status = fits_open_file(mfptr,mbrLocation2,READWRITE, + status); + + if(*status == 0) continue; + + *status = 0; + + /* now try to open in readonly mode */ + + ffpmsg("now try to open file as READONLY (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation2,READONLY, + status); + + if(*status == 0) continue; + + *status = 0; + } + + /* + if we got this far then either the "real" grouping table + file URL was not defined or all attempts to open the + resulting member HDU file URL failed. + + if the "original" grouping table file URL is defined then + build a full url for the member HDU file using it + and try to open the member HDU file + */ + + if(*grpLocation2) + { + /* make sure the group location is absolute */ + + if(! fits_is_url_absolute(grpLocation2) && + *grpLocation2 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,grpLocation2); + strcpy(grpLocation2,cwd); + } + + /* create an absolute URL for the member HDU file */ + + *status = fits_relurl2url(grpLocation2,mbrLocation1, + mbrLocation2,status); + if(*status != 0) continue; + + /* + if the URL does not have an access method given then + translate it into a host dependent file path + */ + + if(! fits_is_url_absolute(mbrLocation2)) + { + *status = fits_url2path(mbrLocation2,mbrLocation3, + status); + strcpy(mbrLocation2,mbrLocation3); + } + + /* try to open the member file READWRITE */ + + *status = fits_open_file(mfptr,mbrLocation2,READWRITE, + status); + + if(*status == 0) continue; + + *status = 0; + + /* now try to open in readonly mode */ + + ffpmsg("now try to open file as READONLY (ffgmop)"); + + *status = fits_open_file(mfptr,mbrLocation2,READONLY, + status); + + if(*status == 0) continue; + + *status = 0; + } + + /* + if we got this far then the member HDU file could not + be opened using any method. Log the error. + */ + + ffpmsg("Cannot open member HDU FITS file (ffgmop)"); + *status = MEMBER_NOT_FOUND; + + }while(0); + } + + break; + + default: + + /* no default action */ + + break; + } + + if(*status != 0) continue; + + /* + attempt to locate the member HDU within its FITS file as determined + and opened above + */ + + switch(grptype) + { + + case GT_ID_POS: + case GT_ID_POS_URI: + + /* + try to find the member hdu in the the FITS file pointed to + by mfptr based upon its HDU posistion value. Note that is + impossible to verify if the HDU is actually the correct HDU due + to a lack of information. + */ + + *status = fits_movabs_hdu(*mfptr,(int)hdupos,&hdutype,status); + + break; + + case GT_ID_REF: + case GT_ID_REF_URI: + + /* + try to find the member hdu in the FITS file pointed to + by mfptr based upon its XTENSION, EXTNAME and EXTVER keyword + values + */ + + *status = fits_movnam_hdu(*mfptr,hdutype,extname,extver,status); + + if(*status == BAD_HDU_NUM) + { + *status = MEMBER_NOT_FOUND; + ffpmsg("Cannot find specified member HDU (ffgmop)"); + } + + /* + if the above function returned without error then the + mfptr is pointed to the member HDU + */ + + break; + + case GT_ID_ALL: + case GT_ID_ALL_URI: + + /* + if the member entry has reference information then use it + (ID by reference is safer than ID by position) else use + the position information + */ + + if(strlen(xtension) > 0 && strlen(extname) > 0 && extver > 0) + { + /* valid reference info exists so use it */ + + /* try to find the member hdu in the grouping table's file */ + + *status = fits_movnam_hdu(*mfptr,hdutype,extname,extver,status); + + if(*status == BAD_HDU_NUM) + { + *status = MEMBER_NOT_FOUND; + ffpmsg("Cannot find specified member HDU (ffgmop)"); + } + } + else + { + *status = fits_movabs_hdu(*mfptr,(int)hdupos,&hdutype, + status); + if(*status == END_OF_FILE) *status = MEMBER_NOT_FOUND; + } + + /* + if the above function returned without error then the + mfptr is pointed to the member HDU + */ + + break; + + default: + + /* no default action */ + + break; + } + + }while(0); + + if(*status != 0 && *mfptr != NULL) + { + fits_close_file(*mfptr,status); + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgmcp(fitsfile *gfptr, /* FITS file pointer to group */ + fitsfile *mfptr, /* FITS file pointer to new member + FITS file */ + long member, /* member ID (row num) within grouping table */ + int cpopt, /* code specifying copy options: + OPT_MCP_ADD (0) ==> add copied member to the + grouping table + OPT_MCP_NADD (1) ==> do not add member copy to + the grouping table + OPT_MCP_REPL (2) ==> replace current member + entry with member copy */ + int *status) /* return status code */ + +/* + copy a member HDU of a grouping table to a new FITS file. The grouping table + must be the CHDU of the FITS file pointed to by gfptr. The copy of the + group member shall be appended to the end of the FITS file pointed to by + mfptr. If the cpopt parameter is set to OPT_MCP_ADD then the copy of the + member is added to the grouping table as a new member, if OPT_MCP_NADD + then the copied member is not added to the grouping table, and if + OPT_MCP_REPL then the copied member is used to replace the original member. + The copied member HDU also has its EXTVER value updated so that its + combination of XTENSION, EXTNAME and EXVTER is unique within its new + FITS file. +*/ + +{ + int numkeys = 0; + int keypos = 0; + int hdunum = 0; + int hdutype = 0; + int i; + + char *incList[] = {"GRPID#","GRPLC#"}; + char extname[FLEN_VALUE]; + char card[FLEN_CARD]; + char comment[FLEN_COMMENT]; + char keyname[FLEN_CARD]; + char value[FLEN_CARD]; + + fitsfile *tmpfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + /* open the member HDU to be copied */ + + *status = fits_open_member(gfptr,member,&tmpfptr,status); + + if(*status != 0) continue; + + /* + if the member is a grouping table then copy it with a call to + fits_copy_group() using the "copy only the grouping table" option + + if it is not a grouping table then copy the hdu with fits_copy_hdu() + remove all GRPIDn and GRPLCn keywords, and update the EXTVER keyword + value + */ + + /* get the member HDU's EXTNAME value */ + + *status = fits_read_key_str(tmpfptr,"EXTNAME",extname,comment,status); + + /* if no EXTNAME value was found then set the extname to a null string */ + + if(*status == KEY_NO_EXIST) + { + extname[0] = 0; + *status = 0; + } + else if(*status != 0) continue; + + prepare_keyvalue(extname); + + /* if a grouping table then copy with fits_copy_group() */ + + if(strcasecmp(extname,"GROUPING") == 0) + *status = fits_copy_group(tmpfptr,mfptr,OPT_GCP_GPT,status); + else + { + /* copy the non-grouping table HDU the conventional way */ + + *status = fits_copy_hdu(tmpfptr,mfptr,0,status); + + ffgrec(mfptr,0,card,status); + + /* delete all the GRPIDn and GRPLCn keywords in the copied HDU */ + + while(*status == 0) + { + *status = fits_find_nextkey(mfptr,incList,2,NULL,0,card,status); + *status = fits_get_hdrpos(mfptr,&numkeys,&keypos,status); + /* SPR 1738 */ + *status = fits_read_keyn(mfptr,keypos-1,keyname,value, + comment,status); + *status = fits_read_record(mfptr,keypos-1,card,status); + *status = fits_delete_key(mfptr,keyname,status); + } + + if(*status == KEY_NO_EXIST) *status = 0; + if(*status != 0) continue; + } + + /* + if the member HDU does not have an EXTNAME keyword then add one + with a default value + */ + + if(strlen(extname) == 0) + { + if(fits_get_hdu_num(tmpfptr,&hdunum) == 1) + { + strcpy(extname,"PRIMARY"); + *status = fits_write_key_str(mfptr,"EXTNAME",extname, + "HDU was Formerly a Primary Array", + status); + } + else + { + strcpy(extname,"DEFAULT"); + *status = fits_write_key_str(mfptr,"EXTNAME",extname, + "default EXTNAME set by CFITSIO", + status); + } + } + + /* + update the member HDU's EXTVER value (add it if not present) + */ + + fits_get_hdu_num(mfptr,&hdunum); + fits_get_hdu_type(mfptr,&hdutype,status); + + /* set the EXTVER value to 0 for now */ + + *status = fits_modify_key_lng(mfptr,"EXTVER",0,NULL,status); + + /* if the EXTVER keyword was not found then add it */ + + if(*status == KEY_NO_EXIST) + { + *status = 0; + *status = fits_read_key_str(mfptr,"EXTNAME",extname,comment, + status); + *status = fits_insert_key_lng(mfptr,"EXTVER",0, + "Extension version ID",status); + } + + if(*status != 0) continue; + + /* find the first available EXTVER value for the copied HDU */ + + for(i = 1; fits_movnam_hdu(mfptr,hdutype,extname,i,status) == 0; ++i); + + *status = 0; + + fits_movabs_hdu(mfptr,hdunum,&hdutype,status); + + /* reset the copied member HDUs EXTVER value */ + + *status = fits_modify_key_lng(mfptr,"EXTVER",(long)i,NULL,status); + + /* + perform member copy operations that are dependent upon the cpopt + parameter value + */ + + switch(cpopt) + { + case OPT_MCP_ADD: + + /* + add the copied member to the grouping table, leaving the + entry for the original member in place + */ + + *status = fits_add_group_member(gfptr,mfptr,0,status); + + break; + + case OPT_MCP_NADD: + + /* + nothing to do for this copy option + */ + + break; + + case OPT_MCP_REPL: + + /* + remove the original member from the grouping table and add the + copied member in its place + */ + + *status = fits_remove_member(gfptr,member,OPT_RM_ENTRY,status); + *status = fits_add_group_member(gfptr,mfptr,0,status); + + break; + + default: + + *status = BAD_OPTION; + ffpmsg("Invalid value specified for the cmopt parameter (ffgmcp)"); + + break; + } + + }while(0); + + if(tmpfptr != NULL) + { + fits_close_file(tmpfptr,status); + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgmtf(fitsfile *infptr, /* FITS file pointer to source grouping table */ + fitsfile *outfptr, /* FITS file pointer to target grouping table */ + long member, /* member ID within source grouping table */ + int tfopt, /* code specifying transfer opts: + OPT_MCP_ADD (0) ==> copy member to dest. + OPT_MCP_MOV (3) ==> move member to dest. */ + int *status) /* return status code */ + +/* + transfer a group member from one grouping table to another. The source + grouping table must be the CHDU of the fitsfile pointed to by infptr, and + the destination grouping table must be the CHDU of the fitsfile to by + outfptr. If the tfopt parameter is OPT_MCP_ADD then the member is made a + member of the target group and remains a member of the source group. If + the tfopt parameter is OPT_MCP_MOV then the member is deleted from the + source group after the transfer to the destination group. The member to be + transfered is identified by its row number within the source grouping table. +*/ + +{ + fitsfile *mfptr = NULL; + + + if(*status != 0) return(*status); + + if(tfopt != OPT_MCP_MOV && tfopt != OPT_MCP_ADD) + { + *status = BAD_OPTION; + ffpmsg("Invalid value specified for the tfopt parameter (ffgmtf)"); + } + else + { + /* open the member of infptr to be transfered */ + + *status = fits_open_member(infptr,member,&mfptr,status); + + /* add the member to the outfptr grouping table */ + + *status = fits_add_group_member(outfptr,mfptr,0,status); + + /* close the member HDU */ + + *status = fits_close_file(mfptr,status); + + /* + if the tfopt is "move member" then remove it from the infptr + grouping table + */ + + if(tfopt == OPT_MCP_MOV) + *status = fits_remove_member(infptr,member,OPT_RM_ENTRY,status); + } + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int ffgmrm(fitsfile *gfptr, /* FITS file pointer to group table */ + long member, /* member ID (row num) in the group */ + int rmopt, /* code specifying the delete option: + OPT_RM_ENTRY ==> delete the member entry + OPT_RM_MBR ==> delete entry and member HDU */ + int *status) /* return status code */ + +/* + remove a member HDU from a grouping table. The fitsfile pointer gfptr must + be positioned with the grouping table as the CHDU, and the member to + delete is identified by its row number in the table (first member == 1). + The rmopt parameter determines if the member entry is deleted from the + grouping table (in which case GRPIDn and GRPLCn keywords in the member + HDU's header shall be updated accordingly) or if the member HDU shall + itself be removed from its FITS file. +*/ + +{ + int found = 0; + int hdutype = 0; + int index = 0; + int iomode = 0; + + long i; + long ngroups = 0; + long nmembers = 0; + long groupExtver = 0; + long grpid = 0; + + char grpLocation1[FLEN_FILENAME]; + char grpLocation2[FLEN_FILENAME]; + char grpLocation3[FLEN_FILENAME]; + char cwd[FLEN_FILENAME]; + char keyword[FLEN_KEYWORD]; + /* SPR 1738 This can now be longer */ + char grplc[FLEN_FILENAME]; + char *tgrplc; + char keyvalue[FLEN_VALUE]; + char card[FLEN_CARD]; + char *editLocation; + + fitsfile *mfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + /* + make sure the grouping table can be modified before proceeding + */ + + fits_file_mode(gfptr,&iomode,status); + + if(iomode != READWRITE) + { + ffpmsg("cannot modify grouping table (ffgtam)"); + *status = BAD_GROUP_DETACH; + continue; + } + + /* open the group member to be deleted and get its IOstatus*/ + + *status = fits_open_member(gfptr,member,&mfptr,status); + *status = fits_file_mode(mfptr,&iomode,status); + + /* + if the member HDU is to be deleted then call fits_unlink_member() + to remove it from all groups to which it belongs (including + this one) and then delete it. Note that if the member is a + grouping table then we have to recursively call fits_remove_member() + for each member of the member before we delete the member itself. + */ + + if(rmopt == OPT_RM_MBR) + { + /* cannot delete a PHDU */ + if(fits_get_hdu_num(mfptr,&hdutype) == 1) + { + *status = BAD_HDU_NUM; + continue; + } + + /* determine if the member HDU is itself a grouping table */ + + *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,card,status); + + /* if no EXTNAME is found then the HDU cannot be a grouping table */ + + if(*status == KEY_NO_EXIST) + { + keyvalue[0] = 0; + *status = 0; + } + prepare_keyvalue(keyvalue); + + /* Any other error is a reason to abort */ + + if(*status != 0) continue; + + /* if the EXTNAME == GROUPING then the member is a grouping table */ + + if(strcasecmp(keyvalue,"GROUPING") == 0) + { + /* remove each of the grouping table members */ + + *status = fits_get_num_members(mfptr,&nmembers,status); + + for(i = nmembers; i > 0 && *status == 0; --i) + *status = fits_remove_member(mfptr,i,OPT_RM_ENTRY,status); + + if(*status != 0) continue; + } + + /* unlink the member HDU from all groups that contain it */ + + *status = ffgmul(mfptr,0,status); + + if(*status != 0) continue; + + /* reset the grouping table HDU struct */ + + fits_set_hdustruc(gfptr,status); + + /* delete the member HDU */ + + if(iomode != READONLY) + *status = fits_delete_hdu(mfptr,&hdutype,status); + } + else if(rmopt == OPT_RM_ENTRY) + { + /* + The member HDU is only to be removed as an entry from this + grouping table. Actions are (1) find the GRPIDn/GRPLCn + keywords that link the member to the grouping table, (2) + remove the GRPIDn/GRPLCn keyword from the member HDU header + and (3) remove the member entry from the grouping table + */ + + /* + there is no need to seach for and remove the GRPIDn/GRPLCn + keywords from the member HDU if it has not been opened + in READWRITE mode + */ + + if(iomode == READWRITE) + { + /* + determine the group EXTVER value of the grouping table; if + the member HDU and grouping table HDU do not reside in the + same file then set the groupExtver value to its negative + */ + + *status = fits_read_key_lng(gfptr,"EXTVER",&groupExtver,card, + status); + if(mfptr->Fptr != gfptr->Fptr) groupExtver = -1*groupExtver; + + /* + retrieve the URLs for the grouping table; note that it is + possible that the grouping table file has two URLs, the + one used to open it and the "real" one pointing to the + actual file being accessed + */ + + *status = fits_get_url(gfptr,grpLocation1,grpLocation2,NULL, + NULL,NULL,status); + + if(*status != 0) continue; + + /* + if either of the group location strings specify a relative + file path then convert them into absolute file paths + */ + + *status = fits_get_cwd(cwd,status); + + if(*grpLocation1 != 0 && *grpLocation1 != '/' && + !fits_is_url_absolute(grpLocation1)) + { + strcpy(grpLocation3,cwd); + strcat(grpLocation3,"/"); + strcat(grpLocation3,grpLocation1); + fits_clean_url(grpLocation3,grpLocation1,status); + } + + if(*grpLocation2 != 0 && *grpLocation2 != '/' && + !fits_is_url_absolute(grpLocation2)) + { + strcpy(grpLocation3,cwd); + strcat(grpLocation3,"/"); + strcat(grpLocation3,grpLocation2); + fits_clean_url(grpLocation3,grpLocation2,status); + } + + /* + determine the number of groups to which the member HDU + belongs + */ + + *status = fits_get_num_groups(mfptr,&ngroups,status); + + /* reset the HDU keyword position counter to the beginning */ + + *status = ffgrec(mfptr,0,card,status); + + /* + loop over all the GRPIDn keywords in the member HDU header + and find the appropriate GRPIDn and GRPLCn keywords that + identify it as belonging to the group + */ + + for(index = 1, found = 0; index <= ngroups && *status == 0 && + !found; ++index) + { + /* read the next GRPIDn keyword in the series */ + + sprintf(keyword,"GRPID%d",index); + + *status = fits_read_key_lng(mfptr,keyword,&grpid,card, + status); + if(*status != 0) continue; + + /* + grpid value == group EXTVER value then we could have a + match + */ + + if(grpid == groupExtver && grpid > 0) + { + /* + if GRPID is positive then its a match because + both the member HDU and grouping table HDU reside + in the same FITS file + */ + + found = index; + } + else if(grpid == groupExtver && grpid < 0) + { + /* + have to look at the GRPLCn value to determine a + match because the member HDU and grouping table + HDU reside in different FITS files + */ + + sprintf(keyword,"GRPLC%d",index); + + /* SPR 1738 */ + *status = fits_read_key_longstr(mfptr,keyword,&tgrplc, + card, status); + if (0 == *status) { + strcpy(grplc,tgrplc); + free(tgrplc); + } + + if(*status == KEY_NO_EXIST) + { + /* + no GRPLCn keyword value found ==> grouping + convention not followed; nothing we can do + about it, so just continue + */ + + sprintf(card,"No GRPLC%d found for GRPID%d", + index,index); + ffpmsg(card); + *status = 0; + continue; + } + else if (*status != 0) continue; + + /* construct the URL for the GRPLCn value */ + + prepare_keyvalue(grplc); + + /* + if the grplc value specifies a relative path then + turn it into a absolute file path for comparison + purposes + */ + + if(*grplc != 0 && !fits_is_url_absolute(grplc) && + *grplc != '/') + { + /* No, wrong, + strcpy(grpLocation3,cwd); + should be */ + *status = fits_file_name(mfptr,grpLocation3,status); + /* Remove everything after the last / */ + if (NULL != (editLocation = strrchr(grpLocation3,'/'))) { + *editLocation = '\0'; + } + + strcat(grpLocation3,"/"); + strcat(grpLocation3,grplc); + *status = fits_clean_url(grpLocation3,grplc, + status); + } + + /* + if the absolute value of GRPIDn is equal to the + EXTVER value of the grouping table and (one of the + possible two) grouping table file URL matches the + GRPLCn keyword value then we hava a match + */ + + if(strcmp(grplc,grpLocation1) == 0 || + strcmp(grplc,grpLocation2) == 0) + found = index; + } + } + + /* + if found == 0 (false) after the above search then we assume + that it is due to an inpromper updating of the GRPIDn and + GRPLCn keywords in the member header ==> nothing to delete + in the header. Else delete the GRPLCn and GRPIDn keywords + that identify the member HDU with the group HDU and + re-enumerate the remaining GRPIDn and GRPLCn keywords + */ + + if(found != 0) + { + sprintf(keyword,"GRPID%d",found); + *status = fits_delete_key(mfptr,keyword,status); + + sprintf(keyword,"GRPLC%d",found); + *status = fits_delete_key(mfptr,keyword,status); + + *status = 0; + + /* call fits_get_num_groups() to re-enumerate the GRPIDn */ + + *status = fits_get_num_groups(mfptr,&ngroups,status); + } + } + + /* + finally, remove the member entry from the current grouping table + pointed to by gfptr + */ + + *status = fits_delete_rows(gfptr,member,1,status); + } + else + { + *status = BAD_OPTION; + ffpmsg("Invalid value specified for the rmopt parameter (ffgmrm)"); + } + + }while(0); + + if(mfptr != NULL) + { + fits_close_file(mfptr,status); + } + + return(*status); +} + +/*--------------------------------------------------------------------------- + Grouping Table support functions + ---------------------------------------------------------------------------*/ +int ffgtgc(fitsfile *gfptr, /* pointer to the grouping table */ + int *xtensionCol, /* column ID of the MEMBER_XTENSION column */ + int *extnameCol, /* column ID of the MEMBER_NAME column */ + int *extverCol, /* column ID of the MEMBER_VERSION column */ + int *positionCol, /* column ID of the MEMBER_POSITION column */ + int *locationCol, /* column ID of the MEMBER_LOCATION column */ + int *uriCol, /* column ID of the MEMBER_URI_TYPE column */ + int *grptype, /* group structure type code specifying the + grouping table columns that are defined: + GT_ID_ALL_URI (0) ==> all columns defined + GT_ID_REF (1) ==> reference cols only + GT_ID_POS (2) ==> position col only + GT_ID_ALL (3) ==> ref & pos cols + GT_ID_REF_URI (11) ==> ref & loc cols + GT_ID_POS_URI (12) ==> pos & loc cols */ + int *status) /* return status code */ +/* + examine the grouping table pointed to by gfptr and determine the column + index ID of each possible grouping column. If a column is not found then + an index of 0 is returned. the grptype parameter returns the structure + of the grouping table ==> what columns are defined. +*/ + +{ + + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + + if(*status != 0) return(*status); + + do + { + /* + if the HDU does not have an extname of "GROUPING" then it is not + a grouping table + */ + + *status = fits_read_key_str(gfptr,"EXTNAME",keyvalue,comment,status); + + if(*status == KEY_NO_EXIST) + { + *status = NOT_GROUP_TABLE; + ffpmsg("Specified HDU is not a Grouping Table (ffgtgc)"); + } + if(*status != 0) continue; + + prepare_keyvalue(keyvalue); + + if(strcasecmp(keyvalue,"GROUPING") != 0) + { + *status = NOT_GROUP_TABLE; + continue; + } + + /* + search for the MEMBER_XTENSION, MEMBER_NAME, MEMBER_VERSION, + MEMBER_POSITION, MEMBER_LOCATION and MEMBER_URI_TYPE columns + and determine their column index ID + */ + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_XTENSION",xtensionCol, + status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *xtensionCol = 0; + } + + if(*status != 0) continue; + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_NAME",extnameCol,status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *extnameCol = 0; + } + + if(*status != 0) continue; + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_VERSION",extverCol, + status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *extverCol = 0; + } + + if(*status != 0) continue; + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_POSITION",positionCol, + status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *positionCol = 0; + } + + if(*status != 0) continue; + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_LOCATION",locationCol, + status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *locationCol = 0; + } + + if(*status != 0) continue; + + *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_URI_TYPE",uriCol, + status); + + if(*status == COL_NOT_FOUND) + { + *status = 0; + *uriCol = 0; + } + + if(*status != 0) continue; + + /* + determine the type of grouping table structure used by this + grouping table and record it in the grptype parameter + */ + + if(*xtensionCol && *extnameCol && *extverCol && *positionCol && + *locationCol && *uriCol) + *grptype = GT_ID_ALL_URI; + + else if(*xtensionCol && *extnameCol && *extverCol && + *locationCol && *uriCol) + *grptype = GT_ID_REF_URI; + + else if(*xtensionCol && *extnameCol && *extverCol && *positionCol) + *grptype = GT_ID_ALL; + + else if(*xtensionCol && *extnameCol && *extverCol) + *grptype = GT_ID_REF; + + else if(*positionCol && *locationCol && *uriCol) + *grptype = GT_ID_POS_URI; + + else if(*positionCol) + *grptype = GT_ID_POS; + + else + *status = NOT_GROUP_TABLE; + + }while(0); + + /* + if the table contained more than one column with a reserved name then + this cannot be considered a vailid grouping table + */ + + if(*status == COL_NOT_UNIQUE) + { + *status = NOT_GROUP_TABLE; + ffpmsg("Specified HDU has multipule Group table cols defined (ffgtgc)"); + } + + return(*status); +} + +/*****************************************************************************/ +int ffgtdc(int grouptype, /* code specifying the type of + grouping table information: + GT_ID_ALL_URI 0 ==> defualt (all columns) + GT_ID_REF 1 ==> ID by reference + GT_ID_POS 2 ==> ID by position + GT_ID_ALL 3 ==> ID by ref. and position + GT_ID_REF_URI 11 ==> (1) + URI info + GT_ID_POS_URI 12 ==> (2) + URI info */ + int xtensioncol, /* does MEMBER_XTENSION already exist? */ + int extnamecol, /* does MEMBER_NAME aleady exist? */ + int extvercol, /* does MEMBER_VERSION already exist? */ + int positioncol, /* does MEMBER_POSITION already exist? */ + int locationcol, /* does MEMBER_LOCATION already exist? */ + int uricol, /* does MEMBER_URI_TYPE aleardy exist? */ + char *ttype[], /* array of grouping table column TTYPE names + to define (if *col var false) */ + char *tform[], /* array of grouping table column TFORM values + to define (if*col variable false) */ + int *ncols, /* number of TTYPE and TFORM values returned */ + int *status) /* return status code */ + +/* + create the TTYPE and TFORM values for the grouping table according to the + value of the grouptype parameter and the values of the *col flags. The + resulting TTYPE and TFORM are returned in ttype[] and tform[] respectively. + The number of TTYPE and TFORMs returned is given by ncols. Both the TTYPE[] + and TTFORM[] arrays must contain enough pre-allocated strings to hold + the returned information. +*/ + +{ + + int i = 0; + + char xtension[] = "MEMBER_XTENSION"; + char xtenTform[] = "8A"; + + char name[] = "MEMBER_NAME"; + char nameTform[] = "32A"; + + char version[] = "MEMBER_VERSION"; + char verTform[] = "1J"; + + char position[] = "MEMBER_POSITION"; + char posTform[] = "1J"; + + char URI[] = "MEMBER_URI_TYPE"; + char URITform[] = "3A"; + + char location[] = "MEMBER_LOCATION"; + /* SPR 01720, move from 160A to 256A */ + char locTform[] = "256A"; + + + if(*status != 0) return(*status); + + switch(grouptype) + { + + case GT_ID_ALL_URI: + + if(xtensioncol == 0) + { + strcpy(ttype[i],xtension); + strcpy(tform[i],xtenTform); + ++i; + } + if(extnamecol == 0) + { + strcpy(ttype[i],name); + strcpy(tform[i],nameTform); + ++i; + } + if(extvercol == 0) + { + strcpy(ttype[i],version); + strcpy(tform[i],verTform); + ++i; + } + if(positioncol == 0) + { + strcpy(ttype[i],position); + strcpy(tform[i],posTform); + ++i; + } + if(locationcol == 0) + { + strcpy(ttype[i],location); + strcpy(tform[i],locTform); + ++i; + } + if(uricol == 0) + { + strcpy(ttype[i],URI); + strcpy(tform[i],URITform); + ++i; + } + break; + + case GT_ID_REF: + + if(xtensioncol == 0) + { + strcpy(ttype[i],xtension); + strcpy(tform[i],xtenTform); + ++i; + } + if(extnamecol == 0) + { + strcpy(ttype[i],name); + strcpy(tform[i],nameTform); + ++i; + } + if(extvercol == 0) + { + strcpy(ttype[i],version); + strcpy(tform[i],verTform); + ++i; + } + break; + + case GT_ID_POS: + + if(positioncol == 0) + { + strcpy(ttype[i],position); + strcpy(tform[i],posTform); + ++i; + } + break; + + case GT_ID_ALL: + + if(xtensioncol == 0) + { + strcpy(ttype[i],xtension); + strcpy(tform[i],xtenTform); + ++i; + } + if(extnamecol == 0) + { + strcpy(ttype[i],name); + strcpy(tform[i],nameTform); + ++i; + } + if(extvercol == 0) + { + strcpy(ttype[i],version); + strcpy(tform[i],verTform); + ++i; + } + if(positioncol == 0) + { + strcpy(ttype[i],position); + strcpy(tform[i], posTform); + ++i; + } + + break; + + case GT_ID_REF_URI: + + if(xtensioncol == 0) + { + strcpy(ttype[i],xtension); + strcpy(tform[i],xtenTform); + ++i; + } + if(extnamecol == 0) + { + strcpy(ttype[i],name); + strcpy(tform[i],nameTform); + ++i; + } + if(extvercol == 0) + { + strcpy(ttype[i],version); + strcpy(tform[i],verTform); + ++i; + } + if(locationcol == 0) + { + strcpy(ttype[i],location); + strcpy(tform[i],locTform); + ++i; + } + if(uricol == 0) + { + strcpy(ttype[i],URI); + strcpy(tform[i],URITform); + ++i; + } + break; + + case GT_ID_POS_URI: + + if(positioncol == 0) + { + strcpy(ttype[i],position); + strcpy(tform[i],posTform); + ++i; + } + if(locationcol == 0) + { + strcpy(ttype[i],location); + strcpy(tform[i],locTform); + ++i; + } + if(uricol == 0) + { + strcpy(ttype[i],URI); + strcpy(tform[i],URITform); + ++i; + } + break; + + default: + + *status = BAD_OPTION; + ffpmsg("Invalid value specified for the grouptype parameter (ffgtdc)"); + + break; + + } + + *ncols = i; + + return(*status); +} + +/*****************************************************************************/ +int ffgmul(fitsfile *mfptr, /* pointer to the grouping table member HDU */ + int rmopt, /* 0 ==> leave GRPIDn/GRPLCn keywords, + 1 ==> remove GRPIDn/GRPLCn keywords */ + int *status) /* return status code */ + +/* + examine all the GRPIDn and GRPLCn keywords in the member HDUs header + and remove the member from the grouping tables referenced; This + effectively "unlinks" the member from all of its groups. The rmopt + specifies if the GRPIDn/GRPLCn keywords are to be removed from the + member HDUs header after the unlinking. +*/ + +{ + int memberPosition = 0; + int iomode; + + long index = 0; + long ngroups = 0; + long memberExtver = 0; + long memberID = 0; + + char mbrLocation1[FLEN_FILENAME]; + char mbrLocation2[FLEN_FILENAME]; + char memberHDUtype[FLEN_VALUE]; + char memberExtname[FLEN_VALUE]; + char keyword[FLEN_KEYWORD]; + char card[FLEN_CARD]; + + fitsfile *gfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + /* + determine location parameters of the member HDU; note that + default values are supplied if the expected keywords are not + found + */ + + *status = fits_read_key_str(mfptr,"XTENSION",memberHDUtype,card,status); + + if(*status == KEY_NO_EXIST) + { + strcpy(memberHDUtype,"PRIMARY"); + *status = 0; + } + prepare_keyvalue(memberHDUtype); + + *status = fits_read_key_lng(mfptr,"EXTVER",&memberExtver,card,status); + + if(*status == KEY_NO_EXIST) + { + memberExtver = 1; + *status = 0; + } + + *status = fits_read_key_str(mfptr,"EXTNAME",memberExtname,card,status); + + if(*status == KEY_NO_EXIST) + { + memberExtname[0] = 0; + *status = 0; + } + prepare_keyvalue(memberExtname); + + fits_get_hdu_num(mfptr,&memberPosition); + + *status = fits_get_url(mfptr,mbrLocation1,mbrLocation2,NULL,NULL, + NULL,status); + + if(*status != 0) continue; + + /* + open each grouping table linked to this HDU and remove the member + from the grouping tables + */ + + *status = fits_get_num_groups(mfptr,&ngroups,status); + + /* loop over each group linked to the member HDU */ + + for(index = 1; index <= ngroups && *status == 0; ++index) + { + /* open the (index)th group linked to the member HDU */ + + *status = fits_open_group(mfptr,index,&gfptr,status); + + /* if the group could not be opened then just skip it */ + + if(*status != 0) + { + *status = 0; + sprintf(card,"Cannot open the %dth group table (ffgmul)", + (int)index); + ffpmsg(card); + continue; + } + + /* + make sure the grouping table can be modified before proceeding + */ + + fits_file_mode(gfptr,&iomode,status); + + if(iomode != READWRITE) + { + sprintf(card,"The %dth group cannot be modified (ffgtam)", + (int)index); + ffpmsg(card); + continue; + } + + /* + try to find the member's row within the grouping table; first + try using the member HDU file's "real" URL string then try + using its originally opened URL string if either string exist + */ + + memberID = 0; + + if(strlen(mbrLocation1) != 0) + { + *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, + memberPosition,mbrLocation1,&memberID,status); + } + + if(*status == MEMBER_NOT_FOUND && strlen(mbrLocation2) != 0) + { + *status = 0; + *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, + memberPosition,mbrLocation2,&memberID,status); + } + + /* if the member was found then delete it from the grouping table */ + + if(*status == 0) + *status = fits_delete_rows(gfptr,memberID,1,status); + + /* + continue the loop over all member groups even if an error + was generated + */ + + if(*status == MEMBER_NOT_FOUND) + { + ffpmsg("cannot locate member's entry in group table (ffgmul)"); + } + *status = 0; + + /* + close the file pointed to by gfptr if it is non NULL to + prepare for the next loop iterration + */ + + if(gfptr != NULL) + { + fits_close_file(gfptr,status); + gfptr = NULL; + } + } + + if(*status != 0) continue; + + /* + if rmopt is non-zero then find and delete the GRPIDn/GRPLCn + keywords from the member HDU header + */ + + if(rmopt != 0) + { + fits_file_mode(mfptr,&iomode,status); + + if(iomode == READONLY) + { + ffpmsg("Cannot modify member HDU, opened READONLY (ffgmul)"); + continue; + } + + /* delete all the GRPIDn/GRPLCn keywords */ + + for(index = 1; index <= ngroups && *status == 0; ++index) + { + sprintf(keyword,"GRPID%d",(int)index); + fits_delete_key(mfptr,keyword,status); + + sprintf(keyword,"GRPLC%d",(int)index); + fits_delete_key(mfptr,keyword,status); + + if(*status == KEY_NO_EXIST) *status = 0; + } + } + }while(0); + + /* make sure the gfptr has been closed */ + + if(gfptr != NULL) + { + fits_close_file(gfptr,status); + } + +return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffgmf(fitsfile *gfptr, /* pointer to grouping table HDU to search */ + char *xtension, /* XTENSION value for member HDU */ + char *extname, /* EXTNAME value for member HDU */ + int extver, /* EXTVER value for member HDU */ + int position, /* HDU position value for member HDU */ + char *location, /* FITS file location value for member HDU */ + long *member, /* member HDU ID within group table (if found) */ + int *status) /* return status code */ + +/* + try to find the entry for the member HDU defined by the xtension, extname, + extver, position, and location parameters within the grouping table + pointed to by gfptr. If the member HDU is found then its ID (row number) + within the grouping table is returned in the member variable; if not + found then member is returned with a value of 0 and the status return + code will be set to MEMBER_NOT_FOUND. + + Note that the member HDU postion information is used to obtain a member + match only if the grouping table type is GT_ID_POS_URI or GT_ID_POS. This + is because the position information can become invalid much more + easily then the reference information for a group member. +*/ + +{ + int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; + int mposition = 0; + int grptype; + int dummy; + int i; + + long nmembers = 0; + long mextver = 0; + + char charBuff1[FLEN_FILENAME]; + char charBuff2[FLEN_FILENAME]; + char tmpLocation[FLEN_FILENAME]; + char mbrLocation1[FLEN_FILENAME]; + char mbrLocation2[FLEN_FILENAME]; + char mbrLocation3[FLEN_FILENAME]; + char grpLocation1[FLEN_FILENAME]; + char grpLocation2[FLEN_FILENAME]; + char cwd[FLEN_FILENAME]; + + char nstr[] = {'\0'}; + char *tmpPtr[2]; + + if(*status != 0) return(*status); + + *member = 0; + + tmpPtr[0] = charBuff1; + tmpPtr[1] = charBuff2; + + + if(*status != 0) return(*status); + + /* + if the passed LOCATION value is not an absolute URL then turn it + into an absolute path + */ + + if(location == NULL) + { + *tmpLocation = 0; + } + + else if(*location == 0) + { + *tmpLocation = 0; + } + + else if(!fits_is_url_absolute(location)) + { + fits_path2url(location,tmpLocation,status); + + if(*tmpLocation != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,tmpLocation); + fits_clean_url(cwd,tmpLocation,status); + } + } + + else + strcpy(tmpLocation,location); + + /* + retrieve the Grouping Convention reserved column positions within + the grouping table + */ + + *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, + &locationCol,&uriCol,&grptype,status); + + /* retrieve the number of group members */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + /* + loop over all grouping table rows until the member HDU is found + */ + + for(i = 1; i <= nmembers && *member == 0 && *status == 0; ++i) + { + if(xtensionCol != 0) + { + fits_read_col_str(gfptr,xtensionCol,i,1,1,nstr,tmpPtr,&dummy,status); + if(strcasecmp(tmpPtr[0],xtension) != 0) continue; + } + + if(extnameCol != 0) + { + fits_read_col_str(gfptr,extnameCol,i,1,1,nstr,tmpPtr,&dummy,status); + if(strcasecmp(tmpPtr[0],extname) != 0) continue; + } + + if(extverCol != 0) + { + fits_read_col_lng(gfptr,extverCol,i,1,1,0, + (long*)&mextver,&dummy,status); + if(extver != mextver) continue; + } + + /* note we only use postionCol if we have to */ + + if(positionCol != 0 && + (grptype == GT_ID_POS || grptype == GT_ID_POS_URI)) + { + fits_read_col_int(gfptr,positionCol,i,1,1,0, + &mposition,&dummy,status); + if(position != mposition) continue; + } + + /* + if no location string was passed to the function then assume that + the calling application does not wish to use it as a comparision + critera ==> if we got this far then we have a match + */ + + if(location == NULL) + { + ffpmsg("NULL Location string given ==> ingore location (ffgmf)"); + *member = i; + continue; + } + + /* + if the grouping table MEMBER_LOCATION column exists then read the + location URL for the member, else set the location string to + a zero-length string for subsequent comparisions + */ + + if(locationCol != 0) + { + fits_read_col_str(gfptr,locationCol,i,1,1,nstr,tmpPtr,&dummy,status); + strcpy(mbrLocation1,tmpPtr[0]); + *mbrLocation2 = 0; + } + else + *mbrLocation1 = 0; + + /* + if the member location string from the grouping table is zero + length (either implicitly or explicitly) then assume that the + member HDU is in the same file as the grouping table HDU; retrieve + the possible URL values of the grouping table HDU file + */ + + if(*mbrLocation1 == 0) + { + /* retrieve the possible URLs of the grouping table file */ + *status = fits_get_url(gfptr,mbrLocation1,mbrLocation2,NULL,NULL, + NULL,status); + + /* if non-NULL, make sure the first URL is absolute or a full path */ + if(*mbrLocation1 != 0 && !fits_is_url_absolute(mbrLocation1) && + *mbrLocation1 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,mbrLocation1); + fits_clean_url(cwd,mbrLocation1,status); + } + + /* if non-NULL, make sure the first URL is absolute or a full path */ + if(*mbrLocation2 != 0 && !fits_is_url_absolute(mbrLocation2) && + *mbrLocation2 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,mbrLocation2); + fits_clean_url(cwd,mbrLocation2,status); + } + } + + /* + if the member location was specified, then make sure that it is + either an absolute URL or specifies a full path + */ + + else if(!fits_is_url_absolute(mbrLocation1) && *mbrLocation1 != '/') + { + strcpy(mbrLocation2,mbrLocation1); + + /* get the possible URLs for the grouping table file */ + *status = fits_get_url(gfptr,grpLocation1,grpLocation2,NULL,NULL, + NULL,status); + + if(*grpLocation1 != 0) + { + /* make sure the first grouping table URL is absolute */ + if(!fits_is_url_absolute(grpLocation1) && *grpLocation1 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,grpLocation1); + fits_clean_url(cwd,grpLocation1,status); + } + + /* create an absoute URL for the member */ + + fits_relurl2url(grpLocation1,mbrLocation1,mbrLocation3,status); + + /* + if URL construction succeeded then copy it to the + first location string; else set the location string to + empty + */ + + if(*status == 0) + { + strcpy(mbrLocation1,mbrLocation3); + } + + else if(*status == URL_PARSE_ERROR) + { + *status = 0; + *mbrLocation1 = 0; + } + } + else + *mbrLocation1 = 0; + + if(*grpLocation2 != 0) + { + /* make sure the second grouping table URL is absolute */ + if(!fits_is_url_absolute(grpLocation2) && *grpLocation2 != '/') + { + fits_get_cwd(cwd,status); + strcat(cwd,"/"); + strcat(cwd,grpLocation2); + fits_clean_url(cwd,grpLocation2,status); + } + + /* create an absolute URL for the member */ + + fits_relurl2url(grpLocation2,mbrLocation2,mbrLocation3,status); + + /* + if URL construction succeeded then copy it to the + second location string; else set the location string to + empty + */ + + if(*status == 0) + { + strcpy(mbrLocation2,mbrLocation3); + } + + else if(*status == URL_PARSE_ERROR) + { + *status = 0; + *mbrLocation2 = 0; + } + } + else + *mbrLocation2 = 0; + } + + /* + compare the passed member HDU file location string with the + (possibly two) member location strings to see if there is a match + */ + + if(strcmp(mbrLocation1,tmpLocation) != 0 && + strcmp(mbrLocation2,tmpLocation) != 0 ) continue; + + /* if we made it this far then a match to the member HDU was found */ + + *member = i; + } + + /* if a match was not found then set the return status code */ + + if(*member == 0 && *status == 0) + { + *status = MEMBER_NOT_FOUND; + ffpmsg("Cannot find specified member HDU (ffgmf)"); + } + + return(*status); +} + +/*-------------------------------------------------------------------------- + Recursive Group Functions + --------------------------------------------------------------------------*/ +int ffgtrmr(fitsfile *gfptr, /* FITS file pointer to group */ + HDUtracker *HDU, /* list of processed HDUs */ + int *status) /* return status code */ + +/* + recursively remove a grouping table and all its members. Each member of + the grouping table pointed to by gfptr it processed. If the member is itself + a grouping table then ffgtrmr() is recursively called to process all + of its members. The HDUtracker struct *HDU is used to make sure a member + is not processed twice, thus avoiding an infinite loop (e.g., a grouping + table contains itself as a member). +*/ + +{ + int i; + int hdutype; + + long nmembers = 0; + + char keyvalue[FLEN_VALUE]; + char comment[FLEN_COMMENT]; + + fitsfile *mfptr = NULL; + + + if(*status != 0) return(*status); + + /* get the number of members contained by this grouping table */ + + *status = fits_get_num_members(gfptr,&nmembers,status); + + /* loop over all group members and delete them */ + + for(i = nmembers; i > 0 && *status == 0; --i) + { + /* open the member HDU */ + + *status = fits_open_member(gfptr,i,&mfptr,status); + + /* if the member cannot be opened then just skip it and continue */ + + if(*status == MEMBER_NOT_FOUND) + { + *status = 0; + continue; + } + + /* Any other error is a reason to abort */ + + if(*status != 0) continue; + + /* add the member HDU to the HDUtracker struct */ + + *status = fftsad(mfptr,HDU,NULL,NULL); + + /* status == HDU_ALREADY_TRACKED ==> HDU has already been processed */ + + if(*status == HDU_ALREADY_TRACKED) + { + *status = 0; + fits_close_file(mfptr,status); + continue; + } + else if(*status != 0) continue; + + /* determine if the member HDU is itself a grouping table */ + + *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,comment,status); + + /* if no EXTNAME is found then the HDU cannot be a grouping table */ + + if(*status == KEY_NO_EXIST) + { + *status = 0; + keyvalue[0] = 0; + } + prepare_keyvalue(keyvalue); + + /* Any other error is a reason to abort */ + + if(*status != 0) continue; + + /* + if the EXTNAME == GROUPING then the member is a grouping table + and we must call ffgtrmr() to process its members + */ + + if(strcasecmp(keyvalue,"GROUPING") == 0) + *status = ffgtrmr(mfptr,HDU,status); + + /* + unlink all the grouping tables that contain this HDU as a member + and then delete the HDU (if not a PHDU) + */ + + if(fits_get_hdu_num(mfptr,&hdutype) == 1) + *status = ffgmul(mfptr,1,status); + else + { + *status = ffgmul(mfptr,0,status); + *status = fits_delete_hdu(mfptr,&hdutype,status); + } + + /* close the fitsfile pointer */ + + fits_close_file(mfptr,status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtcpr(fitsfile *infptr, /* input FITS file pointer */ + fitsfile *outfptr, /* output FITS file pointer */ + int cpopt, /* code specifying copy options: + OPT_GCP_GPT (0) ==> cp only grouping table + OPT_GCP_ALL (2) ==> recusrively copy + members and their members (if groups) */ + HDUtracker *HDU, /* list of already copied HDUs */ + int *status) /* return status code */ + +/* + copy a Group to a new FITS file. If the cpopt parameter is set to + OPT_GCP_GPT (copy grouping table only) then the existing members have their + GRPIDn and GRPLCn keywords updated to reflect the existance of the new group, + since they now belong to another group. If cpopt is set to OPT_GCP_ALL + (copy grouping table and members recursively) then the original members are + not updated; the new grouping table is modified to include only the copied + member HDUs and not the original members. + + Note that this function is recursive. When copt is OPT_GCP_ALL it will call + itself whenever a member HDU of the current grouping table is itself a + grouping table (i.e., EXTNAME = 'GROUPING'). +*/ + +{ + + int i; + int nexclude = 8; + int hdutype = 0; + int groupHDUnum = 0; + int numkeys = 0; + int keypos = 0; + int startSearch = 0; + int newPosition = 0; + + long nmembers = 0; + long tfields = 0; + long newTfields = 0; + + char keyword[FLEN_KEYWORD]; + char keyvalue[FLEN_VALUE]; + char card[FLEN_CARD]; + char comment[FLEN_CARD]; + char *tkeyvalue; + + char *includeList[] = {"*"}; + char *excludeList[] = {"EXTNAME","EXTVER","GRPNAME","GRPID#","GRPLC#", + "THEAP","TDIM#","T????#"}; + + fitsfile *mfptr = NULL; + + + if(*status != 0) return(*status); + + do + { + /* + create a new grouping table in the FITS file pointed to by outptr + */ + + *status = fits_get_num_members(infptr,&nmembers,status); + + *status = fits_read_key_str(infptr,"GRPNAME",keyvalue,card,status); + + if(*status == KEY_NO_EXIST) + { + keyvalue[0] = 0; + *status = 0; + } + prepare_keyvalue(keyvalue); + + *status = fits_create_group(outfptr,keyvalue,GT_ID_ALL_URI,status); + + /* save the new grouping table's HDU position for future use */ + + fits_get_hdu_num(outfptr,&groupHDUnum); + + /* update the HDUtracker struct with the grouping table's new position */ + + *status = fftsud(infptr,HDU,groupHDUnum,NULL); + + /* + Now populate the copied grouping table depending upon the + copy option parameter value + */ + + switch(cpopt) + { + + /* + for the "copy grouping table only" option we only have to + add the members of the original grouping table to the new + grouping table + */ + + case OPT_GCP_GPT: + + for(i = 1; i <= nmembers && *status == 0; ++i) + { + *status = fits_open_member(infptr,i,&mfptr,status); + *status = fits_add_group_member(outfptr,mfptr,0,status); + + fits_close_file(mfptr,status); + mfptr = NULL; + } + + break; + + case OPT_GCP_ALL: + + /* + for the "copy the entire group" option + */ + + /* loop over all the grouping table members */ + + for(i = 1; i <= nmembers && *status == 0; ++i) + { + /* open the ith member */ + + *status = fits_open_member(infptr,i,&mfptr,status); + + if(*status != 0) continue; + + /* add it to the HDUtracker struct */ + + *status = fftsad(mfptr,HDU,&newPosition,NULL); + + /* if already copied then just add the member to the group */ + + if(*status == HDU_ALREADY_TRACKED) + { + *status = 0; + *status = fits_add_group_member(outfptr,NULL,newPosition, + status); + fits_close_file(mfptr,status); + mfptr = NULL; + continue; + } + else if(*status != 0) continue; + + /* see if the member is a grouping table */ + + *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,card, + status); + + if(*status == KEY_NO_EXIST) + { + keyvalue[0] = 0; + *status = 0; + } + prepare_keyvalue(keyvalue); + + /* + if the member is a grouping table then copy it and all of + its members using ffgtcpr(), else copy it using + fits_copy_member(); the outptr will point to the newly + copied member upon return from both functions + */ + + if(strcasecmp(keyvalue,"GROUPING") == 0) + *status = ffgtcpr(mfptr,outfptr,OPT_GCP_ALL,HDU,status); + else + *status = fits_copy_member(infptr,outfptr,i,OPT_MCP_NADD, + status); + + /* retrieve the position of the newly copied member */ + + fits_get_hdu_num(outfptr,&newPosition); + + /* update the HDUtracker struct with member's new position */ + + if(strcasecmp(keyvalue,"GROUPING") != 0) + *status = fftsud(mfptr,HDU,newPosition,NULL); + + /* move the outfptr back to the copied grouping table HDU */ + + *status = fits_movabs_hdu(outfptr,groupHDUnum,&hdutype,status); + + /* add the copied member HDU to the copied grouping table */ + + *status = fits_add_group_member(outfptr,NULL,newPosition,status); + + /* close the mfptr pointer */ + + fits_close_file(mfptr,status); + mfptr = NULL; + } + + break; + + default: + + *status = BAD_OPTION; + ffpmsg("Invalid value specified for cmopt parameter (ffgtcpr)"); + break; + } + + if(*status != 0) continue; + + /* + reposition the outfptr to the grouping table so that the grouping + table is the CHDU upon return to the calling function + */ + + fits_movabs_hdu(outfptr,groupHDUnum,&hdutype,status); + + /* + copy all auxiliary keyword records from the original grouping table + to the new grouping table; they are copied in their original order + and inserted just before the TTYPE1 keyword record + */ + + *status = fits_read_card(outfptr,"TTYPE1",card,status); + *status = fits_get_hdrpos(outfptr,&numkeys,&keypos,status); + --keypos; + + startSearch = 8; + + while(*status == 0) + { + ffgrec(infptr,startSearch,card,status); + + *status = fits_find_nextkey(infptr,includeList,1,excludeList, + nexclude,card,status); + + *status = fits_get_hdrpos(infptr,&numkeys,&startSearch,status); + + --startSearch; + /* SPR 1738 */ + if (strncmp(card,"GRPLC",5)) { + /* Not going to be a long string so we're ok */ + *status = fits_insert_record(outfptr,keypos,card,status); + } else { + /* We could have a long string */ + *status = fits_read_record(infptr,startSearch,card,status); + card[9] = '\0'; + *status = fits_read_key_longstr(infptr,card,&tkeyvalue,comment, + status); + if (0 == *status) { + fits_insert_key_longstr(outfptr,card,tkeyvalue,comment,status); + fits_write_key_longwarn(outfptr,status); + free(tkeyvalue); + } + } + + ++keypos; + } + + + if(*status == KEY_NO_EXIST) + *status = 0; + else if(*status != 0) continue; + + /* + search all the columns of the original grouping table and copy + those to the new grouping table that were not part of the grouping + convention. Note that is legal to have additional columns in a + grouping table. Also note that the order of the columns may + not be the same in the original and copied grouping table. + */ + + /* retrieve the number of columns in the original and new group tables */ + + *status = fits_read_key_lng(infptr,"TFIELDS",&tfields,card,status); + *status = fits_read_key_lng(outfptr,"TFIELDS",&newTfields,card,status); + + for(i = 1; i <= tfields; ++i) + { + sprintf(keyword,"TTYPE%d",i); + *status = fits_read_key_str(infptr,keyword,keyvalue,card,status); + + if(*status == KEY_NO_EXIST) + { + *status = 0; + keyvalue[0] = 0; + } + prepare_keyvalue(keyvalue); + + if(strcasecmp(keyvalue,"MEMBER_XTENSION") != 0 && + strcasecmp(keyvalue,"MEMBER_NAME") != 0 && + strcasecmp(keyvalue,"MEMBER_VERSION") != 0 && + strcasecmp(keyvalue,"MEMBER_POSITION") != 0 && + strcasecmp(keyvalue,"MEMBER_LOCATION") != 0 && + strcasecmp(keyvalue,"MEMBER_URI_TYPE") != 0 ) + { + + /* SPR 3956, add at the end of the table */ + *status = fits_copy_col(infptr,outfptr,i,newTfields+1,1,status); + ++newTfields; + } + } + + }while(0); + + if(mfptr != NULL) + { + fits_close_file(mfptr,status); + } + + return(*status); +} + +/*-------------------------------------------------------------------------- + HDUtracker struct manipulation functions + --------------------------------------------------------------------------*/ +int fftsad(fitsfile *mfptr, /* pointer to an member HDU */ + HDUtracker *HDU, /* pointer to an HDU tracker struct */ + int *newPosition, /* new HDU position of the member HDU */ + char *newFileName) /* file containing member HDU */ + +/* + add an HDU to the HDUtracker struct pointed to by HDU. The HDU is only + added if it does not already reside in the HDUtracker. If it already + resides in the HDUtracker then the new HDU postion and file name are + returned in newPosition and newFileName (if != NULL) +*/ + +{ + int i; + int hdunum; + int status = 0; + + char filename1[FLEN_FILENAME]; + char filename2[FLEN_FILENAME]; + + do + { + /* retrieve the HDU's position within the FITS file */ + + fits_get_hdu_num(mfptr,&hdunum); + + /* retrieve the HDU's file name */ + + status = fits_file_name(mfptr,filename1,&status); + + /* parse the file name and construct the "standard" URL for it */ + + status = ffrtnm(filename1,filename2,&status); + + /* + examine all the existing HDUs in the HDUtracker an see if this HDU + has already been registered + */ + + for(i = 0; + i < HDU->nHDU && !(HDU->position[i] == hdunum + && strcmp(HDU->filename[i],filename2) == 0); + ++i); + + if(i != HDU->nHDU) + { + status = HDU_ALREADY_TRACKED; + if(newPosition != NULL) *newPosition = HDU->newPosition[i]; + if(newFileName != NULL) strcpy(newFileName,HDU->newFilename[i]); + continue; + } + + if(HDU->nHDU == MAX_HDU_TRACKER) + { + status = TOO_MANY_HDUS_TRACKED; + continue; + } + + HDU->filename[i] = (char*) malloc(FLEN_FILENAME * sizeof(char)); + + if(HDU->filename[i] == NULL) + { + status = MEMORY_ALLOCATION; + continue; + } + + HDU->newFilename[i] = (char*) malloc(FLEN_FILENAME * sizeof(char)); + + if(HDU->newFilename[i] == NULL) + { + status = MEMORY_ALLOCATION; + free(HDU->filename[i]); + continue; + } + + HDU->position[i] = hdunum; + HDU->newPosition[i] = hdunum; + + strcpy(HDU->filename[i],filename2); + strcpy(HDU->newFilename[i],filename2); + + ++(HDU->nHDU); + + }while(0); + + return(status); +} +/*--------------------------------------------------------------------------*/ +int fftsud(fitsfile *mfptr, /* pointer to an member HDU */ + HDUtracker *HDU, /* pointer to an HDU tracker struct */ + int newPosition, /* new HDU position of the member HDU */ + char *newFileName) /* file containing member HDU */ + +/* + update the HDU information in the HDUtracker struct pointed to by HDU. The + HDU to update is pointed to by mfptr. If non-zero, the value of newPosition + is used to update the HDU->newPosition[] value for the mfptr, and if + non-NULL the newFileName value is used to update the HDU->newFilename[] + value for mfptr. +*/ + +{ + int i; + int hdunum; + int status = 0; + + char filename1[FLEN_FILENAME]; + char filename2[FLEN_FILENAME]; + + + /* retrieve the HDU's position within the FITS file */ + + fits_get_hdu_num(mfptr,&hdunum); + + /* retrieve the HDU's file name */ + + status = fits_file_name(mfptr,filename1,&status); + + /* parse the file name and construct the "standard" URL for it */ + + status = ffrtnm(filename1,filename2,&status); + + /* + examine all the existing HDUs in the HDUtracker an see if this HDU + has already been registered + */ + + for(i = 0; i < HDU->nHDU && + !(HDU->position[i] == hdunum && strcmp(HDU->filename[i],filename2) == 0); + ++i); + + /* if previously registered then change newPosition and newFileName */ + + if(i != HDU->nHDU) + { + if(newPosition != 0) HDU->newPosition[i] = newPosition; + if(newFileName != NULL) + { + strcpy(HDU->newFilename[i],newFileName); + } + } + else + status = MEMBER_NOT_FOUND; + + return(status); +} + +/*---------------------------------------------------------------------------*/ + +void prepare_keyvalue(char *keyvalue) /* string containing keyword value */ + +/* + strip off all single quote characters "'" and blank spaces from a keyword + value retrieved via fits_read_key*() routines + + this is necessary so that a standard comparision of keyword values may + be made +*/ + +{ + + int i; + int length; + + /* + strip off any leading or trailing single quotes (`) and (') from + the keyword value + */ + + length = strlen(keyvalue) - 1; + + if(keyvalue[0] == '\'' && keyvalue[length] == '\'') + { + for(i = 0; i < length - 1; ++i) keyvalue[i] = keyvalue[i+1]; + keyvalue[length-1] = 0; + } + + /* + strip off any trailing blanks from the keyword value; note that if the + keyvalue consists of nothing but blanks then no blanks are stripped + */ + + length = strlen(keyvalue) - 1; + + for(i = 0; i < length && keyvalue[i] == ' '; ++i); + + if(i != length) + { + for(i = length; i >= 0 && keyvalue[i] == ' '; --i) keyvalue[i] = '\0'; + } +} + +/*--------------------------------------------------------------------------- + Host dependent directory path to/from URL functions + --------------------------------------------------------------------------*/ +int fits_path2url(char *inpath, /* input file path string */ + char *outpath, /* output file path string */ + int *status) + /* + convert a file path into its Unix-style equivelent for URL + purposes. Note that this process is platform dependent. This + function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. + The plaform dependant code is conditionally compiled depending upon + the setting of the appropriate C preprocessor macros. + */ +{ + char buff[FLEN_FILENAME]; + +#if defined(WINNT) || defined(__WINNT__) + + /* + Microsoft Windows NT case. We assume input file paths of the form: + + //disk/path/filename + + All path segments may be null, so that a single file name is the + simplist case. + + The leading "//" becomes a single "/" if present. If no "//" is present, + then make sure the resulting URL path is relative, i.e., does not + begin with a "/". In other words, the only way that an absolute URL + file path may be generated is if the drive specification is given. + */ + + if(*status > 0) return(*status); + + if(inpath[0] == '/') + { + strcpy(buff,inpath+1); + } + else + { + strcpy(buff,inpath); + } + +#elif defined(MSDOS) || defined(__WIN32__) || defined(WIN32) + + /* + MSDOS or Microsoft windows/NT case. The assumed form of the + input path is: + + disk:\path\filename + + All path segments may be null, so that a single file name is the + simplist case. + + All back-slashes '\' become slashes '/'; if the path starts with a + string of the form "X:" then it is replaced with "/X/" + */ + + int i,j,k; + int size; + if(*status > 0) return(*status); + + for(i = 0, j = 0, size = strlen(inpath), buff[0] = 0; + i < size; j = strlen(buff)) + { + switch(inpath[i]) + { + + case ':': + + /* + must be a disk desiginator; add a slash '/' at the start of + outpath to designate that the path is absolute, then change + the colon ':' to a slash '/' + */ + + for(k = j; k >= 0; --k) buff[k+1] = buff[k]; + buff[0] = '/'; + strcat(buff,"/"); + ++i; + + break; + + case '\\': + + /* just replace the '\' with a '/' IF its not the first character */ + + if(i != 0 && buff[(j == 0 ? 0 : j-1)] != '/') + { + buff[j] = '/'; + buff[j+1] = 0; + } + + ++i; + + break; + + default: + + /* copy the character from inpath to buff as is */ + + buff[j] = inpath[i]; + buff[j+1] = 0; + ++i; + + break; + } + } + +#elif defined(VMS) || defined(vms) || defined(__vms) + + /* + VMS case. Assumed format of the input path is: + + node::disk:[path]filename.ext;version + + Any part of the file path may be missing, so that in the simplist + case a single file name/extension is given. + + all brackets "[", "]" and dots "." become "/"; dashes "-" become "..", + all single colons ":" become ":/", all double colons "::" become + "FILE://" + */ + + int i,j,k; + int done; + int size; + + if(*status > 0) return(*status); + + /* see if inpath contains a directory specification */ + + if(strchr(inpath,']') == NULL) + done = 1; + else + done = 0; + + for(i = 0, j = 0, size = strlen(inpath), buff[0] = 0; + i < size && j < FLEN_FILENAME - 8; j = strlen(buff)) + { + switch(inpath[i]) + { + + case ':': + + /* + must be a logical/symbol separator or (in the case of a double + colon "::") machine node separator + */ + + if(inpath[i+1] == ':') + { + /* insert a "FILE://" at the start of buff ==> machine given */ + + for(k = j; k >= 0; --k) buff[k+7] = buff[k]; + strncpy(buff,"FILE://",7); + i += 2; + } + else if(strstr(buff,"FILE://") == NULL) + { + /* insert a "/" at the start of buff ==> absolute path */ + + for(k = j; k >= 0; --k) buff[k+1] = buff[k]; + buff[0] = '/'; + ++i; + } + else + ++i; + + /* a colon always ==> path separator */ + + strcat(buff,"/"); + + break; + + case ']': + + /* end of directory spec, file name spec begins after this */ + + done = 1; + + buff[j] = '/'; + buff[j+1] = 0; + ++i; + + break; + + case '[': + + /* + begin directory specification; add a '/' only if the last char + is not '/' + */ + + if(i != 0 && buff[(j == 0 ? 0 : j-1)] != '/') + { + buff[j] = '/'; + buff[j+1] = 0; + } + + ++i; + + break; + + case '.': + + /* + directory segment separator or file name/extension separator; + we decide which by looking at the value of done + */ + + if(!done) + { + /* must be a directory segment separator */ + if(inpath[i-1] == '[') + { + strcat(buff,"./"); + ++j; + } + else + buff[j] = '/'; + } + else + /* must be a filename/extension separator */ + buff[j] = '.'; + + buff[j+1] = 0; + + ++i; + + break; + + case '-': + + /* + a dash is the same as ".." in Unix speak, but lets make sure + that its not part of the file name first! + */ + + if(!done) + /* must be part of the directory path specification */ + strcat(buff,".."); + else + { + /* the dash is part of the filename, so just copy it as is */ + buff[j] = '-'; + buff[j+1] = 0; + } + + ++i; + + break; + + default: + + /* nothing special, just copy the character as is */ + + buff[j] = inpath[i]; + buff[j+1] = 0; + + ++i; + + break; + + } + } + + if(j > FLEN_FILENAME - 8) + { + *status = URL_PARSE_ERROR; + ffpmsg("resulting path to URL conversion too big (fits_path2url)"); + } + +#elif defined(macintosh) + + /* + MacOS case. The assumed form of the input path is: + + disk:path:filename + + It is assumed that all paths are absolute with disk and path specified, + unless no colons ":" are supplied with the string ==> a single file name + only. All colons ":" become slashes "/", and if one or more colon is + encountered then the path is specified as absolute. + */ + + int i,j,k; + int firstColon; + int size; + + if(*status > 0) return(*status); + + for(i = 0, j = 0, firstColon = 1, size = strlen(inpath), buff[0] = 0; + i < size; j = strlen(buff)) + { + switch(inpath[i]) + { + + case ':': + + /* + colons imply path separators. If its the first colon encountered + then assume that its the disk designator and add a slash to the + beginning of the buff string + */ + + if(firstColon) + { + firstColon = 0; + + for(k = j; k >= 0; --k) buff[k+1] = buff[k]; + buff[0] = '/'; + } + + /* all colons become slashes */ + + strcat(buff,"/"); + + ++i; + + break; + + default: + + /* copy the character from inpath to buff as is */ + + buff[j] = inpath[i]; + buff[j+1] = 0; + + ++i; + + break; + } + } + +#else + + /* + Default Unix case. + + Nothing special to do here except to remove the double or more // and + replace them with single / + */ + + int ii = 0; + int jj = 0; + + if(*status > 0) return(*status); + + while (inpath[ii]) { + if (inpath[ii] == '/' && inpath[ii+1] == '/') { + /* do nothing */ + } else { + buff[jj] = inpath[ii]; + jj++; + } + ii++; + } + buff[jj] = '\0'; + /* printf("buff is %s\ninpath is %s\n",buff,inpath); */ + /* strcpy(buff,inpath); */ + +#endif + + /* + encode all "unsafe" and "reserved" URL characters + */ + + *status = fits_encode_url(buff,outpath,status); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int fits_url2path(char *inpath, /* input file path string */ + char *outpath, /* output file path string */ + int *status) + /* + convert a Unix-style URL into a platform dependent directory path. + Note that this process is platform dependent. This + function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. Each + platform dependent code segment is conditionally compiled depending + upon the setting of the appropriate C preprocesser macros. + */ +{ + char buff[FLEN_FILENAME]; + int absolute; + +#if defined(MSDOS) || defined(__WIN32__) || defined(WIN32) + char *tmpStr; +#elif defined(VMS) || defined(vms) || defined(__vms) + int i; + char *tmpStr; +#elif defined(macintosh) + char *tmpStr; +#endif + + if(*status != 0) return(*status); + + /* + make a copy of the inpath so that we can manipulate it + */ + + strcpy(buff,inpath); + + /* + convert any encoded characters to their unencoded values + */ + + *status = fits_unencode_url(inpath,buff,status); + + /* + see if the URL is given as absolute w.r.t. the "local" file system + */ + + if(buff[0] == '/') + absolute = 1; + else + absolute = 0; + +#if defined(WINNT) || defined(__WINNT__) + + /* + Microsoft Windows NT case. We create output paths of the form + + //disk/path/filename + + All path segments but the last may be null, so that a single file name + is the simplist case. + */ + + if(absolute) + { + strcpy(outpath,"/"); + strcat(outpath,buff); + } + else + { + strcpy(outpath,buff); + } + +#elif defined(MSDOS) || defined(__WIN32__) || defined(WIN32) + + /* + MSDOS or Microsoft windows/NT case. The output path will be of the + form + + disk:\path\filename + + All path segments but the last may be null, so that a single file name + is the simplist case. + */ + + /* + separate the URL into tokens at each slash '/' and process until + all tokens have been examined + */ + + for(tmpStr = strtok(buff,"/"), outpath[0] = 0; + tmpStr != NULL; tmpStr = strtok(NULL,"/")) + { + strcat(outpath,tmpStr); + + /* + if the absolute flag is set then process the token as a disk + specification; else just process it as a directory path or filename + */ + + if(absolute) + { + strcat(outpath,":\\"); + absolute = 0; + } + else + strcat(outpath,"\\"); + } + + /* remove the last "\" from the outpath, it does not belong there */ + + outpath[strlen(outpath)-1] = 0; + +#elif defined(VMS) || defined(vms) || defined(__vms) + + /* + VMS case. The output path will be of the form: + + node::disk:[path]filename.ext;version + + Any part of the file path may be missing execpt filename.ext, so that in + the simplist case a single file name/extension is given. + + if the path is specified as relative starting with "./" then the first + part of the VMS path is "[.". If the path is relative and does not start + with "./" (e.g., "a/b/c") then the VMS path is constructed as + "[a.b.c]" + */ + + /* + separate the URL into tokens at each slash '/' and process until + all tokens have been examined + */ + + for(tmpStr = strtok(buff,"/"), outpath[0] = 0; + tmpStr != NULL; tmpStr = strtok(NULL,"/")) + { + + if(strcasecmp(tmpStr,"FILE:") == 0) + { + /* the next token should contain the DECnet machine name */ + + tmpStr = strtok(NULL,"/"); + if(tmpStr == NULL) continue; + + strcat(outpath,tmpStr); + strcat(outpath,"::"); + + /* set the absolute flag to true for the next token */ + absolute = 1; + } + + else if(strcmp(tmpStr,"..") == 0) + { + /* replace all Unix-like ".." with VMS "-" */ + + if(strlen(outpath) == 0) strcat(outpath,"["); + strcat(outpath,"-."); + } + + else if(strcmp(tmpStr,".") == 0 && strlen(outpath) == 0) + { + /* + must indicate a relative path specifier + */ + + strcat(outpath,"[."); + } + + else if(strchr(tmpStr,'.') != NULL) + { + /* + must be up to the file name; turn the last "." path separator + into a "]" and then add the file name to the outpath + */ + + i = strlen(outpath); + if(i > 0 && outpath[i-1] == '.') outpath[i-1] = ']'; + + strcat(outpath,tmpStr); + } + + else + { + /* + process the token as a a directory path segement + */ + + if(absolute) + { + /* treat the token as a disk specifier */ + absolute = 0; + strcat(outpath,tmpStr); + strcat(outpath,":["); + } + else if(strlen(outpath) == 0) + { + /* treat the token as the first directory path specifier */ + strcat(outpath,"["); + strcat(outpath,tmpStr); + strcat(outpath,"."); + } + else + { + /* treat the token as an imtermediate path specifier */ + strcat(outpath,tmpStr); + strcat(outpath,"."); + } + } + } + +#elif defined(macintosh) + + /* + MacOS case. The output path will be of the form + + disk:path:filename + + All path segments but the last may be null, so that a single file name + is the simplist case. + */ + + /* + separate the URL into tokens at each slash '/' and process until + all tokens have been examined + */ + + for(tmpStr = strtok(buff,"/"), outpath[0] = 0; + tmpStr != NULL; tmpStr = strtok(NULL,"/")) + { + strcat(outpath,tmpStr); + strcat(outpath,":"); + } + + /* remove the last ":" from the outpath, it does not belong there */ + + outpath[strlen(outpath)-1] = 0; + +#else + + /* + Default Unix case. + + Nothing special to do here + */ + + strcpy(outpath,buff); + +#endif + + return(*status); +} + +/****************************************************************************/ +int fits_get_cwd(char *cwd, /* IO current working directory string */ + int *status) + /* + retrieve the string containing the current working directory absolute + path in Unix-like URL standard notation. It is assumed that the CWD + string has a size of at least FLEN_FILENAME. + + Note that this process is platform dependent. This + function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. Each + platform dependent code segment is conditionally compiled depending + upon the setting of the appropriate C preprocesser macros. + */ +{ + + char buff[FLEN_FILENAME]; + + + if(*status != 0) return(*status); + +#if defined(macintosh) + + /* + MacOS case. Currently unknown !!!! + */ + + *buff = 0; + +#else + /* + Good old getcwd() seems to work with all other platforms + */ + + getcwd(buff,FLEN_FILENAME); + +#endif + + /* + convert the cwd string to a URL standard path string + */ + + fits_path2url(buff,cwd,status); + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int fits_get_url(fitsfile *fptr, /* I ptr to FITS file to evaluate */ + char *realURL, /* O URL of real FITS file */ + char *startURL, /* O URL of starting FITS file */ + char *realAccess, /* O true access method of FITS file */ + char *startAccess,/* O "official" access of FITS file */ + int *iostate, /* O can this file be modified? */ + int *status) +/* + For grouping convention purposes, determine the URL of the FITS file + associated with the fitsfile pointer fptr. The true access type (file://, + mem://, shmem://, root://), starting "official" access type, and iostate + (0 ==> readonly, 1 ==> readwrite) are also returned. + + It is assumed that the url string has enough room to hold the resulting + URL, and the the accessType string has enough room to hold the access type. +*/ +{ + int i; + int tmpIOstate = 0; + + char infile[FLEN_FILENAME]; + char outfile[FLEN_FILENAME]; + char tmpStr1[FLEN_FILENAME]; + char tmpStr2[FLEN_FILENAME]; + char tmpStr3[FLEN_FILENAME]; + char tmpStr4[FLEN_FILENAME]; + char *tmpPtr; + + + if(*status != 0) return(*status); + + do + { + /* + retrieve the member HDU's file name as opened by ffopen() + and parse it into its constitutent pieces; get the currently + active driver token too + */ + + *tmpStr1 = *tmpStr2 = *tmpStr3 = *tmpStr4 = 0; + + *status = fits_file_name(fptr,tmpStr1,status); + + *status = ffiurl(tmpStr1,NULL,infile,outfile,NULL,tmpStr2,tmpStr3, + tmpStr4,status); + + if((*tmpStr2) || (*tmpStr3) || (*tmpStr4)) tmpIOstate = -1; + + *status = ffurlt(fptr,tmpStr3,status); + + strcpy(tmpStr4,tmpStr3); + + *status = ffrtnm(tmpStr1,tmpStr2,status); + strcpy(tmpStr1,tmpStr2); + + /* + for grouping convention purposes (only) determine the URL of the + actual FITS file being used for the given fptr, its true access + type (file://, mem://, shmem://, root://) and its iostate (0 ==> + read only, 1 ==> readwrite) + */ + + /* + The first set of access types are "simple" in that they do not + use any redirection to temporary memory or outfiles + */ + + /* standard disk file driver is in use */ + + if(strcasecmp(tmpStr3,"file://") == 0) + { + tmpIOstate = 1; + + if(strlen(outfile)) strcpy(tmpStr1,outfile); + else *tmpStr2 = 0; + + /* + make sure no FILE:// specifier is given in the tmpStr1 + or tmpStr2 strings; the convention calls for local files + to have no access specification + */ + + if((tmpPtr = strstr(tmpStr1,"://")) != NULL) + { + strcpy(infile,tmpPtr+3); + strcpy(tmpStr1,infile); + } + + if((tmpPtr = strstr(tmpStr2,"://")) != NULL) + { + strcpy(infile,tmpPtr+3); + strcpy(tmpStr2,infile); + } + } + + /* file stored in conventional memory */ + + else if(strcasecmp(tmpStr3,"mem://") == 0) + { + if(tmpIOstate < 0) + { + /* file is a temp mem file only */ + ffpmsg("cannot make URL from temp MEM:// file (fits_get_url)"); + *status = URL_PARSE_ERROR; + } + else + { + /* file is a "perminate" mem file for this process */ + tmpIOstate = 1; + *tmpStr2 = 0; + } + } + + /* file stored in conventional memory */ + + else if(strcasecmp(tmpStr3,"memkeep://") == 0) + { + strcpy(tmpStr3,"mem://"); + *tmpStr4 = 0; + *tmpStr2 = 0; + tmpIOstate = 1; + } + + /* file residing in shared memory */ + + else if(strcasecmp(tmpStr3,"shmem://") == 0) + { + *tmpStr4 = 0; + *tmpStr2 = 0; + tmpIOstate = 1; + } + + /* file accessed via the ROOT network protocol */ + + else if(strcasecmp(tmpStr3,"root://") == 0) + { + *tmpStr4 = 0; + *tmpStr2 = 0; + tmpIOstate = 1; + } + + /* + the next set of access types redirect the contents of the original + file to an special outfile because the original could not be + directly modified (i.e., resides on the network, was compressed). + In these cases the URL string takes on the value of the OUTFILE, + the access type becomes file://, and the iostate is set to 1 (can + read/write to the file). + */ + + /* compressed file uncompressed and written to disk */ + + else if(strcasecmp(tmpStr3,"compressfile://") == 0) + { + strcpy(tmpStr1,outfile); + strcpy(tmpStr2,infile); + strcpy(tmpStr3,"file://"); + strcpy(tmpStr4,"file://"); + tmpIOstate = 1; + } + + /* HTTP accessed file written locally to disk */ + + else if(strcasecmp(tmpStr3,"httpfile://") == 0) + { + strcpy(tmpStr1,outfile); + strcpy(tmpStr3,"file://"); + strcpy(tmpStr4,"http://"); + tmpIOstate = 1; + } + + /* FTP accessd file written locally to disk */ + + else if(strcasecmp(tmpStr3,"ftpfile://") == 0) + { + strcpy(tmpStr1,outfile); + strcpy(tmpStr3,"file://"); + strcpy(tmpStr4,"ftp://"); + tmpIOstate = 1; + } + + /* file from STDIN written to disk */ + + else if(strcasecmp(tmpStr3,"stdinfile://") == 0) + { + strcpy(tmpStr1,outfile); + strcpy(tmpStr3,"file://"); + strcpy(tmpStr4,"stdin://"); + tmpIOstate = 1; + } + + /* + the following access types use memory resident files as temporary + storage; they cannot be modified or be made group members for + grouping conventions purposes, but their original files can be. + Thus, their tmpStr3s are reset to mem://, their iostate + values are set to 0 (for no-modification), and their URL string + values remain set to their original values + */ + + /* compressed disk file uncompressed into memory */ + + else if(strcasecmp(tmpStr3,"compress://") == 0) + { + *tmpStr1 = 0; + strcpy(tmpStr2,infile); + strcpy(tmpStr3,"mem://"); + strcpy(tmpStr4,"file://"); + tmpIOstate = 0; + } + + /* HTTP accessed file transferred into memory */ + + else if(strcasecmp(tmpStr3,"http://") == 0) + { + *tmpStr1 = 0; + strcpy(tmpStr3,"mem://"); + strcpy(tmpStr4,"http://"); + tmpIOstate = 0; + } + + /* HTTP accessed compressed file transferred into memory */ + + else if(strcasecmp(tmpStr3,"httpcompress://") == 0) + { + *tmpStr1 = 0; + strcpy(tmpStr3,"mem://"); + strcpy(tmpStr4,"http://"); + tmpIOstate = 0; + } + + /* FTP accessed file transferred into memory */ + + else if(strcasecmp(tmpStr3,"ftp://") == 0) + { + *tmpStr1 = 0; + strcpy(tmpStr3,"mem://"); + strcpy(tmpStr4,"ftp://"); + tmpIOstate = 0; + } + + /* FTP accessed compressed file transferred into memory */ + + else if(strcasecmp(tmpStr3,"ftpcompress://") == 0) + { + *tmpStr1 = 0; + strcpy(tmpStr3,"mem://"); + strcpy(tmpStr4,"ftp://"); + tmpIOstate = 0; + } + + /* + The last set of access types cannot be used to make a meaningful URL + strings from; thus an error is generated + */ + + else if(strcasecmp(tmpStr3,"stdin://") == 0) + { + *status = URL_PARSE_ERROR; + ffpmsg("cannot make vaild URL from stdin:// (fits_get_url)"); + *tmpStr1 = *tmpStr2 = 0; + } + + else if(strcasecmp(tmpStr3,"stdout://") == 0) + { + *status = URL_PARSE_ERROR; + ffpmsg("cannot make vaild URL from stdout:// (fits_get_url)"); + *tmpStr1 = *tmpStr2 = 0; + } + + else if(strcasecmp(tmpStr3,"irafmem://") == 0) + { + *status = URL_PARSE_ERROR; + ffpmsg("cannot make vaild URL from irafmem:// (fits_get_url)"); + *tmpStr1 = *tmpStr2 = 0; + } + + if(*status != 0) continue; + + /* + assign values to the calling parameters if they are non-NULL + */ + + if(realURL != NULL) + { + if(strlen(tmpStr1) == 0) + *realURL = 0; + else + { + if((tmpPtr = strstr(tmpStr1,"://")) != NULL) + { + tmpPtr += 3; + i = (long)tmpPtr - (long)tmpStr1; + strncpy(realURL,tmpStr1,i); + } + else + { + tmpPtr = tmpStr1; + i = 0; + } + + *status = fits_path2url(tmpPtr,realURL+i,status); + } + } + + if(startURL != NULL) + { + if(strlen(tmpStr2) == 0) + *startURL = 0; + else + { + if((tmpPtr = strstr(tmpStr2,"://")) != NULL) + { + tmpPtr += 3; + i = (long)tmpPtr - (long)tmpStr2; + strncpy(startURL,tmpStr2,i); + } + else + { + tmpPtr = tmpStr2; + i = 0; + } + + *status = fits_path2url(tmpPtr,startURL+i,status); + } + } + + if(realAccess != NULL) strcpy(realAccess,tmpStr3); + if(startAccess != NULL) strcpy(startAccess,tmpStr4); + if(iostate != NULL) *iostate = tmpIOstate; + + }while(0); + + return(*status); +} + +/*-------------------------------------------------------------------------- + URL parse support functions + --------------------------------------------------------------------------*/ + +/* simple push/pop/shift/unshift string stack for use by fits_clean_url */ +typedef char* grp_stack_data; /* type of data held by grp_stack */ + +typedef struct grp_stack_item_struct { + grp_stack_data data; /* value of this stack item */ + struct grp_stack_item_struct* next; /* next stack item */ + struct grp_stack_item_struct* prev; /* previous stack item */ +} grp_stack_item; + +typedef struct grp_stack_struct { + size_t stack_size; /* number of items on stack */ + grp_stack_item* top; /* top item */ +} grp_stack; + +static char* grp_stack_default = NULL; /* initial value for new instances + of grp_stack_data */ + +/* the following functions implement the group string stack grp_stack */ +static void delete_grp_stack(grp_stack** mystack); +static grp_stack_item* grp_stack_append( + grp_stack_item* last, grp_stack_data data +); +static grp_stack_data grp_stack_remove(grp_stack_item* last); +static grp_stack* new_grp_stack(void); +static grp_stack_data pop_grp_stack(grp_stack* mystack); +static void push_grp_stack(grp_stack* mystack, grp_stack_data data); +static grp_stack_data shift_grp_stack(grp_stack* mystack); +/* static void unshift_grp_stack(grp_stack* mystack, grp_stack_data data); */ + +int fits_clean_url(char *inURL, /* I input URL string */ + char *outURL, /* O output URL string */ + int *status) +/* + clean the URL by eliminating any ".." or "." specifiers in the inURL + string, and write the output to the outURL string. + + Note that this function must have a valid Unix-style URL as input; platform + dependent path strings are not allowed. + */ +{ + grp_stack* mystack; /* stack to hold pieces of URL */ + char* tmp; + + if(*status) return *status; + + mystack = new_grp_stack(); + *outURL = 0; + + do { + /* handle URL scheme and domain if they exist */ + tmp = strstr(inURL, "://"); + if(tmp) { + /* there is a URL scheme, so look for the end of the domain too */ + tmp = strchr(tmp + 3, '/'); + if(tmp) { + /* tmp is now the end of the domain, so + * copy URL scheme and domain as is, and terminate by hand */ + size_t string_size = (size_t) (tmp - inURL); + strncpy(outURL, inURL, string_size); + outURL[string_size] = 0; + + /* now advance the input pointer to just after the domain and go on */ + inURL = tmp; + } else { + /* '/' was not found, which means there are no path-like + * portions, so copy whole inURL to outURL and we're done */ + strcpy(outURL, inURL); + continue; /* while(0) */ + } + } + + /* explicitly copy a leading / (absolute path) */ + if('/' == *inURL) strcat(outURL, "/"); + + /* now clean the remainder of the inURL. push URL segments onto + * stack, dealing with .. and . as we go */ + tmp = strtok(inURL, "/"); /* finds first / */ + while(tmp) { + if(!strcmp(tmp, "..")) { + /* discard previous URL segment, if there was one. if not, + * add the .. to the stack if this is *not* an absolute path + * (for absolute paths, leading .. has no effect, so skip it) */ + if(0 < mystack->stack_size) pop_grp_stack(mystack); + else if('/' != *inURL) push_grp_stack(mystack, tmp); + } else { + /* always just skip ., but otherwise add segment to stack */ + if(strcmp(tmp, ".")) push_grp_stack(mystack, tmp); + } + tmp = strtok(NULL, "/"); /* get the next segment */ + } + + /* stack now has pieces of cleaned URL, so just catenate them + * onto output string until stack is empty */ + while(0 < mystack->stack_size) { + tmp = shift_grp_stack(mystack); + strcat(outURL, tmp); + strcat(outURL, "/"); + } + outURL[strlen(outURL) - 1] = 0; /* blank out trailing / */ + } while(0); + delete_grp_stack(&mystack); + return *status; +} + +/* free all stack contents using pop_grp_stack before freeing the + * grp_stack itself */ +static void delete_grp_stack(grp_stack** mystack) { + if(!mystack || !*mystack) return; + while((*mystack)->stack_size) pop_grp_stack(*mystack); + free(*mystack); + *mystack = NULL; +} + +/* append an item to the stack, handling the special case of the first + * item appended */ +static grp_stack_item* grp_stack_append( + grp_stack_item* last, grp_stack_data data +) { + /* first create a new stack item, and copy data to it */ + grp_stack_item* new_item = (grp_stack_item*) malloc(sizeof(grp_stack_item)); + new_item->data = data; + if(last) { + /* attach this item between the "last" item and its "next" item */ + new_item->next = last->next; + new_item->prev = last; + last->next->prev = new_item; + last->next = new_item; + } else { + /* stack is empty, so "next" and "previous" both point back to it */ + new_item->next = new_item; + new_item->prev = new_item; + } + return new_item; +} + +/* remove an item from the stack, handling the special case of the last + * item removed */ +static grp_stack_data grp_stack_remove(grp_stack_item* last) { + grp_stack_data retval = last->data; + last->prev->next = last->next; + last->next->prev = last->prev; + free(last); + return retval; +} + +/* create new stack dynamically, and give it valid initial values */ +static grp_stack* new_grp_stack(void) { + grp_stack* retval = (grp_stack*) malloc(sizeof(grp_stack)); + if(retval) { + retval->stack_size = 0; + retval->top = NULL; + } + return retval; +} + +/* return the value at the top of the stack and remove it, updating + * stack_size. top->prev becomes the new "top" */ +static grp_stack_data pop_grp_stack(grp_stack* mystack) { + grp_stack_data retval = grp_stack_default; + if(mystack && mystack->top) { + grp_stack_item* newtop = mystack->top->prev; + retval = grp_stack_remove(mystack->top); + mystack->top = newtop; + if(0 == --mystack->stack_size) mystack->top = NULL; + } + return retval; +} + +/* add to the stack after the top element. the added element becomes + * the new "top" */ +static void push_grp_stack(grp_stack* mystack, grp_stack_data data) { + if(!mystack) return; + mystack->top = grp_stack_append(mystack->top, data); + ++mystack->stack_size; + return; +} + +/* return the value at the bottom of the stack and remove it, updating + * stack_size. "top" pointer is unaffected */ +static grp_stack_data shift_grp_stack(grp_stack* mystack) { + grp_stack_data retval = grp_stack_default; + if(mystack && mystack->top) { + retval = grp_stack_remove(mystack->top->next); /* top->next == bottom */ + if(0 == --mystack->stack_size) mystack->top = NULL; + } + return retval; +} + +/* add to the stack after the top element. "top" is unaffected, except + * in the special case of an initially empty stack */ +/* static void unshift_grp_stack(grp_stack* mystack, grp_stack_data data) { + if(!mystack) return; + if(mystack->top) grp_stack_append(mystack->top, data); + else mystack->top = grp_stack_append(NULL, data); + ++mystack->stack_size; + return; + } */ + +/*--------------------------------------------------------------------------*/ +int fits_url2relurl(char *refURL, /* I reference URL string */ + char *absURL, /* I absoulute URL string to process */ + char *relURL, /* O resulting relative URL string */ + int *status) +/* + create a relative URL to the file referenced by absURL with respect to the + reference URL refURL. The relative URL is returned in relURL. + + Both refURL and absURL must be absolute URL strings; i.e. either begin + with an access method specification "XXX://" or with a '/' character + signifiying that they are absolute file paths. + + Note that it is possible to make a relative URL from two input URLs + (absURL and refURL) that are not compatable. This function does not + check to see if the resulting relative URL makes any sence. For instance, + it is impossible to make a relative URL from the following two inputs: + + absURL = ftp://a.b.c.com/x/y/z/foo.fits + refURL = /a/b/c/ttt.fits + + The resulting relURL will be: + + ../../../ftp://a.b.c.com/x/y/z/foo.fits + + Which is syntically correct but meaningless. The problem is that a file + with an access method of ftp:// cannot be expressed a a relative URL to + a local disk file. +*/ + +{ + int i,j; + int refcount,abscount; + int refsize,abssize; + int done; + + + if(*status != 0) return(*status); + + do + { + /* + refURL and absURL must be absolute to process + */ + + if(!(fits_is_url_absolute(refURL) || *refURL == '/') || + !(fits_is_url_absolute(absURL) || *absURL == '/')) + { + *status = URL_PARSE_ERROR; + ffpmsg("Cannot make rel. URL from non abs. URLs (fits_url2relurl)"); + continue; + } + + /* determine the size of the refURL and absURL strings */ + + refsize = strlen(refURL); + abssize = strlen(absURL); + + /* process the two URL strings and build the relative URL between them */ + + + for(done = 0, refcount = 0, abscount = 0; + !done && refcount < refsize && abscount < abssize; + ++refcount, ++abscount) + { + for(; abscount < abssize && absURL[abscount] == '/'; ++abscount); + for(; refcount < refsize && refURL[refcount] == '/'; ++refcount); + + /* find the next path segment in absURL */ + for(i = abscount; absURL[i] != '/' && i < abssize; ++i); + + /* find the next path segment in refURL */ + for(j = refcount; refURL[j] != '/' && j < refsize; ++j); + + /* do the two path segments match? */ + if(i == j && + strncmp(absURL+abscount, refURL+refcount,i-refcount) == 0) + { + /* they match, so ignore them and continue */ + abscount = i; refcount = j; + continue; + } + + /* we found a difference in the paths in refURL and absURL */ + + /* initialize the relative URL string */ + relURL[0] = 0; + + /* + for every path segment remaining in the refURL string, append + a "../" path segment to the relataive URL relURL + */ + + for(j = refcount; j < refsize; ++j) + if(refURL[j] == '/') strcat(relURL,"../"); + + /* copy all remaining characters of absURL to the output relURL */ + + strcat(relURL,absURL+abscount); + + /* we are done building the relative URL */ + done = 1; + } + + }while(0); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_relurl2url(char *refURL, /* I reference URL string */ + char *relURL, /* I relative URL string to process */ + char *absURL, /* O absolute URL string */ + int *status) +/* + create an absolute URL from a relative url and a reference URL. The + reference URL is given by the FITS file pointed to by fptr. + + The construction of the absolute URL from the partial and reference URl + is performed using the rules set forth in: + + http://www.w3.org/Addressing/URL/URL_TOC.html + and + http://www.w3.org/Addressing/URL/4_3_Partial.html + + Note that the relative URL string relURL must conform to the Unix-like + URL syntax; host dependent partial URL strings are not allowed. +*/ +{ + int i; + + char tmpStr[FLEN_FILENAME]; + + char *tmpStr1, *tmpStr2; + + + if(*status != 0) return(*status); + + do + { + + /* + make a copy of the reference URL string refURL for parsing purposes + */ + + strcpy(tmpStr,refURL); + + /* + if the reference file has an access method of mem:// or shmem:// + then we cannot use it as the basis of an absolute URL construction + for a partial URL + */ + + if(strncasecmp(tmpStr,"MEM:",4) == 0 || + strncasecmp(tmpStr,"SHMEM:",6) == 0) + { + ffpmsg("ref URL has access mem:// or shmem:// (fits_relurl2url)"); + ffpmsg(" cannot construct full URL from a partial URL and "); + ffpmsg(" MEM/SHMEM base URL"); + *status = URL_PARSE_ERROR; + continue; + } + + if(relURL[0] != '/') + { + /* + just append the relative URL string to the reference URL + string (minus the reference URL file name) to form the + absolute URL string + */ + + tmpStr1 = strrchr(tmpStr,'/'); + + if(tmpStr1 != NULL) tmpStr1[1] = 0; + else tmpStr[0] = 0; + + strcat(tmpStr,relURL); + } + else + { + /* + have to parse the refURL string for the first occurnace of the + same number of '/' characters as contained in the beginning of + location that is not followed by a greater number of consective + '/' charaters (yes, that is a confusing statement); this is the + location in the refURL string where the relURL string is to + be appended to form the new absolute URL string + */ + + /* + first, build up a slash pattern string that has one more + slash in it than the starting slash pattern of the + relURL string + */ + + strcpy(absURL,"/"); + + for(i = 0; relURL[i] == '/'; ++i) strcat(absURL,"/"); + + /* + loop over the refURL string until the slash pattern stored + in absURL is no longer found + */ + + for(tmpStr1 = tmpStr, i = strlen(absURL); + (tmpStr2 = strstr(tmpStr1,absURL)) != NULL; + tmpStr1 = tmpStr2 + i); + + /* reduce the slash pattern string by one slash */ + + absURL[i-1] = 0; + + /* + search for the slash pattern in the remaining portion + of the refURL string + */ + + tmpStr2 = strstr(tmpStr1,absURL); + + /* if no slash pattern match was found */ + + if(tmpStr2 == NULL) + { + /* just strip off the file name from the refURL */ + + tmpStr2 = strrchr(tmpStr1,'/'); + + if(tmpStr2 != NULL) tmpStr2[0] = 0; + else tmpStr[0] = 0; + } + else + { + /* set a string terminator at the slash pattern match */ + + *tmpStr2 = 0; + } + + /* + conatenate the relURL string to the refURL string to form + the absURL + */ + + strcat(tmpStr,relURL); + } + + /* + normalize the absURL by removing any ".." or "." specifiers + in the string + */ + + *status = fits_clean_url(tmpStr,absURL,status); + + }while(0); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_encode_url(char *inpath, /* I URL to be encoded */ + char *outpath, /* O output encoded URL */ + int *status) + /* + encode all URL "unsafe" and "reserved" characters using the "%XX" + convention, where XX stand for the two hexidecimal digits of the + encode character's ASCII code. + + Note that the output path is at least as large as, if not larger than + the input path, so that OUTPATH should be passed to this function + with room for growth. If not a runtime error could result. It is + assumed that OUTPATH has been allocated with enough room to hold + the resulting encoded URL. + + This function was adopted from code in the libwww.a library available + via the W3 consortium + */ +{ + unsigned char a; + + char *p; + char *q; + char *hex = "0123456789ABCDEF"; + +unsigned const char isAcceptable[96] = +{/* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF */ + + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF,0xE,0x0,0xF,0xF,0xC, + /* 2x !"#$%&'()*+,-./ */ + 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x8,0x0,0x0,0x0,0x0,0x0, + /* 3x 0123456789:;<=>? */ + 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF, + /* 4x @ABCDEFGHIJKLMNO */ + 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x0,0x0,0x0,0x0,0xF, + /* 5X PQRSTUVWXYZ[\]^_ */ + 0x0,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF, + /* 6x `abcdefghijklmno */ + 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x0,0x0,0x0,0x0,0x0 + /* 7X pqrstuvwxyz{\}~DEL */ +}; + + if(*status != 0) return(*status); + + /* loop over all characters in inpath until '\0' is encountered */ + + for(q = outpath, p = inpath; *p; p++) + { + a = (unsigned char)*p; + + /* if the charcter requires encoding then process it */ + + if(!( a>=32 && a<128 && (isAcceptable[a-32]))) + { + /* add a '%' character to the outpath */ + *q++ = HEX_ESCAPE; + /* add the most significant ASCII code hex value */ + *q++ = hex[a >> 4]; + /* add the least significant ASCII code hex value */ + *q++ = hex[a & 15]; + } + /* else just copy the character as is */ + else *q++ = *p; + } + + /* null terminate the outpath string */ + + *q++ = 0; + + return(*status); +} + +/*---------------------------------------------------------------------------*/ +int fits_unencode_url(char *inpath, /* I input URL with encoding */ + char *outpath, /* O unencoded URL */ + int *status) + /* + unencode all URL "unsafe" and "reserved" characters to their actual + ASCII representation. All tokens of the form "%XX" where XX is the + hexidecimal code for an ASCII character, are searched for and + translated into the actuall ASCII character (so three chars become + 1 char). + + It is assumed that OUTPATH has enough room to hold the unencoded + URL. + + This function was adopted from code in the libwww.a library available + via the W3 consortium + */ + +{ + char *p; + char *q; + char c; + + if(*status != 0) return(*status); + + p = inpath; + q = outpath; + + /* + loop over all characters in the inpath looking for the '%' escape + character; if found the process the escape sequence + */ + + while(*p != 0) + { + /* + if the character is '%' then unencode the sequence, else + just copy the character from inpath to outpath + */ + + if (*p == HEX_ESCAPE) + { + if((c = *(++p)) != 0) + { + *q = ( + (c >= '0' && c <= '9') ? + (c - '0') : ((c >= 'A' && c <= 'F') ? + (c - 'A' + 10) : (c - 'a' + 10)) + )*16; + + if((c = *(++p)) != 0) + { + *q = *q + ( + (c >= '0' && c <= '9') ? + (c - '0') : ((c >= 'A' && c <= 'F') ? + (c - 'A' + 10) : (c - 'a' + 10)) + ); + p++, q++; + } + } + } + else + *q++ = *p++; + } + + /* terminate the outpath */ + *q = 0; + + return(*status); +} +/*---------------------------------------------------------------------------*/ + +int fits_is_url_absolute(char *url) +/* + Return a True (1) or False (0) value indicating whether or not the passed + URL string contains an access method specifier or not. Note that this is + a boolean function and it neither reads nor returns the standard error + status parameter +*/ +{ + char *tmpStr1, *tmpStr2; + + char reserved[] = {':',';','/','?','@','&','=','+','$',','}; + + /* + The rule for determing if an URL is relative or absolute is that it (1) + must have a colon ":" and (2) that the colon must appear before any other + reserved URL character in the URL string. We first see if a colon exists, + get its position in the string, and then check to see if any of the other + reserved characters exists and if their position in the string is greater + than that of the colons. + */ + + if( (tmpStr1 = strchr(url,reserved[0])) != NULL && + ((tmpStr2 = strchr(url,reserved[1])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[2])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[3])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[4])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[5])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[6])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[7])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[8])) == NULL || tmpStr2 > tmpStr1) && + ((tmpStr2 = strchr(url,reserved[9])) == NULL || tmpStr2 > tmpStr1) ) + { + return(1); + } + else + { + return(0); + } +} diff --git a/software/cfitsio3040/group.h b/software/cfitsio3040/group.h new file mode 100644 index 000000000..f7aae5b1d --- /dev/null +++ b/software/cfitsio3040/group.h @@ -0,0 +1,65 @@ +#define MAX_HDU_TRACKER 1000 + +typedef struct _HDUtracker HDUtracker; + +struct _HDUtracker +{ + int nHDU; + + char *filename[MAX_HDU_TRACKER]; + int position[MAX_HDU_TRACKER]; + + char *newFilename[MAX_HDU_TRACKER]; + int newPosition[MAX_HDU_TRACKER]; +}; + +/* functions used internally in the grouping convention module */ + +int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol, + int positioncol, int locationcol, int uricol, char *ttype[], + char *tform[], int *ncols, int *status); + +int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol, + int *positionCol, int *locationCol, int *uriCol, int *grptype, + int *status); + +int ffgmul(fitsfile *mfptr, int rmopt, int *status); + +int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver, + int position, char *location, long *member, int *status); + +int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status); + +int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU, + int *status); + +int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition, + char *newFileName); + +int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition, + char *newFileName); + +void prepare_keyvalue(char *keyvalue); + +int fits_path2url(char *inpath, char *outpath, int *status); + +int fits_url2path(char *inpath, char *outpath, int *status); + +int fits_get_cwd(char *cwd, int *status); + +int fits_get_url(fitsfile *fptr, char *realURL, char *startURL, + char *realAccess, char *startAccess, int *iostate, + int *status); + +int fits_clean_url(char *inURL, char *outURL, int *status); + +int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status); + +int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status); + +int fits_encode_url(char *inpath, char *outpath, int *status); + +int fits_unencode_url(char *inpath, char *outpath, int *status); + +int fits_is_url_absolute(char *url); + diff --git a/software/cfitsio3040/grparser.c b/software/cfitsio3040/grparser.c new file mode 100644 index 000000000..f417562d7 --- /dev/null +++ b/software/cfitsio3040/grparser.c @@ -0,0 +1,1365 @@ +/* T E M P L A T E P A R S E R + ============================= + + by Jerzy.Borkowski@obs.unige.ch + + Integral Science Data Center + ch. d'Ecogia 16 + 1290 Versoix + Switzerland + +14-Oct-98: initial release +16-Oct-98: code cleanup, #include included, now gcc -Wall prints no + warnings during compilation. Bugfix: now one can specify additional + columns in group HDU. Autoindexing also works in this situation + (colunms are number from 7 however). +17-Oct-98: bugfix: complex keywords were incorrectly written (was TCOMPLEX should + be TDBLCOMPLEX). +20-Oct-98: bugfix: parser was writing EXTNAME twice, when first HDU in template is + defined with XTENSION IMAGE then parser creates now dummy PHDU, + SIMPLE T is now allowed only at most once and in first HDU only. + WARNING: one should not define EXTNAME keyword for GROUP HDUs, as + they have them already defined by parser (EXTNAME = GROUPING). + Parser accepts EXTNAME oin GROUP HDU definition, but in this + case multiple EXTNAME keywords will present in HDU header. +23-Oct-98: bugfix: unnecessary space was written to FITS file for blank + keywords. +24-Oct-98: syntax change: empty lines and lines with only whitespaces are + written to FITS files as blank keywords (if inside group/hdu + definition). Previously lines had to have at least 8 spaces. + Please note, that due to pecularities of CFITSIO if the + last keyword(s) defined for given HDU are blank keywords + consisting of only 80 spaces, then (some of) those keywords + may be silently deleted by CFITSIO. +13-Nov-98: bugfix: parser was writing GRPNAME twice. Parser still creates + GRPNAME keywords for GROUP HDU's which do not specify them. + However, values (of form DEFAULT_GROUP_XXX) are assigned + not necessarily in order HDUs appear in template file, but + rather in order parser completes their creation in FITS + file. Also, when including files, if fopen fails, parser + tries to open file with a name = directory_of_top_level + file + name of file to be included, as long as name + of file to be included does not specify absolute pathname. +16-Nov-98: bugfix to bugfix from 13-Nov-98 +19-Nov-98: EXTVER keyword is now automatically assigned value by parser. +17-Dev-98: 2 new things added: 1st: CFITSIO_INCLUDE_FILES environment + variable can contain a colon separated list of directories + to look for when looking for template include files (and master + template also). 2nd: it is now possible to append template + to nonempty FITS. file. fitsfile *ff no longer needs to point + to an empty FITS file with 0 HDUs in it. All data written by + parser will simple be appended at the end of file. +22-Jan-99: changes to parser: when in append mode parser initially scans all + existing HDUs to built a list of already used EXTNAME/EXTVERs +22-Jan-99: Bruce O'Neel, bugfix : TLONG should always reference long type + variable on OSF/Alpha and on 64-bit archs in general +20-Jun-2002 Wm Pence, added support for the HIERARCH keyword convention in + which keyword names can effectively be longer than 8 characters. + Example: + HIERARCH LongKeywordName = 'value' / comment +30-Jan-2003 Wm Pence, bugfix: ngp_read_xtension was testing for "ASCIITABLE" + instead of "TABLE" as the XTENSION value of an ASCII table, + and it did not allow for optional trailing spaces in the + "IMAGE" or "TABLE" string. +16-Dec-2003 James Peachey: ngp_keyword_all_write was modified to apply + comments from the template file to the output file in + the case of reserved keywords (e.g. tform#, ttype# etcetera). +*/ + + +#include +#include + +#ifdef sparc +#include +#include +#endif + +#include +#include "fitsio2.h" +#include "grparser.h" + +NGP_RAW_LINE ngp_curline = { NULL, NULL, NULL, NGP_TTYPE_UNKNOWN, NULL, NGP_FORMAT_OK, 0 }; +NGP_RAW_LINE ngp_prevline = { NULL, NULL, NULL, NGP_TTYPE_UNKNOWN, NULL, NGP_FORMAT_OK, 0 }; + +int ngp_inclevel = 0; /* number of included files, 1 - means mean file */ +int ngp_grplevel = 0; /* group nesting level, 0 - means no grouping */ + +FILE *ngp_fp[NGP_MAX_INCLUDE]; /* stack of included file handles */ +int ngp_keyidx = NGP_TOKEN_UNKNOWN; /* index of token in current line */ +NGP_TOKEN ngp_linkey; /* keyword after line analyze */ + +char ngp_master_dir[NGP_MAX_FNAME]; /* directory of top level include file */ + +NGP_TKDEF ngp_tkdef[] = /* tokens recognized by parser */ + { { "\\INCLUDE", NGP_TOKEN_INCLUDE }, + { "\\GROUP", NGP_TOKEN_GROUP }, + { "\\END", NGP_TOKEN_END }, + { "XTENSION", NGP_TOKEN_XTENSION }, + { "SIMPLE", NGP_TOKEN_SIMPLE }, + { NULL, NGP_TOKEN_UNKNOWN } + }; + +int master_grp_idx = 1; /* current unnamed group in object */ + +int ngp_extver_tab_size = 0; +NGP_EXTVER_TAB *ngp_extver_tab = NULL; + + +int ngp_get_extver(char *extname, int *version) + { NGP_EXTVER_TAB *p; + char *p2; + int i; + + if ((NULL == extname) || (NULL == version)) return(NGP_BAD_ARG); + if ((NULL == ngp_extver_tab) && (ngp_extver_tab_size > 0)) return(NGP_BAD_ARG); + if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); + + for (i=0; i 0)) return(NGP_BAD_ARG); + if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); + + for (i=0; i ngp_extver_tab[i].version) ngp_extver_tab[i].version = version; + return(NGP_OK); + } + } + + if (NULL == ngp_extver_tab) + { p = (NGP_EXTVER_TAB *)ngp_alloc(sizeof(NGP_EXTVER_TAB)); } + else + { p = (NGP_EXTVER_TAB *)ngp_realloc(ngp_extver_tab, (ngp_extver_tab_size + 1) * sizeof(NGP_EXTVER_TAB)); } + + if (NULL == p) return(NGP_NO_MEMORY); + + p2 = ngp_alloc(strlen(extname) + 1); + if (NULL == p2) + { ngp_free(p); + return(NGP_NO_MEMORY); + } + + strcpy(p2, extname); + ngp_extver_tab = p; + ngp_extver_tab[ngp_extver_tab_size].extname = p2; + ngp_extver_tab[ngp_extver_tab_size].version = version; + + ngp_extver_tab_size++; + + return(NGP_OK); + } + + +int ngp_delete_extver_tab(void) + { int i; + + if ((NULL == ngp_extver_tab) && (ngp_extver_tab_size > 0)) return(NGP_BAD_ARG); + if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); + if ((NULL == ngp_extver_tab) && (0 == ngp_extver_tab_size)) return(NGP_OK); + + for (i=0; i= 'a') && (c1 <= 'z')) c1 += ('A' - 'a'); + + c2 = *p2; + if ((c2 >= 'a') && (c2 <= 'z')) c2 += ('A' - 'a'); + + if (c1 < c2) return(-1); + if (c1 > c2) return(1); + if (0 == c1) return(0); + p1++; + p2++; + } + } + +int ngp_strcasencmp(char *p1, char *p2, int n) + { char c1, c2; + int ii; + + for (ii=0;ii= 'a') && (c1 <= 'z')) c1 += ('A' - 'a'); + + c2 = *p2; + if ((c2 >= 'a') && (c2 <= 'z')) c2 += ('A' - 'a'); + + if (c1 < c2) return(-1); + if (c1 > c2) return(1); + if (0 == c1) return(0); + p1++; + p2++; + } + return(0); + } + + /* read one line from file */ + +int ngp_line_from_file(FILE *fp, char **p) + { int c, r, llen, allocsize, alen; + char *p2; + + if (NULL == fp) return(NGP_NUL_PTR); /* check for stupid args */ + if (NULL == p) return(NGP_NUL_PTR); /* more foolproof checks */ + + r = NGP_OK; /* initialize stuff, reset err code */ + llen = 0; /* 0 characters read so far */ + *p = (char *)ngp_alloc(1); /* preallocate 1 byte */ + allocsize = 1; /* signal that we have allocated 1 byte */ + if (NULL == *p) return(NGP_NO_MEMORY); /* if this failed, system is in dire straits */ + + for (;;) + { c = getc(fp); /* get next character */ + if (EOF == c) /* EOF signalled ? */ + { + if (ferror(fp)) r = NGP_READ_ERR; /* was it real error or simply EOF ? */ + if (0 == llen) return(NGP_EOF); /* signal EOF only if 0 characters read so far */ + break; + } + if ('\n' == c) break; /* end of line character ? */ + + llen++; /* we have new character, make room for it */ + alen = ((llen + NGP_ALLOCCHUNK) / NGP_ALLOCCHUNK) * NGP_ALLOCCHUNK; + if (alen > allocsize) + { p2 = (char *)ngp_realloc(*p, alen); /* realloc buffer, if there is need */ + if (NULL == p2) + { r = NGP_NO_MEMORY; + break; + } + *p = p2; + allocsize = alen; + } + (*p)[llen - 1] = c; /* copy character to buffer */ + } + + llen++; /* place for terminating \0 */ + if (llen != allocsize) + { p2 = (char *)ngp_realloc(*p, llen); + if (NULL == p2) r = NGP_NO_MEMORY; + else + { *p = p2; + (*p)[llen - 1] = 0; /* copy \0 to buffer */ + } + } + else + { (*p)[llen - 1] = 0; /* necessary when line read was empty */ + } + + if ((NGP_EOF != r) && (NGP_OK != r)) /* in case of errors free resources */ + { ngp_free(*p); + *p = NULL; + } + + return(r); /* return status code */ + } + + /* free current line structure */ + +int ngp_free_line(void) + { + if (NULL != ngp_curline.line) + { ngp_free(ngp_curline.line); + ngp_curline.line = NULL; + ngp_curline.name = NULL; + ngp_curline.value = NULL; + ngp_curline.comment = NULL; + ngp_curline.type = NGP_TTYPE_UNKNOWN; + ngp_curline.format = NGP_FORMAT_OK; + ngp_curline.flags = 0; + } + return(NGP_OK); + } + + /* free cached line structure */ + +int ngp_free_prevline(void) + { + if (NULL != ngp_prevline.line) + { ngp_free(ngp_prevline.line); + ngp_prevline.line = NULL; + ngp_prevline.name = NULL; + ngp_prevline.value = NULL; + ngp_prevline.comment = NULL; + ngp_prevline.type = NGP_TTYPE_UNKNOWN; + ngp_prevline.format = NGP_FORMAT_OK; + ngp_prevline.flags = 0; + } + return(NGP_OK); + } + + /* read one line */ + +int ngp_read_line_buffered(FILE *fp) + { + ngp_free_line(); /* first free current line (if any) */ + + if (NULL != ngp_prevline.line) /* if cached, return cached line */ + { ngp_curline = ngp_prevline; + ngp_prevline.line = NULL; + ngp_prevline.name = NULL; + ngp_prevline.value = NULL; + ngp_prevline.comment = NULL; + ngp_prevline.type = NGP_TTYPE_UNKNOWN; + ngp_prevline.format = NGP_FORMAT_OK; + ngp_prevline.flags = 0; + ngp_curline.flags = NGP_LINE_REREAD; + return(NGP_OK); + } + + ngp_curline.flags = 0; /* if not cached really read line from file */ + return(ngp_line_from_file(fp, &(ngp_curline.line))); + } + + /* unread line */ + +int ngp_unread_line(void) + { + if (NULL == ngp_curline.line) /* nothing to unread */ + return(NGP_EMPTY_CURLINE); + + if (NULL != ngp_prevline.line) /* we cannot unread line twice */ + return(NGP_UNREAD_QUEUE_FULL); + + ngp_prevline = ngp_curline; + ngp_curline.line = NULL; + return(NGP_OK); + } + + /* a first guess line decomposition */ + +int ngp_extract_tokens(NGP_RAW_LINE *cl) + { char *p, *s; + int cl_flags, i; + + p = cl->line; /* start from beginning of line */ + if (NULL == p) return(NGP_NUL_PTR); + + cl->name = cl->value = cl->comment = NULL; + cl->type = NGP_TTYPE_UNKNOWN; + cl->format = NGP_FORMAT_OK; + + cl_flags = 0; + + for (i=0;; i++) /* if 8 spaces at beginning then line is comment */ + { if ((0 == *p) || ('\n' == *p)) + { /* if line has only blanks -> write blank keyword */ + cl->line[0] = 0; /* create empty name (0 length string) */ + cl->comment = cl->name = cl->line; + cl->type = NGP_TTYPE_RAW; /* signal write unformatted to FITS file */ + return(NGP_OK); + } + if ((' ' != *p) && ('\t' != *p)) break; + if (i >= 7) + { + cl->comment = p + 1; + for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ + { if ('\n' == *s) *s = 0; + if (0 == *s) break; + } + cl->line[0] = 0; /* create empty name (0 length string) */ + cl->name = cl->line; + cl->type = NGP_TTYPE_RAW; + return(NGP_OK); + } + p++; + } + + cl->name = p; + + for (;;) /* we need to find 1st whitespace */ + { if ((0 == *p) || ('\n' == *p)) + { *p = 0; + break; + } + + /* + from Richard Mathar, 2002-05-03, add 10 lines: + if upper/lowercase HIERARCH followed also by an equal sign... + */ + if( strncasecmp("HIERARCH",p,strlen("HIERARCH")) == 0 ) + { + char * const eqsi=strchr(p,'=') ; + if( eqsi ) + { + cl_flags |= NGP_FOUND_EQUAL_SIGN ; + p=eqsi ; + break ; + } + } + + if ((' ' == *p) || ('\t' == *p)) break; + if ('=' == *p) + { cl_flags |= NGP_FOUND_EQUAL_SIGN; + break; + } + + p++; + } + + if (*p) *(p++) = 0; /* found end of keyname so terminate string with zero */ + + if ((!ngp_strcasecmp("HISTORY", cl->name)) + || (!ngp_strcasecmp("COMMENT", cl->name)) + || (!ngp_strcasecmp("CONTINUE", cl->name))) + { cl->comment = p; + for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ + { if ('\n' == *s) *s = 0; + if (0 == *s) break; + } + cl->type = NGP_TTYPE_RAW; + return(NGP_OK); + } + + if (!ngp_strcasecmp("\\INCLUDE", cl->name)) + { + for (;; p++) if ((' ' != *p) && ('\t' != *p)) break; /* skip whitespace */ + + cl->value = p; + for (s = cl->value;; s++) /* filter out any EOS characters */ + { if ('\n' == *s) *s = 0; + if (0 == *s) break; + } + cl->type = NGP_TTYPE_UNKNOWN; + return(NGP_OK); + } + + for (;; p++) + { if ((0 == *p) || ('\n' == *p)) return(NGP_OK); /* test if at end of string */ + if ((' ' == *p) || ('\t' == *p)) continue; /* skip whitespace */ + if (cl_flags & NGP_FOUND_EQUAL_SIGN) break; + if ('=' != *p) break; /* ignore initial equal sign */ + cl_flags |= NGP_FOUND_EQUAL_SIGN; + } + + if ('/' == *p) /* no value specified, comment only */ + { p++; + if ((' ' == *p) || ('\t' == *p)) p++; + cl->comment = p; + for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ + { if ('\n' == *s) *s = 0; + if (0 == *s) break; + } + return(NGP_OK); + } + + if ('\'' == *p) /* we have found string within quotes */ + { cl->value = s = ++p; /* set pointer to beginning of that string */ + cl->type = NGP_TTYPE_STRING; /* signal that it is of string type */ + + for (;;) /* analyze it */ + { if ((0 == *p) || ('\n' == *p)) /* end of line -> end of string */ + { *s = 0; return(NGP_OK); } + + if ('\'' == *p) /* we have found doublequote */ + { if ((0 == p[1]) || ('\n' == p[1]))/* doublequote is the last character in line */ + { *s = 0; return(NGP_OK); } + if (('\t' == p[1]) || (' ' == p[1])) /* duoblequote was string terminator */ + { *s = 0; p++; break; } + if ('\'' == p[1]) p++; /* doublequote is inside string, convert "" -> " */ + } + + *(s++) = *(p++); /* compact string in place, necess. by "" -> " conversion */ + } + } + else /* regular token */ + { + cl->value = p; /* set pointer to token */ + cl->type = NGP_TTYPE_UNKNOWN; /* we dont know type at the moment */ + for (;; p++) /* we need to find 1st whitespace */ + { if ((0 == *p) || ('\n' == *p)) + { *p = 0; return(NGP_OK); } + if ((' ' == *p) || ('\t' == *p)) break; + } + if (*p) *(p++) = 0; /* found so terminate string with zero */ + } + + for (;; p++) + { if ((0 == *p) || ('\n' == *p)) return(NGP_OK); /* test if at end of string */ + if ((' ' != *p) && ('\t' != *p)) break; /* skip whitespace */ + } + + if ('/' == *p) /* no value specified, comment only */ + { p++; + if ((' ' == *p) || ('\t' == *p)) p++; + cl->comment = p; + for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ + { if ('\n' == *s) *s = 0; + if (0 == *s) break; + } + return(NGP_OK); + } + + cl->format = NGP_FORMAT_ERROR; + return(NGP_OK); /* too many tokens ... */ + } + +/* try to open include file. If open fails and fname + does not specify absolute pathname, try to open fname + in any directory specified in CFITSIO_INCLUDE_FILES + environment variable. Finally try to open fname + relative to ngp_master_dir, which is directory of top + level include file +*/ + +int ngp_include_file(char *fname) /* try to open include file */ + { char *p, *p2, *cp, *envar, envfiles[NGP_MAX_ENVFILES]; + + if (NULL == fname) return(NGP_NUL_PTR); + + if (ngp_inclevel >= NGP_MAX_INCLUDE) /* too many include files */ + return(NGP_INC_NESTING); + + if (NULL == (ngp_fp[ngp_inclevel] = fopen(fname, "r"))) + { /* if simple open failed .. */ + envar = getenv("CFITSIO_INCLUDE_FILES"); /* scan env. variable, and retry to open */ + + if (NULL != envar) /* is env. variable defined ? */ + { strncpy(envfiles, envar, NGP_MAX_ENVFILES - 1); + envfiles[NGP_MAX_ENVFILES - 1] = 0; /* copy search path to local variable, env. is fragile */ + + for (p2 = strtok(envfiles, ":"); NULL != p2; p2 = strtok(NULL, ":")) + { + cp = (char *)ngp_alloc(strlen(fname) + strlen(p2) + 2); + if (NULL == cp) return(NGP_NO_MEMORY); + + strcpy(cp, p2); +#ifdef MSDOS + strcat(cp, "\\"); /* abs. pathname for MSDOS */ + +#else + strcat(cp, "/"); /* and for unix */ +#endif + strcat(cp, fname); + + ngp_fp[ngp_inclevel] = fopen(cp, "r"); + ngp_free(cp); + + if (NULL != ngp_fp[ngp_inclevel]) break; + } + } + + if (NULL == ngp_fp[ngp_inclevel]) /* finally try to open relative to top level */ + { +#ifdef MSDOS + if ('\\' == fname[0]) return(NGP_ERR_FOPEN); /* abs. pathname for MSDOS, does not support C:\\PATH */ +#else + if ('/' == fname[0]) return(NGP_ERR_FOPEN); /* and for unix */ +#endif + if (0 == ngp_master_dir[0]) return(NGP_ERR_FOPEN); + + p = ngp_alloc(strlen(fname) + strlen(ngp_master_dir) + 1); + if (NULL == p) return(NGP_NO_MEMORY); + + strcpy(p, ngp_master_dir); /* construct composite pathname */ + strcat(p, fname); /* comp = master + fname */ + + ngp_fp[ngp_inclevel] = fopen(p, "r");/* try to open composite */ + ngp_free(p); /* we don't need buffer anymore */ + + if (NULL == ngp_fp[ngp_inclevel]) + return(NGP_ERR_FOPEN); /* fail if error */ + } + } + + ngp_inclevel++; + return(NGP_OK); + } + + +/* read line in the intelligent way. All \INCLUDE directives are handled, + empty and comment line skipped. If this function returns NGP_OK, than + decomposed line (name, type, value in proper type and comment) are + stored in ngp_linkey structure. ignore_blank_lines parameter is zero + when parser is inside GROUP or HDU definition. Nonzero otherwise. +*/ + +int ngp_read_line(int ignore_blank_lines) + { int r, nc; + unsigned k; + + if (ngp_inclevel <= 0) /* do some sanity checking first */ + { ngp_keyidx = NGP_TOKEN_EOF; /* no parents, so report error */ + return(NGP_OK); + } + if (ngp_inclevel > NGP_MAX_INCLUDE) return(NGP_INC_NESTING); + if (NULL == ngp_fp[ngp_inclevel - 1]) return(NGP_NUL_PTR); + + for (;;) + { switch (r = ngp_read_line_buffered(ngp_fp[ngp_inclevel - 1])) + { case NGP_EOF: + ngp_inclevel--; /* end of file, revert to parent */ + if (ngp_fp[ngp_inclevel]) /* we can close old file */ + fclose(ngp_fp[ngp_inclevel]); + + ngp_fp[ngp_inclevel] = NULL; + if (ngp_inclevel <= 0) + { ngp_keyidx = NGP_TOKEN_EOF; /* no parents, so report error */ + return(NGP_OK); + } + continue; + + case NGP_OK: + if (ngp_curline.flags & NGP_LINE_REREAD) return(r); + break; + default: + return(r); + } + + switch (ngp_curline.line[0]) + { case 0: if (0 == ignore_blank_lines) break; /* ignore empty lines if told so */ + case '#': continue; /* ignore comment lines */ + } + + r = ngp_extract_tokens(&ngp_curline); /* analyse line, extract tokens and comment */ + if (NGP_OK != r) return(r); + + if (NULL == ngp_curline.name) continue; /* skip lines consisting only of whitespaces */ + + for (k = 0; k < strlen(ngp_curline.name); k++) + { if ((ngp_curline.name[k] >= 'a') && (ngp_curline.name[k] <= 'z')) + ngp_curline.name[k] += 'A' - 'a'; /* force keyword to be upper case */ + if (k == 7) break; /* only first 8 chars are required to be upper case */ + } + + for (k=0;; k++) /* find index of keyword in keyword table */ + { if (NGP_TOKEN_UNKNOWN == ngp_tkdef[k].code) break; + if (0 == strcmp(ngp_curline.name, ngp_tkdef[k].name)) break; + } + + ngp_keyidx = ngp_tkdef[k].code; /* save this index, grammar parser will need this */ + + if (NGP_TOKEN_INCLUDE == ngp_keyidx) /* if this is \INCLUDE keyword, try to include file */ + { if (NGP_OK != (r = ngp_include_file(ngp_curline.value))) return(r); + continue; /* and read next line */ + } + + ngp_linkey.type = NGP_TTYPE_UNKNOWN; /* now, get the keyword type, it's a long story ... */ + + if (NULL != ngp_curline.value) /* if no value given signal it */ + { if (NGP_TTYPE_STRING == ngp_curline.type) /* string type test */ + { ngp_linkey.type = NGP_TTYPE_STRING; + ngp_linkey.value.s = ngp_curline.value; + } + if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* bool type test */ + { if ((!ngp_strcasecmp("T", ngp_curline.value)) || (!ngp_strcasecmp("F", ngp_curline.value))) + { ngp_linkey.type = NGP_TTYPE_BOOL; + ngp_linkey.value.b = (ngp_strcasecmp("T", ngp_curline.value) ? 0 : 1); + } + } + if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* complex type test */ + { if (2 == sscanf(ngp_curline.value, "(%lg,%lg)%n", &(ngp_linkey.value.c.re), &(ngp_linkey.value.c.im), &nc)) + { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) + || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) + { ngp_linkey.type = NGP_TTYPE_COMPLEX; + } + } + } + if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* real type test */ + { if (strchr(ngp_curline.value, '.') && (1 == sscanf(ngp_curline.value, "%lg%n", &(ngp_linkey.value.d), &nc))) + { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) + || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) + { ngp_linkey.type = NGP_TTYPE_REAL; + } + } + } + if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* integer type test */ + { if (1 == sscanf(ngp_curline.value, "%d%n", &(ngp_linkey.value.i), &nc)) + { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) + || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) + { ngp_linkey.type = NGP_TTYPE_INT; + } + } + } + if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* force string type */ + { ngp_linkey.type = NGP_TTYPE_STRING; + ngp_linkey.value.s = ngp_curline.value; + } + } + else + { if (NGP_TTYPE_RAW == ngp_curline.type) ngp_linkey.type = NGP_TTYPE_RAW; + else ngp_linkey.type = NGP_TTYPE_NULL; + } + + if (NULL != ngp_curline.comment) + { strncpy(ngp_linkey.comment, ngp_curline.comment, NGP_MAX_COMMENT); /* store comment */ + ngp_linkey.comment[NGP_MAX_COMMENT - 1] = 0; + } + else + { ngp_linkey.comment[0] = 0; + } + + strncpy(ngp_linkey.name, ngp_curline.name, NGP_MAX_NAME); /* and keyword's name */ + ngp_linkey.name[NGP_MAX_NAME - 1] = 0; + + if (strlen(ngp_linkey.name) > FLEN_KEYWORD) /* WDP: 20-Jun-2002: mod to support HIERARCH */ + { + return(NGP_BAD_ARG); /* cfitsio does not allow names > 8 chars */ + } + + return(NGP_OK); /* we have valid non empty line, so return success */ + } + } + + /* check whether keyword can be written as is */ + +int ngp_keyword_is_write(NGP_TOKEN *ngp_tok) + { int i, j, r, l, spc; + /* indexed variables not to write */ + + static char *nm[] = { "NAXIS", "TFORM", "TTYPE", NULL } ; + + /* non indexed variables not allowed to write */ + + static char *nmni[] = { "SIMPLE", "XTENSION", "BITPIX", "NAXIS", "PCOUNT", + "GCOUNT", "TFIELDS", "THEAP", "EXTEND", "EXTVER", + NULL } ; + + if (NULL == ngp_tok) return(NGP_NUL_PTR); + r = NGP_OK; + + for (j = 0; ; j++) /* first check non indexed */ + { if (NULL == nmni[j]) break; + if (0 == strcmp(nmni[j], ngp_tok->name)) return(NGP_BAD_ARG); + } + + for (j = 0; ; j++) /* now check indexed */ + { if (NULL == nm[j]) return(NGP_OK); + l = strlen(nm[j]); + if ((l < 1) || (l > 5)) continue; + if (0 == strncmp(nm[j], ngp_tok->name, l)) break; + } + + if ((ngp_tok->name[l] < '1') || (ngp_tok->name[l] > '9')) return(NGP_OK); + spc = 0; + for (i = l + 1; i < 8; i++) + { if (spc) { if (' ' != ngp_tok->name[i]) return(NGP_OK); } + else + { if ((ngp_tok->name[i] >= '0') || (ngp_tok->name[i] <= '9')) continue; + if (' ' == ngp_tok->name[i]) { spc = 1; continue; } + if (0 == ngp_tok->name[i]) break; + return(NGP_OK); + } + } + return(NGP_BAD_ARG); + } + + /* write (almost) all keywords from given HDU to disk */ + +int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode) + { int i, r, ib; + char buf[200]; + long l; + + + if (NULL == ngph) return(NGP_NUL_PTR); + if (NULL == ffp) return(NGP_NUL_PTR); + r = NGP_OK; + + for (i=0; itokcnt; i++) + { r = ngp_keyword_is_write(&(ngph->tok[i])); + if ((NGP_REALLY_ALL & mode) || (NGP_OK == r)) + { switch (ngph->tok[i].type) + { case NGP_TTYPE_BOOL: + ib = ngph->tok[i].value.b; + fits_write_key(ffp, TLOGICAL, ngph->tok[i].name, &ib, ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_STRING: + fits_write_key_longstr(ffp, ngph->tok[i].name, ngph->tok[i].value.s, ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_INT: + l = ngph->tok[i].value.i; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ + fits_write_key(ffp, TLONG, ngph->tok[i].name, &l, ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_REAL: + fits_write_key(ffp, TDOUBLE, ngph->tok[i].name, &(ngph->tok[i].value.d), ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_COMPLEX: + fits_write_key(ffp, TDBLCOMPLEX, ngph->tok[i].name, &(ngph->tok[i].value.c), ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_NULL: + fits_write_key_null(ffp, ngph->tok[i].name, ngph->tok[i].comment, &r); + break; + case NGP_TTYPE_RAW: + if (0 == strcmp("HISTORY", ngph->tok[i].name)) + { fits_write_history(ffp, ngph->tok[i].comment, &r); + break; + } + if (0 == strcmp("COMMENT", ngph->tok[i].name)) + { fits_write_comment(ffp, ngph->tok[i].comment, &r); + break; + } + sprintf(buf, "%-8.8s%s", ngph->tok[i].name, ngph->tok[i].comment); + fits_write_record(ffp, buf, &r); + break; + } + } + else if (NGP_BAD_ARG == r) /* enhancement 10 dec 2003, James Peachey: template comments replace defaults */ + { r = NGP_OK; /* update comments of special keywords like TFORM */ + if (ngph->tok[i].comment && *ngph->tok[i].comment) /* do not update with a blank comment */ + { fits_modify_comment(ffp, ngph->tok[i].name, ngph->tok[i].comment, &r); + } + } + else /* other problem, typically a blank token */ + { r = NGP_OK; /* skip this token, but continue */ + } + if (r) return(r); + } + + fits_set_hdustruc(ffp, &r); /* resync cfitsio */ + return(r); + } + + /* init HDU structure */ + +int ngp_hdu_init(NGP_HDU *ngph) + { if (NULL == ngph) return(NGP_NUL_PTR); + ngph->tok = NULL; + ngph->tokcnt = 0; + return(NGP_OK); + } + + /* clear HDU structure */ + +int ngp_hdu_clear(NGP_HDU *ngph) + { int i; + + if (NULL == ngph) return(NGP_NUL_PTR); + + for (i=0; itokcnt; i++) + { if (NGP_TTYPE_STRING == ngph->tok[i].type) + if (NULL != ngph->tok[i].value.s) + { ngp_free(ngph->tok[i].value.s); + ngph->tok[i].value.s = NULL; + } + } + + if (NULL != ngph->tok) ngp_free(ngph->tok); + + ngph->tok = NULL; + ngph->tokcnt = 0; + + return(NGP_OK); + } + + /* insert new token to HDU structure */ + +int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok) + { NGP_TOKEN *tkp; + + if (NULL == ngph) return(NGP_NUL_PTR); + if (NULL == newtok) return(NGP_NUL_PTR); + + if (0 == ngph->tokcnt) + tkp = (NGP_TOKEN *)ngp_alloc((ngph->tokcnt + 1) * sizeof(NGP_TOKEN)); + else + tkp = (NGP_TOKEN *)ngp_realloc(ngph->tok, (ngph->tokcnt + 1) * sizeof(NGP_TOKEN)); + + if (NULL == tkp) return(NGP_NO_MEMORY); + + ngph->tok = tkp; + ngph->tok[ngph->tokcnt] = *newtok; + + if (NGP_TTYPE_STRING == newtok->type) + { if (NULL != newtok->value.s) + { ngph->tok[ngph->tokcnt].value.s = (char *)ngp_alloc(1 + strlen(newtok->value.s)); + if (NULL == ngph->tok[ngph->tokcnt].value.s) return(NGP_NO_MEMORY); + strcpy(ngph->tok[ngph->tokcnt].value.s, newtok->value.s); + } + } + + ngph->tokcnt++; + return(NGP_OK); + } + + +int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol) + { int r, i, j, exitflg, ngph_i; + char *my_tform, *my_ttype; + char ngph_ctmp; + + + if (NULL == ff) return(NGP_NUL_PTR); + if (NULL == ngph) return(NGP_NUL_PTR); + if (0 == ngph->tokcnt) return(NGP_OK); /* nothing to do ! */ + + r = NGP_OK; + exitflg = 0; + + for (j=aftercol; jtok[i].name, "TFORM%d%c", &ngph_i, &ngph_ctmp)) + { if ((NGP_TTYPE_STRING == ngph->tok[i].type) && (ngph_i == (j + 1))) + { my_tform = ngph->tok[i].value.s; + } + } + else if (1 == sscanf(ngph->tok[i].name, "TTYPE%d%c", &ngph_i, &ngph_ctmp)) + { if ((NGP_TTYPE_STRING == ngph->tok[i].type) && (ngph_i == (j + 1))) + { my_ttype = ngph->tok[i].value.s; + } + } + + if ((NULL != my_tform) && (my_ttype[0])) break; + + if (i < (ngph->tokcnt - 1)) continue; + exitflg = 1; + break; + } + if ((NGP_OK == r) && (NULL != my_tform)) + fits_insert_col(ff, j + 1, my_ttype, my_tform, &r); + + if ((NGP_OK != r) || exitflg) break; + } + return(r); + } + + /* read complete HDU */ + +int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode) + { int r, exflg, l, my_hn, tmp0, incrementor_index, i, j; + int ngph_dim, ngph_bitpix, ngph_node_type, my_version; + char incrementor_name[NGP_MAX_STRING], ngph_ctmp; + char *ngph_extname = 0; + long ngph_size[NGP_MAX_ARRAY_DIM]; + NGP_HDU ngph; + long lv; + + incrementor_name[0] = 0; /* signal no keyword+'#' found yet */ + incrementor_index = 0; + + if (NGP_OK != (r = ngp_hdu_init(&ngph))) return(r); + + if (NGP_OK != (r = ngp_read_line(0))) return(r); /* EOF always means error here */ + switch (NGP_XTENSION_SIMPLE & simple_mode) + { + case 0: if (NGP_TOKEN_XTENSION != ngp_keyidx) return(NGP_TOKEN_NOT_EXPECT); + break; + default: if (NGP_TOKEN_SIMPLE != ngp_keyidx) return(NGP_TOKEN_NOT_EXPECT); + break; + } + + if (NGP_OK != (r = ngp_hdu_insert_token(&ngph, &ngp_linkey))) return(r); + + for (;;) + { if (NGP_OK != (r = ngp_read_line(0))) return(r); /* EOF always means error here */ + exflg = 0; + switch (ngp_keyidx) + { + case NGP_TOKEN_SIMPLE: + r = NGP_TOKEN_NOT_EXPECT; + break; + + case NGP_TOKEN_END: + case NGP_TOKEN_XTENSION: + case NGP_TOKEN_GROUP: + r = ngp_unread_line(); /* WARNING - not break here .... */ + case NGP_TOKEN_EOF: + exflg = 1; + break; + + default: l = strlen(ngp_linkey.name); + if ((l >= 2) && (l <= 6)) + { if ('#' == ngp_linkey.name[l - 1]) + { if (0 == incrementor_name[0]) + { memcpy(incrementor_name, ngp_linkey.name, l - 1); + incrementor_name[l - 1] = 0; + } + if (((l - 1) == (int)strlen(incrementor_name)) && (0 == memcmp(incrementor_name, ngp_linkey.name, l - 1))) + { incrementor_index++; + } + sprintf(ngp_linkey.name + l - 1, "%d", incrementor_index); + } + } + r = ngp_hdu_insert_token(&ngph, &ngp_linkey); + break; + } + if ((NGP_OK != r) || exflg) break; + } + + if (NGP_OK == r) + { /* we should scan keywords, and calculate HDU's */ + /* structure ourselves .... */ + + ngph_node_type = NGP_NODE_INVALID; /* init variables */ + ngph_bitpix = 0; + ngph_extname = NULL; + for (i=0; i=1) && (j <= NGP_MAX_ARRAY_DIM)) + { ngph_size[j - 1] = ngph.tok[i].value.i; + } + } + } + + switch (ngph_node_type) + { case NGP_NODE_IMAGE: + if (NGP_XTENSION_FIRST == ((NGP_XTENSION_FIRST | NGP_XTENSION_SIMPLE) & simple_mode)) + { /* if caller signals that this is 1st HDU in file */ + /* and it is IMAGE defined with XTENSION, then we */ + /* need create dummy Primary HDU */ + fits_create_img(ff, 16, 0, NULL, &r); + } + /* create image */ + fits_create_img(ff, ngph_bitpix, ngph_dim, ngph_size, &r); + + /* update keywords */ + if (NGP_OK == r) r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); + break; + + case NGP_NODE_ATABLE: + case NGP_NODE_BTABLE: + /* create table, 0 rows and 0 columns for the moment */ + fits_create_tbl(ff, ((NGP_NODE_ATABLE == ngph_node_type) + ? ASCII_TBL : BINARY_TBL), + 0, 0, NULL, NULL, NULL, NULL, &r); + if (NGP_OK != r) break; + + /* add columns ... */ + r = ngp_append_columns(ff, &ngph, 0); + if (NGP_OK != r) break; + + /* add remaining keywords */ + r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); + if (NGP_OK != r) break; + + /* if requested add rows */ + if (ngph_size[1] > 0) fits_insert_rows(ff, 0, ngph_size[1], &r); + break; + + default: r = NGP_BAD_ARG; + break; + } + + } + + if ((NGP_OK == r) && (NULL != ngph_extname)) + { r = ngp_get_extver(ngph_extname, &my_version); /* write correct ext version number */ + lv = my_version; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ + fits_write_key(ff, TLONG, "EXTVER", &lv, "auto assigned by template parser", &r); + } + + if (NGP_OK == r) + { if (parent_hn > 0) + { fits_get_hdu_num(ff, &my_hn); + fits_movabs_hdu(ff, parent_hn, &tmp0, &r); /* link us to parent */ + fits_add_group_member(ff, NULL, my_hn, &r); + fits_movabs_hdu(ff, my_hn, &tmp0, &r); + if (NGP_OK != r) return(r); + } + } + + if (NGP_OK != r) /* in case of error - delete hdu */ + { tmp0 = 0; + fits_delete_hdu(ff, NULL, &tmp0); + } + + ngp_hdu_clear(&ngph); + return(r); + } + + /* read complete GROUP */ + +int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn) + { int r, exitflg, l, my_hn, tmp0, incrementor_index; + char grnm[NGP_MAX_STRING]; /* keyword holding group name */ + char incrementor_name[NGP_MAX_STRING]; + NGP_HDU ngph; + + incrementor_name[0] = 0; /* signal no keyword+'#' found yet */ + incrementor_index = 6; /* first 6 cols are used by group */ + + ngp_grplevel++; + if (NGP_OK != (r = ngp_hdu_init(&ngph))) return(r); + + r = NGP_OK; + if (NGP_OK != (r = fits_create_group(ff, grpname, GT_ID_ALL_URI, &r))) return(r); + fits_get_hdu_num(ff, &my_hn); + if (parent_hn > 0) + { fits_movabs_hdu(ff, parent_hn, &tmp0, &r); /* link us to parent */ + fits_add_group_member(ff, NULL, my_hn, &r); + fits_movabs_hdu(ff, my_hn, &tmp0, &r); + if (NGP_OK != r) return(r); + } + + for (exitflg = 0; 0 == exitflg;) + { if (NGP_OK != (r = ngp_read_line(0))) break; /* EOF always means error here */ + switch (ngp_keyidx) + { + case NGP_TOKEN_SIMPLE: + case NGP_TOKEN_EOF: + r = NGP_TOKEN_NOT_EXPECT; + break; + + case NGP_TOKEN_END: + ngp_grplevel--; + exitflg = 1; + break; + + case NGP_TOKEN_GROUP: + if (NGP_TTYPE_STRING == ngp_linkey.type) + { strncpy(grnm, ngp_linkey.value.s, NGP_MAX_STRING); + } + else + { sprintf(grnm, "DEFAULT_GROUP_%d", master_grp_idx++); + } + grnm[NGP_MAX_STRING - 1] = 0; + r = ngp_read_group(ff, grnm, my_hn); + break; /* we can have many subsequent GROUP defs */ + + case NGP_TOKEN_XTENSION: + r = ngp_unread_line(); + if (NGP_OK != r) break; + r = ngp_read_xtension(ff, my_hn, 0); + break; /* we can have many subsequent HDU defs */ + + default: l = strlen(ngp_linkey.name); + if ((l >= 2) && (l <= 6)) + { if ('#' == ngp_linkey.name[l - 1]) + { if (0 == incrementor_name[0]) + { memcpy(incrementor_name, ngp_linkey.name, l - 1); + incrementor_name[l - 1] = 0; + } + if (((l - 1) == (int)strlen(incrementor_name)) && (0 == memcmp(incrementor_name, ngp_linkey.name, l - 1))) + { incrementor_index++; + } + sprintf(ngp_linkey.name + l - 1, "%d", incrementor_index); + } + } + r = ngp_hdu_insert_token(&ngph, &ngp_linkey); + break; /* here we can add keyword */ + } + if (NGP_OK != r) break; + } + + fits_movabs_hdu(ff, my_hn, &tmp0, &r); /* back to our HDU */ + + if (NGP_OK == r) /* create additional columns, if requested */ + r = ngp_append_columns(ff, &ngph, 6); + + if (NGP_OK == r) /* and write keywords */ + r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); + + if (NGP_OK != r) /* delete group in case of error */ + { tmp0 = 0; + fits_remove_group(ff, OPT_RM_GPT, &tmp0); + } + + ngp_hdu_clear(&ngph); /* we are done with this HDU, so delete it */ + return(r); + } + + /* top level API functions */ + +/* read whole template. ff should point to the opened empty fits file. */ + +int fits_execute_template(fitsfile *ff, char *ngp_template, int *status) + { int r, exit_flg, first_extension, i, my_hn, tmp0, keys_exist, more_keys, used_ver; + char grnm[NGP_MAX_STRING], used_name[NGP_MAX_STRING]; + long luv; + + if (NULL == status) return(NGP_NUL_PTR); + if (NGP_OK != *status) return(*status); + + if ((NULL == ff) || (NULL == ngp_template)) + { *status = NGP_NUL_PTR; + return(*status); + } + + ngp_inclevel = 0; /* initialize things, not all should be zero */ + ngp_grplevel = 0; + master_grp_idx = 1; + exit_flg = 0; + ngp_master_dir[0] = 0; /* this should be before 1st call to ngp_include_file */ + first_extension = 1; /* we need to create PHDU */ + + if (NGP_OK != (r = ngp_delete_extver_tab())) + { *status = r; + return(r); + } + + fits_get_hdu_num(ff, &my_hn); /* our HDU position */ + if (my_hn <= 1) /* check whether we really need to create PHDU */ + { fits_movabs_hdu(ff, 1, &tmp0, status); + fits_get_hdrspace(ff, &keys_exist, &more_keys, status); + fits_movabs_hdu(ff, my_hn, &tmp0, status); + if (NGP_OK != *status) return(*status); /* error here means file is corrupted */ + if (keys_exist > 0) first_extension = 0; /* if keywords exist assume PHDU already exist */ + } + else + { first_extension = 0; /* PHDU (followed by 1+ extensions) exist */ + + for (i = 2; i<= my_hn; i++) + { *status = NGP_OK; + fits_movabs_hdu(ff, 1, &tmp0, status); + if (NGP_OK != *status) break; + + fits_read_key(ff, TSTRING, "EXTNAME", used_name, NULL, status); + if (NGP_OK != *status) continue; + + fits_read_key(ff, TLONG, "EXTVER", &luv, NULL, status); + used_ver = luv; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ + if (VALUE_UNDEFINED == *status) + { used_ver = 1; + *status = NGP_OK; + } + + if (NGP_OK == *status) *status = ngp_set_extver(used_name, used_ver); + } + + fits_movabs_hdu(ff, my_hn, &tmp0, status); + } + if (NGP_OK != *status) return(*status); + + if (NGP_OK != (*status = ngp_include_file(ngp_template))) return(*status); + + for (i = strlen(ngp_template) - 1; i >= 0; i--) /* strlen is > 0, otherwise fopen failed */ + { +#ifdef MSDOS + if ('\\' == ngp_template[i]) break; +#else + if ('/' == ngp_template[i]) break; +#endif + } + + i++; + if (i > (NGP_MAX_FNAME - 1)) i = NGP_MAX_FNAME - 1; + + if (i > 0) + { memcpy(ngp_master_dir, ngp_template, i); + ngp_master_dir[i] = 0; + } + + + for (;;) + { if (NGP_OK != (r = ngp_read_line(1))) break; /* EOF always means error here */ + switch (ngp_keyidx) + { + case NGP_TOKEN_SIMPLE: + if (0 == first_extension) /* simple only allowed in first HDU */ + { r = NGP_TOKEN_NOT_EXPECT; + break; + } + if (NGP_OK != (r = ngp_unread_line())) break; + r = ngp_read_xtension(ff, 0, NGP_XTENSION_SIMPLE | NGP_XTENSION_FIRST); + first_extension = 0; + break; + + case NGP_TOKEN_XTENSION: + if (NGP_OK != (r = ngp_unread_line())) break; + r = ngp_read_xtension(ff, 0, (first_extension ? NGP_XTENSION_FIRST : 0)); + first_extension = 0; + break; + + case NGP_TOKEN_GROUP: + if (NGP_TTYPE_STRING == ngp_linkey.type) + { strncpy(grnm, ngp_linkey.value.s, NGP_MAX_STRING); } + else + { sprintf(grnm, "DEFAULT_GROUP_%d", master_grp_idx++); } + grnm[NGP_MAX_STRING - 1] = 0; + r = ngp_read_group(ff, grnm, 0); + first_extension = 0; + break; + + case NGP_TOKEN_EOF: + exit_flg = 1; + break; + + default: r = NGP_TOKEN_NOT_EXPECT; + break; + } + if (exit_flg || (NGP_OK != r)) break; + } + +/* all top level HDUs up to faulty one are left intact in case of i/o error. It is up + to the caller to call fits_close_file or fits_delete_file when this function returns + error. */ + + ngp_free_line(); /* deallocate last line (if any) */ + ngp_free_prevline(); /* deallocate cached line (if any) */ + ngp_delete_extver_tab(); /* delete extver table (if present), error ignored */ + + *status = r; + return(r); + } diff --git a/software/cfitsio3040/grparser.h b/software/cfitsio3040/grparser.h new file mode 100644 index 000000000..56bdea03a --- /dev/null +++ b/software/cfitsio3040/grparser.h @@ -0,0 +1,185 @@ +/* T E M P L A T E P A R S E R H E A D E R F I L E + ===================================================== + + by Jerzy.Borkowski@obs.unige.ch + + Integral Science Data Center + ch. d'Ecogia 16 + 1290 Versoix + Switzerland + +14-Oct-98: initial release +16-Oct-98: reference to fitsio.h removed, also removed strings after #endif + directives to make gcc -Wall not to complain +20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST +24-Oct-98: prototype of ngp_read_line() function updated. +22-Jan-99: prototype for ngp_set_extver() function added. +20-Jun-2002 Wm Pence, added support for the HIERARCH keyword convention + (changed NGP_MAX_NAME from (20) to FLEN_KEYWORD) +*/ + +#ifndef GRPARSER_H_INCLUDED +#define GRPARSER_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + + /* error codes - now defined in fitsio.h */ + + /* common constants definitions */ + +#define NGP_ALLOCCHUNK (1000) +#define NGP_MAX_INCLUDE (10) /* include file nesting limit */ +#define NGP_MAX_COMMENT (80) /* max size for comment */ +#define NGP_MAX_NAME FLEN_KEYWORD /* max size for KEYWORD (FITS limits it to 8 chars) */ + /* except HIERARCH can have longer effective keyword names */ +#define NGP_MAX_STRING (80) /* max size for various strings */ +#define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */ +#define NGP_MAX_FNAME (1000) /* max size of combined path+fname */ +#define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */ + +#define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */ +#define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */ +#define NGP_TOKEN_GROUP (1) /* \GROUP token */ +#define NGP_TOKEN_END (2) /* \END token */ +#define NGP_TOKEN_XTENSION (3) /* XTENSION token */ +#define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */ +#define NGP_TOKEN_EOF (5) /* End Of File pseudo token */ + +#define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */ +#define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */ +#define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */ +#define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */ +#define NGP_TTYPE_REAL (4) /* digits + '.' */ +#define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */ +#define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */ +#define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */ + +#define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */ + +#define NGP_FORMAT_OK (0) /* line format OK */ +#define NGP_FORMAT_ERROR (1) /* line format error */ + +#define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */ +#define NGP_NODE_IMAGE (1) /* IMAGE type */ +#define NGP_NODE_ATABLE (2) /* ASCII table type */ +#define NGP_NODE_BTABLE (3) /* BINARY table type */ + +#define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */ +#define NGP_REALLY_ALL (1) /* save really all keywords */ + +#define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */ +#define NGP_XTENSION_FIRST (2) /* this is first extension in template */ + +#define NGP_LINE_REREAD (1) /* reread line */ + +#define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */ + + /* common macro definitions */ + +#ifdef NGP_PARSER_DEBUG_MALLOC + +#define ngp_alloc(x) dal_malloc(x) +#define ngp_free(x) dal_free(x) +#define ngp_realloc(x,y) dal_realloc(x,y) + +#else + +#define ngp_alloc(x) malloc(x) +#define ngp_free(x) free(x) +#define ngp_realloc(x,y) realloc(x,y) + +#endif + + /* type definitions */ + +typedef struct NGP_RAW_LINE_STRUCT + { char *line; + char *name; + char *value; + int type; + char *comment; + int format; + int flags; + } NGP_RAW_LINE; + + +typedef union NGP_TOKVAL_UNION + { char *s; /* space allocated separately, be careful !!! */ + char b; + int i; + double d; + struct NGP_COMPLEX_STRUCT + { double re; + double im; + } c; /* complex value */ + } NGP_TOKVAL; + + +typedef struct NGP_TOKEN_STRUCT + { int type; + char name[NGP_MAX_NAME]; + NGP_TOKVAL value; + char comment[NGP_MAX_COMMENT]; + } NGP_TOKEN; + + +typedef struct NGP_HDU_STRUCT + { int tokcnt; + NGP_TOKEN *tok; + } NGP_HDU; + + +typedef struct NGP_TKDEF_STRUCT + { char *name; + int code; + } NGP_TKDEF; + + +typedef struct NGP_EXTVER_TAB_STRUCT + { char *extname; + int version; + } NGP_EXTVER_TAB; + + + /* globally visible variables declarations */ + +extern NGP_RAW_LINE ngp_curline; +extern NGP_RAW_LINE ngp_prevline; + +extern int ngp_extver_tab_size; +extern NGP_EXTVER_TAB *ngp_extver_tab; + + + /* globally visible functions declarations */ + +int ngp_get_extver(char *extname, int *version); +int ngp_set_extver(char *extname, int version); +int ngp_delete_extver_tab(void); +int ngp_strcasecmp(char *p1, char *p2); +int ngp_strcasencmp(char *p1, char *p2, int n); +int ngp_line_from_file(FILE *fp, char **p); +int ngp_free_line(void); +int ngp_free_prevline(void); +int ngp_read_line_buffered(FILE *fp); +int ngp_unread_line(void); +int ngp_extract_tokens(NGP_RAW_LINE *cl); +int ngp_include_file(char *fname); +int ngp_read_line(int ignore_blank_lines); +int ngp_keyword_is_write(NGP_TOKEN *ngp_tok); +int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode); +int ngp_hdu_init(NGP_HDU *ngph); +int ngp_hdu_clear(NGP_HDU *ngph); +int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok); +int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol); +int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode); +int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn); + + /* top level API function - now defined in fitsio.h */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/software/cfitsio3040/histo.c b/software/cfitsio3040/histo.c new file mode 100644 index 000000000..5afab3819 --- /dev/null +++ b/software/cfitsio3040/histo.c @@ -0,0 +1,1375 @@ +/* Globally defined histogram parameters */ +#include +#include +#include +#include +#include "fitsio2.h" + +typedef struct { /* Structure holding all the histogramming information */ + union { /* the iterator work functions (ffwritehist, ffcalchist) */ + char *b; /* need to do their job... passed via *userPointer. */ + short *i; + int *j; + float *r; + double *d; + } hist; + + fitsfile *tblptr; + + int haxis, hcolnum[4], himagetype; + long haxis1, haxis2, haxis3, haxis4; + float amin1, amin2, amin3, amin4; + float maxbin1, maxbin2, maxbin3, maxbin4; + float binsize1, binsize2, binsize3, binsize4; + int wtrecip, wtcolnum; + float weight; + char *rowselector; + +} histType; + +/*--------------------------------------------------------------------------*/ +int ffbins(char *binspec, /* I - binning specification */ + int *imagetype, /* O - image type, TINT or TSHORT */ + int *histaxis, /* O - no. of axes in the histogram */ + char colname[4][FLEN_VALUE], /* column name for axis */ + double *minin, /* minimum value for each axis */ + double *maxin, /* maximum value for each axis */ + double *binsizein, /* size of bins on each axis */ + char minname[4][FLEN_VALUE], /* keyword name for min */ + char maxname[4][FLEN_VALUE], /* keyword name for max */ + char binname[4][FLEN_VALUE], /* keyword name for binsize */ + double *wt, /* weighting factor */ + char *wtname, /* keyword or column name for weight */ + int *recip, /* the reciprocal of the weight? */ + int *status) +{ +/* + Parse the input binning specification string, returning the binning + parameters. Supports up to 4 dimensions. The binspec string has + one of these forms: + + bin binsize - 2D histogram with binsize on each axis + bin xcol - 1D histogram on column xcol + bin (xcol, ycol) = binsize - 2D histogram with binsize on each axis + bin x=min:max:size, y=min:max:size, z..., t... + bin x=:max, y=::size + bin x=size, y=min::size + + most other reasonable combinations are supported. +*/ + int ii, slen, defaulttype; + char *ptr, tmpname[30], *file_expr = NULL; + double dummy; + + if (*status > 0) + return(*status); + + /* set the default values */ + *histaxis = 2; + *imagetype = TINT; + defaulttype = 1; + *wt = 1.; + *recip = 0; + *wtname = '\0'; + + /* set default values */ + for (ii = 0; ii < 4; ii++) + { + *colname[ii] = '\0'; + *minname[ii] = '\0'; + *maxname[ii] = '\0'; + *binname[ii] = '\0'; + minin[ii] = DOUBLENULLVALUE; /* undefined values */ + maxin[ii] = DOUBLENULLVALUE; + binsizein[ii] = DOUBLENULLVALUE; + } + + ptr = binspec + 3; /* skip over 'bin' */ + + if (*ptr == 'i' ) /* bini */ + { + *imagetype = TSHORT; + defaulttype = 0; + ptr++; + } + else if (*ptr == 'j' ) /* binj; same as default */ + { + defaulttype = 0; + ptr ++; + } + else if (*ptr == 'r' ) /* binr */ + { + *imagetype = TFLOAT; + defaulttype = 0; + ptr ++; + } + else if (*ptr == 'd' ) /* bind */ + { + *imagetype = TDOUBLE; + defaulttype = 0; + ptr ++; + } + else if (*ptr == 'b' ) /* binb */ + { + *imagetype = TBYTE; + defaulttype = 0; + ptr ++; + } + + if (*ptr == '\0') /* use all defaults for other parameters */ + return(*status); + else if (*ptr != ' ') /* must be at least one blank */ + { + ffpmsg("binning specification syntax error:"); + ffpmsg(binspec); + return(*status = URL_PARSE_ERROR); + } + + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr == '\0') /* no other parameters; use defaults */ + return(*status); + + /* Check if need to import expression from a file */ + + if( *ptr=='@' ) { + if( ffimport_file( ptr+1, &file_expr, status ) ) return(*status); + ptr = file_expr; + while (*ptr == ' ') + ptr++; /* skip leading white space... again */ + } + + if (*ptr == '(' ) + { + /* this must be the opening parenthesis around a list of column */ + /* names, optionally followed by a '=' and the binning spec. */ + + for (ii = 0; ii < 4; ii++) + { + ptr++; /* skip over the '(', ',', or ' ') */ + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + slen = strcspn(ptr, " ,)"); + strncat(colname[ii], ptr, slen); /* copy 1st column name */ + + ptr += slen; + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr == ')' ) /* end of the list of names */ + { + *histaxis = ii + 1; + break; + } + } + + if (ii == 4) /* too many names in the list , or missing ')' */ + { + ffpmsg( + "binning specification has too many column names or is missing closing ')':"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status = URL_PARSE_ERROR); + } + + ptr++; /* skip over the closing parenthesis */ + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr == '\0') { + if( file_expr ) free( file_expr ); + return(*status); /* parsed the entire string */ + } + + else if (*ptr != '=') /* must be an equals sign now*/ + { + ffpmsg("illegal binning specification in URL:"); + ffpmsg(" an equals sign '=' must follow the column names"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status = URL_PARSE_ERROR); + } + + ptr++; /* skip over the equals sign */ + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + /* get the single range specification for all the columns */ + ffbinr(&ptr, tmpname, minin, + maxin, binsizein, minname[0], + maxname[0], binname[0], status); + if (*status > 0) + { + ffpmsg("illegal binning specification in URL:"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status); + } + + for (ii = 1; ii < *histaxis; ii++) + { + minin[ii] = minin[0]; + maxin[ii] = maxin[0]; + binsizein[ii] = binsizein[0]; + strcpy(minname[ii], minname[0]); + strcpy(maxname[ii], maxname[0]); + strcpy(binname[ii], binname[0]); + } + + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr == ';') + goto getweight; /* a weighting factor is specified */ + + if (*ptr != '\0') /* must have reached end of string */ + { + ffpmsg("illegal syntax after binning range specification in URL:"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status = URL_PARSE_ERROR); + } + + return(*status); + } /* end of case with list of column names in ( ) */ + + /* if we've reached this point, then the binning specification */ + /* must be of the form: XCOL = min:max:binsize, YCOL = ... */ + /* where the column name followed by '=' are optional. */ + /* If the column name is not specified, then use the default name */ + + for (ii = 0; ii < 4; ii++) /* allow up to 4 histogram dimensions */ + { + ffbinr(&ptr, colname[ii], &minin[ii], + &maxin[ii], &binsizein[ii], minname[ii], + maxname[ii], binname[ii], status); + + if (*status > 0) + { + ffpmsg("illegal syntax in binning range specification in URL:"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status); + } + + if (*ptr == '\0' || *ptr == ';') + break; /* reached the end of the string */ + + if (*ptr == ' ') + { + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr == '\0' || *ptr == ';') + break; /* reached the end of the string */ + + if (*ptr == ',') + ptr++; /* comma separates the next column specification */ + } + else if (*ptr == ',') + { + ptr++; /* comma separates the next column specification */ + } + else + { + ffpmsg("illegal characters following binning specification in URL:"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status = URL_PARSE_ERROR); + } + } + + if (ii == 4) + { + /* there are yet more characters in the string */ + ffpmsg("illegal binning specification in URL:"); + ffpmsg("apparently greater than 4 histogram dimensions"); + ffpmsg(binspec); + return(*status = URL_PARSE_ERROR); + } + else + *histaxis = ii + 1; + + /* special case: if a single number was entered it should be */ + /* interpreted as the binning factor for the default X and Y axes */ + + if (*histaxis == 1 && *colname[0] == '\0' && + minin[0] == DOUBLENULLVALUE && maxin[0] == DOUBLENULLVALUE) + { + *histaxis = 2; + binsizein[1] = binsizein[0]; + } + +getweight: + if (*ptr == ';') /* looks like a weighting factor is given */ + { + ptr++; + + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + recip = 0; + if (*ptr == '/') + { + *recip = 1; /* the reciprocal of the weight is entered */ + ptr++; + + while (*ptr == ' ') /* skip over blanks */ + ptr++; + } + + /* parse the weight as though it were a binrange. */ + /* either a column name or a numerical value will be returned */ + + ffbinr(&ptr, wtname, &dummy, &dummy, wt, tmpname, + tmpname, tmpname, status); + + if (*status > 0) + { + ffpmsg("illegal binning weight specification in URL:"); + ffpmsg(binspec); + if( file_expr ) free( file_expr ); + return(*status); + } + + /* creat a float datatype histogram by default, if weight */ + /* factor is not = 1.0 */ + + if (defaulttype && *wt != 1.0) + *imagetype = TFLOAT; + } + + while (*ptr == ' ') /* skip over blanks */ + ptr++; + + if (*ptr != '\0') /* should have reached the end of string */ + { + ffpmsg("illegal syntax after binning weight specification in URL:"); + ffpmsg(binspec); + *status = URL_PARSE_ERROR; + } + + if( file_expr ) free( file_expr ); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffbinr(char **ptr, + char *colname, + double *minin, + double *maxin, + double *binsizein, + char *minname, + char *maxname, + char *binname, + int *status) +/* + Parse the input binning range specification string, returning + the column name, histogram min and max values, and bin size. +*/ +{ + int slen, isanumber; + char token[FLEN_VALUE]; + + if (*status > 0) + return(*status); + + slen = fits_get_token(ptr, " ,=:;", token, &isanumber); /* get 1st token */ + + if (slen == 0 && (**ptr == '\0' || **ptr == ',' || **ptr == ';') ) + return(*status); /* a null range string */ + + if (!isanumber && **ptr != ':') + { + /* this looks like the column name */ + + if (token[0] == '#' && isdigit((int) token[1]) ) + { + /* omit the leading '#' in the column number */ + strcpy(colname, token+1); + } + else + strcpy(colname, token); + + while (**ptr == ' ') /* skip over blanks */ + (*ptr)++; + + if (**ptr != '=') + return(*status); /* reached the end */ + + (*ptr)++; /* skip over the = sign */ + + while (**ptr == ' ') /* skip over blanks */ + (*ptr)++; + + slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ + } + + if (**ptr != ':') + { + /* this is the first token, and since it is not followed by */ + /* a ':' this must be the binsize token */ + if (!isanumber) + strcpy(binname, token); + else + *binsizein = strtod(token, NULL); + + return(*status); /* reached the end */ + } + else + { + /* the token contains the min value */ + if (slen) + { + if (!isanumber) + strcpy(minname, token); + else + *minin = strtod(token, NULL); + } + } + + (*ptr)++; /* skip the colon between the min and max values */ + slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ + + /* the token contains the max value */ + if (slen) + { + if (!isanumber) + strcpy(maxname, token); + else + *maxin = strtod(token, NULL); + } + + if (**ptr != ':') + return(*status); /* reached the end; no binsize token */ + + (*ptr)++; /* skip the colon between the max and binsize values */ + slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ + + /* the token contains the binsize value */ + if (slen) + { + if (!isanumber) + strcpy(binname, token); + else + *binsizein = strtod(token, NULL); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffhist(fitsfile **fptr, /* IO - pointer to table with X and Y cols; */ + /* on output, points to histogram image */ + char *outfile, /* I - name for the output histogram file */ + int imagetype, /* I - datatype for image: TINT, TSHORT, etc */ + int naxis, /* I - number of axes in the histogram image */ + char colname[4][FLEN_VALUE], /* I - column names */ + double *minin, /* I - minimum histogram value, for each axis */ + double *maxin, /* I - maximum histogram value, for each axis */ + double *binsizein, /* I - bin size along each axis */ + char minname[4][FLEN_VALUE], /* I - optional keywords for min */ + char maxname[4][FLEN_VALUE], /* I - optional keywords for max */ + char binname[4][FLEN_VALUE], /* I - optional keywords for binsize */ + double weightin, /* I - binning weighting factor */ + char wtcol[FLEN_VALUE], /* I - optional keyword or col for weight*/ + int recip, /* I - use reciprocal of the weight? */ + char *selectrow, /* I - optional array (length = no. of */ + /* rows in the table). If the element is true */ + /* then the corresponding row of the table will*/ + /* be included in the histogram, otherwise the */ + /* row will be skipped. Ingnored if *selectrow*/ + /* is equal to NULL. */ + int *status) +{ + int ii, datatype, repeat, imin, imax, ibin, bitpix, tstatus, use_datamax = 0; + long haxes[4]; + fitsfile *histptr; + char errmsg[FLEN_ERRMSG], keyname[FLEN_KEYWORD], card[FLEN_CARD]; + tcolumn *colptr; + iteratorCol imagepars[1]; + int n_cols = 1, nkeys; + long offset = 0; + long n_per_loop = -1; /* force whole array to be passed at one time */ + histType histData; /* Structure holding histogram info for iterator */ + + float amin[4], amax[4], binsize[4], maxbin[4]; + float datamin = FLOATNULLVALUE, datamax = FLOATNULLVALUE; + char svalue[FLEN_VALUE]; + double dvalue; + char cpref[4][FLEN_VALUE]; + char *cptr; + + if (*status > 0) + return(*status); + + if (naxis > 4) + { + ffpmsg("histogram has more than 4 dimensions"); + return(*status = BAD_DIMEN); + } + + /* reset position to the correct HDU if necessary */ + if ((*fptr)->HDUposition != ((*fptr)->Fptr)->curhdu) + ffmahd(*fptr, ((*fptr)->HDUposition) + 1, NULL, status); + + histData.tblptr = *fptr; + histData.himagetype = imagetype; + histData.haxis = naxis; + histData.rowselector = selectrow; + + if (imagetype == TBYTE) + bitpix = BYTE_IMG; + else if (imagetype == TSHORT) + bitpix = SHORT_IMG; + else if (imagetype == TINT) + bitpix = LONG_IMG; + else if (imagetype == TFLOAT) + bitpix = FLOAT_IMG; + else if (imagetype == TDOUBLE) + bitpix = DOUBLE_IMG; + else + return(*status = BAD_DATATYPE); + + /* The CPREF keyword, if it exists, gives the preferred columns. */ + /* Otherwise, assume "X", "Y", "Z", and "T" */ + + tstatus = 0; + ffgky(*fptr, TSTRING, "CPREF", cpref[0], NULL, &tstatus); + + if (!tstatus) + { + /* Preferred column names are given; separate them */ + cptr = cpref[0]; + + /* the first preferred axis... */ + while (*cptr != ',' && *cptr != '\0') + cptr++; + + if (*cptr != '\0') + { + *cptr = '\0'; + cptr++; + while (*cptr == ' ') + cptr++; + + strcpy(cpref[1], cptr); + cptr = cpref[1]; + + /* the second preferred axis... */ + while (*cptr != ',' && *cptr != '\0') + cptr++; + + if (*cptr != '\0') + { + *cptr = '\0'; + cptr++; + while (*cptr == ' ') + cptr++; + + strcpy(cpref[2], cptr); + cptr = cpref[2]; + + /* the third preferred axis... */ + while (*cptr != ',' && *cptr != '\0') + cptr++; + + if (*cptr != '\0') + { + *cptr = '\0'; + cptr++; + while (*cptr == ' ') + cptr++; + + strcpy(cpref[3], cptr); + + } + } + } + } + + for (ii = 0; ii < naxis; ii++) + { + + /* get the min, max, and binsize values from keywords, if specified */ + + if (*minname[ii]) + { + if (ffgky(*fptr, TDOUBLE, minname[ii], &minin[ii], NULL, status) ) + { + ffpmsg("error reading histogramming minimum keyword"); + ffpmsg(minname[ii]); + return(*status); + } + } + + if (*maxname[ii]) + { + if (ffgky(*fptr, TDOUBLE, maxname[ii], &maxin[ii], NULL, status) ) + { + ffpmsg("error reading histogramming maximum keyword"); + ffpmsg(maxname[ii]); + return(*status); + } + } + + if (*binname[ii]) + { + if (ffgky(*fptr, TDOUBLE, binname[ii], &binsizein[ii], NULL, status) ) + { + ffpmsg("error reading histogramming binsize keyword"); + ffpmsg(binname[ii]); + return(*status); + } + } + + if (binsizein[ii] == 0.) + { + ffpmsg("error: histogram binsize = 0"); + return(*status = ZERO_SCALE); + } + + if (*colname[ii] == '\0') + { + strcpy(colname[ii], cpref[ii]); /* try using the preferred column */ + if (*colname[ii] == '\0') + { + if (ii == 0) + strcpy(colname[ii], "X"); + else if (ii == 1) + strcpy(colname[ii], "Y"); + else if (ii == 2) + strcpy(colname[ii], "Z"); + else if (ii == 3) + strcpy(colname[ii], "T"); + } + } + + /* get the column number in the table */ + if (ffgcno(*fptr, CASEINSEN, colname[ii], histData.hcolnum+ii, status) + > 0) + { + strcpy(errmsg, "column for histogram axis doesn't exist: "); + strcat(errmsg, colname[ii]); + ffpmsg(errmsg); + return(*status); + } + + colptr = ((*fptr)->Fptr)->tableptr; + colptr += (histData.hcolnum[ii] - 1); + + repeat = (int) colptr->trepeat; /* vector repeat factor of the column */ + if (repeat > 1) + { + strcpy(errmsg, "Can't bin a vector column: "); + strcat(errmsg, colname[ii]); + ffpmsg(errmsg); + return(*status = BAD_DATATYPE); + } + + /* get the datatype of the column */ + fits_get_coltype(*fptr, histData.hcolnum[ii], &datatype, + NULL, NULL, status); + + if (datatype < 0 || datatype == TSTRING) + { + strcpy(errmsg, "Inappropriate datatype; can't bin this column: "); + strcat(errmsg, colname[ii]); + ffpmsg(errmsg); + return(*status = BAD_DATATYPE); + } + + /* use TLMINn and TLMAXn keyword values if min and max were not given */ + /* else use actual data min and max if TLMINn and TLMAXn don't exist */ + + if (minin[ii] == DOUBLENULLVALUE) + { + ffkeyn("TLMIN", histData.hcolnum[ii], keyname, status); + if (ffgky(*fptr, TFLOAT, keyname, amin+ii, NULL, status) > 0) + { + /* use actual data minimum value for the histogram minimum */ + *status = 0; + if (fits_get_col_minmax(*fptr, histData.hcolnum[ii], amin+ii, &datamax, status) > 0) + { + strcpy(errmsg, "Error calculating datamin and datamax for column: "); + strcat(errmsg, colname[ii]); + ffpmsg(errmsg); + return(*status); + } + } + } + else + { + amin[ii] = (float) minin[ii]; + } + + if (maxin[ii] == DOUBLENULLVALUE) + { + ffkeyn("TLMAX", histData.hcolnum[ii], keyname, status); + if (ffgky(*fptr, TFLOAT, keyname, &amax[ii], NULL, status) > 0) + { + *status = 0; + if(datamax != FLOATNULLVALUE) /* already computed max value */ + { + amax[ii] = datamax; + } + else + { + /* use actual data maximum value for the histogram maximum */ + if (fits_get_col_minmax(*fptr, histData.hcolnum[ii], &datamin, &amax[ii], status) > 0) + { + strcpy(errmsg, "Error calculating datamin and datamax for column: "); + strcat(errmsg, colname[ii]); + ffpmsg(errmsg); + return(*status); + } + } + } + use_datamax = 1; /* flag that the max was determined by the data values */ + /* and not specifically set by the calling program */ + } + else + { + amax[ii] = (float) maxin[ii]; + } + + /* use TDBINn keyword or else 1 if bin size is not given */ + if (binsizein[ii] == DOUBLENULLVALUE) + { + tstatus = 0; + ffkeyn("TDBIN", histData.hcolnum[ii], keyname, &tstatus); + + if (ffgky(*fptr, TDOUBLE, keyname, binsizein + ii, NULL, &tstatus) > 0) + { + /* make at least 10 bins */ + binsizein[ii] = (amax[ii] - amin[ii]) / 10. ; + if (binsizein[ii] > 1.) + binsizein[ii] = 1.; /* use default bin size */ + } + } + + if ( (amin[ii] > amax[ii] && binsizein[ii] > 0. ) || + (amin[ii] < amax[ii] && binsizein[ii] < 0. ) ) + binsize[ii] = (float) -binsizein[ii]; /* reverse the sign of binsize */ + else + binsize[ii] = (float) binsizein[ii]; /* binsize has the correct sign */ + + ibin = (int) binsize[ii]; + imin = (int) amin[ii]; + imax = (int) amax[ii]; + + /* Determine the range and number of bins in the histogram. This */ + /* depends on whether the input columns are integer or floats, so */ + /* treat each case separately. */ + + if (datatype <= TLONG && (float) imin == amin[ii] && + (float) imax == amax[ii] && + (float) ibin == binsize[ii] ) + { + /* This is an integer column and integer limits were entered. */ + /* Shift the lower and upper histogramming limits by 0.5, so that */ + /* the values fall in the center of the bin, not on the edge. */ + + haxes[ii] = (imax - imin) / ibin + 1; /* last bin may only */ + /* be partially full */ + maxbin[ii] = (float) (haxes[ii] + 1.); /* add 1. instead of .5 to avoid roundoff */ + + if (amin[ii] < amax[ii]) + { + amin[ii] = (float) (amin[ii] - 0.5); + amax[ii] = (float) (amax[ii] + 0.5); + } + else + { + amin[ii] = (float) (amin[ii] + 0.5); + amax[ii] = (float) (amax[ii] - 0.5); + } + } + else if (use_datamax) + { + /* Either the column datatype and/or the limits are floating point, */ + /* and the histogram limits are being defined by the min and max */ + /* values of the array. Add 1 to the number of histogram bins to */ + /* make sure that pixels that are equal to the maximum or are */ + /* in the last partial bin are included. */ + + maxbin[ii] = (amax[ii] - amin[ii]) / binsize[ii]; + haxes[ii] = (long) (maxbin[ii] + 1); + } + else + { + /* float datatype column and/or limits, and the maximum value to */ + /* include in the histogram is specified by the calling program. */ + /* The lower limit is inclusive, but upper limit is exclusive */ + maxbin[ii] = (amax[ii] - amin[ii]) / binsize[ii]; + haxes[ii] = (long) maxbin[ii]; + + if (amin[ii] < amax[ii]) + { + if (amin[ii] + (haxes[ii] * binsize[ii]) < amax[ii]) + haxes[ii]++; /* need to include another partial bin */ + } + else + { + if (amin[ii] + (haxes[ii] * binsize[ii]) > amax[ii]) + haxes[ii]++; /* need to include another partial bin */ + } + } + } + + /* get the histogramming weighting factor */ + if (*wtcol) + { + /* first, look for a keyword with the weight value */ + if (ffgky(*fptr, TFLOAT, wtcol, &histData.weight, NULL, status) ) + { + /* not a keyword, so look for column with this name */ + *status = 0; + + /* get the column number in the table */ + if (ffgcno(*fptr, CASEINSEN, wtcol, &histData.wtcolnum, status) > 0) + { + ffpmsg( + "keyword or column for histogram weights doesn't exist: "); + ffpmsg(wtcol); + return(*status); + } + + histData.weight = FLOATNULLVALUE; + } + } + else + histData.weight = (float) weightin; + + if (histData.weight <= 0. && histData.weight != FLOATNULLVALUE) + { + ffpmsg("Illegal histogramming weighting factor <= 0."); + return(*status = URL_PARSE_ERROR); + } + + if (recip && histData.weight != FLOATNULLVALUE) + /* take reciprocal of weight */ + histData.weight = (float) (1.0 / histData.weight); + + histData.wtrecip = recip; + + /* size of histogram is now known, so create temp output file */ + if (ffinit(&histptr, outfile, status) > 0) + { + ffpmsg("failed to create temp output file for histogram"); + return(*status); + } + + if (ffcrim(histptr, bitpix, histData.haxis, haxes, status) > 0) + { + ffpmsg("failed to create primary array histogram in temp file"); + ffclos(histptr, status); + return(*status); + } + + /* copy all non-structural keywords from the table to the image */ + fits_get_hdrspace(*fptr, &nkeys, NULL, status); + for (ii = 1; ii <= nkeys; ii++) + { + fits_read_record(*fptr, ii, card, status); + if (fits_get_keyclass(card) >= 120) + fits_write_record(histptr, card, status); + } + + /* Set global variables with histogram parameter values. */ + /* Use separate scalar variables rather than arrays because */ + /* it is more efficient when computing the histogram. */ + + histData.amin1 = amin[0]; + histData.maxbin1 = maxbin[0]; + histData.binsize1 = binsize[0]; + histData.haxis1 = haxes[0]; + + if (histData.haxis > 1) + { + histData.amin2 = amin[1]; + histData.maxbin2 = maxbin[1]; + histData.binsize2 = binsize[1]; + histData.haxis2 = haxes[1]; + + if (histData.haxis > 2) + { + histData.amin3 = amin[2]; + histData.maxbin3 = maxbin[2]; + histData.binsize3 = binsize[2]; + histData.haxis3 = haxes[2]; + + if (histData.haxis > 3) + { + histData.amin4 = amin[3]; + histData.maxbin4 = maxbin[3]; + histData.binsize4 = binsize[3]; + histData.haxis4 = haxes[3]; + } + } + } + + /* define parameters of image for the iterator function */ + fits_iter_set_file(imagepars, histptr); /* pointer to image */ + fits_iter_set_datatype(imagepars, imagetype); /* image datatype */ + fits_iter_set_iotype(imagepars, OutputCol); /* image is output */ + + /* call the iterator function to write out the histogram image */ + if (fits_iterate_data(n_cols, imagepars, offset, n_per_loop, + ffwritehisto, (void*)&histData, status) ) + return(*status); + + /* write the World Coordinate System (WCS) keywords */ + /* create default values if WCS keywords are not present in the table */ + for (ii = 0; ii < histData.haxis; ii++) + { + /* CTYPEn */ + tstatus = 0; + ffkeyn("TCTYP", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); + if (tstatus) + { /* just use column name as the type */ + tstatus = 0; + ffkeyn("TTYPE", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); + } + + if (!tstatus) + { + ffkeyn("CTYPE", ii + 1, keyname, &tstatus); + ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Type", &tstatus); + } + else + tstatus = 0; + + /* CUNITn */ + ffkeyn("TCUNI", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); + if (tstatus) + { /* use the column units */ + tstatus = 0; + ffkeyn("TUNIT", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); + } + + if (!tstatus) + { + ffkeyn("CUNIT", ii + 1, keyname, &tstatus); + ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Units", &tstatus); + } + else + tstatus = 0; + + /* CRPIXn - Reference Pixel */ + ffkeyn("TCRPX", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); + if (tstatus) + { + dvalue = 1.0; /* choose first pixel in new image as ref. pix. */ + tstatus = 0; + } + else + { + /* calculate locate of the ref. pix. in the new image */ + dvalue = (dvalue - amin[ii]) / binsize[ii] + .5; + } + + ffkeyn("CRPIX", ii + 1, keyname, &tstatus); + ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Pixel", &tstatus); + + /* CRVALn - Value at the location of the reference pixel */ + ffkeyn("TCRVL", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); + if (tstatus) + { + /* calculate value at ref. pix. location (at center of 1st pixel) */ + dvalue = amin[ii] + binsize[ii]/2.; + tstatus = 0; + } + + ffkeyn("CRVAL", ii + 1, keyname, &tstatus); + ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Value", &tstatus); + + /* CDELTn - unit size of pixels */ + ffkeyn("TCDLT", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); + if (tstatus) + { + dvalue = 1.0; /* use default pixel size */ + tstatus = 0; + } + + dvalue = dvalue * binsize[ii]; + ffkeyn("CDELT", ii + 1, keyname, &tstatus); + ffpky(histptr, TDOUBLE, keyname, &dvalue, "Pixel size", &tstatus); + + /* CROTAn - Rotation angle (degrees CCW) */ + /* There should only be a CROTA2 keyword, and only for 2+ D images */ + if (ii == 1) + { + ffkeyn("TCROT", histData.hcolnum[ii], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); + if (!tstatus && dvalue != 0.) /* only write keyword if angle != 0 */ + { + ffkeyn("CROTA", ii + 1, keyname, &tstatus); + ffpky(histptr, TDOUBLE, keyname, &dvalue, + "Rotation angle", &tstatus); + } + else + { + /* didn't find CROTA for the 2nd axis, so look for one */ + /* on the first axis */ + tstatus = 0; + ffkeyn("TCROT", histData.hcolnum[0], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); + if (!tstatus && dvalue != 0.) /* only write keyword if angle != 0 */ + { + dvalue *= -1.; /* negate the value, because mirror image */ + ffkeyn("CROTA", ii + 1, keyname, &tstatus); + ffpky(histptr, TDOUBLE, keyname, &dvalue, + "Rotation angle", &tstatus); + } + } + } + } + + /* convert any TPn_k keywords to PCi_j; the value remains unchanged */ + /* also convert any TCn_k to CDi_j; the value is modified by n binning size */ + /* This is a bit of a kludge, and only works for 2D WCS */ + + if (histData.haxis == 2) { + + /* PC1_1 */ + tstatus = 0; + ffkeyn("TP", histData.hcolnum[0], card, &tstatus); + strcat(card,"_"); + ffkeyn(card, histData.hcolnum[0], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) + ffpky(histptr, TDOUBLE, "PC1_1", &dvalue, card, &tstatus); + + tstatus = 0; + keyname[1] = 'C'; + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) { + dvalue *= binsize[0]; + ffpky(histptr, TDOUBLE, "CD1_1", &dvalue, card, &tstatus); + } + + /* PC1_2 */ + tstatus = 0; + ffkeyn("TP", histData.hcolnum[0], card, &tstatus); + strcat(card,"_"); + ffkeyn(card, histData.hcolnum[1], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) + ffpky(histptr, TDOUBLE, "PC1_2", &dvalue, card, &tstatus); + + tstatus = 0; + keyname[1] = 'C'; + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) { + dvalue *= binsize[0]; + ffpky(histptr, TDOUBLE, "CD1_2", &dvalue, card, &tstatus); + } + + /* PC2_1 */ + tstatus = 0; + ffkeyn("TP", histData.hcolnum[1], card, &tstatus); + strcat(card,"_"); + ffkeyn(card, histData.hcolnum[0], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) + ffpky(histptr, TDOUBLE, "PC2_1", &dvalue, card, &tstatus); + + tstatus = 0; + keyname[1] = 'C'; + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) { + dvalue *= binsize[1]; + ffpky(histptr, TDOUBLE, "CD2_1", &dvalue, card, &tstatus); + } + + /* PC2_2 */ + tstatus = 0; + ffkeyn("TP", histData.hcolnum[1], card, &tstatus); + strcat(card,"_"); + ffkeyn(card, histData.hcolnum[1], keyname, &tstatus); + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) + ffpky(histptr, TDOUBLE, "PC2_2", &dvalue, card, &tstatus); + + tstatus = 0; + keyname[1] = 'C'; + ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); + if (!tstatus) { + dvalue *= binsize[1]; + ffpky(histptr, TDOUBLE, "CD2_2", &dvalue, card, &tstatus); + } + } + + /* finally, close the original file and return ptr to the new image */ + ffclos(*fptr, status); + *fptr = histptr; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin, + float *datamax, int *status) +/* + Simple utility routine to compute the min and max value in a column +*/ +{ + int anynul; + long nrows, ntodo, firstrow, ii; + float array[1000], nulval; + + ffgky(fptr, TLONG, "NAXIS2", &nrows, NULL, status); /* no. of rows */ + + firstrow = 1; + nulval = FLOATNULLVALUE; + *datamin = 9.0E36F; + *datamax = -9.0E36F; + + while(nrows) + { + ntodo = minvalue(nrows, 100); + ffgcv(fptr, TFLOAT, colnum, firstrow, 1, ntodo, &nulval, array, + &anynul, status); + + for (ii = 0; ii < ntodo; ii++) + { + if (array[ii] != nulval) + { + *datamin = minvalue(*datamin, array[ii]); + *datamax = maxvalue(*datamax, array[ii]); + } + } + + nrows -= ntodo; + firstrow += ntodo; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffwritehisto(long totaln, long pixoffset, long firstn, long nvalues, + int narrays, iteratorCol *imagepars, void *userPointer) +/* + Interator work function that writes out the histogram. + The histogram values are calculated by another work function, ffcalchisto. + This work function only gets called once, and totaln = nvalues. +*/ +{ + iteratorCol colpars[5]; + int ii, status = 0, ncols; + long rows_per_loop = 0, offset = 0; + histType *histData; + + histData = (histType *)userPointer; + + /* store pointer to the histogram array, and initialize to zero */ + + switch( histData->himagetype ) { + case TBYTE: + histData->hist.b = (char * ) fits_iter_get_array(imagepars); + break; + case TSHORT: + histData->hist.i = (short * ) fits_iter_get_array(imagepars); + break; + case TINT: + histData->hist.j = (int * ) fits_iter_get_array(imagepars); + break; + case TFLOAT: + histData->hist.r = (float * ) fits_iter_get_array(imagepars); + break; + case TDOUBLE: + histData->hist.d = (double *) fits_iter_get_array(imagepars); + break; + } + + /* set the column parameters for the iterator function */ + for (ii = 0; ii < histData->haxis; ii++) + { + fits_iter_set_by_num(&colpars[ii], histData->tblptr, + histData->hcolnum[ii], TFLOAT, InputCol); + } + ncols = histData->haxis; + + if (histData->weight == FLOATNULLVALUE) + { + fits_iter_set_by_num(&colpars[histData->haxis], histData->tblptr, + histData->wtcolnum, TFLOAT, InputCol); + ncols = histData->haxis + 1; + } + + /* call iterator function to calc the histogram pixel values */ + fits_iterate_data(ncols, colpars, offset, rows_per_loop, + ffcalchist, (void*)histData, &status); + + return(status); +} +/*--------------------------------------------------------------------------*/ +int ffcalchist(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *colpars, void *userPointer) +/* + Interator work function that calculates values for the 2D histogram. +*/ +{ + long ii, ipix, iaxisbin; + float pix, axisbin; + static float *col1, *col2, *col3, *col4; /* static to preserve values */ + static float *wtcol; + static long incr2, incr3, incr4; + static histType histData; + static char *rowselect; + + /* Initialization procedures: execute on the first call */ + if (firstrow == 1) + { + + /* Copy input histogram data to static local variable so we */ + /* don't have to constantly dereference it. */ + + histData = *(histType*)userPointer; + rowselect = histData.rowselector; + + /* assign the input array pointers to local pointers */ + col1 = (float *) fits_iter_get_array(&colpars[0]); + if (histData.haxis > 1) + { + col2 = (float *) fits_iter_get_array(&colpars[1]); + incr2 = histData.haxis1; + + if (histData.haxis > 2) + { + col3 = (float *) fits_iter_get_array(&colpars[2]); + incr3 = incr2 * histData.haxis2; + + if (histData.haxis > 3) + { + col4 = (float *) fits_iter_get_array(&colpars[3]); + incr4 = incr3 * histData.haxis3; + } + } + } + + if (ncols > histData.haxis) /* then weights are give in a column */ + { + wtcol = (float *) fits_iter_get_array(&colpars[histData.haxis]); + } + } /* end of Initialization procedures */ + + /* Main loop: increment the histogram at position of each event */ + for (ii = 1; ii <= nrows; ii++) + { + if (rowselect) /* if a row selector array is supplied... */ + { + if (*rowselect) + { + rowselect++; /* this row is included in the histogram */ + } + else + { + rowselect++; /* this row is excluded from the histogram */ + continue; + } + } + + if (col1[ii] == FLOATNULLVALUE) /* test for null value */ + continue; + + pix = (col1[ii] - histData.amin1) / histData.binsize1; + ipix = (long) (pix + 1.); /* add 1 because the 1st pixel is the null value */ + + /* test if bin is within range */ + if (ipix < 1 || ipix > histData.haxis1 || pix > histData.maxbin1) + continue; + + if (histData.haxis > 1) + { + if (col2[ii] == FLOATNULLVALUE) + continue; + + axisbin = (col2[ii] - histData.amin2) / histData.binsize2; + iaxisbin = (long) axisbin; + + if (axisbin < 0. || iaxisbin >= histData.haxis2 || axisbin > histData.maxbin2) + continue; + + ipix += (iaxisbin * incr2); + + if (histData.haxis > 2) + { + if (col3[ii] == FLOATNULLVALUE) + continue; + + axisbin = (col3[ii] - histData.amin3) / histData.binsize3; + iaxisbin = (long) axisbin; + if (axisbin < 0. || iaxisbin >= histData.haxis3 || axisbin > histData.maxbin3) + continue; + + ipix += (iaxisbin * incr3); + + if (histData.haxis > 3) + { + if (col4[ii] == FLOATNULLVALUE) + continue; + + axisbin = (col4[ii] - histData.amin4) / histData.binsize4; + iaxisbin = (long) axisbin; + if (axisbin < 0. || iaxisbin >= histData.haxis4 || axisbin > histData.maxbin4) + continue; + + ipix += (iaxisbin * incr4); + + } /* end of haxis > 3 case */ + } /* end of haxis > 2 case */ + } /* end of haxis > 1 case */ + + /* increment the histogram pixel */ + if (histData.weight != FLOATNULLVALUE) /* constant weight factor */ + { + if (histData.himagetype == TINT) + histData.hist.j[ipix] += (int) histData.weight; + else if (histData.himagetype == TSHORT) + histData.hist.i[ipix] += (short) histData.weight; + else if (histData.himagetype == TFLOAT) + histData.hist.r[ipix] += histData.weight; + else if (histData.himagetype == TDOUBLE) + histData.hist.d[ipix] += histData.weight; + else if (histData.himagetype == TBYTE) + histData.hist.b[ipix] += (char) histData.weight; + } + else if (histData.wtrecip) /* use reciprocal of the weight */ + { + if (histData.himagetype == TINT) + histData.hist.j[ipix] += (int) (1./wtcol[ii]); + else if (histData.himagetype == TSHORT) + histData.hist.i[ipix] += (short) (1./wtcol[ii]); + else if (histData.himagetype == TFLOAT) + histData.hist.r[ipix] += (float) (1./wtcol[ii]); + else if (histData.himagetype == TDOUBLE) + histData.hist.d[ipix] += 1./wtcol[ii]; + else if (histData.himagetype == TBYTE) + histData.hist.b[ipix] += (char) (1./wtcol[ii]); + } + else /* no weights */ + { + if (histData.himagetype == TINT) + histData.hist.j[ipix] += (int) wtcol[ii]; + else if (histData.himagetype == TSHORT) + histData.hist.i[ipix] += (short) wtcol[ii]; + else if (histData.himagetype == TFLOAT) + histData.hist.r[ipix] += wtcol[ii]; + else if (histData.himagetype == TDOUBLE) + histData.hist.d[ipix] += wtcol[ii]; + else if (histData.himagetype == TBYTE) + histData.hist.b[ipix] += (char) wtcol[ii]; + } + + } /* end of main loop over all rows */ + + return(0); +} + diff --git a/software/cfitsio3040/history.txt b/software/cfitsio3040/history.txt new file mode 100644 index 000000000..531c56e06 --- /dev/null +++ b/software/cfitsio3040/history.txt @@ -0,0 +1,2 @@ +10152 Mon Aug 31 09:20:02 EDT 2009 sierra.stsci.edu +10160 Mon Aug 31 10:04:58 EDT 2009 sockeye.stsci.edu diff --git a/software/cfitsio3040/imcompress.c b/software/cfitsio3040/imcompress.c new file mode 100644 index 000000000..d1bd9b21d --- /dev/null +++ b/software/cfitsio3040/imcompress.c @@ -0,0 +1,3767 @@ +# include +# include +# include +# include +# include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int fits_set_compression_type(fitsfile *fptr, /* I - FITS file pointer */ + int ctype, /* image compression type code; */ + /* allowed values: RICE_1, GZIP_1, PLIO_1, HCOMPRESS_1 */ + int *status) /* IO - error status */ +{ +/* + This routine specifies the image compression algorithm that should be + used when writing a FITS image. The image is divided into tiles, and + each tile is compressed and stored in a row of at variable length binary + table column. +*/ + (fptr->Fptr)->request_compress_type = ctype; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_set_tile_dim(fitsfile *fptr, /* I - FITS file pointer */ + int ndim, /* number of dimensions in the compressed image */ + long *dims, /* size of image compression tile in each dimension */ + /* default tile size = (NAXIS1, 1, 1, ...) */ + int *status) /* IO - error status */ +{ +/* + This routine specifies the size (dimension) of the image + compression tiles that should be used when writing a FITS + image. The image is divided into tiles, and each tile is compressed + and stored in a row of at variable length binary table column. +*/ + int ii; + + if (ndim < 0 || ndim > MAX_COMPRESS_DIM) + { + *status = BAD_DIMEN; + return(*status); + } + + for (ii = 0; ii < ndim; ii++) + { + (fptr->Fptr)->request_tilesize[ii] = dims[ii]; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_set_noise_bits(fitsfile *fptr, /* I - FITS file pointer */ + int noisebits, /* noise_bits parameter value */ + /* (default = 4) */ + int *status) /* IO - error status */ +{ +/* + This routine specifies the value of the noice_bits parameter that + should be used when compressing floating point images. The image is + divided into tiles, and each tile is compressed and stored in a row + of at variable length binary table column. +*/ + if (noisebits < 1 || noisebits > 16) + { + *status = DATA_COMPRESSION_ERR; + return(*status); + } + + (fptr->Fptr)->request_noise_nbits = noisebits; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_set_hcomp_scale(fitsfile *fptr, /* I - FITS file pointer */ + int scale, /* hcompress scale parameter value */ + /* (default = 4) */ + int *status) /* IO - error status */ +{ +/* + This routine specifies the value of the hcompress scale parameter that + The image is + divided into tiles, and each tile is compressed and stored in a row + of at variable length binary table column. +*/ + + (fptr->Fptr)->request_hcomp_scale = scale; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_set_hcomp_smooth(fitsfile *fptr, /* I - FITS file pointer */ + int smooth, /* hcompress smooth parameter value */ + /* if scale > 1 and smooth != 0, then */ + /* the image will be smoothed when it is */ + /* decompressed to remove some of the */ + /* 'blockiness' in the image produced */ + /* by the lossy compression */ + int *status) /* IO - error status */ +{ +/* + This routine specifies the value of the hcompress scale parameter that + The image is + divided into tiles, and each tile is compressed and stored in a row + of at variable length binary table column. +*/ + + (fptr->Fptr)->request_hcomp_smooth = smooth; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_compression_type(fitsfile *fptr, /* I - FITS file pointer */ + int *ctype, /* image compression type code; */ + /* allowed values: RICE_1, GZIP_1, PLIO_1, HCOMPRESS_1 */ + int *status) /* IO - error status */ +{ +/* + This routine returns the image compression algorithm that should be + used when writing a FITS image. The image is divided into tiles, and + each tile is compressed and stored in a row of at variable length binary + table column. +*/ + *ctype = (fptr->Fptr)->request_compress_type; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_tile_dim(fitsfile *fptr, /* I - FITS file pointer */ + int ndim, /* number of dimensions in the compressed image */ + long *dims, /* size of image compression tile in each dimension */ + /* default tile size = (NAXIS1, 1, 1, ...) */ + int *status) /* IO - error status */ +{ +/* + This routine returns the size (dimension) of the image + compression tiles that should be used when writing a FITS + image. The image is divided into tiles, and each tile is compressed + and stored in a row of at variable length binary table column. +*/ + int ii; + + if (ndim < 0 || ndim > MAX_COMPRESS_DIM) + { + *status = BAD_DIMEN; + return(*status); + } + + for (ii = 0; ii < ndim; ii++) + { + dims[ii] = (fptr->Fptr)->request_tilesize[ii]; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_noise_bits(fitsfile *fptr, /* I - FITS file pointer */ + int *noisebits, /* noise_bits parameter value */ + /* (default = 4) */ + int *status) /* IO - error status */ + +{ +/* + This routine returns the value of the noice_bits parameter that + should be used when compressing floating point images. The image is + divided into tiles, and each tile is compressed and stored in a row + of at variable length binary table column. +*/ + + *noisebits = (fptr->Fptr)->request_noise_nbits; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_hcomp_scale(fitsfile *fptr, /* I - FITS file pointer */ + int *scale, /* Hcompress scale parameter value */ + int *status) /* IO - error status */ + +{ +/* + This routine returns the value of the noice_bits parameter that + should be used when compressing floating point images. The image is + divided into tiles, and each tile is compressed and stored in a row + of at variable length binary table column. +*/ + + *scale = (fptr->Fptr)->request_hcomp_scale; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_get_hcomp_smooth(fitsfile *fptr, /* I - FITS file pointer */ + int *smooth, /* Hcompress smooth parameter value */ + int *status) /* IO - error status */ + +{ + *smooth = (fptr->Fptr)->request_hcomp_smooth; + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_img_compress(fitsfile *infptr, /* pointer to image to be compressed */ + fitsfile *outfptr, /* empty HDU for output compressed image */ + int *status) /* IO - error status */ + +/* + This routine initializes the output table, copies all the keywords, + and loops through the input image, compressing the data and + writing the compressed tiles to the output table. +*/ +{ + int bitpix, naxis; + long naxes[MAX_COMPRESS_DIM]; + + if (*status > 0) + return(*status); + + /* get datatype and size of input image */ + if (fits_get_img_param(infptr, MAX_COMPRESS_DIM, &bitpix, + &naxis, naxes, status) > 0) + return(*status); + + if (naxis < 1 || naxis > MAX_COMPRESS_DIM) + { + ffpmsg("Image cannot be compressed: NAXIS out of range"); + return(*status = BAD_NAXIS); + } + + /* initialize output table */ + if (imcomp_init_table(outfptr, bitpix, naxis, naxes, 0, status) > 0) + return (*status); + + /* Copy the image header keywords to the table header. */ + if (imcomp_copy_img2comp(infptr, outfptr, status) > 0) + return (*status); + + /* turn off any intensity scaling (defined by BSCALE and BZERO */ + /* keywords) so that unscaled values will be read by CFITSIO */ + ffpscl(infptr, 1.0, 0.0, status); + + /* force a rescan of the output file keywords, so that */ + /* the compression parameters will be copied to the internal */ + /* fitsfile structure used by CFITSIO */ + ffrdef(outfptr, status); + + /* Read each image tile, compress, and write to a table row. */ + imcomp_compress_image (infptr, outfptr, status); + + /* force another rescan of the output file keywords, to */ + /* update PCOUNT and TFORMn = '1PB(iii)' keyword values. */ + ffrdef(outfptr, status); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int fits_compress_img(fitsfile *infptr, /* pointer to image to be compressed */ + fitsfile *outfptr, /* empty HDU for output compressed image */ + int compress_type, /* compression type code */ + /* RICE_1, HCOMPRESS_1, etc. */ + long *intilesize, /* size in each dimension of the tiles */ + /* NULL pointer means tile by rows */ + int blocksize, /* compression parameter: blocksize */ + int nbits, /* compression parameter: nbits */ + int *status) /* IO - error status */ + +/* + !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! + This routine is obsolete and should not be used. Currently the + ftools 'fimgzip' task calls this; it should be modified to call fits_img_compress + instead. + !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! + + This routine initializes the output table, copies all the keywords, + and loops through the input image, compressing the data and + writing the compressed tiles to the output table. +*/ +{ + int bitpix, naxis; + long naxes[MAX_COMPRESS_DIM]; + + if (*status > 0) + return(*status); + + /* get datatype and size of input image */ + if (fits_get_img_param(infptr, MAX_COMPRESS_DIM, &bitpix, + &naxis, naxes, status) > 0) + return(*status); + + if (naxis < 1 || naxis > MAX_COMPRESS_DIM) + { + ffpmsg("Image cannot be compressed: NAXIS out of range"); + return(*status = BAD_NAXIS); + } + + /* initialize output table */ + if (imcomp_init_table(outfptr, bitpix, naxis, naxes, 0, status) > 0) + return (*status); + + /* Copy the image header keywords to the table header. */ + if (imcomp_copy_imheader(infptr, outfptr, status) > 0) + return (*status); + + /* turn off any intensity scaling (defined by BSCALE and BZERO */ + /* keywords) so that unscaled values will be read by CFITSIO */ + ffpscl(infptr, 1.0, 0.0, status); + + /* force a rescan of the output file keywords, so that */ + /* the compression parameters will be copied to the internal */ + /* fitsfile structure used by CFITSIO */ + ffrdef(outfptr, status); + + /* Read each image tile, compress, and write to a table row. */ + imcomp_compress_image (infptr, outfptr, status); + + /* force another rescan of the output file keywords, to */ + /* update PCOUNT and TFORMn = '1PB(iii)' keyword values. */ + ffrdef(outfptr, status); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_init_table(fitsfile *outfptr, + int inbitpix, + int naxis, + long *naxes, + int writebitpix, /* write the ZBITPIX, ZNAXIS, and ZNAXES keyword? */ + int *status) +/* + create a BINTABLE extension for the output compressed image. +*/ +{ + char keyname[FLEN_KEYWORD], zcmptype[12]; + int ii, jj, minspace, tempsize, remain, leftspace, ncols, bitpix; + long nrows; + char *ttype[] = {"COMPRESSED_DATA", "UNCOMPRESSED_DATA", "ZSCALE", "ZZERO"}; + char *tform[4]; + char tf0[4], tf1[4], tf2[4], tf3[4]; + char *tunit[] = {"\0", "\0", "\0", "\0" }; + char comm[FLEN_COMMENT]; + + if (*status > 0) + return(*status); + + /* test for the 2 special cases that represent unsigned integers */ + if (inbitpix == USHORT_IMG) + bitpix = SHORT_IMG; + else if (inbitpix == ULONG_IMG) + bitpix = LONG_IMG; + else + bitpix = inbitpix; + + /* reset default tile dimensions too if required */ + + if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) { + if (((outfptr->Fptr)->request_tilesize[0] == 0) && + ((outfptr->Fptr)->request_tilesize[1] == 1) ){ + + + for (ii = 0; ii < 2 && ii < naxis; ii++) { /* only reset the 1st 2 dimensions */ + if (naxes[ii] <= 600) { + + /* use the full dimension of the image as the tile dimension */ + (outfptr->Fptr)->request_tilesize[ii] = naxes[ii]; + + } else { + + /* look for an even tile size in the range 200 - 600 */ + /* This is a brute force algorithm; probably more efficient ways to do this */ + + minspace = naxes[ii]; + tempsize = naxes[ii]; + + for (jj = 600; jj >= 200; jj -= 2) { + + remain = naxes[ii] % jj; + + if (!remain) { + /* found an even multiple tile size */ + tempsize = jj; + break; + + } else { + + leftspace = jj - remain; + if (leftspace < minspace) { + /* save the best case found so far */ + minspace = leftspace; + tempsize = jj; + } + } + } /* end of for jj loop */ + + (outfptr->Fptr)->request_tilesize[ii] = tempsize; + + } + } /* end of for ii loop */ + } + } /* end, if HCOMPRESS_1 */ + + + for (ii = 0; ii < naxis; ii++) { + if ((outfptr->Fptr)->request_tilesize[ii] <= 0) { + /* tile size of 0 means use the image size of that dimension */ + (outfptr->Fptr)->request_tilesize[ii] = naxes[ii]; + } + } + + /* (only used to quantize floating point images) */ + if ((outfptr->Fptr)->request_noise_nbits < 1) /* use default value if input is not legal */ + (outfptr->Fptr)->request_noise_nbits = 4; + + /* ---- set up array of TFORM strings -------------------------------*/ + strcpy(tf0, "1PB"); + strcpy(tf2, "1D"); + strcpy(tf3, "1D"); + + tform[0] = tf0; + tform[1] = tf1; + tform[2] = tf2; + tform[3] = tf3; + + /* calculate number of rows in output table */ + nrows = 1; + for (ii = 0; ii < naxis; ii++) + { + nrows = nrows * ((naxes[ii] - 1)/ ((outfptr->Fptr)->request_tilesize[ii]) + 1); + } + + if (bitpix < 0 ) /* floating point image */ + ncols = 4; + else + ncols = 1; /* default table has just one 'COMPRESSED_DATA' column */ + + if ((outfptr->Fptr)->request_compress_type == RICE_1) + { + strcpy(zcmptype, "RICE_1"); + } + else if ((outfptr->Fptr)->request_compress_type == GZIP_1) + { + strcpy(zcmptype, "GZIP_1"); + } + else if ((outfptr->Fptr)->request_compress_type == PLIO_1) + { + strcpy(zcmptype, "PLIO_1"); + /* the PLIO compression algorithm outputs short integers, not bytes */ + strcpy(tform[0], "1PI"); + } + else if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) + { + strcpy(zcmptype, "HCOMPRESS_1"); + } + else + { + ffpmsg("unknown compression type (imcomp_init_table)"); + return(*status = DATA_COMPRESSION_ERR); + } + + /* set correct datatype for any tiles that cannot be compressed */ + if (bitpix == SHORT_IMG) + strcpy(tform[1], "1PI"); + else if (bitpix == LONG_IMG) + strcpy(tform[1], "1PJ"); + else if (bitpix == FLOAT_IMG) + strcpy(tform[1], "1PE"); + else if (bitpix == DOUBLE_IMG) + strcpy(tform[1], "1PD"); + + /* create the bintable extension to contain the compressed image */ + ffcrtb(outfptr, BINARY_TBL, nrows, ncols, ttype, + tform, tunit, 0, status); + + /* Add standard header keywords. */ + ffpkyl (outfptr, "ZIMAGE", 1, + "extension contains compressed image", status); + + if (writebitpix) { + /* write the keywords defining the datatype and dimensions of */ + /* the uncompressed image. These keywords may get created */ + /* later, copied from the input uncompressed image */ + + ffpkyj (outfptr, "ZBITPIX", bitpix, + "data type of original image", status); + ffpkyj (outfptr, "ZNAXIS", naxis, + "dimension of original image", status); + + for (ii = 0; ii < naxis; ii++) + { + sprintf (keyname, "ZNAXIS%d", ii+1); + ffpkyj (outfptr, keyname, naxes[ii], + "length of original image axis", status); + } + } + + for (ii = 0; ii < naxis; ii++) + { + sprintf (keyname, "ZTILE%d", ii+1); + ffpkyj (outfptr, keyname, (outfptr->Fptr)->request_tilesize[ii], + "size of tiles to be compressed", status); + } + + ffpkys (outfptr, "ZCMPTYPE", zcmptype, + "compression algorithm", status); + + /* write any algorithm-specific keywords */ + if ((outfptr->Fptr)->request_compress_type == RICE_1) + { + ffpkys (outfptr, "ZNAME1", "BLOCKSIZE", + "compression block size", status); + + /* for now at least, the block size is always 32 */ + ffpkyj (outfptr, "ZVAL1", 32, + "pixels per block", status); + + if (bitpix < 0 ) /* floating point image */ + { + ffpkys (outfptr, "ZNAME2", "NOISEBIT", + "floating point quantization level", status); + + ffpkyj (outfptr, "ZVAL2", (long) (outfptr->Fptr)->request_noise_nbits, + "floating point quantization level", status); + } + } + else if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) + { + ffpkys (outfptr, "ZNAME1", "SCALE", + "HCOMPRESS scale factor", status); + ffpkyj (outfptr, "ZVAL1", (long) (outfptr->Fptr)->request_hcomp_scale, + "HCOMPRESS scale factor", status); + + ffpkys (outfptr, "ZNAME2", "SMOOTH", + "HCOMPRESS smooth option", status); + ffpkyj (outfptr, "ZVAL2", (long) (outfptr->Fptr)->request_hcomp_smooth, + "HCOMPRESS smooth option", status); + + if (bitpix < 0 ) /* floating point image */ + { + ffpkys (outfptr, "ZNAME3", "NOISEBIT", + "floating point quantization level", status); + + ffpkyj (outfptr, "ZVAL3", (long) (outfptr->Fptr)->request_noise_nbits, + "floating point quantization level", status); + } + } + else + { + if (bitpix < 0 ) /* floating point image */ + { + ffpkys (outfptr, "ZNAME1", "NOISEBIT", + "floating point quantization level", status); + + ffpkyj (outfptr, "ZVAL1", (long) (outfptr->Fptr)->request_noise_nbits, + "floating point quantization level", status); + } + } + + /* Write the BSCALE and BZERO keywords, if an unsigned integer image */ + if (inbitpix == USHORT_IMG) + { + strcpy(comm, "offset data range to that of unsigned short"); + ffpkyg(outfptr, "BZERO", 32768., 0, comm, status); + strcpy(comm, "default scaling factor"); + ffpkyg(outfptr, "BSCALE", 1.0, 0, comm, status); + } + else if (inbitpix == ULONG_IMG) + { + strcpy(comm, "offset data range to that of unsigned long"); + ffpkyg(outfptr, "BZERO", 2147483648., 0, comm, status); + strcpy(comm, "default scaling factor"); + ffpkyg(outfptr, "BSCALE", 1.0, 0, comm, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_calc_max_elem (int comptype, int nx, int zbitpix, int blocksize) + +/* This function returns the maximum number of bytes in a compressed + image line. + + nx = maximum number of pixels in a tile + blocksize is only relevant for RICE compression +*/ +{ + if (comptype == RICE_1) + { + return (sizeof(float) * nx + nx / blocksize + 2 + 4); + } + else if (comptype == GZIP_1) + { + /* gzip usually compressed by at least a factor of 2 */ + /* If this size turns out to be too small, then the gzip */ + /* compression routine will allocate more space as required */ + + return(nx * sizeof(int) / 2); + } + else if (comptype == HCOMPRESS_1) + { + /* Imperical evidence suggests in the worst case, + the compressed stream could be up to 10% larger than the original + image. Add 26 byte overhead, only significant for very small tiles + + Possible improvement: may need to allow a larger size for 32-bit images */ + + if (zbitpix == 16 || zbitpix == 8) + + return( (int) (nx * 2.2 + 26)); /* will be compressing 16-bit int array */ + else + return( (int) (nx * 4.4 + 26)); /* will be compressing 32-bit int array */ + } + else + return(nx * sizeof(int)); +} +/*--------------------------------------------------------------------------*/ +int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr, int *status) + +/* This routine does the following: + - reads an image one tile at a time + - if it is a float or double image, then it quantizes the pixels + - compresses the integer pixel values + - writes the compressed byte stream to the FITS file. + + If the tile cannot be quantized than the raw float or double values + are written to the output table. + +*/ +{ + double *tiledata = 0; + int anynul, gotnulls = 0, datatype, tstatus, colnum; + long ii, row, nelem, offset; + int naxis; + long maxtilelen, tilelen, incre[] = {1, 1, 1, 1, 1, 1}; + long naxes[MAX_COMPRESS_DIM], fpixel[MAX_COMPRESS_DIM]; + long lpixel[MAX_COMPRESS_DIM], tile[MAX_COMPRESS_DIM]; + long tilesize[MAX_COMPRESS_DIM]; + long i0, i1, i2, i3, i4, i5; + char card[FLEN_CARD]; + + if (*status > 0) + return(*status); + + maxtilelen = (outfptr->Fptr)->maxtilelen; + + /* allocate buffer to hold 1 tile of data */ + /* if the hcompress algorithm is being used on BITPIX = 32, -32, or -64 */ + /* image, then we need to allocate 8-bytes per pixel buffer */ + + if ((outfptr->Fptr)->zbitpix == FLOAT_IMG) + { + datatype = TFLOAT; + + if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1) { + /* need twice as much scratch space (8 bytes per pixel) */ + tiledata = (double*) calloc (maxtilelen * 2, sizeof (float)); + } else { + tiledata = (double*) calloc (maxtilelen, sizeof (float)); + } + } + else if ((outfptr->Fptr)->zbitpix == DOUBLE_IMG) + { + datatype = TDOUBLE; + tiledata = (double*) calloc (maxtilelen, sizeof (double)); + } + else + { + datatype = TINT; + + if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1 && + (outfptr->Fptr)->zbitpix == LONG_IMG) { + /* need twice as much scratch space (8 bytes per pixel) */ + + tiledata = (double*) calloc (maxtilelen * 2, sizeof (int)); + } else { + tiledata = (double*) calloc (maxtilelen, sizeof (int)); + } + } + + if (tiledata == NULL) + { + ffpmsg("Out of memory. (imcomp_compress_image)"); + return (*status = MEMORY_ALLOCATION); + } + + /* calculate size of tile in each dimension */ + naxis = (outfptr->Fptr)->zndim; + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + if (ii < naxis) + { + naxes[ii] = (outfptr->Fptr)->znaxis[ii]; + tilesize[ii] = (outfptr->Fptr)->tilesize[ii]; + } + else + { + naxes[ii] = 1; + tilesize[ii] = 1; + } + } + row = 1; + + /* set up big loop over up to 6 dimensions */ + for (i5 = 1; i5 <= naxes[5]; i5 += tilesize[5]) + { + fpixel[5] = i5; + lpixel[5] = minvalue(i5 + tilesize[5] - 1, naxes[5]); + tile[5] = lpixel[5] - fpixel[5] + 1; + for (i4 = 1; i4 <= naxes[4]; i4 += tilesize[4]) + { + fpixel[4] = i4; + lpixel[4] = minvalue(i4 + tilesize[4] - 1, naxes[4]); + tile[4] = lpixel[4] - fpixel[4] + 1; + for (i3 = 1; i3 <= naxes[3]; i3 += tilesize[3]) + { + fpixel[3] = i3; + lpixel[3] = minvalue(i3 + tilesize[3] - 1, naxes[3]); + tile[3] = lpixel[3] - fpixel[3] + 1; + for (i2 = 1; i2 <= naxes[2]; i2 += tilesize[2]) + { + fpixel[2] = i2; + lpixel[2] = minvalue(i2 + tilesize[2] - 1, naxes[2]); + tile[2] = lpixel[2] - fpixel[2] + 1; + for (i1 = 1; i1 <= naxes[1]; i1 += tilesize[1]) + { + fpixel[1] = i1; + lpixel[1] = minvalue(i1 + tilesize[1] - 1, naxes[1]); + tile[1] = lpixel[1] - fpixel[1] + 1; + for (i0 = 1; i0 <= naxes[0]; i0 += tilesize[0]) + { + fpixel[0] = i0; + lpixel[0] = minvalue(i0 + tilesize[0] - 1, naxes[0]); + tile[0] = lpixel[0] - fpixel[0] + 1; + + /* number of pixels in this tile */ + tilelen = tile[0]; + for (ii = 1; ii < naxis; ii++) + { + tilelen *= tile[ii]; + } + + /* read next tile of data from image */ + if (datatype == TFLOAT) + { + ffgsve(infptr, 1, naxis, naxes, fpixel, lpixel, incre, + FLOATNULLVALUE, (float *) tiledata, &anynul, status); + } + else if (datatype == TDOUBLE) + { + ffgsvd(infptr, 1, naxis, naxes, fpixel, lpixel, incre, + DOUBLENULLVALUE, tiledata, &anynul, status); + } + else /* read all integer data types as int */ + { + ffgsvk(infptr, 1, naxis, naxes, fpixel, lpixel, incre, + 0, (int *) tiledata, &anynul, status); + } + + /* now compress the tile, and write to row of binary table */ + imcomp_compress_tile(outfptr, row, datatype, tiledata, tilelen, + tile[0], tile[1], status); + + /* set flag if we found any null values */ + if (anynul) + gotnulls = 1; + + /* check for any error in the previous operations */ + if (*status > 0) + { + ffpmsg("Error writing compressed image to table"); + free(tiledata); + return (*status); + } + + row++; + } + } + } + } + } + } + + free (tiledata); /* finished with this buffer */ + + /* insert ZBLANK keyword if necessary */ + if (gotnulls) + { + ffgcrd(outfptr, "ZCMPTYPE", card, status); + ffikyj(outfptr, "ZBLANK", COMPRESS_NULL_VALUE, + "null value in the compressed integer array", status); + } + + if (datatype >= TFLOAT ) + { + /* check if any data were written to the UNCOMPRESSED_DATA column */ + /* If not, then delete that column from the table */ + for (ii = 1; ii < row; ii++) + { + ffgdes (outfptr, (outfptr->Fptr)->cn_uncompressed, ii, + &nelem, &offset, status); + if (nelem) + break; + } + + if (!nelem) + { + tstatus = 0; + ffgcno(outfptr, CASEINSEN, "UNCOMPRESSED_DATA", &colnum, &tstatus); + if (tstatus == 0) + { + /* make sure table is properly terminated before deleting col */ + /* (in particular, make sure the '1PB(nnn)' keyword is updated */ + ffrdef(outfptr, status); + ffdcol(outfptr, colnum, status); + } + } + } + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_compress_tile (fitsfile *outfptr, + long row, + int datatype, + void *tiledata, + long tilelen, + long tilenx, + long tileny, + int *status) + +/* + This is the main compression routine. + + This routine does the following to the input tile of pixels: + - if it is a float or double image, then it quantizes the pixels + - compresses the integer pixel values + - writes the compressed byte stream to the FITS file. + + If the tile cannot be quantized than the raw float or double values + are written to the output table. + + + The input tiledata array must only be of type TINT, TFLOAT, or TDOUBLE. + Shorter integer types will be type converted to TINT, under the assumption + that the input array was allocated with enough scratch space to do this + in place in memory. + + This array may be modified by this routine. If the array is of type TINT + or TFLOAT, and the compression type is HCOMPRESS, then it must have been + allocated to be twice as large (8 bytes per pixel) to provide scratch space. +*/ +{ + int *idata = 0; /* quantized integer data */ + short *cbuf; /* compressed data */ + short *sbuff; + unsigned short *usbuff; + int clen; /* size of cbuf */ + int flag = 1; /* true by default; only = 0 if float data couldn't be quantized */ + int iminval = 0, imaxval = 0; /* min and max quantized integers */ + double bscale[1] = {1.}, bzero[1] = {0.}; /* scaling parameters */ + int nelem = 0; /* number of bytes */ + size_t gzip_nelem = 0; + long ii, hcomp_len; + LONGLONG *lldata; + signed char *sbbuff; + unsigned char *usbbuff; + long *lbuff; + unsigned long *ulbuff; + int hcompscale; + + if (*status > 0) + return(*status); + + idata = (int *) tiledata; + hcompscale = (outfptr->Fptr)->hcomp_scale; + + /* convert input tile array in place to 4-byte ints for compression */ + /* Note that the calling routine must have allocated the array big enough */ + /* to be able to do this. */ + + if (datatype == TSHORT) + { + sbuff = (short *) tiledata; + for (ii = tilelen; ii >= 0; ii--) + idata[ii] = (int) sbuff[ii]; + } + else if (datatype == TUSHORT) + { + usbuff = (unsigned short *) tiledata; + for (ii = tilelen; ii >= 0; ii--) + idata[ii] = (int) usbuff[ii]; + } + else if (datatype == TBYTE) + { + usbbuff = (unsigned char *) tiledata; + for (ii = tilelen; ii >= 0; ii--) + idata[ii] = (int) usbbuff[ii]; + } + else if (datatype == TSBYTE) + { + sbbuff = (signed char *) tiledata; + for (ii = tilelen; ii >= 0; ii--) + idata[ii] = (int) sbbuff[ii]; + } + else if (datatype == TLONG && sizeof(long) == 8) + { + /* warning: potential for data overflow here */ + lbuff = (long *) tiledata; + for (ii = 0; ii < tilelen; ii++) + idata[ii] = (int) lbuff[ii]; + } + else if (datatype == TULONG && sizeof(long) == 8) + { + /* warning: potential for data overflow here */ + ulbuff = (unsigned long *) tiledata; + for (ii = 0; ii < tilelen; ii++) + idata[ii] = (int) ulbuff[ii]; + } + + else if (datatype == TFLOAT) + { + /* if the tile-compressed table contains zscale and zzero columns */ + /* then scale and quantize the input floating point data. */ + /* Otherwise, just truncate the floats to integers. */ + if ((outfptr->Fptr)->cn_zscale > 0) + { + /* quantize the float values into integers */ + flag = fits_quantize_float ((float *) tiledata, tilelen, + FLOATNULLVALUE, (outfptr->Fptr)->noise_nbits, idata, + bscale, bzero, &iminval, &imaxval); + + /* adjust the hcompress scale by the same scaling factor */ + if (hcompscale > 1) hcompscale = (int) (hcompscale / bscale[0]); + + } + else + { + for (ii = 0; ii < tilelen; ii++) + idata[ii] = (int) (((float *)tiledata)[ii]); + } + } + else if (datatype == TDOUBLE) + { + /* if the tile-compressed table contains zscale and zzero columns */ + /* then scale and quantize the input floating point data. */ + /* Otherwise, just truncate the floats to integers. */ + if ((outfptr->Fptr)->cn_zscale > 0) + { + /* quantize the double values into integers */ + flag = fits_quantize_double ((double *) tiledata, tilelen, + DOUBLENULLVALUE, (outfptr->Fptr)->noise_nbits, idata, + bscale, bzero, &iminval, &imaxval); + + /* adjust the hcompress scale by the same scaling factor */ + if (hcompscale > 1) hcompscale = (int) (hcompscale / bscale[0]); + + } + else + { + for (ii = 0; ii < tilelen; ii++) + idata[ii] = (int) (((double *)tiledata)[ii]); + } + } + else if (datatype != TINT && datatype != TUINT) + { + ffpmsg("unsupported datatype (imcomp_compress_tile)"); + return(*status = BAD_DATATYPE); + } + + if (flag) /* we can now compress the int array */ + { + /* allocate buffer for the compressed tile bytes */ + clen = (outfptr->Fptr)->maxelem; + cbuf = (short *) calloc (clen, sizeof (unsigned char)); + if (cbuf == NULL) + { + ffpmsg("Out of memory. (imcomp_compress_tile)"); + return (*status = MEMORY_ALLOCATION); + } + + /* Compress the integer data, then write the compressed bytes */ + if ( (outfptr->Fptr)->compress_type == RICE_1) + { + nelem = fits_rcomp (idata, tilelen, (unsigned char *) cbuf, + clen, (outfptr->Fptr)->rice_blocksize); + + /* Write the compressed byte stream. */ + ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, + nelem, (unsigned char *) cbuf, status); + } + else if ( (outfptr->Fptr)->compress_type == PLIO_1) + { + if (iminval < 0 || imaxval > 16777215) + { + /* plio algorithn only supports positive 24 bit ints */ + ffpmsg("data out of range for PLIO compression (0 - 2**24)"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + nelem = pl_p2li (idata, 1, cbuf, tilelen); + + /* Write the compressed byte stream. */ + ffpcli(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, + nelem, cbuf, status); + } + else if ( (outfptr->Fptr)->compress_type == GZIP_1) + { + +#if BYTESWAPPED + ffswap4(idata, tilelen); /* reverse order of bytes */ +#endif + compress2mem_from_mem((char *) idata, tilelen * sizeof(int), + (char **) &cbuf, (size_t *) &clen, realloc, + &gzip_nelem, status); + + /* Write the compressed byte stream. */ + ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, + gzip_nelem, (unsigned char *) cbuf, status); + } + else if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1) + { + hcomp_len = clen; /* allocated size of the buffer */ + + if ((outfptr->Fptr)->zbitpix == BYTE_IMG || + (outfptr->Fptr)->zbitpix == SHORT_IMG) { + + fits_hcompress(idata, tilenx, tileny, + hcompscale, (char *) cbuf, &hcomp_len, status); + + } else { + /* have to convert idata to an I*8 array, in place */ + /* idata must have been allocated large enough to do this */ + lldata = (LONGLONG *) idata; + + for (ii = tilelen; ii >= 0; ii--) { + lldata[ii] = idata[ii];; + } + + fits_hcompress64(lldata, tilenx, tileny, + hcompscale, (char *) cbuf, &hcomp_len, status); + } + + /* Write the compressed byte stream. */ + ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, + hcomp_len, (unsigned char *) cbuf, status); + } + + if (nelem < 0) /* error condition */ + { + free (cbuf); + ffpmsg + ("error compressing row of the image (imcomp_compress_tile)"); + return (*status = DATA_COMPRESSION_ERR); + } + + if ((outfptr->Fptr)->cn_zscale > 0) + { + /* write the linear scaling parameters */ + ffpcld (outfptr, (outfptr->Fptr)->cn_zscale, row, 1, 1, + bscale, status); + ffpcld (outfptr, (outfptr->Fptr)->cn_zzero, row, 1, 1, + bzero, status); + } + + free(cbuf); /* finished with this buffer */ + } + else /* floating point data couldn't be quantized */ + { + /* Write the original floating point data. */ + if (datatype == TFLOAT) + { + ffpcle (outfptr, (outfptr->Fptr)->cn_uncompressed, row, 1, + tilelen, (float *)tiledata, status); + } + else if (datatype == TDOUBLE) + { + ffpcld (outfptr, (outfptr->Fptr)->cn_uncompressed, row, 1, + tilelen, (double *)tiledata, status); + } + } + + return (*status); +} +/*---------------------------------------------------------------------------*/ +int fits_write_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the array to be written */ + long *infpixel, /* I - 'bottom left corner' of the subsection */ + long *inlpixel, /* I - 'top right corner' of the subsection */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: pixels that are = nullval will be */ + /* written with the FITS null pixel value */ + /* (floating point arrays only) */ + void *array, /* I - array of values to be written */ + void *nullval, /* I - undefined pixel value (floating pt only) */ + int *status) /* IO - error status */ +/* + Write a section of a compressed image. +*/ +{ + int naxis[MAX_COMPRESS_DIM], tiledim[MAX_COMPRESS_DIM]; + long tilesize[MAX_COMPRESS_DIM], thistilesize[MAX_COMPRESS_DIM]; + long ftile[MAX_COMPRESS_DIM], ltile[MAX_COMPRESS_DIM]; + long tfpixel[MAX_COMPRESS_DIM], tlpixel[MAX_COMPRESS_DIM]; + long rowdim[MAX_COMPRESS_DIM], offset[MAX_COMPRESS_DIM],ntemp; + long fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; + int ii, i5, i4, i3, i2, i1, i0, ndim, irow, pixlen, tilenul; + int anynull, tstatus, buffpixsiz; + long totpix; + void *buffer; + char *bnullarray = 0, card[FLEN_CARD]; + float floatnull = 0.; + double doublenull = 0.; + + if (*status > 0) + return(*status); + + if (!fits_is_compressed_image(fptr, status) ) + { + ffpmsg("CHDU is not a compressed image (fits_write_compressed_img)"); + return(*status = DATA_COMPRESSION_ERR); + } + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + /* get temporary space for uncompressing one image tile */ + /* Need at least 4-byte per pixel, and in some cases 8-bytes per pixel, */ + + buffpixsiz = 4; + if ( (fptr->Fptr)->compress_type == HCOMPRESS_1 && + ((fptr->Fptr)->zbitpix != BYTE_IMG && + (fptr->Fptr)->zbitpix != SHORT_IMG) ){ + + buffpixsiz = 8; + } + if (datatype == TDOUBLE) + buffpixsiz = 8; + + /* cast to double to force alignment on 8-byte addresses */ + buffer = (double *) calloc ((fptr->Fptr)->maxtilelen, buffpixsiz); + + if (datatype == TSHORT || datatype == TUSHORT) + { + pixlen = sizeof(short); + } + else if (datatype == TINT || datatype == TUINT) + { + pixlen = sizeof(int); + } + else if (datatype == TBYTE || datatype == TSBYTE) + { + pixlen = 1; + } + else if (datatype == TLONG || datatype == TULONG) + { + pixlen = sizeof(long); + } + else if (datatype == TFLOAT) + { + pixlen = sizeof(float); + } + else if (datatype == TDOUBLE) + { + pixlen = sizeof(double); + } + else + { + ffpmsg("unsupported datatype for compressing image"); + return(*status = BAD_DATATYPE); + } + + if (buffer == NULL) + { + ffpmsg("Out of memory (fits_write_compress_img)"); + return (*status = MEMORY_ALLOCATION); + } + + /* initialize all the arrays */ + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + naxis[ii] = 1; + tiledim[ii] = 1; + tilesize[ii] = 1; + ftile[ii] = 1; + ltile[ii] = 1; + rowdim[ii] = 1; + } + + ndim = (fptr->Fptr)->zndim; + ntemp = 1; + for (ii = 0; ii < ndim; ii++) + { + fpixel[ii] = infpixel[ii]; + lpixel[ii] = inlpixel[ii]; + + /* calc number of tiles in each dimension, and tile containing */ + /* the first and last pixel we want to read in each dimension */ + naxis[ii] = (fptr->Fptr)->znaxis[ii]; + if (fpixel[ii] < 1) + { + free(buffer); + return(*status = BAD_PIX_NUM); + } + + tilesize[ii] = (fptr->Fptr)->tilesize[ii]; + tiledim[ii] = (naxis[ii] - 1) / tilesize[ii] + 1; + ftile[ii] = (fpixel[ii] - 1) / tilesize[ii] + 1; + ltile[ii] = minvalue((lpixel[ii] - 1) / tilesize[ii] + 1, + tiledim[ii]); + rowdim[ii] = ntemp; /* total tiles in each dimension */ + ntemp *= tiledim[ii]; + } + + /* support up to 6 dimensions for now */ + /* tfpixel and tlpixel are the first and last image pixels */ + /* along each dimension of the compression tile */ + for (i5 = ftile[5]; i5 <= ltile[5]; i5++) + { + tfpixel[5] = (i5 - 1) * tilesize[5] + 1; + tlpixel[5] = minvalue(tfpixel[5] + tilesize[5] - 1, + naxis[5]); + thistilesize[5] = tlpixel[5] - tfpixel[5] + 1; + offset[5] = (i5 - 1) * rowdim[5]; + for (i4 = ftile[4]; i4 <= ltile[4]; i4++) + { + tfpixel[4] = (i4 - 1) * tilesize[4] + 1; + tlpixel[4] = minvalue(tfpixel[4] + tilesize[4] - 1, + naxis[4]); + thistilesize[4] = thistilesize[5] * (tlpixel[4] - tfpixel[4] + 1); + offset[4] = (i4 - 1) * rowdim[4] + offset[5]; + for (i3 = ftile[3]; i3 <= ltile[3]; i3++) + { + tfpixel[3] = (i3 - 1) * tilesize[3] + 1; + tlpixel[3] = minvalue(tfpixel[3] + tilesize[3] - 1, + naxis[3]); + thistilesize[3] = thistilesize[4] * (tlpixel[3] - tfpixel[3] + 1); + offset[3] = (i3 - 1) * rowdim[3] + offset[4]; + for (i2 = ftile[2]; i2 <= ltile[2]; i2++) + { + tfpixel[2] = (i2 - 1) * tilesize[2] + 1; + tlpixel[2] = minvalue(tfpixel[2] + tilesize[2] - 1, + naxis[2]); + thistilesize[2] = thistilesize[3] * (tlpixel[2] - tfpixel[2] + 1); + offset[2] = (i2 - 1) * rowdim[2] + offset[3]; + for (i1 = ftile[1]; i1 <= ltile[1]; i1++) + { + tfpixel[1] = (i1 - 1) * tilesize[1] + 1; + tlpixel[1] = minvalue(tfpixel[1] + tilesize[1] - 1, + naxis[1]); + thistilesize[1] = thistilesize[2] * (tlpixel[1] - tfpixel[1] + 1); + offset[1] = (i1 - 1) * rowdim[1] + offset[2]; + for (i0 = ftile[0]; i0 <= ltile[0]; i0++) + { + tfpixel[0] = (i0 - 1) * tilesize[0] + 1; + tlpixel[0] = minvalue(tfpixel[0] + tilesize[0] - 1, + naxis[0]); + thistilesize[0] = thistilesize[1] * (tlpixel[0] - tfpixel[0] + 1); + /* calculate row of table containing this tile */ + irow = i0 + offset[1]; + + /* read and uncompress this row (tile) of the table */ + /* also do type conversion and undefined pixel substitution */ + /* at this point */ + + imcomp_decompress_tile(fptr, irow, thistilesize[0], + datatype, nullcheck, nullval, buffer, bnullarray, &tilenul, + status); + + if (*status == NO_COMPRESSED_TILE) + { + /* tile doesn't exist, so initialize to zero */ + memset(buffer, 0, pixlen * thistilesize[0]); + *status = 0; + } + + /* copy the intersecting pixels to this tile from the input */ + imcomp_merge_overlap(buffer, pixlen, ndim, tfpixel, tlpixel, + bnullarray, array, fpixel, lpixel, nullcheck, status); + + + /* compress the tile again, and write it back to the FITS file */ + imcomp_compress_tile (fptr, irow, datatype, buffer, + thistilesize[0], + tlpixel[0] - tfpixel[0] + 1, + tlpixel[1] - tfpixel[1] + 1, + status); + + } + } + } + } + } + } + free(buffer); + + /* + if the input array has a floating point datatype, and if *nullval + is not equal to zero, and if there are any pixels in the array that + are equal to the value of *nullval, then we need to make sure that the + ZBLANK keyword is present in the compressed image header. If it is not + there then we need to insert the keyword. + */ + if (datatype >= TFLOAT && nullval != 0) { + /* OK, this is a floating point data type, with a null value */ + + if (datatype == TFLOAT) + floatnull = *((float *) nullval); + else if (datatype == TDOUBLE) + doublenull = *((double *) nullval); + if (floatnull != 0. || doublenull != 0.) { + /* OK, the null value is not = 0 */ + + /* calculate the size of the imput array */ + totpix = 1; + for (ii = 0; ii < ndim; ii++) { + totpix *= (inlpixel[ii] - infpixel[ii]); + } + + if (totpix <= 0) return(*status); + + anynull = 0; + if (datatype == TFLOAT) { + for (ii = 0; ii < totpix; ii++) { + if (((float *)array)[ii] == floatnull) { + anynull = 1; + break; + } + } + } else if (datatype == TDOUBLE) { + for (ii = 0; ii < totpix; ii++) { + if (((double *)array)[ii] == doublenull) { + anynull = 1; + break; + } + } + } + + if (anynull) { /* there are null values in the array */ + + tstatus = 0; + ffgcrd(fptr, "ZBLANK", card, &tstatus); + if (tstatus) { /* have to insert the ZBLANK keyword */ + + ffgcrd(fptr, "ZCMPTYPE", card, status); + ffikyj(fptr, "ZBLANK", COMPRESS_NULL_VALUE, + "null value in the compressed integer array", status); + } + + } /* there are null values in the array */ + } /* non-zero null value */ + } /* floating point data type */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_write_compressed_pixels(fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the array to be written */ + LONGLONG fpixel, /* I - 'first pixel to write */ + LONGLONG npixel, /* I - number of pixels to write */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: pixels that are = nullval will be */ + /* written with the FITS null pixel value */ + /* (floating point arrays only) */ + void *array, /* I - array of values to write */ + void *nullval, /* I - value used to represent undefined pixels*/ + int *status) /* IO - error status */ +/* + Write a consecutive set of pixels to a compressed image. This routine + interpretes the n-dimensional image as a long one-dimensional array. + This is actually a rather inconvenient way to write compressed images in + general, and could be rather inefficient if the requested pixels to be + written are located in many different image compression tiles. + + The general strategy used here is to write the requested pixels in blocks + that correspond to rectangular image sections. +*/ +{ + int naxis, ii, bytesperpixel; + long naxes[MAX_COMPRESS_DIM], nread; + LONGLONG tfirst, tlast, last0, last1, dimsize[MAX_COMPRESS_DIM]; + long nplane, firstcoord[MAX_COMPRESS_DIM], lastcoord[MAX_COMPRESS_DIM]; + char *arrayptr; + + if (*status > 0) + return(*status); + + arrayptr = (char *) array; + + /* get size of array pixels, in bytes */ + bytesperpixel = ffpxsz(datatype); + + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + naxes[ii] = 1; + firstcoord[ii] = 0; + lastcoord[ii] = 0; + } + + /* determine the dimensions of the image to be read */ + ffgidm(fptr, &naxis, status); + ffgisz(fptr, MAX_COMPRESS_DIM, naxes, status); + + /* calc the cumulative number of pixels in each successive dimension */ + dimsize[0] = 1; + for (ii = 1; ii < MAX_COMPRESS_DIM; ii++) + dimsize[ii] = dimsize[ii - 1] * naxes[ii - 1]; + + /* determine the coordinate of the first and last pixel in the image */ + /* Use zero based indexes here */ + tfirst = fpixel - 1; + tlast = tfirst + npixel - 1; + for (ii = naxis - 1; ii >= 0; ii--) + { + firstcoord[ii] = (long) (tfirst / dimsize[ii]); + lastcoord[ii] = (long) (tlast / dimsize[ii]); + tfirst = tfirst - firstcoord[ii] * dimsize[ii]; + tlast = tlast - lastcoord[ii] * dimsize[ii]; + } + + /* to simplify things, treat 1-D, 2-D, and 3-D images as separate cases */ + + if (naxis == 1) + { + /* Simple: just write the requested range of pixels */ + + firstcoord[0] = firstcoord[0] + 1; + lastcoord[0] = lastcoord[0] + 1; + fits_write_compressed_img(fptr, datatype, firstcoord, lastcoord, + nullcheck, array, nullval, status); + return(*status); + } + else if (naxis == 2) + { + nplane = 0; /* write 1st (and only) plane of the image */ + fits_write_compressed_img_plane(fptr, datatype, bytesperpixel, + nplane, firstcoord, lastcoord, naxes, nullcheck, + array, nullval, &nread, status); + } + else if (naxis == 3) + { + /* test for special case: writing an integral number of planes */ + if (firstcoord[0] == 0 && firstcoord[1] == 0 && + lastcoord[0] == naxes[0] - 1 && lastcoord[1] == naxes[1] - 1) + { + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + /* convert from zero base to 1 base */ + (firstcoord[ii])++; + (lastcoord[ii])++; + } + + /* we can write the contiguous block of pixels in one go */ + fits_write_compressed_img(fptr, datatype, firstcoord, lastcoord, + nullcheck, array, nullval, status); + return(*status); + } + + /* save last coordinate in temporary variables */ + last0 = lastcoord[0]; + last1 = lastcoord[1]; + + if (firstcoord[2] < lastcoord[2]) + { + /* we will write up to the last pixel in all but the last plane */ + lastcoord[0] = naxes[0] - 1; + lastcoord[1] = naxes[1] - 1; + } + + /* write one plane of the cube at a time, for simplicity */ + for (nplane = firstcoord[2]; nplane <= lastcoord[2]; nplane++) + { + if (nplane == lastcoord[2]) + { + lastcoord[0] = (long) last0; + lastcoord[1] = (long) last1; + } + + fits_write_compressed_img_plane(fptr, datatype, bytesperpixel, + nplane, firstcoord, lastcoord, naxes, nullcheck, + arrayptr, nullval, &nread, status); + + /* for all subsequent planes, we start with the first pixel */ + firstcoord[0] = 0; + firstcoord[1] = 0; + + /* increment pointers to next elements to be written */ + arrayptr = arrayptr + nread * bytesperpixel; + } + } + else + { + ffpmsg("only 1D, 2D, or 3D images are currently supported"); + return(*status = DATA_COMPRESSION_ERR); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_write_compressed_img_plane(fitsfile *fptr, /* I - FITS file */ + int datatype, /* I - datatype of the array to be written */ + int bytesperpixel, /* I - number of bytes per pixel in array */ + long nplane, /* I - which plane of the cube to write */ + long *firstcoord, /* I coordinate of first pixel to write */ + long *lastcoord, /* I coordinate of last pixel to write */ + long *naxes, /* I size of each image dimension */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: pixels that are = nullval will be */ + /* written with the FITS null pixel value */ + /* (floating point arrays only) */ + void *array, /* I - array of values that are written */ + void *nullval, /* I - value for undefined pixels */ + long *nread, /* O - total number of pixels written */ + int *status) /* IO - error status */ + + /* + in general we have to write the first partial row of the image, + followed by the middle complete rows, followed by the last + partial row of the image. If the first or last rows are complete, + then write them at the same time as all the middle rows. + */ +{ + /* bottom left coord. and top right coord. */ + long blc[MAX_COMPRESS_DIM], trc[MAX_COMPRESS_DIM]; + char *arrayptr; + + *nread = 0; + + arrayptr = (char *) array; + + blc[2] = nplane + 1; + trc[2] = nplane + 1; + + if (firstcoord[0] != 0) + { + /* have to read a partial first row */ + blc[0] = firstcoord[0] + 1; + blc[1] = firstcoord[1] + 1; + trc[1] = blc[1]; + if (lastcoord[1] == firstcoord[1]) + trc[0] = lastcoord[0] + 1; /* 1st and last pixels in same row */ + else + trc[0] = naxes[0]; /* read entire rest of the row */ + + fits_write_compressed_img(fptr, datatype, blc, trc, + nullcheck, arrayptr, nullval, status); + + *nread = *nread + trc[0] - blc[0] + 1; + + if (lastcoord[1] == firstcoord[1]) + { + return(*status); /* finished */ + } + + /* set starting coord to beginning of next line */ + firstcoord[0] = 0; + firstcoord[1] += 1; + arrayptr = arrayptr + (trc[0] - blc[0] + 1) * bytesperpixel; + } + + /* write contiguous complete rows of the image, if any */ + blc[0] = 1; + blc[1] = firstcoord[1] + 1; + trc[0] = naxes[0]; + + if (lastcoord[0] + 1 == naxes[0]) + { + /* can write the last complete row, too */ + trc[1] = lastcoord[1] + 1; + } + else + { + /* last row is incomplete; have to read it separately */ + trc[1] = lastcoord[1]; + } + + if (trc[1] >= blc[1]) /* must have at least one whole line to read */ + { + fits_write_compressed_img(fptr, datatype, blc, trc, + nullcheck, arrayptr, nullval, status); + + *nread = *nread + (trc[1] - blc[1] + 1) * naxes[0]; + + if (lastcoord[1] + 1 == trc[1]) + return(*status); /* finished */ + + /* increment pointers for the last partial row */ + arrayptr = arrayptr + (trc[1] - blc[1] + 1) * naxes[0] * bytesperpixel; + + } + + if (trc[1] == lastcoord[1] + 1) + return(*status); /* all done */ + + /* set starting and ending coord to last line */ + + trc[0] = lastcoord[0] + 1; + trc[1] = lastcoord[1] + 1; + blc[1] = trc[1]; + + fits_write_compressed_img(fptr, datatype, blc, trc, + nullcheck, arrayptr, nullval, status); + + *nread = *nread + trc[0] - blc[0] + 1; + + return(*status); +} + +/* ######################################################################## */ +/* ### Image Decompression Routines ### */ +/* ######################################################################## */ + +/*--------------------------------------------------------------------------*/ +int fits_img_decompress (fitsfile *infptr, /* image (bintable) to uncompress */ + fitsfile *outfptr, /* empty HDU for output uncompressed image */ + int *status) /* IO - error status */ + +/* + This routine decompresses the whole image and writes it to the output file. +*/ + +{ + double *data; + int ii, datatype = 0, byte_per_pix = 0, naxis, bitpix, numkeys; + int nullcheck, anynul, tstatus, nullprime = 0, hdupos, norec = 0; + LONGLONG fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; + long inc[MAX_COMPRESS_DIM], naxes[MAX_COMPRESS_DIM]; + long imgsize, memsize; + float *nulladdr, fnulval; + double dnulval; + char card[FLEN_CARD]; + + if (*status > 0) + return(*status); + + if (!fits_is_compressed_image(infptr, status) ) + { + ffpmsg("CHDU is not a compressed image (fits_img_decompress)"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + /* get information about the state of the output file; does it already */ + /* contain any keywords and HDUs? */ + fits_get_hdu_num(outfptr, &hdupos); /* Get the current output HDU position */ + fits_get_hdrspace(outfptr, &numkeys, 0, status); + + /* Was the input compressed HDU originally the primary array image? */ + tstatus = 0; + if (!fits_read_card(infptr, "ZSIMPLE", card, &tstatus)) { + /* yes, input HDU was a primary array (not an IMAGE extension) */ + /* Now determine if we can uncompress it into the primary array of */ + /* the output file. This is only possible if the output file */ + /* currently only contains a null primary array, with no addition */ + /* header keywords and with no following extension in the FITS file. */ + + if (hdupos == 1) { /* are we positioned at the primary array? */ + if (numkeys <= 10) { /* is the header practically empty? */ + if (numkeys == 0) { /* primary HDU is completely empty */ + + nullprime = 1; + + } else { + fits_get_img_param(outfptr, MAX_COMPRESS_DIM, &bitpix, &naxis, naxes, status); + + if (naxis == 0) /* is this a null image? */ + nullprime = 1; + + } + } + } + } + + if (nullprime) { + /* We will delete the existing keywords in the null primary array + and uncompress the input image into the primary array of the output */ + + for (ii = numkeys; ii > 0; ii--) + fits_delete_record(outfptr, ii, status); + + } else { + + /* if the ZTENSION keyword doesn't exist, then we have to + write the required keywords manually */ + tstatus = 0; + if (fits_read_card(infptr, "ZTENSION", card, &tstatus)) { + + /* create an empty output image with the correct dimensions */ + if (ffcrim(outfptr, (infptr->Fptr)->zbitpix, (infptr->Fptr)->zndim, + (infptr->Fptr)->znaxis, status) > 0) + { + ffpmsg("error creating output decompressed image HDU"); + return (*status); + } + + norec = 1; /* the required keywords have already been written */ + + } else { + + if (numkeys == 0) { /* the output file is currently completely empty */ + + /* In this case, the input is a compressed IMAGE extension. */ + /* Since the uncompressed output file is currently completely empty, */ + /* we need to write a null primary array before uncompressing the */ + /* image extension */ + + ffcrim(outfptr, 8, 0, naxes, status); /* naxes is not used */ + + /* now create the empty extension to uncompress into */ + if (fits_create_hdu(outfptr, status) > 0) + { + ffpmsg("error creating output decompressed image HDU"); + return (*status); + } + + } else { + /* just create a new empty extension, then copy all the required */ + /* keywords into it. */ + fits_create_hdu(outfptr, status); + } + } + + } + + if (*status > 0) { + ffpmsg("error creating output decompressed image HDU"); + return (*status); + } + + /* Copy the table header to the image header. */ + + if (imcomp_copy_comp2img(infptr, outfptr, norec, status) > 0) + { + ffpmsg("error copying header keywords from compressed image"); + return (*status); + } + + /* force a rescan of the output header keywords, then reset the scaling */ + /* in case the BSCALE and BZERO keywords are present, so that the */ + /* decompressed values won't be scaled when written to the output image */ + ffrdef(outfptr, status); + ffpscl(outfptr, 1.0, 0.0, status); + ffpscl(infptr, 1.0, 0.0, status); + + /* initialize; no null checking is needed for integer images */ + nullcheck = 0; + nulladdr = &fnulval; + + /* determine datatype for image */ + if ((infptr->Fptr)->zbitpix == BYTE_IMG) + { + datatype = TBYTE; + byte_per_pix = 1; + } + else if ((infptr->Fptr)->zbitpix == SHORT_IMG) + { + datatype = TSHORT; + byte_per_pix = sizeof(short); + } + else if ((infptr->Fptr)->zbitpix == LONG_IMG) + { + datatype = TINT; + byte_per_pix = sizeof(int); + } + else if ((infptr->Fptr)->zbitpix == FLOAT_IMG) + { + /* In the case of float images we must check for NaNs */ + nullcheck = 1; + fnulval = FLOATNULLVALUE; + nulladdr = &fnulval; + datatype = TFLOAT; + byte_per_pix = sizeof(float); + } + else if ((infptr->Fptr)->zbitpix == DOUBLE_IMG) + { + /* In the case of double images we must check for NaNs */ + nullcheck = 1; + dnulval = DOUBLENULLVALUE; + nulladdr = (float *) &dnulval; + datatype = TDOUBLE; + byte_per_pix = sizeof(double); + } + + /* calculate size of the image (in pixels) */ + imgsize = 1; + for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) + { + imgsize *= (infptr->Fptr)->znaxis[ii]; + fpixel[ii] = 1; /* Set first and last pixel to */ + lpixel[ii] = (infptr->Fptr)->znaxis[ii]; /* include the entire image. */ + inc[ii] = 1; + } + /* Calc equivalent number of double pixels same size as whole the image. */ + /* We use double datatype to force the memory to be aligned properly */ + memsize = ((imgsize * byte_per_pix) - 1) / sizeof(double) + 1; + + /* allocate memory for the image */ + data = (double*) calloc (memsize, sizeof(double)); + if (!data) + { + ffpmsg("Couldn't allocate memory for the uncompressed image"); + return(*status = MEMORY_ALLOCATION); + } + + /* uncompress the entire image into memory */ + /* This routine should be enhanced sometime to only need enough */ + /* memory to uncompress one tile at a time. */ + fits_read_compressed_img(infptr, datatype, fpixel, lpixel, inc, + nullcheck, nulladdr, data, NULL, &anynul, status); + + /* write the image to the output file */ + if (anynul) + fits_write_imgnull(outfptr, datatype, 1, imgsize, data, nulladdr, + status); + else + fits_write_img(outfptr, datatype, 1, imgsize, data, status); + + free(data); + return (*status); +} +/*--------------------------------------------------------------------------*/ +int fits_decompress_img (fitsfile *infptr, /* image (bintable) to uncompress */ + fitsfile *outfptr, /* empty HDU for output uncompressed image */ + int *status) /* IO - error status */ + +/* + This routine decompresses the whole image and writes it to the output file. +*/ + +{ + double *data; + int ii, datatype = 0, byte_per_pix = 0; + int nullcheck, anynul; + LONGLONG fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; + long inc[MAX_COMPRESS_DIM]; + long imgsize, memsize; + float *nulladdr, fnulval; + double dnulval; + + if (*status > 0) + return(*status); + + if (!fits_is_compressed_image(infptr, status) ) + { + ffpmsg("CHDU is not a compressed image (fits_decompress_img)"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + /* create an empty output image with the correct dimensions */ + if (ffcrim(outfptr, (infptr->Fptr)->zbitpix, (infptr->Fptr)->zndim, + (infptr->Fptr)->znaxis, status) > 0) + { + ffpmsg("error creating output decompressed image HDU"); + return (*status); + } + /* Copy the table header to the image header. */ + if (imcomp_copy_imheader(infptr, outfptr, status) > 0) + { + ffpmsg("error copying header of compressed image"); + return (*status); + } + + /* force a rescan of the output header keywords, then reset the scaling */ + /* in case the BSCALE and BZERO keywords are present, so that the */ + /* decompressed values won't be scaled when written to the output image */ + ffrdef(outfptr, status); + ffpscl(outfptr, 1.0, 0.0, status); + ffpscl(infptr, 1.0, 0.0, status); + + /* initialize; no null checking is needed for integer images */ + nullcheck = 0; + nulladdr = &fnulval; + + /* determine datatype for image */ + if ((infptr->Fptr)->zbitpix == BYTE_IMG) + { + datatype = TBYTE; + byte_per_pix = 1; + } + else if ((infptr->Fptr)->zbitpix == SHORT_IMG) + { + datatype = TSHORT; + byte_per_pix = sizeof(short); + } + else if ((infptr->Fptr)->zbitpix == LONG_IMG) + { + datatype = TINT; + byte_per_pix = sizeof(int); + } + else if ((infptr->Fptr)->zbitpix == FLOAT_IMG) + { + /* In the case of float images we must check for NaNs */ + nullcheck = 1; + fnulval = FLOATNULLVALUE; + nulladdr = &fnulval; + datatype = TFLOAT; + byte_per_pix = sizeof(float); + } + else if ((infptr->Fptr)->zbitpix == DOUBLE_IMG) + { + /* In the case of double images we must check for NaNs */ + nullcheck = 1; + dnulval = DOUBLENULLVALUE; + nulladdr = (float *) &dnulval; + datatype = TDOUBLE; + byte_per_pix = sizeof(double); + } + + /* calculate size of the image (in pixels) */ + imgsize = 1; + for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) + { + imgsize *= (infptr->Fptr)->znaxis[ii]; + fpixel[ii] = 1; /* Set first and last pixel to */ + lpixel[ii] = (infptr->Fptr)->znaxis[ii]; /* include the entire image. */ + inc[ii] = 1; + } + /* Calc equivalent number of double pixels same size as whole the image. */ + /* We use double datatype to force the memory to be aligned properly */ + memsize = ((imgsize * byte_per_pix) - 1) / sizeof(double) + 1; + + /* allocate memory for the image */ + data = (double*) calloc (memsize, sizeof(double)); + if (!data) + { + ffpmsg("Couldn't allocate memory for the uncompressed image"); + return(*status = MEMORY_ALLOCATION); + } + + /* uncompress the entire image into memory */ + /* This routine should be enhanced sometime to only need enough */ + /* memory to uncompress one tile at a time. */ + fits_read_compressed_img(infptr, datatype, fpixel, lpixel, inc, + nullcheck, nulladdr, data, NULL, &anynul, status); + + /* write the image to the output file */ + if (anynul) + fits_write_imgnull(outfptr, datatype, 1, imgsize, data, nulladdr, + status); + else + fits_write_img(outfptr, datatype, 1, imgsize, data, status); + + free(data); + return (*status); +} +/*---------------------------------------------------------------------------*/ +int fits_read_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the array to be returned */ + LONGLONG *infpixel, /* I - 'bottom left corner' of the subsection */ + LONGLONG *inlpixel, /* I - 'top right corner' of the subsection */ + long *ininc, /* I - increment to be applied in each dimension */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: set undefined pixels = nullval */ + /* 2: set nullarray=1 for undefined pixels */ + void *nullval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a section of a compressed image; Note: lpixel may be larger than the + size of the uncompressed image. Only the pixels within the image will be + returned. +*/ +{ + int naxis[MAX_COMPRESS_DIM], tiledim[MAX_COMPRESS_DIM]; + long tilesize[MAX_COMPRESS_DIM], thistilesize[MAX_COMPRESS_DIM]; + long ftile[MAX_COMPRESS_DIM], ltile[MAX_COMPRESS_DIM]; + long tfpixel[MAX_COMPRESS_DIM], tlpixel[MAX_COMPRESS_DIM]; + long rowdim[MAX_COMPRESS_DIM], offset[MAX_COMPRESS_DIM],ntemp; + long fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; + long inc[MAX_COMPRESS_DIM]; + int ii, i5, i4, i3, i2, i1, i0, ndim, irow, pixlen, tilenul; + void *buffer; + char *bnullarray = 0; + + if (*status > 0) + return(*status); + + if (!fits_is_compressed_image(fptr, status) ) + { + ffpmsg("CHDU is not a compressed image (fits_read_compressed_img)"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + /* get temporary space for uncompressing one image tile */ + if (datatype == TSHORT) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (short)); + pixlen = sizeof(short); + } + else if (datatype == TINT) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (int)); + pixlen = sizeof(int); + } + else if (datatype == TLONG) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (long)); + pixlen = sizeof(long); + } + else if (datatype == TFLOAT) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (float)); + pixlen = sizeof(float); + } + else if (datatype == TDOUBLE) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (double)); + pixlen = sizeof(double); + } + else if (datatype == TUSHORT) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (unsigned short)); + pixlen = sizeof(short); + } + else if (datatype == TUINT) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (unsigned int)); + pixlen = sizeof(int); + } + else if (datatype == TULONG) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (unsigned long)); + pixlen = sizeof(long); + } + else if (datatype == TBYTE || datatype == TSBYTE) + { + buffer = calloc ((fptr->Fptr)->maxtilelen, sizeof (char)); + pixlen = 1; + } + else + { + ffpmsg("unsupported datatype for uncompressing image"); + return(*status = BAD_DATATYPE); + } + + if (buffer == NULL) + { + ffpmsg("Out of memory (fits_read_compress_img)"); + return (*status = MEMORY_ALLOCATION); + } + /* allocate memory for a null flag array, if needed */ + if (nullcheck == 2) + { + bnullarray = calloc ((fptr->Fptr)->maxtilelen, sizeof (char)); + + if (bnullarray == NULL) + { + ffpmsg("Out of memory (fits_read_compress_img)"); + free(buffer); + return (*status = MEMORY_ALLOCATION); + } + } + + /* initialize all the arrays */ + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + naxis[ii] = 1; + tiledim[ii] = 1; + tilesize[ii] = 1; + ftile[ii] = 1; + ltile[ii] = 1; + rowdim[ii] = 1; + } + + ndim = (fptr->Fptr)->zndim; + ntemp = 1; + for (ii = 0; ii < ndim; ii++) + { + /* support for mirror-reversed image sections */ + if (infpixel[ii] <= inlpixel[ii]) + { + fpixel[ii] = (long) infpixel[ii]; + lpixel[ii] = (long) inlpixel[ii]; + inc[ii] = ininc[ii]; + } + else + { + fpixel[ii] = (long) inlpixel[ii]; + lpixel[ii] = (long) infpixel[ii]; + inc[ii] = -ininc[ii]; + } + + /* calc number of tiles in each dimension, and tile containing */ + /* the first and last pixel we want to read in each dimension */ + naxis[ii] = (fptr->Fptr)->znaxis[ii]; + if (fpixel[ii] < 1) + { + if (nullcheck == 2) + { + free(bnullarray); + } + free(buffer); + return(*status = BAD_PIX_NUM); + } + + tilesize[ii] = (fptr->Fptr)->tilesize[ii]; + tiledim[ii] = (naxis[ii] - 1) / tilesize[ii] + 1; + ftile[ii] = (fpixel[ii] - 1) / tilesize[ii] + 1; + ltile[ii] = minvalue((lpixel[ii] - 1) / tilesize[ii] + 1, + tiledim[ii]); + rowdim[ii] = ntemp; /* total tiles in each dimension */ + ntemp *= tiledim[ii]; + } + + if (anynul) + *anynul = 0; /* initialize */ + + /* support up to 6 dimensions for now */ + /* tfpixel and tlpixel are the first and last image pixels */ + /* along each dimension of the compression tile */ + for (i5 = ftile[5]; i5 <= ltile[5]; i5++) + { + tfpixel[5] = (i5 - 1) * tilesize[5] + 1; + tlpixel[5] = minvalue(tfpixel[5] + tilesize[5] - 1, + naxis[5]); + thistilesize[5] = tlpixel[5] - tfpixel[5] + 1; + offset[5] = (i5 - 1) * rowdim[5]; + for (i4 = ftile[4]; i4 <= ltile[4]; i4++) + { + tfpixel[4] = (i4 - 1) * tilesize[4] + 1; + tlpixel[4] = minvalue(tfpixel[4] + tilesize[4] - 1, + naxis[4]); + thistilesize[4] = thistilesize[5] * (tlpixel[4] - tfpixel[4] + 1); + offset[4] = (i4 - 1) * rowdim[4] + offset[5]; + for (i3 = ftile[3]; i3 <= ltile[3]; i3++) + { + tfpixel[3] = (i3 - 1) * tilesize[3] + 1; + tlpixel[3] = minvalue(tfpixel[3] + tilesize[3] - 1, + naxis[3]); + thistilesize[3] = thistilesize[4] * (tlpixel[3] - tfpixel[3] + 1); + offset[3] = (i3 - 1) * rowdim[3] + offset[4]; + for (i2 = ftile[2]; i2 <= ltile[2]; i2++) + { + tfpixel[2] = (i2 - 1) * tilesize[2] + 1; + tlpixel[2] = minvalue(tfpixel[2] + tilesize[2] - 1, + naxis[2]); + thistilesize[2] = thistilesize[3] * (tlpixel[2] - tfpixel[2] + 1); + offset[2] = (i2 - 1) * rowdim[2] + offset[3]; + for (i1 = ftile[1]; i1 <= ltile[1]; i1++) + { + tfpixel[1] = (i1 - 1) * tilesize[1] + 1; + tlpixel[1] = minvalue(tfpixel[1] + tilesize[1] - 1, + naxis[1]); + thistilesize[1] = thistilesize[2] * (tlpixel[1] - tfpixel[1] + 1); + offset[1] = (i1 - 1) * rowdim[1] + offset[2]; + for (i0 = ftile[0]; i0 <= ltile[0]; i0++) + { + tfpixel[0] = (i0 - 1) * tilesize[0] + 1; + tlpixel[0] = minvalue(tfpixel[0] + tilesize[0] - 1, + naxis[0]); + thistilesize[0] = thistilesize[1] * (tlpixel[0] - tfpixel[0] + 1); + /* calculate row of table containing this tile */ + irow = i0 + offset[1]; + +/* +printf("row %d, %d %d, %d %d, %d %d; %d\n", + irow, tfpixel[0],tlpixel[0],tfpixel[1],tlpixel[1],tfpixel[2],tlpixel[2], + thistilesize[0]); +*/ + /* read and uncompress this row (tile) of the table */ + /* also do type conversion and undefined pixel substitution */ + /* at this point */ + imcomp_decompress_tile(fptr, irow, thistilesize[0], + datatype, nullcheck, nullval, buffer, bnullarray, &tilenul, + status); + + if (tilenul && anynul) + *anynul = 1; /* there are null pixels */ +/* +printf(" pixlen=%d, ndim=%d, %d %d %d, %d %d %d, %d %d %d\n", + pixlen, ndim, fpixel[0],lpixel[0],inc[0],fpixel[1],lpixel[1],inc[1], + fpixel[2],lpixel[2],inc[2]); +*/ + /* copy the intersecting pixels from this tile to the output */ + imcomp_copy_overlap(buffer, pixlen, ndim, tfpixel, tlpixel, + bnullarray, array, fpixel, lpixel, inc, nullcheck, + nullarray, status); + } + } + } + } + } + } + if (nullcheck == 2) + { + free(bnullarray); + } + free(buffer); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_read_compressed_pixels(fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the array to be returned */ + LONGLONG fpixel, /* I - 'first pixel to read */ + LONGLONG npixel, /* I - number of pixels to read */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: set undefined pixels = nullval */ + /* 2: set nullarray=1 for undefined pixels */ + void *nullval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + int *status) /* IO - error status */ +/* + Read a consecutive set of pixels from a compressed image. This routine + interpretes the n-dimensional image as a long one-dimensional array. + This is actually a rather inconvenient way to read compressed images in + general, and could be rather inefficient if the requested pixels to be + read are located in many different image compression tiles. + + The general strategy used here is to read the requested pixels in blocks + that correspond to rectangular image sections. +*/ +{ + int naxis, ii, bytesperpixel, planenul; + long naxes[MAX_COMPRESS_DIM], nread; + long nplane, inc[MAX_COMPRESS_DIM]; + LONGLONG tfirst, tlast, last0, last1, dimsize[MAX_COMPRESS_DIM]; + LONGLONG firstcoord[MAX_COMPRESS_DIM], lastcoord[MAX_COMPRESS_DIM]; + char *arrayptr, *nullarrayptr; + + if (*status > 0) + return(*status); + + arrayptr = (char *) array; + nullarrayptr = nullarray; + + /* get size of array pixels, in bytes */ + bytesperpixel = ffpxsz(datatype); + + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + naxes[ii] = 1; + firstcoord[ii] = 0; + lastcoord[ii] = 0; + inc[ii] = 1; + } + + /* determine the dimensions of the image to be read */ + ffgidm(fptr, &naxis, status); + ffgisz(fptr, MAX_COMPRESS_DIM, naxes, status); + + /* calc the cumulative number of pixels in each successive dimension */ + dimsize[0] = 1; + for (ii = 1; ii < MAX_COMPRESS_DIM; ii++) + dimsize[ii] = dimsize[ii - 1] * naxes[ii - 1]; + + /* determine the coordinate of the first and last pixel in the image */ + /* Use zero based indexes here */ + tfirst = fpixel - 1; + tlast = tfirst + npixel - 1; + for (ii = naxis - 1; ii >= 0; ii--) + { + firstcoord[ii] = tfirst / dimsize[ii]; + lastcoord[ii] = tlast / dimsize[ii]; + tfirst = tfirst - firstcoord[ii] * dimsize[ii]; + tlast = tlast - lastcoord[ii] * dimsize[ii]; + } + + /* to simplify things, treat 1-D, 2-D, and 3-D images as separate cases */ + + if (naxis == 1) + { + /* Simple: just read the requested range of pixels */ + + firstcoord[0] = firstcoord[0] + 1; + lastcoord[0] = lastcoord[0] + 1; + fits_read_compressed_img(fptr, datatype, firstcoord, lastcoord, inc, + nullcheck, nullval, array, nullarray, anynul, status); + return(*status); + } + else if (naxis == 2) + { + nplane = 0; /* read 1st (and only) plane of the image */ + + fits_read_compressed_img_plane(fptr, datatype, bytesperpixel, + nplane, firstcoord, lastcoord, inc, naxes, nullcheck, nullval, + array, nullarray, anynul, &nread, status); + } + else if (naxis == 3) + { + /* test for special case: reading an integral number of planes */ + if (firstcoord[0] == 0 && firstcoord[1] == 0 && + lastcoord[0] == naxes[0] - 1 && lastcoord[1] == naxes[1] - 1) + { + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + /* convert from zero base to 1 base */ + (firstcoord[ii])++; + (lastcoord[ii])++; + } + + /* we can read the contiguous block of pixels in one go */ + fits_read_compressed_img(fptr, datatype, firstcoord, lastcoord, inc, + nullcheck, nullval, array, nullarray, anynul, status); + + return(*status); + } + + if (anynul) + *anynul = 0; /* initialize */ + + /* save last coordinate in temporary variables */ + last0 = lastcoord[0]; + last1 = lastcoord[1]; + + if (firstcoord[2] < lastcoord[2]) + { + /* we will read up to the last pixel in all but the last plane */ + lastcoord[0] = naxes[0] - 1; + lastcoord[1] = naxes[1] - 1; + } + + /* read one plane of the cube at a time, for simplicity */ + for (nplane = (long) firstcoord[2]; nplane <= lastcoord[2]; nplane++) + { + if (nplane == lastcoord[2]) + { + lastcoord[0] = last0; + lastcoord[1] = last1; + } + + fits_read_compressed_img_plane(fptr, datatype, bytesperpixel, + nplane, firstcoord, lastcoord, inc, naxes, nullcheck, nullval, + arrayptr, nullarrayptr, &planenul, &nread, status); + + if (planenul && anynul) + *anynul = 1; /* there are null pixels */ + + /* for all subsequent planes, we start with the first pixel */ + firstcoord[0] = 0; + firstcoord[1] = 0; + + /* increment pointers to next elements to be read */ + arrayptr = arrayptr + nread * bytesperpixel; + if (nullarrayptr && (nullcheck == 2) ) + nullarrayptr = nullarrayptr + nread; + } + } + else + { + ffpmsg("only 1D, 2D, or 3D images are currently supported"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_read_compressed_img_plane(fitsfile *fptr, /* I - FITS file */ + int datatype, /* I - datatype of the array to be returned */ + int bytesperpixel, /* I - number of bytes per pixel in array */ + long nplane, /* I - which plane of the cube to read */ + LONGLONG *firstcoord, /* coordinate of first pixel to read */ + LONGLONG *lastcoord, /* coordinate of last pixel to read */ + long *inc, /* increment of pixels to read */ + long *naxes, /* size of each image dimension */ + int nullcheck, /* I - 0 for no null checking */ + /* 1: set undefined pixels = nullval */ + /* 2: set nullarray=1 for undefined pixels */ + void *nullval, /* I - value for undefined pixels */ + void *array, /* O - array of values that are returned */ + char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ + int *anynul, /* O - set to 1 if any values are null; else 0 */ + long *nread, /* O - total number of pixels read and returned*/ + int *status) /* IO - error status */ + + /* + in general we have to read the first partial row of the image, + followed by the middle complete rows, followed by the last + partial row of the image. If the first or last rows are complete, + then read them at the same time as all the middle rows. + */ +{ + /* bottom left coord. and top right coord. */ + LONGLONG blc[MAX_COMPRESS_DIM], trc[MAX_COMPRESS_DIM]; + char *arrayptr, *nullarrayptr; + int tnull; + + if (anynul) + *anynul = 0; + + *nread = 0; + + arrayptr = (char *) array; + nullarrayptr = nullarray; + + blc[2] = nplane + 1; + trc[2] = nplane + 1; + + if (firstcoord[0] != 0) + { + /* have to read a partial first row */ + blc[0] = firstcoord[0] + 1; + blc[1] = firstcoord[1] + 1; + trc[1] = blc[1]; + if (lastcoord[1] == firstcoord[1]) + trc[0] = lastcoord[0] + 1; /* 1st and last pixels in same row */ + else + trc[0] = naxes[0]; /* read entire rest of the row */ + + fits_read_compressed_img(fptr, datatype, blc, trc, inc, + nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); + + *nread = *nread + (long) (trc[0] - blc[0] + 1); + + if (tnull && anynul) + *anynul = 1; /* there are null pixels */ + + if (lastcoord[1] == firstcoord[1]) + { + return(*status); /* finished */ + } + + /* set starting coord to beginning of next line */ + firstcoord[0] = 0; + firstcoord[1] += 1; + arrayptr = arrayptr + (trc[0] - blc[0] + 1) * bytesperpixel; + if (nullarrayptr && (nullcheck == 2) ) + nullarrayptr = nullarrayptr + (trc[0] - blc[0] + 1); + + } + + /* read contiguous complete rows of the image, if any */ + blc[0] = 1; + blc[1] = firstcoord[1] + 1; + trc[0] = naxes[0]; + + if (lastcoord[0] + 1 == naxes[0]) + { + /* can read the last complete row, too */ + trc[1] = lastcoord[1] + 1; + } + else + { + /* last row is incomplete; have to read it separately */ + trc[1] = lastcoord[1]; + } + + if (trc[1] >= blc[1]) /* must have at least one whole line to read */ + { + fits_read_compressed_img(fptr, datatype, blc, trc, inc, + nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); + + *nread = *nread + (long) ((trc[1] - blc[1] + 1) * naxes[0]); + + if (tnull && anynul) + *anynul = 1; + + if (lastcoord[1] + 1 == trc[1]) + return(*status); /* finished */ + + /* increment pointers for the last partial row */ + arrayptr = arrayptr + (trc[1] - blc[1] + 1) * naxes[0] * bytesperpixel; + if (nullarrayptr && (nullcheck == 2) ) + nullarrayptr = nullarrayptr + (trc[1] - blc[1] + 1) * naxes[0]; + } + + if (trc[1] == lastcoord[1] + 1) + return(*status); /* all done */ + + /* set starting and ending coord to last line */ + + trc[0] = lastcoord[0] + 1; + trc[1] = lastcoord[1] + 1; + blc[1] = trc[1]; + + fits_read_compressed_img(fptr, datatype, blc, trc, inc, + nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); + + if (tnull && anynul) + *anynul = 1; + + *nread = *nread + (long) (trc[0] - blc[0] + 1); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_get_compressed_image_par(fitsfile *infptr, int *status) + +/* + This routine reads keywords from a BINTABLE extension containing a + compressed image. +*/ +{ + char keyword[FLEN_KEYWORD]; + char value[FLEN_VALUE]; + int ii, tstatus; + long expect_nrows, maxtilelen; + + if (*status > 0) + return(*status); + + /* Copy relevant header keyword values to structure */ + if (ffgky (infptr, TSTRING, "ZCMPTYPE", value, NULL, status) > 0) + { + ffpmsg("required ZCMPTYPE compression keyword not found in"); + ffpmsg(" imcomp_get_compressed_image_par"); + return(*status); + } + + (infptr->Fptr)->zcmptype[0] = '\0'; + strncat((infptr->Fptr)->zcmptype, value, 11); + + if (!FSTRCMP(value, "RICE_1") ) + (infptr->Fptr)->compress_type = RICE_1; + else if (!FSTRCMP(value, "HCOMPRESS_1") ) + (infptr->Fptr)->compress_type = HCOMPRESS_1; + else if (!FSTRCMP(value, "GZIP_1") ) + (infptr->Fptr)->compress_type = GZIP_1; + else if (!FSTRCMP(value, "PLIO_1") ) + (infptr->Fptr)->compress_type = PLIO_1; + else + { + ffpmsg("Unknown image compression type:"); + ffpmsg(value); + return (*status = DATA_DECOMPRESSION_ERR); + } + + if (ffgky (infptr, TINT, "ZBITPIX", &(infptr->Fptr)->zbitpix, + NULL, status) > 0) + { + ffpmsg("required ZBITPIX compression keyword not found"); + return(*status); + } + + if (ffgky (infptr,TINT, "ZNAXIS", &(infptr->Fptr)->zndim, NULL, status) > 0) + { + ffpmsg("required ZNAXIS compression keyword not found"); + return(*status); + } + + if ((infptr->Fptr)->zndim < 1) + { + ffpmsg("Compressed image has no data (ZNAXIS < 1)"); + return (*status = BAD_NAXIS); + } + + if ((infptr->Fptr)->zndim > MAX_COMPRESS_DIM) + { + ffpmsg("Compressed image has too many dimensions"); + return(*status = BAD_NAXIS); + } + + expect_nrows = 1; + maxtilelen = 1; + for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) + { + /* get image size */ + sprintf (keyword, "ZNAXIS%d", ii+1); + ffgky (infptr, TLONG,keyword, &(infptr->Fptr)->znaxis[ii],NULL,status); + + if (*status > 0) + { + ffpmsg("required ZNAXISn compression keyword not found"); + return(*status); + } + + /* get compression tile size */ + sprintf (keyword, "ZTILE%d", ii+1); + + /* set default tile size in case keywords are not present */ + if (ii == 0) + (infptr->Fptr)->tilesize[0] = (infptr->Fptr)->znaxis[0]; + else + (infptr->Fptr)->tilesize[ii] = 1; + + tstatus = 0; + ffgky (infptr, TLONG, keyword, &(infptr->Fptr)->tilesize[ii], NULL, + &tstatus); + + expect_nrows *= (((infptr->Fptr)->znaxis[ii] - 1) / + (infptr->Fptr)->tilesize[ii]+ 1); + maxtilelen *= (infptr->Fptr)->tilesize[ii]; + } + + /* check number of rows */ + if (expect_nrows != (infptr->Fptr)->numrows) + { + ffpmsg( + "number of table rows != the number of tiles in compressed image"); + return (*status = DATA_DECOMPRESSION_ERR); + } + + /* read any algorithm specific parameters */ + if ((infptr->Fptr)->compress_type == RICE_1 ) + { + if (ffgky(infptr, TINT,"ZVAL1", &(infptr->Fptr)->rice_blocksize, + NULL, status) > 0) + { + ffpmsg("required ZVAL1 compression keyword not found"); + return(*status); + } + + if ((infptr->Fptr)->zbitpix < 0) + { + /* try to read the floating point quantization parameter */ + tstatus = 0; + ffgky(infptr, TINT,"ZVAL2", &(infptr->Fptr)->noise_nbits, + NULL, &tstatus); + } + } + else if ((infptr->Fptr)->compress_type == HCOMPRESS_1 ) + { + if (ffgky(infptr, TINT,"ZVAL1", &(infptr->Fptr)->hcomp_scale, + NULL, status) > 0) + { + ffpmsg("required ZVAL1 compression keyword not found"); + return(*status); + } + + tstatus = 0; + ffgky(infptr, TINT,"ZVAL2", &(infptr->Fptr)->hcomp_smooth, + NULL, &tstatus); + + if ((infptr->Fptr)->zbitpix < 0) + { + /* try to read the floating point quantization parameter */ + tstatus = 0; + ffgky(infptr, TINT,"ZVAL3", &(infptr->Fptr)->noise_nbits, + NULL, &tstatus); + } + } + else + { + if ((infptr->Fptr)->zbitpix < 0) + { + /* try to read the floating point quantization parameter */ + tstatus = 0; + ffgky(infptr, TINT,"ZVAL1", &(infptr->Fptr)->noise_nbits, + NULL, &tstatus); + } + } + + /* store number of pixels in each compression tile, */ + /* and max size of the compressed tile buffer */ + (infptr->Fptr)->maxtilelen = maxtilelen; + + (infptr->Fptr)->maxelem = + imcomp_calc_max_elem ((infptr->Fptr)->compress_type, maxtilelen, + (infptr->Fptr)->zbitpix, (infptr->Fptr)->rice_blocksize); + + /* Get Column numbers. */ + if (ffgcno(infptr, CASEINSEN, "COMPRESSED_DATA", + &(infptr->Fptr)->cn_compressed, status) > 0) + { + ffpmsg("couldn't find COMPRESSED_DATA column (fits_get_compressed_img_par)"); + return(*status = DATA_DECOMPRESSION_ERR); + } + + ffpmrk(); /* put mark on message stack; erase any messages after this */ + + tstatus = 0; + ffgcno(infptr,CASEINSEN, "UNCOMPRESSED_DATA", + &(infptr->Fptr)->cn_uncompressed, &tstatus); + + tstatus = 0; + if (ffgcno(infptr, CASEINSEN, "ZSCALE", &(infptr->Fptr)->cn_zscale, + &tstatus) > 0) + { + /* CMPSCALE column doesn't exist; see if there is a keyword */ + tstatus = 0; + if (ffgky(infptr, TDOUBLE, "ZSCALE", &(infptr->Fptr)->zscale, NULL, + &tstatus) <= 0) + (infptr->Fptr)->cn_zscale = -1; /* flag for a constant ZSCALE */ + } + + tstatus = 0; + if (ffgcno(infptr, CASEINSEN, "ZZERO", &(infptr->Fptr)->cn_zzero, + &tstatus) > 0) + { + /* CMPZERO column doesn't exist; see if there is a keyword */ + tstatus = 0; + if (ffgky(infptr, TDOUBLE, "ZZERO", &(infptr->Fptr)->zzero, NULL, + &tstatus) <= 0) + (infptr->Fptr)->cn_zzero = -1; /* flag for a constant ZZERO */ + } + + tstatus = 0; + if (ffgcno(infptr, CASEINSEN, "ZBLANK", &(infptr->Fptr)->cn_zblank, + &tstatus) > 0) + { + /* CMPZERO column doesn't exist; see if there is a keyword */ + tstatus = 0; + if (ffgky(infptr, TINT, "ZBLANK", &(infptr->Fptr)->zblank, NULL, + &tstatus) <= 0) + (infptr->Fptr)->cn_zblank = -1; /* flag for a constant ZBLANK */ + } + + /* read the conventional BSCALE and BZERO scaling keywords, if present */ + tstatus = 0; + if (ffgky (infptr, TDOUBLE, "BSCALE", &(infptr->Fptr)->cn_bscale, + NULL, &tstatus) > 0) + { + (infptr->Fptr)->cn_bscale = 1.0; + } + + tstatus = 0; + if (ffgky (infptr, TDOUBLE, "BZERO", &(infptr->Fptr)->cn_bzero, + NULL, &tstatus) > 0) + { + (infptr->Fptr)->cn_bzero = 0.0; + } + + ffcmrk(); /* clear any spurious error messages, back to the mark */ + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr, int *status) +/* + This routine reads the header keywords from the input image and + copies them to the output image; the manditory structural keywords + and the checksum keywords are not copied. If the DATE keyword is copied, + then it is updated with the current date and time. +*/ +{ + int nkeys, ii, keyclass; + char card[FLEN_CARD]; /* a header record */ + + if (*status > 0) + return(*status); + + ffghsp(infptr, &nkeys, NULL, status); /* get number of keywords in image */ + + for (ii = 5; ii <= nkeys; ii++) /* skip the first 4 keywords */ + { + ffgrec(infptr, ii, card, status); + + keyclass = ffgkcl(card); /* Get the type/class of keyword */ + + /* don't copy structural keywords or checksum keywords */ + if ((keyclass <= TYP_CMPRS_KEY) || (keyclass == TYP_CKSUM_KEY)) + continue; + + if (FSTRNCMP(card, "DATE ", 5) == 0) /* write current date */ + { + ffpdat(outfptr, status); + } + else if (FSTRNCMP(card, "EXTNAME ", 8) == 0) + { + /* don't copy default EXTNAME keyword from a compressed image */ + if (FSTRNCMP(card, "EXTNAME = 'COMPRESSED_IMAGE'", 28)) + { + /* if EXTNAME keyword already exists, overwrite it */ + /* otherwise append a new EXTNAME keyword */ + ffucrd(outfptr, "EXTNAME", card, status); + } + } + else + { + /* just copy the keyword to the output header */ + ffprec (outfptr, card, status); + } + + if (*status > 0) + return (*status); + } + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_copy_img2comp(fitsfile *infptr, fitsfile *outfptr, int *status) +/* + This routine copies the header keywords from the uncompressed input image + and to the compressed image (in a binary table) +*/ +{ + char card[FLEN_CARD]; /* a header record */ + + /* tile compressed image keyword translation table */ + /* INPUT OUTPUT */ + /* 01234567 01234567 */ + char *patterns[][2] = {{"SIMPLE", "ZSIMPLE" }, + {"XTENSION", "ZTENSION" }, + {"BITPIX", "ZBITPIX" }, + {"NAXIS", "ZNAXIS" }, + {"NAXISm", "ZNAXISm" }, + {"EXTEND", "ZEXTEND" }, + {"BLOCKED", "ZBLOCKED"}, + {"PCOUNT", "ZPCOUNT" }, + {"GCOUNT", "ZGCOUNT" }, + + {"CHECKSUM","ZHECKSUM"}, /* save original checksums */ + {"DATASUM", "ZDATASUM"}, + + {"*", "+" }}; /* copy all other keywords */ + int npat; + + if (*status > 0) + return(*status); + + /* write a default EXTNAME keyword if it doesn't exist in input file*/ + fits_read_card(infptr, "EXTNAME", card, status); + + if (*status) { + *status = 0; + strcpy(card, "EXTNAME = 'COMPRESSED_IMAGE'"); + fits_write_record(outfptr, card, status); + } + + /* copy all the keywords from the input file to the output */ + npat = sizeof(patterns)/sizeof(patterns[0][0])/2; + fits_translate_keywords(infptr, outfptr, 1, patterns, npat, + 0, 0, 0, status); + + if (*status > 0) + return (*status); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_copy_comp2img(fitsfile *infptr, fitsfile *outfptr, + int norec, int *status) +/* + This routine copies the header keywords from the compressed input image + and to the uncompressed image (in a binary table) +*/ +{ + char card[FLEN_CARD]; /* a header record */ + char *patterns[40][2]; + char negative[] = "-"; + int ii, npat, nreq, nsp; + + /* tile compressed image keyword translation table */ + /* INPUT OUTPUT */ + /* 01234567 01234567 */ + + /* only translate these if required keywords not already written */ + char *reqkeys[][2] = { + {"ZSIMPLE", "SIMPLE" }, + {"ZTENSION", "XTENSION"}, + {"ZBITPIX", "BITPIX" }, + {"ZNAXIS", "NAXIS" }, + {"ZNAXISm", "NAXISm" }, + {"ZEXTEND", "EXTEND" }, + {"ZBLOCKED", "BLOCKED"}, + {"ZPCOUNT", "PCOUNT" }, + {"ZGCOUNT", "GCOUNT" }, + {"ZHECKSUM", "CHECKSUM"}, /* restore original checksums */ + {"ZDATASUM", "DATASUM"}}; + + /* other special keywords */ + char *spkeys[][2] = { + {"XTENSION", "-" }, + {"BITPIX", "-" }, + {"NAXIS", "-" }, + {"NAXISm", "-" }, + {"PCOUNT", "-" }, + {"GCOUNT", "-" }, + {"TFIELDS", "-" }, + {"TTYPEm", "-" }, + {"TFORMm", "-" }, + {"ZIMAGE", "-" }, + {"ZTILEm", "-" }, + {"ZCMPTYPE", "-" }, + {"ZNAMEm", "-" }, + {"ZVALm", "-" }, + + {"CHECKSUM","-" }, /* delete checksums */ + {"DATASUM", "-" }, + {"EXTNAME", "+" }, /* we may change this, below */ + {"*", "+" }}; + + + if (*status > 0) + return(*status); + + nreq = sizeof(reqkeys)/sizeof(reqkeys[0][0])/2; + nsp = sizeof(spkeys)/sizeof(spkeys[0][0])/2; + + /* construct translation patterns */ + + for (ii = 0; ii < nreq; ii++) { + patterns[ii][0] = reqkeys[ii][0]; + + if (norec) + patterns[ii][1] = negative; + else + patterns[ii][1] = reqkeys[ii][1]; + } + + for (ii = 0; ii < nsp; ii++) { + patterns[ii+nreq][0] = spkeys[ii][0]; + patterns[ii+nreq][1] = spkeys[ii][1]; + } + + npat = nreq + nsp; + + /* see if the EXTNAME keyword should be copied or not */ + fits_read_card(infptr, "EXTNAME", card, status); + + if (!strncmp(card, "EXTNAME = 'COMPRESSED_IMAGE'", 28)) + patterns[npat-2][1] = negative; + + /* translate and copy the keywords from the input file to the output */ + fits_translate_keywords(infptr, outfptr, 1, patterns, npat, + 0, 0, 0, status); + + if (*status > 0) + return (*status); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_decompress_tile (fitsfile *infptr, + int nrow, /* I - row of table to read and uncompress */ + int tilelen, /* I - number of pixels in the tile */ + int datatype, /* I - datatype to be returned in 'buffer' */ + int nullcheck, /* I - 0 for no null checking */ + void *nulval, /* I - value to be used for undefined pixels */ + void *buffer, /* O - buffer for returned decompressed values */ + char *bnullarray, /* O - buffer for returned null flags */ + int *anynul, /* O - any null values returned? */ + int *status) + +/* This routine decompresses one tile of the image */ +{ + int *idata = 0; /* uncompressed integer data */ + LONGLONG *lldata; + size_t idatalen, tilebytesize; + int ii, tnull; /* value in the data which represents nulls */ + unsigned char *cbuf = 0; /* compressed data */ + unsigned char charnull = 0; + short *sbuf = 0; + short snull = 0; + int blocksize; + double bscale, bzero, dummy = 0; /* scaling parameters */ + long nelem = 0, offset = 0; /* number of bytes */ + int smooth, nx, ny, scale; /* hcompress parameters */ + + if (*status > 0) + return(*status); + + /* get length of the compressed byte stream */ + ffgdes (infptr, (infptr->Fptr)->cn_compressed, nrow, &nelem, &offset, + status); + + /* EOF error here indicates that this tile has not yet been written */ + if (*status == END_OF_FILE) + return(*status = NO_COMPRESSED_TILE); + + /* **************************************************************** */ + if (nelem == 0) /* tile was not compressed; read uncompressed data */ + { + if ((infptr->Fptr)->cn_uncompressed < 1 ) + { + return (*status = NO_COMPRESSED_TILE); + } + + /* no compressed data, so simply read the uncompressed data */ + /* directly from the UNCOMPRESSED_DATA column, then return */ + ffgdes (infptr, (infptr->Fptr)->cn_uncompressed, nrow, &nelem, + &offset, status); + + if (nelem == 0 && offset == 0) + return (*status = NO_COMPRESSED_TILE); + + if (nullcheck <= 1) + fits_read_col(infptr, datatype, (infptr->Fptr)->cn_uncompressed, + nrow, 1, nelem, nulval, buffer, anynul, status); + else + fits_read_colnull(infptr, datatype, (infptr->Fptr)->cn_uncompressed, + nrow, 1, nelem, buffer, bnullarray, anynul, status); + + return(*status); + } + + /* **************************************************************** */ + + if (nullcheck == 2) + { + for (ii = 0; ii < tilelen; ii++) /* initialize the null array */ + bnullarray[ii] = 0; + } + + if (anynul) + *anynul = 0; + + /* get linear scaling and offset values, if they exist */ + if ((infptr->Fptr)->cn_zscale == 0) + { + /* set default scaling, if scaling is not defined */ + bscale = 1.; + bzero = 0.; + } + else if ((infptr->Fptr)->cn_zscale == -1) + { + bscale = (infptr->Fptr)->zscale; + bzero = (infptr->Fptr)->zzero; + } + else + { + /* read the linear scale and offset values for this row */ + ffgcvd (infptr, (infptr->Fptr)->cn_zscale, nrow, 1, 1, 0., + &bscale, NULL, status); + ffgcvd (infptr, (infptr->Fptr)->cn_zzero, nrow, 1, 1, 0., + &bzero, NULL, status); + if (*status > 0) + { + ffpmsg("error reading scaling factor and offset for compressed tile"); + free(idata); + free (cbuf); + return (*status); + } + } + + if (bscale == 1.0 && bzero == 0.0 ) + { + /* if no other scaling has been specified, try using the values + given by the BSCALE and BZERO keywords, if any */ + + bscale = (infptr->Fptr)->cn_bscale; + bzero = (infptr->Fptr)->cn_bzero; + } + + /* ************************************************************* */ + + /* get the value used to represent nulls in the int array */ + if ((infptr->Fptr)->cn_zblank == 0) + { + nullcheck = 0; /* no null value; don't check for nulls */ + } + else if ((infptr->Fptr)->cn_zblank == -1) + { + tnull = (infptr->Fptr)->zblank; /* use the the ZBLANK keyword */ + } + else + { + /* read the null value for this row */ + ffgcvk (infptr, (infptr->Fptr)->cn_zblank, nrow, 1, 1, 0, + &tnull, NULL, status); + if (*status > 0) + { + ffpmsg("error reading null value for compressed tile"); + free(idata); + free (cbuf); + return (*status); + } + } + + /* ************************************************************* */ + + /* allocate memory for uncompressed integers */ + + if ((infptr->Fptr)->compress_type == HCOMPRESS_1 && + ((infptr->Fptr)->zbitpix != BYTE_IMG && + (infptr->Fptr)->zbitpix != SHORT_IMG) ) { + + /* must allocate 8 bytes per pixel of scratch space */ + lldata = (LONGLONG*) calloc (tilelen, sizeof (LONGLONG)); + idata = (int *) lldata; + + } else { + + idata = (int*) calloc (tilelen, sizeof (int)); + } + + if (idata == NULL) + { + ffpmsg("Out of memory for idata. (imcomp_decompress_tile)"); + return (*status = MEMORY_ALLOCATION); + } + + /* ************************************************************* */ + + if ((infptr->Fptr)->compress_type == RICE_1) + { + cbuf = (unsigned char *) calloc (nelem, sizeof (unsigned char)); + if (cbuf == NULL) + { + ffpmsg("Out of memory for cbuf. (imcomp_decompress_tile)"); + free(idata); + return (*status = MEMORY_ALLOCATION); + } + + /* read array of compressed bytes */ + if (fits_read_col(infptr, TBYTE, (infptr->Fptr)->cn_compressed, nrow, + 1, nelem, &charnull, cbuf, NULL, status) > 0) + { + ffpmsg("error reading compressed byte stream from binary table"); + free (cbuf); + free(idata); + return (*status); + } + + /* uncompress the data */ + blocksize = (infptr->Fptr)->rice_blocksize; + if ((*status = fits_rdecomp (cbuf, nelem, (unsigned int *)idata, + tilelen, blocksize))) + { + free (cbuf); + free(idata); + return (*status); + } + + free(cbuf); + } + + /* ************************************************************* */ + + else if ((infptr->Fptr)->compress_type == HCOMPRESS_1) + { + cbuf = (unsigned char *) calloc (nelem, sizeof (unsigned char)); + if (cbuf == NULL) + { + ffpmsg("Out of memory for cbuf. (imcomp_decompress_tile)"); + free(idata); + return (*status = MEMORY_ALLOCATION); + } + + /* read array of compressed bytes */ + if (fits_read_col(infptr, TBYTE, (infptr->Fptr)->cn_compressed, nrow, + 1, nelem, &charnull, cbuf, NULL, status) > 0) + { + ffpmsg("error reading compressed byte stream from binary table"); + free (cbuf); + free(idata); + return (*status); + } + + /* uncompress the data */ + smooth = (infptr->Fptr)->hcomp_smooth; + + if ( ((infptr->Fptr)->zbitpix == BYTE_IMG || + (infptr->Fptr)->zbitpix == SHORT_IMG) ) { + + if ((*status = fits_hdecompress(cbuf, smooth, idata, &nx, &ny, + &scale, status))) + { + free (cbuf); + free(idata); + return (*status); + } + + } else { + + /* idata must have been allocated twice as large for this to work */ + if ((*status = fits_hdecompress64(cbuf, smooth, lldata, &nx, &ny, + &scale, status))) + { + free (cbuf); + free(idata); + return (*status); + } + } + + free(cbuf); + } + + /* ************************************************************* */ + + else if ((infptr->Fptr)->compress_type == PLIO_1) + { + sbuf = (short *) calloc (nelem, sizeof (short)); + if (sbuf == NULL) + { + ffpmsg("Out of memory for sbuf. (imcomp_decompress_tile)"); + free(idata); + return (*status = MEMORY_ALLOCATION); + } + + /* read array of compressed bytes */ + if (fits_read_col(infptr, TSHORT, (infptr->Fptr)->cn_compressed, nrow, + 1, nelem, &snull, sbuf, NULL, status) > 0) + { + ffpmsg("error reading compressed byte stream from binary table"); + free(idata); + free (sbuf); + return (*status); + } + + pl_l2pi (sbuf, 1, idata, tilelen); /* uncompress the data */ + free(sbuf); + } + + /* ************************************************************* */ + + else if ((infptr->Fptr)->compress_type == GZIP_1) + { + cbuf = (unsigned char *) calloc (nelem, sizeof (unsigned char)); + if (cbuf == NULL) + { + ffpmsg("Out of memory for cbuf. (imcomp_decompress_tile)"); + free(idata); + return (*status = MEMORY_ALLOCATION); + } + + /* read array of compressed bytes */ + if (fits_read_col(infptr, TBYTE, (infptr->Fptr)->cn_compressed, nrow, + 1, nelem, &charnull, cbuf, NULL, status) > 0) + { + ffpmsg("error reading compressed byte stream from binary table"); + free(idata); + free (cbuf); + return (*status); + } + + /* uncompress the data */ + idatalen = tilelen * sizeof(int); + if (uncompress2mem_from_mem ((char *)cbuf, nelem, + (char **) &idata, &idatalen, realloc, &tilebytesize, status)) + { + ffpmsg("uncompress2mem_from_mem returned with an error"); + free(idata); + free (cbuf); + return (*status); + } + +#if BYTESWAPPED + ffswap4(idata, tilelen); /* reverse order of bytes */ +#endif + + if (idatalen != tilebytesize) + { + ffpmsg("error: uncompressed tile has wrong size"); + free(idata); + free (cbuf); + return (*status = DATA_DECOMPRESSION_ERR); + } + + free(cbuf); + } + + /* ************************************************************* */ + else + { + ffpmsg("unknown compression algorithm"); + free(idata); + return (*status = DATA_DECOMPRESSION_ERR); + } + + /* ************************************************************* */ + /* copy the uncompressed tile data to the output buffer, doing */ + /* null checking, datatype conversion and linear scaling, if necessary */ + + + if (nulval == 0) + nulval = &dummy; /* set address to dummy value */ + + if (datatype == TSHORT) + { + fffi4i2(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(short *) nulval, bnullarray, anynul, + (short *) buffer, status); + } + else if (datatype == TINT) + { + fffi4int(idata, (long) tilelen, bscale, bzero, nullcheck, tnull, + *(int *) nulval, bnullarray, anynul, + (int *) buffer, status); + } + else if (datatype == TLONG) + { + fffi4i4(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(long *) nulval, bnullarray, anynul, + (long *) buffer, status); + } + else if (datatype == TFLOAT) + { + fffi4r4(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(float *) nulval, bnullarray, anynul, + (float *) buffer, status); + } + else if (datatype == TDOUBLE) + { + fffi4r8(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(double *) nulval, bnullarray, anynul, + (double *) buffer, status); + } + else if (datatype == TBYTE) + { + fffi4i1(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(unsigned char *) nulval, bnullarray, anynul, + (unsigned char *) buffer, status); + } + else if (datatype == TSBYTE) + { + fffi4s1(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(signed char *) nulval, bnullarray, anynul, + (signed char *) buffer, status); + } + else if (datatype == TUSHORT) + { + fffi4u2(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(unsigned short *) nulval, bnullarray, anynul, + (unsigned short *) buffer, status); + } + else if (datatype == TUINT) + { + fffi4uint(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(unsigned int *) nulval, bnullarray, anynul, + (unsigned int *) buffer, status); + } + else if (datatype == TULONG) + { + fffi4u4(idata, tilelen, bscale, bzero, nullcheck, tnull, + *(unsigned long *) nulval, bnullarray, anynul, + (unsigned long *) buffer, status); + } + else + *status = BAD_DATATYPE; + + free(idata); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +int imcomp_copy_overlap ( + char *tile, /* I - multi dimensional array of tile pixels */ + int pixlen, /* I - number of bytes in each tile or image pixel */ + int ndim, /* I - number of dimension in the tile and image */ + long *tfpixel, /* I - first pixel number in each dim. of the tile */ + long *tlpixel, /* I - last pixel number in each dim. of the tile */ + char *bnullarray, /* I - array of null flags; used if nullcheck = 2 */ + char *image, /* O - multi dimensional output image */ + long *fpixel, /* I - first pixel number in each dim. of the image */ + long *lpixel, /* I - last pixel number in each dim. of the image */ + long *ininc, /* I - increment to be applied in each image dimen. */ + int nullcheck, /* I - 0, 1: do nothing; 2: set nullarray for nulls */ + char *nullarray, + int *status) + +/* + copy the intersecting pixels from a decompressed tile to the output image. + Both the tile and the image must have the same number of dimensions. +*/ +{ + long imgdim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ + /* output image, allowing for inc factor */ + long tiledim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ + /* tile, array; inc factor is not relevant */ + long imgfpix[MAX_COMPRESS_DIM]; /* 1st img pix overlapping tile: 0 base, */ + /* allowing for inc factor */ + long imglpix[MAX_COMPRESS_DIM]; /* last img pix overlapping tile 0 base, */ + /* allowing for inc factor */ + long tilefpix[MAX_COMPRESS_DIM]; /* 1st tile pix overlapping img 0 base, */ + /* allowing for inc factor */ + long inc[MAX_COMPRESS_DIM]; /* local copy of input ininc */ + long i1, i2, i3, i4; /* offset along each axis of the image */ + long it1, it2, it3, it4; + long im1, im2, im3, im4; /* offset to image pixel, allowing for inc */ + long ipos, tf, tl; + long t2, t3, t4; /* offset along each axis of the tile */ + long tilepix, imgpix, tilepixbyte, imgpixbyte; + int ii, overlap_bytes, overlap_flags; + + if (*status > 0) + return(*status); + + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + /* set default values for higher dimensions */ + inc[ii] = 1; + imgdim[ii] = 1; + tiledim[ii] = 1; + imgfpix[ii] = 0; + imglpix[ii] = 0; + tilefpix[ii] = 0; + } + + /* ------------------------------------------------------------ */ + /* calc amount of overlap in each dimension; if there is zero */ + /* overlap in any dimension then just return */ + /* ------------------------------------------------------------ */ + + for (ii = 0; ii < ndim; ii++) + { + if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii]) + return(*status); /* there are no overlapping pixels */ + + inc[ii] = ininc[ii]; + + /* calc dimensions of the output image section */ + imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1; + if (imgdim[ii] < 1) + return(*status = NEG_AXIS); + + /* calc dimensions of the tile */ + tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1; + if (tiledim[ii] < 1) + return(*status = NEG_AXIS); + + if (ii > 0) + tiledim[ii] *= tiledim[ii - 1]; /* product of dimensions */ + + /* first and last pixels in image that overlap with the tile, 0 base */ + tf = tfpixel[ii] - 1; + tl = tlpixel[ii] - 1; + + /* skip this plane if it falls in the cracks of the subsampled image */ + while ((tf-(fpixel[ii] - 1)) % labs(inc[ii])) + { + tf++; + if (tf > tl) + return(*status); /* no overlapping pixels */ + } + + while ((tl-(fpixel[ii] - 1)) % labs(inc[ii])) + { + tl--; + if (tf > tl) + return(*status); /* no overlapping pixels */ + } + imgfpix[ii] = maxvalue((tf - fpixel[ii] +1) / labs(inc[ii]) , 0); + imglpix[ii] = minvalue((tl - fpixel[ii] +1) / labs(inc[ii]) , + imgdim[ii] - 1); + + /* first pixel in the tile that overlaps with the image (0 base) */ + tilefpix[ii] = maxvalue(fpixel[ii] - tfpixel[ii], 0); + + while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) + { + (tilefpix[ii])++; + if (tilefpix[ii] >= tiledim[ii]) + return(*status); /* no overlapping pixels */ + } +/* +printf("ii tfpixel, tlpixel %d %d %d \n",ii, tfpixel[ii], tlpixel[ii]); +printf("ii, tf, tl, imgfpix,imglpix, tilefpix %d %d %d %d %d %d\n",ii, + tf,tl,imgfpix[ii], imglpix[ii],tilefpix[ii]); +*/ + if (ii > 0) + imgdim[ii] *= imgdim[ii - 1]; /* product of dimensions */ + } + + /* ---------------------------------------------------------------- */ + /* calc number of pixels in each row (first dimension) that overlap */ + /* multiply by pixlen to get number of bytes to copy in each loop */ + /* ---------------------------------------------------------------- */ + + if (inc[0] != 1) + overlap_flags = 1; /* can only copy 1 pixel at a time */ + else + overlap_flags = imglpix[0] - imgfpix[0] + 1; /* can copy whole row */ + + overlap_bytes = overlap_flags * pixlen; + + /* support up to 5 dimensions for now */ + for (i4 = 0, it4=0; i4 <= imglpix[4] - imgfpix[4]; i4++, it4++) + { + /* increment plane if it falls in the cracks of the subsampled image */ + while (ndim > 4 && (tfpixel[4] + tilefpix[4] - fpixel[4] + it4) + % labs(inc[4]) != 0) + it4++; + + /* offset to start of hypercube */ + if (inc[4] > 0) + im4 = (i4 + imgfpix[4]) * imgdim[3]; + else + im4 = imgdim[4] - (i4 + 1 + imgfpix[4]) * imgdim[3]; + + t4 = (tilefpix[4] + it4) * tiledim[3]; + for (i3 = 0, it3=0; i3 <= imglpix[3] - imgfpix[3]; i3++, it3++) + { + /* increment plane if it falls in the cracks of the subsampled image */ + while (ndim > 3 && (tfpixel[3] + tilefpix[3] - fpixel[3] + it3) + % labs(inc[3]) != 0) + it3++; + + /* offset to start of cube */ + if (inc[3] > 0) + im3 = (i3 + imgfpix[3]) * imgdim[2] + im4; + else + im3 = imgdim[3] - (i3 + 1 + imgfpix[3]) * imgdim[2] + im4; + + t3 = (tilefpix[3] + it3) * tiledim[2] + t4; + + /* loop through planes of the image */ + for (i2 = 0, it2=0; i2 <= imglpix[2] - imgfpix[2]; i2++, it2++) + { + /* incre plane if it falls in the cracks of the subsampled image */ + while (ndim > 2 && (tfpixel[2] + tilefpix[2] - fpixel[2] + it2) + % labs(inc[2]) != 0) + it2++; + + /* offset to start of plane */ + if (inc[2] > 0) + im2 = (i2 + imgfpix[2]) * imgdim[1] + im3; + else + im2 = imgdim[2] - (i2 + 1 + imgfpix[2]) * imgdim[1] + im3; + + t2 = (tilefpix[2] + it2) * tiledim[1] + t3; + + /* loop through rows of the image */ + for (i1 = 0, it1=0; i1 <= imglpix[1] - imgfpix[1]; i1++, it1++) + { + /* incre row if it falls in the cracks of the subsampled image */ + while (ndim > 1 && (tfpixel[1] + tilefpix[1] - fpixel[1] + it1) + % labs(inc[1]) != 0) + it1++; + + /* calc position of first pixel in tile to be copied */ + tilepix = tilefpix[0] + (tilefpix[1] + it1) * tiledim[0] + t2; + + /* offset to start of row */ + if (inc[1] > 0) + im1 = (i1 + imgfpix[1]) * imgdim[0] + im2; + else + im1 = imgdim[1] - (i1 + 1 + imgfpix[1]) * imgdim[0] + im2; +/* +printf("inc = %d %d %d %d\n",inc[0],inc[1],inc[2],inc[3]); +printf("im1,im2,im3,im4 = %d %d %d %d\n",im1,im2,im3,im4); +*/ + /* offset to byte within the row */ + if (inc[0] > 0) + imgpix = imgfpix[0] + im1; + else + imgpix = imgdim[0] - 1 - imgfpix[0] + im1; +/* +printf("tilefpix0,1, imgfpix1, it1, inc1, t2= %d %d %d %d %d %d\n", + tilefpix[0],tilefpix[1],imgfpix[1],it1,inc[1], t2); +printf("i1, it1, tilepix, imgpix %d %d %d %d \n", i1, it1, tilepix, imgpix); +*/ + /* loop over pixels along one row of the image */ + for (ipos = imgfpix[0]; ipos <= imglpix[0]; ipos += overlap_flags) + { + if (nullcheck == 2) + { + /* copy overlapping null flags from tile to image */ + memcpy(nullarray + imgpix, bnullarray + tilepix, + overlap_flags); + } + + /* convert from image pixel to byte offset */ + tilepixbyte = tilepix * pixlen; + imgpixbyte = imgpix * pixlen; +/* +printf(" tilepix, tilepixbyte, imgpix, imgpixbyte= %d %d %d %d\n", + tilepix, tilepixbyte, imgpix, imgpixbyte); +*/ + /* copy overlapping row of pixels from tile to image */ + memcpy(image + imgpixbyte, tile + tilepixbyte, overlap_bytes); + + tilepix += (overlap_flags * labs(inc[0])); + if (inc[0] > 0) + imgpix += overlap_flags; + else + imgpix -= overlap_flags; + } + } + } + } + } + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int imcomp_merge_overlap ( + char *tile, /* O - multi dimensional array of tile pixels */ + int pixlen, /* I - number of bytes in each tile or image pixel */ + int ndim, /* I - number of dimension in the tile and image */ + long *tfpixel, /* I - first pixel number in each dim. of the tile */ + long *tlpixel, /* I - last pixel number in each dim. of the tile */ + char *bnullarray, /* I - array of null flags; used if nullcheck = 2 */ + char *image, /* I - multi dimensional output image */ + long *fpixel, /* I - first pixel number in each dim. of the image */ + long *lpixel, /* I - last pixel number in each dim. of the image */ + int nullcheck, /* I - 0, 1: do nothing; 2: set nullarray for nulls */ + int *status) + +/* + Similar to imcomp_copy_overlap, except it copies the overlapping pixels from + the 'image' to the 'tile'. +*/ +{ + long imgdim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ + /* output image, allowing for inc factor */ + long tiledim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ + /* tile, array; inc factor is not relevant */ + long imgfpix[MAX_COMPRESS_DIM]; /* 1st img pix overlapping tile: 0 base, */ + /* allowing for inc factor */ + long imglpix[MAX_COMPRESS_DIM]; /* last img pix overlapping tile 0 base, */ + /* allowing for inc factor */ + long tilefpix[MAX_COMPRESS_DIM]; /* 1st tile pix overlapping img 0 base, */ + /* allowing for inc factor */ + long inc[MAX_COMPRESS_DIM]; /* local copy of input ininc */ + long i1, i2, i3, i4; /* offset along each axis of the image */ + long it1, it2, it3, it4; + long im1, im2, im3, im4; /* offset to image pixel, allowing for inc */ + long ipos, tf, tl; + long t2, t3, t4; /* offset along each axis of the tile */ + long tilepix, imgpix, tilepixbyte, imgpixbyte; + int ii, overlap_bytes, overlap_flags; + + if (*status > 0) + return(*status); + + for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) + { + /* set default values for higher dimensions */ + inc[ii] = 1; + imgdim[ii] = 1; + tiledim[ii] = 1; + imgfpix[ii] = 0; + imglpix[ii] = 0; + tilefpix[ii] = 0; + } + + /* ------------------------------------------------------------ */ + /* calc amount of overlap in each dimension; if there is zero */ + /* overlap in any dimension then just return */ + /* ------------------------------------------------------------ */ + + for (ii = 0; ii < ndim; ii++) + { + if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii]) + return(*status); /* there are no overlapping pixels */ + + /* calc dimensions of the output image section */ + imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1; + if (imgdim[ii] < 1) + return(*status = NEG_AXIS); + + /* calc dimensions of the tile */ + tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1; + if (tiledim[ii] < 1) + return(*status = NEG_AXIS); + + if (ii > 0) + tiledim[ii] *= tiledim[ii - 1]; /* product of dimensions */ + + /* first and last pixels in image that overlap with the tile, 0 base */ + tf = tfpixel[ii] - 1; + tl = tlpixel[ii] - 1; + + /* skip this plane if it falls in the cracks of the subsampled image */ + while ((tf-(fpixel[ii] - 1)) % labs(inc[ii])) + { + tf++; + if (tf > tl) + return(*status); /* no overlapping pixels */ + } + + while ((tl-(fpixel[ii] - 1)) % labs(inc[ii])) + { + tl--; + if (tf > tl) + return(*status); /* no overlapping pixels */ + } + imgfpix[ii] = maxvalue((tf - fpixel[ii] +1) / labs(inc[ii]) , 0); + imglpix[ii] = minvalue((tl - fpixel[ii] +1) / labs(inc[ii]) , + imgdim[ii] - 1); + + /* first pixel in the tile that overlaps with the image (0 base) */ + tilefpix[ii] = maxvalue(fpixel[ii] - tfpixel[ii], 0); + + while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) + { + (tilefpix[ii])++; + if (tilefpix[ii] >= tiledim[ii]) + return(*status); /* no overlapping pixels */ + } +/* +printf("ii tfpixel, tlpixel %d %d %d \n",ii, tfpixel[ii], tlpixel[ii]); +printf("ii, tf, tl, imgfpix,imglpix, tilefpix %d %d %d %d %d %d\n",ii, + tf,tl,imgfpix[ii], imglpix[ii],tilefpix[ii]); +*/ + if (ii > 0) + imgdim[ii] *= imgdim[ii - 1]; /* product of dimensions */ + } + + /* ---------------------------------------------------------------- */ + /* calc number of pixels in each row (first dimension) that overlap */ + /* multiply by pixlen to get number of bytes to copy in each loop */ + /* ---------------------------------------------------------------- */ + + if (inc[0] != 1) + overlap_flags = 1; /* can only copy 1 pixel at a time */ + else + overlap_flags = imglpix[0] - imgfpix[0] + 1; /* can copy whole row */ + + overlap_bytes = overlap_flags * pixlen; + + /* support up to 5 dimensions for now */ + for (i4 = 0, it4=0; i4 <= imglpix[4] - imgfpix[4]; i4++, it4++) + { + /* increment plane if it falls in the cracks of the subsampled image */ + while (ndim > 4 && (tfpixel[4] + tilefpix[4] - fpixel[4] + it4) + % labs(inc[4]) != 0) + it4++; + + /* offset to start of hypercube */ + if (inc[4] > 0) + im4 = (i4 + imgfpix[4]) * imgdim[3]; + else + im4 = imgdim[4] - (i4 + 1 + imgfpix[4]) * imgdim[3]; + + t4 = (tilefpix[4] + it4) * tiledim[3]; + for (i3 = 0, it3=0; i3 <= imglpix[3] - imgfpix[3]; i3++, it3++) + { + /* increment plane if it falls in the cracks of the subsampled image */ + while (ndim > 3 && (tfpixel[3] + tilefpix[3] - fpixel[3] + it3) + % labs(inc[3]) != 0) + it3++; + + /* offset to start of cube */ + if (inc[3] > 0) + im3 = (i3 + imgfpix[3]) * imgdim[2] + im4; + else + im3 = imgdim[3] - (i3 + 1 + imgfpix[3]) * imgdim[2] + im4; + + t3 = (tilefpix[3] + it3) * tiledim[2] + t4; + + /* loop through planes of the image */ + for (i2 = 0, it2=0; i2 <= imglpix[2] - imgfpix[2]; i2++, it2++) + { + /* incre plane if it falls in the cracks of the subsampled image */ + while (ndim > 2 && (tfpixel[2] + tilefpix[2] - fpixel[2] + it2) + % labs(inc[2]) != 0) + it2++; + + /* offset to start of plane */ + if (inc[2] > 0) + im2 = (i2 + imgfpix[2]) * imgdim[1] + im3; + else + im2 = imgdim[2] - (i2 + 1 + imgfpix[2]) * imgdim[1] + im3; + + t2 = (tilefpix[2] + it2) * tiledim[1] + t3; + + /* loop through rows of the image */ + for (i1 = 0, it1=0; i1 <= imglpix[1] - imgfpix[1]; i1++, it1++) + { + /* incre row if it falls in the cracks of the subsampled image */ + while (ndim > 1 && (tfpixel[1] + tilefpix[1] - fpixel[1] + it1) + % labs(inc[1]) != 0) + it1++; + + /* calc position of first pixel in tile to be copied */ + tilepix = tilefpix[0] + (tilefpix[1] + it1) * tiledim[0] + t2; + + /* offset to start of row */ + if (inc[1] > 0) + im1 = (i1 + imgfpix[1]) * imgdim[0] + im2; + else + im1 = imgdim[1] - (i1 + 1 + imgfpix[1]) * imgdim[0] + im2; +/* +printf("inc = %d %d %d %d\n",inc[0],inc[1],inc[2],inc[3]); +printf("im1,im2,im3,im4 = %d %d %d %d\n",im1,im2,im3,im4); +*/ + /* offset to byte within the row */ + if (inc[0] > 0) + imgpix = imgfpix[0] + im1; + else + imgpix = imgdim[0] - 1 - imgfpix[0] + im1; +/* +printf("tilefpix0,1, imgfpix1, it1, inc1, t2= %d %d %d %d %d %d\n", + tilefpix[0],tilefpix[1],imgfpix[1],it1,inc[1], t2); +printf("i1, it1, tilepix, imgpix %d %d %d %d \n", i1, it1, tilepix, imgpix); +*/ + /* loop over pixels along one row of the image */ + for (ipos = imgfpix[0]; ipos <= imglpix[0]; ipos += overlap_flags) + { + /* convert from image pixel to byte offset */ + tilepixbyte = tilepix * pixlen; + imgpixbyte = imgpix * pixlen; +/* +printf(" tilepix, tilepixbyte, imgpix, imgpixbyte= %d %d %d %d\n", + tilepix, tilepixbyte, imgpix, imgpixbyte); +*/ + /* copy overlapping row of pixels from image to tile */ + memcpy(tile + tilepixbyte, image + imgpixbyte, overlap_bytes); + + tilepix += (overlap_flags * labs(inc[0])); + if (inc[0] > 0) + imgpix += overlap_flags; + else + imgpix -= overlap_flags; + } + } + } + } + } + return(*status); +} diff --git a/software/cfitsio3040/imcopy.c b/software/cfitsio3040/imcopy.c new file mode 100644 index 000000000..8cbb9a29c --- /dev/null +++ b/software/cfitsio3040/imcopy.c @@ -0,0 +1,192 @@ +#include +#include +#include +#include "fitsio.h" + +int main(int argc, char *argv[]) +{ + fitsfile *infptr, *outfptr; /* FITS file pointers defined in fitsio.h */ + int status = 0, ii = 1, iteration = 0, single = 0, hdupos; + int hdutype, bitpix, bytepix, naxis = 0, nkeys, datatype = 0, anynul; + long naxes[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1}; + long first, totpix = 0, npix; + double *array, bscale = 1.0, bzero = 0.0, nulval = 0.; + char card[81]; + + if (argc != 3) + { + printf("\n"); + printf("Usage: imcopy inputImage outputImage[compress]\n"); + printf("\n"); + printf("Copy an input image to an output image, optionally compressing\n"); + printf("or uncompressing the image in the process. If the [compress]\n"); + printf("qualifier is appended to the output file name then the input image\n"); + printf("will be compressed using the tile-compressed format. In this format,\n"); + printf("the image is divided into rectangular tiles and each tile of pixels\n"); + printf("is compressed and stored in a variable-length row of a binary table.\n"); + printf("If the [compress] qualifier is omitted, and the input image is\n"); + printf("in tile-compressed format, then the output image will be uncompressed.\n"); + printf("\n"); + printf("If an extension name or number is appended to the input file name, \n"); + printf("enclosed in square brackets, then only that single extension will be\n"); + printf("copied to the output file. Otherwise, every extension in the input file\n"); + printf("will be processed in turn and copied to the output file.\n"); + printf("\n"); + printf("Examples:\n"); + printf("\n"); + printf("1) imcopy image.fit 'cimage.fit[compress]'\n"); + printf("\n"); + printf(" This compresses the input image using the default parameters, i.e.,\n"); + printf(" using the Rice compression algorithm and using row by row tiles.\n"); + printf("\n"); + printf("2) imcopy cimage.fit image2.fit\n"); + printf("\n"); + printf(" This uncompress the image created in the first example.\n"); + printf(" image2.fit should be identical to image.fit if the image\n"); + printf(" has an integer datatype. There will be small differences\n"); + printf(" in the pixel values if it is a floating point image.\n"); + printf("\n"); + printf("3) imcopy image.fit 'cimage.fit[compress GZIP 100,100;4]'\n"); + printf("\n"); + printf(" This compresses the input image using the following parameters:\n"); + printf(" GZIP compression algorithm;\n"); + printf(" 100 X 100 pixel compression tiles;\n"); + printf(" noise_bits = 4 (only used with floating point images)\n"); + printf("\n"); + printf("The full syntax of the compression qualifier is:\n"); + printf(" [compress ALGORITHM TDIM1,TDIM2,...; NOISE_BITS]\n"); + printf("where the allowed ALGORITHM values are Rice, GZIP, PLIO, \n"); + printf("and TDIMn is the size of the compression tile in each dimension,\n"); + printf("and NOISE_BITS = 1, 2, 3, or 4 and controls the amount of noise\n"); + printf("suppression when compressing floating point images. \n"); + printf("\n"); + printf("Note that it may be necessary to enclose the file names\n"); + printf("in single quote characters on the Unix command line.\n"); + return(0); + } + + /* Open the input file and create output file */ + fits_open_file(&infptr, argv[1], READONLY, &status); + fits_create_file(&outfptr, argv[2], &status); + + if (status != 0) { + fits_report_error(stderr, status); + return(status); + } + + fits_get_hdu_num(infptr, &hdupos); /* Get the current HDU position */ + + /* Copy only a single HDU if a specific extension was given */ + if (hdupos != 1 || strchr(argv[1], '[')) single = 1; + + for (; !status; hdupos++) /* Main loop through each extension */ + { + + fits_get_hdu_type(infptr, &hdutype, &status); + + if (hdutype == IMAGE_HDU) { + + /* get image dimensions and total number of pixels in image */ + for (ii = 0; ii < 9; ii++) + naxes[ii] = 1; + + fits_get_img_param(infptr, 9, &bitpix, &naxis, naxes, &status); + + totpix = naxes[0] * naxes[1] * naxes[2] * naxes[3] * naxes[4] + * naxes[5] * naxes[6] * naxes[7] * naxes[8]; + } + + if (hdutype != IMAGE_HDU || naxis == 0 || totpix == 0) { + + /* just copy tables and null images */ + fits_copy_hdu(infptr, outfptr, 0, &status); + + } else { + + /* Explicitly create new image, to support compression */ + fits_create_img(outfptr, bitpix, naxis, naxes, &status); + if (status) { + fits_report_error(stderr, status); + return(status); + } + + /* copy all the user keywords (not the structural keywords) */ + fits_get_hdrspace(infptr, &nkeys, NULL, &status); + + for (ii = 1; ii <= nkeys; ii++) { + fits_read_record(infptr, ii, card, &status); + if (fits_get_keyclass(card) > TYP_CMPRS_KEY) + fits_write_record(outfptr, card, &status); + } + + switch(bitpix) { + case BYTE_IMG: + datatype = TBYTE; + break; + case SHORT_IMG: + datatype = TSHORT; + break; + case LONG_IMG: + datatype = TINT; + break; + case FLOAT_IMG: + datatype = TFLOAT; + break; + case DOUBLE_IMG: + datatype = TDOUBLE; + break; + } + + bytepix = abs(bitpix) / 8; + + npix = totpix; + iteration = 0; + + /* try to allocate memory for the entire image */ + /* use double type to force memory alignment */ + array = (double *) calloc(npix, bytepix); + + /* if allocation failed, divide size by 2 and try again */ + while (!array && iteration < 10) { + iteration++; + npix = npix / 2; + array = (double *) calloc(npix, bytepix); + } + + if (!array) { + printf("Memory allocation error\n"); + return(0); + } + + /* turn off any scaling so that we copy the raw pixel values */ + fits_set_bscale(infptr, bscale, bzero, &status); + fits_set_bscale(outfptr, bscale, bzero, &status); + + first = 1; + while (totpix > 0 && !status) + { + /* read all or part of image then write it back to the output file */ + fits_read_img(infptr, datatype, first, npix, + &nulval, array, &anynul, &status); + + fits_write_img(outfptr, datatype, first, npix, array, &status); + totpix = totpix - npix; + first = first + npix; + } + free(array); + } + + if (single) break; /* quit if only copying a single HDU */ + fits_movrel_hdu(infptr, 1, NULL, &status); /* try to move to next HDU */ + } + + if (status == END_OF_FILE) status = 0; /* Reset after normal error */ + + fits_close_file(outfptr, &status); + fits_close_file(infptr, &status); + + /* if error occurred, print out error message */ + if (status) + fits_report_error(stderr, status); + return(status); +} diff --git a/software/cfitsio3040/iraffits.c b/software/cfitsio3040/iraffits.c new file mode 100644 index 000000000..1d1c4c193 --- /dev/null +++ b/software/cfitsio3040/iraffits.c @@ -0,0 +1,1975 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* These routines have been modified by William Pence for use by CFITSIO */ +/* The original files were provided by Doug Mink */ +/*------------------------------------------------------------------------*/ + +/* File imhfile.c + * August 6, 1998 + * By Doug Mink, based on Mike VanHilst's readiraf.c + + * Module: imhfile.c (IRAF .imh image file reading and writing) + * Purpose: Read and write IRAF image files (and translate headers) + * Subroutine: irafrhead (filename, lfhead, fitsheader, lihead) + * Read IRAF image header + * Subroutine: irafrimage (fitsheader) + * Read IRAF image pixels (call after irafrhead) + * Subroutine: same_path (pixname, hdrname) + * Put filename and header path together + * Subroutine: iraf2fits (hdrname, irafheader, nbiraf, nbfits) + * Convert IRAF image header to FITS image header + * Subroutine: irafgeti4 (irafheader, offset) + * Get 4-byte integer from arbitrary part of IRAF header + * Subroutine: irafgetc2 (irafheader, offset) + * Get character string from arbitrary part of IRAF v.1 header + * Subroutine: irafgetc (irafheader, offset) + * Get character string from arbitrary part of IRAF header + * Subroutine: iraf2str (irafstring, nchar) + * Convert 2-byte/char IRAF string to 1-byte/char string + * Subroutine: irafswap (bitpix,string,nbytes) + * Swap bytes in string in place, with FITS bits/pixel code + * Subroutine: irafswap2 (string,nbytes) + * Swap bytes in string in place + * Subroutine irafswap4 (string,nbytes) + * Reverse bytes of Integer*4 or Real*4 vector in place + * Subroutine irafswap8 (string,nbytes) + * Reverse bytes of Real*8 vector in place + + + * Copyright: 2000 Smithsonian Astrophysical Observatory + * You may do anything you like with this file except remove + * this copyright. The Smithsonian Astrophysical Observatory + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +#include /* define stderr, FD, and NULL */ +#include +#include /* stddef.h is apparently needed to define size_t */ +#include + +#define FILE_NOT_OPENED 104 + +/* Parameters from iraf/lib/imhdr.h for IRAF version 1 images */ +#define SZ_IMPIXFILE 79 /* name of pixel storage file */ +#define SZ_IMHDRFILE 79 /* length of header storage file */ +#define SZ_IMTITLE 79 /* image title string */ +#define LEN_IMHDR 2052 /* length of std header */ + +/* Parameters from iraf/lib/imhdr.h for IRAF version 2 images */ +#define SZ_IM2PIXFILE 255 /* name of pixel storage file */ +#define SZ_IM2HDRFILE 255 /* name of header storage file */ +#define SZ_IM2TITLE 383 /* image title string */ +#define LEN_IM2HDR 2046 /* length of std header */ + +/* Offsets into header in bytes for parameters in IRAF version 1 images */ +#define IM_HDRLEN 12 /* Length of header in 4-byte ints */ +#define IM_PIXTYPE 16 /* Datatype of the pixels */ +#define IM_NDIM 20 /* Number of dimensions */ +#define IM_LEN 24 /* Length (as stored) */ +#define IM_PHYSLEN 52 /* Physical length (as stored) */ +#define IM_PIXOFF 88 /* Offset of the pixels */ +#define IM_CTIME 108 /* Time of image creation */ +#define IM_MTIME 112 /* Time of last modification */ +#define IM_LIMTIME 116 /* Time of min,max computation */ +#define IM_MAX 120 /* Maximum pixel value */ +#define IM_MIN 124 /* Maximum pixel value */ +#define IM_PIXFILE 412 /* Name of pixel storage file */ +#define IM_HDRFILE 572 /* Name of header storage file */ +#define IM_TITLE 732 /* Image name string */ + +/* Offsets into header in bytes for parameters in IRAF version 2 images */ +#define IM2_HDRLEN 6 /* Length of header in 4-byte ints */ +#define IM2_PIXTYPE 10 /* Datatype of the pixels */ +#define IM2_SWAPPED 14 /* Pixels are byte swapped */ +#define IM2_NDIM 18 /* Number of dimensions */ +#define IM2_LEN 22 /* Length (as stored) */ +#define IM2_PHYSLEN 50 /* Physical length (as stored) */ +#define IM2_PIXOFF 86 /* Offset of the pixels */ +#define IM2_CTIME 106 /* Time of image creation */ +#define IM2_MTIME 110 /* Time of last modification */ +#define IM2_LIMTIME 114 /* Time of min,max computation */ +#define IM2_MAX 118 /* Maximum pixel value */ +#define IM2_MIN 122 /* Maximum pixel value */ +#define IM2_PIXFILE 126 /* Name of pixel storage file */ +#define IM2_HDRFILE 382 /* Name of header storage file */ +#define IM2_TITLE 638 /* Image name string */ + +/* Codes from iraf/unix/hlib/iraf.h */ +#define TY_CHAR 2 +#define TY_SHORT 3 +#define TY_INT 4 +#define TY_LONG 5 +#define TY_REAL 6 +#define TY_DOUBLE 7 +#define TY_COMPLEX 8 +#define TY_POINTER 9 +#define TY_STRUCT 10 +#define TY_USHORT 11 +#define TY_UBYTE 12 + +#define LEN_PIXHDR 1024 +#define MAXINT 2147483647 /* Biggest number that can fit in long */ + +static int isirafswapped(char *irafheader, int offset); +static int irafgeti4(char *irafheader, int offset); +static char *irafgetc2(char *irafheader, int offset, int nc); +static char *irafgetc(char *irafheader, int offset, int nc); +static char *iraf2str(char *irafstring, int nchar); +static char *irafrdhead(char *filename, int *lihead); +static int irafrdimage (char **buffptr, size_t *buffsize, + size_t *filesize, int *status); +static int iraftofits (char *hdrname, char *irafheader, int nbiraf, + char **buffptr, size_t *nbfits, size_t *fitssize, int *status); +static char *same_path(char *pixname, char *hdrname); + +static int swaphead=0; /* =1 to swap data bytes of IRAF header values */ +static int swapdata=0; /* =1 to swap bytes in IRAF data pixels */ + +static void irafswap(int bitpix, char *string, int nbytes); +static void irafswap2(char *string, int nbytes); +static void irafswap4(char *string, int nbytes); +static void irafswap8(char *string, int nbytes); +static int pix_version (char *irafheader); +static int irafncmp (char *irafheader, char *teststring, int nc); +static int machswap(void); +static int head_version (char *irafheader); +static int hgeti4(char* hstring, char* keyword, int* val); +static int hgets(char* hstring, char* keyword, int lstr, char* string); +static char* hgetc(char* hstring, char* keyword); +static char* ksearch(char* hstring, char* keyword); +static char *blsearch (char* hstring, char* keyword); +static char *strsrch (char* s1, char* s2); +static char *strnsrch ( char* s1,char* s2,int ls1); +static void hputi4(char* hstring,char* keyword, int ival); +static void hputs(char* hstring,char* keyword,char* cval); +static void hputcom(char* hstring,char* keyword,char* comment); +static void hputl(char* hstring,char* keyword,int lval); +static void hputc(char* hstring,char* keyword,char* cval); + +int iraf2mem(char *filename, char **buffptr, size_t *buffsize, + size_t *filesize, int *status); + +void ffpmsg(const char *err_message); + +/*--------------------------------------------------------------------------*/ +int iraf2mem(char *filename, /* name of input file */ + char **buffptr, /* O - memory pointer (initially NULL) */ + size_t *buffsize, /* O - size of mem buffer, in bytes */ + size_t *filesize, /* O - size of FITS file, in bytes */ + int *status) /* IO - error status */ + +/* + Driver routine that reads an IRAF image into memory, also converting + it into FITS format. +*/ +{ + char *irafheader; + int lenirafhead; + + *buffptr = NULL; + *buffsize = 0; + *filesize = 0; + + /* read IRAF header into dynamically created char array (free it later!) */ + irafheader = irafrdhead(filename, &lenirafhead); + + if (!irafheader) + { + return(*status = FILE_NOT_OPENED); + } + + /* convert IRAF header to FITS header in memory */ + iraftofits(filename, irafheader, lenirafhead, buffptr, buffsize, filesize, + status); + + /* don't need the IRAF header any more */ + free(irafheader); + + if (*status > 0) + return(*status); + + *filesize = (((*filesize - 1) / 2880 ) + 1 ) * 2880; /* multiple of 2880 */ + + /* append the image data onto the FITS header */ + irafrdimage(buffptr, buffsize, filesize, status); + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +/* Subroutine: irafrdhead (was irafrhead in D. Mink's original code) + * Purpose: Open and read the iraf .imh file. + * Returns: NULL if failure, else pointer to IRAF .imh image header + * Notes: The imhdr format is defined in iraf/lib/imhdr.h, some of + * which defines or mimicked, above. + */ + +static char *irafrdhead ( + char *filename, /* Name of IRAF header file */ + int *lihead) /* Length of IRAF image header in bytes (returned) */ +{ + FILE *fd; + int nbr; + char *irafheader; + char errmsg[81]; + long nbhead; + int nihead; + + *lihead = 0; + + /* open the image header file */ + fd = fopen (filename, "rb"); + if (fd == NULL) { + ffpmsg("unable to open IRAF header file:"); + ffpmsg(filename); + return (NULL); + } + + /* Find size of image header file */ + if (fseek(fd, 0, 2) != 0) /* move to end of the file */ + { + ffpmsg("IRAFRHEAD: cannot seek in file:"); + ffpmsg(filename); + return(NULL); + } + + nbhead = ftell(fd); /* position = size of file */ + if (nbhead < 0) + { + ffpmsg("IRAFRHEAD: cannot get pos. in file:"); + ffpmsg(filename); + return(NULL); + } + + if (fseek(fd, 0, 0) != 0) /* move back to beginning */ + { + ffpmsg("IRAFRHEAD: cannot seek to beginning of file:"); + ffpmsg(filename); + return(NULL); + } + + /* allocate initial sized buffer */ + nihead = nbhead + 5000; + irafheader = (char *) calloc (1, nihead); + if (irafheader == NULL) { + sprintf(errmsg, "IRAFRHEAD Cannot allocate %d-byte header", + nihead); + ffpmsg(errmsg); + ffpmsg(filename); + return (NULL); + } + *lihead = nihead; + + /* Read IRAF header */ + nbr = fread (irafheader, 1, nbhead, fd); + fclose (fd); + + /* Reject if header less than minimum length */ + if (nbr < LEN_PIXHDR) { + sprintf(errmsg, "IRAFRHEAD header file: %d / %d bytes read.", + nbr,LEN_PIXHDR); + ffpmsg(errmsg); + ffpmsg(filename); + free (irafheader); + return (NULL); + } + + return (irafheader); +} +/*--------------------------------------------------------------------------*/ +static int irafrdimage ( + char **buffptr, /* FITS image header (filled) */ + size_t *buffsize, /* allocated size of the buffer */ + size_t *filesize, /* actual size of the FITS file */ + int *status) +{ + FILE *fd; + char *bang; + int nax = 1, naxis1 = 1, naxis2 = 1, naxis3 = 1, naxis4 = 1, npaxis1 = 1, npaxis2; + int bitpix, bytepix, i; + char *fitsheader, *image; + int nbr, nbimage, nbaxis, nbl, nbx, nbdiff; + char *pixheader; + char *linebuff; + int imhver, lpixhead = 0; + char pixname[SZ_IM2PIXFILE+1]; + char errmsg[81]; + size_t newfilesize; + + fitsheader = *buffptr; /* pointer to start of header */ + image = fitsheader + *filesize; /* pointer to start of the data */ + + /* Convert pixel file name to character string */ + hgets (fitsheader, "PIXFILE", SZ_IM2PIXFILE, pixname); + hgeti4 (fitsheader, "PIXOFF", &lpixhead); + + /* Open pixel file, ignoring machine name if present */ + if ((bang = strchr (pixname, '!')) != NULL ) + fd = fopen (bang + 1, "rb"); + else + fd = fopen (pixname, "rb"); + + /* Print error message and exit if pixel file is not found */ + if (!fd) { + ffpmsg("IRAFRIMAGE: Cannot open IRAF pixel file:"); + ffpmsg(pixname); + return (*status = FILE_NOT_OPENED); + } + + /* Read pixel header */ + pixheader = (char *) calloc (lpixhead, 1); + if (pixheader == NULL) { + ffpmsg("IRAFRIMAGE: Cannot alloc memory for pixel header"); + ffpmsg(pixname); + fclose (fd); + return (*status = FILE_NOT_OPENED); + } + nbr = fread (pixheader, 1, lpixhead, fd); + + /* Check size of pixel header */ + if (nbr < lpixhead) { + sprintf(errmsg, "IRAF pixel file: %d / %d bytes read.", + nbr,LEN_PIXHDR); + ffpmsg(errmsg); + free (pixheader); + fclose (fd); + return (*status = FILE_NOT_OPENED); + } + + /* check pixel header magic word */ + imhver = pix_version (pixheader); + if (imhver < 1) { + ffpmsg("File not valid IRAF pixel file:"); + ffpmsg(pixname); + free (pixheader); + fclose (fd); + return (*status = FILE_NOT_OPENED); + } + free (pixheader); + + /* Find number of bytes to read */ + hgeti4 (fitsheader,"NAXIS",&nax); + hgeti4 (fitsheader,"NAXIS1",&naxis1); + hgeti4 (fitsheader,"NPAXIS1",&npaxis1); + if (nax > 1) { + hgeti4 (fitsheader,"NAXIS2",&naxis2); + hgeti4 (fitsheader,"NPAXIS2",&npaxis2); + } + if (nax > 2) + hgeti4 (fitsheader,"NAXIS3",&naxis3); + if (nax > 3) + hgeti4 (fitsheader,"NAXIS4",&naxis4); + + hgeti4 (fitsheader,"BITPIX",&bitpix); + if (bitpix < 0) + bytepix = -bitpix / 8; + else + bytepix = bitpix / 8; + + nbimage = naxis1 * naxis2 * naxis3 * naxis4 * bytepix; + + newfilesize = *filesize + nbimage; /* header + data */ + newfilesize = (((newfilesize - 1) / 2880 ) + 1 ) * 2880; + + if (newfilesize > *buffsize) /* need to allocate more memory? */ + { + fitsheader = (char *) realloc (*buffptr, newfilesize); + if (fitsheader == NULL) { + sprintf(errmsg, "IRAFRIMAGE Cannot allocate %d-byte image buffer", + (int) (*filesize)); + ffpmsg(errmsg); + ffpmsg(pixname); + fclose (fd); + return (*status = FILE_NOT_OPENED); + } + } + + *buffptr = fitsheader; + *buffsize = newfilesize; + + image = fitsheader + *filesize; + *filesize = newfilesize; + + /* Read IRAF image all at once if physical and image dimensions are the same */ + if (npaxis1 == naxis1) + nbr = fread (image, 1, nbimage, fd); + + /* Read IRAF image one line at a time if physical and image dimensions differ */ + else { + nbdiff = (npaxis1 - naxis1) * bytepix; + nbaxis = naxis1 * bytepix; + linebuff = image; + nbr = 0; + if (naxis2 == 1 && naxis3 > 1) + naxis2 = naxis3; + for (i = 0; i < naxis2; i++) { + nbl = fread (linebuff, 1, nbaxis, fd); + nbr = nbr + nbl; + nbx = fseek (fd, nbdiff, 1); + linebuff = linebuff + nbaxis; + } + } + fclose (fd); + + /* Check size of image */ + if (nbr < nbimage) { + sprintf(errmsg, "IRAF pixel file: %d / %d bytes read.", + nbr,nbimage); + ffpmsg(errmsg); + ffpmsg(pixname); + return (*status = FILE_NOT_OPENED); + } + + /* Byte-reverse image, if necessary */ + if (swapdata) + irafswap (bitpix, image, nbimage); + + return (*status); +} +/*--------------------------------------------------------------------------*/ +/* Return IRAF image format version number from magic word in IRAF header*/ + +static int head_version ( + char *irafheader) /* IRAF image header from file */ + +{ + + /* Check header file magic word */ + if (irafncmp (irafheader, "imhdr", 5) != 0 ) { + if (strncmp (irafheader, "imhv2", 5) != 0) + return (0); + else + return (2); + } + else + return (1); +} + +/*--------------------------------------------------------------------------*/ +/* Return IRAF image format version number from magic word in IRAF pixel file */ + +static int pix_version ( + char *irafheader) /* IRAF image header from file */ +{ + + /* Check pixel file header magic word */ + if (irafncmp (irafheader, "impix", 5) != 0) { + if (strncmp (irafheader, "impv2", 5) != 0) + return (0); + else + return (2); + } + else + return (1); +} + +/*--------------------------------------------------------------------------*/ +/* Verify that file is valid IRAF imhdr or impix by checking first 5 chars + * Returns: 0 on success, 1 on failure */ + +static int irafncmp ( + +char *irafheader, /* IRAF image header from file */ +char *teststring, /* C character string to compare */ +int nc) /* Number of characters to compate */ + +{ + char *line; + + if ((line = iraf2str (irafheader, nc)) == NULL) + return (1); + if (strncmp (line, teststring, nc) == 0) { + free (line); + return (0); + } + else { + free (line); + return (1); + } +} +/*--------------------------------------------------------------------------*/ + +/* Convert IRAF image header to FITS image header, returning FITS header */ + +static int iraftofits ( + char *hdrname, /* IRAF header file name (may be path) */ + char *irafheader, /* IRAF image header */ + int nbiraf, /* Number of bytes in IRAF header */ + char **buffptr, /* pointer to the FITS header */ + size_t *nbfits, /* allocated size of the FITS header buffer */ + size_t *fitssize, /* Number of bytes in FITS header (returned) */ + /* = number of bytes to the end of the END keyword */ + int *status) +{ + char *objname; /* object name from FITS file */ + int lstr, i, j, k, ib, nax, nbits; + char *pixname, *newpixname, *bang, *chead; + char *fitsheader; + int nblock, nlines; + char *fhead, *fhead1, *fp, endline[81]; + char irafchar; + char fitsline[81]; + int pixtype; + int imhver, n, imu, pixoff, impixoff, immax, immin, imtime; + int imndim, imlen, imphyslen, impixtype; + char errmsg[81]; + + /* Set up last line of FITS header */ + (void)strncpy (endline,"END", 3); + for (i = 3; i < 80; i++) + endline[i] = ' '; + endline[80] = 0; + + /* Check header magic word */ + imhver = head_version (irafheader); + if (imhver < 1) { + ffpmsg("File not valid IRAF image header"); + ffpmsg(hdrname); + return(*status = FILE_NOT_OPENED); + } + if (imhver == 2) { + nlines = 24 + ((nbiraf - LEN_IM2HDR) / 81); + imndim = IM2_NDIM; + imlen = IM2_LEN; + imphyslen = IM2_PHYSLEN; + impixtype = IM2_PIXTYPE; + impixoff = IM2_PIXOFF; + imtime = IM2_MTIME; + immax = IM2_MAX; + immin = IM2_MIN; + } + else { + nlines = 24 + ((nbiraf - LEN_IMHDR) / 162); + imndim = IM_NDIM; + imlen = IM_LEN; + imphyslen = IM_PHYSLEN; + impixtype = IM_PIXTYPE; + impixoff = IM_PIXOFF; + imtime = IM_MTIME; + immax = IM_MAX; + immin = IM_MIN; + } + + /* Initialize FITS header */ + nblock = (nlines * 80) / 2880; + *nbfits = (nblock + 5) * 2880 + 4; + fitsheader = (char *) calloc (*nbfits, 1); + if (fitsheader == NULL) { + sprintf(errmsg, "IRAF2FITS Cannot allocate %d-byte FITS header", + (int) (*nbfits)); + ffpmsg(hdrname); + return (*status = FILE_NOT_OPENED); + } + + fhead = fitsheader; + *buffptr = fitsheader; + (void)strncpy (fitsheader, endline, 80); + hputl (fitsheader, "SIMPLE", 1); + fhead = fhead + 80; + + /* check if the IRAF file is in big endian (sun) format (= 0) or not. */ + /* This is done by checking the 4 byte integer in the header that */ + /* represents the iraf pixel type. This 4-byte word is guaranteed to */ + /* have the least sig byte != 0 and the most sig byte = 0, so if the */ + /* first byte of the word != 0, then the file in little endian format */ + /* like on an Alpha machine. */ + + swaphead = isirafswapped(irafheader, impixtype); + if (imhver == 1) + swapdata = swaphead; /* vers 1 data has same swapness as header */ + else + swapdata = irafgeti4 (irafheader, IM2_SWAPPED); + + /* Set pixel size in FITS header */ + pixtype = irafgeti4 (irafheader, impixtype); + switch (pixtype) { + case TY_CHAR: + nbits = 8; + break; + case TY_UBYTE: + nbits = 8; + break; + case TY_SHORT: + nbits = 16; + break; + case TY_USHORT: + nbits = -16; + break; + case TY_INT: + case TY_LONG: + nbits = 32; + break; + case TY_REAL: + nbits = -32; + break; + case TY_DOUBLE: + nbits = -64; + break; + default: + sprintf(errmsg,"Unsupported IRAF data type: %d", pixtype); + ffpmsg(errmsg); + ffpmsg(hdrname); + return (*status = FILE_NOT_OPENED); + } + hputi4 (fitsheader,"BITPIX",nbits); + hputcom (fitsheader,"BITPIX", "IRAF .imh pixel type"); + fhead = fhead + 80; + + /* Set image dimensions in FITS header */ + nax = irafgeti4 (irafheader, imndim); + hputi4 (fitsheader,"NAXIS",nax); + hputcom (fitsheader,"NAXIS", "IRAF .imh naxis"); + fhead = fhead + 80; + + n = irafgeti4 (irafheader, imlen); + hputi4 (fitsheader, "NAXIS1", n); + hputcom (fitsheader,"NAXIS1", "IRAF .imh image naxis[1]"); + fhead = fhead + 80; + + if (nax > 1) { + n = irafgeti4 (irafheader, imlen+4); + hputi4 (fitsheader, "NAXIS2", n); + hputcom (fitsheader,"NAXIS2", "IRAF .imh image naxis[2]"); + fhead = fhead + 80; + } + if (nax > 2) { + n = irafgeti4 (irafheader, imlen+8); + hputi4 (fitsheader, "NAXIS3", n); + hputcom (fitsheader,"NAXIS3", "IRAF .imh image naxis[3]"); + fhead = fhead + 80; + } + if (nax > 3) { + n = irafgeti4 (irafheader, imlen+12); + hputi4 (fitsheader, "NAXIS4", n); + hputcom (fitsheader,"NAXIS4", "IRAF .imh image naxis[4]"); + fhead = fhead + 80; + } + + /* Set object name in FITS header */ + if (imhver == 2) + objname = irafgetc (irafheader, IM2_TITLE, SZ_IM2TITLE); + else + objname = irafgetc2 (irafheader, IM_TITLE, SZ_IMTITLE); + if ((lstr = strlen (objname)) < 8) { + for (i = lstr; i < 8; i++) + objname[i] = ' '; + objname[8] = 0; + } + hputs (fitsheader,"OBJECT",objname); + hputcom (fitsheader,"OBJECT", "IRAF .imh title"); + free (objname); + fhead = fhead + 80; + + /* Save physical axis lengths so image file can be read */ + n = irafgeti4 (irafheader, imphyslen); + hputi4 (fitsheader, "NPAXIS1", n); + hputcom (fitsheader,"NPAXIS1", "IRAF .imh physical naxis[1]"); + fhead = fhead + 80; + if (nax > 1) { + n = irafgeti4 (irafheader, imphyslen+4); + hputi4 (fitsheader, "NPAXIS2", n); + hputcom (fitsheader,"NPAXIS2", "IRAF .imh physical naxis[2]"); + fhead = fhead + 80; + } + if (nax > 2) { + n = irafgeti4 (irafheader, imphyslen+8); + hputi4 (fitsheader, "NPAXIS3", n); + hputcom (fitsheader,"NPAXIS3", "IRAF .imh physical naxis[3]"); + fhead = fhead + 80; + } + if (nax > 3) { + n = irafgeti4 (irafheader, imphyslen+12); + hputi4 (fitsheader, "NPAXIS4", n); + hputcom (fitsheader,"NPAXIS4", "IRAF .imh physical naxis[4]"); + fhead = fhead + 80; + } + + /* Save image header filename in header */ + hputs (fitsheader,"IMHFILE",hdrname); + hputcom (fitsheader,"IMHFILE", "IRAF header file name"); + fhead = fhead + 80; + + /* Save image pixel file pathname in header */ + if (imhver == 2) + pixname = irafgetc (irafheader, IM2_PIXFILE, SZ_IM2PIXFILE); + else + pixname = irafgetc2 (irafheader, IM_PIXFILE, SZ_IMPIXFILE); + if (strncmp(pixname, "HDR", 3) == 0 ) { + newpixname = same_path (pixname, hdrname); + free (pixname); + pixname = newpixname; + } + if (strchr (pixname, '/') == NULL && strchr (pixname, '$') == NULL) { + newpixname = same_path (pixname, hdrname); + free (pixname); + pixname = newpixname; + } + + if ((bang = strchr (pixname, '!')) != NULL ) + hputs (fitsheader,"PIXFILE",bang+1); + else + hputs (fitsheader,"PIXFILE",pixname); + free (pixname); + hputcom (fitsheader,"PIXFILE", "IRAF .pix pixel file"); + fhead = fhead + 80; + + /* Save image offset from star of pixel file */ + pixoff = irafgeti4 (irafheader, impixoff); + pixoff = (pixoff - 1) * 2; + hputi4 (fitsheader, "PIXOFF", pixoff); + hputcom (fitsheader,"PIXOFF", "IRAF .pix pixel offset (Do not change!)"); + fhead = fhead + 80; + + /* Save IRAF file format version in header */ + hputi4 (fitsheader,"IMHVER",imhver); + hputcom (fitsheader,"IMHVER", "IRAF .imh format version (1 or 2)"); + fhead = fhead + 80; + + /* Save flag as to whether to swap IRAF data for this file and machine */ + if (swapdata) + hputl (fitsheader, "PIXSWAP", 1); + else + hputl (fitsheader, "PIXSWAP", 0); + hputcom (fitsheader,"PIXSWAP", "IRAF pixels, FITS byte orders differ if T"); + fhead = fhead + 80; + + /* Add user portion of IRAF header to FITS header */ + fitsline[80] = 0; + if (imhver == 2) { + imu = LEN_IM2HDR; + chead = irafheader; + j = 0; + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + for (i = imu; i < nbiraf; i++) { + irafchar = chead[i]; + if (irafchar == 0) + break; + else if (irafchar == 10) { + (void)strncpy (fhead, fitsline, 80); + /* fprintf (stderr,"%80s\n",fitsline); */ + if (strncmp (fitsline, "OBJECT ", 7) != 0) { + fhead = fhead + 80; + } + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + j = 0; + } + else { + if (j > 80) { + if (strncmp (fitsline, "OBJECT ", 7) != 0) { + (void)strncpy (fhead, fitsline, 80); + /* fprintf (stderr,"%80s\n",fitsline); */ + j = 9; + fhead = fhead + 80; + } + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + } + if (irafchar > 32 && irafchar < 127) + fitsline[j] = irafchar; + j++; + } + } + } + else { + imu = LEN_IMHDR; + chead = irafheader; + if (swaphead == 1) + ib = 0; + else + ib = 1; + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + j = 0; + for (i = imu; i < nbiraf; i=i+2) { + irafchar = chead[i+ib]; + if (irafchar == 0) + break; + else if (irafchar == 10) { + if (strncmp (fitsline, "OBJECT ", 7) != 0) { + (void)strncpy (fhead, fitsline, 80); + fhead = fhead + 80; + } + /* fprintf (stderr,"%80s\n",fitsline); */ + j = 0; + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + } + else { + if (j > 80) { + if (strncmp (fitsline, "OBJECT ", 7) != 0) { + (void)strncpy (fhead, fitsline, 80); + j = 9; + fhead = fhead + 80; + } + /* fprintf (stderr,"%80s\n",fitsline); */ + for (k = 0; k < 80; k++) + fitsline[k] = ' '; + } + if (irafchar > 32 && irafchar < 127) + fitsline[j] = irafchar; + j++; + } + } + } + + /* Add END to last line */ + (void)strncpy (fhead, endline, 80); + + /* Find end of last 2880-byte block of header */ + fhead = ksearch (fitsheader, "END") + 80; + nblock = *nbfits / 2880; + fhead1 = fitsheader + (nblock * 2880); + *fitssize = fhead - fitsheader; /* no. of bytes to end of END keyword */ + + /* Pad rest of header with spaces */ + strncpy (endline," ",3); + for (fp = fhead; fp < fhead1; fp = fp + 80) { + (void)strncpy (fp, endline,80); + } + + return (*status); +} + +/*--------------------------------------------------------------------------*/ +/* Put filename and header path together */ + +static char *same_path ( + +char *pixname, /* IRAF pixel file pathname */ +char *hdrname) /* IRAF image header file pathname */ + +{ + int len; + char *newpixname; + + newpixname = (char *) calloc (SZ_IM2PIXFILE, sizeof (char)); + + /* Pixel file is in same directory as header */ + if (strncmp(pixname, "HDR$", 4) == 0 ) { + (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); + + /* find the end of the pathname */ + len = strlen (newpixname); +#ifndef VMS + while( (len > 0) && (newpixname[len-1] != '/') ) +#else + while( (len > 0) && (newpixname[len-1] != ']') && (newpixname[len-1] != ':') ) +#endif + len--; + + /* add name */ + newpixname[len] = '\0'; + (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); + } + + /* Bare pixel file with no path is assumed to be same as HDR$filename */ + else if (strchr (pixname, '/') == NULL && strchr (pixname, '$') == NULL) { + (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); + + /* find the end of the pathname */ + len = strlen (newpixname); +#ifndef VMS + while( (len > 0) && (newpixname[len-1] != '/') ) +#else + while( (len > 0) && (newpixname[len-1] != ']') && (newpixname[len-1] != ':') ) +#endif + len--; + + /* add name */ + newpixname[len] = '\0'; + (void)strncat (newpixname, pixname, SZ_IM2PIXFILE); + } + + /* Pixel file has same name as header file, but with .pix extension */ + else if (strncmp (pixname, "HDR", 3) == 0) { + + /* load entire header name string into name buffer */ + (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); + len = strlen (newpixname); + newpixname[len-3] = 'p'; + newpixname[len-2] = 'i'; + newpixname[len-1] = 'x'; + } + + return (newpixname); +} + +/*--------------------------------------------------------------------------*/ +static int isirafswapped ( + +char *irafheader, /* IRAF image header */ +int offset) /* Number of bytes to skip before number */ + + /* check if the IRAF file is in big endian (sun) format (= 0) or not */ + /* This is done by checking the 4 byte integer in the header that */ + /* represents the iraf pixel type. This 4-byte word is guaranteed to */ + /* have the least sig byte != 0 and the most sig byte = 0, so if the */ + /* first byte of the word != 0, then the file in little endian format */ + /* like on an Alpha machine. */ + +{ + int swapped; + + if (irafheader[offset] != 0) + swapped = 1; + else + swapped = 0; + + return (swapped); +} +/*--------------------------------------------------------------------------*/ +static int irafgeti4 ( + +char *irafheader, /* IRAF image header */ +int offset) /* Number of bytes to skip before number */ + +{ + char *ctemp, *cheader; + int temp; + + cheader = irafheader; + ctemp = (char *) &temp; + + if (machswap() != swaphead) { + ctemp[3] = cheader[offset]; + ctemp[2] = cheader[offset+1]; + ctemp[1] = cheader[offset+2]; + ctemp[0] = cheader[offset+3]; + } + else { + ctemp[0] = cheader[offset]; + ctemp[1] = cheader[offset+1]; + ctemp[2] = cheader[offset+2]; + ctemp[3] = cheader[offset+3]; + } + return (temp); +} + +/*--------------------------------------------------------------------------*/ +/* IRAFGETC2 -- Get character string from arbitrary part of v.1 IRAF header */ + +static char *irafgetc2 ( + +char *irafheader, /* IRAF image header */ +int offset, /* Number of bytes to skip before string */ +int nc) /* Maximum number of characters in string */ + +{ + char *irafstring, *string; + + irafstring = irafgetc (irafheader, offset, 2*(nc+1)); + string = iraf2str (irafstring, nc); + free (irafstring); + + return (string); +} + +/*--------------------------------------------------------------------------*/ +/* IRAFGETC -- Get character string from arbitrary part of IRAF header */ + +static char *irafgetc ( + +char *irafheader, /* IRAF image header */ +int offset, /* Number of bytes to skip before string */ +int nc) /* Maximum number of characters in string */ + +{ + char *ctemp, *cheader; + int i; + + cheader = irafheader; + ctemp = (char *) calloc (nc+1, 1); + if (ctemp == NULL) { + ffpmsg("IRAFGETC Cannot allocate memory for string variable"); + return (NULL); + } + for (i = 0; i < nc; i++) { + ctemp[i] = cheader[offset+i]; + if (ctemp[i] > 0 && ctemp[i] < 32) + ctemp[i] = ' '; + } + + return (ctemp); +} + +/*--------------------------------------------------------------------------*/ +/* Convert IRAF 2-byte/char string to 1-byte/char string */ + +static char *iraf2str ( + +char *irafstring, /* IRAF 2-byte/character string */ +int nchar) /* Number of characters in string */ +{ + char *string; + int i, j; + + string = (char *) calloc (nchar+1, 1); + if (string == NULL) { + ffpmsg("IRAF2STR Cannot allocate memory for string variable"); + return (NULL); + } + + /* the chars are in bytes 1, 3, 5, ... if bigendian format (SUN) */ + /* else in bytes 0, 2, 4, ... if little endian format (Alpha) */ + + if (irafstring[0] != 0) + j = 0; + else + j = 1; + + /* Convert appropriate byte of input to output character */ + for (i = 0; i < nchar; i++) { + string[i] = irafstring[j]; + j = j + 2; + } + + return (string); +} + +/*--------------------------------------------------------------------------*/ +/* IRAFSWAP -- Reverse bytes of any type of vector in place */ + +static void irafswap ( + +int bitpix, /* Number of bits per pixel */ + /* 16 = short, -16 = unsigned short, 32 = int */ + /* -32 = float, -64 = double */ +char *string, /* Address of starting point of bytes to swap */ +int nbytes) /* Number of bytes to swap */ + +{ + switch (bitpix) { + + case 16: + if (nbytes < 2) return; + irafswap2 (string,nbytes); + break; + + case 32: + if (nbytes < 4) return; + irafswap4 (string,nbytes); + break; + + case -16: + if (nbytes < 2) return; + irafswap2 (string,nbytes); + break; + + case -32: + if (nbytes < 4) return; + irafswap4 (string,nbytes); + break; + + case -64: + if (nbytes < 8) return; + irafswap8 (string,nbytes); + break; + + } + return; +} + +/*--------------------------------------------------------------------------*/ +/* IRAFSWAP2 -- Swap bytes in string in place */ + +static void irafswap2 ( + +char *string, /* Address of starting point of bytes to swap */ +int nbytes) /* Number of bytes to swap */ + +{ + char *sbyte, temp, *slast; + + slast = string + nbytes; + sbyte = string; + while (sbyte < slast) { + temp = sbyte[0]; + sbyte[0] = sbyte[1]; + sbyte[1] = temp; + sbyte= sbyte + 2; + } + return; +} + +/*--------------------------------------------------------------------------*/ +/* IRAFSWAP4 -- Reverse bytes of Integer*4 or Real*4 vector in place */ + +static void irafswap4 ( + +char *string, /* Address of Integer*4 or Real*4 vector */ +int nbytes) /* Number of bytes to reverse */ + +{ + char *sbyte, *slast; + char temp0, temp1, temp2, temp3; + + slast = string + nbytes; + sbyte = string; + while (sbyte < slast) { + temp3 = sbyte[0]; + temp2 = sbyte[1]; + temp1 = sbyte[2]; + temp0 = sbyte[3]; + sbyte[0] = temp0; + sbyte[1] = temp1; + sbyte[2] = temp2; + sbyte[3] = temp3; + sbyte = sbyte + 4; + } + + return; +} + +/*--------------------------------------------------------------------------*/ +/* IRAFSWAP8 -- Reverse bytes of Real*8 vector in place */ + +static void irafswap8 ( + +char *string, /* Address of Real*8 vector */ +int nbytes) /* Number of bytes to reverse */ + +{ + char *sbyte, *slast; + char temp[8]; + + slast = string + nbytes; + sbyte = string; + while (sbyte < slast) { + temp[7] = sbyte[0]; + temp[6] = sbyte[1]; + temp[5] = sbyte[2]; + temp[4] = sbyte[3]; + temp[3] = sbyte[4]; + temp[2] = sbyte[5]; + temp[1] = sbyte[6]; + temp[0] = sbyte[7]; + sbyte[0] = temp[0]; + sbyte[1] = temp[1]; + sbyte[2] = temp[2]; + sbyte[3] = temp[3]; + sbyte[4] = temp[4]; + sbyte[5] = temp[5]; + sbyte[6] = temp[6]; + sbyte[7] = temp[7]; + sbyte = sbyte + 8; + } + return; +} + +/*--------------------------------------------------------------------------*/ +static int +machswap (void) + +{ + char *ctest; + int itest; + + itest = 1; + ctest = (char *)&itest; + if (*ctest) + return (1); + else + return (0); +} + +/*--------------------------------------------------------------------------*/ +/* the following routines were originally in hget.c */ +/*--------------------------------------------------------------------------*/ + + +static int lhead0 = 0; + +/*--------------------------------------------------------------------------*/ + +/* Extract long value for variable from FITS header string */ + +static int +hgeti4 (hstring,keyword,ival) + +char *hstring; /* character string containing FITS header information + in the format = {/ } */ +char *keyword; /* character string containing the name of the keyword + the value of which is returned. hget searches for a + line beginning with this string. if "[n]" is present, + the n'th token in the value is returned. + (the first 8 characters must be unique) */ +int *ival; +{ +char *value; +double dval; +int minint; +char val[30]; + +/* Get value and comment from header string */ + value = hgetc (hstring,keyword); + +/* Translate value from ASCII to binary */ + if (value != NULL) { + minint = -MAXINT - 1; + strcpy (val, value); + dval = atof (val); + if (dval+0.001 > MAXINT) + *ival = MAXINT; + else if (dval >= 0) + *ival = (int) (dval + 0.001); + else if (dval-0.001 < minint) + *ival = minint; + else + *ival = (int) (dval - 0.001); + return (1); + } + else { + return (0); + } +} + +/*-------------------------------------------------------------------*/ +/* Extract string value for variable from FITS header string */ + +static int +hgets (hstring, keyword, lstr, str) + +char *hstring; /* character string containing FITS header information + in the format = {/ } */ +char *keyword; /* character string containing the name of the keyword + the value of which is returned. hget searches for a + line beginning with this string. if "[n]" is present, + the n'th token in the value is returned. + (the first 8 characters must be unique) */ +int lstr; /* Size of str in characters */ +char *str; /* String (returned) */ +{ + char *value; + int lval; + +/* Get value and comment from header string */ + value = hgetc (hstring,keyword); + + if (value != NULL) { + lval = strlen (value); + if (lval < lstr) + strcpy (str, value); + else if (lstr > 1) + strncpy (str, value, lstr-1); + else + str[0] = value[0]; + return (1); + } + else + return (0); +} + +/*-------------------------------------------------------------------*/ +/* Extract character value for variable from FITS header string */ + +static char * +hgetc (hstring,keyword0) + +char *hstring; /* character string containing FITS header information + in the format = {/ } */ +char *keyword0; /* character string containing the name of the keyword + the value of which is returned. hget searches for a + line beginning with this string. if "[n]" is present, + the n'th token in the value is returned. + (the first 8 characters must be unique) */ +{ + static char cval[80]; + char *value; + char cwhite[2]; + char squot[2], dquot[2], lbracket[2], rbracket[2], slash[2], comma[2]; + char keyword[81]; /* large for ESO hierarchical keywords */ + char line[100]; + char *vpos, *cpar = NULL; + char *q1, *q2 = NULL, *v1, *v2, *c1, *brack1, *brack2; + int ipar, i; + + squot[0] = 39; + squot[1] = 0; + dquot[0] = 34; + dquot[1] = 0; + lbracket[0] = 91; + lbracket[1] = 0; + comma[0] = 44; + comma[1] = 0; + rbracket[0] = 93; + rbracket[1] = 0; + slash[0] = 47; + slash[1] = 0; + +/* Find length of variable name */ + strncpy (keyword,keyword0, sizeof(keyword)-1); + brack1 = strsrch (keyword,lbracket); + if (brack1 == NULL) + brack1 = strsrch (keyword,comma); + if (brack1 != NULL) { + *brack1 = '\0'; + brack1++; + } + +/* Search header string for variable name */ + vpos = ksearch (hstring,keyword); + +/* Exit if not found */ + if (vpos == NULL) { + return (NULL); + } + +/* Initialize line to nulls */ + for (i = 0; i < 100; i++) + line[i] = 0; + +/* In standard FITS, data lasts until 80th character */ + +/* Extract entry for this variable from the header */ + strncpy (line,vpos,80); + +/* check for quoted value */ + q1 = strsrch (line,squot); + c1 = strsrch (line,slash); + if (q1 != NULL) { + if (c1 != NULL && q1 < c1) + q2 = strsrch (q1+1,squot); + else if (c1 == NULL) + q2 = strsrch (q1+1,squot); + else + q1 = NULL; + } + else { + q1 = strsrch (line,dquot); + if (q1 != NULL) { + if (c1 != NULL && q1 < c1) + q2 = strsrch (q1+1,dquot); + else if (c1 == NULL) + q2 = strsrch (q1+1,dquot); + else + q1 = NULL; + } + else { + q1 = NULL; + q2 = line + 10; + } + } + +/* Extract value and remove excess spaces */ + if (q1 != NULL) { + v1 = q1 + 1;; + v2 = q2; + c1 = strsrch (q2,"/"); + } + else { + v1 = strsrch (line,"=") + 1; + c1 = strsrch (line,"/"); + if (c1 != NULL) + v2 = c1; + else + v2 = line + 79; + } + +/* Ignore leading spaces */ + while (*v1 == ' ' && v1 < v2) { + v1++; + } + +/* Drop trailing spaces */ + *v2 = '\0'; + v2--; + while (*v2 == ' ' && v2 > v1) { + *v2 = '\0'; + v2--; + } + + if (!strcmp (v1, "-0")) + v1++; + strcpy (cval,v1); + value = cval; + +/* If keyword has brackets, extract appropriate token from value */ + if (brack1 != NULL) { + brack2 = strsrch (brack1,rbracket); + if (brack2 != NULL) + *brack2 = '\0'; + ipar = atoi (brack1); + if (ipar > 0) { + cwhite[0] = ' '; + cwhite[1] = '\0'; + for (i = 1; i <= ipar; i++) { + cpar = strtok (v1,cwhite); + v1 = NULL; + } + if (cpar != NULL) { + strcpy (cval,cpar); + } + else + value = NULL; + } + } + + return (value); +} + + +/*-------------------------------------------------------------------*/ +/* Find beginning of fillable blank line before FITS header keyword line */ + +static char * +blsearch (hstring,keyword) + +/* Find entry for keyword keyword in FITS header string hstring. + (the keyword may have a maximum of eight letters) + NULL is returned if the keyword is not found */ + +char *hstring; /* character string containing fits-style header + information in the format = {/ } + the default is that each entry is 80 characters long; + however, lines may be of arbitrary length terminated by + nulls, carriage returns or linefeeds, if packed is true. */ +char *keyword; /* character string containing the name of the variable + to be returned. ksearch searches for a line beginning + with this string. The string may be a character + literal or a character variable terminated by a null + or '$'. it is truncated to 8 characters. */ +{ + char *loc, *headnext, *headlast, *pval, *lc, *line; + char *bval; + int icol, nextchar, lkey, nleft, lhstr; + + pval = 0; + + /* Search header string for variable name */ + if (lhead0) + lhstr = lhead0; + else { + lhstr = 0; + while (lhstr < 57600 && hstring[lhstr] != 0) + lhstr++; + } + headlast = hstring + lhstr; + headnext = hstring; + pval = NULL; + while (headnext < headlast) { + nleft = headlast - headnext; + loc = strnsrch (headnext, keyword, nleft); + + /* Exit if keyword is not found */ + if (loc == NULL) { + break; + } + + icol = (loc - hstring) % 80; + lkey = strlen (keyword); + nextchar = (int) *(loc + lkey); + + /* If this is not in the first 8 characters of a line, keep searching */ + if (icol > 7) + headnext = loc + 1; + + /* If parameter name in header is longer, keep searching */ + else if (nextchar != 61 && nextchar > 32 && nextchar < 127) + headnext = loc + 1; + + /* If preceeding characters in line are not blanks, keep searching */ + else { + line = loc - icol; + for (lc = line; lc < loc; lc++) { + if (*lc != ' ') + headnext = loc + 1; + } + + /* Return pointer to start of line if match */ + if (loc >= headnext) { + pval = line; + break; + } + } + } + + /* Return NULL if keyword is found at start of FITS header string */ + if (pval == NULL) + return (pval); + + /* Return NULL if found the first keyword in the header */ + if (pval == hstring) + return (NULL); + + /* Find last nonblank line before requested keyword */ + bval = pval - 80; + while (!strncmp (bval," ",8)) + bval = bval - 80; + bval = bval + 80; + + /* Return pointer to calling program if blank lines found */ + if (bval < pval) + return (bval); + else + return (NULL); +} + + +/*-------------------------------------------------------------------*/ +/* Find FITS header line containing specified keyword */ + +static char *ksearch (hstring,keyword) + +/* Find entry for keyword keyword in FITS header string hstring. + (the keyword may have a maximum of eight letters) + NULL is returned if the keyword is not found */ + +char *hstring; /* character string containing fits-style header + information in the format = {/ } + the default is that each entry is 80 characters long; + however, lines may be of arbitrary length terminated by + nulls, carriage returns or linefeeds, if packed is true. */ +char *keyword; /* character string containing the name of the variable + to be returned. ksearch searches for a line beginning + with this string. The string may be a character + literal or a character variable terminated by a null + or '$'. it is truncated to 8 characters. */ +{ + char *loc, *headnext, *headlast, *pval, *lc, *line; + int icol, nextchar, lkey, nleft, lhstr; + + pval = 0; + +/* Search header string for variable name */ + if (lhead0) + lhstr = lhead0; + else { + lhstr = 0; + while (lhstr < 57600 && hstring[lhstr] != 0) + lhstr++; + } + headlast = hstring + lhstr; + headnext = hstring; + pval = NULL; + while (headnext < headlast) { + nleft = headlast - headnext; + loc = strnsrch (headnext, keyword, nleft); + + /* Exit if keyword is not found */ + if (loc == NULL) { + break; + } + + icol = (loc - hstring) % 80; + lkey = strlen (keyword); + nextchar = (int) *(loc + lkey); + + /* If this is not in the first 8 characters of a line, keep searching */ + if (icol > 7) + headnext = loc + 1; + + /* If parameter name in header is longer, keep searching */ + else if (nextchar != 61 && nextchar > 32 && nextchar < 127) + headnext = loc + 1; + + /* If preceeding characters in line are not blanks, keep searching */ + else { + line = loc - icol; + for (lc = line; lc < loc; lc++) { + if (*lc != ' ') + headnext = loc + 1; + } + + /* Return pointer to start of line if match */ + if (loc >= headnext) { + pval = line; + break; + } + } + } + +/* Return pointer to calling program */ + return (pval); + +} + +/*-------------------------------------------------------------------*/ +/* Find string s2 within null-terminated string s1 */ + +static char * +strsrch (s1, s2) + +char *s1; /* String to search */ +char *s2; /* String to look for */ + +{ + int ls1; + ls1 = strlen (s1); + return (strnsrch (s1, s2, ls1)); +} + +/*-------------------------------------------------------------------*/ +/* Find string s2 within string s1 */ + +static char * +strnsrch (s1, s2, ls1) + +char *s1; /* String to search */ +char *s2; /* String to look for */ +int ls1; /* Length of string being searched */ + +{ + char *s,*s1e; + char cfirst,clast; + int i,ls2; + + /* Return null string if either pointer is NULL */ + if (s1 == NULL || s2 == NULL) + return (NULL); + + /* A zero-length pattern is found in any string */ + ls2 = strlen (s2); + if (ls2 ==0) + return (s1); + + /* Only a zero-length string can be found in a zero-length string */ + if (ls1 ==0) + return (NULL); + + cfirst = s2[0]; + clast = s2[ls2-1]; + s1e = s1 + ls1 - ls2 + 1; + s = s1; + while (s < s1e) { + + /* Search for first character in pattern string */ + if (*s == cfirst) { + + /* If single character search, return */ + if (ls2 == 1) + return (s); + + /* Search for last character in pattern string if first found */ + if (s[ls2-1] == clast) { + + /* If two-character search, return */ + if (ls2 == 2) + return (s); + + /* If 3 or more characters, check for rest of search string */ + i = 1; + while (i < ls2 && s[i] == s2[i]) + i++; + + /* If entire string matches, return */ + if (i >= ls2) + return (s); + } + } + s++; + } + return (NULL); +} + +/*-------------------------------------------------------------------*/ +/* the following routines were originally in hget.c */ +/*-------------------------------------------------------------------*/ +/* HPUTI4 - Set int keyword = ival in FITS header string */ + +static void +hputi4 (hstring,keyword,ival) + + char *hstring; /* character string containing FITS-style header + information in the format + = {/ } + each entry is padded with spaces to 80 characters */ + + char *keyword; /* character string containing the name of the variable + to be returned. hput searches for a line beginning + with this string, and if there isn't one, creates one. + The first 8 characters of keyword must be unique. */ + int ival; /* int number */ +{ + char value[30]; + + /* Translate value from binary to ASCII */ + sprintf (value,"%d",ival); + + /* Put value into header string */ + hputc (hstring,keyword,value); + + /* Return to calling program */ + return; +} + +/*-------------------------------------------------------------------*/ + +/* HPUTL - Set keyword = F if lval=0, else T, in FITS header string */ + +static void +hputl (hstring, keyword,lval) + +char *hstring; /* FITS header */ +char *keyword; /* Keyword name */ +int lval; /* logical variable (0=false, else true) */ +{ + char value[8]; + + /* Translate value from binary to ASCII */ + if (lval) + strcpy (value, "T"); + else + strcpy (value, "F"); + + /* Put value into header string */ + hputc (hstring,keyword,value); + + /* Return to calling program */ + return; +} + +/*-------------------------------------------------------------------*/ + +/* HPUTS - Set character string keyword = 'cval' in FITS header string */ + +static void +hputs (hstring,keyword,cval) + +char *hstring; /* FITS header */ +char *keyword; /* Keyword name */ +char *cval; /* character string containing the value for variable + keyword. trailing and leading blanks are removed. */ +{ + char squot = 39; + char value[70]; + int lcval; + + /* find length of variable string */ + + lcval = strlen (cval); + if (lcval > 67) + lcval = 67; + + /* Put quotes around string */ + value[0] = squot; + strncpy (&value[1],cval,lcval); + value[lcval+1] = squot; + value[lcval+2] = 0; + + /* Put value into header string */ + hputc (hstring,keyword,value); + + /* Return to calling program */ + return; +} + +/*---------------------------------------------------------------------*/ +/* HPUTC - Set character string keyword = value in FITS header string */ + +static void +hputc (hstring,keyword,value) + +char *hstring; +char *keyword; +char *value; /* character string containing the value for variable + keyword. trailing and leading blanks are removed. */ +{ + char squot = 39; + char line[100]; + char newcom[50]; + char blank[80]; + char *v, *vp, *v1, *v2, *q1, *q2, *c1, *ve; + int lkeyword, lcom, lval, lc, i; + + for (i = 0; i < 80; i++) + blank[i] = ' '; + + /* find length of keyword and value */ + lkeyword = strlen (keyword); + lval = strlen (value); + + /* If COMMENT or HISTORY, always add it just before the END */ + if (lkeyword == 7 && (strncmp (keyword,"COMMENT",7) == 0 || + strncmp (keyword,"HISTORY",7) == 0)) { + + /* Find end of header */ + v1 = ksearch (hstring,"END"); + v2 = v1 + 80; + + /* Move END down one line */ + strncpy (v2, v1, 80); + + /* Insert keyword */ + strncpy (v1,keyword,7); + + /* Pad with spaces */ + for (vp = v1+lkeyword; vp < v2; vp++) + *vp = ' '; + + /* Insert comment */ + strncpy (v1+9,value,lval); + return; + } + + /* Otherwise search for keyword */ + else + v1 = ksearch (hstring,keyword); + + /* If parameter is not found, find a place to put it */ + if (v1 == NULL) { + + /* First look for blank lines before END */ + v1 = blsearch (hstring, "END"); + + /* Otherwise, create a space for it at the end of the header */ + if (v1 == NULL) { + ve = ksearch (hstring,"END"); + v1 = ve; + v2 = v1 + 80; + strncpy (v2, ve, 80); + } + else + v2 = v1 + 80; + lcom = 0; + newcom[0] = 0; + } + + /* Otherwise, extract the entry for this keyword from the header */ + else { + strncpy (line, v1, 80); + line[80] = 0; + v2 = v1 + 80; + + /* check for quoted value */ + q1 = strchr (line, squot); + if (q1 != NULL) + q2 = strchr (q1+1,squot); + else + q2 = line; + + /* extract comment and remove trailing spaces */ + + c1 = strchr (q2,'/'); + if (c1 != NULL) { + lcom = 80 - (c1 - line); + strncpy (newcom, c1+1, lcom); + vp = newcom + lcom - 1; + while (vp-- > newcom && *vp == ' ') + *vp = 0; + lcom = strlen (newcom); + } + else { + newcom[0] = 0; + lcom = 0; + } + } + + /* Fill new entry with spaces */ + for (vp = v1; vp < v2; vp++) + *vp = ' '; + + /* Copy keyword to new entry */ + strncpy (v1, keyword, lkeyword); + + /* Add parameter value in the appropriate place */ + vp = v1 + 8; + *vp = '='; + vp = v1 + 9; + *vp = ' '; + vp = vp + 1; + if (*value == squot) { + strncpy (vp, value, lval); + if (lval+12 > 31) + lc = lval + 12; + else + lc = 30; + } + else { + vp = v1 + 30 - lval; + strncpy (vp, value, lval); + lc = 30; + } + + /* Add comment in the appropriate place */ + if (lcom > 0) { + if (lc+2+lcom > 80) + lcom = 78 - lc; + vp = v1 + lc + 2; /* Jul 16 1997: was vp = v1 + lc * 2 */ + *vp = '/'; + vp = vp + 1; + strncpy (vp, newcom, lcom); + for (v = vp + lcom; v < v2; v++) + *v = ' '; + } + + return; +} + +/*-------------------------------------------------------------------*/ +/* HPUTCOM - Set comment for keyword or on line in FITS header string */ + +static void +hputcom (hstring,keyword,comment) + + char *hstring; + char *keyword; + char *comment; +{ + char squot; + char line[100]; + int lkeyword, lcom; + char *vp, *v1, *v2, *c0 = NULL, *c1, *q1, *q2; + + squot = 39; + +/* Find length of variable name */ + lkeyword = strlen (keyword); + +/* If COMMENT or HISTORY, always add it just before the END */ + if (lkeyword == 7 && (strncmp (keyword,"COMMENT",7) == 0 || + strncmp (keyword,"HISTORY",7) == 0)) { + + /* Find end of header */ + v1 = ksearch (hstring,"END"); + v2 = v1 + 80; + strncpy (v2, v1, 80); + + /* blank out new line and insert keyword */ + for (vp = v1; vp < v2; vp++) + *vp = ' '; + strncpy (v1, keyword, lkeyword); + } + +/* search header string for variable name */ + else { + v1 = ksearch (hstring,keyword); + v2 = v1 + 80; + + /* if parameter is not found, return without doing anything */ + if (v1 == NULL) { + return; + } + + /* otherwise, extract entry for this variable from the header */ + strncpy (line, v1, 80); + + /* check for quoted value */ + q1 = strchr (line,squot); + if (q1 != NULL) + q2 = strchr (q1+1,squot); + else + q2 = NULL; + + if (q2 == NULL || q2-line < 31) + c0 = v1 + 31; + else + c0 = v1 + (q2-line) + 2; /* allan: 1997-09-30, was c0=q2+2 */ + + strncpy (c0, "/ ",2); + } + +/* create new entry */ + lcom = strlen (comment); + + if (lcom > 0) { + c1 = c0 + 2; + if (c1+lcom > v2) + lcom = v2 - c1; + strncpy (c1, comment, lcom); + } + +} diff --git a/software/cfitsio3040/iter_a.c b/software/cfitsio3040/iter_a.c new file mode 100644 index 000000000..19ea1d1c3 --- /dev/null +++ b/software/cfitsio3040/iter_a.c @@ -0,0 +1,147 @@ +#include +#include +#include +#include "fitsio.h" + +/* + This program illustrates how to use the CFITSIO iterator function. + It reads and modifies the input 'iter_a.fit' file by computing a + value for the 'rate' column as a function of the values in the other + 'counts' and 'time' columns. +*/ +main() +{ + extern flux_rate(); /* external work function is passed to the iterator */ + fitsfile *fptr; + iteratorCol cols[3]; /* structure used by the iterator function */ + int n_cols; + long rows_per_loop, offset; + + int status, nkeys, keypos, hdutype, ii, jj; + char filename[] = "iter_a.fit"; /* name of rate FITS file */ + + status = 0; + + fits_open_file(&fptr, filename, READWRITE, &status); /* open file */ + + /* move to the desired binary table extension */ + if (fits_movnam_hdu(fptr, BINARY_TBL, "RATE", 0, &status) ) + fits_report_error(stderr, status); /* print out error messages */ + + n_cols = 3; /* number of columns */ + + /* define input column structure members for the iterator function */ + fits_iter_set_by_name(&cols[0], fptr, "COUNTS", TLONG, InputCol); + fits_iter_set_by_name(&cols[1], fptr, "TIME", TFLOAT, InputCol); + fits_iter_set_by_name(&cols[2], fptr, "RATE", TFLOAT, OutputCol); + + rows_per_loop = 0; /* use default optimum number of rows */ + offset = 0; /* process all the rows */ + + /* apply the rate function to each row of the table */ + printf("Calling iterator function...%d\n", status); + + fits_iterate_data(n_cols, cols, offset, rows_per_loop, + flux_rate, 0L, &status); + + fits_close_file(fptr, &status); /* all done */ + + if (status) + fits_report_error(stderr, status); /* print out error messages */ + + return(status); +} +/*--------------------------------------------------------------------------*/ +int flux_rate(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *cols, void *user_strct ) + +/* + Sample iterator function that calculates the output flux 'rate' column + by dividing the input 'counts' by the 'time' column. + It also applies a constant deadtime correction factor if the 'deadtime' + keyword exists. Finally, this creates or updates the 'LIVETIME' + keyword with the sum of all the individual integration times. +*/ +{ + int ii, status = 0; + + /* declare variables static to preserve their values between calls */ + static long *counts; + static float *interval; + static float *rate; + static float deadtime, livetime; /* must preserve values between calls */ + + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + if (firstrow == 1) + { + if (ncols != 3) + return(-1); /* number of columns incorrect */ + + if (fits_iter_get_datatype(&cols[0]) != TLONG || + fits_iter_get_datatype(&cols[1]) != TFLOAT || + fits_iter_get_datatype(&cols[2]) != TFLOAT ) + return(-2); /* bad data type */ + + /* assign the input pointers to the appropriate arrays and null ptrs*/ + counts = (long *) fits_iter_get_array(&cols[0]); + interval = (float *) fits_iter_get_array(&cols[1]); + rate = (float *) fits_iter_get_array(&cols[2]); + + livetime = 0; /* initialize the total integration time */ + + /* try to get the deadtime keyword value */ + fits_read_key(cols[0].fptr, TFLOAT, "DEADTIME", &deadtime, '\0', + &status); + if (status) + { + deadtime = 1.0; /* default deadtime if keyword doesn't exist */ + } + else if (deadtime < 0. || deadtime > 1.0) + { + return(-1); /* bad deadtime value */ + } + + printf("deadtime = %f\n", deadtime); + } + + /*--------------------------------------------*/ + /* Main loop: process all the rows of data */ + /*--------------------------------------------*/ + + /* NOTE: 1st element of array is the null pixel value! */ + /* Loop from 1 to nrows, not 0 to nrows - 1. */ + + /* this version tests for null values */ + rate[0] = DOUBLENULLVALUE; /* define the value that represents null */ + + for (ii = 1; ii <= nrows; ii++) + { + if (counts[ii] == counts[0]) /* undefined counts value? */ + { + rate[ii] = DOUBLENULLVALUE; + } + else if (interval[ii] > 0.) + { + rate[ii] = counts[ii] / interval[ii] / deadtime; + livetime += interval[ii]; /* accumulate total integration time */ + } + else + return(-2); /* bad integration time */ + } + + /*-------------------------------------------------------*/ + /* Clean up procedures: after processing all the rows */ + /*-------------------------------------------------------*/ + + if (firstrow + nrows - 1 == totalrows) + { + /* update the LIVETIME keyword value */ + + fits_update_key(cols[0].fptr, TFLOAT, "LIVETIME", &livetime, + "total integration time", &status); + printf("livetime = %f\n", livetime); + } + return(0); /* return successful status */ +} diff --git a/software/cfitsio3040/iter_a.f b/software/cfitsio3040/iter_a.f new file mode 100644 index 000000000..e62218973 --- /dev/null +++ b/software/cfitsio3040/iter_a.f @@ -0,0 +1,224 @@ + program f77iterate_a + + external flux_rate + integer ncols + parameter (ncols=3) + integer units(ncols), colnum(ncols), datatype(ncols) + integer iotype(ncols), offset, rows_per_loop, status + character*70 colname(ncols) + integer iunit, blocksize + character*80 fname + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + + + iunit = 15 + + units(1) = iunit + units(2) = iunit + units(3) = iunit + +C open the file + fname = 'iter_a.fit' + call ftopen(iunit,fname,1,blocksize,status) + +C move to the HDU containing the rate table + call ftmnhd(iunit, BINARY_TBL, 'RATE', 0, status) + +C Select iotypes for column data + iotype(1) = InputCol + iotype(2) = InputCol + iotype(3) = OutputCol + +C Select desired datatypes for column data + datatype(1) = TINT + datatype(2) = TFLOAT + datatype(3) = TFLOAT + +C find the column number corresponding to each column + call ftgcno( iunit, 0, 'counts', colnum(1), status ) + call ftgcno( iunit, 0, 'time', colnum(2), status ) + call ftgcno( iunit, 0, 'rate', colnum(3), status ) + +C use default optimum number of rows + rows_per_loop = 0 + offset = 0 + +C apply the rate function to each row of the table + print *, 'Calling iterator function...', status + +C although colname is not being used, still need to send a string +C array in the function + call ftiter( ncols, units, colnum, colname, datatype, iotype, + & offset, rows_per_loop, flux_rate, 3, status ) + + call ftclos(iunit, status) + stop + end + +C*************************************************************************** +C Sample iterator function that calculates the output flux 'rate' column +C by dividing the input 'counts' by the 'time' column. +C It also applies a constant deadtime correction factor if the 'deadtime' +C keyword exists. Finally, this creates or updates the 'LIVETIME' +C keyword with the sum of all the individual integration times. +C*************************************************************************** + subroutine flux_rate(totalrows, offset, firstrow, nrows, ncols, + & units, colnum, datatype, iotype, repeat, status, userData, + & counts, interval, rate ) + + integer totalrows, offset, firstrow, nrows, ncols + integer units(ncols), colnum(ncols), datatype(ncols) + integer iotype(ncols), repeat(ncols) + integer userData + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + + integer counts(*) + real interval(*),rate(*) + + integer ii, status + character*80 comment + +C********************************************************************** +C must preserve these values between calls + real deadtime, livetime + common /fluxblock/ deadtime, livetime +C********************************************************************** + + if (status .ne. 0) return + +C -------------------------------------------------------- +C Initialization procedures: execute on the first call +C -------------------------------------------------------- + if (firstrow .eq. 1) then + if (ncols .ne. 3) then +C wrong number of columns + status = -1 + return + endif + + if (datatype(1).ne.TINT .or. datatype(2).ne.TFLOAT .or. + & datatype(3).ne.TFLOAT ) then +C bad data type + status = -2 + return + endif + +C try to get the deadtime keyword value + call ftgkye( units(1), 'DEADTIME', deadtime, comment, status ) + + if (status.ne.0) then +C default deadtime if keyword doesn't exist + deadtime = 1.0 + status = 0 + elseif (deadtime .lt. 0.0 .or. deadtime .gt. 1.0) then +C bad deadtime value + status = -3 + return + endif + + print *, 'deadtime = ', deadtime + + livetime = 0.0 + endif + +C -------------------------------------------- +C Main loop: process all the rows of data +C -------------------------------------------- + +C NOTE: 1st element of array is the null pixel value! +C Loop over elements 2 to nrows+1, not 1 to nrows. + +C this version ignores null values + +C set the output null value to zero to ignore nulls */ + rate(1) = 0.0 + do 10 ii = 2,nrows+1 + if ( interval(ii) .gt. 0.0) then + rate(ii) = counts(ii) / interval(ii) / deadtime + livetime = livetime + interval(ii) + else +C Nonsensical negative time interval + status = -3 + return + endif + 10 continue + +C ------------------------------------------------------- +C Clean up procedures: after processing all the rows +C ------------------------------------------------------- + + if (firstrow + nrows - 1 .eq. totalrows) then +C update the LIVETIME keyword value + + call ftukye( units(1),'LIVETIME', livetime, 3, + & 'total integration time', status ) + print *,'livetime = ', livetime + + endif + + return + end diff --git a/software/cfitsio3040/iter_a.fit b/software/cfitsio3040/iter_a.fit new file mode 100644 index 000000000..0f951cfdc --- /dev/null +++ b/software/cfitsio3040/iter_a.fit @@ -0,0 +1,1111 @@ +SIMPLE = T / file does conform to FITS standard BITPIX = 16 / number of bits per data pixel NAXIS = 0 / number of data axes EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. HISTORY TASK:FMERGE on file ratefile.fits HISTORY fmerge3.1c at 29/12/97 16:1:37. HISTORY TASK:FMERGE on file m1.fits HISTORY fmerge3.1c at 29/12/97 16:2:30. HISTORY TASK:FMERGE on file m3.fits HISTORY fmerge3.1c at 29/12/97 16:3:38. HISTORY TASK:FMERGE on file m5.fits HISTORY fmerge3.1c at 29/12/97 16:4:15. HISTORY TASK:FMERGE on file m7.fits HISTORY fmerge3.1c at 29/12/97 16:5:1.0 HISTORY TASK:FMERGE on file m9.fits HISTORY fmerge3.1c at 29/12/97 16:6:48. END XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 12 / width of table in bytes NAXIS2 = 10000 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 3 / number of fields in each row TTYPE1 = 'Counts ' / label for field 1 TFORM1 = 'J ' / data format of field: 4-byte INTEGER TTYPE2 = 'Time ' / label for field 2 TFORM2 = 'E ' / data format of field: 4-byte REAL TTYPE3 = 'Rate ' / label for field 3 TFORM3 = 'E ' / data format of field: 4-byte REAL EXTNAME = 'rate ' / name of this binary table extension DEADTIME= 1.0 HISTORY This FITS file was created by the FCREATE task. HISTORY fcreate3.1 at 29/12/97 HISTORY File modified by user 'pence' with fv on 97-12-29T15:45:06 HISTORY File modified by user 'pence' with fv on 97-12-29T15:54:30 LIVETIME= 30554.5 / total integration time HISTORY TASK:FMERGE copied 26924 rows from file ratefile.fits HISTORY TASK:FMERGE appended 26924 rows from file r2.fits HISTORY TASK:FMERGE copied 53848 rows from file m1.fits HISTORY TASK:FMERGE appended 53848 rows from file m2.fits HISTORY TASK:FMERGE copied 107696 rows from file m3.fits HISTORY TASK:FMERGE appended 107696 rows from file m4.fits HISTORY TASK:FMERGE copied 215392 rows from file m5.fits HISTORY TASK:FMERGE appended 215392 rows from file m6.fits HISTORY TASK:FMERGE copied 430784 rows from file m7.fits HISTORY TASK:FMERGE appended 430784 rows from file m8.fits HISTORY TASK:FMERGE copied 861568 rows from file m9.fits HISTORY TASK:FMERGE appended 861568 rows from file m10.fits HISTORY File modified by user 'pence' with fv on 97-12-30T10:44:37 HISTORY File modified by user 'pence' with fv on 97-12-30T10:51:44 HISTORY ftabcopy V4.0a copied columns from ratefile.fits HISTORY ftabcopy V4.0a at 5/1/98 23:10:24 END +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@�?�@�dA A ?�@�?�@@@AUU-@�@� +?�A @@�?�@� \ No newline at end of file diff --git a/software/cfitsio3040/iter_b.c b/software/cfitsio3040/iter_b.c new file mode 100644 index 000000000..296f4e16d --- /dev/null +++ b/software/cfitsio3040/iter_b.c @@ -0,0 +1,114 @@ +#include +#include +#include +#include "fitsio.h" + +/* + This program illustrates how to use the CFITSIO iterator function. + It simply prints out the values in a character string and a logical + type column in a table, and toggles the value in the logical column + so that T -> F and F -> T. +*/ +main() +{ + extern str_iter(); /* external work function is passed to the iterator */ + fitsfile *fptr; + iteratorCol cols[2]; + int n_cols; + long rows_per_loop, offset; + int status = 0; + char filename[] = "iter_b.fit"; /* name of rate FITS file */ + + /* open the file and move to the correct extension */ + fits_open_file(&fptr, filename, READWRITE, &status); + fits_movnam_hdu(fptr, BINARY_TBL, "iter_test", 0, &status); + + /* define input column structure members for the iterator function */ + n_cols = 2; /* number of columns */ + + /* define input column structure members for the iterator function */ + fits_iter_set_by_name(&cols[0], fptr, "Avalue", TSTRING, InputOutputCol); + fits_iter_set_by_name(&cols[1], fptr, "Lvalue", TLOGICAL, InputOutputCol); + + rows_per_loop = 0; /* use default optimum number of rows */ + offset = 0; /* process all the rows */ + + /* apply the function to each row of the table */ + printf("Calling iterator function...%d\n", status); + + fits_iterate_data(n_cols, cols, offset, rows_per_loop, + str_iter, 0L, &status); + + fits_close_file(fptr, &status); /* all done */ + + if (status) + fits_report_error(stderr, status); /* print out error messages */ + + return(status); +} +/*--------------------------------------------------------------------------*/ +int str_iter(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *cols, void *user_strct ) + +/* + Sample iterator function. +*/ +{ + int ii; + + /* declare variables static to preserve their values between calls */ + static char **stringvals; + static char *logicalvals; + + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + if (firstrow == 1) + { + if (ncols != 2) + return(-1); /* number of columns incorrect */ + + if (fits_iter_get_datatype(&cols[0]) != TSTRING || + fits_iter_get_datatype(&cols[1]) != TLOGICAL ) + return(-2); /* bad data type */ + + /* assign the input pointers to the appropriate arrays */ + stringvals = (char **) fits_iter_get_array(&cols[0]); + logicalvals = (char *) fits_iter_get_array(&cols[1]); + + printf("Total rows, No. rows = %d %d\n",totalrows, nrows); + } + + /*------------------------------------------*/ + /* Main loop: process all the rows of data */ + /*------------------------------------------*/ + + /* NOTE: 1st element of array is the null pixel value! */ + /* Loop from 1 to nrows, not 0 to nrows - 1. */ + + for (ii = 1; ii <= nrows; ii++) + { + printf("%s %d\n", stringvals[ii], logicalvals[ii]); + if (logicalvals[ii]) + { + logicalvals[ii] = FALSE; + strcpy(stringvals[ii], "changed to false"); + } + else + { + logicalvals[ii] = TRUE; + strcpy(stringvals[ii], "changed to true"); + } + } + + /*-------------------------------------------------------*/ + /* Clean up procedures: after processing all the rows */ + /*-------------------------------------------------------*/ + + if (firstrow + nrows - 1 == totalrows) + { + /* no action required in this case */ + } + + return(0); +} diff --git a/software/cfitsio3040/iter_b.f b/software/cfitsio3040/iter_b.f new file mode 100644 index 000000000..7a2a6e7df --- /dev/null +++ b/software/cfitsio3040/iter_b.f @@ -0,0 +1,193 @@ + program f77iterate_b + +C external work function is passed to the iterator + external str_iter + + integer ncols + parameter (ncols=2) + integer units(ncols), colnum(ncols), datatype(ncols) + integer iotype(ncols), offset, rows_per_loop, status + character*70 colname(ncols) + + integer iunit, blocksize + character*80 fname + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + + status = 0 + + fname = 'iter_b.fit' + iunit = 15 + +C both columns are in the same FITS file + units(1) = iunit + units(2) = iunit + +C open the file and move to the correct extension + call ftopen(iunit,fname,1,blocksize,status) + call ftmnhd(iunit, BINARY_TBL, 'iter_test', 0, status) + +C define the desired columns by name + colname(1) = 'Avalue' + colname(2) = 'Lvalue' + +C leave column numbers undefined + colnum(1) = 0 + colnum(2) = 0 + +C define the desired datatype for each column: TSTRING & TLOGICAL + datatype(1) = TSTRING + datatype(2) = TLOGICAL + +C define whether columns are input, input/output, or output only +C Both in/out + iotype(1) = InputOutputCol + iotype(2) = InputOutputCol + +C use default optimum number of rows and process all the rows + rows_per_loop = 0 + offset = 0 + +C apply the function to each row of the table + print *,'Calling iterator function...', status + + call ftiter( ncols, units, colnum, colname, datatype, iotype, + & offset, rows_per_loop, str_iter, 0, status ) + + call ftclos(iunit, status) + +C print out error messages if problem + if (status.ne.0) call ftrprt('STDERR', status) + stop + end + +C-------------------------------------------------------------------------- +C +C Sample iterator function. +C +C-------------------------------------------------------------------------- + subroutine str_iter(totalrows, offset, firstrow, nrows, ncols, + & units, colnum, datatype, iotype, repeat, status, + & userData, stringCol, logicalCol ) + + integer totalrows,offset,firstrow,nrows,ncols,status + integer units(*),colnum(*),datatype(*),iotype(*),repeat(*) + integer userData + character*(*) stringCol(*) + logical logicalCol(*) + + integer ii + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + + if (status .ne. 0) return + +C -------------------------------------------------------- +C Initialization procedures: execute on the first call +C -------------------------------------------------------- + if (firstrow .eq. 1) then + if (ncols .ne. 2) then + status = -1 + return + endif + + if (datatype(1).ne.TSTRING .or. datatype(2).ne.TLOGICAL) then + status = -2 + return + endif + + print *,'Total rows, No. rows = ',totalrows, nrows + + endif + +C ------------------------------------------- +C Main loop: process all the rows of data +C ------------------------------------------- + +C NOTE: 1st element of array is the null pixel value! +C Loop over elements 2 to nrows+1, not 1 to nrows. + + do 10 ii=2,nrows+1 + print *, stringCol(ii), logicalCol(ii) + if( logicalCol(ii) ) then + logicalCol(ii) = .false. + stringCol(ii) = 'changed to false' + else + logicalCol(ii) = .true. + stringCol(ii) = 'changed to true' + endif + 10 continue + +C ------------------------------------------------------- +C Clean up procedures: after processing all the rows +C ------------------------------------------------------- + + if (firstrow + nrows - 1 .eq. totalrows) then +C no action required in this case + endif + + return + end + diff --git a/software/cfitsio3040/iter_b.fit b/software/cfitsio3040/iter_b.fit new file mode 100644 index 0000000000000000000000000000000000000000..74dcd9d62a2072e3d9820d9d5a412157bdec1429 GIT binary patch literal 408960 zcmeI*TW=fJ6$a4!lmqlZNl?eSI8It1540==1avV%25_E=5jnI5&}ex6=IkV;pVB>#aeAI+&Ad+2RlP}*)pE94FH*Zo zr^E3mZQ5!%t=7|>H@+H<-wfa0f8N2%eBSbQaaFI=YL>2=c9U-M^J&#q>8ANm&v%aM zKe!mY9ggy|d+XcZIj=va`j9Jq6`1jO*7e~(e2I6yk6AHd{Dh^@-_bc;>GiuqnAg2 z{rK#MgZ%7=qx`w=|MuzG%kRJYeBN<)9g{Y-*LAuWj0R~mY3k*qPM5P;lmE#b8GY>N zrmG~4>&f+UHDA5E>x%B*m(u6+`s;n&T}IPpl{_Pp+rGfR9PID+2dwg!T5nyNesrqt zh2QOTr*Fp2XM8|_009C72oQ)Z(A`dshL;yVrM*|fi}B#q*~wl}@$-C_yR6oCsja%3 z!awdIiTU|!fX|L*T~H#ha9$ydBh4ePop4k@1g{MdQj^{$pV9(4ic-FkIvZtcep?3U$=W+f2|)wOzv`j z=-<;|bUYlU(S=Pkbdw*S(*=WP>M9+cahbGo_y#CU&={q-Jo^S5{Mh1Z*3{qUo| z-tBq$`(ZyP_5bSc{rz~cz209=b}lx*xxe1+d6UKV%l@hB&3XD_aDLKVZ<8DUkNjh) zEe_1zzty7uervCr&F+tvdw&?pgAdPw{~OKk1PBlyK!5-N z0t5&UAP`BQ2<Jp z5!!9qBQ-`X1PBlyK!5-N0t5&UAV8o9?KbVkfdByl1PBlyK!5-N0t5&|5-38uO?#xq zsD%Il0t5&UAV7cs0RjXF6rtUw-8c{+K!5-N0t5&UAV7csfk*;HXt!yP)EKo8AV7cs z0RjXF5FkK+00E)h3=kkdfB*pk1PBlyK!5;&paMdB(8ef>009C72oNAZfB*pk1PBQ2 zW`FsO}lX*K!5-N0t5&UAV7cs0RoW(iqLM;9;q>EAwYlt0RjXF5FkK+ z009C;Xt!xM4g?4gAV7cs0RjXF5FkJxl0XsKZQ3I>MlA#g5FkK+009C72oNAZKxj7u z1PBlyK!5-N0t5&UAV46ffY2VaG0Gx9fB*pk1PBlyK!5-N0z$hPAV7cs0RjXF5FkK+ z009C)1%&pXjZqc>0t5&UAV7cs0RjXF5D?nU009C72oNAZfB*pk1PBlaDj>86ZH%%A z5FkK+009C72oNAZfPm0$1_%%!K!5-N0t5&UAV7dXPywMmXk(N`fB*pk1PBlyK!5-N z0tAZCKC9-NI_1YH76Jqa5FkK+009C72oNAZ;OPa5(B7_Z`^=ukPhXY_2oNAZfB*pk z1PBlyK!5;&BDCAI8wUae2oNAZfB*pk1PBly5J{j2?KbU^8lx5h1PBlyK!5-N0t5&U zAW(#Mn|9+sfB*pk1PBlyK!5-N0t6xn6rtUwJyK)TLVy4P0t5&UAV7cs0RjYy&~DRi z90(8~K!5-N0t5&UAV7dXB!MEd+q6e&j9Lf~AV7cs0RjXF5FkK+KoQz)+KmGN0t5&U zAV7cs0RjXF5QrpDgm#V%c1PBlyK!5-N0t5&U z2r3}72W^b92oNAZfB*pk1PBlyK!AYIZUzVtAV7cs0RjXF5FkK+Ku`gpJ!oT;MSuVS z0t5&UAV7cs0RjYsb~8YL009C72oNAZfB*pk1cC|(?Lix(ECK`w5FkK+009C72oNAp zgm!1`&1PBly zK!5-N0t5&UARx4x0RjXF5FkK+009C72oN9;R6uAC+8AXKAV7cs0RjXF5FkK+00E)h z3=kkdfB*pk1PBlyK!5;&paMdB(8ef>009C72oNAZfB*pk1PBQ2W`F +#include +#include +#include "fitsio.h" + +/* + This example program illustrates how to use the CFITSIO iterator function. + + This program creates a 2D histogram of the X and Y columns of an event + list. The 'main' routine just creates the empty new image, then executes + the 'writehisto' work function by calling the CFITSIO iterator function. + + 'writehisto' opens the FITS event list that contains the X and Y columns. + It then calls a second work function, calchisto, (by recursively calling + the CFITSIO iterator function) which actually computes the 2D histogram. +*/ + +/* Globally defined parameters */ + +long xsize = 480; /* size of the histogram image */ +long ysize = 480; +long xbinsize = 32; +long ybinsize = 32; + +main() +{ + extern writehisto(); /* external work function passed to the iterator */ + extern long xsize, ysize; /* size of image */ + + fitsfile *fptr; + iteratorCol cols[1]; + int n_cols, status = 0; + long n_per_loop, offset, naxes[2]; + char filename[] = "histoimg.fit"; /* name of FITS image */ + + remove(filename); /* delete previous version of the file if it exists */ + fits_create_file(&fptr, filename, &status); /* create new output image */ + + naxes[0] = xsize; + naxes[1] = ysize; + fits_create_img(fptr, LONG_IMG, 2, naxes, &status); /* create primary HDU */ + + n_cols = 1; /* number of columns */ + + /* define input column structure members for the iterator function */ + fits_iter_set_by_name(&cols[0], fptr, " ", TLONG, OutputCol); + + n_per_loop = -1; /* force whole array to be passed at one time */ + offset = 0; /* don't skip over any pixels */ + + /* execute the function to create and write the 2D histogram */ + printf("Calling writehisto iterator work function... %d\n", status); + + fits_iterate_data(n_cols, cols, offset, n_per_loop, + writehisto, 0L, &status); + + fits_close_file(fptr, &status); /* all done; close the file */ + + if (status) + fits_report_error(stderr, status); /* print out error messages */ + else + printf("Program completed successfully.\n"); + + return(status); +} +/*--------------------------------------------------------------------------*/ +int writehisto(long totaln, long offset, long firstn, long nvalues, + int narrays, iteratorCol *histo, void *userPointer) +/* + Iterator work function that writes out the 2D histogram. + The histogram values are calculated by another work function, calchisto. + + This routine is executed only once since nvalues was forced to = totaln. +*/ +{ + extern calchisto(); /* external function called by the iterator */ + long *histogram; + fitsfile *tblptr; + iteratorCol cols[2]; + int n_cols, status = 0; + long rows_per_loop, rowoffset; + char filename[] = "iter_c.fit"; /* name of FITS table */ + + /* do sanity checking of input values */ + if (totaln != nvalues) + return(-1); /* whole image must be passed at one time */ + + if (narrays != 1) + return(-2); /* number of images is incorrect */ + + if (fits_iter_get_datatype(&histo[0]) != TLONG) + return(-3); /* input array has wrong data type */ + + /* assign the FITS array pointer to the global histogram pointer */ + histogram = (long *) fits_iter_get_array(&histo[0]); + + /* open the file and move to the table containing the X and Y columns */ + fits_open_file(&tblptr, filename, READONLY, &status); + fits_movnam_hdu(tblptr, BINARY_TBL, "EVENTS", 0, &status); + if (status) + return(status); + + n_cols = 2; /* number of columns */ + + /* define input column structure members for the iterator function */ + fits_iter_set_by_name(&cols[0], tblptr, "X", TLONG, InputCol); + fits_iter_set_by_name(&cols[1], tblptr, "Y", TLONG, InputCol); + + rows_per_loop = 0; /* take default number of rows per interation */ + rowoffset = 0; + + /* calculate the histogram */ + printf("Calling calchisto iterator work function... %d\n", status); + + fits_iterate_data(n_cols, cols, rowoffset, rows_per_loop, + calchisto, histogram, &status); + + fits_close_file(tblptr, &status); /* all done */ + return(status); +} +/*--------------------------------------------------------------------------*/ +int calchisto(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *cols, void *userPointer) + +/* + Interator work function that calculates values for the 2D histogram. +*/ +{ + extern long xsize, ysize, xbinsize, ybinsize; + long ii, ihisto, xbin, ybin; + static long *xcol, *ycol, *histogram; /* static to preserve values */ + + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + if (firstrow == 1) + { + /* do sanity checking of input values */ + if (ncols != 2) + return(-3); /* number of arrays is incorrect */ + + if (fits_iter_get_datatype(&cols[0]) != TLONG || + fits_iter_get_datatype(&cols[1]) != TLONG) + return(-4); /* wrong datatypes */ + + /* assign the input array points to the X and Y arrays */ + xcol = (long *) fits_iter_get_array(&cols[0]); + ycol = (long *) fits_iter_get_array(&cols[1]); + histogram = (long *) userPointer; + + /* initialize the histogram image pixels = 0 */ + for (ii = 0; ii <= xsize * ysize; ii++) + histogram[ii] = 0L; + } + + /*------------------------------------------------------------------*/ + /* Main loop: increment the 2D histogram at position of each event */ + /*------------------------------------------------------------------*/ + + for (ii = 1; ii <= nrows; ii++) + { + xbin = xcol[ii] / xbinsize; + ybin = ycol[ii] / ybinsize; + + ihisto = ( ybin * xsize ) + xbin + 1; + histogram[ihisto]++; + } + + return(0); +} + diff --git a/software/cfitsio3040/iter_c.f b/software/cfitsio3040/iter_c.f new file mode 100644 index 000000000..f9abeaa80 --- /dev/null +++ b/software/cfitsio3040/iter_c.f @@ -0,0 +1,347 @@ + program f77iterate_c +C +C This example program illustrates how to use the CFITSIO iterator function. +C +C This program creates a 2D histogram of the X and Y columns of an event +C list. The 'main' routine just creates the empty new image, then executes +C the 'writehisto' work function by calling the CFITSIO iterator function. +C +C 'writehisto' opens the FITS event list that contains the X and Y columns. +C It then calls a second work function, calchisto, (by recursively calling +C the CFITSIO iterator function) which actually computes the 2D histogram. + +C external work function to be passed to the iterator + external writehisto + + integer ncols + parameter (ncols=1) + integer units(ncols), colnum(ncols), datatype(ncols) + integer iotype(ncols), offset, n_per_loop, status + character*70 colname(ncols) + + integer naxes(2), ounit, blocksize + character*80 fname + logical exists + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + +C********************************************************************** +C Need to make these variables available to the 2 work functions + integer xsize,ysize,xbinsize,ybinsize + common /histcomm/ xsize,ysize,xbinsize,ybinsize +C********************************************************************** + + status = 0 + + xsize = 480 + ysize = 480 + xbinsize = 32 + ybinsize = 32 + + fname = 'histoimg.fit' + ounit = 15 + +C delete previous version of the file if it exists + inquire(file=fname,exist=exists) + if( exists ) then + open(ounit,file=fname,status='old') + close(ounit,status='delete') + endif + 99 blocksize = 2880 + +C create new output image + call ftinit(ounit,fname,blocksize,status) + + naxes(1) = xsize + naxes(2) = ysize + +C create primary HDU + call ftiimg(ounit,32,2,naxes,status) + + units(1) = ounit + +C Define column as TINT and Output + datatype(1) = TINT + iotype(1) = OutputCol + +C force whole array to be passed at one time + n_per_loop = -1 + offset = 0 + +C execute the function to create and write the 2D histogram + print *,'Calling writehisto iterator work function... ',status + + call ftiter( ncols, units, colnum, colname, datatype, iotype, + & offset, n_per_loop, writehisto, 0, status ) + + call ftclos(ounit, status) + +C print out error messages if problem + if (status.ne.0) then + call ftrprt('STDERR', status) + else + print *,'Program completed successfully.' + endif + + stop + end + +C-------------------------------------------------------------------------- +C +C Sample iterator function. +C +C Iterator work function that writes out the 2D histogram. +C The histogram values are calculated by another work function, calchisto. +C +C-------------------------------------------------------------------------- + subroutine writehisto(totaln, offset, firstn, nvalues, narrays, + & units_out, colnum_out, datatype_out, iotype_out, repeat, + & status, userData, histogram ) + + integer totaln,offset,firstn,nvalues,narrays,status + integer units_out(narrays),colnum_out(narrays) + integer datatype_out(narrays),iotype_out(narrays) + integer repeat(narrays) + integer histogram(*), userData + + external calchisto + integer ncols + parameter (ncols=2) + integer units(ncols), colnum(ncols), datatype(ncols) + integer iotype(ncols), rowoffset, rows_per_loop + character*70 colname(ncols) + + integer iunit, blocksize + character*80 fname + +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + +C********************************************************************** +C Need to make these variables available to the 2 work functions + integer xsize,ysize,xbinsize,ybinsize + common /histcomm/ xsize,ysize,xbinsize,ybinsize +C********************************************************************** + + if (status .ne. 0) return + +C name of FITS table + fname = 'iter_c.fit' + iunit = 16 + +C do sanity checking of input values + if (totaln .ne. nvalues) then +C whole image must be passed at one time + status = -1 + return + endif + + if (narrays .ne. 1) then +C number of images is incorrect + status = -2 + return + endif + + if (datatype_out(1) .ne. TINT) then +C input array has wrong data type + status = -3 + return + endif + +C open the file and move to the table containing the X and Y columns + call ftopen(iunit,fname,0,blocksize,status) + call ftmnhd(iunit, BINARY_TBL, 'EVENTS', 0, status) + if (status) return + +C both the columns are in the same FITS file + units(1) = iunit + units(2) = iunit + +C desired datatype for each column: TINT + datatype(1) = TINT + datatype(2) = TINT + +C names of the columns + colname(1) = 'X' + colname(2) = 'Y' + +C leave column numbers undefined + colnum(1) = 0 + colnum(2) = 0 + +C define whether columns are input, input/output, or output only +C Both input + iotype(1) = InputCol + iotype(1) = InputCol + +C take default number of rows per iteration + rows_per_loop = 0 + rowoffset = 0 + +C calculate the histogram + print *,'Calling calchisto iterator work function... ', status + + call ftiter( ncols, units, colnum, colname, datatype, iotype, + & rowoffset, rows_per_loop, calchisto, histogram, status ) + + call ftclos(iunit,status) + return + end + +C-------------------------------------------------------------------------- +C +C Iterator work function that calculates values for the 2D histogram. +C +C-------------------------------------------------------------------------- + subroutine calchisto(totalrows, offset, firstrow, nrows, ncols, + & units, colnum, datatype, iotype, repeat, status, + & histogram, xcol, ycol ) + + integer totalrows,offset,firstrow,nrows,ncols,status + integer units(ncols),colnum(ncols),datatype(ncols) + integer iotype(ncols),repeat(ncols) + integer histogram(*),xcol(*),ycol(*) +C include f77.inc ------------------------------------- +C Codes for FITS extension types + integer IMAGE_HDU, ASCII_TBL, BINARY_TBL + parameter ( + & IMAGE_HDU = 0, + & ASCII_TBL = 1, + & BINARY_TBL = 2 ) + +C Codes for FITS table data types + + integer TBIT,TBYTE,TLOGICAL,TSTRING,TSHORT,TINT + integer TFLOAT,TDOUBLE,TCOMPLEX,TDBLCOMPLEX + parameter ( + & TBIT = 1, + & TBYTE = 11, + & TLOGICAL = 14, + & TSTRING = 16, + & TSHORT = 21, + & TINT = 31, + & TFLOAT = 42, + & TDOUBLE = 82, + & TCOMPLEX = 83, + & TDBLCOMPLEX = 163 ) + +C Codes for iterator column types + + integer InputCol, InputOutputCol, OutputCol + parameter ( + & InputCol = 0, + & InputOutputCol = 1, + & OutputCol = 2 ) +C End of f77.inc ------------------------------------- + + integer ii, ihisto, xbin, ybin + +C********************************************************************** +C Need to make these variables available to the 2 work functions + integer xsize,ysize,xbinsize,ybinsize + common /histcomm/ xsize,ysize,xbinsize,ybinsize +C********************************************************************** + + if (status .ne. 0) return + +C -------------------------------------------------------- +C Initialization procedures: execute on the first call +C -------------------------------------------------------- + if (firstrow .eq. 1) then +C do sanity checking of input values + + if (ncols .ne. 2) then +C number of arrays is incorrect + status = -4 + return + endif + + if (datatype(1).ne.TINT .or. datatype(2).ne.TINT) then +C wrong datatypes + status = -5 + return + endif + +C initialize the histogram image pixels = 0, including null value + do 10 ii = 1, xsize * ysize + 1 + histogram(ii) = 0 + 10 continue + + endif + +C ------------------------------------------------------------------ +C Main loop: increment the 2D histogram at position of each event +C ------------------------------------------------------------------ + + do 20 ii=2,nrows+1 + xbin = xcol(ii) / xbinsize + ybin = ycol(ii) / ybinsize + + ihisto = ( ybin * xsize ) + xbin + 2 + histogram(ihisto) = histogram(ihisto) + 1 + 20 continue + + return + end + diff --git a/software/cfitsio3040/iter_c.fit b/software/cfitsio3040/iter_c.fit new file mode 100644 index 000000000..f85767415 --- /dev/null +++ b/software/cfitsio3040/iter_c.fit @@ -0,0 +1,701 @@ +SIMPLE = T / file does conform to FITS standard BITPIX = 32 / number of bits per data pixel NAXIS = 0 / number of data axes EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format defined in Astronomy andCOMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.COMMENT Contact the NASA Science Office of Standards and Technology for the COMMENT FITS Definition document #100 and other FITS information. END XTENSION= 'BINTABLE' / FITS 3D BINARY TABLE BITPIX = 8 / Binary data NAXIS = 2 / Table is a matrix NAXIS1 = 16 / Width of table in bytes NAXIS2 = 5000 / Number of entries in table PCOUNT = 0 / Random parameter count GCOUNT = 1 / Group count TFIELDS = 5 / Number of fields in each row EXTNAME = 'EVENTS ' / Table name EXTVER = 1 / Version number of table TFORM1 = '1I ' / Data type for field TTYPE1 = 'X ' / Label for field TUNIT1 = ' ' / Physical units for field TFORM2 = '1I ' / Data type for field TTYPE2 = 'Y ' / Label for field TUNIT2 = ' ' / Physical units for field TFORM3 = '1I ' / Data type for field TTYPE3 = 'PHA ' / Label for field TUNIT3 = ' ' / Physical units for field TFORM4 = '1D ' / Data type for field TTYPE4 = 'TIME ' / Label for field TUNIT4 = ' ' / Physical units for field TFORM5 = '1I ' / Data type for field TTYPE5 = 'DY ' / Label for field TUNIT5 = ' ' / Physical units for field TLMIN1 = 1 TLMAX1 = 15360 TLMIN2 = 1 TLMAX2 = 15360 NAXLEN = 2 / Number of QPOE axes AXLEN1 = 15360 / Dim. of qpoe axis 1 AXLEN2 = 15360 / Dim. of qpoe axis 2 TELESCOP= 'ROSAT ' / telescope (mission) name INSTRUME= 'PSPC ' / instrument (detector) name RADECSYS= 'FK5 ' / WCS for this file (e.g. Fk4) EQUINOX = 2.000000E3 / equinox (epoch) for WCS CTYPE1 = 'RA---TAN' / axis type for dim. 1 (e.g. RA---TAN) CTYPE2 = 'DEC--TAN' / axis type for dim. 2 (e.g. DEC--TAN) CRVAL1 = 8.588000E1 / sky coord of 1st axis (deg.) CRVAL2 = 6.926986E1 / sky coord of 2nd axis (deg.) CDELT1 = -1.388889E-4 / x degrees per pixel CDELT2 = 1.388889E-4 / y degrees per pixel CRPIX1 = 7.680000E3 / x pixel of tangent plane direction CRPIX2 = 7.680000E3 / y pixel of tangent plane direction CROTA2 = 0.000000E0 / rotation angle (degrees) MJD-OBS = 4.905444E4 / MJD of start of obs. DATE-OBS= '08/03/93' / date of observation start TIME-OBS= '10:30:32' / time of observation start DATE-END= '11/03/93' / date of observation end TIME-END= '05:02:18' / time of observation end XS-OBSID= 'US800282P.N1 ' / observation ID XS-SEQPI= 'ROTS, DR., ARNOLD,H. ' / XS-SUBIN= 2 / subinstrument id XS-OBSV = 800282 / observer id XS-CNTRY= 'USA ' / country where data was processed XS-FILTR= 0 / filter id: 0=none, 1=PSPC boron XS-MODE = 1 / pointing mode: 1=point,2=slew,3=scan XS-DANG = 0.000000E0 / detector roll angle (degrees) XS-MJDRD= 48043 / integer portion of mjd for SC clock start XS-MJDRF= 8.797453703700740E-1 / fractional portion of mjd for SC clock start XS-EVREF= 0 / day offset from mjdrday to evenr start times XS-TBASE= 0.000000000000000E0 / seconds from s/c clock start to obs start XS-ONTI = 1.476600000000000E4 / on time (seconds) XS-LIVTI= 1.476600000000000E4 / live time (seconds) XS-DTCOR= 1.000000E0 / dead time correction XS-BKDEN= 0.000000E0 / bkgd density cts/arcmin**2 XS-MINLT= 0.000000E0 / min live time factor XS-MAXLT= 0.000000E0 / max live time factor XS-XAOPT= 0.000000E0 / avg. opt. axis x in degrees from tangent planXS-YAOPT= 0.000000E0 / avg. opt. axis y in degrees from tangent planXS-XAOFF= 0.000000E0 / avg x aspect offset (degrees) XS-YAOFF= 0.000000E0 / avg y aspect offset (degrees) XS-RAROT= 0.000000E0 / avg aspect rotation (degrees) XS-XARMS= 0.000000E0 / avg x aspect RMS (arcsec) XS-YARMS= 0.000000E0 / avg y aspect RMS (arcsec) XS-RARMS= 0.000000E0 / avg aspect rotation RMS (degrees) XS-RAPT = 8.588000E1 / nominal right ascension (degrees) XS-DECPT= 6.926986E1 / nominal declination (degrees) XS-XPT = 4096 / target pointing direction (pixels) XS-YPT = 4096 / target pointing direction (pixels) XS-XDET = 8192 / x dimen. of detector XS-YDET = 8192 / y dimen. of detector XS-FOV = 0 / field of view (degrees) XS-INPXX= 2.595021E-4 / original degrees per pixel XS-INPXY= 2.595021E-4 / original degrees per pixel XS-XDOPT= 4.119000E3 / detector opt. axis x in detector pixels XS-YDOPT= 3.929000E3 / detector opt. axis y in detector pixels XS-CHANS= 256 / pha channels TDISP4 = 'I12 ' HISTORY modified by pence on Thu Apr 24 15:04:08 EDT 1997 HISTORY modified by pence on Thu Apr 24 15:07:24 EDT 1997 TDISP5 = 'I4 ' HISTORY modified by pence on Thu Apr 24 16:06:08 EDT 1997 HISTORY File modified by user 'pence' with fv on 97-11-25T14:34:58 HISTORY File modified by user 'pence' with fv on 98-01-12T14:03:09 HISTORY File modified by user 'pence' with fv on 98-02-06T15:18:24 END ��A��U=�q1�&�A��UA� =#t6A��Vo��(�RA��X/@�)P#�FA��X�@ Y[ �A��X��� ,~ A��Y��@ S�?A��Z��W^A��ZĀ�},�aA��Z�@�LzA��[": $�A��^� Nr� A��_M�u�A��_�@�'��nA��`g@ �  NA��`��� $�A��a�@ ��*� A��a��+91�2A��a���% �A��b tB( A��bD@ �*vhA��b� I X,4A��b�@O��A��c7e$�.+ A��c] 3 OA��dW2+�� A��d���*2�IA��d��C � )A��d�`�[�#A��f$��&�^A��f��M �A��go����xA��g� �!%�A��jS -`hA��k��\� A��k|�"0�$SA��l�@ +�?-aTA��l�@� f)� +A��m~�s1\#�A��m�` +� � A��m�`-V %�A��n��� �� A��q�`�5� A��r{��� �-A��r���#*)� +A��r� Ps �A��sg��'� A��t��yA��u@ PwXA��v`�#c A��y�@3+�KA��{/ �!� \/A��{Q@ u,D bA��{�`� �: +A��{�@g"�'*%A��|� � M*�SA��} '2^Q A��}s�f ��A��~0`�"0YA��~���� +eA�� ��%�DIA��`!v3A��}�T"�-A������*� A���� X,A N A����`�($_A����� +���OA����`�i :A���Ϡv*�-DA����� �0A���� � y A������ A���L��$� )oA�����)�-bA����@ +�A�����( Z(A���&@+ A����� �#�kA��� /91� A���h ���4A���o� 'ASA����,/B%vA����� ��3� A���ji!?�A������{+�A����f."D:A���� �l3A������P'� A����` +�1� +A���k D�zA���&�=A�����vy#� +A���@ Q3&A����� h'�3&0A���À +�(A����A/�� A������! ~A���: ���A����@��SA���&�� V2A���y�*�&8A����@ ��ZA���v`# Y��A���L��S�A���a@� A�����1,PA���n �/3xwA�����7 PA�����*E A�����<3��A������pA���=`? &� A����@z�� A���\�h0��A���� ��#�?A���ɠ (U+DA���b*:BA������$$A����-3D�A���L�*[3' A������}zA���l` +$s +�A��ŵ���.�^A����� +�$_'A���� mF1 A��ʒ���+�A���`O&� � A���֠s �7A������"�A���J@/ P4�EA��ͻ`�� � +A������+� A����`��'� A����� +�/� A��Л��� A���h�� #� +A�����+�"SEA��ҁ ��A��ҫ �/� 35A����� � �)7�A����� ��4�A���4 �ln A���:@2%�� +A���Z ?a �FA���i��.]�FA���*� + + JA���n`��-� A���`�+�XA���U`�v A����W �A���,�4`!A���@"�dA��� C(��jA����%,�&�A��� >�%L A��o@ +��AA���"!!�#A��� 3$� A���` H/�& XA�� h(-3�A��- �-��A��[��,� A��c`+%$A�����4�SA��-z�3� +A��� 0(�%A���� +J ]{ A�� �y!7�A��� \'� A���` }&�&|A��� �&,� A�� �`e�9A�� +�`d%x.A�� �"�*WA��p���}A��5`��(�A��O��+��9A��X�|"rAA��y� �\'��A��7@ ��% �A�� +� ^ � 8A��e��)0�A�����31� A��� W A���� �" +�A����� +R�A���<�s-A���`A �c A��`L2��A���@ ,�'B@A��?� , �A���`u�(-A���@ +�;A���I�wA��C !%�A��mq%�,d+A��q��� A��� ,1{� A���`x v-tA��k@k'�*� A��4`P c-sA�� �m!I�SA��!��h!�` +A��!�`�C�A��!��$�� A��"��%, ++A��#P�k�;1A��$.��"� 6A��$��l!H A��&- �g%�A��'�@ +� 4`PA��(Z@� _�A��(Ƞ)-(�%A��)P� � �A��)w,)��A��)�` �>�A��*A���� A��,*@f�� A��-�I#�{]A��-�@_t� A��.֠y�n;A��/O �b6� A��/���.'A��/��4�vA��4S`��/A��5���%;A��5� +���4A��5./��A��5� �%{�A��6�`�!A��6�` R�3�A��7_�0r A��7��� r!mA��8@ �>iA��9�`�/��WA��:f W�f A��;"�y �"A��;:��� � A��;S��.b!�"A��;c` �� )eA��>@ �)�"t{A��>� ���-A��?=`� N&D5A��?g� xb�0A��?� @E� A��?���� PA��@'���$�TA��@V� �.�VOA��@���� A��@�`���A��AW`s!��A��B֠e,�s*A��CX�w�1� +A��Ci��$� Z$A��C� D +_(UA��D� +QJ�A��E& �wA��F�(%�'A��F� b 1)�2A��G +� ^ +^nA��G;��-+�A��H�����A��J�����GA��J���#$�A��J�@h1"%� A��J�@ �0"s A��Mo �3��A��Nq ��� A��O��/�jA��Pc�D#;(e A��Q@��-� A��Q��\4d +A��Q� |eA��R)`G +�A��R- � 8,dA��R3$x�3A��T���&�&A��V�� +*� BAA��Wd���� A��W�@��3�jA��Y8��1m �A��Y�� ?!�� +A��\� (4� A��]Π�FPTA��^+��4� A��^�@)1�*� A��_�`�)*�>A��`��F.�{OA��`���#�JA��a �*�7A��b�*4^�A��b,`�,�4A��b�@W��A��e�� Z'�&A��e� +��f�A��e1�}!�'jA��e�� � � A��e��1�+�A��fA��'~A��fI�!w A��fr���A��g��(mA��h@ u -�EA��hD�.��6A��i�  �� A��jj��~�A��j� #l �PA��j��(�"jHA��k� �*~JA��k���!�1`A��k�@J�#\8A��l� \�1A��lH@.�%A��n܀y/�/ A��o@�%C#�A��o3` eA$�rA��pS X� A��q�0� �nA��q5�)I �A��q�@�2A��r2��6 :A��r��[���A��t��%�+VA��t�N3�A��t�� +A��u�@�G � +A��u���'�!�{A��vg 7 A��v��-!�7A��v����%tA��x� �'�4 A��y�@��1- A��zl`�&) �A��z� t#�A��zǠ �(�3A��z��m"�*A��{>�&BA��{l��6� A��}��(�"iA��~� �%�_ A��~@�)i%QA��~� +Y�4pA��~� : &�A����@!:� A�������)�A���� �1��!A���L?�3A��� �� .� A���B���A������$�1f7A����`2'��A���I��U�>A�����$�!A���{� ��LA���� �A4JLA������s A���N�dK?A������ +�,|LA���5�A2�(�A����&.! �,A�����1gA���*@�!�6��A���U � +<A����� 3A���Q��--f +A���� �&�E +A�����I2V(�A����2�%�A����� �$C5� A��������A���D M-!WA���� �6~ A���� y� A���I�!=9A�����1��A���� �� m A���a� + � A������ |mA���~` �'��A����<H�jA���o�� 4�A��������A�����(�!� A���� �&2"v A����� !)�$�A���� +�-� A�����T� +A���C���� A���Y��A���m� ��A�����dY.�A��� + }]A��� ��5�tA����@ �A����@�,� �A��� A-�&f A����� �'�0� A����@��YA���ʀt�#�A���� T�! A���� �4! A������1�!Y A���$� L#�A���C s'y#UA���{@ �, +N A���|`�s � +A������&�A���� +� �6A�����SR":A���� +#�3A�����my�A���� )��A���� 6v"�%A���� 4"�#2A���� ��� A���t��}("�A����� �� A���d� bB A���� <.I�SA����l�|A�������)A�����j�n A���6@m�.�A���j�� � +A����`B�A����`|�hA���#���a&A��� ���A��� !�5� A�����&'�3QA����%.x� A����`{(��VA���p�5�%�A����` � �{ A�������%y-A���O �)�b A���S�0*f' +PA���:� �,6VA���D�� @(A��ß�&�A����` !2�!r A���'` -^/5A���k� +''- A��� � +�s � A�����_$K[A��ɞ � ��A��ɷ`�%5 A����` �B5�A���3���!A���e� �4�- A��ʁ���A���� +�%LA��ϧ B�M A���`�&� �A���]�� k) A���րY, A���i� 9�-�A�����1�9 A��� �;)�A����@ � x A��ָ�� � A����`6�!A���T :�A���\ 7t(A���X���!� A��ؕ`���A����$ +1)VA��ِ` +&bpA����@z0z+A���\��##�A���S@ �",6H�A���~��#;.#A���ڠ73�m%A��ݞ`Tj$�A����@ @) A���X� e� | A��ރ� ��A��ި��`4!-A����`! ��oA�����p.A��� @m�#�A���i@ X"�*A��� �!9!OA���9� J-~1FA���g`�� +D.A�����u1jA�����?)�!�'A���� ��� A���K���� A����*(�&�A���` ��6�%A���J�F!�$� A���� P3�� A���J��A���(�Q5*2A���A ]A��� ��6A����@0 +�,�A���π<4��A���݀ +��A���� (�%oA���i�u!E5�+A���p`3L � A���5@�!A���|@ ��-�A���`T^A����L.[)A A���W�< �* A���� �[�A������'� +� A���;���!5A����� ��5e:A���I`�� �A�� #@�#V+uA�� �@��*A�� Ϡ"�PA�� ��! =A�� � �""VRA�� 4@ S +�#�A�� � .��6A�� +s����IA�� � %7|=A�� � C/ �A�� �`�.8 � A�� ڠ �caA�� ����,.A�� ��uM&�A�� � & �*8 A�� �� ��� A�� ���XA�� ����&�DA�� �� | A�� L���A�� M�[(�"5A�� �� S ��A�� ���,�CA�� � � "�~A�� � �3�B5A�� �`���DA�� ŀ�U!� +A��  �0�.�A�� 3@s!�A�� `@ �#�& A�� �k S � A�� � ? Q�A�� �� �1�A�� �>0�� A�� h���$[�A�� �` ��'(A�� C 5�A�� U �)� +[ A�� ��,$ �A�� �! �A�� O��(2�A�� !��  �A�� #�u("A�� #` �] A�� %�`��5� A�� &�� ��A�� 't�=!� �A�� '����A�� (� *�eAA�� (:`�(E �A�� (�` 7*�A�� (���'�UA�� ) ++!EA�� +� ��vjA�� +�j#}$A�� +���op6A�� +� � �6� +A�� ,*`�',@A�� ,�@Q$1�A�� -`?'a1KA�� -Y�h1��A�� .b`�A�~A�� .�`�!� +=A�� .��� ��A�� /#���� A�� /�*��'A�� 0� �%�A�� 1;�M��KA�� 2:@>']�A�� 3S� %&V A�� 3�@ +�? N A�� 3��~�:A�� 4�@�%�(uFA�� 4� :�+ A�� 4��� �YA�� 8�z6C6A�� 8}X@& +A�� :�� +�]�AA�� <�`�0h,o A�� >?��� �A�� ?�r. � A�� A7 �+uGA�� A� Z$�&w +A�� BG +_9 �PA�� C��v @A�� C�@�a�A�� D���&�� A�� E1��#�>A�� H*� � +#A�� He� ��� A�� J{���x A�� J�@*%jZA�� K�`�%�-^*A�� M�`�W4��A�� M� �][A�� N`j��A�� N? 5�� A�� NX@| �*� A�� P` r�&�`A�� Q� .Z�JA�� R�= R7A�� S@�\.�A�� S�`e$?SA�� T� ��6W>A�� T��� K� +A�� T��L�A�� U2���_A�� V��2 [.{SA�� W�b� qA�� X ���EA�� X ���/TA�� Y€� A�� Z +`g�,�A�� Z��S Z � A�� \c��6JA�� ]`�H}A�� ]�� ��A�� _%`�% +A�� _�@ `?�EA�� `F�0)f A�� `���(A�� b,@�2�$m*A�� c� +�0� � A�� da �� Z1A�� eS�? +�!A�� e�� K� A�� e ?-��0A�� e��$CpA�� g4��$�� A�� g�� �+�A�� h p:�A�� h��'/�!� A�� i� ]�5�)A�� i�4 ��A�� jJ o"j4�A�� kӠ�!zA�� k�q]K�A�� l �#�0NA�� m��H)PY A�� n���*��A�� p�`I�-ZJA�� q�@�&I/A�� r+@s!o2�(A�� rÀ,�5A�� u�� � �&�.A�� u� �'� A�� v8���u�A�� v� �f� +A�� v���"�dA�� w�� h+� e�A�� w�� $? A�� y�� ��(�A�� { +� +�3f?A�� {� �$� +A�� |��6��A�� ��`a&�'*A�� �>@ +(J a*A�� �.` �-�)w A�� �`i �*� A�� �>� |%$�A�� �H� 2I#�A�� ��� �� � A�� �k��!T4�A�� �l@"�A�� �� A�� ���� +HA�� �- Y3KA�� �I *(|.`"A�� �����A�� �TO +g(CA�� �֠ �.`A�� ����"�4-A�� ��@U��A�� ��@�� ��A�� �!�%��A�� �Z`�0q ,A�� ����_8A�� �*`H2�+� +A�� �����(�SA�� �� �'f$�A�� �v� R�"� A�� ��� &V6iA�� ���v-�A�� �� j �A�� �`�+)5A�� �� +H"� +A�� �`I>#�A�� �0 ]"��sA�� ��|"$ A�� �` �JA�� �;`�+ �A�� �A�0/� A�� �l�F%�*�vA�� �*�7 ��A�� ��@�r/v +A�� ����GA�� �Π�!�OA�� ����&�4� A�� �� �s"Y1A�� ��@ #� +A�� ���!Oe A�� �m +@ +QA�� �� �'@+gA�� ���+�&��*DA�� ��  ��A�� ��@}2I� A�� ���e�"A�� �� �-��A�� ����!���A�� ����9- A�� ���5�d#A�� ���('.� A�� �Z��%�A�� �j� t"� _A�� �� �5P A�� ��@ }�E A�� ���Th�A�� �X@ �!'A�� �=��)�!#)A�� �v� &&�(%A�� �� ��0%7A�� �U�R� �!A�� �{f!TA�� �� �&��0A�� ���<�/A�� �`�� `3A�� �k�0 �$D A�� �s ,�2x A�� ������FA�� �%��f /A�� �+�'�A�� ���Fr(� A�� ��� +�&y�A�� ���6��FA�� �L��*� A�� �?�Y� �RA�� ����0�A�� ���� �#hA�� �n� � bA�� ��`N0�";A�� ��� 2%5E$A�� ����5A�� ����1�)�A�� �Q�= � ?CA�� ��`G.�!�vA�� ņ � �!Z4A�� ź@ �,A$ A�� �P�`�%% +A�� �W@ Y�"A�� ��� IP=A�� �p � o�9A�� �q�U/M�A�� ˩`,'% A�� ��@�l�A�� �@#-�,. +A�� ̄`"t �{A�� �̀�-v9A�� �� D*p:A�� ��/�9A�� �@`��!�A�� �F� �1�(�A�� ��@�DA�� �q�N!f�XA�� ӊ@`"r�A�� Ӫ�N&u*lA�� Գ u,)U A�� ��` �#=hA�� �'�l)�A�� ���4��A�� ٹ@��*�A�� ڀ�$hA�� ���/�� A�� �� C�]A�� ��`!;�A�� �(@#.*�tA�� ݸ��2" A�� �@ I� A�� �t`� �-A�� ޞj2�" A�� ޯ� : �5A�� �4��A�� �V 1!�! +�A�� ��� �O +�@A�� ���' 'A�� Რ 3: � A�� �` �4�+l A�� �~%0J �A�� �?� �"�`A�� �� �)��A�� ����0!A�� ��_n��A�� � 5�!� A�� �4 P�!WA�� �K���O8A�� �5 �� A�� �@�#'HA�� 쵀 w 1� +A�� ��*� vA�� �n �$o4 A�� t3?A�� ��`r�gA�� �G��(�A�� �O� +6� A�� �;�4->?A�� �@�y�02QA�� ����(�A�� �` ��(= +A�� ��@ +� 'yA�� �� �6�#A�� �L ��#��A�� ��� ��,�1A�� ����$ A�� ��� )�-A�� �5� +91/� A�� �`�1�$�@A�� �}� +�)?/� A�� � p&�*� A�� �] S(�XA�� ���s]�CA�� �H`!(�%�A�� �ڀ +�:1�A�� �[ �"��)A�� �s��*�5�A�� �@JH1TA�� �y@%A6}KA�� ����(� A�� ��@����A�� ��@v 3~ A�� ���� T1/A��!c��*�� A��!� �~ +A��!� 5�65A��!j��T19 +A��!�`��/i=A��! @s��1A��!F 0t*A��!�` $\ +A��! T�� 'A��! ��/(�)�A��!m���A��!�@�%��=A��!�� 4� �A��! ���A��!����(�;A��!@ +) �A��!��� �� +A��!�?��A��!��%�,� +A��!Y@L,�~A��!7��(�_A��!-� :+�A��!> �$ A��!V �0��DA��!� ��� A��! @Y E +� A��!N��F! A��!ŀ��5(A��!-@&)A��!6@ ^*4�A��!U�� U!� A��!m�-�� A��!m� �4��A��!����IA��! �`�6�N%A��!!��+�3�A��!!R`mG)\A��!"S�Ir2vA��!"ǀ�c �A��!"�`�5: A��!#3�}� �lA��!' �.�8A��!'-�j��NA��!'���58A��!(c�Y #$A��!)=� �%�&�A��!)F� +�0� SA��!*,��.�d +A��!-+~+�A��!-�|" +A��!-�`�-o) A��!.����.A��!.���)�/� A��!/���0�#�A��!0� z�"A��!1.@!1� +A��!1=��s*A��!1���"�?RA��!2<V�A��!2ˠT#~A��!3� �.� �%A��!3� ��3�A��!4N@� ) A��!4l 1�%- A��!4�� +�$$!cA��!4� ���A��!5�`E�.%QA��!5׀� s2&GA��!6\���(kA��!6� +l],A��!6�@�)( +A��!7R �8F +A��!8@��7& A��!8m��&�6�A��!8�`*�$�A��!8� 1zA��!9�@�!�,kA��!:u@�/F33A��!:�~ 2.4A��!:� '�0� A��!;$@#�Z�A��!< )��gA��!<���&d7]A��!=e��.jV A��!=� +*5A��!=��# "L A��!?�� -�"� +A��!@M� 5��A��!@���-� A��!@� �0�A��!AG�));�A��!D� ]!J �A��!D��\��A��!D�`�/!@A��!F`�V"2A��!F��F#+#0OA��!G( � Z\A��!GE`K((R A��!HE�� A��!H� �.�7 A��!I /H�RA��!J @4E1� A��!J9�] �,/A��!L�d$,�QA��!LS�Q!7�A��!Ld��%b!A��!L}� �q�TA��!M@.*���A��!M� J%(-wA��!Nf�%� A��!N�K1��A��!Ov�R1VA��!Q��!�2A��!Qh �#I'� +A��!Sz� +[: �A��!V# L3� �A��!V� �, :A��!Wz�1!(�A��!W� )�5A��!W�@�7� � A��!W�� �� MA��!X4��3��A��!Y��)�#!'A��!Z� e4--� A��!Zu`!� �A��![F�A��![�2��A��!\)�� �-� A��!]a�P0er A��!]r�� (A��!^a�,W,d A��!^q@X"� A��!^�`�'@A��!a.� +�&2� A��!a8@�OfaA��!a�@� �zA��!a��r]� A��!c8�h5��A��!cO��- zA��!cd��-�A��!d�� �$�A��!d� �'�5� A��!e��4�%�A��!f!� +%�+�sA��!f�@' `#| A��!g|` ��*�A��!g��f)�$;A��!gɠ �%�M�A��!g��5�-/A��!h� z� PA��!h��v6�] A��!i��6��6A��!iE �!E�A��!j +��-��A��!j7 R�1�"A��!j:�(�)� +A��!ji@ !Z,?A��!j�� ! !A��!kr���� A��!k�[V�=A��!m �-�FA��!m@�� +�  A��!mg��!E�A��!m��Z�A��!o`����BA��!o�#3� DA��!o�` mL�A��!rb���,�A��!r@)�P A��!r�%�6A��!s�B�3A��!sT�S!�!/3A��!s� �6��A��!t�� � h$�A��!u�` b='&(A��!v�@ gS,% +A��!w�h#c/� A��!y`  � A��!y=�'%a8 +A��!y�`�( �A��!z,�dj�#A��!zr � �)43A��!{.� +�� +aA��!~ � �LKA��!~� �0\� A��!�^ � A��!1`�,�A��!n@yP �A��!�y5-�'A��!����2�NA��!� + �*A%�BA��!�# l1� +A��!�3�A7�$�6A��!�A +�1SA��!��@� �FA��!��� +�A��!�U��+,�A��!���#XA��!�C` � (M A��!��� +��"�A��!���x�A��!�J�{�3] A��!�����C0A��!���70�^A��!��_$� �A��!�1@�.h� A��!�J #7 +� A��!�k��s �`A��!�� 3.R%}A��!�� +�*@(A��!�y`@2�"� A��!��@ (#�8] A��!�z��0�13 A��!����(�1�A��!� +��XS A��!�x@�m�A��!���v "�A��!�:�k's�A��!�a��/�bCA��!�%�8^A��!��@!"� A��!� ��3-�A��!�S@K � +A��!��@�,��]A��!��`�3A��!�����!� A��!�# �J7�A��!��@G#�/,A��!�� 6�!w A��!�� �M7A��!�8�uf*-A��!��@ ��4��A��!� �9"5A��!��b-L#� A��!�� T +� A��!�V@�"q�A��!�z@�0�F +A��!�����xA��!�e �&66�A��!��Q"�O2A��!���D*B!�A��!�� U�A��!��`l�BA��!���@A��!�x��A��!��� �&�IA��!��� /(�$A��!�X� +�� +A��!��W,�,9A��!� � �*�FA��!��` +#%0fA��!��@���A��!�?�F2*y A��!���Z $"�A��!�@@b� �A��!�j��A��!������lA��!Ú�'��A��!�?`�j� A��!�d��"�lA��!��� �/sA��!�`�6+ &(A��!�V� �1�-H�A��!�>��!s A��!�+��~�)]-A��!�_ +R-�,�A��!ܛ�g I� A��!�� G8A��!� ?#CJA��!�^@�+2�A��!��@X AA��!� ���A��!���>1  A��!�>@ 4�y �� A��!�P��%�.THA��!�#��-qA��!쩠�+ qZA��!��b2��A��!����+/.�1A��!�]@��"�A��!���4�$�A��!�؀ $&��A��!�Y h�8�A��!�s`�%� �A��!���g� +�9A��!�O@��,A��!�`�?*i A��!� �,X+ A��!�A@Q+� � +A��!�Π�*p� A��!���" %o|A��!�� �s,�A��!��` %, A��!�t@E�5A��!�׀Q�,@A��!� � & �8��A��!��`� +o7 A��!����6�aBA��!���� *q +A��!�� n�� +A��!�<@�2�A��!��@�0� ��A��!��@ �+`!�A��!�ՠ v�$�A��"i� � �� A��"��7.�  A��"��'�!=-A��"W � /�A��"����jA��"��u4 bA��"Z��& �2A��"��F'� A��" +��*�NA��" /` [ V�A��"  (�/� A��" +C@1 +�'(A��" 8� _:"�A��" w@�-�(~ A��" Ƞ ��,� +A��" �b1��+A��"M�&�*A��"+ �.�(cA��"� �6�$�kA��"| 8.�A��"�`�.�& A��"ۀt� GNA��"� q!�YA��"@&$F7� A��"� � RA��"t� *wA��"�@�/f(vA��"h� �LA��"���3�A��" �%f(�&A��"&� �!��A��"j |�1�A��"{`���A��"�@��(c +A��"�@ %8 �A��"�f �kA��"�? �8A��"����6�A��"�W�}A��"��v.50A��") )Y� A��"�`(\ A��"ʠ �'� A��" � {)i&hA��"#*� �wMA��"$=�;5�^ A��"$�O<k A��"$����&� +A��"%4 $K93A��"%�`��+� A��"%� > �$~ A��"&R �� +A��"&r`�+�L A��"&� q4�)�A��"'� �73EA��"'���"�sA��"'���f+�JA��"( �3g"]A��"(-�>(�4EYA��"(��j&A��"(� �%�7� +A��"(�@� *$[*`�$�)DA��">� ({q A��">����A��"?� �%>-A��"@o� �� +OA��"B�k*#3A��"BY�**H0 A��"C��)�^"A��"C�`�"bA��"D@ $�5'5A��"D���"�DA��"D�@J�'eA��"F@ T +A/(A��"G�`&��A��"H���#�:A��"In�f!?!CA��"I��a`!�A��"K��� 7)�A��"K� +���/A��"LW��& �A��"M4 R ��KA��"M��r+,+qA��"N�C-t2GA��"N� ,v2'A��"P1��4�A��"QV��/�=]A��"Q���"�3^ A��"R�}!8fA��"T 1+�GA��"U�@ �3"� A��"V��&*A��"Vl���)AA��"V�� +��LJA��"Wq�_^0� A��"X<� )�7�A��"X� � �0$EA��"Y[�_3�+A��"Z"��,{5m�A��"Z�@��6� A��"[�@�*�)3A��"]�� sl�\A��"^�@��#gA��"_� zq'_A��"`�� %!�$r^A��"`�� z'a_3A��"`��)5F: A��"`� k!>F$A��"a3�!�iA��"a�@R�"�A��"b4 M)��A��"bs`�/��A��"c&@�U 7A��"c4`�Ux6A��"d��[$R +A��"e@ �) �A��"e �*}'lcA��"e�� ��/d A��"fX`c0� A��"gQ@Qc�A��"h +iO0�A��"h��%�0Q#A��"h!���!!_A��"h� ~jA��"hΠ�'\y A��"h�Q(� � A��"jC�0��A��"n\�n � �A��"o��~%� A��"ob 2��-A��"o�`&2�IA��"o�`�  ! A��"pu�"�7�A��"q�� �^A��"r� (e�A��"r��A�6 +A��"u{�N+H � A��"vd ���MA��"v��@�7�A��"w!@n :6A��"y��r35A��"z` �S� A��"~X��|3�jA��"p���A��"��>$F�A��"��-�=A��"�4���A��"������A��"��� ��A��"����&�*eA��"��`�'�.3(��{A��"��@���A��"�� .  A��"�� �2��>A��"��� �'A��"�.� +�BqA��"�F��0`&H A��"�K@ +{ �bA��"�K�5�%/gA��"�V� � B�A��"�& ���6A��"���T4��7A��"�l w0�$9 A��"��� �8SA��"�A@�G%�A��"��� (''�,A��"��� ��A��"�*`t 3)> A��"�� +�'� A��"�d`�<.�1A��"�ߠ�/"�+A��"��� I+�aA��"���(O,� A��"�� a�+oJA��"��� I BCA��"� �a0NA��"�`9!�$� A��"�� 6z� A��"�@�U'��A��"� p� A��"�-��7"�A��"�� �C�A��"�΀� +if A��"�`�"])B A��"�L@ �1RA��"��@}0|(9 +A��"��� c+S Z A��"�K`�9A��"��Hj�A��"�� P-7 TA��"�g`j!�TA��"�x`�$ .QA��"��@�3< A��"��`h ��A��"������ A��"���5|mA��"�2� �  � A��"��`�4{!I A��"�܀ ��.,TA��"ś 3�"A��"�+� o )�A��"�r� �&�A��"��` +�%7{LA��"��(\� +A��"�E��&�| A��"���&/�*�A��"�' )�2(A��"�@`n(�� A��"�t[%� A��"�~  �� A��"ʄ��% t:A��"ʢ�B&�1A��"ʹ`: +�A��"�� #�Z A��"���K4VWA��"�@��- +A��"�?�) �A��"�� � +}�RA��"���<#�A��"� D��A��"�|�0i A��"ѭ�P��A��"�9�$�S*A��"����4H)�A��"Ӝ�j� i@A��"� ���A��"�1�� +�TA��"֐@�� JA��"���� G A��"��@���$A��"�+�v��8A��"ذ`.+A��"�� i(�mA��"ق���(�A��"� +%)��DA��"��� !� A��"۷��%��A��"���o"�<A��"�`�OP)A��"�m  ;6A��"ܖ�t�RCA��"� )A��"�@ia�A��"� �(�427A��"�@YV�A��"��@�/V'� A��"�� � !� +A��"��2 ,+ A��"�5� ���A��"�V e"j PA��"���b�qA��"���&( �A��"�� ��.� A��"��(� W A��"���t�5�A��"�< *"�!�1A��"�� �p +A��"��@_!� h A��"��@_$E�A��"��#�Z-A��"���/�6A��"�} /� �A��"���v7�A��"����(� A��"���i!�CA��"���1�03A��"��` �%� A��"��� <AA��"���$0/� +A��"���%3&FA��"���=)�A��"��O0H1�WA��"�A�,( ;A��"��� +�"� +;A��"�L`��A��"�j 1/B>A��"�k@9-�&46A��"��� +z)/#jA��"�� 5+?A��#��/A��#c@�"� +A��#]� 2�5�+A��#�@##��5A��#|@Y =A��#�@�� +� A��#�� �+A��#Ā ��A��# O@�s4b A��# o@w_� A��# ���%A��# +k�GA��# `a �)�NA��# 9` +`"�3��A��# N����A��#5��0� A��#�@�#�2ZA��#>`���pA��#P �%�A��#|*�A��#à9 @ � A��#.DsA��#� �"( A��#j@ +�)�)A��#�`�(� +A��#Š� L2/ A��#��y; +A��#i���)�A��#@ �,0�A��#1��#�'IA��#t +b^7�A��#��V��"A��#/��2�^A��#H�<(�� A��#)` #q��A��#���0�#A��#n �%��5A��#�@ � +�A��#���B&�'A��#o` +�U4� A��#�@V\:A��#���6��A��#�� �  ,A��# � �1P)� A��# ��6+S2L�A��#! +.� � A��#!~@� 05A��#"N��-/XVA��#"�`�,q0A��#"��>� �.A��## R$X#$AA��##� �$i� +A��#$��67A��#$��5+�WA��#$���Q%�A��#'�@ 1k% A��#(�@ +�$A��#*�z �01 A��#,e��(O� +A��#-�B-�(^�A��#.À 8%= #A��#/F`�� A��#/p`�1$� A��#0�` +�#�1� +A��#1��0�#:A��#1�� ��'4��'�-� +A��#>���0� A A��#?�r#7 A��#@_ g�2� A��#@b �#�5"A��#B����� +A��#B����  A��#C�&�A��#D � +�i. A��#Fg�.3��PA��#F���,�,�A��#F� �e![0A��#F���1$A��#G? M��A��#G�`�*A��#H��M-@$= A��#J` d!J w A��#Jm@0pA��#K@�3)% A��#Kc� ��2� A��#L���+�*A��#Mr�26�A��#Mx���A��#M����2A��#N׀�6���A��#O��%`�A��#O��#q�uA��#O�@�.��2A��#P� �3��A��#Qh F H'�A��#Q�` +?�+� +A��#R@E �#A A��#T� � � �A��#T7`&#c A��#TE�Q/�*� A��#T�`�05�"A��#T�`+'� A��#Uh� � *>)A��#U��@�(� A��#U�� +� � �A��#V  �M3A��#V��F� A��#W�`S(� �1A��#X3 �z/�A��#Xv�/y +A��#X��,)�&��A��#YV� +U +�A��#]��ik �.A��#_ ��2�%�A��#_� +1#o'�A��#_� +%�� A��#`q�0N++A��#`� |x�A��#a��%o�A��#b� �$�+� A��#c� �T#AA��#c���"�} A��#d�8 �(JA��#f�� (&�"> +A��#h�� � uA��#h��b!c!eA��#iT� �'"A��#k�� �%�vA��#l� ���A��#l�m$BRA��#m� �%r�KA��#m�8 �A��#n���� A��#oM��,� �A��#o�` 2�%� A��#pR� $2��A��#p�YA��#q!`�)�-A��#s`�n��A��#sz@H�7d +A��#tp j�mA��#u1��"��A��#u��>}$xA��#u� �-*[7A��#uۀ��!� A��#v +��4�+A��#x?@d"8 aA��#xv�7m#vGA��#x�� '"�6� A��#y �!� ; A��#y-�(*�A��#y�` \,�7A��#y��# �#A��#z� �-�1�^A��#|P`"�*�A��#���)mWA��#� �/!MA��#�y� ��$30A��#�� �%:.�A��#���.� A��#����d* A��#�` �5�A��#�f@�0E"^A��#�l� ��A��#�A@>.H(2A��#�`�%1�OA��#��`r0(~A��#���� +8/A��#��@ 7;` A��#��� _ A��#�[��"(�A��#��� n+�8A��#�C�G.�# +A��#�P@��/A��#��@C!�2A��#�e��'2�A��#�ɀ��(� A��#��� �.8+�A��#�6��� +A��#���3 !6A��#�E� �/� +A��#�m �(~� A��#�H`��\A��#��.�A��#��@�� � A��#���F5ZA��#��`OG"A��#�o� n!@&R A��#��@ +�'�&f�A��#�/` +f �9A��#��@�"*�A��#�R�  x� A��#��@���A��#��@� �rA��#���^A��#���V�.�A��#�a ;1�A��#�� �/�!�:A��#� n!��A��#�]`$�0�.A��#���&�A��#��@W�| A��#��@�3*SA��#��� ( +)�qA��#�2��* +A��#�H�p-[A��#��@� +[+�A��#��@ .R/� A��#�|�A/*�6A��#�5 �!�0A��#���S/�� A��#���� �w +A��#�� ��@ A��#�!@D+% A��#�٠ +�^��A��#�N�7e� A��#�d �0AA��#�n �-�� A��#����3�� +A��#� @�0��A��#�, ���A��#�1�oi� A��#�j��)�+A��#����/�A��#���%�7��A��#���\�5:A��#�, I���A��#�� `V4� A��#�� anA��#�I��f -A��#���m +�� A��#�Ƞ3(�A��#����.�� +A��#�D�Y"�( A��#�ɀ ��&;.A��#�� +�!�,� A��#���3h"�A��#�� ]"�7A��#��`�6%heA��#�2� da� A��#�,�)fe A��#�W�1� �A��#�^�U�0� A��#��`���A��#ǽ��X6A��#� +��)�A.A��#�- �*W%% A��#ʘ� +��2#}A��#�J�0 �pXA��#�W�p�� A��#ˣb�� A��#�~��)��A��#��x A��#��,�-�A��#��%b , +A��#�נ#Y+m A��#�2 ��#;(A��#�� ��q�A��#� � F)�PA��#�p� ++++� +A��#ϐ�E3��A��#�Q��-daA��#�N@�Q� A��#��`��1� +A��#�# �1�A��#ҡ�!xA��#Ҥ� ���A��#ӎ��*�3V A��#�<�@ y�+A��#Զ %2�A��#�.��"�}A��#�m�s ��'A��#؜7� A��#�� �-9�A��#�d�i{��A��#�D���* +A��#ۦ1�-~'A��#��,'�(: A��#�I@ Q� �A��#�� S.�A��#�-`��$�A��#�r� �5�$|A��#�` +� �(x A��#��� +�(:$�A��#�� ;�%|$A��#�+� ���A��#�j��*'PA��#� �%��A��#�k�x�A��#��@� �%A��#���5 �+A��#�` )�� A��#�� �)� �-A��#�7� ;5A��#�[X��A��#��@���]A��#�@ � �A��#��Ok0A��#��`& !� A��#�+@a&� +�XA��#�E &��[A��#�q`c* �A��#�D 8$�1? +A��#�� �"�7 A��#�� ��$XA��#�� +6t� A��#�S@�)0� A��#�Y��2eAA��#�z�x!�A��#��@'�!�A��#�.� �[ A��#��8�GA��#��"�A��#�� *q A��#�� �+�$�A��#�ހ +�$H�A��#��`S,�&{*A��#� �(� � +A��#�q ]��A��$�  y+�@A��$��� +�A��$�XV�2A��$��6DA��$f� !6PXA��$��~0�"�A��$�@ �G�A��$`.-! +A��$��n�4A��$���&AAA��S�` +� +OA��S�/ X� �A��S�h <%P7�-A��S��@�4�%%A��S�' +�*! A��S�8 ��YA��S�� ��-� +A��S�@�&�3A��S��� ��PA��S��@�,4 A��S�_�T+�?QA��S�S��Q!uA��S��`7�2A��S�e� :'�?A��S�o +�� A��S��@�&{"�A��S��@ �"� v A��S�J`�>AA��S�y���&k +A��S��` r-��A��S��� �.�A��S� !�0�A��S���#��A��SÊ�'�4�jA��Sá�@7� + A��S� @�$ +A��S�@ ���7A��S���/�1GA��S���� ��A��S�>�At�OA��SǕ`' +�%� +A��S�� �8��A��S�1� i�A��S�B�7p �A��S���3�'�)A��S̮� Z�q +A��Sʹ -D#b A��S�� (��#A��S��� @A��S�o` +H&WA��Sе` +���A��S��@w19"A��Sі�GA��S�N@V3"TA��S�d` f!lA��S�o��'�:A��S� �D �NA��S��C�"�A��S�=� �m"-A��SՊ �� HA��T.!� U{ " A��T.I��#�"{ A��T/�� PT�A��T1/�$`�A��T1F ��|A��T2��r �k A��T37@`"�,� +A��T3�`�w�|A��T3�@Rv�/A��T5��.+�2A��T5ݠ� +@$�A��T6�@ �"��%A��T6��)f ��A��T7��1XlA��T7��� �A��T9��( �?A��T9c�]� �A��T9| ��#%TA��T: �/�9 A��T:{@A(|/bA��T:��3?+$A��T:����"�lA��T=�` ���A��T=�#��A��T=��.@1� A��T>�@�&� A��T>� F�"ZA��T?� �~]A��T?��i$*�A��T?���! A��T@�@��1�A��TC�@�� A��TD]��H(A��TE���(� *eA��TE��L2(� +A��TF���$� �A��TG&�;4�zA��TG���6f&�RA��TG�@ ��-kA��TG�����*A��TH�+�A��TH��_$X� A��TI�@��%�A��TI�` j-�%� A��TJ � +�S7�LA��TJ��V�21 A��TJ� ��� A��TK: � c A��TKU � �"A��TK^� � +��A��TK� � ��>A��TK�@�".4 A��TMj�7C0MA��TN? ��60�A��TQ\��* ! A��TR��q#�� A��TR�`�2�%�A��TSY� +�%5ZA��TS�~(� A��TTO@ +�5a A��TT�`�1�A��TU�@;..1A��TV��G"�� A��TW.��� � +A��TW?��d]A��TWo I4�] A��TW�`V4�<A��TWܠ%5w�A��TX� �'�A��TX�@%59�A��TX۠/�!]A��TYJ`��4.6A��TYP � r�A��TYu@��&�[A��TYx` U*�� A��TZ�`�W�QA��T[7��.|%� A��T[� 2�A��T\n�T%� A��T\�` �+�5A��T]N`� �/A��T]��K�/A��T^� �,��A��T^���1��'A��T^��G!�A��T_kM1A��T_��4�-AA��Tb��$�#�A��Tbk` ��5�GA��Tb�@3\� A��Tc���#.-�)A��Tc��j�*1 A��TcЀ �'�(;A��Tc�` +��IA��Td�@� A��Te.`���A��Te<@(� +�-A��Te�@ �$iA��Te�� �&�&� A��Tf 0#A��Tfa2 |C�A��Tg��� �VA��Th�� !�A��Ti�F&�8g +A��Ti�`�(�#: A��Tj�� �+'�mA��TjѠ �+�$1 A��Tj�` ,t.�A��TkG�u'hO A��Tk��3 &FA��Tl��V&�)| A��Tm@ ~$��A��Tm!�Q3$) 2A��Tm5@�s�A��Tn4�� $�A��Tn� �� =A��To �P � A��Tp��u |.fA��TqR@J ��1A��TqU���4A��Tr�@.& � A��Tr���# A��Ts%��%� �A��Ts�v6W!5A��Tt�� .1 � A��Tt� � !&�OA��Tt�` ~%�A��Tvv��*�A��Tv�� ��/� +A��Ty� 7��:A��Ty� b & A��Tz<� �'�xA��Tz����-xA��T~+E5�&iA��T~р +La1� A��T�a �A��T����+� A��T��� ��%A��T���A��T����U(aNA��T�� _ � +A��T�o  /5�5A��T��)�#�A��T�^ v14$�A��T�b� ]w zA��T��0�W +A��T��@D#� A��T�Հ + s�[A��T� �e4�-]'A��T�y��[ zA��T����Y �/A��T���6+� A��T�À X!8'XA��T�*` +�5S�dA��T�2 � �+z A��T�� �0�%,A��T��� 4*�lA��T��@�19 � A��T���!�"�2A��T��` hg2lA��T����d'� A��T� e,�! A��T��� ��/qA��T�9�=i � A��T�=�b.�FKA��T�K@J��mA��T��@�1gA��T�K��;,p&A��T�u Y�FA��T����$�A��T���5�A��T��'.-� A��T�[�/!�A��T���� �g A��T���D!�-�A��T�(�g�� A��T�/� .,�!A��T�\@al)�A��T�4� +#(�/s +A��T��`%(x7 A��T�� !*�$A��T�  C+RA��T��`��!�@A��T�j� �%� +cA��T��`�'�-A��T�� 5!�$A��T�w�#�A��T�d tCiA��T�Ҁ�2�A��T�Ӡ�vN A��T����2|6A��T��`N4�%HA��T��@ +�9%.A��T�� ("6A��T����+� �A��T���&'A��T�8� I o A��T�U�~#�$E +A��T��� X]P A��T���o�!�=A��T�� �E#3 A��T�ڀ ;4��A��T� �'?/�bA��T�C��,XxEA��T� 8i&�&A��T�)� �� .EA��T�����+HA��T��� � .�A��T���p�)A��T�����oA��T�|��"�7A��T�� � +�"DGA��T����"A��T�� �2�JPA��T� /�� A��T�` �%��A��T����%��TA��T��`�!�& A��T�U�h0*� A��T��`1-�BA��T��@�!��A��T���#r#lA��T�8� � �A��T����)�A��T�X` ��"vHA��T�{�� LA��T�9`��}*A��T�|�K'�8FA��T��H��A��T��B��A��T�~`s0�A��T�� �$�CA��T�Ȁ �," � A��T�~��0�`A��T����5)Y?A��T�C�E*�0 +A��T��`�*�cA��T�`,�&�A��TŎ� %6 ~A��T�6 �#5qA��T� ��#�A��T�'` ��A��TȨ��f+KNA��T��@ 1H,� A��T� `z�#* +A��T�! �k&�A��T�K@ �1�A��T��@F��A��TϠ10��A��T�{@�&� X!A��TЀ�T� !A��TҪ�F��A��T�ɀ�.#"W A��T�J� �(�0�MA��T�l�}&� �A��T�,`+-2#�:A��TԠ �8!�7A��T��`�.s�,A��T�y�s]6QA��TՀ`5�-�7A��T�e���#� A��Tִ� ���3A��T��ig� A��T�/ 2�3 A��T�/@r*��PA��T���*�A��T��@�46� A��T�\�.1-,hA��T�6�#�A��T�w� �5` A��Tۙ� �}$�A��T��` ���A��Tܱ ��)A��T�����0�A��T�D �$OL5A��Tݖ�� �+A��Tަ��4#�A��T�` � �(bA��T�E�� +�+�A��T�X� �/3A��T����0�EA��T��15;� A��T��9'� A��T�h� +�w5� A��T�؀9o;A��T����.A��T䭀:!�-� A��T���S)�(� A��T� �3��A��T��*�,� A��T�� Q�IA��T��H)(� A��T� �(h!� +A��T� x5+PA��T�@ 6,�� A��T�/���"� +A��T�S���-K A��T��@w#9- +A��T�� <|"IA��T�L`\a%OA��T��` 84�#H#A��T�� �*�!� +A��T��@ 8 0"A��T�� �%'� A��T�� +j.ZVA��T�|��)� A��T�2� �{78,A��T���-0 +A��T�G@�.z +�A��T�c@=��9A��T����� �A��T�` �OA��T�oTj N A��T�p`�%�*A��T�w� 5�{ A��T�}��+?!�/A��T��� &�$A��T��V� +* A��UA@�-��,A��U�$CA��U& �+�� +A��Up #�,�\A��U� �#q7.PA��Ut�( �$� +A��U� :� A��Ub` XA��Ui�u �-�A��U�O�VA��U� ���sA��U��&��A��U �;�(��A��U |� +\_�A��U +.��� + A��U +:`E$N'A��U +� � `'�A��U � ��#� +A��U S� #)<%A��U � yR�A��U LG!1 A��U ��& *A��U ����4A��U . %"�#�5A��U w g!9NA��U ���@+A��U �`�5�� +A��U@`�1/ A��U� � +�A��UՀ6l� A��U��� ScA��UG��,�� +A��U��0�A��U,��/S�BA��U�j�/FA��U{��+��A��U؀A%d#efA��U� ��.�A��U��'�(JA��U ��� A��U=� ��jA��Ug`�+�2$A��UŠW�,A��U����(A��U>���$�A��U�` 5.;A��U�@�7,4A��U$�G( A��U�`�8"l�A��U�� �-2� A��U,`6~� A��U @m�%V.A��Ur` 7�6d +A��U`. �'=�A��U:� �(q�rA��Uj�3&�" sA��U�@ "#��A��U8��)�/�A��U���+ZA��U� ��A��U!��< ��)A��U!��*)�!�A��U"U� *�)WA��U# � +V�(�A��U#` +a �18A��U#��g4�B +A��U#��v2�!A��U#�v!0�A��U%�vR*A��U%�H�8�A��U%�`".R*O A��U%�`S!T/8A��U&n�l�)S +A��U(6� �.�� A��U(��#O"�A��U*' �/A��U*Ҁ?.+5A��U+�����A��U,.�J�!A��U,6G6s7A��U,O �&��A��U,��} @A��U- � ,�A��U-=�� @7�@A��U-����; A��U.! �B-�A��U05�S )VA��U0�� +$ �fA��U0�@H&d� A��U2>�*)W� +A��U2U� 7'� A��U2� � �o A��U3] x*16NA��U4 �%�BA��U5K�B�"A��U5V� �"�A��U5πa% A��U6:@��)dA��U7�` +p*> �A��U7��,�)0A��U8:��+�2�A��U8l�)�A��U9�`J$�)�A��U:�� 8A��U;%�1�L +A��U<��x$�&�A��U=�` +�-�A��U>T���*�A��U?) � ~ A��U?C�'? A��U?� D� +QA��U?� %�)� A��U?� -�$�A��U?ǀ /% �A��U?��!32 8A��U@��,�(�aA��UA4� #,�1T A��UBI`�#�� A��UB��e��A��UC-�/�mGA��UC���(�'� +A��UCԀ �:. A��UC� )� mA��UG���Z:"A��UG�>80�A��UH@ +�,�A��UH� �{%.A��UI$� [8-,A��UI2�(u �A��UI>��[A��UIZ��[ +A��UI[ S � A��UJ, �0�*P A��UJ� 3 !'A��UJ� ��+tA��UKy`�-��xA��UL���#=A��UM � pWRA��UM �2�UA��UM-�Z��lA��UM�@�4�)� A��UN�+ !{A��UO]��#7}&A��UO�`n3| A��UPk`�D�/A��UQ +��E�AA��UQ��9 $�'A��UQ�� �3b!�A��UQ�` �%��*A��UR`�5�y(A��UR�`$#8A��USC �, _qA��US��J�$A��UT��"w&�A��UT�� +�P{0A��UU ��&� A��UU� �W5#A��UU��/Ds A��UV�� � +A��UVF��l4A��UW��1!�"< A��UXV� =�+'A��UXy !2S*A��UX� �(4$A��UX �"2� A��UYրm e2� +A��U[l��.��A��U[�`�"� A��U\�H.��A��U\�`�$|1� +A��U\�`� I%}fA��U\�@ �& �/�#�|A��U^� � Q,;A��U^�  �A��U_4�5�2� +A��U_��@5 +SA��U_��71�[ A��Uat� +&�Q8A��Ua���"j +�A��Uc8��,�\A��Uc���3($� A��UdS� +�0��A��Uds�� +�UA��Udր�!�30!A��Ue ,��A��Ue��!�!$)A��Ue-� ��AA��UfT��y4)A��Ufm�s � �6A��UgWD ��A��Uh(`K V*�A��Uho� �7� � A��Uix �)% /A��UjK`!�&J +A��Ujߠ '2pbA��UlZ��%@A��Ulo���'NA��Ulu� +�3�� +A��Um4��8�NOA��U�A� &��(A��U���� �HA��U���,2� A��U�A�/@� A��U�J���(�A��U��@ � TMAA��U����7&�A��U� �2�+)A��U�@S � .A��U��@u� %8A��U����4m@5A��U�-���*KA��U�À �IA��U���lYA��U����.��A��U��k�A��U�`y&d �A��U�a �3�,f A��U�F ��$�A��U��` �� A��U�z@�� "A��U�?� F/` A��U�L`C-C"� A��U�y !{;A��U���[O�RA��U��V�"b8A��U�S` )� �A��U�� �� +A��U��`i 0�A��U�O�� L5A��U��@o� A��U�� � +1?A��U��`7 s�^A��U�� ( (� A��U��� +� �0�?A��U���]*�o A��U����5�A��U���Z�*= A��U�J@ �q2�A��U� � � A��U�n`!��A��Uæ��#A5�A��U����1�aMA��Uī ��2%A��U��/-D3A��U�H`��$PA��U�I� ;(�+mA��UǼ@�! � A��U��q!�,� A��U�q�S6_&N A��U��` �*��(A��U�p`}�#� A��U�� � �A��U�@9=!^YA��U�6�j p*�A��U��s�'6FA��U�< +�.�(pA��U˯���� A��U�ܠ��$UA��U�y� !$��3A��U�� p�%�A��U�� H5kjA��U����$�A��U·@ �B� A��U΢��&��A��U����q0 A��U���--"V A��U�Y G�)�A��U��� +w/�O7A��U��`2r+JA��U��7 |�A��U�s��*k�A��Uх j,/tA��Uь�Z+%_A��U�� �a')=A��UҒ� +y�0=A��U�� �� A��U�~`{�%�8A��Uӡ` p 'A��U�-�3:;6A��U�2�C�0A��U�H�.2��A��U�o@� +�� A��Uױ�7�A��U� ��WB?A��Uٷ�5 +A��U�N`9�6qfA��Uڈ �� +�A��U�C���Z&A��U�8��0�S A��U�r@p!�1��A��U���� �3� A��U����$P#�A��U�` ��A��U�РG<UA��U���*� ` A��U�{�!�"�A��U�` ��2�A��U��`�$�/A��U��� �A��U�`�Y%l A��U�� �#�4` A��U��@, (�AA��U� +�(�RGA��U������A��U�' [� A��U��� �G A��U�> �2�" A��U�E � YA��U��`� �)AA��U +Q#M0"A��U� q!A��U�� '� 1A��U�V`f4f�WA��U�@�!��RA��U�x`�C �A��U�Z�M�A��U�x�B�`1A��U�؀m+; A��U�O�s�.��A��U��9 �- +A��U��:"�iA��U���k�$A��U�B �H�HA��U���� 0HA��U�ڀV A��U�݀�R�A��Vg ��6� A��V� �*� H A��V'@(�,_A��V��(�.B A��V�� A��V�@c�$dA��V�@ �,�+ 4A��Vn�� �1A��V�`�m� A��V� �c2A��V� � �)� A��V�� � � ��A��V �t/7bA��V ��*l/�A��V +� &"I6A��V +�` 1*O"� A��V �@ -Q�A��V ����'A��V ����-I A��V q`I� A��V �`0I)�!A��V@0�(� A��Vh� +m �(WA��Vl� �+� 1A��V�`? �A��VC %3,N1A��VX�X��A��V�`i�AlA��V���&� A��V� +� +�$A��V�� -#�A��V�� �*�7A��V@��w� A��V)` '7 �A��V� �-� �6A��V� #B�A��V]�)2�'cA��Vd@ 4!M-A��VЀ$��MA��VZ�~!7�;A��V��%e * A��V �>4A��Ve�X/A A��V���'�2,.A��V[ 1A��V3`!&�#b@A��V�� �(1�A��V��'0�{A��V��S A��V� J5gA��V��8(j A��VF`X��A��Va`�/� �A��V�` �$�%_A��V� /�AA��V �@w#2�A��V ����|�A��V!:`� |�KA��V"I^%[(�A��V"�� H�"'?A��V$*� ��'� A��V$� +F$� +A��V%D�o�$^ A��V%t� ;"JA��V%�� �'�$ �A��V%�� �1� A��V&��e'��A��V'O` +`3P] A��V(���5�A��V)P@Q�, A��V)e ��4�A��V)���+�eA��V*y��(�1wA��V*��aP{ A��V+J�#$�� A��V+���%A��V,-@ ��3��A��V,���tA��V,�@J&"�A��V-C� ;�4� +A��V.U�;��-A��V/���  +�A��V0�][- *A��V0� ��A��V1�` +�A��V2:��"��:A��V2?  +z$� A��V2d ���?A��V3�P.��A��V3����1A��V3���'�Y A��V4v�O_ A��V5�` �#�A��V5�� � g� A��V6��,�NA��V8��11&�A��V9�� �� +� A��V9�� 3*�A��V:. n$K2� A��V:2�� " A��V:� �$& +A��V;� ;0�"�6A��V;�� �!L%�A��V;� +�-+��A��V<��$*��A��V>@��)DA��V>�� �� B +A��V?��#�!A��V?� `�,A��V?%�x-N0� A��V?k��YA��V?� +$� +A��V?�`� �A��V@&@d)�3� A��V@eQ �PA��V@�@!fwUA��V@��n�-� A��VA@@p#�$A��VB@:-wA��VB-`x +LA��VB@�t?m+A��VCE�(�"� A��VC�@ (Q+KA��VD� �+1LA��VE�B��HA��VE��rq3 LA��VE��" +�A��VF�`f.�A��VGĀ�+� +�A��VG���'2"lA��VH� `�*?A��VJĠ�#>=A��VK�@ #� +�A��VL!@%  � A��VLk �<c-A��VMZ��&,A��VO=`I&L3A-A��VO� n*�.U A��VO����&�A��VP~@ ,p -A��VQ @["k0A��VQ2`J>.� A��VQQ@ �*2A��VQ�� 5%!�A��VST` ��*{A��VUQ �"s)A��VV� �"I A��VW� ��0A��VWr@���A��VW� �"(�A��VW� � �A��VX2� �EJ.A��VX�@0 %A��VY ^��,A��VZa��NA��VZˠ�)�$�A��V[=` +�6&�A��V[� . @� A��V\@[�*;NA��V\����!WA��V]; t*�*'A��V]>@��_A��V^�&&*@A��V^k� b�b A��V^{ E� �CA��V^���.�A��V^�e0�/� A��V_��� �3A��V`V�h= A��V`��X \�7A��VaK�M+�,eTA��Va� ��$j A��Va�� �"iA��VbR� ��.A��Vbs`-!K �4A��Vc h ?�:A��Vc} �)u2/ A��Vc��;l +A��Ve +��(",gA��Ve0 �&��A��Vf�q^A��Vf��'���A��Vf[�*'��A��Vft�q&A��Vf���@6 A��Vh[�� �� A��Vh��6##1A +A��Vh� �� rA��Vi�` %A��Vj��g�2� A��Vj���1-,�A��Vj�@:2D u;A��Vk,� �0�A��Vkc`���A��Vk�`�3A��Vl��C')&� A��Vl� �"�&l A��VnK@ +Q�� A��Vn�@� A��Vo�%�z +A��Vp�7"D �A��Vp� i;)?"A��Vp�� B � 1+A��VqL��.�p A��Vr1@ U/��A��Vr� �1m*� A��VuU` �(ZA��Vu�� +l�A A��Vu� �2vA��Vv~�d�*"�A��Vwm� !�). A��Vx� �2:%5A��Vz� +"I,[ A��Vz�`G1�1A��Vz��{#�5� A��V{V� �' A��V{� 6 A��V|4 j%W �UA��V|F�u.�kA��V~ ��.7y�A��V~�� o aA��V~��� �! +A��V����.�49A��V���d#d+�[A��V��`S(� A��V��5!� +? A��V� J4tIMA��V�IM$9$�0A��V�؀�"s �*A��V�T@� V)�A��V�t� � /dA��V���m31A��V�����!�JA��V�� � � A��V����!FA��V�Z� �*�� A��V�&��)v A��V�� �e �DA��V�`@�0A��V���@/d �A��V��� t�#' A��V�� P�!�RA��V�d�*�d A��V��`�3G�A��V��� Bz�A��V�q��*a1 A��V��`I� A��V�!�P�:A��V������A��V���X�2�A��V���'J�A��V��2�' A��V�,�j&o%� +A��V�S� +W)[j A��V���w�1�:A��V���#� A��V�N�("�0q A��V�l@�m�A��V��@� ��A��V��t kA��V�^�$4c":A��V�g ^ �,� A��Vì�C��A��VĴ�� �+�A��VŘ`�  mA��Vť��4�$P A��V�� +��E�A��VƆ@>)l1 +A��V��` +d�A��V��' ��2A��V�X�s ��DA��Vȡ@.F$A��V�` +�0� 5AA��V�4�F-0�A��V�,`(,,�A��Vݎ�M��A��V�L �5�$�eA��V�t �%��A��V��`^�0 A��V߹�%0�%�2A��V��� �5)�A��V� ��A��V��c VA��V�`�,�,� +A��V��@{6y�A��V� � +��)A��V���h4�A��V�, +h0� A��V���N$# A��V�` "�A��V�۠t��A��V���v )+A��V� ��-�A��V�|���RA��V�3~J��A��V���r���A��V�(��!a$� A��V�� '��A��V甀C" + A��V��` �/�#A\A��V�� !�XA��V�,�B�� A��Wm`�!�31*A��W�B"91 +A��WY@E +V"m?A��W� }%DA��W���"� +A��W� "B� A��W �:)I+nA��Wf��0�)%A��W�@�4q�A��W�`f13�A��W� C2��A��W@@R�&�A��WB� +�!� A��W� ��2A��W���)H8A��W5��B1A��Wn ]Z!?A��W� '�� A��W�j 7 �A��Wj@U.�+�OA��W��m�*;7A��W� ��j'A��Wg��$� H +A��W�@Q"=,lA��W�� � }A��Wz���c +A��W�@�(L��A��W�`$� �A��W��)�A��W ��#"�!A��W!L �+%�A��W#�` R3 +�A��W& $!%0?A��W&-���5�A��W&��D +F +�A��W'�@�^4� A��W'��-�uA��W)��.+� +A��W*H���)�3A��W+���/!NA��W,i &��A��W--�DI6A��W-�;$9�A��W/D�!�%�A��W0� +B,kK(A��W1 f4i}A��W2-�� A��W2�(�19A��W3`���A��W3��,o�A��W3���%j.�?A��W4��f �"9A��W4�@ b3�(�A��W5@��3 A��W5����!�"A��W6@��/� A��W6� �3�LA��W7;�/$�AA��W7��� � �;A��W8�`�!T;=A��W8à ��:YA��W;�`�0�"�gA��W<� 54�wA��W=����AA��W>q0-� A��W>N@E �A��W>���Y)q3A��W@a���)PA��W@�@ ��0�8A��W@�@U �~ A��WA8 G�2�A��WA<�o&�$' A��WAe +�$B� A��WAo � $kA��WA� <�%,A��WB� 1 c B A��WB�` R6A��WC��o'�/� +A��WDy�� �LA��WDȠ �&|(A��WD�� 0u,gA��WE��*W�A��WEw���A��WE��� KA��WE�`"4QA��WF`�"!e&A��WF�@ �& *�A��WG @�/;�A��WH4I=A��WH�` �*�#>A��WH�@ ()��?A��WI��� %>A��WJ3`�+A%JA��WJ>�l+�(�$A��WJ�5�4� A��WJ� ��sA��WLt`�+>+�A��WM���#�5A��WN` ~3� JIA��WNˀ 6P!4A��WN�� w�XA��WOj@��4Q}A��WPd��$9~9A��WQ0�F��A��WQr��+0 b.A��WQw@�#��A��WR��&,�qA��WR�@ ��"aA��WSA � +)�A��WTC +��BA��WU|`�3� A��WW� 4"�+�A��WX&�iZ�A��WX=@�z�kA��WX�� +��A��WX� ��)�YA��WY!��B"vA��WZ9 ~)�9A��W[�� H'EvA��W[!@ �'(r A��W\��"9� A��W\� �$$�A��W\�� +�!��A��W]��s&ZA��W^�`D�,�*A��W^�`� o�HA��W`L`Y&##A��Wa� g3%�.A��Wa�@��2A��We��*��A��WfƀS�= A��Wg`�"�7A��WgX���,�-A��Wg`�s%�!� A��Wh��  +$ +A��Wh��,rGA��Wi*� vA��Wi�`���(A��Wjc�&, $UA��Wjx`)&]�A��Wk(��"*"A��Wk� �� TwA��Wl� v}!CA��Wp 4z%�1A��Wp�� �� �#A��Wq � �?8A��WrK�� G$MA��Ws�@ )-�A��Wt@1fA��Wt( $ RTwA��WtM�!#�A��Wt�@ LB*A��Wu � C �@A��Wu Z}�A��Wv@� T�QA��Ww|��*��A��Ww�`�a5A��Wy� i'��3A��Wy����A��Wy���E +A��Wy€~4-7 A��Wy�$!�]A��W{L@ ��;A��W{��� ��A��W{��1V%^$A��W|�@ �$�sA��W}x�� � - A��W~�Q�"GA��W�� ~1�'� A��W��.� AGA��W�o c� � A��W���[ �)EA��W� �&�{A��W�F� � k+� A��W�@Y,�0n%A��W�, �"2&n;A��W�Y� �-&A��W�P��V08A��W���!'=iA��W��� m�,� +A��W�� `+$A��W��@�.5 +�A��W����vA��W����-X�A��W���a't E�$�� A��W��@+'A��W���+�1/ +A��W� +�"� �A��W�G P$e2. A��W��@n��YA��W�� �~ A��W���2r�A��W��@/"f�A��W�G@{�*3A��W�*��- +[�A��W�̀��&l A��W�e� �9�A��W���0|�A��W�Ӏ�+�(�tA��W�@��+� +A��W�i �FA��W�����4WA��W��`) +F�A��W�1�h��FA��W�a��5�A��W��44�S$A��W��`��1�A��W��q cMA��W�V��f�A��W�`�����A��W�e�� ��A��W����A��W�@�$�.MA��W����lA��W�b`T,�� +A��W��`�#h! A��W�� ��� A��W�a�Z�-�&A��W��}-f'4A��W���w1lA��W���1��A��W�� 9b�A��W�)@@^�A��W�`��� +A��W�]���A��W���k*s#A��W�'@�I ++ A��W�I@G�6A��W�c@�e#�\A��W�e@ ""�A��W��� q0�*kA��W�Y`� �,�6A��W�F���"�HA��W�� }��fA��W�!@x�)eA��W�E���+RA��W��` �A��W��M F%>FA��W�Ѡ +� +].w A��W�/��"�2� A��W�5�^2�1,A��W�q�h!�X0A��W���!�0zrA��W����q(EA��W�� �-D.�A��W���e 3 A��W�9` ��!�.A��WԀ� ^ +�� A��W���2��A��W�A��IZ A��W�@��(^ A��W�:` �'�5A��Wև C3QA��W��D2 $� A��W�\� �'H2"A��W�z�dDA��W��@��% A��W��� +�5�-A��Wط` 03 �'A��W� �)�+kA��W�1`�/% +A��W�U� �"�1�A��Wٔ��}/B A��W� ) �� A��W���.A��W�r�  W A��W�r�# 6DA��W�N�� �A��W�n@� 64�A��W��`V/�,�0A��W� �/� A��W�3�0��5A��W����1J,>A��W�@�.\A��W� D�A��W�M���A��W�U��*.r A��W��2�2�dA��W�p@�*1<A��W�s��*�WqA��W�"@s%+"qA��W�K` ���A��W�9���2�A��W���+>A��W����� A��W�`*;$�2A��W��� �+�Z +A��W�9�� �A��W�@�V< A��W���%�b A��W���$D'� A��W� + kA��W�$����A��W�5`(�3U A��W�V��'�-E A��W�u �(�2' A��W퓠T�*�A��W� �'��:A��W� �s�A��W�@��"-mA��W���7$�RA��W�w��� 83A��W�@~��pA��W�r�-� � +A��W�S�p� � A��W��`i*?A��W�*��"e4�0A��W�I�d'�%A��W��#JA��W��`5 �"�A��W� +!3�A��W��� �J.A��W� �-��/A��W��`�%�FA��W�� +��\A��W�� V�%VA��W��` [*�*A��W��� �/��A��X��J)� A��X+` ��7A��Xl��583A��X�` �&{ �A��X� �/�X9A��X� �2w"*A��X� \��A��Xl`�P A��X� �e�A��X� �1�A��X �E,B1� +A��X � �1(yA��X +� � +A��X p�#� �SA��X - (P+�A��X ���&gA��X ��&A��X�@ ��&�A��XH +�YJ A��Xz�v{+�A��X� �*�.�A��X�@1�%;A��X�@ >�" A��X5�w�� A��Xb���A��Xl��<*� A��X���'�"#EA��X�@ &�&� A��X"� �q C\A��XK��"�$A��Xi` R 0d A��X�� �)� A��X��m�A��X���*�"A��X3�E��A��X�@�  oA��X��x#A��X� h YW A��X�l%S +A��Xc +� �7A��Xg �!gh*A��X���2��sA��X\��4@ A��Xn@�#v('A��Xx� 5w� A��X��� �2 A��X��)� )^A��X�+"�'Q A��X�` �#� A��X'`~z7U�A��X~J�(PA��X�@�N� A��X��L�+?�A��X�`5��BA��X �`� u�$A��X � ��'E_A��X!� +�#�s A��X"�@R�.�A��X# � h� A��X#�`0�%��A��X%W� �1 A��X%�@�1�$�#A��X&x +4%-�A��X&���!K}A��X&��(�GA��X&�` k+S A��X(v� $R!�A��X(� ��-�UA��X(�����A��X)� �0O'�2A��X+��� +I.�nA��X,}��',1�A��X,����! A��X-@� � +BA��X- ���xA��X.@�$( �A��X0L� V� A��X0V�%�y A��X0��u�#�^A��X2M � ++�A��X2S & +-A��X3s,�!- +A��X3�` b#��A��X3�� ���A��X4I@�$�A��X4�@�#�4:A��X4���.�-yA��X5 �� �A��X5A�.��A��X5~fp�1A��X5�`��7��A��X7�@�3�A��X8^ ,jA��X8W@�"B$�A��X8Z� 3 �5A��X93@�,���A��X9ƀ%��"A��X:g �%�A��X=z@� � � A��X=�� sfA��X>c �D�A��X?���&�A��XA� (j +�'A��XAV��-�A��XAg`>�� A��XDG��) A��XEw�U�'yA��XF� 'O4?�A��XG 6� +A��XG$`��0L A��XGm � +�+� A��XG��*\Y +A��XI +�*_5*A��XI� ��#QA��XJ�� l�1^NA��XKH�V! A��XKJ` <E� A��XKz�(hA��XL��\ n(d A��XL�@ +Z)3IA��XL� /!A��XM6� l&�!A��XMՠw#>&�A��XN` +!(� A��XN���� +7A��XOj��1:�A��XQ`� R�A��XQ5�  A��XQL��A +A��XR/��"��A��XRD�- #�A��XRv��#�&�,A��XR�` +�.A��XT�y ;A��XT�@E3r A��XU � 7nA��XU�`!.�A��XV��l/1' +A��XX�d��A��XZ��P"4#A��X[�w% .�A��X[���"�0A��X\(�1!9UA��X\{@ 8*�1�A��X]5`�2��?A��X]��� n+oA��X^���4b#� A��X^�� +�3 2A��X^�`�2�%�A��X_h@ �& �LA��X_�@t5�A��X`~@� ��A��X`��)�!�A��X`�@ e{*� +A��XbA��2)SA��Xb�`v)�1�&>#u$A��Xo�� � �A��Xp���)�A��XtY z!�!:A��Xu6@ $�vA��Xu��q_A��Xv����1A��Xw= � Z��A��Xw� �'Y$v +A��Xx=� .kA��Xyl�5��-A��Xy�@|Y�A��Xz`/q$,A��Xz � +�*� A��Xz�� u%�dA��Xz͠5� oA��Xz��T^A��X|c�� EA��X|��f�2�A��X}�`$3� A��X~ k"�#< A��X~�� �a,@ZA��X~�@�,��A��X~Ƞ� f yA��X~��Nd2pA��X"@�~ �A��X���=@�A��X���� A��X�d�&�A��X��� +�*!A��X�� �hAA��X�Ǡ=x bjA��X���t� .A��X���*%{4A��X�� J#H(�A��X�@ *P-�A��X�f@�)� +A��X��`���A��X��%$"FA��X�� `� A��X�� �9+~A��X���2"�A��X��@ �4� [�A��X�o` z2� +A��X�l��� A��X�@S&v�A��X��)�fA��X� B}�A��X�+`��� A��X�l�b?70A��X�� N4'L�A��X�l`�3PTA��X��`*+{A��X���%�^A��X��� +� "�A��X�@ �4^" A��X�� �~� A��X�$���*A��X�-@�!��7A��X������,A��X� ��#�/A��X�� ? `'b A��X�8� �2�A��X��`<.d�A��X�{�BF)BA��X��` a+�"A��X���'FA��X��� +�"H A��X���)K>A��X�)�� +� +" A��X� �* �FA��X� `O &� A��X�$��x,�#A��X��@��eOA��X�}�r+�!|A��X��� S,tO A��X���?3  +A��X�π��-VAA��X����3IKA��X�(�]"}.C A��X�X� ;7{ A��X�r�� c05,A��X�X`<�/� +A��X���` >BA��X�� ��6u-A��X�A�-e� +A��X�[���_KA��X����!Hn1A��X��`�j� A��X�-@/!�tXA��X�I��,��3A��X�V@� �~A��X�c��O��A��X����%�%�5A��X��� +R 4� A��X���D*7��A��X��@\1��A��X�,�A��X�a�-�YA��X�i�=- A��X�Ǡ��2z A��X�#��"�A��X��`�+��A��X�"�;b � A��X�H�T~�A��X�1�>"�3*A��X�J�n)�$�A��X�� +��� A��X�Ġ�� +� +A��X�����,=4A��X��@� �� A��X�� ���A��X� � �/$A��X�`�*:� A��X�����1�A��X�3�..WsA��X���b1� A��X���-u c A��X�[� ��� A��X�g�"&� +A��X��� ��.�A��X�@�� �A��X����'�+��A��XŹ =�=CA��X��`��A��X����&)�A��X�&�: �73�A��X�T�t�*�HA��Xʪ� uN�A��X�� Q*�"nA��X�`C� +A��X�8�+ +��AA��X�D@`+"A��X̨`\0$"+A��X�� �)�A��X͏�&�WA��X��`�"�!�A��X�G �$q4'A��X�/`�0�.n A��XЪD�,�A��X��`A(�A��X� +� b� A��Xԇ� '/�A��X��:*q A��X�h _5z%?>A��X�w� �h"A��X�)` "#�'�NA��X� �#�..A��X�7�7�j A��X�_@'�-KA��X��`q'<�A��X����)��A��X�-�!@ A��X�A@O%�-�A��X��Lf��A��X�a�&�lA��X��q(|<A��X�(��&+A��Xۋ` j6��A��X۱� ��A��Xܨ ->,A��X��@'L$NA��X��� 6,�.�?A��X�P`i.�� A��Xݵ���1�A��X��1%l�A��X�n`��Y A��Xަ�)!�#�A��Xߞ� ��%>A��X߰ �� A��X�Ӏ�2�A��X��� �!_A��X�C@�r� A��X�f�� �61 A��X�� �w"A��X�*`:��&A��X�V � '�jA��X㩀�#_r A��X��;2&#� A��X�� #2m A��X�6 � +�A��X�:�s +��A��X�Z@z �#A��X�@�%�A��X�#�##9A��X���a6�A��X��`�3� A��X� 7=1|A��X�@:��$A��X�v�3 �"A��X�ɀ(-�/� A��X�o��"CcA��X���#&,3�A��X���'�2e A��X���Ry;A��X�n�a'; A��X할 ��A��X���_�3�A��X�* � �=A��X�f �,J A��X�р� +]A��X����AA��X���$�A��X�4@ QA��X�> ��&A��X�`� +* A��X�� �  � A��X���"�7A��X�N�� HA��X�i`/6�JZA��X��` �8�?A��X�a (�!A��X���2#!�7A��X��� �)�%A��X�� +�*"� A��X�� N% A��X� � +&A��X�6 �0;'�A��X�P��p +A��X�@��30 A��YB� #^)A��Y �! DA��Y ��O A��Y�@}� � A��Yנ��,{A��Y<�� +c0A��Y�L"XA��Y D`�Q H +A��Y z�2}RA��Y +=�k1%6A��Y +Ӏ +M\FA��Y G�]�eA��Y �`T(H +A��Y n`9�A��Y � � ,/�A��Y`�+()1A��Y� +.&�A��Yp�%$'A��Y���$�7�A��Y�@z 'pTA��Y�� !#1QA��Y9@�+�A��Y�@��iA��Y�`�$�=A��Y�� � �A��Y� �)'3e A��Y�@7$�*�AA��Y{�2+i&bA��Y�@ +�%�%A��Y= w) +�A��Y� �$�!�8A��Y� �3A��Y[@�: +?A��Y���+ )� A��YG@BEPA��Y)`�8A��YF���+�A��Y�`| 0 0QA��Y,��)1A��YR +4 �,� +A��Y�@0'� � A��YŠ]4 )�A��Y�@���A��Y"��3W +A��Y"�`S%��A��Y#`m�A��Y$:�u*EA��Y$�� �$�2A��Y$͠ 9!�A��Y%� %� � A��Y%����75A��Y%�`)zMA��Y&=��!/'�A��Y&� ��2�&A��Y&��c)45qA��Y'�+s � +A��Y' �$� � +A��Y'f t�-�A��Y(���2�'A��Y)` H%*!w�A��Y)!� W&#A��Y)n� ��]�A��Y*���=aA��Y,���11-o A��Y-Q@!V�+A��Y-�@�!( A��Y/�� �+,�1A��Y1f�m�� A��Y1�� � �[A��Y1�`�A��Y2�@�24� A��Y3 +�2  A��Y3' �~*A��Y3�� "  A��Y4.@���A��Y4�� 7�^ +A��Y6�@ �I!��A��Y7~ x�6�cA��Y7�w�A��Y7�`� +�,� A��Y8��� A��Y9� .+�JA��Y:�@O![,A��Y;`<�'#A��Y;x�g�RA��Y;��� A��Y;���s#�A��Y<�@ �!S�A��Y<��r$�6P A��Y=y�) #rA��Y=�� �8,DA��Y=� �0v+QA��Y>��7-)@A��Y?B �#�#A��Y?t�� �)A��Y?�l�!�A��Y@�@ h�&8A��YAZ@ �-�A��YC0�h+r A��YC@��8A��YC����`A��YD C!f�-A��YD�`,%� FA��YEJ��(�1 +A��YF��(t�A��YFY��t`A��YF� �� �QA��YF�� �!�IA��YG�I�)A��YHh# +,� A��YHۀB1�(�A��YI~�4�A��YI`s�#A��YI� #,�A��YJ�`W� A��YK]� �2A��YLs`N yA��YM� ��,A��YP`Z%��)A��YQP�:"1,A��YQ� �7�'A��YR�@(/?"- A��YR� /��)A��YS`��!�LA��YS� �&n= +A��YT�@�e;5l� A��Y��O'7A��Y�  ��A��Y��  ��A��Y��Qi+OA��Y� �%�y A��Y��@Y'-�vA��Y��`�`/dA��Y�P`XB/A��Y�^��4-A��Y��r��.A��Y���//-�A��Y�I����A��Y����6�#� +A��Y��� D�A��Y�A��)�3 A��Y���z$�6�6A��Y�� t� +A��Y��aGA��Y�K���&A��Y��$�QA��Y�� �#�A��Y���A��Y�)���A��Y�;/�!�A��Y��` z�iwA��Y�y��.�.3 +A��Y��@�.A.�A��Y����T$v-A��Y��@ s�% A��Y�� !c� A��Y��� +j(} +A��Y�9  �&/ A��Y�d� +4�+��A��Y���� ��A��Y�1`� ("�,A��Y����+� A��Y�;@R&�5OA��Y�i��%H�A��Y�d�2 �g A��Y�Q��+��A��Y��`� �%�HA��Y�� P\ E +A��Y��`��+�A��Y�����!�EA��Y������A��Y���}��]A��Y��`� +-(A��Y�~� B(A��Y�u ��/A��Y� + ps(SA��Y�, +�@-�>A��Y��@3�M A��Y��^��A��Y�X�3)9�A��Y���%�!A��Y��: �$� A��Y��` �3�?A��Y���S/ -RA��Y� ��%.5QA��Y���6K(� A��Y�� v$�A��Y�` �%A�5A��Y�"�H A��Y�=��%!� A��Y� 3#D(A��Y� � �#� A��Y��� k*� A��Y�� � �,(A��Y�5��I�A��Y��@r �� A��Y���� �� A��Y�)�!0 �RA��Y�V Z '�A��Y��@ �-2)A��Y�`t1��rA��Y� �.|�A��Yǹ� ��7:A��Yȳ +! +-A��Y��� �/4A��Y��`Q�aA��Y�.@��A��Y�V�a6cA��Y�J�2*� � A��Y���'��A��Y˵ ��A��Y� � y*:A��Y̱� +! +�/� A��Y���? /.A��Y�� �5 *�:A��Y�m�~)�!kA��Y̓�'r�A��Ÿ́��d�A��Yͻ��'HiA��Y�K@a�)�LA��Y�#` q d ^A��Y�e��")lA��Yω�5� A��Yϓ �e.'A��Y϶��_$�A��Y�s �,�A��Y�d � ,KA��Y���%m A��Y�a� Q!�A��Y�P��B&��A��Y�` f$��A��Y�C@�Lc A��Yղ��4�A��Y�[`� A��Y�e��<� +A��Y�ހ�+$ � A��Y��}Z8/A��Y��@�3;�0A��Y�%�).\"��A��Y�{ � A��Y� � � +�A��Y�M���2A��Y�5��)j A��Y�<` �;"� A��Y�Q� �u,mlA��Y��&�5�A��Y�B�U B�6A��Y߸@�"��A��Y�@�%$�A��Y�+� �� A��Y�\��"��!A��Y�: Y%�A��Y� t)�� A��Y����#F/A��Y��� >*AA��Y�#`o.�=qA��Y�-�� )�A��Y�z H��A��Y�M&�@-A��Y�}���-� A��Y�#�&&] A��Y� �%��A��Y����� +A��Y��!�)� A��Y�� �0,�A��Y��� �,��A��Y� +�/0� A��Y�)$ `*g%A��Y���8"oA��Y�� w/&�:A��Y�s �3!x)A��Y3*� YA��Y�`�"�,�2A��Y��@� +�gA��Y���� � A��Y�b� �4A��Y�l $&�H A��Y�� !� A��Y�ʠh��A��Y��h �&� +A��Y��� +��x"A��Y�@A"� +�=A��Y����-A��Y��@���A��Y�16 �,]UA��Y�S��$r(��A��Y�H� �)D A��Y��`1� HuA��Y�^�%�*N A��Y�� ��8 KA��Y��� A��Y��@���A��Y�z�_u$ A��Y��� � s� A��Y���g$�� A��Y�K�X"�A��Y�T� V� A��Y���X�/)A��Y����g/� A��Y���0)�#� A��Y�ɀ �'�A��Y��� +�6*%A��ZS�� ^A��ZJ� *A��Zg� +S��dA��Z`��*JW A��Z�@�`xA��Zo���A��ZU�U5w!),A��Z�� �3A��Z ?e2� A��Z����-�A��Z W`�� BA��Z ���!�$�UA��Z �� C)�IA��Z +�� +V��A��Z +�@9#�4�A��Z `@O 4� A��Z i�� 4�A��Z �@�$c2� A��Z �l&v+�A��Z �@�#VRA��Z� "6�� A��Z �,@� A��Z"t� u4A��Zb`n�*d�A��Z�@ 7+��A��Z�`��!hA��Zc�5 J �A��Z���!�A��Z0 �##�A��Zv` � L%3DA��Z +@ �4�9 +A��Z��  )NA��Z,��!v� A��Z���"9��A��Z��Y3%SA��Z"` E ��A��Z�[* � +A��Z��#�#�A��Z� H G&A��Z; i!�)0 A��Z\� ����A��Zg�K�7�A��Zx�(��A��Z}��$:.c!A��Z��(��}A��Z���1J.� A��Z���/�2�-A��Z��7 �A��Z:�/N� A��Z���.� A��Z� �"��A��ZO3��A��Z��+ 4V A��Z�`$�O!A��Z���n 0A��Z��IaA��Z +�S s1�A��Z S�D$9'I9A��Z"� +y,h+�A��Z"��)�.JiA��Z"�@q%� B2A��Z"���'L �A��Z#C� H�A��Z#�`�!#�FA��Z$ m5�A��Z&Ԡ�C� A��Z(��q3�9A��Z)y�* -A��Z)�@3�lA��Z*R�C +f!A��Z*��C �#p7A��Z+` � +[A��Z+{���"l\A��Z+� ��1ZtA��Z,� ��A��Z-@�*�� A��Z-g���#e A��Z.� � 1)�A��Z/Z +�H�A��Z1Q�s 7A��Z5| Z*�1� A��Z5���&� A��Z6�L g |A��Z6��I�)�A��Z6�� +d0DA��Z7� � +1A��Z7�`& �!�A��Z8!� 89e�A��Z8O��9A��Z8� �*��1A��Z8�@1 9%�A��Z9` �c+l8A��Z9V@�0��A��Z9�(~A��Z:�c$�+�A��Z;V 2#�>FA��Z;��!��A��Z�.�+VA��ZA ��2K!LA��ZAk` �*��%A��ZA��#� � A��ZB��+(.�A��ZC�@�1# A��ZD�� !H )�A��ZG/`��\A��ZG�@)^|A��ZH.`��)/aA��ZH�� �'��A��ZH��<2+�A��ZH��G)66{A��ZI,�:"�1�A��ZI� ���A��ZK� E-,�A��ZK�`+8#� A��ZLF ��'A��ZLN���A��ZN! �&O#�A��ZN[@ n��A��ZN� � }7�A��ZQF$�+� A��ZR�` 4�A��ZR��-$3�A��ZS_`�"�5UA��ZS��8/.2��A��ZTl��*/~�A��ZU� +3~� A��ZV:@u7/sfA��ZVF���1O A��ZVX��&A� A��ZWU�7�A��ZW�@� E#A��ZW����$� A��ZW� $�f A��ZX `� ��A��ZX3 +9�BA��ZXՀ��&�A��ZY�� r#1/� A��ZY��_ XA��ZYŀ�L2[A��ZZ*�j.2&A��Z[b���-�8A��Z[k/��4A��Z[� �-� +UA��Z\��#d A��Z\�� =#�^ A��Z\��j �%j +A��Z]M �2$LA��Z]x� z +�>A��Z]ʀ�(�&�A��Z]�� +�&�;A��Z]� �!�+� A��Z^ F'�(xfA��Z_ހ ��/� +A��Z`i�Y3z*[A��Zaf`1/�A��Za� R� ��A��Zb#@�z �rA��Zb�@DKWA��Zco��4L'�A��Zc� �M8�:A��Zd'`�� SA��Zde@�] A��Zdh�� )A��Zd�@� �(�RA��Zd� {$' +A��Zd� �#�� +A��Ze��Q*F*� +A��Zf)���,v}A��Zf��I*� A��Zh��%S�"A��Zh��R S'A��Zi��4&� A��ZiǠb!i�dA��ZjtB*P#A��ZjC� y#��A��ZjZ��$�8 A��Zjŀ�$C6;+A��Zk��� A��Zk* �(� A��ZkH� +�#� A��Zk�� ;���A��Zl<��" A��Zm��e�%> A��Zo �53�A��Zo��01 A��Zo��u,�A��ZpH��& �A��Zp`�5'f GA��Zq9@�PHA��Zqu�*m4S +A��Zr��3�&A��Zsd` +�/�J A��Zt���DA��Zux�V$Q$6A��Zv?��)��VA��ZvK�T��A��Zv_��#�A��Zv� �� +A��Zw7@��/`A��ZxD@�+�;A��Zy% � T,cA��Zy�`B/�/C A��Zy��0�+�A��Zz-@�!Q*�A��Z{F 5A4A��Z|I4 +1�A��Z|\c�+oA��Z|�` �8�!�A��Z}R �)N!�A��Z}l� Y ICA��Z}v`.s�A��Z~� � O, A��Z7` �$`,znA��Z��$���A��Z���Q �A��Z���!�d A��Z�S���3 A��Z���s�� A��Z����hA��Z�k��5"W?A��Z�� A�%,A��Z��� �*�/m A��Z�f�' A��Z��` 0�� +A��Z��@�$"�A��Z�E� - +�%'$A��Z�n� [ Aw A��Z��#�#�5A��Z�q� �+�'�A��Z�� +� wA��Z����A��Z��@�'�04A��Z� ���A��Z��@��'~A��Z��@ �^#L A��Z�a� p�8� A��Z���*$� A��Z��`J#(&�A��Z�N� �A��Z�;�3$�+�A��Z�\�S�1�A��Z��`Z9?gA��Z�Z��/�%A��Z��{��A��Z�]�(�(�A��Z��@ ��) +A��Z��D��A��Z���>"�0A��Z��@_� � A��Z�_� +O�A��Z��/�+� A��Z���� +�)sA��Z�� "(� A��Z��� %� ZA��Z����/��>A��Z�*2��A��Z����LVA��Z�ˀ��n-A��Z� �)�#� A��Z�p� h&�&A��Z��� i �)�9A��Z�� �' A��Z�U� A-�A��Z�����%y A��Z��` ��bOA��Z�U��3�P A��Z����&�$�A��Z� - 5U A��Z�� �$� +A��Z��@,�@ A��Z�F@'*� +A��Z�H`E4N,.A��Z��@fs&�A��Z��� �&�A��Z�] �5�# +A��Z�j� ,%0< +A��Z�#  +p.b1A��Z�E���)�A��Z��� �"�/A��Z��@�%�0Q A��Z�� !�!9}A��Z�u@G�#| +A��Z��� y)b%A��Z��@ ��lA��Z���!7i A��Z�ZS/&)A��Z�� �0=2�&A��Z�+@ "M g#A��Z���V'��A��Z�� ��A��Z�_�� +A��Z�z�I7�A��Z���'�*L A��Z�9@ (� _A��Z�?�^1EA��Z�� 6�h!A��Z��`-,��=A��Z����#�'yA��Z�_ +�7e�A��Z��"�JA��Z��  '�7?A��Z�c�> �$�A��Z�ˀ �0(�A��Z��`�t8�A��Z�)�� �A��Z��@�-  A��Z���s��A��Z�V�h�A��Z�tiA��Z����`+vA��Z�7 �% ��A��Z���=9;~ A��Z�� �+$�A��Z��� ��!��A��Z��� odA��Z‚��!\� A��Z…@�'y,�A��Z¬��GaA��Z�����*r +A��Z�n� �'! A��Z����1�uA��Z�נ�0�Y A��Z�*` �3�EA��Zƪ` F A��Z�E� \ No newline at end of file diff --git a/software/cfitsio3040/iter_image.c b/software/cfitsio3040/iter_image.c new file mode 100644 index 000000000..43f263cb5 --- /dev/null +++ b/software/cfitsio3040/iter_image.c @@ -0,0 +1,93 @@ +#include +#include +#include +#include "fitsio.h" + +/* + This program illustrates how to use the CFITSIO iterator function. + It reads and modifies the input 'iter_image.fit' image file by setting + all the pixel values to zero (DESTROYING THE ORIGINAL IMAGE!!!) +*/ +main() +{ + extern zero_image(); /* external work function is passed to the iterator */ + fitsfile *fptr; + iteratorCol cols[3]; /* structure used by the iterator function */ + int n_cols; + long rows_per_loop, offset; + + int status, nkeys, keypos, hdutype, ii, jj; + char filename[] = "iter_image.fit"; /* name of rate FITS file */ + + status = 0; + + fits_open_file(&fptr, filename, READWRITE, &status); /* open file */ + + + n_cols = 1; + + /* define input column structure members for the iterator function */ + fits_iter_set_file(&cols[0], fptr); + fits_iter_set_iotype(&cols[0], InputOutputCol); + fits_iter_set_datatype(&cols[0], 0); + + rows_per_loop = 0; /* use default optimum number of rows */ + offset = 0; /* process all the rows */ + + /* apply the rate function to each row of the table */ + printf("Calling iterator function...%d\n", status); + + fits_iterate_data(n_cols, cols, offset, rows_per_loop, + zero_image, 0L, &status); + + fits_close_file(fptr, &status); /* all done */ + + if (status) + fits_report_error(stderr, status); /* print out error messages */ + + return(status); +} +/*--------------------------------------------------------------------------*/ +int zero_image(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *cols, void *user_strct ) + +/* + Sample iterator function that calculates the output flux 'rate' column + by dividing the input 'counts' by the 'time' column. + It also applies a constant deadtime correction factor if the 'deadtime' + keyword exists. Finally, this creates or updates the 'LIVETIME' + keyword with the sum of all the individual integration times. +*/ +{ + int ii, status = 0; + + /* declare variables static to preserve their values between calls */ + static int *counts; + + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + if (firstrow == 1) + { + if (ncols != 1) + return(-1); /* number of columns incorrect */ + + /* assign the input pointers to the appropriate arrays and null ptrs*/ + counts = (int *) fits_iter_get_array(&cols[0]); + } + + /*--------------------------------------------*/ + /* Main loop: process all the rows of data */ + /*--------------------------------------------*/ + + /* NOTE: 1st element of array is the null pixel value! */ + /* Loop from 1 to nrows, not 0 to nrows - 1. */ + + for (ii = 1; ii <= nrows; ii++) + { + counts[ii] = 1.; + } + printf("firstrows, nrows = %d %d\n", firstrow, nrows); + + return(0); /* return successful status */ +} diff --git a/software/cfitsio3040/iter_var.c b/software/cfitsio3040/iter_var.c new file mode 100644 index 000000000..50d013205 --- /dev/null +++ b/software/cfitsio3040/iter_var.c @@ -0,0 +1,100 @@ +#include +#include +#include +#include "fitsio.h" + +/* + This program illustrates how to use the CFITSIO iterator function. + It reads and modifies the input 'iter_a.fit' file by computing a + value for the 'rate' column as a function of the values in the other + 'counts' and 'time' columns. +*/ +main() +{ + extern flux_rate(); /* external work function is passed to the iterator */ + fitsfile *fptr; + iteratorCol cols[3]; /* structure used by the iterator function */ + int n_cols; + long rows_per_loop, offset; + + int status, nkeys, keypos, hdutype, ii, jj; + char filename[] = "vari.fits"; /* name of rate FITS file */ + + status = 0; + + fits_open_file(&fptr, filename, READWRITE, &status); /* open file */ + + /* move to the desired binary table extension */ + if (fits_movnam_hdu(fptr, BINARY_TBL, "COMPRESSED_IMAGE", 0, &status) ) + fits_report_error(stderr, status); /* print out error messages */ + + n_cols = 1; /* number of columns */ + + /* define input column structure members for the iterator function */ + fits_iter_set_by_name(&cols[0], fptr, "COMPRESSED_DATA", 0, InputCol); + + rows_per_loop = 0; /* use default optimum number of rows */ + offset = 0; /* process all the rows */ + + /* apply the rate function to each row of the table */ + printf("Calling iterator function...%d\n", status); + + fits_iterate_data(n_cols, cols, offset, rows_per_loop, + flux_rate, 0L, &status); + + fits_close_file(fptr, &status); /* all done */ + + if (status) + fits_report_error(stderr, status); /* print out error messages */ + + return(status); +} +/*--------------------------------------------------------------------------*/ +int flux_rate(long totalrows, long offset, long firstrow, long nrows, + int ncols, iteratorCol *cols, void *user_strct ) + +/* + Sample iterator function that calculates the output flux 'rate' column + by dividing the input 'counts' by the 'time' column. + It also applies a constant deadtime correction factor if the 'deadtime' + keyword exists. Finally, this creates or updates the 'LIVETIME' + keyword with the sum of all the individual integration times. +*/ +{ + int ii, status = 0; + long repeat; + + /* declare variables static to preserve their values between calls */ + static unsigned char *counts; + + /*--------------------------------------------------------*/ + /* Initialization procedures: execute on the first call */ + /*--------------------------------------------------------*/ + if (firstrow == 1) + { + +printf("Datatype of column = %d\n",fits_iter_get_datatype(&cols[0])); + + /* assign the input pointers to the appropriate arrays and null ptrs*/ + counts = (long *) fits_iter_get_array(&cols[0]); + + } + + /*--------------------------------------------*/ + /* Main loop: process all the rows of data */ + /*--------------------------------------------*/ + + /* NOTE: 1st element of array is the null pixel value! */ + /* Loop from 1 to nrows, not 0 to nrows - 1. */ + + + for (ii = 1; ii <= nrows; ii++) + { + repeat = fits_iter_get_repeat(&cols[0]); + printf ("repeat = %d, %d\n",repeat, counts[1]); + + } + + + return(0); /* return successful status */ +} diff --git a/software/cfitsio3040/listhead.c b/software/cfitsio3040/listhead.c new file mode 100644 index 000000000..a9a62384a --- /dev/null +++ b/software/cfitsio3040/listhead.c @@ -0,0 +1,62 @@ +#include +#include +#include "fitsio.h" + +int main(int argc, char *argv[]) +{ + fitsfile *fptr; /* FITS file pointer, defined in fitsio.h */ + char card[FLEN_CARD]; /* Standard string lengths defined in fitsio.h */ + int status = 0, single = 0, hdupos, nkeys, ii; + + if (argc != 2) { + printf("Usage: listhead filename[ext] \n"); + printf("\n"); + printf("List the FITS header keywords in a single extension, or, if \n"); + printf("ext is not given, list the keywords in all the extensions. \n"); + printf("\n"); + printf("Examples: \n"); + printf(" listhead file.fits - list every header in the file \n"); + printf(" listhead file.fits[0] - list primary array header \n"); + printf(" listhead file.fits[2] - list header of 2nd extension \n"); + printf(" listhead file.fits+2 - same as above \n"); + printf(" listhead file.fits[GTI] - list header of GTI extension\n"); + printf("\n"); + printf("Note that it may be necessary to enclose the input file\n"); + printf("name in single quote characters on the Unix command line.\n"); + return(0); + } + + if (!fits_open_file(&fptr, argv[1], READONLY, &status)) + { + fits_get_hdu_num(fptr, &hdupos); /* Get the current HDU position */ + + /* List only a single header if a specific extension was given */ + if (hdupos != 1 || strchr(argv[1], '[')) single = 1; + + for (; !status; hdupos++) /* Main loop through each extension */ + { + fits_get_hdrspace(fptr, &nkeys, NULL, &status); /* get # of keywords */ + + printf("Header listing for HDU #%d:\n", hdupos); + + for (ii = 1; ii <= nkeys; ii++) { /* Read and print each keywords */ + + if (fits_read_record(fptr, ii, card, &status))break; + printf("%s\n", card); + } + printf("END\n\n"); /* terminate listing with END */ + + if (single) break; /* quit if only listing a single header */ + + fits_movrel_hdu(fptr, 1, NULL, &status); /* try to move to next HDU */ + } + + if (status == END_OF_FILE) status = 0; /* Reset after normal error */ + + fits_close_file(fptr, &status); + } + + if (status) fits_report_error(stderr, status); /* print any error message */ + return(status); +} + diff --git a/software/cfitsio3040/longnam.h b/software/cfitsio3040/longnam.h new file mode 100644 index 000000000..7c6ceb1a7 --- /dev/null +++ b/software/cfitsio3040/longnam.h @@ -0,0 +1,584 @@ +#ifndef _LONGNAME_H +#define _LONGNAME_H + +#define fits_parse_input_url ffiurl +#define fits_parse_input_filename ffifile +#define fits_parse_rootname ffrtnm +#define fits_file_exists ffexist +#define fits_parse_output_url ffourl +#define fits_parse_extspec ffexts +#define fits_parse_extnum ffextn +#define fits_parse_binspec ffbins +#define fits_parse_binrange ffbinr +#define fits_parse_range ffrwrg +#define fits_parse_rangell ffrwrgll +#define fits_open_memfile ffomem + +/* + use the following special macro to test that the fitsio.h include + file that was used to build the CFITSIO library is the same version + as included when compiling the application program +*/ +#define fits_open_file(A, B, C, D) ffopentest( CFITSIO_VERSION, A, B, C, D) + +#define fits_open_data ffdopn +#define fits_open_table fftopn +#define fits_open_image ffiopn +#define fits_open_diskfile ffdkopn +#define fits_reopen_file ffreopen +#define fits_create_file ffinit +#define fits_create_diskfile ffdkinit +#define fits_create_memfile ffimem +#define fits_create_template fftplt +#define fits_flush_file ffflus +#define fits_flush_buffer ffflsh +#define fits_close_file ffclos +#define fits_delete_file ffdelt +#define fits_file_name ffflnm +#define fits_file_mode ffflmd +#define fits_url_type ffurlt + +#define fits_get_version ffvers +#define fits_uppercase ffupch +#define fits_get_errstatus ffgerr +#define fits_write_errmsg ffpmsg +#define fits_write_errmark ffpmrk +#define fits_read_errmsg ffgmsg +#define fits_clear_errmsg ffcmsg +#define fits_clear_errmark ffcmrk +#define fits_report_error ffrprt +#define fits_compare_str ffcmps +#define fits_test_keyword fftkey +#define fits_test_record fftrec +#define fits_null_check ffnchk +#define fits_make_keyn ffkeyn +#define fits_make_nkey ffnkey +#define fits_get_keyclass ffgkcl +#define fits_get_keytype ffdtyp +#define fits_parse_value ffpsvc +#define fits_get_keyname ffgknm +#define fits_parse_template ffgthd +#define fits_ascii_tform ffasfm +#define fits_binary_tform ffbnfm +#define fits_binary_tformll ffbnfmll +#define fits_get_tbcol ffgabc +#define fits_get_rowsize ffgrsz +#define fits_get_col_display_width ffgcdw + +#define fits_write_record ffprec +#define fits_write_key ffpky +#define fits_write_key_unit ffpunt +#define fits_write_comment ffpcom +#define fits_write_history ffphis +#define fits_write_date ffpdat +#define fits_get_system_time ffgstm +#define fits_get_system_date ffgsdt +#define fits_date2str ffdt2s +#define fits_time2str fftm2s +#define fits_str2date ffs2dt +#define fits_str2time ffs2tm +#define fits_write_key_longstr ffpkls +#define fits_write_key_longwarn ffplsw +#define fits_write_key_null ffpkyu +#define fits_write_key_str ffpkys +#define fits_write_key_log ffpkyl +#define fits_write_key_lng ffpkyj +#define fits_write_key_fixflt ffpkyf +#define fits_write_key_flt ffpkye +#define fits_write_key_fixdbl ffpkyg +#define fits_write_key_dbl ffpkyd +#define fits_write_key_fixcmp ffpkfc +#define fits_write_key_cmp ffpkyc +#define fits_write_key_fixdblcmp ffpkfm +#define fits_write_key_dblcmp ffpkym +#define fits_write_key_triple ffpkyt +#define fits_write_tdim ffptdm +#define fits_write_tdimll ffptdmll +#define fits_write_keys_str ffpkns +#define fits_write_keys_log ffpknl +#define fits_write_keys_lng ffpknj +#define fits_write_keys_fixflt ffpknf +#define fits_write_keys_flt ffpkne +#define fits_write_keys_fixdbl ffpkng +#define fits_write_keys_dbl ffpknd +#define fits_copy_key ffcpky +#define fits_write_imghdr ffphps +#define fits_write_imghdrll ffphpsll +#define fits_write_grphdr ffphpr +#define fits_write_grphdrll ffphprll +#define fits_write_atblhdr ffphtb +#define fits_write_btblhdr ffphbn +#define fits_write_exthdr ffphext +#define fits_write_key_template ffpktp + +#define fits_get_hdrspace ffghsp +#define fits_get_hdrpos ffghps +#define fits_movabs_key ffmaky +#define fits_movrel_key ffmrky +#define fits_find_nextkey ffgnxk + +#define fits_read_record ffgrec +#define fits_read_card ffgcrd +#define fits_read_key_unit ffgunt +#define fits_read_keyn ffgkyn +#define fits_read_key ffgky +#define fits_read_keyword ffgkey +#define fits_read_key_str ffgkys +#define fits_read_key_log ffgkyl +#define fits_read_key_lng ffgkyj +#define fits_read_key_lnglng ffgkyjj +#define fits_read_key_flt ffgkye +#define fits_read_key_dbl ffgkyd +#define fits_read_key_cmp ffgkyc +#define fits_read_key_dblcmp ffgkym +#define fits_read_key_triple ffgkyt +#define fits_read_key_longstr ffgkls +#define fits_read_tdim ffgtdm +#define fits_read_tdimll ffgtdmll +#define fits_decode_tdim ffdtdm +#define fits_decode_tdimll ffdtdmll +#define fits_read_keys_str ffgkns +#define fits_read_keys_log ffgknl +#define fits_read_keys_lng ffgknj +#define fits_read_keys_flt ffgkne +#define fits_read_keys_dbl ffgknd +#define fits_read_imghdr ffghpr +#define fits_read_imghdrll ffghprll +#define fits_read_atblhdr ffghtb +#define fits_read_btblhdr ffghbn +#define fits_read_atblhdrll ffghtbll +#define fits_read_btblhdrll ffghbnll +#define fits_hdr2str ffhdr2str + +#define fits_update_card ffucrd +#define fits_update_key ffuky +#define fits_update_key_null ffukyu +#define fits_update_key_str ffukys +#define fits_update_key_longstr ffukls +#define fits_update_key_log ffukyl +#define fits_update_key_lng ffukyj +#define fits_update_key_fixflt ffukyf +#define fits_update_key_flt ffukye +#define fits_update_key_fixdbl ffukyg +#define fits_update_key_dbl ffukyd +#define fits_update_key_fixcmp ffukfc +#define fits_update_key_cmp ffukyc +#define fits_update_key_fixdblcmp ffukfm +#define fits_update_key_dblcmp ffukym + +#define fits_modify_record ffmrec +#define fits_modify_card ffmcrd +#define fits_modify_name ffmnam +#define fits_modify_comment ffmcom +#define fits_modify_key_null ffmkyu +#define fits_modify_key_str ffmkys +#define fits_modify_key_longstr ffmkls +#define fits_modify_key_log ffmkyl +#define fits_modify_key_lng ffmkyj +#define fits_modify_key_fixflt ffmkyf +#define fits_modify_key_flt ffmkye +#define fits_modify_key_fixdbl ffmkyg +#define fits_modify_key_dbl ffmkyd +#define fits_modify_key_fixcmp ffmkfc +#define fits_modify_key_cmp ffmkyc +#define fits_modify_key_fixdblcmp ffmkfm +#define fits_modify_key_dblcmp ffmkym + +#define fits_insert_record ffirec +#define fits_insert_card ffikey +#define fits_insert_key_null ffikyu +#define fits_insert_key_str ffikys +#define fits_insert_key_longstr ffikls +#define fits_insert_key_log ffikyl +#define fits_insert_key_lng ffikyj +#define fits_insert_key_fixflt ffikyf +#define fits_insert_key_flt ffikye +#define fits_insert_key_fixdbl ffikyg +#define fits_insert_key_dbl ffikyd +#define fits_insert_key_fixcmp ffikfc +#define fits_insert_key_cmp ffikyc +#define fits_insert_key_fixdblcmp ffikfm +#define fits_insert_key_dblcmp ffikym + +#define fits_delete_key ffdkey +#define fits_delete_record ffdrec +#define fits_get_hdu_num ffghdn +#define fits_get_hdu_type ffghdt +#define fits_get_hduaddr ffghad +#define fits_get_hduaddrll ffghadll +#define fits_get_hduoff ffghof + +#define fits_get_img_param ffgipr +#define fits_get_img_paramll ffgiprll + +#define fits_get_img_type ffgidt +#define fits_get_img_equivtype ffgiet +#define fits_get_img_dim ffgidm +#define fits_get_img_size ffgisz +#define fits_get_img_sizell ffgiszll + +#define fits_movabs_hdu ffmahd +#define fits_movrel_hdu ffmrhd +#define fits_movnam_hdu ffmnhd +#define fits_get_num_hdus ffthdu +#define fits_create_img ffcrim +#define fits_create_imgll ffcrimll +#define fits_create_tbl ffcrtb +#define fits_create_hdu ffcrhd +#define fits_insert_img ffiimg +#define fits_insert_imgll ffiimgll +#define fits_insert_atbl ffitab +#define fits_insert_btbl ffibin +#define fits_resize_img ffrsim +#define fits_resize_imgll ffrsimll + +#define fits_delete_hdu ffdhdu +#define fits_copy_hdu ffcopy +#define fits_copy_file ffcpfl +#define fits_copy_header ffcphd +#define fits_copy_data ffcpdt +#define fits_write_hdu ffwrhdu + +#define fits_set_hdustruc ffrdef +#define fits_set_hdrsize ffhdef +#define fits_write_theap ffpthp + +#define fits_encode_chksum ffesum +#define fits_decode_chksum ffdsum +#define fits_write_chksum ffpcks +#define fits_update_chksum ffupck +#define fits_verify_chksum ffvcks +#define fits_get_chksum ffgcks + +#define fits_set_bscale ffpscl +#define fits_set_tscale fftscl +#define fits_set_imgnull ffpnul +#define fits_set_btblnull fftnul +#define fits_set_atblnull ffsnul + +#define fits_get_colnum ffgcno +#define fits_get_colname ffgcnn +#define fits_get_coltype ffgtcl +#define fits_get_coltypell ffgtclll +#define fits_get_eqcoltype ffeqty +#define fits_get_eqcoltypell ffeqtyll +#define fits_get_num_rows ffgnrw +#define fits_get_num_rowsll ffgnrwll +#define fits_get_num_cols ffgncl +#define fits_get_acolparms ffgacl +#define fits_get_bcolparms ffgbcl +#define fits_get_bcolparmsll ffgbclll + +#define fits_iterate_data ffiter + +#define fits_read_grppar_byt ffggpb +#define fits_read_grppar_sbyt ffggpsb +#define fits_read_grppar_usht ffggpui +#define fits_read_grppar_ulng ffggpuj +#define fits_read_grppar_sht ffggpi +#define fits_read_grppar_lng ffggpj +#define fits_read_grppar_lnglng ffggpjj +#define fits_read_grppar_int ffggpk +#define fits_read_grppar_uint ffggpuk +#define fits_read_grppar_flt ffggpe +#define fits_read_grppar_dbl ffggpd + +#define fits_read_pix ffgpxv +#define fits_read_pixll ffgpxvll +#define fits_read_pixnull ffgpxf +#define fits_read_pixnullll ffgpxfll +#define fits_read_img ffgpv +#define fits_read_imgnull ffgpf +#define fits_read_img_byt ffgpvb +#define fits_read_img_sbyt ffgpvsb +#define fits_read_img_usht ffgpvui +#define fits_read_img_ulng ffgpvuj +#define fits_read_img_sht ffgpvi +#define fits_read_img_lng ffgpvj +#define fits_read_img_lnglng ffgpvjj +#define fits_read_img_uint ffgpvuk +#define fits_read_img_int ffgpvk +#define fits_read_img_flt ffgpve +#define fits_read_img_dbl ffgpvd + +#define fits_read_imgnull_byt ffgpfb +#define fits_read_imgnull_sbyt ffgpfsb +#define fits_read_imgnull_usht ffgpfui +#define fits_read_imgnull_ulng ffgpfuj +#define fits_read_imgnull_sht ffgpfi +#define fits_read_imgnull_lng ffgpfj +#define fits_read_imgnull_lnglng ffgpfjj +#define fits_read_imgnull_uint ffgpfuk +#define fits_read_imgnull_int ffgpfk +#define fits_read_imgnull_flt ffgpfe +#define fits_read_imgnull_dbl ffgpfd + +#define fits_read_2d_byt ffg2db +#define fits_read_2d_sbyt ffg2dsb +#define fits_read_2d_usht ffg2dui +#define fits_read_2d_ulng ffg2duj +#define fits_read_2d_sht ffg2di +#define fits_read_2d_lng ffg2dj +#define fits_read_2d_lnglng ffg2djj +#define fits_read_2d_uint ffg2duk +#define fits_read_2d_int ffg2dk +#define fits_read_2d_flt ffg2de +#define fits_read_2d_dbl ffg2dd + +#define fits_read_3d_byt ffg3db +#define fits_read_3d_sbyt ffg3dsb +#define fits_read_3d_usht ffg3dui +#define fits_read_3d_ulng ffg3duj +#define fits_read_3d_sht ffg3di +#define fits_read_3d_lng ffg3dj +#define fits_read_3d_lnglng ffg3djj +#define fits_read_3d_uint ffg3duk +#define fits_read_3d_int ffg3dk +#define fits_read_3d_flt ffg3de +#define fits_read_3d_dbl ffg3dd + +#define fits_read_subset ffgsv +#define fits_read_subset_byt ffgsvb +#define fits_read_subset_sbyt ffgsvsb +#define fits_read_subset_usht ffgsvui +#define fits_read_subset_ulng ffgsvuj +#define fits_read_subset_sht ffgsvi +#define fits_read_subset_lng ffgsvj +#define fits_read_subset_lnglng ffgsvjj +#define fits_read_subset_uint ffgsvuk +#define fits_read_subset_int ffgsvk +#define fits_read_subset_flt ffgsve +#define fits_read_subset_dbl ffgsvd + +#define fits_read_subsetnull_byt ffgsfb +#define fits_read_subsetnull_sbyt ffgsfsb +#define fits_read_subsetnull_usht ffgsfui +#define fits_read_subsetnull_ulng ffgsfuj +#define fits_read_subsetnull_sht ffgsfi +#define fits_read_subsetnull_lng ffgsfj +#define fits_read_subsetnull_lnglng ffgsfjj +#define fits_read_subsetnull_uint ffgsfuk +#define fits_read_subsetnull_int ffgsfk +#define fits_read_subsetnull_flt ffgsfe +#define fits_read_subsetnull_dbl ffgsfd + +#define ffcpimg fits_copy_image_section +#define fits_compress_img fits_comp_img +#define fits_decompress_img fits_decomp_img + +#define fits_read_col ffgcv +#define fits_read_colnull ffgcf +#define fits_read_col_str ffgcvs +#define fits_read_col_log ffgcvl +#define fits_read_col_byt ffgcvb +#define fits_read_col_sbyt ffgcvsb +#define fits_read_col_usht ffgcvui +#define fits_read_col_ulng ffgcvuj +#define fits_read_col_sht ffgcvi +#define fits_read_col_lng ffgcvj +#define fits_read_col_lnglng ffgcvjj +#define fits_read_col_uint ffgcvuk +#define fits_read_col_int ffgcvk +#define fits_read_col_flt ffgcve +#define fits_read_col_dbl ffgcvd +#define fits_read_col_cmp ffgcvc +#define fits_read_col_dblcmp ffgcvm +#define fits_read_col_bit ffgcx +#define fits_read_col_bit_usht ffgcxui +#define fits_read_col_bit_uint ffgcxuk + +#define fits_read_colnull_str ffgcfs +#define fits_read_colnull_log ffgcfl +#define fits_read_colnull_byt ffgcfb +#define fits_read_colnull_sbyt ffgcfsb +#define fits_read_colnull_usht ffgcfui +#define fits_read_colnull_ulng ffgcfuj +#define fits_read_colnull_sht ffgcfi +#define fits_read_colnull_lng ffgcfj +#define fits_read_colnull_lnglng ffgcfjj +#define fits_read_colnull_uint ffgcfuk +#define fits_read_colnull_int ffgcfk +#define fits_read_colnull_flt ffgcfe +#define fits_read_colnull_dbl ffgcfd +#define fits_read_colnull_cmp ffgcfc +#define fits_read_colnull_dblcmp ffgcfm + +#define fits_read_descript ffgdes +#define fits_read_descriptll ffgdesll +#define fits_read_descripts ffgdess +#define fits_read_descriptsll ffgdessll +#define fits_read_tblbytes ffgtbb + +#define fits_write_grppar_byt ffpgpb +#define fits_write_grppar_sbyt ffpgpsb +#define fits_write_grppar_usht ffpgpui +#define fits_write_grppar_ulng ffpgpuj +#define fits_write_grppar_sht ffpgpi +#define fits_write_grppar_lng ffpgpj +#define fits_write_grppar_lnglng ffpgpjj +#define fits_write_grppar_uint ffpgpuk +#define fits_write_grppar_int ffpgpk +#define fits_write_grppar_flt ffpgpe +#define fits_write_grppar_dbl ffpgpd + +#define fits_write_pix ffppx +#define fits_write_pixll ffppxll +#define fits_write_pixnull ffppxn +#define fits_write_pixnullll ffppxnll +#define fits_write_img ffppr +#define fits_write_img_byt ffpprb +#define fits_write_img_sbyt ffpprsb +#define fits_write_img_usht ffpprui +#define fits_write_img_ulng ffppruj +#define fits_write_img_sht ffppri +#define fits_write_img_lng ffpprj +#define fits_write_img_lnglng ffpprjj +#define fits_write_img_uint ffppruk +#define fits_write_img_int ffpprk +#define fits_write_img_flt ffppre +#define fits_write_img_dbl ffpprd + +#define fits_write_imgnull ffppn +#define fits_write_imgnull_byt ffppnb +#define fits_write_imgnull_sbyt ffppnsb +#define fits_write_imgnull_usht ffppnui +#define fits_write_imgnull_ulng ffppnuj +#define fits_write_imgnull_sht ffppni +#define fits_write_imgnull_lng ffppnj +#define fits_write_imgnull_lnglng ffppnjj +#define fits_write_imgnull_uint ffppnuk +#define fits_write_imgnull_int ffppnk +#define fits_write_imgnull_flt ffppne +#define fits_write_imgnull_dbl ffppnd + +#define fits_write_img_null ffppru +#define fits_write_null_img ffpprn + +#define fits_write_2d_byt ffp2db +#define fits_write_2d_sbyt ffp2dsb +#define fits_write_2d_usht ffp2dui +#define fits_write_2d_ulng ffp2duj +#define fits_write_2d_sht ffp2di +#define fits_write_2d_lng ffp2dj +#define fits_write_2d_lnglng ffp2djj +#define fits_write_2d_uint ffp2duk +#define fits_write_2d_int ffp2dk +#define fits_write_2d_flt ffp2de +#define fits_write_2d_dbl ffp2dd + +#define fits_write_3d_byt ffp3db +#define fits_write_3d_sbyt ffp3dsb +#define fits_write_3d_usht ffp3dui +#define fits_write_3d_ulng ffp3duj +#define fits_write_3d_sht ffp3di +#define fits_write_3d_lng ffp3dj +#define fits_write_3d_lnglng ffp3djj +#define fits_write_3d_uint ffp3duk +#define fits_write_3d_int ffp3dk +#define fits_write_3d_flt ffp3de +#define fits_write_3d_dbl ffp3dd + +#define fits_write_subset ffpss +#define fits_write_subset_byt ffpssb +#define fits_write_subset_sbyt ffpsssb +#define fits_write_subset_usht ffpssui +#define fits_write_subset_ulng ffpssuj +#define fits_write_subset_sht ffpssi +#define fits_write_subset_lng ffpssj +#define fits_write_subset_lnglng ffpssjj +#define fits_write_subset_uint ffpssuk +#define fits_write_subset_int ffpssk +#define fits_write_subset_flt ffpsse +#define fits_write_subset_dbl ffpssd + +#define fits_write_col ffpcl +#define fits_write_col_str ffpcls +#define fits_write_col_log ffpcll +#define fits_write_col_byt ffpclb +#define fits_write_col_sbyt ffpclsb +#define fits_write_col_usht ffpclui +#define fits_write_col_ulng ffpcluj +#define fits_write_col_sht ffpcli +#define fits_write_col_lng ffpclj +#define fits_write_col_lnglng ffpcljj +#define fits_write_col_uint ffpcluk +#define fits_write_col_int ffpclk +#define fits_write_col_flt ffpcle +#define fits_write_col_dbl ffpcld +#define fits_write_col_cmp ffpclc +#define fits_write_col_dblcmp ffpclm +#define fits_write_col_null ffpclu +#define fits_write_col_bit ffpclx +#define fits_write_nulrows ffprwu +#define fits_write_nullrows ffprwu + +#define fits_write_colnull ffpcn +#define fits_write_colnull_str ffpcns +#define fits_write_colnull_log ffpcnl +#define fits_write_colnull_byt ffpcnb +#define fits_write_colnull_sbyt ffpcnsb +#define fits_write_colnull_usht ffpcnui +#define fits_write_colnull_ulng ffpcnuj +#define fits_write_colnull_sht ffpcni +#define fits_write_colnull_lng ffpcnj +#define fits_write_colnull_lnglng ffpcnjj +#define fits_write_colnull_uint ffpcnuk +#define fits_write_colnull_int ffpcnk +#define fits_write_colnull_flt ffpcne +#define fits_write_colnull_dbl ffpcnd + +#define fits_write_ext ffpextn +#define fits_read_ext ffgextn + +#define fits_write_descript ffpdes +#define fits_compress_heap ffcmph +#define fits_test_heap fftheap + +#define fits_write_tblbytes ffptbb +#define fits_insert_rows ffirow +#define fits_delete_rows ffdrow +#define fits_delete_rowrange ffdrrg +#define fits_delete_rowlist ffdrws +#define fits_delete_rowlistll ffdrwsll +#define fits_insert_col fficol +#define fits_insert_cols fficls +#define fits_delete_col ffdcol +#define fits_copy_col ffcpcl +#define fits_modify_vector_len ffmvec + +#define fits_read_img_coord ffgics +#define fits_read_tbl_coord ffgtcs +#define fits_pix_to_world ffwldp +#define fits_world_to_pix ffxypx + +#define fits_get_image_wcs_keys ffgiwcs +#define fits_get_table_wcs_keys ffgtwcs + +#define fits_find_rows fffrow +#define fits_find_first_row ffffrw +#define fits_find_rows_cmp fffrwc +#define fits_select_rows ffsrow +#define fits_calc_rows ffcrow +#define fits_calculator ffcalc +#define fits_calculator_rng ffcalc_rng +#define fits_test_expr fftexp + +#define fits_create_group ffgtcr +#define fits_insert_group ffgtis +#define fits_change_group ffgtch +#define fits_remove_group ffgtrm +#define fits_copy_group ffgtcp +#define fits_merge_groups ffgtmg +#define fits_compact_group ffgtcm +#define fits_verify_group ffgtvf +#define fits_open_group ffgtop +#define fits_add_group_member ffgtam +#define fits_get_num_members ffgtnm + +#define fits_get_num_groups ffgmng +#define fits_open_member ffgmop +#define fits_copy_member ffgmcp +#define fits_transfer_member ffgmtf +#define fits_remove_member ffgmrm + +#endif diff --git a/software/cfitsio3040/make_dfloat.com b/software/cfitsio3040/make_dfloat.com new file mode 100644 index 000000000..1a7841f91 --- /dev/null +++ b/software/cfitsio3040/make_dfloat.com @@ -0,0 +1,90 @@ +$ ! Command file to build the CFITSIO library on a VMS systems (VAX or Alpha) +$ set verify +$ cc/float=d_float buffers.c +$ cc/float=d_float cfileio.c +$ cc/float=d_float checksum.c +$ cc/float=d_float compress.c +$ cc/float=d_float drvrfile.c +$ cc/float=d_float drvrmem.c +$ ! cc/float=d_float drvrnet.c not currently supported on VMS +$ ! cc/float=d_float drvsmem.c not currently supported on VMS +$ cc/float=d_float editcol.c +$ cc/float=d_float edithdu.c +$ cc/float=d_float eval_f.c +$ cc/float=d_float eval_l.c +$ cc/float=d_float eval_y.c +$ cc/float=d_float fitscore.c +$ cc/float=d_float f77_wrap1.c +$ cc/float=d_float f77_wrap2.c +$ cc/float=d_float f77_wrap3.c +$ cc/float=d_float f77_wrap4.c +$ cc/float=d_float getcol.c +$ cc/float=d_float getcolb.c +$ cc/float=d_float getcolsb.c +$ cc/float=d_float getcoli.c +$ cc/float=d_float getcolj.c +$ cc/float=d_float getcolui.c +$ cc/float=d_float getcoluj.c +$ cc/float=d_float getcoluk.c +$ cc/float=d_float getcolk.c +$ cc/float=d_float getcole.c +$ cc/float=d_float getcold.c +$ cc/float=d_float getcoll.c +$ cc/float=d_float getcols.c +$ cc/float=d_float getkey.c +$ cc/float=d_float group.c +$ cc/float=d_float grparser.c +$ cc/float=d_float histo.c +$ cc/float=d_float iraffits.c +$ cc/float=d_float modkey.c +$ cc/float=d_float putcol.c +$ cc/float=d_float putcolb.c +$ cc/float=d_float putcolsb.c +$ cc/float=d_float putcoli.c +$ cc/float=d_float putcolj.c +$ cc/float=d_float putcolk.c +$ cc/float=d_float putcolui.c +$ cc/float=d_float putcoluj.c +$ cc/float=d_float putcoluk.c +$ cc/float=d_float putcole.c +$ cc/float=d_float putcold.c +$ cc/float=d_float putcols.c +$ cc/float=d_float putcoll.c +$ cc/float=d_float putcolu.c +$ cc/float=d_float putkey.c +$ cc/float=d_float region.c +$ cc/float=d_float scalnull.c +$ cc/float=d_float swapproc.c +$ cc/float=d_float wcsutil.c +$ cc/float=d_float wcssub.c +$ cc/float=d_float imcompress.c +$ cc/float=d_float quantize.c +$ cc/float=d_float ricecomp.c +$ cc/float=d_float pliocomp.c +$ cc/float=d_float fits_hcompress.c +$ cc/float=d_float fits_hdecompress.c +$ lib/create cfitsio buffers,cfileio,checksum,compress,drvrfile,drvrmem +$ lib/insert cfitsio editcol,edithdu,eval_f,eval_l,eval_y +$ lib/insert cfitsio f77_wrap1,f77_wrap2,f77_wrap3,f77_wrap4 +$ lib/insert cfitsio fitscore,getcol,getcolb,getcoli,getcolj,getcolk,getcole +$ lib/insert cfitsio getcold,getcoll,getcols,getcolui,getcoluj,getcoluk,getcolsb +$ lib/insert cfitsio getkey,group,grparser,histo,iraffits,modkey,putcol,putcolb +$ lib/insert cfitsio putcoli,putcolj,putcolk,putcole,putcold,putcolui,putcolsb +$ lib/insert cfitsio putcoluj,putcoluk,putcols,putcoll,putcolu,putkey,region +$ lib/insert cfitsio scalnull,swapproc,wcsutil,wcssub,imcompress +$ lib/insert cfitsio quantize,ricecomp,pliocomp,fits_hcompress,fits_hdecompress +$ ! +$ if (F$GETSYI("ARCH_NAME") .eqs. "VAX") then goto VAX +$ ! add C routine needed on Alpha to do D_FLOAT conversions +$ cc/float=d_float vmsieee.c +$ lib/insert cfitsio vmsieee +$ set noverify +$ exit +$ ! +$ VAX: +$ ! add macro routines not needed on Alpha and only used on VAX +$ macro vmsieeer.mar +$ macro vmsieeed.mar +$ lib/insert cfitsio vmsieeer,vmsieeed +$ set noverify +$ exit diff --git a/software/cfitsio3040/make_gfloat.com b/software/cfitsio3040/make_gfloat.com new file mode 100644 index 000000000..bfacd8b13 --- /dev/null +++ b/software/cfitsio3040/make_gfloat.com @@ -0,0 +1,88 @@ +$ ! Command file to build the CFITSIO library on a VMS systems (VAX or Alpha) +$ ! This uses the default /float=G_FLOAT option on the Alpha +$ set verify +$ cc buffers.c +$ cc cfileio.c +$ cc checksum.c +$ cc compress.c +$ cc drvrfile.c +$ cc drvrmem.c +$ ! cc drvrnet.c not currently supported on VMS +$ ! cc drvsmem.c not currently supported on VMS +$ cc editcol.c +$ cc edithdu.c +$ cc eval_f.c +$ cc eval_l.c +$ cc eval_y.c +$ cc fitscore.c +$ cc f77_wrap1.c +$ cc f77_wrap2.c +$ cc f77_wrap3.c +$ cc f77_wrap4.c +$ cc getcol.c +$ cc getcolb.c +$ cc getcolsb.c +$ cc getcoli.c +$ cc getcolj.c +$ cc getcolui.c +$ cc getcoluj.c +$ cc getcoluk.c +$ cc getcolk.c +$ cc getcole.c +$ cc getcold.c +$ cc getcoll.c +$ cc getcols.c +$ cc getkey.c +$ cc group.c +$ cc grparser.c +$ cc histo.c +$ cc iraffits.c +$ cc modkey.c +$ cc putcol.c +$ cc putcolb.c +$ cc putcolsb.c +$ cc putcoli.c +$ cc putcolj.c +$ cc putcolk.c +$ cc putcolui.c +$ cc putcoluj.c +$ cc putcoluk.c +$ cc putcole.c +$ cc putcold.c +$ cc putcols.c +$ cc putcoll.c +$ cc putcolu.c +$ cc putkey.c +$ cc region.c +$ cc scalnull.c +$ cc swapproc.c +$ cc wcsutil.c +$ cc wcssub.c +$ cc imcompress.c +$ cc quantize.c +$ cc ricecomp.c +$ cc pliocomp.c +$ cc/float=d_float fits_hcompress.c +$ cc/float=d_float fits_hdecompress.c +$ lib/create cfitsio buffers,cfileio,checksum,compress,drvrfile,drvrmem +$ lib/insert cfitsio editcol,edithdu,eval_f,eval_l,eval_y +$ lib/insert cfitsio f77_wrap1,f77_wrap2,f77_wrap3,f77_wrap4 +$ lib/insert cfitsio fitscore,getcol,getcolb,getcoli,getcolj,getcolk,getcole +$ lib/insert cfitsio getcold,getcoll,getcols,getcolui,getcoluj,getcoluk,getcolsb +$ lib/insert cfitsio getkey,group,grparser,histo,iraffits,modkey,putcol,putcolb +$ lib/insert cfitsio putcoli,putcolj,putcolk,putcole,putcold,putcolui,putcolsb +$ lib/insert cfitsio putcoluj,putcoluk,putcols,putcoll,putcolu,putkey,region +$ lib/insert cfitsio scalnull,swapproc,wcsutil,wcssub,imcompress +$ lib/insert cfitsio quantize,ricecomp,pliocomp,fits_hcompress,fits_hdecompress +$ ! +$ if (F$GETSYI("ARCH_NAME") .eqs. "VAX") then goto VAX +$ set noverify +$ exit +$ ! +$ VAX: +$ ! add macro routines not needed on Alpha and only used on VAX +$ macro vmsieeer.mar +$ macro vmsieeed.mar +$ lib/insert cfitsio vmsieeer,vmsieeed +$ set noverify +$ exit diff --git a/software/cfitsio3040/make_ieee.com b/software/cfitsio3040/make_ieee.com new file mode 100644 index 000000000..89ab43748 --- /dev/null +++ b/software/cfitsio3040/make_ieee.com @@ -0,0 +1,87 @@ +$ ! Command file to build the CFITSIO library on a VMS systems (VAX or Alpha) +$ set verify +$ cc/float=ieee_float buffers.c +$ cc/float=ieee_float cfileio.c +$ cc/float=ieee_float checksum.c +$ cc/float=ieee_float compress.c +$ cc/float=ieee_float drvrfile.c +$ cc/float=ieee_float drvrmem.c +$ ! cc/float=ieee_float drvrnet.c not currently supported on VMS +$ ! cc/float=ieee_float drvsmem.c not currently supported on VMS +$ cc/float=ieee_float editcol.c +$ cc/float=ieee_float edithdu.c +$ cc/float=ieee_float eval_f.c +$ cc/float=ieee_float eval_l.c +$ cc/float=ieee_float eval_y.c +$ cc/float=ieee_float fitscore.c +$ cc/float=ieee_float f77_wrap1.c +$ cc/float=ieee_float f77_wrap2.c +$ cc/float=ieee_float f77_wrap3.c +$ cc/float=ieee_float f77_wrap4.c +$ cc/float=ieee_float getcol.c +$ cc/float=ieee_float getcolb.c +$ cc/float=ieee_float getcolsb.c +$ cc/float=ieee_float getcoli.c +$ cc/float=ieee_float getcolj.c +$ cc/float=ieee_float getcolui.c +$ cc/float=ieee_float getcoluj.c +$ cc/float=ieee_float getcoluk.c +$ cc/float=ieee_float getcolk.c +$ cc/float=ieee_float getcole.c +$ cc/float=ieee_float getcold.c +$ cc/float=ieee_float getcoll.c +$ cc/float=ieee_float getcols.c +$ cc/float=ieee_float getkey.c +$ cc/float=ieee_float group.c +$ cc/float=ieee_float grparser.c +$ cc/float=ieee_float histo.c +$ cc/float=ieee_float iraffits.c +$ cc/float=ieee_float modkey.c +$ cc/float=ieee_float putcol.c +$ cc/float=ieee_float putcolb.c +$ cc/float=ieee_float putcolsb.c +$ cc/float=ieee_float putcoli.c +$ cc/float=ieee_float putcolj.c +$ cc/float=ieee_float putcolk.c +$ cc/float=ieee_float putcolui.c +$ cc/float=ieee_float putcoluj.c +$ cc/float=ieee_float putcoluk.c +$ cc/float=ieee_float putcole.c +$ cc/float=ieee_float putcold.c +$ cc/float=ieee_float putcols.c +$ cc/float=ieee_float putcoll.c +$ cc/float=ieee_float putcolu.c +$ cc/float=ieee_float putkey.c +$ cc/float=ieee_float region.c +$ cc/float=ieee_float scalnull.c +$ cc/float=ieee_float swapproc.c +$ cc/float=ieee_float wcsutil.c +$ cc/float=ieee_float wcssub.c +$ cc/float=ieee_float imcompress.c +$ cc/float=ieee_float quantize.c +$ cc/float=ieee_float ricecomp.c +$ cc/float=ieee_float pliocomp.c +$ cc/float=d_float fits_hcompress.c +$ cc/float=d_float fits_hdecompress.c +$ lib/create cfitsio buffers,cfileio,checksum,compress,drvrfile,drvrmem +$ lib/insert cfitsio editcol,edithdu,eval_f,eval_l,eval_y +$ lib/insert cfitsio f77_wrap1,f77_wrap2,f77_wrap3,f77_wrap4 +$ lib/insert cfitsio fitscore,getcol,getcolb,getcoli,getcolj,getcolk,getcole +$ lib/insert cfitsio getcold,getcoll,getcols,getcolui,getcoluj,getcoluk,getcolsb +$ lib/insert cfitsio getkey,group,grparser,histo,iraffits,modkey,putcol,putcolb +$ lib/insert cfitsio putcoli,putcolj,putcolk,putcole,putcold,putcolui,putcolsb +$ lib/insert cfitsio putcoluj,putcoluk,putcols,putcoll,putcolu,putkey,region +$ lib/insert cfitsio scalnull,swapproc,wcsutil,wcssub,imcompress +$ lib/insert cfitsio quantize,ricecomp,pliocomp,fits_hcompress,fits_hdecompress +$ ! +$ if (F$GETSYI("ARCH_NAME") .eqs. "VAX") then goto VAX +$ set noverify +$ exit +$ ! +$ VAX: +$ ! add macro routines not needed on Alpha and only used on VAX +$ macro vmsieeer.mar +$ macro vmsieeed.mar +$ lib/insert cfitsio vmsieeer,vmsieeed +$ set noverify +$ exit diff --git a/software/cfitsio3040/makefile.bc b/software/cfitsio3040/makefile.bc new file mode 100644 index 000000000..d8fa69ec4 --- /dev/null +++ b/software/cfitsio3040/makefile.bc @@ -0,0 +1,496 @@ +# +# Borland C++ IDE generated makefile +# Generated 10/12/99 at 1:24:11 PM +# +.AUTODEPEND + + +# +# Borland C++ tools +# +IMPLIB = Implib +BCC32 = Bcc32 +BccW32.cfg +BCC32I = Bcc32i +BccW32.cfg +TLINK32 = TLink32 +ILINK32 = Ilink32 +TLIB = TLib +BRC32 = Brc32 +TASM32 = Tasm32 +# +# IDE macros +# + + +# +# Options +# +IDE_LinkFLAGS32 = -LD:\BC5\LIB +LinkerLocalOptsAtC32_cfitsiodlib = -Tpd -ap -c +ResLocalOptsAtC32_cfitsiodlib = +BLocalOptsAtC32_cfitsiodlib = +CompInheritOptsAt_cfitsiodlib = -ID:\BC5\INCLUDE -D_RTLDLL -DWIN32; +LinkerInheritOptsAt_cfitsiodlib = -x +LinkerOptsAt_cfitsiodlib = $(LinkerLocalOptsAtC32_cfitsiodlib) +ResOptsAt_cfitsiodlib = $(ResLocalOptsAtC32_cfitsiodlib) +BOptsAt_cfitsiodlib = $(BLocalOptsAtC32_cfitsiodlib) + +# +# Dependency List +# +Dep_cfitsio = \ + cfitsio.lib + +cfitsio : BccW32.cfg $(Dep_cfitsio) + echo MakeNode + +cfitsio.lib : cfitsio.dll + $(IMPLIB) $@ cfitsio.dll + + +Dep_cfitsioddll = \ + listhead.obj\ + imcompress.obj\ + quantize.obj\ + ricecomp.obj\ + pliocomp.obj\ + iraffits.obj\ + wcsutil.obj\ + histo.obj\ + scalnull.obj\ + region.obj\ + putkey.obj\ + putcoluk.obj\ + putcoluj.obj\ + putcolui.obj\ + putcolu.obj\ + putcols.obj\ + putcoll.obj\ + putcolk.obj\ + putcolj.obj\ + putcoli.obj\ + putcole.obj\ + putcold.obj\ + putcolb.obj\ + putcolsb.obj\ + putcol.obj\ + modkey.obj\ + swapproc.obj\ + getcol.obj\ + group.obj\ + getkey.obj\ + getcoluk.obj\ + getcoluj.obj\ + getcolui.obj\ + getcols.obj\ + getcoll.obj\ + getcolk.obj\ + getcolj.obj\ + getcoli.obj\ + getcole.obj\ + getcold.obj\ + getcolb.obj\ + getcolsb.obj\ + grparser.obj\ + fitscore.obj\ + f77_wrap1.obj\ + f77_wrap2.obj\ + f77_wrap3.obj\ + f77_wrap4.obj\ + eval_y.obj\ + eval_l.obj\ + eval_f.obj\ + edithdu.obj\ + editcol.obj\ + drvrmem.obj\ + drvrfile.obj\ + compress.obj\ + checksum.obj\ + cfileio.obj\ + buffers.obj + +cfitsio.dll : $(Dep_cfitsioddll) cfitsio.def + $(ILINK32) @&&| + /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_cfitsiodlib) $(LinkerInheritOptsAt_cfitsiodlib) + +D:\BC5\LIB\c0d32.obj+ +listhead.obj+ +imcompress.obj+ +quantize.obj+ +ricecomp.obj+ +pliocomp.obj+ +iraffits.obj+ +wcsutil.obj+ +histo.obj+ +iraffits.obj+ +scalnull.obj+ +region.obj+ +putkey.obj+ +putcoluk.obj+ +putcoluj.obj+ +putcolui.obj+ +putcolu.obj+ +putcols.obj+ +putcoll.obj+ +putcolk.obj+ +putcolj.obj+ +putcoli.obj+ +putcole.obj+ +putcold.obj+ +putcolb.obj+ +putcolsb.obj+ +putcol.obj+ +modkey.obj+ +swapproc.obj+ +getcol.obj+ +group.obj+ +getkey.obj+ +getcoluk.obj+ +getcoluj.obj+ +getcolui.obj+ +getcols.obj+ +getcoll.obj+ +getcolk.obj+ +getcolj.obj+ +getcoli.obj+ +getcole.obj+ +getcold.obj+ +getcolb.obj+ +getcolsb.obj+ +grparser.obj+ +fitscore.obj+ +f77_wrap1.obj+ +f77_wrap2.obj+ +f77_wrap3.obj+ +f77_wrap4.obj+ +eval_y.obj+ +eval_l.obj+ +eval_f.obj+ +edithdu.obj+ +editcol.obj+ +drvrmem.obj+ +drvrfile.obj+ +compress.obj+ +checksum.obj+ +cfileio.obj+ +buffers.obj +$<,$* +D:\BC5\LIB\import32.lib+ +D:\BC5\LIB\cw32i.lib +cfitsio.def + + +| +wcsutil.obj : wcsutil.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ wcsutil.c +| +iraffits.obj : iraffits.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ iraffits.c +| +histo.obj : histo.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ histo.c +| + +scalnull.obj : scalnull.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ scalnull.c +| + +region.obj : region.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ region.c +| + +putkey.obj : putkey.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putkey.c +| + +putcoluk.obj : putcoluk.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcoluk.c +| + +putcoluj.obj : putcoluj.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcoluj.c +| + +putcolui.obj : putcolui.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolui.c +| + +putcolu.obj : putcolu.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolu.c +| + +putcols.obj : putcols.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcols.c +| + +putcoll.obj : putcoll.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcoll.c +| + +putcolk.obj : putcolk.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolk.c +| + +putcolj.obj : putcolj.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolj.c +| + +putcoli.obj : putcoli.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcoli.c +| + +putcole.obj : putcole.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcole.c +| + +putcold.obj : putcold.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcold.c +| + +putcolb.obj : putcolb.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolb.c +| + +putcolsb.obj : putcolsb.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcolsb.c +| + +putcol.obj : putcol.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ putcol.c +| + +modkey.obj : modkey.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ modkey.c +| + +swapproc.obj : swapproc.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ swapproc.c +| + +getcol.obj : getcol.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcol.c +| + +group.obj : group.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ group.c +| + +getkey.obj : getkey.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getkey.c +| + +getcoluk.obj : getcoluk.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcoluk.c +| + +getcoluj.obj : getcoluj.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcoluj.c +| + +getcolui.obj : getcolui.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcolui.c +| + +getcols.obj : getcols.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcols.c +| + +getcoll.obj : getcoll.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcoll.c +| + +getcolk.obj : getcolk.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcolk.c +| + +getcolj.obj : getcolj.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcolj.c +| + +getcoli.obj : getcoli.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcoli.c +| + +getcole.obj : getcole.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcole.c +| + +getcold.obj : getcold.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcold.c +| + +getcolb.obj : getcolb.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcolb.c +| +getcolsb.obj : getcolsb.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ getcolsb.c +| + +grparser.obj : grparser.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ grparser.c +| + +fitscore.obj : fitscore.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ fitscore.c +| + +f77_wrap1.obj : f77_wrap1.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ f77_wrap1.c +| + +f77_wrap2.obj : f77_wrap2.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ f77_wrap2.c +| + +f77_wrap3.obj : f77_wrap3.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ f77_wrap3.c +| + +f77_wrap4.obj : f77_wrap4.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ f77_wrap4.c +| + +eval_y.obj : eval_y.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ eval_y.c +| + +eval_l.obj : eval_l.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ eval_l.c +| + +eval_f.obj : eval_f.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ eval_f.c +| + +edithdu.obj : edithdu.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ edithdu.c +| + +editcol.obj : editcol.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ editcol.c +| + +drvrmem.obj : drvrmem.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ drvrmem.c +| + +drvrfile.obj : drvrfile.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ drvrfile.c +| + +compress.obj : compress.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ compress.c +| + +checksum.obj : checksum.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ checksum.c +| + +cfileio.obj : cfileio.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ cfileio.c +| + +listhead.obj : listhead.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ listhead.c +| + +imcompress.obj : imcompress.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ imcompress.c +| + +quantize.obj : quantize.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ quantize.c +| + +ricecomp.obj : ricecomp.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ ricecomp.c +| + +pliocomp.obj : pliocomp.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ pliocomp.c +| + +buffers.obj : buffers.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_cfitsiodlib) $(CompInheritOptsAt_cfitsiodlib) -o$@ buffers.c +| + +windumpexts.exe : windumpexts.c + bcc32 windumpexts.c + + +cfitsio.def: windumpexts.exe + windumpexts -o cfitsio.def cfitsio.dll @&&| + $(Dep_cfitsioddll) +| + +# Compiler configuration file +BccW32.cfg : + Copy &&| +-w +-R +-v +-WM- +-vi +-H +-H=cfitsio.csm +-WCD +| $@ + + diff --git a/software/cfitsio3040/makefile.os2 b/software/cfitsio3040/makefile.os2 new file mode 100644 index 000000000..0d7955426 --- /dev/null +++ b/software/cfitsio3040/makefile.os2 @@ -0,0 +1,22 @@ +# +# To be use with OS/2 and GCC/EMX Compiler. +# Submitted by Andrea Di Paola (dipaola@coma.mporzio.astro.it) +# June 1997 +# +# Makefile for cfitsio library: +# libcfits.a +# + +CFLAGS= -m486 -O3 -c +CC=gcc + +OBJECTS = buffers.o cfileio.o checksum.o compress.o f77_wrap.o drvrfile.o fitscore.o \ + getcol.o getcolb.o getcold.o getcole.o getcoli.o getcolj.o \ + getcolk.o getcoll.o getcols.o getcolui.o getcoluj.o editcol.o \ + edithdu.o getkey.o modkey.o putcol.o putcolb.o putcold.o putcole.o \ + putcoli.o putcolj.o putcolk.o putcoll.o putcols.o putcolui.o \ + putcoluj.o putcolu.o putkey.o scalnull.o swapproc.o wcsutil.o \ + imcompress.o quantize.o ricecomp.o pliocomp.o + +libcfitsio.a: $(OBJECTS) + ar rv libcfitsio.a $(OBJECTS) diff --git a/software/cfitsio3040/makefile.vcc b/software/cfitsio3040/makefile.vcc new file mode 100644 index 000000000..52353c257 --- /dev/null +++ b/software/cfitsio3040/makefile.vcc @@ -0,0 +1,706 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on cfitsio.dsp +!IF "$(CFG)" == "" +CFG=Win32 Release +!MESSAGE No configuration specified. Defaulting to Win32 Release. +!ENDIF + +!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cfitsio.mak" CFG="Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Win32 Release" + +OUTDIR=. +INTDIR=.\Release +# Begin Custom Macros +OutDir=. +# End Custom Macros + +ALL : "$(OUTDIR)\cfitsio.dll" + + +CLEAN : + -@erase "$(INTDIR)\buffers.obj" + -@erase "$(INTDIR)\cfileio.obj" + -@erase "$(INTDIR)\checksum.obj" + -@erase "$(INTDIR)\compress.obj" + -@erase "$(INTDIR)\drvrfile.obj" + -@erase "$(INTDIR)\drvrmem.obj" + -@erase "$(INTDIR)\editcol.obj" + -@erase "$(INTDIR)\edithdu.obj" + -@erase "$(INTDIR)\eval_f.obj" + -@erase "$(INTDIR)\eval_l.obj" + -@erase "$(INTDIR)\eval_y.obj" + -@erase "$(INTDIR)\fitscore.obj" + -@erase "$(INTDIR)\f77_wrap1.obj" + -@erase "$(INTDIR)\f77_wrap2.obj" + -@erase "$(INTDIR)\f77_wrap3.obj" + -@erase "$(INTDIR)\f77_wrap4.obj" + -@erase "$(INTDIR)\getcol.obj" + -@erase "$(INTDIR)\getcolb.obj" + -@erase "$(INTDIR)\getcolsb.obj" + -@erase "$(INTDIR)\getcold.obj" + -@erase "$(INTDIR)\getcole.obj" + -@erase "$(INTDIR)\getcoli.obj" + -@erase "$(INTDIR)\getcolj.obj" + -@erase "$(INTDIR)\getcolk.obj" + -@erase "$(INTDIR)\getcoll.obj" + -@erase "$(INTDIR)\getcols.obj" + -@erase "$(INTDIR)\getcolui.obj" + -@erase "$(INTDIR)\getcoluj.obj" + -@erase "$(INTDIR)\getcoluk.obj" + -@erase "$(INTDIR)\getkey.obj" + -@erase "$(INTDIR)\group.obj" + -@erase "$(INTDIR)\grparser.obj" + -@erase "$(INTDIR)\histo.obj" + -@erase "$(INTDIR)\iraffits.obj" + -@erase "$(INTDIR)\modkey.obj" + -@erase "$(INTDIR)\putcol.obj" + -@erase "$(INTDIR)\putcolb.obj" + -@erase "$(INTDIR)\putcolsb.obj" + -@erase "$(INTDIR)\putcold.obj" + -@erase "$(INTDIR)\putcole.obj" + -@erase "$(INTDIR)\putcoli.obj" + -@erase "$(INTDIR)\putcolj.obj" + -@erase "$(INTDIR)\putcolk.obj" + -@erase "$(INTDIR)\putcoll.obj" + -@erase "$(INTDIR)\putcols.obj" + -@erase "$(INTDIR)\putcolu.obj" + -@erase "$(INTDIR)\putcolui.obj" + -@erase "$(INTDIR)\putcoluj.obj" + -@erase "$(INTDIR)\putcoluk.obj" + -@erase "$(INTDIR)\putkey.obj" + -@erase "$(INTDIR)\region.obj" + -@erase "$(INTDIR)\scalnull.obj" + -@erase "$(INTDIR)\swapproc.obj" + -@erase "$(INTDIR)\imcompress.obj" + -@erase "$(INTDIR)\ricecomp.obj" + -@erase "$(INTDIR)\quantize.obj" + -@erase "$(INTDIR)\pliocomp.obj" + -@erase "$(INTDIR)\fits_hcompress.obj" + -@erase "$(INTDIR)\fits_hdecompress.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\wcssub.obj" + -@erase "$(INTDIR)\wcsutil.obj" + -@erase "$(OUTDIR)\cfitsio.dll" + -@erase "$(OUTDIR)\cfitsio.exp" + -@erase "$(OUTDIR)\cfitsio.lib" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +"$(INTDIR)" : + if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + +CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CFITSIO_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"$(INTDIR)\cfitsio.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\cfitsio.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\cfitsio.pdb" /machine:I386 /def:".\cfitsio.def" /out:"$(OUTDIR)\cfitsio.dll" /implib:"$(OUTDIR)\cfitsio.lib" +DEF_FILE= ".\cfitsio.def" +LINK32_OBJS= \ + "$(INTDIR)\buffers.obj" \ + "$(INTDIR)\cfileio.obj" \ + "$(INTDIR)\checksum.obj" \ + "$(INTDIR)\compress.obj" \ + "$(INTDIR)\drvrfile.obj" \ + "$(INTDIR)\drvrmem.obj" \ + "$(INTDIR)\editcol.obj" \ + "$(INTDIR)\edithdu.obj" \ + "$(INTDIR)\eval_f.obj" \ + "$(INTDIR)\eval_l.obj" \ + "$(INTDIR)\eval_y.obj" \ + "$(INTDIR)\fitscore.obj" \ + "$(INTDIR)\f77_wrap1.obj" \ + "$(INTDIR)\f77_wrap2.obj" \ + "$(INTDIR)\f77_wrap3.obj" \ + "$(INTDIR)\f77_wrap4.obj" \ + "$(INTDIR)\getcol.obj" \ + "$(INTDIR)\getcolb.obj" \ + "$(INTDIR)\getcolsb.obj" \ + "$(INTDIR)\getcold.obj" \ + "$(INTDIR)\getcole.obj" \ + "$(INTDIR)\getcoli.obj" \ + "$(INTDIR)\getcolj.obj" \ + "$(INTDIR)\getcolk.obj" \ + "$(INTDIR)\getcoll.obj" \ + "$(INTDIR)\getcols.obj" \ + "$(INTDIR)\getcolui.obj" \ + "$(INTDIR)\getcoluj.obj" \ + "$(INTDIR)\getcoluk.obj" \ + "$(INTDIR)\getkey.obj" \ + "$(INTDIR)\group.obj" \ + "$(INTDIR)\grparser.obj" \ + "$(INTDIR)\histo.obj" \ + "$(INTDIR)\iraffits.obj" \ + "$(INTDIR)\modkey.obj" \ + "$(INTDIR)\putcol.obj" \ + "$(INTDIR)\putcolb.obj" \ + "$(INTDIR)\putcolsb.obj" \ + "$(INTDIR)\putcold.obj" \ + "$(INTDIR)\putcole.obj" \ + "$(INTDIR)\putcoli.obj" \ + "$(INTDIR)\putcolj.obj" \ + "$(INTDIR)\putcolk.obj" \ + "$(INTDIR)\putcoll.obj" \ + "$(INTDIR)\putcols.obj" \ + "$(INTDIR)\putcolu.obj" \ + "$(INTDIR)\putcolui.obj" \ + "$(INTDIR)\putcoluj.obj" \ + "$(INTDIR)\putcoluk.obj" \ + "$(INTDIR)\putkey.obj" \ + "$(INTDIR)\region.obj" \ + "$(INTDIR)\scalnull.obj" \ + "$(INTDIR)\swapproc.obj" \ + "$(INTDIR)\imcompress.obj" \ + "$(INTDIR)\ricecomp.obj" \ + "$(INTDIR)\quantize.obj" \ + "$(INTDIR)\pliocomp.obj" \ + "$(INTDIR)\fits_hcompress.obj" \ + "$(INTDIR)\fits_hdecompress.obj" \ + "$(INTDIR)\wcssub.obj" \ + "$(INTDIR)\wcsutil.obj" + +"$(OUTDIR)\cfitsio.dll" : $(LINK32_OBJS) WINDUMP + windumpexts -o $(DEF_FILE) cfitsio.dll $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "Win32 Debug" + +OUTDIR=. +INTDIR=.\Debug +# Begin Custom Macros +OutDir=. +# End Custom Macros + +ALL : "$(OUTDIR)\cfitsio.dll" + + +CLEAN : + -@erase "$(INTDIR)\buffers.obj" + -@erase "$(INTDIR)\cfileio.obj" + -@erase "$(INTDIR)\checksum.obj" + -@erase "$(INTDIR)\compress.obj" + -@erase "$(INTDIR)\drvrfile.obj" + -@erase "$(INTDIR)\drvrmem.obj" + -@erase "$(INTDIR)\editcol.obj" + -@erase "$(INTDIR)\edithdu.obj" + -@erase "$(INTDIR)\eval_f.obj" + -@erase "$(INTDIR)\eval_l.obj" + -@erase "$(INTDIR)\eval_y.obj" + -@erase "$(INTDIR)\fitscore.obj" + -@erase "$(INTDIR)\f77_wrap1.obj" + -@erase "$(INTDIR)\f77_wrap2.obj" + -@erase "$(INTDIR)\f77_wrap3.obj" + -@erase "$(INTDIR)\f77_wrap4.obj" + -@erase "$(INTDIR)\getcol.obj" + -@erase "$(INTDIR)\getcolb.obj" + -@erase "$(INTDIR)\getcolsb.obj" + -@erase "$(INTDIR)\getcold.obj" + -@erase "$(INTDIR)\getcole.obj" + -@erase "$(INTDIR)\getcoli.obj" + -@erase "$(INTDIR)\getcolj.obj" + -@erase "$(INTDIR)\getcolk.obj" + -@erase "$(INTDIR)\getcoll.obj" + -@erase "$(INTDIR)\getcols.obj" + -@erase "$(INTDIR)\getcolui.obj" + -@erase "$(INTDIR)\getcoluj.obj" + -@erase "$(INTDIR)\getcoluk.obj" + -@erase "$(INTDIR)\getkey.obj" + -@erase "$(INTDIR)\group.obj" + -@erase "$(INTDIR)\grparser.obj" + -@erase "$(INTDIR)\histo.obj" + -@erase "$(INTDIR)\iraffits.obj" + -@erase "$(INTDIR)\modkey.obj" + -@erase "$(INTDIR)\putcol.obj" + -@erase "$(INTDIR)\putcolb.obj" + -@erase "$(INTDIR)\putcolsb.obj" + -@erase "$(INTDIR)\putcold.obj" + -@erase "$(INTDIR)\putcole.obj" + -@erase "$(INTDIR)\putcoli.obj" + -@erase "$(INTDIR)\putcolj.obj" + -@erase "$(INTDIR)\putcolk.obj" + -@erase "$(INTDIR)\putcoll.obj" + -@erase "$(INTDIR)\putcols.obj" + -@erase "$(INTDIR)\putcolu.obj" + -@erase "$(INTDIR)\putcolui.obj" + -@erase "$(INTDIR)\putcoluj.obj" + -@erase "$(INTDIR)\putcoluk.obj" + -@erase "$(INTDIR)\putkey.obj" + -@erase "$(INTDIR)\region.obj" + -@erase "$(INTDIR)\scalnull.obj" + -@erase "$(INTDIR)\swapproc.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(INTDIR)\wcssub.obj" + -@erase "$(INTDIR)\wcsutil.obj" + -@erase "$(INTDIR)\imcompress.obj" + -@erase "$(INTDIR)\ricecomp.obj" + -@erase "$(INTDIR)\quantize.obj" + -@erase "$(INTDIR)\pliocomp.obj" + -@erase "$(INTDIR)\fits_hcompress.obj" + -@erase "$(INTDIR)\fits_hdecompress.obj" + -@erase "$(OUTDIR)\cfitsio.dll" + -@erase "$(OUTDIR)\cfitsio.exp" + -@erase "$(OUTDIR)\cfitsio.ilk" + -@erase "$(OUTDIR)\cfitsio.lib" + -@erase "$(OUTDIR)\cfitsio.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +"$(INTDIR)" : + if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + +CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /D "__WIN32__" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CFITSIO_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /Fp"$(INTDIR)\cfitsio.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\cfitsio.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\cfitsio.pdb" /debug /machine:I386 /def:".\cfitsio.def" /out:"$(OUTDIR)\cfitsio.dll" /implib:"$(OUTDIR)\cfitsio.lib" /pdbtype:sept +DEF_FILE= ".\cfitsio.def" +LINK32_OBJS= \ + "$(INTDIR)\buffers.obj" \ + "$(INTDIR)\cfileio.obj" \ + "$(INTDIR)\checksum.obj" \ + "$(INTDIR)\compress.obj" \ + "$(INTDIR)\drvrfile.obj" \ + "$(INTDIR)\drvrmem.obj" \ + "$(INTDIR)\editcol.obj" \ + "$(INTDIR)\edithdu.obj" \ + "$(INTDIR)\eval_f.obj" \ + "$(INTDIR)\eval_l.obj" \ + "$(INTDIR)\eval_y.obj" \ + "$(INTDIR)\fitscore.obj" \ + "$(INTDIR)\f77_wrap1.obj" \ + "$(INTDIR)\f77_wrap2.obj" \ + "$(INTDIR)\f77_wrap3.obj" \ + "$(INTDIR)\f77_wrap4.obj" \ + "$(INTDIR)\getcol.obj" \ + "$(INTDIR)\getcolb.obj" \ + "$(INTDIR)\getcolsb.obj" \ + "$(INTDIR)\getcold.obj" \ + "$(INTDIR)\getcole.obj" \ + "$(INTDIR)\getcoli.obj" \ + "$(INTDIR)\getcolj.obj" \ + "$(INTDIR)\getcolk.obj" \ + "$(INTDIR)\getcoll.obj" \ + "$(INTDIR)\getcols.obj" \ + "$(INTDIR)\getcolui.obj" \ + "$(INTDIR)\getcoluj.obj" \ + "$(INTDIR)\getcoluk.obj" \ + "$(INTDIR)\getkey.obj" \ + "$(INTDIR)\group.obj" \ + "$(INTDIR)\grparser.obj" \ + "$(INTDIR)\histo.obj" \ + "$(INTDIR)\iraffits.obj" \ + "$(INTDIR)\modkey.obj" \ + "$(INTDIR)\putcol.obj" \ + "$(INTDIR)\putcolb.obj" \ + "$(INTDIR)\putcolsb.obj" \ + "$(INTDIR)\putcold.obj" \ + "$(INTDIR)\putcole.obj" \ + "$(INTDIR)\putcoli.obj" \ + "$(INTDIR)\putcolj.obj" \ + "$(INTDIR)\putcolk.obj" \ + "$(INTDIR)\putcoll.obj" \ + "$(INTDIR)\putcols.obj" \ + "$(INTDIR)\putcolu.obj" \ + "$(INTDIR)\putcolui.obj" \ + "$(INTDIR)\putcoluj.obj" \ + "$(INTDIR)\putcoluk.obj" \ + "$(INTDIR)\putkey.obj" \ + "$(INTDIR)\region.obj" \ + "$(INTDIR)\scalnull.obj" \ + "$(INTDIR)\swapproc.obj" \ + "$(INTDIR)\wcssub.obj" \ + "$(INTDIR)\wcsutil.obj" \ + "$(INTDIR)\imcompress.obj" \ + "$(INTDIR)\ricecomp.obj" \ + "$(INTDIR)\quantize.obj" \ + "$(INTDIR)\pliocomp.obj" \ + "$(INTDIR)\fits_hcompress.obj" \ + "$(INTDIR)\fits_hdecompress.obj" \ + +"$(OUTDIR)\cfitsio.dll" : $(LINK32_OBJS) WINDUMP + windumpexts -o $(DEF_FILE) cfitsio.dll $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("cfitsio.dep") +!INCLUDE "cfitsio.dep" +!ELSE +!MESSAGE Warning: cannot find "cfitsio.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "Win32 Release" || "$(CFG)" == "Win32 Debug" +SOURCE=.\buffers.c + +"$(INTDIR)\buffers.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\cfileio.c + +"$(INTDIR)\cfileio.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\checksum.c + +"$(INTDIR)\checksum.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\compress.c + +"$(INTDIR)\compress.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\drvrfile.c + +"$(INTDIR)\drvrfile.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\drvrmem.c + +"$(INTDIR)\drvrmem.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\editcol.c + +"$(INTDIR)\editcol.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\edithdu.c + +"$(INTDIR)\edithdu.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\eval_f.c + +"$(INTDIR)\eval_f.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\eval_l.c + +"$(INTDIR)\eval_l.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\eval_y.c + +"$(INTDIR)\eval_y.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\fitscore.c + +"$(INTDIR)\fitscore.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\f77_wrap1.c + +"$(INTDIR)\f77_wrap1.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\f77_wrap2.c + +"$(INTDIR)\f77_wrap2.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\f77_wrap3.c + +"$(INTDIR)\f77_wrap3.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\f77_wrap4.c + +"$(INTDIR)\f77_wrap4.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcol.c + +"$(INTDIR)\getcol.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcolb.c + +"$(INTDIR)\getcolb.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcolsb.c + +"$(INTDIR)\getcolsb.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcold.c + +"$(INTDIR)\getcold.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcole.c + +"$(INTDIR)\getcole.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcoli.c + +"$(INTDIR)\getcoli.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcolj.c + +"$(INTDIR)\getcolj.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcolk.c + +"$(INTDIR)\getcolk.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcoll.c + +"$(INTDIR)\getcoll.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcols.c + +"$(INTDIR)\getcols.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcolui.c + +"$(INTDIR)\getcolui.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcoluj.c + +"$(INTDIR)\getcoluj.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getcoluk.c + +"$(INTDIR)\getcoluk.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\getkey.c + +"$(INTDIR)\getkey.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\group.c + +"$(INTDIR)\group.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\grparser.c + +"$(INTDIR)\grparser.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\histo.c + +"$(INTDIR)\histo.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\iraffits.c + +"$(INTDIR)\iraffits.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\modkey.c + +"$(INTDIR)\modkey.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcol.c + +"$(INTDIR)\putcol.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolb.c + +"$(INTDIR)\putcolb.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolsb.c + +"$(INTDIR)\putcolsb.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcold.c + +"$(INTDIR)\putcold.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcole.c + +"$(INTDIR)\putcole.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcoli.c + +"$(INTDIR)\putcoli.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolj.c + +"$(INTDIR)\putcolj.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolk.c + +"$(INTDIR)\putcolk.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcoll.c + +"$(INTDIR)\putcoll.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcols.c + +"$(INTDIR)\putcols.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolu.c + +"$(INTDIR)\putcolu.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcolui.c + +"$(INTDIR)\putcolui.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcoluj.c + +"$(INTDIR)\putcoluj.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putcoluk.c + +"$(INTDIR)\putcoluk.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\putkey.c + +"$(INTDIR)\putkey.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\region.c + +"$(INTDIR)\region.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\scalnull.c + +"$(INTDIR)\scalnull.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\swapproc.c + +"$(INTDIR)\swapproc.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\wcssub.c + +"$(INTDIR)\wcssub.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=.\wcsutil.c + +"$(INTDIR)\wcsutil.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=imcompress.c + +"$(INTDIR)\imcompress.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=ricecomp.c + +"$(INTDIR)\ricecomp.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=quantize.c + +"$(INTDIR)\quantize.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=pliocomp.c + +"$(INTDIR)\pliocomp.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=fits_hcompress.c + +"$(INTDIR)\fits_hcompress.obj" : $(SOURCE) "$(INTDIR)" + +SOURCE=fits_hdecompress.c + +"$(INTDIR)\fits_hdecompress.obj" : $(SOURCE) "$(INTDIR)" + +!ENDIF + +$(DEF_FILE): + + + +WINDUMP: + nmake -f winDumpExts.mak diff --git a/software/cfitsio3040/makepc.bat b/software/cfitsio3040/makepc.bat new file mode 100644 index 000000000..e18b3932b --- /dev/null +++ b/software/cfitsio3040/makepc.bat @@ -0,0 +1,71 @@ +rem: this batch file builds the cfitsio library +rem: using the Borland C++ v4.5 compiler +rem: +bcc32 -c buffers.c +bcc32 -c cfileio.c +bcc32 -c checksum.c +bcc32 -c compress.c +bcc32 -c drvrfile.c +bcc32 -c drvrmem.c +bcc32 -c editcol.c +bcc32 -c edithdu.c +bcc32 -c eval_l.c +bcc32 -c eval_y.c +bcc32 -c eval_f.c +bcc32 -c fitscore.c +bcc32 -c getcol.c +bcc32 -c getcolb.c +bcc32 -c getcolsb.c +bcc32 -c getcoli.c +bcc32 -c getcolj.c +bcc32 -c getcolui.c +bcc32 -c getcoluj.c +bcc32 -c getcoluk.c +bcc32 -c getcolk.c +bcc32 -c getcole.c +bcc32 -c getcold.c +bcc32 -c getcoll.c +bcc32 -c getcols.c +bcc32 -c getkey.c +bcc32 -c group.c +bcc32 -c grparser.c +bcc32 -c histo.c +bcc32 -c iraffits.c +bcc32 -c modkey.c +bcc32 -c putcol.c +bcc32 -c putcolb.c +bcc32 -c putcolsb.c +bcc32 -c putcoli.c +bcc32 -c putcolj.c +bcc32 -c putcolui.c +bcc32 -c putcoluj.c +bcc32 -c putcoluk.c +bcc32 -c putcolk.c +bcc32 -c putcole.c +bcc32 -c putcold.c +bcc32 -c putcols.c +bcc32 -c putcoll.c +bcc32 -c putcolu.c +bcc32 -c putkey.c +bcc32 -c region.c +bcc32 -c scalnull.c +bcc32 -c swapproc.c +bcc32 -c wcsutil.c +bcc32 -c wcssub.c +bcc32 -c imcompress.c +bcc32 -c quantize.c +bcc32 -c ricecomp.c +bcc32 -c pliocomp.c +del cfitsio.lib +tlib cfitsio +buffers +cfileio +checksum +compress +drvrfile +drvrmem +tlib cfitsio +editcol +edithdu +eval_l +eval_y +eval_f +fitscore +tlib cfitsio +getcol +getcolb +getcolsb +getcoli +getcolj +getcolk +getcoluk +tlib cfitsio +getcolui +getcoluj +getcole +getcold +getcoll +getcols +tlib cfitsio +getkey +group +grparser +histo +iraffits +modkey +putkey +tlib cfitsio +putcol +putcolb +putcoli +putcolj +putcolk +putcole +putcold +tlib cfitsio +putcoll +putcols +putcolu +putcolui +putcoluj +putcoluk +tlib cfitsio +region +scalnull +swapproc +wcsutil +wcssub +putcolsb +tlib cfitsio +imcompress +quantize +ricecomp +pliocomp +bcc32 -f testprog.c cfitsio.lib +bcc32 -f cookbook.c cfitsio.lib + diff --git a/software/cfitsio3040/mkpkg b/software/cfitsio3040/mkpkg new file mode 100644 index 000000000..e428f680c --- /dev/null +++ b/software/cfitsio3040/mkpkg @@ -0,0 +1,74 @@ +# CFITSIO -- Update the CFITSIO library. +# copied from the fitsio mkpkg by jdd 12 sept 1996 +# +# this is a sample IRAF mkfile which builds a local version of the CFITSIO lib. + +$call update +$exit + +update: + $checkout libcfitsio.a ftoolsbin$ + $update libcfitsio.a + $checkin libcfitsio.a ftoolsbin$ + ; + +updateftools: + #Extra target for building fitsio inside the FTOOLS distribution + $checkout libcfitsio.a ftoolsbin$ + $update libcfitsio.a + $checkin libcfitsio.a ftoolsbin$ + ; + +cfitsio: + # Update fitsio subdirectory if new version of cfitsio.c installed. + $ifolder (splitc/cfileio.c, cfileio.c) + $echo "update cfitsio splitc subdirectory..." + $iffile(splitc/cfileio.c) + !\rm splitc/* + $delete splitc/mkpkg + $else + !mkdir splitc + !./configure + $endif + $copy buffers.c splitc/buffers.c + $copy cfileio.c splitc/cfileio.c + $copy checksum.c splitc/checksum.c + $copy compress.c splitc/compress.c + $copy f77_iter.c splitc/f77_iter.c + $copy f77_wrap.c splitc/f77_wrap.c + $copy drvrfile.c splitc/drvrfile.c + $copy fitscore.c splitc/fitscore.c + $copy editcol.c splitc/editcol.c + $copy edithdu.c splitc/edithdu.c + $copy getkey.c splitc/getkey.c + $copy modkey.c splitc/modkey.c + $copy putkey.c splitc/putkey.c + $copy scalnull.c splitc/scalnull.c + $copy swapproc.c splitc/swapproc.c + $copy wcsutil.c splitc/wcsutil.c + !cp getcol*.c splitc/ + !cp putcol*.c splitc/ + !cp *.h splitc/ + !cp *.h ../include + !cd splitc + !echo '$checkout libcfitsio.a ../libcfitsio.a' > splitc/mkpkg + !echo '$update libcfitsio.a' >> splitc/mkpkg + !echo '$checkin libcfitsio.a ../libcfitsio.a' >> splitc/mkpkg + !echo ' ' >> splitc/mkpkg + !echo 'libcfitsio.a:' >> splitc/mkpkg + !cd splitc; ls -1 *.c | sed 's/^/ /' >> mkpkg + !echo ' ;' >> splitc/mkpkg + $endif + ; + +libcfitsio.a: + $ifeq (hostid, unix) + # cheat and use Makefile.... + $call cfitsio + @splitc + $else + # simply compile the files on VMS systems. + !@makevms.com + $endif + + ; diff --git a/software/cfitsio3040/modkey.c b/software/cfitsio3040/modkey.c new file mode 100644 index 000000000..bb61c5e85 --- /dev/null +++ b/software/cfitsio3040/modkey.c @@ -0,0 +1,1641 @@ +/* This file, modkey.c, contains routines that modify, insert, or update */ +/* keywords in a FITS header. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +/* stddef.h is apparently needed to define size_t */ +#include +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffuky( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + char *keyname, /* I - name of keyword to write */ + void *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Update the keyword, value and comment in the FITS header. + The datatype is specified by the 2nd argument. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TSTRING) + { + ffukys(fptr, keyname, (char *) value, comm, status); + } + else if (datatype == TBYTE) + { + ffukyj(fptr, keyname, (LONGLONG) *(unsigned char *) value, comm, status); + } + else if (datatype == TSBYTE) + { + ffukyj(fptr, keyname, (LONGLONG) *(signed char *) value, comm, status); + } + else if (datatype == TUSHORT) + { + ffukyj(fptr, keyname, (LONGLONG) *(unsigned short *) value, comm, status); + } + else if (datatype == TSHORT) + { + ffukyj(fptr, keyname, (LONGLONG) *(short *) value, comm, status); + } + else if (datatype == TINT) + { + ffukyj(fptr, keyname, (LONGLONG) *(int *) value, comm, status); + } + else if (datatype == TUINT) + { + ffukyg(fptr, keyname, (double) *(unsigned int *) value, 0, + comm, status); + } + else if (datatype == TLOGICAL) + { + ffukyl(fptr, keyname, *(int *) value, comm, status); + } + else if (datatype == TULONG) + { + ffukyg(fptr, keyname, (double) *(unsigned long *) value, 0, + comm, status); + } + else if (datatype == TLONG) + { + ffukyj(fptr, keyname, (LONGLONG) *(long *) value, comm, status); + } + else if (datatype == TLONGLONG) + { + ffukyj(fptr, keyname, *(LONGLONG *) value, comm, status); + } + else if (datatype == TFLOAT) + { + ffukye(fptr, keyname, *(float *) value, -7, comm, status); + } + else if (datatype == TDOUBLE) + { + ffukyd(fptr, keyname, *(double *) value, -15, comm, status); + } + else if (datatype == TCOMPLEX) + { + ffukyc(fptr, keyname, (float *) value, -7, comm, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffukym(fptr, keyname, (double *) value, -15, comm, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyu(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyu(fptr, keyname, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyu(fptr, keyname, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukys(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkys(fptr, keyname, value, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkys(fptr, keyname, value, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukls(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + /* update a long string keyword */ + + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkls(fptr, keyname, value, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkls(fptr, keyname, value, comm, status); + } + return(*status); +}/*--------------------------------------------------------------------------*/ +int ffukyl(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + int value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyl(fptr, keyname, value, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyl(fptr, keyname, value, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyj(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + LONGLONG value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyj(fptr, keyname, value, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyj(fptr, keyname, value, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyf(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyf(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyf(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukye(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkye(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkye(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyg(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyg(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyg(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyd(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyd(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyd(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukfc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkfc(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkfc(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukyc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkyc(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkyc(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukfm(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkfm(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkfm(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffukym(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmkym(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffpkym(fptr, keyname, value, decim, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffucrd(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +{ + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = *status; + + if (ffmcrd(fptr, keyname, card, status) == KEY_NO_EXIST) + { + *status = tstatus; + ffprec(fptr, card, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmrec(fitsfile *fptr, /* I - FITS file pointer */ + int nkey, /* I - number of the keyword to modify */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffmaky(fptr, nkey+1, status); + ffmkey(fptr, card, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmcrd(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +{ + char tcard[FLEN_CARD], valstring[FLEN_CARD], comm[FLEN_CARD], value[FLEN_CARD]; + int keypos, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgcrd(fptr, keyname, tcard, status) > 0) + return(*status); + + ffmkey(fptr, card, status); + + /* calc position of keyword in header */ + keypos = (int) ((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80) + 1; + + ffpsvc(tcard, valstring, comm, status); + + /* check for string value which may be continued over multiple keywords */ + ffc2s(valstring, value, status); /* remove quotes and trailing spaces */ + len = strlen(value); + + while (len && value[len - 1] == '&') /* ampersand used as continuation char */ + { + ffgcnt(fptr, value, status); + if (*value) + { + ffdrec(fptr, keypos, status); /* delete the keyword */ + len = strlen(value); + } + else /* a null valstring indicates no continuation */ + len = 0; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmnam(fitsfile *fptr, /* I - FITS file pointer */ + char *oldname, /* I - existing keyword name */ + char *newname, /* I - new name for keyword */ + int *status) /* IO - error status */ +{ + char comm[FLEN_COMMENT]; + char value[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, oldname, value, comm, status) > 0) + return(*status); + + ffmkky(newname, value, comm, card, status); /* construct the card */ + ffmkey(fptr, card, status); /* rewrite with new name */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmcom(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char oldcomm[FLEN_COMMENT]; + char value[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, value, oldcomm, status) > 0) + return(*status); + + ffmkky(keyname, value, comm, card, status); /* construct the card */ + ffmkey(fptr, card, status); /* rewrite with new comment */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpunt(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *unit, /* I - keyword unit string */ + int *status) /* IO - error status */ +/* + Write (put) the units string into the comment field of the existing + keyword. This routine uses a local FITS convention (not defined in the + official FITS standard) in which the units are enclosed in + square brackets following the '/' comment field delimiter, e.g.: + + KEYWORD = 12 / [kpc] comment string goes here +*/ +{ + char oldcomm[FLEN_COMMENT]; + char newcomm[FLEN_COMMENT]; + char value[FLEN_VALUE]; + char card[FLEN_CARD]; + char *loc; + size_t len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, value, oldcomm, status) > 0) + return(*status); + + /* copy the units string to the new comment string if not null */ + if (*unit) + { + strcpy(newcomm, "["); + strncat(newcomm, unit, 45); /* max allowed length is about 45 chars */ + strcat(newcomm, "] "); + len = strlen(newcomm); + len = FLEN_COMMENT - len - 1; /* amount of space left in the field */ + } + else + { + newcomm[0] = '\0'; + len = FLEN_COMMENT - 1; + } + + if (oldcomm[0] == '[') /* check for existing units field */ + { + loc = strchr(oldcomm, ']'); /* look for the closing bracket */ + if (loc) + { + loc++; + while (*loc == ' ') /* skip any blank spaces */ + loc++; + + strncat(newcomm, loc, len); /* concat remainder of comment */ + } + else + { + strncat(newcomm, oldcomm, len); /* append old comment onto new */ + } + } + else + { + strncat(newcomm, oldcomm, len); + } + + ffmkky(keyname, value, newcomm, card, status); /* construct the card */ + ffmkey(fptr, card, status); /* rewrite with new units string */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyu(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + strcpy(valstring," "); /* create a dummy value string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkys(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + /* NOTE: This routine does not support long continued strings */ + /* It will correctly overwrite an existing long continued string, */ + /* but it will not write a new long string. */ + + char oldval[FLEN_VALUE], valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + int len, keypos; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, oldval, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffs2c(value, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); /* overwrite the previous keyword */ + + keypos = (int) (((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80) + 1); + + /* check if old string value was continued over multiple keywords */ + ffc2s(oldval, valstring, status); /* remove quotes and trailing spaces */ + len = strlen(valstring); + + while (len && valstring[len - 1] == '&') /* ampersand is continuation char */ + { + ffgcnt(fptr, valstring, status); + if (*valstring) + { + ffdrec(fptr, keypos, status); /* delete the continuation */ + len = strlen(valstring); + } + else /* a null valstring indicates no continuation */ + len = 0; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkls( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + char *value, /* I - keyword value */ + char *incomm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Modify the value and optionally the comment of a long string keyword. + This routine supports the + HEASARC long string convention and can modify arbitrarily long string + keyword values. The value is continued over multiple keywords that + have the name COMTINUE without an equal sign in column 9 of the card. + This routine also supports simple string keywords which are less than + 69 characters in length. + + This routine is not very efficient, so it should be used sparingly. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + char comm[FLEN_COMMENT]; + char tstring[FLEN_VALUE], *cptr; + char *longval; + int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; + int nkeys, keypos; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (!incomm || incomm[0] == '&') /* preserve the old comment string */ + { + ffghps(fptr, &nkeys, &keypos, status); /* save current position */ + + if (ffgkls(fptr, keyname, &longval, comm, status) > 0) + return(*status); /* keyword doesn't exist */ + + free(longval); /* don't need the old value */ + + /* move back to previous position to ensure that we delete */ + /* the right keyword in case there are more than one keyword */ + /* with this same name. */ + ffgrec(fptr, keypos - 1, card, status); + } + else + strcpy(comm, incomm); /* copy the input comment string */ + + /* delete the old keyword */ + if (ffdkey(fptr, keyname, status) > 0) + return(*status); /* keyword doesn't exist */ + + ffghps(fptr, &nkeys, &keypos, status); /* save current position */ + + /* now construct the new keyword, and insert into header */ + remain = strlen(value); /* number of characters to write out */ + next = 0; /* pointer to next character to write */ + + /* count the number of single quote characters in the string */ + nquote = 0; + cptr = strchr(value, '\''); /* search for quote character */ + + while (cptr) /* search for quote character */ + { + nquote++; /* increment no. of quote characters */ + cptr++; /* increment pointer to next character */ + cptr = strchr(cptr, '\''); /* search for another quote char */ + } + + cptr = keyname; + while(*cptr == ' ') /* skip over leading spaces in name */ + cptr++; + + /* determine the number of characters that will fit on the line */ + /* Note: each quote character is expanded to 2 quotes */ + + namelen = strlen(cptr); + if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) + { + /* This a normal 8-character FITS keyword */ + nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ + } + else + { + /* This a HIERARCH keyword */ + if (FSTRNCMP(cptr, "HIERARCH ", 9) && + FSTRNCMP(cptr, "hierarch ", 9)) + nchar = 66 - nquote - namelen; + else + nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ + + } + + contin = 0; + while (remain > 0) + { + strncpy(tstring, &value[next], nchar); /* copy string to temp buff */ + tstring[nchar] = '\0'; + ffs2c(tstring, valstring, status); /* put quotes around the string */ + + if (remain > nchar) /* if string is continued, put & as last char */ + { + vlen = strlen(valstring); + nchar -= 1; /* outputting one less character now */ + + if (valstring[vlen-2] != '\'') + valstring[vlen-2] = '&'; /* over write last char with & */ + else + { /* last char was a pair of single quotes, so over write both */ + valstring[vlen-3] = '&'; + valstring[vlen-1] = '\0'; + } + } + + if (contin) /* This is a CONTINUEd keyword */ + { + ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ + strncpy(&card[8], " ", 2); /* overwrite the '=' */ + } + else + { + ffmkky(keyname, valstring, comm, card, status); /* make keyword */ + } + + ffirec(fptr, keypos, card, status); /* insert the keyword */ + + keypos++; /* next insert position */ + contin = 1; + remain -= nchar; + next += nchar; + nchar = 68 - nquote; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyl(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + int value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffl2c(value, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyj(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + LONGLONG value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffi2c(value, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyf(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffr2f(value, decim, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkye(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffr2e(value, decim, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyg(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffd2f(value, decim, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyd(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + ffd2e(value, decim, valstring, status); /* convert value to a string */ + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkfc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + strcpy(valstring, "(" ); + ffr2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkyc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + strcpy(valstring, "(" ); + ffr2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkfm(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + strcpy(valstring, "(" ); + ffd2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffmkym(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char oldcomm[FLEN_COMMENT]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) + return(*status); /* get old comment */ + + strcpy(valstring, "(" ); + ffd2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + if (!comm || comm[0] == '&') /* preserve the current comment string */ + ffmkky(keyname, valstring, oldcomm, card, status); + else + ffmkky(keyname, valstring, comm, card, status); + + ffmkey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyu(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Insert a null-valued keyword and comment into the FITS header. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring," "); /* create a dummy value string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikys(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffs2c(value, valstring, status); /* put quotes around the string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikls( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Insert a long string keyword. This routine supports the + HEASARC long string convention and can insert arbitrarily long string + keyword values. The value is continued over multiple keywords that + have the name COMTINUE without an equal sign in column 9 of the card. + This routine also supports simple string keywords which are less than + 69 characters in length. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + char tstring[FLEN_VALUE], *cptr; + int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* construct the new keyword, and insert into header */ + remain = strlen(value); /* number of characters to write out */ + next = 0; /* pointer to next character to write */ + + /* count the number of single quote characters in the string */ + nquote = 0; + cptr = strchr(value, '\''); /* search for quote character */ + + while (cptr) /* search for quote character */ + { + nquote++; /* increment no. of quote characters */ + cptr++; /* increment pointer to next character */ + cptr = strchr(cptr, '\''); /* search for another quote char */ + } + + cptr = keyname; + while(*cptr == ' ') /* skip over leading spaces in name */ + cptr++; + + /* determine the number of characters that will fit on the line */ + /* Note: each quote character is expanded to 2 quotes */ + + namelen = strlen(cptr); + if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) + { + /* This a normal 8-character FITS keyword */ + nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ + } + else + { + /* This a HIERARCH keyword */ + if (FSTRNCMP(cptr, "HIERARCH ", 9) && + FSTRNCMP(cptr, "hierarch ", 9)) + nchar = 66 - nquote - namelen; + else + nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ + + } + + contin = 0; + while (remain > 0) + { + strncpy(tstring, &value[next], nchar); /* copy string to temp buff */ + tstring[nchar] = '\0'; + ffs2c(tstring, valstring, status); /* put quotes around the string */ + + if (remain > nchar) /* if string is continued, put & as last char */ + { + vlen = strlen(valstring); + nchar -= 1; /* outputting one less character now */ + + if (valstring[vlen-2] != '\'') + valstring[vlen-2] = '&'; /* over write last char with & */ + else + { /* last char was a pair of single quotes, so over write both */ + valstring[vlen-3] = '&'; + valstring[vlen-1] = '\0'; + } + } + + if (contin) /* This is a CONTINUEd keyword */ + { + ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ + strncpy(&card[8], " ", 2); /* overwrite the '=' */ + } + else + { + ffmkky(keyname, valstring, comm, card, status); /* make keyword */ + } + + ffikey(fptr, card, status); /* insert the keyword */ + + contin = 1; + remain -= nchar; + next += nchar; + nchar = 68 - nquote; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyl(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + int value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffl2c(value, valstring, status); /* convert logical to 'T' or 'F' */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyj(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + LONGLONG value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffi2c(value, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyf(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffr2f(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikye(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffr2e(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyg(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffd2f(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyd(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffd2e(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikfc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffr2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikyc(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + float *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffr2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikfm(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + + strcpy(valstring, "(" ); + ffd2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikym(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + double *value, /* I - keyword value */ + int decim, /* I - no of decimals */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffd2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffikey(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffirec(fitsfile *fptr, /* I - FITS file pointer */ + int nkey, /* I - position to insert new keyword */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffmaky(fptr, nkey, status); /* move to insert position */ + ffikey(fptr, card, status); /* insert the keyword card */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffikey(fitsfile *fptr, /* I - FITS file pointer */ + char *card, /* I - card string value */ + int *status) /* IO - error status */ +/* + insert a keyword at the position of (fptr->Fptr)->nextkey +*/ +{ + int ii, len, nshift; + long nblocks; + LONGLONG bytepos; + char *inbuff, *outbuff, *tmpbuff, buff1[FLEN_CARD], buff2[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ( ((fptr->Fptr)->datastart - (fptr->Fptr)->headend) == 80) /* only room for END card */ + { + nblocks = 1; + if (ffiblk(fptr, nblocks, 0, status) > 0) /* add new 2880-byte block*/ + return(*status); + } + + /* no. keywords to shift */ + nshift= (int) (( (fptr->Fptr)->headend - (fptr->Fptr)->nextkey ) / 80); + + strncpy(buff2, card, 80); /* copy card to output buffer */ + buff2[80] = '\0'; + + len = strlen(buff2); + for (ii=len; ii < 80; ii++) /* fill buffer with spaces if necessary */ + buff2[ii] = ' '; + + for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ + buff2[ii] = toupper(buff2[ii]); + + fftkey(buff2, status); /* test keyword name contains legal chars */ + fftrec(buff2, status); /* test rest of keyword for legal chars */ + + inbuff = buff1; + outbuff = buff2; + + bytepos = (fptr->Fptr)->nextkey; /* pointer to next keyword in header */ + ffmbyt(fptr, bytepos, REPORT_EOF, status); + + for (ii = 0; ii < nshift; ii++) /* shift each keyword down one position */ + { + ffgbyt(fptr, 80, inbuff, status); /* read the current keyword */ + + ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move back */ + ffpbyt(fptr, 80, outbuff, status); /* overwrite with other buffer */ + + tmpbuff = inbuff; /* swap input and output buffers */ + inbuff = outbuff; + outbuff = tmpbuff; + + bytepos += 80; + } + + ffpbyt(fptr, 80, outbuff, status); /* write the final keyword */ + + (fptr->Fptr)->headend += 80; /* increment the position of the END keyword */ + (fptr->Fptr)->nextkey += 80; /* increment the pointer to next keyword */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdkey(fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - keyword name */ + int *status) /* IO - error status */ +/* + delete a specified header keyword +*/ +{ + int keypos, len; + char valstring[FLEN_VALUE], comm[FLEN_COMMENT], value[FLEN_VALUE]; + char message[FLEN_ERRMSG]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (ffgkey(fptr, keyname, valstring, comm, status) > 0) /* read keyword */ + { + sprintf(message, "Could not find the %s keyword to delete (ffdkey)", + keyname); + ffpmsg(message); + return(*status); + } + + /* calc position of keyword in header */ + keypos = (int) ((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80); + + ffdrec(fptr, keypos, status); /* delete the keyword */ + + /* check for string value which may be continued over multiple keywords */ + ffc2s(valstring, value, status); /* remove quotes and trailing spaces */ + len = strlen(value); + + while (len && value[len - 1] == '&') /* ampersand used as continuation char */ + { + ffgcnt(fptr, value, status); + if (*value) + { + ffdrec(fptr, keypos, status); /* delete the keyword */ + len = strlen(value); + } + else /* a null valstring indicates no continuation */ + len = 0; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffdrec(fitsfile *fptr, /* I - FITS file pointer */ + int keypos, /* I - position in header of keyword to delete */ + int *status) /* IO - error status */ +/* + Delete a header keyword at position keypos. The 1st keyword is at keypos=1. +*/ +{ + int ii, nshift; + LONGLONG bytepos; + char *inbuff, *outbuff, *tmpbuff, buff1[81], buff2[81]; + char message[FLEN_ERRMSG]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (keypos < 1 || + keypos > (fptr->Fptr)->headend - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] / 80 ) + return(*status = KEY_OUT_BOUNDS); + + (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] + (keypos - 1) * 80; + + nshift=(int) (( (fptr->Fptr)->headend - (fptr->Fptr)->nextkey ) / 80); /* no. keywords to shift */ + + if (nshift <= 0) + { + sprintf(message, "Cannot delete keyword number %d. It does not exist.", + keypos); + ffpmsg(message); + return(*status = KEY_OUT_BOUNDS); + } + + bytepos = (fptr->Fptr)->headend - 80; /* last keyword in header */ + + /* construct a blank keyword */ + strcpy(buff2, " "); + strcat(buff2, " "); + inbuff = buff1; + outbuff = buff2; + for (ii = 0; ii < nshift; ii++) /* shift each keyword up one position */ + { + + ffmbyt(fptr, bytepos, REPORT_EOF, status); + ffgbyt(fptr, 80, inbuff, status); /* read the current keyword */ + + ffmbyt(fptr, bytepos, REPORT_EOF, status); + ffpbyt(fptr, 80, outbuff, status); /* overwrite with next keyword */ + + tmpbuff = inbuff; /* swap input and output buffers */ + inbuff = outbuff; + outbuff = tmpbuff; + + bytepos -= 80; + } + + (fptr->Fptr)->headend -= 80; /* decrement the position of the END keyword */ + return(*status); +} + diff --git a/software/cfitsio3040/pliocomp.c b/software/cfitsio3040/pliocomp.c new file mode 100644 index 000000000..7550ed67a --- /dev/null +++ b/software/cfitsio3040/pliocomp.c @@ -0,0 +1,331 @@ +/* stdlib is needed for the abs function */ +#include +/* + The following prototype code was provided by Doug Tody, NRAO, for + performing conversion between pixel arrays and line lists. The + compression technique is used in IRAF. +*/ +int pl_p2li (int *pxsrc, int xs, short *lldst, int npix); +int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix); + + +/* + * PL_P2L -- Convert a pixel array to a line list. The length of the list is + * returned as the function value. + * + * Translated from the SPP version using xc -f, f2c. 8Sep99 DCT. + */ + +#ifndef min +#define min(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef max +#define max(a,b) (((a)>(b))?(a):(b)) +#endif + +int pl_p2li (int *pxsrc, int xs, short *lldst, int npix) +/* int *pxsrc; input pixel array */ +/* int xs; starting index in pxsrc (?) */ +/* short *lldst; encoded line list */ +/* int npix; number of pixels to convert */ +{ + /* System generated locals */ + int ret_val, i__1, i__2, i__3; + + /* Local variables */ + static int zero, v, x1, hi, ip, dv, xe, np, op, iz, nv, pv, nz; + + /* Parameter adjustments */ + --lldst; + --pxsrc; + + /* Function Body */ + if (! (npix <= 0)) { + goto L110; + } + ret_val = 0; + goto L100; +L110: + lldst[3] = -100; + lldst[2] = 7; + lldst[1] = 0; + lldst[6] = 0; + lldst[7] = 0; + xe = xs + npix - 1; + op = 8; + zero = 0; +/* Computing MAX */ + i__1 = zero, i__2 = pxsrc[xs]; + pv = max(i__1,i__2); + x1 = xs; + iz = xs; + hi = 1; + i__1 = xe; + for (ip = xs; ip <= i__1; ++ip) { + if (! (ip < xe)) { + goto L130; + } +/* Computing MAX */ + i__2 = zero, i__3 = pxsrc[ip + 1]; + nv = max(i__2,i__3); + if (! (nv == pv)) { + goto L140; + } + goto L120; +L140: + if (! (pv == 0)) { + goto L150; + } + pv = nv; + x1 = ip + 1; + goto L120; +L150: + goto L131; +L130: + if (! (pv == 0)) { + goto L160; + } + x1 = xe + 1; +L160: +L131: + np = ip - x1 + 1; + nz = x1 - iz; + if (! (pv > 0)) { + goto L170; + } + dv = pv - hi; + if (! (dv != 0)) { + goto L180; + } + hi = pv; + if (! (abs(dv) > 4095)) { + goto L190; + } + lldst[op] = (short) ((pv & 4095) + 4096); + ++op; + lldst[op] = (short) (pv / 4096); + ++op; + goto L191; +L190: + if (! (dv < 0)) { + goto L200; + } + lldst[op] = (short) (-dv + 12288); + goto L201; +L200: + lldst[op] = (short) (dv + 8192); +L201: + ++op; + if (! (np == 1 && nz == 0)) { + goto L210; + } + v = lldst[op - 1]; + lldst[op - 1] = (short) (v | 16384); + goto L91; +L210: +L191: +L180: +L170: + if (! (nz > 0)) { + goto L220; + } +L230: + if (! (nz > 0)) { + goto L232; + } + lldst[op] = (short) min(4095,nz); + ++op; +/* L231: */ + nz += -4095; + goto L230; +L232: + if (! (np == 1 && pv > 0)) { + goto L240; + } + lldst[op - 1] = (short) (lldst[op - 1] + 20481); + goto L91; +L240: +L220: +L250: + if (! (np > 0)) { + goto L252; + } + lldst[op] = (short) (min(4095,np) + 16384); + ++op; +/* L251: */ + np += -4095; + goto L250; +L252: +L91: + x1 = ip + 1; + iz = x1; + pv = nv; +L120: + ; + } +/* L121: */ + lldst[4] = (short) ((op - 1) % 32768); + lldst[5] = (short) ((op - 1) / 32768); + ret_val = op - 1; + goto L100; +L100: + return ret_val; +} /* plp2li_ */ + +/* + * PL_L2PI -- Translate a PLIO line list into an integer pixel array. + * The number of pixels output (always npix) is returned as the function + * value. + * + * Translated from the SPP version using xc -f, f2c. 8Sep99 DCT. + */ + +int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix) +/* short *ll_src; encoded line list */ +/* int xs; starting index in ll_src */ +/* int *px_dst; output pixel array */ +/* int npix; number of pixels to convert */ +{ + /* System generated locals */ + int ret_val, i__1, i__2; + + /* Local variables */ + static int data, sw0001, otop, i__, lllen, i1, i2, x1, x2, ip, xe, np, + op, pv, opcode, llfirt; + static int skipwd; + + /* Parameter adjustments */ + --px_dst; + --ll_src; + + /* Function Body */ + if (! (ll_src[3] > 0)) { + goto L110; + } + lllen = ll_src[3]; + llfirt = 4; + goto L111; +L110: + lllen = (ll_src[5] << 15) + ll_src[4]; + llfirt = ll_src[2] + 1; +L111: + if (! (npix <= 0 || lllen <= 0)) { + goto L120; + } + ret_val = 0; + goto L100; +L120: + xe = xs + npix - 1; + skipwd = 0; + op = 1; + x1 = 1; + pv = 1; + i__1 = lllen; + for (ip = llfirt; ip <= i__1; ++ip) { + if (! skipwd) { + goto L140; + } + skipwd = 0; + goto L130; +L140: + opcode = ll_src[ip] / 4096; + data = ll_src[ip] & 4095; + sw0001 = opcode; + goto L150; +L160: + x2 = x1 + data - 1; + i1 = max(x1,xs); + i2 = min(x2,xe); + np = i2 - i1 + 1; + if (! (np > 0)) { + goto L170; + } + otop = op + np - 1; + if (! (opcode == 4)) { + goto L180; + } + i__2 = otop; + for (i__ = op; i__ <= i__2; ++i__) { + px_dst[i__] = pv; +/* L190: */ + } +/* L191: */ + goto L181; +L180: + i__2 = otop; + for (i__ = op; i__ <= i__2; ++i__) { + px_dst[i__] = 0; +/* L200: */ + } +/* L201: */ + if (! (opcode == 5 && i2 == x2)) { + goto L210; + } + px_dst[otop] = pv; +L210: +L181: + op = otop + 1; +L170: + x1 = x2 + 1; + goto L151; +L220: + pv = (ll_src[ip + 1] << 12) + data; + skipwd = 1; + goto L151; +L230: + pv += data; + goto L151; +L240: + pv -= data; + goto L151; +L250: + pv += data; + goto L91; +L260: + pv -= data; +L91: + if (! (x1 >= xs && x1 <= xe)) { + goto L270; + } + px_dst[op] = pv; + ++op; +L270: + ++x1; + goto L151; +L150: + ++sw0001; + if (sw0001 < 1 || sw0001 > 8) { + goto L151; + } + switch ((int)sw0001) { + case 1: goto L160; + case 2: goto L220; + case 3: goto L230; + case 4: goto L240; + case 5: goto L160; + case 6: goto L160; + case 7: goto L250; + case 8: goto L260; + } +L151: + if (! (x1 > xe)) { + goto L280; + } + goto L131; +L280: +L130: + ; + } +L131: + i__1 = npix; + for (i__ = op; i__ <= i__1; ++i__) { + px_dst[i__] = 0; +/* L290: */ + } +/* L291: */ + ret_val = npix; + goto L100; +L100: + return ret_val; +} /* pll2pi_ */ + diff --git a/software/cfitsio3040/putcol.c b/software/cfitsio3040/putcol.c new file mode 100644 index 000000000..d643ce6fd --- /dev/null +++ b/software/cfitsio3040/putcol.c @@ -0,0 +1,1920 @@ +/* This file, putcol.c, contains routines that write data elements to */ +/* a FITS image or table. These are the generic routines. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppx( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *firstpix, /* I - coord of first pixel to write(1 based) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of pixels to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine is simillar to ffppr, except it supports writing to + large images with more than 2**31 pixels. +*/ +{ + int naxis, ii; + long group = 1; + LONGLONG firstelem, dimsize = 1, naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (datatype == TBYTE) + { + ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); + } + else if (datatype == TSBYTE) + { + ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); + } + else if (datatype == TUSHORT) + { + ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, + status); + } + else if (datatype == TSHORT) + { + ffppri(fptr, group, firstelem, nelem, (short *) array, status); + } + else if (datatype == TUINT) + { + ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); + } + else if (datatype == TINT) + { + ffpprk(fptr, group, firstelem, nelem, (int *) array, status); + } + else if (datatype == TULONG) + { + ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); + } + else if (datatype == TLONG) + { + ffpprj(fptr, group, firstelem, nelem, (long *) array, status); + } + else if (datatype == TLONGLONG) + { + ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); + } + else if (datatype == TFLOAT) + { + ffppre(fptr, group, firstelem, nelem, (float *) array, status); + } + else if (datatype == TDOUBLE) + { + ffpprd(fptr, group, firstelem, nelem, (double *) array, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppxll( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG *firstpix, /* I - coord of first pixel to write(1 based) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of pixels to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine is simillar to ffppr, except it supports writing to + large images with more than 2**31 pixels. +*/ +{ + int naxis, ii; + long group = 1; + LONGLONG firstelem, dimsize = 1, naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (datatype == TBYTE) + { + ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); + } + else if (datatype == TSBYTE) + { + ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); + } + else if (datatype == TUSHORT) + { + ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, + status); + } + else if (datatype == TSHORT) + { + ffppri(fptr, group, firstelem, nelem, (short *) array, status); + } + else if (datatype == TUINT) + { + ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); + } + else if (datatype == TINT) + { + ffpprk(fptr, group, firstelem, nelem, (int *) array, status); + } + else if (datatype == TULONG) + { + ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); + } + else if (datatype == TLONG) + { + ffpprj(fptr, group, firstelem, nelem, (long *) array, status); + } + else if (datatype == TLONGLONG) + { + ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); + } + else if (datatype == TFLOAT) + { + ffppre(fptr, group, firstelem, nelem, (float *) array, status); + } + else if (datatype == TDOUBLE) + { + ffpprd(fptr, group, firstelem, nelem, (double *) array, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppxn( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *firstpix, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + void *nulval, /* I - pointer to the null value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine supports writing to large images with + more than 2**31 pixels. +*/ +{ + int naxis, ii; + long group = 1; + LONGLONG firstelem, dimsize = 1, naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (nulval == NULL) /* null value not defined? */ + { + ffppx(fptr, datatype, firstpix, nelem, array, status); + return(*status); + } + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (datatype == TBYTE) + { + ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, + *(unsigned char *) nulval, status); + } + else if (datatype == TSBYTE) + { + ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, + *(signed char *) nulval, status); + } + else if (datatype == TUSHORT) + { + ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, + *(unsigned short *) nulval,status); + } + else if (datatype == TSHORT) + { + ffppni(fptr, group, firstelem, nelem, (short *) array, + *(short *) nulval, status); + } + else if (datatype == TUINT) + { + ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, + *(unsigned int *) nulval, status); + } + else if (datatype == TINT) + { + ffppnk(fptr, group, firstelem, nelem, (int *) array, + *(int *) nulval, status); + } + else if (datatype == TULONG) + { + ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, + *(unsigned long *) nulval,status); + } + else if (datatype == TLONG) + { + ffppnj(fptr, group, firstelem, nelem, (long *) array, + *(long *) nulval, status); + } + else if (datatype == TLONGLONG) + { + ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, + *(LONGLONG *) nulval, status); + } + else if (datatype == TFLOAT) + { + ffppne(fptr, group, firstelem, nelem, (float *) array, + *(float *) nulval, status); + } + else if (datatype == TDOUBLE) + { + ffppnd(fptr, group, firstelem, nelem, (double *) array, + *(double *) nulval, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppxnll( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG *firstpix, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + void *nulval, /* I - pointer to the null value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine supports writing to large images with + more than 2**31 pixels. +*/ +{ + int naxis, ii; + long group = 1; + LONGLONG firstelem, dimsize = 1, naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (nulval == NULL) /* null value not defined? */ + { + ffppxll(fptr, datatype, firstpix, nelem, array, status); + return(*status); + } + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgiszll(fptr, 9, naxes, status); + + firstelem = 0; + for (ii=0; ii < naxis; ii++) + { + firstelem += ((firstpix[ii] - 1) * dimsize); + dimsize *= naxes[ii]; + } + firstelem++; + + if (datatype == TBYTE) + { + ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, + *(unsigned char *) nulval, status); + } + else if (datatype == TSBYTE) + { + ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, + *(signed char *) nulval, status); + } + else if (datatype == TUSHORT) + { + ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, + *(unsigned short *) nulval,status); + } + else if (datatype == TSHORT) + { + ffppni(fptr, group, firstelem, nelem, (short *) array, + *(short *) nulval, status); + } + else if (datatype == TUINT) + { + ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, + *(unsigned int *) nulval, status); + } + else if (datatype == TINT) + { + ffppnk(fptr, group, firstelem, nelem, (int *) array, + *(int *) nulval, status); + } + else if (datatype == TULONG) + { + ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, + *(unsigned long *) nulval,status); + } + else if (datatype == TLONG) + { + ffppnj(fptr, group, firstelem, nelem, (long *) array, + *(long *) nulval, status); + } + else if (datatype == TLONGLONG) + { + ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, + *(LONGLONG *) nulval, status); + } + else if (datatype == TFLOAT) + { + ffppne(fptr, group, firstelem, nelem, (float *) array, + *(float *) nulval, status); + } + else if (datatype == TDOUBLE) + { + ffppnd(fptr, group, firstelem, nelem, (double *) array, + *(double *) nulval, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppr( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + +*/ +{ + long group = 1; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TBYTE) + { + ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); + } + else if (datatype == TSBYTE) + { + ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); + } + else if (datatype == TUSHORT) + { + ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, + status); + } + else if (datatype == TSHORT) + { + ffppri(fptr, group, firstelem, nelem, (short *) array, status); + } + else if (datatype == TUINT) + { + ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); + } + else if (datatype == TINT) + { + ffpprk(fptr, group, firstelem, nelem, (int *) array, status); + } + else if (datatype == TULONG) + { + ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); + } + else if (datatype == TLONG) + { + ffpprj(fptr, group, firstelem, nelem, (long *) array, status); + } + else if (datatype == TLONGLONG) + { + ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); + } + else if (datatype == TFLOAT) + { + ffppre(fptr, group, firstelem, nelem, (float *) array, status); + } + else if (datatype == TDOUBLE) + { + ffpprd(fptr, group, firstelem, nelem, (double *) array, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppn( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + void *array, /* I - array of values that are written */ + void *nulval, /* I - pointer to the null value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + +*/ +{ + long group = 1; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (nulval == NULL) /* null value not defined? */ + { + ffppr(fptr, datatype, firstelem, nelem, array, status); + return(*status); + } + + if (datatype == TBYTE) + { + ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, + *(unsigned char *) nulval, status); + } + else if (datatype == TSBYTE) + { + ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, + *(signed char *) nulval, status); + } + else if (datatype == TUSHORT) + { + ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, + *(unsigned short *) nulval,status); + } + else if (datatype == TSHORT) + { + ffppni(fptr, group, firstelem, nelem, (short *) array, + *(short *) nulval, status); + } + else if (datatype == TUINT) + { + ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, + *(unsigned int *) nulval, status); + } + else if (datatype == TINT) + { + ffppnk(fptr, group, firstelem, nelem, (int *) array, + *(int *) nulval, status); + } + else if (datatype == TULONG) + { + ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, + *(unsigned long *) nulval,status); + } + else if (datatype == TLONG) + { + ffppnj(fptr, group, firstelem, nelem, (long *) array, + *(long *) nulval, status); + } + else if (datatype == TLONGLONG) + { + ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, + *(LONGLONG *) nulval, status); + } + else if (datatype == TFLOAT) + { + ffppne(fptr, group, firstelem, nelem, (float *) array, + *(float *) nulval, status); + } + else if (datatype == TDOUBLE) + { + ffppnd(fptr, group, firstelem, nelem, (double *) array, + *(double *) nulval, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpss( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + long *blc, /* I - 'bottom left corner' of the subsection */ + long *trc , /* I - 'top right corner' of the subsection */ + void *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write a section of values to the primary array. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine supports writing to large images with + more than 2**31 pixels. +*/ +{ + int naxis; + long naxes[9]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* get the size of the image */ + ffgidm(fptr, &naxis, status); + ffgisz(fptr, 9, naxes, status); + + if (datatype == TBYTE) + { + ffpssb(fptr, 1, naxis, naxes, blc, trc, + (unsigned char *) array, status); + } + else if (datatype == TSBYTE) + { + ffpsssb(fptr, 1, naxis, naxes, blc, trc, + (signed char *) array, status); + } + else if (datatype == TUSHORT) + { + ffpssui(fptr, 1, naxis, naxes, blc, trc, + (unsigned short *) array, status); + } + else if (datatype == TSHORT) + { + ffpssi(fptr, 1, naxis, naxes, blc, trc, + (short *) array, status); + } + else if (datatype == TUINT) + { + ffpssuk(fptr, 1, naxis, naxes, blc, trc, + (unsigned int *) array, status); + } + else if (datatype == TINT) + { + ffpssk(fptr, 1, naxis, naxes, blc, trc, + (int *) array, status); + } + else if (datatype == TULONG) + { + ffpssuj(fptr, 1, naxis, naxes, blc, trc, + (unsigned long *) array, status); + } + else if (datatype == TLONG) + { + ffpssj(fptr, 1, naxis, naxes, blc, trc, + (long *) array, status); + } + else if (datatype == TLONGLONG) + { + ffpssjj(fptr, 1, naxis, naxes, blc, trc, + (LONGLONG *) array, status); + } else if (datatype == TFLOAT) + { + ffpsse(fptr, 1, naxis, naxes, blc, trc, + (float *) array, status); + } + else if (datatype == TDOUBLE) + { + ffpssd(fptr, 1, naxis, naxes, blc, trc, + (double *) array, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcl( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of elements to write */ + void *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to a table column. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS column is not the same as the array being written). + +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TBIT) + { + ffpclx(fptr, colnum, firstrow, (long) firstelem, (long) nelem, (char *) array, + status); + } + else if (datatype == TBYTE) + { + ffpclb(fptr, colnum, firstrow, firstelem, nelem, (unsigned char *) array, + status); + } + else if (datatype == TSBYTE) + { + ffpclsb(fptr, colnum, firstrow, firstelem, nelem, (signed char *) array, + status); + } + else if (datatype == TUSHORT) + { + ffpclui(fptr, colnum, firstrow, firstelem, nelem, + (unsigned short *) array, status); + } + else if (datatype == TSHORT) + { + ffpcli(fptr, colnum, firstrow, firstelem, nelem, (short *) array, + status); + } + else if (datatype == TUINT) + { + ffpcluk(fptr, colnum, firstrow, firstelem, nelem, (unsigned int *) array, + status); + } + else if (datatype == TINT) + { + ffpclk(fptr, colnum, firstrow, firstelem, nelem, (int *) array, + status); + } + else if (datatype == TULONG) + { + ffpcluj(fptr, colnum, firstrow, firstelem, nelem, (unsigned long *) array, + status); + } + else if (datatype == TLONG) + { + ffpclj(fptr, colnum, firstrow, firstelem, nelem, (long *) array, + status); + } + else if (datatype == TLONGLONG) + { + ffpcljj(fptr, colnum, firstrow, firstelem, nelem, (LONGLONG *) array, + status); + } + else if (datatype == TFLOAT) + { + ffpcle(fptr, colnum, firstrow, firstelem, nelem, (float *) array, + status); + } + else if (datatype == TDOUBLE) + { + ffpcld(fptr, colnum, firstrow, firstelem, nelem, (double *) array, + status); + } + else if (datatype == TCOMPLEX) + { + ffpcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + (float *) array, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffpcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + (double *) array, status); + } + else if (datatype == TLOGICAL) + { + ffpcll(fptr, colnum, firstrow, firstelem, nelem, (char *) array, + status); + } + else if (datatype == TSTRING) + { + ffpcls(fptr, colnum, firstrow, firstelem, nelem, (char **) array, + status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcn( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of elements to write */ + void *array, /* I - array of values that are written */ + void *nulval, /* I - pointer to the null value */ + int *status) /* IO - error status */ +/* + Write an array of values to a table column. The datatype of the + input array is defined by the 2nd argument. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS column is not the same as the array being written). + +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (nulval == NULL) /* null value not defined? */ + { + ffpcl(fptr, datatype, colnum, firstrow, firstelem, nelem, array, + status); + return(*status); + } + + if (datatype == TBYTE) + { + ffpcnb(fptr, colnum, firstrow, firstelem, nelem, (unsigned char *) array, + *(unsigned char *) nulval, status); + } + else if (datatype == TSBYTE) + { + ffpcnsb(fptr, colnum, firstrow, firstelem, nelem, (signed char *) array, + *(signed char *) nulval, status); + } + else if (datatype == TUSHORT) + { + ffpcnui(fptr, colnum, firstrow, firstelem, nelem, (unsigned short *) array, + *(unsigned short *) nulval, status); + } + else if (datatype == TSHORT) + { + ffpcni(fptr, colnum, firstrow, firstelem, nelem, (short *) array, + *(unsigned short *) nulval, status); + } + else if (datatype == TUINT) + { + ffpcnuk(fptr, colnum, firstrow, firstelem, nelem, (unsigned int *) array, + *(unsigned int *) nulval, status); + } + else if (datatype == TINT) + { + ffpcnk(fptr, colnum, firstrow, firstelem, nelem, (int *) array, + *(int *) nulval, status); + } + else if (datatype == TULONG) + { + ffpcnuj(fptr, colnum, firstrow, firstelem, nelem, (unsigned long *) array, + *(unsigned long *) nulval, status); + } + else if (datatype == TLONG) + { + ffpcnj(fptr, colnum, firstrow, firstelem, nelem, (long *) array, + *(long *) nulval, status); + } + else if (datatype == TLONGLONG) + { + ffpcnjj(fptr, colnum, firstrow, firstelem, nelem, (LONGLONG *) array, + *(LONGLONG *) nulval, status); + } + else if (datatype == TFLOAT) + { + ffpcne(fptr, colnum, firstrow, firstelem, nelem, (float *) array, + *(float *) nulval, status); + } + else if (datatype == TDOUBLE) + { + ffpcnd(fptr, colnum, firstrow, firstelem, nelem, (double *) array, + *(double *) nulval, status); + } + else if (datatype == TCOMPLEX) + { + ffpcne(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + (float *) array, *(float *) nulval, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffpcnd(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, + (double *) array, *(double *) nulval, status); + } + else if (datatype == TLOGICAL) + { + ffpcnl(fptr, colnum, firstrow, firstelem, nelem, (char *) array, + *(char *) nulval, status); + } + else if (datatype == TSTRING) + { + ffpcns(fptr, colnum, firstrow, firstelem, nelem, (char **) array, + (char *) nulval, status); + } + else + *status = BAD_DATATYPE; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_by_name(iteratorCol *col, /* I - iterator col structure */ + fitsfile *fptr, /* I - FITS file pointer */ + char *colname, /* I - column name */ + int datatype, /* I - column datatype */ + int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ +/* + set all the parameters for an iterator column, by column name +*/ +{ + col->fptr = fptr; + strcpy(col->colname, colname); + col->colnum = 0; /* set column number undefined since name is given */ + col->datatype = datatype; + col->iotype = iotype; + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_by_num(iteratorCol *col, /* I - iterator column structure */ + fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int datatype, /* I - column datatype */ + int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ +/* + set all the parameters for an iterator column, by column number +*/ +{ + col->fptr = fptr; + col->colnum = colnum; + col->datatype = datatype; + col->iotype = iotype; + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_file(iteratorCol *col, /* I - iterator column structure */ + fitsfile *fptr) /* I - FITS file pointer */ +/* + set iterator column parameter +*/ +{ + col->fptr = fptr; + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_colname(iteratorCol *col, /* I - iterator col structure */ + char *colname) /* I - column name */ +/* + set iterator column parameter +*/ +{ + strcpy(col->colname, colname); + col->colnum = 0; /* set column number undefined since name is given */ + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_colnum(iteratorCol *col, /* I - iterator column structure */ + int colnum) /* I - column number */ +/* + set iterator column parameter +*/ +{ + col->colnum = colnum; + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_datatype(iteratorCol *col, /* I - iterator col structure */ + int datatype) /* I - column datatype */ +/* + set iterator column parameter +*/ +{ + col->datatype = datatype; + return(0); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_set_iotype(iteratorCol *col, /* I - iterator column structure */ + int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ +/* + set iterator column parameter +*/ +{ + col->iotype = iotype; + return(0); +} +/*--------------------------------------------------------------------------*/ +fitsfile * fits_iter_get_file(iteratorCol *col) /* I -iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->fptr); +} +/*--------------------------------------------------------------------------*/ +char * fits_iter_get_colname(iteratorCol *col) /* I -iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->colname); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_get_colnum(iteratorCol *col) /* I - iterator column structure */ +/* + get iterator column parameter +*/ +{ + return(col->colnum); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_get_datatype(iteratorCol *col) /* I - iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->datatype); +} +/*--------------------------------------------------------------------------*/ +int fits_iter_get_iotype(iteratorCol *col) /* I - iterator column structure */ +/* + get iterator column parameter +*/ +{ + return(col->iotype); +} +/*--------------------------------------------------------------------------*/ +void * fits_iter_get_array(iteratorCol *col) /* I - iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->array); +} +/*--------------------------------------------------------------------------*/ +long fits_iter_get_tlmin(iteratorCol *col) /* I - iterator column structure */ +/* + get iterator column parameter +*/ +{ + return(col->tlmin); +} +/*--------------------------------------------------------------------------*/ +long fits_iter_get_tlmax(iteratorCol *col) /* I - iterator column structure */ +/* + get iterator column parameter +*/ +{ + return(col->tlmax); +} +/*--------------------------------------------------------------------------*/ +long fits_iter_get_repeat(iteratorCol *col) /* I - iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->repeat); +} +/*--------------------------------------------------------------------------*/ +char * fits_iter_get_tunit(iteratorCol *col) /* I - iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->tunit); +} +/*--------------------------------------------------------------------------*/ +char * fits_iter_get_tdisp(iteratorCol *col) /* I -iterator col structure */ +/* + get iterator column parameter +*/ +{ + return(col->tdisp); +} +/*--------------------------------------------------------------------------*/ +int ffiter(int n_cols, + iteratorCol *cols, + long offset, + long n_per_loop, + int (*work_fn)(long total_n, + long offset, + long first_n, + long n_values, + int n_cols, + iteratorCol *cols, + void *userPointer), + void *userPointer, + int *status) +/* + The iterator function. This function will pass the specified + columns from a FITS table or pixels from a FITS image to the + user-supplied function. Depending on the size of the table + or image, only a subset of the rows or pixels may be passed to the + function on each call, in which case the function will be called + multiple times until all the rows or pixels have been processed. +*/ +{ + typedef struct /* structure to store the column null value */ + { + int nullsize; /* length of the null value, in bytes */ + union { /* default null value for the column */ + char *stringnull; + unsigned char charnull; + signed char scharnull; + int intnull; + short shortnull; + long longnull; + unsigned int uintnull; + unsigned short ushortnull; + unsigned long ulongnull; + float floatnull; + double doublenull; + LONGLONG longlongnull; + } null; + } colNulls; + + void *dataptr, *defaultnull; + colNulls *col; + int ii, jj, tstatus, naxis, bitpix; + int typecode, hdutype, jtype, type, anynul, nfiles, nbytes; + long totaln, nleft, frow, felement, n_optimum, i_optimum, ntodo; + long rept, rowrept, width, tnull, naxes[9] = {1,1,1,1,1,1,1,1,1}, groups; + double zeros = 0.; + char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], nullstr[FLEN_VALUE]; + char **stringptr, *nullptr, *cptr; + + if (*status > 0) + return(*status); + + if (n_cols < 0 || n_cols > 999 ) + { + ffpmsg("Illegal number of columms (ffiter)"); + return(*status = BAD_COL_NUM); /* negative number of columns */ + } + + col = calloc(n_cols, sizeof(colNulls) ); /* memory for the null values */ + + /*------------------------------------------------------------*/ + /* Make sure column numbers and datatypes are in legal range */ + /* and column numbers and datatypes are legal. */ + /* Also fill in other parameters in the column structure. */ + /*------------------------------------------------------------*/ + + ffghdt(cols[0].fptr, &hdutype, status); /* type of first HDU */ + + for (jj = 0; jj < n_cols; jj++) + { + /* check that output datatype code value is legal */ + type = cols[jj].datatype; + + /* Allow variable length arrays for InputCol and InputOutputCol columns, + but not for OutputCol columns. Variable length arrays have a + negative type code value. */ + + if ((cols[jj].iotype != OutputCol) && (type<0)) { + type*=-1; + } + + if (type != 0 && type != TBYTE && + type != TSBYTE && type != TLOGICAL && type != TSTRING && + type != TSHORT && type != TINT && type != TLONG && + type != TFLOAT && type != TDOUBLE && type != TCOMPLEX && + type != TULONG && type != TUSHORT && type != TDBLCOMPLEX && + type != TLONGLONG ) + { + if (type < 0) { + sprintf(message, + "Variable length array not allowed for output column number %d (ffiter)", + jj + 1); + } else { + sprintf(message, + "Illegal datatype for column number %d: %d (ffiter)", + jj + 1, cols[jj].datatype); + } + + ffpmsg(message); + return(*status = BAD_DATATYPE); + } + + /* initialize TLMINn, TLMAXn, column name, and display format */ + cols[jj].tlmin = 0; + cols[jj].tlmax = 0; + cols[jj].tunit[0] = '\0'; + cols[jj].tdisp[0] = '\0'; + + ffghdt(cols[jj].fptr, &jtype, status); /* get HDU type */ + + if (hdutype == IMAGE_HDU) + { + if (jtype != IMAGE_HDU) + { + sprintf(message, + "File %d not positioned to an image extension (ffiter)", + jj + 1); + return(*status = NOT_IMAGE); + } + + /* since this is an image, set a dummy column number = 0 */ + cols[jj].colnum = 0; + strcpy(cols[jj].colname, "IMAGE"); /* dummy name for images */ + + tstatus = 0; + ffgkys(cols[jj].fptr, "BUNIT", cols[jj].tunit, 0, &tstatus); + } + else + { + if (jtype == IMAGE_HDU) + { + sprintf(message, + "File %d not positioned to a table extension (ffiter)", + jj + 1); + return(*status = NOT_TABLE); + } + + if (cols[jj].colnum < 1) + { + /* find the column number for the named column */ + if (ffgcno(cols[jj].fptr, CASEINSEN, cols[jj].colname, + &cols[jj].colnum, status) ) + { + sprintf(message, + "Column '%s' not found for column number %d (ffiter)", + cols[jj].colname, jj + 1); + ffpmsg(message); + return(*status); + } + } + + if (cols[jj].colnum < 1 || + cols[jj].colnum > ((cols[jj].fptr)->Fptr)->tfield) + { + sprintf(message, + "Column %d has illegal table position number: %d (ffiter)", + jj + 1, cols[jj].colnum); + ffpmsg(message); + return(*status = BAD_COL_NUM); + } + + /* look for column description keywords and update structure */ + tstatus = 0; + ffkeyn("TLMIN", cols[jj].colnum, keyname, &tstatus); + ffgkyj(cols[jj].fptr, keyname, &cols[jj].tlmin, 0, &tstatus); + + tstatus = 0; + ffkeyn("TLMAX", cols[jj].colnum, keyname, &tstatus); + ffgkyj(cols[jj].fptr, keyname, &cols[jj].tlmax, 0, &tstatus); + + tstatus = 0; + ffkeyn("TTYPE", cols[jj].colnum, keyname, &tstatus); + ffgkys(cols[jj].fptr, keyname, cols[jj].colname, 0, &tstatus); + if (tstatus) + cols[jj].colname[0] = '\0'; + + tstatus = 0; + ffkeyn("TUNIT", cols[jj].colnum, keyname, &tstatus); + ffgkys(cols[jj].fptr, keyname, cols[jj].tunit, 0, &tstatus); + + tstatus = 0; + ffkeyn("TDISP", cols[jj].colnum, keyname, &tstatus); + ffgkys(cols[jj].fptr, keyname, cols[jj].tdisp, 0, &tstatus); + } + } + + /*-----------------------------------------------------------------*/ + /* use the first file to set the total number of values to process */ + /*-----------------------------------------------------------------*/ + + offset = maxvalue(offset, 0L); /* make sure offset is legal */ + + if (hdutype == IMAGE_HDU) /* get total number of pixels in the image */ + { + fits_get_img_dim(cols[0].fptr, &naxis, status); + fits_get_img_size(cols[0].fptr, 9, naxes, status); + + tstatus = 0; + ffgkyj(cols[0].fptr, "GROUPS", &groups, NULL, &tstatus); + if (!tstatus && groups && (naxis > 1) && (naxes[0] == 0) ) + { + /* this is a random groups file, with NAXIS1 = 0 */ + /* Use GCOUNT, the number of groups, as the first multiplier */ + /* to calculate the total number of pixels in all the groups. */ + ffgkyj(cols[0].fptr, "GCOUNT", &totaln, NULL, status); + + } else { + totaln = naxes[0]; + } + + for (ii = 1; ii < naxis; ii++) + totaln *= naxes[ii]; + + frow = 1; + felement = 1 + offset; + } + else /* get total number or rows in the table */ + { + ffgkyj(cols[0].fptr, "NAXIS2", &totaln, 0, status); + frow = 1 + offset; + felement = 1; + } + + /* adjust total by the input starting offset value */ + totaln -= offset; + totaln = maxvalue(totaln, 0L); /* don't allow negative number */ + + /*------------------------------------------------------------------*/ + /* Determine number of values to pass to work function on each loop */ + /*------------------------------------------------------------------*/ + + if (n_per_loop == 0) + { + /* Determine optimum number of values for each iteration. */ + /* Look at all the fitsfile pointers to determine the number */ + /* of unique files. */ + + nfiles = 1; + ffgrsz(cols[0].fptr, &n_optimum, status); + + for (jj = 1; jj < n_cols; jj++) + { + for (ii = 0; ii < jj; ii++) + { + if (cols[ii].fptr == cols[jj].fptr) + break; + } + + if (ii == jj) /* this is a new file */ + { + nfiles++; + ffgrsz(cols[jj].fptr, &i_optimum, status); + n_optimum = minvalue(n_optimum, i_optimum); + } + } + + n_optimum = n_optimum / nfiles; + n_optimum = maxvalue(n_optimum, 1); + } + else if (n_per_loop < 0) /* must pass all the values at one time */ + { + n_optimum = totaln; + } + else /* calling routine specified how many values to pass at a time */ + { + n_optimum = minvalue(n_per_loop, totaln); + } + + /*--------------------------------------*/ + /* allocate work arrays for each column */ + /* and determine the null pixel value */ + /*--------------------------------------*/ + + for (jj = 0; jj < n_cols; jj++) + { + /* get image or column datatype and vector length */ + if (hdutype == IMAGE_HDU) /* get total number of pixels in the image */ + { + fits_get_img_type(cols[jj].fptr, &bitpix, status); + switch(bitpix) { + case BYTE_IMG: + typecode = TBYTE; + break; + case SHORT_IMG: + typecode = TSHORT; + break; + case LONG_IMG: + typecode = TLONG; + break; + case FLOAT_IMG: + typecode = TFLOAT; + break; + case DOUBLE_IMG: + typecode = TDOUBLE; + break; + case LONGLONG_IMG: + typecode = TLONGLONG; + break; + } + } + else + { + if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept, + &width, status) > 0) + goto cleanup; + + if (typecode < 0) { /* if any variable length arrays, then the */ + n_optimum = 1; /* must process the table 1 row at a time */ + + /* Allow variable length arrays for InputCol and InputOutputCol columns, + but not for OutputCol columns. Variable length arrays have a + negative type code value. */ + + if (cols[jj].iotype == OutputCol) { + sprintf(message, + "Variable length array not allowed for output column number %d (ffiter)", + jj + 1); + ffpmsg(message); + return(*status = BAD_DATATYPE); + } + } + } + + /* special case where sizeof(long) = 8: use TINT instead of TLONG */ + if (abs(typecode) == TLONG && sizeof(long) == 8 && sizeof(int) == 4) { + if(typecode<0) { + typecode = -TINT; + } else { + typecode = TINT; + } + } + + /* Special case: interprete 'X' column as 'B' */ + if (abs(typecode) == TBIT) + { + typecode = typecode / TBIT * TBYTE; + rept = (rept + 7) / 8; + } + + if (cols[jj].datatype == 0) /* output datatype not specified? */ + { + /* special case if sizeof(long) = 8: use TINT instead of TLONG */ + if (abs(typecode) == TLONG && sizeof(long) == 8 && sizeof(int) == 4) + cols[jj].datatype = TINT; + else + cols[jj].datatype = abs(typecode); + } + + /* calc total number of elements to do on each iteration */ + if (hdutype == IMAGE_HDU || cols[jj].datatype == TSTRING) + { + ntodo = n_optimum; + cols[jj].repeat = 1; + + /* get the BLANK keyword value, if it exists */ + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tstatus = 0; + ffgkyj(cols[jj].fptr, "BLANK", &tnull, 0, &tstatus); + if (tstatus) + { + tnull = 0L; /* no null values */ + } + } + } + else + { + if (typecode < 0) + { + /* get max size of the variable length vector; dont't trust the value + given by the TFORM keyword */ + rept = 1; + for (ii = 0; ii < totaln; ii++) { + ffgdes(cols[jj].fptr, cols[jj].colnum, frow + ii, &rowrept, NULL, status); + + rept = maxvalue(rept, rowrept); + } + } + + ntodo = n_optimum * rept; /* vector columns */ + cols[jj].repeat = rept; + + /* get the TNULL keyword value, if it exists */ + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tstatus = 0; + if (hdutype == ASCII_TBL) /* TNULLn value is a string */ + { + ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); + ffgkys(cols[jj].fptr, keyname, nullstr, 0, &tstatus); + if (tstatus) + { + tnull = 0L; /* keyword doesn't exist; no null values */ + } + else + { + cptr = nullstr; + while (*cptr == ' ') /* skip over leading blanks */ + cptr++; + + if (*cptr == '\0') /* TNULLn is all blanks? */ + tnull = LONG_MIN; + else + { + /* attempt to read TNULLn string as an integer */ + ffc2ii(nullstr, &tnull, &tstatus); + + if (tstatus) + tnull = LONG_MIN; /* choose smallest value */ + } /* to represent nulls */ + } + } + else /* Binary table; TNULLn value is an integer */ + { + ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); + ffgkyj(cols[jj].fptr, keyname, &tnull, 0, &tstatus); + if (tstatus) + { + tnull = 0L; /* keyword doesn't exist; no null values */ + } + else if (tnull == 0) + { + /* worst possible case: a value of 0 is used to */ + /* represent nulls in the FITS file. We have to */ + /* use a non-zero null value here (zero is used to */ + /* mean there are no null values in the array) so we */ + /* will use the smallest possible integer instead. */ + + tnull = LONG_MIN; /* choose smallest possible value */ + } + } + } + } + + /* Note that the data array starts with 2nd element; */ + /* 1st element of the array gives the null data value */ + + switch (cols[jj].datatype) + { + case TBYTE: + cols[jj].array = calloc(ntodo + 1, sizeof(char)); + col[jj].nullsize = sizeof(char); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, 255); + tnull = maxvalue(tnull, 0); + col[jj].null.charnull = (unsigned char) tnull; + } + else + { + col[jj].null.charnull = (unsigned char) 255; /* use 255 as null */ + } + break; + + case TSBYTE: + cols[jj].array = calloc(ntodo + 1, sizeof(char)); + col[jj].nullsize = sizeof(char); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, 127); + tnull = maxvalue(tnull, -128); + col[jj].null.scharnull = (signed char) tnull; + } + else + { + col[jj].null.scharnull = (signed char) -128; /* use -128 null */ + } + break; + + case TSHORT: + cols[jj].array = calloc(ntodo + 1, sizeof(short)); + col[jj].nullsize = sizeof(short); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, SHRT_MAX); + tnull = maxvalue(tnull, SHRT_MIN); + col[jj].null.shortnull = (short) tnull; + } + else + { + col[jj].null.shortnull = SHRT_MIN; /* use minimum as null */ + } + break; + + case TUSHORT: + cols[jj].array = calloc(ntodo + 1, sizeof(unsigned short)); + col[jj].nullsize = sizeof(unsigned short); /* bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, USHRT_MAX); + tnull = maxvalue(tnull, 0); /* don't allow negative value */ + col[jj].null.ushortnull = (unsigned short) tnull; + } + else + { + col[jj].null.ushortnull = USHRT_MAX; /* use maximum null */ + } + break; + + case TINT: + cols[jj].array = calloc(sizeof(int), ntodo + 1); + col[jj].nullsize = sizeof(int); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, INT_MAX); + tnull = maxvalue(tnull, INT_MIN); + col[jj].null.intnull = (int) tnull; + } + else + { + col[jj].null.intnull = INT_MIN; /* use minimum as null */ + } + break; + + case TUINT: + cols[jj].array = calloc(ntodo + 1, sizeof(unsigned int)); + col[jj].nullsize = sizeof(unsigned int); /* bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + tnull = minvalue(tnull, INT32_MAX); + tnull = maxvalue(tnull, 0); + col[jj].null.uintnull = (unsigned int) tnull; + } + else + { + col[jj].null.intnull = UINT_MAX; /* use maximum as null */ + } + break; + + case TLONG: + cols[jj].array = calloc(ntodo + 1, sizeof(long)); + col[jj].nullsize = sizeof(long); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + col[jj].null.longnull = tnull; + } + else + { + col[jj].null.longnull = LONG_MIN; /* use minimum as null */ + } + break; + + case TULONG: + cols[jj].array = calloc(ntodo + 1, sizeof(unsigned long)); + col[jj].nullsize = sizeof(unsigned long); /* bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + if (tnull < 0) /* can't use a negative null value */ + col[jj].null.ulongnull = LONG_MAX; + else + col[jj].null.ulongnull = (unsigned long) tnull; + } + else + { + col[jj].null.ulongnull = LONG_MAX; /* use maximum as null */ + } + break; + + case TFLOAT: + cols[jj].array = calloc(ntodo + 1, sizeof(float)); + col[jj].nullsize = sizeof(float); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + col[jj].null.floatnull = (float) tnull; + } + else + { + col[jj].null.floatnull = FLOATNULLVALUE; /* special value */ + } + break; + + case TCOMPLEX: + cols[jj].array = calloc((ntodo * 2) + 1, sizeof(float)); + col[jj].nullsize = sizeof(float); /* number of bytes per value */ + col[jj].null.floatnull = FLOATNULLVALUE; /* special value */ + break; + + case TDOUBLE: + cols[jj].array = calloc(ntodo + 1, sizeof(double)); + col[jj].nullsize = sizeof(double); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) + { + col[jj].null.doublenull = (double) tnull; + } + else + { + col[jj].null.doublenull = DOUBLENULLVALUE; /* special value */ + } + break; + + case TDBLCOMPLEX: + cols[jj].array = calloc((ntodo * 2) + 1, sizeof(double)); + col[jj].nullsize = sizeof(double); /* number of bytes per value */ + col[jj].null.doublenull = DOUBLENULLVALUE; /* special value */ + break; + + case TSTRING: + /* allocate array of pointers to all the strings */ + if( hdutype==ASCII_TBL ) rept = width; + stringptr = calloc((ntodo + 1) , sizeof(stringptr)); + cols[jj].array = stringptr; + col[jj].nullsize = rept + 1; /* number of bytes per value */ + + if (stringptr) + { + /* allocate string to store the null string value */ + col[jj].null.stringnull = calloc(rept + 1, sizeof(char) ); + col[jj].null.stringnull[1] = 1; /* to make sure string != 0 */ + + /* allocate big block for the array of table column strings */ + stringptr[0] = calloc((ntodo + 1) * (rept + 1), sizeof(char) ); + + if (stringptr[0]) + { + for (ii = 1; ii <= ntodo; ii++) + { /* pointer to each string */ + stringptr[ii] = stringptr[ii - 1] + (rept + 1); + } + + /* get the TNULL keyword value, if it exists */ + tstatus = 0; + ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); + ffgkys(cols[jj].fptr, keyname, nullstr, 0, &tstatus); + if (!tstatus) + strncat(col[jj].null.stringnull, nullstr, rept); + } + else + { + ffpmsg("ffiter failed to allocate memory arrays"); + *status = MEMORY_ALLOCATION; /* memory allocation failed */ + goto cleanup; + } + } + break; + + case TLOGICAL: + + cols[jj].array = calloc(ntodo + 1, sizeof(char)); + col[jj].nullsize = sizeof(char); /* number of bytes per value */ + + /* use value = 2 to flag null values in logical columns */ + col[jj].null.charnull = 2; + break; + + case TLONGLONG: + cols[jj].array = calloc(ntodo + 1, sizeof(LONGLONG)); + col[jj].nullsize = sizeof(LONGLONG); /* number of bytes per value */ + + if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG || + abs(typecode) == TLONGLONG) + { + col[jj].null.longlongnull = tnull; + } + else + { + col[jj].null.longlongnull = LONGLONG_MIN; /* use minimum as null */ + } + break; + + default: + sprintf(message, + "Column %d datatype currently not supported: %d: (ffiter)", + jj + 1, cols[jj].datatype); + ffpmsg(message); + *status = BAD_DATATYPE; + goto cleanup; + + } /* end of switch block */ + + /* check that all the arrays were allocated successfully */ + if (!cols[jj].array) + { + ffpmsg("ffiter failed to allocate memory arrays"); + *status = MEMORY_ALLOCATION; /* memory allocation failed */ + goto cleanup; + } + } + + /*--------------------------------------------------*/ + /* main loop while there are values left to process */ + /*--------------------------------------------------*/ + + nleft = totaln; + + while (nleft) + { + ntodo = minvalue(nleft, n_optimum); /* no. of values for this loop */ + + /* read input columns from FITS file(s) */ + for (jj = 0; jj < n_cols; jj++) + { + if (cols[jj].iotype != OutputCol) + { + if (cols[jj].datatype == TSTRING) + { + stringptr = cols[jj].array; + dataptr = stringptr + 1; + defaultnull = col[jj].null.stringnull; /* ptr to the null value */ + } + else + { + dataptr = (char *) cols[jj].array + col[jj].nullsize; + defaultnull = &col[jj].null.charnull; /* ptr to the null value */ + } + + if (hdutype == IMAGE_HDU) + { + if (ffgpv(cols[jj].fptr, cols[jj].datatype, + felement, cols[jj].repeat * ntodo, defaultnull, + dataptr, &anynul, status) > 0) + { + break; + } + } + else + { + if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) + goto cleanup; + + if (typecode<0) + { + /* get size of the variable length vector */ + ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); + } + + if (ffgcv(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, + frow, felement, cols[jj].repeat * ntodo, defaultnull, + dataptr, &anynul, status) > 0) + { + break; + } + } + + /* copy the appropriate null value into first array element */ + + if (anynul) /* are there any nulls in the data? */ + { + if (cols[jj].datatype == TSTRING) + { + stringptr = cols[jj].array; + memcpy(*stringptr, col[jj].null.stringnull, col[jj].nullsize); + } + else + { + memcpy(cols[jj].array, defaultnull, col[jj].nullsize); + } + } + else /* no null values so copy zero into first element */ + { + if (cols[jj].datatype == TSTRING) + { + stringptr = cols[jj].array; + memset(*stringptr, 0, col[jj].nullsize); + } + else + { + memset(cols[jj].array, 0, col[jj].nullsize); + } + } + } + } + + if (*status > 0) + break; /* looks like an error occurred; quit immediately */ + + /* call work function */ + + if (hdutype == IMAGE_HDU) + *status = work_fn(totaln, offset, felement, ntodo, n_cols, cols, + userPointer); + else + *status = work_fn(totaln, offset, frow, ntodo, n_cols, cols, + userPointer); + + if (*status > 0 || *status < -1 ) + break; /* looks like an error occurred; quit immediately */ + + /* write output columns before quiting if status = -1 */ + tstatus = 0; + for (jj = 0; jj < n_cols; jj++) + { + if (cols[jj].iotype != InputCol) + { + if (cols[jj].datatype == TSTRING) + { + stringptr = cols[jj].array; + dataptr = stringptr + 1; + nullptr = *stringptr; + nbytes = 2; + } + else + { + dataptr = (char *) cols[jj].array + col[jj].nullsize; + nullptr = (char *) cols[jj].array; + nbytes = col[jj].nullsize; + } + + if (memcmp(nullptr, &zeros, nbytes) ) + { + /* null value flag not zero; must check for and write nulls */ + if (hdutype == IMAGE_HDU) + { + if (ffppn(cols[jj].fptr, cols[jj].datatype, + felement, cols[jj].repeat * ntodo, dataptr, + nullptr, &tstatus) > 0) + break; + } + else + { + if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) + goto cleanup; + + if (typecode<0) /* variable length array colum */ + { + ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); + } + + if (ffpcn(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow, + felement, cols[jj].repeat * ntodo, dataptr, + nullptr, &tstatus) > 0) + break; + } + } + else + { + /* no null values; just write the array */ + if (hdutype == IMAGE_HDU) + { + if (ffppr(cols[jj].fptr, cols[jj].datatype, + felement, cols[jj].repeat * ntodo, dataptr, + &tstatus) > 0) + break; + } + else + { + if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) + goto cleanup; + + if (typecode<0) /* variable length array column */ + { + ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); + } + + if (ffpcl(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow, + felement, cols[jj].repeat * ntodo, dataptr, + &tstatus) > 0) + break; + } + } + } + } + + if (*status == 0) + *status = tstatus; /* propagate any error status from the writes */ + + if (*status) + break; /* exit on any error */ + + nleft -= ntodo; + + if (hdutype == IMAGE_HDU) + felement += ntodo; + else + frow += ntodo; + } + +cleanup: + + /*----------------------------------*/ + /* free work arrays for the columns */ + /*----------------------------------*/ + + for (jj = 0; jj < n_cols; jj++) + { + if (cols[jj].datatype == TSTRING) + { + if (cols[jj].array) + { + stringptr = cols[jj].array; + free(*stringptr); /* free the block of strings */ + free(col[jj].null.stringnull); /* free the null string */ + } + } + free(cols[jj].array); /* memory for the array of values from the col */ + } + free(col); /* the structure containing the null values */ + return(*status); +} + diff --git a/software/cfitsio3040/putcolb.c b/software/cfitsio3040/putcolb.c new file mode 100644 index 000000000..0d87164b4 --- /dev/null +++ b/software/cfitsio3040/putcolb.c @@ -0,0 +1,1005 @@ +/* This file, putcolb.c, contains routines that write data elements to */ +/* a FITS image or table with char (byte) datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned char *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + unsigned char nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TBYTE, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpclb(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned char *array, /* I - array of values that are written */ + unsigned char nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + unsigned char nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TBYTE, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnb(fptr, 2, row, firstelem, nelem, array, nulval, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2db(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3db(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3db(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + LONGLONG nfits, narray; + long fpixel[3]= {1,1,1}, lpixel[3]; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TBYTE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpclb(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpclb(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + unsigned char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TBYTE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpclb(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + unsigned char *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpclb(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclb( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned char *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table with + 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise, + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && tcode == TBYTE) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TBYTE): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpi1b(fptr, ntodo, incre, &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffi1fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + } + + break; + + case (TLONGLONG): + + ffi1fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TSHORT): + + ffi1fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TLONG): + + ffi1fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TFLOAT): + + ffi1fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffi1fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (strchr(tform,'A')) + { + /* write raw input bytes without conversion */ + /* This case is a hack to let users write a stream */ + /* of bytes directly to the 'A' format column */ + + if (incre == twidth) + ffpbyt(fptr, ntodo, &array[next], status); + else + ffpbytoff(fptr, twidth, ntodo/twidth, incre - twidth, + &array[next], status); + break; + } + else if (cform[1] != 's') /* "%s" format is a string */ + { + ffi1fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclb).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnb( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned char *array, /* I - array of values to write */ + unsigned char nulvalue, /* I - flag for undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpclb(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood + 1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpclb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad + 1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpclb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpextn( fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG offset, /* I - byte offset from start of extension data */ + LONGLONG nelem, /* I - number of elements to write */ + void *buffer, /* I - stream of bytes to write */ + int *status) /* IO - error status */ +/* + Write a stream of bytes to the current FITS HDU. This primative routine is mainly + for writing non-standard "conforming" extensions and should not be used + for standard IMAGE, TABLE or BINTABLE extensions. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + /* move to write position */ + ffmbyt(fptr, (fptr->Fptr)->datastart+ offset, IGNORE_EOF, status); + + /* write the buffer */ + ffpbyt(fptr, nelem, buffer, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fi1(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + memcpy(output, input, ntodo); /* just copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ( ((double) input[ii]) - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fi2(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; /* just copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (((double) input[ii]) - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fi4(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (INT32BIT) input[ii]; /* copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (((double) input[ii]) - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fi8(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fr4(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) (( ( (double) input[ii] ) - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fr8(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( ( (double) input[ii] ) - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi1fstr(unsigned char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcold.c b/software/cfitsio3040/putcold.c new file mode 100644 index 000000000..96b318c4c --- /dev/null +++ b/software/cfitsio3040/putcold.c @@ -0,0 +1,1052 @@ +/* This file, putcold.c, contains routines that write data elements to */ +/* a FITS image or table, with double datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + double *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + double nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcld(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + double *array, /* I - array of values that are written */ + double nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + double nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnd(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2dd(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + double *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3dd(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3dd(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + double *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TDOUBLE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcld(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcld(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssd(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + double *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TDOUBLE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcld(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpd( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + double *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcld(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcld( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + double *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped, + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise, + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TDOUBLE) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TDOUBLE): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpr8b(fptr, ntodo, incre, &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffr8fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + } + + break; + + case (TLONGLONG): + + ffr8fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffr8fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffr8fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TLONG): + + ffr8fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TFLOAT): + ffr8fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffr8fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcld).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclm( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + double *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of double complex values to a column in the current FITS HDU. + Each complex number if interpreted as a pair of float values. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + if necessary, but normally complex values should only be written to a binary + table with TFORMn = 'rM' where r is an optional repeat count. The TSCALn and + TZERO keywords should not be used with complex numbers because mathmatically + the scaling should only be applied to the real (first) component of the + complex value. +*/ +{ + /* simply multiply the number of elements by 2, and call ffpcld */ + + ffpcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, + nelem * 2, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnd( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + double *array, /* I - array of values to write */ + double nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + if (abs(tcode) >= TCOMPLEX) + { /* treat complex columns as pairs of numbers */ + repeat *= 2; + } + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcld(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + /* call ffpcluc, not ffpclu, in case we are writing to a + complex ('C') binary table column */ + if (ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcld(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcld(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fi1(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fi2(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fi4(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + output[ii] = (INT32BIT) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fi8(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (LONGLONG) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fr4(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fr8(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + memcpy(output, input, ntodo * sizeof(double) ); /* copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr8fstr(double *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcole.c b/software/cfitsio3040/putcole.c new file mode 100644 index 000000000..aa2ddfc47 --- /dev/null +++ b/software/cfitsio3040/putcole.c @@ -0,0 +1,1066 @@ +/* This file, putcole.c, contains routines that write data elements to */ +/* a FITS image or table, with float datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppre( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + float *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). + + This routine cannot be called directly by users to write to large + arrays with > 2**31 pixels (although CFITSIO can do so by passing + the firstelem thru a LONGLONG sized global variable) +*/ +{ + long row; + float nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TFLOAT, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcle(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppne( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + float *array, /* I - array of values that are written */ + float nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. + + This routine cannot be called directly by users to write to large + arrays with > 2**31 pixels (although CFITSIO can do so by passing + the firstelem thru a LONGLONG sized global variable) +*/ +{ + long row; + float nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TFLOAT, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcne(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2de(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + float *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). + + This routine does not support writing to large images with + more than 2**31 pixels. +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3de(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3de(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + float *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). + + This routine does not support writing to large images with + more than 2**31 pixels. +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TFLOAT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcle(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcle(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpsse(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + float *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TFLOAT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcle(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpe( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + float *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcle(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcle( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + float *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise, + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TFLOAT) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TFLOAT): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpr4b(fptr, ntodo, incre, &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffr4fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + } + + break; + + case (TLONGLONG): + + ffr4fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffr4fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffr4fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TLONG): + + ffr4fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TDOUBLE): + ffr4fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffr4fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcle).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclc( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + float *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of complex values to a column in the current FITS HDU. + Each complex number if interpreted as a pair of float values. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + if necessary, but normally complex values should only be written to a binary + table with TFORMn = 'rC' where r is an optional repeat count. The TSCALn and + TZERO keywords should not be used with complex numbers because mathmatically + the scaling should only be applied to the real (first) component of the + complex value. +*/ +{ + /* simply multiply the number of elements by 2, and call ffpcle */ + + ffpcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, + nelem * 2, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcne( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + float *array, /* I - array of values to write */ + float nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + if (abs(tcode) >= TCOMPLEX) + { /* treat complex columns as pairs of numbers */ + repeat *= 2; + } + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcle(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + /* call ffpcluc, not ffpclu, in case we are writing to a + complex ('C') binary table column */ + if (ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcle(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcle(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fi1(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fi2(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fi4(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (input[ii] > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + output[ii] = (INT32BIT) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fi8(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (input[ii] > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + output[ii] = (long) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fr4(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + memcpy(output, input, ntodo * sizeof(float) ); /* copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fr8(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr4fstr(float *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcoli.c b/software/cfitsio3040/putcoli.c new file mode 100644 index 000000000..deffc4fcf --- /dev/null +++ b/software/cfitsio3040/putcoli.c @@ -0,0 +1,976 @@ +/* This file, putcoli.c, contains routines that write data elements to */ +/* a FITS image or table, with short datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppri( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + short *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + short nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + + fits_write_compressed_pixels(fptr, TSHORT, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcli(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppni( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + short *array, /* I - array of values that are written */ + short nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + short nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TSHORT, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcni(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2di(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3di(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3di(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TSHORT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcli(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcli(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssi(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TSHORT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcli(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpi( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + short *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcli(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcli( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + short *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table with + 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped, + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise, + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TSHORT) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TSHORT): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpi2b(fptr, ntodo, incre, &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffi2fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + } + + break; + + case (TLONGLONG): + + ffi2fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffi2fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TLONG): + + ffi2fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TFLOAT): + + ffi2fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffi2fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffi2fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcli).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcni( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + short *array, /* I - array of values to write */ + short nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcli(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcli(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcli(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fi1(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fi2(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + memcpy(output, input, ntodo * sizeof(short) ); + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fi4(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (INT32BIT) input[ii]; /* just copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fi8(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fr4(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fr8(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2fstr(short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcolj.c b/software/cfitsio3040/putcolj.c new file mode 100644 index 000000000..31eff96c9 --- /dev/null +++ b/software/cfitsio3040/putcolj.c @@ -0,0 +1,1976 @@ +/* This file, putcolj.c, contains routines that write data elements to */ +/* a FITS image or table, with long datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + long *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + long nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TLONG, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpclj(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + long *array, /* I - array of values that are written */ + long nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + long nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TLONG, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnj(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2dj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3dj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3dj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TLONG, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpclj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpclj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TLONG, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpclj(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + long *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpclj(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + long *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TLONG && LONGSIZE == 32) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TLONG): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpi4b(fptr, ntodo, incre, (INT32BIT *) &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffi4fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + } + + break; + + case (TLONGLONG): + + fflongfi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffi4fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffi4fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TFLOAT): + + ffi4fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffi4fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffi4fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclj).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + long *array, /* I - array of values to write */ + long nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpclj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood + 1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpclj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpclj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fi1(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fi2(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fi4(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (INT32BIT) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fflongfi8(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fr4(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fr8(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi4fstr(long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} + +/* ======================================================================== */ +/* the following routines support the 'long long' data type */ +/* ======================================================================== */ + +/*--------------------------------------------------------------------------*/ +int ffpprjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + LONGLONG *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + return(*status = DATA_COMPRESSION_ERR); + } + + row=maxvalue(1,group); + + ffpcljj(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + LONGLONG *array, /* I - array of values that are written */ + LONGLONG nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + return(*status = DATA_COMPRESSION_ERR); + } + + row=maxvalue(1,group); + + ffpcnjj(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2djj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3djj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3djj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + LONGLONG *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + return(*status = DATA_COMPRESSION_ERR); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcljj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcljj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + LONGLONG *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + + return(*status = DATA_COMPRESSION_ERR); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcljj(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpjj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + LONGLONG *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcljj(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcljj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + LONGLONG *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TLONGLONG) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TLONGLONG): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpi8b(fptr, ntodo, incre, (long *) &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffi8fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + } + + break; + + case (TLONG): + + ffi8fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TBYTE): + + ffi8fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffi8fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TFLOAT): + + ffi8fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffi8fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffi8fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclj).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnjj(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + LONGLONG *array, /* I - array of values to write */ + LONGLONG nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcljj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcljj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcljj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fi1(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fi2(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fi4(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < INT32_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (input[ii] > INT32_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + output[ii] = (INT32BIT) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fi8(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fr4(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fr8(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi8fstr(LONGLONG *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcolk.c b/software/cfitsio3040/putcolk.c new file mode 100644 index 000000000..79d073564 --- /dev/null +++ b/software/cfitsio3040/putcolk.c @@ -0,0 +1,1004 @@ +/* This file, putcolk.c, contains routines that write data elements to */ +/* a FITS image or table, with 'int' datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + int nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TINT, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpclk(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *array, /* I - array of values that are written */ + int nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + int nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TINT, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnk(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2dk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3dk(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3dk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TINT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpclk(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpclk(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TINT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpclk(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpk( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + int *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpclk(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclk( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype, writeraw; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* call the 'short' or 'long' version of this routine, if possible */ + if (sizeof(int) == sizeof(short)) + ffpcli(fptr, colnum, firstrow, firstelem, nelem, + (short *) array, status); + else if (sizeof(int) == sizeof(long)) + ffpclj(fptr, colnum, firstrow, firstelem, nelem, + (long *) array, status); + else + { + /* + This is a special case: sizeof(int) is not equal to sizeof(short) or + sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, + int = 4 bytes, and long = 8 bytes. + */ + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /* + if there is no scaling and the native machine format is not byteswapped + then we can simply write the raw data bytes into the FITS file if the + datatype of the FITS column is the same as the input values. Otherwise + we must convert the raw values into the scaled and/or machine dependent + format in a temporary buffer that has been allocated for this purpose. + */ + if (scale == 1. && zero == 0. && + MACHINE == NATIVE && tcode == TLONG) + { + writeraw = 1; + maxelem = (int) nelem; /* we can write the entire array at one time */ + } + else + writeraw = 0; + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TLONG): + if (writeraw) + { + /* write raw input bytes without conversion */ + ffpi4b(fptr, ntodo, incre, (INT32BIT *) &array[next], status); + } + else + { + /* convert the raw data before writing to FITS file */ + ffintfi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + } + + break; + + case (TLONGLONG): + + ffintfi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffintfi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffintfi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TFLOAT): + + ffintfr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffintfr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffintfstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclk).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + } /* end of Dec ALPHA special case */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnk( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *array, /* I - array of values to write */ + int nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpclk(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpclk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpclk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfi1(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfi2(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < SHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfi4(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + memcpy(output, input, ntodo * sizeof(int) ); + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfi8(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfr4(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfr8(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffintfstr(int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcoll.c b/software/cfitsio3040/putcoll.c new file mode 100644 index 000000000..b26e91152 --- /dev/null +++ b/software/cfitsio3040/putcoll.c @@ -0,0 +1,369 @@ +/* This file, putcoll.c, contains routines that write data elements to */ +/* a FITS image or table, with logical datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpcll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + char *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of logical values to a column in the current FITS HDU. +*/ +{ + int tcode, maxelem, hdutype; + long twidth, incre; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], ctrue = 'T', cfalse = 'F'; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode != TLOGICAL) + return(*status = NOT_LOGICAL_COL); + + /*---------------------------------------------------------------------*/ + /* Now write the logical values one at a time to the FITS column. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + wrtptr = startpos + (rowlen * rownum) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + if (array[next]) + ffpbyt(fptr, 1, &ctrue, status); + else + ffpbyt(fptr, 1, &cfalse, status); + + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing element %.0f of input array of logicals (ffpcll).", + (double) (next+1)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain--; + if (remain) + { + next++; + elemnum++; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + + } /* End of main while Loop */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnl( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + char *array, /* I - array of values to write */ + char nulvalue, /* I - array flagging undefined pixels if true */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels flagged as null will be replaced by the appropriate + null value in the output FITS file. +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* first write the whole input vector, then go back and fill in the nulls */ + if (ffpcll(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) + return(*status); + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + +/* good values have already been written + if (ffpcll(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) + return(*status); +*/ + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + +/* these have already been written + ffpcll(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); +*/ + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclx( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG frow, /* I - first row to write (1 = 1st row) */ + long fbit, /* I - first bit to write (1 = 1st) */ + long nbit, /* I - number of bits to write */ + char *larray, /* I - array of logicals corresponding to bits */ + int *status) /* IO - error status */ +/* + write an array of logical values to a specified bit or byte + column of the binary table. If larray is TRUE, then the corresponding + bit is set to 1, otherwise it is set to 0. + The binary table column being written to must have datatype 'B' or 'X'. +*/ +{ + LONGLONG offset, bstart, repeat, rowlen, elemnum, rstart, estart, tnull; + long fbyte, lbyte, nbyte, bitloc, ndone; + long ii, twidth, incre; + int tcode, descrp, maxelem, hdutype; + double dummyd; + char tform[12], snull[12]; + unsigned char cbuff; + static unsigned char onbit[8] = {128, 64, 32, 16, 8, 4, 2, 1}; + static unsigned char offbit[8] = {127, 191, 223, 239, 247, 251, 253, 254}; + tcolumn *colptr; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check input parameters */ + if (nbit < 1) + return(*status); + else if (frow < 1) + return(*status = BAD_ROW_NUM); + else if (fbit < 1) + return(*status = BAD_ELEM_NUM); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* rescan header if data structure is undefined */ + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) + return(*status); + + fbyte = (fbit + 7) / 8; + lbyte = (fbit + nbit + 6) / 8; + nbyte = lbyte - fbyte +1; + + /* Save the current heapsize; ffgcprll will increment the value if */ + /* we are writing to a variable length column. */ + offset = (fptr->Fptr)->heapsize; + + /* call ffgcprll in case we are writing beyond the current end of */ + /* the table; it will allocate more space and shift any following */ + /* HDU's. Otherwise, we have little use for most of the returned */ + /* parameters, therefore just use dummy parameters. */ + + if (ffgcprll( fptr, colnum, frow, fbyte, nbyte, 1, &dummyd, &dummyd, + tform, &twidth, &tcode, &maxelem, &bstart, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + bitloc = fbit - 1 - ((fbit - 1) / 8 * 8); + ndone = 0; + rstart = frow - 1; + estart = fbyte - 1; + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (abs(tcode) > TBYTE) + return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ + + if (tcode > 0) + { + descrp = FALSE; /* not a variable length descriptor column */ + repeat = colptr->trepeat; + + if (tcode == TBIT) + repeat = (repeat + 7) / 8; /* convert from bits to bytes */ + + if (fbyte > repeat) + return(*status = BAD_ELEM_NUM); + + /* calc the i/o pointer location to start of sequence of pixels */ + bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + + colptr->tbcol + estart; + } + else + { + descrp = TRUE; /* a variable length descriptor column */ + /* only bit arrays (tform = 'X') are supported for variable */ + /* length arrays. REPEAT is the number of BITS in the array. */ + + repeat = fbit + nbit -1; + + /* write the number of elements and the starting offset. */ + /* Note: ffgcprll previous wrote the descripter, but with the */ + /* wrong repeat value (gave bytes instead of bits). */ + + if (tcode == -TBIT) + ffpdes(fptr, colnum, frow, (long) repeat, offset, status); + + /* Calc the i/o pointer location to start of sequence of pixels. */ + /* ffgcprll has already calculated a value for bstart that */ + /* points to the first element of the vector; we just have to */ + /* increment it to point to the first element we want to write to. */ + /* Note: ffgcprll also already updated the size of the heap, so we */ + /* don't have to do that again here. */ + + bstart += estart; + } + + /* move the i/o pointer to the start of the pixel sequence */ + ffmbyt(fptr, bstart, IGNORE_EOF, status); + + /* read the next byte (we may only be modifying some of the bits) */ + while (1) + { + if (ffgbyt(fptr, 1, &cbuff, status) == END_OF_FILE) + { + /* hit end of file trying to read the byte, so just set byte = 0 */ + *status = 0; + cbuff = 0; + } + + /* move back, to be able to overwrite the byte */ + ffmbyt(fptr, bstart, IGNORE_EOF, status); + + for (ii = bitloc; (ii < 8) && (ndone < nbit); ii++, ndone++) + { + if(larray[ndone]) + cbuff = cbuff | onbit[ii]; + else + cbuff = cbuff & offbit[ii]; + } + + ffpbyt(fptr, 1, &cbuff, status); /* write the modified byte */ + + if (ndone == nbit) /* finished all the bits */ + return(*status); + + /* not done, so get the next byte */ + bstart++; + if (!descrp) + { + estart++; + if (estart == repeat) + { + /* move the i/o pointer to the next row of pixels */ + estart = 0; + rstart = rstart + 1; + bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + + colptr->tbcol; + + ffmbyt(fptr, bstart, IGNORE_EOF, status); + } + } + bitloc = 0; + } +} + diff --git a/software/cfitsio3040/putcols.c b/software/cfitsio3040/putcols.c new file mode 100644 index 000000000..3db915af3 --- /dev/null +++ b/software/cfitsio3040/putcols.c @@ -0,0 +1,294 @@ +/* This file, putcols.c, contains routines that write data elements to */ +/* a FITS image or table, of type character string. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffpcls( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of strings to write */ + char **array, /* I - array of pointers to strings */ + int *status) /* IO - error status */ +/* + Write an array of string values to a column in the current FITS HDU. +*/ +{ + int tcode, maxelem, hdutype, nchar; + long twidth, incre; + long ii, jj, ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], *blanks; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + tcolumn *colptr; + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + char *buffer, *arrayptr; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (colnum < 1 || colnum > (fptr->Fptr)->tfield) + { + sprintf(message, "Specified column number is out of range: %d", + colnum); + ffpmsg(message); + return(*status = BAD_COL_NUM); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + tcode = colptr->tdatatype; + + if (tcode == -TSTRING) /* variable length column in a binary table? */ + { + /* only write a single string; ignore value of firstelem */ + nchar = maxvalue(1,strlen(array[0])); /* will write at least 1 char */ + /* even if input string is null */ + + if (ffgcprll( fptr, colnum, firstrow, 1, nchar, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + /* simply move to write position, then write the string */ + ffmbyt(fptr, startpos, IGNORE_EOF, status); + ffpbyt(fptr, nchar, array[0], status); + + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing to variable length string column (ffpcls)."); + ffpmsg(message); + } + + return(*status); + } + else if (tcode == TSTRING) + { + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + blanks = (char *) malloc(twidth); /* string for blank fill values */ + if (!blanks) + { + ffpmsg("Could not allocate memory for string (ffpcls)"); + return(*status = ARRAY_TOO_BIG); + } + + for (ii = 0; ii < twidth; ii++) + blanks[ii] = ' '; /* fill string with blanks */ + + remain = nelem; /* remaining number of values to write */ + } + else + return(*status = NOT_ASCII_COL); + + /*-------------------------------------------------------*/ + /* Now write the strings to the FITS column. */ + /*-------------------------------------------------------*/ + + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process at one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + (rownum * rowlen) + (elemnum * incre); + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + buffer = (char *) cbuff; + + /* copy the user's strings into the buffer */ + for (ii = 0; ii < ntodo; ii++) + { + arrayptr = array[next]; + + for (jj = 0; jj < twidth; jj++) /* copy the string, char by char */ + { + if (*arrayptr) + { + *buffer = *arrayptr; + buffer++; + arrayptr++; + } + else + break; + } + + for (;jj < twidth; jj++) /* fill field with blanks, if needed */ + { + *buffer = ' '; + buffer++; + } + + next++; + } + + /* write the buffer full of strings to the FITS file */ + if (incre == twidth) + ffpbyt(fptr, ntodo * twidth, cbuff, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, cbuff, status); + + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcls).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + + if (blanks) + free(blanks); + + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + if (blanks) + free(blanks); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcns( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + char **array, /* I - array of values to write */ + char *nulvalue, /* I - string representing a null value */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels flagged as null will be replaced by the appropriate + null value in the output FITS file. +*/ +{ + long repeat, width, ngood = 0, nbad = 0, ii; + LONGLONG first, fstelm, fstrow; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + /* get the vector repeat length of the column */ + ffgtcl(fptr, colnum, NULL, &repeat, &width, status); + + if ((fptr->Fptr)->hdutype == BINARY_TBL) + repeat = repeat / width; /* convert from chars to unit strings */ + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (strcmp(nulvalue, array[ii])) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpcls(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) + return(*status); + + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpcls(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + return(*status); +} diff --git a/software/cfitsio3040/putcolsb.c b/software/cfitsio3040/putcolsb.c new file mode 100644 index 000000000..90694216b --- /dev/null +++ b/software/cfitsio3040/putcolsb.c @@ -0,0 +1,966 @@ +/* This file, putcolsb.c, contains routines that write data elements to */ +/* a FITS image or table with signed char (signed byte) datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprsb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + signed char *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + signed char nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TSBYTE, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpclsb(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnsb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + signed char *array, /* I - array of values that are written */ + signed char nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + signed char nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TSBYTE, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnsb(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2dsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + signed char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3dsb(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3dsb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + signed char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TSBYTE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpclsb(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpclsb(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpsssb(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + signed char *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TSBYTE, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpclsb(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpsb( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + signed char *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpclsb(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclsb( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + signed char *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table with + 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TBYTE): + + /* convert the raw data before writing to FITS file */ + ffs1fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + + break; + + case (TLONGLONG): + + ffs1fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TSHORT): + + ffs1fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TLONG): + + ffs1fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TFLOAT): + + ffs1fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffs1fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (strchr(tform,'A')) + { + /* write raw input bytes without conversion */ + /* This case is a hack to let users write a stream */ + /* of bytes directly to the 'A' format column */ + + if (incre == twidth) + ffpbyt(fptr, ntodo, &array[next], status); + else + ffpbytoff(fptr, twidth, ntodo/twidth, incre - twidth, + &array[next], status); + break; + } + else if (cform[1] != 's') /* "%s" format is a string */ + { + ffs1fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclsb).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnsb( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + signed char *array, /* I - array of values to write */ + signed char nulvalue, /* I - flag for undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpclsb(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood + 1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpclsb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad + 1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpclsb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fi1(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == -128.) + { + /* Instead of adding 128, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(unsigned char *) &input[ii] ) ^ 0x80; + } + else if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] < 0) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ( ((double) input[ii]) - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fi2(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; /* just copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (((double) input[ii]) - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fi4(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (INT32BIT) input[ii]; /* copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (((double) input[ii]) - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fi8(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fr4(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) (( ( (double) input[ii] ) - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fr8(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( ( (double) input[ii] ) - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs1fstr(signed char *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcolu.c b/software/cfitsio3040/putcolu.c new file mode 100644 index 000000000..90227f06f --- /dev/null +++ b/software/cfitsio3040/putcolu.c @@ -0,0 +1,629 @@ +/* This file, putcolu.c, contains routines that write data elements to */ +/* a FITS image or table. Writes null values. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppru( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *status) /* IO - error status */ +/* + Write null values to the primary array. + +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + return(*status = DATA_COMPRESSION_ERR); + } + + row=maxvalue(1,group); + + ffpclu(fptr, 2, row, firstelem, nelem, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpprn( fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *status) /* IO - error status */ +/* + Write null values to the primary array. (Doesn't support groups). + +*/ +{ + long row = 1; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + ffpmsg("writing to compressed image is not supported"); + + return(*status = DATA_COMPRESSION_ERR); + } + + ffpclu(fptr, 2, row, firstelem, nelem, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclu( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelempar, /* I - number of values to write */ + int *status) /* IO - error status */ +/* + Set elements of a table column to the appropriate null value for the column + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + This routine support COMPLEX and DOUBLE COMPLEX binary table columns, and + sets both the real and imaginary components of the element to a NaN. +*/ +{ + int tcode, maxelem, hdutype, writemode = 2, leng; + short i2null; + INT32BIT i4null; + long twidth, incre; + long ii; + LONGLONG largeelem, nelem, tnull, i8null; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, ntodo; + double scale, zero; + unsigned char i1null, lognul = 0; + char tform[20], *cstring = 0; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + long jbuff[2] = { -1, -1}; /* all bits set is equivalent to a NaN */ + size_t buffsize; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + nelem = nelempar; + + largeelem = firstelem; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + + /* note that writemode = 2 by default (not 1), so that the returned */ + /* repeat and incre values will be the actual values for this column. */ + + /* If writing nulls to a variable length column then dummy data values */ + /* must have already been written to the heap. */ + /* We just have to overwrite the previous values with null values. */ + /* Set writemode = 0 in this case, to test that values have been written */ + + fits_get_coltype(fptr, colnum, &tcode, NULL, NULL, status); + if (tcode < 0) + writemode = 0; /* this is a variable length column */ + + if (abs(tcode) >= TCOMPLEX) + { /* treat complex columns as pairs of numbers */ + largeelem = (largeelem - 1) * 2 + 1; + nelem *= 2; + } + + if (ffgcprll( fptr, colnum, firstrow, largeelem, nelem, writemode, &scale, + &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + { + if (snull[0] == ASCII_NULL_UNDEFINED) + { + ffpmsg( + "Null value string for ASCII table column is not defined (FTPCLU)."); + return(*status = NO_NULL); + } + + /* allocate buffer to hold the null string. Must write the entire */ + /* width of the column (twidth bytes) to avoid possible problems */ + /* with uninitialized FITS blocks, in case the field spans blocks */ + + buffsize = maxvalue(20, twidth); + cstring = (char *) malloc(buffsize); + if (!cstring) + return(*status = MEMORY_ALLOCATION); + + memset(cstring, ' ', buffsize); /* initialize with blanks */ + + leng = strlen(snull); + if (hdutype == BINARY_TBL) + leng++; /* copy the terminator too in binary tables */ + + strncpy(cstring, snull, leng); /* copy null string to temp buffer */ + } + else if ( tcode == TBYTE || + tcode == TSHORT || + tcode == TLONG || + tcode == TLONGLONG) + { + if (tnull == NULL_UNDEFINED) + { + ffpmsg( + "Null value for integer table column is not defined (FTPCLU)."); + return(*status = NO_NULL); + } + + if (tcode == TBYTE) + i1null = (unsigned char) tnull; + else if (tcode == TSHORT) + { + i2null = (short) tnull; +#if BYTESWAPPED + ffswap2(&i2null, 1); /* reverse order of bytes */ +#endif + } + else if (tcode == TLONG) + { + i4null = (INT32BIT) tnull; +#if BYTESWAPPED + ffswap4(&i4null, 1); /* reverse order of bytes */ +#endif + } + else + { + i8null = tnull; +#if BYTESWAPPED + ffswap4( (INT32BIT*) (&i8null), 2); /* reverse order of bytes */ +#endif + } + } + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + ntodo = remain; /* number of elements to write at one time */ + + while (ntodo) + { + /* limit the number of pixels to process at one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = minvalue(ntodo, (repeat - elemnum)); + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TBYTE): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 1, &i1null, status); + break; + + case (TSHORT): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 2, &i2null, status); + break; + + case (TLONG): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 4, &i4null, status); + break; + + case (TLONGLONG): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 8, &i8null, status); + break; + + case (TFLOAT): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 4, jbuff, status); + break; + + case (TDOUBLE): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 8, jbuff, status); + break; + + case (TLOGICAL): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 1, &lognul, status); + break; + + case (TSTRING): /* an ASCII table column */ + /* repeat always = 1, so ntodo is also guaranteed to = 1 */ + ffpbyt(fptr, twidth, cstring, status); + break; + + default: /* error trap */ + sprintf(message, + "Cannot write null value to column %d which has format %s", + colnum,tform); + ffpmsg(message); + return(*status); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing %.0f thru %.0f of null values (ffpclu).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + + if (cstring) + free(cstring); + + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + ntodo = remain; /* this is the maximum number to do in next loop */ + + } /* End of main while Loop */ + + if (cstring) + free(cstring); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcluc( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + int *status) /* IO - error status */ +/* + Set elements of a table column to the appropriate null value for the column + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + This routine does not do anything special in the case of COMPLEX table columns + (unlike the similar ffpclu routine). This routine is mainly for use by + ffpcne which already compensates for the effective doubling of the number of + elements in a complex column. +*/ +{ + int tcode, maxelem, hdutype, writemode = 2, leng; + short i2null; + INT32BIT i4null; + long twidth, incre; + long ii; + LONGLONG tnull, i8null; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, ntodo; + double scale, zero; + unsigned char i1null, lognul = 0; + char tform[20], *cstring = 0; + char message[FLEN_ERRMSG]; + char snull[20]; /* the FITS null value */ + long jbuff[2] = { -1, -1}; /* all bits set is equivalent to a NaN */ + size_t buffsize; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + + /* note that writemode = 2 by default (not 1), so that the returned */ + /* repeat and incre values will be the actual values for this column. */ + + /* If writing nulls to a variable length column then dummy data values */ + /* must have already been written to the heap. */ + /* We just have to overwrite the previous values with null values. */ + /* Set writemode = 0 in this case, to test that values have been written */ + + fits_get_coltype(fptr, colnum, &tcode, NULL, NULL, status); + if (tcode < 0) + writemode = 0; /* this is a variable length column */ + + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, writemode, &scale, + &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + { + if (snull[0] == ASCII_NULL_UNDEFINED) + { + ffpmsg( + "Null value string for ASCII table column is not defined (FTPCLU)."); + return(*status = NO_NULL); + } + + /* allocate buffer to hold the null string. Must write the entire */ + /* width of the column (twidth bytes) to avoid possible problems */ + /* with uninitialized FITS blocks, in case the field spans blocks */ + + buffsize = maxvalue(20, twidth); + cstring = (char *) malloc(buffsize); + if (!cstring) + return(*status = MEMORY_ALLOCATION); + + memset(cstring, ' ', buffsize); /* initialize with blanks */ + + leng = strlen(snull); + if (hdutype == BINARY_TBL) + leng++; /* copy the terminator too in binary tables */ + + strncpy(cstring, snull, leng); /* copy null string to temp buffer */ + + } + else if ( tcode == TBYTE || + tcode == TSHORT || + tcode == TLONG || + tcode == TLONGLONG) + { + if (tnull == NULL_UNDEFINED) + { + ffpmsg( + "Null value for integer table column is not defined (FTPCLU)."); + return(*status = NO_NULL); + } + + if (tcode == TBYTE) + i1null = (unsigned char) tnull; + else if (tcode == TSHORT) + { + i2null = (short) tnull; +#if BYTESWAPPED + ffswap2(&i2null, 1); /* reverse order of bytes */ +#endif + } + else if (tcode == TLONG) + { + i4null = (INT32BIT) tnull; +#if BYTESWAPPED + ffswap4(&i4null, 1); /* reverse order of bytes */ +#endif + } + else + { + i8null = tnull; +#if BYTESWAPPED + ffswap4( (INT32BIT*) &i8null, 2); /* reverse order of bytes */ +#endif + } + } + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + ntodo = remain; /* number of elements to write at one time */ + + while (ntodo) + { + /* limit the number of pixels to process at one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = minvalue(ntodo, (repeat - elemnum)); + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TBYTE): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 1, &i1null, status); + break; + + case (TSHORT): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 2, &i2null, status); + break; + + case (TLONG): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 4, &i4null, status); + break; + + case (TLONGLONG): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 8, &i8null, status); + break; + + case (TFLOAT): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 4, jbuff, status); + break; + + case (TDOUBLE): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 8, jbuff, status); + break; + + case (TLOGICAL): + + for (ii = 0; ii < ntodo; ii++) + ffpbyt(fptr, 1, &lognul, status); + break; + + case (TSTRING): /* an ASCII table column */ + /* repeat always = 1, so ntodo is also guaranteed to = 1 */ + ffpbyt(fptr, twidth, cstring, status); + break; + + default: /* error trap */ + sprintf(message, + "Cannot write null value to column %d which has format %s", + colnum,tform); + ffpmsg(message); + return(*status); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing %.0f thru %.0f of null values (ffpclu).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + + if (cstring) + free(cstring); + + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + ntodo = remain; /* this is the maximum number to do in next loop */ + + } /* End of main while Loop */ + + if (cstring) + free(cstring); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffprwu(fitsfile *fptr, + LONGLONG firstrow, + LONGLONG nrows, + int *status) + +/* + * fits_write_nullrows / ffprwu - write TNULLs to all columns in one or more rows + * + * fitsfile *fptr - pointer to FITS HDU opened for read/write + * long int firstrow - first table row to set to null. (firstrow >= 1) + * long int nrows - total number or rows to set to null. (nrows >= 1) + * int *status - upon return, *status contains CFITSIO status code + * + * RETURNS: CFITSIO status code + * + * written by Craig Markwardt, GSFC + */ +{ + LONGLONG ntotrows; + int ncols, i; + int typecode = 0; + LONGLONG repeat = 0, width = 0; + int nullstatus; + + if (*status > 0) return *status; + + if ((firstrow <= 0) || (nrows <= 0)) return (*status = BAD_ROW_NUM); + + fits_get_num_rowsll(fptr, &ntotrows, status); + + if (firstrow + nrows - 1 > ntotrows) return (*status = BAD_ROW_NUM); + + fits_get_num_cols(fptr, &ncols, status); + if (*status) return *status; + + + /* Loop through each column and write nulls */ + for (i=1; i <= ncols; i++) { + repeat = 0; typecode = 0; width = 0; + fits_get_coltypell(fptr, i, &typecode, &repeat, &width, status); + if (*status) break; + + /* NOTE: data of TSTRING type must not write the total repeat + count, since the repeat count is the *character* count, not the + nstring count. Divide by string width to get number of + strings. */ + + if (typecode == TSTRING) repeat /= width; + + /* Write NULLs */ + nullstatus = 0; + fits_write_col_null(fptr, i, firstrow, 1, repeat*nrows, &nullstatus); + + /* ignore error if no null value is defined for the column */ + if (nullstatus && nullstatus != NO_NULL) return (*status = nullstatus); + + } + + return *status; +} + diff --git a/software/cfitsio3040/putcolui.c b/software/cfitsio3040/putcolui.c new file mode 100644 index 000000000..2b43a2665 --- /dev/null +++ b/software/cfitsio3040/putcolui.c @@ -0,0 +1,962 @@ +/* This file, putcolui.c, contains routines that write data elements to */ +/* a FITS image or table, with unsigned short datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffpprui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write (1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned short *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + unsigned short nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TUSHORT, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpclui(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned short *array, /* I - array of values that are written */ + unsigned short nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + unsigned short nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TUSHORT, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnui(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2dui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3dui(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3dui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TUSHORT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpclui(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpclui(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssui(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + unsigned short *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TUSHORT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpclui(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpui( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + unsigned short *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpclui(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpclui( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned short *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table with + 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TSHORT): + + ffu2fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TLONGLONG): + + ffu2fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffu2fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TLONG): + + ffu2fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TFLOAT): + + ffu2fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffu2fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffu2fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpclui).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnui(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned short *array, /* I - array of values to write */ + unsigned short nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpclui(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpclui(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpclui(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fi1(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fi2(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 32768.) + { + /* Instead of subtracting 32768, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(short *) &input[ii] ) ^ 0x8000; + } + else if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fi4(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (INT32BIT) input[ii]; /* copy input to output */ + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fi8(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fr4(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) (((double) input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fr8(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = ((double) input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu2fstr(unsigned short *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = ((double) input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcoluj.c b/software/cfitsio3040/putcoluj.c new file mode 100644 index 000000000..c91b4aa41 --- /dev/null +++ b/software/cfitsio3040/putcoluj.c @@ -0,0 +1,969 @@ +/* This file, putcoluj.c, contains routines that write data elements to */ +/* a FITS image or table, with unsigned long datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppruj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned long *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + unsigned long nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TULONG, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcluj(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnuj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned long *array, /* I - array of values that are written */ + unsigned long nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + unsigned long nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TULONG, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnuj(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2duj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3duj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3duj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TULONG, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcluj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcluj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssuj(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + unsigned long *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TULONG, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcluj(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpuj( fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + unsigned long *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcluj(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcluj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned long *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TLONG): + + ffu4fi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TLONGLONG): + + ffu4fi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffu4fi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffu4fi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TFLOAT): + + ffu4fr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffu4fr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffu4fstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcluj).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnuj( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned long *array, /* I - array of values to write */ + unsigned long nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcluj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcluj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcluj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fi1(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fi2(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = (short) input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fi4(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 2147483648. && sizeof(long) == 4) + { + /* Instead of subtracting 2147483648, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(long *) &input[ii] ) ^ 0x80000000; + } + else if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > INT32_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fi8(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fr4(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fr8(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffu4fstr(unsigned long *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putcoluk.c b/software/cfitsio3040/putcoluk.c new file mode 100644 index 000000000..9405aaaeb --- /dev/null +++ b/software/cfitsio3040/putcoluk.c @@ -0,0 +1,986 @@ +/* This file, putcolk.c, contains routines that write data elements to */ +/* a FITS image or table, with 'unsigned int' datatype. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffppruk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned int *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + unsigned int nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_pixels(fptr, TUINT, firstelem, nelem, + 0, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcluk(fptr, 2, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffppnuk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned int *array, /* I - array of values that are written */ + unsigned int nulval, /* I - undefined pixel value */ + int *status) /* IO - error status */ +/* + Write an array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). Any array values + that are equal to the value of nulval will be replaced with the null + pixel value that is appropriate for this column. +*/ +{ + long row; + unsigned int nullvalue; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + nullvalue = nulval; /* set local variable */ + fits_write_compressed_pixels(fptr, TUINT, firstelem, nelem, + 1, array, &nullvalue, status); + return(*status); + } + + row=maxvalue(1,group); + + ffpcnuk(fptr, 2, row, firstelem, nelem, array, nulval, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp2duk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + unsigned int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 2-D array of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + /* call the 3D writing routine, with the 3rd dimension = 1 */ + + ffp3duk(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffp3duk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + LONGLONG ncols, /* I - number of pixels in each row of array */ + LONGLONG nrows, /* I - number of rows in each plane of array */ + LONGLONG naxis1, /* I - FITS image NAXIS1 value */ + LONGLONG naxis2, /* I - FITS image NAXIS2 value */ + LONGLONG naxis3, /* I - FITS image NAXIS3 value */ + unsigned int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write an entire 3-D cube of values to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of the + FITS array is not the same as the array being written). +*/ +{ + long tablerow, ii, jj; + long fpixel[3]= {1,1,1}, lpixel[3]; + LONGLONG nfits, narray; + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + lpixel[0] = (long) ncols; + lpixel[1] = (long) nrows; + lpixel[2] = (long) naxis3; + + fits_write_compressed_img(fptr, TUINT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + tablerow=maxvalue(1,group); + + if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ + { + /* all the image pixels are contiguous, so write all at once */ + ffpcluk(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); + return(*status); + } + + if (ncols < naxis1 || nrows < naxis2) + return(*status = BAD_DIMEN); + + nfits = 1; /* next pixel in FITS image to write to */ + narray = 0; /* next pixel in input array to be written */ + + /* loop over naxis3 planes in the data cube */ + for (jj = 0; jj < naxis3; jj++) + { + /* loop over the naxis2 rows in the FITS image, */ + /* writing naxis1 pixels to each row */ + + for (ii = 0; ii < naxis2; ii++) + { + if (ffpcluk(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) + return(*status); + + nfits += naxis1; + narray += ncols; + } + narray += (nrows - naxis2) * ncols; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpssuk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long naxis, /* I - number of data axes in array */ + long *naxes, /* I - size of each FITS axis */ + long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ + long *lpixel, /* I - last pixel in each axis to write */ + unsigned int *array, /* I - array to be written */ + int *status) /* IO - error status */ +/* + Write a subsection of pixels to the primary array or image. + A subsection is defined to be any contiguous rectangular + array of pixels within the n-dimensional FITS data file. + Data conversion and scaling will be performed if necessary + (e.g, if the datatype of the FITS array is not the same as + the array being written). +*/ +{ + long tablerow; + LONGLONG fpix[7], dimen[7], astart, pstart; + LONGLONG off2, off3, off4, off5, off6, off7; + LONGLONG st10, st20, st30, st40, st50, st60, st70; + LONGLONG st1, st2, st3, st4, st5, st6, st7; + long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; + + if (*status > 0) + return(*status); + + if (fits_is_compressed_image(fptr, status)) + { + /* this is a compressed image in a binary table */ + + fits_write_compressed_img(fptr, TUINT, fpixel, lpixel, + 0, array, NULL, status); + + return(*status); + } + + if (naxis < 1 || naxis > 7) + return(*status = BAD_DIMEN); + + tablerow=maxvalue(1,group); + + /* calculate the size and number of loops to perform in each dimension */ + for (ii = 0; ii < 7; ii++) + { + fpix[ii]=1; + irange[ii]=1; + dimen[ii]=1; + } + + for (ii = 0; ii < naxis; ii++) + { + fpix[ii]=fpixel[ii]; + irange[ii]=lpixel[ii]-fpixel[ii]+1; + dimen[ii]=naxes[ii]; + } + + i1=irange[0]; + + /* compute the pixel offset between each dimension */ + off2 = dimen[0]; + off3 = off2 * dimen[1]; + off4 = off3 * dimen[2]; + off5 = off4 * dimen[3]; + off6 = off5 * dimen[4]; + off7 = off6 * dimen[5]; + + st10 = fpix[0]; + st20 = (fpix[1] - 1) * off2; + st30 = (fpix[2] - 1) * off3; + st40 = (fpix[3] - 1) * off4; + st50 = (fpix[4] - 1) * off5; + st60 = (fpix[5] - 1) * off6; + st70 = (fpix[6] - 1) * off7; + + /* store the initial offset in each dimension */ + st1 = st10; + st2 = st20; + st3 = st30; + st4 = st40; + st5 = st50; + st6 = st60; + st7 = st70; + + astart = 0; + + for (i7 = 0; i7 < irange[6]; i7++) + { + for (i6 = 0; i6 < irange[5]; i6++) + { + for (i5 = 0; i5 < irange[4]; i5++) + { + for (i4 = 0; i4 < irange[3]; i4++) + { + for (i3 = 0; i3 < irange[2]; i3++) + { + pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; + + for (i2 = 0; i2 < irange[1]; i2++) + { + if (ffpcluk(fptr, 2, tablerow, pstart, i1, &array[astart], + status) > 0) + return(*status); + + astart += i1; + pstart += off2; + } + st2 = st20; + st3 = st3+off3; + } + st3 = st30; + st4 = st4+off4; + } + st4 = st40; + st5 = st5+off5; + } + st5 = st50; + st6 = st6+off6; + } + st6 = st60; + st7 = st7+off7; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpgpuk(fitsfile *fptr, /* I - FITS file pointer */ + long group, /* I - group to write(1 = 1st group) */ + long firstelem, /* I - first vector element to write(1 = 1st) */ + long nelem, /* I - number of values to write */ + unsigned int *array, /* I - array of values that are written */ + int *status) /* IO - error status */ +/* + Write an array of group parameters to the primary array. Data conversion + and scaling will be performed if necessary (e.g, if the datatype of + the FITS array is not the same as the array being written). +*/ +{ + long row; + + /* + the primary array is represented as a binary table: + each group of the primary array is a row in the table, + where the first column contains the group parameters + and the second column contains the image itself. + */ + + row=maxvalue(1,group); + + ffpcluk(fptr, 1L, row, firstelem, nelem, array, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcluk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned int *array, /* I - array of values to write */ + int *status) /* IO - error status */ +/* + Write an array of values to a column in the current FITS HDU. + The column number may refer to a real column in an ASCII or binary table, + or it may refer to a virtual column in a 1 or more grouped FITS primary + array. FITSIO treats a primary array as a binary table + with 2 vector columns: the first column contains the group parameters (often + with length = 0) and the second column contains the array of image pixels. + Each row of the table represents a group in the case of multigroup FITS + images. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. +*/ +{ + int tcode, maxelem, hdutype; + long twidth, incre; + long ntodo; + LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; + double scale, zero; + char tform[20], cform[20]; + char message[FLEN_ERRMSG]; + + char snull[20]; /* the FITS null value */ + + double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ + void *buffer; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* call the 'short' or 'long' version of this routine, if possible */ + if (sizeof(int) == sizeof(short)) + ffpclui(fptr, colnum, firstrow, firstelem, nelem, + (unsigned short *) array, status); + else if (sizeof(int) == sizeof(long)) + ffpcluj(fptr, colnum, firstrow, firstelem, nelem, + (unsigned long *) array, status); + else + { + /* + This is a special case: sizeof(int) is not equal to sizeof(short) or + sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, + int = 4 bytes, and long = 8 bytes. + */ + + buffer = cbuff; + + /*---------------------------------------------------*/ + /* Check input and get parameters about the column: */ + /*---------------------------------------------------*/ + if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, + tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, + &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) + return(*status); + + if (tcode == TSTRING) + ffcfmt(tform, cform); /* derive C format for writing strings */ + + /*---------------------------------------------------------------------*/ + /* Now write the pixels to the FITS column. */ + /* First call the ffXXfYY routine to (1) convert the datatype */ + /* if necessary, and (2) scale the values by the FITS TSCALn and */ + /* TZEROn linear scaling parameters into a temporary buffer. */ + /*---------------------------------------------------------------------*/ + remain = nelem; /* remaining number of values to write */ + next = 0; /* next element in array to be written */ + rownum = 0; /* row number, relative to firstrow */ + + while (remain) + { + /* limit the number of pixels to process a one time to the number that + will fit in the buffer space or to the number of pixels that remain + in the current vector, which ever is smaller. + */ + ntodo = (long) minvalue(remain, maxelem); + ntodo = (long) minvalue(ntodo, (repeat - elemnum)); + + wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); + + ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ + + switch (tcode) + { + case (TLONG): + /* convert the raw data before writing to FITS file */ + ffuintfi4(&array[next], ntodo, scale, zero, + (INT32BIT *) buffer, status); + ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); + break; + + case (TLONGLONG): + + ffuintfi8(&array[next], ntodo, scale, zero, + (LONGLONG *) buffer, status); + ffpi8b(fptr, ntodo, incre, (long *) buffer, status); + break; + + case (TBYTE): + + ffuintfi1(&array[next], ntodo, scale, zero, + (unsigned char *) buffer, status); + ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); + break; + + case (TSHORT): + + ffuintfi2(&array[next], ntodo, scale, zero, + (short *) buffer, status); + ffpi2b(fptr, ntodo, incre, (short *) buffer, status); + break; + + case (TFLOAT): + + ffuintfr4(&array[next], ntodo, scale, zero, + (float *) buffer, status); + ffpr4b(fptr, ntodo, incre, (float *) buffer, status); + break; + + case (TDOUBLE): + ffuintfr8(&array[next], ntodo, scale, zero, + (double *) buffer, status); + ffpr8b(fptr, ntodo, incre, (double *) buffer, status); + break; + + case (TSTRING): /* numerical column in an ASCII table */ + + if (cform[1] != 's') /* "%s" format is a string */ + { + ffuintfstr(&array[next], ntodo, scale, zero, cform, + twidth, (char *) buffer, status); + + if (incre == twidth) /* contiguous bytes */ + ffpbyt(fptr, ntodo * twidth, buffer, status); + else + ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, + status); + + break; + } + /* can't write to string column, so fall thru to default: */ + + default: /* error trap */ + sprintf(message, + "Cannot write numbers to column %d which has format %s", + colnum,tform); + ffpmsg(message); + if (hdutype == ASCII_TBL) + return(*status = BAD_ATABLE_FORMAT); + else + return(*status = BAD_BTABLE_FORMAT); + + } /* End of switch block */ + + /*-------------------------*/ + /* Check for fatal error */ + /*-------------------------*/ + if (*status > 0) /* test for error during previous write operation */ + { + sprintf(message, + "Error writing elements %.0f thru %.0f of input data array (ffpcluk).", + (double) (next+1), (double) (next+ntodo)); + ffpmsg(message); + return(*status); + } + + /*--------------------------------------------*/ + /* increment the counters for the next loop */ + /*--------------------------------------------*/ + remain -= ntodo; + if (remain) + { + next += ntodo; + elemnum += ntodo; + if (elemnum == repeat) /* completed a row; start on next row */ + { + elemnum = 0; + rownum++; + } + } + } /* End of main while Loop */ + + + /*--------------------------------*/ + /* check for numerical overflow */ + /*--------------------------------*/ + if (*status == OVERFLOW_ERR) + { + ffpmsg( + "Numerical overflow during type conversion while writing FITS data."); + *status = NUM_OVERFLOW; + } + + } /* end of Dec ALPHA special case */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpcnuk(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - number of column to write (1 = 1st col) */ + LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ + LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ + LONGLONG nelem, /* I - number of values to write */ + unsigned int *array, /* I - array of values to write */ + unsigned int nulvalue, /* I - value used to flag undefined pixels */ + int *status) /* IO - error status */ +/* + Write an array of elements to the specified column of a table. Any input + pixels equal to the value of nulvalue will be replaced by the appropriate + null value in the output FITS file. + + The input array of values will be converted to the datatype of the column + and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary +*/ +{ + tcolumn *colptr; + long ngood = 0, nbad = 0, ii; + LONGLONG repeat, first, fstelm, fstrow; + int tcode, overflow = 0; + + if (*status > 0) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + { + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + } + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + { + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column */ + colptr += (colnum - 1); /* offset to correct column structure */ + + tcode = colptr->tdatatype; + + if (tcode > 0) + repeat = colptr->trepeat; /* repeat count for this column */ + else + repeat = firstelem -1 + nelem; /* variable length arrays */ + + /* if variable length array, first write the whole input vector, + then go back and fill in the nulls */ + if (tcode < 0) { + if (ffpcluk(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { + if (*status == NUM_OVERFLOW) + { + /* ignore overflows, which are possibly the null pixel values */ + /* overflow = 1; */ + *status = 0; + } else { + return(*status); + } + } + } + + /* absolute element number in the column */ + first = (firstrow - 1) * repeat + firstelem; + + for (ii = 0; ii < nelem; ii++) + { + if (array[ii] != nulvalue) /* is this a good pixel? */ + { + if (nbad) /* write previous string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) + return(*status); + + nbad=0; + } + + ngood = ngood +1; /* the consecutive number of good pixels */ + } + else + { + if (ngood) /* write previous string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + if (ffpcluk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], + status) > 0) { + if (*status == NUM_OVERFLOW) + { + overflow = 1; + *status = 0; + } else { + return(*status); + } + } + } + ngood=0; + } + + nbad = nbad +1; /* the consecutive number of bad pixels */ + } + } + + /* finished loop; now just write the last set of pixels */ + + if (ngood) /* write last string of good pixels */ + { + fstelm = ii - ngood + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + if (tcode > 0) { /* variable length arrays have already been written */ + ffpcluk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); + } + } + else if (nbad) /* write last string of bad pixels */ + { + fstelm = ii - nbad + first; /* absolute element number */ + fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ + fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ + + ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); + } + + if (*status <= 0) { + if (overflow) { + *status = NUM_OVERFLOW; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfi1(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + unsigned char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > UCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DUCHAR_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = 0; + } + else if (dvalue > DUCHAR_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = UCHAR_MAX; + } + else + output[ii] = (unsigned char) (dvalue + .5); + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfi2(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + short *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > SHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DSHRT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MIN; + } + else if (dvalue > DSHRT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = SHRT_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (short) (dvalue + .5); + else + output[ii] = (short) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfi4(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + INT32BIT *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 2147483648.) + { + /* Instead of subtracting 2147483648, it is more efficient */ + /* to just flip the sign bit with the XOR operator */ + + for (ii = 0; ii < ntodo; ii++) + output[ii] = ( *(int *) &input[ii] ) ^ 0x80000000; + } + else if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + if (input[ii] > INT32_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + output[ii] = input[ii]; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DINT_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MIN; + } + else if (dvalue > DINT_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = INT32_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (INT32BIT) (dvalue + .5); + else + output[ii] = (INT32BIT) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfi8(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + LONGLONG *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + + if (dvalue < DLONGLONG_MIN) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MIN; + } + else if (dvalue > DLONGLONG_MAX) + { + *status = OVERFLOW_ERR; + output[ii] = LONGLONG_MAX; + } + else + { + if (dvalue >= 0) + output[ii] = (LONGLONG) (dvalue + .5); + else + output[ii] = (LONGLONG) (dvalue - .5); + } + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfr4(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + float *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (float) ((input[ii] - zero) / scale); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfr8(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + double *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do datatype conversion and scaling if required. +*/ +{ + long ii; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (double) input[ii]; + } + else + { + for (ii = 0; ii < ntodo; ii++) + output[ii] = (input[ii] - zero) / scale; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffuintfstr(unsigned int *input, /* I - array of values to be converted */ + long ntodo, /* I - number of elements in the array */ + double scale, /* I - FITS TSCALn or BSCALE value */ + double zero, /* I - FITS TZEROn or BZERO value */ + char *cform, /* I - format for output string values */ + long twidth, /* I - width of each field, in chars */ + char *output, /* O - output array of converted values */ + int *status) /* IO - error status */ +/* + Copy input to output prior to writing output to a FITS file. + Do scaling if required. +*/ +{ + long ii; + double dvalue; + + if (scale == 1. && zero == 0.) + { + for (ii = 0; ii < ntodo; ii++) + { + sprintf(output, cform, (double) input[ii]); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + else + { + for (ii = 0; ii < ntodo; ii++) + { + dvalue = (input[ii] - zero) / scale; + sprintf(output, cform, dvalue); + output += twidth; + + if (*output) /* if this char != \0, then overflow occurred */ + *status = OVERFLOW_ERR; + } + } + return(*status); +} diff --git a/software/cfitsio3040/putkey.c b/software/cfitsio3040/putkey.c new file mode 100644 index 000000000..79969e8d9 --- /dev/null +++ b/software/cfitsio3040/putkey.c @@ -0,0 +1,3046 @@ +/* This file, putkey.c, contains routines that write keywords to */ +/* a FITS header. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include +#include +/* stddef.h is apparently needed to define size_t */ +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffcrim(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + long *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + create an IMAGE extension following the current HDU. If the + current HDU is empty (contains no header keywords), then simply + write the required image (or primary array) keywords to the current + HDU. +*/ +{ + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* create new extension if current header is not empty */ + if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + ffcrhd(fptr, status); + + /* write the required header keywords */ + ffphpr(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcrimll(fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - bits per pixel */ + int naxis, /* I - number of axes in the array */ + LONGLONG *naxes, /* I - size of each axis */ + int *status) /* IO - error status */ +/* + create an IMAGE extension following the current HDU. If the + current HDU is empty (contains no header keywords), then simply + write the required image (or primary array) keywords to the current + HDU. +*/ +{ + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* create new extension if current header is not empty */ + if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + ffcrhd(fptr, status); + + /* write the required header keywords */ + ffphprll(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffcrtb(fitsfile *fptr, /* I - FITS file pointer */ + int tbltype, /* I - type of table to create */ + LONGLONG naxis2, /* I - number of rows in the table */ + int tfields, /* I - number of columns in the table */ + char **ttype, /* I - name of each column */ + char **tform, /* I - value of TFORMn keyword for each column */ + char **tunit, /* I - value of TUNITn keyword for each column */ + char *extnm, /* I - value of EXTNAME keyword, if any */ + int *status) /* IO - error status */ +/* + Create a table extension in a FITS file. +*/ +{ + LONGLONG naxis1 = 0; + long *tbcol = 0; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + /* create new extension if current header is not empty */ + if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + ffcrhd(fptr, status); + + if ((fptr->Fptr)->curhdu == 0) /* have to create dummy primary array */ + { + ffcrim(fptr, 16, 0, tbcol, status); + ffcrhd(fptr, status); + } + + if (tbltype == BINARY_TBL) + { + /* write the required header keywords. This will write PCOUNT = 0 */ + ffphbn(fptr, naxis2, tfields, ttype, tform, tunit, extnm, 0, status); + } + else if (tbltype == ASCII_TBL) + { + /* write the required header keywords */ + /* default values for naxis1 and tbcol will be calculated */ + ffphtb(fptr, naxis1, naxis2, tfields, ttype, tbcol, tform, tunit, + extnm, status); + } + else + *status = NOT_TABLE; + + return(*status); +} +/*-------------------------------------------------------------------------*/ +int ffpktp(fitsfile *fptr, /* I - FITS file pointer */ + const char *filename, /* I - name of template file */ + int *status) /* IO - error status */ +/* + read keywords from template file and append to the FITS file +*/ +{ + FILE *diskfile; + char card[FLEN_CARD], template[161]; + char keyname[FLEN_KEYWORD], newname[FLEN_KEYWORD]; + int keytype; + size_t slen; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + diskfile = fopen(filename,"r"); + if (!diskfile) /* couldn't open file */ + { + ffpmsg("ffpktp could not open the following template file:"); + ffpmsg(filename); + return(*status = FILE_NOT_OPENED); + } + + while (fgets(template, 160, diskfile) ) /* get next template line */ + { + template[160] = '\0'; /* make sure string is terminated */ + slen = strlen(template); /* get string length */ + template[slen - 1] = '\0'; /* over write the 'newline' char */ + + if (ffgthd(template, card, &keytype, status) > 0) /* parse template */ + break; + + strncpy(keyname, card, 8); + keyname[8] = '\0'; + + if (keytype == -2) /* rename the card */ + { + strncpy(newname, &card[40], 8); + newname[8] = '\0'; + + ffmnam(fptr, keyname, newname, status); + } + else if (keytype == -1) /* delete the card */ + { + ffdkey(fptr, keyname, status); + } + else if (keytype == 0) /* update the card */ + { + ffucrd(fptr, keyname, card, status); + } + else if (keytype == 1) /* append the card */ + { + ffprec(fptr, card, status); + } + else /* END card; stop here */ + { + break; + } + } + + fclose(diskfile); /* close the template file */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpky( fitsfile *fptr, /* I - FITS file pointer */ + int datatype, /* I - datatype of the value */ + char *keyname, /* I - name of keyword to write */ + void *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes a keyword value with the datatype specified by the 2nd argument. +*/ +{ + char errmsg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (datatype == TSTRING) + { + ffpkys(fptr, keyname, (char *) value, comm, status); + } + else if (datatype == TBYTE) + { + ffpkyj(fptr, keyname, (LONGLONG) *(unsigned char *) value, comm, status); + } + else if (datatype == TSBYTE) + { + ffpkyj(fptr, keyname, (LONGLONG) *(signed char *) value, comm, status); + } + else if (datatype == TUSHORT) + { + ffpkyj(fptr, keyname, (LONGLONG) *(unsigned short *) value, comm, status); + } + else if (datatype == TSHORT) + { + ffpkyj(fptr, keyname, (LONGLONG) *(short *) value, comm, status); + } + else if (datatype == TUINT) + { + ffpkyg(fptr, keyname, (double) *(unsigned int *) value, 0, + comm, status); + } + else if (datatype == TINT) + { + ffpkyj(fptr, keyname, (LONGLONG) *(int *) value, comm, status); + } + else if (datatype == TLOGICAL) + { + ffpkyl(fptr, keyname, *(int *) value, comm, status); + } + else if (datatype == TULONG) + { + ffpkyg(fptr, keyname, (double) *(unsigned long *) value, 0, + comm, status); + } + else if (datatype == TLONG) + { + ffpkyj(fptr, keyname, (LONGLONG) *(long *) value, comm, status); + } + else if (datatype == TLONGLONG) + { + ffpkyj(fptr, keyname, *(LONGLONG *) value, comm, status); + } + else if (datatype == TFLOAT) + { + ffpkye(fptr, keyname, *(float *) value, -7, comm, status); + } + else if (datatype == TDOUBLE) + { + ffpkyd(fptr, keyname, *(double *) value, -15, comm, status); + } + else if (datatype == TCOMPLEX) + { + ffpkyc(fptr, keyname, (float *) value, -7, comm, status); + } + else if (datatype == TDBLCOMPLEX) + { + ffpkym(fptr, keyname, (double *) value, -15, comm, status); + } + else + { + sprintf(errmsg, "Bad keyword datatype code: %d (ffpky)", datatype); + ffpmsg(errmsg); + *status = BAD_DATATYPE; + } + + return(*status); +} +/*-------------------------------------------------------------------------*/ +int ffprec(fitsfile *fptr, /* I - FITS file pointer */ + const char *card, /* I - string to be written */ + int *status) /* IO - error status */ +/* + write a keyword record (80 bytes long) to the end of the header +*/ +{ + char tcard[FLEN_CARD]; + size_t len, ii; + long nblocks; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ( ((fptr->Fptr)->datastart - (fptr->Fptr)->headend) == 80) /* no room */ + { + nblocks = 1; + if (ffiblk(fptr, nblocks, 0, status) > 0) /* insert 2880-byte block */ + return(*status); + } + + strncpy(tcard,card,80); + tcard[80] = '\0'; + + len = strlen(tcard); + for (ii=len; ii < 80; ii++) /* fill card with spaces if necessary */ + tcard[ii] = ' '; + + for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ + tcard[ii] = toupper(tcard[ii]); + + fftkey(tcard, status); /* test keyword name contains legal chars */ + + fftrec(tcard, status); /* test rest of keyword for legal chars */ + + ffmbyt(fptr, (fptr->Fptr)->headend, IGNORE_EOF, status); /* move to end */ + + ffpbyt(fptr, 80, tcard, status); /* write the 80 byte card */ + + if (*status <= 0) + (fptr->Fptr)->headend += 80; /* update end-of-header position */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyu( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) a null-valued keyword and comment into the FITS header. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring," "); /* create a dummy value string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword */ + ffprec(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkys( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + The value string will be truncated at 68 characters which is the + maximum length that will fit on a single FITS keyword. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffs2c(value, valstring, status); /* put quotes around the string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword */ + ffprec(fptr, card, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkls( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + char *value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + This routine is a modified version of ffpkys which supports the + HEASARC long string convention and can write arbitrarily long string + keyword values. The value is continued over multiple keywords that + have the name COMTINUE without an equal sign in column 9 of the card. + This routine also supports simple string keywords which are less than + 69 characters in length. +*/ +{ + char valstring[FLEN_CARD]; + char card[FLEN_CARD]; + char tstring[FLEN_CARD], *cptr; + int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + remain = maxvalue(strlen(value), 1); /* no. of chars to write (at least 1) */ + /* count the number of single quote characters are in the string */ + tstring[0] = '\0'; + strncat(tstring, value, 68); /* copy 1st part of string to temp buff */ + nquote = 0; + cptr = strchr(tstring, '\''); /* search for quote character */ + while (cptr) /* search for quote character */ + { + nquote++; /* increment no. of quote characters */ + cptr++; /* increment pointer to next character */ + cptr = strchr(cptr, '\''); /* search for another quote char */ + } + + cptr = keyname; + while(*cptr == ' ') /* skip over leading spaces in name */ + cptr++; + + /* determine the number of characters that will fit on the line */ + /* Note: each quote character is expanded to 2 quotes */ + + namelen = strlen(cptr); + if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) + { + /* This a normal 8-character FITS keyword */ + nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ + } + else + { + /* This a HIERARCH keyword */ + if (FSTRNCMP(cptr, "HIERARCH ", 9) && + FSTRNCMP(cptr, "hierarch ", 9)) + nchar = 66 - nquote - namelen; + else + nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ + + } + + contin = 0; + next = 0; /* pointer to next character to write */ + + while (remain > 0) + { + tstring[0] = '\0'; + strncat(tstring, &value[next], nchar); /* copy string to temp buff */ + ffs2c(tstring, valstring, status); /* put quotes around the string */ + + if (remain > nchar) /* if string is continued, put & as last char */ + { + vlen = strlen(valstring); + nchar -= 1; /* outputting one less character now */ + + if (valstring[vlen-2] != '\'') + valstring[vlen-2] = '&'; /* over write last char with & */ + else + { /* last char was a pair of single quotes, so over write both */ + valstring[vlen-3] = '&'; + valstring[vlen-1] = '\0'; + } + } + + if (contin) /* This is a CONTINUEd keyword */ + { + ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ + strncpy(&card[8], " ", 2); /* overwrite the '=' */ + } + else + { + ffmkky(keyname, valstring, comm, card, status); /* make keyword */ + } + + ffprec(fptr, card, status); /* write the keyword */ + + contin = 1; + remain -= nchar; + next += nchar; + + if (remain > 0) + { + /* count the number of single quote characters in next section */ + tstring[0] = '\0'; + strncat(tstring, &value[next], 68); /* copy next part of string */ + nquote = 0; + cptr = strchr(tstring, '\''); /* search for quote character */ + while (cptr) /* search for quote character */ + { + nquote++; /* increment no. of quote characters */ + cptr++; /* increment pointer to next character */ + cptr = strchr(cptr, '\''); /* search for another quote char */ + } + nchar = 68 - nquote; /* max number of chars to write this time */ + } + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffplsw( fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Write the LONGSTRN keyword and a series of related COMMENT keywords + which document that this FITS header may contain long string keyword + values which are continued over multiple keywords using the HEASARC + long string keyword convention. If the LONGSTRN keyword already exists + then this routine simple returns without doing anything. +*/ +{ + char valstring[FLEN_VALUE], comm[FLEN_COMMENT]; + int tstatus; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + tstatus = 0; + if (ffgkys(fptr, "LONGSTRN", valstring, comm, &tstatus) == 0) + return(*status); /* keyword already exists, so just return */ + + ffpkys(fptr, "LONGSTRN", "OGIP 1.0", + "The HEASARC Long String Convention may be used.", status); + + ffpcom(fptr, + " This FITS file may contain long string keyword values that are", status); + + ffpcom(fptr, + " continued over multiple keywords. The HEASARC convention uses the &", + status); + + ffpcom(fptr, + " character at the end of each substring which is then continued", status); + + ffpcom(fptr, + " on the next keyword which has the name CONTINUE.", status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyl( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + int value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Values equal to 0 will result in a False FITS keyword; any other + non-zero value will result in a True FITS keyword. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffl2c(value, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + LONGLONG value, /* I - keyword value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an integer keyword value. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffi2c(value, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyf( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + float value, /* I - keyword value */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes a fixed float keyword value. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffr2f(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkye( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + float value, /* I - keyword value */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an exponential float keyword value. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffr2e(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyg( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + double value, /* I - keyword value */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes a fixed double keyword value.*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffd2f(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyd( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + double value, /* I - keyword value */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an exponential double keyword value.*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffd2e(value, decim, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyc( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + float *value, /* I - keyword value (real, imaginary) */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an complex float keyword value. Format = (realvalue, imagvalue) +*/ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffr2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkym( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + double *value, /* I - keyword value (real, imaginary) */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an complex double keyword value. Format = (realvalue, imagvalue) +*/ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffd2e(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2e(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkfc( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + float *value, /* I - keyword value (real, imaginary) */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an complex float keyword value. Format = (realvalue, imagvalue) +*/ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffr2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffr2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkfm( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + double *value, /* I - keyword value (real, imaginary) */ + int decim, /* I - number of decimal places to display */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) the keyword, value and comment into the FITS header. + Writes an complex double keyword value. Format = (realvalue, imagvalue) +*/ +{ + char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; + char card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + strcpy(valstring, "(" ); + ffd2f(value[0], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ", "); + ffd2f(value[1], decim, tmpstring, status); /* convert to string */ + strcat(valstring, tmpstring); + strcat(valstring, ")"); + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkyt( fitsfile *fptr, /* I - FITS file pointer */ + char *keyname, /* I - name of keyword to write */ + long intval, /* I - integer part of value */ + double fraction, /* I - fractional part of value */ + char *comm, /* I - keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) a 'triple' precision keyword where the integer and + fractional parts of the value are passed in separate parameters to + increase the total amount of numerical precision. +*/ +{ + char valstring[FLEN_VALUE]; + char card[FLEN_CARD]; + char fstring[20], *cptr; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (fraction > 1. || fraction < 0.) + { + ffpmsg("fraction must be between 0. and 1. (ffpkyt)"); + return(*status = BAD_F2C); + } + + ffi2c(intval, valstring, status); /* convert integer to string */ + ffd2f(fraction, 16, fstring, status); /* convert to 16 decimal string */ + + cptr = strchr(fstring, '.'); /* find the decimal point */ + strcat(valstring, cptr); /* append the fraction to the integer */ + + ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ + ffprec(fptr, card, status); /* write the keyword*/ + + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffpcom( fitsfile *fptr, /* I - FITS file pointer */ + const char *comm, /* I - comment string */ + int *status) /* IO - error status */ +/* + Write 1 or more COMMENT keywords. If the comment string is too + long to fit on a single keyword (72 chars) then it will automatically + be continued on multiple CONTINUE keywords. +*/ +{ + char card[FLEN_CARD]; + int len, ii; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + len = strlen(comm); + ii = 0; + + for (; len > 0; len -= 72) + { + strcpy(card, "COMMENT "); + strncat(card, &comm[ii], 72); + ffprec(fptr, card, status); + ii += 72; + } + + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffphis( fitsfile *fptr, /* I - FITS file pointer */ + const char *history, /* I - history string */ + int *status) /* IO - error status */ +/* + Write 1 or more HISTORY keywords. If the history string is too + long to fit on a single keyword (72 chars) then it will automatically + be continued on multiple HISTORY keywords. +*/ +{ + char card[FLEN_CARD]; + int len, ii; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + len = strlen(history); + ii = 0; + + for (; len > 0; len -= 72) + { + strcpy(card, "HISTORY "); + strncat(card, &history[ii], 72); + ffprec(fptr, card, status); + ii += 72; + } + + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffpdat( fitsfile *fptr, /* I - FITS file pointer */ + int *status) /* IO - error status */ +/* + Write the DATE keyword into the FITS header. If the keyword already + exists then the date will simply be updated in the existing keyword. +*/ +{ + int timeref; + char date[30], tmzone[10], card[FLEN_CARD]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + ffgstm(date, &timeref, status); + + if (timeref) /* GMT not available on this machine */ + strcpy(tmzone, " Local"); + else + strcpy(tmzone, " UT"); + + strcpy(card, "DATE = '"); + strcat(card, date); + strcat(card, "' / file creation date (YYYY-MM-DDThh:mm:ss"); + strcat(card, tmzone); + strcat(card, ")"); + + ffucrd(fptr, "DATE", card, status); + + return(*status); +} +/*-------------------------------------------------------------------*/ +int ffverifydate(int year, /* I - year (0 - 9999) */ + int month, /* I - month (1 - 12) */ + int day, /* I - day (1 - 31) */ + int *status) /* IO - error status */ +/* + Verify that the date is valid +*/ +{ + int ndays[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; + char errmsg[81]; + + + if (year < 0 || year > 9999) + { + sprintf(errmsg, + "input year value = %d is out of range 0 - 9999", year); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + else if (month < 1 || month > 12) + { + sprintf(errmsg, + "input month value = %d is out of range 1 - 12", month); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + + if (ndays[month] == 31) { + if (day < 1 || day > 31) + { + sprintf(errmsg, + "input day value = %d is out of range 1 - 31 for month %d", day, month); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + } else if (ndays[month] == 30) { + if (day < 1 || day > 30) + { + sprintf(errmsg, + "input day value = %d is out of range 1 - 30 for month %d", day, month); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + } else { + if (day < 1 || day > 28) + { + if (day == 29) + { + /* year is a leap year if it is divisible by 4 but not by 100, + except years divisible by 400 are leap years + */ + if ((year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0) + return (*status); + + sprintf(errmsg, + "input day value = %d is out of range 1 - 28 for February %d (not leap year)", day, year); + ffpmsg(errmsg); + } else { + sprintf(errmsg, + "input day value = %d is out of range 1 - 28 (or 29) for February", day); + ffpmsg(errmsg); + } + + return(*status = BAD_DATE); + } + } + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffgstm( char *timestr, /* O - returned system date and time string */ + int *timeref, /* O - GMT = 0, Local time = 1 */ + int *status) /* IO - error status */ +/* + Returns the current date and time in format 'yyyy-mm-ddThh:mm:ss'. +*/ +{ + time_t tp; + struct tm *ptr; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + time(&tp); + ptr = gmtime(&tp); /* get GMT (= UTC) time */ + + if (timeref) + { + if (ptr) + *timeref = 0; /* returning GMT */ + else + *timeref = 1; /* returning local time */ + } + + if (!ptr) /* GMT not available on this machine */ + ptr = localtime(&tp); + + strftime(timestr, 25, "%Y-%m-%dT%H:%M:%S", ptr); + + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffdt2s(int year, /* I - year (0 - 9999) */ + int month, /* I - month (1 - 12) */ + int day, /* I - day (1 - 31) */ + char *datestr, /* O - date string: "YYYY-MM-DD" */ + int *status) /* IO - error status */ +/* + Construct a date character string +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + *datestr = '\0'; + + if (ffverifydate(year, month, day, status) > 0) + { + ffpmsg("invalid date (ffdt2s)"); + return(*status); + } + + if (year >= 1900 && year <= 1998) /* use old 'dd/mm/yy' format */ + sprintf(datestr, "%.2d/%.2d/%.2d", day, month, year - 1900); + + else /* use the new 'YYYY-MM-DD' format */ + sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day); + + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffs2dt(char *datestr, /* I - date string: "YYYY-MM-DD" or "dd/mm/yy" */ + int *year, /* O - year (0 - 9999) */ + int *month, /* O - month (1 - 12) */ + int *day, /* O - day (1 - 31) */ + int *status) /* IO - error status */ +/* + Parse a date character string into year, month, and day values +*/ +{ + int slen, lyear, lmonth, lday; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (year) + *year = 0; + if (month) + *month = 0; + if (day) + *day = 0; + + if (!datestr) + { + ffpmsg("error: null input date string (ffs2dt)"); + return(*status = BAD_DATE); /* Null datestr pointer ??? */ + } + + slen = strlen(datestr); + + if (slen == 8 && datestr[2] == '/' && datestr[5] == '/') + { + if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) + && isdigit((int) datestr[3]) && isdigit((int) datestr[4]) + && isdigit((int) datestr[6]) && isdigit((int) datestr[7]) ) + { + /* this is an old format string: "dd/mm/yy" */ + lyear = atoi(&datestr[6]) + 1900; + lmonth = atoi(&datestr[3]); + lday = atoi(datestr); + + if (year) + *year = lyear; + if (month) + *month = lmonth; + if (day) + *day = lday; + } + else + { + ffpmsg("input date string has illegal format (ffs2dt):"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + } + else if (slen >= 10 && datestr[4] == '-' && datestr[7] == '-') + { + if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) + && isdigit((int) datestr[2]) && isdigit((int) datestr[3]) + && isdigit((int) datestr[5]) && isdigit((int) datestr[6]) + && isdigit((int) datestr[8]) && isdigit((int) datestr[9]) ) + { + if (slen > 10 && datestr[10] != 'T') + { + ffpmsg("input date string has illegal format (ffs2dt):"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + /* this is a new format string: "yyyy-mm-dd" */ + lyear = atoi(datestr); + lmonth = atoi(&datestr[5]); + lday = atoi(&datestr[8]); + + if (year) + *year = lyear; + if (month) + *month = lmonth; + if (day) + *day = lday; + } + else + { + ffpmsg("input date string has illegal format (ffs2dt):"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + } + else + { + ffpmsg("input date string has illegal format (ffs2dt):"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + + if (ffverifydate(lyear, lmonth, lday, status) > 0) + { + ffpmsg("invalid date (ffs2dt)"); + } + + return(*status); +} +/*-----------------------------------------------------------------*/ +int fftm2s(int year, /* I - year (0 - 9999) */ + int month, /* I - month (1 - 12) */ + int day, /* I - day (1 - 31) */ + int hour, /* I - hour (0 - 23) */ + int minute, /* I - minute (0 - 59) */ + double second, /* I - second (0. - 60.9999999) */ + int decimals, /* I - number of decimal points to write */ + char *datestr, /* O - date string: "YYYY-MM-DDThh:mm:ss.ddd" */ + /* or "hh:mm:ss.ddd" if year, month day = 0 */ + int *status) /* IO - error status */ +/* + Construct a date and time character string +*/ +{ + int width; + char errmsg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + *datestr='\0'; + + if (year != 0 || month != 0 || day !=0) + { + if (ffverifydate(year, month, day, status) > 0) + { + ffpmsg("invalid date (fftm2s)"); + return(*status); + } + } + + if (hour < 0 || hour > 23) + { + sprintf(errmsg, + "input hour value is out of range 0 - 23: %d (fftm2s)", hour); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + else if (minute < 0 || minute > 59) + { + sprintf(errmsg, + "input minute value is out of range 0 - 59: %d (fftm2s)", minute); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + else if (second < 0. || second >= 61) + { + sprintf(errmsg, + "input second value is out of range 0 - 60.999: %f (fftm2s)", second); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + else if (decimals > 25) + { + sprintf(errmsg, + "input decimals value is out of range 0 - 25: %d (fftm2s)", decimals); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + + if (decimals == 0) + width = 2; + else + width = decimals + 3; + + if (decimals < 0) + { + /* a negative decimals value means return only the date, not time */ + sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day); + } + else if (year == 0 && month == 0 && day == 0) + { + /* return only the time, not the date */ + sprintf(datestr, "%.2d:%.2d:%0*.*f", + hour, minute, width, decimals, second); + } + else + { + /* return both the time and date */ + sprintf(datestr, "%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f", + year, month, day, hour, minute, width, decimals, second); + } + return(*status); +} +/*-----------------------------------------------------------------*/ +int ffs2tm(char *datestr, /* I - date string: "YYYY-MM-DD" */ + /* or "YYYY-MM-DDThh:mm:ss.ddd" */ + /* or "dd/mm/yy" */ + int *year, /* O - year (0 - 9999) */ + int *month, /* O - month (1 - 12) */ + int *day, /* O - day (1 - 31) */ + int *hour, /* I - hour (0 - 23) */ + int *minute, /* I - minute (0 - 59) */ + double *second, /* I - second (0. - 60.9999999) */ + int *status) /* IO - error status */ +/* + Parse a date character string into date and time values +*/ +{ + int slen; + char errmsg[81]; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (year) + *year = 0; + if (month) + *month = 0; + if (day) + *day = 0; + if (hour) + *hour = 0; + if (minute) + *minute = 0; + if (second) + *second = 0.; + + if (!datestr) + { + ffpmsg("error: null input date string (ffs2tm)"); + return(*status = BAD_DATE); /* Null datestr pointer ??? */ + } + + if (datestr[2] == '/' || datestr[4] == '-') + { + /* Parse the year, month, and date */ + if (ffs2dt(datestr, year, month, day, status) > 0) + return(*status); + + slen = strlen(datestr); + if (slen == 8 || slen == 10) + return(*status); /* OK, no time fields */ + else if (slen < 19) + { + ffpmsg("input date string has illegal format:"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + else if (datestr[10] == 'T' && datestr[13] == ':' && datestr[16] == ':') + { + if (isdigit((int) datestr[11]) && isdigit((int) datestr[12]) + && isdigit((int) datestr[14]) && isdigit((int) datestr[15]) + && isdigit((int) datestr[17]) && isdigit((int) datestr[18]) ) + { + if (slen > 19 && datestr[19] != '.') + { + ffpmsg("input date string has illegal format:"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + /* this is a new format string: "yyyy-mm-ddThh:mm:ss.dddd" */ + if (hour) + *hour = atoi(&datestr[11]); + + if (minute) + *minute = atoi(&datestr[14]); + + if (second) + *second = atof(&datestr[17]); + } + else + { + ffpmsg("input date string has illegal format:"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + } + } + else /* no date fields */ + { + if (datestr[2] == ':' && datestr[5] == ':') /* time string */ + { + if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) + && isdigit((int) datestr[3]) && isdigit((int) datestr[4]) + && isdigit((int) datestr[6]) && isdigit((int) datestr[7]) ) + { + /* this is a time string: "hh:mm:ss.dddd" */ + if (hour) + *hour = atoi(&datestr[0]); + + if (minute) + *minute = atoi(&datestr[3]); + + if (second) + *second = atof(&datestr[6]); + } + else + { + ffpmsg("input date string has illegal format:"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + } + else + { + ffpmsg("input date string has illegal format:"); + ffpmsg(datestr); + return(*status = BAD_DATE); + } + + } + + if (hour) + if (*hour < 0 || *hour > 23) + { + sprintf(errmsg, + "hour value is out of range 0 - 23: %d (ffs2tm)", *hour); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + + if (minute) + if (*minute < 0 || *minute > 59) + { + sprintf(errmsg, + "minute value is out of range 0 - 59: %d (ffs2tm)", *minute); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + + if (second) + if (*second < 0 || *second >= 61.) + { + sprintf(errmsg, + "second value is out of range 0 - 60.9999: %f (ffs2tm)", *second); + ffpmsg(errmsg); + return(*status = BAD_DATE); + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgsdt( int *day, int *month, int *year, int *status ) +{ +/* + This routine is included for backward compatibility + with the Fortran FITSIO library. + + ffgsdt : Get current System DaTe (GMT if available) + + Return integer values of the day, month, and year + + Function parameters: + day Day of the month + month Numerical month (1=Jan, etc.) + year Year (1999, 2000, etc.) + status output error status + +*/ + time_t now; + struct tm *date; + + now = time( NULL ); + date = gmtime(&now); /* get GMT (= UTC) time */ + + if (!date) /* GMT not available on this machine */ + { + date = localtime(&now); + } + + *day = date->tm_mday; + *month = date->tm_mon + 1; + *year = date->tm_year + 1900; /* tm_year is defined as years since 1900 */ + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int ffpkns( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + char *value[], /* I - array of pointers to keyword values */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes string keywords. + The value strings will be truncated at 68 characters, and the HEASARC + long string keyword convention is not supported by this routine. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkys(fptr, keyname, value[ii], tcomment, status); + else + ffpkys(fptr, keyname, value[ii], comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpknl( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + int *value, /* I - array of keyword values */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes logical keywords + Values equal to zero will be written as a False FITS keyword value; any + other non-zero value will result in a True FITS keyword. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + + if (repeat) + ffpkyl(fptr, keyname, value[ii], tcomment, status); + else + ffpkyl(fptr, keyname, value[ii], comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpknj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + long *value, /* I - array of keyword values */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkyj(fptr, keyname, value[ii], tcomment, status); + else + ffpkyj(fptr, keyname, value[ii], comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpknjj( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + LONGLONG *value, /* I - array of keyword values */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkyj(fptr, keyname, value[ii], tcomment, status); + else + ffpkyj(fptr, keyname, value[ii], comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpknf( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + float *value, /* I - array of keyword values */ + int decim, /* I - number of decimals to display */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes fixed float values. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkyf(fptr, keyname, value[ii], decim, tcomment, status); + else + ffpkyf(fptr, keyname, value[ii], decim, comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkne( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + float *value, /* I - array of keyword values */ + int decim, /* I - number of decimals to display */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes exponential float values. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkye(fptr, keyname, value[ii], decim, tcomment, status); + else + ffpkye(fptr, keyname, value[ii], decim, comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpkng( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + double *value, /* I - array of keyword values */ + int decim, /* I - number of decimals to display */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes fixed double values. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkyg(fptr, keyname, value[ii], decim, tcomment, status); + else + ffpkyg(fptr, keyname, value[ii], decim, comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpknd( fitsfile *fptr, /* I - FITS file pointer */ + char *keyroot, /* I - root name of keywords to write */ + int nstart, /* I - starting index number */ + int nkey, /* I - number of keywords to write */ + double *value, /* I - array of keyword values */ + int decim, /* I - number of decimals to display */ + char *comm[], /* I - array of pointers to keyword comment */ + int *status) /* IO - error status */ +/* + Write (put) an indexed array of keywords with index numbers between + NSTART and (NSTART + NKEY -1) inclusive. Writes exponential double values. +*/ +{ + char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; + int ii, jj, repeat, len; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + /* check if first comment string is to be repeated for all the keywords */ + /* by looking to see if the last non-blank character is a '&' char */ + + repeat = 0; + + if (comm) + { + len = strlen(comm[0]); + + while (len > 0 && comm[0][len - 1] == ' ') + len--; /* ignore trailing blanks */ + + if (comm[0][len - 1] == '&') + { + len = minvalue(len, FLEN_COMMENT); + tcomment[0] = '\0'; + strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ + repeat = 1; + } + } + else + { + repeat = 1; + tcomment[0] = '\0'; + } + + for (ii=0, jj=nstart; ii < nkey; ii++, jj++) + { + ffkeyn(keyroot, jj, keyname, status); + if (repeat) + ffpkyd(fptr, keyname, value[ii], decim, tcomment, status); + else + ffpkyd(fptr, keyname, value[ii], decim, comm[ii], status); + + if (*status > 0) + return(*status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffptdm( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int naxis, /* I - number of axes in the data array */ + long naxes[], /* I - length of each data axis */ + int *status) /* IO - error status */ +/* + write the TDIMnnn keyword describing the dimensionality of a column +*/ +{ + char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE], comm[FLEN_COMMENT]; + char value[80], message[81]; + int ii; + long totalpix = 1, repeat; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + if (colnum < 1 || colnum > 999) + { + ffpmsg("column number is out of range 1 - 999 (ffptdm)"); + return(*status = BAD_COL_NUM); + } + + if (naxis < 1) + { + ffpmsg("naxis is less than 1 (ffptdm)"); + return(*status = BAD_DIMEN); + } + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ( (fptr->Fptr)->hdutype != BINARY_TBL) + { + ffpmsg( + "Error: The TDIMn keyword is only allowed in BINTABLE extensions (ffptdm)"); + return(*status = NOT_BTABLE); + } + + strcpy(tdimstr, "("); /* start constructing the TDIM value */ + + for (ii = 0; ii < naxis; ii++) + { + if (ii > 0) + strcat(tdimstr, ","); /* append the comma separator */ + + if (naxes[ii] < 0) + { + ffpmsg("one or more TDIM values are less than 0 (ffptdm)"); + return(*status = BAD_TDIM); + } + + sprintf(value, "%ld", naxes[ii]); + strcat(tdimstr, value); /* append the axis size */ + + totalpix *= naxes[ii]; + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* point to the specified column number */ + + if ((long) colptr->trepeat != totalpix) + { + /* There is an apparent inconsistency between TDIMn and TFORMn. */ + /* The colptr->trepeat value may be out of date, so re-read */ + /* the TFORMn keyword to be sure. */ + + ffkeyn("TFORM", colnum, keyname, status); /* construct TFORMn name */ + ffgkys(fptr, keyname, value, NULL, status); /* read TFORMn keyword */ + ffbnfm(value, NULL, &repeat, NULL, status); /* parse the repeat count */ + + if (*status > 0 || repeat != totalpix) + { + sprintf(message, + "column vector length, %ld, does not equal TDIMn array size, %ld", + (long) colptr->trepeat, totalpix); + ffpmsg(message); + return(*status = BAD_TDIM); + } + } + + strcat(tdimstr, ")" ); /* append the closing parenthesis */ + + strcpy(comm, "size of the multidimensional array"); + ffkeyn("TDIM", colnum, keyname, status); /* construct TDIMn name */ + ffpkys(fptr, keyname, tdimstr, comm, status); /* write the keyword */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffptdmll( fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number */ + int naxis, /* I - number of axes in the data array */ + LONGLONG naxes[], /* I - length of each data axis */ + int *status) /* IO - error status */ +/* + write the TDIMnnn keyword describing the dimensionality of a column +*/ +{ + char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE], comm[FLEN_COMMENT]; + char value[80], message[81]; + int ii; + LONGLONG totalpix = 1, repeat; + tcolumn *colptr; + + if (*status > 0) + return(*status); + + if (colnum < 1 || colnum > 999) + { + ffpmsg("column number is out of range 1 - 999 (ffptdm)"); + return(*status = BAD_COL_NUM); + } + + if (naxis < 1) + { + ffpmsg("naxis is less than 1 (ffptdm)"); + return(*status = BAD_DIMEN); + } + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) + if ( ffrdef(fptr, status) > 0) /* rescan header */ + return(*status); + + if ( (fptr->Fptr)->hdutype != BINARY_TBL) + { + ffpmsg( + "Error: The TDIMn keyword is only allowed in BINTABLE extensions (ffptdm)"); + return(*status = NOT_BTABLE); + } + + strcpy(tdimstr, "("); /* start constructing the TDIM value */ + + for (ii = 0; ii < naxis; ii++) + { + if (ii > 0) + strcat(tdimstr, ","); /* append the comma separator */ + + if (naxes[ii] < 0) + { + ffpmsg("one or more TDIM values are less than 0 (ffptdm)"); + return(*status = BAD_TDIM); + } + + /* cast to double because the 64-bit int conversion character in */ + /* sprintf is platform dependent ( %lld, %ld, %I64d ) */ + + sprintf(value, "%.0f", (double) naxes[ii]); + + strcat(tdimstr, value); /* append the axis size */ + + totalpix *= naxes[ii]; + } + + colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ + colptr += (colnum - 1); /* point to the specified column number */ + + if ( colptr->trepeat != totalpix) + { + /* There is an apparent inconsistency between TDIMn and TFORMn. */ + /* The colptr->trepeat value may be out of date, so re-read */ + /* the TFORMn keyword to be sure. */ + + ffkeyn("TFORM", colnum, keyname, status); /* construct TFORMn name */ + ffgkys(fptr, keyname, value, NULL, status); /* read TFORMn keyword */ + ffbnfmll(value, NULL, &repeat, NULL, status); /* parse the repeat count */ + + if (*status > 0 || repeat != totalpix) + { + sprintf(message, + "column vector length, %.0f, does not equal TDIMn array size, %.0f", + (double) (colptr->trepeat), (double) totalpix); + ffpmsg(message); + return(*status = BAD_TDIM); + } + } + + strcat(tdimstr, ")" ); /* append the closing parenthesis */ + + strcpy(comm, "size of the multidimensional array"); + ffkeyn("TDIM", colnum, keyname, status); /* construct TDIMn name */ + ffpkys(fptr, keyname, tdimstr, comm, status); /* write the keyword */ + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphps( fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - number of bits per data value pixel */ + int naxis, /* I - number of axes in the data array */ + long naxes[], /* I - length of each data axis */ + int *status) /* IO - error status */ +/* + write STANDARD set of required primary header keywords +*/ +{ + int simple = 1; /* does file conform to FITS standard? 1/0 */ + long pcount = 0; /* number of group parameters (usually 0) */ + long gcount = 1; /* number of random groups (usually 1 or 0) */ + int extend = 1; /* may FITS file have extensions? */ + + ffphpr(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphpsll( fitsfile *fptr, /* I - FITS file pointer */ + int bitpix, /* I - number of bits per data value pixel */ + int naxis, /* I - number of axes in the data array */ + LONGLONG naxes[], /* I - length of each data axis */ + int *status) /* IO - error status */ +/* + write STANDARD set of required primary header keywords +*/ +{ + int simple = 1; /* does file conform to FITS standard? 1/0 */ + LONGLONG pcount = 0; /* number of group parameters (usually 0) */ + LONGLONG gcount = 1; /* number of random groups (usually 1 or 0) */ + int extend = 1; /* may FITS file have extensions? */ + + ffphprll(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status); + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphpr( fitsfile *fptr, /* I - FITS file pointer */ + int simple, /* I - does file conform to FITS standard? 1/0 */ + int bitpix, /* I - number of bits per data value pixel */ + int naxis, /* I - number of axes in the data array */ + long naxes[], /* I - length of each data axis */ + LONGLONG pcount, /* I - number of group parameters (usually 0) */ + LONGLONG gcount, /* I - number of random groups (usually 1 or 0) */ + int extend, /* I - may FITS file have extensions? */ + int *status) /* IO - error status */ +/* + write required primary header keywords +*/ +{ + int ii; + LONGLONG naxesll[20]; + + for (ii = 0; (ii < naxis) && (ii < 20); ii++) + naxesll[ii] = naxes[ii]; + + ffphprll(fptr, simple, bitpix, naxis, naxesll, pcount, gcount, + extend, status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphprll( fitsfile *fptr, /* I - FITS file pointer */ + int simple, /* I - does file conform to FITS standard? 1/0 */ + int bitpix, /* I - number of bits per data value pixel */ + int naxis, /* I - number of axes in the data array */ + LONGLONG naxes[], /* I - length of each data axis */ + LONGLONG pcount, /* I - number of group parameters (usually 0) */ + LONGLONG gcount, /* I - number of random groups (usually 1 or 0) */ + int extend, /* I - may FITS file have extensions? */ + int *status) /* IO - error status */ +/* + write required primary header keywords +*/ +{ + int ii; + long longbitpix, tnaxes[20]; + char name[FLEN_KEYWORD], comm[FLEN_COMMENT], message[FLEN_ERRMSG]; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + return(*status = HEADER_NOT_EMPTY); + + if (naxis != 0) /* never try to compress a null image */ + { + if ( (fptr->Fptr)->request_compress_type ) + { + + for (ii = 0; ii < naxis; ii++) + tnaxes[ii] = (long) naxes[ii]; + + /* write header for a compressed image */ + imcomp_init_table(fptr, bitpix, naxis, tnaxes, 1, status); + return(*status); + } + } + + if ((fptr->Fptr)->curhdu == 0) + { /* write primary array header */ + if (simple) + strcpy(comm, "file does conform to FITS standard"); + else + strcpy(comm, "file does not conform to FITS standard"); + + ffpkyl(fptr, "SIMPLE", simple, comm, status); + } + else + { /* write IMAGE extension header */ + strcpy(comm, "IMAGE extension"); + ffpkys(fptr, "XTENSION", "IMAGE", comm, status); + } + + longbitpix = bitpix; + + /* test for the 3 special cases that represent unsigned integers */ + if (longbitpix == USHORT_IMG) + longbitpix = SHORT_IMG; + else if (longbitpix == ULONG_IMG) + longbitpix = LONG_IMG; + else if (longbitpix == SBYTE_IMG) + longbitpix = BYTE_IMG; + + if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && + longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && + longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) + { + sprintf(message, + "Illegal value for BITPIX keyword: %d", bitpix); + ffpmsg(message); + return(*status = BAD_BITPIX); + } + + strcpy(comm, "number of bits per data pixel"); + if (ffpkyj(fptr, "BITPIX", longbitpix, comm, status) > 0) + return(*status); + + if (naxis < 0 || naxis > 999) + { + sprintf(message, + "Illegal value for NAXIS keyword: %d", naxis); + ffpmsg(message); + return(*status = BAD_NAXIS); + } + + strcpy(comm, "number of data axes"); + ffpkyj(fptr, "NAXIS", naxis, comm, status); + + strcpy(comm, "length of data axis "); + for (ii = 0; ii < naxis; ii++) + { + if (naxes[ii] < 0) + { + sprintf(message, + "Illegal negative value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); + ffpmsg(message); + return(*status = BAD_NAXES); + } + + sprintf(&comm[20], "%d", ii + 1); + ffkeyn("NAXIS", ii + 1, name, status); + ffpkyj(fptr, name, naxes[ii], comm, status); + } + + if ((fptr->Fptr)->curhdu == 0) /* the primary array */ + { + if (extend) + { + /* only write EXTEND keyword if value = true */ + strcpy(comm, "FITS dataset may contain extensions"); + ffpkyl(fptr, "EXTEND", extend, comm, status); + } + + if (pcount < 0) + { + ffpmsg("pcount value is less than 0"); + return(*status = BAD_PCOUNT); + } + + else if (gcount < 1) + { + ffpmsg("gcount value is less than 1"); + return(*status = BAD_GCOUNT); + } + + else if (pcount > 0 || gcount > 1) + { + /* only write these keyword if non-standard values */ + strcpy(comm, "random group records are present"); + ffpkyl(fptr, "GROUPS", 1, comm, status); + + strcpy(comm, "number of random group parameters"); + ffpkyj(fptr, "PCOUNT", pcount, comm, status); + + strcpy(comm, "number of random groups"); + ffpkyj(fptr, "GCOUNT", gcount, comm, status); + } + + /* write standard block of self-documentating comments */ + ffprec(fptr, + "COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy", + status); + ffprec(fptr, + "COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H", + status); + } + + else /* an IMAGE extension */ + + { /* image extension; cannot have random groups */ + if (pcount != 0) + { + ffpmsg("image extensions must have pcount = 0"); + *status = BAD_PCOUNT; + } + + else if (gcount != 1) + { + ffpmsg("image extensions must have gcount = 1"); + *status = BAD_GCOUNT; + } + + else + { + strcpy(comm, "required keyword; must = 0"); + ffpkyj(fptr, "PCOUNT", 0, comm, status); + + strcpy(comm, "required keyword; must = 1"); + ffpkyj(fptr, "GCOUNT", 1, comm, status); + } + } + + /* Write the BSCALE and BZERO keywords, if an unsigned integer image */ + if (bitpix == USHORT_IMG) + { + strcpy(comm, "offset data range to that of unsigned short"); + ffpkyg(fptr, "BZERO", 32768., 0, comm, status); + strcpy(comm, "default scaling factor"); + ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); + } + else if (bitpix == ULONG_IMG) + { + strcpy(comm, "offset data range to that of unsigned long"); + ffpkyg(fptr, "BZERO", 2147483648., 0, comm, status); + strcpy(comm, "default scaling factor"); + ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); + } + else if (bitpix == SBYTE_IMG) + { + strcpy(comm, "offset data range to that of signed byte"); + ffpkyg(fptr, "BZERO", -128., 0, comm, status); + strcpy(comm, "default scaling factor"); + ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphtb(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis1, /* I - width of row in the table */ + LONGLONG naxis2, /* I - number of rows in the table */ + int tfields, /* I - number of columns in the table */ + char **ttype, /* I - name of each column */ + long *tbcol, /* I - byte offset in row to each column */ + char **tform, /* I - value of TFORMn keyword for each column */ + char **tunit, /* I - value of TUNITn keyword for each column */ + char *extnm, /* I - value of EXTNAME keyword, if any */ + int *status) /* IO - error status */ +/* + Put required Header keywords into the ASCII TaBle: +*/ +{ + int ii, ncols, gotmem = 0; + long rowlen; /* must be 'long' because it is passed to ffgabc */ + char tfmt[30], name[FLEN_KEYWORD], comm[FLEN_COMMENT]; + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (*status > 0) + return(*status); + else if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + return(*status = HEADER_NOT_EMPTY); + else if (naxis1 < 0) + return(*status = NEG_WIDTH); + else if (naxis2 < 0) + return(*status = NEG_ROWS); + else if (tfields < 0 || tfields > 999) + return(*status = BAD_TFIELDS); + + rowlen = (long) naxis1; + + if (!tbcol || !tbcol[0] || (!naxis1 && tfields)) /* spacing not defined? */ + { + /* allocate mem for tbcol; malloc can have problems allocating small */ + /* arrays, so allocate at least 20 bytes */ + + ncols = maxvalue(5, tfields); + tbcol = (long *) calloc(ncols, sizeof(long)); + + if (tbcol) + { + gotmem = 1; + + /* calculate width of a row and starting position of each column. */ + /* Each column will be separated by 1 blank space */ + ffgabc(tfields, tform, 1, &rowlen, tbcol, status); + } + } + ffpkys(fptr, "XTENSION", "TABLE", "ASCII table extension", status); + ffpkyj(fptr, "BITPIX", 8, "8-bit ASCII characters", status); + ffpkyj(fptr, "NAXIS", 2, "2-dimensional ASCII table", status); + ffpkyj(fptr, "NAXIS1", rowlen, "width of table in characters", status); + ffpkyj(fptr, "NAXIS2", naxis2, "number of rows in table", status); + ffpkyj(fptr, "PCOUNT", 0, "no group parameters (required keyword)", status); + ffpkyj(fptr, "GCOUNT", 1, "one data group (required keyword)", status); + ffpkyj(fptr, "TFIELDS", tfields, "number of fields in each row", status); + + for (ii = 0; ii < tfields; ii++) /* loop over every column */ + { + if ( *(ttype[ii]) ) /* optional TTYPEn keyword */ + { + sprintf(comm, "label for field %3d", ii + 1); + ffkeyn("TTYPE", ii + 1, name, status); + ffpkys(fptr, name, ttype[ii], comm, status); + } + + if (tbcol[ii] < 1 || tbcol[ii] > rowlen) + *status = BAD_TBCOL; + + sprintf(comm, "beginning column of field %3d", ii + 1); + ffkeyn("TBCOL", ii + 1, name, status); + ffpkyj(fptr, name, tbcol[ii], comm, status); + + strcpy(tfmt, tform[ii]); /* required TFORMn keyword */ + ffupch(tfmt); + ffkeyn("TFORM", ii + 1, name, status); + ffpkys(fptr, name, tfmt, "Fortran-77 format of field", status); + + if (tunit) + { + if (tunit[ii] && *(tunit[ii]) ) /* optional TUNITn keyword */ + { + ffkeyn("TUNIT", ii + 1, name, status); + ffpkys(fptr, name, tunit[ii], "physical unit of field", status) ; + } + } + + if (*status > 0) + break; /* abort loop on error */ + } + + if (extnm) + { + if (extnm[0]) /* optional EXTNAME keyword */ + ffpkys(fptr, "EXTNAME", extnm, + "name of this ASCII table extension", status); + } + + if (*status > 0) + ffpmsg("Failed to write ASCII table header keywords (ffphtb)"); + + if (gotmem) + free(tbcol); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphbn(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG naxis2, /* I - number of rows in the table */ + int tfields, /* I - number of columns in the table */ + char **ttype, /* I - name of each column */ + char **tform, /* I - value of TFORMn keyword for each column */ + char **tunit, /* I - value of TUNITn keyword for each column */ + char *extnm, /* I - value of EXTNAME keyword, if any */ + LONGLONG pcount, /* I - size of the variable length heap area */ + int *status) /* IO - error status */ +/* + Put required Header keywords into the Binary Table: +*/ +{ + int ii, datatype, iread = 0; + long repeat, width; + LONGLONG naxis1; + + char tfmt[30], name[FLEN_KEYWORD], comm[FLEN_COMMENT]; + char *cptr; + + if (*status > 0) + return(*status); + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + return(*status = HEADER_NOT_EMPTY); + else if (naxis2 < 0) + return(*status = NEG_ROWS); + else if (pcount < 0) + return(*status = BAD_PCOUNT); + else if (tfields < 0 || tfields > 999) + return(*status = BAD_TFIELDS); + + ffpkys(fptr, "XTENSION", "BINTABLE", "binary table extension", status); + ffpkyj(fptr, "BITPIX", 8, "8-bit bytes", status); + ffpkyj(fptr, "NAXIS", 2, "2-dimensional binary table", status); + + naxis1 = 0; + for (ii = 0; ii < tfields; ii++) /* sum the width of each field */ + { + ffbnfm(tform[ii], &datatype, &repeat, &width, status); + + if (datatype == TSTRING) + naxis1 += repeat; /* one byte per char */ + else if (datatype == TBIT) + naxis1 += (repeat + 7) / 8; + else if (datatype > 0) + naxis1 += repeat * (datatype / 10); + else if (tform[ii][0] == 'P' || tform[ii][1] == 'P') + /* this is a 'P' variable length descriptor (neg. datatype) */ + naxis1 += 8; + else + /* this is a 'Q' variable length descriptor (neg. datatype) */ + naxis1 += 16; + + if (*status > 0) + break; /* abort loop on error */ + } + + ffpkyj(fptr, "NAXIS1", naxis1, "width of table in bytes", status); + ffpkyj(fptr, "NAXIS2", naxis2, "number of rows in table", status); + + /* + the initial value of PCOUNT (= size of the variable length array heap) + should always be zero. If any variable length data is written, then + the value of PCOUNT will be updated when the HDU is closed + */ + ffpkyj(fptr, "PCOUNT", 0, "size of special data area", status); + ffpkyj(fptr, "GCOUNT", 1, "one data group (required keyword)", status); + ffpkyj(fptr, "TFIELDS", tfields, "number of fields in each row", status); + + for (ii = 0; ii < tfields; ii++) /* loop over every column */ + { + if ( *(ttype[ii]) ) /* optional TTYPEn keyword */ + { + sprintf(comm, "label for field %3d", ii + 1); + ffkeyn("TTYPE", ii + 1, name, status); + ffpkys(fptr, name, ttype[ii], comm, status); + } + + strcpy(tfmt, tform[ii]); /* required TFORMn keyword */ + ffupch(tfmt); + + ffkeyn("TFORM", ii + 1, name, status); + strcpy(comm, "data format of field"); + + ffbnfm(tfmt, &datatype, &repeat, &width, status); + + if (datatype == TSTRING) + { + strcat(comm, ": ASCII Character"); + + /* Do sanity check to see if an ASCII table format was used, */ + /* e.g., 'A8' instead of '8A', or a bad unit width eg '8A9'. */ + /* Don't want to return an error status, so write error into */ + /* the keyword comment. */ + + cptr = strchr(tfmt,'A'); + cptr++; + + if (cptr) + iread = sscanf(cptr,"%ld", &width); + + if (iread == 1 && (width > repeat)) + { + if (repeat == 1) + strcpy(comm, "ERROR?? USING ASCII TABLE SYNTAX BY MISTAKE??"); + else + strcpy(comm, "rAw FORMAT ERROR! UNIT WIDTH w > COLUMN WIDTH r"); + } + } + else if (datatype == TBIT) + strcat(comm, ": BIT"); + else if (datatype == TBYTE) + strcat(comm, ": BYTE"); + else if (datatype == TLOGICAL) + strcat(comm, ": 1-byte LOGICAL"); + else if (datatype == TSHORT) + strcat(comm, ": 2-byte INTEGER"); + else if (datatype == TUSHORT) + strcat(comm, ": 2-byte INTEGER"); + else if (datatype == TLONG) + strcat(comm, ": 4-byte INTEGER"); + else if (datatype == TLONGLONG) + strcat(comm, ": 8-byte INTEGER"); + else if (datatype == TULONG) + strcat(comm, ": 4-byte INTEGER"); + else if (datatype == TFLOAT) + strcat(comm, ": 4-byte REAL"); + else if (datatype == TDOUBLE) + strcat(comm, ": 8-byte DOUBLE"); + else if (datatype == TCOMPLEX) + strcat(comm, ": COMPLEX"); + else if (datatype == TDBLCOMPLEX) + strcat(comm, ": DOUBLE COMPLEX"); + else if (datatype < 0) + strcat(comm, ": variable length array"); + + if (abs(datatype) == TSBYTE) /* signed bytes */ + { + /* Replace the 'S' with an 'B' in the TFORMn code */ + cptr = tfmt; + while (*cptr != 'S') + cptr++; + + *cptr = 'B'; + ffpkys(fptr, name, tfmt, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", ii + 1, name, status); + strcpy(comm, "offset for signed bytes"); + + ffpkyg(fptr, name, -128., 0, comm, status); + + ffkeyn("TSCAL", ii + 1, name, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, name, 1., 0, comm, status); + } + else if (abs(datatype) == TUSHORT) + { + /* Replace the 'U' with an 'I' in the TFORMn code */ + cptr = tfmt; + while (*cptr != 'U') + cptr++; + + *cptr = 'I'; + ffpkys(fptr, name, tfmt, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", ii + 1, name, status); + strcpy(comm, "offset for unsigned integers"); + + ffpkyg(fptr, name, 32768., 0, comm, status); + + ffkeyn("TSCAL", ii + 1, name, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, name, 1., 0, comm, status); + } + else if (abs(datatype) == TULONG) + { + /* Replace the 'V' with an 'J' in the TFORMn code */ + cptr = tfmt; + while (*cptr != 'V') + cptr++; + + *cptr = 'J'; + ffpkys(fptr, name, tfmt, comm, status); + + /* write the TZEROn and TSCALn keywords */ + ffkeyn("TZERO", ii + 1, name, status); + strcpy(comm, "offset for unsigned integers"); + + ffpkyg(fptr, name, 2147483648., 0, comm, status); + + ffkeyn("TSCAL", ii + 1, name, status); + strcpy(comm, "data are not scaled"); + ffpkyg(fptr, name, 1., 0, comm, status); + } + else + { + ffpkys(fptr, name, tfmt, comm, status); + } + + if (tunit) + { + if (tunit[ii] && *(tunit[ii]) ) /* optional TUNITn keyword */ + { + ffkeyn("TUNIT", ii + 1, name, status); + ffpkys(fptr, name, tunit[ii], + "physical unit of field", status); + } + } + + if (*status > 0) + break; /* abort loop on error */ + } + + if (extnm) + { + if (extnm[0]) /* optional EXTNAME keyword */ + ffpkys(fptr, "EXTNAME", extnm, + "name of this binary table extension", status); + } + + if (*status > 0) + ffpmsg("Failed to write binary table header keywords (ffphbn)"); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffphext(fitsfile *fptr, /* I - FITS file pointer */ + char *xtension, /* I - value for the XTENSION keyword */ + int bitpix, /* I - value for the BIXPIX keyword */ + int naxis, /* I - value for the NAXIS keyword */ + long naxes[], /* I - value for the NAXISn keywords */ + LONGLONG pcount, /* I - value for the PCOUNT keyword */ + LONGLONG gcount, /* I - value for the GCOUNT keyword */ + int *status) /* IO - error status */ +/* + Put required Header keywords into a conforming extension: +*/ +{ + char message[FLEN_ERRMSG],comm[81], name[20]; + int ii; + + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + if (*status > 0) + return(*status); + else if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) + return(*status = HEADER_NOT_EMPTY); + + if (naxis < 0 || naxis > 999) + { + sprintf(message, + "Illegal value for NAXIS keyword: %d", naxis); + ffpmsg(message); + return(*status = BAD_NAXIS); + } + + ffpkys(fptr, "XTENSION", xtension, "extension type", status); + ffpkyj(fptr, "BITPIX", bitpix, "number of bits per data pixel", status); + ffpkyj(fptr, "NAXIS", naxis, "number of data axes", status); + + strcpy(comm, "length of data axis "); + for (ii = 0; ii < naxis; ii++) + { + if (naxes[ii] < 0) + { + sprintf(message, + "Illegal negative value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); + ffpmsg(message); + return(*status = BAD_NAXES); + } + + sprintf(&comm[20], "%d", ii + 1); + ffkeyn("NAXIS", ii + 1, name, status); + ffpkyj(fptr, name, naxes[ii], comm, status); + } + + + ffpkyj(fptr, "PCOUNT", pcount, " ", status); + ffpkyj(fptr, "GCOUNT", gcount, " ", status); + + if (*status > 0) + ffpmsg("Failed to write extension header keywords (ffphext)"); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffi2c(LONGLONG ival, /* I - value to be converted to a string */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status */ +/* + convert value to a null-terminated formatted string. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + cval[0] = '\0'; + +#if defined(_MSC_VER) + /* Microsoft Visual C++ 6.0 uses '%I64d' syntax for 8-byte integers */ + if (sprintf(cval, "%I64d", ival) < 0) + +#elif (USE_LL_SUFFIX == 1) + if (sprintf(cval, "%lld", ival) < 0) +#else + if (sprintf(cval, "%ld", ival) < 0) +#endif + { + ffpmsg("Error in ffi2c converting integer to string"); + *status = BAD_I2C; + } + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffl2c(int lval, /* I - value to be converted to a string */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status ) */ +/* + convert logical value to a null-terminated formatted string. If the + input value == 0, then the output character is the letter F, else + the output character is the letter T. The output string is null terminated. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (lval) + strcpy(cval,"T"); + else + strcpy(cval,"F"); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffs2c(char *instr, /* I - null terminated input string */ + char *outstr, /* O - null terminated quoted output string */ + int *status) /* IO - error status */ +/* + convert an input string to a quoted string. Leading spaces + are significant. FITS string keyword values must be at least + 8 chars long so pad out string with spaces if necessary. + Example: km/s ==> 'km/s ' + Single quote characters in the input string will be replace by + two single quote characters. e.g., o'brian ==> 'o''brian' +*/ +{ + size_t len, ii, jj; + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + if (!instr) /* a null input pointer?? */ + { + strcpy(outstr, "''"); /* a null FITS string */ + return(*status); + } + + outstr[0] = '\''; /* start output string with a quote */ + + len = strlen(instr); + if (len > 68) + len = 68; /* limit input string to 68 chars */ + + for (ii=0, jj=1; ii < len && jj < 69; ii++, jj++) + { + outstr[jj] = instr[ii]; /* copy each char from input to output */ + if (instr[ii] == '\'') + { + jj++; + outstr[jj]='\''; /* duplicate any apostrophies in the input */ + } + } + + for (; jj < 9; jj++) /* pad string so it is at least 8 chars long */ + outstr[jj] = ' '; + + if (jj == 70) /* only occurs if the last char of string was a quote */ + outstr[69] = '\0'; + else + { + outstr[jj] = '\''; /* append closing quote character */ + outstr[jj+1] = '\0'; /* terminate the string */ + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr2f(float fval, /* I - value to be converted to a string */ + int decim, /* I - number of decimal places to display */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status */ +/* + convert float value to a null-terminated F format string +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + cval[0] = '\0'; + + if (decim < 0) + { + ffpmsg("Error in ffr2f: no. of decimal places < 0"); + return(*status = BAD_DECIM); + } + + if (sprintf(cval, "%.*f", decim, fval) < 0) + { + ffpmsg("Error in ffr2f converting float to string"); + *status = BAD_F2C; + } + + /* test if output string is 'NaN', 'INDEF', or 'INF' */ + if (strchr(cval, 'N')) + { + ffpmsg("Error in ffr2f: float value is a NaN or INDEF"); + *status = BAD_F2C; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffr2e(float fval, /* I - value to be converted to a string */ + int decim, /* I - number of decimal places to display */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status */ +/* + convert float value to a null-terminated exponential format string +*/ +{ + + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + cval[0] = '\0'; + + if (decim < 0) + { /* use G format if decim is negative */ + if ( sprintf(cval, "%.*G", -decim, fval) < 0) + { + ffpmsg("Error in ffr2e converting float to string"); + *status = BAD_F2C; + } + else + { + /* test if E format was used, and there is no displayed decimal */ + if ( !strchr(cval, '.') && strchr(cval,'E') ) + { + /* reformat value with a decimal point and single zero */ + if ( sprintf(cval, "%.1E", fval) < 0) + { + ffpmsg("Error in ffr2e converting float to string"); + *status = BAD_F2C; + } + + return(*status); + } + } + } + else + { + if ( sprintf(cval, "%.*E", decim, fval) < 0) + { + ffpmsg("Error in ffr2e converting float to string"); + *status = BAD_F2C; + } + } + + if (*status <= 0) + { + /* test if output string is 'NaN', 'INDEF', or 'INF' */ + if (strchr(cval, 'N')) + { + ffpmsg("Error in ffr2e: float value is a NaN or INDEF"); + *status = BAD_F2C; + } + else if ( !strchr(cval, '.') && !strchr(cval,'E') ) + { + /* add decimal point if necessary to distinquish from integer */ + strcat(cval, "."); + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffd2f(double dval, /* I - value to be converted to a string */ + int decim, /* I - number of decimal places to display */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status */ +/* + convert double value to a null-terminated F format string +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + cval[0] = '\0'; + + if (decim < 0) + { + ffpmsg("Error in ffd2f: no. of decimal places < 0"); + return(*status = BAD_DECIM); + } + + if (sprintf(cval, "%.*f", decim, dval) < 0) + { + ffpmsg("Error in ffd2f converting double to string"); + *status = BAD_F2C; + } + + /* test if output string is 'NaN', 'INDEF', or 'INF' */ + if (strchr(cval, 'N')) + { + ffpmsg("Error in ffd2f: double value is a NaN or INDEF"); + *status = BAD_F2C; + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffd2e(double dval, /* I - value to be converted to a string */ + int decim, /* I - number of decimal places to display */ + char *cval, /* O - character string representation of the value */ + int *status) /* IO - error status */ +/* + convert double value to a null-terminated exponential format string. +*/ +{ + if (*status > 0) /* inherit input status value if > 0 */ + return(*status); + + cval[0] = '\0'; + + if (decim < 0) + { /* use G format if decim is negative */ + if ( sprintf(cval, "%.*G", -decim, dval) < 0) + { + ffpmsg("Error in ffd2e converting float to string"); + *status = BAD_F2C; + } + else + { + /* test if E format was used, and there is no displayed decimal */ + if ( !strchr(cval, '.') && strchr(cval,'E') ) + { + /* reformat value with a decimal point and single zero */ + if ( sprintf(cval, "%.1E", dval) < 0) + { + ffpmsg("Error in ffd2e converting float to string"); + *status = BAD_F2C; + } + + return(*status); + } + } + } + else + { + if ( sprintf(cval, "%.*E", decim, dval) < 0) + { + ffpmsg("Error in ffd2e converting float to string"); + *status = BAD_F2C; + } + } + + if (*status <= 0) + { + /* test if output string is 'NaN', 'INDEF', or 'INF' */ + if (strchr(cval, 'N')) + { + ffpmsg("Error in ffd2e: double value is a NaN or INDEF"); + *status = BAD_F2C; + } + else if ( !strchr(cval, '.') && !strchr(cval,'E') ) + { + /* add decimal point if necessary to distinquish from integer */ + strcat(cval, "."); + } + } + + return(*status); +} + diff --git a/software/cfitsio3040/quantize.c b/software/cfitsio3040/quantize.c new file mode 100644 index 000000000..523aa3b93 --- /dev/null +++ b/software/cfitsio3040/quantize.c @@ -0,0 +1,857 @@ +/* + The following code was written by Richard White at STScI and made + available for use in CFITSIO in July 1999. +*/ + +# include +# include +# include + +#include "fitsio2.h" + +/* nearest integer function */ +# define NINT(x) ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5)) +# define SORT_CUTOFF 100 /* used by xMedian */ +# define NELEM 5 /* used by xMedian */ + +#define NULL_VALUE -2147483647 /* value used to represent undefined pixels */ +#define N_RESERVED_VALUES 1 /* number of reserved values, starting with */ + /* and including NULL_VALUE. These values */ + /* may not be used to represent the quantized */ + /* and scaled floating point pixel values */ + +/* factor to convert from median deviation to rms */ +# define MEDIAN_TO_RMS 1.4826 + +/* more than this many standard deviations from the mean is an outlier */ +# define SIGMA_CLIP 5. + +# define NITER 3 /* number of sigma-clipping iterations */ + +static float xMedian (float [], int); +static void InsertionSort (float x[], int); +static int FqCompare (const void *, const void *); +static void FqMean (float [], int, double *, double *); + + +/*---------------------------------------------------------------------------*/ +/* this routine used to be called 'quantize' (WDP) */ + +int fits_quantize_float (float fdata[], int nx, float in_null_value, + int noise_bits, int idata[], double *bscale, + double *bzero, int *iminval, int *imaxval) { + +/* arguments: +float fdata[] i: array of image pixels to be compressed +int nx i: length of fdata array +float in_null_value i: value used to represent undefined pixels in fdata +int noise_bits i: quantization level (number of bits) +int idata[] o: values of fdata after applying bzero and bscale +double bscale o: scale factor +double bzero o: zero offset +int iminval o: minimum quantized value that is returned +int imaxval o: maximum quantized value that is returned + +The function value will be one if the input fdata were copied to idata; +in this case the parameters bscale and bzero can be used to convert back to +nearly the original floating point values: fdata ~= idata * bscale + bzero. +If the function value is zero, the data were not copied to idata. +*/ + + float *diff; /* difference array */ + int ndiff; /* size of diff array */ + int intflag; /* true if data are really integer */ + int i, j, iter; /* loop indices */ + int anynulls = 0; /* set if fdata contains any null values */ + int nshift, itemp; + int first_nonnull = 0; + double mean, stdev; /* mean and RMS of differences */ + double minval = 0., maxval = 0.; /* min & max of fdata */ + double delta; /* bscale, 1 in idata = delta in fdata */ + double zeropt; /* bzero */ + double median; /* median of diff array */ + double temp; + + if (nx <= 1) { + *bscale = 1.; + *bzero = 0.; + return (0); + } + + *iminval = INT32_MAX; + *imaxval = INT32_MIN; + + /* Check to see if data are "floating point integer." */ + /* This also catches the case where all the pixels are null */ + + /* Since idata and fdata may point to the same memory location, */ + /* we cannot write to idata unless we are sure we don't need */ + /* the corresponding float value any more */ + + intflag = 1; /* initial value */ + for (i = 0; i < nx; i++) { + if (fdata[i] == in_null_value) { + anynulls = 1; + } + else if (fdata[i] > INT32_MAX || + fdata[i] < NULL_VALUE + N_RESERVED_VALUES) { + intflag = 0; /* not integer */ + break; + } + else { + itemp = (int)(fdata[i] + 0.5); + + if (itemp != fdata[i]) { + intflag = 0; /* not integer */ + break; + } + } + } + + if (intflag) { /* data are "floating point integer" */ + for (i = 0; i < nx; i++) { + if (fdata[i] == in_null_value) { + idata[i] = NULL_VALUE; + anynulls = 1; + } + else { + idata[i] = (int)(fdata[i] + 0.5); + *iminval = minvalue(idata[i], *iminval); + *imaxval = maxvalue(idata[i], *imaxval); + } + } + } + + if (intflag) { /* data are "floating point integer" */ + if (anynulls) { + /* Shift the range of values so they lie close to NULL_VALUE. */ + /* This will make the compression more efficient. */ + /* Maximum allowed shift is 2^31 - 1 = 2147483646 */ + /* Can't use 2147483647 because OSF says this is not a legal number */ + + if (*iminval >= 0) { + nshift = -(NULL_VALUE + 1) - N_RESERVED_VALUES; + } else { + nshift = *iminval - NULL_VALUE - N_RESERVED_VALUES; + } + + for (i = 0; i < nx; i++) { + if (idata[i] != NULL_VALUE) { + idata[i] -= nshift; + } + } + *iminval = *iminval - nshift; + *imaxval = *imaxval - nshift; + *bscale = 1.; + *bzero = (double) nshift; + } + else { + /* there were no null values, so no need to shift the range */ + *bscale = 1.; + *bzero = 0.; + } + return (1); + } + + /* data are not "floating point integer"; need to quantize them */ + + /* find first non-null pixel, and initialize min and max values */ + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + minval = fdata[i]; + maxval = fdata[i]; + first_nonnull = i; + break; + } + } + + /* allocate temporary buffer for differences */ + ndiff = nx - first_nonnull - 1; + if ((diff = (float *) malloc (ndiff * sizeof (float))) == NULL) { + ffpmsg("Out of memory in 'fits_quantize_float'."); + return (0); + } + + /* calc ABS difference between successive non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (fabs (fdata[i] - fdata[j])); + j = i; + ndiff++; + minval = minvalue(minval, fdata[i]); + maxval = maxvalue(maxval, fdata[i]); + } + } + + /* check if there were any null values */ + if (ndiff + 1 == nx) + anynulls = 0; + else + anynulls = 1; + + /* use median of absolute deviations */ + + median = xMedian (diff, ndiff); + stdev = median * MEDIAN_TO_RMS; + /* substitute sigma-clipping if median is zero */ + if (stdev == 0.0) { + + /* calculate differences between non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = fdata[i] - fdata[j]; + j = i; + ndiff++; + } + } + + FqMean (diff, ndiff, &mean, &stdev); + + for (iter = 0; iter < NITER; iter++) { + j = 0; + for (i = 0; i < ndiff; i++) { + if (fabs (diff[i] - mean) < SIGMA_CLIP * stdev) { + if (j < i) + diff[j] = diff[i]; + j++; + } + } + if (j == ndiff) + break; + ndiff = j; + FqMean (diff, ndiff, &mean, &stdev); + } + } + free (diff); + + delta = stdev / pow (2., (double)noise_bits); + if (delta == 0. && ndiff > 0) + return (0); /* Zero variance in differences! Don't quantize. */ + + /* check that the range of quantized levels is not > range of int */ + if ((maxval - minval) / delta > 2. * 2147483647. - N_RESERVED_VALUES ) + return (0); /* don't quantize */ + + if (!anynulls) { /* don't have to check for nulls */ + /* return all positive values, if possible since some */ + /* compression algorithms either only work for positive integers, */ + /* or are more efficient. */ + if ((maxval - minval) / delta < 2147483647. - N_RESERVED_VALUES ) + { + zeropt = minval; + } + else + { + /* center the quantized levels around zero */ + zeropt = (minval + maxval) / 2.; + } + + for (i = 0; i < nx; i++) { + temp = (fdata[i] - zeropt) / delta; + idata[i] = NINT (temp); + } + } + else { + /* data contains null values; shift the range to be */ + /* close to the value used to represent null values */ + zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); + + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + temp = (fdata[i] - zeropt) / delta; + idata[i] = NINT (temp); + } + else + idata[i] = NULL_VALUE; + } + } + + /* calc min and max values */ + temp = (minval - zeropt) / delta; + *iminval = NINT (temp); + temp = (maxval - zeropt) / delta; + *imaxval = NINT (temp); + + *bscale = delta; + *bzero = zeropt; + + return (1); /* yes, data have been quantized */ +} + +/*---------------------------------------------------------------------------*/ +int fits_quantize_double (double fdata[], int nx, double in_null_value, + int noise_bits, int idata[], double *bscale, + double *bzero, int *iminval, int *imaxval) { + +/* arguments: +double fdata[] i: array of image pixels to be compressed +int nx i: length of fdata array +double in_null_value i: value used to represent undefined pixels in fdata +int noise_bits i: quantization level (number of bits) +int idata[] o: values of fdata after applying bzero and bscale +double bscale o: scale factor +double bzero o: zero offset +int imaxval o: maximum quantized value that is returned +int iminval o: minimum quantized value that is returned + +The function value will be one if the input fdata were copied to idata; +in this case the parameters bscale and bzero can be used to convert back to +nearly the original floating point values: fdata ~= idata * bscale + bzero. +If the function value is zero, the data were not copied to idata. +*/ + + float *diff; /* difference array */ + int ndiff; /* size of diff array */ + int intflag; /* true if data are really integer */ + int i, j, iter; /* loop indices */ + int anynulls = 0; /* set if fdata contains any null values */ + int nshift, itemp; + int first_nonnull = 0; + double mean, stdev; /* mean and RMS of differences */ + double minval = 0., maxval = 0.; /* min & max of fdata */ + double delta; /* bscale, 1 in idata = delta in fdata */ + double zeropt; /* bzero */ + double median; /* median of diff array */ + double temp; + + if (nx <= 1) { + *bscale = 1.; + *bzero = 0.; + return (0); + } + + *iminval = INT32_MAX; + *imaxval = INT32_MIN; + + /* Check to see if data are "floating point integer." */ + /* This also catches the case where all the pixels are null */ + + /* Since idata and fdata may point to the same memory location, */ + /* we cannot write to idata unless we are sure we don't need */ + /* the corresponding float value any more */ + + intflag = 1; /* initial value */ + for (i = 0; i < nx; i++) { + if (fdata[i] == in_null_value) { + anynulls = 1; + } + else if (fdata[i] > INT32_MAX || + fdata[i] < NULL_VALUE + N_RESERVED_VALUES) { + intflag = 0; /* not integer */ + break; + } + else { + itemp = (int)(fdata[i] + 0.5); + + if (itemp != fdata[i]) { + intflag = 0; /* not integer */ + break; + } + } + } + + if (intflag) { /* data are "floating point integer" */ + for (i = 0; i < nx; i++) { + if (fdata[i] == in_null_value) { + idata[i] = NULL_VALUE; + anynulls = 1; + } + else { + idata[i] = (int)(fdata[i] + 0.5); + *iminval = minvalue(idata[i], *iminval); + *imaxval = maxvalue(idata[i], *imaxval); + } + } + } + + if (intflag) { /* data are "floating point integer" */ + if (anynulls) { + /* Shift the range of values so they lie close to NULL_VALUE. */ + /* This will make the compression more efficient. */ + /* Maximum allowed shift is 2^31 - 1 = 2147483646 */ + /* Can't use 2147483647 because OSF says this is not a legal number */ + + if (*iminval >= 0) { + nshift = -(NULL_VALUE +1) - N_RESERVED_VALUES; + } else { + nshift = *iminval - NULL_VALUE - N_RESERVED_VALUES; + } + + for (i = 0; i < nx; i++) { + if (idata[i] != NULL_VALUE) { + idata[i] -= nshift; + } + } + *iminval = *iminval - nshift; + *imaxval = *imaxval - nshift; + *bscale = 1.; + *bzero = (double) nshift; + } + else { + /* there were no null values, so no need to shift the range */ + *bscale = 1.; + *bzero = 0.; + } + return (1); + } + + /* data are not "floating point integer"; need to quantize them */ + + /* find first non-null pixel, and initialize min and max values */ + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + minval = fdata[i]; + maxval = fdata[i]; + first_nonnull = i; + break; + } + } + + /* allocate temporary buffer for differences */ + ndiff = nx - first_nonnull - 1; + if ((diff = (float *) malloc (ndiff * sizeof (float))) == NULL) { + ffpmsg("Out of memory in 'fits_quantize_double'."); + return (0); + } + + /* calc ABS difference between successive non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (fabs (fdata[i] - fdata[j])); + j = i; + ndiff++; + minval = minvalue(minval, fdata[i]); + maxval = maxvalue(maxval, fdata[i]); + } + } + + /* check if there were any null values */ + if (ndiff + 1 == nx) + anynulls = 0; + else + anynulls = 1; + + /* use median of absolute deviations */ + + median = xMedian (diff, ndiff); + stdev = median * MEDIAN_TO_RMS; + /* substitute sigma-clipping if median is zero */ + if (stdev == 0.0) { + + /* calculate differences between non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (fdata[i] - fdata[j]); + j = i; + ndiff++; + } + } + + FqMean (diff, ndiff, &mean, &stdev); + + for (iter = 0; iter < NITER; iter++) { + j = 0; + for (i = 0; i < ndiff; i++) { + if (fabs (diff[i] - mean) < SIGMA_CLIP * stdev) { + if (j < i) + diff[j] = diff[i]; + j++; + } + } + if (j == ndiff) + break; + ndiff = j; + FqMean (diff, ndiff, &mean, &stdev); + } + } + free (diff); + + delta = stdev / pow (2., (double)noise_bits); + if (delta == 0. && ndiff > 0) + return (0); /* Zero variance in differences! Don't quantize. */ + + /* check that the range of quantized levels is not > range of int */ + if ((maxval - minval) / delta > 2. * 2147483647 - N_RESERVED_VALUES ) + return (0); /* don't quantize */ + if (!anynulls) { /* don't have to check for nulls */ + /* center the quantized levels around zero */ + zeropt = (minval + maxval) / 2.; + for (i = 0; i < nx; i++) { + temp = (fdata[i] - zeropt) / delta; + idata[i] = NINT (temp); + } + } + else { + /* data contains null values; shift the range to be */ + /* close to the value used to represent null values */ + zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + temp = (fdata[i] - zeropt) / delta; + idata[i] = NINT (temp); + } + else + idata[i] = NULL_VALUE; + } + } + + /* calc min and max values */ + temp = (minval - zeropt) / delta; + *iminval = NINT (temp); + temp = (maxval - zeropt) / delta; + *imaxval = NINT (temp); + + *bscale = delta; + *bzero = zeropt; + + return (1); /* yes, data have been quantized */ +} +/*---------------------------------------------------------------------------*/ +int fits_rms_float (float fdata[], int nx, float in_null_value, + double *rms, int *status) { + +/* +Compute the background RMS (noise) in an array of image pixels. + +arguments: +float fdata[] i: array of image pixels +int nx i: length of fdata array +float in_null_value i: value used to represent undefined pixels in fdata +double rms o: computed RMS value +*/ + float *diff; /* difference array */ + int ndiff; /* size of diff array */ + int i, j, iter; /* loop indices */ + int first_nonnull = 0; + double mean, stdev; /* mean and RMS of differences */ + double median; /* median of diff array */ + + if (*status) return (*status); + + if (nx <= 1) { + *rms = 0; + return (0); + } + + /* find first non-null pixel, and initialize min and max values */ + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + first_nonnull = i; + break; + } + } + + /* allocate temporary buffer for differences */ + ndiff = nx - first_nonnull - 1; + if ((diff = (float *) malloc (ndiff * sizeof (float))) == NULL) { + ffpmsg("Out of memory in 'fits_float_rms'."); + *status = 113; /* memory allocation error */ + return (0); + } + + /* calc ABS difference between successive non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (fabs (fdata[i] - fdata[j])); + j = i; + ndiff++; + } + } + + /* use median of absolute deviations */ + + median = xMedian (diff, ndiff); + stdev = median * MEDIAN_TO_RMS; + + /* substitute sigma-clipping if median is zero */ + if (stdev == 0.0) { + + /* calculate differences between non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = fdata[i] - fdata[j]; + j = i; + ndiff++; + } + } + + FqMean (diff, ndiff, &mean, &stdev); + + for (iter = 0; iter < NITER; iter++) { + j = 0; + for (i = 0; i < ndiff; i++) { + if (fabs (diff[i] - mean) < SIGMA_CLIP * stdev) { + if (j < i) + diff[j] = diff[i]; + j++; + } + } + if (j == ndiff) + break; + ndiff = j; + FqMean (diff, ndiff, &mean, &stdev); + } + } + free (diff); + + *rms = stdev; + + return (0); +} +/*---------------------------------------------------------------------------*/ +int fits_rms_short (short fdata[], int nx, short in_null_value, + double *rms, int *status) { + +/* +Compute the background RMS (noise) in an array of image pixels. + +arguments: +short fdata[] i: array of image pixels +int nx i: length of fdata array +short in_null_value i: value used to represent undefined pixels in fdata +double rms o: computed RMS value +*/ + float *diff; /* difference array */ + int ndiff; /* size of diff array */ + int i, j, iter; /* loop indices */ + int first_nonnull = 0; + double mean, stdev; /* mean and RMS of differences */ + double median; /* median of diff array */ + + if (*status) return (*status); + + if (nx <= 1) { + *rms = 0; + return (0); + } + + /* find first non-null pixel, and initialize min and max values */ + for (i = 0; i < nx; i++) { + if (fdata[i] != in_null_value) { + first_nonnull = i; + break; + } + } + + /* allocate temporary buffer for differences */ + ndiff = nx - first_nonnull - 1; + if ((diff = (float *) malloc (ndiff * sizeof (float))) == NULL) { + ffpmsg("Out of memory in 'fits_float_rms'."); + *status = 113; /* memory allocation error */ + return (0); + } + + /* calc ABS difference between successive non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (abs (fdata[i] - fdata[j])); + j = i; + ndiff++; + } + } + + /* use median of absolute deviations */ + + median = xMedian (diff, ndiff); + stdev = median * MEDIAN_TO_RMS; + + /* substitute sigma-clipping if median is zero */ + if (stdev == 0.0) { + + /* calculate differences between non-null pixels */ + j = first_nonnull; + ndiff = 0; + for (i = j + 1 ; i < nx; i++) { + if (fdata[i] != in_null_value) { + diff[ndiff] = (float) (fdata[i] - fdata[j]); + j = i; + ndiff++; + } + } + + FqMean (diff, ndiff, &mean, &stdev); + + for (iter = 0; iter < NITER; iter++) { + j = 0; + for (i = 0; i < ndiff; i++) { + if (fabs (diff[i] - mean) < SIGMA_CLIP * stdev) { + if (j < i) + diff[j] = diff[i]; + j++; + } + } + if (j == ndiff) + break; + ndiff = j; + FqMean (diff, ndiff, &mean, &stdev); + } + } + free (diff); + + *rms = stdev; + + return (0); +} + +/*---------------------------------------------------------------------------*/ +/* This computes the mean and standard deviation. */ + +static void FqMean (float diff[], int ndiff, double *mean, double *stdev) { + + int i; + double sum, sumsq; + double m; /* mean */ + double xn; /* = ndiff */ + double temp; + + if (ndiff < 2) { + if (ndiff < 1) + *mean = 0.; + else + *mean = diff[0]; + *stdev = 0.; + return; + } + + xn = (double)ndiff; + + sum = 0.; + sumsq = 0.; + for (i = 0; i < ndiff; i++) { + sum += diff[i]; + sumsq += (diff[i] * diff[i]); + } + + m = sum / xn; + *mean = m; + temp = (sumsq / xn - m*m) * xn; + if (temp <= 0) + *stdev = 0.; + else + *stdev = sqrt (temp / (xn-1.)); +} + +/*---------------------------------------------------------------------------*/ +/* This returns an approximation to the median. + The input array will be clobbered. +*/ + +static float xMedian (float x[], int n) { + +/* arguments: +float x[] io: the array (will be scrambled and possibly modified) +int n i: number of elements in x (modified locally) +*/ + + int i, j; + int next_n; + int npix; + int done; + float median = 0.; + + if (n < 1) { + ffpmsg("xMedian: no data"); + return (0.); + } + if (n == 1) + return (x[0]); + if (n == 2) + return ((float) ((x[0] + x[1]) / 2.)); + + done = 0; + while (!done) { + + if (n < SORT_CUTOFF) { + qsort (x, n, sizeof (float), FqCompare); + if (n / 2 * 2 == n) + median = (float) ((x[n/2-1] + x[n/2]) / 2.); + else + median = x[n/2]; + return (median); + } + + /* ignore trailing groups of less than three elements */ + next_n = (n + NELEM-3) / NELEM; + + for (j = 0; j < next_n; j++) { + + i = j * NELEM; + npix = minvalue (NELEM, n - j*NELEM); + + InsertionSort (&x[i], npix); + + switch (npix) { + case 1: + median = x[i]; + break; + case 2: + median = (float) ((x[i] + x[i+1]) / 2.); + break; + case 3: + median = x[i+1]; + break; + case 4: + median = (float) ((x[i+1] + x[i+2]) / 2.); + break; + case 5: /* NELEM = 5 */ + median = x[i+2]; + break; + default: + ffpmsg("npix should be 1..5"); + } + + x[j] = median; + } + + if (next_n <= 1) + done = 1; + else + n = next_n; + } + + return (x[0]); +} +/*---------------------------------------------------------------------------*/ +static void InsertionSort (float x[], int n) { + + float a; + int i, j; + + for (j = 1; j < n; j++) { + + a = x[j]; + i = j - 1; + while (i >= 0 && x[i] > a) { + x[i+1] = x[i]; + i--; + } + x[i+1] = a; + } +} +/*---------------------------------------------------------------------------*/ +static int FqCompare (const void *vp, const void *vq) { + + const float *p = vp; + const float *q = vq; + + if (*p > *q) + return (1); + else if (*p < *q) + return (-1); + else + return (0); +} diff --git a/software/cfitsio3040/quick.ps b/software/cfitsio3040/quick.ps new file mode 100644 index 0000000000000000000000000000000000000000..7503d8410418c9bfb875c30617d66133b92d3eda GIT binary patch literal 252686 zcmcGXYmXzxm8QS*S8%W}U;`@^lgX>$6^7S=ft_BjWOxJ^{?O_!Nwscu^;T8uvW5Qd z`#kT7Bw3}_SjJ*oDl(bOjEp#!_gvyc@HhYRr!PL)yuSVF`jhFWlhJQ}v%9-~`EYyp z`|<1VZ{FSi_V2$N&p%x)#=F~hKi%DY^X0@GAAWdw zcg@XzzIk|a{rmC%et+}o@1N2Dr~dTvo9p}Ek7r#w{vUU*uW5aA|LXefYtC(N-@ko* z^Y)wV?T^17Pxx=XUW`|>DPJAlzTVw__uci|hx^fQ_J8@~pT78y>#uC@_v7FG@WT(E z-c={Af4ctk)$Mn`Yu9+o%eSxp`^{Uf%OJ*|yqHv<+9iK_dH3?W>xb(*I`;bA&3{`= zCjWIz6YuV>@9(eaRUY=m?fbh|v@!nk^_Sz@_Yd#hKa8i7N&o3&@#(bxeb-N<*Y^6G zo40?uyM6V=^~3MS57$4w`t;r1?dUiEGP>fv{mrX~F&B;@*TeYr_189*lV5q?)r&{Y zec}aP>z8ltug5R0zQ4cuKiA`~8!xBh@7}-R%(pqS`gG2zQJs1NY2Lkgf4`nQ=Ds}p zU*YV{+ece_{Oe?VaZNY=r2FvrNjL63+{ECd-w9qo4RmhXWKm<{_Xy{H3qBx)iFbZch`@_wuig-a1EaR zE8_b8<(sdsuU|io?jK%0yuVjkuFj{&xfc2J>Q}e#Zm#biul`FNjKAdM@!wxQ{I!ev zz$+OvdU18!ZeeEr``e4Fw{JOoarMVTy}x?6%jef$fAaA1=FOwuuS!Z^j5&^Yj;@Zk zZy)~r)4S_&&%J)&L6Yk0w-0wewo_YFcg(}aFUI$L`SzQuuU;Z3Uyfhi-M##2bhW+V zu6Ot2FR!-mZ{ED#ef#q6(U*L>zJoT0x36x+fU&)MF$NgMo5!oKZ*Rv?@N1s>VLD1< zDCxVO#;?BT(c?F_FJChR`U+vL+Iap7G48)^BYX6)qnFiNi8OvOY9r>t*I(a1B5z*x zWnJ^v+&dZbrpQXj7vu8{hsSrf?|kBBgq{L0_U+Wi?bYsw#~ocCzqx+<&BM3jc_inX zYuUE@_Q_YX;j59~{rK2TSL4fD`{8@vz2v7Sw@*)BchhAq8F9_)AD>**4HtR;O?~wM zFRzMA9x}>DDMueeL5@eI8ZQ*??bVGWesOj8L%qGq+c)p>_Nw0gEgvoz`gs5Hdjy7t z?ru?yFUFe^2p%$?jsdyrAAR8Xi<4yJQ#t_+z8pj3fu9iNM*wH{<9PSec=v5aT>Y5r2w4 ze)o~_K8|u0!ttKAyzI;I-47og|E(d>hnw%PQs2G2|NHpv`W|a~4JrTa@sVdjJBj_x zyAel?)JROX8h>~D8d`CXKD?7~(&hTc>sKG%+}?`*FJFKE2-ShEE8bB2(bcPOzj=f^ ze5}T2X9C~6#ln4$kw!mG#~XWK1H7T3ufM0+x8RNq!fA%V6K|B*H}~JRmZzn5_GZIH z*Z(_efL+*(r}O#nc{-nccpQnELaSc@c#bIVw|6JnlpWEUI(|EF_v}%l=Z~7Mo;?h) z&zT|?4?%x?-1#x1X0I-v^XkprX-Fl9jn$VFsxBc{b?NBqn>TN`jDi0n+SZ-J^>DJa zK4GBUa`f2fC~52!Vy^i>&fdNG>mxUF8SMOUJ{-S&{o%2MBwyrk#9_Yh4wzKeb8tEd zIqM_`7fsl`#}ZcCZHmr7PtSOBSNGA;p&vO+BZ0oxAO5x}N5$Tcn)Q2ewST;Nr50?) zA3>PE!Fo{hi~?LL>PUpQZ_frou78nlz7T;s(Mfq~a9VhV%ry}&{oq1%mbOMdhW7!< zB3`d!V*mKaBa4uG^j!w7b^W}}_6CobJ zd+9TMd3E7TeL3pzekAr4?lAy|(bQf~=ZmuRpa*s-9spG8gn&mczyOT<#U!xMFUGS` zsotya@9r_>G2hVxhrO6DSKX(}MIKWw+m}yImQVZThZm!(caM&haen?Y_vgjcc7Kbx z;jyhpT=gT};_aur{pArs`1~(d--CUeVyHhNzkm6#<%YopD=+8@fByA*-1i^8y}r8+ z_QiGn>u>ir_wU}k{ONbUeR2KepMN*{?SIGbx%-d18*q2rEv^VFe)l&dxXJI(O#Apo z;ePg2iA(vBXu}D$8|20f3_N3;?MM@y=7oM}E`1^22si5S@ter+pFbaK1^J&Nz^FOn z44I)<{2&bi8a0ekag+|SFSn1=Rq{Ky6dBg z)>{}ndJ^M~`*k;8O;<$r^L{m16W#|%(2lWxzddCOem5$>YVkL5!*?&=8Fc)9e0({6 z_1*nX9k??2bUg<|t~fR0(-Qyu4~OmKc-$Sf{qcBQPqy=Jx-(SkyV-FvTdkh_ZKkso z9hz+V?XsJWc9YF!v8xllPbQn`VmIGi{_Pgsj0U@&#&=5}Hf2BKHC4G zoA<}VZbBb;Jsu{9U4LBhx;#uKv-Ny4-}%bpdENG#4GDzfeAo5e(KGALmb-p*JRCMO zvN~**G%{Q5Ry;7r!}$rVcfE}-_DhZ?9PzreQO_^{UPnB8JDDsGLqDodt$(~tC-d!c zv+M2uWIAR5Q=i1hCOm0*^tC(gM!eBVJ*qpNAK>HiV7OY}LZTU+-frU{-+XQc`(YlgWP?Z=0anWdz7&LZ|PnfnTv`|8JTig#)L>gxCvZ+sw2@%10J3m&zC zZTrc3d0cO%^Ur2;h-fz@V0V;&2tycIggwH?!)CNpR@+x~nYT=iljCx=I&{a+{`iN( zVbamcVbXK3m@GF_UXLA@b&HO7#CJOC7CncP$^6hQl3$kyY+E5-*$a&MsGNta_^R_r;~ov4wgB6tWP|fi=u;@JbObFaDWR3 zwQBCC)pWak=< z8mzF4W~*%!wOi09+OPk%TxkC`v*{j+ZbMNy163sFl98h2GDm=29!K?{-C_Z5?pFaq zVclc8A=OtM$LQ5!@0g{vwCfgv%!d0U)NF-N14|;ucE>o-lKllSB+6#KolNBeMrjh( ziBt?iR`Qo7*OL)sfgOiEz1SW0!r9@#<0mWhO(ud-+6*OwcbT?PrUIjmZnjd$=}}}I z7OQjKWLKf`+D7Kv{VH7G(`ur?NN?Gh!5$7AY37k3`PTJQ#4fh}{$kA%>5&|LlL4{ADpJP}OW zDz0ji$}sW*;0m*-(cv3T_UJSZ*oxi5AG(bas{v4X$`vT>akpI)zE7}^tC5OPa=O_~ zrc1Q6zQU4s%Y7S z&z)4@Jp-9^dj#@`Sd98LZHpPZFh=#{p~szqC<#gk;nW-@#1JTPK1dB|BGD@nqs>g2 zfII-dW6|qFrcS}AgU62WQInMAG6pWF^^+GbDl`02fsf-{JF-?=* zV!l^9x*5^}aM|m#i0me#Co(eIY+>(YiXuT!NzXeDi}X}a*Fd2UQCIpkR8U=y`*nW= zi)4P_qF*A1Go(W*%~mn)8H#Ij$oDyBs6*h~p7#mUY|&@3faQy}T%zY*Axn8p;^TQNz8%?tv9`=BY{MDGNUAgk^yQXZMX*N}T0)5#_B&(TWBr-wiu z<5&g%SHXS#0E7aDL?68YbnpVkgZUQ-`~*2LpMDN$FrywHq0D?c+Vt~n^9DHD%=yC! zg$(U)dYoyIr?JTU;65P2s8JqB6u94P7kHV%IDic7!?u0`A2>Q7da$}*`z`EOzCb$1 zDc2`U&gyF-AhWf4joUk010g7wq6qY#Uh$HS3Z-~h?~DpNplb!^wjGvkhD7afFS<3p z12zl@gN8?Wyy&07 zJH}W?qU8eRpW|Y4JD!~HeBSfEm;MX%*g-1S(un``ta;%^9)Zj5`AB>Gqpc4IKZVJ> zcS`ym{%dGgC zWIbyV3=-nL9=YN4x0)?+@BG_LFJHT@-s@`Kp{g5RQ7c@~_5rGN$Quy2=oZrsd|6Cq zaH&I?Il`v!Al$+_iZjSiXZtPsL7z}rI)@l?1DJFWh8@g$F5b_!$l`9-&lh-yTW!xu z(*$}#49$){=mA;+M(|Ot_u(fO(5bb=z_b%ebo#u@<;rnvW)mESX0>{l-0{adO=4S7 zS-h})=$6y@n&ytMQ5Cikj)5kffruA!Nb>|&K2*@;fk&*h?Z!ChmA~8rhO)(S( zvSES;PVk4HL;w`ayO|4$$feEZn_OX2kY%$V=FsdOgK03o-^q{>y$wf}du$A@xS`cS zC%j4B8iT?Y#D{``EzI#&c{gI*p6&v!y=^Aq$mP{%%oQWhj29WZV6!*+AC7VRZrZ3e zm1-m7MYOCh6LZ-Sq#fMFo(UZMsnD{F1Od*>@F%hXLx)j`9~wQG0f&$q-tme~`gyi@ z3`oFXh9_vShtH=^m_Gt{45Vj><>!04dK~`rMf)Sc3c(^RVyID@19p|Ja1B1cM;aHs zpPVIuu*77HP)aRGpV#^G<8Br8J**ZgGS~XrjwMP3JkozOJDjO(+)LoK4ZZNs30kJ{ z(&-uqg;z!33jyL&! zz?z*;GU6rAQc>bdA=wUH7bmZ)yrK}CLAOCrh8zf?nf%8~WT+Z@7((@5i>ZDD1405gYjp7rnpaKtAS?I!W zjb)f>u2`IA&@d+uUQOu&*zbGVzal1f4F^G_ORmM<~qr98M zuVg1e&1JKHv#9<`t3Z4QdoUcxa#_K%jmQ}F$%#NvG7^TRGulf3keJ1423oHco8@8( zh4Dr0l1GfFQ^{gC!($p?EE5tk@&*}MHk-wx#bJUy{bD>?R34eY#_>GJ?H`8q{EDYX z>&9SnWK>N?S^x;Wx5IWxY^A?&!1@y8O%K@JY=h-XReQ%TrCDaoUqpUt%= z^Vw&sDVY$5ujv#~l~kpcOb4w_`aKWDHSf8Ns}jI2n_lmqVbSr52F%FiIO;2x+xeiW+ZQnjFtYVu$RkHw}U zSQFF%{}+IoV-po(gm$l$uOnY|g!f=4(yt?S!0)Jtkyr-L3-NZK(6!})5NIR}sE~>3 zB}64^#YWByKDB5ndYq9xgdLobL;}cz5I{%G0_$HHWs+D)l8J;;QXSkMXbL!_(_W+E zD0^b$rVmnLMQ}coIK^@|8Jy8Q?3!Vfp`9tZ1c@p;2BYL2sv$ZOuhJt1VD>0sTt#QT z9!<<8O$gyIGx)4q)fiV3m%XJic6vTc`i4EnJpc9~4c@j_+ZjVe}nBI~`xr$LXAM}|YM z%yK6UNJy9z62VZy_k1LKwL3t>c=ZCnlAs4qi0A4_0`a0CM?{XoguG8ch-*5+2q!8e zeikkfbkH|x|G4Q%j7OL_8;PClBSIBG?-msnk_V~$alZhX_B(PfKvVpK10$w^3y<;$ z6%a|JOMA~?1uhj5dTTmh>}*%EDhIgP_*@JX`3>q7$yfn=p#(<6Oy-l2{iB|uK`mjP z;f~>ue1{Z#+JJu*F3WpwLjH1;Ae7((3Ffl_96a9b@j?kbREY|b^^*<=xuh`S;M10o za3uEVQ)aRH%(;v@&f#T#DwXD^bC46-7si05EEVDArGdscGDi zmE)i#6CEm)A@Ee#OvD(3N?ph8_)*GA!Apgy(K&)a7L-(~QmbqRmUR;}JzTDF*8L4> z2+4~?MuwuXssDCFp9M1#D$Zn0l4)T8Y6yQF7)S3U4M5F1fQ?fT5{Vo_*mT#Frq`D3 z2@JUrRgo|uK~h;z5(1TkFaj(dJ_UJR(=DdPOE9EEABHG(H1j-c=E{y>aj_P&0I^Z2j{zzBiuNbvBZPinJOZ^8PIh0 zP|PUUBI?bmOo|w6-pJD8_AH@PECc|}{ck5WKS?-B{3)bOvOCM+Zkdtlv zf%+-8h|+tse3HzaIE`12?xCmz1zaV?XrM$i=TulkSYgX|Fmb;giJ0*`j>>}& z1C6oS$cHpIPNrLuC%`;PtyF3jVV9|tJvkg+4J1i98IWwT$Su$#beuDpy9DUx08MG#W4)&&NWZTSjGFO$E&(@)e zIq6E@x>DGW$8e;GTO?CA$*+A>1fIGS75|X|g~b@mHZd z7pt%F`T0)dN7OOZoYXHv^5MOr6&-L!sx-h`aK9nG=}iwaoHjd&(DBjZS=tXsqPRuQmRVFgQSunbeM&ia+H8Ja+-&6`@>l z1;`S``$jU_XB`45Y*uClV=ujc!3n5$AOk8pzhCYM_aFefa#(d%u!oGrLWHvZnY=^D zVovs3XLjcpK71qQ>YH35ZJKiOq9iyotm(>GN84F};Y2W~T1n&jI1Ie&w~@karf@J& z*pYZpk=p1I_nGVwrUZ}@O?`2JsO7(e@0`4{9Q^WX3u6sotKTwA>ghvp$495kzB*)oc3WKy?$4qWMll zGjuaY8VZ&j?h)ACWd#D$yp>|6CD1WFxP#az*$9ox%_D;x zC(W=!zDUj%73t*BJivDlgCpzPMS4j*#4yqYy54+U=N{$yf?z9;HN(f#dFh#Y7n5FyQB zkT>{&MAdA$VgQU1Y=secBXKTq8?l6_w?+j?G>Rm4l@tr+o;+hDAlV6dIa61WPeu16 z4DLnKIieUkLdG1EigXz)Kn`^azD^e_=pRp*^aNRJ3LlnSDZC}tGM=By?fr&eIHW1P z5#QI61*-_vk9(d1MjNZ1e|Rd8d^*tik-&&A-zkSIU{?F$15$FyO5SN zYx}X&l2NrW@<={Jr{fa+ zFc&b##T^)}T&V?e!3bc6)8*f4stR-_Z-{o8MQ12Wp6GleF|4ywnrO8FSHIZZLjWp{dQqQ;A33WuvM--2M0HZOZRw?z;dQM@GRwV@t5S=I-CYrZE zI)F~Y3S4L$gjn3BrK4Y6F-BeccMlJzD#f*Bim%3N>J(X~L(v%FbRuV~>{eu^^vuan z87jtZY>36`3OtWoV=0N(IQzp_B-e0QwyS>fS#OL04Umcnrj3M}Q>th{SuRvXVOA1} z7s%P+swpmU$_)QhQXi(#z>X5C zAqiAp+A|)-B=u;zhP%v)KpctznVD?WDnyFdU=*-=Kd6jx75GmN6I%grQ|9cjSx1bd zk+tbPBmrSk#I&(gJjC^)IfFZL5OhX|*77-RiLMOO##rVh6J+MMc&gL+E*F zuZsah-t*aVx!oSZ8H}#uk5`2ClajJjHc~-@7^J^sAq>!Q9O6Es4ZtcDTwJ9%>v))7 zLO4_21Fe~@-y;A4$b`Jy4oNLDgejr4k02IGPLw|EtS^l3DW)jZvkeJT+UBEe10PUV zV<~nRt(EXqZKL_0)WSdk+(a{Tlvf15Q4`<>jiJR1h%Q@ppaCs~P!32lVGrnmij=Y! zCP@>U>2o4D-bHnlZZp0wzTpzn?KB9l5q#{E!UCu1!E_Ck_l?TX7xpGeOrDG9^jJ|3 zpuTn)naL+>u~8}28bO7hbTXsXY$0!$4?AronAfNjL#Y}$Hklbe z8e^$Q7ECyv_@icvkV?`#6=J{)SYq;*co@CG-6x_jZ;R#$>`L~G-s6=*-$HI?KMUxN zTgB9r8CDC~qe6_CjCg8bKR0O^xQCuppUf5*kW!tLNoB^&Oo`-xu?!RQ$3G@AjVw5g zn`}qDQw;f_; zQRxuYiZ@aPK|?nfGLNppJ)f*>dR_|zT>H^(RDfpLlrw>zF(KzAhHxg11sYYrPe?Au zIl_7Mm=Ii<82V8CslK&-M#iKvw`DL4iV4~!B_lOTt5xxQ(D-W7W+5m8@#yleo+WT3 zd_>%(gQ6AiAtF1FokUs~8#oDJtwNy^RuVHt(Ev6_%UH#iw77=h)8LjU}SHNkcv6q@! zblh^Dsh9#IYt$nX%v&Z4qMQcw-V6zLUeCXbL`>J{c$LPoI%H7g8A@2S1BME9vjkC_ zE$7vGlG|vH05Fa|*}&LdU_}KJN=>8*c~{hh&f4+I!QdZc83bj#@w}PH>`5<@$ZTSb zM!*)BfvoCw==MJIJ2n8zB59)y#PiMj5(3~| zG|&fmUI+#B;vKeckl!-nO22A(n9z_?t=OOnJG`^?a-U$6k{SqsSjl z0C>_%^%z_V1u>YM>>5g!dMx&s{?@F0%Dr5zzR|fi2;%vepSfmSCUo> zka_H6ZR-1?tEzz*px#{J6cD<^3K!ot#*xekg||4ZCSAd`-5e5SYlSM#A-RGuHJG1(hSkWLor1Sa_m}9UJZNKh_x0m zc`)@=KJg5O)*OFY;uOS}i$Y7>a19z~r#MXln)nkS;o=LPi7u5(ECII>5(PL%k{Z#s z^h^hsf(TtXMvFQ$9l;|*VRcemJdovE(FSf!y{~Hq;3yPS1Ag{rm8sw18TwbVWU*&r zb)C$-D$i|_gFAGVA;r9`x>NiRP+f9fJDs0Q$p|6fC)z=?66#a@QiKo5ltPJx?Zc=Q zv6x8`9HiDD)(oDp1|Yx$U1t9zOnoCVR2-q`>0gTrRn$N}ud<-D$Ws`h^EpLggt%-!C+*eW5OUc#@vg|W!g?+ z;0GptQX_QIhIzJ11ea-}3|>R5T+=&UUFdXD2YyCQNIes(dfvThSC=@-!$=$o3r3o_Wk7$Xy~PO##3?++>) zD(Dg^6obC&gb6))G#3(~dAZps<=m$*e7YKO! zxNkVaP-O{L_gj=K5X3(rI-7bPp*WewKg z4-Q6|LA!#yt+UQFti;|Woq7gK`yjn*d7!j#{^7zO6v#goYGlFM&tna7mbmH{Zu(e! zV!|1{TM)ON0x;tm<$lPEB#JUk8`Z*owr_P+>xn`LAL3%)qzimJp_Y)(<;qsdyr1jH>J zBEbcFp)g`9bf{Z#%0WzBZk=+!bwmOb&w^tv!X=X(j&o-4810m~%L*%5!k#W0MTba; znw{2K>-k_i5h?74Q@k!r=A#_|yN!j!YQdhHEttcFa7xPWomaDWPKt72E`L90qNzlebs@kREKv9=u`ztXMknG^Z5H{X zHs_Me86E7@e@RP8)7YW_Q_xqQzr4rcaCG)iQtA0uaAcqZ3oT^zDW+v{=OT#l-WZE& z!&pgxiz*J(6=sNVj#QQmp5#giFJ=xAzOcE@;=0D%DoD*=$0R9l@Wo5fJ>p>FcfW$b zJ&x;Uh;DcihAAq8u+kAe0+tMb#5duGZ{;R2O601NN|9g2Sj_fGATe;j0D9~I3X6VG zIO_KdnBY?_vFU_&@=|kUIotFBnYX8V1MBRp!PS6we0|4kwwMSlt2GRYkRO4}N06JfWth3;+0p{4i37 zn2w?O8KdKkTF7OevC%0i{Y0 z#Mq?6l87EdZ0GZ!F;WalS!R$=7;vcykyJb~5{w#UAqvAEcH&ZTHcT2_#7UM;;Vz{x z6K=6;hIL1ncRYeP0zOd)biSp0YK%WexReC37-ojg>J%>+B3$GH?z!Z|Z3fhm+=}8+ z0bn!*%VDeqR*0zI#kY3t9CN$}@W9y@K3Qez>{fdKriZ>j1NsbUwj?)P)}B%o)X2yO z5@qTW3It7sJB6Rcc9AZjswZHFsrV+%ZLH6btqOqxMFNJRV%nyp-i5K{Cy8J=GA&p~ zPL5zo!v?yH$iY7`j+KE-O5oto*A3n}5Nvd4MTPR{O~V|4nxbQ=pQ1JK2!s&c`G(n# zcETZ8Rm89mUk66{i8OCzMZD|i_zIm9q-Y9J!{`)Fh!FO~^HBv0R~Z)%x71F)C_e_6+Mw z9F8WUmFD?Iu5Mu%&UWxs%>g26P#M^%u>ey(%}2niBq^Y&g%^Y9fkY4$^g*GeBGu(` zRSBRofN9wyJCg#nDh{8Md&4RfL<9h+T`_$XvA0A0p>>FAKpYsvfLT?zSB>LzY^RoX zoVr1EzN{D1h^t5i@Nk`P7v08Z%<}zg7L^zkv*{!%!zq;hUqw(7IRlg-6*RBh#*+m#E7s7v z4L3o4D!LMX;HDjR+USa|oY9TIw=^)*9gMzempDQV5&)m)DF65emcU9%CUkjAutABg zbQ48$WVX7Ys8MR+X@XQV)Ub)$s9$NYO-VHdNbI9Ja5}X9&o(|~7XO)42lxh1k1qA?g#oqM4a{bH1i`Y0SoRKC- zimY1Z$xR+pBk%xPRPWlNlv4(3m4sE1z|Y6BAI z^g^qrdM?bW<^DAw!OwIWqJTtf17ZOv;fHbJT4EMO9-xvG=o5HI-*A7M&_is6-WWSa z2))u|?5Czh?-6s(Y1424QC9pTv$NQ4Z7c<=QdHDuK^tv#2b@^v9(jmyCoa%|T|ijT zky8OhP6xd4Wrn#fE;#pz`H&03ny64UUI-Wsv-ksp37%ZR;O?lUasf3PxH=0Ig3PZho$dY-? zgSkQyBKAmDl3;)e3s_EBe+}VNZ`OFP`Lhhw?i-HKWjCehP0sG; zg@0@2Be&5*lWrifdn>6@<>f*m?JTgbLPA%)aAgQq;~`{<;%u1zGr|LDmy~}_cnxwT z7?n=*^~r(%ob+swl%1+fz`;B8uXtd%yTZmM@l4GRqwcdZl3-aC5Eal!{Hk!A2avwN ziTno~F))-zR^}q15Jr^L_fa}4@@9IdWs+nAJ~-3Yiwh3wh?>n*eUdU!XpoU|M9JsM zL(G6 z&aqNlqPk5`j|$D$?hG6vRTE8%FcAzG#T&sQ7aA|HALB6?E^|@_96&J{0po0fFiN{l z@FQv>SOzJ~;Fxhjv#ze%)Xer1y3rG3NDix zg4F6#)s(nYFj!GpN6XhBBix0Wycz+QreOvcqkA^_l}?oIo3op$A8f@e1_H4W$P0Xk zj(`R}P&~&{sQvg6M!K1=(so$D=7fuJL7{+pQxjlHU{D~d;~=h2K$&968e|+ zw69GW+Qt3_#Q!l+#slTRv*{%`6~aPaK!B|26AVIYD?(d#7S)fhlUI z;SD`+j*ThXuz@Z!BFV=bur#s8Ox8G72n&fw6fG&hhpEJhRR>F{rb}Z?#^YS4RGaz< z?nhVj#Nr9@&KZb@_2y^^0SRJonK0%x|E6DnBg$1?5SsECUZXm?C=g|Tfg^=UTy4%; zP-1@LX2E#P2 zTndkhQ>WL8t|}kaa$_vTgRv}^QQ=8fX}pLFc&BlE@H~+vs5;c@UC0SP+A)te`t&?$ z5a1-Phh?`aU@d$!)G?o6)n4&Cxvp~+e5J+|ZY>MF-T|pp)U~ zN%V6>@SxEto}Fc0Zb>^i9l1B(HHbZuV$7}RM@+m8e@fme_D)m}^mLhrtEV<@#6|-s zKP(M#WTsU2?+GX=(i%*71{k@8ty>5unB#uE9k_iqy{4H5%UqRjNW8|9*cbz1pqGhf zR|ykEN%Y}J8=BzW=puNK*=P2I<4Ti^@T!jFAPqqb1FlM&xnjwnGc|=K6HJ{|TA?M; zI9KkKHdEd(8mFrXg-QAa)x>4ZQ|UIxN7K-j4nO5SQnnfFpx zW0Z)CeIO<5f;)= z)eOYE27CrH%lJt%@X0L`B*v3v2G6NwA&rj0K&$ijjo#2}B*9K4^b7>>6*Ho9qz&-g z5EzXf?@kD)EC`z3LsSi9Gf|n@A=DJ(E|OIwVg;R7^I%h)$!T{+5-i_g7wH3qau<9~ zohStQc%kTWABiBw#01lv&=%RMX--{sd!plIkm*!REHXnPDQj+{1Oauy+1Fv$`|=i( zS$-EB&h0dg8->lFzI=3AUEt^(jRL9XrPHDNUVkbu?a{DD+zrVP$T-PD75N>jh!FKm z;-a(JBSbY~JVarUWM<)X>m(lq1$qNK(g`%X>VuN|R^@fMHR|QgN%cu@=^*22Y(lwU zzqTySo>mWpT@f3k>dD~TqNDV*GG&`7LDr_#-|70&Z@k=W{2`U35#(lJe9|RtQWe(I zNxz1mj%wH@nxSd~omk>gJRj=R!U;ygJR_rKzXl~<7zNTy8{-ih@X8S()?JinG7NKTsr9M>? zO1w1VWuctLk(XMNbl!kNepJ*fznGAAHBdM&-sO*gz_bB=V+v&G-Y{z_J$bxyhZOn3 zQ7Em9GH68yw&BPRt}{?n?lYdX%xpefQlp4lHhPf@Ltd0>U%)}zVXx^uZh{6$6BMrZ zBUsHdqf>G1;SHom(#+awV@(c2d^lu(6lx9XYH2KbV5%^Iv5SZFiCyom3c7hSmm#d$ zgk+N;1)V{_bDc{Lh5HmX*Qgy31uDbPbpjl$N#7cFDC_WOxmEgrQa+7*BywZurNy%$ zR;p&lv{teOYz!&nJyr2vz#jn&)%a>EPR9h*0|*XT4t@QnHNJIv?mP$87iM`x`kk4EaHa;EO+ zhww149wL~Ph3Cd_Ho}*K5Gw|J1voP2PKETK>l6W~!i@+i?XW07CB;b!P&pRz%H^gs zmBt5QJVp{qJ}p2JZUG=T#_oXViOeYL$#_%U%Cn91kaGpW#8FM5n9#}meodxmtRuwu z9!V(=HJ^l~Xd@kiJ*k^UCS|Z49PQ;8HA6mxOYrt0byAkZd?-8qxQLs%y*q6g2Y%wMP<73ICO}szk?-Zc_kw zE`O~SR4GS{U=?14&W_>(iQEQW6P!d8xI?%=L~5!-V(LLe)2y7mYAZ2GOEy!E@;9}w*`r0rw;@zr6pp1AI`Fv5Z>6am&`EAW_he<2`S^2A2N6-~0n7*T;ssSRSMXn97f z!{kh5MvWKztI-ahhIejBosyUemIBp`%rbz?=^+xLD7QkXih*>eP59M(3t*7i1kY4v zreva~S1L23=MICP=H;GD0#vrv1fHWlGZ#W5e4u`kk--o-p@L;fYenv|`KnYPfDP$` zrDY5YS+>-feQsG=S)71EJ9M5!``Hs&9}K;M87nrNR9|(p6-NaZ7FF&+uaE1D6;)m( z2JO)I^EY0YU<9wY6-A&4?q%LW!$h-04Mw+s8jk@FX=ysOq@<}YTWLexZb-p()`ag2Mf64bA>JZE8Hs$27OjYXxGf{^wF}A95&{{Z^ zlIfJ4+ud9UhN2+NoaxsEDd~vqK9Vsj$5d~V|Fcv=R?Bp&isOamlUv|{SDXhNr*ZeB zJvh_FA!lo*Oz&d6%kpbYb?=IIP$E1;HKW4K|91yU)9bQZR)BL^9Eaexeipmg3wZFQ z8q+uVWfB-j1)`RWdSnq7Lv}##Plh-No=O4=7f#?+MUZfS!^H+kZU?H!vCAAisY*HQ zf9kgBT?{jIzhVz~ZUrzx1eoKBNdcD`7zLQz<&SSLdo-PtlNL1^!6k5K$0lkTkWyQR z#OSFksaeKaQNtK8rv4Z7HMy7kK-?K0Xbc^!Wu8=Cm0h%(IxnH3s-j5KVQH$^J7EEJ zjMCU^$VHty}ZDs@W01p)~_1{>7IUOacTt1pW9wn>=B#|ZdP2zSr zDa<3M@s1YENC3w6pPxlzpLU(;tgZrNFrI{(N}TR(c@56>Xid(pFtcK~!gk75*c63? zw#glNkJ)FCxPZ#JsO971KqdQMEYGZpHk#x%-N)`11@!i6mVl)ZJ;utdrce2F(NUu7 zDw*FQlb%d`5HV9146)MWPW@uZkl+ z+bQd~Ra-z-zc^$&2Jx#%9#@A(sx9NKp~?-xBYaQ+O=Aw;9U(Q95Q?wV<)uNi34L<# z?GsW_dk*Rs$P9cwiW3Skn5u zwa2L2mB27W;-*kQ$e>61mp9KOh{9wqW&oudXe z8lpCEL?9bs;7Lm)DK_mi|4@5ctMjes(0yN0y5dv}s$*mhe_6c?5HpV>+(TJ<_mtr5xAl8iQUB|7o?8-6m=(7YZ*4)chmP8_Q7E?}!gF0@X6l@C=n zp{Q}5pD-srC;*HVuoH?3hOyjr(b4$jVlyI!tKhi$wgOCdGT{vFkhy}|kD*e|EI|^x ze3EhxR2=GO>VBy=M$*+A#6g(R$FQ~u`=RtAFoA6Z_R&F`&nj@`@6{Sl}+d77Bb+|i&y#tu47MstL_Btak_ zKe+*DfGS7|KlrB%|N7n0Ub{Qm&3e4%$C23>?KN*>emdiFV>B2+5uNNHn_}LT2$D|m zD~tMpO3|f{NR&!l|8P=)=3J&^wo@RDjLKDoI>#wsfW&O?w zR|=I3&TflUbhaDOF81CL$L6pa5$C~VD5B6~zM)Rf?uO8aTtbGg;~M`7hfV2pH3^oc zGW5DhUCL|Xf9f{sk7h}y)tO+FP8xzE0n1M{Jt;6)0uHf-X~vHTlbBj8`DG^d!(6zh ztlzX;X?~!M;mDRO(V;!FBK8NdjcxIvtO5s?KYn++-Cb3RaPsVuV*yDE`=tN zB>Z0ng84OpP=jINGNqP_A?VvMD9hFOg#!kPiFYuZ#l^xBWjYEyY#^+q8%1ngD5z6E*Q&vGg%q!>EanoYz#Bm72Wr84{*jSmL)y>y!DxQo zgP({>_@Oi^J}b6A!3_cNV@(V%5hwv#QAG3nNk_$#87-bf4wD~TVV*dzOMid`g~6Zq z3u_YAJoG91oyp~MLh`juc8hWh(SooW2A_-DO=rWza=jU}@&Yu=q$3lw&bX zUQOSyTy-|@=j{G9o$WtcE&aXP_&&Tsv8X&6zeqR)8bLX9(jC{57Uwm{$!G4u%V6=X z9ROR^Fr$2wt9jw-130E9Sd++DSP_ErPAtzcba+EFB^S_`jGYB@8V!DiMvUmn6{D~X za)Mo85WlL1(z~_;-;P^ABIFwpv#%TlFUcvhww;xt{HV{eeiQ^I*ci6aL2?yjuHnim z1__zv6~k~!PNk)yLUE2C$F~$=_)Lch+$96;ECaIWHjWN4ReY#719S{D8;LNQ@F6KQ zHZU;$Fq5Upv`_I<-S>Yr-!zS|BQq11dm`H5DH8f!ludySL znn`)Z&&jVsA*gF;q&wsfuBfwv+o37)!LX>d#3G=uNZlEg>Oay>%MuYssm8!Vbs(H5 zPg598x+dL_CP6(q$7tN2bLmek@%sTCQm4xdhq=gMa8q}vO=u%@Ip^5$wH%p`5GQ$0 z2Fh}I`->rl>}`=*yfd91Ju>WlMRS5U{Rn%j91THo!j9lr$|$ArvP4NEIS9Z5X_#lb zry;#lyaut6ptv`>i+~15D1b4V@Z?ci;&r{EfDsVkQ%;@@5bf=*E3y2ojObi&GRJD+2UTv4bS62%`9dflyQX z2k1x-)EaKaBNB7?<4#o;ITUxA=rCUi-8E+GPfbZ7}bI_AxMk3)h_!|1e}49lzvm6S+` z-?p8txRu~1F12E>^0V5x_vh+WGsc0-#}S>8a=KGd2}x=@6&gH^S{ z{cs=!J_-^FE|KE6(l50#B98NJ){Ks7qU%?t`2;`FQiA=UgqyY(MZg5Qh6ExiXt_c! zVsHo6i47Ln);r7*Qt3El(~^J$jF-;oJ9>#A!EpXz=6Vt%HS(z&xR(Wj`DYVU#kP`& z=nmCJ8cL(VZ3$&lX7-73TM?jvf$9SG1q5)^=#4o}BNas--fg}pH(jEC-3V+BZLJYsL5fE15s{2o&6d|G&9$0Wn-x*n) z#-^a+j9@#!D#E3Tkp@F^1Xuh+>43tz-FUcy&`1sjffFr9v`KVR0>MY!$?W^V7!W-& zDkkk>&tbzzebShAc>LpEz3KQhVfCF+^|U9dzUGanx@|WO3lX5UwHnM1idv~angdWK z(w2{fvm6tJXlo{j4+h6M3VxYVzX&r=7(V}OW`vd$G$5p8=CzKU&gTc488f1cCqc@B zS;X4s9#I8m8E&@Z_Y+#jC%KKL15o+}kc!~TK-n^%l*zLZsE;vIPSyoHN(HPJ`H9HP z46~mIWsEjRA6qy^N~vl|Wf*H&m}GWlUmH!T!%jOzOF^6mi`k$ju%f({pQoUDj7O8B2&w@(pIl8-g?=ZUQoj^RaFeO<5=&^g(q1c= zu^84L!RMM;YvSpGV4c{=r$5Y--y=f^L*`nslF4V30J$-i1Bl2Nun4D3Q##S0`+?Kv z9wl4=l00w5+zn?<-MD5)m@!d_!2(0nGcXXyP3qn$Z3p2G-DAEn34~8&Lbx(B3xcUX zKtg1vYg(}8>-mUXjV?dd7ga@HDbuGF^h5o8>MyOrv~eeOEjx8Hi#0hP6Ow+S+o?E4 zz)g&m)*$Lh4rB4rY)dp(?irv~+|tM{K68muxe1(t2rR0~H~^B5rYr#WU5S*@j5G!y`XY z+vGXWFbJ2D+Jtw6IXX{PTk-{%EB^IRgp4M~adn;w44cwE8i+G-}B zUC~#4U`+uhGun9{cL{-Y6fx$>Oh%nZV<*mZpiZU~j?_+6W@V zZcIxr<5O2SKsWNUPue7Ihg7P#CWGeS0aKzu2+e&Kj?^mCf_$tOJkdjqKgym0F+d1Z z?6j8}585vrBrY_SZ=MVB!VA?YVI0np>jbLpT*+@4cPv#jUxa5&`>9=%K->=dFloG7 z|KRdAJg4E8Yt@jH8B}@)?h~DH1HQRr;iyLCP<4Ry5{5hvIHvdro=%&$G(m#l*gXF1w-tXt-woR%X>lyI`1cy z6hfQ+j%?8XXK@&`hA&g=U_`)JYGm4xoOw{a7bS}NxHItL2@hPbWW=12KshNd3w}m_ z0!$nYdL8oz1@%1rm5miuP#l>gh95h2CCLZ?RXtIG)TufzrWcNie~ykPFxFrS1qnp` z*(4$J+J5jxXZ&q(7mrU3dJi!qWOo(A&FHdzu#XeZITZkp)tX3S0(v{FINb4ls z7KwpjNUhEVe?3y0A=ENfTBBH$q-!!U<^=ueRLm10Q3jWiT`jR1!i`@ApQs#&_zj(l_XEnXNv4*p97Ki@KZ39; zKU<)@Qgv3tX?Ji>gS68<=?nLe+(LJYWW_f4gED9+t$}>Lxcy}sazInlwHqZhW4Z7 zap-x?rWBpx`QR<7EfvI@qpPJCpe~st{SLPG1U0kLCBN91eE@W%;HGxfGA`i3YAnfy zJt7o>T-c4ZYBcv{)SidBPIL0__b_kZFilDXK%yPlQ&6 z{(wa*xnxcit{)(OaZSi*RW&4#nOAC0FhVlUK{jCGsQnD6md2m3At6mRAqjc23y>8s zMfFsF(IGPGyuKhj@#i^ENz|Y887Jk;!f7Yj#J)a+w@wvtE98y3u!w;N?>m2fbTRrT zQY2rKBDw!*F{a*t6v@})ZahoX0eMw>-SMuA1={z#nQi1OL}T(0QDE%&io81t!3^@p zT9WbBQuy)w<#6$EGl?+V#B<{?7g>fl?ZMz2?$&m_;3t*&Nw;60_xZ-W&*``3R%=G~ z&3Hv|#WaI+%Ma*=z?ejqtqcLcA{Jq`l%C@xC#**X{Fd+d9$Tub%n2()7@2b5Y+nSD zc^WmgHnMfnl0l@nv=-bj^RB#sdbPeDyUQ;K@3+)dQuL5HFpA)KF0hpnD#ItV*%?u0 z4dbdILj9Vw8C8WnAm+3ZJ_lbKL(xY%cK3Hohcgg6&8LbD98_cCFsN5QcF!5&||va`@8Gu zE>zJ=J*3-omM*{y0};v3 zI#DriEgV<_tVKB;Zx`B7^AY;-Oaz=RNns`oz#~oVk{^S&kEVr;C#ra*$ZFM@-AkIi z$wR8SD5H@|QkDuBTxlo8YrY+%BV+>S>E?zX#Nh|F?C>zEa1*tNWHlmN1{!C=0z`sn zNL@n0SWWLOi{LZkc-@ey05DNc499$rg3GTpr0E_%hXMWJ77Sr;HKAezKRy3h}!?uj*7QUCGasAgugTZn^(1#48H|daiDHF;}tjGrX2pIVT%=1l|7fRC8OM;U8 zekV&DEOTSh7ky5#a&{HN9Z1cPNeSm{3laRWYSf%_c@RkoqEIW*JndMA&I-mZPOwTS zxSNR!_+$kDPmcA{)3)YZDdem>N^zH_18qoZ+#FTPv2jKqePxkZZE3)TQ3K9!-It#c z8ZpClvM9!nvP6F^&M$JSfxvM@meFp`=6fAo=9nR*pouiQM<=ssW;#G++*;*%f%@V0j_+^{T7D?5x;MQ1*rS8B!W7=!@F(p~FE zs{8uR8InVrZ%DTH%xG$(owDY+y!y`V@Sor@jVITC`4}Dr^csQkIGui`!1JUWIinx$)H4`2h-bMEleUn6D||DXp96g#;lZti5uAcDZS=h>p5v z27BeWU<>Pw3rYGG(iqN~8YP&(5YU)r)XThu!R@ehGt}tPEBm+(jeeaH!HtjV5CEwT zv4WrGm2eVl%v>x84lkem%kCX(DA%nKVgU00Zi@%a7)T~M5H~1*;K5l}jbO)Pd_2

%09N3Is&`gE= zCA;+JXOhg70f_c)NBE4%XeVqUbI64oN_W*((U+uOcm=64B-qW5>C(W-Tv`c~U<#Dd zc*R;GQ~a;p)SIgX#m;172P*rUR{>2EsmxG#Gnbz`Qdw!J_19VgEL5%@4b zAyl)6BfTp>A@~Lh3U>q(YY7egQ;>jh;uFpm(?bj~TNTg+!>7!8F}v99`#qCnr}lV+ zG;1O4*#o3YShbb&1JaYrI6`gh7cYd?#>}|+ag_8>T?K{iNp#}CS>xTnQnH>dK;TK;6QHlBZq%Ns^ z>O8Ju^l(Th5d+wu-lttaZg_Puwd@F@@O;FLN5(B|iCh9#=d@vBM&=eb+C4l(E+|w3 zG^o5pL=l7HE9is=D(esgK?@2w7efc=cF;=Y5w(1W;bC({ImPCpY5;NdgvUsuh@p^H z`dF0CuAU5Apr$cqm7r(Hs2}TQDkgv&wQ_0d!C|0iu`0|PiP`qSxf^b!qZW6%&mpXj zFWFpDx-VIca)_shO{nH%0ZC|WTBR&TW}o;3N1!uIRM7GXJ$a%od{nkd z4U|pSz~D0a>y|QFV#a_O4nzAmZ^R}rIBoq|%lFGR!X( zz}$dy(goI{0t3o&`%`N!!*P}(wtz?y4nRK5Bkl?TJB086z8A){yhf8&7TNBFAKM36%{w|Mj_L)o0%Vp zkV*)LuKw1}SK4sB2toQRZ!qly(#4{fnxyaH4IB!|Y$py>FshB;QKLnuwnZvf>2?Be zWSqE3trDH10GHL_Mzs5lKcQ!Pm+&-8c55?4%s3+mKt62&d&YfJw6$I}acejTv1WQU7IA`qbH zA64@VkRpUNV{j;PZqmc!(=!rZc%C>afaitAH1piv9cMir;U zV>V3NLwTfa`15lf&*t0nOqlsmNO zNR^ed<|vHgrmLVZo-!~F;gwu91+t5J>I~s+W@W2%9d#t5Isn}$7>B^>7U_|3L@;W@ z7(PHPKQ#xuswU+;@hmps_F9Dx2w+-oxuqtBN$Ld?Y^)+y_c3v5CNjej@`@Pp=P~!7 zn^`o>D~-^K(_#uLbDpjrM$Ae4T1$okWRnt&rk^oW3o}`K&&p*r5Uad47s>4=+jywo zX34eK<+@m5H`#QFjM)^mFpA_x>`1Mg)u)PLu|F#Pn+ z{~$7u#(oYeiR%!7ogf+biROi_T!F3&{AO_QfpVGzBEaZ!8myG4PDdex(LdplBqI#q z5m|pm>~DYh4Eyt2#T+|;7z6gqux&byVQ_FwPkC_86$#A1iuwR-qY*qxsf#1G_nanW z2=mGQiGC;sge9#+ClO7&IPE#s7Muc;130?Dure%HOoUv9q1fSuFdr)GxzSgWKiNw! zPBUo_%r;Vz84Aj>85(m}mEX`pFh`AR^3hkqQiAS!W)y*1g!UOn!WFQT&F`34CX7Y7 zrLAZF!8?%X6)wRQP$^Jh2M}aX^60ylbo$N$GspIOvv39!f7VXaQo6N z&T2b?0>FDxfIgeDBJ`M7opaO`%aOQ*+j-MY%i}XyF|Oa)gnn&-AEu6BR(- zm{qk2KmsyBHT(jHRqhAFmwZUuRu9phKvPWBlKd%&h5amh5aCVJ5;bCxwHPrzpH>ja)X@aoCg_h^X!*CZM>&VpD%naybW%9>a4k)V8;GU>A8XRqAgc^=O zr(ys_v0{L^o6)GjDt2TSHj!RxCPZ$j_e^2VrqOIG>@THRzS%wN2MAjnQAu;HgJYhI z?=g8?=O6Pl(0Vl+J|ja+Yx@bRpbaK{*<>7-0+^C5_*|6pxaGaaDeOVky_8qx$9V8$ z7Hj4!vknNQNB)gUerJ2dDoPNSPv_ZQme?^s0$@!g*;#flMeeL8tBkH0G~ilMb!-GF z@F^oxQCukN1A#5a!JpwR2#uS9k0l2^O4JV*t@?J)l`5BDm+LA?bF(9u-ij!&j$D{q z8K3iw3P&ryuvt>ewV0CyQc?XC{ea8q1B4V5DmHbTGH)1)iskrvGr*n%i)w(U@!{4E z<3nvz>`*O6(;X?eqqFaPo0yc2(nWnUV!i77KQYDyBhyQLjj%Wk1u&njaz}|~l~F2p=owhUuL3CEFi4SXF+?B--M}fc1cqFip18WN$LtyR zO3FK^=wi3t~0a-#*pey#JVnm|~jZYy1SR}Ngn-uUlEyQa~xWJ{!YZw5W330k&1%0@U z%&VR?p9s)U{p+${xf7Q8uWkH^xv5aer5u7Xv07VVSd~wGC;}K z3L$X|klzH0q^E)J%3!)RMKS=HJmI>qUEdZGJ#V>3Sfi3LqB!};IpD|;c%+FI@}h1_ zge!}MsZ=sokc{I#Gh!XxMKg=yq$41S%riyktO@D7q@rmV0ZXhiRJ)jDU>eW#sOTt% zBV%Gcrs}eg<10JeA{*$pfsBNq^kTre+lID%^7?efZT zI<5X;E13lH2by_P15soM6{{L>Y|{jevL+2aawJ5yl}paOw!@zvsa8Ay=)|XXaYR1( zv~rF8j;_X2$Ob%o4F>86QA_^B|81Xa7K<`%^f#Z+&?%|xL= z9mja0g4{=Vs4C5mRgexmA#Sl^La)~B{4N@meXBTLdEtpV_w$phJa=1l%D@+f9#zW|LEz6rF9Tf9eB?DFSt=gH+mmw?|ET1SI9KELlgt;{Wd(W>4 z_=Xi49JwamZ2*Y1BN#mH^1Im+$_2TI_X693Vjs(4iTJAx4A*szgmEF2+KpJ3)9jp1 zEC!FIClm{#SX@j9!h`ZK{6a;KSA>yGec2zDM>1JKU)kwzZA3(D4J9Yev{E@Um;je* zmjTd>@*wBe;0xSDddzA7p@ZY-mpB2?*bpi0d$Ic{>n`#3V>!}hXyMrFla@Ttbh6TdbR z1g`0ZZi`ubqcNereX_iZD^1{-FGN91NsB{H=-_Lm)(o+yDZDi(QD)oEu`*~0huE0R z?&Arnx^9_e^2&?{+z`p=l}A7bYODdGYQxt&nQ8*mlzEior;;|(=8*Vfbqpe^+M#Xk z!55-ulEln*JXv?;tDaR{hy)_rrF|&_msg_-Lo#vaMizG3@nNlHl^W({(z}*ga)rCr zA^PU=$+RUV(G7u}uz(%zTWB&Te8+dd55QR|KS#nPykOLLjeBGSIJj`gs#xaIr4XXx zE+Uc{W|=R-wHU8BkFXxbBrH!I4E-QxWCzQ(A%k3?DiBb!0~N{%W-JIz*lq&QPw@q) za?zk0L}&<@semjJ1*g20ba8}T(7lr+SXL4x7d~>ZEBb&T#*n#1h|*g(O^(z%CVvk%pLiNmp?(T{3)_}|1?@c> z?XGclRz!P(XW@JkjOAI*K-PJ>MM}cVwtLmkuw`d_8pxCLsP6=^CdHR9k_Isy%&dqh z8rd~BAiv3T>MO>-Xur3Xg8g# zM_~%u+zcHC{ag=BpuyPmXv|dry^H|jxS(d%qBf7oN1;W-H%Y+}#NZflJ0_PWF4>R| zv;n0_e))?S>4)3&!G9V@R6})qHjs#-1j}nG4K&-geRF0gtxCoA@RD>PnLH=BI~8jl zE8JKz&YDY|P%E#c&g8GV%Mg>|1`$RuCZshfMwaseFcUdX?H%`m4Lpalu%Mk~nu@bL zDYdbHT3pQ*|HIWRU(YY7E8*k<^~I@_XLim~dQ2a~vL2DT42tZ1-_2JuHy^|Gw3=TH zZ56F;YlW<;VNU{(6~3k7IrRiOE;7ozwnTF_+4?_naegFtZo0`FbPKY{zEOyaR>Xiy zK-X{ADi-t`jI!!ig(O{M-y^--?6Z`}iO#tp7e#@JnGyvX-1<*)kkwIIQi&g#j_7$gV6clcM{2nKxYW~!fGn3s594W&}!Czf6fgH)R5O12jzmZ&dsVGe%90Q z9ZbU=bn=mRE;m(x4bS>?d{)GVT`>O!QxEkrsGlN-o`JsIa|nB+GyOlON}063)kH39yt1{ks6`;n`s ztW1X4%$(EZEakEvo;Sia@g>D*G6bei?6JsG)+``(zq970GRcTX#xRgoj_ALhApd|z zcO7!|q+e#2M@BD#@CH8Y=}g$yC$rrC9&dEVndRx>=l<8J=h^^l-)WPNa8WH zh4&Cr0_a8~U5QQ2c>sPOCBzd`Kuc#!{navEVpPJ8_f;Q`PhJo3=KcdBqOXJO<=>^j3nWX z>)2(S{lIFZw#{U)aWaz2*u^1fJ=KvUB8qp;G`?lBa0&6qh^WM63{c%Ps6W}FE)2hs zLmw506nv`wmcyC5PQF3LLJRCQ*R*=Li!$q&Ep>+O^S~H1D2IbXY@&~vstVQ@}ardThc9!C1B#%&P>-<&DZ?k|bZO<{mZ z1!?BPQ~U)F(jnZ92&o9hm4=~pQLiFd|~p&V_TzxOg>hD#kXv<8-u zD;g`_VY01oq)WzJF z4e0d9bry>h&P(X`G7~IX#GOVtmB2Xv1kdq0NnL^Sj1Kpyum?jAp=d~9h9gK&N@#Fo zx~#Tk>uH|B|0+xN6v$FRh9^ky4Yz_0wdNcl@~O z(AI&0{5U@}3YfzWw#DE|uhEx<`RH&U~^H6Fk=CH*qh(C%{UOewc zlr-p)MMd2ClX_RJlH{am#h!ixe+gb>n~23XSPo4V%W*M1zXqpO0ASi$R&MtY$%2?3 zA#~~jMg>VmBz zA$^q)_+6aio1Gi3xdxlZ)Lh|H3zL=J0I~%o+H2Sx)nOf2;amR#=H0ZHoP4*4Zw7^J=LVTe;D4j#nkeQ)GJqR#NLr@x% zi0aMO6o4?v7!1O~lQ+Lxfo4sZiD#GcpI0RZlzS}InEPnsPO<>hVJ@`F0oF>0#lWPeAS2W3dR2poM_cmH z@$?Xe{~eU}kv~6ZkqIi{0tS5+FA=Er3cDyRF>n17e$=9Mg3`p9F7rZVHDz!fX`*Oq zz^So{s-f_*g-HG~nJWC#vg?^9tgq$T#yIX1tB=^PAP zSfC#2puz%kO->jihC5pdI~5mFtEtR?us7mM*i7?r;-?^}QdeRI%4M87@QgWC@XPmk&7E*`6^A0;2{=`4j;kF86ymaRs1G+^ zb;djFD1qLw4>$ZLAS4`f>#cI*60y$g0Aif9pBxwOVN8}lM%LSPVH;xN8Z?f;EXiqW z^LAUJ2Z9cV~I&BR!KbO&J=cB=nT0QjU#vm?a)p_!|-r5AdB8xPs#4l7t83@xc@lQhMv9U;;|s5h5Mk+~(u$W6uj7EUOwVMQmLq~�CcARubSMv$_`w z2>uJ~!un9$Mb$JEc*G*vxB-L#MI0(3;<6Q~XWq$-W_(T8Ovq;#%YDdY!+liWuGpkNT~DR8!KX}H+6uMz-Bpt!gQgod5m1Bxr@z)6P< z-<_>9uf7qCb;Y!d8cCC%kQZPMm7$BOwAc$!qO*RD@(BaLscxP)mDYyaB<~3(et)>3o>L=E0=bE0OusL z88yW56@&0PF)=p9;_%6kpKo%Dd$kVA=m#?rzCliPSG;8y34NIyaq^5pL0t^<(!*DYCxEa_nvdgKB{*%NOEl>VoryXb)W%*0~+|Q zkaVtv6`-Hp<5IXF0G8AuxK0}MR7;@OAgZ#-2GN{u&{7u5dPr+E!HJNiO=c~W0ZF7^ z*4_(Cqt&p{MEIm8FeI^G&bFirB@hLYrnwVh(*(583(2C`h78gaO(;@C(8Zi%6;lxlxfTk5 zIDVu7=s}P*ttF>YYWXu@_74GtfJ|AiQ&bSkGnwv-rIC3V>8Po6xsei?vtz}Dl}LEK zbqF#b2*;O%#QNsC|0-w8J-KWl#pbC@fh4g}azl~;5pjN8Zg6TuD4CvojzYgOpa| zVNY2$9gFV{`P;z`+{@euj=l<;V_6~q1o-PWoI7X3xi>!#JI+nK-N5mY+!noPovfkAHY&A`iQ<-6v$rXhZUE^Ov6~)j{N`chA7&ewg(o1riG2{k8(oIn@?f?8_M8R^B zy}tHCqY9W1crJ=!N+2yu1HPrI2({`(D(&8&kVZyk1-6TA#6j@##3H68G|!@hZVXi$ z4^X$#=};|5BtRY~S)@X1+~k&N)EUtQa4;bp4U*I|@8B=Rp&*@%j$x(v1^p3%{%6CU zoWM{UqZlQWEXt_mKb$C09!RCZ1IS>dvli~^Iuhz=xKIAlVrM51X;;6sIGzq%k0L1U91$%j z0P7YYD<`5H4f75D2wHiiriJM!3!mu-gc7w3^%!%}-bv2X(!4EmtN_I$Wwd5fv&*J@ zB;$w<&4O@|&)FIrrKFlnoeAp6+?L}pBnAdA%B`7_IX9OOF%g%o0C31l+3q~GIcRKW zH8WBC5Cr3D$bqnxR~AOd#tPuIMvyv&C>yV000<-z$Ik4+6<~Nu1+g8fNWXKX0A1Ii zBz?p$9;6smuT73tG38zP_cBD9{6wByUHcT$(7vcz2dHL1+IG2y=GV*e#f;oA0>8}g zR3#2#t`p*1gTc7;N{C@qyT1vq2%@-2glU5#@cQ9B7dFxhmWh2ev{pB4$5W4R##y2o zG>u^xeG%)a;KB(;85NBq->6eZ_ocT{r_W9gW33Kxe-%Eln3E0Dh#OLahpA9io1+(A zQX=;*2nqQL$=A3rrht4+RQRQ$GD215BM%MkkC`^~HEOkXAyP}Mm4OQZle4)y8om$| zDIIAJ82w1dDKd~&aj*!^PbS7#%*e2&0u2G2M2nq?*Dd>NN~Ab*qIeWojJJv#sSMF% z1(n+YitVj}loN~Fyw2`hgmx}*LIJosR_jHc zIi)&W+g)j<;1d((?`ido0-aQoK6eU|JbRnvwK$egR}ciX&=qRbyd5!T<8)Yt=OXW< zG-OiG4Dum3eG(=cE>mLz)o3M?a?nabPRaE(w%WbQ1#}~}spuXJjnvoF>4+sLODODE zKC&nTo0Fw&!6FDbxz2%`qAnKji2^XfVF4fCX;Sr32p%$vHR6XDO&k_xT(u@$OgO|< zxqY+Bp-2iSk*L#{**1>#o+5}|a$eWrG8Cc9D+YrVTy=9PKJhKLLpbHmK z)t;J+LrJE_DKt8?pX$-TA#f!MH~A!0{Xn^HG%Aa0iHXd2H4bO7s}iaplI*R-^oVC1 z1*gH%p+$m%zUDKy#b?BW#qd<5Q9b5ObvHri)TO(qlp5*R^rPXmvzM1eC%=sVfAoMzph&mfyRi~4!XzG;7*pr z`Rk`FJVd557dL7hfU&)6IZF2p!CyHv61VI{h|mvDLo8x>;!>C){yEgnc033g-H+ zfXxo<4=4Xu(UctAD%Qh4O)3^UIk^_O*7Ws7skN%It>D_jRwI5$dSARH5M5_M#(9+zj`jc`;t0{OADha`SViYcV$U#$Yz-AbRy zG>^R2o%T0C1-yorw3u->U93yH^ElwLYkr{7bo1*SZwE)4KBKClF)D`fz`;Wy2GdtK zs&kA1efR6sl=06z^Evgn_PReS8>!OSDav8(kDt91NsctxY>q6eDDn3g1^DS|CBqN?ERJ%xYDskGh6!P_mrL?1&v9M} zxU6)=6R|^tuZ?aPAB3q$2Wd^DW8CG?E7~Gybs>vimhv-RTq@ugIsyl$!$PktF)}=W z1dHGh=M=5LIm&ye&^BC%{1C68oczK+#E*M#5t!5Z?V81H7>eQ8pI{bEZ0z0Fa*V+9 zh|1Gh%Fv7%bwiwjF_ZQyWSkbW?d4F6oSrzwBiiG(smSOB_7qww85+TTf#uMyf!0~V)dLz5GBrV()WZ)a&xbpGiI6xXM1t{9?m`SeNMV^f5KvM+J=?!%zT4yMrE0` z;|ERGW-E^N8#&<0yiGv({IGqFG*%#otul|vAI+<+NeS=c=^z0I)(G@Q$}FnO9F6!i zx?aHaBw+;Iy6}Rj#fY>48c}jCBn1L83j3tUnjo+qQ8#BC$e{Tx1mj}JwOEk)#MGcg zf>;AWy#ZsuIdK)>6P_82c@)MRt|&21KRsgj#N33>kN2r75H}K**+R*o9_gd&pP7>h zAEQA!u=Ls%H5bO4))Fs3eWt-^h=|#bIY!2<3gjaL5l!JI7O*5*?}DC^D`Y>*Nmkl6 zKimCtG@s#Ok=!FmB~#73oRUL}F-X3)3hIGDh&>{*q?_i@SS?V!`pnvG1=C2am1u(x znQryG?)?CflSA+|=!sG-HMHk+E-|kJ*>ryp#j3sKKZf`CzTE4 zC*p{BXAd)Ak_Z!fM^Qi|G5vb9w}Ut26vP5blaL3~A+>Xu(GXdHoi7E{KhhKd0!|W- z#1q3oRM1?`K#EfEXR$vUFwO( zsM2ActlhP5FUp-(IK5tq&V0qs#c@k&Kq>|LWGp8J)f10*>VCo?b1pRxHQ`H5iF2*% z<8cFO@7B~S0U@nL7D`Ur& z8Nq|RM(IU`6EDFC&I?5LVh=3P(fN>YSS3831WR#vjmjeaOxHrrws~ql1k%a=5Mt9EZc7=Wug21_MqgWhwyN zC-!k^d)WZI55Wnd24N8de2}Al;YvrvoajpdBh4_zF3MqBAOghKK|LSg)v$Q-3bW@m zFmt*xZUBHCR)JZR6+tIdajh7S1~}=*L}BubRiJA~nsXbK4H|XW(s62|yQ7bWQTp`& zM#X?*TX2yzOb2Hypit|<9G7v1)lUWj%!9mn>6HujG@ko3*Y%csoeGq8V=mXMx@H4u zCGh3TSU;t`TR&vZ)iqiG^<^-8stNF*X{?q|*Q(poh3JhHK1Z!gw~Q53^%>rvf2M}X zH`6&HMa5r*Q0>Zi_Sc-WnFI|}w}gz5W6Sz;CF4m9V3_~F0zTb5Y!*-%F0y-BaqQ+T zJ_={-%v_0QN^4|5g)|Pccx5nG%&5R6JR%*fEfGf49?4N44p9!(IiedfPj^rGL|CI= zGL&*VYT+UA;k_0wkdL>*qE#M43G&c}Rw7s6rm%ZUOV0)k%ri}i@L0Z?ZB$^35woCW zVuwAvm9h#J}zyi&alk+HP*0 zIYC<;f=qMiQCzkHh0g)ip%UG|>a^3s&1x6mdt1hnm|)7O8e><*nM|Ou!whkV2ZV=$ zDH=IxcvX|dUlp~j-)s0Pj%7w*DO?0|uC&5(vrq20kqBOY>D6}TL80RkemfSCc<&1`6sHPtFFAp*Jt0~(d#r8=o%DB=tVvj&M`6hRgdF9&3m#a0}K z8!N;!v7jU|NigIxX@RL2U*j~ina{WxnowpmF|M54pb3Q$;U4^v!B#UF0wgo3;W{{# z<(Q0iP8JxIv{p^24_+EMWz$tZ6CcLAq@OjJ75XC$wOd(0Y+@&8N*GZtQfv(ZH^fNa zK!#vE%{yH*SQRrPqs{XHR@e8>!ARVY7a#2@>`z3_bYp4u`qbmrX7%N61uSCu1I7|! z2oCv-QZjIw@6;$}0x-jWkb;2(D=@B2v`2EIRfpi*3;>7}B{2~ozT*HA<>17U6QPBz z>^ES41IB`Y&ZOD-dIK&H16zj*j4>+ZQ*Knx(s zTpu_bu7OnXsYN=RP-z=TzMrsx1c^?Dm{$--5Af;FCObu-s$F@fL$8T+V2N;-^dd%G zkTn%L{ILm1QV2$hYPIL^kOZ>7cO|>kw`^ktMTrFD6$4@YcXbTdNuULZW&;|Cp8H1< zi4}=t5$5n2O$o-|*jR&t{6p4s8Vt#kAr9aJIPzm&q36!3rZ1ED)d_w`2l- z4_f)R3bw_i|4#&4p8YL?4Qis8xa!MxWY)W3yKNBVM)UBAxx-0yJ}!t;S4R(C4KqcI zn4^$Wo)t!{s2FESIJO9}i+C}dlTa;&Qth;Diz7Cib>n;&ev6}cqx))pcSTrYbQ#Ui5rW)SA@h*%|+d5(aQ zHDIz8PBp_5_1ETOIKvo&>O+fR6mHT>LtE|)Nfbth3r8#`I6})qrR6aj5gh%su(`RNP|wFEiAF-=9ljhfEDhzfDDS_Y6khd>YrQ@ zgI9G=h+C?II1<0W6Z=9HMq-vy7s6&XWQSP3FKHC#8A`fqnVx-4m0y&Ff+FLVAit$3?ojAjt~>!YV4wn0yV6~d1d@8D z>T${nbreY(VOVTjk$MQ91xm^%roCEAgeL_eB2iz8Ct;)0ENS~I@|S7ED_+ynFnFys;0+Si_7|#5wjRs6a2#=>SO@ahO^k6O zCWbLHC1{XaY`Rx~w~>Jlf`dd}a2)e^C~IL_S}Tzc?=j&7>Ld7RgomE_9BiLM#aL7$ zQ@td@GAX4r0_k8b)~AV&U~VP`kGGes$KDpaln+sR#8xm2wL$c)>JdlU7=Ssj)5LCH zxo5Nmk6AEba>scIu;Dg$|J3#J9+lE&C6PrS9D=G8CEDZuwlqyB9Ow|P1x}*qXq!?1 zNvP<1*Md(yA{ngB@E4>*Fx=Z7003fOaELy`GAgn4RqAo=Ta973o^_C-K`Gmyg%qFR z!3)eRK1u^$h!uCD5;Q-o9oS(OoyC4*HP_GCd&zGDVakte({!l&a^E;wNob|Ni-)?$xy;}Uw%Mz0DF>;5{Q$S7)3>I(g~!`U`Qm#8Zb2&>4mC? zRV%h7m9&_&2Yx_eLFApiLx8-mw=G~1ggSphbM=s;pbxLokg95;xom>NpNrq!NL%ts z3rGf=#XL5ElW~hU%{WIE{V{AKC1D1#%@#r6wcmlf}PK5m6zbV6}pGPB5U*!-F ztsl8@wO)50Ja7va8}G{{bl0GeIyJAA>$fZK@QJ>UQ94>8O2)}%VoCQ47*iYUw;vH=9*NA)^AMVMlUPpm`ogQY;NFqdj57z1jM*K(S7gd(0mON)U- z{yb@a9dY3Mva+@h@)PU4U{RRK!aHo#0{6hu){9R)8$^h5aWWoXlULDD_6l> zv$Q5uBt{Y%1d3W@?5RBwOT3bI_*J;1h4lnvj@!+sPSbbEwjQwRRF8|;icAnP^ zIvnGq&W@lp3^Mi@$%7gRUXu~ocC2BJauDdjLL@sOxubaSha%eo$>WH1pgXKcU|*LV z5NEv&L**3+I-wLkjMq>~galnsP({R`14Lu$T!(j99o8Ijd%DOF@639wG?Vr5!>44b zcH^+k=9K-Ghz};MQLNS*N>x0B=`HmuXhmqtxhee@MC*!y6gauzUeC=n6omF>+3LIC zGz(X(9_#OQZ>hq2mog(P(~iIg`U9dXsv{_Z&(bNDoE1LM3%Y1m5nHS~lmpBh*~1RG znULa&_=pmbDphHUi=raD2H+-e#0zj#KH*V2kn|t4_JDBB^ZKV*qxNHr$q4i!XcKsX z)Z#NvPcLOUH|@jLt`k&oa;^>tVnqAYUe@%G5HuR3R*y`ag6XjP!12tuVs@R3)*vA@ zy;PwdWq5-!5(l0IcqkYf@zC55Iehhp;dB0wxf^W zT9UUUnsw-jz9!!5#gp~$%hD=m=aXy!=1Yw-Dn%-v#xz`|27_9yzm(;#>>M_`ObYe7yUP(}z%mh@pI3|2L-6Dk8C;Z8#>j;t8(owa3 zxxtD7OM>At#25Il+<}6gb)XutDElh zzdAV(MGW{BxB&*zAcqlsCeEnP<>vpjJ^Kaq4maK^;5h{=>4fiY+TDv%L=l02JA zXMa`b*7k9OR=CSDvXmGjR9xG54Z-s<3t$t6aV3p-;^u5&!QR3p1~3|iGbCIL7FtT# z8SMzcr^(&4p(vzF2aU}vcNXzz^Q2mN$SMVtxU?i@8tO_CS2Jg(q{RLN--s;=_M}Zw zF@(Yp5j)lTv!uY9NQ!*UZzPFb*ur#r(k@zUKPf+QjU8sRTG_Z%?eQz3!%&TfNz~(+ zQZp~42bP+PB3>}9sAlqSRxRy>OLVx%A%&UxMA?d%+0h9x)eu}iJXT-ui_VM5DS<08 z$7}Bk{r4A>UCW~iiF?f_f+R-x+>err@sIhdmO9C%<@3ssduuEymn4v8#9(!l-r zZPg7t3hq)2GX^2w@Q1!q4EYK3wsD3P=4lzLZ_SVxod3g`&^$K@aLDO>Ve*>*#{4+8 zP22=WEwPd!WF2=29bQD?Lx5BIHLB!tK$~2^{R*~NGl8QS|wE&@HVDghzggnR06wzG?iw*(Fgj> z${)!bD9f~JDqT9$IGcBfz@656< zm@9^tih>$u0;+xmY-;xhoRFf^E(*ksBw&i{yFmP5s=>94lqh+`Olos|Bo)ELa1#PZ z1RCH8B(H#}m4*!AXcYjbLE8`p{_{pbho6y3Z9=Q+T4vurKD zF}03ODP>3uYR?kpkkAKG>rP>vVS#Ig`M`z?CWDR}Y7qO9fdeCOjKZvQ(KYiK=#j!E z5jlu&B>?Ud3E@s>9wxj2_D9HIXMjR0t&lmmfTWW)f2nC@{$fEOI0-zD(F+G_Av zK4zG2M*_l(%g&?KAt=ELOG0I?4GL@Z+#Xi^7NFEN2?l!(Om}Psb^gpOU2^cvsTV2; zyO3^Y>Ktu$uQ~d9m|L4up9r8zji1d!*-6@E1diGSt_F%TKppv;q?>MOh?O`_Hfv}! zzjUh{8a7Ae`l13Y5iZ=m9E$z$8cI&wK8#bu^;K3Iajb)d?v{D+oc(n$!gweJFJ1}p zY#4Ff{fUs6nN?-fQ>(evUz^YPx~W*|W5{!2He4Fk*=VVpoA$%X53gSh#rxPelkw%Lp8RiH=1_OP(fJWd<;RSVyEG z0i~7$kqscS$F~0B5~ceBo%Gu%_a$4nIKf@c&(?~%7UKxdr2ofGxyD1mx3CKVEc5Ic z#Fh7#IPAe+{*2`w!QBs@tHj*+6XWbNK)fE-U(mF{j}b>cgfYXN2By)2^l)qDC?>Eq zGTUnHd<`6ld17Gv&&XnA!#&Sa&IF@~*y6%DB4#~MaqUJz7y@Cmvqojc4~nF^BeL@ce@WxAwC%7z}dr|A0hY8qADa8Wua|z(>r$S1ZC-f#{$uknBrBbwY zy2h&N4jV(`Z)ljYuQoo6lg95Q$Txh$)Vx zFdno3ERs*XKM8f3JgePQBWg=k(PVqrU?itXTrI?n8?YM49|n@ZgZ^|VjnR`18anYC zyh(e8`uxaS+N5`-KJ7;l8dmq3m0tXZ(`bo;Ve*bw&HL2%IWaagmQJ=(A2S0Pydu2` zlxugs22gprcKGYNxZcvmb^Bp=ZFg;h2Clbj8*7tvZ*fZx zvq>l|2Q^;;2s}ppvPJj-eXs~;TrCx%ZsiKoQ$tKmB)1|7L?8HvZp+0PlF}Tg_?Oe_!!|N(@)kd#$KG5KGdMJMt0+&Jp#Mp_~AkCJ@u^K}-On0m$j++DJ?VhFte# z=&mC8Ocr25jxOaR1>2wYA1qFiFx^zGN*~fKA+=Eu(tRjaZr4rxHN6U@Q$^O0`J&)aGRl!A*P07BK;+>v%$ z6qX}+%LMtJ*|}a?(BEDenJqp`3PArCG!ik!QG_J?24N&%Qm7;xc(D640^stB6F^{M zaC)wCM4JVz4p($bmE-6W9K&S^t z#0AlilM;q<5ogN*QIkU8ks8M7=_3vilZb~*Ah3vfAkz*|j7=%`_~hcyNyeumD3s*q zfz6o&^3Vy6lX@uXI8?uHSrPFZ^Ni0GhPC*TY?DI1CIC~Nq0^zm`T?z5gdoAY3vRL} zTnVh;Ra{n6MgRhM4n6r_VoF`r6tB6tGa(Z@U=7jNJ4Sm|%e65P>*KWG5gceO?L-Qm zTHAwGrY0PD8M%oAbEg0Z3<+cH8>$^u5Dwg6IwE}af?5^t`P7yQ;}^>BVIBC>bD}{` z&Z86U$(o4udpwurR=DrjmEWIpi7MKo8L)#AIX` zif8Doi3SdvA7KC>EV$IZxz@%sdwB4jF^uCp1dpSejpd5Fz$rvV3>44_P2uJSet<_0 zlVvGa8$Lk*w%N|ey@s((ypzSm2fVig$QZeuCa9H; z0_01EN<_pfI=eB5+cYD*Kuodc79Q>V(fcIZHW@-nH4;2=f$|D2%+PXG*BinkW@3T@ zUy0m|p@cf18=re^9)*GItcEs$f7lx+h@>EJT??5Z^(oaiPU5`Qcc765dhutj1ER|P zdNrOh2m?ul2|jsMt(ZBQK`r$H{1zPHJaCHyIKs~DZh7k@4NI6KaW14)aY>jsP; zps5=)itTk4a*-&?d|XY2)kJO_M(HfTqewPe5y#Ra<=mYSq1|BnI{jw7HrbOI2#o9c zI3pwSBU#LN;;1&vvl$kJn)_}4IZEufiO{`OX!Ik+<{T5Q>m0^P5 zddWf3)3C0GSQ5vOCe<2ViaW>oD!is-VP70m&02}Ae5_NT-%klECrly>!52iF3+5QzlzGhX+`wwv6`|ewh2#JoxdHAG6&xKW58a zTc72oCOa+_s>JSP$PH^@07-iMEZ7ibx%>*#Z$_ZJcng#C{6Pz;!8xVnWDn>Kn~Yeo zj|U%Wsy%i%Mq|(I3RMrwnbp8_T>QaAo~Iz>Rp2FE;>qU5-;(EE zB+uPh+t_)$Nvgj?s(ZoH8hESe{vqMMfE%PG|JtAG1|Tp}l4o3gIf(vJ;;2yQg~x*n1ftQQ7eFQ8ka=O}#L%Stb!8)k;tC0sHeq(1;tKzazh0sOMA z3ANk@7$G8wpAG0su~1k9D5f60i+I43aD5L~?iY4wH#H?;!7-+Kk5su&41OYBgL#zG zq$#j%+lz|n7r{(bDmVrW;F-6%A$^Odu-e2S2igpeaAji4@0suhSZ`Gc;#EkLT_2HV zZ`(Kd5S`(qL#8#jm*dCU_PR^v)K^yd#Omflc4foRKLfm3g zKNAP;K}JW@t?lidXU~Z+Thq6V&A^_4R7uMrHYIj0x3p>s8qsUOU$uX;fgHq!khI@} zu9|&319?i5HGQ#|c{ZZP?}3xnE=6vrpwZn<-ZDw9g3aXF_HWOPdADod{az>pcyO+l z19D(Bf&0^^&vtvm^D}pAx7(e`<8@lDPCwK(T`kz#?XP#tRSsQhjp;!u1S{eQun-TG z#XQ@8g7IBjqAc)80`j#xu4rEhObdJpfuk<4BO2fa>T=HXLRiVt?QXe7?j(f)QcXa~ z136kdP!*ys5TVpX6j1ylY8nl)I+s_*v45RnLOb&2mt7rVS7>LNONQ~%4w9E4w}U0 zs*V<2Y!^|n6^auC>CG+1eMS03y&iL>I*7IJS0ItPN-`>~DTW4Zi<-DRT`NU@A#6Zp z90yDwoO3|(sFcO@#XeA#rD9ct8iUu>#X^ujuHG=^PEY3w3C^k&R1A@r%ronQ_M7Us z6Nx0EEP&n^W9sRu|H2?&U=EZ0 zs)!MFBr@jwe^RxV<>FLQ?P~QwShO$8>YED)!UD7^|XU)l1K) zBkxgBoVX&Ew(rkABiJ6G{ibi6E(HxFJ>vc#-BTrvB?}sEx_vPai&u~f_?^n2CM5)B z*~suUG}nk*XQ9@GDj51`rtKrgXhI#nBXZQJE0f#a9Lm$Ag&5Nf3;9jn+#JLFZns8ChniICA9*+1w~*5yyhQu<2H z1RS=FEETLJaq_|l5|}-sh;*f0J+C~BwpA0X0JE3?;$wtHA>vFlSeIaB9VH7<8l8;1bfJM0EyJecR5JhHez za~waww|Fn&T-BQnwH6~~r(b67jhA-3CzKEV0T2UQ1EtGh=Sc0AkBpUezTOoBz=|?+ zGKB2K%~4rxTY;CkSnJUbEAd*Khxr&xRXs{WOu&p2&-O9Ogcl+!7V9D^Ac*l9Go8IN zOqhY~{D|+e!lZij6-c(IBfk+WYi;jrfTB}>@f?u?t+o7)QM9>UK@1?rP~x6=msWnB z*w4iN4wTb=PJ(&tl&{m=Z<` zK4D96_o}lmAsivU-8n>vkk3qn|21$pKAzJt$Z|$Fhd9uNC>xB*{V{!ewN#RiLh^ z2QQ!%CR}l1@QA!x99qZU8;22|1}6UQnqHHaoay+~-V z5Y0rc#q(T&gEZRRLQzbk3X~DPpds{P*ocP|QT`4bry{9JZm6iH!!);tM{XDwwj>gU zW_VOSL2z8_hp-kr%?y~m_z>^mKL0^4?Y?4wsdg%=Aflj(b2ynlS<S$iJ@$n})M8mkK8yG1&-l zT{*%>$~$=pst>`Zo^A^u>k2rBX2MHj-G{k@~38Xb>vWAg+2V$o3g;rEH21>#jyyr|T_6OoA$2bSgPj$Mc;lri|@h5GOK3lqS zHAqzUMxTswYJq4I(Bgm@Xl+=PP~?Ne(v_In-|BXG?SD94TT3k(qYlzcDoZ)9VUL^g z98WARVM!JvP7MrS&GHH8tHiI+nu;wV?kE(T(3Xn+g6>=uIWwpY^*ljRk>j_ znOQ3E_#n(j$+%`tnnlV*oU{g^bC+=2y%lk980>A3Nkql#_#?9*Cel`U7QfZ$WThxK zs7#MTMM!EjE*j=xlOPM^AQp>jVL;Luteny^Ru%g>WiRnVJArCL)8#X1%{kF-jqy4C zi!pGU?$IITaN>}X4pFj=yf;z_O-trb0;79;I#e^E=FvJOUKD$djn#8xO_+|9(qw(c zn6pld(PE}duMJ|_{YqS(Dz24|c6YaOLmbX(g&xl0g>7IYk$JjJFANF-PXAP#K1yYA zAM1wefjW>Eb)oL!F31L3w!|W~(I6^1dKQ}HM8IIZB9E>LYL#}1c0=nVqa3oihu^?n zV5N{yD8IRTWcyT6(JcJ0gWXSdfE z_jmK_t2Jcylfp9>*wPi?v8Hm)=$R2 zyPu!T);G2{*{Kv)v-V-_#k=vp%r7qHN0;lASl*1kTfZF7u8wExtpBjkGM#wP+wp6Z zhaYlVH$tX-_HO)t9bIws{n5>bb#~BuGlpm!LnkL`>b5_dj}NY|7{c8wkGFm~B0bB6 z&&M0gvXSut%UcVim+#gFChChI$1v( z|MAuj&IbZ)lE?C8hBIPA+1<4dyvYfk|9o`${$jSi<+Wkg+0D`A?Yj91?Q$g_3(c5i7!8S;3tk7PQrJiOAa8r|^Sr|7XfbSxo~ z#n87HI%D~#!#_T{nEj|kU#xF!!jxgiyG8y7TzE*A;mXi#c>SqS3}1eNxS#tjG^ye5 zM2IL8ZDshA8ve^mw4HG?lb27vU7syR52X1C8TwVDe=xxRSBzosjAO3`zqyCXL;GnB z{?+;;&B@W5EsG(Jb5Uz*R#cXH&{o@C{R{EmIq8N|kBO=9wNFO%4A z0yH~1nW4lR%;bO0KKz6vUEiE=tp}6Y*)4v2UID!9!%Kf^$fI902<;?{nE`Dy!cR9h zwN;OIYRrGUn_tZD7%4_M#-|&sV}AWW-XD%&wEV&6UjL`lkR88%8k=S0w|2NU4i@x$ zJpF{#jS-rUzd5?Z@}4%E&xd!j8=MLV5cJ>NDjx1`!9z{)G^Q9z9o*o4<1i%1H?yA@ zo@cyW=SJ-+(p&zPr~6A&{N!<;vI)O*l84`w6!sbHO*fFjX)G`UZgw}$L&iV=&FAsY8^~2*<1mNM9zx2a4fk{|k{GACjJG^Abif2w`s`pePGxlF2 zFU!|oew}gtTA};shm4_LyiH;o!!%t3bgzc+cQ;1_D25)Igd^yDd;jKk zRzb^be0{n;M>y9{N8@>n_fA=a$$!x>d`hfJ`8V4j!N1!eQKJkp!mitZt_)>1F6y6; z-^3=Ij`!zRS59Fz{>Vlj5Sm_I-7<-f81r8ch6;_y#`J2_$IYvKbkT)K#GU-7MrxUZ zpL_k0TU$QxS5HOqH*)WmOt6`K&1H~@BH4N@vZ3htvZFW~si7Dt={>0^X|^PAf73{Q zX$q^O+-5YPI2Htt+>!8H1i{)W(@4|i{Sm(T&#BxsT0DExVYw^go%jcLm_wlMSH`jRoeAtO71#K^{i z`)4@HWO}&y%DFUaziL>Y8pf~sVY>iA!BDoglT4C)CO14MS4;xBl22BeI5$JTyEnEu zh@hKbKHbh)cGt=BNtvhMS?pS`Yg+qpjk|-aaTBDc=KZIYoo`Ne`N+(5?Zs^TPtTwI z@a+5btMS2CIAvt?8{Tt%l<8)Ca&kl*%T?bWk?IpiT+GkTIra|wbwILyH6mxf`D*=a z?Zt`s!1~=-h~V+z|m$mnPP=he~e(c`o09|^z6uIWL;=8TBCHW=>gTF|4wip{mn z5z7<{tZ*9atjUxX)r<-|v`N{Zz zckeqAkaL`mi5ZRb3tsTh*?Lx~?(S+_#aT)fUW4fwN}i7IgF*1~^OWT*tP^ZfL5e0hC)=fo}>Y!H~`j>+|Nj%MSV9@a}M;CXH4-T9I8 zI=YdiSF_nbk@Im<_nXt}n@dojoS%!WkH`}8%`F2acsU(k*MZoqYvKUjU-3;QtB_@; zkJq`wGm2IT9vDX~!sT_YdVDRm03ul!Dp# zUyA>;H|tyaqgw^)Yz)IfDQ+!k(sDdLzq@(}Nvj{&cM1Sdq)24PMB=bcq{?cV|V(-dX4M$+r#W~W^VI3r$%zt*tyJ*;R2k z%Wv0nmLwY(NzYgY>rO?vHGCC~WgDSpvffr=0;mgBLMqaWKI7 z#vCy=O3~@~_MN7Yk$+W?>>CWjtmF{YHjR=i$2sxQ#VztzBSxZX$QzFi`K%ApgI|y5 zk7p|Fk>`&|JHETQzvR3~h*kn`r%=sC_!9z11o!p2V$RnYCDjy2w#Au4;Kj)?gPirO z*vUxlQJ_)%dhV}J#sxSU<(+dGOwY-9nVb-$kyBd}rYahb*MZjGjGtYtZ%K=y;Q9En z2+#DKd4{$r)I2^f^TWU^CjO5Z9+Y8q#@&8}d4r?4xo)^lAtDwL5s<)<^=S1?mt~~$ zNTcukWa&NTxKV6&`Mxlv1)+;+1cZ76|1p=OVC#DQvZ_uHnN&EPt%AaoMXGWWhFE-;IJ;?|0LkQK(0V#V9 ze*{3VAV^ti;xx@gyy{zoSWRViD{2TcN!a{2`iz*i)Et+r9gv(~!Q9*VB~I}MUSpWw zhI6;57MI`McaGjr<(=gnD>N8^W%F@t&Zg4 zd@Nz^2~N(I<&QaVUg9dyIlfutH1Z+F_N-`kJd20V6qK@dVqzVqdUY*ZF(`L86vVnz zGQtsyJ*?npN({2F?I$ao8XK(kC}MtvQ73pikI`7Q7BNr@738AmtRz8^j&=3UcYuOs6`^wM{re@I0Culx&vV^K!5;uvl< zC2JbeeCYWQzu-(1>kpi8#nvF^BW(TM+^Q(iZMod|!p=vQby!KSHnTuD1!{~XODEg5_@1Jq>xb@nqsoRQk?7Yv)+u>yw1;vq(w z&Cz!m1%X;r#T>&rjcRyV-ic<29RjrHm6TFMG8~Z)&5&{|29|f~F=>i&zWkM8;3-W9 z$kd`@rd2ww^f%k|*cbr9(9_9?D6TrO|lzX)MEpJu3C_wOB;ae(t|ntIjII+O&yX90GbX&vmoFMYk8M4%yFdrn zJOZ1VsH=n9|M&arJ2RV!NN|^LaGzy zcZFldZb6YwX1B*T^WvALSUbKN+{B;SAgPujbHTHQBoTk#p0^BS)|^@f zK@%&3z}$VsY?Esih`1O_!wD}{0WrS{|KO=MIuYzB*qgjpyQ^scZ-MQV@B{93Np`+~ zPKg@dkCt)Mtu^)=TEke{`StyUsS`6G=eWAKCU!2nxj->dl3VZs58zJ+^|pD)l9}6?NkJrX*7~akEQyAx z-jRTqL%&B6#sX5S`wHkr)U3P3h9nv6gOWiwVa;CyBI!@>@P;k?dxi9*Vze0363k26 z+x=~gr30upM?vMzLkT1x93-FB;;Gk+r3X>^yvxgkze_P42N>pm3P;8ECw}Q(UmseK zF`&QSy!`etA2H_2CN>H^O&VD-0A~PrI=vT@A>>YS-!N=wr1;U=K!RIHHs^|>A0P1} zhC~olc~(b$&d0>;^F#%)cXvn85Pm0Yatsu#J?eJmN=0OD3e*Ba<;?HKOAH1a>Nt9f zP!e7MA6yh^OG*)%IK#^nJLadxQjD)u@~p|GiCKxHle)hNu5dde**_(&<`h^WZB{dG z8^KTqRG*9(?!WzrCLN)U%_yuE**@lk@xd!#YO7UW7qs!_evY2hdEa%G!HSOW!yd$8 zZe;tjBWA|R4C9@T|9T&1dvx;!-#9R2`}+PS#TRM-bUr3}KB2P%mjgjLQ-X;WA!-3w zB50H!M$k4o*myKwxzNt>WZ_Gk(bD9@KLOMH;*UyJ`-LkzsLp(!^`+o_zX}% z&j2f0qAh}eUa0!(bzlRM(#HX`QW-tx>CYun?6kn-+Bq+e-p#-+EZe;{G)e9Ji+oD-MW8f0G2B%aX*w0W zSpH#-u4`VbvoGf{_ru|7KKqEj$3 zxZ`SpAz5IvtY6iDx2IF9kDrkZ_^=R-``eq1Cl}X(;}9N%XPdy(IQl2-@;V#5ydiAS za#aZN=`jvNWRBWugY+_6yoZXjfp{syA;!m&Nf$9tOk(J$pR^Ha?HSb*C|#4{eo$TQ zly}d2j#)XL-BO~_Kz1JV%(O+2jAn7poO0F&11AJb~;tO8h&hf#>2HT zm@SrfFc?#th(oaLo6GsFDIm6pnZ&zSFqHSEfZ&c=to|2?GZ@@SPHK>=daGl5pFOEDZv2&KL|NaPL`zs0^; z#{0w3F;*JlM~emE{UlW5V~(pB?_;`D4!U?GK#2GytZ1u@d^5 zYACoHdUSV63A*wO%;$>@)jhn)~7yhGj5_ zhzpWMR!!dYhv!8>lgo^0*OrT6K* zk{1{Y*&|qYUpVQicJ_`0li_2@|90SBIvgewdP^+c4kZ9;nw2EM0kCM(haohYSYc4} zxGZQMEVbl>8c0|hAG}Pr4ogXy>Ns2%op>D?2!>VT{0iAyMAqReCGLPN$8lH*c_7fIoZg+JuClM#(q^T|AkA(p?BJ_o#o#9QK@DMOp@1yLLdsg1{?7BfLHySDgc%He=WD7wt)~ zmnue-eT#8kWS|7=eRKv*^5yhsenb3?@;(3(glw7X2Uw(_VElZ1md^;k_ zP~Bhyw{Wf&7(9x-QPjGAQWOlllfy#HE8zzhCE84{Mv==jcP7(W2eW$)8^Q{`oh5Ie7N{;h+CL=OQk*ZD6aP%fTefC$Xr$ zIpNx;U)9vE-pxK3Hh9(f{O|b?ZF%x#{o)UQ{NWXXJO_NEF_U$6%0`{#eEj8;y4)m1 z_DL?sZyowyuHVnD{^A5)kN?iWa{(1K1lahql^^4gZ@>Bdzo~eCSLb}ao;k7xEoJbW zh?M9r=O;I}Hs8G-w^Ny={N3`vzxm_ue=qE`bRs}9sKsJgs8ulzY?*V+Kk~Qn_s+_9 z{~#@Ls=sG$^ZEbyAFwBj(*D;vi!xcQmbE$=izT$b6yiP%#aYegOwaP5?7*#zmd61g z{w0_2w}=45{;2?asOR}v_o@`U2PD5ceLeoo>!*|H?d#W9^iiSmp0H7ca$hQ@|2tx^ zwVA@?@U!RN9P%T7=izKsTRb!(BWodc7Ev($uGJ8F`Cz^Lj=?z=sI|2r7f%6NIHbnoF`E$wFO*kN-Q2#=XGES&{bY%`eX(kXl3si2?vVv+vmI&5ToSV|C z!-|3?OEk`~9`G;ul~=Heay{-MwJJJWJ1L>vu$J@&JzRXL#0QC&MIpGfzuE;7-T-$}>$kY16L&@r4WYT3gk9KQX~n-{L>)KUi~wJM-> zu7y?u>X=Ee%@hRNT%H8--zO2nok|mK(JvVP~3HpH)#!721bf2kntkGK9FOt zD=x6*0o5l-5!ZTo=YTC%048{eYQf@iORVDZjaSwoafBp#<}l>o1I1E96lYv!#CsWm zG7rgG8Wc>~munaVtTLp+Stlq7*#|_KS_+IC#yzB-?W7%EX>4IoEdfy{#FDjKG}B$# z*ujkdFr%U1Lp673*QIGlyOrzlf7?jg|=YTJ6DZfmh+0qgS=w8HXYgWZ(b3KSO2^|pET`_F;6u4r$~*<<4SmXDz%cVG^M4-&JHUZ6ZF6e zfsux`0RWd0xgY}9V|u9V)tR{wb1a{z$N%g6ied$&EGop9k@DCz^e-w%ZGA+>kOcy# zkE>TE*+${T%k1m0q#v}})LF&0oW$Es4YhS>LDyl;evGH^+U&?8GSUo_Mb3u&dY0sh z_gBl%W`QkC?R-{PLTMZ8L_d-Nb*L;geZ^XmLBFlzwWhs3k&K1SN)}^*MOJdrSyBJr zRl_=DPp3mGRu0HEpjRK0)%${om%{j?3?W=0G;1BeMEjhNX@0b>0>c-}HP+T5+6y(x3dK;QYj)%sY*CQD-Pn$%8`nm_nx z4Q0!wlqN)moxOyKiWhbOg*B1*io)*2Q{px(0aafbhrqyYAZZo4nMJ1yBD%iHNCrxd z-!1jaH1?{*wB%WLTDEr8X>Mp%>eHP%#3uY8wqhZyr8z^K0Wr`Wu!D&5H)-zRCGE~? zNR4}#4doW7y!Lc2nVb z_47mfmR7t;Il|4M(Gd0yf?8dEDU)vK(1wog_`=?&TjxavF1!M zgwRUq>DOI!$`qe(?7>6$(kYOkb0X{KzH2H zV)BZ#?FmM<1r4ohwn`@FViQCdM(yp?n}4prJ)VH}=d{8=AEP(u+`-m%S>AiG`FIm0 zz(fwrg&_&JGZcx(?)4C_=1Mm8_owIo{QR3&Km2+9#F@1b^eeq>YO%P4 z*RDPZB%X`6!0GwFzWV0bAD;J?w)yyrI_(#UvB|gzCO!X3HU+&PJ3}tdf}u&DA4;n= z{DuasqG+xdO{$rn7mja5IW=cNwuagd7QBZCnu?f1#6Y_A0%in%bK<^3B_0Om45Yb` z2q_In*Z0-;n|3f{Fjj16pi6krma8rvP_We+_DQpHFHm+*z8j#MJ)v zPgZ`Txqtoh7f7khWS26&e@2cPJZK04mogl%#*TrCO1G6{Mil8&=Y()LYYc}Z@c~PK zv)$5I#Xj#U4$5MbE$xPC zIJW1l$^r5*lmN;{I+aG7no35-Zgh-nIknodm7Q~9k5QEq;eajI+i5eoei_FmF4SAJ zMhWcImL!-YP(SOR=XY`EOG=4WSjml8)|tr6QVSR?J?-!8*A(d1++6e+{4*bR^mwxN z6Po_x(Hp zU;_<%6eZfKRX_!e#oP}0HJEZ@XUBAVoMw{a+C2r%7o45WTjPx zAdIVE%XkJMG^o}4(My(YxQ(Z>m=jkK&q4C$E#hI@RMOT|J-7A(iuY!$$Y|^`l*jm1 zQyL}Q%q;?B%voK55Rzt7XqeK!4SL;O&WmwZyC(hM>PV|4Gg@nP%}W6_`_f6>MBh|~9X zo^XKLk|j;p{3=3qi_qYID7-UxD+0W1XzTfEY}3(DE6F)B7#q{`mrw+0vWb%Oajj+i z4Z29TW=>#vaj}Ac344%pzEX}1<(v~PoO&c_S#`pIHo`2ISXu(1<77pTFrN`C?mENc z>L*DxU0LRu2QfPQV_&>8ECLI(#TDP8r)k_ip}Uy!aV_l0+4tCM$Fql2Ck&Of6GgQw z?q%dl>0Sew%V(QrRv5yGfJC`Ms4Q2~yllv(!9-O^(Tztl$gMdw>fBxVApTp5GL_jGL~0mPP=o90 zVs@>Sm^0(7hz$aO9WEp02^w+~N4A=%DqBlx^mapkc6P>fpa5ir5M&@&CP%WiX&EkWr)Lef$!m!M$1YjJ z)(u;R?>o#7ot#c6fPN`vqe}ldc4_JN?Z8S@f>!l7+|^2{boRzq?N*kl5==vzWj{@; zl~Ih>>v40T5fX2+%q7@lvlRn@h(r)p;o)vXmg%`@m+j|_7HNrWnoGdnp!-Fc7Ss(( zX;WSerYF|AN4^u4RW(Dl5g4Fq_=;gy7G-J2uPYl`ly(B-xj>??uQ9SGY6EJ5@5l-C z(?0x$+BpjHn?gx2(DVK&O!y538cnM#fjjzIjPTMXPi9)zCUAp@6IK?|56T{-zvTCP zy!G_aGC<%40|P6fM+kEl)Gq6`C{lV3F}REZ0%vFgNePkBmr)J-sx)!Z#pUg?v{cvW z=5~sHoorR>T8vyE!O}#~U`~l29Flq_IB2tIOzlNP8#qiYTLtITsU^&>iTJL42Wu}h z+AKQajtJRa3(je?zb(x5$w77lK3nYUssOSRFL9Zis74)r84J18LPL4Rk5X60zNQ_> zfTkNnI_-XpJtHRJlBA(zFJ&M90Uw^`C6l2bFp8#7U}q& z!QR7bC0fAn_gR%=Y7>iJ`t00(`Erx2R(^Q71Y!SwTy8sMnWf8BNw_!8)b!{EA^Fsg zch3I}3C}s{ zl7FfK6Skq(f%T-df^v=*>l-w3$@t(3IFEAffZNJjj*fBlo7HqAPJVGFQ*S~;veR^R z)~*XwGiPpqU3K3$&Ketc?O<%fY{-eE^bl0wR|WFfWkISH{bI^H!NM5Zm-&_L%l^9c zSF%*N2N$H6wc;Q+9ai4X+%TbIokI@09NlOqxeIdApQ~C0mHLprsI_^t`atWONO8cv z34I!5Ll^j4bU~DRY zRD_Gw0q&~sx34$i%N%PcM`V=ZyYW$I9hu!rTW&%(nyG^}r2}LshAjFoD%ryckb;c# zxHs<2mI_;hY1XwPHOsZAs?xH&PHXodx{%Vbb?=J;u0VH`Q*OcniMcSvH8r8xXZ5)i z3Jc7yiP`bvT$R#lwF$_^uZB(iKq#&0owbd_A#qWbPx*DQMl3&(vikyINbS- z;XtD7rCcMr{SZMq`dMgR>~%>N_IM9aF<|f|3*2Y}0CxHF)Mhl9#-`!PdBe9&?y>T< zrxQk#&BT5_p0V@RmWy|qI;2aZVR}ookJ{kLnq+BM_hMBCVM5&WI)$nRk$@c-l)mF~ zXIEjZx?eSzj1XCKvp2IOYcjRrki39mtWH^t7`?11KzFuTY0Obnd0G9lDAy3~!*qB$1E%+Q{kYNA6mR@$Ak{<$HQ_2mzI+M90;v$M7{qSxsm?o$Te z%Lmu$U{cs<1+#-W*)*V#E3~&TotidY3?7-X{`GgSUb=**HlJJC5E&f7-H>N1yCFj$ zvZVN@K`Duov9$K({Po-YTJ>Iy$#lcVk3ZZ0{d20qmKHE1-52)y@dFfK?;{nL&RODY4)_K)|QR8OJ^ut zQsqsHmuFfE1U2|pYx<69UALTZ(=Es@nE0_&k!dd)X}W4zlwQ^yxTn!=py5)N$6{R7 z`^8so&)3pJtyg3>l?#+E)%#VgQyD&`bTOm~5N2c5O6y22|`gxeReG z*0Jj2<>hP-L%>Cd5UHljnhAXpb7N!8e(QnmFUlC7_s)eF>U1nUH->~ZogGTmbAc&z6QEM$BBw1}O8G?g8Yqt<+kUXZ{A%iG|BE1CT^wS_Q1gZsP z5L&;doSgU;CX?Kk@~x7o1saRZOESpn7aRIg*hpx!kySX#?&SyF{$t{_-pcVO7Jgn4 zwIzK1dL1N?{>`@jecLrKO6(9941f}ojZB$L!3l>qA6FX(TpBdo)FFz~dUy-I0Aiot zxJjMA%xR48YG;QE${MlK4d&#%yH94f!zyfh1vxrf5mswrAHc!4f22JHIU05c)FQ<6 z*iGx)5({_38kRZ!r;V0ButqP3b^pyRI}ipvGICITQ_QaI;T;jquy*mCgbB&KSe|N> zTN4 z|4%9i-uV+Y_2OilQF?(|l9tjHNvo!-CYn}N&C1W{B5_78Z*0bBtFP>q9`AEQ)F9g^ z18oe)j)@TW00X^_p()QK}h0n)vY0N8#Awa&r)A;ub zL(1ms`i$N)Xo^hsqAf?_ZAir04a|Lj0ECtl192XTVoX|$k~T}uS3xv)YRzrV1XgQr8v3DDKYe`2DmyDhp5`?axr zZE&diB)Tu*j&&Ka%#_?%Is40J{sZ{)o0X@PH+(hnkcS^W{4Da#E}N#+B7szs8%k_p z?&|)MHIl%)4T0lqhhY9?C)5@7$Y#gASb)aIQMCvJ zd8>ZkpbmA>R^MH+A6bydP63Iy%4Cnm8?_${!M_-&@hNU!qpY3at`)Iqza(Rkpj8q2 z&*Z5~+;H6TIff6B!WzUzf}4TCqG^Aru0Q2&kPEsBK7&Gcu`7rhRGJU&KD-|a77svg z?nIur#Va;BtoFbMms`CWl2uZE#lf8VW2yYbOKv61S-m9A=GR?vm=6)iIg7n1xe#mW ztKhEa_GFS!q)yLQRJwJ}8St_esxsWSBo;9$BT6r1yky|0_1MsR-kac284xVPKy;-t z`+U@}n$@n+SrCedX@yzc)e~u|(rGZOjxNzErGBwJOGL7o#=ciG~6OEp%M~9vaRTJ?qn4AV%tt232;Cm4wsknlqp1 z5oG_mZ8%ucLLAr1r4KA1*OFD1a72eDZdze_WaDouAkFB%0!mlpj3eG|bgVc$eNONb5o zSO}auBaks*F%}n2S(-yX-KMS1V%Zr>#>*ml%(z?czVtv`_SBEsaj*8-ry$-t3bOz5 zn`htu8^>`+slA5>@-Yz(p)iHEWpWbtBDU4cWjII(>V&G_Qsl+m5TGOI2oJh_gXMS@ z9&@W3SB|0Uaw?%eK~k54T7%lfEUCz{io8`tN-UAa*IkHl_T~TNoNYb~ur>)KWGmlk z&7k7xr7T>|(~uLcY7fg|wi;pCvh)a*jMk#m2ZGHln^f{>OWQ@R>N1OFw=|yr>#OJA zuy5oyty!sqb?7D3B@NPKy_L@JGRr_hekR5m7y^mZk@(R+KmWeM*_BlwS&C*FZ^~k& zSKFm|cg6!AieT)()nz<%cWrmHy9S3>``}i(XzGRpim$^f=TUL{KSJ9qYUOfgSrXf<&YAO8%~eeh2uOV0bk` zY42M6yZYU70P<0!lGEq<8{F8u1*^0uF2%#xoxkYndtk!(9>l|YN{qfYKU_p36`w5k zOX!c;!V{fVNPdTsZ3^EOp&y#9@;-zB%N->UNEPhtdD!(wM{g^QbmOu);gejmud)~{ zOe{yYEt`9cKF2K^7wo4D8!XEfWj8GQIemBysUI5 z7oJiNT=#?WHDV9hf6NyRv+*LFOn`KE=boDYHB@!W)=;1vMnZrnrBr1ozR6c99z2_R*+KV?aATD|?tCiy1>1>z@;G<2_I zGNUTe7{Ys_%!g5n7i+0}qni~9*pp~KG$;}?9IGKeqE7XWfn5o?7JD*R68)q6ly(p_ z-ET2Tn}M}@6tA{0Ss`Q)%3Dr{2rR0@iYw}CPkx)5Uv%qG1~7&YP*%n`uVDx`*n1fQ z4RiyW?G{wC%IwA6xSU!_NtCxztK6j|o5cU=8Xsv&LZIRfN86o#BXr>NuZVnixKSPm z9crEYx2F>h%_dV<0nFLMR@mrDJ`KhyTY@94^wEY;7KkrjQ*(>P?CKavPNBx}9JvJu zY=O+PoaR0A;G}48DIy5U8H|1GG!q}FMAwI%>o!My*!Mo#Tig2xGiYqgC@GS(ej|G? zT$O1seC1+zroOf#A6yK(FVxPV-~#T{w(^>IP$4vqc_8>#8x-_ySDVkQR&`kUx{n1x zV{6k6Cqa0z{&Tr%?68YI0^HlH%Ew=4&4hJQuwN*<`d9Z|uN8e}w*T+L_LlEXe#Vw* z*d8~1Q7Q64Y!48p%%u+7)A(G3M&4(azjs!^9<&*%?ZL$Xfe{p&k`44x7*0)DiSD?` zRj!ZKTV^T>ozxqyX&qOJ^{zEmE1=qisput$1mEfrZ{gkQWbWjUDY=66l1^Fr{UnZn zsi%4sMpdu3@0suC^~!Vk0Cd!*Ah=*yXKgJl*mkiiaQW&zwK4FZXAF{+(+#6!B?A+y zph#S{r1LWnLHAcHg#H}F$Q}G6V&xnXa{Lj3LTW1DMj`&4l4>6J;8;)hw$$uRAWUb* zdRy=`g8wmW%&v$Ed60d#DD}&>=8^OQrjgBgDNTT54i4hjyCtvKz@Ve8%Yq2CvY7P#$d`bOWivO z$#>FqGLXK>Y}Xgy;TOH99*c}JU)(79zrnm7@_*VAqS_df%zR&i_v#NXzuxzVW(y5C zCGKf`~2mXzpuGLdB2U`j9k!HqvcJ0RkGu; zYLYRlk7irGn(q1MFCUL){JWw$rVCeP}m8=^QCnDa+ZHiLym3{(o-K8d1Y$16jRV1IB1T9Bg zmH*o&fHcjQ#T;zh_!U?a-YEY=7nz{#u!3ahE^ZDp+&|(T_a6_%j+BkO%534q&S0{* z*E4y%QIUcDkJS(teLHl>He)1Lk1ZF&)W#G9$xV?0kV{`y-(sG$X_df@wkZT;*ctTP z4;yH}_9B%b%xN@uJ4DX#PKSSnTDoNc1ub`vlv3N_G({AMskh||RJVS{uXbacgRe4u zltz$l0C(mCPqmRa7LF_pG%d%nn%B!m$VMj+zBk)VNcEdvY61KrZQuLKdJoYki?*g~ z!a#KvgH&f}%@3=r(oLmrQd2wXuo?YNt(ovGQ!`l_>Ac6zCRN>OeLeB(BjE&NRaTa- ztdpLB2}AO8W)*@iYq7Pgz6bJeqF*)CqB}6zFl_;&`xJEXl=)nzFlQOkwR%6kSo8`* zY{)`T=NJ(NRLd2$r;|BuBu;p>TomVoqIBQfZ23x zEh|K`qG$}=DT!dlwN!%t2BF~bcu^zafN`y%DXmh@At+mB;>aiH@#YwmH>Xc6B8*cG zN^MJIYSGRhL*7;E$iNW=@MJgHEtxA3>5RGd3A~P|c4A5ti2Frd>7H7HaH0gRjij3EJ8m zyF5vC+6yvDh?z1_Sk>053mR+Fyhh`b<9+HixDVQQgUj?XbdE~XNh)~0Iy zOMBz?&5+52lrWV>$Y~_%2on2cx@3>AjH~}vn<;tHTU!BuMN^~L3sLGh6p3@k2UkBV ziB{m|OU>xUq7#K6I9{R<$}r6P4Ecp;Kysd<0T;>=ht`ENG&m-BN>b8qV5E_i6)fy& zZL1zFTfQ0%m+i-Kr1Gl~GC=Ln+piImlBfR}*w@lBLug}Z=`iD8v8#SwSeo-4cqUIo z_XdLX9@`@ODg#LzW{us!y@>!Gpdr6}IF;O!tpqx-g_J?R~!7u4o= z!7b4_$9vrnI3rB3Zkp*=tj;sSH22K&?lfcGNPAw-C5_EN9L;?2>g9g#!OVS>f(r8~ zmF62C(Nb;f+gH^hQ@7@V@{d-JqRSKsSI?38VU6%t`g`3fflxET@KcMdB_Tjntv;NN z9*^FY+EK=(^)x>g*qR?S-_;O*+JV$&s`ScL4B%RkWn~VeJ{WXR&^qE*W-{_Q^htKP zNc;c^C*`yc^P;DOAV))%8NXg>;KV&WCJpt;G7Z9FWrF!;4eBA9#n*1Qx^gmCE5G#! zh5ZVNR>TQKP;J}D@v%k?w?j-^_)*Tg1TPv&0W2mS0kw=dGo&?Xq=IYzG8bG^o7x0K z*mlh>%#upKyY zWo7WH6~k5t_tB9u9a(_Q2kpSH=JWu0u$zhP3i6??5rosZ2ZkOTnFir6p`U4z`>_tE0tI=4(#c$C}VfraCE6+_dD`Pb1#Fn0f>+OY_2}#RirCV?fefb>V z&V*v$?x7KSh);LF#$>l$>U<$pX#6i)vx;B5WDG0E&*74H?s=artoUB&nb??teuhjOrpz=-06=6=non%-P5M14s*&-Z()rv1#nt@1(&%8+zJy;+*Ed$#= zs#2Ni4v9z{B-2kP^c6KQNv^4L{}BtS;e9EK5mSf3S)J9qHQHECU3KCh`S9|zAysmlFJZ75{~2# zwZ!shIw6rfA<2hG4f9@3?g7=C7~}l-Pm1(MMp$q)+du4v6K$&x;HnfPe&>*@NuE*O zh8LoaK1!GcVW-$cJg~U1OJx&s8M7w|0(l)fOsJ~4-6g?CHBMwh0J>S1K-3Q6b!3g= zy~4vdt3MMwTk3%>*h>%okR}lKhmaj=*~?s8ZSUtg~!}HqdJpzZe11VO>Z{ zI9CfvnWt*b4&tea& z#GD)#Qs+v%CtA#*W-=^B{n?qYY>QzPi}-M(mJu?>PYy?WYAiBvHB43n4h{bl$dlaF z)j4`m8Je+MzJXf597J#w*4TB*QcK~7S{^j&r=`FAy@+M7`=0cy2kAl$;SXwKvT+-F z7NDe}PpbGgt4YUK4o*_-@eOgG~XVGMK(YGZk zUt4Bq9M^ah*=J>xa(4Vg^Dnai3Qe;hcqa0Sf@dQD>OsLrm>SPH1uM{QF^fevb~5@j zpdxeyjG?*gvm#Gw#Rpvh_$`(Z7iJAK2@(VTfMHg^lhD~(;MiIc4-*ZYv6pO?UO1u$ z6Aagq5FiG#NE~=yVFD~*RnFdCsA!S%ioo?LiM{^u+$}lwU-_p~$}PdL^M@`lYCqhH z#^eqZ5IG(FP!FA|sUSlN1yqQ8|C{`&qtWBnw;z85s;6SJ{TE;EgVE`Y?d=RI_r|l_ zb6bf0Z~Qac_T7LyR6m>p2xvIPAhhs)HT>P~mj;|qO_lrK_=mBYZp6_~X9|x`_8p7R z!g*aZ`SL)UZYr=JK?TAH;@Ip`tRtImk@~{bJiiop4Mf2|?*ps92xaj5w%tEV`yq5{ zf^f+AV^wMTA{lWRh?4g?U529wUngy@O%UGNv};1QiEW~ zs3OsA4blTWuB86~+;)3e2|wgxUhHDxg0|eDwfO_2#am#*k91$ybq~?06zmAVNd z@BrYmiuK?Y1;B_H6w6*M!QIsbL2~-)!ge%rHVy%;mq!CsDo=!>EY8z5R2T?%YkM*_ z<=IPv$jas#+RShcE4TwGGzE=0M8U))k(TOvX)MG~t(MRsj!{Frs~*_MAy7>EEMMt9 zK^UC)rgDM&E*XoC!?$KdHS9y|Alm@3`5e6&hL#Q)9(2GlFsT+7Xi&e7SL!QWNQd2q z`)^Q2B1R_P8GjNIhq`GYBC=D*YeX@c?Lz)s=;8P}Dtxh7k{|ffrG%r{7N3+#6l3?Oo{wub|uMYe=0)o9_ zT|5aQadCC|12GG^BNEOx$IHd}5g(ZUrtU3X zRcbeS^v{3!#Q#2;Jh;J@e#gIg%pZ}@baTt~pZbV=Rav%3lA*Xw+&^wwXBKLu*iVp} z;HT2uK%nk2o}CrQo9Na+@TIjOygLGE%aIGiAmbKQx)sXf>1r19N{pEgs63Fp+uE_}@@tutjGY|2T~o{Vv^cpTZ8Q>+dJO z1D53KJ|fC^qne`eO*}d<^md08Xsd6pS4B!X$kF1}Mgy^2{7gH6P5=cr0Z`sPtXmgq z&DUY6M9+5lrqx-)TfU2#Pd+h5q=Nn|U6#`M?K`2Rs}8d5E(JfeGgu-o1dWymF|F_U zs=R$DFVG1w->Qv4&!oVWDk8!lNfZoi(sRy^OdY|I%n8Hc9qp_FIUgV>tD-Q86lstr zTmW8x*I``23fkek5qQJbv^sWyCO*BqH6BUXPu#CZGmC`5t+5zEWn|TRL@N{MDe_2B z@`2^S(l*=7gsY3nG=tb^#Za2rpfe${()l{3TxuhgXw-i8$NVAymCkLY(H@i!)fNc@=1e7&p&buq^GvVY%S zbN`uQS(1|?Y4c!NeF7XsT5|P_!YRar%m$H)76?>(E8x$EXO@ zre>80ksNrw@yd}>9Uy644~7L8r^`T0sN zM)IykfmdZ=4qUbWoPWRk`U{>(k+o3BirPHpIf_&GUMjCMB&Hmaan2Fb?ZldQXP2%_ zP)`Ww@LmmSA|OI|Lk9lxv$!#OL%o&RtIq3qaO%75?!9^0 z7rl?}d-qk-Gv7M*8gpByZ(F{0{^*8IH;8V3gIjs|h=oan$~HJenM-qX{{b|@E?Kz6 zg$VEQO}9zj-Q4u$agTox7=?O!82zSX?gW*p;j}wt`PZ7y`^gLc8bZ^rc?d(uX}SK% zw(p>S{=*|Bjq19LW1?yLdrP>*e{#YtKVRG20fT-&d8VK1VhHyEq-yy>*RC`7`ybi` zOMO3is)v-J{Id@+?KNNq>AqCOq>THpbTrm~HB64o^D6Rx@$BV<*^^$y>CVjb#tl58odJP`F%9KG$eHOPoqcM`!WUH zUd8Y_av?e9tA8Fn)4lG_Q^V`F2u<?2U!D@ z`Ae%y7!TLL!h6C!9H5eWU6rZ%f>ZOLd`S5lf#vs688SLuYPTtCZO?djTCSP-12iYEvis=;VUDUx{thX<2a3T~M|*DN`ynzV88*7bm4J8^!jk%*H?t z^;)MOjqJk~sB}W9eV^7JGHgm+ZzDsLNhDYrM_?$B0B_e1f&>X{#m^t zuue!7utxe)$xja1`OM%-C3xlAhOT>ygX^UsL3=0R8|y6}<5|e*=g8A2C_g`|5To)$ zRCO{r1~p>sog{mj=d|%H#>?H7eK;4AYI>J+cZY^XZ*eUin^M zZW8YDc~OfmAR=0m>kd5NEPBGn{>Tx39l>g&=7wyE$mp?>kTjoX1%NEG(7g^ zo#D|(ZFoK6Akc#g{WR-b^yx~BhlFx<;L?7(2u{j2NTBl>m6)%F!l?1HJ_AF*GsELi zNg6bZoAj=smU-r|=ybfh3cnA#QzB04Tsl7ed1ztErHGS61b zo9PmFy(=ayZbpphw|7Gw83*ZBB6;0jB?qH>m3+qi=P#ap{`6HyijgO09^O=Gq9`M! z^s@M=%UT&WL?^xJCem8PuLD2-69jD@=IY6cUXE#(P3YUpeXuxFS$!x6nfeAIu?%j& zNYvUK_gr1JxKL8YPY~~e7`Ne|tI^cW9ar(KP`Vz%|0_QFP&5^nu4YrP=-t`u?#edu zTnUus$eO<139?!fj1N}01XH~#<;*2U&7dV|_r$915^~pJuH>RS%+a{m2`4m`gUsNm z0v2*C-E^s5wh*e4P^3^=`yP4zw00B8%x3|o_PH`ZA!gt_3D%_{z!oy-8bz+z*sGFF z=wd99U+k;YNABH2{)TilYlqW|jur&Rx}(RW0&tq31ALy-CKJQ@%3FOxGw}PE2McAj ziS4LYLvCG~AZ?j)q5Kx^1PGGigYX`#yzxq0_1j`{nPyvBJgFg)h8x0m7gZA{KY9G> z*^4h5c;eg zq?A~Wl12ht1PMQcquQljVW-f4PCnH><2lZoIpunL+Z>0c(fc9yn$ z#T)8ReocCJQX8`YJsv?ZJVw=^`)+H44k!P%Kn>6&p?{g`KWPR359@(1b?@=?cAaAE zB&GL}DU^+7;nZ%JPp~4<##%Ea;BO}X@|$%pzT>kTLkjMK;5n6@QN~r280xS?HB?d{ z=#6#0o@_icK+0@fVCA{(ISbiFx)Y_ttT79f8s*vK`Qk>V6{gi_PlG=&?gtu329bn? z_$ms_mXcAVh{(_dOvLR{Ez(Pf9~Qep52mmn1QD>7s;jDawnMX`BEcb;MN%)#q8ndG zhdp_zkOR)|j3ORhk;dJZFZYRKlAlX^wftCxY2SSL;(vbgEUj)i0E!Vr!#iK~F!(5} zEipbQw~pR)N&h#Yn|?|+rLyfIWRK}wPQGqbD@I=w?l9A_IQhMrk|Ln6^BMnxLP>fjMka_9sgbQe=>T|pr}mt7>rW}}h|X?dwr8C%cKZtQsaz)yM+J#)F=)r^?R2tk83U1hA6m1Qr)QG;aW( zn-HzwxX4$*OlpX#X0c+H;9QA;WxRjwJuUZ8yxYf22nKzEB((%H@^>WnUI8v>K>&Xo zd^PHgJ1&LugXS_BDA|?9bO%%&kjA7-ZkcB?H%xQ^I#qhF0$XLQ_T)9eeiW%gP?!v3ZQ&FrrX4X|OQUaRrQa9f<>Yxm?Hkx)qbCEUM zVNrK*ZvCL`6cJDL`9Km-1l8|xNMUs|35Uvod(4s^C59Q+Y{X z>{@qmnr0uI#-df|;Ge@<5znbuli)xl5*QNnaqJpJ8#|gdTsmfeW3(l&hv2x`C9DTb zt>&k%Y{RMblIF{N`nhHgT(bCOEA6u|7rm@oDy*}D28IRo?m2b2wxarOcQS;1u_rAV zl9Aa?hBRLa1kk0vOi2{-da`(Q@<`(AK>g6xryEaoqfqV{qRRBrVuso;ik75uv#P9H zpm!u@bm%z8ZiqZoa!V;Fd~7*ce?FZ(nyth8X%!sCka$0%G1>Kg%;~J;D1|!gY0i|1 zVf#22+f!cO-gvz3VE)K7WyNXATOcYCLV_48gPY;=s1WCDN4!(nXQz{GoXP*rXT}J{ zqR4d-quHyh5)AMrc`#=zdVF;BkOyS>pE=pCzCRO^m63>=nfP)Vf!9a@b+Ci`!pXaR$O#_nR?#3(G2$ zwSa3M{~+t$eVjRt^(%3&HzthSp%{)Xgm*gGjHe^Qea*0@vbh`dYY=%!Qk4Ob#m1IS zw3jcjdrXP3DA%$`PYD$mo`O~)Z9yhxlE6wRy9g0`R?2Z-84sA}7R`uMQ`lBqM(5#k z!;T>wO}uSPWLSy-rzUSEbAi8Qa)B(~Ee-(mq*0+FxG{5Pg$VG%mSU+T3?eH_xv+X= zDQ_i2x?|LCIvZa^42i3@H7*G=u_Z->7GFZndO&QJG2b(r>txO;dKjC@c6;?Qql?x# zELEGz^VKf53QlHZ7V@#}8k`F`6;~<`8n$$pI)HNwP5rBarlfdu2j8YCAtH%$l~m9% zYFDYjnq}(4KHK99oA1~a3(T;8i|(wqe>)y#q-5si4Q9JAyM?@*KD{HSdUqeLh? zI+(LRoJh3t0`8EQ&_B-)$e)M;N7&KhXz1ceBXo$>qt%C7U1{tZ zn25HL!XsIFfvmI|Sm`yHWKdErDTRFy45*UI;=7`+Mr#oy!v_W*1O3YO*hafZDMkdy zB>Q!ie**bEPCA1BTkqqaM*K5BbTgWbjU56gesOg(Li`JB$UCBT$!~Ay;;0XPAv-pKC?BAFDD}L^U(Ywqq)N~0u3~zLzp8X!S z@tPhi{DEPh5`?zW0)+irwZr-3V`5Jl51cieN`#^bh>m6ukiN5%zrXF z(-v~(q=yb9kdm@!tW(1SvZV}^}@#S?~Eo&+c7-!gz(VL|v5tP16Oo}9L-wS@I6_bpV zGm$x~#!~HI6c@@CYn+G8;iz5K#WMk>cqi$;2UVqLRJ!Cu zQi-U>dWK4SCC7;41dx_Bigh^qWd3kRPS@T;)Tjlh@|CoS@y-KaH~ervJKjGUGr4g? zTZB$m(ozR0>3Ea?0RMzQBA2OigHksSbw@fdrj5ocZB4|S9>RZH9x2hlj%d=F57>EE zA-8dqV|7BwdgAVBb8cK!yC}*UirQ<4YqERUpYXAf``3rr!I%)i6_Mm5Fx>edFiydG zI?q!;)U6Z^UZsgrha@lRZenGk+G2$a`1#1UqT~Haw?H`zUh0)nleh55I0sPxI>sHG zR&}!@6g_#c|3dssG${i7zFqZh_%-V2KV6tGbg3JZn1$zj&#f6GJO^|tl@XR-1E&ZTQng{IgX5z#u(<&;?$uk zqPcU^6{|Cee`nAd;{{WPBYRLY6K1xy#hqxpttK6H5>lsncvZ!0&4i3L6QG#JFO_JTX;8Ed3*BP_QMS?`Cc>vbi5lG42Cmqm=vRm;?lQ?F^3?P=qO<{vh)k)N_#qpfE`T+t^Qk2D_z7l!q@5IY zM1mw?b39Ea^2qvTeuhh$s&#FmcmpyaDQ5R09vJ7uM0pP15^dJE1);}QI>?yv5=^G< zjB)L7v|n5grjxTf=*jp@8qHGs{ANkTi}z2L=8BC17@{IcMqHk;Hs4Gb`W$B}_8rra z^^ct7%=>rDJ!)$sKdz9z=p~q`cI;tGG$mruJ0!+2 zI0uP!W(mTE0~iTGBo{feSt3$;$)9LF6q*fnP6}mGPvson9>4YOb#L zu(_zimM)?gLuY)U29eQ}*Uo_3GH@-S1l!%-)OT0_AqBH)jnCyW>$9`L`2O$CdY|sZ z1}Wn>+T}Y>U6>V*MF~#ke<{w7<~7u|aO+XqonlodhG7`X_R0PhmQh8`T$fGGq+Uft zXhxifv7`1w?(+WE&=b)=$9^9z!1<6b^8YAv{a2YT-q2ldD1>E4Lvdlnf!#ayqN2}o z7==yL)MaC1ZVcr#!3l7(C2Psb=8neVY&PSYx_MKHP^~BSSes&SADyU^-t#F8?IEK= z)#9-;UNW*^c`osz?C>;5vBm3_i<)@MyQ>3gBFER`x^stKK0_J)oDI?w_AhsJ$G64w zWAwhWcYxf)yR`0N{8eJV-v)6Q!Mz%EDzcZ^23sY~mm3^rH4>!Dox`coFw);)zG9=~ z??nc!QzW4XwIakOa4LEW!;RFqwld&7N{0SGg>e zk$kB}CP*@@vpcJOW&@7%w#armrow=Z%$wHCb$@;$9A`Dr2wh zxA$H$0BLJ=Xg8dF$N14EG6ZoMaQac7vK~0XW(il*+qg%kk*wt+ge!K^+J;tTS!oPz z;jJ+>WwXNE&(IsyP0tVx?*}pvXnGZxtb!bQwaN$D>BW?WXse11A{_?hT4`>YF(#-u zIk$iUPGQ5bD;bMYA3dj$$QNi~_fgZQYS0&PgvfIjFXPGR?%_Wv?BId*A=`?%sN;*( zn+^x0;dBU7<~(_rnc`16#$bcKs&ALsK9Ar<*FNub;^u!C^4JBj6D*)jebM6$Sr|B1 zvl)kgaRuB6B+S%JXmQA&6nLa~+t5O`@n!)WpM6Yaa)3h~rVuuzP>|zD0RyZEy>T3Y zaEQxS+Q<4_n307Gl*o~}Ij%^fOg0QLC8zH5k;4Wb=o|}qL@OKFP|5+pY?RH_SC|y7 z^zCA^KHB>iEk}F=Gzwx;oy8M01;0c@yaHEPq8R+FumuJZ?t+qwh*wJ|1xz-w#vkS& zI9A(+%n)Bg(p#3~w!VDaYpGT$z4{dUrP=R|q1|FU6hhmyjnVtiJe{YRNWw^(v8 z1f0og%>;n{+epd9vhVxEb|5EDGC}ey$@>)n#7yI2-*V&3B;?qY8>T8-ydVOw2L2+q zJ>%fLRErHla`r3eW}b}rC5E#b?-g#F;j(J6a5g!(y}87Xb`2f^$EChL`MB+uV>n|K zBEvAFk=vEmOqA2hVn01+$~x3Qk~37x396Y9V}=pmv&Wa{o!CPH`a=-`gh^o!qa#(r zaL>SF<^#uNzLqEU5K^A7Y?TZLGYYA#QmPE(D;0-0q}wBF8d|~VWW(QRl>knHQfZHs zOfsI}^ds6}bnyPVv^)@0XEPk%TDOGTZ$bSdY%FbO@8zNO&wu$mB-&~Egt zaPL&G10hzm`Q>4irZ)b?{ky6f>^ecRm=$s^Dj(;tO>{O*tHQ3otm7l(S34lX0QWEQ z@2hMaLrN#$LyJc4ZvAL7a<{4=YpZ_6T4^u!fnnhV=`H9P0s?i zM-0fZb$f(#TfL#P+l=(8TVZtUicCCBm|teqq2D*OWfZoC+Wti?91{oonHG)-Mg4pW z$E@1?*%po}#q=D1zJ=p73M@a+!g0D4X=?Yia1_r?cj$@dfajO0AatlH5`@Hub$GUv z=?jrJJ0gf%6f7wC2}T0H*I7Jx5MIKV3k1k44dKXEU%}}_kFqcoXIa(CXVakM9 z!S*R(CJrIs)Tq(zPhQ(nE}5-LI3k?fIT*mHaO;?-9ifF$lHnb2q!b*51i zmX4e>v;uxoMgzhnm8xh(bPMRF+BAo%1yM7uC020JT0ibHb=G583U~5zyTw8wr8Gnv zGp=}N)4WxjgH|Fr%G`nsvzIf}MR52WJ60#p7}@og>Az;ug6$)mxIDM1c9aNyD)}0Aq8euqsQX zVcGXI^K<$;H_(Y&g_QtcjdMdb+#cUwB@R@nOqW+ZimpAU5o)02)&qVK$lzLhJ{sHfwSVAPbv$3xSl})G$eo$Lb?-7 z<84hSjir$nJ$UlvtyQmX_D~#yEM#yw=n-TIln8fUa>ORm4N4$+-|V-!k zSx73kRdOEV)d1$WWI#Q`?g_1oA}fq1@7ZN`I!(G#=CY(T6FAUhBjv{QwCmnH2~;R! zv>c}N1R`kM7BxB&zYhz5rG|9pF9Wq>L04j6?z2;$zK$jUuGqq8(a|f3`P_NOI@I~b zh8S2gIqSCu8=V@*!yBL#d%;FkV9>T8>oq;5q?ut$RcB`f0%x3a6??^x@T4HMfCIH} zR)aTDG$s-ts2XLtQ>*}?V!nR)*i0bMMSn##0J;@F}BGS$u~dVIAcm8biRpomFit? zYsb=XWOp*E`SZ~fP#LyJyG}Fr1tO6F(2^b4c-03rg9l0jZLy>c-*150OnI?Wb28$h z?Z5O(_Wlx{C6#T3?gXZ^J*dnPe^9N9I+KC&HAuR%a$Z>mNF*&L&)Q=6{S5Pe9x#up zLX7SF56)_Xkqi;q;P4nvsG;Ll?8Y~Eb#l97h(KVj|MiM&Nmljkg9kHy`S*siGCeDW*yD>&xOM}X!?rFbzrVZ`d+pORhPS_6bj;*Y;$Sju1}@Y=B6B7ywD{s>yGsmUSG z-ZDf-xMwdzmZK?bV*bJ9vs~I8Vqgm0S84s%ukF=%>G7 zRhQSYdw01DluK2JzUxoRfuvHzX;M-U*XiWhw_m+{_08AMIHPPlm6DI^ZT>9@1r~mQy-i`S0zyJM|km-NC z{`k{P{v;e_3+w9k!llbT5S3G~3ib#^?i#)Gs!}kp#FG6(6jttn;>O~jnttcw#}MBm=54ICRSRLo#JK;JE2+IRfuc4%@Pb* zeVCx?$jp;)iq5^OE8`7@*0W@%y&BmsHTL)-4K!5o=1{XQlNwj`=!~w6Ql2tdbIOn& zU&2o<)7LhA3p{u$qdYO-2IU$Z(mFzOjAT2^-}bt3PVe9Xvt2gSaC2mwSXZMFu@;Zj zm^2ut4nh=~Z4xj}FbJbDXSf9%S2QJQ{N^cAoCtfAwpQGO?f4^Y(0H570sB$ifx=Z1 zY|*bd*3Kp*wK%W8I*hs1W4Rsbh!DmH+;ZfSyQaO@6ZcF(S?NN+g%toU9~UN)q#&?c0c2wgF*I{ZF=BTEyEF>$bY!pgAAh|+ zq;ojU~8a+5f-+`bzULi^tZql@Ds#VMW!Khc;I_b3CP>t9X&7P78u0I>_A$^Re?fSQNqIeo#rwYvWlt6V&z*&wSW^@?pq;3yq)dU zA5biYLr1ZeEm7_$ma7sXtacr|3~)o%82@8JU^21#RnG`{%mFb0){CH#=U`vBlCy)g zojy6atn5k68P|NJic}RLh_ij>&f&Zs>jOhs(Ax5NHJ- zrgc<`Vq8;f(|Vp$Z<@63YI(Wn*y(+@5;L9 z=zBh*BD#{fkn!J>*bcM$ zS#7Wx{M9mHxY(3PVbL%*Xc zi$GF#5d=o*MD)0)$0HUKNGCLLj3ywuX+&aRK%5nH1}_rY0@7sJ*H z%q6w*#3O6=^7OwKxKoq&thQZ=8T%P;NW~*VL3meuH9m<*zo3>)u68b8rem6bv9sU(klr4nsTCB4!zdl1F6{Lb38D8CUtF8$EN4yP=;xZpyXas@muGJ&O1cfnN!uZ`ox zB9h^{%yH5_*im%*h%zzJoHIJzAKC0PpX&Y$&8Go+VZaMI?9MW3?=9nzeb#g9(`W01 za`i)#*823H)+75t@b^qq03q20$oEVi7_qptB6)Ub>Ke*eX?ckT4reB0gO6o50x;~=28Pgfzi z$8$#ET3$RG+bZbT%%4eiSAZ?Ufb$(A9+{(kp>KdaaPwLo2)-X5vYRWJ{3}7j`L1D* zh$ni&j#ac7hu-R&QvP6RPTIgq+Xfp4t zCzZyv)J=K5L{AY%8$V9QKt^F!4VU)l;J3IA12S#RlGt^|UJYQi_?3Jf-fm@t*)6D3 z#sn2Z6`jz$B8el5g{lXzRxEaGtCi2|blA+qUPD&MtMVzD|F&nd~^5JZU^8HbkV zGIaU^HHYwkqLe(<^>IXo@k3}T?g3$nufuo8T?H$%jj8@UtX(TJHOf#&bn;tFQ?{Zh;@B-N24(XE8L0Ij!3_06-`#{ChAXHOAwFQKjO^`IN4B_=QC3*2H{_=P-)Z!4 zY)Fz9C0`*;4s{$7o?~HI1k9K2NCK0A{jS9=lcKfh&T4ws?nl#I+6saI-)*($;mm!; zS@S|`jYG|#APL!MHeG`eLc;16iM$M2#=L%xXJz+JX9p$w>IwD|Wq{fc4JGD;$slvB zrCloABT%J`wC1W40&y}uBWUXbP&Q@YlgXCO2{_^9lU(y@r;pof<{5*jClj-j2DN~2Hw+0BTcn1i-$u$su-5R*9lnj{h53x~p zDLaG=sN~a^I;pQ=0f#H~yzk;j`4tQ~%4UR9>et9L5jaE(xga2d#7`!9E-U(6z8ZSF zj=Y0YPgH)$N)c55Kin9oHS3l@EcmfvRO9#4qbuKjRQd(Qh$CuOXuCIFF)BK_Tkc{G8T0V^a-I7A4^ zYysMEODPY;7?C-3@O?%v&lL_*7zOs_P`x*C$)9Fobobz0b-XjN5?iT@)CAXnH#6Zn zTs#^psrz!Zgl`BVVmg5lwKaGNLdRg^{d}$1t2Q$bu)%osEaRfT^ex^7-?BVI;!H!@ zuD_|lNrL0da4R1}3U(!(TD(A&X`2F6=N#3 z`KFsPu8xXG@9W^Bhv0N*v2PGT@>D!3EYv^gtQl?V49_7MBa*KE>i4O8bbFh+QS^2q zf46R-Tv4xc@|8k}Y3AKTub`d-o6L2l# z%so$B^2f>@tCJb$nehQxOuD0_EIaJ}5sOms+05tMjAJ^o{8fF1yXlpPfOy*s>kYcy zTUn0n6%&GrhbbKBfuV>-`z`f6@!P6>kVwy+`!wz)&- z<^AMOODY~+#p8DP=&g|h0q{I|Aj$X-;xaE}ZSott5~*jZ1Bf(0<{R$HDS*l?f=|Pmz**MVIHfj+@(noqm)QtLONV#HwKwv4 zTgeTy){zbwT=Ycp!dsU}Lrc|}IlxSsg~}5O_+3paM5gm;g|wpPB?0h2y4+?uU?~Vm z8(U>8?$pe&`ZM}F*N^O-?0?gJ5|6pCBp=G(#7E(~#gCqU{_=4fDTdBMlF{p0x9E5_ zqDP`YF0M&iXaDJ)rqYYa(}SA>+O>SmC^3!KoO0k`sUm za5Qloo*+td z>j)`iJ=CJO1K}LjI4lrTwDkx?D(bM(R9Lk{bs>oMg&~S@Wq_JOxc`soMwzSSZhv)H z^NI$M)jENae<5+JIb)Jk4^6S`eB0$6Vp+#5=VTkSh!LBtn*ai5(g2RG;j}V4d^Ns^ zsV2-MPPV9)b`E*6B52cr3u(p>saf<}HcMHyA##!{eMUQugdqUzI)wDL7?gg>t6*we z?Q7ac!D*p)I5nC!uz2|``35gW`^+#+y6`KV9`n0r;54R!!NR7W?VpMS zEB{rd;~3%kwZ3@Y_2@ny`<~A%xdVihmoo%SA_mcUeL{ssUNFaHC$wi>(X#E0?}}=3$Cl5~cMcAkxjfAD_tEPrKpCoTi68 zy@l+{#|u<0=k)A5oA48kZjPXfrPzh2*Nyj#_dknuyD2o{=v?jp)D*(k_WO6-hH3Tv z5-iiba<%(@Ll$xlw7heE9D5>VDQ|nszy@VQr#DButC8ZMhrHJWY9Y#fq{QHVqq)-m zM!QvnIvR8!RVx&Z?sSLN_Wp1Y5&V^m0G5aeGJ1O$8A{Z3tbyong;27biAB}RTUNx- zc=pWlZ0sRQ*v+_E327`{?@Y zK{%M4lHTV_51LCNGFJYZr?^RGjgnoWSj#4^<~!QrIymjDPZlG)GGJx4!cbqjL|m%T zcA9+zb8#52tzAm4lhtIq6vnQD8E;^lil;dzd6E0@oXa8QG1gY5!)TSld?bTJI{H+0 zQFAbHl=^gpw{|dDOJ*gjqrS#IqeaA>Rt-)*h>civsKW^;&FSfGkpdbAZ&aq)>%+-# z;;BdNSk}lx?xQ;_X=}5Os4c3pU;4sJ(@&6Kr#A~3DGX;Q7PT))nFc*nnWC(=%tRrD z;$v!u)yv=HY9#xPfk$?t(GFsA>WLv2t0v#mH)Ygy(TyUNXlI(IRH7*SUiU4?lpYg3 z8%WbRa%o-hS=fq?xDbM9wgW zWde)ROe=e8vygrc)T?-e%u69mwrusoQ+Zh@R|lw@EB75}?G~<=ZN-&@^-|T62X!Sv6<%;RNdUf81KZN`m0#6YBel|@_nHXGIiQyR&|?N?#NEo zeSEr_gom^bwv)Sw4P=g48lHr}&(|TUBspUkh>U|0Wo*t};20YSvl#`hql0geTxC3G z@pY_jv;k~xw|61@S8QjJ9PTlmo9(P5Cr`)0F9d3sxc7yqem26?tlwW|CdYes>@vtI z8JY@&^%E=m$v6Z1TIN^&`je0McgN5=C7?nqa~#sRYwy;(^5=RN zuekqRWbi3t&fjLJCzd60E2DMA)(89IJD#8 zL|1e@mL@`G`N=@U)G^F4h%QI4LjN)_C9*n+5NeDRo03)118kjZcth4wt_R+hC0?3d z0ZY8$XwRyDhWFPnZR{k3x2y>K24GOmMkcV3&y}o;039;7a|fj3 zy#qiPI_zYOfT5rOr;fJ?YFnCQbBWK^vVR?go%HHp9;-0@7e_JmK2 zh=6mKWNwzOC?Nq3S&NAG5Kf|*1=O=%tn7Tl$%0dhi-vI3%ac1F48yVi9!j5RhR=nobbE)CSlk}%Jr zEQ`_^xSn@;^|#mbuy#_zN=`QhmlNd}NzdmqkWdi0kjgjQAyX)~$2LsXY%d?fo?+t4 zH`EiTG9tLf!^wB!G}p=$w$iT|gMLN05$-{*wVgKNI672D(Hx|DRdJ34Piscw_Xo+g zC2q$3$em~6zkrl(%fNlduv zJvRir<4GN3z{RQ&|G%38VhN&Za`>_-7RU0VSbMvc?K_ zD|*uD0dSZ8MPn@K=TVdos_`M2O|omYv5NLh>4DCjieP?OvEE&<@sv6*bvu)7rW)Q= zsxEWZed{emMS$f}52R8zbBM&Gu2#pfIIyKWigLHL>lkb25eA}%vtpx@!A$W&$*7hZQ{Zc>0jlW+=>ehKsW5 z`h%HW4CkAKSWf3><Y%?m`CGe-I>IuDmXOh(QrT#QR#8&X{AyU1>s3nBA%N{QKRI>L8sUq zN_$r4bKRz(S*SvhO%dtRZ$g%CgotQW0B;q7S2ju^82M)Ms%^q41O$Vb)1*$?*WDZ3 zP)MGy45PG*D%MK+yWtAApcSFtT-_eJ1sgg(&_fF8WPoZHw9#>o7Q>5c-Z*VLtsWaY z=mwM~FCz{U8gm?6m`zv3%?u!L4Qo-B_&B(r^x2(EpZ#X&L1%6GH7l)j*|jcR7AE(W zS1l|V(biTa0ZeOvW3Q zb_aPbZOfTAM2T5vkR5h!fo39|A?&>3)+-$~r22^8i$&-vZ1d;wt8cyt#&cfnUC+kh z{+3W=7eW4Q7`tF{qyWgGch&@i66J1EiS8dHmTzv$@nm!M@Qw2IX!B!mN=wX(2jCWo z7REYlOW}6{NP=K39U`q(`y7c=^b!G%C|(7|7Bb5#NX?Z+rK`u!*OEPrwL>UWK69N*qQ;iq&-w@EblJwp!5* zC&H~+Jlp>PpmIy}W4Ckb%;~^JHJ5ayaqy9snR3EX5hy)YCno~0mBehHXdoM!lAXKp ztVGL74RKkAd`NSIGtYQJ{$8vlMEv+!JsQ2H%SVd54Zz;80!ba}KamDN^yI-&+_1=5%h9@%GkzxzI|rti=$f8b zxd_ZB$GJ%^^>l{J>ea4vOOPK0IHEi~XtS|PYX~ta3eH$R%n90&ox)@1w8e;mB zJ|V`N&zC!RVE*!-*W3#rf{C(xq|E#)ai#=?RDT$4T>vI~hi?k%O>=xDyNKt)nTw<- z35P*cvp;K@GhJAUHJ_b58IFYSU~z0G8&Z&fXuUd?6Ipa9fQ?osM8{KuHl!hVHonHt zGUO>cTm#2q#>`2$oVStxWpneMxkTA_ShC8jhMc)rb|cck!|Cg8y}-*^SA#veD9XIG zxRu?WDQEU!`j;3xN`QuaMsim&6&xNYSsa2Gx&vhM5eP%VzS0vj&pPH~xrXJ@${-h$ zJ+|f{!|rbIA2e^t&^%vT@0?Kvlbl{HnbFgeJ|vAw?IYj;2x*&AKWAcRa#fP3!$BP> z-5-D-qgWOLxiWiVY5@lUsByMf-guG}OP|%bOF&PPGzXjSBKcbHuCz28{D~8(bhMYa zJ^=%K>rW^{Kbfq59)G;x4^H#BIzHKyT>sXegu;g&3BnaYR?JLB?D^%1oS`t8MURV< z1qQSc&8H8O+lSsZ-A3 z(PZfQe3mVr+wD8dUd|@7WTS%byDJZHse69mYU&EV9y|#h!2& zL&?U$2;SXzkg}h#L!t2Uj2O62j0|Ygpn~aTryE!2@uZUbg6O5URv@>a(8zf%G;-X7 zxfC@MqQ~8>GbPjIC#E114R(f0gkw;0qd8rgv@fVmaE-la!kH^$ijU-HSDy0&Baj`f z26Z~$*%C~2jnc$VQDiX#Dm=GBmQGc;t2+{-+UEf`LTlzbPT!%BW?4iWKv)A{lWO>< zM3drql0>p|oR5#ZW>ljWCYxZqFdOBZI@?jv%GFt>36Dm_OH!(<7|0pY8WS*3C;H+g zyKa$a4vsD0TldBB4z!Hml6+l|j&2MTAQLnc+d9HdpGXL2X z;zx!%+4LD)QEYU~K! z26rFxZOR3MwhlaL|Ha>3MUM7(y5Y9%dE-Jx8I@asJRUXu{h+GBkOa(8!}G@`}6 z4DU=~dDLQpo#;RG?vwM&H^wvN;IDJ+2%R%pH6tITL65ZE^!DDwwB}-F(H>@A>7m%1 ztR%oh!lH$h7fO}RqJC|vH%|Hc2Z)r17_(oKn485 zysR=ffv_aKzzD=?$Li^rR8-`dM)KwvFsf{)D@9T=E@T$Whk0MGc<~?97sI|FK{PnE|mh^@!)$1e$aN z5SBK>HeIIidCubEn**3reuiml!+WW7qL_-YVN$7||POUqF^e2wCgohBW+eurfCe zdlOFPz9&ae8z+ay_=NQUZKzhjhRMqaa1hS7h+`2*SSJy{rs5xwTN7p$SuN%tu`nj+ zd+0K_5=V~ld3_7lZU4xc*B_ny8zyYc)I9#?`D@e)3PuNj>9LFq>zwO!v$j9DG-n zGM;QONAfiU87`S6=qzf`Xqz}3W5>gm!`>9CE@f(S%0dO0;kyN?oOJciCM&ruY=%|- zu#c9!DGT}w8@v@^Y-!D@0*KLJYKSwmZzv!7js|~v@oc?Qhs3NTUWy(Lm%(qmH-c2- zJB5U(=Tz&m78J*9Z$l8_OBmPz>3Es%mp~RunvlDk4b!|~OvZ(QycdOw>JAFf^%Kd0 zD}8+1#Kw<~>qCvf8;%K^nySFe=r##_W1d<87wJ{;y5`h2YZS zVI3KiDpz$(s+uh_xPpNidolT!Ki4yVS(na%YJ;XYjE_iImol~Pbf!~tMVN!Avgr}U z&W+TF5EK}B_g+TBBbgh+8!#@Hl-ST35TX>QR67*@{DW`W4wu+au<$&2f;?E#fiw7s+p_RMM zh2g%9u;Rp&N`gkR4=lS%Lfrg&8m9&h)QJFq6H(*ee?R`)@YCwVneaQizs_6 ziu6482rbiiO>q$$DQPs@J5l6dd`^^QCe~z0eAeIznF&4>OG#F5RyHasbc_Aq3;wHp z7BMKru)!~Ii}e708(ccyP#%*bFZ{mkf9)R1pXSMep(4pGNuZKVP}$KgsLiLqA_rx z7SnH`2AcpP1c}j54GvNEbI@1JA(THBUZJrH00b#Z!Y#+-OfidM-0Y=Yw>Qg+n0NHT zgGh(zWWDJ=bMbH6RyJcKR1m0Gf9nwYYm<B!jC?5eY16;`&w z62)>N=`F{*!lf`Ikx|;H_sv+Z7$rho9HR-W2y9cglkcX+{^UiPt2m z*+XfBNK4Z^c4)VzZlKqPS4$rvuWtL!?iaT;63PDjLVSJ8>wz=~}=NP-t9Z=c7rP zr4@(7c87ewu`|S*y#lr)1_Ru+yKNG*JZ~b&Q(MMxvX_HSG*zzvJ^_}sbS;Br020GP;6$uAH%+vlBK-mWR{9Xd z+Msw11S68gC07?rce;&lsPB3REUPyLFa*gLeu7H>IB*$zB`N7DYW*2kRIuZ+nVHNc zFo0=B#N}YB5VT$0N>+0<+ar@OMhjC+)Ko!6d2fo0+4X|zWNw-mnT_Tlp>h&-NQ2^w z(}YDiFH+WFqJ-gLB0SYnWgij{hP&s~uo2J~cAu1ww^%bX9aY38HX2gIT(LtO7<>-^ za;2I8Kxc~Gk%+dOY(dvZ3ScxSL8&1sVABEOmlKB3H5GQzWv`i6vYw)zGHsKqncb)* zjHHfAJXoD;N263roM9crzsup%Ol+^ll-O5uRT7y_P@*8j1Ixa>xfFaDwiX>l#WukG zUA102VrD;`Q!po6l4YHx4V0*xi&HLd(ll0PWP!NWQfvWuN7fcS5=v41iDc=xNztSK zFOqATeUk;JY(m7@VzSUi{-M3XbTLcbVfB5 z2pCrTCO&{v7KDkGo$k2bVA6t( zM6^az8rh`-3Wvr9!ZoHE&uFJ5Fo=FidlUk|9>v=swIcJ$x_DVXGpr>tW!wCr&7$?# z7pH?aq7wKM&88Ee+t{U+>O-8ykB4a~bl`(1+iGz|5J5rgfFZ1zj&Ht?i%4WIi4jk4 z_{6D!-+cXfc9Y7OtJ>7(RIN>SLj7)nGL85&&5n?u_ zHMMwC!zngCMV+_WDE?ygBT^1A7~2R{$O=+3XWq_S?TzHkQaFzg)NGSldUl44hMVs{ z`}EUux9j^^T!Rqr}0Jd;&?}LidA@#S?zVnB77i(I(uPa8_beiwGAOI87@Zi zjT?e2v}+FR!~)_h-bE81z-U~7yf+{<{cLMT&SIUrHH|1T?U?~8xJ!{qeI`kEKe+&o zc6ak6xSeR0-cXYe%)vpT&U!H<55Z~wuW!&;F>g-FW*r|1vvJ$ye2w#X76;_!`t+hl z3bHIfgoYAZ&3aF2eiG?2gbD%~)`g&f?lgsU&w-m!Q;B$9>kom@qJ5+T2dGt~lbRI( zvSZspe3kP-V94{p{DibNH@K(ZeWzs-fwqls<`ZjFjb`X;%-S7$Wg4vEPu%d}J3wT4 z)NmD7qw6BJ%2<@JS(Yb=Mh@dmVs!QY^rRJWR1-<#o9zxKo|GEnylpWx$apYh|I&Mq@zuv~Wkjz(^k;5#$ebkII$fRQ;5ltNc48|FNsxfDBg8h$`_#C17=k{P@T46$MU>e5B$tZI?}UaVXjL|1 z%wx;fNW-L*Ih3UssBdt3T!1}NEn=4YINfqPgQ3jRs*e*KX-?!cf?36>93bWhtfeC; zji0L3=d}m!MuZo#k#v`r%N#q!uWKoqJ;Me`xxhlotd~2?{ux?gn+^_%f<%*7VNt1A z(C6AdId^w8OzbRQOIhhO95b13kP640W38q*mJ+*;kHiGMF@s!h00!Q)VTT3fBi@oK zHn9?npb0s?!Y9)DDbAOXGg9{Vi_pwNxXbsI~J_s0Sh`}M1(zw$3fyl|~tu{C~`xuZie8kR~ zo-n0Jm48_7S9oQ3Y=A);pgw0y1nGthOZy-^vJs;Nnwq8^lI8o`E6s>@W~@hUgfSxt zScxw-=5^_1&v?`QO7YbljZlK_5QjJkDCzImgg}up5Yh5YWLKQigxE+g}MpDliYDIv(4MQ(Q+@62kaXH$LhVE zZ`cA@6;zB;bAn93F;@nCY@bPtArWjx^E{K;k`W8>*k1QEcJbg+ei^vSv29hh5Mi>j z3ySyI@yJ^0z`-HX9G;P0D*YK?3M5C0e%j}&t}e4!oA0@grr#Z4u34*RAS@%L=J9q2 z*$RkJVYk+10UZl^?^NKyh2_0EWyoL0T;34JV)PY8gK*ZiW?INy!ZD(2aajPoCeI?3e86ew4(i0Z*~+9Yoe$lTWdC6~ z*(Mgb>u4gUyV+XF)4)eD7%bC}a|=%dZUO%(jx1pqPHZR+r$s$l3EjdLeA@_NaMv5aH{7YHTPBE3}&)iTpBD2$1`Z0>A zEH2n5`=64H-h#ncl>V1a=&os*%;u}O))p=0iROcD8Q1cL$L$^A-^7XabY5s-V%IOw zYLVIE_m5gP-3f>=%YgH`2oB~hHgH(QaAqR^l~bY#MQL-0NBZbkGPk>ejVyyqvnEs!aZ?>khPx${|098?dEhiuAbZW zd|1n!-|NIEsM^$KQR4^6>J=@>CGLaa)v;`Je1nA`IRl#9D)r1-S*NKBfEpq$;Z%pj zSr)WPrYqUAz7^^ZRxqt@C#|+*R`Ni6d}Ubc)i+-7rTCIy-ZZK~s9gJCH0d%uzT8GCKf`9t#38TGy z^;|&a>ST0kbV*b^OK&v@_~Lh8@R%n9Jg8h<6hr1Xh5%wk<>iY1Wb0khrOgT1Wp|3v zI)#9;;CC{-;{sY^Gt2Zz7*EU5Bc2dft1_WsgB^M=dSH`jX`A#=h)H4~$^q(ej=Ee1 zoWs_Hq-DqVcy`@VJUwI7OhmNMq?%10F>Z)^&yhO;wP}2a1;|}t+5>HOIAa_f9z)!C z11(_*smMeAYfrAB^R5?wj^Ly^^mu_G?spI(R(G}RQ$Gk1qI^B!KiaTsLaY3S_hS2H zk7iG9%brKm01!04DU>1AH={HzD$`36=yB?B99I1^H7Q{o4oHse7Jq3Y!><}fM?Er< zm|HV5b-Rvdwe3cG&xy7x>mb_~SWL)M=+2jQ`j&gYG3bIowQX~w0q_Xx3Dl5fXj`Ni z2p%tgTsRM`aLZ^q#f*c8O&*+vG6F)`aeNGnMccHUr@HG*#5fJms5qgp&k``OeW6g& z`e*AAVm4@FnG&?`CU+cLWl}J|?(o?YC6vhK5-gegB%BildaX`5amtVqni+p|716p|6I--0(FV%Z!lG7NlHhCtL-Ey_ZYAPuV# zLB{(aZ2V(n_t(vi9_HJ{92*&Jv;n~d$&%OvJMD8|Fy&~uqa?DF%iSQ7pF+t>0yKlZ!+QdnlW;$0GTv!<4Tm6@C%1sD z66M`Y{St*p!6?K9B6VAfF>Nzh`V&kDKi%cASVKrp^e&8NlRM1A5IZ5>AlS|`Xz4NO z8SLvd5+C>e$T8cgY&}ot0uLZx6X*;tF9!;N;pVou>GEnxdr!oPcR2Rv z44W%E-dp}bAldOAXP7fZU^<6O9q(;pe;1fMp($%q!B8BjQpE<#*9pXY!AzRHT)Iqr zPJT+3r^SiV*^cRT>;8;Hj_(EeD6At$VK4`A+}&^(T1igStGXeo4#QK<>)=e<8j1-t-Erf`f{@VfG};O+**$o@sTOh zGU94~AcEMxU8i|#sSaMVIHeNVE)5RwS;`k-hjh4lMF^4ghY!{zQu4Uiau&_6G#F5O zH+O`~|{&=txhl*TFa>w3V^kzzgZ#V8x!2k}B-8Lu;E`Y5@3C^aY)1Ohv)8Y(OCB z!IWs@CS+R}p~sVNW92)(2s1>5y7_GGZP*AWMnTfl5EyB0Bs73sl@U_yr3G$cUh-zK z76gCrw-;U^64`FR-4r}4^2R3qhJR9gUrNH5>#s8Epqq7QtjhLjX$wlNOFquqK(GAB~zzAsD^1{^WA{e2i z8FtjODg0z%&9{}=s5K1sk>fs{eFV3~+fY2v1uj3-grlz4N*0&t%7G*;h21Q7EG7|W z`_^8!^tuqj(0N|8K!@)SmO4_S2_>C9!5ybM8d=frj07SwA_-oAo2ej#1>pwh160bY zIA<+|v6##rO0(gQ-}v?bK4D0RJ7h%%2QV>hmq*o?Xc+#VQ_2qTYxCVK4nq6{|3x;z z#qwY2@e6x}p{Ke4r{f0J%wB!_(4Y^n2mS`RBbOJKB5BDx^0*z}D04Yls$?2zdk!Uf zdU+$SpFYXA<9)K(b< z#z`p*al_cGoD>a{MS1WuyQz{3!Go?=NZek~6Yq8^OQ$wCqZVRnG6sh;_<>(F2+>xvOHb0FvwGQ*{iS~eh4%j~fXZEVCQGi_J9XDPwK-6C(h{<-~g zZr$%XA_6tRq|)Zs3)d@XI}!Tj-y@7H-=7>}ZpNAAo`75Kf z7_&}GmoN!4AdDcyG(tnm&Ku%thX!L}NVAkC6%~%nB@Mvl*en81k#E?`^C-mU;fN9fqlQ8eEZ3FuRo@4*~#x1;J(jC zf;&^V6+Ty2ClSHX2W2JW)dbf?KQ=sY#A$zDWa3?!xx{MNji$Ilv_agY_1Om>x_3xM z2MLyJ4Ai~^hoU;2%t;Zd&0zBc+qb(3s`;7rEkv0owdot%^$OLAYt!~W|Ki1$XeYVl zIuK{n^5NreQR&i(i2|=2hX|`tt<71E*Y0G@pT=vnhVY5Yb75R`$dC1rfGz@a(k(ot zIfi;*j%#_<-q->XYRtxmfKi(yyUS#`YJY~rZNnB&5?Cy5D$){@s#~Oe;AjL|t*JCM z-%OB8&YvtN^Nqc2Yhvwzkh8GgvFiqb9d|$H1%M_Z(p_1R8#|q3FK1#4NJl2)5tpD3 zi}-6T8X*%hqfUw_+T!@&_MFo4tjy$iZPl5dTe}d0U{d*Dh6|LHZZEop7-TB@wByo1 zV~RuShS5`*Sf!Cmeh}6Kac8CED6*^g5K5wQ*NGDBHBW^XQQWdqGC;#)Zs?d^G>?`r zD&U=RGBc?;($m{@FgN)!ZiCXz+S6@#RNSJSH&WsJSMMT+kY<6SSUKTM!ECn3r`y6w zI>OB7Bh}Jt(P0EibIMs98$!6}D4;e^GSWvy)G`|qEg&u6#{(69B1LGPIolw*<}4}4 zD)i%%U@ZPLh3Q|9WqqyI@lq>yv5pUh6ai|XfC2+f5$xujik@tI$s3mw-9_TAl-**9 zfv+;^LW};>?4#pK4HkAKgN*>@Osi-#7*HZmiYAW#mitX6TTsVa;+6_`bV=pnPGoX8 zz|N))u`BxcmK7N+{!H}$nGVP^qoovE_T6u%^|=JIgb;dM&kgRMJq6J;dl{9~18MP2 z?RErnD}K*jYMTT=$5DiNC=)jbSOK2!aj*=8{01^5i12LkMyBQRlk7qpxtwRxI_|{C z;gHtM|GB$>zjL#kGhcGV8}x?=*q?bjP!A5zaUds^Ruf;u=lXqS+c?{|+B{+b$!vuR zrCNAc))YfzrVUBSm$%B>^f5J zr$F|OOTh&v*^D>;-AU3w9v=DnjC)G(ScWKF%$^%eJT~^z85aXFBq$yjyf<{mLDM1| zis=u3V0_u0+PQM8*g6|Z>3b{c!5J3i%92{p8`8Tiy*BtViOuR4LTC5| zjtZEpSl@-Tg%PZC;K%g8LVtSFdjz)&=~KBE6S6Hiekb#arQlMu1jye0N}kgAAIi`Kcp#n{8cx`fUH(Px#Mw?p~|uY;L$j)i}rxOO+GJhY!Wg zNZK3O5blghJmkA|rB$W0j*~!8XG%~NM8~* z;%l@GX&ftI*WUUEN@URvPkEcAhSndlJY-Q!(q|&c!udE#LuX_`*+DxzGJPu9vB`fC zN#fx7Q~ooIC{xx}(D}JEDvIm{#V^W`WB#&}91t{*&{kC}k5{3F3ALVx5i(1UvIP2< z%n5%rMYa%qPzmRb_-we|jyc*bf_jW5Bz6<*FRMH@4r#1V&{yXRT?=X()>Oy)Op$RU zLjpY6ZISm5dHr10yQf0GMW&MJ@7g1kkT5E5WA#Vv)>RBTa^qy~RolQvqnpELJF9Li z*SYVmp**y_u^X%2it|iM0Cf@T+P!mb{|A#3<}EqliOtUfJ7vE9v9*O|3F8r3PQpIY z!5i3^zzSr{c9|TT=@DdkaPsK0ggrz*kVO)mj{s~&{@Ib5O%-IFFW~8Rr3xns@qTIw z)R}4TGb7={20qdZF6>{!BZ*XwH$1h z-rU5rA}>K)=JO6l%NnR$bL`3$D)?QSVoS;s?Xwk9@!}igOvVHv>VW;MbW2P(GUmbF zk(zfh<{y_`P}wKZS4n7!JP$|{>bF_Xo|tyZrl1Yn@^6|!I{(8H5_#&WP?3BLD7Ejk zBNX|U-p7#6%9|o?B^yb{r8>fu1Vs*q3#mXtZ6b(aFca3!YQ%D_O57Vr1XIwR5)v#* z25xOj_C?tk(V|Ffe2dH@;aF!CGOpV^DZLWnPVxf~BdzPs>Vvtcv zaClT$i5f@3=J^X33hY0Ja9)1>g?49!H$m01LlhcIO}-bC^?%|I6yP%h6YEd;gLt}H zIn%W?QZAU_+H}`R1qfBajwWl94M(Pf5&x{e*yUlsGQzf-9%lX7Y~#^%#@{(N4Y>wU z*=-nC*?Fa;CWv@dTt89ZmPigpSJUOce=8;*pI zBsz)_jG?R&`4vCOYlyWGt04_LRttI!k{pvOueOsL->twg(1s_-t;tMqA9{Y*SMnyx;De9y@RLvjXAG06Bzi2Frm9YtYz!CG_pc(cG1D$N2a2QYPM2%r zQVf}(r3Xj~IlonhB=d1LQ+A zP7|5!h_9&Ruxty}VR-ZWW(f?0kcjCkxlb84kENs#^eVayrs_8jQYp%;TDmYI@?O61 zY4MrE3L$Al7@??N)71HIa#IBp5^LlR7doFuyQQviYpd-j>k3V&CP9+9=ZbhR`2CU; z5jj4p%$|i6S0yKMjbVU(Sv)y4Ns;z@5H1j;Vj8qvj*1&{DdmNz0}dic65vX`Z=!Ry z%3!Hxa?wzu&rk?o)5Hq?uo7iVSt?0Noq5KBIvImxa|B^zqYjn?%9oy-Uux8o$!~>L zy*xkCKiAn!@V)tlXS&bkTMD;rtNjmVA8AnMgNW>g@Qcq7e#*Si)dZ0+1jOYi%=_XY zDN{L+b!NcaWW;kJh8(CbfQwCu_Ao|j*WNw?r6%OYq(mx{5V=!?@L)I*F3GW~nA}J9F?xLsuUQ zrJ^-*FPvVYmZ8`GQIQ`DhLkp@8mhS6P~(+44v6p#7*n;NG{*UkqC>*NX?IImg6z7l zUi|i}KRjl@2fTKQvw1xEdmh|)MDE+nMF;=8v2$;WD$COR|9lDyyUH*tMF=9eWL8!; z0-AK0KtoumEe?YiKqwLxNTznz%x9n9`>wV3IVUu;C!Z$;BF@>Dwb%W&AH?+r#i<6H za$IqLr_H*Y7C@C2L(!)@Qd>M_6u5al5*pNg31sJg8oLoGdx&(H-f)}wtNRq=ye9dK zB%qRpAX*khK}RIR`GE9MFij6tc?t5Hve#7-F}dH+rak766aP{ZQ$$@8vc04uzYt9h5Jx2&0S>9 zdSH~enebiEGeCeOLc(oh6;Ucx*)E!y%N8un_!S$P+l;emoqU}nAbz+ro_?77 z;~)3&VScARacBnm7f9lPV9^d)pLEZCL>bWc-%!2s>i#NKm9c0m6qc$9X95b*jUs_2 z0WZ(P$(7qtv9(zDTtuPE)|AGBD$X&RX?7c<<9=gWF*(4QVcf)z2L+x_rc+G=S3K_> zjy6Wm4k>|gF;QY;xr{i_fn{3o2==-AgWN&Xv z3%j!vLCaj&zcH{5f+BNcGB7hTIEQqTALQla48Caj)f+IAh>&Yf#Y5q>m-7 zLzbI&X+@ZHeUS_;9yjAcSaa8!k7pciw)moG*{ zzkHP|Dq5q8O`!_`-?FC#{8)M`nF0{A&B#h=yEkC{#OY8F)9;zSD2vO?AmPP045uP^ zjrFWd^%Z(93r_@2;S&DCuFVI%(AX5sEhh2Jbn=Wits`s#$26NJE^tP&FqYF{xm%bOYyk z;OLcOsckDrYEqFSJfj%I*HX8$s)|W&?5QVVa)8C#dRO@0QwgYkgiav%m>L8#U4rKB zQA;eU6~vXC2%nE~L^vZAAo(~~xLis8F)=uY7s{qfz@VaN!Sn=fuF^^B9rGJr(O7nf zNaF4ihQOQ=u1Tfj&E8~TydX*ysq;eI(u&a|kKlieucwM$8TW;-2HxtbjLnk&y zTzspwGIhy(N_QA263?=6BVmWK!iXv7|J6D2J)4A5@{_77fG;F4}FtN;KTTubCYR<=SZsuip9oZnJxAO0%3p2@-rUcs27!hZ}QOw ze)DB*Z6zhWGTTXVJ&Hu+y@5hCqvaEWC`m!=M>zv5#^ECnT`3&IB116UzD}6zZ z)j0@eaNh6-p%O5k$fCka+xgOGXMatI0G#lkj=&ZuBw9_vX4KfhESQZXrT01W84rhR z;t9IR27Bmj6B&shqE5^a5m2~j@iK7l?ruEaIpoH~Nb0i5xP?fGz*Iq$v&@p@x@NUX zv7b3xw6$yyuoLUObz~HCtk>V$w38B+JXm z55|bOyO>d=&crfxpV!XP@gjJ>4Q$ zR2<$c9n=HKledp=^D;jIg?oiH$7oX8&JXou1XZO8~;(Mo4Ei3LN2?;=xZ;A znc$qzhN|?GOXPI3CYjZesj6$y;a4s-;CIqH6H=e{9_XS1{yf(YTF6F6+00?;+7S_> zfIWt`8^t2xNm8=B{JyWlfX#X4r1G)ccp|W6K-6e?Ct z)XHb?p3rb+mE5B)z3%N%Fys&lnpt=+ifR+7MOU%FHpXfj^$86@~>se^0)(g?ODlH zR{h$#l#7KYp7F0`#=pjleL6LK?#)lH=jp7jBU_k~?G!uPJJ8Pl`Olbt9vL@(U;WT| zh~LXo8@pS2>`#A+0hh^9W56r=&ns*ufC+dD0KdGkyXW=)A&&*YbUo#AAur$XI_fQr zAFLkTXXlDf{$Cq%^!{aJA^5ISDO~~(4K2i*W$`u_rgpNEQJaWJ;p$@Le;_l$`V^Xr zIDV6tOShCa+4-&`%ajp?twTQzG%q4#lBM=Eq}_sw8sslTUs`cdje<&23DodT)sBj0 zh=TN>$PbrJD7FecBPuPQ8F%IeRme}@IF9Q&=t{MzCbgZnk|<6*rI-=$ z39H^Itnuxrymze2U_uwygJBLWtvgub%s5~I@Y(M*oo6W@^#O~zRhR-bNL*SEPYc60w&u^+aeQmf0i|_}m3o@`2=XghhsYgVDEmC+@F02;)f)uv*mU zFH$?&`peP%U~IT+7}uPwG?9lo?R)(*{6b-)c|5Aoe@Z0wh5&;&A{W4#n%_sPH80o` z35r<0Deu0S{NgnHd8(7dmL8gN`$Hhrq1>2~*hNgq-q3iiu<3%Zmu-@M^G&j${}rRG zxYA_4ieXc=gJN2T*3MT)y-!$-kiq=v6t#T}U%@4>AZ>mn2Ham&<|AA61L(bzt9XxL zSoJ)%E;rMEWEWPA_%putyKBx&oR`7n*kze#;HpbLu2Yei$6)orm~DlOGgf+iS|>Gp z*WEa~dAKe?RTzH0uA)6GtF2EGSglX?S@5@?frOU4yyzl{`3B6F^C+)6AU>))*J9H{ zXfAy{odSY^McK_iu0K{7kQ3rkhIyJ%-d?MMQukgtWYf4qHFz@ob+xKO7{$vS;RmAq@U96`EIDJ6GpXC7qbLd)w`N`P> z81L1C@#PIj2F9|e*Z=zIyU!9SIFt00M2Z-Nk#mMoG&#D^I7WvPg3u7#dJ0C;Zz(Fs z8fgoqQ2|Q<24PA`2de3@HnS8Qgqy-2#9YXqksz(zo=yH@P0})LXG-qW5_=82DJSry zy1WtHHIIz)b!~bBe;r;#p@3Fl#SXjBg(gTPS-a?{mkv6!O>wH03xb}E7Pm4FT6I0k zajTYukr~Q&_t(}2xP?^kVD{x9efYL4vJ)Uj4=-0W4j*vte&7?_L7~#4-p=l*`H%r= zknf6x`KFPeg_Qstb~690y`ELIC28K1WAY*^4Yi{1^q(+B_(DTeUz!HQ-RH12+wWYC{3 zf^h1E1!OGndfmG_zQ4ke(->-j!k)gq@T;q?g1C!JAQZlOG6_x5Ji_ zYRl*P7+2!$``4%&9>kq*dUvmMK~ZSPvO3OSsx-}&Vrk|Kz@*sSz4?vj_%6MdBAn8k zf^Nw`rn)s-@B>YY+7b>TYiOm=+XgqvRQfUPEC_&7w{v~+`X0_x9hk_{ewlgOZ5bCOwhMk+V&qv`lBL4D9EnAAWeSz8+`rub~Uy)np;C zzVl8mm*!==kDL6n50oV(&H+dKE#D$0Kn0193R`#!w4k{=uDJ z5L?`ZxTO9>KnX5theU} z2;{J`oCgdTh1|;*O=Fzqi-{vopZ1wuKY+7b3c_lCI-|qelOx*Yl1I4}XS`-+n#N^Q zt~@$+7|`BFqrGi23^-*=qy{egsKRoI8-eBXYlJ@J5G<@SEu1WYI9@o982M5^ycMGZ zaNyZCTeKa&D%D6UlXFDes9At>2kf%&^7F+7KsI9G;vE?;G7hnwijBJLF4FRCLYJ@- z3c3;r8Sf?Hh~B+ee`1XrUaqrx}60=>d1O${wB zBle`S9!_m+ur5F?0@oO|OSu|C6mockDD%a$hl(smL#N=VOD>|=-+W@bUPX3XWsX=K7|8Caz=IVIzbDo4nVHTo?7})6$~bfb-)M|1GNN_To~!xUwo6X{w2N$qMjvwZHgj zDRjUGf7M=luW={F7=C{Vh$OpRrprq3J>NfM|va3n*3?Gyg@v`(d|c}nUg zbn749AH`)I&}uZIw_VBY4W}P-1E3f~+DizCXpu6`<=jYh>o=oWGPkYo)o7Od0oJpx zZ)xsbz$Gry=5LJ|!fv8YG3A@FSwa`k{^r}x80+}%80O8`o;d2b*cjnfu8=qLqN>Ht zk61&A`8c0W8Y!v>q{~#9+!G|MT0xy%OI@~riX?O;%A;GJqt3Wx%mwm7QbS6>YK{o0 zWe^H`2j`kt2^!1r&5bjzAz8EW0;wc_97dRD>B58L6Zak)1;MZ?v&5IiZMli}jA0oS+;G z<-nF=(E=r57eFblC`N1O&0(iI8KXc?(H5Y`LjW)zx-*Dm<{0WC;yD5_PwBt=Zh;n^ zC8d_Yq9$ZxSPqFhh1=Tj(+&kniRQqkmMs>X!+XB8ULPp~Z=>I896*J?5hs;2Wv0PW zV39iSu+nwdG!j04=W+j;CcRk*S{P4W!LuXZ*F4!tYfJXb=u_T5f>1l2oGWY(hRK(ViWUsVC z*Bz&~MS-PS@ho|ErR%+L*fW97iG4}bx-P>~LP!~bx1xnAKnkaTcNa?#?1SN{`|)65 zITQS!_z9jOkx+Q!Qk}6>IElS$c#jl8`9bC9eOyaZyoiCagv8G_vVPSibL>ulDi@`w zGb!o5s@#*08lnzOV0vjEtEetTqSHKzd{y}m!9Ef;c_2hBe}Gy-Soo7lin`{ST|f0D zEH9;Hi3K=uh6T?p4V^ditJFf1qV2VEEi2M{9tNDEa+qdanX@u&3Ru|94^=2aJW`V+`%dI5~&N|fU~tb z&;dJiTFwMhkLAW1s@=NfOJRwsZbwe?gt;Jpfrs#8t=r0Nqr%bzumOdEx9T*dFE$7I zN=*?2!qeF~`->V7XtgL9F7Ig+vvvks3n$*Poq*gLY(XhB z@Neud)z)Y0o!nwY5BQZ*btL=}L6E*g?5>-UR^?l#I{`T}+u7Z)9 z4V+a&W)V?4^@SxdOWhwDQu+S!7BH}6G2h1D8g#}&*>9}8fLksqE5f32?(>tGA#_2@ zNZ(205aG1sa)YNYY5I+)huZ}<)*Yffov;-ifFC4eKO!h>UVBUgU?)pCAsN%DBu^D9 zq=kq{_+DAxEU=A_qA~TN(&3DRkNTx4miBDE#9^=qnn?Ep%*yx{ki*~pl5Nh%r^E%{ z^j-?&(m4PUzn}N!Df&AYZSFmtmo36yd;9u>Z*=j&D**cHKCK`SMPB5}VtS$?)MqhL z4q?)pfB8ypz8R~6Tw0Z16~ops2yw82r8VdK#3|v7B0Pjo790|5 zD*AMPRToWBxfpiihBTtlL+v6Eq*_kagk;9XrLt+gZo^DDMrXW9s*zR;2I*Wg`gb0o z8$N({Kslf1HT zpz&|!MU2u@H4ZCkGC)%RvVrhXe7J-+OA}~jm~o~n@f9``@XCO!a6~9=~ zJS8LI<>6?Hd0%OV!Y%sLNztua6(`eH6TS|dq#KRdqUsJf00l)O8%e^_Vxt7IzqSX{ zI1+=`uE%jv7+Z-WGC)Gc@->JMkjwI-CFfemac2(Qo;HjNAX58-k-J?Et>y4}D+em{ z$r7E~Ywyb?SkfFPvh8c<*VI3rI8to{Fp>CnmmR>*0>OrE{Up}m z9=^%zm{H7uEwGU&X|O-GB}lsCC3}&561$YnSF!GGPXe<|9J%|QypTm=+4!#98@!v2 zRbGtWGq;UbS*Z;oxfX(zsq>`w?A~rAP ziy*1{kXNU0V;0}OcqO=5f?p0H73G}w{+qE%^QlfdBqXtB^P!cFE`)=e)f{~o*Dzut zyWIk;ebx>Uw}h6`WybQk0tp*kS$5(g?;87gIJY~+u-(n47n#F!d zSr$DKcs_~5Dp@Ekm1j}B6ejFoncyy_Q3UVoAqxZSbOy}>Eq%GNs7gp#6KK%Ju1QZ) zF~Q+ArmZAm7>eQJ2J7v>28Tb!I=pDea)7ZFqOC?~yI!Zs9Dr zqOI?t}2k8k#I+|f{TRDrsKqEk#(@O z#_JX1OAN3Y!(N9_wDf@9n)9+xZa+@d3`mwF6@7ZF(t+{HOP_OtiT~VIBzEuN&cnyx zQ>QK{*`2d|eh21_VeJB{Nn zLv6vb&LJql1IP;uPPaS2krED>nv%3FZ~FI=&OZG^OK58;50mPr8b zoU=+k_hbn^s79dGkOCm~r)Qgd6S_g;ENu5_K`fK%qko}3%00y7v)qGQg~#VD+XkGR zk5AmiWS*VAglUM|KbM4|1Ls-qg??k+mjGLQc>dQ@@fesO!RiYv8(BHkxLH*qqNG6B zHpaRFRoOOrTJse11_kj$WLxoJLwHb_bP!RP_aC6-5d%UhdMaiEq0oeI%E*`ob;x`5Dd%|=~>sGiHE6oM+QjT9Eb{(3AX z#h|}atO}A7paALxJ~;KPSPRgrRO7LnYDq7fymC6P zsqaq91#s5YEUnqi=MTwsn@cO?WekbWd2$+%kuOuj&Ys+0is>!Zi?-~`bQ;+vzQMa^ zzdYREQSXI8yc2LQkmy1e{K$c35 zGq;@zy; zT}P|;$a5CQp{$jb@1;st6ql-R8UlGs9UxSYNI6c|B&iE|@MSdqRR}7?PFgYP1G6^; z{xRzVOG=v2eY{4Oy9u_To;H+PjC9q~u=fr5xwK=V8~oXpn579M$72oF&7R%6u`xbW zOjCR~CGw#(I*^rdIbXmi(@eIJsuo$>93B2-vO!ix1JgCmJe8lbwU z@vG?l1;28J+Arxjj$@qDrQPa>H)kwj9nvb~DiEe|Ad&~LWL-CI40Oa2_P{P#H+S6M za)l~7n-3>&GaKlJE+K`0Rl^8`98#z}WtB}KguJY{!J3B)B83yxcu?R~{3Zb~7KVU{ z@6eN&Dm4s&(oPvrM+ATbz>!qySK%pbzS}`&p1Y;Hf;@&g@|{rfx$adBX{>wL__Qm< zfjmYp3J+wX?S`hQdvatBdume+{=~0JoB)vFqox;zPoZiJ#}>oc#aWa)@C5H%nlfzV zUk=C8n^->YRjvYmekXoiDE=)%x>5FS6CTfOR%KC`xmQM3mJ z3X$wvPe0b1-bJ|b7248OBiOiArb_W@F)HDJ0~?%wL^izEb=1GC9=8oPAwPjE5s6at z5r5Q*he$sLyTB@W&1#D@`8+aX+LRpfQ{GFN^uAJ9w2f9>qh_6|RjXZ&8h0FI=>Tp(Hzl_Kb~h;jjz8B0jWX&-mdL|BN>P(FY*OxT7>jc*W6 z*^X6E=glw647{M|%Uc+NTUEfP-{#m|D^x%XI%HxZ^+*9Af(W2Ja6ECqTh|a7*5x-Je~LYv}J4~DlmDw9Xl`|{KL3=jy{N;h~g61#^kM8qZY7XF~nT(n)U7pcf+4q)* zU}CK@$kLJOJa{XNyn|*#diQ&lVzoVxhJ!SceaYuDdQpP%L{`UFR3BtOevTXiv5Yu} zD9Hi^$=_6<7j7pFR8mzJRfm8Or?w38Ba*-pSB+K@RqidT(>yZ}i%@WyqVjqH6Y&&@ z`C>;&mA0SZa3dJiDB!s20C?+Vj$6DjK`Co6aHE!|T(miq?qLlHp<9ko9ep)w@Tuu7|2Hr57Ej(_E#iBP=|OXT$!*2L%~;5{!TIVP>_zh==v|;aopP6x zRZ|sIp@Gd&z-ZJ+b;QU=`JapwltHOCSp;WiEne-pt`a}JIr(TE9{o>_#pe%~`wM?w z7>a~mTip1p>nzUHCFAHDqRcZ#(+yy;Cq`DrzapBOKC3K zN~R@m6sjR{*kGyZv`W>b?zj_6an@h5Wv?af0B>{*D?}ZNV;~lSVOCr@P;s?Xtd#>!?Z;w6r%(@ds!fP z4%qsBy zY*rUCQM0SCEdVKPPSh8~)ZLMhp75!>AoL@UWSSXPu7&56{4qtJV`hqFTNGcP;#XZB3O=Xc)eO-( ze1CfRnMNVJEVTH&Npy&+riPlC%w2%WTnFK3l1eE#C7*)&BV}tjO~zH$9Nqz37VSoj zw(VN_pQhVjIB!h))<46o@mlTr$R9wLkP_uID4B_xCA*qGntoC_ci9i`K0h^}`1ic` z^P7(s`s>H@3vS0$BBr4iErm8`h0T(}XQ-p7MmJ7xk{StEG$o=jCr34d}XWp)hI*?Ox`@WrCKLj>>+;=FP zD>J_*!x-?%`u3|EnhnjT&L+_HmvDXCnS==pB>)cDuv|YUw+H8=nK(YFRH8g753E>3 ztPUGt`NXjS96RCO;K8kpgIGY5y>2I}2Zvx`)FlL?6O~kM&1~@Xxe+_p7QX1}r0ls) zbbKZhcWhP>nhDEOPidBTstgo-!eu8IPBLmYBiq`J@{{V@jSE3^=#7zIm~m(?2rL6@ zneI3&NJTzQoeuxCO&bakql$F;(Xc}Gp$&%)Kv&GvkG=FX+=G-t)ZpF|{q925DD^(YQH0w1VQvKN1r0hST& z2JA+2$wuIA)mXhpd^ws@pJW{}KHu4)CrzE1RJS5f-+MssFEmW6QpMk-rKErfe;Fr& z7mI2$pXSg#dGv~zKX|Cozkv@ZmGv8~g4jjE%1mBP=IEIFE~csi%=U!U<6@gwN8^~~ zr*}z*_`fDYO)PjOuSv3Yg{R-L9ZMsh?W#NcV;4BD zLI*6{7w6N-1W}`QUcYfVo}i3QIaB+?qLt@05@57w>FZ%{ksA?sw?=QNC~}KXTw3aO zLr>oc;n|NIc)9%IY!^7w>haeTtdy`Pz_Oa>(LFP8U7BRQ_ zCViE{s&`kuW75di-Udg}L5Mq(N~c4JGIlsivS#UGZY^weGw{j{d92n8ivvJlvHIE+ zGpn`Vwq@DrEAQS#VL(gX0FCr(C?uf9n4ob3ab2=5HVzQ9J9%<1p(Jb6LbsB19YRC? zw-!pa*TA?X^og^iTqQ3;m$#o_gGhoa&%{rfl#iw)#hh42HMuJ18!T9-Z1cw_%k(zf zS(_NQ2&y$%J;lP!*sIY&R_-NXHmoiVGq)uwSf;Fz6SSe;WwL05mvwYFP9^At>;Rw>QahpYrz@T%kkW}*j6;`auozZE@*Z|CgoQ8J zMoQ?@=_U}DdV{Osy@ySS#AhJgS?}WFyZ7(EySZ72Y#`Kn^jSjqZ_3Bf-O2t2e1!5Z zd&Ocdg_{UEj`-9NAMz#yLTizhh~m(nXqy#lvTPLh>;y~1GqkojeVpMHW62%-Jw)$% zPp!DTLv1iAr?*jxjZZ7-tx&#FQyTZ3SW#i=O{^Zo7cd-jPtkXFdu@;^10{mhx}rj; z#m6i;XECa*qG{x)CFDd zaZ^?%$2)3IKTPGqtEH{WO@|AMuh5#s6dr^nvi->&{0Q=cQ(~JnyPi{`en&L@nwE$c z=yP<;B7rYknnOKT(bV&7az;SWp;M;9smLXVv8d?O{nBls&U$qH#2ecmGNRYzkH=aV z#E8F6Hzvs@NK>z@41#I3laege7@}oL5J)`a^6=H6=A(MnZLVLsx1W3F0eiaSk9*(1 zFV(^7=svpE8GTYGTo}fLVD#YwB;I`*Eus!Mp3gh#hsO7%}i z4d;{X30;@dX9e+cbdq+&#Qj$dLc>k$=i=m2=n{%}HK0;q^Z?mZI`z<#*AD;K<1d;n zlqyIJqffGL83;6qi=b9Pm9GO>=Uf7D-bUMB5$mV*sc0S3QRQFe)2R~_x#R33yyCw0 z3tZvyF}E28p3N%SS!S|4mIt#AgW;X!;T)=_ggOob;kT^%xDc$9ko@ZY8W(HS9UUqm zSRKbrbI2)|7$~pFONz7->1L5utIqdf%#$@0#ctn5vsWG$zK3$+6Y_msdI5vnK*)al zHB5w4tjvaJiG<(+QoWZZwsV~$8<;b8DlpJHd1np5?t31dOIx}4hAiCQdRJ#o2sZlE zMVr`U=A!Dngwe$6sZaSZ{WX(QUg2YruJkq9($UL7cL7*HdFvTU!aALn08yNOn!=Qb zNfjUv&YD|lhkRk(wB#>}6@ppASW>8BBL7G4kC%QOBfn(^eir@{T5$?!?#T=;_<&t?<8kM*^msObKy&__Q7H{1|WJt{nk%THMTqYMGl%NcvLRi{^Wih43EJPYzG;thd zCRl4Kfl72FA*%iOP9WU|#0^fEIZ6r5yfJT>VN+Laa_Ph(g?0%MdQ?8%86EEIu|&He z-mnIr=F+0GCU+DN$PyYUR#=HL*)_ZH{R94&sx2Vj3#7&JZ$Gxb4Vk`_x1G`bp)5PQ zBr5R4XN<;+{*8_axSV9Y3xP)$D4o$R^BNQZs4_5oLnhG36)N6f|G1Ps+aRdoKpZaQ zv_5SzE|+U5BvMGVQVCbBLf9n**;uA+3SM?Jp;m=TFGND^mfl@(5sJtyu5ypN)sNN| z!LEBTIv>6)cQ?Tm(kg-ZegFLX7q3D;c#Bki*Hf)I*E!)`Y6E0lvDyGgG4%q_xLKUh z2VB~b3^uCU&q5B+9E+LI66bo)r7MQz|ANgXgK9qXTSb^@Mwmi~^T*v!|sM_^WvLo)EEiyv6Re_AUY1;-ME!Ue;T*6YjH!(hCCn=h{{# z*;rpZ=UOps$<9dUx_Xt)kJov-9jDy;T*Q~XnP4Ir{bx~9mqu{1h*}kXRUnzwAKrG7z1$e**w0cNiMx!`@PHcJEK3eOQqS(|YTUlYG&O%~d zNAcUp1&Ul&)fEd1E^Yc!;z-K~>GYQ1FvS6Re8+;=oi>C9Y8GM7a^r`r`_^!(0Mao+ z{NnlzGqY_TTS4TfBh)O7k^nPg8SLT6v(Fb0I*BFTu?Vl{7VS_g;Luvkv<$fD`edf5 zv@is0mfaYFLpyD|(PP~WkEG|GfRj=hm>`o&9&e&@;5g96%hZ%kVkRhmCV0Y39i`o8 zi4#&qimp3uCAR29Do^nWSGYQ2Hd{s^PO}#<*~i#q#j>hez;J3z!DnG_uRMQ(Y-V_s z+%!Y7s>4F5oX zxq@k6c{ZgEPIXhMgHl-C5#J0ju0sX$zsdm7lnFlE(D}*hS$DHJJMB2h$om5ulm-)A zFYoSTRaNzBG%tfTbV^#rV5@zN&q&&!k$imha)0M9NU3{L_&(w}QJ1QJvdYSs2q5sq z!G8sF4ioH_VTL3pRhB3WV2S zI(MA@5Z5=LuRXZ?d~9j~^#6R+d+`AId-uiWHb3+sKfdW7-G9Z;mt26tkH0L@ z9h5eNv+8?xfD5_HIol6W1Zo?rTUwrw?P~lhU{1jZOTrKY@I=PB`?Ymq)nzR6CnSX| zzrdFCE0<1cW9*^;y1<#aMNl(D--$;DA8(R(@K09-(cXL=*4N|W^8Xe_EyG;I9OomM zfuRgc89q;2e|%Ax>$OE=IRsAFos-@LcsW*FQjyUS5hc>M<*cZfG~3#!;&dnHN>l~5 zRS?Z8mug}LwxV6yZj=|Mg<~uYpB{P_k&aLup}5EgwqgnMGo^&>5@H4?68?K6V+-Xw z@DyWjEmm{W%Tb1i`jF|!McaVljm$&NDztC#HPRZB?HO#*QZD!(I1Km!u?##g7qs=J z+Gz~1lFnYij$$%Fq(wU}GNo}Z^_Ev=eM_r%kaD<-#Lw_rdO6`+`a;h=`}pCzhYvYX z8X%r7oZp?-~RCQ2m%gOBe2 zU~}p%LiwB*KHhg1$WK4si*PLY!B*MpqUMKEu=m#T6vZ>}CYq7$S9tWBN ze_ghp{Hp!GoD7%x-}3*fm$c^l4q(xrPq5`P{k0-KWkVtc70BGqn|rF;Ad|M%fUJse z5cryd2#z!EF%Q2>ZitYtb8t5|uU{)g6}oh5UQRlr|aHEPKzx%U_k z6~m=;5i*fyB`sW>L%M{WQVLvx!t6|~jTv30VKGh#LB_CEHZie@Ie3blEa4OIY^329 z02f4OzU9?fL|@}tm^ljJ8~UdAKf))A z4>g*j%H5UTole{L;hnYj#xAvj3VwisXOcf(+q-0`}PnCgLQQXi~V~uEu1ROvu@la?+6j5NW*D z@~-JvN#2+)T)>lvF~`Mhddv^H|1TB zvz>$fyW?MRr`At&y^=cUcb7?K_}qKY`45M_BEtSGTYY!FZ~lNn^@mJ<{m8#sKjfkf~H; zuIG~$XzGg?m8X)IN}llmIakeM7~ON)ct0obZ)Y{l6lCAv(+ zg0Ul%tt3p=c4FmgPAaOyZXRrJj2PE&r2U45WzAmL03U|~u`BK?@dWcQ$WGwPi_SKEP_Y>Sa|hl=Lssacq$Sv2b2Ge-Y+`r z+8IQQkxUW_0K|fvOUzY6?EBKqn}x0Yp>tHU@x9%rfvt6H-!{XNH%U_U6{QSb?LFDq zf`oOrHw_jM*}%e{>;1I-)84_0_`+p*;L@J$4x zsI4L1@tltvCy^f2qr`p|6>$2+_G&ql`@ zDLBv4(h!>TjTUwumS9eKKk!fq0Jq>}Pzv`TqG|LFx3~Y+MVF;nga&#yN{n!>pAi&0iib+m&eB z_!AY8sH|w~VCV1K2QZ^x6#agS85Lqt_>??DyCq>r;7xKQVqT}R;Toi8vVopc|A!0T8uSkfMha3nH)75B07lH1IYmPR5+}V9{ z93#s#S?Y7zh5=bIr|A9X;k3@dql(H*E|Rmfff$#_u9ZrIb>rZ$FrYkpvPNRuT#4z& zOoLJt*G42d(5_X7btz24|~bok@O!S>cMC%17>iE>zo@-Ke>_@ zm>BXmCaxFAdg#F-Y82QNLxY(@)(C^!3Zmj?!|%zc_{1{qhh7v{Q6ZYa z2kv$gm&<`i8;>4C5QPke5={t66G8TPIpfMwkSkXU*UaTADS&Hokb(jQ?fb><%6j)k z!i75QpxLfP-t3N{1xYwD7?DL{NMglc+1I@0&^!B^h>r>i3nT!*$Fb^=B1!?!#V`y( zo>ED?y>SgVn~~EXpfRvcSCl7=AThMAn~@Iug*;4WxCr-97Qa3W6e?)T8qK zhrDX9Dise?GLJExJ$mABLw0k6HS1&*2nXATJO8;|IK*&0;gCBvdDH`Z?NPxBGRZ^1 zcr7{0-bm$>W`U_!9Ov)xc~aFQ_zV}Vd13o)Z68>F+5TyN^y2=U^^AU1z{0x`oa5wD zqQ-9MNHvmZdpG|4t2_xlP1=RY6#Cot3x+)2e!fG4xHwG;2XYtrLR%$j6=uQea!Rif z(UartAuk^7J=@)ab6Q#LTa9Z*^MO)?Dul}$4il@98GL44!?iX+FvDdlT7Tbo`fU4{ zapCsT-zZCw0!JMAYwL}yGU+U1v^tMZVXPa^vR?XmIpvzY|Hrev5$Y_7SsJSl30_CD zO(_T_xc3vnS}@X7+c-tEkNChHeYJ+t5MSvn}2Yi89V& z6CRclyT4fUGrGib2{$2sX~3s&LW~*<99ZL|oGR;bIz4)~jSyXSqZ!EhLKo8Tdk5f8 zs_nFiPMFpHT&ApwB39qQMjr(y#e8!bE^@u3MAP8~AvUV3EvVldGmtBX(6B5_GKLMw zj+&`kBf=Qd=#dyEeB9llhq82D?q=3XwR4gB)jfz-C&j&&GUD|h-oL7Az1sy*8E~HcAn3)25XO{8;1iyp471nu0jc& zJ?1lC9gBYbmJnLk=<&|>Qy4&KpZ%)mbp|UBHKQRSTHB1QwcYI}$3O3Ejee}qFN6_y z(}P96{&%iwheaQsCMq7h`4#|!(4xCA>rn4AcSh}=M zACk{K+U}YgKNhQ#gfX@jGDxR;m}vN3&DkM?N~RXzs7Wep;#1}*0SV0kQC=Yjj z+DC-t5%&u@bRb#i%#MhBp)!1fp}#~W9v8&zmGQ!U?@L>@Nx6TG=L$2zD-P=jEo(Zy z5y{y%bj{DGVPUB`iPze9-)M$TVk$!yDmiq+p5R{1FhSV$nn%YQXqm0UwqC{hIB@)>I5G! zAbCyP&ff1ADf3m{ozGTC3l?)Ewn&+0sAM$-nHs|SiWtaeo1x5expGbVJ7X12lSITV zuyJNzT~~P+W>oM@n6(_YS8KFKYPp?^gu8FP7>g52`Q%4i*yQu3g}8XG*TtoWbtKaZ z@BYTBd_Q8dMXzb-R*O2>ou4+IpvJiBufJTR%I_Vl5GUS}+oO#z%PY3m&B$Y~cJ`6N zmV3=@&Cp`uLaq&v9cooXml(oGFUMEsutBeSm9+H0$3VwCW0H*l<^O>0EV^OE%WHN7 zh!x9fM@*pWuc-o;BJX-G&I|Hdt%rQHkK`C^{^aTIZM=$Ys4@kR1{*i#cPnzAa1yQw)?l;y`Oi{?W>Yj4ei@2$}Oi9 zn*5hT-~-jT+bgHbGYTfK;LjgIhz{af+A`$9_NLgMz+4UN+bg<#a1WT_tkJJ25~YQZ zlD8@yl@(VJ1%|Zwq5;Egvj9dO%YSFWLLJ!KL1$9=>?A0}X?9pF;;P}(T$h}|0C3t) zn1Yz^zMZ~5EU5e=h7#JXmyNxr>K%Lysy`!A6_@mA)mIP7r4`b^LnsVZP~~HWEf}|4 zZcmFMFf3wWr)ux$2X9WOWU(Jr^Su77i(a4;+C;$1FX9q5>>p|Ho{rFlLE_wC;baGuyY@G3j}w99YM#_Xrcj67x*P z=m+SpxOWmO8jBK_B$Yq`2ohu~Zfrd}-hK8{iu2`aPKP*Wy{Qtaexn5w9~VdP_4hn`n(p@|gWIaGe-kt~i$di!0xa5yh58 zr;~DaER`XglH6-s4(|eiWd6?2;EhTYshLH=QJc>YnYv{WD^B5W{#A8<;=T%3O60|A@ zCvf%)$n2Rp}4Ni+&xgkJf(2gv#T zLYJ7#E=$Fy?!jSM1BV90Wx_ddgLrJB;+W05R=A3KdeBa}Mha#b2w^h|z_>oz zjIA1aXOnAWvYknh=1`Hix!4uaA7ONN(<=E8UU`_)T#JAu3F;NYl=j+RTl%AT##GO> zAo>e9H;VPS8%D5ep&fQLJX8!NoGrHhNGADWU=H!*lS!rmHyEjgk)^9)IJYMUd(ZZd z)8ug$?DBxQ92t2+fa*ha@zvaERAHw>cqALPb3K?maXH2OUL51~euNuMDi+u!MNLzN zI%`8V`k`sRN7$cckq|KU*Ha^EFIZi#1Bc z>JE=b2OFDz!zb#kEe}vW^dxp4Hh+8h<+&wyVJ0g*9t`_UlkV+1_BdP>jT5r+_i2=& zUGI*}Z}#_)yAF*d9AKDCD1$4#jj{NR(P(4yN61ELQxv+#Q{u8AE90rHZ9k=ILt_Gk zt6|nW*_U%VBBN~0AYWO8jVh&x;(DZ6DsD9}MgYsU%P#Mh@U#G^`B9hRRZAlCmpJUq z?rCECB%y_gq7^(N!bn7kTt^Sm&q0ErXiY`saLim0C73u25Lc&Ic?l^gA%y5`nk@Uo zoQjaax1JfKdaNF^#NoCn%$UAO%}dxJ0QgN0AZa^`xOu0_B&qy7vKx zwJ_Jytj~6R3Ybp#?j1in551tmgm1SFaJ!CWCAlxG(J2m|19I{ol1uhxT+HsD?r0wN)H`rO{90oT74_=Gy|LpeBr z4Umsg(R(G=b*Ai-sMV1ND`HTZC1D0jRUS-hR^r1YKt2dX-!tqzrU6_W_G*r;oDT09 z%u=F0z~lnTEBp>h0f<->kA#Z}MW3o36q}TbgHZN0wit%uxP>&^ zyXL~%&-b@CNB6C-5ZJCKu2OODKZdE>Bh8oX$9O38$;x*6o9s~91ou#;EQ&}qAF*E6 zC3QRPErH2N>p~gO7b{XJ0Mfa=&d})vxyP+>i}0)w@UzP);lL!p(4aK3e2NZCNu6j0 zE(&}UZ6o8l{R1&0=*6Ue!TnhUUQ2=P_8-@Aiw)DDl>Gr+{ETq}09}*<8j4vZ4Qz7rOQC^cz5IVHICqZ>Yh$a1 z4rSet#>TK4A`h_|FpUn(F?K8!+!@@KSi*FqFjn`&*7m0S4|Z1$s;yF2nwm8Bw(3?( ziyo4nE>CF41fI1TC+NgNO~>Xu-XjwTbo)6CaHLM61IcpN!0*>gO}I66w)`Y6lW8bb zdk-DmE~Cx8pU7T1R6s$QQMh7O#b?O-S{K(3^~9`7ZIfJDX`3ptl7+HMp^$qtc0V&7 zjhY9TKnTjtV7Ku4uMgJ>JTW8=Wyenj)i7zT$QCc>BEN#=@<)|O&SKGAKf*)%&L%p1 zfxqUtx9aqTL3N*V1Z1s9dVF&+Xf~N;hj{lA{AsaJSUbti${a$$# zbO8jZ6_jA0{E-nvMRcV9DbI!p4Y|f>%ivPXgThM!1vz)=sT@?NyGS6s1ql*Vl+b&N zTlGdcBMu2g{Jz?p4u_=S(7-EQ5<<9ez4Kco70-q>RI~!e{w|~{NR%Vcz{5Jek0YW? z&G5O6b@_=&yia=Bi?m=vD>N)SKS3d7n38V&fx~VNp#+3BcAww@>t=Hft2k~NSvxr( zx*MttmNt3#JA4W#`NmSFcpF_sERZuuB>ee#^AJ=2X}Y$#`X-lLVbV;aa$`K)zLAJ! zGjOSBZ|4tW$VlTx9&a!vnh@p4v((f~V3t{Da2l5HswjFy#*oUg_Yd~|J-rjd>Ko+l zMcNTh-Q3P_F=nTOtu>XP-U3NAzX+(X@gkQ9X<2{Zm)%8(de$HpI~oLrfF7J+BI1&^d%MBw|hyd8lk0e+~U8>pZ{laHuuLrZtp#w`+wwu87BY$ literal 0 HcmV?d00001 diff --git a/software/cfitsio3040/quick.tex b/software/cfitsio3040/quick.tex new file mode 100644 index 000000000..109d04e1c --- /dev/null +++ b/software/cfitsio3040/quick.tex @@ -0,0 +1,2159 @@ +\documentclass[11pt]{article} +\input{html.sty} +\htmladdtonavigation + {\begin{rawhtml} + FITSIO Home + \end{rawhtml}} + +\oddsidemargin=0.20in +\evensidemargin=0.20in +\textwidth=15.5truecm +\textheight=21.5truecm + +\title{CFITSIO Quick Start Guide} +\author{William Pence \thanks{HEASARC, NASA Goddard Space Flight Center, +{\it William.D.Pence@nasa.gov}}} + +\date{January 2003} + +\begin{document} + +\maketitle +\tableofcontents + +% =================================================================== +\section{Introduction} + +This document is intended to help you quickly start writing C programs +to read and write FITS files using the CFITSIO library. It covers the +most important CFITSIO routines that are needed to perform most types +of operations on FITS files. For more complete information about these +and all the other available routines in the library please refer to +the ``CFITSIO User's Reference Guide'', which is available from the +CFITSIO Web site at {\tt http://heasarc.gsfc.nasa.gov/fitsio}. + +For more general information about the FITS data format, refer to the +following web page: +http://heasarc.gsfc.nasa.gov/docs/heasarc/fits.html + +FITS stands for Flexible Image Transport System and is the standard +file format used to store most astronomical data files. There are 2 +basic types of FITS files: images and tables. FITS images often +contain a 2-dimensional array of pixels representing an image of a +piece of the sky, but FITS images can also contain 1-D arrays (i.e, +a spectrum or light curve), or 3-D arrays (a data cube), or +even higher dimensional arrays of data. An image may also have zero +dimensions, in which case it is referred to as a null or empty array. +The supported datatypes for the image arrays are 8, 16, and 32-bit +integers, and 32 and 64-bit floating point real numbers. Both signed +and unsigned integers are supported. + +FITS tables contain rows and columns of data, similar to a +spreadsheet. All the values in a particular column must have the same +datatype. A cell of a column is not restricted to a single number, and +instead can contain an array or vector of numbers. There are actually +2 subtypes of FITS tables: ASCII and binary. As the names imply, ASCII +tables store the data values in an ASCII representation whereas binary +tables store the data values in a more efficient machine-readable +binary format. Binary tables are generally more compact and support +more features (e.g., a wider range of datatypes, and vector columns) +than ASCII tables. + +A single FITS file many contain multiple images or tables. Each table +or image is called a Header-Data Unit, or HDU. The first HDU in a FITS +file must be an image (but it may have zero axes) and is called the +Primary Array. Any additional HDUs in the file (which are also +referred to as `extensions') may contain either an image or a table. + +Every HDU contains a header containing keyword records. Each keyword +record is 80 ASCII characters long and has the following format: + +\begin{verbatim} +KEYWORD = value / comment string +\end{verbatim} + +The keyword name can be up to 8 characters long (all uppercase). The +value can be either an integer or floating point number, a logical +value (T or F), or a character string enclosed in single quotes. Each +header begins with a series of required keywords to describe the +datatype and format of the following data unit, if any. Any number of +other optional keywords can be included in the header to provide other +descriptive information about the data. For the most part, the CFITSIO +routines automatically write the required FITS keywords for each HDU, +so you, the programmer, usually do not need to worry about them. + +% =================================================================== +\section{Installing and Using CFITSIO} + +First, you should download the CFITSIO software and the set of example +FITS utility programs from the web site at +http://heasarc.gsfc.nasa.gov/fitsio. The example programs illustrate +how to perform many common types of operations on FITS files using +CFITSIO. They are also useful when writing a new program because it is +often easier to take a copy of one of these utility programs as a +template and then modify it for your own purposes, rather than writing +the new program completely from scratch. + +To build the CFITSIO library on Unix platforms, `untar' the source code +distribution file and then execute the following commands in the +directory containing the source code: + +\begin{verbatim} +> ./configure [--prefix=/target/installation/path] +> make (or 'make shared') +> make install (this step is optional) +\end{verbatim} + +The optional +'prefix' argument to configure gives the path to the directory where +the CFITSIO library and include files should be installed via the later +'make install' command. For example, + +\begin{verbatim} +> ./configure --prefix=/usr1/local +\end{verbatim} + +will cause the 'make install' command to copy the CFITSIO libcfitsio file +to /usr1/local/lib and the necessary include files to /usr1/local/include +(assuming of course that the process has permission to write to these +directories). + +Pre-compiled versions of the CFITSIO DLL library are available for +PCs. On Macintosh machines, refer to the README.MacOS file for +instructions on building CFITSIO using CodeWarrior. + +Any programs that use CFITSIO must of course be linked with the CFITSIO +library when creating the executable file. The exact procedure for +linking a program depends on your software environment, but on Unix +platforms, the command line to compile and link a program will look +something like this: + +\begin{verbatim} +gcc -o myprog myprog.c -L. -lcfitsio -lm -lnsl -lsocket +\end{verbatim} + +You may not need to include all of the 'm', 'nsl', and 'socket' system +libraries on your particular machine. To find out what libraries are +required on your (Unix) system, type {\tt'make testprog'} and see what +libraries are then included on the resulting link line. + +\newpage +% =================================================================== +\section{Example Programs} + +Before describing the individual CFITSIO routines in detail, it is +instructive to first look at an actual program. The names of the +CFITSIO routines are fairly descriptive (they all begin with {\tt +fits\_}, so it should be reasonably clear what this program does: + +\begin{verbatim} +---------------------------------------------------------------- + #include + #include +1: #include "fitsio.h" + + int main(int argc, char *argv[]) + { +2: fitsfile *fptr; + char card[FLEN_CARD]; +3: int status = 0, nkeys, ii; /* MUST initialize status */ + +4: fits_open_file(&fptr, argv[1], READONLY, &status); + fits_get_hdrspace(fptr, &nkeys, NULL, &status); + + for (ii = 1; ii <= nkeys; ii++) { + fits_read_record(fptr, ii, card, &status); /* read keyword */ + printf("%s\n", card); + } + printf("END\n\n"); /* terminate listing with END */ + fits_close_file(fptr, &status); + + if (status) /* print any error messages */ +5: fits_report_error(stderr, status); + return(status); + } +---------------------------------------------------------------- +\end{verbatim} + +This program opens the specified FITS file and prints +out all the header keywords in the current HDU. +Some other points to notice about the program are: +\begin{enumerate} + +\item +The {\tt fitsio.h} header file must be included to define the +various routines and symbols used in CFITSIO. + +\item + +The {\tt fitsfile} parameter is the first argument in almost every +CFITSIO routine. It is a pointer to a structure (defined in {\tt +fitsio.h}) that stores information about the particular FITS file that +the routine will operate on. Memory for this structure is +automatically allocated when the file is first opened or created, and +is freed when the file is closed. + +\item +Almost every CFITSIO routine has a {\tt status} parameter as the last +argument. The status value is also usually returned as the value of the +function itself. Normally status = 0, and a positive status value +indicates an error of some sort. The status variable must always be +initialized to zero before use, because if status is greater than zero +on input then the CFITSIO routines will simply return without doing +anything. This `inherited status' feature, where each CFITSIO routine +inherits the status from the previous routine, makes it unnecessary to +check the status value after every single CFITSIO routine call. +Generally you should check the status after an especially important or +complicated routine has been called, or after a block of +closely related CFITSIO calls. This example program has taken this +feature to the extreme and only checks the status value at the +very end of the program. + +\item + +In this example program the file name to be opened is given as an +argument on the command line ({\tt arg[1]}). If the file contains more +than 1 HDU or extension, you can specify which particular HDU to be +opened by enclosing the name or number of the HDU in square brackets +following the root name of the file. For example, {\tt file.fts[0]} +opens the primary array, while {\tt file.fts[2]} will move to and open +the 2nd extension in the file, and {\tt file.fit[EVENTS]} will open the +extension that has a {\tt EXTNAME = 'EVENTS'} keyword in the header. +Note that on the Unix command line you must enclose the file name in +single or double quote characters if the name contains special +characters such as `[' or `]'. + +All of the CFITSIO routines which read or write header keywords, +image data, or table data operate only within the currently opened +HDU in the file. To read or write information in a different HDU you must +first explicitly move to that HDU (see the {\tt fits\_movabs\_hdu} and +{\tt fits\_movrel\_hdu} routines in section 4.3). + +\item + +The {\tt fits\_report\_error} routine provides a convenient way to print out +diagnostic messages about any error that may have occurred. + +\end{enumerate} + +A set of example FITS utility programs are available from the CFITSIO +web site at \newline +http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples.html. +These are real working programs which illustrate how to read, write, +and modify FITS files using the CFITSIO library. Most of these +programs are very short, containing only a few 10s of lines of +executable code or less, yet they perform quite useful operations on +FITS files. Running each program without any command line arguments +will produce a short description of how to use the program. +The currently available programs are: +\begin{quote} +fitscopy - copy a file +\newline +listhead - list header keywords +\newline +liststruc - show the structure of a FITS file. +\newline +modhead - write or modify a header keyword +\newline +imarith - add, subtract, multiply, or divide 2 images +\newline +imlist - list pixel values in an image +\newline +imstat - compute mean, min, and max pixel values in an image +\newline +tablist - display the contents of a FITS table +\newline +tabcalc - general table calculator +\end{quote} + +\newpage + +% =================================================================== +\section{CFITSIO Routines} + +This chapter describes the main CFITSIO routines that can be used to +perform the most common types of operations on FITS files. + +% =================================================================== +{\bf \subsection{Error Reporting}} + +\begin{verbatim} +void fits_report_error(FILE *stream, int status) +void fits_get_errstatus(int status, char *err_text) +float fits_get_version(float *version) +\end{verbatim} + +The first routine prints out information about any error that +has occurred. Whenever any CFITSIO routine encounters an error it +usually writes a message describing the nature of the error to an +internal error message stack and then returns with a positive integer +status value. Passing the error status value to this routine will +cause a generic description of the error and all the messages +from the internal CFITSIO error stack to be printed to the specified +stream. The {\tt stream} parameter is usually set equal to +{\tt "stdout"} or {\tt "stderr"}. + +The second routine simply returns a 30-character descriptive +error message corresponding to the input status value. + +The last routine returns the current CFITSIO library version number. + +% =================================================================== +{\bf \subsection{File Open/Close Routines}} + +\begin{verbatim} +int fits_open_file( fitsfile **fptr, char *filename, int mode, int *status) +int fits_open_data( fitsfile **fptr, char *filename, int mode, int *status) +int fits_open_table(fitsfile **fptr, char *filename, int mode, int *status) +int fits_open_image(fitsfile **fptr, char *filename, int mode, int *status) + +int fits_create_file(fitsfile **fptr, char *filename, int *status) +int fits_close_file(fitsfile *fptr, int *status) +\end{verbatim} + +These routines open or close a file. The first {\tt fitsfile} +parameter in these and nearly every other CFITSIO routine is a pointer +to a structure that CFITSIO uses to store relevant parameters about +each opened file. You should never directly read or write any +information in this structure. Memory for this structure is allocated +automatically when the file is opened or created, and is freed when the +file is closed. + +The {\tt mode} parameter in the {\tt fits\_open\_xxxx} set of routines +can be set to either {\tt READONLY} or {\tt READWRITE} to select the +type of file access that will be allowed. These symbolic constants are +defined in {\tt fitsio.h}. + +The {\tt fits\_open\_file} routine opens the file and positions the internal +file pointer to the beginning of the file, or to the specified +extension if an extension name or number is appended to the file name +(see the later section on ``CFITSIO File Names and Filters'' for a +description of the syntax). {\tt fits\_open\_data} behaves similarly except +that it will move to the first HDU containing significant data if a HDU +name or number to open is not explicitly specified as part of the +filename. It will move to the first IMAGE HDU with NAXIS greater than +0, or the first table that does not contain the strings `GTI' (a Good +Time Interval extension) or `OBSTABLE' in the EXTNAME keyword value. +The {\tt fits\_open\_table} and {\tt fits\_open\_image} routines are similar +except that they will move to the first significant table HDU or image +HDU, respectively if a HDU name of number is not specified as part of +the input file name. + +When opening an existing file, the {\tt filename} can include optional +arguments, enclosed in square brackets that specify filtering +operations that should be applied to the input file. For example, +\begin{verbatim} + myfile.fit[EVENTS][counts > 0] +\end{verbatim} +opens the table in the EVENTS extension and creates a virtual table by +selecting only those rows where the COUNTS column value is greater than +0. See section 5 for more examples of these powerful filtering +capabilities. + +In {\tt fits\_create\_file}, the {\tt filename} is simply the root name of +the file to be created. You can overwrite an existing file by +prefixing the name with a `!' character (on the Unix command line this +must be prefixed with a backslash, as in \verb+`\!file.fit'+). +If the file name ends with {\tt .gz} the file will be compressed +using the gzip algorithm. If the +filename is {\tt stdout} or {\tt "-"} (a single dash character) +then the output file will be piped to the stdout stream. You can +chain several tasks together by writing the output from the first task +to {\tt stdout} and then reading the input file in the 2nd task from +{\tt stdin} or {\tt "-"}. + + +% =================================================================== +{\bf \subsection{HDU-level Routines}} + +The routines listed in this section operate on Header-Data Units (HDUs) in a file. + +\begin{verbatim} +_______________________________________________________________ +int fits_get_num_hdus(fitsfile *fptr, int *hdunum, int *status) +int fits_get_hdu_num(fitsfile *fptr, int *hdunum) +\end{verbatim} + +The first routines returns the total number of HDUs in the FITS file, +and the second routine returns the position of the currently opened HDU in +the FITS file (starting with 1, not 0). + +\begin{verbatim} +__________________________________________________________________________ +int fits_movabs_hdu(fitsfile *fptr, int hdunum, int *hdutype, int *status) +int fits_movrel_hdu(fitsfile *fptr, int nmove, int *hdutype, int *status) +int fits_movnam_hdu(fitsfile *fptr, int hdutype, char *extname, + int extver, int *status) +\end{verbatim} + +These routines enable you to move to a different HDU in the file. +Most of the CFITSIO functions which read or write keywords or data +operate only on the currently opened HDU in the file. The first +routine moves to the specified absolute HDU number in the FITS +file (the first HDU = 1), whereas the second routine moves a relative +number of HDUs forward or backward from the currently open HDU. The +{\tt hdutype} parameter returns the type of the newly opened HDU, and will +be equal to one of these symbolic constant values: {\tt IMAGE\_HDU, +ASCII\_TBL, or BINARY\_TBL}. {\tt hdutype} may be set to NULL +if it is not needed. The third routine moves to the (first) HDU +that matches the input extension type, name, and version number, +as given by the {\tt XTENSION, EXTNAME} (or {\tt HDUNAME}) and {\tt EXTVER} keywords. +If the input value of {\tt extver} = 0, then the version number will +be ignored when looking for a matching HDU. + +\begin{verbatim} +_________________________________________________________________ +int fits_get_hdu_type(fitsfile *fptr, int *hdutype, int *status) +\end{verbatim} + +Get the type of the current HDU in the FITS file: {\tt IMAGE\_HDU, +ASCII\_TBL, or BINARY\_TBL}. + +\begin{verbatim} +____________________________________________________________________ +int fits_copy_hdu(fitsfile *infptr, fitsfile *outfptr, int morekeys, + int *status) +int fits_copy_file(fitsfile *infptr, fitsfile *outfptr, int previous, + int current, int following, > int *status) +\end{verbatim} + +The first routine copies the current HDU from the FITS file associated +with infptr and appends it to the end of the FITS file associated with +outfptr. Space may be reserved for {\tt morekeys} additional keywords +in the output header. The second routine copies any HDUs previous +to the current HDU, and/or the current HDU, and/or any HDUs following the +current HDU, depending on the value (True or False) of {\tt previous, +current}, and {\tt following}, respectively. For example, +\begin{verbatim} + fits_copy_file(infptr, outfptr, 0, 1, 1, &status); +\end{verbatim} +will copy the current HDU and any HDUs that follow it from the input +to the output file, but it will not copy any HDUs preceding the +current HDU. + + +\newpage +% =================================================================== +\subsection{Image I/O Routines} + +This section lists the more important CFITSIO routines which operate on +FITS images. + +\begin{verbatim} +_______________________________________________________________ +int fits_get_img_type(fitsfile *fptr, int *bitpix, int *status) +int fits_get_img_dim( fitsfile *fptr, int *naxis, int *status) +int fits_get_img_size(fitsfile *fptr, int maxdim, long *naxes, + int *status) +int fits_get_img_param(fitsfile *fptr, int maxdim, int *bitpix, + int *naxis, long *naxes, int *status) +\end{verbatim} + +Get information about the currently opened image HDU. The first routine +returns the datatype of the image as (defined by the {\tt BITPIX} +keyword), which can have the following symbolic constant values: +\begin{verbatim} + BYTE_IMG = 8 ( 8-bit byte pixels, 0 - 255) + SHORT_IMG = 16 (16 bit integer pixels) + LONG_IMG = 32 (32-bit integer pixels) + FLOAT_IMG = -32 (32-bit floating point pixels) + DOUBLE_IMG = -64 (64-bit floating point pixels) +\end{verbatim} + +The second and third routines return the number of dimensions in the +image (from the {\tt NAXIS} keyword), and the sizes of each dimension +(from the {\tt NAXIS1, NAXIS2}, etc. keywords). The last routine +simply combines the function of the first 3 routines. The input {\tt +maxdim} parameter in this routine gives the maximum number dimensions +that may be returned (i.e., the dimension of the {\tt naxes} +array) + +\begin{verbatim} +__________________________________________________________ +int fits_create_img(fitsfile *fptr, int bitpix, int naxis, + long *naxes, int *status) +\end{verbatim} + +Create an image HDU by writing the required keywords which define the +structure of the image. The 2nd through 4th parameters specified the +datatype, the number of dimensions, and the sizes of the dimensions. +The allowed values of the {\tt bitpix} parameter are listed above in +the description of the {\tt fits\_get\_img\_type} routine. If the FITS +file pointed to by {\tt fptr} is empty (previously created with +{\tt fits\_create\_file}) then this routine creates a primary array in +the file, otherwise a new IMAGE extension is appended to end of the +file following the other HDUs in the file. + +\begin{verbatim} +______________________________________________________________ +int fits_write_pix(fitsfile *fptr, int datatype, long *fpixel, + long nelements, void *array, int *status); + +int fits_write_pixnull(fitsfile *fptr, int datatype, long *fpixel, + long nelements, void *array, void *nulval, int *status); + +int fits_read_pix(fitsfile *fptr, int datatype, long *fpixel, + long nelements, void *nulval, void *array, + int *anynul, int *status) +\end{verbatim} + +Read or write all or part of the FITS image. There are 2 different +'write' pixel routines: The first simply writes the input array of pixels +to the FITS file. The second is similar, except that it substitutes +the appropriate null pixel value in the FITS file for any pixels +which have a value equal to {\tt *nulval} (note that this parameter +gives the address of the null pixel value, not the value itself). +Similarly, when reading an image, CFITSIO will substitute the value +given by {\tt nulval} for any undefined pixels in the image, unless +{\tt nulval = NULL}, in which case no checks will be made for undefined +pixels when reading the FITS image. + +The {\tt fpixel} parameter in these routines is an array which gives +the coordinate in each dimension of the first pixel to be read or +written, and {\tt nelements} is the total number of pixels to read or +write. {\tt array} is the address of an array which either contains +the pixel values to be written, or will hold the values of the pixels +that are read. When reading, {\tt array} must have been allocated +large enough to hold all the returned pixel values. These routines +starts at the {\tt fpixel} location and then read or write the {\tt +nelements} pixels, continuing on successive rows of the image if +necessary. For example, to write an entire 2D image, set {\tt +fpixel[0] = fpixel[1] = 1}, and {\tt nelements = NAXIS1 * NAXIS2}. Or +to read just the 10th row of the image, set {\tt fpixel[0] = 1, +fpixel[1] = 10}, and {\tt nelements = NAXIS1}. The {\tt datatype} +parameter specifies the datatype of the C {\tt array} in the program, +which need not be the same as the datatype of the FITS image itself. +If the datatypes differ then CFITSIO will convert the data as it is +read or written. The following symbolic constants are allowed for the +value of {\tt datatype}: +\begin{verbatim} + TBYTE unsigned char + TSBYTE signed char + TSHORT signed short + TUSHORT unsigned short + TINT signed int + TUINT unsigned int + TLONG signed long + TLONGLONG signed 8-byte integer + TULONG unsigned long + TFLOAT float + TDOUBLE double +\end{verbatim} + + +\begin{verbatim} +_________________________________________________________________ +int fits_write_subset(fitsfile *fptr, int datatype, long *fpixel, + long *lpixel, DTYPE *array, > int *status) + +int fits_read_subset(fitsfile *fptr, int datatype, long *fpixel, + long *lpixel, long *inc, void *nulval, void *array, + int *anynul, int *status) +\end{verbatim} + +Read or write a rectangular section of the FITS image. These are very +similar to {\tt fits\_write\_pix} and {\tt fits\_read\_pix} except that +you specify the last pixel coordinate (the upper right corner of the +section) instead of the number of pixels to be read. The read routine +also has an {\tt inc} parameter which can be used to read only every +{\tt inc-th} pixel along each dimension of the image. Normally {\tt +inc[0] = inc[1] = 1} to read every pixel in a 2D image. To read every +other pixel in the entire 2D image, set +\begin{verbatim} + fpixel[0] = fpixel[1] = 1 + lpixel[0] = {NAXIS1} + lpixel[1] = {NAXIS2} + inc[0] = inc[1] = 2 +\end{verbatim} + +Or, to read the 8th row of a 2D image, set +\begin{verbatim} + fpixel[0] = 1 + fpixel[1] = 8 + lpixel[0] = {NAXIS1} + lpixel[1] = 8 + inc[0] = inc[1] = 1 +\end{verbatim} + +\newpage +% =================================================================== +\subsection{Table I/O Routines} + +This section lists the most important CFITSIO routines which operate on +FITS tables. + +\begin{verbatim} +__________________________________________________________________________ +int fits_create_tbl(fitsfile *fptr, int tbltype, long nrows, int tfields, + char *ttype[],char *tform[], char *tunit[], char *extname, int *status) +\end{verbatim} + +Create a new table extension by writing the required keywords that +define the table structure. The required null primary array +will be created first if the file is initially completely empty. {\tt +tbltype} defines the type of table and can have values of {\tt +ASCII\_TBL or BINARY\_TBL}. Binary tables are generally preferred +because they are more efficient and support a greater range of column +datatypes than ASCII tables. + +The {\tt nrows} parameter gives the initial number of empty rows to be +allocated for the table; this should normally be set to 0. The {\tt tfields} +parameter gives the number of columns in the table (maximum = 999). +The {\tt +ttype, tform}, and {\tt tunit} parameters give the name, datatype, and +physical units of each column, and {\tt extname} gives the name for the +table (the value of the {\tt EXTNAME} keyword). +The FITS Standard recommends that only +letters, digits, and the underscore character be used in column names +with no embedded spaces. It is recommended that all the column names +in a given table be unique within the first 8 characters. + +The following table +shows the TFORM column format values that are allowed in ASCII tables +and in binary tables: +\begin{verbatim} + ASCII Table Column Format Codes + ------------------------------- + (w = column width, d = no. of decimal places to display) + Aw - character string + Iw - integer + Fw.d - fixed floating point + Ew.d - exponential floating point + Dw.d - exponential floating point + + Binary Table Column Format Codes + -------------------------------- + (r = vector length, default = 1) + rA - character string + rAw - array of strings, each of length w + rL - logical + rX - bit + rB - unsigned byte + rS - signed byte ** + rI - signed 16-bit integer + rU - unsigned 16-bit integer ** + rJ - signed 32-bit integer + rV - unsigned 32-bit integer ** + rK - 64-bit integer *** + rE - 32-bit floating point + rD - 64-bit floating point + rC - 32-bit complex pair + rM - 64-bit complex pair + + ** The S, U and V format codes are not actual legal TFORMn values. + CFITSIO substitutes the somewhat more complicated set of + keywords that are used to represent unsigned integers or + signed bytes. + + *** The 64-bit integer format is experimental and is not + officially recognized in the FITS Standard. +\end{verbatim} + +The {\tt tunit} and {\tt extname} parameters are optional and +may be set to NULL +if they are not needed. + +Note that it may be easier to create a new table by copying the +header from another existing table with {\tt fits\_copy\_header} rather +than calling this routine. + +\begin{verbatim} +_______________________________________________________________ +int fits_get_num_rows(fitsfile *fptr, long *nrows, int *status) +int fits_get_num_cols(fitsfile *fptr, int *ncols, int *status) +\end{verbatim} + +Get the number of rows or columns in the current FITS table. The +number of rows is given by the {\tt NAXIS2} keyword and the number of columns +is given by the {\tt TFIELDS} keyword in the header of the table. + +\begin{verbatim} +_______________________________________________________________ +int fits_get_colnum(fitsfile *fptr, int casesen, char *template, + int *colnum, int *status) +int fits_get_colname(fitsfile *fptr, int casesen, char *template, + char *colname, int *colnum, int *status) +\end{verbatim} + +Get the column number (starting with 1, not 0) of the column whose +name matches the specified template name. The only difference in +these 2 routines is that the 2nd one also returns the name of the +column that matched the template string. + +Normally, {\tt casesen} should +be set to {\tt CASEINSEN}, but it may be set to {\tt CASESEN} to force +the name matching to be case-sensitive. + +The input {\tt template} string gives the name of the desired column and +may include wildcard characters: a `*' matches any sequence of +characters (including zero characters), `?' matches any single +character, and `\#' matches any consecutive string of decimal digits +(0-9). If more than one column name in the table matches the template +string, then the first match is returned and the status value will be +set to {\tt COL\_NOT\_UNIQUE} as a warning that a unique match was not +found. To find the next column that matches the template, call this +routine again leaving the input status value equal to {\tt +COL\_NOT\_UNIQUE}. Repeat this process until {\tt status = +COL\_NOT\_FOUND} is returned. + +\begin{verbatim} +_______________________________________________________________ +int fits_get_coltype(fitsfile *fptr, int colnum, int *typecode, + long *repeat, long *width, int *status) + +int fits_get_eqcoltype(fitsfile *fptr, int colnum, int *typecode, + long *repeat, long *width, int *status) +\end{verbatim} + +Return the datatype, vector repeat count, and the width in bytes of a +single column element for column number {\tt colnum}. Allowed values +for the returned datatype in ASCII tables are: {\tt TSTRING, TSHORT, +TLONG, TFLOAT, and TDOUBLE}. Binary tables support these additional +types: {\tt TLOGICAL, TBIT, TBYTE, TINT32BIT, TCOMPLEX and TDBLCOMPLEX}. The +negative of the datatype code value is returned if it is a variable +length array column. + +These 2 routines are similar, except that in the case of scaled +integer columns the 2nd routine, fit\_get\_eqcoltype, returns the +'equivalent' datatype that is needed to store the scaled values, which +is not necessarily the same as the physical datatype of the unscaled values +as stored in the FITS table. For example if a '1I' column in a binary +table has TSCALn = 1 and TZEROn = 32768, then this column effectively +contains unsigned short integer values, and thus the returned value of +typecode will be TUSHORT, not TSHORT. Or, if TSCALn or TZEROn are not +integers, then the equivalent datatype will be returned as TFLOAT or +TDOUBLE, depending on the size of the integer. + +The repeat count is always 1 in ASCII tables. +The 'repeat' parameter returns the vector repeat count on the binary +table TFORMn keyword value. (ASCII table columns always have repeat += 1). The 'width' parameter returns the width in bytes of a single +column element (e.g., a '10D' binary table column will have width = +8, an ASCII table 'F12.2' column will have width = 12, and a binary +table'60A' character string column will have width = 60); Note that +this routine supports the local convention for specifying arrays of +fixed length strings within a binary table character column using +the syntax TFORM = 'rAw' where 'r' is the total number of +characters (= the width of the column) and 'w' is the width of a +unit string within the column. Thus if the column has TFORM = +'60A12' then this means that each row of the table contains +5 12-character substrings within the 60-character field, and thus +in this case this routine will return typecode = TSTRING, repeat = +60, and width = 12. The number of substings in any binary table +character string field can be calculated by (repeat/width). +A null pointer may be given for any of the output parameters that + are not needed. + +\begin{verbatim} +____________________________________________________________________________ +int fits_insert_rows(fitsfile *fptr, long firstrow, long nrows, int *status) +int fits_delete_rows(fitsfile *fptr, long firstrow, long nrows, int *status) +int fits_delete_rowrange(fitsfile *fptr, char *rangelist, int *status) +int fits_delete_rowlist(fitsfile *fptr, long *rowlist, long nrows, int *stat) +\end{verbatim} + +Insert or delete rows in a table. The blank rows are inserted +immediately following row {\tt frow}. Set {\tt frow} = 0 to insert rows +at the beginning of the table. The first 'delete' routine deletes {\tt +nrows} rows beginning with row {\tt firstrow}. The 2nd delete routine +takes an input string listing the rows or row ranges to be deleted +(e.g., '2,4-7, 9-12'). The last delete routine takes an input long +integer array that specifies each individual row to be deleted. The +row lists must be sorted in ascending order. All these routines update +the value of the {\tt NAXIS2} keyword to reflect the new number of rows +in the table. + +\begin{verbatim} +_________________________________________________________________________ +int fits_insert_col(fitsfile *fptr, int colnum, char *ttype, char *tform, + int *status) +int fits_insert_cols(fitsfile *fptr, int colnum, int ncols, char **ttype, + char **tform, int *status) + +int fits_delete_col(fitsfile *fptr, int colnum, int *status) +\end{verbatim} + +Insert or delete columns in a table. {\tt colnum} gives the position +of the column to be inserted or deleted (where the first column of the +table is at position 1). {\tt ttype} and {\tt tform} give the column +name and column format, where the allowed format codes are listed above +in the description of the {\tt fits\_create\_table} routine. The 2nd +'insert' routine inserts multiple columns, where {\tt ncols} is the +number of columns to insert, and {\tt ttype} and {\tt tform} are +arrays of string pointers in this case. + +\begin{verbatim} +____________________________________________________________________ +int fits_copy_col(fitsfile *infptr, fitsfile *outfptr, int incolnum, + int outcolnum, int create_col, int *status); +\end{verbatim} + +Copy a column from one table HDU to another. If {\tt create\_col} = TRUE (i.e., not equal to zero), +then a new column will be inserted in the output table at position +{\tt outcolumn}, otherwise the values in the existing output column will be +overwritten. + +\begin{verbatim} +__________________________________________________________________________ +int fits_write_col(fitsfile *fptr, int datatype, int colnum, long firstrow, + long firstelem, long nelements, void *array, int *status) +int fits_write_colnull(fitsfile *fptr, int datatype, int colnum, + long firstrow, long firstelem, long nelements, + void *array, void *nulval, int *status) +int fits_write_col_null(fitsfile *fptr, int colnum, long firstrow, + long firstelem, long nelements, int *status) + +int fits_read_col(fitsfile *fptr, int datatype, int colnum, long firstrow, + long firstelem, long nelements, void *nulval, void *array, + int *anynul, int *status) + +\end{verbatim} + +Write or read elements in column number {\tt colnum}, starting with row +{\tt firstsrow} and element {\tt firstelem} (if it is a vector +column). {\tt firstelem} is ignored if it is a scalar column. The {\tt +nelements} number of elements are read or written continuing on +successive rows of the table if necessary. {\tt array} is the address +of an array which either contains the values to be written, or will +hold the returned values that are read. When reading, {\tt array} must +have been allocated large enough to hold all the returned values. + +There are 3 different 'write' column routines: The first simply writes +the input array into the column. The second is similar, except that it +substitutes the appropriate null pixel value in the column for any +input array values which are equal to {\tt *nulval} (note that this +parameter gives the address of the null pixel value, not the value +itself). The third write routine sets the specified table elements +to a null value. New rows will be automatical added to the table +if the write operation extends beyond the current size of the table. + +When reading a column, CFITSIO will substitute the value given by {\tt +nulval} for any undefined elements in the FITS column, unless {\tt +nulval} or {\tt *nulval = NULL}, in which case no checks will be made +for undefined values when reading the column. + +{\tt datatype} specifies the datatype of the C {\tt array} in the program, +which need not be the same as the intrinsic datatype of the column in +the FITS table. The following symbolic constants are allowed for the +value of {\tt datatype}: + +\begin{verbatim} + TSTRING array of character string pointers + TBYTE unsigned char + TSHORT signed short + TUSHORT unsigned short + TINT signed int + TUINT unsigned int + TLONG signed long + TLONGLONG signed 8-byte integer + TULONG unsigned long + TFLOAT float + TDOUBLE double +\end{verbatim} + +Note that {\tt TSTRING} corresponds to the C {\tt +char**} datatype, i.e., a pointer to an array of pointers to an array +of characters. + +Any column, regardless of it's intrinsic datatype, may be read as a +{\tt TSTRING} character string. The display format of the returned +strings will be determined by the {\tt TDISPn} keyword, if it exists, +otherwise a default format will be used depending on the datatype of +the column. The {\tt tablist} example utility program (available from +the CFITSIO web site) uses this feature to display all the values in a +FITS table. + +\begin{verbatim} +_____________________________________________________________________ +int fits_select_rows(fitsfile *infptr, fitsfile *outfptr, char *expr, + int *status) +int fits_calculator(fitsfile *infptr, char *expr, fitsfile *outfptr, + char *colname, char *tform, int *status) +\end{verbatim} + +These are 2 of the most powerful routines in the CFITSIO library. (See +the full CFITSIO Reference Guide for a description of several related +routines). These routines can perform complicated transformations on +tables based on an input arithmetic expression which is evaluated for +each row of the table. The first routine will select or copy rows of +the table for which the expression evaluates to TRUE (i.e., not equal +to zero). The second routine writes the value of the expression to a +column in the output table. Rather than supplying the expression +directly to these routines, the expression may also be written to a +text file (continued over multiple lines if necessary) and the name of +the file, prepended with a '@' character, may be supplied as the value +of the 'expr' parameter (e.g. '@filename.txt'). + +The arithmetic expression may be a function of any column or keyword in +the input table as shown in these examples: + +\begin{verbatim} +Row Selection Expressions: + counts > 0 uses COUNTS column value + sqrt( X**2 + Y**2) < 10. uses X and Y column values + (X > 10) || (X < -10) && (Y == 0) used 'or' and 'and' operators + gtifilter() filter on Good Time Intervals + regfilter("myregion.reg") filter using a region file + @select.txt reads expression from a text file +Calculator Expressions: + #row % 10 modulus of the row number + counts/#exposure Fn of COUNTS column and EXPOSURE keyword + dec < 85 ? cos(dec * #deg) : 0 Conditional expression: evaluates to + cos(dec) if dec < 85, else 0 + (count{-1}+count+count{+1})/3. running mean of the count values in the + previous, current, and next rows + max(0, min(X, 1000)) returns a value between 0 - 1000 + @calc.txt reads expression from a text file +\end{verbatim} + +Most standard mathematical operators and functions are supported. If +the expression includes the name of a column, than the value in the +current row of the table will be used when evaluating the expression on +each row. An offset to an adjacent row can be specified by including +the offset value in curly brackets after the column name as shown in +one of the examples. Keyword values can be included in the expression +by preceding the keyword name with a `\#' sign. See Section 5 of this +document for more discussion of the expression syntax. + +{\tt gtifilter} is a special function which tests whether the {\tt +TIME} column value in the input table falls within one or more Good +Time Intervals. By default, this function looks for a 'GTI' extension +in the same file as the input table. The 'GTI' table contains {\tt START} +and {\tt STOP} columns which define the range of +each good time interval. See section 5.4.3 for more details. + +{\tt regfilter} is another special function which selects rows based on +whether the spatial position associated with each row is located within +in a specified region of the sky. By default, the {\tt X} and {\tt Y} +columns in the input table are assumed to give the position of each row. +The spatial region is defined in an ASCII text file whose name is given +as the argument to the {\tt regfilter} function. See section 5.4.4 for +more details. + +The {\tt infptr} and {\tt outfptr} parameters in these routines may +point to the same table or to different tables. In {\tt +fits\_select\_rows}, if the input and output tables are the same then +the rows that do not satisfy the selection expression will be deleted +from the table. Otherwise, if the output table is different from the +input table then the selected rows will be copied from the input table +to the output table. + +The output column in {\tt fits\_calculator} may or may not already +exist. If it exists then the calculated values will be written to that +column, overwriting the existing values. If the column doesn't exist +then the new column will be appended to the output table. The {\tt tform} +parameter can be used to specify the datatype of the new column (e.g., +the {\tt TFORM} keyword value as in {\tt '1E', or '1J'}). If {\tt +tform} = NULL then a default datatype will be used, depending on the +expression. + +\begin{verbatim} +_____________________________________________________________________ +int fits_read_tblbytes(fitsfile *fptr, long firstrow, long firstchar, + long nchars, unsigned char *array, int *status) +int fits_write_tblbytes (fitsfile *fptr, long firstrow, long firstchar, + long nchars, unsigned char *array, int *status) +\end{verbatim} + +These 2 routines provide low-level access to tables and are mainly +useful as an efficient way to copy rows of a table from one file to +another. These routines simply read or write the specified number of +consecutive characters (bytes) in a table, without regard for column +boundaries. For example, to read or write the first row of a table, +set {\tt firstrow = 1, firstchar = 1}, and {\tt nchars = NAXIS1} where +the length of a row is given by the value of the {\tt NAXIS1} header +keyword. When reading a table, {\tt array} must have been declared at +least {\tt nchars} bytes long to hold the returned string of bytes. + +\newpage +% =================================================================== +\subsection{Header Keyword I/O Routines} +\nopagebreak +The following routines read and write header keywords in the current HDU. +\nopagebreak + +\begin{verbatim} +____________________________________________________________________ +int fits_get_hdrspace(fitsfile *fptr, int *keysexist, int *morekeys, + int *status) +\end{verbatim} +\nopagebreak +Return the number of existing keywords (not counting the mandatory END +keyword) and the amount of empty space currently available for more +keywords. The {\tt morekeys} parameter may be set to NULL if it's value is +not needed. + +\begin{verbatim} +___________________________________________________________________________ +int fits_read_record(fitsfile *fptr, int keynum, char *record, int *status) +int fits_read_card(fitsfile *fptr, char *keyname, char *record, int *status) +int fits_read_key(fitsfile *fptr, int datatype, char *keyname, + void *value, char *comment, int *status) + +int fits_find_nextkey(fitsfile *fptr, char **inclist, int ninc, + char **exclist, int nexc, char *card, int *status) + +int fits_read_key_unit(fitsfile *fptr, char *keyname, char *unit, + int *status) +\end{verbatim} + +These routines all read a header record in the current HDU. The first +routine reads keyword number {\tt keynum} (where the first keyword is +at position 1). This routine is most commonly used when sequentially +reading every record in the header from beginning to end. The 2nd and +3rd routines read the named keyword and return either the whole +record, or the keyword value and comment string. In each case any +non-significant trailing blank characters in the strings are truncated. + +Wild card characters (*, ?, and \#) may be used when specifying the name +of the keyword to be read, in which case the first matching keyword is +returned. + +The {\tt datatype} parameter specifies the C datatype of the returned +keyword value and can have one of the following symbolic constant +values: {\tt TSTRING, TLOGICAL} (== int), {\tt TBYTE}, {\tt TSHORT}, +{\tt TUSHORT}, {\tt TINT}, {\tt TUINT}, {\tt TLONG}, {\tt TULONG}, {\tt +TFLOAT}, {\tt TDOUBLE}, {\tt TCOMPLEX}, and {\tt TDBLCOMPLEX}. Data +type conversion will be performed for numeric values if the intrinsic +FITS keyword value does not have the same datatype. The {\tt comment} +parameter may be set equal to NULL if the comment string is not +needed. + +The 4th routine provides an easy way to find all the keywords in the +header that match one of the name templates in {\tt inclist} and do not +match any of the name templates in {\tt exclist}. {\tt ninc} and {\tt +nexc} are the number of template strings in {\tt inclist} and {\tt +exclist}, respectively. Wild cards (*, ?, and \#) may be used in the +templates to match multiple keywords. Each time this routine is called +it returns the next matching 80-byte keyword record. It returns status += {\tt KEY\_NO\_EXIST} if there are no more matches. + +The 5th routine returns the keyword value units string, if any. +The units are recorded at the beginning of the keyword comment field +enclosed in square brackets. +\begin{verbatim} +_______________________________________________________________ +int fits_write_key(fitsfile *fptr, int datatype, char *keyname, + void *value, char *comment, int *status) +int fits_update_key(fitsfile *fptr, int datatype, char *keyname, + void *value, char *comment, int *status) +int fits_write_record(fitsfile *fptr, char *card, int *status) + +int fits_modify_comment(fitsfile *fptr, char *keyname, char *comment, + int *status) +int fits_write_key_unit(fitsfile *fptr, char *keyname, char *unit, + int *status) + +\end{verbatim} + +Write or modify a keyword in the header of the current HDU. The +first routine appends the new keyword to the end of the header, whereas +the second routine will update the value and comment fields of the +keyword if it already exists, otherwise it behaves like the first +routine and appends the new keyword. Note that {\tt value} gives the +address to the value and not the value itself. The {\tt datatype} +parameter specifies the C datatype of the keyword value and may have +any of the values listed in the description of the keyword reading +routines, above. A NULL may be entered for the comment parameter, in +which case the keyword comment field will be unmodified or left +blank. + +The third routine is more primitive and simply writes the 80-character +{\tt card} record to the header. It is the programmer's responsibility +in this case to ensure that the record conforms to all the FITS format +requirements for a header record. + +The fourth routine modifies the comment string in an existing keyword, +and the last routine writes or updates the keyword units string for an +existing keyword. (The units are recorded at the beginning of the +keyword comment field enclosed in square brackets). + +\begin{verbatim} +___________________________________________________________________ +int fits_write_comment(fitsfile *fptr, char *comment, int *status) +int fits_write_history(fitsfile *fptr, char *history, int *status) +int fits_write_date(fitsfile *fptr, int *status) +\end{verbatim} + +Write a {\tt COMMENT, HISTORY}, or {\tt DATE} keyword to the current +header. The {\tt COMMENT} keyword is typically used to write a comment +about the file or the data. The {\tt HISTORY} keyword is typically +used to provide information about the history of the processing +procedures that have been applied to the data. The {\tt comment} or +{\tt history} string will be continued over multiple keywords if it is +more than 70 characters long. + +The {\tt DATE} keyword is used to record the date and time that the +FITS file was created. Note that this file creation date is usually +different from the date of the observation which obtained the data in +the FITS file. The {\tt DATE} keyword value is a character string in +'yyyy-mm-ddThh:mm:ss' format. If a {\tt DATE} keyword already exists in +the header, then this routine will update the value with the current +system date. + +\begin{verbatim} +___________________________________________________________________ +int fits_delete_record(fitsfile *fptr, int keynum, int *status) +int fits_delete_key(fitsfile *fptr, char *keyname, int *status) +\end{verbatim} + +Delete a keyword record. The first routine deletes a keyword at a +specified position (the first keyword is at position 1, not 0), +whereas the second routine deletes the named keyword. + +\begin{verbatim} +_______________________________________________________________________ +int fits_copy_header(fitsfile *infptr, fitsfile *outfptr, int *status) +\end{verbatim} + +Copy all the header keywords from the current HDU associated with +infptr to the current HDU associated with outfptr. If the current +output HDU is not empty, then a new HDU will be appended to the output +file. The output HDU will then have the identical structure as the +input HDU, but will contain no data. + +\newpage +% =================================================================== +\subsection{Utility Routines} + +This section lists the most important CFITSIO general utility routines. + +\begin{verbatim} +___________________________________________________________________ +int fits_write_chksum( fitsfile *fptr, int *status) +int fits_verify_chksum(fitsfile *fptr, int *dataok, int *hduok, int *status) +\end{verbatim} + +These routines compute or validate the checksums for the currenrt +HDU. The {\tt DATASUM} keyword is used to store the numerical value of +the 32-bit, 1's complement checksum for the data unit alone. The {\tt +CHECKSUM} keyword is used to store the ASCII encoded COMPLEMENT of the +checksum for the entire HDU. Storing the complement, rather than the +actual checksum, forces the checksum for the whole HDU to equal zero. +If the file has been modified since the checksums were computed, then +the HDU checksum will usually not equal zero. + +The returned {\tt dataok} and {\tt hduok} parameters will have a value += 1 if the data or HDU is verified correctly, a value = 0 if the +{\tt DATASUM} or {\tt CHECKSUM} keyword is not present, or value = -1 if the +computed checksum is not correct. + + +\begin{verbatim} +___________________________________________________________________ +int fits_parse_value(char *card, char *value, char *comment, int *status) +int fits_get_keytype(char *value, char *dtype, int *status) +int fits_get_keyclass(char *card) +int fits_parse_template(char *template, char *card, int *keytype, int *status) + +\end{verbatim} + +{\tt fits\_parse\_value} parses the input 80-chararacter header keyword record, returning +the value (as a literal character string) and comment strings. If the +keyword has no value (columns 9-10 not equal to '= '), then a null +value string is returned and the comment string is set equal to column +9 - 80 of the input string. + +{\tt fits\_get\_keytype} parses the keyword value string to determine its +datatype. {\tt dtype} returns with a value of 'C', 'L', 'I', 'F' or +'X', for character string, logical, integer, floating point, or +complex, respectively. + +{\tt fits\_get\_keyclass} returns a classification code that indicates +the classification type of the input keyword record (e.g., a required +structural keyword, a TDIM keyword, a WCS keyword, a comment keyword, +etc. See the CFITSIO Reference Guide for a list of the different +classification codes. + +{\tt fits\_parse\_template} takes an input free format keyword template +string and returns a formatted 80*char record that satisfies all the +FITS requirements for a header keyword record. The template should +generally contain 3 tokens: the keyword name, the keyword value, and +the keyword comment string. The returned {\tt keytype} parameter +indicates whether the keyword is a COMMENT keyword or not. See the +CFITSIO Reference Guide for more details. + +\newpage +% =================================================================== +\section{CFITSIO File Names and Filters} + +\subsection{Creating New Files} + +When creating a new output file on magnetic disk with {\tt +fits\_create\_file} the following features are supported. +\begin{itemize} +\item Overwriting, or 'Clobbering' an Existing File + +If the filename is preceded by an exclamation +point (!) then if that file already exists it will be deleted prior to +creating the new FITS file. Otherwise if there is an existing file +with the same name, CFITSIO will not overwrite the existing file and +will return an error status code. Note that the exclamation point is +a special UNIX character, so if it is used on the command line rather +than entered at a task prompt, it must be preceded by a backslash to +force the UNIX shell to pass it verbatim to the application program. + +\item Compressed Output Files + +If the output disk file name ends with the suffix '.gz', then CFITSIO +will compress the file using the gzip compression algorithm before +writing it to disk. This can reduce the amount of disk space used by +the file. Note that this feature requires that the uncompressed file +be constructed in memory before it is compressed and written to disk, +so it can fail if there is insufficient available memory. + +One can also specify that any images written to the output file should +be compressed using the newly developed `tile-compression' algorithm by +appending `[compress]' to the name of the disk file (as in +{\tt myfile.fits[compress]}). Refer to the CFITSIO User's Reference Guide +for more information about this new image compression format. + +\item Using a Template to Create a New FITS File + +The structure of any new FITS file that is to be created may be defined +in an ASCII template file. If the name of the template file is +appended to the name of the FITS file itself, enclosed in parenthesis +(e.g., {\tt 'newfile.fits(template.txt)'}) then CFITSIO will create a +FITS file with that structure before opening it for the application to +use. The template file basically defines the dimensions and data type +of the primary array and any IMAGE extensions, and the names and data +types of the columns in any ASCII or binary table extensions. The +template file can also be used to define any optional keywords that +should be written in any of the HDU headers. The image pixel values +and table entry values are all initialized to zero. The application +program can then write actual data into the HDUs. See the CFITSIO +Reference Guide for for a complete description of the template file +syntax. + +\item Creating a Temporary Scratch File in Memory + +It is sometimes useful to create a temporary output file when testing +an application program. If the name of the file to be created is +specified as {\tt mem:} then CFITSIO will create the file in +memory where it will persist only until the program closes the file. +Use of this {\tt mem:} output file usually enables the program to run +faster, and of course the output file does not use up any disk space. + + +\end{itemize} + +\subsection{Opening Existing Files} + +When opening a file with {\tt fits\_open\_file}, CFITSIO can read a +variety of different input file formats and is not restricted to only +reading FITS format files from magnetic disk. The following types of +input files are all supported: + +\begin{itemize} +\item FITS files compressed with {\tt zip, gzip} or {\tt compress} + +If CFITSIO cannot find the specified file to open it will automatically +look for a file with the same rootname but with a {\tt .gz, .zip}, or +{\tt .Z} extension. If it finds such a compressed file, it will +allocate a block of memory and uncompress the file into that memory +space. The application program will then transparently open this +virtual FITS file in memory. Compressed +files can only be opened with 'readonly', not 'readwrite' file access. + +\item FITS files on the internet, using {\tt ftp} or {\tt http} URLs + +Simply provide the full URL as the name of the file that you want to +open. For example,\linebreak {\tt +ftp://legacy.gsfc.nasa.gov/software/fitsio/c/testprog.std}\linebreak +will open the CFITSIO test FITS file that is located on the {\tt +legacy} machine. These files can only be opened with 'readonly' file +access. + +\item FITS files on {\tt stdin} or {\tt stdout} file streams + +If the name of the file to be opened is {\tt 'stdin'} or {\tt '-'} (a +single dash character) then CFITSIO will read the file from the +standard input stream. Similarly, if the output file name is {\tt +'stdout'} or {\tt '-'}, then the file will be written to the standard +output stream. In addition, if the output filename is {\tt +'stdout.gz'} or {\tt '-.gz'} then it will be gzip compressed before +being written to stdout. This mechanism can be used to pipe FITS files +from one task to another without having to write an intermediary FITS +file on magnetic disk. + +\item FITS files that exist only in memory, or shared memory. + +In some applications, such as real time data acquisition, you may want +to have one process write a FITS file into a certain section of +computer memory, and then be able to open that file in memory with +another process. There is a specialized CFITSIO open routine called +{\tt fits\_open\_memfile} that can be used for this purpose. See the +``CFITSIO User's Reference Guide'' for more details. + +\item IRAF format images (with {\tt .imh} file extensions) + +CFITSIO supports reading IRAF format images by converting them on the +fly into FITS images in memory. The application program then reads +this virtual FITS format image in memory. There is currently no +support for writing IRAF format images, or for reading or writing IRAF +tables. + +\item Image arrays in raw binary format + +If the input file is a raw binary data array, then CFITSIO will convert +it on the fly into a virtual FITS image with the basic set of required +header keywords before it is opened by the application program. In +this case the data type and dimensions of the image must be specified +in square brackets following the filename (e.g. {\tt +rawfile.dat[ib512,512]}). The first character inside the brackets +defines the datatype of the array: + +\begin{verbatim} + b 8-bit unsigned byte + i 16-bit signed integer + u 16-bit unsigned integer + j 32-bit signed integer + r or f 32-bit floating point + d 64-bit floating point +\end{verbatim} +An optional second character specifies the byte order of the array +values: b or B indicates big endian (as in FITS files and the native +format of SUN UNIX workstations and Mac PCs) and l or L indicates +little endian (native format of DEC OSF workstations and IBM PCs). If +this character is omitted then the array is assumed to have the native +byte order of the local machine. These datatype characters are then +followed by a series of one or more integer values separated by commas +which define the size of each dimension of the raw array. Arrays with +up to 5 dimensions are currently supported. + +Finally, a byte offset to the position of the first pixel in the data +file may be specified by separating it with a ':' from the last +dimension value. If omitted, it is assumed that the offset = 0. This +parameter may be used to skip over any header information in the file +that precedes the binary data. Further examples: + +\begin{verbatim} + raw.dat[b10000] 1-dimensional 10000 pixel byte array + raw.dat[rb400,400,12] 3-dimensional floating point big-endian array + img.fits[ib512,512:2880] reads the 512 x 512 short integer array in a + FITS file, skipping over the 2880 byte header +\end{verbatim} + +\end{itemize} +\newpage + +\subsection{Image Filtering} + +\subsubsection{Extracting a subsection of an image} + +When specifying the name of an image to be opened, you can select a +rectangular subsection of the image to be extracted and opened by the +application program. The application program then opens a virtual +image that only contains the pixels within the specified subsection. +To do this, specify the the range of pixels (start:end) along each axis +to be extracted from the original image enclosed in square brackets. +You can also specify an optional pixel increment (start:end:step) for +each axis of the input image. A pixel step = 1 will be assumed if it +is not specified. If the starting pixel is larger then the end pixel, +then the image will be flipped (producing a mirror image) along that +dimension. An asterisk, '*', may be used to specify the entire range +of an axis, and '-*' will flip the entire axis. In the following +examples, assume that {\tt myfile.fits} contains a 512 x 512 pixel 2D +image. + +\begin{verbatim} + myfile.fits[201:210, 251:260] - opens a 10 x 10 pixel subimage. + + myfile.fits[*, 512:257] - opens a 512 x 256 image consisting of + all the columns in the input image, but only rows 257 + through 512. The image will be flipped along the Y axis + since the starting row is greater than the ending + row. + + myfile.fits[*:2, 512:257:2] - creates a 256 x 128 pixel image. + Similar to the previous example, but only every other row + and column is read from the input image. + + myfile.fits[-*, *] - creates an image containing all the rows and + columns in the input image, but flips it along the X + axis. +\end{verbatim} + +If the array to be opened is in an Image extension, and not in the +primary array of the file, then you need to specify the extension +name or number in square brackets before giving the subsection range, +as in {\tt myfile.fits[1][-*, *]} to read the image in the +first extension in the file. + +\subsubsection{Create an Image by Binning Table Columns} + +You can also create and open a virtual image by binning the values in a +pair of columns of a FITS table (in other words, create a 2-D histogram +of the values in the 2 columns). This technique is often used in X-ray +astronomy where each detected X-ray photon during an observation is +recorded in a FITS table. There are typically 2 columns in the table +called {\tt X} and {\tt Y} which record the pixel location of that +event in a virtual 2D image. To create an image from this table, one +just scans the X and Y columns and counts up how many photons were +recorded in each pixel of the image. When table binning is specified, +CFITSIO creates a temporary FITS primary array in memory by computing +the histogram of the values in the specified columns. After the +histogram is computed the original FITS file containing the table is +closed and the temporary FITS primary array is opened and passed to the +application program. Thus, the application program never sees the +original FITS table and only sees the image in the new temporary file +(which has no extensions). + +The table binning specifier is enclosed in square brackets following +the root filename and table extension name or number and begins with +the keyword 'bin', as in: \newline +{\tt 'myfile.fits[events][bin (X,Y)]'}. In +this case, the X and Y columns in the 'events' table extension are +binned up to create the image. The size of the image is usually +determined by the {\tt TLMINn} and {\tt TLMAXn} header keywords which +give the minimum and maximum allowed pixel values in the columns. For +instance if {\tt TLMINn = 1} and {\tt TLMAXn = 4096} for both columns, this would +generate a 4096 x 4096 pixel image by default. This is rather large, +so you can also specify a pixel binning factor to reduce the image +size. For example specifying , {\tt '[bin (X,Y) = 16]'} will use a +binning factor of 16, which will produce a 256 x 256 pixel image in the +previous example. + +If the TLMIN and TLMAX keywords don't exist, or you want to override +their values, you can specify the image range and binning factor +directly, as in {\tt '[bin X = 1:4096:16, Y=1:4096:16]'}. You can also +specify the datatype of the created image by appending a b, i, j, r, or +d (for 8-bit byte, 16-bit integers, 32-bit integer, 32-bit floating +points, or 64-bit double precision floating point, respectively) to +the 'bin' keyword (e.g. {\tt '[binr (X,Y)]'} creates a floating point +image). If the datatype is not specified then a 32-bit integer image +will be created by default. + +If the column name is not specified, then CFITSIO will first try to use +the 'preferred column' as specified by the CPREF keyword if it exists +(e.g., 'CPREF = 'DETX,DETY'), otherwise column names 'X', 'Y' will be +assumed for the 2 axes. + +Note that this binning specifier is not restricted to only 2D images +and can be used to create 1D, 3D, or 4D images as well. It is also +possible to specify a weighting factor that is applied during the +binning. Please refer to the ``CFITSIO User's Reference Guide'' for +more details on these advanced features. +\newpage + +\subsection{Table Filtering} + +\subsubsection{Column and Keyword Filtering} + +The column or keyword filtering specifier is used to modify the +column structure and/or the header keywords in the HDU that was +selected with the previous HDU location specifier. It can +be used to perform the following types of operations. + +\begin{itemize} +\item +Append a new column to a table by giving the column name, optionally +followed by the datatype in parentheses, followed by an equals sign and +the arithmetic expression to be used to compute the value. The +datatype is specified using the same syntax that is allowed for the +value of the FITS TFORMn keyword (e.g., 'I', 'J', 'E', 'D', etc. for +binary tables, and 'I8', F12.3', 'E20.12', etc. for ASCII tables). If +the datatype is not specified then a default datatype will be chosen +depending on the expression. + +\item +Create a new header keyword by giving the keyword name, preceded by a +pound sign '\#', followed by an equals sign and an arithmetic +expression for the value of the keyword. The expression may be a +function of other header keyword values. The comment string for the +keyword may be specified in parentheses immediately following the +keyword name. + +\item +Overwrite the values in an existing column or keyword by giving the +name followed by an equals sign and an arithmetic expression. + +\item +Select a set of columns to be included in the filtered file by listing +the column names separated with semi-colons. Wild card characters may +be used in the column names to match multiple columns. Any other +columns in the input table will not appear in the filtered file. + +\item +Delete a column or keyword by listing the name preceded by a minus sign +or an exclamation mark (!) + +\item +Rename an existing column or keyword with the syntax 'NewName == +OldName'. + +\end{itemize} + +The column filtering specifier is enclosed in square brackets and +begins with the string 'col'. Multiple operations can be performed +by separating them with semi-colons. For complex or commonly used +operations, you can write the column filter to a text file, and then +use it by giving the name of the text file, preceded by a '@' +character. + +Some examples: + +\begin{verbatim} + [col PI=PHA * 1.1 + 0.2] - creates new PI column from PHA values + + [col rate = counts/exposure] - creates or overwrites the rate column by + dividing the counts column by the + EXPOSURE keyword value. + + [col TIME; X; Y] - only the listed columns will appear + in the filtered file + + [col Time;*raw] - include the Time column and any other + columns whose name ends with 'raw'. + + [col -TIME; Good == STATUS] - deletes the TIME column and + renames the STATUS column to GOOD + + [col @colfilt.txt] - uses the filtering expression in + the colfilt.txt text file +\end{verbatim} + +The original file is not changed by this filtering operation, and +instead the modifications are made on a temporary copy of the input +FITS file (usually in memory), which includes a copy of all the other +HDUs in the input file. The original input file is closed and the +application program opens the filtered copy of the file. + +\subsubsection{Row Filtering} + +The row filter is used to select a subset of the rows from a table +based on a boolean expression. A temporary new FITS file is created on +the fly (usually in memory) which contains only those rows for which +the row filter expression evaluates to true (i.e., not equal to zero). +The primary array and any other extensions in the input file are also +copied to the temporary file. The original FITS file is closed and the +new temporary file is then opened by the application program. + +The row filter expression is enclosed in square brackets following the +file name and extension name. For example, {\tt +'file.fits[events][GRADE==50]'} selects only those rows in the EVENTS +table where the GRADE column value is equal to 50). + +The row filtering expression can be an arbitrarily complex series of +operations performed on constants, keyword values, and column data +taken from the specified FITS TABLE extension. The expression +also can be written into a text file and then used by giving the +filename preceded by a '@' character, as in +{\tt '[@rowfilt.txt]'}. + +Keyword and column data are referenced by name. Any string of +characters not surrounded by quotes (ie, a constant string) or +followed by an open parentheses (ie, a function name) will be +initially interpreted as a column name and its contents for the +current row inserted into the expression. If no such column exists, +a keyword of that name will be searched for and its value used, if +found. To force the name to be interpreted as a keyword (in case +there is both a column and keyword with the same name), precede the +keyword name with a single pound sign, '\#', as in {\tt \#NAXIS2}. Due to +the generalities of FITS column and keyword names, if the column or +keyword name contains a space or a character which might appear as +an arithmetic term then inclose the name in '\$' characters as in +{\tt \$MAX PHA\$} or {\tt \#\$MAX-PHA\$}. The names are case insensitive. + +To access a table entry in a row other than the current one, follow +the column's name with a row offset within curly braces. For +example, {\tt'PHA\{-3\}'} will evaluate to the value of column PHA, 3 rows +above the row currently being processed. One cannot specify an +absolute row number, only a relative offset. Rows that fall outside +the table will be treated as undefined, or NULLs. + +Boolean operators can be used in the expression in either their +Fortran or C forms. The following boolean operators are available: + +\begin{verbatim} + "equal" .eq. .EQ. == "not equal" .ne. .NE. != + "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< + "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => + "or" .or. .OR. || "and" .and. .AND. && + "negation" .not. .NOT. ! "approx. equal(1e-7)" ~ +\end{verbatim} + +Note that the exclamation point, '!', is a special UNIX character, so +if it is used on the command line rather than entered at a task +prompt, it must be preceded by a backslash to force the UNIX shell to +ignore it. + +The expression may also include arithmetic operators and functions. +Trigonometric functions use radians, not degrees. The following +arithmetic operators and functions can be used in the expression +(function names are case insensitive): + + +\begin{verbatim} + "addition" + "subtraction" - + "multiplication" * "division" / + "negation" - "exponentiation" ** ^ + "absolute value" abs(x) "cosine" cos(x) + "sine" sin(x) "tangent" tan(x) + "arc cosine" arccos(x) "arc sine" arcsin(x) + "arc tangent" arctan(x) "arc tangent" arctan2(x,y) + "exponential" exp(x) "square root" sqrt(x) + "natural log" log(x) "common log" log10(x) + "modulus" i % j "random # [0.0,1.0)" random() + "minimum" min(x,y) "maximum" max(x,y) + "if-then-else" b?x:y +\end{verbatim} + + +The following type casting operators are available, where the +inclosing parentheses are required and taken from the C language +usage. Also, the integer to real casts values to double precision: + +\begin{verbatim} + "real to integer" (int) x (INT) x + "integer to real" (float) i (FLOAT) i +\end{verbatim} + + +Several constants are built in for use in numerical +expressions: + + +\begin{verbatim} + #pi 3.1415... #e 2.7182... + #deg #pi/180 #row current row number + #null undefined value #snull undefined string +\end{verbatim} + +A string constant must be enclosed in quotes as in 'Crab'. The +"null" constants are useful for conditionally setting table values to +a NULL, or undefined, value (For example, {\tt "col1==-99 ? \#NULL : +col1"}). + +There is also a function for testing if two values are close to +each other, i.e., if they are "near" each other to within a user +specified tolerance. The arguments, {\tt value\_1} and {\tt value\_2} can be +integer or real and represent the two values who's proximity is +being tested to be within the specified tolerance, also an integer +or real: + +\begin{verbatim} + near(value_1, value_2, tolerance) +\end{verbatim} + +When a NULL, or undefined, value is encountered in the FITS table, +the expression will evaluate to NULL unless the undefined value is +not actually required for evaluation, e.g. "TRUE .or. NULL" +evaluates to TRUE. The following two functions allow some NULL +detection and handling: + +\begin{verbatim} + ISNULL(x) + DEFNULL(x,y) +\end{verbatim} + +The former returns a boolean value of TRUE if the argument x is +NULL. The later "defines" a value to be substituted for NULL +values; it returns the value of x if x is not NULL, otherwise it +returns the value of y. + +Bit masks can be used to select out rows from bit columns ({\tt TFORMn = +\#X}) in FITS files. To represent the mask, binary, octal, and hex +formats are allowed: + +\begin{verbatim} + binary: b0110xx1010000101xxxx0001 + octal: o720x1 -> (b111010000xxx001) + hex: h0FxD -> (b00001111xxxx1101) +\end{verbatim} + +In all the representations, an x or X is allowed in the mask as a +wild card. Note that the x represents a different number of wild +card bits in each representation. All representations are case +insensitive. + +To construct the boolean expression using the mask as the boolean +equal operator described above on a bit table column. For example, +if you had a 7 bit column named flags in a FITS table and wanted +all rows having the bit pattern 0010011, the selection expression +would be: + + +\begin{verbatim} + flags == b0010011 + or + flags .eq. b10011 +\end{verbatim} + +It is also possible to test if a range of bits is less than, less +than equal, greater than and greater than equal to a particular +boolean value: + + +\begin{verbatim} + flags <= bxxx010xx + flags .gt. bxxx100xx + flags .le. b1xxxxxxx +\end{verbatim} + +Notice the use of the x bit value to limit the range of bits being +compared. + +It is not necessary to specify the leading (most significant) zero +(0) bits in the mask, as shown in the second expression above. + +Bit wise AND, OR and NOT operations are also possible on two or +more bit fields using the '\&'(AND), '$|$'(OR), and the '!'(NOT) +operators. All of these operators result in a bit field which can +then be used with the equal operator. For example: + + +\begin{verbatim} + (!flags) == b1101100 + (flags & b1000001) == bx000001 +\end{verbatim} + +Bit fields can be appended as well using the '+' operator. Strings +can be concatenated this way, too. + +\subsubsection{Good Time Interval Filtering} + + A common filtering method involves selecting rows which have a time + value which lies within what is called a Good Time Interval or GTI. + The time intervals are defined in a separate FITS table extension + which contains 2 columns giving the start and stop time of each + good interval. The filtering operation accepts only those rows of + the input table which have an associated time which falls within + one of the time intervals defined in the GTI extension. A high + level function, gtifilter(a,b,c,d), is available which evaluates + each row of the input table and returns TRUE or FALSE depending + whether the row is inside or outside the good time interval. The + syntax is + +\begin{verbatim} + gtifilter( [ "gtifile" [, expr [, "STARTCOL", "STOPCOL" ] ] ] ) +\end{verbatim} + where each "[]" demarks optional parameters. Note that the quotes + around the gtifile and START/STOP column are required. Either single + or double quote characters may be used. The gtifile, + if specified, can be blank ("") which will mean to use the first + extension with the name "*GTI*" in the current file, a plain + extension specifier (eg, "+2", "[2]", or "[STDGTI]") which will be + used to select an extension in the current file, or a regular + filename with or without an extension specifier which in the latter + case will mean to use the first extension with an extension name + "*GTI*". Expr can be any arithmetic expression, including simply + the time column name. A vector time expression will produce a + vector boolean result. STARTCOL and STOPCOL are the names of the + START/STOP columns in the GTI extension. If one of them is + specified, they both must be. + + In its simplest form, no parameters need to be provided -- default + values will be used. The expression {\tt "gtifilter()"} is equivalent to + +\begin{verbatim} + gtifilter( "", TIME, "*START*", "*STOP*" ) +\end{verbatim} + This will search the current file for a GTI extension, filter the + TIME column in the current table, using START/STOP times taken from + columns in the GTI extension with names containing the strings + "START" and "STOP". The wildcards ('*') allow slight variations in + naming conventions such as "TSTART" or "STARTTIME". The same + default values apply for unspecified parameters when the first one + or two parameters are specified. The function automatically + searches for TIMEZERO/I/F keywords in the current and GTI + extensions, applying a relative time offset, if necessary. + +\subsubsection{Spatial Region Filtering} + + Another common filtering method selects rows based on whether the + spatial position associated with each row is located within a given + 2-dimensional region. The syntax for this high-level filter is + +\begin{verbatim} + regfilter( "regfilename" [ , Xexpr, Yexpr [ , "wcs cols" ] ] ) +\end{verbatim} + where each "[ ]" demarks optional parameters. The region file name + is required and must be enclosed in quotes. The remaining + parameters are optional. The region file is an ASCII text file + which contains a list of one or more geometric shapes (circle, + ellipse, box, etc.) which defines a region on the celestial sphere + or an area within a particular 2D image. The region file is + typically generated using an image display program such as fv/POW + (distribute by the HEASARC), or ds9 (distributed by the Smithsonian + Astrophysical Observatory). Users should refer to the documentation + provided with these programs for more details on the syntax used in + the region files. + + In its simpliest form, (e.g., {\tt regfilter("region.reg")} ) the + coordinates in the default 'X' and 'Y' columns will be used to + determine if each row is inside or outside the area specified in + the region file. Alternate position column names, or expressions, + may be entered if needed, as in + +\begin{verbatim} + regfilter("region.reg", XPOS, YPOS) +\end{verbatim} + Region filtering can be applied most unambiguously if the positions + in the region file and in the table to be filtered are both give in + terms of absolute celestial coordinate units. In this case the + locations and sizes of the geometric shapes in the region file are + specified in angular units on the sky (e.g., positions given in + R.A. and Dec. and sizes in arcseconds or arcminutes). Similarly, + each row of the filtered table will have a celestial coordinate + associated with it. This association is usually implemented using + a set of so-called 'World Coordinate System' (or WCS) FITS keywords + that define the coordinate transformation that must be applied to + the values in the 'X' and 'Y' columns to calculate the coordinate. + + Alternatively, one can perform spatial filtering using unitless + 'pixel' coordinates for the regions and row positions. In this + case the user must be careful to ensure that the positions in the 2 + files are self-consistent. A typical problem is that the region + file may be generated using a binned image, but the unbinned + coordinates are given in the event table. The ROSAT events files, + for example, have X and Y pixel coordinates that range from 1 - + 15360. These coordinates are typically binned by a factor of 32 to + produce a 480x480 pixel image. If one then uses a region file + generated from this image (in image pixel units) to filter the + ROSAT events file, then the X and Y column values must be converted + to corresponding pixel units as in: + +\begin{verbatim} + regfilter("rosat.reg", X/32.+.5, Y/32.+.5) +\end{verbatim} + Note that this binning conversion is not necessary if the region + file is specified using celestial coordinate units instead of pixel + units because CFITSIO is then able to directly compare the + celestial coordinate of each row in the table with the celestial + coordinates in the region file without having to know anything + about how the image may have been binned. + + The last "wcs cols" parameter should rarely be needed. If supplied, + this string contains the names of the 2 columns (space or comma + separated) which have the associated WCS keywords. If not supplied, + the filter will scan the X and Y expressions for column names. + If only one is found in each expression, those columns will be + used, otherwise an error will be returned. + + These region shapes are supported (names are case insensitive): + +\begin{verbatim} + Point ( X1, Y1 ) <- One pixel square region + Line ( X1, Y1, X2, Y2 ) <- One pixel wide region + Polygon ( X1, Y1, X2, Y2, ... ) <- Rest are interiors with + Rectangle ( X1, Y1, X2, Y2, A ) | boundaries considered + Box ( Xc, Yc, Wdth, Hght, A ) V within the region + Diamond ( Xc, Yc, Wdth, Hght, A ) + Circle ( Xc, Yc, R ) + Annulus ( Xc, Yc, Rin, Rout ) + Ellipse ( Xc, Yc, Rx, Ry, A ) + Elliptannulus ( Xc, Yc, Rinx, Riny, Routx, Routy, Ain, Aout ) + Sector ( Xc, Yc, Amin, Amax ) +\end{verbatim} + where (Xc,Yc) is the coordinate of the shape's center; (X\#,Y\#) are + the coordinates of the shape's edges; Rxxx are the shapes' various + Radii or semimajor/minor axes; and Axxx are the angles of rotation + (or bounding angles for Sector) in degrees. For rotated shapes, the + rotation angle can be left off, indicating no rotation. Common + alternate names for the regions can also be used: rotbox = box; + rotrectangle = rectangle; (rot)rhombus = (rot)diamond; and pie + = sector. When a shape's name is preceded by a minus sign, '-', + the defined region is instead the area *outside* its boundary (ie, + the region is inverted). All the shapes within a single region + file are OR'd together to create the region, and the order is + significant. The overall way of looking at region files is that if + the first region is an excluded region then a dummy included region + of the whole detector is inserted in the front. Then each region + specification as it is processed overrides any selections inside of + that region specified by previous regions. Another way of thinking + about this is that if a previous excluded region is completely + inside of a subsequent included region the excluded region is + ignored. + + The positional coordinates may be given either in pixel units, + decimal degrees or hh:mm:ss.s, dd:mm:ss.s units. The shape sizes + may be given in pixels, degrees, arcminutes, or arcseconds. Look + at examples of region file produced by fv/POW or ds9 for further + details of the region file format. + +\subsubsection{Example Row Filters} + +\begin{verbatim} + [double && mag <= 5.0] - Extract all double stars brighter + than fifth magnitude + + [#row >= 125 && #row <= 175] - Extract row numbers 125 through 175 + + [abs(sin(theta * #deg)) < 0.5] - Extract all rows having the + absolute value of the sine of theta + less than a half where the angles + are tabulated in degrees + + [@rowFilter.txt] - Extract rows using the expression + contained within the text file + rowFilter.txt + + [gtifilter()] - Search the current file for a GTI + extension, filter the TIME + column in the current table, using + START/STOP times taken from + columns in the GTI extension + + [regfilter("pow.reg")] - Extract rows which have a coordinate + (as given in the X and Y columns) + within the spatial region specified + in the pow.reg region file. +\end{verbatim} + +\newpage +\subsection{Combined Filtering Examples} + +The previous sections described all the individual types of filters +that may be applied to the input file. In this section we show +examples which combine several different filters at once. These +examples all use the {\tt fitscopy} program that is distributed with +the CFITSIO code. It simply copies the input file to the output file. + +\begin{verbatim} +fitscopy rosat.fit out.fit +\end{verbatim} + +This trivial example simply makes an identical copy of the input +rosat.fit file without any filtering. + +\begin{verbatim} +fitscopy 'rosat.fit[events][col Time;X;Y][#row < 1000]' out.fit +\end{verbatim} + +The output file contains only the Time, X, and Y columns, and only +the first 999 rows from the 'EVENTS' table extension of the input file. +All the other HDUs in the input file are copied to the output file +without any modification. + +\begin{verbatim} +fitscopy 'rosat.fit[events][PI < 50][bin (Xdet,Ydet) = 16]' image.fit +\end{verbatim} + +This creates an output image by binning the Xdet and Ydet columns of +the events table with a pixel binning factor of 16. Only the rows +which have a PI energy less than 50 are used to construct this image. +The output image file contains a primary array image without any +extensions. + +\begin{verbatim} +fitscopy 'rosat.fit[events][gtifilter() && regfilter("pow.reg")]' out.fit +\end{verbatim} + +The filtering expression in this example uses the {\tt gtifilter} +function to test whether the TIME column value in each row is within +one of the Good Time Intervals defined in the GTI extension in the same +input file, and also uses the {\tt regfilter} function to test if the +position associated with each row (derived by default from the values +in the X and Y columns of the events table) is located within the area +defined in the {\tt pow.reg} text region file (which was previously +created with the {\tt fv/POW} image display program). Only the rows +which satisfy both tests are copied to the output table. + +\begin{verbatim} +fitscopy 'r.fit[evt][PI<50]' stdout | fitscopy stdin[evt][col X,Y] out.fit +\end{verbatim} + +In this somewhat convoluted example, fitscopy is used to first select +the rows from the evt extension which have PI less than 50 and write the +resulting table out to the stdout stream. This is piped to a 2nd +instance of fitscopy (with the Unix `$|$' pipe command) which reads that +filtered FITS file from the stdin stream and copies only the X and Y +columns from the evt table to the output file. + +\begin{verbatim} +fitscopy 'r.fit[evt][col RAD=sqrt((X-#XCEN)**2+(Y-#YCEN)**2)][rad<100]' out.fit +\end{verbatim} + +This example first creates a new column called RAD which gives the +distance between the X,Y coordinate of each event and the coordinate +defined by the XCEN and YCEN keywords in the header. Then, only those +rows which have a distance less than 100 are copied to the output +table. In other words, only the events which are located within 100 +pixel units from the (XCEN, YCEN) coordinate are copied to the output +table. + +\begin{verbatim} +fitscopy 'ftp://heasarc.gsfc.nasa.gov/rosat.fit[events][bin (X,Y)=16]' img.fit +\end{verbatim} + +This example bins the X and Y columns of the hypothetical ROSAT file +at the HEASARC ftp site to create the output image. + +\begin{verbatim} +fitscopy 'raw.fit[i512,512][101:110,51:60]' image.fit +\end{verbatim} + +This example converts the 512 x 512 pixel raw binary 16-bit integer +image to a FITS file and copies a 10 x 10 pixel subimage from it to the +output FITS image. + +\newpage +\section{CFITSIO Error Status Codes} + +The following table lists all the error status codes used by CFITSIO. +Programmers are encouraged to use the symbolic mnemonics (defined in +the file fitsio.h) rather than the actual integer status values to +improve the readability of their code. + +\begin{verbatim} + Symbolic Const Value Meaning + -------------- ----- ----------------------------------------- + 0 OK, no error + SAME_FILE 101 input and output files are the same + TOO_MANY_FILES 103 tried to open too many FITS files at once + FILE_NOT_OPENED 104 could not open the named file + FILE_NOT_CREATED 105 could not create the named file + WRITE_ERROR 106 error writing to FITS file + END_OF_FILE 107 tried to move past end of file + READ_ERROR 108 error reading from FITS file + FILE_NOT_CLOSED 110 could not close the file + ARRAY_TOO_BIG 111 array dimensions exceed internal limit + READONLY_FILE 112 Cannot write to readonly file + MEMORY_ALLOCATION 113 Could not allocate memory + BAD_FILEPTR 114 invalid fitsfile pointer + NULL_INPUT_PTR 115 NULL input pointer to routine + SEEK_ERROR 116 error seeking position in file + + BAD_URL_PREFIX 121 invalid URL prefix on file name + TOO_MANY_DRIVERS 122 tried to register too many IO drivers + DRIVER_INIT_FAILED 123 driver initialization failed + NO_MATCHING_DRIVER 124 matching driver is not registered + URL_PARSE_ERROR 125 failed to parse input file URL + + SHARED_BADARG 151 bad argument in shared memory driver + SHARED_NULPTR 152 null pointer passed as an argument + SHARED_TABFULL 153 no more free shared memory handles + SHARED_NOTINIT 154 shared memory driver is not initialized + SHARED_IPCERR 155 IPC error returned by a system call + SHARED_NOMEM 156 no memory in shared memory driver + SHARED_AGAIN 157 resource deadlock would occur + SHARED_NOFILE 158 attempt to open/create lock file failed + SHARED_NORESIZE 159 shared memory block cannot be resized at the moment + + HEADER_NOT_EMPTY 201 header already contains keywords + KEY_NO_EXIST 202 keyword not found in header + KEY_OUT_BOUNDS 203 keyword record number is out of bounds + VALUE_UNDEFINED 204 keyword value field is blank + NO_QUOTE 205 string is missing the closing quote + BAD_KEYCHAR 207 illegal character in keyword name or card + BAD_ORDER 208 required keywords out of order + NOT_POS_INT 209 keyword value is not a positive integer + NO_END 210 couldn't find END keyword + BAD_BITPIX 211 illegal BITPIX keyword value + BAD_NAXIS 212 illegal NAXIS keyword value + BAD_NAXES 213 illegal NAXISn keyword value + BAD_PCOUNT 214 illegal PCOUNT keyword value + BAD_GCOUNT 215 illegal GCOUNT keyword value + BAD_TFIELDS 216 illegal TFIELDS keyword value + NEG_WIDTH 217 negative table row size + NEG_ROWS 218 negative number of rows in table + COL_NOT_FOUND 219 column with this name not found in table + BAD_SIMPLE 220 illegal value of SIMPLE keyword + NO_SIMPLE 221 Primary array doesn't start with SIMPLE + NO_BITPIX 222 Second keyword not BITPIX + NO_NAXIS 223 Third keyword not NAXIS + NO_NAXES 224 Couldn't find all the NAXISn keywords + NO_XTENSION 225 HDU doesn't start with XTENSION keyword + NOT_ATABLE 226 the CHDU is not an ASCII table extension + NOT_BTABLE 227 the CHDU is not a binary table extension + NO_PCOUNT 228 couldn't find PCOUNT keyword + NO_GCOUNT 229 couldn't find GCOUNT keyword + NO_TFIELDS 230 couldn't find TFIELDS keyword + NO_TBCOL 231 couldn't find TBCOLn keyword + NO_TFORM 232 couldn't find TFORMn keyword + NOT_IMAGE 233 the CHDU is not an IMAGE extension + BAD_TBCOL 234 TBCOLn keyword value < 0 or > rowlength + NOT_TABLE 235 the CHDU is not a table + COL_TOO_WIDE 236 column is too wide to fit in table + COL_NOT_UNIQUE 237 more than 1 column name matches template + BAD_ROW_WIDTH 241 sum of column widths not = NAXIS1 + UNKNOWN_EXT 251 unrecognizable FITS extension type + UNKNOWN_REC 252 unknown record; 1st keyword not SIMPLE or XTENSION + END_JUNK 253 END keyword is not blank + BAD_HEADER_FILL 254 Header fill area contains non-blank chars + BAD_DATA_FILL 255 Illegal data fill bytes (not zero or blank) + BAD_TFORM 261 illegal TFORM format code + BAD_TFORM_DTYPE 262 unrecognizable TFORM datatype code + BAD_TDIM 263 illegal TDIMn keyword value + BAD_HEAP_PTR 264 invalid BINTABLE heap pointer is out of range + + BAD_HDU_NUM 301 HDU number < 1 or > MAXHDU + BAD_COL_NUM 302 column number < 1 or > tfields + NEG_FILE_POS 304 tried to move to negative byte location in file + NEG_BYTES 306 tried to read or write negative number of bytes + BAD_ROW_NUM 307 illegal starting row number in table + BAD_ELEM_NUM 308 illegal starting element number in vector + NOT_ASCII_COL 309 this is not an ASCII string column + NOT_LOGICAL_COL 310 this is not a logical datatype column + BAD_ATABLE_FORMAT 311 ASCII table column has wrong format + BAD_BTABLE_FORMAT 312 Binary table column has wrong format + NO_NULL 314 null value has not been defined + NOT_VARI_LEN 317 this is not a variable length column + BAD_DIMEN 320 illegal number of dimensions in array + BAD_PIX_NUM 321 first pixel number greater than last pixel + ZERO_SCALE 322 illegal BSCALE or TSCALn keyword = 0 + NEG_AXIS 323 illegal axis length < 1 + + NOT_GROUP_TABLE 340 Grouping function error + HDU_ALREADY_MEMBER 341 + MEMBER_NOT_FOUND 342 + GROUP_NOT_FOUND 343 + BAD_GROUP_ID 344 + TOO_MANY_HDUS_TRACKED 345 + HDU_ALREADY_TRACKED 346 + BAD_OPTION 347 + IDENTICAL_POINTERS 348 + BAD_GROUP_ATTACH 349 + BAD_GROUP_DETACH 350 + + NGP_NO_MEMORY 360 malloc failed + NGP_READ_ERR 361 read error from file + NGP_NUL_PTR 362 null pointer passed as an argument. + Passing null pointer as a name of + template file raises this error + NGP_EMPTY_CURLINE 363 line read seems to be empty (used + internally) + NGP_UNREAD_QUEUE_FULL 364 cannot unread more then 1 line (or single + line twice) + NGP_INC_NESTING 365 too deep include file nesting (infinite + loop, template includes itself ?) + NGP_ERR_FOPEN 366 fopen() failed, cannot open template file + NGP_EOF 367 end of file encountered and not expected + NGP_BAD_ARG 368 bad arguments passed. Usually means + internal parser error. Should not happen + NGP_TOKEN_NOT_EXPECT 369 token not expected here + + BAD_I2C 401 bad int to formatted string conversion + BAD_F2C 402 bad float to formatted string conversion + BAD_INTKEY 403 can't interpret keyword value as integer + BAD_LOGICALKEY 404 can't interpret keyword value as logical + BAD_FLOATKEY 405 can't interpret keyword value as float + BAD_DOUBLEKEY 406 can't interpret keyword value as double + BAD_C2I 407 bad formatted string to int conversion + BAD_C2F 408 bad formatted string to float conversion + BAD_C2D 409 bad formatted string to double conversion + BAD_DATATYPE 410 illegal datatype code value + BAD_DECIM 411 bad number of decimal places specified + NUM_OVERFLOW 412 overflow during datatype conversion + DATA_COMPRESSION_ERR 413 error compressing image + DATA_DECOMPRESSION_ERR 414 error uncompressing image + + BAD_DATE 420 error in date or time conversion + + PARSE_SYNTAX_ERR 431 syntax error in parser expression + PARSE_BAD_TYPE 432 expression did not evaluate to desired type + PARSE_LRG_VECTOR 433 vector result too large to return in array + PARSE_NO_OUTPUT 434 data parser failed not sent an out column + PARSE_BAD_COL 435 bad data encounter while parsing column + PARSE_BAD_OUTPUT 436 Output file not of proper type + + ANGLE_TOO_BIG 501 celestial angle too large for projection + BAD_WCS_VAL 502 bad celestial coordinate or pixel value + WCS_ERROR 503 error in celestial coordinate calculation + BAD_WCS_PROJ 504 unsupported type of celestial projection + NO_WCS_KEY 505 celestial coordinate keywords not found + APPROX_WCS_KEY 506 approximate wcs keyword values were returned +\end{verbatim} + +\end{document} diff --git a/software/cfitsio3040/quick.toc b/software/cfitsio3040/quick.toc new file mode 100644 index 000000000..9d7c7da6b --- /dev/null +++ b/software/cfitsio3040/quick.toc @@ -0,0 +1,25 @@ +\contentsline {section}{\numberline {1}Introduction}{2} +\contentsline {section}{\numberline {2}Installing and Using CFITSIO}{3} +\contentsline {section}{\numberline {3}Example Programs}{4} +\contentsline {section}{\numberline {4}CFITSIO Routines}{6} +\contentsline {subsection}{\numberline {4.1}Error Reporting}{6} +\contentsline {subsection}{\numberline {4.2}File Open/Close Routines}{6} +\contentsline {subsection}{\numberline {4.3}HDU-level Routines}{7} +\contentsline {subsection}{\numberline {4.4}Image I/O Routines}{9} +\contentsline {subsection}{\numberline {4.5}Table I/O Routines}{12} +\contentsline {subsection}{\numberline {4.6}Header Keyword I/O Routines}{19} +\contentsline {subsection}{\numberline {4.7}Utility Routines}{22} +\contentsline {section}{\numberline {5}CFITSIO File Names and Filters}{23} +\contentsline {subsection}{\numberline {5.1}Creating New Files}{23} +\contentsline {subsection}{\numberline {5.2}Opening Existing Files}{24} +\contentsline {subsection}{\numberline {5.3}Image Filtering}{26} +\contentsline {subsubsection}{\numberline {5.3.1}Extracting a subsection of an image}{26} +\contentsline {subsubsection}{\numberline {5.3.2}Create an Image by Binning Table Columns}{26} +\contentsline {subsection}{\numberline {5.4}Table Filtering}{28} +\contentsline {subsubsection}{\numberline {5.4.1}Column and Keyword Filtering}{28} +\contentsline {subsubsection}{\numberline {5.4.2}Row Filtering}{29} +\contentsline {subsubsection}{\numberline {5.4.3}Good Time Interval Filtering}{32} +\contentsline {subsubsection}{\numberline {5.4.4}Spatial Region Filtering}{32} +\contentsline {subsubsection}{\numberline {5.4.5}Example Row Filters}{34} +\contentsline {subsection}{\numberline {5.5}Combined Filtering Examples}{36} +\contentsline {section}{\numberline {6}CFITSIO Error Status Codes}{38} diff --git a/software/cfitsio3040/region.c b/software/cfitsio3040/region.c new file mode 100644 index 000000000..82ed9ec3e --- /dev/null +++ b/software/cfitsio3040/region.c @@ -0,0 +1,949 @@ +#include +#include +#include +#include +#include "fitsio2.h" +#include "region.h" + +static int Pt_in_Poly( double x, double y, int nPts, double *Pts ); + +/*---------------------------------------------------------------------------*/ +int ffrrgn( const char *filename, + WCSdata *wcs, + SAORegion **Rgn, + int *status ) +/* Read regions from a SAO-style region file and return the information */ +/* in the "SAORegion" structure. If it is nonNULL, use wcs to convert the */ +/* region coordinates to pixels. Return an error if region is in degrees */ +/* but no WCS data is provided. */ +/*---------------------------------------------------------------------------*/ +{ + char *currLine; + char *namePtr, *paramPtr, *currLoc; + char *pX, *pY, *endp; + long allocLen, lineLen, hh, mm, dd; + double *coords = 0, X, Y, R, x, y, ss, xsave= 0., ysave= 0.; + int nParams, nCoords, negdec; + int i, done; + FILE *rgnFile; + coordFmt cFmt; + SAORegion *aRgn; + RgnShape *newShape, *tmpShape; + + if( *status ) return( *status ); + + aRgn = (SAORegion *)malloc( sizeof(SAORegion) ); + if( ! aRgn ) { + ffpmsg("Couldn't allocate memory to hold Region file contents."); + return(*status = MEMORY_ALLOCATION ); + } + aRgn->nShapes = 0; + aRgn->Shapes = NULL; + if( wcs && wcs->exists ) + aRgn->wcs = *wcs; + else + aRgn->wcs.exists = 0; + + cFmt = pixel_fmt; /* set default format */ + + /* Allocate Line Buffer */ + + allocLen = 512; + currLine = (char *)malloc( allocLen * sizeof(char) ); + if( !currLine ) { + free( aRgn ); + ffpmsg("Couldn't allocate memory to hold Region file contents."); + return(*status = MEMORY_ALLOCATION ); + } + + /* Open Region File */ + + if( (rgnFile = fopen( filename, "r" ))==NULL ) { + sprintf(currLine,"Could not open Region file %s.",filename); + ffpmsg( currLine ); + free( currLine ); + free( aRgn ); + return( *status = FILE_NOT_OPENED ); + } + + /* Read in file, line by line */ + + while( fgets(currLine,allocLen,rgnFile) != NULL ) { + + /* Make sure we have a full line of text */ + + lineLen = strlen(currLine); + while( lineLen==allocLen-1 && currLine[lineLen-1]!='\n' ) { + currLoc = (char *)realloc( currLine, 2 * allocLen * sizeof(char) ); + if( !currLoc ) { + ffpmsg("Couldn't allocate memory to hold Region file contents."); + *status = MEMORY_ALLOCATION; + goto error; + } else { + currLine = currLoc; + } + fgets( currLine+lineLen, allocLen+1, rgnFile ); + allocLen += allocLen; + lineLen += strlen(currLine+lineLen); + } + + currLoc = currLine; + if( *currLoc == '#' ) { + + /* Look to see if it is followed by a format statement... */ + /* if not skip line */ + + currLoc++; + while( *currLoc==' ' ) currLoc++; + if( !strncasecmp( currLoc, "format:", 7 ) ) { + if( aRgn->nShapes ) { + ffpmsg("Format code encountered after reading 1 or more shapes."); + *status = PARSE_SYNTAX_ERR; + goto error; + } + currLoc += 7; + while( *currLoc==' ' ) currLoc++; + if( !strncasecmp( currLoc, "pixel", 5 ) ) { + cFmt = pixel_fmt; + } else if( !strncasecmp( currLoc, "degree", 6 ) ) { + cFmt = degree_fmt; + } else if( !strncasecmp( currLoc, "hhmmss", 6 ) ) { + cFmt = hhmmss_fmt; + } else if( !strncasecmp( currLoc, "hms", 3 ) ) { + cFmt = hhmmss_fmt; + } else { + ffpmsg("Unknown format code encountered in region file."); + *status = PARSE_SYNTAX_ERR; + goto error; + } + } + + } else if( !strncasecmp( currLoc, "glob", 4 ) ) { + /* skip lines that begin with the word 'global' */ + + } else { + + while( *currLoc != '\0' ) { + + namePtr = currLoc; + paramPtr = NULL; + nParams = 1; + + /* Search for closing parenthesis */ + + done = 0; + while( !done && !*status && *currLoc ) { + switch (*currLoc) { + case '(': + *currLoc = '\0'; + currLoc++; + if( paramPtr ) /* Can't have two '(' in a region! */ + *status = 1; + else + paramPtr = currLoc; + break; + case ')': + *currLoc = '\0'; + currLoc++; + if( !paramPtr ) /* Can't have a ')' without a '(' first */ + *status = 1; + else + done = 1; + break; + case '#': + case '\n': + *currLoc = '\0'; + if( !paramPtr ) /* Allow for a blank line */ + done = 1; + break; + case ':': + currLoc++; + cFmt = hhmmss_fmt; + break; + case 'd': + currLoc++; + cFmt = degree_fmt; + break; + case ',': + nParams++; /* Fall through to default */ + default: + currLoc++; + break; + } + } + if( *status || !done ) { + ffpmsg( "Error reading Region file" ); + *status = PARSE_SYNTAX_ERR; + goto error; + } + + /* Skip white space in region name */ + + while( *namePtr==' ' ) namePtr++; + + /* Was this a blank line? Or the end of the current one */ + + if( ! *namePtr && ! paramPtr ) continue; + + + /* Check for format code at beginning of the line */ + + if( !strncasecmp( namePtr, "image;", 6 ) ) { + namePtr += 6; + cFmt = pixel_fmt; + } else if( !strncasecmp( namePtr, "physical;", 9 ) ) { + namePtr += 9; + cFmt = pixel_fmt; + } else if( !strncasecmp( namePtr, "linear;", 7 ) ) { + namePtr += 7; + cFmt = pixel_fmt; + } else if( !strncasecmp( namePtr, "fk4;", 4 ) ) { + namePtr += 4; + cFmt = degree_fmt; + } else if( !strncasecmp( namePtr, "fk5;", 4 ) ) { + namePtr += 4; + cFmt = degree_fmt; + } else if( !strncasecmp( namePtr, "icrs;", 5 ) ) { + namePtr += 5; + cFmt = degree_fmt; + + /* the following 5 cases support region files created by POW + (or ds9 Version 4.x) which + may have lines containing only a format code, not followed + by a ';' (and with no region specifier on the line). We use + the 'continue' statement to jump to the end of the loop and + then continue reading the next line of the region file. */ + + } else if( !strncasecmp( namePtr, "fk5", 3 ) ) { + cFmt = degree_fmt; + continue; /* supports POW region file format */ + } else if( !strncasecmp( namePtr, "fk4", 3 ) ) { + cFmt = degree_fmt; + continue; /* supports POW region file format */ + } else if( !strncasecmp( namePtr, "icrs", 4 ) ) { + cFmt = degree_fmt; + continue; /* supports POW region file format */ + } else if( !strncasecmp( namePtr, "image", 5 ) ) { + cFmt = pixel_fmt; + continue; /* supports POW region file format */ + } else if( !strncasecmp( namePtr, "physical", 8 ) ) { + cFmt = pixel_fmt; + continue; /* supports POW region file format */ + + + } else if( !strncasecmp( namePtr, "galactic;", 9 ) ) { + ffpmsg( "Galactic region coordinates not supported" ); + ffpmsg( namePtr ); + *status = PARSE_SYNTAX_ERR; + goto error; + } else if( !strncasecmp( namePtr, "ecliptic;", 9 ) ) { + ffpmsg( "ecliptic region coordinates not supported" ); + ffpmsg( namePtr ); + *status = PARSE_SYNTAX_ERR; + goto error; + } + + /**************************************************/ + /* We've apparently found a region... Set it up */ + /**************************************************/ + + if( !(aRgn->nShapes % 10) ) { + if( aRgn->Shapes ) + tmpShape = (RgnShape *)realloc( aRgn->Shapes, + (10+aRgn->nShapes) + * sizeof(RgnShape) ); + else + tmpShape = (RgnShape *) malloc( 10 * sizeof(RgnShape) ); + if( tmpShape ) { + aRgn->Shapes = tmpShape; + } else { + ffpmsg( "Failed to allocate memory for Region data"); + *status = MEMORY_ALLOCATION; + goto error; + } + + } + newShape = &aRgn->Shapes[aRgn->nShapes++]; + newShape->sign = 1; + newShape->shape = point_rgn; + + while( *namePtr==' ' ) namePtr++; + + /* Check for the shape's sign */ + + if( *namePtr=='+' ) { + namePtr++; + } else if( *namePtr=='-' ) { + namePtr++; + newShape->sign = 0; + } + + /* Skip white space in region name */ + + while( *namePtr==' ' ) namePtr++; + if( *namePtr=='\0' ) { + ffpmsg( "Error reading Region file" ); + *status = PARSE_SYNTAX_ERR; + goto error; + } + lineLen = strlen( namePtr ) - 1; + while( namePtr[lineLen]==' ' ) namePtr[lineLen--] = '\0'; + + /* Now identify the region */ + + if( !strcasecmp( namePtr, "circle" ) ) { + newShape->shape = circle_rgn; + if( nParams != 3 ) + *status = PARSE_SYNTAX_ERR; + nCoords = 2; + } else if( !strcasecmp( namePtr, "annulus" ) ) { + newShape->shape = annulus_rgn; + if( nParams != 4 ) + *status = PARSE_SYNTAX_ERR; + nCoords = 2; + } else if( !strcasecmp( namePtr, "ellipse" ) ) { + newShape->shape = ellipse_rgn; + if( nParams < 4 || nParams > 5 ) + *status = PARSE_SYNTAX_ERR; + newShape->param.gen.p[4] = 0.0; + nCoords = 2; + } else if( !strcasecmp( namePtr, "elliptannulus" ) ) { + newShape->shape = elliptannulus_rgn; + if( !( nParams==8 || nParams==6 ) ) + *status = PARSE_SYNTAX_ERR; + newShape->param.gen.p[6] = 0.0; + newShape->param.gen.p[7] = 0.0; + nCoords = 2; + } else if( !strcasecmp( namePtr, "box" ) + || !strcasecmp( namePtr, "rotbox" ) ) { + newShape->shape = box_rgn; + if( nParams < 4 || nParams > 5 ) + *status = PARSE_SYNTAX_ERR; + newShape->param.gen.p[4] = 0.0; + nCoords = 2; + } else if( !strcasecmp( namePtr, "rectangle" ) + || !strcasecmp( namePtr, "rotrectangle" ) ) { + newShape->shape = rectangle_rgn; + if( nParams < 4 || nParams > 5 ) + *status = PARSE_SYNTAX_ERR; + newShape->param.gen.p[4] = 0.0; + nCoords = 4; + } else if( !strcasecmp( namePtr, "diamond" ) + || !strcasecmp( namePtr, "rotdiamond" ) + || !strcasecmp( namePtr, "rhombus" ) + || !strcasecmp( namePtr, "rotrhombus" ) ) { + newShape->shape = diamond_rgn; + if( nParams < 4 || nParams > 5 ) + *status = PARSE_SYNTAX_ERR; + newShape->param.gen.p[4] = 0.0; + nCoords = 2; + } else if( !strcasecmp( namePtr, "sector" ) + || !strcasecmp( namePtr, "pie" ) ) { + newShape->shape = sector_rgn; + if( nParams != 4 ) + *status = PARSE_SYNTAX_ERR; + nCoords = 2; + } else if( !strcasecmp( namePtr, "point" ) ) { + newShape->shape = point_rgn; + if( nParams != 2 ) + *status = PARSE_SYNTAX_ERR; + nCoords = 2; + } else if( !strcasecmp( namePtr, "line" ) ) { + newShape->shape = line_rgn; + if( nParams != 4 ) + *status = PARSE_SYNTAX_ERR; + nCoords = 4; + } else if( !strcasecmp( namePtr, "polygon" ) ) { + newShape->shape = poly_rgn; + if( nParams < 6 || (nParams&1) ) + *status = PARSE_SYNTAX_ERR; + nCoords = nParams; + } else { + ffpmsg( "Unrecognized region found in region file:" ); + ffpmsg( namePtr ); + *status = PARSE_SYNTAX_ERR; + goto error; + } + if( *status ) { + ffpmsg( "Wrong number of parameters found for region" ); + ffpmsg( namePtr ); + goto error; + } + + /* Parse Parameter string... convert to pixels if necessary */ + + if( newShape->shape==poly_rgn ) { + newShape->param.poly.Pts = (double *)malloc( nParams + * sizeof(double) ); + if( !newShape->param.poly.Pts ) { + ffpmsg( + "Could not allocate memory to hold polygon parameters" ); + *status = MEMORY_ALLOCATION; + goto error; + } + newShape->param.poly.nPts = nParams; + coords = newShape->param.poly.Pts; + } else + coords = newShape->param.gen.p; + + /* Parse the initial "WCS?" coordinates */ + for( i=0; iexists ) { + ffpmsg("WCS information needed to convert region coordinates."); + *status = NO_WCS_KEY; + goto error; + } + + if( ffxypx( X, Y, wcs->xrefval, wcs->yrefval, + wcs->xrefpix, wcs->yrefpix, + wcs->xinc, wcs->yinc, + wcs->rot, wcs->type, + &x, &y, status ) ) { + ffpmsg("Error converting region to pixel coordinates."); + goto error; + } + X = x; Y = y; + } + coords[i] = X; + coords[i+1] = Y; + } + + /* Read in remaining parameters... */ + + for( ; ixrefval, wcs->yrefval, + wcs->xrefpix, wcs->yrefpix, + wcs->xinc, wcs->yinc, + wcs->rot, wcs->type, + &x, &y, status ) ) { + ffpmsg("Error converting region to pixel coordinates."); + goto error; + } + + coords[i] = sqrt( pow(x-coords[0],2) + pow(y-coords[1],2) ); + + } else if (endp && *endp=='\'') { + /* parameter given in arcmin so convert to pixels. */ + /* Increment first Y coordinate by this amount, then calc */ + /* the distance in pixels from the original coordinate. */ + /* NOTE: This assumes the pixels are square!! */ + if (ysave < 0.) + Y = ysave + coords[i]/60.; /* don't exceed -90 */ + else + Y = ysave - coords[i]/60.; /* don't exceed +90 */ + + X = xsave; + if( ffxypx( X, Y, wcs->xrefval, wcs->yrefval, + wcs->xrefpix, wcs->yrefpix, + wcs->xinc, wcs->yinc, + wcs->rot, wcs->type, + &x, &y, status ) ) { + ffpmsg("Error converting region to pixel coordinates."); + goto error; + } + + coords[i] = sqrt( pow(x-coords[0],2) + pow(y-coords[1],2) ); + + } else if (endp && *endp=='d') { + /* parameter given in degrees so convert to pixels. */ + /* Increment first Y coordinate by this amount, then calc */ + /* the distance in pixels from the original coordinate. */ + /* NOTE: This assumes the pixels are square!! */ + if (ysave < 0.) + Y = ysave + coords[i]; /* don't exceed -90 */ + else + Y = ysave - coords[i]; /* don't exceed +90 */ + + X = xsave; + if( ffxypx( X, Y, wcs->xrefval, wcs->yrefval, + wcs->xrefpix, wcs->yrefpix, + wcs->xinc, wcs->yinc, + wcs->rot, wcs->type, + &x, &y, status ) ) { + ffpmsg("Error converting region to pixel coordinates."); + goto error; + } + + coords[i] = sqrt( pow(x-coords[0],2) + pow(y-coords[1],2) ); + } + } + + /* Perform some useful calculations now to speed up filter later */ + /* Also, correct the position angle for any WCS rotation: */ + /* If regions are specified in WCS coordintes, then the angles */ + /* are relative to the WCS system, not the pixel X,Y system */ + + switch( newShape->shape ) { + case circle_rgn: + newShape->param.gen.a = coords[2] * coords[2]; + break; + case annulus_rgn: + newShape->param.gen.a = coords[2] * coords[2]; + newShape->param.gen.b = coords[3] * coords[3]; + break; + case sector_rgn: + if( cFmt!=pixel_fmt ) { + coords[2] += (wcs->rot); + coords[3] += (wcs->rot); + } + while( coords[2]> 180.0 ) coords[2] -= 360.0; + while( coords[2]<=-180.0 ) coords[2] += 360.0; + while( coords[3]> 180.0 ) coords[3] -= 360.0; + while( coords[3]<=-180.0 ) coords[3] += 360.0; + break; + case ellipse_rgn: + if( cFmt!=pixel_fmt ) { + coords[4] += (wcs->rot); + } + newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); + newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); + break; + case elliptannulus_rgn: + if( cFmt!=pixel_fmt ) { + coords[6] += (wcs->rot); + coords[7] += (wcs->rot); + } + newShape->param.gen.a = sin( myPI * (coords[6] / 180.0) ); + newShape->param.gen.b = cos( myPI * (coords[6] / 180.0) ); + newShape->param.gen.sinT = sin( myPI * (coords[7] / 180.0) ); + newShape->param.gen.cosT = cos( myPI * (coords[7] / 180.0) ); + break; + case box_rgn: + if( cFmt!=pixel_fmt ) { + coords[4] += (wcs->rot); + } + newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); + newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); + break; + case rectangle_rgn: + if( cFmt!=pixel_fmt ) { + coords[4] += (wcs->rot); + } + newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); + newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); + X = 0.5 * ( coords[2]-coords[0] ); + Y = 0.5 * ( coords[3]-coords[1] ); + newShape->param.gen.a = fabs( X * newShape->param.gen.cosT + + Y * newShape->param.gen.sinT ); + newShape->param.gen.b = fabs( Y * newShape->param.gen.cosT + - X * newShape->param.gen.sinT ); + newShape->param.gen.p[5] = 0.5 * ( coords[2]+coords[0] ); + newShape->param.gen.p[6] = 0.5 * ( coords[3]+coords[1] ); + break; + case diamond_rgn: + if( cFmt!=pixel_fmt ) { + coords[4] += (wcs->rot); + } + newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); + newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); + break; + case line_rgn: + X = coords[2] - coords[0]; + Y = coords[3] - coords[1]; + R = sqrt( X*X + Y*Y ); + newShape->param.gen.sinT = ( R ? Y/R : 0.0 ); + newShape->param.gen.cosT = ( R ? X/R : 1.0 ); + newShape->param.gen.a = R + 0.5; + break; + case point_rgn: + break; + case poly_rgn: + /* Find bounding box */ + newShape->param.poly.xmin = coords[0]; + newShape->param.poly.xmax = coords[0]; + newShape->param.poly.ymin = coords[1]; + newShape->param.poly.ymax = coords[1]; + for( i=2; iparam.poly.xmin > coords[i] ) /* Min X */ + newShape->param.poly.xmin = coords[i]; + if( newShape->param.poly.xmax < coords[i] ) /* Max X */ + newShape->param.poly.xmax = coords[i]; + i++; + if( newShape->param.poly.ymin > coords[i] ) /* Min Y */ + newShape->param.poly.ymin = coords[i]; + if( newShape->param.poly.ymax < coords[i] ) /* Max Y */ + newShape->param.poly.ymax = coords[i]; + i++; + } + break; + } + + } /* End of while( *currLoc ) */ +/* + if (coords)printf("%.8f %.8f %.8f %.8f %.8f\n", + coords[0],coords[1],coords[2],coords[3],coords[4]); +*/ + } /* End of if...else parse line */ + } /* End of while( fgets(rgnFile) ) */ + + +error: + + if( *status ) + fits_free_region( aRgn ); + else + *Rgn = aRgn; + + fclose( rgnFile ); + free( currLine ); + + return( *status ); +} + +/*---------------------------------------------------------------------------*/ +int fftrgn( double X, + double Y, + SAORegion *Rgn ) +/* Test if the given point is within the region described by Rgn. X and */ +/* Y are in pixel coordinates. */ +/*---------------------------------------------------------------------------*/ +{ + double x, y, dx, dy, xprime, yprime, r; + RgnShape *Shapes; + int i; + int result = 0; + + Shapes = Rgn->Shapes; + + /* if an excluded region is given first, then implicitly */ + /* assume a previous shape that includes the entire image. */ + if (!Shapes->sign) + result = 1; + + for( i=0; inShapes; i++, Shapes++ ) { + + /* only need to test if */ + /* the point is not already included and this is an include region, */ + /* or the point is included and this is an excluded region */ + + if ( (!result && Shapes->sign) || (result && !Shapes->sign) ) { + + result = 1; + + switch( Shapes->shape ) { + + case box_rgn: + /* Shift origin to center of region */ + xprime = X - Shapes->param.gen.p[0]; + yprime = Y - Shapes->param.gen.p[1]; + + /* Rotate point to region's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + dx = 0.5 * Shapes->param.gen.p[2]; + dy = 0.5 * Shapes->param.gen.p[3]; + if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) + result = 0; + break; + + case rectangle_rgn: + /* Shift origin to center of region */ + xprime = X - Shapes->param.gen.p[5]; + yprime = Y - Shapes->param.gen.p[6]; + + /* Rotate point to region's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + dx = Shapes->param.gen.a; + dy = Shapes->param.gen.b; + if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) + result = 0; + break; + + case diamond_rgn: + /* Shift origin to center of region */ + xprime = X - Shapes->param.gen.p[0]; + yprime = Y - Shapes->param.gen.p[1]; + + /* Rotate point to region's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + dx = 0.5 * Shapes->param.gen.p[2]; + dy = 0.5 * Shapes->param.gen.p[3]; + r = fabs(x/dx) + fabs(y/dy); + if( r > 1 ) + result = 0; + break; + + case circle_rgn: + /* Shift origin to center of region */ + x = X - Shapes->param.gen.p[0]; + y = Y - Shapes->param.gen.p[1]; + + r = x*x + y*y; + if ( r > Shapes->param.gen.a ) + result = 0; + break; + + case annulus_rgn: + /* Shift origin to center of region */ + x = X - Shapes->param.gen.p[0]; + y = Y - Shapes->param.gen.p[1]; + + r = x*x + y*y; + if ( r < Shapes->param.gen.a || r > Shapes->param.gen.b ) + result = 0; + break; + + case sector_rgn: + /* Shift origin to center of region */ + x = X - Shapes->param.gen.p[0]; + y = Y - Shapes->param.gen.p[1]; + + if( x || y ) { + r = atan2( y, x ) * 180.0 / myPI; + if( Shapes->param.gen.p[2] <= Shapes->param.gen.p[3] ) { + if( r < Shapes->param.gen.p[2] || r > Shapes->param.gen.p[3] ) + result = 0; + } else { + if( r < Shapes->param.gen.p[2] && r > Shapes->param.gen.p[3] ) + result = 0; + } + } + break; + + case ellipse_rgn: + /* Shift origin to center of region */ + xprime = X - Shapes->param.gen.p[0]; + yprime = Y - Shapes->param.gen.p[1]; + + /* Rotate point to region's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + x /= Shapes->param.gen.p[2]; + y /= Shapes->param.gen.p[3]; + r = x*x + y*y; + if( r>1.0 ) + result = 0; + break; + + case elliptannulus_rgn: + /* Shift origin to center of region */ + xprime = X - Shapes->param.gen.p[0]; + yprime = Y - Shapes->param.gen.p[1]; + + /* Rotate point to outer ellipse's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + x /= Shapes->param.gen.p[4]; + y /= Shapes->param.gen.p[5]; + r = x*x + y*y; + if( r>1.0 ) + result = 0; + else { + /* Repeat test for inner ellipse */ + x = xprime * Shapes->param.gen.b + yprime * Shapes->param.gen.a; + y = -xprime * Shapes->param.gen.a + yprime * Shapes->param.gen.b; + + x /= Shapes->param.gen.p[2]; + y /= Shapes->param.gen.p[3]; + r = x*x + y*y; + if( r<1.0 ) + result = 0; + } + break; + + case line_rgn: + /* Shift origin to first point of line */ + xprime = X - Shapes->param.gen.p[0]; + yprime = Y - Shapes->param.gen.p[1]; + + /* Rotate point to line's orientation */ + x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; + y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; + + if( (y < -0.5) || (y >= 0.5) || (x < -0.5) + || (x >= Shapes->param.gen.a) ) + result = 0; + break; + + case point_rgn: + /* Shift origin to center of region */ + x = X - Shapes->param.gen.p[0]; + y = Y - Shapes->param.gen.p[1]; + + if ( (x<-0.5) || (x>=0.5) || (y<-0.5) || (y>=0.5) ) + result = 0; + break; + + case poly_rgn: + if( Xparam.poly.xmin || X>Shapes->param.poly.xmax + || Yparam.poly.ymin || Y>Shapes->param.poly.ymax ) + result = 0; + else + result = Pt_in_Poly( X, Y, Shapes->param.poly.nPts, + Shapes->param.poly.Pts ); + break; + } + + if( !Shapes->sign ) result = !result; + + } + } + + return( result ); +} + +/*---------------------------------------------------------------------------*/ +void fffrgn( SAORegion *Rgn ) +/* Free up memory allocated to hold the region data. */ +/*---------------------------------------------------------------------------*/ +{ + int i; + + for( i=0; inShapes; i++ ) + if( Rgn->Shapes[i].shape == poly_rgn ) + free( Rgn->Shapes[i].param.poly.Pts ); + if( Rgn->Shapes ) + free( Rgn->Shapes ); + free( Rgn ); +} + +/*---------------------------------------------------------------------------*/ +static int Pt_in_Poly( double x, + double y, + int nPts, + double *Pts ) +/* Internal routine for testing whether the coordinate x,y is within the */ +/* polygon region traced out by the array Pts. */ +/*---------------------------------------------------------------------------*/ +{ + int i, j, flag=0; + double prevX, prevY; + double nextX, nextY; + double dx, dy, Dy; + + nextX = Pts[nPts-2]; + nextY = Pts[nPts-1]; + + for( i=0; iprevY && y>=nextY) || (yprevX && x>=nextX) ) + continue; + + /* Check to see if x,y lies right on the segment */ + + if( x>=prevX || x>nextX ) { + dy = y - prevY; + Dy = nextY - prevY; + + if( fabs(Dy)<1e-10 ) { + if( fabs(dy)<1e-10 ) + return( 1 ); + else + continue; + } + + dx = prevX + ( (nextX-prevX)/(Dy) ) * dy - x; + if( dx < -1e-10 ) + continue; + if( dx < 1e-10 ) + return( 1 ); + } + + /* There is an intersection! Make sure it isn't a V point. */ + + if( y != prevY ) { + flag = 1 - flag; + } else { + j = i+1; /* Point to Y component */ + do { + if( j>1 ) + j -= 2; + else + j = nPts-1; + } while( y == Pts[j] ); + + if( (nextY-y)*(y-Pts[j]) > 0 ) + flag = 1-flag; + } + + } + return( flag ); +} + diff --git a/software/cfitsio3040/region.h b/software/cfitsio3040/region.h new file mode 100644 index 000000000..4d7c96c97 --- /dev/null +++ b/software/cfitsio3040/region.h @@ -0,0 +1,80 @@ +/***************************************************************/ +/* REGION STUFF */ +/***************************************************************/ + +#define myPI 3.1415926535897932385 + +typedef struct { + int exists; + double xrefval, yrefval; + double xrefpix, yrefpix; + double xinc, yinc; + double rot; + char type[6]; +} WCSdata; + +typedef enum { + point_rgn, + line_rgn, + circle_rgn, + annulus_rgn, + ellipse_rgn, + elliptannulus_rgn, + box_rgn, + rectangle_rgn, + diamond_rgn, + sector_rgn, + poly_rgn +} shapeType; + +typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt; + +typedef struct { + char sign; /* Include or exclude? */ + shapeType shape; /* Shape of this region */ + + union { /* Parameters - In pixels */ + + /**** Generic Shape Data ****/ + + struct { + double p[8]; /* Region parameters */ + double sinT, cosT; /* For rotated shapes */ + double a, b; /* Extra scratch area */ + } gen; + + /**** Polygon Data ****/ + + struct { + int nPts; /* Number of Polygon pts */ + double *Pts; /* Polygon points */ + double xmin,xmax; /* Polygon bounding box */ + double ymin,ymax; + } poly; + + } param; + +} RgnShape; + +typedef struct { + int nShapes; + RgnShape *Shapes; + WCSdata wcs; +} SAORegion; + +#ifdef __cplusplus +extern "C" { +#endif + +int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status ); +int fftrgn( double X, double Y, SAORegion *Rgn ); +void fffrgn( SAORegion *Rgn ); + +#ifdef __cplusplus + } +#endif + +#define fits_read_rgnfile ffrrgn +#define fits_in_region fftrgn +#define fits_free_region fffrgn + diff --git a/software/cfitsio3040/ricecomp.c b/software/cfitsio3040/ricecomp.c new file mode 100644 index 000000000..bd184ea14 --- /dev/null +++ b/software/cfitsio3040/ricecomp.c @@ -0,0 +1,510 @@ +/* + The following code was written by Richard White at STScI and made + available for use in CFITSIO in July 1999. These routines were + originally contained in 2 source files: rcomp.c and rdecomp.c, + and the 'include' file now called ricecomp.h was originally called buffer.h. +*/ + +/*----------------------------------------------------------*/ +/* */ +/* START OF SOURCE FILE ORIGINALLY CALLED rcomp.c */ +/* */ +/*----------------------------------------------------------*/ +/* @(#) rcomp.c 1.5 99/03/01 12:40:27 */ +/* rcomp.c Compress image line using + * (1) Difference of adjacent pixels + * (2) Rice algorithm coding + * + * Returns number of bytes written to code buffer or + * -1 on failure + */ + +#include +#include +#include +#include "ricecomp.h" /* originally included in rcomp.c file (WDP) */ +#include "fitsio2.h" + + +static void start_outputing_bits(Buffer *buffer); +static int done_outputing_bits(Buffer *buffer); +static int output_nbits(Buffer *buffer, int bits, int n); + +/* this routine used to be called 'rcomp' (WDP) */ + +int fits_rcomp(int a[], /* input array */ + int nx, /* number of input pixels */ + unsigned char *c, /* output buffer */ + int clen, /* max length of output */ + int nblock) /* coding block size */ +{ +Buffer bufmem, *buffer = &bufmem; +int bsize, i, j, thisblock; +int lastpix, nextpix, pdiff; +int v, fs, fsmask, top, fsmax, fsbits, bbits; +int lbitbuffer, lbits_to_go; +unsigned int psum; +double pixelsum, dpsum; +unsigned int *diff; + + /* + * Original size of each pixel (bsize, bytes) and coding block + * size (nblock, pixels) + * Could make bsize a parameter to allow more efficient + * compression of short & byte images. + */ + bsize = 4; +/* nblock = 32; */ + /* + * From bsize derive: + * FSBITS = # bits required to store FS + * FSMAX = maximum value for FS + * BBITS = bits/pixel for direct coding + */ + switch (bsize) { + case 1: + fsbits = 3; + fsmax = 6; + break; + case 2: + fsbits = 4; + fsmax = 14; + break; + case 4: + fsbits = 5; + fsmax = 25; + break; + default: + ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); + return(-1); + } + bbits = 1<start = c; + buffer->current = c; + buffer->end = c+clen; + buffer->bits_to_go = 8; + /* + * array for differences mapped to non-negative values + */ + diff = (unsigned int *) malloc(nblock*sizeof(unsigned int)); + if (diff == (unsigned int *) NULL) { + ffpmsg("fits_rcomp: insufficient memory"); + return(-1); + } + /* + * Code in blocks of nblock pixels + */ + start_outputing_bits(buffer); + + /* write out first int value to the first 4 bytes of the buffer */ + if (output_nbits(buffer, a[0], 32) == EOF) { + ffpmsg("rice_encode: end of buffer"); + free(diff); + return(-1); + } + + lastpix = a[0]; /* the first difference will always be zero */ + + thisblock = nblock; + for (i=0; i> 1; + for (fs = 0; psum>0; fs++) psum >>= 1; + /* + * write the codes + * fsbits ID bits used to indicate split level + */ + if (fs >= fsmax) { + /* Special high entropy case when FS >= fsmax + * Just write pixel difference values directly, no Rice coding at all. + */ + if (output_nbits(buffer, fsmax+1, fsbits) == EOF) { + ffpmsg("rice_encode: end of buffer"); + free(diff); + return(-1); + } + for (j=0; jbitbuffer; + lbits_to_go = buffer->bits_to_go; + for (j=0; j> fs; + /* + * top is coded by top zeros + 1 + */ + if (lbits_to_go >= top+1) { + lbitbuffer <<= top+1; + lbitbuffer |= 1; + lbits_to_go -= top+1; + } else { + lbitbuffer <<= lbits_to_go; + if (putcbuf(lbitbuffer & 0xff,buffer) == EOF) { + ffpmsg("rice_encode: end of buffer"); + free(diff); + return(-1); + } + for (top -= lbits_to_go; top>=8; top -= 8) { + if (putcbuf(0, buffer) == EOF) { + ffpmsg("rice_encode: end of buffer"); + free(diff); + return(-1); + } + } + lbitbuffer = 1; + lbits_to_go = 7-top; + } + /* + * bottom FS bits are written without coding + * code is output_nbits, moved into this routine to reduce overheads + * This code potentially breaks if FS>24, so I am limiting + * FS to 24 by choice of FSMAX above. + */ + if (fs > 0) { + lbitbuffer <<= fs; + lbitbuffer |= v & fsmask; + lbits_to_go -= fs; + while (lbits_to_go <= 0) { + if (putcbuf((lbitbuffer>>(-lbits_to_go)) & 0xff,buffer)==EOF) { + ffpmsg("rice_encode: end of buffer"); + free(diff); + return(-1); + } + lbits_to_go += 8; + } + } + } + buffer->bitbuffer = lbitbuffer; + buffer->bits_to_go = lbits_to_go; + } + } + done_outputing_bits(buffer); + free(diff); + /* + * return number of bytes used + */ + return(buffer->current - buffer->start); +} +/*---------------------------------------------------------------------------*/ +/* bit_output.c + * + * Bit output routines + * Procedures return zero on success, EOF on end-of-buffer + * + * Programmer: R. White Date: 20 July 1998 + */ + +/* Initialize for bit output */ + +static void start_outputing_bits(Buffer *buffer) +{ + /* + * Buffer is empty to start with + */ + buffer->bitbuffer = 0; + buffer->bits_to_go = 8; +} + +/*---------------------------------------------------------------------------*/ +/* Output N bits (N must be <= 32) */ + +static int output_nbits(Buffer *buffer, int bits, int n) +{ +/* local copies */ +int lbitbuffer; +int lbits_to_go; + + /* + * insert bits at end of bitbuffer + */ + lbitbuffer = buffer->bitbuffer; + lbits_to_go = buffer->bits_to_go; + if (lbits_to_go+n > 32) { + /* + * special case for large n: put out the top lbits_to_go bits first + * note that 0 < lbits_to_go <= 8 + */ + lbitbuffer <<= lbits_to_go; + lbitbuffer |= (bits>>(n-lbits_to_go)) & ((1<>(-lbits_to_go)) & 0xff,buffer) == EOF) + return(EOF); + lbits_to_go += 8; + } + buffer->bitbuffer = lbitbuffer; + buffer->bits_to_go = lbits_to_go; + return(0); +} + +/*---------------------------------------------------------------------------*/ +/* Flush out the last bits */ + +static int done_outputing_bits(Buffer *buffer) +{ + if(buffer->bits_to_go < 8) { + if (putcbuf(buffer->bitbuffer<bits_to_go,buffer) == EOF) + return(EOF); + } + return(0); +} +/*---------------------------------------------------------------------------*/ +/*----------------------------------------------------------*/ +/* */ +/* START OF SOURCE FILE ORIGINALLY CALLED rdecomp.c */ +/* */ +/*----------------------------------------------------------*/ + +/* @(#) rdecomp.c 1.4 99/03/01 12:38:41 */ +/* rdecomp.c Decompress image line using + * (1) Difference of adjacent pixels + * (2) Rice algorithm coding + * + * Returns 0 on success or 1 on failure + */ + +/* moved these 'includes' to the beginning of the file (WDP) +#include +#include +*/ + +/* this routine used to be called 'rdecomp' (WDP) */ + +int fits_rdecomp (unsigned char *c, /* input buffer */ + int clen, /* length of input */ + unsigned int array[], /* output array */ + int nx, /* number of output pixels */ + int nblock) /* coding block size */ +{ +int bsize, i, k, imax; +int nbits, nzero, fs; +unsigned char *cend, bytevalue; +unsigned int b, diff, lastpix; +int fsmax, fsbits, bbits; +static int *nonzero_count = (int *)NULL; + + /* + * Original size of each pixel (bsize, bytes) and coding block + * size (nblock, pixels) + * Could make bsize a parameter to allow more efficient + * compression of short & byte images. + */ + bsize = 4; +/* nblock = 32; */ + /* + * From bsize derive: + * FSBITS = # bits required to store FS + * FSMAX = maximum value for FS + * BBITS = bits/pixel for direct coding + */ + switch (bsize) { + case 1: + fsbits = 3; + fsmax = 6; + break; + case 2: + fsbits = 4; + fsmax = 14; + break; + case 4: + fsbits = 5; + fsmax = 25; + break; + default: + ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); + return 1; + } + bbits = 1<=0; ) { + for ( ; i>=k; i--) nonzero_count[i] = nzero; + k = k/2; + nzero--; + } + } + /* + * Decode in blocks of nblock pixels + */ + + /* first 4 bytes of input buffer contain the value of the first */ + /* 4 byte integer value, without any encoding */ + + lastpix = 0; + bytevalue = c[0]; + lastpix = lastpix | (bytevalue<<24); + bytevalue = c[1]; + lastpix = lastpix | (bytevalue<<16); + bytevalue = c[2]; + lastpix = lastpix | (bytevalue<<8); + bytevalue = c[3]; + lastpix = lastpix | bytevalue; + + c += 4; + cend = c + clen - 4; + + b = *c++; /* bit buffer */ + nbits = 8; /* number of bits remaining in b */ + for (i = 0; i> nbits) - 1; + b &= (1< nx) imax = nx; + if (fs<0) { + /* low-entropy case, all zero differences */ + for ( ; i= 0; k -= 8) { + b = *c++; + diff |= b<0) { + b = *c++; + diff |= b>>(-k); + b &= (1<>1; + } else { + diff = ~(diff>>1); + } + array[i] = diff+lastpix; + lastpix = array[i]; + } + } else { + /* normal case, Rice coding */ + for ( ; i>nbits); + b &= (1<>1; + } else { + diff = ~(diff>>1); + } + array[i] = diff+lastpix; + lastpix = array[i]; + } + } + if (c > cend) { + ffpmsg("decompression error: hit end of compressed byte stream"); + return 1; + } + } + if (c < cend) { + ffpmsg("decompression warning: unused bytes at end of compressed buffer"); + } + return 0; +} diff --git a/software/cfitsio3040/ricecomp.h b/software/cfitsio3040/ricecomp.h new file mode 100644 index 000000000..4a48328e8 --- /dev/null +++ b/software/cfitsio3040/ricecomp.h @@ -0,0 +1,107 @@ +/* @(#) buffer.h 1.1 98/07/21 12:34:27 */ +/* buffer.h: structure for compression to buffer rather than to a file, including + * bit I/O buffer + * + * R. White, 19 June 1998 + */ + + +typedef unsigned char Buffer_t; + +typedef struct { + int bitbuffer; /* bit buffer */ + int bits_to_go; /* bits to go in buffer */ + Buffer_t *start; /* start of buffer */ + Buffer_t *current; /* current position in buffer */ + Buffer_t *end; /* end of buffer */ +} Buffer; + +#define buffree(mf) (free(mf->start), free(mf)) +#define bufused(mf) (mf->current - mf->start) +#define bufreset(mf) (mf->current = mf->start) + +/* + * getcbuf, putcbuf macros for character IO to buffer + * putcbuf returns EOF on end of buffer, else returns 0 + */ +#define getcbuf(mf) ((mf->current >= mf->end) ? EOF : *(mf->current)++) +#define putcbuf(c,mf) \ + ((mf->current >= mf->end) ? \ + EOF :\ + ((*(mf->current)++ = c), 0)) + +/* + * bufalloc sets up buffer of length n + */ + +/* not needed by CFITSIO + +static Buffer *bufalloc(int n) +{ +Buffer *mf; + + mf = (Buffer *) malloc(sizeof(Buffer)); + if (mf == (Buffer *)NULL) return((Buffer *)NULL); + + mf->start = (Buffer_t *) malloc(n*sizeof(Buffer_t)); + if (mf->start == (Buffer_t *)NULL) { + free(mf); + return((Buffer *)NULL); + } + mf->bits_to_go = 8; + mf->end = mf->start + n; + mf->current = mf->start; + return(mf); +} +*/ + +/* + * bufrealloc extends buffer (or truncates it) by + * reallocating memory + */ + +/* not needed by CFITSIO +static int bufrealloc(Buffer *mf, int n) +{ +int len; + + len = mf->current - mf->start; + + * silently throw away data if buffer is already longer than n * + if (len>n) len = n; + if (len<0) len = 0; + + mf->start = (Buffer_t *) realloc(mf->start, n*sizeof(Buffer_t)); + if (mf->start == (Buffer_t *)NULL) return(0); + + mf->end = mf->start + n; + mf->current = mf->start + len; + return(n); +} +*/ + +/* + * bufdump dumps contents of buffer to outfile and resets + * it to be empty. Returns number of bytes written. + * + * Note we don't write out the bit buffer -- you must call + * done_outputing_bits() first to ensure that the bit buffer + * is written out. I do it this way to allow incremental + * buffer dumps while bit IO is still going on. + */ + +/* not needed by CFITSIO + +static int bufdump(FILE *outfile, Buffer *buffer) +{ +int ndump; + + ndump = bufused(buffer); + if (fwrite(buffer->start, 1, ndump, outfile) != ndump) { + fprintf(stderr, "bufdump: error in write\n"); + exit(1); + } + bufreset(buffer); + return(ndump); +} +*/ diff --git a/software/cfitsio3040/sample.tpl b/software/cfitsio3040/sample.tpl new file mode 100644 index 000000000..8cfca14e7 --- /dev/null +++ b/software/cfitsio3040/sample.tpl @@ -0,0 +1,121 @@ +# sample template - create 9 HDUs in one FITS file + +# syntax : + +# everything which starts with a hashmark is ignored +# the same for empty lines + +# one can use \include filename to include other files +# equal sign after keyword name is optional +# \group must be terminated by \end +# xtension is terminated by \group, xtension or EOF +# First HDU of type image may be defined using "SIMPLE T" +# group may contain other groups and xtensions +# keywords may be indented, but indentation is limited to max 7chars. + +# template parser processes all keywords, makes substitutions +# when necessary (hashmarks -> index), converts keyword names +# to uppercase and writes keywords to file. +# For string keywords, parser uses CFITSIO long string routines +# to store string values longer than 72 characters. Parser can +# read/process lines of any length, as long as there is enough memory. +# For a very limited set of keywords (like NAXIS1 for binary tables) +# template parser ignores values specified in template file +# (one should not specify NAXIS1 for binary tables) and computes and +# writes values respective to table structure. +# number of rows in binary/ascii tables can be specified with NAXIS2 + +# if the 1st HDU is not defined with "SIMPLE T" and is defined with +# xtension image/asciitable/bintable then dummy primary HDU is +# created by parser. + +simple t + bitpix 16 + naxis 1 + naxis1 10 +COMMENT + comment + sdsdf / keyword without value (null type) + if line begins with 8+ spaces everything is a comment + +xtension image + bitpix 16 + naxis 1 + naxis1 10 + QWERW F / dfg dfgsd fg - boolean keyword + FFFSDS45 3454345 /integer_or_real keyword + SSSDFS34 32345.453 / real keyword + adsfd34 (234234.34,2342342.3) / complex keyword - no space between () + SDFDF# adfasdfasdfdfcvxccvzxcvcvcxv / autoindexed keyword, here idx=1 + SDFD# 'asf dfa dfad df dfad f ad fadfdaf dfdfa df loooooong keyyywoooord - reaaalllly verrrrrrrrrryy loooooooooong' / comment is max 80 chars + history history record, spaces (all but 1st) after keyname are copied + SDFDF# strg_value_without_spaces / autoindexed keyword, here idx=2 + comment comment record, spaces (all but 1st) after keyname are copied + strg45 'sdfasdfadfffdfasdfasdfasdf &' + continue 'sdfsdfsdfsd fsdf' / 3 spaces must follow CONTINUE keyword + + +xtension image + bitpix 16 + naxis 1 + naxis1 10 + +\group + + xtension image + bitpix 16 + naxis 1 + naxis1 10 + +# create group inside group + + \group + +# one can specify additional columns in group HDU. The first column +# specified will have index 7 however, since the first 6 columns are occupied +# by grouping table itself. +# Please note, that it is not allowed to specify EXTNAME keyword as an +# additional keyword for group HDU, since parser automatically writes +# EXTNAME = GROUPING keyword. + + TFORM# 13A + TTYPE# ADDIT_COL_IN_GRP_HDU + TFORM# 1E + TTYPE# REAL_COLUMN + COMMENT sure, there is always place for comments + +# the following specifies empty ascii table (0 cols / 0 rows) + + xtension asciitable + + \end + +\end + +# one do not have to specify all NAXISn keywords. If not specified +# NAXISn equals zero. + +xtension image + bitpix 16 + naxis 1 +# naxis1 10 + +# the following tells how to set number of rows in binary table +# note also that the last line in template file does not have to +# have LineFeed character as the last one. + +xtension bintable +naxis2 10 +EXTNAME asdjfhsdkf +TTYPE# MEMBER_XTENSION +TFORM# 8A +TTYPE# MEMBER_2 +TFORM# 8U +TTYPE# MEMBER_3 +TFORM# 8V +TTYPE# MEMBER_NAME +TFORM# 32A +TDIM# '(8,4)' +TTYPE# MEMBER_VERSION +TFORM# 1J +TNULL# 0 \ No newline at end of file diff --git a/software/cfitsio3040/scalnull.c b/software/cfitsio3040/scalnull.c new file mode 100644 index 000000000..de0a974cf --- /dev/null +++ b/software/cfitsio3040/scalnull.c @@ -0,0 +1,230 @@ +/* This file, scalnull.c, contains the FITSIO routines used to define */ +/* the starting heap address, the value scaling and the null values. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +int ffpthp(fitsfile *fptr, /* I - FITS file pointer */ + long theap, /* I - starting addrss for the heap */ + int *status) /* IO - error status */ +/* + Define the starting address for the heap for a binary table. + The default address is NAXIS1 * NAXIS2. It is in units of + bytes relative to the beginning of the regular binary table data. + This routine also writes the appropriate THEAP keyword to the + FITS header. +*/ +{ + if (*status > 0 || theap < 1) + return(*status); + + /* reset position to the correct HDU if necessary */ + if (fptr->HDUposition != (fptr->Fptr)->curhdu) + ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); + + (fptr->Fptr)->heapstart = theap; + + ffukyj(fptr, "THEAP", theap, "byte offset to heap area", status); + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpscl(fitsfile *fptr, /* I - FITS file pointer */ + double scale, /* I - scaling factor: value of BSCALE */ + double zero, /* I - zero point: value of BZERO */ + int *status) /* IO - error status */ +/* + Define the linear scaling factor for the primary array or image extension + pixel values. This routine overrides the scaling values given by the + BSCALE and BZERO keywords if present. Note that this routine does not + write or modify the BSCALE and BZERO keywords, but instead only modifies + the values temporarily in the internal buffer. Thus, a subsequent call to + the ffrdef routine will reset the scaling back to the BSCALE and BZERO + keyword values (or 1. and 0. respectively if the keywords are not present). +*/ +{ + tcolumn *colptr; + int hdutype; + + if (*status > 0) + return(*status); + + if (scale == 0) + return(*status = ZERO_SCALE); /* zero scale value is illegal */ + + if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ + return(*status); + + if (hdutype != IMAGE_HDU) + return(*status = NOT_IMAGE); /* not proper HDU type */ + + if (fits_is_compressed_image(fptr, status)) /* compressed images */ + { + (fptr->Fptr)->cn_bscale = scale; + (fptr->Fptr)->cn_bzero = zero; + + return(*status); + } + + /* set pointer to the first 'column' (contains group parameters if any) */ + colptr = (fptr->Fptr)->tableptr; + + colptr++; /* increment to the 2nd 'column' pointer (the image itself) */ + + colptr->tscale = scale; + colptr->tzero = zero; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffpnul(fitsfile *fptr, /* I - FITS file pointer */ + LONGLONG nulvalue, /* I - null pixel value: value of BLANK */ + int *status) /* IO - error status */ +/* + Define the value used to represent undefined pixels in the primary array or + image extension. This only applies to integer image pixel (i.e. BITPIX > 0). + This routine overrides the null pixel value given by the BLANK keyword + if present. Note that this routine does not write or modify the BLANK + keyword, but instead only modifies the value temporarily in the internal + buffer. Thus, a subsequent call to the ffrdef routine will reset the null + value back to the BLANK keyword value (or not defined if the keyword is not + present). +*/ +{ + tcolumn *colptr; + int hdutype; + + if (*status > 0) + return(*status); + + if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ + return(*status); + + if (hdutype != IMAGE_HDU) + return(*status = NOT_IMAGE); /* not proper HDU type */ + + if (fits_is_compressed_image(fptr, status)) /* ignore compressed images */ + return(*status); + + /* set pointer to the first 'column' (contains group parameters if any) */ + colptr = (fptr->Fptr)->tableptr; + + colptr++; /* increment to the 2nd 'column' pointer (the image itself) */ + + colptr->tnull = nulvalue; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftscl(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number to apply scaling to */ + double scale, /* I - scaling factor: value of TSCALn */ + double zero, /* I - zero point: value of TZEROn */ + int *status) /* IO - error status */ +/* + Define the linear scaling factor for the TABLE or BINTABLE extension + column values. This routine overrides the scaling values given by the + TSCALn and TZEROn keywords if present. Note that this routine does not + write or modify the TSCALn and TZEROn keywords, but instead only modifies + the values temporarily in the internal buffer. Thus, a subsequent call to + the ffrdef routine will reset the scaling back to the TSCALn and TZEROn + keyword values (or 1. and 0. respectively if the keywords are not present). +*/ +{ + tcolumn *colptr; + int hdutype; + + if (*status > 0) + return(*status); + + if (scale == 0) + return(*status = ZERO_SCALE); /* zero scale value is illegal */ + + if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ + return(*status); + + if (hdutype == IMAGE_HDU) + return(*status = NOT_TABLE); /* not proper HDU type */ + + colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ + colptr += (colnum - 1); /* increment to the correct column */ + + colptr->tscale = scale; + colptr->tzero = zero; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int fftnul(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number to apply nulvalue to */ + LONGLONG nulvalue, /* I - null pixel value: value of TNULLn */ + int *status) /* IO - error status */ +/* + Define the value used to represent undefined pixels in the BINTABLE column. + This only applies to integer datatype columns (TFORM = B, I, or J). + This routine overrides the null pixel value given by the TNULLn keyword + if present. Note that this routine does not write or modify the TNULLn + keyword, but instead only modifies the value temporarily in the internal + buffer. Thus, a subsequent call to the ffrdef routine will reset the null + value back to the TNULLn keyword value (or not defined if the keyword is not + present). +*/ +{ + tcolumn *colptr; + int hdutype; + + if (*status > 0) + return(*status); + + if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ + return(*status); + + if (hdutype != BINARY_TBL) + return(*status = NOT_BTABLE); /* not proper HDU type */ + + colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ + colptr += (colnum - 1); /* increment to the correct column */ + + colptr->tnull = nulvalue; + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffsnul(fitsfile *fptr, /* I - FITS file pointer */ + int colnum, /* I - column number to apply nulvalue to */ + char *nulstring, /* I - null pixel value: value of TNULLn */ + int *status) /* IO - error status */ +/* + Define the string used to represent undefined pixels in the ASCII TABLE + column. This routine overrides the null value given by the TNULLn keyword + if present. Note that this routine does not write or modify the TNULLn + keyword, but instead only modifies the value temporarily in the internal + buffer. Thus, a subsequent call to the ffrdef routine will reset the null + value back to the TNULLn keyword value (or not defined if the keyword is not + present). +*/ +{ + tcolumn *colptr; + int hdutype; + + if (*status > 0) + return(*status); + + if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ + return(*status); + + if (hdutype != ASCII_TBL) + return(*status = NOT_ATABLE); /* not proper HDU type */ + + colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ + colptr += (colnum - 1); /* increment to the correct column */ + + colptr->strnull[0] = '\0'; + strncat(colptr->strnull, nulstring, 19); /* limit string to 19 chars */ + + return(*status); +} diff --git a/software/cfitsio3040/smem.c b/software/cfitsio3040/smem.c new file mode 100644 index 000000000..bf8237018 --- /dev/null +++ b/software/cfitsio3040/smem.c @@ -0,0 +1,77 @@ +#include +#include +#include +#ifdef __APPLE__ +#include +#else +#include +#endif +#include "fitsio.h" /* needed to define LONGLONG */ +#include "drvrsmem.h" /* uses LONGLONG */ + +int main(int argc, char **argv) +{ int cmdok, listmode, longlistmode, recovermode, deletemode, id; +int status; +char *address; + +listmode = longlistmode = recovermode = deletemode = 0; +id = -1; +cmdok = 1; + +switch (argc) + { case 1: listmode = 1; + break; + case 2: + if (0 == strcmp("-l", argv[1])) longlistmode = 1; + else if (0 == strcmp("-r", argv[1])) recovermode = 1; + else if (0 == strcmp("-d", argv[1])) deletemode = 1; + else cmdok = 0; + break; + case 3: + if (0 == strcmp("-r", argv[1])) recovermode = 1; + else if (0 == strcmp("-d", argv[1])) deletemode = 1; + else + { cmdok = 0; /* signal invalid cmd line syntax */ + break; + } + if (1 != sscanf(argv[2], "%d", &id)) cmdok = 0; + break; + default: + cmdok = 0; + break; + } + +if (0 == cmdok) + { printf("usage :\n\n"); + printf("smem - list all shared memory segments\n"); + printf("\t!\tcouldn't obtain RDONLY lock - info unreliable\n"); + printf("\tIdx\thandle of shared memory segment (visible by application)\n"); + printf("\tKey\tcurrent system key of shared memory segment. Key\n"); + printf("\t\tchanges whenever shmem segment is reallocated. Use\n"); + printf("\t\tipcs (or ipcs -a) to view all shmem segments\n"); + printf("\tNproc\tnumber of processes attached to segment\n"); + printf("\tSize\tsize of shmem segment in bytes\n"); + printf("\tFlags\tRESIZABLE - realloc allowed, PERSIST - segment is not\n"); + printf("\t\tdeleted after shared_free called by last process attached\n"); + printf("\t\tto it.\n"); + printf("smem -d - delete all shared memory segments (may block)\n"); + printf("smem -d id - delete specific shared memory segment (may block)\n"); + printf("smem -r - unconditionally reset all shared memory segments\n\t\t(does not block, recovers zombie handles left by kill -9)\n"); + printf("smem -r id - unconditionally reset specific shared memory segment\n"); + } + +if (shared_init(0)) + { printf("couldn't initialize shared memory, aborting ...\n"); + return(10); + } + +if (listmode) shared_list(id); +else if (recovermode) shared_recover(id); +else if (deletemode) shared_uncond_delete(id); + +for (id = 0; id <16; id++) { + status = shared_getaddr(id, &address); + if (!status)printf("id, status, address %d %d %ld %.30s\n", id, status, address, address); +} +return(0); +} diff --git a/software/cfitsio3040/speed.c b/software/cfitsio3040/speed.c new file mode 100644 index 000000000..e9481cb73 --- /dev/null +++ b/software/cfitsio3040/speed.c @@ -0,0 +1,483 @@ +#include +#include +#include +#include + +/* + Every program which uses the CFITSIO interface must include the + the fitsio.h header file. This contains the prototypes for all + the routines and defines the error status values and other symbolic + constants used in the interface. +*/ +#include "fitsio.h" + +#define minvalue(A,B) ((A) < (B) ? (A) : (B)) + +/* size of the image */ +#define XSIZE 3000 +#define YSIZE 3000 + +/* size of data buffer */ +#define SHTSIZE 20000 +static long sarray[ SHTSIZE ] = {SHTSIZE * 0}; + +/* no. of rows in binary table */ +#define BROWS 2500000 + +/* no. of rows in ASCII table */ +#define AROWS 400000 + +/* CLOCKS_PER_SEC should be defined by most compilers */ +#if defined(CLOCKS_PER_SEC) +#define CLOCKTICKS CLOCKS_PER_SEC +#else +/* on SUN OS machine, CLOCKS_PER_SEC is not defined, so set its value */ +#define CLOCKTICKS 1000000 +#define difftime(A,B) ((double) A - (double) B) +#endif + +/* define variables for measuring elapsed time */ +clock_t scpu, ecpu; +time_t start, finish; + +int writeimage(fitsfile *fptr, int *status); +int writebintable(fitsfile *fptr, int *status); +int writeasctable(fitsfile *fptr, int *status); +int readimage(fitsfile *fptr, int *status); +int readatable(fitsfile *fptr, int *status); +int readbtable(fitsfile *fptr, int *status); +void printerror( int status); +int marktime(int *status); +int gettime(double *elapse, float *elapscpu, int *status); +int main(void); + +int main() +{ +/************************************************************************* + This program tests the speed of writing/reading FITS files with cfitsio +**************************************************************************/ + + FILE *diskfile; + fitsfile *fptr; /* pointer to the FITS file, defined in fitsio.h */ + int status, ii; + long rawloop; + char filename[] = "speedcc.fit"; /* name for new FITS file */ + char buffer[2880] = {2880 * 0}; + time_t tbegin, tend; + float rate, size, elapcpu, cpufrac; + double elapse; + + tbegin = time(0); + + remove(filename); /* Delete old file if it already exists */ + + diskfile = fopen(filename,"w+b"); + rawloop = XSIZE * YSIZE / 720; + + printf(" "); + printf(" SIZE / ELAPSE(%%CPU) = RATE\n"); + printf("RAW fwrite (2880 bytes/loop)... "); + marktime(&status); + + for (ii = 0; ii < rawloop; ii++) + if (fwrite(buffer, 1, 2880, diskfile) != 2880) + printf("write error \n"); + + gettime(&elapse, &elapcpu, &status); + + cpufrac = elapcpu / elapse * 100.; + size = 2880. * rawloop / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + /* read back the binary records */ + fseek(diskfile, 0, 0); + + printf("RAW fread (2880 bytes/loop)... "); + marktime(&status); + + for (ii = 0; ii < rawloop; ii++) + if (fread(buffer, 1, 2880, diskfile) != 2880) + printf("read error \n"); + + gettime(&elapse, &elapcpu, &status); + + cpufrac = elapcpu / elapse * 100.; + size = 2880. * rawloop / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + fclose(diskfile); + remove(filename); + + status = 0; + fptr = 0; + + if (fits_create_file(&fptr, filename, &status)) /* create new FITS file */ + printerror( status); + + if (writeimage(fptr, &status)) + printerror( status); + + if (writebintable(fptr, &status)) + printerror( status); + + if (writeasctable(fptr, &status)) + printerror( status); + + if (readimage(fptr, &status)) + printerror( status); + + if (readbtable(fptr, &status)) + printerror( status); + + if (readatable(fptr, &status)) + printerror( status); + + if (fits_close_file(fptr, &status)) + printerror( status ); + + tend = time(0); + elapse = difftime(tend, tbegin) + 0.5; + printf("Total elapsed time = %.1fs, status = %d\n",elapse, status); + return(0); +} +/*--------------------------------------------------------------------------*/ +int writeimage(fitsfile *fptr, int *status) + + /**************************************************/ + /* write the primary array containing a 2-D image */ + /**************************************************/ +{ + long nremain, ii; + float rate, size, elapcpu, cpufrac; + double elapse; + + /* initialize FITS image parameters */ + int bitpix = 32; /* 32-bit signed integer pixel values */ + long naxis = 2; /* 2-dimensional image */ + long naxes[2] = {XSIZE, YSIZE }; /* image size */ + + /* write the required keywords for the primary array image */ + if ( fits_create_img(fptr, bitpix, naxis, naxes, status) ) + printerror( *status ); + + printf("\nWrite %dx%d I*4 image, %d pixels/loop: ",XSIZE,YSIZE,SHTSIZE); + marktime(status); + + nremain = XSIZE * YSIZE; + for (ii = 1; ii <= nremain; ii += SHTSIZE) + { + ffpprj(fptr, 0, ii, SHTSIZE, sarray, status); + } + + ffflus(fptr, status); /* flush all buffers to disk */ + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = XSIZE * 4. * YSIZE / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int writebintable (fitsfile *fptr, int *status) + + /*********************************************************/ + /* Create a binary table extension containing 3 columns */ + /*********************************************************/ +{ + int tfields = 2; + long nremain, ntodo, firstrow = 1, firstelem = 1, nrows; + float rate, size, elapcpu, cpufrac; + double elapse; + + char extname[] = "Speed_Test"; /* extension name */ + + /* define the name, datatype, and physical units for the columns */ + char *ttype[] = { "first", "second" }; + char *tform[] = {"1J", "1J" }; + char *tunit[] = { " ", " " }; + + /* append a new empty binary table onto the FITS file */ + + if ( fits_create_tbl( fptr, BINARY_TBL, BROWS, tfields, ttype, tform, + tunit, extname, status) ) + printerror( *status ); + + /* get table row size and optimum number of rows to write per loop */ + fits_get_rowsize(fptr, &nrows, status); + nrows = minvalue(nrows, SHTSIZE); + nremain = BROWS; + + printf("Write %7drow x %dcol bintable %4ld rows/loop:", BROWS, tfields, + nrows); + marktime(status); + + while(nremain) + { + ntodo = minvalue(nrows, nremain); + ffpclj(fptr, 1, firstrow, firstelem, ntodo, sarray, status); + ffpclj(fptr, 2, firstrow, firstelem, ntodo, sarray, status); + firstrow += ntodo; + nremain -= ntodo; + } + + ffflus(fptr, status); /* flush all buffers to disk */ + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = BROWS * 8. / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int writeasctable (fitsfile *fptr, int *status) + + /*********************************************************/ + /* Create an ASCII table extension containing 2 columns */ + /*********************************************************/ +{ + int tfields = 2; + long nremain, ntodo, firstrow = 1, firstelem = 1; + long nrows; + float rate, size, elapcpu, cpufrac; + double elapse; + + char extname[] = "Speed_Test"; /* extension name */ + + /* define the name, datatype, and physical units for the columns */ + char *ttype[] = { "first", "second" }; + char *tform[] = {"I6", "I6" }; + char *tunit[] = { " ", " " }; + + /* append a new empty ASCII table onto the FITS file */ + if ( fits_create_tbl( fptr, ASCII_TBL, AROWS, tfields, ttype, tform, + tunit, extname, status) ) + printerror( *status ); + + /* get table row size and optimum number of rows to write per loop */ + fits_get_rowsize(fptr, &nrows, status); + nrows = minvalue(nrows, SHTSIZE); + nremain = AROWS; + + printf("Write %7drow x %dcol asctable %4ld rows/loop:", AROWS, tfields, + nrows); + marktime(status); + + while(nremain) + { + ntodo = minvalue(nrows, nremain); + ffpclj(fptr, 1, firstrow, firstelem, ntodo, sarray, status); + ffpclj(fptr, 2, firstrow, firstelem, ntodo, sarray, status); + firstrow += ntodo; + nremain -= ntodo; + } + + ffflus(fptr, status); /* flush all buffers to disk */ + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = AROWS * 13. / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int readimage( fitsfile *fptr, int *status ) + + /*********************/ + /* Read a FITS image */ + /*********************/ +{ + int anynull, hdutype; + long nremain, ii; + long longnull = 0; + float rate, size, elapcpu, cpufrac; + double elapse; + + /* move to the primary array */ + if ( fits_movabs_hdu(fptr, 1, &hdutype, status) ) + printerror( *status ); + + printf("\nRead back image "); + marktime(status); + + nremain = XSIZE * YSIZE; + for (ii=1; ii <= nremain; ii += SHTSIZE) + { + ffgpvj(fptr, 0, ii, SHTSIZE, longnull, sarray, &anynull, status); + } + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = XSIZE * 4. * YSIZE / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int readbtable( fitsfile *fptr, int *status ) + + /************************************************************/ + /* read and print data values from the binary table */ + /************************************************************/ +{ + int hdutype, anynull; + long nremain, ntodo, firstrow = 1, firstelem = 1; + long nrows; + long lnull = 0; + float rate, size, elapcpu, cpufrac; + double elapse; + + /* move to the table */ + if ( fits_movrel_hdu(fptr, 1, &hdutype, status) ) + printerror( *status ); + + /* get table row size and optimum number of rows to read per loop */ + fits_get_rowsize(fptr, &nrows, status); + nrows = minvalue(nrows, SHTSIZE); + + /* read the columns */ + nremain = BROWS; + + printf("Read back BINTABLE "); + marktime(status); + + while(nremain) + { + ntodo = minvalue(nrows, nremain); + ffgcvj(fptr, 1, firstrow, firstelem, ntodo, + lnull, sarray, &anynull, status); + ffgcvj(fptr, 2, firstrow, firstelem, ntodo, + lnull, sarray, &anynull, status); + firstrow += ntodo; + nremain -= ntodo; + } + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = BROWS * 8. / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int readatable( fitsfile *fptr, int *status ) + + /************************************************************/ + /* read and print data values from an ASCII or binary table */ + /************************************************************/ +{ + int hdutype, anynull; + long nremain, ntodo, firstrow = 1, firstelem = 1; + long nrows; + long lnull = 0; + float rate, size, elapcpu, cpufrac; + double elapse; + + /* move to the table */ + if ( fits_movrel_hdu(fptr, 1, &hdutype, status) ) + printerror( *status ); + + /* get table row size and optimum number of rows to read per loop */ + fits_get_rowsize(fptr, &nrows, status); + nrows = minvalue(nrows, SHTSIZE); + + /* read the columns */ + nremain = AROWS; + + printf("Read back ASCII Table "); + marktime(status); + + while(nremain) + { + ntodo = minvalue(nrows, nremain); + ffgcvj(fptr, 1, firstrow, firstelem, ntodo, + lnull, sarray, &anynull, status); + ffgcvj(fptr, 2, firstrow, firstelem, ntodo, + lnull, sarray, &anynull, status); + firstrow += ntodo; + nremain -= ntodo; + } + + gettime(&elapse, &elapcpu, status); + + cpufrac = elapcpu / elapse * 100.; + size = AROWS * 13. / 1000000.; + rate = size / elapse; + printf(" %4.1fMB/%4.1fs(%3.0f) = %5.2fMB/s\n", size, elapse, cpufrac,rate); + + return( *status ); +} +/*--------------------------------------------------------------------------*/ +void printerror( int status) +{ + /*****************************************************/ + /* Print out cfitsio error messages and exit program */ + /*****************************************************/ + + char status_str[FLEN_STATUS], errmsg[FLEN_ERRMSG]; + + if (status) + fprintf(stderr, "\n*** Error occurred during program execution ***\n"); + + fits_get_errstatus(status, status_str); /* get the error description */ + fprintf(stderr, "\nstatus = %d: %s\n", status, status_str); + + /* get first message; null if stack is empty */ + if ( fits_read_errmsg(errmsg) ) + { + fprintf(stderr, "\nError message stack:\n"); + fprintf(stderr, " %s\n", errmsg); + + while ( fits_read_errmsg(errmsg) ) /* get remaining messages */ + fprintf(stderr, " %s\n", errmsg); + } + + exit( status ); /* terminate the program, returning error status */ +} +/*--------------------------------------------------------------------------*/ +int marktime( int *status) +{ + double telapse; + time_t temp; + + temp = time(0); + + /* Since elapsed time is only measured to the nearest second */ + /* keep getting the time until the seconds tick just changes. */ + /* This provides more consistent timing measurements since the */ + /* intervals all start on an integer seconds. */ + + telapse = 0.; + while (telapse == 0.) + { + scpu = clock(); + start = time(0); + telapse = difftime( start, temp ); + } + return( *status ); +} +/*--------------------------------------------------------------------------*/ +int gettime(double *elapse, float *elapscpu, int *status) +{ + ecpu = clock(); + finish = time(0); + + *elapse = difftime(finish, start) + 0.5; + *elapscpu = (ecpu - scpu) * 1.0 / CLOCKTICKS; + + return( *status ); +} diff --git a/software/cfitsio3040/swapproc.c b/software/cfitsio3040/swapproc.c new file mode 100644 index 000000000..247e49330 --- /dev/null +++ b/software/cfitsio3040/swapproc.c @@ -0,0 +1,98 @@ +/* This file, swapproc.c, contains general utility routines that are */ +/* used by other FITSIO routines to swap bytes. */ + +/* The FITSIO software was written by William Pence at the High Energy */ +/* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ +/* Goddard Space Flight Center. */ + +#include +#include +#include "fitsio2.h" +/*--------------------------------------------------------------------------*/ +void ffswap2(short *svalues, /* IO - pointer to shorts to be swapped */ + long nvals) /* I - number of shorts to be swapped */ +/* + swap the bytes in the input short integers: ( 0 1 -> 1 0 ) +*/ +{ + register char *cvalues; + register long ii; + + union u_tag { + char cvals[2]; /* equivalence an array of 4 bytes with */ + short sval; /* a short */ + } u; + + cvalues = (char *) svalues; /* copy the initial pointer value */ + + for (ii = 0; ii < nvals;) + { + u.sval = svalues[ii++]; /* copy next short to temporary buffer */ + + *cvalues++ = u.cvals[1]; /* copy the 2 bytes to output in turn */ + *cvalues++ = u.cvals[0]; + } + return; +} +/*--------------------------------------------------------------------------*/ +void ffswap4(INT32BIT *ivalues, /* IO - pointer to floats to be swapped */ + long nvals) /* I - number of floats to be swapped */ +/* + swap the bytes in the input 4-byte integer: ( 0 1 2 3 -> 3 2 1 0 ) +*/ +{ + register char *cvalues; + register long ii; + + union u_tag { + char cvals[4]; /* equivalence an array of 4 bytes with */ + INT32BIT ival; /* a float */ + } u; + + cvalues = (char *) ivalues; /* copy the initial pointer value */ + + for (ii = 0; ii < nvals;) + { + u.ival = ivalues[ii++]; /* copy next float to buffer */ + + *cvalues++ = u.cvals[3]; /* copy the 4 bytes in turn */ + *cvalues++ = u.cvals[2]; + *cvalues++ = u.cvals[1]; + *cvalues++ = u.cvals[0]; + } + return; +} +/*--------------------------------------------------------------------------*/ +void ffswap8(double *dvalues, /* IO - pointer to doubles to be swapped */ + long nvals) /* I - number of doubles to be swapped */ +/* + swap the bytes in the input doubles: ( 01234567 -> 76543210 ) +*/ +{ + register char *cvalues; + register long ii; + register char temp; + + cvalues = (char *) dvalues; /* copy the pointer value */ + + for (ii = 0; ii < nvals*8; ii += 8) + { + temp = cvalues[ii]; + cvalues[ii] = cvalues[ii+7]; + cvalues[ii+7] = temp; + + temp = cvalues[ii+1]; + cvalues[ii+1] = cvalues[ii+6]; + cvalues[ii+6] = temp; + + temp = cvalues[ii+2]; + cvalues[ii+2] = cvalues[ii+5]; + cvalues[ii+5] = temp; + + temp = cvalues[ii+3]; + cvalues[ii+3] = cvalues[ii+4]; + cvalues[ii+4] = temp; + } + return; +} + diff --git a/software/cfitsio3040/testf77.f b/software/cfitsio3040/testf77.f new file mode 100644 index 000000000..ac3bc2172 --- /dev/null +++ b/software/cfitsio3040/testf77.f @@ -0,0 +1,2488 @@ +C This is a big and complicated program that tests most of +C the fitsio routines. This code does not represent +C the most efficient method of reading or writing FITS files +C because this code is primarily designed to stress the fitsio +C library routines. + + character asciisum*17 + character*3 cval + character*1 xinarray(21), binarray(21), boutarray(21), bnul + character colname*70, tdisp*40, nulstr*40 + character oskey*15 + character iskey*21 + character lstr*200 + character comm*73 + character*30 inskey(21) + character*30 onskey(3) + character filename*40, card*78, card2*78 + character keyword*8 + character value*68, comment*72 + character uchars*78 + character*15 ttype(10), tform(10), tunit(10) + character*15 tblname + character*15 binname + character errmsg*75 + character*8 inclist(2),exclist(2) + character*8 xctype,yctype,ctype + character*18 kunit + + logical simple,extend,larray(42), larray2(42) + logical olkey, ilkey, onlkey(3), inlkey(3), anynull + + integer*2 imgarray(19,30), imgarray2(10,20) + integer*2 iinarray(21), ioutarray(21), inul + + integer naxes(3), pcount, gcount, npixels, nrows, rowlen + integer existkeys, morekeys, keynum + integer datastatus, hdustatus + integer status, bitpix, naxis, block + integer ii, jj, jjj, hdutype, hdunum, tfields + integer nkeys, nfound, colnum, typecode, signval,nmsg + integer repeat, offset, width, jnulval + integer kinarray(21), koutarray(21), knul + integer jinarray(21), joutarray(21), jnul + integer ojkey, ijkey, otint + integer onjkey(3), injkey(3) + integer tbcol(5) + integer iunit, tmpunit + integer fpixels(2), lpixels(2), inc(2) + + real estatus, vers + real einarray(21), eoutarray(21), enul, cinarray(42) + real ofkey, oekey, iekey, onfkey(3),onekey(3), inekey(3) + + double precision dinarray(21),doutarray(21),dnul, minarray(42) + double precision scale, zero + double precision ogkey, odkey, idkey, otfrac, ongkey(3) + double precision ondkey(3), indkey(3) + double precision checksum, datsum + double precision xrval,yrval,xrpix,yrpix,xinc,yinc,rot + double precision xpos,ypos,xpix,ypix + + tblname = 'Test-ASCII' + binname = 'Test-BINTABLE' + onskey(1) = 'first string' + onskey(2) = 'second string' + onskey(3) = ' ' + oskey = 'value_string' + inclist(1)='key*' + inclist(2)='newikys' + exclist(1)='key_pr*' + exclist(2)='key_pkls' + xctype='RA---TAN' + yctype='DEC--TAN' + + olkey = .true. + ojkey = 11 + otint = 12345678 + ofkey = 12.121212 + oekey = 13.131313 + ogkey = 14.1414141414141414D+00 + odkey = 15.1515151515151515D+00 + otfrac = .1234567890123456D+00 + onlkey(1) = .true. + onlkey(2) = .false. + onlkey(3) = .true. + onjkey(1) = 11 + onjkey(2) = 12 + onjkey(3) = 13 + onfkey(1) = 12.121212 + onfkey(2) = 13.131313 + onfkey(3) = 14.141414 + onekey(1) = 13.131313 + onekey(2) = 14.141414 + onekey(3) = 15.151515 + ongkey(1) = 14.1414141414141414D+00 + ongkey(2) = 15.1515151515151515D+00 + ongkey(3) = 16.1616161616161616D+00 + ondkey(1) = 15.1515151515151515D+00 + ondkey(2) = 16.1616161616161616D+00 + ondkey(3) = 17.1717171717171717D+00 + + tbcol(1) = 1 + tbcol(2) = 17 + tbcol(3) = 28 + tbcol(4) = 43 + tbcol(5) = 56 + status = 0 + + call ftvers(vers) + write(*,'(1x,A,F7.3)') 'FITSIO TESTPROG, v', vers + write(*, '(1x,A)')' ' + + iunit = 15 + tmpunit = 16 + + write(*,'(1x,A)') 'Try opening then closing a nonexistent file: ' + call ftopen(iunit, 'tq123x.kjl', 1, block, status) + write(*,'(1x,A,2i4)')' ftopen iunit, status (expect an error) =' + & ,iunit, status + call ftclos(iunit, status) + write(*,'(1x,A,i4)')' ftclos status = ', status + write(*,'(1x,A)')' ' + + call ftcmsg + status = 0 + + filename = 'testf77.fit' + +C delete previous version of the file, if it exists + + call ftopen(iunit, filename, 1, block, status) + if (status .eq. 0)then + call ftdelt(iunit, status) + else +C clear the error message stack + call ftcmsg + end if + + status = 0 + +C +C ##################### +C # create FITS file # +C ##################### + + + call ftinit(iunit, filename, 1, status) + write(*,'(1x,A,i4)')'ftinit create new file status = ', status + write(*,'(1x,A)')' ' + + if (status .ne. 0)go to 999 + + simple = .true. + bitpix = 32 + naxis = 2 + naxes(1) = 10 + naxes(2) = 2 + npixels = 20 + pcount = 0 + gcount = 1 + extend = .true. + +C ############################ +C # write single keywords # +C ############################ + + call ftphpr(iunit,simple, bitpix, naxis, naxes, + & 0,1,extend,status) + + call ftprec(iunit, + &'key_prec= ''This keyword was written by fxprec'' / '// + & 'comment goes here', status) + + write(*,'(1x,A)') 'test writing of long string keywords: ' + card = '1234567890123456789012345678901234567890'// + & '12345678901234567890123456789012345' + call ftpkys(iunit, 'card1', card, ' ', status) + call ftgkey(iunit, 'card1', card2, comment, status) + + write(*,'(1x,A)') card + write(*,'(1x,A)') card2 + + card = '1234567890123456789012345678901234567890'// + & '123456789012345678901234''6789012345' + call ftpkys(iunit, 'card2', card, ' ', status) + call ftgkey(iunit, 'card2', card2, comment, status) + write(*,'(1x,A)') card + write(*,'(1x,A)') card2 + + card = '1234567890123456789012345678901234567890'// + & '123456789012345678901234''''789012345' + call ftpkys(iunit, 'card3', card, ' ', status) + call ftgkey(iunit, 'card3', card2, comment, status) + write(*,'(1x,A)') card + write(*,'(1x,A)') card2 + + card = '1234567890123456789012345678901234567890'// + & '123456789012345678901234567''9012345' + call ftpkys(iunit, 'card4', card, ' ', status) + call ftgkey(iunit, 'card4', card2, comment, status) + write(*,'(1x,A)') card + write(*,'(1x,A)') card2 + + call ftpkys(iunit, 'key_pkys', oskey, 'fxpkys comment', status) + call ftpkyl(iunit, 'key_pkyl', olkey, 'fxpkyl comment', status) + call ftpkyj(iunit, 'key_pkyj', ojkey, 'fxpkyj comment', status) + call ftpkyf(iunit,'key_pkyf',ofkey,5, 'fxpkyf comment', status) + call ftpkye(iunit,'key_pkye',oekey,6, 'fxpkye comment', status) + call ftpkyg(iunit,'key_pkyg',ogkey,14, 'fxpkyg comment',status) + call ftpkyd(iunit,'key_pkyd',odkey,14, 'fxpkyd comment',status) + + lstr='This is a very long string '// + & 'value that is continued over more than one keyword.' + + call ftpkls(iunit,'key_pkls',lstr,'fxpkls comment',status) + + call ftplsw(iunit, status) + call ftpkyt(iunit,'key_pkyt',otint,otfrac,'fxpkyt comment', + & status) + call ftpcom(iunit, 'This keyword was written by fxpcom.', + & status) + call ftphis(iunit, + &' This keyword written by fxphis (w/ 2 leading spaces).', + & status) + + call ftpdat(iunit, status) + + if (status .gt. 0)go to 999 + +C +C ############################### +C # write arrays of keywords # +C ############################### + + nkeys = 3 + + comm = 'fxpkns comment&' + call ftpkns(iunit, 'ky_pkns', 1, nkeys, onskey, comm, status) + comm = 'fxpknl comment&' + call ftpknl(iunit, 'ky_pknl', 1, nkeys, onlkey, comm, status) + + comm = 'fxpknj comment&' + call ftpknj(iunit, 'ky_pknj', 1, nkeys, onjkey, comm, status) + + comm = 'fxpknf comment&' + call ftpknf(iunit, 'ky_pknf', 1, nkeys, onfkey,5,comm,status) + + comm = 'fxpkne comment&' + call ftpkne(iunit, 'ky_pkne', 1, nkeys, onekey,6,comm,status) + + comm = 'fxpkng comment&' + call ftpkng(iunit, 'ky_pkng', 1, nkeys, ongkey,13,comm,status) + + comm = 'fxpknd comment&' + call ftpknd(iunit, 'ky_pknd', 1, nkeys, ondkey,14,comm,status) + + if (status .gt. 0)go to 999 + +C ############################ +C # write generic keywords # +C ############################ + + + oskey = '1' + call ftpkys(iunit, 'tstring', oskey, 'tstring comment',status) + + olkey = .true. + call ftpkyl(iunit, 'tlogical', olkey, 'tlogical comment', + & status) + + ojkey = 11 + call ftpkyj(iunit, 'tbyte', ojkey, 'tbyte comment', status) + + ojkey = 21 + call ftpkyj(iunit, 'tshort', ojkey, 'tshort comment', status) + + ojkey = 31 + call ftpkyj(iunit, 'tint', ojkey, 'tint comment', status) + + ojkey = 41 + call ftpkyj(iunit, 'tlong', ojkey, 'tlong comment', status) + + oekey = 42 + call ftpkye(iunit, 'tfloat', oekey, 6,'tfloat comment', status) + + odkey = 82.D+00 + call ftpkyd(iunit, 'tdouble', odkey, 14, 'tdouble comment', + & status) + + if (status .gt. 0)go to 999 + write(*,'(1x,A)') 'Wrote all Keywords successfully ' + + +C ############################ +C # write data # +C ############################ + + +C define the null value (must do this before writing any data) + call ftpkyj(iunit,'BLANK',-99, + & 'value to use for undefined pixels', status) + +C initialize arrays of values to write to primary array + do ii = 1, npixels + boutarray(ii) = char(ii) + ioutarray(ii) = ii + joutarray(ii) = ii + eoutarray(ii) = ii + doutarray(ii) = ii + end do + +C write a few pixels with each datatype +C set the last value in each group of 4 as undefined + call ftpprb(iunit, 1, 1, 2, boutarray(1), status) + call ftppri(iunit, 1, 5, 2, ioutarray(5), status) + call ftpprj(iunit, 1, 9, 2, joutarray(9), status) + call ftppre(iunit, 1, 13, 2, eoutarray(13), status) + call ftpprd(iunit, 1, 17, 2, doutarray(17), status) + bnul = char(4) + call ftppnb(iunit, 1, 3, 2, boutarray(3), bnul, status) + inul = 8 + call ftppni(iunit, 1, 7, 2, ioutarray(7), inul, status) + call ftppnj(iunit, 1, 11, 2, joutarray(11), 12, status) + call ftppne(iunit, 1, 15, 2, eoutarray(15), 16., status) + dnul = 20. + call ftppnd(iunit, 1, 19, 2, doutarray(19), dnul, status) + call ftppru(iunit, 1, 1, 1, status) + + if (status .gt. 0)then + write(*,'(1x,A,I4)')'ftppnx status = ', status + goto 999 + end if + + call ftflus(iunit, status) +C flush all data to the disk file + write(*,'(1x,A,I4)')'ftflus status = ', status + write(*,'(1x,A)')' ' + + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)')'HDU number = ', hdunum + +C ############################ +C # read data # +C ############################ + + +C read back the data, setting null values = 99 + write(*,'(1x,A)') + & 'Values read back from primary array (99 = null pixel)' + write(*,'(1x,A)') + & 'The 1st, and every 4th pixel should be undefined: ' + + anynull = .false. + bnul = char(99) + call ftgpvb(iunit, 1, 1, 10, bnul, binarray, anynull, status) + call ftgpvb(iunit, 1, 11, 10, bnul, binarray(11),anynull,status) + + do ii = 1,npixels + iinarray(ii) = ichar(binarray(ii)) + end do + + write(*,1101) (iinarray(ii), ii = 1, npixels), anynull, + & ' (ftgpvb) ' +1101 format(1x,20i3,l3,a) + + inul = 99 + call ftgpvi(iunit, 1, 1, npixels, inul, iinarray,anynull,status) + + write(*,1101) (iinarray(ii), ii = 1, npixels), anynull, + & ' (ftgpvi) ' + + call ftgpvj(iunit, 1, 1, npixels, 99, jinarray,anynull,status) + + write(*,1101) (jinarray(ii), ii = 1, npixels), anynull, + & ' (ftgpvj) ' + + call ftgpve(iunit, 1, 1, npixels, 99., einarray,anynull,status) + + write(*,1102) (einarray(ii), ii = 1, npixels), anynull, + & ' (ftgpve) ' + +1102 format(2x,20f3.0,l2,a) + + dnul = 99. + call ftgpvd(iunit, 1, 1, 10, dnul, dinarray, anynull, status) + call ftgpvd(iunit, 1, 11, 10, dnul,dinarray(11),anynull,status) + + write(*,1102) (dinarray(ii), ii = 1, npixels), anynull, + & ' (ftgpvd) ' + + if (status .gt. 0)then + write(*,'(1x,A,I4)')'ERROR: ftgpv_ status = ', status + goto 999 + end if + + if (.not. anynull)then + write(*,'(1x,A)') 'ERROR: ftgpv_ did not detect null values ' + go to 999 + end if + +C reset the output null value to the expected input value + + do ii = 4, npixels, 4 + boutarray(ii) = char(99) + ioutarray(ii) = 99 + joutarray(ii) = 99 + eoutarray(ii) = 99. + doutarray(ii) = 99. + end do + + ii = 1 + boutarray(ii) = char(99) + ioutarray(ii) = 99 + joutarray(ii) = 99 + eoutarray(ii) = 99. + doutarray(ii) = 99. + + +C compare the output with the input flag any differences + do ii = 1, npixels + + if (boutarray(ii) .ne. binarray(ii))then + write(*,'(1x,A,2A2)') 'bout != bin ', boutarray(ii), + & binarray(ii) + end if + + if (ioutarray(ii) .ne. iinarray(ii))then + write(*,'(1x,A,2I8)') 'bout != bin ', ioutarray(ii), + & iinarray(ii) + end if + + if (joutarray(ii) .ne. jinarray(ii))then + write(*,'(1x,A,2I12)') 'bout != bin ', joutarray(ii), + & jinarray(ii) + end if + + if (eoutarray(ii) .ne. einarray(ii))then + write(*,'(1x,A,2E15.3)') 'bout != bin ', eoutarray(ii), + & einarray(ii) + end if + + if (doutarray(ii) .ne. dinarray(ii))then + write(*,'(1x,A,2D20.6)') 'bout != bin ', doutarray(ii), + & dinarray(ii) + end if + end do + + do ii = 1, npixels + binarray(ii) = char(0) + iinarray(ii) = 0 + jinarray(ii) = 0 + einarray(ii) = 0. + dinarray(ii) = 0. + end do + + anynull = .false. + call ftgpfb(iunit, 1, 1, 10, binarray, larray, anynull,status) + call ftgpfb(iunit, 1, 11, 10, binarray(11), larray(11), + & anynull, status) + + do ii = 1, npixels + if (larray(ii))binarray(ii) = char(0) + end do + + do ii = 1,npixels + iinarray(ii) = ichar(binarray(ii)) + end do + + write(*,1101)(iinarray(ii),ii = 1,npixels),anynull,' (ftgpfb)' + + call ftgpfi(iunit, 1, 1, npixels, iinarray, larray, anynull, + & status) + + do ii = 1, npixels + if (larray(ii))iinarray(ii) = 0 + end do + + write(*,1101)(iinarray(ii),ii = 1,npixels),anynull,' (ftgpfi)' + + call ftgpfj(iunit, 1, 1, npixels, jinarray, larray, anynull, + & status) + + do ii = 1, npixels + if (larray(ii))jinarray(ii) = 0 + end do + + write(*,1101)(jinarray(ii),ii = 1,npixels),anynull,' (ftgpfj)' + + call ftgpfe(iunit, 1, 1, npixels, einarray, larray, anynull, + & status) + + do ii = 1, npixels + if (larray(ii))einarray(ii) = 0. + end do + + write(*,1102)(einarray(ii),ii = 1,npixels),anynull,' (ftgpfe)' + + call ftgpfd(iunit, 1, 1, 10, dinarray, larray, anynull,status) + call ftgpfd(iunit, 1, 11, 10, dinarray(11), larray(11), + & anynull, status) + + do ii = 1, npixels + if (larray(ii))dinarray(ii) = 0. + end do + + write(*,1102)(dinarray(ii),ii = 1,npixels),anynull,' (ftgpfd)' + + if (status .gt. 0)then + write(*,'(1x,A,I4)')'ERROR: ftgpf_ status = ', status + go to 999 + end if + + if (.not. anynull)then + write(*,'(1x,A)') 'ERROR: ftgpf_ did not detect null values' + go to 999 + end if + + +C ########################################## +C # close and reopen file multiple times # +C ########################################## + + + do ii = 1, 10 + call ftclos(iunit, status) + + if (status .gt. 0)then + write(*,'(1x,A,I4)')'ERROR in ftclos (1) = ', status + go to 999 + end if + + call ftopen(iunit, filename, 1, block, status) + + if (status .gt. 0)then + write(*,'(1x,A,I4)')'ERROR: ftopen open file status = ', + & status + go to 999 + end if + end do + + write(*,'(1x,A)') ' ' + write(*,'(1x,A)') 'Closed then reopened the FITS file 10 times.' + write(*,'(1x,A)')' ' + + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)')'HDU number = ', hdunum + + +C ############################ +C # read single keywords # +C ############################ + + + simple = .false. + bitpix = 0 + naxis = 0 + naxes(1) = 0 + naxes(2) = 0 + pcount = -99 + gcount = -99 + extend = .false. + write(*,'(1x,A)') 'Read back keywords: ' + call ftghpr(iunit, 3, simple, bitpix, naxis, naxes, pcount, + & gcount, extend, status) + write(*,'(1x,A,L4,4I4)')'simple, bitpix, naxis, naxes = ', + & simple, bitpix, naxis, naxes(1), naxes(2) + write(*,'(1x,A,2I4,L4)')' pcount, gcount, extend = ', + & pcount, gcount, extend + + call ftgrec(iunit, 9, card, status) + write(*,'(1x,A)') card + if (card(1:15) .ne. 'KEY_PREC= ''This') + & write(*,'(1x,A)') 'ERROR in ftgrec ' + + call ftgkyn(iunit, 9, keyword, value, comment, status) + write(*,'(1x,5A)') keyword,' ', value(1:35),' ', comment(1:20) + + if (keyword(1:8) .ne. 'KEY_PREC' ) + & write(*,'(1x,2A)') 'ERROR in ftgkyn: ', keyword + + call ftgcrd(iunit, keyword, card, status) + write(*,'(1x,A)') card + + if (keyword(1:8) .ne. card(1:8) ) + & write(*,'(1x,2A)') 'ERROR in ftgcrd: ', keyword + + call ftgkey(iunit, 'KY_PKNS1', value, comment, status) + write(*,'(1x,5A)') 'KY_PKNS1 ',':', value(1:15),':', comment(1:16) + + if (value(1:14) .ne. '''first string''') + & write(*,'(1x,2A)') 'ERROR in ftgkey: ', value + + call ftgkys(iunit, 'key_pkys', iskey, comment, status) + write(*,'(1x,5A,I4)')'KEY_PKYS ',':',iskey,':',comment(1:16), + & status + + call ftgkyl(iunit, 'key_pkyl', ilkey, comment, status) + write(*,'(1x,2A,L4,2A,I4)') 'KEY_PKYL ',':', ilkey,':', + &comment(1:16), status + + call ftgkyj(iunit, 'KEY_PKYJ', ijkey, comment, status) + write(*,'(1x,2A,I4,2A,I4)') 'KEY_PKYJ ',':',ijkey,':', + & comment(1:16), status + + call ftgkye(iunit, 'KEY_PKYJ', iekey, comment, status) + write(*,'(1x,2A,f12.5,2A,I4)') 'KEY_PKYE ',':',iekey,':', + & comment(1:16), status + + call ftgkyd(iunit, 'KEY_PKYJ', idkey, comment, status) + write(*,'(1x,2A,F12.5,2A,I4)') 'KEY_PKYD ',':',idkey,':', + & comment(1:16), status + + if (ijkey .ne. 11 .or. iekey .ne. 11. .or. idkey .ne. 11.) + & write(*,'(1x,A,I4,2F5.1)') 'ERROR in ftgky(jed): ', + & ijkey, iekey, idkey + + iskey= ' ' + call ftgkys(iunit, 'key_pkys', iskey, comment, status) + write(*,'(1x,5A,I4)') 'KEY_PKYS ',':', iskey,':', comment(1:16), + & status + + ilkey = .false. + call ftgkyl(iunit, 'key_pkyl', ilkey, comment, status) + write(*,'(1x,2A,L4,2A,I4)') 'KEY_PKYL ',':', ilkey,':', + & comment(1:16), status + + ijkey = 0 + call ftgkyj(iunit, 'KEY_PKYJ', ijkey, comment, status) + write(*,'(1x,2A,I4,2A,I4)') 'KEY_PKYJ ',':',ijkey,':', + & comment(1:16), status + + iekey = 0 + call ftgkye(iunit, 'KEY_PKYE', iekey, comment, status) + write(*,'(1x,2A,f12.5,2A,I4)') 'KEY_PKYE ',':',iekey,':', + & comment(1:16), status + + idkey = 0 + call ftgkyd(iunit, 'KEY_PKYD', idkey, comment, status) + write(*,'(1x,2A,F12.5,2A,I4)') 'KEY_PKYD ',':',idkey,':', + & comment(1:16), status + + iekey = 0 + call ftgkye(iunit, 'KEY_PKYF', iekey, comment, status) + write(*,'(1x,2A,f12.5,2A,I4)') 'KEY_PKYF ',':',iekey,':', + & comment(1:16), status + + iekey = 0 + call ftgkye(iunit, 'KEY_PKYE', iekey, comment, status) + write(*,'(1x,2A,f12.5,2A,I4)') 'KEY_PKYE ',':',iekey,':', + & comment(1:16), status + + idkey = 0 + call ftgkyd(iunit, 'KEY_PKYG', idkey, comment, status) + write(*,'(1x,2A,f16.12,2A,I4)') 'KEY_PKYG ',':',idkey,':', + & comment(1:16), status + + idkey = 0 + call ftgkyd(iunit, 'KEY_PKYD', idkey, comment, status) + write(*,'(1x,2A,f16.12,2A,I4)') 'KEY_PKYD ',':',idkey,':', + & comment(1:16), status + + call ftgkyt(iunit, 'KEY_PKYT', ijkey, idkey, comment, status) + write(*,'(1x,2A,i10,A,f16.14,A,I4)') 'KEY_PKYT ',':', + & ijkey,':', idkey, comment(1:16), status + + call ftpunt(iunit, 'KEY_PKYJ', 'km/s/Mpc', status) + ijkey = 0 + call ftgkyj(iunit, 'KEY_PKYJ', ijkey, comment, status) + write(*,'(1x,2A,I4,2A,I4)') 'KEY_PKYJ ',':',ijkey,':', + & comment(1:38), status + call ftgunt(iunit,'KEY_PKYJ',kunit,status) + write(*,'(1x,2A)') 'keyword unit=', kunit + + call ftpunt(iunit, 'KEY_PKYJ', ' ', status) + ijkey = 0 + call ftgkyj(iunit, 'KEY_PKYJ', ijkey, comment, status) + write(*,'(1x,2A,I4,2A,I4)') 'KEY_PKYJ ',':',ijkey,':', + & comment(1:38), status + call ftgunt(iunit,'KEY_PKYJ',kunit,status) + write(*,'(1x,2A)') 'keyword unit=', kunit + + call ftpunt(iunit, 'KEY_PKYJ', 'feet/second/second', status) + ijkey = 0 + call ftgkyj(iunit, 'KEY_PKYJ', ijkey, comment, status) + write(*,'(1x,2A,I4,2A,I4)') 'KEY_PKYJ ',':',ijkey,':', + & comment(1:38), status + call ftgunt(iunit,'KEY_PKYJ',kunit,status) + write(*,'(1x,2A)') 'keyword unit=', kunit + + call ftgkys(iunit, 'key_pkls', lstr, comment, status) + write(*,'(1x,2A)') 'KEY_PKLS long string value = ', lstr(1:50) + write(*,'(1x,A)')lstr(51:120) + +C get size and position in header + call ftghps(iunit, existkeys, keynum, status) + write(*,'(1x,A,I4,A,I4)') 'header contains ', existkeys, + & ' keywords; located at keyword ', keynum + +C ############################ +C # read array keywords # +C ############################ + + call ftgkns(iunit, 'ky_pkns', 1, 3, inskey, nfound, status) + write(*,'(1x,4A)') 'ftgkns: ', inskey(1)(1:14), inskey(2)(1:14), + & inskey(3)(1:14) + if (nfound .ne. 3 .or. status .gt. 0) + & write(*,'(1x,A,2I4)') ' ERROR in ftgkns ', nfound, status + + call ftgknl(iunit, 'ky_pknl', 1, 3, inlkey, nfound, status) + write(*,'(1x,A,3L4)') 'ftgknl: ', inlkey(1), inlkey(2), inlkey(3) + if (nfound .ne. 3 .or. status .gt. 0) + & write(*,'(1x,A,2I4)') ' ERROR in ftgknl ', nfound, status + + call ftgknj(iunit, 'ky_pknj', 1, 3, injkey, nfound, status) + write(*,'(1x,A,3I4)') 'ftgknj: ', injkey(1), injkey(2), injkey(3) + if (nfound .ne. 3 .or. status .gt. 0) + & write(*,'(1x,A,2I4)') ' ERROR in ftgknj ', nfound, status + + call ftgkne(iunit, 'ky_pkne', 1, 3, inekey, nfound, status) + write(*,'(1x,A,3F10.5)') 'ftgkne: ',inekey(1),inekey(2),inekey(3) + if (nfound .ne. 3 .or. status .gt. 0) + & write(*,'(1x,A,2I4)') ' ERROR in ftgkne ', nfound, status + + call ftgknd(iunit, 'ky_pknd', 1, 3, indkey, nfound, status) + write(*,'(1x,A,3F10.5)') 'ftgknd: ',indkey(1),indkey(2),indkey(3) + if (nfound .ne. 3 .or. status .gt. 0) + & write(*,'(1x,A,2I4)') ' ERROR in ftgknd ', nfound, status + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') + & 'Before deleting the HISTORY and DATE keywords...' + do ii = 29, 32 + call ftgrec(iunit, ii, card, status) + write(*,'(1x,A)') card(1:8) + end do + +C don't print date value, so that +C the output will always be the same + + +C ############################ +C # delete keywords # +C ############################ + + + call ftdrec(iunit, 30, status) + call ftdkey(iunit, 'DATE', status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'After deleting the keywords... ' + do ii = 29, 30 + call ftgrec(iunit, ii, card, status) + write(*,'(1x,A)') card + end do + + if (status .gt. 0) + & write(*,'(1x,A)') ' ERROR deleting keywords ' + + +C ############################ +C # insert keywords # +C ############################ + + call ftirec(iunit,26, + & 'KY_IREC = ''This keyword inserted by fxirec''', + & status) + call ftikys(iunit, 'KY_IKYS', 'insert_value_string', + & 'ikys comment', status) + call ftikyj(iunit, 'KY_IKYJ', 49, 'ikyj comment', status) + call ftikyl(iunit, 'KY_IKYL', .true., 'ikyl comment', status) + call ftikye(iunit, 'KY_IKYE',12.3456,4,'ikye comment',status) + odkey = 12.345678901234567D+00 + call ftikyd(iunit, 'KY_IKYD', odkey, 14, + & 'ikyd comment', status) + call ftikyf(iunit, 'KY_IKYF', 12.3456, 4, 'ikyf comment', + & status) + call ftikyg(iunit, 'KY_IKYG', odkey, 13, + & 'ikyg comment', status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'After inserting the keywords... ' + do ii = 25, 34 + call ftgrec(iunit, ii, card, status) + write(*,'(1x,A)') card + end do + + if (status .gt. 0) + & write(*,'(1x,A)') ' ERROR inserting keywords ' + + +C ############################ +C # modify keywords # +C ############################ + + call ftmrec(iunit, 25, + & 'COMMENT This keyword was modified by fxmrec', status) + call ftmcrd(iunit, 'KY_IREC', + & 'KY_MREC = ''This keyword was modified by fxmcrd''', status) + call ftmnam(iunit, 'KY_IKYS', 'NEWIKYS', status) + + call ftmcom(iunit,'KY_IKYJ','This is a modified comment', + & status) + call ftmkyj(iunit, 'KY_IKYJ', 50, '&', status) + call ftmkyl(iunit, 'KY_IKYL', .false., '&', status) + call ftmkys(iunit, 'NEWIKYS', 'modified_string', '&', status) + call ftmkye(iunit, 'KY_IKYE', -12.3456, 4, '&', status) + odkey = -12.345678901234567D+00 + + call ftmkyd(iunit, 'KY_IKYD', odkey, 14, + & 'modified comment', status) + call ftmkyf(iunit, 'KY_IKYF', -12.3456, 4, '&', status) + call ftmkyg(iunit,'KY_IKYG', odkey,13,'&',status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'After modifying the keywords... ' + do ii = 25, 34 + call ftgrec(iunit, ii, card, status) + write(*,'(1x,A)') card + end do + + if (status .gt. 0)then + write(*,'(1x,A)') ' ERROR modifying keywords ' + go to 999 + end if + +C ############################ +C # update keywords # +C ############################ + + call ftucrd(iunit, 'KY_MREC', + & 'KY_UCRD = ''This keyword was updated by fxucrd''', + & status) + + call ftukyj(iunit, 'KY_IKYJ', 51, '&', status) + call ftukyl(iunit, 'KY_IKYL', .true., '&', status) + call ftukys(iunit, 'NEWIKYS', 'updated_string', '&', status) + call ftukye(iunit, 'KY_IKYE', -13.3456, 4, '&', status) + odkey = -13.345678901234567D+00 + + call ftukyd(iunit, 'KY_IKYD',odkey , 14, + & 'modified comment', status) + call ftukyf(iunit, 'KY_IKYF', -13.3456, 4, '&', status) + call ftukyg(iunit, 'KY_IKYG', odkey, 13, '&', status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'After updating the keywords... ' + do ii = 25, 34 + call ftgrec(iunit, ii, card, status) + write(*,'(1x,A)') card + end do + + if (status .gt. 0)then + write(*,'(1x,A)') ' ERROR modifying keywords ' + go to 999 + end if + +C move to top of header and find keywords using wild cards + call ftgrec(iunit, 0, card, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') + & 'Keywords found using wildcard search (should be 9)...' + nfound = -1 +91 nfound = nfound +1 + call ftgnxk(iunit, inclist, 2, exclist, 2, card, status) + if (status .eq. 0)then + write(*,'(1x,A)') card + go to 91 + end if + + if (nfound .ne. 9)then + write(*,'(1x,A)') + & 'ERROR reading keywords using wildcards (ftgnxk)' + go to 999 + end if + status = 0 + +C ############################ +C # create binary table # +C ############################ + + tform(1) = '15A' + tform(2) = '1L' + tform(3) = '16X' + tform(4) = '1B' + tform(5) = '1I' + tform(6) = '1J' + tform(7) = '1E' + tform(8) = '1D' + tform(9) = '1C' + tform(10)= '1M' + + ttype(1) = 'Avalue' + ttype(2) = 'Lvalue' + ttype(3) = 'Xvalue' + ttype(4) = 'Bvalue' + ttype(5) = 'Ivalue' + ttype(6) = 'Jvalue' + ttype(7) = 'Evalue' + ttype(8) = 'Dvalue' + ttype(9) = 'Cvalue' + ttype(10)= 'Mvalue' + + tunit(1) = ' ' + tunit(2) = 'm**2' + tunit(3) = 'cm' + tunit(4) = 'erg/s' + tunit(5) = 'km/s' + tunit(6) = ' ' + tunit(7) = ' ' + tunit(8) = ' ' + tunit(9) = ' ' + tunit(10)= ' ' + + nrows = 21 + tfields = 10 + pcount = 0 + + call ftibin(iunit, nrows, tfields, ttype, tform, tunit, + & binname, pcount, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)') 'ftibin status = ', status + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + +C get size and position in header, and reserve space for more keywords + call ftghps(iunit, existkeys, keynum, status) + write(*,'(1x,A,I4,A,I4)') 'header contains ',existkeys, + & ' keywords located at keyword ', keynum + + morekeys = 40 + call fthdef(iunit, morekeys, status) + call ftghsp(iunit, existkeys, morekeys, status) + write(*,'(1x,A,I4,A,I4,A)') 'header contains ', existkeys, + &' keywords with room for ', morekeys,' more' + +C define null value for int cols + call fttnul(iunit, 4, 99, status) + call fttnul(iunit, 5, 99, status) + call fttnul(iunit, 6, 99, status) + + call ftpkyj(iunit, 'TNULL4', 99, 'value for undefined pixels', + & status) + call ftpkyj(iunit, 'TNULL5', 99, 'value for undefined pixels', + & status) + call ftpkyj(iunit, 'TNULL6', 99, 'value for undefined pixels', + & status) + + naxis = 3 + naxes(1) = 1 + naxes(2) = 2 + naxes(3) = 8 + call ftptdm(iunit, 3, naxis, naxes, status) + + naxis = 0 + naxes(1) = 0 + naxes(2) = 0 + naxes(3) = 0 + call ftgtdm(iunit, 3, 3, naxis, naxes, status) + call ftgkys(iunit, 'TDIM3', iskey, comment, status) + write(*,'(1x,2A,4I4)') 'TDIM3 = ', iskey, naxis, naxes(1), + & naxes(2), naxes(3) + +C force header to be scanned (not required) + call ftrdef(iunit, status) + +C ############################ +C # write data to columns # +C ############################ + +C initialize arrays of values to write to table + signval = -1 + do ii = 1, 21 + signval = signval * (-1) + boutarray(ii) = char(ii) + ioutarray(ii) = (ii) * signval + joutarray(ii) = (ii) * signval + koutarray(ii) = (ii) * signval + eoutarray(ii) = (ii) * signval + doutarray(ii) = (ii) * signval + end do + + call ftpcls(iunit, 1, 1, 1, 3, onskey, status) +C write string values + call ftpclu(iunit, 1, 4, 1, 1, status) +C write null value + + larray(1) = .false. + larray(2) =.true. + larray(3) = .false. + larray(4) = .false. + larray(5) =.true. + larray(6) =.true. + larray(7) = .false. + larray(8) = .false. + larray(9) = .false. + larray(10) =.true. + larray(11) =.true. + larray(12) = .true. + larray(13) = .false. + larray(14) = .false. + larray(15) =.false. + larray(16) =.false. + larray(17) = .true. + larray(18) = .true. + larray(19) = .true. + larray(20) = .true. + larray(21) =.false. + larray(22) =.false. + larray(23) =.false. + larray(24) =.false. + larray(25) =.false. + larray(26) = .true. + larray(27) = .true. + larray(28) = .true. + larray(29) = .true. + larray(30) = .true. + larray(31) =.false. + larray(32) =.false. + larray(33) =.false. + larray(34) =.false. + larray(35) =.false. + larray(36) =.false. + +C write bits + call ftpclx(iunit, 3, 1, 1, 36, larray, status) + +C loop over cols 4 - 8 + do ii = 4, 8 + call ftpclb(iunit, ii, 1, 1, 2, boutarray, status) + if (status .eq. 412) status = 0 + + call ftpcli(iunit, ii, 3, 1, 2, ioutarray(3), status) + if (status .eq. 412) status = 0 + + call ftpclj(iunit, ii, 5, 1, 2, koutarray(5), status) + if (status .eq. 412) status = 0 + + call ftpcle(iunit, ii, 7, 1, 2, eoutarray(7), status) + if (status .eq. 412)status = 0 + + call ftpcld(iunit, ii, 9, 1, 2, doutarray(9), status) + if (status .eq. 412)status = 0 + +C write null value + call ftpclu(iunit, ii, 11, 1, 1, status) + end do + + call ftpclc(iunit, 9, 1, 1, 10, eoutarray, status) + call ftpclm(iunit, 10, 1, 1, 10, doutarray, status) + +C loop over cols 4 - 8 + do ii = 4, 8 + bnul = char(13) + call ftpcnb(iunit, ii, 12, 1, 2, boutarray(12),bnul,status) + if (status .eq. 412) status = 0 + inul=15 + call ftpcni(iunit, ii, 14, 1, 2, ioutarray(14),inul,status) + if (status .eq. 412) status = 0 + call ftpcnj(iunit, ii, 16, 1, 2, koutarray(16), 17, status) + if (status .eq. 412) status = 0 + call ftpcne(iunit, ii, 18, 1, 2, eoutarray(18), 19.,status) + if (status .eq. 412) status = 0 + dnul = 21. + call ftpcnd(iunit, ii, 20, 1, 2, doutarray(20),dnul,status) + if (status .eq. 412) status = 0 + end do + +C write logicals + call ftpcll(iunit, 2, 1, 1, 21, larray, status) +C write null value + call ftpclu(iunit, 2, 11, 1, 1, status) + write(*,'(1x,A,I4)') 'ftpcl_ status = ', status + if (status .gt. 0)go to 999 + +C ######################################### +C # get information about the columns # +C ######################################### + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') + & 'Find the column numbers a returned status value'// + & ' of 237 is' + write(*,'(1x,A)') + & 'expected and indicates that more than one column'// + & ' name matches' + write(*,'(1x,A)')'the input column name template.'// + & ' Status = 219 indicates that' + write(*,'(1x,A)') 'there was no matching column name.' + + call ftgcno(iunit, 0, 'Xvalue', colnum, status) + write(*,'(1x,A,I4,A,I4)') 'Column Xvalue is number', colnum, + &' status =',status + +219 continue + if (status .ne. 219)then + call ftgcnn(iunit, 1, '*ue', colname, colnum, status) + write(*,'(1x,3A,I4,A,I4)') 'Column ',colname(1:6),' is number', + & colnum,' status = ', status + go to 219 + end if + + status = 0 + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Information about each column: ' + + do ii = 1, tfields + call ftgtcl(iunit, ii, typecode, repeat, width, status) + call ftgbcl(iunit,ii,ttype,tunit,cval,repeat,scale, + & zero, jnulval, tdisp, status) + + write(*,'(1x,A,3I4,5A,2F8.2,I12,A)') + & tform(ii)(1:3), typecode, repeat, width,' ', + & ttype(1)(1:6),' ',tunit(1)(1:6), cval, scale, zero, jnulval, + & tdisp(1:8) + end do + + write(*,'(1x,A)') ' ' + +C ############################################### +C # insert ASCII table before the binary table # +C ############################################### + + call ftmrhd(iunit, -1, hdutype, status) + if (status .gt. 0)goto 999 + + tform(1) = 'A15' + tform(2) = 'I10' + tform(3) = 'F14.6' + tform(4) = 'E12.5' + tform(5) = 'D21.14' + + ttype(1) = 'Name' + ttype(2) = 'Ivalue' + ttype(3) = 'Fvalue' + ttype(4) = 'Evalue' + ttype(5) = 'Dvalue' + + tunit(1) = ' ' + tunit(2) = 'm**2' + tunit(3) = 'cm' + tunit(4) = 'erg/s' + tunit(5) = 'km/s' + + rowlen = 76 + nrows = 11 + tfields = 5 + + call ftitab(iunit, rowlen, nrows, tfields, ttype, tbcol, + & tform, tunit, tblname, status) + write(*,'(1x,A,I4)') 'ftitab status = ', status + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + +C define null value for int cols + call ftsnul(iunit, 1, 'null1', status) + call ftsnul(iunit, 2, 'null2', status) + call ftsnul(iunit, 3, 'null3', status) + call ftsnul(iunit, 4, 'null4', status) + call ftsnul(iunit, 5, 'null5', status) + + call ftpkys(iunit, 'TNULL1', 'null1', + & 'value for undefined pixels', status) + call ftpkys(iunit, 'TNULL2', 'null2', + & 'value for undefined pixels', status) + call ftpkys(iunit, 'TNULL3', 'null3', + & 'value for undefined pixels', status) + call ftpkys(iunit, 'TNULL4', 'null4', + & 'value for undefined pixels', status) + call ftpkys(iunit, 'TNULL5', 'null5', + & 'value for undefined pixels', status) + + if (status .gt. 0) goto 999 + +C ############################ +C # write data to columns # +C ############################ + +C initialize arrays of values to write to table + do ii = 1,21 + boutarray(ii) = char(ii) + ioutarray(ii) = ii + joutarray(ii) = ii + eoutarray(ii) = ii + doutarray(ii) = ii + end do + +C write string values + call ftpcls(iunit, 1, 1, 1, 3, onskey, status) +C write null value + call ftpclu(iunit, 1, 4, 1, 1, status) + + do ii = 2,5 +C loop over cols 2 - 5 + call ftpclb(iunit, ii, 1, 1, 2, boutarray, status) +C char array + if (status .eq. 412) status = 0 + + call ftpcli(iunit, ii, 3, 1, 2, ioutarray(3), status) +C short array + if (status .eq. 412) status = 0 + + call ftpclj(iunit, ii, 5, 1, 2, joutarray(5), status) +C long array + if (status .eq. 412)status = 0 + + call ftpcle(iunit, ii, 7, 1, 2, eoutarray(7), status) +C float array + if (status .eq. 412) status = 0 + + call ftpcld(iunit, ii, 9, 1, 2, doutarray(9), status) +C double array + if (status .eq. 412) status = 0 + + call ftpclu(iunit, ii, 11, 1, 1, status) +C write null value + end do + write(*,'(1x,A,I4)') 'ftpcl_ status = ', status + write(*,'(1x,A)')' ' + +C ################################ +C # read data from ASCII table # +C ################################ + + call ftghtb(iunit, 99, rowlen, nrows, tfields, ttype, tbcol, + & tform, tunit, tblname, status) + + write(*,'(1x,A,3I3,2A)') + & 'ASCII table: rowlen, nrows, tfields, extname:', + & rowlen, nrows, tfields,' ',tblname + + do ii = 1,tfields + write(*,'(1x,A,I4,3A)') + & ttype(ii)(1:7), tbcol(ii),' ',tform(ii)(1:7), tunit(ii)(1:7) + end do + + nrows = 11 + call ftgcvs(iunit, 1, 1, 1, nrows, 'UNDEFINED', inskey, + & anynull, status) + bnul = char(99) + call ftgcvb(iunit, 2, 1, 1, nrows, bnul, binarray, + & anynull, status) + inul = 99 + call ftgcvi(iunit, 2, 1, 1, nrows, inul, iinarray, + & anynull, status) + call ftgcvj(iunit, 3, 1, 1, nrows, 99, jinarray, + & anynull, status) + call ftgcve(iunit, 4, 1, 1, nrows, 99., einarray, + & anynull, status) + dnul = 99. + call ftgcvd(iunit, 5, 1, 1, nrows, dnul, dinarray, + & anynull, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values read from ASCII table: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1011) inskey(ii), jj, + & iinarray(ii), jinarray(ii), einarray(ii), dinarray(ii) +1011 format(1x,a15,3i3,1x,2f3.0) + end do + + call ftgtbs(iunit, 1, 20, 78, uchars, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A)') uchars + call ftptbs(iunit, 1, 20, 78, uchars, status) + +C ######################################### +C # get information about the columns # +C ######################################### + + call ftgcno(iunit, 0, 'name', colnum, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4,A,I4)') + & 'Column name is number',colnum,' status = ', status + +2190 continue + if (status .ne. 219)then + if (status .gt. 0 .and. status .ne. 237)go to 999 + + call ftgcnn(iunit, 1, '*ue', colname, colnum, status) + write(*,'(1x,3A,I4,A,I4)') + & 'Column ',colname(1:6),' is number',colnum,' status = ',status + go to 2190 + end if + + status = 0 + + do ii = 1, tfields + call ftgtcl(iunit, ii, typecode, repeat, width, status) + call ftgacl(iunit, ii, ttype, tbcol,tunit,tform, + & scale,zero, nulstr, tdisp, status) + + write(*,'(1x,A,3I4,2A,I4,2A,2F10.2,3A)') + & tform(ii)(1:7), typecode, repeat, width,' ', + & ttype(1)(1:6), tbcol(1), ' ',tunit(1)(1:5), + & scale, zero, ' ', nulstr(1:6), tdisp(1:2) + + end do + + write(*,'(1x,A)') ' ' + +C ############################################### +C # test the insert/delete row/column routines # +C ############################################### + + call ftirow(iunit, 2, 3, status) + if (status .gt. 0) goto 999 + + nrows = 14 + call ftgcvs(iunit, 1, 1, 1, nrows, 'UNDEFINED', + & inskey, anynull, status) + call ftgcvb(iunit, 2, 1, 1, nrows, bnul, binarray, + & anynull, status) + call ftgcvi(iunit, 2, 1, 1, nrows, inul, iinarray, + & anynull, status) + call ftgcvj(iunit, 3, 1, 1, nrows, 99, jinarray, + & anynull, status) + call ftgcve(iunit, 4, 1, 1, nrows, 99., einarray, + & anynull, status) + call ftgcvd(iunit, 5, 1, 1, nrows, dnul, dinarray, + & anynull, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)')'Data values after inserting 3 rows after row 2:' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1011) inskey(ii), jj, + & iinarray(ii), jinarray(ii), einarray(ii), dinarray(ii) + end do + + call ftdrow(iunit, 10, 2, status) + + nrows = 12 + call ftgcvs(iunit, 1, 1, 1, nrows, 'UNDEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 2, 1, 1, nrows, bnul, binarray, anynull, + & status) + call ftgcvi(iunit, 2, 1, 1, nrows, inul, iinarray, anynull, + & status) + call ftgcvj(iunit, 3, 1, 1, nrows, 99, jinarray, anynull, + & status) + call ftgcve(iunit, 4, 1, 1, nrows, 99., einarray, anynull, + & status) + call ftgcvd(iunit, 5, 1, 1, nrows, dnul, dinarray, anynull, + & status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values after deleting 2 rows at row 10: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1011) inskey(ii), jj, + & iinarray(ii), jinarray(ii), einarray(ii), dinarray(ii) + end do + call ftdcol(iunit, 3, status) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'UNDEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 2, 1, 1, nrows, bnul, binarray, anynull, + & status) + call ftgcvi(iunit, 2, 1, 1, nrows, inul, iinarray, anynull, + & status) + call ftgcve(iunit, 3, 1, 1, nrows, 99., einarray, anynull, + & status) + call ftgcvd(iunit, 4, 1, 1, nrows, dnul, dinarray, anynull, + & status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values after deleting column 3: ' + do ii = 1,nrows + jj = ichar(binarray(ii)) + write(*,1012) inskey(ii), jj, + & iinarray(ii), einarray(ii), dinarray(ii) +1012 format(1x,a15,2i3,1x,2f3.0) + + end do + + call fticol(iunit, 5, 'INSERT_COL', 'F14.6', status) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'UNDEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 2, 1, 1, nrows, bnul, binarray, anynull, + & status) + call ftgcvi(iunit, 2, 1, 1, nrows, inul, iinarray, anynull, + & status) + call ftgcve(iunit, 3, 1, 1, nrows, 99., einarray, anynull, + & status) + call ftgcvd(iunit, 4, 1, 1, nrows, dnul, dinarray, anynull, + & status) + call ftgcvj(iunit, 5, 1, 1, nrows, 99, jinarray, anynull, + & status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') ' Data values after inserting column 5: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1013) inskey(ii), jj, + & iinarray(ii), einarray(ii), dinarray(ii) , jinarray(ii) +1013 format(1x,a15,2i3,1x,2f3.0,i2) + + end do + +C ################################ +C # read data from binary table # +C ################################ + + + call ftmrhd(iunit, 1, hdutype, status) + if (status .gt. 0)go to 999 + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + call ftghsp(iunit, existkeys, morekeys, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A)')'Moved to binary table' + write(*,'(1x,A,I4,A,I4,A)') 'header contains ',existkeys, + & ' keywords with room for ',morekeys,' more ' + + call ftghbn(iunit, 99, nrows, tfields, ttype, + & tform, tunit, binname, pcount, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A,2I4,A,I4)') + & 'Binary table: nrows, tfields, extname, pcount:', + & nrows, tfields, binname, pcount + + do ii = 1,tfields + write(*,'(1x,3A)') ttype(ii), tform(ii), tunit(ii) + end do + + do ii = 1, 40 + larray(ii) = .false. + end do + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values read from binary table: ' + write(*,'(1x,A)') ' Bit column (X) data values: ' + + call ftgcx(iunit, 3, 1, 1, 36, larray, status) + write(*,1014) (larray(ii), ii = 1,40) +1014 format(1x,8l1,' ',8l1,' ',8l1,' ',8l1,' ',8l1) + + nrows = 21 + do ii = 1, nrows + larray(ii) = .false. + xinarray(ii) = ' ' + binarray(ii) = ' ' + iinarray(ii) = 0 + kinarray(ii) = 0 + einarray(ii) = 0. + dinarray(ii) = 0. + cinarray(ii * 2 -1) = 0. + minarray(ii * 2 -1) = 0. + cinarray(ii * 2 ) = 0. + minarray(ii * 2 ) = 0. + end do + + write(*,'(1x,A)') ' ' + call ftgcvs(iunit, 1, 4, 1, 1, ' ', inskey, anynull,status) + if (ichar(inskey(1)(1:1)) .eq. 0)inskey(1)=' ' + write(*,'(1x,2A)') 'null string column value (should be blank):', + & inskey(1) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcl( iunit, 2, 1, 1, nrows, larray, status) + bnul = char(98) + call ftgcvb(iunit, 3, 1, 1,nrows,bnul, xinarray,anynull,status) + call ftgcvb(iunit, 4, 1, 1,nrows,bnul, binarray,anynull,status) + inul = 98 + call ftgcvi(iunit, 5, 1, 1,nrows,inul, iinarray,anynull,status) + call ftgcvj(iunit, 6, 1, 1, nrows, 98, kinarray,anynull,status) + call ftgcve(iunit, 7, 1, 1, nrows, 98.,einarray,anynull,status) + dnul = 98. + call ftgcvd(iunit, 8, 1, 1, nrows,dnul,dinarray,anynull,status) + call ftgcvc(iunit, 9, 1, 1, nrows, 98.,cinarray,anynull,status) + call ftgcvm(iunit,10, 1, 1, nrows,dnul,minarray,anynull,status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Read columns with ftgcv_: ' + do ii = 1,nrows + jj = ichar(xinarray(ii)) + jjj = ichar(binarray(ii)) + write(*,1201)inskey(ii),larray(ii),jj,jjj,iinarray(ii), + & kinarray(ii), einarray(ii), dinarray(ii), cinarray(ii * 2 -1), + &cinarray(ii * 2 ), minarray(ii * 2 -1), minarray(ii * 2 ) + end do +1201 format(1x,a14,l4,4i4,6f5.0) + + do ii = 1, nrows + larray(ii) = .false. + xinarray(ii) = ' ' + binarray(ii) = ' ' + iinarray(ii) = 0 + kinarray(ii) = 0 + einarray(ii) = 0. + dinarray(ii) = 0. + cinarray(ii * 2 -1) = 0. + minarray(ii * 2 -1) = 0. + cinarray(ii * 2 ) = 0. + minarray(ii * 2 ) = 0. + end do + + call ftgcfs(iunit, 1, 1, 1, nrows, inskey, larray2, anynull, + & status) +C put blanks in strings if they are undefined. (contain nulls) + do ii = 1, nrows + if (larray2(ii))inskey(ii) = ' ' + end do + + call ftgcfl(iunit, 2, 1, 1, nrows, larray, larray2, anynull, + & status) + call ftgcfb(iunit, 3, 1, 1, nrows, xinarray, larray2, anynull, + & status) + call ftgcfb(iunit, 4, 1, 1, nrows, binarray, larray2, anynull, + & status) + call ftgcfi(iunit, 5, 1, 1, nrows, iinarray, larray2, anynull, + & status) + call ftgcfj(iunit, 6, 1, 1, nrows, kinarray, larray2, anynull, + & status) + call ftgcfe(iunit, 7, 1, 1, nrows, einarray, larray2, anynull, + & status) + call ftgcfd(iunit, 8, 1, 1, nrows, dinarray, larray2, anynull, + & status) + call ftgcfc(iunit, 9, 1, 1, nrows, cinarray, larray2, anynull, + & status) + call ftgcfm(iunit, 10,1, 1, nrows, minarray, larray2, anynull, + & status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') ' Read columns with ftgcf_: ' + do ii = 1, 10 + jj = ichar(xinarray(ii)) + jjj = ichar(binarray(ii)) + write(*,1201) + & inskey(ii),larray(ii),jj,jjj,iinarray(ii), + & kinarray(ii), einarray(ii), dinarray(ii), cinarray(ii * 2 -1), + & cinarray(ii * 2 ), minarray(ii * 2 -1), minarray(ii * 2) + end do + + do ii = 11, 21 +C don't try to print the NaN values + jj = ichar(xinarray(ii)) + jjj = ichar(binarray(ii)) + write(*,1201) inskey(ii), larray(ii), jj, + & jjj, iinarray(ii) + end do + + call ftprec(iunit,'key_prec= '// + &'''This keyword was written by f_prec'' / comment here', + & status) + +C ############################################### +C # test the insert/delete row/column routines # +C ############################################### + + call ftirow(iunit, 2, 3, status) + if (status .gt. 0) go to 999 + + nrows = 14 + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 4, 1, 1, nrows,bnul,binarray,anynull,status) + call ftgcvi(iunit, 5, 1, 1, nrows,inul,iinarray,anynull,status) + call ftgcvj(iunit, 6, 1, 1, nrows, 98, jinarray,anynull,status) + call ftgcve(iunit, 7, 1, 1, nrows, 98.,einarray,anynull,status) + call ftgcvd(iunit, 8, 1, 1, nrows,dnul,dinarray,anynull,status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)')'Data values after inserting 3 rows after row 2:' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1202) inskey(ii), jj, + & iinarray(ii), jinarray(ii), einarray(ii), dinarray(ii) + end do +1202 format(1x,a14,3i4,2f5.0) + + call ftdrow(iunit, 10, 2, status) + if (status .gt. 0)goto 999 + + nrows = 12 + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 4, 1, 1, nrows,bnul,binarray,anynull,status) + call ftgcvi(iunit, 5, 1, 1, nrows,inul,iinarray,anynull,status) + call ftgcvj(iunit, 6, 1, 1, nrows, 98,jinarray,anynull,status) + call ftgcve(iunit, 7, 1, 1, nrows, 98.,einarray,anynull,status) + call ftgcvd(iunit, 8, 1, 1, nrows,dnul,dinarray,anynull,status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values after deleting 2 rows at row 10: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1202) inskey(ii), jj, + & iinarray(ii), jinarray(ii), einarray(ii), dinarray(ii) + end do + + call ftdcol(iunit, 6, status) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 4, 1, 1, nrows,bnul,binarray,anynull,status) + call ftgcvi(iunit, 5, 1, 1, nrows,inul,iinarray,anynull,status) + call ftgcve(iunit, 6, 1, 1, nrows, 98.,einarray,anynull,status) + call ftgcvd(iunit, 7, 1, 1, nrows,dnul,dinarray,anynull,status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values after deleting column 6: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1203) inskey(ii), jj, + & iinarray(ii), einarray(ii), dinarray(ii) +1203 format(1x,a14,2i4,2f5.0) + + end do + call fticol(iunit, 8, 'INSERT_COL', '1E', status) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 4, 1, 1, nrows,bnul,binarray,anynull,status) + call ftgcvi(iunit, 5, 1, 1, nrows,inul,iinarray,anynull,status) + call ftgcve(iunit, 6, 1, 1, nrows, 98.,einarray,anynull,status) + call ftgcvd(iunit, 7, 1, 1, nrows,dnul,dinarray,anynull,status) + call ftgcvj(iunit, 8, 1, 1, nrows, 98,jinarray,anynull,status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') 'Data values after inserting column 8: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1204) inskey(ii), jj, + & iinarray(ii), einarray(ii), dinarray(ii) , jinarray(ii) +1204 format(1x,a14,2i4,2f5.0,i3) + end do + call ftpclu(iunit, 8, 1, 1, 10, status) + + call ftgcvs(iunit, 1, 1, 1, nrows, 'NOT DEFINED', inskey, + & anynull, status) + call ftgcvb(iunit, 4,1,1,nrows,bnul,binarray,anynull,status) + call ftgcvi(iunit, 5,1,1,nrows,inul,iinarray,anynull,status) + call ftgcve(iunit, 6,1,1,nrows,98., einarray,anynull,status) + call ftgcvd(iunit, 7,1,1,nrows,dnul, dinarray,anynull,status) + call ftgcvj(iunit, 8,1,1,nrows,98, jinarray,anynull, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') + & 'Values after setting 1st 10 elements in column 8 = null: ' + do ii = 1, nrows + jj = ichar(binarray(ii)) + write(*,1204) inskey(ii), jj, + & iinarray(ii), einarray(ii), dinarray(ii) , jinarray(ii) + end do + +C #################################################### +C # insert binary table following the primary array # +C #################################################### + + call ftmahd(iunit, 1, hdutype, status) + + tform(1) = '15A' + tform(2) = '1L' + tform(3) = '16X' + tform(4) = '1B' + tform(5) = '1I' + tform(6) = '1J' + tform(7) = '1E' + tform(8) = '1D' + tform(9) = '1C' + tform(10)= '1M' + + ttype(1) = 'Avalue' + ttype(2) = 'Lvalue' + ttype(3) = 'Xvalue' + ttype(4) = 'Bvalue' + ttype(5) = 'Ivalue' + ttype(6) = 'Jvalue' + ttype(7) = 'Evalue' + ttype(8) = 'Dvalue' + ttype(9) = 'Cvalue' + ttype(10)= 'Mvalue' + + tunit(1)= ' ' + tunit(2)= 'm**2' + tunit(3)= 'cm' + tunit(4)= 'erg/s' + tunit(5)= 'km/s' + tunit(6)= ' ' + tunit(7)= ' ' + tunit(8)= ' ' + tunit(9)= ' ' + tunit(10)= ' ' + + nrows = 20 + tfields = 10 + pcount = 0 + + call ftibin(iunit, nrows, tfields, ttype, tform, tunit, + & binname, pcount, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)') 'ftibin status = ', status + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + call ftpkyj(iunit, 'TNULL4', 77, + & 'value for undefined pixels', status) + call ftpkyj(iunit, 'TNULL5', 77, + & 'value for undefined pixels', status) + call ftpkyj(iunit, 'TNULL6', 77, + & 'value for undefined pixels', status) + + call ftpkyj(iunit, 'TSCAL4', 1000, 'scaling factor', status) + call ftpkyj(iunit, 'TSCAL5', 1, 'scaling factor', status) + call ftpkyj(iunit, 'TSCAL6', 100, 'scaling factor', status) + + call ftpkyj(iunit, 'TZERO4', 0, 'scaling offset', status) + call ftpkyj(iunit, 'TZERO5', 32768, 'scaling offset', status) + call ftpkyj(iunit, 'TZERO6', 100, 'scaling offset', status) + + call fttnul(iunit, 4, 77, status) +C define null value for int cols + call fttnul(iunit, 5, 77, status) + call fttnul(iunit, 6, 77, status) + +C set scaling + scale=1000. + zero = 0. + call fttscl(iunit, 4, scale, zero, status) + scale=1. + zero = 32768. + call fttscl(iunit, 5, scale, zero, status) + scale=100. + zero = 100. + call fttscl(iunit, 6, scale, zero, status) + +C for some reason, it is still necessary to call ftrdef at this point + call ftrdef(iunit,status) + +C ############################ +C # write data to columns # +C ############################ + +C initialize arrays of values to write to table + + joutarray(1) = 0 + joutarray(2) = 1000 + joutarray(3) = 10000 + joutarray(4) = 32768 + joutarray(5) = 65535 + + + do ii = 4,6 + + call ftpclj(iunit, ii, 1, 1, 5, joutarray, status) + if (status .eq. 412)then + write(*,'(1x,A,I4)') 'Overflow writing to column ', ii + status = 0 + end if + + call ftpclu(iunit, ii, 6, 1, 1, status) +C write null value + end do + + do jj = 4,6 + call ftgcvj(iunit, jj, 1,1,6, -999,jinarray,anynull,status) + write(*,'(1x,6I6)') (jinarray(ii), ii=1,6) + end do + + write(*,'(1x,A)') ' ' + +C turn off scaling, and read the unscaled values + scale = 1. + zero = 0. + call fttscl(iunit, 4, scale, zero, status) + call fttscl(iunit, 5, scale, zero, status) + call fttscl(iunit, 6, scale, zero, status) + + do jj = 4,6 + call ftgcvj(iunit, jj,1,1,6,-999,jinarray,anynull,status) + write(*,'(1x,6I6)') (jinarray(ii), ii = 1,6) + end do + + if (status .gt. 0)go to 999 + +C ###################################################### +C # insert image extension following the binary table # +C ###################################################### + + bitpix = -32 + naxis = 2 + naxes(1) = 15 + naxes(2) = 25 + call ftiimg(iunit, bitpix, naxis, naxes, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)') + & ' Create image extension: ftiimg status = ', status + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + do jj = 0,29 + do ii = 0,18 + imgarray(ii+1,jj+1) = (jj * 10) + ii + end do + end do + + call ftp2di(iunit, 1, 19, naxes(1),naxes(2),imgarray,status) + write(*,'(1x,A)') ' ' + write(*,'(1x,A,I4)')'Wrote whole 2D array: ftp2di status =', + & status + + do jj =1, 30 + do ii = 1, 19 + imgarray(ii,jj) = 0 + end do + end do + + call ftg2di(iunit,1,0,19,naxes(1),naxes(2),imgarray,anynull, + & status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)')'Read whole 2D array: ftg2di status =',status + + do jj =1, 30 + write (*,1301)(imgarray(ii,jj),ii=1,19) +1301 format(1x,19I4) + end do + + write(*,'(1x,A)') ' ' + + + do jj =1, 30 + do ii = 1, 19 + imgarray(ii,jj) = 0 + end do + end do + + do jj =0, 19 + do ii = 0, 9 + imgarray2(ii+1,jj+1) = (jj * (-10)) - ii + end do + end do + + fpixels(1) = 5 + fpixels(2) = 5 + lpixels(1) = 14 + lpixels(2) = 14 + call ftpssi(iunit, 1, naxis, naxes, fpixels, lpixels, + & imgarray2, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)')'Wrote subset 2D array: ftpssi status =', + & status + + call ftg2di(iunit,1,0,19,naxes(1), naxes(2),imgarray,anynull, + & status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)')'Read whole 2D array: ftg2di status =',status + + do jj =1, 30 + write (*,1301)(imgarray(ii,jj),ii=1,19) + end do + write(*,'(1x,A)') ' ' + + + fpixels(1) = 2 + fpixels(2) = 5 + lpixels(1) = 10 + lpixels(2) = 8 + inc(1) = 2 + inc(2) = 3 + + do jj = 1,30 + do ii = 1, 19 + imgarray(ii,jj) = 0 + end do + end do + + call ftgsvi(iunit, 1, naxis, naxes, fpixels, lpixels, inc, 0, + & imgarray, anynull, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)') + & 'Read subset of 2D array: ftgsvi status = ',status + + write(*,'(1x,10I5)')(imgarray(ii,1),ii = 1,10) + + +C ########################################################### +C # insert another image extension # +C # copy the image extension to primary array of tmp file. # +C # then delete the tmp file, and the image extension # +C ########################################################### + + bitpix = 16 + naxis = 2 + naxes(1) = 15 + naxes(2) = 25 + call ftiimg(iunit, bitpix, naxis, naxes, status) + write(*,'(1x,A)') ' ' + write(*,'(1x,A,I4)')'Create image extension: ftiimg status =', + & status + call ftrdef(iunit, status) + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + + filename = 't1q2s3v4.tmp' + call ftinit(tmpunit, filename, 1, status) + write(*,'(1x,A,I4)')'Create temporary file: ftinit status = ', + & status + + call ftcopy(iunit, tmpunit, 0, status) + write(*,'(1x,A)') + & 'Copy image extension to primary array of tmp file.' + write(*,'(1x,A,I4)')'ftcopy status = ',status + + + call ftgrec(tmpunit, 1, card, status) + write(*,'(1x,A)') card + call ftgrec(tmpunit, 2, card, status) + write(*,'(1x,A)') card + call ftgrec(tmpunit, 3, card, status) + write(*,'(1x,A)') card + call ftgrec(tmpunit, 4, card, status) + write(*,'(1x,A)') card + call ftgrec(tmpunit, 5, card, status) + write(*,'(1x,A)') card + call ftgrec(tmpunit, 6, card, status) + write(*,'(1x,A)') card + + call ftdelt(tmpunit, status) + write(*,'(1x,A,I4)')'Delete the tmp file: ftdelt status =',status + call ftdhdu(iunit, hdutype, status) + write(*,'(1x,A,2I4)') + & 'Delete the image extension hdutype, status =', + & hdutype, status + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + +C ########################################################### +C # append bintable extension with variable length columns # +C ########################################################### + + call ftcrhd(iunit, status) + write(*,'(1x,A,I4)') 'ftcrhd status = ', status + + tform(1)= '1PA' + tform(2)= '1PL' + tform(3)= '1PB' +C Fortran FITSIO doesn't support 1PX + tform(4)= '1PB' + tform(5)= '1PI' + tform(6)= '1PJ' + tform(7)= '1PE' + tform(8)= '1PD' + tform(9)= '1PC' + tform(10)= '1PM' + + ttype(1)= 'Avalue' + ttype(2)= 'Lvalue' + ttype(3)= 'Xvalue' + ttype(4)= 'Bvalue' + ttype(5)= 'Ivalue' + ttype(6)= 'Jvalue' + ttype(7)= 'Evalue' + ttype(8)= 'Dvalue' + ttype(9)= 'Cvalue' + ttype(10)= 'Mvalue' + + tunit(1)= ' ' + tunit(2)= 'm**2' + tunit(3)= 'cm' + tunit(4)= 'erg/s' + tunit(5)= 'km/s' + tunit(6)= ' ' + tunit(7)= ' ' + tunit(8)= ' ' + tunit(9)= ' ' + tunit(10)= ' ' + + nrows = 20 + tfields = 10 + pcount = 0 + + call ftphbn(iunit, nrows, tfields, ttype, tform, + & tunit, binname, pcount, status) + write(*,'(1x,A,I4)')'Variable length arrays: ftphbn status =', + & status + call ftpkyj(iunit, 'TNULL4', 88, 'value for undefined pixels', + & status) + call ftpkyj(iunit, 'TNULL5', 88, 'value for undefined pixels', + & status) + call ftpkyj(iunit, 'TNULL6', 88, 'value for undefined pixels', + & status) + +C ############################ +C # write data to columns # +C ############################ + +C initialize arrays of values to write to table + iskey='abcdefghijklmnopqrst' + + do ii = 1, 20 + + boutarray(ii) = char(ii) + ioutarray(ii) = ii + joutarray(ii) = ii + eoutarray(ii) = ii + doutarray(ii) = ii + end do + + larray(1) = .false. + larray(2) = .true. + larray(3) = .false. + larray(4) = .false. + larray(5) = .true. + larray(6) = .true. + larray(7) = .false. + larray(8) = .false. + larray(9) = .false. + larray(10) = .true. + larray(11) = .true. + larray(12) = .true. + larray(13) = .false. + larray(14) = .false. + larray(15) = .false. + larray(16) = .false. + larray(17) = .true. + larray(18) = .true. + larray(19) = .true. + larray(20) = .true. + +C inskey(1) = iskey(1:1) + inskey(1) = ' ' + + call ftpcls(iunit, 1, 1, 1, 1, inskey, status) +C write string values + call ftpcll(iunit, 2, 1, 1, 1, larray, status) +C write logicals + call ftpclx(iunit, 3, 1, 1, 1, larray, status) +C write bits + call ftpclb(iunit, 4, 1, 1, 1, boutarray, status) + call ftpcli(iunit, 5, 1, 1, 1, ioutarray, status) + call ftpclj(iunit, 6, 1, 1, 1, joutarray, status) + call ftpcle(iunit, 7, 1, 1, 1, eoutarray, status) + call ftpcld(iunit, 8, 1, 1, 1, doutarray, status) + + do ii = 2, 20 +C loop over rows 1 - 20 + + inskey(1) = iskey(1:ii) + call ftpcls(iunit, 1, ii, 1, ii, inskey, status) +C write string values + + call ftpcll(iunit, 2, ii, 1, ii, larray, status) +C write logicals + call ftpclu(iunit, 2, ii, ii-1, 1, status) + + call ftpclx(iunit, 3, ii, 1, ii, larray, status) +C write bits + + call ftpclb(iunit, 4, ii, 1, ii, boutarray, status) + call ftpclu(iunit, 4, ii, ii-1, 1, status) + + call ftpcli(iunit, 5, ii, 1, ii, ioutarray, status) + call ftpclu(iunit, 5, ii, ii-1, 1, status) + + call ftpclj(iunit, 6, ii, 1, ii, joutarray, status) + call ftpclu(iunit, 6, ii, ii-1, 1, status) + + call ftpcle(iunit, 7, ii, 1, ii, eoutarray, status) + call ftpclu(iunit, 7, ii, ii-1, 1, status) + + call ftpcld(iunit, 8, ii, 1, ii, doutarray, status) + call ftpclu(iunit, 8, ii, ii-1, 1, status) + end do + +C it is no longer necessary to update the PCOUNT keyword; +C FITSIO now does this automatically when the HDU is closed. +C call ftmkyj(iunit,'PCOUNT',4446, '&',status) + write(*,'(1x,A,I4)') 'ftpcl_ status = ', status + +C ################################# +C # close then reopen this HDU # +C ################################# + + call ftmrhd(iunit, -1, hdutype, status) + call ftmrhd(iunit, 1, hdutype, status) + +C ############################# +C # read data from columns # +C ############################# + + + call ftgkyj(iunit, 'PCOUNT', pcount, comm, status) + write(*,'(1x,A,I4)') 'PCOUNT = ', pcount + +C initialize the variables to be read + inskey(1) =' ' + iskey = ' ' + + do jj = 1, ii + larray(jj) = .false. + boutarray(jj) = char(0) + ioutarray(jj) = 0 + joutarray(jj) = 0 + eoutarray(jj) = 0 + doutarray(jj) = 0 + end do + + call ftghdn(iunit, hdunum) + write(*,'(1x,A,I4)') 'HDU number = ', hdunum + + do ii = 1, 20 +C loop over rows 1 - 20 + + do jj = 1, ii + larray(jj) = .false. + boutarray(jj) = char(0) + ioutarray(jj) = 0 + joutarray(jj) = 0 + eoutarray(jj) = 0 + doutarray(jj) = 0 + end do + + call ftgcvs(iunit, 1, ii, 1,1,iskey,inskey,anynull,status) + write(*,'(1x,2A,I4)') 'A ', inskey(1), status + + call ftgcl( iunit, 2, ii, 1, ii, larray, status) + write(*,1400)'L',status,(larray(jj),jj=1,ii) +1400 format(1x,a1,i3,20l3) +1401 format(1x,a1,21i3) + + call ftgcx(iunit, 3, ii, 1, ii, larray, status) + write(*,1400)'X',status,(larray(jj),jj=1,ii) + + bnul = char(99) + call ftgcvb(iunit, 4, ii, 1,ii,bnul,boutarray,anynull,status) + do jj = 1,ii + jinarray(jj) = ichar(boutarray(jj)) + end do + write(*,1401)'B',(jinarray(jj),jj=1,ii),status + + inul = 99 + call ftgcvi(iunit, 5, ii, 1,ii,inul,ioutarray,anynull,status) + write(*,1401)'I',(ioutarray(jj),jj=1,ii),status + + call ftgcvj(iunit, 6, ii, 1, ii,99,joutarray,anynull,status) + write(*,1401)'J',(joutarray(jj),jj=1,ii),status + + call ftgcve(iunit, 7, ii, 1,ii,99.,eoutarray,anynull,status) + estatus=status + write(*,1402)'E',(eoutarray(jj),jj=1,ii),estatus +1402 format(1x,a1,1x,21f3.0) + + dnul = 99. + call ftgcvd(iunit, 8, ii,1,ii,dnul,doutarray,anynull,status) + estatus=status + write(*,1402)'D',(doutarray(jj),jj=1,ii),estatus + + call ftgdes(iunit, 8, ii, repeat, offset, status) + write(*,'(1x,A,2I5)')'Column 8 repeat and offset =', + & repeat,offset + end do + +C ##################################### +C # create another image extension # +C ##################################### + + + bitpix = 32 + naxis = 2 + naxes(1) = 10 + naxes(2) = 2 + npixels = 20 + + call ftiimg(iunit, bitpix, naxis, naxes, status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)')'Create image extension: ftiimg status =', + & status + +C initialize arrays of values to write to primary array + do ii = 1, npixels + boutarray(ii) = char(ii * 2 -2) + ioutarray(ii) = ii * 2 -2 + joutarray(ii) = ii * 2 -2 + koutarray(ii) = ii * 2 -2 + eoutarray(ii) = ii * 2 -2 + doutarray(ii) = ii * 2 -2 + end do + +C write a few pixels with each datatype + call ftpprb(iunit, 1, 1, 2, boutarray(1), status) + call ftppri(iunit, 1, 3, 2, ioutarray(3), status) + call ftpprj(iunit, 1, 5, 2, koutarray(5), status) + call ftppri(iunit, 1, 7, 2, ioutarray(7), status) + call ftpprj(iunit, 1, 9, 2, joutarray(9), status) + call ftppre(iunit, 1, 11, 2, eoutarray(11), status) + call ftpprd(iunit, 1, 13, 2, doutarray(13), status) + write(*,'(1x,A,I4)') 'ftppr status = ', status + + +C read back the pixels with each datatype + bnul = char(0) + inul = 0 + knul = 0 + jnul = 0 + enul = 0. + dnul = 0. + + call ftgpvb(iunit, 1, 1, 14, bnul, binarray, anynull, status) + call ftgpvi(iunit, 1, 1, 14, inul, iinarray, anynull, status) + call ftgpvj(iunit, 1, 1, 14, knul, kinarray, anynull, status) + call ftgpvj(iunit, 1, 1, 14, jnul, jinarray, anynull, status) + call ftgpve(iunit, 1, 1, 14, enul, einarray, anynull, status) + call ftgpvd(iunit, 1, 1, 14, dnul, dinarray, anynull, status) + + write(*,'(1x,A)')' ' + write(*,'(1x,A)') + & 'Image values written with ftppr and read with ftgpv:' + npixels = 14 + do jj = 1,ii + joutarray(jj) = ichar(binarray(jj)) + end do + + write(*,1501)(joutarray(ii),ii=1,npixels),anynull,'(byte)' +1501 format(1x,14i3,l3,1x,a) + write(*,1501)(iinarray(ii),ii=1,npixels),anynull,'(short)' + write(*,1501)(kinarray(ii),ii=1,npixels),anynull,'(int)' + write(*,1501)(jinarray(ii),ii=1,npixels),anynull,'(long)' + write(*,1502)(einarray(ii),ii=1,npixels),anynull,'(float)' + write(*,1502)(dinarray(ii),ii=1,npixels),anynull,'(double)' +1502 format(2x,14f3.0,l2,1x,a) + +C ########################################## +C # test world coordinate system routines # +C ########################################## + + xrval = 45.83D+00 + yrval = 63.57D+00 + xrpix = 256.D+00 + yrpix = 257.D+00 + xinc = -.00277777D+00 + yinc = .00277777D+00 + +C write the WCS keywords +C use example values from the latest WCS document + call ftpkyd(iunit, 'CRVAL1', xrval, 10, 'comment', status) + call ftpkyd(iunit, 'CRVAL2', yrval, 10, 'comment', status) + call ftpkyd(iunit, 'CRPIX1', xrpix, 10, 'comment', status) + call ftpkyd(iunit, 'CRPIX2', yrpix, 10, 'comment', status) + call ftpkyd(iunit, 'CDELT1', xinc, 10, 'comment', status) + call ftpkyd(iunit, 'CDELT2', yinc, 10, 'comment', status) +C call ftpkyd(iunit, 'CROTA2', rot, 10, 'comment', status) + call ftpkys(iunit, 'CTYPE1', xctype, 'comment', status) + call ftpkys(iunit, 'CTYPE2', yctype, 'comment', status) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4)')'Wrote WCS keywords status =', status + +C reset value, to make sure they are reread correctly + xrval = 0.D+00 + yrval = 0.D+00 + xrpix = 0.D+00 + yrpix = 0.D+00 + xinc = 0.D+00 + yinc = 0.D+00 + rot = 67.D+00 + + call ftgics(iunit, xrval, yrval, xrpix, + & yrpix, xinc, yinc, rot, ctype, status) + write(*,'(1x,A,I4)')'Read WCS keywords with ftgics status =', + & status + + xpix = 0.5D+00 + ypix = 0.5D+00 + + call ftwldp(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc, + & rot,ctype, xpos, ypos,status) + + write(*,'(1x,A,2f8.3)')' CRVAL1, CRVAL2 =', xrval,yrval + write(*,'(1x,A,2f8.3)')' CRPIX1, CRPIX2 =', xrpix,yrpix + write(*,'(1x,A,2f12.8)')' CDELT1, CDELT2 =', xinc,yinc + write(*,'(1x,A,f8.3,2A)')' Rotation =',rot,' CTYPE =',ctype + write(*,'(1x,A,I4)')'Calculated sky coord. with ftwldp status =', + & status + write(*,6501)xpix,ypix,xpos,ypos +6501 format(' Pixels (',f10.6,f10.6,') --> (',f10.6,f10.6,') Sky') + + call ftxypx(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc, + & rot,ctype, xpix, ypix,status) + write(*,'(1x,A,I4)') + & 'Calculated pixel coord. with ftxypx status =', status + write(*,6502)xpos,ypos,xpix,ypix +6502 format(' Sky (',f10.6,f10.6,') --> (',f10.6,f10.6,') Pixels') + + +C ###################################### +C # append another ASCII table # +C ###################################### + + + tform(1)= 'A15' + tform(2)= 'I11' + tform(3)= 'F15.6' + tform(4)= 'E13.5' + tform(5)= 'D22.14' + + tbcol(1)= 1 + tbcol(2)= 17 + tbcol(3)= 29 + tbcol(4)= 45 + tbcol(5)= 59 + rowlen = 80 + + ttype(1)= 'Name' + ttype(2)= 'Ivalue' + ttype(3)= 'Fvalue' + ttype(4)= 'Evalue' + ttype(5)= 'Dvalue' + + tunit(1)= ' ' + tunit(2)= 'm**2' + tunit(3)= 'cm' + tunit(4)= 'erg/s' + tunit(5)= 'km/s' + + nrows = 11 + tfields = 5 + tblname = 'new_table' + + call ftitab(iunit, rowlen, nrows, tfields, ttype, tbcol, + & tform, tunit, tblname, status) + write(*,'(1x,A)') ' ' + write(*,'(1x,A,I4)') 'ftitab status = ', status + + call ftpcls(iunit, 1, 1, 1, 3, onskey, status) +C write string values + +C initialize arrays of values to write to primary array + + do ii = 1,npixels + boutarray(ii) = char(ii * 3 -3) + ioutarray(ii) = ii * 3 -3 + joutarray(ii) = ii * 3 -3 + koutarray(ii) = ii * 3 -3 + eoutarray(ii) = ii * 3 -3 + doutarray(ii) = ii * 3 -3 + end do + + do ii = 2,5 +C loop over cols 2 - 5 + + call ftpclb(iunit, ii, 1, 1, 2, boutarray, status) + call ftpcli(iunit, ii, 3, 1, 2,ioutarray(3),status) + call ftpclj(iunit, ii, 5, 1, 2,joutarray(5),status) + call ftpcle(iunit, ii, 7, 1, 2,eoutarray(7),status) + call ftpcld(iunit, ii, 9, 1, 2,doutarray(9),status) + end do + write(*,'(1x,A,I4)') 'ftpcl status = ', status + +C read back the pixels with each datatype + call ftgcvb(iunit, 2, 1, 1, 10, bnul, binarray,anynull, + & status) + call ftgcvi(iunit, 2, 1, 1, 10, inul, iinarray,anynull, + & status) + call ftgcvj(iunit, 3, 1, 1, 10, knul, kinarray,anynull, + & status) + call ftgcvj(iunit, 3, 1, 1, 10, jnul, jinarray,anynull, + & status) + call ftgcve(iunit, 4, 1, 1, 10, enul, einarray,anynull, + & status) + call ftgcvd(iunit, 5, 1, 1, 10, dnul, dinarray,anynull, + & status) + + write(*,'(1x,A)') + &'Column values written with ftpcl and read with ftgcl: ' + npixels = 10 + do ii = 1,npixels + joutarray(ii) = ichar(binarray(ii)) + end do + write(*,1601)(joutarray(ii),ii = 1, npixels),anynull,'(byte) ' + write(*,1601)(iinarray(ii),ii = 1, npixels),anynull,'(short) ' + write(*,1601)(kinarray(ii),ii = 1, npixels),anynull,'(int) ' + write(*,1601)(jinarray(ii),ii = 1, npixels),anynull,'(long) ' + write(*,1602)(einarray(ii),ii = 1, npixels),anynull,'(float) ' + write(*,1602)(dinarray(ii),ii = 1, npixels),anynull,'(double) ' +1601 format(1x,10i3,l3,1x,a) +1602 format(2x,10f3.0,l2,1x,a) + +C ########################################################### +C # perform stress test by cycling thru all the extensions # +C ########################################################### + write(*,'(1x,A)')' ' + write(*,'(1x,A)')'Repeatedly move to the 1st 4 HDUs of the file: ' + + do ii = 1,10 + call ftmahd(iunit, 1, hdutype, status) + call ftghdn(iunit, hdunum) + call ftmrhd(iunit, 1, hdutype, status) + call ftghdn(iunit, hdunum) + call ftmrhd(iunit, 1, hdutype, status) + call ftghdn(iunit, hdunum) + call ftmrhd(iunit, 1, hdutype, status) + call ftghdn(iunit, hdunum) + call ftmrhd(iunit, -1, hdutype, status) + call ftghdn(iunit, hdunum) + if (status .gt. 0) go to 999 + end do + + write(*,'(1x,A)') ' ' + + checksum = 1234567890.D+00 + call ftesum(checksum, .false., asciisum) + write(*,'(1x,A,F13.1,2A)')'Encode checksum: ',checksum,' -> ', + & asciisum + checksum = 0 + call ftdsum(asciisum, 0, checksum) + write(*,'(1x,3A,F13.1)') 'Decode checksum: ',asciisum,' -> ', + & checksum + + call ftpcks(iunit, status) + +C don't print the CHECKSUM value because it is different every day +C because the current date is in the comment field. + + call ftgcrd(iunit, 'CHECKSUM', card, status) +C write(*,'(1x,A)') card + + call ftgcrd(iunit, 'DATASUM', card, status) + write(*,'(1x,A)') card(1:22) + + call ftgcks(iunit, datsum, checksum, status) + write(*,'(1x,A,F13.1,I4)') 'ftgcks data checksum, status = ', + & datsum, status + + call ftvcks(iunit, datastatus, hdustatus, status) + write(*,'(1x,A,3I4)')'ftvcks datastatus, hdustatus, status = ', + & datastatus, hdustatus, status + + call ftprec(iunit, + & 'new_key = ''written by fxprec'' / to change checksum',status) + call ftucks(iunit, status) + write(*,'(1x,A,I4)') 'ftupck status = ', status + + call ftgcrd(iunit, 'DATASUM', card, status) + write(*,'(1x,A)') card(1:22) + call ftvcks(iunit, datastatus, hdustatus, status) + write(*,'(1x,A,3I4)') 'ftvcks datastatus, hdustatus, status = ', + & datastatus, hdustatus, status + +C delete the checksum keywords, so that the FITS file is always +C the same, regardless of the date of when testprog is run. + + call ftdkey(iunit, 'CHECKSUM', status) + call ftdkey(iunit, 'DATASUM', status) + + +C ############################ +C # close file and quit # +C ############################ + + +999 continue +C jump here on error + + call ftclos(iunit, status) + write(*,'(1x,A,I4)') 'ftclos status = ', status + write(*,'(1x,A)')' ' + + write(*,'(1x,A)') + & 'Normally, there should be 8 error messages on the' + write(*,'(1x,A)') 'stack all regarding ''numerical overflows'':' + + call ftgmsg(errmsg) + nmsg = 0 + +998 continue + if (errmsg .ne. ' ')then + write(*,'(1x,A)') errmsg + nmsg = nmsg + 1 + call ftgmsg(errmsg) + go to 998 + end if + + if (nmsg .ne. 8)write(*,'(1x,A)') + & ' WARNING: Did not find the expected 8 error messages!' + + call ftgerr(status, errmsg) + write(*,'(1x,A)')' ' + write(*,'(1x,A,I4,2A)') 'Status =', status,': ', errmsg(1:50) + end diff --git a/software/cfitsio3040/testf77.out b/software/cfitsio3040/testf77.out new file mode 100644 index 000000000..002012af1 --- /dev/null +++ b/software/cfitsio3040/testf77.out @@ -0,0 +1,746 @@ + FITSIO TESTPROG, v 3.040 + + Try opening then closing a nonexistent file: + ftopen iunit, status (expect an error) = 15 104 + ftclos status = 104 + + ftinit create new file status = 0 + + test writing of long string keywords: + 123456789012345678901234567890123456789012345678901234567890123456789012345 + '12345678901234567890123456789012345678901234567890123456789012345678' + 1234567890123456789012345678901234567890123456789012345678901234'6789012345 + '1234567890123456789012345678901234567890123456789012345678901234''67' + 1234567890123456789012345678901234567890123456789012345678901234''789012345 + '1234567890123456789012345678901234567890123456789012345678901234''''' + 1234567890123456789012345678901234567890123456789012345678901234567'9012345 + '1234567890123456789012345678901234567890123456789012345678901234567' + Wrote all Keywords successfully + ftflus status = 0 + + HDU number = 1 + Values read back from primary array (99 = null pixel) + The 1st, and every 4th pixel should be undefined: + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 T (ftgpvb) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 T (ftgpvi) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 T (ftgpvj) + 99. 2. 3.99. 5. 6. 7.99. 9.10.11.99.13.14.15.99.17.18.19.99. T (ftgpve) + 99. 2. 3.99. 5. 6. 7.99. 9.10.11.99.13.14.15.99.17.18.19.99. T (ftgpvd) + 0 2 3 0 5 6 7 0 9 10 11 0 13 14 15 0 17 18 19 0 T (ftgpfb) + 0 2 3 0 5 6 7 0 9 10 11 0 13 14 15 0 17 18 19 0 T (ftgpfi) + 0 2 3 0 5 6 7 0 9 10 11 0 13 14 15 0 17 18 19 0 T (ftgpfj) + 0. 2. 3. 0. 5. 6. 7. 0. 9.10.11. 0.13.14.15. 0.17.18.19. 0. T (ftgpfe) + 0. 2. 3. 0. 5. 6. 7. 0. 9.10.11. 0.13.14.15. 0.17.18.19. 0. T (ftgpfd) + + Closed then reopened the FITS file 10 times. + + HDU number = 1 + Read back keywords: + simple, bitpix, naxis, naxes = T 32 2 10 2 + pcount, gcount, extend = 0 1 T + KEY_PREC= 'This keyword was written by fxprec' / comment goes here + KEY_PREC 'This keyword was written by fxprec comment goes here + KEY_PREC= 'This keyword was written by fxprec' / comment goes here + KY_PKNS1 :'first string' :fxpkns comment + KEY_PKYS :value_string :fxpkys comment 0 + KEY_PKYL : T:fxpkyl comment 0 + KEY_PKYJ : 11:fxpkyj comment 0 + KEY_PKYE : 11.00000:fxpkyj comment 0 + KEY_PKYD : 11.00000:fxpkyj comment 0 + KEY_PKYS :value_string :fxpkys comment 0 + KEY_PKYL : T:fxpkyl comment 0 + KEY_PKYJ : 11:fxpkyj comment 0 + KEY_PKYE : 13.13131:fxpkye comment 0 + KEY_PKYD : 15.15152:fxpkyd comment 0 + KEY_PKYF : 12.12121:fxpkyf comment 0 + KEY_PKYE : 13.13131:fxpkye comment 0 + KEY_PKYG : 14.141414141414:fxpkyg comment 0 + KEY_PKYD : 15.151515151515:fxpkyd comment 0 + KEY_PKYT : 12345678:0.12345678901235fxpkyt comment 0 + KEY_PKYJ : 11:[km/s/Mpc] fxpkyj comment 0 + keyword unit=km/s/Mpc + KEY_PKYJ : 11:fxpkyj comment 0 + keyword unit= + KEY_PKYJ : 11:[feet/second/second] fxpkyj comment 0 + keyword unit=feet/second/second + KEY_PKLS long string value = This is a very long string value that is continued + over more than one keyword. + header contains 61 keywords; located at keyword 23 + ftgkns: first string second string + ftgknl: T F T + ftgknj: 11 12 13 + ftgkne: 13.13131 14.14141 15.15152 + ftgknd: 15.15152 16.16162 17.17172 + + Before deleting the HISTORY and DATE keywords... + COMMENT + HISTORY + DATE + KY_PKNS1 + + After deleting the keywords... + COMMENT This keyword was written by fxpcom. + KY_PKNS1= 'first string' / fxpkns comment + + After inserting the keywords... + COMMENT continued over multiple keywords. The HEASARC convention uses the & + KY_IREC = 'This keyword inserted by fxirec' + KY_IKYS = 'insert_value_string' / ikys comment + KY_IKYJ = 49 / ikyj comment + KY_IKYL = T / ikyl comment + KY_IKYE = 1.2346E+01 / ikye comment + KY_IKYD = 1.23456789012346E+01 / ikyd comment + KY_IKYF = 12.3456 / ikyf comment + KY_IKYG = 12.3456789012346 / ikyg comment + COMMENT character at the end of each substring which is then continued + + After modifying the keywords... + COMMENT This keyword was modified by fxmrec + KY_MREC = 'This keyword was modified by fxmcrd' + NEWIKYS = 'modified_string' / ikys comment + KY_IKYJ = 50 / This is a modified comment + KY_IKYL = F / ikyl comment + KY_IKYE = -1.2346E+01 / ikye comment + KY_IKYD = -1.23456789012346E+01 / modified comment + KY_IKYF = -12.3456 / ikyf comment + KY_IKYG = -12.3456789012346 / ikyg comment + COMMENT character at the end of each substring which is then continued + + After updating the keywords... + COMMENT This keyword was modified by fxmrec + KY_UCRD = 'This keyword was updated by fxucrd' + NEWIKYS = 'updated_string' / ikys comment + KY_IKYJ = 51 / This is a modified comment + KY_IKYL = T / ikyl comment + KY_IKYE = -1.3346E+01 / ikye comment + KY_IKYD = -1.33456789012346E+01 / modified comment + KY_IKYF = -13.3456 / ikyf comment + KY_IKYG = -13.3456789012346 / ikyg comment + COMMENT character at the end of each substring which is then continued + + Keywords found using wildcard search (should be 9)... + KEY_PKYS= 'value_string' / fxpkys comment + KEY_PKYL= T / fxpkyl comment + KEY_PKYJ= 11 / [feet/second/second] fxpkyj comment + KEY_PKYF= 12.12121 / fxpkyf comment + KEY_PKYE= 1.313131E+01 / fxpkye comment + KEY_PKYG= 14.14141414141414 / fxpkyg comment + KEY_PKYD= 1.51515151515152E+01 / fxpkyd comment + NEWIKYS = 'updated_string' / ikys comment + KEY_PKYT= 12345678.1234567890123456 / fxpkyt comment + + ftibin status = 0 + HDU number = 2 + header contains 33 keywords located at keyword 1 + header contains 33 keywords with room for 74 more + TDIM3 = (1,2,8) 3 1 2 8 + ftpcl_ status = 0 + + Find the column numbers a returned status value of 237 is + expected and indicates that more than one column name matches + the input column name template. Status = 219 indicates that + there was no matching column name. + Column Xvalue is number 3 status = 0 + Column Avalue is number 1 status = 237 + Column Lvalue is number 2 status = 237 + Column Xvalue is number 3 status = 237 + Column Bvalue is number 4 status = 237 + Column Ivalue is number 5 status = 237 + Column Jvalue is number 6 status = 237 + Column Evalue is number 7 status = 237 + Column Dvalue is number 8 status = 237 + Column Cvalue is number 9 status = 237 + Column Mvalue is number 10 status = 237 + Column is number 0 status = 219 + + Information about each column: + 15A 16 15 15 Avalue A 1.00 0.00 1234554321 + 1L 14 1 1 Lvalue m**2 L 1.00 0.00 1234554321 + 16X 1 16 1 Xvalue cm X 1.00 0.00 1234554321 + 1B 11 1 1 Bvalue erg/s B 1.00 0.00 99 + 1I 21 1 2 Ivalue km/s I 1.00 0.00 99 + 1J 41 1 4 Jvalue J 1.00 0.00 99 + 1E 42 1 4 Evalue E 1.00 0.00 1234554321 + 1D 82 1 8 Dvalue D 1.00 0.00 1234554321 + 1C 83 1 8 Cvalue C 1.00 0.00 1234554321 + 1M 163 1 16 Mvalue M 1.00 0.00 1234554321 + + ftitab status = 0 + HDU number = 2 + ftpcl_ status = 0 + + ASCII table: rowlen, nrows, tfields, extname: 76 11 5 Test-ASCII + Name 1 A15 + Ivalue 17 I10 m**2 + Fvalue 28 F14.6 cm + Evalue 43 E12.5 erg/s + Dvalue 56 D21.14 km/s + + Data values read from ASCII table: + first string 1 1 1 1. 1. + second string 2 2 2 2. 2. + 3 3 3 3. 3. + UNDEFINED 4 4 4 4. 4. + 5 5 5 5. 5. + 6 6 6 6. 6. + 7 7 7 7. 7. + 8 8 8 8. 8. + 9 9 9 9. 9. + 10 10 10 10.10. + 99 99 99 99.99. + + 1 1.000000 1.00000E+00 1.00000000000000E+00second string + + Column name is number 1 status = 0 + Column Ivalue is number 2 status = 237 + Column Fvalue is number 3 status = 237 + Column Evalue is number 4 status = 237 + Column Dvalue is number 5 status = 237 + Column is number 0 status = 219 + A15 16 1 15 Name 1 1.00 0.00 null1 + I10 41 1 10 Ivalue 17 m**2 1.00 0.00 null2 + F14.6 82 1 14 Fvalue 28 cm 1.00 0.00 null3 + E12.5 42 1 12 Evalue 43 erg/s 1.00 0.00 null4 + D21.14 82 1 21 Dvalue 56 km/s 1.00 0.00 null5 + + + Data values after inserting 3 rows after row 2: + first string 1 1 1 1. 1. + second string 2 2 2 2. 2. + 0 0 0 0. 0. + 0 0 0 0. 0. + 0 0 0 0. 0. + 3 3 3 3. 3. + UNDEFINED 4 4 4 4. 4. + 5 5 5 5. 5. + 6 6 6 6. 6. + 7 7 7 7. 7. + 8 8 8 8. 8. + 9 9 9 9. 9. + 10 10 10 10.10. + 99 99 99 99.99. + + Data values after deleting 2 rows at row 10: + first string 1 1 1 1. 1. + second string 2 2 2 2. 2. + 0 0 0 0. 0. + 0 0 0 0. 0. + 0 0 0 0. 0. + 3 3 3 3. 3. + UNDEFINED 4 4 4 4. 4. + 5 5 5 5. 5. + 6 6 6 6. 6. + 9 9 9 9. 9. + 10 10 10 10.10. + 99 99 99 99.99. + + Data values after deleting column 3: + first string 1 1 1. 1. + second string 2 2 2. 2. + 0 0 0. 0. + 0 0 0. 0. + 0 0 0. 0. + 3 3 3. 3. + UNDEFINED 4 4 4. 4. + 5 5 5. 5. + 6 6 6. 6. + 9 9 9. 9. + 10 10 10.10. + 99 99 99.99. + + Data values after inserting column 5: + first string 1 1 1. 1. 0 + second string 2 2 2. 2. 0 + 0 0 0. 0. 0 + 0 0 0. 0. 0 + 0 0 0. 0. 0 + 3 3 3. 3. 0 + UNDEFINED 4 4 4. 4. 0 + 5 5 5. 5. 0 + 6 6 6. 6. 0 + 9 9 9. 9. 0 + 10 10 10.10. 0 + 99 99 99.99. 0 + HDU number = 3 + + Moved to binary table + header contains 37 keywords with room for 70 more + + Binary table: nrows, tfields, extname, pcount: 21 10Test-BINTABLE 0 + Avalue 15A + Lvalue 1L m**2 + Xvalue 16X cm + Bvalue 1B erg/s + Ivalue 1I km/s + Jvalue 1J + Evalue 1E + Dvalue 1D + Cvalue 1C + Mvalue 1M + + Data values read from binary table: + Bit column (X) data values: + FTFFTTFF FTTTFFFF TTTTFFFF FTTTTTFF FFFFFFFF + + null string column value (should be blank): + + Read columns with ftgcv_: + first string F 76 1 1 1 1. 1. 1. -2. 1. -2. + second string T 112 2 2 2 2. 2. 3. -4. 3. -4. + F 240 3 3 3 3. 3. 5. -6. 5. -6. + NOT DEFINED F 124 0 -4 -4 -4. -4. 7. -8. 7. -8. + NOT DEFINED T 0 5 5 5 5. 5. 9. -10. 9. -10. + NOT DEFINED T 0 0 -6 -6 -6. -6. 11. -12. 11. -12. + NOT DEFINED F 0 7 7 7 7. 7. 13. -14. 13. -14. + NOT DEFINED F 0 0 -8 -8 -8. -8. 15. -16. 15. -16. + NOT DEFINED F 0 9 9 9 9. 9. 17. -18. 17. -18. + NOT DEFINED T 0 0 -10 -10 -10. -10. 19. -20. 19. -20. + NOT DEFINED F 0 98 98 98 98. 98. 0. 0. 0. 0. + NOT DEFINED T 0 12 12 12 12. 12. 0. 0. 0. 0. + NOT DEFINED F 0 98 98 98 98. 98. 0. 0. 0. 0. + NOT DEFINED F 0 0 -14 -14 -14. -14. 0. 0. 0. 0. + NOT DEFINED F 0 98 98 98 98. 98. 0. 0. 0. 0. + NOT DEFINED F 0 0 -16 -16 -16. -16. 0. 0. 0. 0. + NOT DEFINED T 0 98 98 98 98. 98. 0. 0. 0. 0. + NOT DEFINED T 0 0 -18 -18 -18. -18. 0. 0. 0. 0. + NOT DEFINED T 0 98 98 98 98. 98. 0. 0. 0. 0. + NOT DEFINED T 0 0 -20 -20 -20. -20. 0. 0. 0. 0. + NOT DEFINED F 0 98 98 98 98. 98. 0. 0. 0. 0. + + Read columns with ftgcf_: + first string F 76 1 1 1 1. 1. 1. -2. 1. -2. + second string T 112 2 2 2 2. 2. 3. -4. 3. -4. + F 240 3 3 3 3. 3. 5. -6. 5. -6. + F 124 0 -4 -4 -4. -4. 7. -8. 7. -8. + T 0 5 5 5 5. 5. 9. -10. 9. -10. + T 0 0 -6 -6 -6. -6. 11. -12. 11. -12. + F 0 7 7 7 7. 7. 13. -14. 13. -14. + F 0 0 -8 -8 -8. -8. 15. -16. 15. -16. + F 0 9 9 9 9. 9. 17. -18. 17. -18. + T 0 0 -10 -10 -10. -10. 19. -20. 19. -20. + F 0 99 99 + T 0 12 12 + F 0 99 99 + F 0 0 -14 + F 0 99 99 + F 0 0 -16 + T 0 99 99 + T 0 0 -18 + T 0 99 99 + T 0 0 -20 + F 0 99 99 + + Data values after inserting 3 rows after row 2: + first string 1 1 1 1. 1. + second string 2 2 2 2. 2. + NOT DEFINED 0 0 0 0. 0. + NOT DEFINED 0 0 0 0. 0. + NOT DEFINED 0 0 0 0. 0. + 3 3 3 3. 3. + NOT DEFINED 0 -4 -4 -4. -4. + NOT DEFINED 5 5 5 5. 5. + NOT DEFINED 0 -6 -6 -6. -6. + NOT DEFINED 7 7 7 7. 7. + NOT DEFINED 0 -8 -8 -8. -8. + NOT DEFINED 9 9 9 9. 9. + NOT DEFINED 0 -10 -10 -10. -10. + NOT DEFINED 98 98 98 98. 98. + + Data values after deleting 2 rows at row 10: + first string 1 1 1 1. 1. + second string 2 2 2 2. 2. + NOT DEFINED 0 0 0 0. 0. + NOT DEFINED 0 0 0 0. 0. + NOT DEFINED 0 0 0 0. 0. + 3 3 3 3. 3. + NOT DEFINED 0 -4 -4 -4. -4. + NOT DEFINED 5 5 5 5. 5. + NOT DEFINED 0 -6 -6 -6. -6. + NOT DEFINED 9 9 9 9. 9. + NOT DEFINED 0 -10 -10 -10. -10. + NOT DEFINED 98 98 98 98. 98. + + Data values after deleting column 6: + first string 1 1 1. 1. + second string 2 2 2. 2. + NOT DEFINED 0 0 0. 0. + NOT DEFINED 0 0 0. 0. + NOT DEFINED 0 0 0. 0. + 3 3 3. 3. + NOT DEFINED 0 -4 -4. -4. + NOT DEFINED 5 5 5. 5. + NOT DEFINED 0 -6 -6. -6. + NOT DEFINED 9 9 9. 9. + NOT DEFINED 0 -10 -10. -10. + NOT DEFINED 98 98 98. 98. + + Data values after inserting column 8: + first string 1 1 1. 1. 0 + second string 2 2 2. 2. 0 + NOT DEFINED 0 0 0. 0. 0 + NOT DEFINED 0 0 0. 0. 0 + NOT DEFINED 0 0 0. 0. 0 + 3 3 3. 3. 0 + NOT DEFINED 0 -4 -4. -4. 0 + NOT DEFINED 5 5 5. 5. 0 + NOT DEFINED 0 -6 -6. -6. 0 + NOT DEFINED 9 9 9. 9. 0 + NOT DEFINED 0 -10 -10. -10. 0 + NOT DEFINED 98 98 98. 98. 0 + + Values after setting 1st 10 elements in column 8 = null: + first string 1 1 1. 1. 98 + second string 2 2 2. 2. 98 + NOT DEFINED 0 0 0. 0. 98 + NOT DEFINED 0 0 0. 0. 98 + NOT DEFINED 0 0 0. 0. 98 + 3 3 3. 3. 98 + NOT DEFINED 0 -4 -4. -4. 98 + NOT DEFINED 5 5 5. 5. 98 + NOT DEFINED 0 -6 -6. -6. 98 + NOT DEFINED 9 9 9. 9. 98 + NOT DEFINED 0 -10 -10. -10. 0 + NOT DEFINED 98 98 98. 98. 0 + + ftibin status = 0 + HDU number = 2 + 0 1000 10000 33000 66000 -999 + 0 1000 10000 32768 65535 -999 + 0 1000 10000 32800 65500 -999 + + 0 1 10 33 66 -999 + -32768-31768-22768 0 32767 -999 + -1 9 99 327 654 -999 + + Create image extension: ftiimg status = 0 + HDU number = 3 + + Wrote whole 2D array: ftp2di status = 0 + + Read whole 2D array: ftg2di status = 0 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 0 0 0 + 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 0 0 0 + 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 0 0 0 0 + 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 0 0 0 0 + 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 0 0 0 0 + 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 0 0 0 0 + 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 0 0 0 0 + 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 0 0 0 0 + 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 0 0 0 0 + 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 0 0 0 0 + 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 0 0 0 0 + 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 0 0 0 0 + 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 0 0 0 0 + 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 0 0 0 0 + 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 0 0 0 0 + 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 0 0 0 0 + 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 0 0 0 0 + 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 0 0 0 0 + 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 0 0 0 0 + 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 0 0 0 0 + 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 0 0 0 0 + 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 0 0 0 0 + 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 0 0 0 0 + 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 0 0 0 0 + 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + Wrote subset 2D array: ftpssi status = 0 + + Read whole 2D array: ftg2di status = 0 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 0 0 0 + 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 0 0 0 + 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 0 0 0 0 + 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 0 0 0 0 + 40 41 42 43 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 54 0 0 0 0 + 50 51 52 53 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 64 0 0 0 0 + 60 61 62 63 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 74 0 0 0 0 + 70 71 72 73 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 84 0 0 0 0 + 80 81 82 83 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 94 0 0 0 0 + 90 91 92 93 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 104 0 0 0 0 + 100 101 102 103 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 114 0 0 0 0 + 110 111 112 113 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 124 0 0 0 0 + 120 121 122 123 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 134 0 0 0 0 + 130 131 132 133 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 144 0 0 0 0 + 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 0 0 0 0 + 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 0 0 0 0 + 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 0 0 0 0 + 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 0 0 0 0 + 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 0 0 0 0 + 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 0 0 0 0 + 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 0 0 0 0 + 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 0 0 0 0 + 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 0 0 0 0 + 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 0 0 0 0 + 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + Read subset of 2D array: ftgsvi status = 0 + 41 43 -1 -3 -5 71 73 -31 -33 -35 + + Create image extension: ftiimg status = 0 + HDU number = 4 + Create temporary file: ftinit status = 0 + Copy image extension to primary array of tmp file. + ftcopy status = 0 + SIMPLE = T / file does conform to FITS standard + BITPIX = 16 / number of bits per data pixel + NAXIS = 2 / number of data axes + NAXIS1 = 15 / length of data axis 1 + NAXIS2 = 25 / length of data axis 2 + EXTEND = T / FITS dataset may contain extensions + Delete the tmp file: ftdelt status = 0 + Delete the image extension hdutype, status = 1 0 + HDU number = 4 + ftcrhd status = 0 + Variable length arrays: ftphbn status = 0 + ftpcl_ status = 0 + PCOUNT = 4446 + HDU number = 6 + A 0 + L 0 F + X 0 F + B 1 0 + I 1 0 + J 1 0 + E 1. 0. + D 1. 0. + Column 8 repeat and offset = 1 14 + A ab 0 + L 0 F T + X 0 F T + B 99 2 0 + I 99 2 0 + J 99 2 0 + E 99. 2. 0. + D 99. 2. 0. + Column 8 repeat and offset = 2 49 + A abc 0 + L 0 F F F + X 0 F T F + B 1 99 3 0 + I 1 99 3 0 + J 1 99 3 0 + E 1.99. 3. 0. + D 1.99. 3. 0. + Column 8 repeat and offset = 3 105 + A abcd 0 + L 0 F T F F + X 0 F T F F + B 1 2 99 4 0 + I 1 2 99 4 0 + J 1 2 99 4 0 + E 1. 2.99. 4. 0. + D 1. 2.99. 4. 0. + Column 8 repeat and offset = 4 182 + A abcde 0 + L 0 F T F F T + X 0 F T F F T + B 1 2 3 99 5 0 + I 1 2 3 99 5 0 + J 1 2 3 99 5 0 + E 1. 2. 3.99. 5. 0. + D 1. 2. 3.99. 5. 0. + Column 8 repeat and offset = 5 280 + A abcdef 0 + L 0 F T F F F T + X 0 F T F F T T + B 1 2 3 4 99 6 0 + I 1 2 3 4 99 6 0 + J 1 2 3 4 99 6 0 + E 1. 2. 3. 4.99. 6. 0. + D 1. 2. 3. 4.99. 6. 0. + Column 8 repeat and offset = 6 399 + A abcdefg 0 + L 0 F T F F T F F + X 0 F T F F T T F + B 1 2 3 4 5 99 7 0 + I 1 2 3 4 5 99 7 0 + J 1 2 3 4 5 99 7 0 + E 1. 2. 3. 4. 5.99. 7. 0. + D 1. 2. 3. 4. 5.99. 7. 0. + Column 8 repeat and offset = 7 539 + A abcdefgh 0 + L 0 F T F F T T F F + X 0 F T F F T T F F + B 1 2 3 4 5 6 99 8 0 + I 1 2 3 4 5 6 99 8 0 + J 1 2 3 4 5 6 99 8 0 + E 1. 2. 3. 4. 5. 6.99. 8. 0. + D 1. 2. 3. 4. 5. 6.99. 8. 0. + Column 8 repeat and offset = 8 700 + A abcdefghi 0 + L 0 F T F F T T F F F + X 0 F T F F T T F F F + B 1 2 3 4 5 6 7 99 9 0 + I 1 2 3 4 5 6 7 99 9 0 + J 1 2 3 4 5 6 7 99 9 0 + E 1. 2. 3. 4. 5. 6. 7.99. 9. 0. + D 1. 2. 3. 4. 5. 6. 7.99. 9. 0. + Column 8 repeat and offset = 9 883 + A abcdefghij 0 + L 0 F T F F T T F F F T + X 0 F T F F T T F F F T + B 1 2 3 4 5 6 7 8 99 10 0 + I 1 2 3 4 5 6 7 8 99 10 0 + J 1 2 3 4 5 6 7 8 99 10 0 + E 1. 2. 3. 4. 5. 6. 7. 8.99.10. 0. + D 1. 2. 3. 4. 5. 6. 7. 8.99.10. 0. + Column 8 repeat and offset = 10 1087 + A abcdefghijk 0 + L 0 F T F F T T F F F F T + X 0 F T F F T T F F F T T + B 1 2 3 4 5 6 7 8 9 99 11 0 + I 1 2 3 4 5 6 7 8 9 99 11 0 + J 1 2 3 4 5 6 7 8 9 99 11 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.99.11. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.99.11. 0. + Column 8 repeat and offset = 11 1312 + A abcdefghijkl 0 + L 0 F T F F T T F F F T F T + X 0 F T F F T T F F F T T T + B 1 2 3 4 5 6 7 8 9 10 99 12 0 + I 1 2 3 4 5 6 7 8 9 10 99 12 0 + J 1 2 3 4 5 6 7 8 9 10 99 12 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.99.12. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.99.12. 0. + Column 8 repeat and offset = 12 1558 + A abcdefghijklm 0 + L 0 F T F F T T F F F T T F F + X 0 F T F F T T F F F T T T F + B 1 2 3 4 5 6 7 8 9 10 11 99 13 0 + I 1 2 3 4 5 6 7 8 9 10 11 99 13 0 + J 1 2 3 4 5 6 7 8 9 10 11 99 13 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.99.13. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.99.13. 0. + Column 8 repeat and offset = 13 1825 + A abcdefghijklmn 0 + L 0 F T F F T T F F F T T T F F + X 0 F T F F T T F F F T T T F F + B 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.99.14. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.99.14. 0. + Column 8 repeat and offset = 14 2113 + A abcdefghijklmno 0 + L 0 F T F F T T F F F T T T F F F + X 0 F T F F T T F F F T T T F F F + B 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.99.15. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.99.15. 0. + Column 8 repeat and offset = 15 2422 + A abcdefghijklmnop 0 + L 0 F T F F T T F F F T T T F F F F + X 0 F T F F T T F F F T T T F F F F + B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.99.16. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.99.16. 0. + Column 8 repeat and offset = 16 2752 + A abcdefghijklmnopq 0 + L 0 F T F F T T F F F T T T F F F F T + X 0 F T F F T T F F F T T T F F F F T + B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.99.17. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.99.17. 0. + Column 8 repeat and offset = 17 3104 + A abcdefghijklmnopqr 0 + L 0 F T F F T T F F F T T T F F F F F T + X 0 F T F F T T F F F T T T F F F F T T + B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.99.18. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.99.18. 0. + Column 8 repeat and offset = 18 3477 + A abcdefghijklmnopqrs 0 + L 0 F T F F T T F F F T T T F F F F T F T + X 0 F T F F T T F F F T T T F F F F T T T + B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.17.99.19. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.17.99.19. 0. + Column 8 repeat and offset = 19 3871 + A abcdefghijklmnopqrst 0 + L 0 F T F F T T F F F T T T F F F F T T F T + X 0 F T F F T T F F F T T T F F F F T T T T + B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 + I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 + J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 + E 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.17.18.99.20. 0. + D 1. 2. 3. 4. 5. 6. 7. 8. 9.10.11.12.13.14.15.16.17.18.99.20. 0. + Column 8 repeat and offset = 20 4286 + + Create image extension: ftiimg status = 0 + ftppr status = 0 + + Image values written with ftppr and read with ftgpv: + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 F (byte) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 F (short) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 F (int) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 F (long) + 0. 2. 4. 6. 8.10.12.14.16.18.20.22.24.26. F (float) + 0. 2. 4. 6. 8.10.12.14.16.18.20.22.24.26. F (double) + + Wrote WCS keywords status = 0 + Read WCS keywords with ftgics status = 0 + CRVAL1, CRVAL2 = 45.830 63.570 + CRPIX1, CRPIX2 = 256.000 257.000 + CDELT1, CDELT2 = -0.00277777 0.00277777 + Rotation = 0.000 CTYPE =-TAN + Calculated sky coord. with ftwldp status = 0 + Pixels ( 0.500000 0.500000) --> ( 47.385204 62.848968) Sky + Calculated pixel coord. with ftxypx status = 0 + Sky ( 47.385204 62.848968) --> ( 0.500000 0.500000) Pixels + + ftitab status = 0 + ftpcl status = 0 + Column values written with ftpcl and read with ftgcl: + 0 3 6 9 12 15 18 21 24 27 F (byte) + 0 3 6 9 12 15 18 21 24 27 F (short) + 0 3 6 9 12 15 18 21 24 27 F (int) + 0 3 6 9 12 15 18 21 24 27 F (long) + 0. 3. 6. 9.12.15.18.21.24.27. F (float) + 0. 3. 6. 9.12.15.18.21.24.27. F (double) + + Repeatedly move to the 1st 4 HDUs of the file: + + Encode checksum: 1234567890.0 -> dCW2fBU0dBU0dBU0 + Decode checksum: dCW2fBU0dBU0dBU0 -> 1234567890.0 + DATASUM = '2338390162' + ftgcks data checksum, status = 2338390162.0 0 + ftvcks datastatus, hdustatus, status = 1 1 0 + ftupck status = 0 + DATASUM = '2338390162' + ftvcks datastatus, hdustatus, status = 1 1 0 + ftclos status = 0 + + Normally, there should be 8 error messages on the + stack all regarding 'numerical overflows': + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + + Status = 0: OK - no error diff --git a/software/cfitsio3040/testf77.std b/software/cfitsio3040/testf77.std new file mode 100644 index 0000000000000000000000000000000000000000..24975a43aab48fb79331ce1b0cfd6df64375a734 GIT binary patch literal 66240 zcmeHQe{37qeWxtTKV@5Xyfj<0_9aV0CAAnG_0vhckfKPLHua+t-O^1vo1#tMGy?d zywCT&cjVpicsx>cW4P}LA3fgV-RHjF&wKao`0o8!h)>TYqKutl4k5`NW6Rk!oh=pg zGRqY5%Y{;oRSGN?PcE=>C7oYNmzFFCPQ;UQ@su;)P!N3i_1vOfVufY4n5~pq5ucaR zl{716H}o|N72lW%r{W9v1>|q8x=iY&KB|(|0A>0)6tnE zPR9@IkFDt&*+pb&JeOY4S+bPQmy3l`g)MBBD|+q`Mp>M$FnGPBFK6@m5(BqCT&|P~ z`9f~9#)r&jJh`~KS6=#yC{tI`Wp<^Mt-vR?xXG3`iX}bchyR&E zE~n=!Y=w&Cs$SBqN=Cx-layWH(}F|8Bco&ECkNaAUpzen00M z?hGHa@{9a9dwv1_UQVyA>lcvm+5Czhr=WoPV54|xlPUv|4I;Vmf1bZ*&nFzOUtYfu z-&(7DXPo#n4fZ{?tm~D>$~rEKB^iA{82z-gcrOi`MwG zz>r3N(RU73`Se!#rZ}HA9MFc%e};W4t@2HtVp?ECGyMh4_ARx@m!R^(uU}lkX?9sJ zZL+mOeg*dkDm{!BC01D#6${l^+59@HmIC%TJENF9mA#A9t5ms{9sdu8PgB8x>rpRqSpf4Ra^b~y``c>R|{ z{pVQXtchpOUpN<;pQQS#u0CBa;=W<o@$EX^l$2C4&h{Te|bB<9jFmdoI zE*Ab(8V?^v1rn%AX89oN=OpSs`FMbu-uj#%E1AuTmrBsEukK>AKD?j^H!#Rz9nX)s zvoi}CuD9iEsa%mYsBxu=`!62x+^z{TCCUr&1;HooiB`gP`G&w}oTmB#32pKv;IBh4 zo)7ZguVCSC0{%LLm|Z_tGxFbOXP3N<}a#0{)}bV*D{~YU*kcmUB0NvUx(*EJlV8%{YFjxY60;G zXnJ02ozLX2d=4}}|Fz6FCH*yYGagb6{k-2nME*`mf3=Z-Wb%m;t9z?f$GYm+aDhv)bVJsDhTSmpIk; z{P$p`yh_a_9^Ga5F++_nj(kJ(yo+B#-q{#~e#i}HzG2SCe|&f~k0oP?*|5dm;Q-oc z5M=#QSzasP0nRI7a&q?E1R4}iv2n@6$xM7pg>`Cw@<=$52+y2#_IKdqN$4kkS{CT% z88u$9^}Nw=#hVl@tznGu#x=?i748THZr!@|2R@%~7tk#~_u%s$V6WWXkIx5ygL3;2 zJ|6~-$nB%}dMpPlpQZO(6Zoka#&0j{ z@AJiMK8?3=l{Ee6s`e3R`0Vf2e}j$V_ty9T`fcEqRK>lYg>izW{WpRGOIf_or;ZEw z(QmQV;4sH-{WnJG_wSYLlIXr6JVxgQS6kisZv?47NUgt0sc@xCogoCV*(lTJxybA} z`o-_me!z&Yoc*9quR+R1J(GpUqL)cYPn$?gAE(^-$ln4Q>o~_ssjyyT{U!aG^=t`m z`Q)p_M@(e+n2g1viAj2&S08x)mzuwL_qeviJ?5`$;C}rfESWq%7v=qF{9*A^y!K)M zyQBY0dJ+A4=!ZGyLz>Z!f``b*tW8U~&pf=?Sozb*u;ea`uTYQ&k6`z!b|IkAhCuN{Af zxxW)0{l(sm1NT?(X%kNNHSkxoLe}$ge+8djT6wIDJ$CNz2=_Pc(O>M{IB+8?l{q@=)8%Z`z!b^<+!^Y@OPB^d&Z-`*t>Dy{t7xP5|8qjqhC7VMjkhGnHB4n_S!_KkDhC5wV*W`|uhc-C#xiW+CVH;l_yiblRJJ*x4m; z`vjjh?cF{pT)mm-FFF&RruKG!QZH8qY!88WexXhgxNTIZccta=%JE?^Idd+N;Pq9# z6Jukzp9>M1H?+&cIUlbNI>^Vb-wyFD;ANDfzZ%|I(DNGJMNt>FW%OmiLrk-fB)$gz z;>o8yK4*VnU>khzi_XtF`U}s@e1+v@>S5e0B#F<--=W~xDE(eA^lOFBi@zTE)cc-h zIjFu@3Md7X0!jg;fKosy(3%1ct?FAobi}yj@P&t@t`B`5dr^;%Ho}3=_u;5a8%N@h z2k5Y_srC+@_%-;u>tpR5Jnfstfdmzl0!jg;fKosypcGIFCM_=||AxJP#S<*Ij$xXo z(0J|?n)csl$mi@d#$#W=7*=}UV;x~Cr^mqLEEss3$J`s4RXua5ye?m|JK08Qs(rkX zGAdmupcGIFCkUz4)#V zI1bzg+z&9|A)p^P0Sp4RG|>9Ky5;k2Bi;@H^!X~V4czeguK57sO#!EY1TY6AktZC5CSH#?<>F;fiD3s17Ak^X#oCTp97LW3V1(o5m*9Nfi>*=8t^Lccfi+y zZy>!0RDccOSzrtJ4dBDTZvoE%AHlx=349y)H{b^FU8H{$fdAK@2jKtpPXM0;UI0D? zd>Z%+_I(4m3H%WF5%4ZR9X;1fVpGtc@H4?g5SiKLgwgyal)q_*vlR z0H?IKBK>~g=Yh8YZwDBF_bibIfnNX~0-Vy`f%Jy~KhO_60z3-56F31300F=$?J=Ye z0vZqmhJayU1Q-RzfN{Vn?IhA42c7`l1)KtY5qJ^^0byVQa7v3HeG-TQF<=Tf4a9*n zz*!&xIHlp;Ph5D)HSORol8CU^Ufh_Pe;FNX=>1#j^$O8qS2s{InfHF`4oYK~jei^s|Yyg|U2Z3J( zo&|md_*I_@N&%&SQa~wi8x=6MKl8zZc+R)BKZ}u7UWX4dm-c678b2slt5XEhuo&mi z;`l+cwT^^t;|IrRzQg+QgRWM(wLkOu*J|VGIx~JSUtnUSUlG$Q=5)-jSauuq*R=h) zgX0GowYS&&ZFT(M42@Jku$I48#}7_KW)pn;phNak|NBLKC7aJvkNynJR*gw#aF{!07gNS2-Xd;7*WdL3_t(GHCR*N=}!tluX{;}_iYb71EBiSdn5 z%yLL2X6O0|zRrywbd}MC=IWTkmqfDFQ}#zUj77M46|8cB$CZvFO|HR zkLqX6XG)YGM`=D)x9g++5cR&+L6bK#$vjE3#SUD_m}{N_CQ?M-0J*_aYN?h(EE6=F zzrj@;G;_%fH!kzxKXso`Uk#b{k{fP%8I^CHR;a6n&0KQBjjN8sNI*R>V&;+?ZE>My z8Z~ptjkdTjUize&OK!BoMbC`2a$ma$%v^Mna|_0e3;P)N9KO48!*DxReWw&q3Md7X z0!jg;z@4vvsr}hDbqTi}zmL@Xb#8O*xwStBt?MIpru|vXU+4Px%G(dH2ihal{B_iR z)y{lwqP^ZDWU{7C-J%?~H$oAdfUp!xi8 za{f9sKOD+m-TTYCcYZk2dMq88AFeIF$@nyGA9Vli*G>daj6Y&)zc-#=Xu-hT`dTGx zo_;u8Dq%%sbKvU*dRU+Mf_;7B`lX3Et!X~S&b_aY^D#Qk7un+b3bXI(vr<4QpcGIF zC_-{+t@VH=raXdhv($YXLtE_h42M|0v#L*;ovQ#?V}WY?h|p-|8#KEof_?M z+YYv62Br$=_H~nwhJSSC&{g=kjkM#!zHQ95z=QQ@9PGRGV-m*@g&%wa(`(?H(Ea#_ zu+4a6|A&bMdVD=}CgUu0a2V=dV@P{Y?7#hxh;9FIuT zMQr;Iv-kV<)0vF3@PnVj!OtTNGdED!#_SCafuH&HYYaP>OrvR9u3g2!nC^kX_OOWS z|7Uy|I-3#dcW9V`Gxz#>!y%l-*{_C2;tTlP{+V&G@752mU4&nl{-VXO^E2PPwuLhz zZ(9rytbLz(KL3CUM1z9hX3Wmd{9ja>8keGmC*P6U4O!I}N&%&SQa~wiw<)0dKi3{< z$7%h+`uR8RkoCKVhlgo?5TpN)TEDxNai&k^{?Bva{@|d!|CMup%**LgmakARr~j^Y z#4^p7(ed@W=Mo*T@Al1a(eeJza})hTSPs56I=*rL*v9!m{)+zDnLB;`ZuqB)`7-$REBY&UeEsgZGac~vHm=`27wwRJ zqJL-S`e)1jqH~iSvQMnH-SPFi=OX>MeeAHlqWl%>ZFhYA?z!om+h?Co#x@AfHlIxM z!EkQtcaPJ2My<}TLhFI^`k=lNYMYPO2c6+l{Wt1$R4GaUrGQdEDWDWk3Md7X0!o2K z3ZOl`OSY*~Y+#rC+%4nXGTtNO12V>H5p{u%#flI3uHqWpm-7>KCG_5w@=F$t1Iwrten7OtbV{_tYA`=_ad|g;Mf^TD`2p(f)2p(f~2OeW31s?w{Vtd$& zF?F25{<|o@>|r0$>HHKwg&2IhGID!K##kAGe~;B1c>HM@zk=8v_T%^;BN1^oX@+vs zP34NV`(%ujM))>X0O2uK%HT0pnWzgWo85nnREqx=G4XvBf5Fc$5AH{ztcNl$F=LtgPXjMyHI;QK#EBE{Q?!ME?5a+{8)^cyn%KN0VLT*l;= zJ)lhN{{a#yrv1Tp05;I}0f5I$#vvJR$#@&FJsd^WhLA|{yAgLIUXQwNAL^0uw2Xfbu|3=aY2SfFipLRy?=aPO zv^^u^w2XgS#{VSZBX37+562<-Um}s>zefzdBmXY9zboU{Mcnr`8RupE6~xvM!}Z^V zBul5i^r9~rO6~HcD0A>1nM56~Lik{GyrRz((upNII9@P&89KRGx62q?4ZX8M{rP`HjGETmmh(bu6p7&I=NU3?tFVxP4B>g|>x( zVeDWp1x6kjVi^X8q*zt)7!F1-49yBlQH&El%EF#KdsF)@#_okdR7Ey2moz4m_ct;* zbVHhrd~DThqaSG1{0DI+gsS;ZOZ%w^;xgh6>`NW6d9V)_;+E;^17!*Malp+FlAde{ zv-W)n;aCb)pB@t1HJ>gSPLWp^4X^g64%WG~A1348-qbP5KyvP2Gv}yhD|c{k=MI{C z$P%Z~wbtb5TGi7eTrE~zJ&@{k@bv(Ez!QZhZz;RU<6bWwhne&`)H$z1GFz+J+z)FI z%--i}?o(x9^8aA!kfQ(x;S?T_*&P!nwfT|>q!ZHMlBzco2 zc2Rm$ha0HU3oq$G%B_~7E1WI_DjK8<6(!Qq<2Az7%Z;sszaf=#@lMZJ3Y z4yXED^g9e4`as%haU%t(n39Tp?Wh>OD3#p$$tf9<#jmR9Ago8QEBcI8Qo4B+w`x`T z!QMlMkED*es(J*<;I~TKx>BhoZI8CAZ5Sn#m(=He^7@8kNv-Ov!4rf!ol7>MxzgJ< zrTbFHnn>LTsqlktM`F`OK!P9JiQwTaDf;top6DT2sH@@!;T1x?_+`8L{L$rxUH+q~ zdz$Kh6x!jZ@Q!nUE*Z*&dv=-&v~)Bt{x7`wIbjT@s^-WLJVbEFkxE^b@I1L$mnX+k z$30}qF^EaOaoerksTQIOgR+G#Fv^3;7aw)#6ymmi_mFixk;QDK%!+zROtD|g zZs=?EgiY7)uB{i%M~0<0^m08*EyZp9ZglgvuQgb9Op1 z|DJGdeeB`D$oP<4nh(oV()!q$LN2H0D-NbOCUHK#-Yk7R8WU2MTDA{-Rr|nam`BTUw!=3WO(YHb27-Yx3f#o#z#y&X+NyoTXR>d{e0;nM zpZ|V7JTNej49{5WgI4V$K5n0XG8)-ApBk@0?l);j() zach5WFn^t^m2U0N8nwsP+Q&Pyes{jWR!W8SA}d0>oX*ATw>KhV)*Ts|wm%p0x@c(^ ztS(fXF&T?T6O#+h?c*aBf0wiR+ESTi^Gr`?RvFwkj55W1ektA_>z{!;^o_N>vu^!W zx3>X|B_|@Ywf1q-iRdHc$D+QH&F8cE6}0rOt>^Oerh!|^zqcI#zS!*iw6HI%iJ82t z_QeXNN-3Qm7#m|=mg+RkhZpxae;8VC8wc)hwf)(;pElOSUk7IHuV^ohqx@3XnZLJh ze!ZAS{b)JahJowH=fkVtC3v!leh$oBKhEcmX(Iv5l+*$J1Yf4Z^YwXM&)R*xa=PC5 z{Cf5J4O4yKcD*?;bNx7&N;0lfhs>gX=rjPw;hQK0(ubX?gw11^!%NGSD_(n)!C_{P3aPM>Qx|D)}d(fNlL0 z(>bgC0R{u&6*#_=AMxs%zBRruy&)g8EvaJStKMveYJBpe2AL-V_!)T39 zew2L17vA_ViKGZ8Ykcyf$MzUdtHI@%=IBLYq zH)7%ATORo^2`3NQxS4O +#include +#include "fitsio.h" +int main(void); + +int main() +{ +/* + This is a big and complicated program that tests most of + the cfitsio routines. This code does not represent + the most efficient method of reading or writing FITS files + because this code is primarily designed to stress the cfitsio + library routines. +*/ + char asciisum[17]; + unsigned long checksum, datsum; + int datastatus, hdustatus, filemode; + int status, simple, bitpix, naxis, extend, hdutype, hdunum, tfields; + long ii, jj, extvers; + int nkeys, nfound, colnum, typecode, signval,nmsg; + char cval, cvalstr[2]; + long repeat, offset, width, jnulval; + int anynull; + float vers; + unsigned char xinarray[21], binarray[21], boutarray[21], bnul; + short iinarray[21], ioutarray[21], inul; + int kinarray[21], koutarray[21], knul; + long jinarray[21], joutarray[21], jnul; + float einarray[21], eoutarray[21], enul, cinarray[42]; + double dinarray[21], doutarray[21], dnul, minarray[42]; + double scale, zero; + long naxes[3], pcount, gcount, npixels, nrows, rowlen, firstpix[3]; + int existkeys, morekeys, keynum; + + char larray[42], larray2[42], colname[70], tdisp[40], nulstr[40]; + char oskey[] = "value_string"; + char iskey[21]; + int olkey = 1; + int ilkey; + short oshtkey, ishtkey; + long ojkey = 11, ijkey; + long otint = 12345678; + float ofkey = 12.121212; + float oekey = 13.131313, iekey; + double ogkey = 14.1414141414141414; + double odkey = 15.1515151515151515, idkey; + double otfrac = .1234567890123456; + + double xrval,yrval,xrpix,yrpix,xinc,yinc,rot,xpos,ypos,xpix,ypix; + char xcoordtype[] = "RA---TAN"; + char ycoordtype[] = "DEC--TAN"; + char ctype[5]; + + char *lsptr; /* pointer to long string value */ + char comm[73]; + char *comms[3]; + char *inskey[21]; + char *onskey[3] = {"first string", "second string", " "}; + char *inclist[2] = {"key*", "newikys"}; + char *exclist[2] = {"key_pr*", "key_pkls"}; + + int onlkey[3] = {1, 0, 1}, inlkey[3]; + long onjkey[3] = {11, 12, 13}, injkey[3]; + float onfkey[3] = {12.121212, 13.131313, 14.141414}; + float onekey[3] = {13.131313, 14.141414, 15.151515}, inekey[3]; + double ongkey[3] = {14.1414141414141414, 15.1515151515151515, + 16.1616161616161616}; + double ondkey[3] = {15.1515151515151515, 16.1616161616161616, + 17.1717171717171717}, indkey[3]; + + long tbcol[5] = {1, 17, 28, 43, 56}; + + char filename[40], card[FLEN_CARD], card2[FLEN_CARD]; + char keyword[FLEN_KEYWORD]; + char value[FLEN_VALUE], comment[FLEN_COMMENT]; + unsigned char uchars[80]; + + fitsfile *fptr, *tmpfptr; + char *ttype[10], *tform[10], *tunit[10]; + char tblname[40]; + char binname[] = "Test-BINTABLE"; + char templt[] = "testprog.tpt"; + char errmsg[FLEN_ERRMSG]; + short imgarray[30][19], imgarray2[20][10]; + long fpixels[2], lpixels[2], inc[2]; + + status = 0; + strcpy(tblname, "Test-ASCII"); + + ffvers(&vers); + printf("CFITSIO TESTPROG, v%.3f\n\n",vers); + + printf("Try opening then closing a nonexistent file:\n"); + fits_open_file(&fptr, "tq123x.kjl", READWRITE, &status); + printf(" ffopen fptr, status = %lu %d (expect an error)\n", + (unsigned long) fptr, status); + ffclos(fptr, &status); + printf(" ffclos status = %d\n\n", status); + ffcmsg(); + status = 0; + + for (ii = 0; ii < 21; ii++) /* allocate space for string column value */ + inskey[ii] = (char *) malloc(21); + + for (ii = 0; ii < 10; ii++) + { + ttype[ii] = (char *) malloc(20); + tform[ii] = (char *) malloc(20); + tunit[ii] = (char *) malloc(20); + } + + comms[0] = comm; + + /* delete previous version of the file, if it exists (with ! prefix) */ + strcpy(filename, "!testprog.fit"); + + status = 0; + + /* + ##################### + # create FITS file # + ##################### + */ + + ffinit(&fptr, filename, &status); + printf("ffinit create new file status = %d\n", status); + if (status) + goto errstatus; + + filename[0] = '\0'; + ffflnm(fptr, filename, &status); + + ffflmd(fptr, &filemode, &status); + printf("Name of file = %s, I/O mode = %d\n", filename, filemode); + simple = 1; + bitpix = 32; + naxis = 2; + naxes[0] = 10; + naxes[1] = 2; + npixels = 20; + pcount = 0; + gcount = 1; + extend = 1; + /* + ############################ + # write single keywords # + ############################ + */ + + if (ffphps(fptr, bitpix, naxis, naxes, &status) > 0) + printf("ffphps status = %d\n", status); + + if (ffprec(fptr, + "key_prec= 'This keyword was written by fxprec' / comment goes here", + &status) > 0 ) + printf("ffprec status = %d\n", status); + + printf("\ntest writing of long string keywords:\n"); + strcpy(card, "1234567890123456789012345678901234567890"); + strcat(card, "12345678901234567890123456789012345"); + ffpkys(fptr, "card1", card, "", &status); + ffgkey(fptr, "card1", card2, comment, &status); + printf(" %s\n%s\n", card, card2); + + strcpy(card, "1234567890123456789012345678901234567890"); + strcat(card, "123456789012345678901234'6789012345"); + ffpkys(fptr, "card2", card, "", &status); + ffgkey(fptr, "card2", card2, comment, &status); + printf(" %s\n%s\n", card, card2); + + strcpy(card, "1234567890123456789012345678901234567890"); + strcat(card, "123456789012345678901234''789012345"); + ffpkys(fptr, "card3", card, "", &status); + ffgkey(fptr, "card3", card2, comment, &status); + printf(" %s\n%s\n", card, card2); + + strcpy(card, "1234567890123456789012345678901234567890"); + strcat(card, "123456789012345678901234567'9012345"); + ffpkys(fptr, "card4", card, "", &status); + ffgkey(fptr, "card4", card2, comment, &status); + printf(" %s\n%s\n", card, card2); + + if (ffpkys(fptr, "key_pkys", oskey, "fxpkys comment", &status) > 0) + printf("ffpkys status = %d\n", status); + + if (ffpkyl(fptr, "key_pkyl", olkey, "fxpkyl comment", &status) > 0) + printf("ffpkyl status = %d\n", status); + + if (ffpkyj(fptr, "key_pkyj", ojkey, "fxpkyj comment", &status) > 0) + printf("ffpkyj status = %d\n", status); + + if (ffpkyf(fptr, "key_pkyf", ofkey, 5, "fxpkyf comment", &status) > 0) + printf("ffpkyf status = %d\n", status); + + if (ffpkye(fptr, "key_pkye", oekey, 6, "fxpkye comment", &status) > 0) + printf("ffpkye status = %d\n", status); + + if (ffpkyg(fptr, "key_pkyg", ogkey, 14, "fxpkyg comment", &status) > 0) + printf("ffpkyg status = %d\n", status); + + if (ffpkyd(fptr, "key_pkyd", odkey, 14, "fxpkyd comment", &status) > 0) + printf("ffpkyd status = %d\n", status); + + if (ffpkyc(fptr, "key_pkyc", onekey, 6, "fxpkyc comment", &status) > 0) + printf("ffpkyc status = %d\n", status); + + if (ffpkym(fptr, "key_pkym", ondkey, 14, "fxpkym comment", &status) > 0) + printf("ffpkym status = %d\n", status); + + if (ffpkfc(fptr, "key_pkfc", onekey, 6, "fxpkfc comment", &status) > 0) + printf("ffpkfc status = %d\n", status); + + if (ffpkfm(fptr, "key_pkfm", ondkey, 14, "fxpkfm comment", &status) > 0) + printf("ffpkfm status = %d\n", status); + + if (ffpkls(fptr, "key_pkls", +"This is a very long string value that is continued over more than one keyword.", + "fxpkls comment", &status) > 0) + printf("ffpkls status = %d\n", status); + + if (ffplsw(fptr, &status) > 0 ) + printf("ffplsw status = %d\n", status); + + if (ffpkyt(fptr, "key_pkyt", otint, otfrac, "fxpkyt comment", &status) > 0) + printf("ffpkyt status = %d\n", status); + + if (ffpcom(fptr, " This keyword was written by fxpcom.", &status) > 0) + printf("ffpcom status = %d\n", status); + + if (ffphis(fptr, " This keyword written by fxphis (w/ 2 leading spaces).", + &status) > 0) + printf("ffphis status = %d\n", status); + + if (ffpdat(fptr, &status) > 0) + { + printf("ffpdat status = %d\n", status); + goto errstatus; + } + + /* + ############################### + # write arrays of keywords # + ############################### + */ + nkeys = 3; + + comms[0] = comm; /* use the inskey array of pointers for the comments */ + + strcpy(comm, "fxpkns comment&"); + if (ffpkns(fptr, "ky_pkns", 1, nkeys, onskey, comms, &status) > 0) + printf("ffpkns status = %d\n", status); + + strcpy(comm, "fxpknl comment&"); + if (ffpknl(fptr, "ky_pknl", 1, nkeys, onlkey, comms, &status) > 0) + printf("ffpknl status = %d\n", status); + + strcpy(comm, "fxpknj comment&"); + if (ffpknj(fptr, "ky_pknj", 1, nkeys, onjkey, comms, &status) > 0) + printf("ffpknj status = %d\n", status); + + strcpy(comm, "fxpknf comment&"); + if (ffpknf(fptr, "ky_pknf", 1, nkeys, onfkey, 5, comms, &status) > 0) + printf("ffpknf status = %d\n", status); + + strcpy(comm, "fxpkne comment&"); + if (ffpkne(fptr, "ky_pkne", 1, nkeys, onekey, 6, comms, &status) > 0) + printf("ffpkne status = %d\n", status); + + strcpy(comm, "fxpkng comment&"); + if (ffpkng(fptr, "ky_pkng", 1, nkeys, ongkey, 13, comms, &status) > 0) + printf("ffpkng status = %d\n", status); + + strcpy(comm, "fxpknd comment&"); + if (ffpknd(fptr, "ky_pknd", 1, nkeys, ondkey, 14, comms, &status) > 0) + { + printf("ffpknd status = %d\n", status); + goto errstatus; + } + /* + ############################ + # write generic keywords # + ############################ + */ + + strcpy(oskey, "1"); + if (ffpky(fptr, TSTRING, "tstring", oskey, "tstring comment", &status) > 0) + printf("ffpky status = %d\n", status); + + olkey = TLOGICAL; + if (ffpky(fptr, TLOGICAL, "tlogical", &olkey, "tlogical comment", + &status) > 0) + printf("ffpky status = %d\n", status); + + cval = TBYTE; + if (ffpky(fptr, TBYTE, "tbyte", &cval, "tbyte comment", &status) > 0) + printf("ffpky status = %d\n", status); + + oshtkey = TSHORT; + if (ffpky(fptr, TSHORT, "tshort", &oshtkey, "tshort comment", &status) > 0) + printf("ffpky status = %d\n", status); + + olkey = TINT; + if (ffpky(fptr, TINT, "tint", &olkey, "tint comment", &status) > 0) + printf("ffpky status = %d\n", status); + + ojkey = TLONG; + if (ffpky(fptr, TLONG, "tlong", &ojkey, "tlong comment", &status) > 0) + printf("ffpky status = %d\n", status); + + oekey = TFLOAT; + if (ffpky(fptr, TFLOAT, "tfloat", &oekey, "tfloat comment", &status) > 0) + printf("ffpky status = %d\n", status); + + odkey = TDOUBLE; + if (ffpky(fptr, TDOUBLE, "tdouble", &odkey, "tdouble comment", + &status) > 0) + printf("ffpky status = %d\n", status); + + /* + ############################ + # write data # + ############################ + */ + /* define the null value (must do this before writing any data) */ + if (ffpkyj(fptr, "BLANK", -99, "value to use for undefined pixels", + &status) > 0) + printf("BLANK keyword status = %d\n", status); + + /* initialize arrays of values to write to primary array */ + for (ii = 0; ii < npixels; ii++) + { + boutarray[ii] = ii + 1; + ioutarray[ii] = ii + 1; + joutarray[ii] = ii + 1; + eoutarray[ii] = ii + 1; + doutarray[ii] = ii + 1; + } + + /* write a few pixels with each datatype */ + /* set the last value in each group of 4 as undefined */ + +/* + ffpprb(fptr, 1, 1, 2, &boutarray[0], &status); + ffppri(fptr, 1, 5, 2, &ioutarray[4], &status); + ffpprj(fptr, 1, 9, 2, &joutarray[8], &status); + ffppre(fptr, 1, 13, 2, &eoutarray[12], &status); + ffpprd(fptr, 1, 17, 2, &doutarray[16], &status); +*/ + +/* test the newer ffpx routine, instead of the older ffppr_ routines */ + firstpix[0]=1; + firstpix[1]=1; + ffppx(fptr, TBYTE, firstpix, 2, &boutarray[0], &status); + firstpix[0]=5; + ffppx(fptr, TSHORT, firstpix, 2, &ioutarray[4], &status); + firstpix[0]=9; + ffppx(fptr, TLONG, firstpix, 2, &joutarray[8], &status); + firstpix[0]=3; + firstpix[1]=2; + ffppx(fptr, TFLOAT, firstpix, 2, &eoutarray[12], &status); + firstpix[0]=7; + ffppx(fptr, TDOUBLE, firstpix, 2, &doutarray[16], &status); + +/* + ffppnb(fptr, 1, 3, 2, &boutarray[2], 4, &status); + ffppni(fptr, 1, 7, 2, &ioutarray[6], 8, &status); + ffppnj(fptr, 1, 11, 2, &joutarray[10], 12, &status); + ffppne(fptr, 1, 15, 2, &eoutarray[14], 16., &status); + ffppnd(fptr, 1, 19, 2, &doutarray[18], 20., &status); +*/ + firstpix[0]=3; + firstpix[1]=1; + bnul = 4; + ffppxn(fptr, TBYTE, firstpix, 2, &boutarray[2], &bnul, &status); + firstpix[0]=7; + inul = 8; + ffppxn(fptr, TSHORT, firstpix, 2, &ioutarray[6], &inul, &status); + firstpix[0]=1; + firstpix[1]=2; + jnul = 12; + ffppxn(fptr, TLONG, firstpix, 2, &joutarray[10], &jnul, &status); + firstpix[0]=5; + enul = 16.; + ffppxn(fptr, TFLOAT, firstpix, 2, &eoutarray[14], &enul, &status); + firstpix[0]=9; + dnul = 20.; + ffppxn(fptr, TDOUBLE, firstpix, 2, &doutarray[18], &dnul, &status); + + ffppru(fptr, 1, 1, 1, &status); + + + if (status > 0) + { + printf("ffppnx status = %d\n", status); + goto errstatus; + } + + ffflus(fptr, &status); /* flush all data to the disk file */ + printf("ffflus status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + /* + ############################ + # read data # + ############################ + */ + /* read back the data, setting null values = 99 */ + printf("\nValues read back from primary array (99 = null pixel)\n"); + printf("The 1st, and every 4th pixel should be undefined:\n"); + + anynull = 0; + ffgpvb(fptr, 1, 1, 10, 99, binarray, &anynull, &status); + + ffgpvb(fptr, 1, 11, 10, 99, &binarray[10], &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + printf(" %2d", binarray[ii]); + printf(" %d (ffgpvb)\n", anynull); + + ffgpvi(fptr, 1, 1, npixels, 99, iinarray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + printf(" %2d", iinarray[ii]); + printf(" %d (ffgpvi)\n", anynull); + + ffgpvj(fptr, 1, 1, npixels, 99, jinarray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + printf(" %2ld", jinarray[ii]); + printf(" %d (ffgpvj)\n", anynull); + + ffgpve(fptr, 1, 1, npixels, 99., einarray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", einarray[ii]); + printf(" %d (ffgpve)\n", anynull); + + ffgpvd(fptr, 1, 1, 10, 99., dinarray, &anynull, &status); + ffgpvd(fptr, 1, 11, 10, 99., &dinarray[10], &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", dinarray[ii]); + printf(" %d (ffgpvd)\n", anynull); + + if (status > 0) + { + printf("ERROR: ffgpv_ status = %d\n", status); + goto errstatus; + } + if (anynull == 0) + printf("ERROR: ffgpv_ did not detect null values\n"); + + /* reset the output null value to the expected input value */ + for (ii = 3; ii < npixels; ii += 4) + { + boutarray[ii] = 99; + ioutarray[ii] = 99; + joutarray[ii] = 99; + eoutarray[ii] = 99.; + doutarray[ii] = 99.; + } + ii = 0; + boutarray[ii] = 99; + ioutarray[ii] = 99; + joutarray[ii] = 99; + eoutarray[ii] = 99.; + doutarray[ii] = 99.; + + /* compare the output with the input; flag any differences */ + for (ii = 0; ii < npixels; ii++) + { + if (boutarray[ii] != binarray[ii]) + printf("bout != bin = %u %u \n", boutarray[ii], binarray[ii]); + + if (ioutarray[ii] != iinarray[ii]) + printf("iout != iin = %d %d \n", ioutarray[ii], iinarray[ii]); + + if (joutarray[ii] != jinarray[ii]) + printf("jout != jin = %ld %ld \n", joutarray[ii], jinarray[ii]); + + if (eoutarray[ii] != einarray[ii]) + printf("eout != ein = %f %f \n", eoutarray[ii], einarray[ii]); + + if (doutarray[ii] != dinarray[ii]) + printf("dout != din = %f %f \n", doutarray[ii], dinarray[ii]); + } + + for (ii = 0; ii < npixels; ii++) + { + binarray[ii] = 0; + iinarray[ii] = 0; + jinarray[ii] = 0; + einarray[ii] = 0.; + dinarray[ii] = 0.; + } + + anynull = 0; + ffgpfb(fptr, 1, 1, 10, binarray, larray, &anynull, &status); + ffgpfb(fptr, 1, 11, 10, &binarray[10], &larray[10], &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + if (larray[ii]) + printf(" *"); + else + printf(" %2d", binarray[ii]); + printf(" %d (ffgpfb)\n", anynull); + + ffgpfi(fptr, 1, 1, npixels, iinarray, larray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + if (larray[ii]) + printf(" *"); + else + printf(" %2d", iinarray[ii]); + printf(" %d (ffgpfi)\n", anynull); + + ffgpfj(fptr, 1, 1, npixels, jinarray, larray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + if (larray[ii]) + printf(" *"); + else + printf(" %2ld", jinarray[ii]); + printf(" %d (ffgpfj)\n", anynull); + + ffgpfe(fptr, 1, 1, npixels, einarray, larray, &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + if (larray[ii]) + printf(" *"); + else + printf(" %2.0f", einarray[ii]); + printf(" %d (ffgpfe)\n", anynull); + + ffgpfd(fptr, 1, 1, 10, dinarray, larray, &anynull, &status); + ffgpfd(fptr, 1, 11, 10, &dinarray[10], &larray[10], &anynull, &status); + + for (ii = 0; ii < npixels; ii++) + if (larray[ii]) + printf(" *"); + else + printf(" %2.0f", dinarray[ii]); + printf(" %d (ffgpfd)\n", anynull); + + if (status > 0) + { + printf("ERROR: ffgpf_ status = %d\n", status); + goto errstatus; + } + if (anynull == 0) + printf("ERROR: ffgpf_ did not detect null values\n"); + + + /* + ########################################## + # close and reopen file multiple times # + ########################################## + */ + + for (ii = 0; ii < 10; ii++) + { + if (ffclos(fptr, &status) > 0) + { + printf("ERROR in ftclos (1) = %d", status); + goto errstatus; + } + + if (ffopen(&fptr, filename, READWRITE, &status) > 0) + { + printf("ERROR: ffopen open file status = %d\n", status); + goto errstatus; + } + } + printf("\nClosed then reopened the FITS file 10 times.\n"); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + filename[0] = '\0'; + ffflnm(fptr, filename, &status); + + ffflmd(fptr, &filemode, &status); + printf("Name of file = %s, I/O mode = %d\n", filename, filemode); + + /* + ############################ + # read single keywords # + ############################ + */ + + simple = 0; + bitpix = 0; + naxis = 0; + naxes[0] = 0; + naxes[1] = 0; + pcount = -99; + gcount = -99; + extend = -99; + printf("\nRead back keywords:\n"); + ffghpr(fptr, 99, &simple, &bitpix, &naxis, naxes, &pcount, + &gcount, &extend, &status); + printf("simple = %d, bitpix = %d, naxis = %d, naxes = (%ld, %ld)\n", + simple, bitpix, naxis, naxes[0], naxes[1]); + printf(" pcount = %ld, gcount = %ld, extend = %d\n", + pcount, gcount, extend); + + ffgrec(fptr, 9, card, &status); + printf("%s\n", card); + if (strncmp(card, "KEY_PREC= 'This", 15) ) + printf("ERROR in ffgrec\n"); + + ffgkyn(fptr, 9, keyword, value, comment, &status); + printf("%s : %s : %s :\n",keyword, value, comment); + if (strncmp(keyword, "KEY_PREC", 8) ) + printf("ERROR in ffgkyn: %s\n", keyword); + + ffgcrd(fptr, keyword, card, &status); + printf("%s\n", card); + + if (strncmp(keyword, card, 8) ) + printf("ERROR in ffgcrd: %s\n", keyword); + + ffgkey(fptr, "KY_PKNS1", value, comment, &status); + printf("KY_PKNS1 : %s : %s :\n", value, comment); + + if (strncmp(value, "'first string'", 14) ) + printf("ERROR in ffgkey: %s\n", value); + + ffgkys(fptr, "key_pkys", iskey, comment, &status); + printf("KEY_PKYS %s %s %d\n", iskey, comment, status); + + ffgkyl(fptr, "key_pkyl", &ilkey, comment, &status); + printf("KEY_PKYL %d %s %d\n", ilkey, comment, status); + + ffgkyj(fptr, "KEY_PKYJ", &ijkey, comment, &status); + printf("KEY_PKYJ %ld %s %d\n",ijkey, comment, status); + + ffgkye(fptr, "KEY_PKYJ", &iekey, comment, &status); + printf("KEY_PKYJ %f %s %d\n",iekey, comment, status); + + ffgkyd(fptr, "KEY_PKYJ", &idkey, comment, &status); + printf("KEY_PKYJ %f %s %d\n",idkey, comment, status); + + if (ijkey != 11 || iekey != 11. || idkey != 11.) + printf("ERROR in ffgky[jed]: %ld, %f, %f\n",ijkey, iekey, idkey); + + iskey[0] = '\0'; + ffgky(fptr, TSTRING, "key_pkys", iskey, comment, &status); + printf("KEY_PKY S %s %s %d\n", iskey, comment, status); + + ilkey = 0; + ffgky(fptr, TLOGICAL, "key_pkyl", &ilkey, comment, &status); + printf("KEY_PKY L %d %s %d\n", ilkey, comment, status); + + ffgky(fptr, TBYTE, "KEY_PKYJ", &cval, comment, &status); + printf("KEY_PKY BYTE %d %s %d\n",cval, comment, status); + + ffgky(fptr, TSHORT, "KEY_PKYJ", &ishtkey, comment, &status); + printf("KEY_PKY SHORT %d %s %d\n",ishtkey, comment, status); + + ffgky(fptr, TINT, "KEY_PKYJ", &ilkey, comment, &status); + printf("KEY_PKY INT %d %s %d\n",ilkey, comment, status); + + ijkey = 0; + ffgky(fptr, TLONG, "KEY_PKYJ", &ijkey, comment, &status); + printf("KEY_PKY J %ld %s %d\n",ijkey, comment, status); + + iekey = 0; + ffgky(fptr, TFLOAT, "KEY_PKYE", &iekey, comment, &status); + printf("KEY_PKY E %f %s %d\n",iekey, comment, status); + + idkey = 0; + ffgky(fptr, TDOUBLE, "KEY_PKYD", &idkey, comment, &status); + printf("KEY_PKY D %f %s %d\n",idkey, comment, status); + + ffgkyd(fptr, "KEY_PKYF", &idkey, comment, &status); + printf("KEY_PKYF %f %s %d\n",idkey, comment, status); + + ffgkyd(fptr, "KEY_PKYE", &idkey, comment, &status); + printf("KEY_PKYE %f %s %d\n",idkey, comment, status); + + ffgkyd(fptr, "KEY_PKYG", &idkey, comment, &status); + printf("KEY_PKYG %.14f %s %d\n",idkey, comment, status); + + ffgkyd(fptr, "KEY_PKYD", &idkey, comment, &status); + printf("KEY_PKYD %.14f %s %d\n",idkey, comment, status); + + ffgkyc(fptr, "KEY_PKYC", inekey, comment, &status); + printf("KEY_PKYC %f %f %s %d\n",inekey[0], inekey[1], comment, status); + + ffgkyc(fptr, "KEY_PKFC", inekey, comment, &status); + printf("KEY_PKFC %f %f %s %d\n",inekey[0], inekey[1], comment, status); + + ffgkym(fptr, "KEY_PKYM", indkey, comment, &status); + printf("KEY_PKYM %f %f %s %d\n",indkey[0], indkey[1], comment, status); + + ffgkym(fptr, "KEY_PKFM", indkey, comment, &status); + printf("KEY_PKFM %f %f %s %d\n",indkey[0], indkey[1], comment, status); + + ffgkyt(fptr, "KEY_PKYT", &ijkey, &idkey, comment, &status); + printf("KEY_PKYT %ld %.14f %s %d\n",ijkey, idkey, comment, status); + + ffpunt(fptr, "KEY_PKYJ", "km/s/Mpc", &status); + ijkey = 0; + ffgky(fptr, TLONG, "KEY_PKYJ", &ijkey, comment, &status); + printf("KEY_PKY J %ld %s %d\n",ijkey, comment, status); + ffgunt(fptr,"KEY_PKYJ", comment, &status); + printf("KEY_PKY units = %s\n",comment); + + ffpunt(fptr, "KEY_PKYJ", "", &status); + ijkey = 0; + ffgky(fptr, TLONG, "KEY_PKYJ", &ijkey, comment, &status); + printf("KEY_PKY J %ld %s %d\n",ijkey, comment, status); + ffgunt(fptr,"KEY_PKYJ", comment, &status); + printf("KEY_PKY units = %s\n",comment); + + ffpunt(fptr, "KEY_PKYJ", "feet/second/second", &status); + ijkey = 0; + ffgky(fptr, TLONG, "KEY_PKYJ", &ijkey, comment, &status); + printf("KEY_PKY J %ld %s %d\n",ijkey, comment, status); + ffgunt(fptr,"KEY_PKYJ", comment, &status); + printf("KEY_PKY units = %s\n",comment); + + ffgkls(fptr, "key_pkls", &lsptr, comment, &status); + printf("KEY_PKLS long string value = \n%s\n", lsptr); + + /* free the memory for the long string value */ + free(lsptr); + + /* get size and position in header */ + ffghps(fptr, &existkeys, &keynum, &status); + printf("header contains %d keywords; located at keyword %d \n",existkeys, + keynum); + + /* + ############################ + # read array keywords # + ############################ + */ + ffgkns(fptr, "ky_pkns", 1, 3, inskey, &nfound, &status); + printf("ffgkns: %s, %s, %s\n", inskey[0], inskey[1], inskey[2]); + if (nfound != 3 || status > 0) + printf("\nERROR in ffgkns %d, %d\n", nfound, status); + + ffgknl(fptr, "ky_pknl", 1, 3, inlkey, &nfound, &status); + printf("ffgknl: %d, %d, %d\n", inlkey[0], inlkey[1], inlkey[2]); + if (nfound != 3 || status > 0) + printf("\nERROR in ffgknl %d, %d\n", nfound, status); + + ffgknj(fptr, "ky_pknj", 1, 3, injkey, &nfound, &status); + printf("ffgknj: %ld, %ld, %ld\n", injkey[0], injkey[1], injkey[2]); + if (nfound != 3 || status > 0) + printf("\nERROR in ffgknj %d, %d\n", nfound, status); + + ffgkne(fptr, "ky_pkne", 1, 3, inekey, &nfound, &status); + printf("ffgkne: %f, %f, %f\n", inekey[0], inekey[1], inekey[2]); + if (nfound != 3 || status > 0) + printf("\nERROR in ffgkne %d, %d\n", nfound, status); + + ffgknd(fptr, "ky_pknd", 1, 3, indkey, &nfound, &status); + printf("ffgknd: %f, %f, %f\n", indkey[0], indkey[1], indkey[2]); + if (nfound != 3 || status > 0) + printf("\nERROR in ffgknd %d, %d\n", nfound, status); + + /* get position of HISTORY keyword for subsequent deletes and inserts */ + ffgcrd(fptr, "HISTORY", card, &status); + ffghps(fptr, &existkeys, &keynum, &status); + keynum -= 2; + + printf("\nBefore deleting the HISTORY and DATE keywords...\n"); + for (ii = keynum; ii <= keynum + 3; ii++) + { + ffgrec(fptr, ii, card, &status); + printf("%.8s\n", card); /* don't print date value, so that */ + } /* the output will always be the same */ + /* + ############################ + # delete keywords # + ############################ + */ + + ffdrec(fptr, keynum + 1, &status); + ffdkey(fptr, "DATE", &status); + + printf("\nAfter deleting the keywords...\n"); + for (ii = keynum; ii <= keynum + 1; ii++) + { + ffgrec(fptr, ii, card, &status); + printf("%s\n", card); + } + + if (status > 0) + printf("\nERROR deleting keywords\n"); + /* + ############################ + # insert keywords # + ############################ + */ + keynum += 4; + ffirec(fptr, keynum - 3, "KY_IREC = 'This keyword inserted by fxirec'", + &status); + ffikys(fptr, "KY_IKYS", "insert_value_string", "ikys comment", &status); + ffikyj(fptr, "KY_IKYJ", 49, "ikyj comment", &status); + ffikyl(fptr, "KY_IKYL", 1, "ikyl comment", &status); + ffikye(fptr, "KY_IKYE", 12.3456, 4, "ikye comment", &status); + ffikyd(fptr, "KY_IKYD", 12.345678901234567, 14, "ikyd comment", &status); + ffikyf(fptr, "KY_IKYF", 12.3456, 4, "ikyf comment", &status); + ffikyg(fptr, "KY_IKYG", 12.345678901234567, 13, "ikyg comment", &status); + + printf("\nAfter inserting the keywords...\n"); + for (ii = keynum - 4; ii <= keynum + 5; ii++) + { + ffgrec(fptr, ii, card, &status); + printf("%s\n", card); + } + + if (status > 0) + printf("\nERROR inserting keywords\n"); + /* + ############################ + # modify keywords # + ############################ + */ + ffmrec(fptr, keynum - 4, "COMMENT This keyword was modified by fxmrec", &status); + ffmcrd(fptr, "KY_IREC", "KY_MREC = 'This keyword was modified by fxmcrd'", + &status); + ffmnam(fptr, "KY_IKYS", "NEWIKYS", &status); + + ffmcom(fptr, "KY_IKYJ","This is a modified comment", &status); + ffmkyj(fptr, "KY_IKYJ", 50, "&", &status); + ffmkyl(fptr, "KY_IKYL", 0, "&", &status); + ffmkys(fptr, "NEWIKYS", "modified_string", "&", &status); + ffmkye(fptr, "KY_IKYE", -12.3456, 4, "&", &status); + ffmkyd(fptr, "KY_IKYD", -12.345678901234567, 14, "modified comment", + &status); + ffmkyf(fptr, "KY_IKYF", -12.3456, 4, "&", &status); + ffmkyg(fptr, "KY_IKYG", -12.345678901234567, 13, "&", &status); + + printf("\nAfter modifying the keywords...\n"); + for (ii = keynum - 4; ii <= keynum + 5; ii++) + { + ffgrec(fptr, ii, card, &status); + printf("%s\n", card); + } + if (status > 0) + printf("\nERROR modifying keywords\n"); + + /* + ############################ + # update keywords # + ############################ + */ + ffucrd(fptr, "KY_MREC", "KY_UCRD = 'This keyword was updated by fxucrd'", + &status); + + ffukyj(fptr, "KY_IKYJ", 51, "&", &status); + ffukyl(fptr, "KY_IKYL", 1, "&", &status); + ffukys(fptr, "NEWIKYS", "updated_string", "&", &status); + ffukye(fptr, "KY_IKYE", -13.3456, 4, "&", &status); + ffukyd(fptr, "KY_IKYD", -13.345678901234567, 14, "modified comment", + &status); + ffukyf(fptr, "KY_IKYF", -13.3456, 4, "&", &status); + ffukyg(fptr, "KY_IKYG", -13.345678901234567, 13, "&", &status); + + printf("\nAfter updating the keywords...\n"); + for (ii = keynum - 4; ii <= keynum + 5; ii++) + { + ffgrec(fptr, ii, card, &status); + printf("%s\n", card); + } + if (status > 0) + printf("\nERROR modifying keywords\n"); + + /* move to top of header and find keywords using wild cards */ + ffgrec(fptr, 0, card, &status); + + printf("\nKeywords found using wildcard search (should be 13)...\n"); + nfound = 0; + while (!ffgnxk(fptr,inclist, 2, exclist, 2, card, &status)) + { + nfound++; + printf("%s\n", card); + } + if (nfound != 13) + { + printf("\nERROR reading keywords using wildcards (ffgnxk)\n"); + goto errstatus; + } + status = 0; + + /* + ############################ + # copy index keyword # + ############################ + */ + ffcpky(fptr, fptr, 1, 4, "KY_PKNE", &status); + ffgkne(fptr, "ky_pkne", 2, 4, inekey, &nfound, &status); + printf("\nCopied keyword: ffgkne: %f, %f, %f\n", inekey[0], inekey[1], + inekey[2]); + + if (status > 0) + { + printf("\nERROR in ffgkne %d, %d\n", nfound, status); + goto errstatus; + } + + /* + ###################################### + # modify header using template file # + ###################################### + */ + if (ffpktp(fptr, templt, &status)) + { + printf("\nERROR returned by ffpktp:\n"); + printf("Could not open or process the file 'testprog.tpt'.\n"); + printf(" This file is included with the CFITSIO distribution\n"); + printf(" and should be copied into the current directory\n"); + printf(" before running the testprog program.\n"); + status = 0; + } + printf("Updated header using template file (ffpktp)\n"); + /* + ############################ + # create binary table # + ############################ + */ + + strcpy(tform[0], "15A"); + strcpy(tform[1], "1L"); + strcpy(tform[2], "16X"); + strcpy(tform[3], "1B"); + strcpy(tform[4], "1I"); + strcpy(tform[5], "1J"); + strcpy(tform[6], "1E"); + strcpy(tform[7], "1D"); + strcpy(tform[8], "1C"); + strcpy(tform[9], "1M"); + + strcpy(ttype[0], "Avalue"); + strcpy(ttype[1], "Lvalue"); + strcpy(ttype[2], "Xvalue"); + strcpy(ttype[3], "Bvalue"); + strcpy(ttype[4], "Ivalue"); + strcpy(ttype[5], "Jvalue"); + strcpy(ttype[6], "Evalue"); + strcpy(ttype[7], "Dvalue"); + strcpy(ttype[8], "Cvalue"); + strcpy(ttype[9], "Mvalue"); + + strcpy(tunit[0], ""); + strcpy(tunit[1], "m**2"); + strcpy(tunit[2], "cm"); + strcpy(tunit[3], "erg/s"); + strcpy(tunit[4], "km/s"); + strcpy(tunit[5], ""); + strcpy(tunit[6], ""); + strcpy(tunit[7], ""); + strcpy(tunit[8], ""); + strcpy(tunit[9], ""); + + nrows = 21; + tfields = 10; + pcount = 0; + +/* + ffcrtb(fptr, BINARY_TBL, nrows, tfields, ttype, tform, tunit, binname, + &status); +*/ + ffibin(fptr, nrows, tfields, ttype, tform, tunit, binname, 0L, + &status); + + printf("\nffibin status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + /* get size and position in header, and reserve space for more keywords */ + ffghps(fptr, &existkeys, &keynum, &status); + printf("header contains %d keywords; located at keyword %d \n",existkeys, + keynum); + + morekeys = 40; + ffhdef(fptr, morekeys, &status); + ffghsp(fptr, &existkeys, &morekeys, &status); + printf("header contains %d keywords with room for %d more\n",existkeys, + morekeys); + + fftnul(fptr, 4, 99, &status); /* define null value for int cols */ + fftnul(fptr, 5, 99, &status); + fftnul(fptr, 6, 99, &status); + + extvers = 1; + ffpkyj(fptr, "EXTVER", extvers, "extension version number", &status); + ffpkyj(fptr, "TNULL4", 99, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL5", 99, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL6", 99, "value for undefined pixels", &status); + + naxis = 3; + naxes[0] = 1; + naxes[1] = 2; + naxes[2] = 8; + ffptdm(fptr, 3, naxis, naxes, &status); + + naxis = 0; + naxes[0] = 0; + naxes[1] = 0; + naxes[2] = 0; + ffgtdm(fptr, 3, 3, &naxis, naxes, &status); + ffgkys(fptr, "TDIM3", iskey, comment, &status); + printf("TDIM3 = %s, %d, %ld, %ld, %ld\n", iskey, naxis, naxes[0], + naxes[1], naxes[2]); + + ffrdef(fptr, &status); /* force header to be scanned (not required) */ + + /* + ############################ + # write data to columns # + ############################ + */ + + /* initialize arrays of values to write to table */ + signval = -1; + for (ii = 0; ii < 21; ii++) + { + signval *= -1; + boutarray[ii] = (ii + 1); + ioutarray[ii] = (ii + 1) * signval; + joutarray[ii] = (ii + 1) * signval; + koutarray[ii] = (ii + 1) * signval; + eoutarray[ii] = (ii + 1) * signval; + doutarray[ii] = (ii + 1) * signval; + } + + ffpcls(fptr, 1, 1, 1, 3, onskey, &status); /* write string values */ + ffpclu(fptr, 1, 4, 1, 1, &status); /* write null value */ + + larray[0] = 0; + larray[1] = 1; + larray[2] = 0; + larray[3] = 0; + larray[4] = 1; + larray[5] = 1; + larray[6] = 0; + larray[7] = 0; + larray[8] = 0; + larray[9] = 1; + larray[10] = 1; + larray[11] = 1; + larray[12] = 0; + larray[13] = 0; + larray[14] = 0; + larray[15] = 0; + larray[16] = 1; + larray[17] = 1; + larray[18] = 1; + larray[19] = 1; + larray[20] = 0; + larray[21] = 0; + larray[22] = 0; + larray[23] = 0; + larray[24] = 0; + larray[25] = 1; + larray[26] = 1; + larray[27] = 1; + larray[28] = 1; + larray[29] = 1; + larray[30] = 0; + larray[31] = 0; + larray[32] = 0; + larray[33] = 0; + larray[34] = 0; + larray[35] = 0; + + + ffpclx(fptr, 3, 1, 1, 36, larray, &status); /*write bits*/ + + for (ii = 4; ii < 9; ii++) /* loop over cols 4 - 8 */ + { + ffpclb(fptr, ii, 1, 1, 2, boutarray, &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcli(fptr, ii, 3, 1, 2, &ioutarray[2], &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpclk(fptr, ii, 5, 1, 2, &koutarray[4], &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcle(fptr, ii, 7, 1, 2, &eoutarray[6], &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcld(fptr, ii, 9, 1, 2, &doutarray[8], &status); + if (status == NUM_OVERFLOW) + status = 0; + + ffpclu(fptr, ii, 11, 1, 1, &status); /* write null value */ + } + + ffpclc(fptr, 9, 1, 1, 10, eoutarray, &status); + ffpclm(fptr, 10, 1, 1, 10, doutarray, &status); + + for (ii = 4; ii < 9; ii++) /* loop over cols 4 - 8 */ + { + ffpcnb(fptr, ii, 12, 1, 2, &boutarray[11], 13, &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcni(fptr, ii, 14, 1, 2, &ioutarray[13], 15, &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcnk(fptr, ii, 16, 1, 2, &koutarray[15], 17, &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcne(fptr, ii, 18, 1, 2, &eoutarray[17], 19., &status); + if (status == NUM_OVERFLOW) + status = 0; + ffpcnd(fptr, ii, 20, 1, 2, &doutarray[19], 21., &status); + if (status == NUM_OVERFLOW) + status = 0; + + } + ffpcll(fptr, 2, 1, 1, 21, larray, &status); /*write logicals*/ + ffpclu(fptr, 2, 11, 1, 1, &status); /* write null value */ + printf("ffpcl_ status = %d\n", status); + + /* + ######################################### + # get information about the columns # + ######################################### + */ + + printf("\nFind the column numbers; a returned status value of 237 is"); + printf("\nexpected and indicates that more than one column name matches"); + printf("\nthe input column name template. Status = 219 indicates that"); + printf("\nthere was no matching column name."); + + ffgcno(fptr, 0, "Xvalue", &colnum, &status); + printf("\nColumn Xvalue is number %d; status = %d.\n", colnum, status); + + while (status != COL_NOT_FOUND) + { + ffgcnn(fptr, 1, "*ue", colname, &colnum, &status); + printf("Column %s is number %d; status = %d.\n", + colname, colnum, status); + } + status = 0; + + printf("\nInformation about each column:\n"); + + for (ii = 0; ii < tfields; ii++) + { + ffgtcl(fptr, ii + 1, &typecode, &repeat, &width, &status); + printf("%4s %3d %2ld %2ld", tform[ii], typecode, repeat, width); + ffgbcl(fptr, ii + 1, ttype[0], tunit[0], cvalstr, &repeat, &scale, + &zero, &jnulval, tdisp, &status); + printf(" %s, %s, %c, %ld, %f, %f, %ld, %s.\n", + ttype[0], tunit[0], cvalstr[0], repeat, scale, zero, jnulval, tdisp); + } + + printf("\n"); + + /* + ############################################### + # insert ASCII table before the binary table # + ############################################### + */ + + if (ffmrhd(fptr, -1, &hdutype, &status) > 0) + goto errstatus; + + strcpy(tform[0], "A15"); + strcpy(tform[1], "I10"); + strcpy(tform[2], "F14.6"); + strcpy(tform[3], "E12.5"); + strcpy(tform[4], "D21.14"); + + strcpy(ttype[0], "Name"); + strcpy(ttype[1], "Ivalue"); + strcpy(ttype[2], "Fvalue"); + strcpy(ttype[3], "Evalue"); + strcpy(ttype[4], "Dvalue"); + + strcpy(tunit[0], ""); + strcpy(tunit[1], "m**2"); + strcpy(tunit[2], "cm"); + strcpy(tunit[3], "erg/s"); + strcpy(tunit[4], "km/s"); + + rowlen = 76; + nrows = 11; + tfields = 5; + + ffitab(fptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, tblname, + &status); + printf("ffitab status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + ffsnul(fptr, 1, "null1", &status); /* define null value for int cols */ + ffsnul(fptr, 2, "null2", &status); + ffsnul(fptr, 3, "null3", &status); + ffsnul(fptr, 4, "null4", &status); + ffsnul(fptr, 5, "null5", &status); + + extvers = 2; + ffpkyj(fptr, "EXTVER", extvers, "extension version number", &status); + + ffpkys(fptr, "TNULL1", "null1", "value for undefined pixels", &status); + ffpkys(fptr, "TNULL2", "null2", "value for undefined pixels", &status); + ffpkys(fptr, "TNULL3", "null3", "value for undefined pixels", &status); + ffpkys(fptr, "TNULL4", "null4", "value for undefined pixels", &status); + ffpkys(fptr, "TNULL5", "null5", "value for undefined pixels", &status); + + if (status > 0) + goto errstatus; + + /* + ############################ + # write data to columns # + ############################ + */ + + /* initialize arrays of values to write to table */ + for (ii = 0; ii < 21; ii++) + { + boutarray[ii] = ii + 1; + ioutarray[ii] = ii + 1; + joutarray[ii] = ii + 1; + eoutarray[ii] = ii + 1; + doutarray[ii] = ii + 1; + } + + ffpcls(fptr, 1, 1, 1, 3, onskey, &status); /* write string values */ + ffpclu(fptr, 1, 4, 1, 1, &status); /* write null value */ + + for (ii = 2; ii < 6; ii++) /* loop over cols 2 - 5 */ + { + ffpclb(fptr, ii, 1, 1, 2, boutarray, &status); /* char array */ + if (status == NUM_OVERFLOW) + status = 0; + ffpcli(fptr, ii, 3, 1, 2, &ioutarray[2], &status); /* short array */ + if (status == NUM_OVERFLOW) + status = 0; + ffpclj(fptr, ii, 5, 1, 2, &joutarray[4], &status); /* long array */ + if (status == NUM_OVERFLOW) + status = 0; + ffpcle(fptr, ii, 7, 1, 2, &eoutarray[6], &status); /* float array */ + if (status == NUM_OVERFLOW) + status = 0; + ffpcld(fptr, ii, 9, 1, 2, &doutarray[8], &status); /* double array */ + if (status == NUM_OVERFLOW) + status = 0; + + ffpclu(fptr, ii, 11, 1, 1, &status); /* write null value */ + } + printf("ffpcl_ status = %d\n", status); + + /* + ################################ + # read data from ASCII table # + ################################ + */ + ffghtb(fptr, 99, &rowlen, &nrows, &tfields, ttype, tbcol, + tform, tunit, tblname, &status); + + printf("\nASCII table: rowlen, nrows, tfields, extname: %ld %ld %d %s\n", + rowlen, nrows, tfields, tblname); + + for (ii = 0; ii < tfields; ii++) + printf("%8s %3ld %8s %8s \n", ttype[ii], tbcol[ii], + tform[ii], tunit[ii]); + + nrows = 11; + ffgcvs(fptr, 1, 1, 1, nrows, "UNDEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 2, 1, 1, nrows, 99, binarray, &anynull, &status); + ffgcvi(fptr, 2, 1, 1, nrows, 99, iinarray, &anynull, &status); + ffgcvj(fptr, 3, 1, 1, nrows, 99, jinarray, &anynull, &status); + ffgcve(fptr, 4, 1, 1, nrows, 99., einarray, &anynull, &status); + ffgcvd(fptr, 5, 1, 1, nrows, 99., dinarray, &anynull, &status); + + printf("\nData values read from ASCII table:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %2d %2ld %4.1f %4.1f\n", inskey[ii], binarray[ii], + iinarray[ii], jinarray[ii], einarray[ii], dinarray[ii]); + } + + ffgtbb(fptr, 1, 20, 78, uchars, &status); + uchars[78] = '\0'; + printf("\n%s\n", uchars); + ffptbb(fptr, 1, 20, 78, uchars, &status); + + /* + ######################################### + # get information about the columns # + ######################################### + */ + + ffgcno(fptr, 0, "name", &colnum, &status); + printf("\nColumn name is number %d; status = %d.\n", colnum, status); + + while (status != COL_NOT_FOUND) + { + ffgcnn(fptr, 1, "*ue", colname, &colnum, &status); + printf("Column %s is number %d; status = %d.\n", + colname, colnum, status); + } + status = 0; + + for (ii = 0; ii < tfields; ii++) + { + ffgtcl(fptr, ii + 1, &typecode, &repeat, &width, &status); + printf("%4s %3d %2ld %2ld", tform[ii], typecode, repeat, width); + ffgacl(fptr, ii + 1, ttype[0], tbcol, tunit[0], tform[0], &scale, + &zero, nulstr, tdisp, &status); + printf(" %s, %ld, %s, %s, %f, %f, %s, %s.\n", + ttype[0], tbcol[0], tunit[0], tform[0], scale, zero, + nulstr, tdisp); + } + + printf("\n"); + + /* + ############################################### + # test the insert/delete row/column routines # + ############################################### + */ + + if (ffirow(fptr, 2, 3, &status) > 0) + goto errstatus; + + nrows = 14; + ffgcvs(fptr, 1, 1, 1, nrows, "UNDEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 2, 1, 1, nrows, 99, binarray, &anynull, &status); + ffgcvi(fptr, 2, 1, 1, nrows, 99, iinarray, &anynull, &status); + ffgcvj(fptr, 3, 1, 1, nrows, 99, jinarray, &anynull, &status); + ffgcve(fptr, 4, 1, 1, nrows, 99., einarray, &anynull, &status); + ffgcvd(fptr, 5, 1, 1, nrows, 99., dinarray, &anynull, &status); + + + printf("\nData values after inserting 3 rows after row 2:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %2d %2ld %4.1f %4.1f\n", inskey[ii], binarray[ii], + iinarray[ii], jinarray[ii], einarray[ii], dinarray[ii]); + } + + if (ffdrow(fptr, 10, 2, &status) > 0) + goto errstatus; + + nrows = 12; + ffgcvs(fptr, 1, 1, 1, nrows, "UNDEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 2, 1, 1, nrows, 99, binarray, &anynull, &status); + ffgcvi(fptr, 2, 1, 1, nrows, 99, iinarray, &anynull, &status); + ffgcvj(fptr, 3, 1, 1, nrows, 99, jinarray, &anynull, &status); + ffgcve(fptr, 4, 1, 1, nrows, 99., einarray, &anynull, &status); + ffgcvd(fptr, 5, 1, 1, nrows, 99., dinarray, &anynull, &status); + + printf("\nData values after deleting 2 rows at row 10:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %2d %2ld %4.1f %4.1f\n", inskey[ii], binarray[ii], + iinarray[ii], jinarray[ii], einarray[ii], dinarray[ii]); + } + if (ffdcol(fptr, 3, &status) > 0) + goto errstatus; + + ffgcvs(fptr, 1, 1, 1, nrows, "UNDEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 2, 1, 1, nrows, 99, binarray, &anynull, &status); + ffgcvi(fptr, 2, 1, 1, nrows, 99, iinarray, &anynull, &status); + ffgcve(fptr, 3, 1, 1, nrows, 99., einarray, &anynull, &status); + ffgcvd(fptr, 4, 1, 1, nrows, 99., dinarray, &anynull, &status); + + printf("\nData values after deleting column 3:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %2d %4.1f %4.1f\n", inskey[ii], binarray[ii], + iinarray[ii], einarray[ii], dinarray[ii]); + } + + if (fficol(fptr, 5, "INSERT_COL", "F14.6", &status) > 0) + goto errstatus; + + ffgcvs(fptr, 1, 1, 1, nrows, "UNDEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 2, 1, 1, nrows, 99, binarray, &anynull, &status); + ffgcvi(fptr, 2, 1, 1, nrows, 99, iinarray, &anynull, &status); + ffgcve(fptr, 3, 1, 1, nrows, 99., einarray, &anynull, &status); + ffgcvd(fptr, 4, 1, 1, nrows, 99., dinarray, &anynull, &status); + ffgcvj(fptr, 5, 1, 1, nrows, 99, jinarray, &anynull, &status); + + printf("\nData values after inserting column 5:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %2d %4.1f %4.1f %ld\n", inskey[ii], binarray[ii], + iinarray[ii], einarray[ii], dinarray[ii] , jinarray[ii]); + } + + /* + ############################################################ + # create a temporary file and copy the ASCII table to it, # + # column by column. # + ############################################################ + */ + bitpix = 16; + naxis = 0; + + strcpy(filename, "!t1q2s3v6.tmp"); + ffinit(&tmpfptr, filename, &status); + printf("Create temporary file: ffinit status = %d\n", status); + + ffiimg(tmpfptr, bitpix, naxis, naxes, &status); + printf("\nCreate null primary array: ffiimg status = %d\n", status); + + /* create an empty table with 12 rows and 0 columns */ + nrows = 12; + tfields = 0; + rowlen = 0; + ffitab(tmpfptr, rowlen, nrows, tfields, ttype, tbcol, tform, tunit, + tblname, &status); + printf("\nCreate ASCII table with 0 columns: ffitab status = %d\n", + status); + + /* copy columns from one table to the other */ + ffcpcl(fptr, tmpfptr, 4, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 3, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 2, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 1, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + + /* now repeat by copying ASCII input to Binary output table */ + ffibin(tmpfptr, nrows, tfields, ttype, tform, tunit, + tblname, 0L, &status); + printf("\nCreate Binary table with 0 columns: ffibin status = %d\n", + status); + + /* copy columns from one table to the other */ + ffcpcl(fptr, tmpfptr, 4, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 3, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 2, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 1, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + + +/* + ffclos(tmpfptr, &status); + printf("Close the tmp file: ffclos status = %d\n", status); +*/ + + ffdelt(tmpfptr, &status); + printf("Delete the tmp file: ffdelt status = %d\n", status); + + if (status > 0) + { + goto errstatus; + } + + /* + ################################ + # read data from binary table # + ################################ + */ + + if (ffmrhd(fptr, 1, &hdutype, &status) > 0) + goto errstatus; + + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + ffghsp(fptr, &existkeys, &morekeys, &status); + printf("header contains %d keywords with room for %d more\n",existkeys, + morekeys); + + ffghbn(fptr, 99, &nrows, &tfields, ttype, + tform, tunit, binname, &pcount, &status); + + printf("\nBinary table: nrows, tfields, extname, pcount: %ld %d %s %ld\n", + nrows, tfields, binname, pcount); + + for (ii = 0; ii < tfields; ii++) + printf("%8s %8s %8s \n", ttype[ii], tform[ii], tunit[ii]); + + for (ii = 0; ii < 40; ii++) + larray[ii] = 0; + + printf("\nData values read from binary table:\n"); + printf(" Bit column (X) data values: \n\n"); + + ffgcx(fptr, 3, 1, 1, 36, larray, &status); + for (jj = 0; jj < 5; jj++) + { + for (ii = 0; ii < 8; ii++) + printf("%1d",larray[jj * 8 + ii]); + printf(" "); + } + + for (ii = 0; ii < nrows; ii++) + { + larray[ii] = 0; + xinarray[ii] = 0; + binarray[ii] = 0; + iinarray[ii] = 0; + kinarray[ii] = 0; + einarray[ii] = 0.; + dinarray[ii] = 0.; + cinarray[ii * 2] = 0.; + minarray[ii * 2] = 0.; + cinarray[ii * 2 + 1] = 0.; + minarray[ii * 2 + 1] = 0.; + } + + printf("\n\n"); + ffgcvs(fptr, 1, 4, 1, 1, "", inskey, &anynull, &status); + printf("null string column value = -%s- (should be --)\n",inskey[0]); + + nrows = 21; + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcl( fptr, 2, 1, 1, nrows, larray, &status); + ffgcvb(fptr, 3, 1, 1, nrows, 98, xinarray, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcvk(fptr, 6, 1, 1, nrows, 98, kinarray, &anynull, &status); + ffgcve(fptr, 7, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 8, 1, 1, nrows, 98., dinarray, &anynull, &status); + ffgcvc(fptr, 9, 1, 1, nrows, 98., cinarray, &anynull, &status); + ffgcvm(fptr, 10, 1, 1, nrows, 98., minarray, &anynull, &status); + + printf("\nRead columns with ffgcv_:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %d %3d %2d %3d %3d %5.1f %5.1f (%5.1f,%5.1f) (%5.1f,%5.1f) \n", + inskey[ii], larray[ii], xinarray[ii], binarray[ii], iinarray[ii], + kinarray[ii], einarray[ii], dinarray[ii], cinarray[ii * 2], + cinarray[ii * 2 + 1], minarray[ii * 2], minarray[ii * 2 + 1]); + } + + for (ii = 0; ii < nrows; ii++) + { + larray[ii] = 0; + xinarray[ii] = 0; + binarray[ii] = 0; + iinarray[ii] = 0; + kinarray[ii] = 0; + einarray[ii] = 0.; + dinarray[ii] = 0.; + cinarray[ii * 2] = 0.; + minarray[ii * 2] = 0.; + cinarray[ii * 2 + 1] = 0.; + minarray[ii * 2 + 1] = 0.; + } + + ffgcfs(fptr, 1, 1, 1, nrows, inskey, larray2, &anynull, &status); + ffgcfl(fptr, 2, 1, 1, nrows, larray, larray2, &anynull, &status); + ffgcfb(fptr, 3, 1, 1, nrows, xinarray, larray2, &anynull, &status); + ffgcfb(fptr, 4, 1, 1, nrows, binarray, larray2, &anynull, &status); + ffgcfi(fptr, 5, 1, 1, nrows, iinarray, larray2, &anynull, &status); + ffgcfk(fptr, 6, 1, 1, nrows, kinarray, larray2, &anynull, &status); + ffgcfe(fptr, 7, 1, 1, nrows, einarray, larray2, &anynull, &status); + ffgcfd(fptr, 8, 1, 1, nrows, dinarray, larray2, &anynull, &status); + ffgcfc(fptr, 9, 1, 1, nrows, cinarray, larray2, &anynull, &status); + ffgcfm(fptr, 10, 1, 1, nrows, minarray, larray2, &anynull, &status); + + printf("\nRead columns with ffgcf_:\n"); + for (ii = 0; ii < 10; ii++) + { + + printf("%15s %d %3d %2d %3d %3d %5.1f %5.1f (%5.1f,%5.1f) (%5.1f,%5.1f)\n", + inskey[ii], larray[ii], xinarray[ii], binarray[ii], iinarray[ii], + kinarray[ii], einarray[ii], dinarray[ii], cinarray[ii * 2], + cinarray[ii * 2 + 1], minarray[ii * 2], minarray[ii * 2 + 1]); + } + for (ii = 10; ii < nrows; ii++) + { + /* don't try to print the NaN values */ + printf("%15s %d %3d %2d %3d \n", + inskey[ii], larray[ii], xinarray[ii], binarray[ii], iinarray[ii]); + } + ffprec(fptr, + "key_prec= 'This keyword was written by f_prec' / comment here", &status); + + /* + ############################################### + # test the insert/delete row/column routines # + ############################################### + */ + if (ffirow(fptr, 2, 3, &status) > 0) + goto errstatus; + + nrows = 14; + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcvj(fptr, 6, 1, 1, nrows, 98, jinarray, &anynull, &status); + ffgcve(fptr, 7, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 8, 1, 1, nrows, 98., dinarray, &anynull, &status); + + printf("\nData values after inserting 3 rows after row 2:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %3d %3ld %5.1f %5.1f\n", inskey[ii], binarray[ii], + iinarray[ii], jinarray[ii], einarray[ii], dinarray[ii]); + } + + if (ffdrow(fptr, 10, 2, &status) > 0) + goto errstatus; + + nrows = 12; + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcvj(fptr, 6, 1, 1, nrows, 98, jinarray, &anynull, &status); + ffgcve(fptr, 7, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 8, 1, 1, nrows, 98., dinarray, &anynull, &status); + + printf("\nData values after deleting 2 rows at row 10:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %3d %3ld %5.1f %5.1f\n", inskey[ii], binarray[ii], + iinarray[ii], jinarray[ii], einarray[ii], dinarray[ii]); + } + + if (ffdcol(fptr, 6, &status) > 0) + goto errstatus; + + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcve(fptr, 6, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 7, 1, 1, nrows, 98., dinarray, &anynull, &status); + + printf("\nData values after deleting column 6:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %3d %5.1f %5.1f\n", inskey[ii], binarray[ii], + iinarray[ii], einarray[ii], dinarray[ii]); + } + + if (fficol(fptr, 8, "INSERT_COL", "1E", &status) > 0) + goto errstatus; + + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcve(fptr, 6, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 7, 1, 1, nrows, 98., dinarray, &anynull, &status); + ffgcvj(fptr, 8, 1, 1, nrows, 98, jinarray, &anynull, &status); + + printf("\nData values after inserting column 8:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %3d %5.1f %5.1f %ld\n", inskey[ii], binarray[ii], + iinarray[ii], einarray[ii], dinarray[ii] , jinarray[ii]); + } + + ffpclu(fptr, 8, 1, 1, 10, &status); + + ffgcvs(fptr, 1, 1, 1, nrows, "NOT DEFINED", inskey, &anynull, &status); + ffgcvb(fptr, 4, 1, 1, nrows, 98, binarray, &anynull, &status); + ffgcvi(fptr, 5, 1, 1, nrows, 98, iinarray, &anynull, &status); + ffgcve(fptr, 6, 1, 1, nrows, 98., einarray, &anynull, &status); + ffgcvd(fptr, 7, 1, 1, nrows, 98., dinarray, &anynull, &status); + ffgcvj(fptr, 8, 1, 1, nrows, 98, jinarray, &anynull, &status); + + printf("\nValues after setting 1st 10 elements in column 8 = null:\n"); + for (ii = 0; ii < nrows; ii++) + { + printf("%15s %2d %3d %5.1f %5.1f %ld\n", inskey[ii], binarray[ii], + iinarray[ii], einarray[ii], dinarray[ii] , jinarray[ii]); + } + + /* + ############################################################ + # create a temporary file and copy the binary table to it,# + # column by column. # + ############################################################ + */ + bitpix = 16; + naxis = 0; + + strcpy(filename, "!t1q2s3v5.tmp"); + ffinit(&tmpfptr, filename, &status); + printf("Create temporary file: ffinit status = %d\n", status); + + ffiimg(tmpfptr, bitpix, naxis, naxes, &status); + printf("\nCreate null primary array: ffiimg status = %d\n", status); + + /* create an empty table with 22 rows and 0 columns */ + nrows = 22; + tfields = 0; + ffibin(tmpfptr, nrows, tfields, ttype, tform, tunit, binname, 0L, + &status); + printf("\nCreate binary table with 0 columns: ffibin status = %d\n", + status); + + /* copy columns from one table to the other */ + ffcpcl(fptr, tmpfptr, 7, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 6, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 5, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 4, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 3, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 2, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + ffcpcl(fptr, tmpfptr, 1, 1, TRUE, &status); + printf("copy column, ffcpcl status = %d\n", status); + +/* + ffclos(tmpfptr, &status); + printf("Close the tmp file: ffclos status = %d\n", status); +*/ + + ffdelt(tmpfptr, &status); + printf("Delete the tmp file: ffdelt status = %d\n", status); + if (status > 0) + { + goto errstatus; + } + /* + #################################################### + # insert binary table following the primary array # + #################################################### + */ + + ffmahd(fptr, 1, &hdutype, &status); + + strcpy(tform[0], "15A"); + strcpy(tform[1], "1L"); + strcpy(tform[2], "16X"); + strcpy(tform[3], "1B"); + strcpy(tform[4], "1I"); + strcpy(tform[5], "1J"); + strcpy(tform[6], "1E"); + strcpy(tform[7], "1D"); + strcpy(tform[8], "1C"); + strcpy(tform[9], "1M"); + + strcpy(ttype[0], "Avalue"); + strcpy(ttype[1], "Lvalue"); + strcpy(ttype[2], "Xvalue"); + strcpy(ttype[3], "Bvalue"); + strcpy(ttype[4], "Ivalue"); + strcpy(ttype[5], "Jvalue"); + strcpy(ttype[6], "Evalue"); + strcpy(ttype[7], "Dvalue"); + strcpy(ttype[8], "Cvalue"); + strcpy(ttype[9], "Mvalue"); + + strcpy(tunit[0], ""); + strcpy(tunit[1], "m**2"); + strcpy(tunit[2], "cm"); + strcpy(tunit[3], "erg/s"); + strcpy(tunit[4], "km/s"); + strcpy(tunit[5], ""); + strcpy(tunit[6], ""); + strcpy(tunit[7], ""); + strcpy(tunit[8], ""); + strcpy(tunit[9], ""); + + nrows = 20; + tfields = 10; + pcount = 0; + + ffibin(fptr, nrows, tfields, ttype, tform, tunit, binname, pcount, + &status); + printf("ffibin status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + extvers = 3; + ffpkyj(fptr, "EXTVER", extvers, "extension version number", &status); + + + ffpkyj(fptr, "TNULL4", 77, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL5", 77, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL6", 77, "value for undefined pixels", &status); + + ffpkyj(fptr, "TSCAL4", 1000, "scaling factor", &status); + ffpkyj(fptr, "TSCAL5", 1, "scaling factor", &status); + ffpkyj(fptr, "TSCAL6", 100, "scaling factor", &status); + + ffpkyj(fptr, "TZERO4", 0, "scaling offset", &status); + ffpkyj(fptr, "TZERO5", 32768, "scaling offset", &status); + ffpkyj(fptr, "TZERO6", 100, "scaling offset", &status); + + fftnul(fptr, 4, 77, &status); /* define null value for int cols */ + fftnul(fptr, 5, 77, &status); + fftnul(fptr, 6, 77, &status); + /* set scaling */ + fftscl(fptr, 4, 1000., 0., &status); + fftscl(fptr, 5, 1., 32768., &status); + fftscl(fptr, 6, 100., 100., &status); + + /* + ############################ + # write data to columns # + ############################ + */ + + /* initialize arrays of values to write to table */ + + joutarray[0] = 0; + joutarray[1] = 1000; + joutarray[2] = 10000; + joutarray[3] = 32768; + joutarray[4] = 65535; + + + for (ii = 4; ii < 7; ii++) + { + ffpclj(fptr, ii, 1, 1, 5, joutarray, &status); + if (status == NUM_OVERFLOW) + { + printf("Overflow writing to column %ld\n", ii); + status = 0; + } + + ffpclu(fptr, ii, 6, 1, 1, &status); /* write null value */ + } + + for (jj = 4; jj < 7; jj++) + { + ffgcvj(fptr, jj, 1, 1, 6, -999, jinarray, &anynull, &status); + for (ii = 0; ii < 6; ii++) + { + printf(" %6ld", jinarray[ii]); + } + printf("\n"); + } + + printf("\n"); + /* turn off scaling, and read the unscaled values */ + fftscl(fptr, 4, 1., 0., &status); + fftscl(fptr, 5, 1., 0., &status); + fftscl(fptr, 6, 1., 0., &status); + + for (jj = 4; jj < 7; jj++) + { + ffgcvj(fptr, jj, 1, 1, 6, -999, jinarray, &anynull, &status); + for (ii = 0; ii < 6; ii++) + { + printf(" %6ld", jinarray[ii]); + } + printf("\n"); + } + /* + ###################################################### + # insert image extension following the binary table # + ###################################################### + */ + + bitpix = -32; + naxis = 2; + naxes[0] = 15; + naxes[1] = 25; + ffiimg(fptr, bitpix, naxis, naxes, &status); + printf("\nCreate image extension: ffiimg status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + imgarray[jj][ii] = (jj * 10) + ii; + } + } + + ffp2di(fptr, 1, 19, naxes[0], naxes[1], imgarray[0], &status); + printf("\nWrote whole 2D array: ffp2di status = %d\n", status); + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + imgarray[jj][ii] = 0; + } + } + + ffg2di(fptr, 1, 0, 19, naxes[0], naxes[1], imgarray[0], &anynull, + &status); + printf("\nRead whole 2D array: ffg2di status = %d\n", status); + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + printf(" %3d", imgarray[jj][ii]); + } + printf("\n"); + } + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + imgarray[jj][ii] = 0; + } + } + + for (jj = 0; jj < 20; jj++) + { + for (ii = 0; ii < 10; ii++) + { + imgarray2[jj][ii] = (jj * -10) - ii; + } + } + + fpixels[0] = 5; + fpixels[1] = 5; + lpixels[0] = 14; + lpixels[1] = 14; + ffpssi(fptr, 1, naxis, naxes, fpixels, lpixels, + imgarray2[0], &status); + printf("\nWrote subset 2D array: ffpssi status = %d\n", status); + + ffg2di(fptr, 1, 0, 19, naxes[0], naxes[1], imgarray[0], &anynull, + &status); + printf("\nRead whole 2D array: ffg2di status = %d\n", status); + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + printf(" %3d", imgarray[jj][ii]); + } + printf("\n"); + } + + fpixels[0] = 2; + fpixels[1] = 5; + lpixels[0] = 10; + lpixels[1] = 8; + inc[0] = 2; + inc[1] = 3; + + for (jj = 0; jj < 30; jj++) + { + for (ii = 0; ii < 19; ii++) + { + imgarray[jj][ii] = 0; + } + } + + ffgsvi(fptr, 1, naxis, naxes, fpixels, lpixels, inc, 0, + imgarray[0], &anynull, &status); + printf("\nRead subset of 2D array: ffgsvi status = %d\n", status); + + for (ii = 0; ii < 10; ii++) + { + printf(" %3d", imgarray[0][ii]); + } + printf("\n"); + + /* + ########################################################### + # insert another image extension # + # copy the image extension to primary array of tmp file. # + # then delete the tmp file, and the image extension # + ########################################################### + */ + bitpix = 16; + naxis = 2; + naxes[0] = 15; + naxes[1] = 25; + ffiimg(fptr, bitpix, naxis, naxes, &status); + printf("\nCreate image extension: ffiimg status = %d\n", status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + strcpy(filename, "t1q2s3v4.tmp"); + ffinit(&tmpfptr, filename, &status); + printf("Create temporary file: ffinit status = %d\n", status); + + ffcopy(fptr, tmpfptr, 0, &status); + printf("Copy image extension to primary array of tmp file.\n"); + printf("ffcopy status = %d\n", status); + + ffgrec(tmpfptr, 1, card, &status); + printf("%s\n", card); + ffgrec(tmpfptr, 2, card, &status); + printf("%s\n", card); + ffgrec(tmpfptr, 3, card, &status); + printf("%s\n", card); + ffgrec(tmpfptr, 4, card, &status); + printf("%s\n", card); + ffgrec(tmpfptr, 5, card, &status); + printf("%s\n", card); + ffgrec(tmpfptr, 6, card, &status); + printf("%s\n", card); + + ffdelt(tmpfptr, &status); + printf("Delete the tmp file: ffdelt status = %d\n", status); + + ffdhdu(fptr, &hdutype, &status); + printf("Delete the image extension; hdutype, status = %d %d\n", + hdutype, status); + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + + /* + ########################################################### + # append bintable extension with variable length columns # + ########################################################### + */ + + ffcrhd(fptr, &status); + printf("ffcrhd status = %d\n", status); + + strcpy(tform[0], "1PA"); + strcpy(tform[1], "1PL"); + strcpy(tform[2], "1PB"); /* Fortran FITSIO doesn't support 1PX */ + strcpy(tform[3], "1PB"); + strcpy(tform[4], "1PI"); + strcpy(tform[5], "1PJ"); + strcpy(tform[6], "1PE"); + strcpy(tform[7], "1PD"); + strcpy(tform[8], "1PC"); + strcpy(tform[9], "1PM"); + + strcpy(ttype[0], "Avalue"); + strcpy(ttype[1], "Lvalue"); + strcpy(ttype[2], "Xvalue"); + strcpy(ttype[3], "Bvalue"); + strcpy(ttype[4], "Ivalue"); + strcpy(ttype[5], "Jvalue"); + strcpy(ttype[6], "Evalue"); + strcpy(ttype[7], "Dvalue"); + strcpy(ttype[8], "Cvalue"); + strcpy(ttype[9], "Mvalue"); + + strcpy(tunit[0], ""); + strcpy(tunit[1], "m**2"); + strcpy(tunit[2], "cm"); + strcpy(tunit[3], "erg/s"); + strcpy(tunit[4], "km/s"); + strcpy(tunit[5], ""); + strcpy(tunit[6], ""); + strcpy(tunit[7], ""); + strcpy(tunit[8], ""); + strcpy(tunit[9], ""); + + nrows = 20; + tfields = 10; + pcount = 0; + + ffphbn(fptr, nrows, tfields, ttype, tform, tunit, binname, pcount, + &status); + printf("Variable length arrays: ffphbn status = %d\n", status); + + + extvers = 4; + ffpkyj(fptr, "EXTVER", extvers, "extension version number", &status); + + ffpkyj(fptr, "TNULL4", 88, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL5", 88, "value for undefined pixels", &status); + ffpkyj(fptr, "TNULL6", 88, "value for undefined pixels", &status); + + /* + ############################ + # write data to columns # + ############################ + */ + + /* initialize arrays of values to write to table */ + strcpy(iskey,"abcdefghijklmnopqrst"); + + for (ii = 0; ii < 20; ii++) + { + boutarray[ii] = ii + 1; + ioutarray[ii] = ii + 1; + joutarray[ii] = ii + 1; + eoutarray[ii] = ii + 1; + doutarray[ii] = ii + 1; + } + + larray[0] = 0; + larray[1] = 1; + larray[2] = 0; + larray[3] = 0; + larray[4] = 1; + larray[5] = 1; + larray[6] = 0; + larray[7] = 0; + larray[8] = 0; + larray[9] = 1; + larray[10] = 1; + larray[11] = 1; + larray[12] = 0; + larray[13] = 0; + larray[14] = 0; + larray[15] = 0; + larray[16] = 1; + larray[17] = 1; + larray[18] = 1; + larray[19] = 1; + + /* write values in 1st row */ + /* strncpy(inskey[0], iskey, 1); */ + inskey[0][0] = '\0'; /* write a null string (i.e., a blank) */ + ffpcls(fptr, 1, 1, 1, 1, inskey, &status); /* write string values */ + ffpcll(fptr, 2, 1, 1, 1, larray, &status); /* write logicals */ + ffpclx(fptr, 3, 1, 1, 1, larray, &status); /* write bits */ + ffpclb(fptr, 4, 1, 1, 1, boutarray, &status); + ffpcli(fptr, 5, 1, 1, 1, ioutarray, &status); + ffpclj(fptr, 6, 1, 1, 1, joutarray, &status); + ffpcle(fptr, 7, 1, 1, 1, eoutarray, &status); + ffpcld(fptr, 8, 1, 1, 1, doutarray, &status); + + for (ii = 2; ii <= 20; ii++) /* loop over rows 1 - 20 */ + { + strncpy(inskey[0], iskey, ii); + inskey[0][ii] = '\0'; + ffpcls(fptr, 1, ii, 1, 1, inskey, &status); /* write string values */ + + ffpcll(fptr, 2, ii, 1, ii, larray, &status); /* write logicals */ + ffpclu(fptr, 2, ii, ii-1, 1, &status); + + ffpclx(fptr, 3, ii, 1, ii, larray, &status); /* write bits */ + + ffpclb(fptr, 4, ii, 1, ii, boutarray, &status); + ffpclu(fptr, 4, ii, ii-1, 1, &status); + + ffpcli(fptr, 5, ii, 1, ii, ioutarray, &status); + ffpclu(fptr, 5, ii, ii-1, 1, &status); + + ffpclj(fptr, 6, ii, 1, ii, joutarray, &status); + ffpclu(fptr, 6, ii, ii-1, 1, &status); + + ffpcle(fptr, 7, ii, 1, ii, eoutarray, &status); + ffpclu(fptr, 7, ii, ii-1, 1, &status); + + ffpcld(fptr, 8, ii, 1, ii, doutarray, &status); + ffpclu(fptr, 8, ii, ii-1, 1, &status); + } + printf("ffpcl_ status = %d\n", status); + + /* + ################################# + # close then reopen this HDU # + ################################# + */ + + + ffmrhd(fptr, -1, &hdutype, &status); + ffmrhd(fptr, 1, &hdutype, &status); + + /* + ############################# + # read data from columns # + ############################# + */ + + ffgkyj(fptr, "PCOUNT", &pcount, comm, &status); + printf("PCOUNT = %ld\n", pcount); + + /* initialize the variables to be read */ + strcpy(inskey[0]," "); + strcpy(iskey," "); + + + printf("HDU number = %d\n", ffghdn(fptr, &hdunum)); + for (ii = 1; ii <= 20; ii++) /* loop over rows 1 - 20 */ + { + for (jj = 0; jj < ii; jj++) + { + larray[jj] = 0; + boutarray[jj] = 0; + ioutarray[jj] = 0; + joutarray[jj] = 0; + eoutarray[jj] = 0; + doutarray[jj] = 0; + } + + ffgcvs(fptr, 1, ii, 1, 1, iskey, inskey, &anynull, &status); + printf("A %s %d\nL", inskey[0], status); + + ffgcl( fptr, 2, ii, 1, ii, larray, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2d", larray[jj]); + printf(" %d\nX", status); + + ffgcx(fptr, 3, ii, 1, ii, larray, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2d", larray[jj]); + printf(" %d\nB", status); + + ffgcvb(fptr, 4, ii, 1, ii, 99, boutarray, &anynull, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2d", boutarray[jj]); + printf(" %d\nI", status); + + ffgcvi(fptr, 5, ii, 1, ii, 99, ioutarray, &anynull, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2d", ioutarray[jj]); + printf(" %d\nJ", status); + + ffgcvj(fptr, 6, ii, 1, ii, 99, joutarray, &anynull, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2ld", joutarray[jj]); + printf(" %d\nE", status); + + ffgcve(fptr, 7, ii, 1, ii, 99., eoutarray, &anynull, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2.0f", eoutarray[jj]); + printf(" %d\nD", status); + + ffgcvd(fptr, 8, ii, 1, ii, 99., doutarray, &anynull, &status); + for (jj = 0; jj < ii; jj++) + printf(" %2.0f", doutarray[jj]); + printf(" %d\n", status); + + ffgdes(fptr, 8, ii, &repeat, &offset, &status); + printf("Column 8 repeat and offset = %ld %ld\n", repeat, offset); + } + + /* + ##################################### + # create another image extension # + ##################################### + */ + + bitpix = 32; + naxis = 2; + naxes[0] = 10; + naxes[1] = 2; + npixels = 20; + +/* ffcrim(fptr, bitpix, naxis, naxes, &status); */ + ffiimg(fptr, bitpix, naxis, naxes, &status); + printf("\nffcrim status = %d\n", status); + + /* initialize arrays of values to write to primary array */ + for (ii = 0; ii < npixels; ii++) + { + boutarray[ii] = ii * 2; + ioutarray[ii] = ii * 2; + joutarray[ii] = ii * 2; + koutarray[ii] = ii * 2; + eoutarray[ii] = ii * 2; + doutarray[ii] = ii * 2; + } + + /* write a few pixels with each datatype */ + ffppr(fptr, TBYTE, 1, 2, &boutarray[0], &status); + ffppr(fptr, TSHORT, 3, 2, &ioutarray[2], &status); + ffppr(fptr, TINT, 5, 2, &koutarray[4], &status); + ffppr(fptr, TSHORT, 7, 2, &ioutarray[6], &status); + ffppr(fptr, TLONG, 9, 2, &joutarray[8], &status); + ffppr(fptr, TFLOAT, 11, 2, &eoutarray[10], &status); + ffppr(fptr, TDOUBLE, 13, 2, &doutarray[12], &status); + printf("ffppr status = %d\n", status); + + /* read back the pixels with each datatype */ + bnul = 0; + inul = 0; + knul = 0; + jnul = 0; + enul = 0.; + dnul = 0.; + + ffgpv(fptr, TBYTE, 1, 14, &bnul, binarray, &anynull, &status); + ffgpv(fptr, TSHORT, 1, 14, &inul, iinarray, &anynull, &status); + ffgpv(fptr, TINT, 1, 14, &knul, kinarray, &anynull, &status); + ffgpv(fptr, TLONG, 1, 14, &jnul, jinarray, &anynull, &status); + ffgpv(fptr, TFLOAT, 1, 14, &enul, einarray, &anynull, &status); + ffgpv(fptr, TDOUBLE, 1, 14, &dnul, dinarray, &anynull, &status); + + printf("\nImage values written with ffppr and read with ffgpv:\n"); + npixels = 14; + for (ii = 0; ii < npixels; ii++) + printf(" %2d", binarray[ii]); + printf(" %d (byte)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2d", iinarray[ii]); + printf(" %d (short)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2d", kinarray[ii]); + printf(" %d (int)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2ld", jinarray[ii]); + printf(" %d (long)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", einarray[ii]); + printf(" %d (float)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", dinarray[ii]); + printf(" %d (double)\n", anynull); + + /* + ########################################## + # test world coordinate system routines # + ########################################## + */ + + xrval = 45.83; + yrval = 63.57; + xrpix = 256.; + yrpix = 257.; + xinc = -.00277777; + yinc = .00277777; + + /* write the WCS keywords */ + /* use example values from the latest WCS document */ + ffpkyd(fptr, "CRVAL1", xrval, 10, "comment", &status); + ffpkyd(fptr, "CRVAL2", yrval, 10, "comment", &status); + ffpkyd(fptr, "CRPIX1", xrpix, 10, "comment", &status); + ffpkyd(fptr, "CRPIX2", yrpix, 10, "comment", &status); + ffpkyd(fptr, "CDELT1", xinc, 10, "comment", &status); + ffpkyd(fptr, "CDELT2", yinc, 10, "comment", &status); + /* ffpkyd(fptr, "CROTA2", rot, 10, "comment", &status); */ + ffpkys(fptr, "CTYPE1", xcoordtype, "comment", &status); + ffpkys(fptr, "CTYPE2", ycoordtype, "comment", &status); + printf("\nWrote WCS keywords status = %d\n",status); + + xrval = 0.; + yrval = 0.; + xrpix = 0.; + yrpix = 0.; + xinc = 0.; + yinc = 0.; + rot = 0.; + + ffgics(fptr, &xrval, &yrval, &xrpix, + &yrpix, &xinc, &yinc, &rot, ctype, &status); + printf("Read WCS keywords with ffgics status = %d\n",status); + + xpix = 0.5; + ypix = 0.5; + + ffwldp(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot,ctype, + &xpos, &ypos,&status); + + printf(" CRVAL1, CRVAL2 = %16.12f, %16.12f\n", xrval,yrval); + printf(" CRPIX1, CRPIX2 = %16.12f, %16.12f\n", xrpix,yrpix); + printf(" CDELT1, CDELT2 = %16.12f, %16.12f\n", xinc,yinc); + printf(" Rotation = %10.3f, CTYPE = %s\n", rot, ctype); + printf("Calculated sky coordinate with ffwldp status = %d\n",status); + printf(" Pixels (%8.4f,%8.4f) --> (%11.6f, %11.6f) Sky\n", + xpix,ypix,xpos,ypos); + ffxypx(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot,ctype, + &xpix, &ypix,&status); + printf("Calculated pixel coordinate with ffxypx status = %d\n",status); + printf(" Sky (%11.6f, %11.6f) --> (%8.4f,%8.4f) Pixels\n", + xpos,ypos,xpix,ypix); + /* + ###################################### + # append another ASCII table # + ###################################### + */ + + strcpy(tform[0], "A15"); + strcpy(tform[1], "I11"); + strcpy(tform[2], "F15.6"); + strcpy(tform[3], "E13.5"); + strcpy(tform[4], "D22.14"); + + strcpy(ttype[0], "Name"); + strcpy(ttype[1], "Ivalue"); + strcpy(ttype[2], "Fvalue"); + strcpy(ttype[3], "Evalue"); + strcpy(ttype[4], "Dvalue"); + + strcpy(tunit[0], ""); + strcpy(tunit[1], "m**2"); + strcpy(tunit[2], "cm"); + strcpy(tunit[3], "erg/s"); + strcpy(tunit[4], "km/s"); + + nrows = 11; + tfields = 5; + strcpy(tblname, "new_table"); + + ffcrtb(fptr, ASCII_TBL, nrows, tfields, ttype, tform, tunit, tblname, + &status); + printf("\nffcrtb status = %d\n", status); + + extvers = 5; + ffpkyj(fptr, "EXTVER", extvers, "extension version number", &status); + + ffpcl(fptr, TSTRING, 1, 1, 1, 3, onskey, &status); /* write string values */ + + /* initialize arrays of values to write */ + + for (ii = 0; ii < npixels; ii++) + { + boutarray[ii] = ii * 3; + ioutarray[ii] = ii * 3; + joutarray[ii] = ii * 3; + koutarray[ii] = ii * 3; + eoutarray[ii] = ii * 3; + doutarray[ii] = ii * 3; + } + + for (ii = 2; ii < 6; ii++) /* loop over cols 2 - 5 */ + { + ffpcl(fptr, TBYTE, ii, 1, 1, 2, boutarray, &status); + ffpcl(fptr, TSHORT, ii, 3, 1, 2, &ioutarray[2], &status); + ffpcl(fptr, TLONG, ii, 5, 1, 2, &joutarray[4], &status); + ffpcl(fptr, TFLOAT, ii, 7, 1, 2, &eoutarray[6], &status); + ffpcl(fptr, TDOUBLE, ii, 9, 1, 2, &doutarray[8], &status); + } + printf("ffpcl status = %d\n", status); + + /* read back the pixels with each datatype */ + ffgcv(fptr, TBYTE, 2, 1, 1, 10, &bnul, binarray, &anynull, &status); + ffgcv(fptr, TSHORT, 2, 1, 1, 10, &inul, iinarray, &anynull, &status); + ffgcv(fptr, TINT, 3, 1, 1, 10, &knul, kinarray, &anynull, &status); + ffgcv(fptr, TLONG, 3, 1, 1, 10, &jnul, jinarray, &anynull, &status); + ffgcv(fptr, TFLOAT, 4, 1, 1, 10, &enul, einarray, &anynull, &status); + ffgcv(fptr, TDOUBLE, 5, 1, 1, 10, &dnul, dinarray, &anynull, &status); + + printf("\nColumn values written with ffpcl and read with ffgcl:\n"); + npixels = 10; + for (ii = 0; ii < npixels; ii++) + printf(" %2d", binarray[ii]); + printf(" %d (byte)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2d", iinarray[ii]); + printf(" %d (short)\n", anynull); + + for (ii = 0; ii < npixels; ii++) + printf(" %2d", kinarray[ii]); + printf(" %d (int)\n", anynull); + + for (ii = 0; ii < npixels; ii++) + printf(" %2ld", jinarray[ii]); + printf(" %d (long)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", einarray[ii]); + printf(" %d (float)\n", anynull); + for (ii = 0; ii < npixels; ii++) + printf(" %2.0f", dinarray[ii]); + printf(" %d (double)\n", anynull); + + /* + ########################################################### + # perform stress test by cycling thru all the extensions # + ########################################################### + */ + printf("\nRepeatedly move to the 1st 4 HDUs of the file:\n"); + for (ii = 0; ii < 10; ii++) + { + ffmahd(fptr, 1, &hdutype, &status); + printf("%d", ffghdn(fptr, &hdunum)); + ffmrhd(fptr, 1, &hdutype, &status); + printf("%d", ffghdn(fptr, &hdunum)); + ffmrhd(fptr, 1, &hdutype, &status); + printf("%d", ffghdn(fptr, &hdunum)); + ffmrhd(fptr, 1, &hdutype, &status); + printf("%d", ffghdn(fptr, &hdunum)); + ffmrhd(fptr, -1, &hdutype, &status); + printf("%d", ffghdn(fptr, &hdunum)); + if (status > 0) + break; + } + printf("\n"); + + printf("Move to extensions by name and version number: (ffmnhd)\n"); + extvers = 1; + ffmnhd(fptr, ANY_HDU, binname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", binname, extvers, hdunum, status); + extvers = 3; + ffmnhd(fptr, ANY_HDU, binname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", binname, extvers, hdunum, status); + extvers = 4; + ffmnhd(fptr, ANY_HDU, binname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", binname, extvers, hdunum, status); + + + strcpy(tblname, "Test-ASCII"); + extvers = 2; + ffmnhd(fptr, ANY_HDU, tblname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", tblname, extvers, hdunum, status); + + strcpy(tblname, "new_table"); + extvers = 5; + ffmnhd(fptr, ANY_HDU, tblname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", tblname, extvers, hdunum, status); + extvers = 0; + ffmnhd(fptr, ANY_HDU, binname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d\n", binname, extvers, hdunum, status); + extvers = 17; + ffmnhd(fptr, ANY_HDU, binname, (int) extvers, &status); + ffghdn(fptr, &hdunum); + printf(" %s, %ld = hdu %d, %d", binname, extvers, hdunum, status); + printf (" (expect a 301 error status here)\n"); + status = 0; + + ffthdu(fptr, &hdunum, &status); + printf("Total number of HDUs in the file = %d\n", hdunum); + /* + ######################## + # checksum tests # + ######################## + */ + checksum = 1234567890; + ffesum(checksum, 0, asciisum); + printf("\nEncode checksum: %lu -> %s\n", checksum, asciisum); + checksum = 0; + ffdsum(asciisum, 0, &checksum); + printf("Decode checksum: %s -> %lu\n", asciisum, checksum); + + ffpcks(fptr, &status); + + /* + don't print the CHECKSUM value because it is different every day + because the current date is in the comment field. + + ffgcrd(fptr, "CHECKSUM", card, &status); + printf("%s\n", card); + */ + + ffgcrd(fptr, "DATASUM", card, &status); + printf("%.30s\n", card); + + ffgcks(fptr, &datsum, &checksum, &status); + printf("ffgcks data checksum, status = %lu, %d\n", + datsum, status); + + ffvcks(fptr, &datastatus, &hdustatus, &status); + printf("ffvcks datastatus, hdustatus, status = %d %d %d\n", + datastatus, hdustatus, status); + + ffprec(fptr, + "new_key = 'written by fxprec' / to change checksum", &status); + ffupck(fptr, &status); + printf("ffupck status = %d\n", status); + + ffgcrd(fptr, "DATASUM", card, &status); + printf("%.30s\n", card); + ffvcks(fptr, &datastatus, &hdustatus, &status); + printf("ffvcks datastatus, hdustatus, status = %d %d %d\n", + datastatus, hdustatus, status); + + /* + delete the checksum keywords, so that the FITS file is always + the same, regardless of the date of when testprog is run. + */ + + ffdkey(fptr, "CHECKSUM", &status); + ffdkey(fptr, "DATASUM", &status); + + /* + ############################ + # close file and quit # + ############################ + */ + + errstatus: /* jump here on error */ + + ffclos(fptr, &status); + printf("ffclos status = %d\n", status); + + printf("\nNormally, there should be 8 error messages on the stack\n"); + printf("all regarding 'numerical overflows':\n"); + + ffgmsg(errmsg); + nmsg = 0; + + while (errmsg[0]) + { + printf(" %s\n", errmsg); + nmsg++; + ffgmsg(errmsg); + } + + if (nmsg != 8) + printf("\nWARNING: Did not find the expected 8 error messages!\n"); + + ffgerr(status, errmsg); + printf("\nStatus = %d: %s\n", status, errmsg); + + /* free the allocated memory */ + for (ii = 0; ii < 21; ii++) + free(inskey[ii]); + for (ii = 0; ii < 10; ii++) + { + free(ttype[ii]); + free(tform[ii]); + free(tunit[ii]); + } + + return(0); +} + diff --git a/software/cfitsio3040/testprog.out b/software/cfitsio3040/testprog.out new file mode 100644 index 000000000..fecd05b69 --- /dev/null +++ b/software/cfitsio3040/testprog.out @@ -0,0 +1,797 @@ +CFITSIO TESTPROG, v3.040 + +Try opening then closing a nonexistent file: + ffopen fptr, status = 0 104 (expect an error) + ffclos status = 115 + +ffinit create new file status = 0 +Name of file = testprog.fit, I/O mode = 1 + +test writing of long string keywords: + 123456789012345678901234567890123456789012345678901234567890123456789012345 +'12345678901234567890123456789012345678901234567890123456789012345678' + 1234567890123456789012345678901234567890123456789012345678901234'6789012345 +'1234567890123456789012345678901234567890123456789012345678901234''67' + 1234567890123456789012345678901234567890123456789012345678901234''789012345 +'1234567890123456789012345678901234567890123456789012345678901234''''' + 1234567890123456789012345678901234567890123456789012345678901234567'9012345 +'1234567890123456789012345678901234567890123456789012345678901234567' +ffflus status = 0 +HDU number = 1 + +Values read back from primary array (99 = null pixel) +The 1st, and every 4th pixel should be undefined: + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 1 (ffgpvb) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 1 (ffgpvi) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 1 (ffgpvj) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 1 (ffgpve) + 99 2 3 99 5 6 7 99 9 10 11 99 13 14 15 99 17 18 19 99 1 (ffgpvd) + * 2 3 * 5 6 7 * 9 10 11 * 13 14 15 * 17 18 19 * 1 (ffgpfb) + * 2 3 * 5 6 7 * 9 10 11 * 13 14 15 * 17 18 19 * 1 (ffgpfi) + * 2 3 * 5 6 7 * 9 10 11 * 13 14 15 * 17 18 19 * 1 (ffgpfj) + * 2 3 * 5 6 7 * 9 10 11 * 13 14 15 * 17 18 19 * 1 (ffgpfe) + * 2 3 * 5 6 7 * 9 10 11 * 13 14 15 * 17 18 19 * 1 (ffgpfd) + +Closed then reopened the FITS file 10 times. +HDU number = 1 +Name of file = testprog.fit, I/O mode = 1 + +Read back keywords: +simple = 1, bitpix = 32, naxis = 2, naxes = (10, 2) + pcount = 0, gcount = 1, extend = 1 +KEY_PREC= 'This keyword was written by fxprec' / comment goes here +KEY_PREC : 'This keyword was written by fxprec' : comment goes here : +KEY_PREC= 'This keyword was written by fxprec' / comment goes here +KY_PKNS1 : 'first string' : fxpkns comment : +KEY_PKYS value_string fxpkys comment 0 +KEY_PKYL 1 fxpkyl comment 0 +KEY_PKYJ 11 fxpkyj comment 0 +KEY_PKYJ 11.000000 fxpkyj comment 0 +KEY_PKYJ 11.000000 fxpkyj comment 0 +KEY_PKY S value_string fxpkys comment 0 +KEY_PKY L 1 fxpkyl comment 0 +KEY_PKY BYTE 11 fxpkyj comment 0 +KEY_PKY SHORT 11 fxpkyj comment 0 +KEY_PKY INT 11 fxpkyj comment 0 +KEY_PKY J 11 fxpkyj comment 0 +KEY_PKY E 13.131310 fxpkye comment 0 +KEY_PKY D 15.151515 fxpkyd comment 0 +KEY_PKYF 12.121210 fxpkyf comment 0 +KEY_PKYE 13.131310 fxpkye comment 0 +KEY_PKYG 14.14141414141414 fxpkyg comment 0 +KEY_PKYD 15.15151515151520 fxpkyd comment 0 +KEY_PKYC 13.131310 14.141410 fxpkyc comment 0 +KEY_PKFC 13.131313 14.141414 fxpkfc comment 0 +KEY_PKYM 15.151515 16.161616 fxpkym comment 0 +KEY_PKFM 15.151515 16.161616 fxpkfm comment 0 +KEY_PKYT 12345678 0.12345678901235 fxpkyt comment 0 +KEY_PKY J 11 [km/s/Mpc] fxpkyj comment 0 +KEY_PKY units = km/s/Mpc +KEY_PKY J 11 fxpkyj comment 0 +KEY_PKY units = +KEY_PKY J 11 [feet/second/second] fxpkyj comment 0 +KEY_PKY units = feet/second/second +KEY_PKLS long string value = +This is a very long string value that is continued over more than one keyword. +header contains 65 keywords; located at keyword 27 +ffgkns: first string, second string, +ffgknl: 1, 0, 1 +ffgknj: 11, 12, 13 +ffgkne: 13.131310, 14.141410, 15.151520 +ffgknd: 15.151515, 16.161616, 17.171717 + +Before deleting the HISTORY and DATE keywords... +COMMENT +HISTORY +DATE +KY_PKNS1 + +After deleting the keywords... +COMMENT This keyword was written by fxpcom. +KY_PKNS1= 'first string' / fxpkns comment + +After inserting the keywords... +COMMENT This keyword was written by fxpcom. +KY_IREC = 'This keyword inserted by fxirec' +KY_IKYS = 'insert_value_string' / ikys comment +KY_IKYJ = 49 / ikyj comment +KY_IKYL = T / ikyl comment +KY_IKYE = 1.2346E+01 / ikye comment +KY_IKYD = 1.23456789012346E+01 / ikyd comment +KY_IKYF = 12.3456 / ikyf comment +KY_IKYG = 12.3456789012346 / ikyg comment +KY_PKNS1= 'first string' / fxpkns comment + +After modifying the keywords... +COMMENT This keyword was modified by fxmrec +KY_MREC = 'This keyword was modified by fxmcrd' +NEWIKYS = 'modified_string' / ikys comment +KY_IKYJ = 50 / This is a modified comment +KY_IKYL = F / ikyl comment +KY_IKYE = -1.2346E+01 / ikye comment +KY_IKYD = -1.23456789012346E+01 / modified comment +KY_IKYF = -12.3456 / ikyf comment +KY_IKYG = -12.3456789012346 / ikyg comment +KY_PKNS1= 'first string' / fxpkns comment + +After updating the keywords... +COMMENT This keyword was modified by fxmrec +KY_UCRD = 'This keyword was updated by fxucrd' +NEWIKYS = 'updated_string' / ikys comment +KY_IKYJ = 51 / This is a modified comment +KY_IKYL = T / ikyl comment +KY_IKYE = -1.3346E+01 / ikye comment +KY_IKYD = -1.33456789012346E+01 / modified comment +KY_IKYF = -13.3456 / ikyf comment +KY_IKYG = -13.3456789012346 / ikyg comment +KY_PKNS1= 'first string' / fxpkns comment + +Keywords found using wildcard search (should be 13)... +KEY_PKYS= 'value_string' / fxpkys comment +KEY_PKYL= T / fxpkyl comment +KEY_PKYJ= 11 / [feet/second/second] fxpkyj comment +KEY_PKYF= 12.12121 / fxpkyf comment +KEY_PKYE= 1.313131E+01 / fxpkye comment +KEY_PKYG= 14.14141414141414 / fxpkyg comment +KEY_PKYD= 1.51515151515152E+01 / fxpkyd comment +KEY_PKYC= (1.313131E+01, 1.414141E+01) / fxpkyc comment +KEY_PKYM= (1.51515151515152E+01, 1.61616161616162E+01) / fxpkym comment +KEY_PKFC= (13.131313, 14.141414) / fxpkfc comment +KEY_PKFM= (15.15151515151515, 16.16161616161616) / fxpkfm comment +KEY_PKYT= 12345678.1234567890123456 / fxpkyt comment +NEWIKYS = 'updated_string' / ikys comment + +Copied keyword: ffgkne: 14.141410, 15.151520, 13.131310 +Updated header using template file (ffpktp) + +ffibin status = 0 +HDU number = 2 +header contains 33 keywords; located at keyword 1 +header contains 33 keywords with room for 74 more +TDIM3 = (1,2,8), 3, 1, 2, 8 +ffpcl_ status = 0 + +Find the column numbers; a returned status value of 237 is +expected and indicates that more than one column name matches +the input column name template. Status = 219 indicates that +there was no matching column name. +Column Xvalue is number 3; status = 0. +Column Avalue is number 1; status = 237. +Column Lvalue is number 2; status = 237. +Column Xvalue is number 3; status = 237. +Column Bvalue is number 4; status = 237. +Column Ivalue is number 5; status = 237. +Column Jvalue is number 6; status = 237. +Column Evalue is number 7; status = 237. +Column Dvalue is number 8; status = 237. +Column Cvalue is number 9; status = 237. +Column Mvalue is number 10; status = 237. +Column is number 0; status = 219. + +Information about each column: + 15A 16 15 15 Avalue, , A, 15, 1.000000, 0.000000, 1234554321, . + 1L 14 1 1 Lvalue, m**2, L, 1, 1.000000, 0.000000, 1234554321, . + 16X 1 16 1 Xvalue, cm, X, 16, 1.000000, 0.000000, 1234554321, . + 1B 11 1 1 Bvalue, erg/s, B, 1, 1.000000, 0.000000, 99, . + 1I 21 1 2 Ivalue, km/s, I, 1, 1.000000, 0.000000, 99, . + 1J 41 1 4 Jvalue, , J, 1, 1.000000, 0.000000, 99, . + 1E 42 1 4 Evalue, , E, 1, 1.000000, 0.000000, 1234554321, . + 1D 82 1 8 Dvalue, , D, 1, 1.000000, 0.000000, 1234554321, . + 1C 83 1 8 Cvalue, , C, 1, 1.000000, 0.000000, 1234554321, . + 1M 163 1 16 Mvalue, , M, 1, 1.000000, 0.000000, 1234554321, . + +ffitab status = 0 +HDU number = 2 +ffpcl_ status = 0 + +ASCII table: rowlen, nrows, tfields, extname: 76 11 5 Test-ASCII + Name 1 A15 + Ivalue 17 I10 m**2 + Fvalue 28 F14.6 cm + Evalue 43 E12.5 erg/s + Dvalue 56 D21.14 km/s + +Data values read from ASCII table: + first string 1 1 1 1.0 1.0 + second string 2 2 2 2.0 2.0 + 3 3 3 3.0 3.0 + UNDEFINED 4 4 4 4.0 4.0 + 5 5 5 5.0 5.0 + 6 6 6 6.0 6.0 + 7 7 7 7.0 7.0 + 8 8 8 8.0 8.0 + 9 9 9 9.0 9.0 + 10 10 10 10.0 10.0 + 99 99 99 99.0 99.0 + + 1 1.000000 1.00000E+00 1.00000000000000E+00second string + +Column name is number 1; status = 0. +Column Ivalue is number 2; status = 237. +Column Fvalue is number 3; status = 237. +Column Evalue is number 4; status = 237. +Column Dvalue is number 5; status = 237. +Column is number 0; status = 219. + A15 16 1 15 Name, 1, , A15, 1.000000, 0.000000, null1, . + I10 41 1 10 Ivalue, 17, m**2, I10, 1.000000, 0.000000, null2, . +F14.6 82 1 14 Fvalue, 28, cm, F14.6, 1.000000, 0.000000, null3, . +E12.5 42 1 12 Evalue, 43, erg/s, E12.5, 1.000000, 0.000000, null4, . +D21.14 82 1 21 Dvalue, 56, km/s, D21.14, 1.000000, 0.000000, null5, . + + +Data values after inserting 3 rows after row 2: + first string 1 1 1 1.0 1.0 + second string 2 2 2 2.0 2.0 + 0 0 0 0.0 0.0 + 0 0 0 0.0 0.0 + 0 0 0 0.0 0.0 + 3 3 3 3.0 3.0 + UNDEFINED 4 4 4 4.0 4.0 + 5 5 5 5.0 5.0 + 6 6 6 6.0 6.0 + 7 7 7 7.0 7.0 + 8 8 8 8.0 8.0 + 9 9 9 9.0 9.0 + 10 10 10 10.0 10.0 + 99 99 99 99.0 99.0 + +Data values after deleting 2 rows at row 10: + first string 1 1 1 1.0 1.0 + second string 2 2 2 2.0 2.0 + 0 0 0 0.0 0.0 + 0 0 0 0.0 0.0 + 0 0 0 0.0 0.0 + 3 3 3 3.0 3.0 + UNDEFINED 4 4 4 4.0 4.0 + 5 5 5 5.0 5.0 + 6 6 6 6.0 6.0 + 9 9 9 9.0 9.0 + 10 10 10 10.0 10.0 + 99 99 99 99.0 99.0 + +Data values after deleting column 3: + first string 1 1 1.0 1.0 + second string 2 2 2.0 2.0 + 0 0 0.0 0.0 + 0 0 0.0 0.0 + 0 0 0.0 0.0 + 3 3 3.0 3.0 + UNDEFINED 4 4 4.0 4.0 + 5 5 5.0 5.0 + 6 6 6.0 6.0 + 9 9 9.0 9.0 + 10 10 10.0 10.0 + 99 99 99.0 99.0 + +Data values after inserting column 5: + first string 1 1 1.0 1.0 0 + second string 2 2 2.0 2.0 0 + 0 0 0.0 0.0 0 + 0 0 0.0 0.0 0 + 0 0 0.0 0.0 0 + 3 3 3.0 3.0 0 + UNDEFINED 4 4 4.0 4.0 0 + 5 5 5.0 5.0 0 + 6 6 6.0 6.0 0 + 9 9 9.0 9.0 0 + 10 10 10.0 10.0 0 + 99 99 99.0 99.0 0 +Create temporary file: ffinit status = 0 + +Create null primary array: ffiimg status = 0 + +Create ASCII table with 0 columns: ffitab status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 + +Create Binary table with 0 columns: ffibin status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +Delete the tmp file: ffdelt status = 0 +HDU number = 3 +header contains 38 keywords with room for 69 more + +Binary table: nrows, tfields, extname, pcount: 21 10 Test-BINTABLE 0 + Avalue 15A + Lvalue 1L m**2 + Xvalue 16X cm + Bvalue 1B erg/s + Ivalue 1I km/s + Jvalue 1J + Evalue 1E + Dvalue 1D + Cvalue 1C + Mvalue 1M + +Data values read from binary table: + Bit column (X) data values: + +01001100 01110000 11110000 01111100 00000000 + +null string column value = -- (should be --) + +Read columns with ffgcv_: + first string 0 76 1 1 1 1.0 1.0 ( 1.0, -2.0) ( 1.0, -2.0) + second string 1 112 2 2 2 2.0 2.0 ( 3.0, -4.0) ( 3.0, -4.0) + 0 240 3 3 3 3.0 3.0 ( 5.0, -6.0) ( 5.0, -6.0) + NOT DEFINED 0 124 0 -4 -4 -4.0 -4.0 ( 7.0, -8.0) ( 7.0, -8.0) + NOT DEFINED 1 0 5 5 5 5.0 5.0 ( 9.0,-10.0) ( 9.0,-10.0) + NOT DEFINED 1 0 0 -6 -6 -6.0 -6.0 ( 11.0,-12.0) ( 11.0,-12.0) + NOT DEFINED 0 0 7 7 7 7.0 7.0 ( 13.0,-14.0) ( 13.0,-14.0) + NOT DEFINED 0 0 0 -8 -8 -8.0 -8.0 ( 15.0,-16.0) ( 15.0,-16.0) + NOT DEFINED 0 0 9 9 9 9.0 9.0 ( 17.0,-18.0) ( 17.0,-18.0) + NOT DEFINED 1 0 0 -10 -10 -10.0 -10.0 ( 19.0,-20.0) ( 19.0,-20.0) + NOT DEFINED 0 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 1 0 12 12 12 12.0 12.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 0 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 0 0 0 -14 -14 -14.0 -14.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 0 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 0 0 0 -16 -16 -16.0 -16.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 1 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 1 0 0 -18 -18 -18.0 -18.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 1 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 1 0 0 -20 -20 -20.0 -20.0 ( 0.0, 0.0) ( 0.0, 0.0) + NOT DEFINED 0 0 98 98 98 98.0 98.0 ( 0.0, 0.0) ( 0.0, 0.0) + +Read columns with ffgcf_: + first string 0 76 1 1 1 1.0 1.0 ( 1.0, -2.0) ( 1.0, -2.0) + second string 1 112 2 2 2 2.0 2.0 ( 3.0, -4.0) ( 3.0, -4.0) + 0 240 3 3 3 3.0 3.0 ( 5.0, -6.0) ( 5.0, -6.0) + 0 124 0 -4 -4 -4.0 -4.0 ( 7.0, -8.0) ( 7.0, -8.0) + 1 0 5 5 5 5.0 5.0 ( 9.0,-10.0) ( 9.0,-10.0) + 1 0 0 -6 -6 -6.0 -6.0 ( 11.0,-12.0) ( 11.0,-12.0) + 0 0 7 7 7 7.0 7.0 ( 13.0,-14.0) ( 13.0,-14.0) + 0 0 0 -8 -8 -8.0 -8.0 ( 15.0,-16.0) ( 15.0,-16.0) + 0 0 9 9 9 9.0 9.0 ( 17.0,-18.0) ( 17.0,-18.0) + 1 0 0 -10 -10 -10.0 -10.0 ( 19.0,-20.0) ( 19.0,-20.0) + 0 0 99 99 + 1 0 12 12 + 0 0 99 99 + 0 0 0 -14 + 0 0 99 99 + 0 0 0 -16 + 1 0 99 99 + 1 0 0 -18 + 1 0 99 99 + 1 0 0 -20 + 0 0 99 99 + +Data values after inserting 3 rows after row 2: + first string 1 1 1 1.0 1.0 + second string 2 2 2 2.0 2.0 + NOT DEFINED 0 0 0 0.0 0.0 + NOT DEFINED 0 0 0 0.0 0.0 + NOT DEFINED 0 0 0 0.0 0.0 + 3 3 3 3.0 3.0 + NOT DEFINED 0 -4 -4 -4.0 -4.0 + NOT DEFINED 5 5 5 5.0 5.0 + NOT DEFINED 0 -6 -6 -6.0 -6.0 + NOT DEFINED 7 7 7 7.0 7.0 + NOT DEFINED 0 -8 -8 -8.0 -8.0 + NOT DEFINED 9 9 9 9.0 9.0 + NOT DEFINED 0 -10 -10 -10.0 -10.0 + NOT DEFINED 98 98 98 98.0 98.0 + +Data values after deleting 2 rows at row 10: + first string 1 1 1 1.0 1.0 + second string 2 2 2 2.0 2.0 + NOT DEFINED 0 0 0 0.0 0.0 + NOT DEFINED 0 0 0 0.0 0.0 + NOT DEFINED 0 0 0 0.0 0.0 + 3 3 3 3.0 3.0 + NOT DEFINED 0 -4 -4 -4.0 -4.0 + NOT DEFINED 5 5 5 5.0 5.0 + NOT DEFINED 0 -6 -6 -6.0 -6.0 + NOT DEFINED 9 9 9 9.0 9.0 + NOT DEFINED 0 -10 -10 -10.0 -10.0 + NOT DEFINED 98 98 98 98.0 98.0 + +Data values after deleting column 6: + first string 1 1 1.0 1.0 + second string 2 2 2.0 2.0 + NOT DEFINED 0 0 0.0 0.0 + NOT DEFINED 0 0 0.0 0.0 + NOT DEFINED 0 0 0.0 0.0 + 3 3 3.0 3.0 + NOT DEFINED 0 -4 -4.0 -4.0 + NOT DEFINED 5 5 5.0 5.0 + NOT DEFINED 0 -6 -6.0 -6.0 + NOT DEFINED 9 9 9.0 9.0 + NOT DEFINED 0 -10 -10.0 -10.0 + NOT DEFINED 98 98 98.0 98.0 + +Data values after inserting column 8: + first string 1 1 1.0 1.0 0 + second string 2 2 2.0 2.0 0 + NOT DEFINED 0 0 0.0 0.0 0 + NOT DEFINED 0 0 0.0 0.0 0 + NOT DEFINED 0 0 0.0 0.0 0 + 3 3 3.0 3.0 0 + NOT DEFINED 0 -4 -4.0 -4.0 0 + NOT DEFINED 5 5 5.0 5.0 0 + NOT DEFINED 0 -6 -6.0 -6.0 0 + NOT DEFINED 9 9 9.0 9.0 0 + NOT DEFINED 0 -10 -10.0 -10.0 0 + NOT DEFINED 98 98 98.0 98.0 0 + +Values after setting 1st 10 elements in column 8 = null: + first string 1 1 1.0 1.0 98 + second string 2 2 2.0 2.0 98 + NOT DEFINED 0 0 0.0 0.0 98 + NOT DEFINED 0 0 0.0 0.0 98 + NOT DEFINED 0 0 0.0 0.0 98 + 3 3 3.0 3.0 98 + NOT DEFINED 0 -4 -4.0 -4.0 98 + NOT DEFINED 5 5 5.0 5.0 98 + NOT DEFINED 0 -6 -6.0 -6.0 98 + NOT DEFINED 9 9 9.0 9.0 98 + NOT DEFINED 0 -10 -10.0 -10.0 0 + NOT DEFINED 98 98 98.0 98.0 0 +Create temporary file: ffinit status = 0 + +Create null primary array: ffiimg status = 0 + +Create binary table with 0 columns: ffibin status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +copy column, ffcpcl status = 0 +Delete the tmp file: ffdelt status = 0 +ffibin status = 0 +HDU number = 2 + 0 1000 10000 33000 66000 -999 + 0 1000 10000 32768 65535 -999 + 0 1000 10000 32800 65500 -999 + + 0 1 10 33 66 -999 + -32768 -31768 -22768 0 32767 -999 + -1 9 99 327 654 -999 + +Create image extension: ffiimg status = 0 +HDU number = 3 + +Wrote whole 2D array: ffp2di status = 0 + +Read whole 2D array: ffg2di status = 0 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 0 0 0 + 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 0 0 0 + 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 0 0 0 0 + 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 0 0 0 0 + 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 0 0 0 0 + 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 0 0 0 0 + 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 0 0 0 0 + 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 0 0 0 0 + 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 0 0 0 0 + 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 0 0 0 0 + 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 0 0 0 0 + 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 0 0 0 0 + 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 0 0 0 0 + 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 0 0 0 0 + 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 0 0 0 0 + 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 0 0 0 0 + 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 0 0 0 0 + 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 0 0 0 0 + 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 0 0 0 0 + 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 0 0 0 0 + 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 0 0 0 0 + 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 0 0 0 0 + 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 0 0 0 0 + 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 0 0 0 0 + 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + +Wrote subset 2D array: ffpssi status = 0 + +Read whole 2D array: ffg2di status = 0 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 0 0 0 + 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 0 0 0 + 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 0 0 0 0 + 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 0 0 0 0 + 40 41 42 43 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 54 0 0 0 0 + 50 51 52 53 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 64 0 0 0 0 + 60 61 62 63 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 74 0 0 0 0 + 70 71 72 73 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 84 0 0 0 0 + 80 81 82 83 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 94 0 0 0 0 + 90 91 92 93 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 104 0 0 0 0 + 100 101 102 103 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 114 0 0 0 0 + 110 111 112 113 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 124 0 0 0 0 + 120 121 122 123 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 134 0 0 0 0 + 130 131 132 133 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 144 0 0 0 0 + 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 0 0 0 0 + 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 0 0 0 0 + 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 0 0 0 0 + 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 0 0 0 0 + 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 0 0 0 0 + 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 0 0 0 0 + 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 0 0 0 0 + 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 0 0 0 0 + 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 0 0 0 0 + 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 0 0 0 0 + 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + +Read subset of 2D array: ffgsvi status = 0 + 41 43 -1 -3 -5 71 73 -31 -33 -35 + +Create image extension: ffiimg status = 0 +HDU number = 4 +Create temporary file: ffinit status = 0 +Copy image extension to primary array of tmp file. +ffcopy status = 0 +SIMPLE = T / file does conform to FITS standard +BITPIX = 16 / number of bits per data pixel +NAXIS = 2 / number of data axes +NAXIS1 = 15 / length of data axis 1 +NAXIS2 = 25 / length of data axis 2 +EXTEND = T / FITS dataset may contain extensions +Delete the tmp file: ffdelt status = 0 +Delete the image extension; hdutype, status = 1 0 +HDU number = 4 +ffcrhd status = 0 +Variable length arrays: ffphbn status = 0 +ffpcl_ status = 0 +PCOUNT = 4446 +HDU number = 6 +A 0 +L 0 0 +X 0 0 +B 1 0 +I 1 0 +J 1 0 +E 1 0 +D 1 0 +Column 8 repeat and offset = 1 14 +A ab 0 +L 0 1 0 +X 0 1 0 +B 99 2 0 +I 99 2 0 +J 99 2 0 +E 99 2 0 +D 99 2 0 +Column 8 repeat and offset = 2 49 +A abc 0 +L 0 0 0 0 +X 0 1 0 0 +B 1 99 3 0 +I 1 99 3 0 +J 1 99 3 0 +E 1 99 3 0 +D 1 99 3 0 +Column 8 repeat and offset = 3 105 +A abcd 0 +L 0 1 0 0 0 +X 0 1 0 0 0 +B 1 2 99 4 0 +I 1 2 99 4 0 +J 1 2 99 4 0 +E 1 2 99 4 0 +D 1 2 99 4 0 +Column 8 repeat and offset = 4 182 +A abcde 0 +L 0 1 0 0 1 0 +X 0 1 0 0 1 0 +B 1 2 3 99 5 0 +I 1 2 3 99 5 0 +J 1 2 3 99 5 0 +E 1 2 3 99 5 0 +D 1 2 3 99 5 0 +Column 8 repeat and offset = 5 280 +A abcdef 0 +L 0 1 0 0 0 1 0 +X 0 1 0 0 1 1 0 +B 1 2 3 4 99 6 0 +I 1 2 3 4 99 6 0 +J 1 2 3 4 99 6 0 +E 1 2 3 4 99 6 0 +D 1 2 3 4 99 6 0 +Column 8 repeat and offset = 6 399 +A abcdefg 0 +L 0 1 0 0 1 0 0 0 +X 0 1 0 0 1 1 0 0 +B 1 2 3 4 5 99 7 0 +I 1 2 3 4 5 99 7 0 +J 1 2 3 4 5 99 7 0 +E 1 2 3 4 5 99 7 0 +D 1 2 3 4 5 99 7 0 +Column 8 repeat and offset = 7 539 +A abcdefgh 0 +L 0 1 0 0 1 1 0 0 0 +X 0 1 0 0 1 1 0 0 0 +B 1 2 3 4 5 6 99 8 0 +I 1 2 3 4 5 6 99 8 0 +J 1 2 3 4 5 6 99 8 0 +E 1 2 3 4 5 6 99 8 0 +D 1 2 3 4 5 6 99 8 0 +Column 8 repeat and offset = 8 700 +A abcdefghi 0 +L 0 1 0 0 1 1 0 0 0 0 +X 0 1 0 0 1 1 0 0 0 0 +B 1 2 3 4 5 6 7 99 9 0 +I 1 2 3 4 5 6 7 99 9 0 +J 1 2 3 4 5 6 7 99 9 0 +E 1 2 3 4 5 6 7 99 9 0 +D 1 2 3 4 5 6 7 99 9 0 +Column 8 repeat and offset = 9 883 +A abcdefghij 0 +L 0 1 0 0 1 1 0 0 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 0 +B 1 2 3 4 5 6 7 8 99 10 0 +I 1 2 3 4 5 6 7 8 99 10 0 +J 1 2 3 4 5 6 7 8 99 10 0 +E 1 2 3 4 5 6 7 8 99 10 0 +D 1 2 3 4 5 6 7 8 99 10 0 +Column 8 repeat and offset = 10 1087 +A abcdefghijk 0 +L 0 1 0 0 1 1 0 0 0 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 0 +B 1 2 3 4 5 6 7 8 9 99 11 0 +I 1 2 3 4 5 6 7 8 9 99 11 0 +J 1 2 3 4 5 6 7 8 9 99 11 0 +E 1 2 3 4 5 6 7 8 9 99 11 0 +D 1 2 3 4 5 6 7 8 9 99 11 0 +Column 8 repeat and offset = 11 1312 +A abcdefghijkl 0 +L 0 1 0 0 1 1 0 0 0 1 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 +B 1 2 3 4 5 6 7 8 9 10 99 12 0 +I 1 2 3 4 5 6 7 8 9 10 99 12 0 +J 1 2 3 4 5 6 7 8 9 10 99 12 0 +E 1 2 3 4 5 6 7 8 9 10 99 12 0 +D 1 2 3 4 5 6 7 8 9 10 99 12 0 +Column 8 repeat and offset = 12 1558 +A abcdefghijklm 0 +L 0 1 0 0 1 1 0 0 0 1 1 0 0 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 +B 1 2 3 4 5 6 7 8 9 10 11 99 13 0 +I 1 2 3 4 5 6 7 8 9 10 11 99 13 0 +J 1 2 3 4 5 6 7 8 9 10 11 99 13 0 +E 1 2 3 4 5 6 7 8 9 10 11 99 13 0 +D 1 2 3 4 5 6 7 8 9 10 11 99 13 0 +Column 8 repeat and offset = 13 1825 +A abcdefghijklmn 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 99 14 0 +Column 8 repeat and offset = 14 2113 +A abcdefghijklmno 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 99 15 0 +Column 8 repeat and offset = 15 2422 +A abcdefghijklmnop 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 16 0 +Column 8 repeat and offset = 16 2752 +A abcdefghijklmnopq 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 99 17 0 +Column 8 repeat and offset = 17 3104 +A abcdefghijklmnopqr 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 99 18 0 +Column 8 repeat and offset = 18 3477 +A abcdefghijklmnopqrs 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 99 19 0 +Column 8 repeat and offset = 19 3871 +A abcdefghijklmnopqrst 0 +L 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 +X 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 +B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 +I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 +J 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 +E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 +D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 99 20 0 +Column 8 repeat and offset = 20 4286 + +ffcrim status = 0 +ffppr status = 0 + +Image values written with ffppr and read with ffgpv: + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (byte) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (short) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (int) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (long) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (float) + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0 (double) + +Wrote WCS keywords status = 0 +Read WCS keywords with ffgics status = 0 + CRVAL1, CRVAL2 = 45.830000000000, 63.570000000000 + CRPIX1, CRPIX2 = 256.000000000000, 257.000000000000 + CDELT1, CDELT2 = -0.002777770000, 0.002777770000 + Rotation = 0.000, CTYPE = -TAN +Calculated sky coordinate with ffwldp status = 0 + Pixels ( 0.5000, 0.5000) --> ( 47.385204, 62.848968) Sky +Calculated pixel coordinate with ffxypx status = 0 + Sky ( 47.385204, 62.848968) --> ( 0.5000, 0.5000) Pixels + +ffcrtb status = 0 +ffpcl status = 0 + +Column values written with ffpcl and read with ffgcl: + 0 3 6 9 12 15 18 21 24 27 0 (byte) + 0 3 6 9 12 15 18 21 24 27 0 (short) + 0 3 6 9 12 15 18 21 24 27 0 (int) + 0 3 6 9 12 15 18 21 24 27 0 (long) + 0 3 6 9 12 15 18 21 24 27 0 (float) + 0 3 6 9 12 15 18 21 24 27 0 (double) + +Repeatedly move to the 1st 4 HDUs of the file: +12343123431234312343123431234312343123431234312343 +Move to extensions by name and version number: (ffmnhd) + Test-BINTABLE, 1 = hdu 5, 0 + Test-BINTABLE, 3 = hdu 2, 0 + Test-BINTABLE, 4 = hdu 6, 0 + Test-ASCII, 2 = hdu 4, 0 + new_table, 5 = hdu 8, 0 + Test-BINTABLE, 0 = hdu 2, 0 + Test-BINTABLE, 17 = hdu 2, 301 (expect a 301 error status here) +Total number of HDUs in the file = 8 + +Encode checksum: 1234567890 -> dCW2fBU0dBU0dBU0 +Decode checksum: dCW2fBU0dBU0dBU0 -> 1234567890 +DATASUM = '475248536' +ffgcks data checksum, status = 475248536, 0 +ffvcks datastatus, hdustatus, status = 1 1 0 +ffupck status = 0 +DATASUM = '475248536' +ffvcks datastatus, hdustatus, status = 1 1 0 +ffclos status = 0 + +Normally, there should be 8 error messages on the stack +all regarding 'numerical overflows': + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + Numerical overflow during type conversion while writing FITS data. + +Status = 0: OK - no error diff --git a/software/cfitsio3040/testprog.std b/software/cfitsio3040/testprog.std new file mode 100644 index 000000000..c1a2db5fc --- /dev/null +++ b/software/cfitsio3040/testprog.std @@ -0,0 +1,48 @@ +SIMPLE = T / file does conform to FITS standard BITPIX = 32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 10 / length of data axis 1 NAXIS2 = 2 / length of data axis 2 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H KEY_PREC= 'This keyword was written by fxprec' / comment goes here CARD1 = '12345678901234567890123456789012345678901234567890123456789012345678'CARD2 = '1234567890123456789012345678901234567890123456789012345678901234''67'CARD3 = '1234567890123456789012345678901234567890123456789012345678901234'''''CARD4 = '1234567890123456789012345678901234567890123456789012345678901234567' KEY_PKYS= 'value_string' / fxpkys comment KEY_PKYL= T / fxpkyl comment KEY_PKYJ= 11 / [feet/second/second] fxpkyj comment KEY_PKYF= 12.12121 / fxpkyf comment KEY_PKYE= 1.313131E+01 / fxpkye comment KEY_PKYG= 14.14141414141414 / fxpkyg comment KEY_PKYD= 1.51515151515152E+01 / fxpkyd comment KEY_PKYC= (1.313131E+01, 1.414141E+01) / fxpkyc comment KEY_PKYM= (1.51515151515152E+01, 1.61616161616162E+01) / fxpkym comment KEY_PKFC= (13.131313, 14.141414) / fxpkfc comment KEY_PKFM= (15.15151515151515, 16.16161616161616) / fxpkfm comment KEY_PKLS= 'This is a very long string value that is continued over more than o&'CONTINUE 'ne keyword.' / fxpkls comment LONGSTRN= 'OGIP 1.0' / The HEASARC Long String Convention may be used.COMMENT This FITS file may contain long string keyword values that are COMMENT continued over multiple keywords. The HEASARC convention uses the & COMMENT character at the end of each substring which is then continued COMMENT on the next keyword which has the name CONTINUE. KEY_PKYT= 12345678.1234567890123456 / fxpkyt comment COMMENT This keyword was modified by fxmrec KY_UCRD = 'This keyword was updated by fxucrd' NEWIKYS = 'updated_string' / ikys comment KY_IKYJ = 51 / This is a modified comment KY_IKYL = T / ikyl comment KY_IKYE = -1.3346E+01 / ikye comment KY_IKYD = -1.33456789012346E+01 / modified comment KY_IKYF = -13.3456 / ikyf comment KY_IKYG = -13.3456789012346 / ikyg comment KY_PKNS1= 'first string' / fxpkns comment KY_PKNS2= 'second string' / fxpkns comment KY_PKNS3= ' ' / fxpkns comment KY_PKNL1= T / fxpknl comment KY_PKNL2= F / fxpknl comment KY_PKNL3= T / fxpknl comment KY_PKNJ1= 11 / fxpknj comment KY_PKNJ2= 12 / fxpknj comment KY_PKNJ3= 13 / fxpknj comment KY_PKNF1= 12.12121 / fxpknf comment KY_PKNF2= 13.13131 / fxpknf comment KY_PKNF3= 14.14141 / fxpknf comment KY_PKNE1= 1.313131E+01 / fxpkne comment KY_PKNE2= 1.414141E+01 / fxpkne comment KY_PKNE3= 1.515152E+01 / fxpkne comment KY_PKNG1= 14.1414141414141 / fxpkng comment KY_PKNG2= 15.1515151515152 / fxpkng comment KY_PKNG3= 16.1616161616162 / fxpkng comment KY_PKND1= 1.51515151515152E+01 / fxpknd comment KY_PKND2= 1.61616161616162E+01 / fxpknd comment KY_PKND3= 1.71717171717172E+01 / fxpknd comment TSTRING = '1 ' / tstring comment TLOGICAL= T / tlogical comment TBYTE = 11 / tbyte comment TSHORT = 21 / tshort comment TINT = 31 / tint comment TLONG = 41 / tlong comment TFLOAT = 42. / tfloat comment TDOUBLE = 82. / tdouble comment BLANK = -99 / value to use for undefined pixels KY_PKNE4= 1.313131E+01 / fxpkne comment TMPCARDA= 1001 / this is the 1st template card TMPCARD2= 'ABCD ' / this is the 2nd template card TMPCARD3= 1001.23 / this is the 3rd template card COMMENT this is the 5th template card HISTORY this is the 6th template card TMPCARD7= / comment for null keyword END ������������ + ���� ��������XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 61 / width of table in bytes NAXIS2 = 20 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 10 / number of fields in each row TTYPE1 = 'Avalue ' / label for field 1 TFORM1 = '15A ' / data format of field: ASCII Character TTYPE2 = 'Lvalue ' / label for field 2 TFORM2 = '1L ' / data format of field: 1-byte LOGICAL TUNIT2 = 'm**2 ' / physical unit of field TTYPE3 = 'Xvalue ' / label for field 3 TFORM3 = '16X ' / data format of field: BIT TUNIT3 = 'cm ' / physical unit of field TTYPE4 = 'Bvalue ' / label for field 4 TFORM4 = '1B ' / data format of field: BYTE TUNIT4 = 'erg/s ' / physical unit of field TTYPE5 = 'Ivalue ' / label for field 5 TFORM5 = '1I ' / data format of field: 2-byte INTEGER TUNIT5 = 'km/s ' / physical unit of field TTYPE6 = 'Jvalue ' / label for field 6 TFORM6 = '1J ' / data format of field: 4-byte INTEGER TTYPE7 = 'Evalue ' / label for field 7 TFORM7 = '1E ' / data format of field: 4-byte REAL TTYPE8 = 'Dvalue ' / label for field 8 TFORM8 = '1D ' / data format of field: 8-byte DOUBLE TTYPE9 = 'Cvalue ' / label for field 9 TFORM9 = '1C ' / data format of field: COMPLEX TTYPE10 = 'Mvalue ' / label for field 10 TFORM10 = '1M ' / data format of field: DOUBLE COMPLEX EXTNAME = 'Test-BINTABLE' / name of this binary table extension EXTVER = 3 / extension version number TNULL4 = 77 / value for undefined pixels TNULL5 = 77 / value for undefined pixels TNULL6 = 77 / value for undefined pixels TSCAL4 = 1000 / scaling factor TSCAL5 = 1 / scaling factor TSCAL6 = 100 / scaling factor TZERO4 = 0 / scaling offset TZERO5 = 32768 / scaling offset TZERO6 = 100 / scaling offset NEW_KEY = 'written by fxprec' / to change checksum END ������� +�c!GB��MMMXTENSION= 'IMAGE ' / IMAGE extension BITPIX = -32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 15 / length of data axis 1 NAXIS2 = 25 / length of data axis 2 PCOUNT = 0 / required keyword; must = 0 GCOUNT = 1 / required keyword; must = 1 END ?�@@@@�@�@�@�AAA A0A@APA`A A0A@APA`ApA�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�A�BBBA�A�BBBB BBBBB B$B(B,B0B B$B(B,����@����������BXBHBLBPBT� �0�@�P�`�p��������B�BpBtBxB|��������������������B�B�B�B�B��������� ����B�B�B�B�B�� �$�(�,�0�4�8�<�@�DB�B�B�B�B��H�L�P�T�X�\�`�d�h�lB�B�B�B�B��p�t�x�|€‚„†ˆŠB�B�B�B�B�ŒŽ’”–˜šœžB�B�B�B�B� ¢¤¦¨ª¬®°²CCCCC´¶¸º¼¾��������CC C CCCCCCCCCCCCCCCCCCCCCCCC C!C"C#C$C C!C"C#C$C%C&C'C(C)C*C+C,C-C.C*C+C,C-C.C/C0C1C2C3C4C5C6C7C8C4C5C6C7C8C9C:C;C<C=C>C?C@CACBC>C?C@CACBCCCDCECFCGCHCICJCKCLCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCRCSCTCUCVCWCXCYCZC[C\C]C^C_C`C\C]C^C_C`CaCbCcCdCeCfCgChCiCjCfCgChCiCjCkClCmCnCoCpCqCrCsCtCpCqCrCsCtCuCvCwCxCyCzC{C|C}C~XTENSION= 'TABLE ' / ASCII table extension BITPIX = 8 / 8-bit ASCII characters NAXIS = 2 / 2-dimensional ASCII table NAXIS1 = 76 / width of table in characters NAXIS2 = 12 / number of rows in table PCOUNT = 0 / no group parameters (required keyword) GCOUNT = 1 / one data group (required keyword) TFIELDS = 5 / number of fields in each row TTYPE1 = 'Name ' / label for field 1 TBCOL1 = 1 / beginning column of field 1 TFORM1 = 'A15 ' / Fortran-77 format of field TTYPE2 = 'Ivalue ' / label for field 2 TBCOL2 = 17 / beginning column of field 2 TFORM2 = 'I10 ' / Fortran-77 format of field TUNIT2 = 'm**2 ' / physical unit of field TTYPE3 = 'Evalue ' / label for field 4 TBCOL3 = 28 / beginning column of field 4 TFORM3 = 'E12.5 ' / Fortran-77 format of field TUNIT3 = 'erg/s ' / physical unit of field TTYPE4 = 'Dvalue ' / label for field 5 TBCOL4 = 41 / beginning column of field 5 TFORM4 = 'D21.14 ' / Fortran-77 format of field TUNIT4 = 'km/s ' / physical unit of field EXTNAME = 'Test-ASCII' / name of this ASCII table extension EXTVER = 2 / extension version number TNULL1 = 'null1 ' / value for undefined pixels TNULL2 = 'null2 ' / value for undefined pixels TNULL3 = 'null4 ' / value for undefined pixels TNULL4 = 'null5 ' / value for undefined pixels TTYPE5 = 'INSERT_COL' / label for field TFORM5 = 'F14.6 ' / format of field TBCOL5 = 63 / beginning column of field END first string 1 1.00000E+00 1.00000000000000E+00 second string 2 2.00000E+00 2.00000000000000E+00 3 3.00000E+00 3.00000000000000E+00 null1 4 4.00000E+00 4.00000000000000E+00 5 5.00000E+00 5.00000000000000E+00 6 6.00000E+00 6.00000000000000E+00 9 9.00000E+00 9.00000000000000E+00 10 1.00000E+01 1.00000000000000E+01 null2 null4 null5 XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 61 / width of table in bytes NAXIS2 = 22 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 10 / number of fields in each row TTYPE1 = 'Avalue ' / label for field 1 TFORM1 = '15A ' / data format of field: ASCII Character TTYPE2 = 'Lvalue ' / label for field 2 TFORM2 = '1L ' / data format of field: 1-byte LOGICAL TUNIT2 = 'm**2 ' / physical unit of field TTYPE3 = 'Xvalue ' / label for field 3 TFORM3 = '16X ' / data format of field: BIT TUNIT3 = 'cm ' / physical unit of field TTYPE4 = 'Bvalue ' / label for field 4 TFORM4 = '1B ' / data format of field: BYTE TUNIT4 = 'erg/s ' / physical unit of field TTYPE5 = 'Ivalue ' / label for field 5 TFORM5 = '1I ' / data format of field: 2-byte INTEGER TUNIT5 = 'km/s ' / physical unit of field TTYPE6 = 'Evalue ' / label for field 7 TFORM6 = '1E ' / data format of field: 4-byte REAL TTYPE7 = 'Dvalue ' / label for field 8 TFORM7 = '1D ' / data format of field: 8-byte DOUBLE TTYPE9 = 'Cvalue ' / label for field 9 TFORM9 = '1C ' / data format of field: COMPLEX TTYPE10 = 'Mvalue ' / label for field 10 TFORM10 = '1M ' / data format of field: DOUBLE COMPLEX EXTNAME = 'Test-BINTABLE' / name of this binary table extension EXTVER = 1 / extension version number TNULL4 = 99 / value for undefined pixels TNULL5 = 99 / value for undefined pixels TDIM3 = '(1,2,8) ' / size of the multidimensional array KEY_PREC= 'This keyword was written by f_prec' / comment here TTYPE8 = 'INSERT_COL' / label for field TFORM8 = '1E ' / format of field END first string FLp?�?�����?��?��second string T�|@@����@@��@������������� F@@@����@���@� F���������@��@� T@�@����A� @"�$T���������A0�@@&�(F A@"����A���@1�2T��� �$A���@3�4cc������������T A@@(Fcc������������F���`�,Fcc������������F�����0Tcc������������T�����2Tcc������������T�����4Fcc������������XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 80 / width of table in bytes NAXIS2 = 20 / number of rows in table PCOUNT = 4446 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 10 / number of fields in each row TTYPE1 = 'Avalue ' / label for field 1 TFORM1 = '1PA(20) ' / data format of field: variable length array TTYPE2 = 'Lvalue ' / label for field 2 TFORM2 = '1PL(20) ' / data format of field: variable length array TUNIT2 = 'm**2 ' / physical unit of field TTYPE3 = 'Xvalue ' / label for field 3 TFORM3 = '1PB(3) ' / data format of field: variable length array TUNIT3 = 'cm ' / physical unit of field TTYPE4 = 'Bvalue ' / label for field 4 TFORM4 = '1PB(20) ' / data format of field: variable length array TUNIT4 = 'erg/s ' / physical unit of field TTYPE5 = 'Ivalue ' / label for field 5 TFORM5 = '1PI(20) ' / data format of field: variable length array TUNIT5 = 'km/s ' / physical unit of field TTYPE6 = 'Jvalue ' / label for field 6 TFORM6 = '1PJ(20) ' / data format of field: variable length array TTYPE7 = 'Evalue ' / label for field 7 TFORM7 = '1PE(20) ' / data format of field: variable length array TTYPE8 = 'Dvalue ' / label for field 8 TFORM8 = '1PD(20) ' / data format of field: variable length array TTYPE9 = 'Cvalue ' / label for field 9 TFORM9 = '1PC(0) ' / data format of field: variable length array TTYPE10 = 'Mvalue ' / label for field 10 TFORM10 = '1PM(0) ' / data format of field: variable length array EXTNAME = 'Test-BINTABLE' / name of this binary table extension EXTVER = 4 / extension version number TNULL4 = 88 / value for undefined pixels TNULL5 = 88 / value for undefined pixels TNULL6 = 88 / value for undefined pixels END  +!)1ADGHKQ]i��������������@FLMS_w��������S[cdl|�� �    + O s +� +�� +� +� +� + +? � �� � � � �  x �� � � � �  v �� � � � � !������ A������ : v � � + + +  +@ +� +� @ Q b e v � �  � � � � �  M �%8KNa�������n�F?�?�abT@XXX����@��������@abcFF@XXX?�����@@?���������@abcdFTF@XXX?�@����@�?�@��������@abcdeFTFTHXXX?�@@@����@�?�@@��������@abcdefFTFFTLXXX?�@@@@�����@�?�@@@��������@abcdefgFTFFTFLXXX?�@@@@�@�����@�?�@@@@��������@abcdefghFTFFTTFLXXX?�@@@@�@�@�����A?�@@@@@��������@ abcdefghiFTFFTTFFLX X X ?�@@@@�@�@�@�����A?�@@@@@@��������@"abcdefghijFTFFTTFFTL@X +X +X +?�@@@@�@�@�@�A����A ?�@@@@@@@ ��������@$abcdefghijkFTFFTTFFFTL` X  X  X ?�@@@@�@�@�@�AA����A0?�@@@@@@@ @"��������@&abcdefghijklFTFFTTFFFTTLp +X  +X  +X ?�@@@@�@�@�@�AAA ����A@?�@@@@@@@ @"@$��������@(abcdefghijklmFTFFTTFFFTTFLp + X  + X  + X ?�@@@@�@�@�@�AAA A0����AP?�@@@@@@@ @"@$@&��������@*abcdefghijklmnFTFFTTFFFTTTFLp + X + X + X?�@@@@�@�@�@�AAA A0A@����A`?�@@@@@@@ @"@$@&@(��������@,abcdefghijklmnoFTFFTTFFFTTTFFLp + X + X + X?�@@@@�@�@�@�AAA A0A@AP����Ap?�@@@@@@@ @"@$@&@(@*��������@.abcdefghijklmnopFTFFTTFFFTTTFFFLp + X + X + X?�@@@@�@�@�@�AAA A0A@APA`����A�?�@@@@@@@ @"@$@&@(@*@,��������@0abcdefghijklmnopqFTFFTTFFFTTTFFFTLp� + X + X + X?�@@@@�@�@�@�AAA A0A@APA`Ap����A�?�@@@@@@@ @"@$@&@(@*@,@.��������@1abcdefghijklmnopqrFTFFTTFFFTTTFFFFTLp� + X + X + X?�@@@@�@�@�@�AAA A0A@APA`ApA�����A�?�@@@@@@@ @"@$@&@(@*@,@.@0��������@2abcdefghijklmnopqrsFTFFTTFFFTTTFFFFTTLp� + X + X + X?�@@@@�@�@�@�AAA A0A@APA`ApA�A�����A�?�@@@@@@@ @"@$@&@(@*@,@.@0@1��������@3abcdefghijklmnopqrstFTFFTTFFFTTTFFFFTTTLp� + X + X + X?�@@@@�@�@�@�AAA A0A@APA`ApA�A�A�����A�?�@@@@@@@ @"@$@&@(@*@,@.@0@1@2��������@4XTENSION= 'IMAGE ' / IMAGE extension BITPIX = 32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 10 / length of data axis 1 NAXIS2 = 2 / length of data axis 2 PCOUNT = 0 / required keyword; must = 0 GCOUNT = 1 / required keyword; must = 1 CRVAL1 = 4.5830000000E+01 / comment CRVAL2 = 6.3570000000E+01 / comment CRPIX1 = 2.5600000000E+02 / comment CRPIX2 = 2.5700000000E+02 / comment CDELT1 = -2.7777700000E-03 / comment CDELT2 = 2.7777700000E-03 / comment CTYPE1 = 'RA---TAN' / comment CTYPE2 = 'DEC--TAN' / comment END  + XTENSION= 'TABLE ' / ASCII table extension BITPIX = 8 / 8-bit ASCII characters NAXIS = 2 / 2-dimensional ASCII table NAXIS1 = 80 / width of table in characters NAXIS2 = 11 / number of rows in table PCOUNT = 0 / no group parameters (required keyword) GCOUNT = 1 / one data group (required keyword) TFIELDS = 5 / number of fields in each row TTYPE1 = 'Name ' / label for field 1 TBCOL1 = 1 / beginning column of field 1 TFORM1 = 'A15 ' / Fortran-77 format of field TTYPE2 = 'Ivalue ' / label for field 2 TBCOL2 = 17 / beginning column of field 2 TFORM2 = 'I11 ' / Fortran-77 format of field TUNIT2 = 'm**2 ' / physical unit of field TTYPE3 = 'Fvalue ' / label for field 3 TBCOL3 = 29 / beginning column of field 3 TFORM3 = 'F15.6 ' / Fortran-77 format of field TUNIT3 = 'cm ' / physical unit of field TTYPE4 = 'Evalue ' / label for field 4 TBCOL4 = 45 / beginning column of field 4 TFORM4 = 'E13.5 ' / Fortran-77 format of field TUNIT4 = 'erg/s ' / physical unit of field TTYPE5 = 'Dvalue ' / label for field 5 TBCOL5 = 59 / beginning column of field 5 TFORM5 = 'D22.14 ' / Fortran-77 format of field TUNIT5 = 'km/s ' / physical unit of field EXTNAME = 'new_table' / name of this ASCII table extension EXTVER = 5 / extension version number END first string 0 0.000000 0.00000E+00 0.00000000000000E+00second string 3 3.000000 3.00000E+00 3.00000000000000E+00 6 6.000000 6.00000E+00 6.00000000000000E+00 9 9.000000 9.00000E+00 9.00000000000000E+00 12 12.000000 1.20000E+01 1.20000000000000E+01 15 15.000000 1.50000E+01 1.50000000000000E+01 18 18.000000 1.80000E+01 1.80000000000000E+01 21 21.000000 2.10000E+01 2.10000000000000E+01 24 24.000000 2.40000E+01 2.40000000000000E+01 27 27.000000 2.70000E+01 2.70000000000000E+01 \ No newline at end of file diff --git a/software/cfitsio3040/testprog.tpt b/software/cfitsio3040/testprog.tpt new file mode 100644 index 000000000..def9dcb28 --- /dev/null +++ b/software/cfitsio3040/testprog.tpt @@ -0,0 +1,12 @@ +tmpcard1 1001 this is the 1st template card +tmpcard2 ABCD this is the 2nd template card +tmpcard3 1001.23 this is the 3rd template card +tmpcard4 1001.45 this is the 4rd template card +comment this is the 5th template card +history this is the 6th template card +tmpcard7 = / comment for null keyword +-tmpcard1 tmpcarda change the name of tmpcard1 +-tmpcard4 +end + +junk will be ignored diff --git a/software/cfitsio3040/vmsieee.c b/software/cfitsio3040/vmsieee.c new file mode 100644 index 000000000..5ddc74865 --- /dev/null +++ b/software/cfitsio3040/vmsieee.c @@ -0,0 +1,130 @@ +#include +#include + +unsigned long CVT$CONVERT_FLOAT(); + +/* IEEVPAKR -- Pack a native floating point vector into an IEEE one. +*/ +void ieevpr (unsigned int *native, unsigned int *ieee, int *nelem) +{ + unsigned long status; + unsigned long options; + unsigned int *unanval; + int nanval = -1; + int i,n; + + unanval = (unsigned int *) &nanval; + options = CVT$M_BIG_ENDIAN; + + n = *nelem; + status = CVT$_NORMAL; + + for (i = 0; i < n ; i++) { + + status = CVT$CONVERT_FLOAT (&native[i], CVT$K_VAX_F, + &ieee[i], CVT$K_IEEE_S, + options); + if (status != CVT$_NORMAL) { + ieee[i] = *unanval; + } + } + +} +/* IEEVPAKD -- Pack a native double floating point vector into an IEEE one. +*/ +void ieevpd (unsigned long *native, unsigned long *ieee, int *nelem) +{ + unsigned long status; + unsigned long options; + unsigned long *unanval; + long nanval = -1; + int i,n; + + unanval = (unsigned long *) &nanval; + options = CVT$M_BIG_ENDIAN; + + n = *nelem * 2; + status = CVT$_NORMAL; + + for (i = 0; i < n ; i=i+2) { + + status = CVT$CONVERT_FLOAT (&native[i], CVT$K_VAX_D, + &ieee[i], CVT$K_IEEE_T, + options); + if (status != CVT$_NORMAL) { + ieee[i] = *unanval; + ieee[i+1] = *unanval; + } + } + +} +/* IEEVUPKR -- Unpack an ieee vector into native single floating point vector. +*/ +void ieevur (unsigned int *ieee, unsigned int *native, int *nelem) +{ + unsigned long status; + unsigned long options; + unsigned int *unanval; + int nanval = -1; + int j,n; + + unanval = (unsigned int *) &nanval; + options = CVT$M_ERR_UNDERFLOW+CVT$M_BIG_ENDIAN; + + n = *nelem; + + status = CVT$_NORMAL; + + for (j = 0; j < n ; j++) { + status = CVT$CONVERT_FLOAT (&ieee[j], CVT$K_IEEE_S, + &native[j], CVT$K_VAX_F, + options); + if (status != CVT$_NORMAL) + switch(status) { + case CVT$_INVVAL: + case CVT$_NEGINF: + case CVT$_OVERFLOW: + case CVT$_POSINF: + native[j] = *unanval; + break; + default: + native[j] = 0; + } + } +} +/* IEEVUPKD -- Unpack an ieee vector into native double floating point vector. +*/ +void ieevud (unsigned long *ieee, unsigned long *native, int *nelem) +{ + unsigned long status; + unsigned long options; + unsigned long *unanval; + long nanval = -1; + int j,n; + + unanval = (unsigned long *) &nanval; + options = CVT$M_BIG_ENDIAN + CVT$M_ERR_UNDERFLOW; + + n = *nelem * 2; + + status = CVT$_NORMAL; + + for (j = 0; j < n ; j=j+2) { + status = CVT$CONVERT_FLOAT (&ieee[j], CVT$K_IEEE_T, + &native[j], CVT$K_VAX_D, + options); + if (status != CVT$_NORMAL) + switch(status) { + case CVT$_INVVAL: + case CVT$_NEGINF: + case CVT$_OVERFLOW: + case CVT$_POSINF: + native[j] = *unanval; + native[j+1] = *unanval; + break; + default: + native[j] = 0; + native[j+1] = 0; + } + } +} diff --git a/software/cfitsio3040/vmsieeed.mar b/software/cfitsio3040/vmsieeed.mar new file mode 100644 index 000000000..f9928ddaf --- /dev/null +++ b/software/cfitsio3040/vmsieeed.mar @@ -0,0 +1,137 @@ + .TITLE ieeed - ieee double to vax floating conversions + .ident /v1.0/ + +;# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. +;# +;# IEEED.S -- IEEE double to VAX double floating conversions. +;# +;# ieepakd (x) # scalar, vax->ieee +;# ieeupkd (x) # scalar, ieee->vax +;# ieevpakd (native, ieee, nelem) # vector, vax->ieee +;# ieevupkd (ieee, native, nelem) # vector, ieee->vax +;# ieesnand (NaN) # set VAX NaN value +;# ieegnand (NaN) # get VAX NaN value +;# +;# These routines convert between the VAX and IEEE double floating formats, +;# operating upon a single value or an array of values. +/- zero is converted +;# to zero. When converting IEEE to VAX, underflow maps to zero, and exponent +;# overflow and NaN input values map to the value set by IEESNAND (default 0). +;# These routines are functionally equivalent to the semi-portable versions of +;# the IRAF ieee/native floating conversion routines in osb$ieeed.x. +;# TODO - Add a function callback option for processing NaN values. + +; Vax NaN *MUST* be 11111... or the fitsio code will break horribly. +; It is explicitly tested for in a couple of places, so be warned. + + .PSECT IEEED$CODE, PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,NOVEC + + .ENTRY IEEPAD ^M +;_ieepad_: ;# IEEPAKD (X) + movl 4(ap), r4 ;# data addr -> r4 + movl r4, r5 ;# output clobbers input + jsb cvt_vax_ieee ;# convert value + ret + .ENTRY IEEVPD ^M +;_ieevpd_: ;# IEEVPAKD (VAX, IEEE, NELEM) + movl 4(ap), r4 ;# input vector -> r4 + movl 8(ap), r5 ;# output vector -> r5 + movl @12(ap), r6 ;# loop counter +L1: jsb cvt_vax_ieee ;# convert one value + sobgtr r6, L1 ;# loop + ret + .ENTRY IEEUPD ^M +;_ieeupd_: ;# IEEUPKD (X) + movl 4(ap), r4 ;# data addr -> r4 + movl r4, r5 ;# output clobbers input + jsb cvt_ieee_vax ;# convert value + ret + .ENTRY IEEVUD ^M +;_ieevud_: ;# IEEVUPKD (IEEE, VAX, NELEM) + movl 4(ap), r4 ;# input vector -> r4 + movl 8(ap), r5 ;# output vector -> r5 + movl @12(ap), r6 ;# loop counter +L2: jsb cvt_ieee_vax ;# convert one value + sobgtr r6, L2 ;# loop + ret + .ENTRY IEESND ^M<> +;_ieesnd_: ;# IEESNAND (VAXNAN) +bugger::nop ; real no-op added to enable + ; enbuging. +; movq @4(ap), vaxnan ; no-oped. See above. + ret ; This could be no-oped in + ; the vector, but isn't. + .ENTRY IEEGND ^M<> +;_ieegnd_: ;# IEEGNAND (VAXNAN) + movq #-1, @4(ap) ; See above + ret + +cvt_vax_ieee: ;# R4=in, R5=out + rotl #16, (r4)+, r1 ;# swap words -> r1 + rotl #16, (r4)+, r0 ;# swap words -> r0 + + extzv #23, #8, r1, r2 ;# 8 bit exponent -> r2 + beql L6 ;# branch if zero exponent + extzv #2, #1, r0, r3 ;# get round bit -> r3 + ashq #-3, r0, r0 ;# shift 64 data bits by 3 + addw2 #<1024-130>, r2 ;# adjust exponent bias + insv r2, #20, #11, r1 ;# insert new exponent + blbc r3, L5 ;# branch if round bit clear + incl r0 ;# round low longword + adwc #0, r1 ;# carry to high longword +L5: + movl sp, r3 ;# r3 points to input byte + pushl r1 ;# push r1 on stack + pushl r0 ;# push r0 on stack + movb -(r3), (r5)+ ;# output quadword, swapped + movb -(r3), (r5)+ + movb -(r3), (r5)+ + movb -(r3), (r5)+ + movb -(r3), (r5)+ + movb -(r3), (r5)+ + movb -(r3), (r5)+ + movb -(r3), (r5)+ + addl2 #8, sp ;# pop stack + rsb ;# all done +L6: + clrl r0 ;# return all 64 bits zero + clrl r1 + brb L5 + +cvt_ieee_vax: ;# R4=in, R5=out + movb (r4)+, -(sp) ;# byte swap quadword onto stack + movb (r4)+, -(sp) + movb (r4)+, -(sp) + movb (r4)+, -(sp) + movb (r4)+, -(sp) + movb (r4)+, -(sp) + movb (r4)+, -(sp) + movb (r4)+, -(sp) + + movl (sp)+, r0 ;# pop low bits + movl (sp)+, r1 ;# pop high bits + extzv #20, #11, r1, r2 ;# exponent -> r2 + beql L10 ;# zero exponent + extzv #31, #1, r1, r3 ;# save sign bit + ashq #3, r0, r0 ;# shift 64 bits left 3 bits + subw2 #<1024-130>, r2 ;# adjust exponent bias + bleq L10 ;# return zero if underflow + cmpw r2, #256 ;# compare with max VAX exponent + bgeq L11 ;# return VAX-NaN if overflow + insv r2, #23, #8, r1 ;# insert VAX-D exponent + insv r3, #31, #1, r1 ;# restore sign bit + + rotl #16, r1, (r5)+ ;# output VAX double + rotl #16, r0, (r5)+ ;# output VAX double + rsb +L10: + clrl (r5)+ ;# return all 64 bits zero + clrl (r5)+ + rsb +L11: + movl #-1, r3 ;# return VAX equiv. of NaN + movl r3, (r5)+ + movl r3, (r5)+ ; changed to only return -1 + rsb + + .END + diff --git a/software/cfitsio3040/vmsieeer.mar b/software/cfitsio3040/vmsieeer.mar new file mode 100644 index 000000000..f31058801 --- /dev/null +++ b/software/cfitsio3040/vmsieeer.mar @@ -0,0 +1,106 @@ + .TITLE ieeer - ieee real to vax floating conversions + .ident /v1.0/ + +;# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. +;# +;# IEEER.S -- IEEE real to VAX single precision floating conversions. +;# +;# ieepakr (x) # scalar, vax->ieee +;# ieeupkr (x) # scalar, ieee->vax +;# ieevpakr (native, ieee, nelem) # vector, vax->ieee +;# ieevupkr (ieee, native, nelem) # vector, ieee->vax +;# ieesnanr (NaN) # set VAX NaN value +;# ieegnanr (NaN) # get VAX NaN value +;# +;# These routines convert between the VAX and IEEE real floating formats, +;# operating upon a single value or an array of values. +/- zero is converted +;# to zero. When converting IEEE to VAX, underflow maps to zero, and exponent +;# overflow and NaN input values map to the value set by IEESNANR (default 0). +;# These routines are functionally equivalent to the semi-portable versions of +;# the IRAF ieee/native floating conversion routines in osb$ieeer.x. +;# TODO - Add a function callback option for processing NaN values. + +; See IEEED for details about NaNs. + + .PSECT IEEER$CODE, PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,NOVEC + + .ENTRY IEEPAR ^M +;_ieepar_: ;# IEEPAKR (X) + movl 4(ap), r2 ;# data addr -> r2 + movl r2, r3 ;# output clobbers input + jsb cvt_vax_ieee ;# convert value + ret + .ENTRY IEEVPR ^M +;_ieevpr_: ;# IEEVPAKR (VAX, IEEE, NELEM) + movl 4(ap), r2 ;# input vector -> r2 + movl 8(ap), r3 ;# output vector -> r3 + movl @12(ap), r4 ;# loop counter +L1: jsb cvt_vax_ieee ;# convert one value + sobgtr r4, L1 ;# loop + ret + .ENTRY IEEUPR ^M +;_ieeupr_: ;# IEEUPKR (X) + movl 4(ap), r2 ;# data addr -> r2 + movl r2, r3 ;# output clobbers input + jsb cvt_ieee_vax ;# convert value + ret + .ENTRY IEEVUR ^M +;_ieevur_: ;# IEEVUPKR (IEEE, VAX, NELEM) + movl 4(ap), r2 ;# input vector -> r2 + movl 8(ap), r3 ;# output vector -> r3 + movl @12(ap), r4 ;# loop counter +L2: jsb cvt_ieee_vax ;# convert one value + sobgtr r4, L2 ;# loop + ret + .ENTRY IEESNR ^M<> +;_ieesnr_: ;# IEESNANR (VAXNAN) +buger:: nop ; plug bpt here for crap catching. +; movl @4(ap), vaxnan + ret + .ENTRY IEEGNR ^M<> +;_ieegnr_: ;# IEEGNANR (VAXNAN) + movl #-1, @4(ap) + ret + +cvt_vax_ieee: ;# R2=in, R3=out + rotl #16, (r2)+, r0 ;# swap words -> r0 + extzv #23, #8, r0, r1 ;# 8 bit exponent -> r1 + beql L6 ;# branch if zero exponent + subw2 #2, r1 ;# adjust exponent bias + bleq L6 ;# return zero if underflow + insv r1, #23, #8, r0 ;# insert new exponent +L5: + movl sp, r1 ;# r3 points to input byte + pushl r0 ;# push r0 on stack + movb -(r1), (r3)+ ;# output longword, swapped + movb -(r1), (r3)+ + movb -(r1), (r3)+ + movb -(r1), (r3)+ + tstl (sp)+ ;# pop stack + rsb ;# all done +L6: + clrl r0 ;# return all 32 bits zero + brb L5 + +cvt_ieee_vax: ;# R2=in, R3=out + movb (r2)+, -(sp) ;# byte swap longword onto stack + movb (r2)+, -(sp) + movb (r2)+, -(sp) + movb (r2)+, -(sp) + movl (sp)+, r0 ;# pop swapped value -> r0 + extzv #23, #8, r0, r1 ;# exponent -> r1 + beql L10 ;# zero exponent + addw2 #2, r1 ;# adjust exponent bias + cmpw r1, #256 ;# compare with max VAX exponent + bgeq L11 ;# return VAX-NaN if overflow + insv r1, #23, #8, r0 ;# insert VAX-D exponent + rotl #16, r0, (r3)+ ;# output VAX value + rsb +L10: + clrl (r3)+ ;# return all 32 bits zero + rsb +L11: + movl #-1, (r3)+ ; return fixed NaN value... + rsb + + .END diff --git a/software/cfitsio3040/wcssub.c b/software/cfitsio3040/wcssub.c new file mode 100644 index 000000000..99973bb37 --- /dev/null +++ b/software/cfitsio3040/wcssub.c @@ -0,0 +1,765 @@ +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int fits_read_wcstab( + fitsfile *fptr, /* I - FITS file pointer */ + int nwtb, /* Number of arrays to be read from the binary table(s) */ + wtbarr *wtb, /* Address of the first element of an array of wtbarr + typedefs. This wtbarr typedef is defined below to + match the wtbarr struct defined in WCSLIB. An array + of such structs returned by the WCSLIB function + wcstab(). */ + int *status) + +/* +* Author: Mark Calabretta, Australia Telescope National Facility +* http://www.atnf.csiro.au/~mcalabre/index.html +* +* fits_read_wcstab() extracts arrays from a binary table required in +* constructing -TAB coordinates. This helper routine is intended for +* use by routines in the WCSLIB library when dealing with the -TAB table +* look up WCS convention. +*/ + +{ + int anynul, colnum, hdunum, iwtb, m, naxis, nostat; + long *naxes = 0, nelem; + wtbarr *wtbp; + + + if (*status) return *status; + + if (fptr == 0) { + return (*status = NULL_INPUT_PTR); + } + + if (nwtb == 0) return 0; + + /* Zero the array pointers. */ + wtbp = wtb; + for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { + *wtbp->arrayp = 0x0; + } + + /* Save HDU number so that we can move back to it later. */ + fits_get_hdu_num(fptr, &hdunum); + + wtbp = wtb; + for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { + /* Move to the required binary table extension. */ + if (fits_movnam_hdu(fptr, BINARY_TBL, (char *)(wtbp->extnam), + wtbp->extver, status)) { + goto cleanup; + } + + /* Locate the table column. */ + if (fits_get_colnum(fptr, CASEINSEN, (char *)(wtbp->ttype), &colnum, + status)) { + goto cleanup; + } + + /* Get the array dimensions and check for consistency. */ + if (wtbp->ndim < 1) { + *status = NEG_AXIS; + goto cleanup; + } + + if (!(naxes = calloc(wtbp->ndim, sizeof(long)))) { + *status = MEMORY_ALLOCATION; + goto cleanup; + } + + if (fits_read_tdim(fptr, colnum, wtbp->ndim, &naxis, naxes, status)) { + goto cleanup; + } + + if (naxis != wtbp->ndim) { + if (wtbp->kind == 'c' && wtbp->ndim == 2) { + /* Allow TDIMn to be omitted for degenerate coordinate arrays. */ + naxis = 2; + naxes[1] = naxes[0]; + naxes[0] = 1; + } else { + *status = BAD_TDIM; + goto cleanup; + } + } + + if (wtbp->kind == 'c') { + /* Coordinate array; calculate the array size. */ + nelem = naxes[0]; + for (m = 0; m < naxis-1; m++) { + *(wtbp->dimlen + m) = naxes[m+1]; + nelem *= naxes[m+1]; + } + } else { + /* Index vector; check length. */ + if ((nelem = naxes[0]) != *(wtbp->dimlen)) { + /* N.B. coordinate array precedes the index vectors. */ + *status = BAD_TDIM; + goto cleanup; + } + } + + free(naxes); + naxes = 0; + + /* Allocate memory for the array. */ + if (!(*wtbp->arrayp = calloc((size_t)nelem, sizeof(double)))) { + *status = MEMORY_ALLOCATION; + goto cleanup; + } + + /* Read the array from the table. */ + if (fits_read_col_dbl(fptr, colnum, wtbp->row, 1L, nelem, 0.0, + *wtbp->arrayp, &anynul, status)) { + goto cleanup; + } + } + +cleanup: + /* Move back to the starting HDU. */ + nostat = 0; + fits_movabs_hdu(fptr, hdunum, 0, &nostat); + + /* Release allocated memory. */ + if (naxes) free(naxes); + if (*status) { + wtbp = wtb; + for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { + if (*wtbp->arrayp) free(*wtbp->arrayp); + } + } + + return *status; +} +/*--------------------------------------------------------------------------*/ +int ffgiwcs(fitsfile *fptr, /* I - FITS file pointer */ + char **header, /* O - pointer to the WCS related keywords */ + int *status) /* IO - error status */ +/* + int fits_get_image_wcs_keys + return a string containing all the image WCS header keywords. + This string is then used as input to the wcsinit WCSlib routine. + + THIS ROUTINE IS DEPRECATED. USE fits_hdr2str INSTEAD +*/ +{ + int hdutype; + + if (*status > 0) + return(*status); + + fits_get_hdu_type(fptr, &hdutype, status); + if (hdutype != IMAGE_HDU) + { + ffpmsg( + "Error in ffgiwcs. This HDU is not an image. Can't read WCS keywords"); + return(*status = NOT_IMAGE); + } + + /* read header keywords into a long string of chars */ + if (ffh2st(fptr, header, status) > 0) + { + ffpmsg("error creating string of image WCS keywords (ffgiwcs)"); + return(*status); + } + + return(*status); +} + +/*--------------------------------------------------------------------------*/ +int ffgics(fitsfile *fptr, /* I - FITS file pointer */ + double *xrval, /* O - X reference value */ + double *yrval, /* O - Y reference value */ + double *xrpix, /* O - X reference pixel */ + double *yrpix, /* O - Y reference pixel */ + double *xinc, /* O - X increment per pixel */ + double *yinc, /* O - Y increment per pixel */ + double *rot, /* O - rotation angle (degrees) */ + char *type, /* O - type of projection ('-tan') */ + int *status) /* IO - error status */ +/* + read the values of the celestial coordinate system keywords. + These values may be used as input to the subroutines that + calculate celestial coordinates. (ffxypx, ffwldp) + + Modified in Nov 1999 to convert the CD matrix keywords back + to the old CDELTn form, and to swap the axes if the dec-like + axis is given first, and to assume default values if any of the + keywords are not present. +*/ +{ + int tstat = 0, cd_exists = 0, pc_exists = 0; + char ctype[FLEN_VALUE]; + double cd11 = 0.0, cd21 = 0.0, cd22 = 0.0, cd12 = 0.0; + double pc11 = 1.0, pc21 = 0.0, pc22 = 1.0, pc12 = 0.0; + double pi = 3.1415926535897932; + double phia, phib, temp; + double toler = .0002; /* tolerance for angles to agree (radians) */ + /* (= approximately 0.01 degrees) */ + + if (*status > 0) + return(*status); + + tstat = 0; + if (ffgkyd(fptr, "CRVAL1", xrval, NULL, &tstat)) + *xrval = 0.; + + tstat = 0; + if (ffgkyd(fptr, "CRVAL2", yrval, NULL, &tstat)) + *yrval = 0.; + + tstat = 0; + if (ffgkyd(fptr, "CRPIX1", xrpix, NULL, &tstat)) + *xrpix = 0.; + + tstat = 0; + if (ffgkyd(fptr, "CRPIX2", yrpix, NULL, &tstat)) + *yrpix = 0.; + + /* look for CDELTn first, then CDi_j keywords */ + tstat = 0; + if (ffgkyd(fptr, "CDELT1", xinc, NULL, &tstat)) + { + /* CASE 1: no CDELTn keyword, so look for the CD matrix */ + tstat = 0; + if (ffgkyd(fptr, "CD1_1", &cd11, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + cd_exists = 1; /* found at least 1 CD_ keyword */ + + if (ffgkyd(fptr, "CD2_1", &cd21, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + cd_exists = 1; /* found at least 1 CD_ keyword */ + + if (ffgkyd(fptr, "CD1_2", &cd12, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + cd_exists = 1; /* found at least 1 CD_ keyword */ + + if (ffgkyd(fptr, "CD2_2", &cd22, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + cd_exists = 1; /* found at least 1 CD_ keyword */ + + if (cd_exists) /* convert CDi_j back to CDELTn */ + { + /* there are 2 ways to compute the angle: */ + phia = atan2( cd21, cd11); + phib = atan2(-cd12, cd22); + + /* ensure that phia <= phib */ + temp = minvalue(phia, phib); + phib = maxvalue(phia, phib); + phia = temp; + + /* there is a possible 180 degree ambiguity in the angles */ + /* so add 180 degress to the smaller value if the values */ + /* differ by more than 90 degrees = pi/2 radians. */ + /* (Later, we may decide to take the other solution by */ + /* subtracting 180 degrees from the larger value). */ + + if ((phib - phia) > (pi / 2.)) + phia += pi; + + if (fabs(phia - phib) > toler) + { + /* angles don't agree, so looks like there is some skewness */ + /* between the axes. Return with an error to be safe. */ + *status = APPROX_WCS_KEY; + } + + phia = (phia + phib) /2.; /* use the average of the 2 values */ + *xinc = cd11 / cos(phia); + *yinc = cd22 / cos(phia); + *rot = phia * 180. / pi; + + /* common usage is to have a positive yinc value. If it is */ + /* negative, then subtract 180 degrees from rot and negate */ + /* both xinc and yinc. */ + + if (*yinc < 0) + { + *xinc = -(*xinc); + *yinc = -(*yinc); + *rot = *rot - 180.; + } + } + else /* no CD matrix keywords either */ + { + *xinc = 1.; + + /* there was no CDELT1 keyword, but check for CDELT2 just in case */ + tstat = 0; + if (ffgkyd(fptr, "CDELT2", yinc, NULL, &tstat)) + *yinc = 1.; + + tstat = 0; + if (ffgkyd(fptr, "CROTA2", rot, NULL, &tstat)) + *rot=0.; + } + } + else /* Case 2: CDELTn + optional PC matrix */ + { + if (ffgkyd(fptr, "CDELT2", yinc, NULL, &tstat)) + *yinc = 1.; + + tstat = 0; + if (ffgkyd(fptr, "CROTA2", rot, NULL, &tstat)) + { + *rot=0.; + + /* no CROTA2 keyword, so look for the PC matrix */ + tstat = 0; + if (ffgkyd(fptr, "PC1_1", &pc11, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + pc_exists = 1; /* found at least 1 PC_ keyword */ + + if (ffgkyd(fptr, "PC2_1", &pc21, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + pc_exists = 1; /* found at least 1 PC_ keyword */ + + if (ffgkyd(fptr, "PC1_2", &pc12, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + pc_exists = 1; /* found at least 1 PC_ keyword */ + + if (ffgkyd(fptr, "PC2_2", &pc22, NULL, &tstat)) + tstat = 0; /* reset keyword not found error */ + else + pc_exists = 1; /* found at least 1 PC_ keyword */ + + if (pc_exists) /* convert PCi_j back to CDELTn */ + { + /* there are 2 ways to compute the angle: */ + phia = atan2( pc21, pc11); + phib = atan2(-pc12, pc22); + + /* ensure that phia <= phib */ + temp = minvalue(phia, phib); + phib = maxvalue(phia, phib); + phia = temp; + + /* there is a possible 180 degree ambiguity in the angles */ + /* so add 180 degress to the smaller value if the values */ + /* differ by more than 90 degrees = pi/2 radians. */ + /* (Later, we may decide to take the other solution by */ + /* subtracting 180 degrees from the larger value). */ + + if ((phib - phia) > (pi / 2.)) + phia += pi; + + if (fabs(phia - phib) > toler) + { + /* angles don't agree, so looks like there is some skewness */ + /* between the axes. Return with an error to be safe. */ + *status = APPROX_WCS_KEY; + } + + phia = (phia + phib) /2.; /* use the average of the 2 values */ + *rot = phia * 180. / pi; + } + } + } + + /* get the type of projection, if any */ + tstat = 0; + if (ffgkys(fptr, "CTYPE1", ctype, NULL, &tstat)) + type[0] = '\0'; + else + { + /* copy the projection type string */ + strncpy(type, &ctype[4], 4); + type[4] = '\0'; + + /* check if RA and DEC are inverted */ + if (!strncmp(ctype, "DEC-", 4) || !strncmp(ctype+1, "LAT", 3)) + { + /* the latitudinal axis is given first, so swap them */ + +/* + this case was removed on 12/9. Apparently not correct. + + if ((*xinc / *yinc) < 0. ) + *rot = -90. - (*rot); + else +*/ + *rot = 90. - (*rot); + + /* Empirical tests with ds9 show the y-axis sign must be negated */ + /* and the xinc and yinc values must NOT be swapped. */ + *yinc = -(*yinc); + + temp = *xrval; + *xrval = *yrval; + *yrval = temp; + } + } + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtcs(fitsfile *fptr, /* I - FITS file pointer */ + int xcol, /* I - column containing the RA coordinate */ + int ycol, /* I - column containing the DEC coordinate */ + double *xrval, /* O - X reference value */ + double *yrval, /* O - Y reference value */ + double *xrpix, /* O - X reference pixel */ + double *yrpix, /* O - Y reference pixel */ + double *xinc, /* O - X increment per pixel */ + double *yinc, /* O - Y increment per pixel */ + double *rot, /* O - rotation angle (degrees) */ + char *type, /* O - type of projection ('-sin') */ + int *status) /* IO - error status */ +/* + read the values of the celestial coordinate system keywords + from a FITS table where the X and Y or RA and DEC coordinates + are stored in separate column. + These values may be used as input to the subroutines that + calculate celestial coordinates. (ffxypx, ffwldp) +*/ +{ + char comm[FLEN_COMMENT],ctype[FLEN_VALUE],keynam[FLEN_KEYWORD]; + int tstatus = 0; + + if (*status > 0) + return(*status); + + ffkeyn("TCRVL",xcol,keynam,status); + ffgkyd(fptr,keynam,xrval,comm,status); + + ffkeyn("TCRVL",ycol,keynam,status); + ffgkyd(fptr,keynam,yrval,comm,status); + + ffkeyn("TCRPX",xcol,keynam,status); + ffgkyd(fptr,keynam,xrpix,comm,status); + + ffkeyn("TCRPX",ycol,keynam,status); + ffgkyd(fptr,keynam,yrpix,comm,status); + + ffkeyn("TCDLT",xcol,keynam,status); + ffgkyd(fptr,keynam,xinc,comm,status); + + ffkeyn("TCDLT",ycol,keynam,status); + ffgkyd(fptr,keynam,yinc,comm,status); + + ffkeyn("TCTYP",xcol,keynam,status); + ffgkys(fptr,keynam,ctype,comm,status); + + if (*status > 0) + { + ffpmsg + ("ffgtcs could not find all the celestial coordinate keywords"); + return(*status = NO_WCS_KEY); + } + + /* copy the projection type string */ + strncpy(type, &ctype[4], 4); + type[4] = '\0'; + + *rot=0.; /* default rotation is 0 */ + ffkeyn("TCROT",ycol,keynam,status); + ffgkyd(fptr,keynam,rot,comm,&tstatus); /* keyword may not exist */ + + return(*status); +} +/*--------------------------------------------------------------------------*/ +int ffgtwcs(fitsfile *fptr, /* I - FITS file pointer */ + int xcol, /* I - column number for the X column */ + int ycol, /* I - column number for the Y column */ + char **header, /* O - string of all the WCS keywords */ + int *status) /* IO - error status */ +/* + int fits_get_table_wcs_keys + Return string containing all the WCS keywords appropriate for the + pair of X and Y columns containing the coordinate + of each event in an event list table. This string may then be passed + to Doug Mink's WCS library wcsinit routine, to create and initialize the + WCS structure. The calling routine must free the header character string + when it is no longer needed. + + THIS ROUTINE IS DEPRECATED. USE fits_hdr2str INSTEAD +*/ +{ + int hdutype, ncols, tstatus, length; + int naxis1 = 1, naxis2 = 1; + long tlmin, tlmax; + char keyname[FLEN_KEYWORD]; + char valstring[FLEN_VALUE]; + char comm[2]; + char *cptr; + /* construct a string of 80 blanks, for adding fill to the keywords */ + /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890 */ + char blanks[] = " "; + + if (*status > 0) + return(*status); + + fits_get_hdu_type(fptr, &hdutype, status); + if (hdutype == IMAGE_HDU) + { + ffpmsg("Can't read table WSC keywords. This HDU is not a table"); + return(*status = NOT_TABLE); + } + + fits_get_num_cols(fptr, &ncols, status); + + if (xcol < 1 || xcol > ncols) + { + ffpmsg("illegal X axis column number in fftwcs"); + return(*status = BAD_COL_NUM); + } + + if (ycol < 1 || ycol > ncols) + { + ffpmsg("illegal Y axis column number in fftwcs"); + return(*status = BAD_COL_NUM); + } + + /* allocate character string for all the WCS keywords */ + *header = calloc(1, 2401); /* room for up to 30 keywords */ + if (*header == 0) + { + ffpmsg("error allocating memory for WCS header keywords (fftwcs)"); + return(*status = MEMORY_ALLOCATION); + } + + cptr = *header; + comm[0] = '\0'; + + tstatus = 0; + ffkeyn("TLMIN",xcol,keyname,status); + ffgkyj(fptr,keyname, &tlmin,NULL,&tstatus); + + if (!tstatus) + { + ffkeyn("TLMAX",xcol,keyname,status); + ffgkyj(fptr,keyname, &tlmax,NULL,&tstatus); + } + + if (!tstatus) + { + naxis1 = tlmax - tlmin + 1; + } + + tstatus = 0; + ffkeyn("TLMIN",ycol,keyname,status); + ffgkyj(fptr,keyname, &tlmin,NULL,&tstatus); + + if (!tstatus) + { + ffkeyn("TLMAX",ycol,keyname,status); + ffgkyj(fptr,keyname, &tlmax,NULL,&tstatus); + } + + if (!tstatus) + { + naxis2 = tlmax - tlmin + 1; + } + + /* 123456789012345678901234567890 */ + strcat(cptr, "NAXIS = 2"); + strncat(cptr, blanks, 50); + cptr += 80; + + ffi2c(naxis1, valstring, status); /* convert to formatted string */ + ffmkky("NAXIS1", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + strcpy(keyname, "NAXIS2"); + ffi2c(naxis2, valstring, status); /* convert to formatted string */ + ffmkky(keyname, valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* read the required header keywords (use defaults if not found) */ + + /* CTYPE1 keyword */ + tstatus = 0; + ffkeyn("TCTYP",xcol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + valstring[0] = '\0'; + ffmkky("CTYPE1", valstring, comm, cptr, status); /* construct the keyword*/ + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + + /* CTYPE2 keyword */ + tstatus = 0; + ffkeyn("TCTYP",ycol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + valstring[0] = '\0'; + ffmkky("CTYPE2", valstring, comm, cptr, status); /* construct the keyword*/ + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + + /* CRPIX1 keyword */ + tstatus = 0; + ffkeyn("TCRPX",xcol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CRPIX1", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* CRPIX2 keyword */ + tstatus = 0; + ffkeyn("TCRPX",ycol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CRPIX2", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* CRVAL1 keyword */ + tstatus = 0; + ffkeyn("TCRVL",xcol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CRVAL1", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* CRVAL2 keyword */ + tstatus = 0; + ffkeyn("TCRVL",ycol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CRVAL2", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* CDELT1 keyword */ + tstatus = 0; + ffkeyn("TCDLT",xcol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CDELT1", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* CDELT2 keyword */ + tstatus = 0; + ffkeyn("TCDLT",ycol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) + strcpy(valstring, "1"); + ffmkky("CDELT2", valstring, comm, cptr, status); /* construct the keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + + /* the following keywords may not exist */ + + /* CROTA2 keyword */ + tstatus = 0; + ffkeyn("TCROT",ycol,keyname,status); + if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) == 0 ) + { + ffmkky("CROTA2", valstring, comm, cptr, status); /* construct keyword*/ + strncat(cptr, blanks, 50); /* pad with blanks */ + cptr += 80; + } + + /* EPOCH keyword */ + tstatus = 0; + if (ffgkey(fptr, "EPOCH", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("EPOCH", valstring, comm, cptr, status); /* construct keyword*/ + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* EQUINOX keyword */ + tstatus = 0; + if (ffgkey(fptr, "EQUINOX", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("EQUINOX", valstring, comm, cptr, status); /* construct keyword*/ + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* RADECSYS keyword */ + tstatus = 0; + if (ffgkey(fptr, "RADECSYS", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("RADECSYS", valstring, comm, cptr, status); /*construct keyword*/ + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* TELESCOPE keyword */ + tstatus = 0; + if (ffgkey(fptr, "TELESCOP", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("TELESCOP", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* INSTRUME keyword */ + tstatus = 0; + if (ffgkey(fptr, "INSTRUME", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("INSTRUME", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* DETECTOR keyword */ + tstatus = 0; + if (ffgkey(fptr, "DETECTOR", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("DETECTOR", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* MJD-OBS keyword */ + tstatus = 0; + if (ffgkey(fptr, "MJD-OBS", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("MJD-OBS", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* DATE-OBS keyword */ + tstatus = 0; + if (ffgkey(fptr, "DATE-OBS", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("DATE-OBS", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + /* DATE keyword */ + tstatus = 0; + if (ffgkey(fptr, "DATE", valstring, NULL, &tstatus) == 0 ) + { + ffmkky("DATE", valstring, comm, cptr, status); + length = strlen(cptr); + strncat(cptr, blanks, 80 - length); /* pad with blanks */ + cptr += 80; + } + + strcat(cptr, "END"); + strncat(cptr, blanks, 77); + + return(*status); +} diff --git a/software/cfitsio3040/wcsutil.c b/software/cfitsio3040/wcsutil.c new file mode 100644 index 000000000..11cbf0e61 --- /dev/null +++ b/software/cfitsio3040/wcsutil.c @@ -0,0 +1,488 @@ +#include +#include +#include +#include "fitsio2.h" + +/*--------------------------------------------------------------------------*/ +int ffwldp(double xpix, double ypix, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpos, double *ypos, int *status) + +/* WDP 1/97: change the name of the routine from 'worldpos' to 'ffwldp' */ + +/* worldpos.c -- WCS Algorithms from Classic AIPS. + Copyright (C) 1994 + Associated Universities, Inc. Washington DC, USA. + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; if not, write to the Free Software Foundation, + Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. + + Correspondence concerning AIPS should be addressed as follows: + Internet email: aipsmail@nrao.edu + Postal address: AIPS Group + National Radio Astronomy Observatory + 520 Edgemont Road + Charlottesville, VA 22903-2475 USA + + -=-=-=-=-=-=- + + These two ANSI C functions, worldpos() and xypix(), perform + forward and reverse WCS computations for 8 types of projective + geometries ("-SIN", "-TAN", "-ARC", "-NCP", "-GLS", "-MER", "-AIT" + and "-STG"): + + worldpos() converts from pixel location to RA,Dec + xypix() converts from RA,Dec to pixel location + + where "(RA,Dec)" are more generically (long,lat). These functions + are based on the WCS implementation of Classic AIPS, an + implementation which has been in production use for more than ten + years. See the two memos by Eric Greisen + + ftp://fits.cv.nrao.edu/fits/documents/wcs/aips27.ps.Z + ftp://fits.cv.nrao.edu/fits/documents/wcs/aips46.ps.Z + + for descriptions of the 8 projective geometries and the + algorithms. Footnotes in these two documents describe the + differences between these algorithms and the 1993-94 WCS draft + proposal (see URL below). In particular, these algorithms support + ordinary field rotation, but not skew geometries (CD or PC matrix + cases). Also, the MER and AIT algorithms work correctly only for + CRVALi=(0,0). Users should note that GLS projections with yref!=0 + will behave differently in this code than in the draft WCS + proposal. The NCP projection is now obsolete (it is a special + case of SIN). WCS syntax and semantics for various advanced + features is discussed in the draft WCS proposal by Greisen and + Calabretta at: + + ftp://fits.cv.nrao.edu/fits/documents/wcs/wcs.all.ps.Z + + -=-=-=- + + The original version of this code was Emailed to D.Wells on + Friday, 23 September by Bill Cotton , + who described it as a "..more or less.. exact translation from the + AIPSish..". Changes were made by Don Wells + during the period October 11-13, 1994: + 1) added GNU license and header comments + 2) added testpos.c program to perform extensive circularity tests + 3) changed float-->double to get more than 7 significant figures + 4) testpos.c circularity test failed on MER and AIT. B.Cotton + found that "..there were a couple of lines of code [in] the wrong + place as a result of merging several Fortran routines." + 5) testpos.c found 0h wraparound in xypix() and worldpos(). + 6) E.Greisen recommended removal of various redundant if-statements, + and addition of a 360d difference test to MER case of worldpos(). +*/ + +/*-----------------------------------------------------------------------*/ +/* routine to determine accurate position for pixel coordinates */ +/* returns 0 if successful otherwise: */ +/* 1 = angle too large for projection; */ +/* (WDP 1/97: changed the return value to 501 instead of 1) */ +/* does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections */ +/* anything else is linear (== -CAR) */ +/* Input: */ +/* f xpix x pixel number (RA or long without rotation) */ +/* f ypiy y pixel number (dec or lat without rotation) */ +/* d xref x reference coordinate value (deg) */ +/* d yref y reference coordinate value (deg) */ +/* f xrefpix x reference pixel */ +/* f yrefpix y reference pixel */ +/* f xinc x coordinate increment (deg) */ +/* f yinc y coordinate increment (deg) */ +/* f rot rotation (deg) (from N through E) */ +/* c *type projection type code e.g. "-SIN"; */ +/* Output: */ +/* d *xpos x (RA) coordinate (deg) */ +/* d *ypos y (dec) coordinate (deg) */ +/*-----------------------------------------------------------------------*/ + {double cosr, sinr, dx, dy, dz, temp, x, y, z; + double sins, coss, dect, rat, dt, l, m, mg, da, dd, cos0, sin0; + double dec0, ra0, decout, raout; + double geo1, geo2, geo3; + double cond2r=1.745329252e-2; + double twopi = 6.28318530717959, deps = 1.0e-5; + int i, itype; + char ctypes[9][5] ={"-CAR","-SIN","-TAN","-ARC","-NCP", "-GLS", "-MER", + "-AIT", "-STG"}; + + if (*status > 0) + return(*status); + +/* Offset from ref pixel */ + dx = (xpix-xrefpix) * xinc; + dy = (ypix-yrefpix) * yinc; +/* Take out rotation */ + cosr = cos(rot*cond2r); + sinr = sin(rot*cond2r); + if (rot!=0.0) + {temp = dx * cosr - dy * sinr; + dy = dy * cosr + dx * sinr; + dx = temp;} +/* find type */ +/* WDP 1/97: removed support for default type for better error checking */ +/* itype = 0; default type is linear */ + itype = -1; /* no default type */ + for (i=0;i<9;i++) if (!strncmp(type, ctypes[i], 4)) itype = i; +/* default, linear result for error return */ + *xpos = xref + dx; + *ypos = yref + dy; +/* convert to radians */ + ra0 = xref * cond2r; + dec0 = yref * cond2r; + l = dx * cond2r; + m = dy * cond2r; + sins = l*l + m*m; + cos0 = cos(dec0); + sin0 = sin(dec0); + +/* process by case */ + switch (itype) { + case 0: /* linear -CAR */ + rat = ra0 + l; + dect = dec0 + m; + break; + case 1: /* -SIN sin*/ + if (sins>1.0) return(*status = 501); + coss = sqrt (1.0 - sins); + dt = sin0 * coss + cos0 * m; + if ((dt>1.0) || (dt<-1.0)) return(*status = 501); + dect = asin (dt); + rat = cos0 * coss - sin0 * m; + if ((rat==0.0) && (l==0.0)) return(*status = 501); + rat = atan2 (l, rat) + ra0; + break; + case 2: /* -TAN tan */ + x = cos0*cos(ra0) - l*sin(ra0) - m*cos(ra0)*sin0; + y = cos0*sin(ra0) + l*cos(ra0) - m*sin(ra0)*sin0; + z = sin0 + m* cos0; + rat = atan2( y, x ); + dect = atan ( z / sqrt(x*x+y*y) ); + break; + case 3: /* -ARC Arc*/ + if (sins>=twopi*twopi/4.0) return(*status = 501); + sins = sqrt(sins); + coss = cos (sins); + if (sins!=0.0) sins = sin (sins) / sins; + else + sins = 1.0; + dt = m * cos0 * sins + sin0 * coss; + if ((dt>1.0) || (dt<-1.0)) return(*status = 501); + dect = asin (dt); + da = coss - dt * sin0; + dt = l * sins * cos0; + if ((da==0.0) && (dt==0.0)) return(*status = 501); + rat = ra0 + atan2 (dt, da); + break; + case 4: /* -NCP North celestial pole*/ + dect = cos0 - m * sin0; + if (dect==0.0) return(*status = 501); + rat = ra0 + atan2 (l, dect); + dt = cos (rat-ra0); + if (dt==0.0) return(*status = 501); + dect = dect / dt; + if ((dect>1.0) || (dect<-1.0)) return(*status = 501); + dect = acos (dect); + if (dec0<0.0) dect = -dect; + break; + case 5: /* -GLS global sinusoid */ + dect = dec0 + m; + if (fabs(dect)>twopi/4.0) return(*status = 501); + coss = cos (dect); + if (fabs(l)>twopi*coss/2.0) return(*status = 501); + rat = ra0; + if (coss>deps) rat = rat + l / coss; + break; + case 6: /* -MER mercator*/ + dt = yinc * cosr + xinc * sinr; + if (dt==0.0) dt = 1.0; + dy = (yref/2.0 + 45.0) * cond2r; + dx = dy + dt / 2.0 * cond2r; + dy = log (tan (dy)); + dx = log (tan (dx)); + geo2 = dt * cond2r / (dx - dy); + geo3 = geo2 * dy; + geo1 = cos (yref*cond2r); + if (geo1<=0.0) geo1 = 1.0; + rat = l / geo1 + ra0; + if (fabs(rat - ra0) > twopi) return(*status = 501); /* added 10/13/94 DCW/EWG */ + dt = 0.0; + if (geo2!=0.0) dt = (m + geo3) / geo2; + dt = exp (dt); + dect = 2.0 * atan (dt) - twopi / 4.0; + break; + case 7: /* -AIT Aitoff*/ + dt = yinc*cosr + xinc*sinr; + if (dt==0.0) dt = 1.0; + dt = dt * cond2r; + dy = yref * cond2r; + dx = sin(dy+dt)/sqrt((1.0+cos(dy+dt))/2.0) - + sin(dy)/sqrt((1.0+cos(dy))/2.0); + if (dx==0.0) dx = 1.0; + geo2 = dt / dx; + dt = xinc*cosr - yinc* sinr; + if (dt==0.0) dt = 1.0; + dt = dt * cond2r; + dx = 2.0 * cos(dy) * sin(dt/2.0); + if (dx==0.0) dx = 1.0; + geo1 = dt * sqrt((1.0+cos(dy)*cos(dt/2.0))/2.0) / dx; + geo3 = geo2 * sin(dy) / sqrt((1.0+cos(dy))/2.0); + rat = ra0; + dect = dec0; + if ((l==0.0) && (m==0.0)) break; + dz = 4.0 - l*l/(4.0*geo1*geo1) - ((m+geo3)/geo2)*((m+geo3)/geo2) ; + if ((dz>4.0) || (dz<2.0)) return(*status = 501);; + dz = 0.5 * sqrt (dz); + dd = (m+geo3) * dz / geo2; + if (fabs(dd)>1.0) return(*status = 501);; + dd = asin (dd); + if (fabs(cos(dd))1.0) return(*status = 501);; + da = asin (da); + rat = ra0 + 2.0 * da; + dect = dd; + break; + case 8: /* -STG Sterographic*/ + dz = (4.0 - sins) / (4.0 + sins); + if (fabs(dz)>1.0) return(*status = 501); + dect = dz * sin0 + m * cos0 * (1.0+dz) / 2.0; + if (fabs(dect)>1.0) return(*status = 501); + dect = asin (dect); + rat = cos(dect); + if (fabs(rat)1.0) return(*status = 501); + rat = asin (rat); + mg = 1.0 + sin(dect) * sin0 + cos(dect) * cos0 * cos(rat); + if (fabs(mg)deps) rat = twopi/2.0 - rat; + rat = ra0 + rat; + break; + + default: + /* fall through to here on error */ + return(*status = 504); + } + +/* return ra in range */ + raout = rat; + decout = dect; + if (raout-ra0>twopi/2.0) raout = raout - twopi; + if (raout-ra0<-twopi/2.0) raout = raout + twopi; + if (raout < 0.0) raout += twopi; /* added by DCW 10/12/94 */ + +/* correct units back to degrees */ + *xpos = raout / cond2r; + *ypos = decout / cond2r; + return(*status); +} /* End of worldpos */ +/*--------------------------------------------------------------------------*/ +int ffxypx(double xpos, double ypos, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpix, double *ypix, int *status) +/* WDP 1/97: changed name of routine from xypix to ffxypx */ +/*-----------------------------------------------------------------------*/ +/* routine to determine accurate pixel coordinates for an RA and Dec */ +/* returns 0 if successful otherwise: */ +/* 1 = angle too large for projection; */ +/* 2 = bad values */ +/* WDP 1/97: changed the return values to 501 and 502 instead of 1 and 2 */ +/* does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections */ +/* anything else is linear */ +/* Input: */ +/* d xpos x (RA) coordinate (deg) */ +/* d ypos y (dec) coordinate (deg) */ +/* d xref x reference coordinate value (deg) */ +/* d yref y reference coordinate value (deg) */ +/* f xrefpix x reference pixel */ +/* f yrefpix y reference pixel */ +/* f xinc x coordinate increment (deg) */ +/* f yinc y coordinate increment (deg) */ +/* f rot rotation (deg) (from N through E) */ +/* c *type projection type code e.g. "-SIN"; */ +/* Output: */ +/* f *xpix x pixel number (RA or long without rotation) */ +/* f *ypiy y pixel number (dec or lat without rotation) */ +/*-----------------------------------------------------------------------*/ + {double dx, dy, dz, r, ra0, dec0, ra, dec, coss, sins, dt, da, dd, sint; + double l, m, geo1, geo2, geo3, sinr, cosr, cos0, sin0; + double cond2r=1.745329252e-2, deps=1.0e-5, twopi=6.28318530717959; + int i, itype; + char ctypes[9][5] ={"-CAR","-SIN","-TAN","-ARC","-NCP", "-GLS", "-MER", + "-AIT", "-STG"}; + + /* 0h wrap-around tests added by D.Wells 10/12/94: */ + dt = (xpos - xref); + if (dt > 180) xpos -= 360; + if (dt < -180) xpos += 360; + /* NOTE: changing input argument xpos is OK (call-by-value in C!) */ + +/* default values - linear */ + dx = xpos - xref; + dy = ypos - yref; +/* dz = 0.0; */ +/* Correct for rotation */ + r = rot * cond2r; + cosr = cos (r); + sinr = sin (r); + dz = dx*cosr + dy*sinr; + dy = dy*cosr - dx*sinr; + dx = dz; +/* check axis increments - bail out if either 0 */ + if ((xinc==0.0) || (yinc==0.0)) {*xpix=0.0; *ypix=0.0; return(*status = 502);} +/* convert to pixels */ + *xpix = dx / xinc + xrefpix; + *ypix = dy / yinc + yrefpix; + +/* find type */ +/* WDP 1/97: removed support for default type for better error checking */ +/* itype = 0; default type is linear */ + itype = -1; /* no default type */ + for (i=0;i<9;i++) if (!strncmp(type, ctypes[i], 4)) itype = i; + if (itype==0) return(*status); /* done if linear */ + +/* Non linear position */ + ra0 = xref * cond2r; + dec0 = yref * cond2r; + ra = xpos * cond2r; + dec = ypos * cond2r; + +/* compute direction cosine */ + coss = cos (dec); + sins = sin (dec); + cos0 = cos (dec0); + sin0 = sin (dec0); + l = sin(ra-ra0) * coss; + sint = sins * sin0 + coss * cos0 * cos(ra-ra0); + +/* process by case */ + switch (itype) { + case 1: /* -SIN sin*/ + if (sint<0.0) return(*status = 501); + m = sins * cos(dec0) - coss * sin(dec0) * cos(ra-ra0); + break; + case 2: /* -TAN tan */ + if (sint<=0.0) return(*status = 501); + if( cos0<0.001 ) { + /* Do a first order expansion around pole */ + m = (coss * cos(ra-ra0)) / (sins * sin0); + m = (-m + cos0 * (1.0 + m*m)) / sin0; + } else { + m = ( sins/sint - sin0 ) / cos0; + } + if( fabs(sin(ra0)) < 0.3 ) { + l = coss*sin(ra)/sint - cos0*sin(ra0) + m*sin(ra0)*sin0; + l /= cos(ra0); + } else { + l = coss*cos(ra)/sint - cos0*cos(ra0) + m*cos(ra0)*sin0; + l /= -sin(ra0); + } + break; + case 3: /* -ARC Arc*/ + m = sins * sin(dec0) + coss * cos(dec0) * cos(ra-ra0); + if (m<-1.0) m = -1.0; + if (m>1.0) m = 1.0; + m = acos (m); + if (m!=0) + m = m / sin(m); + else + m = 1.0; + l = l * m; + m = (sins * cos(dec0) - coss * sin(dec0) * cos(ra-ra0)) * m; + break; + case 4: /* -NCP North celestial pole*/ + if (dec0==0.0) + return(*status = 501); /* can't stand the equator */ + else + m = (cos(dec0) - coss * cos(ra-ra0)) / sin(dec0); + break; + case 5: /* -GLS global sinusoid */ + dt = ra - ra0; + if (fabs(dec)>twopi/4.0) return(*status = 501); + if (fabs(dec0)>twopi/4.0) return(*status = 501); + m = dec - dec0; + l = dt * coss; + break; + case 6: /* -MER mercator*/ + dt = yinc * cosr + xinc * sinr; + if (dt==0.0) dt = 1.0; + dy = (yref/2.0 + 45.0) * cond2r; + dx = dy + dt / 2.0 * cond2r; + dy = log (tan (dy)); + dx = log (tan (dx)); + geo2 = dt * cond2r / (dx - dy); + geo3 = geo2 * dy; + geo1 = cos (yref*cond2r); + if (geo1<=0.0) geo1 = 1.0; + dt = ra - ra0; + l = geo1 * dt; + dt = dec / 2.0 + twopi / 8.0; + dt = tan (dt); + if (dttwopi/4.0) return(*status = 501); + dt = yinc*cosr + xinc*sinr; + if (dt==0.0) dt = 1.0; + dt = dt * cond2r; + dy = yref * cond2r; + dx = sin(dy+dt)/sqrt((1.0+cos(dy+dt))/2.0) - + sin(dy)/sqrt((1.0+cos(dy))/2.0); + if (dx==0.0) dx = 1.0; + geo2 = dt / dx; + dt = xinc*cosr - yinc* sinr; + if (dt==0.0) dt = 1.0; + dt = dt * cond2r; + dx = 2.0 * cos(dy) * sin(dt/2.0); + if (dx==0.0) dx = 1.0; + geo1 = dt * sqrt((1.0+cos(dy)*cos(dt/2.0))/2.0) / dx; + geo3 = geo2 * sin(dy) / sqrt((1.0+cos(dy))/2.0); + dt = sqrt ((1.0 + cos(dec) * cos(da))/2.0); + if (fabs(dt)twopi/4.0) return(*status = 501); + dd = 1.0 + sins * sin(dec0) + coss * cos(dec0) * cos(da); + if (fabs(dd) +#include +#include +#include "fitsio2.h" + +/* ====================================================================== +This file contains stubs for the AIPS WCS routines that are +contained in the source file wcsutil.c. The routines in wcsutil.c +should only be used by software that adheres to the terms of +the GNU General Public License. Users who want to use CFITSIO but are +unwilling to release their code under the terms of the GNU General +Public License should replace the wcsutil.c file with this current +file before building the CFITSIO library. This alternate version of +CFITSIO will behave the same as the standard version, except that it +will not support the ffwldp and ffxypx routines that calculate +image coordinate transformation from pixel coordinates to world +coordinates (e.g. Right Ascension and Declination) and vise versa. +======================================================================== */ + + +/*--------------------------------------------------------------------------*/ +int ffwldp(double xpix, double ypix, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpos, double *ypos, int *status) +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support"); + ffpmsg(" celestial coordinate transformations."); + return(*status = 503); +} +/*--------------------------------------------------------------------------*/ +int ffxypx(double xpos, double ypos, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpix, double *ypix, int *status) +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support"); + ffpmsg(" celestial coordinate transformations."); + return(*status = 503); +} diff --git a/software/cfitsio3040/winDumpExts.mak b/software/cfitsio3040/winDumpExts.mak new file mode 100644 index 000000000..9534d733f --- /dev/null +++ b/software/cfitsio3040/winDumpExts.mak @@ -0,0 +1,191 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on winDumpExts.dsp +!IF "$(CFG)" == "" +CFG=Win32 Debug +!MESSAGE No configuration specified. Defaulting to Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "winDumpExts.mak" CFG="Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +ALL : "$(OUTDIR)\winDumpExts.exe" + + +CLEAN : + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\winDumpExts.obj" + -@erase "$(OUTDIR)\winDumpExts.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +"$(INTDIR)" : + if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\winDumpExts.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\winDumpExts.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\winDumpExts.pdb" /machine:I386 /out:"$(OUTDIR)\winDumpExts.exe" +LINK32_OBJS= \ + "$(INTDIR)\winDumpExts.obj" + +"$(OUTDIR)\winDumpExts.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "Win32 Debug" + +OUTDIR=. +INTDIR=.\Debug +# Begin Custom Macros +OutDir=. +# End Custom Macros + +ALL : "$(OUTDIR)\winDumpExts.exe" + + +CLEAN : + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(INTDIR)\winDumpExts.obj" + -@erase "$(OUTDIR)\winDumpExts.exe" + -@erase "$(OUTDIR)\winDumpExts.ilk" + -@erase "$(OUTDIR)\winDumpExts.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +"$(INTDIR)" : + if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\winDumpExts.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\winDumpExts.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\winDumpExts.pdb" /debug /machine:I386 /out:"$(OUTDIR)\winDumpExts.exe" /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\winDumpExts.obj" + +"$(OUTDIR)\winDumpExts.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("winDumpExts.dep") +!INCLUDE "winDumpExts.dep" +!ELSE +!MESSAGE Warning: cannot find "winDumpExts.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "Win32 Release" || "$(CFG)" == "Win32 Debug" +SOURCE=.\winDumpExts.c + +"$(INTDIR)\winDumpExts.obj" : $(SOURCE) "$(INTDIR)" + + + +!ENDIF + diff --git a/software/cfitsio3040/windumpexts.c b/software/cfitsio3040/windumpexts.c new file mode 100644 index 000000000..c09a613b4 --- /dev/null +++ b/software/cfitsio3040/windumpexts.c @@ -0,0 +1,502 @@ +/* + * winDumpExts.c -- + * Author: Gordon Chaffee, Scott Stanton + * + * History: The real functionality of this file was written by + * Matt Pietrek in 1993 in his pedump utility. I've + * modified it to dump the externals in a bunch of object + * files to create a .def file. + * + * 10/12/95 Modified by Scott Stanton to support Relocatable Object Module + * Format files for Borland C++ 4.5. + * + * Notes: Visual C++ puts an underscore before each exported symbol. + * This file removes them. I don't know if this is a problem + * this other compilers. If _MSC_VER is defined, + * the underscore is removed. If not, it isn't. To get a + * full dump of an object file, use the -f option. This can + * help determine the something that may be different with a + * compiler other than Visual C++. + *---------------------------------------------------------------------- + * + */ + +#include +#include +#include +#include + +#ifdef _ALPHA_ +#define e_magic_number IMAGE_FILE_MACHINE_ALPHA +#else +#define e_magic_number IMAGE_FILE_MACHINE_I386 +#endif + +/* + *---------------------------------------------------------------------- + * GetArgcArgv -- + * + * Break up a line into argc argv + *---------------------------------------------------------------------- + */ +int +GetArgcArgv(char *s, char **argv) +{ + int quote = 0; + int argc = 0; + char *bp; + + bp = s; + while (1) { + while (isspace(*bp)) { + bp++; + } + if (*bp == '\n' || *bp == '\0') { + *bp = '\0'; + return argc; + } + if (*bp == '\"') { + quote = 1; + bp++; + } + argv[argc++] = bp; + + while (*bp != '\0') { + if (quote) { + if (*bp == '\"') { + quote = 0; + *bp = '\0'; + bp++; + break; + } + bp++; + continue; + } + if (isspace(*bp)) { + *bp = '\0'; + bp++; + break; + } + bp++; + } + } +} + +/* + * The names of the first group of possible symbol table storage classes + */ +char * SzStorageClass1[] = { + "NULL","AUTOMATIC","EXTERNAL","STATIC","REGISTER","EXTERNAL_DEF","LABEL", + "UNDEFINED_LABEL","MEMBER_OF_STRUCT","ARGUMENT","STRUCT_TAG", + "MEMBER_OF_UNION","UNION_TAG","TYPE_DEFINITION","UNDEFINED_STATIC", + "ENUM_TAG","MEMBER_OF_ENUM","REGISTER_PARAM","BIT_FIELD" +}; + +/* + * The names of the second group of possible symbol table storage classes + */ +char * SzStorageClass2[] = { + "BLOCK","FUNCTION","END_OF_STRUCT","FILE","SECTION","WEAK_EXTERNAL" +}; + +/* + *---------------------------------------------------------------------- + * GetSZStorageClass -- + * + * Given a symbol storage class value, return a descriptive + * ASCII string + *---------------------------------------------------------------------- + */ +PSTR +GetSZStorageClass(BYTE storageClass) +{ + if ( storageClass <= IMAGE_SYM_CLASS_BIT_FIELD ) + return SzStorageClass1[storageClass]; + else if ( (storageClass >= IMAGE_SYM_CLASS_BLOCK) + && (storageClass <= IMAGE_SYM_CLASS_WEAK_EXTERNAL) ) + return SzStorageClass2[storageClass-IMAGE_SYM_CLASS_BLOCK]; + else + return "???"; +} + +/* + *---------------------------------------------------------------------- + * GetSectionName -- + * + * Used by DumpSymbolTable, it gives meaningful names to + * the non-normal section number. + * + * Results: + * A name is returned in buffer + *---------------------------------------------------------------------- + */ +void +GetSectionName(WORD section, PSTR buffer, unsigned cbBuffer) +{ + char tempbuffer[10]; + + switch ( (SHORT)section ) + { + case IMAGE_SYM_UNDEFINED: strcpy(tempbuffer, "UNDEF"); break; + case IMAGE_SYM_ABSOLUTE: strcpy(tempbuffer, "ABS "); break; + case IMAGE_SYM_DEBUG: strcpy(tempbuffer, "DEBUG"); break; + default: wsprintf(tempbuffer, "%-5X", section); + } + + strncpy(buffer, tempbuffer, cbBuffer-1); +} + +/* + *---------------------------------------------------------------------- + * DumpSymbolTable -- + * + * Dumps a COFF symbol table from an EXE or OBJ. We only use + * it to dump tables from OBJs. + *---------------------------------------------------------------------- + */ +void +DumpSymbolTable(PIMAGE_SYMBOL pSymbolTable, FILE *fout, unsigned cSymbols) +{ + unsigned i; + PSTR stringTable; + char sectionName[10]; + + fprintf(fout, "Symbol Table - %X entries (* = auxillary symbol)\n", + cSymbols); + + fprintf(fout, + "Indx Name Value Section cAux Type Storage\n" + "---- -------------------- -------- ---------- ----- ------- --------\n"); + + /* + * The string table apparently starts right after the symbol table + */ + stringTable = (PSTR)&pSymbolTable[cSymbols]; + + for ( i=0; i < cSymbols; i++ ) { + fprintf(fout, "%04X ", i); + if ( pSymbolTable->N.Name.Short != 0 ) + fprintf(fout, "%-20.8s", pSymbolTable->N.ShortName); + else + fprintf(fout, "%-20s", stringTable + pSymbolTable->N.Name.Long); + + fprintf(fout, " %08X", pSymbolTable->Value); + + GetSectionName(pSymbolTable->SectionNumber, sectionName, + sizeof(sectionName)); + fprintf(fout, " sect:%s aux:%X type:%02X st:%s\n", + sectionName, + pSymbolTable->NumberOfAuxSymbols, + pSymbolTable->Type, + GetSZStorageClass(pSymbolTable->StorageClass) ); +#if 0 + if ( pSymbolTable->NumberOfAuxSymbols ) + DumpAuxSymbols(pSymbolTable); +#endif + + /* + * Take into account any aux symbols + */ + i += pSymbolTable->NumberOfAuxSymbols; + pSymbolTable += pSymbolTable->NumberOfAuxSymbols; + pSymbolTable++; + } +} + +/* + *---------------------------------------------------------------------- + * DumpExternals -- + * + * Dumps a COFF symbol table from an EXE or OBJ. We only use + * it to dump tables from OBJs. + *---------------------------------------------------------------------- + */ +void +DumpExternals(PIMAGE_SYMBOL pSymbolTable, FILE *fout, unsigned cSymbols) +{ + unsigned i; + PSTR stringTable; + char *s, *f; + char symbol[1024]; + + /* + * The string table apparently starts right after the symbol table + */ + stringTable = (PSTR)&pSymbolTable[cSymbols]; + + for ( i=0; i < cSymbols; i++ ) { + if (pSymbolTable->SectionNumber > 0 && pSymbolTable->Type == 0x20) { + if (pSymbolTable->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) { + if (pSymbolTable->N.Name.Short != 0) { + strncpy(symbol, pSymbolTable->N.ShortName, 8); + symbol[8] = 0; + } else { + s = stringTable + pSymbolTable->N.Name.Long; + strcpy(symbol, s); + } + s = symbol; + f = strchr(s, '@'); + if (f) { + *f = 0; + } +#if defined(_MSC_VER) && defined(_X86_) + if (symbol[0] == '_') { + s = &symbol[1]; + } +#endif + if ((stricmp(s, "DllEntryPoint") != 0) + && (stricmp(s, "DllMain") != 0)) { + fprintf(fout, "\t%s\n", s); + } + } + } + + /* + * Take into account any aux symbols + */ + i += pSymbolTable->NumberOfAuxSymbols; + pSymbolTable += pSymbolTable->NumberOfAuxSymbols; + pSymbolTable++; + } +} + +/* + *---------------------------------------------------------------------- + * DumpObjFile -- + * + * Dump an object file--either a full listing or just the exported + * symbols. + *---------------------------------------------------------------------- + */ +void +DumpObjFile(PIMAGE_FILE_HEADER pImageFileHeader, FILE *fout, int full) +{ + PIMAGE_SYMBOL PCOFFSymbolTable; + DWORD COFFSymbolCount; + + PCOFFSymbolTable = (PIMAGE_SYMBOL) + ((DWORD)pImageFileHeader + pImageFileHeader->PointerToSymbolTable); + COFFSymbolCount = pImageFileHeader->NumberOfSymbols; + + if (full) { + DumpSymbolTable(PCOFFSymbolTable, fout, COFFSymbolCount); + } else { + DumpExternals(PCOFFSymbolTable, fout, COFFSymbolCount); + } +} + +/* + *---------------------------------------------------------------------- + * SkipToNextRecord -- + * + * Skip over the current ROMF record and return the type of the + * next record. + *---------------------------------------------------------------------- + */ + +BYTE +SkipToNextRecord(BYTE **ppBuffer) +{ + int length; + (*ppBuffer)++; /* Skip over the type.*/ + length = *((WORD*)(*ppBuffer))++; /* Retrieve the length. */ + *ppBuffer += length; /* Skip over the rest. */ + return **ppBuffer; /* Return the type. */ +} + +/* + *---------------------------------------------------------------------- + * DumpROMFObjFile -- + * + * Dump a Relocatable Object Module Format file, displaying only + * the exported symbols. + *---------------------------------------------------------------------- + */ +void +DumpROMFObjFile(LPVOID pBuffer, FILE *fout) +{ + BYTE type, length; + char symbol[1024], *s; + + while (1) { + type = SkipToNextRecord(&(BYTE*)pBuffer); + if (type == 0x90) { /* PUBDEF */ + if (((BYTE*)pBuffer)[4] != 0) { + length = ((BYTE*)pBuffer)[5]; + strncpy(symbol, ((char*)pBuffer) + 6, length); + symbol[length] = '\0'; + s = symbol; + if ((stricmp(s, "DllEntryPoint") != 0) + && (stricmp(s, "DllMain") != 0)) { + if (s[0] == '_') { + s++; + fprintf(fout, "\t_%s\n\t%s=_%s\n", s, s, s); + } else { + fprintf(fout, "\t%s\n", s); + } + } + } + } else if (type == 0x8B || type == 0x8A) { /* MODEND */ + break; + } + } +} + +/* + *---------------------------------------------------------------------- + * DumpFile -- + * + * Open up a file, memory map it, and call the appropriate + * dumping routine + *---------------------------------------------------------------------- + */ +void +DumpFile(LPSTR filename, FILE *fout, int full) +{ + HANDLE hFile; + HANDLE hFileMapping; + LPVOID lpFileBase; + PIMAGE_DOS_HEADER dosHeader; + + hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); + + if (hFile == INVALID_HANDLE_VALUE) { + fprintf(stderr, "Couldn't open file with CreateFile()\n"); + return; + } + + hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL); + if (hFileMapping == 0) { + CloseHandle(hFile); + fprintf(stderr, "Couldn't open file mapping with CreateFileMapping()\n"); + return; + } + + lpFileBase = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0); + if (lpFileBase == 0) { + CloseHandle(hFileMapping); + CloseHandle(hFile); + fprintf(stderr, "Couldn't map view of file with MapViewOfFile()\n"); + return; + } + + dosHeader = (PIMAGE_DOS_HEADER)lpFileBase; + if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE) { +#if 0 + DumpExeFile( dosHeader ); +#else + fprintf(stderr, "File is an executable. I don't dump those.\n"); + return; +#endif + } + /* Does it look like a i386 COFF OBJ file??? */ + else if ((dosHeader->e_magic == e_magic_number) + && (dosHeader->e_sp == 0)) { + /* + * The two tests above aren't what they look like. They're + * really checking for IMAGE_FILE_HEADER.Machine == i386 (0x14C) + * and IMAGE_FILE_HEADER.SizeOfOptionalHeader == 0; + */ + DumpObjFile((PIMAGE_FILE_HEADER) lpFileBase, fout, full); + } else if (*((BYTE *)lpFileBase) == 0x80) { + /* + * This file looks like it might be a ROMF file. + */ + DumpROMFObjFile(lpFileBase, fout); + } else { + printf("unrecognized file format\n"); + } + UnmapViewOfFile(lpFileBase); + CloseHandle(hFileMapping); + CloseHandle(hFile); +} + +void +main(int argc, char **argv) +{ + char *fargv[1000]; + char cmdline[10000]; + int i, arg; + FILE *fout; + int pos; + int full = 0; + char *outfile = NULL; + + if (argc < 3) { + Usage: + fprintf(stderr, "Usage: %s ?-o outfile? ?-f(ull)? ..\n", argv[0]); + exit(1); + } + + arg = 1; + while (argv[arg][0] == '-') { + if (strcmp(argv[arg], "--") == 0) { + arg++; + break; + } else if (strcmp(argv[arg], "-f") == 0) { + full = 1; + } else if (strcmp(argv[arg], "-o") == 0) { + arg++; + if (arg == argc) { + goto Usage; + } + outfile = argv[arg]; + } + arg++; + } + if (arg == argc) { + goto Usage; + } + + if (outfile) { + fout = fopen(outfile, "w+"); + if (fout == NULL) { + fprintf(stderr, "Unable to open \'%s\' for writing:\n", + argv[arg]); + perror(""); + exit(1); + } + } else { + fout = stdout; + } + + if (! full) { + char *dllname = argv[arg]; + arg++; + if (arg == argc) { + goto Usage; + } + fprintf(fout, "LIBRARY %s\n", dllname); + fprintf(fout, "EXETYPE WINDOWS\n"); + fprintf(fout, "CODE PRELOAD MOVEABLE DISCARDABLE\n"); + fprintf(fout, "DATA PRELOAD MOVEABLE MULTIPLE\n\n"); + fprintf(fout, "EXPORTS\n"); + } + + for (; arg < argc; arg++) { + if (argv[arg][0] == '@') { + FILE *fargs = fopen(&argv[arg][1], "r"); + if (fargs == NULL) { + fprintf(stderr, "Unable to open \'%s\' for reading:\n", + argv[arg]); + perror(""); + exit(1); + } + pos = 0; + for (i = 0; i < arg; i++) { + strcpy(&cmdline[pos], argv[i]); + pos += strlen(&cmdline[pos]) + 1; + fargv[i] = argv[i]; + } + fgets(&cmdline[pos], sizeof(cmdline), fargs); + fprintf(stderr, "%s\n", &cmdline[pos]); + fclose(fargs); + i += GetArgcArgv(&cmdline[pos], &fargv[i]); + argc = i; + argv = fargv; + } + DumpFile(argv[arg], fout, full); + } + exit(0); +} diff --git a/software/gsl-1.15/.deps/gsl-histogram.Po b/software/gsl-1.15/.deps/gsl-histogram.Po new file mode 100644 index 000000000..9ab948b36 --- /dev/null +++ b/software/gsl-1.15/.deps/gsl-histogram.Po @@ -0,0 +1,83 @@ +gsl-histogram.o: gsl-histogram.c config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + gsl/gsl_histogram.h + +config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/.deps/gsl-randist.Po b/software/gsl-1.15/.deps/gsl-randist.Po new file mode 100644 index 000000000..a85271a25 --- /dev/null +++ b/software/gsl-1.15/.deps/gsl-randist.Po @@ -0,0 +1,108 @@ +gsl-randist.o: gsl-randist.c config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h gsl/gsl_randist.h gsl/gsl_rng.h \ + gsl/gsl_types.h gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h gsl/gsl_inline.h gsl/gsl_test.h + +config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +gsl/gsl_randist.h: + +gsl/gsl_rng.h: + +gsl/gsl_types.h: + +gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +gsl/gsl_inline.h: + +gsl/gsl_test.h: diff --git a/software/gsl-1.15/.deps/version.Plo b/software/gsl-1.15/.deps/version.Plo new file mode 100644 index 000000000..c2bbd02e8 --- /dev/null +++ b/software/gsl-1.15/.deps/version.Plo @@ -0,0 +1,7 @@ +version.lo: version.c config.h gsl_version.h gsl/gsl_types.h + +config.h: + +gsl_version.h: + +gsl/gsl_types.h: diff --git a/software/gsl-1.15/AUTHORS b/software/gsl-1.15/AUTHORS new file mode 100644 index 000000000..968cecc03 --- /dev/null +++ b/software/gsl-1.15/AUTHORS @@ -0,0 +1,31 @@ +Mark Galassi (rosalia@lanl.gov) - overall design, simulated annealing +Jim Davies (jimmyd@nis.lanl.gov) - statistics library +James Theiler (jt@lanl.gov) - random number generators +Brian Gough (bjg@network-theory.co.uk) - + FFTs, numerical integration, random number generators and distributions, + root finding, minimization and fitting, polynomial solvers, complex + numbers, physical constants, permutations, vector and matrix functions, + histograms, statistics, ieee-utils, revised CBLAS Level 2 & 3, matrix + decompositions and eigensystems. +Reid Priedhorsky (rp@lanl.gov) - root finding +Gerard Jungman (jungman@lanl.gov) special functions, interpolation, + series acceleration, ODEs, BLAS, Linear Algebra, Eigensystems, + Hankel Transforms. +Michael Booth (booth@debian.org (email address not working)) - Monte + Carlo integration +Fabrice Rossi (rossi@ufrmd.dauphine.fr) - Multidimensional minimization +Simone Piccardi (piccardi@fi.infn.it) - Ntuples +Carlo Perassi (carlo@linux.it) - Additional random number generators +Dan, Ho-Jin (hjdan@sys713.kaist.ac.kr) - divided differences interpolation +Szymon Jaroszewicz (sj@cs.umb.edu) - combinations +Nicolas Darnis (ndarnis@cvf.fr) - cyclic functions and the initial functions for + canonical permutations. +Tuomo Keskitalo (tuomo.keskitalo@iki.fi) - multidimensional minimization and + ode-initval2 routines for ordinary differential equations +Ivo Alxneit (ivo.alxneit@psi.ch) - multidimensional minimization, wavelet + transforms +Jason H. Stover (jason@sakla.net) - cumulative distribution functions +Patrick Alken - nonsymmetric and generalized eigensystems, B-splines +Rhys Ulerich (rhys.ulerich@gmail.com) - multisets +Pavel Holoborodko - fixed order Gauss-Legendre quadrature +Pedro Gonnet - CQUAD integration routines. diff --git a/software/gsl-1.15/BUGS b/software/gsl-1.15/BUGS new file mode 100644 index 000000000..d757de4cd --- /dev/null +++ b/software/gsl-1.15/BUGS @@ -0,0 +1,1153 @@ +The GSL Bugs Database is at http://savannah.gnu.org/bugs/?group=gsl + +This file was generated from it at Fri Apr 1 16:38:49 2011 + +------------------------------------------------------------------------ +BUG-ID: 28267 +STATUS: Open/Postponed +CATEGORY: Accuracy problem +SUMMARY: poor convergence region for gsl_sf_hyperg_1F1 + +The magnitude of the error is greater than the value itself for +a<<0, b>0, x>>0 + +gsl_sf_hyperg1F1(-3.78e+01, 2, 1.035e+02) => -7.00055e+18 +/- 3.77654e+19 + +----------------------------------------------- +From: Weibin Li +To: bug-gsl@gnu.org +Subject: [Bug-gsl] gsl_sf_hyperg_1F1 +Date: Mon, 30 Nov 2009 15:26:11 +0100 + +Hi, guys + +I experienced bugs with gsl_sf_hyperg_1F1. The version is gsl_1.12, but +the testing is also done with gsl_1.13, using a mac with version 10.5.8 +and hp-workstation with gnome_2.24.1. + +#include +#include +#include +#include "gsl/gsl_sf_hyperg.h" + +int main(int argc, char **argv) +{ + int ii; + double Ri; + double v0; + + gsl_sf_result r; + for(ii = 10; ii< 140;ii++) +{ + Ri = 2013; + v0 =38.86871 +ii*2.5e-10; + + gsl_sf_hyperg_1F1_e(1.0-v0,2,2.0*Ri/v0,&r); + printf("%lg\t%14.13g\t%14.13g\n",v0,r.val,r.err); + + } +return 0; +} + +The output of above code shows an extremely large error. by increasing +Ri, the relative error decreases. Is there any idea to fix this? + +Thank you very much. + +Best + +Weibin + +-It's inherently difficult to compute the value in this region either way as there is massive cancellation in both the series and the Kummer transformed series.I cannot find any algorithm which handles this case.Confirmed + +------------------------------------------------------------------------ +BUG-ID: 21828 +STATUS: Open/Confirmed +CATEGORY: Performance +SUMMARY: suboptimal performance of gsl_fdfsolver_lmsder + +From: "Alexander Usov" +To: help-gsl@gnu.org +Subject: [Help-gsl] Strange performance of gsl_fdfsolver_lmsder +Date: Wed, 24 Oct 2007 20:45:01 +0200 + +Hi all, + +I am currently working on the problem involving source extraction from +astronomical images, which essentially boils down to fitting a number of +2d gaussians to the image. + +One of the traditionally used fitters in this field is a Levenberg-Marquardt, +which gsl_fdfsolver_lmsder is and implementation of. + +At some moment I have notices that for the bigger images (about 550 +pixels, 20-30 parameters) gsl's lmsder algorithm spends a large fraction +of the run-time (about 50%) doing household transform. + +While looking around for are different minimization algorithms I have made +a surprising finding that original netlib/minpack/lmder is almost twice faster +that that of gsl. + +Could anyone explain such a big difference in performace? + +-- +Best regards, + Alexander. + +_______________________________________________ +Help-gsl mailing list +Help-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/help-gsl + +Reply-To: help-gsl@gnu.org +From: Brian Gough +To: "Alexander Usov" +Cc: help-gsl@gnu.org +Subject: Re: [Help-gsl] Strange performance of gsl_fdfsolver_lmsder +Date: Thu, 25 Oct 2007 21:57:08 +0100 + +At Wed, 24 Oct 2007 20:45:01 +0200, +Alexander Usov wrote: +> At some moment I have notices that for the bigger images (about 550 +> pixels, 20-30 parameters) gsl's lmsder algorithm spends a large fraction +> of the run-time (about 50%) doing household transform. +> +> While looking around for are different minimization algorithms I have made +> a surprising finding that original netlib/minpack/lmder is almost twice faster +> that that of gsl. +> +> Could anyone explain such a big difference in performace? + +I have a vague memory that there was some quantity (Jacobian?) that +MINPACK only computes fully at the end, but in GSL it is accessible to +the user at each step so I felt I had to update it on each iteration +in the absence of some alternate scheme. Sorry this is not a great +answer but I am not able to look at it in detail now. + +-- +Brian Gough + +_______________________________________________ +Help-gsl mailing list +Help-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/help-gsl + +1824 + +------------------------------------------------------------------------ +BUG-ID: 21831 +STATUS: Open +CATEGORY: Accuracy problem +SUMMARY: Levý random number generator for alpha < 1 + +From: rafael@fis.unb.br +To: bug-gsl@gnu.org +Subject: [Bug-gsl] Levý random number generator +Date: Mon, 26 Mar 2007 19:48:01 -0300 + +The Levý skew random number generator (gsl_ran_levy_skew) does not +procuce a Levý random number when beta=0 (symmetric case), and the +gsl_ran_levy function does not work as stated in the docs. I made some +histograms from 10^6 samples to check the accuracy of the algorithms, +by comparison agaisnt the numerical integration of the equation of +Levý's PDF. For the gsl_ran_levy function there is a good precison for +alpha [1,2], for alpha (0.3,1) you must sum a series of random numbers +to get the same precision (tipicaly 100 or more gsl_ran_levy numbers). +For alpha<=0.3 the algorithm does not work properly, even worse, the +error increases as you add more random numbers. This contradicts the +manual that says "the algoritm only works for alpha (0,2]". The +function gsl_ran_levy_skew does not produce levy random numbers when +beta=0, instead the pdf of the random numbers is a linear (?!?!) one. + +---------------------------------------------------------------- +This message was sent using IMP, the Internet Messaging Program. + +_______________________________________________ +Bug-gsl mailing list +Bug-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-gsl + +From: rafael@fis.unb.br +To: Brian Gough +Cc: +Subject: Re: [Bug-gsl] Lev? random number generator +Date: Tue, 27 Mar 2007 09:35:15 -0300 + +Thanks for your quick answer, and sorry about my poor english, it is +not my natural language. + +The code below generates 10^6 random numbers, and makes a normalized +histogram wich is compared to the levy pdf. To get the levy pdf, it +numericaly integrates the characteristic function for levy process +(the function f in the code). The n parameter just adds a series of +levy numbers to get better precision. The code saves 2 files: +lhist-$alpha-$n (the normalized histogram) and lpdf-$alpha (the pdf +for the levy process). It also prints to the stdout the absolute error +(square of the difference) between the histogram and the pdf. + +The function levy skew shows problems for alpha<1. + +With this code, you can also check the problems related to the +gsl_ran_levy function (just change gsl_ran_levy_skew by gsl_ran_levy, +cutting the last paramenter). + +I am using the pre-compiled gsl that comes with debian etch (gsl +version 1.8.2). + +If you are interested, I also encoded a routine to generate levy skew +random numbers, it is not fully tested, but it works for beta=0 and +alpha<1 (it suffers from the same precision problem as gsl_ran_levy +function for small alpha) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +double f (double x, void *params) +{ + double alpha = *(double *) params; + double f = exp(-pow(x,alpha))/M_PI; + return f; +} + +double *levy_pdf(double alpha,int hist_size,double a,double b) +{ + double abserr,*lpdf,dx; + gsl_function F; + int i; + gsl_integration_workspace *w=gsl_integration_workspace_alloc(1000); + gsl_integration_workspace *cw=gsl_integration_workspace_alloc(1000); + gsl_integration_qawo_table +*wf=gsl_integration_qawo_table_alloc(0.0,1.0,GSL_INTEG_COSINE,200); + lpdf=(double*)calloc(hist_size,sizeof(double)); + F.function=&f; + F.params=α + dx=(double)(b-a)/(double)hist_size; + for (i=0;itv_usec; + gsl_rng_set(r,rnd_seed); + i=0; + do + { + l[i]=0.0; + for (j=1;j At Mon, 26 Mar 2007 19:48:01 -0300, +> rafael@fis.unb.br wrote: +>> +>> The Lev? skew random number generator (gsl_ran_levy_skew) does not +>> procuce a Lev? random number when beta=0 (symmetric case), and the +>> gsl_ran_levy function does not work as stated in the docs. I made some +>> histograms from 10^6 samples to check the accuracy of the algorithms, +>> by comparison agaisnt the numerical integration of the equation of +>> Lev?'s PDF. For the gsl_ran_levy function there is a good precison for +>> alpha [1,2], for alpha (0.3,1) you must sum a series of random numbers +>> to get the same precision (tipicaly 100 or more gsl_ran_levy numbers). +>> For alpha<=0.3 the algorithm does not work properly, even worse, the +>> error increases as you add more random numbers. This contradicts the +>> manual that says "the algoritm only works for alpha (0,2]". The +>> function gsl_ran_levy_skew does not produce levy random numbers when +>> beta=0, instead the pdf of the random numbers is a linear (?!?!) one. +> +> Thanks for your email. Please can you send a small example program +> which demonstrates the problem. +> +> Note that the Levy skew generator is tested in the GSL test suite for +> several cases where beta=0 -- if you have not done so, can you run +> "make check" and confirm that it works for these cases. +> +> -- +> Brian Gough +> (GSL Maintainer) +> +> Network Theory Ltd, +> Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/ +> + +---------------------------------------------------------------- +This message was sent using IMP, the Internet Messaging Program. + +_______________________________________________ +Bug-gsl mailing list +Bug-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-gsl + +- + +------------------------------------------------------------------------ +BUG-ID: 21833 +STATUS: Open +CATEGORY: Performance +SUMMARY: suboptimal performance of gsl permutation? + +From: "djamel anonymous" +To: bjg@network-theory.co.uk +Subject: gsl permutation +Date: Wed, 24 Jan 2007 07:42:06 +0000 + +Hi. +i am sending you this email about a possible issue in glibc permutation +algorithm.i think it has qudratic worst case running time.for example if we +have the permutation +1,2,3,4,,,,,n,0 +we will permute all elements in first iteration then for each iteration we +will traverse on average half the cycle (which is of size n) before we know +that the elements of cycle have already been permuted.there is two possible +solutions to make the algorithm linear: +1-at each step we traverse the full cycle and permute all elements in the +cycle.for each permuted element i we assign p[i]=i.the disavantage of this +is that it will destroy the original permutation. +2-use a bit array of size n bits.each time we permute an element we set the +relevant bit.if at iteration i we find that bit i is already set we skip to +next iteration.the disavantage of this is that it equires additional storage +allocation. +best regards. + +_________________________________________________________________ +MSN Hotmail sur i-mode? : envoyez et recevez des e-mails depuis votre +téléphone portable ! http://www.msn.fr/hotmailimode/ + +3 - Normal + +------------------------------------------------------------------------ +BUG-ID: 21835 +STATUS: Open +CATEGORY: Accuracy problem +SUMMARY: gsl_sf_hyperg_2F1 problematic arguments + +BUG#1 -- gsl_sf_hyperg_2F1_e fails for some arguments + +From: keith.briggs@bt.com +Subject: gsl_sf_hyperg_2F1 bug report +Date: Thu, 31 Jan 2002 12:30:04 -0000 + +gsl_sf_hyperg_2F1_e fails with arguments (1,13,14,0.999227196008978,&r). +It should return 53.4645... . + +#include +#include + +int main (void) +{ + gsl_sf_result r; + gsl_sf_hyperg_2F1_e (1,13,14,0.999227196008978,&r); + printf("r = %g %g\n", r.val, r.err); +} + +NOTES: The program overflows the maximum number of iterations in +gsl_sf_hyperg_2F1, due to the presence of a nearby singularity at +(c=a+b,x=1) so the sum is slowly convergent. + +The exact result is 53.46451441879150950530608621 as calculated by +gp-pari using sumpos(k=0,gamma(a+k)*gamma(b+k)*gamma(c)*gamma(1)/ +(gamma(c+k)*gamma(1+k)*gamma(a)*gamma(b))*x^k) + +The code needs to be extended to handle the case c=a+b. This is the +main problem. The case c=a+b is special and needs to be computed +differently. There is a special formula given for it in Abramowitz & +Stegun 15.3.10 + +As reported by Lee Warren another set of +arguments which fail are: + +#include +#include + +int main (void) +{ + gsl_sf_result r; + gsl_sf_hyperg_2F1_e (-1, -1, -0.5, 1.5, &r); + printf("r = %g %g\n", r.val, r.err); +} + +The correct value is -2. + +See also, + +From: Olaf Wucknitz +To: bug-gsl@gnu.org +Subject: [Bug-gsl] gsl_sf_hyperg_2F1 + +Hi, + +I am having a problem with gsl_sf_hyperg_2F1. +With the parameters (-0.5, 0.5, 1, x) the returned values show a jump at +x=0.5. For x<0.5 the results seem to be correct, while for x>0.5 they +aren't. +The function gsl_sf_hyperg_2F1_e calls hyperg_2F1_series for x<0.5, but +hyperg_2F1_reflect for x>0.5. The latter function checks for c-a-b being +an integer (which it is in my case). If I change one of the parameters +a,b,c by a small amount, the other branch of the function is taken and the +results are correct again. +Unfortunately I know too little about the numerics of 2F1 to suggest a +patch at the moment. + +Regards, +Olaf Wucknitz +-- +Joint Institute for VLBI in Europe wucknitz@jive.nl + +------------------------------------------------------------------------ +BUG-ID: 21836 +STATUS: Open/Confirmed +CATEGORY: Accuracy problem +SUMMARY: gamma_inc_P and gamma_inc_Q only satisfy P+Q=1 within errors + +BUG#44 -- gamma_inc_P and gamma_inc_Q only satisfy P+Q=1 within errors + +The sum of gamma_inc_P and gamma_inc_Q doesn't always satisfy the +identity P+Q=1 exactly (although it is correct within errors), due the +slightly different branch conditions for the series and continued +fraction expansions. These could be made identical so that P+Q=1 exactly. + +#include +#include + +int +main (void) +{ + gsl_sf_result r1, r2; + double a = 0.3, x = 1.0; + gsl_sf_gamma_inc_P_e (a, x, &r1); + gsl_sf_gamma_inc_Q_e (a, x, &r2); + printf("%.18e\n", r1.val); + printf("%.18e\n", r2.val); + printf("%.18e\n", r1.val + r2.val); +} + +$ ./a.out +9.156741562411074842e-01 +8.432584375889111417e-02 +9.999999999999985567e-01 + +3 - NormalNone + +------------------------------------------------------------------------ +BUG-ID: 21837 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: gsl_linalg_solve_symm_tridiag requires positive definite matrix + +A zero on the diagonal will cause NaNs even though a reasonable +solution could be computed in principle. + +#include + +int main (void) +{ + double d[] = { 0.00, 1.21, 0.80, 1.55, 0.76 } ; + double e[] = { 0.82, 0.39, 0.09, 0.68 } ; + double b[] = { 0.07, 0.62, 0.81, 0.11, 0.65} ; + double x[] = { 0.00, 0.00, 0.00, 0.00, 0.00} ; + + gsl_vector_view dv = gsl_vector_view_array(d, 5); + gsl_vector_view ev = gsl_vector_view_array(e, 4); + gsl_vector_view bv = gsl_vector_view_array(b, 5); + gsl_vector_view xv = gsl_vector_view_array(x, 5); + + gsl_linalg_solve_symm_tridiag(&dv.vector, &ev.vector, &bv.vector, &xv.vector); + gsl_vector_fprintf(stdout, &xv.vector, "% .5f"); + + d[0] += 1e-5; + gsl_linalg_solve_symm_tridiag(&dv.vector, &ev.vector, &bv.vector, &xv.vector); + gsl_vector_fprintf(stdout, &xv.vector, "% .5f"); +} + +$ ./a.out + nan + nan + nan + nan + nan + 0.13626 + 0.08536 + 1.03840 +-0.60009 + 1.39219 + +AUG 2007: We now return an error code for this case. To return a solution +we would need to do a permutation, see slatec/dgtsl.f + +3 - NormalNone + +------------------------------------------------------------------------ +BUG-ID: 24252 +STATUS: Open/Confirmed +CATEGORY: None +SUMMARY: suggestion: add gamma tail distribution + +From: Laedermann Jean-Pascal +To: Brian Gough +Subject: RE : RE : tail gamma +Date: Thu, 11 Sep 2008 08:45:41 +0200 + +Hello, + +It's only a piece of C code I attach here. +The source is the excellent book of Devroye (chapter nine p 420), see attachments. + +Hoping this will be useful. + +Jean-Pascal Laedermann, PhD +ing. phys. EPFL, math. UNIL + +--Noneadd the function, with suitable name +add to gsl_randist.h header file +add corresponding _pdf distribution function +add test functions in test.c +add documentation in doc/randist.texi + +------------------------------------------------------------------------ +BUG-ID: 24871 +STATUS: Open/Confirmed +CATEGORY: None +SUMMARY: suggestion, add support for E_n + +Dear GSL group, + +Thank you very much for your work on GSL. I use it much in Octave. + +I think it would be great if you could improve the GSL routines +for computations of exponential integrals so that they can accept complex arguments too. A good algorithm for this was published in + +ACM Transactions on Mathematical Software +Donald E. Amos, Computation of Exponential Integrals of a Complex Argument, vol.16, no. 2, p.169--177, 1990, +http://doi.acm.org/10.1145/78928.78933 + +ACM Transactions on Mathematical Software +Donald E. Amos, Algorithm 683: A Portable FORTRAN Subroutine for Exponential Integrals of a Complex Argument, vol.16, no. 2, +p.178--182, 1990, +http://doi.acm.org/10.1145/78928.78934 + +The fortran code is available at +http://www.netlib.org/toms/683 +http://www.netlib.no/netlib/toms/683 +http://www.mirrorservice.org/sites/netlib.bell-labs.com/netlib/toms/683.gz +http://scicomp.ewha.ac.kr/netlib/toms/683 + +With best wishes, +Oleg + +--- +D.Sc. Oleg V. Motygin, +Institute of Problems in Mech Engineering +Russian Academy of Sciences +V.O., Bol'shoj pr. 61 +199178 St.Petersburg +Russia +email: o.v.motygin@gmail.com, mov222@yandex.ru + +_______________________________________________ +Bug-gsl mailing list +Bug-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-gsl + +------------------------------------------------------------------------ +BUG-ID: 25320 +STATUS: Open +CATEGORY: Accuracy problem +SUMMARY: Import fresnel, bugs on GSL Extension Fresnel + +The fresnel extension should be imported for the next release, with the following bug report checked. + +From: "Toshiro Ohsaki" +To: +Subject: [Bug-gsl] Bugs on GSL Extension Fresnel +Date: Wed, 26 Nov 2008 21:07:02 +0900 + +Dear staff of GNU + + I found bugs on GSL Extensions/Applications Fresnel by Andrew Steiner. + This program does not return a correct value, if x is negative. + +The original function fresnel_c is coded as, + +double fresnel_c(double x) +{ + double xx = x*x*pi_2; + double ret_val; + if(xx<=8.0) + ret_val = fresnel_cos_0_8(xx); + else + ret_val = fresnel_cos_8_inf(xx); + return (x<0.0) ? -ret_val : ret_val; +} +. + + I think it should be coded as, + +double fresnel_c(double x) +{ + double xx = x*x*pi_2; + double ret_val; + double sign; + + if(xx < 0.0){ + xx*=-1.0; + sign=-1.0; + } + else{ + sign=1.0; + } + + if(xx<=8.0) + ret_val = fresnel_cos_0_8(xx); + else + ret_val = fresnel_cos_8_inf(xx); + + ret_val*=sign; + + return(ret_val); +} +. + +The same correction should be done on the function fresnel_s. + +Sincerely yours, +Toshiro Ohsaki +from Tokyo Japan. +_______________________________________________ +Bug-gsl mailing list +Bug-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-gsl + +------------------------------------------------------------------------ +BUG-ID: 29606 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: insufficient argument checks in gsl_sf_coupling_6j + +From: "Hergert, Heiko" +To: +Subject: [Bug-gsl] Error in 6j symbol routine (gsl_sf_coupling_6j) +Date: Thu, 15 Apr 2010 15:11:24 -0400 + +Hi, + +I just came about this bug in gsl_sf_coupling_6j() in GSL 1.13 (haven't +checked newer builds). + +The check of the triangle conditions (via the routine +triangle_selection_fails) doesn't properly rule out all unphysical +combinations of angular momenta. For instance + +gsl_sf_coupling(0, 2, 2, 44, 43, 43) = 0.087039 + +but the routine should return 0 since this symbol is unphysical: +jb=1 and jc=21 cannot be coupled to jf=43/2=21.5 although the triangle +tests are nominally satisfied + +abs(1-21.5)=20.5 <= 21 <= 22.5. + +A possible fix would be to check if + +(two_ja + two_jb + two_jc)%2 == 0 + +ja+jb+jc is always integer in physically allowed couplings (i.e., +2*(ja+jb+jc) must be even). + +The routine for the 3j symbol is not similarly affected due to the +additional m_selection_fails() test. + +-- +<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +<< Heiko Hergert +<< National Superconducting Cyclotron Laboratory +<< Michigan State University +<< +<< phone: +1 517 908 7472 +<< mail: hergert@nscl.msu.edu +<< www : http://www.nscl.msu.edu +<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + +None100 + +------------------------------------------------------------------------ +BUG-ID: 29834 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: insufficient argument checking in blas wrapper + +the blas wrapper does not do full checking of its arguments +furthermore, the checking could be shared with the cblas routines via macros, to ensure consistency. + +From: José Luis García Pallero +To: help-gsl@gnu.org +Subject: Re: [Help-gsl] About invalid parameters in cblas implementation +Date: Fri, 24 Jul 2009 19:01:37 +0200 + +[1 ] +Hi, +Attached I send the second version (partial, only for level 2 routines with +standard 4 prefixes (S, D, C, Z)). I have used submacros as we discussed in +recent mails. I think that we must pass to submacros the variable 'pos' for +"return" the result and the position 'posIfError' as the "returned" value if +an error occurs. +But we need some trick for check with macros the parameter 'lda', because +the check is different depending on 'order' parameter and involves other +arguments like 'M' and 'N'. Probably, this check must be done explicitly. + +-- +***************************************** +José Luis García Pallero +jgpallero@gmail.com +(o< +/ / \ +V_/_ +Use Debian GNU/Linux and enjoy! +***************************************** +- + +------------------------------------------------------------------------ +BUG-ID: 30324 +STATUS: Open/Confirmed +CATEGORY: Accuracy problem +SUMMARY: improve range of 2F1 + +From: Heiko Bauke +To: help-gsl@gnu.org +Subject: [Help-gsl] Gauss hypergeometric +Date: Thu, 24 Jun 2010 21:11:53 +0200 + +Dear GSL developers, + +I would like to point out that the GSL functions gsl_sf_hyperg_2F1_e and +gsl_sf_hyperg_2F1 which compute the Gauss hypergeometric function for +-1<=x<1 may be extended with little effort to arguments in the interval +-oo=1 + return 0; +} + +I cannot say much about the accuracy and the stability of this approach. +I think, however, it is reasonable to extend gsl_sf_hyperg_2F1_e and +gsl_sf_hyperg_2F1 in this way. It would make these functions more +general and useful. + + Regards, + + Heiko + +[1] http://mathworld.wolfram.com/HypergeometricFunction.html + +------------------------------------------------------------------------ +BUG-ID: 30510 +STATUS: Open +CATEGORY: Runtime error +SUMMARY: problems with hyperg_U(a,b,x) for x<0 + +Reply-To: rrogers@plaidheron.com +From: Raymond Rogers +To: bug-gsl@gnu.org +Subject: Re: [Bug-gsl] hyperg_U(a,b,x) Questions about x<0 and values +Date: Thu, 08 Jul 2010 11:49:15 -0500 + +Brian Gough +Subject: Re: [Bug-gsl] hyperg_U(a,b,x) Questions about x<0 and values + of a +To: rrogers@plaidheron.com +Cc: bug-gsl@gnu.org +Message-ID: <43wrt61fkt.wl%bjg@gnu.org> +Content-Type: text/plain; charset=US-ASCII + +At Wed, 07 Jul 2010 10:14:34 -0500, +Raymond Rogers wrote: + +> > +> > 1) I was unable to find the valid domain of the argument a when x<0. +> > Experimenting yields what seem to be erratic results. Apparently +> > correct answers occur when {x<0&a<0& a integer}. References would be +> > sufficient. Unfortunately {x<0,a<0} is exactly the wrong range for my +> > problem; but the recursion relations can be used to stretch to a>0. If +> > I can find a range of correct operation for the domain of "a" of width >1. +> + +| Brian Gough +| Thanks for the email. There are some comments about the domain for +| the hyperg_U_negx function in specfunc/hyperg_U.c -- do they help? + +They explain some things, but I believe the section + + if (b_int && b >= 2 && !(a_int && a <= (b - 2))){} + else {} + +is implemented incorrectly; and probably the preceding section as well. Some restructuring of the code would make things clea\ +rer; but things like that should probably done in a different forum: email, blog, etc... +I think the switches might be wrong. In any case it seems that b=1 has a hole. Is there a source for this code? + +Note: the new NIST Mathematical handbook might have better algorithms. I am certainly no expert on implementing mathematical \ +functions (except for finding ways to make them fail). + +Ray + +Reply-To: rrogers@plaidheron.com +From: Raymond Rogers +To: bug-gsl@gnu.org +Subject: [Bug-gsl] Re: hyperg_U(a, b, x) Questions about x<0 and values of a, +Date: Sun, 11 Jul 2010 14:43:43 -0500 + +hyperg_U basically fails with b=1, a non-integer; because +gsl_sf_poch_e(1+a-b,-a,&r1); is throwing a domain error when given +gamma(0)/gamma(a). +Checking on and using b=1 after a-integer is checked is illustrated +below in Octave. I also put in recursion to evaluate b>=2. +I checked the b=1 expression against Maple; for a few values x<0,a<0,b=1 +and x<0,a<0,b>=2 integer. +-------------- +Unfortunately the routine in Octave to call hyperg_U is only set up for +real returns, which was okay for versions <1.14 . Sad to say I am the +one who implemented the hyperg_U interface, and will probably have to go +back :-( . Integrating these functions into Octave was not pleasant; +but perhaps somebody made it easier. I did translate the active parts +of hyperg_U into octave though; so it can be used in that way. + +Ray + +# +# +# Test function to evaluate b=1 for gsl 1.14 hyperg_U x<0 +# +function anss=hyperg_U_negx_1(a,b,x) + int_a=(floor(a)==a); + int_b=(floor(b)==b); +#neg, int, a is already taken care of so use it + if (int_a && a<=0) + anss=hyperg_U(a,b,x); + elseif (int_b && (b==1)) +#from the new NIST DLMF 13.2.41 + +anss=gamma(1-a)*exp(x)*(hyperg_U(1-a,1,-x)/gamma(a)-hyperg_1F1(1-a,1,-x)*exp((1-a)*pi*I)); + elseif (b>=2) +#DLMF 13.3.10 + anss=((b-1-a)*hyperg_U_negx_1(a,b-1,x) + +hyperg_U_negx_1(a-1,b-1,x))/x; + else + anss=hyperg_U(a,b,x); + endif +# +endfunction + +- + +------------------------------------------------------------------------ +BUG-ID: 30540 +STATUS: Open/Ready For Test +CATEGORY: Accuracy problem +SUMMARY: please, add convergence checks in rk4imp/rk2imp + +Quote from http://lists.gnu.org/archive/html/help-gsl/2009-12/msg00047.html + +--->8--- +It seems, for example, the 2 stages Gauss points are only iterate 3 steps, without checking whether it is converged or not. + +The reason I care about this is, Implicit Gauss RK4 is symplectic, which for Hamiltonian Dynamics simulation is a very important property, it has better conservation of the first integral. +--->8--- + +Attached example code (bug.c) for Henon-Heiles problem shows the linear error grow in the Hamiltonian. Compare with correct behavior for patched solvers (rk2imp.png/rk4imp.png). + +Please, review attached patch, targeted to solve the problem. + +----NoneThanks for the bug report. + +I'm merging a completely new and upgraded version of the ode solvers "ode-initval2" written by Tuomo Keskitalo in the next release. It includes the new solver ode-initval2/imprk4.c for implicit RK4. + +You can get the branch with + +bzr checkout http://bzr.savannah.gnu.org/r/gsl/ode-initval2/ + +To compile it use + + autoreconf -i -f; ./configure --enable-maintainer-mode ; make + +Please try it and let us know if it solves this problem.-I can't figure out how to use this code for fixed step size. imprk2/imprk4 seems to be not working at all for this case: +$ ./bug +Segmentation fault + +Other steppers works (e.g. rk2) just fine. See bug-ode2.c. + +Second, Newton-type iterations could be inefficient in general. See: Ernst Hairer, Christian Lubich, Gerhard Wanner, Geometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations. Springer Series in Comput. Mathematics, Vol. 31, Springer-Verlag 2002. pp. 330-332. + +(file #21314) + +------------------------------------------------------------------------ +BUG-ID: 30583 +STATUS: Open/Confirmed +CATEGORY: Documentation +SUMMARY: improve documentation for Elliptic functions + +the relationship between the Carlson Forms and the standard A&S forms of the elliptic functions should be included in the manual. + +In particular, the identities for negative k should be included, showing how to calculate those cases straightforwardly from the Carlson forms. + +See the post "Wolfram EllipticK vs gsl_sf_ellint_Kcomp" on help-gsl. + +------------------------------------------------------------------------ +BUG-ID: 30885 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: nans from gsl_sf_coulomb_wave_FG_e(1.2693881947287221e-07, 0.0, lam_F=37, lam_G=36) + +From: "Alexey A. Illarionov" +To: bug-gsl@gnu.org +Subject: [Bug-gsl] bug in gsl_sf_coulomb_wave_FG_e (gsl 1.14 compiled with \ + gcc 4.5.0) +Date: Wed, 25 Aug 2010 23:41:14 -0400 + +[1 ] +Hi guys, + +It seems that I find a bug in gsl_sf_coulomb_wave_FG_e. For large values +of lambda and small values of x, with eta = 0 it produces nan values +without raising of the flag. + +Here the sample cases (see attachment with example) + gsl_sf_coulomb_wave_FG_e(0.,1.2693881947287221e-07, 37, 1, ...) + gsl_sf_coulomb_wave_FG_e(0.,5.911135077240691e-07, 39, 1, ...) + gsl_sf_coulomb_wave_FG_e(0.,6.118185507743884e-07, 40, 1, ...) +and lots of others. + +It seems that the origin of the problem is at +coulomb_F_recur +function (call at coulomb.c:970), that return garbage-like big numbers +but the error flag is not raised. + +Here since we are interested only in unnormalized values we can makes a +workaround like checking if values greater than some number, renormalize +them to 1 for some value. But if this function is used elsewhere with +the need of normalized values, this workaround will produce problems there. + +Unfortunately I don't have time right now to dig in more, I'll try look +at it at the weekend if the issue is not solved by that date. + +P.S. I'm not sure, but for me at this values of arguments (x << +x_{turning_point}) using series approximation directly is more adequate +(if we do not consider G and Gp which I'm not sure how to deal). + +------------------------------------------------------------------------ +BUG-ID: 30947 +STATUS: Open +CATEGORY: None +SUMMARY: Please, include fixed step size control object for ode suite + +For now fixed step size and adaptive iterations uses different routines (low level gsl_odeiv_step_apply for fixed step size vs gsl_odeiv_evolve_apply). + +Attached patch add the control object for the first case. + +-Hi, + +one important reason for the evolve level functions is to allow for variable step size. If you really require a fixed step size for the stepper level, then you can use the for loop around step_apply function shown in the manual. + +Also, I'm afraid that using your cfxd may not guarantee the use of a fixed step size; also evolve_apply can change the step length, so you might have to have a function something like "evolve_apply_fixed_step_size" to do the job. + +BR, +Tuomo + +------------------------------------------------------------------------ +BUG-ID: 31109 +STATUS: Open/Confirmed +CATEGORY: Performance +SUMMARY: ode-initval/bsimp is always high order + +The bsimp_alloc() routine uses a very small EPSILON to set the order of +the integrator, and there seems to be no interface to change this. + +The result is that even for small steps and large error tolerances, a +minimum of 140 function evaluations are taken per timestep. For my +application, this is more than an order of magnitude more than are +necessary. + +Tom Quinn Astronomy, University of Washington +Internet: trq@astro.washington.edu +Phone: 206-685-9009 + +- + +------------------------------------------------------------------------ +BUG-ID: 31362 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: The Complete Elliptic Integrals (gsl_sf_ellint_Ecomp and _Kcomp) Loop Forever with NaN Argument + +Feeding a NaN to the complete elliptic integrals causes these functions to loop forever. Compile and execute the following program: + +------------------- +#include + +int main() { + double nan = 0.0/0.0; + + printf("Elliptic integral of nan = %g\n", gsl_sf_ellint_Ecomp(nan, GSL_PREC_DOUBLE)); + printf("Elliptic integral of nan = %g\n", gsl_sf_ellint_Kcomp(nan, GSL_PREC_DOUBLE)); + + return 0; +} +-------------------- + +Nothing will ever be printed. I haven't checked any of the other elliptic integral special functions. Probably these functions should return NaN with NaN arguments, but they could also call gsl_error(...) I suppose. In any case, the should not loop forever. +NoneThanks for the bug report. I've confirmed the problem and added a couple of test cases for it. + +------------------------------------------------------------------------ +BUG-ID: 31426 +STATUS: Open/Confirmed +CATEGORY: Runtime error +SUMMARY: infinite loop in gsl_eigen_symm + +Jens Jarolowski wrote: +> +> 1) +> I get an infinite loop in gsl_eigen_symm for a 1024 x 1024 Matrix . +> +> This matrix is contained in the file mat.bin in mat.zip, the program eigenval\ +s.cpp reads a matrix from file and executes gsl_eigen_symm . +> +> I use gsl 1.14 . +> +> Kernel : +> Linux 2.6.18.2-34-default x86_64 +> +> Distribution: +> openSUSE 10.2 (X86-64) +> +> 2) +> for gsl 1.8 on windows xp I get no loop but NaN-values ! +> + +---There was a previous report of the same thing + +https://savannah.gnu.org/bugs/?28096 + +It should have been fixed by the change at +http://git.savannah.gnu.org/gitweb/?p=gsl.git;a=commitdiff;h=f3e5b699128dd487c8f9442ced9dfc6cf5422923 + +but apparently that didn't fix all the causes. + +------------------------------------------------------------------------ +BUG-ID: 32257 +STATUS: Open +CATEGORY: None +SUMMARY: RFE: Import integration routines from quadrule + +I think you might want to have a look at quadrule + +http://people.sc.fsu.edu/~jburkardt/c_src/quadrule/quadrule.html + +which is LGPL licensed and thus could be integrated straight away in GSL. For instance Lobatto quadrature would be a good candidate for inclusion... + +------------------------------------------------------------------------ +BUG-ID: 32306 +STATUS: Open/Confirmed +CATEGORY: Accuracy problem +SUMMARY: sign error in gsl_sf_hyperg_2F1 + +There's a sign error discontinuity in gsl_sf_hyperg_2F1(-0.5,1.5,1,x) for x~=~0.5 + +bjg@nc:~/tmp$ ./a.out +0.5 -0.539352 8.64471e-15 +0.5 0.539353 6.22896e-14 + +-- + +------------------------------------------------------------------------ +BUG-ID: 32776 +STATUS: Open +CATEGORY: None +SUMMARY: RFE: Add brute-force quadratic numerical multidimensional minimizer + +Hi, + +currently there is no multidimensional minimizer that uses numerical derivatives. In many cases the Nelder and Mead routines aren't good enough and one would like to use brute-force numerics. + +Attached is a simple quadratic routine that could be added (suitably cleaned up) to provide this capability. +- + +------------------------------------------------------------------------ diff --git a/software/gsl-1.15/COPYING b/software/gsl-1.15/COPYING new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/software/gsl-1.15/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/software/gsl-1.15/ChangeLog b/software/gsl-1.15/ChangeLog new file mode 100644 index 000000000..838c121ab --- /dev/null +++ b/software/gsl-1.15/ChangeLog @@ -0,0 +1,887 @@ +2011-04-13 Brian Gough + + * gsl_nan.h (GSL_NEGZERO): define negative zero as explicitly + floating point, same for positive zero. + +2011-04-01 Rhys Ulerich + + * doc/bspline.texi: Correct valid index range for Greville abscissae + +2011-01-31 Peter Johansson + + * gsl.pc.in (GSL_CBLAS_LIB): allow user to choose cblas via + pkg-config + +2010-08-06 Brian Gough + + * ode-initval2: added Tuomo Keskitalo's new ode branch with a + gsl_odeiv2 prefix which is intended to be the new default. Will + retain gsl_odeiv for binary compatibility but old interface will + be deprecated. + +2010-05-25 Peter Johansson + + * configure.ac: added variable GSL_LIBM from macro AC_CHECK_LIBM + * Makefile.am: added GSL_LIBM in edit substitution + * gsl-config.in: using variable $GSL_LIBM rather than hard-coded -libm + * gsl.pc.in: using variable $GSL_LIBM rather than hard-coded -libm + +2010-04-24 Brian Gough + + * configure.ac: added macro for substituting isfinite by + gsl_finite when needed. + +2010-04-10 Giuseppe Scrivano + + * utils/memcpy.c (memcpy): Use the standand method signature. + + * utils/memmove.c (memmove): Likewise. + +2010-01-18 Brian Gough + + * gsl_version.h.in, configure.ac: added GSL_MAJOR_VERSION and + GSL_MINOR_VERSION macros + +2009-07-09 Brian Gough + + * configure.ac: added RETURN_IF_NULL macro to handle null argument + in free() type functions. + +2009-05-09 Brian Gough + + * configure.ac: improve tests for C99 inline, and don't test when + inline is not available + + * gsl_inline.h: added test for HAVE_C99_INLINE + +2009-04-10 Brian Gough + + * Makefile.am: generate gsl-config gsl.pc from Makefile instead + of configure, to allow make install prefix=... + +2008-09-26 Brian Gough + + * configure.ac: handle test for SSE in cross-compilation (fall + back to checking if the ldmxcsr instruction compiles) + +2008-07-03 Brian Gough + + * Makefile.am: added gsl_inline.h and build.h + + * gsl_mode.h gsl_pow_int.h: use new inline declarations + + * gsl_minmax.h: new header file for minmax functions, use new + inline declarations + + * gsl_math.h: moved minmax functions to separate header file + + * configure.ac: test for C99 inline as well + + * build.h gsl_inline.h: added new header to handle GNU-style and + C99 inlines + +2008-03-17 Brian Gough + + * configure.ac: remove hack to disable search for Fortran, Java, + C++ required with earlier versions of autoconf + +2007-09-01 Brian Gough + + * gsl.m4: changed default name to AX_PATH_GSL + +2007-08-22 Brian Gough + + * configure.ac: started moving definitions out of + acconfig.h (deprecated) + +2007-07-30 Brian Gough + + * configure.ac: check ieeefp.h for isfinite + +2007-04-23 Brian Gough + + * acconfig.h (finite): don't redefine finite in terms of isfinite, + which causes problems with system headers, use gsl_finite instead. + +2007-04-17 Brian Gough + + * configure.ac: use an actual floating point number instead of an + integer for testing long double I/O. + +2007-01-09 Brian Gough + + * gsl_math.h (M_PI_4): corrected typo in higher digits of M_PI_4 + (at ~1e-20) + +2006-11-02 Brian Gough + + * templates_on.h templates_off.h: added UNSIGNED definition for + detecting types without negative values + +2006-02-15 Brian Gough + + * configure.ac: restrict darwin IEEE detection to powerpc, because + new x86 macs are different. + + * removed automatic addition of compilation flags on alpha, + these should be specified on the command-line through CFLAGS. + +2006-01-07 Brian Gough + + * templates_on.h: added an FP=1 definition for the floating point + types, FP is undefined for integer types. + +2005-08-05 Brian Gough + + * gsl/Makefile.am: need to remove makefile with later versions of + automake + +2005-04-05 Brian Gough + + * configure.ac: added ieeefp.h test for solaris + +2005-01-13 Brian Gough + + * configure.ac: added case for 86_64 in IEEE arithmetic interface + detection + +2004-10-26 Brian Gough + + * test_gsl_histogram.sh: trim \r from test output for + compatibility with Cygwin. + +2004-07-29 Brian Gough + + * modified all makefiles to use TESTS=$(check_programs) + to get correct EXEEXT behavior + +2004-07-23 Brian Gough + + * added wavelet/ directory + +2004-05-28 Brian Gough + + * configure.ac: ran configure script through Autoconf's autoupdate + to use latest macro names + +2004-05-17 Brian Gough + + * gsl.m4: fix m4 quoting of first argument to AC_DEFUN + +2004-03-17 Brian Gough + + * gsl/Makefile.am (header-links): use test -r instead of test -e + (to avoid problem on Solaris as described in autoconf + documentation) + +2003-12-20 Brian Gough + + * configure.ac: define _GNU_SOURCE when looking for fenv.h + +2003-06-17 Brian Gough + + * configure.ac: converted configure.in to autoconf 2.5x, involved + extensive renaming macros of HAVE_... to HAVE_DECL_.. and changing + usage from #ifdef HAVE to #if HAVE + +2003-06-16 Brian Gough + + * gsl/Makefile.am (header-links): added a test for the existing + file to avoid spurious error messages when making the symlinks + +2003-06-12 Brian Gough + + * configure.in: Tidying up, removed old test for bug in gcc 2.95 + on PPC, removed OS/2 warning, removed references to clock function + since benchmark programs are not shipped + +2003-03-06 Brian Gough + + * gsl_types.h: changed from internal macro _DLL to GSL_DLL + +2003-02-09 Brian Gough + + * configure.in: added [] quotes in AC_TRY_COMPILE to protect + nested macros + +2002-11-24 Brian Gough + + * configure.in: check for presence of non-ansi functions in header + files before running AC_CHECK_FUNCS to look in libraries, to + support compilation with -ansi. + +Fri Sep 6 15:00:40 2002 Brian Gough + + * acconfig.h (GSL_RANGE_CHECK_OFF): turned range checking off in + acconfig.h as it overwrites config.h.in + +Wed Aug 7 22:34:36 2002 Brian Gough + + * config.h.in: fixed RANGE_CHECK_ON to GSL_RANGE_CHECK_ON + +Sun Jul 14 12:48:50 2002 Brian Gough + + * INSTALL: merged the MACHINES file into the installation notes. + +Fri Jun 14 22:09:52 2002 Brian Gough + + * gsl_types.h: define GSL_VAR macro as ANSI C 'export' or + '__declspec(dllexport/dllimport)' depending on platform + + * changed 'export' to GSL_VAR macro throughout to make it easier + to build nonstandard shared libraries such as DLLs + +Sun May 19 22:24:00 2002 Brian Gough + + * configure.in: changed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL, + use AC_SEARCH_LIBS to find math library + +Sat May 11 22:27:52 2002 Brian Gough + + * configure.in (ac_cv_func_printf_longdouble): fixed ieee + comparisons test so it actually works + (ac_cv_c_ieee_comparisons): added a test for denormalized values + +Fri Apr 26 19:53:31 2002 Brian Gough + + * Makefile.am (EXTRA_DIST): removed KNOWN-PROBLEMS + +Sun Feb 10 21:28:29 2002 Brian Gough + + * BUGS: added a list of known but unfixed bugs. + +2002-02-07 Mark Galassi + + * THANKS: added Karsten Howes . + +Wed Jan 16 16:55:25 2002 Brian Gough + + * configure.in acconfig.h: check whether IEEE comparisons work for + Inf, NaN and define HAVE_IEEE_COMPARISONS + +Tue Jan 8 21:38:23 2002 Brian Gough + + * config.h (GSL_RANGE_CHECK_OFF): turn off range checking when + building the library, still on by default when compiling user + applications + +Mon Nov 19 21:40:30 2001 Brian Gough + + * standardised all files to #include for exported header + files rather than having some as #include "...", to simplify build + procedure + +Fri Oct 19 15:19:45 2001 Brian Gough + + * gsl-histogram.c (main): use gsl_histogram_alloc instead of + calloc + +Wed Oct 3 11:06:51 2001 Brian Gough + + * removed auto-expanding RCS tokens from comments as they + interfere with making patches + + * configure.in: check for isinf(), finite(), isnan() as + macros. Also check for isfinite() as an alternative to finite(). + +Sat Sep 29 18:04:35 2001 Brian Gough + + * gsl.m4: cleaned up arguments to GSL_CONFIG + +Wed Sep 19 17:41:13 2001 Brian Gough + + * gsl-histogram.c (main): turn off the display of mean and + standard deviation it is too confusing because it is not the mean + of the data itself. + +Tue Sep 18 20:08:39 2001 Brian Gough + + * test_gsl_histogram.sh: modified the expected test output to + account for the mean,sigma lines now produced + +Wed Sep 12 13:39:55 2001 Brian Gough + + * gsl-histogram.c (main): print out the mean and standard + deviation as comments + +Sun Sep 9 22:57:11 2001 Brian Gough + + * configure.in: print out a warning for OS/2 telling the user to + run an extra script + +Fri Sep 7 14:32:01 2001 Brian Gough + + * gsl.pc.in: added pkg-config file + + * configure.in: avoid clobbering any LIBS specified, by not + putting -lm in front of them. This allows the user to specify an + alternate math library for the configure script. + (ac_cv_func_printf_longdouble): added generation of gsl.pc for + pkg-config + +Thu Sep 6 21:08:10 2001 Brian Gough + + * configure.in: added an option to specify an alternative math + library + +Tue Sep 4 09:41:37 2001 Brian Gough + + * gsl.spec.in: autogenerate gsl.spec from gsl.spec.in + +Sun Aug 26 17:19:24 2001 Brian Gough + + * acconfig.h: fixed incorrect #ifdef for HAVE_FINITE (Henry + Sobotka) + +Sat Aug 25 10:25:41 2001 Brian Gough + + * gsl_math.h: moved includes to beginning of file to avoid + redefinition errors on OS/2 + +Tue Aug 21 23:54:45 2001 Brian Gough + + * gsl_nan.h (GSL_POSINF): removed incorrect use of _FPCLASS.. for + MSVC, these are flags not numerical values. + +Thu Aug 9 22:51:00 2001 Brian Gough + + * config.h.in: added a macro for discarding a pointer, used to + suppress warnings from gcc about unused parameters + +Sun Aug 5 20:35:09 2001 Brian Gough + + * configure.in: move PPC bug test to beginning of configure + script, to save waiting for it to appear at the end + +Sat Jul 14 21:13:55 2001 Brian Gough + + * gsl_nan.h: use C99X macro INFINITY where available + +Fri Jul 13 21:31:01 2001 Brian Gough + + * templates_on.h: added macros for unqualified views, needed for + initialization of views + +Mon Jul 9 11:22:16 2001 Brian Gough + + * configure.in: made check for extended precision registers + independent of test for os ieee interface type + +Sun Jul 1 22:44:00 2001 Brian Gough + + * templates_on.h templates_off.h: modified to support views + +Wed Jun 27 12:15:19 2001 Brian Gough + + * configure.in: work around case of broken log1p in OpenBSD + +Mon Jun 25 10:21:17 2001 Brian Gough + + * configure.in: catch case of openbsd, which is not supported yet + in ieee directory + +Mon Jun 18 22:31:26 2001 Brian Gough + + * configure.in (GSL_CFLAGS): now just uses includedir for + gsl-config.in + +Wed Jun 6 18:10:18 2001 Brian Gough + + * removed explicit dependencies from Makefile.am's since automake + now handles these automatically + +Tue May 29 12:40:08 2001 Brian Gough + + * configure.in: added missing wildcard to end of hpux11* to match + different versions of hpux11, e.g. hpux11.2. + +Tue May 22 10:38:59 2001 Brian Gough + + * gsl.m4: try to make C-code compatible with C++, also changed + return() to exit() as mentioned in the autoconf documentation. + +2001-05-21 Mark Galassi + + * config.guess, config.sub: removed these auto-generated files + from CVS since they are built for developers by autogen.sh. + +Tue May 15 10:59:43 2001 Brian Gough + + * autogen.sh: upgraded to latest libtool and automake + +Tue May 1 12:19:01 2001 Brian Gough + + * gsl_nan.h (GSL_NAN): added definitions for Microsoft Visual C++ + +Mon Apr 30 13:46:39 2001 Brian Gough + + * gsl_math.h: split out gsl_pow_int.h and gsl_nan.h + +Wed Mar 21 14:16:29 2001 Brian Gough + + * gsl-config.in (Usage): allow user to specify an external blas + library through an environment variable + +2000-12-14 Mark Galassi + + * gsl.spec, configure.in: upped the version to 0.7+ since the + release has been made. + +2000-10-26 Mark Galassi + + * ltconfig, ltmain.sh: removed these auto-generated files. + +2000-10-26 Mark Galassi + + * stamp-h.in: removed this file because it is auto-generated. + + * scripts/mkknownproblems.sh: fixed it so it's slightly better, + but it still assumes that you run it out of $(srcdir)/scripts. + + * scripts/knownproblems.pl: put in a more standard path for perl. + + * AUTHORS: some changes and additions. + + * KNOWN-PROBLEMS: updated the list of known problems. + +2000-10-04 Mark Galassi + + * NEWS, configure.in, gsl.spec: upped the version to 0.7 as we are + about to release. + +Thu Jul 20 20:20:04 2000 Brian Gough + + * gsl.m4: changed \? to \{0,1\} in the sed commands to allow for + SGI sed (from Steve ROBBINS ) + +Sun Jul 9 19:34:03 2000 Brian Gough + + * gsl.m4: modified to accept x.y version numbers as the first + argument in addition to x.y.z version numbers + +Mon Jun 12 22:18:27 2000 Brian Gough + + * Makefile.am (SUBLIBS): added missing complex lib to top-level + SUBLIBS + +Sun Jun 11 17:39:18 2000 Brian Gough + + * gsl.spec (BuildRoot): fixed directory for install, it is now + /usr/lib/ instead of /usr/lib/gsl/ + +Tue Jun 6 20:02:02 2000 Brian Gough + + * acconfig.h, configure.in: use HAVE_X86LINUX_IEEE_INTEFACE for + x86 instead of generic HAVE_LINUX_IEEE_INTEFACE + +2000-06-02 Mark Galassi + + * gsl.spec: added gsl.m4 to the list of files. + + * NEWS: added a mention of gsl.m4. + + * gsl.spec: small changes to fix the installation of doc files. + + * Makefile.am: added some files (like MACHINES, KNOWN-PROBLEMS, + ...) to the distribution. + + * gsl.spec, configure.in, KNOWN-PROBLEMS: upped the version number + to 0.6. Also: gsl.spec now installes files like MACHINES, + KNOWN-PROBLEMS, NEWS,... into the package's %doc file list. + +Sun May 28 12:03:36 2000 Brian Gough + + * gsl/Makefile.am (header-links): use configurable macro variable + $(LN_S) instead of explicit "ln -s" + +Mon May 15 19:16:31 2000 Brian Gough + + * added ieee mode setting to all tests, so that they can be run in + double-precision even on extended precision architectures + +2000-05-14 Steve Robbins + + * acconfig.h: + * configure.in: look in both and /usr/include/float.h, + to find FP_RND_RN, as some versions of GCC don't copy these + symbols into the `fixed' header. + +Thu May 11 12:47:19 2000 Brian Gough + + * gsl_math.h (GSL_POSZERO): added macros for IEEE signed zeros, +0 + and -0. They don't do anything useful yet, but use the macro so + that will be possible to work around compilers that don't + understand the difference between the constants -0 and +0. + +Wed May 10 11:30:15 2000 Brian Gough + + * gsl_math.h (GSL_POSINF): make use of HUGE_VAL which is actually + +Inf when IEEE is available, and can be detected by the NAN being + defined (it is only defined on IEEE machines) + (GSL_NEGINF): as for GSL_POSINF + +Fri May 5 11:20:50 2000 Brian Gough + + * split out gsl_test code from err/ directory into test/ directory + +Thu May 4 12:14:42 2000 Brian Gough + + * added GPL headers throughout + +Mon May 1 22:11:32 2000 Brian Gough + + * modified all the makefiles to compile test programs as "test", + for simpler automated builds + +Tue Apr 11 14:51:59 2000 Brian Gough + + * eigen/eigen_sort.c (gsl_eigen_sort_impl): updated occurrence of + gsl_matrix_swap_cols to gsl_matrix_swap_columns + + * gsl.m4, Makefile.am: added gsl.m4 macros for autoconf + support + +2000-04-03 Mark Galassi + + * gsl-config.in, configure.in (GSL_CFLAGS): replaced my gsl-config + script with Christopher Gabriel's, which is simpler. + + * autogen.sh: changed this into a no-brainer which does not invoke + configure. + +Mon Apr 3 15:43:25 2000 Brian Gough + + * applied patch from C M Murphy to fix up + missing consts in header files. + +Sat Apr 1 20:12:34 2000 Brian Gough + + * gsl_math.h: added some missing extra constants from BSD + (e.g. M_PI_2) + +Wed Mar 15 11:16:14 2000 Brian Gough + + * added a directory for complex number support, complex/ + +Tue Mar 14 10:28:43 2000 Brian Gough + + * added support for including headers in C++ programs using + __BEGIN_DECLS and __END_DECLS macros + +Sat Mar 11 11:18:33 2000 Brian Gough + + * templates_on.h: added a definition for ONE, to match ZERO + + * Changed matrix struct element dim2 to tda throughout + +Mon Mar 6 19:48:27 2000 Brian Gough + + * gsl_version.h: added simple release-number based support for + accessing the version number at compile-time and run-time. This is + not a complete solution but it will do for now, as libtool + interface numbers are too complicated to worry about at the + moment due to other problems with libtool. + +Thu Mar 2 20:52:50 2000 Brian Gough + + * templates_on.h (ATOMIC_IO): added an internal type for IO, for + the cases where it isn't possible to read and write a type + directly as text (e.g. char) + +2000-02-23 Mark Galassi + + * Makefile.am, gsl.spec: added a gsl.spec. Seems to work. + + * gsl-config.in: overhauled gsl-config.in; should work better now. + +Tue Feb 15 18:55:05 2000 Brian Gough + + * added directory for permutation objects, permutation/ + +Sun Dec 5 14:20:43 1999 Brian Gough + + * added multidimensional minimisation directory, multimin/ + +1999-12-03 Mark Galassi + + * configure.in: upped the version to 0.5+, so that snaphots built + out of CVS will not be confused with the 0.5 release. + + * AUTHORS, README, HACKING: changed my email address. + + * README: updated with some of Brian's suggestions. + + * configure.in, NEWS: fixed the new version to 0.5. + +Tue Oct 19 11:15:16 1999 Brian Gough + + * added the eigen value directory, eigen/ + +1999-08-30 Mark Galassi + + * gsl-config.in: started adding this script, for now cannibalized + from gnome-config. + +Fri Aug 20 11:10:54 1999 Brian Gough + + * support for IEEE on Tru64 from Tim Mooney + +Mon Aug 16 21:10:23 1999 Brian Gough + + * added the minimization directory, min/ + +Fri Aug 6 11:15:58 1999 Brian Gough + + * configure.in: removed need to configure for rand() and RAND_MAX + by providing a simple random number generator in the directories + that used rand(). + +1999-08-05 Mark Galassi + + * Makefile.am: put the THANKS file into the distribution. + + * autogen.sh: added the --add-missing option to automake. I'm + surprised it was not already there. + + * configure.in: added a + to the version, indicating that any + snapshots made from anonymous CVS in this state should be + interpreted as "after 0.4.1 and before the next version", and no + other promises. + + * THANKS: added this THANKS file. We appreciate all patches from + people on the net, even those which are too small to warrant + adding the author to the AUTHORS file. The THANKS file should + include everyone who sent in patches. They should also be + mentioned in the ChangeLog entry. + +Sat May 8 21:06:31 1999 Brian Gough + + * configure.in: now check for "extern inline" using a modified + version of AC_C_INLINE, since we use "extern inline" but only + checked for "inline", and some compilers only support the latter. + +Sun Apr 11 20:40:35 1999 Brian Gough + + * libraries and include files are now installed in pkglibdir and + pkgincludedir (e.g. /usr/local/lib/gsl/ and + /usr/local/include/gsl/ by default) + + * libraries are now built and installed separately + +Mon Mar 1 15:41:25 1999 Brian Gough + + * gsl_math.h: renamed gsl_fdf to gsl_function_fdf, so that it will + be more obvious what it is + +Sun Feb 28 20:37:31 1999 Brian Gough + + * gsl_mode.h: added prototype for GSL_MODE_PREC(mt) + +Tue Feb 23 14:18:39 1999 Brian Gough + + * gsl_math.h (GSL_FDF_EVAL_F): improved names of macros + +Sat Feb 20 12:14:07 1999 Brian Gough + + * split out polynomial root finding algorithms into a new poly/ + directory + +1999-02-25 Mark Galassi + + * configure.in: upped the version to 0.4.1; this is ready for + tagging. + +1999-02-06 Mark Galassi + + * NEWS: udpated in occasion of the imminent 0.4.1 release. + +Sun Feb 14 20:47:07 1999 Brian Gough + + * Makefile.am: added gsl_mode.h to include_HEADERS + +Mon Feb 8 18:39:35 1999 Brian Gough + + * added new type gsl_function for arbitrary functions with + parameters, and gsl_fdf for functions and their derivatives + +Mon Feb 8 18:39:35 1999 Brian Gough + + * gsl_complex.h: added GSL_SET_REAL(&z,x) and GSL_SET_IMAG(&z,y), + changed GSL_COMPLEX_SET(z,x,y) to GSL_SET_COMPLEX(&z,x,y) to match. + +1999-01-03 Mark Galassi + + * Makefile.am, autogen.sh: improved autogen.sh, based on the gtk+ + autogen.sh. Added it to Makefile.am's EXTRA_DIST list. + +1999-01-02 Mark Galassi + + * configure.in: introduced a test for hypot(), in case a system + does not have it. + +1999-01-03 Mark Galassi + + * autogen.sh: added this simple script which calls aclocal, + automake --add-missind and autoconf, followed by ./configure with + all the arguments. + + * configure, Makefile.in, */Makefile.in: removed these + auto-generated files. + +Fri Dec 11 16:50:27 1998 Brian Gough + + * AUTHORS: corrected the spelling of Gerard Jungman's name (it's + either Gerard or Jerry, but not Gerry) + +1998-12-05 Mark Galassi + + * configure.in: made the version be 0.4after so it's clear that + snapshots will be post-0.4. + + * HACKING: updated a bit to work with the new CVS repository. + +Mon Nov 23 16:09:21 1998 Brian Gough + + * gsl_config.h: removed, it was an unnecessary hack just for + defining macros. Autoconf's config.h should be used by the + programmer instead. + +Sat Nov 21 20:39:14 1998 Brian Gough + + * texinfo.tex: removed, this is a duplicate and shouldn't be + needed in the top-level directory (it is in docs) + + * move any included headers in _source.c files into the master + file that includes the _source.c, since this saves time when + compiling + + * config.h.in: standardized on HAVE_PRINTF_LONGDOUBLE + +Fri Nov 20 15:14:53 1998 Brian Gough + + * replaced DBL_EPSILON, DBL_MAX, ... by GSL_DBL_EPSILON, + GSL_DBL_MAX, ... + + * added sys directory for miscellaneous gsl system functions like + max and min + +Thu Nov 19 22:46:43 1998 Brian Gough + + * config.h.in: removed MAX and MIN + +Wed Nov 18 10:40:18 1998 Brian Gough + + * gsl_math.h: added prototypes for inline functions GSL_MAX_INT + etc + +Tue Nov 10 20:05:27 1998 Brian Gough + + * gsl_math.h: moved the MAX(a,b) and MIN(a,b) to gsl_math.h and + renamed them GSL_MAX(a,b) and GSL_MIN(a,b) to avoid inevitable + conflicts with system macros. + +Mon Nov 9 21:08:10 1998 Brian Gough + + * config.h: added MAX(a,b) and MIN(a,b) macros since we use these + everywhere. We assume that if they are defined by the system then + they do actually work. + +1998-11-06 + + * configure.in: add -mieee on alpha platforms, also check for both + scanf and printf working with long double + +1998-08-31 James Theiler + + * Makefile.am (SUBDIRS): added utils directory + + * configure.in (AC_OUTPUT): added utils/Makefile + + * configure.in (AC_REPLACE_FUNCS): added strtol, strtoul; removed + strerror since it's already hardcoded into the err/ directory + +1998-08-30 Mark Galassi + + * configure.in: upped release number to 0.4; about to tag and make + the release. + +1998-08-20 Mark Galassi + + * configure.in: upped version to 0.4-interim as we prepare for a + 0.4 snapshot. + + * NEWS: now refers to 0.4 instead of 0.3g. Also "commented out" + (smile) the note that says "we need to do a better job with the + news file", since it looks quite good now! + +1998-08-19 Mark Galassi + + * doc/Makefile.am (EXTRA_DIST): added ran-exppow.tex, + rand-levy.tex, rand-gumbel.tex and rand-bernoulli.tex to + EXTRA_DIST. Now they are included in the distribution and a "make + distcheck" goes further. + +Thu Jul 30 16:12:05 1998 Brian Gough + + * Makefile.am: now using a script to write the AR commands + explicitly, this should be more portable + +Tue Jul 28 23:07:04 1998 Brian Gough + + * Makefile.am: new style single build of libgsl.a + +Fri Jul 10 19:57:49 1998 Brian Gough + + * configure.in: removed AC_FUNC_ALLOCA since we don't use alloca + (it is not ansi) + +Sun Jun 28 14:31:31 1998 Brian Gough + + * replaced the random/ directory by the rng/ directory and made + minor changes in randist/, siman/ to accommodate it + +Tue Jun 23 19:49:22 1998 Brian Gough + + * added a top-level file gsl_config.h for detecting features when + users include the library headers. Currently it just turns on + HAVE_INLINE if you are using GCC or C++. + +1998-05-16 Mark Galassi + + * configure.in: Brian fixed the error where libgslerr.a was not + being installed in the 0.3e release, so I just bumped it up to + 0.3f to make a new release. + +1998-05-14 Mark Galassi + + * configure.in: upped the version to 0.3e, and this time I might + actually make the public snapshot! + +Wed Apr 8 18:30:48 1998 Brian Gough + + * Now using the automake variable check_PROGRAMS everywhere for + the testing programs (no need to build them unless we do make + check) + +Mon Apr 6 15:09:08 1998 Brian Gough + + * added matrix and vector subdirectories + +Wed Mar 18 10:27:27 1998 Brian Gough + + * gsl_complex.h: the typedef for 'complex' has been renamed to + gsl_complex, to avoid conflicts with C++ bindings and libstdc++ + +1998-02-09 Mark Galassi + + * configure.in: 0.3b is now released, so I upped the version + number to 0.3c-interim. + +1998-02-09 Mark Galassi + + * configure.in: upped version number to 0.3b + +1998-01-30 Mark Galassi + + * AUTHORS: added Gerry Jungman to the authors list. + diff --git a/software/gsl-1.15/INSTALL b/software/gsl-1.15/INSTALL new file mode 100644 index 000000000..1a476f43b --- /dev/null +++ b/software/gsl-1.15/INSTALL @@ -0,0 +1,551 @@ +GSL - GNU Scientific Library +============================ + +Installation Instructions +========================= + +GSL follows the standard GNU installation procedure. To compile GSL +you will need an ANSI C-compiler. After unpacking the distribution +the Makefiles can be prepared using the configure command, + + ./configure + +You can then build the library by typing, + + make + +Both static and shared versions of the libraries will be compiled by +default. Compilation of shared libraries can be turned off by +specifying the `--disable-shared' option to `configure', e.g. + + ./configure --disable-shared + +If you encounter problems building the library try using the above +option, because some platforms do not support shared libraries. If +you change any compilation options you will need to remove any +existing compiled files with, + + make clean + +before running "make" again, so the new settings take effect. + +For notes about problems with specific platforms and compilers see the +next section of this file (below). + +An extensive test suite is available. After compiling the library +with "make", it can be invoked with "make check" at the top level. +The test output should be directed to a file rather than a terminal, +with the command, + + make check > log 2>&1 + +to allow any errors to be examined in detail. By default, only test +failures are shown. To see the complete output, set the environment +variable GSL_TEST_VERBOSE=1. Use "make -k check" to continue running +the remaining tests in the event of failures. + +If you run the tests and get some failures, please see the notes on +platform specific problems below. If you find failures that are not +mentioned, please report them to bug-gsl@gnu.org. + +The library can be installed using the command, + + make install + +The default installation directory prefix is /usr/local. Installing +in this directory will require root privileges on most systems (use +"su" or "sudo"). + +The installation directory can be changed with the --prefix option to +configure. Consult the "Further Information" section below for +instructions on installing the library in another location or changing +other default compilation options. + +When building from source, GNU packages are compiled with debugging +symbols enabled by default (CFLAGS="-g -O2"). It's part of the +philosophy that anyone should be able to examine any program on the +system. + + ------------------------------ + +Platform Specific Compilation Notes +=================================== + +This section documents any known issues with installing GSL on +specific platforms. + + * General hints for all platforms + * AIX + * Compaq/DEC Alpha + * HP-UX + * IRIX + * MacOS X / PowerPC + * Microsoft Windows + * OpenBSD + * OS/2 + * Solaris + +Hints for any platform +====================== + +1) If there are problems building the library try using + + ./configure --disable-shared --disable-dependency-tracking + +This will turn off the compilation of shared libraries and dependency +tracking and may allow the build process to complete successfully. + +If you get any problems try this first. + +2) If your compiler uses the C99-style inline keyword, use + + ./configure CFLAGS="-DGSL_C99_INLINE -g -O2" + +to avoid problems with duplicate function definitions. For gcc this +is handled automatically. See the file gsl_inline.h for the +preprocessor definitions that are used. + +3) If you want to pass C++ functions with exceptions to GSL, the +library needs to be compiled with the GCC option -fexceptions + + ./confugire CFLAGS="-fexceptions ..." + +to allow C++ exceptions to be handled. + +4) With gcc-4.3.2 the tests in the poly/ directory fail due to a +compiler optimization bug which is fixed in later versions of GCC +(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38478). + +FAIL: y.real, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i) (-1.68450788000000018 observed vs 1.82462012000000007 expected) [9] +FAIL: y.imag, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i) (-0.30943988 observed vs 2.30389411999999982 expected) [10] + +With gcc-2.95/2.96 the tests fail in the eigen/ directory. This is +due to a compiler optimization bug which causes errors in the +manipulation of complex numbers. + +If you encounter these problems, install a different version of gcc. + +5) Attempts to run 'strip' on the static library libgsl.a will probably +produce a broken library (it is known to happen with GNU binutils +strip, and probably affects others too). The libgsl.a ar archive made +by libtool contains files with the same filenames from different +directories, and this causes the strip program to overwrite these +archive entries. If you need to produce a compact version of the +library compile without -g instead of using strip. + +make install-strip does not work, due to a minor problem with autoconf +which is fixed in the 2.5 development version of autoconf. In the +meantime compile without -g instead if you need to reduce the file size. + +6) The configure script can fail with a segmentation fault on bash-2.01 + + $ ./configure + Segmentation fault + +This is due to a bug in bash, related to the MAIL environment +variable. To work around it use + + $ unset ENV MAIL MAILPATH + $ ./configure + +which should avoid the problem. + +Hints for AIX +============= + +For compilation problems with the native compiler xlc, try disabling +shared libraries, + + setenv CC 'xlc' + setenv CFLAGS '-O -qmaxmem=8192' + ./configure --disable-shared + make + +If you compile with higher optimisation -O3 you will also need +-qstrict. The -O3 flag causes the -nostrict option to be +enabled. This affects the accuracy of the results and causes some of +the tests to fail. + +If you get errors like + + ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 635) in object siman_tsp.o: + The symbol refers to a csect with symbol number 0, which was not + found. The new symbol cannot be associated with a csect and + is being ignored. + +this is due to problems with some versions of the IBM assembler. Try +compiling with CFLAGS="-g0" as a workaround. For details and other +solutions see https://www-304.ibm.com/support/docview.wss?uid=isg1IZ98134 and +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46072 + +If you get the error, + + ld: 0711-781 ERROR: TOC overflow. + +you can try building the library with a larger linker +table-of-contents by setting LDFLAGS before compilation, + + ./configure LDFLAGS="-Wl,-bbigtoc" + +On older versions of AIX (e.g. 4.2) the size of the command-line is +limited to 24kb, which causes linking to fail (due to the large number +of files to be linked). Unfortunately this limit cannot be increased. +To link the library you may need to use a manual approach of +incrementally combining the object files in smaller groups. + +On more recent versions of AIX (e.g >= 5.1) use + + chdev -l sys0 -a ncargs=NNN + +to increase the allowed number of arguments. NNN is the amount of +space measured in 4k blocks (default 6, maximum 1024) + +Hints for Compaq/DEC Alpha +========================== + +When comping with GCC use the -mieee and -mfp-rounding-mode options +as appropriate, e.g. + + ./configure CFLAGS="-mieee -mfp-rounding-mode=d -g -O2" + +The library should compile successfully with Compaq's C compiler on +Tru64 Unix 'cc' using the -std, -ieee and -fprm options. Use + + ./configure CC=cc + make CFLAGS="-std -ieee -fprm d" + +to build the library this way. + +Use GNU tar to unpack the tar file, as Tru64 tar gives an error +halfway through. + +Hints for HP-UX +=============== + +The default mode of the HP-UX C compiler does not use ANSI C. + +To compile GSL you need to select ANSI C mode with the following +configuration option: + + ./configure CFLAGS="-Ae" + +To switch on optimization use CFLAGS="-Ae -O". + +Hints for IRIX (SGI) +==================== + +The library should be compiled with the CFLAGS option +-OPT:IEEE_NaN_inf=ON to ensure correct IEEE arithmetic. The tests in +sys/ will fail without this option. The older deprecated option +-OPT:IEEE_comparisons=ON will also work. + +The 32 bit IRIX compiler gives warnings about "long double" not being +supported. These can be ignored or turned off with, + + ./configure CFLAGS="-woff 728" + +or + + make CFLAGS="-woff 728" + +The compiler also gives warnings about certain libraries that are "not +used for resolving any symbol". This is harmless and the warnings can +be ignored. + +You may get warnings about " /usr/bin/ld: arg list too long" when +building shared libraries. If so, try increasing the ncargs kernel +parameter with the systune(1m) command. + +For 64-bit compilation use the following options, + + ./configure CC=cc CFLAGS="-64" LDFLAGS="-64" + +or for gcc + + CFLAGS="-mabi-64" LDFLAGS="-mabi=64 -mips4 -L/usr/local/lib/mabi=64" + +Hints for MacOS X and PowerPC +============================= + +To install in /usr/local on MacOS systems, do "sudo make install" to +gain root privileges. + +Note that GSL contains files with filenames of 32 characters or more. +Therefore you need to be careful in unpacking the tar file, as some +MacOS applications such as Stuffit Expander will truncate filenames to +31 characters. Using GNU tar and gunzip directly is the safe way to +unpack the distribution. + +There are problems with dynamic linker, so the library should be +compiled with, + + ./configure --disable-shared --disable-dependency-tracking + +It has been reported that shared libraries can be built if MacOS X +specific versions of libtool, automake and autoconf from +http://fink.sourceforge.net/ are installed, and the GSL source is +reconfigured from scratch (./autogen.sh; ./configure; make) + +To avoid warnings about long-double, use the flag + + CFLAGS="-Wno-long-double ....(other options here)" + +in addition to the normal compilation options. + +The GCC 3.3 compiler shipped by Apple contains a bug which causes the +wavelet tests to fail on "data untouched" tests at optimisation level +-O2. You may be able work around this by compiling with CFLAGS="-O1 +..." instead. + +F J Frankin reported that some early +versions of GCC-2.95 have a problem with long argument lists on PPC +architecture, and this prevents GSL from compiling correctly (e.g. the +test program in the blas directory gives a segmentation fault when +run). This problem is fixed in more recent versions of GCC. + + +Hints for Microsoft Windows +=========================== + +GSL should compile with GCC under Cygwin on Microsoft Windows. +There is a gsl package in the standard Cygwin distribution which +contains any patches needed. + +With Mingw/MSYS some floating point issues have been reported which +cause failures in the monte/ test directory. + +Hints for OpenBSD +================= + +As of July 2001 the OpenBSD log1p() function on i386 causes failures +in the gsl complex tests. The configure script has been hardcoded to +substitute gsl_log1p instead on OpenBSD. The log1p() bug has been +reported and so may be fixed in future versions of OpenBSD. + +Hints for OS/2 +============== + +The configure script fails to detect the function 'isnan', leading to +a slew of errors 'isnan redefined'. + +To work around this problem, run configure and edit the resulting +config.h file to comment out the line which defines HAVE_ISINF. + +Hints for Solaris +================= + +If you are using the Sun compilers then the library should be compiled +with the Sun C compiler 'cc', not 'CC' which is the C++ compiler. + +The Sun compiler tools are stored in non-standard directories -- make +sure that all the compiler and linker tools (cc, ar, ranlib, ld) are +on the PATH. A typical PATH should include the directories +/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb in that order. + +For example, + + $ PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb:$PATH + $ ./configure CC=cc CFLAGS=-O + +If you see configure output + + checking for ar... : + +it means that 'ar' has not been found, and the library will fail to +build. + +If you use the Sun compiler you should use the Sun linker and +assembler. If you use GCC, you can use the GNU linker and assembler +or the Sun linker and assembler. + +There may be some warnings about "end of loop code not reached". These +can be ignored -- they come from the do { ... ; return ; } while(0) +statement in the GSL_ERROR macro. + +If you get errors such as symbol `gsl_complex_rect' is multiply-defined +you will need to use ./configure CFLAGS="-DGSL_C99_INLINE -g -O2" + + ------------------------------ + +Further information on the standard GNU installation procedure +============================================================== + +The sections below describe the general features of the standard GNU +installation procedure. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/software/gsl-1.15/Makefile b/software/gsl-1.15/Makefile new file mode 100644 index 000000000..2e98e6f2c --- /dev/null +++ b/software/gsl-1.15/Makefile @@ -0,0 +1,1208 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# AUTOMAKE_OPTIONS = readme-alpha + + + + + + +pkgdatadir = $(datadir)/gsl +pkgincludedir = $(includedir)/gsl +pkglibdir = $(libdir)/gsl +pkglibexecdir = $(libexecdir)/gsl +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin12.2.0 +host_triplet = x86_64-apple-darwin12.2.0 +#am__append_1 = cblas/libgslcblas.la +#am__append_2 = -no-undefined +bin_PROGRAMS = gsl-randist$(EXEEXT) gsl-histogram$(EXEEXT) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/gsl.spec.in $(srcdir)/gsl_version.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + THANKS TODO config.guess config.sub depcomp install-sh \ + ltmain.sh mdate-sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = gsl_version.h gsl.spec +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1) +am_libgsl_la_OBJECTS = version.lo +libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS) +libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgsl_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(bin_PROGRAMS) +am_gsl_histogram_OBJECTS = gsl-histogram.$(OBJEXT) +gsl_histogram_OBJECTS = $(am_gsl_histogram_OBJECTS) +gsl_histogram_DEPENDENCIES = libgsl.la cblas/libgslcblas.la +am_gsl_randist_OBJECTS = gsl-randist.$(OBJEXT) +gsl_randist_OBJECTS = $(am_gsl_randist_OBJECTS) +gsl_randist_DEPENDENCIES = libgsl.la cblas/libgslcblas.la +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I. +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \ + $(gsl_randist_SOURCES) +DIST_SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \ + $(gsl_randist_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +DATA = $(m4data_DATA) $(pkgconfig_DATA) +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run aclocal-1.11 +AMTAR = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoconf +AUTOHEADER = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoheader +AUTOMAKE = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run automake-1.11 +AWK = awk +CC = cc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = cc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = dsymutil +DUMPBIN = +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +GSL_CFLAGS = -I${prefix}/include +GSL_LIBM = +GSL_LIBS = -L${exec_prefix}/lib -lgsl +GSL_LT_CBLAS_VERSION = 0:0:0 +GSL_LT_VERSION = 16:0:16 +GSL_MAJOR_VERSION = 1 +GSL_MINOR_VERSION = 15 +HAVE_AIX_IEEE_INTERFACE = +HAVE_DARWIN86_IEEE_INTERFACE = +HAVE_DARWIN_IEEE_INTERFACE = +HAVE_FREEBSD_IEEE_INTERFACE = +HAVE_GNUM68K_IEEE_INTERFACE = +HAVE_GNUPPC_IEEE_INTERFACE = +HAVE_GNUSPARC_IEEE_INTERFACE = +HAVE_GNUX86_IEEE_INTERFACE = +HAVE_HPUX11_IEEE_INTERFACE = +HAVE_HPUX_IEEE_INTERFACE = +HAVE_IRIX_IEEE_INTERFACE = +HAVE_NETBSD_IEEE_INTERFACE = +HAVE_OPENBSD_IEEE_INTERFACE = +HAVE_OS2EMX_IEEE_INTERFACE = +HAVE_SOLARIS_IEEE_INTERFACE = +HAVE_SUNOS4_IEEE_INTERFACE = +HAVE_TRU64_IEEE_INTERFACE = +INSTALL = /sw/bin/ginstall -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBM = +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = lipo +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run makeinfo +MANIFEST_TOOL = : +MKDIR_P = /sw/bin/gmkdir -p +NM = /opt/local/bin/nm +NMEDIT = nmedit +OBJDUMP = false +OBJEXT = o +OTOOL = otool +OTOOL64 = : +PACKAGE = gsl +PACKAGE_BUGREPORT = +PACKAGE_NAME = gsl +PACKAGE_STRING = gsl 1.15 +PACKAGE_TARNAME = gsl +PACKAGE_URL = +PACKAGE_VERSION = 1.15 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.15 +abs_builddir = /Users/jmatthews/Documents/Python/software/gsl-1.15 +abs_srcdir = /Users/jmatthews/Documents/Python/software/gsl-1.15 +abs_top_builddir = /Users/jmatthews/Documents/Python/software/gsl-1.15 +abs_top_srcdir = /Users/jmatthews/Documents/Python/software/gsl-1.15 +ac_ct_AR = ar +ac_ct_CC = cc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin12.2.0 +build_alias = +build_cpu = x86_64 +build_os = darwin12.2.0 +build_vendor = apple +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-apple-darwin12.2.0 +host_alias = +host_cpu = x86_64 +host_os = darwin12.2.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /sw/bin/gmkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /Users/jmatthews/Documents/Python/software/gsl-1.15 +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . +SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline doc +SUBLIBS = block/libgslblock.la blas/libgslblas.la \ + bspline/libgslbspline.la complex/libgslcomplex.la \ + cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la \ + deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la \ + fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la \ + ieee-utils/libgslieeeutils.la integration/libgslintegration.la \ + interpolation/libgslinterpolation.la linalg/libgsllinalg.la \ + matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la \ + multifit/libgslmultifit.la multimin/libgslmultimin.la \ + multiroots/libgslmultiroots.la ntuple/libgslntuple.la \ + ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la \ + permutation/libgslpermutation.la \ + combination/libgslcombination.la multiset/libgslmultiset.la \ + poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la \ + rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la \ + sort/libgslsort.la specfunc/libgslspecfunc.la \ + statistics/libgslstatistics.la sum/libgslsum.la \ + sys/libgslsys.la test/libgsltest.la utils/libutils.la \ + vector/libgslvector.la cdf/libgslcdf.la \ + wavelet/libgslwavelet.la +pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h +bin_SCRIPTS = gsl-config +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gsl.pc +CLEANFILES = gsl.pc gsl-config +EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh pkgconfig.test +lib_LTLIBRARIES = libgsl.la +libgsl_la_SOURCES = version.c +libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1) +libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2) +noinst_HEADERS = templates_on.h templates_off.h build.h +MINGW32_HOST = @MINGW32_HOST@ +m4datadir = $(datadir)/aclocal +m4data_DATA = gsl.m4 +gsl_randist_SOURCES = gsl-randist.c +gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la +gsl_histogram_SOURCES = gsl-histogram.c +gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la +check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test +TESTS = test_gsl_histogram.sh pkgconfig.test + +#bin_PROGRAMS = main dummy +#dummy_SOURCES = version.c +#dummy_LDADD = $(SUBLIBS) +#main_SOURCES = version.c env.c +#main_LDADD = libgsl.la +edit = $(SED) \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ + -e 's|@libdir[@]|$(libdir)|g' \ + -e 's|@includedir[@]|$(includedir)|g' \ + -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \ + -e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \ + -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \ + -e 's|@LIBS[@]|$(LIBS)|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: # $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: # $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gsl_version.h: $(top_builddir)/config.status $(srcdir)/gsl_version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +gsl.spec: $(top_builddir)/config.status $(srcdir)/gsl.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsl.la: $(libgsl_la_OBJECTS) $(libgsl_la_DEPENDENCIES) + $(libgsl_la_LINK) -rpath $(libdir) $(libgsl_la_OBJECTS) $(libgsl_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gsl-histogram$(EXEEXT): $(gsl_histogram_OBJECTS) $(gsl_histogram_DEPENDENCIES) + @rm -f gsl-histogram$(EXEEXT) + $(LINK) $(gsl_histogram_OBJECTS) $(gsl_histogram_LDADD) $(LIBS) +gsl-randist$(EXEEXT): $(gsl_randist_OBJECTS) $(gsl_randist_DEPENDENCIES) + @rm -f gsl-randist$(EXEEXT) + $(LINK) $(gsl_randist_OBJECTS) $(gsl_randist_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/gsl-histogram.Po +include ./$(DEPDIR)/gsl-randist.Po +include ./$(DEPDIR)/version.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(m4datadir)" && rm -f $$files +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + $(HEADERS) config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-m4dataDATA install-pkgconfigDATA \ + install-pkgincludeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-libLTLIBRARIES uninstall-m4dataDATA \ + uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-m4dataDATA install-man \ + install-pdf install-pdf-am install-pkgconfigDATA \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA uninstall-pkgconfigDATA \ + uninstall-pkgincludeHEADERS + + +gsl-config gsl.pc: Makefile + @rm -f $@ $@.tmp + @$(edit) '$(srcdir)/$@.in' >>$@.tmp + @chmod a-w $@.tmp + @mv $@.tmp $@ + @echo creating $@ + +gsl-config: $(srcdir)/gsl-config.in +gsl.pc: $(srcdir)/gsl.pc.in + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/Makefile.am b/software/gsl-1.15/Makefile.am new file mode 100644 index 000000000..327d2f3c7 --- /dev/null +++ b/software/gsl-1.15/Makefile.am @@ -0,0 +1,72 @@ +## Process this file with automake to produce Makefile.in + +# AUTOMAKE_OPTIONS = readme-alpha + +SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline doc + +SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la + +pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h + +bin_SCRIPTS = gsl-config + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA= gsl.pc + +CLEANFILES = gsl.pc gsl-config + +EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh pkgconfig.test + +lib_LTLIBRARIES = libgsl.la +libgsl_la_SOURCES = version.c +libgsl_la_LIBADD = $(SUBLIBS) +libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) +noinst_HEADERS = templates_on.h templates_off.h build.h + +MINGW32_HOST = @MINGW32_HOST@ +if MINGW32_HOST +libgsl_la_LIBADD += cblas/libgslcblas.la +libgsl_la_LDFLAGS += -no-undefined +endif + +m4datadir = $(datadir)/aclocal +m4data_DATA = gsl.m4 + +bin_PROGRAMS = gsl-randist gsl-histogram + +gsl_randist_SOURCES = gsl-randist.c +gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la + +gsl_histogram_SOURCES = gsl-histogram.c +gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la + +check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test +TESTS = test_gsl_histogram.sh pkgconfig.test + +#bin_PROGRAMS = main dummy +#dummy_SOURCES = version.c +#dummy_LDADD = $(SUBLIBS) +#main_SOURCES = version.c env.c +#main_LDADD = libgsl.la + +edit = $(SED) \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ + -e 's|@libdir[@]|$(libdir)|g' \ + -e 's|@includedir[@]|$(includedir)|g' \ + -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \ + -e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \ + -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \ + -e 's|@LIBS[@]|$(LIBS)|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' + +gsl-config gsl.pc: Makefile + @rm -f $@ $@.tmp + @$(edit) '$(srcdir)/$@.in' >>$@.tmp + @chmod a-w $@.tmp + @mv $@.tmp $@ + @echo creating $@ + +gsl-config: $(srcdir)/gsl-config.in +gsl.pc: $(srcdir)/gsl.pc.in + diff --git a/software/gsl-1.15/Makefile.in b/software/gsl-1.15/Makefile.in new file mode 100644 index 000000000..87a696133 --- /dev/null +++ b/software/gsl-1.15/Makefile.in @@ -0,0 +1,1208 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# AUTOMAKE_OPTIONS = readme-alpha + + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@MINGW32_HOST_TRUE@am__append_1 = cblas/libgslcblas.la +@MINGW32_HOST_TRUE@am__append_2 = -no-undefined +bin_PROGRAMS = gsl-randist$(EXEEXT) gsl-histogram$(EXEEXT) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/gsl.spec.in $(srcdir)/gsl_version.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + THANKS TODO config.guess config.sub depcomp install-sh \ + ltmain.sh mdate-sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = gsl_version.h gsl.spec +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libgsl_la_DEPENDENCIES = $(SUBLIBS) $(am__append_1) +am_libgsl_la_OBJECTS = version.lo +libgsl_la_OBJECTS = $(am_libgsl_la_OBJECTS) +libgsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgsl_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(bin_PROGRAMS) +am_gsl_histogram_OBJECTS = gsl-histogram.$(OBJEXT) +gsl_histogram_OBJECTS = $(am_gsl_histogram_OBJECTS) +gsl_histogram_DEPENDENCIES = libgsl.la cblas/libgslcblas.la +am_gsl_randist_OBJECTS = gsl-randist.$(OBJEXT) +gsl_randist_OBJECTS = $(am_gsl_randist_OBJECTS) +gsl_randist_DEPENDENCIES = libgsl.la cblas/libgslcblas.la +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \ + $(gsl_randist_SOURCES) +DIST_SOURCES = $(libgsl_la_SOURCES) $(gsl_histogram_SOURCES) \ + $(gsl_randist_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +DATA = $(m4data_DATA) $(pkgconfig_DATA) +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline doc +SUBLIBS = block/libgslblock.la blas/libgslblas.la \ + bspline/libgslbspline.la complex/libgslcomplex.la \ + cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la \ + deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la \ + fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la \ + ieee-utils/libgslieeeutils.la integration/libgslintegration.la \ + interpolation/libgslinterpolation.la linalg/libgsllinalg.la \ + matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la \ + multifit/libgslmultifit.la multimin/libgslmultimin.la \ + multiroots/libgslmultiroots.la ntuple/libgslntuple.la \ + ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la \ + permutation/libgslpermutation.la \ + combination/libgslcombination.la multiset/libgslmultiset.la \ + poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la \ + rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la \ + sort/libgslsort.la specfunc/libgslspecfunc.la \ + statistics/libgslstatistics.la sum/libgslsum.la \ + sys/libgslsys.la test/libgsltest.la utils/libutils.la \ + vector/libgslvector.la cdf/libgslcdf.la \ + wavelet/libgslwavelet.la +pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h +bin_SCRIPTS = gsl-config +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gsl.pc +CLEANFILES = gsl.pc gsl-config +EXTRA_DIST = autogen.sh gsl-config.in gsl.pc.in configure.ac THANKS BUGS gsl.spec.in gsl.m4 test_gsl_histogram.sh pkgconfig.test +lib_LTLIBRARIES = libgsl.la +libgsl_la_SOURCES = version.c +libgsl_la_LIBADD = $(SUBLIBS) $(am__append_1) +libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION) $(am__append_2) +noinst_HEADERS = templates_on.h templates_off.h build.h +MINGW32_HOST = @MINGW32_HOST@ +m4datadir = $(datadir)/aclocal +m4data_DATA = gsl.m4 +gsl_randist_SOURCES = gsl-randist.c +gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la +gsl_histogram_SOURCES = gsl-histogram.c +gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la +check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test +TESTS = test_gsl_histogram.sh pkgconfig.test + +#bin_PROGRAMS = main dummy +#dummy_SOURCES = version.c +#dummy_LDADD = $(SUBLIBS) +#main_SOURCES = version.c env.c +#main_LDADD = libgsl.la +edit = $(SED) \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ + -e 's|@libdir[@]|$(libdir)|g' \ + -e 's|@includedir[@]|$(includedir)|g' \ + -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \ + -e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \ + -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \ + -e 's|@LIBS[@]|$(LIBS)|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gsl_version.h: $(top_builddir)/config.status $(srcdir)/gsl_version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +gsl.spec: $(top_builddir)/config.status $(srcdir)/gsl.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsl.la: $(libgsl_la_OBJECTS) $(libgsl_la_DEPENDENCIES) + $(libgsl_la_LINK) -rpath $(libdir) $(libgsl_la_OBJECTS) $(libgsl_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gsl-histogram$(EXEEXT): $(gsl_histogram_OBJECTS) $(gsl_histogram_DEPENDENCIES) + @rm -f gsl-histogram$(EXEEXT) + $(LINK) $(gsl_histogram_OBJECTS) $(gsl_histogram_LDADD) $(LIBS) +gsl-randist$(EXEEXT): $(gsl_randist_OBJECTS) $(gsl_randist_DEPENDENCIES) + @rm -f gsl-randist$(EXEEXT) + $(LINK) $(gsl_randist_OBJECTS) $(gsl_randist_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsl-histogram.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsl-randist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-m4dataDATA: $(m4data_DATA) + @$(NORMAL_INSTALL) + test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ + done + +uninstall-m4dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(m4datadir)" && rm -f $$files +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + $(HEADERS) config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-m4dataDATA install-pkgconfigDATA \ + install-pkgincludeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-libLTLIBRARIES uninstall-m4dataDATA \ + uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-m4dataDATA install-man \ + install-pdf install-pdf-am install-pkgconfigDATA \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-libLTLIBRARIES \ + uninstall-m4dataDATA uninstall-pkgconfigDATA \ + uninstall-pkgincludeHEADERS + + +gsl-config gsl.pc: Makefile + @rm -f $@ $@.tmp + @$(edit) '$(srcdir)/$@.in' >>$@.tmp + @chmod a-w $@.tmp + @mv $@.tmp $@ + @echo creating $@ + +gsl-config: $(srcdir)/gsl-config.in +gsl.pc: $(srcdir)/gsl.pc.in + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/NEWS b/software/gsl-1.15/NEWS new file mode 100644 index 000000000..781dde94c --- /dev/null +++ b/software/gsl-1.15/NEWS @@ -0,0 +1,1525 @@ +* What is new in gsl-1.15: + +** Added Tuomo Keskitalo's new ode branch ode-initval2 with a + gsl_odeiv2 prefix. This provides proper support for implicit + solvers. It is intended to be the new default for differential + equations. The existing gsl_odeiv routines will be retained for + binary compatibility but their interface will be deprecated. + +** Added new gsl_integrate_cquad routines for robust integration of + difficult functions using the doubly-adaptive CQUAD algorithm + (Pedro Gonnet). + +** Added error checking to CBLAS functions (José Luis García Pallero) + +** Added a new function gsl_integration_glfixed_point to return + ordered Gauss-Legendre points and weights contained within a + gsl_integration_glfixed_table [bug #32237]. + +** Added a new function gsl_interp_type_min_size to return the size of + an interpolation type. + +** Added a function gsl_pow_uint(x,n) to compute x^n for unsigned + exponents (needed when n exceeds the range of signed integers). + +** Added new routine gsl_linalg_complex_cholesky_invert to handle the + matrix inversion for complex Cholesky decompositions (Huan Wu). + +** Added the functions gsl_vector_equal(x,y) and gsl_matrix_equal(x,y) + for testing equality of two vectors or matrices. + +** Added function gsl_eigen_nonsymmv_params to control the balancing + transformation for eigenvector calculations. Balancing is now + turned off by default for gsl_eigen_nonsymmv. + +** It is now possible to choose an alternative cblas library via + pkg-config using the GSL_CBLAS_LIB environment variable or + the pkg-config --define-variable option. + +** The jacobi method gsl_eigen_jacobi now uses the norm of the + off-diagonal elements for its convergence criterion, as in + algorithm 8.4.3 of Golub and van Loan. + +** The newton multiroot solvers now return an error when a singular + jacobian is detected. + +** The interpolation functions now return NaN and when x is out of range, + instead of extrapolating. + +** The gsl_multimin_fdfsolver multidimensional minimisers now return + GSL_ENOPROG immediately if the generated trial point does not + differ from the initial point (to machine precision), avoiding + unnecessary further iterations. + +** Extended the range of gsl_sf_bessel_lnKnu_e by rescaling + intermediate results to avoid internal overflows [bug #31528]. + +** Improved the result of gsl_sf_atanint_e for large arguments by + adding the first order 1/x correction term. [bug #29562] + +** Fixed the gsl_rng_ranlxs generators to enforce a maximum seed value + of 2^31-1. Larger seed values caused out of range values to be + returned. + +** Fixed gsl_ran_chisq_pdf(x,nu) to return correct result of 1/2 + instead of 0 when x=0 and nu=2, and +inf when x=0 and nu<2. + +** Fixed gsl_pow_int(x,n) to avoid an infinite loop when n=INT_MIN due + to wrapping of signed integers. + +** Fixed gsl_sf_hyperg_2F1(a,b,c,x) to avoid returning NaN for + arguments |a|>10. [bug #24812] + +** Avoid spurious underflow return code in gsl_sf_beta_inc_e when + intermediate underflow does not affect the result. [bug #30933] + +** Avoid segfault in Chebyshev series derivatives gsl_cheb_calc_deriv + for n=1. [bug #29139] + +* What was new in gsl-1.14: + +** Upgraded to latest libtool, autoconf and automake (libtool-2.2.6b, + autoconf-2.65, automake-1.11.1). Fixes security hole in 'make + dist' (see Automake CVE-2009-4029). + +** Added support for "multisets", which are similar to permutations + and combinations. A multiset is an array of k integers in the + range 0 to n-1 where each value may occur more than once. Multisets + can be used to iterate over the indices of a k-th order symmetric + tensor in n-space. (Rhys Ulerich) + +** Added gsl_integrate_glfixed routines for performing fixed order + Gauss-Legendre integration + (Pavel Holoborodko, Konstantin Holoborodko, Rhys Ulerich) + +** In the LMDER multi-dimensional fitting routines, the return code + GSL_ENOPROG is now used instead of GSL_CONTINUE for the case where + 10 or more attempts to find a suitable trial step have been made + without success. [bug #25383] + +** The confluent hypergeometric function gsl_sf_hyperg_U (a,b,x) has + been extended to support x < 0 for cases not involving + singularities in 1F1(a,b,x). [bug #27859] + +** The F-distribution gsl_ran_fdist_pdf now avoids unnecessary + underflow and overflow and handles cases where n > 248. [bug + #28500] + +** The SVD routines now use a scaled version of the implicit QR method + and compute the shift more reliably for values at the limit of + double precision, avoiding potential NaNs. [bug #28767] + +** A compile time error is emitted if the configuration stage prevents + the functions gsl_isnan and gsl_finite from being defined. + +** Added missing dereference in GSL_VECTOR_COMPLEX when not using + GSL_RANGE_CHECK [bug #28017] + +** Improved the range of gsl_sf_hyperg1F1(a,b,x) when a<0,b>0. [bug + #28718] + +** Added macros GSL_MAJOR_VERSION and GSL_MINOR_VERSION in + + +** Improved gsl_eigen_symmv and gsl_eigen_symm to avoid a potential + infinite loop when the tridiagonalised matrix contains very small + values. [bug #28096] + +** Added functions gsl_multifit_linear_usvd and + gsl_multifit_wlinear_usvd for multilinear fitting without + column-scaling of the fit matrix. + +* What was new in gsl-1.13: + +** Upgraded to latest autoconf and automake (autoconf-2.64, + automake-1.11) + +** Fixed the rk4 and bspline allocators to avoid invalid free() + calls under out of memory conditions. [bug #27194, #27236] + +** Fixed a bug in gsl_multimin_fminimizer_nmsimplex2 where the center + and size of the simplex were not updated on contract-by-best steps, + causing failures in convergence. [bug #27180] + +** Added new functions to set MISER and VEGAS Monte Carlo integration + parameters, and to examine VEGAS chi-squared value and intermediate + results. + +** Added the function gsl_bspline_greville_abscissa to compute + Greville abscissae for B-splines. + +** The cumulative distribution functions gsl_cdf_gumbel1_{P,Q} should + now handle a larger range of parameters without underflow and + overflow. + +** The header file gsl_const_cgs.h no longer defines values for + electromagnetic units. Applications should use gsl_const_cgsm.h + instead to obtain the values in the CGS-Magnetic system. The + previous values for these units given in gsl_const_cgs.h were + ill-defined as the type of CGS electromagnetic system was + unspecified (the values were a mixture of CGS units with the Ampere + of the MSKA system). The affected constants are + GSL_CONST_CGS_BOHR_MAGNETON, GSL_CONST_CGS_ELECTRON_CHARGE, + GSL_CONST_CGS_ELECTRON_MAGNETIC_MOMENT, GSL_CONST_CGS_FARADAY, + GSL_CONST_CGS_GAUSS, GSL_CONST_CGS_NUCLEAR_MAGNETON, + GSL_CONST_CGS_PROTON_MAGNETIC_MOMENT, and GSL_CONST_CGS_ROENTGEN. + +** The Pochhammer functions gsl_sf_poch(a,x) and gsl_sf_lnpoch(a,x) now + handle the special cases where a and a+x are zero or negative + integers. + +** The confluent hypergeometric function gsl_sf_hyperg_U (a,b,x) now + handles some cases where x=0. The case where 1+a-b is a negative + integer no longer returns an error [bug #22859] and the incorrect + termination of the series in certain cases is fixed [bug #26706]. + +** Added a new function gsl_poly_eval_derivs to evaluate a polynomial + and its derivatives simultaneously. + +** Added a new univariate minimisation algorithm + gsl_min_fminimizer_quad_golden which is a variant of Brent's + algorithm with safeguarded step-length adjustment. + +** Added a new Nelder-Mead minimiser gsl_multimin_fminimizer_nmsimplex2rand + which uses a randomly oriented simplex rather than one fixed on + the coordinate axes [bug #25077] + +** The texinfo file now uses the dircategory "Software libraries" from + the Free Software Directory, as recommended in the Texinfo manual. + +** The function gsl_ran_exponential now includes zero in its output + range. [bug #25039] + +** All functions for freeing allocated memory now accept a NULL + pointer, following the standard C convention for free(). [bug + #25319] + +** The function gsl_sum_levin_u_accel now handles the special case + c_0 + 0 + 0 + 0 + .... that occurs when summing power series + c_n*x^n with x=0. [bug #26807] + +** The functions gsl_linalg_LU_solve, gsl_linalg_LU_svx, + gsl_linalg_LU_refine, gsl_linalg_LU_invert and their complex + equivalents now return an error for singular matrices. + +** The multifit LMDER hybrid solvers now check the return code of the + user-supplied function in the gsl_multifit_fdfsolver_set + method. [bug #26871] + +** Improved the implementation of gsl_ran_discrete_preproc to avoid + internal errors due to inconsistencies from excess precision on + some platforms. [bug #26502] + +** Corrected gsl_sf_hyperg_2F1(a,b,c,x) to not give a domain error in + the case where c is a negative integer and the series terminates + with a finite result. + +** The C99 inline keyword is now supported, in addition to the + previously supported GNU-style inline. + +** Modified gsl_poly_complex_solve_cubic and gsl_poly_solve_cubic to + avoid returning NaNs in cases where excess precision causes a + change in the number of roots. + +** Fixed incorrect length check in gsl_blas_drotm. [bug #26503] + +** Fixed gsl_odeiv_step_gear2 to restore y on step failure + +** gsl_odeiv_evolve_apply now restores the correct value of t on step + failures [bug #26255]. + +** Using make install prefix=DIR now puts correct paths in package + config files gsl-config and gsl.pc + +** Modified gsl_monte_vegas to work around pow() function inaccuracies + on MinGW [bug #25413]. + +** Increased the number of terms in gsl_sf_mathieu_a and + gsl_sf_mathieu_b to improve convergence in difficult regions [bug + #25075] + +* What was new in gsl-1.12: + +** Upgraded to latest libtool, autoconf and automake (libtool-2.2.6, + autoconf-2.63, automake-1.10.2) + +** Improved the convergence of gsl_sf_gamma_inc_P for x/a ~=~ 1 and + large x,a. Fixes problems with large arguments in cdf functions + such as gsl_cdf_chisq_Pinv(x,nu) [bug 24704]. + +** Fixed gsl_ran_gamma_knuth to handle the case of a >= UINT_MAX [bug + #24897] + +** Added gsl_bspline_eval_deriv to compute bspline derivatives + (Rhys Ulerich) + +** Added a faster simplex mininimser gsl_multimin_fminimizer_nmsimplex2 + which is O(N) instead of O(N^2) [bug #24418] + +** Improved the original chi-squared formula in gsl_monte_vegas to + avoid catastrophic cancellation [bug #24510]. The previous formula + could return incorrect or negative values for relative errors < + 1e-8, which could occur when integrating very smooth functions. + +** Added new auxiliary functions gsl_cheb_order, gsl_cheb_size, + gsl_cheb_coeffs for Chebyshev series [bug #21830] + +** Updated license of the reference manual to GNU FDL version 1.3. + +** Fixed a bug where the gsl_isinf function would return +1 for -Inf + on systems where isinf(-Inf) returns the non-standard value +1. + [bug #24489] + +** Added missing functions gsl_vector_complex_{isnonneg,add,sub,mul, + div,scale,add_constant} and gsl_matrix_complex_float_isnonneg [bug + #22478] + +** Cross compilation should now work for x86 hosts. + +** Fixed a bug in gsl_interp_accel_find() where values lying on the + upper boundary between interpolation points could return the index + from the lower side. [bug #24211] + +** Fixed gsl_linalg_solve_cyc_tridiag so that its output respects the + solution vector's stride. Previously the x_stride value was ignored + causing the output to be incorrect for non-unit stride. [bug #24162] + +** Corrected a bug in the series calculation of gsl_sf_ellint_Kcomp + for k close to 1. [bug #24146] + +** Extended gsl_linalg_QRPT_update to handle rectangular matrices. + Corrected definition of the update formula in the manual for + both gsl_linalg_QR_update and gsl_linalg_QRPT_update. + +** Added routine gsl_linalg_cholesky_invert + +** Fixed a bug the simplex algorithm which caused the second highest + point to be incorrectly equal to the first when the first value was + the highest, which could cause suboptimal convergence. [bug #23192] + +** Fixed a problem with convergence for inverse gamma and chisq + distribitions, gsl_cdf_gamma_{P,Q}inv and gsl_cdf_chisq_{P,Q}inv. + [bug #23101] + +** Improved the handling of constant regions in Vegas by eliminating + spurious excess precision when computing box variances. + +** Fixed a potential division by zero in gsl_monte_miser when the + left/right weight factors decrease below 1. + +** Fixed incorrect dimensions check in gsl_matrix_sub{row,column} + +* What was new in gsl-1.11: + +** The GSL repository and bug database are now hosted at Savannah + http://savannah.gnu.org/projects/gsl/ + +** Upgraded to latest libtool, autoconf and automake (libtool-2.2, + autoconf-2.61, automake-1.10.1) + +** Fixed underflow in ODE adaptive step size controller that could + cause step size to decrease to zero (bug #21933). + +** Improved the handling of the asymptotic regime in gsl_sf_bessel_jl. + +** Improved the handling of large arguments in cumulative distribution + functions using the incomplete beta function, such as gsl_cdf_fdist_P. + +** Fixed overflow bug in gsl_cdf_hypergeometric_{P,Q} for large + arguments (bug #22293). + +** gsl_ran_gaussian_ziggurat now handles generators with different + ranges explicitly, to minimise the number of function calls + required (bug #21820). Also fixes bug #22446 (rng limit in + gsl_ran_chisq()). + +** Added missing error terms in gsl_sf_exp_mult_e10_e to prevent + the error being underestimated (bug #22041). + +** Updated some constants to the CODATA 2006 values. + +** The hypergeometric function gsl_sf_hyperg_2F1 now handles the case + where x==1. + +** Fixed a bug in the brent minimiser which prevented optimal convergence. + +** Added functions for evaluating complex polynomials + +** The convergence condition for gsl_multiroots_test_delta now accepts + dxi == 0. + +** Improved functions gsl_ldexp and gsl_frexp to handle the full range + of double precision numbers in all cases. + +** Added new quasi random generators gsl_qrng_halton and + gsl_qrng_reversehalton which support dimensions up to 1229. + +** Added function gsl_multifit_linear_residuals for computing the + residuals of the fit + +* What was new in gsl-1.10: + +** License updated to GNU GPL version 3. + +** Added support for generalized eigensystems + +** Added function gsl_stats_correlation to compute Pearson correlation +of two datasets + +** Added the new function gsl_sf_expint(n,x) for computing the n-th +order exponential integral. + +** Added functions gsl_vector_isnonneg and gsl_matrix_isnonneg. + +** Added functions gsl_matrix_subrow and gsl_matrix_subcolumn + +** Extended Cholesky routines to complex matrices + +** Added support in gsl_ieee_set_mode for controlling SSE exceptions +and rounding through the MXCSR control word on x86 processors. + +** The autoconf macro AM_PATH_GSL has been renamed to AX_PATH_GSL, to +avoid conflicts with the autoconf namespace. + +** Improved handling of underflow in gsl_eigen_symm. + +** The function gsl_multiroot_fdjacobian now returns the error code +GSL_ESING if any of the columns of the computed jacobian matrix are +zero. This may occur if the step size of the derivative is too small. + +** Extended the function gsl_sf_beta_inc(a,b,x) to handle cases where +a<0 or b<0. + +** Fixed the round-off error estimate in gsl_deriv_{central,backwards, +forward} to correctly account for numerical error in the step-size h. + +** Fixed gsl_cdf_beta_Pinv, gsl_cdf_gamma_Pinv, gsl_cdf_beta_Pinv to +avoid returning spurious values for large parameters when the +iteration did not converge. If the iteration cannot converge, GSL_NAN +is returned. + +** gsl_ran_dirichlet now handles smaller values of alpha[] without +underflow, avoiding a NaN in the returned value. + +** The SVD routines now avoid underflow in the Schur decomposition for +matrices with extremely small values pi/2 and phi < 0. The angular argument is now +valid for all phi. Also added the complete elliptic integral +gsl_sf_ellint_Pcomp. + +** Added a new BFGS minimisation method gsl_multimin_fdfminimizer_vector_bfgs2 +based on the algorithm given by R.Fletcher in "Practical Methods of +Optimisation" (Second edition). This requires substantially fewer +function and gradient evaluations, and supercedes the existing BFGS +minimiser. + +** The beta functions gsl_sf_beta_e(a,b) and gsl_sf_lnbeta_e(a,b) now +handle negative arguments a,b. Added new function gsl_sf_lnbeta_sgn_e +for computing magnitude and sign of negative beta values, analagous to +gsl_sf_lngamma_sgn_e. + +** gsl_cheb_eval_mode now uses the same error estimate as +gsl_cheb_eval_err. + +** Improved gsl_sf_legendre_sphPlm_e to avoid underflow with large +arguments. + +** Added updated Knuth generator, gsl_rng_knuthran2002, from 9th +printing of "The Art of Computer Programming". Fixes various +weaknesses in the earlier version gsl_rng_knuthran. See +http://www-cs-faculty.stanford.edu/~knuth/news02.htm + +** The functions gsl_multifit_fsolver_set, gsl_multifit_fdfsolver_set +and gsl_multiroot_fsolver_set, gsl_multiroot_fdfsolver_set now have a +const qualifier for the input vector x, reflecting their actual usage. + +** gsl_sf_expint_E2(x) now returns the correct value 1 for x==0, +instead of NaN. + +** The gsl_ran_gamma function now uses the Marsaglia-Tsang fast gamma +method of gsl_ran_gamma_mt by default. + +** The matrix and vector min/max functions now always propagate any +NaNs in their input. + +** Prevented NaN occuring for extreme parameters in +gsl_cdf_fdist_{P,Q}inv and gsl_cdf_beta_{P,Q}inv + +** Corrected error estimates for the angular reduction functions +gsl_sf_angle_restrict_symm_err and gsl_sf_angle_restrict_pos_err. +Fixed gsl_sf_angle_restrict_pos to avoid possibility of returning +small negative values. Errors are now reported for out of range +negative arguments as well as positive. These functions now return +NaN when there would be significant loss of precision. + +** Corrected an error in the higher digits of M_PI_4 (this was beyond +the limit of double precision, so double precision results are not +affected). + +** gsl_root_test_delta now always returns success if two iterates are +the same, x1==x0. + +** A Japanese translation of the reference manual is now available +from the GSL webpage at http://www.gnu.org/software/gsl/ thanks to +Daisuke TOMINAGA. + +** Added new functions for basis splines, see the "Basis Splines" +chapter in the GSL Reference Manual for details. + +** Added new functions for testing the sign of vectors and matrices, +gsl_vector_ispos, gsl_vector_isneg, gsl_matrix_ispos and +gsl_matrix_isneg. + +** Fixed a bug in gsl_sf_lnpoch_e and gsl_sf_lnpoch_sgn_e which caused +the incorrect value 1.0 instead of 0.0 to be returned for x==0. + +** Fixed cancellation error in gsl_sf_laguerre_n for n > 1e7 so that +larger arguments can be calculated without loss of precision. + +** Improved gsl_sf_zeta_e to return exactly zero for negative even +integers, avoiding less accurate trigonometric reduction. + +** Fixed a bug in gsl_sf_zetam1_int_e where 0 was returned instead of +-1 for negative even integer arguments. + +** When the differential equation solver gsl_odeiv_apply encounters a +singularity it returns the step-size which caused the error code from +the user-defined function, as opposed to leaving the step-size +unchanged. + +** Added support for nonsymmetric eigensystems + +** Added Mathieu functions + +* What was new in gsl-1.8: + +** Added an error check to trap multifit calls with fewer observations +than parameters. Previously calling the multifit routines with n

100*l*l to +satisfy he requirement x>>l*l in the asymptotic expansion. + +** The scaled bessel function gsl_sf_bessel_In_scaled now handles +larger arguments x > 1e7 correctly for n < 150 using the uniform +asymptotic expansion instead of the continued fraction expansion. + +** The functions gsl_stats_min/max now return NaN if the data contains +NaN. Similarly, the functions gsl_stats_min/max_index return the index +of the first occurring NaN in the data when it contains a NaN. + +** Fixed an invalid memory access that caused incorrect results for +the special case in periodic cubic spline interpolation of 3 points. + +** Added Debye functions for n=5 and n=6 + +** Added the missing functions gsl_spline_name() and +gsl_spline_min_size() + +** The function gsl_rng_uniform_int(r,n) now returns an error for n=0, +which can occur when passing an unsigned integer value of 2^32. + +* What was new in gsl-1.7: + +** Switched gsl_randist_binomial to use the faster binomial random +variate TPE algorithm by default. The previous binomial variate +algorithm is available as gsl_randist_binomial_knuth. This will +result in a different sequence of binomial variates in programs using +this function. + +** Improved the algorithm for gsl_sf_elljac_e to avoid cancellation +errors near quarter periods. + +** Fixed the branch selection in gsl_sf_gamma_inc_Q_e to avoid +inaccurate results for large a,x where x~=~a. + +** The multilinear fitting functions now have forms which accept a +user-specified tolerance for the SVD cutoff and return the +corresponding effective rank of the design matrix. + +** The quadratic solvers in poly/ now handle linear equations +gracefully (i.e. quadratrics with a leading coefficient of zero). + +** The output of "make check" now only shows test failures by default, +to reduce the amount of output. Set the environment variable +GSL_TEST_VERBOSE=1 to display all the output. To assist debugging, +the test number of each failure is shown in square brackets at the +line-end [NNNN]. + +** Fixed bugs in gsl_linalg_SV_decomp_jacobi which caused +incorrect results for some input matrices. + +** Bessel, coulomb, dilogarithm and legendre_H3d functions now use +hypot internally to avoid overflow when computing terms like +sqrt(1+x*x). + +** The 'Usage' chapter of the reference manual now explains how to +handle deprecated functions using the GSL_DISABLE_DEPRECATED macro. + +** The conflicting enum definitions for 'forward' and 'backward' in +gsl_ftt.h and gsl_wavelet.h are deprecated. User code should switch +to the new definitions gsl_fft_forward, gsl_fft_backward, +gsl_wavelet_forward and gsl_wavelet_backward. Selectively define +GSL_DISABLE_DEPRECATED before including the headers to use the new +definitions on either or both modules. + +** Fixed an error in the the brent minimisation algorithm. Iterations +should now follow Brent's original description correctly. + +** The bound coulomb function gsl_sf_hydrogenicR_e no longer reports +an underflow for exact zeroes of the wavefunction. + +** gsl_linalg_SV_decomp_jacobi now reports an error for the +unimplemented case M>N) use the LQ decomposition, +solving the transpose of the original system. This allows more +efficient memory access, and is useful for solving large least-squares +problems. + +** Fixed a bug in the SYRK and HERK blas functions gsl_blas_{s,d,c,z}syrk +and gsl_blas_{c,z}herk which caused invalid memory access for non-square +matrices. + +** Fixed a bug in gsl_swap_vectors which caused it to return incorrect +results when swapping vectors with different strides. + +** Corrected the error estimate for gsl_cheb_eval_n_err to use +evaluation order instead of the approximation order. + +** Improved the reliability of the gsl_sf_gamma_inc family of +functions. + +** Equal abscissae are now handled gracefully in the cspline and +periodic cspline interpolations. + +** Removed potential cancellation error in calculation of uniform +histogram ranges. + +** Improved numerical stability of integration for akima and cspline +interpolation. + +** Differential equation solvers now handle error codes returned from +user-defined functions. + +** Improved error estimates in ode-initval solvers, and provide exact +derivatives on output. Added new semi-implicit ode-initval solver, +gsl_odeiv_step_rk2simp. + +** Added missing function definition for gsl_sf_psi_1. + +** Fixed the function gsl_sf_expint_Ei_scaled to call +gsl_sf_expint_Ei_scaled_e instead of gsl_sf_expint_Ei_e. + +** Added cumulative distribution function for exponential power +distribution. + +** The functions gsl_cdf_beta_P and gsl_cdf_beta_Q now return +consistent results of 0 or 1 for out of range values, x<0 and x>1, +rather than 0 for left and right tails simultaneously. + +** The Jacobi eigensolvers gsl_eigen_jacobi and gsl_eigen_jacobi_invert +have new implementations from Golub and Van Loan. + +** The standard output and standard error streams are now flushed by +the default error handler before the program aborts, in order to +ensure that error messages are properly displayed on some platforms. + +* What was new in gsl-1.5: + +** Multifit routines now handle iterations where |f| is already +minimised to zero, without division by zero. + +** Fixed the singular value tolerance test in the multifit covariance +calculation from < to <= to match the original MINPACK code. + +** The macro HAVE_INLINE is now tested with #ifdef instead of #if as +in versions prior to 1.4, to match the documentation, and the macro +GSL_RANGE_CHECK_OFF now works correctly. An alternative macro +GSL_RANGE_CHECK={0,1} can be used to control range-checking. + +** Fixed a potential array overflow in gsl_ran_landau. + +** Fixed a small discrepancy in the tolerance calculation of the +one-dimensional brent minimiser. + +** Numerical derivatives should now be calculated using the +gsl_deriv_forward, gsl_deriv_central and gsl_deriv_backward functions, +which accept a step-size argument in addition to the position x. The +original gsl_diff functions (without the step-size) are deprecated. + +** Corrected documentation for gsl_ran_hypergeometric_pdf() + +** The tridiagonal matrix solvers gsl_linalg_solve_symm_tridiag, +gsl_linalg_solve_tridiag, gsl_linalg_solve_symm_cyc_tridiag, +gsl_linalg_solve_cyc_tridiag now use the GSL_ERROR macro to report +errors, instead of simply returning an error code. The arguments to +these functions must now use exact lengths with no additional +elements. For cyclic systems all vectors must be of length N, for +tridiagonal systems the offdiagonal elements must be of length N-1. + +** The singular value decomposition routines gsl_linalg_SV_decomp and +gsl_linalg_SV_decomp_mod now handle the SVD of a column vector (N=1, +arbitrary M), which can occur in linear fitting. + +** Restored missing header files gsl_const_mks.h and gsl_const_cgs.h. +The incorrect values of the electrical units for gsl_const_cgs +(VACUUM_PERMEABILITY and VACUUM_PERMITTIVITY) have been removed. + +** Fixed gsl_linalg_SV_decomp() to avoid an infinite loop when +computing the SVD of matrices containing Inf and Nan. + +** Fixed gsl_linalg_balance_columns() to avoid an infinite loop when +rescaling matrices containing Inf and NaN. + +** Fixed header file to include declarations for +error codes in inline versions of gsl_sf_log functions + +** Fixed header file to include new MKSA and CGSM +header files. + +** Added Stefan-Boltzmann constant and Thomson cross section to +physical constants + +* What was new in gsl-1.4: + +** Added cumulative distribution functions and their inverses for the +continuous random distributions including: gaussian, lognormal, gamma, +beta, cauchy, laplace, chisq, exponential, gumbel, weibull, +F-distribution, t-distribution, logistic, pareto and rayleigh. + +** Added faster binomial random variates using the TPE rejection +algorithm, in the function gsl_randist_binomial_tpe. + +** Added new functions gsl_rng_fwrite and gsl_rnd_fread for storing +the state of random number generators in a file. + +** Added a new function gsl_combination_memcpy() + +** Corrected values of electrical constants in CGS units. To take +account of different electrical systems of units the values are now +prefixed by GSL_CONST_MKSA (for the SI Metre, Kilogram, Second, Ampere +system) or GSL_CONST_CGSM (for the Centimetre, Gram, Second, Magnetic +system with the Gauss as the fundamental unit of magnetic field +strength). The previous GSL_CONST_MKS and GSL_CONST_CGS prefixes have +been removed, as have the permeability and permittivity constants in +the CGS system since this uses different defining equations. + +** Fixed bugs in the random number generators gsl_rng_fishman18, +gsl_rng_fishman2x, and gsl_rng_knuthran2 which caused them to return +incorrect results. Minor corrections were made to the parameters in +the other Knuth generators borosh13, coveyou, fishman20, lecuyer21, +and waterman14. + +** Fixed a missing transpose bug in the gsl_linalg_QR_QRsolve +and gsl_linalg_QRPT_QRsolve routines which were computing the +solution to Q^T R x = b instead of Q R x = b. + +** Fixed gsl_sf_gammainv to return zero instead of a domain +error for arguments corresponding to singularities in gamma. + +** Fixed a bug in the simplex minimization algorithm which +caused it to fail to find the second highest point correctly +when searching the set of simplex points. + +** Fixed a bug in the conjugate gradient minimizers conjugate_pr, +conjugate_fr and vector_bgfs which caused the search +directions to be updated incorrectly. + +** Fixed a bug in gsl_sf_psi_1_int(1) which caused it to +return the incorrect sign for psi(1,1). + +** Fixed the simulated annealing routine gsl_siman_solve to use the +parameter iters_fixed_T for the number of iterations at fixed +temperature instead of n_tries. + +** Fixed a bug in gsl_combination_valid which caused it to return the +incorrect status. + +** Fixed a bug in gsl_permutation_canonical_to_linear which caused the +output to always be zero, and the input permutation to be incorrectly +replaced by the output. + +** Fixed a bug is gsl_ran_discrete which could cause uninitialised +data to be returned for some distributions. + +** Fixed the dependencies for gsl_chebyshev.h to include gsl_math.h. + +** Fixed a bug in gsl_complex_arccsc_real which caused it to return +the incorrect sign for the imaginary part when -110. + +** Improved the accuracy of gsl_sf_coupling_3j for large arguments. + +** Improved the performance of gsl_sf_choose(m,n) by separating the +calculations for small and large arguments. + +** On platforms without IEEE comparisons gsl_{isnan,isinf,finite} will +fall back to the system versions of isnan, isinf and finite if +available. + +** gsl_linalg_householder_hv now uses BLAS routines internally + +** The script configure.in is now compatible with autoconf-2.50 and +later. + +** Reduced the memory usage of the multifit algorithms from MxM to MxN +for large M by performing the QR decomposition of the Jacobian +in-place. + +** IEEE modes now use the C99 fenv.h functions when platform spectific +functions are not available. + +* What was new in gsl-1.3: + +** Changed interface for gsl_sf_coupling_6j...(...). The old functions +actually calculated 6j for a permutation of the arguments (that +related to Racah W). This was incorrect and not consistent with +the documentation. The new versions calculate < {a,b,c}, {d,e,f} >, +as stated in the documentation. The old versions are still available +as gsl_sf_coupling_6j_INCORRECT...(...), though they are deprecated +and will be removed at some point in the future. + +** Added new functions for computing Em(x)=exp(-x)*Ei(x), the modified +(scaled) form of the exponential integral, gsl_sf_expint_E1_scaled, +gsl_sf_expint_E2_scaled, gsl_sf_expint_Ei_scaled. + +** Fixed compilation problems with gcc -ansi and other ANSI compilers. + +** Fixed uninitialized memory access in the Niederreiter quasi-random +number generator. + +** Fixed the eigenvalue routines to prevent an infinite loop for Inf +or NaN entries in matrix. + +** Fixed a bug in the multifit and multiroots allocation routines +which cause them to fail to report some out of memory conditions. + +** Fixed a bug in the seeding for the random number generator +gsl_rng_taus2 which affected a small number of seeds. + +** Modified the complex householder transforms to avoid division by +zero, which could cause NaNs to be returned by the gsl_eigen_hermv +eigenvalue decomposition. + +** The Nelder-Mead simplex algorithm for multidimensional +minimisation has been added. + +** The random number distributions now include the Dirichlet and +Multinomial distributions. + +** Added a new function gsl_fcmp for approximate comparison of +floating point numbers using Knuth's algorithm. + +** Added new functions gsl_ldexp and gsl_frexp as portable +alternatives to ldexp() and frexp(). + +** Fixed a bug in gsl_linalg_bidiag_unpack_B which was returning +incorrect results for the superdiagonal. + +** Fixed a bug in the acceptance condition for simulated annealing + +** Ordinary differential equations can now be solved using a different +absolute error for each component with gsl_odeiv_control_scaled_new(). + +** Upgraded to libtool-1.4.3 + +* What was new in gsl-1.2: + +** Added new functions for combining permutations, converting between +cyclic and linear representations, and counting cycles and inversions. + +** New multiroot functions now allow access to the current values of f +and dx. + +** The default error handler now outputs a explanatory message before +aborting. + +** Extended gsl_linalg_SV_decomp to handle exact zeroes in the +singular values, and added tests for 3x3 matrices. + +** Fixed a bug in gsl_linalg_SV_decomp which caused singular values to +be sorted incorrectly. + +** Fixed a bug in gsl_linalg_solv_symm_cyc_tridiag which caused it to +produce incorrect results. + +** Added nonsymmetric tridiagonal solvers gsl_linalg_solve_tridiag and +gsl_linalg_solve_cyc_tridiag. + +** The declarations used to export static objects can now be +controlled through a macro GSL_VAR and the header file +. + +** The simulated annealing routine gsl_siman_solve now keeps track of +the best solution so far. + +** The values of the physical constants have been updated to the +CODATA 1998 recommendations. + +** Added new physical constants, newton, dyne, joule, erg and +power-of-ten prefixes, Mega, Giga, Tera, etc. + +** The error estimate for the elliptic function gsl_sf_ellint_Kcomp_e +has been improved to take account of numerical cancellation for small +arguments. + +** The domain of gsl_sf_psi_1piy has been extended to negative y. + +** Fixed memory leak in the Chebyshev module. + +** The seeding procedure of mt19937 has been updated to the latest +version from Makoto Matsumoto and Takuji Nishimura (Jan 2002). The +original seeding procedure is available through the generator +gsl_rng_mt19937_1999. + +** A new random number generator gsl_rng_taus2 has been added to +correct flaws in the seeding procedure of gsl_rng_taus, as described +in an erratum to the original paper of P. L'Ecuyer. + +** Added missing declaration for the generator gsl_rng_mt_19937_1998. + +** Added missing quasi-random number generator function gsl_qrng_init. + +** Removed unnecessary endpoint subtraction in chebyshev-based +QUADPACK routines to avoid possible loss of precision. + +** Fixed bug in gsl_interp_cspline_periodic which caused a +discontinuity in the derivative near the boundary. + +** The function gsl_min_fminimizer_minimum has been renamed to +gsl_min_fminimizer_x_minimum for consistency (the old function name is +still available but is deprecated). Additional functions have been +added for accessing the function values at the minimum and endpoints +of the bounding interval. + +** The KNOWN-PROBLEMS file of "make check" failures has been replaced +by a BUGS file, since we now require "make check" to work correctly +for stable releases. + +* What was new in gsl-1.1.1: + +** Fixes to histogram2d stat functions + +** Added missing prototypes for complex LU determinant functions + +** Improved error handling in multifit routines + +** Added check to avoid division by zero for rank-deficient matrix in +multifit iteration + +* What was new in gsl-1.1: + +** The permutation module now includes a copy function +gsl_permutation_memcpy + +** The implementation of gsl_sf_gamma_inc has been improved and now +avoids problems caused by internal singularities which occurred in the +series expansion for some combinations of parameters. + +** IEEE comparisons of infinities and NaNs are tested during the +configure stage and the functions gsl_isnan, gsl_isinf and gsl_finite +are only compiled on platforms which support the necessary tests. + +** The histogram routines now include a sum function, +gsl_histogram_sum for computing the total bin sum, and additional +statistics functions for 2d histograms. + +** Internal error checking of user-defined functions has been improved +in the multiroots functions. + +** Constants now include the Bohr Radius and Vacuum Permittivity. + +** Range checking is now turned off when building the library, but is +still on by default when compiling user applications. + +** A combinations directory has been added for generating combinations (n,k). + +** The gamma function now returns exact values for integer arguments. + +** Fixed bugs in gsl_sf_hyperg_1F1_int and gsl_sf_hyperg_1F1. + +** Fixed internal error handling in gsl_sf_laguerre_n to allow +recovery from overflow. + +** Several routines for handling divided difference polynomials have +been added to the poly/ directory. + +** The interpolation routines now include polynomial interpolation, +based on divided-differences. + +** Added new random number generators from Knuth's Seminumerical +Algorithms, 3rd Edition: borosh13, coveyou, fishman18, fishman20, +fishman2x, knuthran, knuthran2, lecuyer21, waterman14. + +** Changed divisor in random number generator gfsr4 from 2^32-1 to +2^32 to prevent exact value of 1.0 from being returned, as specified +in the documentation. + +* What was new in gsl-1.0: + +** First general release. + +** Increased the maximum number of iterations in gsl_poly_complex_solve() +from 30 to 60. + +* What was new in gsl-0.9.4: + +** Reorganized the multmin functions to use the same interface as the +other iterative solvers. + +** Added histogram _alloc functions for consistency, in addition to the +existing _calloc functions. + +** Renamed all the gsl_multimin functions to be consistent with the +rest of the library. An underscore has been removed from _minimizer +in all the function names. + +** Renamed the function gsl_sf_coulomb_CL_list to gsl_sf_coulomb_CL_array + +** A bug in the multimin functions where the function parameters +(params) were omitted has been fixed. + +** A bug in the nonlinear minimization routines has been fixed, which +could prevent the algorithms from converging. Additional tests from +the NIST reference datasets have been added and these now agree with +MINPACK. + +** All the physical constants and conversion factors are now defined as +real numbers to avoid potential problems with integer arithmetic. + +** The ODE evolution routines now allow for negative step sizes, and +integrating backwards as well as forwards. + +** The implicit Burlisch-Stoer ODE algorithm 'bsimp' now detects +singularities and forces a reduction in step size, preventing runaway +instabilities. + +** Fixed a bug in the ODE evolution function gsl_odeiv_evolve_apply +which could cause an erroneous value to be returned if the step size +is reduced on the last step. + +* What was new in gsl-0.9.3: + +** Routines for complex LU decomposition are now available, allowing +the solution of systems of equations with complex coefficients. + +** Matrix views of vectors now correctly require a unit stride for the +original vector. + +** Permutations can now be applied to complex arrays and vectors. + +** gsl_sf_pow_int now handles the case x = 0, n < 0 + +** The static versions of inline functions can now be hidden by +defining the preprocessor macro HIDE_INLINE_STATIC. This is needed +for some compilers. + +** The original seeding procedure of mt19937 is available through the +generator gsl_rng_mt19937_1998. The seeding procedure was flawed, but +is available for compatibility. + +** Added missing functions gsl_complex_div_real and +gsl_complex_div_imag. + +** Missing functions for constant vector and matrix views have now been +added. + +** Statistical calculations for histograms are now available, and the +gsl-histogram command also displays the histogram mean and standard +deviation. + +** The behavior of GSL_IEEE_MODE for denormalized exceptions has been +fixed on Openbsd and Netbsd. + +** A pkg-config file gsl.pc is included in the distribution + +** The reference manual can now be printed in @smallbook format without +overflow. + +* What was new in gsl-0.9.2: + +** Vector and matrix views are now compliant with the ANSI standard. + +** Added Lambert functions gsl_sf_lambert_W0, gsl_sf_lambert_Wm1. + +** The reference manual now uses the GNU Free Documentation License. + +** Fixed a couple of bugs in the SVD routines. + +** Macros for Infinity and Nan now work correctly with Microsoft Visual +C++, and a bug in the config.h file for the finite() function has been +fixed. + +** Redundant entries in the test suite for the complex math functions +have been removed, making the distribution size smaller. + +** Installed programs gsl-randist and gsl-histogram now use shared +libraries. + +* What was new in gsl-0.9.1: + +** The single precision ffts now uses float throughout, rather than +mixing float and double. + +** The random number distributions now include the Landau distribution. + +** The fft function interface has been reorganized, with workspaces +separate from wavetables to eliminate unnecessary recomputation of +trigonometric factors. + +** The gsl_interval type has been eliminated and replaced by two double +arguments for simplicity. + +** The order of the arguments to the minimization routines is no more +logical, with function values assocatied with x-values. + +** Modified initialization of vector and matrix views to work with the +SunPro compiler. + +** Renamed gsl_Efunc_t to gsl_siman_Efunc_t, in accordance with +namespace conventions. + +** Improved accuracy and fixed bugs in gsl_sf_hyperg_1F1, +gsl_sf_bessel_I0_scaled, gsl_sf_erfc, gsl_sf_log_erfc, +gsl_sf_legendre_Q0 and gsl_sf_legendre_Q1, and gsl_sf_zeta. + +** Improved IEEE compliance of special functions, overflows now return +Inf and domain errors return NaN. + +** Improved checking for underflows in special functions when using +extended precision registers + +* What was new in gsl-0.9: + +** There is a new system of vector and matrix views. Any code using +vector and matrix views will need to be updated. + +** The order of arguments of the view functions involving strides have +been changed to be consistent with the rest of the library. + +** The ode solvers have been reorganized. + +** There are new eigensystem routines for real symmetric and complex +hermitian matrices. + +** The linear algebra directory now includes functions for computing +symmetric tridiagonal decompositions and bidiagonal decompositions. + +** The svd routines now include the Golub-Reinsch and Modified +Golub-Reinsch algorithms in addition to the Jacobi algorithm. + +** The interpolation directory has been reorganized and a higher-level +"spline" interface has been added which simplifies the handling of +interpolation arguments. + +** IEEE support is now available on OpenBSD. + +* What was new in gsl-0.8: + +** The build process now uses the latest libtool and automake. + +** The library should now compile with Microsoft Visual C++. + +** Portable versions of the isinf, isnan and finite functions are +available as gsl_isinf(x), gsl_isnan(x) and gsl_finite(x). + +** The definitions of GSL_POSINF, GSL_NEGINF and GSL_NAN no longer +cause divisions by zero during compilation. + +** The gsl_interp_obj has been renamed to gsl_interp. + +** The poly_eval and pow_int functions have been moved from the +specfunc directory to the poly and sys directories. + +** The Chebyshev functions are now available as an independent module +in their own directory. + +** The error handling conventions have been unified across the +library. This simplifies the use of the special functions. + +** A full CBLAS implementation is now included for systems where ATLAS +has not been installed. The CBLAS library can also be used +independently of GSL. The organisation of the BLAS directories has been +simplified. + +** IEEE support for HPUX-11, NetBSD, Apple Darwin and OS/2 are now +included. + +** The library now includes implementations of log1p, expm1, hypot, +acosh, asinh, atanh for platforms which do not provide them. + +** The convention for alloc and set functions has changed so that they +are orthogonal. After allocating an object it is now necessary to +initialize it. + +** There is a new module for estimating numerical derivatives of functions + +** There is a new module for handling data with ntuples + +** The histogram lookup functions are now optimized for the case of +uniform bins, and include an inline binary search for speed. + +** The Chebyschev coefficients for the QAWO algorithm are now +precomputed in a table for efficiency, rather than being computed on +the fly. + +** There are several new sorting functions for selecting the k-th +smallest or largest elements of a dataset. + +** Iterator functions are now available for permutations, +gsl_permutation_next and gsl_permutation_prev. + +** The function gsl_complex_xy has been renamed gsl_complex_rect + +** The API for simulated annealing has been changed to support search +spaces in which the points cannot be represented as contiguous-memory +data structures. gsl_siman_solve() now takes three extra arguments: a +copy constructor, a copy function and a destructor, allowing +gsl_siman_solve() to do its work with linked data structures. If all +three of these function pointers are NULL, then the traditioanl +approach of using malloc(), memcpy(), and free() with the element size +is used. + +* What was new in gsl-0.7: + +** Linux/PowerPC should now be well supported. + +** Header files for common physical constants have been added. + +** Functions linear and nonlinear regression in one or more dimensions +are now available. + +** Vector and matrix views now have access to the address of the +underlying block for compatibility with VSIPL (www.vsipl.org). + +** There is a new library for generating low-discrepancy quasi-random +sequences. + +** The seeding procedure of the default random number generator +MT19937 has been updated to match the 10/99 release of the original +code. This fixes a weakness which occurred for seeds which were +powers of 2. + +** The blas library libgslblasnative has been renamed libgslblas to avoid +confusion with system blas library + +* What was new in gsl-0.6: + +** The library is now installed as a single shared or static libgsl +file using libtool. + +** The gsl-config script now works. There is also a gsl.m4 file which +people can use in their configure scripts. + +** All header files are now in installed as pkginclude headers in a +gsl/ subdirectory. + +** The header files now use extern "C" to allow them to be included in +C++ programs + +** For consistency the following functions have been renamed, + + gsl_vector_copy (dest, src) is now gsl_vector_memcpy (dest, src) + gsl_rng_cpy (dest, src) is now gsl_rng_memcpy (dest, src) + gsl_matrix_copy_row (v,m,i) is now gsl_matrix_get_row (v,m,i) + gsl_matrix_copy_col (v,m,j) is now gsl_matrix_get_col (v,m,j) + gsl_vector_swap is now gsl_vector_swap_elements + gsl_vector_swap_cols is now gsl_vector_swap_columns + gsl_vector_swap_row_col is now gsl_vector_swap_row_column + +and the vector/matrix view allocation functions have been simplified. + +** A new sort directory has been added for sorting objects and vectors. + +** A permutation directory has been added for manipulating permutations + +** Statistics functions now support a stride argument for generality, and +also support weighted samples and a covariance function. + +** The names of the statistics functions have been reorganized for +improved clarity. Consult manual for details. + +** The environment variable GSL_IEEE_MODE now uses "," as a separator +instead of ";" + +** The autogen.sh script, mostly for use by developers who use the CVS +repository, now does not run configure. + +** The histogram directory now has additional functions for copying +and comparing histograms, performing arithmetic on histograms and +finding maximum and minimum values. Corresponding functions have been +added for vectors and matrices. + +** The linear algebra directory supports additional methods, including +rectangular QR, rectangular QRPT and Cholesky decomposition. + +** Complex arithmetic (+,-,*,/) and complex elementary functions +(sqrt, log, exp, sin, cos, tan, arcsin, arccos, arctan, sinh, cosh, +tanh, arcsinh, arccosh, arctanh) are now supported. + +** Multidimensional minimization methods are now available. + +** The special functions directory now includes a routine for +computing the value of the incomplete beta function. + +* Was new in gsl-0.5: + +** There is now a KNOWN-PROBLEMS file which lists compilation problems +and test failures which are known to the developers. + +** Many improvements have been made to the special functions directory. + +** The extrapolations from the Levin u-transform are now more reliable. + +** Linear algebra and Eigensystem routines are now available. + +** ODE solvers are now available. + +** Multidimensional root finding algorithms are available. + +** Minimization now keeps track of function values. + +** Matrices and vectors now use a BLAS compatible format, and have a +separate memory handling layer (gsl_block). + +** Roots of general polynomials can now be found using gsl_poly_complex_solve + +** IEEE modes support on Sparclinux, Tru64, AIX and IRIX + +** We have added the second generation RANLUX generators RANLXS and RANLXD + +** Minimization algorithms are available (one-dimensional) + +** Documentation now works out of the box with the standard Texinfo. + +** Full reimplementation of the QUADPACK integration library + +** Introduced THANKS file. +We appreciate all patches from people on the net, even those which are +too small to warrant adding the author to the AUTHORS file. The +THANKS file should include everyone who sent in patches. They should +also be mentioned in the ChangeLog entry. + +* What was new in gsl-0.4.1: + +** Two changes not making their way into the documentation +A couple of things are not getting into the docs, so here are the +errata: +*** The FFT routines now take a stride parameter. Passing 1 for the +stride will make them behave as documented. +*** The complex numbers are now an opaque type, and no assumptions can +be made about the format in which they are stored (they are not stored +as a simple structure anymore, since that is not portable). The type +is now gsl_complex (or gsl_complex_long_double or gsl_complex_float), +and the macros to access them are + GSL_REAL(z) + GSL_IMAG(z) + GSL_COMPLEX_P_REAL(zp) + GSL_COMPLEX_P_IMAG(zp) + GSL_COMPLEX_EQ(z1,z2) + GSL_SET_COMPLEX(zp,x,y) + GSL_SET_REAL(zp,x) + GSL_SET_IMAG(zp,y) + +This change in the complex number API makes it important that you +start working with 0.4.1 or later. + +** 0.4.1 is being released in occasion of the Red Hat 6.0 release. +The specfunc module is still in an alpha state; if you run "make +check" in the specfunc directory you will see that some tests still +fail. + +** Most Alpha specific problems have been fixed. In particular the +random number generators rand48 and ranf now work on the Alpha + +** Additional random number distributions: + Rayleigh distribution + n-dimensional spherical distribution + (ie, points at random on an n-dimensional sphere) + Gaussian tail distribution + (ie, choosing values from a gaussian distribution subject to a + constraint that they be larger than some fixed value, eg 5 sigmas) + Walker's algorithm for arbitrary discrete distributions + +* What was new in gsl-0.4: + +** A single libgsl.a file is built in the top level directory and +installed, instead of separate .a files for each subdirectory. + +** The parts of the complex struct gsl_complex, .real and .imag, are +not supported anymore. The macros GSL_REAL(z) and GSL_IMAG(z) do the +same job. All complex numbers are considered as packed arrays of +floating point numbers, for portability since the layout of structs or +arrays of structs is not guaranteed. + +** The interface for matrices and vectors has changed. Vectors now +support strides, and can be used to access rows and columns of a +matrix. Many more types are available (float, double, long double, +int, long, short, char, signed and unsigned, plus complex floats, +doubles and long doubles) due to improvements in our preprocessor +template system. + +** The random number generators have a completely new thread-safe +interface and have moved from the random directory to the rng +directory. Any program using random numbers will have to be +updated. You can also choose generators and seeds using the +environment variables GSL_RNG_TYPE and GSL_RNG_SEED. + +** Some additional random number distributions have been added in the +randist directory. The available distributiosn are: bernoulli, beta, +binomial, cauchy, chisq, erlang, exponential, fdist, flat, gamma, +gauss, geometric, levy, logistic, lognormal, nbinomial, pareto, +poisson, sphere, tdist, twosidedexp, weibull. + +** The FFT interface has be extended to support strides, but the +implementation hasn't been finished for all the cases yet, The FFT +allocation functions now return a pointer to a newly allocated +wavetable struct, instead of taking the pointer to an existing struct +as an argument. + + e.g. status = gsl_fft_wavetable_alloc(n, w) + is now w = gsl_fft_wavetable_alloc(n) in accordance with usual practice + +** The statistics directory now works with all the builtin +types. It has a new function for computing the lag1-autocorrelation and +an extra set of numerical accuracy tests from NIST as part of 'make +check'. + +** The simulated annealing routines no longer set the random number +seed with the time of day. You'll need to reseed the generator +yourself if you want subsequent runs to use different random numbers. + +** Work is in progress on a reimplementation of QUADPACK in the +`integration' subdirectory, but it is not finished yet. + +** Work is in progress on reimplementations of the VEGAS and +MISER Monte Carlo algorithms in the monte' subdirectory. They work +just fine, but the code is still evolving. + +** Work has started on a portable blas system in the `blas' +subdirectory. + +** You can now set the IEEE arithmetic mode for your programs from the +environment variable GSL_IEEE_MODE by calling the function +gsl_ieee_env_setup(). Currently this only works with the Linux kernel, +HP-UX, SunOS4 and Solaris. + +** There are some simple spline interpolation functions in the `interp' +subdir. + +** The NEWS file now uses outline mode, like the Emacs NEWS file + + +* This covers changes made *after* the gsl-0.2 snapshot + +** Added several new modules: histogram, integration, matrix, specfunc +and vectors. + +** Changed libgsl_statisctics.a to libgslstatistics.a and +libgsl_siman.a to libgslsiman.a, since most of the packages don't have +the underscore. Users will have to remove the old files, unless they +do a "make uninstall" on the previous release before they install this +new one. + +** Changes to the random number suite +Incorporated the gauss, poisson and exponential distributions in +the standard libgslrandom.a + + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +end: diff --git a/software/gsl-1.15/README b/software/gsl-1.15/README new file mode 100644 index 000000000..69ebe860c --- /dev/null +++ b/software/gsl-1.15/README @@ -0,0 +1,81 @@ +GSL - GNU Scientific Library +============================ + +This is GSL, the GNU Scientific Library, a collection of numerical +routines for scientific computing. + +GSL is free software, you can redistribute it and/or modify it under +the terms of the GNU General Public License. + +The GNU General Public License does not permit this software to be +redistributed in proprietary programs. + +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +Availability +============ + +The current stable version of GSL is always available from ftp.gnu.org +in the directory /pub/gnu/gsl. + +A list of mirror sites can be found at http://www.gnu.org/order/ftp.html + +Installation +============ + +GSL follows the standard GNU installation procedure. Please consult +the INSTALL file in this distribution for more detailed instructions. + +For information about specific platforms and compilers see the +"Compilation Notes" section in the INSTALL file. + +More information about GSL +========================== + +The project homepage is http://www.gnu.org/software/gsl/ + +See the NEWS file for recent changes to the library. + +The GSL Manual has been published and can be ordered from most +bookstores. The publication details are, + + GNU Scientific Library Reference Manual - Revised Second Edition, + M. Galassi et al, ISBN 0954161734 (620 pages, paperback). + +The money raised from sales of the manual helps support the +development of GSL. + +A Japanese translation of the reference manual is available from the +GSL website above (thanks to Daisuke TOMINAGA). + +Reporting Bugs +============== + +A list of known bugs can be found in the BUGS file. Details of +compilation problems can be found in the INSTALL file. + +If you find a bug which is not listed in these files please report it +to bug-gsl@gnu.org. + +All bug reports should include: + + The version number of GSL, and where you obtained it. + The hardware and operating system + The compiler used, including version number and compilation options + A description of the bug behaviour + A short program which reproducibly exercises the bug + +It is useful if you can check whether the same problem occurs when the +library is compiled without optimization. Thank you. + +Any errors or omissions in the manual can also be reported to the +same address. + +Contributing to GSL +=================== + +If you are interested in participating in GSL development, please see +the webpage at http://www.gnu.org/software/gsl/ + diff --git a/software/gsl-1.15/THANKS b/software/gsl-1.15/THANKS new file mode 100644 index 000000000..244e4d808 --- /dev/null +++ b/software/gsl-1.15/THANKS @@ -0,0 +1,499 @@ +* Jim McElwaine for very useful comments and discussions + about the dilogarithm and related functions. + +* Simone Piccardi for extensions to the +histogram routines, and providing the ntuple code + +* Nelson H. F. Beebe for references and testing +the software on many different platforms. + +* Tim Mooney for IEEE support for +Tru64, AIX, IRIX, fixes for odes, and testing + +* Thomas Walter for heapsort +routines, cholesky decomposition, bug reports and useful suggestions + +* Jorma Olavi T�htinen for complex arithmetic +functions + +* Barak Pearlmutter + +* Frederick W. Wheeler + +* Bernd Petrovitsch + +* Jacek Pliszka for bug report + +* Michele Clark for bug report + +* Jeffrey Russell Horner for information on CBLAS + +* Rahul V. Herwadkar for testing + +* Trond Bo for bug report + +* Jan Kasprzak for bug report + +* David Kaelbling for testing + +* Mark Levedahl for bug report + +* David Billinghurst for testing + +* Jean-Bernard ADDOR for bug report + +* Fabrice Rossi bug reports and suggestions + +* Paul Walmsley for bug report and patch for + fixing matmult. + +* Dave Morrison for advice on build procedure and + various patches, the diff/ numerical differentiation routines, + multmin documentation, and Landau distribution + +* Brett Viren for debugging qpsrt.c. + +* Christopher Gabriel contributed the + gsl-config and gsl.m4 we use. + +* C M Murphy patch to fix up consts in header files + +* Bracy H. Elton for correcting a reference in the FFT Algorithms document + +* Tadhg O'Meara for finding a bug in gsl-randist + +* Steve Robbins patch to work around FP_RND + problems on Tru64, testing and other patches., bug fix for nm_simplex + algorithm. + +* John Fisher testing on powerpc linux + and support for fp-ppclinux.c + +* OKUJI Yoshinori for a patch for fp-x86linux.c for libc5 + +* Pablo Bianucci for patches to complex matrix/vectors + +* Toby White for several patches and +improvements to the design, OpenBSD support + +* Bill Brower for bug report on gsl.m4 + +* Vladimir Kushnir for ieee support for FreeBSD + +* F J Franklin for test reports and debugging + +* Keith Briggs for bug reports and code for +the skewed Levy alpha-stable variates gsl_ran_levy_skew + +* Vince for permutation iterator functions + +* Henry Sobotka for ieee support for OS/2 and bug fixes + +* Remy Bruno for bug fix + +* M. Lavasani for bug reports and testing on HPUX11 + +* Jason Beegan for NetBSD support + +* Zeger Knops for bug fix + +* Rodney Sparapani for Darwin support + +* Ramin Nakisa for bug reports + +* Achim Gaedke for bug reports and +suggestions, additional histogram code, PyGSL python interface, 2d +histogram statistics, bug fixes for simulated annealing + +* Eric Rose for bug report and useful tip on casting + +* M Joonas Pihlaja for bug reports + +* Albert Chin for bug reports, patches, and +providing HP-UX platforms for testing + +* Asterio Gonzalez for a bug report for multmin + +* Carlo Perassi for implementing the random number +generators in Knuth's Seminumerical Algorithms, 3rd Ed. + +* Dan, Ho-Jin for divided differences interpolation +routines + +* Stefan Koch for useful bug reports and +fixes for the special functions + +* Szymon Jaroszewicz for the combinations modules and + bug reports + +* Theis Peter Hansen fixed unchecked status values in +multiroots + +* Jungemann Markus documentation fixes + +* Hans E. Plesser (hans dot plesser at itf dot nlh dot no) more +reliable implementation of gamma_inc, multifit bug fixes + +* Arin Chaudhuri documentation bug reports + +* Karsten Howes siman bug fix + +* Vladimir Savichev bug reports + +* Jochen K�pper doc bug fixes, additional +constants + +* John Ketchum for bug reports for the blas library + +* Nicolas Darnis additional permutation functions + +* Jeff Spirko patch for 1d minimization + +* David Necas (Yeti) bug reports and patches +for linear algebra, interpolation, additional tridiagonal solvers + +* for bug report + +* Christian T. Steigies for documentation bug report + +* Atakan Gurkan for bug reports and patches for the +random number generators. + +* David Ronis for bug reports and +patches + +* Christian T. Steigies for a documentation fix + +* Teun Burgers improvements to configure script + +* Olivier Andrieu bug report for Chebyschev +memory leak + +* Hiroshi Imamura extension to psi(1+iy) + +* Taliver Heath keep track of best solution +in siman_solve. + +* Trevor Blackwell bug report test case for +SVD d_n = 0, bug fix to mt19937 generator + +* Nicolas Bock documentation bug report + +* Alan Aspuru-Guzik documentation bug report + +* Peter S. Christopher bug fix for +simulated annealing + +* Gene Carter build shared libraries on MacOS X + +* Fabian Jakobs fixed a bug in +gsl_linalg_bidiag_unpack_B, and documentation bug-fix for blas + +* Gavin Crooks documentation bug fix, +dirichlet distribution, multinomial distribution + +* Gert Van den Eynde gsl_ldexp, gsl_frexp, gsl_fcmp + +* Reinhold Bader , fixes for Hitachi SR8000 + +* Slaven Peles , build options for +Compaq cc, doc bug fix + +* David Favis-Mortlock bug report for +gsl_rng_taus2 seeding + +* Alexander Babansky documentation bug report for Ei(x) + +* Tiago de Paula Peixoto bug report for multifit +memory allocation + +* Adam Johansen bug report for eigenvalue routines + +* Wolfgang Hoermann bug report for niederreiter qrng + +* Jerome Houdayer bug report for taus seeding + +* Conrad Curry bug and documentation reports + +* Erik Schnetter documentation bug reports + +* Maarten De Munck bug fix for vector/matrix get + +* Axel Hutt bug fix for QAWC integration, +documentation bug fix + +* Martin Jansche various bug reports + +* Gregory Soyez documentation bug report + +* Attilio Rivoldini bug report for CBLAS tests + +* W.M. Vissers bug report for +gsl_complex_arccsc_real + +* Paolo Redaelli bug report for chebyshev +functions + +* Andrew Howard bug report for gsl_ran_discrete + +* Heiko Bauke bug reports and patches +for random number generators + +* Vincent Sacksteder bug reports for MSVC7 + +* Peter Verveer improvement to memory +usage of MINPACK routines + +* Mario Pernici bug fix for +gsl_combination_valid and new function gsl_permutation_memcpy, +doc fix for bessel functions, bug fix for gsl_sf_psi_1_int, +bug report for gsl_permutation_canonical_to_linear, linalg +QRPT bug reports and fixes, and many other corrections. + +* Fabio Brugnara provided a much-needed bug +fix for the conjugate gradient algorithm multidimensional +minimisers. + +* Krzysztof Pachucki bug report for gsl_sf_hypergU_int + +* Carsten Svaneborg documentation bug report + +* Liguo Song documentation bug report + +* Carlo Ferrigno bug report for CGS units + +* Giulio Bottazzi many useful bug reports + +* Olaf Lenz rng frwite/fread, bug reports + +* Jamie Lokier for testing + +* Grant Lythe documentation bug report + +* Jussi Piitulainen documentation bug report + +* Aaron Schweiger bug report for SVD/column balancing + +* Carlo Ferrigno bug report about const problems + +* Jussi Piitulainen documenation bug report for +gsl_ran_hypergeometric_pdf + +* Bas Zoetekouw documentation bug report + +* Paul Sydney bug report and patch for min/brent.c + +* Alexei Podtelezhnikov patch for sphere.c + +* Neil Bushong documentation typo bug report + +* Brad Bell documentation bug report + +* Andreas Schneider <1@c07.de> bug report for R250 + +* Luigi Ballabio fix m4 quoting in gsl.m4 + +* Zbigniew Koza documentation bug fix for odes + +* James Scott fix for linalg tests on MSVC + +* R�mi Butel fixes for multimin overflow +conditions + +* Andris Pavenis Makefile fix for EXEEXT + +* Daniel Webb bug report for potential cspline +division by zero + +* Ewald Stamp bugfix for vector/swap_source.c + +* Joerg Wensch LQ decompositions + +* Jason Stover patch for cdf/beta.c, +inverse cumulative distributions, discrete cumulative distributions + +* Ralph Menikoff bug report for gsl_sf_expint_scaled + +* Yoshiki documentation bug report + +* Nigel Lowry documentation proofreading + +* Giulio Bottazzi cdf for exponential power +distribution, bug reports + +* Tuomo Keskitalo many improvements to ode-initval + +* Britton Kerin documentation bug reports + +* Patricio Rojo patch for numerical +instability in interpolation integrate function + +* Damir Herman improved accuracy of +histogram range calculations + +* John Salmon bug report for gsl_cheb_eval_n_err + +* Dirk Eddelbuettel for bug reports and testing, and +maintaining the Debian package for GSL. + +* Jari H�kkinen for svd bug reports, rng bug reports + +* Marco Canini patch for IXP2400 Xscale + +* Ben Klemens bug report for sorting vectors +with NANs + +* Peter Brommer bug report and patch +for Brent minimisation algorithm. + +* Gabriel Withington typo in docs + +* Stewart V. Wright patch for missing +spline functions + +* Richard Mathar additional Debye +functions n=5,6, handle case x==1 in 2F1. + +* Stefan Jahn bug fix for periodic cubic splines with n=3 + +* Yoram Burak bug report for scaled bessel function In_scaled + +* Mario Santos bug report for spherical bessel function + +* Vincent Plagnol bug report for gsl_randist_binomial_pdf + +* John Houck bug report for gsl_sf_synchrotron_1 + +* Jochen Voss ziggurat gaussian generator + +* John D Lamb Marsaglia-Tsang gamma generator, bug reports + +* Giulio Bottazzi improved exponential +power distribution and gsl_multifit_linear_est + +* Charles Karney added Leva bounds to gaussian ratio method generator + +* Torquil Sorenson documentation bug fixes for FFTs + +* Yajun Wang - bug report for multifit n

- patch for Macos X on Intel + +* Lowell Johnson - implementation of mathieu functions + +* Brian Gladman - useful bug reports + +* B. Lazarov - compilation bug report for randist + +* Harald Moseby - special functions bug reports + +* Neil Harvey - bug report for beta pdf + +* Felipe G. Nievinski - documentation bug report + +* Daisuke TOMINAGA - Japanese translation of manual and numerous corrections + +* Andoline Bucciolini - documentation bug for BLAS + +* Daniel Falster bug report for fdist_Pinv + +* Giancarlo Marra bug report for M_PI_4 + +* Alan Irwin for sample implementation of +improved BFGS algorithm. + +* Lionel Barnett for pointing out an +error in the elliptic integrals + +* Ed Smith-Rowland <3dw4rd@verizon.net> patch for laguerre polynomials + +* Katrin Wolff bug report for Lambert W function + +* "Heikki Orsila " cleaning up siman code + +* Eugene Loh bug report for gsl_log1p + +* Richard Smith bug report and suggestions for +correct use of isfinite + +* Marco Lombardi bug report for svd + +* I J Wilson bug report for dirichlet +function + +* Justin Lenzo bug reports for +vector/matrix tests. + +* Sebastian Quei�er bug report for +gsl_cdf_beta_Pinv + +* Andries Brouwer bug report for +underflow in symmetric eigenvalues + +* Mingxi Wu bug report for multinomial pdf + +* Chris Mihelich bug reports and suggestions for +gsl_ldexp and gsl_frexp + +* Frank Reininghaus complex polynomial +evaluation and ode improvements + +* Jason Coy optimisation for dwt.c + +* Richard Guenther bug reports + +* Stijn van Dongen bug fix for overflow in + gsl_cdf_hypergeometric_{P,Q} + +* Claude Dion documentation bug reports + +* Michael Kuklik bug report for simplex + +* Paul Accisano, bug report and fix for cyclic solver + +* Thomas Weber bug and patch for interp + accelerator + +* Lori A. Pritchett-Sheats bug report for vegas chisq. + +* Frank Wang bug report for gsl_ran_gamma_knuth. + +* Peter Johansson fix for make install prefix=PREFIX + +* Taneli Kalvas bug report for odes + +* Marco Maggi bug fix for gsl_blas_drotm + +* Mateus Ara�jo Santos - bug fix for LM set + +* James Howse - quad_golden minimisation algorithm + +* Marc JOURDAIN - polynomial derivatives function + +* Andrew Steiner - for bug reports + +* Ettl Martin - bug report, rk4 memory + +* Yevgeniy Naumovich - bspline allocators fix + +* Huan Wu - gsl_linalg_complex_cholesky_invert + +* Ralf Wildenhues - numerous proofreading corrections + +* Thomas Tanner - bug report for gsl_sf_beta_inc + +* Sam Mason - bug fix for gsl_pow_int + +* Jos� Luis Garc�a Pallero - error checking for GSL cblas + +* Teemu Ikonen patch for gsl_ran_chisq_pdf + +* Evgeny Kurbatov - patch for error + handling in interpolation routines + +* Michel Kern - fix for singular Jacobian in + Newton solver + +* Nikolay Simakov - bug report for gsl_eigen_jacobi + +* Jim Ward - numerous bug reports and useful suggestions diff --git a/software/gsl-1.15/TODO b/software/gsl-1.15/TODO new file mode 100644 index 000000000..f85489b59 --- /dev/null +++ b/software/gsl-1.15/TODO @@ -0,0 +1,191 @@ +# -*- org -*- +#+TITLE: GSL TODO File + +* Main Todo Items + +We are looking for volunteers to do the following tasks. +Consult the TODO files in each directory first for specific +requirements. + +** 1st-line support on the mailing lists (e.g. checking that bugs are +reproducible, and that all relevant information is supplied) + +** Modified Ei(x) function (see specfunc/TODO) + +** Quasi-random number distributions + +** ODE algorithms from RKSUITE + +** Incomplete Fermi-Dirac functions + +** General Legendre functions + +** Spheroidal wave functions + +** Weierstrass elliptic functions + +** Complex Bessel Functions + +** Additional volunteers with access to a good library to get copies of +papers for other developers. + +** Estimates of condition numbers for linear solvers + +** Sine and Cosine Transforms from FFTPACK (Alok Singhal ) + +** Cubature, e.g as provided by Cubpack. (Gert Van den Eynde + ?) + +** Fresnel Integrals ("Juergen J. Zach" ) + +** Cumulative Distribution functions for discrete random distributions + +* Changes for Release 2.0 + +Break binary compatibility, but keep source compatibility. + +** Add a 'void *' to all workspaces, to allow for future changes. + +** Disable deprecated functions + +** Fix up the workspace_alloc functions so they have consistent names + (add functions where needed, don't remove) + +** Standardize function names, in particular VERB vs NOUN (e.g. _invert +vs _inverse). Also adopt a convection for functions which can operate +in place vs use of workspace (e.g linalg_solve functions). + +** gsl_sf_ellint_D - remove useless argument n? + +** gsl_roots doesn't store function value, so testing the residual requires function to be recomputed +Generally all the iterative routines should follow a consistent approach +to outputting everything that is necessary for the next iteration +* Other tasks + +** Remove use of long double internally, e.g. as an accumulator in +loops. It introduces variation between platforms which is undesirable. +It should be replaced with a preprocessor variable ACC_DOUBLE so +that the user can compile the library with the old long double +behavior if desired. + +** Use BLAS internally as much as possible, to take advantage of +speed improvements on large-scale systems. There may be some +instances where a simple for() loop is preferred since there's a +function-call overhead in calling BLAS routines. + +** More tests. We should (at least) have a test for every error +condition. Use GCOV to improve coverage. + +** Annotate the header files with GAMS classifications. See if they +can be included in the GAMs website. + +** Make the return value EINVAL vs EDOM consistent for invalid +parameters. EDOM means a domain error (i.e. float or mathematically +undefined), EINVAL means invalid (i.e. zero length) + +** Change return 0 to return GSL_SUCCESS, and return -1 to GSL_FAILURE +throughout, where appropriate. Similarly change any if(...) checks of +return values to use == GSL_SUCCESS, if they are checking for zero. +N.B. want to be careful about accidentally omitting error conditions +if using something like == GSL_FAILURE when function returns a +different error code. + +** Make sure that all #defines are fully wrapped in ()'s, especially +the outermost layer which may have been missed. Everything should be +of the form #define foo(x) (....) so there is no possibility of bad +parsing. Need a perl script to check this! + +** Eliminate use of volatile where it has been used to force rounding +(integration/). It is better to write the code to avoid dependence on +rounding. + +** Constant objects (like gsl_roots_fsolver_brent) ought to have +constant pointers (const gsl_roots_fsolver_type * const +gsl_roots_fsolver_brent) + +** PyGSL -- python bindings for GSL, see http://pygsl.sf.net/ + + +** From Goose + ASCII import + Categorical Sets + Kernel Density Estimation + Shampine Polynomial Regression + Bootstrapping, Jacknife + Descriptive: Range, Trimmed Mean, Winsorized Mean, Moments + Harmonic mean, RMS, Durbin-Watson, AR1 independence + Autocorr, Autocorr_z, Cramer vos Mises, Anderson-Darling + Spearman-rho, Kendall-tau, EDF_D_both EDF_D_plus, + EDF_D_minus, EDF_D, EDF_kuiper_V, pooled mean + pooled var, + Tests: kolmogorov_smirnov + Moving average, Exponential moving average + wilcoxon_statistic, wilcoxon_noties_cdf, wilcoxon_general_cdf + Cochran Q test, KruskalWallis, McNemar, spearman_Rocc + + +* Wishlist or vague ideas + +** An example chapter on how to link GSL code with GNU Guile, and Python + +We could also provide g-wrap wrappers for guile, or swig.i files and +swig demos so that swig can be run more easily. + +** Provide an interface to LAPACK, as for BLAS? Clarify the license +for LAPACK first, their web page is vague on what the license terms +are. Some parts of LAPACK are included in octave so maybe the Octave +maintainers will know more. + +** Public domain or free texts which could be distributed with GSL: + +Abramowitz and Stegun, "Handbook of Mathematical Functions" appears to +be public domain. + +SEPT/02: See online images at http://members.fortunecity.com/aands/ + +Devroye's book on Random Variates (1st ed) is/was in the public +domain. + + +** Investigate complex support in GCC: Operations like sin(z) silently +convert argument to double, losing the imaginary part. This is +mentioned in CEPHES documentation in 1998 with a patch to generate a +warning. What happened? (Does it now work with gcc-3.0?) + +** Go through the matrix and vector functions systematically and decide +what should be provided outside of BLAS. + +** Change from gsl-ref.texi to gsl.texi since it is the main file? +Also, put under dir section "Math" (which seems to be the appropriate +one for Debian, as Octave, Gnuplot etc are in that) + +** Remove error stream stuff?? It is hardly used. + +** Extend histogram routines as described in recent discussion + +** Check that there are no conflicts when linking with Lapack. CBLAS, ATLAS + +** Make a sorted datatype for the median and quantile functions so that +the user can be prevented from passing unsorted data, which is not +checked for. + +** Optimization/error for dest == src as appropriate + +** Provide a run-time expression evaluator for interactive programs +where the user can provide formulas as strings. Keith Briggs +recommended formulc2.22 which he had found useful in several projects. +http://www.cs.brandeis.edu/~hhelf/formu/formulc.html. It is LGPL. +Alternatively, the source code for GDB contains yacc grammars and +evaluators for expressions in various languages, so that would be +another way to go. It would have the advantage of following the +language standards. If I was going to write something from scratch I +would think about using that as a base, as the full set of operators +are already included with the correct precedence rules. Being able to +evaluate C and Fortran expressions could be useful. + +** We should have an index mapping type object which handles elements +of size_t for vectors and matrices, or at least vectors and matrices +of size_t in addition to long, int, etc. + + + diff --git a/software/gsl-1.15/aclocal.m4 b/software/gsl-1.15/aclocal.m4 new file mode 100644 index 000000000..0625c6969 --- /dev/null +++ b/software/gsl-1.15/aclocal.m4 @@ -0,0 +1,9418 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3293 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4' +macro_revision='1.3293' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/software/gsl-1.15/autogen.sh b/software/gsl-1.15/autogen.sh new file mode 100755 index 000000000..392415911 --- /dev/null +++ b/software/gsl-1.15/autogen.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +echo "If you use a recent version of autotools, this script is obsolete" +echo "Just run autoreconf -i -f -v" +echo "followed by ./configure --enable-maintainer-mode" +echo + +# Run this to generate all the auto-generated files needed by the GNU +# configure program +libtoolize --automake +aclocal +autoheader +automake --add-missing --gnu --force-missing +autoconf +echo "Now use ./configure --enable-maintainer-mode" diff --git a/software/gsl-1.15/blas/.deps/blas.Plo b/software/gsl-1.15/blas/.deps/blas.Plo new file mode 100644 index 000000000..e726c4b73 --- /dev/null +++ b/software/gsl-1.15/blas/.deps/blas.Plo @@ -0,0 +1,256 @@ +blas.lo: blas.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/blas/ChangeLog b/software/gsl-1.15/blas/ChangeLog new file mode 100644 index 000000000..ce72bf1d8 --- /dev/null +++ b/software/gsl-1.15/blas/ChangeLog @@ -0,0 +1,77 @@ +2009-04-30 Brian Gough + + * blas.c (gsl_blas_drotm): fix incorrect length check + +2005-04-05 Brian Gough + + * blas.c (gsl_blas_ssyrk): test conformance against size correctly + allowing for transpose + +2004-12-21 Brian Gough + + * blas.c (gsl_blas_ssyrk): corrected K to be A->size2 instead of + A->size1 + (gsl_blas_dsyrk): as above + (gsl_blas_csyrk): as above + (gsl_blas_zsyrk): as above + (gsl_blas_cherk): as above + (gsl_blas_zherk): as above + +Mon Mar 18 19:39:34 2002 Brian Gough + + * blas.c (gsl_blas_zgemv): added missing case of CblasConjTrans to + zgemv and cgemv + +Mon Feb 18 20:01:49 2002 Brian Gough + + * gsl_blas_types.h: removed unneeded header files + +Sat Apr 28 15:25:16 2001 Brian Gough + + * blas.c: cast size_t to int for calls to CBLAS + +Mon Mar 19 17:04:47 2001 Brian Gough + + * split cblas routines out into a separate directory and library + which can be used as a cblas outside gsl + +Tue Sep 19 19:07:44 2000 Brian Gough + + * test_blas_raw.c: added tests for dtbsv + +Sat Sep 16 20:27:18 2000 Brian Gough + + * blas.c: use GSL_ERROR macro to signal errors + +Fri Sep 15 20:04:28 2000 Brian Gough + + * source_iamax_r.h source_iamax_c.h: initialize max index to zero + before loop, so that the result is defined for a null vector + +Mon May 22 12:27:47 2000 Brian Gough + + * Makefile.am (lib_LTLIBRARIES): renamed libgslblasnative.la to + libgslblas.la since "native" is ambiguous (suggests + system-supplied blas). + + * test_blas_raw.c (test_L1): added test to cover for initial + run-in of odd lengths on loop unrolling in saxpy. + +Tue Mar 21 14:22:30 2000 Brian Gough + + * test_blas_raw.c (test_L1): test norms for zero vectors + + * source_nrm2_r.h, source_nrm2_r.h: skip zero elements of array, + as in original BLAS, fixes bug for vectors with leading zeros. + +Tue Mar 7 19:05:43 2000 Brian Gough + + * Makefile.am (noinst_LTLIBRARIES): with libtool blasnative and + blascblas layers need to be installed as additional libraries, not + in libgsl.a. + +Fri Oct 1 15:50:14 1999 Brian Gough + + * blas.c: make use of "trailing dimension" in matrix struct to + support LDA arguments for level 2 BLAS. + diff --git a/software/gsl-1.15/blas/Makefile.am b/software/gsl-1.15/blas/Makefile.am new file mode 100644 index 000000000..9c2d1d9c3 --- /dev/null +++ b/software/gsl-1.15/blas/Makefile.am @@ -0,0 +1,14 @@ +noinst_LTLIBRARIES = libgslblas.la + +pkginclude_HEADERS = gsl_blas.h gsl_blas_types.h + +INCLUDES = -I$(top_srcdir) + +libgslblas_la_SOURCES = blas.c + +#check_PROGRAMS = test +#TESTS = test +#test_LDADD = libgslblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +#test_SOURCES = test_blas_raw.c test_cases.c test_cases.h + + diff --git a/software/gsl-1.15/blas/Makefile.in b/software/gsl-1.15/blas/Makefile.in new file mode 100644 index 000000000..690275487 --- /dev/null +++ b/software/gsl-1.15/blas/Makefile.in @@ -0,0 +1,547 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = blas +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslblas_la_LIBADD = +am_libgslblas_la_OBJECTS = blas.lo +libgslblas_la_OBJECTS = $(am_libgslblas_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslblas_la_SOURCES) +DIST_SOURCES = $(libgslblas_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslblas.la +pkginclude_HEADERS = gsl_blas.h gsl_blas_types.h +INCLUDES = -I$(top_srcdir) +libgslblas_la_SOURCES = blas.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu blas/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu blas/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslblas.la: $(libgslblas_la_OBJECTS) $(libgslblas_la_DEPENDENCIES) + $(LINK) $(libgslblas_la_OBJECTS) $(libgslblas_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blas.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +#check_PROGRAMS = test +#TESTS = test +#test_LDADD = libgslblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +#test_SOURCES = test_blas_raw.c test_cases.c test_cases.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/blas/TODO b/software/gsl-1.15/blas/TODO new file mode 100644 index 000000000..21839769c --- /dev/null +++ b/software/gsl-1.15/blas/TODO @@ -0,0 +1,12 @@ +# -*- org -*- +#+CATEGORY: blas + + +* We need a test suite for this directory! + +* Verify that we support the full CBLAS interface and that the GSL +CBLAS library can be used standalone + +* Check that substituting the Reference Blas, ATLAS, and Intel BLAS +all work correctly + diff --git a/software/gsl-1.15/blas/blas.c b/software/gsl-1.15/blas/blas.c new file mode 100644 index 000000000..9ef62a6d7 --- /dev/null +++ b/software/gsl-1.15/blas/blas.c @@ -0,0 +1,2190 @@ +/* blas/blas.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2009 Gerard Jungman & Brian + * Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* GSL implementation of BLAS operations for vectors and dense + * matrices. Note that GSL native storage is row-major. */ + +#include +#include +#include +#include +#include +#include +#include + +/* ======================================================================== + * Level 1 + * ======================================================================== + */ + +/* CBLAS defines vector sizes in terms of int. GSL defines sizes in + terms of size_t, so we need to convert these into integers. There + is the possibility of overflow here. FIXME: Maybe this could be + caught */ + +#define INT(X) ((int)(X)) + +int +gsl_blas_sdsdot (float alpha, const gsl_vector_float * X, + const gsl_vector_float * Y, float *result) +{ + if (X->size == Y->size) + { + *result = + cblas_sdsdot (INT (X->size), alpha, X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_dsdot (const gsl_vector_float * X, const gsl_vector_float * Y, + double *result) +{ + if (X->size == Y->size) + { + *result = + cblas_dsdot (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_sdot (const gsl_vector_float * X, const gsl_vector_float * Y, + float *result) +{ + if (X->size == Y->size) + { + *result = + cblas_sdot (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_ddot (const gsl_vector * X, const gsl_vector * Y, double *result) +{ + if (X->size == Y->size) + { + *result = + cblas_ddot (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_cdotu (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, gsl_complex_float * dotu) +{ + if (X->size == Y->size) + { + cblas_cdotu_sub (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), GSL_COMPLEX_P (dotu)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_cdotc (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, gsl_complex_float * dotc) +{ + if (X->size == Y->size) + { + cblas_cdotc_sub (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), GSL_COMPLEX_P (dotc)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_zdotu (const gsl_vector_complex * X, const gsl_vector_complex * Y, + gsl_complex * dotu) +{ + if (X->size == Y->size) + { + cblas_zdotu_sub (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), GSL_COMPLEX_P (dotu)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_zdotc (const gsl_vector_complex * X, const gsl_vector_complex * Y, + gsl_complex * dotc) +{ + if (X->size == Y->size) + { + cblas_zdotc_sub (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), GSL_COMPLEX_P (dotc)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +/* Norms of vectors */ + +float +gsl_blas_snrm2 (const gsl_vector_float * X) +{ + return cblas_snrm2 (INT (X->size), X->data, INT (X->stride)); +} + +double +gsl_blas_dnrm2 (const gsl_vector * X) +{ + return cblas_dnrm2 (INT (X->size), X->data, INT (X->stride)); +} + +float +gsl_blas_scnrm2 (const gsl_vector_complex_float * X) +{ + return cblas_scnrm2 (INT (X->size), X->data, INT (X->stride)); +} + +double +gsl_blas_dznrm2 (const gsl_vector_complex * X) +{ + return cblas_dznrm2 (INT (X->size), X->data, INT (X->stride)); +} + +/* Absolute sums of vectors */ + +float +gsl_blas_sasum (const gsl_vector_float * X) +{ + return cblas_sasum (INT (X->size), X->data, INT (X->stride)); +} + +double +gsl_blas_dasum (const gsl_vector * X) +{ + return cblas_dasum (INT (X->size), X->data, INT (X->stride)); +} + +float +gsl_blas_scasum (const gsl_vector_complex_float * X) +{ + return cblas_scasum (INT (X->size), X->data, INT (X->stride)); +} + +double +gsl_blas_dzasum (const gsl_vector_complex * X) +{ + return cblas_dzasum (INT (X->size), X->data, INT (X->stride)); +} + +/* Maximum elements of vectors */ + +CBLAS_INDEX_t +gsl_blas_isamax (const gsl_vector_float * X) +{ + return cblas_isamax (INT (X->size), X->data, INT (X->stride)); +} + +CBLAS_INDEX_t +gsl_blas_idamax (const gsl_vector * X) +{ + return cblas_idamax (INT (X->size), X->data, INT (X->stride)); +} + +CBLAS_INDEX_t +gsl_blas_icamax (const gsl_vector_complex_float * X) +{ + return cblas_icamax (INT (X->size), X->data, INT (X->stride)); +} + +CBLAS_INDEX_t +gsl_blas_izamax (const gsl_vector_complex * X) +{ + return cblas_izamax (INT (X->size), X->data, INT (X->stride)); +} + + +/* Swap vectors */ + +int +gsl_blas_sswap (gsl_vector_float * X, gsl_vector_float * Y) +{ + if (X->size == Y->size) + { + cblas_sswap (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_dswap (gsl_vector * X, gsl_vector * Y) +{ + if (X->size == Y->size) + { + cblas_dswap (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + }; +} + +int +gsl_blas_cswap (gsl_vector_complex_float * X, gsl_vector_complex_float * Y) +{ + if (X->size == Y->size) + { + cblas_cswap (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_zswap (gsl_vector_complex * X, gsl_vector_complex * Y) +{ + if (X->size == Y->size) + { + cblas_zswap (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* Copy vectors */ + +int +gsl_blas_scopy (const gsl_vector_float * X, gsl_vector_float * Y) +{ + if (X->size == Y->size) + { + cblas_scopy (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_dcopy (const gsl_vector * X, gsl_vector * Y) +{ + if (X->size == Y->size) + { + cblas_dcopy (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_ccopy (const gsl_vector_complex_float * X, + gsl_vector_complex_float * Y) +{ + if (X->size == Y->size) + { + cblas_ccopy (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_zcopy (const gsl_vector_complex * X, gsl_vector_complex * Y) +{ + if (X->size == Y->size) + { + cblas_zcopy (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* Compute Y = alpha X + Y */ + +int +gsl_blas_saxpy (float alpha, const gsl_vector_float * X, gsl_vector_float * Y) +{ + if (X->size == Y->size) + { + cblas_saxpy (INT (X->size), alpha, X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_daxpy (double alpha, const gsl_vector * X, gsl_vector * Y) +{ + if (X->size == Y->size) + { + cblas_daxpy (INT (X->size), alpha, X->data, INT (X->stride), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_caxpy (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + gsl_vector_complex_float * Y) +{ + if (X->size == Y->size) + { + cblas_caxpy (INT (X->size), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride), Y->data, INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_zaxpy (const gsl_complex alpha, const gsl_vector_complex * X, + gsl_vector_complex * Y) +{ + if (X->size == Y->size) + { + cblas_zaxpy (INT (X->size), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride), Y->data, INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +/* Generate rotation */ + +int +gsl_blas_srotg (float a[], float b[], float c[], float s[]) +{ + cblas_srotg (a, b, c, s); + return GSL_SUCCESS; +} + +int +gsl_blas_drotg (double a[], double b[], double c[], double s[]) +{ + cblas_drotg (a, b, c, s); + return GSL_SUCCESS; +} + +/* Apply rotation to vectors */ + +int +gsl_blas_srot (gsl_vector_float * X, gsl_vector_float * Y, float c, float s) +{ + if (X->size == Y->size) + { + cblas_srot (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), c, s); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_drot (gsl_vector * X, gsl_vector * Y, const double c, const double s) +{ + if (X->size == Y->size) + { + cblas_drot (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), c, s); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* Generate modified rotation */ + +int +gsl_blas_srotmg (float d1[], float d2[], float b1[], float b2, float P[]) +{ + cblas_srotmg (d1, d2, b1, b2, P); + return GSL_SUCCESS; +} + +int +gsl_blas_drotmg (double d1[], double d2[], double b1[], double b2, double P[]) +{ + cblas_drotmg (d1, d2, b1, b2, P); + return GSL_SUCCESS; +} + + +/* Apply modified rotation */ + +int +gsl_blas_srotm (gsl_vector_float * X, gsl_vector_float * Y, const float P[]) +{ + if (X->size == Y->size) + { + cblas_srotm (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), P); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_drotm (gsl_vector * X, gsl_vector * Y, const double P[]) +{ + if (X->size == Y->size) + { + cblas_drotm (INT (X->size), X->data, INT (X->stride), Y->data, + INT (Y->stride), P); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* Scale vector */ + +void +gsl_blas_sscal (float alpha, gsl_vector_float * X) +{ + cblas_sscal (INT (X->size), alpha, X->data, INT (X->stride)); +} + +void +gsl_blas_dscal (double alpha, gsl_vector * X) +{ + cblas_dscal (INT (X->size), alpha, X->data, INT (X->stride)); +} + +void +gsl_blas_cscal (const gsl_complex_float alpha, gsl_vector_complex_float * X) +{ + cblas_cscal (INT (X->size), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride)); +} + +void +gsl_blas_zscal (const gsl_complex alpha, gsl_vector_complex * X) +{ + cblas_zscal (INT (X->size), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride)); +} + +void +gsl_blas_csscal (float alpha, gsl_vector_complex_float * X) +{ + cblas_csscal (INT (X->size), alpha, X->data, INT (X->stride)); +} + +void +gsl_blas_zdscal (double alpha, gsl_vector_complex * X) +{ + cblas_zdscal (INT (X->size), alpha, X->data, INT (X->stride)); +} + +/* =========================================================================== + * Level 2 + * =========================================================================== + */ + +/* GEMV */ + +int +gsl_blas_sgemv (CBLAS_TRANSPOSE_t TransA, float alpha, + const gsl_matrix_float * A, const gsl_vector_float * X, + float beta, gsl_vector_float * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if ((TransA == CblasNoTrans && N == X->size && M == Y->size) + || (TransA == CblasTrans && M == X->size && N == Y->size)) + { + cblas_sgemv (CblasRowMajor, TransA, INT (M), INT (N), alpha, A->data, + INT (A->tda), X->data, INT (X->stride), beta, Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_dgemv (CBLAS_TRANSPOSE_t TransA, double alpha, const gsl_matrix * A, + const gsl_vector * X, double beta, gsl_vector * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if ((TransA == CblasNoTrans && N == X->size && M == Y->size) + || (TransA == CblasTrans && M == X->size && N == Y->size)) + { + cblas_dgemv (CblasRowMajor, TransA, INT (M), INT (N), alpha, A->data, + INT (A->tda), X->data, INT (X->stride), beta, Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_cgemv (CBLAS_TRANSPOSE_t TransA, const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, + const gsl_complex_float beta, gsl_vector_complex_float * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if ((TransA == CblasNoTrans && N == X->size && M == Y->size) + || (TransA == CblasTrans && M == X->size && N == Y->size) + || (TransA == CblasConjTrans && M == X->size && N == Y->size)) + { + cblas_cgemv (CblasRowMajor, TransA, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data, + INT (X->stride), GSL_COMPLEX_P (&beta), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_zgemv (CBLAS_TRANSPOSE_t TransA, const gsl_complex alpha, + const gsl_matrix_complex * A, const gsl_vector_complex * X, + const gsl_complex beta, gsl_vector_complex * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if ((TransA == CblasNoTrans && N == X->size && M == Y->size) + || (TransA == CblasTrans && M == X->size && N == Y->size) + || (TransA == CblasConjTrans && M == X->size && N == Y->size)) + { + cblas_zgemv (CblasRowMajor, TransA, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data, + INT (X->stride), GSL_COMPLEX_P (&beta), Y->data, + INT (Y->stride)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + + +/* HEMV */ + +int +gsl_blas_chemv (CBLAS_UPLO_t Uplo, const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, + const gsl_complex_float beta, gsl_vector_complex_float * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size || N != Y->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_chemv (CblasRowMajor, Uplo, INT (N), GSL_COMPLEX_P (&alpha), A->data, + INT (A->tda), X->data, INT (X->stride), GSL_COMPLEX_P (&beta), + Y->data, INT (Y->stride)); + return GSL_SUCCESS; +} + +int +gsl_blas_zhemv (CBLAS_UPLO_t Uplo, const gsl_complex alpha, + const gsl_matrix_complex * A, const gsl_vector_complex * X, + const gsl_complex beta, gsl_vector_complex * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size || N != Y->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zhemv (CblasRowMajor, Uplo, INT (N), GSL_COMPLEX_P (&alpha), A->data, + INT (A->tda), X->data, INT (X->stride), GSL_COMPLEX_P (&beta), + Y->data, INT (Y->stride)); + return GSL_SUCCESS; +} + + +/* SYMV */ + +int +gsl_blas_ssymv (CBLAS_UPLO_t Uplo, float alpha, const gsl_matrix_float * A, + const gsl_vector_float * X, float beta, gsl_vector_float * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size || N != Y->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ssymv (CblasRowMajor, Uplo, INT (N), alpha, A->data, INT (A->tda), + X->data, INT (X->stride), beta, Y->data, INT (Y->stride)); + return GSL_SUCCESS; +} + +int +gsl_blas_dsymv (CBLAS_UPLO_t Uplo, double alpha, const gsl_matrix * A, + const gsl_vector * X, double beta, gsl_vector * Y) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size || N != Y->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dsymv (CblasRowMajor, Uplo, INT (N), alpha, A->data, INT (A->tda), + X->data, INT (X->stride), beta, Y->data, INT (Y->stride)); + return GSL_SUCCESS; +} + + +/* TRMV */ + +int +gsl_blas_strmv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_float * A, + gsl_vector_float * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_strmv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dtrmv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix * A, gsl_vector * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dtrmv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_ctrmv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_complex_float * A, + gsl_vector_complex_float * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ctrmv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_ztrmv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_complex * A, + gsl_vector_complex * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ztrmv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +/* TRSV */ + +int +gsl_blas_strsv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_float * A, + gsl_vector_float * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_strsv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dtrsv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix * A, gsl_vector * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dtrsv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_ctrsv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_complex_float * A, + gsl_vector_complex_float * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ctrsv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +int +gsl_blas_ztrsv (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, const gsl_matrix_complex * A, + gsl_vector_complex * X) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (N != X->size) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ztrsv (CblasRowMajor, Uplo, TransA, Diag, INT (N), A->data, + INT (A->tda), X->data, INT (X->stride)); + return GSL_SUCCESS; +} + + +/* GER */ + +int +gsl_blas_sger (float alpha, const gsl_vector_float * X, + const gsl_vector_float * Y, gsl_matrix_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_sger (CblasRowMajor, INT (M), INT (N), alpha, X->data, + INT (X->stride), Y->data, INT (Y->stride), A->data, + INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_dger (double alpha, const gsl_vector * X, const gsl_vector * Y, + gsl_matrix * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_dger (CblasRowMajor, INT (M), INT (N), alpha, X->data, + INT (X->stride), Y->data, INT (Y->stride), A->data, + INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* GERU */ + +int +gsl_blas_cgeru (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_cgeru (CblasRowMajor, INT (M), INT (N), GSL_COMPLEX_P (&alpha), + X->data, INT (X->stride), Y->data, INT (Y->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_zgeru (const gsl_complex alpha, const gsl_vector_complex * X, + const gsl_vector_complex * Y, gsl_matrix_complex * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_zgeru (CblasRowMajor, INT (M), INT (N), GSL_COMPLEX_P (&alpha), + X->data, INT (X->stride), Y->data, INT (Y->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* GERC */ + +int +gsl_blas_cgerc (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_cgerc (CblasRowMajor, INT (M), INT (N), GSL_COMPLEX_P (&alpha), + X->data, INT (X->stride), Y->data, INT (Y->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_zgerc (const gsl_complex alpha, const gsl_vector_complex * X, + const gsl_vector_complex * Y, gsl_matrix_complex * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (X->size == M && Y->size == N) + { + cblas_zgerc (CblasRowMajor, INT (M), INT (N), GSL_COMPLEX_P (&alpha), + X->data, INT (X->stride), Y->data, INT (Y->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +/* HER */ + +int +gsl_blas_cher (CBLAS_UPLO_t Uplo, float alpha, + const gsl_vector_complex_float * X, + gsl_matrix_complex_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_cher (CblasRowMajor, Uplo, INT (M), alpha, X->data, INT (X->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_zher (CBLAS_UPLO_t Uplo, double alpha, const gsl_vector_complex * X, + gsl_matrix_complex * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zher (CblasRowMajor, Uplo, INT (N), alpha, X->data, INT (X->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +/* HER2 */ + +int +gsl_blas_cher2 (CBLAS_UPLO_t Uplo, const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N || Y->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_cher2 (CblasRowMajor, Uplo, INT (N), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride), Y->data, INT (Y->stride), A->data, + INT (A->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_zher2 (CBLAS_UPLO_t Uplo, const gsl_complex alpha, + const gsl_vector_complex * X, const gsl_vector_complex * Y, + gsl_matrix_complex * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N || Y->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zher2 (CblasRowMajor, Uplo, INT (N), GSL_COMPLEX_P (&alpha), X->data, + INT (X->stride), Y->data, INT (Y->stride), A->data, + INT (A->tda)); + return GSL_SUCCESS; +} + + +/* SYR */ + +int +gsl_blas_ssyr (CBLAS_UPLO_t Uplo, float alpha, const gsl_vector_float * X, + gsl_matrix_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ssyr (CblasRowMajor, Uplo, INT (N), alpha, X->data, INT (X->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dsyr (CBLAS_UPLO_t Uplo, double alpha, const gsl_vector * X, + gsl_matrix * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dsyr (CblasRowMajor, Uplo, INT (N), alpha, X->data, INT (X->stride), + A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +/* SYR2 */ + +int +gsl_blas_ssyr2 (CBLAS_UPLO_t Uplo, float alpha, const gsl_vector_float * X, + const gsl_vector_float * Y, gsl_matrix_float * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N || Y->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ssyr2 (CblasRowMajor, Uplo, INT (N), alpha, X->data, INT (X->stride), + Y->data, INT (Y->stride), A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dsyr2 (CBLAS_UPLO_t Uplo, double alpha, const gsl_vector * X, + const gsl_vector * Y, gsl_matrix * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR ("matrix must be square", GSL_ENOTSQR); + } + else if (X->size != N || Y->size != N) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dsyr2 (CblasRowMajor, Uplo, INT (N), alpha, X->data, INT (X->stride), + Y->data, INT (Y->stride), A->data, INT (A->tda)); + return GSL_SUCCESS; +} + + +/* + * =========================================================================== + * Prototypes for level 3 BLAS + * =========================================================================== + */ + + +/* GEMM */ + +int +gsl_blas_sgemm (CBLAS_TRANSPOSE_t TransA, CBLAS_TRANSPOSE_t TransB, + float alpha, const gsl_matrix_float * A, + const gsl_matrix_float * B, float beta, gsl_matrix_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (TransA == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (TransA == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (TransB == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (TransB == CblasNoTrans) ? B->size2 : B->size1; + + if (M == MA && N == NB && NA == MB) /* [MxN] = [MAxNA][MBxNB] */ + { + cblas_sgemm (CblasRowMajor, TransA, TransB, INT (M), INT (N), INT (NA), + alpha, A->data, INT (A->tda), B->data, INT (B->tda), beta, + C->data, INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_dgemm (CBLAS_TRANSPOSE_t TransA, CBLAS_TRANSPOSE_t TransB, + double alpha, const gsl_matrix * A, const gsl_matrix * B, + double beta, gsl_matrix * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (TransA == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (TransA == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (TransB == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (TransB == CblasNoTrans) ? B->size2 : B->size1; + + if (M == MA && N == NB && NA == MB) /* [MxN] = [MAxNA][MBxNB] */ + { + cblas_dgemm (CblasRowMajor, TransA, TransB, INT (M), INT (N), INT (NA), + alpha, A->data, INT (A->tda), B->data, INT (B->tda), beta, + C->data, INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_cgemm (CBLAS_TRANSPOSE_t TransA, CBLAS_TRANSPOSE_t TransB, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (TransA == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (TransA == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (TransB == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (TransB == CblasNoTrans) ? B->size2 : B->size1; + + if (M == MA && N == NB && NA == MB) /* [MxN] = [MAxNA][MBxNB] */ + { + cblas_cgemm (CblasRowMajor, TransA, TransB, INT (M), INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_zgemm (CBLAS_TRANSPOSE_t TransA, CBLAS_TRANSPOSE_t TransB, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, const gsl_complex beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (TransA == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (TransA == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (TransB == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (TransB == CblasNoTrans) ? B->size2 : B->size1; + + if (M == MA && N == NB && NA == MB) /* [MxN] = [MAxNA][MBxNB] */ + { + cblas_zgemm (CblasRowMajor, TransA, TransB, INT (M), INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* SYMM */ + +int +gsl_blas_ssymm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, float alpha, + const gsl_matrix_float * A, const gsl_matrix_float * B, + float beta, gsl_matrix_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_ssymm (CblasRowMajor, Side, Uplo, INT (M), INT (N), alpha, + A->data, INT (A->tda), B->data, INT (B->tda), beta, + C->data, INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + +} + + +int +gsl_blas_dsymm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, double alpha, + const gsl_matrix * A, const gsl_matrix * B, double beta, + gsl_matrix * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_dsymm (CblasRowMajor, Side, Uplo, INT (M), INT (N), alpha, + A->data, INT (A->tda), B->data, INT (B->tda), beta, + C->data, INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_csymm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_csymm (CblasRowMajor, Side, Uplo, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +int +gsl_blas_zsymm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, const gsl_complex beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_zsymm (CblasRowMajor, Side, Uplo, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* HEMM */ + +int +gsl_blas_chemm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_chemm (CblasRowMajor, Side, Uplo, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + +} + + +int +gsl_blas_zhemm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, const gsl_complex beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + const size_t MB = B->size1; + const size_t NB = B->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && (M == MA && N == NB && NA == MB)) + || (Side == CblasRight && (M == MB && N == NA && NB == MA))) + { + cblas_zhemm (CblasRowMajor, Side, Uplo, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, + INT (C->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + +/* SYRK */ + +int +gsl_blas_ssyrk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, float alpha, + const gsl_matrix_float * A, float beta, gsl_matrix_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ssyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), alpha, A->data, + INT (A->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dsyrk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, double alpha, + const gsl_matrix * A, double beta, gsl_matrix * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dsyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), alpha, A->data, + INT (A->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; + +} + + +int +gsl_blas_csyrk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_complex_float beta, gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_csyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), + GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_zsyrk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_complex beta, gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zsyrk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), + GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); + return GSL_SUCCESS; +} + +/* HERK */ + +int +gsl_blas_cherk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, float alpha, + const gsl_matrix_complex_float * A, float beta, + gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_cherk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), alpha, A->data, + INT (A->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_zherk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, double alpha, + const gsl_matrix_complex * A, double beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t J = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t K = (Trans == CblasNoTrans) ? A->size2 : A->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != J) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zherk (CblasRowMajor, Uplo, Trans, INT (N), INT (K), alpha, A->data, + INT (A->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; +} + +/* SYR2K */ + +int +gsl_blas_ssyr2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, float alpha, + const gsl_matrix_float * A, const gsl_matrix_float * B, + float beta, gsl_matrix_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_ssyr2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), alpha, A->data, + INT (A->tda), B->data, INT (B->tda), beta, C->data, + INT (C->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_dsyr2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, double alpha, + const gsl_matrix * A, const gsl_matrix * B, double beta, + gsl_matrix * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_dsyr2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), alpha, A->data, + INT (A->tda), B->data, INT (B->tda), beta, C->data, + INT (C->tda)); + return GSL_SUCCESS; +} + + +int +gsl_blas_csyr2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_csyr2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); + return GSL_SUCCESS; +} + + + +int +gsl_blas_zsyr2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, const gsl_complex beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zsyr2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), GSL_COMPLEX_P (&beta), C->data, INT (C->tda)); + return GSL_SUCCESS; +} + +/* HER2K */ + +int +gsl_blas_cher2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, float beta, + gsl_matrix_complex_float * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_cher2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; + +} + + +int +gsl_blas_zher2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, double beta, + gsl_matrix_complex * C) +{ + const size_t M = C->size1; + const size_t N = C->size2; + const size_t MA = (Trans == CblasNoTrans) ? A->size1 : A->size2; + const size_t NA = (Trans == CblasNoTrans) ? A->size2 : A->size1; + const size_t MB = (Trans == CblasNoTrans) ? B->size1 : B->size2; + const size_t NB = (Trans == CblasNoTrans) ? B->size2 : B->size1; + + if (M != N) + { + GSL_ERROR ("matrix C must be square", GSL_ENOTSQR); + } + else if (N != MA || N != MB || NA != NB) + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } + + cblas_zher2k (CblasRowMajor, Uplo, Trans, INT (N), INT (NA), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda), beta, C->data, INT (C->tda)); + return GSL_SUCCESS; + +} + +/* TRMM */ + +int +gsl_blas_strmm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, float alpha, + const gsl_matrix_float * A, gsl_matrix_float * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_strmm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + alpha, A->data, INT (A->tda), B->data, INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_dtrmm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, double alpha, + const gsl_matrix * A, gsl_matrix * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_dtrmm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + alpha, A->data, INT (A->tda), B->data, INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_ctrmm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_ctrmm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_ztrmm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_complex alpha, const gsl_matrix_complex * A, + gsl_matrix_complex * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_ztrmm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +/* TRSM */ + +int +gsl_blas_strsm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, float alpha, + const gsl_matrix_float * A, gsl_matrix_float * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_strsm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + alpha, A->data, INT (A->tda), B->data, INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_dtrsm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, double alpha, + const gsl_matrix * A, gsl_matrix * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_dtrsm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + alpha, A->data, INT (A->tda), B->data, INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_ctrsm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_ctrsm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} + + +int +gsl_blas_ztrsm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_complex alpha, const gsl_matrix_complex * A, + gsl_matrix_complex * B) +{ + const size_t M = B->size1; + const size_t N = B->size2; + const size_t MA = A->size1; + const size_t NA = A->size2; + + if (MA != NA) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + + if ((Side == CblasLeft && M == MA) || (Side == CblasRight && N == MA)) + { + cblas_ztrsm (CblasRowMajor, Side, Uplo, TransA, Diag, INT (M), INT (N), + GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), B->data, + INT (B->tda)); + return GSL_SUCCESS; + } + else + { + GSL_ERROR ("invalid length", GSL_EBADLEN); + } +} diff --git a/software/gsl-1.15/blas/gsl_blas.h b/software/gsl-1.15/blas/gsl_blas.h new file mode 100644 index 000000000..7c4271496 --- /dev/null +++ b/software/gsl-1.15/blas/gsl_blas.h @@ -0,0 +1,602 @@ +/* blas/gsl_blas.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * Author: G. Jungman + */ +#ifndef __GSL_BLAS_H__ +#define __GSL_BLAS_H__ + +#include +#include + +#include + + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* ======================================================================== + * Level 1 + * ======================================================================== + */ + +int gsl_blas_sdsdot (float alpha, + const gsl_vector_float * X, + const gsl_vector_float * Y, + float * result + ); + +int gsl_blas_dsdot (const gsl_vector_float * X, + const gsl_vector_float * Y, + double * result + ); + +int gsl_blas_sdot (const gsl_vector_float * X, + const gsl_vector_float * Y, + float * result + ); + +int gsl_blas_ddot (const gsl_vector * X, + const gsl_vector * Y, + double * result + ); + + +int gsl_blas_cdotu (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_complex_float * dotu); + +int gsl_blas_cdotc (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_complex_float * dotc); + +int gsl_blas_zdotu (const gsl_vector_complex * X, + const gsl_vector_complex * Y, + gsl_complex * dotu); + +int gsl_blas_zdotc (const gsl_vector_complex * X, + const gsl_vector_complex * Y, + gsl_complex * dotc); + + +float gsl_blas_snrm2 (const gsl_vector_float * X); +float gsl_blas_sasum (const gsl_vector_float * X); +double gsl_blas_dnrm2 (const gsl_vector * X); +double gsl_blas_dasum (const gsl_vector * X); +float gsl_blas_scnrm2 (const gsl_vector_complex_float * X); +float gsl_blas_scasum (const gsl_vector_complex_float * X); +double gsl_blas_dznrm2 (const gsl_vector_complex * X); +double gsl_blas_dzasum (const gsl_vector_complex * X); + + +CBLAS_INDEX_t gsl_blas_isamax (const gsl_vector_float * X); +CBLAS_INDEX_t gsl_blas_idamax (const gsl_vector * X); +CBLAS_INDEX_t gsl_blas_icamax (const gsl_vector_complex_float * X); +CBLAS_INDEX_t gsl_blas_izamax (const gsl_vector_complex * X); + + +int gsl_blas_sswap (gsl_vector_float * X, + gsl_vector_float * Y); + +int gsl_blas_scopy (const gsl_vector_float * X, + gsl_vector_float * Y); + +int gsl_blas_saxpy (float alpha, + const gsl_vector_float * X, + gsl_vector_float * Y); + +int gsl_blas_dswap (gsl_vector * X, + gsl_vector * Y); + +int gsl_blas_dcopy (const gsl_vector * X, + gsl_vector * Y); + +int gsl_blas_daxpy (double alpha, + const gsl_vector * X, + gsl_vector * Y); + +int gsl_blas_cswap (gsl_vector_complex_float * X, + gsl_vector_complex_float * Y); + +int gsl_blas_ccopy (const gsl_vector_complex_float * X, + gsl_vector_complex_float * Y); + +int gsl_blas_caxpy (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + gsl_vector_complex_float * Y); + +int gsl_blas_zswap (gsl_vector_complex * X, + gsl_vector_complex * Y); + +int gsl_blas_zcopy (const gsl_vector_complex * X, + gsl_vector_complex * Y); + +int gsl_blas_zaxpy (const gsl_complex alpha, + const gsl_vector_complex * X, + gsl_vector_complex * Y); + + +int gsl_blas_srotg (float a[], float b[], float c[], float s[]); + +int gsl_blas_srotmg (float d1[], float d2[], float b1[], float b2, float P[]); + +int gsl_blas_srot (gsl_vector_float * X, + gsl_vector_float * Y, + float c, float s); + +int gsl_blas_srotm (gsl_vector_float * X, + gsl_vector_float * Y, + const float P[]); + +int gsl_blas_drotg (double a[], double b[], double c[], double s[]); + +int gsl_blas_drotmg (double d1[], double d2[], double b1[], + double b2, double P[]); + +int gsl_blas_drot (gsl_vector * X, + gsl_vector * Y, + const double c, const double s); + +int gsl_blas_drotm (gsl_vector * X, + gsl_vector * Y, + const double P[]); + + +void gsl_blas_sscal (float alpha, gsl_vector_float * X); +void gsl_blas_dscal (double alpha, gsl_vector * X); +void gsl_blas_cscal (const gsl_complex_float alpha, gsl_vector_complex_float * X); +void gsl_blas_zscal (const gsl_complex alpha, gsl_vector_complex * X); +void gsl_blas_csscal (float alpha, gsl_vector_complex_float * X); +void gsl_blas_zdscal (double alpha, gsl_vector_complex * X); + + +/* =========================================================================== + * Level 2 + * =========================================================================== + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ +int gsl_blas_sgemv (CBLAS_TRANSPOSE_t TransA, + float alpha, + const gsl_matrix_float * A, + const gsl_vector_float * X, + float beta, + gsl_vector_float * Y); + +int gsl_blas_strmv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_float * A, + gsl_vector_float * X); + +int gsl_blas_strsv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_float * A, + gsl_vector_float * X); + +int gsl_blas_dgemv (CBLAS_TRANSPOSE_t TransA, + double alpha, + const gsl_matrix * A, + const gsl_vector * X, + double beta, + gsl_vector * Y); + +int gsl_blas_dtrmv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix * A, + gsl_vector * X); + +int gsl_blas_dtrsv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix * A, + gsl_vector * X); + +int gsl_blas_cgemv (CBLAS_TRANSPOSE_t TransA, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, + const gsl_complex_float beta, + gsl_vector_complex_float * Y); + +int gsl_blas_ctrmv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_complex_float * A, + gsl_vector_complex_float * X); + +int gsl_blas_ctrsv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_complex_float * A, + gsl_vector_complex_float * X); + +int gsl_blas_zgemv (CBLAS_TRANSPOSE_t TransA, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_vector_complex * X, + const gsl_complex beta, + gsl_vector_complex * Y); + +int gsl_blas_ztrmv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_complex * A, + gsl_vector_complex * X); + +int gsl_blas_ztrsv (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t TransA, CBLAS_DIAG_t Diag, + const gsl_matrix_complex * A, + gsl_vector_complex *X); + +/* + * Routines with S and D prefixes only + */ +int gsl_blas_ssymv (CBLAS_UPLO_t Uplo, + float alpha, + const gsl_matrix_float * A, + const gsl_vector_float * X, + float beta, + gsl_vector_float * Y); + +int gsl_blas_sger (float alpha, + const gsl_vector_float * X, + const gsl_vector_float * Y, + gsl_matrix_float * A); + +int gsl_blas_ssyr (CBLAS_UPLO_t Uplo, + float alpha, + const gsl_vector_float * X, + gsl_matrix_float * A); + +int gsl_blas_ssyr2 (CBLAS_UPLO_t Uplo, + float alpha, + const gsl_vector_float * X, + const gsl_vector_float * Y, + gsl_matrix_float * A); + +int gsl_blas_dsymv (CBLAS_UPLO_t Uplo, + double alpha, + const gsl_matrix * A, + const gsl_vector * X, + double beta, + gsl_vector * Y); +int gsl_blas_dger (double alpha, + const gsl_vector * X, + const gsl_vector * Y, + gsl_matrix * A); + +int gsl_blas_dsyr (CBLAS_UPLO_t Uplo, + double alpha, + const gsl_vector * X, + gsl_matrix * A); + +int gsl_blas_dsyr2 (CBLAS_UPLO_t Uplo, + double alpha, + const gsl_vector * X, + const gsl_vector * Y, + gsl_matrix * A); + +/* + * Routines with C and Z prefixes only + */ + +int gsl_blas_chemv (CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, + const gsl_complex_float beta, + gsl_vector_complex_float * Y); + +int gsl_blas_cgeru (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A); + +int gsl_blas_cgerc (const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A); + +int gsl_blas_cher (CBLAS_UPLO_t Uplo, + float alpha, + const gsl_vector_complex_float * X, + gsl_matrix_complex_float * A); + +int gsl_blas_cher2 (CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, + gsl_matrix_complex_float * A); + +int gsl_blas_zhemv (CBLAS_UPLO_t Uplo, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_vector_complex * X, + const gsl_complex beta, + gsl_vector_complex * Y); + +int gsl_blas_zgeru (const gsl_complex alpha, + const gsl_vector_complex * X, + const gsl_vector_complex * Y, + gsl_matrix_complex * A); + +int gsl_blas_zgerc (const gsl_complex alpha, + const gsl_vector_complex * X, + const gsl_vector_complex * Y, + gsl_matrix_complex * A); + +int gsl_blas_zher (CBLAS_UPLO_t Uplo, + double alpha, + const gsl_vector_complex * X, + gsl_matrix_complex * A); + +int gsl_blas_zher2 (CBLAS_UPLO_t Uplo, + const gsl_complex alpha, + const gsl_vector_complex * X, + const gsl_vector_complex * Y, + gsl_matrix_complex * A); + +/* + * =========================================================================== + * Prototypes for level 3 BLAS + * =========================================================================== + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ +int gsl_blas_sgemm (CBLAS_TRANSPOSE_t TransA, + CBLAS_TRANSPOSE_t TransB, + float alpha, + const gsl_matrix_float * A, + const gsl_matrix_float * B, + float beta, + gsl_matrix_float * C); + +int gsl_blas_ssymm (CBLAS_SIDE_t Side, CBLAS_UPLO_t Uplo, + float alpha, + const gsl_matrix_float * A, + const gsl_matrix_float * B, + float beta, + gsl_matrix_float * C); + +int gsl_blas_ssyrk (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + float alpha, + const gsl_matrix_float * A, + float beta, + gsl_matrix_float * C); + +int gsl_blas_ssyr2k (CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t Trans, + float alpha, + const gsl_matrix_float * A, + const gsl_matrix_float * B, + float beta, + gsl_matrix_float * C); + +int gsl_blas_strmm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + float alpha, + const gsl_matrix_float * A, + gsl_matrix_float * B); + +int gsl_blas_strsm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + float alpha, + const gsl_matrix_float * A, + gsl_matrix_float * B); + +int gsl_blas_dgemm (CBLAS_TRANSPOSE_t TransA, + CBLAS_TRANSPOSE_t TransB, + double alpha, + const gsl_matrix * A, + const gsl_matrix * B, + double beta, + gsl_matrix * C); + +int gsl_blas_dsymm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, + double alpha, + const gsl_matrix * A, + const gsl_matrix * B, + double beta, + gsl_matrix * C); + +int gsl_blas_dsyrk (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + double alpha, + const gsl_matrix * A, + double beta, + gsl_matrix * C); + +int gsl_blas_dsyr2k (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + double alpha, + const gsl_matrix * A, + const gsl_matrix * B, + double beta, + gsl_matrix * C); + +int gsl_blas_dtrmm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + double alpha, + const gsl_matrix * A, + gsl_matrix * B); + +int gsl_blas_dtrsm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + double alpha, + const gsl_matrix * A, + gsl_matrix * B); + +int gsl_blas_cgemm (CBLAS_TRANSPOSE_t TransA, + CBLAS_TRANSPOSE_t TransB, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_csymm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_csyrk (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_complex_float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_csyr2k (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_ctrmm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B); + +int gsl_blas_ctrsm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B); + +int gsl_blas_zgemm (CBLAS_TRANSPOSE_t TransA, + CBLAS_TRANSPOSE_t TransB, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + const gsl_complex beta, + gsl_matrix_complex * C); + +int gsl_blas_zsymm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + const gsl_complex beta, + gsl_matrix_complex * C); + +int gsl_blas_zsyrk (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_complex beta, + gsl_matrix_complex * C); + +int gsl_blas_zsyr2k (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + const gsl_complex beta, + gsl_matrix_complex *C); + +int gsl_blas_ztrmm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + const gsl_complex alpha, + const gsl_matrix_complex * A, + gsl_matrix_complex * B); + +int gsl_blas_ztrsm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, CBLAS_TRANSPOSE_t TransA, + CBLAS_DIAG_t Diag, + const gsl_complex alpha, + const gsl_matrix_complex * A, + gsl_matrix_complex * B); + +/* + * Routines with prefixes C and Z only + */ +int gsl_blas_chemm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + const gsl_complex_float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_cherk (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + float alpha, + const gsl_matrix_complex_float * A, + float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_cher2k (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex_float alpha, + const gsl_matrix_complex_float * A, + const gsl_matrix_complex_float * B, + float beta, + gsl_matrix_complex_float * C); + +int gsl_blas_zhemm (CBLAS_SIDE_t Side, + CBLAS_UPLO_t Uplo, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + const gsl_complex beta, + gsl_matrix_complex * C); + +int gsl_blas_zherk (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + double alpha, + const gsl_matrix_complex * A, + double beta, + gsl_matrix_complex * C); + +int gsl_blas_zher2k (CBLAS_UPLO_t Uplo, + CBLAS_TRANSPOSE_t Trans, + const gsl_complex alpha, + const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + double beta, + gsl_matrix_complex * C); + + +__END_DECLS + +#endif /* __GSL_BLAS_H__ */ diff --git a/software/gsl-1.15/blas/gsl_blas_types.h b/software/gsl-1.15/blas/gsl_blas_types.h new file mode 100644 index 000000000..923edb310 --- /dev/null +++ b/software/gsl-1.15/blas/gsl_blas_types.h @@ -0,0 +1,54 @@ +/* blas/gsl_blas_types.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * Author: G. Jungman + */ +/* Based on draft BLAST C interface specification [Jul 7 1998] + */ +#ifndef __GSL_BLAS_TYPES_H__ +#define __GSL_BLAS_TYPES_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef CBLAS_INDEX CBLAS_INDEX_t; +typedef enum CBLAS_ORDER CBLAS_ORDER_t; +typedef enum CBLAS_TRANSPOSE CBLAS_TRANSPOSE_t; +typedef enum CBLAS_UPLO CBLAS_UPLO_t; +typedef enum CBLAS_DIAG CBLAS_DIAG_t; +typedef enum CBLAS_SIDE CBLAS_SIDE_t; + +/* typedef gsl_complex COMPLEX; */ + +__END_DECLS + + +#endif /* __GSL_BLAS_TYPES_H__ */ diff --git a/software/gsl-1.15/block/.deps/block.Plo b/software/gsl-1.15/block/.deps/block.Plo new file mode 100644 index 000000000..e18faa2a6 --- /dev/null +++ b/software/gsl-1.15/block/.deps/block.Plo @@ -0,0 +1,133 @@ +block.lo: block.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h ../templates_on.h \ + block_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +block_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/block/.deps/file.Plo b/software/gsl-1.15/block/.deps/file.Plo new file mode 100644 index 000000000..b4903fbac --- /dev/null +++ b/software/gsl-1.15/block/.deps/file.Plo @@ -0,0 +1,135 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h ../templates_on.h \ + fwrite_source.c fprintf_source.c ../templates_off.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +fwrite_source.c: + +fprintf_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/block/.deps/init.Plo b/software/gsl-1.15/block/.deps/init.Plo new file mode 100644 index 000000000..e5777707a --- /dev/null +++ b/software/gsl-1.15/block/.deps/init.Plo @@ -0,0 +1,134 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h ../templates_on.h \ + init_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +init_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/block/.deps/test.Po b/software/gsl-1.15/block/.deps/test.Po new file mode 100644 index 000000000..38d6d7a4b --- /dev/null +++ b/software/gsl-1.15/block/.deps/test.Po @@ -0,0 +1,151 @@ +test.o: test.c ../config.h /usr/include/fcntl.h /usr/include/sys/fcntl.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_test.h ../templates_on.h \ + test_complex_source.c test_complex_io.c ../templates_off.h \ + test_source.c test_io.c + +../config.h: + +/usr/include/fcntl.h: + +/usr/include/sys/fcntl.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_test.h: + +../templates_on.h: + +test_complex_source.c: + +test_complex_io.c: + +../templates_off.h: + +test_source.c: + +test_io.c: diff --git a/software/gsl-1.15/block/ChangeLog b/software/gsl-1.15/block/ChangeLog new file mode 100644 index 000000000..dc79a48d6 --- /dev/null +++ b/software/gsl-1.15/block/ChangeLog @@ -0,0 +1,42 @@ +2009-07-09 Brian Gough + + * init_source.c (FUNCTION): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): remove top_builddir + +2005-05-21 Brian Gough + + * Makefile.am (pkginclude_HEADERS): removed unused file + gsl_block_complex.h + +2004-06-03 Brian Gough + + * gsl_check_range.h: provide backwards-compatible support for + GSL_RANGE_CHECK_OFF and GSL_RANGE_CHECK + +Sat Jul 15 21:45:10 2000 Brian Gough + + * init_source.c (FUNCTION): changed GSL_EDOM to GSL_EINVAL for + invalid size arguments + +Sun May 28 12:22:26 2000 Brian Gough + + * test_complex_source.c (FUNCTION): use binary mode "b" when + reading and writing binary files + + * test_source.c (FUNCTION): use binary mode "b" when reading and + writing binary files + +Thu Mar 2 20:51:23 2000 Brian Gough + + * fprintf_source.c: all input is now done through an ATOMIC_IO + type, since char has to be written/read using a different type + (int). + +Fri Oct 1 15:48:31 1999 Brian Gough + + * this directory handles the memory management for vectors and + matrices + diff --git a/software/gsl-1.15/block/Makefile.am b/software/gsl-1.15/block/Makefile.am new file mode 100644 index 000000000..bf34df6bd --- /dev/null +++ b/software/gsl-1.15/block/Makefile.am @@ -0,0 +1,19 @@ +noinst_LTLIBRARIES = libgslblock.la + +check_PROGRAMS = test + +pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + +CLEANFILES = test.txt test.dat + +noinst_HEADERS = block_source.c init_source.c fprintf_source.c fwrite_source.c test_complex_source.c test_source.c test_io.c test_complex_io.c + +libgslblock_la_SOURCES = init.c file.c block.c diff --git a/software/gsl-1.15/block/Makefile.in b/software/gsl-1.15/block/Makefile.in new file mode 100644 index 000000000..00457a014 --- /dev/null +++ b/software/gsl-1.15/block/Makefile.in @@ -0,0 +1,666 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = block +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslblock_la_LIBADD = +am_libgslblock_la_OBJECTS = init.lo file.lo block.lo +libgslblock_la_OBJECTS = $(am_libgslblock_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslblock_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslblock_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslblock.la +pkginclude_HEADERS = gsl_block.h gsl_block_char.h gsl_block_complex_double.h gsl_block_complex_float.h gsl_block_complex_long_double.h gsl_block_double.h gsl_block_float.h gsl_block_int.h gsl_block_long.h gsl_block_long_double.h gsl_block_short.h gsl_block_uchar.h gsl_block_uint.h gsl_block_ulong.h gsl_block_ushort.h gsl_check_range.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +CLEANFILES = test.txt test.dat +noinst_HEADERS = block_source.c init_source.c fprintf_source.c fwrite_source.c test_complex_source.c test_source.c test_io.c test_complex_io.c +libgslblock_la_SOURCES = init.c file.c block.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu block/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu block/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslblock.la: $(libgslblock_la_OBJECTS) $(libgslblock_la_DEPENDENCIES) + $(LINK) $(libgslblock_la_OBJECTS) $(libgslblock_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/block.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/block/block.c b/software/gsl-1.15/block/block.c new file mode 100644 index 000000000..a60e0e0af --- /dev/null +++ b/software/gsl-1.15/block/block.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "block_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/block/block_source.c b/software/gsl-1.15/block/block_source.c new file mode 100644 index 000000000..d654bb15f --- /dev/null +++ b/software/gsl-1.15/block/block_source.c @@ -0,0 +1,30 @@ +/* block/block_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +size_t +FUNCTION(gsl_block,size) (const TYPE(gsl_block) * b) +{ + return b->size ; +} + +ATOMIC * +FUNCTION(gsl_block,data) (const TYPE(gsl_block) * b) +{ + return b->data ; +} diff --git a/software/gsl-1.15/block/file.c b/software/gsl-1.15/block/file.c new file mode 100644 index 000000000..f86b5372d --- /dev/null +++ b/software/gsl-1.15/block/file.c @@ -0,0 +1,102 @@ +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "fwrite_source.c" +#include "fprintf_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/block/fprintf_source.c b/software/gsl-1.15/block/fprintf_source.c new file mode 100644 index 000000000..7e2dc7051 --- /dev/null +++ b/software/gsl-1.15/block/fprintf_source.c @@ -0,0 +1,171 @@ +/* block/fprintf_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE) + +int +FUNCTION (gsl_block, fprintf) (FILE * stream, const TYPE(gsl_block) * b, const char *format) +{ + size_t n = b->size ; + + ATOMIC * data = b->data ; + + size_t i; + + for (i = 0; i < n; i++) + { + int k; + int status; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (k > 0) + { + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + status = fprintf (stream, + format, + data[MULTIPLICITY * i + k]); + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + } + + status = putc ('\n', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + + return 0; +} + +int +FUNCTION (gsl_block, fscanf) (FILE * stream, TYPE(gsl_block) * b) +{ + size_t n = b->size ; + + ATOMIC * data = b->data ; + + size_t i; + + for (i = 0; i < n; i++) + { + int k; + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC_IO tmp ; + + int status = fscanf (stream, IN_FORMAT, &tmp) ; + + data [MULTIPLICITY * i + k] = tmp; + + + if (status != 1) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_block, raw_fprintf) (FILE * stream, + const ATOMIC * data, + const size_t n, + const size_t stride, + const char *format) +{ + size_t i; + + for (i = 0; i < n; i++) + { + int k; + int status; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (k > 0) + { + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + status = fprintf (stream, + format, + data[MULTIPLICITY * i * stride + k]); + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + } + + status = putc ('\n', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + + return 0; +} + +int +FUNCTION (gsl_block, raw_fscanf) (FILE * stream, + ATOMIC * data, + const size_t n, + const size_t stride) +{ + size_t i; + + for (i = 0; i < n; i++) + { + int k; + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC_IO tmp; + + int status = fscanf (stream, IN_FORMAT, &tmp) ; + + data [MULTIPLICITY * i * stride + k] = tmp; + + if (status != 1) + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +#endif diff --git a/software/gsl-1.15/block/fwrite_source.c b/software/gsl-1.15/block/fwrite_source.c new file mode 100644 index 000000000..2b6e767cd --- /dev/null +++ b/software/gsl-1.15/block/fwrite_source.c @@ -0,0 +1,116 @@ +/* block/fwrite_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_block, fread) (FILE * stream, TYPE(gsl_block) * b) +{ + size_t n = b->size ; + + ATOMIC * data = b->data ; + + size_t items = fread (data, MULTIPLICITY * sizeof (ATOMIC), n, stream); + + if (items != n) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + +return 0; +} + +int +FUNCTION (gsl_block, fwrite) (FILE * stream, const TYPE(gsl_block) * b) +{ + size_t n = b->size ; + + ATOMIC * data = b->data ; + + size_t items = fwrite (data, MULTIPLICITY * sizeof (ATOMIC), n, stream); + + if (items != n) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + + return 0; +} + +int +FUNCTION (gsl_block, raw_fread) (FILE * stream, ATOMIC * data, + const size_t n, const size_t stride) +{ + if (stride == 1) + { + size_t items = fread (data, MULTIPLICITY * sizeof (ATOMIC), n, stream); + + if (items != n) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + } + else + { + size_t i; + + for (i = 0; i < n; i++) + { + size_t item = fread (data + MULTIPLICITY * i * stride, + MULTIPLICITY * sizeof (ATOMIC), 1, stream); + if (item != 1) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_block, raw_fwrite) (FILE * stream, const ATOMIC * data, + const size_t n, const size_t stride) +{ + + if (stride == 1) + { + size_t items = fwrite (data, MULTIPLICITY * sizeof (ATOMIC), n, stream); + + if (items != n) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + } + else + { + size_t i; + + for (i = 0; i < n; i++) + { + size_t item = fwrite (data + MULTIPLICITY * i * stride, + MULTIPLICITY * sizeof (ATOMIC), + 1, stream); + if (item != 1) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/block/gsl_block.h b/software/gsl-1.15/block/gsl_block.h new file mode 100644 index 000000000..f1f9ef87e --- /dev/null +++ b/software/gsl-1.15/block/gsl_block.h @@ -0,0 +1,24 @@ +#ifndef __GSL_BLOCK_H__ +#define __GSL_BLOCK_H__ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_BLOCK_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_char.h b/software/gsl-1.15/block/gsl_block_char.h new file mode 100644 index 000000000..70bf969fe --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_char.h @@ -0,0 +1,65 @@ +/* block/gsl_block_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_CHAR_H__ +#define __GSL_BLOCK_CHAR_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_char_struct +{ + size_t size; + char *data; +}; + +typedef struct gsl_block_char_struct gsl_block_char; + +gsl_block_char *gsl_block_char_alloc (const size_t n); +gsl_block_char *gsl_block_char_calloc (const size_t n); +void gsl_block_char_free (gsl_block_char * b); + +int gsl_block_char_fread (FILE * stream, gsl_block_char * b); +int gsl_block_char_fwrite (FILE * stream, const gsl_block_char * b); +int gsl_block_char_fscanf (FILE * stream, gsl_block_char * b); +int gsl_block_char_fprintf (FILE * stream, const gsl_block_char * b, const char *format); + +int gsl_block_char_raw_fread (FILE * stream, char * b, const size_t n, const size_t stride); +int gsl_block_char_raw_fwrite (FILE * stream, const char * b, const size_t n, const size_t stride); +int gsl_block_char_raw_fscanf (FILE * stream, char * b, const size_t n, const size_t stride); +int gsl_block_char_raw_fprintf (FILE * stream, const char * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_char_size (const gsl_block_char * b); +char * gsl_block_char_data (const gsl_block_char * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_CHAR_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_complex_double.h b/software/gsl-1.15/block/gsl_block_complex_double.h new file mode 100644 index 000000000..bcf66c08a --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_complex_double.h @@ -0,0 +1,65 @@ +/* block/gsl_block_complex_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_COMPLEX_DOUBLE_H__ +#define __GSL_BLOCK_COMPLEX_DOUBLE_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_complex_struct +{ + size_t size; + double *data; +}; + +typedef struct gsl_block_complex_struct gsl_block_complex; + +gsl_block_complex *gsl_block_complex_alloc (const size_t n); +gsl_block_complex *gsl_block_complex_calloc (const size_t n); +void gsl_block_complex_free (gsl_block_complex * b); + +int gsl_block_complex_fread (FILE * stream, gsl_block_complex * b); +int gsl_block_complex_fwrite (FILE * stream, const gsl_block_complex * b); +int gsl_block_complex_fscanf (FILE * stream, gsl_block_complex * b); +int gsl_block_complex_fprintf (FILE * stream, const gsl_block_complex * b, const char *format); + +int gsl_block_complex_raw_fread (FILE * stream, double * b, const size_t n, const size_t stride); +int gsl_block_complex_raw_fwrite (FILE * stream, const double * b, const size_t n, const size_t stride); +int gsl_block_complex_raw_fscanf (FILE * stream, double * b, const size_t n, const size_t stride); +int gsl_block_complex_raw_fprintf (FILE * stream, const double * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_complex_size (const gsl_block_complex * b); +double * gsl_block_complex_data (const gsl_block_complex * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_COMPLEX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_complex_float.h b/software/gsl-1.15/block/gsl_block_complex_float.h new file mode 100644 index 000000000..03595dc9f --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_complex_float.h @@ -0,0 +1,65 @@ +/* block/gsl_block_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_COMPLEX_FLOAT_H__ +#define __GSL_BLOCK_COMPLEX_FLOAT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_complex_float_struct +{ + size_t size; + float *data; +}; + +typedef struct gsl_block_complex_float_struct gsl_block_complex_float; + +gsl_block_complex_float *gsl_block_complex_float_alloc (const size_t n); +gsl_block_complex_float *gsl_block_complex_float_calloc (const size_t n); +void gsl_block_complex_float_free (gsl_block_complex_float * b); + +int gsl_block_complex_float_fread (FILE * stream, gsl_block_complex_float * b); +int gsl_block_complex_float_fwrite (FILE * stream, const gsl_block_complex_float * b); +int gsl_block_complex_float_fscanf (FILE * stream, gsl_block_complex_float * b); +int gsl_block_complex_float_fprintf (FILE * stream, const gsl_block_complex_float * b, const char *format); + +int gsl_block_complex_float_raw_fread (FILE * stream, float * b, const size_t n, const size_t stride); +int gsl_block_complex_float_raw_fwrite (FILE * stream, const float * b, const size_t n, const size_t stride); +int gsl_block_complex_float_raw_fscanf (FILE * stream, float * b, const size_t n, const size_t stride); +int gsl_block_complex_float_raw_fprintf (FILE * stream, const float * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_complex_float_size (const gsl_block_complex_float * b); +float * gsl_block_complex_float_data (const gsl_block_complex_float * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_complex_long_double.h b/software/gsl-1.15/block/gsl_block_complex_long_double.h new file mode 100644 index 000000000..eb0c60515 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_complex_long_double.h @@ -0,0 +1,65 @@ +/* block/gsl_block_complex_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_COMPLEX_LONG_DOUBLE_H__ +#define __GSL_BLOCK_COMPLEX_LONG_DOUBLE_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_complex_long_double_struct +{ + size_t size; + long double *data; +}; + +typedef struct gsl_block_complex_long_double_struct gsl_block_complex_long_double; + +gsl_block_complex_long_double *gsl_block_complex_long_double_alloc (const size_t n); +gsl_block_complex_long_double *gsl_block_complex_long_double_calloc (const size_t n); +void gsl_block_complex_long_double_free (gsl_block_complex_long_double * b); + +int gsl_block_complex_long_double_fread (FILE * stream, gsl_block_complex_long_double * b); +int gsl_block_complex_long_double_fwrite (FILE * stream, const gsl_block_complex_long_double * b); +int gsl_block_complex_long_double_fscanf (FILE * stream, gsl_block_complex_long_double * b); +int gsl_block_complex_long_double_fprintf (FILE * stream, const gsl_block_complex_long_double * b, const char *format); + +int gsl_block_complex_long_double_raw_fread (FILE * stream, long double * b, const size_t n, const size_t stride); +int gsl_block_complex_long_double_raw_fwrite (FILE * stream, const long double * b, const size_t n, const size_t stride); +int gsl_block_complex_long_double_raw_fscanf (FILE * stream, long double * b, const size_t n, const size_t stride); +int gsl_block_complex_long_double_raw_fprintf (FILE * stream, const long double * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_complex_long_double_size (const gsl_block_complex_long_double * b); +long double * gsl_block_complex_long_double_data (const gsl_block_complex_long_double * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_COMPLEX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_double.h b/software/gsl-1.15/block/gsl_block_double.h new file mode 100644 index 000000000..3a95f4d56 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_double.h @@ -0,0 +1,65 @@ +/* block/gsl_block_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_DOUBLE_H__ +#define __GSL_BLOCK_DOUBLE_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_struct +{ + size_t size; + double *data; +}; + +typedef struct gsl_block_struct gsl_block; + +gsl_block *gsl_block_alloc (const size_t n); +gsl_block *gsl_block_calloc (const size_t n); +void gsl_block_free (gsl_block * b); + +int gsl_block_fread (FILE * stream, gsl_block * b); +int gsl_block_fwrite (FILE * stream, const gsl_block * b); +int gsl_block_fscanf (FILE * stream, gsl_block * b); +int gsl_block_fprintf (FILE * stream, const gsl_block * b, const char *format); + +int gsl_block_raw_fread (FILE * stream, double * b, const size_t n, const size_t stride); +int gsl_block_raw_fwrite (FILE * stream, const double * b, const size_t n, const size_t stride); +int gsl_block_raw_fscanf (FILE * stream, double * b, const size_t n, const size_t stride); +int gsl_block_raw_fprintf (FILE * stream, const double * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_size (const gsl_block * b); +double * gsl_block_data (const gsl_block * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_DOUBLE_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_float.h b/software/gsl-1.15/block/gsl_block_float.h new file mode 100644 index 000000000..f1c3fb35f --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_float.h @@ -0,0 +1,65 @@ +/* block/gsl_block_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_FLOAT_H__ +#define __GSL_BLOCK_FLOAT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_float_struct +{ + size_t size; + float *data; +}; + +typedef struct gsl_block_float_struct gsl_block_float; + +gsl_block_float *gsl_block_float_alloc (const size_t n); +gsl_block_float *gsl_block_float_calloc (const size_t n); +void gsl_block_float_free (gsl_block_float * b); + +int gsl_block_float_fread (FILE * stream, gsl_block_float * b); +int gsl_block_float_fwrite (FILE * stream, const gsl_block_float * b); +int gsl_block_float_fscanf (FILE * stream, gsl_block_float * b); +int gsl_block_float_fprintf (FILE * stream, const gsl_block_float * b, const char *format); + +int gsl_block_float_raw_fread (FILE * stream, float * b, const size_t n, const size_t stride); +int gsl_block_float_raw_fwrite (FILE * stream, const float * b, const size_t n, const size_t stride); +int gsl_block_float_raw_fscanf (FILE * stream, float * b, const size_t n, const size_t stride); +int gsl_block_float_raw_fprintf (FILE * stream, const float * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_float_size (const gsl_block_float * b); +float * gsl_block_float_data (const gsl_block_float * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_FLOAT_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_int.h b/software/gsl-1.15/block/gsl_block_int.h new file mode 100644 index 000000000..2213f4701 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_int.h @@ -0,0 +1,65 @@ +/* block/gsl_block_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_INT_H__ +#define __GSL_BLOCK_INT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_int_struct +{ + size_t size; + int *data; +}; + +typedef struct gsl_block_int_struct gsl_block_int; + +gsl_block_int *gsl_block_int_alloc (const size_t n); +gsl_block_int *gsl_block_int_calloc (const size_t n); +void gsl_block_int_free (gsl_block_int * b); + +int gsl_block_int_fread (FILE * stream, gsl_block_int * b); +int gsl_block_int_fwrite (FILE * stream, const gsl_block_int * b); +int gsl_block_int_fscanf (FILE * stream, gsl_block_int * b); +int gsl_block_int_fprintf (FILE * stream, const gsl_block_int * b, const char *format); + +int gsl_block_int_raw_fread (FILE * stream, int * b, const size_t n, const size_t stride); +int gsl_block_int_raw_fwrite (FILE * stream, const int * b, const size_t n, const size_t stride); +int gsl_block_int_raw_fscanf (FILE * stream, int * b, const size_t n, const size_t stride); +int gsl_block_int_raw_fprintf (FILE * stream, const int * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_int_size (const gsl_block_int * b); +int * gsl_block_int_data (const gsl_block_int * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_INT_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_long.h b/software/gsl-1.15/block/gsl_block_long.h new file mode 100644 index 000000000..0c30aa5e4 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_long.h @@ -0,0 +1,65 @@ +/* block/gsl_block_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_LONG_H__ +#define __GSL_BLOCK_LONG_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_long_struct +{ + size_t size; + long *data; +}; + +typedef struct gsl_block_long_struct gsl_block_long; + +gsl_block_long *gsl_block_long_alloc (const size_t n); +gsl_block_long *gsl_block_long_calloc (const size_t n); +void gsl_block_long_free (gsl_block_long * b); + +int gsl_block_long_fread (FILE * stream, gsl_block_long * b); +int gsl_block_long_fwrite (FILE * stream, const gsl_block_long * b); +int gsl_block_long_fscanf (FILE * stream, gsl_block_long * b); +int gsl_block_long_fprintf (FILE * stream, const gsl_block_long * b, const char *format); + +int gsl_block_long_raw_fread (FILE * stream, long * b, const size_t n, const size_t stride); +int gsl_block_long_raw_fwrite (FILE * stream, const long * b, const size_t n, const size_t stride); +int gsl_block_long_raw_fscanf (FILE * stream, long * b, const size_t n, const size_t stride); +int gsl_block_long_raw_fprintf (FILE * stream, const long * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_long_size (const gsl_block_long * b); +long * gsl_block_long_data (const gsl_block_long * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_LONG_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_long_double.h b/software/gsl-1.15/block/gsl_block_long_double.h new file mode 100644 index 000000000..639cd8150 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_long_double.h @@ -0,0 +1,65 @@ +/* block/gsl_block_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_LONG_DOUBLE_H__ +#define __GSL_BLOCK_LONG_DOUBLE_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_long_double_struct +{ + size_t size; + long double *data; +}; + +typedef struct gsl_block_long_double_struct gsl_block_long_double; + +gsl_block_long_double *gsl_block_long_double_alloc (const size_t n); +gsl_block_long_double *gsl_block_long_double_calloc (const size_t n); +void gsl_block_long_double_free (gsl_block_long_double * b); + +int gsl_block_long_double_fread (FILE * stream, gsl_block_long_double * b); +int gsl_block_long_double_fwrite (FILE * stream, const gsl_block_long_double * b); +int gsl_block_long_double_fscanf (FILE * stream, gsl_block_long_double * b); +int gsl_block_long_double_fprintf (FILE * stream, const gsl_block_long_double * b, const char *format); + +int gsl_block_long_double_raw_fread (FILE * stream, long double * b, const size_t n, const size_t stride); +int gsl_block_long_double_raw_fwrite (FILE * stream, const long double * b, const size_t n, const size_t stride); +int gsl_block_long_double_raw_fscanf (FILE * stream, long double * b, const size_t n, const size_t stride); +int gsl_block_long_double_raw_fprintf (FILE * stream, const long double * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_long_double_size (const gsl_block_long_double * b); +long double * gsl_block_long_double_data (const gsl_block_long_double * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_short.h b/software/gsl-1.15/block/gsl_block_short.h new file mode 100644 index 000000000..97447755c --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_short.h @@ -0,0 +1,65 @@ +/* block/gsl_block_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_SHORT_H__ +#define __GSL_BLOCK_SHORT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_short_struct +{ + size_t size; + short *data; +}; + +typedef struct gsl_block_short_struct gsl_block_short; + +gsl_block_short *gsl_block_short_alloc (const size_t n); +gsl_block_short *gsl_block_short_calloc (const size_t n); +void gsl_block_short_free (gsl_block_short * b); + +int gsl_block_short_fread (FILE * stream, gsl_block_short * b); +int gsl_block_short_fwrite (FILE * stream, const gsl_block_short * b); +int gsl_block_short_fscanf (FILE * stream, gsl_block_short * b); +int gsl_block_short_fprintf (FILE * stream, const gsl_block_short * b, const char *format); + +int gsl_block_short_raw_fread (FILE * stream, short * b, const size_t n, const size_t stride); +int gsl_block_short_raw_fwrite (FILE * stream, const short * b, const size_t n, const size_t stride); +int gsl_block_short_raw_fscanf (FILE * stream, short * b, const size_t n, const size_t stride); +int gsl_block_short_raw_fprintf (FILE * stream, const short * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_short_size (const gsl_block_short * b); +short * gsl_block_short_data (const gsl_block_short * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_SHORT_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_uchar.h b/software/gsl-1.15/block/gsl_block_uchar.h new file mode 100644 index 000000000..58cf789dc --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_uchar.h @@ -0,0 +1,65 @@ +/* block/gsl_block_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_UCHAR_H__ +#define __GSL_BLOCK_UCHAR_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_uchar_struct +{ + size_t size; + unsigned char *data; +}; + +typedef struct gsl_block_uchar_struct gsl_block_uchar; + +gsl_block_uchar *gsl_block_uchar_alloc (const size_t n); +gsl_block_uchar *gsl_block_uchar_calloc (const size_t n); +void gsl_block_uchar_free (gsl_block_uchar * b); + +int gsl_block_uchar_fread (FILE * stream, gsl_block_uchar * b); +int gsl_block_uchar_fwrite (FILE * stream, const gsl_block_uchar * b); +int gsl_block_uchar_fscanf (FILE * stream, gsl_block_uchar * b); +int gsl_block_uchar_fprintf (FILE * stream, const gsl_block_uchar * b, const char *format); + +int gsl_block_uchar_raw_fread (FILE * stream, unsigned char * b, const size_t n, const size_t stride); +int gsl_block_uchar_raw_fwrite (FILE * stream, const unsigned char * b, const size_t n, const size_t stride); +int gsl_block_uchar_raw_fscanf (FILE * stream, unsigned char * b, const size_t n, const size_t stride); +int gsl_block_uchar_raw_fprintf (FILE * stream, const unsigned char * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_uchar_size (const gsl_block_uchar * b); +unsigned char * gsl_block_uchar_data (const gsl_block_uchar * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_UCHAR_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_uint.h b/software/gsl-1.15/block/gsl_block_uint.h new file mode 100644 index 000000000..52cf2cbec --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_uint.h @@ -0,0 +1,65 @@ +/* block/gsl_block_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_UINT_H__ +#define __GSL_BLOCK_UINT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_uint_struct +{ + size_t size; + unsigned int *data; +}; + +typedef struct gsl_block_uint_struct gsl_block_uint; + +gsl_block_uint *gsl_block_uint_alloc (const size_t n); +gsl_block_uint *gsl_block_uint_calloc (const size_t n); +void gsl_block_uint_free (gsl_block_uint * b); + +int gsl_block_uint_fread (FILE * stream, gsl_block_uint * b); +int gsl_block_uint_fwrite (FILE * stream, const gsl_block_uint * b); +int gsl_block_uint_fscanf (FILE * stream, gsl_block_uint * b); +int gsl_block_uint_fprintf (FILE * stream, const gsl_block_uint * b, const char *format); + +int gsl_block_uint_raw_fread (FILE * stream, unsigned int * b, const size_t n, const size_t stride); +int gsl_block_uint_raw_fwrite (FILE * stream, const unsigned int * b, const size_t n, const size_t stride); +int gsl_block_uint_raw_fscanf (FILE * stream, unsigned int * b, const size_t n, const size_t stride); +int gsl_block_uint_raw_fprintf (FILE * stream, const unsigned int * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_uint_size (const gsl_block_uint * b); +unsigned int * gsl_block_uint_data (const gsl_block_uint * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_UINT_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_ulong.h b/software/gsl-1.15/block/gsl_block_ulong.h new file mode 100644 index 000000000..863ff4759 --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_ulong.h @@ -0,0 +1,65 @@ +/* block/gsl_block_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_ULONG_H__ +#define __GSL_BLOCK_ULONG_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_ulong_struct +{ + size_t size; + unsigned long *data; +}; + +typedef struct gsl_block_ulong_struct gsl_block_ulong; + +gsl_block_ulong *gsl_block_ulong_alloc (const size_t n); +gsl_block_ulong *gsl_block_ulong_calloc (const size_t n); +void gsl_block_ulong_free (gsl_block_ulong * b); + +int gsl_block_ulong_fread (FILE * stream, gsl_block_ulong * b); +int gsl_block_ulong_fwrite (FILE * stream, const gsl_block_ulong * b); +int gsl_block_ulong_fscanf (FILE * stream, gsl_block_ulong * b); +int gsl_block_ulong_fprintf (FILE * stream, const gsl_block_ulong * b, const char *format); + +int gsl_block_ulong_raw_fread (FILE * stream, unsigned long * b, const size_t n, const size_t stride); +int gsl_block_ulong_raw_fwrite (FILE * stream, const unsigned long * b, const size_t n, const size_t stride); +int gsl_block_ulong_raw_fscanf (FILE * stream, unsigned long * b, const size_t n, const size_t stride); +int gsl_block_ulong_raw_fprintf (FILE * stream, const unsigned long * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_ulong_size (const gsl_block_ulong * b); +unsigned long * gsl_block_ulong_data (const gsl_block_ulong * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_ULONG_H__ */ diff --git a/software/gsl-1.15/block/gsl_block_ushort.h b/software/gsl-1.15/block/gsl_block_ushort.h new file mode 100644 index 000000000..24ad7dbff --- /dev/null +++ b/software/gsl-1.15/block/gsl_block_ushort.h @@ -0,0 +1,65 @@ +/* block/gsl_block_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BLOCK_USHORT_H__ +#define __GSL_BLOCK_USHORT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_block_ushort_struct +{ + size_t size; + unsigned short *data; +}; + +typedef struct gsl_block_ushort_struct gsl_block_ushort; + +gsl_block_ushort *gsl_block_ushort_alloc (const size_t n); +gsl_block_ushort *gsl_block_ushort_calloc (const size_t n); +void gsl_block_ushort_free (gsl_block_ushort * b); + +int gsl_block_ushort_fread (FILE * stream, gsl_block_ushort * b); +int gsl_block_ushort_fwrite (FILE * stream, const gsl_block_ushort * b); +int gsl_block_ushort_fscanf (FILE * stream, gsl_block_ushort * b); +int gsl_block_ushort_fprintf (FILE * stream, const gsl_block_ushort * b, const char *format); + +int gsl_block_ushort_raw_fread (FILE * stream, unsigned short * b, const size_t n, const size_t stride); +int gsl_block_ushort_raw_fwrite (FILE * stream, const unsigned short * b, const size_t n, const size_t stride); +int gsl_block_ushort_raw_fscanf (FILE * stream, unsigned short * b, const size_t n, const size_t stride); +int gsl_block_ushort_raw_fprintf (FILE * stream, const unsigned short * b, const size_t n, const size_t stride, const char *format); + +size_t gsl_block_ushort_size (const gsl_block_ushort * b); +unsigned short * gsl_block_ushort_data (const gsl_block_ushort * b); + +__END_DECLS + +#endif /* __GSL_BLOCK_USHORT_H__ */ diff --git a/software/gsl-1.15/block/gsl_check_range.h b/software/gsl-1.15/block/gsl_check_range.h new file mode 100644 index 000000000..d110b6b89 --- /dev/null +++ b/software/gsl-1.15/block/gsl_check_range.h @@ -0,0 +1,57 @@ +/* vector/gsl_check_range.h + * + * Copyright (C) 2003, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CHECK_RANGE_H__ +#define __GSL_CHECK_RANGE_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +GSL_VAR int gsl_check_range; + +/* Turn range checking on by default, unless the user defines + GSL_RANGE_CHECK_OFF, or defines GSL_RANGE_CHECK to 0 explicitly */ + +#ifdef GSL_RANGE_CHECK_OFF +# ifndef GSL_RANGE_CHECK +# define GSL_RANGE_CHECK 0 +# else +# error "cannot set both GSL_RANGE_CHECK and GSL_RANGE_CHECK_OFF" +# endif +#else +# ifndef GSL_RANGE_CHECK +# define GSL_RANGE_CHECK 1 +# endif +#endif + +__END_DECLS + +#endif /* __GSL_CHECK_RANGE_H__ */ diff --git a/software/gsl-1.15/block/init.c b/software/gsl-1.15/block/init.c new file mode 100644 index 000000000..0d3c3ad1a --- /dev/null +++ b/software/gsl-1.15/block/init.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/block/init_source.c b/software/gsl-1.15/block/init_source.c new file mode 100644 index 000000000..0289ef70f --- /dev/null +++ b/software/gsl-1.15/block/init_source.c @@ -0,0 +1,80 @@ +/* block/init_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE (gsl_block) * +FUNCTION (gsl_block, alloc) (const size_t n) +{ + TYPE (gsl_block) * b; + + if (n == 0) + { + GSL_ERROR_VAL ("block length n must be positive integer", + GSL_EINVAL, 0); + } + + b = (TYPE (gsl_block) *) malloc (sizeof (TYPE (gsl_block))); + + if (b == 0) + { + GSL_ERROR_VAL ("failed to allocate space for block struct", + GSL_ENOMEM, 0); + } + + b->data = (ATOMIC *) malloc (MULTIPLICITY * n * sizeof (ATOMIC)); + + if (b->data == 0) + { + free (b); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for block data", + GSL_ENOMEM, 0); + } + + b->size = n; + + return b; +} + +TYPE (gsl_block) * +FUNCTION (gsl_block, calloc) (const size_t n) +{ + size_t i; + + TYPE (gsl_block) * b = FUNCTION (gsl_block, alloc) (n); + + if (b == 0) + return 0; + + /* initialize block to zero */ + + for (i = 0; i < MULTIPLICITY * n; i++) + { + b->data[i] = 0; + } + + return b; +} + +void +FUNCTION (gsl_block, free) (TYPE (gsl_block) * b) +{ + RETURN_IF_NULL (b); + free (b->data); + free (b); +} diff --git a/software/gsl-1.15/block/test.c b/software/gsl-1.15/block/test.c new file mode 100644 index 000000000..59e2df85f --- /dev/null +++ b/software/gsl-1.15/block/test.c @@ -0,0 +1,223 @@ +/* block/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +int status = 0; + +#ifndef DESC +#define DESC "" +#endif + +#define N 1027 + + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "test_complex_source.c" +#if HAVE_PRINTF_LONGDOUBLE +#include "test_complex_io.c" +#endif +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "test_complex_source.c" +#include "test_complex_io.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "test_complex_source.c" +#include "test_complex_io.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#if HAVE_PRINTF_LONGDOUBLE +#include "test_io.c" +#endif +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "test_source.c" +#include "test_io.c" +#include "templates_off.h" +#undef BASE_CHAR + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +int +main (void) +{ + gsl_ieee_env_setup (); + + test_func (); + test_float_func (); + test_long_double_func (); + test_ulong_func (); + test_long_func (); + test_uint_func (); + test_int_func (); + test_ushort_func (); + test_short_func (); + test_uchar_func (); + test_char_func (); + test_complex_func (); + test_complex_float_func (); + test_complex_long_double_func (); + + test_text (); + test_float_text (); +#if HAVE_PRINTF_LONGDOUBLE + test_long_double_text (); +#endif + test_ulong_text (); + test_long_text (); + test_uint_text (); + test_int_text (); + test_ushort_text (); + test_short_text (); + test_uchar_text (); + test_char_text (); + test_complex_text (); + test_complex_float_text (); +#if HAVE_PRINTF_LONGDOUBLE + test_complex_long_double_text (); +#endif + + test_binary (); + test_float_binary (); + test_long_double_binary (); + test_ulong_binary (); + test_long_binary (); + test_uint_binary (); + test_int_binary (); + test_ushort_binary (); + test_short_binary (); + test_uchar_binary (); + test_char_binary (); + test_complex_binary (); + test_complex_float_binary (); + test_complex_long_double_binary (); + + gsl_set_error_handler (&my_error_handler); + + test_trap (); + test_float_trap (); + test_long_double_trap (); + test_ulong_trap (); + test_long_trap (); + test_uint_trap (); + test_int_trap (); + test_ushort_trap (); + test_short_trap (); + test_uchar_trap (); + test_char_trap (); + test_complex_trap (); + test_complex_float_trap (); + test_complex_long_double_trap (); + + exit (gsl_test_summary ()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); + status = 1; +} diff --git a/software/gsl-1.15/block/test_complex_io.c b/software/gsl-1.15/block/test_complex_io.c new file mode 100644 index 000000000..c3f1fd75d --- /dev/null +++ b/software/gsl-1.15/block/test_complex_io.c @@ -0,0 +1,64 @@ +/* block/test_complex_io.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, text) (void); + +void +FUNCTION (test, text) (void) +{ + size_t i; + + { + TYPE (gsl_block) *v = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < N; i++) + { + v->data[2*i] = (ATOMIC)i ; + v->data[2*i + 1] = (ATOMIC)(10*i + 1) ; + }; + + FUNCTION (gsl_block, fprintf) (f, v, OUT_FORMAT); + + fclose (f); + + FUNCTION (gsl_block, free) (v); + } + + { + TYPE (gsl_block) *w = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.txt", "r"); + + FUNCTION (gsl_block, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i] != (ATOMIC) i || w->data[2 * i + 1] != (ATOMIC) (10*i + 1)) + status = 1; + }; + fclose (f); + + FUNCTION (gsl_block, free) (w); + } + + gsl_test (status, NAME (gsl_block) "_fprintf and fscanf"); +} diff --git a/software/gsl-1.15/block/test_complex_source.c b/software/gsl-1.15/block/test_complex_source.c new file mode 100644 index 000000000..b7b18ab82 --- /dev/null +++ b/software/gsl-1.15/block/test_complex_source.c @@ -0,0 +1,124 @@ +/* block/test_complex_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (void); +void FUNCTION (test, binary) (void); +void FUNCTION (test, trap) (void); + +void +FUNCTION (test, func) (void) +{ + TYPE (gsl_block) * b; + ATOMIC * data; + size_t i, size; + + b = FUNCTION (gsl_block, alloc) (N); + + gsl_test (b->data == 0, NAME (gsl_block) "_alloc returns valid pointer"); + gsl_test (b->size != N, NAME (gsl_block) "_alloc returns valid size"); + + data = FUNCTION(gsl_block, data) (b); + size = FUNCTION(gsl_block, size) (b); + + gsl_test (data == 0, NAME (gsl_block) "_data returns valid pointer"); + gsl_test (size != N, NAME (gsl_block) "_size returns valid size"); + + FUNCTION (gsl_block, free) (b); /* free whatever is in v */ + + b = FUNCTION (gsl_block, calloc) (N); + + gsl_test (b->data == 0, NAME (gsl_block) "_calloc returns valid pointer"); + gsl_test (b->size != N, NAME (gsl_block) "_calloc returns valid size"); + + data = FUNCTION(gsl_block, data) (b); + size = FUNCTION(gsl_block, size) (b); + + gsl_test (data == 0, NAME (gsl_block) "_data returns valid pointer from calloc"); + gsl_test (size != N, NAME (gsl_block) "_size returns valid size from calloc"); + + status = 0; + + for (i = 0; i < N; i++) + { + if (b->data[2 * i] != 0.0 || b->data[2 * i + 1] != 0.0) + status = 1; + }; + + gsl_test (status, NAME (gsl_block) "_calloc initializes array to zero"); + + FUNCTION (gsl_block, free) (b); +} + +void +FUNCTION (test, binary) (void) +{ + size_t i; + + { + TYPE (gsl_block) * v = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.dat", "wb"); + + for (i = 0; i < N; i++) + { + v->data[2*i] = (ATOMIC)(N - i); + v->data[2*i + 1] = (ATOMIC)(10*(N-i) + 1); + }; + + FUNCTION (gsl_block, fwrite) (f, v); + + fclose (f); + + FUNCTION (gsl_block, free) (v); + } + + { + TYPE (gsl_block) * w = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.dat", "rb"); + + FUNCTION (gsl_block, fread) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i] != (ATOMIC) (N - i) || w->data[2 * i + 1] != (ATOMIC) (10*(N - i) + 1)) + status = 1; + }; + fclose (f); + + FUNCTION (gsl_block, free) (w); + } + + gsl_test (status, NAME (gsl_block) "_write and read"); + +} + + +void +FUNCTION (test, trap) (void) +{ + TYPE (gsl_block) * b = FUNCTION (gsl_block, alloc) (0); + + gsl_test (b != 0, NAME (gsl_block) "_alloc traps zero length"); +} + + + + diff --git a/software/gsl-1.15/block/test_io.c b/software/gsl-1.15/block/test_io.c new file mode 100644 index 000000000..6f4331f9e --- /dev/null +++ b/software/gsl-1.15/block/test_io.c @@ -0,0 +1,66 @@ +/* block/test_io.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, text) (void); + +void +FUNCTION (test, text) (void) +{ + size_t i; + + { + TYPE (gsl_block) * v = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < N; i++) + { + v->data[i] = (ATOMIC) i; + }; + + FUNCTION (gsl_block, fprintf) (f, v, OUT_FORMAT); + + fclose (f); + + FUNCTION (gsl_block, free) (v); + } + + { + TYPE (gsl_block) * w = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.txt", "r"); + + FUNCTION (gsl_block, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[i] != (ATOMIC) i) + status = 1; + }; + + gsl_test (status, NAME (gsl_block) "_fprintf and fscanf"); + + fclose (f); + + FUNCTION (gsl_block, free) (w); + } +} + + diff --git a/software/gsl-1.15/block/test_source.c b/software/gsl-1.15/block/test_source.c new file mode 100644 index 000000000..e3f9d9b42 --- /dev/null +++ b/software/gsl-1.15/block/test_source.c @@ -0,0 +1,121 @@ +/* block/test_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (void); +void FUNCTION (test, binary) (void); +void FUNCTION (test, trap) (void); + +void +FUNCTION (test, func) (void) +{ + TYPE (gsl_block) * v; + ATOMIC * data; + size_t i, size; + + v = FUNCTION (gsl_block, alloc) (N); + + gsl_test (v->data == 0, NAME (gsl_block) "_alloc returns valid pointer"); + gsl_test (v->size != N, NAME (gsl_block) "_alloc returns valid size"); + + data = FUNCTION(gsl_block, data) (v); + size = FUNCTION(gsl_block, size) (v); + + gsl_test (data == 0, NAME (gsl_block) "_data returns valid pointer"); + gsl_test (size != N, NAME (gsl_block) "_size returns valid size"); + + + FUNCTION (gsl_block, free) (v); /* free whatever is in v */ + + v = FUNCTION (gsl_block, calloc) (N); + + gsl_test (v->data == 0, NAME (gsl_block) "_calloc returns valid pointer"); + gsl_test (v->size != N, NAME (gsl_block) "_calloc returns valid size"); + + data = FUNCTION(gsl_block, data) (v); + size = FUNCTION(gsl_block, size) (v); + + gsl_test (data == 0, NAME (gsl_block) "_data returns valid pointer from calloc"); + gsl_test (size != N, NAME (gsl_block) "_size returns valid size from calloc"); + + status = 0; + + for (i = 0; i < N; i++) + { + if (v->data[i] != 0.0) + status = 1; + }; + + gsl_test (status, NAME (gsl_block) "_calloc initializes array to zero"); + + FUNCTION (gsl_block, free) (v); /* free whatever is in v */ +} + + +void +FUNCTION (test, binary) (void) +{ + size_t i; + + { + TYPE (gsl_block) * v = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.dat", "wb"); + + for (i = 0; i < N; i++) + { + v->data[i] = (ATOMIC)(N - i); + }; + + FUNCTION (gsl_block, fwrite) (f, v); + + fclose (f); + + FUNCTION (gsl_block, free) (v); + } + + { + TYPE (gsl_block) * w = FUNCTION (gsl_block, calloc) (N); + + FILE *f = fopen ("test.dat", "rb"); + + FUNCTION (gsl_block, fread) (f, w); + + status = 0; + + for (i = 0; i < N; i++) + { + if (w->data[i] != (ATOMIC) (N - i)) + status = 1; + }; + + fclose (f); + + FUNCTION (gsl_block, free) (w); + } + + gsl_test (status, NAME (gsl_block) "_write and read"); +} + +void +FUNCTION (test, trap) (void) +{ + TYPE (gsl_block) * b = FUNCTION (gsl_block, alloc) (0); + + gsl_test (b != 0, NAME (gsl_block) "_alloc traps zero length"); +} diff --git a/software/gsl-1.15/bspline/.deps/bspline.Plo b/software/gsl-1.15/bspline/.deps/bspline.Plo new file mode 100644 index 000000000..a7bfc5e9c --- /dev/null +++ b/software/gsl-1.15/bspline/.deps/bspline.Plo @@ -0,0 +1,284 @@ +bspline.lo: bspline.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_bspline.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h bspline.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_bspline.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +bspline.h: diff --git a/software/gsl-1.15/bspline/.deps/test.Po b/software/gsl-1.15/bspline/.deps/test.Po new file mode 100644 index 000000000..291e8d8bb --- /dev/null +++ b/software/gsl-1.15/bspline/.deps/test.Po @@ -0,0 +1,254 @@ +test.o: test.c ../config.h ../gsl/gsl_test.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_bspline.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_ieee_utils.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_bspline.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/bspline/ChangeLog b/software/gsl-1.15/bspline/ChangeLog new file mode 100644 index 000000000..9fbef761e --- /dev/null +++ b/software/gsl-1.15/bspline/ChangeLog @@ -0,0 +1,37 @@ +2009-08-12 Brian Gough + + * bspline.c (gsl_bspline_alloc): correct free to gsl_vector_free + for components allocated with gsl_vector_alloc + (gsl_bspline_deriv_alloc): correct free to gsl_matrix_free + for components allocated with gsl_matrix_alloc + +2009-07-21 Brian Gough + + * bspline.c (gsl_bspline_greville_abscissa): added function for + greville abscissae + +2009-07-09 Brian Gough + + * bspline.c (gsl_bspline_free): handle NULL argument in free + (gsl_bspline_deriv_free): handle NULL argument in free + +2008-12-09 Brian Gough + + * bspline.c (gsl_bspline_deriv_alloc): add size to derivative + struct + +2008-12-08 Brian Gough + + * gsl_bspline.h: preserve binary compatibility in workspaces + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2006-11-02 Brian Gough + + * added test program + + * initial checkin from P.Alken + + diff --git a/software/gsl-1.15/bspline/Makefile.am b/software/gsl-1.15/bspline/Makefile.am new file mode 100644 index 000000000..b4179eb25 --- /dev/null +++ b/software/gsl-1.15/bspline/Makefile.am @@ -0,0 +1,17 @@ +noinst_LTLIBRARIES = libgslbspline.la + +pkginclude_HEADERS = gsl_bspline.h + +INCLUDES = -I$(top_srcdir) + +libgslbspline_la_SOURCES = bspline.c + +noinst_HEADERS = bspline.h + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la + +test_SOURCES = test.c diff --git a/software/gsl-1.15/bspline/Makefile.in b/software/gsl-1.15/bspline/Makefile.in new file mode 100644 index 000000000..47cd715a4 --- /dev/null +++ b/software/gsl-1.15/bspline/Makefile.in @@ -0,0 +1,666 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = bspline +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslbspline_la_LIBADD = +am_libgslbspline_la_OBJECTS = bspline.lo +libgslbspline_la_OBJECTS = $(am_libgslbspline_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslbspline.la ../linalg/libgsllinalg.la \ + ../permutation/libgslpermutation.la ../blas/libgslblas.la \ + ../matrix/libgslmatrix.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../complex/libgslcomplex.la \ + ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la ../statistics/libgslstatistics.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslbspline_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslbspline_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslbspline.la +pkginclude_HEADERS = gsl_bspline.h +INCLUDES = -I$(top_srcdir) +libgslbspline_la_SOURCES = bspline.c +noinst_HEADERS = bspline.h +TESTS = $(check_PROGRAMS) +test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bspline/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu bspline/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslbspline.la: $(libgslbspline_la_OBJECTS) $(libgslbspline_la_DEPENDENCIES) + $(LINK) $(libgslbspline_la_OBJECTS) $(libgslbspline_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bspline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/bspline/TODO b/software/gsl-1.15/bspline/TODO new file mode 100644 index 000000000..f39f3f1bc --- /dev/null +++ b/software/gsl-1.15/bspline/TODO @@ -0,0 +1,10 @@ +# -*- org -*- +#+CATEGORY: bspline + +Add functions: + +gsl_bspline_smooth to fit smoothing splines to data more efficiently +than the standard least squares inversion (see pppack l2appr and +smooth.spline() from GNU R) + ++ any other useful functions from pppack diff --git a/software/gsl-1.15/bspline/bspline.c b/software/gsl-1.15/bspline/bspline.c new file mode 100644 index 000000000..dedefa328 --- /dev/null +++ b/software/gsl-1.15/bspline/bspline.c @@ -0,0 +1,1034 @@ +/* bspline/bspline.c + * + * Copyright (C) 2006, 2007, 2008, 2009 Patrick Alken + * Copyright (C) 2008 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* + * This module contains routines related to calculating B-splines. + * The algorithms used are described in + * + * [1] Carl de Boor, "A Practical Guide to Splines", Springer + * Verlag, 1978. + * + * The bspline_pppack_* internal routines contain code adapted from + * + * [2] "PPPACK - Piecewise Polynomial Package", + * http://www.netlib.org/pppack/ + * + */ + +#include "bspline.h" + +/* +gsl_bspline_alloc() + Allocate space for a bspline workspace. The size of the +workspace is O(5k + nbreak) + +Inputs: k - spline order (cubic = 4) + nbreak - number of breakpoints + +Return: pointer to workspace +*/ + +gsl_bspline_workspace * +gsl_bspline_alloc (const size_t k, const size_t nbreak) +{ + if (k == 0) + { + GSL_ERROR_NULL ("k must be at least 1", GSL_EINVAL); + } + else if (nbreak < 2) + { + GSL_ERROR_NULL ("nbreak must be at least 2", GSL_EINVAL); + } + else + { + gsl_bspline_workspace *w; + + w = (gsl_bspline_workspace *) malloc (sizeof (gsl_bspline_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", + GSL_ENOMEM); + } + + w->k = k; + w->km1 = k - 1; + w->nbreak = nbreak; + w->l = nbreak - 1; + w->n = w->l + k - 1; + + w->knots = gsl_vector_alloc (w->n + k); + if (w->knots == 0) + { + free (w); + GSL_ERROR_NULL ("failed to allocate space for knots vector", + GSL_ENOMEM); + } + + w->deltal = gsl_vector_alloc (k); + if (w->deltal == 0) + { + gsl_vector_free (w->knots); + free (w); + GSL_ERROR_NULL ("failed to allocate space for deltal vector", + GSL_ENOMEM); + } + + w->deltar = gsl_vector_alloc (k); + if (w->deltar == 0) + { + gsl_vector_free (w->deltal); + gsl_vector_free (w->knots); + free (w); + GSL_ERROR_NULL ("failed to allocate space for deltar vector", + GSL_ENOMEM); + } + + + w->B = gsl_vector_alloc (k); + if (w->B == 0) + { + gsl_vector_free (w->deltar);; + gsl_vector_free (w->deltal); + gsl_vector_free (w->knots); + free (w); + GSL_ERROR_NULL + ("failed to allocate space for temporary spline vector", + GSL_ENOMEM); + } + + return w; + } +} /* gsl_bspline_alloc() */ + +/* +gsl_bspline_deriv_alloc() + Allocate space for a bspline derivative workspace. The size of the +workspace is O(2k^2) + +Inputs: k - spline order (cubic = 4) + +Return: pointer to workspace +*/ + +gsl_bspline_deriv_workspace * +gsl_bspline_deriv_alloc (const size_t k) +{ + if (k == 0) + { + GSL_ERROR_NULL ("k must be at least 1", GSL_EINVAL); + } + else + { + gsl_bspline_deriv_workspace *dw; + + dw = + (gsl_bspline_deriv_workspace *) + malloc (sizeof (gsl_bspline_deriv_workspace)); + + if (dw == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", + GSL_ENOMEM); + } + + dw->A = gsl_matrix_alloc (k, k); + if (dw->A == 0) + { + free (dw); + GSL_ERROR_NULL + ("failed to allocate space for derivative work matrix", + GSL_ENOMEM); + } + + dw->dB = gsl_matrix_alloc (k, k + 1); + if (dw->dB == 0) + { + gsl_matrix_free (dw->A); + free (dw); + GSL_ERROR_NULL + ("failed to allocate space for temporary derivative matrix", + GSL_ENOMEM); + } + + dw->k = k; + + return dw; + } +} /* gsl_bspline_deriv_alloc() */ + +/* Return number of coefficients */ +size_t +gsl_bspline_ncoeffs (gsl_bspline_workspace * w) +{ + return w->n; +} + +/* Return order */ +size_t +gsl_bspline_order (gsl_bspline_workspace * w) +{ + return w->k; +} + +/* Return number of breakpoints */ +size_t +gsl_bspline_nbreak (gsl_bspline_workspace * w) +{ + return w->nbreak; +} + +/* Return the location of the i-th breakpoint*/ +double +gsl_bspline_breakpoint (size_t i, gsl_bspline_workspace * w) +{ + size_t j = i + w->k - 1; + return gsl_vector_get (w->knots, j); +} + +/* Return the location of the i-th Greville abscissa */ +double +gsl_bspline_greville_abscissa(size_t i, gsl_bspline_workspace *w) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= gsl_bspline_ncoeffs(w))) + { + GSL_ERROR_VAL ("Greville abscissa index out of range", GSL_EINVAL, 0); + } +#endif + const size_t stride = w->knots->stride; + size_t km1 = w->km1; + double * data = w->knots->data + (i+1)*stride; + + if (km1 == 0) + { + /* Return interval midpoints in degenerate k = 1 case*/ + km1 = 2; + data -= stride; + } + + return gsl_stats_mean(data, stride, km1); +} + +/* +gsl_bspline_free() + Free a gsl_bspline_workspace. + +Inputs: w - workspace to free + +Return: none +*/ + +void +gsl_bspline_free (gsl_bspline_workspace * w) +{ + RETURN_IF_NULL (w); + gsl_vector_free (w->knots); + gsl_vector_free (w->deltal); + gsl_vector_free (w->deltar); + gsl_vector_free (w->B); + free (w); +} /* gsl_bspline_free() */ + +/* +gsl_bspline_deriv_free() + Free a gsl_bspline_deriv_workspace. + +Inputs: dw - workspace to free + +Return: none +*/ + +void +gsl_bspline_deriv_free (gsl_bspline_deriv_workspace * dw) +{ + RETURN_IF_NULL (dw); + gsl_matrix_free (dw->A); + gsl_matrix_free (dw->dB); + free (dw); +} /* gsl_bspline_deriv_free() */ + +/* +gsl_bspline_knots() + Compute the knots from the given breakpoints: + + knots(1:k) = breakpts(1) + knots(k+1:k+l-1) = breakpts(i), i = 2 .. l + knots(n+1:n+k) = breakpts(l + 1) + +where l is the number of polynomial pieces (l = nbreak - 1) and + n = k + l - 1 +(using matlab syntax for the arrays) + +The repeated knots at the beginning and end of the interval +correspond to the continuity condition there. See pg. 119 +of [1]. + +Inputs: breakpts - breakpoints + w - bspline workspace + +Return: success or error +*/ + +int +gsl_bspline_knots (const gsl_vector * breakpts, gsl_bspline_workspace * w) +{ + if (breakpts->size != w->nbreak) + { + GSL_ERROR ("breakpts vector has wrong size", GSL_EBADLEN); + } + else + { + size_t i; /* looping */ + + for (i = 0; i < w->k; i++) + gsl_vector_set (w->knots, i, gsl_vector_get (breakpts, 0)); + + for (i = 1; i < w->l; i++) + { + gsl_vector_set (w->knots, w->k - 1 + i, + gsl_vector_get (breakpts, i)); + } + + for (i = w->n; i < w->n + w->k; i++) + gsl_vector_set (w->knots, i, gsl_vector_get (breakpts, w->l)); + + return GSL_SUCCESS; + } +} /* gsl_bspline_knots() */ + +/* +gsl_bspline_knots_uniform() + Construct uniformly spaced knots on the interval [a,b] using +the previously specified number of breakpoints. 'a' is the position +of the first breakpoint and 'b' is the position of the last +breakpoint. + +Inputs: a - left side of interval + b - right side of interval + w - bspline workspace + +Return: success or error + +Notes: 1) w->knots is modified to contain the uniformly spaced + knots + + 2) The knots vector is set up as follows (using octave syntax): + + knots(1:k) = a + knots(k+1:k+l-1) = a + i*delta, i = 1 .. l - 1 + knots(n+1:n+k) = b +*/ + +int +gsl_bspline_knots_uniform (const double a, const double b, + gsl_bspline_workspace * w) +{ + size_t i; /* looping */ + double delta; /* interval spacing */ + double x; + + delta = (b - a) / (double) w->l; + + for (i = 0; i < w->k; i++) + gsl_vector_set (w->knots, i, a); + + x = a + delta; + for (i = 0; i < w->l - 1; i++) + { + gsl_vector_set (w->knots, w->k + i, x); + x += delta; + } + + for (i = w->n; i < w->n + w->k; i++) + gsl_vector_set (w->knots, i, b); + + return GSL_SUCCESS; +} /* gsl_bspline_knots_uniform() */ + +/* +gsl_bspline_eval() + Evaluate the basis functions B_i(x) for all i. This is +a wrapper function for gsl_bspline_eval_nonzero() which +formats the output in a nice way. + +Inputs: x - point for evaluation + B - (output) where to store B_i(x) values + the length of this vector is + n = nbreak + k - 2 = l + k - 1 = w->n + w - bspline workspace + +Return: success or error + +Notes: The w->knots vector must be initialized prior to calling + this function (see gsl_bspline_knots()) +*/ + +int +gsl_bspline_eval (const double x, gsl_vector * B, gsl_bspline_workspace * w) +{ + if (B->size != w->n) + { + GSL_ERROR ("vector B not of length n", GSL_EBADLEN); + } + else + { + size_t i; /* looping */ + size_t istart; /* first non-zero spline for x */ + size_t iend; /* last non-zero spline for x, knot for x */ + int error; /* error handling */ + + /* find all non-zero B_i(x) values */ + error = gsl_bspline_eval_nonzero (x, w->B, &istart, &iend, w); + if (error) + { + return error; + } + + /* store values in appropriate part of given vector */ + for (i = 0; i < istart; i++) + gsl_vector_set (B, i, 0.0); + + for (i = istart; i <= iend; i++) + gsl_vector_set (B, i, gsl_vector_get (w->B, i - istart)); + + for (i = iend + 1; i < w->n; i++) + gsl_vector_set (B, i, 0.0); + + return GSL_SUCCESS; + } +} /* gsl_bspline_eval() */ + +/* +gsl_bspline_eval_nonzero() + Evaluate all non-zero B-spline functions at point x. +These are the B_i(x) for i in [istart, iend]. +Always B_i(x) = 0 for i < istart and for i > iend. + +Inputs: x - point at which to evaluate splines + Bk - (output) where to store B-spline values (length k) + istart - (output) B-spline function index of + first non-zero basis for given x + iend - (output) B-spline function index of + last non-zero basis for given x. + This is also the knot index corresponding to x. + w - bspline workspace + +Return: success or error + +Notes: 1) the w->knots vector must be initialized before calling + this function + + 2) On output, B contains + + [B_{istart,k}, B_{istart+1,k}, + ..., B_{iend-1,k}, B_{iend,k}] + + evaluated at the given x. +*/ + +int +gsl_bspline_eval_nonzero (const double x, gsl_vector * Bk, size_t * istart, + size_t * iend, gsl_bspline_workspace * w) +{ + if (Bk->size != w->k) + { + GSL_ERROR ("Bk vector length does not match order k", GSL_EBADLEN); + } + else + { + size_t i; /* spline index */ + size_t j; /* looping */ + int flag = 0; /* interval search flag */ + int error = 0; /* error flag */ + + i = bspline_find_interval (x, &flag, w); + error = bspline_process_interval_for_eval (x, &i, flag, w); + if (error) + { + return error; + } + + *istart = i - w->k + 1; + *iend = i; + + bspline_pppack_bsplvb (w->knots, w->k, 1, x, *iend, &j, w->deltal, + w->deltar, Bk); + + return GSL_SUCCESS; + } +} /* gsl_bspline_eval_nonzero() */ + +/* +gsl_bspline_deriv_eval() + Evaluate d^j/dx^j B_i(x) for all i, 0 <= j <= nderiv. +This is a wrapper function for gsl_bspline_deriv_eval_nonzero() +which formats the output in a nice way. + +Inputs: x - point for evaluation + nderiv - number of derivatives to compute, inclusive. + dB - (output) where to store d^j/dx^j B_i(x) + values. the size of this matrix is + (n = nbreak + k - 2 = l + k - 1 = w->n) + by (nderiv + 1) + w - bspline derivative workspace + +Return: success or error + +Notes: 1) The w->knots vector must be initialized prior to calling + this function (see gsl_bspline_knots()) + + 2) based on PPPACK's bsplvd +*/ + +int +gsl_bspline_deriv_eval (const double x, const size_t nderiv, gsl_matrix * dB, + gsl_bspline_workspace * w, + gsl_bspline_deriv_workspace * dw) +{ + if (dB->size1 != w->n) + { + GSL_ERROR ("dB matrix first dimension not of length n", GSL_EBADLEN); + } + else if (dB->size2 < nderiv + 1) + { + GSL_ERROR + ("dB matrix second dimension must be at least length nderiv+1", + GSL_EBADLEN); + } + else if (dw->k < w->k) + { + GSL_ERROR ("derivative workspace is too small", GSL_EBADLEN); + } + else + { + size_t i; /* looping */ + size_t j; /* looping */ + size_t istart; /* first non-zero spline for x */ + size_t iend; /* last non-zero spline for x, knot for x */ + int error; /* error handling */ + + /* find all non-zero d^j/dx^j B_i(x) values */ + error = + gsl_bspline_deriv_eval_nonzero (x, nderiv, dw->dB, &istart, &iend, w, + dw); + if (error) + { + return error; + } + + /* store values in appropriate part of given matrix */ + for (j = 0; j <= nderiv; j++) + { + for (i = 0; i < istart; i++) + gsl_matrix_set (dB, i, j, 0.0); + + for (i = istart; i <= iend; i++) + gsl_matrix_set (dB, i, j, gsl_matrix_get (dw->dB, i - istart, j)); + + for (i = iend + 1; i < w->n; i++) + gsl_matrix_set (dB, i, j, 0.0); + } + + return GSL_SUCCESS; + } +} /* gsl_bspline_deriv_eval() */ + +/* +gsl_bspline_deriv_eval_nonzero() + At point x evaluate all requested, non-zero B-spline function +derivatives and store them in dB. These are the +d^j/dx^j B_i(x) with i in [istart, iend] and j in [0, nderiv]. +Always d^j/dx^j B_i(x) = 0 for i < istart and for i > iend. + +Inputs: x - point at which to evaluate splines + nderiv - number of derivatives to request, inclusive + dB - (output) where to store dB-spline derivatives + (size k by nderiv + 1) + istart - (output) B-spline function index of + first non-zero basis for given x + iend - (output) B-spline function index of + last non-zero basis for given x. + This is also the knot index corresponding to x. + w - bspline derivative workspace + +Return: success or error + +Notes: 1) the w->knots vector must be initialized before calling + this function + + 2) On output, dB contains + + [[B_{istart, k}, ..., d^nderiv/dx^nderiv B_{istart ,k}], + [B_{istart+1,k}, ..., d^nderiv/dx^nderiv B_{istart+1,k}], + ... + [B_{iend-1, k}, ..., d^nderiv/dx^nderiv B_{iend-1, k}], + [B_{iend, k}, ..., d^nderiv/dx^nderiv B_{iend, k}]] + + evaluated at x. B_{istart, k} is stored in dB(0,0). + Each additional column contains an additional derivative. + + 3) Note that the zero-th column of the result contains the + 0th derivative, which is simply a function evaluation. + + 4) based on PPPACK's bsplvd +*/ + +int +gsl_bspline_deriv_eval_nonzero (const double x, const size_t nderiv, + gsl_matrix * dB, size_t * istart, + size_t * iend, gsl_bspline_workspace * w, + gsl_bspline_deriv_workspace * dw) +{ + if (dB->size1 != w->k) + { + GSL_ERROR ("dB matrix first dimension not of length k", GSL_EBADLEN); + } + else if (dB->size2 < nderiv + 1) + { + GSL_ERROR + ("dB matrix second dimension must be at least length nderiv+1", + GSL_EBADLEN); + } + else if (dw->k < w->k) + { + GSL_ERROR ("derivative workspace is too small", GSL_EBADLEN); + } + else + { + size_t i; /* spline index */ + size_t j; /* looping */ + int flag = 0; /* interval search flag */ + int error = 0; /* error flag */ + size_t min_nderivk; + + i = bspline_find_interval (x, &flag, w); + error = bspline_process_interval_for_eval (x, &i, flag, w); + if (error) + { + return error; + } + + *istart = i - w->k + 1; + *iend = i; + + bspline_pppack_bsplvd (w->knots, w->k, x, *iend, + w->deltal, w->deltar, dw->A, dB, nderiv); + + /* An order k b-spline has at most k-1 nonzero derivatives + so we need to zero all requested higher order derivatives */ + min_nderivk = GSL_MIN_INT (nderiv, w->k - 1); + for (j = min_nderivk + 1; j <= nderiv; j++) + { + for (i = 0; i < w->k; i++) + { + gsl_matrix_set (dB, i, j, 0.0); + } + } + + return GSL_SUCCESS; + } +} /* gsl_bspline_deriv_eval_nonzero() */ + +/**************************************** + * INTERNAL ROUTINES * + ****************************************/ + +/* +bspline_find_interval() + Find knot interval such that t_i <= x < t_{i + 1} +where the t_i are knot values. + +Inputs: x - x value + flag - (output) error flag + w - bspline workspace + +Return: i (index in w->knots corresponding to left limit of interval) + +Notes: The error conditions are reported as follows: + + Condition Return value Flag + --------- ------------ ---- + x < t_0 0 -1 + t_i <= x < t_{i+1} i 0 + t_i < x = t_{i+1} = t_{n+k-1} i 0 + t_{n+k-1} < x l+k-1 +1 +*/ + +static inline size_t +bspline_find_interval (const double x, int *flag, gsl_bspline_workspace * w) +{ + size_t i; + + if (x < gsl_vector_get (w->knots, 0)) + { + *flag = -1; + return 0; + } + + /* find i such that t_i <= x < t_{i+1} */ + for (i = w->k - 1; i < w->k + w->l - 1; i++) + { + const double ti = gsl_vector_get (w->knots, i); + const double tip1 = gsl_vector_get (w->knots, i + 1); + + if (tip1 < ti) + { + GSL_ERROR ("knots vector is not increasing", GSL_EINVAL); + } + + if (ti <= x && x < tip1) + break; + + if (ti < x && x == tip1 && tip1 == gsl_vector_get (w->knots, w->k + w->l + - 1)) + break; + } + + if (i == w->k + w->l - 1) + *flag = 1; + else + *flag = 0; + + return i; +} /* bspline_find_interval() */ + +/* +bspline_process_interval_for_eval() + Consumes an x location, left knot from bspline_find_interval, flag +from bspline_find_interval, and a workspace. Checks that x lies within +the splines' knots, enforces some endpoint continuity requirements, and +avoids divide by zero errors in the underlying bspline_pppack_* functions. +*/ +static inline int +bspline_process_interval_for_eval (const double x, size_t * i, const int flag, + gsl_bspline_workspace * w) +{ + if (flag == -1) + { + GSL_ERROR ("x outside of knot interval", GSL_EINVAL); + } + else if (flag == 1) + { + if (x <= gsl_vector_get (w->knots, *i) + GSL_DBL_EPSILON) + { + *i -= 1; + } + else + { + GSL_ERROR ("x outside of knot interval", GSL_EINVAL); + } + } + + if (gsl_vector_get (w->knots, *i) == gsl_vector_get (w->knots, *i + 1)) + { + GSL_ERROR ("knot(i) = knot(i+1) will result in division by zero", + GSL_EINVAL); + } + + return GSL_SUCCESS; +} /* bspline_process_interval_for_eval */ + +/******************************************************************** + * PPPACK ROUTINES + * + * The routines herein deliberately avoid using the bspline workspace, + * choosing instead to pass all work areas explicitly. This allows + * others to more easily adapt these routines to low memory or + * parallel scenarios. + ********************************************************************/ + +/* +bspline_pppack_bsplvb() + calculates the value of all possibly nonzero b-splines at x of order +jout = max( jhigh , (j+1)*(index-1) ) with knot sequence t. + +Parameters: + t - knot sequence, of length left + jout , assumed to be + nondecreasing. assumption t(left).lt.t(left + 1). + division by zero will result if t(left) = t(left+1) + jhigh - + index - integers which determine the order jout = max(jhigh, + (j+1)*(index-1)) of the b-splines whose values at x + are to be returned. index is used to avoid + recalculations when several columns of the triangular + array of b-spline values are needed (e.g., in bsplpp + or in bsplvd ). precisely, + + if index = 1 , + the calculation starts from scratch and the entire + triangular array of b-spline values of orders + 1,2,...,jhigh is generated order by order , i.e., + column by column . + + if index = 2 , + only the b-spline values of order j+1, j+2, ..., jout + are generated, the assumption being that biatx, j, + deltal, deltar are, on entry, as they were on exit + at the previous call. + + in particular, if jhigh = 0, then jout = j+1, i.e., + just the next column of b-spline values is generated. + x - the point at which the b-splines are to be evaluated. + left - an integer chosen (usually) so that + t(left) .le. x .le. t(left+1). + j - (output) a working scalar for indexing + deltal - (output) a working area which must be of length at least jout + deltar - (output) a working area which must be of length at least jout + biatx - (output) array of length jout, with biatx(i) + containing the value at x of the polynomial of order + jout which agrees with the b-spline b(left-jout+i,jout,t) + on the interval (t(left), t(left+1)) . + +Method: + the recurrence relation + + x - t(i) t(i+j+1) - x + b(i,j+1)(x) = -----------b(i,j)(x) + ---------------b(i+1,j)(x) + t(i+j)-t(i) t(i+j+1)-t(i+1) + + is used (repeatedly) to generate the (j+1)-vector b(left-j,j+1)(x), + ...,b(left,j+1)(x) from the j-vector b(left-j+1,j)(x),..., + b(left,j)(x), storing the new values in biatx over the old. the + facts that + + b(i,1) = 1 if t(i) .le. x .lt. t(i+1) + + and that + + b(i,j)(x) = 0 unless t(i) .le. x .lt. t(i+j) + + are used. the particular organization of the calculations follows + algorithm (8) in chapter x of [1]. + +Notes: + + (1) This is a direct translation of PPPACK's bsplvb routine with + j, deltal, deltar rewritten as input parameters and + utilizing zero-based indexing. + + (2) This routine contains no error checking. Please use routines + like gsl_bspline_eval(). +*/ + +static void +bspline_pppack_bsplvb (const gsl_vector * t, + const size_t jhigh, + const size_t index, + const double x, + const size_t left, + size_t * j, + gsl_vector * deltal, + gsl_vector * deltar, gsl_vector * biatx) +{ + size_t i; /* looping */ + double saved; + double term; + + if (index == 1) + { + *j = 0; + gsl_vector_set (biatx, 0, 1.0); + } + + for ( /* NOP */ ; *j < jhigh - 1; *j += 1) + { + gsl_vector_set (deltar, *j, gsl_vector_get (t, left + *j + 1) - x); + gsl_vector_set (deltal, *j, x - gsl_vector_get (t, left - *j)); + + saved = 0.0; + + for (i = 0; i <= *j; i++) + { + term = gsl_vector_get (biatx, i) / (gsl_vector_get (deltar, i) + + gsl_vector_get (deltal, + *j - i)); + + gsl_vector_set (biatx, i, + saved + gsl_vector_get (deltar, i) * term); + + saved = gsl_vector_get (deltal, *j - i) * term; + } + + gsl_vector_set (biatx, *j + 1, saved); + } + + return; +} /* gsl_bspline_pppack_bsplvb */ + +/* +bspline_pppack_bsplvd() + calculates value and derivs of all b-splines which do not vanish at x + +Parameters: + t - the knot array, of length left+k (at least) + k - the order of the b-splines to be evaluated + x - the point at which these values are sought + left - an integer indicating the left endpoint of the interval + of interest. the k b-splines whose support contains the + interval (t(left), t(left+1)) are to be considered. + it is assumed that t(left) .lt. t(left+1) + division by zero will result otherwise (in bsplvb). + also, the output is as advertised only if + t(left) .le. x .le. t(left+1) . + deltal - a working area which must be of length at least k + deltar - a working area which must be of length at least k + a - an array of order (k,k), to contain b-coeffs of the + derivatives of a certain order of the k b-splines + of interest. + dbiatx - an array of order (k,nderiv). its entry (i,m) contains + value of (m)th derivative of (left-k+i)-th b-spline + of order k for knot sequence t, i=1,...,k, m=0,...,nderiv. + nderiv - an integer indicating that values of b-splines and + their derivatives up to AND INCLUDING the nderiv-th + are asked for. (nderiv is replaced internally by the + integer mhigh in (1,k) closest to it.) + +Method: + values at x of all the relevant b-splines of order k,k-1,..., k+1-nderiv + are generated via bsplvb and stored temporarily in dbiatx. then, the + b-coeffs of the required derivatives of the b-splines of interest are + generated by differencing, each from the preceeding one of lower order, + and combined with the values of b-splines of corresponding order in + dbiatx to produce the desired values . + +Notes: + + (1) This is a direct translation of PPPACK's bsplvd routine with + deltal, deltar rewritten as input parameters (to later feed them + to bspline_pppack_bsplvb) and utilizing zero-based indexing. + + (2) This routine contains no error checking. +*/ + +static void +bspline_pppack_bsplvd (const gsl_vector * t, + const size_t k, + const double x, + const size_t left, + gsl_vector * deltal, + gsl_vector * deltar, + gsl_matrix * a, + gsl_matrix * dbiatx, const size_t nderiv) +{ + int i, ideriv, il, j, jlow, jp1mid, kmm, ldummy, m, mhigh; + double factor, fkmm, sum; + + size_t bsplvb_j; + gsl_vector_view dbcol = gsl_matrix_column (dbiatx, 0); + + mhigh = GSL_MIN_INT (nderiv, k - 1); + bspline_pppack_bsplvb (t, k - mhigh, 1, x, left, &bsplvb_j, deltal, deltar, + &dbcol.vector); + if (mhigh > 0) + { + /* the first column of dbiatx always contains the b-spline + values for the current order. these are stored in column + k-current order before bsplvb is called to put values + for the next higher order on top of it. */ + ideriv = mhigh; + for (m = 1; m <= mhigh; m++) + { + for (j = ideriv, jp1mid = 0; j < (int) k; j++, jp1mid++) + { + gsl_matrix_set (dbiatx, j, ideriv, + gsl_matrix_get (dbiatx, jp1mid, 0)); + } + ideriv--; + bspline_pppack_bsplvb (t, k - ideriv, 2, x, left, &bsplvb_j, deltal, + deltar, &dbcol.vector); + } + + /* at this point, b(left-k+i, k+1-j)(x) is in dbiatx(i,j) + for i=j,...,k-1 and j=0,...,mhigh. in particular, the + first column of dbiatx is already in final form. to obtain + corresponding derivatives of b-splines in subsequent columns, + generate their b-repr. by differencing, then evaluate at x. */ + jlow = 0; + for (i = 0; i < (int) k; i++) + { + for (j = jlow; j < (int) k; j++) + { + gsl_matrix_set (a, j, i, 0.0); + } + jlow = i; + gsl_matrix_set (a, i, i, 1.0); + } + + /* at this point, a(.,j) contains the b-coeffs for the j-th of the + k b-splines of interest here. */ + for (m = 1; m <= mhigh; m++) + { + kmm = k - m; + fkmm = (float) kmm; + il = left; + i = k - 1; + + /* for j=1,...,k, construct b-coeffs of (m)th derivative + of b-splines from those for preceding derivative by + differencing and store again in a(.,j) . the fact that + a(i,j) = 0 for i .lt. j is used. */ + for (ldummy = 0; ldummy < kmm; ldummy++) + { + factor = + fkmm / (gsl_vector_get (t, il + kmm) - + gsl_vector_get (t, il)); + /* the assumption that t(left).lt.t(left+1) makes + denominator in factor nonzero. */ + for (j = 0; j <= i; j++) + { + gsl_matrix_set (a, i, j, factor * (gsl_matrix_get (a, i, j) + - gsl_matrix_get (a, + i - 1, + j))); + } + il--; + i--; + } + + /* for i=1,...,k, combine b-coeffs a(.,i) with b-spline values + stored in dbiatx(.,m) to get value of (m)th derivative + of i-th b-spline (of interest here) at x, and store in + dbiatx(i,m). storage of this value over the value of a + b-spline of order m there is safe since the remaining + b-spline derivatives of the same order do not use this + value due to the fact that a(j,i) = 0 for j .lt. i . */ + for (i = 0; i < (int) k; i++) + { + sum = 0; + jlow = GSL_MAX_INT (i, m); + for (j = jlow; j < (int) k; j++) + { + sum += + gsl_matrix_get (a, j, i) * gsl_matrix_get (dbiatx, j, m); + } + gsl_matrix_set (dbiatx, i, m, sum); + } + } + } + + return; + +} /* bspline_pppack_bsplvd */ diff --git a/software/gsl-1.15/bspline/bspline.h b/software/gsl-1.15/bspline/bspline.h new file mode 100644 index 000000000..f80e03e8e --- /dev/null +++ b/software/gsl-1.15/bspline/bspline.h @@ -0,0 +1,26 @@ +static inline size_t +bspline_find_interval (const double x, int *flag, gsl_bspline_workspace * w); + +static inline int +bspline_process_interval_for_eval (const double x, size_t * i, int flag, + gsl_bspline_workspace * w); + +static void +bspline_pppack_bsplvb (const gsl_vector * t, + const size_t jhigh, + const size_t index, + const double x, + const size_t left, + size_t * j, + gsl_vector * deltal, + gsl_vector * deltar, gsl_vector * biatx); + +static void +bspline_pppack_bsplvd (const gsl_vector * t, + const size_t k, + const double x, + const size_t left, + gsl_vector * deltal, + gsl_vector * deltar, + gsl_matrix * a, + gsl_matrix * dbiatx, const size_t nderiv); diff --git a/software/gsl-1.15/bspline/gsl_bspline.h b/software/gsl-1.15/bspline/gsl_bspline.h new file mode 100644 index 000000000..7b89a10f3 --- /dev/null +++ b/software/gsl-1.15/bspline/gsl_bspline.h @@ -0,0 +1,114 @@ +/* bspline/gsl_bspline.h + * + * Copyright (C) 2006 Patrick Alken + * Copyright (C) 2008 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_BSPLINE_H__ +#define __GSL_BSPLINE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t k; /* spline order */ + size_t km1; /* k - 1 (polynomial order) */ + size_t l; /* number of polynomial pieces on interval */ + size_t nbreak; /* number of breakpoints (l + 1) */ + size_t n; /* number of bspline basis functions (l + k - 1) */ + + gsl_vector *knots; /* knots vector */ + gsl_vector *deltal; /* left delta */ + gsl_vector *deltar; /* right delta */ + gsl_vector *B; /* temporary spline results */ +} gsl_bspline_workspace; + +typedef struct +{ + size_t k; /* spline order */ + gsl_matrix *A; /* work matrix */ + gsl_matrix *dB; /* temporary derivative results */ +} gsl_bspline_deriv_workspace; + +gsl_bspline_workspace * +gsl_bspline_alloc(const size_t k, const size_t nbreak); + +void gsl_bspline_free(gsl_bspline_workspace *w); + +size_t gsl_bspline_ncoeffs(gsl_bspline_workspace * w); +size_t gsl_bspline_order(gsl_bspline_workspace * w); +size_t gsl_bspline_nbreak(gsl_bspline_workspace * w); +double gsl_bspline_breakpoint(size_t i, gsl_bspline_workspace * w); +double gsl_bspline_greville_abscissa(size_t i, gsl_bspline_workspace *w); + +int +gsl_bspline_knots(const gsl_vector *breakpts, gsl_bspline_workspace *w); + +int gsl_bspline_knots_uniform(const double a, const double b, + gsl_bspline_workspace *w); + +int +gsl_bspline_eval(const double x, gsl_vector *B, + gsl_bspline_workspace *w); + +int +gsl_bspline_eval_nonzero(const double x, + gsl_vector *Bk, + size_t *istart, + size_t *iend, + gsl_bspline_workspace *w); + +gsl_bspline_deriv_workspace * +gsl_bspline_deriv_alloc(const size_t k); + +void +gsl_bspline_deriv_free(gsl_bspline_deriv_workspace *w); + +int +gsl_bspline_deriv_eval(const double x, + const size_t nderiv, + gsl_matrix *dB, + gsl_bspline_workspace *w, + gsl_bspline_deriv_workspace *dw); + +int +gsl_bspline_deriv_eval_nonzero(const double x, + const size_t nderiv, + gsl_matrix *dB, + size_t *istart, + size_t *iend, + gsl_bspline_workspace *w, + gsl_bspline_deriv_workspace *dw); + +__END_DECLS + +#endif /* __GSL_BSPLINE_H__ */ diff --git a/software/gsl-1.15/bspline/test.c b/software/gsl-1.15/bspline/test.c new file mode 100644 index 000000000..4a7e91305 --- /dev/null +++ b/software/gsl-1.15/bspline/test.c @@ -0,0 +1,385 @@ +/* bspline/test.c + * + * Copyright (C) 2006, 2007, 2009 Brian Gough + * Copyright (C) 2008 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +void +test_bspline(gsl_bspline_workspace * bw, gsl_bspline_deriv_workspace * dbw) +{ + gsl_vector *B; + gsl_matrix *dB; + size_t i, j; + size_t n = 100; + size_t ncoeffs = gsl_bspline_ncoeffs(bw); + size_t order = gsl_bspline_order(bw); + size_t nbreak = gsl_bspline_nbreak(bw); + double a = gsl_bspline_breakpoint(0, bw); + double b = gsl_bspline_breakpoint(nbreak - 1, bw); + + B = gsl_vector_alloc(ncoeffs); + dB = gsl_matrix_alloc(ncoeffs, 1); + + /* Ensure B-splines form a partition of unity */ + for (i = 0; i < n; i++) + { + double xi = a + (b - a) * (i / (n - 1.0)); + double sum = 0; + gsl_bspline_eval(xi, B, bw); + + for (j = 0; j < ncoeffs; j++) + { + double Bj = gsl_vector_get(B, j); + int s = (Bj < 0 || Bj > 1); + gsl_test(s, + "basis-spline coefficient %u is in range [0,1] for x=%g", + j, xi); + sum += Bj; + } + + gsl_test_rel(sum, 1.0, order * GSL_DBL_EPSILON, + "basis-spline order %u is normalized for x=%g", order, + xi); + } + + /* Ensure B-splines 0th derivatives agree with regular evaluation */ + for (i = 0; i < n; i++) + { + double xi = a + (b - a) * (i / (n - 1.0)); + gsl_bspline_eval(xi, B, bw); + gsl_bspline_deriv_eval(xi, 0, dB, bw, dbw); + + for (j = 0; j < ncoeffs; j++) + { + gsl_test_abs(gsl_matrix_get(dB, j, 0), gsl_vector_get(B, j), + GSL_DBL_EPSILON, + "b-spline order %d basis #%d evaluation and 0th derivative consistent for x=%g", + order, j, xi); + } + + } + + gsl_vector_free(B); + gsl_matrix_free(dB); +} + +int +main(int argc, char **argv) +{ + size_t order, breakpoints, i; + + gsl_ieee_env_setup(); + + argc = 0; /* prevent warnings about unused parameters */ + argv = 0; + + for (order = 1; order < 10; order++) + { + for (breakpoints = 2; breakpoints < 100; breakpoints++) + { + double a = -1.23 * order, b = 45.6 * order; + gsl_bspline_workspace *bw = gsl_bspline_alloc(order, breakpoints); + gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(order); + gsl_bspline_knots_uniform(a, b, bw); + test_bspline(bw, dbw); + gsl_bspline_deriv_free(dbw); + gsl_bspline_free(bw); + } + } + + + for (order = 1; order < 10; order++) + { + for (breakpoints = 2; breakpoints < 100; breakpoints++) + { + double a = -1.23 * order, b = 45.6 * order; + gsl_bspline_workspace *bw = gsl_bspline_alloc(order, breakpoints); + gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(order); + gsl_vector *k = gsl_vector_alloc(breakpoints); + for (i = 0; i < breakpoints; i++) + { + double f, x; + f = sqrt(i / (breakpoints - 1.0)); + x = (1 - f) * a + f * b; + gsl_vector_set(k, i, x); + }; + gsl_bspline_knots(k, bw); + test_bspline(bw, dbw); + gsl_vector_free(k); + gsl_bspline_deriv_free(dbw); + gsl_bspline_free(bw); + } + } + + /* Spot check known 0th, 1st, 2nd derivative + evaluations for a particular k = 2 case. */ + { + size_t i, j; /* looping */ + + const double xloc[4] = { 0.0, 1.0, 6.0, 7.0}; + const double deriv[4][3] = + { + { -1.0/2.0, 1.0/2.0, 0.0 }, + { -1.0/2.0, 1.0/2.0, 0.0 }, + { 0.0, -1.0/5.0, 1.0/5.0 }, + { 0.0, -1.0/5.0, 1.0/5.0 } + }; + + gsl_bspline_workspace *bw = gsl_bspline_alloc(2, 3); + gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(2); + gsl_matrix *dB = gsl_matrix_alloc(gsl_bspline_ncoeffs(bw), + gsl_bspline_order(bw) + 1); + + gsl_vector *breakpts = gsl_vector_alloc(3); + gsl_vector_set(breakpts, 0, 0.0); + gsl_vector_set(breakpts, 1, 2.0); + gsl_vector_set(breakpts, 2, 7.0); + gsl_bspline_knots(breakpts, bw); + + + for (i = 0; i < 4; ++i) /* at each location */ + { + /* Initialize dB with poison to ensure we overwrite it */ + gsl_matrix_set_all(dB, GSL_NAN); + + gsl_bspline_deriv_eval(xloc[i], gsl_bspline_order(bw), dB, bw, dbw); + for (j = 0; j < gsl_bspline_ncoeffs(bw) ; ++j) + { + /* check basis function 1st deriv */ + gsl_test_abs(gsl_matrix_get(dB, j, 1), deriv[i][j], GSL_DBL_EPSILON, + "b-spline k=%d basis #%d derivative %d at x = %f", + gsl_bspline_order(bw), j, 1, xloc[i]); + } + for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) + { + /* check k order basis function has k-th deriv equal to 0 */ + gsl_test_abs(gsl_matrix_get(dB, j, gsl_bspline_order(bw)), 0.0, + GSL_DBL_EPSILON, + "b-spline k=%d basis #%d derivative %d at x = %f", + gsl_bspline_order(bw), j, gsl_bspline_order(bw), + xloc[i]); + } + } + + gsl_matrix_free(dB); + gsl_bspline_deriv_free(dbw); + gsl_bspline_free(bw); + gsl_vector_free(breakpts); + } + + /* Spot check known 0th, 1st, 2nd derivative + evaluations for a particular k = 3 case. */ + { + size_t i, j; /* looping */ + const double xloc[5] = { 0.0, 5.0, 9.0, 12.0, 15.0 }; + const double eval[5][6] = + { + { 4./25., 69./100., 3./ 20. , 0. , 0. , 0. }, + { 0. , 4./21. , 143./210. , 9./70., 0. , 0. }, + { 0. , 0. , 3./ 10. , 7./10., 0. , 0. }, + { 0. , 0. , 0. , 3./4. , 1./4., 0. }, + { 0. , 0. , 0. , 1./3. , 5./9., 1./9. } + }; + const double deriv[5][6] = + { + { -4./25., 3./50., 1./ 10., 0. , 0. , 0. }, + { 0. , -2./21., 1./105., 3./35., 0. , 0. }, + { 0. , 0. , -1./5. , 1./ 5., 0. , 0. }, + { 0. , 0. , 0. , -1./ 6., 1./6. , 0. }, + { 0. , 0. , 0. , -1./ 9., 1./27., 2./27. } + }; + const double deriv2[5][6] = + { + { 2./25., -17./150., 1.0/30.0 , 0.0 , 0. , 0. }, + { 0. , 1./ 42., -11.0/210.0, 1.0/35.0, 0. , 0. }, + { 0. , 0. , 1.0/15.0 ,-11.0/90.0, 1./18. , 0. }, + { 0. , 0. , 0.0 , 1.0/54.0, -7./162., 2./81. }, + { 0. , 0. , 0.0 , 1.0/54.0, -7./162., 2./81. } + }; + + gsl_bspline_workspace *bw = gsl_bspline_alloc(3, 5); + gsl_bspline_deriv_workspace *dbw = gsl_bspline_deriv_alloc(3); + + gsl_matrix *dB = gsl_matrix_alloc(gsl_bspline_ncoeffs(bw), + gsl_bspline_order(bw) + 1); + + gsl_vector *breakpts = gsl_vector_alloc(5); + gsl_vector_set(breakpts, 0, -3.0); + gsl_vector_set(breakpts, 1, 2.0); + gsl_vector_set(breakpts, 2, 9.0); + gsl_vector_set(breakpts, 3, 12.0); + gsl_vector_set(breakpts, 4, 21.0); + gsl_bspline_knots(breakpts, bw); + + for (i = 0; i < 5; ++i) /* at each location */ + { + /* Initialize dB with poison to ensure we overwrite it */ + gsl_matrix_set_all(dB, GSL_NAN); + gsl_bspline_deriv_eval(xloc[i], gsl_bspline_order(bw), dB, bw, dbw); + + /* check basis function evaluation */ + for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) + { + gsl_test_abs(gsl_matrix_get(dB, j, 0), eval[i][j], GSL_DBL_EPSILON, + "b-spline k=%d basis #%d derivative %d at x = %f", + gsl_bspline_order(bw), j, 0, xloc[i]); + } + /* check 1st derivative evaluation */ + for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) + { + gsl_test_abs(gsl_matrix_get(dB, j, 1), deriv[i][j], GSL_DBL_EPSILON, + "b-spline k=%d basis #%d derivative %d at x = %f", + gsl_bspline_order(bw), j, 1, xloc[i]); + } + /* check 2nd derivative evaluation */ + for (j = 0; j < gsl_bspline_ncoeffs(bw); ++j) + { + gsl_test_abs(gsl_matrix_get(dB, j, 2), deriv2[i][j], GSL_DBL_EPSILON, + "b-spline k=%d basis #%d derivative %d at x = %f", + gsl_bspline_order(bw), j, 2, xloc[i]); + } + } + + gsl_matrix_free(dB); + gsl_bspline_deriv_free(dbw); + gsl_bspline_free(bw); + gsl_vector_free(breakpts); + } + + /* Check Greville abscissae functionality on a non-uniform k=1 */ + { + size_t i; /* looping */ + + /* Test parameters */ + const size_t k = 1; + const double bpoint_data[] = { 0.0, 0.2, 0.5, 0.75, 1.0 }; + const size_t nbreak = sizeof(bpoint_data)/sizeof(bpoint_data[0]); + + /* Expected results */ + const double abscissae_data[] = { 0.1, 0.35, 0.625, 0.875 }; + const size_t nabscissae = sizeof(abscissae_data)/sizeof(abscissae_data[0]); + + gsl_vector_const_view bpoints = gsl_vector_const_view_array(bpoint_data, nbreak); + gsl_bspline_workspace *w = gsl_bspline_alloc(k, nbreak); + gsl_bspline_knots((const gsl_vector *) &bpoints, w); + + gsl_test_int(nabscissae, gsl_bspline_ncoeffs(w), + "b-spline k=%d number of abscissae", k); + for (i = 0; i < nabscissae; ++i) + { + gsl_test_abs(gsl_bspline_greville_abscissa(i, w), abscissae_data[i], 2*k*GSL_DBL_EPSILON, + "b-spline k=%d Greville abscissa #%d at x = %f", k, i, abscissae_data[i]); + } + + gsl_bspline_free(w); + } + + /* Check Greville abscissae functionality on a non-uniform k=2 */ + { + size_t i; /* looping */ + + /* Test parameters */ + const size_t k = 2; + const double bpoint_data[] = { 0.0, 0.2, 0.5, 0.75, 1.0 }; + const size_t nbreak = sizeof(bpoint_data)/sizeof(bpoint_data[0]); + + /* Expected results */ + const double abscissae_data[] = { 0.0, 0.2, 0.5, 0.75, 1.0 }; + const size_t nabscissae = sizeof(abscissae_data)/sizeof(abscissae_data[0]); + + gsl_vector_const_view bpoints = gsl_vector_const_view_array(bpoint_data, nbreak); + gsl_bspline_workspace *w = gsl_bspline_alloc(k, nbreak); + gsl_bspline_knots((const gsl_vector *) &bpoints, w); + + gsl_test_int(nabscissae, gsl_bspline_ncoeffs(w), + "b-spline k=%d number of abscissae", k); + for (i = 0; i < nabscissae; ++i) + { + gsl_test_abs(gsl_bspline_greville_abscissa(i, w), abscissae_data[i], 2*k*GSL_DBL_EPSILON, + "b-spline k=%d Greville abscissa #%d at x = %f", k, i, abscissae_data[i]); + } + + gsl_bspline_free(w); + } + + /* Check Greville abscissae functionality on non-uniform k=3 */ + { + size_t i; /* looping */ + + /* Test parameters */ + const size_t k = 3; + const double bpoint_data[] = { 0.0, 0.2, 0.5, 0.75, 1.0 }; + const size_t nbreak = sizeof(bpoint_data)/sizeof(bpoint_data[0]); + + /* Expected results */ + const double abscissae_data[] = { 0.0, 1.0/10.0, 7.0/20.0, + 5.0/ 8.0, 7.0/ 8.0, 1.0 }; + const size_t nabscissae = sizeof(abscissae_data)/sizeof(abscissae_data[0]); + + gsl_vector_const_view bpoints = gsl_vector_const_view_array(bpoint_data, nbreak); + gsl_bspline_workspace *w = gsl_bspline_alloc(k, nbreak); + gsl_bspline_knots((const gsl_vector *) &bpoints, w); + + gsl_test_int(nabscissae, gsl_bspline_ncoeffs(w), + "b-spline k=%d number of abscissae", k); + for (i = 0; i < nabscissae; ++i) + { + gsl_test_abs(gsl_bspline_greville_abscissa(i, w), abscissae_data[i], 2*k*GSL_DBL_EPSILON, + "b-spline k=%d Greville abscissa #%d at x = %f", k, i, abscissae_data[i]); + } + + gsl_bspline_free(w); + } + + /* Check Greville abscissae functionality on non-uniform k=4 */ + { + size_t i; /* looping */ + + /* Test parameters */ + const size_t k = 4; + const double bpoint_data[] = { 0.0, 0.2, 0.5, 0.75, 1.0 }; + const size_t nbreak = sizeof(bpoint_data)/sizeof(bpoint_data[0]); + + /* Expected results */ + const double abscissae_data[] = { 0.0, 1.0/15.0, 7.0/30.0, 29.0/60.0, + 3.0/ 4.0, 11.0/12.0, 1.0 }; + const size_t nabscissae = sizeof(abscissae_data)/sizeof(abscissae_data[0]); + + gsl_vector_const_view bpoints = gsl_vector_const_view_array(bpoint_data, nbreak); + gsl_bspline_workspace *w = gsl_bspline_alloc(k, nbreak); + gsl_bspline_knots((const gsl_vector *) &bpoints, w); + + gsl_test_int(nabscissae, gsl_bspline_ncoeffs(w), + "b-spline k=%d number of abscissae", k); + for (i = 0; i < nabscissae; ++i) + { + gsl_test_abs(gsl_bspline_greville_abscissa(i, w), abscissae_data[i], 2*k*GSL_DBL_EPSILON, + "b-spline k=%d Greville abscissa #%d at x = %f", k, i, abscissae_data[i]); + } + + gsl_bspline_free(w); + } + + exit(gsl_test_summary()); +} diff --git a/software/gsl-1.15/build.h b/software/gsl-1.15/build.h new file mode 100644 index 000000000..0f18cc039 --- /dev/null +++ b/software/gsl-1.15/build.h @@ -0,0 +1,37 @@ +/* Compile subsequent inline functions as static functions */ + +#ifdef __GSL_BUILD_H__ +#error build.h must not be included multiple times +#endif + +#define __GSL_BUILD_H__ + +#ifdef COMPILE_INLINE_STATIC +#ifndef HIDE_INLINE_STATIC /* skip if inline functions are hidden */ + +#undef __GSL_INLINE_H__ +#define __GSL_INLINE_H__ /* first, ignore the gsl_inline.h header file */ + +#undef INLINE_DECL +#define INLINE_DECL /* disable inline in declarations */ + +#undef INLINE_FUN +#define INLINE_FUN /* disable inline in definitions */ + +#ifndef HAVE_INLINE /* enable compilation of definitions in .h files */ +#define HAVE_INLINE +#endif + +/* Compile range checking code for inline functions used in the library */ +#undef GSL_RANGE_CHECK +#define GSL_RANGE_CHECK 1 + +/* Use the global variable gsl_check_range to enable/disable range checking at + runtime */ +#undef GSL_RANGE_COND +#define GSL_RANGE_COND(x) (gsl_check_range && (x)) + +#endif +#else +#error must be called with COMPILE_INLINE_STATIC +#endif diff --git a/software/gsl-1.15/cblas/.deps/caxpy.Plo b/software/gsl-1.15/cblas/.deps/caxpy.Plo new file mode 100644 index 000000000..f820e5686 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/caxpy.Plo @@ -0,0 +1,64 @@ +caxpy.lo: caxpy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_axpy_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_axpy_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ccopy.Plo b/software/gsl-1.15/cblas/.deps/ccopy.Plo new file mode 100644 index 000000000..c43dddbed --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ccopy.Plo @@ -0,0 +1,64 @@ +ccopy.lo: ccopy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_copy_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_copy_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cdotc_sub.Plo b/software/gsl-1.15/cblas/.deps/cdotc_sub.Plo new file mode 100644 index 000000000..0f79df828 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cdotc_sub.Plo @@ -0,0 +1,64 @@ +cdotc_sub.lo: cdotc_sub.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cdotu_sub.Plo b/software/gsl-1.15/cblas/.deps/cdotu_sub.Plo new file mode 100644 index 000000000..c9e6a697a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cdotu_sub.Plo @@ -0,0 +1,64 @@ +cdotu_sub.lo: cdotu_sub.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cgbmv.Plo b/software/gsl-1.15/cblas/.deps/cgbmv.Plo new file mode 100644 index 000000000..1a5f7e38e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cgbmv.Plo @@ -0,0 +1,69 @@ +cgbmv.lo: cgbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gbmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gbmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cgemm.Plo b/software/gsl-1.15/cblas/.deps/cgemm.Plo new file mode 100644 index 000000000..197d8c369 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cgemm.Plo @@ -0,0 +1,69 @@ +cgemm.lo: cgemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_gemm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_gemm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cgemv.Plo b/software/gsl-1.15/cblas/.deps/cgemv.Plo new file mode 100644 index 000000000..eae12ffc6 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cgemv.Plo @@ -0,0 +1,69 @@ +cgemv.lo: cgemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gemv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gemv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/cgerc.Plo b/software/gsl-1.15/cblas/.deps/cgerc.Plo new file mode 100644 index 000000000..8f0a2c6ee --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cgerc.Plo @@ -0,0 +1,69 @@ +cgerc.lo: cgerc.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gerc.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gerc.h: diff --git a/software/gsl-1.15/cblas/.deps/cgeru.Plo b/software/gsl-1.15/cblas/.deps/cgeru.Plo new file mode 100644 index 000000000..a7884e08d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cgeru.Plo @@ -0,0 +1,69 @@ +cgeru.lo: cgeru.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_geru.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_geru.h: diff --git a/software/gsl-1.15/cblas/.deps/chbmv.Plo b/software/gsl-1.15/cblas/.deps/chbmv.Plo new file mode 100644 index 000000000..d73e62363 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chbmv.Plo @@ -0,0 +1,69 @@ +chbmv.lo: chbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hbmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hbmv.h: diff --git a/software/gsl-1.15/cblas/.deps/chemm.Plo b/software/gsl-1.15/cblas/.deps/chemm.Plo new file mode 100644 index 000000000..b7aedd49e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chemm.Plo @@ -0,0 +1,69 @@ +chemm.lo: chemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_hemm.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_hemm.h: diff --git a/software/gsl-1.15/cblas/.deps/chemv.Plo b/software/gsl-1.15/cblas/.deps/chemv.Plo new file mode 100644 index 000000000..34d559517 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chemv.Plo @@ -0,0 +1,69 @@ +chemv.lo: chemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hemv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hemv.h: diff --git a/software/gsl-1.15/cblas/.deps/cher.Plo b/software/gsl-1.15/cblas/.deps/cher.Plo new file mode 100644 index 000000000..a92eea9c6 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cher.Plo @@ -0,0 +1,69 @@ +cher.lo: cher.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_her.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_her.h: diff --git a/software/gsl-1.15/cblas/.deps/cher2.Plo b/software/gsl-1.15/cblas/.deps/cher2.Plo new file mode 100644 index 000000000..6db419f75 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cher2.Plo @@ -0,0 +1,69 @@ +cher2.lo: cher2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_her2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_her2.h: diff --git a/software/gsl-1.15/cblas/.deps/cher2k.Plo b/software/gsl-1.15/cblas/.deps/cher2k.Plo new file mode 100644 index 000000000..45765125e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cher2k.Plo @@ -0,0 +1,69 @@ +cher2k.lo: cher2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_her2k.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_her2k.h: diff --git a/software/gsl-1.15/cblas/.deps/cherk.Plo b/software/gsl-1.15/cblas/.deps/cherk.Plo new file mode 100644 index 000000000..6f4cf3d55 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cherk.Plo @@ -0,0 +1,69 @@ +cherk.lo: cherk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_herk.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_herk.h: diff --git a/software/gsl-1.15/cblas/.deps/chpmv.Plo b/software/gsl-1.15/cblas/.deps/chpmv.Plo new file mode 100644 index 000000000..b759b3faa --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chpmv.Plo @@ -0,0 +1,69 @@ +chpmv.lo: chpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpmv.h: diff --git a/software/gsl-1.15/cblas/.deps/chpr.Plo b/software/gsl-1.15/cblas/.deps/chpr.Plo new file mode 100644 index 000000000..66bfd858d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chpr.Plo @@ -0,0 +1,69 @@ +chpr.lo: chpr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpr.h: diff --git a/software/gsl-1.15/cblas/.deps/chpr2.Plo b/software/gsl-1.15/cblas/.deps/chpr2.Plo new file mode 100644 index 000000000..236d2575c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/chpr2.Plo @@ -0,0 +1,69 @@ +chpr2.lo: chpr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpr2.h: diff --git a/software/gsl-1.15/cblas/.deps/cscal.Plo b/software/gsl-1.15/cblas/.deps/cscal.Plo new file mode 100644 index 000000000..85e35edb5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cscal.Plo @@ -0,0 +1,64 @@ +cscal.lo: cscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_c.h: diff --git a/software/gsl-1.15/cblas/.deps/csscal.Plo b/software/gsl-1.15/cblas/.deps/csscal.Plo new file mode 100644 index 000000000..f11c06971 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/csscal.Plo @@ -0,0 +1,64 @@ +csscal.lo: csscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_c_s.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_c_s.h: diff --git a/software/gsl-1.15/cblas/.deps/cswap.Plo b/software/gsl-1.15/cblas/.deps/cswap.Plo new file mode 100644 index 000000000..8d9fd97fc --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/cswap.Plo @@ -0,0 +1,64 @@ +cswap.lo: cswap.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_swap_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_swap_c.h: diff --git a/software/gsl-1.15/cblas/.deps/csymm.Plo b/software/gsl-1.15/cblas/.deps/csymm.Plo new file mode 100644 index 000000000..c2c6a8063 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/csymm.Plo @@ -0,0 +1,69 @@ +csymm.lo: csymm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_symm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_symm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/csyr2k.Plo b/software/gsl-1.15/cblas/.deps/csyr2k.Plo new file mode 100644 index 000000000..f8cd7ec84 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/csyr2k.Plo @@ -0,0 +1,69 @@ +csyr2k.lo: csyr2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syr2k_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syr2k_c.h: diff --git a/software/gsl-1.15/cblas/.deps/csyrk.Plo b/software/gsl-1.15/cblas/.deps/csyrk.Plo new file mode 100644 index 000000000..82c11897c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/csyrk.Plo @@ -0,0 +1,69 @@ +csyrk.lo: csyrk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syrk_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syrk_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctbmv.Plo b/software/gsl-1.15/cblas/.deps/ctbmv.Plo new file mode 100644 index 000000000..e1b517486 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctbmv.Plo @@ -0,0 +1,69 @@ +ctbmv.lo: ctbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctbsv.Plo b/software/gsl-1.15/cblas/.deps/ctbsv.Plo new file mode 100644 index 000000000..f6a445678 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctbsv.Plo @@ -0,0 +1,71 @@ +ctbsv.lo: ctbsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_tbsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_tbsv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctpmv.Plo b/software/gsl-1.15/cblas/.deps/ctpmv.Plo new file mode 100644 index 000000000..a856fdfa7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctpmv.Plo @@ -0,0 +1,69 @@ +ctpmv.lo: ctpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctpsv.Plo b/software/gsl-1.15/cblas/.deps/ctpsv.Plo new file mode 100644 index 000000000..a2efd7977 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctpsv.Plo @@ -0,0 +1,71 @@ +ctpsv.lo: ctpsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_tpsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_tpsv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctrmm.Plo b/software/gsl-1.15/cblas/.deps/ctrmm.Plo new file mode 100644 index 000000000..1d78ad9e8 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctrmm.Plo @@ -0,0 +1,69 @@ +ctrmm.lo: ctrmm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trmm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trmm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctrmv.Plo b/software/gsl-1.15/cblas/.deps/ctrmv.Plo new file mode 100644 index 000000000..ddf639e94 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctrmv.Plo @@ -0,0 +1,69 @@ +ctrmv.lo: ctrmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctrsm.Plo b/software/gsl-1.15/cblas/.deps/ctrsm.Plo new file mode 100644 index 000000000..094d4d9ba --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctrsm.Plo @@ -0,0 +1,71 @@ +ctrsm.lo: ctrsm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h hypot.c source_trsm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +hypot.c: + +source_trsm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ctrsv.Plo b/software/gsl-1.15/cblas/.deps/ctrsv.Plo new file mode 100644 index 000000000..518095170 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ctrsv.Plo @@ -0,0 +1,71 @@ +ctrsv.lo: ctrsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_trsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_trsv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/dasum.Plo b/software/gsl-1.15/cblas/.deps/dasum.Plo new file mode 100644 index 000000000..5c50daeee --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dasum.Plo @@ -0,0 +1,64 @@ +dasum.lo: dasum.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_asum_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_asum_r.h: diff --git a/software/gsl-1.15/cblas/.deps/daxpy.Plo b/software/gsl-1.15/cblas/.deps/daxpy.Plo new file mode 100644 index 000000000..356085cd1 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/daxpy.Plo @@ -0,0 +1,64 @@ +daxpy.lo: daxpy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_axpy_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_axpy_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dcopy.Plo b/software/gsl-1.15/cblas/.deps/dcopy.Plo new file mode 100644 index 000000000..29c4edc25 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dcopy.Plo @@ -0,0 +1,64 @@ +dcopy.lo: dcopy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_copy_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_copy_r.h: diff --git a/software/gsl-1.15/cblas/.deps/ddot.Plo b/software/gsl-1.15/cblas/.deps/ddot.Plo new file mode 100644 index 000000000..419167a91 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ddot.Plo @@ -0,0 +1,64 @@ +ddot.lo: ddot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dgbmv.Plo b/software/gsl-1.15/cblas/.deps/dgbmv.Plo new file mode 100644 index 000000000..34b0f766b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dgbmv.Plo @@ -0,0 +1,69 @@ +dgbmv.lo: dgbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gbmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gbmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dgemm.Plo b/software/gsl-1.15/cblas/.deps/dgemm.Plo new file mode 100644 index 000000000..d9014e34d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dgemm.Plo @@ -0,0 +1,69 @@ +dgemm.lo: dgemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_gemm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_gemm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dgemv.Plo b/software/gsl-1.15/cblas/.deps/dgemv.Plo new file mode 100644 index 000000000..b7315bd71 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dgemv.Plo @@ -0,0 +1,69 @@ +dgemv.lo: dgemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gemv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gemv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dger.Plo b/software/gsl-1.15/cblas/.deps/dger.Plo new file mode 100644 index 000000000..6dcbf99b7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dger.Plo @@ -0,0 +1,69 @@ +dger.lo: dger.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_ger.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_ger.h: diff --git a/software/gsl-1.15/cblas/.deps/dnrm2.Plo b/software/gsl-1.15/cblas/.deps/dnrm2.Plo new file mode 100644 index 000000000..f20ceb78a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dnrm2.Plo @@ -0,0 +1,64 @@ +dnrm2.lo: dnrm2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_nrm2_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_nrm2_r.h: diff --git a/software/gsl-1.15/cblas/.deps/drot.Plo b/software/gsl-1.15/cblas/.deps/drot.Plo new file mode 100644 index 000000000..bca915607 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/drot.Plo @@ -0,0 +1,64 @@ +drot.lo: drot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rot.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rot.h: diff --git a/software/gsl-1.15/cblas/.deps/drotg.Plo b/software/gsl-1.15/cblas/.deps/drotg.Plo new file mode 100644 index 000000000..05e2e364f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/drotg.Plo @@ -0,0 +1,64 @@ +drotg.lo: drotg.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotg.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotg.h: diff --git a/software/gsl-1.15/cblas/.deps/drotm.Plo b/software/gsl-1.15/cblas/.deps/drotm.Plo new file mode 100644 index 000000000..3b6ec4d01 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/drotm.Plo @@ -0,0 +1,64 @@ +drotm.lo: drotm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotm.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotm.h: diff --git a/software/gsl-1.15/cblas/.deps/drotmg.Plo b/software/gsl-1.15/cblas/.deps/drotmg.Plo new file mode 100644 index 000000000..36d8b5a71 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/drotmg.Plo @@ -0,0 +1,64 @@ +drotmg.lo: drotmg.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotmg.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotmg.h: diff --git a/software/gsl-1.15/cblas/.deps/dsbmv.Plo b/software/gsl-1.15/cblas/.deps/dsbmv.Plo new file mode 100644 index 000000000..af1291251 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsbmv.Plo @@ -0,0 +1,69 @@ +dsbmv.lo: dsbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_sbmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_sbmv.h: diff --git a/software/gsl-1.15/cblas/.deps/dscal.Plo b/software/gsl-1.15/cblas/.deps/dscal.Plo new file mode 100644 index 000000000..a187d20ea --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dscal.Plo @@ -0,0 +1,64 @@ +dscal.lo: dscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dsdot.Plo b/software/gsl-1.15/cblas/.deps/dsdot.Plo new file mode 100644 index 000000000..dfb5d5847 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsdot.Plo @@ -0,0 +1,64 @@ +dsdot.lo: dsdot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dspmv.Plo b/software/gsl-1.15/cblas/.deps/dspmv.Plo new file mode 100644 index 000000000..38b933891 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dspmv.Plo @@ -0,0 +1,69 @@ +dspmv.lo: dspmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spmv.h: diff --git a/software/gsl-1.15/cblas/.deps/dspr.Plo b/software/gsl-1.15/cblas/.deps/dspr.Plo new file mode 100644 index 000000000..64d579a11 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dspr.Plo @@ -0,0 +1,69 @@ +dspr.lo: dspr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spr.h: diff --git a/software/gsl-1.15/cblas/.deps/dspr2.Plo b/software/gsl-1.15/cblas/.deps/dspr2.Plo new file mode 100644 index 000000000..5ec575c7e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dspr2.Plo @@ -0,0 +1,69 @@ +dspr2.lo: dspr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spr2.h: diff --git a/software/gsl-1.15/cblas/.deps/dswap.Plo b/software/gsl-1.15/cblas/.deps/dswap.Plo new file mode 100644 index 000000000..96411a76e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dswap.Plo @@ -0,0 +1,64 @@ +dswap.lo: dswap.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_swap_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_swap_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dsymm.Plo b/software/gsl-1.15/cblas/.deps/dsymm.Plo new file mode 100644 index 000000000..1dace2963 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsymm.Plo @@ -0,0 +1,69 @@ +dsymm.lo: dsymm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_symm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_symm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dsymv.Plo b/software/gsl-1.15/cblas/.deps/dsymv.Plo new file mode 100644 index 000000000..3528013da --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsymv.Plo @@ -0,0 +1,69 @@ +dsymv.lo: dsymv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_symv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_symv.h: diff --git a/software/gsl-1.15/cblas/.deps/dsyr.Plo b/software/gsl-1.15/cblas/.deps/dsyr.Plo new file mode 100644 index 000000000..dd4edf7f5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsyr.Plo @@ -0,0 +1,69 @@ +dsyr.lo: dsyr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_syr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_syr.h: diff --git a/software/gsl-1.15/cblas/.deps/dsyr2.Plo b/software/gsl-1.15/cblas/.deps/dsyr2.Plo new file mode 100644 index 000000000..6710fb741 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsyr2.Plo @@ -0,0 +1,69 @@ +dsyr2.lo: dsyr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_syr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_syr2.h: diff --git a/software/gsl-1.15/cblas/.deps/dsyr2k.Plo b/software/gsl-1.15/cblas/.deps/dsyr2k.Plo new file mode 100644 index 000000000..20e8cea34 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsyr2k.Plo @@ -0,0 +1,69 @@ +dsyr2k.lo: dsyr2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syr2k_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syr2k_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dsyrk.Plo b/software/gsl-1.15/cblas/.deps/dsyrk.Plo new file mode 100644 index 000000000..2bc92e92d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dsyrk.Plo @@ -0,0 +1,69 @@ +dsyrk.lo: dsyrk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syrk_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syrk_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtbmv.Plo b/software/gsl-1.15/cblas/.deps/dtbmv.Plo new file mode 100644 index 000000000..852a691c3 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtbmv.Plo @@ -0,0 +1,69 @@ +dtbmv.lo: dtbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtbsv.Plo b/software/gsl-1.15/cblas/.deps/dtbsv.Plo new file mode 100644 index 000000000..aa61c8e00 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtbsv.Plo @@ -0,0 +1,69 @@ +dtbsv.lo: dtbsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtpmv.Plo b/software/gsl-1.15/cblas/.deps/dtpmv.Plo new file mode 100644 index 000000000..7d718bb8f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtpmv.Plo @@ -0,0 +1,69 @@ +dtpmv.lo: dtpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtpsv.Plo b/software/gsl-1.15/cblas/.deps/dtpsv.Plo new file mode 100644 index 000000000..06dd6b58e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtpsv.Plo @@ -0,0 +1,69 @@ +dtpsv.lo: dtpsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtrmm.Plo b/software/gsl-1.15/cblas/.deps/dtrmm.Plo new file mode 100644 index 000000000..abe977d21 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtrmm.Plo @@ -0,0 +1,69 @@ +dtrmm.lo: dtrmm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trmm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trmm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtrmv.Plo b/software/gsl-1.15/cblas/.deps/dtrmv.Plo new file mode 100644 index 000000000..948018af0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtrmv.Plo @@ -0,0 +1,69 @@ +dtrmv.lo: dtrmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtrsm.Plo b/software/gsl-1.15/cblas/.deps/dtrsm.Plo new file mode 100644 index 000000000..23882a2b9 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtrsm.Plo @@ -0,0 +1,69 @@ +dtrsm.lo: dtrsm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trsm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trsm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dtrsv.Plo b/software/gsl-1.15/cblas/.deps/dtrsv.Plo new file mode 100644 index 000000000..0fc8b0562 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dtrsv.Plo @@ -0,0 +1,69 @@ +dtrsv.lo: dtrsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/dzasum.Plo b/software/gsl-1.15/cblas/.deps/dzasum.Plo new file mode 100644 index 000000000..5055f129b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dzasum.Plo @@ -0,0 +1,64 @@ +dzasum.lo: dzasum.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_asum_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_asum_c.h: diff --git a/software/gsl-1.15/cblas/.deps/dznrm2.Plo b/software/gsl-1.15/cblas/.deps/dznrm2.Plo new file mode 100644 index 000000000..c460d45cd --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/dznrm2.Plo @@ -0,0 +1,64 @@ +dznrm2.lo: dznrm2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_nrm2_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_nrm2_c.h: diff --git a/software/gsl-1.15/cblas/.deps/icamax.Plo b/software/gsl-1.15/cblas/.deps/icamax.Plo new file mode 100644 index 000000000..b5c4d15dd --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/icamax.Plo @@ -0,0 +1,64 @@ +icamax.lo: icamax.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_iamax_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_iamax_c.h: diff --git a/software/gsl-1.15/cblas/.deps/idamax.Plo b/software/gsl-1.15/cblas/.deps/idamax.Plo new file mode 100644 index 000000000..65743d5f9 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/idamax.Plo @@ -0,0 +1,64 @@ +idamax.lo: idamax.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_iamax_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_iamax_r.h: diff --git a/software/gsl-1.15/cblas/.deps/isamax.Plo b/software/gsl-1.15/cblas/.deps/isamax.Plo new file mode 100644 index 000000000..b14b5ade3 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/isamax.Plo @@ -0,0 +1,64 @@ +isamax.lo: isamax.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_iamax_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_iamax_r.h: diff --git a/software/gsl-1.15/cblas/.deps/izamax.Plo b/software/gsl-1.15/cblas/.deps/izamax.Plo new file mode 100644 index 000000000..22e9f4866 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/izamax.Plo @@ -0,0 +1,64 @@ +izamax.lo: izamax.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_iamax_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_iamax_c.h: diff --git a/software/gsl-1.15/cblas/.deps/sasum.Plo b/software/gsl-1.15/cblas/.deps/sasum.Plo new file mode 100644 index 000000000..14620361f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sasum.Plo @@ -0,0 +1,64 @@ +sasum.lo: sasum.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_asum_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_asum_r.h: diff --git a/software/gsl-1.15/cblas/.deps/saxpy.Plo b/software/gsl-1.15/cblas/.deps/saxpy.Plo new file mode 100644 index 000000000..33ea80e03 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/saxpy.Plo @@ -0,0 +1,64 @@ +saxpy.lo: saxpy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_axpy_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_axpy_r.h: diff --git a/software/gsl-1.15/cblas/.deps/scasum.Plo b/software/gsl-1.15/cblas/.deps/scasum.Plo new file mode 100644 index 000000000..f6a49ad8e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/scasum.Plo @@ -0,0 +1,64 @@ +scasum.lo: scasum.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_asum_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_asum_c.h: diff --git a/software/gsl-1.15/cblas/.deps/scnrm2.Plo b/software/gsl-1.15/cblas/.deps/scnrm2.Plo new file mode 100644 index 000000000..d655da558 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/scnrm2.Plo @@ -0,0 +1,64 @@ +scnrm2.lo: scnrm2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_nrm2_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_nrm2_c.h: diff --git a/software/gsl-1.15/cblas/.deps/scopy.Plo b/software/gsl-1.15/cblas/.deps/scopy.Plo new file mode 100644 index 000000000..b4bdb1f8f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/scopy.Plo @@ -0,0 +1,64 @@ +scopy.lo: scopy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_copy_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_copy_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sdot.Plo b/software/gsl-1.15/cblas/.deps/sdot.Plo new file mode 100644 index 000000000..a5b50ca61 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sdot.Plo @@ -0,0 +1,64 @@ +sdot.lo: sdot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sdsdot.Plo b/software/gsl-1.15/cblas/.deps/sdsdot.Plo new file mode 100644 index 000000000..aa5ee074c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sdsdot.Plo @@ -0,0 +1,64 @@ +sdsdot.lo: sdsdot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sgbmv.Plo b/software/gsl-1.15/cblas/.deps/sgbmv.Plo new file mode 100644 index 000000000..02844fa4d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sgbmv.Plo @@ -0,0 +1,69 @@ +sgbmv.lo: sgbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gbmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gbmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sgemm.Plo b/software/gsl-1.15/cblas/.deps/sgemm.Plo new file mode 100644 index 000000000..43723c39a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sgemm.Plo @@ -0,0 +1,69 @@ +sgemm.lo: sgemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_gemm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_gemm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sgemv.Plo b/software/gsl-1.15/cblas/.deps/sgemv.Plo new file mode 100644 index 000000000..5df70df5c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sgemv.Plo @@ -0,0 +1,69 @@ +sgemv.lo: sgemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gemv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gemv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sger.Plo b/software/gsl-1.15/cblas/.deps/sger.Plo new file mode 100644 index 000000000..b7c5a916b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sger.Plo @@ -0,0 +1,69 @@ +sger.lo: sger.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_ger.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_ger.h: diff --git a/software/gsl-1.15/cblas/.deps/snrm2.Plo b/software/gsl-1.15/cblas/.deps/snrm2.Plo new file mode 100644 index 000000000..720beba6d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/snrm2.Plo @@ -0,0 +1,64 @@ +snrm2.lo: snrm2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_nrm2_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_nrm2_r.h: diff --git a/software/gsl-1.15/cblas/.deps/srot.Plo b/software/gsl-1.15/cblas/.deps/srot.Plo new file mode 100644 index 000000000..a3528f1ad --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/srot.Plo @@ -0,0 +1,64 @@ +srot.lo: srot.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rot.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rot.h: diff --git a/software/gsl-1.15/cblas/.deps/srotg.Plo b/software/gsl-1.15/cblas/.deps/srotg.Plo new file mode 100644 index 000000000..5cb1b89e1 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/srotg.Plo @@ -0,0 +1,64 @@ +srotg.lo: srotg.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotg.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotg.h: diff --git a/software/gsl-1.15/cblas/.deps/srotm.Plo b/software/gsl-1.15/cblas/.deps/srotm.Plo new file mode 100644 index 000000000..3e0cfe0e8 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/srotm.Plo @@ -0,0 +1,64 @@ +srotm.lo: srotm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotm.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotm.h: diff --git a/software/gsl-1.15/cblas/.deps/srotmg.Plo b/software/gsl-1.15/cblas/.deps/srotmg.Plo new file mode 100644 index 000000000..91738fb93 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/srotmg.Plo @@ -0,0 +1,64 @@ +srotmg.lo: srotmg.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_rotmg.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_rotmg.h: diff --git a/software/gsl-1.15/cblas/.deps/ssbmv.Plo b/software/gsl-1.15/cblas/.deps/ssbmv.Plo new file mode 100644 index 000000000..2dbc6f4c0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssbmv.Plo @@ -0,0 +1,69 @@ +ssbmv.lo: ssbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_sbmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_sbmv.h: diff --git a/software/gsl-1.15/cblas/.deps/sscal.Plo b/software/gsl-1.15/cblas/.deps/sscal.Plo new file mode 100644 index 000000000..76729bfbd --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sscal.Plo @@ -0,0 +1,64 @@ +sscal.lo: sscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_r.h: diff --git a/software/gsl-1.15/cblas/.deps/sspmv.Plo b/software/gsl-1.15/cblas/.deps/sspmv.Plo new file mode 100644 index 000000000..835ed3fd7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sspmv.Plo @@ -0,0 +1,69 @@ +sspmv.lo: sspmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spmv.h: diff --git a/software/gsl-1.15/cblas/.deps/sspr.Plo b/software/gsl-1.15/cblas/.deps/sspr.Plo new file mode 100644 index 000000000..fef524626 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sspr.Plo @@ -0,0 +1,69 @@ +sspr.lo: sspr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spr.h: diff --git a/software/gsl-1.15/cblas/.deps/sspr2.Plo b/software/gsl-1.15/cblas/.deps/sspr2.Plo new file mode 100644 index 000000000..a32109a44 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sspr2.Plo @@ -0,0 +1,69 @@ +sspr2.lo: sspr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_spr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_spr2.h: diff --git a/software/gsl-1.15/cblas/.deps/sswap.Plo b/software/gsl-1.15/cblas/.deps/sswap.Plo new file mode 100644 index 000000000..627fc339b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/sswap.Plo @@ -0,0 +1,64 @@ +sswap.lo: sswap.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_swap_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_swap_r.h: diff --git a/software/gsl-1.15/cblas/.deps/ssymm.Plo b/software/gsl-1.15/cblas/.deps/ssymm.Plo new file mode 100644 index 000000000..a41d4eee7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssymm.Plo @@ -0,0 +1,69 @@ +ssymm.lo: ssymm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_symm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_symm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/ssymv.Plo b/software/gsl-1.15/cblas/.deps/ssymv.Plo new file mode 100644 index 000000000..be36ad129 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssymv.Plo @@ -0,0 +1,69 @@ +ssymv.lo: ssymv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_symv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_symv.h: diff --git a/software/gsl-1.15/cblas/.deps/ssyr.Plo b/software/gsl-1.15/cblas/.deps/ssyr.Plo new file mode 100644 index 000000000..f9d205b9b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssyr.Plo @@ -0,0 +1,69 @@ +ssyr.lo: ssyr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_syr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_syr.h: diff --git a/software/gsl-1.15/cblas/.deps/ssyr2.Plo b/software/gsl-1.15/cblas/.deps/ssyr2.Plo new file mode 100644 index 000000000..addd4ea9d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssyr2.Plo @@ -0,0 +1,69 @@ +ssyr2.lo: ssyr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_syr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_syr2.h: diff --git a/software/gsl-1.15/cblas/.deps/ssyr2k.Plo b/software/gsl-1.15/cblas/.deps/ssyr2k.Plo new file mode 100644 index 000000000..ac6476633 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssyr2k.Plo @@ -0,0 +1,69 @@ +ssyr2k.lo: ssyr2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syr2k_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syr2k_r.h: diff --git a/software/gsl-1.15/cblas/.deps/ssyrk.Plo b/software/gsl-1.15/cblas/.deps/ssyrk.Plo new file mode 100644 index 000000000..0d5dce7f4 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ssyrk.Plo @@ -0,0 +1,69 @@ +ssyrk.lo: ssyrk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syrk_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syrk_r.h: diff --git a/software/gsl-1.15/cblas/.deps/stbmv.Plo b/software/gsl-1.15/cblas/.deps/stbmv.Plo new file mode 100644 index 000000000..18c088fa4 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/stbmv.Plo @@ -0,0 +1,69 @@ +stbmv.lo: stbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/stbsv.Plo b/software/gsl-1.15/cblas/.deps/stbsv.Plo new file mode 100644 index 000000000..e0eb9b48d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/stbsv.Plo @@ -0,0 +1,69 @@ +stbsv.lo: stbsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/stpmv.Plo b/software/gsl-1.15/cblas/.deps/stpmv.Plo new file mode 100644 index 000000000..5ccd35887 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/stpmv.Plo @@ -0,0 +1,69 @@ +stpmv.lo: stpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/stpsv.Plo b/software/gsl-1.15/cblas/.deps/stpsv.Plo new file mode 100644 index 000000000..4f122b391 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/stpsv.Plo @@ -0,0 +1,69 @@ +stpsv.lo: stpsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/strmm.Plo b/software/gsl-1.15/cblas/.deps/strmm.Plo new file mode 100644 index 000000000..4b209c9a7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/strmm.Plo @@ -0,0 +1,69 @@ +strmm.lo: strmm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trmm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trmm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/strmv.Plo b/software/gsl-1.15/cblas/.deps/strmv.Plo new file mode 100644 index 000000000..66d6de07e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/strmv.Plo @@ -0,0 +1,69 @@ +strmv.lo: strmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trmv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trmv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/strsm.Plo b/software/gsl-1.15/cblas/.deps/strsm.Plo new file mode 100644 index 000000000..dc4aefa92 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/strsm.Plo @@ -0,0 +1,69 @@ +strsm.lo: strsm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trsm_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trsm_r.h: diff --git a/software/gsl-1.15/cblas/.deps/strsv.Plo b/software/gsl-1.15/cblas/.deps/strsv.Plo new file mode 100644 index 000000000..7105dd159 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/strsv.Plo @@ -0,0 +1,69 @@ +strsv.lo: strsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trsv_r.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trsv_r.h: diff --git a/software/gsl-1.15/cblas/.deps/test.Po b/software/gsl-1.15/cblas/.deps/test.Po new file mode 100644 index 000000000..775d3b882 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test.Po @@ -0,0 +1,136 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h tests.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: + +tests.c: diff --git a/software/gsl-1.15/cblas/.deps/test_amax.Po b/software/gsl-1.15/cblas/.deps/test_amax.Po new file mode 100644 index 000000000..222ce34ab --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_amax.Po @@ -0,0 +1,84 @@ +test_amax.o: test_amax.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_asum.Po b/software/gsl-1.15/cblas/.deps/test_asum.Po new file mode 100644 index 000000000..93423a818 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_asum.Po @@ -0,0 +1,84 @@ +test_asum.o: test_asum.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_axpy.Po b/software/gsl-1.15/cblas/.deps/test_axpy.Po new file mode 100644 index 000000000..de0de204b --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_axpy.Po @@ -0,0 +1,84 @@ +test_axpy.o: test_axpy.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_copy.Po b/software/gsl-1.15/cblas/.deps/test_copy.Po new file mode 100644 index 000000000..7db3d0e7a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_copy.Po @@ -0,0 +1,84 @@ +test_copy.o: test_copy.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_dot.Po b/software/gsl-1.15/cblas/.deps/test_dot.Po new file mode 100644 index 000000000..bd47760d0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_dot.Po @@ -0,0 +1,84 @@ +test_dot.o: test_dot.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_gbmv.Po b/software/gsl-1.15/cblas/.deps/test_gbmv.Po new file mode 100644 index 000000000..220871fc9 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_gbmv.Po @@ -0,0 +1,84 @@ +test_gbmv.o: test_gbmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_gemm.Po b/software/gsl-1.15/cblas/.deps/test_gemm.Po new file mode 100644 index 000000000..751bfc47f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_gemm.Po @@ -0,0 +1,84 @@ +test_gemm.o: test_gemm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_gemv.Po b/software/gsl-1.15/cblas/.deps/test_gemv.Po new file mode 100644 index 000000000..99446a027 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_gemv.Po @@ -0,0 +1,84 @@ +test_gemv.o: test_gemv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_ger.Po b/software/gsl-1.15/cblas/.deps/test_ger.Po new file mode 100644 index 000000000..b41efcf98 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_ger.Po @@ -0,0 +1,84 @@ +test_ger.o: test_ger.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hbmv.Po b/software/gsl-1.15/cblas/.deps/test_hbmv.Po new file mode 100644 index 000000000..2c3e9ab7a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hbmv.Po @@ -0,0 +1,84 @@ +test_hbmv.o: test_hbmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hemm.Po b/software/gsl-1.15/cblas/.deps/test_hemm.Po new file mode 100644 index 000000000..5f6f21d27 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hemm.Po @@ -0,0 +1,84 @@ +test_hemm.o: test_hemm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hemv.Po b/software/gsl-1.15/cblas/.deps/test_hemv.Po new file mode 100644 index 000000000..c493c833a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hemv.Po @@ -0,0 +1,84 @@ +test_hemv.o: test_hemv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_her.Po b/software/gsl-1.15/cblas/.deps/test_her.Po new file mode 100644 index 000000000..e6327f400 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_her.Po @@ -0,0 +1,84 @@ +test_her.o: test_her.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_her2.Po b/software/gsl-1.15/cblas/.deps/test_her2.Po new file mode 100644 index 000000000..750669da6 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_her2.Po @@ -0,0 +1,84 @@ +test_her2.o: test_her2.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_her2k.Po b/software/gsl-1.15/cblas/.deps/test_her2k.Po new file mode 100644 index 000000000..aecb56d91 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_her2k.Po @@ -0,0 +1,84 @@ +test_her2k.o: test_her2k.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_herk.Po b/software/gsl-1.15/cblas/.deps/test_herk.Po new file mode 100644 index 000000000..cb938a0ba --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_herk.Po @@ -0,0 +1,84 @@ +test_herk.o: test_herk.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hpmv.Po b/software/gsl-1.15/cblas/.deps/test_hpmv.Po new file mode 100644 index 000000000..762c506b0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hpmv.Po @@ -0,0 +1,84 @@ +test_hpmv.o: test_hpmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hpr.Po b/software/gsl-1.15/cblas/.deps/test_hpr.Po new file mode 100644 index 000000000..95074b844 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hpr.Po @@ -0,0 +1,84 @@ +test_hpr.o: test_hpr.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_hpr2.Po b/software/gsl-1.15/cblas/.deps/test_hpr2.Po new file mode 100644 index 000000000..dda2e3168 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_hpr2.Po @@ -0,0 +1,84 @@ +test_hpr2.o: test_hpr2.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_nrm2.Po b/software/gsl-1.15/cblas/.deps/test_nrm2.Po new file mode 100644 index 000000000..619085973 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_nrm2.Po @@ -0,0 +1,84 @@ +test_nrm2.o: test_nrm2.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_rot.Po b/software/gsl-1.15/cblas/.deps/test_rot.Po new file mode 100644 index 000000000..d3431fa3c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_rot.Po @@ -0,0 +1,84 @@ +test_rot.o: test_rot.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_rotg.Po b/software/gsl-1.15/cblas/.deps/test_rotg.Po new file mode 100644 index 000000000..04f82cdad --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_rotg.Po @@ -0,0 +1,84 @@ +test_rotg.o: test_rotg.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_rotm.Po b/software/gsl-1.15/cblas/.deps/test_rotm.Po new file mode 100644 index 000000000..94010db7a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_rotm.Po @@ -0,0 +1,84 @@ +test_rotm.o: test_rotm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_rotmg.Po b/software/gsl-1.15/cblas/.deps/test_rotmg.Po new file mode 100644 index 000000000..6efd49033 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_rotmg.Po @@ -0,0 +1,84 @@ +test_rotmg.o: test_rotmg.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_sbmv.Po b/software/gsl-1.15/cblas/.deps/test_sbmv.Po new file mode 100644 index 000000000..8a26952fe --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_sbmv.Po @@ -0,0 +1,84 @@ +test_sbmv.o: test_sbmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_scal.Po b/software/gsl-1.15/cblas/.deps/test_scal.Po new file mode 100644 index 000000000..5d8148dcf --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_scal.Po @@ -0,0 +1,84 @@ +test_scal.o: test_scal.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_spmv.Po b/software/gsl-1.15/cblas/.deps/test_spmv.Po new file mode 100644 index 000000000..a245eadf5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_spmv.Po @@ -0,0 +1,84 @@ +test_spmv.o: test_spmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_spr.Po b/software/gsl-1.15/cblas/.deps/test_spr.Po new file mode 100644 index 000000000..a23dd5cf0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_spr.Po @@ -0,0 +1,84 @@ +test_spr.o: test_spr.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_spr2.Po b/software/gsl-1.15/cblas/.deps/test_spr2.Po new file mode 100644 index 000000000..630f0ca68 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_spr2.Po @@ -0,0 +1,84 @@ +test_spr2.o: test_spr2.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_swap.Po b/software/gsl-1.15/cblas/.deps/test_swap.Po new file mode 100644 index 000000000..b2a2a489d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_swap.Po @@ -0,0 +1,84 @@ +test_swap.o: test_swap.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_symm.Po b/software/gsl-1.15/cblas/.deps/test_symm.Po new file mode 100644 index 000000000..ac7279ce1 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_symm.Po @@ -0,0 +1,84 @@ +test_symm.o: test_symm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_symv.Po b/software/gsl-1.15/cblas/.deps/test_symv.Po new file mode 100644 index 000000000..a2ebf6982 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_symv.Po @@ -0,0 +1,84 @@ +test_symv.o: test_symv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_syr.Po b/software/gsl-1.15/cblas/.deps/test_syr.Po new file mode 100644 index 000000000..fc9faf5b2 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_syr.Po @@ -0,0 +1,84 @@ +test_syr.o: test_syr.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_syr2.Po b/software/gsl-1.15/cblas/.deps/test_syr2.Po new file mode 100644 index 000000000..806e1968a --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_syr2.Po @@ -0,0 +1,84 @@ +test_syr2.o: test_syr2.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_syr2k.Po b/software/gsl-1.15/cblas/.deps/test_syr2k.Po new file mode 100644 index 000000000..efa04cef8 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_syr2k.Po @@ -0,0 +1,84 @@ +test_syr2k.o: test_syr2k.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_syrk.Po b/software/gsl-1.15/cblas/.deps/test_syrk.Po new file mode 100644 index 000000000..775437ad0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_syrk.Po @@ -0,0 +1,84 @@ +test_syrk.o: test_syrk.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_tbmv.Po b/software/gsl-1.15/cblas/.deps/test_tbmv.Po new file mode 100644 index 000000000..5e863bf11 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_tbmv.Po @@ -0,0 +1,84 @@ +test_tbmv.o: test_tbmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_tbsv.Po b/software/gsl-1.15/cblas/.deps/test_tbsv.Po new file mode 100644 index 000000000..16885b1da --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_tbsv.Po @@ -0,0 +1,84 @@ +test_tbsv.o: test_tbsv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_tpmv.Po b/software/gsl-1.15/cblas/.deps/test_tpmv.Po new file mode 100644 index 000000000..8badaa788 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_tpmv.Po @@ -0,0 +1,84 @@ +test_tpmv.o: test_tpmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_tpsv.Po b/software/gsl-1.15/cblas/.deps/test_tpsv.Po new file mode 100644 index 000000000..021c4f7ec --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_tpsv.Po @@ -0,0 +1,84 @@ +test_tpsv.o: test_tpsv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_trmm.Po b/software/gsl-1.15/cblas/.deps/test_trmm.Po new file mode 100644 index 000000000..27094e0e3 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_trmm.Po @@ -0,0 +1,84 @@ +test_trmm.o: test_trmm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_trmv.Po b/software/gsl-1.15/cblas/.deps/test_trmv.Po new file mode 100644 index 000000000..44e5a33d5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_trmv.Po @@ -0,0 +1,84 @@ +test_trmv.o: test_trmv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_trsm.Po b/software/gsl-1.15/cblas/.deps/test_trsm.Po new file mode 100644 index 000000000..f1eb25274 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_trsm.Po @@ -0,0 +1,84 @@ +test_trsm.o: test_trsm.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/test_trsv.Po b/software/gsl-1.15/cblas/.deps/test_trsv.Po new file mode 100644 index 000000000..eb020b0f4 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/test_trsv.Po @@ -0,0 +1,84 @@ +test_trsv.o: test_trsv.c ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h tests.h + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +tests.h: diff --git a/software/gsl-1.15/cblas/.deps/xerbla.Plo b/software/gsl-1.15/cblas/.deps/xerbla.Plo new file mode 100644 index 000000000..6e007b043 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/xerbla.Plo @@ -0,0 +1,90 @@ +xerbla.lo: xerbla.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/bin/../lib/clang/4.1/include/stdarg.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/bin/../lib/clang/4.1/include/stdarg.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: diff --git a/software/gsl-1.15/cblas/.deps/zaxpy.Plo b/software/gsl-1.15/cblas/.deps/zaxpy.Plo new file mode 100644 index 000000000..3515d104f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zaxpy.Plo @@ -0,0 +1,64 @@ +zaxpy.lo: zaxpy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_axpy_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_axpy_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zcopy.Plo b/software/gsl-1.15/cblas/.deps/zcopy.Plo new file mode 100644 index 000000000..1c2d986d2 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zcopy.Plo @@ -0,0 +1,64 @@ +zcopy.lo: zcopy.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_copy_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_copy_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zdotc_sub.Plo b/software/gsl-1.15/cblas/.deps/zdotc_sub.Plo new file mode 100644 index 000000000..d1b11a15c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zdotc_sub.Plo @@ -0,0 +1,64 @@ +zdotc_sub.lo: zdotc_sub.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zdotu_sub.Plo b/software/gsl-1.15/cblas/.deps/zdotu_sub.Plo new file mode 100644 index 000000000..79e1385fc --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zdotu_sub.Plo @@ -0,0 +1,64 @@ +zdotu_sub.lo: zdotu_sub.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_dot_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_dot_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zdscal.Plo b/software/gsl-1.15/cblas/.deps/zdscal.Plo new file mode 100644 index 000000000..bcd54ba16 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zdscal.Plo @@ -0,0 +1,64 @@ +zdscal.lo: zdscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_c_s.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_c_s.h: diff --git a/software/gsl-1.15/cblas/.deps/zgbmv.Plo b/software/gsl-1.15/cblas/.deps/zgbmv.Plo new file mode 100644 index 000000000..d523b6d18 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zgbmv.Plo @@ -0,0 +1,69 @@ +zgbmv.lo: zgbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gbmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gbmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zgemm.Plo b/software/gsl-1.15/cblas/.deps/zgemm.Plo new file mode 100644 index 000000000..e8017d66f --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zgemm.Plo @@ -0,0 +1,69 @@ +zgemm.lo: zgemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_gemm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_gemm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zgemv.Plo b/software/gsl-1.15/cblas/.deps/zgemv.Plo new file mode 100644 index 000000000..b91bbb7d4 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zgemv.Plo @@ -0,0 +1,69 @@ +zgemv.lo: zgemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gemv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gemv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zgerc.Plo b/software/gsl-1.15/cblas/.deps/zgerc.Plo new file mode 100644 index 000000000..4f3694c23 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zgerc.Plo @@ -0,0 +1,69 @@ +zgerc.lo: zgerc.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_gerc.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_gerc.h: diff --git a/software/gsl-1.15/cblas/.deps/zgeru.Plo b/software/gsl-1.15/cblas/.deps/zgeru.Plo new file mode 100644 index 000000000..64d33d27c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zgeru.Plo @@ -0,0 +1,69 @@ +zgeru.lo: zgeru.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_geru.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_geru.h: diff --git a/software/gsl-1.15/cblas/.deps/zhbmv.Plo b/software/gsl-1.15/cblas/.deps/zhbmv.Plo new file mode 100644 index 000000000..f37f7b5dc --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhbmv.Plo @@ -0,0 +1,69 @@ +zhbmv.lo: zhbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hbmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hbmv.h: diff --git a/software/gsl-1.15/cblas/.deps/zhemm.Plo b/software/gsl-1.15/cblas/.deps/zhemm.Plo new file mode 100644 index 000000000..36a0a60cf --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhemm.Plo @@ -0,0 +1,69 @@ +zhemm.lo: zhemm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_hemm.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_hemm.h: diff --git a/software/gsl-1.15/cblas/.deps/zhemv.Plo b/software/gsl-1.15/cblas/.deps/zhemv.Plo new file mode 100644 index 000000000..f82047be7 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhemv.Plo @@ -0,0 +1,69 @@ +zhemv.lo: zhemv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hemv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hemv.h: diff --git a/software/gsl-1.15/cblas/.deps/zher.Plo b/software/gsl-1.15/cblas/.deps/zher.Plo new file mode 100644 index 000000000..dadee4840 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zher.Plo @@ -0,0 +1,69 @@ +zher.lo: zher.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_her.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_her.h: diff --git a/software/gsl-1.15/cblas/.deps/zher2.Plo b/software/gsl-1.15/cblas/.deps/zher2.Plo new file mode 100644 index 000000000..4716ab1ca --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zher2.Plo @@ -0,0 +1,69 @@ +zher2.lo: zher2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_her2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_her2.h: diff --git a/software/gsl-1.15/cblas/.deps/zher2k.Plo b/software/gsl-1.15/cblas/.deps/zher2k.Plo new file mode 100644 index 000000000..8af67d4a0 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zher2k.Plo @@ -0,0 +1,69 @@ +zher2k.lo: zher2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_her2k.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_her2k.h: diff --git a/software/gsl-1.15/cblas/.deps/zherk.Plo b/software/gsl-1.15/cblas/.deps/zherk.Plo new file mode 100644 index 000000000..b437da426 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zherk.Plo @@ -0,0 +1,69 @@ +zherk.lo: zherk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_herk.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_herk.h: diff --git a/software/gsl-1.15/cblas/.deps/zhpmv.Plo b/software/gsl-1.15/cblas/.deps/zhpmv.Plo new file mode 100644 index 000000000..9369f9f15 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhpmv.Plo @@ -0,0 +1,69 @@ +zhpmv.lo: zhpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpmv.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpmv.h: diff --git a/software/gsl-1.15/cblas/.deps/zhpr.Plo b/software/gsl-1.15/cblas/.deps/zhpr.Plo new file mode 100644 index 000000000..5dc4e0912 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhpr.Plo @@ -0,0 +1,69 @@ +zhpr.lo: zhpr.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpr.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpr.h: diff --git a/software/gsl-1.15/cblas/.deps/zhpr2.Plo b/software/gsl-1.15/cblas/.deps/zhpr2.Plo new file mode 100644 index 000000000..167fa4dd1 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zhpr2.Plo @@ -0,0 +1,69 @@ +zhpr2.lo: zhpr2.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_hpr2.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_hpr2.h: diff --git a/software/gsl-1.15/cblas/.deps/zscal.Plo b/software/gsl-1.15/cblas/.deps/zscal.Plo new file mode 100644 index 000000000..b851de7a1 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zscal.Plo @@ -0,0 +1,64 @@ +zscal.lo: zscal.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_scal_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_scal_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zswap.Plo b/software/gsl-1.15/cblas/.deps/zswap.Plo new file mode 100644 index 000000000..764df6ec5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zswap.Plo @@ -0,0 +1,64 @@ +zswap.lo: zswap.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h source_swap_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +source_swap_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zsymm.Plo b/software/gsl-1.15/cblas/.deps/zsymm.Plo new file mode 100644 index 000000000..772172f01 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zsymm.Plo @@ -0,0 +1,69 @@ +zsymm.lo: zsymm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_symm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_symm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zsyr2k.Plo b/software/gsl-1.15/cblas/.deps/zsyr2k.Plo new file mode 100644 index 000000000..7bdb6939d --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zsyr2k.Plo @@ -0,0 +1,69 @@ +zsyr2k.lo: zsyr2k.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syr2k_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syr2k_c.h: diff --git a/software/gsl-1.15/cblas/.deps/zsyrk.Plo b/software/gsl-1.15/cblas/.deps/zsyrk.Plo new file mode 100644 index 000000000..473e7daf6 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/zsyrk.Plo @@ -0,0 +1,69 @@ +zsyrk.lo: zsyrk.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_syrk_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_syrk_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztbmv.Plo b/software/gsl-1.15/cblas/.deps/ztbmv.Plo new file mode 100644 index 000000000..cf81ead92 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztbmv.Plo @@ -0,0 +1,69 @@ +ztbmv.lo: ztbmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tbmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tbmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztbsv.Plo b/software/gsl-1.15/cblas/.deps/ztbsv.Plo new file mode 100644 index 000000000..a2371522e --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztbsv.Plo @@ -0,0 +1,71 @@ +ztbsv.lo: ztbsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_tbsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_tbsv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztpmv.Plo b/software/gsl-1.15/cblas/.deps/ztpmv.Plo new file mode 100644 index 000000000..d250c8aae --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztpmv.Plo @@ -0,0 +1,69 @@ +ztpmv.lo: ztpmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_tpmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_tpmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztpsv.Plo b/software/gsl-1.15/cblas/.deps/ztpsv.Plo new file mode 100644 index 000000000..e6a33b1c5 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztpsv.Plo @@ -0,0 +1,71 @@ +ztpsv.lo: ztpsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_tpsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_tpsv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztrmm.Plo b/software/gsl-1.15/cblas/.deps/ztrmm.Plo new file mode 100644 index 000000000..2b3608f3c --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztrmm.Plo @@ -0,0 +1,69 @@ +ztrmm.lo: ztrmm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h source_trmm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +source_trmm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztrmv.Plo b/software/gsl-1.15/cblas/.deps/ztrmv.Plo new file mode 100644 index 000000000..5651cfb04 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztrmv.Plo @@ -0,0 +1,69 @@ +ztrmv.lo: ztrmv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h source_trmv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +source_trmv_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztrsm.Plo b/software/gsl-1.15/cblas/.deps/ztrsm.Plo new file mode 100644 index 000000000..1d51d9d91 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztrsm.Plo @@ -0,0 +1,71 @@ +ztrsm.lo: ztrsm.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l3.h \ + error_cblas.h hypot.c source_trsm_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l3.h: + +error_cblas.h: + +hypot.c: + +source_trsm_c.h: diff --git a/software/gsl-1.15/cblas/.deps/ztrsv.Plo b/software/gsl-1.15/cblas/.deps/ztrsv.Plo new file mode 100644 index 000000000..39e756380 --- /dev/null +++ b/software/gsl-1.15/cblas/.deps/ztrsv.Plo @@ -0,0 +1,71 @@ +ztrsv.lo: ztrsv.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h cblas.h error_cblas_l2.h \ + error_cblas.h hypot.c source_trsv_c.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +cblas.h: + +error_cblas_l2.h: + +error_cblas.h: + +hypot.c: + +source_trsv_c.h: diff --git a/software/gsl-1.15/cblas/ChangeLog b/software/gsl-1.15/cblas/ChangeLog new file mode 100644 index 000000000..5d500c8db --- /dev/null +++ b/software/gsl-1.15/cblas/ChangeLog @@ -0,0 +1,40 @@ +2010-10-12 Brian Gough + + * added error checking to selected cblas functions (José Luis + García Pallero) + +2009-06-24 Brian Gough + + * source_scal_c.h source_scal_r.h: remove needless use of OFFSET + macro when incX is known to be positive + +2003-01-21 Brian Gough + + * test.m: skip trans=113 for complex matrix on SYRK tests. + +Tue Feb 19 20:50:27 2002 Brian Gough + + * gsl_cblas.h: added extern "C" + +Mon Jul 2 22:21:00 2001 Brian Gough + + * test.c: added missing #include + +Fri Apr 27 19:53:10 2001 Brian Gough + + * source_tpmv_r.h: moved index declarations to more restricted scope + + * source_rotmg.h: changed declaration y1 to y in order to avoid + confusion with function y0(x) in C library. Also changed x1 to x. + + * source_syr2k_r.h: error where lda was used instead of ldb in + syr2k_r was not picked up by any tests! Now fixed + +Thu Apr 12 16:46:16 2001 Brian Gough + + * all routines now included for Level 1, 2, 3-- passes blas test + suite for numerical results, but no error handling yet + + * split out from blas directory to make an independent blas + library + diff --git a/software/gsl-1.15/cblas/Makefile.am b/software/gsl-1.15/cblas/Makefile.am new file mode 100644 index 000000000..b45ee85a4 --- /dev/null +++ b/software/gsl-1.15/cblas/Makefile.am @@ -0,0 +1,24 @@ +lib_LTLIBRARIES = libgslcblas.la +libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION) + +MINGW32_HOST = @MINGW32_HOST@ +if MINGW32_HOST +libgslcblas_la_LDFLAGS += -no-undefined +endif + +pkginclude_HEADERS = gsl_cblas.h + +INCLUDES = -I$(top_srcdir) + +libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c sdot.c sdsdot.c sgbmv.c sgemm.c sgemv.c sger.c snrm2.c srot.c srotg.c srotm.c srotmg.c ssbmv.c sscal.c sspmv.c sspr.c sspr2.c sswap.c ssymm.c ssymv.c ssyr.c ssyr2.c ssyr2k.c ssyrk.c stbmv.c stbsv.c stpmv.c stpsv.c strmm.c strmv.c strsm.c strsv.c dasum.c daxpy.c dcopy.c ddot.c dgbmv.c dgemm.c dgemv.c dger.c dnrm2.c drot.c drotg.c drotm.c drotmg.c dsbmv.c dscal.c dsdot.c dspmv.c dspr.c dspr2.c dswap.c dsymm.c dsymv.c dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c dtbsv.c dtpmv.c dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c dzasum.c dznrm2.c caxpy.c ccopy.c cdotc_sub.c cdotu_sub.c cgbmv.c cgemm.c cgemv.c cgerc.c cgeru.c chbmv.c chemm.c chemv.c cher.c cher2.c cher2k.c cherk.c chpmv.c chpr.c chpr2.c cscal.c csscal.c cswap.c csymm.c csyr2k.c csyrk.c ctbmv.c ctbsv.c ctpmv.c ctpsv.c ctrmm.c ctrmv.c ctrsm.c ctrsv.c zaxpy.c zcopy.c zdotc_sub.c zdotu_sub.c zdscal.c zgbmv.c zgemm.c zgemv.c zgerc.c zgeru.c zhbmv.c zhemm.c zhemv.c zher.c zher2.c zher2k.c zherk.c zhpmv.c zhpr.c zhpr2.c zscal.c zswap.c zsymm.c zsyr2k.c zsyrk.c ztbmv.c ztbsv.c ztpmv.c ztpsv.c ztrmm.c ztrmv.c ztrsm.c ztrsv.c icamax.c idamax.c isamax.c izamax.c xerbla.c + +noinst_HEADERS = tests.c tests.h error_cblas.h error_cblas_l2.h error_cblas_l3.h cblas.h source_asum_c.h source_asum_r.h source_axpy_c.h source_axpy_r.h source_copy_c.h source_copy_r.h source_dot_c.h source_dot_r.h source_gbmv_c.h source_gbmv_r.h source_gemm_c.h source_gemm_r.h source_gemv_c.h source_gemv_r.h source_ger.h source_gerc.h source_geru.h source_hbmv.h source_hemm.h source_hemv.h source_her.h source_her2.h source_her2k.h source_herk.h source_hpmv.h source_hpr.h source_hpr2.h source_iamax_c.h source_iamax_r.h source_nrm2_c.h source_nrm2_r.h source_rot.h source_rotg.h source_rotm.h source_rotmg.h source_sbmv.h source_scal_c.h source_scal_c_s.h source_scal_r.h source_spmv.h source_spr.h source_spr2.h source_swap_c.h source_swap_r.h source_symm_c.h source_symm_r.h source_symv.h source_syr.h source_syr2.h source_syr2k_c.h source_syr2k_r.h source_syrk_c.h source_syrk_r.h source_tbmv_c.h source_tbmv_r.h source_tbsv_c.h source_tbsv_r.h source_tpmv_c.h source_tpmv_r.h source_tpsv_c.h source_tpsv_r.h source_trmm_c.h source_trmm_r.h source_trmv_c.h source_trmv_r.h source_trsm_c.h source_trsm_r.h source_trsv_c.h source_trsv_r.h hypot.c + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +test_SOURCES = test.c test_amax.c test_asum.c test_axpy.c test_copy.c test_dot.c test_gbmv.c test_gemm.c test_gemv.c test_ger.c test_hbmv.c test_hemm.c test_hemv.c test_her.c test_her2.c test_her2k.c test_herk.c test_hpmv.c test_hpr.c test_hpr2.c test_nrm2.c test_rot.c test_rotg.c test_rotm.c test_rotmg.c test_sbmv.c test_scal.c test_spmv.c test_spr.c test_spr2.c test_swap.c test_symm.c test_symv.c test_syr.c test_syr2.c test_syr2k.c test_syrk.c test_tbmv.c test_tbsv.c test_tpmv.c test_tpsv.c test_trmm.c test_trmv.c test_trsm.c test_trsv.c + + + diff --git a/software/gsl-1.15/cblas/Makefile.in b/software/gsl-1.15/cblas/Makefile.in new file mode 100644 index 000000000..e6f5b205f --- /dev/null +++ b/software/gsl-1.15/cblas/Makefile.in @@ -0,0 +1,953 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@MINGW32_HOST_TRUE@am__append_1 = -no-undefined +check_PROGRAMS = test$(EXEEXT) +subdir = cblas +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libgslcblas_la_LIBADD = +am_libgslcblas_la_OBJECTS = sasum.lo saxpy.lo scasum.lo scnrm2.lo \ + scopy.lo sdot.lo sdsdot.lo sgbmv.lo sgemm.lo sgemv.lo sger.lo \ + snrm2.lo srot.lo srotg.lo srotm.lo srotmg.lo ssbmv.lo sscal.lo \ + sspmv.lo sspr.lo sspr2.lo sswap.lo ssymm.lo ssymv.lo ssyr.lo \ + ssyr2.lo ssyr2k.lo ssyrk.lo stbmv.lo stbsv.lo stpmv.lo \ + stpsv.lo strmm.lo strmv.lo strsm.lo strsv.lo dasum.lo daxpy.lo \ + dcopy.lo ddot.lo dgbmv.lo dgemm.lo dgemv.lo dger.lo dnrm2.lo \ + drot.lo drotg.lo drotm.lo drotmg.lo dsbmv.lo dscal.lo dsdot.lo \ + dspmv.lo dspr.lo dspr2.lo dswap.lo dsymm.lo dsymv.lo dsyr.lo \ + dsyr2.lo dsyr2k.lo dsyrk.lo dtbmv.lo dtbsv.lo dtpmv.lo \ + dtpsv.lo dtrmm.lo dtrmv.lo dtrsm.lo dtrsv.lo dzasum.lo \ + dznrm2.lo caxpy.lo ccopy.lo cdotc_sub.lo cdotu_sub.lo cgbmv.lo \ + cgemm.lo cgemv.lo cgerc.lo cgeru.lo chbmv.lo chemm.lo chemv.lo \ + cher.lo cher2.lo cher2k.lo cherk.lo chpmv.lo chpr.lo chpr2.lo \ + cscal.lo csscal.lo cswap.lo csymm.lo csyr2k.lo csyrk.lo \ + ctbmv.lo ctbsv.lo ctpmv.lo ctpsv.lo ctrmm.lo ctrmv.lo ctrsm.lo \ + ctrsv.lo zaxpy.lo zcopy.lo zdotc_sub.lo zdotu_sub.lo zdscal.lo \ + zgbmv.lo zgemm.lo zgemv.lo zgerc.lo zgeru.lo zhbmv.lo zhemm.lo \ + zhemv.lo zher.lo zher2.lo zher2k.lo zherk.lo zhpmv.lo zhpr.lo \ + zhpr2.lo zscal.lo zswap.lo zsymm.lo zsyr2k.lo zsyrk.lo \ + ztbmv.lo ztbsv.lo ztpmv.lo ztpsv.lo ztrmm.lo ztrmv.lo ztrsm.lo \ + ztrsv.lo icamax.lo idamax.lo isamax.lo izamax.lo xerbla.lo +libgslcblas_la_OBJECTS = $(am_libgslcblas_la_OBJECTS) +libgslcblas_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgslcblas_la_LDFLAGS) $(LDFLAGS) -o $@ +am_test_OBJECTS = test.$(OBJEXT) test_amax.$(OBJEXT) \ + test_asum.$(OBJEXT) test_axpy.$(OBJEXT) test_copy.$(OBJEXT) \ + test_dot.$(OBJEXT) test_gbmv.$(OBJEXT) test_gemm.$(OBJEXT) \ + test_gemv.$(OBJEXT) test_ger.$(OBJEXT) test_hbmv.$(OBJEXT) \ + test_hemm.$(OBJEXT) test_hemv.$(OBJEXT) test_her.$(OBJEXT) \ + test_her2.$(OBJEXT) test_her2k.$(OBJEXT) test_herk.$(OBJEXT) \ + test_hpmv.$(OBJEXT) test_hpr.$(OBJEXT) test_hpr2.$(OBJEXT) \ + test_nrm2.$(OBJEXT) test_rot.$(OBJEXT) test_rotg.$(OBJEXT) \ + test_rotm.$(OBJEXT) test_rotmg.$(OBJEXT) test_sbmv.$(OBJEXT) \ + test_scal.$(OBJEXT) test_spmv.$(OBJEXT) test_spr.$(OBJEXT) \ + test_spr2.$(OBJEXT) test_swap.$(OBJEXT) test_symm.$(OBJEXT) \ + test_symv.$(OBJEXT) test_syr.$(OBJEXT) test_syr2.$(OBJEXT) \ + test_syr2k.$(OBJEXT) test_syrk.$(OBJEXT) test_tbmv.$(OBJEXT) \ + test_tbsv.$(OBJEXT) test_tpmv.$(OBJEXT) test_tpsv.$(OBJEXT) \ + test_trmm.$(OBJEXT) test_trmv.$(OBJEXT) test_trsm.$(OBJEXT) \ + test_trsv.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslcblas.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslcblas_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslcblas_la_SOURCES) $(test_SOURCES) +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libgslcblas.la +libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION) \ + $(am__append_1) +MINGW32_HOST = @MINGW32_HOST@ +pkginclude_HEADERS = gsl_cblas.h +INCLUDES = -I$(top_srcdir) +libgslcblas_la_SOURCES = sasum.c saxpy.c scasum.c scnrm2.c scopy.c \ + sdot.c sdsdot.c sgbmv.c sgemm.c sgemv.c sger.c snrm2.c srot.c \ + srotg.c srotm.c srotmg.c ssbmv.c sscal.c sspmv.c sspr.c \ + sspr2.c sswap.c ssymm.c ssymv.c ssyr.c ssyr2.c ssyr2k.c \ + ssyrk.c stbmv.c stbsv.c stpmv.c stpsv.c strmm.c strmv.c \ + strsm.c strsv.c dasum.c daxpy.c dcopy.c ddot.c dgbmv.c dgemm.c \ + dgemv.c dger.c dnrm2.c drot.c drotg.c drotm.c drotmg.c dsbmv.c \ + dscal.c dsdot.c dspmv.c dspr.c dspr2.c dswap.c dsymm.c dsymv.c \ + dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c dtbsv.c dtpmv.c \ + dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c dzasum.c dznrm2.c \ + caxpy.c ccopy.c cdotc_sub.c cdotu_sub.c cgbmv.c cgemm.c \ + cgemv.c cgerc.c cgeru.c chbmv.c chemm.c chemv.c cher.c cher2.c \ + cher2k.c cherk.c chpmv.c chpr.c chpr2.c cscal.c csscal.c \ + cswap.c csymm.c csyr2k.c csyrk.c ctbmv.c ctbsv.c ctpmv.c \ + ctpsv.c ctrmm.c ctrmv.c ctrsm.c ctrsv.c zaxpy.c zcopy.c \ + zdotc_sub.c zdotu_sub.c zdscal.c zgbmv.c zgemm.c zgemv.c \ + zgerc.c zgeru.c zhbmv.c zhemm.c zhemv.c zher.c zher2.c \ + zher2k.c zherk.c zhpmv.c zhpr.c zhpr2.c zscal.c zswap.c \ + zsymm.c zsyr2k.c zsyrk.c ztbmv.c ztbsv.c ztpmv.c ztpsv.c \ + ztrmm.c ztrmv.c ztrsm.c ztrsv.c icamax.c idamax.c isamax.c \ + izamax.c xerbla.c +noinst_HEADERS = tests.c tests.h error_cblas.h error_cblas_l2.h \ + error_cblas_l3.h cblas.h source_asum_c.h source_asum_r.h \ + source_axpy_c.h source_axpy_r.h source_copy_c.h \ + source_copy_r.h source_dot_c.h source_dot_r.h source_gbmv_c.h \ + source_gbmv_r.h source_gemm_c.h source_gemm_r.h \ + source_gemv_c.h source_gemv_r.h source_ger.h source_gerc.h \ + source_geru.h source_hbmv.h source_hemm.h source_hemv.h \ + source_her.h source_her2.h source_her2k.h source_herk.h \ + source_hpmv.h source_hpr.h source_hpr2.h source_iamax_c.h \ + source_iamax_r.h source_nrm2_c.h source_nrm2_r.h source_rot.h \ + source_rotg.h source_rotm.h source_rotmg.h source_sbmv.h \ + source_scal_c.h source_scal_c_s.h source_scal_r.h \ + source_spmv.h source_spr.h source_spr2.h source_swap_c.h \ + source_swap_r.h source_symm_c.h source_symm_r.h source_symv.h \ + source_syr.h source_syr2.h source_syr2k_c.h source_syr2k_r.h \ + source_syrk_c.h source_syrk_r.h source_tbmv_c.h \ + source_tbmv_r.h source_tbsv_c.h source_tbsv_r.h \ + source_tpmv_c.h source_tpmv_r.h source_tpsv_c.h \ + source_tpsv_r.h source_trmm_c.h source_trmm_r.h \ + source_trmv_c.h source_trmv_r.h source_trsm_c.h \ + source_trsm_r.h source_trsv_c.h source_trsv_r.h hypot.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +test_SOURCES = test.c test_amax.c test_asum.c test_axpy.c test_copy.c test_dot.c test_gbmv.c test_gemm.c test_gemv.c test_ger.c test_hbmv.c test_hemm.c test_hemv.c test_her.c test_her2.c test_her2k.c test_herk.c test_hpmv.c test_hpr.c test_hpr2.c test_nrm2.c test_rot.c test_rotg.c test_rotm.c test_rotmg.c test_sbmv.c test_scal.c test_spmv.c test_spr.c test_spr2.c test_swap.c test_symm.c test_symv.c test_syr.c test_syr2.c test_syr2k.c test_syrk.c test_tbmv.c test_tbsv.c test_tpmv.c test_tpsv.c test_trmm.c test_trmv.c test_trsm.c test_trsv.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cblas/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu cblas/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslcblas.la: $(libgslcblas_la_OBJECTS) $(libgslcblas_la_DEPENDENCIES) + $(libgslcblas_la_LINK) -rpath $(libdir) $(libgslcblas_la_OBJECTS) $(libgslcblas_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caxpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdotc_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdotu_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgerc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgeru.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cher2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cher2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cherk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chpr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chpr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csyr2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csyrk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctbsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctpsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrmm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrsm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daxpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnrm2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drotg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drotm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drotmg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsdot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dspr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsymv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsyr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsyr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsyr2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsyrk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtbsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtpsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtrmm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtrmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtrsm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtrsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dzasum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dznrm2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icamax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idamax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isamax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/izamax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saxpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scasum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scnrm2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdsdot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snrm2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srotg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srotm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srotmg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sspmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sspr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sspr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssymv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssyr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssyr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssyr2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssyrk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stbsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strmm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_amax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_asum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_axpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_copy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gbmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gemm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gemv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ger.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hbmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hemm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hemv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_her.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_her2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_her2k.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_herk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hpmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hpr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hpr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_nrm2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rotg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rotm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rotmg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sbmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_scal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_symm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_symv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syr2k.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syrk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tbmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tbsv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tpmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tpsv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trmm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trmv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trsm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trsv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xerbla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zaxpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zdotc_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zdotu_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zdscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgerc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgeru.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhemm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhemv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zher2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zher2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zherk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhpr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhpr2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsyr2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsyrk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztbmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztbsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztpmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztpsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztrmm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztrmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztrsm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ztrsv.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/cblas/TODO b/software/gsl-1.15/cblas/TODO new file mode 100644 index 000000000..6224220e1 --- /dev/null +++ b/software/gsl-1.15/cblas/TODO @@ -0,0 +1,11 @@ +# -*- org -*- +#+CATEGORY: cblas + +use macros so that all complex arithmetic can use native complex types if compiler supports them + +make sure double/float are replaced by BASE everywhere +well... not _everywhere_; internal accumulations should +be done in double always; there's no reason not too, +it's safer and maybe even faster [GJ] + +gbmv_c : use conj*imag instead of having branches form Trans & ConjTrans diff --git a/software/gsl-1.15/cblas/caxpy.c b/software/gsl-1.15/cblas/caxpy.c new file mode 100644 index 000000000..842153ecf --- /dev/null +++ b/software/gsl-1.15/cblas/caxpy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_caxpy (const int N, const void *alpha, const void *X, const int incX, + void *Y, const int incY) +{ +#define BASE float +#include "source_axpy_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cblas.h b/software/gsl-1.15/cblas/cblas.h new file mode 100644 index 000000000..b47867185 --- /dev/null +++ b/software/gsl-1.15/cblas/cblas.h @@ -0,0 +1,34 @@ +#define INDEX int +#define OFFSET(N, incX) ((incX) > 0 ? 0 : ((N) - 1) * (-(incX))) +#define BLAS_ERROR(x) cblas_xerbla(0, __FILE__, x); + +#define CONJUGATE(x) ((x) == CblasConjTrans) +#define TRANSPOSE(x) ((x) == CblasTrans || (x) == CblasConjTrans) +#define UPPER(x) ((x) == CblasUpper) +#define LOWER(x) ((x) == CblasLower) + +/* Handling of packed complex types... */ + +#define REAL(a,i) (((BASE *) a)[2*(i)]) +#define IMAG(a,i) (((BASE *) a)[2*(i)+1]) + +#define REAL0(a) (((BASE *)a)[0]) +#define IMAG0(a) (((BASE *)a)[1]) + +#define CONST_REAL(a,i) (((const BASE *) a)[2*(i)]) +#define CONST_IMAG(a,i) (((const BASE *) a)[2*(i)+1]) + +#define CONST_REAL0(a) (((const BASE *)a)[0]) +#define CONST_IMAG0(a) (((const BASE *)a)[1]) + + +#define GB(KU,KL,lda,i,j) ((KU+1+(i-j))*lda + j) + +#define TRCOUNT(N,i) ((((i)+1)*(2*(N)-(i)))/2) + +/* #define TBUP(N,i,j) */ +/* #define TBLO(N,i,j) */ + +#define TPUP(N,i,j) (TRCOUNT(N,(i)-1)+(j)-(i)) +#define TPLO(N,i,j) (((i)*((i)+1))/2 + (j)) + diff --git a/software/gsl-1.15/cblas/ccopy.c b/software/gsl-1.15/cblas/ccopy.c new file mode 100644 index 000000000..c4716dd09 --- /dev/null +++ b/software/gsl-1.15/cblas/ccopy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_ccopy (const int N, const void *X, const int incX, void *Y, + const int incY) +{ +#define BASE float +#include "source_copy_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cdotc_sub.c b/software/gsl-1.15/cblas/cdotc_sub.c new file mode 100644 index 000000000..7bf646d05 --- /dev/null +++ b/software/gsl-1.15/cblas/cdotc_sub.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" + +void +cblas_cdotc_sub (const int N, const void *X, const int incX, const void *Y, + const int incY, void *result) +{ +#define BASE float +#define CONJ_SIGN (-1.0) +#include "source_dot_c.h" +#undef CONJ_SIGN +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cdotu_sub.c b/software/gsl-1.15/cblas/cdotu_sub.c new file mode 100644 index 000000000..4dff0beba --- /dev/null +++ b/software/gsl-1.15/cblas/cdotu_sub.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" + +void +cblas_cdotu_sub (const int N, const void *X, const int incX, const void *Y, + const int incY, void *result) +{ +#define BASE float +#define CONJ_SIGN 1.0 +#include "source_dot_c.h" +#undef CONJ_SIGN +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cgbmv.c b/software/gsl-1.15/cblas/cgbmv.c new file mode 100644 index 000000000..8337128ca --- /dev/null +++ b/software/gsl-1.15/cblas/cgbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const int KL, const int KU, + const void *alpha, const void *A, const int lda, const void *X, + const int incX, const void *beta, void *Y, const int incY) +{ +#define BASE float +#include "source_gbmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cgemm.c b/software/gsl-1.15/cblas/cgemm.c new file mode 100644 index 000000000..f1ca0c232 --- /dev/null +++ b/software/gsl-1.15/cblas/cgemm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_cgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, void *C, + const int ldc) +{ +#define BASE float +#include "source_gemm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cgemv.c b/software/gsl-1.15/cblas/cgemv.c new file mode 100644 index 000000000..d09ec64b6 --- /dev/null +++ b/software/gsl-1.15/cblas/cgemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const void *alpha, const void *A, + const int lda, const void *X, const int incX, const void *beta, + void *Y, const int incY) +{ +#define BASE float +#include "source_gemv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cgerc.c b/software/gsl-1.15/cblas/cgerc.c new file mode 100644 index 000000000..db34ddffe --- /dev/null +++ b/software/gsl-1.15/cblas/cgerc.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cgerc (const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, const void *Y, + const int incY, void *A, const int lda) +{ +#define BASE float +#include "source_gerc.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cgeru.c b/software/gsl-1.15/cblas/cgeru.c new file mode 100644 index 000000000..de3e5beb9 --- /dev/null +++ b/software/gsl-1.15/cblas/cgeru.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cgeru (const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, const void *Y, + const int incY, void *A, const int lda) +{ +#define BASE float +#include "source_geru.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chbmv.c b/software/gsl-1.15/cblas/chbmv.c new file mode 100644 index 000000000..58c36445c --- /dev/null +++ b/software/gsl-1.15/cblas/chbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_chbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const void *alpha, const void *A, + const int lda, const void *X, const int incX, const void *beta, + void *Y, const int incY) +{ +#define BASE float +#include "source_hbmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chemm.c b/software/gsl-1.15/cblas/chemm.c new file mode 100644 index 000000000..87b7c6559 --- /dev/null +++ b/software/gsl-1.15/cblas/chemm.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_chemm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE float +#include "source_hemm.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chemv.c b/software/gsl-1.15/cblas/chemv.c new file mode 100644 index 000000000..a501605a3 --- /dev/null +++ b/software/gsl-1.15/cblas/chemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_chemv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *A, const int lda, + const void *X, const int incX, const void *beta, void *Y, + const int incY) +{ +#define BASE float +#include "source_hemv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cher.c b/software/gsl-1.15/cblas/cher.c new file mode 100644 index 000000000..42c7e5ba0 --- /dev/null +++ b/software/gsl-1.15/cblas/cher.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cher (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const void *X, const int incX, + void *A, const int lda) +{ +#define BASE float +#include "source_her.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cher2.c b/software/gsl-1.15/cblas/cher2.c new file mode 100644 index 000000000..ceb1e681c --- /dev/null +++ b/software/gsl-1.15/cblas/cher2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_cher2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda) +{ +#define BASE float +#include "source_her2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cher2k.c b/software/gsl-1.15/cblas/cher2k.c new file mode 100644 index 000000000..90acff300 --- /dev/null +++ b/software/gsl-1.15/cblas/cher2k.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_cher2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const float beta, void *C, const int ldc) +{ +#define BASE float +#include "source_her2k.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cherk.c b/software/gsl-1.15/cblas/cherk.c new file mode 100644 index 000000000..984450fc3 --- /dev/null +++ b/software/gsl-1.15/cblas/cherk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_cherk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const void *A, const int lda, + const float beta, void *C, const int ldc) +{ +#define BASE float +#include "source_herk.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chpmv.c b/software/gsl-1.15/cblas/chpmv.c new file mode 100644 index 000000000..6163d77f7 --- /dev/null +++ b/software/gsl-1.15/cblas/chpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_chpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *Ap, const void *X, + const int incX, const void *beta, void *Y, const int incY) +{ +#define BASE float +#include "source_hpmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chpr.c b/software/gsl-1.15/cblas/chpr.c new file mode 100644 index 000000000..f5098f3b8 --- /dev/null +++ b/software/gsl-1.15/cblas/chpr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_chpr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const void *X, const int incX, + void *Ap) +{ +#define BASE float +#include "source_hpr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/chpr2.c b/software/gsl-1.15/cblas/chpr2.c new file mode 100644 index 000000000..9f7a1895e --- /dev/null +++ b/software/gsl-1.15/cblas/chpr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_chpr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *Ap) +{ +#define BASE float +#include "source_hpr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cscal.c b/software/gsl-1.15/cblas/cscal.c new file mode 100644 index 000000000..5a881b918 --- /dev/null +++ b/software/gsl-1.15/cblas/cscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_cscal (const int N, const void *alpha, void *X, const int incX) +{ +#define BASE float +#include "source_scal_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/csscal.c b/software/gsl-1.15/cblas/csscal.c new file mode 100644 index 000000000..ef59150e6 --- /dev/null +++ b/software/gsl-1.15/cblas/csscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_csscal (const int N, const float alpha, void *X, const int incX) +{ +#define BASE float +#include "source_scal_c_s.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/cswap.c b/software/gsl-1.15/cblas/cswap.c new file mode 100644 index 000000000..8e940ec54 --- /dev/null +++ b/software/gsl-1.15/cblas/cswap.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_cswap (const int N, void *X, const int incX, void *Y, const int incY) +{ +#define BASE float +#include "source_swap_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/csymm.c b/software/gsl-1.15/cblas/csymm.c new file mode 100644 index 000000000..eca487df7 --- /dev/null +++ b/software/gsl-1.15/cblas/csymm.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_csymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE float +#include "source_symm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/csyr2k.c b/software/gsl-1.15/cblas/csyr2k.c new file mode 100644 index 000000000..0d7a097fe --- /dev/null +++ b/software/gsl-1.15/cblas/csyr2k.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_csyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE float +#include "source_syr2k_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/csyrk.c b/software/gsl-1.15/cblas/csyrk.c new file mode 100644 index 000000000..b3bede5ee --- /dev/null +++ b/software/gsl-1.15/cblas/csyrk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_csyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *beta, void *C, const int ldc) +{ +#define BASE float +#include "source_syrk_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctbmv.c b/software/gsl-1.15/cblas/ctbmv.c new file mode 100644 index 000000000..97cc4a439 --- /dev/null +++ b/software/gsl-1.15/cblas/ctbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ctbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE float +#include "source_tbmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctbsv.c b/software/gsl-1.15/cblas/ctbsv.c new file mode 100644 index 000000000..bd2b5f7d5 --- /dev/null +++ b/software/gsl-1.15/cblas/ctbsv.c @@ -0,0 +1,17 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ctbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE float +#include "source_tbsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctpmv.c b/software/gsl-1.15/cblas/ctpmv.c new file mode 100644 index 000000000..51405a54a --- /dev/null +++ b/software/gsl-1.15/cblas/ctpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ctpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX) +{ +#define BASE float +#include "source_tpmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctpsv.c b/software/gsl-1.15/cblas/ctpsv.c new file mode 100644 index 000000000..e68ee3cb7 --- /dev/null +++ b/software/gsl-1.15/cblas/ctpsv.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ctpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX) +{ +#define BASE float +#include "source_tpsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctrmm.c b/software/gsl-1.15/cblas/ctrmm.c new file mode 100644 index 000000000..b8adbc468 --- /dev/null +++ b/software/gsl-1.15/cblas/ctrmm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_ctrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, void *B, + const int ldb) +{ +#define BASE float +#include "source_trmm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctrmv.c b/software/gsl-1.15/cblas/ctrmv.c new file mode 100644 index 000000000..1e00514ea --- /dev/null +++ b/software/gsl-1.15/cblas/ctrmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ctrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE float +#include "source_trmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctrsm.c b/software/gsl-1.15/cblas/ctrsm.c new file mode 100644 index 000000000..e3086a7f5 --- /dev/null +++ b/software/gsl-1.15/cblas/ctrsm.c @@ -0,0 +1,18 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +#include "hypot.c" + +void +cblas_ctrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, void *B, + const int ldb) +{ +#define BASE float +#include "source_trsm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ctrsv.c b/software/gsl-1.15/cblas/ctrsv.c new file mode 100644 index 000000000..e6f8ca03e --- /dev/null +++ b/software/gsl-1.15/cblas/ctrsv.c @@ -0,0 +1,17 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ctrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE float +#include "source_trsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dasum.c b/software/gsl-1.15/cblas/dasum.c new file mode 100644 index 000000000..db215c105 --- /dev/null +++ b/software/gsl-1.15/cblas/dasum.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +double +cblas_dasum (const int N, const double *X, const int incX) +{ +#define BASE double +#include "source_asum_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/daxpy.c b/software/gsl-1.15/cblas/daxpy.c new file mode 100644 index 000000000..d0fd567a5 --- /dev/null +++ b/software/gsl-1.15/cblas/daxpy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_daxpy (const int N, const double alpha, const double *X, const int incX, + double *Y, const int incY) +{ +#define BASE double +#include "source_axpy_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dcopy.c b/software/gsl-1.15/cblas/dcopy.c new file mode 100644 index 000000000..5c6ed2e92 --- /dev/null +++ b/software/gsl-1.15/cblas/dcopy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_dcopy (const int N, const double *X, const int incX, double *Y, + const int incY) +{ +#define BASE double +#include "source_copy_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ddot.c b/software/gsl-1.15/cblas/ddot.c new file mode 100644 index 000000000..e5801f3f2 --- /dev/null +++ b/software/gsl-1.15/cblas/ddot.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" + +double +cblas_ddot (const int N, const double *X, const int incX, const double *Y, + const int incY) +{ +#define INIT_VAL 0.0 +#define ACC_TYPE double +#define BASE double +#include "source_dot_r.h" +#undef ACC_TYPE +#undef BASE +#undef INIT_VAL +} diff --git a/software/gsl-1.15/cblas/dgbmv.c b/software/gsl-1.15/cblas/dgbmv.c new file mode 100644 index 000000000..766a4d534 --- /dev/null +++ b/software/gsl-1.15/cblas/dgbmv.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const int KL, const int KU, + const double alpha, const double *A, const int lda, + const double *X, const int incX, const double beta, double *Y, + const int incY) +{ +#define BASE double +#include "source_gbmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dgemm.c b/software/gsl-1.15/cblas/dgemm.c new file mode 100644 index 000000000..c2d93fa3e --- /dev/null +++ b/software/gsl-1.15/cblas/dgemm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const double alpha, const double *A, const int lda, + const double *B, const int ldb, const double beta, double *C, + const int ldc) +{ +#define BASE double +#include "source_gemm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dgemv.c b/software/gsl-1.15/cblas/dgemv.c new file mode 100644 index 000000000..ff8614bdd --- /dev/null +++ b/software/gsl-1.15/cblas/dgemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const double alpha, const double *A, + const int lda, const double *X, const int incX, + const double beta, double *Y, const int incY) +{ +#define BASE double +#include "source_gemv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dger.c b/software/gsl-1.15/cblas/dger.c new file mode 100644 index 000000000..26de79132 --- /dev/null +++ b/software/gsl-1.15/cblas/dger.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dger (const enum CBLAS_ORDER order, const int M, const int N, + const double alpha, const double *X, const int incX, + const double *Y, const int incY, double *A, const int lda) +{ +#define BASE double +#include "source_ger.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dnrm2.c b/software/gsl-1.15/cblas/dnrm2.c new file mode 100644 index 000000000..f7d5d8380 --- /dev/null +++ b/software/gsl-1.15/cblas/dnrm2.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +double +cblas_dnrm2 (const int N, const double *X, const int incX) +{ +#define BASE double +#include "source_nrm2_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/drot.c b/software/gsl-1.15/cblas/drot.c new file mode 100644 index 000000000..15c75db65 --- /dev/null +++ b/software/gsl-1.15/cblas/drot.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_drot (const int N, double *X, const int incX, double *Y, const int incY, + const double c, const double s) +{ +#define BASE double +#include "source_rot.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/drotg.c b/software/gsl-1.15/cblas/drotg.c new file mode 100644 index 000000000..bc9565891 --- /dev/null +++ b/software/gsl-1.15/cblas/drotg.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_drotg (double *a, double *b, double *c, double *s) +{ +#define BASE double +#include "source_rotg.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/drotm.c b/software/gsl-1.15/cblas/drotm.c new file mode 100644 index 000000000..69d5129d7 --- /dev/null +++ b/software/gsl-1.15/cblas/drotm.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_drotm (const int N, double *X, const int incX, double *Y, + const int incY, const double *P) +{ +#define BASE double +#include "source_rotm.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/drotmg.c b/software/gsl-1.15/cblas/drotmg.c new file mode 100644 index 000000000..d9e68bad8 --- /dev/null +++ b/software/gsl-1.15/cblas/drotmg.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_drotmg (double *d1, double *d2, double *b1, const double b2, double *P) +{ +#define BASE double +#include "source_rotmg.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsbmv.c b/software/gsl-1.15/cblas/dsbmv.c new file mode 100644 index 000000000..8fede0a4e --- /dev/null +++ b/software/gsl-1.15/cblas/dsbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dsbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const double alpha, const double *A, + const int lda, const double *X, const int incX, + const double beta, double *Y, const int incY) +{ +#define BASE double +#include "source_sbmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dscal.c b/software/gsl-1.15/cblas/dscal.c new file mode 100644 index 000000000..479b121ac --- /dev/null +++ b/software/gsl-1.15/cblas/dscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_dscal (const int N, const double alpha, double *X, const int incX) +{ +#define BASE double +#include "source_scal_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsdot.c b/software/gsl-1.15/cblas/dsdot.c new file mode 100644 index 000000000..2d3400b6c --- /dev/null +++ b/software/gsl-1.15/cblas/dsdot.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" + +double +cblas_dsdot (const int N, const float *X, const int incX, const float *Y, + const int incY) +{ +#define INIT_VAL 0.0 +#define ACC_TYPE double +#define BASE float +#include "source_dot_r.h" +#undef ACC_TYPE +#undef BASE +#undef INIT_VAL +} diff --git a/software/gsl-1.15/cblas/dspmv.c b/software/gsl-1.15/cblas/dspmv.c new file mode 100644 index 000000000..66b4dc86d --- /dev/null +++ b/software/gsl-1.15/cblas/dspmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dspmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *Ap, + const double *X, const int incX, const double beta, double *Y, + const int incY) +{ +#define BASE double +#include "source_spmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dspr.c b/software/gsl-1.15/cblas/dspr.c new file mode 100644 index 000000000..f0db80da1 --- /dev/null +++ b/software/gsl-1.15/cblas/dspr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dspr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, const int incX, + double *Ap) +{ +#define BASE double +#include "source_spr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dspr2.c b/software/gsl-1.15/cblas/dspr2.c new file mode 100644 index 000000000..e10ac8669 --- /dev/null +++ b/software/gsl-1.15/cblas/dspr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dspr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, const int incX, + const double *Y, const int incY, double *Ap) +{ +#define BASE double +#include "source_spr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dswap.c b/software/gsl-1.15/cblas/dswap.c new file mode 100644 index 000000000..e8401a5f6 --- /dev/null +++ b/software/gsl-1.15/cblas/dswap.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_dswap (const int N, double *X, const int incX, double *Y, + const int incY) +{ +#define BASE double +#include "source_swap_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsymm.c b/software/gsl-1.15/cblas/dsymm.c new file mode 100644 index 000000000..a57c47659 --- /dev/null +++ b/software/gsl-1.15/cblas/dsymm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dsymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const double alpha, const double *A, const int lda, + const double *B, const int ldb, const double beta, double *C, + const int ldc) +{ +#define BASE double +#include "source_symm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsymv.c b/software/gsl-1.15/cblas/dsymv.c new file mode 100644 index 000000000..81311dbf5 --- /dev/null +++ b/software/gsl-1.15/cblas/dsymv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dsymv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *A, const int lda, + const double *X, const int incX, const double beta, double *Y, + const int incY) +{ +#define BASE double +#include "source_symv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsyr.c b/software/gsl-1.15/cblas/dsyr.c new file mode 100644 index 000000000..790f82990 --- /dev/null +++ b/software/gsl-1.15/cblas/dsyr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dsyr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, const int incX, + double *A, const int lda) +{ +#define BASE double +#include "source_syr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsyr2.c b/software/gsl-1.15/cblas/dsyr2.c new file mode 100644 index 000000000..ce5e005ed --- /dev/null +++ b/software/gsl-1.15/cblas/dsyr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dsyr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, const int incX, + const double *Y, const int incY, double *A, const int lda) +{ +#define BASE double +#include "source_syr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsyr2k.c b/software/gsl-1.15/cblas/dsyr2k.c new file mode 100644 index 000000000..79e6dff40 --- /dev/null +++ b/software/gsl-1.15/cblas/dsyr2k.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dsyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const double *A, const int lda, + const double *B, const int ldb, const double beta, double *C, + const int ldc) +{ +#define BASE double +#include "source_syr2k_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dsyrk.c b/software/gsl-1.15/cblas/dsyrk.c new file mode 100644 index 000000000..f244ad7ec --- /dev/null +++ b/software/gsl-1.15/cblas/dsyrk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dsyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const double *A, const int lda, + const double beta, double *C, const int ldc) +{ +#define BASE double +#include "source_syrk_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtbmv.c b/software/gsl-1.15/cblas/dtbmv.c new file mode 100644 index 000000000..d9559b004 --- /dev/null +++ b/software/gsl-1.15/cblas/dtbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const double *A, const int lda, + double *X, const int incX) +{ +#define BASE double +#include "source_tbmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtbsv.c b/software/gsl-1.15/cblas/dtbsv.c new file mode 100644 index 000000000..13815f8f9 --- /dev/null +++ b/software/gsl-1.15/cblas/dtbsv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const double *A, const int lda, + double *X, const int incX) +{ +#define BASE double +#include "source_tbsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtpmv.c b/software/gsl-1.15/cblas/dtpmv.c new file mode 100644 index 000000000..6071fe7f8 --- /dev/null +++ b/software/gsl-1.15/cblas/dtpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *Ap, double *X, const int incX) +{ +#define BASE double +#include "source_tpmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtpsv.c b/software/gsl-1.15/cblas/dtpsv.c new file mode 100644 index 000000000..b68bea287 --- /dev/null +++ b/software/gsl-1.15/cblas/dtpsv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *Ap, double *X, const int incX) +{ +#define BASE double +#include "source_tpsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtrmm.c b/software/gsl-1.15/cblas/dtrmm.c new file mode 100644 index 000000000..ded316122 --- /dev/null +++ b/software/gsl-1.15/cblas/dtrmm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dtrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const double alpha, const double *A, const int lda, double *B, + const int ldb) +{ +#define BASE double +#include "source_trmm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtrmv.c b/software/gsl-1.15/cblas/dtrmv.c new file mode 100644 index 000000000..eede09974 --- /dev/null +++ b/software/gsl-1.15/cblas/dtrmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *A, const int lda, double *X, + const int incX) +{ +#define BASE double +#include "source_trmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtrsm.c b/software/gsl-1.15/cblas/dtrsm.c new file mode 100644 index 000000000..a50b5fa3c --- /dev/null +++ b/software/gsl-1.15/cblas/dtrsm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_dtrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const double alpha, const double *A, const int lda, double *B, + const int ldb) +{ +#define BASE double +#include "source_trsm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dtrsv.c b/software/gsl-1.15/cblas/dtrsv.c new file mode 100644 index 000000000..fc069c0a8 --- /dev/null +++ b/software/gsl-1.15/cblas/dtrsv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_dtrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *A, const int lda, double *X, + const int incX) +{ +#define BASE double +#include "source_trsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dzasum.c b/software/gsl-1.15/cblas/dzasum.c new file mode 100644 index 000000000..7484ede7f --- /dev/null +++ b/software/gsl-1.15/cblas/dzasum.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +double +cblas_dzasum (const int N, const void *X, const int incX) +{ +#define BASE double +#include "source_asum_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/dznrm2.c b/software/gsl-1.15/cblas/dznrm2.c new file mode 100644 index 000000000..d58ec9f5a --- /dev/null +++ b/software/gsl-1.15/cblas/dznrm2.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +double +cblas_dznrm2 (const int N, const void *X, const int incX) +{ +#define BASE double +#include "source_nrm2_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/error_cblas.h b/software/gsl-1.15/cblas/error_cblas.h new file mode 100644 index 000000000..342bf3b8f --- /dev/null +++ b/software/gsl-1.15/cblas/error_cblas.h @@ -0,0 +1,87 @@ +/* cblas/error_cblas.h + * + * Copyright (C) 2010 José Luis García Pallero + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __ERROR_CBLAS_H__ +#define __ERROR_CBLAS_H__ + + +#define CHECK_ARGS_X(FUNCTION,VAR,ARGS) do { int VAR = 0 ; \ + CBLAS_ERROR_##FUNCTION ARGS ; \ + if (VAR) cblas_xerbla(pos,__FILE__,""); } while (0) + +#define CHECK_ARGS7(FUNCTION,A1,A2,A3,A4,A5,A6,A7) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7)) + +#define CHECK_ARGS8(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8)) + +#define CHECK_ARGS9(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9)) + +#define CHECK_ARGS10(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10)) + +#define CHECK_ARGS11(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11)) + +#define CHECK_ARGS12(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12)) + +#define CHECK_ARGS13(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13)) + +#define CHECK_ARGS14(FUNCTION,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14) \ + CHECK_ARGS_X(FUNCTION,pos,(pos,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14)) + +/* check if CBLAS_ORDER is correct */ +#define CHECK_ORDER(pos,posIfError,order) \ +if(((order)!=CblasRowMajor)&&((order)!=CblasColMajor)) \ + pos = posIfError; + +/* check if CBLAS_TRANSPOSE is correct */ +#define CHECK_TRANSPOSE(pos,posIfError,Trans) \ +if(((Trans)!=CblasNoTrans)&&((Trans)!=CblasTrans)&&((Trans)!=CblasConjTrans)) \ + pos = posIfError; + +/* check if CBLAS_UPLO is correct */ +#define CHECK_UPLO(pos,posIfError,Uplo) \ +if(((Uplo)!=CblasUpper)&&((Uplo)!=CblasLower)) \ + pos = posIfError; + +/* check if CBLAS_DIAG is correct */ +#define CHECK_DIAG(pos,posIfError,Diag) \ +if(((Diag)!=CblasNonUnit)&&((Diag)!=CblasUnit)) \ + pos = posIfError; + +/* check if CBLAS_SIDE is correct */ +#define CHECK_SIDE(pos,posIfError,Side) \ +if(((Side)!=CblasLeft)&&((Side)!=CblasRight)) \ + pos = posIfError; + +/* check if a dimension argument is correct */ +#define CHECK_DIM(pos,posIfError,dim) \ +if((dim)<0) \ + pos = posIfError; + +/* check if a stride argument is correct */ +#define CHECK_STRIDE(pos,posIfError,stride) \ +if((stride)==0) \ + pos = posIfError; + +#endif /* __ERROR_CBLAS_H__ */ diff --git a/software/gsl-1.15/cblas/error_cblas_l2.h b/software/gsl-1.15/cblas/error_cblas_l2.h new file mode 100644 index 000000000..480b78d5a --- /dev/null +++ b/software/gsl-1.15/cblas/error_cblas_l2.h @@ -0,0 +1,239 @@ +/* cblas/error_cblas_l2.h + * + * Copyright (C) 2010 José Luis García Pallero + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __ERROR_CBLAS_L2_H__ +#define __ERROR_CBLAS_L2_H__ +#include +#include "error_cblas.h" +/* + * ============================================================================= + * Prototypes for level 2 BLAS + * ============================================================================= + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ + +/* cblas_xgemv() */ +#define CBLAS_ERROR_GEMV(pos,order,TransA,M,N,alpha,A,lda,X,incX,beta,Y,incY) \ +CHECK_ORDER(pos,1,order); \ +CHECK_TRANSPOSE(pos,2,TransA); \ +CHECK_DIM(pos,3,M); \ +CHECK_DIM(pos,4,N); \ +if((order)==CblasRowMajor) { \ + if((lda) +#include "error_cblas.h" + +/* + * ============================================================================= + * Prototypes for level 3 BLAS + * ============================================================================= + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ + +/* cblas_xgemm() */ +#define CBLAS_ERROR_GEMM(pos,Order,TransA,TransB,M,N,K,alpha,A,lda,B,ldb,beta,C,ldc) \ +{ \ + enum CBLAS_TRANSPOSE __transF=CblasNoTrans,__transG=CblasNoTrans; \ + if((Order)==CblasRowMajor) { \ + __transF = ((TransA)!=CblasConjTrans) ? (TransA) : CblasTrans; \ + __transG = ((TransB)!=CblasConjTrans) ? (TransB) : CblasTrans; \ + } else { \ + __transF = ((TransB)!=CblasConjTrans) ? (TransB) : CblasTrans; \ + __transG = ((TransA)!=CblasConjTrans) ? (TransA) : CblasTrans; \ + } \ + CHECK_ORDER(pos,1,Order); \ + CHECK_TRANSPOSE(pos,2,TransA); \ + CHECK_TRANSPOSE(pos,3,TransB); \ + CHECK_DIM(pos,4,M); \ + CHECK_DIM(pos,5,N); \ + CHECK_DIM(pos,6,K); \ + if((Order)==CblasRowMajor) { \ + if(__transF==CblasNoTrans) { \ + if((lda) + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* + * Enumerated and derived types + */ +#define CBLAS_INDEX size_t /* this may vary between platforms */ + +enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102}; +enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113}; +enum CBLAS_UPLO {CblasUpper=121, CblasLower=122}; +enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132}; +enum CBLAS_SIDE {CblasLeft=141, CblasRight=142}; + +/* + * =========================================================================== + * Prototypes for level 1 BLAS functions (complex are recast as routines) + * =========================================================================== + */ +float cblas_sdsdot(const int N, const float alpha, const float *X, + const int incX, const float *Y, const int incY); +double cblas_dsdot(const int N, const float *X, const int incX, const float *Y, + const int incY); +float cblas_sdot(const int N, const float *X, const int incX, + const float *Y, const int incY); +double cblas_ddot(const int N, const double *X, const int incX, + const double *Y, const int incY); + +/* + * Functions having prefixes Z and C only + */ +void cblas_cdotu_sub(const int N, const void *X, const int incX, + const void *Y, const int incY, void *dotu); +void cblas_cdotc_sub(const int N, const void *X, const int incX, + const void *Y, const int incY, void *dotc); + +void cblas_zdotu_sub(const int N, const void *X, const int incX, + const void *Y, const int incY, void *dotu); +void cblas_zdotc_sub(const int N, const void *X, const int incX, + const void *Y, const int incY, void *dotc); + + +/* + * Functions having prefixes S D SC DZ + */ +float cblas_snrm2(const int N, const float *X, const int incX); +float cblas_sasum(const int N, const float *X, const int incX); + +double cblas_dnrm2(const int N, const double *X, const int incX); +double cblas_dasum(const int N, const double *X, const int incX); + +float cblas_scnrm2(const int N, const void *X, const int incX); +float cblas_scasum(const int N, const void *X, const int incX); + +double cblas_dznrm2(const int N, const void *X, const int incX); +double cblas_dzasum(const int N, const void *X, const int incX); + + +/* + * Functions having standard 4 prefixes (S D C Z) + */ +CBLAS_INDEX cblas_isamax(const int N, const float *X, const int incX); +CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX); +CBLAS_INDEX cblas_icamax(const int N, const void *X, const int incX); +CBLAS_INDEX cblas_izamax(const int N, const void *X, const int incX); + +/* + * =========================================================================== + * Prototypes for level 1 BLAS routines + * =========================================================================== + */ + +/* + * Routines with standard 4 prefixes (s, d, c, z) + */ +void cblas_sswap(const int N, float *X, const int incX, + float *Y, const int incY); +void cblas_scopy(const int N, const float *X, const int incX, + float *Y, const int incY); +void cblas_saxpy(const int N, const float alpha, const float *X, + const int incX, float *Y, const int incY); + +void cblas_dswap(const int N, double *X, const int incX, + double *Y, const int incY); +void cblas_dcopy(const int N, const double *X, const int incX, + double *Y, const int incY); +void cblas_daxpy(const int N, const double alpha, const double *X, + const int incX, double *Y, const int incY); + +void cblas_cswap(const int N, void *X, const int incX, + void *Y, const int incY); +void cblas_ccopy(const int N, const void *X, const int incX, + void *Y, const int incY); +void cblas_caxpy(const int N, const void *alpha, const void *X, + const int incX, void *Y, const int incY); + +void cblas_zswap(const int N, void *X, const int incX, + void *Y, const int incY); +void cblas_zcopy(const int N, const void *X, const int incX, + void *Y, const int incY); +void cblas_zaxpy(const int N, const void *alpha, const void *X, + const int incX, void *Y, const int incY); + + +/* + * Routines with S and D prefix only + */ +void cblas_srotg(float *a, float *b, float *c, float *s); +void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P); +void cblas_srot(const int N, float *X, const int incX, + float *Y, const int incY, const float c, const float s); +void cblas_srotm(const int N, float *X, const int incX, + float *Y, const int incY, const float *P); + +void cblas_drotg(double *a, double *b, double *c, double *s); +void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P); +void cblas_drot(const int N, double *X, const int incX, + double *Y, const int incY, const double c, const double s); +void cblas_drotm(const int N, double *X, const int incX, + double *Y, const int incY, const double *P); + + +/* + * Routines with S D C Z CS and ZD prefixes + */ +void cblas_sscal(const int N, const float alpha, float *X, const int incX); +void cblas_dscal(const int N, const double alpha, double *X, const int incX); +void cblas_cscal(const int N, const void *alpha, void *X, const int incX); +void cblas_zscal(const int N, const void *alpha, void *X, const int incX); +void cblas_csscal(const int N, const float alpha, void *X, const int incX); +void cblas_zdscal(const int N, const double alpha, void *X, const int incX); + +/* + * =========================================================================== + * Prototypes for level 2 BLAS + * =========================================================================== + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ +void cblas_sgemv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const float alpha, const float *A, const int lda, + const float *X, const int incX, const float beta, + float *Y, const int incY); +void cblas_sgbmv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const int KL, const int KU, const float alpha, + const float *A, const int lda, const float *X, + const int incX, const float beta, float *Y, const int incY); +void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *A, const int lda, + float *X, const int incX); +void cblas_stbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const float *A, const int lda, + float *X, const int incX); +void cblas_stpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *Ap, float *X, const int incX); +void cblas_strsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *A, const int lda, float *X, + const int incX); +void cblas_stbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const float *A, const int lda, + float *X, const int incX); +void cblas_stpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *Ap, float *X, const int incX); + +void cblas_dgemv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const double alpha, const double *A, const int lda, + const double *X, const int incX, const double beta, + double *Y, const int incY); +void cblas_dgbmv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const int KL, const int KU, const double alpha, + const double *A, const int lda, const double *X, + const int incX, const double beta, double *Y, const int incY); +void cblas_dtrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *A, const int lda, + double *X, const int incX); +void cblas_dtbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const double *A, const int lda, + double *X, const int incX); +void cblas_dtpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *Ap, double *X, const int incX); +void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *A, const int lda, double *X, + const int incX); +void cblas_dtbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const double *A, const int lda, + double *X, const int incX); +void cblas_dtpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const double *Ap, double *X, const int incX); + +void cblas_cgemv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *X, const int incX, const void *beta, + void *Y, const int incY); +void cblas_cgbmv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const int KL, const int KU, const void *alpha, + const void *A, const int lda, const void *X, + const int incX, const void *beta, void *Y, const int incY); +void cblas_ctrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, + void *X, const int incX); +void cblas_ctbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, + void *X, const int incX); +void cblas_ctpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX); +void cblas_ctrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX); +void cblas_ctbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, + void *X, const int incX); +void cblas_ctpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX); + +void cblas_zgemv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *X, const int incX, const void *beta, + void *Y, const int incY); +void cblas_zgbmv(const enum CBLAS_ORDER order, + const enum CBLAS_TRANSPOSE TransA, const int M, const int N, + const int KL, const int KU, const void *alpha, + const void *A, const int lda, const void *X, + const int incX, const void *beta, void *Y, const int incY); +void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, + void *X, const int incX); +void cblas_ztbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, + void *X, const int incX); +void cblas_ztpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX); +void cblas_ztrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX); +void cblas_ztbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, + void *X, const int incX); +void cblas_ztpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX); + + +/* + * Routines with S and D prefixes only + */ +void cblas_ssymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *A, + const int lda, const float *X, const int incX, + const float beta, float *Y, const int incY); +void cblas_ssbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const float alpha, const float *A, + const int lda, const float *X, const int incX, + const float beta, float *Y, const int incY); +void cblas_sspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *Ap, + const float *X, const int incX, + const float beta, float *Y, const int incY); +void cblas_sger(const enum CBLAS_ORDER order, const int M, const int N, + const float alpha, const float *X, const int incX, + const float *Y, const int incY, float *A, const int lda); +void cblas_ssyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, + const int incX, float *A, const int lda); +void cblas_sspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, + const int incX, float *Ap); +void cblas_ssyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, + const int incX, const float *Y, const int incY, float *A, + const int lda); +void cblas_sspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, + const int incX, const float *Y, const int incY, float *A); + +void cblas_dsymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *A, + const int lda, const double *X, const int incX, + const double beta, double *Y, const int incY); +void cblas_dsbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const double alpha, const double *A, + const int lda, const double *X, const int incX, + const double beta, double *Y, const int incY); +void cblas_dspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *Ap, + const double *X, const int incX, + const double beta, double *Y, const int incY); +void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N, + const double alpha, const double *X, const int incX, + const double *Y, const int incY, double *A, const int lda); +void cblas_dsyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, + const int incX, double *A, const int lda); +void cblas_dspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, + const int incX, double *Ap); +void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, + const int incX, const double *Y, const int incY, double *A, + const int lda); +void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const double *X, + const int incX, const double *Y, const int incY, double *A); + + +/* + * Routines with C and Z prefixes only + */ +void cblas_chemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *A, + const int lda, const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_chbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const void *alpha, const void *A, + const int lda, const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_chpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *Ap, + const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_cgeru(const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_cgerc(const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_cher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const void *X, const int incX, + void *A, const int lda); +void cblas_chpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const void *X, + const int incX, void *A); +void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_chpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *Ap); + +void cblas_zhemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *A, + const int lda, const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_zhbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const void *alpha, const void *A, + const int lda, const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_zhpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *Ap, + const void *X, const int incX, + const void *beta, void *Y, const int incY); +void cblas_zgeru(const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_zgerc(const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const void *X, const int incX, + void *A, const int lda); +void cblas_zhpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const void *X, + const int incX, void *A); +void cblas_zher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda); +void cblas_zhpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, + const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *Ap); + +/* + * =========================================================================== + * Prototypes for level 3 BLAS + * =========================================================================== + */ + +/* + * Routines with standard 4 prefixes (S, D, C, Z) + */ +void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const float alpha, const float *A, + const int lda, const float *B, const int ldb, + const float beta, float *C, const int ldc); +void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const float alpha, const float *A, const int lda, + const float *B, const int ldb, const float beta, + float *C, const int ldc); +void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const float *A, const int lda, + const float beta, float *C, const int ldc); +void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const float *A, const int lda, + const float *B, const int ldb, const float beta, + float *C, const int ldc); +void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const float alpha, const float *A, const int lda, + float *B, const int ldb); +void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const float alpha, const float *A, const int lda, + float *B, const int ldb); + +void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const double alpha, const double *A, + const int lda, const double *B, const int ldb, + const double beta, double *C, const int ldc); +void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const double alpha, const double *A, const int lda, + const double *B, const int ldb, const double beta, + double *C, const int ldc); +void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const double *A, const int lda, + const double beta, double *C, const int ldc); +void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const double *A, const int lda, + const double *B, const int ldb, const double beta, + double *C, const int ldc); +void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const double alpha, const double *A, const int lda, + double *B, const int ldb); +void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const double alpha, const double *A, const int lda, + double *B, const int ldb); + +void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const void *alpha, const void *A, + const int lda, const void *B, const int ldb, + const void *beta, void *C, const int ldc); +void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *beta, void *C, const int ldc); +void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, + void *B, const int ldb); +void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, + void *B, const int ldb); + +void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const void *alpha, const void *A, + const int lda, const void *B, const int ldb, + const void *beta, void *C, const int ldc); +void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *beta, void *C, const int ldc); +void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, + void *B, const int ldb); +void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, + void *B, const int ldb); + + +/* + * Routines with prefixes C and Z only + */ +void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const void *A, const int lda, + const float beta, void *C, const int ldc); +void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const float beta, + void *C, const int ldc); + +void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, + void *C, const int ldc); +void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const void *A, const int lda, + const double beta, void *C, const int ldc); +void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const double beta, + void *C, const int ldc); + +void cblas_xerbla(int p, const char *rout, const char *form, ...); + +__END_DECLS + +#endif /* __GSL_CBLAS_H__ */ diff --git a/software/gsl-1.15/cblas/hypot.c b/software/gsl-1.15/cblas/hypot.c new file mode 100644 index 000000000..8f6bb47d4 --- /dev/null +++ b/software/gsl-1.15/cblas/hypot.c @@ -0,0 +1,28 @@ +#include + +static double xhypot (const double x, const double y); + +static double xhypot (const double x, const double y) +{ + double xabs = fabs(x) ; + double yabs = fabs(y) ; + double min, max; + + if (xabs < yabs) { + min = xabs ; + max = yabs ; + } else { + min = yabs ; + max = xabs ; + } + + if (min == 0) + { + return max ; + } + + { + double u = min / max ; + return max * sqrt (1 + u * u) ; + } +} diff --git a/software/gsl-1.15/cblas/icamax.c b/software/gsl-1.15/cblas/icamax.c new file mode 100644 index 000000000..cf0f3440f --- /dev/null +++ b/software/gsl-1.15/cblas/icamax.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +CBLAS_INDEX +cblas_icamax (const int N, const void *X, const int incX) +{ +#define BASE float +#include "source_iamax_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/idamax.c b/software/gsl-1.15/cblas/idamax.c new file mode 100644 index 000000000..b6372e787 --- /dev/null +++ b/software/gsl-1.15/cblas/idamax.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +CBLAS_INDEX +cblas_idamax (const int N, const double *X, const int incX) +{ +#define BASE double +#include "source_iamax_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/isamax.c b/software/gsl-1.15/cblas/isamax.c new file mode 100644 index 000000000..6e7279a37 --- /dev/null +++ b/software/gsl-1.15/cblas/isamax.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +CBLAS_INDEX +cblas_isamax (const int N, const float *X, const int incX) +{ +#define BASE float +#include "source_iamax_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/izamax.c b/software/gsl-1.15/cblas/izamax.c new file mode 100644 index 000000000..e3ae67526 --- /dev/null +++ b/software/gsl-1.15/cblas/izamax.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +CBLAS_INDEX +cblas_izamax (const int N, const void *X, const int incX) +{ +#define BASE double +#include "source_iamax_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sasum.c b/software/gsl-1.15/cblas/sasum.c new file mode 100644 index 000000000..019d925d1 --- /dev/null +++ b/software/gsl-1.15/cblas/sasum.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +float +cblas_sasum (const int N, const float *X, const int incX) +{ +#define BASE float +#include "source_asum_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/saxpy.c b/software/gsl-1.15/cblas/saxpy.c new file mode 100644 index 000000000..af08d4df7 --- /dev/null +++ b/software/gsl-1.15/cblas/saxpy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_saxpy (const int N, const float alpha, const float *X, const int incX, + float *Y, const int incY) +{ +#define BASE float +#include "source_axpy_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/scasum.c b/software/gsl-1.15/cblas/scasum.c new file mode 100644 index 000000000..af8748222 --- /dev/null +++ b/software/gsl-1.15/cblas/scasum.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +float +cblas_scasum (const int N, const void *X, const int incX) +{ +#define BASE float +#include "source_asum_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/scnrm2.c b/software/gsl-1.15/cblas/scnrm2.c new file mode 100644 index 000000000..4653c13ee --- /dev/null +++ b/software/gsl-1.15/cblas/scnrm2.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +float +cblas_scnrm2 (const int N, const void *X, const int incX) +{ +#define BASE float +#include "source_nrm2_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/scopy.c b/software/gsl-1.15/cblas/scopy.c new file mode 100644 index 000000000..423a386d2 --- /dev/null +++ b/software/gsl-1.15/cblas/scopy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_scopy (const int N, const float *X, const int incX, float *Y, + const int incY) +{ +#define BASE float +#include "source_copy_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sdot.c b/software/gsl-1.15/cblas/sdot.c new file mode 100644 index 000000000..c65904f80 --- /dev/null +++ b/software/gsl-1.15/cblas/sdot.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" + +float +cblas_sdot (const int N, const float *X, const int incX, const float *Y, + const int incY) +{ +#define INIT_VAL 0.0 +#define ACC_TYPE float +#define BASE float +#include "source_dot_r.h" +#undef ACC_TYPE +#undef BASE +#undef INIT_VAL +} diff --git a/software/gsl-1.15/cblas/sdsdot.c b/software/gsl-1.15/cblas/sdsdot.c new file mode 100644 index 000000000..5672ac434 --- /dev/null +++ b/software/gsl-1.15/cblas/sdsdot.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" + +float +cblas_sdsdot (const int N, const float alpha, const float *X, const int incX, + const float *Y, const int incY) +{ +#define INIT_VAL alpha +#define ACC_TYPE double +#define BASE float +#include "source_dot_r.h" +#undef ACC_TYPE +#undef BASE +#undef INIT_VAL +} diff --git a/software/gsl-1.15/cblas/sgbmv.c b/software/gsl-1.15/cblas/sgbmv.c new file mode 100644 index 000000000..281d5c756 --- /dev/null +++ b/software/gsl-1.15/cblas/sgbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const int KL, const int KU, + const float alpha, const float *A, const int lda, const float *X, + const int incX, const float beta, float *Y, const int incY) +{ +#define BASE float +#include "source_gbmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sgemm.c b/software/gsl-1.15/cblas/sgemm.c new file mode 100644 index 000000000..18832328f --- /dev/null +++ b/software/gsl-1.15/cblas/sgemm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_sgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const float alpha, const float *A, const int lda, + const float *B, const int ldb, const float beta, float *C, + const int ldc) +{ +#define BASE float +#include "source_gemm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sgemv.c b/software/gsl-1.15/cblas/sgemv.c new file mode 100644 index 000000000..bbdfeee4d --- /dev/null +++ b/software/gsl-1.15/cblas/sgemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const float alpha, const float *A, + const int lda, const float *X, const int incX, const float beta, + float *Y, const int incY) +{ +#define BASE float +#include "source_gemv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sger.c b/software/gsl-1.15/cblas/sger.c new file mode 100644 index 000000000..4f2da43e0 --- /dev/null +++ b/software/gsl-1.15/cblas/sger.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sger (const enum CBLAS_ORDER order, const int M, const int N, + const float alpha, const float *X, const int incX, const float *Y, + const int incY, float *A, const int lda) +{ +#define BASE float +#include "source_ger.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/snrm2.c b/software/gsl-1.15/cblas/snrm2.c new file mode 100644 index 000000000..76b3d59c0 --- /dev/null +++ b/software/gsl-1.15/cblas/snrm2.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +float +cblas_snrm2 (const int N, const float *X, const int incX) +{ +#define BASE float +#include "source_nrm2_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/source_asum_c.h b/software/gsl-1.15/cblas/source_asum_c.h new file mode 100644 index 000000000..5b4abb6ec --- /dev/null +++ b/software/gsl-1.15/cblas/source_asum_c.h @@ -0,0 +1,34 @@ +/* blas/source_asum_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE r = 0.0; + INDEX i; + INDEX ix = 0; + + if (incX <= 0) { + return 0; + } + + for (i = 0; i < N; i++) { + r += fabs(CONST_REAL(X, ix)) + fabs(CONST_IMAG(X, ix)); + ix += incX; + } + return r; +} diff --git a/software/gsl-1.15/cblas/source_asum_r.h b/software/gsl-1.15/cblas/source_asum_r.h new file mode 100644 index 000000000..863619ee8 --- /dev/null +++ b/software/gsl-1.15/cblas/source_asum_r.h @@ -0,0 +1,34 @@ +/* blas/source_asum_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE r = 0.0; + INDEX i; + INDEX ix = 0; + + if (incX <= 0) { + return 0; + } + + for (i = 0; i < N; i++) { + r += fabs(X[ix]); + ix += incX; + } + return r; +} diff --git a/software/gsl-1.15/cblas/source_axpy_c.h b/software/gsl-1.15/cblas/source_axpy_c.h new file mode 100644 index 000000000..fbf543dbe --- /dev/null +++ b/software/gsl-1.15/cblas/source_axpy_c.h @@ -0,0 +1,40 @@ +/* blas/source_axpy_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (fabs(alpha_real) == 0 && fabs(alpha_imag) == 0) { + return; + } + + for (i = 0; i < N; i++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + REAL(Y, iy) += (alpha_real * x_real - alpha_imag * x_imag); + IMAG(Y, iy) += (alpha_real * x_imag + alpha_imag * x_real); + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_axpy_r.h b/software/gsl-1.15/cblas/source_axpy_r.h new file mode 100644 index 000000000..1e8ad7abf --- /dev/null +++ b/software/gsl-1.15/cblas/source_axpy_r.h @@ -0,0 +1,50 @@ +/* blas/source_axpy_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + + if (alpha == 0.0) { + return; + } + + if (incX == 1 && incY == 1) { + const INDEX m = N % 4; + + for (i = 0; i < m; i++) { + Y[i] += alpha * X[i]; + } + + for (i = m; i + 3 < N; i += 4) { + Y[i] += alpha * X[i]; + Y[i + 1] += alpha * X[i + 1]; + Y[i + 2] += alpha * X[i + 2]; + Y[i + 3] += alpha * X[i + 3]; + } + } else { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + Y[iy] += alpha * X[ix]; + ix += incX; + iy += incY; + } + } +} diff --git a/software/gsl-1.15/cblas/source_copy_c.h b/software/gsl-1.15/cblas/source_copy_c.h new file mode 100644 index 000000000..d3248cd13 --- /dev/null +++ b/software/gsl-1.15/cblas/source_copy_c.h @@ -0,0 +1,31 @@ +/* blas/source_copy_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + REAL(Y, iy) = CONST_REAL(X, ix); + IMAG(Y, iy) = CONST_IMAG(X, ix); + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_copy_r.h b/software/gsl-1.15/cblas/source_copy_r.h new file mode 100644 index 000000000..ba0abef99 --- /dev/null +++ b/software/gsl-1.15/cblas/source_copy_r.h @@ -0,0 +1,30 @@ +/* blas/source_copy_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + Y[iy] = X[ix]; + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_dot_c.h b/software/gsl-1.15/cblas/source_dot_c.h new file mode 100644 index 000000000..fa1aca5c4 --- /dev/null +++ b/software/gsl-1.15/cblas/source_dot_c.h @@ -0,0 +1,38 @@ +/* blas/source_dot_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE r_real = 0.0; + BASE r_imag = 0.0; + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + const BASE y_real = CONST_REAL(Y, iy); + const BASE y_imag = CONST_IMAG(Y, iy); + r_real += x_real * y_real - CONJ_SIGN * x_imag * y_imag; + r_imag += x_real * y_imag + CONJ_SIGN * x_imag * y_real; + ix += incX; + iy += incY; + } + REAL0(result) = r_real; + IMAG0(result) = r_imag; +} diff --git a/software/gsl-1.15/cblas/source_dot_r.h b/software/gsl-1.15/cblas/source_dot_r.h new file mode 100644 index 000000000..b83f85e7e --- /dev/null +++ b/software/gsl-1.15/cblas/source_dot_r.h @@ -0,0 +1,33 @@ +/* blas/source_dot_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + ACC_TYPE r = INIT_VAL; + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + r += X[ix] * Y[iy]; + ix += incX; + iy += incY; + } + + return r; +} diff --git a/software/gsl-1.15/cblas/source_gbmv_c.h b/software/gsl-1.15/cblas/source_gbmv_c.h new file mode 100644 index 000000000..3c4d5e49e --- /dev/null +++ b/software/gsl-1.15/cblas/source_gbmv_c.h @@ -0,0 +1,172 @@ +/* blas/source_gbmv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + INDEX lenX, lenY, L, U; + + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + CHECK_ARGS14(GBMV,order,TransA,M,N,KL,KU,alpha,A,lda,X,incX,beta,Y,incY); + + if (M == 0 || N == 0) + return; + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (TransA == CblasNoTrans) { + lenX = N; + lenY = M; + L = KL; + U = KU; + } else { + lenX = M; + lenY = N; + L = KU; + U = KL; + } + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + REAL(Y, iy) = 0.0; + IMAG(Y, iy) = 0.0; + iy += incY; + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + const BASE y_real = REAL(Y, iy); + const BASE y_imag = IMAG(Y, iy); + const BASE tmpR = y_real * beta_real - y_imag * beta_imag; + const BASE tmpI = y_real * beta_imag + y_imag * beta_real; + REAL(Y, iy) = tmpR; + IMAG(Y, iy) = tmpI; + iy += incY; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if ((order == CblasRowMajor && TransA == CblasNoTrans) + || (order == CblasColMajor && TransA == CblasTrans)) { + /* form y := alpha*A*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE dotR = 0.0; + BASE dotI = 0.0; + const INDEX j_min = (i > L ? i - L : 0); + const INDEX j_max = GSL_MIN(lenX, i + U + 1); + INDEX ix = OFFSET(lenX, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + (L + j - i)); + const BASE A_imag = CONST_IMAG(A, lda * i + (L + j - i)); + + dotR += A_real * x_real - A_imag * x_imag; + dotI += A_real * x_imag + A_imag * x_real; + ix += incX; + } + + REAL(Y, iy) += alpha_real * dotR - alpha_imag * dotI; + IMAG(Y, iy) += alpha_real * dotI + alpha_imag * dotR; + iy += incY; + } + } else if ((order == CblasRowMajor && TransA == CblasTrans) + || (order == CblasColMajor && TransA == CblasNoTrans)) { + /* form y := alpha*A'*x + y */ + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + BASE tmpR = alpha_real * x_real - alpha_imag * x_imag; + BASE tmpI = alpha_real * x_imag + alpha_imag * x_real; + if (!(tmpR == 0.0 && tmpI == 0.0)) { + const INDEX i_min = (j > U ? j - U : 0); + const INDEX i_max = GSL_MIN(lenY, j + L + 1); + INDEX iy = OFFSET(lenY, incY) + i_min * incY; + for (i = i_min; i < i_max; i++) { + const BASE A_real = CONST_REAL(A, lda * j + (U + i - j)); + const BASE A_imag = CONST_IMAG(A, lda * j + (U + i - j)); + REAL(Y, iy) += A_real * tmpR - A_imag * tmpI; + IMAG(Y, iy) += A_real * tmpI + A_imag * tmpR; + iy += incY; + } + } + ix += incX; + } + } else if (order == CblasRowMajor && TransA == CblasConjTrans) { + /* form y := alpha*A^H*x + y */ + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + BASE tmpR = alpha_real * x_real - alpha_imag * x_imag; + BASE tmpI = alpha_real * x_imag + alpha_imag * x_real; + if (!(tmpR == 0.0 && tmpI == 0.0)) { + const INDEX i_min = (j > U ? j - U : 0); + const INDEX i_max = GSL_MIN(lenY, j + L + 1); + INDEX iy = OFFSET(lenY, incY) + i_min * incY; + for (i = i_min; i < i_max; i++) { + const BASE A_real = CONST_REAL(A, lda * j + (U + i - j)); + const BASE A_imag = CONST_IMAG(A, lda * j + (U + i - j)); + REAL(Y, iy) += A_real * tmpR - (-A_imag) * tmpI; + IMAG(Y, iy) += A_real * tmpI + (-A_imag) * tmpR; + iy += incY; + } + } + ix += incX; + } + } else if (order == CblasColMajor && TransA == CblasConjTrans) { + /* form y := alpha*A^H*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE dotR = 0.0; + BASE dotI = 0.0; + const INDEX j_min = (i > L ? i - L : 0); + const INDEX j_max = GSL_MIN(lenX, i + U + 1); + INDEX ix = OFFSET(lenX, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + (L + j - i)); + const BASE A_imag = CONST_IMAG(A, lda * i + (L + j - i)); + + dotR += A_real * x_real - (-A_imag) * x_imag; + dotI += A_real * x_imag + (-A_imag) * x_real; + ix += incX; + } + + REAL(Y, iy) += alpha_real * dotR - alpha_imag * dotI; + IMAG(Y, iy) += alpha_real * dotI + alpha_imag * dotR; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_gbmv_r.h b/software/gsl-1.15/cblas/source_gbmv_r.h new file mode 100644 index 000000000..3905508c8 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gbmv_r.h @@ -0,0 +1,100 @@ +/* blas/source_gbmv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + INDEX lenX, lenY, L, U; + + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS14(GBMV,order,TransA,M,N,KL,KU,alpha,A,lda,X,incX,beta,Y,incY); + + if (M == 0 || N == 0) + return; + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Trans == CblasNoTrans) { + lenX = N; + lenY = M; + L = KL; + U = KU; + } else { + lenX = M; + lenY = N; + L = KU; + U = KL; + } + + /* form y := beta*y */ + if (beta == 0.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + Y[iy] = 0; + iy += incY; + } + } else if (beta != 1.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + Y[iy] *= beta; + iy += incY; + } + } + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Trans == CblasNoTrans) + || (order == CblasColMajor && Trans == CblasTrans)) { + /* form y := alpha*A*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE temp = 0.0; + const INDEX j_min = (i > L ? i - L : 0); + const INDEX j_max = GSL_MIN(lenX, i + U + 1); + INDEX jx = OFFSET(lenX, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[(L - i + j) + i * lda]; + jx += incX; + } + Y[iy] += alpha * temp; + iy += incY; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans) + || (order == CblasColMajor && Trans == CblasNoTrans)) { + /* form y := alpha*A'*x + y */ + INDEX jx = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE temp = alpha * X[jx]; + if (temp != 0.0) { + const INDEX i_min = (j > U ? j - U : 0); + const INDEX i_max = GSL_MIN(lenY, j + L + 1); + INDEX iy = OFFSET(lenY, incY) + i_min * incY; + for (i = i_min; i < i_max; i++) { + Y[iy] += temp * A[lda * j + (U + i - j)]; + iy += incY; + } + } + jx += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_gemm_c.h b/software/gsl-1.15/cblas/source_gemm_c.h new file mode 100644 index 000000000..af9bfdb05 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gemm_c.h @@ -0,0 +1,171 @@ +/* blas/source_gemm_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + INDEX ldf, ldg; + int conjF, conjG, TransF, TransG; + const BASE *F, *G; + + CHECK_ARGS14(GEMM,Order,TransA,TransB,M,N,K,alpha,A,lda,B,ldb,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + F = (const BASE *)A; + ldf = lda; + conjF = (TransA == CblasConjTrans) ? -1 : 1; + TransF = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; + G = (const BASE *)B; + ldg = ldb; + conjG = (TransB == CblasConjTrans) ? -1 : 1; + TransG = (TransB == CblasNoTrans) ? CblasNoTrans : CblasTrans; + } else { + n1 = N; + n2 = M; + F = (const BASE *)B; + ldf = ldb; + conjF = (TransB == CblasConjTrans) ? -1 : 1; + TransF = (TransB == CblasNoTrans) ? CblasNoTrans : CblasTrans; + G = (const BASE *)A; + ldg = lda; + conjG = (TransA == CblasConjTrans) ? -1 : 1; + TransG = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; + } + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (TransF == CblasNoTrans && TransG == CblasNoTrans) { + + /* form C := alpha*A*B + C */ + + for (k = 0; k < K; k++) { + for (i = 0; i < n1; i++) { + const BASE Fik_real = CONST_REAL(F, ldf * i + k); + const BASE Fik_imag = conjF * CONST_IMAG(F, ldf * i + k); + const BASE temp_real = alpha_real * Fik_real - alpha_imag * Fik_imag; + const BASE temp_imag = alpha_real * Fik_imag + alpha_imag * Fik_real; + if (!(temp_real == 0.0 && temp_imag == 0.0)) { + for (j = 0; j < n2; j++) { + const BASE Gkj_real = CONST_REAL(G, ldg * k + j); + const BASE Gkj_imag = conjG * CONST_IMAG(G, ldg * k + j); + REAL(C, ldc * i + j) += temp_real * Gkj_real - temp_imag * Gkj_imag; + IMAG(C, ldc * i + j) += temp_real * Gkj_imag + temp_imag * Gkj_real; + } + } + } + } + + } else if (TransF == CblasNoTrans && TransG == CblasTrans) { + + /* form C := alpha*A*B' + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Fik_real = CONST_REAL(F, ldf * i + k); + const BASE Fik_imag = conjF * CONST_IMAG(F, ldf * i + k); + const BASE Gjk_real = CONST_REAL(G, ldg * j + k); + const BASE Gjk_imag = conjG * CONST_IMAG(G, ldg * j + k); + temp_real += Fik_real * Gjk_real - Fik_imag * Gjk_imag; + temp_imag += Fik_real * Gjk_imag + Fik_imag * Gjk_real; + } + REAL(C, ldc * i + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, ldc * i + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (TransF == CblasTrans && TransG == CblasNoTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < n1; i++) { + const BASE Fki_real = CONST_REAL(F, ldf * k + i); + const BASE Fki_imag = conjF * CONST_IMAG(F, ldf * k + i); + const BASE temp_real = alpha_real * Fki_real - alpha_imag * Fki_imag; + const BASE temp_imag = alpha_real * Fki_imag + alpha_imag * Fki_real; + if (!(temp_real == 0.0 && temp_imag == 0.0)) { + for (j = 0; j < n2; j++) { + const BASE Gkj_real = CONST_REAL(G, ldg * k + j); + const BASE Gkj_imag = conjG * CONST_IMAG(G, ldg * k + j); + REAL(C, ldc * i + j) += temp_real * Gkj_real - temp_imag * Gkj_imag; + IMAG(C, ldc * i + j) += temp_real * Gkj_imag + temp_imag * Gkj_real; + } + } + } + } + + } else if (TransF == CblasTrans && TransG == CblasTrans) { + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Fki_real = CONST_REAL(F, ldf * k + i); + const BASE Fki_imag = conjF * CONST_IMAG(F, ldf * k + i); + const BASE Gjk_real = CONST_REAL(G, ldg * j + k); + const BASE Gjk_imag = conjG * CONST_IMAG(G, ldg * j + k); + + temp_real += Fki_real * Gjk_real - Fki_imag * Gjk_imag; + temp_imag += Fki_real * Gjk_imag + Fki_imag * Gjk_real; + } + REAL(C, ldc * i + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, ldc * i + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_gemm_r.h b/software/gsl-1.15/cblas/source_gemm_r.h new file mode 100644 index 000000000..a008d22f1 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gemm_r.h @@ -0,0 +1,127 @@ +/* blas/source_gemm_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + INDEX ldf, ldg; + int TransF, TransG; + const BASE *F, *G; + + CHECK_ARGS14(GEMM,Order,TransA,TransB,M,N,K,alpha,A,lda,B,ldb,beta,C,ldc); + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + F = A; + ldf = lda; + TransF = (TransA == CblasConjTrans) ? CblasTrans : TransA; + G = B; + ldg = ldb; + TransG = (TransB == CblasConjTrans) ? CblasTrans : TransB; + } else { + n1 = N; + n2 = M; + F = B; + ldf = ldb; + TransF = (TransB == CblasConjTrans) ? CblasTrans : TransB; + G = A; + ldg = lda; + TransG = (TransA == CblasConjTrans) ? CblasTrans : TransA; + } + + /* form y := beta*y */ + if (beta == 0.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] = 0.0; + } + } + } else if (beta != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] *= beta; + } + } + } + + if (alpha == 0.0) + return; + + if (TransF == CblasNoTrans && TransG == CblasNoTrans) { + + /* form C := alpha*A*B + C */ + + for (k = 0; k < K; k++) { + for (i = 0; i < n1; i++) { + const BASE temp = alpha * F[ldf * i + k]; + if (temp != 0.0) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] += temp * G[ldg * k + j]; + } + } + } + } + + } else if (TransF == CblasNoTrans && TransG == CblasTrans) { + + /* form C := alpha*A*B' + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += F[ldf * i + k] * G[ldg * j + k]; + } + C[ldc * i + j] += alpha * temp; + } + } + + } else if (TransF == CblasTrans && TransG == CblasNoTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < n1; i++) { + const BASE temp = alpha * F[ldf * k + i]; + if (temp != 0.0) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] += temp * G[ldg * k + j]; + } + } + } + } + + } else if (TransF == CblasTrans && TransG == CblasTrans) { + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += F[ldf * k + i] * G[ldg * j + k]; + } + C[ldc * i + j] += alpha * temp; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_gemv_c.h b/software/gsl-1.15/cblas/source_gemv_c.h new file mode 100644 index 000000000..17dd10755 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gemv_c.h @@ -0,0 +1,160 @@ +/* blas/source_gemv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + INDEX lenX, lenY; + + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + CHECK_ARGS12(GEMV,order,TransA,M,N,alpha,A,lda,X,incX,beta,Y,incY); + + if (M == 0 || N == 0) + return; + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (TransA == CblasNoTrans) { + lenX = N; + lenY = M; + } else { + lenX = M; + lenY = N; + } + + /* form y := beta*y */ + + if (beta_real == 0.0 && beta_imag == 0.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + REAL(Y, iy) = 0.0; + IMAG(Y, iy) = 0.0; + iy += incY; + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + const BASE y_real = REAL(Y, iy); + const BASE y_imag = IMAG(Y, iy); + const BASE tmpR = y_real * beta_real - y_imag * beta_imag; + const BASE tmpI = y_real * beta_imag + y_imag * beta_real; + REAL(Y, iy) = tmpR; + IMAG(Y, iy) = tmpI; + iy += incY; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if ((order == CblasRowMajor && TransA == CblasNoTrans) + || (order == CblasColMajor && TransA == CblasTrans)) { + /* form y := alpha*A*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE dotR = 0.0; + BASE dotI = 0.0; + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + j); + const BASE A_imag = CONST_IMAG(A, lda * i + j); + + dotR += A_real * x_real - A_imag * x_imag; + dotI += A_real * x_imag + A_imag * x_real; + ix += incX; + } + + REAL(Y, iy) += alpha_real * dotR - alpha_imag * dotI; + IMAG(Y, iy) += alpha_real * dotI + alpha_imag * dotR; + iy += incY; + } + } else if ((order == CblasRowMajor && TransA == CblasTrans) + || (order == CblasColMajor && TransA == CblasNoTrans)) { + /* form y := alpha*A'*x + y */ + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE tmpR = alpha_real * x_real - alpha_imag * x_imag; + BASE tmpI = alpha_real * x_imag + alpha_imag * x_real; + + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + const BASE A_real = CONST_REAL(A, lda * j + i); + const BASE A_imag = CONST_IMAG(A, lda * j + i); + REAL(Y, iy) += A_real * tmpR - A_imag * tmpI; + IMAG(Y, iy) += A_real * tmpI + A_imag * tmpR; + iy += incY; + } + ix += incX; + } + } else if (order == CblasRowMajor && TransA == CblasConjTrans) { + /* form y := alpha*A^H*x + y */ + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE tmpR = alpha_real * x_real - alpha_imag * x_imag; + BASE tmpI = alpha_real * x_imag + alpha_imag * x_real; + + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + const BASE A_real = CONST_REAL(A, lda * j + i); + const BASE A_imag = CONST_IMAG(A, lda * j + i); + REAL(Y, iy) += A_real * tmpR - (-A_imag) * tmpI; + IMAG(Y, iy) += A_real * tmpI + (-A_imag) * tmpR; + iy += incY; + } + ix += incX; + } + } else if (order == CblasColMajor && TransA == CblasConjTrans) { + /* form y := alpha*A^H*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE dotR = 0.0; + BASE dotI = 0.0; + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE x_real = CONST_REAL(X, ix); + const BASE x_imag = CONST_IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + j); + const BASE A_imag = CONST_IMAG(A, lda * i + j); + + dotR += A_real * x_real - (-A_imag) * x_imag; + dotI += A_real * x_imag + (-A_imag) * x_real; + ix += incX; + } + + REAL(Y, iy) += alpha_real * dotR - alpha_imag * dotI; + IMAG(Y, iy) += alpha_real * dotI + alpha_imag * dotR; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + +} diff --git a/software/gsl-1.15/cblas/source_gemv_r.h b/software/gsl-1.15/cblas/source_gemv_r.h new file mode 100644 index 000000000..a2959c5c3 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gemv_r.h @@ -0,0 +1,92 @@ +/* blas/source_gemv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + INDEX lenX, lenY; + + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS12(GEMV,order,TransA,M,N,alpha,A,lda,X,incX,beta,Y,incY); + + if (M == 0 || N == 0) + return; + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Trans == CblasNoTrans) { + lenX = N; + lenY = M; + } else { + lenX = M; + lenY = N; + } + + /* form y := beta*y */ + if (beta == 0.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + Y[iy] = 0.0; + iy += incY; + } + } else if (beta != 1.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + Y[iy] *= beta; + iy += incY; + } + } + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Trans == CblasNoTrans) + || (order == CblasColMajor && Trans == CblasTrans)) { + /* form y := alpha*A*x + y */ + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + BASE temp = 0.0; + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + temp += X[ix] * A[lda * i + j]; + ix += incX; + } + Y[iy] += alpha * temp; + iy += incY; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans) + || (order == CblasColMajor && Trans == CblasNoTrans)) { + /* form y := alpha*A'*x + y */ + INDEX ix = OFFSET(lenX, incX); + for (j = 0; j < lenX; j++) { + const BASE temp = alpha * X[ix]; + if (temp != 0.0) { + INDEX iy = OFFSET(lenY, incY); + for (i = 0; i < lenY; i++) { + Y[iy] += temp * A[lda * j + i]; + iy += incY; + } + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_ger.h b/software/gsl-1.15/cblas/source_ger.h new file mode 100644 index 000000000..882c1846f --- /dev/null +++ b/software/gsl-1.15/cblas/source_ger.h @@ -0,0 +1,50 @@ +/* blas/source_ger.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS10(SD_GER,order,M,N,alpha,X,incX,Y,incY,A,lda); + + if (order == CblasRowMajor) { + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + const BASE tmp = alpha * X[ix]; + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + A[lda * i + j] += Y[jy] * tmp; + jy += incY; + } + ix += incX; + } + } else if (order == CblasColMajor) { + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + const BASE tmp = alpha * Y[jy]; + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + A[i + lda * j] += X[ix] * tmp; + ix += incX; + } + jy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_gerc.h b/software/gsl-1.15/cblas/source_gerc.h new file mode 100644 index 000000000..36ac67939 --- /dev/null +++ b/software/gsl-1.15/cblas/source_gerc.h @@ -0,0 +1,67 @@ +/* blas/source_gerc.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS10(CZ_GERC,order,M,N,alpha,X,incX,Y,incY,A,lda); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (order == CblasRowMajor) { + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + const BASE X_real = CONST_REAL(X, ix); + const BASE X_imag = CONST_IMAG(X, ix); + const BASE tmp_real = alpha_real * X_real - alpha_imag * X_imag; + const BASE tmp_imag = alpha_imag * X_real + alpha_real * X_imag; + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + const BASE Y_real = CONST_REAL(Y, jy); + const BASE Y_imag = -CONST_IMAG(Y, jy); + REAL(A, lda * i + j) += Y_real * tmp_real - Y_imag * tmp_imag; + IMAG(A, lda * i + j) += Y_imag * tmp_real + Y_real * tmp_imag; + jy += incY; + } + ix += incX; + } + } else if (order == CblasColMajor) { + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + const BASE Y_real = CONST_REAL(Y, jy); + const BASE Y_imag = -CONST_IMAG(Y, jy); + const BASE tmp_real = alpha_real * Y_real - alpha_imag * Y_imag; + const BASE tmp_imag = alpha_imag * Y_real + alpha_real * Y_imag; + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + const BASE X_real = CONST_REAL(X, ix); + const BASE X_imag = CONST_IMAG(X, ix); + REAL(A, i + lda * j) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, i + lda * j) += X_imag * tmp_real + X_real * tmp_imag; + ix += incX; + } + jy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_geru.h b/software/gsl-1.15/cblas/source_geru.h new file mode 100644 index 000000000..4ca5ecc28 --- /dev/null +++ b/software/gsl-1.15/cblas/source_geru.h @@ -0,0 +1,67 @@ +/* blas/source_geru.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS10(CZ_GERU,order,M,N,alpha,X,incX,Y,incY,A,lda); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (order == CblasRowMajor) { + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + const BASE X_real = CONST_REAL(X, ix); + const BASE X_imag = CONST_IMAG(X, ix); + const BASE tmp_real = alpha_real * X_real - alpha_imag * X_imag; + const BASE tmp_imag = alpha_imag * X_real + alpha_real * X_imag; + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + const BASE Y_real = CONST_REAL(Y, jy); + const BASE Y_imag = CONST_IMAG(Y, jy); + REAL(A, lda * i + j) += Y_real * tmp_real - Y_imag * tmp_imag; + IMAG(A, lda * i + j) += Y_imag * tmp_real + Y_real * tmp_imag; + jy += incY; + } + ix += incX; + } + } else if (order == CblasColMajor) { + INDEX jy = OFFSET(N, incY); + for (j = 0; j < N; j++) { + const BASE Y_real = CONST_REAL(Y, jy); + const BASE Y_imag = CONST_IMAG(Y, jy); + const BASE tmp_real = alpha_real * Y_real - alpha_imag * Y_imag; + const BASE tmp_imag = alpha_imag * Y_real + alpha_real * Y_imag; + INDEX ix = OFFSET(M, incX); + for (i = 0; i < M; i++) { + const BASE X_real = CONST_REAL(X, ix); + const BASE X_imag = CONST_IMAG(X, ix); + REAL(A, i + lda * j) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, i + lda * j) += X_imag * tmp_real + X_real * tmp_imag; + ix += incX; + } + jy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_hbmv.h b/software/gsl-1.15/cblas/source_hbmv.h new file mode 100644 index 000000000..62cdbaa98 --- /dev/null +++ b/software/gsl-1.15/cblas/source_hbmv.h @@ -0,0 +1,149 @@ +/* blas/source_hbmv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS12(CZ_HBMV,order,Uplo,N,K,alpha,A,lda,X,incX,beta,Y,incY); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if (N == 0) + return; + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + REAL(Y, iy) = 0.0; + IMAG(Y, iy) = 0.0; + iy += incY; + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE y_real = REAL(Y, iy); + const BASE y_imag = IMAG(Y, iy); + const BASE tmpR = y_real * beta_real - y_imag * beta_imag; + const BASE tmpI = y_real * beta_imag + y_imag * beta_real; + REAL(Y, iy) = tmpR; + IMAG(Y, iy) = tmpI; + iy += incY; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + BASE Aii_real = CONST_REAL(A, lda * i + 0); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(A, lda * i + (j - i)); + BASE Aij_imag = conj * CONST_IMAG(A, lda * i + (j - i)); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(A, i * lda + (K - i + j)); + BASE Aij_imag = conj * CONST_IMAG(A, i * lda + (K - i + j)); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + + { + BASE Aii_real = CONST_REAL(A, lda * i + K); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + } + + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix += incX; + iy += incY; + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_hemm.h b/software/gsl-1.15/cblas/source_hemm.h new file mode 100644 index 000000000..0a25ccc42 --- /dev/null +++ b/software/gsl-1.15/cblas/source_hemm.h @@ -0,0 +1,208 @@ +/* blas/source_hemm.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + int uplo, side; + + CHECK_ARGS13(HEMM,Order,Side,Uplo,M,N,alpha,A,lda,B,ldb,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + uplo = Uplo; + side = Side; + } else { + n1 = N; + n2 = M; + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; + } + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (side == CblasLeft && uplo == CblasUpper) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + /* const BASE Aii_imag = 0.0; */ + REAL(C, i * ldc + j) += temp1_real * Aii_real; + IMAG(C, i * ldc + j) += temp1_imag * Aii_real; + } + for (k = i + 1; k < n1; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = CONST_REAL(B, ldb * k + j); + const BASE Bkj_imag = CONST_IMAG(B, ldb * k + j); + REAL(C, k * ldc + j) += Aik_real * temp1_real - (-Aik_imag) * temp1_imag; + IMAG(C, k * ldc + j) += Aik_real * temp1_imag + (-Aik_imag) * temp1_real; + temp2_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp2_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasLeft && uplo == CblasLower) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + for (k = 0; k < i; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = CONST_REAL(B, ldb * k + j); + const BASE Bkj_imag = CONST_IMAG(B, ldb * k + j); + REAL(C, k * ldc + j) += Aik_real * temp1_real - (-Aik_imag) * temp1_imag; + IMAG(C, k * ldc + j) += Aik_real * temp1_imag + (-Aik_imag) * temp1_real; + temp2_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp2_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + /* const BASE Aii_imag = 0.0; */ + REAL(C, i * ldc + j) += temp1_real * Aii_real; + IMAG(C, i * ldc + j) += temp1_imag * Aii_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasRight && uplo == CblasUpper) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + /* const BASE Ajj_imag = 0.0; */ + REAL(C, i * ldc + j) += temp1_real * Ajj_real; + IMAG(C, i * ldc + j) += temp1_imag * Ajj_real; + } + for (k = j + 1; k < n2; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bik_real = CONST_REAL(B, ldb * i + k); + const BASE Bik_imag = CONST_IMAG(B, ldb * i + k); + REAL(C, i * ldc + k) += temp1_real * Ajk_real - temp1_imag * Ajk_imag; + IMAG(C, i * ldc + k) += temp1_real * Ajk_imag + temp1_imag * Ajk_real; + temp2_real += Bik_real * Ajk_real - Bik_imag * (-Ajk_imag); + temp2_imag += Bik_real * (-Ajk_imag) + Bik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasRight && uplo == CblasLower) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + for (k = 0; k < j; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bik_real = CONST_REAL(B, ldb * i + k); + const BASE Bik_imag = CONST_IMAG(B, ldb * i + k); + REAL(C, i * ldc + k) += temp1_real * Ajk_real - temp1_imag * Ajk_imag; + IMAG(C, i * ldc + k) += temp1_real * Ajk_imag + temp1_imag * Ajk_real; + temp2_real += Bik_real * Ajk_real - Bik_imag * (-Ajk_imag); + temp2_imag += Bik_real * (-Ajk_imag) + Bik_imag * Ajk_real; + } + { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + /* const BASE Ajj_imag = 0.0; */ + REAL(C, i * ldc + j) += temp1_real * Ajj_real; + IMAG(C, i * ldc + j) += temp1_imag * Ajj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_hemv.h b/software/gsl-1.15/cblas/source_hemv.h new file mode 100644 index 000000000..258294061 --- /dev/null +++ b/software/gsl-1.15/cblas/source_hemv.h @@ -0,0 +1,140 @@ +/* blas/source_hemv.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (order == CblasColMajor) ? -1 : 1; + INDEX i, j; + + CHECK_ARGS11(CZ_HEMV,order,Uplo,N,alpha,A,lda,X,incX,beta,Y,incY); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + REAL(Y, iy) = 0.0; + IMAG(Y, iy) = 0.0; + iy += incY; + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE y_real = REAL(Y, iy); + const BASE y_imag = IMAG(Y, iy); + const BASE tmpR = y_real * beta_real - y_imag * beta_imag; + const BASE tmpI = y_real * beta_imag + y_imag * beta_real; + REAL(Y, iy) = tmpR; + IMAG(Y, iy) = tmpI; + iy += incY; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + BASE Aii_real = CONST_REAL(A, lda * i + i); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(A, lda * i + j); + BASE Aij_imag = conj * CONST_IMAG(A, lda * i + j); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + INDEX iy = OFFSET(N, incY) + (N - 1) * incY; + for (i = N; i > 0 && i--;) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + BASE Aii_real = CONST_REAL(A, lda * i + i); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(A, lda * i + j); + BASE Aij_imag = conj * CONST_IMAG(A, lda * i + j); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix -= incX; + iy -= incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_her.h b/software/gsl-1.15/cblas/source_her.h new file mode 100644 index 000000000..9427cd0b2 --- /dev/null +++ b/software/gsl-1.15/cblas/source_her.h @@ -0,0 +1,82 @@ +/* blas/source_her.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS8(CZ_HER,order,Uplo,N,alpha,X,incX,A,lda); + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp_real = alpha * CONST_REAL(X, ix); + const BASE tmp_imag = alpha * conj * CONST_IMAG(X, ix); + INDEX jx = ix; + + { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(A, lda * i + i) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, lda * i + i) = 0; + jx += incX; + } + + for (j = i + 1; j < N; j++) { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(A, lda * i + j) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, lda * i + j) += X_imag * tmp_real + X_real * tmp_imag; + jx += incX; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp_real = alpha * CONST_REAL(X, ix); + const BASE tmp_imag = alpha * conj * CONST_IMAG(X, ix); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(A, lda * i + j) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, lda * i + j) += X_imag * tmp_real + X_real * tmp_imag; + jx += incX; + } + + { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(A, lda * i + i) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(A, lda * i + i) = 0; + jx += incX; + } + + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_her2.h b/software/gsl-1.15/cblas/source_her2.h new file mode 100644 index 000000000..eb5382f47 --- /dev/null +++ b/software/gsl-1.15/cblas/source_her2.h @@ -0,0 +1,119 @@ +/* blas/source_her2.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS10(CZ_HER2,order,Uplo,N,alpha,X,incX,Y,incY,A,lda); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE Xi_real = CONST_REAL(X, ix); + const BASE Xi_imag = CONST_IMAG(X, ix); + /* tmp1 = alpha Xi */ + const BASE tmp1_real = alpha_real * Xi_real - alpha_imag * Xi_imag; + const BASE tmp1_imag = alpha_imag * Xi_real + alpha_real * Xi_imag; + + const BASE Yi_real = CONST_REAL(Y, iy); + const BASE Yi_imag = CONST_IMAG(Y, iy); + /* tmp2 = conj(alpha) Yi */ + const BASE tmp2_real = alpha_real * Yi_real + alpha_imag * Yi_imag; + const BASE tmp2_imag = -alpha_imag * Yi_real + alpha_real * Yi_imag; + + INDEX jx = ix + incX; + INDEX jy = iy + incY; + + /* Aij = alpha*Xi*conj(Yj) + conj(alpha)*Yi*conj(Xj) */ + + REAL(A, lda * i + i) += 2 * (tmp1_real * Yi_real + tmp1_imag * Yi_imag); + IMAG(A, lda * i + i) = 0; + + for (j = i + 1; j < N; j++) { + const BASE Xj_real = CONST_REAL(X, jx); + const BASE Xj_imag = CONST_IMAG(X, jx); + const BASE Yj_real = CONST_REAL(Y, jy); + const BASE Yj_imag = CONST_IMAG(Y, jy); + REAL(A, lda * i + j) += ((tmp1_real * Yj_real + tmp1_imag * Yj_imag) + + (tmp2_real * Xj_real + tmp2_imag * Xj_imag)); + IMAG(A, lda * i + j) += + conj * ((tmp1_imag * Yj_real - tmp1_real * Yj_imag) + + (tmp2_imag * Xj_real - tmp2_real * Xj_imag)); + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE Xi_real = CONST_REAL(X, ix); + const BASE Xi_imag = CONST_IMAG(X, ix); + const BASE tmp1_real = alpha_real * Xi_real - alpha_imag * Xi_imag; + const BASE tmp1_imag = alpha_imag * Xi_real + alpha_real * Xi_imag; + + const BASE Yi_real = CONST_REAL(Y, iy); + const BASE Yi_imag = CONST_IMAG(Y, iy); + const BASE tmp2_real = alpha_real * Yi_real + alpha_imag * Yi_imag; + const BASE tmp2_imag = -alpha_imag * Yi_real + alpha_real * Yi_imag; + + INDEX jx = OFFSET(N, incX); + INDEX jy = OFFSET(N, incY); + + /* Aij = alpha*Xi*conj(Yj) + conj(alpha)*Yi*conj(Xj) */ + + for (j = 0; j < i; j++) { + const BASE Xj_real = CONST_REAL(X, jx); + const BASE Xj_imag = CONST_IMAG(X, jx); + const BASE Yj_real = CONST_REAL(Y, jy); + const BASE Yj_imag = CONST_IMAG(Y, jy); + REAL(A, lda * i + j) += ((tmp1_real * Yj_real + tmp1_imag * Yj_imag) + + (tmp2_real * Xj_real + tmp2_imag * Xj_imag)); + IMAG(A, lda * i + j) += + conj * ((tmp1_imag * Yj_real - tmp1_real * Yj_imag) + + (tmp2_imag * Xj_real - tmp2_real * Xj_imag)); + jx += incX; + jy += incY; + } + + REAL(A, lda * i + i) += 2 * (tmp1_real * Yi_real + tmp1_imag * Yi_imag); + IMAG(A, lda * i + i) = 0; + + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_her2k.h b/software/gsl-1.15/cblas/source_her2k.h new file mode 100644 index 000000000..f289a7e61 --- /dev/null +++ b/software/gsl-1.15/cblas/source_her2k.h @@ -0,0 +1,273 @@ +/* blas/source_her2k.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS13(HER2K,Order,Uplo,Trans,N,K,alpha,A,lda,B,ldb,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + BASE alpha_imag = CONST_IMAG0(alpha); + + if (beta == 1.0 && ((alpha_real == 0.0 && alpha_imag == 0.0) || K == 0)) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + trans = Trans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (Trans == CblasNoTrans) ? CblasConjTrans : CblasNoTrans; + alpha_imag *= -1; /* conjugate alpha */ + } + + /* form C := beta*C */ + + if (beta == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } + } else if (beta != 1.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + REAL(C, ldc * i + i) *= beta; + IMAG(C, ldc * i + i) = 0.0; + for (j = i + 1; j < N; j++) { + REAL(C, ldc * i + j) *= beta; + IMAG(C, ldc * i + j) *= beta; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j < i; j++) { + REAL(C, ldc * i + j) *= beta; + IMAG(C, ldc * i + j) *= beta; + } + REAL(C, ldc * i + i) *= beta; + IMAG(C, ldc * i + i) = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + IMAG(C, ldc * i + i) = 0.0; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + + /* Cii += alpha Aik conj(Bik) + conj(alpha) Bik conj(Aik) */ + { + BASE temp_real = 0.0; + /* BASE temp_imag = 0.0; */ + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + /* temp1 = alpha * Aik */ + const BASE temp1_real = alpha_real * Aik_real - alpha_imag * Aik_imag; + const BASE temp1_imag = alpha_real * Aik_imag + alpha_imag * Aik_real; + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + temp_real += temp1_real * Bik_real + temp1_imag * Bik_imag; + } + + REAL(C, i * ldc + i) += 2 * temp_real; + IMAG(C, i * ldc + i) = 0.0; + } + + /* Cij += alpha Aik conj(Bjk) + conj(alpha) Bik conj(Ajk) */ + for (j = i + 1; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + /* temp1 = alpha * Aik */ + const BASE temp1_real = alpha_real * Aik_real - alpha_imag * Aik_imag; + const BASE temp1_imag = alpha_real * Aik_imag + alpha_imag * Aik_real; + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + /* temp2 = alpha * Ajk */ + const BASE temp2_real = alpha_real * Ajk_real - alpha_imag * Ajk_imag; + const BASE temp2_imag = alpha_real * Ajk_imag + alpha_imag * Ajk_real; + const BASE Bjk_real = CONST_REAL(B, j * ldb + k); + const BASE Bjk_imag = CONST_IMAG(B, j * ldb + k); + + /* Cij += alpha * Aik * conj(Bjk) + conj(alpha) * Bik * conj(Ajk) */ + temp_real += ((temp1_real * Bjk_real + temp1_imag * Bjk_imag) + + (Bik_real * temp2_real + Bik_imag * temp2_imag)); + temp_imag += ((temp1_real * (-Bjk_imag) + temp1_imag * Bjk_real) + + (Bik_real * (-temp2_imag) + Bik_imag * temp2_real)); + } + REAL(C, i * ldc + j) += temp_real; + IMAG(C, i * ldc + j) += temp_imag; + } + } + + } else if (uplo == CblasUpper && trans == CblasConjTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE Aki_real = CONST_REAL(A, k * lda + i); + BASE Aki_imag = CONST_IMAG(A, k * lda + i); + BASE Bki_real = CONST_REAL(B, k * ldb + i); + BASE Bki_imag = CONST_IMAG(B, k * ldb + i); + /* temp1 = alpha * conj(Aki) */ + BASE temp1_real = alpha_real * Aki_real - alpha_imag * (-Aki_imag); + BASE temp1_imag = alpha_real * (-Aki_imag) + alpha_imag * Aki_real; + /* temp2 = conj(alpha) * conj(Bki) */ + BASE temp2_real = alpha_real * Bki_real - alpha_imag * Bki_imag; + BASE temp2_imag = -(alpha_real * Bki_imag + alpha_imag * Bki_real); + + /* Cii += alpha * conj(Aki) * Bki + conj(alpha) * conj(Bki) * Aki */ + { + REAL(C, i * lda + i) += 2 * (temp1_real * Bki_real - temp1_imag * Bki_imag); + IMAG(C, i * lda + i) = 0.0; + } + + for (j = i + 1; j < N; j++) { + BASE Akj_real = CONST_REAL(A, k * lda + j); + BASE Akj_imag = CONST_IMAG(A, k * lda + j); + BASE Bkj_real = CONST_REAL(B, k * ldb + j); + BASE Bkj_imag = CONST_IMAG(B, k * ldb + j); + /* Cij += alpha * conj(Aki) * Bkj + conj(alpha) * conj(Bki) * Akj */ + REAL(C, i * lda + j) += (temp1_real * Bkj_real - temp1_imag * Bkj_imag) + + (temp2_real * Akj_real - temp2_imag * Akj_imag); + IMAG(C, i * lda + j) += (temp1_real * Bkj_imag + temp1_imag * Bkj_real) + + (temp2_real * Akj_imag + temp2_imag * Akj_real); + } + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + + /* Cij += alpha Aik conj(Bjk) + conj(alpha) Bik conj(Ajk) */ + + for (j = 0; j < i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + /* temp1 = alpha * Aik */ + const BASE temp1_real = alpha_real * Aik_real - alpha_imag * Aik_imag; + const BASE temp1_imag = alpha_real * Aik_imag + alpha_imag * Aik_real; + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + /* temp2 = alpha * Ajk */ + const BASE temp2_real = alpha_real * Ajk_real - alpha_imag * Ajk_imag; + const BASE temp2_imag = alpha_real * Ajk_imag + alpha_imag * Ajk_real; + const BASE Bjk_real = CONST_REAL(B, j * ldb + k); + const BASE Bjk_imag = CONST_IMAG(B, j * ldb + k); + + /* Cij += alpha * Aik * conj(Bjk) + conj(alpha) * Bik * conj(Ajk) */ + temp_real += ((temp1_real * Bjk_real + temp1_imag * Bjk_imag) + + (Bik_real * temp2_real + Bik_imag * temp2_imag)); + temp_imag += ((temp1_real * (-Bjk_imag) + temp1_imag * Bjk_real) + + (Bik_real * (-temp2_imag) + Bik_imag * temp2_real)); + } + REAL(C, i * ldc + j) += temp_real; + IMAG(C, i * ldc + j) += temp_imag; + } + + /* Cii += alpha Aik conj(Bik) + conj(alpha) Bik conj(Aik) */ + { + BASE temp_real = 0.0; + /* BASE temp_imag = 0.0; */ + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + /* temp1 = alpha * Aik */ + const BASE temp1_real = alpha_real * Aik_real - alpha_imag * Aik_imag; + const BASE temp1_imag = alpha_real * Aik_imag + alpha_imag * Aik_real; + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + temp_real += temp1_real * Bik_real + temp1_imag * Bik_imag; + } + + REAL(C, i * ldc + i) += 2 * temp_real; + IMAG(C, i * ldc + i) = 0.0; + } + } + + } else if (uplo == CblasLower && trans == CblasConjTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE Aki_real = CONST_REAL(A, k * lda + i); + BASE Aki_imag = CONST_IMAG(A, k * lda + i); + BASE Bki_real = CONST_REAL(B, k * ldb + i); + BASE Bki_imag = CONST_IMAG(B, k * ldb + i); + /* temp1 = alpha * conj(Aki) */ + BASE temp1_real = alpha_real * Aki_real - alpha_imag * (-Aki_imag); + BASE temp1_imag = alpha_real * (-Aki_imag) + alpha_imag * Aki_real; + /* temp2 = conj(alpha) * conj(Bki) */ + BASE temp2_real = alpha_real * Bki_real - alpha_imag * Bki_imag; + BASE temp2_imag = -(alpha_real * Bki_imag + alpha_imag * Bki_real); + + for (j = 0; j < i; j++) { + BASE Akj_real = CONST_REAL(A, k * lda + j); + BASE Akj_imag = CONST_IMAG(A, k * lda + j); + BASE Bkj_real = CONST_REAL(B, k * ldb + j); + BASE Bkj_imag = CONST_IMAG(B, k * ldb + j); + /* Cij += alpha * conj(Aki) * Bkj + conj(alpha) * conj(Bki) * Akj */ + REAL(C, i * lda + j) += (temp1_real * Bkj_real - temp1_imag * Bkj_imag) + + (temp2_real * Akj_real - temp2_imag * Akj_imag); + IMAG(C, i * lda + j) += (temp1_real * Bkj_imag + temp1_imag * Bkj_real) + + (temp2_real * Akj_imag + temp2_imag * Akj_real); + } + + /* Cii += alpha * conj(Aki) * Bki + conj(alpha) * conj(Bki) * Aki */ + { + REAL(C, i * lda + i) += 2 * (temp1_real * Bki_real - temp1_imag * Bki_imag); + IMAG(C, i * lda + i) = 0.0; + } + } + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_herk.h b/software/gsl-1.15/cblas/source_herk.h new file mode 100644 index 000000000..3ff9395be --- /dev/null +++ b/software/gsl-1.15/cblas/source_herk.h @@ -0,0 +1,163 @@ +/* blas/source_herk.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS11(HERK,Order,Uplo,Trans,N,K,alpha,A,lda,beta,C,ldc); + + if (beta == 1.0 && (alpha == 0.0 || K == 0)) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + trans = Trans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (Trans == CblasNoTrans) ? CblasConjTrans : CblasNoTrans; + } + + /* form y := beta*y */ + if (beta == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } + } else if (beta != 1.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + REAL(C, ldc * i + i) *= beta; + IMAG(C, ldc * i + i) = 0; + for (j = i + 1; j < N; j++) { + REAL(C, ldc * i + j) *= beta; + IMAG(C, ldc * i + j) *= beta; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j < i; j++) { + REAL(C, ldc * i + j) *= beta; + IMAG(C, ldc * i + j) *= beta; + } + REAL(C, ldc * i + i) *= beta; + IMAG(C, ldc * i + i) = 0; + } + } + } else { + /* set imaginary part of Aii to zero */ + for (i = 0; i < N; i++) { + IMAG(C, ldc * i + i) = 0.0; + } + } + + if (alpha == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = -CONST_IMAG(A, j * lda + k); + temp_real += Aik_real * Ajk_real - Aik_imag * Ajk_imag; + temp_imag += Aik_real * Ajk_imag + Aik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha * temp_real; + IMAG(C, i * ldc + j) += alpha * temp_imag; + } + } + + } else if (uplo == CblasUpper && trans == CblasConjTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = -CONST_IMAG(A, k * lda + i); + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = CONST_IMAG(A, k * lda + j); + temp_real += Aki_real * Akj_real - Aki_imag * Akj_imag; + temp_imag += Aki_real * Akj_imag + Aki_imag * Akj_real; + } + REAL(C, i * ldc + j) += alpha * temp_real; + IMAG(C, i * ldc + j) += alpha * temp_imag; + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = -CONST_IMAG(A, j * lda + k); + temp_real += Aik_real * Ajk_real - Aik_imag * Ajk_imag; + temp_imag += Aik_real * Ajk_imag + Aik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha * temp_real; + IMAG(C, i * ldc + j) += alpha * temp_imag; + } + } + + } else if (uplo == CblasLower && trans == CblasConjTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = -CONST_IMAG(A, k * lda + i); + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = CONST_IMAG(A, k * lda + j); + temp_real += Aki_real * Akj_real - Aki_imag * Akj_imag; + temp_imag += Aki_real * Akj_imag + Aki_imag * Akj_real; + } + REAL(C, i * ldc + j) += alpha * temp_real; + IMAG(C, i * ldc + j) += alpha * temp_imag; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_hpmv.h b/software/gsl-1.15/cblas/source_hpmv.h new file mode 100644 index 000000000..cdee41c5a --- /dev/null +++ b/software/gsl-1.15/cblas/source_hpmv.h @@ -0,0 +1,142 @@ +/* blas/source_hpmv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS10(CZ_HPMV,order,Uplo,N,alpha,Ap,X,incX,beta,Y,incY); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + REAL(Y, iy) = 0.0; + IMAG(Y, iy) = 0.0; + iy += incY; + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE y_real = REAL(Y, iy); + const BASE y_imag = IMAG(Y, iy); + const BASE tmpR = y_real * beta_real - y_imag * beta_imag; + const BASE tmpI = y_real * beta_imag + y_imag * beta_real; + REAL(Y, iy) = tmpR; + IMAG(Y, iy) = tmpI; + iy += incY; + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + BASE Aii_real = CONST_REAL(Ap, TPUP(N, i, i)); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(Ap, TPUP(N, i, j)); + BASE Aij_imag = conj * CONST_IMAG(Ap, TPUP(N, i, j)); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE x_real = CONST_REAL(X, ix); + BASE x_imag = CONST_IMAG(X, ix); + BASE temp1_real = alpha_real * x_real - alpha_imag * x_imag; + BASE temp1_imag = alpha_real * x_imag + alpha_imag * x_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + BASE Aii_real = CONST_REAL(Ap, TPLO(N, i, i)); + /* Aii_imag is zero */ + REAL(Y, iy) += temp1_real * Aii_real; + IMAG(Y, iy) += temp1_imag * Aii_real; + for (j = j_min; j < j_max; j++) { + BASE Aij_real = CONST_REAL(Ap, TPLO(N, i, j)); + BASE Aij_imag = conj * CONST_IMAG(Ap, TPLO(N, i, j)); + REAL(Y, jy) += temp1_real * Aij_real - temp1_imag * (-Aij_imag); + IMAG(Y, jy) += temp1_real * (-Aij_imag) + temp1_imag * Aij_real; + x_real = CONST_REAL(X, jx); + x_imag = CONST_IMAG(X, jx); + temp2_real += x_real * Aij_real - x_imag * Aij_imag; + temp2_imag += x_real * Aij_imag + x_imag * Aij_real; + jx += incX; + jy += incY; + } + REAL(Y, iy) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(Y, iy) += alpha_real * temp2_imag + alpha_imag * temp2_real; + ix += incX; + iy += incY; + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_hpr.h b/software/gsl-1.15/cblas/source_hpr.h new file mode 100644 index 000000000..8b8b6d562 --- /dev/null +++ b/software/gsl-1.15/cblas/source_hpr.h @@ -0,0 +1,82 @@ +/* blas/source_hpr.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS7(CZ_HPR,order,Uplo,N,alpha,X,incX,A); + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp_real = alpha * CONST_REAL(X, ix); + const BASE tmp_imag = alpha * conj * CONST_IMAG(X, ix); + INDEX jx = ix; + + { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(Ap, TPUP(N, i, i)) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(Ap, TPUP(N, i, i)) = 0; + jx += incX; + } + + for (j = i + 1; j < N; j++) { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(Ap, TPUP(N, i, j)) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(Ap, TPUP(N, i, j)) += X_imag * tmp_real + X_real * tmp_imag; + jx += incX; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp_real = alpha * CONST_REAL(X, ix); + const BASE tmp_imag = alpha * conj * CONST_IMAG(X, ix); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(Ap, TPLO(N, i, j)) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(Ap, TPLO(N, i, j)) += X_imag * tmp_real + X_real * tmp_imag; + jx += incX; + } + + { + const BASE X_real = CONST_REAL(X, jx); + const BASE X_imag = -conj * CONST_IMAG(X, jx); + REAL(Ap, TPLO(N, i, i)) += X_real * tmp_real - X_imag * tmp_imag; + IMAG(Ap, TPLO(N, i, i)) = 0; + jx += incX; + } + + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_hpr2.h b/software/gsl-1.15/cblas/source_hpr2.h new file mode 100644 index 000000000..850f5fa36 --- /dev/null +++ b/software/gsl-1.15/cblas/source_hpr2.h @@ -0,0 +1,119 @@ +/* blas/source_hpr2.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (order == CblasColMajor) ? -1 : 1; + + CHECK_ARGS9(CZ_HPR2,order,Uplo,N,alpha,X,incX,Y,incY,Ap); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE Xi_real = CONST_REAL(X, ix); + const BASE Xi_imag = CONST_IMAG(X, ix); + /* tmp1 = alpha Xi */ + const BASE tmp1_real = alpha_real * Xi_real - alpha_imag * Xi_imag; + const BASE tmp1_imag = alpha_imag * Xi_real + alpha_real * Xi_imag; + + const BASE Yi_real = CONST_REAL(Y, iy); + const BASE Yi_imag = CONST_IMAG(Y, iy); + /* tmp2 = conj(alpha) Yi */ + const BASE tmp2_real = alpha_real * Yi_real + alpha_imag * Yi_imag; + const BASE tmp2_imag = -alpha_imag * Yi_real + alpha_real * Yi_imag; + + INDEX jx = ix + incX; + INDEX jy = iy + incY; + + /* Aij = alpha*Xi*conj(Yj) + conj(alpha)*Yi*conj(Xj) */ + + REAL(Ap, TPUP(N, i, i)) += 2 * (tmp1_real * Yi_real + tmp1_imag * Yi_imag); + IMAG(Ap, TPUP(N, i, i)) = 0; + + for (j = i + 1; j < N; j++) { + const BASE Xj_real = CONST_REAL(X, jx); + const BASE Xj_imag = CONST_IMAG(X, jx); + const BASE Yj_real = CONST_REAL(Y, jy); + const BASE Yj_imag = CONST_IMAG(Y, jy); + REAL(Ap, TPUP(N, i, j)) += ((tmp1_real * Yj_real + tmp1_imag * Yj_imag) + + (tmp2_real * Xj_real + tmp2_imag * Xj_imag)); + IMAG(Ap, TPUP(N, i, j)) += + conj * ((tmp1_imag * Yj_real - tmp1_real * Yj_imag) + + (tmp2_imag * Xj_real - tmp2_real * Xj_imag)); + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE Xi_real = CONST_REAL(X, ix); + const BASE Xi_imag = CONST_IMAG(X, ix); + const BASE tmp1_real = alpha_real * Xi_real - alpha_imag * Xi_imag; + const BASE tmp1_imag = alpha_imag * Xi_real + alpha_real * Xi_imag; + + const BASE Yi_real = CONST_REAL(Y, iy); + const BASE Yi_imag = CONST_IMAG(Y, iy); + const BASE tmp2_real = alpha_real * Yi_real + alpha_imag * Yi_imag; + const BASE tmp2_imag = -alpha_imag * Yi_real + alpha_real * Yi_imag; + + INDEX jx = OFFSET(N, incX); + INDEX jy = OFFSET(N, incY); + + /* Aij = alpha*Xi*conj(Yj) + conj(alpha)*Yi*conj(Xj) */ + + for (j = 0; j < i; j++) { + const BASE Xj_real = CONST_REAL(X, jx); + const BASE Xj_imag = CONST_IMAG(X, jx); + const BASE Yj_real = CONST_REAL(Y, jy); + const BASE Yj_imag = CONST_IMAG(Y, jy); + REAL(Ap, TPLO(N, i, j)) += ((tmp1_real * Yj_real + tmp1_imag * Yj_imag) + + (tmp2_real * Xj_real + tmp2_imag * Xj_imag)); + IMAG(Ap, TPLO(N, i, j)) += + conj * ((tmp1_imag * Yj_real - tmp1_real * Yj_imag) + + (tmp2_imag * Xj_real - tmp2_real * Xj_imag)); + jx += incX; + jy += incY; + } + + REAL(Ap, TPLO(N, i, i)) += 2 * (tmp1_real * Yi_real + tmp1_imag * Yi_imag); + IMAG(Ap, TPLO(N, i, i)) = 0; + + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_iamax_c.h b/software/gsl-1.15/cblas/source_iamax_c.h new file mode 100644 index 000000000..e4566d479 --- /dev/null +++ b/software/gsl-1.15/cblas/source_iamax_c.h @@ -0,0 +1,41 @@ +/* blas/source_iamax_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE max = 0.0; + INDEX ix = 0; + INDEX i; + CBLAS_INDEX result = 0; + + if (incX <= 0) { + return 0; + } + + for (i = 0; i < N; i++) { + const BASE a = fabs(CONST_REAL(X, ix)) + fabs(CONST_IMAG(X, ix)); + + if (a > max) { + max = a; + result = i; + } + ix += incX; + } + + return result; +} diff --git a/software/gsl-1.15/cblas/source_iamax_r.h b/software/gsl-1.15/cblas/source_iamax_r.h new file mode 100644 index 000000000..19bed3a3d --- /dev/null +++ b/software/gsl-1.15/cblas/source_iamax_r.h @@ -0,0 +1,39 @@ +/* blas/source_iamax_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE max = 0.0; + INDEX ix = 0; + INDEX i; + CBLAS_INDEX result = 0; + + if (incX <= 0) { + return 0; + } + + for (i = 0; i < N; i++) { + if (fabs(X[ix]) > max) { + max = fabs(X[ix]); + result = i; + } + ix += incX; + } + + return result; +} diff --git a/software/gsl-1.15/cblas/source_nrm2_c.h b/software/gsl-1.15/cblas/source_nrm2_c.h new file mode 100644 index 000000000..9ce29b214 --- /dev/null +++ b/software/gsl-1.15/cblas/source_nrm2_c.h @@ -0,0 +1,60 @@ +/* blas/source_nrm2_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE scale = 0.0; + BASE ssq = 1.0; + INDEX i; + INDEX ix = 0; + + if (N == 0 || incX < 1) { + return 0; + } + + for (i = 0; i < N; i++) { + const BASE x = CONST_REAL(X, ix); + const BASE y = CONST_IMAG(X, ix); + + if (x != 0.0) { + const BASE ax = fabs(x); + + if (scale < ax) { + ssq = 1.0 + ssq * (scale / ax) * (scale / ax); + scale = ax; + } else { + ssq += (ax / scale) * (ax / scale); + } + } + + if (y != 0.0) { + const BASE ay = fabs(y); + + if (scale < ay) { + ssq = 1.0 + ssq * (scale / ay) * (scale / ay); + scale = ay; + } else { + ssq += (ay / scale) * (ay / scale); + } + } + + ix += incX; + } + + return scale * sqrt(ssq); +} diff --git a/software/gsl-1.15/cblas/source_nrm2_r.h b/software/gsl-1.15/cblas/source_nrm2_r.h new file mode 100644 index 000000000..b97b9b392 --- /dev/null +++ b/software/gsl-1.15/cblas/source_nrm2_r.h @@ -0,0 +1,50 @@ +/* blas/source_nrm2_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + BASE scale = 0.0; + BASE ssq = 1.0; + INDEX i; + INDEX ix = 0; + + if (N <= 0 || incX <= 0) { + return 0; + } else if (N == 1) { + return fabs(X[0]); + } + + for (i = 0; i < N; i++) { + const BASE x = X[ix]; + + if (x != 0.0) { + const BASE ax = fabs(x); + + if (scale < ax) { + ssq = 1.0 + ssq * (scale / ax) * (scale / ax); + scale = ax; + } else { + ssq += (ax / scale) * (ax / scale); + } + } + + ix += incX; + } + + return scale * sqrt(ssq); +} diff --git a/software/gsl-1.15/cblas/source_rot.h b/software/gsl-1.15/cblas/source_rot.h new file mode 100644 index 000000000..6b3f40bd5 --- /dev/null +++ b/software/gsl-1.15/cblas/source_rot.h @@ -0,0 +1,32 @@ +/* blas/source_rot.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE x = X[ix]; + const BASE y = Y[iy]; + X[ix] = c * x + s * y; + Y[iy] = -s * x + c * y; + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_rotg.h b/software/gsl-1.15/cblas/source_rotg.h new file mode 100644 index 000000000..05026998f --- /dev/null +++ b/software/gsl-1.15/cblas/source_rotg.h @@ -0,0 +1,46 @@ +/* blas/source_rotg.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const BASE roe = (fabs(*a) > fabs(*b) ? *a : *b); + const BASE scale = fabs(*a) + fabs(*b); + BASE r, z; + + if (scale != 0.0) { + const BASE aos = *a / scale; + const BASE bos = *b / scale; + r = scale * sqrt(aos * aos + bos * bos); + r = GSL_SIGN(roe) * r; + *c = *a / r; + *s = *b / r; + z = 1.0; + if (fabs(*a) > fabs(*b)) + z = *s; + if (fabs(*b) >= fabs(*a) && *c != 0.0) + z = 1.0 / (*c); + } else { + *c = 1.0; + *s = 0.0; + r = 0.0; + z = 0.0; + } + + *a = r; + *b = z; +} diff --git a/software/gsl-1.15/cblas/source_rotm.h b/software/gsl-1.15/cblas/source_rotm.h new file mode 100644 index 000000000..bb14a2c9c --- /dev/null +++ b/software/gsl-1.15/cblas/source_rotm.h @@ -0,0 +1,58 @@ +/* blas/source_rotm.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX n; + INDEX i = OFFSET(N, incX); + INDEX j = OFFSET(N, incY); + + BASE h11, h21, h12, h22; + + if (P[0] == -1.0) { + h11 = P[1]; + h21 = P[2]; + h12 = P[3]; + h22 = P[4]; + } else if (P[0] == 0.0) { + h11 = 1.0; + h21 = P[2]; + h12 = P[3]; + h22 = 1.0; + } else if (P[0] == 1.0) { + h11 = P[1]; + h21 = -1.0; + h12 = 1.0; + h22 = P[4]; + } else if (P[0] == -2.0) { + return; + } else { + BLAS_ERROR("unrecognized value of P[0]"); + return; + } + + for (n = 0; n < N; n++) { + const BASE w = X[i]; + const BASE z = Y[j]; + X[i] = h11 * w + h12 * z; + Y[j] = h21 * w + h22 * z; + i += incX; + j += incY; + } + +} diff --git a/software/gsl-1.15/cblas/source_rotmg.h b/software/gsl-1.15/cblas/source_rotmg.h new file mode 100644 index 000000000..dd1f9ea5f --- /dev/null +++ b/software/gsl-1.15/cblas/source_rotmg.h @@ -0,0 +1,162 @@ +/* blas/source_rotmg.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const BASE G = 4096.0, G2 = G * G; + BASE D1 = *d1, D2 = *d2, x = *b1, y = b2; + BASE h11, h12, h21, h22, u; + + BASE c, s; + + /* case of d1 < 0, appendix A, second to last paragraph */ + + if (D1 < 0.0) { + P[0] = -1; + P[1] = 0; + P[2] = 0; + P[3] = 0; + P[4] = 0; + *d1 = 0; + *d2 = 0; + *b1 = 0; + return; + } + + if (D2 * y == 0.0) { + P[0] = -2; /* case of H = I, page 315 */ + return; + } + + c = fabs(D1 * x * x); + s = fabs(D2 * y * y); + + if (c > s) { + /* case of equation A6 */ + + P[0] = 0.0; + + h11 = 1; + h12 = (D2 * y) / (D1 * x); + h21 = -y / x; + h22 = 1; + + u = 1 - h21 * h12; + + if (u <= 0.0) { /* the case u <= 0 is rejected */ + P[0] = -1; + P[1] = 0; + P[2] = 0; + P[3] = 0; + P[4] = 0; + *d1 = 0; + *d2 = 0; + *b1 = 0; + return; + } + + D1 /= u; + D2 /= u; + x *= u; + } else { + /* case of equation A7 */ + + if (D2 * y * y < 0.0) { + P[0] = -1; + P[1] = 0; + P[2] = 0; + P[3] = 0; + P[4] = 0; + *d1 = 0; + *d2 = 0; + *b1 = 0; + return; + } + + P[0] = 1; + + h11 = (D1 * x) / (D2 * y); + h12 = 1; + h21 = -1; + h22 = x / y; + + u = 1 + h11 * h22; + + D1 /= u; + D2 /= u; + + { + BASE tmp = D2; + D2 = D1; + D1 = tmp; + } + + x = y * u; + } + + /* rescale D1 to range [1/G2,G2] */ + + while (D1 <= 1.0 / G2 && D1 != 0.0) { + P[0] = -1; + D1 *= G2; + x /= G; + h11 /= G; + h12 /= G; + } + + while (D1 >= G2) { + P[0] = -1; + D1 /= G2; + x *= G; + h11 *= G; + h12 *= G; + } + + /* rescale D2 to range [1/G2,G2] */ + + while (fabs(D2) <= 1.0 / G2 && D2 != 0.0) { + P[0] = -1; + D2 *= G2; + h21 /= G; + h22 /= G; + } + + while (fabs(D2) >= G2) { + P[0] = -1; + D2 /= G2; + h21 *= G; + h22 *= G; + } + + *d1 = D1; + *d2 = D2; + *b1 = x; + + if (P[0] == -1.0) { + P[1] = h11; + P[2] = h21; + P[3] = h12; + P[4] = h22; + } else if (P[0] == 0.0) { + P[2] = h21; + P[3] = h12; + } else if (P[0] == 1.0) { + P[1] = h11; + P[4] = h22; + } +} diff --git a/software/gsl-1.15/cblas/source_sbmv.h b/software/gsl-1.15/cblas/source_sbmv.h new file mode 100644 index 000000000..3360afe22 --- /dev/null +++ b/software/gsl-1.15/cblas/source_sbmv.h @@ -0,0 +1,102 @@ +/* blas/source_sbmv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS12(SD_SBMV,order,Uplo,N,K,alpha,A,lda,X,incX,beta,Y,incY); + + if (N == 0) + return; + + if (alpha == 0.0 && beta == 1.0) + return; + + /* form y := beta*y */ + if (beta == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] = 0.0; + iy += incY; + } + } else if (beta != 1.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] *= beta; + iy += incY; + } + } + + if (alpha == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + BASE tmp1 = alpha * X[ix]; + BASE tmp2 = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + Y[iy] += tmp1 * A[0 + i * lda]; + for (j = j_min; j < j_max; j++) { + BASE Aij = A[(j - i) + i * lda]; + Y[jy] += tmp1 * Aij; + tmp2 += Aij * X[jx]; + jx += incX; + jy += incY; + } + Y[iy] += alpha * tmp2; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + BASE tmp1 = alpha * X[ix]; + BASE tmp2 = 0.0; + const INDEX j_min = (i > K) ? i - K : 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + for (j = j_min; j < j_max; j++) { + BASE Aij = A[(K - i + j) + i * lda]; + Y[jy] += tmp1 * Aij; + tmp2 += Aij * X[jx]; + jx += incX; + jy += incY; + } + Y[iy] += tmp1 * A[K + i * lda] + alpha * tmp2; + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + +} diff --git a/software/gsl-1.15/cblas/source_scal_c.h b/software/gsl-1.15/cblas/source_scal_c.h new file mode 100644 index 000000000..b386d3283 --- /dev/null +++ b/software/gsl-1.15/cblas/source_scal_c.h @@ -0,0 +1,37 @@ +/* blas/source_scal_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = 0; + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (incX <= 0) { + return; + } + + for (i = 0; i < N; i++) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + REAL(X, ix) = x_real * alpha_real - x_imag * alpha_imag; + IMAG(X, ix) = x_real * alpha_imag + x_imag * alpha_real; + ix += incX; + } +} diff --git a/software/gsl-1.15/cblas/source_scal_c_s.h b/software/gsl-1.15/cblas/source_scal_c_s.h new file mode 100644 index 000000000..8cecb735d --- /dev/null +++ b/software/gsl-1.15/cblas/source_scal_c_s.h @@ -0,0 +1,33 @@ +/* blas/source_scal_c_s.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = 0; + + if (incX <= 0) { + return; + } + + for (i = 0; i < N; i++) { + REAL(X, ix) *= alpha; + IMAG(X, ix) *= alpha; + ix += incX; + } +} diff --git a/software/gsl-1.15/cblas/source_scal_r.h b/software/gsl-1.15/cblas/source_scal_r.h new file mode 100644 index 000000000..81d230072 --- /dev/null +++ b/software/gsl-1.15/cblas/source_scal_r.h @@ -0,0 +1,32 @@ +/* blas/source_scal_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = 0; + + if (incX <= 0) { + return; + } + + for (i = 0; i < N; i++) { + X[ix] *= alpha; + ix += incX; + } +} diff --git a/software/gsl-1.15/cblas/source_spmv.h b/software/gsl-1.15/cblas/source_spmv.h new file mode 100644 index 000000000..85301e6ac --- /dev/null +++ b/software/gsl-1.15/cblas/source_spmv.h @@ -0,0 +1,102 @@ +/* blas/source_spmv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS10(SD_SPMV,order,Uplo,N,alpha,Ap,X,incX,beta,Y,incY); + + if (alpha == 0.0 && beta == 1.0) + return; + + /* form y := beta*y */ + if (beta == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] = 0.0; + iy += incY; + } + } else if (beta != 1.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] *= beta; + iy += incY; + } + } + + if (alpha == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE tmp1 = alpha * X[ix]; + BASE tmp2 = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + + Y[iy] += tmp1 * Ap[TPUP(N, i, i)]; + + for (j = j_min; j < j_max; j++) { + const BASE apk = Ap[TPUP(N, i, j)]; + Y[jy] += tmp1 * apk; + tmp2 += apk * X[jx]; + jy += incY; + jx += incX; + } + Y[iy] += alpha * tmp2; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE tmp1 = alpha * X[ix]; + BASE tmp2 = 0.0; + + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + + Y[iy] += tmp1 * Ap[TPLO(N, i, i)]; + + for (j = j_min; j < j_max; j++) { + const BASE apk = Ap[TPLO(N, i, j)]; + Y[jy] += tmp1 * apk; + tmp2 += apk * X[jx]; + jy += incY; + jx += incX; + } + Y[iy] += alpha * tmp2; + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_spr.h b/software/gsl-1.15/cblas/source_spr.h new file mode 100644 index 000000000..65742fcd4 --- /dev/null +++ b/software/gsl-1.15/cblas/source_spr.h @@ -0,0 +1,58 @@ +/* blas/source_spr.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS7(SD_SPR,order,Uplo,N,alpha,X,incX,Ap); + + if (N == 0) + return; + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp = alpha * X[ix]; + INDEX jx = ix; + for (j = i; j < N; j++) { + Ap[TPUP(N, i, j)] += X[jx] * tmp; + jx += incX; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp = alpha * X[ix]; + INDEX jx = OFFSET(N, incX); + for (j = 0; j <= i; j++) { + Ap[TPLO(N, i, j)] += X[jx] * tmp; + jx += incX; + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_spr2.h b/software/gsl-1.15/cblas/source_spr2.h new file mode 100644 index 000000000..c92832a3e --- /dev/null +++ b/software/gsl-1.15/cblas/source_spr2.h @@ -0,0 +1,68 @@ +/* blas/source_spr2.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS9(SD_SPR2,order,Uplo,N,alpha,X,incX,Y,incY,A); + + if (N == 0) + return; + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE tmp1 = alpha * X[ix]; + const BASE tmp2 = alpha * Y[iy]; + INDEX jx = ix; + INDEX jy = iy; + for (j = i; j < N; j++) { + Ap[TPUP(N, i, j)] += tmp1 * Y[jy] + tmp2 * X[jx]; + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE tmp1 = alpha * X[ix]; + const BASE tmp2 = alpha * Y[iy]; + INDEX jx = OFFSET(N, incX); + INDEX jy = OFFSET(N, incY); + for (j = 0; j <= i; j++) { + Ap[TPLO(N, i, j)] += tmp1 * Y[jy] + tmp2 * X[jx]; + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_swap_c.h b/software/gsl-1.15/cblas/source_swap_c.h new file mode 100644 index 000000000..3676d25ce --- /dev/null +++ b/software/gsl-1.15/cblas/source_swap_c.h @@ -0,0 +1,35 @@ +/* blas/source_swap_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + + for (i = 0; i < N; i++) { + const BASE tmp_real = REAL(X, ix); + const BASE tmp_imag = IMAG(X, ix); + REAL(X, ix) = REAL(Y, iy); + IMAG(X, ix) = IMAG(Y, iy); + REAL(Y, iy) = tmp_real; + IMAG(Y, iy) = tmp_imag; + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_swap_r.h b/software/gsl-1.15/cblas/source_swap_r.h new file mode 100644 index 000000000..ae522159a --- /dev/null +++ b/software/gsl-1.15/cblas/source_swap_r.h @@ -0,0 +1,31 @@ +/* blas/source_swap_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i; + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE tmp = X[ix]; + X[ix] = Y[iy]; + Y[iy] = tmp; + ix += incX; + iy += incY; + } +} diff --git a/software/gsl-1.15/cblas/source_symm_c.h b/software/gsl-1.15/cblas/source_symm_c.h new file mode 100644 index 000000000..8b1804ae7 --- /dev/null +++ b/software/gsl-1.15/cblas/source_symm_c.h @@ -0,0 +1,207 @@ +/* blas/source_symm_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + int uplo, side; + + CHECK_ARGS13(SYMM,Order,Side,Uplo,M,N,alpha,A,lda,B,ldb,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + uplo = Uplo; + side = Side; + } else { + n1 = N; + n2 = M; + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; + } + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (side == CblasLeft && uplo == CblasUpper) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = CONST_IMAG(A, i * lda + i); + REAL(C, i * ldc + j) += temp1_real * Aii_real - temp1_imag * Aii_imag; + IMAG(C, i * ldc + j) += temp1_real * Aii_imag + temp1_imag * Aii_real; + } + for (k = i + 1; k < n1; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = CONST_REAL(B, ldb * k + j); + const BASE Bkj_imag = CONST_IMAG(B, ldb * k + j); + REAL(C, k * ldc + j) += Aik_real * temp1_real - Aik_imag * temp1_imag; + IMAG(C, k * ldc + j) += Aik_real * temp1_imag + Aik_imag * temp1_real; + temp2_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp2_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasLeft && uplo == CblasLower) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + for (k = 0; k < i; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = CONST_REAL(B, ldb * k + j); + const BASE Bkj_imag = CONST_IMAG(B, ldb * k + j); + REAL(C, k * ldc + j) += Aik_real * temp1_real - Aik_imag * temp1_imag; + IMAG(C, k * ldc + j) += Aik_real * temp1_imag + Aik_imag * temp1_real; + temp2_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp2_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = CONST_IMAG(A, i * lda + i); + REAL(C, i * ldc + j) += temp1_real * Aii_real - temp1_imag * Aii_imag; + IMAG(C, i * ldc + j) += temp1_real * Aii_imag + temp1_imag * Aii_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasRight && uplo == CblasUpper) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = CONST_IMAG(A, j * lda + j); + REAL(C, i * ldc + j) += temp1_real * Ajj_real - temp1_imag * Ajj_imag; + IMAG(C, i * ldc + j) += temp1_real * Ajj_imag + temp1_imag * Ajj_real; + } + for (k = j + 1; k < n2; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bik_real = CONST_REAL(B, ldb * i + k); + const BASE Bik_imag = CONST_IMAG(B, ldb * i + k); + REAL(C, i * ldc + k) += temp1_real * Ajk_real - temp1_imag * Ajk_imag; + IMAG(C, i * ldc + k) += temp1_real * Ajk_imag + temp1_imag * Ajk_real; + temp2_real += Bik_real * Ajk_real - Bik_imag * Ajk_imag; + temp2_imag += Bik_real * Ajk_imag + Bik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else if (side == CblasRight && uplo == CblasLower) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = CONST_REAL(B, ldb * i + j); + const BASE Bij_imag = CONST_IMAG(B, ldb * i + j); + const BASE temp1_real = alpha_real * Bij_real - alpha_imag * Bij_imag; + const BASE temp1_imag = alpha_real * Bij_imag + alpha_imag * Bij_real; + BASE temp2_real = 0.0; + BASE temp2_imag = 0.0; + for (k = 0; k < j; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bik_real = CONST_REAL(B, ldb * i + k); + const BASE Bik_imag = CONST_IMAG(B, ldb * i + k); + REAL(C, i * ldc + k) += temp1_real * Ajk_real - temp1_imag * Ajk_imag; + IMAG(C, i * ldc + k) += temp1_real * Ajk_imag + temp1_imag * Ajk_real; + temp2_real += Bik_real * Ajk_real - Bik_imag * Ajk_imag; + temp2_imag += Bik_real * Ajk_imag + Bik_imag * Ajk_real; + } + { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = CONST_IMAG(A, j * lda + j); + REAL(C, i * ldc + j) += temp1_real * Ajj_real - temp1_imag * Ajj_imag; + IMAG(C, i * ldc + j) += temp1_real * Ajj_imag + temp1_imag * Ajj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp2_real - alpha_imag * temp2_imag; + IMAG(C, i * ldc + j) += alpha_real * temp2_imag + alpha_imag * temp2_real; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_symm_r.h b/software/gsl-1.15/cblas/source_symm_r.h new file mode 100644 index 000000000..1885aeebc --- /dev/null +++ b/software/gsl-1.15/cblas/source_symm_r.h @@ -0,0 +1,133 @@ +/* blas/source_symm_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + int uplo, side; + + CHECK_ARGS13(SYMM,Order,Side,Uplo,M,N,alpha,A,lda,B,ldb,beta,C,ldc); + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + uplo = Uplo; + side = Side; + } else { + n1 = N; + n2 = M; + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; + } + + /* form y := beta*y */ + if (beta == 0.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] = 0.0; + } + } + } else if (beta != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + C[ldc * i + j] *= beta; + } + } + } + + if (alpha == 0.0) + return; + + if (side == CblasLeft && uplo == CblasUpper) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE temp1 = alpha * B[ldb * i + j]; + BASE temp2 = 0.0; + C[i * ldc + j] += temp1 * A[i * lda + i]; + for (k = i + 1; k < n1; k++) { + const BASE Aik = A[i * lda + k]; + C[k * ldc + j] += Aik * temp1; + temp2 += Aik * B[ldb * k + j]; + } + C[i * ldc + j] += alpha * temp2; + } + } + + } else if (side == CblasLeft && uplo == CblasLower) { + + /* form C := alpha*A*B + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE temp1 = alpha * B[ldb * i + j]; + BASE temp2 = 0.0; + for (k = 0; k < i; k++) { + const BASE Aik = A[i * lda + k]; + C[k * ldc + j] += Aik * temp1; + temp2 += Aik * B[ldb * k + j]; + } + C[i * ldc + j] += temp1 * A[i * lda + i] + alpha * temp2; + } + } + + } else if (side == CblasRight && uplo == CblasUpper) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE temp1 = alpha * B[ldb * i + j]; + BASE temp2 = 0.0; + C[i * ldc + j] += temp1 * A[j * lda + j]; + for (k = j + 1; k < n2; k++) { + const BASE Ajk = A[j * lda + k]; + C[i * ldc + k] += temp1 * Ajk; + temp2 += B[ldb * i + k] * Ajk; + } + C[i * ldc + j] += alpha * temp2; + } + } + + } else if (side == CblasRight && uplo == CblasLower) { + + /* form C := alpha*B*A + C */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE temp1 = alpha * B[ldb * i + j]; + BASE temp2 = 0.0; + for (k = 0; k < j; k++) { + const BASE Ajk = A[j * lda + k]; + C[i * ldc + k] += temp1 * Ajk; + temp2 += B[ldb * i + k] * Ajk; + } + C[i * ldc + j] += temp1 * A[j * lda + j] + alpha * temp2; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_symv.h b/software/gsl-1.15/cblas/source_symv.h new file mode 100644 index 000000000..affe12777 --- /dev/null +++ b/software/gsl-1.15/cblas/source_symv.h @@ -0,0 +1,95 @@ +/* blas/source_symv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS11(SD_SYMV,order,Uplo,N,alpha,A,lda,X,incX,beta,Y,incY); + + if (alpha == 0.0 && beta == 1.0) + return; + + /* form y := beta*y */ + if (beta == 0.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] = 0.0; + iy += incY; + } + } else if (beta != 1.0) { + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + Y[iy] *= beta; + iy += incY; + } + } + + if (alpha == 0.0) + return; + + /* form y := alpha*A*x + y */ + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + BASE temp1 = alpha * X[ix]; + BASE temp2 = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + Y[iy] += temp1 * A[lda * i + i]; + for (j = j_min; j < j_max; j++) { + Y[jy] += temp1 * A[lda * i + j]; + temp2 += X[jx] * A[lda * i + j]; + jx += incX; + jy += incY; + } + Y[iy] += alpha * temp2; + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + INDEX iy = OFFSET(N, incY) + (N - 1) * incY; + for (i = N; i > 0 && i--;) { + BASE temp1 = alpha * X[ix]; + BASE temp2 = 0.0; + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + INDEX jy = OFFSET(N, incY) + j_min * incY; + Y[iy] += temp1 * A[lda * i + i]; + for (j = j_min; j < j_max; j++) { + Y[jy] += temp1 * A[lda * i + j]; + temp2 += X[jx] * A[lda * i + j]; + jx += incX; + jy += incY; + } + Y[iy] += alpha * temp2; + ix -= incX; + iy -= incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_syr.h b/software/gsl-1.15/cblas/source_syr.h new file mode 100644 index 000000000..28725f676 --- /dev/null +++ b/software/gsl-1.15/cblas/source_syr.h @@ -0,0 +1,58 @@ +/* blas/source_syr.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS8(SD_SYR,order,Uplo,N,alpha,X,incX,A,lda); + + if (N == 0) + return; + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp = alpha * X[ix]; + INDEX jx = ix; + for (j = i; j < N; j++) { + A[lda * i + j] += X[jx] * tmp; + jx += incX; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE tmp = alpha * X[ix]; + INDEX jx = OFFSET(N, incX); + for (j = 0; j <= i; j++) { + A[lda * i + j] += X[jx] * tmp; + jx += incX; + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_syr2.h b/software/gsl-1.15/cblas/source_syr2.h new file mode 100644 index 000000000..0c7040ab0 --- /dev/null +++ b/software/gsl-1.15/cblas/source_syr2.h @@ -0,0 +1,68 @@ +/* blas/source_syr2.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + CHECK_ARGS10(SD_SYR2,order,Uplo,N,alpha,X,incX,Y,incY,A,lda); + + if (N == 0) + return; + + if (alpha == 0.0) + return; + + if ((order == CblasRowMajor && Uplo == CblasUpper) + || (order == CblasColMajor && Uplo == CblasLower)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE tmp1 = alpha * X[ix]; + const BASE tmp2 = alpha * Y[iy]; + INDEX jx = ix; + INDEX jy = iy; + for (j = i; j < N; j++) { + A[lda * i + j] += tmp1 * Y[jy] + tmp2 * X[jx]; + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else if ((order == CblasRowMajor && Uplo == CblasLower) + || (order == CblasColMajor && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + INDEX iy = OFFSET(N, incY); + for (i = 0; i < N; i++) { + const BASE tmp1 = alpha * X[ix]; + const BASE tmp2 = alpha * Y[iy]; + INDEX jx = OFFSET(N, incX); + INDEX jy = OFFSET(N, incY); + for (j = 0; j <= i; j++) { + A[lda * i + j] += tmp1 * Y[jy] + tmp2 * X[jx]; + jx += incX; + jy += incY; + } + ix += incX; + iy += incY; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_syr2k_c.h b/software/gsl-1.15/cblas/source_syr2k_c.h new file mode 100644 index 000000000..0318c5e8f --- /dev/null +++ b/software/gsl-1.15/cblas/source_syr2k_c.h @@ -0,0 +1,194 @@ +/* blas/source_syr2k_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS13(SYR2K,Order,Uplo,Trans,N,K,alpha,A,lda,B,ldb,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + trans = Trans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (Trans == CblasNoTrans) ? CblasTrans : CblasNoTrans; + } + + /* form C := beta*C */ + + if (beta_real == 0.0 && beta_imag == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } + } + + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bjk_real = CONST_REAL(B, j * ldb + k); + const BASE Bjk_imag = CONST_IMAG(B, j * ldb + k); + temp_real += ((Aik_real * Bjk_real - Aik_imag * Bjk_imag) + + (Bik_real * Ajk_real - Bik_imag * Ajk_imag)); + temp_imag += ((Aik_real * Bjk_imag + Aik_imag * Bjk_real) + + (Bik_real * Ajk_imag + Bik_imag * Ajk_real)); + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (uplo == CblasUpper && trans == CblasTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE Aki_real = CONST_REAL(A, k * lda + i); + BASE Aki_imag = CONST_IMAG(A, k * lda + i); + BASE Bki_real = CONST_REAL(B, k * ldb + i); + BASE Bki_imag = CONST_IMAG(B, k * ldb + i); + BASE temp1_real = alpha_real * Aki_real - alpha_imag * Aki_imag; + BASE temp1_imag = alpha_real * Aki_imag + alpha_imag * Aki_real; + BASE temp2_real = alpha_real * Bki_real - alpha_imag * Bki_imag; + BASE temp2_imag = alpha_real * Bki_imag + alpha_imag * Bki_real; + for (j = i; j < N; j++) { + BASE Akj_real = CONST_REAL(A, k * lda + j); + BASE Akj_imag = CONST_IMAG(A, k * lda + j); + BASE Bkj_real = CONST_REAL(B, k * ldb + j); + BASE Bkj_imag = CONST_IMAG(B, k * ldb + j); + REAL(C, i * lda + j) += (temp1_real * Bkj_real - temp1_imag * Bkj_imag) + + (temp2_real * Akj_real - temp2_imag * Akj_imag); + IMAG(C, i * lda + j) += (temp1_real * Bkj_imag + temp1_imag * Bkj_real) + + (temp2_real * Akj_imag + temp2_imag * Akj_real); + } + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Bik_real = CONST_REAL(B, i * ldb + k); + const BASE Bik_imag = CONST_IMAG(B, i * ldb + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + const BASE Bjk_real = CONST_REAL(B, j * ldb + k); + const BASE Bjk_imag = CONST_IMAG(B, j * ldb + k); + temp_real += ((Aik_real * Bjk_real - Aik_imag * Bjk_imag) + + (Bik_real * Ajk_real - Bik_imag * Ajk_imag)); + temp_imag += ((Aik_real * Bjk_imag + Aik_imag * Bjk_real) + + (Bik_real * Ajk_imag + Bik_imag * Ajk_real)); + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (uplo == CblasLower && trans == CblasTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE Aki_real = CONST_REAL(A, k * lda + i); + BASE Aki_imag = CONST_IMAG(A, k * lda + i); + BASE Bki_real = CONST_REAL(B, k * ldb + i); + BASE Bki_imag = CONST_IMAG(B, k * ldb + i); + BASE temp1_real = alpha_real * Aki_real - alpha_imag * Aki_imag; + BASE temp1_imag = alpha_real * Aki_imag + alpha_imag * Aki_real; + BASE temp2_real = alpha_real * Bki_real - alpha_imag * Bki_imag; + BASE temp2_imag = alpha_real * Bki_imag + alpha_imag * Bki_real; + for (j = 0; j <= i; j++) { + BASE Akj_real = CONST_REAL(A, k * lda + j); + BASE Akj_imag = CONST_IMAG(A, k * lda + j); + BASE Bkj_real = CONST_REAL(B, k * ldb + j); + BASE Bkj_imag = CONST_IMAG(B, k * ldb + j); + REAL(C, i * lda + j) += (temp1_real * Bkj_real - temp1_imag * Bkj_imag) + + (temp2_real * Akj_real - temp2_imag * Akj_imag); + IMAG(C, i * lda + j) += (temp1_real * Bkj_imag + temp1_imag * Bkj_real) + + (temp2_real * Akj_imag + temp2_imag * Akj_real); + } + } + } + + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_syr2k_r.h b/software/gsl-1.15/cblas/source_syr2k_r.h new file mode 100644 index 000000000..692ee394e --- /dev/null +++ b/software/gsl-1.15/cblas/source_syr2k_r.h @@ -0,0 +1,131 @@ +/* blas/source_syr2k_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS13(SYR2K,Order,Uplo,Trans,N,K,alpha,A,lda,B,ldb,beta,C,ldc); + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + trans = (Trans == CblasConjTrans) ? CblasTrans : Trans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + + if (Trans == CblasTrans || Trans == CblasConjTrans) { + trans = CblasNoTrans; + } else { + trans = CblasTrans; + } + } + + /* form C := beta*C */ + if (beta == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + C[ldc * i + j] = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + C[ldc * i + j] = 0.0; + } + } + } + } else if (beta != 1.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + C[ldc * i + j] *= beta; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + C[ldc * i + j] *= beta; + } + } + } + } + + if (alpha == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += (A[i * lda + k] * B[j * ldb + k] + + B[i * ldb + k] * A[j * lda + k]); + } + C[i * ldc + j] += alpha * temp; + } + } + + } else if (uplo == CblasUpper && trans == CblasTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE temp1 = alpha * A[k * lda + i]; + BASE temp2 = alpha * B[k * ldb + i]; + for (j = i; j < N; j++) { + C[i * lda + j] += temp1 * B[k * ldb + j] + temp2 * A[k * lda + j]; + } + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += (A[i * lda + k] * B[j * ldb + k] + + B[i * ldb + k] * A[j * lda + k]); + } + C[i * ldc + j] += alpha * temp; + } + } + + } else if (uplo == CblasLower && trans == CblasTrans) { + + for (k = 0; k < K; k++) { + for (i = 0; i < N; i++) { + BASE temp1 = alpha * A[k * lda + i]; + BASE temp2 = alpha * B[k * ldb + i]; + for (j = 0; j <= i; j++) { + C[i * lda + j] += temp1 * B[k * ldb + j] + temp2 * A[k * lda + j]; + } + } + } + + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_syrk_c.h b/software/gsl-1.15/cblas/source_syrk_c.h new file mode 100644 index 000000000..b94e68d28 --- /dev/null +++ b/software/gsl-1.15/cblas/source_syrk_c.h @@ -0,0 +1,168 @@ +/* blas/source_syrk_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS11(SYRK,Order,Uplo,Trans,N,K,alpha,A,lda,beta,C,ldc); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + const BASE beta_real = CONST_REAL0(beta); + const BASE beta_imag = CONST_IMAG0(beta); + + if ((alpha_real == 0.0 && alpha_imag == 0.0) + && (beta_real == 1.0 && beta_imag == 0.0)) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + /* FIXME: original blas does not make distinction between Trans and ConjTrans?? */ + trans = (Trans == CblasNoTrans) ? CblasNoTrans : CblasTrans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (Trans == CblasNoTrans) ? CblasTrans : CblasNoTrans; + } + + /* form y := beta*y */ + if (beta_real == 0.0 && beta_imag == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + REAL(C, ldc * i + j) = 0.0; + IMAG(C, ldc * i + j) = 0.0; + } + } + } + } else if (!(beta_real == 1.0 && beta_imag == 0.0)) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + const BASE Cij_real = REAL(C, ldc * i + j); + const BASE Cij_imag = IMAG(C, ldc * i + j); + REAL(C, ldc * i + j) = beta_real * Cij_real - beta_imag * Cij_imag; + IMAG(C, ldc * i + j) = beta_real * Cij_imag + beta_imag * Cij_real; + } + } + } + } + + if (alpha_real == 0.0 && alpha_imag == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + temp_real += Aik_real * Ajk_real - Aik_imag * Ajk_imag; + temp_imag += Aik_real * Ajk_imag + Aik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (uplo == CblasUpper && trans == CblasTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = CONST_IMAG(A, k * lda + i); + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = CONST_IMAG(A, k * lda + j); + temp_real += Aki_real * Akj_real - Aki_imag * Akj_imag; + temp_imag += Aki_real * Akj_imag + Aki_imag * Akj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = CONST_IMAG(A, i * lda + k); + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = CONST_IMAG(A, j * lda + k); + temp_real += Aik_real * Ajk_real - Aik_imag * Ajk_imag; + temp_imag += Aik_real * Ajk_imag + Aik_imag * Ajk_real; + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (uplo == CblasLower && trans == CblasTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + for (k = 0; k < K; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = CONST_IMAG(A, k * lda + i); + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = CONST_IMAG(A, k * lda + j); + temp_real += Aki_real * Akj_real - Aki_imag * Akj_imag; + temp_imag += Aki_real * Akj_imag + Aki_imag * Akj_real; + } + REAL(C, i * ldc + j) += alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(C, i * ldc + j) += alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_syrk_r.h b/software/gsl-1.15/cblas/source_syrk_r.h new file mode 100644 index 000000000..0455c388f --- /dev/null +++ b/software/gsl-1.15/cblas/source_syrk_r.h @@ -0,0 +1,127 @@ +/* blas/source_syrk_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + int uplo, trans; + + CHECK_ARGS11(SYRK,Order,Uplo,Trans,N,K,alpha,A,lda,beta,C,ldc); + + if (alpha == 0.0 && beta == 1.0) + return; + + if (Order == CblasRowMajor) { + uplo = Uplo; + trans = (Trans == CblasConjTrans) ? CblasTrans : Trans; + } else { + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + + if (Trans == CblasTrans || Trans == CblasConjTrans) { + trans = CblasNoTrans; + } else { + trans = CblasTrans; + } + } + + /* form y := beta*y */ + if (beta == 0.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + C[ldc * i + j] = 0.0; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + C[ldc * i + j] = 0.0; + } + } + } + } else if (beta != 1.0) { + if (uplo == CblasUpper) { + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + C[ldc * i + j] *= beta; + } + } + } else { + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + C[ldc * i + j] *= beta; + } + } + } + } + + if (alpha == 0.0) + return; + + if (uplo == CblasUpper && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += A[i * lda + k] * A[j * lda + k]; + } + C[i * ldc + j] += alpha * temp; + } + } + + } else if (uplo == CblasUpper && trans == CblasTrans) { + + for (i = 0; i < N; i++) { + for (j = i; j < N; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += A[k * lda + i] * A[k * lda + j]; + } + C[i * ldc + j] += alpha * temp; + } + } + + } else if (uplo == CblasLower && trans == CblasNoTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += A[i * lda + k] * A[j * lda + k]; + } + C[i * ldc + j] += alpha * temp; + } + } + + } else if (uplo == CblasLower && trans == CblasTrans) { + + for (i = 0; i < N; i++) { + for (j = 0; j <= i; j++) { + BASE temp = 0.0; + for (k = 0; k < K; k++) { + temp += A[k * lda + i] * A[k * lda + j]; + } + C[i * ldc + j] += alpha * temp; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tbmv_c.h b/software/gsl-1.15/cblas/source_tbmv_c.h new file mode 100644 index 000000000..659ae9cc3 --- /dev/null +++ b/software/gsl-1.15/cblas/source_tbmv_c.h @@ -0,0 +1,172 @@ +/* blas/source_tbmv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + INDEX i, j; + + CHECK_ARGS10(TBMV,order,Uplo,TransA,Diag,N,K,A,lda,X,incX); + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* form x := A*x */ + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + incX * j_min; + for (j = j_min; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * i + (j - i)); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + (j - i)); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + 0); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + 0); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + + for (i = N; i > 0 && i--;) { /* N-1 ... 0 */ + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * i + (K - i + j)); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + (K - i + j)); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + K); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + K); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { /* N-1 ... 0 */ + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * j + (i - j)); + const BASE A_imag = conj * CONST_IMAG(A, lda * j + (i - j)); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + 0); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + 0); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * j + (K - j + i)); + const BASE A_imag = conj * CONST_IMAG(A, lda * j + (K - j + i)); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + K); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + K); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tbmv_r.h b/software/gsl-1.15/cblas/source_tbmv_r.h new file mode 100644 index 000000000..9c3c12c2b --- /dev/null +++ b/software/gsl-1.15/cblas/source_tbmv_r.h @@ -0,0 +1,109 @@ +/* blas/source_tbmv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + const int nonunit = (Diag == CblasNonUnit); + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS10 (TBMV,order,Uplo,TransA,Diag,N,K,A,lda,X,incX); + + if (N == 0) + return; + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* form x := A*x */ + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp = (nonunit ? A[lda * i + 0] : 1.0) * X[ix]; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * i + (j - i)]; + jx += incX; + } + + X[ix] = temp; + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE temp = (nonunit ? A[lda * i + K] : 1.0) * X[ix]; + const INDEX j_min = (i > K ? i - K : 0); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * i + (K - i + j)]; + jx += incX; + } + X[ix] = temp; + ix -= incX; + } + + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + + for (i = N; i > 0 && i--;) { + BASE temp = 0.0; + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * j + (i - j)]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + 0]; + } else { + X[ix] += temp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * j + (K - j + i)]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + K]; + } else { + X[ix] += temp; + } + ix += incX; + } + } +} diff --git a/software/gsl-1.15/cblas/source_tbsv_c.h b/software/gsl-1.15/cblas/source_tbsv_c.h new file mode 100644 index 000000000..463e2cc9a --- /dev/null +++ b/software/gsl-1.15/cblas/source_tbsv_c.h @@ -0,0 +1,181 @@ +/* blas/source_tbsv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + INDEX i, j; + + CHECK_ARGS10(TBSV,order,Uplo,TransA,Diag,N,K,A,lda,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + + for (i = N; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij_real = CONST_REAL(A, lda * i + (j - i)); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * i + (j - i)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + 0); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + 0); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + /* forward substitution */ + + INDEX ix = OFFSET(N, incX); + + for (i = 0; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij_real = CONST_REAL(A, lda * i + (K + j - i)); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * i + (K + j - i)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + K); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + K); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := inv( A' )*x */ + + /* forward substitution */ + + INDEX ix = OFFSET(N, incX); + + for (i = 0; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij_real = CONST_REAL(A, (i - j) + lda * j); + const BASE Aij_imag = conj * CONST_IMAG(A, (i - j) + lda * j); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(A, 0 + lda * i); + const BASE a_imag = conj * CONST_IMAG(A, 0 + lda * i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + + for (i = N; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij_real = CONST_REAL(A, (K + i - j) + lda * j); + const BASE Aij_imag = conj * CONST_IMAG(A, (K + i - j) + lda * j); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(A, K + lda * i); + const BASE a_imag = conj * CONST_IMAG(A, K + lda * i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tbsv_r.h b/software/gsl-1.15/cblas/source_tbsv_r.h new file mode 100644 index 000000000..4958c4238 --- /dev/null +++ b/software/gsl-1.15/cblas/source_tbsv_r.h @@ -0,0 +1,125 @@ +/* blas/source_tbsv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int nonunit = (Diag == CblasNonUnit); + INDEX i, j; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS10(TBSV,order,Uplo,TransA,Diag,N,K,A,lda,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* backsubstitution */ + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + for (i = N; i > 0 && i--;) { + BASE tmp = X[ix]; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij = A[lda * i + (j - i)]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + 0]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + /* forward substitution */ + INDEX ix = OFFSET(N, incX); + + for (i = 0; i < N; i++) { + BASE tmp = X[ix]; + const INDEX j_min = (i > K ? i - K : 0); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aij = A[lda * i + (K + j - i)]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + K]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + + /* form x := inv( A' )*x */ + + /* forward substitution */ + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE tmp = X[ix]; + const INDEX j_min = (K > i ? 0 : i - K); + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aji = A[(i - j) + lda * j]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[0 + lda * i]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE tmp = X[ix]; + const INDEX j_min = i + 1; + const INDEX j_max = GSL_MIN(N, i + K + 1); + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + const BASE Aji = A[(K + i - j) + lda * j]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[K + lda * i]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tpmv_c.h b/software/gsl-1.15/cblas/source_tpmv_c.h new file mode 100644 index 000000000..692b94284 --- /dev/null +++ b/software/gsl-1.15/cblas/source_tpmv_c.h @@ -0,0 +1,174 @@ +/* blas/source_tpmv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + + CHECK_ARGS8(TPMV,order,Uplo,TransA,Diag,N,Ap,X,incX); + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* form x:= A*x */ + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE Aii_real = CONST_REAL(Ap, TPUP(N, i, i)); + const BASE Aii_imag = conj * CONST_IMAG(Ap, TPUP(N, i, i)); + BASE temp_r; + BASE temp_i; + if (nonunit) { + BASE x_real = REAL(X, ix); + BASE x_imag = IMAG(X, ix); + temp_r = Aii_real * x_real - Aii_imag * x_imag; + temp_i = Aii_real * x_imag + Aii_imag * x_real; + } else { + temp_r = REAL(X, ix); + temp_i = IMAG(X, ix); + } + + { + INDEX jx = OFFSET(N, incX) + (i + 1) * incX; + for (j = i + 1; j < N; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPUP(N, i, j)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPUP(N, i, j)); + BASE x_real = REAL(X, jx); + BASE x_imag = IMAG(X, jx); + temp_r += Aij_real * x_real - Aij_imag * x_imag; + temp_i += Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + } + + REAL(X, ix) = temp_r; + IMAG(X, ix) = temp_i; + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + for (i = N; i > 0 && i--;) { + const BASE Aii_real = CONST_REAL(Ap, TPLO(N, i, i)); + const BASE Aii_imag = conj * CONST_IMAG(Ap, TPLO(N, i, i)); + BASE temp_r; + BASE temp_i; + if (nonunit) { + BASE x_real = REAL(X, ix); + BASE x_imag = IMAG(X, ix); + temp_r = Aii_real * x_real - Aii_imag * x_imag; + temp_i = Aii_real * x_imag + Aii_imag * x_real; + } else { + temp_r = REAL(X, ix); + temp_i = IMAG(X, ix); + } + + { + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPLO(N, i, j)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPLO(N, i, j)); + BASE x_real = REAL(X, jx); + BASE x_imag = IMAG(X, jx); + temp_r += Aij_real * x_real - Aij_imag * x_imag; + temp_i += Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + } + + REAL(X, ix) = temp_r; + IMAG(X, ix) = temp_i; + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + for (i = N; i > 0 && i--;) { + const BASE Aii_real = CONST_REAL(Ap, TPUP(N, i, i)); + const BASE Aii_imag = conj * CONST_IMAG(Ap, TPUP(N, i, i)); + BASE temp_r; + BASE temp_i; + if (nonunit) { + BASE x_real = REAL(X, ix); + BASE x_imag = IMAG(X, ix); + temp_r = Aii_real * x_real - Aii_imag * x_imag; + temp_i = Aii_real * x_imag + Aii_imag * x_real; + } else { + temp_r = REAL(X, ix); + temp_i = IMAG(X, ix); + } + { + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + BASE x_real = REAL(X, jx); + BASE x_imag = IMAG(X, jx); + const BASE Aji_real = CONST_REAL(Ap, TPUP(N, j, i)); + const BASE Aji_imag = conj * CONST_IMAG(Ap, TPUP(N, j, i)); + temp_r += Aji_real * x_real - Aji_imag * x_imag; + temp_i += Aji_real * x_imag + Aji_imag * x_real; + jx += incX; + } + } + + REAL(X, ix) = temp_r; + IMAG(X, ix) = temp_i; + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + const BASE Aii_real = CONST_REAL(Ap, TPLO(N, i, i)); + const BASE Aii_imag = conj * CONST_IMAG(Ap, TPLO(N, i, i)); + BASE temp_r; + BASE temp_i; + if (nonunit) { + BASE x_real = REAL(X, ix); + BASE x_imag = IMAG(X, ix); + temp_r = Aii_real * x_real - Aii_imag * x_imag; + temp_i = Aii_real * x_imag + Aii_imag * x_real; + } else { + temp_r = REAL(X, ix); + temp_i = IMAG(X, ix); + } + { + INDEX jx = OFFSET(N, incX) + (i + 1) * incX; + for (j = i + 1; j < N; j++) { + BASE x_real = REAL(X, jx); + BASE x_imag = IMAG(X, jx); + const BASE Aji_real = CONST_REAL(Ap, TPLO(N, j, i)); + const BASE Aji_imag = conj * CONST_IMAG(Ap, TPLO(N, j, i)); + temp_r += Aji_real * x_real - Aji_imag * x_imag; + temp_i += Aji_real * x_imag + Aji_imag * x_real; + jx += incX; + } + } + REAL(X, ix) = temp_r; + IMAG(X, ix) = temp_i; + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tpmv_r.h b/software/gsl-1.15/cblas/source_tpmv_r.h new file mode 100644 index 000000000..00de7a8cc --- /dev/null +++ b/software/gsl-1.15/cblas/source_tpmv_r.h @@ -0,0 +1,100 @@ +/* blas/source_tpmv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + const int nonunit = (Diag == CblasNonUnit); + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS8(TPMV,order,Uplo,TransA,Diag,N,Ap,X,incX); + + if (N == 0) + return; + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* form x:= A*x */ + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE atmp = Ap[TPUP(N, i, i)]; + BASE temp = (nonunit ? X[ix] * atmp : X[ix]); + INDEX jx = OFFSET(N, incX) + (i + 1) * incX; + for (j = i + 1; j < N; j++) { + atmp = Ap[TPUP(N, i, j)]; + temp += atmp * X[jx]; + jx += incX; + } + X[ix] = temp; + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE atmp = Ap[TPLO(N, i, i)]; + BASE temp = (nonunit ? X[ix] * atmp : X[ix]); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + atmp = Ap[TPLO(N, i, j)]; + temp += atmp * X[jx]; + jx += incX; + } + X[ix] = temp; + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE atmp = Ap[TPUP(N, i, i)]; + BASE temp = (nonunit ? X[ix] * atmp : X[ix]); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + atmp = Ap[TPUP(N, j, i)]; + temp += atmp * X[jx]; + jx += incX; + } + X[ix] = temp; + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE atmp = Ap[TPLO(N, i, i)]; + BASE temp = (nonunit ? X[ix] * atmp : X[ix]); + INDEX jx = OFFSET(N, incX) + (i + 1) * incX; + for (j = i + 1; j < N; j++) { + atmp = Ap[TPLO(N, j, i)]; + temp += atmp * X[jx]; + jx += incX; + } + X[ix] = temp; + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tpsv_c.h b/software/gsl-1.15/cblas/source_tpsv_c.h new file mode 100644 index 000000000..7e74dba85 --- /dev/null +++ b/software/gsl-1.15/cblas/source_tpsv_c.h @@ -0,0 +1,229 @@ +/* blas/source_tpsv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + INDEX i, j; + + CHECK_ARGS8(TPSV,order,Uplo,TransA,Diag,N,Ap,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPUP(N, (N - 1), (N - 1))); + const BASE a_imag = conj * CONST_IMAG(Ap, TPUP(N, (N - 1), (N - 1))); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix -= incX; + + for (i = N - 1; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + INDEX jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPUP(N, i, j)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPUP(N, i, j)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPUP(N, i, i)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPUP(N, i, i)); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + /* forward substitution */ + + INDEX ix = OFFSET(N, incX); + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPLO(N, 0, 0)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPLO(N, 0, 0)); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix += incX; + + for (i = 1; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPLO(N, i, j)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPLO(N, i, j)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPLO(N, i, i)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPLO(N, i, i)); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := inv( A' )*x */ + + /* forward substitution */ + + INDEX ix = OFFSET(N, incX); + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPUP(N, 0, 0)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPUP(N, 0, 0)); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix += incX; + + for (i = 1; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPUP(N, j, i)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPUP(N, j, i)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPUP(N, i, i)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPUP(N, i, i)); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPLO(N, (N - 1), (N - 1))); + const BASE a_imag = conj * CONST_IMAG(Ap, TPLO(N, (N - 1), (N - 1))); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix -= incX; + + for (i = N - 1; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + INDEX jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij_real = CONST_REAL(Ap, TPLO(N, j, i)); + const BASE Aij_imag = conj * CONST_IMAG(Ap, TPLO(N, j, i)); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(Ap, TPLO(N, i, i)); + const BASE a_imag = conj * CONST_IMAG(Ap, TPLO(N, i, i)); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_tpsv_r.h b/software/gsl-1.15/cblas/source_tpsv_r.h new file mode 100644 index 000000000..b24026103 --- /dev/null +++ b/software/gsl-1.15/cblas/source_tpsv_r.h @@ -0,0 +1,134 @@ +/* blas/source_tpsv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + const int nonunit = (Diag == CblasNonUnit); + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS8(TPSV,order,Uplo,TransA,Diag,N,Ap,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* backsubstitution */ + INDEX ix = OFFSET(N, incX) + incX * (N - 1); + if (nonunit) { + X[ix] = X[ix] / Ap[TPUP(N, (N - 1), (N - 1))]; + } + ix -= incX; + for (i = N - 1; i > 0 && i--;) { + BASE tmp = X[ix]; + INDEX jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij = Ap[TPUP(N, i, j)]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / Ap[TPUP(N, i, i)]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + /* forward substitution */ + INDEX ix = OFFSET(N, incX); + if (nonunit) { + X[ix] = X[ix] / Ap[TPLO(N, 0, 0)]; + } + ix += incX; + for (i = 1; i < N; i++) { + BASE tmp = X[ix]; + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij = Ap[TPLO(N, i, j)]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / Ap[TPLO(N, i, j)]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + + /* form x := inv( A' )*x */ + + /* forward substitution */ + INDEX ix = OFFSET(N, incX); + if (nonunit) { + X[ix] = X[ix] / Ap[TPUP(N, 0, 0)]; + } + ix += incX; + for (i = 1; i < N; i++) { + BASE tmp = X[ix]; + INDEX jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aji = Ap[TPUP(N, j, i)]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / Ap[TPUP(N, i, i)]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + if (nonunit) { + X[ix] = X[ix] / Ap[TPLO(N, (N - 1), (N - 1))]; + } + ix -= incX; + for (i = N - 1; i > 0 && i--;) { + BASE tmp = X[ix]; + INDEX jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aji = Ap[TPLO(N, j, i)]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / Ap[TPLO(N, i, i)]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + +} diff --git a/software/gsl-1.15/cblas/source_trmm_c.h b/software/gsl-1.15/cblas/source_trmm_c.h new file mode 100644 index 000000000..6c52a6243 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trmm_c.h @@ -0,0 +1,335 @@ +/* blas/source_trmm_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + + const int nonunit = (Diag == CblasNonUnit); + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + int side, uplo, trans; + + CHECK_ARGS12(TRMM,Order,Side,Uplo,TransA,Diag,M,N,alpha,A,lda,B,ldb); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + side = Side; + uplo = Uplo; + trans = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; + } else { + n1 = N; + n2 = M; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; /* exchanged */ + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; /* exchanged */ + trans = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; /* same */ + } + + if (side == CblasLeft && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * TriU(A)*B */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = conj * CONST_IMAG(A, i * lda + i); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real = Aii_real * Bij_real - Aii_imag * Bij_imag; + temp_imag = Aii_real * Bij_imag + Aii_imag * Bij_real; + } else { + temp_real = REAL(B, i * ldb + j); + temp_imag = IMAG(B, i * ldb + j); + } + + for (k = i + 1; k < n1; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = conj * CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = REAL(B, k * ldb + j); + const BASE Bkj_imag = IMAG(B, k * ldb + j); + temp_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasLeft && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * (TriU(A))' *B */ + + for (i = n1; i > 0 && i--;) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + for (k = 0; k < i; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = conj * CONST_IMAG(A, k * lda + i); + const BASE Bkj_real = REAL(B, k * ldb + j); + const BASE Bkj_imag = IMAG(B, k * ldb + j); + temp_real += Aki_real * Bkj_real - Aki_imag * Bkj_imag; + temp_imag += Aki_real * Bkj_imag + Aki_imag * Bkj_real; + } + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = conj * CONST_IMAG(A, i * lda + i); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real += Aii_real * Bij_real - Aii_imag * Bij_imag; + temp_imag += Aii_real * Bij_imag + Aii_imag * Bij_real; + } else { + temp_real += REAL(B, i * ldb + j); + temp_imag += IMAG(B, i * ldb + j); + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * TriL(A)*B */ + + + for (i = n1; i > 0 && i--;) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + for (k = 0; k < i; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = conj * CONST_IMAG(A, i * lda + k); + const BASE Bkj_real = REAL(B, k * ldb + j); + const BASE Bkj_imag = IMAG(B, k * ldb + j); + temp_real += Aik_real * Bkj_real - Aik_imag * Bkj_imag; + temp_imag += Aik_real * Bkj_imag + Aik_imag * Bkj_real; + } + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = conj * CONST_IMAG(A, i * lda + i); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real += Aii_real * Bij_real - Aii_imag * Bij_imag; + temp_imag += Aii_real * Bij_imag + Aii_imag * Bij_real; + } else { + temp_real += REAL(B, i * ldb + j); + temp_imag += IMAG(B, i * ldb + j); + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * TriL(A)' *B */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, i * lda + i); + const BASE Aii_imag = conj * CONST_IMAG(A, i * lda + i); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real = Aii_real * Bij_real - Aii_imag * Bij_imag; + temp_imag = Aii_real * Bij_imag + Aii_imag * Bij_real; + } else { + temp_real = REAL(B, i * ldb + j); + temp_imag = IMAG(B, i * ldb + j); + } + + for (k = i + 1; k < n1; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = conj * CONST_IMAG(A, k * lda + i); + const BASE Bkj_real = REAL(B, k * ldb + j); + const BASE Bkj_imag = IMAG(B, k * ldb + j); + temp_real += Aki_real * Bkj_real - Aki_imag * Bkj_imag; + temp_imag += Aki_real * Bkj_imag + Aki_imag * Bkj_real; + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * B * TriU(A) */ + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + for (k = 0; k < j; k++) { + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = conj * CONST_IMAG(A, k * lda + j); + const BASE Bik_real = REAL(B, i * ldb + k); + const BASE Bik_imag = IMAG(B, i * ldb + k); + temp_real += Akj_real * Bik_real - Akj_imag * Bik_imag; + temp_imag += Akj_real * Bik_imag + Akj_imag * Bik_real; + } + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, j * lda + j); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real += Ajj_real * Bij_real - Ajj_imag * Bij_imag; + temp_imag += Ajj_real * Bij_imag + Ajj_imag * Bij_real; + } else { + temp_real += REAL(B, i * ldb + j); + temp_imag += IMAG(B, i * ldb + j); + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * B * (TriU(A))' */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, j * lda + j); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real = Ajj_real * Bij_real - Ajj_imag * Bij_imag; + temp_imag = Ajj_real * Bij_imag + Ajj_imag * Bij_real; + } else { + temp_real = REAL(B, i * ldb + j); + temp_imag = IMAG(B, i * ldb + j); + } + + for (k = j + 1; k < n2; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = conj * CONST_IMAG(A, j * lda + k); + const BASE Bik_real = REAL(B, i * ldb + k); + const BASE Bik_imag = IMAG(B, i * ldb + k); + temp_real += Ajk_real * Bik_real - Ajk_imag * Bik_imag; + temp_imag += Ajk_real * Bik_imag + Ajk_imag * Bik_real; + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha *B * TriL(A) */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, j * lda + j); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real = Ajj_real * Bij_real - Ajj_imag * Bij_imag; + temp_imag = Ajj_real * Bij_imag + Ajj_imag * Bij_real; + } else { + temp_real = REAL(B, i * ldb + j); + temp_imag = IMAG(B, i * ldb + j); + } + + for (k = j + 1; k < n2; k++) { + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = conj * CONST_IMAG(A, k * lda + j); + const BASE Bik_real = REAL(B, i * ldb + k); + const BASE Bik_imag = IMAG(B, i * ldb + k); + temp_real += Akj_real * Bik_real - Akj_imag * Bik_imag; + temp_imag += Akj_real * Bik_imag + Akj_imag * Bik_real; + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * B * TriL(A)' */ + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + BASE temp_real = 0.0; + BASE temp_imag = 0.0; + + for (k = 0; k < j; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = conj * CONST_IMAG(A, j * lda + k); + const BASE Bik_real = REAL(B, i * ldb + k); + const BASE Bik_imag = IMAG(B, i * ldb + k); + temp_real += Ajk_real * Bik_real - Ajk_imag * Bik_imag; + temp_imag += Ajk_real * Bik_imag + Ajk_imag * Bik_real; + } + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, j * lda + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, j * lda + j); + const BASE Bij_real = REAL(B, i * ldb + j); + const BASE Bij_imag = IMAG(B, i * ldb + j); + temp_real += Ajj_real * Bij_real - Ajj_imag * Bij_imag; + temp_imag += Ajj_real * Bij_imag + Ajj_imag * Bij_real; + } else { + temp_real += REAL(B, i * ldb + j); + temp_imag += IMAG(B, i * ldb + j); + } + + REAL(B, ldb * i + j) = alpha_real * temp_real - alpha_imag * temp_imag; + IMAG(B, ldb * i + j) = alpha_real * temp_imag + alpha_imag * temp_real; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_trmm_r.h b/software/gsl-1.15/cblas/source_trmm_r.h new file mode 100644 index 000000000..940b474d9 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trmm_r.h @@ -0,0 +1,226 @@ +/* blas/source_trmm_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + + const int nonunit = (Diag == CblasNonUnit); + int side, uplo, trans; + + CHECK_ARGS12(TRMM,Order,Side,Uplo,TransA,Diag,M,N,alpha,A,lda,B,ldb); + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + side = Side; + uplo = Uplo; + trans = (TransA == CblasConjTrans) ? CblasTrans : TransA; + } else { + n1 = N; + n2 = M; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (TransA == CblasConjTrans) ? CblasTrans : TransA; + } + + if (side == CblasLeft && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * TriU(A)*B */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + if (nonunit) { + temp = A[i * lda + i] * B[i * ldb + j]; + } else { + temp = B[i * ldb + j]; + } + + for (k = i + 1; k < n1; k++) { + temp += A[lda * i + k] * B[k * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasLeft && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * (TriU(A))' *B */ + + for (i = n1; i > 0 && i--;) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + for (k = 0; k < i; k++) { + temp += A[lda * k + i] * B[k * ldb + j]; + } + + if (nonunit) { + temp += A[i * lda + i] * B[i * ldb + j]; + } else { + temp += B[i * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * TriL(A)*B */ + + + for (i = n1; i > 0 && i--;) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + for (k = 0; k < i; k++) { + temp += A[lda * i + k] * B[k * ldb + j]; + } + + if (nonunit) { + temp += A[i * lda + i] * B[i * ldb + j]; + } else { + temp += B[i * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * TriL(A)' *B */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + if (nonunit) { + temp = A[i * lda + i] * B[i * ldb + j]; + } else { + temp = B[i * ldb + j]; + } + + for (k = i + 1; k < n1; k++) { + temp += A[lda * k + i] * B[k * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * B * TriU(A) */ + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + BASE temp = 0.0; + + for (k = 0; k < j; k++) { + temp += A[lda * k + j] * B[i * ldb + k]; + } + + if (nonunit) { + temp += A[j * lda + j] * B[i * ldb + j]; + } else { + temp += B[i * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * B * (TriU(A))' */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + if (nonunit) { + temp = A[j * lda + j] * B[i * ldb + j]; + } else { + temp = B[i * ldb + j]; + } + + for (k = j + 1; k < n2; k++) { + temp += A[lda * j + k] * B[i * ldb + k]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha *B * TriL(A) */ + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + BASE temp = 0.0; + + if (nonunit) { + temp = A[j * lda + j] * B[i * ldb + j]; + } else { + temp = B[i * ldb + j]; + } + + for (k = j + 1; k < n2; k++) { + temp += A[lda * k + j] * B[i * ldb + k]; + } + + + B[ldb * i + j] = alpha * temp; + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * B * TriL(A)' */ + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + BASE temp = 0.0; + + for (k = 0; k < j; k++) { + temp += A[lda * j + k] * B[i * ldb + k]; + } + + if (nonunit) { + temp += A[j * lda + j] * B[i * ldb + j]; + } else { + temp += B[i * ldb + j]; + } + + B[ldb * i + j] = alpha * temp; + } + } + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_trmv_c.h b/software/gsl-1.15/cblas/source_trmv_c.h new file mode 100644 index 000000000..e1406d169 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trmv_c.h @@ -0,0 +1,171 @@ +/* blas/source_trmv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + + INDEX i, j; + + CHECK_ARGS9(TRMV,order,Uplo,TransA,Diag,N,A,lda,X,incX); + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + + /* form x := A*x */ + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = i + 1; + INDEX jx = OFFSET(N, incX) + incX * j_min; + for (j = j_min; j < N; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * i + j); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + j); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + i); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + + for (i = N; i > 0 && i--;) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX); + for (j = 0; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * i + j); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + j); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + i); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX); + for (j = 0; j < j_max; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * j + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * j + i); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + i); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix -= incX; + } + + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp_r = 0.0; + BASE temp_i = 0.0; + const INDEX j_min = i + 1; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < N; j++) { + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + const BASE A_real = CONST_REAL(A, lda * j + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * j + i); + + temp_r += A_real * x_real - A_imag * x_imag; + temp_i += A_real * x_imag + A_imag * x_real; + + jx += incX; + } + if (nonunit) { + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE A_real = CONST_REAL(A, lda * i + i); + const BASE A_imag = conj * CONST_IMAG(A, lda * i + i); + + REAL(X, ix) = temp_r + (A_real * x_real - A_imag * x_imag); + IMAG(X, ix) = temp_i + (A_real * x_imag + A_imag * x_real); + } else { + REAL(X, ix) += temp_r; + IMAG(X, ix) += temp_i; + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_trmv_r.h b/software/gsl-1.15/cblas/source_trmv_r.h new file mode 100644 index 000000000..ff1d8bc87 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trmv_r.h @@ -0,0 +1,110 @@ +/* blas/source_trmv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j; + + const int nonunit = (Diag == CblasNonUnit); + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS9(TRMV,order,Uplo,TransA,Diag,N,A,lda,X,incX); + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* form x := A*x */ + + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * i + j]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + i]; + } else { + X[ix] += temp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE temp = 0.0; + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * i + j]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + i]; + } else { + X[ix] += temp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := A'*x */ + INDEX ix = OFFSET(N, incX) + (N - 1) * incX; + for (i = N; i > 0 && i--;) { + BASE temp = 0.0; + const INDEX j_min = 0; + const INDEX j_max = i; + INDEX jx = OFFSET(N, incX) + j_min * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * j + i]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + i]; + } else { + X[ix] += temp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + INDEX ix = OFFSET(N, incX); + for (i = 0; i < N; i++) { + BASE temp = 0.0; + const INDEX j_min = i + 1; + const INDEX j_max = N; + INDEX jx = OFFSET(N, incX) + (i + 1) * incX; + for (j = j_min; j < j_max; j++) { + temp += X[jx] * A[lda * j + i]; + jx += incX; + } + if (nonunit) { + X[ix] = temp + X[ix] * A[lda * i + i]; + } else { + X[ix] += temp; + } + ix += incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_trsm_c.h b/software/gsl-1.15/cblas/source_trsm_c.h new file mode 100644 index 000000000..e2f8835fe --- /dev/null +++ b/software/gsl-1.15/cblas/source_trsm_c.h @@ -0,0 +1,402 @@ +/* blas/source_trsm_c.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + + const int nonunit = (Diag == CblasNonUnit); + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + int side, uplo, trans; + + CHECK_ARGS12(TRSM,Order,Side,Uplo,TransA,Diag,M,N,alpha,A,lda,B,ldb); + + { + const BASE alpha_real = CONST_REAL0(alpha); + const BASE alpha_imag = CONST_IMAG0(alpha); + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + side = Side; + uplo = Uplo; + trans = TransA; + trans = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; + } else { + n1 = N; + n2 = M; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; /* exchanged */ + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; /* exchanged */ + trans = (TransA == CblasNoTrans) ? CblasNoTrans : CblasTrans; /* same */ + } + + if (side == CblasLeft && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * inv(TriU(A)) *B */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = n1; i > 0 && i--;) { + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, lda * i + i); + const BASE Aii_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(Aii_real, Aii_imag); + const BASE a_real = Aii_real / s; + const BASE a_imag = Aii_imag / s; + + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + } + + for (k = 0; k < i; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = conj * CONST_IMAG(A, k * lda + i); + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * k + j) -= Aki_real * Bij_real - Aki_imag * Bij_imag; + IMAG(B, ldb * k + j) -= Aki_real * Bij_imag + Aki_imag * Bij_real; + } + } + } + + } else if (side == CblasLeft && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * inv(TriU(A))' *B */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, lda * i + i); + const BASE Aii_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(Aii_real, Aii_imag); + const BASE a_real = Aii_real / s; + const BASE a_imag = Aii_imag / s; + + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + } + + for (k = i + 1; k < n1; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = conj * CONST_IMAG(A, i * lda + k); + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * k + j) -= Aik_real * Bij_real - Aik_imag * Bij_imag; + IMAG(B, ldb * k + j) -= Aik_real * Bij_imag + Aik_imag * Bij_real; + } + } + } + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * inv(TriL(A))*B */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, lda * i + i); + const BASE Aii_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(Aii_real, Aii_imag); + const BASE a_real = Aii_real / s; + const BASE a_imag = Aii_imag / s; + + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + } + + for (k = i + 1; k < n1; k++) { + const BASE Aki_real = CONST_REAL(A, k * lda + i); + const BASE Aki_imag = conj * CONST_IMAG(A, k * lda + i); + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * k + j) -= Aki_real * Bij_real - Aki_imag * Bij_imag; + IMAG(B, ldb * k + j) -= Aki_real * Bij_imag + Aki_imag * Bij_real; + } + } + } + + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * TriL(A)' *B */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = n1; i > 0 && i--;) { + if (nonunit) { + const BASE Aii_real = CONST_REAL(A, lda * i + i); + const BASE Aii_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(Aii_real, Aii_imag); + const BASE a_real = Aii_real / s; + const BASE a_imag = Aii_imag / s; + + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + } + + for (k = 0; k < i; k++) { + const BASE Aik_real = CONST_REAL(A, i * lda + k); + const BASE Aik_imag = conj * CONST_IMAG(A, i * lda + k); + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * k + j) -= Aik_real * Bij_real - Aik_imag * Bij_imag; + IMAG(B, ldb * k + j) -= Aik_real * Bij_imag + Aik_imag * Bij_real; + } + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * B * inv(TriU(A)) */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, lda * j + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, lda * j + j); + const BASE s = xhypot(Ajj_real, Ajj_imag); + const BASE a_real = Ajj_real / s; + const BASE a_imag = Ajj_imag / s; + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + + { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + for (k = j + 1; k < n2; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = conj * CONST_IMAG(A, j * lda + k); + REAL(B, ldb * i + k) -= Ajk_real * Bij_real - Ajk_imag * Bij_imag; + IMAG(B, ldb * i + k) -= Ajk_real * Bij_imag + Ajk_imag * Bij_real; + } + } + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * B * inv(TriU(A))' */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, lda * j + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, lda * j + j); + const BASE s = xhypot(Ajj_real, Ajj_imag); + const BASE a_real = Ajj_real / s; + const BASE a_imag = Ajj_imag / s; + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + + { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + for (k = 0; k < j; k++) { + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = conj * CONST_IMAG(A, k * lda + j); + REAL(B, ldb * i + k) -= Akj_real * Bij_real - Akj_imag * Bij_imag; + IMAG(B, ldb * i + k) -= Akj_real * Bij_imag + Akj_imag * Bij_real; + } + } + } + } + + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * B * inv(TriL(A)) */ + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, lda * j + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, lda * j + j); + const BASE s = xhypot(Ajj_real, Ajj_imag); + const BASE a_real = Ajj_real / s; + const BASE a_imag = Ajj_imag / s; + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + + { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + for (k = 0; k < j; k++) { + const BASE Ajk_real = CONST_REAL(A, j * lda + k); + const BASE Ajk_imag = conj * CONST_IMAG(A, j * lda + k); + REAL(B, ldb * i + k) -= Ajk_real * Bij_real - Ajk_imag * Bij_imag; + IMAG(B, ldb * i + k) -= Ajk_real * Bij_imag + Ajk_imag * Bij_real; + } + } + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * B * inv(TriL(A))' */ + + + if (!(alpha_real == 1.0 && alpha_imag == 0.0)) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = alpha_real * Bij_real - alpha_imag * Bij_imag; + IMAG(B, ldb * i + j) = alpha_real * Bij_imag + alpha_imag * Bij_real; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + if (nonunit) { + const BASE Ajj_real = CONST_REAL(A, lda * j + j); + const BASE Ajj_imag = conj * CONST_IMAG(A, lda * j + j); + const BASE s = xhypot(Ajj_real, Ajj_imag); + const BASE a_real = Ajj_real / s; + const BASE a_imag = Ajj_imag / s; + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + REAL(B, ldb * i + j) = (Bij_real * a_real + Bij_imag * a_imag) / s; + IMAG(B, ldb * i + j) = (Bij_imag * a_real - Bij_real * a_imag) / s; + } + + { + const BASE Bij_real = REAL(B, ldb * i + j); + const BASE Bij_imag = IMAG(B, ldb * i + j); + + for (k = j + 1; k < n2; k++) { + const BASE Akj_real = CONST_REAL(A, k * lda + j); + const BASE Akj_imag = conj * CONST_IMAG(A, k * lda + j); + REAL(B, ldb * i + k) -= Akj_real * Bij_real - Akj_imag * Bij_imag; + IMAG(B, ldb * i + k) -= Akj_real * Bij_imag + Akj_imag * Bij_real; + } + } + } + } + + + } else { + BLAS_ERROR("unrecognized operation"); + } + } +} diff --git a/software/gsl-1.15/cblas/source_trsm_r.h b/software/gsl-1.15/cblas/source_trsm_r.h new file mode 100644 index 000000000..4c50af2bf --- /dev/null +++ b/software/gsl-1.15/cblas/source_trsm_r.h @@ -0,0 +1,278 @@ +/* blas/source_trsm_r.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + INDEX i, j, k; + INDEX n1, n2; + + const int nonunit = (Diag == CblasNonUnit); + int side, uplo, trans; + + CHECK_ARGS12(TRSM,Order,Side,Uplo,TransA,Diag,M,N,alpha,A,lda,B,ldb); + + if (Order == CblasRowMajor) { + n1 = M; + n2 = N; + side = Side; + uplo = Uplo; + trans = (TransA == CblasConjTrans) ? CblasTrans : TransA; + } else { + n1 = N; + n2 = M; + side = (Side == CblasLeft) ? CblasRight : CblasLeft; + uplo = (Uplo == CblasUpper) ? CblasLower : CblasUpper; + trans = (TransA == CblasConjTrans) ? CblasTrans : TransA; + } + + if (side == CblasLeft && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * inv(TriU(A)) *B */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = n1; i > 0 && i--;) { + if (nonunit) { + BASE Aii = A[lda * i + i]; + for (j = 0; j < n2; j++) { + B[ldb * i + j] /= Aii; + } + } + + for (k = 0; k < i; k++) { + const BASE Aki = A[k * lda + i]; + for (j = 0; j < n2; j++) { + B[ldb * k + j] -= Aki * B[ldb * i + j]; + } + } + } + + } else if (side == CblasLeft && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * inv(TriU(A))' *B */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + if (nonunit) { + BASE Aii = A[lda * i + i]; + for (j = 0; j < n2; j++) { + B[ldb * i + j] /= Aii; + } + } + + for (k = i + 1; k < n1; k++) { + const BASE Aik = A[i * lda + k]; + for (j = 0; j < n2; j++) { + B[ldb * k + j] -= Aik * B[ldb * i + j]; + } + } + } + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * inv(TriL(A))*B */ + + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + if (nonunit) { + BASE Aii = A[lda * i + i]; + for (j = 0; j < n2; j++) { + B[ldb * i + j] /= Aii; + } + } + + for (k = i + 1; k < n1; k++) { + const BASE Aki = A[k * lda + i]; + for (j = 0; j < n2; j++) { + B[ldb * k + j] -= Aki * B[ldb * i + j]; + } + } + } + + + } else if (side == CblasLeft && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * TriL(A)' *B */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = n1; i > 0 && i--;) { + if (nonunit) { + BASE Aii = A[lda * i + i]; + for (j = 0; j < n2; j++) { + B[ldb * i + j] /= Aii; + } + } + + for (k = 0; k < i; k++) { + const BASE Aik = A[i * lda + k]; + for (j = 0; j < n2; j++) { + B[ldb * k + j] -= Aik * B[ldb * i + j]; + } + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasNoTrans) { + + /* form B := alpha * B * inv(TriU(A)) */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + if (nonunit) { + BASE Ajj = A[lda * j + j]; + B[ldb * i + j] /= Ajj; + } + + { + BASE Bij = B[ldb * i + j]; + for (k = j + 1; k < n2; k++) { + B[ldb * i + k] -= A[j * lda + k] * Bij; + } + } + } + } + + } else if (side == CblasRight && uplo == CblasUpper && trans == CblasTrans) { + + /* form B := alpha * B * inv(TriU(A))' */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + + if (nonunit) { + BASE Ajj = A[lda * j + j]; + B[ldb * i + j] /= Ajj; + } + + { + BASE Bij = B[ldb * i + j]; + for (k = 0; k < j; k++) { + B[ldb * i + k] -= A[k * lda + j] * Bij; + } + } + } + } + + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasNoTrans) { + + /* form B := alpha * B * inv(TriL(A)) */ + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = n2; j > 0 && j--;) { + + if (nonunit) { + BASE Ajj = A[lda * j + j]; + B[ldb * i + j] /= Ajj; + } + + { + BASE Bij = B[ldb * i + j]; + for (k = 0; k < j; k++) { + B[ldb * i + k] -= A[j * lda + k] * Bij; + } + } + } + } + + } else if (side == CblasRight && uplo == CblasLower && trans == CblasTrans) { + + /* form B := alpha * B * inv(TriL(A))' */ + + + if (alpha != 1.0) { + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + B[ldb * i + j] *= alpha; + } + } + } + + for (i = 0; i < n1; i++) { + for (j = 0; j < n2; j++) { + if (nonunit) { + BASE Ajj = A[lda * j + j]; + B[ldb * i + j] /= Ajj; + } + + { + BASE Bij = B[ldb * i + j]; + for (k = j + 1; k < n2; k++) { + B[ldb * i + k] -= A[k * lda + j] * Bij; + } + } + } + } + + + + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_trsv_c.h b/software/gsl-1.15/cblas/source_trsv_c.h new file mode 100644 index 000000000..982e4a136 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trsv_c.h @@ -0,0 +1,230 @@ +/* blas/source_trsv_c.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int conj = (TransA == CblasConjTrans) ? -1 : 1; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + const int nonunit = (Diag == CblasNonUnit); + INDEX i, j; + INDEX ix, jx; + + CHECK_ARGS9(TRSV,order,Uplo,TransA,Diag,N,A,lda,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + + ix = OFFSET(N, incX) + incX * (N - 1); + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * (N - 1) + (N - 1)); + const BASE a_imag = conj * CONST_IMAG(A, lda * (N - 1) + (N - 1)); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix -= incX; + + for (i = N - 1; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij_real = CONST_REAL(A, lda * i + j); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * i + j); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + i); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + /* forward substitution */ + + ix = OFFSET(N, incX); + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * 0 + 0); + const BASE a_imag = conj * CONST_IMAG(A, lda * 0 + 0); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix += incX; + + for (i = 1; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij_real = CONST_REAL(A, lda * i + j); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * i + j); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + i); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + /* form x := inv( A' )*x */ + + /* forward substitution */ + + ix = OFFSET(N, incX); + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * 0 + 0); + const BASE a_imag = conj * CONST_IMAG(A, lda * 0 + 0); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix += incX; + + for (i = 1; i < N; i++) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij_real = CONST_REAL(A, lda * j + i); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * j + i); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + i); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + + ix = OFFSET(N, incX) + incX * (N - 1); + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * (N - 1) + (N - 1)); + const BASE a_imag = conj * CONST_IMAG(A, lda * (N - 1) + (N - 1)); + const BASE x_real = REAL(X, ix); + const BASE x_imag = IMAG(X, ix); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (x_real * b_real + x_imag * b_imag) / s; + IMAG(X, ix) = (x_imag * b_real - b_imag * x_real) / s; + } + + ix -= incX; + + for (i = N - 1; i > 0 && i--;) { + BASE tmp_real = REAL(X, ix); + BASE tmp_imag = IMAG(X, ix); + jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij_real = CONST_REAL(A, lda * j + i); + const BASE Aij_imag = conj * CONST_IMAG(A, lda * j + i); + const BASE x_real = REAL(X, jx); + const BASE x_imag = IMAG(X, jx); + tmp_real -= Aij_real * x_real - Aij_imag * x_imag; + tmp_imag -= Aij_real * x_imag + Aij_imag * x_real; + jx += incX; + } + + if (nonunit) { + const BASE a_real = CONST_REAL(A, lda * i + i); + const BASE a_imag = conj * CONST_IMAG(A, lda * i + i); + const BASE s = xhypot(a_real, a_imag); + const BASE b_real = a_real / s; + const BASE b_imag = a_imag / s; + REAL(X, ix) = (tmp_real * b_real + tmp_imag * b_imag) / s; + IMAG(X, ix) = (tmp_imag * b_real - tmp_real * b_imag) / s; + } else { + REAL(X, ix) = tmp_real; + IMAG(X, ix) = tmp_imag; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } +} diff --git a/software/gsl-1.15/cblas/source_trsv_r.h b/software/gsl-1.15/cblas/source_trsv_r.h new file mode 100644 index 000000000..c351ade28 --- /dev/null +++ b/software/gsl-1.15/cblas/source_trsv_r.h @@ -0,0 +1,134 @@ +/* blas/source_trsv_r.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +{ + const int nonunit = (Diag == CblasNonUnit); + INDEX ix, jx; + INDEX i, j; + const int Trans = (TransA != CblasConjTrans) ? TransA : CblasTrans; + + CHECK_ARGS9(TRSV,order,Uplo,TransA,Diag,N,A,lda,X,incX); + + if (N == 0) + return; + + /* form x := inv( A )*x */ + + if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasLower)) { + /* backsubstitution */ + ix = OFFSET(N, incX) + incX * (N - 1); + if (nonunit) { + X[ix] = X[ix] / A[lda * (N - 1) + (N - 1)]; + } + ix -= incX; + for (i = N - 1; i > 0 && i--;) { + BASE tmp = X[ix]; + jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aij = A[lda * i + j]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + i]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else if ((order == CblasRowMajor && Trans == CblasNoTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasTrans && Uplo == CblasUpper)) { + + /* forward substitution */ + ix = OFFSET(N, incX); + if (nonunit) { + X[ix] = X[ix] / A[lda * 0 + 0]; + } + ix += incX; + for (i = 1; i < N; i++) { + BASE tmp = X[ix]; + jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aij = A[lda * i + j]; + tmp -= Aij * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + i]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasUpper) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasLower)) { + + /* form x := inv( A' )*x */ + + /* forward substitution */ + ix = OFFSET(N, incX); + if (nonunit) { + X[ix] = X[ix] / A[lda * 0 + 0]; + } + ix += incX; + for (i = 1; i < N; i++) { + BASE tmp = X[ix]; + jx = OFFSET(N, incX); + for (j = 0; j < i; j++) { + const BASE Aji = A[lda * j + i]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + i]; + } else { + X[ix] = tmp; + } + ix += incX; + } + } else if ((order == CblasRowMajor && Trans == CblasTrans && Uplo == CblasLower) + || (order == CblasColMajor && Trans == CblasNoTrans && Uplo == CblasUpper)) { + + /* backsubstitution */ + ix = OFFSET(N, incX) + (N - 1) * incX; + if (nonunit) { + X[ix] = X[ix] / A[lda * (N - 1) + (N - 1)]; + } + ix -= incX; + for (i = N - 1; i > 0 && i--;) { + BASE tmp = X[ix]; + jx = ix + incX; + for (j = i + 1; j < N; j++) { + const BASE Aji = A[lda * j + i]; + tmp -= Aji * X[jx]; + jx += incX; + } + if (nonunit) { + X[ix] = tmp / A[lda * i + i]; + } else { + X[ix] = tmp; + } + ix -= incX; + } + } else { + BLAS_ERROR("unrecognized operation"); + } + +} diff --git a/software/gsl-1.15/cblas/srot.c b/software/gsl-1.15/cblas/srot.c new file mode 100644 index 000000000..ee602d0f6 --- /dev/null +++ b/software/gsl-1.15/cblas/srot.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_srot (const int N, float *X, const int incX, float *Y, const int incY, + const float c, const float s) +{ +#define BASE float +#include "source_rot.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/srotg.c b/software/gsl-1.15/cblas/srotg.c new file mode 100644 index 000000000..65b279641 --- /dev/null +++ b/software/gsl-1.15/cblas/srotg.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_srotg (float *a, float *b, float *c, float *s) +{ +#define BASE float +#include "source_rotg.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/srotm.c b/software/gsl-1.15/cblas/srotm.c new file mode 100644 index 000000000..b4707e608 --- /dev/null +++ b/software/gsl-1.15/cblas/srotm.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_srotm (const int N, float *X, const int incX, float *Y, const int incY, + const float *P) +{ +#define BASE float +#include "source_rotm.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/srotmg.c b/software/gsl-1.15/cblas/srotmg.c new file mode 100644 index 000000000..3366300f1 --- /dev/null +++ b/software/gsl-1.15/cblas/srotmg.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_srotmg (float *d1, float *d2, float *b1, const float b2, float *P) +{ +#define BASE float +#include "source_rotmg.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssbmv.c b/software/gsl-1.15/cblas/ssbmv.c new file mode 100644 index 000000000..6a9302b2a --- /dev/null +++ b/software/gsl-1.15/cblas/ssbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ssbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const float alpha, const float *A, + const int lda, const float *X, const int incX, const float beta, + float *Y, const int incY) +{ +#define BASE float +#include "source_sbmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sscal.c b/software/gsl-1.15/cblas/sscal.c new file mode 100644 index 000000000..e4a833485 --- /dev/null +++ b/software/gsl-1.15/cblas/sscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_sscal (const int N, const float alpha, float *X, const int incX) +{ +#define BASE float +#include "source_scal_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sspmv.c b/software/gsl-1.15/cblas/sspmv.c new file mode 100644 index 000000000..8aca4cc36 --- /dev/null +++ b/software/gsl-1.15/cblas/sspmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sspmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *Ap, const float *X, + const int incX, const float beta, float *Y, const int incY) +{ +#define BASE float +#include "source_spmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sspr.c b/software/gsl-1.15/cblas/sspr.c new file mode 100644 index 000000000..14171c67d --- /dev/null +++ b/software/gsl-1.15/cblas/sspr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sspr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, const int incX, + float *Ap) +{ +#define BASE float +#include "source_spr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sspr2.c b/software/gsl-1.15/cblas/sspr2.c new file mode 100644 index 000000000..d64ed10ce --- /dev/null +++ b/software/gsl-1.15/cblas/sspr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_sspr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, const int incX, + const float *Y, const int incY, float *Ap) +{ +#define BASE double +#include "source_spr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/sswap.c b/software/gsl-1.15/cblas/sswap.c new file mode 100644 index 000000000..f9ca15308 --- /dev/null +++ b/software/gsl-1.15/cblas/sswap.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_sswap (const int N, float *X, const int incX, float *Y, const int incY) +{ +#define BASE float +#include "source_swap_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssymm.c b/software/gsl-1.15/cblas/ssymm.c new file mode 100644 index 000000000..79e05e655 --- /dev/null +++ b/software/gsl-1.15/cblas/ssymm.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_ssymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const float alpha, const float *A, const int lda, const float *B, + const int ldb, const float beta, float *C, const int ldc) +{ +#define BASE float +#include "source_symm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssymv.c b/software/gsl-1.15/cblas/ssymv.c new file mode 100644 index 000000000..40d72a5e8 --- /dev/null +++ b/software/gsl-1.15/cblas/ssymv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ssymv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *A, const int lda, + const float *X, const int incX, const float beta, float *Y, + const int incY) +{ +#define BASE float +#include "source_symv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssyr.c b/software/gsl-1.15/cblas/ssyr.c new file mode 100644 index 000000000..435eccab7 --- /dev/null +++ b/software/gsl-1.15/cblas/ssyr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ssyr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, const int incX, + float *A, const int lda) +{ +#define BASE float +#include "source_syr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssyr2.c b/software/gsl-1.15/cblas/ssyr2.c new file mode 100644 index 000000000..50e2868fd --- /dev/null +++ b/software/gsl-1.15/cblas/ssyr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ssyr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const float alpha, const float *X, const int incX, + const float *Y, const int incY, float *A, const int lda) +{ +#define BASE float +#include "source_syr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssyr2k.c b/software/gsl-1.15/cblas/ssyr2k.c new file mode 100644 index 000000000..796d1592c --- /dev/null +++ b/software/gsl-1.15/cblas/ssyr2k.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_ssyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const float *A, const int lda, + const float *B, const int ldb, const float beta, float *C, + const int ldc) +{ +#define BASE float +#include "source_syr2k_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ssyrk.c b/software/gsl-1.15/cblas/ssyrk.c new file mode 100644 index 000000000..bb4da44a1 --- /dev/null +++ b/software/gsl-1.15/cblas/ssyrk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_ssyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const float alpha, const float *A, const int lda, + const float beta, float *C, const int ldc) +{ +#define BASE float +#include "source_syrk_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/stbmv.c b/software/gsl-1.15/cblas/stbmv.c new file mode 100644 index 000000000..94eab4104 --- /dev/null +++ b/software/gsl-1.15/cblas/stbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_stbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const float *A, const int lda, + float *X, const int incX) +{ +#define BASE float +#include "source_tbmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/stbsv.c b/software/gsl-1.15/cblas/stbsv.c new file mode 100644 index 000000000..4be9f8a3d --- /dev/null +++ b/software/gsl-1.15/cblas/stbsv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_stbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const float *A, const int lda, + float *X, const int incX) +{ +#define BASE float +#include "source_tbsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/stpmv.c b/software/gsl-1.15/cblas/stpmv.c new file mode 100644 index 000000000..e05744d25 --- /dev/null +++ b/software/gsl-1.15/cblas/stpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_stpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *Ap, float *X, const int incX) +{ +#define BASE float +#include "source_tpmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/stpsv.c b/software/gsl-1.15/cblas/stpsv.c new file mode 100644 index 000000000..deff58a0c --- /dev/null +++ b/software/gsl-1.15/cblas/stpsv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_stpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *Ap, float *X, const int incX) +{ +#define BASE float +#include "source_tpsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/strmm.c b/software/gsl-1.15/cblas/strmm.c new file mode 100644 index 000000000..e8a33ff5d --- /dev/null +++ b/software/gsl-1.15/cblas/strmm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_strmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const float alpha, const float *A, const int lda, float *B, + const int ldb) +{ +#define BASE float +#include "source_trmm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/strmv.c b/software/gsl-1.15/cblas/strmv.c new file mode 100644 index 000000000..b5a52bdb9 --- /dev/null +++ b/software/gsl-1.15/cblas/strmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_strmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *A, const int lda, float *X, + const int incX) +{ +#define BASE float +#include "source_trmv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/strsm.c b/software/gsl-1.15/cblas/strsm.c new file mode 100644 index 000000000..aa7f2a405 --- /dev/null +++ b/software/gsl-1.15/cblas/strsm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_strsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const float alpha, const float *A, const int lda, float *B, + const int ldb) +{ +#define BASE float +#include "source_trsm_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/strsv.c b/software/gsl-1.15/cblas/strsv.c new file mode 100644 index 000000000..f60fc6935 --- /dev/null +++ b/software/gsl-1.15/cblas/strsv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_strsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const float *A, const int lda, float *X, + const int incX) +{ +#define BASE float +#include "source_trsv_r.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/test.c b/software/gsl-1.15/cblas/test.c new file mode 100644 index 000000000..151d6bfa7 --- /dev/null +++ b/software/gsl-1.15/cblas/test.c @@ -0,0 +1,38 @@ +/* blas/test.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "tests.h" + +int +main (void) +{ + gsl_ieee_env_setup (); + +#include "tests.c" + + exit (gsl_test_summary()); +} + diff --git a/software/gsl-1.15/cblas/test_amax.c b/software/gsl-1.15/cblas/test_amax.c new file mode 100644 index 000000000..c37022416 --- /dev/null +++ b/software/gsl-1.15/cblas/test_amax.c @@ -0,0 +1,142 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_amax (void) { + { + int N = 1; + float X[] = { -0.388f }; + int incX = -1; + int expected = 0; + int k; + k = cblas_isamax(N, X, incX); + gsl_test_int(k, expected, "samax(case 52)"); + }; + + + { + int N = 1; + double X[] = { 0.247 }; + int incX = -1; + int expected = 0; + int k; + k = cblas_idamax(N, X, incX); + gsl_test_int(k, expected, "damax(case 53)"); + }; + + + { + int N = 1; + float X[] = { 0.704f, 0.665f }; + int incX = -1; + int expected = 0; + int k; + k = cblas_icamax(N, X, incX); + gsl_test_int(k, expected, "camax(case 54)"); + }; + + + { + int N = 1; + double X[] = { -0.599, -0.758 }; + int incX = -1; + int expected = 0; + int k; + k = cblas_izamax(N, X, incX); + gsl_test_int(k, expected, "zamax(case 55)"); + }; + + + { + int N = 2; + float X[] = { 0.909f, 0.037f }; + int incX = 1; + int expected = 0; + int k; + k = cblas_isamax(N, X, incX); + gsl_test_int(k, expected, "samax(case 56)"); + }; + + + { + int N = 2; + double X[] = { 0.271, -0.426 }; + int incX = 1; + int expected = 1; + int k; + k = cblas_idamax(N, X, incX); + gsl_test_int(k, expected, "damax(case 57)"); + }; + + + { + int N = 2; + float X[] = { -0.648f, 0.317f, 0.62f, 0.392f }; + int incX = 1; + int expected = 1; + int k; + k = cblas_icamax(N, X, incX); + gsl_test_int(k, expected, "camax(case 58)"); + }; + + + { + int N = 2; + double X[] = { -0.789, 0.352, 0.562, 0.697 }; + int incX = 1; + int expected = 1; + int k; + k = cblas_izamax(N, X, incX); + gsl_test_int(k, expected, "zamax(case 59)"); + }; + + + { + int N = 2; + float X[] = { 0.487f, 0.918f }; + int incX = -1; + int expected = 0; + int k; + k = cblas_isamax(N, X, incX); + gsl_test_int(k, expected, "samax(case 60)"); + }; + + + { + int N = 2; + double X[] = { 0.537, 0.826 }; + int incX = -1; + int expected = 0; + int k; + k = cblas_idamax(N, X, incX); + gsl_test_int(k, expected, "damax(case 61)"); + }; + + + { + int N = 2; + float X[] = { 0.993f, 0.172f, -0.825f, 0.873f }; + int incX = -1; + int expected = 0; + int k; + k = cblas_icamax(N, X, incX); + gsl_test_int(k, expected, "camax(case 62)"); + }; + + + { + int N = 2; + double X[] = { 0.913, -0.436, -0.134, 0.129 }; + int incX = -1; + int expected = 0; + int k; + k = cblas_izamax(N, X, incX); + gsl_test_int(k, expected, "zamax(case 63)"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_asum.c b/software/gsl-1.15/cblas/test_asum.c new file mode 100644 index 000000000..26353ded2 --- /dev/null +++ b/software/gsl-1.15/cblas/test_asum.c @@ -0,0 +1,143 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_asum (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float X[] = { 0.239f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_sasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "sasum(case 40)"); + }; + + + { + int N = 1; + double X[] = { -0.413 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dasum(case 41)"); + }; + + + { + int N = 1; + float X[] = { 0.1f, 0.017f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_scasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "scasum(case 42)"); + }; + + + { + int N = 1; + double X[] = { -0.651, 0.079 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dzasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dzasum(case 43)"); + }; + + + { + int N = 2; + float X[] = { 0.899f, -0.72f }; + int incX = 1; + float expected = 1.619f; + float f; + f = cblas_sasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "sasum(case 44)"); + }; + + + { + int N = 2; + double X[] = { 0.271, -0.012 }; + int incX = 1; + double expected = 0.283; + double f; + f = cblas_dasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dasum(case 45)"); + }; + + + { + int N = 2; + float X[] = { -0.567f, -0.645f, 0.098f, 0.256f }; + int incX = 1; + float expected = 1.566f; + float f; + f = cblas_scasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "scasum(case 46)"); + }; + + + { + int N = 2; + double X[] = { -0.046, -0.671, -0.323, 0.785 }; + int incX = 1; + double expected = 1.825; + double f; + f = cblas_dzasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dzasum(case 47)"); + }; + + + { + int N = 2; + float X[] = { 0.169f, 0.833f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_sasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "sasum(case 48)"); + }; + + + { + int N = 2; + double X[] = { -0.586, -0.486 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dasum(case 49)"); + }; + + + { + int N = 2; + float X[] = { -0.314f, -0.318f, -0.835f, -0.807f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_scasum(N, X, incX); + gsl_test_rel(f, expected, flteps, "scasum(case 50)"); + }; + + + { + int N = 2; + double X[] = { -0.927, 0.152, -0.554, -0.844 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dzasum(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dzasum(case 51)"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_axpy.c b/software/gsl-1.15/cblas/test_axpy.c new file mode 100644 index 000000000..9f30cd4c9 --- /dev/null +++ b/software/gsl-1.15/cblas/test_axpy.c @@ -0,0 +1,233 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_axpy (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float alpha = 0.0f; + float X[] = { 0.018f }; + int incX = 1; + float Y[] = { -0.417f }; + int incY = -1; + float expected[] = { -0.417f }; + cblas_saxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "saxpy(case 64)"); + } + }; + }; + + + { + int N = 1; + double alpha = 0; + double X[] = { 0.071 }; + int incX = 1; + double Y[] = { -0.888 }; + int incY = -1; + double expected[] = { -0.888 }; + cblas_daxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "daxpy(case 65)"); + } + }; + }; + + + { + int N = 1; + float alpha[2] = {1.0f, 0.0f}; + float X[] = { -0.542f, -0.362f }; + int incX = 1; + float Y[] = { -0.459f, -0.433f }; + int incY = -1; + float expected[] = { -1.001f, -0.795f }; + cblas_caxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "caxpy(case 66) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "caxpy(case 66) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {-1, 0}; + double X[] = { 0.003, -0.514 }; + int incX = 1; + double Y[] = { -0.529, 0.743 }; + int incY = -1; + double expected[] = { -0.532, 1.257 }; + cblas_zaxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zaxpy(case 67) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zaxpy(case 67) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha = 0.1f; + float X[] = { 0.771f }; + int incX = -1; + float Y[] = { 0.507f }; + int incY = 1; + float expected[] = { 0.5841f }; + cblas_saxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "saxpy(case 68)"); + } + }; + }; + + + { + int N = 1; + double alpha = -0.3; + double X[] = { 0.029 }; + int incX = -1; + double Y[] = { -0.992 }; + int incY = 1; + double expected[] = { -1.0007 }; + cblas_daxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "daxpy(case 69)"); + } + }; + }; + + + { + int N = 1; + float alpha[2] = {-0.3f, 0.1f}; + float X[] = { 0.194f, -0.959f }; + int incX = -1; + float Y[] = { 0.096f, 0.032f }; + int incY = 1; + float expected[] = { 0.1337f, 0.3391f }; + cblas_caxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "caxpy(case 70) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "caxpy(case 70) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0, 1}; + double X[] = { 0.776, -0.671 }; + int incX = -1; + double Y[] = { 0.39, 0.404 }; + int incY = 1; + double expected[] = { 1.061, 1.18 }; + cblas_zaxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zaxpy(case 71) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zaxpy(case 71) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha = 1.0f; + float X[] = { 0.647f }; + int incX = -1; + float Y[] = { 0.016f }; + int incY = -1; + float expected[] = { 0.663f }; + cblas_saxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "saxpy(case 72)"); + } + }; + }; + + + { + int N = 1; + double alpha = -1; + double X[] = { -0.558 }; + int incX = -1; + double Y[] = { 0.308 }; + int incY = -1; + double expected[] = { 0.866 }; + cblas_daxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "daxpy(case 73)"); + } + }; + }; + + + { + int N = 1; + float alpha[2] = {-0.3f, 0.1f}; + float X[] = { 0.899f, -0.624f }; + int incX = -1; + float Y[] = { 0.155f, -0.33f }; + int incY = -1; + float expected[] = { -0.0523f, -0.0529f }; + cblas_caxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "caxpy(case 74) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "caxpy(case 74) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0, 1}; + double X[] = { -0.451, 0.768 }; + int incX = -1; + double Y[] = { 0.007, 0.732 }; + int incY = -1; + double expected[] = { -0.761, 0.281 }; + cblas_zaxpy(N, alpha, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zaxpy(case 75) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zaxpy(case 75) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_copy.c b/software/gsl-1.15/cblas/test_copy.c new file mode 100644 index 000000000..2a6566323 --- /dev/null +++ b/software/gsl-1.15/cblas/test_copy.c @@ -0,0 +1,221 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_copy (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float X[] = { 0.898f }; + int incX = 1; + float Y[] = { 0.699f }; + int incY = -1; + float expected[] = { 0.898f }; + cblas_scopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "scopy(case 76)"); + } + }; + }; + + + { + int N = 1; + double X[] = { 0.002 }; + int incX = 1; + double Y[] = { -0.921 }; + int incY = -1; + double expected[] = { 0.002 }; + cblas_dcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "dcopy(case 77)"); + } + }; + }; + + + { + int N = 1; + float X[] = { -0.166f, 0.639f }; + int incX = 1; + float Y[] = { 0.863f, 0.613f }; + int incY = -1; + float expected[] = { -0.166f, 0.639f }; + cblas_ccopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "ccopy(case 78) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "ccopy(case 78) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { 0.315, -0.324 }; + int incX = 1; + double Y[] = { -0.312, -0.748 }; + int incY = -1; + double expected[] = { 0.315, -0.324 }; + cblas_zcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zcopy(case 79) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zcopy(case 79) imag"); + }; + }; + }; + + + { + int N = 1; + float X[] = { 0.222f }; + int incX = -1; + float Y[] = { 0.522f }; + int incY = 1; + float expected[] = { 0.222f }; + cblas_scopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "scopy(case 80)"); + } + }; + }; + + + { + int N = 1; + double X[] = { 0.021 }; + int incX = -1; + double Y[] = { 0.898 }; + int incY = 1; + double expected[] = { 0.021 }; + cblas_dcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "dcopy(case 81)"); + } + }; + }; + + + { + int N = 1; + float X[] = { 0.376f, 0.229f }; + int incX = -1; + float Y[] = { 0.143f, -0.955f }; + int incY = 1; + float expected[] = { 0.376f, 0.229f }; + cblas_ccopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "ccopy(case 82) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "ccopy(case 82) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { -0.265, -0.84 }; + int incX = -1; + double Y[] = { -0.156, 0.939 }; + int incY = 1; + double expected[] = { -0.265, -0.84 }; + cblas_zcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zcopy(case 83) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zcopy(case 83) imag"); + }; + }; + }; + + + { + int N = 1; + float X[] = { 0.074f }; + int incX = -1; + float Y[] = { -0.802f }; + int incY = -1; + float expected[] = { 0.074f }; + cblas_scopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], flteps, "scopy(case 84)"); + } + }; + }; + + + { + int N = 1; + double X[] = { -0.374 }; + int incX = -1; + double Y[] = { -0.161 }; + int incY = -1; + double expected[] = { -0.374 }; + cblas_dcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected[i], dbleps, "dcopy(case 85)"); + } + }; + }; + + + { + int N = 1; + float X[] = { 0.084f, 0.778f }; + int incX = -1; + float Y[] = { 0.31f, -0.797f }; + int incY = -1; + float expected[] = { 0.084f, 0.778f }; + cblas_ccopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], flteps, "ccopy(case 86) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], flteps, "ccopy(case 86) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { 0.831, -0.282 }; + int incX = -1; + double Y[] = { -0.62, 0.32 }; + int incY = -1; + double expected[] = { 0.831, -0.282 }; + cblas_zcopy(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected[2*i], dbleps, "zcopy(case 87) real"); + gsl_test_rel(Y[2*i+1], expected[2*i+1], dbleps, "zcopy(case 87) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_dot.c b/software/gsl-1.15/cblas/test_dot.c new file mode 100644 index 000000000..8000fe723 --- /dev/null +++ b/software/gsl-1.15/cblas/test_dot.c @@ -0,0 +1,383 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_dot (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float alpha = 0.0f; + float X[] = { 0.733f }; + float Y[] = { 0.825f }; + int incX = 1; + int incY = -1; + float expected = 0.604725f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 1)"); + }; + + + { + int N = 1; + float alpha = 0.1f; + float X[] = { 0.733f }; + float Y[] = { 0.825f }; + int incX = 1; + int incY = -1; + float expected = 0.704725f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 2)"); + }; + + + { + int N = 1; + float alpha = 1.0f; + float X[] = { 0.733f }; + float Y[] = { 0.825f }; + int incX = 1; + int incY = -1; + float expected = 1.604725f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 3)"); + }; + + + { + int N = 1; + float alpha = 0.0f; + float X[] = { -0.812f }; + float Y[] = { -0.667f }; + int incX = -1; + int incY = 1; + float expected = 0.541604f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 4)"); + }; + + + { + int N = 1; + float alpha = 0.1f; + float X[] = { -0.812f }; + float Y[] = { -0.667f }; + int incX = -1; + int incY = 1; + float expected = 0.641604f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 5)"); + }; + + + { + int N = 1; + float alpha = 1.0f; + float X[] = { -0.812f }; + float Y[] = { -0.667f }; + int incX = -1; + int incY = 1; + float expected = 1.541604f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 6)"); + }; + + + { + int N = 1; + float alpha = 0.0f; + float X[] = { 0.481f }; + float Y[] = { 0.523f }; + int incX = -1; + int incY = -1; + float expected = 0.251563f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 7)"); + }; + + + { + int N = 1; + float alpha = 0.1f; + float X[] = { 0.481f }; + float Y[] = { 0.523f }; + int incX = -1; + int incY = -1; + float expected = 0.351563f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 8)"); + }; + + + { + int N = 1; + float alpha = 1.0f; + float X[] = { 0.481f }; + float Y[] = { 0.523f }; + int incX = -1; + int incY = -1; + float expected = 1.251563f; + float f; + f = cblas_sdsdot (N, alpha, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdsdot(case 9)"); + }; + + + { + int N = 1; + float X[] = { 0.785f }; + float Y[] = { -0.7f }; + int incX = 1; + int incY = -1; + float expected = -0.5495f; + float f; + f = cblas_sdot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdot(case 10)"); + }; + + + { + int N = 1; + double X[] = { 0.79 }; + double Y[] = { -0.679 }; + int incX = 1; + int incY = -1; + double expected = -0.53641; + double f; + f = cblas_ddot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, dbleps, "ddot(case 11)"); + }; + + + { + int N = 1; + float X[] = { 0.474f, -0.27f }; + float Y[] = { -0.144f, -0.392f }; + int incX = 1; + int incY = -1; + float expected[2] = {-0.174096f, -0.146928f}; + float f[2]; + cblas_cdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotu(case 12) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotu(case 12) imag"); + }; + + + { + int N = 1; + float X[] = { 0.474f, -0.27f }; + float Y[] = { -0.144f, -0.392f }; + int incX = 1; + int incY = -1; + float expected[2] = {0.037584f, -0.224688f}; + float f[2]; + cblas_cdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotc(case 13) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotc(case 13) imag"); + }; + + + { + int N = 1; + double X[] = { -0.87, -0.631 }; + double Y[] = { -0.7, -0.224 }; + int incX = 1; + int incY = -1; + double expected[2] = {0.467656, 0.63658}; + double f[2]; + cblas_zdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotu(case 14) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotu(case 14) imag"); + }; + + + { + int N = 1; + double X[] = { -0.87, -0.631 }; + double Y[] = { -0.7, -0.224 }; + int incX = 1; + int incY = -1; + double expected[2] = {0.750344, -0.24682}; + double f[2]; + cblas_zdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotc(case 15) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotc(case 15) imag"); + }; + + + { + int N = 1; + float X[] = { -0.457f }; + float Y[] = { 0.839f }; + int incX = -1; + int incY = 1; + float expected = -0.383423f; + float f; + f = cblas_sdot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdot(case 16)"); + }; + + + { + int N = 1; + double X[] = { 0.949 }; + double Y[] = { -0.873 }; + int incX = -1; + int incY = 1; + double expected = -0.828477; + double f; + f = cblas_ddot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, dbleps, "ddot(case 17)"); + }; + + + { + int N = 1; + float X[] = { 0.852f, -0.045f }; + float Y[] = { 0.626f, -0.164f }; + int incX = -1; + int incY = 1; + float expected[2] = {0.525972f, -0.167898f}; + float f[2]; + cblas_cdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotu(case 18) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotu(case 18) imag"); + }; + + + { + int N = 1; + float X[] = { 0.852f, -0.045f }; + float Y[] = { 0.626f, -0.164f }; + int incX = -1; + int incY = 1; + float expected[2] = {0.540732f, -0.111558f}; + float f[2]; + cblas_cdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotc(case 19) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotc(case 19) imag"); + }; + + + { + int N = 1; + double X[] = { -0.786, -0.341 }; + double Y[] = { -0.271, -0.896 }; + int incX = -1; + int incY = 1; + double expected[2] = {-0.09253, 0.796667}; + double f[2]; + cblas_zdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotu(case 20) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotu(case 20) imag"); + }; + + + { + int N = 1; + double X[] = { -0.786, -0.341 }; + double Y[] = { -0.271, -0.896 }; + int incX = -1; + int incY = 1; + double expected[2] = {0.518542, 0.611845}; + double f[2]; + cblas_zdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotc(case 21) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotc(case 21) imag"); + }; + + + { + int N = 1; + float X[] = { -0.088f }; + float Y[] = { -0.165f }; + int incX = -1; + int incY = -1; + float expected = 0.01452f; + float f; + f = cblas_sdot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, flteps, "sdot(case 22)"); + }; + + + { + int N = 1; + double X[] = { -0.434 }; + double Y[] = { -0.402 }; + int incX = -1; + int incY = -1; + double expected = 0.174468; + double f; + f = cblas_ddot(N, X, incX, Y, incY); + gsl_test_rel(f, expected, dbleps, "ddot(case 23)"); + }; + + + { + int N = 1; + float X[] = { -0.347f, 0.899f }; + float Y[] = { -0.113f, -0.858f }; + int incX = -1; + int incY = -1; + float expected[2] = {0.810553f, 0.196139f}; + float f[2]; + cblas_cdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotu(case 24) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotu(case 24) imag"); + }; + + + { + int N = 1; + float X[] = { -0.347f, 0.899f }; + float Y[] = { -0.113f, -0.858f }; + int incX = -1; + int incY = -1; + float expected[2] = {-0.732131f, 0.399313f}; + float f[2]; + cblas_cdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], flteps, "cdotc(case 25) real"); + gsl_test_rel(f[1], expected[1], flteps, "cdotc(case 25) imag"); + }; + + + { + int N = 1; + double X[] = { -0.897, -0.204 }; + double Y[] = { -0.759, 0.557 }; + int incX = -1; + int incY = -1; + double expected[2] = {0.794451, -0.344793}; + double f[2]; + cblas_zdotu_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotu(case 26) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotu(case 26) imag"); + }; + + + { + int N = 1; + double X[] = { -0.897, -0.204 }; + double Y[] = { -0.759, 0.557 }; + int incX = -1; + int incY = -1; + double expected[2] = {0.567195, -0.654465}; + double f[2]; + cblas_zdotc_sub(N, X, incX, Y, incY, &f); + gsl_test_rel(f[0], expected[0], dbleps, "zdotc(case 27) real"); + gsl_test_rel(f[1], expected[1], dbleps, "zdotc(case 27) imag"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_gbmv.c b/software/gsl-1.15/cblas/test_gbmv.c new file mode 100644 index 000000000..34eff2655 --- /dev/null +++ b/software/gsl-1.15/cblas/test_gbmv.c @@ -0,0 +1,543 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_gbmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha = -1.0f; + float beta = -1.0f; + float A[] = { 0.423f, -0.143f, -0.182f, -0.076f, -0.855f, 0.599f, 0.389f, -0.473f, 0.493f, -0.902f, -0.889f, -0.256f, 0.112f, 0.128f, -0.277f, -0.777f }; + float X[] = { 0.488f, 0.029f, -0.633f, 0.84f }; + int incX = -1; + float Y[] = { 0.874f, 0.322f, -0.477f }; + int incY = -1; + float y_expected[] = { -0.101941f, 0.764086f, 0.481914f }; + cblas_sgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgbmv(case 794)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha = -1.0f; + float beta = -1.0f; + float A[] = { 0.423f, -0.143f, -0.182f, -0.076f, -0.855f, 0.599f, 0.389f, -0.473f, 0.493f, -0.902f, -0.889f, -0.256f, 0.112f, 0.128f, -0.277f, -0.777f }; + float X[] = { 0.488f, 0.029f, -0.633f, 0.84f }; + int incX = -1; + float Y[] = { 0.874f, 0.322f, -0.477f }; + int incY = -1; + float y_expected[] = { -0.656261f, 0.19575f, 0.055905f }; + cblas_sgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgbmv(case 795)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha = 0.0f; + float beta = 0.1f; + float A[] = { -0.066f, -0.153f, -0.619f, 0.174f, 0.777f, 0.543f, 0.614f, -0.446f, -0.138f, -0.767f, 0.725f, 0.222f, 0.165f, -0.063f, -0.047f, 0.267f }; + float X[] = { -0.096f, -0.007f, -0.657f }; + int incX = -1; + float Y[] = { -0.88f, 0.102f, -0.278f, 0.403f }; + int incY = -1; + float y_expected[] = { -0.088f, 0.0102f, -0.0278f, 0.0403f }; + cblas_sgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgbmv(case 796)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha = 0.0f; + float beta = 0.1f; + float A[] = { -0.066f, -0.153f, -0.619f, 0.174f, 0.777f, 0.543f, 0.614f, -0.446f, -0.138f, -0.767f, 0.725f, 0.222f, 0.165f, -0.063f, -0.047f, 0.267f }; + float X[] = { -0.096f, -0.007f, -0.657f }; + int incX = -1; + float Y[] = { -0.88f, 0.102f, -0.278f, 0.403f }; + int incY = -1; + float y_expected[] = { -0.088f, 0.0102f, -0.0278f, 0.0403f }; + cblas_sgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgbmv(case 797)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha = 0.1; + double beta = 0; + double A[] = { -0.688, 0.29, 0.442, -0.001, 0.313, -0.073, 0.991, -0.654, -0.12, 0.416, 0.571, 0.932, -0.179, -0.724, 0.492, -0.965 }; + double X[] = { 0.187, -0.338, -0.976, -0.052 }; + int incX = -1; + double Y[] = { -0.101, 0.8, 0.026 }; + int incY = -1; + double y_expected[] = { 0.0083289, -0.0279986, -0.0446472 }; + cblas_dgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgbmv(case 798)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha = 0.1; + double beta = 0; + double A[] = { -0.688, 0.29, 0.442, -0.001, 0.313, -0.073, 0.991, -0.654, -0.12, 0.416, 0.571, 0.932, -0.179, -0.724, 0.492, -0.965 }; + double X[] = { 0.187, -0.338, -0.976, -0.052 }; + int incX = -1; + double Y[] = { -0.101, 0.8, 0.026 }; + int incY = -1; + double y_expected[] = { -0.1141297, 0.0088824, -0.0320568 }; + cblas_dgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgbmv(case 799)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha = -0.3; + double beta = -0.3; + double A[] = { 0.746, 0.262, -0.449, -0.954, -0.093, 0.108, -0.496, 0.927, 0.177, 0.729, -0.92, -0.469, 0.87, -0.877, -0.308, -0.806 }; + double X[] = { 0.662, -0.887, 0.261 }; + int incX = -1; + double Y[] = { 0.771, 0.637, -0.177, -0.018 }; + int incY = -1; + double y_expected[] = { -0.048588, -0.467865, 0.0818433, -0.0398619 }; + cblas_dgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgbmv(case 800)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha = -0.3; + double beta = -0.3; + double A[] = { 0.746, 0.262, -0.449, -0.954, -0.093, 0.108, -0.496, 0.927, 0.177, 0.729, -0.92, -0.469, 0.87, -0.877, -0.308, -0.806 }; + double X[] = { 0.662, -0.887, 0.261 }; + int incX = -1; + double Y[] = { 0.771, 0.637, -0.177, -0.018 }; + int incY = -1; + double y_expected[] = { -0.404082, -0.2887797, 0.1876263, -0.1345935 }; + cblas_dgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgbmv(case 801)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.107f, 0.926f, -0.246f, -0.555f, -0.301f, 0.276f, 0.471f, -0.084f, -0.754f, 0.082f, -0.952f, -0.394f, 0.659f, 0.054f, 0.795f, 0.923f, 0.232f, -0.788f, 0.478f, 0.775f, -0.118f, 0.691f, -0.933f, 0.809f, 0.164f, -0.263f, -0.923f, -0.88f, 0.819f, -0.521f, -0.045f, 0.034f }; + float X[] = { 0.407f, 0.895f, 0.301f, 0.769f, -0.269f, -0.465f, 0.455f, -0.628f }; + int incX = -1; + float Y[] = { -0.116f, -0.744f, -0.936f, -0.064f, -0.232f, -0.665f }; + int incY = -1; + float y_expected[] = { -0.806176f, -1.559f, -1.57611f, -0.155463f, 0.098816f, -0.274361f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 802) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 802) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.107f, 0.926f, -0.246f, -0.555f, -0.301f, 0.276f, 0.471f, -0.084f, -0.754f, 0.082f, -0.952f, -0.394f, 0.659f, 0.054f, 0.795f, 0.923f, 0.232f, -0.788f, 0.478f, 0.775f, -0.118f, 0.691f, -0.933f, 0.809f, 0.164f, -0.263f, -0.923f, -0.88f, 0.819f, -0.521f, -0.045f, 0.034f }; + float X[] = { 0.407f, 0.895f, 0.301f, 0.769f, -0.269f, -0.465f, 0.455f, -0.628f }; + int incX = -1; + float Y[] = { -0.116f, -0.744f, -0.936f, -0.064f, -0.232f, -0.665f }; + int incY = -1; + float y_expected[] = { -0.245235f, -0.313725f, -0.798094f, 0.691455f, -0.164015f, -0.242714f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 803) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 803) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.258f, 0.838f, -0.106f, -0.066f, 0.395f, 0.982f, -0.546f, 0.565f, 0.14f, -0.18f, 0.165f, -0.186f, 0.499f, -0.038f, -0.305f, -0.653f, -0.811f, -0.466f, -0.674f, -0.013f, -0.552f, -0.807f, -0.536f, 0.864f, -0.027f, -0.606f, 0.459f, 0.564f, -0.968f, 0.717f, -0.312f, -0.485f }; + float X[] = { -0.399f, 0.459f, 0.398f, 0.358f, -0.161f, -0.359f }; + int incX = -1; + float Y[] = { 0.572f, 0.293f, -0.813f, -0.096f, -0.611f, -0.717f, 0.736f, 0.259f }; + int incY = -1; + float y_expected[] = { -0.619961f, -0.011425f, -0.477499f, 0.059361f, -0.886984f, 0.44008f, -0.139432f, 0.04644f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 804) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 804) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.258f, 0.838f, -0.106f, -0.066f, 0.395f, 0.982f, -0.546f, 0.565f, 0.14f, -0.18f, 0.165f, -0.186f, 0.499f, -0.038f, -0.305f, -0.653f, -0.811f, -0.466f, -0.674f, -0.013f, -0.552f, -0.807f, -0.536f, 0.864f, -0.027f, -0.606f, 0.459f, 0.564f, -0.968f, 0.717f, -0.312f, -0.485f }; + float X[] = { -0.399f, 0.459f, 0.398f, 0.358f, -0.161f, -0.359f }; + int incX = -1; + float Y[] = { 0.572f, 0.293f, -0.813f, -0.096f, -0.611f, -0.717f, 0.736f, 0.259f }; + int incY = -1; + float y_expected[] = { -0.318227f, -0.172201f, -0.109343f, 0.698685f, 0.208261f, -0.269065f, 0.175074f, -0.507326f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 805) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 805) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.804f, 0.232f, -0.448f, -0.558f, -0.078f, -0.056f, -0.345f, -0.379f, 0.369f, -0.662f, -0.169f, -0.391f, -0.215f, 0.467f, 0.374f, 0.889f, -0.698f, 0.734f, 0.377f, -0.955f, 0.498f, 0.151f, -0.725f, -0.728f, -0.655f, -0.581f, 0.389f, 0.949f, -0.553f, -0.434f, 0.237f, 0.641f }; + float X[] = { -0.262f, -0.823f, -0.357f, -0.994f, -0.347f, -0.375f }; + int incX = -1; + float Y[] = { -0.683f, -0.87f, -0.708f, 0.071f, 0.575f, -0.575f, 0.845f, 0.032f }; + int incY = -1; + float y_expected[] = { 0.341749f, 0.301992f, -0.306848f, 0.109252f, -0.018347f, -0.747479f, -0.894201f, 0.713246f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 806) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 806) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.804f, 0.232f, -0.448f, -0.558f, -0.078f, -0.056f, -0.345f, -0.379f, 0.369f, -0.662f, -0.169f, -0.391f, -0.215f, 0.467f, 0.374f, 0.889f, -0.698f, 0.734f, 0.377f, -0.955f, 0.498f, 0.151f, -0.725f, -0.728f, -0.655f, -0.581f, 0.389f, 0.949f, -0.553f, -0.434f, 0.237f, 0.641f }; + float X[] = { -0.262f, -0.823f, -0.357f, -0.994f, -0.347f, -0.375f }; + int incX = -1; + float Y[] = { -0.683f, -0.87f, -0.708f, 0.071f, 0.575f, -0.575f, 0.845f, 0.032f }; + int incY = -1; + float y_expected[] = { -0.562773f, -0.455143f, -0.213881f, -0.466169f, -0.183683f, 0.097891f, -0.451416f, 0.052586f }; + cblas_cgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgbmv(case 807) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgbmv(case 807) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { -0.919, -0.002, 0.105, -0.338, -0.358, -0.715, -0.157, 0.307, 0.334, 0.121, 0.366, 0.029, -0.006, -0.662, -0.314, 0.061, -0.322, -0.865, -0.586, 0.556, 0.507, 0.581, 0.855, -0.09, 0.836, -0.788, -0.209, -0.694, -0.695, 0.11, -0.234, 0.17 }; + double X[] = { 0.356, -0.76, -0.96, 0.437, -0.849, 0.397, -0.382, -0.826 }; + int incX = -1; + double Y[] = { 0.288, -0.832, 0.889, 0.576, -0.809, 0.4 }; + int incY = -1; + double y_expected[] = { 0.3241775, -0.6761577, 0.8458527, 0.5705165, -0.8597295, 0.4268499 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 808) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 808) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { -0.919, -0.002, 0.105, -0.338, -0.358, -0.715, -0.157, 0.307, 0.334, 0.121, 0.366, 0.029, -0.006, -0.662, -0.314, 0.061, -0.322, -0.865, -0.586, 0.556, 0.507, 0.581, 0.855, -0.09, 0.836, -0.788, -0.209, -0.694, -0.695, 0.11, -0.234, 0.17 }; + double X[] = { 0.356, -0.76, -0.96, 0.437, -0.849, 0.397, -0.382, -0.826 }; + int incX = -1; + double Y[] = { 0.288, -0.832, 0.889, 0.576, -0.809, 0.4 }; + int incY = -1; + double y_expected[] = { 0.4026074, -0.8033768, 0.7510795, 0.5671044, -0.8162255, 0.3349099 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 809) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 809) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.511, -0.707, -0.906, 0.345, -0.524, -0.933, 0.154, -0.529, -0.651, -0.851, 0.104, 0.532, -0.297, 0.477, 0.511, 0.469, -0.888, -0.789, 0.656, 0.288, -0.749, 0.961, 0.571, 0.539, 0.465, 0.647, 0.653, -0.994, -0.515, 0.297, 0.35, -0.707 }; + double X[] = { -0.991, 0.658, -0.909, -0.99, -0.517, -0.071 }; + int incX = -1; + double Y[] = { 0.451, 0.351, -0.113, -0.62, 0.983, 0.511, 0.142, -0.186 }; + int incY = -1; + double y_expected[] = { 0.560921, -1.094193, -0.210397, -0.613323, 3.018979, 0.641612, 0.384166, 1.11801 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 810) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 810) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.511, -0.707, -0.906, 0.345, -0.524, -0.933, 0.154, -0.529, -0.651, -0.851, 0.104, 0.532, -0.297, 0.477, 0.511, 0.469, -0.888, -0.789, 0.656, 0.288, -0.749, 0.961, 0.571, 0.539, 0.465, 0.647, 0.653, -0.994, -0.515, 0.297, 0.35, -0.707 }; + double X[] = { -0.991, 0.658, -0.909, -0.99, -0.517, -0.071 }; + int incX = -1; + double Y[] = { 0.451, 0.351, -0.113, -0.62, 0.983, 0.511, 0.142, -0.186 }; + int incY = -1; + double y_expected[] = { -0.435541, 0.015793, -0.926518, 1.122561, 1.671751, -0.257493, 0.187543, 1.066818 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 811) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 811) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.534, 0.67, -0.621, 0.143, -0.794, 0.073, 0.414, -0.9, 0.155, -0.368, 0.122, -0.583, 0.03, 0.646, -0.768, -0.892, -0.741, -0.397, 0.626, 0.004, -0.515, 0.355, 0.196, -0.989, -0.982, 0.985, 0.445, 0.63, -0.849, -0.528, 0.146, -0.319 }; + double X[] = { -0.199, -0.259, 0.386, -0.131, -0.867, 0.888 }; + int incX = -1; + double Y[] = { 0.106, 0.874, 0.962, 0.636, -0.759, 0.415, -0.053, 0.315 }; + int incY = -1; + double y_expected[] = { -0.139603, -0.250546, -0.3107376, -0.1144656, 0.2181809, -0.0877031, 0.0149724, -0.0224571 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 812) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 812) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int M = 3; + int N = 4; + int KL = 1; + int KU = 1; + int lda = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.534, 0.67, -0.621, 0.143, -0.794, 0.073, 0.414, -0.9, 0.155, -0.368, 0.122, -0.583, 0.03, 0.646, -0.768, -0.892, -0.741, -0.397, 0.626, 0.004, -0.515, 0.355, 0.196, -0.989, -0.982, 0.985, 0.445, 0.63, -0.849, -0.528, 0.146, -0.319 }; + double X[] = { -0.199, -0.259, 0.386, -0.131, -0.867, 0.888 }; + int incX = -1; + double Y[] = { 0.106, 0.874, 0.962, 0.636, -0.759, 0.415, -0.053, 0.315 }; + int incY = -1; + double y_expected[] = { -0.1642353, -0.2575697, -0.3610975, -0.1305629, 0.1713576, -0.2514988, 0.0195631, -0.0648656 }; + cblas_zgbmv(order, trans, M, N, KU, KL, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgbmv(case 813) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgbmv(case 813) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_gemm.c b/software/gsl-1.15/cblas/test_gemm.c new file mode 100644 index 000000000..aafa4f305 --- /dev/null +++ b/software/gsl-1.15/cblas/test_gemm.c @@ -0,0 +1,1399 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_gemm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha = 1.0f; + float beta = 0.0f; + float A[] = { 0.199f, 0.237f, 0.456f, 0.377f }; + int lda = 4; + float B[] = { 0.842f, -0.734f, 0.323f, -0.957f, -0.303f, -0.873f, -0.871f, -0.819f }; + int ldb = 2; + float C[] = { 0.498f, -0.925f }; + int ldc = 2; + float C_expected[] = { -0.222426f, -1.07973f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1466)"); + } + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha = 1.0f; + float beta = 0.0f; + float A[] = { -0.83f, 0.922f, -0.228f, -0.003f }; + int lda = 1; + float B[] = { 0.072f, 0.345f, 0.944f, -0.39f, -0.577f, 0.656f, -0.693f, -0.453f }; + int ldb = 4; + float C[] = { 0.583f, 0.522f }; + int ldc = 1; + float C_expected[] = { 0.044268f, 1.24311f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1467)"); + } + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha = 0.1f; + float beta = 0.1f; + float A[] = { -0.838f, 0.622f, -0.494f, 0.304f }; + int lda = 4; + float B[] = { 0.147f, 0.134f, 0.169f, 0.734f, -0.7f, 0.541f, -0.794f, -0.256f }; + int ldb = 4; + float C[] = { -0.632f, -0.559f }; + int ldc = 2; + float C_expected[] = { -0.0532188f, 0.0678514f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1468)"); + } + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha = 0.1f; + float beta = 0.1f; + float A[] = { -0.937f, 0.635f, 0.596f, -0.51f }; + int lda = 1; + float B[] = { -0.688f, -0.265f, 0.049f, 0.133f, -0.918f, -0.147f, 0.977f, -0.21f }; + int ldb = 2; + float C[] = { 0.844f, 0.999f }; + int ldc = 1; + float C_expected[] = { 0.0474373f, 0.135125f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1469)"); + } + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha = -0.3f; + float beta = 0.1f; + float A[] = { -0.165f, 0.638f, 0.346f, -0.697f }; + int lda = 1; + float B[] = { 0.499f, -0.73f, 0.262f, 0.759f, 0.664f, 0.997f, -0.702f, -0.839f }; + int ldb = 2; + float C[] = { 0.17f, 0.425f }; + int ldc = 2; + float C_expected[] = { -0.224158f, -0.417831f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1470)"); + } + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha = -0.3f; + float beta = 0.1f; + float A[] = { -0.603f, -0.714f, -0.893f, 0.046f }; + int lda = 4; + float B[] = { 0.859f, -0.694f, -0.868f, -0.98f, -0.103f, 0.567f, -0.277f, -0.734f }; + int ldb = 4; + float C[] = { 0.517f, -0.622f }; + int ldc = 1; + float C_expected[] = { -0.160575f, -0.0234604f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1471)"); + } + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.087f, -0.047f, -0.051f, -0.615f }; + int lda = 1; + float B[] = { -0.722f, -0.077f, 0.563f, 0.501f, 0.855f, 0.605f, 0.556f, -0.627f }; + int ldb = 4; + float C[] = { -0.181f, -0.89f }; + int ldc = 2; + float C_expected[] = { -0.208039f, -0.864557f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1472)"); + } + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.753f, -0.074f, -0.247f, -0.19f }; + int lda = 4; + float B[] = { 0.061f, 0.743f, 0.22f, -0.682f, 0.733f, 0.417f, 0.772f, 0.665f }; + int ldb = 2; + float C[] = { -0.253f, 0.972f }; + int ldc = 1; + float C_expected[] = { -0.291994f, 0.898164f }; + cblas_sgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "sgemm(case 1473)"); + } + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha = 0; + double beta = 0; + double A[] = { 0.017, 0.191, 0.863, -0.97 }; + int lda = 4; + double B[] = { -0.207, -0.916, -0.278, 0.403, 0.885, 0.409, -0.772, -0.27 }; + int ldb = 2; + double C[] = { -0.274, -0.858 }; + int ldc = 2; + double C_expected[] = { 0.0, 0.0 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1474)"); + } + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha = 0; + double beta = 0; + double A[] = { 0.571, 0.081, 0.109, 0.988 }; + int lda = 1; + double B[] = { -0.048, -0.753, -0.8, -0.89, -0.535, -0.017, -0.018, -0.544 }; + int ldb = 4; + double C[] = { -0.876, -0.792 }; + int ldc = 1; + double C_expected[] = { 0.0, 0.0 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1475)"); + } + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha = -0.3; + double beta = 1; + double A[] = { 0.939, 0.705, 0.977, 0.4 }; + int lda = 4; + double B[] = { -0.089, -0.822, 0.937, 0.159, 0.789, -0.413, -0.172, 0.88 }; + int ldb = 4; + double C[] = { -0.619, 0.063 }; + int ldc = 2; + double C_expected[] = { -0.7137904, -0.1270986 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1476)"); + } + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.795, 0.81, 0.388, 0.09 }; + int lda = 1; + double B[] = { -0.847, 0.031, -0.938, 0.09, -0.286, -0.478, -0.981, 0.881 }; + int ldb = 2; + double C[] = { -0.242, -0.02 }; + int ldc = 1; + double C_expected[] = { -0.1562981, -0.0026243 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1477)"); + } + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha = -1; + double beta = 0; + double A[] = { -0.556, 0.532, 0.746, 0.673 }; + int lda = 1; + double B[] = { -0.525, 0.967, 0.687, -0.024, 0.527, 0.485, 0.109, -0.46 }; + int ldb = 2; + double C[] = { -0.495, 0.859 }; + int ldc = 2; + double C_expected[] = { -1.123883, 0.49819 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1478)"); + } + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha = -1; + double beta = 0; + double A[] = { -0.358, 0.224, -0.941, 0.513 }; + int lda = 4; + double B[] = { -0.201, -0.159, -0.586, -0.016, -0.324, 0.411, 0.115, -0.229 }; + int ldb = 4; + double C[] = { 0.558, 0.596 }; + int ldc = 1; + double C_expected[] = { -0.57956, 0.017636 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1479)"); + } + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.586, 0.809, 0.709, -0.524 }; + int lda = 1; + double B[] = { 0.768, 0.7, 0.619, -0.478, -0.129, -0.778, -0.432, 0.454 }; + int ldb = 4; + double C[] = { 0.042, 0.252 }; + int ldc = 2; + double C_expected[] = { -0.1996785, 0.5813976 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1480)"); + } + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.164, 0.522, 0.948, -0.624 }; + int lda = 4; + double B[] = { -0.142, 0.778, 0.359, 0.622, -0.637, -0.757, -0.282, -0.805 }; + int ldb = 2; + double C[] = { -0.09, 0.183 }; + int ldc = 1; + double C_expected[] = { -0.0248334, 0.1884672 }; + cblas_dgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dgemm(case 1481)"); + } + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.082f, -0.281f, -0.096f, 0.913f, 0.974f, -0.706f, -0.773f, 0.522f }; + int lda = 4; + float B[] = { 0.745f, -0.664f, 0.352f, -0.733f, 0.304f, -0.555f, -0.493f, -0.089f, 0.188f, 0.631f, 0.235f, 0.152f, -0.299f, -0.731f, -0.686f, -0.332f }; + int ldb = 2; + float C[] = { -0.179f, -0.284f, -0.996f, -0.414f }; + int ldc = 2; + float C_expected[] = { -1.06679f, 1.47116f, 0.599689f, 0.933532f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1482) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1482) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { 0.044f, -0.33f, 0.279f, 0.712f, -0.363f, -0.788f, -0.768f, -0.551f }; + int lda = 1; + float B[] = { 0.138f, 0.927f, -0.178f, -0.864f, 0.888f, 0.844f, -0.199f, 0.706f, -0.034f, 0.483f, 0.499f, 0.664f, 0.648f, 0.324f, 0.97f, 0.609f }; + int ldb = 4; + float C[] = { -0.129f, 0.842f, 0.214f, -0.626f }; + int ldc = 1; + float C_expected[] = { 1.81122f, 1.76205f, 1.0574f, -0.564966f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1483) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1483) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.812f, -0.471f, 0.241f, 0.795f, 0.439f, 0.131f, -0.636f, 0.531f }; + int lda = 4; + float B[] = { 0.062f, 0.807f, 0.873f, 0.372f, 0.239f, 0.804f, 0.537f, -0.954f, -0.396f, 0.838f, 0.081f, 0.15f, 0.489f, -0.438f, 0.165f, 0.429f }; + int ldb = 4; + float C[] = { 0.868f, 0.329f, -0.509f, 0.724f }; + int ldc = 2; + float C_expected[] = { -0.868f, -0.329f, 0.509f, -0.724f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1484) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1484) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.832f, 0.198f, 0.794f, -0.522f, -0.319f, 0.578f, 0.332f, 0.746f }; + int lda = 1; + float B[] = { -0.361f, 0.187f, -0.163f, -0.781f, 0.536f, 0.888f, -0.969f, 0.899f, 0.961f, -0.583f, 0.753f, 0.29f, -0.997f, 0.729f, -0.352f, -0.2f }; + int ldb = 2; + float C[] = { 0.864f, 0.735f, -0.074f, -0.228f }; + int ldc = 1; + float C_expected[] = { -0.864f, -0.735f, 0.074f, 0.228f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1485) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1485) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { 0.149f, 0.187f, 0.263f, -0.715f, -0.882f, -0.907f, 0.87f, -0.527f }; + int lda = 4; + float B[] = { -0.915f, -0.249f, -0.986f, -0.799f, -0.136f, 0.712f, 0.964f, 0.799f, -0.569f, 0.686f, 0.603f, 0.758f, 0.161f, -0.698f, -0.263f, -0.256f }; + int ldb = 4; + float C[] = { 0.622f, -0.824f, -0.482f, -0.161f }; + int ldc = 2; + float C_expected[] = { -0.246901f, 0.083044f, 1.25556f, 0.009106f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1486) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1486) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { 0.963f, -0.943f, -0.734f, -0.253f, 0.832f, 0.545f, -0.815f, -0.434f }; + int lda = 1; + float B[] = { 0.23f, -0.211f, 0.906f, 0.232f, -0.339f, 0.597f, -0.919f, 0.793f, 0.535f, 0.526f, 0.119f, 0.053f, 0.751f, 0.044f, 0.752f, -0.469f }; + int ldb = 2; + float C[] = { 0.483f, -0.266f, -0.224f, -0.692f }; + int ldc = 1; + float C_expected[] = { -0.047537f, 0.667177f, 1.02025f, 0.823778f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1487) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1487) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { -0.657f, -0.497f, -0.293f, -0.168f, -0.943f, -0.181f, 0.569f, 0.91f }; + int lda = 1; + float B[] = { -0.047f, 0.796f, -0.913f, 0.998f, 0.365f, 0.467f, -0.627f, -0.523f, 0.885f, 0.234f, -0.494f, 0.071f, -0.361f, -0.154f, -0.055f, -0.32f }; + int ldb = 2; + float C[] = { 0.956f, 0.268f, 0.152f, 0.717f }; + int ldc = 2; + float C_expected[] = { -0.668685f, 0.134477f, -0.715786f, -0.478065f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1488) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1488) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.394f, -0.482f, 0.631f, -0.833f, 0.221f, 0.672f, 0.2f, 0.967f }; + int lda = 4; + float B[] = { 0.708f, 0.695f, 0.111f, -0.912f, 0.376f, 0.606f, -0.997f, -0.741f, 0.349f, 0.543f, 0.372f, -0.563f, 0.129f, -0.295f, -0.672f, -0.95f }; + int ldb = 4; + float C[] = { 0.436f, 0.752f, 0.074f, 0.209f }; + int ldc = 1; + float C_expected[] = { -0.325083f, -0.301952f, -0.283022f, 0.339919f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1489) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1489) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.827f, -0.862f, 0.373f, -0.265f, -0.9f, 0.892f, -0.319f, 0.151f }; + int lda = 1; + float B[] = { 0.603f, 0.816f, -0.511f, 0.831f, -0.36f, -0.954f, -0.978f, 0.485f, 0.675f, 0.186f, 0.463f, 0.144f, 0.851f, -0.458f, 0.766f, -0.213f }; + int ldb = 4; + float C[] = { -0.335f, 0.333f, -0.4f, 0.422f }; + int ldc = 2; + float C_expected[] = { 2.7126f, 0.702111f, 0.437661f, 0.691294f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1490) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1490) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.966f, 0.476f, -0.013f, -0.655f, 0.773f, -0.543f, -0.231f, -0.353f }; + int lda = 4; + float B[] = { -0.684f, 0.144f, 0.018f, -0.77f, -0.688f, 0.909f, -0.094f, -0.938f, -0.757f, 0.574f, -0.479f, 0.473f, 0.0f, 0.064f, -0.168f, 0.858f }; + int ldb = 2; + float C[] = { -0.912f, 0.54f, 0.756f, 0.024f }; + int ldc = 1; + float C_expected[] = { -0.156236f, 0.839112f, -0.230206f, -0.106256f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1491) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1491) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { 0.66f, -0.113f, -0.663f, -0.856f, 0.614f, -0.344f, -0.964f, -0.532f }; + int lda = 1; + float B[] = { -0.606f, -0.965f, -0.279f, -0.312f, 0.63f, 0.967f, 0.041f, -0.557f, 0.663f, 0.619f, -0.134f, 0.261f, -0.388f, 0.525f, 0.222f, 0.538f }; + int ldb = 4; + float C[] = { 0.114f, -0.376f, -0.851f, -0.682f }; + int ldc = 2; + float C_expected[] = { 0.114f, -0.376f, -0.851f, -0.682f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1492) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1492) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { 0.212f, -0.752f, 0.679f, 0.49f, -0.029f, -0.488f, 0.567f, 0.374f }; + int lda = 4; + float B[] = { -0.914f, 0.734f, -0.845f, 0.059f, -0.297f, 0.152f, -0.417f, -0.669f, 0.831f, -0.544f, 0.022f, 0.102f, -0.379f, -0.357f, -0.394f, -0.588f }; + int ldb = 2; + float C[] = { -0.584f, 0.373f, 0.235f, 0.521f }; + int ldc = 1; + float C_expected[] = { -0.584f, 0.373f, 0.235f, 0.521f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1493) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1493) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.135f, 0.128f, 0.909f, -0.963f, 0.299f, -0.944f, 0.944f, 0.942f }; + int lda = 1; + float B[] = { 0.924f, -0.317f, -0.992f, -0.854f, -0.435f, 0.102f, 0.126f, 0.862f, 0.952f, 0.68f, 0.545f, 0.168f, 0.752f, 0.549f, 0.687f, -0.76f }; + int ldb = 2; + float C[] = { -0.369f, -0.33f, 0.849f, -0.632f }; + int ldc = 2; + float C_expected[] = { 0.326537f, 0.37603f, -0.86067f, 0.529817f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1494) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1494) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.061f, -0.271f, -0.043f, -0.023f, 0.694f, 0.333f, 0.733f, -0.967f }; + int lda = 4; + float B[] = { 0.088f, -0.607f, 0.589f, 0.375f, -0.897f, -0.954f, -0.216f, -0.195f, -0.865f, -0.511f, -0.219f, 0.535f, 0.976f, 0.582f, 0.464f, -0.041f }; + int ldb = 4; + float C[] = { 0.533f, -0.63f, 0.405f, 0.667f }; + int ldc = 1; + float C_expected[] = { -0.459906f, 0.552595f, -0.425391f, -0.533626f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1495) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1495) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { -0.676f, -0.116f, 0.707f, -0.256f, -0.893f, -0.966f, 0.159f, -0.246f }; + int lda = 1; + float B[] = { 0.059f, 0.281f, -0.93f, -0.263f, 0.583f, -0.11f, 0.639f, -0.96f, -0.878f, 0.984f, 0.058f, 0.977f, -0.567f, 0.561f, -0.048f, -0.798f }; + int ldb = 4; + float C[] = { 0.362f, -0.808f, 0.428f, -0.112f }; + int ldc = 2; + float C_expected[] = { 0.362f, -0.808f, 0.428f, -0.112f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1496) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1496) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { -0.915f, 0.439f, 0.171f, -0.019f, 0.843f, 0.944f, -0.581f, 0.856f }; + int lda = 4; + float B[] = { -0.284f, 0.207f, -0.27f, 0.832f, 0.894f, -0.626f, -0.305f, -0.006f, 0.562f, -0.744f, -0.533f, 0.126f, -0.375f, -0.333f, 0.275f, 0.748f }; + int ldb = 2; + float C[] = { -0.763f, -0.829f, 0.708f, -0.613f }; + int ldc = 1; + float C_expected[] = { -0.763f, -0.829f, 0.708f, -0.613f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1497) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1497) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.496f, -0.9f, 0.825f, -0.678f, 0.41f, -0.585f, -0.264f, 0.308f }; + int lda = 1; + float B[] = { 0.907f, 0.972f, -0.724f, 0.745f, -0.601f, 0.589f, 0.759f, -0.521f, -0.161f, -0.321f, 0.341f, -0.981f, -0.378f, -0.671f, -0.314f, -0.878f }; + int ldb = 4; + float C[] = { -0.293f, 0.07f, 0.087f, -0.542f }; + int ldc = 2; + float C_expected[] = { 0.10357f, -0.163927f, 0.444626f, -0.0076744f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1498) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1498) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { -0.225f, -0.629f, -0.939f, -0.836f, -0.841f, -0.794f, 0.836f, -0.65f }; + int lda = 4; + float B[] = { 0.869f, -0.453f, 0.8f, -0.947f, 0.545f, 0.716f, -0.507f, -0.228f, 0.722f, 0.372f, 0.77f, 0.317f, -0.153f, -0.524f, -0.465f, -0.684f }; + int ldb = 2; + float C[] = { -0.896f, 0.91f, -0.973f, -0.269f }; + int ldc = 1; + float C_expected[] = { -1.18974f, -1.0134f, 0.189027f, -1.14494f }; + cblas_cgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cgemm(case 1499) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cgemm(case 1499) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {1, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.33, 0.457, 0.428, -0.19, 0.86, -0.53, 0.058, -0.942 }; + int lda = 4; + double B[] = { 0.434, 0.653, -0.124, 0.191, -0.112, -0.84, -0.72, 0.075, -0.503, -0.109, 0.3, -0.898, 0.489, 0.384, 0.993, -0.804 }; + int ldb = 2; + double C[] = { -0.792, -0.155, -0.608, -0.243 }; + int ldc = 2; + double C_expected[] = { 0.042563, -0.465908, -0.649991, -1.621116 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1500) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1500) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {1, 0}; + double beta[2] = {-1, 0}; + double A[] = { 0.726, -0.438, -0.23, -0.054, -0.019, 0.902, -0.883, -0.235 }; + int lda = 1; + double B[] = { 0.159, -0.18, 0.386, -0.167, 0.971, -0.072, 0.87, -0.839, 0.474, 0.956, -0.235, 0.332, 0.826, -0.056, -0.941, 0.01 }; + int ldb = 4; + double C[] = { -0.799, 0.973, -0.549, -0.177 }; + int ldc = 1; + double C_expected[] = { -0.181084, 0.257841, 2.251901, 1.558195 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1501) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1501) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.109, 0.892, -0.723, 0.793, 0.109, -0.419, -0.534, 0.448 }; + int lda = 4; + double B[] = { -0.875, -0.31, -0.027, 0.067, 0.274, -0.126, -0.548, 0.497, 0.681, 0.388, 0.909, 0.889, 0.982, -0.074, -0.788, 0.233 }; + int ldb = 4; + double C[] = { 0.503, 0.067, 0.239, 0.876 }; + int ldc = 2; + double C_expected[] = { 0.6553584, 0.0864583, 0.2559136, 0.7518389 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1502) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1502) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.334, 0.192, -0.992, -0.168, 0.154, -0.75, -0.797, -0.76 }; + int lda = 1; + double B[] = { -0.82, 0.147, -0.237, 0.68, 0.317, 0.257, -0.406, -0.802, 0.058, 0.012, -0.832, 0.949, -0.263, -0.085, -0.064, 0.492 }; + int ldb = 2; + double C[] = { 0.079, -0.602, -0.392, 0.316 }; + int ldc = 1; + double C_expected[] = { 0.0980569, -0.6430449, -0.539207, 0.4226848 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1503) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1503) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 111; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.305, -0.698, -0.072, -0.383, 0.364, -0.656, 0.819, 0.194 }; + int lda = 4; + double B[] = { 0.682, 0.498, -0.389, 0.923, -0.853, -0.558, -0.722, -0.085, -0.27, 0.026, -0.107, -0.036, 0.644, -0.327, -0.894, 0.34 }; + int ldb = 4; + double C[] = { 0.981, -0.336, -0.377, -0.41 }; + int ldc = 2; + double C_expected[] = { -0.981, 0.336, 0.377, 0.41 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1504) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1504) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 111; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.306, -0.709, -0.196, 0.285, 0.873, -0.802, 0.715, -0.179 }; + int lda = 1; + double B[] = { 0.028, 0.109, 0.87, -0.446, 0.735, 0.731, 0.021, -0.186, 0.541, 0.97, -0.333, 0.002, -0.089, -0.01, 0.331, 0.851 }; + int ldb = 2; + double C[] = { 0.902, -0.584, -0.695, -0.607 }; + int ldc = 1; + double C_expected[] = { -0.902, 0.584, 0.695, 0.607 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1505) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1505) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.517, -0.136, 0.72, -0.237, 0.121, -0.66, 0.005, 0.759 }; + int lda = 1; + double B[] = { -0.606, 0.049, 0.807, -0.236, -0.258, -0.412, 0.75, -0.659, 0.993, -0.029, -0.968, 0.707, -0.362, -0.005, 0.096, -0.241 }; + int ldb = 2; + double C[] = { 0.63, 0.922, 0.025, -0.535 }; + int ldc = 2; + double C_expected[] = { 1.117044, 1.983417, -1.276831, -0.447092 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1506) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1506) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.064, 0.371, -0.01, -0.262, 0.143, -0.081, 0.1, -0.062 }; + int lda = 4; + double B[] = { -0.749, 0.289, -0.239, -0.226, 0.284, 0.668, 0.305, 0.075, -0.36, 0.166, -0.416, 0.234, -0.267, 0.525, 0.116, -0.561 }; + int ldb = 4; + double C[] = { 0.671, 0.763, 0.444, -0.246 }; + int ldc = 1; + double C_expected[] = { 0.753107, 0.896395, 0.481996, -0.263126 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1507) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1507) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.956, -0.751, 0.671, -0.633, 0.648, -0.042, 0.948, 0.826 }; + int lda = 1; + double B[] = { 0.921, 0.506, -0.609, 0.817, -0.686, 0.991, 0.616, -0.482, -0.02, -0.34, 0.559, 0.976, 0.431, 0.385, -0.164, -0.778 }; + int ldb = 4; + double C[] = { 0.074, -0.01, 0.165, 0.166 }; + int ldc = 2; + double C_expected[] = { 0.166046, 0.491557, 1.473191, -0.033821 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1508) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1508) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.698, -0.062, 0.023, 0.704, 0.443, -0.46, 0.541, 0.296 }; + int lda = 4; + double B[] = { 0.787, -0.199, 0.835, -0.276, -0.515, 0.467, -0.76, -0.483, 0.015, -0.394, -0.748, 0.02, 0.573, 0.3, -0.088, -0.238 }; + int ldb = 2; + double C[] = { 0.935, -0.655, -0.797, 0.071 }; + int ldc = 1; + double C_expected[] = { -1.070679, 0.178755, -0.344714, -0.308137 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1509) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1509) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 112; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.202, -0.219, 0.741, 0.527, 0.054, 0.16, -0.359, 0.338 }; + int lda = 1; + double B[] = { -0.872, 0.995, 0.722, 0.618, -0.27, 0.939, -0.743, 0.547, -0.864, 0.376, -0.997, -0.63, 0.887, -0.454, 0.436, -0.039 }; + int ldb = 4; + double C[] = { -0.684, 0.463, -0.386, -0.524 }; + int ldc = 2; + double C_expected[] = { 0.1423153, -0.066679, 0.1175618, 0.0012949 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1510) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1510) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 112; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0.1}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.855, -0.173, -0.679, 0.824, 0.469, 0.786, 0.757, -0.109 }; + int lda = 4; + double B[] = { 0.483, -0.888, -0.757, 0.551, -0.81, 0.23, -0.078, 0.725, -0.592, 0.394, 0.884, 0.802, -0.813, -0.016, -0.853, 0.783 }; + int ldb = 2; + double C[] = { 0.181, -0.368, -0.864, -0.784 }; + int ldc = 1; + double C_expected[] = { 0.1728438, 0.1183508, 0.2526999, 0.3004174 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1511) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1511) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.446, -0.65, -0.724, 0.014, 0.792, -0.695, -0.81, -0.358 }; + int lda = 1; + double B[] = { -0.08, 0.216, 0.689, 0.699, 0.073, -0.346, 0.821, -0.668, -0.798, 0.869, 0.451, -0.061, -0.41, 0.316, 0.104, -0.514 }; + int ldb = 2; + double C[] = { -0.476, 0.211, -0.912, -0.243 }; + int ldc = 2; + double C_expected[] = { 1.372475, -0.135616, 0.549353, -1.968747 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1512) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1512) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 111; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.669, 0.046, -0.094, 0.666, 0.23, 0.448, -0.795, -0.142 }; + int lda = 4; + double B[] = { 0.037, -0.154, -0.739, 0.905, 0.793, -0.53, -0.34, 0.428, 0.072, -0.263, -0.603, -0.905, 0.681, -0.083, -0.511, -0.337 }; + int ldb = 4; + double C[] = { 0.247, 0.575, -0.836, -0.883 }; + int ldc = 1; + double C_expected[] = { -0.975939, 0.415528, 0.275533, 0.002716 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1513) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1513) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0}; + double beta[2] = {-1, 0}; + double A[] = { 0.369, 0.506, 0.217, -0.739, -0.395, 0.16, -0.329, -0.954 }; + int lda = 1; + double B[] = { -0.622, -0.945, 0.416, -0.884, 0.797, -0.74, 0.519, -0.789, -0.348, 0.563, -0.398, -0.956, 0.227, 0.84, -0.079, 0.847 }; + int ldb = 4; + double C[] = { 0.833, 0.761, 0.074, -0.448 }; + int ldc = 2; + double C_expected[] = { -0.833, -0.761, -0.074, 0.448 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1514) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1514) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 112; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {0, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.141, 0.275, 0.717, 0.775, -0.701, -0.689, -0.883, -0.077 }; + int lda = 4; + double B[] = { -0.526, -0.437, 0.133, -0.209, -0.83, 0.328, 0.916, -0.337, 0.762, -0.664, -0.566, 0.955, 0.168, 0.488, -0.172, -0.535 }; + int ldb = 2; + double C[] = { -0.88, 0.945, 0.416, 0.99 }; + int ldc = 1; + double C_expected[] = { 0.88, -0.945, -0.416, -0.99 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1515) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1515) imag"); + }; + }; + }; + + + { + int order = 101; + int transA = 113; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 0.1}; + double A[] = { -0.534, -0.013, -0.258, -0.31, -0.211, -0.883, -0.89, -0.499 }; + int lda = 1; + double B[] = { -0.185, -0.798, -0.34, 0.716, 0.035, 0.968, -0.26, 0.784, -0.889, -0.344, -0.685, -0.647, -0.764, 0.03, 0.626, -0.989 }; + int ldb = 4; + double C[] = { -0.793, -0.551, 0.182, 0.838 }; + int ldc = 2; + double C_expected[] = { -0.5507177, -0.0286821, 0.2222276, 0.5197398 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1516) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1516) imag"); + }; + }; + }; + + + { + int order = 102; + int transA = 113; + int transB = 113; + int M = 1; + int N = 2; + int K = 4; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 0.1}; + double A[] = { 0.575, -0.128, -0.702, 0.758, 0.383, -0.914, 0.157, 0.368 }; + int lda = 4; + double B[] = { 0.572, -0.841, 0.223, -0.334, -0.823, -0.84, 0.671, -0.871, 0.241, 0.927, -0.344, 0.281, -0.034, -0.104, 0.587, -0.329 }; + int ldb = 2; + double C[] = { -0.612, 0.167, 0.647, 0.447 }; + int ldc = 1; + double C_expected[] = { -0.7876717, 0.0341179, -0.0800018, 0.5717566 }; + cblas_zgemm(order, transA, transB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zgemm(case 1517) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zgemm(case 1517) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_gemv.c b/software/gsl-1.15/cblas/test_gemv.c new file mode 100644 index 000000000..9145168eb --- /dev/null +++ b/software/gsl-1.15/cblas/test_gemv.c @@ -0,0 +1,503 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_gemv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { -0.805f }; + float X[] = { -0.965f }; + int incX = -1; + float Y[] = { 0.537f }; + int incY = -1; + float y_expected[] = { 0.615725f }; + cblas_sgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgemv(case 774)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { -0.805f }; + float X[] = { -0.965f }; + int incX = -1; + float Y[] = { 0.537f }; + int incY = -1; + float y_expected[] = { 0.615725f }; + cblas_sgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgemv(case 775)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float beta = 0.0f; + float A[] = { -0.805f }; + float X[] = { -0.965f }; + int incX = -1; + float Y[] = { 0.537f }; + int incY = -1; + float y_expected[] = { 0.776825f }; + cblas_sgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgemv(case 776)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float beta = 0.0f; + float A[] = { -0.805f }; + float X[] = { -0.965f }; + int incX = -1; + float Y[] = { 0.537f }; + int incY = -1; + float y_expected[] = { 0.776825f }; + cblas_sgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sgemv(case 777)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + double alpha = -0.3; + double beta = -1; + double A[] = { -0.047 }; + double X[] = { 0.672 }; + int incX = -1; + double Y[] = { 0.554 }; + int incY = -1; + double y_expected[] = { -0.5445248 }; + cblas_dgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgemv(case 778)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + double alpha = -0.3; + double beta = -1; + double A[] = { -0.047 }; + double X[] = { 0.672 }; + int incX = -1; + double Y[] = { 0.554 }; + int incY = -1; + double y_expected[] = { -0.5445248 }; + cblas_dgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgemv(case 779)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + double alpha = -1; + double beta = 1; + double A[] = { -0.047 }; + double X[] = { 0.672 }; + int incX = -1; + double Y[] = { 0.554 }; + int incY = -1; + double y_expected[] = { 0.585584 }; + cblas_dgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgemv(case 780)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + double alpha = -1; + double beta = 1; + double A[] = { -0.047 }; + double X[] = { 0.672 }; + int incX = -1; + double Y[] = { 0.554 }; + int incY = -1; + double y_expected[] = { 0.585584 }; + cblas_dgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dgemv(case 781)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { 0.624274f, -0.921216f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 782) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 782) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { 0.624274f, -0.921216f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 783) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 783) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { -0.216261f, 0.654835f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 784) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 784) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { -0.216261f, 0.654835f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 785) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 785) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { 0.427909f, 0.150089f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 786) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 786) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.629f, 0.801f }; + float X[] = { 0.778f, -0.073f }; + int incX = -1; + float Y[] = { -0.976f, -0.682f }; + int incY = -1; + float y_expected[] = { 0.427909f, 0.150089f }; + cblas_cgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "cgemv(case 787) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "cgemv(case 787) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { 0.401726, 0.078178 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 788) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 788) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {0, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { 0.401726, 0.078178 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 789) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 789) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 1}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { -0.040808, 0.517356 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 790) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 790) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 1}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { -0.040808, 0.517356 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 791) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 791) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { 0.540796, -0.053628 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 792) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 792) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0}; + double A[] = { 0.932, -0.724 }; + double X[] = { 0.334, -0.317 }; + int incX = -1; + double Y[] = { 0.348, 0.07 }; + int incY = -1; + double y_expected[] = { 0.540796, -0.053628 }; + cblas_zgemv(order, trans, M, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zgemv(case 793) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zgemv(case 793) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_ger.c b/software/gsl-1.15/cblas/test_ger.c new file mode 100644 index 000000000..d81fe7551 --- /dev/null +++ b/software/gsl-1.15/cblas/test_ger.c @@ -0,0 +1,283 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_ger (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { -0.515f }; + float X[] = { 0.611f }; + int incX = -1; + float Y[] = { -0.082f }; + int incY = -1; + float A_expected[] = { -0.565102f }; + cblas_sger(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "sger(case 1390)"); + } + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { -0.515f }; + float X[] = { 0.611f }; + int incX = -1; + float Y[] = { -0.082f }; + int incY = -1; + float A_expected[] = { -0.565102f }; + cblas_sger(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "sger(case 1391)"); + } + }; + }; + + + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + double alpha = 1; + double A[] = { -0.809 }; + double X[] = { -0.652 }; + int incX = -1; + double Y[] = { 0.712 }; + int incY = -1; + double A_expected[] = { -1.273224 }; + cblas_dger(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dger(case 1392)"); + } + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + double alpha = 1; + double A[] = { -0.809 }; + double X[] = { -0.652 }; + int incX = -1; + double Y[] = { 0.712 }; + int incY = -1; + double A_expected[] = { -1.273224 }; + cblas_dger(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dger(case 1393)"); + } + }; + }; + + + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.651f, 0.856f }; + float X[] = { -0.38f, -0.235f }; + int incX = -1; + float Y[] = { -0.627f, 0.757f }; + int incY = -1; + float A_expected[] = { -0.651f, 0.856f }; + cblas_cgeru(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cgeru(case 1394) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cgeru(case 1394) imag"); + }; + }; + }; + + + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.651f, 0.856f }; + float X[] = { -0.38f, -0.235f }; + int incX = -1; + float Y[] = { -0.627f, 0.757f }; + int incY = -1; + float A_expected[] = { -0.651f, 0.856f }; + cblas_cgerc(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cgerc(case 1395) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cgerc(case 1395) imag"); + }; + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.651f, 0.856f }; + float X[] = { -0.38f, -0.235f }; + int incX = -1; + float Y[] = { -0.627f, 0.757f }; + int incY = -1; + float A_expected[] = { -0.651f, 0.856f }; + cblas_cgeru(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cgeru(case 1396) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cgeru(case 1396) imag"); + }; + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.651f, 0.856f }; + float X[] = { -0.38f, -0.235f }; + int incX = -1; + float Y[] = { -0.627f, 0.757f }; + int incY = -1; + float A_expected[] = { -0.651f, 0.856f }; + cblas_cgerc(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cgerc(case 1397) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cgerc(case 1397) imag"); + }; + }; + }; + + + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-1, 0}; + double A[] = { -0.426, 0.757 }; + double X[] = { -0.579, -0.155 }; + int incX = -1; + double Y[] = { 0.831, 0.035 }; + int incY = -1; + double A_expected[] = { 0.049724, 0.90607 }; + cblas_zgeru(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zgeru(case 1398) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zgeru(case 1398) imag"); + }; + }; + }; + + + { + int order = 101; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-1, 0}; + double A[] = { -0.426, 0.757 }; + double X[] = { -0.579, -0.155 }; + int incX = -1; + double Y[] = { 0.831, 0.035 }; + int incY = -1; + double A_expected[] = { 0.060574, 0.86554 }; + cblas_zgerc(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zgerc(case 1399) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zgerc(case 1399) imag"); + }; + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-1, 0}; + double A[] = { -0.426, 0.757 }; + double X[] = { -0.579, -0.155 }; + int incX = -1; + double Y[] = { 0.831, 0.035 }; + int incY = -1; + double A_expected[] = { 0.049724, 0.90607 }; + cblas_zgeru(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zgeru(case 1400) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zgeru(case 1400) imag"); + }; + }; + }; + + + { + int order = 102; + int M = 1; + int N = 1; + int lda = 1; + double alpha[2] = {-1, 0}; + double A[] = { -0.426, 0.757 }; + double X[] = { -0.579, -0.155 }; + int incX = -1; + double Y[] = { 0.831, 0.035 }; + int incY = -1; + double A_expected[] = { 0.060574, 0.86554 }; + cblas_zgerc(order, M, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zgerc(case 1401) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zgerc(case 1401) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hbmv.c b/software/gsl-1.15/cblas/test_hbmv.c new file mode 100644 index 000000000..dbf4c550b --- /dev/null +++ b/software/gsl-1.15/cblas/test_hbmv.c @@ -0,0 +1,411 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hbmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { 0.02698f, 0.521724f, -0.379354f, 1.27743f, -0.25427f, -0.043268f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1086) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1086) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { 0.02698f, 0.521724f, -0.379354f, 1.27743f, -0.25427f, -0.043268f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1087) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1087) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { -0.06422f, -0.016288f, 0.734206f, 0.108366f, -0.411982f, 0.347068f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1088) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1088) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { -0.06422f, -0.016288f, 0.734206f, 0.108366f, -0.411982f, 0.347068f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1089) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1089) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { 0.19354f, 0.056192f, 0.72585f, 0.42717f, -0.2047f, 0.405354f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1090) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1090) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { 0.19354f, 0.056192f, 0.72585f, 0.42717f, -0.2047f, 0.405354f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1091) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1091) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { -0.151304f, 0.471592f, -0.507714f, -0.304446f, -1.16395f, -0.299062f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1092) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1092) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.937f, -0.035f, 0.339f, 0.847f, 0.022f, 0.153f, -0.785f, 0.193f, -0.731f, -0.166f, -0.243f, -0.319f, 0.173f, -0.24f, 0.079f, -0.058f, 0.124f, 0.445f }; + float X[] = { -0.093f, -0.103f, -0.537f, -0.151f, 0.094f, 0.954f }; + int incX = -1; + float Y[] = { 0.029f, -0.391f, -0.256f, 0.031f, -0.478f, 0.098f }; + int incY = -1; + float y_expected[] = { -0.151304f, 0.471592f, -0.507714f, -0.304446f, -1.16395f, -0.299062f }; + cblas_chbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chbmv(case 1093) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chbmv(case 1093) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.902712, -0.524419, -0.307439, -2.167713, 1.059385, 1.104445 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1094) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1094) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.902712, -0.524419, -0.307439, -2.167713, 1.059385, 1.104445 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1095) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1095) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.960834, -0.558818, 1.042598, -1.102864, 0.507945, 0.11149 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1096) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1096) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.960834, -0.558818, 1.042598, -1.102864, 0.507945, 0.11149 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1097) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1097) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -1.626828, 0.003954, 0.437012, -2.365106, 0.446715, 0.16323 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1098) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1098) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -1.626828, 0.003954, 0.437012, -2.365106, 0.446715, 0.16323 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1099) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1099) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.097302, -1.204999, 1.168771, -0.822543, 0.734395, 1.379065 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1100) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1100) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.662, 0.24, -0.311, -0.345, -0.782, 0.904, -0.842, 0.065, -0.168, -0.855, -0.692, 0.113, 0.009, -0.707, -0.981, 0.019, -0.687, 0.861 }; + double X[] = { 0.873, -0.509, 0.398, 0.471, 0.214, 0.878 }; + int incX = -1; + double Y[] = { -0.441, -0.781, 0.979, -0.911, 0.879, 0.807 }; + int incY = -1; + double y_expected[] = { -0.097302, -1.204999, 1.168771, -0.822543, 0.734395, 1.379065 }; + cblas_zhbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhbmv(case 1101) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhbmv(case 1101) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hemm.c b/software/gsl-1.15/cblas/test_hemm.c new file mode 100644 index 000000000..3bc7921b8 --- /dev/null +++ b/software/gsl-1.15/cblas/test_hemm.c @@ -0,0 +1,427 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hemm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { -0.126f, 0.079f }; + int lda = 1; + float B[] = { -0.954f, -0.059f, 0.296f, -0.988f }; + int ldb = 2; + float C[] = { -0.859f, -0.731f, 0.737f, 0.593f }; + int ldc = 2; + float C_expected[] = { 0.0723566f, -0.0738796f, -0.0717488f, 0.0699704f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1550) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1550) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { 0.652f, 0.584f }; + int lda = 1; + float B[] = { -0.983f, -0.734f, -0.422f, -0.825f }; + int ldb = 1; + float C[] = { 0.387f, 0.341f, -0.734f, 0.632f }; + int ldc = 1; + float C_expected[] = { 0.0137568f, -0.0253916f, -0.00941f, -0.100914f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1551) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1551) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.78f, 0.885f, 0.507f, 0.765f, 0.911f, -0.461f, 0.707f, 0.508f }; + int lda = 2; + float B[] = { -0.905f, 0.633f, 0.85f, -0.943f }; + int ldb = 2; + float C[] = { 0.045f, -0.237f, 0.078f, -0.252f }; + int ldc = 2; + float C_expected[] = { 0.589611f, -0.759345f, 0.960095f, -0.09013f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1552) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1552) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { 0.947f, 0.939f, -0.267f, -0.819f, -0.827f, -0.937f, 0.991f, 0.838f }; + int lda = 2; + float B[] = { 0.871f, -0.988f, -0.232f, -0.434f }; + int ldb = 1; + float C[] = { -0.261f, 0.927f, -0.351f, -0.203f }; + int ldc = 1; + float C_expected[] = { 1.0551f, 0.496359f, 0.780145f, -1.67298f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1553) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1553) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.593f, -0.9f }; + int lda = 1; + float B[] = { -0.861f, 0.747f, -0.984f, 0.595f }; + int ldb = 2; + float C[] = { -0.589f, -0.671f, -0.011f, -0.417f }; + int ldc = 2; + float C_expected[] = { -0.510573f, 0.442971f, -0.583512f, 0.352835f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1554) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1554) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.79f, 0.132f }; + int lda = 1; + float B[] = { -0.243f, -0.12f, 0.633f, -0.556f }; + int ldb = 1; + float C[] = { -0.658f, -0.74f, -0.47f, 0.481f }; + int ldc = 1; + float C_expected[] = { -0.19197f, -0.0948f, 0.50007f, -0.43924f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1555) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1555) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { -0.114f, -0.515f, -0.513f, -0.527f, -0.995f, 0.986f, 0.229f, -0.076f }; + int lda = 2; + float B[] = { 0.084f, 0.522f, 0.61f, 0.694f }; + int ldb = 2; + float C[] = { 0.802f, 0.136f, -0.161f, -0.364f }; + int ldc = 2; + float C_expected[] = { 0.269101f, 0.716492f, 0.237088f, 0.0290666f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1556) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1556) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.798f, -0.324f, -0.693f, -0.893f, -0.223f, 0.749f, 0.102f, -0.357f }; + int lda = 2; + float B[] = { -0.572f, -0.569f, -0.391f, -0.938f }; + int ldb = 1; + float C[] = { 0.152f, -0.834f, -0.633f, -0.473f }; + int ldc = 1; + float C_expected[] = { 1.08642f, -0.113853f, 0.234826f, -0.48289f }; + cblas_chemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "chemm(case 1557) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "chemm(case 1557) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0.1}; + double beta[2] = {0, 0.1}; + double A[] = { -0.359, 0.089 }; + int lda = 1; + double B[] = { -0.451, -0.337, -0.901, -0.871 }; + int ldb = 2; + double C[] = { 0.729, 0.631, 0.364, 0.246 }; + int ldc = 2; + double C_expected[] = { -0.0751983, 0.0890909, -0.0558689, 0.0687459 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1558) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1558) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0.1}; + double beta[2] = {0, 0.1}; + double A[] = { 0.044, -0.496 }; + int lda = 1; + double B[] = { -0.674, 0.281, 0.366, 0.888 }; + int ldb = 1; + double C[] = { -0.9, 0.919, 0.857, -0.049 }; + int ldc = 1; + double C_expected[] = { -0.0931364, -0.0929656, 0.0009928, 0.0873104 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1559) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1559) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0}; + double beta[2] = {0, 0.1}; + double A[] = { -0.314, 0.115, 0.114, 0.878, 0.961, -0.224, 0.973, 0.771 }; + int lda = 2; + double B[] = { 0.5, -0.016, -0.5, 0.149 }; + int ldb = 2; + double C[] = { -0.054, 0.064, 0.02, 0.245 }; + int ldc = 2; + double C_expected[] = { -0.0064, -0.0054, -0.0245, 0.002 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1560) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1560) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0}; + double beta[2] = {0, 0.1}; + double A[] = { 0.186, 0.578, 0.797, -0.957, -0.539, -0.969, -0.21, 0.354 }; + int lda = 2; + double B[] = { 0.641, -0.968, 0.15, -0.569 }; + int ldb = 1; + double C[] = { -0.556, -0.9, 0.197, 0.31 }; + int ldc = 1; + double C_expected[] = { 0.09, -0.0556, -0.031, 0.0197 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1561) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1561) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.323, 0.641 }; + int lda = 1; + double B[] = { -0.188, 0.091, -0.235, 0.523 }; + int ldb = 2; + double C[] = { 0.919, 0.806, 0.823, -0.94 }; + int ldc = 2; + double C_expected[] = { 0.858276, 0.835393, 0.747095, -0.771071 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1562) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1562) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { -0.688, 0.915 }; + int lda = 1; + double B[] = { 0.914, -0.204, 0.205, -0.476 }; + int ldb = 1; + double C[] = { 0.27, -0.628, -0.079, 0.507 }; + int ldc = 1; + double C_expected[] = { -0.358832, -0.487648, -0.22004, 0.834488 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1563) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1563) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {0, 1}; + double beta[2] = {0, 0.1}; + double A[] = { 0.681, 0.574, -0.425, -0.64, 0.792, 0.661, -0.009, 0.005 }; + int lda = 2; + double B[] = { -0.221, 0.554, -0.465, -0.95 }; + int ldb = 2; + double C[] = { 0.331, -0.958, -0.826, -0.972 }; + int ldc = 2; + double C_expected[] = { 0.778291, 0.142269, -0.496199, 0.112747 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1564) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1564) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {0, 1}; + double beta[2] = {0, 0.1}; + double A[] = { 0.959, 0.34, -0.23, 0.064, 0.516, -0.275, 0.714, 0.899 }; + int lda = 2; + double B[] = { -0.502, -0.987, -0.134, 0.215 }; + int ldb = 1; + double C[] = { 0.929, 0.181, -0.16, -0.921 }; + int ldc = 1; + double C_expected[] = { 0.986459, -0.371458, -0.320548, -0.059384 }; + cblas_zhemm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zhemm(case 1565) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zhemm(case 1565) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hemv.c b/software/gsl-1.15/cblas/test_hemv.c new file mode 100644 index 000000000..153f1f2d8 --- /dev/null +++ b/software/gsl-1.15/cblas/test_hemv.c @@ -0,0 +1,395 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hemv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1070) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1070) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1071) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1071) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1072) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1072) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1073) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1073) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1074) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1074) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1075) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1075) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1076) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1076) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + int N = 1; + int lda = 1; + float A[] = { -0.434f, 0.837f }; + float X[] = { 0.209f, -0.935f }; + int incX = -1; + float Y[] = { 0.346f, -0.412f }; + int incY = -1; + float y_expected[] = { -0.153306f, 0.56399f }; + cblas_chemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chemv(case 1077) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chemv(case 1077) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1078) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1078) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1079) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1079) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1080) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1080) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1081) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1081) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1082) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1082) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1083) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1083) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1084) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1084) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {0, 0}; + double beta[2] = {1, 0}; + int N = 1; + int lda = 1; + double A[] = { 0.036, -0.966 }; + double X[] = { -0.695, 0.886 }; + int incX = -1; + double Y[] = { 0.486, 0.629 }; + int incY = -1; + double y_expected[] = { 0.486, 0.629 }; + cblas_zhemv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhemv(case 1085) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhemv(case 1085) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_her.c b/software/gsl-1.15/cblas/test_her.c new file mode 100644 index 000000000..d1478f8f6 --- /dev/null +++ b/software/gsl-1.15/cblas/test_her.c @@ -0,0 +1,179 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_her (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { 0.188f, 0.856f }; + float X[] = { -0.832f, -0.151f }; + int incX = -1; + float A_expected[] = { 0.903025f, 0.0f }; + cblas_cher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher(case 1410) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher(case 1410) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { 0.188f, 0.856f }; + float X[] = { -0.832f, -0.151f }; + int incX = -1; + float A_expected[] = { 0.903025f, 0.0f }; + cblas_cher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher(case 1411) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher(case 1411) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { 0.188f, 0.856f }; + float X[] = { -0.832f, -0.151f }; + int incX = -1; + float A_expected[] = { 0.903025f, 0.0f }; + cblas_cher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher(case 1412) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher(case 1412) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 1.0f; + float A[] = { 0.188f, 0.856f }; + float X[] = { -0.832f, -0.151f }; + int incX = -1; + float A_expected[] = { 0.903025f, 0.0f }; + cblas_cher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher(case 1413) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher(case 1413) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = 0.1; + double A[] = { 0.257, 0.326 }; + double X[] = { 0.319, -0.009 }; + int incX = -1; + double A_expected[] = { 0.2671842, 0.0 }; + cblas_zher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher(case 1414) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher(case 1414) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = 0.1; + double A[] = { 0.257, 0.326 }; + double X[] = { 0.319, -0.009 }; + int incX = -1; + double A_expected[] = { 0.2671842, 0.0 }; + cblas_zher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher(case 1415) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher(case 1415) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = 0.1; + double A[] = { 0.257, 0.326 }; + double X[] = { 0.319, -0.009 }; + int incX = -1; + double A_expected[] = { 0.2671842, 0.0 }; + cblas_zher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher(case 1416) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher(case 1416) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = 0.1; + double A[] = { 0.257, 0.326 }; + double X[] = { 0.319, -0.009 }; + int incX = -1; + double A_expected[] = { 0.2671842, 0.0 }; + cblas_zher(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher(case 1417) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher(case 1417) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_her2.c b/software/gsl-1.15/cblas/test_her2.c new file mode 100644 index 000000000..b1a0fae9f --- /dev/null +++ b/software/gsl-1.15/cblas/test_her2.c @@ -0,0 +1,195 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_her2 (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.821f, 0.954f }; + float X[] = { 0.532f, 0.802f }; + int incX = -1; + float Y[] = { 0.016f, -0.334f }; + int incY = -1; + float A_expected[] = { -0.302288f, 0.0f }; + cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1450) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1450) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.821f, 0.954f }; + float X[] = { 0.532f, 0.802f }; + int incX = -1; + float Y[] = { 0.016f, -0.334f }; + int incY = -1; + float A_expected[] = { -0.302288f, 0.0f }; + cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1451) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1451) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.821f, 0.954f }; + float X[] = { 0.532f, 0.802f }; + int incX = -1; + float Y[] = { 0.016f, -0.334f }; + int incY = -1; + float A_expected[] = { -0.302288f, 0.0f }; + cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1452) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1452) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.821f, 0.954f }; + float X[] = { 0.532f, 0.802f }; + int incX = -1; + float Y[] = { 0.016f, -0.334f }; + int incY = -1; + float A_expected[] = { -0.302288f, 0.0f }; + cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1453) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1453) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double A[] = { -0.334, 0.286 }; + double X[] = { -0.14, -0.135 }; + int incX = -1; + double Y[] = { 0.455, 0.358 }; + int incY = -1; + double A_expected[] = { -0.264521, 0.0 }; + cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1454) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1454) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double A[] = { -0.334, 0.286 }; + double X[] = { -0.14, -0.135 }; + int incX = -1; + double Y[] = { 0.455, 0.358 }; + int incY = -1; + double A_expected[] = { -0.264521, 0.0 }; + cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1455) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1455) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double A[] = { -0.334, 0.286 }; + double X[] = { -0.14, -0.135 }; + int incX = -1; + double Y[] = { 0.455, 0.358 }; + int incY = -1; + double A_expected[] = { -0.264521, 0.0 }; + cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1456) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1456) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha[2] = {-0.3, 0.1}; + double A[] = { -0.334, 0.286 }; + double X[] = { -0.14, -0.135 }; + int incX = -1; + double Y[] = { 0.455, 0.358 }; + int incY = -1; + double A_expected[] = { -0.264521, 0.0 }; + cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1457) real"); + gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1457) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_her2k.c b/software/gsl-1.15/cblas/test_her2k.c new file mode 100644 index 000000000..9c20962d8 --- /dev/null +++ b/software/gsl-1.15/cblas/test_her2k.c @@ -0,0 +1,427 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_her2k (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta = -0.3f; + float A[] = { 0.178f, 0.545f, -0.491f, 0.979f }; + int lda = 2; + float B[] = { -0.665f, -0.531f, -0.4f, 0.227f }; + int ldb = 2; + float C[] = { 0.115f, -0.193f }; + int ldc = 1; + float C_expected[] = { -0.056236f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1646) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1646) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta = -0.3f; + float A[] = { -0.808f, 0.447f, 0.145f, -0.226f }; + int lda = 2; + float B[] = { -0.413f, 0.904f, -0.585f, 0.717f }; + int ldb = 2; + float C[] = { -0.725f, -0.244f }; + int ldc = 1; + float C_expected[] = { -0.76435f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1647) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1647) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta = -0.3f; + float A[] = { 0.337f, -0.737f, -0.993f, 0.69f }; + int lda = 1; + float B[] = { -0.39f, -0.836f, -0.32f, 0.368f }; + int ldb = 1; + float C[] = { 0.844f, -0.763f }; + int ldc = 1; + float C_expected[] = { -2.36596f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1648) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1648) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta = -0.3f; + float A[] = { 0.386f, -0.465f, 0.719f, -0.378f }; + int lda = 1; + float B[] = { 0.099f, -0.879f, 0.864f, 0.141f }; + int ldb = 1; + float C[] = { -0.599f, -0.47f }; + int ldc = 1; + float C_expected[] = { -1.85003f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1649) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1649) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 113; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta = -1.0f; + float A[] = { 0.128f, 0.431f, -0.26f, 0.75f }; + int lda = 1; + float B[] = { 0.276f, 0.058f, 0.904f, -0.116f }; + int ldb = 1; + float C[] = { 0.914f, -0.262f }; + int ldc = 1; + float C_expected[] = { 0.604744f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1650) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1650) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 113; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta = -1.0f; + float A[] = { 0.72f, 0.783f, -0.737f, 0.375f }; + int lda = 1; + float B[] = { 0.531f, 0.167f, 0.203f, -0.221f }; + int ldb = 1; + float C[] = { 0.618f, 0.392f }; + int ldc = 1; + float C_expected[] = { -0.200438f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1651) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1651) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 113; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta = -1.0f; + float A[] = { -0.372f, -0.735f, -0.711f, 0.051f }; + int lda = 2; + float B[] = { 0.257f, 0.097f, 0.338f, -0.484f }; + int ldb = 2; + float C[] = { -0.142f, -0.197f }; + int ldc = 1; + float C_expected[] = { -0.817394f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1652) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1652) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 113; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta = -1.0f; + float A[] = { 0.1f, -0.878f, 0.28f, -0.381f }; + int lda = 2; + float B[] = { -0.208f, 0.309f, -0.276f, 0.123f }; + int ldb = 2; + float C[] = { 0.483f, -0.541f }; + int ldc = 1; + float C_expected[] = { -0.03812f, 0.0f }; + cblas_cher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cher2k(case 1653) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cher2k(case 1653) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta = 1; + double A[] = { 0.515, -0.034, 0.067, 0.66 }; + int lda = 2; + double B[] = { 0.408, -0.85, -0.945, -0.799 }; + int ldb = 2; + double C[] = { -0.918, -0.985 }; + int ldc = 1; + double C_expected[] = { -1.62127, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1654) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1654) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta = 1; + double A[] = { -0.009, 0.495, -0.008, -0.973 }; + int lda = 2; + double B[] = { -0.239, -0.373, -0.032, -0.539 }; + int ldb = 2; + double C[] = { 0.443, -0.245 }; + int ldc = 1; + double C_expected[] = { 1.127438, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1655) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1655) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta = 1; + double A[] = { 0.531, 0.721, -0.848, 0.826 }; + int lda = 1; + double B[] = { -0.711, -0.2, -0.92, -0.676 }; + int ldb = 1; + double C[] = { -0.447, 0.701 }; + int ldc = 1; + double C_expected[] = { -1.046914, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1656) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1656) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta = 1; + double A[] = { 0.68, 0.079, 0.837, -0.814 }; + int lda = 1; + double B[] = { -0.986, 0.024, 0.584, -0.248 }; + int ldb = 1; + double C[] = { 0.477, -0.551 }; + int ldc = 1; + double C_expected[] = { 0.521192, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1657) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1657) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 113; + int N = 1; + int K = 2; + double alpha[2] = {-1, 0}; + double beta = 0.1; + double A[] = { -0.63, 0.787, 0.426, -0.568 }; + int lda = 1; + double B[] = { -0.228, 0.302, 0.83, 0.023 }; + int ldb = 1; + double C[] = { 0.354, -0.85 }; + int ldc = 1; + double C_expected[] = { -1.40826, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1658) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1658) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 113; + int N = 1; + int K = 2; + double alpha[2] = {-1, 0}; + double beta = 0.1; + double A[] = { 0.224, -0.191, 0.46, 0.464 }; + int lda = 1; + double B[] = { -0.815, 0.634, 0.066, -0.873 }; + int ldb = 1; + double C[] = { -0.49, -0.606 }; + int ldc = 1; + double C_expected[] = { 1.307732, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1659) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1659) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 113; + int N = 1; + int K = 2; + double alpha[2] = {-1, 0}; + double beta = 0.1; + double A[] = { 0.943, 0.075, 0.15, -0.141 }; + int lda = 2; + double B[] = { -0.962, 0.422, -0.592, -0.789 }; + int ldb = 2; + double C[] = { 0.728, 0.601 }; + int ldc = 1; + double C_expected[] = { 1.778934, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1660) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1660) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 113; + int N = 1; + int K = 2; + double alpha[2] = {-1, 0}; + double beta = 0.1; + double A[] = { -0.93, -0.386, 0.565, 0.141 }; + int lda = 2; + double B[] = { -0.801, 0.022, 0.558, -0.932 }; + int ldb = 2; + double C[] = { 0.068, 0.501 }; + int ldc = 1; + double C_expected[] = { -1.833792, 0.0 }; + cblas_zher2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zher2k(case 1661) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zher2k(case 1661) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_herk.c b/software/gsl-1.15/cblas/test_herk.c new file mode 100644 index 000000000..e24555333 --- /dev/null +++ b/software/gsl-1.15/cblas/test_herk.c @@ -0,0 +1,395 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_herk (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha = 0.0f; + float beta = 0.1f; + float A[] = { -0.617f, 0.179f, -0.626f, 0.334f }; + int lda = 1; + float C[] = { 0.346f, -0.903f, 0.022f, -0.839f, -0.715f, 0.049f, -0.338f, 0.149f }; + int ldc = 2; + float C_expected[] = { 0.0346f, 0.0f, 0.0022f, -0.0839f, -0.715f, 0.049f, -0.0338f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1598) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1598) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha = 0.0f; + float beta = 0.1f; + float A[] = { -0.356f, -0.308f, 0.493f, -0.351f }; + int lda = 2; + float C[] = { -0.898f, -0.905f, 0.002f, -0.219f, 0.881f, 0.879f, 0.275f, -0.351f }; + int ldc = 2; + float C_expected[] = { -0.0898f, 0.0f, 0.002f, -0.219f, 0.0881f, 0.0879f, 0.0275f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1599) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1599) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 113; + int N = 2; + int K = 1; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.103f, -0.951f, -0.601f, -0.041f }; + int lda = 2; + float C[] = { -0.918f, -0.018f, 0.991f, -0.789f, -0.698f, -0.067f, 0.956f, -0.599f }; + int ldc = 2; + float C_expected[] = { -0.826499f, 0.0f, 1.00109f, -0.845733f, -0.698f, -0.067f, 0.992288f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1600) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1600) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 113; + int N = 2; + int K = 1; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.237f, 0.925f, -0.904f, -0.091f }; + int lda = 1; + float C[] = { -0.572f, 0.915f, 0.398f, 0.222f, 0.016f, 0.288f, -0.078f, -0.507f }; + int ldc = 2; + float C_expected[] = { -0.480821f, 0.0f, 0.398f, 0.222f, 0.0290073f, 0.373777f, 0.0045497f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1601) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1601) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha = -0.3f; + float beta = 0.0f; + float A[] = { 0.963f, -0.23f, -0.435f, 0.289f }; + int lda = 1; + float C[] = { 0.282f, -0.272f, -0.516f, -0.594f, -0.001f, 0.155f, -0.39f, -0.354f }; + int ldc = 2; + float C_expected[] = { -0.294081f, 0.0f, -0.516f, -0.594f, 0.145613f, -0.0534771f, -0.0818238f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1602) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1602) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha = -0.3f; + float beta = 0.0f; + float A[] = { 0.674f, 0.1f, -0.098f, 0.552f }; + int lda = 2; + float C[] = { 0.089f, -0.523f, -0.551f, 0.618f, 0.67f, 0.247f, 0.975f, -0.714f }; + int ldc = 2; + float C_expected[] = { -0.139283f, 0.0f, 0.0032556f, -0.114554f, 0.67f, 0.247f, -0.0942924f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1603) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1603) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 113; + int N = 2; + int K = 1; + float alpha = 1.0f; + float beta = 0.1f; + float A[] = { 0.033f, -0.864f, 0.168f, 0.524f }; + int lda = 2; + float C[] = { 0.788f, 0.016f, -0.436f, 0.749f, -0.89f, -0.87f, 0.421f, -0.203f }; + int ldc = 2; + float C_expected[] = { 0.826385f, 0.0f, -0.436f, 0.749f, -0.536192f, -0.249444f, 0.3449f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1604) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1604) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 113; + int N = 2; + int K = 1; + float alpha = 1.0f; + float beta = 0.1f; + float A[] = { 0.957f, -0.079f, 0.935f, 0.232f }; + int lda = 1; + float C[] = { -0.744f, -0.061f, 0.195f, -0.574f, 0.551f, 0.478f, -0.337f, 0.1f }; + int ldc = 2; + float C_expected[] = { 0.84769f, 0.0f, 0.895967f, -0.353289f, 0.551f, 0.478f, 0.894349f, 0.0f }; + cblas_cherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "cherk(case 1605) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "cherk(case 1605) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 1; + double beta = 1; + double A[] = { 0.934, 0.664, 0.426, 0.263 }; + int lda = 1; + double C[] = { 0.251, -0.97, 0.76, -0.349, 0.152, -0.899, -0.17, 0.707 }; + int ldc = 2; + double C_expected[] = { 1.564252, 0.0, 1.332516, -0.311778, 0.152, -0.899, 0.080645, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1606) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1606) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 1; + double beta = 1; + double A[] = { 0.16, 0.464, -0.623, 0.776 }; + int lda = 2; + double C[] = { 0.771, -0.449, 0.776, 0.112, -0.134, 0.317, 0.547, -0.551 }; + int ldc = 2; + double C_expected[] = { 1.011896, 0.0, 0.776, 0.112, 0.126384, -0.096232, 1.537305, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1607) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1607) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 113; + int N = 2; + int K = 1; + double alpha = 0.1; + double beta = 1; + double A[] = { 0.787, 0.057, -0.49, 0.47 }; + int lda = 2; + double C[] = { -0.758, 0.912, 0.992, -0.356, 0.584, 0.806, 0.965, 0.674 }; + int ldc = 2; + double C_expected[] = { -0.6957382, 0.0, 0.956116, -0.316218, 0.584, 0.806, 1.0111, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1608) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1608) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 113; + int N = 2; + int K = 1; + double alpha = 0.1; + double beta = 1; + double A[] = { 0.961, -0.384, 0.165, 0.395 }; + int lda = 1; + double C[] = { -0.186, 0.404, -0.873, 0.09, -0.451, -0.972, -0.203, -0.304 }; + int ldc = 2; + double C_expected[] = { -0.0789023, 0.0, -0.873, 0.09, -0.4503115, -0.9277045, -0.184675, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1609) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1609) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 0; + double beta = -0.3; + double A[] = { 0.04, 0.608, 0.21, -0.44 }; + int lda = 1; + double C[] = { 0.285, -0.943, 0.581, -0.56, 0.112, 0.529, 0.16, -0.913 }; + int ldc = 2; + double C_expected[] = { -0.0855, 0.0, 0.581, -0.56, -0.0336, -0.1587, -0.048, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1610) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1610) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 0; + double beta = -0.3; + double A[] = { -0.984, -0.398, -0.379, 0.919 }; + int lda = 2; + double C[] = { -0.44, -0.087, 0.156, -0.945, -0.943, -0.355, 0.577, 0.053 }; + int ldc = 2; + double C_expected[] = { 0.132, 0.0, -0.0468, 0.2835, -0.943, -0.355, -0.1731, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1611) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1611) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 113; + int N = 2; + int K = 1; + double alpha = 1; + double beta = -1; + double A[] = { 0.269, -0.428, -0.029, 0.964 }; + int lda = 2; + double C[] = { 0.473, -0.932, -0.689, -0.072, -0.952, -0.862, 0.001, 0.282 }; + int ldc = 2; + double C_expected[] = { -0.217455, 0.0, -0.689, -0.072, 0.531607, 0.615096, 0.929137, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1612) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1612) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 113; + int N = 2; + int K = 1; + double alpha = 1; + double beta = -1; + double A[] = { -0.303, -0.037, -0.411, -0.243 }; + int lda = 1; + double C[] = { 0.652, -0.227, -0.849, 0.87, -0.051, -0.535, 0.418, -0.681 }; + int ldc = 2; + double C_expected[] = { -0.558822, 0.0, 0.982524, -0.928422, -0.051, -0.535, -0.19003, 0.0 }; + cblas_zherk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zherk(case 1613) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zherk(case 1613) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hpmv.c b/software/gsl-1.15/cblas/test_hpmv.c new file mode 100644 index 000000000..a043aadd5 --- /dev/null +++ b/software/gsl-1.15/cblas/test_hpmv.c @@ -0,0 +1,379 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hpmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0627557f, -0.839323f, -0.0877262f, -0.169208f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1118) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1118) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0627557f, -0.839323f, -0.0877262f, -0.169208f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1119) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1119) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0037603f, -0.816761f, -0.0392456f, -0.121154f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1120) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1120) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0037603f, -0.816761f, -0.0392456f, -0.121154f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1121) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1121) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0627557f, -0.839323f, -0.0877262f, -0.169208f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1122) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1122) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0627557f, -0.839323f, -0.0877262f, -0.169208f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1123) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1123) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0037603f, -0.816761f, -0.0392456f, -0.121154f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1124) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1124) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 1.0f}; + int N = 2; + float A[] = { 0.339f, -0.102f, 0.908f, 0.097f, -0.808f, 0.236f }; + float X[] = { 0.993f, -0.502f, -0.653f, 0.796f }; + int incX = -1; + float Y[] = { -0.35f, 0.339f, -0.269f, -0.122f }; + int incY = -1; + float y_expected[] = { -0.0037603f, -0.816761f, -0.0392456f, -0.121154f }; + cblas_chpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], flteps, "chpmv(case 1125) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], flteps, "chpmv(case 1125) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.745218, -0.60699, -0.37301, -0.983688 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1126) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1126) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.745218, -0.60699, -0.37301, -0.983688 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1127) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1127) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.646956, -0.542012, -0.282168, -0.912668 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1128) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1128) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.646956, -0.542012, -0.282168, -0.912668 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1129) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1129) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.745218, -0.60699, -0.37301, -0.983688 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1130) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1130) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.745218, -0.60699, -0.37301, -0.983688 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1131) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1131) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.646956, -0.542012, -0.282168, -0.912668 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1132) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1132) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + int N = 2; + double A[] = { 0.543, -0.737, 0.281, -0.053, -0.098, -0.826 }; + double X[] = { 0.67, -0.857, -0.613, -0.927 }; + int incX = -1; + double Y[] = { -0.398, -0.934, -0.204, 0.183 }; + int incY = -1; + double y_expected[] = { 0.646956, -0.542012, -0.282168, -0.912668 }; + cblas_zhpmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[2*i], y_expected[2*i], dbleps, "zhpmv(case 1133) real"); + gsl_test_rel(Y[2*i+1], y_expected[2*i+1], dbleps, "zhpmv(case 1133) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hpr.c b/software/gsl-1.15/cblas/test_hpr.c new file mode 100644 index 000000000..4682b9488 --- /dev/null +++ b/software/gsl-1.15/cblas/test_hpr.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hpr (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 2; + float alpha = 0.1f; + float Ap[] = { -0.273f, -0.499f, -0.305f, -0.277f, 0.238f, -0.369f }; + float X[] = { 0.638f, -0.905f, 0.224f, 0.182f }; + int incX = -1; + float Ap_expected[] = { -0.26467f, 0.0f, -0.30718f, -0.245116f, 0.360607f, 0.0f }; + cblas_chpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr(case 1418) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr(case 1418) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + float alpha = 0.1f; + float Ap[] = { -0.273f, -0.499f, -0.305f, -0.277f, 0.238f, -0.369f }; + float X[] = { 0.638f, -0.905f, 0.224f, 0.182f }; + int incX = -1; + float Ap_expected[] = { -0.26467f, 0.0f, -0.30718f, -0.308884f, 0.360607f, 0.0f }; + cblas_chpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr(case 1419) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr(case 1419) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + float alpha = 0.1f; + float Ap[] = { -0.273f, -0.499f, -0.305f, -0.277f, 0.238f, -0.369f }; + float X[] = { 0.638f, -0.905f, 0.224f, 0.182f }; + int incX = -1; + float Ap_expected[] = { -0.26467f, 0.0f, -0.30718f, -0.245116f, 0.360607f, 0.0f }; + cblas_chpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr(case 1420) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr(case 1420) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + float alpha = 0.1f; + float Ap[] = { -0.273f, -0.499f, -0.305f, -0.277f, 0.238f, -0.369f }; + float X[] = { 0.638f, -0.905f, 0.224f, 0.182f }; + int incX = -1; + float Ap_expected[] = { -0.26467f, 0.0f, -0.30718f, -0.308884f, 0.360607f, 0.0f }; + cblas_chpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr(case 1421) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr(case 1421) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 2; + double alpha = 1; + double Ap[] = { 0.265, 0.362, -0.855, 0.035, 0.136, 0.133 }; + double X[] = { -0.278, -0.686, -0.736, -0.918 }; + int incX = -1; + double Ap_expected[] = { 1.64942, 0.0, -0.020644, -0.214692, 0.68388, 0.0 }; + cblas_zhpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr(case 1422) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr(case 1422) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + double alpha = 1; + double Ap[] = { 0.265, 0.362, -0.855, 0.035, 0.136, 0.133 }; + double X[] = { -0.278, -0.686, -0.736, -0.918 }; + int incX = -1; + double Ap_expected[] = { 1.64942, 0.0, -0.020644, 0.284692, 0.68388, 0.0 }; + cblas_zhpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr(case 1423) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr(case 1423) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + double alpha = 1; + double Ap[] = { 0.265, 0.362, -0.855, 0.035, 0.136, 0.133 }; + double X[] = { -0.278, -0.686, -0.736, -0.918 }; + int incX = -1; + double Ap_expected[] = { 1.64942, 0.0, -0.020644, -0.214692, 0.68388, 0.0 }; + cblas_zhpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr(case 1424) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr(case 1424) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + double alpha = 1; + double Ap[] = { 0.265, 0.362, -0.855, 0.035, 0.136, 0.133 }; + double X[] = { -0.278, -0.686, -0.736, -0.918 }; + int incX = -1; + double Ap_expected[] = { 1.64942, 0.0, -0.020644, 0.284692, 0.68388, 0.0 }; + cblas_zhpr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr(case 1425) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr(case 1425) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_hpr2.c b/software/gsl-1.15/cblas/test_hpr2.c new file mode 100644 index 000000000..7fb7dee72 --- /dev/null +++ b/software/gsl-1.15/cblas/test_hpr2.c @@ -0,0 +1,187 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_hpr2 (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 1; + float alpha[2] = {-1.0f, 0.0f}; + float Ap[] = { 0.159f, -0.13f }; + float X[] = { 0.854f, 0.851f }; + int incX = -1; + float Y[] = { 0.526f, -0.267f }; + int incY = -1; + float Ap_expected[] = { -0.284974f, 0.0f }; + cblas_chpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr2(case 1458) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr2(case 1458) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + float alpha[2] = {-1.0f, 0.0f}; + float Ap[] = { 0.159f, -0.13f }; + float X[] = { 0.854f, 0.851f }; + int incX = -1; + float Y[] = { 0.526f, -0.267f }; + int incY = -1; + float Ap_expected[] = { -0.284974f, 0.0f }; + cblas_chpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr2(case 1459) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr2(case 1459) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + float alpha[2] = {-1.0f, 0.0f}; + float Ap[] = { 0.159f, -0.13f }; + float X[] = { 0.854f, 0.851f }; + int incX = -1; + float Y[] = { 0.526f, -0.267f }; + int incY = -1; + float Ap_expected[] = { -0.284974f, 0.0f }; + cblas_chpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr2(case 1460) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr2(case 1460) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + float alpha[2] = {-1.0f, 0.0f}; + float Ap[] = { 0.159f, -0.13f }; + float X[] = { 0.854f, 0.851f }; + int incX = -1; + float Y[] = { 0.526f, -0.267f }; + int incY = -1; + float Ap_expected[] = { -0.284974f, 0.0f }; + cblas_chpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], flteps, "chpr2(case 1461) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], flteps, "chpr2(case 1461) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 1; + double alpha[2] = {-0.3, 0.1}; + double Ap[] = { 0.772, 0.997 }; + double X[] = { -0.173, -0.839 }; + int incX = -1; + double Y[] = { 0.941, -0.422 }; + int incY = -1; + double Ap_expected[] = { 0.829742, 0.0 }; + cblas_zhpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr2(case 1462) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr2(case 1462) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + double alpha[2] = {-0.3, 0.1}; + double Ap[] = { 0.772, 0.997 }; + double X[] = { -0.173, -0.839 }; + int incX = -1; + double Y[] = { 0.941, -0.422 }; + int incY = -1; + double Ap_expected[] = { 0.829742, 0.0 }; + cblas_zhpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr2(case 1463) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr2(case 1463) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + double alpha[2] = {-0.3, 0.1}; + double Ap[] = { 0.772, 0.997 }; + double X[] = { -0.173, -0.839 }; + int incX = -1; + double Y[] = { 0.941, -0.422 }; + int incY = -1; + double Ap_expected[] = { 0.829742, 0.0 }; + cblas_zhpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr2(case 1464) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr2(case 1464) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + double alpha[2] = {-0.3, 0.1}; + double Ap[] = { 0.772, 0.997 }; + double X[] = { -0.173, -0.839 }; + int incX = -1; + double Y[] = { 0.941, -0.422 }; + int incY = -1; + double Ap_expected[] = { 0.829742, 0.0 }; + cblas_zhpr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Ap[2*i], Ap_expected[2*i], dbleps, "zhpr2(case 1465) real"); + gsl_test_rel(Ap[2*i+1], Ap_expected[2*i+1], dbleps, "zhpr2(case 1465) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_nrm2.c b/software/gsl-1.15/cblas/test_nrm2.c new file mode 100644 index 000000000..5c777f6b3 --- /dev/null +++ b/software/gsl-1.15/cblas/test_nrm2.c @@ -0,0 +1,143 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_nrm2 (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float X[] = { 0.317f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_snrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "snrm2(case 28)"); + }; + + + { + int N = 1; + double X[] = { 0.071 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dnrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dnrm2(case 29)"); + }; + + + { + int N = 1; + float X[] = { 0.776f, 0.983f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_scnrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "scnrm2(case 30)"); + }; + + + { + int N = 1; + double X[] = { 0.549, -0.354 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dznrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dznrm2(case 31)"); + }; + + + { + int N = 2; + float X[] = { 0.14f, -0.632f }; + int incX = 1; + float expected = 0.647320631527f; + float f; + f = cblas_snrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "snrm2(case 32)"); + }; + + + { + int N = 2; + double X[] = { 0.696, -0.804 }; + int incX = 1; + double expected = 1.06340584915; + double f; + f = cblas_dnrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dnrm2(case 33)"); + }; + + + { + int N = 2; + float X[] = { 0.281f, -0.063f, 0.367f, 0.232f }; + int incX = 1; + float expected = 0.521001919382f; + float f; + f = cblas_scnrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "scnrm2(case 34)"); + }; + + + { + int N = 2; + double X[] = { -0.359, -0.76, -0.906, -0.108 }; + int incX = 1; + double expected = 1.24055672986; + double f; + f = cblas_dznrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dznrm2(case 35)"); + }; + + + { + int N = 2; + float X[] = { 0.918f, -0.126f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_snrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "snrm2(case 36)"); + }; + + + { + int N = 2; + double X[] = { 0.217, -0.588 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dnrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dnrm2(case 37)"); + }; + + + { + int N = 2; + float X[] = { 0.31f, 0.059f, -0.442f, 0.987f }; + int incX = -1; + float expected = 0.0f; + float f; + f = cblas_scnrm2(N, X, incX); + gsl_test_rel(f, expected, flteps, "scnrm2(case 38)"); + }; + + + { + int N = 2; + double X[] = { 0.609, 0.615, -0.143, -0.957 }; + int incX = -1; + double expected = 0; + double f; + f = cblas_dznrm2(N, X, incX); + gsl_test_rel(f, expected, dbleps, "dznrm2(case 39)"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_rot.c b/software/gsl-1.15/cblas/test_rot.c new file mode 100644 index 000000000..d2d6ed330 --- /dev/null +++ b/software/gsl-1.15/cblas/test_rot.c @@ -0,0 +1,635 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_rot (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float c = 0.0f; + float s = 0.0f; + float X[] = { -0.314f }; + int incX = 1; + float Y[] = { -0.406f }; + int incY = -1; + float x_expected[] = { 0.0f }; + float y_expected[] = { 0.0f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 558)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 559)"); + } + }; + }; + + + { + int N = 1; + float c = 0.866025403784f; + float s = 0.5f; + float X[] = { -0.314f }; + int incX = 1; + float Y[] = { -0.406f }; + int incY = -1; + float x_expected[] = { -0.474932f }; + float y_expected[] = { -0.194606f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 560)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 561)"); + } + }; + }; + + + { + int N = 1; + float c = 0.0f; + float s = -1.0f; + float X[] = { -0.314f }; + int incX = 1; + float Y[] = { -0.406f }; + int incY = -1; + float x_expected[] = { 0.406f }; + float y_expected[] = { -0.314f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 562)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 563)"); + } + }; + }; + + + { + int N = 1; + float c = -1.0f; + float s = 0.0f; + float X[] = { -0.314f }; + int incX = 1; + float Y[] = { -0.406f }; + int incY = -1; + float x_expected[] = { 0.314f }; + float y_expected[] = { 0.406f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 564)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 565)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = 0; + double X[] = { -0.493 }; + int incX = 1; + double Y[] = { -0.014 }; + int incY = -1; + double x_expected[] = { 0.0 }; + double y_expected[] = { 0.0 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 566)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 567)"); + } + }; + }; + + + { + int N = 1; + double c = 0.866025403784; + double s = 0.5; + double X[] = { -0.493 }; + int incX = 1; + double Y[] = { -0.014 }; + int incY = -1; + double x_expected[] = { -0.433950524066 }; + double y_expected[] = { 0.234375644347 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 568)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 569)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = -1; + double X[] = { -0.493 }; + int incX = 1; + double Y[] = { -0.014 }; + int incY = -1; + double x_expected[] = { 0.014 }; + double y_expected[] = { -0.493 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 570)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 571)"); + } + }; + }; + + + { + int N = 1; + double c = -1; + double s = 0; + double X[] = { -0.493 }; + int incX = 1; + double Y[] = { -0.014 }; + int incY = -1; + double x_expected[] = { 0.493 }; + double y_expected[] = { 0.014 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 572)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 573)"); + } + }; + }; + + + { + int N = 1; + float c = 0.0f; + float s = 0.0f; + float X[] = { -0.808f }; + int incX = -1; + float Y[] = { -0.511f }; + int incY = 1; + float x_expected[] = { 0.0f }; + float y_expected[] = { 0.0f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 574)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 575)"); + } + }; + }; + + + { + int N = 1; + float c = 0.866025403784f; + float s = 0.5f; + float X[] = { -0.808f }; + int incX = -1; + float Y[] = { -0.511f }; + int incY = 1; + float x_expected[] = { -0.955249f }; + float y_expected[] = { -0.038539f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 576)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 577)"); + } + }; + }; + + + { + int N = 1; + float c = 0.0f; + float s = -1.0f; + float X[] = { -0.808f }; + int incX = -1; + float Y[] = { -0.511f }; + int incY = 1; + float x_expected[] = { 0.511f }; + float y_expected[] = { -0.808f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 578)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 579)"); + } + }; + }; + + + { + int N = 1; + float c = -1.0f; + float s = 0.0f; + float X[] = { -0.808f }; + int incX = -1; + float Y[] = { -0.511f }; + int incY = 1; + float x_expected[] = { 0.808f }; + float y_expected[] = { 0.511f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 580)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 581)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = 0; + double X[] = { -0.176 }; + int incX = -1; + double Y[] = { -0.165 }; + int incY = 1; + double x_expected[] = { 0.0 }; + double y_expected[] = { 0.0 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 582)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 583)"); + } + }; + }; + + + { + int N = 1; + double c = 0.866025403784; + double s = 0.5; + double X[] = { -0.176 }; + int incX = -1; + double Y[] = { -0.165 }; + int incY = 1; + double x_expected[] = { -0.234920471066 }; + double y_expected[] = { -0.0548941916244 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 584)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 585)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = -1; + double X[] = { -0.176 }; + int incX = -1; + double Y[] = { -0.165 }; + int incY = 1; + double x_expected[] = { 0.165 }; + double y_expected[] = { -0.176 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 586)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 587)"); + } + }; + }; + + + { + int N = 1; + double c = -1; + double s = 0; + double X[] = { -0.176 }; + int incX = -1; + double Y[] = { -0.165 }; + int incY = 1; + double x_expected[] = { 0.176 }; + double y_expected[] = { 0.165 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 588)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 589)"); + } + }; + }; + + + { + int N = 1; + float c = 0.0f; + float s = 0.0f; + float X[] = { -0.201f }; + int incX = -1; + float Y[] = { 0.087f }; + int incY = -1; + float x_expected[] = { 0.0f }; + float y_expected[] = { 0.0f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 590)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 591)"); + } + }; + }; + + + { + int N = 1; + float c = 0.866025403784f; + float s = 0.5f; + float X[] = { -0.201f }; + int incX = -1; + float Y[] = { 0.087f }; + int incY = -1; + float x_expected[] = { -0.130571f }; + float y_expected[] = { 0.175844f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 592)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 593)"); + } + }; + }; + + + { + int N = 1; + float c = 0.0f; + float s = -1.0f; + float X[] = { -0.201f }; + int incX = -1; + float Y[] = { 0.087f }; + int incY = -1; + float x_expected[] = { -0.087f }; + float y_expected[] = { -0.201f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 594)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 595)"); + } + }; + }; + + + { + int N = 1; + float c = -1.0f; + float s = 0.0f; + float X[] = { -0.201f }; + int incX = -1; + float Y[] = { 0.087f }; + int incY = -1; + float x_expected[] = { 0.201f }; + float y_expected[] = { -0.087f }; + cblas_srot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srot(case 596)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srot(case 597)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = 0; + double X[] = { -0.464 }; + int incX = -1; + double Y[] = { 0.7 }; + int incY = -1; + double x_expected[] = { 0.0 }; + double y_expected[] = { 0.0 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 598)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 599)"); + } + }; + }; + + + { + int N = 1; + double c = 0.866025403784; + double s = 0.5; + double X[] = { -0.464 }; + int incX = -1; + double Y[] = { 0.7 }; + int incY = -1; + double x_expected[] = { -0.051835787356 }; + double y_expected[] = { 0.838217782649 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 600)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 601)"); + } + }; + }; + + + { + int N = 1; + double c = 0; + double s = -1; + double X[] = { -0.464 }; + int incX = -1; + double Y[] = { 0.7 }; + int incY = -1; + double x_expected[] = { -0.7 }; + double y_expected[] = { -0.464 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 602)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 603)"); + } + }; + }; + + + { + int N = 1; + double c = -1; + double s = 0; + double X[] = { -0.464 }; + int incX = -1; + double Y[] = { 0.7 }; + int incY = -1; + double x_expected[] = { 0.464 }; + double y_expected[] = { -0.7 }; + cblas_drot(N, X, incX, Y, incY, c, s); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drot(case 604)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drot(case 605)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_rotg.c b/software/gsl-1.15/cblas/test_rotg.c new file mode 100644 index 000000000..a5a84d3cd --- /dev/null +++ b/software/gsl-1.15/cblas/test_rotg.c @@ -0,0 +1,1677 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_rotg (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + float a = -1.5f; + float b = -1.5f; + float c; + float s; + float r_expected = -2.12132034356f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 166)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 167)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 168)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 169)"); + }; + + + { + float a = -1.5f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.80277563773f; + float z_expected = 0.554700196225f; + float c_expected = 0.832050294338f; + float s_expected = 0.554700196225f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 170)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 171)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 172)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 173)"); + }; + + + { + float a = -1.5f; + float b = -0.1f; + float c; + float s; + float r_expected = -1.50332963784f; + float z_expected = 0.0665190105238f; + float c_expected = 0.997785157857f; + float s_expected = 0.0665190105238f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 174)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 175)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 176)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 177)"); + }; + + + { + float a = -1.5f; + float b = 0.0f; + float c; + float s; + float r_expected = -1.5f; + float z_expected = -0.0f; + float c_expected = 1.0f; + float s_expected = -0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 178)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 179)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 180)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 181)"); + }; + + + { + float a = -1.5f; + float b = 0.1f; + float c; + float s; + float r_expected = -1.50332963784f; + float z_expected = -0.0665190105238f; + float c_expected = 0.997785157857f; + float s_expected = -0.0665190105238f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 182)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 183)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 184)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 185)"); + }; + + + { + float a = -1.5f; + float b = 1.0f; + float c; + float s; + float r_expected = -1.80277563773f; + float z_expected = -0.554700196225f; + float c_expected = 0.832050294338f; + float s_expected = -0.554700196225f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 186)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 187)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 188)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 189)"); + }; + + + { + float a = -1.5f; + float b = 1.5f; + float c; + float s; + float r_expected = 2.12132034356f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 190)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 191)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 192)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 193)"); + }; + + + { + float a = -1.0f; + float b = -1.5f; + float c; + float s; + float r_expected = -1.80277563773f; + float z_expected = 1.80277563773f; + float c_expected = 0.554700196225f; + float s_expected = 0.832050294338f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 194)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 195)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 196)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 197)"); + }; + + + { + float a = -1.0f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.41421356237f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 198)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 199)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 200)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 201)"); + }; + + + { + float a = -1.0f; + float b = -0.1f; + float c; + float s; + float r_expected = -1.00498756211f; + float z_expected = 0.099503719021f; + float c_expected = 0.99503719021f; + float s_expected = 0.099503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 202)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 203)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 204)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 205)"); + }; + + + { + float a = -1.0f; + float b = 0.0f; + float c; + float s; + float r_expected = -1.0f; + float z_expected = -0.0f; + float c_expected = 1.0f; + float s_expected = -0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 206)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 207)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 208)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 209)"); + }; + + + { + float a = -1.0f; + float b = 0.1f; + float c; + float s; + float r_expected = -1.00498756211f; + float z_expected = -0.099503719021f; + float c_expected = 0.99503719021f; + float s_expected = -0.099503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 210)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 211)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 212)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 213)"); + }; + + + { + float a = -1.0f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.41421356237f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 214)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 215)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 216)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 217)"); + }; + + + { + float a = -1.0f; + float b = 1.5f; + float c; + float s; + float r_expected = 1.80277563773f; + float z_expected = -1.80277563773f; + float c_expected = -0.554700196225f; + float s_expected = 0.832050294338f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 218)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 219)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 220)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 221)"); + }; + + + { + float a = -0.1f; + float b = -1.5f; + float c; + float s; + float r_expected = -1.50332963784f; + float z_expected = 15.0332963784f; + float c_expected = 0.0665190105238f; + float s_expected = 0.997785157857f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 222)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 223)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 224)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 225)"); + }; + + + { + float a = -0.1f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.00498756211f; + float z_expected = 10.0498756211f; + float c_expected = 0.099503719021f; + float s_expected = 0.99503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 226)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 227)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 228)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 229)"); + }; + + + { + float a = -0.1f; + float b = -0.1f; + float c; + float s; + float r_expected = -0.141421356237f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 230)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 231)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 232)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 233)"); + }; + + + { + float a = -0.1f; + float b = 0.0f; + float c; + float s; + float r_expected = -0.1f; + float z_expected = -0.0f; + float c_expected = 1.0f; + float s_expected = -0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 234)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 235)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 236)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 237)"); + }; + + + { + float a = -0.1f; + float b = 0.1f; + float c; + float s; + float r_expected = 0.141421356237f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 238)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 239)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 240)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 241)"); + }; + + + { + float a = -0.1f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.00498756211f; + float z_expected = -10.0498756211f; + float c_expected = -0.099503719021f; + float s_expected = 0.99503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 242)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 243)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 244)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 245)"); + }; + + + { + float a = -0.1f; + float b = 1.5f; + float c; + float s; + float r_expected = 1.50332963784f; + float z_expected = -15.0332963784f; + float c_expected = -0.0665190105238f; + float s_expected = 0.997785157857f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 246)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 247)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 248)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 249)"); + }; + + + { + float a = 0.0f; + float b = -1.5f; + float c; + float s; + float r_expected = -1.5f; + float z_expected = 1.0f; + float c_expected = -0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 250)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 251)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 252)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 253)"); + }; + + + { + float a = 0.0f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.0f; + float z_expected = 1.0f; + float c_expected = -0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 254)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 255)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 256)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 257)"); + }; + + + { + float a = 0.0f; + float b = -0.1f; + float c; + float s; + float r_expected = -0.1f; + float z_expected = 1.0f; + float c_expected = -0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 258)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 259)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 260)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 261)"); + }; + + + { + float a = 0.0f; + float b = 0.0f; + float c; + float s; + float r_expected = 0.0f; + float z_expected = 0.0f; + float c_expected = 1.0f; + float s_expected = 0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 262)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 263)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 264)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 265)"); + }; + + + { + float a = 0.0f; + float b = 0.1f; + float c; + float s; + float r_expected = 0.1f; + float z_expected = 1.0f; + float c_expected = 0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 266)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 267)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 268)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 269)"); + }; + + + { + float a = 0.0f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.0f; + float z_expected = 1.0f; + float c_expected = 0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 270)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 271)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 272)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 273)"); + }; + + + { + float a = 0.0f; + float b = 1.5f; + float c; + float s; + float r_expected = 1.5f; + float z_expected = 1.0f; + float c_expected = 0.0f; + float s_expected = 1.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 274)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 275)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 276)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 277)"); + }; + + + { + float a = 0.1f; + float b = -1.5f; + float c; + float s; + float r_expected = -1.50332963784f; + float z_expected = -15.0332963784f; + float c_expected = -0.0665190105238f; + float s_expected = 0.997785157857f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 278)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 279)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 280)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 281)"); + }; + + + { + float a = 0.1f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.00498756211f; + float z_expected = -10.0498756211f; + float c_expected = -0.099503719021f; + float s_expected = 0.99503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 282)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 283)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 284)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 285)"); + }; + + + { + float a = 0.1f; + float b = -0.1f; + float c; + float s; + float r_expected = -0.141421356237f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 286)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 287)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 288)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 289)"); + }; + + + { + float a = 0.1f; + float b = 0.0f; + float c; + float s; + float r_expected = 0.1f; + float z_expected = 0.0f; + float c_expected = 1.0f; + float s_expected = 0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 290)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 291)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 292)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 293)"); + }; + + + { + float a = 0.1f; + float b = 0.1f; + float c; + float s; + float r_expected = 0.141421356237f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 294)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 295)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 296)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 297)"); + }; + + + { + float a = 0.1f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.00498756211f; + float z_expected = 10.0498756211f; + float c_expected = 0.099503719021f; + float s_expected = 0.99503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 298)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 299)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 300)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 301)"); + }; + + + { + float a = 0.1f; + float b = 1.5f; + float c; + float s; + float r_expected = 1.50332963784f; + float z_expected = 15.0332963784f; + float c_expected = 0.0665190105238f; + float s_expected = 0.997785157857f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 302)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 303)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 304)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 305)"); + }; + + + { + float a = 1.0f; + float b = -1.5f; + float c; + float s; + float r_expected = -1.80277563773f; + float z_expected = -1.80277563773f; + float c_expected = -0.554700196225f; + float s_expected = 0.832050294338f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 306)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 307)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 308)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 309)"); + }; + + + { + float a = 1.0f; + float b = -1.0f; + float c; + float s; + float r_expected = -1.41421356237f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 310)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 311)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 312)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 313)"); + }; + + + { + float a = 1.0f; + float b = -0.1f; + float c; + float s; + float r_expected = 1.00498756211f; + float z_expected = -0.099503719021f; + float c_expected = 0.99503719021f; + float s_expected = -0.099503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 314)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 315)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 316)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 317)"); + }; + + + { + float a = 1.0f; + float b = 0.0f; + float c; + float s; + float r_expected = 1.0f; + float z_expected = 0.0f; + float c_expected = 1.0f; + float s_expected = 0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 318)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 319)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 320)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 321)"); + }; + + + { + float a = 1.0f; + float b = 0.1f; + float c; + float s; + float r_expected = 1.00498756211f; + float z_expected = 0.099503719021f; + float c_expected = 0.99503719021f; + float s_expected = 0.099503719021f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 322)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 323)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 324)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 325)"); + }; + + + { + float a = 1.0f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.41421356237f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 326)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 327)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 328)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 329)"); + }; + + + { + float a = 1.0f; + float b = 1.5f; + float c; + float s; + float r_expected = 1.80277563773f; + float z_expected = 1.80277563773f; + float c_expected = 0.554700196225f; + float s_expected = 0.832050294338f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 330)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 331)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 332)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 333)"); + }; + + + { + float a = 1.5f; + float b = -1.5f; + float c; + float s; + float r_expected = -2.12132034356f; + float z_expected = -1.41421356237f; + float c_expected = -0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 334)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 335)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 336)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 337)"); + }; + + + { + float a = 1.5f; + float b = -1.0f; + float c; + float s; + float r_expected = 1.80277563773f; + float z_expected = -0.554700196225f; + float c_expected = 0.832050294338f; + float s_expected = -0.554700196225f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 338)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 339)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 340)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 341)"); + }; + + + { + float a = 1.5f; + float b = -0.1f; + float c; + float s; + float r_expected = 1.50332963784f; + float z_expected = -0.0665190105238f; + float c_expected = 0.997785157857f; + float s_expected = -0.0665190105238f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 342)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 343)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 344)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 345)"); + }; + + + { + float a = 1.5f; + float b = 0.0f; + float c; + float s; + float r_expected = 1.5f; + float z_expected = 0.0f; + float c_expected = 1.0f; + float s_expected = 0.0f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 346)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 347)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 348)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 349)"); + }; + + + { + float a = 1.5f; + float b = 0.1f; + float c; + float s; + float r_expected = 1.50332963784f; + float z_expected = 0.0665190105238f; + float c_expected = 0.997785157857f; + float s_expected = 0.0665190105238f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 350)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 351)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 352)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 353)"); + }; + + + { + float a = 1.5f; + float b = 1.0f; + float c; + float s; + float r_expected = 1.80277563773f; + float z_expected = 0.554700196225f; + float c_expected = 0.832050294338f; + float s_expected = 0.554700196225f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 354)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 355)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 356)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 357)"); + }; + + + { + float a = 1.5f; + float b = 1.5f; + float c; + float s; + float r_expected = 2.12132034356f; + float z_expected = 1.41421356237f; + float c_expected = 0.707106781187f; + float s_expected = 0.707106781187f; + cblas_srotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, flteps, "srotg(case 358)"); + gsl_test_rel(b, z_expected, flteps, "srotg(case 359)"); + gsl_test_rel(c, c_expected, flteps, "srotg(case 360)"); + gsl_test_rel(s, s_expected, flteps, "srotg(case 361)"); + }; + + + { + double a = -1.5; + double b = -1.5; + double c; + double s; + double r_expected = -2.12132034356; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 362)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 363)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 364)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 365)"); + }; + + + { + double a = -1.5; + double b = -1; + double c; + double s; + double r_expected = -1.80277563773; + double z_expected = 0.554700196225; + double c_expected = 0.832050294338; + double s_expected = 0.554700196225; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 366)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 367)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 368)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 369)"); + }; + + + { + double a = -1.5; + double b = -0.1; + double c; + double s; + double r_expected = -1.50332963784; + double z_expected = 0.0665190105238; + double c_expected = 0.997785157857; + double s_expected = 0.0665190105238; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 370)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 371)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 372)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 373)"); + }; + + + { + double a = -1.5; + double b = 0; + double c; + double s; + double r_expected = -1.5; + double z_expected = -0; + double c_expected = 1; + double s_expected = -0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 374)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 375)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 376)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 377)"); + }; + + + { + double a = -1.5; + double b = 0.1; + double c; + double s; + double r_expected = -1.50332963784; + double z_expected = -0.0665190105238; + double c_expected = 0.997785157857; + double s_expected = -0.0665190105238; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 378)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 379)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 380)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 381)"); + }; + + + { + double a = -1.5; + double b = 1; + double c; + double s; + double r_expected = -1.80277563773; + double z_expected = -0.554700196225; + double c_expected = 0.832050294338; + double s_expected = -0.554700196225; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 382)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 383)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 384)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 385)"); + }; + + + { + double a = -1.5; + double b = 1.5; + double c; + double s; + double r_expected = 2.12132034356; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 386)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 387)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 388)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 389)"); + }; + + + { + double a = -1; + double b = -1.5; + double c; + double s; + double r_expected = -1.80277563773; + double z_expected = 1.80277563773; + double c_expected = 0.554700196225; + double s_expected = 0.832050294338; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 390)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 391)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 392)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 393)"); + }; + + + { + double a = -1; + double b = -1; + double c; + double s; + double r_expected = -1.41421356237; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 394)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 395)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 396)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 397)"); + }; + + + { + double a = -1; + double b = -0.1; + double c; + double s; + double r_expected = -1.00498756211; + double z_expected = 0.099503719021; + double c_expected = 0.99503719021; + double s_expected = 0.099503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 398)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 399)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 400)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 401)"); + }; + + + { + double a = -1; + double b = 0; + double c; + double s; + double r_expected = -1; + double z_expected = -0; + double c_expected = 1; + double s_expected = -0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 402)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 403)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 404)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 405)"); + }; + + + { + double a = -1; + double b = 0.1; + double c; + double s; + double r_expected = -1.00498756211; + double z_expected = -0.099503719021; + double c_expected = 0.99503719021; + double s_expected = -0.099503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 406)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 407)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 408)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 409)"); + }; + + + { + double a = -1; + double b = 1; + double c; + double s; + double r_expected = 1.41421356237; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 410)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 411)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 412)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 413)"); + }; + + + { + double a = -1; + double b = 1.5; + double c; + double s; + double r_expected = 1.80277563773; + double z_expected = -1.80277563773; + double c_expected = -0.554700196225; + double s_expected = 0.832050294338; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 414)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 415)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 416)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 417)"); + }; + + + { + double a = -0.1; + double b = -1.5; + double c; + double s; + double r_expected = -1.50332963784; + double z_expected = 15.0332963784; + double c_expected = 0.0665190105238; + double s_expected = 0.997785157857; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 418)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 419)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 420)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 421)"); + }; + + + { + double a = -0.1; + double b = -1; + double c; + double s; + double r_expected = -1.00498756211; + double z_expected = 10.0498756211; + double c_expected = 0.099503719021; + double s_expected = 0.99503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 422)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 423)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 424)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 425)"); + }; + + + { + double a = -0.1; + double b = -0.1; + double c; + double s; + double r_expected = -0.141421356237; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 426)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 427)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 428)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 429)"); + }; + + + { + double a = -0.1; + double b = 0; + double c; + double s; + double r_expected = -0.1; + double z_expected = -0; + double c_expected = 1; + double s_expected = -0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 430)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 431)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 432)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 433)"); + }; + + + { + double a = -0.1; + double b = 0.1; + double c; + double s; + double r_expected = 0.141421356237; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 434)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 435)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 436)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 437)"); + }; + + + { + double a = -0.1; + double b = 1; + double c; + double s; + double r_expected = 1.00498756211; + double z_expected = -10.0498756211; + double c_expected = -0.099503719021; + double s_expected = 0.99503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 438)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 439)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 440)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 441)"); + }; + + + { + double a = -0.1; + double b = 1.5; + double c; + double s; + double r_expected = 1.50332963784; + double z_expected = -15.0332963784; + double c_expected = -0.0665190105238; + double s_expected = 0.997785157857; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 442)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 443)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 444)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 445)"); + }; + + + { + double a = 0; + double b = -1.5; + double c; + double s; + double r_expected = -1.5; + double z_expected = 1; + double c_expected = -0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 446)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 447)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 448)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 449)"); + }; + + + { + double a = 0; + double b = -1; + double c; + double s; + double r_expected = -1; + double z_expected = 1; + double c_expected = -0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 450)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 451)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 452)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 453)"); + }; + + + { + double a = 0; + double b = -0.1; + double c; + double s; + double r_expected = -0.1; + double z_expected = 1; + double c_expected = -0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 454)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 455)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 456)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 457)"); + }; + + + { + double a = 0; + double b = 0; + double c; + double s; + double r_expected = 0; + double z_expected = 0; + double c_expected = 1; + double s_expected = 0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 458)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 459)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 460)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 461)"); + }; + + + { + double a = 0; + double b = 0.1; + double c; + double s; + double r_expected = 0.1; + double z_expected = 1; + double c_expected = 0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 462)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 463)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 464)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 465)"); + }; + + + { + double a = 0; + double b = 1; + double c; + double s; + double r_expected = 1; + double z_expected = 1; + double c_expected = 0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 466)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 467)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 468)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 469)"); + }; + + + { + double a = 0; + double b = 1.5; + double c; + double s; + double r_expected = 1.5; + double z_expected = 1; + double c_expected = 0; + double s_expected = 1; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 470)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 471)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 472)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 473)"); + }; + + + { + double a = 0.1; + double b = -1.5; + double c; + double s; + double r_expected = -1.50332963784; + double z_expected = -15.0332963784; + double c_expected = -0.0665190105238; + double s_expected = 0.997785157857; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 474)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 475)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 476)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 477)"); + }; + + + { + double a = 0.1; + double b = -1; + double c; + double s; + double r_expected = -1.00498756211; + double z_expected = -10.0498756211; + double c_expected = -0.099503719021; + double s_expected = 0.99503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 478)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 479)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 480)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 481)"); + }; + + + { + double a = 0.1; + double b = -0.1; + double c; + double s; + double r_expected = -0.141421356237; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 482)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 483)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 484)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 485)"); + }; + + + { + double a = 0.1; + double b = 0; + double c; + double s; + double r_expected = 0.1; + double z_expected = 0; + double c_expected = 1; + double s_expected = 0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 486)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 487)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 488)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 489)"); + }; + + + { + double a = 0.1; + double b = 0.1; + double c; + double s; + double r_expected = 0.141421356237; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 490)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 491)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 492)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 493)"); + }; + + + { + double a = 0.1; + double b = 1; + double c; + double s; + double r_expected = 1.00498756211; + double z_expected = 10.0498756211; + double c_expected = 0.099503719021; + double s_expected = 0.99503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 494)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 495)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 496)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 497)"); + }; + + + { + double a = 0.1; + double b = 1.5; + double c; + double s; + double r_expected = 1.50332963784; + double z_expected = 15.0332963784; + double c_expected = 0.0665190105238; + double s_expected = 0.997785157857; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 498)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 499)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 500)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 501)"); + }; + + + { + double a = 1; + double b = -1.5; + double c; + double s; + double r_expected = -1.80277563773; + double z_expected = -1.80277563773; + double c_expected = -0.554700196225; + double s_expected = 0.832050294338; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 502)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 503)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 504)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 505)"); + }; + + + { + double a = 1; + double b = -1; + double c; + double s; + double r_expected = -1.41421356237; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 506)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 507)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 508)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 509)"); + }; + + + { + double a = 1; + double b = -0.1; + double c; + double s; + double r_expected = 1.00498756211; + double z_expected = -0.099503719021; + double c_expected = 0.99503719021; + double s_expected = -0.099503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 510)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 511)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 512)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 513)"); + }; + + + { + double a = 1; + double b = 0; + double c; + double s; + double r_expected = 1; + double z_expected = 0; + double c_expected = 1; + double s_expected = 0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 514)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 515)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 516)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 517)"); + }; + + + { + double a = 1; + double b = 0.1; + double c; + double s; + double r_expected = 1.00498756211; + double z_expected = 0.099503719021; + double c_expected = 0.99503719021; + double s_expected = 0.099503719021; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 518)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 519)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 520)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 521)"); + }; + + + { + double a = 1; + double b = 1; + double c; + double s; + double r_expected = 1.41421356237; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 522)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 523)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 524)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 525)"); + }; + + + { + double a = 1; + double b = 1.5; + double c; + double s; + double r_expected = 1.80277563773; + double z_expected = 1.80277563773; + double c_expected = 0.554700196225; + double s_expected = 0.832050294338; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 526)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 527)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 528)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 529)"); + }; + + + { + double a = 1.5; + double b = -1.5; + double c; + double s; + double r_expected = -2.12132034356; + double z_expected = -1.41421356237; + double c_expected = -0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 530)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 531)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 532)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 533)"); + }; + + + { + double a = 1.5; + double b = -1; + double c; + double s; + double r_expected = 1.80277563773; + double z_expected = -0.554700196225; + double c_expected = 0.832050294338; + double s_expected = -0.554700196225; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 534)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 535)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 536)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 537)"); + }; + + + { + double a = 1.5; + double b = -0.1; + double c; + double s; + double r_expected = 1.50332963784; + double z_expected = -0.0665190105238; + double c_expected = 0.997785157857; + double s_expected = -0.0665190105238; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 538)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 539)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 540)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 541)"); + }; + + + { + double a = 1.5; + double b = 0; + double c; + double s; + double r_expected = 1.5; + double z_expected = 0; + double c_expected = 1; + double s_expected = 0; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 542)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 543)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 544)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 545)"); + }; + + + { + double a = 1.5; + double b = 0.1; + double c; + double s; + double r_expected = 1.50332963784; + double z_expected = 0.0665190105238; + double c_expected = 0.997785157857; + double s_expected = 0.0665190105238; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 546)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 547)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 548)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 549)"); + }; + + + { + double a = 1.5; + double b = 1; + double c; + double s; + double r_expected = 1.80277563773; + double z_expected = 0.554700196225; + double c_expected = 0.832050294338; + double s_expected = 0.554700196225; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 550)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 551)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 552)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 553)"); + }; + + + { + double a = 1.5; + double b = 1.5; + double c; + double s; + double r_expected = 2.12132034356; + double z_expected = 1.41421356237; + double c_expected = 0.707106781187; + double s_expected = 0.707106781187; + cblas_drotg(&a, &b, &c, &s); + gsl_test_rel(a, r_expected, dbleps, "drotg(case 554)"); + gsl_test_rel(b, z_expected, dbleps, "drotg(case 555)"); + gsl_test_rel(c, c_expected, dbleps, "drotg(case 556)"); + gsl_test_rel(s, s_expected, dbleps, "drotg(case 557)"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_rotm.c b/software/gsl-1.15/cblas/test_rotm.c new file mode 100644 index 000000000..98783c592 --- /dev/null +++ b/software/gsl-1.15/cblas/test_rotm.c @@ -0,0 +1,1511 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_rotm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float h[] = { -1.0f, -4.44982e+03f, -15.5826f, 7.091334e+04f, 2.95912e+04f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -3.956017e+04f }; + float y_expected[] = { -1.657054e+04f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 654)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 655)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 15.9728f, 6.400638e+03f, 1.733082e-05f, 1.524511e-04f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -0.0340097f }; + float y_expected[] = { -218.182f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 656)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 657)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, 5.688411e+04f, 5.914789e+03f, 0.00210473f, 0.0231019f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -1.93462e+03f }; + float y_expected[] = { 0.0210629f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 658)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 659)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, -0.582083f, 0.00103161f, -3.429851e-05f, 7.411469e-05f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -0.034f }; + float y_expected[] = { -0.56f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 660)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 661)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 115.163f, -6.715448e+04f, -258.695f, -16.2552f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { 140.954f }; + float y_expected[] = { 2.292355e+03f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 662)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 663)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, -3.314862e+03f, -442.976f, -214.586f, -25.9716f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { 120.134f }; + float y_expected[] = { 14.5012f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 664)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 665)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, -1.177304e+03f, -1.236662e-04f, -0.186585f, 1.15841f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { 39.4683f }; + float y_expected[] = { -0.614711f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 666)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 667)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, -88.9796f, 0.808226f, 1.106582e-05f, -0.00862288f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -0.034f }; + float y_expected[] = { -0.56f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 668)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 669)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, -0.00225865f, 8.338551e+04f, -1.98282f, -2.409905e-05f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { 1.11046f }; + float y_expected[] = { -2.835107e+03f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 670)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 671)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 0.258779f, 74.2802f, 0.923299f, 4.847128e+03f }; + float X[] = { -0.034f }; + int incX = 1; + float Y[] = { -0.56f }; + int incY = -1; + float x_expected[] = { -0.551048f }; + float y_expected[] = { -3.08553f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 672)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 673)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -8.00850735044, 0.0204647351647, 1.898461360078e-04, -4.32701487194 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -6.72728115497 }; + double y_expected[] = { 3.09369795149 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 674)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 675)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 1.230610998905e+04, 210.056650134, 9.20757074452, 2.072879691524e+03 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -5.70658279935 }; + double y_expected[] = { 175.736586112 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 676)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 677)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, -1.244580625511e+03, 1.11154682624, 2.269384716089e-05, -0.0143785338883 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -1.046158725429e+03 }; + double y_expected[] = { -0.829776862405 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 678)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 679)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, 293.927527276, -2.614737743134e+03, 10.3164975867, -7.947030813329e+03 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { 0.84 }; + double y_expected[] = { -0.711 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 680)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 681)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -0.0178609251786, 0.00983044958941, 105.944529127, 1.687350579234e-05 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -75.3415633866 }; + double y_expected[] = { 0.00824558059248 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 682)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 683)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 6.241999071283e-05, 2.495425882445e+03, 304.604891146, 1.604644714854e+04 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -215.734077605 }; + double y_expected[] = { 2.095446741254e+03 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 684)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 685)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, -0.058097639487, 8.386083625428e+03, -10.5233229994, 184.653245391 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { -0.759802017169 }; + double y_expected[] = { -132.128457473 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 686)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 687)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, -92.8754629217, 1.467547244529e-04, -3.197881072301e-04, -1.89874629713 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { 0.84 }; + double y_expected[] = { -0.711 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 688)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 689)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -0.0961996230646, -2.248344186185e-05, -316.856396787, 1.663969157848e+03 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { 225.204090432 }; + double y_expected[] = { -1.183082090116e+03 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 690)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 691)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, -201.862043128, 4.999906166451e-04, -0.0653365534487, 586.454083328 }; + double X[] = { 0.84 }; + int incX = 1; + double Y[] = { -0.711 }; + int incY = -1; + double x_expected[] = { 0.886454289502 }; + double y_expected[] = { -0.710580007882 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 692)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 693)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 162.86f, 1.379231e-04f, 9.67285f, 0.929218f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 106.173f }; + float y_expected[] = { 0.358765f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 694)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 695)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 537.387f, -21.6404f, -1.017074e+03f, -1.730546e-05f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { -391.961f }; + float y_expected[] = { -13.2258f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 696)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 697)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, -1.339977e-05f, 0.00522784f, 2.020352e-05f, -0.0654088f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 0.385992f }; + float y_expected[] = { -0.654248f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 698)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 699)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, -50.922f, 31.5261f, -0.194913f, 0.206417f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 0.629f }; + float y_expected[] = { 0.386f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 700)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 701)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 1.15659f, 2.599832e+04f, 435.891f, 1.546671e+03f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 168.981f }; + float y_expected[] = { 1.694996e+04f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 702)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 703)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 3.359889e-04f, -0.00134822f, -12.9136f, -5.655622e+04f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { -4.35566f }; + float y_expected[] = { 0.385152f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 704)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 705)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, 2.75119e-05f, 1.70314f, 18.4063f, 185.731f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 0.386017f }; + float y_expected[] = { 71.063f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 706)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 707)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, -1.031009e-04f, -3.378602e+04f, 7.869358e-05f, 157.303f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 0.629f }; + float y_expected[] = { 0.386f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 708)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 709)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 0.00207419f, -89.9374f, -1.40414f, -25.1433f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { -0.540694f }; + float y_expected[] = { -66.276f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 710)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 711)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, -4.972562e+04f, 3.65698e-05f, 632.116f, 0.195207f }; + float X[] = { 0.629f }; + int incX = -1; + float Y[] = { 0.386f }; + int incY = 1; + float x_expected[] = { 244.626f }; + float y_expected[] = { 0.386023f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 712)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 713)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, 8.64768339859, -105.906731008, -347.053994991, -1.28802789909 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { 218.021288159 }; + double y_expected[] = { 72.2119146942 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 714)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 715)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 0.926057152065, 3.315158944851e-04, -1.203638835886e+03, 0.00197484344868 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { 775.673049147 }; + double y_expected[] = { -0.645223441713 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 716)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 717)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, -9.404298701289e-05, -0.00380843381223, -0.0767212569647, -3.66628238398 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { -0.644936615027 }; + double y_expected[] = { 3.03875213767 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 718)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 719)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, 0.0900662226146, 0.00250500071094, 6.46624826995, -2.159443948633e-05 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { -0.674 }; + double y_expected[] = { -0.645 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 720)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 721)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, 8.011686652935e+03, -23.8989526115, -1.104879849207e+04, 0.108740065261 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { 1.726598223305e+03 }; + double y_expected[] = { 16.0377567181 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 722)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 723)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 5.162681717012e-05, 48.059409562, -4.701209666609e+04, -6.80333644488e+04 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { 3.032212834963e+04 }; + double y_expected[] = { -33.0370420448 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 724)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 725)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, -5.554806445579e-04, 5.101973060197e+04, -5.932040237374e+03, 3.91045757161 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { -0.644625606046 }; + double y_expected[] = { -1.84824513369 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 726)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 727)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, -1.697234884626e-05, 101.466514367, 5.772202675851e+03, -6.884724590773e-04 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { -0.674 }; + double y_expected[] = { -0.645 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 728)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 729)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -0.0199779342753, 13.013123509, -17.8393347684, 0.129333249919 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { 11.5198360534 }; + double y_expected[] = { -8.85426519126 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 730)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 731)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, -6.673799053773e+04, 587.759435538, 3.493966594965e+04, 2.098374142331e-05 }; + double X[] = { -0.674 }; + int incX = -1; + double Y[] = { -0.645 }; + int incY = 1; + double x_expected[] = { -2.253675853752e+04 }; + double y_expected[] = { -396.794859553 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 732)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 733)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 0.070033f, 0.034824f, -0.00740144f, -0.153474f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.00701131f }; + float y_expected[] = { 0.0119423f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 734)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 735)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 7.618016e-04f, -0.00396806f, -92.8408f, -0.0018571f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { 9.4516f }; + float y_expected[] = { -0.10256f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 736)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 737)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, -5.833806e+03f, 0.00265668f, -587.573f, 0.0972416f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { 647.449f }; + float y_expected[] = { 0.100984f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 738)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 739)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, -8.93339e+04f, -5.16022e-05f, 2.589784e-05f, -7.52586f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.111f }; + float y_expected[] = { -0.103f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 740)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 741)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, 0.125135f, 0.00586453f, 1.100694e-05f, -0.0137436f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.0138912f }; + float y_expected[] = { 7.64631e-04f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 742)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 743)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, -0.0996414f, 0.00505806f, 1.321441e-05f, 1.151406e-04f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.111001f }; + float y_expected[] = { -0.103561f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 744)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 745)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 1.0f, 8.18165f, 169.902f, -1.453316e-05f, 1.539957e+03f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -1.01116f }; + float y_expected[] = { -158.505f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 746)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 747)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -2.0f, 1.827623e-04f, -0.0528808f, 24.7305f, 328.39f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.111f }; + float y_expected[] = { -0.103f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 748)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 749)"); + } + }; + }; + + + { + int N = 1; + float h[] = { -1.0f, -0.0876053f, 7.858704e+04f, -4.758389e+03f, -0.0114841f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { 490.124f }; + float y_expected[] = { -8.72316e+03f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 750)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 751)"); + } + }; + }; + + + { + int N = 1; + float h[] = { 0.0f, 0.00192188f, -1.031412e-05f, -0.00123957f, 0.312197f }; + float X[] = { -0.111f }; + int incX = -1; + float Y[] = { -0.103f }; + int incY = -1; + float x_expected[] = { -0.110872f }; + float y_expected[] = { -0.102999f }; + cblas_srotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 752)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 753)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -0.0253351881542, -0.105247702585, -7.18405641016, -5.409804811228e+04 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.21037864911 }; + double y_expected[] = { 1.622920078085e+03 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 754)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 755)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 8.503080247483e+03, -6.186691885896e-05, -0.201279925805, -5.810746179529e-05 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.209038397774 }; + double y_expected[] = { -0.0300125589845 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 756)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 757)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, 0.351101212426, 64.9574703355, 3.015315809025e-05, -5.291308403203e-04 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.0412735461225 }; + double y_expected[] = { -0.202984126075 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 758)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 759)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, 0.0220262018719, -0.00311338149392, -70.6413298654, 31.8952671416 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.203 }; + double y_expected[] = { -0.03 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 760)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 761)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, 1.549812806922e+04, -4.868519165134e+04, -5.230242596804e+04, 1.58043443456e+04 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 4.715192777093e+03 }; + double y_expected[] = { -1.035722423559e+04 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 762)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 763)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, -3.30917942895, -0.0100316602276, -0.0222191220411, -0.0881815578726 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.203666573661 }; + double y_expected[] = { -0.0320364270262 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 764)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 765)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 1.0, 5.68327898035, 1.646867755046e-04, -0.106527931872, -28.2458905362 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 1.12370563301 }; + double y_expected[] = { 0.644376716086 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 766)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 767)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -2.0, 2.20585352008, 1.117638462348e+03, -0.116329468158, 0.00362096329059 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.203 }; + double y_expected[] = { -0.03 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 768)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 769)"); + } + }; + }; + + + { + int N = 1; + double h[] = { -1.0, -0.00182683798892, -2.288460066516e-05, -37.55844708, -9.54075659826e-05 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 1.12638256429 }; + double y_expected[] = { -1.783346955549e-06 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 770)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 771)"); + } + }; + }; + + + { + int N = 1; + double h[] = { 0.0, 1.02690456955e-04, -20.1292302013, -1.703870486677e-04, 5.17477399477 }; + double X[] = { 0.203 }; + int incX = -1; + double Y[] = { -0.03 }; + int incY = -1; + double x_expected[] = { 0.203005111611 }; + double y_expected[] = { -4.11623373087 }; + cblas_drotm(N, X, incX, Y, incY, h); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 772)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 773)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_rotmg.c b/software/gsl-1.15/cblas/test_rotmg.c new file mode 100644 index 000000000..0a312508d --- /dev/null +++ b/software/gsl-1.15/cblas/test_rotmg.c @@ -0,0 +1,167 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_rotmg (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + float d1 = -1630.28519312f; + float d2 = 44320.1964703f; + float b1 = 1274.7681352f; + float b2 = 0.983006912864f; + float h[] = { -999.0f, -999.1f, -999.2f, -999.3f, -999.4f }; + float d1_expected = 0.0f; + float d2_expected = 0.0f; + float b1_expected = 0.0f; + float h0_expected = -1.0f; + float h11_expected = 0.0f; + float h21_expected = 0.0f; + float h12_expected = 0.0f; + float h22_expected = 0.0f; + cblas_srotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, flteps, "srotmg(case 606)"); + gsl_test_rel(d2, d2_expected, flteps, "srotmg(case 607)"); + gsl_test_rel(b1, b1_expected, flteps, "srotmg(case 608)"); + gsl_test_rel(h[0], h0_expected, flteps, "srotmg(case 609)"); + gsl_test_rel(h[1], h11_expected, flteps, "srotmg(case 610)"); + gsl_test_rel(h[2], h21_expected, flteps, "srotmg(case 611)"); + gsl_test_rel(h[3], h12_expected, flteps, "srotmg(case 612)"); + gsl_test_rel(h[4], h22_expected, flteps, "srotmg(case 613)"); + }; + + + { + double d1 = 0.0890831089656; + double d2 = 24998.3892082; + double b1 = 34657.8864443; + double b2 = 1.27708980357; + double h[] = { -999.0, -999.1, -999.2, -999.3, -999.4 }; + double d1_expected = 0.0890491788526; + double d2_expected = 24988.8677829; + double b1_expected = 34671.0920237; + double h0_expected = 0; + double h11_expected = -999.1; + double h21_expected = -3.6848461767e-05; + double h12_expected = 10.34036867; + double h22_expected = -999.4; + cblas_drotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, dbleps, "drotmg(case 614)"); + gsl_test_rel(d2, d2_expected, dbleps, "drotmg(case 615)"); + gsl_test_rel(b1, b1_expected, dbleps, "drotmg(case 616)"); + gsl_test_rel(h[0], h0_expected, dbleps, "drotmg(case 617)"); + gsl_test_rel(h[1], h11_expected, dbleps, "drotmg(case 618)"); + gsl_test_rel(h[2], h21_expected, dbleps, "drotmg(case 619)"); + gsl_test_rel(h[3], h12_expected, dbleps, "drotmg(case 620)"); + gsl_test_rel(h[4], h22_expected, dbleps, "drotmg(case 621)"); + }; + + + { + float d1 = 0.00100326116366f; + float d2 = -1.20359225232f; + float b1 = -7.45489498808f; + float b2 = 0.159616854019f; + float h[] = { -999.0f, -999.1f, -999.2f, -999.3f, -999.4f }; + float d1_expected = 0.00222932574734f; + float d2_expected = -2.67447728926f; + float b1_expected = -3.35491869218f; + float h0_expected = 0.0f; + float h11_expected = -999.1f; + float h21_expected = 0.0214110130692f; + float h12_expected = 25.6863620142f; + float h22_expected = -999.4f; + cblas_srotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, flteps, "srotmg(case 622)"); + gsl_test_rel(d2, d2_expected, flteps, "srotmg(case 623)"); + gsl_test_rel(b1, b1_expected, flteps, "srotmg(case 624)"); + gsl_test_rel(h[0], h0_expected, flteps, "srotmg(case 625)"); + gsl_test_rel(h[1], h11_expected, flteps, "srotmg(case 626)"); + gsl_test_rel(h[2], h21_expected, flteps, "srotmg(case 627)"); + gsl_test_rel(h[3], h12_expected, flteps, "srotmg(case 628)"); + gsl_test_rel(h[4], h22_expected, flteps, "srotmg(case 629)"); + }; + + + { + double d1 = -49.1978123005; + double d2 = 0.228703451277; + double b1 = 1.8901039144; + double b2 = 7081.47754386; + double h[] = { -999.0, -999.1, -999.2, -999.3, -999.4 }; + double d1_expected = 0; + double d2_expected = 0; + double b1_expected = 0; + double h0_expected = -1; + double h11_expected = 0; + double h21_expected = 0; + double h12_expected = 0; + double h22_expected = 0; + cblas_drotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, dbleps, "drotmg(case 630)"); + gsl_test_rel(d2, d2_expected, dbleps, "drotmg(case 631)"); + gsl_test_rel(b1, b1_expected, dbleps, "drotmg(case 632)"); + gsl_test_rel(h[0], h0_expected, dbleps, "drotmg(case 633)"); + gsl_test_rel(h[1], h11_expected, dbleps, "drotmg(case 634)"); + gsl_test_rel(h[2], h21_expected, dbleps, "drotmg(case 635)"); + gsl_test_rel(h[3], h12_expected, dbleps, "drotmg(case 636)"); + gsl_test_rel(h[4], h22_expected, dbleps, "drotmg(case 637)"); + }; + + + { + float d1 = 0.00760694276009f; + float d2 = -1.07649167228f; + float b1 = -22584.0076391f; + float b2 = -0.00305597817159f; + float h[] = { -999.0f, -999.1f, -999.2f, -999.3f, -999.4f }; + float d1_expected = 0.00760694276011f; + float d2_expected = -1.07649167228f; + float b1_expected = -22584.007639f; + float h0_expected = 0.0f; + float h11_expected = -999.1f; + float h21_expected = -1.35316026298e-07f; + float h12_expected = -1.91491615001e-05f; + float h22_expected = -999.4f; + cblas_srotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, flteps, "srotmg(case 638)"); + gsl_test_rel(d2, d2_expected, flteps, "srotmg(case 639)"); + gsl_test_rel(b1, b1_expected, flteps, "srotmg(case 640)"); + gsl_test_rel(h[0], h0_expected, flteps, "srotmg(case 641)"); + gsl_test_rel(h[1], h11_expected, flteps, "srotmg(case 642)"); + gsl_test_rel(h[2], h21_expected, flteps, "srotmg(case 643)"); + gsl_test_rel(h[3], h12_expected, flteps, "srotmg(case 644)"); + gsl_test_rel(h[4], h22_expected, flteps, "srotmg(case 645)"); + }; + + + { + double d1 = 0.000283076346391; + double d2 = 20.1907649901; + double b1 = -0.274927034914; + double b2 = 18.6645358259; + double h[] = { -999.0, -999.1, -999.2, -999.3, -999.4 }; + double d1_expected = 20.1907649287; + double d2_expected = 0.00028307634553; + double b1_expected = 18.6645358827; + double h0_expected = 1; + double h11_expected = -2.06514743478e-07; + double h21_expected = -999.2; + double h12_expected = -999.3; + double h22_expected = -0.0147299154652; + cblas_drotmg(&d1, &d2, &b1, b2, h); + gsl_test_rel(d1, d1_expected, dbleps, "drotmg(case 646)"); + gsl_test_rel(d2, d2_expected, dbleps, "drotmg(case 647)"); + gsl_test_rel(b1, b1_expected, dbleps, "drotmg(case 648)"); + gsl_test_rel(h[0], h0_expected, dbleps, "drotmg(case 649)"); + gsl_test_rel(h[1], h11_expected, dbleps, "drotmg(case 650)"); + gsl_test_rel(h[2], h21_expected, dbleps, "drotmg(case 651)"); + gsl_test_rel(h[3], h12_expected, dbleps, "drotmg(case 652)"); + gsl_test_rel(h[4], h22_expected, dbleps, "drotmg(case 653)"); + }; + + +} diff --git a/software/gsl-1.15/cblas/test_sbmv.c b/software/gsl-1.15/cblas/test_sbmv.c new file mode 100644 index 000000000..a79fe22fe --- /dev/null +++ b/software/gsl-1.15/cblas/test_sbmv.c @@ -0,0 +1,395 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_sbmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { -0.236236f, -0.215242f, 0.266757f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1102)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { -0.236236f, -0.215242f, 0.266757f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1103)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { 0.187592f, -0.01232f, -0.040176f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1104)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { 0.187592f, -0.01232f, -0.040176f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1105)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { 0.187592f, -0.01232f, -0.040176f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1106)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { 0.187592f, -0.01232f, -0.040176f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1107)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { -0.236236f, -0.215242f, 0.266757f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1108)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 1.0f; + float beta = 0.0f; + int N = 3; + int k = 1; + int lda = 3; + float A[] = { 0.627f, -0.312f, 0.031f, 0.308f, 0.323f, -0.578f, 0.797f, 0.545f, -0.476f }; + float X[] = { -0.542f, 0.606f, 0.727f }; + int incX = -1; + float Y[] = { 0.755f, 0.268f, -0.99f }; + int incY = -1; + float y_expected[] = { -0.236236f, -0.215242f, 0.266757f }; + cblas_ssbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssbmv(case 1109)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1110)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1111)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1112)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1113)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1114)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1115)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1116)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = 0; + double beta = 1; + int N = 3; + int k = 1; + int lda = 3; + double A[] = { 0.83, -0.568, -0.888, 0.281, -0.779, -0.148, 0.138, 0.053, -0.757 }; + double X[] = { 0.166, 0.808, 0.723 }; + int incX = -1; + double Y[] = { 0.9, 0.99, -0.578 }; + int incY = -1; + double y_expected[] = { 0.9, 0.99, -0.578 }; + cblas_dsbmv(order, uplo, N, k, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsbmv(case 1117)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_scal.c b/software/gsl-1.15/cblas/test_scal.c new file mode 100644 index 000000000..a7cdd4be6 --- /dev/null +++ b/software/gsl-1.15/cblas/test_scal.c @@ -0,0 +1,911 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_scal (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float alpha = 0.0f; + float X[] = { 0.651f }; + int incX = -1; + float expected[] = { 0.651f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 112)"); + } + }; + }; + + + { + int N = 1; + float alpha = 0.1f; + float X[] = { 0.651f }; + int incX = -1; + float expected[] = { 0.651f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 113)"); + } + }; + }; + + + { + int N = 1; + float alpha = 1.0f; + float X[] = { 0.651f }; + int incX = -1; + float expected[] = { 0.651f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 114)"); + } + }; + }; + + + { + int N = 1; + double alpha = 0; + double X[] = { 0.686 }; + int incX = -1; + double expected[] = { 0.686 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 115)"); + } + }; + }; + + + { + int N = 1; + double alpha = 0.1; + double X[] = { 0.686 }; + int incX = -1; + double expected[] = { 0.686 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 116)"); + } + }; + }; + + + { + int N = 1; + double alpha = 1; + double X[] = { 0.686 }; + int incX = -1; + double expected[] = { 0.686 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 117)"); + } + }; + }; + + + { + int N = 1; + float alpha[2] = {0.0f, 0.0f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 118) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 118) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha[2] = {0.1f, 0.0f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 119) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 119) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha[2] = {1.0f, 0.0f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 120) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 120) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha[2] = {0.0f, 0.1f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 121) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 121) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha[2] = {0.1f, 0.2f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 122) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 122) imag"); + }; + }; + }; + + + { + int N = 1; + float alpha[2] = {1.0f, 0.3f}; + float X[] = { 0.986f, -0.775f }; + int incX = -1; + float expected[] = { 0.986f, -0.775f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 123) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 123) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0, 0}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 124) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 124) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0.1, 0}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 125) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 125) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {1, 0}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 126) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 126) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0, 0.1}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 127) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 127) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {0.1, 0.2}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 128) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 128) imag"); + }; + }; + }; + + + { + int N = 1; + double alpha[2] = {1, 0.3}; + double X[] = { 0.454, -0.478 }; + int incX = -1; + double expected[] = { 0.454, -0.478 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 129) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 129) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha = 0.0f; + float X[] = { 0.389f, -0.236f }; + int incX = 1; + float expected[] = { 0.0f, -0.0f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 130)"); + } + }; + }; + + + { + int N = 2; + float alpha = 0.1f; + float X[] = { 0.389f, -0.236f }; + int incX = 1; + float expected[] = { 0.0389f, -0.0236f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 131)"); + } + }; + }; + + + { + int N = 2; + float alpha = 1.0f; + float X[] = { 0.389f, -0.236f }; + int incX = 1; + float expected[] = { 0.389f, -0.236f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 132)"); + } + }; + }; + + + { + int N = 2; + double alpha = 0; + double X[] = { -0.429, -0.183 }; + int incX = 1; + double expected[] = { -0.0, -0.0 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 133)"); + } + }; + }; + + + { + int N = 2; + double alpha = 0.1; + double X[] = { -0.429, -0.183 }; + int incX = 1; + double expected[] = { -0.0429, -0.0183 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 134)"); + } + }; + }; + + + { + int N = 2; + double alpha = 1; + double X[] = { -0.429, -0.183 }; + int incX = 1; + double expected[] = { -0.429, -0.183 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 135)"); + } + }; + }; + + + { + int N = 2; + float alpha[2] = {0.0f, 0.0f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.0f, 0.0f, 0.0f, 0.0f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 136) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 136) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.1f, 0.0f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.0603f, 0.0239f, 0.0339f, -0.058f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 137) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 137) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {1.0f, 0.0f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 138) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 138) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.0f, 0.1f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.0239f, -0.0603f, 0.058f, 0.0339f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 139) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 139) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.1f, 0.2f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.1081f, -0.0967f, 0.1499f, 0.0098f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 140) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 140) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {1.0f, 0.3f}; + float X[] = { -0.603f, 0.239f, 0.339f, -0.58f }; + int incX = 1; + float expected[] = { -0.6747f, 0.0581f, 0.513f, -0.4783f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 141) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 141) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0, 0}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -0.0, 0.0, 0.0, 0.0 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 142) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 142) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0.1, 0}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -0.0956, 0.0613, 0.0443, 0.0503 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 143) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 143) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {1, 0}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -0.956, 0.613, 0.443, 0.503 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 144) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 144) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0, 0.1}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -0.0613, -0.0956, -0.0503, 0.0443 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 145) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 145) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0.1, 0.2}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -0.2182, -0.1299, -0.0563, 0.1389 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 146) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 146) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {1, 0.3}; + double X[] = { -0.956, 0.613, 0.443, 0.503 }; + int incX = 1; + double expected[] = { -1.1399, 0.3262, 0.2921, 0.6359 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 147) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 147) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha = 0.0f; + float X[] = { 0.629f, -0.419f }; + int incX = -1; + float expected[] = { 0.629f, -0.419f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 148)"); + } + }; + }; + + + { + int N = 2; + float alpha = 0.1f; + float X[] = { 0.629f, -0.419f }; + int incX = -1; + float expected[] = { 0.629f, -0.419f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 149)"); + } + }; + }; + + + { + int N = 2; + float alpha = 1.0f; + float X[] = { 0.629f, -0.419f }; + int incX = -1; + float expected[] = { 0.629f, -0.419f }; + cblas_sscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], flteps, "sscal(case 150)"); + } + }; + }; + + + { + int N = 2; + double alpha = 0; + double X[] = { 0.398, -0.656 }; + int incX = -1; + double expected[] = { 0.398, -0.656 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 151)"); + } + }; + }; + + + { + int N = 2; + double alpha = 0.1; + double X[] = { 0.398, -0.656 }; + int incX = -1; + double expected[] = { 0.398, -0.656 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 152)"); + } + }; + }; + + + { + int N = 2; + double alpha = 1; + double X[] = { 0.398, -0.656 }; + int incX = -1; + double expected[] = { 0.398, -0.656 }; + cblas_dscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], expected[i], dbleps, "dscal(case 153)"); + } + }; + }; + + + { + int N = 2; + float alpha[2] = {0.0f, 0.0f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 154) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 154) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.1f, 0.0f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 155) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 155) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {1.0f, 0.0f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 156) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 156) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.0f, 0.1f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 157) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 157) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {0.1f, 0.2f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 158) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 158) imag"); + }; + }; + }; + + + { + int N = 2; + float alpha[2] = {1.0f, 0.3f}; + float X[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + int incX = -1; + float expected[] = { 0.736f, 0.331f, -0.318f, 0.622f }; + cblas_cscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], flteps, "cscal(case 159) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], flteps, "cscal(case 159) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0, 0}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 160) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 160) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0.1, 0}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 161) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 161) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {1, 0}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 162) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 162) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0, 0.1}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 163) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 163) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {0.1, 0.2}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 164) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 164) imag"); + }; + }; + }; + + + { + int N = 2; + double alpha[2] = {1, 0.3}; + double X[] = { 0.521, -0.811, 0.556, -0.147 }; + int incX = -1; + double expected[] = { 0.521, -0.811, 0.556, -0.147 }; + cblas_zscal(N, alpha, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], expected[2*i], dbleps, "zscal(case 165) real"); + gsl_test_rel(X[2*i+1], expected[2*i+1], dbleps, "zscal(case 165) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_spmv.c b/software/gsl-1.15/cblas/test_spmv.c new file mode 100644 index 000000000..d49b48b28 --- /dev/null +++ b/software/gsl-1.15/cblas/test_spmv.c @@ -0,0 +1,363 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_spmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1134)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1135)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1136)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1137)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1138)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1139)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1140)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 0.1f; + float beta = -0.3f; + int N = 2; + float A[] = { -0.174f, 0.878f, 0.478f }; + float X[] = { 0.503f, 0.313f }; + int incX = -1; + float Y[] = { -0.565f, -0.109f }; + int incY = -1; + float y_expected[] = { 0.221025f, 0.0714172f }; + cblas_sspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "sspmv(case 1141)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1142)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1143)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1144)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1145)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1146)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1147)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1148)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = -1; + double beta = 0.1; + int N = 2; + double A[] = { -0.181, -0.071, -0.038 }; + double X[] = { -0.015, 0.132 }; + int incX = -1; + double Y[] = { -0.449, -0.219 }; + int incY = -1; + double y_expected[] = { -0.036098, 9.27e-04 }; + cblas_dspmv(order, uplo, N, alpha, A, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dspmv(case 1149)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_spr.c b/software/gsl-1.15/cblas/test_spr.c new file mode 100644 index 000000000..36891bdb2 --- /dev/null +++ b/software/gsl-1.15/cblas/test_spr.c @@ -0,0 +1,163 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_spr (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 2; + float alpha = -0.3f; + float Ap[] = { -0.764f, -0.257f, -0.064f }; + float X[] = { 0.455f, -0.285f }; + int incX = -1; + float Ap_expected[] = { -0.788367f, -0.218097f, -0.126108f }; + cblas_sspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr(case 1426)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + float alpha = -0.3f; + float Ap[] = { -0.764f, -0.257f, -0.064f }; + float X[] = { 0.455f, -0.285f }; + int incX = -1; + float Ap_expected[] = { -0.788367f, -0.218097f, -0.126108f }; + cblas_sspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr(case 1427)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + float alpha = -0.3f; + float Ap[] = { -0.764f, -0.257f, -0.064f }; + float X[] = { 0.455f, -0.285f }; + int incX = -1; + float Ap_expected[] = { -0.788367f, -0.218097f, -0.126108f }; + cblas_sspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr(case 1428)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + float alpha = -0.3f; + float Ap[] = { -0.764f, -0.257f, -0.064f }; + float X[] = { 0.455f, -0.285f }; + int incX = -1; + float Ap_expected[] = { -0.788367f, -0.218097f, -0.126108f }; + cblas_sspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr(case 1429)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 2; + double alpha = -1; + double Ap[] = { 0.819, 0.175, -0.809 }; + double X[] = { -0.645, -0.222 }; + int incX = -1; + double Ap_expected[] = { 0.769716, 0.03181, -1.225025 }; + cblas_dspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr(case 1430)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + double alpha = -1; + double Ap[] = { 0.819, 0.175, -0.809 }; + double X[] = { -0.645, -0.222 }; + int incX = -1; + double Ap_expected[] = { 0.769716, 0.03181, -1.225025 }; + cblas_dspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr(case 1431)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + double alpha = -1; + double Ap[] = { 0.819, 0.175, -0.809 }; + double X[] = { -0.645, -0.222 }; + int incX = -1; + double Ap_expected[] = { 0.769716, 0.03181, -1.225025 }; + cblas_dspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr(case 1432)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + double alpha = -1; + double Ap[] = { 0.819, 0.175, -0.809 }; + double X[] = { -0.645, -0.222 }; + int incX = -1; + double Ap_expected[] = { 0.769716, 0.03181, -1.225025 }; + cblas_dspr(order, uplo, N, alpha, X, incX, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr(case 1433)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_spr2.c b/software/gsl-1.15/cblas/test_spr2.c new file mode 100644 index 000000000..cf0c39ba0 --- /dev/null +++ b/software/gsl-1.15/cblas/test_spr2.c @@ -0,0 +1,179 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_spr2 (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 2; + float alpha = -1.0f; + float Ap[] = { 0.493f, -0.175f, -0.831f }; + float X[] = { -0.163f, 0.489f }; + int incX = -1; + float Y[] = { 0.154f, 0.769f }; + int incY = -1; + float Ap_expected[] = { -0.259082f, -0.124959f, -0.780796f }; + cblas_sspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr2(case 1442)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + float alpha = -1.0f; + float Ap[] = { 0.493f, -0.175f, -0.831f }; + float X[] = { -0.163f, 0.489f }; + int incX = -1; + float Y[] = { 0.154f, 0.769f }; + int incY = -1; + float Ap_expected[] = { -0.259082f, -0.124959f, -0.780796f }; + cblas_sspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr2(case 1443)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + float alpha = -1.0f; + float Ap[] = { 0.493f, -0.175f, -0.831f }; + float X[] = { -0.163f, 0.489f }; + int incX = -1; + float Y[] = { 0.154f, 0.769f }; + int incY = -1; + float Ap_expected[] = { -0.259082f, -0.124959f, -0.780796f }; + cblas_sspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr2(case 1444)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + float alpha = -1.0f; + float Ap[] = { 0.493f, -0.175f, -0.831f }; + float X[] = { -0.163f, 0.489f }; + int incX = -1; + float Y[] = { 0.154f, 0.769f }; + int incY = -1; + float Ap_expected[] = { -0.259082f, -0.124959f, -0.780796f }; + cblas_sspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], flteps, "sspr2(case 1445)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 2; + double alpha = 0; + double Ap[] = { 0.938, 0.342, 0.74 }; + double X[] = { 0.216, -0.566 }; + int incX = -1; + double Y[] = { -0.845, 0.282 }; + int incY = -1; + double Ap_expected[] = { 0.938, 0.342, 0.74 }; + cblas_dspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr2(case 1446)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 2; + double alpha = 0; + double Ap[] = { 0.938, 0.342, 0.74 }; + double X[] = { 0.216, -0.566 }; + int incX = -1; + double Y[] = { -0.845, 0.282 }; + int incY = -1; + double Ap_expected[] = { 0.938, 0.342, 0.74 }; + cblas_dspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr2(case 1447)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 2; + double alpha = 0; + double Ap[] = { 0.938, 0.342, 0.74 }; + double X[] = { 0.216, -0.566 }; + int incX = -1; + double Y[] = { -0.845, 0.282 }; + int incY = -1; + double Ap_expected[] = { 0.938, 0.342, 0.74 }; + cblas_dspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr2(case 1448)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 2; + double alpha = 0; + double Ap[] = { 0.938, 0.342, 0.74 }; + double X[] = { 0.216, -0.566 }; + int incX = -1; + double Y[] = { -0.845, 0.282 }; + int incY = -1; + double Ap_expected[] = { 0.938, 0.342, 0.74 }; + cblas_dspr2(order, uplo, N, alpha, X, incX, Y, incY, Ap); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(Ap[i], Ap_expected[i], dbleps, "dspr2(case 1449)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_swap.c b/software/gsl-1.15/cblas/test_swap.c new file mode 100644 index 000000000..accf822ac --- /dev/null +++ b/software/gsl-1.15/cblas/test_swap.c @@ -0,0 +1,311 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_swap (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int N = 1; + float X[] = { 0.539f }; + int incX = 1; + float Y[] = { -0.262f }; + int incY = -1; + float expected1[] = { -0.262f }; + float expected2[] = { 0.539f }; + cblas_sswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], flteps, "sswap(case 88)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], flteps, "sswap(case 89)"); + } + }; + }; + + + { + int N = 1; + double X[] = { 0.906 }; + int incX = 1; + double Y[] = { 0.373 }; + int incY = -1; + double expected1[] = { 0.373 }; + double expected2[] = { 0.906 }; + cblas_dswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], dbleps, "dswap(case 90)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], dbleps, "dswap(case 91)"); + } + }; + }; + + + { + int N = 1; + float X[] = { -0.316f, -0.529f }; + int incX = 1; + float Y[] = { -0.313f, 0.363f }; + int incY = -1; + float expected1[] = { -0.313f, 0.363f }; + float expected2[] = { -0.316f, -0.529f }; + cblas_cswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], flteps, "cswap(case 92) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], flteps, "cswap(case 92) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], flteps, "cswap(case 93) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], flteps, "cswap(case 93) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { 0.512, -0.89 }; + int incX = 1; + double Y[] = { -0.225, -0.511 }; + int incY = -1; + double expected1[] = { -0.225, -0.511 }; + double expected2[] = { 0.512, -0.89 }; + cblas_zswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], dbleps, "zswap(case 94) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], dbleps, "zswap(case 94) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], dbleps, "zswap(case 95) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], dbleps, "zswap(case 95) imag"); + }; + }; + }; + + + { + int N = 1; + float X[] = { 0.336f }; + int incX = -1; + float Y[] = { -0.431f }; + int incY = 1; + float expected1[] = { -0.431f }; + float expected2[] = { 0.336f }; + cblas_sswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], flteps, "sswap(case 96)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], flteps, "sswap(case 97)"); + } + }; + }; + + + { + int N = 1; + double X[] = { 0.764 }; + int incX = -1; + double Y[] = { -0.293 }; + int incY = 1; + double expected1[] = { -0.293 }; + double expected2[] = { 0.764 }; + cblas_dswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], dbleps, "dswap(case 98)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], dbleps, "dswap(case 99)"); + } + }; + }; + + + { + int N = 1; + float X[] = { -0.239f, 0.361f }; + int incX = -1; + float Y[] = { 0.149f, 0.347f }; + int incY = 1; + float expected1[] = { 0.149f, 0.347f }; + float expected2[] = { -0.239f, 0.361f }; + cblas_cswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], flteps, "cswap(case 100) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], flteps, "cswap(case 100) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], flteps, "cswap(case 101) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], flteps, "cswap(case 101) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { -0.171, -0.936 }; + int incX = -1; + double Y[] = { 0.495, -0.835 }; + int incY = 1; + double expected1[] = { 0.495, -0.835 }; + double expected2[] = { -0.171, -0.936 }; + cblas_zswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], dbleps, "zswap(case 102) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], dbleps, "zswap(case 102) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], dbleps, "zswap(case 103) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], dbleps, "zswap(case 103) imag"); + }; + }; + }; + + + { + int N = 1; + float X[] = { -0.405f }; + int incX = -1; + float Y[] = { -0.213f }; + int incY = -1; + float expected1[] = { -0.213f }; + float expected2[] = { -0.405f }; + cblas_sswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], flteps, "sswap(case 104)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], flteps, "sswap(case 105)"); + } + }; + }; + + + { + int N = 1; + double X[] = { -0.761 }; + int incX = -1; + double Y[] = { -0.585 }; + int incY = -1; + double expected1[] = { -0.585 }; + double expected2[] = { -0.761 }; + cblas_dswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], expected1[i], dbleps, "dswap(case 106)"); + } + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], expected2[i], dbleps, "dswap(case 107)"); + } + }; + }; + + + { + int N = 1; + float X[] = { 0.853f, 0.146f }; + int incX = -1; + float Y[] = { 0.009f, -0.178f }; + int incY = -1; + float expected1[] = { 0.009f, -0.178f }; + float expected2[] = { 0.853f, 0.146f }; + cblas_cswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], flteps, "cswap(case 108) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], flteps, "cswap(case 108) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], flteps, "cswap(case 109) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], flteps, "cswap(case 109) imag"); + }; + }; + }; + + + { + int N = 1; + double X[] = { -0.228, 0.386 }; + int incX = -1; + double Y[] = { 0.988, -0.084 }; + int incY = -1; + double expected1[] = { 0.988, -0.084 }; + double expected2[] = { -0.228, 0.386 }; + cblas_zswap(N, X, incX, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], expected1[2*i], dbleps, "zswap(case 110) real"); + gsl_test_rel(X[2*i+1], expected1[2*i+1], dbleps, "zswap(case 110) imag"); + }; + }; + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[2*i], expected2[2*i], dbleps, "zswap(case 111) real"); + gsl_test_rel(Y[2*i+1], expected2[2*i+1], dbleps, "zswap(case 111) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_symm.c b/software/gsl-1.15/cblas/test_symm.c new file mode 100644 index 000000000..88a672a7a --- /dev/null +++ b/software/gsl-1.15/cblas/test_symm.c @@ -0,0 +1,827 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_symm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha = -0.3f; + float beta = -1.0f; + float A[] = { -0.581f }; + int lda = 1; + float B[] = { 0.157f, 0.451f }; + int ldb = 2; + float C[] = { -0.869f, -0.871f }; + int ldc = 2; + float C_expected[] = { 0.896365f, 0.949609f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1518)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha = -0.3f; + float beta = -1.0f; + float A[] = { 0.874f }; + int lda = 1; + float B[] = { 0.085f, 0.069f }; + int ldb = 1; + float C[] = { -0.495f, -0.828f }; + int ldc = 1; + float C_expected[] = { 0.472713f, 0.809908f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1519)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha = -1.0f; + float beta = 0.0f; + float A[] = { -0.671f, -0.343f, 0.6f, 0.177f }; + int lda = 2; + float B[] = { 0.043f, 0.01f }; + int ldb = 2; + float C[] = { 0.988f, 0.478f }; + int ldc = 2; + float C_expected[] = { 0.032283f, 0.012979f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1520)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha = -1.0f; + float beta = 0.0f; + float A[] = { 0.069f, 0.096f, 0.139f, -0.044f }; + int lda = 2; + float B[] = { -0.448f, 0.07f }; + int ldb = 1; + float C[] = { 0.361f, 0.995f }; + int ldc = 1; + float C_expected[] = { 0.021182f, 0.065352f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1521)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha = 0.0f; + float beta = -0.3f; + float A[] = { 0.745f }; + int lda = 1; + float B[] = { -0.269f, 0.448f }; + int ldb = 2; + float C[] = { -0.986f, 0.2f }; + int ldc = 2; + float C_expected[] = { 0.2958f, -0.06f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1522)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha = 0.0f; + float beta = -0.3f; + float A[] = { 0.96f }; + int lda = 1; + float B[] = { 0.392f, -0.07f }; + int ldb = 1; + float C[] = { -0.235f, 0.554f }; + int ldc = 1; + float C_expected[] = { 0.0705f, -0.1662f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1523)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha = -0.3f; + float beta = 0.1f; + float A[] = { -0.839f, 0.498f, -0.215f, -0.314f }; + int lda = 2; + float B[] = { -0.66f, 0.593f }; + int ldb = 2; + float C[] = { -0.806f, 0.525f }; + int ldc = 2; + float C_expected[] = { -0.208474f, 0.0657906f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1524)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha = -0.3f; + float beta = 0.1f; + float A[] = { 0.994f, -0.117f, -0.639f, 0.925f }; + int lda = 2; + float B[] = { -0.478f, 0.147f }; + int ldb = 1; + float C[] = { -0.814f, 0.316f }; + int ldc = 1; + float C_expected[] = { 0.0662993f, -0.0259703f }; + cblas_ssymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssymm(case 1525)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.981 }; + int lda = 1; + double B[] = { -0.823, 0.83 }; + int ldb = 2; + double C[] = { 0.991, 0.382 }; + int ldc = 2; + double C_expected[] = { 0.7487911, 0.626269 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1526)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.248 }; + int lda = 1; + double B[] = { 0.74, 0.068 }; + int ldb = 1; + double C[] = { -0.905, 0.742 }; + int ldc = 1; + double C_expected[] = { -0.849944, 0.7470592 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1527)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha = -1; + double beta = 1; + double A[] = { 0.591, -0.01, -0.192, -0.376 }; + int lda = 2; + double B[] = { 0.561, 0.946 }; + int ldb = 2; + double C[] = { 0.763, 0.189 }; + int ldc = 2; + double C_expected[] = { 0.440909, 0.550306 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1528)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha = -1; + double beta = 1; + double A[] = { -0.786, 0.87, 0.222, -0.043 }; + int lda = 2; + double B[] = { -0.503, -0.526 }; + int ldb = 1; + double C[] = { -0.027, -0.391 }; + int ldc = 1; + double C_expected[] = { -0.305586, -0.301952 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1529)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha = 0.1; + double beta = 0.1; + double A[] = { -0.468 }; + int lda = 1; + double B[] = { -0.881, 0.692 }; + int ldb = 2; + double C[] = { -0.812, -0.395 }; + int ldc = 2; + double C_expected[] = { -0.0399692, -0.0718856 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1530)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha = 0.1; + double beta = 0.1; + double A[] = { 0.849 }; + int lda = 1; + double B[] = { -0.887, 0.518 }; + int ldb = 1; + double C[] = { 0.414, -0.251 }; + int ldc = 1; + double C_expected[] = { -0.0339063, 0.0188782 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1531)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha = -1; + double beta = 1; + double A[] = { 0.457, 0.624, 0.807, 0.349 }; + int lda = 2; + double B[] = { -0.609, 0.03 }; + int ldb = 2; + double C[] = { 0.719, -0.624 }; + int ldc = 2; + double C_expected[] = { 0.973103, -0.143007 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1532)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha = -1; + double beta = 1; + double A[] = { -0.133, -0.117, -0.163, 0.795 }; + int lda = 2; + double B[] = { -0.882, 0.549 }; + int ldb = 1; + double C[] = { 0.715, -0.327 }; + int ldc = 1; + double C_expected[] = { 0.661927, -0.866649 }; + cblas_dsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsymm(case 1533)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { 0.476f, 0.816f }; + int lda = 1; + float B[] = { 0.282f, 0.852f, -0.891f, -0.588f }; + int ldb = 2; + float C[] = { 0.9f, 0.486f, -0.78f, -0.637f }; + int ldc = 2; + float C_expected[] = { 1.461f, -0.149664f, -0.835692f, 0.369944f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1534) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1534) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {1.0f, 0.0f}; + float A[] = { 0.048f, 0.172f }; + int lda = 1; + float B[] = { 0.786f, 0.783f, 0.809f, -0.569f }; + int ldb = 1; + float C[] = { -0.227f, -0.215f, 0.881f, 0.233f }; + int ldc = 1; + float C_expected[] = { -0.130052f, -0.387776f, 0.7443f, 0.121164f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1535) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1535) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { -0.495f, -0.012f, 0.843f, -0.986f, -0.243f, 0.833f, 0.921f, 0.004f }; + int lda = 2; + float B[] = { 0.876f, 0.612f, 0.805f, -0.57f }; + int ldb = 2; + float C[] = { 0.938f, -0.24f, -0.874f, -0.062f }; + int ldc = 2; + float C_expected[] = { 1.82769f, 0.628319f, 0.93157f, 1.21158f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1536) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1536) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { -0.812f, 0.83f, 0.705f, 0.15f, -0.463f, 0.901f, -0.547f, -0.483f }; + int lda = 2; + float B[] = { -0.808f, -0.664f, 0.352f, -0.102f }; + int ldb = 1; + float C[] = { -0.64f, 0.399f, 0.896f, -0.163f }; + int ldc = 1; + float C_expected[] = { -0.631906f, 0.496142f, 0.697798f, 1.62656f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1537) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1537) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.342f, -0.906f }; + int lda = 1; + float B[] = { 0.676f, 0.863f, -0.517f, -0.138f }; + int ldb = 2; + float C[] = { 0.274f, 0.388f, -0.271f, 0.205f }; + int ldc = 2; + float C_expected[] = { -1.40107f, 0.59131f, 0.096842f, -0.692206f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1538) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1538) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.418f, 0.354f }; + int lda = 1; + float B[] = { -0.74f, 0.018f, 0.395f, 0.248f }; + int ldb = 1; + float C[] = { -0.162f, 0.175f, -0.853f, 0.652f }; + int ldc = 1; + float C_expected[] = { 0.140692f, 0.092436f, -0.729318f, -1.09649f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1539) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1539) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { 0.12f, 0.496f, 0.313f, -0.136f, 0.987f, 0.532f, 0.58f, -0.687f }; + int lda = 2; + float B[] = { -0.587f, 0.278f, 0.857f, 0.136f }; + int ldb = 2; + float C[] = { 0.162f, 0.249f, -0.665f, 0.456f }; + int ldc = 2; + float C_expected[] = { -0.22769f, -0.0269913f, 0.0502096f, 0.0841558f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1540) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1540) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + float alpha[2] = {-0.3f, 0.1f}; + float beta[2] = {0.0f, 0.1f}; + float A[] = { 0.579f, -0.859f, 0.192f, -0.737f, 0.396f, -0.498f, 0.751f, -0.379f }; + int lda = 2; + float B[] = { 0.84f, -0.755f, -0.019f, -0.063f }; + int ldb = 1; + float C[] = { 0.04f, 0.639f, -0.876f, -0.778f }; + int ldc = 1; + float C_expected[] = { 0.115459f, 0.329813f, 0.288206f, 0.110315f }; + cblas_csymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csymm(case 1541) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csymm(case 1541) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0}; + double beta[2] = {0, 0}; + double A[] = { 0.511, -0.486 }; + int lda = 1; + double B[] = { 0.985, -0.923, -0.234, -0.756 }; + int ldb = 2; + double C[] = { -0.16, 0.049, 0.618, -0.349 }; + int ldc = 2; + double C_expected[] = { 0.0, 0.0, 0.0, 0.0 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1542) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1542) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {0, 0}; + double beta[2] = {0, 0}; + double A[] = { 0.46, -0.816 }; + int lda = 1; + double B[] = { 0.404, 0.113, -0.904, -0.627 }; + int ldb = 1; + double C[] = { 0.114, 0.318, 0.636, -0.839 }; + int ldc = 1; + double C_expected[] = { 0.0, 0.0, 0.0, 0.0 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1543) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1543) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {-1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.835, 0.344, 0.975, 0.634, 0.312, -0.659, -0.624, -0.175 }; + int lda = 2; + double B[] = { -0.707, -0.846, 0.825, -0.661 }; + int ldb = 2; + double C[] = { 0.352, -0.499, 0.267, 0.548 }; + int ldc = 2; + double C_expected[] = { -2.160518, -0.156877, 0.648536, 0.867299 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1544) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1544) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int M = 1; + int N = 2; + double alpha[2] = {-1, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.409, 0.013, -0.308, -0.317, -0.535, -0.697, -0.385, 0.119 }; + int lda = 2; + double B[] = { 0.299, -0.233, 0.093, 0.664 }; + int ldb = 1; + double C[] = { 0.699, 0.47, -0.347, -0.182 }; + int ldc = 1; + double C_expected[] = { -0.550491, 0.249777, 0.559487, 0.348221 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1545) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1545) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + double A[] = { -0.151, 0.635 }; + int lda = 1; + double B[] = { 0.711, -0.869, 0.153, 0.647 }; + int ldb = 2; + double C[] = { -0.299, 0.43, -0.307, 0.133 }; + int ldc = 2; + double C_expected[] = { 0.014454, 0.283704, -0.566948, -0.307542 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1546) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1546) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 1}; + double A[] = { 0.793, -0.543 }; + int lda = 1; + double B[] = { 0.054, -0.045, 0.989, 0.453 }; + int ldb = 1; + double C[] = { 0.443, -0.641, -0.809, -0.83 }; + int ldc = 1; + double C_expected[] = { 0.659387, 0.377993, 1.860256, -0.986798 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1547) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1547) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.432, -0.293, -0.819, 0.44, -0.818, -0.258, -0.836, 0.683 }; + int lda = 2; + double B[] = { -0.259, -0.878, 0.161, 0.744 }; + int ldb = 2; + double C[] = { 0.436, -0.655, -0.61, -0.875 }; + int ldc = 2; + double C_expected[] = { -0.521112, 0.460053, -0.04741, 1.148005 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1548) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1548) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int M = 1; + int N = 2; + double alpha[2] = {1, 0}; + double beta[2] = {-1, 0}; + double A[] = { -0.656, 0.378, -0.688, 0.676, 0.967, -0.804, 0.455, -0.425 }; + int lda = 2; + double B[] = { 0.791, -0.947, -0.945, -0.444 }; + int ldb = 1; + double C[] = { 0.014, -0.814, -0.091, -0.417 }; + int ldc = 1; + double C_expected[] = { 0.775374, 1.400882, -0.431711, 1.802857 }; + cblas_zsymm(order, side, uplo, M, N, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsymm(case 1549) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsymm(case 1549) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_symv.c b/software/gsl-1.15/cblas/test_symv.c new file mode 100644 index 000000000..923a0f590 --- /dev/null +++ b/software/gsl-1.15/cblas/test_symv.c @@ -0,0 +1,379 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_symv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1054)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1055)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1056)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1057)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1058)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1059)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1060)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + float alpha = 1.0f; + float beta = -1.0f; + int N = 1; + int lda = 1; + float A[] = { -0.428f }; + float X[] = { -0.34f }; + int incX = -1; + float Y[] = { -0.888f }; + int incY = -1; + float y_expected[] = { 1.03352f }; + cblas_ssymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], flteps, "ssymv(case 1061)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1062)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1063)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1064)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1065)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1066)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1067)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1068)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + double alpha = 0; + double beta = -0.3; + int N = 1; + int lda = 1; + double A[] = { 0.544 }; + double X[] = { -0.601 }; + int incX = -1; + double Y[] = { -0.852 }; + int incY = -1; + double y_expected[] = { 0.2556 }; + cblas_dsymv(order, uplo, N, alpha, A, lda, X, incX, beta, Y, incY); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(Y[i], y_expected[i], dbleps, "dsymv(case 1069)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_syr.c b/software/gsl-1.15/cblas/test_syr.c new file mode 100644 index 000000000..fc7b3976f --- /dev/null +++ b/software/gsl-1.15/cblas/test_syr.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_syr (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 0.1f; + float A[] = { -0.291f }; + float X[] = { 0.845f }; + int incX = -1; + float A_expected[] = { -0.219597f }; + cblas_ssyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr(case 1402)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 0.1f; + float A[] = { -0.291f }; + float X[] = { 0.845f }; + int incX = -1; + float A_expected[] = { -0.219597f }; + cblas_ssyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr(case 1403)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 0.1f; + float A[] = { -0.291f }; + float X[] = { 0.845f }; + int incX = -1; + float A_expected[] = { -0.219597f }; + cblas_ssyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr(case 1404)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 0.1f; + float A[] = { -0.291f }; + float X[] = { 0.845f }; + int incX = -1; + float A_expected[] = { -0.219597f }; + cblas_ssyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr(case 1405)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = -0.3; + double A[] = { -0.65 }; + double X[] = { -0.891 }; + int incX = -1; + double A_expected[] = { -0.8881643 }; + cblas_dsyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr(case 1406)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = -0.3; + double A[] = { -0.65 }; + double X[] = { -0.891 }; + int incX = -1; + double A_expected[] = { -0.8881643 }; + cblas_dsyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr(case 1407)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = -0.3; + double A[] = { -0.65 }; + double X[] = { -0.891 }; + int incX = -1; + double A_expected[] = { -0.8881643 }; + cblas_dsyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr(case 1408)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = -0.3; + double A[] = { -0.65 }; + double X[] = { -0.891 }; + int incX = -1; + double A_expected[] = { -0.8881643 }; + cblas_dsyr(order, uplo, N, alpha, X, incX, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr(case 1409)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_syr2.c b/software/gsl-1.15/cblas/test_syr2.c new file mode 100644 index 000000000..5f214f1eb --- /dev/null +++ b/software/gsl-1.15/cblas/test_syr2.c @@ -0,0 +1,187 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_syr2 (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 0.0f; + float A[] = { 0.862f }; + float X[] = { 0.823f }; + int incX = -1; + float Y[] = { 0.699f }; + int incY = -1; + float A_expected[] = { 0.862f }; + cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1434)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 0.0f; + float A[] = { 0.862f }; + float X[] = { 0.823f }; + int incX = -1; + float Y[] = { 0.699f }; + int incY = -1; + float A_expected[] = { 0.862f }; + cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1435)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + float alpha = 0.0f; + float A[] = { 0.862f }; + float X[] = { 0.823f }; + int incX = -1; + float Y[] = { 0.699f }; + int incY = -1; + float A_expected[] = { 0.862f }; + cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1436)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + float alpha = 0.0f; + float A[] = { 0.862f }; + float X[] = { 0.823f }; + int incX = -1; + float Y[] = { 0.699f }; + int incY = -1; + float A_expected[] = { 0.862f }; + cblas_ssyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], flteps, "ssyr2(case 1437)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = 0; + double A[] = { -0.824 }; + double X[] = { 0.684 }; + int incX = -1; + double Y[] = { 0.965 }; + int incY = -1; + double A_expected[] = { -0.824 }; + cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1438)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = 0; + double A[] = { -0.824 }; + double X[] = { 0.684 }; + int incX = -1; + double Y[] = { 0.965 }; + int incY = -1; + double A_expected[] = { -0.824 }; + cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1439)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int N = 1; + int lda = 1; + double alpha = 0; + double A[] = { -0.824 }; + double X[] = { 0.684 }; + int incX = -1; + double Y[] = { 0.965 }; + int incY = -1; + double A_expected[] = { -0.824 }; + cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1440)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int N = 1; + int lda = 1; + double alpha = 0; + double A[] = { -0.824 }; + double X[] = { 0.684 }; + int incX = -1; + double Y[] = { 0.965 }; + int incY = -1; + double A_expected[] = { -0.824 }; + cblas_dsyr2(order, uplo, N, alpha, X, incX, Y, incY, A, lda); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(A[i], A_expected[i], dbleps, "dsyr2(case 1441)"); + } + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_syr2k.c b/software/gsl-1.15/cblas/test_syr2k.c new file mode 100644 index 000000000..8955d0e78 --- /dev/null +++ b/software/gsl-1.15/cblas/test_syr2k.c @@ -0,0 +1,827 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_syr2k (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.915f, 0.445f }; + int lda = 2; + float B[] = { 0.213f, -0.194f }; + int ldb = 2; + float C[] = { -0.117f }; + int ldc = 1; + float C_expected[] = { -0.173245f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1614)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { 0.089f, -0.889f }; + int lda = 2; + float B[] = { -0.384f, 0.518f }; + int ldb = 2; + float C[] = { 0.069f }; + int ldc = 1; + float C_expected[] = { -0.0299356f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1615)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { 0.492f, 0.021f }; + int lda = 1; + float B[] = { -0.804f, -0.912f }; + int ldb = 1; + float C[] = { -0.851f }; + int ldc = 1; + float C_expected[] = { -0.933944f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1616)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha = 0.1f; + float beta = 1.0f; + float A[] = { -0.376f, 0.689f }; + int lda = 1; + float B[] = { 0.21f, 0.406f }; + int ldb = 1; + float C[] = { -0.581f }; + int ldc = 1; + float C_expected[] = { -0.540845f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1617)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { 0.629f, -0.883f }; + int lda = 1; + float B[] = { -0.165f, 0.02f }; + int ldb = 1; + float C[] = { 0.236f }; + int ldc = 1; + float C_expected[] = { -0.31369f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1618)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { 0.412f, -0.411f }; + int lda = 1; + float B[] = { 0.313f, 0.301f }; + int ldb = 1; + float C[] = { 0.222f }; + int ldc = 1; + float C_expected[] = { -0.05611f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1619)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { -0.02f, 0.593f }; + int lda = 2; + float B[] = { -0.144f, 0.846f }; + int ldb = 2; + float C[] = { -0.645f }; + int ldc = 1; + float C_expected[] = { 1.20262f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1620)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + float alpha = 1.0f; + float beta = -0.3f; + float A[] = { 0.253f, 0.937f }; + int lda = 2; + float B[] = { 0.24f, -0.27f }; + int ldb = 2; + float C[] = { 0.128f }; + int ldc = 1; + float C_expected[] = { -0.42294f }; + cblas_ssyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyr2k(case 1621)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha = 0.1; + double beta = 0; + double A[] = { -0.225, 0.857 }; + int lda = 2; + double B[] = { -0.933, 0.994 }; + int ldb = 2; + double C[] = { 0.177 }; + int ldc = 1; + double C_expected[] = { 0.2123566 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1622)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha = 0.1; + double beta = 0; + double A[] = { -0.955, 0.112 }; + int lda = 2; + double B[] = { -0.695, 0.719 }; + int ldb = 2; + double C[] = { 0.069 }; + int ldc = 1; + double C_expected[] = { 0.1488506 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1623)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha = 0.1; + double beta = 0; + double A[] = { 0.216, 0.911 }; + int lda = 1; + double B[] = { -0.074, -0.256 }; + int ldb = 1; + double C[] = { -0.621 }; + int ldc = 1; + double C_expected[] = { -0.04984 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1624)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha = 0.1; + double beta = 0; + double A[] = { -0.343, -0.381 }; + int lda = 1; + double B[] = { -0.433, -0.087 }; + int ldb = 1; + double C[] = { -0.889 }; + int ldc = 1; + double C_expected[] = { 0.0363332 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1625)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + double alpha = 1; + double beta = -1; + double A[] = { -0.633, 0.219 }; + int lda = 1; + double B[] = { 0.817, -0.683 }; + int ldb = 1; + double C[] = { -0.294 }; + int ldc = 1; + double C_expected[] = { -1.039476 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1626)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + double alpha = 1; + double beta = -1; + double A[] = { -0.887, -0.43 }; + int lda = 1; + double B[] = { 0.557, 0.912 }; + int ldb = 1; + double C[] = { 0.831 }; + int ldc = 1; + double C_expected[] = { -2.603438 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1627)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + double alpha = 1; + double beta = -1; + double A[] = { 0.397, -0.173 }; + int lda = 2; + double B[] = { 0.155, -0.99 }; + int ldb = 2; + double C[] = { 0.621 }; + int ldc = 1; + double C_expected[] = { -0.15539 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1628)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + double alpha = 1; + double beta = -1; + double A[] = { 0.833, -0.52 }; + int lda = 2; + double B[] = { 0.28, 0.481 }; + int ldb = 2; + double C[] = { 0.455 }; + int ldc = 1; + double C_expected[] = { -0.48876 }; + cblas_dsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyr2k(case 1629)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.248f, -0.037f, -0.124f, 0.998f }; + int lda = 2; + float B[] = { -0.608f, -0.115f, -0.718f, -0.551f }; + int ldb = 2; + float C[] = { 0.187f, -0.329f }; + int ldc = 1; + float C_expected[] = { 0.119445f, 0.157092f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1630) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1630) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { 0.068f, 0.751f, -0.449f, -0.598f }; + int lda = 2; + float B[] = { 0.616f, 0.805f, -0.635f, 0.773f }; + int ldb = 2; + float C[] = { -0.287f, 0.917f }; + int ldc = 1; + float C_expected[] = { -0.110002f, 0.0369404f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1631) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1631) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.396f, -0.603f, -0.131f, -0.288f }; + int lda = 1; + float B[] = { -0.64f, -0.444f, -0.085f, 0.936f }; + int ldb = 1; + float C[] = { 0.375f, -0.434f }; + int ldc = 1; + float C_expected[] = { -0.0927216f, 0.0532822f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1632) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1632) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { 0.655f, 0.16f, 0.45f, -0.747f }; + int lda = 1; + float B[] = { 0.923f, 0.432f, -0.986f, 0.259f }; + int ldb = 1; + float C[] = { 0.752f, 0.576f }; + int ldc = 1; + float C_expected[] = { -0.256746f, 0.0570436f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1633) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1633) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.765f, 0.487f, 0.7f, 0.768f }; + int lda = 1; + float B[] = { -0.529f, 0.056f, -0.584f, 0.928f }; + int ldb = 1; + float C[] = { -0.426f, 0.836f }; + int ldc = 1; + float C_expected[] = { 0.019875f, -0.148818f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1634) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1634) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { 0.25f, 0.489f, 0.8f, -0.642f }; + int lda = 1; + float B[] = { -0.732f, -0.856f, -0.654f, 0.591f }; + int ldb = 1; + float C[] = { -0.101f, 0.322f }; + int ldc = 1; + float C_expected[] = { -0.064144f, 0.0183612f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1635) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1635) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.579f, -0.971f, 0.521f, -0.824f }; + int lda = 2; + float B[] = { -0.227f, 0.907f, 0.457f, -0.274f }; + int ldb = 2; + float C[] = { 0.21f, -0.718f }; + int ldc = 1; + float C_expected[] = { 0.164812f, 0.20489f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1636) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1636) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + float alpha[2] = {0.0f, 0.1f}; + float beta[2] = {0.0f, 0.0f}; + float A[] = { -0.83f, -0.512f, -0.667f, -0.436f }; + int lda = 2; + float B[] = { -0.443f, 0.82f, -0.259f, -0.618f }; + int ldb = 2; + float C[] = { 0.583f, 0.668f }; + int ldc = 1; + float C_expected[] = { -0.0142692f, 0.138167f }; + cblas_csyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyr2k(case 1637) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyr2k(case 1637) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {0, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.315, 0.03, 0.281, 0.175 }; + int lda = 2; + double B[] = { -0.832, -0.964, 0.291, 0.476 }; + int ldb = 2; + double C[] = { -0.341, 0.743 }; + int ldc = 1; + double C_expected[] = { 0.028, -0.257 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1638) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1638) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {0, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { -0.159, -0.489, -0.11, 0.611 }; + int lda = 2; + double B[] = { -0.285, -0.048, -0.673, -0.492 }; + int ldb = 2; + double C[] = { 0.496, -0.626 }; + int ldc = 1; + double C_expected[] = { -0.0862, 0.2374 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1639) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1639) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {0, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.796, 0.872, -0.919, 0.748 }; + int lda = 1; + double B[] = { -0.945, 0.915, -0.252, -0.276 }; + int ldb = 1; + double C[] = { 0.07, -0.957 }; + int ldc = 1; + double C_expected[] = { 0.0747, 0.2941 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1640) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1640) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 1; + int K = 2; + double alpha[2] = {0, 0}; + double beta[2] = {-0.3, 0.1}; + double A[] = { 0.984, 0.526, 0.284, 0.806 }; + int lda = 1; + double B[] = { -0.509, -0.178, 0.188, -0.221 }; + int ldb = 1; + double C[] = { -0.388, 0.795 }; + int ldc = 1; + double C_expected[] = { 0.0369, -0.2773 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1641) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1641) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0.1}; + double A[] = { 0.628, 0.846, -0.645, 0.032 }; + int lda = 1; + double B[] = { 0.545, -0.54, 0.493, -0.035 }; + int ldb = 1; + double C[] = { -0.16, -0.06 }; + int ldc = 1; + double C_expected[] = { 0.97047, 0.304602 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1642) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1642) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0.1}; + double A[] = { -0.556, -0.946, 0.177, -0.859 }; + int lda = 1; + double B[] = { 0.423, -0.91, 0.736, -0.251 }; + int ldb = 1; + double C[] = { -0.478, 0.519 }; + int ldc = 1; + double C_expected[] = { -2.41467, -1.189498 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1643) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1643) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0.1}; + double A[] = { -0.582, 0.09, -0.176, 0.784 }; + int lda = 2; + double B[] = { 0.687, -0.859, 0.945, 0.756 }; + int ldb = 2; + double C[] = { -0.663, -0.186 }; + int ldc = 1; + double C_expected[] = { -2.144496, 2.272884 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1644) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1644) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 1; + int K = 2; + double alpha[2] = {1, 0}; + double beta[2] = {0, 0.1}; + double A[] = { 0.231, -0.452, -0.112, -0.837 }; + int lda = 2; + double B[] = { -0.258, 0.464, -0.224, 0.893 }; + int ldb = 2; + double C[] = { -0.448, 0.046 }; + int ldc = 1; + double C_expected[] = { 1.840718, 0.577744 }; + cblas_zsyr2k(order, uplo, trans, N, K, alpha, A, lda, B, ldb, beta, C, ldc); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyr2k(case 1645) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyr2k(case 1645) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_syrk.c b/software/gsl-1.15/cblas/test_syrk.c new file mode 100644 index 000000000..21531d526 --- /dev/null +++ b/software/gsl-1.15/cblas/test_syrk.c @@ -0,0 +1,763 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_syrk (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha = -1.0f; + float beta = 0.1f; + float A[] = { 0.412f, -0.229f }; + int lda = 1; + float C[] = { 0.628f, -0.664f, -0.268f, 0.096f }; + int ldc = 2; + float C_expected[] = { -0.106944f, 0.027948f, -0.268f, -0.042841f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1566)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha = -1.0f; + float beta = 0.1f; + float A[] = { 0.101f, -0.653f }; + int lda = 2; + float C[] = { 0.432f, 0.107f, -0.952f, -0.532f }; + int ldc = 2; + float C_expected[] = { 0.032999f, 0.107f, -0.029247f, -0.479609f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1567)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + float alpha = 1.0f; + float beta = 0.1f; + float A[] = { 0.79f, 0.595f }; + int lda = 2; + float C[] = { 0.257f, 0.183f, -0.021f, -0.053f }; + int ldc = 2; + float C_expected[] = { 0.6498f, 0.48835f, -0.021f, 0.348725f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1568)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + float alpha = 1.0f; + float beta = 0.1f; + float A[] = { -0.181f, -0.654f }; + int lda = 1; + float C[] = { -0.4f, 0.615f, 0.147f, -0.163f }; + int ldc = 2; + float C_expected[] = { -0.007239f, 0.615f, 0.133074f, 0.411416f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1569)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha = 0.0f; + float beta = -1.0f; + float A[] = { -0.191f, 0.584f }; + int lda = 1; + float C[] = { -0.719f, -0.681f, -0.003f, 0.544f }; + int ldc = 2; + float C_expected[] = { 0.719f, -0.681f, 0.003f, -0.544f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1570)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha = 0.0f; + float beta = -1.0f; + float A[] = { 0.788f, 0.041f }; + int lda = 2; + float C[] = { 0.029f, 0.365f, 0.739f, -0.769f }; + int ldc = 2; + float C_expected[] = { -0.029f, -0.365f, 0.739f, 0.769f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1571)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + float alpha = -0.3f; + float beta = -1.0f; + float A[] = { 0.733f, 0.678f }; + int lda = 2; + float C[] = { -0.941f, 0.96f, 0.07f, -0.295f }; + int ldc = 2; + float C_expected[] = { 0.779813f, 0.96f, -0.219092f, 0.157095f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1572)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + float alpha = -0.3f; + float beta = -1.0f; + float A[] = { -0.87f, 0.675f }; + int lda = 1; + float C[] = { -0.602f, -0.432f, -0.984f, 0.384f }; + int ldc = 2; + float C_expected[] = { 0.37493f, 0.608175f, -0.984f, -0.520687f }; + cblas_ssyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], flteps, "ssyrk(case 1573)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 0.1; + double beta = -0.3; + double A[] = { 0.169, -0.875 }; + int lda = 1; + double C[] = { 0.159, 0.277, 0.865, 0.346 }; + int ldc = 2; + double C_expected[] = { -0.0448439, -0.0978875, 0.865, -0.0272375 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1574)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 0.1; + double beta = -0.3; + double A[] = { 0.536, -0.725 }; + int lda = 2; + double C[] = { 0.154, -0.445, -0.841, -0.91 }; + int ldc = 2; + double C_expected[] = { -0.0174704, -0.445, 0.21344, 0.3255625 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1575)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + double alpha = 0; + double beta = -1; + double A[] = { -0.07, 0.8 }; + int lda = 2; + double C[] = { 0.823, -0.88, -0.136, 0.793 }; + int ldc = 2; + double C_expected[] = { -0.823, 0.88, -0.136, -0.793 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1576)"); + } + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + double alpha = 0; + double beta = -1; + double A[] = { -0.058, 0.649 }; + int lda = 1; + double C[] = { -0.187, 0.294, -0.004, -0.933 }; + int ldc = 2; + double C_expected[] = { 0.187, 0.294, 0.004, 0.933 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1577)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 1; + double beta = -1; + double A[] = { 0.263, -0.289 }; + int lda = 1; + double C[] = { 0.554, -0.679, 0.993, 0.758 }; + int ldc = 2; + double C_expected[] = { -0.484831, -0.679, -1.069007, -0.674479 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1578)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha = 1; + double beta = -1; + double A[] = { -0.265, -0.837 }; + int lda = 2; + double C[] = { -0.994, 0.967, -0.34, -0.069 }; + int ldc = 2; + double C_expected[] = { 1.064225, -0.745195, -0.34, 0.769569 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1579)"); + } + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + double alpha = -0.3; + double beta = 1; + double A[] = { -0.464, 0.394 }; + int lda = 2; + double C[] = { -0.45, -0.447, 0.649, 0.055 }; + int ldc = 2; + double C_expected[] = { -0.5145888, -0.447, 0.7038448, 0.0084292 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1580)"); + } + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + double alpha = -0.3; + double beta = 1; + double A[] = { 0.815, 0.168 }; + int lda = 1; + double C[] = { 0.817, -0.957, -0.395, -0.382 }; + int ldc = 2; + double C_expected[] = { 0.6177325, -0.998076, -0.395, -0.3904672 }; + cblas_dsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[i], C_expected[i], dbleps, "dsyrk(case 1581)"); + } + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.447f, -0.507f, -0.425f, 0.701f }; + int lda = 1; + float C[] = { 0.16f, -0.245f, 0.922f, -0.437f, 0.24f, 0.008f, -0.095f, 0.749f }; + int ldc = 2; + float C_expected[] = { -0.0235f, 0.0895f, -0.2329f, 0.2233f, 0.24f, 0.008f, -0.0464f, -0.2342f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1582) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1582) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + float alpha[2] = {0.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { -0.421f, -0.435f, -0.914f, -0.493f }; + int lda = 2; + float C[] = { -0.761f, -0.38f, 0.043f, -0.999f, 0.779f, 0.238f, 0.082f, 0.394f }; + int ldc = 2; + float C_expected[] = { 0.2663f, 0.0379f, 0.043f, -0.999f, -0.2575f, 0.0065f, -0.064f, -0.11f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1583) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1583) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.827f, -0.896f, 0.417f, 0.865f }; + int lda = 2; + float C[] = { -0.349f, -0.31f, 0.972f, 0.794f, -0.906f, -0.595f, -0.089f, -0.333f }; + int ldc = 2; + float C_expected[] = { 0.254587f, 1.54008f, -1.4909f, -0.482723f, -0.906f, -0.595f, 0.634336f, -0.63041f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1584) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1584) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + float alpha[2] = {-1.0f, 0.0f}; + float beta[2] = {-0.3f, 0.1f}; + float A[] = { 0.607f, 0.747f, -0.889f, 0.333f }; + int lda = 1; + float C[] = { 0.244f, 0.564f, 0.009f, 0.578f, -0.827f, 0.558f, -0.337f, 0.731f }; + int ldc = 2; + float C_expected[] = { 0.05996f, -1.05166f, 0.009f, 0.578f, 0.980674f, 0.211852f, -0.651432f, 0.339074f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1585) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1585) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.784f, -0.281f, -0.88f, 0.479f }; + int lda = 1; + float C[] = { 0.491f, 0.531f, 0.805f, -0.097f, 0.728f, 0.674f, -0.705f, -0.754f }; + int ldc = 2; + float C_expected[] = { 0.004695f, 0.050392f, 0.805f, -0.097f, -1.22932f, 1.35082f, 1.29896f, -1.54804f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1586) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1586) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + float alpha[2] = {1.0f, 0.0f}; + float beta[2] = {0.0f, 1.0f}; + float A[] = { 0.272f, -0.146f, 0.155f, 0.038f }; + int lda = 2; + float C[] = { 0.533f, -0.41f, -0.904f, 0.301f, -0.836f, 0.57f, -0.374f, -0.293f }; + int ldc = 2; + float C_expected[] = { 0.462668f, 0.453576f, -0.253292f, -0.916294f, -0.836f, 0.57f, 0.315581f, -0.36222f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1587) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1587) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { -0.055f, -0.127f, -0.896f, -0.625f }; + int lda = 2; + float C[] = { -0.619f, 0.511f, -0.877f, 0.557f, -0.801f, -0.437f, -0.922f, 0.332f }; + int ldc = 2; + float C_expected[] = { 0.60503f, -0.524104f, -0.877f, 0.557f, 0.652833f, 0.406905f, -0.198f, 0.080191f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1588) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1588) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + float alpha[2] = {0.0f, 1.0f}; + float beta[2] = {-1.0f, 0.0f}; + float A[] = { -0.528f, 0.759f, -0.079f, 0.952f }; + int lda = 1; + float C[] = { 0.775f, 0.855f, 0.786f, 0.525f, 0.85f, 0.044f, 0.658f, 0.947f }; + int ldc = 2; + float C_expected[] = { 0.026504f, -1.1523f, -0.223383f, -1.20586f, 0.85f, 0.044f, -0.507584f, -1.84706f }; + cblas_csyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], flteps, "csyrk(case 1589) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], flteps, "csyrk(case 1589) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { -0.049, -0.687, -0.434, 0.294 }; + int lda = 1; + double C[] = { 0.937, -0.113, 0.796, 0.293, 0.876, -0.199, -0.757, -0.103 }; + int ldc = 2; + double C_expected[] = { 0.467432, -0.045674, 1.019244, 0.576752, 0.876, -0.199, -0.65508, -0.358192 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1590) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1590) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 111; + int N = 2; + int K = 1; + double alpha[2] = {1, 0}; + double beta[2] = {1, 0}; + double A[] = { 0.359, -0.364, 0.926, -0.69 }; + int lda = 2; + double C[] = { 0.306, 0.249, 0.28, 0.229, 0.866, 0.092, 0.886, -0.283 }; + int ldc = 2; + double C_expected[] = { 0.302385, -0.012352, 0.28, 0.229, 0.947274, -0.492774, 1.267376, -1.56088 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1591) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1591) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 0}; + double A[] = { 0.607, 0.555, -0.85, 0.831 }; + int lda = 2; + double C[] = { 0.069, 0.368, 0.551, -0.912, -0.243, -0.063, -0.924, 0.192 }; + int ldc = 2; + double C_expected[] = { -0.0855042, -0.1960886, 0.2898798, -0.1075156, -0.243, -0.063, 0.1316883, 0.4270039 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1592) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1592) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 121; + int trans = 112; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {0, 0}; + double A[] = { 0.427, 0.86, -0.136, 0.002 }; + int lda = 1; + double C[] = { 0.398, -0.47, 0.011, -0.547, -0.106, 0.016, 0.681, 0.246 }; + int ldc = 2; + double C_expected[] = { 0.0937373, -0.2760591, 0.011, -0.547, 0.0295482, 0.0288526, -0.0054932, 0.0020124 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1593) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1593) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.718, 0.023, 0.355, -0.492 }; + int lda = 1; + double C[] = { -0.637, -0.727, -0.475, -0.776, 0.802, -0.55, -0.837, 0.222 }; + int ldc = 2; + double C_expected[] = { -0.7948013, -0.6854089, -0.475, -0.776, 0.7566473, -0.4198521, -0.7672563, 0.3151921 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1594) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1594) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 111; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {1, 0}; + double A[] = { 0.209, 0.139, -0.202, -0.223 }; + int lda = 2; + double C[] = { -0.695, 0.524, 0.212, -0.88, -0.752, 0.291, 0.684, -0.124 }; + int ldc = 2; + double C_expected[] = { -0.7081182, 0.5090054, 0.2228348, -0.8587166, -0.752, 0.291, 0.6776683, -0.1519201 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1595) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1595) imag"); + }; + }; + }; + + + { + int order = 101; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {1, 0}; + double A[] = { -0.365, -0.624, 0.632, 0.348 }; + int lda = 2; + double C[] = { 0.877, 0.927, -0.377, 0.967, 0.008, 0.292, -0.779, 0.794 }; + int ldc = 2; + double C_expected[] = { 0.9082933, 0.7647289, -0.377, 0.967, 0.0641972, 0.4470636, -0.9064832, 0.6898704 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1596) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1596) imag"); + }; + }; + }; + + + { + int order = 102; + int uplo = 122; + int trans = 112; + int N = 2; + int K = 1; + double alpha[2] = {-0.3, 0.1}; + double beta[2] = {1, 0}; + double A[] = { -0.067, -0.586, 0.208, 0.331 }; + int lda = 1; + double C[] = { 0.584, -0.454, 0.93, 0.782, 0.489, -0.278, 0.081, -0.919 }; + int ldc = 2; + double C_expected[] = { 0.6778197, -0.5114479, 0.8903975, 0.8432225, 0.489, -0.278, 0.0871195, -0.9669385 }; + cblas_zsyrk(order, uplo, trans, N, K, alpha, A, lda, beta, C, ldc); + { + int i; + for (i = 0; i < 4; i++) { + gsl_test_rel(C[2*i], C_expected[2*i], dbleps, "zsyrk(case 1597) real"); + gsl_test_rel(C[2*i+1], C_expected[2*i+1], dbleps, "zsyrk(case 1597) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_tbmv.c b/software/gsl-1.15/cblas/test_tbmv.c new file mode 100644 index 000000000..abd349f82 --- /dev/null +++ b/software/gsl-1.15/cblas/test_tbmv.c @@ -0,0 +1,1819 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_tbmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { 0.017088f, 0.315595f, 0.243875f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 894)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { -0.089f, -0.721909f, 0.129992f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 895)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { 0.156927f, -0.159004f, 0.098252f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 896)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { 0.043096f, -0.584876f, -0.203f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 897)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { 0.024831f, -0.24504f, 0.447756f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 898)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { -0.089f, -0.670912f, 0.146504f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 899)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { -0.24504f, 0.447756f, -0.089117f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 900)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.439f, -0.484f, -0.952f, -0.508f, 0.381f, -0.889f, -0.192f, -0.279f, -0.155f }; + float X[] = { -0.089f, -0.688f, -0.203f }; + int incX = -1; + float x_expected[] = { -0.351128f, -0.589748f, -0.203f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 901)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.156047f, 0.189418f, -0.52828f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 902)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.194342f, -0.449858f, -0.562f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 903)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { -0.0046f, 0.156047f, 0.189418f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 904)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.023f, -0.516295f, -0.423724f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 905)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.328565f, 0.326454f, 0.051142f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 906)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.356165f, -0.345888f, -0.562f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 907)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { -0.015295f, 0.13041f, -0.482689f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 908)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.94f, -0.091f, 0.984f, -0.276f, -0.342f, -0.484f, -0.665f, -0.2f, 0.349f }; + float X[] = { 0.023f, -0.501f, -0.562f }; + int incX = -1; + float x_expected[] = { 0.023f, -0.508866f, -0.516409f }; + cblas_stbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbmv(case 909)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { 0.50204, 0.563918, -0.590448 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 910)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { -0.77, -0.95429, -0.44419 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 911)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { 1.214016, -0.433258, 0.321835 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 912)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { -0.236664, -1.106472, 0.337 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 913)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { 0.68068, 0.357254, 1.022043 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 914)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { -0.77, -0.31596, 1.037208 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 915)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { 0.357254, 1.022043, 0.190742 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 916)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.566, 0.955, -0.086, -0.856, 0.177, 0.974, -0.652, -0.884, 0.77 }; + double X[] = { -0.77, -0.818, 0.337 }; + int incX = -1; + double x_expected[] = { -0.914786, -0.496165, 0.337 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 917)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { 0.610833, -0.293243, 0.02914 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 918)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { -0.635031, 0.574, 0.155 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 919)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { 0.024679, 0.610833, -0.293243 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 920)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { -0.851, 0.875864, -0.231243 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 921)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { -0.198505, 0.091504, 0.093 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 922)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { -1.074184, 0.356535, 0.155 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 923)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { 0.394864, -0.768342, 0.31774 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 924)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.188, 0.6, -0.743, -0.803, 0.449, -0.681, -0.464, -0.029, 0.553 }; + double X[] = { -0.851, 0.481, 0.155 }; + int incX = -1; + double x_expected[] = { -0.851, 0.098901, 0.4436 }; + cblas_dtbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbmv(case 925)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.113114f, -0.051704f, -0.403567f, -0.288349f, -0.223936f, 0.841145f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 926) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 926) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.46f, 0.069f, -0.14027f, -0.23208f, -0.537722f, 0.841425f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 927) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 927) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.099689f, 0.487805f, 0.353793f, 0.325411f, -0.225658f, -0.776023f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 928) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 928) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.39057f, 0.113296f, 0.388863f, 0.131011f, -0.236f, 0.605f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 929) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 929) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.169119f, 0.443509f, 0.159816f, 0.139696f, -0.180955f, -0.835292f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 930) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 930) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.46f, 0.069f, 0.194886f, -0.054704f, -0.191297f, 0.545731f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 931) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 931) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { 0.159816f, 0.139696f, -0.180955f, -0.835292f, 0.077786f, 0.60472f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 932) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 932) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.824f, -0.45f, -0.987f, 0.758f, 0.42f, -0.357f, 0.147f, -0.191f, 0.88f, 0.63f, 0.155f, -0.573f, 0.224f, 0.146f, 0.501f, -0.889f, 0.456f, 0.796f }; + float X[] = { -0.46f, 0.069f, 0.308f, -0.003f, -0.236f, 0.605f }; + int incX = -1; + float x_expected[] = { -0.18707f, 0.2604f, 0.082342f, -0.779023f, -0.236f, 0.605f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 933) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 933) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.647885f, 0.621535f, -0.104407f, 0.05309f, 0.732704f, 0.055982f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 934) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 934) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 1.2955f, 0.190774f, -0.247934f, 0.982616f, -0.894f, -0.116f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 935) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 935) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.096482f, -0.071661f, 0.647885f, 0.621535f, -0.104407f, 0.05309f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 936) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 936) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.411f, -0.308f, -1.14861f, 0.933761f, -1.66247f, -0.234526f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 937) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 937) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.632361f, -0.409373f, 0.578489f, 0.012724f, 0.664066f, 0.171616f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 938) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 938) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.946879f, -0.645712f, -1.21801f, 0.32495f, -0.894f, -0.116f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 939) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 939) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { -0.236612f, 0.122761f, -1.12184f, -0.358823f, 1.4975f, -0.470595f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 940) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 940) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.814f, 0.043f, -0.755f, -0.094f, 0.876f, 0.257f, 0.406f, 0.491f, -0.27f, -0.787f, 0.545f, 0.732f, -0.512f, -0.085f, 0.234f, 0.001f, -0.225f, -0.002f }; + float X[] = { 0.411f, -0.308f, -0.912f, 0.811f, -0.894f, -0.116f }; + int incX = -1; + float x_expected[] = { 0.411f, -0.308f, -1.26537f, 0.570703f, -0.129206f, -0.642577f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 941) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 941) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { 0.413357f, 0.178267f, -0.114618f, -1.35595f, -0.513288f, 0.611332f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 942) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 942) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { 0.368428f, 0.071217f, -0.954366f, -0.390486f, 0.694f, -0.954f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 943) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 943) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { -0.084786f, -0.059464f, 0.413357f, 0.178267f, -0.114618f, -1.35595f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 944) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 944) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { 0.065f, -0.082f, -0.636071f, 0.80005f, 0.787748f, -1.14446f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 945) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 945) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { -1.18498f, -0.424201f, 0.230196f, 0.374209f, -0.208366f, -1.16549f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 946) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 946) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { -1.03519f, -0.446737f, -0.819232f, 0.995992f, 0.694f, -0.954f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 947) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 947) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { 0.109929f, 0.02505f, 0.062939f, -0.202464f, -0.470658f, 1.69006f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 948) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 948) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.675f, 0.047f, 0.695f, 0.724f, -0.438f, 0.991f, -0.188f, -0.06f, -0.093f, 0.302f, 0.842f, -0.753f, 0.465f, -0.972f, -0.058f, 0.988f, 0.093f, 0.164f }; + float X[] = { 0.065f, -0.082f, -0.746f, 0.775f, 0.694f, -0.954f }; + int incX = -1; + float x_expected[] = { 0.065f, -0.082f, -0.776809f, 0.762996f, 0.73663f, 0.124729f }; + cblas_ctbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbmv(case 949) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbmv(case 949) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { -0.010019, -0.1678, -0.042017, -1.112094, 0.010004, -0.480427 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 950) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 950) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { 0.064, 0.169, -0.80842, -0.715637, -0.829924, -0.212971 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 951) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 951) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { 0.634014, 0.796937, -0.585538, -0.895375, -0.125887, 0.010019 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 952) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 952) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { 0.567497, 1.085122, -1.217792, -1.322566, -0.641, -0.103 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 953) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 953) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { 0.130517, -0.119185, -0.187765, -0.519609, -0.169484, -1.165438 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 954) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 954) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { 0.064, 0.169, -0.820019, -0.9468, -0.684597, -1.278457 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 955) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 955) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { -0.187765, -0.519609, -0.169484, -1.165438, 0.198928, -0.370456 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 956) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 956) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.212, 0.612, 0.189, -0.046, -0.124, 0.82, 0.753, 0.727, 0.331, 0.116, 0.504, -0.673, -0.888, -0.277, -0.361, -0.909, 0.982, -0.124 }; + double X[] = { 0.064, 0.169, -0.81, -0.779, -0.641, -0.103 }; + int incX = -1; + double x_expected[] = { -0.113746, -0.182809, -0.935887, -0.768981, -0.641, -0.103 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 957) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 957) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { -0.436746, 0.963714, -1.087615, -0.018695, 0.30063, 0.12958 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 958) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 958) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.895682, 1.407174, 0.2408, -0.14282, -0.649, 0.188 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 959) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 959) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.785744, -0.3966, -0.436746, 0.963714, -1.087615, -0.018695 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 960) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 960) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.884, 0.636, 0.472572, 0.47454, -1.056415, 0.594125 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 961) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 961) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.464705, -0.108078, 0.094975, 0.376323, -0.6802, -0.42482 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 962) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 962) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.562961, 0.924522, 1.004293, -0.112851, -0.649, 0.188 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 963) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 963) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { -0.448428, 0.19254, -0.674583, 1.236189, 0.780774, 1.167088 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 964) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 964) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.374, -0.308, 0.792, 0.884, -0.794, -0.055, -0.281, 0.527, 0.246, 0.762, 0.853, 0.891, -0.231, 0.384, 0.373, -0.717, -0.957, -0.338 }; + double X[] = { 0.884, 0.636, 0.921, 0.282, -0.649, 0.188 }; + int incX = -1; + double x_expected[] = { 0.884, 0.636, 0.653832, 1.112064, -0.168856, 1.225508 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 965) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 965) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -0.59515, 0.077106, -0.27658, -0.637356, 0.407252, -0.308844 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 966) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 966) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -1.46131, 0.537642, 0.624614, 0.762252, 0.326, 0.428 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 967) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 967) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -0.536274, 0.421806, -0.59515, 0.077106, -0.27658, -0.637356 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 968) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 968) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -0.591, -0.084, 0.98216, 0.400464, 0.131806, -0.026608 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 969) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 969) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -1.68293, 0.796222, -0.96062, 0.415172, -0.082386, -0.182748 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 970) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 970) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -1.737656, 0.290416, 0.61669, 0.73853, 0.326, 0.428 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 971) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 971) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { 0.27516, -0.544536, -0.10627, -0.988374, 0.229991, -0.711267 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 972) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 972) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.002, 0.95, -0.363, 0.084, -0.646, 0.816, -0.407, 0.099, -0.02, -0.906, -0.874, 0.191, -0.328, -0.968, 0.79, 0.826, -0.795, 0.277 }; + double X[] = { -0.591, -0.084, 0.707, 0.945, 0.326, 0.428 }; + int incX = -1; + double x_expected[] = { -0.591, -0.084, 0.794924, 0.411234, 0.148739, 0.025577 }; + cblas_ztbmv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbmv(case 973) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbmv(case 973) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_tbsv.c b/software/gsl-1.15/cblas/test_tbsv.c new file mode 100644 index 000000000..2d9d290fe --- /dev/null +++ b/software/gsl-1.15/cblas/test_tbsv.c @@ -0,0 +1,1819 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_tbsv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -0.354651f, -2.40855f, 0.481076f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1230)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -0.305f, 0.84973f, -1.00859f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1231)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -2.71619f, -1.09055f, -3.97608f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1232)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -0.56589f, 0.303361f, -0.831f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1233)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { 1.30901f, -0.656172f, -5.13458f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1234)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -0.305f, 0.8723f, -0.509121f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1235)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { 0.524539f, -0.961964f, 1.22026f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1236)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.681f, 0.209f, 0.436f, -0.369f, 0.786f, -0.84f, 0.86f, -0.233f, 0.734f }; + float X[] = { -0.305f, 0.61f, -0.831f }; + int incX = -1; + float x_expected[] = { -0.920972f, 0.783679f, -0.831f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1237)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 16.8676f, 17.3503f, 5.27273f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1238)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 0.209676f, 0.54278f, 0.116f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1239)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 0.212077f, -5.01482f, -1.14722f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1240)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 0.144f, 0.615848f, 0.242249f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1241)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 1.28844f, -5.49514f, 0.145912f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1242)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 0.0563823f, 0.65878f, 0.116f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1243)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 1.08271f, -3.73662f, 140.301f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1244)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.022f, 0.795f, -0.389f, -0.205f, -0.121f, 0.323f, 0.133f, 0.679f, 0.742f }; + float X[] = { 0.144f, 0.635f, 0.116f }; + int incX = -1; + float x_expected[] = { 0.144f, 0.652424f, -0.402677f }; + cblas_stbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stbsv(case 1245)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { -0.967930029155, 0.138412575592, 0.506166027443 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1246)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { 0.332, 0.819736, 0.615143048 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1247)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { -0.364842154056, -0.326531140246, -0.568848758465 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1248)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { 0.588397988, 0.747516, 0.252 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1249)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { -0.550580431177, -0.571849444278, 0.248263427151 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1250)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { 0.332, 0.701876, 0.696287508 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1251)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { 1.50217883761, -1.21382140588, 0.407108239095 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1252)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.619, -0.443, 0.957, -0.633, -0.698, 0.783, -0.343, -0.603, 0.735 }; + double X[] = { 0.332, 0.588, 0.252 }; + int incX = -1; + double x_expected[] = { 0.820345928, 0.699636, 0.252 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1253)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 18.994209959, 20.323927329, 2.7135678392 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1254)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 1.06925836, 0.72162, -0.54 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1255)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { -3.27683615819, -4.47682615869, -1.97425326753 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1256)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 0.58, 0.11952, -0.53844624 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1257)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { -6.6461072986, -0.788837290809, -1.78217821782 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1258)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 0.16345912, 0.55098, -0.54 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1259)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 0.767195767196, -82.9352869353, -123.564783625 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1260)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.199, 0.303, -0.705, -0.013, -0.678, 0.547, 0.756, -0.177, -0.079 }; + double X[] = { 0.58, 0.558, -0.54 }; + int incX = -1; + double x_expected[] = { 0.58, 0.95124, -0.82822572 }; + cblas_dtbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtbsv(case 1261)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 1.28871f, 0.289887f, 1.76043f, 1.27481f, 1.56506f, -2.35181f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1262) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1262) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 0.11f, 0.787f, -1.04259f, 0.18935f, 0.228474f, -0.564917f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1263) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1263) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { -0.0906249f, 3.09442f, -1.60036f, 1.28475f, -0.582941f, 0.0383898f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1264) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1264) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 1.05233f, 0.79657f, -0.566883f, 1.46031f, -0.437f, 0.592f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1265) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1265) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { -0.735844f, 1.11782f, -0.28244f, 1.16117f, -0.66707f, 0.938302f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1266) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1266) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 0.11f, 0.787f, -0.406239f, 0.580226f, -0.171935f, 1.2125f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1267) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1267) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 1.70081f, 2.20477f, 1.32753f, -0.522112f, 0.0223652f, -0.62248f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1268) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1268) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { -0.975f, -0.667f, 0.813f, -0.962f, -0.961f, 0.226f, -0.503f, 0.809f, 0.81f, -0.162f, -0.027f, -0.044f, 0.212f, 0.563f, 0.446f, -0.392f, 0.798f, -0.07f }; + float X[] = { 0.11f, 0.787f, -0.826f, 0.809f, -0.437f, 0.592f }; + int incX = -1; + float x_expected[] = { 0.967596f, 0.693563f, -1.04022f, -0.09269f, -0.437f, 0.592f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1269) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1269) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -1.11985f, 0.801655f, 0.273814f, -1.09438f, -0.52531f, 0.166748f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1270) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1270) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { 0.266087f, 0.618557f, 0.031897f, -0.914419f, -0.134f, 0.179f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1271) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1271) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -0.762749f, -0.016292f, 1.59299f, 0.158751f, -4.75603f, -1.78591f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1272) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1272) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -0.509f, 0.608f, -0.332731f, -1.24444f, 0.262904f, 1.21961f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1273) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1273) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -1.76046f, 0.0455463f, 1.38348f, 0.700097f, -0.669451f, 0.321896f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1274) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1274) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { 0.151523f, 0.78611f, 0.120309f, -1.01387f, -0.134f, 0.179f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1275) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1275) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -1.00779f, -0.620278f, 0.81164f, -1.90759f, -1.32022f, 1.48356f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1276) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1276) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.33f, -0.236f, 0.267f, -0.139f, 0.25f, 0.509f, 0.86f, -0.089f, -0.018f, -0.847f, 0.424f, -0.573f, 0.097f, -0.663f, 0.65f, -0.811f, 0.283f, 0.032f }; + float X[] = { -0.509f, 0.608f, 0.021f, -0.848f, -0.134f, 0.179f }; + int incX = -1; + float x_expected[] = { -0.509f, 0.608f, -0.503138f, -1.26818f, 0.176615f, 0.447668f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1277) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1277) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -0.613838f, -1.13321f, -1.34847f, 0.0432903f, 0.0879552f, -0.479334f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1278) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1278) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { 0.76323f, -1.23595f, 0.943058f, -0.618694f, 0.296f, 0.034f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1279) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1279) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -1.15557f, -2.50103f, -3.85402f, -1.04833f, 0.414582f, 5.91218f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1280) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1280) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -0.037f, -0.599f, 1.39953f, -0.064424f, 1.0801f, -0.481747f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1281) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1281) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -3.0802f, -9.09377f, -1.05845f, 0.99239f, 0.259763f, -0.687744f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1282) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1282) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -0.513897f, 0.632031f, 1.14112f, -0.580648f, 0.296f, 0.034f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1283) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1283) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { 0.360899f, -0.456643f, -2.31803f, 0.257877f, 1.56928f, -0.922115f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1284) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1284) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + float A[] = { 0.041f, -0.61f, 0.099f, -0.393f, 0.357f, -0.984f, -0.576f, -0.342f, -0.903f, -0.083f, -0.157f, -0.694f, 0.768f, 0.688f, 0.203f, -0.079f, 0.298f, -0.424f }; + float X[] = { -0.037f, -0.599f, 0.959f, -0.499f, 0.296f, 0.034f }; + int incX = -1; + float x_expected[] = { -0.037f, -0.599f, 0.875872f, -1.03683f, -0.198184f, -0.207572f }; + cblas_ctbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctbsv(case 1285) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctbsv(case 1285) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { 0.0490338308139, -0.158433417494, 0.261604043488, 1.28058846321, 1.77633350191, -1.07039599422 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1286) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1286) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { -0.123, 0.122, 0.96534, 0.346049, 1.067212328, 0.445330131 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1287) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1287) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { 72.7437666278, 10.4206532927, -4.34946941374, -14.8012581742, 2.01859491883, -1.53922125931 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1288) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1288) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { -0.464775024, 0.662224708, -0.0457, 0.610264, 0.942, 0.98 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1289) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1289) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { -0.591747295323, -0.534096923761, -4.60251824353, 1.70172936273, -4.94687072873, -3.32536493524 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1290) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1290) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { -0.123, 0.122, 0.807692, 0.373091, 0.384974988, 1.400879194 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1291) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1291) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { -0.129998778267, -0.116630230861, 0.993340886904, 0.530739563688, 1.55891621291, -0.284019181928 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1292) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1292) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.474, 0.715, 0.061, 0.532, 0.004, -0.318, 0.37, -0.692, -0.166, 0.039, -0.946, 0.857, -0.922, -0.491, 0.012, -0.217, -0.674, -0.429 }; + double X[] = { -0.123, 0.122, 0.981, 0.321, 0.942, 0.98 }; + int incX = -1; + double x_expected[] = { 0.107496032, 0.025821594, 1.444898, -0.239924, 0.942, 0.98 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1293) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1293) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -0.825842176606, 0.212941473892, -0.548817434511, -0.703261551538, 0.0746069436827, 0.425751789407 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1294) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1294) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -0.619710352, 0.018225936, 1.211252, 0.891864, 0.293, -0.434 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1295) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1295) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { 0.203289119964, 1.58288482537, -1.7720160159, 0.479463518178, -0.511241930019, -1.79333888299 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1296) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1296) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -0.373, 0.566, 0.618602, -0.084689, 0.887531803, -0.570220771 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1297) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1297) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { 1.72799012007, 13.4612400765, 4.46126528205, -0.0212528722047, 0.627282377919, 0.302760084926 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1298) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1298) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -1.280839615, 1.560525655, 1.167331, 0.179227, 0.293, -0.434 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1299) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1299) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -0.594503951847, 0.00287302167266, -1.08185265666, -0.859860374254, 0.0331027077244, 1.28233265933 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1300) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1300) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { -0.872, -0.841, 0.108, -0.744, 0.231, -0.513, -0.973, 0.087, 0.348, 0.196, 0.447, 0.307, 0.632, -0.949, 0.322, 0.277, 0.282, 0.831 }; + double X[] = { -0.373, 0.566, 0.92, 0.627, 0.293, -0.434 }; + int incX = -1; + double x_expected[] = { -0.373, 0.566, 1.16074, 0.50314, -0.20669608, 0.37525144 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1301) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1301) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 0.0654496252357, 0.224007771015, -0.752486084395, -0.554870892947, -0.587163401057, 0.166737652215 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1302) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1302) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { -0.595558802, -1.147174647, 0.589506, -0.500919, -0.126, 0.459 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1303) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1303) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 3.39346077201, 0.652889512141, -2.33602680355, -2.7859245153, -5.04672104102, -0.334110541026 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1304) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1304) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 0.028, -0.804, -0.109456, -0.217192, -0.41110804, 0.41693792 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1305) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1305) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 7.16970224467, -0.772071373678, 0.833386981173, -0.673826630129, -0.26524050899, 0.465327628365 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1306) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1306) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 0.471459157, -1.566755859, 0.940839, 0.357132, -0.126, 0.459 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1307) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1307) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { -0.909961830373, 0.118063054039, -0.0169425582229, -1.00055409731, -1.37205489923, 0.994032418785 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1308) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1308) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 3; + int K = 1; + int lda = 3; + double A[] = { 0.404, 0.667, 0.861, 0.22, 0.298, -0.858, -0.682, -0.969, 0.327, -0.86, 0.125, 0.606, -0.143, -0.865, -0.036, 0.23, -0.776, 0.079 }; + double X[] = { 0.028, -0.804, 0.582, -0.078, -0.126, 0.459 }; + int incX = -1; + double x_expected[] = { 0.028, -0.804, -0.118596, 0.160828, -0.059271004, 0.294435972 }; + cblas_ztbsv(order, uplo, trans, diag, N, K, A, lda, X, incX); + { + int i; + for (i = 0; i < 3; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztbsv(case 1309) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztbsv(case 1309) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_tpmv.c b/software/gsl-1.15/cblas/test_tpmv.c new file mode 100644 index 000000000..9b3f1b746 --- /dev/null +++ b/software/gsl-1.15/cblas/test_tpmv.c @@ -0,0 +1,1659 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_tpmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.179133f, -0.549315f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 974)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.213f, 0.85518f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 975)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.055233f, -0.519495f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 976)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.0891f, 0.885f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 977)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.179133f, -0.549315f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 978)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.213f, 0.85518f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 979)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.055233f, -0.519495f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 980)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.587f, 0.14f, 0.841f }; + float X[] = { -0.213f, 0.885f }; + int incX = -1; + float x_expected[] = { -0.0891f, 0.885f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 981)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.49754f, 0.20961f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 982)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.022232f, -0.274f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 983)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.232308f, 0.444834f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 984)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { 0.243f, -0.038776f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 985)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.49754f, 0.20961f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 986)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.022232f, -0.274f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 987)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { -0.232308f, 0.444834f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 988)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.765f, 0.968f, -0.956f }; + float X[] = { 0.243f, -0.274f }; + int incX = -1; + float x_expected[] = { 0.243f, -0.038776f }; + cblas_stpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpmv(case 989)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.022072, -0.073151 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 990)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.062, -0.207298 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 991)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { 0.026769, -0.086853 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 992)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.013159, -0.221 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 993)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.022072, -0.073151 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 994)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.062, -0.207298 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 995)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { 0.026769, -0.086853 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 996)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.393, -0.221, 0.356 }; + double X[] = { -0.062, -0.221 }; + int incX = -1; + double x_expected[] = { -0.013159, -0.221 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 997)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { 0.165233, 0.25331 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 998)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.745135, 0.365 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 999)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.017632, -0.211618 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1000)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.928, -0.099928 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1001)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { 0.165233, 0.25331 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1002)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.745135, 0.365 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1003)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.017632, -0.211618 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1004)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.694, 0.501, 0.019 }; + double X[] = { -0.928, 0.365 }; + int incX = -1; + double x_expected[] = { -0.928, -0.099928 }; + cblas_dtpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpmv(case 1005)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 0.880215f, -0.602509f, -0.225207f, -0.564235f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1006) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1006) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 0.904f, 0.461f, -0.58925f, -0.778204f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1007) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1007) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 1.21467f, -0.432639f, -0.002957f, 0.366969f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1008) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1008) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 1.23846f, 0.63087f, -0.367f, 0.153f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1009) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1009) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 0.880215f, -0.602509f, -0.225207f, -0.564235f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1010) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1010) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 0.904f, 0.461f, -0.58925f, -0.778204f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1011) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1011) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 1.21467f, -0.432639f, -0.002957f, 0.366969f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1012) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1012) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { 0.362f, -0.849f, -0.612f, -0.718f, 0.503f, -0.923f }; + float X[] = { 0.904f, 0.461f, -0.367f, 0.153f }; + int incX = -1; + float x_expected[] = { 1.23846f, 0.63087f, -0.367f, 0.153f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1013) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1013) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { -0.281591f, -0.161308f, -0.9103f, 0.34578f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1014) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1014) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { -0.05924f, -0.5178f, 0.444f, -0.748f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1015) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1015) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { 0.115649f, -0.450508f, -1.26568f, 0.689239f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1016) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1016) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { 0.338f, -0.807f, 0.088617f, -0.404541f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1017) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1017) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { -0.281591f, -0.161308f, -0.9103f, 0.34578f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1018) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1018) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { -0.05924f, -0.5178f, 0.444f, -0.748f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1019) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1019) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { 0.115649f, -0.450508f, -1.26568f, 0.689239f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1020) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1020) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.876f, -0.697f, -0.519f, -0.223f, 0.526f, -0.077f }; + float X[] = { 0.338f, -0.807f, 0.444f, -0.748f }; + int incX = -1; + float x_expected[] = { 0.338f, -0.807f, 0.088617f, -0.404541f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1021) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1021) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.295592f, 1.11591f, 0.610498f, -0.779458f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1022) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1022) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.646798f, 0.455824f, 0.602f, -0.96f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1023) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1023) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { 0.229206f, 0.296082f, 0.712384f, -0.465806f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1024) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1024) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.122f, -0.364f, 0.703886f, -0.646348f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1025) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1025) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.295592f, 1.11591f, 0.610498f, -0.779458f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1026) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1026) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.646798f, 0.455824f, 0.602f, -0.96f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1027) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1027) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { 0.229206f, 0.296082f, 0.712384f, -0.465806f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1028) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1028) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { 0.869f, -0.091f, -0.859f, 0.008f, -0.921f, -0.321f }; + float X[] = { -0.122f, -0.364f, 0.602f, -0.96f }; + int incX = -1; + float x_expected[] = { -0.122f, -0.364f, 0.703886f, -0.646348f }; + cblas_ctpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpmv(case 1029) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpmv(case 1029) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.466116, 0.156534, -0.248261, -0.067936 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1030) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1030) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.042, -0.705, -0.663093, -0.637955 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1031) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1031) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.905141, 0.539693, 0.159832, -0.283981 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1032) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1032) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.481025, -0.321841, -0.255, -0.854 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1033) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1033) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.466116, 0.156534, -0.248261, -0.067936 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1034) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1034) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.042, -0.705, -0.663093, -0.637955 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1035) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1035) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.905141, 0.539693, 0.159832, -0.283981 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1036) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1036) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.254, 0.263, -0.271, -0.595, -0.182, -0.672 }; + double X[] = { -0.042, -0.705, -0.255, -0.854 }; + int incX = -1; + double x_expected[] = { -0.481025, -0.321841, -0.255, -0.854 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1037) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1037) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.590302, 1.473768, -0.566422, -0.005436 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1038) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1038) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.139182, 1.574648, -0.689, -0.679 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1039) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1039) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.44312, 0.80312, -0.211814, -0.54022 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1040) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1040) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { -0.008, 0.904, -0.334392, -1.213784 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1041) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1041) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.590302, 1.473768, -0.566422, -0.005436 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1042) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1042) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.139182, 1.574648, -0.689, -0.679 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1043) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1043) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { 0.44312, 0.80312, -0.211814, -0.54022 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1044) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1044) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.421, -0.407, -0.595, -0.387, 0.884, -0.498 }; + double X[] = { -0.008, 0.904, -0.689, -0.679 }; + int incX = -1; + double x_expected[] = { -0.008, 0.904, -0.334392, -1.213784 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1045) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1045) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -1.449087, -1.068251, 0.375602, 0.672696 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1046) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1046) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -1.43236, 0.04007, -0.406, -0.948 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1047) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1047) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -0.657727, -0.543321, 0.167357, 1.431451 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1048) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1048) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -0.641, 0.565, -0.614245, -0.189245 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1049) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1049) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -1.449087, -1.068251, 0.375602, 0.672696 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1050) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1050) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -1.43236, 0.04007, -0.406, -0.948 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1051) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1051) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -0.657727, -0.543321, 0.167357, 1.431451 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1052) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1052) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { -0.743, -0.078, 0.77, 0.505, 0.157, -0.986 }; + double X[] = { -0.641, 0.565, -0.406, -0.948 }; + int incX = -1; + double x_expected[] = { -0.641, 0.565, -0.614245, -0.189245 }; + cblas_ztpmv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpmv(case 1053) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpmv(case 1053) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_tpsv.c b/software/gsl-1.15/cblas/test_tpsv.c new file mode 100644 index 000000000..1fbb895c5 --- /dev/null +++ b/software/gsl-1.15/cblas/test_tpsv.c @@ -0,0 +1,1659 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_tpsv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.31929f, 0.360168f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1310)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.144f, -0.04432f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1311)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.417992f, -0.0839895f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1312)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.12704f, 0.032f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1313)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.31929f, 0.360168f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1314)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.144f, -0.04432f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1315)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.417992f, -0.0839895f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1316)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.12704f, 0.032f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1317)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.417992f, -0.0839895f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1318)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.12704f, 0.032f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1319)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.31929f, 0.360168f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1320)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.144f, -0.04432f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1321)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.417992f, -0.0839895f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1322)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.12704f, 0.032f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1323)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.31929f, 0.360168f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1324)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.381f, 0.53f, 0.451f }; + float X[] = { 0.144f, 0.032f }; + int incX = -1; + float x_expected[] = { 0.144f, -0.04432f }; + cblas_stpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "stpsv(case 1325)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 1.67142857143, 1.42438631791 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1326)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -0.702, -1.150996 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1327)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 4.76584842388, -1.86197183099 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1328)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -1.163378, -0.661 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1329)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 1.67142857143, 1.42438631791 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1330)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -0.702, -1.150996 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1331)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 4.76584842388, -1.86197183099 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1332)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -1.163378, -0.661 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1333)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 4.76584842388, -1.86197183099 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1334)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -1.163378, -0.661 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1335)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 1.67142857143, 1.42438631791 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1336)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -0.702, -1.150996 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1337)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 4.76584842388, -1.86197183099 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1338)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -1.163378, -0.661 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1339)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { 1.67142857143, 1.42438631791 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1340)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.355, -0.698, -0.42 }; + double X[] = { -0.702, -0.661 }; + int incX = -1; + double x_expected[] = { -0.702, -1.150996 }; + cblas_dtpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtpsv(case 1341)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -1.05533f, 0.0529057f, -3.93625f, 1.36003f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1342) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1342) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, 0.818576f, 0.163438f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1343) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1343) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -2.48362f, 1.13085f, -1.67581f, -0.273264f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1344) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1344) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 0.431924f, 0.679112f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1345) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1345) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -1.05533f, 0.0529057f, -3.93625f, 1.36003f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1346) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1346) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, 0.818576f, 0.163438f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1347) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1347) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -2.48362f, 1.13085f, -1.67581f, -0.273264f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1348) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1348) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 0.431924f, 0.679112f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1349) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1349) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -2.48362f, 1.13085f, -1.67581f, -0.273264f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1350) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1350) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 0.431924f, 0.679112f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1351) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1351) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -1.05533f, 0.0529057f, -3.93625f, 1.36003f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1352) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1352) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, 0.818576f, 0.163438f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1353) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1353) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -2.48362f, 1.13085f, -1.67581f, -0.273264f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1354) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1354) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 0.431924f, 0.679112f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1355) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1355) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -1.05533f, 0.0529057f, -3.93625f, 1.36003f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1356) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1356) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, 0.818576f, 0.163438f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1357) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1357) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 2.15867f, 1.69498f, 1.69471f, 0.104738f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1358) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1358) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.613252f, 0.561896f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1359) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1359) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 1.00465f, 0.327432f, 3.44853f, 2.273f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1360) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1360) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, -0.806168f, -0.053086f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1361) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1361) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 2.15867f, 1.69498f, 1.69471f, 0.104738f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1362) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1362) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.613252f, 0.561896f, -0.072f, 0.642f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1363) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1363) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { 1.00465f, 0.327432f, 3.44853f, 2.273f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1364) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1364) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + float A[] = { -0.019f, -0.38f, 0.588f, 0.814f, 0.173f, -0.937f }; + float X[] = { -0.133f, 0.998f, -0.072f, 0.642f }; + int incX = -1; + float x_expected[] = { -0.133f, 0.998f, -0.806168f, -0.053086f }; + cblas_ctpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctpsv(case 1365) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctpsv(case 1365) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.430509772467, -0.0927067365535, -0.611144484555, 0.999982608216 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1366) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1366) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -0.795928, -0.523879 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1367) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1367) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.00136463678, -1.84591534629, -1.12140892769, 0.696784840869 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1368) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1368) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.707508, -0.042521, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1369) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1369) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.430509772467, -0.0927067365535, -0.611144484555, 0.999982608216 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1370) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1370) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -0.795928, -0.523879 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1371) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1371) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.00136463678, -1.84591534629, -1.12140892769, 0.696784840869 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1372) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1372) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.707508, -0.042521, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1373) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1373) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.00136463678, -1.84591534629, -1.12140892769, 0.696784840869 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1374) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1374) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.707508, -0.042521, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1375) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1375) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.430509772467, -0.0927067365535, -0.611144484555, 0.999982608216 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1376) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1376) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -0.795928, -0.523879 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1377) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1377) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.00136463678, -1.84591534629, -1.12140892769, 0.696784840869 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1378) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1378) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 1.707508, -0.042521, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1379) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1379) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.430509772467, -0.0927067365535, -0.611144484555, 0.999982608216 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1380) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1380) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -0.795928, -0.523879 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1381) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1381) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { -1.47384781823, -0.286556198408, 1.03098932879, -0.824698794397 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1382) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1382) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { -0.016172, 1.175911, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1383) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1383) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.369363905801, -0.239798891331, 1.1759505739, -1.40027235656 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1384) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1384) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -1.05676, -1.151335 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1385) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1385) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { -1.47384781823, -0.286556198408, 1.03098932879, -0.824698794397 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1386) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1386) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { -0.016172, 1.175911, -0.668, -0.945 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1387) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1387) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.369363905801, -0.239798891331, 1.1759505739, -1.40027235656 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1388) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1388) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 2; + double A[] = { 0.052, 0.875, 0.751, -0.912, 0.832, -0.153 }; + double X[] = { 0.344, -0.143, -0.668, -0.945 }; + int incX = -1; + double x_expected[] = { 0.344, -0.143, -1.05676, -1.151335 }; + cblas_ztpsv(order, uplo, trans, diag, N, A, X, incX); + { + int i; + for (i = 0; i < 2; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztpsv(case 1389) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztpsv(case 1389) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_trmm.c b/software/gsl-1.15/cblas/test_trmm.c new file mode 100644 index 000000000..26fab2bbb --- /dev/null +++ b/software/gsl-1.15/cblas/test_trmm.c @@ -0,0 +1,3947 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_trmm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.18f, 0.199f, 0.122f, -0.547f }; + int lda = 2; + float B[] = { -0.874f, -0.383f, 0.458f, 0.124f, -0.221f, -0.107f }; + int ldb = 3; + float B_expected[] = { 0.0397932f, 0.0338757f, -0.0183441f, 0.0203484f, -0.0362661f, -0.0175587f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1662)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.195f, -0.453f, -0.579f, 0.697f }; + int lda = 2; + float B[] = { 0.736f, 0.131f, 0.533f, 0.692f, -0.672f, -0.435f }; + int ldb = 3; + float B_expected[] = { -0.126757f, -0.130625f, -0.219017f, -0.2076f, 0.2016f, 0.1305f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1663)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.53f, 0.787f, 0.889f, -0.379f }; + int lda = 2; + float B[] = { -0.355f, 0.002f, 0.266f, 0.972f, 0.712f, -0.353f }; + int ldb = 3; + float B_expected[] = { -0.056445f, 3.18e-04f, 0.042294f, 0.205195f, 0.080421f, -0.111078f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1664)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.198f, -0.673f, 0.792f, 0.781f }; + int lda = 2; + float B[] = { 0.901f, 0.719f, -0.339f, -0.36f, 0.539f, 0.192f }; + int ldb = 3; + float B_expected[] = { -0.2703f, -0.2157f, 0.1017f, -0.106078f, -0.332534f, 0.0229464f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1665)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.522f, 0.851f, 0.586f, 0.196f }; + int lda = 2; + float B[] = { 0.335f, 0.617f, 0.118f, -0.143f, 0.677f, 0.456f }; + int ldb = 2; + float B_expected[] = { -0.0560076f, -0.0362796f, 0.0436182f, 0.0084084f, 0.0258534f, -0.0268128f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1666)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.006f, -0.613f, -0.966f, -0.758f }; + int lda = 2; + float B[] = { 0.64f, -0.723f, -0.765f, 0.801f, 0.376f, 0.91f }; + int ldb = 2; + float B_expected[] = { -0.401525f, 0.2169f, 0.46163f, -0.2403f, 0.150918f, -0.273f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1667)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.738f, 0.913f, -0.227f, 0.787f }; + int lda = 2; + float B[] = { 0.194f, 0.988f, -0.274f, -0.652f, -0.281f, -0.359f }; + int ldb = 2; + float B_expected[] = { -0.0429516f, -0.286403f, 0.0606636f, 0.228986f, 0.0622134f, 0.161726f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1668)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.952f, 0.598f, 0.25f, -0.508f }; + int lda = 2; + float B[] = { 0.036f, 0.745f, -0.606f, 0.215f, 0.943f, -0.933f }; + int ldb = 2; + float B_expected[] = { -0.0108f, -0.229958f, 0.1818f, 0.0442164f, -0.2829f, 0.110726f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1669)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.251f, 0.372f, -0.168f, 0.217f, -0.179f, 0.863f, -0.057f, 0.256f, 0.093f }; + int lda = 3; + float B[] = { -0.727f, -0.461f, 0.162f, 0.579f, -0.305f, -0.735f }; + int ldb = 3; + float B_expected[] = { -0.0547431f, 0.0563775f, 0.0781923f, 0.0435987f, -0.0809949f, 0.128653f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1670)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.014f, 0.204f, 0.163f, 0.842f, -0.918f, -0.748f, -0.859f, -0.463f, 0.292f }; + int lda = 3; + float B[] = { -0.587f, -0.625f, -0.994f, 0.681f, -0.577f, -0.434f }; + int ldb = 3; + float B_expected[] = { 0.1761f, 0.223424f, 0.186654f, -0.2043f, 0.131423f, -0.0325797f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1671)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.682f, -0.71f, 0.475f, -0.59f, -0.748f, 0.548f, 0.245f, 0.761f, -0.4f }; + int lda = 3; + float B[] = { 0.565f, 0.967f, -0.969f, 0.184f, 0.349f, -0.552f }; + int ldb = 3; + float B_expected[] = { 0.357979f, 0.438217f, -0.11628f, 0.139991f, 0.204337f, -0.06624f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1672)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.617f, -0.998f, -0.97f, 0.364f, 0.09f, 0.588f, -0.263f, 0.584f, 0.463f }; + int lda = 3; + float B[] = { 0.773f, 0.074f, -0.388f, 0.825f, -0.608f, 0.788f }; + int ldb = 3; + float B_expected[] = { -0.270594f, 0.0457776f, 0.1164f, -0.118933f, 0.0443424f, -0.2364f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1673)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.217f, -0.672f, -0.378f, -0.005f, -0.586f, -0.426f, 0.765f, -0.239f, -0.145f }; + int lda = 3; + float B[] = { 0.01f, 0.387f, -0.953f, -0.374f, -0.673f, -0.724f }; + int ldb = 2; + float B_expected[] = { -6.51e-04f, -0.0251937f, -0.167522f, -0.0651687f, -0.0999006f, -0.147126f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1674)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.962f, 0.515f, 0.292f, 0.354f, -0.366f, 0.455f, 0.134f, -0.564f, -0.303f }; + int lda = 3; + float B[] = { -0.337f, 0.718f, -0.866f, -0.454f, -0.439f, -0.668f }; + int ldb = 2; + float B_expected[] = { 0.1011f, -0.2154f, 0.295589f, 0.0599484f, -0.0012798f, 0.0947196f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1675)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.228f, -0.097f, 0.205f, 0.875f, -0.162f, 0.542f, -0.839f, -0.935f, 0.2f }; + int lda = 3; + float B[] = { -0.125f, -0.676f, 0.181f, 0.741f, 0.216f, 0.766f }; + int ldb = 2; + float B_expected[] = { -0.0165669f, -0.0717843f, -0.026325f, -0.088539f, -0.01296f, -0.04596f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1676)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.854f, -0.502f, 0.591f, -0.934f, -0.729f, 0.063f, 0.352f, 0.126f, -0.905f }; + int lda = 3; + float B[] = { -0.626f, -0.694f, -0.889f, -0.251f, -0.42f, -0.353f }; + int ldb = 2; + float B_expected[] = { 0.128383f, 0.232986f, 0.274638f, 0.0819717f, 0.126f, 0.1059f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1677)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.755f, 0.12f, 0.525f, 0.917f }; + int lda = 2; + float B[] = { -0.927f, -0.813f, 0.624f, -0.366f, -0.864f, -0.046f }; + int ldb = 3; + float B_expected[] = { 0.0699885f, 0.0613815f, -0.047112f, -0.0446862f, -0.0889848f, 0.0032698f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1678)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.444f, 0.515f, 0.081f, -0.69f }; + int lda = 2; + float B[] = { 0.571f, -0.098f, -0.226f, -0.587f, 0.788f, -0.629f }; + int ldb = 3; + float B_expected[] = { 0.0571f, -0.0098f, -0.0226f, -0.0292935f, 0.073753f, -0.074539f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1679)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.954f, 0.651f, -0.982f, 0.388f }; + int lda = 2; + float B[] = { -0.927f, -0.281f, -0.918f, -0.527f, -0.652f, -0.393f }; + int ldb = 3; + float B_expected[] = { 0.140187f, 0.0908338f, 0.12617f, -0.0204476f, -0.0252976f, -0.0152484f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1680)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { 0.811f, 0.852f, 0.224f, 0.443f }; + int lda = 2; + float B[] = { -0.493f, -0.497f, -0.605f, 0.433f, -0.082f, -0.077f }; + int ldb = 3; + float B_expected[] = { -0.0396008f, -0.0515368f, -0.0622248f, 0.0433f, -0.0082f, -0.0077f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1681)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.777f, 0.812f, 0.254f, 0.97f }; + int lda = 2; + float B[] = { -0.509f, 0.171f, 0.986f, -0.644f, -0.97f, 0.814f }; + int ldb = 2; + float B_expected[] = { 0.0395493f, 0.0036584f, -0.0766122f, -0.0374236f, 0.075369f, 0.05432f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1682)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { 0.962f, 0.912f, -0.238f, -0.336f }; + int lda = 2; + float B[] = { -0.666f, 0.066f, -0.176f, 0.402f, 0.286f, -0.703f }; + int ldb = 2; + float B_expected[] = { -0.0666f, 0.0224508f, -0.0176f, 0.0443888f, 0.0286f, -0.0771068f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1683)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { 0.859f, -0.547f, 0.076f, 0.542f }; + int lda = 2; + float B[] = { 0.402f, 0.945f, -0.242f, -0.062f, 0.714f, 0.468f }; + int ldb = 2; + float B_expected[] = { -0.0171597f, 0.051219f, -0.0173964f, -0.0033604f, 0.035733f, 0.0253656f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1684)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.779f, 0.435f, 0.612f, -0.723f }; + int lda = 2; + float B[] = { 0.512f, -0.987f, -0.167f, 0.047f, -0.701f, -0.25f }; + int ldb = 2; + float B_expected[] = { 0.0082655f, -0.0987f, -0.0146555f, 0.0047f, -0.080975f, -0.025f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1685)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.757f, 0.396f, -0.927f, -0.558f, -0.289f, -0.66f, 0.83f, 0.363f, -0.13f }; + int lda = 3; + float B[] = { 0.041f, 0.333f, -0.682f, 0.193f, 0.581f, 0.963f }; + int ldb = 3; + float B_expected[] = { 0.0733045f, 0.0353883f, 0.008866f, -0.0808726f, -0.0803489f, -0.012519f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1686)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.75f, 0.674f, -0.576f, 0.376f, -0.46f, -0.813f, 0.419f, 0.792f, 0.226f }; + int lda = 3; + float B[] = { 0.511f, -0.544f, 0.938f, -0.126f, -0.873f, 0.118f }; + int ldb = 3; + float B_expected[] = { -0.0395944f, -0.130659f, 0.0938f, -0.078237f, -0.0968934f, 0.0118f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1687)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.045f, -0.809f, 0.654f, 0.611f, -0.038f, -0.105f, -0.946f, 0.474f, -0.097f }; + int lda = 3; + float B[] = { -0.625f, -0.123f, -0.48f, -0.088f, -0.757f, 0.974f }; + int ldb = 3; + float B_expected[] = { 0.0028125f, -0.0377201f, 0.0579508f, 3.96e-04f, -0.0025002f, -0.0370048f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1688)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { 0.713f, 0.781f, 0.084f, -0.498f, 0.692f, 0.125f, 0.706f, -0.118f, -0.907f }; + int lda = 3; + float B[] = { 0.442f, -0.563f, 0.065f, -0.18f, 0.63f, -0.328f }; + int ldb = 3; + float B_expected[] = { 0.0442f, -0.0783116f, 0.0443486f, -0.018f, 0.071964f, -0.052942f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1689)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.442f, 0.566f, 0.064f, 0.962f, -0.669f, 0.416f, 0.761f, -0.359f, 0.863f }; + int lda = 3; + float B[] = { 0.261f, -0.659f, -0.536f, 0.694f, -0.305f, -0.675f }; + int ldb = 2; + float B_expected[] = { -0.0863099f, 0.0445231f, 0.0468079f, -0.0221961f, -0.0263215f, -0.0582525f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1690)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { 0.386f, 0.643f, -0.028f, -0.758f, -0.63f, -0.043f, 0.666f, -0.088f, 0.382f }; + int lda = 3; + float B[] = { -0.241f, 0.766f, 0.656f, -0.977f, 0.274f, 0.565f }; + int ldb = 2; + float B_expected[] = { -0.0555764f, 0.188286f, 0.0631888f, -0.102672f, 0.0274f, 0.0565f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1691)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.855f, -0.587f, 0.062f, 0.372f, 0.48f, -0.63f, -0.786f, -0.437f, -0.431f }; + int lda = 3; + float B[] = { 0.116f, 0.534f, 0.043f, 0.73f, 0.945f, 0.528f }; + int ldb = 2; + float B_expected[] = { -0.009918f, -0.045657f, -0.0047452f, 0.0036942f, -0.0427193f, -0.065436f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1692)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 0.1f; + float A[] = { -0.068f, 0.119f, -0.244f, -0.05f, 0.685f, 0.752f, -0.059f, -0.935f, -0.571f }; + int lda = 3; + float B[] = { -0.753f, -0.319f, 0.164f, 0.979f, 0.885f, -0.822f }; + int ldb = 2; + float B_expected[] = { -0.0753f, -0.0319f, 0.0074393f, 0.0941039f, 0.119206f, -7.956e-04f }; + cblas_strmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strmm(case 1693)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.174, -0.308, 0.997, -0.484 }; + int lda = 2; + double B[] = { -0.256, -0.178, 0.098, 0.004, 0.97, -0.408 }; + int ldb = 3; + double B_expected[] = { 0.0137328, 0.0989196, -0.0428148, 5.808e-04, 0.140844, -0.0592416 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1694)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.722, -0.372, 0.466, -0.831 }; + int lda = 2; + double B[] = { 0.322, -0.183, 0.849, -0.051, -0.343, -0.98 }; + int ldb = 3; + double B_expected[] = { -0.1022916, 0.0166212, -0.364068, 0.0153, 0.1029, 0.294 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1695)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.656, -0.066, 0.582, 0.141 }; + int lda = 2; + double B[] = { 0.73, 0.407, 0.721, 0.086, -0.294, 0.941 }; + int ldb = 3; + double B_expected[] = { 0.143664, 0.0800976, 0.1418928, -0.1310958, -0.058626, -0.1656909 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1696)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.341, 0.386, -0.578, 0.863 }; + int lda = 2; + double B[] = { -0.306, -0.047, -0.162, -0.784, 0.472, 0.137 }; + int ldb = 3; + double B_expected[] = { 0.0918, 0.0141, 0.0486, 0.1821396, -0.1497498, -0.0691908 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1697)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.844, -0.832, 0.179, -0.775 }; + int lda = 2; + double B[] = { -0.415, -0.547, -0.023, 0.42, 0.917, 0.485 }; + int ldb = 2; + double B_expected[] = { 0.1344519, -0.1271775, -0.0167304, 0.09765, -0.2582289, 0.1127625 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1698)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.239, 0.34, 0.964, -0.575 }; + int lda = 2; + double B[] = { 0.762, -0.038, -0.8, 0.626, -0.701, 0.639 }; + int ldb = 2; + double B_expected[] = { -0.2176104, 0.0114, 0.0589608, -0.1878, 0.0255012, -0.1917 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1699)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.785, -0.0, -0.592, -0.661 }; + int lda = 2; + double B[] = { -0.215, 0.953, 0.527, -0.418, -0.675, 0.283 }; + int ldb = 2; + double B_expected[] = { 0.0506325, 0.1889799, -0.1241085, -0.0828894, 0.1589625, 0.0561189 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1700)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.423, -0.807, -0.683, -0.225 }; + int lda = 2; + double B[] = { 0.149, -0.129, 0.149, -0.234, 0.275, 0.658 }; + int ldb = 2; + double B_expected[] = { -0.0447, 0.0747729, -0.0447, 0.1062729, -0.0825, -0.1308225 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1701)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.276, 0.434, 0.917, 0.682, -0.32, 0.557, -0.302, 0.989, -0.043 }; + int lda = 3; + double B[] = { -0.943, 0.839, 0.759, 0.752, 0.807, 0.288 }; + int ldb = 3; + double B_expected[] = { -0.0780804, 0.2033226, 0.1290135, 0.0622656, -0.0204384, -0.3380097 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1702)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.731, -0.953, -0.666, 0.684, 0.38, 0.419, -0.361, 0.378, -0.423 }; + int lda = 3; + double B[] = { -0.983, 0.479, -0.136, 0.048, 0.745, -0.408 }; + int ldb = 3; + double B_expected[] = { 0.2949, -0.4247397, -0.2158137, -0.0144, -0.2097768, 0.0383439 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1703)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.953, -0.983, 0.237, 0.128, -0.378, 0.607, 0.41, 0.418, -0.221 }; + int lda = 3; + double B[] = { -0.561, -0.114, -0.148, 0.488, 0.146, -0.688 }; + int ldb = 3; + double B_expected[] = { -0.1378083, 0.0056316, -0.0098124, 0.2185368, 0.1028316, -0.0456144 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1704)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.277, -0.587, 0.885, -0.933, -0.582, 0.528, 0.268, -0.804, 0.62 }; + int lda = 3; + double B[] = { -0.831, -0.319, -0.547, -0.577, 0.295, -0.31 }; + int ldb = 3; + double B_expected[] = { 0.2039907, -0.0362364, 0.1641, 0.2805945, -0.163272, 0.093 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1705)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.256, 0.554, 0.342, 0.318, -0.824, -0.119, -0.399, -0.653, -0.83 }; + int lda = 3; + double B[] = { -0.577, 0.861, -0.439, -0.916, 0.452, -0.168 }; + int ldb = 2; + double B_expected[] = { 0.0443136, -0.0661248, -0.053475, -0.3085746, -0.042519, -0.1182147 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1706)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.837, -0.03, 0.552, -0.43, 0.841, 0.035, 0.7, 0.637, 0.095 }; + int lda = 3; + double B[] = { -0.82, -0.362, -0.252, -0.062, -0.942, -0.299 }; + int ldb = 2; + double B_expected[] = { 0.246, 0.1086, -0.03018, -0.028098, 0.5029572, 0.1775682 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1707)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { -0.074, 0.49, 0.802, -0.454, 0.626, 0.123, -0.959, 0.971, 0.75 }; + int lda = 3; + double B[] = { -0.545, -0.107, 0.096, 0.183, 0.185, -0.218 }; + int ldb = 2; + double B_expected[] = { -0.070722, 0.0231744, -0.0248553, -0.0263232, -0.041625, 0.04905 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1708)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -0.3; + double A[] = { 0.048, 0.148, 0.834, -0.98, -0.009, -0.727, 0.241, 0.276, 0.518 }; + int lda = 3; + double B[] = { -0.664, -0.136, -0.793, -0.742, 0.126, -0.131 }; + int ldb = 2; + double B_expected[] = { 0.202884, 0.106521, 0.2653806, 0.1940289, -0.0378, 0.0393 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1709)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.427, 0.495, 0.282, 0.158 }; + int lda = 2; + double B[] = { 0.899, -0.375, 0.376, -0.831, 0.431, -0.387 }; + int ldb = 3; + double B_expected[] = { 0.0383873, -0.0160125, 0.0160552, 0.0313707, -0.0117527, 0.0124974 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1710)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.632, -0.174, 0.608, -0.669 }; + int lda = 2; + double B[] = { -0.335, 0.535, -0.978, 0.31, 0.023, -0.853 }; + int ldb = 3; + double B_expected[] = { -0.0335, 0.0535, -0.0978, 0.036829, -0.007009, -0.0682828 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1711)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.779, -0.73, 0.343, -0.665 }; + int lda = 2; + double B[] = { -0.976, -0.2, 0.661, -0.975, -0.965, -0.861 }; + int ldb = 3; + double B_expected[] = { 0.0425879, -0.0175195, -0.0810242, 0.0648375, 0.0641725, 0.0572565 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1712)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.127, -0.634, -0.384, -0.815 }; + int lda = 2; + double B[] = { -0.348, 0.748, 0.893, 0.91, 0.153, -0.408 }; + int ldb = 3; + double B_expected[] = { -0.069744, 0.0689248, 0.1049672, 0.091, 0.0153, -0.0408 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1713)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.603, -0.617, 0.402, -0.918 }; + int lda = 2; + double B[] = { 0.051, -0.096, 0.476, 0.377, 0.931, 0.291 }; + int ldb = 2; + double B_expected[] = { -0.0030753, 0.010863, -0.0287028, -0.0154734, -0.0561393, 0.0107124 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1714)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.67, -0.475, 0.032, -0.036 }; + int lda = 2; + double B[] = { -0.19, 0.829, 0.942, 0.885, 0.087, 0.321 }; + int ldb = 2; + double B_expected[] = { -0.019, 0.082292, 0.0942, 0.0915144, 0.0087, 0.0323784 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1715)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.64, 0.595, 0.642, -0.921 }; + int lda = 2; + double B[] = { -0.278, -0.83, 0.922, -0.701, -0.598, -0.232 }; + int ldb = 2; + double B_expected[] = { -0.031593, 0.076443, -0.1007175, 0.0645621, 0.024468, 0.0213672 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1716)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.842, 0.625, 0.967, 0.341 }; + int lda = 2; + double B[] = { -0.679, -0.846, -0.921, 0.672, 0.292, 0.752 }; + int ldb = 2; + double B_expected[] = { -0.120775, -0.0846, -0.0501, 0.0672, 0.0762, 0.0752 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1717)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.612, 0.593, 0.113, -0.658, 0.703, -0.023, -0.384, 0.439, 0.958 }; + int lda = 3; + double B[] = { -0.858, -0.559, 0.499, -0.114, 0.57, 0.847 }; + int ldb = 3; + double B_expected[] = { 0.0249996, -0.0404454, 0.0478042, 0.0503489, 0.0381229, 0.0811426 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1718)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.844, 0.205, -0.692, -0.401, -0.823, 0.342, -0.384, 0.344, 0.18 }; + int lda = 3; + double B[] = { 0.823, -0.181, 0.141, 0.932, 0.097, -0.636 }; + int ldb = 3; + double B_expected[] = { 0.0688323, -0.0132778, 0.0141, 0.1391997, -0.0120512, -0.0636 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1719)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.065, 0.678, 0.044, -0.472, 0.932, -0.388, 0.432, -0.167, -0.277 }; + int lda = 3; + double B[] = { 0.675, -0.468, -0.564, 0.71, -0.624, 0.023 }; + int ldb = 3; + double B_expected[] = { 0.0043875, -0.0754776, 0.0525984, 0.004615, -0.0916688, 0.0404557 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1720)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.649, -0.171, -0.462, 0.593, 0.131, -0.317, -0.254, -0.948, 0.002 }; + int lda = 3; + double B[] = { -0.519, -0.501, -0.024, -0.767, -0.591, -0.738 }; + int ldb = 3; + double B_expected[] = { -0.0519, -0.0808767, 0.0582774, -0.0767, -0.1045831, 0.0017086 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1721)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.023, -0.872, -0.313, -0.698, 0.06, -0.838, -0.455, -0.715, -0.257 }; + int lda = 3; + double B[] = { -0.17, -0.184, -0.243, 0.907, -0.423, 0.665 }; + int ldb = 2; + double B_expected[] = { 0.0365989, -0.0931429, 0.0287865, -0.0421055, 0.0108711, -0.0170905 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1722)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.792, 0.338, -0.155, 0.009, 0.485, -0.633, -0.08, -0.579, 0.223 }; + int lda = 3; + double B[] = { -0.19, 0.201, 0.685, 0.663, 0.302, -0.506 }; + int ldb = 2; + double B_expected[] = { -0.0207995, 0.0247447, 0.0510142, 0.0955974, 0.0302, -0.0506 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1723)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { -0.076, 0.103, -0.021, -0.866, 0.777, 0.723, 0.378, 0.98, -0.32 }; + int lda = 3; + double B[] = { 0.739, -0.996, 0.182, 0.626, 0.291, -0.267 }; + int ldb = 2; + double B_expected[] = { -0.0056164, 0.0075696, 0.0217531, 0.0383814, 0.0022947, 0.0558954 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1724)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = 0.1; + double A[] = { 0.469, 0.822, -0.619, 0.953, -0.706, 0.318, 0.559, -0.68, -0.208 }; + int lda = 3; + double B[] = { 0.362, 0.719, -0.661, -0.504, 0.595, -0.771 }; + int ldb = 2; + double B_expected[] = { 0.0362, 0.0719, -0.0363436, 0.0087018, 0.0160724, -0.1376333 }; + cblas_dtrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrmm(case 1725)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.023f, 0.762f, -0.687f, -0.039f, -0.459f, 0.047f, 0.189f, 0.33f }; + int lda = 2; + float B[] = { 0.827f, -0.561f, 0.641f, -0.229f, -0.884f, -0.533f, -0.624f, -0.138f, 0.073f, 0.924f, -0.501f, -0.164f }; + int ldb = 3; + float B_expected[] = { -0.831767f, -0.762219f, -0.14564f, 0.143926f, -0.764269f, 0.529142f, 0.072396f, 0.232002f, 0.291123f, -0.198726f, 0.040569f, 0.196326f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1726) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1726) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.24f, 0.581f, 0.06f, 0.064f, 0.981f, 0.792f, 0.242f, -0.529f }; + int lda = 2; + float B[] = { -0.649f, -0.774f, -0.43f, -0.447f, -0.266f, 0.285f, 0.787f, 0.274f, 0.449f, -0.912f, 0.435f, 0.601f }; + int ldb = 3; + float B_expected[] = { 0.619316f, 0.707192f, 0.344692f, 0.472984f, 0.278364f, -0.3489f, -0.787f, -0.274f, -0.449f, 0.912f, -0.435f, -0.601f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1727) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1727) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.68f, -0.728f, -0.59f, -0.434f, -0.936f, 0.915f, 0.236f, -0.118f }; + int lda = 2; + float B[] = { 0.461f, 0.48f, 0.224f, 0.215f, -0.419f, -0.525f, 0.113f, -0.582f, 0.468f, 0.269f, 0.943f, -0.587f }; + int ldb = 3; + float B_expected[] = { -0.66292f, 0.009208f, -0.30884f, 0.016872f, 0.66712f, 0.051968f, 0.912704f, 0.178151f, 0.264199f, -0.01198f, -1.02584f, 0.141791f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1728) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1728) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.699f, -0.709f, -0.775f, 0.779f, 0.5f, 0.774f, -0.399f, -0.843f }; + int lda = 2; + float B[] = { 0.538f, 0.556f, -0.186f, -0.678f, -0.413f, -0.612f, -0.216f, -0.519f, -0.344f, -0.578f, -0.938f, -0.848f }; + int ldb = 3; + float B_expected[] = { -0.538f, -0.556f, 0.186f, 0.678f, 0.413f, 0.612f, 0.377344f, -0.175412f, -0.087772f, 1.06096f, 0.670812f, 1.47366f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1729) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1729) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.527f, 0.318f, -0.224f, 0.547f, -0.765f, -0.469f, 0.233f, 0.023f }; + int lda = 2; + float B[] = { 0.54f, -0.418f, -0.892f, -0.118f, -0.296f, 0.019f, 0.786f, -0.145f, 0.136f, 0.472f, 0.731f, 0.333f }; + int ldb = 2; + float B_expected[] = { -1.04454f, -0.460052f, 0.205122f, 0.04801f, 0.831329f, 0.341824f, -0.186473f, 0.015707f, 0.481462f, 0.305592f, -0.162664f, -0.094402f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1730) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1730) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.109f, -0.852f, 0.395f, 0.871f, 0.378f, -0.493f, 0.51f, 0.973f }; + int lda = 2; + float B[] = { -0.867f, -0.758f, 0.687f, -0.596f, -0.912f, -0.561f, -0.389f, 0.21f, -0.561f, 0.132f, 0.689f, 0.653f }; + int ldb = 2; + float B_expected[] = { 0.901142f, 1.32198f, -0.687f, 0.596f, 0.955512f, 0.289843f, 0.389f, -0.21f, -0.021371f, -0.039157f, -0.689f, -0.653f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1731) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1731) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.686f, 0.349f, 0.299f, -0.462f, 0.009f, -0.693f, -0.478f, -0.617f }; + int lda = 2; + float B[] = { -0.409f, 0.986f, -0.854f, 0.346f, 0.444f, -0.659f, 0.027f, 0.007f, 0.842f, -0.473f, 0.825f, 0.866f }; + int ldb = 2; + float B_expected[] = { 0.624688f, -0.533655f, -0.954935f, -0.845302f, -0.534575f, 0.297118f, 0.180289f, 0.422174f, -0.742689f, 0.03062f, -0.173204f, 1.4534f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1732) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1732) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.286f, 0.661f, 0.372f, 0.28f, 0.482f, 0.267f, -0.436f, 0.844f }; + int lda = 2; + float B[] = { 0.0f, -0.513f, 0.91f, 0.109f, 0.587f, -0.183f, 0.112f, 0.362f, -0.256f, -0.518f, -0.933f, 0.066f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.513f, -1.05364f, 0.081836f, -0.587f, 0.183f, -0.381604f, -0.458284f, 0.256f, 0.518f, 0.883192f, 0.198376f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1733) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1733) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.678f, 0.717f, 0.228f, 0.001f, -0.16f, -0.387f, -0.281f, -0.002f, 0.623f, 0.162f, -0.594f, 0.632f, 0.566f, 0.352f, -0.411f, 0.574f, 0.314f, -0.139f }; + int lda = 3; + float B[] = { -0.823f, -0.042f, 0.171f, -0.928f, 0.66f, 0.965f, 0.472f, 0.006f, -0.083f, 0.937f, -0.814f, 0.9f }; + int ldb = 3; + float B_expected[] = { 0.52788f, 0.618567f, -0.069267f, 0.560841f, -0.941723f, -1.19579f, -0.315714f, -0.342492f, 0.095893f, -0.572145f, 0.746576f, 0.396912f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1734) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1734) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.346f, 0.915f, -0.227f, -0.066f, -0.166f, -0.921f, -0.373f, 0.312f, -0.824f, 0.699f, -0.114f, -0.152f, 0.862f, -0.077f, 0.221f, -0.757f, -0.413f, -0.494f }; + int lda = 3; + float B[] = { -0.02f, -0.247f, -0.62f, 0.651f, -0.07f, -0.491f, 0.042f, 0.936f, 0.272f, -0.582f, 0.012f, -0.534f }; + int ldb = 3; + float B_expected[] = { 0.02f, 0.247f, 0.631762f, -0.708389f, 0.124535f, 0.411552f, -0.042f, -0.936f, -0.324242f, 0.797244f, -0.747612f, 0.703054f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1735) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1735) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.493f, -0.882f, -0.82f, 0.627f, 0.301f, -0.903f, -0.092f, 0.787f, -0.426f, -0.854f, -0.993f, 0.118f, 0.615f, 0.362f, -0.238f, -0.076f, 0.817f, -0.286f }; + int lda = 3; + float B[] = { 0.395f, 0.074f, -0.191f, -0.548f, 0.858f, 0.323f, -0.734f, 0.612f, 0.895f, 0.849f, 0.811f, 0.402f }; + int ldb = 3; + float B_expected[] = { -0.730125f, -0.024468f, 0.566282f, -0.25448f, -0.793364f, -0.018503f, -0.504384f, -1.51274f, -0.18131f, 1.28332f, -0.777559f, -0.096488f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1736) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1736) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.033f, -0.383f, 0.116f, 0.797f, -0.99f, 0.765f, 0.915f, 0.002f, 0.228f, 0.077f, 0.597f, -0.454f, -0.629f, 0.424f, -0.89f, 0.339f, -0.484f, 0.169f }; + int lda = 3; + float B[] = { -0.377f, -0.451f, -0.464f, -0.673f, 0.231f, -0.712f, -0.457f, -0.588f, 0.373f, -0.754f, -0.468f, 0.433f }; + int ldb = 3; + float B_expected[] = { 0.643625f, 0.521931f, 0.428222f, -0.038989f, -0.231f, 0.712f, 0.003417f, 1.74795f, -0.642733f, 1.29802f, 0.468f, -0.433f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1737) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1737) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.946f, -0.007f, 0.677f, -0.923f, 0.651f, -0.685f, 0.591f, 0.135f, 0.171f, 0.979f, -0.029f, -0.008f, -0.049f, 0.174f, 0.578f, 0.388f, 0.187f, -0.479f }; + int lda = 3; + float B[] = { -0.607f, -0.907f, -0.156f, -0.141f, -0.254f, 0.364f, 0.209f, 0.955f, 0.93f, 0.962f, 0.494f, 0.079f }; + int ldb = 2; + float B_expected[] = { 0.580571f, 0.853773f, 0.148563f, 0.132294f, 0.636082f, 0.804404f, 0.972367f, -0.263525f, -0.534225f, 0.214911f, 0.087341f, -0.390994f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1738) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1738) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.203f, -0.791f, -0.415f, -0.56f, 0.782f, -0.691f, -0.441f, 0.545f, -0.09f, 0.595f, -0.438f, 0.952f, 0.88f, 0.944f, -0.55f, -0.762f, -0.035f, -0.949f }; + int lda = 3; + float B[] = { -0.035f, 0.448f, 0.487f, -0.108f, -0.482f, -0.708f, -0.317f, 0.816f, -0.547f, 0.22f, -0.654f, 0.57f }; + int ldb = 2; + float B_expected[] = { 0.035f, -0.448f, -0.487f, 0.108f, 0.710725f, 0.924643f, 0.472907f, -1.12904f, 1.27511f, -1.33788f, -0.672654f, -0.727442f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1739) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1739) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { -0.09f, 0.742f, 0.081f, 0.459f, -0.54f, 0.04f, 0.574f, -0.858f, 0.704f, 0.686f, -0.9f, -0.519f, 0.538f, -0.934f, 0.467f, 0.376f, 0.149f, 0.322f }; + int lda = 3; + float B[] = { 0.307f, 0.294f, -0.428f, -0.7f, 0.496f, 0.167f, -0.611f, 0.904f, -0.846f, -0.411f, 0.29f, 0.004f }; + int ldb = 2; + float B_expected[] = { -0.191025f, -0.630625f, 0.063267f, 0.452361f, -0.782713f, -1.2668f, 1.30921f, -0.06316f, -0.006288f, 0.333651f, -0.041922f, -0.093976f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1740) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1740) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-1.0f, 0.0f}; + float A[] = { 0.434f, 0.691f, 0.983f, -0.481f, -0.156f, -0.117f, -0.231f, 0.526f, 0.935f, 0.417f, -0.142f, -0.541f, 0.529f, 0.014f, 0.266f, 0.086f, 0.666f, 0.033f }; + int lda = 3; + float B[] = { 0.972f, -0.219f, -0.735f, -0.967f, 0.084f, -0.355f, -0.152f, -0.156f, 0.267f, 0.928f, 0.708f, -0.267f }; + int ldb = 2; + float B_expected[] = { -0.950741f, 0.784376f, 1.10114f, 1.08842f, -0.548134f, 0.631223f, 0.396983f, 0.501114f, -0.267f, -0.928f, -0.708f, 0.267f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1741) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1741) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.25f, -0.779f, -0.138f, -0.017f, -0.319f, -0.555f, 0.674f, -0.256f }; + int lda = 2; + float B[] = { -0.651f, -0.525f, 0.409f, -0.932f, 0.359f, 0.321f, 0.419f, 0.027f, 0.67f, 0.328f, 0.446f, -0.615f }; + int ldb = 3; + float B_expected[] = { 0.0100296f, -0.216136f, 0.257045f, -0.0571445f, -0.0121016f, 0.124004f, -0.110514f, 0.0386878f, -0.1561f, -0.0050383f, 0.028185f, 0.183634f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1742) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1742) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.012f, 0.978f, 0.617f, -0.361f, -0.349f, 0.712f, 0.008f, 0.305f }; + int lda = 2; + float B[] = { -0.771f, -0.335f, -0.565f, 0.866f, -0.516f, -0.869f, -0.097f, -0.711f, 0.308f, 0.207f, -0.459f, 0.766f }; + int ldb = 3; + float B_expected[] = { 0.2648f, 0.0234f, 0.0829f, -0.3163f, 0.2417f, 0.2091f, 0.272029f, 0.122445f, -0.176135f, -0.256384f, 0.285714f, -0.233939f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1743) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1743) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.063f, -0.605f, 0.473f, 0.763f, 0.548f, -0.167f, -0.825f, 0.011f }; + int lda = 2; + float B[] = { -0.262f, 0.135f, -0.333f, -0.671f, 0.91f, 0.874f, 0.305f, -0.255f, 0.882f, 0.883f, 0.088f, -0.473f }; + int ldb = 3; + float B_expected[] = { -0.0627538f, 0.0344746f, -0.131779f, -0.149516f, -0.0442507f, 0.307921f, 0.053273f, -0.089001f, 0.293086f, 0.141896f, -0.0189002f, -0.124098f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1744) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1744) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.493f, -0.852f, -0.567f, 0.21f, 0.168f, 0.666f, -0.328f, 0.803f }; + int lda = 2; + float B[] = { 0.24f, -0.578f, 0.293f, -0.233f, -0.348f, -0.853f, -0.145f, 0.192f, -0.785f, -0.72f, -0.508f, 0.023f }; + int ldb = 3; + float B_expected[] = { 0.037901f, 0.201471f, -0.104515f, 0.327095f, 0.253345f, 0.311373f, 0.0243f, -0.0721f, 0.3075f, 0.1375f, 0.1501f, -0.0577f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1745) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1745) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.089f, -0.135f, 0.987f, 0.936f, 0.353f, 0.638f, 0.845f, 0.343f }; + int lda = 2; + float B[] = { 0.744f, 0.445f, 0.835f, 0.273f, 0.702f, 0.03f, -0.618f, 0.141f, -0.303f, -0.399f, 0.63f, -0.037f }; + int ldb = 2; + float B_expected[] = { 0.0158468f, 0.0413994f, -0.292082f, -0.285588f, 0.0272724f, 0.0233892f, 0.0660084f, -0.143882f, 0.0004278f, -0.0256146f, -0.19286f, 0.114065f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1746) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1746) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.187f, -0.741f, 0.287f, -0.599f, -0.293f, -0.297f, 0.778f, -0.056f }; + int lda = 2; + float B[] = { -0.335f, -0.713f, 0.081f, -0.589f, -0.256f, -0.809f, -0.473f, 0.418f, 0.646f, -0.447f, -0.147f, 0.314f }; + int ldb = 2; + float B_expected[] = { 0.1718f, 0.1804f, 0.0378414f, 0.0809182f, 0.1577f, 0.2171f, 0.118373f, -0.283147f, -0.1491f, 0.1987f, 0.1154f, -0.122836f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1747) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1747) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.259f, -0.645f, -0.09f, 0.709f, 0.729f, -0.023f, -0.792f, 0.03f }; + int lda = 2; + float B[] = { 0.904f, -0.402f, 0.753f, 0.104f, 0.38f, 0.944f, -0.715f, -0.378f, -0.16f, 0.254f, -0.68f, 0.183f }; + int ldb = 2; + float B_expected[] = { 0.185924f, -0.0771597f, 0.185827f, -0.0420162f, -0.156592f, 0.373034f, -0.201079f, -0.0256158f, 0.0051007f, 0.152025f, -0.143387f, 0.102908f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1748) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1748) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.938f, 0.25f, -0.509f, 0.377f, -0.063f, 0.166f, 0.227f, -0.24f }; + int lda = 2; + float B[] = { 0.756f, -0.08f, -0.657f, -0.837f, -0.714f, 0.781f, 0.239f, -0.953f, 0.26f, 0.696f, -0.183f, 0.668f }; + int ldb = 2; + float B_expected[] = { -0.431623f, 0.111093f, 0.2808f, 0.1854f, 0.007293f, -0.454491f, 0.0236f, 0.3098f, -0.059093f, -0.075968f, -0.0119f, -0.2187f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1749) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1749) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.055f, -0.682f, 0.361f, 0.521f, -0.192f, -0.664f, -0.167f, 0.731f, -0.668f, 0.983f, 0.608f, 0.533f, -0.513f, -0.781f, 0.878f, 0.875f, 0.804f, -0.179f }; + int lda = 3; + float B[] = { -0.038f, -0.787f, -0.209f, -0.686f, -0.073f, -0.662f, 0.938f, -0.301f, -0.871f, 0.699f, 0.561f, 0.823f }; + int ldb = 3; + float B_expected[] = { 0.224558f, -0.0087435f, -0.317863f, 0.168822f, 0.105075f, 0.138035f, 0.256887f, 0.377119f, 0.113231f, 0.136832f, -0.235636f, -0.108546f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1750) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1750) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.397f, -0.154f, -0.944f, -0.137f, 0.65f, -0.49f, -0.883f, 0.273f, -0.137f, 0.655f, 0.531f, 0.676f, 0.052f, 0.03f, -0.602f, 0.002f, 0.005f, 0.984f }; + int lda = 3; + float B[] = { -0.446f, 0.091f, 0.793f, -0.221f, 0.386f, 0.354f, -0.063f, 0.105f, -0.128f, 0.189f, -0.079f, 0.749f }; + int ldb = 3; + float B_expected[] = { 0.216958f, -0.149634f, -0.25039f, 0.0074932f, -0.1512f, -0.0676f, -0.166784f, -0.100965f, 0.14955f, -0.227622f, -0.0512f, -0.2326f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1751) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1751) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.976f, -0.488f, -0.762f, -0.057f, 0.812f, 0.006f, 0.06f, -0.271f, 0.832f, -0.232f, 0.188f, -0.466f, -0.051f, -0.745f, 0.909f, -0.091f, -0.559f, 0.595f }; + int lda = 3; + float B[] = { 0.644f, -0.584f, 0.456f, 0.443f, -0.909f, 0.43f, 0.771f, -0.075f, -0.408f, 0.303f, 0.03f, 0.529f }; + int ldb = 3; + float B_expected[] = { 0.24849f, -0.168067f, -0.114085f, 0.0202884f, 0.0152508f, 0.284926f, 0.267034f, 0.0120048f, 0.0596364f, -0.0643158f, 0.284594f, 0.0837608f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1752) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1752) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.924f, -0.247f, -0.131f, 0.932f, -0.415f, 0.454f, -0.539f, 0.693f, -0.725f, -0.601f, 0.565f, 0.002f, -0.118f, 0.626f, -0.968f, 0.874f, 0.156f, -0.227f }; + int lda = 3; + float B[] = { 0.793f, -0.15f, -0.967f, 0.821f, 0.37f, -0.572f, -0.156f, 0.106f, -0.877f, -0.297f, 0.448f, -0.576f }; + int ldb = 3; + float B_expected[] = { -0.2229f, 0.1243f, 0.242003f, -0.564467f, -0.0068716f, 0.568213f, 0.0362f, -0.0474f, 0.306136f, 0.0520352f, -0.336053f, 0.500406f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1753) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1753) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.671f, 0.477f, 0.227f, 0.685f, -0.648f, 0.277f, -0.295f, -0.632f, 0.509f, -0.798f, 0.875f, 0.89f, -0.34f, -0.786f, -0.453f, 0.511f, -0.189f, 0.385f }; + int lda = 3; + float B[] = { -0.895f, -0.148f, 0.934f, 0.229f, 0.958f, -0.55f, 0.49f, 0.586f, -0.871f, 0.618f, -0.0f, -0.543f }; + int ldb = 2; + float B_expected[] = { 0.162976f, 0.110656f, -0.12507f, -0.0587256f, 0.138701f, 0.543589f, -0.313677f, 0.0534812f, 0.067207f, 0.12831f, -0.0729792f, -0.0098826f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1754) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1754) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.438f, -0.618f, 0.524f, 0.525f, -0.268f, -0.502f, -0.685f, 0.28f, 0.508f, 0.664f, -0.492f, 0.772f, -0.997f, 0.693f, 0.63f, -0.328f, -0.521f, -0.869f }; + int lda = 3; + float B[] = { 0.527f, 0.999f, -0.078f, 0.599f, 0.004f, -0.615f, -0.281f, -0.328f, 0.456f, -0.666f, 0.309f, -0.69f }; + int ldb = 2; + float B_expected[] = { -0.45115f, -0.650085f, -0.277633f, -0.456478f, 0.0965652f, 0.362528f, 0.1802f, 0.227951f, -0.0702f, 0.2454f, -0.0237f, 0.2379f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1755) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1755) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.454f, 0.517f, -0.794f, -0.181f, 0.292f, 0.954f, -0.93f, -0.128f, 0.123f, -0.997f, 0.325f, -0.317f, -0.988f, 0.732f, 0.637f, 0.457f, -0.665f, 0.529f }; + int lda = 3; + float B[] = { -0.055f, 0.803f, -0.981f, -0.627f, 0.147f, -0.656f, -0.824f, -0.366f, -0.445f, -0.151f, 0.686f, -0.368f }; + int ldb = 2; + float B_expected[] = { 0.156354f, 0.078881f, -0.208608f, 0.143709f, 0.219569f, 0.211768f, -0.204943f, -0.415655f, 0.191227f, 0.0071854f, 0.136999f, 0.0773624f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1756) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1756) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.623f, -0.129f, -0.419f, -0.006f, 0.21f, -0.165f, 0.218f, 0.915f, 0.736f, 0.07f, 0.502f, -0.809f, 0.242f, -0.015f, 0.67f, -0.956f, 0.153f, 0.365f }; + int lda = 3; + float B[] = { -0.927f, 0.383f, -0.471f, 0.443f, -0.731f, -0.949f, -0.142f, -0.65f, 0.159f, -0.624f, -0.822f, 0.107f }; + int ldb = 2; + float B_expected[] = { 0.2398f, -0.2076f, 0.097f, -0.18f, 0.212478f, 0.297146f, 0.065877f, 0.255638f, 0.359717f, -0.0280276f, 0.426852f, -0.164392f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1757) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1757) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.628f, -0.771f, 0.827f, -0.979f, 0.395f, -0.166f, 0.88f, 0.958f }; + int lda = 2; + float B[] = { 0.297f, 0.49f, 0.425f, -0.386f, 0.672f, 0.992f, -0.077f, 0.761f, 0.393f, -0.605f, -0.273f, 0.725f }; + int ldb = 3; + float B_expected[] = { 0.177165f, -0.0328107f, -0.0662201f, -0.167954f, 0.366541f, -0.0872256f, -0.2721f, -0.389113f, -0.0674816f, 0.293174f, -0.249446f, -0.709453f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1758) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1758) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.876f, 0.752f, -0.148f, 0.972f, -0.508f, -0.752f, -0.861f, 0.074f }; + int lda = 2; + float B[] = { 0.878f, -0.987f, -0.896f, 0.519f, -0.355f, -0.117f, 0.329f, 0.068f, -0.644f, 0.344f, -0.187f, -0.343f }; + int ldb = 3; + float B_expected[] = { -0.1647f, 0.3839f, 0.2169f, -0.2453f, 0.1182f, -0.0004f, 0.292026f, 0.115771f, -0.111733f, -0.342122f, 0.0725176f, -0.0306312f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1759) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1759) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.072f, -0.966f, 0.648f, 0.43f, -0.623f, -0.221f, -0.622f, 0.977f }; + int lda = 2; + float B[] = { 0.0f, 0.028f, 0.857f, -0.171f, -0.933f, 0.159f, 0.315f, -0.297f, -0.864f, 0.519f, -0.601f, -0.119f }; + int ldb = 3; + float B_expected[] = { 0.0216306f, -0.0927642f, -0.225266f, -0.0253344f, 0.0408658f, 0.302549f, 0.158132f, -0.0117036f, -0.365472f, -0.0519459f, -0.143387f, -0.172603f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1760) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1760) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.903f, -0.972f, -0.812f, 0.605f, 0.085f, -0.025f, -0.443f, 0.518f }; + int lda = 2; + float B[] = { -0.725f, -0.451f, 0.779f, 0.969f, 0.25f, 0.021f, 0.029f, -0.382f, 0.022f, 0.957f, 0.704f, 0.832f }; + int ldb = 3; + float B_expected[] = { 0.26217f, 0.073525f, -0.332173f, -0.239574f, -0.097644f, -0.003892f, 0.0295f, 0.1175f, -0.1023f, -0.2849f, -0.2944f, -0.1792f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1761) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1761) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.322f, -0.981f, 0.193f, -0.604f, 0.87f, -0.384f, 0.463f, -0.502f }; + int lda = 2; + float B[] = { -0.447f, 0.21f, 0.928f, -0.496f, 0.889f, -0.354f, -0.258f, -0.149f, 0.98f, -0.958f, 0.106f, -0.579f }; + int ldb = 2; + float B_expected[] = { 0.0692355f, 0.14563f, -0.0874638f, -0.0532654f, -0.116915f, -0.289728f, -0.242902f, 0.136003f, -0.314257f, -0.318533f, -0.400862f, 0.357622f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1762) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1762) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.924f, -0.553f, 0.985f, -0.793f, 0.406f, 0.741f, -0.956f, 0.945f }; + int lda = 2; + float B[] = { 0.736f, -0.81f, 0.028f, 0.474f, 0.14f, -0.03f, -0.756f, 0.923f, -0.515f, 0.532f, -0.321f, 0.326f }; + int ldb = 2; + float B_expected[] = { -0.1398f, 0.3166f, 0.122042f, 0.0927314f, -0.039f, 0.023f, 0.135709f, -0.314263f, 0.1013f, -0.2111f, -0.0515973f, -0.29067f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1763) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1763) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.04f, -0.41f, -0.643f, 0.988f, 0.86f, -0.281f, -0.017f, 0.389f }; + int lda = 2; + float B[] = { 0.204f, 0.524f, -0.558f, -0.736f, 0.26f, -0.202f, -0.757f, 0.346f, 0.917f, 0.541f, -0.108f, -0.965f }; + int ldb = 2; + float B_expected[] = { 0.059601f, -0.396251f, 0.060088f, -0.096554f, -0.338942f, -0.0950055f, -0.073098f, -0.071831f, 0.208251f, -0.444353f, 0.106223f, -0.05488f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1764) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1764) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.375f, 0.153f, -0.343f, -0.742f, 0.563f, 0.473f, 0.451f, -0.433f }; + int lda = 2; + float B[] = { -0.804f, -0.016f, -0.715f, -0.902f, -0.89f, 0.155f, -0.408f, 0.419f, 0.078f, -0.691f, -0.717f, -0.637f }; + int ldb = 2; + float B_expected[] = { -0.0094443f, 0.0821961f, 0.3047f, 0.1991f, 0.347432f, -0.0186595f, 0.0805f, -0.1665f, -0.138523f, 0.381015f, 0.2788f, 0.1194f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1765) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1765) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.867f, -0.597f, -0.577f, 0.735f, 0.827f, -0.104f, -0.861f, -0.802f, -0.288f, 0.293f, 0.593f, 0.228f, -0.469f, 0.942f, 0.193f, 0.591f, 0.241f, 0.382f }; + int lda = 3; + float B[] = { -0.812f, -0.874f, -0.18f, -0.81f, 0.023f, 0.352f, 0.559f, 0.237f, -0.835f, 0.037f, -0.762f, 0.782f }; + int ldb = 3; + float B_expected[] = { -0.331628f, -0.278177f, -0.0214727f, -0.156013f, -0.0496067f, -0.0088131f, 0.119788f, -0.469291f, -0.0804714f, -0.263663f, -0.0824792f, -0.132356f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1766) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1766) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.258f, -0.812f, -0.858f, -0.107f, -0.151f, 0.785f, 0.717f, 0.992f, -0.649f, -0.242f, -0.454f, 0.916f, 0.86f, 0.834f, -0.244f, 0.391f, 0.818f, -0.714f }; + int lda = 3; + float B[] = { 0.163f, 0.441f, 0.54f, 0.679f, 0.071f, -0.76f, 0.345f, -0.956f, 0.654f, -0.217f, -0.892f, 0.106f }; + int ldb = 3; + float B_expected[] = { 0.296566f, -0.0905963f, -0.0393822f, -0.306541f, 0.0547f, 0.2351f, -0.0059345f, 0.0071855f, -0.402014f, -0.049978f, 0.257f, -0.121f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1767) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1767) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.525f, 0.182f, 0.851f, -0.348f, -0.046f, 0.839f, -0.045f, -0.149f, -0.992f, 0.588f, -0.01f, -0.409f, 0.527f, 0.263f, -0.509f, -0.026f, 0.284f, 0.507f }; + int lda = 3; + float B[] = { 0.909f, 0.216f, 0.38f, 0.198f, -0.412f, -0.102f, -0.456f, 0.079f, 0.504f, -0.782f, -0.88f, 0.079f }; + int ldb = 3; + float B_expected[] = { -0.149757f, 0.0672651f, 0.129501f, 0.054878f, -0.0469462f, 0.0277224f, 0.0550599f, -0.0598423f, 0.244521f, -0.217471f, 0.0955519f, -0.37895f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1768) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1768) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.893f, -0.758f, 0.145f, 0.623f, -0.018f, -0.733f, -0.144f, -0.192f, 0.53f, 0.773f, -0.771f, 0.36f, 0.932f, -0.771f, 0.997f, -0.671f, 0.574f, -0.771f }; + int lda = 3; + float B[] = { 0.592f, 0.985f, -0.62f, -0.095f, -0.344f, -0.607f, 0.759f, 0.085f, -0.609f, 0.068f, -0.084f, -0.575f }; + int ldb = 3; + float B_expected[] = { -0.2761f, -0.2363f, 0.280628f, -0.052484f, 0.306154f, -0.187624f, -0.2362f, 0.0504f, 0.200236f, -0.133908f, 0.0536278f, 0.0659354f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1769) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1769) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.503f, -0.057f, -0.581f, -0.77f, -0.907f, -0.843f, 0.56f, -0.554f, 0.054f, 0.988f, 0.868f, -0.627f, 0.645f, -0.246f, -0.958f, 0.66f, 0.956f, 0.99f }; + int lda = 3; + float B[] = { 0.282f, -0.442f, 0.564f, -0.691f, -0.743f, 0.113f, -0.395f, 0.312f, -0.167f, -0.568f, 0.508f, 0.912f }; + int ldb = 2; + float B_expected[] = { 0.180092f, 0.260648f, -0.045069f, -0.102868f, -0.0964434f, -0.432702f, -0.0404678f, 0.280779f, 0.254359f, 0.0411062f, -0.453454f, 0.0281672f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1770) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1770) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { -0.851f, 0.296f, -0.683f, -0.53f, 0.38f, -0.837f, 0.977f, 0.189f, -0.624f, -0.664f, 0.73f, -0.882f, 0.105f, -0.868f, 0.362f, -0.006f, -0.435f, 0.757f }; + int lda = 3; + float B[] = { -0.259f, -0.091f, 0.606f, -0.983f, -0.238f, 0.057f, 0.358f, 0.18f, -0.71f, 0.058f, 0.511f, 0.717f }; + int ldb = 2; + float B_expected[] = { 0.241746f, 0.119591f, -0.0907286f, 0.148899f, 0.141237f, -0.0716576f, -0.205866f, -0.078918f, 0.2072f, -0.0884f, -0.225f, -0.164f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1771) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1771) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.956f, 0.972f, 0.771f, 0.187f, 0.948f, 0.303f, -0.854f, 0.123f, 0.704f, 0.152f, 0.347f, 0.595f, -0.865f, 0.75f, -0.041f, -0.572f, 0.749f, 0.216f }; + int lda = 3; + float B[] = { -0.821f, -0.098f, 0.347f, -0.639f, 0.314f, -0.009f, -0.725f, 0.45f, 0.536f, 0.801f, 0.431f, 0.936f }; + int ldb = 2; + float B_expected[] = { 0.193607f, -0.29931f, 0.18163f, 0.255513f, 0.127098f, -0.0503344f, 0.101243f, 0.0097718f, -0.0060322f, -0.148016f, -0.251411f, -0.0777231f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1772) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1772) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {-0.3f, 0.1f}; + float A[] = { 0.78f, -0.205f, 0.073f, -0.859f, 0.568f, -0.599f, -0.947f, -0.514f, 0.835f, 0.176f, 0.27f, -0.617f, 0.171f, -0.074f, 0.939f, -0.469f, -0.471f, 0.25f }; + int lda = 3; + float B[] = { -0.279f, 0.16f, -0.495f, 0.658f, 0.071f, 0.557f, -0.116f, 0.095f, -0.104f, 0.503f, -0.775f, -0.03f }; + int ldb = 2; + float B_expected[] = { 0.0677f, -0.0759f, 0.0827f, -0.2469f, -0.0068598f, -0.107386f, 0.243424f, 0.0129156f, 0.142748f, -0.254568f, 0.461939f, -0.154419f }; + cblas_ctrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrmm(case 1773) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrmm(case 1773) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.463, 0.033, -0.929, 0.949, 0.864, 0.986, 0.393, 0.885 }; + int lda = 2; + double B[] = { -0.321, -0.852, -0.337, -0.175, 0.607, -0.613, 0.688, 0.973, -0.331, -0.35, 0.719, -0.553 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1774) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1774) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.608, -0.393, 0.921, 0.282, -0.857, -0.286, -0.31, -0.057 }; + int lda = 2; + double B[] = { -0.548, 0.728, 0.391, -0.506, 0.186, 0.97, -0.435, 0.375, -0.995, -0.496, 0.99, 0.186 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1775) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1775) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.253, 0.969, 0.654, -0.016, -0.774, -0.11, -0.101, -0.287 }; + int lda = 2; + double B[] = { -0.34, -0.268, -0.52, 0.021, -0.875, 0.98, 0.255, 0.564, -0.478, -0.818, -0.043, 0.224 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1776) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1776) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.64, -0.222, 0.922, 0.417, -0.724, 0.012, 0.418, 0.39 }; + int lda = 2; + double B[] = { 0.619, -0.024, -0.068, 0.219, 0.374, -0.937, 0.79, 0.166, -0.92, 0.753, -0.017, 0.076 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1777) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1777) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.57, 0.987, 0.116, -0.691, -0.603, -0.778, 0.14, -0.073 }; + int lda = 2; + double B[] = { 0.421, -0.055, 0.92, 0.664, 0.835, 0.861, -0.392, -0.897, -0.346, 0.516, -0.068, -0.156 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1778) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1778) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.754, 0.904, 0.089, 0.206, 0.974, -0.946, -0.55, -0.675 }; + int lda = 2; + double B[] = { -0.42, -0.372, 0.628, 0.148, 0.344, -0.924, -0.802, -0.307, 0.427, 0.116, 0.916, -0.384 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1779) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1779) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.152, -0.898, -0.024, 0.719, 0.992, -0.841, 0.901, 0.202 }; + int lda = 2; + double B[] = { 0.243, -0.811, 0.68, 0.118, 0.946, -0.632, 0.729, -0.942, 0.308, 0.507, -0.838, 0.594 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1780) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1780) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.119, -0.849, 0.425, -0.273, -0.918, 0.196, -0.871, -0.39 }; + int lda = 2; + double B[] = { 0.709, 0.33, -0.207, 0.012, -0.017, 0.787, -0.385, 0.739, -0.874, 0.188, -0.039, 0.692 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1781) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1781) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.837, -0.603, 0.755, -0.92, 0.892, -0.009, -0.741, 0.271, -0.325, -0.861, 0.902, -0.088, 0.091, 0.256, 0.209, -0.724, 0.28, -0.604 }; + int lda = 3; + double B[] = { 0.455, -0.215, -0.668, 0.917, -0.985, 0.477, 0.564, -0.524, -0.202, -0.53, -0.88, -0.688 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1782) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1782) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.991, 0.253, 0.813, 0.497, -0.268, 0.623, 0.82, -0.946, -0.883, 0.333, -0.265, -0.371, 0.131, -0.812, -0.365, 0.45, 0.929, -0.704 }; + int lda = 3; + double B[] = { 0.783, -0.756, 0.635, 0.56, 0.434, -0.831, -0.34, -0.531, -0.277, 0.874, 0.986, 0.157 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1783) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1783) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.265, -0.592, -0.721, -0.838, -0.952, 0.115, -0.34, -0.789, -0.265, -0.779, -0.676, 0.048, 0.78, -0.272, -0.651, 0.272, 0.8, -0.693 }; + int lda = 3; + double B[] = { -0.609, 0.028, -0.818, 0.289, -0.41, -0.25, -0.917, 0.463, 0.942, 0.692, -0.516, 0.378 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1784) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1784) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.962, 0.945, -0.58, -0.358, -0.769, 0.751, -0.068, -0.321, 0.938, 0.183, -0.17, 0.251, -0.248, -0.092, -0.818, 0.928, -0.059, -0.222 }; + int lda = 3; + double B[] = { 0.015, -0.852, -0.565, 0.16, -0.095, 0.073, 0.405, 0.509, 0.082, -0.478, -0.365, 0.824 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1785) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1785) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.616, 0.669, 0.323, -0.238, 0.153, 0.891, -0.4, 0.996, 0.689, -0.736, -0.259, -0.707, 0.993, 0.13, -0.829, -0.564, -0.09, 0.118 }; + int lda = 3; + double B[] = { 0.113, 0.724, 0.148, -0.309, -0.833, -0.791, 0.354, -0.528, 0.313, 0.421, 0.28, 0.371 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1786) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1786) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.957, -0.713, 0.976, 0.183, -0.145, -0.858, -0.497, -0.605, -0.742, 0.686, 0.272, 0.83, -0.606, -0.099, -0.807, 0.767, 0.254, 0.244 }; + int lda = 3; + double B[] = { -0.124, -0.19, 0.665, -0.74, 0.505, -0.194, 0.588, -0.421, -0.727, 0.308, -0.802, -0.278 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1787) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1787) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.649, 0.856, 0.969, 0.382, 0.963, 0.567, 0.599, 0.018, -0.924, 0.578, -0.531, -0.091, -0.454, -0.834, 0.97, -0.126, -0.859, 0.879 }; + int lda = 3; + double B[] = { 0.35, 0.824, -0.084, 0.662, -0.752, 0.872, 0.129, 0.969, -0.539, 0.907, 0.316, -0.675 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1788) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1788) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.315, -0.459, 0.327, -0.132, -0.283, 0.173, -0.356, -0.427, 0.508, 0.347, -0.804, -0.849, 0.779, 0.673, 0.019, -0.869, 0.999, -0.338 }; + int lda = 3; + double B[] = { 0.678, -0.171, 0.136, -0.268, -0.578, -0.431, 0.978, -0.749, 0.333, -0.757, 0.658, 0.456 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1789) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1789) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.532, -0.877, 0.308, -0.807, 0.013, 0.891, 0.077, -0.004 }; + int lda = 2; + double B[] = { 0.634, -0.969, 0.228, -0.097, 0.419, 0.903, 0.21, 0.313, -0.819, -0.028, 0.574, -0.762 }; + int ldb = 3; + double B_expected[] = { 0.004051, -0.1187101, 0.0148352, -0.0206365, 0.0847859, 0.0569023, 0.0786829, -0.0569289, 0.0212752, -0.007123, 0.0120979, 0.0898923 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1790) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1790) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.77, -0.037, -0.021, -0.831, -0.663, -0.241, -0.273, -0.023 }; + int lda = 2; + double B[] = { 0.354, -0.95, -0.944, -0.497, 0.741, 0.084, -0.3, 0.023, -0.056, 0.063, -0.117, -0.498 }; + int ldb = 3; + double B_expected[] = { 0.095, 0.0354, 0.0497, -0.0944, -0.0084, 0.0741, 0.0251224, -0.1096884, -0.0857901, -0.0449183, 0.1115535, -0.0062757 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1791) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1791) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.623, 0.379, 0.903, -0.378, -0.088, 0.24, -0.964, 0.558 }; + int lda = 2; + double B[] = { -0.137, 0.706, 0.457, 0.399, -0.69, -0.7, 0.34, 0.479, 0.539, -0.133, 0.876, -0.347 }; + int ldb = 3; + double B_expected[] = { 0.0452313, -0.0327103, -0.006569, -0.0451444, -0.0415366, 0.0701362, 0.0272036, -0.0595042, -0.0428974, -0.0445382, -0.0823316, -0.0650838 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1792) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1792) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.253, 0.657, 0.636, 0.827, -0.107, 0.353, 0.425, -0.365 }; + int lda = 2; + double B[] = { -0.402, -0.409, 0.421, -0.333, -0.771, -0.099, 0.697, -0.812, -0.653, 0.823, 0.994, 0.998 }; + int ldb = 3; + double B_expected[] = { 0.0076075, -0.0189943, 0.065157, 0.0200352, -0.0145096, -0.1229652, 0.0812, 0.0697, -0.0823, -0.0653, -0.0998, 0.0994 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1793) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1793) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.57, -0.805, -0.66, -0.421, 0.643, -0.534, -0.988, -0.581 }; + int lda = 2; + double B[] = { -0.279, -0.253, 0.976, -0.051, 0.294, 0.451, 0.187, -0.177, 0.31, -0.714, -0.104, -0.177 }; + int ldb = 2; + double B_expected[] = { -0.0368805, -0.0044635, 0.0530361, -0.1308418, 0.049374, 0.0195475, -0.0199226, 0.0142283, -0.015743, -0.075147, 0.0389342, -0.0182031 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1794) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1794) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.594, 0.273, 0.457, 0.295, 0.434, -0.227, -0.662, 0.623 }; + int lda = 2; + double B[] = { -0.582, -0.581, 0.259, -0.833, -0.864, -0.284, 0.965, -0.459, -0.539, -0.551, -0.969, 0.09 }; + int ldb = 2; + double B_expected[] = { 0.0581, -0.0582, 0.095304, -0.0125475, 0.0284, -0.0864, 0.0386128, 0.0525556, 0.0551, -0.0539, 0.0026781, -0.1328003 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1795) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1795) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.398, 0.323, 0.31, 0.718, 0.181, 0.665, 0.402, 0.317 }; + int lda = 2; + double B[] = { 0.812, -0.244, -0.415, 0.602, 0.901, -0.017, 0.786, -0.119, 0.448, -0.75, 0.851, 0.172 }; + int ldb = 2; + double B_expected[] = { -0.0053814, -0.0158898, -0.0110449, -0.0357664, -0.0811715, 0.0693191, -0.0201324, 0.0353695, -0.0510542, 0.0560868, -0.0338911, 0.0287578 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1796) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1796) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.265, -0.578, 0.218, -0.093, -0.172, 0.414, 0.448, 0.696 }; + int lda = 2; + double B[] = { 0.02, -0.254, 0.152, 0.304, 0.289, 0.247, 0.705, 0.419, -0.735, 0.788, -0.942, -0.71 }; + int ldb = 2; + double B_expected[] = { 0.0201864, 0.0081408, -0.0304, 0.0152, -0.0272777, 0.0481657, -0.0419, 0.0705, -0.0720826, -0.1006386, 0.071, -0.0942 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1797) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1797) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.971, 0.532, 0.175, 0.455, 0.191, 0.493, 0.882, -0.944, 0.358, 0.142, -0.065, 0.632, -0.319, -0.101, 0.578, 0.476, -0.773, 0.912 }; + int lda = 3; + double B[] = { 0.018, -0.131, 0.964, -0.467, -0.729, -0.794, 0.874, 0.361, 0.744, -0.958, 0.162, 0.555 }; + int ldb = 3; + double B_expected[] = { 0.0271781, 0.0720558, 0.0439416, 0.0960619, 0.0051086, 0.1287645, -0.117224, 0.0980019, 0.0171007, 0.0041098, 0.0281271, -0.0631386 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1798) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1798) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.506, -0.263, -0.994, 0.681, 0.889, -0.5, -0.912, 0.741, -0.329, -0.912, 0.332, -0.001, -0.484, 0.942, -0.728, -0.104, -0.216, 0.679 }; + int lda = 3; + double B[] = { 0.562, -0.354, 0.742, -0.177, -0.627, -0.762, 0.476, 0.758, 0.675, -0.504, -0.33, 0.186 }; + int ldb = 3; + double B_expected[] = { 0.0036678, -0.0993414, 0.0429357, 0.0533074, 0.0762, -0.0627, -0.2049005, -0.0052096, 0.0441918, 0.0565626, -0.0186, -0.033 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1799) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1799) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.341, -0.27, 0.001, 0.939, 0.714, 0.803, -0.508, -0.331, -0.563, -0.725, -0.902, -0.793, 0.461, 0.127, -0.597, -0.498, 0.394, -0.019 }; + int lda = 3; + double B[] = { 0.015, 0.803, 0.497, 0.667, 0.803, 0.775, 0.026, 0.908, 0.535, -0.111, 0.379, -0.036 }; + int ldb = 3; + double B_expected[] = { 0.0277873, 0.0211695, 0.1148735, 0.0461937, -0.0016476, 0.0271498, 0.0316648, 0.0236294, 0.0795252, -0.009434, -0.0200342, -0.0329361 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1800) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1800) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.132, 0.903, -0.235, -0.294, -0.09, 0.74, -0.707, -0.855, 0.632, 0.543, -0.558, -0.416, -0.99, -0.088, -0.189, -0.371, -0.844, -0.737 }; + int lda = 3; + double B[] = { -0.257, 0.159, 0.689, 0.785, 0.398, -0.128, -0.098, -0.735, -0.307, 0.032, 0.517, 0.049 }; + int ldb = 3; + double B_expected[] = { -0.0159, -0.0257, -0.0892322, 0.1006644, 0.0666778, 0.0827436, 0.0735, -0.0098, -0.0635435, -0.0866139, -0.0893123, 0.0619235 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1801) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1801) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.993, 0.709, 0.225, -0.704, -0.396, 0.656, -0.588, -0.085, -0.024, 0.264, -0.988, -0.67, 0.665, -0.165, -0.778, -0.43, 0.71, -0.35 }; + int lda = 3; + double B[] = { 0.321, 0.614, 0.058, 0.983, 0.153, -0.647, 0.342, -0.518, -0.071, -0.533, -0.424, 0.283 }; + int ldb = 2; + double B_expected[] = { -0.0861992, -0.0396692, -0.155091, -0.1119744, -0.0501124, -0.0006816, -0.0064866, 0.0580106, 0.035358, -0.023696, -0.034933, -0.020199 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1802) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1802) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.034, -0.02, -0.401, -0.892, 0.329, -0.799, -0.018, 0.564, 0.095, 0.965, -0.105, 0.756, -0.583, -0.706, -0.436, -0.145, 0.921, 0.416 }; + int lda = 3; + double B[] = { 0.972, 0.157, -0.029, 0.674, 0.914, 0.434, 0.132, -0.116, -0.907, 0.316, -0.423, 0.321 }; + int ldb = 2; + double B_expected[] = { -0.1120798, 0.1462649, -0.0862031, 0.0507283, -0.0427739, 0.1355272, 0.0194621, 0.0362973, -0.0316, -0.0907, -0.0321, -0.0423 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1803) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1803) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.195, -0.36, 0.834, -0.505, -0.87, -0.787, 0.997, 0.965, -0.046, -0.591, 0.082, 0.552, 0.414, -0.013, -0.048, -0.766, 0.728, 0.088 }; + int lda = 3; + double B[] = { -0.916, -0.162, -0.863, 0.67, -0.079, -0.27, -0.191, 0.995, 0.981, -0.25, -0.149, 0.248 }; + int ldb = 2; + double B_expected[] = { -0.036135, 0.01203, -0.018003, 0.0409485, -0.0386581, -0.100169, -0.1061706, 0.0215439, -0.0700412, 0.1548156, -0.0239871, 0.0582902 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1804) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1804) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.553, -0.63, -0.079, 0.351, 0.865, -0.062, 0.165, -0.634, -0.513, 0.216, -0.521, 0.349, 0.54, 0.545, -0.719, -0.306, 0.501, 0.757 }; + int lda = 3; + double B[] = { -0.311, 0.088, -0.328, 0.977, 0.659, -0.06, -0.276, 0.872, -0.734, -0.01, -0.668, -0.327 }; + int ldb = 2; + double B_expected[] = { -0.0088, -0.0311, -0.0977, -0.0328, 0.0176113, 0.0652681, -0.0679689, -0.0593015, -0.0346653, -0.1319958, 0.0012195, -0.1051678 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1805) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1805) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.993, -0.018, 0.162, -0.222, 0.188, 0.672, -0.675, -0.345 }; + int lda = 2; + double B[] = { 0.476, -0.009, 0.725, -0.925, -0.245, 0.308, 0.515, 0.1, -0.072, -0.757, 0.212, 0.571 }; + int ldb = 3; + double B_expected[] = { 0.000369, 0.47283, 0.905475, 0.736575, -0.301434, -0.248829, -0.214389, -0.303015, -0.497235, 0.632565, 0.316779, -0.448161 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1806) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1806) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.78, 0.346, -0.663, -0.86, -0.496, -0.154, 0.356, 0.228 }; + int lda = 2; + double B[] = { 0.578, 0.492, 0.775, 0.353, 0.198, -0.519, -0.52, -0.677, -0.438, 0.313, 0.941, -0.56 }; + int ldb = 3; + double B_expected[] = { -0.492, 0.578, -0.353, 0.775, 0.519, 0.198, 0.506116, -1.326334, -0.745461, -1.255405, 0.045623, 1.256066 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1807) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1807) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.455, 0.442, 0.062, 0.815, 0.03, 0.55, 0.592, -0.487 }; + int lda = 2; + double B[] = { -0.451, 0.01, 0.174, -0.775, 0.22, -0.644, 0.858, -0.004, 0.59, -0.395, -0.943, 0.824 }; + int ldb = 3; + double B_expected[] = { 0.268128, -0.177245, 0.765883, -0.46293, -0.15311, 0.240362, -0.415478, 0.509884, -0.05349, 0.541645, -0.028567, -0.959544 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1808) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1808) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.268, -0.886, -0.805, 0.875, 0.481, 0.095, -0.057, 0.605 }; + int lda = 2; + double B[] = { 0.708, -0.638, 0.408, -0.512, 0.175, 0.181, -0.919, -0.126, 0.708, -0.51, 0.212, 0.114 }; + int ldb = 3; + double B_expected[] = { 0.611301, 0.253991, 0.82457, 0.700098, -0.215694, 0.287802, 0.126, -0.919, 0.51, 0.708, -0.114, 0.212 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1809) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1809) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.881, 0.555, 0.774, 0.148, -0.915, 0.336, 0.103, 0.381 }; + int lda = 2; + double B[] = { 0.163, 0.963, -0.017, 0.921, 0.809, 0.846, 0.905, -0.43, 0.894, -0.371, -0.988, -0.487 }; + int ldb = 2; + double B_expected[] = { -0.757938, 0.678068, 0.834573, 0.523573, -0.296331, 1.182259, 1.435009, -0.526594, 0.823021, 0.581709, -0.365348, -1.229977 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1810) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1810) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.719, -0.513, 0.169, -0.524, 0.352, 0.823, -0.741, -0.355 }; + int lda = 2; + double B[] = { 0.717, 0.052, -0.777, 0.277, -0.962, 0.894, 0.905, -0.216, -0.707, 0.016, 0.481, 0.935 }; + int ldb = 2; + double B_expected[] = { -0.052, 0.717, 0.294787, -0.48182, -0.894, -0.962, -0.890414, 1.302138, -0.016, -0.707, -1.522493, 0.245304 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1811) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1811) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.501, -0.136, -0.502, 0.669, -0.498, -0.4, -0.518, 0.833 }; + int lda = 2; + double B[] = { -0.385, 0.88, 0.726, 0.911, 0.839, 0.573, -0.881, -0.517, -0.861, -0.278, 0.941, 0.822 }; + int ldb = 2; + double B_expected[] = { 0.554496, -0.067558, 1.076656, 0.382795, -1.2501, 0.4388, -1.001679, 0.025697, 1.298547, -0.316017, 1.209649, 0.197288 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1812) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1812) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.049, 0.641, -0.9, 0.246, -0.734, -0.686, 0.76, -0.869 }; + int lda = 2; + double B[] = { -0.37, 0.206, -0.731, -0.573, 0.638, -0.417, -0.29, -0.719, 0.107, -0.333, 0.556, 0.124 }; + int ldb = 2; + double B_expected[] = { -0.901526, 0.146942, 0.573, -0.731, -0.30144, 0.722126, 0.719, -0.29, 0.581376, -0.362896, -0.124, 0.556 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1813) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1813) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.553, 0.338, 0.229, -0.828, -0.594, -0.036, -0.335, -0.249, 0.083, -0.197, 0.995, 0.85, -0.988, 0.596, -0.254, 0.179, 0.441, -0.859 }; + int lda = 3; + double B[] = { -0.058, -0.225, 0.884, 0.348, 0.123, -0.151, 0.891, 0.711, -0.792, 0.552, 0.033, -0.178 }; + int ldb = 3; + double B_expected[] = { -0.800945, -0.261458, 0.051763, -0.001149, -0.039066, 0.183952, 0.330423, 0.081423, 0.315368, -0.292945, 0.050151, 0.167455 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1814) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1814) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.257, -0.565, -0.123, 0.129, 0.817, -0.516, -0.613, -0.42, -0.494, 0.122, -0.593, -0.972, -0.695, -0.968, 0.848, -0.2, -0.17, 0.436 }; + int lda = 3; + double B[] = { -0.274, 0.105, -0.899, -0.33, -0.318, -0.096, -0.237, 0.327, 0.046, 0.584, -0.459, -0.182 }; + int ldb = 3; + double B_expected[] = { -0.019041, -0.416263, 0.582168, -0.617114, 0.096, -0.318, 0.136304, -0.448413, -0.245778, 0.495091, 0.182, -0.459 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1815) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1815) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.127, 0.025, 0.036, 0.612, 0.773, 0.953, 0.074, -0.006, 0.373, 0.292, -0.052, -0.319, -0.878, -0.401, 0.486, -0.493, -0.316, 0.003 }; + int lda = 3; + double B[] = { 0.794, -0.666, -0.406, 0.622, -0.512, -0.761, 0.161, -0.137, -0.626, 0.408, 0.536, 0.66 }; + int ldb = 3; + double B_expected[] = { -0.064732, -0.117488, -0.306038, 0.092938, -1.247288, -0.774519, -0.013374, -0.023872, -0.325804, -0.101626, 0.135651, -0.759197 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1816) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1816) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.724, -0.423, 0.028, 0.043, 0.812, -0.568, 0.294, -0.375, -0.85, -0.119, -0.338, -0.415, 0.976, 0.507, 0.913, 0.697, 0.323, 0.206 }; + int lda = 3; + double B[] = { 0.427, 0.621, -0.212, -0.942, -0.08, 0.416, 0.465, -0.972, -0.529, -0.252, -0.19, 0.073 }; + int ldb = 3; + double B_expected[] = { -0.621, 0.427, 0.599301, -0.319337, -0.093325, -0.198531, 0.972, 0.465, 0.363393, -0.02779, 0.97279, -0.887585 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1817) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1817) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.501, -0.632, 0.663, 0.151, -0.523, -0.71, -0.811, 0.8, -0.06, 0.994, -0.962, 0.827, -0.543, 0.719, -0.264, -0.942, 0.365, 0.051 }; + int lda = 3; + double B[] = { -0.974, 0.094, -0.533, 0.633, -0.982, -0.383, -0.297, 0.734, -0.092, -0.15, 0.215, -0.232 }; + int ldb = 2; + double B_expected[] = { -0.675337, -0.115274, 0.406006, -0.122575, -0.952024, -0.156194, -0.514956, 0.9092, 0.050058, -0.04123, 0.095645, 0.066643 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1818) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1818) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { 0.669, 0.332, -0.661, 0.611, 0.279, -0.133, -0.033, 0.06, 0.788, -0.407, -0.644, 0.958, 0.247, -0.161, 0.125, -0.184, 0.041, -0.045 }; + int lda = 3; + double B[] = { -0.603, 0.88, 0.668, -0.152, 0.082, 0.033, 0.733, -0.557, 0.722, 0.024, -0.754, 0.458 }; + int ldb = 2; + double B_expected[] = { -0.996161, -0.429256, 0.185867, 0.350415, -0.168848, 0.167834, 0.638486, 0.554478, -0.024, 0.722, -0.458, -0.754 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1819) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1819) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.91, 0.05, -0.944, 0.748, -0.712, 0.619, -0.28, -0.906, 0.314, 0.943, -0.719, -0.983, 0.474, -0.115, -0.859, 0.837, 0.364, -0.164 }; + int lda = 3; + double B[] = { -0.278, -0.34, 0.584, 0.43, -0.794, -0.465, -0.65, 0.461, 0.24, 0.003, 0.948, -0.778 }; + int ldb = 2; + double B_expected[] = { -0.3233, 0.23598, 0.4205, -0.50994, -1.131636, -0.679699, 0.085048, 0.000967, -0.008447, 1.102325, 1.765785, 0.337213 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1820) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1820) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 1}; + double A[] = { -0.39, -0.916, 0.257, -0.082, -0.802, 0.215, -0.155, 0.911, -0.099, 0.41, 0.057, 0.105, 0.94, -0.17, -0.714, -0.861, 0.292, -0.231 }; + int lda = 3; + double B[] = { -0.453, -0.542, 0.135, 0.518, -0.199, 0.776, 0.784, -0.28, -0.499, -0.377, -0.795, -0.965 }; + int ldb = 2; + double B_expected[] = { 0.542, -0.453, -0.518, 0.135, -0.59956, -0.270977, 0.135804, 0.776219, -0.220206, -0.182087, 1.507741, -0.776612 }; + cblas_ztrmm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrmm(case 1821) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrmm(case 1821) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_trmv.c b/software/gsl-1.15/cblas/test_trmv.c new file mode 100644 index 000000000..312df8983 --- /dev/null +++ b/software/gsl-1.15/cblas/test_trmv.c @@ -0,0 +1,1739 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_trmv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.136206f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 814)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.138f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 815)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.136206f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 816)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.138f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 817)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.136206f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 818)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.138f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 819)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.136206f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 820)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.987f }; + float X[] = { -0.138f }; + int incX = -1; + float x_expected[] = { -0.138f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 821)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { -0.152327f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 822)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { 0.463f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 823)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { -0.152327f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 824)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { 0.463f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 825)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { -0.152327f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 826)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { 0.463f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 827)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { -0.152327f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 828)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.329f }; + float X[] = { 0.463f }; + int incX = -1; + float x_expected[] = { 0.463f }; + cblas_strmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strmv(case 829)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { 0.385671 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 830)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { -0.899 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 831)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { 0.385671 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 832)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { -0.899 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 833)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { 0.385671 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 834)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { -0.899 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 835)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { 0.385671 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 836)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.429 }; + double X[] = { -0.899 }; + int incX = -1; + double x_expected[] = { -0.899 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 837)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.161664 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 838)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.192 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 839)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.161664 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 840)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.192 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 841)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.161664 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 842)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.192 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 843)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.161664 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 844)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.842 }; + double X[] = { 0.192 }; + int incX = -1; + double x_expected[] = { 0.192 }; + cblas_dtrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrmv(case 845)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { -0.038016f, -0.133218f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 846) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 846) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { 0.542f, 0.461f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 847) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 847) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { -0.038016f, -0.133218f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 848) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 848) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { 0.542f, 0.461f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 849) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 849) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { -0.038016f, -0.133218f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 850) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 850) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { 0.542f, 0.461f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 851) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 851) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { -0.038016f, -0.133218f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 852) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 852) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { -0.162f, -0.108f }; + float X[] = { 0.542f, 0.461f }; + int incX = -1; + float x_expected[] = { 0.542f, 0.461f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 853) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 853) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.418216f, 0.061332f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 854) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 854) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.302f, 0.434f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 855) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 855) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.418216f, 0.061332f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 856) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 856) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.302f, 0.434f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 857) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 857) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.418216f, 0.061332f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 858) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 858) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.302f, 0.434f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 859) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 859) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.418216f, 0.061332f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 860) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 860) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.547f, 0.583f }; + float X[] = { -0.302f, 0.434f }; + int incX = -1; + float x_expected[] = { -0.302f, 0.434f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 861) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 861) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.178848f, 0.044136f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 862) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 862) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.564f, -0.297f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 863) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 863) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.178848f, 0.044136f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 864) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 864) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.564f, -0.297f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 865) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 865) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.178848f, 0.044136f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 866) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 866) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.564f, -0.297f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 867) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 867) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.178848f, 0.044136f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 868) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 868) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.216f, 0.192f }; + float X[] = { -0.564f, -0.297f }; + int incX = -1; + float x_expected[] = { -0.564f, -0.297f }; + cblas_ctrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrmv(case 869) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrmv(case 869) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { 0.125587, 0.638297 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 870) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 870) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { -0.101, 0.889 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 871) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 871) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { 0.125587, 0.638297 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 872) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 872) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { -0.101, 0.889 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 873) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 873) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { 0.125587, 0.638297 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 874) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 874) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { -0.101, 0.889 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 875) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 875) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { 0.125587, 0.638297 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 876) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 876) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.693, -0.22 }; + double X[] = { -0.101, 0.889 }; + int incX = -1; + double x_expected[] = { -0.101, 0.889 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 877) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 877) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.172171, -0.093192 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 878) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 878) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.048, 0.293 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 879) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 879) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.172171, -0.093192 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 880) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 880) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.048, 0.293 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 881) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 881) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.172171, -0.093192 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 882) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 882) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.048, 0.293 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 883) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 883) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.172171, -0.093192 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 884) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 884) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.216, -0.623 }; + double X[] = { 0.048, 0.293 }; + int incX = -1; + double x_expected[] = { 0.048, 0.293 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 885) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 885) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.009338, -0.705318 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 886) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 886) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.708, 0.298 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 887) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 887) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.009338, -0.705318 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 888) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 888) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.708, 0.298 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 889) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 889) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.009338, -0.705318 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 890) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 890) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.708, 0.298 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 891) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 891) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.009338, -0.705318 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 892) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 892) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.345, -0.851 }; + double X[] = { -0.708, 0.298 }; + int incX = -1; + double x_expected[] = { -0.708, 0.298 }; + cblas_ztrmv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrmv(case 893) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrmv(case 893) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_trsm.c b/software/gsl-1.15/cblas/test_trsm.c new file mode 100644 index 000000000..eef55b329 --- /dev/null +++ b/software/gsl-1.15/cblas/test_trsm.c @@ -0,0 +1,3947 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_trsm (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.279f, 0.058f, 0.437f, 0.462f }; + int lda = 2; + float B[] = { 0.578f, 0.473f, -0.34f, -0.128f, 0.503f, 0.2f }; + int ldb = 3; + float B_expected[] = { 0.638784f, 0.440702f, -0.392589f, 0.0831169f, -0.326623f, -0.12987f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1822)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.735f, -0.861f, 0.772f, -0.242f }; + int lda = 2; + float B[] = { -0.793f, -0.162f, -0.844f, 0.143f, -0.379f, -0.46f }; + int ldb = 3; + float B_expected[] = { 0.200963f, 0.146496f, 0.372018f, -0.0429f, 0.1137f, 0.138f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1823)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.498f, 0.777f, -0.913f, 0.779f }; + int lda = 2; + float B[] = { -0.831f, -0.663f, -0.098f, -0.894f, -0.059f, 0.468f }; + int ldb = 3; + float B_expected[] = { -0.500602f, -0.399398f, -0.0590361f, -0.242426f, -0.445379f, -0.249422f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1824)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.543f, 0.095f, -0.933f, -0.669f }; + int lda = 2; + float B[] = { 0.068f, 0.715f, 0.012f, -0.785f, 0.378f, 0.251f }; + int ldb = 3; + float B_expected[] = { -0.0204f, -0.2145f, -0.0036f, 0.216467f, -0.313528f, -0.0786588f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1825)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.75f, 0.777f, -0.025f, 0.572f }; + int lda = 2; + float B[] = { 0.03f, 0.392f, -0.056f, 0.399f, -0.489f, -0.167f }; + int ldb = 2; + float B_expected[] = { -0.0188531f, -0.205594f, 0.0154245f, -0.209266f, 0.19852f, 0.0875874f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1826)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.899f, -0.447f, 0.338f, -0.74f }; + int lda = 2; + float B[] = { 0.964f, -0.104f, -0.199f, 0.503f, -0.386f, -0.764f }; + int ldb = 2; + float B_expected[] = { -0.299746f, 0.0312f, 0.110704f, -0.1509f, 0.0383304f, 0.2292f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1827)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.279f, 0.73f, -0.366f, 0.583f }; + int lda = 2; + float B[] = { -0.572f, 0.75f, 0.603f, 0.697f, 0.908f, 0.119f }; + int ldb = 2; + float B_expected[] = { 0.615054f, -1.15607f, -0.648387f, 0.453212f, -0.976344f, 1.16129f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1828)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.581f, -0.911f, 0.438f, 0.731f }; + int lda = 2; + float B[] = { 0.519f, 0.831f, 0.822f, 0.182f, 0.571f, -0.357f }; + int ldb = 2; + float B_expected[] = { -0.1557f, -0.391143f, -0.2466f, -0.279253f, -0.1713f, -0.0489543f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1829)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.065f, 0.099f, 0.48f, 0.746f, -0.739f, 0.695f, 0.197f, 0.621f, 0.063f }; + int lda = 3; + float B[] = { 0.01f, -0.612f, 0.756f, -0.225f, 0.546f, 0.432f }; + int ldb = 3; + float B_expected[] = { -0.0461538f, -0.254627f, -0.439373f, 1.03846f, 0.360768f, -13.9491f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1830)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.86f, -0.653f, 0.87f, -0.037f, 0.788f, 0.015f, 0.028f, -0.804f, -0.357f }; + int lda = 3; + float B[] = { -0.546f, 0.892f, -0.085f, -0.541f, -0.207f, 0.765f }; + int ldb = 3; + float B_expected[] = { 0.1638f, -0.160639f, -0.114596f, 0.1623f, 0.168082f, -0.373222f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1831)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.872f, -0.35f, 0.518f, -0.8f, -0.13f, -0.832f, 0.426f, 0.195f, -0.735f }; + int lda = 3; + float B[] = { 0.773f, 0.069f, 0.45f, 0.189f, 0.504f, 0.996f }; + int ldb = 3; + float B_expected[] = { 0.0431742f, 0.434741f, 0.183673f, 1.36286f, 1.77287f, 0.406531f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1832)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.053f, -0.132f, -0.515f, -0.411f, 0.134f, 0.657f, 0.072f, -0.007f, -0.34f }; + int lda = 3; + float B[] = { 0.494f, 0.072f, -0.882f, -0.112f, 0.904f, 0.755f }; + int ldb = 3; + float B_expected[] = { -0.175368f, -0.0197478f, 0.2646f, -0.0622068f, -0.272786f, -0.2265f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1833)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { -0.154f, -0.54f, 0.146f, -0.106f, -0.478f, 0.938f, -0.731f, 0.25f, -0.4f }; + int lda = 3; + float B[] = { -0.88f, -0.555f, 0.642f, 0.751f, -0.859f, -0.409f }; + int ldb = 2; + float B_expected[] = { -1.71429f, -1.08117f, 0.783084f, 0.711096f, 2.97803f, 2.11352f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1834)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.249f, -0.451f, -0.781f, 0.157f, -0.02f, 0.57f, 0.309f, -0.159f, 0.266f }; + int lda = 3; + float B[] = { -0.546f, 0.839f, 0.392f, -0.445f, -0.818f, 0.953f }; + int ldb = 2; + float B_expected[] = { 0.1638f, -0.2517f, -0.143317f, 0.173017f, 0.171998f, -0.180615f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1835)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.299f, 0.626f, -0.471f, 0.208f, -0.842f, 0.674f, 0.03f, 0.628f, 0.534f }; + int lda = 3; + float B[] = { 0.831f, -0.997f, -0.366f, 0.307f, -0.426f, 0.806f }; + int ldb = 2; + float B_expected[] = { -0.584851f, 0.816906f, 0.0611706f, -0.25308f, 0.239326f, -0.452809f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1836)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha = -0.3f; + float A[] = { 0.301f, 0.168f, 0.934f, 0.107f, 0.068f, 0.384f, -0.201f, 0.116f, -0.436f }; + int lda = 3; + float B[] = { 0.773f, -0.304f, -0.402f, 0.642f, -0.102f, -0.095f }; + int ldb = 2; + float B_expected[] = { -0.278767f, 0.0987764f, 0.10885f, -0.203544f, 0.0306f, 0.0285f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1837)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { -0.616f, 0.304f, 0.403f, 0.739f }; + int lda = 2; + float B[] = { 0.273f, -0.609f, 0.858f, 0.993f, -0.738f, -0.353f }; + int ldb = 3; + float B_expected[] = { -0.443182f, 0.988636f, -1.39286f, 1.52602f, -1.40534f, 0.0953025f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1838)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.811f, 0.257f, 0.98f, -0.956f }; + int lda = 2; + float B[] = { 0.996f, 0.329f, 0.273f, -0.744f, 0.662f, -0.31f }; + int ldb = 3; + float B_expected[] = { 0.996f, 0.329f, 0.273f, -0.999972f, 0.577447f, -0.380161f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1839)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.845f, 0.064f, 0.29f, -0.291f }; + int lda = 2; + float B[] = { 0.878f, 0.156f, 0.217f, 0.082f, -0.869f, 0.595f }; + int ldb = 3; + float B_expected[] = { 1.13576f, -0.840253f, 0.958527f, -0.281787f, 2.98625f, -2.04467f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1840)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.836f, 0.359f, -0.415f, 0.154f }; + int lda = 2; + float B[] = { 0.652f, 0.614f, 0.922f, -0.063f, 0.313f, -0.316f }; + int ldb = 3; + float B_expected[] = { 0.625855f, 0.743895f, 0.79086f, -0.063f, 0.313f, -0.316f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1841)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.94f, -0.656f, 0.645f, -0.634f }; + int lda = 2; + float B[] = { -0.948f, -0.596f, -0.799f, 0.133f, -0.843f, -0.179f }; + int ldb = 2; + float B_expected[] = { -1.00851f, -0.0859454f, -0.85f, -1.07453f, -0.896809f, -0.630034f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1842)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { -0.332f, 0.705f, -0.792f, -0.033f }; + int lda = 2; + float B[] = { 0.561f, 0.883f, -0.136f, 0.203f, -0.531f, 0.733f }; + int ldb = 2; + float B_expected[] = { 0.561f, 1.32731f, -0.136f, 0.095288f, -0.531f, 0.312448f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1843)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.991f, 0.614f, 0.108f, -0.125f }; + int lda = 2; + float B[] = { -0.723f, 0.885f, 0.336f, 0.584f, 0.742f, -0.438f }; + int ldb = 2; + float B_expected[] = { 3.65703f, -7.08f, 3.23371f, -4.672f, -1.42226f, 3.504f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1844)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { -0.626f, 0.912f, -0.003f, 0.761f }; + int lda = 2; + float B[] = { 0.736f, -0.383f, 0.0f, -0.238f, 0.013f, 0.473f }; + int ldb = 2; + float B_expected[] = { 1.0853f, -0.383f, 0.217056f, -0.238f, -0.418376f, 0.473f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1845)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { -0.416f, 0.599f, -0.705f, 0.326f, 0.184f, 0.079f, -0.173f, 0.125f, 0.567f }; + int lda = 3; + float B[] = { 0.466f, 0.907f, -0.85f, -0.342f, -0.058f, -0.379f }; + int ldb = 3; + float B_expected[] = { 9.44495f, 5.57299f, -1.49912f, 1.91427f, -0.0282283f, -0.66843f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1846)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { -0.75f, 0.856f, 0.773f, -0.241f, -0.357f, -0.683f, -0.718f, 0.69f, -0.486f }; + int lda = 3; + float B[] = { -0.532f, -0.817f, 0.85f, -0.135f, 0.797f, 0.981f }; + int ldb = 3; + float B_expected[] = { -0.986649f, -0.23645f, 0.85f, -2.14908f, 1.46702f, 0.981f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1847)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.765f, -0.408f, 0.404f, 0.764f, 0.157f, -0.741f, 0.844f, 0.206f, -0.215f }; + int lda = 3; + float B[] = { -0.859f, 0.563f, -0.61f, 0.2f, 0.816f, -0.692f }; + int ldb = 3; + float B_expected[] = { -1.12288f, 9.05017f, 7.1006f, 0.261438f, 3.92523f, 8.00582f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1848)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.354f, -0.931f, 0.18f, 0.391f, 0.01f, 0.429f, 0.685f, 0.332f, -0.643f }; + int lda = 3; + float B[] = { -0.645f, 0.847f, 0.014f, 0.83f, 0.761f, 0.187f }; + int ldb = 3; + float B_expected[] = { -0.645f, 1.09919f, 0.0908923f, 0.83f, 0.43647f, -0.526458f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1849)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.569f, 0.85f, 0.642f, -0.051f, 0.724f, 0.201f, 0.87f, -0.638f, 0.008f }; + int lda = 3; + float B[] = { -0.923f, 0.27f, -0.319f, -0.856f, -0.533f, 0.183f }; + int ldb = 2; + float B_expected[] = { 94.9456f, -32.8005f, -59.1516f, 18.9755f, -66.625f, 22.875f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1850)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.244f, 0.931f, 0.857f, -0.295f, 0.551f, 0.832f, 0.744f, -0.326f, 0.111f }; + int lda = 3; + float B[] = { -0.478f, -0.252f, -0.155f, 0.419f, -0.192f, 0.291f }; + int ldb = 2; + float B_expected[] = { -0.399342f, -0.316914f, -0.217592f, 0.513866f, -0.192f, 0.291f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1851)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.36f, 0.356f, -0.858f, 0.879f, 0.641f, 0.989f, 0.998f, -0.005f, 0.64f }; + int lda = 3; + float B[] = { -0.634f, -0.529f, -0.344f, 0.375f, -0.168f, 0.465f }; + int ldb = 2; + float B_expected[] = { -1.76111f, -1.46944f, 0.441428f, 1.40113f, -3.30563f, -3.40859f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1852)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha = 1.0f; + float A[] = { 0.389f, 0.997f, 0.909f, -0.598f, -0.43f, -0.345f, -0.897f, 0.119f, -0.285f }; + int lda = 3; + float B[] = { 0.779f, -0.129f, 0.016f, 0.599f, -0.668f, -0.638f }; + int ldb = 2; + float B_expected[] = { 0.779f, -0.129f, -0.760663f, 0.727613f, -1.63854f, -0.269713f }; + cblas_strsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], flteps, "strsm(case 1853)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.876, -0.503, -0.062, -0.987 }; + int lda = 2; + double B[] = { 0.219, -0.986, -0.0, -0.605, 0.289, 0.641 }; + int ldb = 3; + double B_expected[] = { 0.601967125138, -1.29370052694, -0.372910623494, -0.612968591692, 0.292806484296, 0.649442755826 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1854)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.266, -0.505, -0.55, 0.524 }; + int lda = 2; + double B[] = { 0.1, -0.105, 0.757, 0.522, -0.269, -0.142 }; + int ldb = 3; + double B_expected[] = { -0.36361, 0.240845, -0.68529, -0.522, 0.269, 0.142 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1855)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.101, 0.871, 0.202, 0.169 }; + int lda = 2; + double B[] = { 0.018, 0.292, -0.573, 0.866, 0.749, 0.99 }; + int ldb = 3; + double B_expected[] = { -0.178217821782, -2.89108910891, 5.67326732673, -4.91124260355, -0.976331360947, -12.6390532544 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1856)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.387, -0.739, -0.599, 0.114 }; + int lda = 2; + double B[] = { 0.7, 0.473, 0.86, -0.557, 0.283, 0.62 }; + int ldb = 3; + double B_expected[] = { -0.7, -0.473, -0.86, 0.1377, -0.566327, -1.13514 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1857)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.683, -0.009, -0.451, -0.185 }; + int lda = 2; + double B[] = { 0.552, 0.083, -0.976, 0.22, -0.895, -0.301 }; + int ldb = 2; + double B_expected[] = { 0.511946499941, 0.448648648649, -2.21423766373, 1.18918918919, -0.236033397966, -1.62702702703 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1858)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.141, 0.944, 0.529, 0.636 }; + int lda = 2; + double B[] = { 0.178, -0.22, -0.645, -0.585, -0.342, -0.594 }; + int ldb = 2; + double B_expected[] = { -0.29438, 0.22, 0.335535, 0.585, 0.027774, 0.594 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1859)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.541, 0.584, -0.394, 0.371 }; + int lda = 2; + double B[] = { 0.668, 0.848, -0.816, -0.925, -0.145, 0.746 }; + int ldb = 2; + double B_expected[] = { -1.23475046211, -0.342063962613, 1.50831792976, 0.118982018923, 0.268022181146, -2.43268181614 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1860)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.836, -0.024, 0.226, 0.416 }; + int lda = 2; + double B[] = { -0.172, -0.601, 0.542, 0.25, 0.746, 0.55 }; + int ldb = 2; + double B_expected[] = { 0.172, 0.605128, -0.542, -0.263008, -0.746, -0.567904 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1861)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.544, 0.721, 0.623, 0.392, -0.808, -0.022, -0.665, -0.616, -0.735 }; + int lda = 3; + double B[] = { -0.526, -0.486, -0.716, 0.361, 0.365, -0.492 }; + int ldb = 3; + double B_expected[] = { 0.966911764706, 0.261316067268, -0.162398536147, -0.663602941176, -0.140417971025, -1.22766726121 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1862)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.907, 0.558, -0.233, 0.073, -0.734, -0.058, -0.115, 0.513, 0.503 }; + int lda = 3; + double B[] = { -0.606, -0.124, 0.641, -0.074, -0.053, -0.734 }; + int ldb = 3; + double B_expected[] = { 0.606, -0.214148, -0.512222584, 0.074, 0.011708, 0.751921064 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1863)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.9, 0.063, -0.652, -0.841, 0.251, -0.8, 0.365, 0.809, 0.336 }; + int lda = 3; + double B[] = { -0.584, -0.058, -0.964, -0.214, -0.632, -0.611 }; + int ldb = 3; + double B_expected[] = { -8.93978245747, -9.01617340163, 2.86904761905, -3.62368367799, -3.34313934737, 1.81845238095 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1864)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.934, -0.608, 0.49, 0.351, -0.301, 0.602, 0.873, 0.031, -0.2 }; + int lda = 3; + double B[] = { -0.541, -0.729, -0.382, 0.741, 0.546, -0.833 }; + int ldb = 3; + double B_expected[] = { -0.044208458, 0.717158, 0.382, -1.267499127, -0.571823, 0.833 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1865)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.339, 0.049, 0.734, -0.182, 0.427, 0.193, -0.959, -0.679, 0.269 }; + int lda = 3; + double B[] = { 0.824, 0.907, 0.632, -0.348, -0.646, 0.741 }; + int ldb = 2; + double B_expected[] = { 2.43067846608, 2.67551622419, -0.444066789635, 1.95537225481, 9.9460940476, 11.7193971004 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1866)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.766, -0.422, -0.518, 0.517, 0.669, 0.337, -0.579, 0.885, -0.677 }; + int lda = 3; + double B[] = { 0.211, -0.911, -0.685, -0.777, -0.919, 0.282 }; + int ldb = 2; + double B_expected[] = { -0.211, 0.911, 0.794087, 0.306013, 0.094064005, -0.025352505 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1867)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.686, -0.256, 0.028, 0.371, 0.469, 0.115, 0.284, 0.139, 0.677 }; + int lda = 3; + double B[] = { -0.877, -0.818, 0.191, 0.468, 0.889, -0.002 }; + int ldb = 2; + double B_expected[] = { -1.30020532939, -0.819646768394, -0.0852626506631, -0.998592183627, -1.31314623338, 0.00295420974889 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1868)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.819, -0.523, 0.042, 0.545, -0.292, 0.283, 0.224, 0.247, -0.325 }; + int lda = 3; + double B[] = { 0.153, -0.272, -0.226, 0.987, -0.216, -0.218 }; + int ldb = 2; + double B_expected[] = { -0.075843944, -0.285622962, 0.164872, -1.048694, 0.216, 0.218 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1869)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.164, 0.486, 0.891, -0.508 }; + int lda = 2; + double B[] = { 0.368, 0.761, -0.349, 0.324, 0.241, 0.561 }; + int ldb = 3; + double B_expected[] = { -2.24390243902, -4.64024390244, 2.12804878049, -1.50893028615, -3.96487900903, 3.14021989629 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1870)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.019, -0.382, -0.579, 0.76 }; + int lda = 2; + double B[] = { -0.596, -0.074, 0.576, 0.861, -0.44, 0.842 }; + int ldb = 3; + double B_expected[] = { 0.596, 0.074, -0.576, -0.633328, 0.468268, -1.062032 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1871)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.449, -0.367, -0.268, 0.1 }; + int lda = 2; + double B[] = { 0.58, -0.203, 0.053, 0.792, 0.355, -0.685 }; + int ldb = 3; + double B_expected[] = { -6.01906458797, -1.66681514477, 3.9706013363, -7.92, -3.55, 6.85 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1872)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.159, 0.333, 0.515, 0.715 }; + int lda = 2; + double B[] = { -0.631, 0.472, 0.796, 0.278, 0.802, 0.298 }; + int ldb = 3; + double B_expected[] = { 0.77417, -0.05897, -0.64253, -0.278, -0.802, -0.298 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1873)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.056, -0.493, 0.619, -0.028 }; + int lda = 2; + double B[] = { -0.32, -0.217, 0.301, 0.729, -0.847, -0.577 }; + int ldb = 2; + double B_expected[] = { 5.71428571429, 118.576530612, -5.375, -92.7901785714, 15.125, 313.763392857 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1874)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.595, 0.64, 0.109, 0.969 }; + int lda = 2; + double B[] = { 0.186, -0.435, -0.747, 0.212, 0.257, 0.804 }; + int ldb = 2; + double B_expected[] = { -0.186, 0.455274, 0.747, -0.293423, -0.257, -0.775987 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1875)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.484, 0.769, 0.91, 0.817 }; + int lda = 2; + double B[] = { -0.668, 0.544, 0.753, 0.796, -0.74, -0.091 }; + int ldb = 2; + double B_expected[] = { 2.4380974539, -0.665850673195, -0.0077814418807, -0.97429620563, 1.35195534965, 0.111383108935 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1876)"); + } + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.725, 0.73, -0.095, 0.123 }; + int lda = 2; + double B[] = { -0.26, 0.579, 0.393, -0.18, 0.358, 0.839 }; + int ldb = 2; + double B_expected[] = { 0.68267, -0.579, -0.5244, 0.18, 0.25447, -0.839 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1877)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.009, 0.237, -0.563, 0.993, 0.508, 0.771, 0.745, 0.233, 0.255 }; + int lda = 3; + double B[] = { -0.328, -0.482, 0.083, -0.125, -0.712, -0.757 }; + int ldb = 3; + double B_expected[] = { 21.9110553583, 1.44282075035, -0.325490196078, -281.330646047, -3.10396016674, 2.96862745098 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1878)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.484, -0.131, 0.563, -0.095, 0.012, -0.988, -0.722, 0.738, 0.05 }; + int lda = 3; + double B[] = { -0.069, -0.137, -0.45, -0.24, 0.221, -0.509 }; + int ldb = 3; + double B_expected[] = { -0.1081604, 0.5816, 0.45, -0.009639148, 0.281892, 0.509 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1879)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.521, 0.487, -0.961, 0.903, -0.045, 0.059, -0.61, -0.328, 0.883 }; + int lda = 3; + double B[] = { -0.772, 0.079, -0.227, 0.998, 0.302, -0.099 }; + int ldb = 3; + double B_expected[] = { 1.48176583493, 31.4896566432, 12.9778986844, -1.91554702495, -31.7275325229, -12.9967319963 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1880)"); + } + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.642, 0.511, 0.762, 0.804, -0.28, -0.318, 0.382, -0.165, -0.007 }; + int lda = 3; + double B[] = { 0.987, 0.436, -0.783, 0.175, -0.973, -0.319 }; + int ldb = 3; + double B_expected[] = { -0.987, 0.357548, 1.21902942, -0.175, 1.1137, 0.5696105 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1881)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.995, 0.625, 0.16, -0.127, -0.722, -0.355, -0.14, -0.146, -0.756 }; + int lda = 3; + double B[] = { 0.676, 0.038, 0.543, 0.296, -0.44, 0.751 }; + int ldb = 2; + double B_expected[] = { 0.650272121575, -0.128270318012, 0.869769452872, 0.209093640534, -0.582010582011, 0.993386243386 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1882)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { -0.619, 0.548, 0.064, -0.483, -0.508, -0.819, 0.237, 0.852, -0.512 }; + int lda = 3; + double B[] = { -0.169, 0.429, -0.789, 0.79, 0.479, 0.817 }; + int ldb = 2; + double B_expected[] = { 0.860726164, -0.280732428, 1.197108, -0.093916, -0.479, -0.817 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1883)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.794, -0.098, 0.442, -0.991, 0.049, 0.079, -0.8, -0.762, 0.395 }; + int lda = 3; + double B[] = { 0.496, -0.734, -0.679, -0.697, 0.426, 0.094 }; + int ldb = 2; + double B_expected[] = { -0.624685138539, 0.92443324937, 12.6077725801, 16.0733562947, -2.90102076605, -4.48707504683 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1884)"); + } + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha = -1; + double A[] = { 0.848, -0.765, 0.528, -0.693, 0.252, -0.135, -0.507, 0.954, -0.056 }; + int lda = 3; + double B[] = { 0.791, -0.787, 0.636, 0.271, -0.905, -0.974 }; + int ldb = 2; + double B_expected[] = { -0.791, 0.787, -1.241115, 0.331055, 1.155097475, 0.603156425 }; + cblas_dtrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[i], B_expected[i], dbleps, "dtrsm(case 1885)"); + } + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.491f, -0.317f, -0.14f, -0.739f, -0.969f, -0.518f, 0.702f, -0.287f }; + int lda = 2; + float B[] = { -0.962f, -0.38f, 0.656f, 0.587f, -0.195f, -0.862f, -0.679f, 0.598f, 0.919f, 0.714f, -0.513f, 0.726f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1886) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1886) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.6f, 0.338f, -0.048f, -0.926f, 0.236f, 0.362f, 0.605f, 0.562f }; + int lda = 2; + float B[] = { -0.009f, 0.371f, -0.989f, 0.728f, -0.062f, 0.113f, 0.714f, 0.604f, -0.293f, 0.859f, -0.875f, 0.216f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1887) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1887) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.889f, -0.479f, -0.526f, 0.077f, -0.704f, 0.242f, 0.458f, -0.553f }; + int lda = 2; + float B[] = { -0.554f, 0.966f, 0.076f, 0.42f, 0.85f, 0.369f, 0.124f, -0.476f, -0.007f, 0.428f, 0.452f, -0.214f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1888) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1888) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.947f, 0.444f, 0.079f, -0.597f, 0.978f, -0.64f, 0.82f, 0.808f }; + int lda = 2; + float B[] = { -0.899f, -0.964f, -0.714f, 0.422f, -0.084f, -0.78f, -0.609f, -0.595f, 0.748f, -0.926f, 0.242f, -0.474f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1889) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1889) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.547f, -0.763f, -0.805f, 0.498f, 0.786f, -0.082f, 0.922f, 0.538f }; + int lda = 2; + float B[] = { -0.074f, -0.617f, 0.359f, -0.383f, -0.172f, 0.911f, -0.934f, 0.066f, -0.67f, 0.895f, 0.92f, 0.255f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1890) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1890) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.096f, -0.362f, -0.311f, -0.347f, 0.161f, -0.517f, -0.393f, 0.572f }; + int lda = 2; + float B[] = { 0.742f, -0.419f, -0.391f, 0.846f, -0.255f, -0.364f, 0.006f, -0.496f, 0.118f, -0.593f, 0.773f, 0.053f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1891) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1891) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.669f, 0.845f, 0.657f, -0.43f, 0.19f, 0.206f, -0.305f, 0.761f }; + int lda = 2; + float B[] = { -0.457f, 0.857f, -0.203f, 0.942f, 0.462f, 0.52f, 0.521f, -0.609f, 0.069f, 0.005f, -0.419f, 0.806f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1892) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1892) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.269f, -0.87f, -0.592f, 0.813f, 0.977f, -0.848f, 0.282f, -0.311f }; + int lda = 2; + float B[] = { -0.654f, 0.857f, -0.834f, 0.796f, 0.414f, -0.499f, 0.961f, 0.643f, 0.117f, 0.758f, -0.189f, -0.768f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1893) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1893) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.361f, -0.818f, 0.039f, 0.275f, 0.541f, -0.615f, 0.025f, -0.691f, -0.697f, 0.976f, 0.746f, 0.607f, 0.651f, -0.918f, -0.702f, 0.37f, -0.668f, -0.114f }; + int lda = 3; + float B[] = { 0.218f, 0.75f, 0.575f, -0.702f, 0.7f, -0.41f, 0.374f, 0.489f, -0.876f, 0.842f, -0.848f, 0.901f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1894) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1894) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.483f, 0.088f, -0.192f, 0.17f, 0.683f, 0.293f, -0.773f, 0.365f, -0.28f, 0.257f, 0.818f, 0.45f, -0.551f, -0.051f, 0.899f, -0.127f, -0.915f, 0.152f }; + int lda = 3; + float B[] = { 0.732f, -0.394f, 0.073f, -0.082f, 0.918f, -0.53f, 0.67f, 0.149f, -0.344f, -0.65f, -0.62f, -0.632f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1895) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1895) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.508f, -0.251f, 0.655f, -0.315f, -0.26f, 0.229f, 0.05f, -0.276f, -0.993f, 0.647f, -0.547f, -0.34f, 0.781f, -0.819f, 0.865f, 0.361f, -0.028f, 0.178f }; + int lda = 3; + float B[] = { 0.972f, 0.048f, 0.71f, -0.168f, -0.274f, 0.92f, 0.789f, 0.485f, 0.578f, 0.73f, -0.931f, 0.288f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1896) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1896) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.874f, 0.651f, 0.074f, -0.862f, -0.42f, 0.066f, -0.845f, 0.482f, -0.44f, 0.724f, 0.137f, -0.123f, -0.63f, -0.011f, -0.187f, -0.205f, 0.976f, -0.81f }; + int lda = 3; + float B[] = { 0.539f, 0.131f, 0.986f, 0.615f, 0.983f, -0.22f, 0.144f, 0.677f, 0.561f, -0.494f, -0.433f, -0.089f }; + int ldb = 3; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1897) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1897) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.284f, 0.871f, -0.835f, 0.926f, 0.459f, -0.889f, 0.387f, 0.319f, -0.366f, 0.884f, 0.236f, 0.921f, 0.619f, -0.41f, -0.709f, -0.372f, 0.06f, 0.551f }; + int lda = 3; + float B[] = { 0.354f, 0.245f, 0.552f, 0.77f, -0.524f, -0.973f, -0.814f, -0.835f, -0.976f, 0.396f, -0.726f, -0.204f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1898) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1898) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.98f, -0.854f, -0.832f, 0.514f, -0.028f, -0.857f, 0.066f, 0.415f, -0.316f, 0.538f, -0.465f, -0.691f, 0.286f, 0.954f, -0.486f, -0.574f, -0.429f, 0.992f }; + int lda = 3; + float B[] = { 0.295f, 0.578f, -0.167f, 0.106f, -0.782f, 0.668f, 0.278f, 0.855f, 0.038f, 0.976f, 0.167f, -0.777f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1899) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1899) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { 0.534f, 0.782f, 0.282f, 0.581f, 0.804f, -0.68f, 0.234f, -0.758f, 0.033f, -0.503f, 0.981f, -0.839f, 0.919f, 0.175f, 0.152f, -0.683f, -0.346f, -0.279f }; + int lda = 3; + float B[] = { 0.135f, -0.969f, -0.314f, -0.026f, -0.284f, 0.529f, 0.781f, -0.413f, -0.018f, -0.859f, -0.817f, -0.849f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1900) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1900) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.0f}; + float A[] = { -0.426f, 0.148f, 0.889f, 0.217f, 0.779f, -0.963f, -0.516f, -0.366f, 0.721f, 0.4f, -0.976f, -0.365f, 0.532f, 0.188f, 0.176f, 0.082f, -0.691f, -0.833f }; + int lda = 3; + float B[] = { -0.71f, 0.72f, 0.533f, 0.395f, -0.749f, 0.151f, 0.871f, 0.445f, 0.195f, -0.38f, -0.318f, -0.833f }; + int ldb = 2; + float B_expected[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1901) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1901) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.068f, 0.806f, -0.621f, 0.037f, 0.096f, -0.312f, 0.416f, 0.428f }; + int lda = 2; + float B[] = { 0.481f, 0.192f, -0.954f, -0.958f, -0.015f, -0.203f, -0.352f, 0.08f, -0.662f, 0.681f, -0.571f, 0.146f }; + int ldb = 3; + float B_expected[] = { 0.612512f, 0.186537f, -1.27483f, -1.08103f, -0.0395775f, -0.248522f, 0.0478574f, -0.671409f, -3.31165f, 0.315466f, -1.07961f, -0.629312f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1902) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1902) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.863f, 0.689f, 0.171f, -0.164f, 0.065f, -0.727f, -0.245f, -0.556f }; + int lda = 2; + float B[] = { 0.711f, -0.616f, -0.684f, 0.823f, 0.491f, 0.06f, -0.776f, 0.768f, 0.391f, 0.897f, 0.779f, -0.875f }; + int ldb = 3; + float B_expected[] = { 0.616f, 0.711f, -0.823f, -0.684f, -0.06f, 0.491f, -0.98994f, -0.796557f, -0.644091f, 0.372992f, 0.804736f, 0.685199f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1903) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1903) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.718f, -0.323f, 0.264f, 0.081f, -0.73f, 0.809f, -0.349f, -0.543f }; + int lda = 2; + float B[] = { 0.862f, 0.676f, -0.085f, 0.204f, 0.063f, -0.124f, 0.162f, 0.754f, -0.978f, -0.097f, 0.986f, 0.943f }; + int ldb = 3; + float B_expected[] = { -1.32203f, -1.00495f, 1.84655f, 0.329156f, -1.66053f, -2.19061f, 0.420449f, -1.11835f, 1.19333f, 0.945621f, -0.495118f, -2.05487f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1904) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1904) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.515f, -0.166f, -0.364f, 0.24f, 0.056f, 0.023f, 0.05f, 0.853f }; + int lda = 2; + float B[] = { 0.779f, 0.443f, -0.852f, 0.037f, -0.649f, 0.554f, 0.469f, 0.632f, 0.224f, -0.148f, 0.457f, -0.78f }; + int ldb = 3; + float B_expected[] = { -0.396821f, 0.767272f, -0.040136f, -0.867948f, -0.587169f, -0.692532f, -0.632f, 0.469f, 0.148f, 0.224f, 0.78f, 0.457f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1905) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1905) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.576f, 0.785f, 0.297f, -0.561f, -0.164f, 0.463f, -0.454f, 0.803f }; + int lda = 2; + float B[] = { -0.78f, -0.792f, 0.223f, 0.206f, -0.097f, 0.504f, 0.721f, 0.205f, 0.508f, -0.8f, -0.469f, 0.283f }; + int ldb = 2; + float B_expected[] = { -0.164671f, -1.12975f, 0.510941f, 0.652691f, -0.386549f, 0.358405f, 0.959415f, -0.414847f, 0.906729f, -0.353789f, -0.734462f, 0.786484f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1906) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1906) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.04f, 0.917f, 0.327f, -0.115f, -0.656f, -0.811f, -0.646f, 0.78f }; + int lda = 2; + float B[] = { 0.131f, 0.677f, -0.431f, -0.652f, -0.415f, 0.094f, -0.253f, 0.496f, 0.797f, 0.166f, 0.737f, -0.685f }; + int ldb = 2; + float B_expected[] = { -0.677f, 0.131f, 0.101647f, -0.894111f, -0.094f, -0.415f, -0.221099f, -0.601474f, -0.166f, 0.797f, -0.070263f, 1.12521f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1907) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1907) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.769f, -0.384f, -0.522f, -0.086f, -0.129f, -0.574f, 0.56f, -0.809f }; + int lda = 2; + float B[] = { 0.367f, 0.169f, -0.321f, -0.982f, -0.563f, -0.051f, -0.742f, 0.595f, 0.067f, -0.183f, -0.524f, 0.77f }; + int ldb = 2; + float B_expected[] = { -0.178752f, 0.912513f, 0.836303f, 0.634945f, 0.817549f, -0.921899f, 0.275884f, -0.926446f, 0.49345f, -0.309856f, -0.00752416f, -0.946584f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1908) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1908) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.758f, 0.228f, 0.263f, 0.731f, 0.171f, 0.051f, 0.968f, 0.731f }; + int lda = 2; + float B[] = { 0.783f, 0.422f, -0.649f, -0.428f, 0.216f, 0.659f, -0.608f, -0.239f, -0.588f, 0.01f, -0.009f, -0.374f }; + int ldb = 2; + float B_expected[] = { -1.00898f, 0.640819f, 0.428f, -0.649f, -1.1663f, 0.201195f, 0.239f, -0.608f, -0.114941f, -0.859027f, 0.374f, -0.009f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1909) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1909) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.601f, -0.017f, 0.518f, -0.975f, -0.394f, 0.396f, 0.395f, -0.374f, -0.321f, 0.221f, 0.809f, 0.74f, -0.009f, 0.88f, 0.057f, 0.65f, 0.761f, -0.839f }; + int lda = 3; + float B[] = { -0.644f, 0.29f, 0.458f, 0.755f, -0.725f, 0.313f, 0.537f, 0.945f, 0.377f, 0.776f, -0.686f, -0.561f }; + int ldb = 3; + float B_expected[] = { -5.28862f, 4.51343f, 4.18447f, 0.519474f, 0.288441f, -0.634688f, -7.53878f, 2.5597f, 2.79299f, 2.44873f, 0.781327f, -0.0400353f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1910) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1910) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.746f, 0.079f, -0.151f, -0.433f, 0.524f, -0.201f, 0.198f, -0.368f, -0.449f, 0.693f, -0.14f, -0.574f, -0.242f, -0.584f, -0.298f, 0.41f, -0.234f, 0.92f }; + int lda = 3; + float B[] = { -0.787f, 0.186f, -0.104f, -0.142f, -0.548f, 0.332f, -0.66f, 0.413f, 0.046f, 0.818f, -0.783f, -0.376f }; + int ldb = 3; + float B_expected[] = { 0.320805f, -0.445083f, 0.410072f, -0.371288f, -0.332f, -0.548f, -0.566249f, -0.287942f, -0.315918f, 0.152204f, 0.376f, -0.783f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1911) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1911) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.623f, -0.229f, 0.653f, -0.19f, 0.42f, -0.181f, -0.061f, 0.963f, 0.422f, 0.989f, 0.919f, -0.352f, -0.849f, 0.052f, 0.02f, -0.771f, -0.38f, -0.566f }; + int lda = 3; + float B[] = { 0.018f, 0.461f, -0.184f, 0.334f, 0.075f, 0.694f, 0.022f, 0.239f, 0.971f, -0.339f, 0.203f, 0.083f }; + int ldb = 3; + float B_expected[] = { 0.642534f, -0.265073f, -0.901268f, 0.171623f, 1.29999f, 0.384146f, 0.326529f, -0.155337f, 0.629902f, 0.0571184f, -0.761884f, -0.282697f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1912) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1912) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.35f, 0.154f, 0.397f, -0.709f, 0.587f, -0.895f, -0.848f, 0.933f, -0.887f, -0.393f, 0.824f, 0.182f, 0.159f, 0.303f, -0.011f, -0.363f, 0.875f, 0.991f }; + int lda = 3; + float B[] = { -0.513f, 0.564f, 0.404f, -0.635f, 0.924f, 0.238f, -0.059f, 0.96f, 0.341f, 0.483f, -0.844f, 0.84f }; + int ldb = 3; + float B_expected[] = { -0.564f, -0.513f, -0.321901f, 0.495188f, -0.487057f, 1.06506f, -0.96f, -0.059f, -1.35213f, 1.18665f, -1.15086f, -1.02151f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1913) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1913) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.87f, 0.914f, -0.097f, -0.138f, 0.894f, -0.173f, 0.648f, -0.327f, 0.7f, 0.816f, 0.63f, 0.637f, -0.671f, 0.322f, -0.922f, 0.618f, 0.93f, 0.654f }; + int lda = 3; + float B[] = { -0.347f, -0.273f, -0.384f, 0.02f, 0.392f, -0.206f, 0.347f, 0.269f, 0.016f, 0.797f, 0.699f, -0.966f }; + int ldb = 2; + float B_expected[] = { -0.443754f, 0.343363f, 0.300599f, -0.548484f, 0.757674f, 0.722159f, 0.224607f, -0.673284f, -0.565323f, 0.414754f, 1.04867f, 0.014162f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1914) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1914) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { 0.965f, -0.191f, 0.489f, 0.84f, 0.011f, -0.951f, 0.067f, -0.21f, -0.911f, 0.767f, -0.162f, 0.274f, -0.502f, -0.445f, 0.492f, 0.023f, -0.818f, 0.859f }; + int lda = 3; + float B[] = { 0.66f, -0.303f, 0.223f, 0.261f, -0.252f, -0.238f, -0.012f, -0.485f, 0.783f, -0.196f, -0.57f, 0.929f }; + int ldb = 2; + float B_expected[] = { 0.177032f, 1.21679f, -0.596808f, -0.300881f, 0.159577f, -0.641744f, 0.928958f, 0.289807f, 0.196f, 0.783f, -0.929f, -0.57f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1915) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1915) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.652f, 0.046f, -0.229f, 0.473f, -0.783f, -0.211f, 0.698f, 0.201f, -0.153f, 0.918f, -0.996f, -0.186f, 0.84f, -0.545f, -0.457f, 0.057f, 0.649f, 0.77f }; + int lda = 3; + float B[] = { -0.227f, 0.14f, 0.165f, -0.945f, -0.212f, -0.522f, 0.908f, 0.722f, -0.208f, 0.969f, 0.721f, -0.816f }; + int ldb = 2; + float B_expected[] = { 0.189219f, 0.361509f, -1.42444f, -0.353565f, -0.361882f, -0.741783f, 1.80537f, 1.02311f, -1.24128f, 0.407779f, 2.0229f, -0.0912412f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1916) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1916) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 1.0f}; + float A[] = { -0.945f, 0.36f, 0.3f, 0.128f, -0.27f, -0.834f, 0.349f, -0.6f, -0.293f, 0.122f, -0.481f, -0.681f, -0.815f, -0.195f, 0.728f, 0.016f, 0.037f, 0.989f }; + int lda = 3; + float B[] = { -0.97f, 0.784f, 0.488f, 0.39f, -0.482f, -0.518f, -0.797f, 0.271f, 0.257f, 0.637f, 0.118f, -0.993f }; + int ldb = 2; + float B_expected[] = { -0.784f, -0.97f, -0.39f, 0.488f, 0.62904f, -0.090648f, -0.091536f, -0.89348f, 0.3246f, -0.273981f, 1.04514f, -0.5676f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1917) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1917) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.795f, 0.073f, 0.104f, -0.261f, -0.712f, 0.881f, -0.474f, -0.906f }; + int lda = 2; + float B[] = { -0.41f, -0.191f, -0.359f, -0.718f, -0.902f, 0.646f, -0.703f, -0.809f, -0.342f, -0.783f, -0.053f, 0.917f }; + int ldb = 3; + float B_expected[] = { 0.0285203f, -0.0489535f, 0.0936712f, -0.036556f, -0.0702473f, -0.11991f, -0.0924979f, -0.0235243f, -0.0742841f, -0.0262764f, 0.074552f, 0.0886899f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1918) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1918) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { -0.281f, -0.111f, 0.055f, -0.643f, 0.33f, -0.663f, 0.32f, 0.423f }; + int lda = 2; + float B[] = { 0.103f, 0.357f, -0.591f, 0.833f, -0.906f, -0.192f, -0.391f, -0.622f, -0.345f, -0.58f, -0.132f, -0.874f }; + int ldb = 3; + float B_expected[] = { -0.0357f, 0.0103f, -0.0833f, -0.0591f, 0.0192f, -0.0906f, 0.0707864f, -0.0167114f, 0.0245802f, 0.0223124f, 0.0280882f, -0.0205626f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1919) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1919) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.311f, -0.648f, -0.732f, 0.825f, 0.152f, -0.529f, -0.353f, 0.568f }; + int lda = 2; + float B[] = { 0.86f, -0.991f, -0.992f, -0.617f, 0.137f, -0.585f, -0.467f, 0.632f, 0.672f, 0.777f, -0.609f, 0.511f }; + int ldb = 3; + float B_expected[] = { 0.0795347f, -0.0537122f, -0.0885393f, -0.0194836f, -0.0386006f, -0.0674606f, 0.109194f, -0.0434058f, -0.0240177f, -0.151722f, 0.117678f, -0.0168304f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1920) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1920) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.318f, -0.946f, -0.389f, 0.051f, 0.322f, -0.626f, -0.839f, -0.252f }; + int lda = 2; + float B[] = { 0.372f, -0.23f, 0.515f, 0.213f, 0.222f, 0.296f, -0.524f, 0.442f, -0.581f, -0.409f, 0.894f, -0.246f }; + int ldb = 3; + float B_expected[] = { 0.00443f, 0.081742f, -0.0708404f, 0.0446048f, 0.0184432f, -0.0219864f, -0.0442f, -0.0524f, 0.0409f, -0.0581f, 0.0246f, 0.0894f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1921) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1921) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { -0.411f, 0.34f, -0.85f, 0.557f, -0.918f, 0.484f, -0.889f, 0.561f }; + int lda = 2; + float B[] = { -0.763f, -0.514f, -0.744f, -0.948f, -0.312f, 0.818f, -0.686f, 0.341f, -0.043f, 0.235f, -0.201f, 0.874f }; + int ldb = 2; + float B_expected[] = { 0.0169288f, 0.17164f, -0.0683166f, -0.0596556f, 0.155447f, -0.0526808f, -0.086698f, 0.101645f, 0.039085f, -0.0218708f, 0.0437248f, -0.0036776f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1922) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1922) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.046f, 0.571f, 0.825f, 0.665f, 0.658f, -0.977f, 0.247f, -0.944f }; + int lda = 2; + float B[] = { -0.342f, 0.089f, -0.975f, 0.027f, -0.621f, -0.127f, 0.937f, -0.332f, -0.357f, -0.213f, 0.57f, 0.134f }; + int ldb = 2; + float B_expected[] = { -0.0089f, -0.0342f, -0.0302572f, -0.0663011f, 0.0127f, -0.0621f, -0.0358283f, 0.122154f, 0.0213f, -0.0357f, -0.0622943f, 0.0596805f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1923) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1923) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.655f, 0.051f, -0.864f, 0.04f, -0.45f, 0.276f, -0.365f, 0.766f }; + int lda = 2; + float B[] = { 0.12f, 0.036f, 0.425f, -0.145f, -0.772f, -0.483f, -0.154f, -0.327f, 0.532f, 0.59f, 0.305f, 0.443f }; + int ldb = 2; + float B_expected[] = { -0.0745593f, 0.00123365f, -0.0525674f, -0.00611891f, 0.0752311f, -0.0558274f, -0.0001932f, 0.0425972f, -0.0986826f, -0.00963885f, -0.00999124f, -0.0625937f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1924) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1924) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.253f, -0.163f, -0.061f, -0.032f, -0.764f, 0.863f, 0.051f, 0.669f }; + int lda = 2; + float B[] = { 0.966f, 0.42f, -0.765f, 0.186f, -0.798f, 0.278f, -0.37f, -0.484f, -0.724f, -0.682f, 0.034f, 0.352f }; + int ldb = 2; + float B_expected[] = { -0.0455826f, 0.0925287f, -0.0186f, -0.0765f, -0.0260316f, -0.0836058f, 0.0484f, -0.037f, 0.0661616f, -0.0710662f, -0.0352f, 0.0034f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1925) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1925) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.017f, -0.631f, -0.052f, 0.296f, -0.486f, -0.279f, -0.378f, 0.997f, 0.533f, 0.87f, 0.808f, 0.007f, 0.185f, -0.263f, -0.757f, -0.856f, 0.575f, -0.81f }; + int lda = 3; + float B[] = { -0.238f, -0.924f, 0.494f, -0.089f, 0.96f, 0.959f, 0.415f, 0.39f, -0.744f, -0.881f, -0.594f, 0.629f }; + int ldb = 3; + float B_expected[] = { 0.0798921f, -0.243487f, 0.0441094f, -0.0391653f, 0.0229218f, 0.134667f, 0.192099f, 0.152741f, 0.154557f, 0.0857677f, -0.0854154f, 0.0170199f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1926) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1926) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { -0.977f, -0.949f, 0.192f, 0.803f, -0.964f, -0.162f, 0.799f, -0.081f, -0.055f, 0.014f, 0.99f, 0.804f, 0.913f, -0.898f, -0.057f, 0.51f, 0.453f, 0.622f }; + int lda = 3; + float B[] = { -0.852f, -0.001f, -0.955f, -0.97f, -0.071f, -0.664f, -0.077f, -0.746f, 0.228f, -0.948f, 0.476f, -0.285f }; + int ldb = 3; + float B_expected[] = { 0.0840343f, -0.066376f, 0.0369724f, -0.0350854f, 0.0664f, -0.0071f, 0.105481f, 0.0565767f, 0.0283146f, -0.00141f, 0.0285f, 0.0476f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1927) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1927) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.822f, 0.618f, -0.935f, 0.49f, 0.885f, -0.488f, 0.412f, 0.861f, -0.144f, 0.906f, -0.054f, 0.455f, 0.213f, 0.34f, -0.465f, 0.107f, -0.611f, 0.088f }; + int lda = 3; + float B[] = { 0.476f, -0.297f, -0.966f, -0.038f, -0.346f, -0.81f, -0.749f, -0.065f, -0.225f, -0.663f, 0.073f, -0.379f }; + int ldb = 3; + float B_expected[] = { -0.00473086f, 0.0543508f, 0.139511f, -0.0231317f, -0.199775f, 0.100154f, 0.0488188f, -0.054416f, -0.0610839f, 0.0929832f, -0.0289368f, -0.113983f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1928) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1928) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { -0.188f, 0.741f, 0.583f, 0.527f, 0.025f, 0.216f, -0.44f, -0.071f, -0.126f, -0.093f, 0.743f, -0.476f, 0.661f, -0.66f, 0.564f, -0.943f, -0.976f, -0.035f }; + int lda = 3; + float B[] = { -0.648f, -0.367f, -0.402f, -0.309f, 0.412f, 0.531f, -0.248f, 0.181f, 0.507f, 0.502f, -0.593f, 0.404f }; + int ldb = 3; + float B_expected[] = { 0.0367f, -0.0648f, 0.0424472f, -0.0713177f, -0.21132f, 0.0600063f, -0.0181f, -0.0248f, -0.0599248f, 0.0410731f, 0.0277256f, 0.00238266f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1929) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1929) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.76f, -0.021f, -0.011f, 0.14f, 0.699f, 0.94f, 0.296f, 0.333f, 0.654f, -0.917f, 0.008f, -0.999f, -0.963f, 0.687f, -0.481f, 0.106f, 0.128f, -0.165f }; + int lda = 3; + float B[] = { -0.742f, 0.774f, -0.335f, -0.99f, 0.799f, 0.901f, 0.753f, -0.085f, -0.042f, -0.591f, 0.202f, 0.515f }; + int ldb = 2; + float B_expected[] = { 0.313744f, -0.259345f, -0.290807f, 0.212822f, -0.00668591f, -0.0164417f, 0.10903f, 0.137068f, 0.157578f, -0.23594f, -0.0747323f, 0.254147f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1930) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1930) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.582f, -0.175f, -0.48f, 0.567f, -0.571f, 0.062f, 0.038f, -0.625f, 0.737f, 0.799f, -0.569f, -0.932f, 0.522f, -0.763f, 0.156f, -0.524f, 0.138f, 0.007f }; + int lda = 3; + float B[] = { 0.998f, 0.6f, 0.555f, -0.737f, -0.162f, 0.263f, 0.317f, -0.092f, 0.302f, -0.671f, 0.418f, -0.814f }; + int ldb = 2; + float B_expected[] = { -0.106233f, 0.0480583f, 0.0514817f, -0.0392668f, -0.0209428f, -0.0560716f, 0.0184048f, -0.0174744f, 0.0671f, 0.0302f, 0.0814f, 0.0418f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1931) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1931) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.964f, 0.509f, 0.48f, -0.833f, 0.867f, 0.51f, -0.643f, 0.115f, -0.594f, -0.409f, -0.174f, 0.527f, 0.676f, 0.431f, 0.261f, -0.239f, 0.816f, -0.231f }; + int lda = 3; + float B[] = { -0.659f, -0.029f, -0.581f, -0.938f, -0.904f, -0.445f, 0.119f, 0.709f, -0.649f, 0.825f, 0.532f, -0.453f }; + int ldb = 2; + float B_expected[] = { 0.0305784f, -0.0522153f, 0.100975f, -0.00695419f, -0.055793f, 0.11446f, 0.0887801f, 0.177079f, -0.177262f, 0.0336107f, -0.0717714f, 0.251108f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1932) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1932) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + float alpha[2] = {0.0f, 0.1f}; + float A[] = { 0.859f, 0.745f, 0.03f, -0.98f, -0.402f, 0.38f, -0.214f, 0.605f, 0.342f, -0.059f, -0.096f, 0.606f, -0.543f, 0.503f, 0.63f, -0.269f, 0.252f, 0.626f }; + int lda = 3; + float B[] = { 0.85f, 0.642f, 0.679f, -0.254f, 0.192f, 0.766f, -0.869f, -0.09f, 0.68f, -0.898f, 0.272f, -0.651f }; + int ldb = 2; + float B_expected[] = { -0.0642f, 0.085f, 0.0254f, 0.0679f, 0.008626f, 0.079566f, 0.07478f, -0.113829f, -0.0156973f, 0.0906397f, 0.125668f, 0.0985369f }; + cblas_ctrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], flteps, "ctrsm(case 1933) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], flteps, "ctrsm(case 1933) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.189, 0.519, -0.455, -0.444, -0.21, -0.507, -0.591, 0.859 }; + int lda = 2; + double B[] = { -0.779, -0.484, 0.249, -0.107, -0.755, -0.047, 0.941, 0.675, -0.757, 0.645, -0.649, 0.242 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1934) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1934) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.988, 0.73, 0.279, -0.967, -0.288, -0.095, -0.821, 0.178 }; + int lda = 2; + double B[] = { 0.702, 0.943, -0.235, -0.565, 0.279, -0.146, 0.816, 0.473, 0.893, 0.877, -0.797, -0.159 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1935) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1935) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.716, -0.549, 0.436, -0.822, -0.029, -0.586, 0.791, -0.159 }; + int lda = 2; + double B[] = { 0.021, 0.391, 0.296, -0.154, -0.513, 0.738, -0.336, 0.317, 0.502, 0.543, 0.027, 0.802 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1936) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1936) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.715, -0.875, -0.501, 0.425, -0.928, -0.929, -0.542, 0.915 }; + int lda = 2; + double B[] = { 0.065, 0.679, -0.545, 0.042, 0.199, -0.86, 0.159, 0.943, 0.19, 0.403, 0.994, 0.76 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1937) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1937) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.936, -0.989, -0.57, 0.018, -0.821, 0.516, -0.479, 0.209 }; + int lda = 2; + double B[] = { 0.722, -0.756, -0.828, -0.191, -0.981, -0.466, 0.347, 0.85, -0.596, -0.826, -0.182, -0.321 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1938) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1938) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.693, 0.976, -0.356, -0.313, 0.926, -0.164, -0.337, 0.056 }; + int lda = 2; + double B[] = { -0.988, -0.633, -0.745, -0.392, -0.362, -0.708, -0.706, -0.093, -0.177, 0.837, 0.391, -0.853 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1939) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1939) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.483, -0.383, 0.357, 0.889, 0.523, -0.148, -0.592, 0.481 }; + int lda = 2; + double B[] = { -0.41, 0.994, -0.779, -0.354, 0.571, 0.51, -0.526, 0.934, 0.469, 0.735, -0.47, -0.164 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1940) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1940) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.576, -0.089, 0.953, -0.317, 0.408, 0.618, 0.092, -0.84 }; + int lda = 2; + double B[] = { 0.141, -0.32, -0.007, -0.682, -0.068, -0.412, 0.675, -0.809, 0.931, -0.257, -0.048, 0.633 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1941) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1941) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.269, 0.567, 0.497, -0.969, 0.957, 0.538, -0.921, 0.639, 0.599, -0.436, -0.045, 0.164, 0.827, 0.489, -0.729, 0.723, -0.01, 0.934 }; + int lda = 3; + double B[] = { -0.391, 0.434, -0.349, -0.456, -0.541, 0.289, 0.31, 0.447, 0.971, -0.626, -0.77, -0.882 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1942) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1942) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.523, -0.364, -0.492, 0.294, 0.71, -0.401, 0.947, -0.008, 0.235, -0.47, 0.298, -0.603, -0.193, 0.598, 0.122, -0.733, -0.827, 0.491 }; + int lda = 3; + double B[] = { 0.872, 0.441, 0.518, 0.607, -0.04, -0.976, 0.201, -0.136, -0.958, -0.501, -0.549, -0.4 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1943) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1943) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.177, -0.965, 0.589, -0.236, -0.303, -0.301, 0.982, 0.006, -0.73, 0.241, 0.636, -0.672, 0.886, 0.952, 0.501, -0.803, -0.823, -0.09 }; + int lda = 3; + double B[] = { -0.475, -0.646, -0.666, -0.886, 0.04, -0.736, -0.592, -0.995, 0.259, 0.701, -0.033, 0.616 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1944) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1944) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.76, -0.29, -0.601, 0.327, 0.383, 0.883, 0.589, -0.708, 0.912, -0.982, 0.629, 0.879, -0.578, -0.814, 0.168, 0.91, 0.328, 0.223 }; + int lda = 3; + double B[] = { 0.381, 0.829, 0.096, 0.382, 0.664, 0.006, -0.376, -0.338, 0.344, -0.889, -0.175, 0.083 }; + int ldb = 3; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1945) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1945) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.129, -0.161, 0.102, 0.443, -0.138, 0.677, -0.87, 0.327, 0.917, 0.446, 0.798, -0.91, -0.574, 0.333, -0.626, 0.14, 0.109, 0.161 }; + int lda = 3; + double B[] = { -0.689, -0.94, -0.814, 0.761, 0.389, 0.03, -0.175, -0.739, -0.904, 0.463, -0.511, 0.615 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1946) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1946) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { 0.062, 0.756, 0.179, 0.359, -0.047, -0.197, 0.678, 0.873, 0.003, -0.996, 0.507, -0.491, -0.726, -0.833, -0.118, -0.71, 0.714, 0.638 }; + int lda = 3; + double B[] = { -0.614, 0.193, 0.881, 0.538, 0.183, -0.034, 0.099, -0.154, -0.121, 0.842, -0.182, -0.229 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1947) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1947) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.874, 0.171, 0.637, 0.554, 0.852, -0.203, 0.455, 0.619, -0.128, 0.759, 0.342, 0.372, 0.669, -0.537, -0.76, -0.348, -0.714, 0.573 }; + int lda = 3; + double B[] = { -0.434, 0.921, -0.949, 0.282, -0.665, 0.223, -0.633, 0.921, -0.73, 0.457, -0.021, -0.844 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1948) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1948) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 111; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0}; + double A[] = { -0.189, -0.931, 0.414, 0.288, -0.245, 0.252, -0.465, -0.073, 0.327, 0.176, -0.067, 0.1, 0.124, 0.885, -0.731, -0.303, 0.954, -0.763 }; + int lda = 3; + double B[] = { 0.818, 0.948, -0.749, 0.808, -0.959, -0.797, 0.727, 0.701, 0.244, -0.801, 0.354, -0.781 }; + int ldb = 2; + double B_expected[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1949) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1949) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.65, -0.279, -0.543, -0.097, -0.641, 0.984, 0.507, -0.809 }; + int lda = 2; + double B[] = { -0.176, 0.87, -0.681, 0.409, -0.878, 0.522, 0.348, 0.679, -0.975, -0.815, -0.608, 0.86 }; + int ldb = 3; + double B_expected[] = { 0.256485077177, 1.22837025149, -0.656630178218, 0.911076645728, -0.849544610576, 1.16772760977, -0.193804546743, -0.283833884163, -0.811035478317, 1.16349859839, 0.292241175557, -0.141827660937 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1950) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1950) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.23, -0.597, 0.068, 0.945, 0.045, -0.436, 0.113, 0.035 }; + int lda = 2; + double B[] = { -0.744, -0.465, -0.742, 0.996, -0.835, 0.712, -0.968, 0.053, -0.813, 0.36, 0.572, -0.489 }; + int ldb = 3; + double B_expected[] = { 0.744, 0.465, 0.742, -0.996, 0.835, -0.712, 1.356833, -0.7877, -0.178676, -0.993462, -1.30162, -0.251659 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1951) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1951) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.689, -0.396, 0.415, -0.567, 0.001, 0.513, 0.837, 0.045 }; + int lda = 2; + double B[] = { -0.012, 0.2, 0.22, 0.81, -0.586, -0.198, 0.16, -0.958, -0.125, 0.833, 0.344, 0.213 }; + int ldb = 3; + double B_expected[] = { -0.573154258944, 0.525131422048, 1.33801555643, 0.47629585874, -0.770607912552, -0.160087833623, -0.129249609305, 1.15151282248, 0.0955601670381, -1.00035867087, -0.423449388979, -0.231714190557 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1952) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1952) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.102, 0.86, -0.067, 0.12, 0.92, 0.441, 0.367, -0.104 }; + int lda = 2; + double B[] = { 0.386, 0.59, 0.222, 0.824, 0.091, 0.486, 0.43, 0.766, 0.576, 0.042, 0.013, -0.008 }; + int ldb = 3; + double B_expected[] = { -0.328206, 0.30435, 0.289398, -0.531344, -0.075512, -0.487627, -0.43, -0.766, -0.576, -0.042, -0.013, 0.008 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1953) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1953) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.087, 0.925, -0.315, 0.251, 0.7, -0.223, 0.448, 0.373 }; + int lda = 2; + double B[] = { -0.333, -0.495, 0.995, -0.229, 0.425, -0.269, -0.756, -0.783, -0.214, 0.582, -0.351, -0.095 }; + int ldb = 2; + double B_expected[] = { 0.496880191475, -0.406733596387, -0.965186357327, 2.19761676664, 0.331095906598, 0.428318547163, 1.17655095681, 0.263745306399, -0.645240814927, -0.170663836866, 1.18578937767, -0.829739852214 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1954) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1954) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.717, 0.572, -0.304, 0.878, 0.625, -0.615, -0.565, -0.643 }; + int lda = 2; + double B[] = { -0.383, -0.669, -0.043, -0.09, -0.999, -0.427, 0.834, 0.539, -0.973, -0.481, 0.071, -0.71 }; + int ldb = 2; + double B_expected[] = { 0.383, 0.669, -0.60781, -0.09258, 0.999, 0.427, -1.72098, -0.19149, 0.973, 0.481, -0.97494, 1.00777 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1955) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1955) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.143, -0.022, 0.487, 0.444, 0.138, -0.871, 0.572, -0.093 }; + int lda = 2; + double B[] = { -0.073, -0.9, -0.688, 0.436, -0.213, -0.733, 0.809, -0.618, 0.696, 0.259, 0.494, 0.162 }; + int ldb = 2; + double B_expected[] = { -6.10129128737, 3.22195959384, 1.29255909931, -0.552083922664, 8.05253150033, 8.35261031753, -1.54904967648, 0.828563601552, -3.66721033067, 1.50334288416, -0.796532800529, -0.412722990296 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1956) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1956) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.544, 0.918, -0.524, 0.547, -0.839, 0.4, -0.548, 0.49 }; + int lda = 2; + double B[] = { 0.475, -0.594, 0.252, -0.717, 0.867, 0.07, 0.264, 0.538, 0.028, 0.482, -0.59, -0.533 }; + int ldb = 2; + double B_expected[] = { -0.214849, 1.107552, -0.252, 0.717, -1.299622, -0.207504, -0.264, -0.538, 0.572711, -0.525438, 0.59, 0.533 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1957) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1957) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.038, -0.116, -0.476, -0.818, 0.961, 0.271, -0.593, 0.548, -0.86, 0.429, -0.396, -0.559, 0.766, -0.326, -0.335, 0.633, -0.532, 0.317 }; + int lda = 3; + double B[] = { -0.459, 0.904, 0.887, 0.07, -0.497, -0.48, -0.313, 0.864, -0.029, -0.754, -0.566, -0.108 }; + int ldb = 3; + double B_expected[] = { -4.58258258525, -3.00717937382, 0.0668903493808, 0.800759804641, -0.292673260098, -1.0766492922, -0.911020412982, 7.68812066826, -0.0359723342287, -0.157963939743, -0.695872108638, -0.617653117365 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1958) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1958) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.886, 0.945, 0.065, 0.882, -0.46, -0.095, 0.823, -0.245, -0.825, 0.904, -0.214, -0.268, -0.935, -0.017, 0.902, 0.561, 0.954, -0.665 }; + int lda = 3; + double B[] = { 0.076, -0.043, 0.873, -0.831, -0.329, -0.896, -0.174, 0.653, 0.489, 0.25, -0.896, 0.609 }; + int ldb = 3; + double B_expected[] = { 1.037824842, 1.333886264, -1.042722, 1.110916, 0.329, 0.896, 0.529073224, -0.720680322, -0.134044, -0.140198, 0.896, -0.609 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1959) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1959) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.691, -0.056, -0.339, -0.483, -0.975, -0.052, -0.198, 0.576, -0.075, 0.718, -0.321, 0.728, -0.124, 0.774, 0.685, -0.112, 0.178, 0.275 }; + int lda = 3; + double B[] = { -0.062, -0.391, 0.326, 0.42, -0.203, 0.45, 0.338, 0.991, -0.47, -0.363, 0.766, -0.961 }; + int ldb = 3; + double B_expected[] = { -0.134697690677, -0.554930433172, -0.526377715671, 0.991348747823, -2.94323584375, -1.92805449726, 0.601422754501, 1.38541291715, 0.201151053335, -1.95287726277, 5.96201044303, 2.1797020274 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1960) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1960) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.318, 0.067, -0.097, 0.359, -0.688, 0.307, -0.63, -0.616, 0.193, 0.817, -0.792, -0.117, -0.501, -0.929, -0.595, -0.144, 0.453, 0.658 }; + int lda = 3; + double B[] = { -0.249, -0.206, 0.424, -0.681, -0.464, 0.21, 0.541, 0.082, 0.803, -0.461, -0.638, 0.358 }; + int ldb = 3; + double B_expected[] = { 0.249, 0.206, -0.394026, 0.964164, 0.024089914, 0.641464836, -0.541, -0.082, -1.093318, 0.076084, -0.218343306, -1.013838812 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1961) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1961) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.691, 0.808, -0.178, 0.489, 0.159, -0.646, -0.692, -0.968, -0.146, -0.281, -0.385, 0.773, 0.704, 0.782, 0.551, -0.727, 0.669, 0.858 }; + int lda = 3; + double B[] = { -0.657, -0.69, -0.051, 0.28, -0.846, 0.304, 0.052, 0.543, 0.613, -0.98, 0.983, -0.484 }; + int ldb = 2; + double B_expected[] = { 2.42007211075, -0.148130095453, 4.93683906416, -0.804178199722, 1.76852672271, 0.633536755193, 4.41638755104, -0.0400468884046, 0.363887727302, 0.998182854971, -0.204739276437, 0.986048279795 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1962) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1962) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.244, -0.925, -0.539, 0.422, 0.285, -0.954, -0.347, -0.255, -0.616, -0.979, 0.631, -0.864, -0.053, -0.715, -0.749, -0.973, -0.409, -0.247 }; + int lda = 3; + double B[] = { 0.922, -0.728, 0.588, -0.715, -0.92, -0.065, -0.583, 0.178, 0.996, 0.215, -0.614, -0.443 }; + int ldb = 2; + double B_expected[] = { -0.416484258, -0.267425916, -0.851455486, 1.594186448, 0.383191, -1.065143, 0.611847, 0.751229, -0.996, -0.215, 0.614, 0.443 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1963) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1963) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { 0.992, 0.172, -0.646, 0.067, -0.823, -0.013, -0.55, -0.438, -0.44, -0.302, 0.99, -0.373, 0.513, -0.106, -0.591, -0.504, 0.929, -0.318 }; + int lda = 3; + double B[] = { 0.467, 0.227, 0.988, -0.709, -0.272, -0.601, 0.719, -0.133, 0.203, 0.937, -0.382, -0.334 }; + int ldb = 2; + double B_expected[] = { -0.495544804508, -0.142909570186, -0.846593689328, 0.861506163875, -0.485462670276, -0.898345893497, 1.07522946065, -2.43403194583, 0.315527055267, -0.271726799352, -1.73234815305, 3.5434654009 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1964) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1964) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 112; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {-1, 0}; + double A[] = { -0.692, -0.245, -0.874, 0.77, 0.07, 0.01, 0.018, -0.42, -0.405, -0.387, 0.888, -0.912, -0.81, 0.314, 0.66, -0.895, -0.556, 0.157 }; + int lda = 3; + double B[] = { -0.801, 0.542, 0.699, 0.574, -0.56, 0.043, 0.742, -0.331, -0.614, 0.776, -0.335, 0.131 }; + int ldb = 2; + double B_expected[] = { 0.801, -0.542, -0.699, -0.574, 0.842734, -1.133478, -1.794906, 0.367554, 0.837894144, 1.029031872, 1.63685728, -2.047172224 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1965) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1965) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.035, -0.456, 0.152, 0.976, 0.687, -0.527, -0.571, 0.832 }; + int lda = 2; + double B[] = { -0.868, 0.033, -0.131, -0.936, 0.993, 0.104, -0.684, 0.851, 0.523, 0.836, -0.205, 0.319 }; + int ldb = 3; + double B_expected[] = { -0.188683836853, 0.0217191541444, -0.044222393276, -0.201868895253, 0.218228063549, 0.00605705652583, 0.252579293874, 0.0800538768738, -0.099911150161, 0.0758372341381, -0.116723296822, -0.16542230206 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1966) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1966) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.481, -0.442, 0.69, 0.415, 0.983, -0.466, 0.503, -0.147 }; + int lda = 2; + double B[] = { -0.287, -0.777, -0.187, 0.061, 0.631, 0.797, 0.833, -0.49, -0.188, 0.386, -0.904, -0.793 }; + int ldb = 3; + double B_expected[] = { 0.0777, -0.0287, -0.0061, -0.0187, -0.0797, 0.0631, 0.0072975, 0.1353485, -0.0266305, -0.0084285, 0.1081065, -0.1670145 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1967) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1967) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.286, 0.025, -0.111, 0.724, -0.973, -0.071, 0.527, -0.334 }; + int lda = 2; + double B[] = { -0.381, -0.131, 0.33, 0.09, 0.35, 0.062, -0.874, 0.252, 0.924, 0.251, 0.559, -0.619 }; + int ldb = 3; + double B_expected[] = { 0.38447496828, 0.401499279514, -0.210140860451, -0.584596680596, -0.443343106286, -0.127686958741, -0.109102585509, -0.096697792106, 0.045298174859, 0.146623168116, 0.131759250934, 0.0225662432408 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1968) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1968) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.862, -0.003, 0.975, 0.364, -0.996, 0.909, -0.316, -0.816 }; + int lda = 2; + double B[] = { 0.167, 0.961, 0.116, 0.675, 0.086, 0.259, -0.483, 0.898, 0.434, 0.723, 0.505, 0.042 }; + int ldb = 3; + double B_expected[] = { -0.1416361, -0.113035, -0.1789614, -0.0108943, -0.0759877, 0.0550802, -0.0898, -0.0483, -0.0723, 0.0434, -0.0042, 0.0505 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1969) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1969) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.826, -0.025, 0.638, -0.183, -0.184, 0.806, 0.131, 0.764 }; + int lda = 2; + double B[] = { -0.038, 0.14, -0.31, -0.494, -0.974, -0.396, -0.217, 0.519, -0.656, -0.737, 0.383, -0.03 }; + int ldb = 2; + double B_expected[] = { 0.0167945280502, 0.00510879322186, 0.0315562985639, 0.0579039669012, -0.0514636821443, 0.116360058046, 0.0192833017545, -0.206389577002, -0.0915450409357, 0.0766481525141, 0.0107002286761, -0.100817314679 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1970) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1970) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.282, -0.433, -0.793, -0.008, -0.999, 0.377, -0.979, 0.421 }; + int lda = 2; + double B[] = { 0.622, -0.722, 0.605, -0.877, 0.935, -0.906, 0.719, -0.607, 0.022, -0.326, -0.905, 0.323 }; + int ldb = 2; + double B_expected[] = { 0.0722, 0.0622, 0.1363784, 0.1498572, 0.0906, 0.0935, 0.1159599, 0.1994627, 0.0326, 0.0022, -0.000562, -0.076012 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1971) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1971) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.934, 0.007, -0.958, 0.434, 0.263, 0.776, 0.097, 0.83 }; + int lda = 2; + double B[] = { -0.405, 0.251, 0.13, 0.388, -0.664, -0.732, -0.779, -0.5, 0.775, -0.299, -0.45, 0.923 }; + int ldb = 2; + double B_expected[] = { -0.026920633021, -0.0986978374343, -0.020841203536, -0.0443113292253, 0.157683298836, 0.0261984465224, 0.099536165222, 0.0486084240644, 0.127725373746, -0.0161073528761, 0.0406652355905, -0.115957262473 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1972) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1972) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 141; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.169, -0.768, -0.529, 0.236, -0.506, 0.691, -0.786, -0.36 }; + int lda = 2; + double B[] = { 0.289, -0.985, 0.931, 0.652, -0.861, -0.51, -0.753, -0.542, -0.822, 0.174, 0.799, 0.8 }; + int ldb = 2; + double B_expected[] = { 0.0420376, 0.0627627, -0.0652, 0.0931, 0.0974426, -0.1131425, 0.0542, -0.0753, -0.0785764, -0.0588129, -0.08, 0.0799 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1973) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1973) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.834, 0.53, 0.278, 0.293, 0.66, 0.497, -0.664, 0.429, -0.294, -0.661, 0.52, -0.247, 0.392, -0.227, 0.209, -0.902, 0.843, 0.37 }; + int lda = 3; + double B[] = { -0.738, 0.166, 0.721, -0.541, -0.963, -0.832, -0.376, -0.718, 0.765, -0.547, 0.451, -0.581 }; + int ldb = 3; + double B_expected[] = { -0.115188282202, -0.000411685478887, 0.105497263516, -0.0083759187965, 0.124793492766, -0.0594619308146, 0.0499107469, -0.0152598288542, 0.00927285309719, -0.0831454824908, 0.0380996260983, 0.0702216627003 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1974) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1974) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.531, -0.691, 0.801, 0.437, 0.402, 0.788, 0.824, 0.599, -0.362, 0.076, 0.192, 0.229, -0.259, -0.279, 0.79, -0.797, 0.728, 0.397 }; + int lda = 3; + double B[] = { -0.049, 0.642, 0.36, 0.428, 0.523, -0.612, 0.459, -0.664, 0.328, 0.513, -0.225, 0.273 }; + int ldb = 3; + double B_expected[] = { -0.0941948813, -0.0387898759, -0.0665271, 0.0399732, 0.0612, 0.0523, 0.1143807788, -0.0091687866, -0.0409059, 0.0308683, -0.0273, -0.0225 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1975) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1975) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.169, -0.092, -0.13, 0.001, 0.573, 0.256, 0.632, -0.09, -0.942, 0.948, 0.595, -0.337, 0.01, -0.786, 0.944, 0.906, -0.832, -0.566 }; + int lda = 3; + double B[] = { -0.461, -0.112, 0.674, -0.268, -0.286, -0.657, 0.329, 0.91, 0.73, 0.488, -0.363, -0.01 }; + int ldb = 3; + double B_expected[] = { -0.0634274139095, -0.238252532073, -0.142693434208, -0.0938542376785, -0.0907100858097, -0.0412217911039, -0.333617825793, 0.376288993923, -0.0317846476268, 0.175075250306, -0.125200687799, -0.118937960805 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1976) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1976) imag"); + }; + }; + }; + + + { + int order = 101; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.53, 0.141, 0.235, 0.474, -0.964, -0.441, 0.197, -0.703, 0.942, 0.98, 0.741, 0.499, -0.738, 0.234, -0.27, -0.158, 0.804, -0.878 }; + int lda = 3; + double B[] = { 0.46, -0.508, 0.918, -0.516, 0.012, -0.451, -0.676, 0.551, -0.38, 0.053, 0.645, 0.785 }; + int ldb = 3; + double B_expected[] = { 0.0508, 0.046, 0.0739304, 0.0470256, 0.0992176528, 0.0480511088, -0.0551, -0.0676, -0.0419681, 0.0140525, -0.112456492, 0.0121429348 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1977) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1977) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { 0.286, 0.548, 0.637, -0.856, -0.739, 0.307, -0.049, -0.342, -0.39, 0.618, -0.757, -0.453, -0.533, 0.131, 0.431, 0.087, -0.776, -0.439 }; + int lda = 3; + double B[] = { 0.968, 0.032, 0.013, 0.684, -0.485, 0.613, 0.316, 0.812, -0.459, 0.34, -0.268, -0.565 }; + int ldb = 2; + double B_expected[] = { -0.126374952238, 0.0484874156039, -0.0755178690743, -0.200973083054, 0.138328459491, -0.0263170966956, 0.00492064241274, -0.0787874374991, 0.00784239970713, 0.0635860998343, -0.0699577429529, -0.00504052726328 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1978) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1978) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 121; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.911, 0.645, -0.525, 0.045, -0.654, -0.896, -0.39, 0.419, 0.867, 0.561, -0.842, -0.835, -0.249, -0.384, 0.575, -0.41, 0.105, -0.282 }; + int lda = 3; + double B[] = { 0.777, 0.361, 0.535, 0.441, 0.508, 0.439, -0.347, 0.131, -0.874, 0.646, 0.917, 0.746 }; + int ldb = 2; + double B_expected[] = { -0.155796389, 0.112639999, 0.0226368685, 0.111048763, -0.042589, 0.127541, 0.067392, -0.0568415, -0.0646, -0.0874, -0.0746, 0.0917 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1979) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1979) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 131; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.519, 0.318, -0.318, 0.73, 0.721, 0.302, -0.604, 0.721, 0.387, 0.673, -0.549, -0.136, 0.101, 0.676, -0.064, -0.659, -0.141, 0.991 }; + int lda = 3; + double B[] = { -0.856, -0.128, 0.721, -0.511, 0.175, -0.341, 0.832, -0.662, 0.652, -0.939, -0.775, -0.899 }; + int ldb = 2; + double B_expected[] = { 0.055542329649, 0.130900846188, -0.133470180979, -0.0571415846795, -0.13942012508, 0.0150972236507, 0.0782230770838, 0.0522994181773, -0.00621452256957, -0.0615971232698, 0.0222285648871, 0.258910370231 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1980) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1980) imag"); + }; + }; + }; + + + { + int order = 102; + int side = 142; + int uplo = 122; + int trans = 113; + int diag = 132; + int M = 2; + int N = 3; + double alpha[2] = {0, 0.1}; + double A[] = { -0.092, -0.392, 0.108, -0.918, 0.505, -0.974, 0.213, 0.97, -0.465, 0.604, -0.737, -0.578, -0.051, -0.43, 0.066, -0.934, -0.347, 0.157 }; + int lda = 3; + double B[] = { -0.489, 0.673, -0.232, 0.668, -0.396, -0.569, 0.763, 0.581, 0.117, -0.249, 0.272, -0.832 }; + int ldb = 2; + double B_expected[] = { -0.0673, -0.0489, -0.0668, -0.0232, 0.0192782, 0.0274626, -0.0721832, 0.140128, 0.0413393162, 0.1110418366, 0.1221321656, 0.2489754256 }; + cblas_ztrsm(order, side, uplo, trans, diag, M, N, alpha, A, lda, B, ldb); + { + int i; + for (i = 0; i < 6; i++) { + gsl_test_rel(B[2*i], B_expected[2*i], dbleps, "ztrsm(case 1981) real"); + gsl_test_rel(B[2*i+1], B_expected[2*i+1], dbleps, "ztrsm(case 1981) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/test_trsv.c b/software/gsl-1.15/cblas/test_trsv.c new file mode 100644 index 000000000..39f5083b3 --- /dev/null +++ b/software/gsl-1.15/cblas/test_trsv.c @@ -0,0 +1,1739 @@ +#include +#include +#include +#include + +#include "tests.h" + +void +test_trsv (void) { +const double flteps = 1e-4, dbleps = 1e-6; + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.349749f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1150)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.348f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1151)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.349749f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1152)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.348f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1153)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.349749f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1154)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.348f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1155)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.349749f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1156)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.995f }; + float X[] = { 0.348f }; + int incX = -1; + float x_expected[] = { 0.348f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1157)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.42623f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1158)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.338f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1159)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.42623f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1160)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.338f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1161)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.42623f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1162)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.338f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1163)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.42623f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1164)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.793f }; + float X[] = { 0.338f }; + int incX = -1; + float x_expected[] = { 0.338f }; + cblas_strsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], flteps, "strsv(case 1165)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { -2.25238095238 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1166)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { 0.473 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1167)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { -2.25238095238 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1168)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { 0.473 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1169)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { -2.25238095238 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1170)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { 0.473 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1171)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { -2.25238095238 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1172)"); + } + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { -0.21 }; + double X[] = { 0.473 }; + int incX = -1; + double x_expected[] = { 0.473 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1173)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 1.30882352941 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1174)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 0.979 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1175)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 1.30882352941 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1176)"); + } + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 0.979 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1177)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 1.30882352941 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1178)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 0.979 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1179)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 1.30882352941 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1180)"); + } + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.748 }; + double X[] = { 0.979 }; + int incX = -1; + double x_expected[] = { 0.979 }; + cblas_dtrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[i], x_expected[i], dbleps, "dtrsv(case 1181)"); + } + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -1.55112f, -0.372004f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1182) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1182) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -0.95f, 0.343f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1183) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1183) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -1.55112f, -0.372004f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1184) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1184) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -0.95f, 0.343f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1185) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1185) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -1.55112f, -0.372004f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1186) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1186) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -0.95f, 0.343f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1187) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1187) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -1.55112f, -0.372004f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1188) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1188) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.529f, -0.348f }; + float X[] = { -0.95f, 0.343f }; + int incX = -1; + float x_expected[] = { -0.95f, 0.343f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1189) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1189) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 1.43572f, -0.843108f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1190) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1190) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 0.896f, -0.447f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1191) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1191) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 1.43572f, -0.843108f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1192) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1192) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 0.896f, -0.447f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1193) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1193) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 1.43572f, -0.843108f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1194) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1194) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 0.896f, -0.447f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1195) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1195) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 1.43572f, -0.843108f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1196) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1196) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.6f, 0.041f }; + float X[] = { 0.896f, -0.447f }; + int incX = -1; + float x_expected[] = { 0.896f, -0.447f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1197) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1197) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.289642f, 0.951701f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1198) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1198) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.765f, 0.18f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1199) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1199) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.289642f, 0.951701f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1200) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1200) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.765f, 0.18f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1201) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1201) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.289642f, 0.951701f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1202) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1202) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.765f, 0.18f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1203) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1203) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.289642f, 0.951701f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1204) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1204) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + float A[] = { 0.397f, 0.683f }; + float X[] = { 0.765f, 0.18f }; + int incX = -1; + float x_expected[] = { 0.765f, 0.18f }; + cblas_ctrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], flteps, "ctrsv(case 1205) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], flteps, "ctrsv(case 1205) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.471957414573, -0.173714770642 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1206) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1206) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.627, 0.281 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1207) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1207) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.471957414573, -0.173714770642 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1208) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1208) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.627, 0.281 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1209) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1209) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.471957414573, -0.173714770642 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1210) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1210) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.627, 0.281 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1211) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1211) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.471957414573, -0.173714770642 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1212) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1212) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 111; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.977, -0.955 }; + double X[] = { -0.627, 0.281 }; + int incX = -1; + double x_expected[] = { -0.627, 0.281 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1213) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1213) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 5.18357980622, -0.587200407955 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1214) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1214) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 0.3, -0.874 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1215) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1215) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 5.18357980622, -0.587200407955 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1216) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1216) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 0.3, -0.874 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1217) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1217) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 5.18357980622, -0.587200407955 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1218) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1218) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 0.3, -0.874 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1219) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1219) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 5.18357980622, -0.587200407955 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1220) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1220) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 112; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.076, -0.16 }; + double X[] = { 0.3, -0.874 }; + int incX = -1; + double x_expected[] = { 0.3, -0.874 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1221) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1221) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.371144591432, -0.0712292456544 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1222) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1222) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.085, -0.303 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1223) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1223) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.371144591432, -0.0712292456544 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1224) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1224) imag"); + }; + }; + }; + + + { + int order = 101; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.085, -0.303 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1225) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1225) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.371144591432, -0.0712292456544 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1226) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1226) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 121; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.085, -0.303 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1227) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1227) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 131; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.371144591432, -0.0712292456544 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1228) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1228) imag"); + }; + }; + }; + + + { + int order = 102; + int trans = 113; + int uplo = 122; + int diag = 132; + int N = 1; + int lda = 1; + double A[] = { 0.372, -0.745 }; + double X[] = { -0.085, -0.303 }; + int incX = -1; + double x_expected[] = { -0.085, -0.303 }; + cblas_ztrsv(order, uplo, trans, diag, N, A, lda, X, incX); + { + int i; + for (i = 0; i < 1; i++) { + gsl_test_rel(X[2*i], x_expected[2*i], dbleps, "ztrsv(case 1229) real"); + gsl_test_rel(X[2*i+1], x_expected[2*i+1], dbleps, "ztrsv(case 1229) imag"); + }; + }; + }; + + +} diff --git a/software/gsl-1.15/cblas/tests.c b/software/gsl-1.15/cblas/tests.c new file mode 100644 index 000000000..af00945e3 --- /dev/null +++ b/software/gsl-1.15/cblas/tests.c @@ -0,0 +1,44 @@ + test_dot (); + test_nrm2 (); + test_asum (); + test_amax (); + test_axpy (); + test_copy (); + test_swap (); + test_scal (); + test_rotg (); + test_rot (); + test_rotmg (); + test_rotm (); + test_gemv (); + test_gbmv (); + test_trmv (); + test_tbmv (); + test_tpmv (); + test_symv (); + test_hemv (); + test_hbmv (); + test_sbmv (); + test_hpmv (); + test_spmv (); + test_trsv (); + test_tbsv (); + test_tpsv (); + test_ger (); + test_syr (); + test_her (); + test_hpr (); + test_spr (); + test_syr2 (); + test_spr2 (); + test_her2 (); + test_hpr2 (); + test_gemm (); + test_symm (); + test_hemm (); + test_syrk (); + test_herk (); + test_syr2k (); + test_her2k (); + test_trmm (); + test_trsm (); diff --git a/software/gsl-1.15/cblas/tests.h b/software/gsl-1.15/cblas/tests.h new file mode 100644 index 000000000..9bfb0fa61 --- /dev/null +++ b/software/gsl-1.15/cblas/tests.h @@ -0,0 +1,44 @@ +void test_dot (void); +void test_nrm2 (void); +void test_asum (void); +void test_amax (void); +void test_axpy (void); +void test_copy (void); +void test_swap (void); +void test_scal (void); +void test_rotg (void); +void test_rot (void); +void test_rotmg (void); +void test_rotm (void); +void test_gemv (void); +void test_gbmv (void); +void test_trmv (void); +void test_tbmv (void); +void test_tpmv (void); +void test_symv (void); +void test_hemv (void); +void test_hbmv (void); +void test_sbmv (void); +void test_hpmv (void); +void test_spmv (void); +void test_trsv (void); +void test_tbsv (void); +void test_tpsv (void); +void test_ger (void); +void test_syr (void); +void test_her (void); +void test_hpr (void); +void test_spr (void); +void test_syr2 (void); +void test_spr2 (void); +void test_her2 (void); +void test_hpr2 (void); +void test_gemm (void); +void test_symm (void); +void test_hemm (void); +void test_syrk (void); +void test_herk (void); +void test_syr2k (void); +void test_her2k (void); +void test_trmm (void); +void test_trsm (void); diff --git a/software/gsl-1.15/cblas/xerbla.c b/software/gsl-1.15/cblas/xerbla.c new file mode 100644 index 000000000..713035f3a --- /dev/null +++ b/software/gsl-1.15/cblas/xerbla.c @@ -0,0 +1,44 @@ +/* xerbla.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include "cblas.h" + +void +cblas_xerbla (int p, const char *rout, const char *form, ...) +{ + va_list ap; + + va_start (ap, form); + + if (p) + { + fprintf (stderr, "Parameter %d to routine %s was incorrect\n", p, rout); + } + + vfprintf (stderr, form, ap); + va_end (ap); + + abort (); +} diff --git a/software/gsl-1.15/cblas/zaxpy.c b/software/gsl-1.15/cblas/zaxpy.c new file mode 100644 index 000000000..d6484014f --- /dev/null +++ b/software/gsl-1.15/cblas/zaxpy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_zaxpy (const int N, const void *alpha, const void *X, const int incX, + void *Y, const int incY) +{ +#define BASE double +#include "source_axpy_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zcopy.c b/software/gsl-1.15/cblas/zcopy.c new file mode 100644 index 000000000..5e80eb49d --- /dev/null +++ b/software/gsl-1.15/cblas/zcopy.c @@ -0,0 +1,12 @@ +#include +#include +#include "cblas.h" + +void +cblas_zcopy (const int N, const void *X, const int incX, void *Y, + const int incY) +{ +#define BASE double +#include "source_copy_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zdotc_sub.c b/software/gsl-1.15/cblas/zdotc_sub.c new file mode 100644 index 000000000..43af96e96 --- /dev/null +++ b/software/gsl-1.15/cblas/zdotc_sub.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" + +void +cblas_zdotc_sub (const int N, const void *X, const int incX, const void *Y, + const int incY, void *result) +{ +#define BASE double +#define CONJ_SIGN (-1.0) +#include "source_dot_c.h" +#undef CONJ_SIGN +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zdotu_sub.c b/software/gsl-1.15/cblas/zdotu_sub.c new file mode 100644 index 000000000..65b9898cf --- /dev/null +++ b/software/gsl-1.15/cblas/zdotu_sub.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" + +void +cblas_zdotu_sub (const int N, const void *X, const int incX, const void *Y, + const int incY, void *result) +{ +#define BASE double +#define CONJ_SIGN 1.0 +#include "source_dot_c.h" +#undef CONJ_SIGN +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zdscal.c b/software/gsl-1.15/cblas/zdscal.c new file mode 100644 index 000000000..616766462 --- /dev/null +++ b/software/gsl-1.15/cblas/zdscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_zdscal (const int N, const double alpha, void *X, const int incX) +{ +#define BASE double +#include "source_scal_c_s.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zgbmv.c b/software/gsl-1.15/cblas/zgbmv.c new file mode 100644 index 000000000..2c0c1308a --- /dev/null +++ b/software/gsl-1.15/cblas/zgbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const int KL, const int KU, + const void *alpha, const void *A, const int lda, const void *X, + const int incX, const void *beta, void *Y, const int incY) +{ +#define BASE double +#include "source_gbmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zgemm.c b/software/gsl-1.15/cblas/zgemm.c new file mode 100644 index 000000000..c914c00a0 --- /dev/null +++ b/software/gsl-1.15/cblas/zgemm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_TRANSPOSE TransB, const int M, const int N, + const int K, const void *alpha, const void *A, const int lda, + const void *B, const int ldb, const void *beta, void *C, + const int ldc) +{ +#define BASE double +#include "source_gemm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zgemv.c b/software/gsl-1.15/cblas/zgemv.c new file mode 100644 index 000000000..372436478 --- /dev/null +++ b/software/gsl-1.15/cblas/zgemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, + const int M, const int N, const void *alpha, const void *A, + const int lda, const void *X, const int incX, const void *beta, + void *Y, const int incY) +{ +#define BASE double +#include "source_gemv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zgerc.c b/software/gsl-1.15/cblas/zgerc.c new file mode 100644 index 000000000..eae60b35a --- /dev/null +++ b/software/gsl-1.15/cblas/zgerc.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zgerc (const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, const void *Y, + const int incY, void *A, const int lda) +{ +#define BASE double +#include "source_gerc.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zgeru.c b/software/gsl-1.15/cblas/zgeru.c new file mode 100644 index 000000000..3fc881961 --- /dev/null +++ b/software/gsl-1.15/cblas/zgeru.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zgeru (const enum CBLAS_ORDER order, const int M, const int N, + const void *alpha, const void *X, const int incX, const void *Y, + const int incY, void *A, const int lda) +{ +#define BASE double +#include "source_geru.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhbmv.c b/software/gsl-1.15/cblas/zhbmv.c new file mode 100644 index 000000000..0b2d4c70e --- /dev/null +++ b/software/gsl-1.15/cblas/zhbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zhbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const int K, const void *alpha, const void *A, + const int lda, const void *X, const int incX, const void *beta, + void *Y, const int incY) +{ +#define BASE double +#include "source_hbmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhemm.c b/software/gsl-1.15/cblas/zhemm.c new file mode 100644 index 000000000..0e817d0c6 --- /dev/null +++ b/software/gsl-1.15/cblas/zhemm.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zhemm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE double +#include "source_hemm.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhemv.c b/software/gsl-1.15/cblas/zhemv.c new file mode 100644 index 000000000..18aed13c5 --- /dev/null +++ b/software/gsl-1.15/cblas/zhemv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zhemv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *A, const int lda, + const void *X, const int incX, const void *beta, void *Y, + const int incY) +{ +#define BASE double +#include "source_hemv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zher.c b/software/gsl-1.15/cblas/zher.c new file mode 100644 index 000000000..1c4d7f290 --- /dev/null +++ b/software/gsl-1.15/cblas/zher.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zher (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const void *X, const int incX, + void *A, const int lda) +{ +#define BASE double +#include "source_her.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zher2.c b/software/gsl-1.15/cblas/zher2.c new file mode 100644 index 000000000..18ff6441b --- /dev/null +++ b/software/gsl-1.15/cblas/zher2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zher2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *A, const int lda) +{ +#define BASE double +#include "source_her2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zher2k.c b/software/gsl-1.15/cblas/zher2k.c new file mode 100644 index 000000000..6d87b3f6a --- /dev/null +++ b/software/gsl-1.15/cblas/zher2k.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zher2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const double beta, void *C, const int ldc) +{ +#define BASE double +#include "source_her2k.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zherk.c b/software/gsl-1.15/cblas/zherk.c new file mode 100644 index 000000000..08fa42eac --- /dev/null +++ b/software/gsl-1.15/cblas/zherk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zherk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const double alpha, const void *A, const int lda, + const double beta, void *C, const int ldc) +{ +#define BASE double +#include "source_herk.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhpmv.c b/software/gsl-1.15/cblas/zhpmv.c new file mode 100644 index 000000000..491445276 --- /dev/null +++ b/software/gsl-1.15/cblas/zhpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zhpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *Ap, const void *X, + const int incX, const void *beta, void *Y, const int incY) +{ +#define BASE double +#include "source_hpmv.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhpr.c b/software/gsl-1.15/cblas/zhpr.c new file mode 100644 index 000000000..8b0bad86d --- /dev/null +++ b/software/gsl-1.15/cblas/zhpr.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zhpr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const double alpha, const void *X, const int incX, + void *Ap) +{ +#define BASE double +#include "source_hpr.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zhpr2.c b/software/gsl-1.15/cblas/zhpr2.c new file mode 100644 index 000000000..7f8e0b069 --- /dev/null +++ b/software/gsl-1.15/cblas/zhpr2.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_zhpr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const int N, const void *alpha, const void *X, const int incX, + const void *Y, const int incY, void *Ap) +{ +#define BASE double +#include "source_hpr2.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zscal.c b/software/gsl-1.15/cblas/zscal.c new file mode 100644 index 000000000..26677432c --- /dev/null +++ b/software/gsl-1.15/cblas/zscal.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_zscal (const int N, const void *alpha, void *X, const int incX) +{ +#define BASE double +#include "source_scal_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zswap.c b/software/gsl-1.15/cblas/zswap.c new file mode 100644 index 000000000..9cf6796c1 --- /dev/null +++ b/software/gsl-1.15/cblas/zswap.c @@ -0,0 +1,11 @@ +#include +#include +#include "cblas.h" + +void +cblas_zswap (const int N, void *X, const int incX, void *Y, const int incY) +{ +#define BASE double +#include "source_swap_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zsymm.c b/software/gsl-1.15/cblas/zsymm.c new file mode 100644 index 000000000..022d28fd0 --- /dev/null +++ b/software/gsl-1.15/cblas/zsymm.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zsymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const int M, const int N, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE double +#include "source_symm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zsyr2k.c b/software/gsl-1.15/cblas/zsyr2k.c new file mode 100644 index 000000000..bb74a8f3a --- /dev/null +++ b/software/gsl-1.15/cblas/zsyr2k.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zsyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, const void *B, + const int ldb, const void *beta, void *C, const int ldc) +{ +#define BASE double +#include "source_syr2k_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/zsyrk.c b/software/gsl-1.15/cblas/zsyrk.c new file mode 100644 index 000000000..6f5ef6b0e --- /dev/null +++ b/software/gsl-1.15/cblas/zsyrk.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_zsyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE Trans, const int N, const int K, + const void *alpha, const void *A, const int lda, + const void *beta, void *C, const int ldc) +{ +#define BASE double +#include "source_syrk_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztbmv.c b/software/gsl-1.15/cblas/ztbmv.c new file mode 100644 index 000000000..38957b0c8 --- /dev/null +++ b/software/gsl-1.15/cblas/ztbmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ztbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE double +#include "source_tbmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztbsv.c b/software/gsl-1.15/cblas/ztbsv.c new file mode 100644 index 000000000..315ac1194 --- /dev/null +++ b/software/gsl-1.15/cblas/ztbsv.c @@ -0,0 +1,17 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ztbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const int K, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE double +#include "source_tbsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztpmv.c b/software/gsl-1.15/cblas/ztpmv.c new file mode 100644 index 000000000..8d4ccf491 --- /dev/null +++ b/software/gsl-1.15/cblas/ztpmv.c @@ -0,0 +1,14 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ztpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX) +{ +#define BASE double +#include "source_tpmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztpsv.c b/software/gsl-1.15/cblas/ztpsv.c new file mode 100644 index 000000000..80ce1532d --- /dev/null +++ b/software/gsl-1.15/cblas/ztpsv.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ztpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *Ap, void *X, const int incX) +{ +#define BASE double +#include "source_tpsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztrmm.c b/software/gsl-1.15/cblas/ztrmm.c new file mode 100644 index 000000000..e65d546ab --- /dev/null +++ b/software/gsl-1.15/cblas/ztrmm.c @@ -0,0 +1,16 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +void +cblas_ztrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, void *B, + const int ldb) +{ +#define BASE double +#include "source_trmm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztrmv.c b/software/gsl-1.15/cblas/ztrmv.c new file mode 100644 index 000000000..47c2b399b --- /dev/null +++ b/software/gsl-1.15/cblas/ztrmv.c @@ -0,0 +1,15 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +void +cblas_ztrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE double +#include "source_trmv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztrsm.c b/software/gsl-1.15/cblas/ztrsm.c new file mode 100644 index 000000000..4f1414032 --- /dev/null +++ b/software/gsl-1.15/cblas/ztrsm.c @@ -0,0 +1,18 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l3.h" + +#include "hypot.c" + +void +cblas_ztrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, + const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, + const enum CBLAS_DIAG Diag, const int M, const int N, + const void *alpha, const void *A, const int lda, void *B, + const int ldb) +{ +#define BASE double +#include "source_trsm_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cblas/ztrsv.c b/software/gsl-1.15/cblas/ztrsv.c new file mode 100644 index 000000000..9478602c6 --- /dev/null +++ b/software/gsl-1.15/cblas/ztrsv.c @@ -0,0 +1,17 @@ +#include +#include +#include "cblas.h" +#include "error_cblas_l2.h" + +#include "hypot.c" + +void +cblas_ztrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, + const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, + const int N, const void *A, const int lda, void *X, + const int incX) +{ +#define BASE double +#include "source_trsv_c.h" +#undef BASE +} diff --git a/software/gsl-1.15/cdf/.deps/beta.Plo b/software/gsl-1.15/cdf/.deps/beta.Plo new file mode 100644 index 000000000..efc4ba007 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/beta.Plo @@ -0,0 +1,66 @@ +beta.lo: beta.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h beta_inc.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +beta_inc.c: diff --git a/software/gsl-1.15/cdf/.deps/betainv.Plo b/software/gsl-1.15/cdf/.deps/betainv.Plo new file mode 100644 index 000000000..a4b0bb694 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/betainv.Plo @@ -0,0 +1,142 @@ +betainv.lo: betainv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_cdf.h ../gsl/gsl_randist.h \ + ../gsl/gsl_rng.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h error.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/binomial.Plo b/software/gsl-1.15/cdf/.deps/binomial.Plo new file mode 100644 index 000000000..14ba712fc --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/binomial.Plo @@ -0,0 +1,90 @@ +binomial.lo: binomial.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h error.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +error.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: diff --git a/software/gsl-1.15/cdf/.deps/cauchy.Plo b/software/gsl-1.15/cdf/.deps/cauchy.Plo new file mode 100644 index 000000000..0a2d0f488 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/cauchy.Plo @@ -0,0 +1,59 @@ +cauchy.lo: cauchy.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/cauchyinv.Plo b/software/gsl-1.15/cdf/.deps/cauchyinv.Plo new file mode 100644 index 000000000..cd2b6a94f --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/cauchyinv.Plo @@ -0,0 +1,59 @@ +cauchyinv.lo: cauchyinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/chisq.Plo b/software/gsl-1.15/cdf/.deps/chisq.Plo new file mode 100644 index 000000000..4054a1b19 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/chisq.Plo @@ -0,0 +1,10 @@ +chisq.lo: chisq.c ../config.h ../gsl/gsl_cdf.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/chisqinv.Plo b/software/gsl-1.15/cdf/.deps/chisqinv.Plo new file mode 100644 index 000000000..30d8b4f31 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/chisqinv.Plo @@ -0,0 +1,10 @@ +chisqinv.lo: chisqinv.c ../config.h ../gsl/gsl_cdf.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/exponential.Plo b/software/gsl-1.15/cdf/.deps/exponential.Plo new file mode 100644 index 000000000..9aeebb276 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/exponential.Plo @@ -0,0 +1,59 @@ +exponential.lo: exponential.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/exponentialinv.Plo b/software/gsl-1.15/cdf/.deps/exponentialinv.Plo new file mode 100644 index 000000000..edd74b568 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/exponentialinv.Plo @@ -0,0 +1,59 @@ +exponentialinv.lo: exponentialinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/exppow.Plo b/software/gsl-1.15/cdf/.deps/exppow.Plo new file mode 100644 index 000000000..5b0a19e2a --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/exppow.Plo @@ -0,0 +1,25 @@ +exppow.lo: exppow.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/fdist.Plo b/software/gsl-1.15/cdf/.deps/fdist.Plo new file mode 100644 index 000000000..f4330bacc --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/fdist.Plo @@ -0,0 +1,92 @@ +fdist.lo: fdist.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h error.h beta_inc.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +error.h: + +beta_inc.c: diff --git a/software/gsl-1.15/cdf/.deps/fdistinv.Plo b/software/gsl-1.15/cdf/.deps/fdistinv.Plo new file mode 100644 index 000000000..9e2fdc682 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/fdistinv.Plo @@ -0,0 +1,86 @@ +fdistinv.lo: fdistinv.c ../config.h ../gsl/gsl_cdf.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h error.h + +../config.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/flat.Plo b/software/gsl-1.15/cdf/.deps/flat.Plo new file mode 100644 index 000000000..3d2eb9f13 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/flat.Plo @@ -0,0 +1,59 @@ +flat.lo: flat.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/flatinv.Plo b/software/gsl-1.15/cdf/.deps/flatinv.Plo new file mode 100644 index 000000000..be662573a --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/flatinv.Plo @@ -0,0 +1,5 @@ +flatinv.lo: flatinv.c ../config.h ../gsl/gsl_cdf.h + +../config.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/gamma.Plo b/software/gsl-1.15/cdf/.deps/gamma.Plo new file mode 100644 index 000000000..be1a76592 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gamma.Plo @@ -0,0 +1,63 @@ +gamma.lo: gamma.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/gammainv.Plo b/software/gsl-1.15/cdf/.deps/gammainv.Plo new file mode 100644 index 000000000..f77b7180c --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gammainv.Plo @@ -0,0 +1,139 @@ +gammainv.lo: gammainv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_randist.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/gauss.Plo b/software/gsl-1.15/cdf/.deps/gauss.Plo new file mode 100644 index 000000000..66142d3fb --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gauss.Plo @@ -0,0 +1,59 @@ +gauss.lo: gauss.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/gaussinv.Plo b/software/gsl-1.15/cdf/.deps/gaussinv.Plo new file mode 100644 index 000000000..b8f5e9f01 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gaussinv.Plo @@ -0,0 +1,86 @@ +gaussinv.lo: gaussinv.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h rat_eval.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: + +rat_eval.h: diff --git a/software/gsl-1.15/cdf/.deps/geometric.Plo b/software/gsl-1.15/cdf/.deps/geometric.Plo new file mode 100644 index 000000000..c5ee8e784 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/geometric.Plo @@ -0,0 +1,85 @@ +geometric.lo: geometric.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_cdf.h error.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cdf.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/gumbel1.Plo b/software/gsl-1.15/cdf/.deps/gumbel1.Plo new file mode 100644 index 000000000..96bdeeb76 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gumbel1.Plo @@ -0,0 +1,59 @@ +gumbel1.lo: gumbel1.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/gumbel1inv.Plo b/software/gsl-1.15/cdf/.deps/gumbel1inv.Plo new file mode 100644 index 000000000..b0fe0485d --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gumbel1inv.Plo @@ -0,0 +1,59 @@ +gumbel1inv.lo: gumbel1inv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/gumbel2.Plo b/software/gsl-1.15/cdf/.deps/gumbel2.Plo new file mode 100644 index 000000000..c0b821efa --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gumbel2.Plo @@ -0,0 +1,59 @@ +gumbel2.lo: gumbel2.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/gumbel2inv.Plo b/software/gsl-1.15/cdf/.deps/gumbel2inv.Plo new file mode 100644 index 000000000..de6796143 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/gumbel2inv.Plo @@ -0,0 +1,59 @@ +gumbel2inv.lo: gumbel2inv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/hypergeometric.Plo b/software/gsl-1.15/cdf/.deps/hypergeometric.Plo new file mode 100644 index 000000000..60e5926d6 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/hypergeometric.Plo @@ -0,0 +1,137 @@ +hypergeometric.lo: hypergeometric.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_cdf.h \ + ../gsl/gsl_randist.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h error.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/laplace.Plo b/software/gsl-1.15/cdf/.deps/laplace.Plo new file mode 100644 index 000000000..77fdf4464 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/laplace.Plo @@ -0,0 +1,59 @@ +laplace.lo: laplace.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/laplaceinv.Plo b/software/gsl-1.15/cdf/.deps/laplaceinv.Plo new file mode 100644 index 000000000..3179edb57 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/laplaceinv.Plo @@ -0,0 +1,59 @@ +laplaceinv.lo: laplaceinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/logistic.Plo b/software/gsl-1.15/cdf/.deps/logistic.Plo new file mode 100644 index 000000000..77440514a --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/logistic.Plo @@ -0,0 +1,59 @@ +logistic.lo: logistic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/logisticinv.Plo b/software/gsl-1.15/cdf/.deps/logisticinv.Plo new file mode 100644 index 000000000..5ac859926 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/logisticinv.Plo @@ -0,0 +1,59 @@ +logisticinv.lo: logisticinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/lognormal.Plo b/software/gsl-1.15/cdf/.deps/lognormal.Plo new file mode 100644 index 000000000..7358fbdf5 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/lognormal.Plo @@ -0,0 +1,59 @@ +lognormal.lo: lognormal.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/lognormalinv.Plo b/software/gsl-1.15/cdf/.deps/lognormalinv.Plo new file mode 100644 index 000000000..c864796a1 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/lognormalinv.Plo @@ -0,0 +1,59 @@ +lognormalinv.lo: lognormalinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/nbinomial.Plo b/software/gsl-1.15/cdf/.deps/nbinomial.Plo new file mode 100644 index 000000000..5ed4284d3 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/nbinomial.Plo @@ -0,0 +1,85 @@ +nbinomial.lo: nbinomial.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_cdf.h error.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cdf.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/pareto.Plo b/software/gsl-1.15/cdf/.deps/pareto.Plo new file mode 100644 index 000000000..8a2886775 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/pareto.Plo @@ -0,0 +1,59 @@ +pareto.lo: pareto.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/paretoinv.Plo b/software/gsl-1.15/cdf/.deps/paretoinv.Plo new file mode 100644 index 000000000..369f664a7 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/paretoinv.Plo @@ -0,0 +1,59 @@ +paretoinv.lo: paretoinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/pascal.Plo b/software/gsl-1.15/cdf/.deps/pascal.Plo new file mode 100644 index 000000000..257919370 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/pascal.Plo @@ -0,0 +1,59 @@ +pascal.lo: pascal.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/poisson.Plo b/software/gsl-1.15/cdf/.deps/poisson.Plo new file mode 100644 index 000000000..6abfc25ca --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/poisson.Plo @@ -0,0 +1,85 @@ +poisson.lo: poisson.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_cdf.h error.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cdf.h: + +error.h: diff --git a/software/gsl-1.15/cdf/.deps/rayleigh.Plo b/software/gsl-1.15/cdf/.deps/rayleigh.Plo new file mode 100644 index 000000000..1bc0531a6 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/rayleigh.Plo @@ -0,0 +1,59 @@ +rayleigh.lo: rayleigh.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/rayleighinv.Plo b/software/gsl-1.15/cdf/.deps/rayleighinv.Plo new file mode 100644 index 000000000..62fcd5643 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/rayleighinv.Plo @@ -0,0 +1,59 @@ +rayleighinv.lo: rayleighinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/tdist.Plo b/software/gsl-1.15/cdf/.deps/tdist.Plo new file mode 100644 index 000000000..d1cee4b19 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/tdist.Plo @@ -0,0 +1,90 @@ +tdist.lo: tdist.c ../config.h ../gsl/gsl_cdf.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h beta_inc.c + +../config.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +beta_inc.c: diff --git a/software/gsl-1.15/cdf/.deps/tdistinv.Plo b/software/gsl-1.15/cdf/.deps/tdistinv.Plo new file mode 100644 index 000000000..ce2ea9192 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/tdistinv.Plo @@ -0,0 +1,139 @@ +tdistinv.lo: tdistinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_cdf.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_randist.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/cdf/.deps/test.Po b/software/gsl-1.15/cdf/.deps/test.Po new file mode 100644 index 000000000..83f16f095 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/test.Po @@ -0,0 +1,142 @@ +test.o: test.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_randist.h ../gsl/gsl_rng.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_cdf.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h test_auto.c + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_cdf.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +test_auto.c: diff --git a/software/gsl-1.15/cdf/.deps/weibull.Plo b/software/gsl-1.15/cdf/.deps/weibull.Plo new file mode 100644 index 000000000..d868ab3f2 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/weibull.Plo @@ -0,0 +1,59 @@ +weibull.lo: weibull.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/.deps/weibullinv.Plo b/software/gsl-1.15/cdf/.deps/weibullinv.Plo new file mode 100644 index 000000000..464a7c849 --- /dev/null +++ b/software/gsl-1.15/cdf/.deps/weibullinv.Plo @@ -0,0 +1,59 @@ +weibullinv.lo: weibullinv.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_cdf.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_cdf.h: diff --git a/software/gsl-1.15/cdf/ChangeLog b/software/gsl-1.15/cdf/ChangeLog new file mode 100644 index 000000000..8fbce13fe --- /dev/null +++ b/software/gsl-1.15/cdf/ChangeLog @@ -0,0 +1,135 @@ +2009-07-19 Brian Gough + + * gumbel1.c (gsl_cdf_gumbel1_Q): use a single argument ax-log(b) + to get better control over underflow/overflow + +2008-12-03 Brian Gough + + * gammainv.c (gsl_cdf_gamma_Pinv): keep iterating if P is still + changing (fix for bug 24704) + + * test.c (test_chisqinv): added test cases for bug 24704 + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-04-29 Brian Gough + + * gammainv.c (gsl_cdf_gamma_Pinv, gsl_cdf_gamma_Qinv): restrict + the range of the gaussian approximation + +2008-02-20 Brian Gough + + * beta_inc.c (beta_inc_AXPY): add some handling for large + parameter cases + +2008-02-12 Brian Gough + + * hypergeometric.c (gsl_cdf_hypergeometric_P): compute midpoint in + double precision to avoid overflow + (gsl_cdf_hypergeometric_Q): ditto + +2007-08-22 Brian Gough + + * betainv.c (gsl_cdf_beta_Pinv): added an error check for + inaccurate results + + * gammainv.c (gsl_cdf_gamma_Pinv): added an error check for + inaccurate results + + * tdistinv.c (gsl_cdf_tdist_Pinv): added an error check for + inaccurate results + +2007-08-21 Brian Gough + + * betainv.c (gsl_cdf_beta_Pinv): added bisection method to improve + initial approximations + +2007-01-23 Brian Gough + + * betainv.c (gsl_cdf_beta_Pinv): avoid generating a NaN for lx > 0 + +2006-04-18 Brian Gough + + * betainv.c (gsl_cdf_beta_Qinv): fix prototype const + +2006-03-07 Brian Gough + + * poisson.c: added poisson cdf + + * nbinomial.c: added negative binomial cdf + + * hypergeometric.c: added hypergeometric cdf + + * geometric.c: added geometric cdf + + * binomial.c (gsl_cdf_binomial_Q): added binomial cdf + + * test.c: added discrete function tests + + * gamma.c (gsl_cdf_gamma_P, gsl_cdf_gamma_Q): clean up unused + code, ensure that branches make P+Q=1 always true + + * fdistinv.c (gsl_cdf_fdist_Pinv): use P instead of p for consistency + + * fdist.c (gsl_cdf_fdist_Q): use Q instead of P for consistency + + * beta.c (gsl_cdf_beta_Q): use Q instead of P for consistency + +2006-02-27 Brian Gough + + * fdistinv.c (gsl_cdf_fdist_Pinv, gsl_cdf_fdist_Qinv): added + inverse functions + + * betainv.c (gsl_cdf_beta_Pinv, gsl_cdf_beta_Qinv): added inverse + functions + + * tdistinv.c (gsl_cdf_tdist_Qinv, gsl_cdf_tdist_Pinv): max 32 + iterations, prevent infinite loop + + * gammainv.c (gsl_cdf_gamma_Qinv, gsl_cdf_gamma_Pinv): max 32 + iterations, prevent infinite loop + +2005-06-20 Brian Gough + + * test.c: removed tests using subnormal values, since they tend to + fail when extended precision registers are not available. + +2004-10-26 Brian Gough + + * exppow.c: added exppow distribution + +2004-10-01 Brian Gough + + * beta.c (gsl_cdf_beta_P, gsl_cdf_beta_P): return consistent + results for out of range values. + +2003-08-27 Brian Gough + + * gauss.c: use parentheses around constant macros to avoid -(-X) + being interpreted as --X + +2003-07-27 Brian Gough + + * gumbel1.c (gsl_cdf_gumbel1_Q): use pow in place of exp since + compilers seem to handle overflow better in this case (perhaps + because it is not an intrinsic function). + + * gumbel2.c (gsl_cdf_gumbel2_P): handle case of x = 0 explicitly + (gsl_cdf_gumbel2_Q): handle case of x = 0 explicitly + +2003-07-22 Brian Gough + + * gamma.c (gsl_cdf_gamma_P): Peizer and Pratt approximation for + large a seems to be inaccurate in tails + (gsl_cdf_gamma_Q): Peizer and Pratt approximation for large a + seems to be inaccurate in tails + + * test.c (main): added test for large a for gamma + + * cauchyinv.c (gsl_cdf_cauchy_Qinv): corrected limiting value for + Q=1 + + * added Cumulative Distribution functions from savannah.gnu.org + diff --git a/software/gsl-1.15/cdf/Makefile.am b/software/gsl-1.15/cdf/Makefile.am new file mode 100644 index 000000000..7e92b8a5e --- /dev/null +++ b/software/gsl-1.15/cdf/Makefile.am @@ -0,0 +1,17 @@ +## Process this file with automake to produce Makefile.in +noinst_LTLIBRARIES = libgslcdf.la + +pkginclude_HEADERS= gsl_cdf.h + +INCLUDES = -I$(top_srcdir) + +libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c + +noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c error.h + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c +test_LDADD = libgslcdf.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/cdf/Makefile.in b/software/gsl-1.15/cdf/Makefile.in new file mode 100644 index 000000000..ae392ede9 --- /dev/null +++ b/software/gsl-1.15/cdf/Makefile.in @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = cdf +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslcdf_la_LIBADD = +am_libgslcdf_la_OBJECTS = beta.lo betainv.lo cauchy.lo cauchyinv.lo \ + chisq.lo chisqinv.lo exponential.lo exponentialinv.lo \ + exppow.lo fdist.lo fdistinv.lo flat.lo flatinv.lo gamma.lo \ + gammainv.lo gauss.lo gaussinv.lo gumbel1.lo gumbel1inv.lo \ + gumbel2.lo gumbel2inv.lo laplace.lo laplaceinv.lo logistic.lo \ + logisticinv.lo lognormal.lo lognormalinv.lo pareto.lo \ + paretoinv.lo rayleigh.lo rayleighinv.lo tdist.lo tdistinv.lo \ + weibull.lo weibullinv.lo binomial.lo poisson.lo geometric.lo \ + nbinomial.lo pascal.lo hypergeometric.lo +libgslcdf_la_OBJECTS = $(am_libgslcdf_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslcdf.la ../randist/libgslrandist.la \ + ../rng/libgslrng.la ../specfunc/libgslspecfunc.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslcdf_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslcdf_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslcdf.la +pkginclude_HEADERS = gsl_cdf.h +INCLUDES = -I$(top_srcdir) +libgslcdf_la_SOURCES = beta.c betainv.c cauchy.c cauchyinv.c chisq.c chisqinv.c exponential.c exponentialinv.c exppow.c fdist.c fdistinv.c flat.c flatinv.c gamma.c gammainv.c gauss.c gaussinv.c gumbel1.c gumbel1inv.c gumbel2.c gumbel2inv.c laplace.c laplaceinv.c logistic.c logisticinv.c lognormal.c lognormalinv.c pareto.c paretoinv.c rayleigh.c rayleighinv.c tdist.c tdistinv.c weibull.c weibullinv.c binomial.c poisson.c geometric.c nbinomial.c pascal.c hypergeometric.c +noinst_HEADERS = beta_inc.c rat_eval.h test_auto.c error.h +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslcdf.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cdf/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu cdf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslcdf.la: $(libgslcdf_la_OBJECTS) $(libgslcdf_la_DEPENDENCIES) + $(LINK) $(libgslcdf_la_OBJECTS) $(libgslcdf_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/betainv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binomial.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cauchy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cauchyinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chisq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chisqinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exponential.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exponentialinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exppow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdistinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flatinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gammainv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gauss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geometric.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gumbel1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gumbel1inv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gumbel2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gumbel2inv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hypergeometric.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/laplace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/laplaceinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logistic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logisticinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lognormal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lognormalinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbinomial.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pareto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paretoinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pascal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poisson.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rayleigh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rayleighinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdistinv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weibull.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weibullinv.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/cdf/TODO b/software/gsl-1.15/cdf/TODO new file mode 100644 index 000000000..438ab10d4 --- /dev/null +++ b/software/gsl-1.15/cdf/TODO @@ -0,0 +1,28 @@ +# -*- org -*- +#+CATEGORY: cdf + +* discrete inverse distributions - easy apart from hypergeometric(?) + +* look for integer overflow in the discrete functions - this could be + hard to find - perform computations in double to avoid. + + gsl_cdf_binomial_P (unsigned int k, double p, unsigned int n); + gsl_cdf_binomial_Q (unsigned int k, double p, unsigned int n); + gsl_cdf_poisson_P (unsigned int k, double mu); + gsl_cdf_poisson_Q (unsigned int k, double mu); + gsl_cdf_geometric_P (unsigned int k, double p); + gsl_cdf_geometric_Q (unsigned int k, double p); + gsl_cdf_negative_binomial_P (unsigned int k, double p, double n); + gsl_cdf_negative_binomial_Q (unsigned int k, double p, double n); + gsl_cdf_pascal_P (unsigned int k, double p, unsigned int n); + gsl_cdf_pascal_Q (unsigned int k, double p, unsigned int n); + gsl_cdf_hypergeometric_P (unsigned int k, unsigned int n1, + unsigned int n2, unsigned int t); + gsl_cdf_hypergeometric_Q (unsigned int k, unsigned int n1, + unsigned int n2, unsigned int t); + +* Unify the beta_inc function with the special functions, put all the + functionaity in gsl_sf_beta_inc, providing a new function for the + AXPY part if necessary (can we do everything with gsl_sf_beta_inc + and gsl_sf_beta_inc_1mx keeping in mind that we cannot do 1-x + because of cancellation for small x) diff --git a/software/gsl-1.15/cdf/beta.c b/software/gsl-1.15/cdf/beta.c new file mode 100644 index 000000000..999fc2bba --- /dev/null +++ b/software/gsl-1.15/cdf/beta.c @@ -0,0 +1,66 @@ +/* cdf/cdf_beta.c + * + * Copyright (C) 2003, 2007 Brian Gough. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "beta_inc.c" + +double +gsl_cdf_beta_P (const double x, const double a, const double b) +{ + double P; + + if (x <= 0.0 ) + { + return 0.0; + } + + if ( x >= 1.0 ) + { + return 1.0; + } + + P = beta_inc_AXPY (1.0, 0.0, a, b, x); + + return P; +} + +double +gsl_cdf_beta_Q (const double x, const double a, const double b) +{ + double Q; + + if ( x >= 1.0) + { + return 0.0; + } + + if ( x <= 0.0 ) + { + return 1.0; + } + + Q = beta_inc_AXPY (-1.0, 1.0, a, b, x); + + return Q; +} diff --git a/software/gsl-1.15/cdf/beta_inc.c b/software/gsl-1.15/cdf/beta_inc.c new file mode 100644 index 000000000..ac1d34032 --- /dev/null +++ b/software/gsl-1.15/cdf/beta_inc.c @@ -0,0 +1,193 @@ +/* specfunc/beta_inc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ +/* Modified for cdfs by Brian Gough, June 2003 */ + +#include + +static double +beta_cont_frac (const double a, const double b, const double x, + const double epsabs) +{ + const unsigned int max_iter = 512; /* control iterations */ + const double cutoff = 2.0 * GSL_DBL_MIN; /* control the zero cutoff */ + unsigned int iter_count = 0; + double cf; + + /* standard initialization for continued fraction */ + double num_term = 1.0; + double den_term = 1.0 - (a + b) * x / (a + 1.0); + + if (fabs (den_term) < cutoff) + den_term = GSL_NAN; + + den_term = 1.0 / den_term; + cf = den_term; + + while (iter_count < max_iter) + { + const int k = iter_count + 1; + double coeff = k * (b - k) * x / (((a - 1.0) + 2 * k) * (a + 2 * k)); + double delta_frac; + + /* first step */ + den_term = 1.0 + coeff * den_term; + num_term = 1.0 + coeff / num_term; + + if (fabs (den_term) < cutoff) + den_term = GSL_NAN; + + if (fabs (num_term) < cutoff) + num_term = GSL_NAN; + + den_term = 1.0 / den_term; + + delta_frac = den_term * num_term; + cf *= delta_frac; + + coeff = -(a + k) * (a + b + k) * x / ((a + 2 * k) * (a + 2 * k + 1.0)); + + /* second step */ + den_term = 1.0 + coeff * den_term; + num_term = 1.0 + coeff / num_term; + + if (fabs (den_term) < cutoff) + den_term = GSL_NAN; + + if (fabs (num_term) < cutoff) + num_term = GSL_NAN; + + den_term = 1.0 / den_term; + + delta_frac = den_term * num_term; + cf *= delta_frac; + + if (fabs (delta_frac - 1.0) < 2.0 * GSL_DBL_EPSILON) + break; + + if (cf * fabs (delta_frac - 1.0) < epsabs) + break; + + ++iter_count; + } + + if (iter_count >= max_iter) + return GSL_NAN; + + return cf; +} + +/* The function beta_inc_AXPY(A,Y,a,b,x) computes A * beta_inc(a,b,x) + + Y taking account of possible cancellations when using the + hypergeometric transformation beta_inc(a,b,x)=1-beta_inc(b,a,1-x). + + It also adjusts the accuracy of beta_inc() to fit the overall + absolute error when A*beta_inc is added to Y. (e.g. if Y >> + A*beta_inc then the accuracy of beta_inc can be reduced) */ + + + +static double +beta_inc_AXPY (const double A, const double Y, + const double a, const double b, const double x) +{ + if (x == 0.0) + { + return A * 0 + Y; + } + else if (x == 1.0) + { + return A * 1 + Y; + } + else if (a > 1e5 && b < 10 && x > a / (a + b)) + { + /* Handle asymptotic regime, large a, small b, x > peak [AS 26.5.17] */ + double N = a + (b - 1.0) / 2.0; + return A * gsl_sf_gamma_inc_Q (b, -N * log (x)) + Y; + } + else if (b > 1e5 && a < 10 && x < b / (a + b)) + { + /* Handle asymptotic regime, small a, large b, x < peak [AS 26.5.17] */ + double N = b + (a - 1.0) / 2.0; + return A * gsl_sf_gamma_inc_P (a, -N * log1p (-x)) + Y; + } + else + { + double ln_beta = gsl_sf_lnbeta (a, b); + double ln_pre = -ln_beta + a * log (x) + b * log1p (-x); + + double prefactor = exp (ln_pre); + + if (x < (a + 1.0) / (a + b + 2.0)) + { + /* Apply continued fraction directly. */ + double epsabs = fabs (Y / (A * prefactor / a)) * GSL_DBL_EPSILON; + + double cf = beta_cont_frac (a, b, x, epsabs); + + return A * (prefactor * cf / a) + Y; + } + else + { + /* Apply continued fraction after hypergeometric transformation. */ + double epsabs = + fabs ((A + Y) / (A * prefactor / b)) * GSL_DBL_EPSILON; + double cf = beta_cont_frac (b, a, 1.0 - x, epsabs); + double term = prefactor * cf / b; + + if (A == -Y) + { + return -A * term; + } + else + { + return A * (1 - term) + Y; + } + } + } +} + +/* Direct series evaluation for testing purposes only */ + +#if 0 +static double +beta_series (const double a, const double b, const double x, + const double epsabs) +{ + double f = x / (1 - x); + double c = (b - 1) / (a + 1) * f; + double s = 1; + double n = 0; + + s += c; + + do + { + n++; + c *= -f * (2 + n - b) / (2 + n + a); + s += c; + } + while (n < 512 && fabs (c) > GSL_DBL_EPSILON * fabs (s) + epsabs); + + s /= (1 - x); + + return s; +} +#endif diff --git a/software/gsl-1.15/cdf/betainv.c b/software/gsl-1.15/cdf/betainv.c new file mode 100644 index 000000000..b9efb1dad --- /dev/null +++ b/software/gsl-1.15/cdf/betainv.c @@ -0,0 +1,225 @@ +/* cdf/betainv.c + * + * Copyright (C) 2004 Free Software Foundation, Inc. + * Copyright (C) 2006, 2007 Brian Gough + * Written by Jason H. Stover. + * Modified for GSL by Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Invert the Beta distribution. + * + * References: + * + * Roger W. Abernathy and Robert P. Smith. "Applying Series Expansion + * to the Inverse Beta Distribution to Find Percentiles of the + * F-Distribution," ACM Transactions on Mathematical Software, volume + * 19, number 4, December 1993, pages 474-480. + * + * G.W. Hill and A.W. Davis. "Generalized asymptotic expansions of a + * Cornish-Fisher type," Annals of Mathematical Statistics, volume 39, + * number 8, August 1968, pages 1264-1273. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +static double +bisect (double x, double P, double a, double b, double xtol, double Ptol) +{ + double x0 = 0, x1 = 1, Px; + + while (fabs(x1 - x0) > xtol) { + Px = gsl_cdf_beta_P (x, a, b); + if (fabs(Px - P) < Ptol) { + /* return as soon as approximation is good enough, including on + the first iteration */ + return x; + } else if (Px < P) { + x0 = x; + } else if (Px > P) { + x1 = x; + } + x = 0.5 * (x0 + x1); + } + return x; +} + + +double +gsl_cdf_beta_Pinv (const double P, const double a, const double b) +{ + double x, mean; + + if (P < 0.0 || P > 1.0) + { + CDF_ERROR ("P must be in range 0 < P < 1", GSL_EDOM); + } + + if (a < 0.0) + { + CDF_ERROR ("a < 0", GSL_EDOM); + } + + if (b < 0.0) + { + CDF_ERROR ("b < 0", GSL_EDOM); + } + + if (P == 0.0) + { + return 0.0; + } + + if (P == 1.0) + { + return 1.0; + } + + if (P > 0.5) + { + return gsl_cdf_beta_Qinv (1 - P, a, b); + } + + mean = a / (a + b); + + if (P < 0.1) + { + /* small x */ + + double lg_ab = gsl_sf_lngamma (a + b); + double lg_a = gsl_sf_lngamma (a); + double lg_b = gsl_sf_lngamma (b); + + double lx = (log (a) + lg_a + lg_b - lg_ab + log (P)) / a; + if (lx <= 0) { + x = exp (lx); /* first approximation */ + x *= pow (1 - x, -(b - 1) / a); /* second approximation */ + } else { + x = mean; + } + + if (x > mean) + x = mean; + } + else + { + /* Use expected value as first guess */ + x = mean; + } + + /* Do bisection to get closer */ + x = bisect (x, P, a, b, 0.01, 0.01); + + { + double lambda, dP, phi; + unsigned int n = 0; + + start: + dP = P - gsl_cdf_beta_P (x, a, b); + phi = gsl_ran_beta_pdf (x, a, b); + + if (dP == 0.0 || n++ > 64) + goto end; + + lambda = dP / GSL_MAX (2 * fabs (dP / x), phi); + + { + double step0 = lambda; + double step1 = -((a - 1) / x - (b - 1) / (1 - x)) * lambda * lambda / 2; + + double step = step0; + + if (fabs (step1) < fabs (step0)) + { + step += step1; + } + else + { + /* scale back step to a reasonable size when too large */ + step *= 2 * fabs (step0 / step1); + }; + + if (x + step > 0 && x + step < 1) + { + x += step; + } + else + { + x = sqrt (x) * sqrt (mean); /* try a new starting point */ + } + + if (fabs (step0) > 1e-10 * x) + goto start; + } + + end: + + if (fabs(dP) > GSL_SQRT_DBL_EPSILON * P) + { + GSL_ERROR_VAL("inverse failed to converge", GSL_EFAILED, GSL_NAN); + } + + return x; + } +} + +double +gsl_cdf_beta_Qinv (const double Q, const double a, const double b) +{ + + if (Q < 0.0 || Q > 1.0) + { + CDF_ERROR ("Q must be inside range 0 < Q < 1", GSL_EDOM); + } + + if (a < 0.0) + { + CDF_ERROR ("a < 0", GSL_EDOM); + } + + if (b < 0.0) + { + CDF_ERROR ("b < 0", GSL_EDOM); + } + + if (Q == 0.0) + { + return 1.0; + } + + if (Q == 1.0) + { + return 0.0; + } + + if (Q > 0.5) + { + return gsl_cdf_beta_Pinv (1 - Q, a, b); + } + else + { + return 1 - gsl_cdf_beta_Pinv (Q, b, a); + }; +} diff --git a/software/gsl-1.15/cdf/binomial.c b/software/gsl-1.15/cdf/binomial.c new file mode 100644 index 000000000..190945df9 --- /dev/null +++ b/software/gsl-1.15/cdf/binomial.c @@ -0,0 +1,108 @@ +/* cdf/binomial.c + * + * Copyright (C) 2004 Jason H. Stover. + * Copyright (C) 2004 Giulio Bottazzi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/* Computes the cumulative distribution function for a binomial + random variable. For a binomial random variable X with n trials + and success probability p, + + Pr( X <= k ) = Pr( Y >= p ) + + where Y is a beta random variable with parameters k+1 and n-k. + + The binomial distribution has the form, + + prob(k) = n!/(k!(n-k)!) * p^k (1-p)^(n-k) for k = 0, 1, ..., n + + The cumulated distributions can be expressed in terms of normalized + incomplete beta functions (see Abramowitz & Stegun eq. 26.5.26 and + eq. 6.6.3). + + Reference: + + W. Feller, "An Introduction to Probability and Its + Applications," volume 1. Wiley, 1968. Exercise 45, page 173, + chapter 6. + */ + +#include +#include +#include +#include +#include + +double +gsl_cdf_binomial_P (const unsigned int k, const double p, const unsigned int n) +{ + double P; + double a; + double b; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (k >= n) + { + P = 1.0; + } + else + { + a = (double) k + 1.0; + b = (double) n - k; + P = gsl_cdf_beta_Q (p, a, b); + } + + return P; +} + +double +gsl_cdf_binomial_Q (const unsigned int k, const double p, const unsigned int n) +{ + double Q; + double a; + double b; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (k >= n) + { + Q = 0.0; + } + else + { + a = (double) k + 1.0; + b = (double) n - k; + Q = gsl_cdf_beta_P (p, a, b); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/cauchy.c b/software/gsl-1.15/cdf/cauchy.c new file mode 100644 index 000000000..62c56d25d --- /dev/null +++ b/software/gsl-1.15/cdf/cauchy.c @@ -0,0 +1,59 @@ +/* cdf/cauchy.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_cauchy_P (const double x, const double a) +{ + double P; + double u = x / a; + + if (u > -1) + { + P = 0.5 + atan (u) / M_PI; + } + else + { + P = atan(-1/u) / M_PI; + } + + return P; +} + +double +gsl_cdf_cauchy_Q (const double x, const double a) +{ + double Q; + double u = x / a; + + if (u < 1) + { + Q = 0.5 - atan (u) / M_PI; + } + else + { + Q = atan(1/u) / M_PI; + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/cauchyinv.c b/software/gsl-1.15/cdf/cauchyinv.c new file mode 100644 index 000000000..a95281182 --- /dev/null +++ b/software/gsl-1.15/cdf/cauchyinv.c @@ -0,0 +1,75 @@ +/* cdf/cauchyinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_cauchy_Pinv (const double P, const double a) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + if (P > 0.5) + { + x = a * tan (M_PI * (P - 0.5)); + } + else + { + x = -a / tan (M_PI * P); + } + + return x; +} + +double +gsl_cdf_cauchy_Qinv (const double Q, const double a) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return GSL_NEGINF; + } + + if (Q > 0.5) + { + x = a * tan (M_PI * (0.5 - Q)); + } + else + { + x = a / tan (M_PI * Q); + } + + return x; +} diff --git a/software/gsl-1.15/cdf/chisq.c b/software/gsl-1.15/cdf/chisq.c new file mode 100644 index 000000000..11d918a4d --- /dev/null +++ b/software/gsl-1.15/cdf/chisq.c @@ -0,0 +1,34 @@ +/* cdf/cdf_chisq.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +double +gsl_cdf_chisq_P (const double x, const double nu) +{ + return gsl_cdf_gamma_P (x, nu / 2, 2.0); +} + +double +gsl_cdf_chisq_Q (const double x, const double nu) +{ + return gsl_cdf_gamma_Q (x, nu / 2, 2.0); +} diff --git a/software/gsl-1.15/cdf/chisqinv.c b/software/gsl-1.15/cdf/chisqinv.c new file mode 100644 index 000000000..2245173ce --- /dev/null +++ b/software/gsl-1.15/cdf/chisqinv.c @@ -0,0 +1,34 @@ +/* cdf/chisqinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +double +gsl_cdf_chisq_Pinv (const double P, const double nu) +{ + return gsl_cdf_gamma_Pinv (P, nu / 2, 2.0); +} + +double +gsl_cdf_chisq_Qinv (const double Q, const double nu) +{ + return gsl_cdf_gamma_Qinv (Q, nu / 2, 2.0); +} diff --git a/software/gsl-1.15/cdf/error.h b/software/gsl-1.15/cdf/error.h new file mode 100644 index 000000000..83db7bab8 --- /dev/null +++ b/software/gsl-1.15/cdf/error.h @@ -0,0 +1,4 @@ +/* CDF_ERROR: call the error handler, and return a NAN. */ + +#define CDF_ERROR(reason, gsl_errno) GSL_ERROR_VAL(reason, gsl_errno, GSL_NAN) + diff --git a/software/gsl-1.15/cdf/exponential.c b/software/gsl-1.15/cdf/exponential.c new file mode 100644 index 000000000..d6d822617 --- /dev/null +++ b/software/gsl-1.15/cdf/exponential.c @@ -0,0 +1,59 @@ +/* cdf/exponential.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The exponential distribution has the form + + p(x) dx = exp(-x/mu) dx/mu + + for x = 0 ... +infty */ + +double +gsl_cdf_exponential_P (const double x, const double mu) +{ + if (x < 0) + { + return 0; + } + else + { + double P = -expm1 (-x / mu); + + return P; + } +} + +double +gsl_cdf_exponential_Q (const double x, const double mu) +{ + if (x < 0) + { + return 1; + } + else + { + double Q = exp (-x / mu); + + return Q; + } +} diff --git a/software/gsl-1.15/cdf/exponentialinv.c b/software/gsl-1.15/cdf/exponentialinv.c new file mode 100644 index 000000000..56d375c99 --- /dev/null +++ b/software/gsl-1.15/cdf/exponentialinv.c @@ -0,0 +1,39 @@ +/* cdf/exponentialinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_exponential_Pinv (const double P, const double mu) +{ + double x = -mu * log1p (-P); + + return x; +} + +double +gsl_cdf_exponential_Qinv (const double Q, const double mu) +{ + double x = -mu * log (Q); + + return x; +} diff --git a/software/gsl-1.15/cdf/exppow.c b/software/gsl-1.15/cdf/exppow.c new file mode 100644 index 000000000..a80bb7fbe --- /dev/null +++ b/software/gsl-1.15/cdf/exppow.c @@ -0,0 +1,70 @@ +/* cdf/exppow.c + * + * Copyright (C) 2004 Giulio Bottazzi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The exponential power density is parametrized according to + + p(x) dx = (1/(2 a Gamma(1 + 1/b))) * exp(-|x/a|^b) dx + + so that the distribution reads + + / x<0 0.5 - Gamma_inc_P(1/b,|x/a|^b) + P(x) = | x=0 0.5 + \ x>0 0.5 + Gamma_inc_P(1/b,|x/a|^b) + + + for x in (-infty,+infty) */ + +double +gsl_cdf_exppow_P (const double x, const double a, const double b) +{ + const double u = x / a; + + if (u < 0) + { + double P = 0.5 * gsl_sf_gamma_inc_Q (1.0 / b, pow (-u, b)); + return P; + } + else + { + double P = 0.5 * (1.0 + gsl_sf_gamma_inc_P (1.0 / b, pow (u, b))); + return P; + } +} + +double +gsl_cdf_exppow_Q (const double x, const double a, const double b) +{ + const double u = x / a; + + if (u < 0) + { + double Q = 0.5 * (1.0 + gsl_sf_gamma_inc_P (1.0 / b, pow (-u, b))); + return Q; + } + else + { + double Q = 0.5 * gsl_sf_gamma_inc_Q (1.0 / b, pow (u, b)); + return Q; + } +} diff --git a/software/gsl-1.15/cdf/fdist.c b/software/gsl-1.15/cdf/fdist.c new file mode 100644 index 000000000..f1ab0b6b2 --- /dev/null +++ b/software/gsl-1.15/cdf/fdist.c @@ -0,0 +1,81 @@ +/* cdf/fdist.c + * + * Copyright (C) 2002 Przemyslaw Sliwa and Jason H. Stover. + * Copyright (C) 2006, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "beta_inc.c" + +/* + * Lower tail. + */ + +double +gsl_cdf_fdist_P (const double x, const double nu1, const double nu2) +{ + double P; + double r = nu2 / nu1; + + if (x < r) + { + double u = x / (r + x); + + P = beta_inc_AXPY (1.0, 0.0, nu1 / 2.0, nu2 / 2.0, u); + } + else + { + double u = r / (r + x); + + P = beta_inc_AXPY (-1.0, 1.0, nu2 / 2.0, nu1 / 2.0, u); + } + + return P; +} + +/* + * Upper tail. + */ + +double +gsl_cdf_fdist_Q (const double x, const double nu1, const double nu2) +{ + double Q; + double r = nu2 / nu1; + + if (x < r) + { + double u = x / (r + x); + + Q = beta_inc_AXPY (-1.0, 1.0, nu1 / 2.0, nu2 / 2.0, u); + } + else + { + double u = r / (r + x); + + Q = beta_inc_AXPY (1.0, 0.0, nu2 / 2.0, nu1 / 2.0, u); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/fdistinv.c b/software/gsl-1.15/cdf/fdistinv.c new file mode 100644 index 000000000..7c53a3a3d --- /dev/null +++ b/software/gsl-1.15/cdf/fdistinv.c @@ -0,0 +1,104 @@ +/* cdf/fdistinv.c + * + * Copyright (C) 2002 Przemyslaw Sliwa and Jason H. Stover. + * Copyright (C) 2006, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include + +#include "error.h" + +double +gsl_cdf_fdist_Pinv (const double P, const double nu1, const double nu2) +{ + double result; + double y; + + if (P < 0.0) + { + CDF_ERROR ("P < 0.0", GSL_EDOM); + } + if (P > 1.0) + { + CDF_ERROR ("P > 1.0", GSL_EDOM); + } + if (nu1 < 1.0) + { + CDF_ERROR ("nu1 < 1", GSL_EDOM); + } + if (nu2 < 1.0) + { + CDF_ERROR ("nu2 < 1", GSL_EDOM); + } + + if (P < 0.5) + { + y = gsl_cdf_beta_Pinv (P, nu1 / 2.0, nu2 / 2.0); + + result = nu2 * y / (nu1 * (1.0 - y)); + } + else + { + y = gsl_cdf_beta_Qinv (P, nu2 / 2.0, nu1 / 2.0); + + result = nu2 * (1 - y) / (nu1 * y); + } + + return result; +} + +double +gsl_cdf_fdist_Qinv (const double Q, const double nu1, const double nu2) +{ + double result; + double y; + + if (Q < 0.0) + { + CDF_ERROR ("Q < 0.0", GSL_EDOM); + } + if (Q > 1.0) + { + CDF_ERROR ("Q > 1.0", GSL_EDOM); + } + if (nu1 < 1.0) + { + CDF_ERROR ("nu1 < 1", GSL_EDOM); + } + if (nu2 < 1.0) + { + CDF_ERROR ("nu2 < 1", GSL_EDOM); + } + + if (Q > 0.5) + { + y = gsl_cdf_beta_Qinv (Q, nu1 / 2.0, nu2 / 2.0); + + result = nu2 * y / (nu1 * (1.0 - y)); + } + else + { + y = gsl_cdf_beta_Pinv (Q, nu2 / 2.0, nu1 / 2.0); + + result = nu2 * (1 - y) / (nu1 * y); + } + + return result; +} diff --git a/software/gsl-1.15/cdf/flat.c b/software/gsl-1.15/cdf/flat.c new file mode 100644 index 000000000..d4410e2b0 --- /dev/null +++ b/software/gsl-1.15/cdf/flat.c @@ -0,0 +1,65 @@ +/* cdf/flat.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_flat_P (const double x, const double a, const double b) +{ + double P; + + if (x < a) + { + P = 0; + } + else if (x > b) + { + P = 1; + } + else + { + P = (x-a)/(b-a); + } + + return P; +} + +double +gsl_cdf_flat_Q (const double x, const double a, const double b) +{ + double Q; + + if (x < a) + { + Q = 1; + } + else if (x > b) + { + Q = 0; + } + else + { + Q = (b-x)/(b-a); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/flatinv.c b/software/gsl-1.15/cdf/flatinv.c new file mode 100644 index 000000000..340ad9e07 --- /dev/null +++ b/software/gsl-1.15/cdf/flatinv.c @@ -0,0 +1,59 @@ +/* cdf/flatinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +double +gsl_cdf_flat_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return b; + } + else if (P == 0.0) + { + return a; + } + + x = (1 - P) * a + P * b; + + return x; +} + +double +gsl_cdf_flat_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 0.0) + { + return b; + } + else if (Q == 1.0) + { + return a; + } + + x = Q * a + (1 - Q) * b; + + return x; +} diff --git a/software/gsl-1.15/cdf/gamma.c b/software/gsl-1.15/cdf/gamma.c new file mode 100644 index 000000000..f6748574b --- /dev/null +++ b/software/gsl-1.15/cdf/gamma.c @@ -0,0 +1,74 @@ +/* cdf/cdf_gamma.c + * + * Copyright (C) 2003 Jason Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Author: J. Stover + */ + +#include +#include +#include +#include +#include + +double +gsl_cdf_gamma_P (const double x, const double a, const double b) +{ + double P; + double y = x / b; + + if (x <= 0.0) + { + return 0.0; + } + + if (y > a) + { + P = 1 - gsl_sf_gamma_inc_Q (a, y); + } + else + { + P = gsl_sf_gamma_inc_P (a, y); + } + + return P; +} + +double +gsl_cdf_gamma_Q (const double x, const double a, const double b) +{ + double Q; + double y = x / b; + + if (x <= 0.0) + { + return 1.0; + } + + if (y < a) + { + Q = 1 - gsl_sf_gamma_inc_P (a, y); + } + else + { + Q = gsl_sf_gamma_inc_Q (a, y); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/gammainv.c b/software/gsl-1.15/cdf/gammainv.c new file mode 100644 index 000000000..84815fcd5 --- /dev/null +++ b/software/gsl-1.15/cdf/gammainv.c @@ -0,0 +1,195 @@ +/* cdf/gammainv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include + +double +gsl_cdf_gamma_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return 0.0; + } + + /* Consider, small, large and intermediate cases separately. The + boundaries at 0.05 and 0.95 have not been optimised, but seem ok + for an initial approximation. + + BJG: These approximations aren't really valid, the relevant + criterion is P*gamma(a+1) < 1. Need to rework these routines and + use a single bisection style solver for all the inverse + functions. + */ + + if (P < 0.05) + { + double x0 = exp ((gsl_sf_lngamma (a) + log (P)) / a); + x = x0; + } + else if (P > 0.95) + { + double x0 = -log1p (-P) + gsl_sf_lngamma (a); + x = x0; + } + else + { + double xg = gsl_cdf_ugaussian_Pinv (P); + double x0 = (xg < -0.5*sqrt (a)) ? a : sqrt (a) * xg + a; + x = x0; + } + + /* Use Lagrange's interpolation for E(x)/phi(x0) to work backwards + to an improved value of x (Abramowitz & Stegun, 3.6.6) + + where E(x)=P-integ(phi(u),u,x0,x) and phi(u) is the pdf. + */ + + { + double lambda, dP, phi; + unsigned int n = 0; + + start: + dP = P - gsl_cdf_gamma_P (x, a, 1.0); + phi = gsl_ran_gamma_pdf (x, a, 1.0); + + if (dP == 0.0 || n++ > 32) + goto end; + + lambda = dP / GSL_MAX (2 * fabs (dP / x), phi); + + { + double step0 = lambda; + double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; + + double step = step0; + if (fabs (step1) < 0.5 * fabs (step0)) + step += step1; + + if (x + step > 0) + x += step; + else + { + x /= 2.0; + } + + if (fabs (step0) > 1e-10 * x || fabs(step0 * phi) > 1e-10 * P) + goto start; + } + + end: + if (fabs(dP) > GSL_SQRT_DBL_EPSILON * P) + { + GSL_ERROR_VAL("inverse failed to converge", GSL_EFAILED, GSL_NAN); + } + + return b * x; + } +} + +double +gsl_cdf_gamma_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 1.0) + { + return 0.0; + } + else if (Q == 0.0) + { + return GSL_POSINF; + } + + /* Consider, small, large and intermediate cases separately. The + boundaries at 0.05 and 0.95 have not been optimised, but seem ok + for an initial approximation. */ + + if (Q < 0.05) + { + double x0 = -log (Q) + gsl_sf_lngamma (a); + x = x0; + } + else if (Q > 0.95) + { + double x0 = exp ((gsl_sf_lngamma (a) + log1p (-Q)) / a); + x = x0; + } + else + { + double xg = gsl_cdf_ugaussian_Qinv (Q); + double x0 = (xg < -0.5*sqrt (a)) ? a : sqrt (a) * xg + a; + x = x0; + } + + /* Use Lagrange's interpolation for E(x)/phi(x0) to work backwards + to an improved value of x (Abramowitz & Stegun, 3.6.6) + + where E(x)=P-integ(phi(u),u,x0,x) and phi(u) is the pdf. + */ + + { + double lambda, dQ, phi; + unsigned int n = 0; + + start: + dQ = Q - gsl_cdf_gamma_Q (x, a, 1.0); + phi = gsl_ran_gamma_pdf (x, a, 1.0); + + if (dQ == 0.0 || n++ > 32) + goto end; + + lambda = -dQ / GSL_MAX (2 * fabs (dQ / x), phi); + + { + double step0 = lambda; + double step1 = -((a - 1) / x - 1) * lambda * lambda / 4.0; + + double step = step0; + if (fabs (step1) < 0.5 * fabs (step0)) + step += step1; + + if (x + step > 0) + x += step; + else + { + x /= 2.0; + } + + if (fabs (step0) > 1e-10 * x) + goto start; + } + + } + +end: + return b * x; +} diff --git a/software/gsl-1.15/cdf/gauss.c b/software/gsl-1.15/cdf/gauss.c new file mode 100644 index 000000000..990de6f0c --- /dev/null +++ b/software/gsl-1.15/cdf/gauss.c @@ -0,0 +1,351 @@ +/* cdf/gauss.c + * + * Copyright (C) 2002, 2004 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Computes the cumulative distribution function for the Gaussian + * distribution using a rational function approximation. The + * computation is for the standard Normal distribution, i.e., mean 0 + * and standard deviation 1. If you want to compute Pr(X < t) for a + * Gaussian random variable X with non-zero mean m and standard + * deviation sd not equal to 1, find gsl_cdf_ugaussian ((t-m)/sd). + * This approximation is accurate to at least double precision. The + * accuracy was verified with a pari-gp script. The largest error + * found was about 1.4E-20. The coefficients were derived by Cody. + * + * References: + * + * W.J. Cody. "Rational Chebyshev Approximations for the Error + * Function," Mathematics of Computation, v23 n107 1969, 631-637. + * + * W. Fraser, J.F Hart. "On the Computation of Rational Approximations + * to Continuous Functions," Communications of the ACM, v5 1962. + * + * W.J. Kennedy Jr., J.E. Gentle. "Statistical Computing." Marcel Dekker. 1980. + * + * + */ + +#include +#include +#include +#include + +#ifndef M_1_SQRT2PI +#define M_1_SQRT2PI (M_2_SQRTPI * M_SQRT1_2 / 2.0) +#endif + +#define SQRT32 (4.0 * M_SQRT2) + +/* + * IEEE double precision dependent constants. + * + * GAUSS_EPSILON: Smallest positive value such that + * gsl_cdf_gaussian(x) > 0.5. + * GAUSS_XUPPER: Largest value x such that gsl_cdf_gaussian(x) < 1.0. + * GAUSS_XLOWER: Smallest value x such that gsl_cdf_gaussian(x) > 0.0. + */ + +#define GAUSS_EPSILON (GSL_DBL_EPSILON / 2) +#define GAUSS_XUPPER (8.572) +#define GAUSS_XLOWER (-37.519) + +#define GAUSS_SCALE (16.0) + +static double +get_del (double x, double rational) +{ + double xsq = 0.0; + double del = 0.0; + double result = 0.0; + + xsq = floor (x * GAUSS_SCALE) / GAUSS_SCALE; + del = (x - xsq) * (x + xsq); + del *= 0.5; + + result = exp (-0.5 * xsq * xsq) * exp (-1.0 * del) * rational; + + return result; +} + +/* + * Normal cdf for fabs(x) < 0.66291 + */ +static double +gauss_small (const double x) +{ + unsigned int i; + double result = 0.0; + double xsq; + double xnum; + double xden; + + const double a[5] = { + 2.2352520354606839287, + 161.02823106855587881, + 1067.6894854603709582, + 18154.981253343561249, + 0.065682337918207449113 + }; + const double b[4] = { + 47.20258190468824187, + 976.09855173777669322, + 10260.932208618978205, + 45507.789335026729956 + }; + + xsq = x * x; + xnum = a[4] * xsq; + xden = xsq; + + for (i = 0; i < 3; i++) + { + xnum = (xnum + a[i]) * xsq; + xden = (xden + b[i]) * xsq; + } + + result = x * (xnum + a[3]) / (xden + b[3]); + + return result; +} + +/* + * Normal cdf for 0.66291 < fabs(x) < sqrt(32). + */ +static double +gauss_medium (const double x) +{ + unsigned int i; + double temp = 0.0; + double result = 0.0; + double xnum; + double xden; + double absx; + + const double c[9] = { + 0.39894151208813466764, + 8.8831497943883759412, + 93.506656132177855979, + 597.27027639480026226, + 2494.5375852903726711, + 6848.1904505362823326, + 11602.651437647350124, + 9842.7148383839780218, + 1.0765576773720192317e-8 + }; + const double d[8] = { + 22.266688044328115691, + 235.38790178262499861, + 1519.377599407554805, + 6485.558298266760755, + 18615.571640885098091, + 34900.952721145977266, + 38912.003286093271411, + 19685.429676859990727 + }; + + absx = fabs (x); + + xnum = c[8] * absx; + xden = absx; + + for (i = 0; i < 7; i++) + { + xnum = (xnum + c[i]) * absx; + xden = (xden + d[i]) * absx; + } + + temp = (xnum + c[7]) / (xden + d[7]); + + result = get_del (x, temp); + + return result; +} + +/* + * Normal cdf for + * {sqrt(32) < x < GAUSS_XUPPER} union { GAUSS_XLOWER < x < -sqrt(32) }. + */ +static double +gauss_large (const double x) +{ + int i; + double result; + double xsq; + double temp; + double xnum; + double xden; + double absx; + + const double p[6] = { + 0.21589853405795699, + 0.1274011611602473639, + 0.022235277870649807, + 0.001421619193227893466, + 2.9112874951168792e-5, + 0.02307344176494017303 + }; + const double q[5] = { + 1.28426009614491121, + 0.468238212480865118, + 0.0659881378689285515, + 0.00378239633202758244, + 7.29751555083966205e-5 + }; + + absx = fabs (x); + xsq = 1.0 / (x * x); + xnum = p[5] * xsq; + xden = xsq; + + for (i = 0; i < 4; i++) + { + xnum = (xnum + p[i]) * xsq; + xden = (xden + q[i]) * xsq; + } + + temp = xsq * (xnum + p[4]) / (xden + q[4]); + temp = (M_1_SQRT2PI - temp) / absx; + + result = get_del (x, temp); + + return result; +} + +double +gsl_cdf_ugaussian_P (const double x) +{ + double result; + double absx = fabs (x); + + if (absx < GAUSS_EPSILON) + { + result = 0.5; + return result; + } + else if (absx < 0.66291) + { + result = 0.5 + gauss_small (x); + return result; + } + else if (absx < SQRT32) + { + result = gauss_medium (x); + + if (x > 0.0) + { + result = 1.0 - result; + } + + return result; + } + else if (x > GAUSS_XUPPER) + { + result = 1.0; + return result; + } + else if (x < GAUSS_XLOWER) + { + result = 0.0; + return result; + } + else + { + result = gauss_large (x); + + if (x > 0.0) + { + result = 1.0 - result; + } + } + + return result; +} + +double +gsl_cdf_ugaussian_Q (const double x) +{ + double result; + double absx = fabs (x); + + if (absx < GAUSS_EPSILON) + { + result = 0.5; + return result; + } + else if (absx < 0.66291) + { + result = gauss_small (x); + + if (x < 0.0) + { + result = fabs (result) + 0.5; + } + else + { + result = 0.5 - result; + } + + return result; + } + else if (absx < SQRT32) + { + result = gauss_medium (x); + + if (x < 0.0) + { + result = 1.0 - result; + } + + return result; + } + else if (x > -(GAUSS_XLOWER)) + { + result = 0.0; + return result; + } + else if (x < -(GAUSS_XUPPER)) + { + result = 1.0; + return result; + } + else + { + result = gauss_large (x); + + if (x < 0.0) + { + result = 1.0 - result; + } + + } + + return result; +} + +double +gsl_cdf_gaussian_P (const double x, const double sigma) +{ + return gsl_cdf_ugaussian_P (x / sigma); +} + +double +gsl_cdf_gaussian_Q (const double x, const double sigma) +{ + return gsl_cdf_ugaussian_Q (x / sigma); +} diff --git a/software/gsl-1.15/cdf/gaussinv.c b/software/gsl-1.15/cdf/gaussinv.c new file mode 100644 index 000000000..5376b757f --- /dev/null +++ b/software/gsl-1.15/cdf/gaussinv.c @@ -0,0 +1,202 @@ +/* cdf/inverse_normal.c + * + * Copyright (C) 2002 Przemyslaw Sliwa and Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Computes the inverse normal cumulative distribution function + * according to the algorithm shown in + * + * Wichura, M.J. (1988). + * Algorithm AS 241: The Percentage Points of the Normal Distribution. + * Applied Statistics, 37, 477-484. + */ + +#include +#include +#include +#include + +#include "rat_eval.h" + +static double +small (double q) +{ + const double a[8] = { 3.387132872796366608, 133.14166789178437745, + 1971.5909503065514427, 13731.693765509461125, + 45921.953931549871457, 67265.770927008700853, + 33430.575583588128105, 2509.0809287301226727 + }; + + const double b[8] = { 1.0, 42.313330701600911252, + 687.1870074920579083, 5394.1960214247511077, + 21213.794301586595867, 39307.89580009271061, + 28729.085735721942674, 5226.495278852854561 + }; + + double r = 0.180625 - q * q; + + double x = q * rat_eval (a, 8, b, 8, r); + + return x; +} + +static double +intermediate (double r) +{ + const double a[] = { 1.42343711074968357734, 4.6303378461565452959, + 5.7694972214606914055, 3.64784832476320460504, + 1.27045825245236838258, 0.24178072517745061177, + 0.0227238449892691845833, 7.7454501427834140764e-4 + }; + + const double b[] = { 1.0, 2.05319162663775882187, + 1.6763848301838038494, 0.68976733498510000455, + 0.14810397642748007459, 0.0151986665636164571966, + 5.475938084995344946e-4, 1.05075007164441684324e-9 + }; + + double x = rat_eval (a, 8, b, 8, (r - 1.6)); + + return x; +} + +static double +tail (double r) +{ + const double a[] = { 6.6579046435011037772, 5.4637849111641143699, + 1.7848265399172913358, 0.29656057182850489123, + 0.026532189526576123093, 0.0012426609473880784386, + 2.71155556874348757815e-5, 2.01033439929228813265e-7 + }; + + const double b[] = { 1.0, 0.59983220655588793769, + 0.13692988092273580531, 0.0148753612908506148525, + 7.868691311456132591e-4, 1.8463183175100546818e-5, + 1.4215117583164458887e-7, 2.04426310338993978564e-15 + }; + + double x = rat_eval (a, 8, b, 8, (r - 5.0)); + + return x; +} + +double +gsl_cdf_ugaussian_Pinv (const double P) +{ + double r, x, pp; + + double dP = P - 0.5; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + if (fabs (dP) <= 0.425) + { + x = small (dP); + + return x; + } + + pp = (P < 0.5) ? P : 1.0 - P; + + r = sqrt (-log (pp)); + + if (r <= 5.0) + { + x = intermediate (r); + } + else + { + x = tail (r); + } + + if (P < 0.5) + { + return -x; + } + else + { + return x; + } + +} + +double +gsl_cdf_ugaussian_Qinv (const double Q) +{ + double r, x, pp; + + double dQ = Q - 0.5; + + if (Q == 1.0) + { + return GSL_NEGINF; + } + else if (Q == 0.0) + { + return GSL_POSINF; + } + + if (fabs (dQ) <= 0.425) + { + x = small (dQ); + + return -x; + } + + pp = (Q < 0.5) ? Q : 1.0 - Q; + + r = sqrt (-log (pp)); + + if (r <= 5.0) + { + x = intermediate (r); + } + else + { + x = tail (r); + } + + if (Q < 0.5) + { + return x; + } + else + { + return -x; + } +} + + +double +gsl_cdf_gaussian_Pinv (const double P, const double sigma) +{ + return sigma * gsl_cdf_ugaussian_Pinv (P); +} + +double +gsl_cdf_gaussian_Qinv (const double Q, const double sigma) +{ + return sigma * gsl_cdf_ugaussian_Qinv (Q); +} diff --git a/software/gsl-1.15/cdf/geometric.c b/software/gsl-1.15/cdf/geometric.c new file mode 100644 index 000000000..d9b7744da --- /dev/null +++ b/software/gsl-1.15/cdf/geometric.c @@ -0,0 +1,90 @@ +/* cdf/geometric.c + * + * Copyright (C) 2004 Jason H. Stover. + * Copyright (C) 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/* Pr (X <= k), i.e., the probability of n or fewer failures until the + first success. */ + +double +gsl_cdf_geometric_P (const unsigned int k, const double p) +{ + double P, a, q; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (k < 1) + { + return 0.0; + } + + q = 1.0 - p; + a = (double) k; + + if (p < 0.5) + { + P = -expm1 (a * log1p (-p)); + } + else + { + P = 1.0 - pow (q, a); + } + + return P; +} + +double +gsl_cdf_geometric_Q (const unsigned int k, const double p) +{ + double Q, a, q; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (k < 1) + { + return 1.0; + } + + q = 1.0 - p; + a = (double) k; + + if (p < 0.5) + { + Q = exp (a * log1p (-p)); + } + else + { + Q = pow (q, a); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/gsl_cdf.h b/software/gsl-1.15/cdf/gsl_cdf.h new file mode 100644 index 000000000..1a4e39b8c --- /dev/null +++ b/software/gsl-1.15/cdf/gsl_cdf.h @@ -0,0 +1,170 @@ +/* cdf/gsl_cdf.h + * + * Copyright (C) 2002 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* Author: J. Stover */ + +#ifndef __GSL_CDF_H__ +#define __GSL_CDF_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_cdf_ugaussian_P (const double x); +double gsl_cdf_ugaussian_Q (const double x); + +double gsl_cdf_ugaussian_Pinv (const double P); +double gsl_cdf_ugaussian_Qinv (const double Q); + +double gsl_cdf_gaussian_P (const double x, const double sigma); +double gsl_cdf_gaussian_Q (const double x, const double sigma); + +double gsl_cdf_gaussian_Pinv (const double P, const double sigma); +double gsl_cdf_gaussian_Qinv (const double Q, const double sigma); + +double gsl_cdf_gamma_P (const double x, const double a, const double b); +double gsl_cdf_gamma_Q (const double x, const double a, const double b); + +double gsl_cdf_gamma_Pinv (const double P, const double a, const double b); +double gsl_cdf_gamma_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_cauchy_P (const double x, const double a); +double gsl_cdf_cauchy_Q (const double x, const double a); + +double gsl_cdf_cauchy_Pinv (const double P, const double a); +double gsl_cdf_cauchy_Qinv (const double Q, const double a); + +double gsl_cdf_laplace_P (const double x, const double a); +double gsl_cdf_laplace_Q (const double x, const double a); + +double gsl_cdf_laplace_Pinv (const double P, const double a); +double gsl_cdf_laplace_Qinv (const double Q, const double a); + +double gsl_cdf_rayleigh_P (const double x, const double sigma); +double gsl_cdf_rayleigh_Q (const double x, const double sigma); + +double gsl_cdf_rayleigh_Pinv (const double P, const double sigma); +double gsl_cdf_rayleigh_Qinv (const double Q, const double sigma); + +double gsl_cdf_chisq_P (const double x, const double nu); +double gsl_cdf_chisq_Q (const double x, const double nu); + +double gsl_cdf_chisq_Pinv (const double P, const double nu); +double gsl_cdf_chisq_Qinv (const double Q, const double nu); + +double gsl_cdf_exponential_P (const double x, const double mu); +double gsl_cdf_exponential_Q (const double x, const double mu); + +double gsl_cdf_exponential_Pinv (const double P, const double mu); +double gsl_cdf_exponential_Qinv (const double Q, const double mu); + +double gsl_cdf_exppow_P (const double x, const double a, const double b); +double gsl_cdf_exppow_Q (const double x, const double a, const double b); + +double gsl_cdf_tdist_P (const double x, const double nu); +double gsl_cdf_tdist_Q (const double x, const double nu); + +double gsl_cdf_tdist_Pinv (const double P, const double nu); +double gsl_cdf_tdist_Qinv (const double Q, const double nu); + +double gsl_cdf_fdist_P (const double x, const double nu1, const double nu2); +double gsl_cdf_fdist_Q (const double x, const double nu1, const double nu2); + +double gsl_cdf_fdist_Pinv (const double P, const double nu1, const double nu2); +double gsl_cdf_fdist_Qinv (const double Q, const double nu1, const double nu2); + +double gsl_cdf_beta_P (const double x, const double a, const double b); +double gsl_cdf_beta_Q (const double x, const double a, const double b); + +double gsl_cdf_beta_Pinv (const double P, const double a, const double b); +double gsl_cdf_beta_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_flat_P (const double x, const double a, const double b); +double gsl_cdf_flat_Q (const double x, const double a, const double b); + +double gsl_cdf_flat_Pinv (const double P, const double a, const double b); +double gsl_cdf_flat_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_lognormal_P (const double x, const double zeta, const double sigma); +double gsl_cdf_lognormal_Q (const double x, const double zeta, const double sigma); + +double gsl_cdf_lognormal_Pinv (const double P, const double zeta, const double sigma); +double gsl_cdf_lognormal_Qinv (const double Q, const double zeta, const double sigma); + +double gsl_cdf_gumbel1_P (const double x, const double a, const double b); +double gsl_cdf_gumbel1_Q (const double x, const double a, const double b); + +double gsl_cdf_gumbel1_Pinv (const double P, const double a, const double b); +double gsl_cdf_gumbel1_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_gumbel2_P (const double x, const double a, const double b); +double gsl_cdf_gumbel2_Q (const double x, const double a, const double b); + +double gsl_cdf_gumbel2_Pinv (const double P, const double a, const double b); +double gsl_cdf_gumbel2_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_weibull_P (const double x, const double a, const double b); +double gsl_cdf_weibull_Q (const double x, const double a, const double b); + +double gsl_cdf_weibull_Pinv (const double P, const double a, const double b); +double gsl_cdf_weibull_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_pareto_P (const double x, const double a, const double b); +double gsl_cdf_pareto_Q (const double x, const double a, const double b); + +double gsl_cdf_pareto_Pinv (const double P, const double a, const double b); +double gsl_cdf_pareto_Qinv (const double Q, const double a, const double b); + +double gsl_cdf_logistic_P (const double x, const double a); +double gsl_cdf_logistic_Q (const double x, const double a); + +double gsl_cdf_logistic_Pinv (const double P, const double a); +double gsl_cdf_logistic_Qinv (const double Q, const double a); + +double gsl_cdf_binomial_P (const unsigned int k, const double p, const unsigned int n); +double gsl_cdf_binomial_Q (const unsigned int k, const double p, const unsigned int n); + +double gsl_cdf_poisson_P (const unsigned int k, const double mu); +double gsl_cdf_poisson_Q (const unsigned int k, const double mu); + +double gsl_cdf_geometric_P (const unsigned int k, const double p); +double gsl_cdf_geometric_Q (const unsigned int k, const double p); + +double gsl_cdf_negative_binomial_P (const unsigned int k, const double p, const double n); +double gsl_cdf_negative_binomial_Q (const unsigned int k, const double p, const double n); + +double gsl_cdf_pascal_P (const unsigned int k, const double p, const unsigned int n); +double gsl_cdf_pascal_Q (const unsigned int k, const double p, const unsigned int n); + +double gsl_cdf_hypergeometric_P (const unsigned int k, const unsigned int n1, + const unsigned int n2, const unsigned int t); +double gsl_cdf_hypergeometric_Q (const unsigned int k, const unsigned int n1, + const unsigned int n2, const unsigned int t); + +__END_DECLS + +#endif /* __GSL_CDF_H__ */ diff --git a/software/gsl-1.15/cdf/gumbel1.c b/software/gsl-1.15/cdf/gumbel1.c new file mode 100644 index 000000000..d4e50fc0f --- /dev/null +++ b/software/gsl-1.15/cdf/gumbel1.c @@ -0,0 +1,50 @@ +/* cdf/gumbel1.c + * + * Copyright (C) 2003, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_gumbel1_P (const double x, const double a, const double b) +{ + double u = a * x - log (b); + double P = exp (-exp (-u)); + return P; +} + +double +gsl_cdf_gumbel1_Q (const double x, const double a, const double b) +{ + double u = a * x - log (b); + double Q; + double P = exp (-exp (-u)); + + if (P < 0.5) + { + Q = 1 - P; + } + else + { + Q = -expm1 (-exp (-u)); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/gumbel1inv.c b/software/gsl-1.15/cdf/gumbel1inv.c new file mode 100644 index 000000000..866cbeb01 --- /dev/null +++ b/software/gsl-1.15/cdf/gumbel1inv.c @@ -0,0 +1,61 @@ +/* cdf/gumbel1inv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_gumbel1_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + x = log(-b / log(P)) / a; + + return x; +} + +double +gsl_cdf_gumbel1_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return GSL_NEGINF; + } + + x = log(-b / log1p(-Q)) / a; + + return x; +} diff --git a/software/gsl-1.15/cdf/gumbel2.c b/software/gsl-1.15/cdf/gumbel2.c new file mode 100644 index 000000000..eacbe5e1a --- /dev/null +++ b/software/gsl-1.15/cdf/gumbel2.c @@ -0,0 +1,59 @@ +/* cdf/gumbel2.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_gumbel2_P (const double x, const double a, const double b) +{ + double P; + + if (x == 0) + { + P = 0; + } + else + { + double u = pow (x, a); + P = exp (-b / u); + } + + return P; +} + +double +gsl_cdf_gumbel2_Q (const double x, const double a, const double b) +{ + double Q; + + if (x == 0) + { + Q = 1; + } + else + { + double u = pow (x, a); + Q = -expm1 (-b / u); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/gumbel2inv.c b/software/gsl-1.15/cdf/gumbel2inv.c new file mode 100644 index 000000000..317306fd8 --- /dev/null +++ b/software/gsl-1.15/cdf/gumbel2inv.c @@ -0,0 +1,61 @@ +/* cdf/gumbel2inv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_gumbel2_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return 0.0; + } + + x = pow(b / (-log(P)), 1/a); + + return x; +} + +double +gsl_cdf_gumbel2_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return 0.0; + } + + x = pow(b / (-log1p(-Q)), 1/a); + + return x; +} diff --git a/software/gsl-1.15/cdf/hypergeometric.c b/software/gsl-1.15/cdf/hypergeometric.c new file mode 100644 index 000000000..b51f367bd --- /dev/null +++ b/software/gsl-1.15/cdf/hypergeometric.c @@ -0,0 +1,183 @@ +/* cdf/hypergeometric.c + * + * Copyright (C) 2004 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Computes the cumulative distribution function for a hypergeometric + * random variable. A hypergeometric random variable X is the number + * of elements of type 1 in a sample of size t, drawn from a population + * of size n1 + n2, in which n1 are of type 1 and n2 are of type 2. + * + * This algorithm computes Pr( X <= k ) by summing the terms from + * the mass function, Pr( X = k ). + * + * References: + * + * T. Wu. An accurate computation of the hypergeometric distribution + * function. ACM Transactions on Mathematical Software. Volume 19, number 1, + * March 1993. + * This algorithm is not used, since it requires factoring the + * numerator and denominator, then cancelling. It is more accurate + * than the algorithm used here, but the cancellation requires more + * time than the algorithm used here. + * + * W. Feller. An Introduction to Probability Theory and Its Applications, + * third edition. 1968. Chapter 2, section 6. + */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +static double +lower_tail (const unsigned int k, const unsigned int n1, + const unsigned int n2, const unsigned int t) +{ + double relerr; + int i = k; + double s, P; + + s = gsl_ran_hypergeometric_pdf (i, n1, n2, t); + P = s; + + while (i > 0) + { + double factor = + (i / (n1 - i + 1.0)) * ((n2 + i - t) / (t - i + 1.0)); + s *= factor; + P += s; + relerr = s / P; + if (relerr < GSL_DBL_EPSILON) + break; + i--; + } + + return P; +} + +static double +upper_tail (const unsigned int k, const unsigned int n1, + const unsigned int n2, const unsigned int t) +{ + double relerr; + unsigned int i = k + 1; + double s, Q; + + s = gsl_ran_hypergeometric_pdf (i, n1, n2, t); + Q = s; + + while (i < t) + { + double factor = + ((n1 - i) / (i + 1.0)) * ((t - i) / (n2 + i + 1.0 - t)); + s *= factor; + Q += s; + relerr = s / Q; + if (relerr < GSL_DBL_EPSILON) + break; + i++; + } + + return Q; +} + + + + +/* + * Pr (X <= k) + */ +double +gsl_cdf_hypergeometric_P (const unsigned int k, + const unsigned int n1, + const unsigned int n2, const unsigned int t) +{ + double P; + + if (t > (n1 + n2)) + { + CDF_ERROR ("t larger than population size", GSL_EDOM); + } + else if (k >= n1 || k >= t) + { + P = 1.0; + } + else if (k < 0.0) + { + P = 0.0; + } + else + { + double midpoint = ((double)t * n1) / ((double)n1 + (double)n2); + + if (k >= midpoint) + { + P = 1 - upper_tail (k, n1, n2, t); + } + else + { + P = lower_tail (k, n1, n2, t); + } + } + + return P; +} + +/* + * Pr (X > k) + */ +double +gsl_cdf_hypergeometric_Q (const unsigned int k, + const unsigned int n1, + const unsigned int n2, const unsigned int t) +{ + double Q; + + if (t > (n1 + n2)) + { + CDF_ERROR ("t larger than population size", GSL_EDOM); + } + else if (k >= n1 || k >= t) + { + Q = 0.0; + } + else if (k < 0.0) + { + Q = 1.0; + } + else + { + double midpoint = ((double)t * n1) / ((double)n1 + (double)n2); + + if (k < midpoint) + { + Q = 1 - lower_tail (k, n1, n2, t); + } + else + { + Q = upper_tail (k, n1, n2, t); + } + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/laplace.c b/software/gsl-1.15/cdf/laplace.c new file mode 100644 index 000000000..5cf37d304 --- /dev/null +++ b/software/gsl-1.15/cdf/laplace.c @@ -0,0 +1,59 @@ +/* cdf/laplace.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_laplace_P (const double x, const double a) +{ + double P; + double u = x / a; + + if (u > 0) + { + P = 0.5 + 0.5*(1 - exp(-u)) ; + } + else + { + P = 0.5 * exp(u); + } + + return P; +} + +double +gsl_cdf_laplace_Q (const double x, const double a) +{ + double Q; + double u = x / a; + + if (u > 0) + { + Q = 0.5 * exp(-u); + } + else + { + Q = 1 - 0.5 *exp(u); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/laplaceinv.c b/software/gsl-1.15/cdf/laplaceinv.c new file mode 100644 index 000000000..422f27ef5 --- /dev/null +++ b/software/gsl-1.15/cdf/laplaceinv.c @@ -0,0 +1,75 @@ +/* cdf/laplaceinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_laplace_Pinv (const double P, const double a) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + if (P < 0.5) + { + x = a * log(2*P); + } + else + { + x = -a * log(2*(1-P)); + } + + return x; +} + +double +gsl_cdf_laplace_Qinv (const double Q, const double a) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return GSL_NEGINF; + } + + if (Q < 0.5) + { + x = -a * log(2*Q); + } + else + { + x = a * log(2*(1-Q)); + } + + return x; +} diff --git a/software/gsl-1.15/cdf/logistic.c b/software/gsl-1.15/cdf/logistic.c new file mode 100644 index 000000000..10ab9bc83 --- /dev/null +++ b/software/gsl-1.15/cdf/logistic.c @@ -0,0 +1,59 @@ +/* cdf/logistic.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_logistic_P (const double x, const double a) +{ + double P; + double u = x / a; + + if (u >= 0) + { + P = 1 / (1 + exp (-u)); + } + else + { + P = exp (u) / (1 + exp (u)); + } + + return P; +} + +double +gsl_cdf_logistic_Q (const double x, const double a) +{ + double Q; + double u = x / a; + + if (u >= 0) + { + Q = exp (-u) / (1 + exp (-u)); + } + else + { + Q = 1 / (1 + exp (u)); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/logisticinv.c b/software/gsl-1.15/cdf/logisticinv.c new file mode 100644 index 000000000..bc53d14a6 --- /dev/null +++ b/software/gsl-1.15/cdf/logisticinv.c @@ -0,0 +1,61 @@ +/* cdf/logisticinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_logistic_Pinv (const double P, const double a) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + x = a * log(P/(1-P)); + + return x; +} + +double +gsl_cdf_logistic_Qinv (const double Q, const double a) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return GSL_NEGINF; + } + + x = a * log((1-Q)/Q); + + return x; +} diff --git a/software/gsl-1.15/cdf/lognormal.c b/software/gsl-1.15/cdf/lognormal.c new file mode 100644 index 000000000..a3568104e --- /dev/null +++ b/software/gsl-1.15/cdf/lognormal.c @@ -0,0 +1,39 @@ +/* cdf/lognormal.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_lognormal_P (const double x, const double zeta, const double sigma) +{ + double u = (log (x) - zeta) / sigma; + double P = gsl_cdf_ugaussian_P (u); + return P; +} + +double +gsl_cdf_lognormal_Q (const double x, const double zeta, const double sigma) +{ + double u = (log (x) - zeta) / sigma; + double Q = gsl_cdf_ugaussian_Q (u); + return Q; +} diff --git a/software/gsl-1.15/cdf/lognormalinv.c b/software/gsl-1.15/cdf/lognormalinv.c new file mode 100644 index 000000000..d955382eb --- /dev/null +++ b/software/gsl-1.15/cdf/lognormalinv.c @@ -0,0 +1,65 @@ +/* cdf/lognormalinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_lognormal_Pinv (const double P, const double zeta, const double sigma) +{ + double x, u; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return 0.0; + } + + u = gsl_cdf_ugaussian_Pinv (P); + + x = exp (zeta + sigma * u); + + return x; +} + +double +gsl_cdf_lognormal_Qinv (const double Q, const double zeta, const double sigma) +{ + double x, u; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return 0.0; + } + + u = gsl_cdf_ugaussian_Qinv (Q); + + x = exp (zeta + sigma * u); + + return x; +} diff --git a/software/gsl-1.15/cdf/nbinomial.c b/software/gsl-1.15/cdf/nbinomial.c new file mode 100644 index 000000000..1a4044fa2 --- /dev/null +++ b/software/gsl-1.15/cdf/nbinomial.c @@ -0,0 +1,83 @@ +/* cdf/negbinom.c + * + * Copyright (C) 2004 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/* + * Pr(X <= k) for a negative binomial random variable X, i.e., + * the probability of k or fewer failuers before success n. + */ + +double +gsl_cdf_negative_binomial_P (const unsigned int k, const double p, const double n) +{ + double P; + double a; + double b; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (n < 0) + { + CDF_ERROR ("n < 0", GSL_EDOM); + } + + a = (double) n; + b = (double) k + 1.0; + P = gsl_cdf_beta_P (p, a, b); + + return P; +} + +/* + * Pr ( X > k ). + */ + +double +gsl_cdf_negative_binomial_Q (const unsigned int k, const double p, const double n) +{ + double Q; + double a; + double b; + + if (p > 1.0 || p < 0.0) + { + CDF_ERROR ("p < 0 or p > 1", GSL_EDOM); + } + + if (n < 0) + { + CDF_ERROR ("n < 0", GSL_EDOM); + } + + a = (double) n; + b = (double) k + 1.0; + Q = gsl_cdf_beta_Q (p, a, b); + + return Q; +} diff --git a/software/gsl-1.15/cdf/pareto.c b/software/gsl-1.15/cdf/pareto.c new file mode 100644 index 000000000..fb98b61eb --- /dev/null +++ b/software/gsl-1.15/cdf/pareto.c @@ -0,0 +1,57 @@ +/* cdf/pareto.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_pareto_P (const double x, const double a, const double b) +{ + double P; + + if (x < b) + { + P = 0; + } + else + { + P = 1 - pow(b/x, a); + } + + return P; +} + +double +gsl_cdf_pareto_Q (const double x, const double a, const double b) +{ + double Q; + + if (x < b) + { + Q = 1; + } + else + { + Q = pow(b/x, a); + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/paretoinv.c b/software/gsl-1.15/cdf/paretoinv.c new file mode 100644 index 000000000..1427173d2 --- /dev/null +++ b/software/gsl-1.15/cdf/paretoinv.c @@ -0,0 +1,61 @@ +/* cdf/paretoinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_pareto_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return b; + } + + x = b * exp(-log1p(-P)/a); + + return x; +} + +double +gsl_cdf_pareto_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return b; + } + + x = b * exp(-log(Q) / a); + + return x; +} diff --git a/software/gsl-1.15/cdf/pascal.c b/software/gsl-1.15/cdf/pascal.c new file mode 100644 index 000000000..51e3af540 --- /dev/null +++ b/software/gsl-1.15/cdf/pascal.c @@ -0,0 +1,40 @@ +/* cdf/pascal.c + * + * Copyright (C) 2006, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Pascal distribution is a negative binomial with valued integer n */ + + +double +gsl_cdf_pascal_P (const unsigned int k, const double p, const unsigned int n) +{ + double P = gsl_cdf_negative_binomial_P (k, p, (double) n); + return P; +} + +double +gsl_cdf_pascal_Q (const unsigned int k, const double p, const unsigned int n) +{ + double Q = gsl_cdf_negative_binomial_Q (k, p, (double) n); + return Q; +} diff --git a/software/gsl-1.15/cdf/poisson.c b/software/gsl-1.15/cdf/poisson.c new file mode 100644 index 000000000..e53757a43 --- /dev/null +++ b/software/gsl-1.15/cdf/poisson.c @@ -0,0 +1,84 @@ +/* cdf/poisson.c + * + * Copyright (C) 2004 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Computes the cumulative distribution function for a Poisson + * random variable. For a Poisson random variable X with parameter + * mu, + * + * Pr( X <= k ) = Pr( Y >= p ) + * + * where Y is a gamma random variable with parameters k+1 and 1. + * + * Reference: + * + * W. Feller, "An Introduction to Probability and Its + * Applications," volume 1. Wiley, 1968. Exercise 46, page 173, + * chapter 6. + */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/* + * Pr (X <= k) for a Poisson random variable X. + */ + +double +gsl_cdf_poisson_P (const unsigned int k, const double mu) +{ + double P; + double a; + + if (mu <= 0.0) + { + CDF_ERROR ("mu <= 0", GSL_EDOM); + } + + a = (double) k + 1.0; + P = gsl_cdf_gamma_Q (mu, a, 1.0); + + return P; +} + +/* + * Pr ( X > k ) for a Possion random variable X. + */ + +double +gsl_cdf_poisson_Q (const unsigned int k, const double mu) +{ + double Q; + double a; + + if (mu <= 0.0) + { + CDF_ERROR ("mu <= 0", GSL_EDOM); + } + + a = (double) k + 1.0; + Q = gsl_cdf_gamma_P (mu, a, 1.0); + + return Q; +} diff --git a/software/gsl-1.15/cdf/rat_eval.h b/software/gsl-1.15/cdf/rat_eval.h new file mode 100644 index 000000000..5e6fc1990 --- /dev/null +++ b/software/gsl-1.15/cdf/rat_eval.h @@ -0,0 +1,25 @@ +static double +rat_eval (const double a[], const size_t na, + const double b[], const size_t nb, const double x) +{ + size_t i, j; + double u, v, r; + + u = a[na - 1]; + + for (i = na - 1; i > 0; i--) + { + u = x * u + a[i - 1]; + } + + v = b[nb - 1]; + + for (j = nb - 1; j > 0; j--) + { + v = x * v + b[j - 1]; + } + + r = u / v; + + return r; +} diff --git a/software/gsl-1.15/cdf/rayleigh.c b/software/gsl-1.15/cdf/rayleigh.c new file mode 100644 index 000000000..50de88f27 --- /dev/null +++ b/software/gsl-1.15/cdf/rayleigh.c @@ -0,0 +1,39 @@ +/* cdf/rayleigh.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_rayleigh_P (const double x, const double sigma) +{ + double u = x / sigma; + double P = -expm1 (-u*u/2); + return P; +} + +double +gsl_cdf_rayleigh_Q (const double x, const double sigma) +{ + double u = x / sigma; + double Q = exp (-u*u/2); + return Q; +} diff --git a/software/gsl-1.15/cdf/rayleighinv.c b/software/gsl-1.15/cdf/rayleighinv.c new file mode 100644 index 000000000..1e01316bc --- /dev/null +++ b/software/gsl-1.15/cdf/rayleighinv.c @@ -0,0 +1,61 @@ +/* cdf/rayleighinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_rayleigh_Pinv (const double P, const double sigma) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return 0.0; + } + + x = sigma * M_SQRT2 * sqrt (-log1p (-P)); + + return x; +} + +double +gsl_cdf_rayleigh_Qinv (const double Q, const double sigma) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return 0.0; + } + + x = sigma * M_SQRT2 * sqrt (-log (Q)); + + return x; +} diff --git a/software/gsl-1.15/cdf/tdist.c b/software/gsl-1.15/cdf/tdist.c new file mode 100644 index 000000000..0e496716f --- /dev/null +++ b/software/gsl-1.15/cdf/tdist.c @@ -0,0 +1,271 @@ +/* cdf/tdist.c + * + * Copyright (C) 2002 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Computes the Student's t cumulative distribution function using + * the method detailed in + * + * W.J. Kennedy and J.E. Gentle, "Statistical Computing." 1980. + * Marcel Dekker. ISBN 0-8247-6898-1. + * + * G.W. Hill and A.W. Davis. "Generalized asymptotic expansions + * of Cornish-Fisher type." Annals of Mathematical Statistics, + * vol. 39, 1264-1273. 1968. + * + * G.W. Hill. "Algorithm 395: Student's t-distribution," Communications + * of the ACM, volume 13, number 10, page 617. October 1970. + * + * G.W. Hill, "Remark on algorithm 395: Student's t-distribution," + * Transactions on Mathematical Software, volume 7, number 2, page + * 247. June 1982. + */ + +#include +#include +#include +#include +#include + +#include "beta_inc.c" + +static double +poly_eval (const double c[], unsigned int n, double x) +{ + unsigned int i; + double y = c[0] * x; + + for (i = 1; i < n; i++) + { + y = x * (y + c[i]); + } + + y += c[n]; + + return y; +} + +/* + * Use the Cornish-Fisher asymptotic expansion to find a point u such + * that gsl_cdf_gauss(y) = tcdf(t). + * + */ + +static double +cornish_fisher (double t, double n) +{ + const double coeffs6[10] = { + 0.265974025974025974026, + 5.449696969696969696970, + 122.20294372294372294372, + 2354.7298701298701298701, + 37625.00902597402597403, + 486996.1392857142857143, + 4960870.65, + 37978595.55, + 201505390.875, + 622437908.625 + }; + const double coeffs5[8] = { + 0.2742857142857142857142, + 4.499047619047619047619, + 78.45142857142857142857, + 1118.710714285714285714, + 12387.6, + 101024.55, + 559494.0, + 1764959.625 + }; + const double coeffs4[6] = { + 0.3047619047619047619048, + 3.752380952380952380952, + 46.67142857142857142857, + 427.5, + 2587.5, + 8518.5 + }; + const double coeffs3[4] = { + 0.4, + 3.3, + 24.0, + 85.5 + }; + + double a = n - 0.5; + double b = 48.0 * a * a; + + double z2 = a * log1p (t * t / n); + double z = sqrt (z2); + + double p5 = z * poly_eval (coeffs6, 9, z2); + double p4 = -z * poly_eval (coeffs5, 7, z2); + double p3 = z * poly_eval (coeffs4, 5, z2); + double p2 = -z * poly_eval (coeffs3, 3, z2); + double p1 = z * (z2 + 3.0); + double p0 = z; + + double y = p5; + y = (y / b) + p4; + y = (y / b) + p3; + y = (y / b) + p2; + y = (y / b) + p1; + y = (y / b) + p0; + + if (t < 0) + y *= -1; + + return y; +} + +#if 0 +/* + * Series approximation for t > 4.0. This needs to be fixed; + * it shouldn't subtract the result from 1.0. A better way is + * to use two different series expansions. Figuring this out + * means rummaging through Fisher's paper in Metron, v5, 1926, + * "Expansion of Student's integral in powers of n^{-1}." + */ + +#define MAXI 40 + +static double +normal_approx (const double x, const double nu) +{ + double y; + double num; + double diff; + double q; + int i; + double lg1, lg2; + + y = 1 / sqrt (1 + x * x / nu); + num = 1.0; + q = 0.0; + diff = 2 * GSL_DBL_EPSILON; + for (i = 2; (i < MAXI) && (diff > GSL_DBL_EPSILON); i += 2) + { + diff = q; + num *= y * y * (i - 1) / i; + q += num / (nu + i); + diff = q - diff; + } + q += 1 / nu; + lg1 = gsl_sf_lngamma (nu / 2.0); + lg2 = gsl_sf_lngamma ((nu + 1.0) / 2.0); + + diff = lg2 - lg1; + q *= pow (y, nu) * exp (diff) / sqrt (M_PI); + + return q; +} +#endif + +double +gsl_cdf_tdist_P (const double x, const double nu) +{ + double P; + + double x2 = x * x; + + if (nu > 30 && x2 < 10 * nu) + { + double u = cornish_fisher (x, nu); + P = gsl_cdf_ugaussian_P (u); + + return P; + } + + if (x2 < nu) + { + double u = x2 / nu; + double eps = u / (1 + u); + + if (x >= 0) + { + P = beta_inc_AXPY (0.5, 0.5, 0.5, nu / 2.0, eps); + } + else + { + P = beta_inc_AXPY (-0.5, 0.5, 0.5, nu / 2.0, eps); + } + } + else + { + double v = nu / (x * x); + double eps = v / (1 + v); + + if (x >= 0) + { + P = beta_inc_AXPY (-0.5, 1.0, nu / 2.0, 0.5, eps); + } + else + { + P = beta_inc_AXPY (0.5, 0.0, nu / 2.0, 0.5, eps); + } + } + + return P; +} + + +double +gsl_cdf_tdist_Q (const double x, const double nu) +{ + double Q; + + double x2 = x * x; + + if (nu > 30 && x2 < 10 * nu) + { + double u = cornish_fisher (x, nu); + Q = gsl_cdf_ugaussian_Q (u); + + return Q; + } + + if (x2 < nu) + { + double u = x2 / nu; + double eps = u / (1 + u); + + if (x >= 0) + { + Q = beta_inc_AXPY (-0.5, 0.5, 0.5, nu / 2.0, eps); + } + else + { + Q = beta_inc_AXPY (0.5, 0.5, 0.5, nu / 2.0, eps); + } + } + else + { + double v = nu / (x * x); + double eps = v / (1 + v); + + if (x >= 0) + { + Q = beta_inc_AXPY (0.5, 0.0, nu / 2.0, 0.5, eps); + } + else + { + Q = beta_inc_AXPY (-0.5, 1.0, nu / 2.0, 0.5, eps); + } + } + + return Q; +} diff --git a/software/gsl-1.15/cdf/tdistinv.c b/software/gsl-1.15/cdf/tdistinv.c new file mode 100644 index 000000000..d64e496c8 --- /dev/null +++ b/software/gsl-1.15/cdf/tdistinv.c @@ -0,0 +1,239 @@ +/* cdf/tdistinv.c + * + * Copyright (C) 2007, 2010 Brian Gough + * Copyright (C) 2002 Jason H. Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include + +static double +inv_cornish_fisher (double z, double nu) +{ + double a = 1 / (nu - 0.5); + double b = 48.0 / (a * a); + + double cf1 = z * (3 + z * z); + double cf2 = z * (945 + z * z * (360 + z * z * (63 + z * z * 4))); + + double y = z - cf1 / b + cf2 / (10 * b * b); + + double t = GSL_SIGN (z) * sqrt (nu * expm1 (a * y * y)); + + return t; +} + + +double +gsl_cdf_tdist_Pinv (const double P, const double nu) +{ + double x, ptail; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return GSL_NEGINF; + } + + if (nu == 1.0) + { + x = tan (M_PI * (P - 0.5)); + return x; + } + else if (nu == 2.0) + { + x = (2 * P - 1) / sqrt (2 * P * (1 - P)); + return x; + } + + ptail = (P < 0.5) ? P : 1 - P; + + if (sqrt (M_PI * nu / 2) * ptail > pow (0.05, nu / 2)) + { + double xg = gsl_cdf_ugaussian_Pinv (P); + x = inv_cornish_fisher (xg, nu); + } + else + { + /* Use an asymptotic expansion of the tail of integral */ + + double beta = gsl_sf_beta (0.5, nu / 2); + + if (P < 0.5) + { + x = -sqrt (nu) * pow (beta * nu * P, -1.0 / nu); + } + else + { + x = sqrt (nu) * pow (beta * nu * (1 - P), -1.0 / nu); + } + + /* Correct nu -> nu/(1+nu/x^2) in the leading term to account + for higher order terms. This avoids overestimating x, which + makes the iteration unstable due to the rapidly decreasing + tails of the distribution. */ + + x /= sqrt (1 + nu / (x * x)); + } + + { + double dP, phi; + unsigned int n = 0; + + start: + dP = P - gsl_cdf_tdist_P (x, nu); + phi = gsl_ran_tdist_pdf (x, nu); + + if (dP == 0.0 || n++ > 32) + goto end; + + { + double lambda = dP / phi; + double step0 = lambda; + double step1 = ((nu + 1) * x / (x * x + nu)) * (lambda * lambda / 4.0); + + double step = step0; + + if (fabs (step1) < fabs (step0)) + { + step += step1; + } + + if (P > 0.5 && x + step < 0) + x /= 2; + else if (P < 0.5 && x + step > 0) + x /= 2; + else + x += step; + + if (fabs (step) > 1e-10 * fabs (x)) + goto start; + } + + end: + if (fabs(dP) > GSL_SQRT_DBL_EPSILON * P) + { + GSL_ERROR_VAL("inverse failed to converge", GSL_EFAILED, GSL_NAN); + } + + return x; + } +} + +double +gsl_cdf_tdist_Qinv (const double Q, const double nu) +{ + double x, qtail; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return GSL_NEGINF; + } + + if (nu == 1.0) + { + x = tan (M_PI * (0.5 - Q)); + return x; + } + else if (nu == 2.0) + { + x = (1 - 2 * Q) / sqrt (2 * Q * (1 - Q)); + return x; + } + + qtail = (Q < 0.5) ? Q : 1 - Q; + + if (sqrt (M_PI * nu / 2) * qtail > pow (0.05, nu / 2)) + { + double xg = gsl_cdf_ugaussian_Qinv (Q); + x = inv_cornish_fisher (xg, nu); + } + else + { + /* Use an asymptotic expansion of the tail of integral */ + + double beta = gsl_sf_beta (0.5, nu / 2); + + if (Q < 0.5) + { + x = sqrt (nu) * pow (beta * nu * Q, -1.0 / nu); + } + else + { + x = -sqrt (nu) * pow (beta * nu * (1 - Q), -1.0 / nu); + } + + /* Correct nu -> nu/(1+nu/x^2) in the leading term to account + for higher order terms. This avoids overestimating x, which + makes the iteration unstable due to the rapidly decreasing + tails of the distribution. */ + + x /= sqrt (1 + nu / (x * x)); + } + + { + double dQ, phi; + unsigned int n = 0; + + start: + dQ = Q - gsl_cdf_tdist_Q (x, nu); + phi = gsl_ran_tdist_pdf (x, nu); + + if (dQ == 0.0 || n++ > 32) + goto end; + + { + double lambda = - dQ / phi; + double step0 = lambda; + double step1 = ((nu + 1) * x / (x * x + nu)) * (lambda * lambda / 4.0); + + double step = step0; + + if (fabs (step1) < fabs (step0)) + { + step += step1; + } + + if (Q < 0.5 && x + step < 0) + x /= 2; + else if (Q > 0.5 && x + step > 0) + x /= 2; + else + x += step; + + if (fabs (step) > 1e-10 * fabs (x)) + goto start; + } + } + +end: + + return x; +} diff --git a/software/gsl-1.15/cdf/test.c b/software/gsl-1.15/cdf/test.c new file mode 100644 index 000000000..109b5ea0b --- /dev/null +++ b/software/gsl-1.15/cdf/test.c @@ -0,0 +1,1391 @@ +/* cdf/test.c + * + * Copyright (C) 2002 Jason H Stover. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TEST(func, args, value, tol) { double res = func args ; gsl_test_rel (res, value, tol, #func #args); } ; + +#define TEST_TOL0 (2.0*GSL_DBL_EPSILON) +#define TEST_TOL1 (16.0*GSL_DBL_EPSILON) +#define TEST_TOL2 (256.0*GSL_DBL_EPSILON) +#define TEST_TOL3 (2048.0*GSL_DBL_EPSILON) +#define TEST_TOL4 (16384.0*GSL_DBL_EPSILON) +#define TEST_TOL5 (131072.0*GSL_DBL_EPSILON) +#define TEST_TOL6 (1048576.0*GSL_DBL_EPSILON) + +void test_ugaussian (void); +void test_ugaussianinv (void); +void test_exponential (void); +void test_exponentialinv (void); +void test_exppow (void); +void test_tdist (void); +void test_fdist (void); +void test_gamma (void); +void test_chisq (void); +void test_beta (void); +void test_gammainv (void); +void test_chisqinv (void); +void test_tdistinv (void); +void test_betainv (void); +void test_finv (void); + +#include "test_auto.c" + +struct range { unsigned int min; unsigned int max; } ; +double test_binomial_pdf (unsigned int n); +double test_binomial_cdf_P (unsigned int n); +double test_binomial_cdf_Q (unsigned int n); + +struct range +test_binomial_range (void) +{ + struct range r = {0, 5}; + return r; +} + +double +test_binomial_pdf (unsigned int k) +{ + return gsl_ran_binomial_pdf (k, 0.3, 5); +} + +double +test_binomial_cdf_P (unsigned int k) +{ + return gsl_cdf_binomial_P (k, 0.3, 5); +} + +double +test_binomial_cdf_Q (unsigned int k) +{ + return gsl_cdf_binomial_Q (k, 0.3, 5); +} + +struct range +test_poisson_range (void) +{ + struct range r = {0, 25}; + return r; +} + +double +test_poisson_pdf (unsigned int k) +{ + return gsl_ran_poisson_pdf (k, 2.3); +} + +double +test_poisson_cdf_P (unsigned int k) +{ + return gsl_cdf_poisson_P (k, 2.3); +} + +double +test_poisson_cdf_Q (unsigned int k) +{ + return gsl_cdf_poisson_Q (k, 2.3); +} + +struct range +test_geometric_range (void) +{ + struct range r = {0, 25}; + return r; +} + +double +test_geometric_pdf (unsigned int k) +{ + return gsl_ran_geometric_pdf (k, 0.3); +} + +double +test_geometric_cdf_P (unsigned int k) +{ + return gsl_cdf_geometric_P (k, 0.3); +} + +double +test_geometric_cdf_Q (unsigned int k) +{ + return gsl_cdf_geometric_Q (k, 0.3); +} + +struct range +test_negative_binomial_range (void) +{ + struct range r = {0, 15}; + return r; +} + +double +test_negative_binomial_pdf (unsigned int k) +{ + return gsl_ran_negative_binomial_pdf (k, 0.3, 5.3); +} + +double +test_negative_binomial_cdf_P (unsigned int k) +{ + return gsl_cdf_negative_binomial_P (k, 0.3, 5.3); +} + +double +test_negative_binomial_cdf_Q (unsigned int k) +{ + return gsl_cdf_negative_binomial_Q (k, 0.3, 5.3); +} + +struct range +test_pascal_range (void) +{ + struct range r = {0, 15}; + return r; +} + +double +test_pascal_pdf (unsigned int k) +{ + return gsl_ran_pascal_pdf (k, 0.3, 5); +} + +double +test_pascal_cdf_P (unsigned int k) +{ + return gsl_cdf_pascal_P (k, 0.3, 5); +} + +double +test_pascal_cdf_Q (unsigned int k) +{ + return gsl_cdf_pascal_Q (k, 0.3, 5); +} + +struct range +test_hypergeometric_range (void) +{ + struct range r = {0, 26}; + return r; +} + +double +test_hypergeometric_pdf (unsigned int k) +{ + return gsl_ran_hypergeometric_pdf (k, 7, 19, 13); +} + +double +test_hypergeometric_cdf_P (unsigned int k) +{ + return gsl_cdf_hypergeometric_P (k, 7, 19, 13); +} + +double +test_hypergeometric_cdf_Q (unsigned int k) +{ + return gsl_cdf_hypergeometric_Q (k, 7, 19, 13); +} + +struct range +test_hypergeometric2_range (void) +{ + struct range r = {0, 13250474}; + return r; +} + +struct range +test_hypergeometric2a_range (void) +{ + struct range r = {3500, 3600}; + return r; +} + +struct range +test_hypergeometric2b_range (void) +{ + struct range r = {13247474, 13250474}; + return r; +} + +double +test_hypergeometric2_pdf (unsigned int k) +{ + return gsl_ran_hypergeometric_pdf (k, 76200, 13174274, 678090); +} + +double +test_hypergeometric2_cdf_P (unsigned int k) +{ + return gsl_cdf_hypergeometric_P (k, 76200, 13174274, 678090); +} + +double +test_hypergeometric2_cdf_Q (unsigned int k) +{ + return gsl_cdf_hypergeometric_Q (k, 76200, 13174274, 678090); +} + +#ifdef LOGARITHMIC +struct range +test_logarithmic_range (void) +{ + struct range r = {1, 200}; + return r; +} + +double +test_logarithmic_pdf (unsigned int k) +{ + return gsl_ran_logarithmic_pdf (k, 0.9); +} + +double +test_logarithmic_cdf_P (unsigned int k) +{ + return gsl_cdf_logarithmic_P (k, 0.9); +} + +double +test_logarithmic_cdf_Q (unsigned int k) +{ + return gsl_cdf_logarithmic_Q (k, 0.9); +} +#endif + +void +test_discrete_cdf_P (double (*pdf)(unsigned int), + double (*cdf_P)(unsigned int), + struct range (*range)(void), + const char * desc) +{ + double sum; + double tol = TEST_TOL2; + int i, min, max; + + struct range r = range(); + + min = r.min; + max = r.max; + sum = 0.0; + + for (i = min; i <= max; i++) + { + double pi = pdf(i); + double Pi = cdf_P(i); + sum += pi; + gsl_test_rel (Pi, sum, tol, desc, i); + } +} + +void +test_discrete_cdf_Q (double (*pdf)(unsigned int), + double (*cdf_Q)(unsigned int), + struct range (*range)(void), + const char * desc) +{ + double sum; + double tol = TEST_TOL2; + int i, min, max; + + struct range r = range(); + + min = r.min; + max = r.max; + sum = cdf_Q(max); + + for (i = max; i >= min; i--) + { + double pi = pdf(i); + double Qi = cdf_Q(i); + gsl_test_rel (Qi, sum, tol, desc, i); + sum += pi; + } +} + +void +test_discrete_cdf_PQ (double (*cdf_P)(unsigned int), + double (*cdf_Q)(unsigned int), + struct range (*range)(void), + const char * desc) +{ + double sum; + double tol = GSL_DBL_EPSILON; + int i, min, max; + + struct range r = range(); + + min = r.min; + max = r.max; + + for (i = min; i <= max; i++) + { + double Pi = cdf_P(i); + double Qi = cdf_Q(i); + sum = Pi + Qi; + gsl_test_rel (sum, 1.0, tol, desc, i); + { + int s1 = (Pi<0 || Pi>1); + int s2 = (Qi<0 || Qi>1); + gsl_test(s1, "Pi in range [0,1] (%.18e)", Pi); + gsl_test(s2, "Qi in range [0,1] (%.18e)", Qi); + } + } + +} + +#define TEST_DISCRETE(name) do { \ + test_discrete_cdf_P(&test_ ## name ## _pdf, &test_ ## name ## _cdf_P, &test_ ## name ## _range, "test gsl_cdf_" #name "_P (k=%d)") ; \ + test_discrete_cdf_Q(&test_ ## name ## _pdf, &test_ ## name ## _cdf_Q, &test_ ## name ## _range, "test gsl_cdf_" #name "_Q (k=%d)") ; \ + test_discrete_cdf_PQ(&test_ ## name ## _cdf_P, &test_ ## name ## _cdf_Q, &test_ ## name ## _range, "test gsl_cdf_" #name "_P+Q (k=%d)") ; \ +} while (0); + +int +main (void) +{ + gsl_ieee_env_setup (); + + TEST_DISCRETE(binomial); + TEST_DISCRETE(poisson); + TEST_DISCRETE(geometric); + TEST_DISCRETE(negative_binomial); + TEST_DISCRETE(pascal); + TEST_DISCRETE(hypergeometric); +#ifdef HYPERGEOMETRIC2 + TEST_DISCRETE(hypergeometric2); +#endif +#ifdef LOGARITHMIC + TEST_DISCRETE(logarithmic); +#endif + + test_discrete_cdf_PQ(&test_hypergeometric2_cdf_P, + &test_hypergeometric2_cdf_Q, + &test_hypergeometric2a_range, + "test gsl_cdf_hypergeometric_P+Q (k=%d)") ; + + test_discrete_cdf_PQ(&test_hypergeometric2_cdf_P, + &test_hypergeometric2_cdf_Q, + &test_hypergeometric2b_range, + "test gsl_cdf_hypergeometric_P+Q (k=%d)") ; + + + /* exit (gsl_test_summary ()); */ + + /* Tests for gaussian cumulative distribution function + Function values computed with PARI, 28 digits precision */ + + test_ugaussian (); + test_exponential (); + test_exppow (); + test_tdist (); + test_fdist (); + test_gamma (); + test_chisq (); + test_beta (); + + test_ugaussianinv (); + test_exponentialinv (); + test_gammainv (); + test_chisqinv (); + test_tdistinv (); + test_betainv (); + test_finv (); + + test_auto_beta (); + test_auto_fdist (); + test_auto_cauchy (); + test_auto_gaussian (); + test_auto_laplace (); + test_auto_rayleigh (); + test_auto_flat (); + test_auto_lognormal (); + test_auto_gamma (); + test_auto_chisq (); + test_auto_tdist (); + test_auto_gumbel1 (); + test_auto_gumbel2 (); + test_auto_weibull (); + test_auto_pareto (); + test_auto_logistic (); + test_auto_gammalarge (); + + exit (gsl_test_summary ()); +} + +void test_ugaussian (void) +{ + TEST (gsl_cdf_ugaussian_P, (0.0), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (1e-32), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (1e-16), 0.5000000000000000398942280401, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (1e-8), 0.5000000039894228040143267129, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (0.5), 0.6914624612740131036377046105, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (0.7), 0.7580363477769269852506495717, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (5.0), 0.9999997133484281208060883262, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (10.0), 0.9999999999999999999999923801, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (30.0), 1.000000000000000000000000000, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (40.0), 1.000000000000000000000000000, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (1e10), 1.000000000000000000000000000, TEST_TOL0); + + TEST (gsl_cdf_ugaussian_P, (-1e-32), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (-1e-16), 0.4999999999999999601057719598, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (-1e-8), 0.4999999960105771959856732870, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (-0.5), 0.3085375387259868963622953894, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (-0.7), 0.2419636522230730147493504282, TEST_TOL0); + TEST (gsl_cdf_ugaussian_P, (-5.0), 0.0000002866515718791939116737523329, TEST_TOL1); + TEST (gsl_cdf_ugaussian_P, (-10.0), 7.619853024160526065973343257e-24, TEST_TOL3); + TEST (gsl_cdf_ugaussian_P, (-30.0), 4.906713927148187059533809288e-198, TEST_TOL3); + TEST (gsl_cdf_ugaussian_P, (-1e10), 0.0, 0.0); + + TEST (gsl_cdf_ugaussian_Q, (0.0), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (1e-32), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (1e-16), 0.4999999999999999601057719598, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (1e-8), 0.4999999960105771959856732870, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (0.5), 0.3085375387259868963622953894, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (0.7), 0.2419636522230730147493504282, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (5.0), 0.0000002866515718791939116737523329, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Q, (10.0), 7.619853024160526065973343257e-24, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Q, (30.0), 4.906713927148187059533809288e-198, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Q, (1e10), 0.0, 0.0); + + TEST (gsl_cdf_ugaussian_Q, (-1e-32), 0.5, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-1e-16), 0.5000000000000000398942280401, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-1e-8), 0.5000000039894228040143267129, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-0.5), 0.6914624612740131036377046105, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-0.7), 0.7580363477769269852506495717, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-5.0), 0.9999997133484281208060883262, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-10.0), 0.9999999999999999999999923801, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-30.0), 1.000000000000000000000000000, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-40.0), 1.000000000000000000000000000, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Q, (-1e10), 1.000000000000000000000000000, TEST_TOL0); +} + /* Test values from Abramowitz & Stegun, Handbook of Mathematical + Functions, Table 26.1. Error term is given by dx = dP / Z(x) */ + +void test_ugaussianinv (void) { + TEST (gsl_cdf_ugaussian_Pinv, (0.9999997133), 5.0, 1e-4); + TEST (gsl_cdf_ugaussian_Pinv, (0.9999683288), 4.0, 1e-6); + TEST (gsl_cdf_ugaussian_Pinv, (0.9986501020), 3.0, 1e-8); + TEST (gsl_cdf_ugaussian_Pinv, (0.977249868051821), 2.0, 1e-14); + TEST (gsl_cdf_ugaussian_Pinv, (0.841344746068543), 1.0, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Pinv, (0.691462461274013), 0.5, TEST_TOL2); + TEST (gsl_cdf_ugaussian_Pinv, (0.655421741610324), 0.4, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (0.617911422188953), 0.3, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (0.579259709439103), 0.2, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (0.539827837277029), 0.1, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (0.5), 0.0, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Pinv, (4.60172162722971e-1), -0.1, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (4.20740290560897e-1), -0.2, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (3.82088577811047e-1), -0.3, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (3.44578258389676e-1), -0.4, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Pinv, (3.08537538725987e-1), -0.5, TEST_TOL2); + TEST (gsl_cdf_ugaussian_Pinv, (1.58655253931457e-1), -1.0, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Pinv, (2.2750131948179e-2), -2.0, 1e-14); + TEST (gsl_cdf_ugaussian_Pinv, (1.349898e-3), -3.0, 1e-8); + TEST (gsl_cdf_ugaussian_Pinv, (3.16712e-5), -4.0, 1e-6); + TEST (gsl_cdf_ugaussian_Pinv, (2.86648e-7), -5.0, 1e-4); + + TEST (gsl_cdf_ugaussian_Pinv, (7.61985302416052e-24), -10.0, 1e-4); + + TEST (gsl_cdf_ugaussian_Qinv, (7.61985302416052e-24), 10.0, 1e-4); + + TEST (gsl_cdf_ugaussian_Qinv, (2.86648e-7), 5.0, 1e-4); + TEST (gsl_cdf_ugaussian_Qinv, (3.16712e-5), 4.0, 1e-6); + TEST (gsl_cdf_ugaussian_Qinv, (1.349898e-3), 3.0, 1e-8); + TEST (gsl_cdf_ugaussian_Qinv, (2.2750131948179e-2), 2.0, 1e-14); + TEST (gsl_cdf_ugaussian_Qinv, (1.58655253931457e-1), 1.0, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Qinv, (3.08537538725987e-1), 0.5, TEST_TOL2); + TEST (gsl_cdf_ugaussian_Qinv, (3.44578258389676e-1), 0.4, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (3.82088577811047e-1), 0.3, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (4.20740290560897e-1), 0.2, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (4.60172162722971e-1), 0.1, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (0.5), 0.0, TEST_TOL0); + TEST (gsl_cdf_ugaussian_Qinv, (0.539827837277029), -0.1, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (0.579259709439103), -0.2, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (0.617911422188953), -0.3, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (0.655421741610324), -0.4, TEST_TOL1); + TEST (gsl_cdf_ugaussian_Qinv, (0.691462461274013), -0.5, TEST_TOL2); + TEST (gsl_cdf_ugaussian_Qinv, (0.841344746068543), -1.0, TEST_TOL3); + TEST (gsl_cdf_ugaussian_Qinv, (0.977249868051821), -2.0, 1e-14); + TEST (gsl_cdf_ugaussian_Qinv, (0.9986501020), -3.0, 1e-8); + TEST (gsl_cdf_ugaussian_Qinv, (0.9999683288), -4.0, 1e-6); + TEST (gsl_cdf_ugaussian_Qinv, (0.9999997133), -5.0, 1e-4); +} + + + /* Tests for exponential cumulative distribution function + Function values computed with PARI, 28 digits precision */ + +void test_exponential (void) +{ + TEST (gsl_cdf_exponential_P, (0.1, 0.7), 1.33122100249818372e-1, TEST_TOL0); + TEST (gsl_cdf_exponential_P, (1e-32, 0.7), 1.42857142857142857e-32, TEST_TOL0); + TEST (gsl_cdf_exponential_P, (1000.0, 0.7), 1.0, TEST_TOL6); + + TEST (gsl_cdf_exponential_Q, (0.1, 0.7), 8.66877899750181628e-1, TEST_TOL0); + TEST (gsl_cdf_exponential_Q, (1e-32, 0.7), 1.0, TEST_TOL0); + TEST (gsl_cdf_exponential_Q, (1000.0, 0.7), 0.0, TEST_TOL6); +} + +void test_exponentialinv (void) { + TEST (gsl_cdf_exponential_Pinv, (0.13, 0.7), 9.74834471334553546e-2, TEST_TOL0); + TEST (gsl_cdf_exponential_Pinv, (1.42e-32, 0.7), 9.94000000000000000e-33, TEST_TOL0); + + TEST (gsl_cdf_exponential_Qinv, (0.86, 0.7), 1.05576022814208545e-1, TEST_TOL0); + TEST (gsl_cdf_exponential_Qinv, (0.99999, 0.7), 7.00003500023333508e-6, TEST_TOL6); +} + + + +void test_exppow (void) +{ + TEST (gsl_cdf_exppow_P, (-1000.0, 0.7, 1.8), 0.0, TEST_TOL6); + TEST (gsl_cdf_exppow_P, (-0.1, 0.7, 1.8), 0.4205349082867515493458053850, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (-1e-32, 0.7, 1.8), 0.4999999999999999999999999999, TEST_TOL0); + + TEST (gsl_cdf_exppow_P, (0.1, 0.7, 1.8), 0.5794650917132484506541946149, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (1e-32, 0.7, 1.8), 0.5, TEST_TOL0); + TEST (gsl_cdf_exppow_P, (1000.0, 0.7, 1.8), 0.9999999999999999999999956212, TEST_TOL6); + + TEST (gsl_cdf_exppow_Q, (-1000.0, 0.7, 1.8), 0.9999999999999999999999956212, TEST_TOL6); + TEST (gsl_cdf_exppow_Q, (-0.1, 0.7, 1.8), 0.5794650917132484506541946149, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (-1e-32, 0.7, 1.8), 0.5, TEST_TOL0); + + TEST (gsl_cdf_exppow_Q, (0.1, 0.7, 1.8), 0.4205349082867515493458053850, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (1e-32, 0.7, 1.8), 0.4999999999999999999999999999, TEST_TOL0); + TEST (gsl_cdf_exppow_Q, (1000.0, 0.7, 1.8), 0.0, TEST_TOL6); +} + + + /* Tests for student's T distribution */ + + /* p(x,nu) = (1/2)*(1+sign(x)*betaI(x^2/(nu+x^2),1/2,nu/2)) + q(x,nu) = (1/2)*(1-sign(x)*betaI(x^2/(nu+x^2),1/2,nu/2)) */ + +void test_tdist (void) { + TEST (gsl_cdf_tdist_P, (0.0, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1e-100, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.001, 1.0), 5.00318309780080559e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.01, 1.0), 5.03182992764908255e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.1, 1.0), 5.31725517430553569e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.325, 1.0), 6.00023120032852123e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.0, 1.0), 0.75000000000000000e0, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.5, 1.0), 8.12832958189001183e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (2.0, 1.0), 8.52416382349566726e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10.0, 1.0), 9.68274482569446430e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (20.0, 1.0), 9.84097748743823625e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (100.0, 1.0), 9.96817007235091745e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1000.0, 1.0), 9.99681690219919441e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10000.0, 1.0), 9.99968169011487724e-1, TEST_TOL6); + + TEST (gsl_cdf_tdist_Q, (0.0, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1e-100, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.001, 1.0), 4.99681690219919441e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.01, 1.0), 4.96817007235091745e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.1, 1.0), 4.68274482569446430e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.325, 1.0), 3.99976879967147876e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.0, 1.0), 2.5e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.5, 1.0), 1.87167041810998816e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (2.0, 1.0), 1.47583617650433274e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (10.0, 1.0), 3.17255174305535695e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (20.0, 1.0), 1.59022512561763752e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (100.0, 1.0), 3.18299276490825515e-3, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1000.0, 1.0), 3.18309780080558939e-4, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (10000.0, 1.0), 3.18309885122757724e-5, TEST_TOL6); + + TEST (gsl_cdf_tdist_P, (-1e-100, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.001, 1.0), 4.99681690219919441e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.01, 1.0), 4.96817007235091744e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.1, 1.0), 4.68274482569446430e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.325, 1.0), 3.99976879967147876e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.0, 1.0), 0.25, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.5, 1.0), 1.87167041810998816e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-2.0, 1.0), 1.47583617650433274e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-10.0, 1.0), 3.17255174305535695e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-20.0, 1.0), 1.59022512561763751e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-100.0, 1.0), 3.18299276490825514e-3, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1000.0, 1.0), 3.18309780080558938e-4, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-10000.0, 1.0), 3.18309885122757724e-5, TEST_TOL6); + + TEST (gsl_cdf_tdist_Q, (-1e-100, 1.0), 0.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.001, 1.0), 5.00318309780080559e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.01, 1.0), 5.03182992764908255e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.1, 1.0), 5.31725517430553570e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.325, 1.0), 6.00023120032852124e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.0, 1.0), 7.5e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.5, 1.0), 8.12832958189001184e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-2.0, 1.0), 8.52416382349566726e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10.0, 1.0), 9.68274482569446430e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-20.0, 1.0), 9.84097748743823625e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-100.0, 1.0), 9.96817007235091745e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1000.0, 1.0), 9.99681690219919441e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10000.0, 1.0), 9.99968169011487724e-1, TEST_TOL6); + + TEST (gsl_cdf_tdist_P, (0.0, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1e-100, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.001, 2.0), 5.00353553302204959e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.01, 2.0), 5.03535445520899514e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.1, 2.0), 5.35267280792929913e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.325, 2.0), 6.11985772746873767e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.0, 2.0), 7.88675134594812882e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.5, 2.0), 8.63803437554499460e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (2.0, 2.0), 9.08248290463863016e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10.0, 2.0), 9.95073771488337154e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (20.0, 2.0), 9.98754668053816452e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (100.0, 2.0), 9.99950007498750219e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1000.0, 2.0), 9.99999500000749945e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10000.0, 2.0), 9.999999950000000739e-01, TEST_TOL6); + + TEST (gsl_cdf_tdist_Q, (0.0, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1e-100, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.001, 2.0), 4.99646446697795041e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.01, 2.0), 4.96464554479100486e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.1, 2.0), 4.64732719207070087e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.325, 2.0), 3.88014227253126233e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.0, 2.0), 2.11324865405187118e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.5, 2.0), 1.36196562445500540e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (2.0, 2.0), 9.17517095361369836e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (10.0, 2.0), 4.92622851166284542e-3, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (20.0, 2.0), 1.24533194618354849e-3, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (100.0, 2.0), 4.99925012497812894e-5, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1000.0, 2.0), 4.99999250001249998e-7, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (10000.0, 2.0), 4.99999992500000125e-9, TEST_TOL6); + + TEST (gsl_cdf_tdist_P, (-1e-100, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.001, 2.0), 4.99646446697795041e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.01, 2.0), 4.96464554479100486e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.1, 2.0), 4.64732719207070087e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.325, 2.0), 3.88014227253126233e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.0, 2.0), 2.11324865405187118e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.5, 2.0), 1.36196562445500540e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-2.0, 2.0), 9.17517095361369836e-02, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-10.0, 2.0), 4.92622851166284542e-03, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-20.0, 2.0), 1.24533194618354849e-03, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-100.0, 2.0), 4.99925012497812894e-05, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1000.0, 2.0), 4.99999250001249998e-07, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-10000.0, 2.0), 4.99999992500000125e-09, TEST_TOL6); + + TEST (gsl_cdf_tdist_Q, (-1e-100, 2.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.001, 2.0), 5.00353553302204959e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.01, 2.0), 5.03535445520899514e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.1, 2.0), 5.35267280792929913e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.325, 2.0), 6.11985772746873767e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.0, 2.0), 7.88675134594812882e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.5, 2.0), 8.63803437554499460e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-2.0, 2.0), 9.08248290463863016e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10.0, 2.0), 9.95073771488337155e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-20.0, 2.0), 9.98754668053816452e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-100.0, 2.0), 9.99950007498750219e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1000.0, 2.0), 9.99999500000749999e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10000.0, 2.0), 9.99999995000000075e-1, TEST_TOL6); + + TEST (gsl_cdf_tdist_P, (0.0, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1e-100, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.001, 300.0), 5.00398609900942949e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.01, 300.0), 5.03986033020559088e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.1, 300.0), 5.39794441177768194e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (0.325, 300.0), 6.27296201542523812e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.0, 300.0), 8.40941797784686861e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1.5, 300.0), 9.32666983425369137e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (2.0, 300.0), 9.76799239508425455e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10.0, 300.0), 1.00000000000000000e+00, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (20.0, 300.0), 1.00000000000000000e+00, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (100.0, 300.0), 1.00000000000000000e+00, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (1000.0, 300.0), 1.00000000000000000e+00, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (10000.0, 300.0), 1.00000000000000000e+00, TEST_TOL6); + + TEST (gsl_cdf_tdist_Q, (0.0, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1e-100, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.001, 300.0), 4.99601390099057051e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.01, 300.0), 4.96013966979440912e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.1, 300.0), 4.60205558822231806e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (0.325, 300.0), 3.72703798457476188e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.0, 300.0), 1.59058202215313138e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1.5, 300.0), 6.73330165746308628e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (2.0, 300.0), 2.32007604915745452e-2, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (10.0, 300.0), 8.279313677e-21, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (20.0, 300.0), 1.93159812815803978e-57, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (100.0, 300.0), 1.02557519997736154e-232, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (1000.0, 300.0), 0.00000000000000000e+00, 0.0); + TEST (gsl_cdf_tdist_Q, (10000.0, 300.0), 0.00000000000000000e+00, 0.0); + + TEST (gsl_cdf_tdist_P, (-1e-100, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.001, 300.0), 4.99601390099057051e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.01, 300.0), 4.96013966979440912e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.1, 300.0), 4.60205558822231806e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-0.325, 300.0), 3.72703798457476188e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.0, 300.0), 1.59058202215313138e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1.5, 300.0), 6.73330165746308628e-02, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-2.0, 300.0), 2.32007604915745452e-02, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-10.0, 300.0), 8.279313675556272534e-21, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-20.0, 300.0), 1.93159812815803978e-57, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-100.0, 300.0), 1.02557519997736154e-232, TEST_TOL6); + TEST (gsl_cdf_tdist_P, (-1000.0, 300.0), 0.0, 0.0); + TEST (gsl_cdf_tdist_P, (-10000.0, 300.0), 0.0, 0.0); + + TEST (gsl_cdf_tdist_Q, (-1e-100, 300.0), 5.00000000000000000e-01, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.001, 300.0), 5.00398609900942949e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.01, 300.0), 5.03986033020559088e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.1, 300.0), 5.39794441177768194e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-0.325, 300.0), 6.27296201542523812e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.0, 300.0), 8.40941797784686862e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1.5, 300.0), 9.32666983425369137e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-2.0, 300.0), 9.76799239508425455e-1, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10.0, 300.0), 1.000000000000000000e0, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-20.0, 300.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-100.0, 300.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-1000.0, 300.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Q, (-10000.0, 300.0), 1.0, TEST_TOL6); +} + + /* Tests for F distribution */ + + /* p(x, nu1, nu2) := betaI(1 / (1 + (nu2 / nu1) / x), nu1 / 2, nu2 / 2) */ + +void test_fdist (void) { + TEST (gsl_cdf_fdist_P, (0.0, 1.2, 1.3), 0.0, 0.0); + TEST (gsl_cdf_fdist_P, (1e-100, 1.2, 1.3), 6.98194275525039002e-61, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.001, 1.2, 1.3), 1.10608485860238564e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.01, 1.2, 1.3), 4.38636757068313850e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.1, 1.2, 1.3), 1.68242392712840734e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.325, 1.2, 1.3), 3.14130045246195449e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.0, 1.2, 1.3), 5.09630779074755253e-01, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.5, 1.2, 1.3), 5.83998640641553852e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (2.0, 1.2, 1.3), 6.34733581351938787e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10.0, 1.2, 1.3), 8.48446237879200975e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (20.0, 1.2, 1.3), 9.00987726336875039e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (100.0, 1.2, 1.3), 9.64489127047688435e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1000.0, 1.2, 1.3), 9.92012051694116388e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10000.0, 1.2, 1.3), 9.98210862808842585e-1, TEST_TOL6); + + TEST (gsl_cdf_fdist_Q, (0.0, 1.2, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1e-100, 1.2, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.001, 1.2, 1.3), 9.88939151413976144e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.01, 1.2, 1.3), 9.56136324293168615e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.1, 1.2, 1.3), 8.31757607287159265e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.325, 1.2, 1.3), 6.85869954753804551e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.0, 1.2, 1.3), 4.90369220925244747e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.5, 1.2, 1.3), 4.16001359358446148e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (2.0, 1.2, 1.3), 3.65266418648061213e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10.0, 1.2, 1.3), 1.51553762120799025e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (20.0, 1.2, 1.3), 9.90122736631249612e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (100.0, 1.2, 1.3), 3.55108729523115643e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1000.0, 1.2, 1.3), 7.98794830588361109e-3, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10000.0, 1.2, 1.3), 1.7891371911574145e-3, TEST_TOL6); + + + /* computed with gp-pari */ + + TEST (gsl_cdf_fdist_P, (3.479082213465832574, 1, 4040712), 0.93785072763723411967, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (3.002774644786533109, 1, 4040712), 0.91687787379476055771, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (3.000854441173130827, 1, 4040712), 0.91677930719813578619, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (3.000064021622133037, 1, 4040712), 0.9167386972447996480399, TEST_TOL6); + + TEST (gsl_cdf_fdist_P, (0.0, 500.0, 1.3), 0.0, 0.0); + TEST (gsl_cdf_fdist_P, (1e-100, 500.0, 1.3), 0.0, 0.0); + + TEST (gsl_cdf_fdist_P, (0.001, 500.0, 1.3), 9.83434460393304765e-141, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.01, 500.0, 1.3), 1.45915624888550014e-26, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.1, 500.0, 1.3), 5.89976509619688165e-4, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.325, 500.0, 1.3), 6.86110486051542533e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.0, 500.0, 1.3), 3.38475053806404615e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.5, 500.0, 1.3), 4.52016245247457422e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (2.0, 500.0, 1.3), 5.27339068937388798e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10.0, 500.0, 1.3), 8.16839628578413905e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (20.0, 500.0, 1.3), 8.81784623056911406e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (100.0, 500.0, 1.3), 9.58045057204221295e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1000.0, 500.0, 1.3), 9.90585749380655275e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10000.0, 500.0, 1.3), 9.97891924831461387e-1, TEST_TOL6); + + TEST (gsl_cdf_fdist_Q, (0.0, 500.0, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1e-100, 500.0, 1.3), 1.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Q, (0.001, 500.0, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.01, 500.0, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.1, 500.0, 1.3), 9.99410023490380312e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.325, 500.0, 1.3), 9.31388951394845747e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.0, 500.0, 1.3), 6.61524946193595385e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.5, 500.0, 1.3), 5.47983754752542572e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (2.0, 500.0, 1.3), 4.72660931062611202e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10.0, 500.0, 1.3), 1.83160371421586096e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (20.0, 500.0, 1.3), 1.18215376943088595e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (100.0, 500.0, 1.3), 4.19549427957787016e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1000.0, 500.0, 1.3), 9.41425061934473424e-3, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10000.0, 500.0, 1.3), 2.10807516853862603e-3, TEST_TOL6); + + TEST (gsl_cdf_fdist_P, (0.0, 1.2, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_P, (1e-100, 1.2, 500.0), 8.23342055585482999e-61, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.001, 1.2, 500.0), 1.30461496441289529e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.01, 1.2, 500.0), 5.18324224608033294e-2, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.1, 1.2, 500.0), 2.02235101716076289e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.325, 1.2, 500.0), 3.90502983219393749e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.0, 1.2, 500.0), 6.67656191574653619e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.5, 1.2, 500.0), 7.75539230271467054e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (2.0, 1.2, 500.0), 8.45209114904613705e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10.0, 1.2, 500.0), 9.99168017659120988e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (20.0, 1.2, 500.0), 9.99998005738371669e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (100.0, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1000.0, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10000.0, 1.2, 500.0), 1.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Q, (0.0, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1e-100, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.001, 1.2, 500.0), 9.86953850355871047e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.01, 1.2, 500.0), 9.48167577539196671e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.1, 1.2, 500.0), 7.97764898283923711e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.325, 1.2, 500.0), 6.09497016780606251e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.0, 1.2, 500.0), 3.32343808425346381e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.5, 1.2, 500.0), 2.24460769728532946e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (2.0, 1.2, 500.0), 1.54790885095386295e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10.0, 1.2, 500.0), 8.3198234087901168e-4, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (20.0, 1.2, 500.0), 1.99426162833131e-6, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (100.0, 1.2, 500.0), 6.23302662288217117e-25, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1000.0, 1.2, 500.0), 1.14328577259666930e-134, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10000.0, 1.2, 500.0), 0.0, 0.0); + + + TEST (gsl_cdf_fdist_P, (0.0, 200.0, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_P, (1e-100, 200.0, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_P, (0.001, 200.0, 500.0), 4.09325080403669893e-251, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.01, 200.0, 500.0), 1.17894325419628688e-151, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.1, 200.0, 500.0), 5.92430940796861258e-57, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (0.325, 200.0, 500.0), 3.18220452357263554e-18, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.0, 200.0, 500.0), 5.06746326121168266e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1.5, 200.0, 500.0), 9.99794175718712438e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (2.0, 200.0, 500.0), 9.99999999528236152e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10.0, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (20.0, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (100.0, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (1000.0, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_P, (10000.0, 200.0, 500.0), 1.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Q, (0.0, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1e-100, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.001, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.01, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.1, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (0.325, 200.0, 500.0), 9.99999999999999997e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.0, 200.0, 500.0), 4.93253673878831734e-1, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1.5, 200.0, 500.0), 2.05824281287561795e-4, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (2.0, 200.0, 500.0), 4.71763848371410786e-10, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (10.0, 200.0, 500.0), 5.98048337181948436e-96, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (20.0, 200.0, 500.0), 2.92099265879979502e-155, TEST_TOL6); + TEST (gsl_cdf_fdist_Q, (1000.0, 200.0, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_Q, (10000.0, 200.0, 500.0), 0.0, 0.0); +} + +void test_finv (void) { + TEST (gsl_cdf_fdist_Pinv, (0.0, 1.2, 1.3), 0.0, 0.0); + TEST (gsl_cdf_fdist_Pinv, ( 6.98194275525039002e-61, 1.2, 1.3), 1e-100, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.10608485860238564e-2, 1.2, 1.3), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 4.38636757068313850e-2, 1.2, 1.3), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.68242392712840734e-1, 1.2, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 3.14130045246195449e-1, 1.2, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.09630779074755253e-01, 1.2, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.83998640641553852e-1, 1.2, 1.3), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 6.34733581351938787e-1, 1.2, 1.3), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 8.48446237879200975e-1, 1.2, 1.3), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.00987726336875039e-1, 1.2, 1.3), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.64489127047688435e-1, 1.2, 1.3), 100.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.92012051694116388e-1, 1.2, 1.3), 1000.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.98210862808842585e-1, 1.2, 1.3), 10000.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Qinv, ( 1.0, 1.2, 1.3), 0.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.88939151413976144e-1, 1.2, 1.3), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.56136324293168615e-1, 1.2, 1.3), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 8.31757607287159265e-1, 1.2, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 6.85869954753804551e-1, 1.2, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.90369220925244747e-1, 1.2, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.16001359358446148e-1, 1.2, 1.3), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 3.65266418648061213e-1, 1.2, 1.3), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.51553762120799025e-1, 1.2, 1.3), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.90122736631249612e-2, 1.2, 1.3), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 3.55108729523115643e-2, 1.2, 1.3), 100.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 7.98794830588361109e-3, 1.2, 1.3), 1000.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.7891371911574145e-3, 1.2, 1.3), 10000.0, TEST_TOL6); + + + TEST (gsl_cdf_fdist_Pinv, ( 0.0, 500.0, 1.3), 0.0, 0.0); + + TEST (gsl_cdf_fdist_Pinv, ( 9.83434460393304765e-141, 500.0, 1.3), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.45915624888550014e-26, 500.0, 1.3), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.89976509619688165e-4, 500.0, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 6.86110486051542533e-2, 500.0, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 3.38475053806404615e-1, 500.0, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 4.52016245247457422e-1, 500.0, 1.3), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.27339068937388798e-1, 500.0, 1.3), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 8.16839628578413905e-1, 500.0, 1.3), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 8.81784623056911406e-1, 500.0, 1.3), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.58045057204221295e-1, 500.0, 1.3), 100.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.90585749380655275e-1, 500.0, 1.3), 1000.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.97891924831461387e-1, 500.0, 1.3), 10000.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Qinv, ( 1.0, 500.0, 1.3), 0.0, TEST_TOL6); + + /* + * The algorithm currently implemented in gsl_cdf_fdist_Qinv and Pinv + * are not accurate for very large degrees of freedom, so the tests + * here are commented out. Another algorithm more suitable for + * these extreme values might pass these tests. + */ + + TEST (gsl_cdf_fdist_Qinv, ( 9.99410023490380312e-1, 500.0, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.31388951394845747e-1, 500.0, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 6.61524946193595385e-1, 500.0, 1.3), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 5.47983754752542572e-1, 500.0, 1.3), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.72660931062611202e-1, 500.0, 1.3), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.83160371421586096e-1, 500.0, 1.3), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.18215376943088595e-1, 500.0, 1.3), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.19549427957787016e-2, 500.0, 1.3), 100.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.41425061934473424e-3, 500.0, 1.3), 1000.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 2.10807516853862603e-3, 500.0, 1.3), 10000.0, TEST_TOL6); + + TEST (gsl_cdf_fdist_Pinv, ( 0.0, 1.2, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_Pinv, ( 8.23342055585482999e-61, 1.2, 500.0), 1e-100, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.30461496441289529e-2, 1.2, 500.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.18324224608033294e-2, 1.2, 500.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 2.02235101716076289e-1, 1.2, 500.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 3.90502983219393749e-1, 1.2, 500.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 6.67656191574653619e-1, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 7.75539230271467054e-1, 1.2, 500.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 8.45209114904613705e-1, 1.2, 500.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.99168017659120988e-1, 1.2, 500.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.99998005738371669e-1, 1.2, 500.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.0, 1.2, 500.0), GSL_POSINF, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.0, 1.2, 500.0), GSL_POSINF, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.0, 1.2, 500.0), GSL_POSINF, TEST_TOL6); + + TEST (gsl_cdf_fdist_Qinv, ( 1.0, 1.2, 500.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.86953850355871047e-1, 1.2, 500.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 9.48167577539196671e-1, 1.2, 500.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 7.97764898283923711e-1, 1.2, 500.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 6.09497016780606251e-1, 1.2, 500.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 3.32343808425346381e-1, 1.2, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 2.24460769728532946e-1, 1.2, 500.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.54790885095386295e-1, 1.2, 500.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 8.3198234087901168e-4, 1.2, 500.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.99426162833131e-6, 1.2, 500.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 6.23302662288217117e-25, 1.2, 500.0), 100.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 1.14328577259666930e-134, 1.2, 500.0), 1000.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 0.0, 1.2, 500.0), GSL_POSINF, 0.0); + + TEST (gsl_cdf_fdist_Pinv, ( 0.0, 200.0, 500.0), 0.0, 0.0); + TEST (gsl_cdf_fdist_Pinv, ( 4.09325080403669893e-251, 200.0, 500.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.17894325419628688e-151, 200.0, 500.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.92430940796861258e-57, 200.0, 500.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 3.18220452357263554e-18, 200.0, 500.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 5.06746326121168266e-1, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 9.99794175718712438e-1, 200.0, 500.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Pinv, ( 1.0, 200.0, 500.0), GSL_POSINF, TEST_TOL6); + + TEST (gsl_cdf_fdist_Qinv, ( 1.0, 200.0, 500.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.93253673878831734e-1, 200.0, 500.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 2.05824281287561795e-4, 200.0, 500.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 4.71763848371410786e-10, 200.0, 500.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 5.98048337181948436e-96, 200.0, 500.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 2.92099265879979502e-155, 200.0, 500.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_fdist_Qinv, ( 0.0, 200.0, 500.0), GSL_POSINF, 0.0); + + TEST (gsl_cdf_fdist_Pinv, (0.95,1.0,261.0), 3.8773340322508720313e+00, TEST_TOL3); +} + + /* Tests for gamma distribution */ + + /* p(x, a, b) := gammaP(b, x / a) */ + +void test_gamma (void) +{ + TEST (gsl_cdf_gamma_P, (0.0, 1.0, 1.0), 0.0, 0.0); + TEST (gsl_cdf_gamma_P, (1e-100, 1.0, 1.0), 1e-100, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.001, 1.0, 1.0), 9.99500166625008332e-4, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.01, 1.0, 1.0), 9.95016625083194643e-3, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.1, 1.0, 1.0), 9.51625819640404268e-2, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.325, 1.0, 1.0), 2.77472646357927811e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.0, 1.0, 1.0), 6.32120558828557678e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.5, 1.0, 1.0), 7.76869839851570171e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (2.0, 1.0, 1.0), 8.64664716763387308e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10.0, 1.0, 1.0), 9.99954600070237515e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (20.0, 1.0, 1.0), 9.99999997938846378e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (100.0, 1.0, 1.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1000.0, 1.0, 1.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10000.0, 1.0, 1.0), 1e0, TEST_TOL6); + + TEST (gsl_cdf_gamma_Q, (0.0, 1.0, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1e-100, 1.0, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.001, 1.0, 1.0), 9.99000499833374992e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.01, 1.0, 1.0), 9.90049833749168054e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.1, 1.0, 1.0), 9.04837418035959573e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.325, 1.0, 1.0), 7.22527353642072189e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.0, 1.0, 1.0), 3.67879441171442322e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.5, 1.0, 1.0), 2.23130160148429829e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (2.0, 1.0, 1.0), 1.35335283236612692e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (10.0, 1.0, 1.0), 4.53999297624848515e-5, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (20.0, 1.0, 1.0), 2.06115362243855783e-9, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (100.0, 1.0, 1.0), 3.72007597602083596e-44, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1000.0, 1.0, 1.0), 0.0, 0.0); + TEST (gsl_cdf_gamma_Q, (10000.0, 1.0, 1.0), 0.0, 0.0); + + TEST (gsl_cdf_gamma_P, (0.0, 1.0, 10.0), 0.0, 0.0); + TEST (gsl_cdf_gamma_P, (1e-100, 1.0, 10.0), 1e-101, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.001, 1.0, 10.0), 9.99950001666625001e-5, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.01, 1.0, 10.0), 9.99500166625008332e-4, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.1, 1.0, 10.0), 9.95016625083194643e-3, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.325, 1.0, 10.0), 3.19775501686939529e-2, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.0, 1.0, 10.0), 9.51625819640404268e-2, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.5, 1.0, 10.0), 1.39292023574942193e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (2.0, 1.0, 10.0), 1.81269246922018141e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10.0, 1.0, 10.0), 6.32120558828557678e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (20.0, 1.0, 10.0), 8.64664716763387308e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (100.0, 1.0, 10.0), 9.99954600070237515e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1000.0, 1.0, 10.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10000.0, 1.0, 10.0), 1e0, TEST_TOL6); + + TEST (gsl_cdf_gamma_Q, (0.0, 1.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1e-100, 1.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.001, 1.0, 10.0), 9.99900004999833337e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.01, 1.0, 10.0), 9.99000499833374992e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.1, 1.0, 10.0), 9.90049833749168054e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.325, 1.0, 10.0), 9.68022449831306047e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.0, 1.0, 10.0), 9.04837418035959573e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.5, 1.0, 10.0), 8.60707976425057807e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (2.0, 1.0, 10.0), 8.18730753077981859e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (10.0, 1.0, 10.0), 3.67879441171442322e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (20.0, 1.0, 10.0), 1.35335283236612692e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (100.0, 1.0, 10.0), 4.53999297624848515e-5, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1000.0, 1.0, 10.0), 3.72007597602083596e-44, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (10000.0, 1.0, 10.0), 0.0, 0.0); + + TEST (gsl_cdf_gamma_P, (0.0, 17.0, 10.0), 0e0, 0.0); + TEST (gsl_cdf_gamma_P, (1e-100, 17.0, 10.0), 0e0, 0.0); + TEST (gsl_cdf_gamma_P, (0.001, 17.0, 10.0), 2.81119174040422844e-83, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.01, 17.0, 10.0), 2.80880324651985887e-66, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.1, 17.0, 10.0), 2.78502998087492130e-49, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (0.325, 17.0, 10.0), 1.37283653245125844e-40, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.0, 17.0, 10.0), 2.55811932292544243e-32, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1.5, 17.0, 10.0), 2.40420441175422372e-29, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (2.0, 17.0, 10.0), 3.05092926217898577e-27, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10.0, 17.0, 10.0), 1.094920130378183e-15, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (20.0, 17.0, 10.0), 5.60605096173161688e-11, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (100.0, 17.0, 10.0), 2.70416097848011280e-2, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (1000.0, 17.0, 10.0), 1.000000000000000000e0, TEST_TOL6); + TEST (gsl_cdf_gamma_P, (10000.0, 17.0, 10.0), 1.000000000000000000e0, TEST_TOL6); + + TEST (gsl_cdf_gamma_Q, (0.0, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1e-100, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.001, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.01, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.1, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (0.325, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.0, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1.5, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (2.0, 17.0, 10.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (10.0, 17.0, 10.0), 9.99999999999998905e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (20.0, 17.0, 10.0), 9.99999999943939490e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (100.0, 17.0, 10.0), 9.72958390215198872e-1, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (1000.0, 17.0, 10.0), 2.11200951633948570e-25, TEST_TOL6); + TEST (gsl_cdf_gamma_Q, (10000.0, 17.0, 10.0), 0.0, 0.0); +} + +void test_chisq (void) { + TEST (gsl_cdf_chisq_P, (0.0, 13.0), 0.0, 0.0); + TEST (gsl_cdf_chisq_P, (1e-100, 13.0), 0.0, 0.0); + TEST (gsl_cdf_chisq_P, (0.001, 13.0), 1.86631102655845996e-25, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (0.01, 13.0), 5.87882248504529790e-19, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (0.1, 13.0), 1.78796983358555410e-12, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (0.325, 13.0), 3.44611313779905183e-9, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (1.0, 13.0), 3.83473473513595154e-6, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (1.5, 13.0), 4.31718389201041932e-5, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (2.0, 13.0), 2.26250084656047180e-4, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (10.0, 13.0), 3.06065632019251110e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (20.0, 13.0), 9.04789743921908487e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (100.0, 13.0), 9.99999999999998341e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (1000.0, 13.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_chisq_P, (10000.0, 13.0), 1e0, TEST_TOL6); + + TEST (gsl_cdf_chisq_Q, (0.0, 13.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (1e-100, 13.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (0.001, 13.0), 1e0, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (0.01, 13.0), 9.99999999999999999e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (0.1, 13.0), 9.99999999998212030e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (0.325, 13.0), 9.99999996553886862e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (1.0, 13.0), 9.99996165265264864e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (1.5, 13.0), 9.99956828161079896e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (2.0, 13.0), 9.99773749915343953e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (10.0, 13.0), 6.93934367980748890e-1, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (20.0, 13.0), 9.52102560780915127e-2, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (100.0, 13.0), 1.65902608070858809e-15, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (1000.0, 13.0), 1.74851191544860225e-205, TEST_TOL6); + TEST (gsl_cdf_chisq_Q, (10000.0, 13.0), 0.0, 0.0); +} + + + /* Beta distribution */ + +void test_beta (void) { + TEST (gsl_cdf_beta_P, (0.0, 1.2, 1.3), 0.0, 0.0); + TEST (gsl_cdf_beta_P, (1e-100, 1.2, 1.3), 1.34434944656489596e-120, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.001, 1.2, 1.3), 3.37630042504535813e-4, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.01, 1.2, 1.3), 5.34317264038929473e-3, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.1, 1.2, 1.3), 8.33997828306748346e-2, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.325, 1.2, 1.3), 3.28698654180583916e-1, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.5, 1.2, 1.3), 5.29781429451299081e-1, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.9, 1.2, 1.3), 9.38529397224430659e-1, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.99, 1.2, 1.3), 9.96886438341254380e-1, TEST_TOL6); + TEST (gsl_cdf_beta_P, (0.999, 1.2, 1.3), 9.99843792833067634e-1, TEST_TOL6); + TEST (gsl_cdf_beta_P, (1.0, 1.2, 1.3), 1.0, TEST_TOL6); + + TEST (gsl_cdf_beta_Q, (0.0, 1.2, 1.3), 1.0, 0.0); + TEST (gsl_cdf_beta_Q, (1e-100, 1.2, 1.3), 1e0, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.001, 1.2, 1.3), 9.99662369957495464e-1, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.01, 1.2, 1.3), 9.94656827359610705e-1, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.1, 1.2, 1.3), 9.16600217169325165e-1, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.325, 1.2, 1.3), 6.71301345819416084e-1, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.5, 1.2, 1.3), 4.70218570548700919e-1, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.9, 1.2, 1.3), 6.14706027755693408e-2, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.99, 1.2, 1.3), 3.11356165874561958e-3, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (0.999, 1.2, 1.3), 1.56207166932365759e-4, TEST_TOL6); + TEST (gsl_cdf_beta_Q, (1.0, 1.2, 1.3), 0.0, TEST_TOL6); +} + +void test_betainv (void) { + TEST (gsl_cdf_beta_Pinv, (0.0, 1.2, 1.3), 0.0, 0.0); + TEST (gsl_cdf_beta_Pinv, ( 1.34434944656489596e-120, 1.2, 1.3), 1e-100, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 3.37630042504535813e-4, 1.2, 1.3), 0.001, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 5.34317264038929473e-3, 1.2, 1.3), 0.01, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 8.33997828306748346e-2, 1.2, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 3.28698654180583916e-1, 1.2, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 5.29781429451299081e-1, 1.2, 1.3), 0.5, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 9.38529397224430659e-1, 1.2, 1.3), 0.9, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 9.96886438341254380e-1, 1.2, 1.3), 0.99, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 9.99843792833067634e-1, 1.2, 1.3), 0.999, TEST_TOL6); + TEST (gsl_cdf_beta_Pinv, ( 1.0, 1.2, 1.3), 1.0, TEST_TOL6); + + TEST (gsl_cdf_beta_Qinv, ( 1.0, 1.2, 1.3), 0.0, 0.0); + TEST (gsl_cdf_beta_Qinv, ( 1e0, 1.2, 1.3), 0.0, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 9.99662369957495464e-1, 1.2, 1.3), 0.001, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 9.94656827359610705e-1, 1.2, 1.3), 0.01, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 9.16600217169325165e-1, 1.2, 1.3), 0.1, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 6.71301345819416084e-1, 1.2, 1.3), 0.325, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 4.70218570548700919e-1, 1.2, 1.3), 0.5, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 6.14706027755693408e-2, 1.2, 1.3), 0.9, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 3.11356165874561958e-3, 1.2, 1.3), 0.99, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 1.56207166932365759e-4, 1.2, 1.3), 0.999, TEST_TOL6); + TEST (gsl_cdf_beta_Qinv, ( 0.0, 1.2, 1.3), 1.0, TEST_TOL6); + + TEST (gsl_cdf_beta_Pinv, ( 0.025, 2133.0, 7868.0), 0.20530562929915865457928654, TEST_TOL6); +} + +void test_gammainv (void) { + TEST (gsl_cdf_gamma_Pinv, (0.0, 1.0, 1.0), 0.0, 0.0); + TEST (gsl_cdf_gamma_Pinv, (1e-100, 1.0, 1.0), 1e-100, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (9.99500166625008332e-4, 1.0, 1.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (9.95016625083194643e-3, 1.0, 1.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (9.51625819640404268e-2, 1.0, 1.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (2.77472646357927811e-1, 1.0, 1.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (6.32120558828557678e-1, 1.0, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (7.76869839851570171e-1, 1.0, 1.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (8.64664716763387308e-1, 1.0, 1.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (9.99954600070237515e-1, 1.0, 1.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (9.99999997938846378e-1, 1.0, 1.0), 20.0, 100 * TEST_TOL6); + TEST (gsl_cdf_gamma_Pinv, (1.0, 1.0, 1.0), GSL_POSINF, 0.0); + + /* Test case from Benjamin Redelings */ + /* fails on x86_64, FIXME test value is from octave -- get high precision value */ + TEST (gsl_cdf_gamma_Pinv, (0.1, 11.887411491530846,1.0), 7.73788447848618e+00, TEST_TOL1); + + TEST (gsl_cdf_gamma_Qinv, (0.0, 1.0, 1.0), GSL_POSINF, 0.0); + TEST (gsl_cdf_gamma_Qinv, (2.06115362243855783e-9, 1.0, 1.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (4.53999297624848515e-5, 1.0, 1.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (1.35335283236612692e-1, 1.0, 1.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (2.23130160148429829e-1, 1.0, 1.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (3.67879441171442322e-1, 1.0, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (7.22527353642072189e-1, 1.0, 1.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (9.04837418035959573e-1, 1.0, 1.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (9.90049833749168054e-1, 1.0, 1.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (9.99000499833374992e-1, 1.0, 1.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_gamma_Qinv, (1.0, 1.0, 1.0), 0.0, 0.0); +} + +void test_chisqinv (void) { + TEST (gsl_cdf_chisq_Pinv, (0.0, 13.0), 0.0, 0.0); + TEST (gsl_cdf_chisq_Pinv, (1.86631102655845996e-25, 13.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (5.87882248504529790e-19, 13.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (1.78796983358555410e-12, 13.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (3.44611313779905183e-9, 13.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (3.83473473513595154e-6, 13.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (4.31718389201041932e-5, 13.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (2.26250084656047180e-4, 13.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (3.06065632019251110e-1, 13.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (9.04789743921908487e-1, 13.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (9.99999999999998341e-1, 13.0), 100.0, 0.01); + TEST (gsl_cdf_chisq_Pinv, (1e0, 13.0), GSL_POSINF, 0.0); + + TEST (gsl_cdf_chisq_Pinv, (1.93238145206123590e-01, 1.5), 0.211980092931799521729407, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (4.83e-8, 19.19), 1.632280186860266704532868343, TEST_TOL6); + + /* Test cases for bug 24704 */ + TEST (gsl_cdf_chisq_Pinv, (0.05, 1263131.0), 1260517.771133388726131469059, TEST_TOL6); + TEST (gsl_cdf_chisq_Pinv, (0.05, 2526262.0), 2522565.864973351096735720202, TEST_TOL6); + + TEST (gsl_cdf_chisq_Qinv, (0.0, 13.0), GSL_POSINF, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (1.65902608070858809e-15, 13.0), 100.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (9.52102560780915127e-2, 13.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (6.93934367980748892e-1, 13.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (9.99773749915343954e-1, 13.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (9.99956828161079894e-1, 13.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (9.99996165265264863e-1, 13.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_chisq_Qinv, (9.99999996553886862e-1, 13.0), 0.325, 1e-6); + TEST (gsl_cdf_chisq_Qinv, (9.99999999998212031e-1, 13.0), 0.1, 1e-5); + TEST (gsl_cdf_chisq_Qinv, (1.0, 13.0), 0.0, 0.0); +} + +void test_tdistinv (void) { + TEST (gsl_cdf_tdist_Pinv, (0.5, 1.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.00318309780080559e-1, 1.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.03182992764908255e-1, 1.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.31725517430553569e-1, 1.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (6.00023120032852123e-1, 1.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (0.75000000000000000e0, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (8.12832958189001183e-1, 1.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (8.52416382349566726e-1, 1.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.68274482569446430e-1, 1.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.84097748743823625e-1, 1.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.96817007235091745e-1, 1.0), 100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.99681690219919441e-1, 1.0), 1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.99968169011487724e-1, 1.0), 10000.0, TEST_TOL6); + + TEST (gsl_cdf_tdist_Qinv, (0.5, 1.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.99681690219919441e-1, 1.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.96817007235091745e-1, 1.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.68274482569446430e-1, 1.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.99976879967147876e-1, 1.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (2.5e-1, 1.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.87167041810998816e-1, 1.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.47583617650433274e-1, 1.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.17255174305535695e-2, 1.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.59022512561763752e-2, 1.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.18299276490825515e-3, 1.0), 100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.18309780080558939e-4, 1.0), 1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.18309885122757724e-5, 1.0), 10000.0, TEST_TOL6); + + TEST (gsl_cdf_tdist_Pinv, (4.99681690219919441e-1, 1.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.96817007235091744e-1, 1.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.68274482569446430e-1, 1.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.99976879967147876e-1, 1.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (0.25, 1.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.87167041810998816e-1, 1.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.47583617650433274e-1, 1.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.17255174305535695e-2, 1.0), -10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.59022512561763751e-2, 1.0), -20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.18299276490825514e-3, 1.0), -100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.18309780080558938e-4, 1.0), -1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.18309885122757724e-5, 1.0), -10000.0, TEST_TOL6); + + TEST (gsl_cdf_tdist_Qinv, (5.00318309780080559e-1, 1.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.03182992764908255e-1, 1.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.31725517430553570e-1, 1.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (6.00023120032852124e-1, 1.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (7.5e-1, 1.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (8.12832958189001184e-1, 1.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (8.52416382349566726e-1, 1.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.68274482569446430e-1, 1.0), -10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.84097748743823625e-1, 1.0), -20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.96817007235091745e-1, 1.0), -100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.99681690219919441e-1, 1.0), -1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.99968169011487724e-1, 1.0), -10000.0, TEST_TOL6); + + TEST (gsl_cdf_tdist_Pinv, (4.99646446697795041e-01, 2.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.96464554479100486e-01, 2.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.64732719207070087e-01, 2.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.88014227253126233e-01, 2.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (2.11324865405187118e-01, 2.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.36196562445500540e-01, 2.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.17517095361369836e-02, 2.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.92622851166284542e-03, 2.0), -10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.24533194618354849e-03, 2.0), -20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.99925012497812894e-05, 2.0), -100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.99999250001249998e-07, 2.0), -1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.99999992500000125e-09, 2.0), -10000.0, TEST_TOL6); + + TEST (gsl_cdf_tdist_Qinv, (5.00353553302204959e-1, 2.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.03535445520899514e-1, 2.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.35267280792929913e-1, 2.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (6.11985772746873767e-1, 2.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (7.88675134594812882e-1, 2.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (8.63803437554499460e-1, 2.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.08248290463863016e-1, 2.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.95073771488337155e-1, 2.0), -10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.98754668053816452e-1, 2.0), -20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.99950007498750219e-1, 2.0), -100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.99999500000749999e-1, 2.0), -1000.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.99999995000000075e-1, 2.0), -10000.0, 1e-6); + + TEST (gsl_cdf_tdist_Pinv, (5.00000000000000000e-01, 300.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.00398609900942949e-01, 300.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.03986033020559088e-01, 300.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (5.39794441177768194e-01, 300.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (6.27296201542523812e-01, 300.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (8.40941797784686861e-01, 300.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.32666983425369137e-01, 300.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (9.76799239508425455e-01, 300.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.00000000000000000e+00, 300.0), GSL_POSINF, 0.0); + + TEST (gsl_cdf_tdist_Qinv, (5.00000000000000000e-01, 300.0), 0.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.99601390099057051e-1, 300.0), 0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.96013966979440912e-1, 300.0), 0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (4.60205558822231806e-1, 300.0), 0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (3.72703798457476188e-1, 300.0), 0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.59058202215313138e-1, 300.0), 1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (6.73330165746308628e-2, 300.0), 1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (2.32007604915745452e-2, 300.0), 2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (8.279313677e-21, 300.0), 10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.93159812815803978e-57, 300.0), 20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.02557519997736154e-232, 300.0), 100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (0.00000000000000000e+00, 300.0), GSL_POSINF, 0.0); + + TEST (gsl_cdf_tdist_Pinv, (4.99601390099057051e-01, 300.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.96013966979440912e-01, 300.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (4.60205558822231806e-01, 300.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (3.72703798457476188e-01, 300.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.59058202215313138e-01, 300.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (6.73330165746308628e-02, 300.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (2.32007604915745452e-02, 300.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (8.279313675556272534e-21, 300.0), -10.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.93159812815803978e-57, 300.0), -20.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (1.02557519997736154e-232, 300.0), -100.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Pinv, (0.0, 300.0), GSL_NEGINF, 0.0); + + TEST (gsl_cdf_tdist_Qinv, (5.00398609900942949e-1, 300.0), -0.001, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.03986033020559088e-1, 300.0), -0.01, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (5.39794441177768194e-1, 300.0), -0.1, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (6.27296201542523812e-1, 300.0), -0.325, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (8.40941797784686862e-1, 300.0), -1.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.32666983425369137e-1, 300.0), -1.5, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (9.76799239508425455e-1, 300.0), -2.0, TEST_TOL6); + TEST (gsl_cdf_tdist_Qinv, (1.000000000000000000e0, 300.0), GSL_NEGINF, TEST_TOL6); +} + + + diff --git a/software/gsl-1.15/cdf/test_auto.c b/software/gsl-1.15/cdf/test_auto.c new file mode 100644 index 000000000..cf6f610b2 --- /dev/null +++ b/software/gsl-1.15/cdf/test_auto.c @@ -0,0 +1,1464 @@ +void test_auto_beta (void); + +void +test_auto_beta (void) +{ + TEST(gsl_cdf_beta_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e-10,1.3,2.7), 3.329258013904e-13, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000001e-09,1.3,2.7), 6.642743046207e-12, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e-08,1.3,2.7), 1.325401475350e-10, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.9999999999999995e-08,1.3,2.7), 2.644523387276e-09, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.9999999999999995e-07,1.3,2.7), 5.276513292646e-08, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000001e-05,1.3,2.7), 1.052793708285e-06, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e-04,1.3,2.7), 2.100417958505e-05, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e-03,1.3,2.7), 4.187261218400e-04, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e-02,1.3,2.7), 8.282559388393e-03, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000001e-01,1.3,2.7), 1.512194578010e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (2.0000000000000001e-01,1.3,2.7), 3.358123280407e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (2.9999999999999999e-01,1.3,2.7), 5.104163996495e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (4.0000000000000002e-01,1.3,2.7), 6.620682399410e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (5.0000000000000000e-01,1.3,2.7), 7.852786981833e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (5.9999999999999998e-01,1.3,2.7), 8.784005878950e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (8.0000000000000004e-01,1.3,2.7), 9.801824171406e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.0000000000000002e-01,1.3,2.7), 9.968736852365e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.8999999999999999e-01,1.3,2.7), 9.999936324464e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.9900000000000000e-01,1.3,2.7), 9.999999872699e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.9990000000000001e-01,1.3,2.7), 9.999999999746e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (9.9999000000000005e-01,1.3,2.7), 9.999999999999e-01, TEST_TOL6); + TEST(gsl_cdf_beta_P, (1.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_beta_Q, (1.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.9999000000000005e-01,1.3,2.7), 5.069044353228e-14, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.9990000000000001e-01,1.3,2.7), 2.540490259443e-11, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.9900000000000000e-01,1.3,2.7), 1.273010336738e-08, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.8999999999999999e-01,1.3,2.7), 6.367553598351e-06, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.0000000000000002e-01,1.3,2.7), 3.126314763488e-03, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (8.0000000000000004e-01,1.3,2.7), 1.981758285937e-02, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (5.9999999999999998e-01,1.3,2.7), 1.215994121050e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (5.0000000000000000e-01,1.3,2.7), 2.147213018167e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (4.0000000000000002e-01,1.3,2.7), 3.379317600590e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (2.9999999999999999e-01,1.3,2.7), 4.895836003505e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (2.0000000000000001e-01,1.3,2.7), 6.641876719593e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000001e-01,1.3,2.7), 8.487805421990e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000000e-02,1.3,2.7), 9.917174406116e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000000e-03,1.3,2.7), 9.995812738782e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000000e-04,1.3,2.7), 9.999789958204e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000001e-05,1.3,2.7), 9.999989472063e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.9999999999999995e-07,1.3,2.7), 9.999999472349e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (9.9999999999999995e-08,1.3,2.7), 9.999999973555e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000000e-08,1.3,2.7), 9.999999998675e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000001e-09,1.3,2.7), 9.999999999934e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (1.0000000000000000e-10,1.3,2.7), 9.999999999997e-01, TEST_TOL6); + TEST(gsl_cdf_beta_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_fdist (void); + +void +test_auto_fdist (void) +{ + TEST(gsl_cdf_fdist_P, (0.0000000000000000e+00,5.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e-10,5.3,2.7), 3.231380663090e-26, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000001e-09,5.3,2.7), 1.443404714791e-23, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e-08,5.3,2.7), 6.447451698511e-21, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (9.9999999999999995e-08,5.3,2.7), 2.879969407315e-18, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (9.9999999999999995e-07,5.3,2.7), 1.286428479993e-15, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000001e-05,5.3,2.7), 5.745970138195e-13, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e-04,5.3,2.7), 2.565314230632e-10, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e-03,5.3,2.7), 1.140026203760e-07, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e-02,5.3,2.7), 4.840333162527e-05, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000001e-01,5.3,2.7), 1.360698992545e-02, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+00,5.3,2.7), 4.532720490874e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+01,5.3,2.7), 9.461328174717e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+02,5.3,2.7), 9.973356976994e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+03,5.3,2.7), 9.998797338050e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+04,5.3,2.7), 9.999946222456e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+05,5.3,2.7), 9.999997597592e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+06,5.3,2.7), 9.999999892687e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+07,5.3,2.7), 9.999999995207e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+08,5.3,2.7), 9.999999999786e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+09,5.3,2.7), 9.999999999990e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_P, (1.0000000000000000e+10,5.3,2.7), 1.000000000000e-00, TEST_TOL6); + + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+10,5.3,2.7), 4.272202262298e-14, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+09,5.3,2.7), 9.564269502770e-13, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+08,5.3,2.7), 2.141173208523e-11, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+07,5.3,2.7), 4.793489218238e-10, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+06,5.3,2.7), 1.073127433440e-08, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+05,5.3,2.7), 2.402407758939e-07, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+04,5.3,2.7), 5.377754447932e-06, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+03,5.3,2.7), 1.202661950234e-04, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+02,5.3,2.7), 2.664302300604e-03, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+01,5.3,2.7), 5.386718252832e-02, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e+00,5.3,2.7), 5.467279509126e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000001e-01,5.3,2.7), 9.863930100746e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e-02,5.3,2.7), 9.999515966684e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e-03,5.3,2.7), 9.999998859974e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e-04,5.3,2.7), 9.999999997435e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000001e-05,5.3,2.7), 9.999999999994e-01, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (9.9999999999999995e-07,5.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (9.9999999999999995e-08,5.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e-08,5.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000001e-09,5.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (1.0000000000000000e-10,5.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_fdist_Q, (0.0000000000000000e+00,5.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_cauchy (void); + +void +test_auto_cauchy (void) +{ + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+10,1.3), 4.138028520389e-11, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285203892783e-11,1.3), -1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+09,1.3), 4.138028520389e-10, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285203892792e-10,1.3), -1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+08,1.3), 4.138028520389e-09, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285203892787e-09,1.3), -1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+07,1.3), 4.138028520389e-08, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285203892555e-08,1.3), -1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+06,1.3), 4.138028520387e-07, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285203869488e-07,1.3), -1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+05,1.3), 4.138028520156e-06, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380285201561693e-06,1.3), -1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+04,1.3), 4.138028497078e-05, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380284970783855e-05,1.3), -1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+03,1.3), 4.138026189302e-04, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1380261893022424e-04,1.3), -1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+02,1.3), 4.137795435084e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1377954350836910e-03,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+01,1.3), 4.114951182497e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.1149511824973506e-02,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e+00,1.3), 2.912855998398e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (2.9128559983984725e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000001e-01,1.3), 4.755627480278e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.7556274802780252e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e-02,1.3), 4.975515107069e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.9755151070688325e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e-03,1.3), 4.997551462897e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (4.9975514628969159e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e-04,1.3), 4.999755146242e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000001e-05,1.3), 4.999975514624e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-9.9999999999999995e-07,1.3), 4.999997551462e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-9.9999999999999995e-08,1.3), 4.999999755146e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e-08,1.3), 4.999999975515e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000001e-09,1.3), 4.999999997551e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (-1.0000000000000000e-10,1.3), 4.999999999755e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (5.0000000000000011e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e-10,1.3), 5.000000000245e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000001e-09,1.3), 5.000000002449e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e-08,1.3), 5.000000024485e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (9.9999999999999995e-08,1.3), 5.000000244854e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (9.9999999999999995e-07,1.3), 5.000002448538e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000001e-05,1.3), 5.000024485376e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e-04,1.3), 5.000244853758e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e-03,1.3), 5.002448537103e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (5.0024485371030836e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e-02,1.3), 5.024484892931e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (5.0244848929311670e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000001e-01,1.3), 5.244372519722e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (5.2443725197219748e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+00,1.3), 7.087144001602e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (7.0871440016015275e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+01,1.3), 9.588504881750e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (9.5885048817502649e-01,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+02,1.3), 9.958622045649e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (9.9586220456491636e-01,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+03,1.3), 9.995861973811e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Pinv, (9.9958619738106980e-01,1.3), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+04,1.3), 9.999586197150e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+05,1.3), 9.999958619715e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+06,1.3), 9.999995861971e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+07,1.3), 9.999999586197e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+08,1.3), 9.999999958620e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+09,1.3), 9.999999995862e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_P, (1.0000000000000000e+10,1.3), 9.999999999586e-01, TEST_TOL6); + + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+10,1.3), 4.138028520389e-11, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285203892783e-11,1.3), 1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+09,1.3), 4.138028520389e-10, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285203892792e-10,1.3), 1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+08,1.3), 4.138028520389e-09, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285203892787e-09,1.3), 1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+07,1.3), 4.138028520389e-08, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285203892555e-08,1.3), 1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+06,1.3), 4.138028520387e-07, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285203869488e-07,1.3), 1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+05,1.3), 4.138028520156e-06, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380285201561693e-06,1.3), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+04,1.3), 4.138028497078e-05, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380284970783855e-05,1.3), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+03,1.3), 4.138026189302e-04, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1380261893022424e-04,1.3), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+02,1.3), 4.137795435084e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1377954350836910e-03,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+01,1.3), 4.114951182497e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.1149511824973506e-02,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e+00,1.3), 2.912855998398e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (2.9128559983984725e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000001e-01,1.3), 4.755627480278e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.7556274802780252e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e-02,1.3), 4.975515107069e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.9755151070688325e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e-03,1.3), 4.997551462897e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (4.9975514628969159e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e-04,1.3), 4.999755146242e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000001e-05,1.3), 4.999975514624e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (9.9999999999999995e-07,1.3), 4.999997551462e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (9.9999999999999995e-08,1.3), 4.999999755146e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e-08,1.3), 4.999999975515e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000001e-09,1.3), 4.999999997551e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (1.0000000000000000e-10,1.3), 4.999999999755e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (5.0000000000000011e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e-10,1.3), 5.000000000245e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000001e-09,1.3), 5.000000002449e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e-08,1.3), 5.000000024485e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-9.9999999999999995e-08,1.3), 5.000000244854e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-9.9999999999999995e-07,1.3), 5.000002448538e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000001e-05,1.3), 5.000024485376e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e-04,1.3), 5.000244853758e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e-03,1.3), 5.002448537103e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (5.0024485371030836e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e-02,1.3), 5.024484892931e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (5.0244848929311670e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000001e-01,1.3), 5.244372519722e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (5.2443725197219748e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+00,1.3), 7.087144001602e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (7.0871440016015275e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+01,1.3), 9.588504881750e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (9.5885048817502649e-01,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+02,1.3), 9.958622045649e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (9.9586220456491636e-01,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+03,1.3), 9.995861973811e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Qinv, (9.9958619738106980e-01,1.3), -1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+04,1.3), 9.999586197150e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+05,1.3), 9.999958619715e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+06,1.3), 9.999995861971e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+07,1.3), 9.999999586197e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+08,1.3), 9.999999958620e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+09,1.3), 9.999999995862e-01, TEST_TOL6); + TEST(gsl_cdf_cauchy_Q, (-1.0000000000000000e+10,1.3), 9.999999999586e-01, TEST_TOL6); +} + +void test_auto_gaussian (void); + +void +test_auto_gaussian (void) +{ + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+02,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+01,1.3), 7.225229227927e-15, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (7.2252292279265077e-15,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e+00,1.3), 2.208781637125e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (2.2087816371245972e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000001e-01,1.3), 4.693423696034e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (4.6934236960338749e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e-02,1.3), 4.969312434916e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (4.9693124349158196e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e-03,1.3), 4.996931213530e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (4.9969312135303229e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e-04,1.3), 4.999693121323e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000001e-05,1.3), 4.999969312132e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-9.9999999999999995e-07,1.3), 4.999996931213e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-9.9999999999999995e-08,1.3), 4.999999693121e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e-08,1.3), 4.999999969312e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000001e-09,1.3), 4.999999996931e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (-1.0000000000000000e-10,1.3), 4.999999999693e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e-10,1.3), 5.000000000307e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000001e-09,1.3), 5.000000003069e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e-08,1.3), 5.000000030688e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (9.9999999999999995e-08,1.3), 5.000000306879e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (9.9999999999999995e-07,1.3), 5.000003068787e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000001e-05,1.3), 5.000030687868e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e-04,1.3), 5.000306878677e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e-03,1.3), 5.003068786470e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (5.0030687864696777e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e-02,1.3), 5.030687565084e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (5.0306875650841798e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000001e-01,1.3), 5.306576303966e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (5.3065763039661251e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+00,1.3), 7.791218362875e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Pinv, (7.7912183628754028e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+01,1.3), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_P, (1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+02,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+01,1.3), 7.225229227927e-15, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (7.2252292279265077e-15,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e+00,1.3), 2.208781637125e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (2.2087816371245972e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000001e-01,1.3), 4.693423696034e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (4.6934236960338749e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e-02,1.3), 4.969312434916e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (4.9693124349158196e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e-03,1.3), 4.996931213530e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (4.9969312135303229e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e-04,1.3), 4.999693121323e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000001e-05,1.3), 4.999969312132e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (9.9999999999999995e-07,1.3), 4.999996931213e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (9.9999999999999995e-08,1.3), 4.999999693121e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e-08,1.3), 4.999999969312e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000001e-09,1.3), 4.999999996931e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (1.0000000000000000e-10,1.3), 4.999999999693e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e-10,1.3), 5.000000000307e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000001e-09,1.3), 5.000000003069e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e-08,1.3), 5.000000030688e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-9.9999999999999995e-08,1.3), 5.000000306879e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-9.9999999999999995e-07,1.3), 5.000003068787e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000001e-05,1.3), 5.000030687868e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e-04,1.3), 5.000306878677e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e-03,1.3), 5.003068786470e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (5.0030687864696777e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e-02,1.3), 5.030687565084e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (5.0306875650841798e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000001e-01,1.3), 5.306576303966e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (5.3065763039661251e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+00,1.3), 7.791218362875e-01, TEST_TOL6); + TEST(gsl_cdf_gaussian_Qinv, (7.7912183628754028e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+01,1.3), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gaussian_Q, (-1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_laplace (void); + +void +test_auto_laplace (void) +{ + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+02,1.3), 1.957501779912e-34, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (1.9575017799122328e-34,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+01,1.3), 2.281619502905e-04, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (2.2816195029051560e-04,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e+00,1.3), 2.316846846156e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (2.3168468461558764e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000001e-01,1.3), 4.629805393212e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (4.6298053932115801e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e-02,1.3), 4.961686011956e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (4.9616860119557432e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e-03,1.3), 4.996155325065e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (4.9961553250645546e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e-04,1.3), 4.999615399408e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000001e-05,1.3), 4.999961538609e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-9.9999999999999995e-07,1.3), 4.999996153848e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-9.9999999999999995e-08,1.3), 4.999999615385e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e-08,1.3), 4.999999961538e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000001e-09,1.3), 4.999999996154e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (-1.0000000000000000e-10,1.3), 4.999999999615e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e-10,1.3), 5.000000000385e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000001e-09,1.3), 5.000000003846e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e-08,1.3), 5.000000038462e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (9.9999999999999995e-08,1.3), 5.000000384615e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (9.9999999999999995e-07,1.3), 5.000003846152e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000001e-05,1.3), 5.000038461391e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e-04,1.3), 5.000384600592e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e-03,1.3), 5.003844674935e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (5.0038446749354448e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e-02,1.3), 5.038313988044e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (5.0383139880442562e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000001e-01,1.3), 5.370194606788e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (5.3701946067884199e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+00,1.3), 7.683153153844e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (7.6831531538441233e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+01,1.3), 9.997718380497e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Pinv, (9.9977183804970948e-01,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_P, (1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+02,1.3), 1.957501779912e-34, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (1.9575017799122328e-34,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+01,1.3), 2.281619502905e-04, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (2.2816195029051560e-04,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e+00,1.3), 2.316846846156e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (2.3168468461558764e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000001e-01,1.3), 4.629805393212e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (4.6298053932115801e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e-02,1.3), 4.961686011956e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (4.9616860119557432e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e-03,1.3), 4.996155325065e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (4.9961553250645546e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e-04,1.3), 4.999615399408e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000001e-05,1.3), 4.999961538609e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (9.9999999999999995e-07,1.3), 4.999996153848e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (9.9999999999999995e-08,1.3), 4.999999615385e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e-08,1.3), 4.999999961538e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000001e-09,1.3), 4.999999996154e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (1.0000000000000000e-10,1.3), 4.999999999615e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e-10,1.3), 5.000000000385e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000001e-09,1.3), 5.000000003846e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e-08,1.3), 5.000000038462e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-9.9999999999999995e-08,1.3), 5.000000384615e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-9.9999999999999995e-07,1.3), 5.000003846152e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000001e-05,1.3), 5.000038461391e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e-04,1.3), 5.000384600592e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e-03,1.3), 5.003844674935e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (5.0038446749354448e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e-02,1.3), 5.038313988044e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (5.0383139880442562e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000001e-01,1.3), 5.370194606788e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (5.3701946067884199e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+00,1.3), 7.683153153844e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (7.6831531538441233e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+01,1.3), 9.997718380497e-01, TEST_TOL6); + TEST(gsl_cdf_laplace_Qinv, (9.9977183804970948e-01,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_laplace_Q, (-1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_rayleigh (void); + +void +test_auto_rayleigh (void) +{ + TEST(gsl_cdf_rayleigh_P, (0.0000000000000000e+00,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e-10,1.3), 2.958579881657e-21, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816568050e-21,1.3), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000001e-09,1.3), 2.958579881657e-19, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816568049e-19,1.3), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e-08,1.3), 2.958579881657e-17, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816568048e-17,1.3), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (9.9999999999999995e-08,1.3), 2.958579881657e-15, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816568001e-15,1.3), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (9.9999999999999995e-07,1.3), 2.958579881656e-13, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816563665e-13,1.3), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000001e-05,1.3), 2.958579881613e-11, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798816130393e-11,1.3), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e-04,1.3), 2.958579877280e-09, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585798772802076e-09,1.3), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e-03,1.3), 2.958579443997e-07, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585794439971025e-07,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e-02,1.3), 2.958536116114e-05, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9585361161138382e-05,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000001e-01,1.3), 2.954207597179e-03, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.9542075971792496e-03,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+00,1.3), 2.561069378624e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Pinv, (2.5610693786235361e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+01,1.3), 9.999999999999e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_P, (1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+02,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+01,1.3), 1.415959498849e-13, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Qinv, (1.4159594988487832e-13,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e+00,1.3), 7.438930621376e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Qinv, (7.4389306213764639e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000001e-01,1.3), 9.970457924028e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Qinv, (9.9704579240282076e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e-02,1.3), 9.999704146388e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e-03,1.3), 9.999997041421e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e-04,1.3), 9.999999970414e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000001e-05,1.3), 9.999999999704e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (9.9999999999999995e-07,1.3), 9.999999999997e-01, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (9.9999999999999995e-08,1.3), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e-08,1.3), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000001e-09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (1.0000000000000000e-10,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_rayleigh_Q, (0.0000000000000000e+00,1.3), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_flat (void); + +void +test_auto_flat (void) +{ + TEST(gsl_cdf_flat_P, (0.0000000000000000e+00,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e-10,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000001e-09,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e-08,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (9.9999999999999995e-08,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (9.9999999999999995e-07,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000001e-05,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e-04,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e-03,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e-02,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000001e-01,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+00,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+01,1.3,750.0), 1.162014157874e-02, TEST_TOL6); + TEST(gsl_cdf_flat_Pinv, (1.1620141578738545e-02,1.3,750.0), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+02,1.3,750.0), 1.318285027381e-01, TEST_TOL6); + TEST(gsl_cdf_flat_Pinv, (1.3182850273808142e-01,1.3,750.0), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+03,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+04,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+05,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+06,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+07,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+08,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+09,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_P, (1.0000000000000000e+10,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+10,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+09,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+08,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+07,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+06,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+05,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+04,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+03,1.3,750.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+02,1.3,750.0), 8.681714972619e-01, TEST_TOL6); + TEST(gsl_cdf_flat_Qinv, (8.6817149726190368e-01,1.3,750.0), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+01,1.3,750.0), 9.883798584213e-01, TEST_TOL6); + TEST(gsl_cdf_flat_Qinv, (9.8837985842125353e-01,1.3,750.0), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e+00,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000001e-01,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e-02,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e-03,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e-04,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000001e-05,1.3,750.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (9.9999999999999995e-07,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (9.9999999999999995e-08,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e-08,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000001e-09,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (1.0000000000000000e-10,1.3,750.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_flat_Q, (0.0000000000000000e+00,1.3,750.0), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_lognormal (void); + +void +test_auto_lognormal (void) +{ + TEST(gsl_cdf_lognormal_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e-10,1.3,2.7), 1.034288276012e-19, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.0342882760115472e-19,1.3,2.7), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000001e-09,1.3,2.7), 1.720583234428e-16, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.7205832344275183e-16,1.3,2.7), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e-08,1.3,2.7), 1.397140696550e-13, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.3971406965496307e-13,1.3,2.7), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (9.9999999999999995e-08,1.3,2.7), 5.550354890102e-11, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (5.5503548901015757e-11,1.3,2.7), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (9.9999999999999995e-07,1.3,2.7), 1.082087222875e-08, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.0820872228749844e-08,1.3,2.7), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000001e-05,1.3,2.7), 1.039815967490e-06, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.0398159674903829e-06,1.3,2.7), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e-04,1.3,2.7), 4.956354352667e-05, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (4.9563543526667839e-05,1.3,2.7), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e-03,1.3,2.7), 1.183246775456e-03, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.1832467754562060e-03,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e-02,1.3,2.7), 1.436760981041e-02, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (1.4367609810406523e-02,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000001e-01,1.3,2.7), 9.105428982941e-02, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (9.1054289829405582e-02,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+00,1.3,2.7), 3.150871690838e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (3.1508716908375517e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+01,1.3,2.7), 6.448033073717e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (6.4480330737174019e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+02,1.3,2.7), 8.895497448370e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (8.8954974483702642e-01,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+03,1.3,2.7), 9.810967467052e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (9.8109674670518154e-01,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+04,1.3,2.7), 9.983038570318e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (9.9830385703184354e-01,1.3,2.7), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+05,1.3,2.7), 9.999223897251e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Pinv, (9.9992238972508574e-01,1.3,2.7), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+06,1.3,2.7), 9.999982185389e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+07,1.3,2.7), 9.999999796956e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+08,1.3,2.7), 9.999999998859e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+09,1.3,2.7), 9.999999999997e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_P, (1.0000000000000000e+10,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+10,1.3,2.7), 4.255893513650e-16, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (4.2558935136502785e-16,1.3,2.7), 1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+09,1.3,2.7), 3.150574023842e-13, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (3.1505740238418296e-13,1.3,2.7), 1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+08,1.3,2.7), 1.141445550080e-10, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (1.1414455500802107e-10,1.3,2.7), 1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+07,1.3,2.7), 2.030439602858e-08, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (2.0304396028576915e-08,1.3,2.7), 1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+06,1.3,2.7), 1.781461076603e-06, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (1.7814610766031938e-06,1.3,2.7), 1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+05,1.3,2.7), 7.761027491429e-05, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (7.7610274914290006e-05,1.3,2.7), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+04,1.3,2.7), 1.696142968157e-03, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (1.6961429681565346e-03,1.3,2.7), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+03,1.3,2.7), 1.890325329482e-02, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (1.8903253294818529e-02,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+02,1.3,2.7), 1.104502551630e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (1.1045025516297369e-01,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+01,1.3,2.7), 3.551966926283e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (3.5519669262825992e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e+00,1.3,2.7), 6.849128309162e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (6.8491283091624500e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000001e-01,1.3,2.7), 9.089457101706e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (9.0894571017059467e-01,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e-02,1.3,2.7), 9.856323901896e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (9.8563239018959370e-01,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e-03,1.3,2.7), 9.988167532245e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Qinv, (9.9881675322454400e-01,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e-04,1.3,2.7), 9.999504364565e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000001e-05,1.3,2.7), 9.999989601840e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (9.9999999999999995e-07,1.3,2.7), 9.999999891791e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (9.9999999999999995e-08,1.3,2.7), 9.999999999445e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e-08,1.3,2.7), 9.999999999999e-01, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000001e-09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (1.0000000000000000e-10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_lognormal_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_gamma (void); + +void +test_auto_gamma (void) +{ + TEST(gsl_cdf_gamma_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-10,1.3,2.7), 2.356478475164e-14, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (2.3564784751638661e-14,1.3,2.7), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-09,1.3,2.7), 4.701792696644e-13, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (4.7017926966439445e-13,1.3,2.7), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-08,1.3,2.7), 9.381309762735e-12, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (9.3813097627346386e-12,1.3,2.7), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (9.9999999999999995e-08,1.3,2.7), 1.871817348197e-10, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.8718173481972823e-10,1.3,2.7), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (9.9999999999999995e-07,1.3,2.7), 3.734765911711e-09, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (3.7347659117114240e-09,1.3,2.7), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-05,1.3,2.7), 7.451823639191e-08, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (7.4518236391910116e-08,1.3,2.7), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-04,1.3,2.7), 1.486806276026e-06, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.4868062760263472e-06,1.3,2.7), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-03,1.3,2.7), 2.966009681152e-05, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (2.9660096811518665e-05,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-02,1.3,2.7), 5.906831032950e-04, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (5.9068310329499826e-04,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-01,1.3,2.7), 1.156629233128e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.1566292331279586e-02,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+00,1.3,2.7), 1.921237769663e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.9212377696630473e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+01,1.3,2.7), 9.565035356115e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (9.5650353561153789e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+02,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+05,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+06,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+07,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+06,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+03,1.3,2.7), 9.292091038794e-161, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.2920910387939860e-161,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+02,1.3,2.7), 2.729167976527e-16, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (2.7291679765273174e-16,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+01,1.3,2.7), 4.349646438846e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (4.3496464388462192e-02,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+00,1.3,2.7), 8.078762230337e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (8.0787622303369533e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-01,1.3,2.7), 9.884337076687e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.8843370766872041e-01,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-02,1.3,2.7), 9.994093168967e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.9940931689670498e-01,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-03,1.3,2.7), 9.999703399032e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-04,1.3,2.7), 9.999985131937e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-05,1.3,2.7), 9.999999254818e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (9.9999999999999995e-07,1.3,2.7), 9.999999962652e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (9.9999999999999995e-08,1.3,2.7), 9.999999998128e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-08,1.3,2.7), 9.999999999906e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-09,1.3,2.7), 9.999999999995e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-10,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_chisq (void); + +void +test_auto_chisq (void) +{ + TEST(gsl_cdf_chisq_P, (0.0000000000000000e+00,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e-10,1.3), 2.238884178785e-07, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (2.2388841787852728e-07,1.3), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000001e-09,1.3), 1.000072827212e-06, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (1.0000728272124926e-06,1.3), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e-08,1.3), 4.467161220799e-06, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (4.4671612207994108e-06,1.3), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (9.9999999999999995e-08,1.3), 1.995407585451e-05, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (1.9954075854510294e-05,1.3), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (9.9999999999999995e-07,1.3), 8.913156700686e-05, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (8.9131567006858211e-05,1.3), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000001e-05,1.3), 3.981353794611e-04, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (3.9813537946105002e-04,1.3), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e-04,1.3), 1.778373888800e-03, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (1.7783738888003920e-03,1.3), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e-03,1.3), 7.942296379590e-03, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (7.9422963795896199e-03,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e-02,1.3), 3.541413902540e-02, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (3.5414139025402407e-02,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000001e-01,1.3), 1.554268895840e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (1.5542688958403586e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+00,1.3), 5.878620132779e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (5.8786201327788579e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+01,1.3), 9.973867890205e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Pinv, (9.9738678902053046e-01,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_P, (1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+03,1.3), 5.840240518729e-219, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (5.8402405187288964e-219,1.3), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+02,1.3), 3.517864771108e-23, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (3.5178647711076648e-23,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+01,1.3), 2.613210979470e-03, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (2.6132109794696230e-03,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e+00,1.3), 4.121379867221e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (4.1213798672211427e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000001e-01,1.3), 8.445731104160e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (8.4457311041596417e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e-02,1.3), 9.645858609746e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (9.6458586097459775e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e-03,1.3), 9.920577036204e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (9.9205770362041057e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e-04,1.3), 9.982216261112e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (9.9822162611119969e-01,1.3), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000001e-05,1.3), 9.996018646205e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Qinv, (9.9960186462053913e-01,1.3), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (9.9999999999999995e-07,1.3), 9.999108684330e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (9.9999999999999995e-08,1.3), 9.999800459241e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e-08,1.3), 9.999955328388e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000001e-09,1.3), 9.999989999272e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (1.0000000000000000e-10,1.3), 9.999997761116e-01, TEST_TOL6); + TEST(gsl_cdf_chisq_Q, (0.0000000000000000e+00,1.3), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_tdist (void); + +void +test_auto_tdist (void) +{ + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+10,1.3), 3.467848111850e-14, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (3.4678481118500305e-14,1.3), -1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+09,1.3), 6.919266651610e-13, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (6.9192666516103524e-13,1.3), -1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+08,1.3), 1.380575199718e-11, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (1.3805751997179027e-11,1.3), -1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+07,1.3), 2.754609668978e-10, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (2.7546096689777484e-10,1.3), -1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+06,1.3), 5.496168864957e-09, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (5.4961688649569980e-09,1.3), -1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+05,1.3), 1.096629861231e-07, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (1.0966298612314582e-07,1.3), -1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+04,1.3), 2.188064222827e-06, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (2.1880642228271703e-06,1.3), -1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+03,1.3), 4.365759541083e-05, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (4.3657595410833571e-05,1.3), -1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+02,1.3), 8.710327647608e-04, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (8.7103276476079201e-04,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+01,1.3), 1.727893386820e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (1.7278933868204446e-02,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e+00,1.3), 2.336211937932e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (2.3362119379322516e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000001e-01,1.3), 4.667575980083e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (4.6675759800826139e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e-02,1.3), 4.966660755117e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (4.9666607551169606e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e-03,1.3), 4.996665978189e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (4.9966659781887629e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e-04,1.3), 4.999666597722e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000001e-05,1.3), 4.999966659772e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-9.9999999999999995e-07,1.3), 4.999996665977e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-9.9999999999999995e-08,1.3), 4.999999666598e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e-08,1.3), 4.999999966660e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000001e-09,1.3), 4.999999996666e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (-1.0000000000000000e-10,1.3), 4.999999999667e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (4.9999999999999900e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e-10,1.3), 5.000000000333e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000001e-09,1.3), 5.000000003334e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e-08,1.3), 5.000000033340e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (9.9999999999999995e-08,1.3), 5.000000333402e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (9.9999999999999995e-07,1.3), 5.000003334023e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000001e-05,1.3), 5.000033340228e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e-04,1.3), 5.000333402278e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e-03,1.3), 5.003334021811e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (5.0033340218112365e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e-02,1.3), 5.033339244883e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (5.0333392448830394e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000001e-01,1.3), 5.332424019917e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (5.3324240199173856e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+00,1.3), 7.663788062068e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (7.6637880620677490e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+01,1.3), 9.827210661318e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (9.8272106613179555e-01,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+02,1.3), 9.991289672352e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Pinv, (9.9912896723523925e-01,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+03,1.3), 9.999563424046e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+04,1.3), 9.999978119358e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+05,1.3), 9.999998903370e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+06,1.3), 9.999999945038e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+07,1.3), 9.999999997245e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+08,1.3), 9.999999999862e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+09,1.3), 9.999999999993e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_P, (1.0000000000000000e+10,1.3), 1.000000000000e-00, TEST_TOL6); + + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+10,1.3), 3.467848111850e-14, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (3.4678481118500305e-14,1.3), 1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+09,1.3), 6.919266651610e-13, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (6.9192666516103524e-13,1.3), 1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+08,1.3), 1.380575199718e-11, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (1.3805751997179027e-11,1.3), 1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+07,1.3), 2.754609668978e-10, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (2.7546096689777484e-10,1.3), 1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+06,1.3), 5.496168864957e-09, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (5.4961688649569980e-09,1.3), 1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+05,1.3), 1.096629861231e-07, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (1.0966298612314582e-07,1.3), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+04,1.3), 2.188064222827e-06, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (2.1880642228271703e-06,1.3), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+03,1.3), 4.365759541083e-05, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (4.3657595410833571e-05,1.3), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+02,1.3), 8.710327647608e-04, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (8.7103276476079201e-04,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+01,1.3), 1.727893386820e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (1.7278933868204446e-02,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e+00,1.3), 2.336211937932e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (2.3362119379322516e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000001e-01,1.3), 4.667575980083e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (4.6675759800826139e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e-02,1.3), 4.966660755117e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (4.9666607551169606e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e-03,1.3), 4.996665978189e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (4.9966659781887629e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e-04,1.3), 4.999666597722e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000001e-05,1.3), 4.999966659772e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (9.9999999999999995e-07,1.3), 4.999996665977e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (9.9999999999999995e-08,1.3), 4.999999666598e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e-08,1.3), 4.999999966660e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000001e-09,1.3), 4.999999996666e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (1.0000000000000000e-10,1.3), 4.999999999667e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (4.9999999999999900e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e-10,1.3), 5.000000000333e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000001e-09,1.3), 5.000000003334e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e-08,1.3), 5.000000033340e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-9.9999999999999995e-08,1.3), 5.000000333402e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-9.9999999999999995e-07,1.3), 5.000003334023e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000001e-05,1.3), 5.000033340228e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e-04,1.3), 5.000333402278e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e-03,1.3), 5.003334021811e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (5.0033340218112365e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e-02,1.3), 5.033339244883e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (5.0333392448830394e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000001e-01,1.3), 5.332424019917e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (5.3324240199173856e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+00,1.3), 7.663788062068e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (7.6637880620677490e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+01,1.3), 9.827210661318e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (9.8272106613179555e-01,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+02,1.3), 9.991289672352e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Qinv, (9.9912896723523925e-01,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+03,1.3), 9.999563424046e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+04,1.3), 9.999978119358e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+05,1.3), 9.999998903370e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+06,1.3), 9.999999945038e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+07,1.3), 9.999999997245e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+08,1.3), 9.999999999862e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+09,1.3), 9.999999999993e-01, TEST_TOL6); + TEST(gsl_cdf_tdist_Q, (-1.0000000000000000e+10,1.3), 1.000000000000e-00, TEST_TOL6); +} + +void test_auto_gumbel1 (void); + +void +test_auto_gumbel1 (void) +{ + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+06,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+03,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+02,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+01,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e+00,1.3,2.7), 4.981965353092e-05, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (4.9819653530918237e-05,1.3,2.7), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000001e-01,1.3,2.7), 4.619717476780e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (4.6197174767798083e-02,1.3,2.7), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e-02,1.3,2.7), 6.487265128366e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.4872651283663055e-02,1.3,2.7), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e-03,1.3,2.7), 6.696988203722e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.6969882037217598e-02,1.3,2.7), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e-04,1.3,2.7), 6.718192621136e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.7181926211364873e-02,1.3,2.7), -1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000001e-05,1.3,2.7), 6.720315385232e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-9.9999999999999995e-07,1.3,2.7), 6.720527684866e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-9.9999999999999995e-08,1.3,2.7), 6.720548915062e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e-08,1.3,2.7), 6.720551038084e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000001e-09,1.3,2.7), 6.720551250386e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (-1.0000000000000000e-10,1.3,2.7), 6.720551271616e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (0.0000000000000000e+00,1.3,2.7), 6.720551273975e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.7205512739749951e-02,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e-10,1.3,2.7), 6.720551276334e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000001e-09,1.3,2.7), 6.720551297564e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e-08,1.3,2.7), 6.720551509866e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (9.9999999999999995e-08,1.3,2.7), 6.720553632889e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (9.9999999999999995e-07,1.3,2.7), 6.720574863136e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000001e-05,1.3,2.7), 6.720787167931e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e-04,1.3,2.7), 6.722910448133e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.7229104481333457e-02,1.3,2.7), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e-03,1.3,2.7), 6.744166476190e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.7441664761898834e-02,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e-02,1.3,2.7), 6.959050352518e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (6.9590503525179814e-02,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000001e-01,1.3,2.7), 9.340058564429e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (9.3400585644290435e-02,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+00,1.3,2.7), 4.791048360125e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Pinv, (4.7910483601248477e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+01,1.3,2.7), 9.999938971292e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+05,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+06,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+07,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_P, (1.0000000000000000e+10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+06,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+03,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+02,1.3,2.7), 9.398988467742e-57, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3989884677416057e-57,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+01,1.3,2.7), 6.102870776257e-06, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (6.1028707762572197e-06,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e+00,1.3,2.7), 5.208951639875e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (5.2089516398751523e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000001e-01,1.3,2.7), 9.065994143557e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.0659941435570957e-01,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e-02,1.3,2.7), 9.304094964748e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3040949647482019e-01,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e-03,1.3,2.7), 9.325583352381e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3255833523810117e-01,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e-04,1.3,2.7), 9.327708955187e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000001e-05,1.3,2.7), 9.327921283207e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (9.9999999999999995e-07,1.3,2.7), 9.327942513686e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (9.9999999999999995e-08,1.3,2.7), 9.327944636711e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e-08,1.3,2.7), 9.327944849013e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000001e-09,1.3,2.7), 9.327944870244e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (1.0000000000000000e-10,1.3,2.7), 9.327944872367e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (0.0000000000000000e+00,1.3,2.7), 9.327944872603e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3279448726025027e-01,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e-10,1.3,2.7), 9.327944872838e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000001e-09,1.3,2.7), 9.327944874961e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e-08,1.3,2.7), 9.327944896192e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-9.9999999999999995e-08,1.3,2.7), 9.327945108494e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-9.9999999999999995e-07,1.3,2.7), 9.327947231513e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000001e-05,1.3,2.7), 9.327968461477e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e-04,1.3,2.7), 9.328180737886e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e-03,1.3,2.7), 9.330301179628e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3303011796278246e-01,1.3,2.7), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e-02,1.3,2.7), 9.351273487163e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.3512734871633696e-01,1.3,2.7), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000001e-01,1.3,2.7), 9.538028252322e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.5380282523220195e-01,1.3,2.7), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+00,1.3,2.7), 9.999501803465e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Qinv, (9.9995018034646910e-01,1.3,2.7), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+05,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+06,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+07,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel1_Q, (-1.0000000000000000e+10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_gumbel2 (void); + +void +test_auto_gumbel2 (void) +{ + TEST(gsl_cdf_gumbel2_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e-10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000001e-09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e-08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (9.9999999999999995e-08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (9.9999999999999995e-07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000001e-05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e-04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e-03,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e-02,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000001e-01,1.3,2.7), 4.014688368993e-24, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Pinv, (4.0146883689934746e-24,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+00,1.3,2.7), 6.720551273975e-02, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Pinv, (6.7205512739749743e-02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+01,1.3,2.7), 8.734358842463e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Pinv, (8.7343588424628138e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+02,1.3,2.7), 9.932408531257e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Pinv, (9.9324085312574451e-01,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+03,1.3,2.7), 9.996601479016e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Pinv, (9.9966014790162783e-01,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+04,1.3,2.7), 9.999829642968e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+05,1.3,2.7), 9.999991461854e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+06,1.3,2.7), 9.999999572079e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+07,1.3,2.7), 9.999999978553e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+08,1.3,2.7), 9.999999998925e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+09,1.3,2.7), 9.999999999946e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_P, (1.0000000000000000e+10,1.3,2.7), 9.999999999997e-01, TEST_TOL6); + + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+10,1.3,2.7), 2.700000000000e-13, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (2.6999999999996492e-13,1.3,2.7), 1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+09,1.3,2.7), 5.387208250401e-12, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (5.3872082504014914e-12,1.3,2.7), 1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+08,1.3,2.7), 1.074889360437e-10, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (1.0748893604366781e-10,1.3,2.7), 1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+07,1.3,2.7), 2.144686231456e-09, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (2.1446862314557286e-09,1.3,2.7), 1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+06,1.3,2.7), 4.279211528087e-08, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (4.2792115280867646e-08,1.3,2.7), 1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+05,1.3,2.7), 8.538146037456e-07, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (8.5381460374556900e-07,1.3,2.7), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+04,1.3,2.7), 1.703570319173e-05, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (1.7035703191725618e-05,1.3,2.7), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+03,1.3,2.7), 3.398520983725e-04, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (3.3985209837246249e-04,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+02,1.3,2.7), 6.759146874256e-03, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (6.7591468742558315e-03,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+01,1.3,2.7), 1.265641157537e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (1.2656411575371904e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e+00,1.3,2.7), 9.327944872603e-01, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Qinv, (9.3279448726025116e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000001e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e-02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e-03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e-04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000001e-05,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (9.9999999999999995e-07,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (9.9999999999999995e-08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e-08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000001e-09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (1.0000000000000000e-10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gumbel2_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_weibull (void); + +void +test_auto_weibull (void) +{ + TEST(gsl_cdf_weibull_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e-10,1.3,2.7), 4.924395760785e-28, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (4.9243957607852698e-28,1.3,2.7), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000001e-09,1.3,2.7), 2.468044288634e-25, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (2.4680442886338381e-25,1.3,2.7), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e-08,1.3,2.7), 1.236952289490e-22, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (1.2369522894899823e-22,1.3,2.7), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (9.9999999999999995e-08,1.3,2.7), 6.199446960984e-20, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (6.1994469609840516e-20,1.3,2.7), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (9.9999999999999995e-07,1.3,2.7), 3.107083672395e-17, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (3.1070836723945982e-17,1.3,2.7), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000001e-05,1.3,2.7), 1.557230670416e-14, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (1.5572306704159031e-14,1.3,2.7), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e-04,1.3,2.7), 7.804641318223e-12, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (7.8046413182225018e-12,1.3,2.7), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e-03,1.3,2.7), 3.911586584098e-09, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (3.9115865840980536e-09,1.3,2.7), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e-02,1.3,2.7), 1.960435341356e-06, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (1.9604353413559907e-06,1.3,2.7), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000001e-01,1.3,2.7), 9.820635881537e-04, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (9.8206358815371392e-04,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+00,1.3,2.7), 3.888663329609e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Pinv, (3.8886633296085954e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+05,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+06,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+07,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_P, (1.0000000000000000e+10,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+06,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+03,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+02,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+01,1.3,2.7), 6.519262004070e-108, TEST_TOL6); + TEST(gsl_cdf_weibull_Qinv, (6.5192620040698617e-108,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e+00,1.3,2.7), 6.111336670391e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Qinv, (6.1113366703914040e-01,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000001e-01,1.3,2.7), 9.990179364118e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Qinv, (9.9901793641184633e-01,1.3,2.7), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e-02,1.3,2.7), 9.999980395647e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e-03,1.3,2.7), 9.999999960884e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e-04,1.3,2.7), 9.999999999922e-01, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000001e-05,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (9.9999999999999995e-07,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (9.9999999999999995e-08,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e-08,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000001e-09,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (1.0000000000000000e-10,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_weibull_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_pareto (void); + +void +test_auto_pareto (void) +{ + TEST(gsl_cdf_pareto_P, (0.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e-10,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000001e-09,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e-08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (9.9999999999999995e-08,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (9.9999999999999995e-07,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000001e-05,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e-04,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e-03,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e-02,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000001e-01,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+00,1.3,2.7), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+01,1.3,2.7), 8.177057822240e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_Pinv, (8.1770578222395374e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+02,1.3,2.7), 9.908636465287e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_Pinv, (9.9086364652869807e-01,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+03,1.3,2.7), 9.995420976279e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_Pinv, (9.9954209762786816e-01,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+04,1.3,2.7), 9.999770505177e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+05,1.3,2.7), 9.999988498013e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+06,1.3,2.7), 9.999999423535e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+07,1.3,2.7), 9.999999971109e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+08,1.3,2.7), 9.999999998552e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+09,1.3,2.7), 9.999999999928e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_P, (1.0000000000000000e+10,1.3,2.7), 9.999999999997e-01, TEST_TOL6); + + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+10,1.3,2.7), 3.637247829654e-13, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (3.6372478296536173e-13,1.3,2.7), 1.000000000000e+10, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+09,1.3,2.7), 7.257263524710e-12, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (7.2572635247102111e-12,1.3,2.7), 1.000000000000e+09, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+08,1.3,2.7), 1.448014442065e-10, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (1.4480144420652496e-10,1.3,2.7), 1.000000000000e+08, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+07,1.3,2.7), 2.889168647783e-09, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (2.8891686477834784e-09,1.3,2.7), 1.000000000000e+07, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+06,1.3,2.7), 5.764649324512e-08, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (5.7646493245119715e-08,1.3,2.7), 1.000000000000e+06, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+05,1.3,2.7), 1.150198755621e-06, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (1.1501987556209536e-06,1.3,2.7), 1.000000000000e+05, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+04,1.3,2.7), 2.294948231815e-05, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (2.2949482318145872e-05,1.3,2.7), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+03,1.3,2.7), 4.579023721744e-04, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (4.5790237217441070e-04,1.3,2.7), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+02,1.3,2.7), 9.136353471345e-03, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (9.1363534713445622e-03,1.3,2.7), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+01,1.3,2.7), 1.822942177761e-01, TEST_TOL6); + TEST(gsl_cdf_pareto_Qinv, (1.8229421777608898e-01,1.3,2.7), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e+00,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000001e-01,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e-02,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e-03,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e-04,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000001e-05,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (9.9999999999999995e-07,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (9.9999999999999995e-08,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e-08,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000001e-09,1.3,2.7), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (1.0000000000000000e-10,1.3,2.7), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_pareto_Q, (0.0000000000000000e+00,1.3,2.7), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_logistic (void); + +void +test_auto_logistic (void) +{ + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+02,1.3), 3.915003559824e-34, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (3.9150035598244656e-34,1.3), -1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+01,1.3), 4.561157640565e-04, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (4.5611576405646045e-04,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e+00,1.3), 3.166455298122e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (3.1664552981221700e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000001e-01,1.3), 4.807787077894e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (4.8077870778939180e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e-02,1.3), 4.980769325595e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (4.9807693255949481e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e-03,1.3), 4.998076923172e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (4.9980769231717492e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e-04,1.3), 4.999807692308e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000001e-05,1.3), 4.999980769231e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-9.9999999999999995e-07,1.3), 4.999998076923e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-9.9999999999999995e-08,1.3), 4.999999807692e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e-08,1.3), 4.999999980769e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000001e-09,1.3), 4.999999998077e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (-1.0000000000000000e-10,1.3), 4.999999999808e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e-10,1.3), 5.000000000192e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000001e-09,1.3), 5.000000001923e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e-08,1.3), 5.000000019231e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (9.9999999999999995e-08,1.3), 5.000000192308e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (9.9999999999999995e-07,1.3), 5.000001923077e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000001e-05,1.3), 5.000019230769e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e-04,1.3), 5.000192307692e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e-03,1.3), 5.001923076828e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (5.0019230768282508e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e-02,1.3), 5.019230674405e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (5.0192306744050519e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000001e-01,1.3), 5.192212922106e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (5.1922129221060820e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+00,1.3), 6.833544701878e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (6.8335447018778295e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+01,1.3), 9.995438842359e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Pinv, (9.9954388423594354e-01,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_P, (1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+10,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+09,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+08,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+07,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+06,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+05,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+04,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+03,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+02,1.3), 3.915003559824e-34, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (3.9150035598244656e-34,1.3), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+01,1.3), 4.561157640565e-04, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (4.5611576405646045e-04,1.3), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e+00,1.3), 3.166455298122e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (3.1664552981221700e-01,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000001e-01,1.3), 4.807787077894e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (4.8077870778939180e-01,1.3), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e-02,1.3), 4.980769325595e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (4.9807693255949481e-01,1.3), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e-03,1.3), 4.998076923172e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (4.9980769231717492e-01,1.3), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e-04,1.3), 4.999807692308e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000001e-05,1.3), 4.999980769231e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (9.9999999999999995e-07,1.3), 4.999998076923e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (9.9999999999999995e-08,1.3), 4.999999807692e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e-08,1.3), 4.999999980769e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000001e-09,1.3), 4.999999998077e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (1.0000000000000000e-10,1.3), 4.999999999808e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (0.0000000000000000e+00,1.3), 5.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (5.0000000000000000e-01,1.3), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e-10,1.3), 5.000000000192e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000001e-09,1.3), 5.000000001923e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e-08,1.3), 5.000000019231e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-9.9999999999999995e-08,1.3), 5.000000192308e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-9.9999999999999995e-07,1.3), 5.000001923077e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000001e-05,1.3), 5.000019230769e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e-04,1.3), 5.000192307692e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e-03,1.3), 5.001923076828e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (5.0019230768282508e-01,1.3), -1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e-02,1.3), 5.019230674405e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (5.0192306744050519e-01,1.3), -1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000001e-01,1.3), 5.192212922106e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (5.1922129221060820e-01,1.3), -1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+00,1.3), 6.833544701878e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (6.8335447018778295e-01,1.3), -1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+01,1.3), 9.995438842359e-01, TEST_TOL6); + TEST(gsl_cdf_logistic_Qinv, (9.9954388423594354e-01,1.3), -1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+02,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+03,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+04,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+05,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+06,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+07,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+08,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+09,1.3), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_logistic_Q, (-1.0000000000000000e+10,1.3), 1.000000000000e+00, TEST_TOL6); +} + +void test_auto_gammalarge (void); + +void +test_auto_gammalarge (void) +{ + TEST(gsl_cdf_gamma_P, (0.0000000000000000e+00,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-10,1.3,123.0), 1.644976604681e-16, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.6449766046812008e-16,1.3,123.0), 1.000000000000e-10, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-09,1.3,123.0), 3.282159828312e-15, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (3.2821598283122862e-15,1.3,123.0), 1.000000000000e-09, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-08,1.3,123.0), 6.548769816865e-14, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (6.5487698168653935e-14,1.3,123.0), 1.000000000000e-08, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (9.9999999999999995e-08,1.3,123.0), 1.306651361959e-12, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.3066513619593202e-12,1.3,123.0), 1.000000000000e-07, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (9.9999999999999995e-07,1.3,123.0), 2.607112210538e-11, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (2.6071122105378624e-11,1.3,123.0), 1.000000000000e-06, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-05,1.3,123.0), 5.201872529446e-10, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (5.2018725294456393e-10,1.3,123.0), 1.000000000000e-05, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-04,1.3,123.0), 1.037909593275e-08, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.0379095932752980e-08,1.3,123.0), 1.000000000000e-04, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-03,1.3,123.0), 2.070893333124e-07, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (2.0708933331240137e-07,1.3,123.0), 1.000000000000e-03, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e-02,1.3,123.0), 4.131804542806e-06, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (4.1318045428061286e-06,1.3,123.0), 1.000000000000e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000001e-01,1.3,123.0), 8.240625287202e-05, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (8.2406252872017186e-05,1.3,123.0), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+00,1.3,123.0), 1.637438876041e-03, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (1.6374388760411608e-03,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+01,1.3,123.0), 3.135521671622e-02, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (3.1355216716223523e-02,1.3,123.0), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+02,1.3,123.0), 4.240385705334e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (4.2403857053338523e-01,1.3,123.0), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+03,1.3,123.0), 9.993635318324e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Pinv, (9.9936353183235616e-01,1.3,123.0), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+04,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+05,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+06,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+07,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+08,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+09,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_P, (1.0000000000000000e+10,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+10,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+09,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+08,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+07,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+06,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+05,1.3,123.0), 0.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+04,1.3,123.0), 2.056363344745e-35, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (2.0563633447452943e-35,1.3,123.0), 1.000000000000e+04, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+03,1.3,123.0), 6.364681676440e-04, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (6.3646816764395531e-04,1.3,123.0), 1.000000000000e+03, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+02,1.3,123.0), 5.759614294666e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (5.7596142946661488e-01,1.3,123.0), 1.000000000000e+02, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+01,1.3,123.0), 9.686447832838e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.6864478328377646e-01,1.3,123.0), 1.000000000000e+01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e+00,1.3,123.0), 9.983625611240e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.9836256112395882e-01,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-01,1.3,123.0), 9.999175937471e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Qinv, (9.9991759374712796e-01,1.3,123.0), 1.000000000000e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-02,1.3,123.0), 9.999958681955e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-03,1.3,123.0), 9.999997929107e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-04,1.3,123.0), 9.999999896209e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-05,1.3,123.0), 9.999999994798e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (9.9999999999999995e-07,1.3,123.0), 9.999999999739e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (9.9999999999999995e-08,1.3,123.0), 9.999999999987e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-08,1.3,123.0), 9.999999999999e-01, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000001e-09,1.3,123.0), 1.000000000000e-00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (1.0000000000000000e-10,1.3,123.0), 1.000000000000e+00, TEST_TOL6); + TEST(gsl_cdf_gamma_Q, (0.0000000000000000e+00,1.3,123.0), 1.000000000000e+00, TEST_TOL6); +} + diff --git a/software/gsl-1.15/cdf/weibull.c b/software/gsl-1.15/cdf/weibull.c new file mode 100644 index 000000000..56c9a5cfd --- /dev/null +++ b/software/gsl-1.15/cdf/weibull.c @@ -0,0 +1,37 @@ +/* cdf/weibull.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_weibull_P (const double x, const double a, const double b) +{ + double P = -expm1 (-pow(x/a, b)); + return P; +} + +double +gsl_cdf_weibull_Q (const double x, const double a, const double b) +{ + double Q = exp (-pow(x/a, b)); + return Q; +} diff --git a/software/gsl-1.15/cdf/weibullinv.c b/software/gsl-1.15/cdf/weibullinv.c new file mode 100644 index 000000000..1faa9802a --- /dev/null +++ b/software/gsl-1.15/cdf/weibullinv.c @@ -0,0 +1,61 @@ +/* cdf/weibullinv.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_cdf_weibull_Pinv (const double P, const double a, const double b) +{ + double x; + + if (P == 1.0) + { + return GSL_POSINF; + } + else if (P == 0.0) + { + return 0.0; + } + + x = a * pow(-log1p(-P), 1/b); + + return x; +} + +double +gsl_cdf_weibull_Qinv (const double Q, const double a, const double b) +{ + double x; + + if (Q == 0.0) + { + return GSL_POSINF; + } + else if (Q == 1.0) + { + return 0.0; + } + + x = a * pow(-log(Q), 1/b); + + return x; +} diff --git a/software/gsl-1.15/cheb/.deps/deriv.Plo b/software/gsl-1.15/cheb/.deps/deriv.Plo new file mode 100644 index 000000000..779eddf66 --- /dev/null +++ b/software/gsl-1.15/cheb/.deps/deriv.Plo @@ -0,0 +1,134 @@ +deriv.lo: deriv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_chebyshev.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_chebyshev.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/cheb/.deps/eval.Plo b/software/gsl-1.15/cheb/.deps/eval.Plo new file mode 100644 index 000000000..be51921c6 --- /dev/null +++ b/software/gsl-1.15/cheb/.deps/eval.Plo @@ -0,0 +1,134 @@ +eval.lo: eval.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_chebyshev.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_chebyshev.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/cheb/.deps/init.Plo b/software/gsl-1.15/cheb/.deps/init.Plo new file mode 100644 index 000000000..30ff4acd7 --- /dev/null +++ b/software/gsl-1.15/cheb/.deps/init.Plo @@ -0,0 +1,134 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_chebyshev.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_chebyshev.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/cheb/.deps/integ.Plo b/software/gsl-1.15/cheb/.deps/integ.Plo new file mode 100644 index 000000000..584929a3a --- /dev/null +++ b/software/gsl-1.15/cheb/.deps/integ.Plo @@ -0,0 +1,134 @@ +integ.lo: integ.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_chebyshev.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_chebyshev.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/cheb/.deps/test.Po b/software/gsl-1.15/cheb/.deps/test.Po new file mode 100644 index 000000000..25177d6bf --- /dev/null +++ b/software/gsl-1.15/cheb/.deps/test.Po @@ -0,0 +1,138 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_chebyshev.h ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_chebyshev.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/cheb/ChangeLog b/software/gsl-1.15/cheb/ChangeLog new file mode 100644 index 000000000..5832ba37c --- /dev/null +++ b/software/gsl-1.15/cheb/ChangeLog @@ -0,0 +1,74 @@ +2010-03-12 Brian Gough + + * deriv.c (gsl_cheb_calc_deriv): shift loop variable to avoid + unsigned integer wraparound when n < 3 + +2009-07-09 Brian Gough + + * init.c (gsl_cheb_free): handle NULL argument in free + +2008-11-18 Brian Gough + + * gsl_chebyshev.h: added auxiliary functions + + * init.c (gsl_cheb_order, gsl_cheb_size, gsl_cheb_coeffs): added + auxiliary functions + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-01-29 Brian Gough + + * eval.c (gsl_cheb_eval_mode_e): compute error consistently with + other routines + +2004-12-29 Brian Gough + + * gsl_chebyshev.h: added const to declaration of + gsl_cheb_eval_mode to match definition + +2004-12-24 Brian Gough + + * eval.c (gsl_cheb_eval_n_err): use eval_order instead of + cs->order for error estimate + +2004-12-23 Brian Gough + + * eval.c (gsl_cheb_eval_mode): added missing function + +2004-08-27 Brian Gough + + * test.c (main): make the hard-coded tolerances a variable, ftol + +2003-06-09 Brian Gough + + * test.c (main): added some tests for the coefficients + +2003-02-09 Brian Gough + + * gsl_chebyshev.h: added missing #include for gsl_math (to declare + gsl_function) fixes Debian Bug#179665 + +Fri May 24 19:23:47 2002 Brian Gough + + * init.c (gsl_cheb_free): added missing free() for cs->f + +Fri Aug 24 19:18:23 2001 Brian Gough + + * test.c (main): renamed fsin to f_sin to avoid conflicts with + irix math libs. + +Sun May 6 09:49:28 2001 Brian Gough + + * eval.c (gsl_cheb_eval_err): take roundoff into account when + computing evaluation error (important when result is near zero). + (gsl_cheb_eval_n_err): ditto + +Tue Apr 24 17:08:29 2001 Brian Gough + + * made deriv/integ functions thread safe + + * split out from specfunc directory + + diff --git a/software/gsl-1.15/cheb/Makefile.am b/software/gsl-1.15/cheb/Makefile.am new file mode 100644 index 000000000..8ae986ca9 --- /dev/null +++ b/software/gsl-1.15/cheb/Makefile.am @@ -0,0 +1,17 @@ +noinst_LTLIBRARIES = libgslcheb.la + +pkginclude_HEADERS = gsl_chebyshev.h + +INCLUDES = -I$(top_srcdir) + +libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_LDADD = libgslcheb.la ../ieee-utils/libgslieeeutils.la ../test/libgsltest.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la + +test_SOURCES = test.c + + diff --git a/software/gsl-1.15/cheb/Makefile.in b/software/gsl-1.15/cheb/Makefile.in new file mode 100644 index 000000000..d7b382eaf --- /dev/null +++ b/software/gsl-1.15/cheb/Makefile.in @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = cheb +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslcheb_la_LIBADD = +am_libgslcheb_la_OBJECTS = deriv.lo eval.lo init.lo integ.lo +libgslcheb_la_OBJECTS = $(am_libgslcheb_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslcheb.la ../ieee-utils/libgslieeeutils.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../err/libgslerr.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslcheb_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslcheb_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslcheb.la +pkginclude_HEADERS = gsl_chebyshev.h +INCLUDES = -I$(top_srcdir) +libgslcheb_la_SOURCES = deriv.c eval.c init.c integ.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslcheb.la ../ieee-utils/libgslieeeutils.la ../test/libgsltest.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cheb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu cheb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslcheb.la: $(libgslcheb_la_OBJECTS) $(libgslcheb_la_DEPENDENCIES) + $(LINK) $(libgslcheb_la_OBJECTS) $(libgslcheb_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integ.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/cheb/TODO b/software/gsl-1.15/cheb/TODO new file mode 100644 index 000000000..8e07731b8 --- /dev/null +++ b/software/gsl-1.15/cheb/TODO @@ -0,0 +1,4 @@ +# -*- org -*- +#+CATEGORY: cheb + +Provide a way to save/restore coefficients, or access the coefficient data. \ No newline at end of file diff --git a/software/gsl-1.15/cheb/deriv.c b/software/gsl-1.15/cheb/deriv.c new file mode 100644 index 000000000..8f7c223cc --- /dev/null +++ b/software/gsl-1.15/cheb/deriv.c @@ -0,0 +1,60 @@ +/* cheb/deriv.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int gsl_cheb_calc_deriv(gsl_cheb_series * deriv, const gsl_cheb_series * f) +{ + const size_t n = f->order + 1; + const double con = 2.0 / (f->b - f->a); + size_t i; + + if(deriv->order != f->order) + { + GSL_ERROR ("order of chebyshev series must be equal", GSL_ENOMEM); + } + + /* set the other parameters in the chebyshev struct */ + + deriv->a = f->a; + deriv->b = f->b; + + /* error in derivative is n^2 c_n */ + /* deriv->err = n * n * f->c[n-1];*/ + + /* FIXME: should probably set deriv->f[] as well */ + + deriv->c[n-1] = 0.0; + + if(n > 1) { + deriv->c[n-2] = 2.0 *(n-1.0) * f->c[n-1]; + + for(i = n; i>=3; i--) + deriv->c[i-3] = deriv->c[i-1] + 2.0 *(i-2.0) * f->c[i-2]; + + for(i = 0 ; ic[i] *= con; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/cheb/eval.c b/software/gsl-1.15/cheb/eval.c new file mode 100644 index 000000000..9c84d6776 --- /dev/null +++ b/software/gsl-1.15/cheb/eval.c @@ -0,0 +1,206 @@ +/* cheb/eval.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* For efficiency there are separate implementations of each of these + functions */ + +double +gsl_cheb_eval (const gsl_cheb_series * cs, const double x) +{ + size_t i; + double d1 = 0.0; + double d2 = 0.0; + + double y = (2.0 * x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + for (i = cs->order; i >= 1; i--) + { + double temp = d1; + d1 = y2 * d1 - d2 + cs->c[i]; + d2 = temp; + } + + return y * d1 - d2 + 0.5 * cs->c[0]; +} + +double +gsl_cheb_eval_n (const gsl_cheb_series * cs, const size_t n, const double x) +{ + size_t i; + double d1 = 0.0; + double d2 = 0.0; + + size_t eval_order = GSL_MIN (n, cs->order); + + double y = (2.0 * x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + for (i = eval_order; i >= 1; i--) + { + double temp = d1; + d1 = y2 * d1 - d2 + cs->c[i]; + d2 = temp; + } + + return y * d1 - d2 + 0.5 * cs->c[0]; +} + + +int +gsl_cheb_eval_err (const gsl_cheb_series * cs, const double x, + double *result, double *abserr) +{ + size_t i; + double d1 = 0.0; + double d2 = 0.0; + + double y = (2. * x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + double absc = 0.0; + + for (i = cs->order; i >= 1; i--) + { + double temp = d1; + d1 = y2 * d1 - d2 + cs->c[i]; + d2 = temp; + } + + *result = y * d1 - d2 + 0.5 * cs->c[0]; + + /* Estimate cumulative numerical error */ + + for (i = 0; i <= cs->order; i++) + { + absc += fabs(cs->c[i]); + } + + /* Combine truncation error and numerical error */ + + *abserr = fabs (cs->c[cs->order]) + absc * GSL_DBL_EPSILON; + + return GSL_SUCCESS; +} + +int +gsl_cheb_eval_n_err (const gsl_cheb_series * cs, + const size_t n, const double x, + double *result, double *abserr) +{ + size_t i; + double d1 = 0.0; + double d2 = 0.0; + + double y = (2. * x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + double absc = 0.0; + + size_t eval_order = GSL_MIN (n, cs->order); + + for (i = eval_order; i >= 1; i--) + { + double temp = d1; + d1 = y2 * d1 - d2 + cs->c[i]; + d2 = temp; + } + + *result = y * d1 - d2 + 0.5 * cs->c[0]; + + /* Estimate cumulative numerical error */ + + for (i = 0; i <= eval_order; i++) + { + absc += fabs(cs->c[i]); + } + + /* Combine truncation error and numerical error */ + + *abserr = fabs (cs->c[eval_order]) + absc * GSL_DBL_EPSILON; + + return GSL_SUCCESS; +} + +int +gsl_cheb_eval_mode_e (const gsl_cheb_series * cs, + const double x, gsl_mode_t mode, + double *result, double *abserr) +{ + size_t i; + double d1 = 0.0; + double d2 = 0.0; + + double y = (2. * x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + double absc = 0.0; + + size_t eval_order; + + if (GSL_MODE_PREC (mode) == GSL_PREC_DOUBLE) + eval_order = cs->order; + else + eval_order = cs->order_sp; + + for (i = eval_order; i >= 1; i--) + { + double temp = d1; + d1 = y2 * d1 - d2 + cs->c[i]; + d2 = temp; + } + + *result = y * d1 - d2 + 0.5 * cs->c[0]; + + /* Estimate cumulative numerical error */ + + for (i = 0; i <= eval_order; i++) + { + absc += fabs(cs->c[i]); + } + + /* Combine truncation error and numerical error */ + + *abserr = fabs (cs->c[eval_order]) + absc * GSL_DBL_EPSILON; + + return GSL_SUCCESS; +} + +double +gsl_cheb_eval_mode (const gsl_cheb_series * cs, + const double x, gsl_mode_t mode) +{ + double result, abserr; + int status = gsl_cheb_eval_mode_e (cs, x, mode, &result, &abserr); + + if (status != GSL_SUCCESS) + { + GSL_ERROR_VAL("gsl_cheb_eval_mode", status, result); + }; + + return result; +} + + diff --git a/software/gsl-1.15/cheb/gsl_chebyshev.h b/software/gsl-1.15/cheb/gsl_chebyshev.h new file mode 100644 index 000000000..858048e40 --- /dev/null +++ b/software/gsl-1.15/cheb/gsl_chebyshev.h @@ -0,0 +1,133 @@ +/* cheb/gsl_chebyshev.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CHEBYSHEV_H__ +#define __GSL_CHEBYSHEV_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* data for a Chebyshev series over a given interval */ + +struct gsl_cheb_series_struct { + + double * c; /* coefficients */ + size_t order; /* order of expansion */ + double a; /* lower interval point */ + double b; /* upper interval point */ + + /* The following exists (mostly) for the benefit + * of the implementation. It is an effective single + * precision order, for use in single precision + * evaluation. Users can use it if they like, but + * only they know how to calculate it, since it is + * specific to the approximated function. By default, + * order_sp = order. + * It is used explicitly only by the gsl_cheb_eval_mode + * functions, which are not meant for casual use. + */ + size_t order_sp; + + /* Additional elements not used by specfunc */ + + double * f; /* function evaluated at chebyschev points */ +}; +typedef struct gsl_cheb_series_struct gsl_cheb_series; + + +/* Calculate a Chebyshev series of specified order over + * a specified interval, for a given function. + * Return 0 on failure. + */ +gsl_cheb_series * gsl_cheb_alloc(const size_t order); + +/* Free a Chebyshev series previously calculated with gsl_cheb_alloc(). + */ +void gsl_cheb_free(gsl_cheb_series * cs); + +/* Calculate a Chebyshev series using the storage provided. + * Uses the interval (a,b) and the order with which it + * was initially created. + * + */ +int gsl_cheb_init(gsl_cheb_series * cs, const gsl_function * func, + const double a, const double b); + +/* Return the order, size of coefficient array and coefficient array ptr */ +size_t gsl_cheb_order (const gsl_cheb_series * cs); +size_t gsl_cheb_size (const gsl_cheb_series * cs); +double *gsl_cheb_coeffs (const gsl_cheb_series * cs); + +/* Evaluate a Chebyshev series at a given point. + * No errors can occur for a struct obtained from gsl_cheb_new(). + */ +double gsl_cheb_eval(const gsl_cheb_series * cs, const double x); +int gsl_cheb_eval_err(const gsl_cheb_series * cs, const double x, + double * result, double * abserr); + + +/* Evaluate a Chebyshev series at a given point, to (at most) the given order. + * No errors can occur for a struct obtained from gsl_cheb_new(). + */ +double gsl_cheb_eval_n(const gsl_cheb_series * cs, const size_t order, + const double x); +int gsl_cheb_eval_n_err(const gsl_cheb_series * cs, const size_t order, + const double x, double * result, double * abserr); + + +/* Evaluate a Chebyshev series at a given point, using the default + * order for double precision mode(s) and the single precision + * order for other modes. + * No errors can occur for a struct obtained from gsl_cheb_new(). + */ +double gsl_cheb_eval_mode(const gsl_cheb_series * cs, const double x, gsl_mode_t mode); +int gsl_cheb_eval_mode_e(const gsl_cheb_series * cs, const double x, gsl_mode_t mode, double * result, double * abserr); + + + +/* Compute the derivative of a Chebyshev series. + */ +int gsl_cheb_calc_deriv(gsl_cheb_series * deriv, const gsl_cheb_series * cs); + +/* Compute the integral of a Chebyshev series. The + * integral is fixed by the condition that it equals zero at + * the left end-point, ie it is precisely + * Integrate[cs(t; a,b), {t, a, x}] + */ +int gsl_cheb_calc_integ(gsl_cheb_series * integ, const gsl_cheb_series * cs); + + + + +__END_DECLS + +#endif /* __GSL_CHEBYSHEV_H__ */ diff --git a/software/gsl-1.15/cheb/init.c b/software/gsl-1.15/cheb/init.c new file mode 100644 index 000000000..a923377d5 --- /dev/null +++ b/software/gsl-1.15/cheb/init.c @@ -0,0 +1,117 @@ +/* cheb/init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/*-*-*-*-*-*-*-*-*-*-*-* Allocators *-*-*-*-*-*-*-*-*-*-*-*/ + +gsl_cheb_series * +gsl_cheb_alloc(const size_t order) +{ + gsl_cheb_series * cs = (gsl_cheb_series *) malloc(sizeof(gsl_cheb_series)); + + if(cs == 0) { + GSL_ERROR_VAL("failed to allocate gsl_cheb_series struct", GSL_ENOMEM, 0); + } + + cs->order = order; + cs->order_sp = order; + + cs->c = (double *) malloc((order+1) * sizeof(double)); + + if(cs->c == 0) { + GSL_ERROR_VAL("failed to allocate cheb coefficients", GSL_ENOMEM, 0); + } + + cs->f = (double *) malloc((order+1) * sizeof(double)); + + if(cs->f == 0) { + GSL_ERROR_VAL("failed to allocate cheb function space", GSL_ENOMEM, 0); + } + + return cs; +} + + +void gsl_cheb_free(gsl_cheb_series * cs) +{ + RETURN_IF_NULL (cs); + free(cs->f); + free(cs->c); + free(cs); +} + +/*-*-*-*-*-*-*-*-*-*-*-* Initializer *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_cheb_init(gsl_cheb_series * cs, const gsl_function *func, + const double a, const double b) +{ + size_t k, j; + + if(a >= b) { + GSL_ERROR_VAL("null function interval [a,b]", GSL_EDOM, 0); + } + cs->a = a; + cs->b = b; + /* cs->err = 0.0; */ + + { + double bma = 0.5 * (cs->b - cs->a); + double bpa = 0.5 * (cs->b + cs->a); + double fac = 2.0/(cs->order +1.0); + + for(k = 0; k<=cs->order; k++) { + double y = cos(M_PI * (k+0.5)/(cs->order+1)); + cs->f[k] = GSL_FN_EVAL(func, (y*bma + bpa)); + } + + for(j = 0; j<=cs->order; j++) { + double sum = 0.0; + for(k = 0; k<=cs->order; k++) + sum += cs->f[k]*cos(M_PI * j*(k+0.5)/(cs->order+1)); + cs->c[j] = fac * sum; + } + + } + return GSL_SUCCESS; +} + +size_t +gsl_cheb_order (const gsl_cheb_series * cs) +{ + return cs->order; +} + +size_t +gsl_cheb_size (const gsl_cheb_series * cs) +{ + return (cs->order + 1); +} + +double * +gsl_cheb_coeffs (const gsl_cheb_series * cs) +{ + return cs->c; +} + diff --git a/software/gsl-1.15/cheb/integ.c b/software/gsl-1.15/cheb/integ.c new file mode 100644 index 000000000..772056308 --- /dev/null +++ b/software/gsl-1.15/cheb/integ.c @@ -0,0 +1,65 @@ +/* cheb/integ.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int gsl_cheb_calc_integ(gsl_cheb_series * integ, const gsl_cheb_series * f) +{ + const size_t n = f->order + 1; + const double con = 0.25 * (f->b - f->a); + + if(integ->order != f->order) + { + GSL_ERROR ("order of chebyshev series must be equal", GSL_ENOMEM); + } + + /* set the other parameters in the chebyshev struct */ + + integ->a = f->a; + integ->b = f->b; + + /* FIXME: should probably set integ->f[] as well */ + + if(n == 1) { + integ->c[0] = 0.; + } + else if(n == 2) { + integ->c[1] = con * f->c[0]; + integ->c[0] = 2.0 * integ->c[1]; + } + else { + double sum = 0.0; + double fac = 1.0; + size_t i; + for(i=1; i<=n-2; i++) { + integ->c[i] = con * (f->c[i-1] - f->c[i+1])/((double)i); + sum += fac * integ->c[i]; + fac = -fac; + } + integ->c[n-1] = con * f->c[n-2]/(n-1.0); + sum += fac * integ->c[n-1]; + integ->c[0] = 2.0 * sum; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/cheb/test.c b/software/gsl-1.15/cheb/test.c new file mode 100644 index 000000000..762f5b47e --- /dev/null +++ b/software/gsl-1.15/cheb/test.c @@ -0,0 +1,297 @@ +/* cheb/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +double f_T0 (double x, void * p) { + p = 0; + return 1.0; +} + +double f_T1 (double x, void * p) { + p = 0; + return x; +} + +double f_T2 (double x, void * p) { + p = 0; + return 2*x*x - 1; +} + +double f_sin (double x, void * p) { + p = 0; + return sin(x); +} + +double f_DP (double x, void * p) { + p = 0; + return 2.0; +} + +double f_P (double x, void * p) { + p = 0; + return 2.0*x + 3.0; +} + +double f_IP1 (double x, void * p) { + p = 0; + return 30*(x+5.0)/10.0; /* first order approximation to integral over -5,5 */ +} + + +double f_IP2 (double x, void * p) { + p = 0; + return x*x + 3*x - 10.0; +} + + +void +test_dim (const size_t n, const double a, const double b, + gsl_function * F, gsl_function * DF, gsl_function *IF) +{ + double tol = 100.0 * GSL_DBL_EPSILON; + double x; + + gsl_cheb_series * cs = gsl_cheb_alloc(n); + gsl_cheb_series * csd = gsl_cheb_alloc(n); + gsl_cheb_series * csi = gsl_cheb_alloc(n); + + gsl_cheb_init(cs, F, a, b); + + for(x=a; xc, "gsl_cheb_coeffs"); + } + + for (i = 0; iorder; i++) + { + double c_exp = (i == 0) ? 2.0 : 0.0; + gsl_test_abs (cs->c[i], c_exp, tol, "c[%d] for T_0(x)", i); + } + + gsl_cheb_init(cs, &F_T1, -1.0, 1.0); + + for (i = 0; iorder; i++) + { + double c_exp = (i == 1) ? 1.0 : 0.0; + gsl_test_abs (cs->c[i], c_exp, tol, "c[%d] for T_1(x)", i); + } + + gsl_cheb_init(cs, &F_T2, -1.0, 1.0); + + for (i = 0; iorder; i++) + { + double c_exp = (i == 2) ? 1.0 : 0.0; + gsl_test_abs (cs->c[i], c_exp, tol, "c[%d] for T_2(x)", i); + } + + gsl_cheb_init(cs, &F_sin, -M_PI, M_PI); + + gsl_test_abs (cs->c[0], 0.0, tol, "c[0] for F_sin(x)"); + gsl_test_abs (cs->c[1], 5.69230686359506e-01, tol, "c[1] for F_sin(x)"); + gsl_test_abs (cs->c[2], 0.0, tol, "c[2] for F_sin(x)"); + gsl_test_abs (cs->c[3], -6.66916672405979e-01, tol, "c[3] for F_sin(x)"); + gsl_test_abs (cs->c[4], 0.0, tol, "c[4] for F_sin(x)"); + gsl_test_abs (cs->c[5], 1.04282368734237e-01, tol, "c[5] for F_sin(x)"); + + for(x=-M_PI; x + + * init.c (gsl_combination_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * gsl_combination.h: added gsl_inline.h, use INLINE_DECL and + GSL_RANGE_COND for gsl_combination_get + + * combination.c: moved gsl_combination_get to inline.c + + * inline.c: separate file for inline function object code + + * Makefile.am (INCLUDES): use top_srcdir only, remove top_builddir + +2003-07-30 Brian Gough + + * init.c (gsl_combination_alloc): set c->data to NULL when k=0 + +2003-04-12 Szymon Jaroszewicz + + * combination.c (gsl_combination_valid): fix a typo in error + message + +2003-03-22 Brian Gough + + * combination.c (gsl_combination_memcpy): added memcpy function + +2003-03-21 Brian Gough + + * combination.c (gsl_combination_valid): fix bug in test for + validity (cj + + * test.c: use unsigned loop variables + +Sat Dec 8 18:22:06 2001 Szymon Jaroszewicz + + * added combination support to GSL + diff --git a/software/gsl-1.15/combination/Makefile.am b/software/gsl-1.15/combination/Makefile.am new file mode 100644 index 000000000..c76fa5cf3 --- /dev/null +++ b/software/gsl-1.15/combination/Makefile.am @@ -0,0 +1,25 @@ +noinst_LTLIBRARIES = libgslcombination.la + +pkginclude_HEADERS = gsl_combination.h + +INCLUDES = -I$(top_srcdir) + +libgslcombination_la_SOURCES = init.c file.c combination.c inline.c + +noinst_HEADERS = + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c + +test_LDADD = libgslcombination.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#noinst_PROGRAMS = demo +#demo_SOURCES = demo.c +#demo_LDADD = libgslcombination.la ../vector/libgslvector.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#CLEANFILES = test.txt test.dat + + diff --git a/software/gsl-1.15/combination/Makefile.in b/software/gsl-1.15/combination/Makefile.in new file mode 100644 index 000000000..65f4e37dc --- /dev/null +++ b/software/gsl-1.15/combination/Makefile.in @@ -0,0 +1,673 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = combination +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslcombination_la_LIBADD = +am_libgslcombination_la_OBJECTS = init.lo file.lo combination.lo \ + inline.lo +libgslcombination_la_OBJECTS = $(am_libgslcombination_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslcombination.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslcombination_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslcombination_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslcombination.la +pkginclude_HEADERS = gsl_combination.h +INCLUDES = -I$(top_srcdir) +libgslcombination_la_SOURCES = init.c file.c combination.c inline.c +noinst_HEADERS = +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslcombination.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu combination/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu combination/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslcombination.la: $(libgslcombination_la_OBJECTS) $(libgslcombination_la_DEPENDENCIES) + $(LINK) $(libgslcombination_la_OBJECTS) $(libgslcombination_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/combination.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#noinst_PROGRAMS = demo +#demo_SOURCES = demo.c +#demo_LDADD = libgslcombination.la ../vector/libgslvector.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#CLEANFILES = test.txt test.dat + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/combination/TODO b/software/gsl-1.15/combination/TODO new file mode 100644 index 000000000..fbd4f7c6c --- /dev/null +++ b/software/gsl-1.15/combination/TODO @@ -0,0 +1,4 @@ +# -*- org -*- +#+CATEGORY: combination + +* The module has a lot of overlap with multiset/ some of the functions could be abstracted out. diff --git a/software/gsl-1.15/combination/combination.c b/software/gsl-1.15/combination/combination.c new file mode 100644 index 000000000..370a76982 --- /dev/null +++ b/software/gsl-1.15/combination/combination.c @@ -0,0 +1,172 @@ +/* combination/combination.c + * based on permutation/permutation.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +size_t +gsl_combination_n (const gsl_combination * c) +{ + return c->n ; +} + +size_t +gsl_combination_k (const gsl_combination * c) +{ + return c->k ; +} + +size_t * +gsl_combination_data (const gsl_combination * c) +{ + return c->data ; +} + +int +gsl_combination_valid (gsl_combination * c) +{ + const size_t n = c->n ; + const size_t k = c->k ; + + size_t i, j ; + + if( k > n ) + { + GSL_ERROR("combination has k greater than n", GSL_FAILURE) ; + } + for (i = 0; i < k; i++) + { + const size_t ci = c->data[i]; + + if (ci >= n) + { + GSL_ERROR("combination index outside range", GSL_FAILURE) ; + } + + for (j = 0; j < i; j++) + { + if (c->data[j] == ci) + { + GSL_ERROR("duplicate combination index", GSL_FAILURE) ; + } + if (c->data[j] > ci) + { + GSL_ERROR("combination indices not in increasing order", + GSL_FAILURE) ; + } + } + } + + return GSL_SUCCESS; +} + + +int +gsl_combination_next (gsl_combination * c) +{ + /* Replaces c with the next combination (in the standard lexicographical + * ordering). Returns GSL_FAILURE if there is no next combination. + */ + const size_t n = c->n; + const size_t k = c->k; + size_t *data = c->data; + size_t i; + + if(k == 0) + { + return GSL_FAILURE; + } + i = k - 1; + + while(i > 0 && data[i] == n - k + i) + { + i--; + } + if(i == 0 && data[i] == n - k) + { + return GSL_FAILURE; + } + data[i]++; + for(; i < k - 1; i++) + { + data[i + 1] = data[i] + 1; + } + return GSL_SUCCESS; +} + +int +gsl_combination_prev (gsl_combination * c) +{ + /* Replaces c with the previous combination (in the standard + * lexicographical ordering). Returns GSL_FAILURE if there is no + * previous combination. + */ + const size_t n = c->n; + const size_t k = c->k; + size_t *data = c->data; + size_t i; + + if(k == 0) + { + return GSL_FAILURE; + } + i = k - 1; + + while(i > 0 && data[i] == data[i-1] + 1) + { + i--; + } + if(i == 0 && data[i] == 0) + { + return GSL_FAILURE; + } + data[i++]--; + for(; i < k; i++) + { + data[i] = n - k + i; + } + return GSL_SUCCESS; +} + +int +gsl_combination_memcpy (gsl_combination * dest, const gsl_combination * src) +{ + const size_t src_n = src->n; + const size_t src_k = src->k; + const size_t dest_n = dest->n; + const size_t dest_k = dest->k; + + if (src_n != dest_n || src_k != dest_k) + { + GSL_ERROR ("combination lengths are not equal", GSL_EBADLEN); + } + + { + size_t j; + + for (j = 0; j < src_k; j++) + { + dest->data[j] = src->data[j]; + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/combination/file.c b/software/gsl-1.15/combination/file.c new file mode 100644 index 000000000..41622edba --- /dev/null +++ b/software/gsl-1.15/combination/file.c @@ -0,0 +1,114 @@ +/* combination/file.c + * based on permutation/file.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#define IN_FORMAT "%lu" + +int +gsl_combination_fread (FILE * stream, gsl_combination * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t items = fread (data, sizeof (size_t), k, stream); + + if (items != k) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_combination_fwrite (FILE * stream, const gsl_combination * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t items = fwrite (data, sizeof (size_t), k, stream); + + if (items != k) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_combination_fprintf (FILE * stream, const gsl_combination * c, const char *format) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t i; + + for (i = 0; i < k; i++) + { + int status = fprintf (stream, format, data[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +int +gsl_combination_fscanf (FILE * stream, gsl_combination * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t i; + + for (i = 0; i < k; i++) + { + unsigned long j ; + + /* FIXME: what if size_t != unsigned long ??? + + want read in size_t but have to read in unsigned long to avoid + error from compiler */ + + int status = fscanf (stream, IN_FORMAT, &j); + + if (status != 1) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + + data[i] = j; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/combination/gsl_combination.h b/software/gsl-1.15/combination/gsl_combination.h new file mode 100644 index 000000000..69de7cf19 --- /dev/null +++ b/software/gsl-1.15/combination/gsl_combination.h @@ -0,0 +1,92 @@ +/* combination/gsl_combination.h + * based on permutation/gsl_permutation.h by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_COMBINATION_H__ +#define __GSL_COMBINATION_H__ + +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_combination_struct +{ + size_t n; + size_t k; + size_t *data; +}; + +typedef struct gsl_combination_struct gsl_combination; + +gsl_combination *gsl_combination_alloc (const size_t n, const size_t k); +gsl_combination *gsl_combination_calloc (const size_t n, const size_t k); +void gsl_combination_init_first (gsl_combination * c); +void gsl_combination_init_last (gsl_combination * c); +void gsl_combination_free (gsl_combination * c); +int gsl_combination_memcpy (gsl_combination * dest, const gsl_combination * src); + +int gsl_combination_fread (FILE * stream, gsl_combination * c); +int gsl_combination_fwrite (FILE * stream, const gsl_combination * c); +int gsl_combination_fscanf (FILE * stream, gsl_combination * c); +int gsl_combination_fprintf (FILE * stream, const gsl_combination * c, const char *format); + +size_t gsl_combination_n (const gsl_combination * c); +size_t gsl_combination_k (const gsl_combination * c); +size_t * gsl_combination_data (const gsl_combination * c); + +int gsl_combination_valid (gsl_combination * c); +int gsl_combination_next (gsl_combination * c); +int gsl_combination_prev (gsl_combination * c); + +INLINE_DECL size_t gsl_combination_get (const gsl_combination * c, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +size_t +gsl_combination_get (const gsl_combination * c, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= c->k)) /* size_t is unsigned, can't be negative */ + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return c->data[i]; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_COMBINATION_H__ */ diff --git a/software/gsl-1.15/combination/init.c b/software/gsl-1.15/combination/init.c new file mode 100644 index 000000000..99da7a7f2 --- /dev/null +++ b/software/gsl-1.15/combination/init.c @@ -0,0 +1,128 @@ +/* combination/init.c + * based on permutation/init.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_combination * +gsl_combination_alloc (const size_t n, const size_t k) +{ + gsl_combination * c; + + if (n == 0) + { + GSL_ERROR_VAL ("combination parameter n must be positive integer", + GSL_EDOM, 0); + } + if (k > n) + { + GSL_ERROR_VAL ("combination length k must be an integer less than or equal to n", + GSL_EDOM, 0); + } + c = (gsl_combination *) malloc (sizeof (gsl_combination)); + + if (c == 0) + { + GSL_ERROR_VAL ("failed to allocate space for combination struct", + GSL_ENOMEM, 0); + } + + if (k > 0) + { + c->data = (size_t *) malloc (k * sizeof (size_t)); + + if (c->data == 0) + { + free (c); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for combination data", + GSL_ENOMEM, 0); + } + } + else + { + c->data = 0; + } + + c->n = n; + c->k = k; + + return c; +} + +gsl_combination * +gsl_combination_calloc (const size_t n, const size_t k) +{ + size_t i; + + gsl_combination * c = gsl_combination_alloc (n, k); + + if (c == 0) + return 0; + + /* initialize combination to identity */ + + for (i = 0; i < k; i++) + { + c->data[i] = i; + } + + return c; +} + +void +gsl_combination_init_first (gsl_combination * c) +{ + const size_t k = c->k ; + size_t i; + + /* initialize combination to identity */ + + for (i = 0; i < k; i++) + { + c->data[i] = i; + } +} + +void +gsl_combination_init_last (gsl_combination * c) +{ + const size_t k = c->k ; + size_t i; + size_t n = c->n; + + /* initialize combination to identity */ + + for (i = 0; i < k; i++) + { + c->data[i] = n - k + i; + } +} + +void +gsl_combination_free (gsl_combination * c) +{ + RETURN_IF_NULL (c); + if (c->k > 0) free (c->data); + free (c); +} diff --git a/software/gsl-1.15/combination/inline.c b/software/gsl-1.15/combination/inline.c new file mode 100644 index 000000000..c33c358d8 --- /dev/null +++ b/software/gsl-1.15/combination/inline.c @@ -0,0 +1,24 @@ +/* combination/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/combination/test.c b/software/gsl-1.15/combination/test.c new file mode 100644 index 000000000..0e0a795d8 --- /dev/null +++ b/software/gsl-1.15/combination/test.c @@ -0,0 +1,261 @@ +/* combination/test.c + * based on permutation/test.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +size_t c63[20][3] = { + { 0, 1, 2 }, { 0, 1, 3 }, { 0, 1, 4 }, { 0, 1, 5 }, + { 0, 2, 3 }, { 0, 2, 4 }, { 0, 2, 5 }, { 0, 3, 4 }, + { 0, 3, 5 }, { 0, 4, 5 }, { 1, 2, 3 }, { 1, 2, 4 }, + { 1, 2, 5 }, { 1, 3, 4 }, { 1, 3, 5 }, { 1, 4, 5 }, + { 2, 3, 4 }, { 2, 3, 5 }, { 2, 4, 5 }, { 3, 4, 5 } +} ; + +void my_error_handler (const char *reason, const char *file, int line, int err); + + +int +main (void) +{ + size_t i, j; + int status = 0, s; + gsl_combination * c ; + + gsl_ieee_env_setup (); + + c = gsl_combination_alloc (6,3); + + /* Test combinations in forward order */ + + gsl_combination_init_first (c); + + i = 0; + + do + { + if ( i >= 20 ) + { + status = 1; + break; + } + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[i][j]); + } + + { + int s1 = gsl_combination_valid (c); + gsl_test (s1, "gsl_combination_valid (%u)", i); + } + + i++; + } + while (gsl_combination_next(c) == GSL_SUCCESS); + + gsl_test(status, "gsl_combination_next, 6 choose 3 combination, 20 steps"); + + gsl_combination_next(c); + gsl_combination_next(c); + gsl_combination_next(c); + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[19][j]); + } + gsl_test(status, "gsl_combination_next on the last combination"); + + { + int s1 = gsl_combination_valid (c); + gsl_test (s1, "gsl_combination_valid on the last combination"); + } + + { + gsl_combination * d = gsl_combination_alloc (6,3); + gsl_combination_memcpy (d, c); + + status = 0; + + for (j = 0; j < 3; j++) + { + status |= (d->data[j] != c->data[j]); + } + + gsl_test (status, "gsl_combination_memcpy, 6 choose 3 combination"); + gsl_combination_free(d); + } + + + /* Now test combinations in reverse order */ + + gsl_combination_init_last (c); + + i = 20; + do + { + if ( i == 0 ) + { + status = 1; + break; + } + + i--; + + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[i][j]); + } + + { + int s1 = gsl_combination_valid (c); + gsl_test (s1, "gsl_combination_valid (%u)", i); + } + } + while (gsl_combination_prev(c) == GSL_SUCCESS); + + gsl_test(status, "gsl_combination_prev, 6 choose 3 combination, 20 steps"); + + gsl_combination_prev(c); + gsl_combination_prev(c); + gsl_combination_prev(c); + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[0][j]); + } + gsl_test(status, "gsl_combination_prev on the first combination"); + + { + int s1 = gsl_combination_valid (c); + gsl_test (s1, "gsl_combination_valid on the first combination"); + } + + { + gsl_combination * d = gsl_combination_alloc (6,3); + gsl_combination_memcpy (d, c); + + status = 0; + + for (j = 0; j < 3; j++) + { + status |= (d->data[j] != c->data[j]); + } + + gsl_test (status, "gsl_combination_memcpy, 6 choose 3 combination"); + gsl_combination_free(d); + } + + gsl_combination_free (c); + + c = gsl_combination_calloc(7, 0); + /* should return GSL_FAILURE every time */ + status |= (gsl_combination_next(c) != GSL_FAILURE); + status |= (gsl_combination_next(c) != GSL_FAILURE); + status |= (gsl_combination_prev(c) != GSL_FAILURE); + status |= (gsl_combination_prev(c) != GSL_FAILURE); + gsl_test(status, "gsl_combination 7 choose 0"); + gsl_combination_free (c); + + c = gsl_combination_calloc(7, 7); + /* should return GSL_FAILURE every time */ + for(j = 0; j < 7; j++) + { + status |= (gsl_combination_get(c, j) != j); + } + status |= (gsl_combination_next(c) != GSL_FAILURE); + for(j = 0; j < 7; j++) + { + status |= (gsl_combination_get(c, j) != j); + } + status |= (gsl_combination_next(c) != GSL_FAILURE); + for(j = 0; j < 7; j++) + { + status |= (gsl_combination_get(c, j) != j); + } + status |= (gsl_combination_prev(c) != GSL_FAILURE); + for(j = 0; j < 7; j++) + { + status |= (gsl_combination_get(c, j) != j); + } + status |= (gsl_combination_prev(c) != GSL_FAILURE); + for(j = 0; j < 7; j++) + { + status |= (gsl_combination_get(c, j) != j); + } + gsl_test(status, "gsl_combination 7 choose 7"); + gsl_combination_free (c); + + c = gsl_combination_calloc(6, 3); + + gsl_set_error_handler (&my_error_handler); + + c->data[0] = 1; + c->data[1] = 1; + c->data[2] = 2; + s = gsl_combination_valid (c); + gsl_test (!s, "gsl_combination_valid on an invalid combination (1,1,2)"); + + c->data[0] = 2; + c->data[1] = 1; + c->data[2] = 0; + s = gsl_combination_valid (c); + gsl_test (!s, "gsl_combination_valid on an invalid combination (2,1,0)"); + + c->data[0] = 1; + c->data[1] = 2; + c->data[2] = 0; + s = gsl_combination_valid (c); + gsl_test (!s, "gsl_combination_valid on an invalid combination (1,2,0)"); + + { + gsl_combination * d = gsl_combination_alloc (6,4); + int s = gsl_combination_memcpy (d, c); + gsl_test (!s, "gsl_combination_memcpy, (6,4) vs (6,3)"); + gsl_combination_free(d); + } + + { + gsl_combination * d = gsl_combination_alloc (7,3); + int s = gsl_combination_memcpy (d, c); + gsl_test (!s, "gsl_combination_memcpy, (7,3) vs (6,3)"); + gsl_combination_free(d); + } + + { + gsl_combination * d = gsl_combination_alloc (7,2); + int s = gsl_combination_memcpy (d, c); + gsl_test (!s, "gsl_combination_memcpy, (7,2) vs (6,3)"); + gsl_combination_free(d); + } + + + gsl_combination_free (c); + + exit (gsl_test_summary()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err) ; +} diff --git a/software/gsl-1.15/complex/.deps/inline.Plo b/software/gsl-1.15/complex/.deps/inline.Plo new file mode 100644 index 000000000..a47d1d2ba --- /dev/null +++ b/software/gsl-1.15/complex/.deps/inline.Plo @@ -0,0 +1,10 @@ +inline.lo: inline.c ../build.h ../gsl/gsl_complex_math.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h + +../build.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/complex/.deps/math.Plo b/software/gsl-1.15/complex/.deps/math.Plo new file mode 100644 index 000000000..4241489b1 --- /dev/null +++ b/software/gsl-1.15/complex/.deps/math.Plo @@ -0,0 +1,61 @@ +math.lo: math.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_complex.h ../gsl/gsl_complex_math.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/complex/.deps/test.Po b/software/gsl-1.15/complex/.deps/test.Po new file mode 100644 index 000000000..00cc2465d --- /dev/null +++ b/software/gsl-1.15/complex/.deps/test.Po @@ -0,0 +1,142 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_ieee_utils.h \ + ../gsl/gsl_test.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_complex.h ../gsl/gsl_complex_math.h \ + results1.h results.h results2.h results_real.h results_zreal.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_test.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_complex_math.h: + +results1.h: + +results.h: + +results2.h: + +results_real.h: + +results_zreal.h: diff --git a/software/gsl-1.15/complex/ChangeLog b/software/gsl-1.15/complex/ChangeLog new file mode 100644 index 000000000..57d4ec7d8 --- /dev/null +++ b/software/gsl-1.15/complex/ChangeLog @@ -0,0 +1,80 @@ +2010-05-06 Brian Gough + + * test.c (main): added tests for functions like pow_real + +2008-07-03 Brian Gough + + * math.c: handle inline functions separately + + * gsl_complex_math.h: add declarations for inline functions + + * inline.c: separate file for inline functions + + * Makefile.am (INCLUDES): use top_srcdir + +2007-09-14 Brian Gough + + * test.c: add a margin of safety on tests for released versions, + as in special functions + +2007-08-30 Brian Gough + + * Makefile.am (test_SOURCES): added missing file results2.h + +2007-08-30 Brian Gough + + * Makefile.am (test_SOURCES): added missing file results2.h + +2007-08-15 Brian Gough + + * math.c (gsl_complex_pow): handle (0,0)^(0,0) (x,y)^(1,0) + and (x,y)^(-1,0) as special cases + +2003-01-25 Brian Gough + + * math.c (gsl_complex_arccsc_real): fixed bug for incorrect sign + of imaginary part when -1 + + * math.c (gsl_complex_arg): enforce special case arg(0,0) = 0.0 + +Mon Sep 10 22:57:27 2001 Brian Gough + + * math.c (gsl_complex_div_real gsl_complex_div_real): added + missing functions div_real and div_imag + +Mon Aug 27 18:58:41 2001 Brian Gough + + * test.el: trim the tests down to a more reasonable size + +Thu Aug 9 15:48:48 2001 Brian Gough + + * math.c (gsl_complex_tanh): improve accuracy for large R + +Fri Jul 27 23:29:10 2001 Brian Gough + + * math.c (gsl_complex_cos): avoid returning negative zero for the + imaginary part when the argument is purely real + +Wed Mar 21 14:40:34 2001 Brian Gough + + * gsl_complex.h (GSL_COMPLEX_P): added macro to point to beginning + of complex array within the struct + +Mon Dec 4 12:29:12 2000 Brian Gough + + * math.c (gsl_complex_rect): changed the function gsl_complex_xy + to gsl_complex_rect, since this is more meaningful + +Sun Oct 22 13:55:09 2000 Brian Gough + + * math.c: changed calls to gsl_hypot() to hypot() so that the + system function is used in preference (the configure script will + define hypot to gsl_hypot if hypot is unavailable), similar change + for functions log1p and gsl_log1p also + +Wed Mar 15 11:17:21 2000 Brian Gough + + * gsl_complex.h: moved into complex/ subdirectory from top-level + diff --git a/software/gsl-1.15/complex/Makefile.am b/software/gsl-1.15/complex/Makefile.am new file mode 100644 index 000000000..8b0e4fb3c --- /dev/null +++ b/software/gsl-1.15/complex/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libgslcomplex.la + +pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h + +INCLUDES = -I$(top_srcdir) + +libgslcomplex_la_SOURCES = math.c inline.c + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test + +test_SOURCES = test.c results.h results1.h results2.h results_real.h results_zreal.h +test_LDADD = libgslcomplex.la ../err/libgslerr.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +results: + emacs -batch -l test.el -f test1 | sed 's/00\+e/0e/g' > results1.h + emacs -batch -l test.el -f test2 | sed 's/00\+e/0e/g' > results.h + emacs -batch -l test.el -f test3 | sed 's/00\+e/0e/g' > results_real.h + emacs -batch -l test.el -f test4 | sed 's/00\+e/0e/g' > results2.h + emacs -batch -l test.el -f test5 | sed 's/00\+e/0e/g' > results_zreal.h diff --git a/software/gsl-1.15/complex/Makefile.in b/software/gsl-1.15/complex/Makefile.in new file mode 100644 index 000000000..d167292c9 --- /dev/null +++ b/software/gsl-1.15/complex/Makefile.in @@ -0,0 +1,669 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = complex +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslcomplex_la_LIBADD = +am_libgslcomplex_la_OBJECTS = math.lo inline.lo +libgslcomplex_la_OBJECTS = $(am_libgslcomplex_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslcomplex.la ../err/libgslerr.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslcomplex_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslcomplex_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslcomplex.la +pkginclude_HEADERS = gsl_complex.h gsl_complex_math.h +INCLUDES = -I$(top_srcdir) +libgslcomplex_la_SOURCES = math.c inline.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c results.h results1.h results2.h results_real.h results_zreal.h +test_LDADD = libgslcomplex.la ../err/libgslerr.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu complex/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu complex/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslcomplex.la: $(libgslcomplex_la_OBJECTS) $(libgslcomplex_la_DEPENDENCIES) + $(LINK) $(libgslcomplex_la_OBJECTS) $(libgslcomplex_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +results: + emacs -batch -l test.el -f test1 | sed 's/00\+e/0e/g' > results1.h + emacs -batch -l test.el -f test2 | sed 's/00\+e/0e/g' > results.h + emacs -batch -l test.el -f test3 | sed 's/00\+e/0e/g' > results_real.h + emacs -batch -l test.el -f test4 | sed 's/00\+e/0e/g' > results2.h + emacs -batch -l test.el -f test5 | sed 's/00\+e/0e/g' > results_zreal.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/complex/TODO b/software/gsl-1.15/complex/TODO new file mode 100644 index 000000000..d02b777f5 --- /dev/null +++ b/software/gsl-1.15/complex/TODO @@ -0,0 +1,21 @@ +# -*- org -*- +#+CATEGORY: complex + +* Complex polynomial solvers (Got Newton-Mueller from +jotahtin@cc.hut.fi, still to add (BJG)). + +* The asymptotic behavior of the secondary functions (sec, csc, cot, +etc) can overflow because of expressions like cosh(x) / D , where D = +cosh^2 which is computed prior to the division. This should by +special casing "small" vs "large" arguments as has been done for the +sin,cos,tan versions. + +* Perhaps there is something useful in LCY65 L. A. Lyusternik, +O. A. Chervonenkis, and A. R. Yanpol'skii, Handbook for computing +elementary functions, International Series of Monographs in Pure and +Applied Mathematics, vol. 76, Pergamon Press, Oxford, 1965. + +* Comparing the Complex Arithmetic routines in Section 5.5 of Numerical Recipes +gsl_complex_div() uses simple complex division while 5.5.5 has a more +sophisticated one that avoids underflow/overflow. + diff --git a/software/gsl-1.15/complex/gsl_complex.h b/software/gsl-1.15/complex/gsl_complex.h new file mode 100644 index 000000000..e77b77062 --- /dev/null +++ b/software/gsl-1.15/complex/gsl_complex.h @@ -0,0 +1,103 @@ +/* complex/gsl_complex.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_COMPLEX_H__ +#define __GSL_COMPLEX_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* two consecutive built-in types as a complex number */ +typedef double * gsl_complex_packed ; +typedef float * gsl_complex_packed_float ; +typedef long double * gsl_complex_packed_long_double ; + +typedef const double * gsl_const_complex_packed ; +typedef const float * gsl_const_complex_packed_float ; +typedef const long double * gsl_const_complex_packed_long_double ; + + +/* 2N consecutive built-in types as N complex numbers */ +typedef double * gsl_complex_packed_array ; +typedef float * gsl_complex_packed_array_float ; +typedef long double * gsl_complex_packed_array_long_double ; + +typedef const double * gsl_const_complex_packed_array ; +typedef const float * gsl_const_complex_packed_array_float ; +typedef const long double * gsl_const_complex_packed_array_long_double ; + + +/* Yes... this seems weird. Trust us. The point is just that + sometimes you want to make it obvious that something is + an output value. The fact that it lacks a 'const' may not + be enough of a clue for people in some contexts. + */ +typedef double * gsl_complex_packed_ptr ; +typedef float * gsl_complex_packed_float_ptr ; +typedef long double * gsl_complex_packed_long_double_ptr ; + +typedef const double * gsl_const_complex_packed_ptr ; +typedef const float * gsl_const_complex_packed_float_ptr ; +typedef const long double * gsl_const_complex_packed_long_double_ptr ; + + +typedef struct + { + long double dat[2]; + } +gsl_complex_long_double; + +typedef struct + { + double dat[2]; + } +gsl_complex; + +typedef struct + { + float dat[2]; + } +gsl_complex_float; + +#define GSL_REAL(z) ((z).dat[0]) +#define GSL_IMAG(z) ((z).dat[1]) +#define GSL_COMPLEX_P(zp) ((zp)->dat) +#define GSL_COMPLEX_P_REAL(zp) ((zp)->dat[0]) +#define GSL_COMPLEX_P_IMAG(zp) ((zp)->dat[1]) +#define GSL_COMPLEX_EQ(z1,z2) (((z1).dat[0] == (z2).dat[0]) && ((z1).dat[1] == (z2).dat[1])) + +#define GSL_SET_COMPLEX(zp,x,y) do {(zp)->dat[0]=(x); (zp)->dat[1]=(y);} while(0) +#define GSL_SET_REAL(zp,x) do {(zp)->dat[0]=(x);} while(0) +#define GSL_SET_IMAG(zp,y) do {(zp)->dat[1]=(y);} while(0) + +#define GSL_SET_COMPLEX_PACKED(zp,n,x,y) do {*((zp)+2*(n))=(x); *((zp)+(2*(n)+1))=(y);} while(0) + +__END_DECLS + +#endif /* __GSL_COMPLEX_H__ */ diff --git a/software/gsl-1.15/complex/gsl_complex_math.h b/software/gsl-1.15/complex/gsl_complex_math.h new file mode 100644 index 000000000..ad8d076a6 --- /dev/null +++ b/software/gsl-1.15/complex/gsl_complex_math.h @@ -0,0 +1,142 @@ +/* complex/gsl_complex_math.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Jorma Olavi T�htinen, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_COMPLEX_MATH_H__ +#define __GSL_COMPLEX_MATH_H__ +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Complex numbers */ + +gsl_complex gsl_complex_polar (double r, double theta); /* r= r e^(i theta) */ + +INLINE_DECL gsl_complex gsl_complex_rect (double x, double y); /* r= real+i*imag */ + +#ifdef HAVE_INLINE +INLINE_FUN gsl_complex +gsl_complex_rect (double x, double y) +{ /* return z = x + i y */ + gsl_complex z; + GSL_SET_COMPLEX (&z, x, y); + return z; +} +#endif + +#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0,0.0)) +#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0,0.0)) +#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0,0.0)) + +/* Properties of complex numbers */ + +double gsl_complex_arg (gsl_complex z); /* return arg(z), -pi< arg(z) <=+pi */ +double gsl_complex_abs (gsl_complex z); /* return |z| */ +double gsl_complex_abs2 (gsl_complex z); /* return |z|^2 */ +double gsl_complex_logabs (gsl_complex z); /* return log|z| */ + +/* Complex arithmetic operators */ + +gsl_complex gsl_complex_add (gsl_complex a, gsl_complex b); /* r=a+b */ +gsl_complex gsl_complex_sub (gsl_complex a, gsl_complex b); /* r=a-b */ +gsl_complex gsl_complex_mul (gsl_complex a, gsl_complex b); /* r=a*b */ +gsl_complex gsl_complex_div (gsl_complex a, gsl_complex b); /* r=a/b */ + +gsl_complex gsl_complex_add_real (gsl_complex a, double x); /* r=a+x */ +gsl_complex gsl_complex_sub_real (gsl_complex a, double x); /* r=a-x */ +gsl_complex gsl_complex_mul_real (gsl_complex a, double x); /* r=a*x */ +gsl_complex gsl_complex_div_real (gsl_complex a, double x); /* r=a/x */ + +gsl_complex gsl_complex_add_imag (gsl_complex a, double y); /* r=a+iy */ +gsl_complex gsl_complex_sub_imag (gsl_complex a, double y); /* r=a-iy */ +gsl_complex gsl_complex_mul_imag (gsl_complex a, double y); /* r=a*iy */ +gsl_complex gsl_complex_div_imag (gsl_complex a, double y); /* r=a/iy */ + +gsl_complex gsl_complex_conjugate (gsl_complex z); /* r=conj(z) */ +gsl_complex gsl_complex_inverse (gsl_complex a); /* r=1/a */ +gsl_complex gsl_complex_negative (gsl_complex a); /* r=-a */ + +/* Elementary Complex Functions */ + +gsl_complex gsl_complex_sqrt (gsl_complex z); /* r=sqrt(z) */ +gsl_complex gsl_complex_sqrt_real (double x); /* r=sqrt(x) (x<0 ok) */ + +gsl_complex gsl_complex_pow (gsl_complex a, gsl_complex b); /* r=a^b */ +gsl_complex gsl_complex_pow_real (gsl_complex a, double b); /* r=a^b */ + +gsl_complex gsl_complex_exp (gsl_complex a); /* r=exp(a) */ +gsl_complex gsl_complex_log (gsl_complex a); /* r=log(a) (base e) */ +gsl_complex gsl_complex_log10 (gsl_complex a); /* r=log10(a) (base 10) */ +gsl_complex gsl_complex_log_b (gsl_complex a, gsl_complex b); /* r=log_b(a) (base=b) */ + +/* Complex Trigonometric Functions */ + +gsl_complex gsl_complex_sin (gsl_complex a); /* r=sin(a) */ +gsl_complex gsl_complex_cos (gsl_complex a); /* r=cos(a) */ +gsl_complex gsl_complex_sec (gsl_complex a); /* r=sec(a) */ +gsl_complex gsl_complex_csc (gsl_complex a); /* r=csc(a) */ +gsl_complex gsl_complex_tan (gsl_complex a); /* r=tan(a) */ +gsl_complex gsl_complex_cot (gsl_complex a); /* r=cot(a) */ + +/* Inverse Complex Trigonometric Functions */ + +gsl_complex gsl_complex_arcsin (gsl_complex a); /* r=arcsin(a) */ +gsl_complex gsl_complex_arcsin_real (double a); /* r=arcsin(a) */ +gsl_complex gsl_complex_arccos (gsl_complex a); /* r=arccos(a) */ +gsl_complex gsl_complex_arccos_real (double a); /* r=arccos(a) */ +gsl_complex gsl_complex_arcsec (gsl_complex a); /* r=arcsec(a) */ +gsl_complex gsl_complex_arcsec_real (double a); /* r=arcsec(a) */ +gsl_complex gsl_complex_arccsc (gsl_complex a); /* r=arccsc(a) */ +gsl_complex gsl_complex_arccsc_real (double a); /* r=arccsc(a) */ +gsl_complex gsl_complex_arctan (gsl_complex a); /* r=arctan(a) */ +gsl_complex gsl_complex_arccot (gsl_complex a); /* r=arccot(a) */ + +/* Complex Hyperbolic Functions */ + +gsl_complex gsl_complex_sinh (gsl_complex a); /* r=sinh(a) */ +gsl_complex gsl_complex_cosh (gsl_complex a); /* r=coshh(a) */ +gsl_complex gsl_complex_sech (gsl_complex a); /* r=sech(a) */ +gsl_complex gsl_complex_csch (gsl_complex a); /* r=csch(a) */ +gsl_complex gsl_complex_tanh (gsl_complex a); /* r=tanh(a) */ +gsl_complex gsl_complex_coth (gsl_complex a); /* r=coth(a) */ + +/* Inverse Complex Hyperbolic Functions */ + +gsl_complex gsl_complex_arcsinh (gsl_complex a); /* r=arcsinh(a) */ +gsl_complex gsl_complex_arccosh (gsl_complex a); /* r=arccosh(a) */ +gsl_complex gsl_complex_arccosh_real (double a); /* r=arccosh(a) */ +gsl_complex gsl_complex_arcsech (gsl_complex a); /* r=arcsech(a) */ +gsl_complex gsl_complex_arccsch (gsl_complex a); /* r=arccsch(a) */ +gsl_complex gsl_complex_arctanh (gsl_complex a); /* r=arctanh(a) */ +gsl_complex gsl_complex_arctanh_real (double a); /* r=arctanh(a) */ +gsl_complex gsl_complex_arccoth (gsl_complex a); /* r=arccoth(a) */ + +__END_DECLS + +#endif /* __GSL_COMPLEX_MATH_H__ */ diff --git a/software/gsl-1.15/complex/inline.c b/software/gsl-1.15/complex/inline.c new file mode 100644 index 000000000..9490ece2c --- /dev/null +++ b/software/gsl-1.15/complex/inline.c @@ -0,0 +1,24 @@ +/* complex/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/complex/math.c b/software/gsl-1.15/complex/math.c new file mode 100644 index 000000000..47b925618 --- /dev/null +++ b/software/gsl-1.15/complex/math.c @@ -0,0 +1,1019 @@ +/* complex/math.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jorma Olavi T�htinen, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Basic complex arithmetic functions + + * Original version by Jorma Olavi T�htinen + * + * Modified for GSL by Brian Gough, 3/2000 + */ + +/* The following references describe the methods used in these + * functions, + * + * T. E. Hull and Thomas F. Fairgrieve and Ping Tak Peter Tang, + * "Implementing Complex Elementary Functions Using Exception + * Handling", ACM Transactions on Mathematical Software, Volume 20 + * (1994), pp 215-244, Corrigenda, p553 + * + * Hull et al, "Implementing the complex arcsin and arccosine + * functions using exception handling", ACM Transactions on + * Mathematical Software, Volume 23 (1997) pp 299-335 + * + * Abramowitz and Stegun, Handbook of Mathematical Functions, "Inverse + * Circular Functions in Terms of Real and Imaginary Parts", Formulas + * 4.4.37, 4.4.38, 4.4.39 + */ + +#include +#include +#include +#include +#include + +/********************************************************************** + * Complex numbers + **********************************************************************/ + +gsl_complex +gsl_complex_polar (double r, double theta) +{ /* return z = r exp(i theta) */ + gsl_complex z; + GSL_SET_COMPLEX (&z, r * cos (theta), r * sin (theta)); + return z; +} + +/********************************************************************** + * Properties of complex numbers + **********************************************************************/ + +double +gsl_complex_arg (gsl_complex z) +{ /* return arg(z), -pi < arg(z) <= +pi */ + double x = GSL_REAL (z); + double y = GSL_IMAG (z); + + if (x == 0.0 && y == 0.0) + { + return 0; + } + + return atan2 (y, x); +} + +double +gsl_complex_abs (gsl_complex z) +{ /* return |z| */ + return hypot (GSL_REAL (z), GSL_IMAG (z)); +} + +double +gsl_complex_abs2 (gsl_complex z) +{ /* return |z|^2 */ + double x = GSL_REAL (z); + double y = GSL_IMAG (z); + + return (x * x + y * y); +} + +double +gsl_complex_logabs (gsl_complex z) +{ /* return log|z| */ + double xabs = fabs (GSL_REAL (z)); + double yabs = fabs (GSL_IMAG (z)); + double max, u; + + if (xabs >= yabs) + { + max = xabs; + u = yabs / xabs; + } + else + { + max = yabs; + u = xabs / yabs; + } + + /* Handle underflow when u is close to 0 */ + + return log (max) + 0.5 * log1p (u * u); +} + + +/*********************************************************************** + * Complex arithmetic operators + ***********************************************************************/ + +gsl_complex +gsl_complex_add (gsl_complex a, gsl_complex b) +{ /* z=a+b */ + double ar = GSL_REAL (a), ai = GSL_IMAG (a); + double br = GSL_REAL (b), bi = GSL_IMAG (b); + + gsl_complex z; + GSL_SET_COMPLEX (&z, ar + br, ai + bi); + return z; +} + +gsl_complex +gsl_complex_add_real (gsl_complex a, double x) +{ /* z=a+x */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a) + x, GSL_IMAG (a)); + return z; +} + +gsl_complex +gsl_complex_add_imag (gsl_complex a, double y) +{ /* z=a+iy */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a), GSL_IMAG (a) + y); + return z; +} + + +gsl_complex +gsl_complex_sub (gsl_complex a, gsl_complex b) +{ /* z=a-b */ + double ar = GSL_REAL (a), ai = GSL_IMAG (a); + double br = GSL_REAL (b), bi = GSL_IMAG (b); + + gsl_complex z; + GSL_SET_COMPLEX (&z, ar - br, ai - bi); + return z; +} + +gsl_complex +gsl_complex_sub_real (gsl_complex a, double x) +{ /* z=a-x */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a) - x, GSL_IMAG (a)); + return z; +} + +gsl_complex +gsl_complex_sub_imag (gsl_complex a, double y) +{ /* z=a-iy */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a), GSL_IMAG (a) - y); + return z; +} + +gsl_complex +gsl_complex_mul (gsl_complex a, gsl_complex b) +{ /* z=a*b */ + double ar = GSL_REAL (a), ai = GSL_IMAG (a); + double br = GSL_REAL (b), bi = GSL_IMAG (b); + + gsl_complex z; + GSL_SET_COMPLEX (&z, ar * br - ai * bi, ar * bi + ai * br); + return z; +} + +gsl_complex +gsl_complex_mul_real (gsl_complex a, double x) +{ /* z=a*x */ + gsl_complex z; + GSL_SET_COMPLEX (&z, x * GSL_REAL (a), x * GSL_IMAG (a)); + return z; +} + +gsl_complex +gsl_complex_mul_imag (gsl_complex a, double y) +{ /* z=a*iy */ + gsl_complex z; + GSL_SET_COMPLEX (&z, -y * GSL_IMAG (a), y * GSL_REAL (a)); + return z; +} + +gsl_complex +gsl_complex_div (gsl_complex a, gsl_complex b) +{ /* z=a/b */ + double ar = GSL_REAL (a), ai = GSL_IMAG (a); + double br = GSL_REAL (b), bi = GSL_IMAG (b); + + double s = 1.0 / gsl_complex_abs (b); + + double sbr = s * br; + double sbi = s * bi; + + double zr = (ar * sbr + ai * sbi) * s; + double zi = (ai * sbr - ar * sbi) * s; + + gsl_complex z; + GSL_SET_COMPLEX (&z, zr, zi); + return z; +} + +gsl_complex +gsl_complex_div_real (gsl_complex a, double x) +{ /* z=a/x */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a) / x, GSL_IMAG (a) / x); + return z; +} + +gsl_complex +gsl_complex_div_imag (gsl_complex a, double y) +{ /* z=a/(iy) */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_IMAG (a) / y, - GSL_REAL (a) / y); + return z; +} + +gsl_complex +gsl_complex_conjugate (gsl_complex a) +{ /* z=conj(a) */ + gsl_complex z; + GSL_SET_COMPLEX (&z, GSL_REAL (a), -GSL_IMAG (a)); + return z; +} + +gsl_complex +gsl_complex_negative (gsl_complex a) +{ /* z=-a */ + gsl_complex z; + GSL_SET_COMPLEX (&z, -GSL_REAL (a), -GSL_IMAG (a)); + return z; +} + +gsl_complex +gsl_complex_inverse (gsl_complex a) +{ /* z=1/a */ + double s = 1.0 / gsl_complex_abs (a); + + gsl_complex z; + GSL_SET_COMPLEX (&z, (GSL_REAL (a) * s) * s, -(GSL_IMAG (a) * s) * s); + return z; +} + +/********************************************************************** + * Elementary complex functions + **********************************************************************/ + +gsl_complex +gsl_complex_sqrt (gsl_complex a) +{ /* z=sqrt(a) */ + gsl_complex z; + + if (GSL_REAL (a) == 0.0 && GSL_IMAG (a) == 0.0) + { + GSL_SET_COMPLEX (&z, 0, 0); + } + else + { + double x = fabs (GSL_REAL (a)); + double y = fabs (GSL_IMAG (a)); + double w; + + if (x >= y) + { + double t = y / x; + w = sqrt (x) * sqrt (0.5 * (1.0 + sqrt (1.0 + t * t))); + } + else + { + double t = x / y; + w = sqrt (y) * sqrt (0.5 * (t + sqrt (1.0 + t * t))); + } + + if (GSL_REAL (a) >= 0.0) + { + double ai = GSL_IMAG (a); + GSL_SET_COMPLEX (&z, w, ai / (2.0 * w)); + } + else + { + double ai = GSL_IMAG (a); + double vi = (ai >= 0) ? w : -w; + GSL_SET_COMPLEX (&z, ai / (2.0 * vi), vi); + } + } + + return z; +} + +gsl_complex +gsl_complex_sqrt_real (double x) +{ /* z=sqrt(x) */ + gsl_complex z; + + if (x >= 0) + { + GSL_SET_COMPLEX (&z, sqrt (x), 0.0); + } + else + { + GSL_SET_COMPLEX (&z, 0.0, sqrt (-x)); + } + + return z; +} + +gsl_complex +gsl_complex_exp (gsl_complex a) +{ /* z=exp(a) */ + double rho = exp (GSL_REAL (a)); + double theta = GSL_IMAG (a); + + gsl_complex z; + GSL_SET_COMPLEX (&z, rho * cos (theta), rho * sin (theta)); + return z; +} + +gsl_complex +gsl_complex_pow (gsl_complex a, gsl_complex b) +{ /* z=a^b */ + gsl_complex z; + + if (GSL_REAL (a) == 0 && GSL_IMAG (a) == 0.0) + { + if (GSL_REAL (b) == 0 && GSL_IMAG (b) == 0.0) + { + GSL_SET_COMPLEX (&z, 1.0, 0.0); + } + else + { + GSL_SET_COMPLEX (&z, 0.0, 0.0); + } + } + else if (GSL_REAL (b) == 1.0 && GSL_IMAG (b) == 0.0) + { + return a; + } + else if (GSL_REAL (b) == -1.0 && GSL_IMAG (b) == 0.0) + { + return gsl_complex_inverse (a); + } + else + { + double logr = gsl_complex_logabs (a); + double theta = gsl_complex_arg (a); + + double br = GSL_REAL (b), bi = GSL_IMAG (b); + + double rho = exp (logr * br - bi * theta); + double beta = theta * br + bi * logr; + + GSL_SET_COMPLEX (&z, rho * cos (beta), rho * sin (beta)); + } + + return z; +} + +gsl_complex +gsl_complex_pow_real (gsl_complex a, double b) +{ /* z=a^b */ + gsl_complex z; + + if (GSL_REAL (a) == 0 && GSL_IMAG (a) == 0) + { + if (b == 0) + { + GSL_SET_COMPLEX (&z, 1, 0); + } + else + { + GSL_SET_COMPLEX (&z, 0, 0); + } + } + else + { + double logr = gsl_complex_logabs (a); + double theta = gsl_complex_arg (a); + double rho = exp (logr * b); + double beta = theta * b; + GSL_SET_COMPLEX (&z, rho * cos (beta), rho * sin (beta)); + } + + return z; +} + +gsl_complex +gsl_complex_log (gsl_complex a) +{ /* z=log(a) */ + double logr = gsl_complex_logabs (a); + double theta = gsl_complex_arg (a); + + gsl_complex z; + GSL_SET_COMPLEX (&z, logr, theta); + return z; +} + +gsl_complex +gsl_complex_log10 (gsl_complex a) +{ /* z = log10(a) */ + return gsl_complex_mul_real (gsl_complex_log (a), 1 / log (10.)); +} + +gsl_complex +gsl_complex_log_b (gsl_complex a, gsl_complex b) +{ + return gsl_complex_div (gsl_complex_log (a), gsl_complex_log (b)); +} + +/*********************************************************************** + * Complex trigonometric functions + ***********************************************************************/ + +gsl_complex +gsl_complex_sin (gsl_complex a) +{ /* z = sin(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + + if (I == 0.0) + { + /* avoid returing negative zero (-0.0) for the imaginary part */ + + GSL_SET_COMPLEX (&z, sin (R), 0.0); + } + else + { + GSL_SET_COMPLEX (&z, sin (R) * cosh (I), cos (R) * sinh (I)); + } + + return z; +} + +gsl_complex +gsl_complex_cos (gsl_complex a) +{ /* z = cos(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + + if (I == 0.0) + { + /* avoid returing negative zero (-0.0) for the imaginary part */ + + GSL_SET_COMPLEX (&z, cos (R), 0.0); + } + else + { + GSL_SET_COMPLEX (&z, cos (R) * cosh (I), sin (R) * sinh (-I)); + } + + return z; +} + +gsl_complex +gsl_complex_tan (gsl_complex a) +{ /* z = tan(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + + if (fabs (I) < 1) + { + double D = pow (cos (R), 2.0) + pow (sinh (I), 2.0); + + GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) / D, 0.5 * sinh (2 * I) / D); + } + else + { + double u = exp (-I); + double C = 2 * u / (1 - pow (u, 2.0)); + double D = 1 + pow (cos (R), 2.0) * pow (C, 2.0); + + double S = pow (C, 2.0); + double T = 1.0 / tanh (I); + + GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) * S / D, T / D); + } + + return z; +} + +gsl_complex +gsl_complex_sec (gsl_complex a) +{ /* z = sec(a) */ + gsl_complex z = gsl_complex_cos (a); + return gsl_complex_inverse (z); +} + +gsl_complex +gsl_complex_csc (gsl_complex a) +{ /* z = csc(a) */ + gsl_complex z = gsl_complex_sin (a); + return gsl_complex_inverse(z); +} + + +gsl_complex +gsl_complex_cot (gsl_complex a) +{ /* z = cot(a) */ + gsl_complex z = gsl_complex_tan (a); + return gsl_complex_inverse (z); +} + +/********************************************************************** + * Inverse Complex Trigonometric Functions + **********************************************************************/ + +gsl_complex +gsl_complex_arcsin (gsl_complex a) +{ /* z = arcsin(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + gsl_complex z; + + if (I == 0) + { + z = gsl_complex_arcsin_real (R); + } + else + { + double x = fabs (R), y = fabs (I); + double r = hypot (x + 1, y), s = hypot (x - 1, y); + double A = 0.5 * (r + s); + double B = x / A; + double y2 = y * y; + + double real, imag; + + const double A_crossover = 1.5, B_crossover = 0.6417; + + if (B <= B_crossover) + { + real = asin (B); + } + else + { + if (x <= 1) + { + double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); + real = atan (x / sqrt (D)); + } + else + { + double Apx = A + x; + double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); + real = atan (x / (y * sqrt (D))); + } + } + + if (A <= A_crossover) + { + double Am1; + + if (x < 1) + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); + } + else + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); + } + + imag = log1p (Am1 + sqrt (Am1 * (A + 1))); + } + else + { + imag = log (A + sqrt (A * A - 1)); + } + + GSL_SET_COMPLEX (&z, (R >= 0) ? real : -real, (I >= 0) ? imag : -imag); + } + + return z; +} + +gsl_complex +gsl_complex_arcsin_real (double a) +{ /* z = arcsin(a) */ + gsl_complex z; + + if (fabs (a) <= 1.0) + { + GSL_SET_COMPLEX (&z, asin (a), 0.0); + } + else + { + if (a < 0.0) + { + GSL_SET_COMPLEX (&z, -M_PI_2, acosh (-a)); + } + else + { + GSL_SET_COMPLEX (&z, M_PI_2, -acosh (a)); + } + } + + return z; +} + +gsl_complex +gsl_complex_arccos (gsl_complex a) +{ /* z = arccos(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + gsl_complex z; + + if (I == 0) + { + z = gsl_complex_arccos_real (R); + } + else + { + double x = fabs (R), y = fabs (I); + double r = hypot (x + 1, y), s = hypot (x - 1, y); + double A = 0.5 * (r + s); + double B = x / A; + double y2 = y * y; + + double real, imag; + + const double A_crossover = 1.5, B_crossover = 0.6417; + + if (B <= B_crossover) + { + real = acos (B); + } + else + { + if (x <= 1) + { + double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); + real = atan (sqrt (D) / x); + } + else + { + double Apx = A + x; + double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); + real = atan ((y * sqrt (D)) / x); + } + } + + if (A <= A_crossover) + { + double Am1; + + if (x < 1) + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); + } + else + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); + } + + imag = log1p (Am1 + sqrt (Am1 * (A + 1))); + } + else + { + imag = log (A + sqrt (A * A - 1)); + } + + GSL_SET_COMPLEX (&z, (R >= 0) ? real : M_PI - real, (I >= 0) ? -imag : imag); + } + + return z; +} + +gsl_complex +gsl_complex_arccos_real (double a) +{ /* z = arccos(a) */ + gsl_complex z; + + if (fabs (a) <= 1.0) + { + GSL_SET_COMPLEX (&z, acos (a), 0); + } + else + { + if (a < 0.0) + { + GSL_SET_COMPLEX (&z, M_PI, -acosh (-a)); + } + else + { + GSL_SET_COMPLEX (&z, 0, acosh (a)); + } + } + + return z; +} + +gsl_complex +gsl_complex_arctan (gsl_complex a) +{ /* z = arctan(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + gsl_complex z; + + if (I == 0) + { + GSL_SET_COMPLEX (&z, atan (R), 0); + } + else + { + /* FIXME: This is a naive implementation which does not fully + take into account cancellation errors, overflow, underflow + etc. It would benefit from the Hull et al treatment. */ + + double r = hypot (R, I); + + double imag; + + double u = 2 * I / (1 + r * r); + + /* FIXME: the following cross-over should be optimized but 0.1 + seems to work ok */ + + if (fabs (u) < 0.1) + { + imag = 0.25 * (log1p (u) - log1p (-u)); + } + else + { + double A = hypot (R, I + 1); + double B = hypot (R, I - 1); + imag = 0.5 * log (A / B); + } + + if (R == 0) + { + if (I > 1) + { + GSL_SET_COMPLEX (&z, M_PI_2, imag); + } + else if (I < -1) + { + GSL_SET_COMPLEX (&z, -M_PI_2, imag); + } + else + { + GSL_SET_COMPLEX (&z, 0, imag); + }; + } + else + { + GSL_SET_COMPLEX (&z, 0.5 * atan2 (2 * R, ((1 + r) * (1 - r))), imag); + } + } + + return z; +} + +gsl_complex +gsl_complex_arcsec (gsl_complex a) +{ /* z = arcsec(a) */ + gsl_complex z = gsl_complex_inverse (a); + return gsl_complex_arccos (z); +} + +gsl_complex +gsl_complex_arcsec_real (double a) +{ /* z = arcsec(a) */ + gsl_complex z; + + if (a <= -1.0 || a >= 1.0) + { + GSL_SET_COMPLEX (&z, acos (1 / a), 0.0); + } + else + { + if (a >= 0.0) + { + GSL_SET_COMPLEX (&z, 0, acosh (1 / a)); + } + else + { + GSL_SET_COMPLEX (&z, M_PI, -acosh (-1 / a)); + } + } + + return z; +} + +gsl_complex +gsl_complex_arccsc (gsl_complex a) +{ /* z = arccsc(a) */ + gsl_complex z = gsl_complex_inverse (a); + return gsl_complex_arcsin (z); +} + +gsl_complex +gsl_complex_arccsc_real (double a) +{ /* z = arccsc(a) */ + gsl_complex z; + + if (a <= -1.0 || a >= 1.0) + { + GSL_SET_COMPLEX (&z, asin (1 / a), 0.0); + } + else + { + if (a >= 0.0) + { + GSL_SET_COMPLEX (&z, M_PI_2, -acosh (1 / a)); + } + else + { + GSL_SET_COMPLEX (&z, -M_PI_2, acosh (-1 / a)); + } + } + + return z; +} + +gsl_complex +gsl_complex_arccot (gsl_complex a) +{ /* z = arccot(a) */ + gsl_complex z; + + if (GSL_REAL (a) == 0.0 && GSL_IMAG (a) == 0.0) + { + GSL_SET_COMPLEX (&z, M_PI_2, 0); + } + else + { + z = gsl_complex_inverse (a); + z = gsl_complex_arctan (z); + } + + return z; +} + +/********************************************************************** + * Complex Hyperbolic Functions + **********************************************************************/ + +gsl_complex +gsl_complex_sinh (gsl_complex a) +{ /* z = sinh(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + GSL_SET_COMPLEX (&z, sinh (R) * cos (I), cosh (R) * sin (I)); + return z; +} + +gsl_complex +gsl_complex_cosh (gsl_complex a) +{ /* z = cosh(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + GSL_SET_COMPLEX (&z, cosh (R) * cos (I), sinh (R) * sin (I)); + return z; +} + +gsl_complex +gsl_complex_tanh (gsl_complex a) +{ /* z = tanh(a) */ + double R = GSL_REAL (a), I = GSL_IMAG (a); + + gsl_complex z; + + if (fabs(R) < 1.0) + { + double D = pow (cos (I), 2.0) + pow (sinh (R), 2.0); + + GSL_SET_COMPLEX (&z, sinh (R) * cosh (R) / D, 0.5 * sin (2 * I) / D); + } + else + { + double D = pow (cos (I), 2.0) + pow (sinh (R), 2.0); + double F = 1 + pow (cos (I) / sinh (R), 2.0); + + GSL_SET_COMPLEX (&z, 1.0 / (tanh (R) * F), 0.5 * sin (2 * I) / D); + } + + return z; +} + +gsl_complex +gsl_complex_sech (gsl_complex a) +{ /* z = sech(a) */ + gsl_complex z = gsl_complex_cosh (a); + return gsl_complex_inverse (z); +} + +gsl_complex +gsl_complex_csch (gsl_complex a) +{ /* z = csch(a) */ + gsl_complex z = gsl_complex_sinh (a); + return gsl_complex_inverse (z); +} + +gsl_complex +gsl_complex_coth (gsl_complex a) +{ /* z = coth(a) */ + gsl_complex z = gsl_complex_tanh (a); + return gsl_complex_inverse (z); +} + +/********************************************************************** + * Inverse Complex Hyperbolic Functions + **********************************************************************/ + +gsl_complex +gsl_complex_arcsinh (gsl_complex a) +{ /* z = arcsinh(a) */ + gsl_complex z = gsl_complex_mul_imag(a, 1.0); + z = gsl_complex_arcsin (z); + z = gsl_complex_mul_imag (z, -1.0); + return z; +} + +gsl_complex +gsl_complex_arccosh (gsl_complex a) +{ /* z = arccosh(a) */ + gsl_complex z = gsl_complex_arccos (a); + z = gsl_complex_mul_imag (z, GSL_IMAG(z) > 0 ? -1.0 : 1.0); + return z; +} + +gsl_complex +gsl_complex_arccosh_real (double a) +{ /* z = arccosh(a) */ + gsl_complex z; + + if (a >= 1) + { + GSL_SET_COMPLEX (&z, acosh (a), 0); + } + else + { + if (a >= -1.0) + { + GSL_SET_COMPLEX (&z, 0, acos (a)); + } + else + { + GSL_SET_COMPLEX (&z, acosh (-a), M_PI); + } + } + + return z; +} + +gsl_complex +gsl_complex_arctanh (gsl_complex a) +{ /* z = arctanh(a) */ + if (GSL_IMAG (a) == 0.0) + { + return gsl_complex_arctanh_real (GSL_REAL (a)); + } + else + { + gsl_complex z = gsl_complex_mul_imag(a, 1.0); + z = gsl_complex_arctan (z); + z = gsl_complex_mul_imag (z, -1.0); + return z; + } +} + +gsl_complex +gsl_complex_arctanh_real (double a) +{ /* z = arctanh(a) */ + gsl_complex z; + + if (a > -1.0 && a < 1.0) + { + GSL_SET_COMPLEX (&z, atanh (a), 0); + } + else + { + GSL_SET_COMPLEX (&z, atanh (1 / a), (a < 0) ? M_PI_2 : -M_PI_2); + } + + return z; +} + +gsl_complex +gsl_complex_arcsech (gsl_complex a) +{ /* z = arcsech(a); */ + gsl_complex t = gsl_complex_inverse (a); + return gsl_complex_arccosh (t); +} + +gsl_complex +gsl_complex_arccsch (gsl_complex a) +{ /* z = arccsch(a) */ + gsl_complex t = gsl_complex_inverse (a); + return gsl_complex_arcsinh (t); +} + +gsl_complex +gsl_complex_arccoth (gsl_complex a) +{ /* z = arccoth(a) */ + gsl_complex t = gsl_complex_inverse (a); + return gsl_complex_arctanh (t); +} diff --git a/software/gsl-1.15/complex/results.h b/software/gsl-1.15/complex/results.h new file mode 100644 index 000000000..a8eafee82 --- /dev/null +++ b/software/gsl-1.15/complex/results.h @@ -0,0 +1,4573 @@ + {FN (sqrt), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (sqrt), ARG(0.0e+00,1.19209289550781250e-07), RES(2.44140625e-4, 2.44140625e-4)}, + {FN (sqrt), ARG(0.0e+00,-1.19209289550781250e-07), RES(2.44140625e-4, -2.44140625e-4)}, + {FN (sqrt), ARG(0.0e+00,5.0e-01), RES(5e-1, 5e-1)}, + {FN (sqrt), ARG(0.0e+00,-5.0e-01), RES(5e-1, -5e-1)}, + {FN (sqrt), ARG(0.0e+00,1.0e+00), RES(7.0710678118654752440e-1, 7.0710678118654752440e-1)}, + {FN (sqrt), ARG(0.0e+00,-1.0e+00), RES(7.0710678118654752440e-1, -7.0710678118654752440e-1)}, + {FN (sqrt), ARG(0.0e+00,2.0e+00), RES(1, 1)}, + {FN (sqrt), ARG(0.0e+00,-2.0e+00), RES(1, -1)}, + {FN (sqrt), ARG(0.0e+00,8.3886080e+06), RES(2048, 2048)}, + {FN (sqrt), ARG(0.0e+00,-8.3886080e+06), RES(2048, -2048)}, + {FN (sqrt), ARG(1.19209289550781250e-07,0.0e+00), RES(3.4526698300124390840e-4, 0.0)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,0.0e+00), RES(0, 3.4526698300124390840e-4)}, + {FN (sqrt), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(3.7933934912842707699e-4, 1.5712750315077700799e-4)}, + {FN (sqrt), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(3.7933934912842707699e-4, -1.5712750315077700799e-4)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(1.5712750315077700799e-4, 3.7933934912842707699e-4)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.5712750315077700799e-4, -3.7933934912842707699e-4)}, + {FN (sqrt), ARG(1.19209289550781250e-07,5.0e-01), RES(5.0000005960464832810e-1, 4.9999994039535877732e-1)}, + {FN (sqrt), ARG(1.19209289550781250e-07,-5.0e-01), RES(5.0000005960464832810e-1, -4.9999994039535877732e-1)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,5.0e-01), RES(4.9999994039535877732e-1, 5.0000005960464832810e-1)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,-5.0e-01), RES(4.9999994039535877732e-1, -5.0000005960464832810e-1)}, + {FN (sqrt), ARG(1.19209289550781250e-07,1.0e+00), RES(7.0710682333339729137e-1, 7.0710673903970026958e-1)}, + {FN (sqrt), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.0710682333339729137e-1, -7.0710673903970026958e-1)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,1.0e+00), RES(7.0710673903970026958e-1, 7.0710682333339729137e-1)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,-1.0e+00), RES(7.0710673903970026958e-1, -7.0710682333339729137e-1)}, + {FN (sqrt), ARG(1.19209289550781250e-07,2.0e+00), RES(1.0000000298023228318e0, 9.9999997019767805639e-1)}, + {FN (sqrt), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.0000000298023228318e0, -9.9999997019767805639e-1)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,2.0e+00), RES(9.9999997019767805639e-1, 1.0000000298023228318e0)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,-2.0e+00), RES(9.9999997019767805639e-1, -1.0000000298023228318e0)}, + {FN (sqrt), ARG(1.19209289550781250e-07,8.3886080e+06), RES(2.0480000000000145519e3, 2.0479999999999854481e3)}, + {FN (sqrt), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(2.0480000000000145519e3, -2.0479999999999854481e3)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(2.0479999999999854481e3, 2.0480000000000145519e3)}, + {FN (sqrt), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(2.0479999999999854481e3, -2.0480000000000145519e3)}, + {FN (sqrt), ARG(5.0e-01,0.0e+00), RES(7.0710678118654752440e-1, 0.0)}, + {FN (sqrt), ARG(-5.0e-01,0.0e+00), RES(0, 7.0710678118654752440e-1)}, + {FN (sqrt), ARG(5.0e-01,1.19209289550781250e-07), RES(7.0710678118655254870e-1, 8.4293697021787464631e-8)}, + {FN (sqrt), ARG(5.0e-01,-1.19209289550781250e-07), RES(7.0710678118655254870e-1, -8.4293697021787464631e-8)}, + {FN (sqrt), ARG(-5.0e-01,1.19209289550781250e-07), RES(8.4293697021787464631e-8, 7.0710678118655254870e-1)}, + {FN (sqrt), ARG(-5.0e-01,-1.19209289550781250e-07), RES(8.4293697021787464631e-8, -7.0710678118655254870e-1)}, + {FN (sqrt), ARG(5.0e-01,5.0e-01), RES(7.7688698701501865367e-1, 3.2179712645279131237e-1)}, + {FN (sqrt), ARG(5.0e-01,-5.0e-01), RES(7.7688698701501865367e-1, -3.2179712645279131237e-1)}, + {FN (sqrt), ARG(-5.0e-01,5.0e-01), RES(3.2179712645279131237e-1, 7.7688698701501865367e-1)}, + {FN (sqrt), ARG(-5.0e-01,-5.0e-01), RES(3.2179712645279131237e-1, -7.7688698701501865367e-1)}, + {FN (sqrt), ARG(5.0e-01,1.0e+00), RES(8.9945371997393363613e-1, 5.5589297025142117199e-1)}, + {FN (sqrt), ARG(5.0e-01,-1.0e+00), RES(8.9945371997393363613e-1, -5.5589297025142117199e-1)}, + {FN (sqrt), ARG(-5.0e-01,1.0e+00), RES(5.5589297025142117199e-1, 8.9945371997393363613e-1)}, + {FN (sqrt), ARG(-5.0e-01,-1.0e+00), RES(5.5589297025142117199e-1, -8.9945371997393363613e-1)}, + {FN (sqrt), ARG(5.0e-01,2.0e+00), RES(1.1317139242778694103e0, 8.8361553087551326576e-1)}, + {FN (sqrt), ARG(5.0e-01,-2.0e+00), RES(1.1317139242778694103e0, -8.8361553087551326576e-1)}, + {FN (sqrt), ARG(-5.0e-01,2.0e+00), RES(8.8361553087551326576e-1, 1.1317139242778694103e0)}, + {FN (sqrt), ARG(-5.0e-01,-2.0e+00), RES(8.8361553087551326576e-1, -1.1317139242778694103e0)}, + {FN (sqrt), ARG(5.0e-01,8.3886080e+06), RES(2.0480000610351571595e3, 2.0479999389648446595e3)}, + {FN (sqrt), ARG(5.0e-01,-8.3886080e+06), RES(2.0480000610351571595e3, -2.0479999389648446595e3)}, + {FN (sqrt), ARG(-5.0e-01,8.3886080e+06), RES(2.0479999389648446595e3, 2.0480000610351571595e3)}, + {FN (sqrt), ARG(-5.0e-01,-8.3886080e+06), RES(2.0479999389648446595e3, -2.0480000610351571595e3)}, + {FN (sqrt), ARG(1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (sqrt), ARG(-1.0e+00,0.0e+00), RES(0, 1)}, + {FN (sqrt), ARG(1.0e+00,1.19209289550781250e-07), RES(1.0000000000000017764e0, 5.9604644775390519121e-8)}, + {FN (sqrt), ARG(1.0e+00,-1.19209289550781250e-07), RES(1.0000000000000017764e0, -5.9604644775390519121e-8)}, + {FN (sqrt), ARG(-1.0e+00,1.19209289550781250e-07), RES(5.9604644775390519121e-8, 1.0000000000000017764e0)}, + {FN (sqrt), ARG(-1.0e+00,-1.19209289550781250e-07), RES(5.9604644775390519121e-8, -1.0000000000000017764e0)}, + {FN (sqrt), ARG(1.0e+00,5.0e-01), RES(1.0290855136357461252e0, 2.4293413587832283909e-1)}, + {FN (sqrt), ARG(1.0e+00,-5.0e-01), RES(1.0290855136357461252e0, -2.4293413587832283909e-1)}, + {FN (sqrt), ARG(-1.0e+00,5.0e-01), RES(2.4293413587832283909e-1, 1.0290855136357461252e0)}, + {FN (sqrt), ARG(-1.0e+00,-5.0e-01), RES(2.4293413587832283909e-1, -1.0290855136357461252e0)}, + {FN (sqrt), ARG(1.0e+00,1.0e+00), RES(1.0986841134678099660e0, 4.5508986056222734130e-1)}, + {FN (sqrt), ARG(1.0e+00,-1.0e+00), RES(1.0986841134678099660e0, -4.5508986056222734130e-1)}, + {FN (sqrt), ARG(-1.0e+00,1.0e+00), RES(4.5508986056222734130e-1, 1.0986841134678099660e0)}, + {FN (sqrt), ARG(-1.0e+00,-1.0e+00), RES(4.5508986056222734130e-1, -1.0986841134678099660e0)}, + {FN (sqrt), ARG(1.0e+00,2.0e+00), RES(1.2720196495140689643e0, 7.8615137775742328607e-1)}, + {FN (sqrt), ARG(1.0e+00,-2.0e+00), RES(1.2720196495140689643e0, -7.8615137775742328607e-1)}, + {FN (sqrt), ARG(-1.0e+00,2.0e+00), RES(7.8615137775742328607e-1, 1.2720196495140689643e0)}, + {FN (sqrt), ARG(-1.0e+00,-2.0e+00), RES(7.8615137775742328607e-1, -1.2720196495140689643e0)}, + {FN (sqrt), ARG(1.0e+00,8.3886080e+06), RES(2.0480001220703161380e3, 2.0479998779296911380e3)}, + {FN (sqrt), ARG(1.0e+00,-8.3886080e+06), RES(2.0480001220703161380e3, -2.0479998779296911380e3)}, + {FN (sqrt), ARG(-1.0e+00,8.3886080e+06), RES(2.0479998779296911380e3, 2.0480001220703161380e3)}, + {FN (sqrt), ARG(-1.0e+00,-8.3886080e+06), RES(2.0479998779296911380e3, -2.0480001220703161380e3)}, + {FN (sqrt), ARG(2.0e+00,0.0e+00), RES(1.4142135623730950488e0, 0.0)}, + {FN (sqrt), ARG(-2.0e+00,0.0e+00), RES(0, 1.4142135623730950488e0)}, + {FN (sqrt), ARG(2.0e+00,1.19209289550781250e-07), RES(1.4142135623730956768e0, 4.2146848510894013070e-8)}, + {FN (sqrt), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.4142135623730956768e0, -4.2146848510894013070e-8)}, + {FN (sqrt), ARG(-2.0e+00,1.19209289550781250e-07), RES(4.2146848510894013070e-8, 1.4142135623730956768e0)}, + {FN (sqrt), ARG(-2.0e+00,-1.19209289550781250e-07), RES(4.2146848510894013070e-8, -1.4142135623730956768e0)}, + {FN (sqrt), ARG(2.0e+00,5.0e-01), RES(1.4250531240639470060e0, 1.7543205637629383228e-1)}, + {FN (sqrt), ARG(2.0e+00,-5.0e-01), RES(1.4250531240639470060e0, -1.7543205637629383228e-1)}, + {FN (sqrt), ARG(-2.0e+00,5.0e-01), RES(1.7543205637629383228e-1, 1.4250531240639470060e0)}, + {FN (sqrt), ARG(-2.0e+00,-5.0e-01), RES(1.7543205637629383228e-1, -1.4250531240639470060e0)}, + {FN (sqrt), ARG(2.0e+00,1.0e+00), RES(1.4553466902253548081e0, 3.4356074972251246414e-1)}, + {FN (sqrt), ARG(2.0e+00,-1.0e+00), RES(1.4553466902253548081e0, -3.4356074972251246414e-1)}, + {FN (sqrt), ARG(-2.0e+00,1.0e+00), RES(3.4356074972251246414e-1, 1.4553466902253548081e0)}, + {FN (sqrt), ARG(-2.0e+00,-1.0e+00), RES(3.4356074972251246414e-1, -1.4553466902253548081e0)}, + {FN (sqrt), ARG(2.0e+00,2.0e+00), RES(1.5537739740300373073e0, 6.4359425290558262474e-1)}, + {FN (sqrt), ARG(2.0e+00,-2.0e+00), RES(1.5537739740300373073e0, -6.4359425290558262474e-1)}, + {FN (sqrt), ARG(-2.0e+00,2.0e+00), RES(6.4359425290558262474e-1, 1.5537739740300373073e0)}, + {FN (sqrt), ARG(-2.0e+00,-2.0e+00), RES(6.4359425290558262474e-1, -1.5537739740300373073e0)}, + {FN (sqrt), ARG(2.0e+00,8.3886080e+06), RES(2.0480002441406395519e3, 2.0479997558593895519e3)}, + {FN (sqrt), ARG(2.0e+00,-8.3886080e+06), RES(2.0480002441406395519e3, -2.0479997558593895519e3)}, + {FN (sqrt), ARG(-2.0e+00,8.3886080e+06), RES(2.0479997558593895519e3, 2.0480002441406395519e3)}, + {FN (sqrt), ARG(-2.0e+00,-8.3886080e+06), RES(2.0479997558593895519e3, -2.0480002441406395519e3)}, + {FN (sqrt), ARG(8.3886080e+06,0.0e+00), RES(2.8963093757400986599e3, 0.0)}, + {FN (sqrt), ARG(-8.3886080e+06,0.0e+00), RES(0, 2.8963093757400986599e3)}, + {FN (sqrt), ARG(8.3886080e+06,1.19209289550781250e-07), RES(2.8963093757400986599e3, 2.0579515874459976458e-11)}, + {FN (sqrt), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(2.8963093757400986599e3, -2.0579515874459976458e-11)}, + {FN (sqrt), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(2.0579515874459976458e-11, 2.8963093757400986599e3)}, + {FN (sqrt), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(2.0579515874459976458e-11, -2.8963093757400986599e3)}, + {FN (sqrt), ARG(8.3886080e+06,5.0e-01), RES(2.8963093757400999462e3, 8.6316745750310938767e-5)}, + {FN (sqrt), ARG(8.3886080e+06,-5.0e-01), RES(2.8963093757400999462e3, -8.6316745750310938767e-5)}, + {FN (sqrt), ARG(-8.3886080e+06,5.0e-01), RES(8.6316745750310938767e-5, 2.8963093757400999462e3)}, + {FN (sqrt), ARG(-8.3886080e+06,-5.0e-01), RES(8.6316745750310938767e-5, -2.8963093757400999462e3)}, + {FN (sqrt), ARG(8.3886080e+06,1.0e+00), RES(2.8963093757401038048e3, 1.7263349150062164754e-4)}, + {FN (sqrt), ARG(8.3886080e+06,-1.0e+00), RES(2.8963093757401038048e3, -1.7263349150062164754e-4)}, + {FN (sqrt), ARG(-8.3886080e+06,1.0e+00), RES(1.7263349150062164754e-4, 2.8963093757401038048e3)}, + {FN (sqrt), ARG(-8.3886080e+06,-1.0e+00), RES(1.7263349150062164754e-4, -2.8963093757401038048e3)}, + {FN (sqrt), ARG(8.3886080e+06,2.0e+00), RES(2.8963093757401192395e3, 3.4526698300124145513e-4)}, + {FN (sqrt), ARG(8.3886080e+06,-2.0e+00), RES(2.8963093757401192395e3, -3.4526698300124145513e-4)}, + {FN (sqrt), ARG(-8.3886080e+06,2.0e+00), RES(3.4526698300124145513e-4, 2.8963093757401192395e3)}, + {FN (sqrt), ARG(-8.3886080e+06,-2.0e+00), RES(3.4526698300124145513e-4, -2.8963093757401192395e3)}, + {FN (sqrt), ARG(8.3886080e+06,8.3886080e+06), RES(3.1821290988135164054e3, 1.3180810299506332155e3)}, + {FN (sqrt), ARG(8.3886080e+06,-8.3886080e+06), RES(3.1821290988135164054e3, -1.3180810299506332155e3)}, + {FN (sqrt), ARG(-8.3886080e+06,8.3886080e+06), RES(1.3180810299506332155e3, 3.1821290988135164054e3)}, + {FN (sqrt), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.3180810299506332155e3, -3.1821290988135164054e3)}, + {FN (log), ARG(1.19209289550781250e-07,0.0e+00), RES(-1.5942385152878742117e1, 0.0)}, + {FN (log), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.5942385152878742117e1, 3.1415926535897932385e0)}, + {FN (log), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 7.8539816339744830962e-1)}, + {FN (log), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 2.3561944901923449288e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, -2.3561944901923449288e0)}, + {FN (log), ARG(1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 1.5707960883763175177e0)}, + {FN (log), ARG(1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, -1.5707960883763175177e0)}, + {FN (log), ARG(-1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 1.5707965652134757208e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, -1.5707965652134757208e0)}, + {FN (log), ARG(1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 1.5707962075856070685e0)}, + {FN (log), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, -1.5707962075856070685e0)}, + {FN (log), ARG(-1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 1.570796446004186170e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, -1.570796446004186170e0)}, + {FN (log), ARG(1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 1.5707962671902518438e0)}, + {FN (log), ARG(1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, -1.5707962671902518438e0)}, + {FN (log), ARG(-1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 1.5707963863995413946e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, -1.5707963863995413946e0)}, + {FN (log), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 1.5707963267948824084e0)}, + {FN (log), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, -1.5707963267948824084e0)}, + {FN (log), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 1.5707963267949108301e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, -1.5707963267949108301e0)}, + {FN (log), ARG(5.0e-01,0.0e+00), RES(-6.9314718055994530942e-1, 0.0)}, + {FN (log), ARG(-5.0e-01,0.0e+00), RES(-6.9314718055994530942e-1, 3.1415926535897932385e0)}, + {FN (log), ARG(5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 2.3841857910155798249e-7)}, + {FN (log), ARG(5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, -2.3841857910155798249e-7)}, + {FN (log), ARG(-5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 3.1415924151712141369e0)}, + {FN (log), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, -3.1415924151712141369e0)}, + {FN (log), ARG(5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 7.8539816339744830962e-1)}, + {FN (log), ARG(5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 2.3561944901923449288e0)}, + {FN (log), ARG(-5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, -2.3561944901923449288e0)}, + {FN (log), ARG(5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 1.1071487177940905030e0)}, + {FN (log), ARG(5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, -1.1071487177940905030e0)}, + {FN (log), ARG(-5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 2.0344439357957027354e0)}, + {FN (log), ARG(-5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, -2.0344439357957027354e0)}, + {FN (log), ARG(5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 1.3258176636680324651e0)}, + {FN (log), ARG(5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, -1.3258176636680324651e0)}, + {FN (log), ARG(-5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 1.8157749899217607734e0)}, + {FN (log), ARG(-5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, -1.8157749899217607734e0)}, + {FN (log), ARG(5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 1.5707962671902518438e0)}, + {FN (log), ARG(5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, -1.5707962671902518438e0)}, + {FN (log), ARG(-5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 1.5707963863995413946e0)}, + {FN (log), ARG(-5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, -1.5707963863995413946e0)}, + {FN (log), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (log), ARG(-1.0e+00,0.0e+00), RES(0, 3.1415926535897932385e0)}, + {FN (log), ARG(1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 1.1920928955078068531e-7)}, + {FN (log), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, -1.1920928955078068531e-7)}, + {FN (log), ARG(-1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 3.1415925343805036877e0)}, + {FN (log), ARG(-1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, -3.1415925343805036877e0)}, + {FN (log), ARG(1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 4.6364760900080611621e-1)}, + {FN (log), ARG(1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, -4.6364760900080611621e-1)}, + {FN (log), ARG(-1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 2.6779450445889871222e0)}, + {FN (log), ARG(-1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, -2.6779450445889871222e0)}, + {FN (log), ARG(1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 7.8539816339744830962e-1)}, + {FN (log), ARG(1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 2.3561944901923449288e0)}, + {FN (log), ARG(-1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, -2.3561944901923449288e0)}, + {FN (log), ARG(1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 1.1071487177940905030e0)}, + {FN (log), ARG(1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, -1.1071487177940905030e0)}, + {FN (log), ARG(-1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 2.0344439357957027354e0)}, + {FN (log), ARG(-1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, -2.0344439357957027354e0)}, + {FN (log), ARG(1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 1.5707962075856070685e0)}, + {FN (log), ARG(1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, -1.5707962075856070685e0)}, + {FN (log), ARG(-1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 1.570796446004186170e0)}, + {FN (log), ARG(-1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, -1.570796446004186170e0)}, + {FN (log), ARG(2.0e+00,0.0e+00), RES(6.9314718055994530942e-1, 0.0)}, + {FN (log), ARG(-2.0e+00,0.0e+00), RES(6.9314718055994530942e-1, 3.1415926535897932385e0)}, + {FN (log), ARG(2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 5.9604644775390554414e-8)}, + {FN (log), ARG(2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, -5.9604644775390554414e-8)}, + {FN (log), ARG(-2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 3.1415925939851484631e0)}, + {FN (log), ARG(-2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, -3.1415925939851484631e0)}, + {FN (log), ARG(2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 2.4497866312686415417e-1)}, + {FN (log), ARG(2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, -2.4497866312686415417e-1)}, + {FN (log), ARG(-2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 2.8966139904629290843e0)}, + {FN (log), ARG(-2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, -2.8966139904629290843e0)}, + {FN (log), ARG(2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 4.6364760900080611621e-1)}, + {FN (log), ARG(2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, -4.6364760900080611621e-1)}, + {FN (log), ARG(-2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 2.6779450445889871222e0)}, + {FN (log), ARG(-2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, -2.6779450445889871222e0)}, + {FN (log), ARG(2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 7.8539816339744830962e-1)}, + {FN (log), ARG(2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, -7.8539816339744830962e-1)}, + {FN (log), ARG(-2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 2.3561944901923449288e0)}, + {FN (log), ARG(-2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, -2.3561944901923449288e0)}, + {FN (log), ARG(2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 1.5707960883763175177e0)}, + {FN (log), ARG(2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, -1.5707960883763175177e0)}, + {FN (log), ARG(-2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 1.5707965652134757208e0)}, + {FN (log), ARG(-2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, -1.5707965652134757208e0)}, + {FN (log), ARG(8.3886080e+06,0.0e+00), RES(1.5942385152878742117e1, 0.0)}, + {FN (log), ARG(-8.3886080e+06,0.0e+00), RES(1.5942385152878742117e1, 3.1415926535897932385e0)}, + {FN (log), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 1.4210854715202003717e-14)}, + {FN (log), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, -1.4210854715202003717e-14)}, + {FN (log), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 3.1415926535897790276e0)}, + {FN (log), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, -3.1415926535897790276e0)}, + {FN (log), ARG(8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 5.9604644775390554414e-8)}, + {FN (log), ARG(8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, -5.9604644775390554414e-8)}, + {FN (log), ARG(-8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 3.1415925939851484631e0)}, + {FN (log), ARG(-8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, -3.1415925939851484631e0)}, + {FN (log), ARG(8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 1.1920928955078068531e-7)}, + {FN (log), ARG(8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, -1.1920928955078068531e-7)}, + {FN (log), ARG(-8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 3.1415925343805036877e0)}, + {FN (log), ARG(-8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, -3.1415925343805036877e0)}, + {FN (log), ARG(8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 2.3841857910155798249e-7)}, + {FN (log), ARG(8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, -2.3841857910155798249e-7)}, + {FN (log), ARG(-8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 3.1415924151712141369e0)}, + {FN (log), ARG(-8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, -3.1415924151712141369e0)}, + {FN (log), ARG(8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 7.8539816339744830962e-1)}, + {FN (log), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 2.3561944901923449288e0)}, + {FN (log), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, -2.3561944901923449288e0)}, + {FN (log), ARG(0.0e+00,1.19209289550781250e-07), RES(-1.5942385152878742117e1, 1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,-1.19209289550781250e-07), RES(-1.5942385152878742117e1, -1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,5.0e-01), RES(-6.9314718055994530942e-1, 1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,-5.0e-01), RES(-6.9314718055994530942e-1, -1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,1.0e+00), RES(0, 1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,-1.0e+00), RES(0, -1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,2.0e+00), RES(6.9314718055994530942e-1, 1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,-2.0e+00), RES(6.9314718055994530942e-1, -1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,8.3886080e+06), RES(1.5942385152878742117e1, 1.5707963267948966192e0)}, + {FN (log), ARG(0.0e+00,-8.3886080e+06), RES(1.5942385152878742117e1, -1.5707963267948966192e0)}, + {FN (log), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 7.8539816339744830962e-1)}, + {FN (log), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 2.3561944901923449288e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, -2.3561944901923449288e0)}, + {FN (log), ARG(1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 1.5707960883763175177e0)}, + {FN (log), ARG(1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, -1.5707960883763175177e0)}, + {FN (log), ARG(-1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 1.5707965652134757208e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, -1.5707965652134757208e0)}, + {FN (log), ARG(1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 1.5707962075856070685e0)}, + {FN (log), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, -1.5707962075856070685e0)}, + {FN (log), ARG(-1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 1.570796446004186170e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, -1.570796446004186170e0)}, + {FN (log), ARG(1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 1.5707962671902518438e0)}, + {FN (log), ARG(1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, -1.5707962671902518438e0)}, + {FN (log), ARG(-1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 1.5707963863995413946e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, -1.5707963863995413946e0)}, + {FN (log), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 1.5707963267948824084e0)}, + {FN (log), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, -1.5707963267948824084e0)}, + {FN (log), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 1.5707963267949108301e0)}, + {FN (log), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, -1.5707963267949108301e0)}, + {FN (log), ARG(5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 2.3841857910155798249e-7)}, + {FN (log), ARG(5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, -2.3841857910155798249e-7)}, + {FN (log), ARG(-5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 3.1415924151712141369e0)}, + {FN (log), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, -3.1415924151712141369e0)}, + {FN (log), ARG(5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 7.8539816339744830962e-1)}, + {FN (log), ARG(5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 2.3561944901923449288e0)}, + {FN (log), ARG(-5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, -2.3561944901923449288e0)}, + {FN (log), ARG(5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 1.1071487177940905030e0)}, + {FN (log), ARG(5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, -1.1071487177940905030e0)}, + {FN (log), ARG(-5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 2.0344439357957027354e0)}, + {FN (log), ARG(-5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, -2.0344439357957027354e0)}, + {FN (log), ARG(5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 1.3258176636680324651e0)}, + {FN (log), ARG(5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, -1.3258176636680324651e0)}, + {FN (log), ARG(-5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 1.8157749899217607734e0)}, + {FN (log), ARG(-5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, -1.8157749899217607734e0)}, + {FN (log), ARG(5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 1.5707962671902518438e0)}, + {FN (log), ARG(5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, -1.5707962671902518438e0)}, + {FN (log), ARG(-5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 1.5707963863995413946e0)}, + {FN (log), ARG(-5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, -1.5707963863995413946e0)}, + {FN (log), ARG(1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 1.1920928955078068531e-7)}, + {FN (log), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, -1.1920928955078068531e-7)}, + {FN (log), ARG(-1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 3.1415925343805036877e0)}, + {FN (log), ARG(-1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, -3.1415925343805036877e0)}, + {FN (log), ARG(1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 4.6364760900080611621e-1)}, + {FN (log), ARG(1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, -4.6364760900080611621e-1)}, + {FN (log), ARG(-1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 2.6779450445889871222e0)}, + {FN (log), ARG(-1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, -2.6779450445889871222e0)}, + {FN (log), ARG(1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 7.8539816339744830962e-1)}, + {FN (log), ARG(1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 2.3561944901923449288e0)}, + {FN (log), ARG(-1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, -2.3561944901923449288e0)}, + {FN (log), ARG(1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 1.1071487177940905030e0)}, + {FN (log), ARG(1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, -1.1071487177940905030e0)}, + {FN (log), ARG(-1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 2.0344439357957027354e0)}, + {FN (log), ARG(-1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, -2.0344439357957027354e0)}, + {FN (log), ARG(1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 1.5707962075856070685e0)}, + {FN (log), ARG(1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, -1.5707962075856070685e0)}, + {FN (log), ARG(-1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 1.570796446004186170e0)}, + {FN (log), ARG(-1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, -1.570796446004186170e0)}, + {FN (log), ARG(2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 5.9604644775390554414e-8)}, + {FN (log), ARG(2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, -5.9604644775390554414e-8)}, + {FN (log), ARG(-2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 3.1415925939851484631e0)}, + {FN (log), ARG(-2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, -3.1415925939851484631e0)}, + {FN (log), ARG(2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 2.4497866312686415417e-1)}, + {FN (log), ARG(2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, -2.4497866312686415417e-1)}, + {FN (log), ARG(-2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 2.8966139904629290843e0)}, + {FN (log), ARG(-2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, -2.8966139904629290843e0)}, + {FN (log), ARG(2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 4.6364760900080611621e-1)}, + {FN (log), ARG(2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, -4.6364760900080611621e-1)}, + {FN (log), ARG(-2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 2.6779450445889871222e0)}, + {FN (log), ARG(-2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, -2.6779450445889871222e0)}, + {FN (log), ARG(2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 7.8539816339744830962e-1)}, + {FN (log), ARG(2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, -7.8539816339744830962e-1)}, + {FN (log), ARG(-2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 2.3561944901923449288e0)}, + {FN (log), ARG(-2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, -2.3561944901923449288e0)}, + {FN (log), ARG(2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 1.5707960883763175177e0)}, + {FN (log), ARG(2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, -1.5707960883763175177e0)}, + {FN (log), ARG(-2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 1.5707965652134757208e0)}, + {FN (log), ARG(-2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, -1.5707965652134757208e0)}, + {FN (log), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 1.4210854715202003717e-14)}, + {FN (log), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, -1.4210854715202003717e-14)}, + {FN (log), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 3.1415926535897790276e0)}, + {FN (log), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, -3.1415926535897790276e0)}, + {FN (log), ARG(8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 5.9604644775390554414e-8)}, + {FN (log), ARG(8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, -5.9604644775390554414e-8)}, + {FN (log), ARG(-8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 3.1415925939851484631e0)}, + {FN (log), ARG(-8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, -3.1415925939851484631e0)}, + {FN (log), ARG(8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 1.1920928955078068531e-7)}, + {FN (log), ARG(8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, -1.1920928955078068531e-7)}, + {FN (log), ARG(-8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 3.1415925343805036877e0)}, + {FN (log), ARG(-8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, -3.1415925343805036877e0)}, + {FN (log), ARG(8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 2.3841857910155798249e-7)}, + {FN (log), ARG(8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, -2.3841857910155798249e-7)}, + {FN (log), ARG(-8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 3.1415924151712141369e0)}, + {FN (log), ARG(-8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, -3.1415924151712141369e0)}, + {FN (log), ARG(8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 7.8539816339744830962e-1)}, + {FN (log), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, -7.8539816339744830962e-1)}, + {FN (log), ARG(-8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 2.3561944901923449288e0)}, + {FN (log), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, -2.3561944901923449288e0)}, + {FN (log10), ARG(1.19209289550781250e-07,0.0e+00), RES(-6.9236899002715674899e0, 0.0)}, + {FN (log10), ARG(-1.19209289550781250e-07,0.0e+00), RES(-6.9236899002715674899e0, 1.3643763538418413475e0)}, + {FN (log10), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-6.7731749024395768923e0, 3.4109408846046033687e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-6.7731749024395768923e0, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-6.7731749024395768923e0, 1.0232822653813810106e0)}, + {FN (log10), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-6.7731749024395768923e0, -1.0232822653813810106e0)}, + {FN (log10), ARG(1.19209289550781250e-07,5.0e-01), RES(-3.0102999566396885182e-1, 6.8218807337704738672e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-5.0e-01), RES(-3.0102999566396885182e-1, -6.8218807337704738672e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,5.0e-01), RES(-3.0102999566396885182e-1, 6.8218828046479396076e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-3.0102999566396885182e-1, -6.8218828046479396076e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,1.0e+00), RES(3.0858478929704968280e-15, 6.8218812514898403023e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-1.0e+00), RES(3.0858478929704968280e-15, -6.8218812514898403023e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,1.0e+00), RES(3.0858478929704968280e-15, 6.8218822869285731725e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-1.0e+00), RES(3.0858478929704968280e-15, -6.8218822869285731725e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,2.0e+00), RES(3.0102999566398196668e-1, 6.8218815103495235199e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-2.0e+00), RES(3.0102999566398196668e-1, -6.8218815103495235199e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,2.0e+00), RES(3.0102999566398196668e-1, 6.8218820280688899550e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-2.0e+00), RES(3.0102999566398196668e-1, -6.8218820280688899550e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,8.3886080e+06), RES(6.9236899002715674899e0, 6.8218817692091450205e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(6.9236899002715674899e0, -6.8218817692091450205e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(6.9236899002715674899e0, 6.8218817692092684544e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(6.9236899002715674899e0, -6.8218817692092684544e-1)}, + {FN (log10), ARG(5.0e-01,0.0e+00), RES(-3.0102999566398119521e-1, 0.0)}, + {FN (log10), ARG(-5.0e-01,0.0e+00), RES(-3.0102999566398119521e-1, 1.3643763538418413475e0)}, + {FN (log10), ARG(5.0e-01,1.19209289550781250e-07), RES(-3.0102999566396885182e-1, 1.0354387328702058762e-7)}, + {FN (log10), ARG(5.0e-01,-1.19209289550781250e-07), RES(-3.0102999566396885182e-1, -1.0354387328702058762e-7)}, + {FN (log10), ARG(-5.0e-01,1.19209289550781250e-07), RES(-3.0102999566396885182e-1, 1.3643762502979680605e0)}, + {FN (log10), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-3.0102999566396885182e-1, -1.3643762502979680605e0)}, + {FN (log10), ARG(5.0e-01,5.0e-01), RES(-1.5051499783199059761e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(5.0e-01,-5.0e-01), RES(-1.5051499783199059761e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-5.0e-01,5.0e-01), RES(-1.5051499783199059761e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-5.0e-01,-5.0e-01), RES(-1.5051499783199059761e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(5.0e-01,1.0e+00), RES(4.8455006504028207179e-2, 4.8082857878423410270e-1)}, + {FN (log10), ARG(5.0e-01,-1.0e+00), RES(4.8455006504028207179e-2, -4.8082857878423410270e-1)}, + {FN (log10), ARG(-5.0e-01,1.0e+00), RES(4.8455006504028207179e-2, 8.8354777505760724478e-1)}, + {FN (log10), ARG(-5.0e-01,-1.0e+00), RES(4.8455006504028207179e-2, -8.8354777505760724478e-1)}, + {FN (log10), ARG(5.0e-01,2.0e+00), RES(3.1419446502515576906e-1, 5.7579529534088794354e-1)}, + {FN (log10), ARG(5.0e-01,-2.0e+00), RES(3.1419446502515576906e-1, -5.7579529534088794354e-1)}, + {FN (log10), ARG(-5.0e-01,2.0e+00), RES(3.1419446502515576906e-1, 7.8858105850095340394e-1)}, + {FN (log10), ARG(-5.0e-01,-2.0e+00), RES(3.1419446502515576906e-1, -7.8858105850095340394e-1)}, + {FN (log10), ARG(5.0e-01,8.3886080e+06), RES(6.9236899002715682614e0, 6.8218815103495235199e-1)}, + {FN (log10), ARG(5.0e-01,-8.3886080e+06), RES(6.9236899002715682614e0, -6.8218815103495235199e-1)}, + {FN (log10), ARG(-5.0e-01,8.3886080e+06), RES(6.9236899002715682614e0, 6.8218820280688899550e-1)}, + {FN (log10), ARG(-5.0e-01,-8.3886080e+06), RES(6.9236899002715682614e0, -6.8218820280688899550e-1)}, + {FN (log10), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (log10), ARG(-1.0e+00,0.0e+00), RES(0, 1.3643763538418413475e0)}, + {FN (log10), ARG(1.0e+00,1.19209289550781250e-07), RES(3.0858478929704968280e-15, 5.1771936643511029532e-8)}, + {FN (log10), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.0858478929704968280e-15, -5.1771936643511029532e-8)}, + {FN (log10), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.0858478929704968280e-15, 1.3643763020699047040e0)}, + {FN (log10), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.0858478929704968280e-15, -1.3643763020699047040e0)}, + {FN (log10), ARG(1.0e+00,5.0e-01), RES(4.8455006504028207179e-2, 2.0135959813668657104e-1)}, + {FN (log10), ARG(1.0e+00,-5.0e-01), RES(4.8455006504028207179e-2, -2.0135959813668657104e-1)}, + {FN (log10), ARG(-1.0e+00,5.0e-01), RES(4.8455006504028207179e-2, 1.1630167557051547764e0)}, + {FN (log10), ARG(-1.0e+00,-5.0e-01), RES(4.8455006504028207179e-2, -1.1630167557051547764e0)}, + {FN (log10), ARG(1.0e+00,1.0e+00), RES(1.5051499783199059761e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(1.0e+00,-1.0e+00), RES(1.5051499783199059761e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-1.0e+00,1.0e+00), RES(1.5051499783199059761e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-1.0e+00,-1.0e+00), RES(1.5051499783199059761e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(1.0e+00,2.0e+00), RES(3.4948500216800940239e-1, 4.8082857878423410270e-1)}, + {FN (log10), ARG(1.0e+00,-2.0e+00), RES(3.4948500216800940239e-1, -4.8082857878423410270e-1)}, + {FN (log10), ARG(-1.0e+00,2.0e+00), RES(3.4948500216800940239e-1, 8.8354777505760724478e-1)}, + {FN (log10), ARG(-1.0e+00,-2.0e+00), RES(3.4948500216800940239e-1, -8.8354777505760724478e-1)}, + {FN (log10), ARG(1.0e+00,8.3886080e+06), RES(6.9236899002715705758e0, 6.8218812514898403023e-1)}, + {FN (log10), ARG(1.0e+00,-8.3886080e+06), RES(6.9236899002715705758e0, -6.8218812514898403023e-1)}, + {FN (log10), ARG(-1.0e+00,8.3886080e+06), RES(6.9236899002715705758e0, 6.8218822869285731725e-1)}, + {FN (log10), ARG(-1.0e+00,-8.3886080e+06), RES(6.9236899002715705758e0, -6.8218822869285731725e-1)}, + {FN (log10), ARG(2.0e+00,0.0e+00), RES(3.0102999566398119521e-1, 0.0)}, + {FN (log10), ARG(-2.0e+00,0.0e+00), RES(3.0102999566398119521e-1, 1.3643763538418413475e0)}, + {FN (log10), ARG(2.0e+00,1.19209289550781250e-07), RES(3.0102999566398196668e-1, 2.5885968321755606731e-8)}, + {FN (log10), ARG(2.0e+00,-1.19209289550781250e-07), RES(3.0102999566398196668e-1, -2.5885968321755606731e-8)}, + {FN (log10), ARG(-2.0e+00,1.19209289550781250e-07), RES(3.0102999566398196668e-1, 1.3643763279558730257e0)}, + {FN (log10), ARG(-2.0e+00,-1.19209289550781250e-07), RES(3.0102999566398196668e-1, -1.3643763279558730257e0)}, + {FN (log10), ARG(2.0e+00,5.0e-01), RES(3.1419446502515576906e-1, 1.0639288158003273020e-1)}, + {FN (log10), ARG(2.0e+00,-5.0e-01), RES(3.1419446502515576906e-1, -1.0639288158003273020e-1)}, + {FN (log10), ARG(-2.0e+00,5.0e-01), RES(3.1419446502515576906e-1, 1.2579834722618086173e0)}, + {FN (log10), ARG(-2.0e+00,-5.0e-01), RES(3.1419446502515576906e-1, -1.2579834722618086173e0)}, + {FN (log10), ARG(2.0e+00,1.0e+00), RES(3.4948500216800940239e-1, 2.0135959813668657104e-1)}, + {FN (log10), ARG(2.0e+00,-1.0e+00), RES(3.4948500216800940239e-1, -2.0135959813668657104e-1)}, + {FN (log10), ARG(-2.0e+00,1.0e+00), RES(3.4948500216800940239e-1, 1.1630167557051547764e0)}, + {FN (log10), ARG(-2.0e+00,-1.0e+00), RES(3.4948500216800940239e-1, -1.1630167557051547764e0)}, + {FN (log10), ARG(2.0e+00,2.0e+00), RES(4.5154499349597179282e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(2.0e+00,-2.0e+00), RES(4.5154499349597179282e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-2.0e+00,2.0e+00), RES(4.5154499349597179282e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-2.0e+00,-2.0e+00), RES(4.5154499349597179282e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(2.0e+00,8.3886080e+06), RES(6.9236899002715798333e0, 6.8218807337704738672e-1)}, + {FN (log10), ARG(2.0e+00,-8.3886080e+06), RES(6.9236899002715798333e0, -6.8218807337704738672e-1)}, + {FN (log10), ARG(-2.0e+00,8.3886080e+06), RES(6.9236899002715798333e0, 6.8218828046479396076e-1)}, + {FN (log10), ARG(-2.0e+00,-8.3886080e+06), RES(6.9236899002715798333e0, -6.8218828046479396076e-1)}, + {FN (log10), ARG(8.3886080e+06,0.0e+00), RES(6.9236899002715674899e0, 0.0)}, + {FN (log10), ARG(-8.3886080e+06,0.0e+00), RES(6.9236899002715674899e0, 1.3643763538418413475e0)}, + {FN (log10), ARG(8.3886080e+06,1.19209289550781250e-07), RES(6.9236899002715674899e0, 6.1716957859410375086e-15)}, + {FN (log10), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(6.9236899002715674899e0, -6.1716957859410375086e-15)}, + {FN (log10), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(6.9236899002715674899e0, 1.3643763538418351758e0)}, + {FN (log10), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(6.9236899002715674899e0, -1.3643763538418351758e0)}, + {FN (log10), ARG(8.3886080e+06,5.0e-01), RES(6.9236899002715682614e0, 2.5885968321755606731e-8)}, + {FN (log10), ARG(8.3886080e+06,-5.0e-01), RES(6.9236899002715682614e0, -2.5885968321755606731e-8)}, + {FN (log10), ARG(-8.3886080e+06,5.0e-01), RES(6.9236899002715682614e0, 1.3643763279558730257e0)}, + {FN (log10), ARG(-8.3886080e+06,-5.0e-01), RES(6.9236899002715682614e0, -1.3643763279558730257e0)}, + {FN (log10), ARG(8.3886080e+06,1.0e+00), RES(6.9236899002715705758e0, 5.1771936643511029532e-8)}, + {FN (log10), ARG(8.3886080e+06,-1.0e+00), RES(6.9236899002715705758e0, -5.1771936643511029532e-8)}, + {FN (log10), ARG(-8.3886080e+06,1.0e+00), RES(6.9236899002715705758e0, 1.3643763020699047040e0)}, + {FN (log10), ARG(-8.3886080e+06,-1.0e+00), RES(6.9236899002715705758e0, -1.3643763020699047040e0)}, + {FN (log10), ARG(8.3886080e+06,2.0e+00), RES(6.9236899002715798333e0, 1.0354387328702058762e-7)}, + {FN (log10), ARG(8.3886080e+06,-2.0e+00), RES(6.9236899002715798333e0, -1.0354387328702058762e-7)}, + {FN (log10), ARG(-8.3886080e+06,2.0e+00), RES(6.9236899002715798333e0, 1.3643762502979680605e0)}, + {FN (log10), ARG(-8.3886080e+06,-2.0e+00), RES(6.9236899002715798333e0, -1.3643762502979680605e0)}, + {FN (log10), ARG(8.3886080e+06,8.3886080e+06), RES(7.0742048981035580875e0, 3.4109408846046033687e-1)}, + {FN (log10), ARG(8.3886080e+06,-8.3886080e+06), RES(7.0742048981035580875e0, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-8.3886080e+06,8.3886080e+06), RES(7.0742048981035580875e0, 1.0232822653813810106e0)}, + {FN (log10), ARG(-8.3886080e+06,-8.3886080e+06), RES(7.0742048981035580875e0, -1.0232822653813810106e0)}, + {FN (log10), ARG(0.0e+00,1.19209289550781250e-07), RES(-6.9236899002715674899e0, 6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,-1.19209289550781250e-07), RES(-6.9236899002715674899e0, -6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,5.0e-01), RES(-3.0102999566398119521e-1, 6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,-5.0e-01), RES(-3.0102999566398119521e-1, -6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,1.0e+00), RES(0, 6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,-1.0e+00), RES(0, -6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,2.0e+00), RES(3.0102999566398119521e-1, 6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,-2.0e+00), RES(3.0102999566398119521e-1, -6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,8.3886080e+06), RES(6.9236899002715674899e0, 6.8218817692092067374e-1)}, + {FN (log10), ARG(0.0e+00,-8.3886080e+06), RES(6.9236899002715674899e0, -6.8218817692092067374e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-6.7731749024395768923e0, 3.4109408846046033687e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-6.7731749024395768923e0, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-6.7731749024395768923e0, 1.0232822653813810106e0)}, + {FN (log10), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-6.7731749024395768923e0, -1.0232822653813810106e0)}, + {FN (log10), ARG(1.19209289550781250e-07,5.0e-01), RES(-3.0102999566396885182e-1, 6.8218807337704738672e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-5.0e-01), RES(-3.0102999566396885182e-1, -6.8218807337704738672e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,5.0e-01), RES(-3.0102999566396885182e-1, 6.8218828046479396076e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-3.0102999566396885182e-1, -6.8218828046479396076e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,1.0e+00), RES(3.0858478929704968280e-15, 6.8218812514898403023e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-1.0e+00), RES(3.0858478929704968280e-15, -6.8218812514898403023e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,1.0e+00), RES(3.0858478929704968280e-15, 6.8218822869285731725e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-1.0e+00), RES(3.0858478929704968280e-15, -6.8218822869285731725e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,2.0e+00), RES(3.0102999566398196668e-1, 6.8218815103495235199e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-2.0e+00), RES(3.0102999566398196668e-1, -6.8218815103495235199e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,2.0e+00), RES(3.0102999566398196668e-1, 6.8218820280688899550e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-2.0e+00), RES(3.0102999566398196668e-1, -6.8218820280688899550e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,8.3886080e+06), RES(6.9236899002715674899e0, 6.8218817692091450205e-1)}, + {FN (log10), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(6.9236899002715674899e0, -6.8218817692091450205e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(6.9236899002715674899e0, 6.8218817692092684544e-1)}, + {FN (log10), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(6.9236899002715674899e0, -6.8218817692092684544e-1)}, + {FN (log10), ARG(5.0e-01,1.19209289550781250e-07), RES(-3.0102999566396885182e-1, 1.0354387328702058762e-7)}, + {FN (log10), ARG(5.0e-01,-1.19209289550781250e-07), RES(-3.0102999566396885182e-1, -1.0354387328702058762e-7)}, + {FN (log10), ARG(-5.0e-01,1.19209289550781250e-07), RES(-3.0102999566396885182e-1, 1.3643762502979680605e0)}, + {FN (log10), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-3.0102999566396885182e-1, -1.3643762502979680605e0)}, + {FN (log10), ARG(5.0e-01,5.0e-01), RES(-1.5051499783199059761e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(5.0e-01,-5.0e-01), RES(-1.5051499783199059761e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-5.0e-01,5.0e-01), RES(-1.5051499783199059761e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-5.0e-01,-5.0e-01), RES(-1.5051499783199059761e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(5.0e-01,1.0e+00), RES(4.8455006504028207179e-2, 4.8082857878423410270e-1)}, + {FN (log10), ARG(5.0e-01,-1.0e+00), RES(4.8455006504028207179e-2, -4.8082857878423410270e-1)}, + {FN (log10), ARG(-5.0e-01,1.0e+00), RES(4.8455006504028207179e-2, 8.8354777505760724478e-1)}, + {FN (log10), ARG(-5.0e-01,-1.0e+00), RES(4.8455006504028207179e-2, -8.8354777505760724478e-1)}, + {FN (log10), ARG(5.0e-01,2.0e+00), RES(3.1419446502515576906e-1, 5.7579529534088794354e-1)}, + {FN (log10), ARG(5.0e-01,-2.0e+00), RES(3.1419446502515576906e-1, -5.7579529534088794354e-1)}, + {FN (log10), ARG(-5.0e-01,2.0e+00), RES(3.1419446502515576906e-1, 7.8858105850095340394e-1)}, + {FN (log10), ARG(-5.0e-01,-2.0e+00), RES(3.1419446502515576906e-1, -7.8858105850095340394e-1)}, + {FN (log10), ARG(5.0e-01,8.3886080e+06), RES(6.9236899002715682614e0, 6.8218815103495235199e-1)}, + {FN (log10), ARG(5.0e-01,-8.3886080e+06), RES(6.9236899002715682614e0, -6.8218815103495235199e-1)}, + {FN (log10), ARG(-5.0e-01,8.3886080e+06), RES(6.9236899002715682614e0, 6.8218820280688899550e-1)}, + {FN (log10), ARG(-5.0e-01,-8.3886080e+06), RES(6.9236899002715682614e0, -6.8218820280688899550e-1)}, + {FN (log10), ARG(1.0e+00,1.19209289550781250e-07), RES(3.0858478929704968280e-15, 5.1771936643511029532e-8)}, + {FN (log10), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.0858478929704968280e-15, -5.1771936643511029532e-8)}, + {FN (log10), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.0858478929704968280e-15, 1.3643763020699047040e0)}, + {FN (log10), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.0858478929704968280e-15, -1.3643763020699047040e0)}, + {FN (log10), ARG(1.0e+00,5.0e-01), RES(4.8455006504028207179e-2, 2.0135959813668657104e-1)}, + {FN (log10), ARG(1.0e+00,-5.0e-01), RES(4.8455006504028207179e-2, -2.0135959813668657104e-1)}, + {FN (log10), ARG(-1.0e+00,5.0e-01), RES(4.8455006504028207179e-2, 1.1630167557051547764e0)}, + {FN (log10), ARG(-1.0e+00,-5.0e-01), RES(4.8455006504028207179e-2, -1.1630167557051547764e0)}, + {FN (log10), ARG(1.0e+00,1.0e+00), RES(1.5051499783199059761e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(1.0e+00,-1.0e+00), RES(1.5051499783199059761e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-1.0e+00,1.0e+00), RES(1.5051499783199059761e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-1.0e+00,-1.0e+00), RES(1.5051499783199059761e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(1.0e+00,2.0e+00), RES(3.4948500216800940239e-1, 4.8082857878423410270e-1)}, + {FN (log10), ARG(1.0e+00,-2.0e+00), RES(3.4948500216800940239e-1, -4.8082857878423410270e-1)}, + {FN (log10), ARG(-1.0e+00,2.0e+00), RES(3.4948500216800940239e-1, 8.8354777505760724478e-1)}, + {FN (log10), ARG(-1.0e+00,-2.0e+00), RES(3.4948500216800940239e-1, -8.8354777505760724478e-1)}, + {FN (log10), ARG(1.0e+00,8.3886080e+06), RES(6.9236899002715705758e0, 6.8218812514898403023e-1)}, + {FN (log10), ARG(1.0e+00,-8.3886080e+06), RES(6.9236899002715705758e0, -6.8218812514898403023e-1)}, + {FN (log10), ARG(-1.0e+00,8.3886080e+06), RES(6.9236899002715705758e0, 6.8218822869285731725e-1)}, + {FN (log10), ARG(-1.0e+00,-8.3886080e+06), RES(6.9236899002715705758e0, -6.8218822869285731725e-1)}, + {FN (log10), ARG(2.0e+00,1.19209289550781250e-07), RES(3.0102999566398196668e-1, 2.5885968321755606731e-8)}, + {FN (log10), ARG(2.0e+00,-1.19209289550781250e-07), RES(3.0102999566398196668e-1, -2.5885968321755606731e-8)}, + {FN (log10), ARG(-2.0e+00,1.19209289550781250e-07), RES(3.0102999566398196668e-1, 1.3643763279558730257e0)}, + {FN (log10), ARG(-2.0e+00,-1.19209289550781250e-07), RES(3.0102999566398196668e-1, -1.3643763279558730257e0)}, + {FN (log10), ARG(2.0e+00,5.0e-01), RES(3.1419446502515576906e-1, 1.0639288158003273020e-1)}, + {FN (log10), ARG(2.0e+00,-5.0e-01), RES(3.1419446502515576906e-1, -1.0639288158003273020e-1)}, + {FN (log10), ARG(-2.0e+00,5.0e-01), RES(3.1419446502515576906e-1, 1.2579834722618086173e0)}, + {FN (log10), ARG(-2.0e+00,-5.0e-01), RES(3.1419446502515576906e-1, -1.2579834722618086173e0)}, + {FN (log10), ARG(2.0e+00,1.0e+00), RES(3.4948500216800940239e-1, 2.0135959813668657104e-1)}, + {FN (log10), ARG(2.0e+00,-1.0e+00), RES(3.4948500216800940239e-1, -2.0135959813668657104e-1)}, + {FN (log10), ARG(-2.0e+00,1.0e+00), RES(3.4948500216800940239e-1, 1.1630167557051547764e0)}, + {FN (log10), ARG(-2.0e+00,-1.0e+00), RES(3.4948500216800940239e-1, -1.1630167557051547764e0)}, + {FN (log10), ARG(2.0e+00,2.0e+00), RES(4.5154499349597179282e-1, 3.4109408846046033687e-1)}, + {FN (log10), ARG(2.0e+00,-2.0e+00), RES(4.5154499349597179282e-1, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-2.0e+00,2.0e+00), RES(4.5154499349597179282e-1, 1.0232822653813810106e0)}, + {FN (log10), ARG(-2.0e+00,-2.0e+00), RES(4.5154499349597179282e-1, -1.0232822653813810106e0)}, + {FN (log10), ARG(2.0e+00,8.3886080e+06), RES(6.9236899002715798333e0, 6.8218807337704738672e-1)}, + {FN (log10), ARG(2.0e+00,-8.3886080e+06), RES(6.9236899002715798333e0, -6.8218807337704738672e-1)}, + {FN (log10), ARG(-2.0e+00,8.3886080e+06), RES(6.9236899002715798333e0, 6.8218828046479396076e-1)}, + {FN (log10), ARG(-2.0e+00,-8.3886080e+06), RES(6.9236899002715798333e0, -6.8218828046479396076e-1)}, + {FN (log10), ARG(8.3886080e+06,1.19209289550781250e-07), RES(6.9236899002715674899e0, 6.1716957859410375086e-15)}, + {FN (log10), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(6.9236899002715674899e0, -6.1716957859410375086e-15)}, + {FN (log10), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(6.9236899002715674899e0, 1.3643763538418351758e0)}, + {FN (log10), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(6.9236899002715674899e0, -1.3643763538418351758e0)}, + {FN (log10), ARG(8.3886080e+06,5.0e-01), RES(6.9236899002715682614e0, 2.5885968321755606731e-8)}, + {FN (log10), ARG(8.3886080e+06,-5.0e-01), RES(6.9236899002715682614e0, -2.5885968321755606731e-8)}, + {FN (log10), ARG(-8.3886080e+06,5.0e-01), RES(6.9236899002715682614e0, 1.3643763279558730257e0)}, + {FN (log10), ARG(-8.3886080e+06,-5.0e-01), RES(6.9236899002715682614e0, -1.3643763279558730257e0)}, + {FN (log10), ARG(8.3886080e+06,1.0e+00), RES(6.9236899002715705758e0, 5.1771936643511029532e-8)}, + {FN (log10), ARG(8.3886080e+06,-1.0e+00), RES(6.9236899002715705758e0, -5.1771936643511029532e-8)}, + {FN (log10), ARG(-8.3886080e+06,1.0e+00), RES(6.9236899002715705758e0, 1.3643763020699047040e0)}, + {FN (log10), ARG(-8.3886080e+06,-1.0e+00), RES(6.9236899002715705758e0, -1.3643763020699047040e0)}, + {FN (log10), ARG(8.3886080e+06,2.0e+00), RES(6.9236899002715798333e0, 1.0354387328702058762e-7)}, + {FN (log10), ARG(8.3886080e+06,-2.0e+00), RES(6.9236899002715798333e0, -1.0354387328702058762e-7)}, + {FN (log10), ARG(-8.3886080e+06,2.0e+00), RES(6.9236899002715798333e0, 1.3643762502979680605e0)}, + {FN (log10), ARG(-8.3886080e+06,-2.0e+00), RES(6.9236899002715798333e0, -1.3643762502979680605e0)}, + {FN (log10), ARG(8.3886080e+06,8.3886080e+06), RES(7.0742048981035580875e0, 3.4109408846046033687e-1)}, + {FN (log10), ARG(8.3886080e+06,-8.3886080e+06), RES(7.0742048981035580875e0, -3.4109408846046033687e-1)}, + {FN (log10), ARG(-8.3886080e+06,8.3886080e+06), RES(7.0742048981035580875e0, 1.0232822653813810106e0)}, + {FN (log10), ARG(-8.3886080e+06,-8.3886080e+06), RES(7.0742048981035580875e0, -1.0232822653813810106e0)}, + {FN (exp), ARG(0.0e+00,-3.45266983001243932001e-04), RES(9.9999994039535581673e-1, -3.4526697614140534807e-4)}, + {FN (exp), ARG(0.0e+00,3.45266983001243932001e-04), RES(9.9999994039535581673e-1, 3.4526697614140534807e-4)}, + {FN (exp), ARG(0.0e+00,1.57045105981189525579e+00), RES(3.4526697614152485627e-4, 9.9999994039535581669e-1)}, + {FN (exp), ARG(0.0e+00,-1.57045105981189525579e+00), RES(3.4526697614152485627e-4, -9.9999994039535581669e-1)}, + {FN (exp), ARG(0.0e+00,1.57114159377789786021e+00), RES(-3.4526697614140239160e-4, 9.9999994039535581673e-1)}, + {FN (exp), ARG(0.0e+00,-1.57114159377789786021e+00), RES(-3.4526697614140239160e-4, -9.9999994039535581673e-1)}, + {FN (exp), ARG(0.0e+00,3.14124738660679181379e+00), RES(-9.9999994039535581667e-1, 3.4526697614158608860e-4)}, + {FN (exp), ARG(0.0e+00,-3.14124738660679181379e+00), RES(-9.9999994039535581667e-1, -3.4526697614158608860e-4)}, + {FN (exp), ARG(0.0e+00,3.14193792057279441821e+00), RES(-9.9999994039535581675e-1, -3.4526697614134115926e-4)}, + {FN (exp), ARG(0.0e+00,-3.14193792057279441821e+00), RES(-9.9999994039535581675e-1, 3.4526697614134115926e-4)}, + {FN (exp), ARG(0.0e+00,4.71204371340168837179e+00), RES(-3.4526697614164732094e-4, -9.9999994039535581664e-1)}, + {FN (exp), ARG(0.0e+00,-4.71204371340168837179e+00), RES(-3.4526697614164732094e-4, 9.9999994039535581664e-1)}, + {FN (exp), ARG(0.0e+00,4.71273424736769097620e+00), RES(3.4526697614127992692e-4, -9.9999994039535581677e-1)}, + {FN (exp), ARG(0.0e+00,-4.71273424736769097620e+00), RES(3.4526697614127992692e-4, 9.9999994039535581677e-1)}, + {FN (exp), ARG(0.0e+00,6.28284004019658492979e+00), RES(9.9999994039535581662e-1, -3.4526697614170855328e-4)}, + {FN (exp), ARG(0.0e+00,-6.28284004019658492979e+00), RES(9.9999994039535581662e-1, 3.4526697614170855328e-4)}, + {FN (exp), ARG(0.0e+00,6.28353057416258753420e+00), RES(9.9999994039535581679e-1, 3.4526697614121869459e-4)}, + {FN (exp), ARG(0.0e+00,-6.28353057416258753420e+00), RES(9.9999994039535581679e-1, -3.4526697614121869459e-4)}, + {FN (exp), ARG(0.0e+00,9.42443269378637893396e+00), RES(-9.9999994039535581689e-1, 3.4526697614094283958e-4)}, + {FN (exp), ARG(0.0e+00,-9.42443269378637893396e+00), RES(-9.9999994039535581689e-1, -3.4526697614094283958e-4)}, + {FN (exp), ARG(0.0e+00,9.42512322775237976202e+00), RES(-9.9999994039535581714e-1, -3.4526697614020805155e-4)}, + {FN (exp), ARG(0.0e+00,-9.42512322775237976202e+00), RES(-9.9999994039535581714e-1, 3.4526697614020805155e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(1.0000000596046453675e0, -3.4526701730043873250e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(1.0000000596046453675e0, 3.4526701730043873250e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(9.9999982118608047680e-1, -3.4526693498237687017e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(9.9999982118608047680e-1, 3.4526693498237687017e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(3.4526701730055824072e-4, 1.0000000596046453675e0)}, + {FN (exp), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(3.4526701730055824072e-4, -1.0000000596046453675e0)}, + {FN (exp), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(3.4526693498249637836e-4, 9.9999982118608047676e-1)}, + {FN (exp), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(3.4526693498249637836e-4, -9.9999982118608047676e-1)}, + {FN (exp), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(-3.4526701730043577603e-4, 1.0000000596046453675e0)}, + {FN (exp), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-3.4526701730043577603e-4, -1.0000000596046453675e0)}, + {FN (exp), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(-3.4526693498237391370e-4, 9.9999982118608047680e-1)}, + {FN (exp), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-3.4526693498237391370e-4, -9.9999982118608047680e-1)}, + {FN (exp), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(-1.0000000596046453674e0, 3.4526701730061947306e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-1.0000000596046453674e0, -3.4526701730061947306e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(-9.9999982118608047674e-1, 3.4526693498255761069e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-9.9999982118608047674e-1, -3.4526693498255761069e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(-1.0000000596046453675e0, -3.4526701730037454368e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-1.0000000596046453675e0, 3.4526701730037454368e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(-9.9999982118608047682e-1, -3.4526693498231268137e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-9.9999982118608047682e-1, 3.4526693498231268137e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(-3.4526701730068070540e-4, -1.0000000596046453674e0)}, + {FN (exp), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-3.4526701730068070540e-4, 1.0000000596046453674e0)}, + {FN (exp), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(-3.4526693498261884302e-4, -9.9999982118608047672e-1)}, + {FN (exp), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-3.4526693498261884302e-4, 9.9999982118608047672e-1)}, + {FN (exp), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(3.4526701730031331134e-4, -1.0000000596046453676e0)}, + {FN (exp), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(3.4526701730031331134e-4, 1.0000000596046453676e0)}, + {FN (exp), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(3.4526693498225144904e-4, -9.9999982118608047684e-1)}, + {FN (exp), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(3.4526693498225144904e-4, 9.9999982118608047684e-1)}, + {FN (exp), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(1.0000000596046453674e0, -3.4526701730074193775e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(1.0000000596046453674e0, 3.4526701730074193775e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(9.9999982118608047670e-1, -3.4526693498268007535e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(9.9999982118608047670e-1, 3.4526693498268007535e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(1.0000000596046453676e0, 3.452670173002520790e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(1.0000000596046453676e0, -3.452670173002520790e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(9.9999982118608047687e-1, 3.4526693498219021671e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(9.9999982118608047687e-1, -3.4526693498219021671e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(-1.0000000596046453677e0, 3.4526701729997622396e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-1.0000000596046453677e0, -3.4526701729997622396e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(-9.9999982118608047696e-1, 3.4526693498191436174e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-9.9999982118608047696e-1, -3.4526693498191436174e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(-1.0000000596046453679e0, -3.4526701729924143584e-4)}, + {FN (exp), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-1.0000000596046453679e0, 3.4526701729924143584e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(-9.9999982118608047721e-1, -3.4526693498117957380e-4)}, + {FN (exp), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-9.9999982118608047721e-1, 3.4526693498117957380e-4)}, + {FN (exp), ARG(5.0e-01,-3.45266983001243932001e-04), RES(1.6487211724286834494e0, -5.6924900763464865323e-4)}, + {FN (exp), ARG(5.0e-01,3.45266983001243932001e-04), RES(1.6487211724286834494e0, 5.6924900763464865323e-4)}, + {FN (exp), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(6.0653062356058926519e-1, -2.0941500681603265022e-4)}, + {FN (exp), ARG(-5.0e-01,3.45266983001243932001e-04), RES(6.0653062356058926519e-1, 2.0941500681603265022e-4)}, + {FN (exp), ARG(5.0e-01,1.57045105981189525579e+00), RES(5.6924900763484568894e-4, 1.6487211724286834493e0)}, + {FN (exp), ARG(5.0e-01,-1.57045105981189525579e+00), RES(5.6924900763484568894e-4, -1.6487211724286834493e0)}, + {FN (exp), ARG(-5.0e-01,1.57045105981189525579e+00), RES(2.0941500681610513560e-4, 6.0653062356058926516e-1)}, + {FN (exp), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(2.0941500681610513560e-4, -6.0653062356058926516e-1)}, + {FN (exp), ARG(5.0e-01,1.57114159377789786021e+00), RES(-5.6924900763464377883e-4, 1.6487211724286834494e0)}, + {FN (exp), ARG(5.0e-01,-1.57114159377789786021e+00), RES(-5.6924900763464377883e-4, -1.6487211724286834494e0)}, + {FN (exp), ARG(-5.0e-01,1.57114159377789786021e+00), RES(-2.0941500681603085702e-4, 6.0653062356058926519e-1)}, + {FN (exp), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(-2.0941500681603085702e-4, -6.0653062356058926519e-1)}, + {FN (exp), ARG(5.0e-01,3.14124738660679181379e+00), RES(-1.6487211724286834493e0, 5.6924900763494664399e-4)}, + {FN (exp), ARG(5.0e-01,-3.14124738660679181379e+00), RES(-1.6487211724286834493e0, -5.6924900763494664399e-4)}, + {FN (exp), ARG(-5.0e-01,3.14124738660679181379e+00), RES(-6.0653062356058926515e-1, 2.0941500681614227489e-4)}, + {FN (exp), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(-6.0653062356058926515e-1, -2.0941500681614227489e-4)}, + {FN (exp), ARG(5.0e-01,3.14193792057279441821e+00), RES(-1.6487211724286834494e0, -5.6924900763454282377e-4)}, + {FN (exp), ARG(5.0e-01,-3.14193792057279441821e+00), RES(-1.6487211724286834494e0, 5.6924900763454282377e-4)}, + {FN (exp), ARG(-5.0e-01,3.14193792057279441821e+00), RES(-6.0653062356058926520e-1, -2.0941500681599371773e-4)}, + {FN (exp), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(-6.0653062356058926520e-1, 2.0941500681599371773e-4)}, + {FN (exp), ARG(5.0e-01,4.71204371340168837179e+00), RES(-5.6924900763504759905e-4, -1.6487211724286834492e0)}, + {FN (exp), ARG(5.0e-01,-4.71204371340168837179e+00), RES(-5.6924900763504759905e-4, 1.6487211724286834492e0)}, + {FN (exp), ARG(-5.0e-01,4.71204371340168837179e+00), RES(-2.0941500681617941418e-4, -6.0653062356058926514e-1)}, + {FN (exp), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(-2.0941500681617941418e-4, 6.0653062356058926514e-1)}, + {FN (exp), ARG(5.0e-01,4.71273424736769097620e+00), RES(5.6924900763444186872e-4, -1.6487211724286834494e0)}, + {FN (exp), ARG(5.0e-01,-4.71273424736769097620e+00), RES(5.6924900763444186872e-4, 1.6487211724286834494e0)}, + {FN (exp), ARG(-5.0e-01,4.71273424736769097620e+00), RES(2.0941500681595657844e-4, -6.0653062356058926521e-1)}, + {FN (exp), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(2.0941500681595657844e-4, 6.0653062356058926521e-1)}, + {FN (exp), ARG(5.0e-01,6.28284004019658492979e+00), RES(1.6487211724286834492e0, -5.6924900763514855410e-4)}, + {FN (exp), ARG(5.0e-01,-6.28284004019658492979e+00), RES(1.6487211724286834492e0, 5.6924900763514855410e-4)}, + {FN (exp), ARG(-5.0e-01,6.28284004019658492979e+00), RES(6.0653062356058926512e-1, -2.0941500681621655347e-4)}, + {FN (exp), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(6.0653062356058926512e-1, 2.0941500681621655347e-4)}, + {FN (exp), ARG(5.0e-01,6.28353057416258753420e+00), RES(1.6487211724286834495e0, 5.6924900763434091366e-4)}, + {FN (exp), ARG(5.0e-01,-6.28353057416258753420e+00), RES(1.6487211724286834495e0, -5.6924900763434091366e-4)}, + {FN (exp), ARG(-5.0e-01,6.28353057416258753420e+00), RES(6.0653062356058926523e-1, 2.0941500681591943916e-4)}, + {FN (exp), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(6.0653062356058926523e-1, -2.0941500681591943916e-4)}, + {FN (exp), ARG(5.0e-01,9.42443269378637893396e+00), RES(-1.6487211724286834496e0, 5.6924900763388610565e-4)}, + {FN (exp), ARG(5.0e-01,-9.42443269378637893396e+00), RES(-1.6487211724286834496e0, -5.6924900763388610565e-4)}, + {FN (exp), ARG(-5.0e-01,9.42443269378637893396e+00), RES(-6.0653062356058926528e-1, 2.0941500681575212464e-4)}, + {FN (exp), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(-6.0653062356058926528e-1, -2.0941500681575212464e-4)}, + {FN (exp), ARG(5.0e-01,9.42512322775237976202e+00), RES(-1.6487211724286834501e0, -5.6924900763267464498e-4)}, + {FN (exp), ARG(5.0e-01,-9.42512322775237976202e+00), RES(-1.6487211724286834501e0, 5.6924900763267464498e-4)}, + {FN (exp), ARG(-5.0e-01,9.42512322775237976202e+00), RES(-6.0653062356058926544e-1, -2.0941500681530645317e-4)}, + {FN (exp), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(-6.0653062356058926544e-1, 2.0941500681530645317e-4)}, + {FN (exp), ARG(1.0e+00,-3.45266983001243932001e-04), RES(2.7182816664368240602e0, -9.3853294721218487636e-4)}, + {FN (exp), ARG(1.0e+00,3.45266983001243932001e-04), RES(2.7182816664368240602e0, 9.3853294721218487636e-4)}, + {FN (exp), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(3.6787941924411912823e-1, -1.2701662223785390836e-4)}, + {FN (exp), ARG(-1.0e+00,3.45266983001243932001e-04), RES(3.6787941924411912823e-1, 1.2701662223785390836e-4)}, + {FN (exp), ARG(1.0e+00,1.57045105981189525579e+00), RES(9.3853294721250973333e-4, 2.7182816664368240601e0)}, + {FN (exp), ARG(1.0e+00,-1.57045105981189525579e+00), RES(9.3853294721250973333e-4, -2.7182816664368240601e0)}, + {FN (exp), ARG(-1.0e+00,1.57045105981189525579e+00), RES(1.2701662223789787297e-4, 3.6787941924411912822e-1)}, + {FN (exp), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(1.2701662223789787297e-4, -3.6787941924411912822e-1)}, + {FN (exp), ARG(1.0e+00,1.57114159377789786021e+00), RES(-9.3853294721217683983e-4, 2.7182816664368240602e0)}, + {FN (exp), ARG(1.0e+00,-1.57114159377789786021e+00), RES(-9.3853294721217683983e-4, -2.7182816664368240602e0)}, + {FN (exp), ARG(-1.0e+00,1.57114159377789786021e+00), RES(-1.2701662223785282074e-4, 3.6787941924411912823e-1)}, + {FN (exp), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(-1.2701662223785282074e-4, -3.6787941924411912823e-1)}, + {FN (exp), ARG(1.0e+00,3.14124738660679181379e+00), RES(-2.718281666436824060e0, 9.3853294721267618008e-4)}, + {FN (exp), ARG(1.0e+00,-3.14124738660679181379e+00), RES(-2.718281666436824060e0, -9.3853294721267618008e-4)}, + {FN (exp), ARG(-1.0e+00,3.14124738660679181379e+00), RES(-3.6787941924411912821e-1, 1.2701662223792039909e-4)}, + {FN (exp), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(-3.6787941924411912821e-1, -1.2701662223792039909e-4)}, + {FN (exp), ARG(1.0e+00,3.14193792057279441821e+00), RES(-2.7182816664368240603e0, -9.3853294721201039309e-4)}, + {FN (exp), ARG(1.0e+00,-3.14193792057279441821e+00), RES(-2.7182816664368240603e0, 9.3853294721201039309e-4)}, + {FN (exp), ARG(-1.0e+00,3.14193792057279441821e+00), RES(-3.6787941924411912824e-1, -1.2701662223783029462e-4)}, + {FN (exp), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(-3.6787941924411912824e-1, 1.2701662223783029462e-4)}, + {FN (exp), ARG(1.0e+00,4.71204371340168837179e+00), RES(-9.3853294721284262682e-4, -2.718281666436824060e0)}, + {FN (exp), ARG(1.0e+00,-4.71204371340168837179e+00), RES(-9.3853294721284262682e-4, 2.718281666436824060e0)}, + {FN (exp), ARG(-1.0e+00,4.71204371340168837179e+00), RES(-1.2701662223794292521e-4, -3.6787941924411912820e-1)}, + {FN (exp), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(-1.2701662223794292521e-4, 3.6787941924411912820e-1)}, + {FN (exp), ARG(1.0e+00,4.71273424736769097620e+00), RES(9.3853294721184394634e-4, -2.7182816664368240603e0)}, + {FN (exp), ARG(1.0e+00,-4.71273424736769097620e+00), RES(9.3853294721184394634e-4, 2.7182816664368240603e0)}, + {FN (exp), ARG(-1.0e+00,4.71273424736769097620e+00), RES(1.2701662223780776850e-4, -3.6787941924411912825e-1)}, + {FN (exp), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(1.2701662223780776850e-4, 3.6787941924411912825e-1)}, + {FN (exp), ARG(1.0e+00,6.28284004019658492979e+00), RES(2.7182816664368240599e0, -9.3853294721300907357e-4)}, + {FN (exp), ARG(1.0e+00,-6.28284004019658492979e+00), RES(2.7182816664368240599e0, 9.3853294721300907357e-4)}, + {FN (exp), ARG(-1.0e+00,6.28284004019658492979e+00), RES(3.6787941924411912819e-1, -1.2701662223796545132e-4)}, + {FN (exp), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(3.6787941924411912819e-1, 1.2701662223796545132e-4)}, + {FN (exp), ARG(1.0e+00,6.28353057416258753420e+00), RES(2.7182816664368240604e0, 9.3853294721167749959e-4)}, + {FN (exp), ARG(1.0e+00,-6.28353057416258753420e+00), RES(2.7182816664368240604e0, -9.3853294721167749959e-4)}, + {FN (exp), ARG(-1.0e+00,6.28353057416258753420e+00), RES(3.6787941924411912825e-1, 1.2701662223778524238e-4)}, + {FN (exp), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(3.6787941924411912825e-1, -1.2701662223778524238e-4)}, + {FN (exp), ARG(1.0e+00,9.42443269378637893396e+00), RES(-2.7182816664368240606e0, 9.3853294721092764795e-4)}, + {FN (exp), ARG(1.0e+00,-9.42443269378637893396e+00), RES(-2.7182816664368240606e0, -9.3853294721092764795e-4)}, + {FN (exp), ARG(-1.0e+00,9.42443269378637893396e+00), RES(-3.6787941924411912829e-1, 1.270166222376837610e-4)}, + {FN (exp), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(-3.6787941924411912829e-1, -1.270166222376837610e-4)}, + {FN (exp), ARG(1.0e+00,9.42512322775237976202e+00), RES(-2.7182816664368240613e0, -9.3853294720893028698e-4)}, + {FN (exp), ARG(1.0e+00,-9.42512322775237976202e+00), RES(-2.7182816664368240613e0, 9.3853294720893028698e-4)}, + {FN (exp), ARG(-1.0e+00,9.42512322775237976202e+00), RES(-3.6787941924411912838e-1, -1.2701662223741344759e-4)}, + {FN (exp), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(-3.6787941924411912838e-1, 1.2701662223741344759e-4)}, + {FN (exp), ARG(2.0e+00,-3.45266983001243932001e-04), RES(7.3890556585085906002e0, -2.5511970558169944872e-3)}, + {FN (exp), ARG(2.0e+00,3.45266983001243932001e-04), RES(7.3890556585085906002e0, 2.5511970558169944872e-3)}, + {FN (exp), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(1.3533527517000128913e-1, -4.6726804008345889445e-5)}, + {FN (exp), ARG(-2.0e+00,3.45266983001243932001e-04), RES(1.3533527517000128913e-1, 4.6726804008345889445e-5)}, + {FN (exp), ARG(2.0e+00,1.57045105981189525579e+00), RES(2.551197055817877540e-3, 7.3890556585085905999e0)}, + {FN (exp), ARG(2.0e+00,-1.57045105981189525579e+00), RES(2.551197055817877540e-3, -7.3890556585085905999e0)}, + {FN (exp), ARG(-2.0e+00,1.57045105981189525579e+00), RES(4.6726804008362063122e-5, 1.3533527517000128913e-1)}, + {FN (exp), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(4.6726804008362063122e-5, -1.3533527517000128913e-1)}, + {FN (exp), ARG(2.0e+00,1.57114159377789786021e+00), RES(-2.5511970558169726417e-3, 7.3890556585085906002e0)}, + {FN (exp), ARG(2.0e+00,-1.57114159377789786021e+00), RES(-2.5511970558169726417e-3, -7.3890556585085906002e0)}, + {FN (exp), ARG(-2.0e+00,1.57114159377789786021e+00), RES(-4.6726804008345489330e-5, 1.3533527517000128913e-1)}, + {FN (exp), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(-4.6726804008345489330e-5, -1.3533527517000128913e-1)}, + {FN (exp), ARG(2.0e+00,3.14124738660679181379e+00), RES(-7.3890556585085905998e0, 2.5511970558183299892e-3)}, + {FN (exp), ARG(2.0e+00,-3.14124738660679181379e+00), RES(-7.3890556585085905998e0, -2.5511970558183299892e-3)}, + {FN (exp), ARG(-2.0e+00,3.14124738660679181379e+00), RES(-1.3533527517000128912e-1, 4.6726804008370350017e-5)}, + {FN (exp), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(-1.3533527517000128912e-1, -4.6726804008370350017e-5)}, + {FN (exp), ARG(2.0e+00,3.14193792057279441821e+00), RES(-7.3890556585085906004e0, -2.5511970558165201925e-3)}, + {FN (exp), ARG(2.0e+00,-3.14193792057279441821e+00), RES(-7.3890556585085906004e0, 2.5511970558165201925e-3)}, + {FN (exp), ARG(-2.0e+00,3.14193792057279441821e+00), RES(-1.3533527517000128914e-1, -4.6726804008337202435e-5)}, + {FN (exp), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(-1.3533527517000128914e-1, 4.6726804008337202435e-5)}, + {FN (exp), ARG(2.0e+00,4.71204371340168837179e+00), RES(-2.5511970558187824384e-3, -7.3890556585085905996e0)}, + {FN (exp), ARG(2.0e+00,-4.71204371340168837179e+00), RES(-2.5511970558187824384e-3, 7.3890556585085905996e0)}, + {FN (exp), ARG(-2.0e+00,4.71204371340168837179e+00), RES(-4.6726804008378636913e-5, -1.3533527517000128912e-1)}, + {FN (exp), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(-4.6726804008378636913e-5, 1.3533527517000128912e-1)}, + {FN (exp), ARG(2.0e+00,4.71273424736769097620e+00), RES(2.5511970558160677434e-3, -7.3890556585085906006e0)}, + {FN (exp), ARG(2.0e+00,-4.71273424736769097620e+00), RES(2.5511970558160677434e-3, 7.3890556585085906006e0)}, + {FN (exp), ARG(-2.0e+00,4.71273424736769097620e+00), RES(4.6726804008328915539e-5, -1.3533527517000128914e-1)}, + {FN (exp), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(4.6726804008328915539e-5, 1.3533527517000128914e-1)}, + {FN (exp), ARG(2.0e+00,6.28284004019658492979e+00), RES(7.3890556585085905995e0, -2.5511970558192348875e-3)}, + {FN (exp), ARG(2.0e+00,-6.28284004019658492979e+00), RES(7.3890556585085905995e0, 2.5511970558192348875e-3)}, + {FN (exp), ARG(-2.0e+00,6.28284004019658492979e+00), RES(1.3533527517000128912e-1, -4.6726804008386923808e-5)}, + {FN (exp), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(1.3533527517000128912e-1, 4.6726804008386923808e-5)}, + {FN (exp), ARG(2.0e+00,6.28353057416258753420e+00), RES(7.3890556585085906007e0, 2.5511970558156152942e-3)}, + {FN (exp), ARG(2.0e+00,-6.28353057416258753420e+00), RES(7.3890556585085906007e0, -2.5511970558156152942e-3)}, + {FN (exp), ARG(-2.0e+00,6.28353057416258753420e+00), RES(1.3533527517000128914e-1, 4.6726804008320628644e-5)}, + {FN (exp), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(1.3533527517000128914e-1, -4.6726804008320628644e-5)}, + {FN (exp), ARG(2.0e+00,9.42443269378637893396e+00), RES(-7.3890556585085906014e0, 2.5511970558135769861e-3)}, + {FN (exp), ARG(2.0e+00,-9.42443269378637893396e+00), RES(-7.3890556585085906014e0, -2.5511970558135769861e-3)}, + {FN (exp), ARG(-2.0e+00,9.42443269378637893396e+00), RES(-1.3533527517000128916e-1, 4.6726804008283295729e-5)}, + {FN (exp), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(-1.3533527517000128916e-1, -4.6726804008283295729e-5)}, + {FN (exp), ARG(2.0e+00,9.42512322775237976202e+00), RES(-7.3890556585085906033e0, -2.5511970558081475961e-3)}, + {FN (exp), ARG(2.0e+00,-9.42512322775237976202e+00), RES(-7.3890556585085906033e0, 2.5511970558081475961e-3)}, + {FN (exp), ARG(-2.0e+00,9.42512322775237976202e+00), RES(-1.3533527517000128919e-1, -4.6726804008183852982e-5)}, + {FN (exp), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(-1.3533527517000128919e-1, 4.6726804008183852982e-5)}, + {FN (sin), ARG(-3.45266983001243932001e-04,0.0e+00), RES(-3.4526697614140534807e-4, 0.0)}, + {FN (sin), ARG(3.45266983001243932001e-04,0.0e+00), RES(3.4526697614140534807e-4, 0.0)}, + {FN (sin), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(-3.4526697614140780134e-4, 1.1920928244535424533e-7)}, + {FN (sin), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(-3.4526697614140780134e-4, -1.1920928244535424533e-7)}, + {FN (sin), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(3.4526697614140780134e-4, 1.1920928244535424533e-7)}, + {FN (sin), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(3.4526697614140780134e-4, -1.1920928244535424533e-7)}, + {FN (sin), ARG(-3.45266983001243932001e-04,5.0e-01), RES(-3.8933200722534065172e-4, 5.2109527443404709209e-1)}, + {FN (sin), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(-3.8933200722534065172e-4, -5.2109527443404709209e-1)}, + {FN (sin), ARG(3.45266983001243932001e-04,5.0e-01), RES(3.8933200722534065172e-4, 5.2109527443404709209e-1)}, + {FN (sin), ARG(3.45266983001243932001e-04,-5.0e-01), RES(3.8933200722534065172e-4, -5.2109527443404709209e-1)}, + {FN (sin), ARG(-3.45266983001243932001e-04,1.0e+00), RES(-5.3277478472501939236e-4, 1.1752011235963524660e0)}, + {FN (sin), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(-5.3277478472501939236e-4, -1.1752011235963524660e0)}, + {FN (sin), ARG(3.45266983001243932001e-04,1.0e+00), RES(5.3277478472501939236e-4, 1.1752011235963524660e0)}, + {FN (sin), ARG(3.45266983001243932001e-04,-1.0e+00), RES(5.3277478472501939236e-4, -1.1752011235963524660e0)}, + {FN (sin), ARG(-3.45266983001243932001e-04,2.0e+00), RES(-1.2989619299126701883e-3, 3.6268601916692946556e0)}, + {FN (sin), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(-1.2989619299126701883e-3, -3.6268601916692946556e0)}, + {FN (sin), ARG(3.45266983001243932001e-04,2.0e+00), RES(1.2989619299126701883e-3, 3.6268601916692946556e0)}, + {FN (sin), ARG(3.45266983001243932001e-04,-2.0e+00), RES(1.2989619299126701883e-3, -3.6268601916692946556e0)}, + {FN (sin), ARG(1.57045105981189525579e+00,0.0e+00), RES(9.9999994039535581669e-1, 0.0)}, + {FN (sin), ARG(-1.57045105981189525579e+00,0.0e+00), RES(-9.9999994039535581669e-1, 0.0)}, + {FN (sin), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(9.9999994039536292211e-1, 4.1159030931177815679e-11)}, + {FN (sin), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(9.9999994039536292211e-1, -4.1159030931177815679e-11)}, + {FN (sin), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(-9.9999994039536292211e-1, 4.1159030931177815679e-11)}, + {FN (sin), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(-9.9999994039536292211e-1, -4.1159030931177815679e-11)}, + {FN (sin), ARG(1.57045105981189525579e+00,5.0e-01), RES(1.1276258979946363572e0, 1.7991700040937027667e-4)}, + {FN (sin), ARG(1.57045105981189525579e+00,-5.0e-01), RES(1.1276258979946363572e0, -1.7991700040937027667e-4)}, + {FN (sin), ARG(-1.57045105981189525579e+00,5.0e-01), RES(-1.1276258979946363572e0, 1.7991700040937027667e-4)}, + {FN (sin), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(-1.1276258979946363572e0, -1.7991700040937027667e-4)}, + {FN (sin), ARG(1.57045105981189525579e+00,1.0e+00), RES(1.5430805428404715942e0, 4.0575816248730593018e-4)}, + {FN (sin), ARG(1.57045105981189525579e+00,-1.0e+00), RES(1.5430805428404715942e0, -4.0575816248730593018e-4)}, + {FN (sin), ARG(-1.57045105981189525579e+00,1.0e+00), RES(-1.5430805428404715942e0, 4.0575816248730593018e-4)}, + {FN (sin), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(-1.5430805428404715942e0, -4.0575816248730593018e-4)}, + {FN (sin), ARG(1.57045105981189525579e+00,2.0e+00), RES(3.7621954668392959445e0, 1.2522351259047577385e-3)}, + {FN (sin), ARG(1.57045105981189525579e+00,-2.0e+00), RES(3.7621954668392959445e0, -1.2522351259047577385e-3)}, + {FN (sin), ARG(-1.57045105981189525579e+00,2.0e+00), RES(-3.7621954668392959445e0, 1.2522351259047577385e-3)}, + {FN (sin), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(-3.7621954668392959445e0, -1.2522351259047577385e-3)}, + {FN (sin), ARG(1.57114159377789786021e+00,0.0e+00), RES(9.9999994039535581673e-1, 0.0)}, + {FN (sin), ARG(-1.57114159377789786021e+00,0.0e+00), RES(-9.9999994039535581673e-1, 0.0)}, + {FN (sin), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(9.9999994039536292216e-1, -4.1159030931163216752e-11)}, + {FN (sin), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(9.9999994039536292216e-1, 4.1159030931163216752e-11)}, + {FN (sin), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(-9.9999994039536292216e-1, -4.1159030931163216752e-11)}, + {FN (sin), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-9.9999994039536292216e-1, 4.1159030931163216752e-11)}, + {FN (sin), ARG(1.57114159377789786021e+00,5.0e-01), RES(1.1276258979946363573e0, -1.7991700040930646090e-4)}, + {FN (sin), ARG(1.57114159377789786021e+00,-5.0e-01), RES(1.1276258979946363573e0, 1.7991700040930646090e-4)}, + {FN (sin), ARG(-1.57114159377789786021e+00,5.0e-01), RES(-1.1276258979946363573e0, -1.7991700040930646090e-4)}, + {FN (sin), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(-1.1276258979946363573e0, 1.7991700040930646090e-4)}, + {FN (sin), ARG(1.57114159377789786021e+00,1.0e+00), RES(1.5430805428404715942e0, -4.0575816248716200955e-4)}, + {FN (sin), ARG(1.57114159377789786021e+00,-1.0e+00), RES(1.5430805428404715942e0, 4.0575816248716200955e-4)}, + {FN (sin), ARG(-1.57114159377789786021e+00,1.0e+00), RES(-1.5430805428404715942e0, -4.0575816248716200955e-4)}, + {FN (sin), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(-1.5430805428404715942e0, 4.0575816248716200955e-4)}, + {FN (sin), ARG(1.57114159377789786021e+00,2.0e+00), RES(3.7621954668392959447e0, -1.2522351259043135762e-3)}, + {FN (sin), ARG(1.57114159377789786021e+00,-2.0e+00), RES(3.7621954668392959447e0, 1.2522351259043135762e-3)}, + {FN (sin), ARG(-1.57114159377789786021e+00,2.0e+00), RES(-3.7621954668392959447e0, -1.2522351259043135762e-3)}, + {FN (sin), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(-3.7621954668392959447e0, 1.2522351259043135762e-3)}, + {FN (sin), ARG(3.14124738660679181379e+00,0.0e+00), RES(3.4526697614158608860e-4, 0.0)}, + {FN (sin), ARG(-3.14124738660679181379e+00,0.0e+00), RES(-3.4526697614158608860e-4, 0.0)}, + {FN (sin), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(3.4526697614158854187e-4, -1.1920928244535424532e-7)}, + {FN (sin), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(3.4526697614158854187e-4, 1.1920928244535424532e-7)}, + {FN (sin), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(-3.4526697614158854187e-4, -1.1920928244535424532e-7)}, + {FN (sin), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-3.4526697614158854187e-4, 1.1920928244535424532e-7)}, + {FN (sin), ARG(3.14124738660679181379e+00,5.0e-01), RES(3.8933200722554445944e-4, -5.2109527443404709206e-1)}, + {FN (sin), ARG(3.14124738660679181379e+00,-5.0e-01), RES(3.8933200722554445944e-4, 5.2109527443404709206e-1)}, + {FN (sin), ARG(-3.14124738660679181379e+00,5.0e-01), RES(-3.8933200722554445944e-4, -5.2109527443404709206e-1)}, + {FN (sin), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(-3.8933200722554445944e-4, 5.2109527443404709206e-1)}, + {FN (sin), ARG(3.14124738660679181379e+00,1.0e+00), RES(5.3277478472529828958e-4, -1.1752011235963524659e0)}, + {FN (sin), ARG(3.14124738660679181379e+00,-1.0e+00), RES(5.3277478472529828958e-4, 1.1752011235963524659e0)}, + {FN (sin), ARG(-3.14124738660679181379e+00,1.0e+00), RES(-5.3277478472529828958e-4, -1.1752011235963524659e0)}, + {FN (sin), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(-5.3277478472529828958e-4, 1.1752011235963524659e0)}, + {FN (sin), ARG(3.14124738660679181379e+00,2.0e+00), RES(1.2989619299133501696e-3, -3.6268601916692946553e0)}, + {FN (sin), ARG(3.14124738660679181379e+00,-2.0e+00), RES(1.2989619299133501696e-3, 3.6268601916692946553e0)}, + {FN (sin), ARG(-3.14124738660679181379e+00,2.0e+00), RES(-1.2989619299133501696e-3, -3.6268601916692946553e0)}, + {FN (sin), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(-1.2989619299133501696e-3, 3.6268601916692946553e0)}, + {FN (sin), ARG(3.14193792057279441821e+00,0.0e+00), RES(-3.4526697614134115926e-4, 0.0)}, + {FN (sin), ARG(-3.14193792057279441821e+00,0.0e+00), RES(3.4526697614134115926e-4, 0.0)}, + {FN (sin), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(-3.4526697614134361253e-4, -1.1920928244535424533e-7)}, + {FN (sin), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-3.4526697614134361253e-4, 1.1920928244535424533e-7)}, + {FN (sin), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(3.4526697614134361253e-4, -1.1920928244535424533e-7)}, + {FN (sin), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(3.4526697614134361253e-4, 1.1920928244535424533e-7)}, + {FN (sin), ARG(3.14193792057279441821e+00,5.0e-01), RES(-3.8933200722526827075e-4, -5.2109527443404709211e-1)}, + {FN (sin), ARG(3.14193792057279441821e+00,-5.0e-01), RES(-3.8933200722526827075e-4, 5.2109527443404709211e-1)}, + {FN (sin), ARG(-3.14193792057279441821e+00,5.0e-01), RES(3.8933200722526827075e-4, -5.2109527443404709211e-1)}, + {FN (sin), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(3.8933200722526827075e-4, 5.2109527443404709211e-1)}, + {FN (sin), ARG(3.14193792057279441821e+00,1.0e+00), RES(-5.3277478472492034385e-4, -1.1752011235963524660e0)}, + {FN (sin), ARG(3.14193792057279441821e+00,-1.0e+00), RES(-5.3277478472492034385e-4, 1.1752011235963524660e0)}, + {FN (sin), ARG(-3.14193792057279441821e+00,1.0e+00), RES(5.3277478472492034385e-4, -1.1752011235963524660e0)}, + {FN (sin), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(5.3277478472492034385e-4, 1.1752011235963524660e0)}, + {FN (sin), ARG(3.14193792057279441821e+00,2.0e+00), RES(-1.2989619299124286975e-3, -3.6268601916692946556e0)}, + {FN (sin), ARG(3.14193792057279441821e+00,-2.0e+00), RES(-1.2989619299124286975e-3, 3.6268601916692946556e0)}, + {FN (sin), ARG(-3.14193792057279441821e+00,2.0e+00), RES(1.2989619299124286975e-3, -3.6268601916692946556e0)}, + {FN (sin), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(1.2989619299124286975e-3, 3.6268601916692946556e0)}, + {FN (sin), ARG(4.71204371340168837179e+00,0.0e+00), RES(-9.9999994039535581664e-1, 0.0)}, + {FN (sin), ARG(-4.71204371340168837179e+00,0.0e+00), RES(9.9999994039535581664e-1, 0.0)}, + {FN (sin), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(-9.9999994039536292207e-1, -4.1159030931192414605e-11)}, + {FN (sin), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-9.9999994039536292207e-1, 4.1159030931192414605e-11)}, + {FN (sin), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(9.9999994039536292207e-1, -4.1159030931192414605e-11)}, + {FN (sin), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(9.9999994039536292207e-1, 4.1159030931192414605e-11)}, + {FN (sin), ARG(4.71204371340168837179e+00,5.0e-01), RES(-1.1276258979946363572e0, -1.7991700040943409243e-4)}, + {FN (sin), ARG(4.71204371340168837179e+00,-5.0e-01), RES(-1.1276258979946363572e0, 1.7991700040943409243e-4)}, + {FN (sin), ARG(-4.71204371340168837179e+00,5.0e-01), RES(1.1276258979946363572e0, -1.7991700040943409243e-4)}, + {FN (sin), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(1.1276258979946363572e0, 1.7991700040943409243e-4)}, + {FN (sin), ARG(4.71204371340168837179e+00,1.0e+00), RES(-1.5430805428404715941e0, -4.0575816248744985081e-4)}, + {FN (sin), ARG(4.71204371340168837179e+00,-1.0e+00), RES(-1.5430805428404715941e0, 4.0575816248744985081e-4)}, + {FN (sin), ARG(-4.71204371340168837179e+00,1.0e+00), RES(1.5430805428404715941e0, -4.0575816248744985081e-4)}, + {FN (sin), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(1.5430805428404715941e0, 4.0575816248744985081e-4)}, + {FN (sin), ARG(4.71204371340168837179e+00,2.0e+00), RES(-3.7621954668392959444e0, -1.2522351259052019007e-3)}, + {FN (sin), ARG(4.71204371340168837179e+00,-2.0e+00), RES(-3.7621954668392959444e0, 1.2522351259052019007e-3)}, + {FN (sin), ARG(-4.71204371340168837179e+00,2.0e+00), RES(3.7621954668392959444e0, -1.2522351259052019007e-3)}, + {FN (sin), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(3.7621954668392959444e0, 1.2522351259052019007e-3)}, + {FN (sin), ARG(4.71273424736769097620e+00,0.0e+00), RES(-9.9999994039535581677e-1, 0.0)}, + {FN (sin), ARG(-4.71273424736769097620e+00,0.0e+00), RES(9.9999994039535581677e-1, 0.0)}, + {FN (sin), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(-9.9999994039536292220e-1, 4.1159030931148617825e-11)}, + {FN (sin), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(-9.9999994039536292220e-1, -4.1159030931148617825e-11)}, + {FN (sin), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(9.9999994039536292220e-1, 4.1159030931148617825e-11)}, + {FN (sin), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(9.9999994039536292220e-1, -4.1159030931148617825e-11)}, + {FN (sin), ARG(4.71273424736769097620e+00,5.0e-01), RES(-1.1276258979946363573e0, 1.7991700040924264514e-4)}, + {FN (sin), ARG(4.71273424736769097620e+00,-5.0e-01), RES(-1.1276258979946363573e0, -1.7991700040924264514e-4)}, + {FN (sin), ARG(-4.71273424736769097620e+00,5.0e-01), RES(1.1276258979946363573e0, 1.7991700040924264514e-4)}, + {FN (sin), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(1.1276258979946363573e0, -1.7991700040924264514e-4)}, + {FN (sin), ARG(4.71273424736769097620e+00,1.0e+00), RES(-1.5430805428404715943e0, 4.0575816248701808892e-4)}, + {FN (sin), ARG(4.71273424736769097620e+00,-1.0e+00), RES(-1.5430805428404715943e0, -4.0575816248701808892e-4)}, + {FN (sin), ARG(-4.71273424736769097620e+00,1.0e+00), RES(1.5430805428404715943e0, 4.0575816248701808892e-4)}, + {FN (sin), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(1.5430805428404715943e0, -4.0575816248701808892e-4)}, + {FN (sin), ARG(4.71273424736769097620e+00,2.0e+00), RES(-3.7621954668392959448e0, 1.2522351259038694139e-3)}, + {FN (sin), ARG(4.71273424736769097620e+00,-2.0e+00), RES(-3.7621954668392959448e0, -1.2522351259038694139e-3)}, + {FN (sin), ARG(-4.71273424736769097620e+00,2.0e+00), RES(3.7621954668392959448e0, 1.2522351259038694139e-3)}, + {FN (sin), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(3.7621954668392959448e0, -1.2522351259038694139e-3)}, + {FN (sin), ARG(6.28284004019658492979e+00,0.0e+00), RES(-3.4526697614170855328e-4, 0.0)}, + {FN (sin), ARG(-6.28284004019658492979e+00,0.0e+00), RES(3.4526697614170855328e-4, 0.0)}, + {FN (sin), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(-3.4526697614171100655e-4, 1.1920928244535424532e-7)}, + {FN (sin), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(-3.4526697614171100655e-4, -1.1920928244535424532e-7)}, + {FN (sin), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(3.4526697614171100655e-4, 1.1920928244535424532e-7)}, + {FN (sin), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(3.4526697614171100655e-4, -1.1920928244535424532e-7)}, + {FN (sin), ARG(6.28284004019658492979e+00,5.0e-01), RES(-3.8933200722568255379e-4, 5.2109527443404709204e-1)}, + {FN (sin), ARG(6.28284004019658492979e+00,-5.0e-01), RES(-3.8933200722568255379e-4, -5.2109527443404709204e-1)}, + {FN (sin), ARG(-6.28284004019658492979e+00,5.0e-01), RES(3.8933200722568255379e-4, 5.2109527443404709204e-1)}, + {FN (sin), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(3.8933200722568255379e-4, -5.2109527443404709204e-1)}, + {FN (sin), ARG(6.28284004019658492979e+00,1.0e+00), RES(-5.3277478472548726245e-4, 1.1752011235963524659e0)}, + {FN (sin), ARG(6.28284004019658492979e+00,-1.0e+00), RES(-5.3277478472548726245e-4, -1.1752011235963524659e0)}, + {FN (sin), ARG(-6.28284004019658492979e+00,1.0e+00), RES(5.3277478472548726245e-4, 1.1752011235963524659e0)}, + {FN (sin), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(5.3277478472548726245e-4, -1.1752011235963524659e0)}, + {FN (sin), ARG(6.28284004019658492979e+00,2.0e+00), RES(-1.2989619299138109057e-3, 3.6268601916692946552e0)}, + {FN (sin), ARG(6.28284004019658492979e+00,-2.0e+00), RES(-1.2989619299138109057e-3, -3.6268601916692946552e0)}, + {FN (sin), ARG(-6.28284004019658492979e+00,2.0e+00), RES(1.2989619299138109057e-3, 3.6268601916692946552e0)}, + {FN (sin), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(1.2989619299138109057e-3, -3.6268601916692946552e0)}, + {FN (sin), ARG(6.28353057416258753420e+00,0.0e+00), RES(3.4526697614121869459e-4, 0.0)}, + {FN (sin), ARG(-6.28353057416258753420e+00,0.0e+00), RES(-3.4526697614121869459e-4, 0.0)}, + {FN (sin), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(3.4526697614122114786e-4, 1.1920928244535424534e-7)}, + {FN (sin), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(3.4526697614122114786e-4, -1.1920928244535424534e-7)}, + {FN (sin), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(-3.4526697614122114786e-4, 1.1920928244535424534e-7)}, + {FN (sin), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(-3.4526697614122114786e-4, -1.1920928244535424534e-7)}, + {FN (sin), ARG(6.28353057416258753420e+00,5.0e-01), RES(3.8933200722513017641e-4, 5.2109527443404709213e-1)}, + {FN (sin), ARG(6.28353057416258753420e+00,-5.0e-01), RES(3.8933200722513017641e-4, -5.2109527443404709213e-1)}, + {FN (sin), ARG(-6.28353057416258753420e+00,5.0e-01), RES(-3.8933200722513017641e-4, 5.2109527443404709213e-1)}, + {FN (sin), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(-3.8933200722513017641e-4, -5.2109527443404709213e-1)}, + {FN (sin), ARG(6.28353057416258753420e+00,1.0e+00), RES(5.3277478472473137099e-4, 1.1752011235963524661e0)}, + {FN (sin), ARG(6.28353057416258753420e+00,-1.0e+00), RES(5.3277478472473137099e-4, -1.1752011235963524661e0)}, + {FN (sin), ARG(-6.28353057416258753420e+00,1.0e+00), RES(-5.3277478472473137099e-4, 1.1752011235963524661e0)}, + {FN (sin), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(-5.3277478472473137099e-4, -1.1752011235963524661e0)}, + {FN (sin), ARG(6.28353057416258753420e+00,2.0e+00), RES(1.2989619299119679614e-3, 3.6268601916692946558e0)}, + {FN (sin), ARG(6.28353057416258753420e+00,-2.0e+00), RES(1.2989619299119679614e-3, -3.6268601916692946558e0)}, + {FN (sin), ARG(-6.28353057416258753420e+00,2.0e+00), RES(-1.2989619299119679614e-3, 3.6268601916692946558e0)}, + {FN (sin), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(-1.2989619299119679614e-3, -3.6268601916692946558e0)}, + {FN (sin), ARG(9.42443269378637893396e+00,0.0e+00), RES(3.4526697614094283958e-4, 0.0)}, + {FN (sin), ARG(-9.42443269378637893396e+00,0.0e+00), RES(-3.4526697614094283958e-4, 0.0)}, + {FN (sin), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(3.4526697614094529285e-4, -1.1920928244535424535e-7)}, + {FN (sin), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(3.4526697614094529285e-4, 1.1920928244535424535e-7)}, + {FN (sin), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(-3.4526697614094529285e-4, -1.1920928244535424535e-7)}, + {FN (sin), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-3.4526697614094529285e-4, 1.1920928244535424535e-7)}, + {FN (sin), ARG(9.42443269378637893396e+00,5.0e-01), RES(3.8933200722481911514e-4, -5.2109527443404709218e-1)}, + {FN (sin), ARG(9.42443269378637893396e+00,-5.0e-01), RES(3.8933200722481911514e-4, 5.2109527443404709218e-1)}, + {FN (sin), ARG(-9.42443269378637893396e+00,5.0e-01), RES(-3.8933200722481911514e-4, -5.2109527443404709218e-1)}, + {FN (sin), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(-3.8933200722481911514e-4, 5.2109527443404709218e-1)}, + {FN (sin), ARG(9.42443269378637893396e+00,1.0e+00), RES(5.3277478472430570447e-4, -1.1752011235963524662e0)}, + {FN (sin), ARG(9.42443269378637893396e+00,-1.0e+00), RES(5.3277478472430570447e-4, 1.1752011235963524662e0)}, + {FN (sin), ARG(-9.42443269378637893396e+00,1.0e+00), RES(-5.3277478472430570447e-4, -1.1752011235963524662e0)}, + {FN (sin), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(-5.3277478472430570447e-4, 1.1752011235963524662e0)}, + {FN (sin), ARG(9.42443269378637893396e+00,2.0e+00), RES(1.2989619299109301409e-3, -3.6268601916692946561e0)}, + {FN (sin), ARG(9.42443269378637893396e+00,-2.0e+00), RES(1.2989619299109301409e-3, 3.6268601916692946561e0)}, + {FN (sin), ARG(-9.42443269378637893396e+00,2.0e+00), RES(-1.2989619299109301409e-3, -3.6268601916692946561e0)}, + {FN (sin), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(-1.2989619299109301409e-3, 3.6268601916692946561e0)}, + {FN (sin), ARG(9.42512322775237976202e+00,0.0e+00), RES(-3.4526697614020805155e-4, 0.0)}, + {FN (sin), ARG(-9.42512322775237976202e+00,0.0e+00), RES(3.4526697614020805155e-4, 0.0)}, + {FN (sin), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(-3.4526697614021050482e-4, -1.1920928244535424538e-7)}, + {FN (sin), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-3.4526697614021050482e-4, 1.1920928244535424538e-7)}, + {FN (sin), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(3.4526697614021050482e-4, -1.1920928244535424538e-7)}, + {FN (sin), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(3.4526697614021050482e-4, 1.1920928244535424538e-7)}, + {FN (sin), ARG(9.42512322775237976202e+00,5.0e-01), RES(-3.8933200722399054908e-4, -5.2109527443404709231e-1)}, + {FN (sin), ARG(9.42512322775237976202e+00,-5.0e-01), RES(-3.8933200722399054908e-4, 5.2109527443404709231e-1)}, + {FN (sin), ARG(-9.42512322775237976202e+00,5.0e-01), RES(3.8933200722399054908e-4, -5.2109527443404709231e-1)}, + {FN (sin), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(3.8933200722399054908e-4, 5.2109527443404709231e-1)}, + {FN (sin), ARG(9.42512322775237976202e+00,1.0e+00), RES(-5.3277478472317186729e-4, -1.1752011235963524665e0)}, + {FN (sin), ARG(9.42512322775237976202e+00,-1.0e+00), RES(-5.3277478472317186729e-4, 1.1752011235963524665e0)}, + {FN (sin), ARG(-9.42512322775237976202e+00,1.0e+00), RES(5.3277478472317186729e-4, -1.1752011235963524665e0)}, + {FN (sin), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(5.3277478472317186729e-4, 1.1752011235963524665e0)}, + {FN (sin), ARG(9.42512322775237976202e+00,2.0e+00), RES(-1.2989619299081657245e-3, -3.6268601916692946571e0)}, + {FN (sin), ARG(9.42512322775237976202e+00,-2.0e+00), RES(-1.2989619299081657245e-3, 3.6268601916692946571e0)}, + {FN (sin), ARG(-9.42512322775237976202e+00,2.0e+00), RES(1.2989619299081657245e-3, -3.6268601916692946571e0)}, + {FN (sin), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(1.2989619299081657245e-3, 3.6268601916692946571e0)}, + {FN (cos), ARG(-3.45266983001243932001e-04,0.0e+00), RES(9.9999994039535581673e-1, 0.0)}, + {FN (cos), ARG(3.45266983001243932001e-04,0.0e+00), RES(9.9999994039535581673e-1, 0.0)}, + {FN (cos), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(9.9999994039536292216e-1, 4.1159030931163569191e-11)}, + {FN (cos), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(9.9999994039536292216e-1, -4.1159030931163569191e-11)}, + {FN (cos), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(9.9999994039536292216e-1, -4.1159030931163569191e-11)}, + {FN (cos), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(9.9999994039536292216e-1, 4.1159030931163569191e-11)}, + {FN (cos), ARG(-3.45266983001243932001e-04,5.0e-01), RES(1.1276258979946363573e0, 1.7991700040930800151e-4)}, + {FN (cos), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(1.1276258979946363573e0, -1.7991700040930800151e-4)}, + {FN (cos), ARG(3.45266983001243932001e-04,5.0e-01), RES(1.1276258979946363573e0, -1.7991700040930800151e-4)}, + {FN (cos), ARG(3.45266983001243932001e-04,-5.0e-01), RES(1.1276258979946363573e0, 1.7991700040930800151e-4)}, + {FN (cos), ARG(-3.45266983001243932001e-04,1.0e+00), RES(1.5430805428404715942e0, 4.057581624871654840e-4)}, + {FN (cos), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(1.5430805428404715942e0, -4.057581624871654840e-4)}, + {FN (cos), ARG(3.45266983001243932001e-04,1.0e+00), RES(1.5430805428404715942e0, -4.057581624871654840e-4)}, + {FN (cos), ARG(3.45266983001243932001e-04,-1.0e+00), RES(1.5430805428404715942e0, 4.057581624871654840e-4)}, + {FN (cos), ARG(-3.45266983001243932001e-04,2.0e+00), RES(3.7621954668392959447e0, 1.2522351259043242989e-3)}, + {FN (cos), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(3.7621954668392959447e0, -1.2522351259043242989e-3)}, + {FN (cos), ARG(3.45266983001243932001e-04,2.0e+00), RES(3.7621954668392959447e0, -1.2522351259043242989e-3)}, + {FN (cos), ARG(3.45266983001243932001e-04,-2.0e+00), RES(3.7621954668392959447e0, 1.2522351259043242989e-3)}, + {FN (cos), ARG(1.57045105981189525579e+00,0.0e+00), RES(3.4526697614152485627e-4, 0.0)}, + {FN (cos), ARG(-1.57045105981189525579e+00,0.0e+00), RES(3.4526697614152485627e-4, 0.0)}, + {FN (cos), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(3.4526697614152730954e-4, -1.1920928244535424532e-7)}, + {FN (cos), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(3.4526697614152730954e-4, 1.1920928244535424532e-7)}, + {FN (cos), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(3.4526697614152730954e-4, 1.1920928244535424532e-7)}, + {FN (cos), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(3.4526697614152730954e-4, -1.1920928244535424532e-7)}, + {FN (cos), ARG(1.57045105981189525579e+00,5.0e-01), RES(3.8933200722547541227e-4, -5.2109527443404709207e-1)}, + {FN (cos), ARG(1.57045105981189525579e+00,-5.0e-01), RES(3.8933200722547541227e-4, 5.2109527443404709207e-1)}, + {FN (cos), ARG(-1.57045105981189525579e+00,5.0e-01), RES(3.8933200722547541227e-4, 5.2109527443404709207e-1)}, + {FN (cos), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(3.8933200722547541227e-4, -5.2109527443404709207e-1)}, + {FN (cos), ARG(1.57045105981189525579e+00,1.0e+00), RES(5.3277478472520380315e-4, -1.1752011235963524659e0)}, + {FN (cos), ARG(1.57045105981189525579e+00,-1.0e+00), RES(5.3277478472520380315e-4, 1.1752011235963524659e0)}, + {FN (cos), ARG(-1.57045105981189525579e+00,1.0e+00), RES(5.3277478472520380315e-4, 1.1752011235963524659e0)}, + {FN (cos), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(5.3277478472520380315e-4, -1.1752011235963524659e0)}, + {FN (cos), ARG(1.57045105981189525579e+00,2.0e+00), RES(1.2989619299131198016e-3, -3.6268601916692946554e0)}, + {FN (cos), ARG(1.57045105981189525579e+00,-2.0e+00), RES(1.2989619299131198016e-3, 3.6268601916692946554e0)}, + {FN (cos), ARG(-1.57045105981189525579e+00,2.0e+00), RES(1.2989619299131198016e-3, 3.6268601916692946554e0)}, + {FN (cos), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(1.2989619299131198016e-3, -3.6268601916692946554e0)}, + {FN (cos), ARG(1.57114159377789786021e+00,0.0e+00), RES(-3.4526697614140239160e-4, 0.0)}, + {FN (cos), ARG(-1.57114159377789786021e+00,0.0e+00), RES(-3.4526697614140239160e-4, 0.0)}, + {FN (cos), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(-3.4526697614140484486e-4, -1.1920928244535424533e-7)}, + {FN (cos), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-3.4526697614140484486e-4, 1.1920928244535424533e-7)}, + {FN (cos), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(-3.4526697614140484486e-4, 1.1920928244535424533e-7)}, + {FN (cos), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-3.4526697614140484486e-4, -1.1920928244535424533e-7)}, + {FN (cos), ARG(1.57114159377789786021e+00,5.0e-01), RES(-3.8933200722533731792e-4, -5.2109527443404709209e-1)}, + {FN (cos), ARG(1.57114159377789786021e+00,-5.0e-01), RES(-3.8933200722533731792e-4, 5.2109527443404709209e-1)}, + {FN (cos), ARG(-1.57114159377789786021e+00,5.0e-01), RES(-3.8933200722533731792e-4, 5.2109527443404709209e-1)}, + {FN (cos), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(-3.8933200722533731792e-4, -5.2109527443404709209e-1)}, + {FN (cos), ARG(1.57114159377789786021e+00,1.0e+00), RES(-5.3277478472501483029e-4, -1.1752011235963524660e0)}, + {FN (cos), ARG(1.57114159377789786021e+00,-1.0e+00), RES(-5.3277478472501483029e-4, 1.1752011235963524660e0)}, + {FN (cos), ARG(-1.57114159377789786021e+00,1.0e+00), RES(-5.3277478472501483029e-4, 1.1752011235963524660e0)}, + {FN (cos), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(-5.3277478472501483029e-4, -1.1752011235963524660e0)}, + {FN (cos), ARG(1.57114159377789786021e+00,2.0e+00), RES(-1.2989619299126590655e-3, -3.6268601916692946556e0)}, + {FN (cos), ARG(1.57114159377789786021e+00,-2.0e+00), RES(-1.2989619299126590655e-3, 3.6268601916692946556e0)}, + {FN (cos), ARG(-1.57114159377789786021e+00,2.0e+00), RES(-1.2989619299126590655e-3, 3.6268601916692946556e0)}, + {FN (cos), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(-1.2989619299126590655e-3, -3.6268601916692946556e0)}, + {FN (cos), ARG(3.14124738660679181379e+00,0.0e+00), RES(-9.9999994039535581667e-1, 0.0)}, + {FN (cos), ARG(-3.14124738660679181379e+00,0.0e+00), RES(-9.9999994039535581667e-1, 0.0)}, + {FN (cos), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(-9.9999994039536292209e-1, -4.1159030931185115142e-11)}, + {FN (cos), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-9.9999994039536292209e-1, 4.1159030931185115142e-11)}, + {FN (cos), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(-9.9999994039536292209e-1, 4.1159030931185115142e-11)}, + {FN (cos), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-9.9999994039536292209e-1, -4.1159030931185115142e-11)}, + {FN (cos), ARG(3.14124738660679181379e+00,5.0e-01), RES(-1.1276258979946363572e0, -1.7991700040940218455e-4)}, + {FN (cos), ARG(3.14124738660679181379e+00,-5.0e-01), RES(-1.1276258979946363572e0, 1.7991700040940218455e-4)}, + {FN (cos), ARG(-3.14124738660679181379e+00,5.0e-01), RES(-1.1276258979946363572e0, 1.7991700040940218455e-4)}, + {FN (cos), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(-1.1276258979946363572e0, -1.7991700040940218455e-4)}, + {FN (cos), ARG(3.14124738660679181379e+00,1.0e+00), RES(-1.5430805428404715941e0, -4.0575816248737789049e-4)}, + {FN (cos), ARG(3.14124738660679181379e+00,-1.0e+00), RES(-1.5430805428404715941e0, 4.0575816248737789049e-4)}, + {FN (cos), ARG(-3.14124738660679181379e+00,1.0e+00), RES(-1.5430805428404715941e0, 4.0575816248737789049e-4)}, + {FN (cos), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(-1.5430805428404715941e0, -4.0575816248737789049e-4)}, + {FN (cos), ARG(3.14124738660679181379e+00,2.0e+00), RES(-3.7621954668392959444e0, -1.2522351259049798196e-3)}, + {FN (cos), ARG(3.14124738660679181379e+00,-2.0e+00), RES(-3.7621954668392959444e0, 1.2522351259049798196e-3)}, + {FN (cos), ARG(-3.14124738660679181379e+00,2.0e+00), RES(-3.7621954668392959444e0, 1.2522351259049798196e-3)}, + {FN (cos), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(-3.7621954668392959444e0, -1.2522351259049798196e-3)}, + {FN (cos), ARG(3.14193792057279441821e+00,0.0e+00), RES(-9.9999994039535581675e-1, 0.0)}, + {FN (cos), ARG(-3.14193792057279441821e+00,0.0e+00), RES(-9.9999994039535581675e-1, 0.0)}, + {FN (cos), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(-9.9999994039536292218e-1, 4.1159030931155917289e-11)}, + {FN (cos), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-9.9999994039536292218e-1, -4.1159030931155917289e-11)}, + {FN (cos), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(-9.9999994039536292218e-1, -4.1159030931155917289e-11)}, + {FN (cos), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-9.9999994039536292218e-1, 4.1159030931155917289e-11)}, + {FN (cos), ARG(3.14193792057279441821e+00,5.0e-01), RES(-1.1276258979946363573e0, 1.7991700040927455302e-4)}, + {FN (cos), ARG(3.14193792057279441821e+00,-5.0e-01), RES(-1.1276258979946363573e0, -1.7991700040927455302e-4)}, + {FN (cos), ARG(-3.14193792057279441821e+00,5.0e-01), RES(-1.1276258979946363573e0, -1.7991700040927455302e-4)}, + {FN (cos), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(-1.1276258979946363573e0, 1.7991700040927455302e-4)}, + {FN (cos), ARG(3.14193792057279441821e+00,1.0e+00), RES(-1.5430805428404715943e0, 4.0575816248709004923e-4)}, + {FN (cos), ARG(3.14193792057279441821e+00,-1.0e+00), RES(-1.5430805428404715943e0, -4.0575816248709004923e-4)}, + {FN (cos), ARG(-3.14193792057279441821e+00,1.0e+00), RES(-1.5430805428404715943e0, -4.0575816248709004923e-4)}, + {FN (cos), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(-1.5430805428404715943e0, 4.0575816248709004923e-4)}, + {FN (cos), ARG(3.14193792057279441821e+00,2.0e+00), RES(-3.7621954668392959448e0, 1.2522351259040914950e-3)}, + {FN (cos), ARG(3.14193792057279441821e+00,-2.0e+00), RES(-3.7621954668392959448e0, -1.2522351259040914950e-3)}, + {FN (cos), ARG(-3.14193792057279441821e+00,2.0e+00), RES(-3.7621954668392959448e0, -1.2522351259040914950e-3)}, + {FN (cos), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(-3.7621954668392959448e0, 1.2522351259040914950e-3)}, + {FN (cos), ARG(4.71204371340168837179e+00,0.0e+00), RES(-3.4526697614164732094e-4, 0.0)}, + {FN (cos), ARG(-4.71204371340168837179e+00,0.0e+00), RES(-3.4526697614164732094e-4, 0.0)}, + {FN (cos), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(-3.4526697614164977421e-4, 1.1920928244535424532e-7)}, + {FN (cos), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-3.4526697614164977421e-4, -1.1920928244535424532e-7)}, + {FN (cos), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(-3.4526697614164977421e-4, -1.1920928244535424532e-7)}, + {FN (cos), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-3.4526697614164977421e-4, 1.1920928244535424532e-7)}, + {FN (cos), ARG(4.71204371340168837179e+00,5.0e-01), RES(-3.8933200722561350661e-4, 5.2109527443404709205e-1)}, + {FN (cos), ARG(4.71204371340168837179e+00,-5.0e-01), RES(-3.8933200722561350661e-4, -5.2109527443404709205e-1)}, + {FN (cos), ARG(-4.71204371340168837179e+00,5.0e-01), RES(-3.8933200722561350661e-4, -5.2109527443404709205e-1)}, + {FN (cos), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(-3.8933200722561350661e-4, 5.2109527443404709205e-1)}, + {FN (cos), ARG(4.71204371340168837179e+00,1.0e+00), RES(-5.3277478472539277601e-4, 1.1752011235963524659e0)}, + {FN (cos), ARG(4.71204371340168837179e+00,-1.0e+00), RES(-5.3277478472539277601e-4, -1.1752011235963524659e0)}, + {FN (cos), ARG(-4.71204371340168837179e+00,1.0e+00), RES(-5.3277478472539277601e-4, -1.1752011235963524659e0)}, + {FN (cos), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(-5.3277478472539277601e-4, 1.1752011235963524659e0)}, + {FN (cos), ARG(4.71204371340168837179e+00,2.0e+00), RES(-1.2989619299135805376e-3, 3.6268601916692946552e0)}, + {FN (cos), ARG(4.71204371340168837179e+00,-2.0e+00), RES(-1.2989619299135805376e-3, -3.6268601916692946552e0)}, + {FN (cos), ARG(-4.71204371340168837179e+00,2.0e+00), RES(-1.2989619299135805376e-3, -3.6268601916692946552e0)}, + {FN (cos), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(-1.2989619299135805376e-3, 3.6268601916692946552e0)}, + {FN (cos), ARG(4.71273424736769097620e+00,0.0e+00), RES(3.4526697614127992692e-4, 0.0)}, + {FN (cos), ARG(-4.71273424736769097620e+00,0.0e+00), RES(3.4526697614127992692e-4, 0.0)}, + {FN (cos), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(3.4526697614128238019e-4, 1.1920928244535424533e-7)}, + {FN (cos), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(3.4526697614128238019e-4, -1.1920928244535424533e-7)}, + {FN (cos), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(3.4526697614128238019e-4, -1.1920928244535424533e-7)}, + {FN (cos), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(3.4526697614128238019e-4, 1.1920928244535424533e-7)}, + {FN (cos), ARG(4.71273424736769097620e+00,5.0e-01), RES(3.8933200722519922358e-4, 5.2109527443404709212e-1)}, + {FN (cos), ARG(4.71273424736769097620e+00,-5.0e-01), RES(3.8933200722519922358e-4, -5.2109527443404709212e-1)}, + {FN (cos), ARG(-4.71273424736769097620e+00,5.0e-01), RES(3.8933200722519922358e-4, -5.2109527443404709212e-1)}, + {FN (cos), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(3.8933200722519922358e-4, 5.2109527443404709212e-1)}, + {FN (cos), ARG(4.71273424736769097620e+00,1.0e+00), RES(5.3277478472482585742e-4, 1.1752011235963524660e0)}, + {FN (cos), ARG(4.71273424736769097620e+00,-1.0e+00), RES(5.3277478472482585742e-4, -1.1752011235963524660e0)}, + {FN (cos), ARG(-4.71273424736769097620e+00,1.0e+00), RES(5.3277478472482585742e-4, -1.1752011235963524660e0)}, + {FN (cos), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(5.3277478472482585742e-4, 1.1752011235963524660e0)}, + {FN (cos), ARG(4.71273424736769097620e+00,2.0e+00), RES(1.2989619299121983294e-3, 3.6268601916692946557e0)}, + {FN (cos), ARG(4.71273424736769097620e+00,-2.0e+00), RES(1.2989619299121983294e-3, -3.6268601916692946557e0)}, + {FN (cos), ARG(-4.71273424736769097620e+00,2.0e+00), RES(1.2989619299121983294e-3, -3.6268601916692946557e0)}, + {FN (cos), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(1.2989619299121983294e-3, 3.6268601916692946557e0)}, + {FN (cos), ARG(6.28284004019658492979e+00,0.0e+00), RES(9.9999994039535581662e-1, 0.0)}, + {FN (cos), ARG(-6.28284004019658492979e+00,0.0e+00), RES(9.9999994039535581662e-1, 0.0)}, + {FN (cos), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(9.9999994039536292205e-1, 4.1159030931199714069e-11)}, + {FN (cos), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(9.9999994039536292205e-1, -4.1159030931199714069e-11)}, + {FN (cos), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(9.9999994039536292205e-1, -4.1159030931199714069e-11)}, + {FN (cos), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(9.9999994039536292205e-1, 4.1159030931199714069e-11)}, + {FN (cos), ARG(6.28284004019658492979e+00,5.0e-01), RES(1.1276258979946363572e0, 1.7991700040946600032e-4)}, + {FN (cos), ARG(6.28284004019658492979e+00,-5.0e-01), RES(1.1276258979946363572e0, -1.7991700040946600032e-4)}, + {FN (cos), ARG(-6.28284004019658492979e+00,5.0e-01), RES(1.1276258979946363572e0, -1.7991700040946600032e-4)}, + {FN (cos), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(1.1276258979946363572e0, 1.7991700040946600032e-4)}, + {FN (cos), ARG(6.28284004019658492979e+00,1.0e+00), RES(1.5430805428404715941e0, 4.0575816248752181112e-4)}, + {FN (cos), ARG(6.28284004019658492979e+00,-1.0e+00), RES(1.5430805428404715941e0, -4.0575816248752181112e-4)}, + {FN (cos), ARG(-6.28284004019658492979e+00,1.0e+00), RES(1.5430805428404715941e0, -4.0575816248752181112e-4)}, + {FN (cos), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(1.5430805428404715941e0, 4.0575816248752181112e-4)}, + {FN (cos), ARG(6.28284004019658492979e+00,2.0e+00), RES(3.7621954668392959443e0, 1.2522351259054239819e-3)}, + {FN (cos), ARG(6.28284004019658492979e+00,-2.0e+00), RES(3.7621954668392959443e0, -1.2522351259054239819e-3)}, + {FN (cos), ARG(-6.28284004019658492979e+00,2.0e+00), RES(3.7621954668392959443e0, -1.2522351259054239819e-3)}, + {FN (cos), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(3.7621954668392959443e0, 1.2522351259054239819e-3)}, + {FN (cos), ARG(6.28353057416258753420e+00,0.0e+00), RES(9.9999994039535581679e-1, 0.0)}, + {FN (cos), ARG(-6.28353057416258753420e+00,0.0e+00), RES(9.9999994039535581679e-1, 0.0)}, + {FN (cos), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(9.9999994039536292222e-1, -4.1159030931141318362e-11)}, + {FN (cos), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(9.9999994039536292222e-1, 4.1159030931141318362e-11)}, + {FN (cos), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(9.9999994039536292222e-1, 4.1159030931141318362e-11)}, + {FN (cos), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(9.9999994039536292222e-1, -4.1159030931141318362e-11)}, + {FN (cos), ARG(6.28353057416258753420e+00,5.0e-01), RES(1.1276258979946363574e0, -1.7991700040921073725e-4)}, + {FN (cos), ARG(6.28353057416258753420e+00,-5.0e-01), RES(1.1276258979946363574e0, 1.7991700040921073725e-4)}, + {FN (cos), ARG(-6.28353057416258753420e+00,5.0e-01), RES(1.1276258979946363574e0, 1.7991700040921073725e-4)}, + {FN (cos), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(1.1276258979946363574e0, -1.7991700040921073725e-4)}, + {FN (cos), ARG(6.28353057416258753420e+00,1.0e+00), RES(1.5430805428404715943e0, -4.0575816248694612861e-4)}, + {FN (cos), ARG(6.28353057416258753420e+00,-1.0e+00), RES(1.5430805428404715943e0, 4.0575816248694612861e-4)}, + {FN (cos), ARG(-6.28353057416258753420e+00,1.0e+00), RES(1.5430805428404715943e0, 4.0575816248694612861e-4)}, + {FN (cos), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(1.5430805428404715943e0, -4.0575816248694612861e-4)}, + {FN (cos), ARG(6.28353057416258753420e+00,2.0e+00), RES(3.7621954668392959449e0, -1.2522351259036473328e-3)}, + {FN (cos), ARG(6.28353057416258753420e+00,-2.0e+00), RES(3.7621954668392959449e0, 1.2522351259036473328e-3)}, + {FN (cos), ARG(-6.28353057416258753420e+00,2.0e+00), RES(3.7621954668392959449e0, 1.2522351259036473328e-3)}, + {FN (cos), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(3.7621954668392959449e0, -1.2522351259036473328e-3)}, + {FN (cos), ARG(9.42443269378637893396e+00,0.0e+00), RES(-9.9999994039535581689e-1, 0.0)}, + {FN (cos), ARG(-9.42443269378637893396e+00,0.0e+00), RES(-9.9999994039535581689e-1, 0.0)}, + {FN (cos), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(-9.9999994039536292231e-1, -4.1159030931108433883e-11)}, + {FN (cos), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-9.9999994039536292231e-1, 4.1159030931108433883e-11)}, + {FN (cos), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(-9.9999994039536292231e-1, 4.1159030931108433883e-11)}, + {FN (cos), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-9.9999994039536292231e-1, -4.1159030931108433883e-11)}, + {FN (cos), ARG(9.42443269378637893396e+00,5.0e-01), RES(-1.1276258979946363575e0, -1.7991700040906699050e-4)}, + {FN (cos), ARG(9.42443269378637893396e+00,-5.0e-01), RES(-1.1276258979946363575e0, 1.7991700040906699050e-4)}, + {FN (cos), ARG(-9.42443269378637893396e+00,5.0e-01), RES(-1.1276258979946363575e0, 1.7991700040906699050e-4)}, + {FN (cos), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(-1.1276258979946363575e0, -1.7991700040906699050e-4)}, + {FN (cos), ARG(9.42443269378637893396e+00,1.0e+00), RES(-1.5430805428404715945e0, -4.0575816248662194348e-4)}, + {FN (cos), ARG(9.42443269378637893396e+00,-1.0e+00), RES(-1.5430805428404715945e0, 4.0575816248662194348e-4)}, + {FN (cos), ARG(-9.42443269378637893396e+00,1.0e+00), RES(-1.5430805428404715945e0, 4.0575816248662194348e-4)}, + {FN (cos), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(-1.5430805428404715945e0, -4.0575816248662194348e-4)}, + {FN (cos), ARG(9.42443269378637893396e+00,2.0e+00), RES(-3.7621954668392959453e0, -1.2522351259026468452e-3)}, + {FN (cos), ARG(9.42443269378637893396e+00,-2.0e+00), RES(-3.7621954668392959453e0, 1.2522351259026468452e-3)}, + {FN (cos), ARG(-9.42443269378637893396e+00,2.0e+00), RES(-3.7621954668392959453e0, 1.2522351259026468452e-3)}, + {FN (cos), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(-3.7621954668392959453e0, -1.2522351259026468452e-3)}, + {FN (cos), ARG(9.42512322775237976202e+00,0.0e+00), RES(-9.9999994039535581714e-1, 0.0)}, + {FN (cos), ARG(-9.42512322775237976202e+00,0.0e+00), RES(-9.9999994039535581714e-1, 0.0)}, + {FN (cos), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(-9.9999994039536292257e-1, 4.1159030931020840323e-11)}, + {FN (cos), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-9.9999994039536292257e-1, -4.1159030931020840323e-11)}, + {FN (cos), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(-9.9999994039536292257e-1, -4.1159030931020840323e-11)}, + {FN (cos), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-9.9999994039536292257e-1, 4.1159030931020840323e-11)}, + {FN (cos), ARG(9.42512322775237976202e+00,5.0e-01), RES(-1.1276258979946363577e0, 1.7991700040868409591e-4)}, + {FN (cos), ARG(9.42512322775237976202e+00,-5.0e-01), RES(-1.1276258979946363577e0, -1.7991700040868409591e-4)}, + {FN (cos), ARG(-9.42512322775237976202e+00,5.0e-01), RES(-1.1276258979946363577e0, -1.7991700040868409591e-4)}, + {FN (cos), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(-1.1276258979946363577e0, 1.7991700040868409591e-4)}, + {FN (cos), ARG(9.42512322775237976202e+00,1.0e+00), RES(-1.5430805428404715949e0, 4.0575816248575841970e-4)}, + {FN (cos), ARG(9.42512322775237976202e+00,-1.0e+00), RES(-1.5430805428404715949e0, -4.0575816248575841970e-4)}, + {FN (cos), ARG(-9.42512322775237976202e+00,1.0e+00), RES(-1.5430805428404715949e0, -4.0575816248575841970e-4)}, + {FN (cos), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(-1.5430805428404715949e0, 4.0575816248575841970e-4)}, + {FN (cos), ARG(9.42512322775237976202e+00,2.0e+00), RES(-3.7621954668392959462e0, 1.2522351258999818715e-3)}, + {FN (cos), ARG(9.42512322775237976202e+00,-2.0e+00), RES(-3.7621954668392959462e0, -1.2522351258999818715e-3)}, + {FN (cos), ARG(-9.42512322775237976202e+00,2.0e+00), RES(-3.7621954668392959462e0, -1.2522351258999818715e-3)}, + {FN (cos), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(-3.7621954668392959462e0, 1.2522351258999818715e-3)}, + {FN (tan), ARG(-3.45266983001243932001e-04,0.0e+00), RES(-3.4526699672092183585e-4, 0.0)}, + {FN (tan), ARG(3.45266983001243932001e-04,0.0e+00), RES(3.4526699672092183585e-4, 0.0)}, + {FN (tan), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(-3.4526699672091692931e-4, 1.1920930376163652989e-7)}, + {FN (tan), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(-3.4526699672091692931e-4, -1.1920930376163652989e-7)}, + {FN (tan), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(3.4526699672091692931e-4, 1.1920930376163652989e-7)}, + {FN (tan), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(3.4526699672091692931e-4, -1.1920930376163652989e-7)}, + {FN (tan), ARG(-3.45266983001243932001e-04,5.0e-01), RES(-2.7153443992655805934e-4, 4.6211720058436229979e-1)}, + {FN (tan), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(-2.7153443992655805934e-4, -4.6211720058436229979e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,5.0e-01), RES(2.7153443992655805934e-4, 4.6211720058436229979e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,-5.0e-01), RES(2.7153443992655805934e-4, -4.6211720058436229979e-1)}, + {FN (tan), ARG(-3.45266983001243932001e-04,1.0e+00), RES(-1.4500326960274960880e-4, 7.6159419408485704836e-1)}, + {FN (tan), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(-1.4500326960274960880e-4, -7.6159419408485704836e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,1.0e+00), RES(1.4500326960274960880e-4, 7.6159419408485704836e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,-1.0e+00), RES(1.4500326960274960880e-4, -7.6159419408485704836e-1)}, + {FN (tan), ARG(-3.45266983001243932001e-04,2.0e+00), RES(-2.4393395410435306874e-5, 9.6402758819508310556e-1)}, + {FN (tan), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(-2.4393395410435306874e-5, -9.6402758819508310556e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,2.0e+00), RES(2.4393395410435306874e-5, 9.6402758819508310556e-1)}, + {FN (tan), ARG(3.45266983001243932001e-04,-2.0e+00), RES(2.4393395410435306874e-5, -9.6402758819508310556e-1)}, + {FN (tan), ARG(1.57045105981189525579e+00,0.0e+00), RES(2.8963092606501007060e3, 0.0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,0.0e+00), RES(-2.8963092606501007060e3, 0.0)}, + {FN (tan), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(2.8963089153831588642e3, 9.9999992052646305569e-1)}, + {FN (tan), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(2.8963089153831588642e3, -9.9999992052646305569e-1)}, + {FN (tan), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(-2.8963089153831588642e3, 9.9999992052646305569e-1)}, + {FN (tan), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(-2.8963089153831588642e3, -9.9999992052646305569e-1)}, + {FN (tan), ARG(1.57045105981189525579e+00,5.0e-01), RES(1.2715121175455623363e-3, 2.1639524637389325996e0)}, + {FN (tan), ARG(1.57045105981189525579e+00,-5.0e-01), RES(1.2715121175455623363e-3, -2.1639524637389325996e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,5.0e-01), RES(-1.2715121175455623363e-3, 2.1639524637389325996e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(-1.2715121175455623363e-3, -2.1639524637389325996e0)}, + {FN (tan), ARG(1.57045105981189525579e+00,1.0e+00), RES(2.4999454374276273814e-4, 1.3130351721648674823e0)}, + {FN (tan), ARG(1.57045105981189525579e+00,-1.0e+00), RES(2.4999454374276273814e-4, -1.3130351721648674823e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,1.0e+00), RES(-2.4999454374276273814e-4, 1.3130351721648674823e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(-2.4999454374276273814e-4, -1.3130351721648674823e0)}, + {FN (tan), ARG(1.57045105981189525579e+00,2.0e+00), RES(2.6247825506572821595e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(1.57045105981189525579e+00,-2.0e+00), RES(2.6247825506572821595e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,2.0e+00), RES(-2.6247825506572821595e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(-2.6247825506572821595e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,0.0e+00), RES(-2.8963092606511280143e3, 0.0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,0.0e+00), RES(2.8963092606511280143e3, 0.0)}, + {FN (tan), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(-2.8963089153841861720e3, 9.9999992052717244672e-1)}, + {FN (tan), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-2.8963089153841861720e3, -9.9999992052717244672e-1)}, + {FN (tan), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(2.8963089153841861720e3, 9.9999992052717244672e-1)}, + {FN (tan), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(2.8963089153841861720e3, -9.9999992052717244672e-1)}, + {FN (tan), ARG(1.57114159377789786021e+00,5.0e-01), RES(-1.2715121175451113370e-3, 2.1639524637389326002e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,-5.0e-01), RES(-1.2715121175451113370e-3, -2.1639524637389326002e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,5.0e-01), RES(1.2715121175451113370e-3, 2.1639524637389326002e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(1.2715121175451113370e-3, -2.1639524637389326002e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,1.0e+00), RES(-2.4999454374267406620e-4, 1.3130351721648674824e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,-1.0e+00), RES(-2.4999454374267406620e-4, -1.3130351721648674824e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,1.0e+00), RES(2.4999454374267406620e-4, 1.3130351721648674824e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(2.4999454374267406620e-4, -1.3130351721648674824e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,2.0e+00), RES(-2.6247825506563511609e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(1.57114159377789786021e+00,-2.0e+00), RES(-2.6247825506563511609e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,2.0e+00), RES(2.6247825506563511609e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(2.6247825506563511609e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(3.14124738660679181379e+00,0.0e+00), RES(-3.4526699672110257641e-4, 0.0)}, + {FN (tan), ARG(-3.14124738660679181379e+00,0.0e+00), RES(3.4526699672110257641e-4, 0.0)}, + {FN (tan), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(-3.4526699672109766987e-4, 1.1920930376163652991e-7)}, + {FN (tan), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-3.4526699672109766987e-4, -1.1920930376163652991e-7)}, + {FN (tan), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(3.4526699672109766987e-4, 1.1920930376163652991e-7)}, + {FN (tan), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(3.4526699672109766987e-4, -1.1920930376163652991e-7)}, + {FN (tan), ARG(3.14124738660679181379e+00,5.0e-01), RES(-2.7153443992670020234e-4, 4.6211720058436229984e-1)}, + {FN (tan), ARG(3.14124738660679181379e+00,-5.0e-01), RES(-2.7153443992670020234e-4, -4.6211720058436229984e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,5.0e-01), RES(2.7153443992670020234e-4, 4.6211720058436229984e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(2.7153443992670020234e-4, -4.6211720058436229984e-1)}, + {FN (tan), ARG(3.14124738660679181379e+00,1.0e+00), RES(-1.4500326960282551519e-4, 7.6159419408485704840e-1)}, + {FN (tan), ARG(3.14124738660679181379e+00,-1.0e+00), RES(-1.4500326960282551519e-4, -7.6159419408485704840e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,1.0e+00), RES(1.4500326960282551519e-4, 7.6159419408485704840e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(1.4500326960282551519e-4, -7.6159419408485704840e-1)}, + {FN (tan), ARG(3.14124738660679181379e+00,2.0e+00), RES(-2.4393395410448076340e-5, 9.6402758819508310557e-1)}, + {FN (tan), ARG(3.14124738660679181379e+00,-2.0e+00), RES(-2.4393395410448076340e-5, -9.6402758819508310557e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,2.0e+00), RES(2.4393395410448076340e-5, 9.6402758819508310557e-1)}, + {FN (tan), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(2.4393395410448076340e-5, -9.6402758819508310557e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,0.0e+00), RES(3.4526699672085764703e-4, 0.0)}, + {FN (tan), ARG(-3.14193792057279441821e+00,0.0e+00), RES(-3.4526699672085764703e-4, 0.0)}, + {FN (tan), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(3.4526699672085274049e-4, 1.1920930376163652989e-7)}, + {FN (tan), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(3.4526699672085274049e-4, -1.1920930376163652989e-7)}, + {FN (tan), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(-3.4526699672085274049e-4, 1.1920930376163652989e-7)}, + {FN (tan), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-3.4526699672085274049e-4, -1.1920930376163652989e-7)}, + {FN (tan), ARG(3.14193792057279441821e+00,5.0e-01), RES(2.7153443992650757820e-4, 4.6211720058436229978e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,-5.0e-01), RES(2.7153443992650757820e-4, -4.6211720058436229978e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,5.0e-01), RES(-2.7153443992650757820e-4, 4.6211720058436229978e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(-2.7153443992650757820e-4, -4.6211720058436229978e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,1.0e+00), RES(1.4500326960272265115e-4, 7.6159419408485704835e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,-1.0e+00), RES(1.4500326960272265115e-4, -7.6159419408485704835e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,1.0e+00), RES(-1.4500326960272265115e-4, 7.6159419408485704835e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(-1.4500326960272265115e-4, -7.6159419408485704835e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,2.0e+00), RES(2.4393395410430771882e-5, 9.6402758819508310556e-1)}, + {FN (tan), ARG(3.14193792057279441821e+00,-2.0e+00), RES(2.4393395410430771882e-5, -9.6402758819508310556e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,2.0e+00), RES(-2.4393395410430771882e-5, 9.6402758819508310556e-1)}, + {FN (tan), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(-2.4393395410430771882e-5, -9.6402758819508310556e-1)}, + {FN (tan), ARG(4.71204371340168837179e+00,0.0e+00), RES(2.8963092606490733978e3, 0.0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,0.0e+00), RES(-2.8963092606490733978e3, 0.0)}, + {FN (tan), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(2.8963089153821315563e3, 9.9999992052575366466e-1)}, + {FN (tan), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(2.8963089153821315563e3, -9.9999992052575366466e-1)}, + {FN (tan), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(-2.8963089153821315563e3, 9.9999992052575366466e-1)}, + {FN (tan), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-2.8963089153821315563e3, -9.9999992052575366466e-1)}, + {FN (tan), ARG(4.71204371340168837179e+00,5.0e-01), RES(1.2715121175460133355e-3, 2.1639524637389325989e0)}, + {FN (tan), ARG(4.71204371340168837179e+00,-5.0e-01), RES(1.2715121175460133355e-3, -2.1639524637389325989e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,5.0e-01), RES(-1.2715121175460133355e-3, 2.1639524637389325989e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(-1.2715121175460133355e-3, -2.1639524637389325989e0)}, + {FN (tan), ARG(4.71204371340168837179e+00,1.0e+00), RES(2.4999454374285141007e-4, 1.3130351721648674822e0)}, + {FN (tan), ARG(4.71204371340168837179e+00,-1.0e+00), RES(2.4999454374285141007e-4, -1.3130351721648674822e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,1.0e+00), RES(-2.4999454374285141007e-4, 1.3130351721648674822e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(-2.4999454374285141007e-4, -1.3130351721648674822e0)}, + {FN (tan), ARG(4.71204371340168837179e+00,2.0e+00), RES(2.6247825506582131582e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(4.71204371340168837179e+00,-2.0e+00), RES(2.6247825506582131582e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,2.0e+00), RES(-2.6247825506582131582e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(-2.6247825506582131582e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,0.0e+00), RES(-2.8963092606521553225e3, 0.0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,0.0e+00), RES(2.8963092606521553225e3, 0.0)}, + {FN (tan), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(-2.8963089153852134799e3, 9.9999992052788183776e-1)}, + {FN (tan), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(-2.8963089153852134799e3, -9.9999992052788183776e-1)}, + {FN (tan), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(2.8963089153852134799e3, 9.9999992052788183776e-1)}, + {FN (tan), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(2.8963089153852134799e3, -9.9999992052788183776e-1)}, + {FN (tan), ARG(4.71273424736769097620e+00,5.0e-01), RES(-1.2715121175446603377e-3, 2.1639524637389326009e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,-5.0e-01), RES(-1.2715121175446603377e-3, -2.1639524637389326009e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,5.0e-01), RES(1.2715121175446603377e-3, 2.1639524637389326009e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(1.2715121175446603377e-3, -2.1639524637389326009e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,1.0e+00), RES(-2.4999454374258539427e-4, 1.3130351721648674825e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,-1.0e+00), RES(-2.4999454374258539427e-4, -1.3130351721648674825e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,1.0e+00), RES(2.4999454374258539427e-4, 1.3130351721648674825e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(2.4999454374258539427e-4, -1.3130351721648674825e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,2.0e+00), RES(-2.6247825506554201622e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(4.71273424736769097620e+00,-2.0e+00), RES(-2.6247825506554201622e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,2.0e+00), RES(2.6247825506554201622e-5, 1.0373147113268752620e0)}, + {FN (tan), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(2.6247825506554201622e-5, -1.0373147113268752620e0)}, + {FN (tan), ARG(6.28284004019658492979e+00,0.0e+00), RES(-3.4526699672122504111e-4, 0.0)}, + {FN (tan), ARG(-6.28284004019658492979e+00,0.0e+00), RES(3.4526699672122504111e-4, 0.0)}, + {FN (tan), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(-3.4526699672122013457e-4, 1.1920930376163652992e-7)}, + {FN (tan), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(-3.4526699672122013457e-4, -1.1920930376163652992e-7)}, + {FN (tan), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(3.4526699672122013457e-4, 1.1920930376163652992e-7)}, + {FN (tan), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(3.4526699672122013457e-4, -1.1920930376163652992e-7)}, + {FN (tan), ARG(6.28284004019658492979e+00,5.0e-01), RES(-2.7153443992679651442e-4, 4.6211720058436229987e-1)}, + {FN (tan), ARG(6.28284004019658492979e+00,-5.0e-01), RES(-2.7153443992679651442e-4, -4.6211720058436229987e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,5.0e-01), RES(2.7153443992679651442e-4, 4.6211720058436229987e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(2.7153443992679651442e-4, -4.6211720058436229987e-1)}, + {FN (tan), ARG(6.28284004019658492979e+00,1.0e+00), RES(-1.4500326960287694721e-4, 7.6159419408485704843e-1)}, + {FN (tan), ARG(6.28284004019658492979e+00,-1.0e+00), RES(-1.4500326960287694721e-4, -7.6159419408485704843e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,1.0e+00), RES(1.4500326960287694721e-4, 7.6159419408485704843e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(1.4500326960287694721e-4, -7.6159419408485704843e-1)}, + {FN (tan), ARG(6.28284004019658492979e+00,2.0e+00), RES(-2.4393395410456728569e-5, 9.6402758819508310558e-1)}, + {FN (tan), ARG(6.28284004019658492979e+00,-2.0e+00), RES(-2.4393395410456728569e-5, -9.6402758819508310558e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,2.0e+00), RES(2.4393395410456728569e-5, 9.6402758819508310558e-1)}, + {FN (tan), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(2.4393395410456728569e-5, -9.6402758819508310558e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,0.0e+00), RES(3.4526699672073518233e-4, 0.0)}, + {FN (tan), ARG(-6.28353057416258753420e+00,0.0e+00), RES(-3.4526699672073518233e-4, 0.0)}, + {FN (tan), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(3.4526699672073027579e-4, 1.1920930376163652988e-7)}, + {FN (tan), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(3.4526699672073027579e-4, -1.1920930376163652988e-7)}, + {FN (tan), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(-3.4526699672073027579e-4, 1.1920930376163652988e-7)}, + {FN (tan), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(-3.4526699672073027579e-4, -1.1920930376163652988e-7)}, + {FN (tan), ARG(6.28353057416258753420e+00,5.0e-01), RES(2.7153443992641126612e-4, 4.6211720058436229974e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,-5.0e-01), RES(2.7153443992641126612e-4, -4.6211720058436229974e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,5.0e-01), RES(-2.7153443992641126612e-4, 4.6211720058436229974e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(-2.7153443992641126612e-4, -4.6211720058436229974e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,1.0e+00), RES(1.4500326960267121913e-4, 7.6159419408485704832e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,-1.0e+00), RES(1.4500326960267121913e-4, -7.6159419408485704832e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,1.0e+00), RES(-1.4500326960267121913e-4, 7.6159419408485704832e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(-1.4500326960267121913e-4, -7.6159419408485704832e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,2.0e+00), RES(2.4393395410422119654e-5, 9.6402758819508310555e-1)}, + {FN (tan), ARG(6.28353057416258753420e+00,-2.0e+00), RES(2.4393395410422119654e-5, -9.6402758819508310555e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,2.0e+00), RES(-2.4393395410422119654e-5, 9.6402758819508310555e-1)}, + {FN (tan), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(-2.4393395410422119654e-5, -9.6402758819508310555e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,0.0e+00), RES(-3.4526699672045932728e-4, 0.0)}, + {FN (tan), ARG(-9.42443269378637893396e+00,0.0e+00), RES(3.4526699672045932728e-4, 0.0)}, + {FN (tan), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(-3.4526699672045442074e-4, 1.1920930376163652985e-7)}, + {FN (tan), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-3.4526699672045442074e-4, -1.1920930376163652985e-7)}, + {FN (tan), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(3.4526699672045442074e-4, 1.1920930376163652985e-7)}, + {FN (tan), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(3.4526699672045442074e-4, -1.1920930376163652985e-7)}, + {FN (tan), ARG(9.42443269378637893396e+00,5.0e-01), RES(-2.7153443992619432056e-4, 4.6211720058436229968e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,-5.0e-01), RES(-2.7153443992619432056e-4, -4.6211720058436229968e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,5.0e-01), RES(2.7153443992619432056e-4, 4.6211720058436229968e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(2.7153443992619432056e-4, -4.6211720058436229968e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,1.0e+00), RES(-1.4500326960255536711e-4, 7.6159419408485704826e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,-1.0e+00), RES(-1.4500326960255536711e-4, -7.6159419408485704826e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,1.0e+00), RES(1.4500326960255536711e-4, 7.6159419408485704826e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(1.4500326960255536711e-4, -7.6159419408485704826e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,2.0e+00), RES(-2.4393395410402630273e-5, 9.6402758819508310554e-1)}, + {FN (tan), ARG(9.42443269378637893396e+00,-2.0e+00), RES(-2.4393395410402630273e-5, -9.6402758819508310554e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,2.0e+00), RES(2.4393395410402630273e-5, 9.6402758819508310554e-1)}, + {FN (tan), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(2.4393395410402630273e-5, -9.6402758819508310554e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,0.0e+00), RES(3.4526699671972453911e-4, 0.0)}, + {FN (tan), ARG(-9.42512322775237976202e+00,0.0e+00), RES(-3.4526699671972453911e-4, 0.0)}, + {FN (tan), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(3.4526699671971963257e-4, 1.1920930376163652979e-7)}, + {FN (tan), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(3.4526699671971963257e-4, -1.1920930376163652979e-7)}, + {FN (tan), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(-3.4526699671971963257e-4, 1.1920930376163652979e-7)}, + {FN (tan), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-3.4526699671971963257e-4, -1.1920930376163652979e-7)}, + {FN (tan), ARG(9.42512322775237976202e+00,5.0e-01), RES(2.7153443992561644811e-4, 4.6211720058436229949e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,-5.0e-01), RES(2.7153443992561644811e-4, -4.6211720058436229949e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,5.0e-01), RES(-2.7153443992561644811e-4, 4.6211720058436229949e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(-2.7153443992561644811e-4, -4.6211720058436229949e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,1.0e+00), RES(1.450032696022467750e-4, 7.6159419408485704810e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,-1.0e+00), RES(1.450032696022467750e-4, -7.6159419408485704810e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,1.0e+00), RES(-1.450032696022467750e-4, 7.6159419408485704810e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(-1.450032696022467750e-4, -7.6159419408485704810e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,2.0e+00), RES(2.439339541035071690e-5, 9.6402758819508310550e-1)}, + {FN (tan), ARG(9.42512322775237976202e+00,-2.0e+00), RES(2.439339541035071690e-5, -9.6402758819508310550e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,2.0e+00), RES(-2.439339541035071690e-5, 9.6402758819508310550e-1)}, + {FN (tan), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(-2.439339541035071690e-5, -9.6402758819508310550e-1)}, + {FN (arcsin), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arcsin), ARG(0.0e+00,1.19209289550781250e-07), RES(0, 1.1920928955078096766e-7)}, + {FN (arcsin), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, -1.1920928955078096766e-7)}, + {FN (arcsin), ARG(0.0e+00,5.0e-01), RES(0, 4.8121182505960344750e-1)}, + {FN (arcsin), ARG(0.0e+00,-5.0e-01), RES(0, -4.8121182505960344750e-1)}, + {FN (arcsin), ARG(0.0e+00,1.0e+00), RES(0, 8.8137358701954302523e-1)}, + {FN (arcsin), ARG(0.0e+00,-1.0e+00), RES(0, -8.8137358701954302523e-1)}, + {FN (arcsin), ARG(0.0e+00,2.0e+00), RES(0, 1.4436354751788103425e0)}, + {FN (arcsin), ARG(0.0e+00,-2.0e+00), RES(0, -1.4436354751788103425e0)}, + {FN (arcsin), ARG(0.0e+00,8.3886080e+06), RES(0, 1.6635532333438690979e1)}, + {FN (arcsin), ARG(0.0e+00,-8.3886080e+06), RES(0, -1.6635532333438690979e1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078153234e-7, 0.0)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.1920928955078153234e-7, 0.0)}, + {FN (arcsin), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078068531e-7, 1.1920928955078181469e-7)}, + {FN (arcsin), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078068531e-7, -1.1920928955078181469e-7)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.1920928955078068531e-7, 1.1920928955078181469e-7)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.1920928955078068531e-7, -1.1920928955078181469e-7)}, + {FN (arcsin), ARG(1.19209289550781250e-07,5.0e-01), RES(1.0662402999400097805e-7, 4.8121182505960598961e-1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.0662402999400097805e-7, -4.8121182505960598961e-1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,5.0e-01), RES(-1.0662402999400097805e-7, 4.8121182505960598961e-1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.0662402999400097805e-7, -4.8121182505960598961e-1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,1.0e+00), RES(8.4293697021788013662e-8, 8.8137358701954553738e-1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,-1.0e+00), RES(8.4293697021788013662e-8, -8.8137358701954553738e-1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,1.0e+00), RES(-8.4293697021788013662e-8, 8.8137358701954553738e-1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-8.4293697021788013662e-8, -8.8137358701954553738e-1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,2.0e+00), RES(5.3312014997000413263e-8, 1.4436354751788116136e0)}, + {FN (arcsin), ARG(1.19209289550781250e-07,-2.0e+00), RES(5.3312014997000413263e-8, -1.4436354751788116136e0)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,2.0e+00), RES(-5.3312014997000413263e-8, 1.4436354751788116136e0)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-5.3312014997000413263e-8, -1.4436354751788116136e0)}, + {FN (arcsin), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.4210854715201902743e-14, 1.6635532333438690979e1)}, + {FN (arcsin), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.4210854715201902743e-14, -1.6635532333438690979e1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.4210854715201902743e-14, 1.6635532333438690979e1)}, + {FN (arcsin), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.4210854715201902743e-14, -1.6635532333438690979e1)}, + {FN (arcsin), ARG(5.0e-01,0.0e+00), RES(5.2359877559829887308e-1, 0.0)}, + {FN (arcsin), ARG(-5.0e-01,0.0e+00), RES(-5.2359877559829887308e-1, 0.0)}, + {FN (arcsin), ARG(5.0e-01,1.19209289550781250e-07), RES(5.2359877559829340332e-1, 1.3765103082409432364e-7)}, + {FN (arcsin), ARG(5.0e-01,-1.19209289550781250e-07), RES(5.2359877559829340332e-1, -1.3765103082409432364e-7)}, + {FN (arcsin), ARG(-5.0e-01,1.19209289550781250e-07), RES(-5.2359877559829340332e-1, 1.3765103082409432364e-7)}, + {FN (arcsin), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-5.2359877559829340332e-1, -1.3765103082409432364e-7)}, + {FN (arcsin), ARG(5.0e-01,5.0e-01), RES(4.5227844715119068206e-1, 5.3063753095251782602e-1)}, + {FN (arcsin), ARG(5.0e-01,-5.0e-01), RES(4.5227844715119068206e-1, -5.3063753095251782602e-1)}, + {FN (arcsin), ARG(-5.0e-01,5.0e-01), RES(-4.5227844715119068206e-1, 5.3063753095251782602e-1)}, + {FN (arcsin), ARG(-5.0e-01,-5.0e-01), RES(-4.5227844715119068206e-1, -5.3063753095251782602e-1)}, + {FN (arcsin), ARG(5.0e-01,1.0e+00), RES(3.4943906285721329363e-1, 9.2613303135018242455e-1)}, + {FN (arcsin), ARG(5.0e-01,-1.0e+00), RES(3.4943906285721329363e-1, -9.2613303135018242455e-1)}, + {FN (arcsin), ARG(-5.0e-01,1.0e+00), RES(-3.4943906285721329363e-1, 9.2613303135018242455e-1)}, + {FN (arcsin), ARG(-5.0e-01,-1.0e+00), RES(-3.4943906285721329363e-1, -9.2613303135018242455e-1)}, + {FN (arcsin), ARG(5.0e-01,2.0e+00), RES(2.2101863562288385890e-1, 1.4657153519472905218e0)}, + {FN (arcsin), ARG(5.0e-01,-2.0e+00), RES(2.2101863562288385890e-1, -1.4657153519472905218e0)}, + {FN (arcsin), ARG(-5.0e-01,2.0e+00), RES(-2.2101863562288385890e-1, 1.4657153519472905218e0)}, + {FN (arcsin), ARG(-5.0e-01,-2.0e+00), RES(-2.2101863562288385890e-1, -1.4657153519472905218e0)}, + {FN (arcsin), ARG(5.0e-01,8.3886080e+06), RES(5.9604644775390130897e-8, 1.6635532333438692755e1)}, + {FN (arcsin), ARG(5.0e-01,-8.3886080e+06), RES(5.9604644775390130897e-8, -1.6635532333438692755e1)}, + {FN (arcsin), ARG(-5.0e-01,8.3886080e+06), RES(-5.9604644775390130897e-8, 1.6635532333438692755e1)}, + {FN (arcsin), ARG(-5.0e-01,-8.3886080e+06), RES(-5.9604644775390130897e-8, -1.6635532333438692755e1)}, + {FN (arcsin), ARG(1.0e+00,0.0e+00), RES(1.5707963267948966192e0, 0.0)}, + {FN (arcsin), ARG(-1.0e+00,0.0e+00), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arcsin), ARG(1.0e+00,1.19209289550781250e-07), RES(1.5704510598153252947e0, 3.4526698643116312881e-4)}, + {FN (arcsin), ARG(1.0e+00,-1.19209289550781250e-07), RES(1.5704510598153252947e0, -3.4526698643116312881e-4)}, + {FN (arcsin), ARG(-1.0e+00,1.19209289550781250e-07), RES(-1.5704510598153252947e0, 3.4526698643116312881e-4)}, + {FN (arcsin), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-1.5704510598153252947e0, -3.4526698643116312881e-4)}, + {FN (arcsin), ARG(1.0e+00,5.0e-01), RES(8.9590748120889023907e-1, 7.3285767597364526089e-1)}, + {FN (arcsin), ARG(1.0e+00,-5.0e-01), RES(8.9590748120889023907e-1, -7.3285767597364526089e-1)}, + {FN (arcsin), ARG(-1.0e+00,5.0e-01), RES(-8.9590748120889023907e-1, 7.3285767597364526089e-1)}, + {FN (arcsin), ARG(-1.0e+00,-5.0e-01), RES(-8.9590748120889023907e-1, -7.3285767597364526089e-1)}, + {FN (arcsin), ARG(1.0e+00,1.0e+00), RES(6.6623943249251525510e-1, 1.0612750619050356520e0)}, + {FN (arcsin), ARG(1.0e+00,-1.0e+00), RES(6.6623943249251525510e-1, -1.0612750619050356520e0)}, + {FN (arcsin), ARG(-1.0e+00,1.0e+00), RES(-6.6623943249251525510e-1, 1.0612750619050356520e0)}, + {FN (arcsin), ARG(-1.0e+00,-1.0e+00), RES(-6.6623943249251525510e-1, -1.0612750619050356520e0)}, + {FN (arcsin), ARG(1.0e+00,2.0e+00), RES(4.2707858639247612548e-1, 1.5285709194809981613e0)}, + {FN (arcsin), ARG(1.0e+00,-2.0e+00), RES(4.2707858639247612548e-1, -1.5285709194809981613e0)}, + {FN (arcsin), ARG(-1.0e+00,2.0e+00), RES(-4.2707858639247612548e-1, 1.5285709194809981613e0)}, + {FN (arcsin), ARG(-1.0e+00,-2.0e+00), RES(-4.2707858639247612548e-1, -1.5285709194809981613e0)}, + {FN (arcsin), ARG(1.0e+00,8.3886080e+06), RES(1.1920928955077983828e-7, 1.6635532333438698084e1)}, + {FN (arcsin), ARG(1.0e+00,-8.3886080e+06), RES(1.1920928955077983828e-7, -1.6635532333438698084e1)}, + {FN (arcsin), ARG(-1.0e+00,8.3886080e+06), RES(-1.1920928955077983828e-7, 1.6635532333438698084e1)}, + {FN (arcsin), ARG(-1.0e+00,-8.3886080e+06), RES(-1.1920928955077983828e-7, -1.6635532333438698084e1)}, + {FN (arcsin), ARG(2.0e+00,0.0e+00), RES(1.5707963267948966192e0, -1.3169578969248167086e0)}, + {FN (arcsin), ARG(-2.0e+00,0.0e+00), RES(-1.5707963267948966192e0, 1.3169578969248167086e0)}, + {FN (arcsin), ARG(2.0e+00,1.19209289550781250e-07), RES(1.5707962579693812072e0, 1.3169578969248194435e0)}, + {FN (arcsin), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.5707962579693812072e0, -1.3169578969248194435e0)}, + {FN (arcsin), ARG(-2.0e+00,1.19209289550781250e-07), RES(-1.5707962579693812072e0, 1.3169578969248194435e0)}, + {FN (arcsin), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-1.5707962579693812072e0, -1.3169578969248194435e0)}, + {FN (arcsin), ARG(2.0e+00,5.0e-01), RES(1.2930420702371826591e0, 1.3618009008578457882e0)}, + {FN (arcsin), ARG(2.0e+00,-5.0e-01), RES(1.2930420702371826591e0, -1.3618009008578457882e0)}, + {FN (arcsin), ARG(-2.0e+00,5.0e-01), RES(-1.2930420702371826591e0, 1.3618009008578457882e0)}, + {FN (arcsin), ARG(-2.0e+00,-5.0e-01), RES(-1.2930420702371826591e0, -1.3618009008578457882e0)}, + {FN (arcsin), ARG(2.0e+00,1.0e+00), RES(1.0634400235777520562e0, 1.4693517443681852733e0)}, + {FN (arcsin), ARG(2.0e+00,-1.0e+00), RES(1.0634400235777520562e0, -1.4693517443681852733e0)}, + {FN (arcsin), ARG(-2.0e+00,1.0e+00), RES(-1.0634400235777520562e0, 1.4693517443681852733e0)}, + {FN (arcsin), ARG(-2.0e+00,-1.0e+00), RES(-1.0634400235777520562e0, -1.4693517443681852733e0)}, + {FN (arcsin), ARG(2.0e+00,2.0e+00), RES(7.5424914469804604071e-1, 1.7343245214879664480e0)}, + {FN (arcsin), ARG(2.0e+00,-2.0e+00), RES(7.5424914469804604071e-1, -1.7343245214879664480e0)}, + {FN (arcsin), ARG(-2.0e+00,2.0e+00), RES(-7.5424914469804604071e-1, 1.7343245214879664480e0)}, + {FN (arcsin), ARG(-2.0e+00,-2.0e+00), RES(-7.5424914469804604071e-1, -1.7343245214879664480e0)}, + {FN (arcsin), ARG(2.0e+00,8.3886080e+06), RES(2.3841857910155628843e-7, 1.663553233343871940e1)}, + {FN (arcsin), ARG(2.0e+00,-8.3886080e+06), RES(2.3841857910155628843e-7, -1.663553233343871940e1)}, + {FN (arcsin), ARG(-2.0e+00,8.3886080e+06), RES(-2.3841857910155628843e-7, 1.663553233343871940e1)}, + {FN (arcsin), ARG(-2.0e+00,-8.3886080e+06), RES(-2.3841857910155628843e-7, -1.663553233343871940e1)}, + {FN (arcsin), ARG(8.3886080e+06,0.0e+00), RES(1.5707963267948966192e0, -1.6635532333438683873e1)}, + {FN (arcsin), ARG(-8.3886080e+06,0.0e+00), RES(-1.5707963267948966192e0, 1.6635532333438683873e1)}, + {FN (arcsin), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5707963267948824084e0, 1.6635532333438683873e1)}, + {FN (arcsin), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5707963267948824084e0, -1.6635532333438683873e1)}, + {FN (arcsin), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.5707963267948824084e0, 1.6635532333438683873e1)}, + {FN (arcsin), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.5707963267948824084e0, -1.6635532333438683873e1)}, + {FN (arcsin), ARG(8.3886080e+06,5.0e-01), RES(1.5707962671902518438e0, 1.6635532333438685650e1)}, + {FN (arcsin), ARG(8.3886080e+06,-5.0e-01), RES(1.5707962671902518438e0, -1.6635532333438685650e1)}, + {FN (arcsin), ARG(-8.3886080e+06,5.0e-01), RES(-1.5707962671902518438e0, 1.6635532333438685650e1)}, + {FN (arcsin), ARG(-8.3886080e+06,-5.0e-01), RES(-1.5707962671902518438e0, -1.6635532333438685650e1)}, + {FN (arcsin), ARG(8.3886080e+06,1.0e+00), RES(1.5707962075856070684e0, 1.6635532333438690979e1)}, + {FN (arcsin), ARG(8.3886080e+06,-1.0e+00), RES(1.5707962075856070684e0, -1.6635532333438690979e1)}, + {FN (arcsin), ARG(-8.3886080e+06,1.0e+00), RES(-1.5707962075856070684e0, 1.6635532333438690979e1)}, + {FN (arcsin), ARG(-8.3886080e+06,-1.0e+00), RES(-1.5707962075856070684e0, -1.6635532333438690979e1)}, + {FN (arcsin), ARG(8.3886080e+06,2.0e+00), RES(1.5707960883763175177e0, 1.6635532333438712295e1)}, + {FN (arcsin), ARG(8.3886080e+06,-2.0e+00), RES(1.5707960883763175177e0, -1.6635532333438712295e1)}, + {FN (arcsin), ARG(-8.3886080e+06,2.0e+00), RES(-1.5707960883763175177e0, 1.6635532333438712295e1)}, + {FN (arcsin), ARG(-8.3886080e+06,-2.0e+00), RES(-1.5707960883763175177e0, -1.6635532333438712295e1)}, + {FN (arcsin), ARG(8.3886080e+06,8.3886080e+06), RES(7.8539816339744653326e-1, 1.6982105923718660081e1)}, + {FN (arcsin), ARG(8.3886080e+06,-8.3886080e+06), RES(7.8539816339744653326e-1, -1.6982105923718660081e1)}, + {FN (arcsin), ARG(-8.3886080e+06,8.3886080e+06), RES(-7.8539816339744653326e-1, 1.6982105923718660081e1)}, + {FN (arcsin), ARG(-8.3886080e+06,-8.3886080e+06), RES(-7.8539816339744653326e-1, -1.6982105923718660081e1)}, + {FN (arccos), ARG(0.0e+00,0.0e+00), RES(1.5707963267948966192e0, 0.0)}, + {FN (arccos), ARG(0.0e+00,1.19209289550781250e-07), RES(1.5707963267948966192e0, -1.1920928955078096766e-7)}, + {FN (arccos), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.5707963267948966192e0, 1.1920928955078096766e-7)}, + {FN (arccos), ARG(0.0e+00,5.0e-01), RES(1.5707963267948966192e0, -4.8121182505960344750e-1)}, + {FN (arccos), ARG(0.0e+00,-5.0e-01), RES(1.5707963267948966192e0, 4.8121182505960344750e-1)}, + {FN (arccos), ARG(0.0e+00,1.0e+00), RES(1.5707963267948966192e0, -8.8137358701954302523e-1)}, + {FN (arccos), ARG(0.0e+00,-1.0e+00), RES(1.5707963267948966192e0, 8.8137358701954302523e-1)}, + {FN (arccos), ARG(0.0e+00,2.0e+00), RES(1.5707963267948966192e0, -1.4436354751788103425e0)}, + {FN (arccos), ARG(0.0e+00,-2.0e+00), RES(1.5707963267948966192e0, 1.4436354751788103425e0)}, + {FN (arccos), ARG(0.0e+00,8.3886080e+06), RES(1.5707963267948966192e0, -1.6635532333438690979e1)}, + {FN (arccos), ARG(0.0e+00,-8.3886080e+06), RES(1.5707963267948966192e0, 1.6635532333438690979e1)}, + {FN (arccos), ARG(1.19209289550781250e-07,0.0e+00), RES(1.5707962075856070684e0, 0.0)}, + {FN (arccos), ARG(-1.19209289550781250e-07,0.0e+00), RES(1.570796446004186170e0, 0.0)}, + {FN (arccos), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.5707962075856070685e0, -1.1920928955078181469e-7)}, + {FN (arccos), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.5707962075856070685e0, 1.1920928955078181469e-7)}, + {FN (arccos), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(1.570796446004186170e0, -1.1920928955078181469e-7)}, + {FN (arccos), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.570796446004186170e0, 1.1920928955078181469e-7)}, + {FN (arccos), ARG(1.19209289550781250e-07,5.0e-01), RES(1.5707962201708666252e0, -4.8121182505960598961e-1)}, + {FN (arccos), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.5707962201708666252e0, 4.8121182505960598961e-1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,5.0e-01), RES(1.5707964334189266132e0, -4.8121182505960598961e-1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,-5.0e-01), RES(1.5707964334189266132e0, 4.8121182505960598961e-1)}, + {FN (arccos), ARG(1.19209289550781250e-07,1.0e+00), RES(1.5707962425011995974e0, -8.8137358701954553738e-1)}, + {FN (arccos), ARG(1.19209289550781250e-07,-1.0e+00), RES(1.5707962425011995974e0, 8.8137358701954553738e-1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,1.0e+00), RES(1.5707964110885936410e0, -8.8137358701954553738e-1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,-1.0e+00), RES(1.5707964110885936410e0, 8.8137358701954553738e-1)}, + {FN (arccos), ARG(1.19209289550781250e-07,2.0e+00), RES(1.5707962734828816222e0, -1.4436354751788116136e0)}, + {FN (arccos), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.5707962734828816222e0, 1.4436354751788116136e0)}, + {FN (arccos), ARG(-1.19209289550781250e-07,2.0e+00), RES(1.5707963801069116162e0, -1.4436354751788116136e0)}, + {FN (arccos), ARG(-1.19209289550781250e-07,-2.0e+00), RES(1.5707963801069116162e0, 1.4436354751788116136e0)}, + {FN (arccos), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267948824084e0, -1.6635532333438690979e1)}, + {FN (arccos), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5707963267948824084e0, 1.6635532333438690979e1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267949108301e0, -1.6635532333438690979e1)}, + {FN (arccos), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5707963267949108301e0, 1.6635532333438690979e1)}, + {FN (arccos), ARG(5.0e-01,0.0e+00), RES(1.0471975511965977462e0, 0.0)}, + {FN (arccos), ARG(-5.0e-01,0.0e+00), RES(2.0943951023931954923e0, 0.0)}, + {FN (arccos), ARG(5.0e-01,1.19209289550781250e-07), RES(1.0471975511966032159e0, -1.3765103082409432364e-7)}, + {FN (arccos), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.0471975511966032159e0, 1.3765103082409432364e-7)}, + {FN (arccos), ARG(-5.0e-01,1.19209289550781250e-07), RES(2.0943951023931900225e0, -1.3765103082409432364e-7)}, + {FN (arccos), ARG(-5.0e-01,-1.19209289550781250e-07), RES(2.0943951023931900225e0, 1.3765103082409432364e-7)}, + {FN (arccos), ARG(5.0e-01,5.0e-01), RES(1.1185178796437059372e0, -5.3063753095251782602e-1)}, + {FN (arccos), ARG(5.0e-01,-5.0e-01), RES(1.1185178796437059372e0, 5.3063753095251782602e-1)}, + {FN (arccos), ARG(-5.0e-01,5.0e-01), RES(2.0230747739460873013e0, -5.3063753095251782602e-1)}, + {FN (arccos), ARG(-5.0e-01,-5.0e-01), RES(2.0230747739460873013e0, 5.3063753095251782602e-1)}, + {FN (arccos), ARG(5.0e-01,1.0e+00), RES(1.2213572639376833256e0, -9.2613303135018242455e-1)}, + {FN (arccos), ARG(5.0e-01,-1.0e+00), RES(1.2213572639376833256e0, 9.2613303135018242455e-1)}, + {FN (arccos), ARG(-5.0e-01,1.0e+00), RES(1.9202353896521099129e0, -9.2613303135018242455e-1)}, + {FN (arccos), ARG(-5.0e-01,-1.0e+00), RES(1.9202353896521099129e0, 9.2613303135018242455e-1)}, + {FN (arccos), ARG(5.0e-01,2.0e+00), RES(1.3497776911720127603e0, -1.4657153519472905218e0)}, + {FN (arccos), ARG(5.0e-01,-2.0e+00), RES(1.3497776911720127603e0, 1.4657153519472905218e0)}, + {FN (arccos), ARG(-5.0e-01,2.0e+00), RES(1.7918149624177804781e0, -1.4657153519472905218e0)}, + {FN (arccos), ARG(-5.0e-01,-2.0e+00), RES(1.7918149624177804781e0, 1.4657153519472905218e0)}, + {FN (arccos), ARG(5.0e-01,8.3886080e+06), RES(1.5707962671902518438e0, -1.6635532333438692755e1)}, + {FN (arccos), ARG(5.0e-01,-8.3886080e+06), RES(1.5707962671902518438e0, 1.6635532333438692755e1)}, + {FN (arccos), ARG(-5.0e-01,8.3886080e+06), RES(1.5707963863995413946e0, -1.6635532333438692755e1)}, + {FN (arccos), ARG(-5.0e-01,-8.3886080e+06), RES(1.5707963863995413946e0, 1.6635532333438692755e1)}, + {FN (arccos), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arccos), ARG(-1.0e+00,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arccos), ARG(1.0e+00,1.19209289550781250e-07), RES(3.4526697957132450399e-4, -3.4526698643116312881e-4)}, + {FN (arccos), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.4526697957132450399e-4, 3.4526698643116312881e-4)}, + {FN (arccos), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.1412473866102219140e0, -3.4526698643116312881e-4)}, + {FN (arccos), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.1412473866102219140e0, 3.4526698643116312881e-4)}, + {FN (arccos), ARG(1.0e+00,5.0e-01), RES(6.7488884558600638016e-1, -7.3285767597364526089e-1)}, + {FN (arccos), ARG(1.0e+00,-5.0e-01), RES(6.7488884558600638016e-1, 7.3285767597364526089e-1)}, + {FN (arccos), ARG(-1.0e+00,5.0e-01), RES(2.4667038080037868583e0, -7.3285767597364526089e-1)}, + {FN (arccos), ARG(-1.0e+00,-5.0e-01), RES(2.4667038080037868583e0, 7.3285767597364526089e-1)}, + {FN (arccos), ARG(1.0e+00,1.0e+00), RES(9.0455689430238136413e-1, -1.0612750619050356520e0)}, + {FN (arccos), ARG(1.0e+00,-1.0e+00), RES(9.0455689430238136413e-1, 1.0612750619050356520e0)}, + {FN (arccos), ARG(-1.0e+00,1.0e+00), RES(2.2370357592874118743e0, -1.0612750619050356520e0)}, + {FN (arccos), ARG(-1.0e+00,-1.0e+00), RES(2.2370357592874118743e0, 1.0612750619050356520e0)}, + {FN (arccos), ARG(1.0e+00,2.0e+00), RES(1.1437177404024204938e0, -1.5285709194809981613e0)}, + {FN (arccos), ARG(1.0e+00,-2.0e+00), RES(1.1437177404024204938e0, 1.5285709194809981613e0)}, + {FN (arccos), ARG(-1.0e+00,2.0e+00), RES(1.9978749131873727447e0, -1.5285709194809981613e0)}, + {FN (arccos), ARG(-1.0e+00,-2.0e+00), RES(1.9978749131873727447e0, 1.5285709194809981613e0)}, + {FN (arccos), ARG(1.0e+00,8.3886080e+06), RES(1.5707962075856070685e0, -1.6635532333438698084e1)}, + {FN (arccos), ARG(1.0e+00,-8.3886080e+06), RES(1.5707962075856070685e0, 1.6635532333438698084e1)}, + {FN (arccos), ARG(-1.0e+00,8.3886080e+06), RES(1.570796446004186170e0, -1.6635532333438698084e1)}, + {FN (arccos), ARG(-1.0e+00,-8.3886080e+06), RES(1.570796446004186170e0, 1.6635532333438698084e1)}, + {FN (arccos), ARG(2.0e+00,0.0e+00), RES(0, 1.3169578969248167086e0)}, + {FN (arccos), ARG(-2.0e+00,0.0e+00), RES(3.1415926535897932385e0, -1.3169578969248167086e0)}, + {FN (arccos), ARG(2.0e+00,1.19209289550781250e-07), RES(6.8825515412047433504e-8, -1.3169578969248194435e0)}, + {FN (arccos), ARG(2.0e+00,-1.19209289550781250e-07), RES(6.8825515412047433504e-8, 1.3169578969248194435e0)}, + {FN (arccos), ARG(-2.0e+00,1.19209289550781250e-07), RES(3.1415925847642778264e0, -1.3169578969248194435e0)}, + {FN (arccos), ARG(-2.0e+00,-1.19209289550781250e-07), RES(3.1415925847642778264e0, 1.3169578969248194435e0)}, + {FN (arccos), ARG(2.0e+00,5.0e-01), RES(2.7775425655771396018e-1, -1.3618009008578457882e0)}, + {FN (arccos), ARG(2.0e+00,-5.0e-01), RES(2.7775425655771396018e-1, 1.3618009008578457882e0)}, + {FN (arccos), ARG(-2.0e+00,5.0e-01), RES(2.8638383970320792783e0, -1.3618009008578457882e0)}, + {FN (arccos), ARG(-2.0e+00,-5.0e-01), RES(2.8638383970320792783e0, 1.3618009008578457882e0)}, + {FN (arccos), ARG(2.0e+00,1.0e+00), RES(5.0735630321714456304e-1, -1.4693517443681852733e0)}, + {FN (arccos), ARG(2.0e+00,-1.0e+00), RES(5.0735630321714456304e-1, 1.4693517443681852733e0)}, + {FN (arccos), ARG(-2.0e+00,1.0e+00), RES(2.6342363503726486754e0, -1.4693517443681852733e0)}, + {FN (arccos), ARG(-2.0e+00,-1.0e+00), RES(2.6342363503726486754e0, 1.4693517443681852733e0)}, + {FN (arccos), ARG(2.0e+00,2.0e+00), RES(8.1654718209685057852e-1, -1.7343245214879664480e0)}, + {FN (arccos), ARG(2.0e+00,-2.0e+00), RES(8.1654718209685057852e-1, 1.7343245214879664480e0)}, + {FN (arccos), ARG(-2.0e+00,2.0e+00), RES(2.3250454714929426599e0, -1.7343245214879664480e0)}, + {FN (arccos), ARG(-2.0e+00,-2.0e+00), RES(2.3250454714929426599e0, 1.7343245214879664480e0)}, + {FN (arccos), ARG(2.0e+00,8.3886080e+06), RES(1.5707960883763175177e0, -1.663553233343871940e1)}, + {FN (arccos), ARG(2.0e+00,-8.3886080e+06), RES(1.5707960883763175177e0, 1.663553233343871940e1)}, + {FN (arccos), ARG(-2.0e+00,8.3886080e+06), RES(1.5707965652134757208e0, -1.663553233343871940e1)}, + {FN (arccos), ARG(-2.0e+00,-8.3886080e+06), RES(1.5707965652134757208e0, 1.663553233343871940e1)}, + {FN (arccos), ARG(8.3886080e+06,0.0e+00), RES(0, 1.6635532333438683873e1)}, + {FN (arccos), ARG(-8.3886080e+06,0.0e+00), RES(3.1415926535897932385e0, -1.6635532333438683873e1)}, + {FN (arccos), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.4210854715202104692e-14, -1.6635532333438683873e1)}, + {FN (arccos), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.4210854715202104692e-14, 1.6635532333438683873e1)}, + {FN (arccos), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(3.1415926535897790276e0, -1.6635532333438683873e1)}, + {FN (arccos), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(3.1415926535897790276e0, 1.6635532333438683873e1)}, + {FN (arccos), ARG(8.3886080e+06,5.0e-01), RES(5.9604644775390977930e-8, -1.6635532333438685650e1)}, + {FN (arccos), ARG(8.3886080e+06,-5.0e-01), RES(5.9604644775390977930e-8, 1.6635532333438685650e1)}, + {FN (arccos), ARG(-8.3886080e+06,5.0e-01), RES(3.1415925939851484631e0, -1.6635532333438685650e1)}, + {FN (arccos), ARG(-8.3886080e+06,-5.0e-01), RES(3.1415925939851484631e0, 1.6635532333438685650e1)}, + {FN (arccos), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955078153234e-7, -1.6635532333438690979e1)}, + {FN (arccos), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955078153234e-7, 1.6635532333438690979e1)}, + {FN (arccos), ARG(-8.3886080e+06,1.0e+00), RES(3.1415925343805036877e0, -1.6635532333438690979e1)}, + {FN (arccos), ARG(-8.3886080e+06,-1.0e+00), RES(3.1415925343805036877e0, 1.6635532333438690979e1)}, + {FN (arccos), ARG(8.3886080e+06,2.0e+00), RES(2.3841857910155967656e-7, -1.6635532333438712295e1)}, + {FN (arccos), ARG(8.3886080e+06,-2.0e+00), RES(2.3841857910155967656e-7, 1.6635532333438712295e1)}, + {FN (arccos), ARG(-8.3886080e+06,2.0e+00), RES(3.1415924151712141369e0, -1.6635532333438712295e1)}, + {FN (arccos), ARG(-8.3886080e+06,-2.0e+00), RES(3.1415924151712141369e0, 1.6635532333438712295e1)}, + {FN (arccos), ARG(8.3886080e+06,8.3886080e+06), RES(7.8539816339745008597e-1, -1.6982105923718660081e1)}, + {FN (arccos), ARG(8.3886080e+06,-8.3886080e+06), RES(7.8539816339745008597e-1, 1.6982105923718660081e1)}, + {FN (arccos), ARG(-8.3886080e+06,8.3886080e+06), RES(2.3561944901923431525e0, -1.6982105923718660081e1)}, + {FN (arccos), ARG(-8.3886080e+06,-8.3886080e+06), RES(2.3561944901923431525e0, 1.6982105923718660081e1)}, + {FN (arctan), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arctan), ARG(0.0e+00,1.19209289550781250e-07), RES(0, 1.1920928955078181469e-7)}, + {FN (arctan), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, -1.1920928955078181469e-7)}, + {FN (arctan), ARG(0.0e+00,5.0e-01), RES(0, 5.4930614433405484570e-1)}, + {FN (arctan), ARG(0.0e+00,-5.0e-01), RES(0, -5.4930614433405484570e-1)}, + {FN (arctan), ARG(0.0e+00,2.0e+00), RES(1.5707963267948966192e0, 5.4930614433405484570e-1)}, + {FN (arctan), ARG(0.0e+00,-2.0e+00), RES(-1.5707963267948966192e0, -5.4930614433405484570e-1)}, + {FN (arctan), ARG(0.0e+00,8.3886080e+06), RES(1.5707963267948966192e0, 1.1920928955078181469e-7)}, + {FN (arctan), ARG(0.0e+00,-8.3886080e+06), RES(-1.5707963267948966192e0, -1.1920928955078181469e-7)}, + {FN (arctan), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078068531e-7, 0.0)}, + {FN (arctan), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.1920928955078068531e-7, 0.0)}, + {FN (arctan), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078237938e-7, 1.1920928955078012062e-7)}, + {FN (arctan), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078237938e-7, -1.1920928955078012062e-7)}, + {FN (arctan), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.1920928955078237938e-7, 1.1920928955078012062e-7)}, + {FN (arctan), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.1920928955078237938e-7, -1.1920928955078012062e-7)}, + {FN (arctan), ARG(1.19209289550781250e-07,5.0e-01), RES(1.5894571940103932425e-7, 5.4930614433404221383e-1)}, + {FN (arctan), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.5894571940103932425e-7, -5.4930614433404221383e-1)}, + {FN (arctan), ARG(-1.19209289550781250e-07,5.0e-01), RES(-1.5894571940103932425e-7, 5.4930614433404221383e-1)}, + {FN (arctan), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.5894571940103932425e-7, -5.4930614433404221383e-1)}, + {FN (arctan), ARG(1.19209289550781250e-07,1.0e+00), RES(7.8539819319977069731e-1, 8.3177661667193446012e0)}, + {FN (arctan), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.8539819319977069731e-1, -8.3177661667193446012e0)}, + {FN (arctan), ARG(-1.19209289550781250e-07,1.0e+00), RES(-7.8539819319977069731e-1, 8.3177661667193446012e0)}, + {FN (arctan), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-7.8539819319977069731e-1, -8.3177661667193446012e0)}, + {FN (arctan), ARG(1.19209289550781250e-07,2.0e+00), RES(1.5707962870584667690e0, 5.4930614433405168773e-1)}, + {FN (arctan), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.5707962870584667690e0, -5.4930614433405168773e-1)}, + {FN (arctan), ARG(-1.19209289550781250e-07,2.0e+00), RES(-1.5707962870584667690e0, 5.4930614433405168773e-1)}, + {FN (arctan), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-1.5707962870584667690e0, -5.4930614433405168773e-1)}, + {FN (arctan), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267948966192e0, 1.1920928955078181469e-7)}, + {FN (arctan), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5707963267948966192e0, -1.1920928955078181469e-7)}, + {FN (arctan), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.5707963267948966192e0, 1.1920928955078181469e-7)}, + {FN (arctan), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.5707963267948966192e0, -1.1920928955078181469e-7)}, + {FN (arctan), ARG(5.0e-01,0.0e+00), RES(4.6364760900080611621e-1, 0.0)}, + {FN (arctan), ARG(-5.0e-01,0.0e+00), RES(-4.6364760900080611621e-1, 0.0)}, + {FN (arctan), ARG(5.0e-01,1.19209289550781250e-07), RES(4.6364760900081066369e-1, 9.5367431640625072280e-8)}, + {FN (arctan), ARG(5.0e-01,-1.19209289550781250e-07), RES(4.6364760900081066369e-1, -9.5367431640625072280e-8)}, + {FN (arctan), ARG(-5.0e-01,1.19209289550781250e-07), RES(-4.6364760900081066369e-1, 9.5367431640625072280e-8)}, + {FN (arctan), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-4.6364760900081066369e-1, -9.5367431640625072280e-8)}, + {FN (arctan), ARG(5.0e-01,5.0e-01), RES(5.5357435889704525151e-1, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(5.0e-01,-5.0e-01), RES(5.5357435889704525151e-1, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(-5.0e-01,5.0e-01), RES(-5.5357435889704525151e-1, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(-5.0e-01,-5.0e-01), RES(-5.5357435889704525151e-1, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(5.0e-01,1.0e+00), RES(9.0788749496088038670e-1, 7.0830333601405402006e-1)}, + {FN (arctan), ARG(5.0e-01,-1.0e+00), RES(9.0788749496088038670e-1, -7.0830333601405402006e-1)}, + {FN (arctan), ARG(-5.0e-01,1.0e+00), RES(-9.0788749496088038670e-1, 7.0830333601405402006e-1)}, + {FN (arctan), ARG(-5.0e-01,-1.0e+00), RES(-9.0788749496088038670e-1, -7.0830333601405402006e-1)}, + {FN (arctan), ARG(5.0e-01,2.0e+00), RES(1.4215468610018069803e0, 5.0037000005253101744e-1)}, + {FN (arctan), ARG(5.0e-01,-2.0e+00), RES(1.4215468610018069803e0, -5.0037000005253101744e-1)}, + {FN (arctan), ARG(-5.0e-01,2.0e+00), RES(-1.4215468610018069803e0, 5.0037000005253101744e-1)}, + {FN (arctan), ARG(-5.0e-01,-2.0e+00), RES(-1.4215468610018069803e0, -5.0037000005253101744e-1)}, + {FN (arctan), ARG(5.0e-01,8.3886080e+06), RES(1.5707963267948895138e0, 1.1920928955078139117e-7)}, + {FN (arctan), ARG(5.0e-01,-8.3886080e+06), RES(1.5707963267948895138e0, -1.1920928955078139117e-7)}, + {FN (arctan), ARG(-5.0e-01,8.3886080e+06), RES(-1.5707963267948895138e0, 1.1920928955078139117e-7)}, + {FN (arctan), ARG(-5.0e-01,-8.3886080e+06), RES(-1.5707963267948895138e0, -1.1920928955078139117e-7)}, + {FN (arctan), ARG(1.0e+00,0.0e+00), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arctan), ARG(-1.0e+00,0.0e+00), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arctan), ARG(1.0e+00,1.19209289550781250e-07), RES(7.8539816339745186233e-1, 5.9604644775390483828e-8)}, + {FN (arctan), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.8539816339745186233e-1, -5.9604644775390483828e-8)}, + {FN (arctan), ARG(-1.0e+00,1.19209289550781250e-07), RES(-7.8539816339745186233e-1, 5.9604644775390483828e-8)}, + {FN (arctan), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-7.8539816339745186233e-1, -5.9604644775390483828e-8)}, + {FN (arctan), ARG(1.0e+00,5.0e-01), RES(8.4757566067082902713e-1, 2.3887786125685909036e-1)}, + {FN (arctan), ARG(1.0e+00,-5.0e-01), RES(8.4757566067082902713e-1, -2.3887786125685909036e-1)}, + {FN (arctan), ARG(-1.0e+00,5.0e-01), RES(-8.4757566067082902713e-1, 2.3887786125685909036e-1)}, + {FN (arctan), ARG(-1.0e+00,-5.0e-01), RES(-8.4757566067082902713e-1, -2.3887786125685909036e-1)}, + {FN (arctan), ARG(1.0e+00,1.0e+00), RES(1.0172219678978513677e0, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(1.0e+00,-1.0e+00), RES(1.0172219678978513677e0, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(-1.0e+00,1.0e+00), RES(-1.0172219678978513677e0, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(-1.0e+00,-1.0e+00), RES(-1.0172219678978513677e0, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(1.0e+00,2.0e+00), RES(1.3389725222944935611e0, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(1.0e+00,-2.0e+00), RES(1.3389725222944935611e0, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(-1.0e+00,2.0e+00), RES(-1.3389725222944935611e0, 4.0235947810852509365e-1)}, + {FN (arctan), ARG(-1.0e+00,-2.0e+00), RES(-1.3389725222944935611e0, -4.0235947810852509365e-1)}, + {FN (arctan), ARG(1.0e+00,8.3886080e+06), RES(1.5707963267948824084e0, 1.1920928955078012062e-7)}, + {FN (arctan), ARG(1.0e+00,-8.3886080e+06), RES(1.5707963267948824084e0, -1.1920928955078012062e-7)}, + {FN (arctan), ARG(-1.0e+00,8.3886080e+06), RES(-1.5707963267948824084e0, 1.1920928955078012062e-7)}, + {FN (arctan), ARG(-1.0e+00,-8.3886080e+06), RES(-1.5707963267948824084e0, -1.1920928955078012062e-7)}, + {FN (arctan), ARG(2.0e+00,0.0e+00), RES(1.1071487177940905030e0, 0.0)}, + {FN (arctan), ARG(-2.0e+00,0.0e+00), RES(-1.1071487177940905030e0, 0.0)}, + {FN (arctan), ARG(2.0e+00,1.19209289550781250e-07), RES(1.1071487177940916399e0, 2.3841857910156200307e-8)}, + {FN (arctan), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.1071487177940916399e0, -2.3841857910156200307e-8)}, + {FN (arctan), ARG(-2.0e+00,1.19209289550781250e-07), RES(-1.1071487177940916399e0, 2.3841857910156200307e-8)}, + {FN (arctan), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-1.1071487177940916399e0, -2.3841857910156200307e-8)}, + {FN (arctan), ARG(2.0e+00,5.0e-01), RES(1.1265564408348223487e0, 9.6415620202996167238e-2)}, + {FN (arctan), ARG(2.0e+00,-5.0e-01), RES(1.1265564408348223487e0, -9.6415620202996167238e-2)}, + {FN (arctan), ARG(-2.0e+00,5.0e-01), RES(-1.1265564408348223487e0, 9.6415620202996167238e-2)}, + {FN (arctan), ARG(-2.0e+00,-5.0e-01), RES(-1.1265564408348223487e0, -9.6415620202996167238e-2)}, + {FN (arctan), ARG(2.0e+00,1.0e+00), RES(1.1780972450961724644e0, 1.7328679513998632735e-1)}, + {FN (arctan), ARG(2.0e+00,-1.0e+00), RES(1.1780972450961724644e0, -1.7328679513998632735e-1)}, + {FN (arctan), ARG(-2.0e+00,1.0e+00), RES(-1.1780972450961724644e0, 1.7328679513998632735e-1)}, + {FN (arctan), ARG(-2.0e+00,-1.0e+00), RES(-1.1780972450961724644e0, -1.7328679513998632735e-1)}, + {FN (arctan), ARG(2.0e+00,2.0e+00), RES(1.3112232696716351433e0, 2.3887786125685909036e-1)}, + {FN (arctan), ARG(2.0e+00,-2.0e+00), RES(1.3112232696716351433e0, -2.3887786125685909036e-1)}, + {FN (arctan), ARG(-2.0e+00,2.0e+00), RES(-1.3112232696716351433e0, 2.3887786125685909036e-1)}, + {FN (arctan), ARG(-2.0e+00,-2.0e+00), RES(-1.3112232696716351433e0, -2.3887786125685909036e-1)}, + {FN (arctan), ARG(2.0e+00,8.3886080e+06), RES(1.5707963267948681975e0, 1.1920928955077503843e-7)}, + {FN (arctan), ARG(2.0e+00,-8.3886080e+06), RES(1.5707963267948681975e0, -1.1920928955077503843e-7)}, + {FN (arctan), ARG(-2.0e+00,8.3886080e+06), RES(-1.5707963267948681975e0, 1.1920928955077503843e-7)}, + {FN (arctan), ARG(-2.0e+00,-8.3886080e+06), RES(-1.5707963267948681975e0, -1.1920928955077503843e-7)}, + {FN (arctan), ARG(8.3886080e+06,0.0e+00), RES(1.5707962075856070685e0, 0.0)}, + {FN (arctan), ARG(-8.3886080e+06,0.0e+00), RES(-1.5707962075856070685e0, 0.0)}, + {FN (arctan), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5707962075856070685e0, 1.6940658945085766040e-21)}, + {FN (arctan), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5707962075856070685e0, -1.6940658945085766040e-21)}, + {FN (arctan), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.5707962075856070685e0, 1.6940658945085766040e-21)}, + {FN (arctan), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.5707962075856070685e0, -1.6940658945085766040e-21)}, + {FN (arctan), ARG(8.3886080e+06,5.0e-01), RES(1.5707962075856070685e0, 7.1054273576008756410e-15)}, + {FN (arctan), ARG(8.3886080e+06,-5.0e-01), RES(1.5707962075856070685e0, -7.1054273576008756410e-15)}, + {FN (arctan), ARG(-8.3886080e+06,5.0e-01), RES(-1.5707962075856070685e0, 7.1054273576008756410e-15)}, + {FN (arctan), ARG(-8.3886080e+06,-5.0e-01), RES(-1.5707962075856070685e0, -7.1054273576008756410e-15)}, + {FN (arctan), ARG(8.3886080e+06,1.0e+00), RES(1.5707962075856070685e0, 1.4210854715201599821e-14)}, + {FN (arctan), ARG(8.3886080e+06,-1.0e+00), RES(1.5707962075856070685e0, -1.4210854715201599821e-14)}, + {FN (arctan), ARG(-8.3886080e+06,1.0e+00), RES(-1.5707962075856070685e0, 1.4210854715201599821e-14)}, + {FN (arctan), ARG(-8.3886080e+06,-1.0e+00), RES(-1.5707962075856070685e0, -1.4210854715201599821e-14)}, + {FN (arctan), ARG(8.3886080e+06,2.0e+00), RES(1.5707962075856070685e0, 2.8421709430401987951e-14)}, + {FN (arctan), ARG(8.3886080e+06,-2.0e+00), RES(1.5707962075856070685e0, -2.8421709430401987951e-14)}, + {FN (arctan), ARG(-8.3886080e+06,2.0e+00), RES(-1.5707962075856070685e0, 2.8421709430401987951e-14)}, + {FN (arctan), ARG(-8.3886080e+06,-2.0e+00), RES(-1.5707962075856070685e0, -2.8421709430401987951e-14)}, + {FN (arctan), ARG(8.3886080e+06,8.3886080e+06), RES(1.5707962671902518438e0, 5.9604644775390483828e-8)}, + {FN (arctan), ARG(8.3886080e+06,-8.3886080e+06), RES(1.5707962671902518438e0, -5.9604644775390483828e-8)}, + {FN (arctan), ARG(-8.3886080e+06,8.3886080e+06), RES(-1.5707962671902518438e0, 5.9604644775390483828e-8)}, + {FN (arctan), ARG(-8.3886080e+06,-8.3886080e+06), RES(-1.5707962671902518438e0, -5.9604644775390483828e-8)}, + {FN (sinh), ARG(0.0e+00,-3.45266983001243932001e-04), RES(0, -3.4526697614140534807e-4)}, + {FN (sinh), ARG(0.0e+00,3.45266983001243932001e-04), RES(0, 3.4526697614140534807e-4)}, + {FN (sinh), ARG(0.0e+00,1.57045105981189525579e+00), RES(0, 9.9999994039535581669e-1)}, + {FN (sinh), ARG(0.0e+00,-1.57045105981189525579e+00), RES(0, -9.9999994039535581669e-1)}, + {FN (sinh), ARG(0.0e+00,1.57114159377789786021e+00), RES(0, 9.9999994039535581673e-1)}, + {FN (sinh), ARG(0.0e+00,-1.57114159377789786021e+00), RES(0, -9.9999994039535581673e-1)}, + {FN (sinh), ARG(0.0e+00,3.14124738660679181379e+00), RES(0, 3.4526697614158608860e-4)}, + {FN (sinh), ARG(0.0e+00,-3.14124738660679181379e+00), RES(0, -3.4526697614158608860e-4)}, + {FN (sinh), ARG(0.0e+00,3.14193792057279441821e+00), RES(0, -3.4526697614134115926e-4)}, + {FN (sinh), ARG(0.0e+00,-3.14193792057279441821e+00), RES(0, 3.4526697614134115926e-4)}, + {FN (sinh), ARG(0.0e+00,4.71204371340168837179e+00), RES(0, -9.9999994039535581664e-1)}, + {FN (sinh), ARG(0.0e+00,-4.71204371340168837179e+00), RES(0, 9.9999994039535581664e-1)}, + {FN (sinh), ARG(0.0e+00,4.71273424736769097620e+00), RES(0, -9.9999994039535581677e-1)}, + {FN (sinh), ARG(0.0e+00,-4.71273424736769097620e+00), RES(0, 9.9999994039535581677e-1)}, + {FN (sinh), ARG(0.0e+00,6.28284004019658492979e+00), RES(0, -3.4526697614170855328e-4)}, + {FN (sinh), ARG(0.0e+00,-6.28284004019658492979e+00), RES(0, 3.4526697614170855328e-4)}, + {FN (sinh), ARG(0.0e+00,6.28353057416258753420e+00), RES(0, 3.4526697614121869459e-4)}, + {FN (sinh), ARG(0.0e+00,-6.28353057416258753420e+00), RES(0, -3.4526697614121869459e-4)}, + {FN (sinh), ARG(0.0e+00,9.42443269378637893396e+00), RES(0, 3.4526697614094283958e-4)}, + {FN (sinh), ARG(0.0e+00,-9.42443269378637893396e+00), RES(0, -3.4526697614094283958e-4)}, + {FN (sinh), ARG(0.0e+00,9.42512322775237976202e+00), RES(0, -3.4526697614020805155e-4)}, + {FN (sinh), ARG(0.0e+00,-9.42512322775237976202e+00), RES(0, 3.4526697614020805155e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(1.1920928244535424533e-7, -3.4526697614140780134e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(1.1920928244535424533e-7, 3.4526697614140780134e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(-1.1920928244535424533e-7, -3.4526697614140780134e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(-1.1920928244535424533e-7, 3.4526697614140780134e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(4.1159030931177815679e-11, 9.9999994039536292211e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(4.1159030931177815679e-11, -9.9999994039536292211e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(-4.1159030931177815679e-11, 9.9999994039536292211e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(-4.1159030931177815679e-11, -9.9999994039536292211e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(-4.1159030931163216752e-11, 9.9999994039536292216e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-4.1159030931163216752e-11, -9.9999994039536292216e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(4.1159030931163216752e-11, 9.9999994039536292216e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(4.1159030931163216752e-11, -9.9999994039536292216e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(-1.1920928244535424532e-7, 3.4526697614158854187e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-1.1920928244535424532e-7, -3.4526697614158854187e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(1.1920928244535424532e-7, 3.4526697614158854187e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(1.1920928244535424532e-7, -3.4526697614158854187e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(-1.1920928244535424533e-7, -3.4526697614134361253e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-1.1920928244535424533e-7, 3.4526697614134361253e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(1.1920928244535424533e-7, -3.4526697614134361253e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(1.1920928244535424533e-7, 3.4526697614134361253e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(-4.1159030931192414605e-11, -9.9999994039536292207e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-4.1159030931192414605e-11, 9.9999994039536292207e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(4.1159030931192414605e-11, -9.9999994039536292207e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(4.1159030931192414605e-11, 9.9999994039536292207e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(4.1159030931148617825e-11, -9.9999994039536292220e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(4.1159030931148617825e-11, 9.9999994039536292220e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(-4.1159030931148617825e-11, -9.9999994039536292220e-1)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(-4.1159030931148617825e-11, 9.9999994039536292220e-1)}, + {FN (sinh), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(1.1920928244535424532e-7, -3.4526697614171100655e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(1.1920928244535424532e-7, 3.4526697614171100655e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(-1.1920928244535424532e-7, -3.4526697614171100655e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(-1.1920928244535424532e-7, 3.4526697614171100655e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(1.1920928244535424534e-7, 3.4526697614122114786e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(1.1920928244535424534e-7, -3.4526697614122114786e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(-1.1920928244535424534e-7, 3.4526697614122114786e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(-1.1920928244535424534e-7, -3.4526697614122114786e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(-1.1920928244535424535e-7, 3.4526697614094529285e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-1.1920928244535424535e-7, -3.4526697614094529285e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(1.1920928244535424535e-7, 3.4526697614094529285e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(1.1920928244535424535e-7, -3.4526697614094529285e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(-1.1920928244535424538e-7, -3.4526697614021050482e-4)}, + {FN (sinh), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-1.1920928244535424538e-7, 3.4526697614021050482e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(1.1920928244535424538e-7, -3.4526697614021050482e-4)}, + {FN (sinh), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(1.1920928244535424538e-7, 3.4526697614021050482e-4)}, + {FN (sinh), ARG(5.0e-01,-3.45266983001243932001e-04), RES(5.2109527443404709209e-1, -3.8933200722534065172e-4)}, + {FN (sinh), ARG(5.0e-01,3.45266983001243932001e-04), RES(5.2109527443404709209e-1, 3.8933200722534065172e-4)}, + {FN (sinh), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(-5.2109527443404709209e-1, -3.8933200722534065172e-4)}, + {FN (sinh), ARG(-5.0e-01,3.45266983001243932001e-04), RES(-5.2109527443404709209e-1, 3.8933200722534065172e-4)}, + {FN (sinh), ARG(5.0e-01,1.57045105981189525579e+00), RES(1.7991700040937027667e-4, 1.1276258979946363572e0)}, + {FN (sinh), ARG(5.0e-01,-1.57045105981189525579e+00), RES(1.7991700040937027667e-4, -1.1276258979946363572e0)}, + {FN (sinh), ARG(-5.0e-01,1.57045105981189525579e+00), RES(-1.7991700040937027667e-4, 1.1276258979946363572e0)}, + {FN (sinh), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(-1.7991700040937027667e-4, -1.1276258979946363572e0)}, + {FN (sinh), ARG(5.0e-01,1.57114159377789786021e+00), RES(-1.7991700040930646090e-4, 1.1276258979946363573e0)}, + {FN (sinh), ARG(5.0e-01,-1.57114159377789786021e+00), RES(-1.7991700040930646090e-4, -1.1276258979946363573e0)}, + {FN (sinh), ARG(-5.0e-01,1.57114159377789786021e+00), RES(1.7991700040930646090e-4, 1.1276258979946363573e0)}, + {FN (sinh), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(1.7991700040930646090e-4, -1.1276258979946363573e0)}, + {FN (sinh), ARG(5.0e-01,3.14124738660679181379e+00), RES(-5.2109527443404709206e-1, 3.8933200722554445944e-4)}, + {FN (sinh), ARG(5.0e-01,-3.14124738660679181379e+00), RES(-5.2109527443404709206e-1, -3.8933200722554445944e-4)}, + {FN (sinh), ARG(-5.0e-01,3.14124738660679181379e+00), RES(5.2109527443404709206e-1, 3.8933200722554445944e-4)}, + {FN (sinh), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(5.2109527443404709206e-1, -3.8933200722554445944e-4)}, + {FN (sinh), ARG(5.0e-01,3.14193792057279441821e+00), RES(-5.2109527443404709211e-1, -3.8933200722526827075e-4)}, + {FN (sinh), ARG(5.0e-01,-3.14193792057279441821e+00), RES(-5.2109527443404709211e-1, 3.8933200722526827075e-4)}, + {FN (sinh), ARG(-5.0e-01,3.14193792057279441821e+00), RES(5.2109527443404709211e-1, -3.8933200722526827075e-4)}, + {FN (sinh), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(5.2109527443404709211e-1, 3.8933200722526827075e-4)}, + {FN (sinh), ARG(5.0e-01,4.71204371340168837179e+00), RES(-1.7991700040943409243e-4, -1.1276258979946363572e0)}, + {FN (sinh), ARG(5.0e-01,-4.71204371340168837179e+00), RES(-1.7991700040943409243e-4, 1.1276258979946363572e0)}, + {FN (sinh), ARG(-5.0e-01,4.71204371340168837179e+00), RES(1.7991700040943409243e-4, -1.1276258979946363572e0)}, + {FN (sinh), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(1.7991700040943409243e-4, 1.1276258979946363572e0)}, + {FN (sinh), ARG(5.0e-01,4.71273424736769097620e+00), RES(1.7991700040924264514e-4, -1.1276258979946363573e0)}, + {FN (sinh), ARG(5.0e-01,-4.71273424736769097620e+00), RES(1.7991700040924264514e-4, 1.1276258979946363573e0)}, + {FN (sinh), ARG(-5.0e-01,4.71273424736769097620e+00), RES(-1.7991700040924264514e-4, -1.1276258979946363573e0)}, + {FN (sinh), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(-1.7991700040924264514e-4, 1.1276258979946363573e0)}, + {FN (sinh), ARG(5.0e-01,6.28284004019658492979e+00), RES(5.2109527443404709204e-1, -3.8933200722568255379e-4)}, + {FN (sinh), ARG(5.0e-01,-6.28284004019658492979e+00), RES(5.2109527443404709204e-1, 3.8933200722568255379e-4)}, + {FN (sinh), ARG(-5.0e-01,6.28284004019658492979e+00), RES(-5.2109527443404709204e-1, -3.8933200722568255379e-4)}, + {FN (sinh), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(-5.2109527443404709204e-1, 3.8933200722568255379e-4)}, + {FN (sinh), ARG(5.0e-01,6.28353057416258753420e+00), RES(5.2109527443404709213e-1, 3.8933200722513017641e-4)}, + {FN (sinh), ARG(5.0e-01,-6.28353057416258753420e+00), RES(5.2109527443404709213e-1, -3.8933200722513017641e-4)}, + {FN (sinh), ARG(-5.0e-01,6.28353057416258753420e+00), RES(-5.2109527443404709213e-1, 3.8933200722513017641e-4)}, + {FN (sinh), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(-5.2109527443404709213e-1, -3.8933200722513017641e-4)}, + {FN (sinh), ARG(5.0e-01,9.42443269378637893396e+00), RES(-5.2109527443404709218e-1, 3.8933200722481911514e-4)}, + {FN (sinh), ARG(5.0e-01,-9.42443269378637893396e+00), RES(-5.2109527443404709218e-1, -3.8933200722481911514e-4)}, + {FN (sinh), ARG(-5.0e-01,9.42443269378637893396e+00), RES(5.2109527443404709218e-1, 3.8933200722481911514e-4)}, + {FN (sinh), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(5.2109527443404709218e-1, -3.8933200722481911514e-4)}, + {FN (sinh), ARG(5.0e-01,9.42512322775237976202e+00), RES(-5.2109527443404709231e-1, -3.8933200722399054908e-4)}, + {FN (sinh), ARG(5.0e-01,-9.42512322775237976202e+00), RES(-5.2109527443404709231e-1, 3.8933200722399054908e-4)}, + {FN (sinh), ARG(-5.0e-01,9.42512322775237976202e+00), RES(5.2109527443404709231e-1, -3.8933200722399054908e-4)}, + {FN (sinh), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(5.2109527443404709231e-1, 3.8933200722399054908e-4)}, + {FN (sinh), ARG(1.0e+00,-3.45266983001243932001e-04), RES(1.1752011235963524660e0, -5.3277478472501939236e-4)}, + {FN (sinh), ARG(1.0e+00,3.45266983001243932001e-04), RES(1.1752011235963524660e0, 5.3277478472501939236e-4)}, + {FN (sinh), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(-1.1752011235963524660e0, -5.3277478472501939236e-4)}, + {FN (sinh), ARG(-1.0e+00,3.45266983001243932001e-04), RES(-1.1752011235963524660e0, 5.3277478472501939236e-4)}, + {FN (sinh), ARG(1.0e+00,1.57045105981189525579e+00), RES(4.0575816248730593018e-4, 1.5430805428404715942e0)}, + {FN (sinh), ARG(1.0e+00,-1.57045105981189525579e+00), RES(4.0575816248730593018e-4, -1.5430805428404715942e0)}, + {FN (sinh), ARG(-1.0e+00,1.57045105981189525579e+00), RES(-4.0575816248730593018e-4, 1.5430805428404715942e0)}, + {FN (sinh), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(-4.0575816248730593018e-4, -1.5430805428404715942e0)}, + {FN (sinh), ARG(1.0e+00,1.57114159377789786021e+00), RES(-4.0575816248716200955e-4, 1.5430805428404715942e0)}, + {FN (sinh), ARG(1.0e+00,-1.57114159377789786021e+00), RES(-4.0575816248716200955e-4, -1.5430805428404715942e0)}, + {FN (sinh), ARG(-1.0e+00,1.57114159377789786021e+00), RES(4.0575816248716200955e-4, 1.5430805428404715942e0)}, + {FN (sinh), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(4.0575816248716200955e-4, -1.5430805428404715942e0)}, + {FN (sinh), ARG(1.0e+00,3.14124738660679181379e+00), RES(-1.1752011235963524659e0, 5.3277478472529828958e-4)}, + {FN (sinh), ARG(1.0e+00,-3.14124738660679181379e+00), RES(-1.1752011235963524659e0, -5.3277478472529828958e-4)}, + {FN (sinh), ARG(-1.0e+00,3.14124738660679181379e+00), RES(1.1752011235963524659e0, 5.3277478472529828958e-4)}, + {FN (sinh), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(1.1752011235963524659e0, -5.3277478472529828958e-4)}, + {FN (sinh), ARG(1.0e+00,3.14193792057279441821e+00), RES(-1.1752011235963524660e0, -5.3277478472492034385e-4)}, + {FN (sinh), ARG(1.0e+00,-3.14193792057279441821e+00), RES(-1.1752011235963524660e0, 5.3277478472492034385e-4)}, + {FN (sinh), ARG(-1.0e+00,3.14193792057279441821e+00), RES(1.1752011235963524660e0, -5.3277478472492034385e-4)}, + {FN (sinh), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(1.1752011235963524660e0, 5.3277478472492034385e-4)}, + {FN (sinh), ARG(1.0e+00,4.71204371340168837179e+00), RES(-4.0575816248744985081e-4, -1.5430805428404715941e0)}, + {FN (sinh), ARG(1.0e+00,-4.71204371340168837179e+00), RES(-4.0575816248744985081e-4, 1.5430805428404715941e0)}, + {FN (sinh), ARG(-1.0e+00,4.71204371340168837179e+00), RES(4.0575816248744985081e-4, -1.5430805428404715941e0)}, + {FN (sinh), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(4.0575816248744985081e-4, 1.5430805428404715941e0)}, + {FN (sinh), ARG(1.0e+00,4.71273424736769097620e+00), RES(4.0575816248701808892e-4, -1.5430805428404715943e0)}, + {FN (sinh), ARG(1.0e+00,-4.71273424736769097620e+00), RES(4.0575816248701808892e-4, 1.5430805428404715943e0)}, + {FN (sinh), ARG(-1.0e+00,4.71273424736769097620e+00), RES(-4.0575816248701808892e-4, -1.5430805428404715943e0)}, + {FN (sinh), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(-4.0575816248701808892e-4, 1.5430805428404715943e0)}, + {FN (sinh), ARG(1.0e+00,6.28284004019658492979e+00), RES(1.1752011235963524659e0, -5.3277478472548726245e-4)}, + {FN (sinh), ARG(1.0e+00,-6.28284004019658492979e+00), RES(1.1752011235963524659e0, 5.3277478472548726245e-4)}, + {FN (sinh), ARG(-1.0e+00,6.28284004019658492979e+00), RES(-1.1752011235963524659e0, -5.3277478472548726245e-4)}, + {FN (sinh), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(-1.1752011235963524659e0, 5.3277478472548726245e-4)}, + {FN (sinh), ARG(1.0e+00,6.28353057416258753420e+00), RES(1.1752011235963524661e0, 5.3277478472473137099e-4)}, + {FN (sinh), ARG(1.0e+00,-6.28353057416258753420e+00), RES(1.1752011235963524661e0, -5.3277478472473137099e-4)}, + {FN (sinh), ARG(-1.0e+00,6.28353057416258753420e+00), RES(-1.1752011235963524661e0, 5.3277478472473137099e-4)}, + {FN (sinh), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(-1.1752011235963524661e0, -5.3277478472473137099e-4)}, + {FN (sinh), ARG(1.0e+00,9.42443269378637893396e+00), RES(-1.1752011235963524662e0, 5.3277478472430570447e-4)}, + {FN (sinh), ARG(1.0e+00,-9.42443269378637893396e+00), RES(-1.1752011235963524662e0, -5.3277478472430570447e-4)}, + {FN (sinh), ARG(-1.0e+00,9.42443269378637893396e+00), RES(1.1752011235963524662e0, 5.3277478472430570447e-4)}, + {FN (sinh), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(1.1752011235963524662e0, -5.3277478472430570447e-4)}, + {FN (sinh), ARG(1.0e+00,9.42512322775237976202e+00), RES(-1.1752011235963524665e0, -5.3277478472317186729e-4)}, + {FN (sinh), ARG(1.0e+00,-9.42512322775237976202e+00), RES(-1.1752011235963524665e0, 5.3277478472317186729e-4)}, + {FN (sinh), ARG(-1.0e+00,9.42512322775237976202e+00), RES(1.1752011235963524665e0, -5.3277478472317186729e-4)}, + {FN (sinh), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(1.1752011235963524665e0, 5.3277478472317186729e-4)}, + {FN (sinh), ARG(2.0e+00,-3.45266983001243932001e-04), RES(3.6268601916692946556e0, -1.2989619299126701883e-3)}, + {FN (sinh), ARG(2.0e+00,3.45266983001243932001e-04), RES(3.6268601916692946556e0, 1.2989619299126701883e-3)}, + {FN (sinh), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(-3.6268601916692946556e0, -1.2989619299126701883e-3)}, + {FN (sinh), ARG(-2.0e+00,3.45266983001243932001e-04), RES(-3.6268601916692946556e0, 1.2989619299126701883e-3)}, + {FN (sinh), ARG(2.0e+00,1.57045105981189525579e+00), RES(1.2522351259047577385e-3, 3.7621954668392959445e0)}, + {FN (sinh), ARG(2.0e+00,-1.57045105981189525579e+00), RES(1.2522351259047577385e-3, -3.7621954668392959445e0)}, + {FN (sinh), ARG(-2.0e+00,1.57045105981189525579e+00), RES(-1.2522351259047577385e-3, 3.7621954668392959445e0)}, + {FN (sinh), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(-1.2522351259047577385e-3, -3.7621954668392959445e0)}, + {FN (sinh), ARG(2.0e+00,1.57114159377789786021e+00), RES(-1.2522351259043135762e-3, 3.7621954668392959447e0)}, + {FN (sinh), ARG(2.0e+00,-1.57114159377789786021e+00), RES(-1.2522351259043135762e-3, -3.7621954668392959447e0)}, + {FN (sinh), ARG(-2.0e+00,1.57114159377789786021e+00), RES(1.2522351259043135762e-3, 3.7621954668392959447e0)}, + {FN (sinh), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(1.2522351259043135762e-3, -3.7621954668392959447e0)}, + {FN (sinh), ARG(2.0e+00,3.14124738660679181379e+00), RES(-3.6268601916692946553e0, 1.2989619299133501696e-3)}, + {FN (sinh), ARG(2.0e+00,-3.14124738660679181379e+00), RES(-3.6268601916692946553e0, -1.2989619299133501696e-3)}, + {FN (sinh), ARG(-2.0e+00,3.14124738660679181379e+00), RES(3.6268601916692946553e0, 1.2989619299133501696e-3)}, + {FN (sinh), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(3.6268601916692946553e0, -1.2989619299133501696e-3)}, + {FN (sinh), ARG(2.0e+00,3.14193792057279441821e+00), RES(-3.6268601916692946556e0, -1.2989619299124286975e-3)}, + {FN (sinh), ARG(2.0e+00,-3.14193792057279441821e+00), RES(-3.6268601916692946556e0, 1.2989619299124286975e-3)}, + {FN (sinh), ARG(-2.0e+00,3.14193792057279441821e+00), RES(3.6268601916692946556e0, -1.2989619299124286975e-3)}, + {FN (sinh), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(3.6268601916692946556e0, 1.2989619299124286975e-3)}, + {FN (sinh), ARG(2.0e+00,4.71204371340168837179e+00), RES(-1.2522351259052019007e-3, -3.7621954668392959444e0)}, + {FN (sinh), ARG(2.0e+00,-4.71204371340168837179e+00), RES(-1.2522351259052019007e-3, 3.7621954668392959444e0)}, + {FN (sinh), ARG(-2.0e+00,4.71204371340168837179e+00), RES(1.2522351259052019007e-3, -3.7621954668392959444e0)}, + {FN (sinh), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(1.2522351259052019007e-3, 3.7621954668392959444e0)}, + {FN (sinh), ARG(2.0e+00,4.71273424736769097620e+00), RES(1.2522351259038694139e-3, -3.7621954668392959448e0)}, + {FN (sinh), ARG(2.0e+00,-4.71273424736769097620e+00), RES(1.2522351259038694139e-3, 3.7621954668392959448e0)}, + {FN (sinh), ARG(-2.0e+00,4.71273424736769097620e+00), RES(-1.2522351259038694139e-3, -3.7621954668392959448e0)}, + {FN (sinh), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(-1.2522351259038694139e-3, 3.7621954668392959448e0)}, + {FN (sinh), ARG(2.0e+00,6.28284004019658492979e+00), RES(3.6268601916692946552e0, -1.2989619299138109057e-3)}, + {FN (sinh), ARG(2.0e+00,-6.28284004019658492979e+00), RES(3.6268601916692946552e0, 1.2989619299138109057e-3)}, + {FN (sinh), ARG(-2.0e+00,6.28284004019658492979e+00), RES(-3.6268601916692946552e0, -1.2989619299138109057e-3)}, + {FN (sinh), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(-3.6268601916692946552e0, 1.2989619299138109057e-3)}, + {FN (sinh), ARG(2.0e+00,6.28353057416258753420e+00), RES(3.6268601916692946558e0, 1.2989619299119679614e-3)}, + {FN (sinh), ARG(2.0e+00,-6.28353057416258753420e+00), RES(3.6268601916692946558e0, -1.2989619299119679614e-3)}, + {FN (sinh), ARG(-2.0e+00,6.28353057416258753420e+00), RES(-3.6268601916692946558e0, 1.2989619299119679614e-3)}, + {FN (sinh), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(-3.6268601916692946558e0, -1.2989619299119679614e-3)}, + {FN (sinh), ARG(2.0e+00,9.42443269378637893396e+00), RES(-3.6268601916692946561e0, 1.2989619299109301409e-3)}, + {FN (sinh), ARG(2.0e+00,-9.42443269378637893396e+00), RES(-3.6268601916692946561e0, -1.2989619299109301409e-3)}, + {FN (sinh), ARG(-2.0e+00,9.42443269378637893396e+00), RES(3.6268601916692946561e0, 1.2989619299109301409e-3)}, + {FN (sinh), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(3.6268601916692946561e0, -1.2989619299109301409e-3)}, + {FN (sinh), ARG(2.0e+00,9.42512322775237976202e+00), RES(-3.6268601916692946571e0, -1.2989619299081657245e-3)}, + {FN (sinh), ARG(2.0e+00,-9.42512322775237976202e+00), RES(-3.6268601916692946571e0, 1.2989619299081657245e-3)}, + {FN (sinh), ARG(-2.0e+00,9.42512322775237976202e+00), RES(3.6268601916692946571e0, -1.2989619299081657245e-3)}, + {FN (sinh), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(3.6268601916692946571e0, 1.2989619299081657245e-3)}, + {FN (cosh), ARG(0.0e+00,-3.45266983001243932001e-04), RES(9.9999994039535581673e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,3.45266983001243932001e-04), RES(9.9999994039535581673e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,1.57045105981189525579e+00), RES(3.4526697614152485627e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,-1.57045105981189525579e+00), RES(3.4526697614152485627e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,1.57114159377789786021e+00), RES(-3.4526697614140239160e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,-1.57114159377789786021e+00), RES(-3.4526697614140239160e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,3.14124738660679181379e+00), RES(-9.9999994039535581667e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-3.14124738660679181379e+00), RES(-9.9999994039535581667e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,3.14193792057279441821e+00), RES(-9.9999994039535581675e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-3.14193792057279441821e+00), RES(-9.9999994039535581675e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,4.71204371340168837179e+00), RES(-3.4526697614164732094e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,-4.71204371340168837179e+00), RES(-3.4526697614164732094e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,4.71273424736769097620e+00), RES(3.4526697614127992692e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,-4.71273424736769097620e+00), RES(3.4526697614127992692e-4, 0.0)}, + {FN (cosh), ARG(0.0e+00,6.28284004019658492979e+00), RES(9.9999994039535581662e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-6.28284004019658492979e+00), RES(9.9999994039535581662e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,6.28353057416258753420e+00), RES(9.9999994039535581679e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-6.28353057416258753420e+00), RES(9.9999994039535581679e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,9.42443269378637893396e+00), RES(-9.9999994039535581689e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-9.42443269378637893396e+00), RES(-9.9999994039535581689e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,9.42512322775237976202e+00), RES(-9.9999994039535581714e-1, 0.0)}, + {FN (cosh), ARG(0.0e+00,-9.42512322775237976202e+00), RES(-9.9999994039535581714e-1, 0.0)}, + {FN (cosh), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(9.9999994039536292216e-1, -4.1159030931163569191e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(9.9999994039536292216e-1, 4.1159030931163569191e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(9.9999994039536292216e-1, 4.1159030931163569191e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(9.9999994039536292216e-1, -4.1159030931163569191e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(3.4526697614152730954e-4, 1.1920928244535424532e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(3.4526697614152730954e-4, -1.1920928244535424532e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(3.4526697614152730954e-4, -1.1920928244535424532e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(3.4526697614152730954e-4, 1.1920928244535424532e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(-3.4526697614140484486e-4, 1.1920928244535424533e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-3.4526697614140484486e-4, -1.1920928244535424533e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(-3.4526697614140484486e-4, -1.1920928244535424533e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-3.4526697614140484486e-4, 1.1920928244535424533e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(-9.9999994039536292209e-1, 4.1159030931185115142e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-9.9999994039536292209e-1, -4.1159030931185115142e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(-9.9999994039536292209e-1, -4.1159030931185115142e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-9.9999994039536292209e-1, 4.1159030931185115142e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(-9.9999994039536292218e-1, -4.1159030931155917289e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-9.9999994039536292218e-1, 4.1159030931155917289e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(-9.9999994039536292218e-1, 4.1159030931155917289e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-9.9999994039536292218e-1, -4.1159030931155917289e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(-3.4526697614164977421e-4, -1.1920928244535424532e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-3.4526697614164977421e-4, 1.1920928244535424532e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(-3.4526697614164977421e-4, 1.1920928244535424532e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-3.4526697614164977421e-4, -1.1920928244535424532e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(3.4526697614128238019e-4, -1.1920928244535424533e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(3.4526697614128238019e-4, 1.1920928244535424533e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(3.4526697614128238019e-4, 1.1920928244535424533e-7)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(3.4526697614128238019e-4, -1.1920928244535424533e-7)}, + {FN (cosh), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(9.9999994039536292205e-1, -4.1159030931199714069e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(9.9999994039536292205e-1, 4.1159030931199714069e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(9.9999994039536292205e-1, 4.1159030931199714069e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(9.9999994039536292205e-1, -4.1159030931199714069e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(9.9999994039536292222e-1, 4.1159030931141318362e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(9.9999994039536292222e-1, -4.1159030931141318362e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(9.9999994039536292222e-1, -4.1159030931141318362e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(9.9999994039536292222e-1, 4.1159030931141318362e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(-9.9999994039536292231e-1, 4.1159030931108433883e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-9.9999994039536292231e-1, -4.1159030931108433883e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(-9.9999994039536292231e-1, -4.1159030931108433883e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-9.9999994039536292231e-1, 4.1159030931108433883e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(-9.9999994039536292257e-1, -4.1159030931020840323e-11)}, + {FN (cosh), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-9.9999994039536292257e-1, 4.1159030931020840323e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(-9.9999994039536292257e-1, 4.1159030931020840323e-11)}, + {FN (cosh), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-9.9999994039536292257e-1, -4.1159030931020840323e-11)}, + {FN (cosh), ARG(5.0e-01,-3.45266983001243932001e-04), RES(1.1276258979946363573e0, -1.7991700040930800151e-4)}, + {FN (cosh), ARG(5.0e-01,3.45266983001243932001e-04), RES(1.1276258979946363573e0, 1.7991700040930800151e-4)}, + {FN (cosh), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(1.1276258979946363573e0, 1.7991700040930800151e-4)}, + {FN (cosh), ARG(-5.0e-01,3.45266983001243932001e-04), RES(1.1276258979946363573e0, -1.7991700040930800151e-4)}, + {FN (cosh), ARG(5.0e-01,1.57045105981189525579e+00), RES(3.8933200722547541227e-4, 5.2109527443404709207e-1)}, + {FN (cosh), ARG(5.0e-01,-1.57045105981189525579e+00), RES(3.8933200722547541227e-4, -5.2109527443404709207e-1)}, + {FN (cosh), ARG(-5.0e-01,1.57045105981189525579e+00), RES(3.8933200722547541227e-4, -5.2109527443404709207e-1)}, + {FN (cosh), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(3.8933200722547541227e-4, 5.2109527443404709207e-1)}, + {FN (cosh), ARG(5.0e-01,1.57114159377789786021e+00), RES(-3.8933200722533731792e-4, 5.2109527443404709209e-1)}, + {FN (cosh), ARG(5.0e-01,-1.57114159377789786021e+00), RES(-3.8933200722533731792e-4, -5.2109527443404709209e-1)}, + {FN (cosh), ARG(-5.0e-01,1.57114159377789786021e+00), RES(-3.8933200722533731792e-4, -5.2109527443404709209e-1)}, + {FN (cosh), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(-3.8933200722533731792e-4, 5.2109527443404709209e-1)}, + {FN (cosh), ARG(5.0e-01,3.14124738660679181379e+00), RES(-1.1276258979946363572e0, 1.7991700040940218455e-4)}, + {FN (cosh), ARG(5.0e-01,-3.14124738660679181379e+00), RES(-1.1276258979946363572e0, -1.7991700040940218455e-4)}, + {FN (cosh), ARG(-5.0e-01,3.14124738660679181379e+00), RES(-1.1276258979946363572e0, -1.7991700040940218455e-4)}, + {FN (cosh), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(-1.1276258979946363572e0, 1.7991700040940218455e-4)}, + {FN (cosh), ARG(5.0e-01,3.14193792057279441821e+00), RES(-1.1276258979946363573e0, -1.7991700040927455302e-4)}, + {FN (cosh), ARG(5.0e-01,-3.14193792057279441821e+00), RES(-1.1276258979946363573e0, 1.7991700040927455302e-4)}, + {FN (cosh), ARG(-5.0e-01,3.14193792057279441821e+00), RES(-1.1276258979946363573e0, 1.7991700040927455302e-4)}, + {FN (cosh), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(-1.1276258979946363573e0, -1.7991700040927455302e-4)}, + {FN (cosh), ARG(5.0e-01,4.71204371340168837179e+00), RES(-3.8933200722561350661e-4, -5.2109527443404709205e-1)}, + {FN (cosh), ARG(5.0e-01,-4.71204371340168837179e+00), RES(-3.8933200722561350661e-4, 5.2109527443404709205e-1)}, + {FN (cosh), ARG(-5.0e-01,4.71204371340168837179e+00), RES(-3.8933200722561350661e-4, 5.2109527443404709205e-1)}, + {FN (cosh), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(-3.8933200722561350661e-4, -5.2109527443404709205e-1)}, + {FN (cosh), ARG(5.0e-01,4.71273424736769097620e+00), RES(3.8933200722519922358e-4, -5.2109527443404709212e-1)}, + {FN (cosh), ARG(5.0e-01,-4.71273424736769097620e+00), RES(3.8933200722519922358e-4, 5.2109527443404709212e-1)}, + {FN (cosh), ARG(-5.0e-01,4.71273424736769097620e+00), RES(3.8933200722519922358e-4, 5.2109527443404709212e-1)}, + {FN (cosh), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(3.8933200722519922358e-4, -5.2109527443404709212e-1)}, + {FN (cosh), ARG(5.0e-01,6.28284004019658492979e+00), RES(1.1276258979946363572e0, -1.7991700040946600032e-4)}, + {FN (cosh), ARG(5.0e-01,-6.28284004019658492979e+00), RES(1.1276258979946363572e0, 1.7991700040946600032e-4)}, + {FN (cosh), ARG(-5.0e-01,6.28284004019658492979e+00), RES(1.1276258979946363572e0, 1.7991700040946600032e-4)}, + {FN (cosh), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(1.1276258979946363572e0, -1.7991700040946600032e-4)}, + {FN (cosh), ARG(5.0e-01,6.28353057416258753420e+00), RES(1.1276258979946363574e0, 1.7991700040921073725e-4)}, + {FN (cosh), ARG(5.0e-01,-6.28353057416258753420e+00), RES(1.1276258979946363574e0, -1.7991700040921073725e-4)}, + {FN (cosh), ARG(-5.0e-01,6.28353057416258753420e+00), RES(1.1276258979946363574e0, -1.7991700040921073725e-4)}, + {FN (cosh), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(1.1276258979946363574e0, 1.7991700040921073725e-4)}, + {FN (cosh), ARG(5.0e-01,9.42443269378637893396e+00), RES(-1.1276258979946363575e0, 1.7991700040906699050e-4)}, + {FN (cosh), ARG(5.0e-01,-9.42443269378637893396e+00), RES(-1.1276258979946363575e0, -1.7991700040906699050e-4)}, + {FN (cosh), ARG(-5.0e-01,9.42443269378637893396e+00), RES(-1.1276258979946363575e0, -1.7991700040906699050e-4)}, + {FN (cosh), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(-1.1276258979946363575e0, 1.7991700040906699050e-4)}, + {FN (cosh), ARG(5.0e-01,9.42512322775237976202e+00), RES(-1.1276258979946363577e0, -1.7991700040868409591e-4)}, + {FN (cosh), ARG(5.0e-01,-9.42512322775237976202e+00), RES(-1.1276258979946363577e0, 1.7991700040868409591e-4)}, + {FN (cosh), ARG(-5.0e-01,9.42512322775237976202e+00), RES(-1.1276258979946363577e0, 1.7991700040868409591e-4)}, + {FN (cosh), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(-1.1276258979946363577e0, -1.7991700040868409591e-4)}, + {FN (cosh), ARG(1.0e+00,-3.45266983001243932001e-04), RES(1.5430805428404715942e0, -4.057581624871654840e-4)}, + {FN (cosh), ARG(1.0e+00,3.45266983001243932001e-04), RES(1.5430805428404715942e0, 4.057581624871654840e-4)}, + {FN (cosh), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(1.5430805428404715942e0, 4.057581624871654840e-4)}, + {FN (cosh), ARG(-1.0e+00,3.45266983001243932001e-04), RES(1.5430805428404715942e0, -4.057581624871654840e-4)}, + {FN (cosh), ARG(1.0e+00,1.57045105981189525579e+00), RES(5.3277478472520380315e-4, 1.1752011235963524659e0)}, + {FN (cosh), ARG(1.0e+00,-1.57045105981189525579e+00), RES(5.3277478472520380315e-4, -1.1752011235963524659e0)}, + {FN (cosh), ARG(-1.0e+00,1.57045105981189525579e+00), RES(5.3277478472520380315e-4, -1.1752011235963524659e0)}, + {FN (cosh), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(5.3277478472520380315e-4, 1.1752011235963524659e0)}, + {FN (cosh), ARG(1.0e+00,1.57114159377789786021e+00), RES(-5.3277478472501483029e-4, 1.1752011235963524660e0)}, + {FN (cosh), ARG(1.0e+00,-1.57114159377789786021e+00), RES(-5.3277478472501483029e-4, -1.1752011235963524660e0)}, + {FN (cosh), ARG(-1.0e+00,1.57114159377789786021e+00), RES(-5.3277478472501483029e-4, -1.1752011235963524660e0)}, + {FN (cosh), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(-5.3277478472501483029e-4, 1.1752011235963524660e0)}, + {FN (cosh), ARG(1.0e+00,3.14124738660679181379e+00), RES(-1.5430805428404715941e0, 4.0575816248737789049e-4)}, + {FN (cosh), ARG(1.0e+00,-3.14124738660679181379e+00), RES(-1.5430805428404715941e0, -4.0575816248737789049e-4)}, + {FN (cosh), ARG(-1.0e+00,3.14124738660679181379e+00), RES(-1.5430805428404715941e0, -4.0575816248737789049e-4)}, + {FN (cosh), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(-1.5430805428404715941e0, 4.0575816248737789049e-4)}, + {FN (cosh), ARG(1.0e+00,3.14193792057279441821e+00), RES(-1.5430805428404715943e0, -4.0575816248709004923e-4)}, + {FN (cosh), ARG(1.0e+00,-3.14193792057279441821e+00), RES(-1.5430805428404715943e0, 4.0575816248709004923e-4)}, + {FN (cosh), ARG(-1.0e+00,3.14193792057279441821e+00), RES(-1.5430805428404715943e0, 4.0575816248709004923e-4)}, + {FN (cosh), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(-1.5430805428404715943e0, -4.0575816248709004923e-4)}, + {FN (cosh), ARG(1.0e+00,4.71204371340168837179e+00), RES(-5.3277478472539277601e-4, -1.1752011235963524659e0)}, + {FN (cosh), ARG(1.0e+00,-4.71204371340168837179e+00), RES(-5.3277478472539277601e-4, 1.1752011235963524659e0)}, + {FN (cosh), ARG(-1.0e+00,4.71204371340168837179e+00), RES(-5.3277478472539277601e-4, 1.1752011235963524659e0)}, + {FN (cosh), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(-5.3277478472539277601e-4, -1.1752011235963524659e0)}, + {FN (cosh), ARG(1.0e+00,4.71273424736769097620e+00), RES(5.3277478472482585742e-4, -1.1752011235963524660e0)}, + {FN (cosh), ARG(1.0e+00,-4.71273424736769097620e+00), RES(5.3277478472482585742e-4, 1.1752011235963524660e0)}, + {FN (cosh), ARG(-1.0e+00,4.71273424736769097620e+00), RES(5.3277478472482585742e-4, 1.1752011235963524660e0)}, + {FN (cosh), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(5.3277478472482585742e-4, -1.1752011235963524660e0)}, + {FN (cosh), ARG(1.0e+00,6.28284004019658492979e+00), RES(1.5430805428404715941e0, -4.0575816248752181112e-4)}, + {FN (cosh), ARG(1.0e+00,-6.28284004019658492979e+00), RES(1.5430805428404715941e0, 4.0575816248752181112e-4)}, + {FN (cosh), ARG(-1.0e+00,6.28284004019658492979e+00), RES(1.5430805428404715941e0, 4.0575816248752181112e-4)}, + {FN (cosh), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(1.5430805428404715941e0, -4.0575816248752181112e-4)}, + {FN (cosh), ARG(1.0e+00,6.28353057416258753420e+00), RES(1.5430805428404715943e0, 4.0575816248694612861e-4)}, + {FN (cosh), ARG(1.0e+00,-6.28353057416258753420e+00), RES(1.5430805428404715943e0, -4.0575816248694612861e-4)}, + {FN (cosh), ARG(-1.0e+00,6.28353057416258753420e+00), RES(1.5430805428404715943e0, -4.0575816248694612861e-4)}, + {FN (cosh), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(1.5430805428404715943e0, 4.0575816248694612861e-4)}, + {FN (cosh), ARG(1.0e+00,9.42443269378637893396e+00), RES(-1.5430805428404715945e0, 4.0575816248662194348e-4)}, + {FN (cosh), ARG(1.0e+00,-9.42443269378637893396e+00), RES(-1.5430805428404715945e0, -4.0575816248662194348e-4)}, + {FN (cosh), ARG(-1.0e+00,9.42443269378637893396e+00), RES(-1.5430805428404715945e0, -4.0575816248662194348e-4)}, + {FN (cosh), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(-1.5430805428404715945e0, 4.0575816248662194348e-4)}, + {FN (cosh), ARG(1.0e+00,9.42512322775237976202e+00), RES(-1.5430805428404715949e0, -4.0575816248575841970e-4)}, + {FN (cosh), ARG(1.0e+00,-9.42512322775237976202e+00), RES(-1.5430805428404715949e0, 4.0575816248575841970e-4)}, + {FN (cosh), ARG(-1.0e+00,9.42512322775237976202e+00), RES(-1.5430805428404715949e0, 4.0575816248575841970e-4)}, + {FN (cosh), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(-1.5430805428404715949e0, -4.0575816248575841970e-4)}, + {FN (cosh), ARG(2.0e+00,-3.45266983001243932001e-04), RES(3.7621954668392959447e0, -1.2522351259043242989e-3)}, + {FN (cosh), ARG(2.0e+00,3.45266983001243932001e-04), RES(3.7621954668392959447e0, 1.2522351259043242989e-3)}, + {FN (cosh), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(3.7621954668392959447e0, 1.2522351259043242989e-3)}, + {FN (cosh), ARG(-2.0e+00,3.45266983001243932001e-04), RES(3.7621954668392959447e0, -1.2522351259043242989e-3)}, + {FN (cosh), ARG(2.0e+00,1.57045105981189525579e+00), RES(1.2989619299131198016e-3, 3.6268601916692946554e0)}, + {FN (cosh), ARG(2.0e+00,-1.57045105981189525579e+00), RES(1.2989619299131198016e-3, -3.6268601916692946554e0)}, + {FN (cosh), ARG(-2.0e+00,1.57045105981189525579e+00), RES(1.2989619299131198016e-3, -3.6268601916692946554e0)}, + {FN (cosh), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(1.2989619299131198016e-3, 3.6268601916692946554e0)}, + {FN (cosh), ARG(2.0e+00,1.57114159377789786021e+00), RES(-1.2989619299126590655e-3, 3.6268601916692946556e0)}, + {FN (cosh), ARG(2.0e+00,-1.57114159377789786021e+00), RES(-1.2989619299126590655e-3, -3.6268601916692946556e0)}, + {FN (cosh), ARG(-2.0e+00,1.57114159377789786021e+00), RES(-1.2989619299126590655e-3, -3.6268601916692946556e0)}, + {FN (cosh), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(-1.2989619299126590655e-3, 3.6268601916692946556e0)}, + {FN (cosh), ARG(2.0e+00,3.14124738660679181379e+00), RES(-3.7621954668392959444e0, 1.2522351259049798196e-3)}, + {FN (cosh), ARG(2.0e+00,-3.14124738660679181379e+00), RES(-3.7621954668392959444e0, -1.2522351259049798196e-3)}, + {FN (cosh), ARG(-2.0e+00,3.14124738660679181379e+00), RES(-3.7621954668392959444e0, -1.2522351259049798196e-3)}, + {FN (cosh), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(-3.7621954668392959444e0, 1.2522351259049798196e-3)}, + {FN (cosh), ARG(2.0e+00,3.14193792057279441821e+00), RES(-3.7621954668392959448e0, -1.2522351259040914950e-3)}, + {FN (cosh), ARG(2.0e+00,-3.14193792057279441821e+00), RES(-3.7621954668392959448e0, 1.2522351259040914950e-3)}, + {FN (cosh), ARG(-2.0e+00,3.14193792057279441821e+00), RES(-3.7621954668392959448e0, 1.2522351259040914950e-3)}, + {FN (cosh), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(-3.7621954668392959448e0, -1.2522351259040914950e-3)}, + {FN (cosh), ARG(2.0e+00,4.71204371340168837179e+00), RES(-1.2989619299135805376e-3, -3.6268601916692946552e0)}, + {FN (cosh), ARG(2.0e+00,-4.71204371340168837179e+00), RES(-1.2989619299135805376e-3, 3.6268601916692946552e0)}, + {FN (cosh), ARG(-2.0e+00,4.71204371340168837179e+00), RES(-1.2989619299135805376e-3, 3.6268601916692946552e0)}, + {FN (cosh), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(-1.2989619299135805376e-3, -3.6268601916692946552e0)}, + {FN (cosh), ARG(2.0e+00,4.71273424736769097620e+00), RES(1.2989619299121983294e-3, -3.6268601916692946557e0)}, + {FN (cosh), ARG(2.0e+00,-4.71273424736769097620e+00), RES(1.2989619299121983294e-3, 3.6268601916692946557e0)}, + {FN (cosh), ARG(-2.0e+00,4.71273424736769097620e+00), RES(1.2989619299121983294e-3, 3.6268601916692946557e0)}, + {FN (cosh), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(1.2989619299121983294e-3, -3.6268601916692946557e0)}, + {FN (cosh), ARG(2.0e+00,6.28284004019658492979e+00), RES(3.7621954668392959443e0, -1.2522351259054239819e-3)}, + {FN (cosh), ARG(2.0e+00,-6.28284004019658492979e+00), RES(3.7621954668392959443e0, 1.2522351259054239819e-3)}, + {FN (cosh), ARG(-2.0e+00,6.28284004019658492979e+00), RES(3.7621954668392959443e0, 1.2522351259054239819e-3)}, + {FN (cosh), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(3.7621954668392959443e0, -1.2522351259054239819e-3)}, + {FN (cosh), ARG(2.0e+00,6.28353057416258753420e+00), RES(3.7621954668392959449e0, 1.2522351259036473328e-3)}, + {FN (cosh), ARG(2.0e+00,-6.28353057416258753420e+00), RES(3.7621954668392959449e0, -1.2522351259036473328e-3)}, + {FN (cosh), ARG(-2.0e+00,6.28353057416258753420e+00), RES(3.7621954668392959449e0, -1.2522351259036473328e-3)}, + {FN (cosh), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(3.7621954668392959449e0, 1.2522351259036473328e-3)}, + {FN (cosh), ARG(2.0e+00,9.42443269378637893396e+00), RES(-3.7621954668392959453e0, 1.2522351259026468452e-3)}, + {FN (cosh), ARG(2.0e+00,-9.42443269378637893396e+00), RES(-3.7621954668392959453e0, -1.2522351259026468452e-3)}, + {FN (cosh), ARG(-2.0e+00,9.42443269378637893396e+00), RES(-3.7621954668392959453e0, -1.2522351259026468452e-3)}, + {FN (cosh), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(-3.7621954668392959453e0, 1.2522351259026468452e-3)}, + {FN (cosh), ARG(2.0e+00,9.42512322775237976202e+00), RES(-3.7621954668392959462e0, -1.2522351258999818715e-3)}, + {FN (cosh), ARG(2.0e+00,-9.42512322775237976202e+00), RES(-3.7621954668392959462e0, 1.2522351258999818715e-3)}, + {FN (cosh), ARG(-2.0e+00,9.42512322775237976202e+00), RES(-3.7621954668392959462e0, 1.2522351258999818715e-3)}, + {FN (cosh), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(-3.7621954668392959462e0, -1.2522351258999818715e-3)}, + {FN (tanh), ARG(0.0e+00,-3.45266983001243932001e-04), RES(0, -3.4526699672092183585e-4)}, + {FN (tanh), ARG(0.0e+00,3.45266983001243932001e-04), RES(0, 3.4526699672092183585e-4)}, + {FN (tanh), ARG(0.0e+00,1.57045105981189525579e+00), RES(0, 2.8963092606501007060e3)}, + {FN (tanh), ARG(0.0e+00,-1.57045105981189525579e+00), RES(0, -2.8963092606501007060e3)}, + {FN (tanh), ARG(0.0e+00,1.57114159377789786021e+00), RES(0, -2.8963092606511280143e3)}, + {FN (tanh), ARG(0.0e+00,-1.57114159377789786021e+00), RES(0, 2.8963092606511280143e3)}, + {FN (tanh), ARG(0.0e+00,3.14124738660679181379e+00), RES(0, -3.4526699672110257641e-4)}, + {FN (tanh), ARG(0.0e+00,-3.14124738660679181379e+00), RES(0, 3.4526699672110257641e-4)}, + {FN (tanh), ARG(0.0e+00,3.14193792057279441821e+00), RES(0, 3.4526699672085764703e-4)}, + {FN (tanh), ARG(0.0e+00,-3.14193792057279441821e+00), RES(0, -3.4526699672085764703e-4)}, + {FN (tanh), ARG(0.0e+00,4.71204371340168837179e+00), RES(0, 2.8963092606490733978e3)}, + {FN (tanh), ARG(0.0e+00,-4.71204371340168837179e+00), RES(0, -2.8963092606490733978e3)}, + {FN (tanh), ARG(0.0e+00,4.71273424736769097620e+00), RES(0, -2.8963092606521553225e3)}, + {FN (tanh), ARG(0.0e+00,-4.71273424736769097620e+00), RES(0, 2.8963092606521553225e3)}, + {FN (tanh), ARG(0.0e+00,6.28284004019658492979e+00), RES(0, -3.4526699672122504111e-4)}, + {FN (tanh), ARG(0.0e+00,-6.28284004019658492979e+00), RES(0, 3.4526699672122504111e-4)}, + {FN (tanh), ARG(0.0e+00,6.28353057416258753420e+00), RES(0, 3.4526699672073518233e-4)}, + {FN (tanh), ARG(0.0e+00,-6.28353057416258753420e+00), RES(0, -3.4526699672073518233e-4)}, + {FN (tanh), ARG(0.0e+00,9.42443269378637893396e+00), RES(0, -3.4526699672045932728e-4)}, + {FN (tanh), ARG(0.0e+00,-9.42443269378637893396e+00), RES(0, 3.4526699672045932728e-4)}, + {FN (tanh), ARG(0.0e+00,9.42512322775237976202e+00), RES(0, 3.4526699671972453911e-4)}, + {FN (tanh), ARG(0.0e+00,-9.42512322775237976202e+00), RES(0, -3.4526699671972453911e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(1.1920930376163652989e-7, -3.4526699672091692931e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(1.1920930376163652989e-7, 3.4526699672091692931e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(-1.1920930376163652989e-7, -3.4526699672091692931e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(-1.1920930376163652989e-7, 3.4526699672091692931e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(9.9999992052646305569e-1, 2.8963089153831588642e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(9.9999992052646305569e-1, -2.8963089153831588642e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(-9.9999992052646305569e-1, 2.8963089153831588642e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(-9.9999992052646305569e-1, -2.8963089153831588642e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(9.9999992052717244672e-1, -2.8963089153841861720e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(9.9999992052717244672e-1, 2.8963089153841861720e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(-9.9999992052717244672e-1, -2.8963089153841861720e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-9.9999992052717244672e-1, 2.8963089153841861720e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(1.1920930376163652991e-7, -3.4526699672109766987e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(1.1920930376163652991e-7, 3.4526699672109766987e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(-1.1920930376163652991e-7, -3.4526699672109766987e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-1.1920930376163652991e-7, 3.4526699672109766987e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(1.1920930376163652989e-7, 3.4526699672085274049e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(1.1920930376163652989e-7, -3.4526699672085274049e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(-1.1920930376163652989e-7, 3.4526699672085274049e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-1.1920930376163652989e-7, -3.4526699672085274049e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(9.9999992052575366466e-1, 2.8963089153821315563e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(9.9999992052575366466e-1, -2.8963089153821315563e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(-9.9999992052575366466e-1, 2.8963089153821315563e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-9.9999992052575366466e-1, -2.8963089153821315563e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(9.9999992052788183776e-1, -2.8963089153852134799e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(9.9999992052788183776e-1, 2.8963089153852134799e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(-9.9999992052788183776e-1, -2.8963089153852134799e3)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(-9.9999992052788183776e-1, 2.8963089153852134799e3)}, + {FN (tanh), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(1.1920930376163652992e-7, -3.4526699672122013457e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(1.1920930376163652992e-7, 3.4526699672122013457e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(-1.1920930376163652992e-7, -3.4526699672122013457e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(-1.1920930376163652992e-7, 3.4526699672122013457e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(1.1920930376163652988e-7, 3.4526699672073027579e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(1.1920930376163652988e-7, -3.4526699672073027579e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(-1.1920930376163652988e-7, 3.4526699672073027579e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(-1.1920930376163652988e-7, -3.4526699672073027579e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(1.1920930376163652985e-7, -3.4526699672045442074e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(1.1920930376163652985e-7, 3.4526699672045442074e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(-1.1920930376163652985e-7, -3.4526699672045442074e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-1.1920930376163652985e-7, 3.4526699672045442074e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(1.1920930376163652979e-7, 3.4526699671971963257e-4)}, + {FN (tanh), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(1.1920930376163652979e-7, -3.4526699671971963257e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(-1.1920930376163652979e-7, 3.4526699671971963257e-4)}, + {FN (tanh), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-1.1920930376163652979e-7, -3.4526699671971963257e-4)}, + {FN (tanh), ARG(5.0e-01,-3.45266983001243932001e-04), RES(4.6211720058436229979e-1, -2.7153443992655805934e-4)}, + {FN (tanh), ARG(5.0e-01,3.45266983001243932001e-04), RES(4.6211720058436229979e-1, 2.7153443992655805934e-4)}, + {FN (tanh), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(-4.6211720058436229979e-1, -2.7153443992655805934e-4)}, + {FN (tanh), ARG(-5.0e-01,3.45266983001243932001e-04), RES(-4.6211720058436229979e-1, 2.7153443992655805934e-4)}, + {FN (tanh), ARG(5.0e-01,1.57045105981189525579e+00), RES(2.1639524637389325996e0, 1.2715121175455623363e-3)}, + {FN (tanh), ARG(5.0e-01,-1.57045105981189525579e+00), RES(2.1639524637389325996e0, -1.2715121175455623363e-3)}, + {FN (tanh), ARG(-5.0e-01,1.57045105981189525579e+00), RES(-2.1639524637389325996e0, 1.2715121175455623363e-3)}, + {FN (tanh), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(-2.1639524637389325996e0, -1.2715121175455623363e-3)}, + {FN (tanh), ARG(5.0e-01,1.57114159377789786021e+00), RES(2.1639524637389326002e0, -1.2715121175451113370e-3)}, + {FN (tanh), ARG(5.0e-01,-1.57114159377789786021e+00), RES(2.1639524637389326002e0, 1.2715121175451113370e-3)}, + {FN (tanh), ARG(-5.0e-01,1.57114159377789786021e+00), RES(-2.1639524637389326002e0, -1.2715121175451113370e-3)}, + {FN (tanh), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(-2.1639524637389326002e0, 1.2715121175451113370e-3)}, + {FN (tanh), ARG(5.0e-01,3.14124738660679181379e+00), RES(4.6211720058436229984e-1, -2.7153443992670020234e-4)}, + {FN (tanh), ARG(5.0e-01,-3.14124738660679181379e+00), RES(4.6211720058436229984e-1, 2.7153443992670020234e-4)}, + {FN (tanh), ARG(-5.0e-01,3.14124738660679181379e+00), RES(-4.6211720058436229984e-1, -2.7153443992670020234e-4)}, + {FN (tanh), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(-4.6211720058436229984e-1, 2.7153443992670020234e-4)}, + {FN (tanh), ARG(5.0e-01,3.14193792057279441821e+00), RES(4.6211720058436229978e-1, 2.7153443992650757820e-4)}, + {FN (tanh), ARG(5.0e-01,-3.14193792057279441821e+00), RES(4.6211720058436229978e-1, -2.7153443992650757820e-4)}, + {FN (tanh), ARG(-5.0e-01,3.14193792057279441821e+00), RES(-4.6211720058436229978e-1, 2.7153443992650757820e-4)}, + {FN (tanh), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(-4.6211720058436229978e-1, -2.7153443992650757820e-4)}, + {FN (tanh), ARG(5.0e-01,4.71204371340168837179e+00), RES(2.1639524637389325989e0, 1.2715121175460133355e-3)}, + {FN (tanh), ARG(5.0e-01,-4.71204371340168837179e+00), RES(2.1639524637389325989e0, -1.2715121175460133355e-3)}, + {FN (tanh), ARG(-5.0e-01,4.71204371340168837179e+00), RES(-2.1639524637389325989e0, 1.2715121175460133355e-3)}, + {FN (tanh), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(-2.1639524637389325989e0, -1.2715121175460133355e-3)}, + {FN (tanh), ARG(5.0e-01,4.71273424736769097620e+00), RES(2.1639524637389326009e0, -1.2715121175446603377e-3)}, + {FN (tanh), ARG(5.0e-01,-4.71273424736769097620e+00), RES(2.1639524637389326009e0, 1.2715121175446603377e-3)}, + {FN (tanh), ARG(-5.0e-01,4.71273424736769097620e+00), RES(-2.1639524637389326009e0, -1.2715121175446603377e-3)}, + {FN (tanh), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(-2.1639524637389326009e0, 1.2715121175446603377e-3)}, + {FN (tanh), ARG(5.0e-01,6.28284004019658492979e+00), RES(4.6211720058436229987e-1, -2.7153443992679651442e-4)}, + {FN (tanh), ARG(5.0e-01,-6.28284004019658492979e+00), RES(4.6211720058436229987e-1, 2.7153443992679651442e-4)}, + {FN (tanh), ARG(-5.0e-01,6.28284004019658492979e+00), RES(-4.6211720058436229987e-1, -2.7153443992679651442e-4)}, + {FN (tanh), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(-4.6211720058436229987e-1, 2.7153443992679651442e-4)}, + {FN (tanh), ARG(5.0e-01,6.28353057416258753420e+00), RES(4.6211720058436229974e-1, 2.7153443992641126612e-4)}, + {FN (tanh), ARG(5.0e-01,-6.28353057416258753420e+00), RES(4.6211720058436229974e-1, -2.7153443992641126612e-4)}, + {FN (tanh), ARG(-5.0e-01,6.28353057416258753420e+00), RES(-4.6211720058436229974e-1, 2.7153443992641126612e-4)}, + {FN (tanh), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(-4.6211720058436229974e-1, -2.7153443992641126612e-4)}, + {FN (tanh), ARG(5.0e-01,9.42443269378637893396e+00), RES(4.6211720058436229968e-1, -2.7153443992619432056e-4)}, + {FN (tanh), ARG(5.0e-01,-9.42443269378637893396e+00), RES(4.6211720058436229968e-1, 2.7153443992619432056e-4)}, + {FN (tanh), ARG(-5.0e-01,9.42443269378637893396e+00), RES(-4.6211720058436229968e-1, -2.7153443992619432056e-4)}, + {FN (tanh), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(-4.6211720058436229968e-1, 2.7153443992619432056e-4)}, + {FN (tanh), ARG(5.0e-01,9.42512322775237976202e+00), RES(4.6211720058436229949e-1, 2.7153443992561644811e-4)}, + {FN (tanh), ARG(5.0e-01,-9.42512322775237976202e+00), RES(4.6211720058436229949e-1, -2.7153443992561644811e-4)}, + {FN (tanh), ARG(-5.0e-01,9.42512322775237976202e+00), RES(-4.6211720058436229949e-1, 2.7153443992561644811e-4)}, + {FN (tanh), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(-4.6211720058436229949e-1, -2.7153443992561644811e-4)}, + {FN (tanh), ARG(1.0e+00,-3.45266983001243932001e-04), RES(7.6159419408485704836e-1, -1.4500326960274960880e-4)}, + {FN (tanh), ARG(1.0e+00,3.45266983001243932001e-04), RES(7.6159419408485704836e-1, 1.4500326960274960880e-4)}, + {FN (tanh), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(-7.6159419408485704836e-1, -1.4500326960274960880e-4)}, + {FN (tanh), ARG(-1.0e+00,3.45266983001243932001e-04), RES(-7.6159419408485704836e-1, 1.4500326960274960880e-4)}, + {FN (tanh), ARG(1.0e+00,1.57045105981189525579e+00), RES(1.3130351721648674823e0, 2.4999454374276273814e-4)}, + {FN (tanh), ARG(1.0e+00,-1.57045105981189525579e+00), RES(1.3130351721648674823e0, -2.4999454374276273814e-4)}, + {FN (tanh), ARG(-1.0e+00,1.57045105981189525579e+00), RES(-1.3130351721648674823e0, 2.4999454374276273814e-4)}, + {FN (tanh), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(-1.3130351721648674823e0, -2.4999454374276273814e-4)}, + {FN (tanh), ARG(1.0e+00,1.57114159377789786021e+00), RES(1.3130351721648674824e0, -2.4999454374267406620e-4)}, + {FN (tanh), ARG(1.0e+00,-1.57114159377789786021e+00), RES(1.3130351721648674824e0, 2.4999454374267406620e-4)}, + {FN (tanh), ARG(-1.0e+00,1.57114159377789786021e+00), RES(-1.3130351721648674824e0, -2.4999454374267406620e-4)}, + {FN (tanh), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(-1.3130351721648674824e0, 2.4999454374267406620e-4)}, + {FN (tanh), ARG(1.0e+00,3.14124738660679181379e+00), RES(7.6159419408485704840e-1, -1.4500326960282551519e-4)}, + {FN (tanh), ARG(1.0e+00,-3.14124738660679181379e+00), RES(7.6159419408485704840e-1, 1.4500326960282551519e-4)}, + {FN (tanh), ARG(-1.0e+00,3.14124738660679181379e+00), RES(-7.6159419408485704840e-1, -1.4500326960282551519e-4)}, + {FN (tanh), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(-7.6159419408485704840e-1, 1.4500326960282551519e-4)}, + {FN (tanh), ARG(1.0e+00,3.14193792057279441821e+00), RES(7.6159419408485704835e-1, 1.4500326960272265115e-4)}, + {FN (tanh), ARG(1.0e+00,-3.14193792057279441821e+00), RES(7.6159419408485704835e-1, -1.4500326960272265115e-4)}, + {FN (tanh), ARG(-1.0e+00,3.14193792057279441821e+00), RES(-7.6159419408485704835e-1, 1.4500326960272265115e-4)}, + {FN (tanh), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(-7.6159419408485704835e-1, -1.4500326960272265115e-4)}, + {FN (tanh), ARG(1.0e+00,4.71204371340168837179e+00), RES(1.3130351721648674822e0, 2.4999454374285141007e-4)}, + {FN (tanh), ARG(1.0e+00,-4.71204371340168837179e+00), RES(1.3130351721648674822e0, -2.4999454374285141007e-4)}, + {FN (tanh), ARG(-1.0e+00,4.71204371340168837179e+00), RES(-1.3130351721648674822e0, 2.4999454374285141007e-4)}, + {FN (tanh), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(-1.3130351721648674822e0, -2.4999454374285141007e-4)}, + {FN (tanh), ARG(1.0e+00,4.71273424736769097620e+00), RES(1.3130351721648674825e0, -2.4999454374258539427e-4)}, + {FN (tanh), ARG(1.0e+00,-4.71273424736769097620e+00), RES(1.3130351721648674825e0, 2.4999454374258539427e-4)}, + {FN (tanh), ARG(-1.0e+00,4.71273424736769097620e+00), RES(-1.3130351721648674825e0, -2.4999454374258539427e-4)}, + {FN (tanh), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(-1.3130351721648674825e0, 2.4999454374258539427e-4)}, + {FN (tanh), ARG(1.0e+00,6.28284004019658492979e+00), RES(7.6159419408485704843e-1, -1.4500326960287694721e-4)}, + {FN (tanh), ARG(1.0e+00,-6.28284004019658492979e+00), RES(7.6159419408485704843e-1, 1.4500326960287694721e-4)}, + {FN (tanh), ARG(-1.0e+00,6.28284004019658492979e+00), RES(-7.6159419408485704843e-1, -1.4500326960287694721e-4)}, + {FN (tanh), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(-7.6159419408485704843e-1, 1.4500326960287694721e-4)}, + {FN (tanh), ARG(1.0e+00,6.28353057416258753420e+00), RES(7.6159419408485704832e-1, 1.4500326960267121913e-4)}, + {FN (tanh), ARG(1.0e+00,-6.28353057416258753420e+00), RES(7.6159419408485704832e-1, -1.4500326960267121913e-4)}, + {FN (tanh), ARG(-1.0e+00,6.28353057416258753420e+00), RES(-7.6159419408485704832e-1, 1.4500326960267121913e-4)}, + {FN (tanh), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(-7.6159419408485704832e-1, -1.4500326960267121913e-4)}, + {FN (tanh), ARG(1.0e+00,9.42443269378637893396e+00), RES(7.6159419408485704826e-1, -1.4500326960255536711e-4)}, + {FN (tanh), ARG(1.0e+00,-9.42443269378637893396e+00), RES(7.6159419408485704826e-1, 1.4500326960255536711e-4)}, + {FN (tanh), ARG(-1.0e+00,9.42443269378637893396e+00), RES(-7.6159419408485704826e-1, -1.4500326960255536711e-4)}, + {FN (tanh), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(-7.6159419408485704826e-1, 1.4500326960255536711e-4)}, + {FN (tanh), ARG(1.0e+00,9.42512322775237976202e+00), RES(7.6159419408485704810e-1, 1.450032696022467750e-4)}, + {FN (tanh), ARG(1.0e+00,-9.42512322775237976202e+00), RES(7.6159419408485704810e-1, -1.450032696022467750e-4)}, + {FN (tanh), ARG(-1.0e+00,9.42512322775237976202e+00), RES(-7.6159419408485704810e-1, 1.450032696022467750e-4)}, + {FN (tanh), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(-7.6159419408485704810e-1, -1.450032696022467750e-4)}, + {FN (tanh), ARG(2.0e+00,-3.45266983001243932001e-04), RES(9.6402758819508310556e-1, -2.4393395410435306874e-5)}, + {FN (tanh), ARG(2.0e+00,3.45266983001243932001e-04), RES(9.6402758819508310556e-1, 2.4393395410435306874e-5)}, + {FN (tanh), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(-9.6402758819508310556e-1, -2.4393395410435306874e-5)}, + {FN (tanh), ARG(-2.0e+00,3.45266983001243932001e-04), RES(-9.6402758819508310556e-1, 2.4393395410435306874e-5)}, + {FN (tanh), ARG(2.0e+00,1.57045105981189525579e+00), RES(1.0373147113268752620e0, 2.6247825506572821595e-5)}, + {FN (tanh), ARG(2.0e+00,-1.57045105981189525579e+00), RES(1.0373147113268752620e0, -2.6247825506572821595e-5)}, + {FN (tanh), ARG(-2.0e+00,1.57045105981189525579e+00), RES(-1.0373147113268752620e0, 2.6247825506572821595e-5)}, + {FN (tanh), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(-1.0373147113268752620e0, -2.6247825506572821595e-5)}, + {FN (tanh), ARG(2.0e+00,1.57114159377789786021e+00), RES(1.0373147113268752620e0, -2.6247825506563511609e-5)}, + {FN (tanh), ARG(2.0e+00,-1.57114159377789786021e+00), RES(1.0373147113268752620e0, 2.6247825506563511609e-5)}, + {FN (tanh), ARG(-2.0e+00,1.57114159377789786021e+00), RES(-1.0373147113268752620e0, -2.6247825506563511609e-5)}, + {FN (tanh), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(-1.0373147113268752620e0, 2.6247825506563511609e-5)}, + {FN (tanh), ARG(2.0e+00,3.14124738660679181379e+00), RES(9.6402758819508310557e-1, -2.4393395410448076340e-5)}, + {FN (tanh), ARG(2.0e+00,-3.14124738660679181379e+00), RES(9.6402758819508310557e-1, 2.4393395410448076340e-5)}, + {FN (tanh), ARG(-2.0e+00,3.14124738660679181379e+00), RES(-9.6402758819508310557e-1, -2.4393395410448076340e-5)}, + {FN (tanh), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(-9.6402758819508310557e-1, 2.4393395410448076340e-5)}, + {FN (tanh), ARG(2.0e+00,3.14193792057279441821e+00), RES(9.6402758819508310556e-1, 2.4393395410430771882e-5)}, + {FN (tanh), ARG(2.0e+00,-3.14193792057279441821e+00), RES(9.6402758819508310556e-1, -2.4393395410430771882e-5)}, + {FN (tanh), ARG(-2.0e+00,3.14193792057279441821e+00), RES(-9.6402758819508310556e-1, 2.4393395410430771882e-5)}, + {FN (tanh), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(-9.6402758819508310556e-1, -2.4393395410430771882e-5)}, + {FN (tanh), ARG(2.0e+00,4.71204371340168837179e+00), RES(1.0373147113268752620e0, 2.6247825506582131582e-5)}, + {FN (tanh), ARG(2.0e+00,-4.71204371340168837179e+00), RES(1.0373147113268752620e0, -2.6247825506582131582e-5)}, + {FN (tanh), ARG(-2.0e+00,4.71204371340168837179e+00), RES(-1.0373147113268752620e0, 2.6247825506582131582e-5)}, + {FN (tanh), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(-1.0373147113268752620e0, -2.6247825506582131582e-5)}, + {FN (tanh), ARG(2.0e+00,4.71273424736769097620e+00), RES(1.0373147113268752620e0, -2.6247825506554201622e-5)}, + {FN (tanh), ARG(2.0e+00,-4.71273424736769097620e+00), RES(1.0373147113268752620e0, 2.6247825506554201622e-5)}, + {FN (tanh), ARG(-2.0e+00,4.71273424736769097620e+00), RES(-1.0373147113268752620e0, -2.6247825506554201622e-5)}, + {FN (tanh), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(-1.0373147113268752620e0, 2.6247825506554201622e-5)}, + {FN (tanh), ARG(2.0e+00,6.28284004019658492979e+00), RES(9.6402758819508310558e-1, -2.4393395410456728569e-5)}, + {FN (tanh), ARG(2.0e+00,-6.28284004019658492979e+00), RES(9.6402758819508310558e-1, 2.4393395410456728569e-5)}, + {FN (tanh), ARG(-2.0e+00,6.28284004019658492979e+00), RES(-9.6402758819508310558e-1, -2.4393395410456728569e-5)}, + {FN (tanh), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(-9.6402758819508310558e-1, 2.4393395410456728569e-5)}, + {FN (tanh), ARG(2.0e+00,6.28353057416258753420e+00), RES(9.6402758819508310555e-1, 2.4393395410422119654e-5)}, + {FN (tanh), ARG(2.0e+00,-6.28353057416258753420e+00), RES(9.6402758819508310555e-1, -2.4393395410422119654e-5)}, + {FN (tanh), ARG(-2.0e+00,6.28353057416258753420e+00), RES(-9.6402758819508310555e-1, 2.4393395410422119654e-5)}, + {FN (tanh), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(-9.6402758819508310555e-1, -2.4393395410422119654e-5)}, + {FN (tanh), ARG(2.0e+00,9.42443269378637893396e+00), RES(9.6402758819508310554e-1, -2.4393395410402630273e-5)}, + {FN (tanh), ARG(2.0e+00,-9.42443269378637893396e+00), RES(9.6402758819508310554e-1, 2.4393395410402630273e-5)}, + {FN (tanh), ARG(-2.0e+00,9.42443269378637893396e+00), RES(-9.6402758819508310554e-1, -2.4393395410402630273e-5)}, + {FN (tanh), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(-9.6402758819508310554e-1, 2.4393395410402630273e-5)}, + {FN (tanh), ARG(2.0e+00,9.42512322775237976202e+00), RES(9.6402758819508310550e-1, 2.439339541035071690e-5)}, + {FN (tanh), ARG(2.0e+00,-9.42512322775237976202e+00), RES(9.6402758819508310550e-1, -2.439339541035071690e-5)}, + {FN (tanh), ARG(-2.0e+00,9.42512322775237976202e+00), RES(-9.6402758819508310550e-1, 2.439339541035071690e-5)}, + {FN (tanh), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(-9.6402758819508310550e-1, -2.439339541035071690e-5)}, + {FN (arcsinh), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arcsinh), ARG(0.0e+00,1.19209289550781250e-07), RES(0, 1.1920928955078153234e-7)}, + {FN (arcsinh), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, -1.1920928955078153234e-7)}, + {FN (arcsinh), ARG(0.0e+00,5.0e-01), RES(0, 5.2359877559829887308e-1)}, + {FN (arcsinh), ARG(0.0e+00,-5.0e-01), RES(0, -5.2359877559829887308e-1)}, + {FN (arcsinh), ARG(0.0e+00,1.0e+00), RES(0, 1.5707963267948966192e0)}, + {FN (arcsinh), ARG(0.0e+00,-1.0e+00), RES(0, -1.5707963267948966192e0)}, + {FN (arcsinh), ARG(0.0e+00,2.0e+00), RES(1.3169578969248167086e0, 1.5707963267948966192e0)}, + {FN (arcsinh), ARG(0.0e+00,-2.0e+00), RES(-1.3169578969248167086e0, -1.5707963267948966192e0)}, + {FN (arcsinh), ARG(0.0e+00,8.3886080e+06), RES(1.6635532333438683873e1, 1.5707963267948966192e0)}, + {FN (arcsinh), ARG(0.0e+00,-8.3886080e+06), RES(-1.6635532333438683873e1, -1.5707963267948966192e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078096766e-7, 0.0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.1920928955078096766e-7, 0.0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078181469e-7, 1.1920928955078068531e-7)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078181469e-7, -1.1920928955078068531e-7)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.1920928955078181469e-7, 1.1920928955078068531e-7)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.1920928955078181469e-7, -1.1920928955078068531e-7)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,5.0e-01), RES(1.3765103082409432364e-7, 5.2359877559829340332e-1)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.3765103082409432364e-7, -5.2359877559829340332e-1)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,5.0e-01), RES(-1.3765103082409432364e-7, 5.2359877559829340332e-1)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.3765103082409432364e-7, -5.2359877559829340332e-1)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,1.0e+00), RES(3.4526698643116312881e-4, 1.5704510598153252947e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,-1.0e+00), RES(3.4526698643116312881e-4, -1.5704510598153252947e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,1.0e+00), RES(-3.4526698643116312881e-4, 1.5704510598153252947e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-3.4526698643116312881e-4, -1.5704510598153252947e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,2.0e+00), RES(1.3169578969248194435e0, 1.5707962579693812072e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.3169578969248194435e0, -1.5707962579693812072e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,2.0e+00), RES(-1.3169578969248194435e0, 1.5707962579693812072e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-1.3169578969248194435e0, -1.5707962579693812072e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6635532333438683873e1, 1.5707963267948824084e0)}, + {FN (arcsinh), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6635532333438683873e1, -1.5707963267948824084e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6635532333438683873e1, 1.5707963267948824084e0)}, + {FN (arcsinh), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6635532333438683873e1, -1.5707963267948824084e0)}, + {FN (arcsinh), ARG(5.0e-01,0.0e+00), RES(4.8121182505960344750e-1, 0.0)}, + {FN (arcsinh), ARG(-5.0e-01,0.0e+00), RES(-4.8121182505960344750e-1, 0.0)}, + {FN (arcsinh), ARG(5.0e-01,1.19209289550781250e-07), RES(4.8121182505960598961e-1, 1.0662402999400097805e-7)}, + {FN (arcsinh), ARG(5.0e-01,-1.19209289550781250e-07), RES(4.8121182505960598961e-1, -1.0662402999400097805e-7)}, + {FN (arcsinh), ARG(-5.0e-01,1.19209289550781250e-07), RES(-4.8121182505960598961e-1, 1.0662402999400097805e-7)}, + {FN (arcsinh), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-4.8121182505960598961e-1, -1.0662402999400097805e-7)}, + {FN (arcsinh), ARG(5.0e-01,5.0e-01), RES(5.3063753095251782602e-1, 4.5227844715119068206e-1)}, + {FN (arcsinh), ARG(5.0e-01,-5.0e-01), RES(5.3063753095251782602e-1, -4.5227844715119068206e-1)}, + {FN (arcsinh), ARG(-5.0e-01,5.0e-01), RES(-5.3063753095251782602e-1, 4.5227844715119068206e-1)}, + {FN (arcsinh), ARG(-5.0e-01,-5.0e-01), RES(-5.3063753095251782602e-1, -4.5227844715119068206e-1)}, + {FN (arcsinh), ARG(5.0e-01,1.0e+00), RES(7.3285767597364526089e-1, 8.9590748120889023907e-1)}, + {FN (arcsinh), ARG(5.0e-01,-1.0e+00), RES(7.3285767597364526089e-1, -8.9590748120889023907e-1)}, + {FN (arcsinh), ARG(-5.0e-01,1.0e+00), RES(-7.3285767597364526089e-1, 8.9590748120889023907e-1)}, + {FN (arcsinh), ARG(-5.0e-01,-1.0e+00), RES(-7.3285767597364526089e-1, -8.9590748120889023907e-1)}, + {FN (arcsinh), ARG(5.0e-01,2.0e+00), RES(1.3618009008578457882e0, 1.2930420702371826591e0)}, + {FN (arcsinh), ARG(5.0e-01,-2.0e+00), RES(1.3618009008578457882e0, -1.2930420702371826591e0)}, + {FN (arcsinh), ARG(-5.0e-01,2.0e+00), RES(-1.3618009008578457882e0, 1.2930420702371826591e0)}, + {FN (arcsinh), ARG(-5.0e-01,-2.0e+00), RES(-1.3618009008578457882e0, -1.2930420702371826591e0)}, + {FN (arcsinh), ARG(5.0e-01,8.3886080e+06), RES(1.6635532333438685650e1, 1.5707962671902518438e0)}, + {FN (arcsinh), ARG(5.0e-01,-8.3886080e+06), RES(1.6635532333438685650e1, -1.5707962671902518438e0)}, + {FN (arcsinh), ARG(-5.0e-01,8.3886080e+06), RES(-1.6635532333438685650e1, 1.5707962671902518438e0)}, + {FN (arcsinh), ARG(-5.0e-01,-8.3886080e+06), RES(-1.6635532333438685650e1, -1.5707962671902518438e0)}, + {FN (arcsinh), ARG(1.0e+00,0.0e+00), RES(8.8137358701954302523e-1, 0.0)}, + {FN (arcsinh), ARG(-1.0e+00,0.0e+00), RES(-8.8137358701954302523e-1, 0.0)}, + {FN (arcsinh), ARG(1.0e+00,1.19209289550781250e-07), RES(8.8137358701954553738e-1, 8.4293697021788013662e-8)}, + {FN (arcsinh), ARG(1.0e+00,-1.19209289550781250e-07), RES(8.8137358701954553738e-1, -8.4293697021788013662e-8)}, + {FN (arcsinh), ARG(-1.0e+00,1.19209289550781250e-07), RES(-8.8137358701954553738e-1, 8.4293697021788013662e-8)}, + {FN (arcsinh), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-8.8137358701954553738e-1, -8.4293697021788013662e-8)}, + {FN (arcsinh), ARG(1.0e+00,5.0e-01), RES(9.2613303135018242455e-1, 3.4943906285721329363e-1)}, + {FN (arcsinh), ARG(1.0e+00,-5.0e-01), RES(9.2613303135018242455e-1, -3.4943906285721329363e-1)}, + {FN (arcsinh), ARG(-1.0e+00,5.0e-01), RES(-9.2613303135018242455e-1, 3.4943906285721329363e-1)}, + {FN (arcsinh), ARG(-1.0e+00,-5.0e-01), RES(-9.2613303135018242455e-1, -3.4943906285721329363e-1)}, + {FN (arcsinh), ARG(1.0e+00,1.0e+00), RES(1.0612750619050356520e0, 6.6623943249251525510e-1)}, + {FN (arcsinh), ARG(1.0e+00,-1.0e+00), RES(1.0612750619050356520e0, -6.6623943249251525510e-1)}, + {FN (arcsinh), ARG(-1.0e+00,1.0e+00), RES(-1.0612750619050356520e0, 6.6623943249251525510e-1)}, + {FN (arcsinh), ARG(-1.0e+00,-1.0e+00), RES(-1.0612750619050356520e0, -6.6623943249251525510e-1)}, + {FN (arcsinh), ARG(1.0e+00,2.0e+00), RES(1.4693517443681852733e0, 1.0634400235777520562e0)}, + {FN (arcsinh), ARG(1.0e+00,-2.0e+00), RES(1.4693517443681852733e0, -1.0634400235777520562e0)}, + {FN (arcsinh), ARG(-1.0e+00,2.0e+00), RES(-1.4693517443681852733e0, 1.0634400235777520562e0)}, + {FN (arcsinh), ARG(-1.0e+00,-2.0e+00), RES(-1.4693517443681852733e0, -1.0634400235777520562e0)}, + {FN (arcsinh), ARG(1.0e+00,8.3886080e+06), RES(1.6635532333438690979e1, 1.5707962075856070684e0)}, + {FN (arcsinh), ARG(1.0e+00,-8.3886080e+06), RES(1.6635532333438690979e1, -1.5707962075856070684e0)}, + {FN (arcsinh), ARG(-1.0e+00,8.3886080e+06), RES(-1.6635532333438690979e1, 1.5707962075856070684e0)}, + {FN (arcsinh), ARG(-1.0e+00,-8.3886080e+06), RES(-1.6635532333438690979e1, -1.5707962075856070684e0)}, + {FN (arcsinh), ARG(2.0e+00,0.0e+00), RES(1.4436354751788103425e0, 0.0)}, + {FN (arcsinh), ARG(-2.0e+00,0.0e+00), RES(-1.4436354751788103425e0, 0.0)}, + {FN (arcsinh), ARG(2.0e+00,1.19209289550781250e-07), RES(1.4436354751788116136e0, 5.3312014997000413263e-8)}, + {FN (arcsinh), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.4436354751788116136e0, -5.3312014997000413263e-8)}, + {FN (arcsinh), ARG(-2.0e+00,1.19209289550781250e-07), RES(-1.4436354751788116136e0, 5.3312014997000413263e-8)}, + {FN (arcsinh), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-1.4436354751788116136e0, -5.3312014997000413263e-8)}, + {FN (arcsinh), ARG(2.0e+00,5.0e-01), RES(1.4657153519472905218e0, 2.2101863562288385890e-1)}, + {FN (arcsinh), ARG(2.0e+00,-5.0e-01), RES(1.4657153519472905218e0, -2.2101863562288385890e-1)}, + {FN (arcsinh), ARG(-2.0e+00,5.0e-01), RES(-1.4657153519472905218e0, 2.2101863562288385890e-1)}, + {FN (arcsinh), ARG(-2.0e+00,-5.0e-01), RES(-1.4657153519472905218e0, -2.2101863562288385890e-1)}, + {FN (arcsinh), ARG(2.0e+00,1.0e+00), RES(1.5285709194809981613e0, 4.2707858639247612548e-1)}, + {FN (arcsinh), ARG(2.0e+00,-1.0e+00), RES(1.5285709194809981613e0, -4.2707858639247612548e-1)}, + {FN (arcsinh), ARG(-2.0e+00,1.0e+00), RES(-1.5285709194809981613e0, 4.2707858639247612548e-1)}, + {FN (arcsinh), ARG(-2.0e+00,-1.0e+00), RES(-1.5285709194809981613e0, -4.2707858639247612548e-1)}, + {FN (arcsinh), ARG(2.0e+00,2.0e+00), RES(1.7343245214879664480e0, 7.5424914469804604071e-1)}, + {FN (arcsinh), ARG(2.0e+00,-2.0e+00), RES(1.7343245214879664480e0, -7.5424914469804604071e-1)}, + {FN (arcsinh), ARG(-2.0e+00,2.0e+00), RES(-1.7343245214879664480e0, 7.5424914469804604071e-1)}, + {FN (arcsinh), ARG(-2.0e+00,-2.0e+00), RES(-1.7343245214879664480e0, -7.5424914469804604071e-1)}, + {FN (arcsinh), ARG(2.0e+00,8.3886080e+06), RES(1.6635532333438712295e1, 1.5707960883763175177e0)}, + {FN (arcsinh), ARG(2.0e+00,-8.3886080e+06), RES(1.6635532333438712295e1, -1.5707960883763175177e0)}, + {FN (arcsinh), ARG(-2.0e+00,8.3886080e+06), RES(-1.6635532333438712295e1, 1.5707960883763175177e0)}, + {FN (arcsinh), ARG(-2.0e+00,-8.3886080e+06), RES(-1.6635532333438712295e1, -1.5707960883763175177e0)}, + {FN (arcsinh), ARG(8.3886080e+06,0.0e+00), RES(1.6635532333438690979e1, 0.0)}, + {FN (arcsinh), ARG(-8.3886080e+06,0.0e+00), RES(-1.6635532333438690979e1, 0.0)}, + {FN (arcsinh), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.6635532333438690979e1, 1.4210854715201902743e-14)}, + {FN (arcsinh), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.6635532333438690979e1, -1.4210854715201902743e-14)}, + {FN (arcsinh), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.6635532333438690979e1, 1.4210854715201902743e-14)}, + {FN (arcsinh), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.6635532333438690979e1, -1.4210854715201902743e-14)}, + {FN (arcsinh), ARG(8.3886080e+06,5.0e-01), RES(1.6635532333438692755e1, 5.9604644775390130897e-8)}, + {FN (arcsinh), ARG(8.3886080e+06,-5.0e-01), RES(1.6635532333438692755e1, -5.9604644775390130897e-8)}, + {FN (arcsinh), ARG(-8.3886080e+06,5.0e-01), RES(-1.6635532333438692755e1, 5.9604644775390130897e-8)}, + {FN (arcsinh), ARG(-8.3886080e+06,-5.0e-01), RES(-1.6635532333438692755e1, -5.9604644775390130897e-8)}, + {FN (arcsinh), ARG(8.3886080e+06,1.0e+00), RES(1.6635532333438698084e1, 1.1920928955077983828e-7)}, + {FN (arcsinh), ARG(8.3886080e+06,-1.0e+00), RES(1.6635532333438698084e1, -1.1920928955077983828e-7)}, + {FN (arcsinh), ARG(-8.3886080e+06,1.0e+00), RES(-1.6635532333438698084e1, 1.1920928955077983828e-7)}, + {FN (arcsinh), ARG(-8.3886080e+06,-1.0e+00), RES(-1.6635532333438698084e1, -1.1920928955077983828e-7)}, + {FN (arcsinh), ARG(8.3886080e+06,2.0e+00), RES(1.663553233343871940e1, 2.3841857910155628843e-7)}, + {FN (arcsinh), ARG(8.3886080e+06,-2.0e+00), RES(1.663553233343871940e1, -2.3841857910155628843e-7)}, + {FN (arcsinh), ARG(-8.3886080e+06,2.0e+00), RES(-1.663553233343871940e1, 2.3841857910155628843e-7)}, + {FN (arcsinh), ARG(-8.3886080e+06,-2.0e+00), RES(-1.663553233343871940e1, -2.3841857910155628843e-7)}, + {FN (arcsinh), ARG(8.3886080e+06,8.3886080e+06), RES(1.6982105923718660081e1, 7.8539816339744653326e-1)}, + {FN (arcsinh), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6982105923718660081e1, -7.8539816339744653326e-1)}, + {FN (arcsinh), ARG(-8.3886080e+06,8.3886080e+06), RES(-1.6982105923718660081e1, 7.8539816339744653326e-1)}, + {FN (arcsinh), ARG(-8.3886080e+06,-8.3886080e+06), RES(-1.6982105923718660081e1, -7.8539816339744653326e-1)}, + {FN (arccosh), ARG(0.0e+00,0.0e+00), RES(0, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,1.19209289550781250e-07), RES(1.1920928955078096766e-7, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.1920928955078096766e-7, -1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,5.0e-01), RES(4.8121182505960344750e-1, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,-5.0e-01), RES(4.8121182505960344750e-1, -1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,1.0e+00), RES(8.8137358701954302523e-1, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,-1.0e+00), RES(8.8137358701954302523e-1, -1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,2.0e+00), RES(1.4436354751788103425e0, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,-2.0e+00), RES(1.4436354751788103425e0, -1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,8.3886080e+06), RES(1.6635532333438690979e1, 1.5707963267948966192e0)}, + {FN (arccosh), ARG(0.0e+00,-8.3886080e+06), RES(1.6635532333438690979e1, -1.5707963267948966192e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,0.0e+00), RES(0, 1.5707962075856070684e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,0.0e+00), RES(0, 1.570796446004186170e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078181469e-7, 1.5707962075856070685e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078181469e-7, -1.5707962075856070685e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078181469e-7, 1.570796446004186170e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078181469e-7, -1.570796446004186170e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,5.0e-01), RES(4.8121182505960598961e-1, 1.5707962201708666252e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,-5.0e-01), RES(4.8121182505960598961e-1, -1.5707962201708666252e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,5.0e-01), RES(4.8121182505960598961e-1, 1.5707964334189266132e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,-5.0e-01), RES(4.8121182505960598961e-1, -1.5707964334189266132e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,1.0e+00), RES(8.8137358701954553738e-1, 1.5707962425011995974e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,-1.0e+00), RES(8.8137358701954553738e-1, -1.5707962425011995974e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,1.0e+00), RES(8.8137358701954553738e-1, 1.5707964110885936410e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,-1.0e+00), RES(8.8137358701954553738e-1, -1.5707964110885936410e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,2.0e+00), RES(1.4436354751788116136e0, 1.5707962734828816222e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.4436354751788116136e0, -1.5707962734828816222e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,2.0e+00), RES(1.4436354751788116136e0, 1.5707963801069116162e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,-2.0e+00), RES(1.4436354751788116136e0, -1.5707963801069116162e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6635532333438690979e1, 1.5707963267948824084e0)}, + {FN (arccosh), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6635532333438690979e1, -1.5707963267948824084e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.6635532333438690979e1, 1.5707963267949108301e0)}, + {FN (arccosh), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.6635532333438690979e1, -1.5707963267949108301e0)}, + {FN (arccosh), ARG(5.0e-01,0.0e+00), RES(0, 1.0471975511965977462e0)}, + {FN (arccosh), ARG(-5.0e-01,0.0e+00), RES(0, 2.0943951023931954923e0)}, + {FN (arccosh), ARG(5.0e-01,1.19209289550781250e-07), RES(1.3765103082409432364e-7, 1.0471975511966032159e0)}, + {FN (arccosh), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.3765103082409432364e-7, -1.0471975511966032159e0)}, + {FN (arccosh), ARG(-5.0e-01,1.19209289550781250e-07), RES(1.3765103082409432364e-7, 2.0943951023931900225e0)}, + {FN (arccosh), ARG(-5.0e-01,-1.19209289550781250e-07), RES(1.3765103082409432364e-7, -2.0943951023931900225e0)}, + {FN (arccosh), ARG(5.0e-01,5.0e-01), RES(5.3063753095251782602e-1, 1.1185178796437059372e0)}, + {FN (arccosh), ARG(5.0e-01,-5.0e-01), RES(5.3063753095251782602e-1, -1.1185178796437059372e0)}, + {FN (arccosh), ARG(-5.0e-01,5.0e-01), RES(5.3063753095251782602e-1, 2.0230747739460873013e0)}, + {FN (arccosh), ARG(-5.0e-01,-5.0e-01), RES(5.3063753095251782602e-1, -2.0230747739460873013e0)}, + {FN (arccosh), ARG(5.0e-01,1.0e+00), RES(9.2613303135018242455e-1, 1.2213572639376833256e0)}, + {FN (arccosh), ARG(5.0e-01,-1.0e+00), RES(9.2613303135018242455e-1, -1.2213572639376833256e0)}, + {FN (arccosh), ARG(-5.0e-01,1.0e+00), RES(9.2613303135018242455e-1, 1.9202353896521099129e0)}, + {FN (arccosh), ARG(-5.0e-01,-1.0e+00), RES(9.2613303135018242455e-1, -1.9202353896521099129e0)}, + {FN (arccosh), ARG(5.0e-01,2.0e+00), RES(1.4657153519472905218e0, 1.3497776911720127603e0)}, + {FN (arccosh), ARG(5.0e-01,-2.0e+00), RES(1.4657153519472905218e0, -1.3497776911720127603e0)}, + {FN (arccosh), ARG(-5.0e-01,2.0e+00), RES(1.4657153519472905218e0, 1.7918149624177804781e0)}, + {FN (arccosh), ARG(-5.0e-01,-2.0e+00), RES(1.4657153519472905218e0, -1.7918149624177804781e0)}, + {FN (arccosh), ARG(5.0e-01,8.3886080e+06), RES(1.6635532333438692755e1, 1.5707962671902518438e0)}, + {FN (arccosh), ARG(5.0e-01,-8.3886080e+06), RES(1.6635532333438692755e1, -1.5707962671902518438e0)}, + {FN (arccosh), ARG(-5.0e-01,8.3886080e+06), RES(1.6635532333438692755e1, 1.5707963863995413946e0)}, + {FN (arccosh), ARG(-5.0e-01,-8.3886080e+06), RES(1.6635532333438692755e1, -1.5707963863995413946e0)}, + {FN (arccosh), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arccosh), ARG(-1.0e+00,0.0e+00), RES(0, 3.1415926535897932385e0)}, + {FN (arccosh), ARG(1.0e+00,1.19209289550781250e-07), RES(3.4526698643116312881e-4, 3.4526697957132450399e-4)}, + {FN (arccosh), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.4526698643116312881e-4, -3.4526697957132450399e-4)}, + {FN (arccosh), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.4526698643116312881e-4, 3.1412473866102219140e0)}, + {FN (arccosh), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.4526698643116312881e-4, -3.1412473866102219140e0)}, + {FN (arccosh), ARG(1.0e+00,5.0e-01), RES(7.3285767597364526089e-1, 6.7488884558600638016e-1)}, + {FN (arccosh), ARG(1.0e+00,-5.0e-01), RES(7.3285767597364526089e-1, -6.7488884558600638016e-1)}, + {FN (arccosh), ARG(-1.0e+00,5.0e-01), RES(7.3285767597364526089e-1, 2.4667038080037868583e0)}, + {FN (arccosh), ARG(-1.0e+00,-5.0e-01), RES(7.3285767597364526089e-1, -2.4667038080037868583e0)}, + {FN (arccosh), ARG(1.0e+00,1.0e+00), RES(1.0612750619050356520e0, 9.0455689430238136413e-1)}, + {FN (arccosh), ARG(1.0e+00,-1.0e+00), RES(1.0612750619050356520e0, -9.0455689430238136413e-1)}, + {FN (arccosh), ARG(-1.0e+00,1.0e+00), RES(1.0612750619050356520e0, 2.2370357592874118743e0)}, + {FN (arccosh), ARG(-1.0e+00,-1.0e+00), RES(1.0612750619050356520e0, -2.2370357592874118743e0)}, + {FN (arccosh), ARG(1.0e+00,2.0e+00), RES(1.5285709194809981613e0, 1.1437177404024204938e0)}, + {FN (arccosh), ARG(1.0e+00,-2.0e+00), RES(1.5285709194809981613e0, -1.1437177404024204938e0)}, + {FN (arccosh), ARG(-1.0e+00,2.0e+00), RES(1.5285709194809981613e0, 1.9978749131873727447e0)}, + {FN (arccosh), ARG(-1.0e+00,-2.0e+00), RES(1.5285709194809981613e0, -1.9978749131873727447e0)}, + {FN (arccosh), ARG(1.0e+00,8.3886080e+06), RES(1.6635532333438698084e1, 1.5707962075856070685e0)}, + {FN (arccosh), ARG(1.0e+00,-8.3886080e+06), RES(1.6635532333438698084e1, -1.5707962075856070685e0)}, + {FN (arccosh), ARG(-1.0e+00,8.3886080e+06), RES(1.6635532333438698084e1, 1.570796446004186170e0)}, + {FN (arccosh), ARG(-1.0e+00,-8.3886080e+06), RES(1.6635532333438698084e1, -1.570796446004186170e0)}, + {FN (arccosh), ARG(2.0e+00,0.0e+00), RES(1.3169578969248167086e0, 0.0)}, + {FN (arccosh), ARG(-2.0e+00,0.0e+00), RES(1.3169578969248167086e0, 3.1415926535897932385e0)}, + {FN (arccosh), ARG(2.0e+00,1.19209289550781250e-07), RES(1.3169578969248194435e0, 6.8825515412047433504e-8)}, + {FN (arccosh), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.3169578969248194435e0, -6.8825515412047433504e-8)}, + {FN (arccosh), ARG(-2.0e+00,1.19209289550781250e-07), RES(1.3169578969248194435e0, 3.1415925847642778264e0)}, + {FN (arccosh), ARG(-2.0e+00,-1.19209289550781250e-07), RES(1.3169578969248194435e0, -3.1415925847642778264e0)}, + {FN (arccosh), ARG(2.0e+00,5.0e-01), RES(1.3618009008578457882e0, 2.7775425655771396018e-1)}, + {FN (arccosh), ARG(2.0e+00,-5.0e-01), RES(1.3618009008578457882e0, -2.7775425655771396018e-1)}, + {FN (arccosh), ARG(-2.0e+00,5.0e-01), RES(1.3618009008578457882e0, 2.8638383970320792783e0)}, + {FN (arccosh), ARG(-2.0e+00,-5.0e-01), RES(1.3618009008578457882e0, -2.8638383970320792783e0)}, + {FN (arccosh), ARG(2.0e+00,1.0e+00), RES(1.4693517443681852733e0, 5.0735630321714456304e-1)}, + {FN (arccosh), ARG(2.0e+00,-1.0e+00), RES(1.4693517443681852733e0, -5.0735630321714456304e-1)}, + {FN (arccosh), ARG(-2.0e+00,1.0e+00), RES(1.4693517443681852733e0, 2.6342363503726486754e0)}, + {FN (arccosh), ARG(-2.0e+00,-1.0e+00), RES(1.4693517443681852733e0, -2.6342363503726486754e0)}, + {FN (arccosh), ARG(2.0e+00,2.0e+00), RES(1.7343245214879664480e0, 8.1654718209685057852e-1)}, + {FN (arccosh), ARG(2.0e+00,-2.0e+00), RES(1.7343245214879664480e0, -8.1654718209685057852e-1)}, + {FN (arccosh), ARG(-2.0e+00,2.0e+00), RES(1.7343245214879664480e0, 2.3250454714929426599e0)}, + {FN (arccosh), ARG(-2.0e+00,-2.0e+00), RES(1.7343245214879664480e0, -2.3250454714929426599e0)}, + {FN (arccosh), ARG(2.0e+00,8.3886080e+06), RES(1.663553233343871940e1, 1.5707960883763175177e0)}, + {FN (arccosh), ARG(2.0e+00,-8.3886080e+06), RES(1.663553233343871940e1, -1.5707960883763175177e0)}, + {FN (arccosh), ARG(-2.0e+00,8.3886080e+06), RES(1.663553233343871940e1, 1.5707965652134757208e0)}, + {FN (arccosh), ARG(-2.0e+00,-8.3886080e+06), RES(1.663553233343871940e1, -1.5707965652134757208e0)}, + {FN (arccosh), ARG(8.3886080e+06,0.0e+00), RES(1.6635532333438683873e1, 0.0)}, + {FN (arccosh), ARG(-8.3886080e+06,0.0e+00), RES(1.6635532333438683873e1, 3.1415926535897932385e0)}, + {FN (arccosh), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.6635532333438683873e1, 1.4210854715202104692e-14)}, + {FN (arccosh), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.6635532333438683873e1, -1.4210854715202104692e-14)}, + {FN (arccosh), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.6635532333438683873e1, 3.1415926535897790276e0)}, + {FN (arccosh), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.6635532333438683873e1, -3.1415926535897790276e0)}, + {FN (arccosh), ARG(8.3886080e+06,5.0e-01), RES(1.6635532333438685650e1, 5.9604644775390977930e-8)}, + {FN (arccosh), ARG(8.3886080e+06,-5.0e-01), RES(1.6635532333438685650e1, -5.9604644775390977930e-8)}, + {FN (arccosh), ARG(-8.3886080e+06,5.0e-01), RES(1.6635532333438685650e1, 3.1415925939851484631e0)}, + {FN (arccosh), ARG(-8.3886080e+06,-5.0e-01), RES(1.6635532333438685650e1, -3.1415925939851484631e0)}, + {FN (arccosh), ARG(8.3886080e+06,1.0e+00), RES(1.6635532333438690979e1, 1.1920928955078153234e-7)}, + {FN (arccosh), ARG(8.3886080e+06,-1.0e+00), RES(1.6635532333438690979e1, -1.1920928955078153234e-7)}, + {FN (arccosh), ARG(-8.3886080e+06,1.0e+00), RES(1.6635532333438690979e1, 3.1415925343805036877e0)}, + {FN (arccosh), ARG(-8.3886080e+06,-1.0e+00), RES(1.6635532333438690979e1, -3.1415925343805036877e0)}, + {FN (arccosh), ARG(8.3886080e+06,2.0e+00), RES(1.6635532333438712295e1, 2.3841857910155967656e-7)}, + {FN (arccosh), ARG(8.3886080e+06,-2.0e+00), RES(1.6635532333438712295e1, -2.3841857910155967656e-7)}, + {FN (arccosh), ARG(-8.3886080e+06,2.0e+00), RES(1.6635532333438712295e1, 3.1415924151712141369e0)}, + {FN (arccosh), ARG(-8.3886080e+06,-2.0e+00), RES(1.6635532333438712295e1, -3.1415924151712141369e0)}, + {FN (arccosh), ARG(8.3886080e+06,8.3886080e+06), RES(1.6982105923718660081e1, 7.8539816339745008597e-1)}, + {FN (arccosh), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6982105923718660081e1, -7.8539816339745008597e-1)}, + {FN (arccosh), ARG(-8.3886080e+06,8.3886080e+06), RES(1.6982105923718660081e1, 2.3561944901923431525e0)}, + {FN (arccosh), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.6982105923718660081e1, -2.3561944901923431525e0)}, + {FN (arctanh), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arctanh), ARG(0.0e+00,1.19209289550781250e-07), RES(0, 1.1920928955078068531e-7)}, + {FN (arctanh), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, -1.1920928955078068531e-7)}, + {FN (arctanh), ARG(0.0e+00,5.0e-01), RES(0, 4.6364760900080611621e-1)}, + {FN (arctanh), ARG(0.0e+00,-5.0e-01), RES(0, -4.6364760900080611621e-1)}, + {FN (arctanh), ARG(0.0e+00,1.0e+00), RES(0, 7.8539816339744830962e-1)}, + {FN (arctanh), ARG(0.0e+00,-1.0e+00), RES(0, -7.8539816339744830962e-1)}, + {FN (arctanh), ARG(0.0e+00,2.0e+00), RES(0, 1.1071487177940905030e0)}, + {FN (arctanh), ARG(0.0e+00,-2.0e+00), RES(0, -1.1071487177940905030e0)}, + {FN (arctanh), ARG(0.0e+00,8.3886080e+06), RES(0, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(0.0e+00,-8.3886080e+06), RES(0, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078181469e-7, 0.0)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.1920928955078181469e-7, 0.0)}, + {FN (arctanh), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078012062e-7, 1.1920928955078237938e-7)}, + {FN (arctanh), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078012062e-7, -1.1920928955078237938e-7)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.1920928955078012062e-7, 1.1920928955078237938e-7)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.1920928955078012062e-7, -1.1920928955078237938e-7)}, + {FN (arctanh), ARG(1.19209289550781250e-07,5.0e-01), RES(9.5367431640625072280e-8, 4.6364760900081066369e-1)}, + {FN (arctanh), ARG(1.19209289550781250e-07,-5.0e-01), RES(9.5367431640625072280e-8, -4.6364760900081066369e-1)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,5.0e-01), RES(-9.5367431640625072280e-8, 4.6364760900081066369e-1)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-9.5367431640625072280e-8, -4.6364760900081066369e-1)}, + {FN (arctanh), ARG(1.19209289550781250e-07,1.0e+00), RES(5.9604644775390483828e-8, 7.8539816339745186233e-1)}, + {FN (arctanh), ARG(1.19209289550781250e-07,-1.0e+00), RES(5.9604644775390483828e-8, -7.8539816339745186233e-1)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,1.0e+00), RES(-5.9604644775390483828e-8, 7.8539816339745186233e-1)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-5.9604644775390483828e-8, -7.8539816339745186233e-1)}, + {FN (arctanh), ARG(1.19209289550781250e-07,2.0e+00), RES(2.3841857910156200307e-8, 1.1071487177940916399e0)}, + {FN (arctanh), ARG(1.19209289550781250e-07,-2.0e+00), RES(2.3841857910156200307e-8, -1.1071487177940916399e0)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,2.0e+00), RES(-2.3841857910156200307e-8, 1.1071487177940916399e0)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-2.3841857910156200307e-8, -1.1071487177940916399e0)}, + {FN (arctanh), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6940658945085766040e-21, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6940658945085766040e-21, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6940658945085766040e-21, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6940658945085766040e-21, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(5.0e-01,0.0e+00), RES(5.4930614433405484570e-1, 0.0)}, + {FN (arctanh), ARG(-5.0e-01,0.0e+00), RES(-5.4930614433405484570e-1, 0.0)}, + {FN (arctanh), ARG(5.0e-01,1.19209289550781250e-07), RES(5.4930614433404221383e-1, 1.5894571940103932425e-7)}, + {FN (arctanh), ARG(5.0e-01,-1.19209289550781250e-07), RES(5.4930614433404221383e-1, -1.5894571940103932425e-7)}, + {FN (arctanh), ARG(-5.0e-01,1.19209289550781250e-07), RES(-5.4930614433404221383e-1, 1.5894571940103932425e-7)}, + {FN (arctanh), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-5.4930614433404221383e-1, -1.5894571940103932425e-7)}, + {FN (arctanh), ARG(5.0e-01,5.0e-01), RES(4.0235947810852509365e-1, 5.5357435889704525151e-1)}, + {FN (arctanh), ARG(5.0e-01,-5.0e-01), RES(4.0235947810852509365e-1, -5.5357435889704525151e-1)}, + {FN (arctanh), ARG(-5.0e-01,5.0e-01), RES(-4.0235947810852509365e-1, 5.5357435889704525151e-1)}, + {FN (arctanh), ARG(-5.0e-01,-5.0e-01), RES(-4.0235947810852509365e-1, -5.5357435889704525151e-1)}, + {FN (arctanh), ARG(5.0e-01,1.0e+00), RES(2.3887786125685909036e-1, 8.4757566067082902713e-1)}, + {FN (arctanh), ARG(5.0e-01,-1.0e+00), RES(2.3887786125685909036e-1, -8.4757566067082902713e-1)}, + {FN (arctanh), ARG(-5.0e-01,1.0e+00), RES(-2.3887786125685909036e-1, 8.4757566067082902713e-1)}, + {FN (arctanh), ARG(-5.0e-01,-1.0e+00), RES(-2.3887786125685909036e-1, -8.4757566067082902713e-1)}, + {FN (arctanh), ARG(5.0e-01,2.0e+00), RES(9.6415620202996167238e-2, 1.1265564408348223487e0)}, + {FN (arctanh), ARG(5.0e-01,-2.0e+00), RES(9.6415620202996167238e-2, -1.1265564408348223487e0)}, + {FN (arctanh), ARG(-5.0e-01,2.0e+00), RES(-9.6415620202996167238e-2, 1.1265564408348223487e0)}, + {FN (arctanh), ARG(-5.0e-01,-2.0e+00), RES(-9.6415620202996167238e-2, -1.1265564408348223487e0)}, + {FN (arctanh), ARG(5.0e-01,8.3886080e+06), RES(7.1054273576008756410e-15, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(5.0e-01,-8.3886080e+06), RES(7.1054273576008756410e-15, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(-5.0e-01,8.3886080e+06), RES(-7.1054273576008756410e-15, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(-5.0e-01,-8.3886080e+06), RES(-7.1054273576008756410e-15, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(1.0e+00,1.19209289550781250e-07), RES(8.3177661667193446012e0, 7.8539819319977069731e-1)}, + {FN (arctanh), ARG(1.0e+00,-1.19209289550781250e-07), RES(8.3177661667193446012e0, -7.8539819319977069731e-1)}, + {FN (arctanh), ARG(-1.0e+00,1.19209289550781250e-07), RES(-8.3177661667193446012e0, 7.8539819319977069731e-1)}, + {FN (arctanh), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-8.3177661667193446012e0, -7.8539819319977069731e-1)}, + {FN (arctanh), ARG(1.0e+00,5.0e-01), RES(7.0830333601405402006e-1, 9.0788749496088038670e-1)}, + {FN (arctanh), ARG(1.0e+00,-5.0e-01), RES(7.0830333601405402006e-1, -9.0788749496088038670e-1)}, + {FN (arctanh), ARG(-1.0e+00,5.0e-01), RES(-7.0830333601405402006e-1, 9.0788749496088038670e-1)}, + {FN (arctanh), ARG(-1.0e+00,-5.0e-01), RES(-7.0830333601405402006e-1, -9.0788749496088038670e-1)}, + {FN (arctanh), ARG(1.0e+00,1.0e+00), RES(4.0235947810852509365e-1, 1.0172219678978513677e0)}, + {FN (arctanh), ARG(1.0e+00,-1.0e+00), RES(4.0235947810852509365e-1, -1.0172219678978513677e0)}, + {FN (arctanh), ARG(-1.0e+00,1.0e+00), RES(-4.0235947810852509365e-1, 1.0172219678978513677e0)}, + {FN (arctanh), ARG(-1.0e+00,-1.0e+00), RES(-4.0235947810852509365e-1, -1.0172219678978513677e0)}, + {FN (arctanh), ARG(1.0e+00,2.0e+00), RES(1.7328679513998632735e-1, 1.1780972450961724644e0)}, + {FN (arctanh), ARG(1.0e+00,-2.0e+00), RES(1.7328679513998632735e-1, -1.1780972450961724644e0)}, + {FN (arctanh), ARG(-1.0e+00,2.0e+00), RES(-1.7328679513998632735e-1, 1.1780972450961724644e0)}, + {FN (arctanh), ARG(-1.0e+00,-2.0e+00), RES(-1.7328679513998632735e-1, -1.1780972450961724644e0)}, + {FN (arctanh), ARG(1.0e+00,8.3886080e+06), RES(1.4210854715201599821e-14, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(1.0e+00,-8.3886080e+06), RES(1.4210854715201599821e-14, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(-1.0e+00,8.3886080e+06), RES(-1.4210854715201599821e-14, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(-1.0e+00,-8.3886080e+06), RES(-1.4210854715201599821e-14, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(2.0e+00,0.0e+00), RES(5.4930614433405484570e-1, -1.5707963267948966192e0)}, + {FN (arctanh), ARG(-2.0e+00,0.0e+00), RES(-5.4930614433405484570e-1, 1.5707963267948966192e0)}, + {FN (arctanh), ARG(2.0e+00,1.19209289550781250e-07), RES(5.4930614433405168773e-1, 1.5707962870584667690e0)}, + {FN (arctanh), ARG(2.0e+00,-1.19209289550781250e-07), RES(5.4930614433405168773e-1, -1.5707962870584667690e0)}, + {FN (arctanh), ARG(-2.0e+00,1.19209289550781250e-07), RES(-5.4930614433405168773e-1, 1.5707962870584667690e0)}, + {FN (arctanh), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-5.4930614433405168773e-1, -1.5707962870584667690e0)}, + {FN (arctanh), ARG(2.0e+00,5.0e-01), RES(5.0037000005253101744e-1, 1.4215468610018069803e0)}, + {FN (arctanh), ARG(2.0e+00,-5.0e-01), RES(5.0037000005253101744e-1, -1.4215468610018069803e0)}, + {FN (arctanh), ARG(-2.0e+00,5.0e-01), RES(-5.0037000005253101744e-1, 1.4215468610018069803e0)}, + {FN (arctanh), ARG(-2.0e+00,-5.0e-01), RES(-5.0037000005253101744e-1, -1.4215468610018069803e0)}, + {FN (arctanh), ARG(2.0e+00,1.0e+00), RES(4.0235947810852509365e-1, 1.3389725222944935611e0)}, + {FN (arctanh), ARG(2.0e+00,-1.0e+00), RES(4.0235947810852509365e-1, -1.3389725222944935611e0)}, + {FN (arctanh), ARG(-2.0e+00,1.0e+00), RES(-4.0235947810852509365e-1, 1.3389725222944935611e0)}, + {FN (arctanh), ARG(-2.0e+00,-1.0e+00), RES(-4.0235947810852509365e-1, -1.3389725222944935611e0)}, + {FN (arctanh), ARG(2.0e+00,2.0e+00), RES(2.3887786125685909036e-1, 1.3112232696716351433e0)}, + {FN (arctanh), ARG(2.0e+00,-2.0e+00), RES(2.3887786125685909036e-1, -1.3112232696716351433e0)}, + {FN (arctanh), ARG(-2.0e+00,2.0e+00), RES(-2.3887786125685909036e-1, 1.3112232696716351433e0)}, + {FN (arctanh), ARG(-2.0e+00,-2.0e+00), RES(-2.3887786125685909036e-1, -1.3112232696716351433e0)}, + {FN (arctanh), ARG(2.0e+00,8.3886080e+06), RES(2.8421709430401987951e-14, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(2.0e+00,-8.3886080e+06), RES(2.8421709430401987951e-14, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(-2.0e+00,8.3886080e+06), RES(-2.8421709430401987951e-14, 1.5707962075856070685e0)}, + {FN (arctanh), ARG(-2.0e+00,-8.3886080e+06), RES(-2.8421709430401987951e-14, -1.5707962075856070685e0)}, + {FN (arctanh), ARG(8.3886080e+06,0.0e+00), RES(1.1920928955078181469e-7, -1.5707963267948966192e0)}, + {FN (arctanh), ARG(-8.3886080e+06,0.0e+00), RES(-1.1920928955078181469e-7, 1.5707963267948966192e0)}, + {FN (arctanh), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.1920928955078181469e-7, 1.5707963267948966192e0)}, + {FN (arctanh), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.1920928955078181469e-7, -1.5707963267948966192e0)}, + {FN (arctanh), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.1920928955078181469e-7, 1.5707963267948966192e0)}, + {FN (arctanh), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.1920928955078181469e-7, -1.5707963267948966192e0)}, + {FN (arctanh), ARG(8.3886080e+06,5.0e-01), RES(1.1920928955078139117e-7, 1.5707963267948895138e0)}, + {FN (arctanh), ARG(8.3886080e+06,-5.0e-01), RES(1.1920928955078139117e-7, -1.5707963267948895138e0)}, + {FN (arctanh), ARG(-8.3886080e+06,5.0e-01), RES(-1.1920928955078139117e-7, 1.5707963267948895138e0)}, + {FN (arctanh), ARG(-8.3886080e+06,-5.0e-01), RES(-1.1920928955078139117e-7, -1.5707963267948895138e0)}, + {FN (arctanh), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955078012062e-7, 1.5707963267948824084e0)}, + {FN (arctanh), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955078012062e-7, -1.5707963267948824084e0)}, + {FN (arctanh), ARG(-8.3886080e+06,1.0e+00), RES(-1.1920928955078012062e-7, 1.5707963267948824084e0)}, + {FN (arctanh), ARG(-8.3886080e+06,-1.0e+00), RES(-1.1920928955078012062e-7, -1.5707963267948824084e0)}, + {FN (arctanh), ARG(8.3886080e+06,2.0e+00), RES(1.1920928955077503843e-7, 1.5707963267948681975e0)}, + {FN (arctanh), ARG(8.3886080e+06,-2.0e+00), RES(1.1920928955077503843e-7, -1.5707963267948681975e0)}, + {FN (arctanh), ARG(-8.3886080e+06,2.0e+00), RES(-1.1920928955077503843e-7, 1.5707963267948681975e0)}, + {FN (arctanh), ARG(-8.3886080e+06,-2.0e+00), RES(-1.1920928955077503843e-7, -1.5707963267948681975e0)}, + {FN (arctanh), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390483828e-8, 1.5707962671902518438e0)}, + {FN (arctanh), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390483828e-8, -1.5707962671902518438e0)}, + {FN (arctanh), ARG(-8.3886080e+06,8.3886080e+06), RES(-5.9604644775390483828e-8, 1.5707962671902518438e0)}, + {FN (arctanh), ARG(-8.3886080e+06,-8.3886080e+06), RES(-5.9604644775390483828e-8, -1.5707962671902518438e0)}, + {FN (csc), ARG(-3.45266983001243932001e-04,0.0e+00), RES(-2.8963094332845964291e3, 0.0)}, + {FN (csc), ARG(3.45266983001243932001e-04,0.0e+00), RES(2.8963094332845964291e3, 0.0)}, + {FN (csc), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(-2.8963090880176545869e3, -9.9999986092250876926e-1)}, + {FN (csc), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(-2.8963090880176545869e3, 9.9999986092250876926e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(2.8963090880176545869e3, -9.9999986092250876926e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(2.8963090880176545869e3, 9.9999986092250876926e-1)}, + {FN (csc), ARG(-3.45266983001243932001e-04,5.0e-01), RES(-1.4337901642789801243e-3, -1.9190337944739187237e0)}, + {FN (csc), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(-1.4337901642789801243e-3, 1.9190337944739187237e0)}, + {FN (csc), ARG(3.45266983001243932001e-04,5.0e-01), RES(1.4337901642789801243e-3, -1.9190337944739187237e0)}, + {FN (csc), ARG(3.45266983001243932001e-04,-5.0e-01), RES(1.4337901642789801243e-3, 1.9190337944739187237e0)}, + {FN (csc), ARG(-3.45266983001243932001e-04,1.0e+00), RES(-3.8576176225198860914e-4, -8.5091800407377002734e-1)}, + {FN (csc), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(-3.8576176225198860914e-4, 8.5091800407377002734e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,1.0e+00), RES(3.8576176225198860914e-4, -8.5091800407377002734e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,-1.0e+00), RES(3.8576176225198860914e-4, 8.5091800407377002734e-1)}, + {FN (csc), ARG(-3.45266983001243932001e-04,2.0e+00), RES(-9.8749461907035665386e-5, -2.7572054583883740768e-1)}, + {FN (csc), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(-9.8749461907035665386e-5, 2.7572054583883740768e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,2.0e+00), RES(9.8749461907035665386e-5, -2.7572054583883740768e-1)}, + {FN (csc), ARG(3.45266983001243932001e-04,-2.0e+00), RES(9.8749461907035665386e-5, 2.7572054583883740768e-1)}, + {FN (csc), ARG(1.57045105981189525579e+00,0.0e+00), RES(1.0000000596046477360e0, 0.0)}, + {FN (csc), ARG(-1.57045105981189525579e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (csc), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(1.0000000596046406306e0, -4.1159035837716456618e-11)}, + {FN (csc), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(1.0000000596046406306e0, 4.1159035837716456618e-11)}, + {FN (csc), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(-1.0000000596046406306e0, -4.1159035837716456618e-11)}, + {FN (csc), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(-1.0000000596046406306e0, 4.1159035837716456618e-11)}, + {FN (csc), ARG(1.57045105981189525579e+00,5.0e-01), RES(8.8681891425248302487e-1, -1.4149533035943115868e-4)}, + {FN (csc), ARG(1.57045105981189525579e+00,-5.0e-01), RES(8.8681891425248302487e-1, 1.4149533035943115868e-4)}, + {FN (csc), ARG(-1.57045105981189525579e+00,5.0e-01), RES(-8.8681891425248302487e-1, -1.4149533035943115868e-4)}, + {FN (csc), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(-8.8681891425248302487e-1, 1.4149533035943115868e-4)}, + {FN (csc), ARG(1.57045105981189525579e+00,1.0e+00), RES(6.4805426748157480499e-1, -1.7040802567657401279e-4)}, + {FN (csc), ARG(1.57045105981189525579e+00,-1.0e+00), RES(6.4805426748157480499e-1, 1.7040802567657401279e-4)}, + {FN (csc), ARG(-1.57045105981189525579e+00,1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567657401279e-4)}, + {FN (csc), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567657401279e-4)}, + {FN (csc), ARG(1.57045105981189525579e+00,2.0e+00), RES(2.6580221522968095406e-1, -8.8471445300404633228e-5)}, + {FN (csc), ARG(1.57045105981189525579e+00,-2.0e+00), RES(2.6580221522968095406e-1, 8.8471445300404633228e-5)}, + {FN (csc), ARG(-1.57045105981189525579e+00,2.0e+00), RES(-2.6580221522968095406e-1, -8.8471445300404633228e-5)}, + {FN (csc), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(-2.6580221522968095406e-1, 8.8471445300404633228e-5)}, + {FN (csc), ARG(1.57114159377789786021e+00,0.0e+00), RES(1.0000000596046477360e0, 0.0)}, + {FN (csc), ARG(-1.57114159377789786021e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (csc), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(1.0000000596046406306e0, 4.1159035837701857686e-11)}, + {FN (csc), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(1.0000000596046406306e0, -4.1159035837701857686e-11)}, + {FN (csc), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(-1.0000000596046406306e0, 4.1159035837701857686e-11)}, + {FN (csc), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-1.0000000596046406306e0, -4.1159035837701857686e-11)}, + {FN (csc), ARG(1.57114159377789786021e+00,5.0e-01), RES(8.8681891425248302485e-1, 1.4149533035938097090e-4)}, + {FN (csc), ARG(1.57114159377789786021e+00,-5.0e-01), RES(8.8681891425248302485e-1, -1.4149533035938097090e-4)}, + {FN (csc), ARG(-1.57114159377789786021e+00,5.0e-01), RES(-8.8681891425248302485e-1, 1.4149533035938097090e-4)}, + {FN (csc), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(-8.8681891425248302485e-1, -1.4149533035938097090e-4)}, + {FN (csc), ARG(1.57114159377789786021e+00,1.0e+00), RES(6.4805426748157480499e-1, 1.7040802567651356981e-4)}, + {FN (csc), ARG(1.57114159377789786021e+00,-1.0e+00), RES(6.4805426748157480499e-1, -1.7040802567651356981e-4)}, + {FN (csc), ARG(-1.57114159377789786021e+00,1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567651356981e-4)}, + {FN (csc), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567651356981e-4)}, + {FN (csc), ARG(1.57114159377789786021e+00,2.0e+00), RES(2.6580221522968095407e-1, 8.8471445300373252796e-5)}, + {FN (csc), ARG(1.57114159377789786021e+00,-2.0e+00), RES(2.6580221522968095407e-1, -8.8471445300373252796e-5)}, + {FN (csc), ARG(-1.57114159377789786021e+00,2.0e+00), RES(-2.6580221522968095407e-1, 8.8471445300373252796e-5)}, + {FN (csc), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(-2.6580221522968095407e-1, -8.8471445300373252796e-5)}, + {FN (csc), ARG(3.14124738660679181379e+00,0.0e+00), RES(2.8963094332830802676e3, 0.0)}, + {FN (csc), ARG(-3.14124738660679181379e+00,0.0e+00), RES(-2.8963094332830802676e3, 0.0)}, + {FN (csc), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(2.8963090880161384259e3, 9.9999986092146180843e-1)}, + {FN (csc), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(2.8963090880161384259e3, -9.9999986092146180843e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(-2.8963090880161384259e3, 9.9999986092146180843e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-2.8963090880161384259e3, -9.9999986092146180843e-1)}, + {FN (csc), ARG(3.14124738660679181379e+00,5.0e-01), RES(1.4337901642797306848e-3, 1.9190337944739187227e0)}, + {FN (csc), ARG(3.14124738660679181379e+00,-5.0e-01), RES(1.4337901642797306848e-3, -1.9190337944739187227e0)}, + {FN (csc), ARG(-3.14124738660679181379e+00,5.0e-01), RES(-1.4337901642797306848e-3, 1.9190337944739187227e0)}, + {FN (csc), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(-1.4337901642797306848e-3, -1.9190337944739187227e0)}, + {FN (csc), ARG(3.14124738660679181379e+00,1.0e+00), RES(3.8576176225219054787e-4, 8.5091800407377002721e-1)}, + {FN (csc), ARG(3.14124738660679181379e+00,-1.0e+00), RES(3.8576176225219054787e-4, -8.5091800407377002721e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,1.0e+00), RES(-3.8576176225219054787e-4, 8.5091800407377002721e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(-3.8576176225219054787e-4, -8.5091800407377002721e-1)}, + {FN (csc), ARG(3.14124738660679181379e+00,2.0e+00), RES(9.8749461907087358805e-5, 2.7572054583883740766e-1)}, + {FN (csc), ARG(3.14124738660679181379e+00,-2.0e+00), RES(9.8749461907087358805e-5, -2.7572054583883740766e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,2.0e+00), RES(-9.8749461907087358805e-5, 2.7572054583883740766e-1)}, + {FN (csc), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(-9.8749461907087358805e-5, -2.7572054583883740766e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,0.0e+00), RES(-2.8963094332851348839e3, 0.0)}, + {FN (csc), ARG(-3.14193792057279441821e+00,0.0e+00), RES(2.8963094332851348839e3, 0.0)}, + {FN (csc), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(-2.8963090880181930415e3, 9.9999986092288059049e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-2.8963090880181930415e3, -9.9999986092288059049e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(2.8963090880181930415e3, 9.9999986092288059049e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(2.8963090880181930415e3, -9.9999986092288059049e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,5.0e-01), RES(-1.4337901642787135676e-3, 1.9190337944739187241e0)}, + {FN (csc), ARG(3.14193792057279441821e+00,-5.0e-01), RES(-1.4337901642787135676e-3, -1.9190337944739187241e0)}, + {FN (csc), ARG(-3.14193792057279441821e+00,5.0e-01), RES(1.4337901642787135676e-3, 1.9190337944739187241e0)}, + {FN (csc), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(1.4337901642787135676e-3, -1.9190337944739187241e0)}, + {FN (csc), ARG(3.14193792057279441821e+00,1.0e+00), RES(-3.8576176225191689193e-4, 8.5091800407377002738e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,-1.0e+00), RES(-3.8576176225191689193e-4, -8.5091800407377002738e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,1.0e+00), RES(3.8576176225191689193e-4, 8.5091800407377002738e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(3.8576176225191689193e-4, -8.5091800407377002738e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,2.0e+00), RES(-9.8749461907017306810e-5, 2.7572054583883740769e-1)}, + {FN (csc), ARG(3.14193792057279441821e+00,-2.0e+00), RES(-9.8749461907017306810e-5, -2.7572054583883740769e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,2.0e+00), RES(9.8749461907017306810e-5, 2.7572054583883740769e-1)}, + {FN (csc), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(9.8749461907017306810e-5, -2.7572054583883740769e-1)}, + {FN (csc), ARG(4.71204371340168837179e+00,0.0e+00), RES(-1.0000000596046477361e0, 0.0)}, + {FN (csc), ARG(-4.71204371340168837179e+00,0.0e+00), RES(1.0000000596046477361e0, 0.0)}, + {FN (csc), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(-1.0000000596046406306e0, 4.1159035837731055550e-11)}, + {FN (csc), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-1.0000000596046406306e0, -4.1159035837731055550e-11)}, + {FN (csc), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(1.0000000596046406306e0, 4.1159035837731055550e-11)}, + {FN (csc), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(1.0000000596046406306e0, -4.1159035837731055550e-11)}, + {FN (csc), ARG(4.71204371340168837179e+00,5.0e-01), RES(-8.8681891425248302489e-1, 1.4149533035948134646e-4)}, + {FN (csc), ARG(4.71204371340168837179e+00,-5.0e-01), RES(-8.8681891425248302489e-1, -1.4149533035948134646e-4)}, + {FN (csc), ARG(-4.71204371340168837179e+00,5.0e-01), RES(8.8681891425248302489e-1, 1.4149533035948134646e-4)}, + {FN (csc), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(8.8681891425248302489e-1, -1.4149533035948134646e-4)}, + {FN (csc), ARG(4.71204371340168837179e+00,1.0e+00), RES(-6.4805426748157480498e-1, 1.7040802567663445577e-4)}, + {FN (csc), ARG(4.71204371340168837179e+00,-1.0e+00), RES(-6.4805426748157480498e-1, -1.7040802567663445577e-4)}, + {FN (csc), ARG(-4.71204371340168837179e+00,1.0e+00), RES(6.4805426748157480498e-1, 1.7040802567663445577e-4)}, + {FN (csc), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(6.4805426748157480498e-1, -1.7040802567663445577e-4)}, + {FN (csc), ARG(4.71204371340168837179e+00,2.0e+00), RES(-2.6580221522968095405e-1, 8.8471445300436013659e-5)}, + {FN (csc), ARG(4.71204371340168837179e+00,-2.0e+00), RES(-2.6580221522968095405e-1, -8.8471445300436013659e-5)}, + {FN (csc), ARG(-4.71204371340168837179e+00,2.0e+00), RES(2.6580221522968095405e-1, 8.8471445300436013659e-5)}, + {FN (csc), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(2.6580221522968095405e-1, -8.8471445300436013659e-5)}, + {FN (csc), ARG(4.71273424736769097620e+00,0.0e+00), RES(-1.0000000596046477359e0, 0.0)}, + {FN (csc), ARG(-4.71273424736769097620e+00,0.0e+00), RES(1.0000000596046477359e0, 0.0)}, + {FN (csc), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(-1.0000000596046406305e0, -4.1159035837687258754e-11)}, + {FN (csc), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(-1.0000000596046406305e0, 4.1159035837687258754e-11)}, + {FN (csc), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(1.0000000596046406305e0, -4.1159035837687258754e-11)}, + {FN (csc), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(1.0000000596046406305e0, 4.1159035837687258754e-11)}, + {FN (csc), ARG(4.71273424736769097620e+00,5.0e-01), RES(-8.8681891425248302483e-1, -1.4149533035933078312e-4)}, + {FN (csc), ARG(4.71273424736769097620e+00,-5.0e-01), RES(-8.8681891425248302483e-1, 1.4149533035933078312e-4)}, + {FN (csc), ARG(-4.71273424736769097620e+00,5.0e-01), RES(8.8681891425248302483e-1, -1.4149533035933078312e-4)}, + {FN (csc), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(8.8681891425248302483e-1, 1.4149533035933078312e-4)}, + {FN (csc), ARG(4.71273424736769097620e+00,1.0e+00), RES(-6.480542674815748050e-1, -1.7040802567645312683e-4)}, + {FN (csc), ARG(4.71273424736769097620e+00,-1.0e+00), RES(-6.480542674815748050e-1, 1.7040802567645312683e-4)}, + {FN (csc), ARG(-4.71273424736769097620e+00,1.0e+00), RES(6.480542674815748050e-1, -1.7040802567645312683e-4)}, + {FN (csc), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(6.480542674815748050e-1, 1.7040802567645312683e-4)}, + {FN (csc), ARG(4.71273424736769097620e+00,2.0e+00), RES(-2.6580221522968095408e-1, -8.8471445300341872364e-5)}, + {FN (csc), ARG(4.71273424736769097620e+00,-2.0e+00), RES(-2.6580221522968095408e-1, 8.8471445300341872364e-5)}, + {FN (csc), ARG(-4.71273424736769097620e+00,2.0e+00), RES(2.6580221522968095408e-1, -8.8471445300341872364e-5)}, + {FN (csc), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(2.6580221522968095408e-1, 8.8471445300341872364e-5)}, + {FN (csc), ARG(6.28284004019658492979e+00,0.0e+00), RES(-2.8963094332820529594e3, 0.0)}, + {FN (csc), ARG(-6.28284004019658492979e+00,0.0e+00), RES(2.8963094332820529594e3, 0.0)}, + {FN (csc), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(-2.8963090880151111181e3, -9.9999986092075241740e-1)}, + {FN (csc), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(-2.8963090880151111181e3, 9.9999986092075241740e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(2.8963090880151111181e3, -9.9999986092075241740e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(2.8963090880151111181e3, 9.9999986092075241740e-1)}, + {FN (csc), ARG(6.28284004019658492979e+00,5.0e-01), RES(-1.4337901642802392434e-3, -1.9190337944739187220e0)}, + {FN (csc), ARG(6.28284004019658492979e+00,-5.0e-01), RES(-1.4337901642802392434e-3, 1.9190337944739187220e0)}, + {FN (csc), ARG(-6.28284004019658492979e+00,5.0e-01), RES(1.4337901642802392434e-3, -1.9190337944739187220e0)}, + {FN (csc), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(1.4337901642802392434e-3, 1.9190337944739187220e0)}, + {FN (csc), ARG(6.28284004019658492979e+00,1.0e+00), RES(-3.8576176225232737584e-4, -8.5091800407377002712e-1)}, + {FN (csc), ARG(6.28284004019658492979e+00,-1.0e+00), RES(-3.8576176225232737584e-4, 8.5091800407377002712e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,1.0e+00), RES(3.8576176225232737584e-4, -8.5091800407377002712e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(3.8576176225232737584e-4, 8.5091800407377002712e-1)}, + {FN (csc), ARG(6.28284004019658492979e+00,2.0e+00), RES(-9.8749461907122384803e-5, -2.7572054583883740765e-1)}, + {FN (csc), ARG(6.28284004019658492979e+00,-2.0e+00), RES(-9.8749461907122384803e-5, 2.7572054583883740765e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,2.0e+00), RES(9.8749461907122384803e-5, -2.7572054583883740765e-1)}, + {FN (csc), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(9.8749461907122384803e-5, 2.7572054583883740765e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,0.0e+00), RES(2.8963094332861621921e3, 0.0)}, + {FN (csc), ARG(-6.28353057416258753420e+00,0.0e+00), RES(-2.8963094332861621921e3, 0.0)}, + {FN (csc), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(2.8963090880192203493e3, -9.9999986092358998153e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(2.8963090880192203493e3, 9.9999986092358998153e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(-2.8963090880192203493e3, -9.9999986092358998153e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(-2.8963090880192203493e3, 9.9999986092358998153e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,5.0e-01), RES(1.4337901642782050091e-3, -1.9190337944739187248e0)}, + {FN (csc), ARG(6.28353057416258753420e+00,-5.0e-01), RES(1.4337901642782050091e-3, 1.9190337944739187248e0)}, + {FN (csc), ARG(-6.28353057416258753420e+00,5.0e-01), RES(-1.4337901642782050091e-3, -1.9190337944739187248e0)}, + {FN (csc), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(-1.4337901642782050091e-3, 1.9190337944739187248e0)}, + {FN (csc), ARG(6.28353057416258753420e+00,1.0e+00), RES(3.8576176225178006396e-4, -8.5091800407377002747e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,-1.0e+00), RES(3.8576176225178006396e-4, 8.5091800407377002747e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,1.0e+00), RES(-3.8576176225178006396e-4, -8.5091800407377002747e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(-3.8576176225178006396e-4, 8.5091800407377002747e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,2.0e+00), RES(9.8749461906982280812e-5, -2.7572054583883740770e-1)}, + {FN (csc), ARG(6.28353057416258753420e+00,-2.0e+00), RES(9.8749461906982280812e-5, 2.7572054583883740770e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,2.0e+00), RES(-9.8749461906982280812e-5, -2.7572054583883740770e-1)}, + {FN (csc), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(-9.8749461906982280812e-5, 2.7572054583883740770e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,0.0e+00), RES(2.8963094332884762317e3, 0.0)}, + {FN (csc), ARG(-9.42443269378637893396e+00,0.0e+00), RES(-2.8963094332884762317e3, 0.0)}, + {FN (csc), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(2.8963090880215343881e3, 9.9999986092518790411e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(2.8963090880215343881e3, -9.9999986092518790411e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(-2.8963090880215343881e3, 9.9999986092518790411e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-2.8963090880215343881e3, -9.9999986092518790411e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,5.0e-01), RES(1.4337901642770594670e-3, 1.9190337944739187263e0)}, + {FN (csc), ARG(9.42443269378637893396e+00,-5.0e-01), RES(1.4337901642770594670e-3, -1.9190337944739187263e0)}, + {FN (csc), ARG(-9.42443269378637893396e+00,5.0e-01), RES(-1.4337901642770594670e-3, 1.9190337944739187263e0)}, + {FN (csc), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(-1.4337901642770594670e-3, -1.9190337944739187263e0)}, + {FN (csc), ARG(9.42443269378637893396e+00,1.0e+00), RES(3.8576176225147185523e-4, 8.5091800407377002767e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,-1.0e+00), RES(3.8576176225147185523e-4, -8.5091800407377002767e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,1.0e+00), RES(-3.8576176225147185523e-4, 8.5091800407377002767e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(-3.8576176225147185523e-4, -8.5091800407377002767e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,2.0e+00), RES(9.874946190690338380e-5, 2.7572054583883740773e-1)}, + {FN (csc), ARG(9.42443269378637893396e+00,-2.0e+00), RES(9.874946190690338380e-5, -2.7572054583883740773e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,2.0e+00), RES(-9.874946190690338380e-5, 2.7572054583883740773e-1)}, + {FN (csc), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(-9.874946190690338380e-5, -2.7572054583883740773e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,0.0e+00), RES(-2.8963094332946400807e3, 0.0)}, + {FN (csc), ARG(-9.42512322775237976202e+00,0.0e+00), RES(2.8963094332946400807e3, 0.0)}, + {FN (csc), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(-2.8963090880276982349e3, 9.9999986092944425030e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-2.8963090880276982349e3, -9.9999986092944425030e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(2.8963090880276982349e3, 9.9999986092944425030e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(2.8963090880276982349e3, -9.9999986092944425030e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,5.0e-01), RES(-1.4337901642740081154e-3, 1.9190337944739187304e0)}, + {FN (csc), ARG(9.42512322775237976202e+00,-5.0e-01), RES(-1.4337901642740081154e-3, -1.9190337944739187304e0)}, + {FN (csc), ARG(-9.42512322775237976202e+00,5.0e-01), RES(1.4337901642740081154e-3, 1.9190337944739187304e0)}, + {FN (csc), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(1.4337901642740081154e-3, -1.9190337944739187304e0)}, + {FN (csc), ARG(9.42512322775237976202e+00,1.0e+00), RES(-3.8576176225065088741e-4, 8.5091800407377002820e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,-1.0e+00), RES(-3.8576176225065088741e-4, -8.5091800407377002820e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,1.0e+00), RES(3.8576176225065088741e-4, 8.5091800407377002820e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(3.8576176225065088741e-4, -8.5091800407377002820e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,2.0e+00), RES(-9.8749461906693227814e-5, 2.7572054583883740781e-1)}, + {FN (csc), ARG(9.42512322775237976202e+00,-2.0e+00), RES(-9.8749461906693227814e-5, -2.7572054583883740781e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,2.0e+00), RES(9.8749461906693227814e-5, 2.7572054583883740781e-1)}, + {FN (csc), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(9.8749461906693227814e-5, -2.7572054583883740781e-1)}, + {FN (sec), ARG(-3.45266983001243932001e-04,0.0e+00), RES(1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(3.45266983001243932001e-04,0.0e+00), RES(1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(1.0000000596046406306e0, -4.1159035837702210125e-11)}, + {FN (sec), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(1.0000000596046406306e0, 4.1159035837702210125e-11)}, + {FN (sec), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(1.0000000596046406306e0, 4.1159035837702210125e-11)}, + {FN (sec), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(1.0000000596046406306e0, -4.1159035837702210125e-11)}, + {FN (sec), ARG(-3.45266983001243932001e-04,5.0e-01), RES(8.8681891425248302485e-1, -1.4149533035938218250e-4)}, + {FN (sec), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(8.8681891425248302485e-1, 1.4149533035938218250e-4)}, + {FN (sec), ARG(3.45266983001243932001e-04,5.0e-01), RES(8.8681891425248302485e-1, 1.4149533035938218250e-4)}, + {FN (sec), ARG(3.45266983001243932001e-04,-5.0e-01), RES(8.8681891425248302485e-1, -1.4149533035938218250e-4)}, + {FN (sec), ARG(-3.45266983001243932001e-04,1.0e+00), RES(6.4805426748157480499e-1, -1.7040802567651502899e-4)}, + {FN (sec), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(6.4805426748157480499e-1, 1.7040802567651502899e-4)}, + {FN (sec), ARG(3.45266983001243932001e-04,1.0e+00), RES(6.4805426748157480499e-1, 1.7040802567651502899e-4)}, + {FN (sec), ARG(3.45266983001243932001e-04,-1.0e+00), RES(6.4805426748157480499e-1, -1.7040802567651502899e-4)}, + {FN (sec), ARG(-3.45266983001243932001e-04,2.0e+00), RES(2.6580221522968095407e-1, -8.8471445300374010365e-5)}, + {FN (sec), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(2.6580221522968095407e-1, 8.8471445300374010365e-5)}, + {FN (sec), ARG(3.45266983001243932001e-04,2.0e+00), RES(2.6580221522968095407e-1, 8.8471445300374010365e-5)}, + {FN (sec), ARG(3.45266983001243932001e-04,-2.0e+00), RES(2.6580221522968095407e-1, -8.8471445300374010365e-5)}, + {FN (sec), ARG(1.57045105981189525579e+00,0.0e+00), RES(2.8963094332835939217e3, 0.0)}, + {FN (sec), ARG(-1.57045105981189525579e+00,0.0e+00), RES(2.8963094332835939217e3, 0.0)}, + {FN (sec), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(2.8963090880166520798e3, 9.9999986092181650394e-1)}, + {FN (sec), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(2.8963090880166520798e3, -9.9999986092181650394e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(2.8963090880166520798e3, -9.9999986092181650394e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(2.8963090880166520798e3, 9.9999986092181650394e-1)}, + {FN (sec), ARG(1.57045105981189525579e+00,5.0e-01), RES(1.4337901642794764055e-3, 1.9190337944739187231e0)}, + {FN (sec), ARG(1.57045105981189525579e+00,-5.0e-01), RES(1.4337901642794764055e-3, -1.9190337944739187231e0)}, + {FN (sec), ARG(-1.57045105981189525579e+00,5.0e-01), RES(1.4337901642794764055e-3, -1.9190337944739187231e0)}, + {FN (sec), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(1.4337901642794764055e-3, 1.9190337944739187231e0)}, + {FN (sec), ARG(1.57045105981189525579e+00,1.0e+00), RES(3.8576176225212213388e-4, 8.5091800407377002725e-1)}, + {FN (sec), ARG(1.57045105981189525579e+00,-1.0e+00), RES(3.8576176225212213388e-4, -8.5091800407377002725e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,1.0e+00), RES(3.8576176225212213388e-4, -8.5091800407377002725e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(3.8576176225212213388e-4, 8.5091800407377002725e-1)}, + {FN (sec), ARG(1.57045105981189525579e+00,2.0e+00), RES(9.8749461907069845806e-5, 2.7572054583883740767e-1)}, + {FN (sec), ARG(1.57045105981189525579e+00,-2.0e+00), RES(9.8749461907069845806e-5, -2.7572054583883740767e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,2.0e+00), RES(9.8749461907069845806e-5, -2.7572054583883740767e-1)}, + {FN (sec), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(9.8749461907069845806e-5, 2.7572054583883740767e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,0.0e+00), RES(-2.8963094332846212298e3, 0.0)}, + {FN (sec), ARG(-1.57114159377789786021e+00,0.0e+00), RES(-2.8963094332846212298e3, 0.0)}, + {FN (sec), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(-2.8963090880176793876e3, 9.9999986092252589498e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-2.8963090880176793876e3, -9.9999986092252589498e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(-2.8963090880176793876e3, -9.9999986092252589498e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-2.8963090880176793876e3, 9.9999986092252589498e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,5.0e-01), RES(-1.4337901642789678469e-3, 1.9190337944739187237e0)}, + {FN (sec), ARG(1.57114159377789786021e+00,-5.0e-01), RES(-1.4337901642789678469e-3, -1.9190337944739187237e0)}, + {FN (sec), ARG(-1.57114159377789786021e+00,5.0e-01), RES(-1.4337901642789678469e-3, -1.9190337944739187237e0)}, + {FN (sec), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(-1.4337901642789678469e-3, 1.9190337944739187237e0)}, + {FN (sec), ARG(1.57114159377789786021e+00,1.0e+00), RES(-3.8576176225198530591e-4, 8.5091800407377002734e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,-1.0e+00), RES(-3.8576176225198530591e-4, -8.5091800407377002734e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,1.0e+00), RES(-3.8576176225198530591e-4, -8.5091800407377002734e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(-3.8576176225198530591e-4, 8.5091800407377002734e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,2.0e+00), RES(-9.8749461907034819809e-5, 2.7572054583883740768e-1)}, + {FN (sec), ARG(1.57114159377789786021e+00,-2.0e+00), RES(-9.8749461907034819809e-5, -2.7572054583883740768e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,2.0e+00), RES(-9.8749461907034819809e-5, -2.7572054583883740768e-1)}, + {FN (sec), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(-9.8749461907034819809e-5, 2.7572054583883740768e-1)}, + {FN (sec), ARG(3.14124738660679181379e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(-3.14124738660679181379e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(-1.0000000596046406306e0, 4.1159035837723756084e-11)}, + {FN (sec), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-1.0000000596046406306e0, -4.1159035837723756084e-11)}, + {FN (sec), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(-1.0000000596046406306e0, -4.1159035837723756084e-11)}, + {FN (sec), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-1.0000000596046406306e0, 4.1159035837723756084e-11)}, + {FN (sec), ARG(3.14124738660679181379e+00,5.0e-01), RES(-8.8681891425248302488e-1, 1.4149533035945625257e-4)}, + {FN (sec), ARG(3.14124738660679181379e+00,-5.0e-01), RES(-8.8681891425248302488e-1, -1.4149533035945625257e-4)}, + {FN (sec), ARG(-3.14124738660679181379e+00,5.0e-01), RES(-8.8681891425248302488e-1, -1.4149533035945625257e-4)}, + {FN (sec), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(-8.8681891425248302488e-1, 1.4149533035945625257e-4)}, + {FN (sec), ARG(3.14124738660679181379e+00,1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567660423428e-4)}, + {FN (sec), ARG(3.14124738660679181379e+00,-1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567660423428e-4)}, + {FN (sec), ARG(-3.14124738660679181379e+00,1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567660423428e-4)}, + {FN (sec), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567660423428e-4)}, + {FN (sec), ARG(3.14124738660679181379e+00,2.0e+00), RES(-2.6580221522968095405e-1, 8.8471445300420323443e-5)}, + {FN (sec), ARG(3.14124738660679181379e+00,-2.0e+00), RES(-2.6580221522968095405e-1, -8.8471445300420323443e-5)}, + {FN (sec), ARG(-3.14124738660679181379e+00,2.0e+00), RES(-2.6580221522968095405e-1, -8.8471445300420323443e-5)}, + {FN (sec), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(-2.6580221522968095405e-1, 8.8471445300420323443e-5)}, + {FN (sec), ARG(3.14193792057279441821e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(-3.14193792057279441821e+00,0.0e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sec), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(-1.0000000596046406305e0, -4.1159035837694558220e-11)}, + {FN (sec), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-1.0000000596046406305e0, 4.1159035837694558220e-11)}, + {FN (sec), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(-1.0000000596046406305e0, 4.1159035837694558220e-11)}, + {FN (sec), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-1.0000000596046406305e0, -4.1159035837694558220e-11)}, + {FN (sec), ARG(3.14193792057279441821e+00,5.0e-01), RES(-8.8681891425248302484e-1, -1.4149533035935587701e-4)}, + {FN (sec), ARG(3.14193792057279441821e+00,-5.0e-01), RES(-8.8681891425248302484e-1, 1.4149533035935587701e-4)}, + {FN (sec), ARG(-3.14193792057279441821e+00,5.0e-01), RES(-8.8681891425248302484e-1, 1.4149533035935587701e-4)}, + {FN (sec), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(-8.8681891425248302484e-1, -1.4149533035935587701e-4)}, + {FN (sec), ARG(3.14193792057279441821e+00,1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567648334832e-4)}, + {FN (sec), ARG(3.14193792057279441821e+00,-1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567648334832e-4)}, + {FN (sec), ARG(-3.14193792057279441821e+00,1.0e+00), RES(-6.4805426748157480499e-1, 1.7040802567648334832e-4)}, + {FN (sec), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(-6.4805426748157480499e-1, -1.7040802567648334832e-4)}, + {FN (sec), ARG(3.14193792057279441821e+00,2.0e+00), RES(-2.6580221522968095407e-1, -8.8471445300357562580e-5)}, + {FN (sec), ARG(3.14193792057279441821e+00,-2.0e+00), RES(-2.6580221522968095407e-1, 8.8471445300357562580e-5)}, + {FN (sec), ARG(-3.14193792057279441821e+00,2.0e+00), RES(-2.6580221522968095407e-1, 8.8471445300357562580e-5)}, + {FN (sec), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(-2.6580221522968095407e-1, -8.8471445300357562580e-5)}, + {FN (sec), ARG(4.71204371340168837179e+00,0.0e+00), RES(-2.8963094332825666135e3, 0.0)}, + {FN (sec), ARG(-4.71204371340168837179e+00,0.0e+00), RES(-2.8963094332825666135e3, 0.0)}, + {FN (sec), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(-2.8963090880156247720e3, -9.9999986092110711291e-1)}, + {FN (sec), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-2.8963090880156247720e3, 9.9999986092110711291e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(-2.8963090880156247720e3, 9.9999986092110711291e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-2.8963090880156247720e3, -9.9999986092110711291e-1)}, + {FN (sec), ARG(4.71204371340168837179e+00,5.0e-01), RES(-1.4337901642799849641e-3, -1.9190337944739187224e0)}, + {FN (sec), ARG(4.71204371340168837179e+00,-5.0e-01), RES(-1.4337901642799849641e-3, 1.9190337944739187224e0)}, + {FN (sec), ARG(-4.71204371340168837179e+00,5.0e-01), RES(-1.4337901642799849641e-3, 1.9190337944739187224e0)}, + {FN (sec), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(-1.4337901642799849641e-3, -1.9190337944739187224e0)}, + {FN (sec), ARG(4.71204371340168837179e+00,1.0e+00), RES(-3.8576176225225896185e-4, -8.5091800407377002716e-1)}, + {FN (sec), ARG(4.71204371340168837179e+00,-1.0e+00), RES(-3.8576176225225896185e-4, 8.5091800407377002716e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,1.0e+00), RES(-3.8576176225225896185e-4, 8.5091800407377002716e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(-3.8576176225225896185e-4, -8.5091800407377002716e-1)}, + {FN (sec), ARG(4.71204371340168837179e+00,2.0e+00), RES(-9.8749461907104871804e-5, -2.7572054583883740766e-1)}, + {FN (sec), ARG(4.71204371340168837179e+00,-2.0e+00), RES(-9.8749461907104871804e-5, 2.7572054583883740766e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,2.0e+00), RES(-9.8749461907104871804e-5, 2.7572054583883740766e-1)}, + {FN (sec), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(-9.8749461907104871804e-5, -2.7572054583883740766e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,0.0e+00), RES(2.8963094332856485380e3, 0.0)}, + {FN (sec), ARG(-4.71273424736769097620e+00,0.0e+00), RES(2.8963094332856485380e3, 0.0)}, + {FN (sec), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(2.8963090880187066954e3, -9.9999986092323528601e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(2.8963090880187066954e3, 9.9999986092323528601e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(2.8963090880187066954e3, 9.9999986092323528601e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(2.8963090880187066954e3, -9.9999986092323528601e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,5.0e-01), RES(1.4337901642784592884e-3, -1.9190337944739187244e0)}, + {FN (sec), ARG(4.71273424736769097620e+00,-5.0e-01), RES(1.4337901642784592884e-3, 1.9190337944739187244e0)}, + {FN (sec), ARG(-4.71273424736769097620e+00,5.0e-01), RES(1.4337901642784592884e-3, 1.9190337944739187244e0)}, + {FN (sec), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(1.4337901642784592884e-3, -1.9190337944739187244e0)}, + {FN (sec), ARG(4.71273424736769097620e+00,1.0e+00), RES(3.8576176225184847794e-4, -8.5091800407377002743e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,-1.0e+00), RES(3.8576176225184847794e-4, 8.5091800407377002743e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,1.0e+00), RES(3.8576176225184847794e-4, 8.5091800407377002743e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(3.8576176225184847794e-4, -8.5091800407377002743e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,2.0e+00), RES(9.8749461906999793811e-5, -2.7572054583883740770e-1)}, + {FN (sec), ARG(4.71273424736769097620e+00,-2.0e+00), RES(9.8749461906999793811e-5, 2.7572054583883740770e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,2.0e+00), RES(9.8749461906999793811e-5, 2.7572054583883740770e-1)}, + {FN (sec), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(9.8749461906999793811e-5, -2.7572054583883740770e-1)}, + {FN (sec), ARG(6.28284004019658492979e+00,0.0e+00), RES(1.0000000596046477361e0, 0.0)}, + {FN (sec), ARG(-6.28284004019658492979e+00,0.0e+00), RES(1.0000000596046477361e0, 0.0)}, + {FN (sec), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(1.0000000596046406307e0, -4.1159035837738355016e-11)}, + {FN (sec), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(1.0000000596046406307e0, 4.1159035837738355016e-11)}, + {FN (sec), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(1.0000000596046406307e0, 4.1159035837738355016e-11)}, + {FN (sec), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(1.0000000596046406307e0, -4.1159035837738355016e-11)}, + {FN (sec), ARG(6.28284004019658492979e+00,5.0e-01), RES(8.8681891425248302490e-1, -1.4149533035950644034e-4)}, + {FN (sec), ARG(6.28284004019658492979e+00,-5.0e-01), RES(8.8681891425248302490e-1, 1.4149533035950644034e-4)}, + {FN (sec), ARG(-6.28284004019658492979e+00,5.0e-01), RES(8.8681891425248302490e-1, 1.4149533035950644034e-4)}, + {FN (sec), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(8.8681891425248302490e-1, -1.4149533035950644034e-4)}, + {FN (sec), ARG(6.28284004019658492979e+00,1.0e+00), RES(6.4805426748157480498e-1, -1.7040802567666467726e-4)}, + {FN (sec), ARG(6.28284004019658492979e+00,-1.0e+00), RES(6.4805426748157480498e-1, 1.7040802567666467726e-4)}, + {FN (sec), ARG(-6.28284004019658492979e+00,1.0e+00), RES(6.4805426748157480498e-1, 1.7040802567666467726e-4)}, + {FN (sec), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(6.4805426748157480498e-1, -1.7040802567666467726e-4)}, + {FN (sec), ARG(6.28284004019658492979e+00,2.0e+00), RES(2.6580221522968095404e-1, -8.8471445300451703875e-5)}, + {FN (sec), ARG(6.28284004019658492979e+00,-2.0e+00), RES(2.6580221522968095404e-1, 8.8471445300451703875e-5)}, + {FN (sec), ARG(-6.28284004019658492979e+00,2.0e+00), RES(2.6580221522968095404e-1, 8.8471445300451703875e-5)}, + {FN (sec), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(2.6580221522968095404e-1, -8.8471445300451703875e-5)}, + {FN (sec), ARG(6.28353057416258753420e+00,0.0e+00), RES(1.0000000596046477359e0, 0.0)}, + {FN (sec), ARG(-6.28353057416258753420e+00,0.0e+00), RES(1.0000000596046477359e0, 0.0)}, + {FN (sec), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(1.0000000596046406305e0, 4.1159035837679959288e-11)}, + {FN (sec), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(1.0000000596046406305e0, -4.1159035837679959288e-11)}, + {FN (sec), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(1.0000000596046406305e0, -4.1159035837679959288e-11)}, + {FN (sec), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(1.0000000596046406305e0, 4.1159035837679959288e-11)}, + {FN (sec), ARG(6.28353057416258753420e+00,5.0e-01), RES(8.8681891425248302482e-1, 1.4149533035930568923e-4)}, + {FN (sec), ARG(6.28353057416258753420e+00,-5.0e-01), RES(8.8681891425248302482e-1, -1.4149533035930568923e-4)}, + {FN (sec), ARG(-6.28353057416258753420e+00,5.0e-01), RES(8.8681891425248302482e-1, -1.4149533035930568923e-4)}, + {FN (sec), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(8.8681891425248302482e-1, 1.4149533035930568923e-4)}, + {FN (sec), ARG(6.28353057416258753420e+00,1.0e+00), RES(6.480542674815748050e-1, 1.7040802567642290534e-4)}, + {FN (sec), ARG(6.28353057416258753420e+00,-1.0e+00), RES(6.480542674815748050e-1, -1.7040802567642290534e-4)}, + {FN (sec), ARG(-6.28353057416258753420e+00,1.0e+00), RES(6.480542674815748050e-1, -1.7040802567642290534e-4)}, + {FN (sec), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(6.480542674815748050e-1, 1.7040802567642290534e-4)}, + {FN (sec), ARG(6.28353057416258753420e+00,2.0e+00), RES(2.6580221522968095408e-1, 8.8471445300326182148e-5)}, + {FN (sec), ARG(6.28353057416258753420e+00,-2.0e+00), RES(2.6580221522968095408e-1, -8.8471445300326182148e-5)}, + {FN (sec), ARG(-6.28353057416258753420e+00,2.0e+00), RES(2.6580221522968095408e-1, -8.8471445300326182148e-5)}, + {FN (sec), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(2.6580221522968095408e-1, 8.8471445300326182148e-5)}, + {FN (sec), ARG(9.42443269378637893396e+00,0.0e+00), RES(-1.0000000596046477358e0, 0.0)}, + {FN (sec), ARG(-9.42443269378637893396e+00,0.0e+00), RES(-1.0000000596046477358e0, 0.0)}, + {FN (sec), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(-1.0000000596046406304e0, 4.1159035837647074798e-11)}, + {FN (sec), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-1.0000000596046406304e0, -4.1159035837647074798e-11)}, + {FN (sec), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(-1.0000000596046406304e0, -4.1159035837647074798e-11)}, + {FN (sec), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-1.0000000596046406304e0, 4.1159035837647074798e-11)}, + {FN (sec), ARG(9.42443269378637893396e+00,5.0e-01), RES(-8.8681891425248302477e-1, 1.4149533035919263990e-4)}, + {FN (sec), ARG(9.42443269378637893396e+00,-5.0e-01), RES(-8.8681891425248302477e-1, -1.4149533035919263990e-4)}, + {FN (sec), ARG(-9.42443269378637893396e+00,5.0e-01), RES(-8.8681891425248302477e-1, -1.4149533035919263990e-4)}, + {FN (sec), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(-8.8681891425248302477e-1, 1.4149533035919263990e-4)}, + {FN (sec), ARG(9.42443269378637893396e+00,1.0e+00), RES(-6.4805426748157480501e-1, 1.7040802567628675588e-4)}, + {FN (sec), ARG(9.42443269378637893396e+00,-1.0e+00), RES(-6.4805426748157480501e-1, -1.7040802567628675588e-4)}, + {FN (sec), ARG(-9.42443269378637893396e+00,1.0e+00), RES(-6.4805426748157480501e-1, -1.7040802567628675588e-4)}, + {FN (sec), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(-6.4805426748157480501e-1, 1.7040802567628675588e-4)}, + {FN (sec), ARG(9.42443269378637893396e+00,2.0e+00), RES(-2.6580221522968095410e-1, 8.8471445300255496873e-5)}, + {FN (sec), ARG(9.42443269378637893396e+00,-2.0e+00), RES(-2.6580221522968095410e-1, -8.8471445300255496873e-5)}, + {FN (sec), ARG(-9.42443269378637893396e+00,2.0e+00), RES(-2.6580221522968095410e-1, -8.8471445300255496873e-5)}, + {FN (sec), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(-2.6580221522968095410e-1, 8.8471445300255496873e-5)}, + {FN (sec), ARG(9.42512322775237976202e+00,0.0e+00), RES(-1.0000000596046477356e0, 0.0)}, + {FN (sec), ARG(-9.42512322775237976202e+00,0.0e+00), RES(-1.0000000596046477356e0, 0.0)}, + {FN (sec), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(-1.0000000596046406301e0, -4.1159035837559481207e-11)}, + {FN (sec), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-1.0000000596046406301e0, 4.1159035837559481207e-11)}, + {FN (sec), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(-1.0000000596046406301e0, 4.1159035837559481207e-11)}, + {FN (sec), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-1.0000000596046406301e0, -4.1159035837559481207e-11)}, + {FN (sec), ARG(9.42512322775237976202e+00,5.0e-01), RES(-8.8681891425248302464e-1, -1.4149533035889151322e-4)}, + {FN (sec), ARG(9.42512322775237976202e+00,-5.0e-01), RES(-8.8681891425248302464e-1, 1.4149533035889151322e-4)}, + {FN (sec), ARG(-9.42512322775237976202e+00,5.0e-01), RES(-8.8681891425248302464e-1, 1.4149533035889151322e-4)}, + {FN (sec), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(-8.8681891425248302464e-1, -1.4149533035889151322e-4)}, + {FN (sec), ARG(9.42512322775237976202e+00,1.0e+00), RES(-6.4805426748157480504e-1, -1.704080256759240980e-4)}, + {FN (sec), ARG(9.42512322775237976202e+00,-1.0e+00), RES(-6.4805426748157480504e-1, 1.704080256759240980e-4)}, + {FN (sec), ARG(-9.42512322775237976202e+00,1.0e+00), RES(-6.4805426748157480504e-1, 1.704080256759240980e-4)}, + {FN (sec), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(-6.4805426748157480504e-1, -1.704080256759240980e-4)}, + {FN (sec), ARG(9.42512322775237976202e+00,2.0e+00), RES(-2.6580221522968095416e-1, -8.8471445300067214283e-5)}, + {FN (sec), ARG(9.42512322775237976202e+00,-2.0e+00), RES(-2.6580221522968095416e-1, 8.8471445300067214283e-5)}, + {FN (sec), ARG(-9.42512322775237976202e+00,2.0e+00), RES(-2.6580221522968095416e-1, 8.8471445300067214283e-5)}, + {FN (sec), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(-2.6580221522968095416e-1, -8.8471445300067214283e-5)}, + {FN (cot), ARG(-3.45266983001243932001e-04,0.0e+00), RES(-2.8963092606511032136e3, 0.0)}, + {FN (cot), ARG(3.45266983001243932001e-04,0.0e+00), RES(2.8963092606511032136e3, 0.0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,1.19209289550781250e-07), RES(-2.8963089153841613713e3, -9.9999992052715532101e-1)}, + {FN (cot), ARG(-3.45266983001243932001e-04,-1.19209289550781250e-07), RES(-2.8963089153841613713e3, 9.9999992052715532101e-1)}, + {FN (cot), ARG(3.45266983001243932001e-04,1.19209289550781250e-07), RES(2.8963089153841613713e3, -9.9999992052715532101e-1)}, + {FN (cot), ARG(3.45266983001243932001e-04,-1.19209289550781250e-07), RES(2.8963089153841613713e3, 9.9999992052715532101e-1)}, + {FN (cot), ARG(-3.45266983001243932001e-04,5.0e-01), RES(-1.2715121175451222247e-3, -2.1639524637389326002e0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,-5.0e-01), RES(-1.2715121175451222247e-3, 2.1639524637389326002e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,5.0e-01), RES(1.2715121175451222247e-3, -2.1639524637389326002e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,-5.0e-01), RES(1.2715121175451222247e-3, 2.1639524637389326002e0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,1.0e+00), RES(-2.4999454374267620687e-4, -1.3130351721648674824e0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,-1.0e+00), RES(-2.4999454374267620687e-4, 1.3130351721648674824e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,1.0e+00), RES(2.4999454374267620687e-4, -1.3130351721648674824e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,-1.0e+00), RES(2.4999454374267620687e-4, 1.3130351721648674824e0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,2.0e+00), RES(-2.6247825506563736365e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-3.45266983001243932001e-04,-2.0e+00), RES(-2.6247825506563736365e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,2.0e+00), RES(2.6247825506563736365e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(3.45266983001243932001e-04,-2.0e+00), RES(2.6247825506563736365e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(1.57045105981189525579e+00,0.0e+00), RES(3.4526699672104134407e-4, 0.0)}, + {FN (cot), ARG(-1.57045105981189525579e+00,0.0e+00), RES(-3.4526699672104134407e-4, 0.0)}, + {FN (cot), ARG(1.57045105981189525579e+00,1.19209289550781250e-07), RES(3.4526699672103643753e-4, -1.1920930376163652990e-7)}, + {FN (cot), ARG(1.57045105981189525579e+00,-1.19209289550781250e-07), RES(3.4526699672103643753e-4, 1.1920930376163652990e-7)}, + {FN (cot), ARG(-1.57045105981189525579e+00,1.19209289550781250e-07), RES(-3.4526699672103643753e-4, -1.1920930376163652990e-7)}, + {FN (cot), ARG(-1.57045105981189525579e+00,-1.19209289550781250e-07), RES(-3.4526699672103643753e-4, 1.1920930376163652990e-7)}, + {FN (cot), ARG(1.57045105981189525579e+00,5.0e-01), RES(2.7153443992665204631e-4, -4.6211720058436229982e-1)}, + {FN (cot), ARG(1.57045105981189525579e+00,-5.0e-01), RES(2.7153443992665204631e-4, 4.6211720058436229982e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,5.0e-01), RES(-2.7153443992665204631e-4, -4.6211720058436229982e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,-5.0e-01), RES(-2.7153443992665204631e-4, 4.6211720058436229982e-1)}, + {FN (cot), ARG(1.57045105981189525579e+00,1.0e+00), RES(1.4500326960279979918e-4, -7.6159419408485704839e-1)}, + {FN (cot), ARG(1.57045105981189525579e+00,-1.0e+00), RES(1.4500326960279979918e-4, 7.6159419408485704839e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,1.0e+00), RES(-1.4500326960279979918e-4, -7.6159419408485704839e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,-1.0e+00), RES(-1.4500326960279979918e-4, 7.6159419408485704839e-1)}, + {FN (cot), ARG(1.57045105981189525579e+00,2.0e+00), RES(2.4393395410443750226e-5, -9.6402758819508310557e-1)}, + {FN (cot), ARG(1.57045105981189525579e+00,-2.0e+00), RES(2.4393395410443750226e-5, 9.6402758819508310557e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,2.0e+00), RES(-2.4393395410443750226e-5, -9.6402758819508310557e-1)}, + {FN (cot), ARG(-1.57045105981189525579e+00,-2.0e+00), RES(-2.4393395410443750226e-5, 9.6402758819508310557e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,0.0e+00), RES(-3.4526699672091887937e-4, 0.0)}, + {FN (cot), ARG(-1.57114159377789786021e+00,0.0e+00), RES(3.4526699672091887937e-4, 0.0)}, + {FN (cot), ARG(1.57114159377789786021e+00,1.19209289550781250e-07), RES(-3.4526699672091397283e-4, -1.1920930376163652989e-7)}, + {FN (cot), ARG(1.57114159377789786021e+00,-1.19209289550781250e-07), RES(-3.4526699672091397283e-4, 1.1920930376163652989e-7)}, + {FN (cot), ARG(-1.57114159377789786021e+00,1.19209289550781250e-07), RES(3.4526699672091397283e-4, -1.1920930376163652989e-7)}, + {FN (cot), ARG(-1.57114159377789786021e+00,-1.19209289550781250e-07), RES(3.4526699672091397283e-4, 1.1920930376163652989e-7)}, + {FN (cot), ARG(1.57114159377789786021e+00,5.0e-01), RES(-2.7153443992655573423e-4, -4.6211720058436229979e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,-5.0e-01), RES(-2.7153443992655573423e-4, 4.6211720058436229979e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,5.0e-01), RES(2.7153443992655573423e-4, -4.6211720058436229979e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,-5.0e-01), RES(2.7153443992655573423e-4, 4.6211720058436229979e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,1.0e+00), RES(-1.4500326960274836716e-4, -7.6159419408485704836e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,-1.0e+00), RES(-1.4500326960274836716e-4, 7.6159419408485704836e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,1.0e+00), RES(1.4500326960274836716e-4, -7.6159419408485704836e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,-1.0e+00), RES(1.4500326960274836716e-4, 7.6159419408485704836e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,2.0e+00), RES(-2.4393395410435097997e-5, -9.6402758819508310556e-1)}, + {FN (cot), ARG(1.57114159377789786021e+00,-2.0e+00), RES(-2.4393395410435097997e-5, 9.6402758819508310556e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,2.0e+00), RES(2.4393395410435097997e-5, -9.6402758819508310556e-1)}, + {FN (cot), ARG(-1.57114159377789786021e+00,-2.0e+00), RES(2.4393395410435097997e-5, 9.6402758819508310556e-1)}, + {FN (cot), ARG(3.14124738660679181379e+00,0.0e+00), RES(-2.8963092606495870519e3, 0.0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,0.0e+00), RES(2.8963092606495870519e3, 0.0)}, + {FN (cot), ARG(3.14124738660679181379e+00,1.19209289550781250e-07), RES(-2.8963089153826452102e3, -9.9999992052610836018e-1)}, + {FN (cot), ARG(3.14124738660679181379e+00,-1.19209289550781250e-07), RES(-2.8963089153826452102e3, 9.9999992052610836018e-1)}, + {FN (cot), ARG(-3.14124738660679181379e+00,1.19209289550781250e-07), RES(2.8963089153826452102e3, -9.9999992052610836018e-1)}, + {FN (cot), ARG(-3.14124738660679181379e+00,-1.19209289550781250e-07), RES(2.8963089153826452102e3, 9.9999992052610836018e-1)}, + {FN (cot), ARG(3.14124738660679181379e+00,5.0e-01), RES(-1.2715121175457878359e-3, -2.1639524637389325992e0)}, + {FN (cot), ARG(3.14124738660679181379e+00,-5.0e-01), RES(-1.2715121175457878359e-3, 2.1639524637389325992e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,5.0e-01), RES(1.2715121175457878359e-3, -2.1639524637389325992e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,-5.0e-01), RES(1.2715121175457878359e-3, 2.1639524637389325992e0)}, + {FN (cot), ARG(3.14124738660679181379e+00,1.0e+00), RES(-2.4999454374280707411e-4, -1.3130351721648674823e0)}, + {FN (cot), ARG(3.14124738660679181379e+00,-1.0e+00), RES(-2.4999454374280707411e-4, 1.3130351721648674823e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,1.0e+00), RES(2.4999454374280707411e-4, -1.3130351721648674823e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,-1.0e+00), RES(2.4999454374280707411e-4, 1.3130351721648674823e0)}, + {FN (cot), ARG(3.14124738660679181379e+00,2.0e+00), RES(-2.6247825506577476589e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(3.14124738660679181379e+00,-2.0e+00), RES(-2.6247825506577476589e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,2.0e+00), RES(2.6247825506577476589e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-3.14124738660679181379e+00,-2.0e+00), RES(2.6247825506577476589e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,0.0e+00), RES(2.8963092606516416684e3, 0.0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,0.0e+00), RES(-2.8963092606516416684e3, 0.0)}, + {FN (cot), ARG(3.14193792057279441821e+00,1.19209289550781250e-07), RES(2.8963089153846998260e3, -9.9999992052752714224e-1)}, + {FN (cot), ARG(3.14193792057279441821e+00,-1.19209289550781250e-07), RES(2.8963089153846998260e3, 9.9999992052752714224e-1)}, + {FN (cot), ARG(-3.14193792057279441821e+00,1.19209289550781250e-07), RES(-2.8963089153846998260e3, -9.9999992052752714224e-1)}, + {FN (cot), ARG(-3.14193792057279441821e+00,-1.19209289550781250e-07), RES(-2.8963089153846998260e3, 9.9999992052752714224e-1)}, + {FN (cot), ARG(3.14193792057279441821e+00,5.0e-01), RES(1.2715121175448858373e-3, -2.1639524637389326006e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,-5.0e-01), RES(1.2715121175448858373e-3, 2.1639524637389326006e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,5.0e-01), RES(-1.2715121175448858373e-3, -2.1639524637389326006e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,-5.0e-01), RES(-1.2715121175448858373e-3, 2.1639524637389326006e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,1.0e+00), RES(2.4999454374262973024e-4, -1.3130351721648674824e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,-1.0e+00), RES(2.4999454374262973024e-4, 1.3130351721648674824e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,1.0e+00), RES(-2.4999454374262973024e-4, -1.3130351721648674824e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,-1.0e+00), RES(-2.4999454374262973024e-4, 1.3130351721648674824e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,2.0e+00), RES(2.6247825506558856616e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(3.14193792057279441821e+00,-2.0e+00), RES(2.6247825506558856616e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,2.0e+00), RES(-2.6247825506558856616e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-3.14193792057279441821e+00,-2.0e+00), RES(-2.6247825506558856616e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(4.71204371340168837179e+00,0.0e+00), RES(3.4526699672116380876e-4, 0.0)}, + {FN (cot), ARG(-4.71204371340168837179e+00,0.0e+00), RES(-3.4526699672116380876e-4, 0.0)}, + {FN (cot), ARG(4.71204371340168837179e+00,1.19209289550781250e-07), RES(3.4526699672115890222e-4, -1.1920930376163652991e-7)}, + {FN (cot), ARG(4.71204371340168837179e+00,-1.19209289550781250e-07), RES(3.4526699672115890222e-4, 1.1920930376163652991e-7)}, + {FN (cot), ARG(-4.71204371340168837179e+00,1.19209289550781250e-07), RES(-3.4526699672115890222e-4, -1.1920930376163652991e-7)}, + {FN (cot), ARG(-4.71204371340168837179e+00,-1.19209289550781250e-07), RES(-3.4526699672115890222e-4, 1.1920930376163652991e-7)}, + {FN (cot), ARG(4.71204371340168837179e+00,5.0e-01), RES(2.7153443992674835838e-4, -4.6211720058436229985e-1)}, + {FN (cot), ARG(4.71204371340168837179e+00,-5.0e-01), RES(2.7153443992674835838e-4, 4.6211720058436229985e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,5.0e-01), RES(-2.7153443992674835838e-4, -4.6211720058436229985e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,-5.0e-01), RES(-2.7153443992674835838e-4, 4.6211720058436229985e-1)}, + {FN (cot), ARG(4.71204371340168837179e+00,1.0e+00), RES(1.4500326960285123120e-4, -7.6159419408485704842e-1)}, + {FN (cot), ARG(4.71204371340168837179e+00,-1.0e+00), RES(1.4500326960285123120e-4, 7.6159419408485704842e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,1.0e+00), RES(-1.4500326960285123120e-4, -7.6159419408485704842e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,-1.0e+00), RES(-1.4500326960285123120e-4, 7.6159419408485704842e-1)}, + {FN (cot), ARG(4.71204371340168837179e+00,2.0e+00), RES(2.4393395410452402454e-5, -9.6402758819508310557e-1)}, + {FN (cot), ARG(4.71204371340168837179e+00,-2.0e+00), RES(2.4393395410452402454e-5, 9.6402758819508310557e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,2.0e+00), RES(-2.4393395410452402454e-5, -9.6402758819508310557e-1)}, + {FN (cot), ARG(-4.71204371340168837179e+00,-2.0e+00), RES(-2.4393395410452402454e-5, 9.6402758819508310557e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,0.0e+00), RES(-3.4526699672079641468e-4, 0.0)}, + {FN (cot), ARG(-4.71273424736769097620e+00,0.0e+00), RES(3.4526699672079641468e-4, 0.0)}, + {FN (cot), ARG(4.71273424736769097620e+00,1.19209289550781250e-07), RES(-3.4526699672079150814e-4, -1.1920930376163652988e-7)}, + {FN (cot), ARG(4.71273424736769097620e+00,-1.19209289550781250e-07), RES(-3.4526699672079150814e-4, 1.1920930376163652988e-7)}, + {FN (cot), ARG(-4.71273424736769097620e+00,1.19209289550781250e-07), RES(3.4526699672079150814e-4, -1.1920930376163652988e-7)}, + {FN (cot), ARG(-4.71273424736769097620e+00,-1.19209289550781250e-07), RES(3.4526699672079150814e-4, 1.1920930376163652988e-7)}, + {FN (cot), ARG(4.71273424736769097620e+00,5.0e-01), RES(-2.7153443992645942216e-4, -4.6211720058436229976e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,-5.0e-01), RES(-2.7153443992645942216e-4, 4.6211720058436229976e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,5.0e-01), RES(2.7153443992645942216e-4, -4.6211720058436229976e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,-5.0e-01), RES(2.7153443992645942216e-4, 4.6211720058436229976e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,1.0e+00), RES(-1.4500326960269693514e-4, -7.6159419408485704834e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,-1.0e+00), RES(-1.4500326960269693514e-4, 7.6159419408485704834e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,1.0e+00), RES(1.4500326960269693514e-4, -7.6159419408485704834e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,-1.0e+00), RES(1.4500326960269693514e-4, 7.6159419408485704834e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,2.0e+00), RES(-2.4393395410426445768e-5, -9.6402758819508310556e-1)}, + {FN (cot), ARG(4.71273424736769097620e+00,-2.0e+00), RES(-2.4393395410426445768e-5, 9.6402758819508310556e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,2.0e+00), RES(2.4393395410426445768e-5, -9.6402758819508310556e-1)}, + {FN (cot), ARG(-4.71273424736769097620e+00,-2.0e+00), RES(2.4393395410426445768e-5, 9.6402758819508310556e-1)}, + {FN (cot), ARG(6.28284004019658492979e+00,0.0e+00), RES(-2.8963092606485597437e3, 0.0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,0.0e+00), RES(2.8963092606485597437e3, 0.0)}, + {FN (cot), ARG(6.28284004019658492979e+00,1.19209289550781250e-07), RES(-2.8963089153816179024e3, -9.9999992052539896914e-1)}, + {FN (cot), ARG(6.28284004019658492979e+00,-1.19209289550781250e-07), RES(-2.8963089153816179024e3, 9.9999992052539896914e-1)}, + {FN (cot), ARG(-6.28284004019658492979e+00,1.19209289550781250e-07), RES(2.8963089153816179024e3, -9.9999992052539896914e-1)}, + {FN (cot), ARG(-6.28284004019658492979e+00,-1.19209289550781250e-07), RES(2.8963089153816179024e3, 9.9999992052539896914e-1)}, + {FN (cot), ARG(6.28284004019658492979e+00,5.0e-01), RES(-1.2715121175462388352e-3, -2.1639524637389325986e0)}, + {FN (cot), ARG(6.28284004019658492979e+00,-5.0e-01), RES(-1.2715121175462388352e-3, 2.1639524637389325986e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,5.0e-01), RES(1.2715121175462388352e-3, -2.1639524637389325986e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,-5.0e-01), RES(1.2715121175462388352e-3, 2.1639524637389325986e0)}, + {FN (cot), ARG(6.28284004019658492979e+00,1.0e+00), RES(-2.4999454374289574604e-4, -1.3130351721648674822e0)}, + {FN (cot), ARG(6.28284004019658492979e+00,-1.0e+00), RES(-2.4999454374289574604e-4, 1.3130351721648674822e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,1.0e+00), RES(2.4999454374289574604e-4, -1.3130351721648674822e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,-1.0e+00), RES(2.4999454374289574604e-4, 1.3130351721648674822e0)}, + {FN (cot), ARG(6.28284004019658492979e+00,2.0e+00), RES(-2.6247825506586786575e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(6.28284004019658492979e+00,-2.0e+00), RES(-2.6247825506586786575e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,2.0e+00), RES(2.6247825506586786575e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-6.28284004019658492979e+00,-2.0e+00), RES(2.6247825506586786575e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,0.0e+00), RES(2.8963092606526689766e3, 0.0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,0.0e+00), RES(-2.8963092606526689766e3, 0.0)}, + {FN (cot), ARG(6.28353057416258753420e+00,1.19209289550781250e-07), RES(2.8963089153857271338e3, -9.9999992052823653327e-1)}, + {FN (cot), ARG(6.28353057416258753420e+00,-1.19209289550781250e-07), RES(2.8963089153857271338e3, 9.9999992052823653327e-1)}, + {FN (cot), ARG(-6.28353057416258753420e+00,1.19209289550781250e-07), RES(-2.8963089153857271338e3, -9.9999992052823653327e-1)}, + {FN (cot), ARG(-6.28353057416258753420e+00,-1.19209289550781250e-07), RES(-2.8963089153857271338e3, 9.9999992052823653327e-1)}, + {FN (cot), ARG(6.28353057416258753420e+00,5.0e-01), RES(1.2715121175444348380e-3, -2.1639524637389326012e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,-5.0e-01), RES(1.2715121175444348380e-3, 2.1639524637389326012e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,5.0e-01), RES(-1.2715121175444348380e-3, -2.1639524637389326012e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,-5.0e-01), RES(-1.2715121175444348380e-3, 2.1639524637389326012e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,1.0e+00), RES(2.4999454374254105830e-4, -1.3130351721648674825e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,-1.0e+00), RES(2.4999454374254105830e-4, 1.3130351721648674825e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,1.0e+00), RES(-2.4999454374254105830e-4, -1.3130351721648674825e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,-1.0e+00), RES(-2.4999454374254105830e-4, 1.3130351721648674825e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,2.0e+00), RES(2.6247825506549546629e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(6.28353057416258753420e+00,-2.0e+00), RES(2.6247825506549546629e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,2.0e+00), RES(-2.6247825506549546629e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-6.28353057416258753420e+00,-2.0e+00), RES(-2.6247825506549546629e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,0.0e+00), RES(-2.8963092606549830163e3, 0.0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,0.0e+00), RES(2.8963092606549830163e3, 0.0)}, + {FN (cot), ARG(9.42443269378637893396e+00,1.19209289550781250e-07), RES(-2.8963089153880411727e3, -9.9999992052983445585e-1)}, + {FN (cot), ARG(9.42443269378637893396e+00,-1.19209289550781250e-07), RES(-2.8963089153880411727e3, 9.9999992052983445585e-1)}, + {FN (cot), ARG(-9.42443269378637893396e+00,1.19209289550781250e-07), RES(2.8963089153880411727e3, -9.9999992052983445585e-1)}, + {FN (cot), ARG(-9.42443269378637893396e+00,-1.19209289550781250e-07), RES(2.8963089153880411727e3, 9.9999992052983445585e-1)}, + {FN (cot), ARG(9.42443269378637893396e+00,5.0e-01), RES(-1.2715121175434189499e-3, -2.1639524637389326028e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,-5.0e-01), RES(-1.2715121175434189499e-3, 2.1639524637389326028e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,5.0e-01), RES(1.2715121175434189499e-3, -2.1639524637389326028e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,-5.0e-01), RES(1.2715121175434189499e-3, 2.1639524637389326028e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,1.0e+00), RES(-2.4999454374234132236e-4, -1.3130351721648674827e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,-1.0e+00), RES(-2.4999454374234132236e-4, 1.3130351721648674827e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,1.0e+00), RES(2.4999454374234132236e-4, -1.3130351721648674827e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,-1.0e+00), RES(2.4999454374234132236e-4, 1.3130351721648674827e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,2.0e+00), RES(-2.6247825506528575631e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(9.42443269378637893396e+00,-2.0e+00), RES(-2.6247825506528575631e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,2.0e+00), RES(2.6247825506528575631e-5, -1.0373147113268752620e0)}, + {FN (cot), ARG(-9.42443269378637893396e+00,-2.0e+00), RES(2.6247825506528575631e-5, 1.0373147113268752620e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,0.0e+00), RES(2.8963092606611468657e3, 0.0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,0.0e+00), RES(-2.8963092606611468657e3, 0.0)}, + {FN (cot), ARG(9.42512322775237976202e+00,1.19209289550781250e-07), RES(2.8963089153942050199e3, -9.9999992053409080205e-1)}, + {FN (cot), ARG(9.42512322775237976202e+00,-1.19209289550781250e-07), RES(2.8963089153942050199e3, 9.9999992053409080205e-1)}, + {FN (cot), ARG(-9.42512322775237976202e+00,1.19209289550781250e-07), RES(-2.8963089153942050199e3, -9.9999992053409080205e-1)}, + {FN (cot), ARG(-9.42512322775237976202e+00,-1.19209289550781250e-07), RES(-2.8963089153942050199e3, 9.9999992053409080205e-1)}, + {FN (cot), ARG(9.42512322775237976202e+00,5.0e-01), RES(1.2715121175407129542e-3, -2.1639524637389326068e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,-5.0e-01), RES(1.2715121175407129542e-3, 2.1639524637389326068e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,5.0e-01), RES(-1.2715121175407129542e-3, -2.1639524637389326068e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,-5.0e-01), RES(-1.2715121175407129542e-3, 2.1639524637389326068e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,1.0e+00), RES(2.4999454374180929074e-4, -1.3130351721648674832e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,-1.0e+00), RES(2.4999454374180929074e-4, 1.3130351721648674832e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,1.0e+00), RES(-2.4999454374180929074e-4, -1.3130351721648674832e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,-1.0e+00), RES(-2.4999454374180929074e-4, 1.3130351721648674832e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,2.0e+00), RES(2.6247825506472715712e-5, -1.0373147113268752621e0)}, + {FN (cot), ARG(9.42512322775237976202e+00,-2.0e+00), RES(2.6247825506472715712e-5, 1.0373147113268752621e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,2.0e+00), RES(-2.6247825506472715712e-5, -1.0373147113268752621e0)}, + {FN (cot), ARG(-9.42512322775237976202e+00,-2.0e+00), RES(-2.6247825506472715712e-5, 1.0373147113268752621e0)}, + {FN (arccsc), ARG(0.0e+00,1.19209289550781250e-07), RES(0, -1.6635532333438690979e1)}, + {FN (arccsc), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, 1.6635532333438690979e1)}, + {FN (arccsc), ARG(0.0e+00,5.0e-01), RES(0, -1.4436354751788103425e0)}, + {FN (arccsc), ARG(0.0e+00,-5.0e-01), RES(0, 1.4436354751788103425e0)}, + {FN (arccsc), ARG(0.0e+00,1.0e+00), RES(0, -8.8137358701954302523e-1)}, + {FN (arccsc), ARG(0.0e+00,-1.0e+00), RES(0, 8.8137358701954302523e-1)}, + {FN (arccsc), ARG(0.0e+00,2.0e+00), RES(0, -4.8121182505960344750e-1)}, + {FN (arccsc), ARG(0.0e+00,-2.0e+00), RES(0, 4.8121182505960344750e-1)}, + {FN (arccsc), ARG(0.0e+00,8.3886080e+06), RES(0, -1.1920928955078096766e-7)}, + {FN (arccsc), ARG(0.0e+00,-8.3886080e+06), RES(0, 1.1920928955078096766e-7)}, + {FN (arccsc), ARG(1.19209289550781250e-07,0.0e+00), RES(1.5707963267948966192e0, -1.6635532333438683873e1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.5707963267948966192e0, 1.6635532333438683873e1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(7.8539816339744120419e-1, -1.6288958743158714771e1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(7.8539816339744120419e-1, 1.6288958743158714771e1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-7.8539816339744120419e-1, -1.6288958743158714771e1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-7.8539816339744120419e-1, 1.6288958743158714771e1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,5.0e-01), RES(2.1324805998799710740e-7, -1.4436354751787798371e0)}, + {FN (arccsc), ARG(1.19209289550781250e-07,-5.0e-01), RES(2.1324805998799710740e-7, 1.4436354751787798371e0)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,5.0e-01), RES(-2.1324805998799710740e-7, -1.4436354751787798371e0)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-2.1324805998799710740e-7, 1.4436354751787798371e0)}, + {FN (arccsc), ARG(1.19209289550781250e-07,1.0e+00), RES(8.4293697021787414719e-8, -8.8137358701953548879e-1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,-1.0e+00), RES(8.4293697021787414719e-8, 8.8137358701953548879e-1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,1.0e+00), RES(-8.4293697021787414719e-8, -8.8137358701953548879e-1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-8.4293697021787414719e-8, 8.8137358701953548879e-1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,2.0e+00), RES(2.6656007498500149811e-8, -4.8121182505960201756e-1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,-2.0e+00), RES(2.6656007498500149811e-8, 4.8121182505960201756e-1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,2.0e+00), RES(-2.6656007498500149811e-8, -4.8121182505960201756e-1)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-2.6656007498500149811e-8, 4.8121182505960201756e-1)}, + {FN (arccsc), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6940658945085886411e-21, -1.1920928955078096766e-7)}, + {FN (arccsc), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6940658945085886411e-21, 1.1920928955078096766e-7)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6940658945085886411e-21, -1.1920928955078096766e-7)}, + {FN (arccsc), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6940658945085886411e-21, 1.1920928955078096766e-7)}, + {FN (arccsc), ARG(5.0e-01,0.0e+00), RES(1.5707963267948966192e0, -1.3169578969248167086e0)}, + {FN (arccsc), ARG(-5.0e-01,0.0e+00), RES(-1.5707963267948966192e0, 1.3169578969248167086e0)}, + {FN (arccsc), ARG(5.0e-01,1.19209289550781250e-07), RES(1.5707960514928349710e0, -1.3169578969247948296e0)}, + {FN (arccsc), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.5707960514928349710e0, 1.3169578969247948296e0)}, + {FN (arccsc), ARG(-5.0e-01,1.19209289550781250e-07), RES(-1.5707960514928349710e0, -1.3169578969247948296e0)}, + {FN (arccsc), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-1.5707960514928349710e0, 1.3169578969247948296e0)}, + {FN (arccsc), ARG(5.0e-01,5.0e-01), RES(6.6623943249251525510e-1, -1.0612750619050356520e0)}, + {FN (arccsc), ARG(5.0e-01,-5.0e-01), RES(6.6623943249251525510e-1, 1.0612750619050356520e0)}, + {FN (arccsc), ARG(-5.0e-01,5.0e-01), RES(-6.6623943249251525510e-1, -1.0612750619050356520e0)}, + {FN (arccsc), ARG(-5.0e-01,-5.0e-01), RES(-6.6623943249251525510e-1, 1.0612750619050356520e0)}, + {FN (arccsc), ARG(5.0e-01,1.0e+00), RES(3.1122579724476109533e-1, -7.6388434595371104541e-1)}, + {FN (arccsc), ARG(5.0e-01,-1.0e+00), RES(3.1122579724476109533e-1, 7.6388434595371104541e-1)}, + {FN (arccsc), ARG(-5.0e-01,1.0e+00), RES(-3.1122579724476109533e-1, -7.6388434595371104541e-1)}, + {FN (arccsc), ARG(-5.0e-01,-1.0e+00), RES(-3.1122579724476109533e-1, 7.6388434595371104541e-1)}, + {FN (arccsc), ARG(5.0e-01,2.0e+00), RES(1.0654050295275703990e-1, -4.5717847686917515748e-1)}, + {FN (arccsc), ARG(5.0e-01,-2.0e+00), RES(1.0654050295275703990e-1, 4.5717847686917515748e-1)}, + {FN (arccsc), ARG(-5.0e-01,2.0e+00), RES(-1.0654050295275703990e-1, -4.5717847686917515748e-1)}, + {FN (arccsc), ARG(-5.0e-01,-2.0e+00), RES(-1.0654050295275703990e-1, 4.5717847686917515748e-1)}, + {FN (arccsc), ARG(5.0e-01,8.3886080e+06), RES(7.1054273576009261281e-15, -1.1920928955078054414e-7)}, + {FN (arccsc), ARG(5.0e-01,-8.3886080e+06), RES(7.1054273576009261281e-15, 1.1920928955078054414e-7)}, + {FN (arccsc), ARG(-5.0e-01,8.3886080e+06), RES(-7.1054273576009261281e-15, -1.1920928955078054414e-7)}, + {FN (arccsc), ARG(-5.0e-01,-8.3886080e+06), RES(-7.1054273576009261281e-15, 1.1920928955078054414e-7)}, + {FN (arccsc), ARG(1.0e+00,0.0e+00), RES(1.5707963267948966192e0, 0.0)}, + {FN (arccsc), ARG(-1.0e+00,0.0e+00), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arccsc), ARG(1.0e+00,1.19209289550781250e-07), RES(1.5704510597947457801e0, -3.4526696585164602772e-4)}, + {FN (arccsc), ARG(1.0e+00,-1.19209289550781250e-07), RES(1.5704510597947457801e0, 3.4526696585164602772e-4)}, + {FN (arccsc), ARG(-1.0e+00,1.19209289550781250e-07), RES(-1.5704510597947457801e0, -3.4526696585164602772e-4)}, + {FN (arccsc), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-1.5704510597947457801e0, 3.4526696585164602772e-4)}, + {FN (arccsc), ARG(1.0e+00,5.0e-01), RES(7.7308635671950473342e-1, -5.3321829058411214108e-1)}, + {FN (arccsc), ARG(1.0e+00,-5.0e-01), RES(7.7308635671950473342e-1, 5.3321829058411214108e-1)}, + {FN (arccsc), ARG(-1.0e+00,5.0e-01), RES(-7.7308635671950473342e-1, -5.3321829058411214108e-1)}, + {FN (arccsc), ARG(-1.0e+00,-5.0e-01), RES(-7.7308635671950473342e-1, 5.3321829058411214108e-1)}, + {FN (arccsc), ARG(1.0e+00,1.0e+00), RES(4.5227844715119068206e-1, -5.3063753095251782602e-1)}, + {FN (arccsc), ARG(1.0e+00,-1.0e+00), RES(4.5227844715119068206e-1, 5.3063753095251782602e-1)}, + {FN (arccsc), ARG(-1.0e+00,1.0e+00), RES(-4.5227844715119068206e-1, -5.3063753095251782602e-1)}, + {FN (arccsc), ARG(-1.0e+00,-1.0e+00), RES(-4.5227844715119068206e-1, 5.3063753095251782602e-1)}, + {FN (arccsc), ARG(1.0e+00,2.0e+00), RES(1.8631805410781552582e-1, -3.9656823011232897892e-1)}, + {FN (arccsc), ARG(1.0e+00,-2.0e+00), RES(1.8631805410781552582e-1, 3.9656823011232897892e-1)}, + {FN (arccsc), ARG(-1.0e+00,2.0e+00), RES(-1.8631805410781552582e-1, -3.9656823011232897892e-1)}, + {FN (arccsc), ARG(-1.0e+00,-2.0e+00), RES(-1.8631805410781552582e-1, 3.9656823011232897892e-1)}, + {FN (arccsc), ARG(1.0e+00,8.3886080e+06), RES(1.4210854715201700795e-14, -1.1920928955077927359e-7)}, + {FN (arccsc), ARG(1.0e+00,-8.3886080e+06), RES(1.4210854715201700795e-14, 1.1920928955077927359e-7)}, + {FN (arccsc), ARG(-1.0e+00,8.3886080e+06), RES(-1.4210854715201700795e-14, -1.1920928955077927359e-7)}, + {FN (arccsc), ARG(-1.0e+00,-8.3886080e+06), RES(-1.4210854715201700795e-14, 1.1920928955077927359e-7)}, + {FN (arccsc), ARG(2.0e+00,0.0e+00), RES(5.2359877559829887308e-1, 0.0)}, + {FN (arccsc), ARG(-2.0e+00,0.0e+00), RES(-5.2359877559829887308e-1, 0.0)}, + {FN (arccsc), ARG(2.0e+00,1.19209289550781250e-07), RES(5.2359877559829648006e-1, -3.4412757706023621662e-8)}, + {FN (arccsc), ARG(2.0e+00,-1.19209289550781250e-07), RES(5.2359877559829648006e-1, 3.4412757706023621662e-8)}, + {FN (arccsc), ARG(-2.0e+00,1.19209289550781250e-07), RES(-5.2359877559829648006e-1, -3.4412757706023621662e-8)}, + {FN (arccsc), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-5.2359877559829648006e-1, 3.4412757706023621662e-8)}, + {FN (arccsc), ARG(2.0e+00,5.0e-01), RES(4.8530734047334251250e-1, -1.3261586085051183885e-1)}, + {FN (arccsc), ARG(2.0e+00,-5.0e-01), RES(4.8530734047334251250e-1, 1.3261586085051183885e-1)}, + {FN (arccsc), ARG(-2.0e+00,5.0e-01), RES(-4.8530734047334251250e-1, -1.3261586085051183885e-1)}, + {FN (arccsc), ARG(-2.0e+00,-5.0e-01), RES(-4.8530734047334251250e-1, 1.3261586085051183885e-1)}, + {FN (arccsc), ARG(2.0e+00,1.0e+00), RES(4.0158639166780606828e-1, -2.1561241855582964497e-1)}, + {FN (arccsc), ARG(2.0e+00,-1.0e+00), RES(4.0158639166780606828e-1, 2.1561241855582964497e-1)}, + {FN (arccsc), ARG(-2.0e+00,1.0e+00), RES(-4.0158639166780606828e-1, -2.1561241855582964497e-1)}, + {FN (arccsc), ARG(-2.0e+00,-1.0e+00), RES(-4.0158639166780606828e-1, 2.1561241855582964497e-1)}, + {FN (arccsc), ARG(2.0e+00,2.0e+00), RES(2.4452216513554014646e-1, -2.5489557334055081773e-1)}, + {FN (arccsc), ARG(2.0e+00,-2.0e+00), RES(2.4452216513554014646e-1, 2.5489557334055081773e-1)}, + {FN (arccsc), ARG(-2.0e+00,2.0e+00), RES(-2.4452216513554014646e-1, -2.5489557334055081773e-1)}, + {FN (arccsc), ARG(-2.0e+00,-2.0e+00), RES(-2.4452216513554014646e-1, 2.5489557334055081773e-1)}, + {FN (arccsc), ARG(2.0e+00,8.3886080e+06), RES(2.8421709430402189899e-14, -1.1920928955077419139e-7)}, + {FN (arccsc), ARG(2.0e+00,-8.3886080e+06), RES(2.8421709430402189899e-14, 1.1920928955077419139e-7)}, + {FN (arccsc), ARG(-2.0e+00,8.3886080e+06), RES(-2.8421709430402189899e-14, -1.1920928955077419139e-7)}, + {FN (arccsc), ARG(-2.0e+00,-8.3886080e+06), RES(-2.8421709430402189899e-14, 1.1920928955077419139e-7)}, + {FN (arccsc), ARG(8.3886080e+06,0.0e+00), RES(1.1920928955078153234e-7, 0.0)}, + {FN (arccsc), ARG(-8.3886080e+06,0.0e+00), RES(-1.1920928955078153234e-7, 0.0)}, + {FN (arccsc), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.1920928955078153234e-7, -1.6940658945086127152e-21)}, + {FN (arccsc), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.1920928955078153234e-7, 1.6940658945086127152e-21)}, + {FN (arccsc), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.1920928955078153234e-7, -1.6940658945086127152e-21)}, + {FN (arccsc), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.1920928955078153234e-7, 1.6940658945086127152e-21)}, + {FN (arccsc), ARG(8.3886080e+06,5.0e-01), RES(1.1920928955078110883e-7, -7.1054273576010271023e-15)}, + {FN (arccsc), ARG(8.3886080e+06,-5.0e-01), RES(1.1920928955078110883e-7, 7.1054273576010271023e-15)}, + {FN (arccsc), ARG(-8.3886080e+06,5.0e-01), RES(-1.1920928955078110883e-7, -7.1054273576010271023e-15)}, + {FN (arccsc), ARG(-8.3886080e+06,-5.0e-01), RES(-1.1920928955078110883e-7, 7.1054273576010271023e-15)}, + {FN (arccsc), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955077983828e-7, -1.4210854715201902743e-14)}, + {FN (arccsc), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955077983828e-7, 1.4210854715201902743e-14)}, + {FN (arccsc), ARG(-8.3886080e+06,1.0e+00), RES(-1.1920928955077983828e-7, -1.4210854715201902743e-14)}, + {FN (arccsc), ARG(-8.3886080e+06,-1.0e+00), RES(-1.1920928955077983828e-7, 1.4210854715201902743e-14)}, + {FN (arccsc), ARG(8.3886080e+06,2.0e+00), RES(1.1920928955077475608e-7, -2.8421709430402593796e-14)}, + {FN (arccsc), ARG(8.3886080e+06,-2.0e+00), RES(1.1920928955077475608e-7, 2.8421709430402593796e-14)}, + {FN (arccsc), ARG(-8.3886080e+06,2.0e+00), RES(-1.1920928955077475608e-7, -2.8421709430402593796e-14)}, + {FN (arccsc), ARG(-8.3886080e+06,-2.0e+00), RES(-1.1920928955077475608e-7, 2.8421709430402593796e-14)}, + {FN (arccsc), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390554414e-8, -5.9604644775390695586e-8)}, + {FN (arccsc), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390554414e-8, 5.9604644775390695586e-8)}, + {FN (arccsc), ARG(-8.3886080e+06,8.3886080e+06), RES(-5.9604644775390554414e-8, -5.9604644775390695586e-8)}, + {FN (arccsc), ARG(-8.3886080e+06,-8.3886080e+06), RES(-5.9604644775390554414e-8, 5.9604644775390695586e-8)}, + {FN (arcsec), ARG(0.0e+00,1.19209289550781250e-07), RES(1.5707963267948966192e0, 1.6635532333438690979e1)}, + {FN (arcsec), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.5707963267948966192e0, -1.6635532333438690979e1)}, + {FN (arcsec), ARG(0.0e+00,5.0e-01), RES(1.5707963267948966192e0, 1.4436354751788103425e0)}, + {FN (arcsec), ARG(0.0e+00,-5.0e-01), RES(1.5707963267948966192e0, -1.4436354751788103425e0)}, + {FN (arcsec), ARG(0.0e+00,1.0e+00), RES(1.5707963267948966192e0, 8.8137358701954302523e-1)}, + {FN (arcsec), ARG(0.0e+00,-1.0e+00), RES(1.5707963267948966192e0, -8.8137358701954302523e-1)}, + {FN (arcsec), ARG(0.0e+00,2.0e+00), RES(1.5707963267948966192e0, 4.8121182505960344750e-1)}, + {FN (arcsec), ARG(0.0e+00,-2.0e+00), RES(1.5707963267948966192e0, -4.8121182505960344750e-1)}, + {FN (arcsec), ARG(0.0e+00,8.3886080e+06), RES(1.5707963267948966192e0, 1.1920928955078096766e-7)}, + {FN (arcsec), ARG(0.0e+00,-8.3886080e+06), RES(1.5707963267948966192e0, -1.1920928955078096766e-7)}, + {FN (arcsec), ARG(1.19209289550781250e-07,0.0e+00), RES(0, 1.6635532333438683873e1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,0.0e+00), RES(3.1415926535897932385e0, -1.6635532333438683873e1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(7.8539816339745541504e-1, 1.6288958743158714771e1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(7.8539816339745541504e-1, -1.6288958743158714771e1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(2.3561944901923378234e0, 1.6288958743158714771e1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(2.3561944901923378234e0, -1.6288958743158714771e1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,5.0e-01), RES(1.5707961135468366312e0, 1.4436354751787798371e0)}, + {FN (arcsec), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.5707961135468366312e0, -1.4436354751787798371e0)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,5.0e-01), RES(1.5707965400429566072e0, 1.4436354751787798371e0)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,-5.0e-01), RES(1.5707965400429566072e0, -1.4436354751787798371e0)}, + {FN (arcsec), ARG(1.19209289550781250e-07,1.0e+00), RES(1.5707962425011995974e0, 8.8137358701953548879e-1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,-1.0e+00), RES(1.5707962425011995974e0, -8.8137358701953548879e-1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,1.0e+00), RES(1.5707964110885936410e0, 8.8137358701953548879e-1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,-1.0e+00), RES(1.5707964110885936410e0, -8.8137358701953548879e-1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,2.0e+00), RES(1.5707963001388891207e0, 4.8121182505960201756e-1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,-2.0e+00), RES(1.5707963001388891207e0, -4.8121182505960201756e-1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,2.0e+00), RES(1.5707963534509041177e0, 4.8121182505960201756e-1)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,-2.0e+00), RES(1.5707963534509041177e0, -4.8121182505960201756e-1)}, + {FN (arcsec), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267948966192e0, 1.1920928955078096766e-7)}, + {FN (arcsec), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5707963267948966192e0, -1.1920928955078096766e-7)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267948966192e0, 1.1920928955078096766e-7)}, + {FN (arcsec), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5707963267948966192e0, -1.1920928955078096766e-7)}, + {FN (arcsec), ARG(5.0e-01,0.0e+00), RES(0, 1.3169578969248167086e0)}, + {FN (arcsec), ARG(-5.0e-01,0.0e+00), RES(3.1415926535897932385e0, -1.3169578969248167086e0)}, + {FN (arcsec), ARG(5.0e-01,1.19209289550781250e-07), RES(2.7530206164818516969e-7, 1.3169578969247948296e0)}, + {FN (arcsec), ARG(5.0e-01,-1.19209289550781250e-07), RES(2.7530206164818516969e-7, -1.3169578969247948296e0)}, + {FN (arcsec), ARG(-5.0e-01,1.19209289550781250e-07), RES(3.1415923782877315903e0, 1.3169578969247948296e0)}, + {FN (arcsec), ARG(-5.0e-01,-1.19209289550781250e-07), RES(3.1415923782877315903e0, -1.3169578969247948296e0)}, + {FN (arcsec), ARG(5.0e-01,5.0e-01), RES(9.0455689430238136413e-1, 1.0612750619050356520e0)}, + {FN (arcsec), ARG(5.0e-01,-5.0e-01), RES(9.0455689430238136413e-1, -1.0612750619050356520e0)}, + {FN (arcsec), ARG(-5.0e-01,5.0e-01), RES(2.2370357592874118743e0, 1.0612750619050356520e0)}, + {FN (arcsec), ARG(-5.0e-01,-5.0e-01), RES(2.2370357592874118743e0, -1.0612750619050356520e0)}, + {FN (arcsec), ARG(5.0e-01,1.0e+00), RES(1.2595705295501355239e0, 7.6388434595371104541e-1)}, + {FN (arcsec), ARG(5.0e-01,-1.0e+00), RES(1.2595705295501355239e0, -7.6388434595371104541e-1)}, + {FN (arcsec), ARG(-5.0e-01,1.0e+00), RES(1.8820221240396577146e0, 7.6388434595371104541e-1)}, + {FN (arcsec), ARG(-5.0e-01,-1.0e+00), RES(1.8820221240396577146e0, -7.6388434595371104541e-1)}, + {FN (arcsec), ARG(5.0e-01,2.0e+00), RES(1.4642558238421395793e0, 4.5717847686917515748e-1)}, + {FN (arcsec), ARG(5.0e-01,-2.0e+00), RES(1.4642558238421395793e0, -4.5717847686917515748e-1)}, + {FN (arcsec), ARG(-5.0e-01,2.0e+00), RES(1.6773368297476536591e0, 4.5717847686917515748e-1)}, + {FN (arcsec), ARG(-5.0e-01,-2.0e+00), RES(1.6773368297476536591e0, -4.5717847686917515748e-1)}, + {FN (arcsec), ARG(5.0e-01,8.3886080e+06), RES(1.5707963267948895138e0, 1.1920928955078054414e-7)}, + {FN (arcsec), ARG(5.0e-01,-8.3886080e+06), RES(1.5707963267948895138e0, -1.1920928955078054414e-7)}, + {FN (arcsec), ARG(-5.0e-01,8.3886080e+06), RES(1.5707963267949037247e0, 1.1920928955078054414e-7)}, + {FN (arcsec), ARG(-5.0e-01,-8.3886080e+06), RES(1.5707963267949037247e0, -1.1920928955078054414e-7)}, + {FN (arcsec), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arcsec), ARG(-1.0e+00,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arcsec), ARG(1.0e+00,1.19209289550781250e-07), RES(3.4526700015083915182e-4, 3.4526696585164602772e-4)}, + {FN (arcsec), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.4526700015083915182e-4, -3.4526696585164602772e-4)}, + {FN (arcsec), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.1412473865896423993e0, 3.4526696585164602772e-4)}, + {FN (arcsec), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.1412473865896423993e0, -3.4526696585164602772e-4)}, + {FN (arcsec), ARG(1.0e+00,5.0e-01), RES(7.9770997007539188581e-1, 5.3321829058411214108e-1)}, + {FN (arcsec), ARG(1.0e+00,-5.0e-01), RES(7.9770997007539188581e-1, -5.3321829058411214108e-1)}, + {FN (arcsec), ARG(-1.0e+00,5.0e-01), RES(2.3438826835144013527e0, 5.3321829058411214108e-1)}, + {FN (arcsec), ARG(-1.0e+00,-5.0e-01), RES(2.3438826835144013527e0, -5.3321829058411214108e-1)}, + {FN (arcsec), ARG(1.0e+00,1.0e+00), RES(1.1185178796437059372e0, 5.3063753095251782602e-1)}, + {FN (arcsec), ARG(1.0e+00,-1.0e+00), RES(1.1185178796437059372e0, -5.3063753095251782602e-1)}, + {FN (arcsec), ARG(-1.0e+00,1.0e+00), RES(2.0230747739460873013e0, 5.3063753095251782602e-1)}, + {FN (arcsec), ARG(-1.0e+00,-1.0e+00), RES(2.0230747739460873013e0, -5.3063753095251782602e-1)}, + {FN (arcsec), ARG(1.0e+00,2.0e+00), RES(1.3844782726870810934e0, 3.9656823011232897892e-1)}, + {FN (arcsec), ARG(1.0e+00,-2.0e+00), RES(1.3844782726870810934e0, -3.9656823011232897892e-1)}, + {FN (arcsec), ARG(-1.0e+00,2.0e+00), RES(1.7571143809027121451e0, 3.9656823011232897892e-1)}, + {FN (arcsec), ARG(-1.0e+00,-2.0e+00), RES(1.7571143809027121451e0, -3.9656823011232897892e-1)}, + {FN (arcsec), ARG(1.0e+00,8.3886080e+06), RES(1.5707963267948824084e0, 1.1920928955077927359e-7)}, + {FN (arcsec), ARG(1.0e+00,-8.3886080e+06), RES(1.5707963267948824084e0, -1.1920928955077927359e-7)}, + {FN (arcsec), ARG(-1.0e+00,8.3886080e+06), RES(1.5707963267949108301e0, 1.1920928955077927359e-7)}, + {FN (arcsec), ARG(-1.0e+00,-8.3886080e+06), RES(1.5707963267949108301e0, -1.1920928955077927359e-7)}, + {FN (arcsec), ARG(2.0e+00,0.0e+00), RES(1.0471975511965977462e0, 0.0)}, + {FN (arcsec), ARG(-2.0e+00,0.0e+00), RES(2.0943951023931954923e0, 0.0)}, + {FN (arcsec), ARG(2.0e+00,1.19209289550781250e-07), RES(1.0471975511966001392e0, 3.4412757706023621662e-8)}, + {FN (arcsec), ARG(2.0e+00,-1.19209289550781250e-07), RES(1.0471975511966001392e0, -3.4412757706023621662e-8)}, + {FN (arcsec), ARG(-2.0e+00,1.19209289550781250e-07), RES(2.0943951023931930993e0, 3.4412757706023621662e-8)}, + {FN (arcsec), ARG(-2.0e+00,-1.19209289550781250e-07), RES(2.0943951023931930993e0, -3.4412757706023621662e-8)}, + {FN (arcsec), ARG(2.0e+00,5.0e-01), RES(1.0854889863215541067e0, 1.3261586085051183885e-1)}, + {FN (arcsec), ARG(2.0e+00,-5.0e-01), RES(1.0854889863215541067e0, -1.3261586085051183885e-1)}, + {FN (arcsec), ARG(-2.0e+00,5.0e-01), RES(2.0561036672682391317e0, 1.3261586085051183885e-1)}, + {FN (arcsec), ARG(-2.0e+00,-5.0e-01), RES(2.0561036672682391317e0, -1.3261586085051183885e-1)}, + {FN (arcsec), ARG(2.0e+00,1.0e+00), RES(1.1692099351270905509e0, 2.1561241855582964497e-1)}, + {FN (arcsec), ARG(2.0e+00,-1.0e+00), RES(1.1692099351270905509e0, -2.1561241855582964497e-1)}, + {FN (arcsec), ARG(-2.0e+00,1.0e+00), RES(1.9723827184627026875e0, 2.1561241855582964497e-1)}, + {FN (arcsec), ARG(-2.0e+00,-1.0e+00), RES(1.9723827184627026875e0, -2.1561241855582964497e-1)}, + {FN (arcsec), ARG(2.0e+00,2.0e+00), RES(1.3262741616593564728e0, 2.5489557334055081773e-1)}, + {FN (arcsec), ARG(2.0e+00,-2.0e+00), RES(1.3262741616593564728e0, -2.5489557334055081773e-1)}, + {FN (arcsec), ARG(-2.0e+00,2.0e+00), RES(1.8153184919304367657e0, 2.5489557334055081773e-1)}, + {FN (arcsec), ARG(-2.0e+00,-2.0e+00), RES(1.8153184919304367657e0, -2.5489557334055081773e-1)}, + {FN (arcsec), ARG(2.0e+00,8.3886080e+06), RES(1.5707963267948681975e0, 1.1920928955077419139e-7)}, + {FN (arcsec), ARG(2.0e+00,-8.3886080e+06), RES(1.5707963267948681975e0, -1.1920928955077419139e-7)}, + {FN (arcsec), ARG(-2.0e+00,8.3886080e+06), RES(1.5707963267949250409e0, 1.1920928955077419139e-7)}, + {FN (arcsec), ARG(-2.0e+00,-8.3886080e+06), RES(1.5707963267949250409e0, -1.1920928955077419139e-7)}, + {FN (arcsec), ARG(8.3886080e+06,0.0e+00), RES(1.5707962075856070684e0, 0.0)}, + {FN (arcsec), ARG(-8.3886080e+06,0.0e+00), RES(1.570796446004186170e0, 0.0)}, + {FN (arcsec), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5707962075856070684e0, 1.6940658945086127152e-21)}, + {FN (arcsec), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5707962075856070684e0, -1.6940658945086127152e-21)}, + {FN (arcsec), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.570796446004186170e0, 1.6940658945086127152e-21)}, + {FN (arcsec), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.570796446004186170e0, -1.6940658945086127152e-21)}, + {FN (arcsec), ARG(8.3886080e+06,5.0e-01), RES(1.5707962075856070685e0, 7.1054273576010271023e-15)}, + {FN (arcsec), ARG(8.3886080e+06,-5.0e-01), RES(1.5707962075856070685e0, -7.1054273576010271023e-15)}, + {FN (arcsec), ARG(-8.3886080e+06,5.0e-01), RES(1.570796446004186170e0, 7.1054273576010271023e-15)}, + {FN (arcsec), ARG(-8.3886080e+06,-5.0e-01), RES(1.570796446004186170e0, -7.1054273576010271023e-15)}, + {FN (arcsec), ARG(8.3886080e+06,1.0e+00), RES(1.5707962075856070685e0, 1.4210854715201902743e-14)}, + {FN (arcsec), ARG(8.3886080e+06,-1.0e+00), RES(1.5707962075856070685e0, -1.4210854715201902743e-14)}, + {FN (arcsec), ARG(-8.3886080e+06,1.0e+00), RES(1.570796446004186170e0, 1.4210854715201902743e-14)}, + {FN (arcsec), ARG(-8.3886080e+06,-1.0e+00), RES(1.570796446004186170e0, -1.4210854715201902743e-14)}, + {FN (arcsec), ARG(8.3886080e+06,2.0e+00), RES(1.5707962075856070685e0, 2.8421709430402593796e-14)}, + {FN (arcsec), ARG(8.3886080e+06,-2.0e+00), RES(1.5707962075856070685e0, -2.8421709430402593796e-14)}, + {FN (arcsec), ARG(-8.3886080e+06,2.0e+00), RES(1.570796446004186170e0, 2.8421709430402593796e-14)}, + {FN (arcsec), ARG(-8.3886080e+06,-2.0e+00), RES(1.570796446004186170e0, -2.8421709430402593796e-14)}, + {FN (arcsec), ARG(8.3886080e+06,8.3886080e+06), RES(1.5707962671902518438e0, 5.9604644775390695586e-8)}, + {FN (arcsec), ARG(8.3886080e+06,-8.3886080e+06), RES(1.5707962671902518438e0, -5.9604644775390695586e-8)}, + {FN (arcsec), ARG(-8.3886080e+06,8.3886080e+06), RES(1.5707963863995413946e0, 5.9604644775390695586e-8)}, + {FN (arcsec), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.5707963863995413946e0, -5.9604644775390695586e-8)}, + {FN (arccot), ARG(0.0e+00,1.19209289550781250e-07), RES(-1.5707963267948966192e0, -1.1920928955078181469e-7)}, + {FN (arccot), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.5707963267948966192e0, 1.1920928955078181469e-7)}, + {FN (arccot), ARG(0.0e+00,5.0e-01), RES(-1.5707963267948966192e0, -5.4930614433405484570e-1)}, + {FN (arccot), ARG(0.0e+00,-5.0e-01), RES(1.5707963267948966192e0, 5.4930614433405484570e-1)}, + {FN (arccot), ARG(0.0e+00,2.0e+00), RES(0, -5.4930614433405484570e-1)}, + {FN (arccot), ARG(0.0e+00,-2.0e+00), RES(0, 5.4930614433405484570e-1)}, + {FN (arccot), ARG(0.0e+00,8.3886080e+06), RES(0, -1.1920928955078181469e-7)}, + {FN (arccot), ARG(0.0e+00,-8.3886080e+06), RES(0, 1.1920928955078181469e-7)}, + {FN (arccot), ARG(1.19209289550781250e-07,0.0e+00), RES(1.5707962075856070685e0, 0.0)}, + {FN (arccot), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.5707962075856070685e0, 0.0)}, + {FN (arccot), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.5707962075856070684e0, -1.1920928955078012062e-7)}, + {FN (arccot), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.5707962075856070684e0, 1.1920928955078012062e-7)}, + {FN (arccot), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5707962075856070684e0, -1.1920928955078012062e-7)}, + {FN (arccot), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5707962075856070684e0, 1.1920928955078012062e-7)}, + {FN (arccot), ARG(1.19209289550781250e-07,5.0e-01), RES(1.5707961678491772182e0, -5.4930614433404221383e-1)}, + {FN (arccot), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.5707961678491772182e0, 5.4930614433404221383e-1)}, + {FN (arccot), ARG(-1.19209289550781250e-07,5.0e-01), RES(-1.5707961678491772182e0, -5.4930614433404221383e-1)}, + {FN (arccot), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.5707961678491772182e0, 5.4930614433404221383e-1)}, + {FN (arccot), ARG(1.19209289550781250e-07,1.0e+00), RES(7.8539813359512592192e-1, -8.3177661667193446012e0)}, + {FN (arccot), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.8539813359512592192e-1, 8.3177661667193446012e0)}, + {FN (arccot), ARG(-1.19209289550781250e-07,1.0e+00), RES(-7.8539813359512592192e-1, -8.3177661667193446012e0)}, + {FN (arccot), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-7.8539813359512592192e-1, 8.3177661667193446012e0)}, + {FN (arccot), ARG(1.19209289550781250e-07,2.0e+00), RES(3.9736429850260144780e-8, -5.4930614433405168773e-1)}, + {FN (arccot), ARG(1.19209289550781250e-07,-2.0e+00), RES(3.9736429850260144780e-8, 5.4930614433405168773e-1)}, + {FN (arccot), ARG(-1.19209289550781250e-07,2.0e+00), RES(-3.9736429850260144780e-8, -5.4930614433405168773e-1)}, + {FN (arccot), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-3.9736429850260144780e-8, 5.4930614433405168773e-1)}, + {FN (arccot), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6940658945086247523e-21, -1.1920928955078181469e-7)}, + {FN (arccot), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6940658945086247523e-21, 1.1920928955078181469e-7)}, + {FN (arccot), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6940658945086247523e-21, -1.1920928955078181469e-7)}, + {FN (arccot), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6940658945086247523e-21, 1.1920928955078181469e-7)}, + {FN (arccot), ARG(5.0e-01,0.0e+00), RES(1.1071487177940905030e0, 0.0)}, + {FN (arccot), ARG(-5.0e-01,0.0e+00), RES(-1.1071487177940905030e0, 0.0)}, + {FN (arccot), ARG(5.0e-01,1.19209289550781250e-07), RES(1.1071487177940859555e0, -9.5367431640625072280e-8)}, + {FN (arccot), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.1071487177940859555e0, 9.5367431640625072280e-8)}, + {FN (arccot), ARG(-5.0e-01,1.19209289550781250e-07), RES(-1.1071487177940859555e0, -9.5367431640625072280e-8)}, + {FN (arccot), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-1.1071487177940859555e0, 9.5367431640625072280e-8)}, + {FN (arccot), ARG(5.0e-01,5.0e-01), RES(1.0172219678978513677e0, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(5.0e-01,-5.0e-01), RES(1.0172219678978513677e0, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(-5.0e-01,5.0e-01), RES(-1.0172219678978513677e0, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(-5.0e-01,-5.0e-01), RES(-1.0172219678978513677e0, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(5.0e-01,1.0e+00), RES(6.6290883183401623253e-1, -7.0830333601405402006e-1)}, + {FN (arccot), ARG(5.0e-01,-1.0e+00), RES(6.6290883183401623253e-1, 7.0830333601405402006e-1)}, + {FN (arccot), ARG(-5.0e-01,1.0e+00), RES(-6.6290883183401623253e-1, -7.0830333601405402006e-1)}, + {FN (arccot), ARG(-5.0e-01,-1.0e+00), RES(-6.6290883183401623253e-1, 7.0830333601405402006e-1)}, + {FN (arccot), ARG(5.0e-01,2.0e+00), RES(1.4924946579308963897e-1, -5.0037000005253101744e-1)}, + {FN (arccot), ARG(5.0e-01,-2.0e+00), RES(1.4924946579308963897e-1, 5.0037000005253101744e-1)}, + {FN (arccot), ARG(-5.0e-01,2.0e+00), RES(-1.4924946579308963897e-1, -5.0037000005253101744e-1)}, + {FN (arccot), ARG(-5.0e-01,-2.0e+00), RES(-1.4924946579308963897e-1, 5.0037000005253101744e-1)}, + {FN (arccot), ARG(5.0e-01,8.3886080e+06), RES(7.1054273576010775894e-15, -1.1920928955078139117e-7)}, + {FN (arccot), ARG(5.0e-01,-8.3886080e+06), RES(7.1054273576010775894e-15, 1.1920928955078139117e-7)}, + {FN (arccot), ARG(-5.0e-01,8.3886080e+06), RES(-7.1054273576010775894e-15, -1.1920928955078139117e-7)}, + {FN (arccot), ARG(-5.0e-01,-8.3886080e+06), RES(-7.1054273576010775894e-15, 1.1920928955078139117e-7)}, + {FN (arccot), ARG(1.0e+00,0.0e+00), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arccot), ARG(-1.0e+00,0.0e+00), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arccot), ARG(1.0e+00,1.19209289550781250e-07), RES(7.8539816339744475690e-1, -5.9604644775390483828e-8)}, + {FN (arccot), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.8539816339744475690e-1, 5.9604644775390483828e-8)}, + {FN (arccot), ARG(-1.0e+00,1.19209289550781250e-07), RES(-7.8539816339744475690e-1, -5.9604644775390483828e-8)}, + {FN (arccot), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-7.8539816339744475690e-1, 5.9604644775390483828e-8)}, + {FN (arccot), ARG(1.0e+00,5.0e-01), RES(7.2322066612406759210e-1, -2.3887786125685909036e-1)}, + {FN (arccot), ARG(1.0e+00,-5.0e-01), RES(7.2322066612406759210e-1, 2.3887786125685909036e-1)}, + {FN (arccot), ARG(-1.0e+00,5.0e-01), RES(-7.2322066612406759210e-1, -2.3887786125685909036e-1)}, + {FN (arccot), ARG(-1.0e+00,-5.0e-01), RES(-7.2322066612406759210e-1, 2.3887786125685909036e-1)}, + {FN (arccot), ARG(1.0e+00,1.0e+00), RES(5.5357435889704525151e-1, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(1.0e+00,-1.0e+00), RES(5.5357435889704525151e-1, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(-1.0e+00,1.0e+00), RES(-5.5357435889704525151e-1, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(-1.0e+00,-1.0e+00), RES(-5.5357435889704525151e-1, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(1.0e+00,2.0e+00), RES(2.3182380450040305811e-1, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(1.0e+00,-2.0e+00), RES(2.3182380450040305811e-1, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(-1.0e+00,2.0e+00), RES(-2.3182380450040305811e-1, -4.0235947810852509365e-1)}, + {FN (arccot), ARG(-1.0e+00,-2.0e+00), RES(-2.3182380450040305811e-1, 4.0235947810852509365e-1)}, + {FN (arccot), ARG(1.0e+00,8.3886080e+06), RES(1.4210854715202003717e-14, -1.1920928955078012062e-7)}, + {FN (arccot), ARG(1.0e+00,-8.3886080e+06), RES(1.4210854715202003717e-14, 1.1920928955078012062e-7)}, + {FN (arccot), ARG(-1.0e+00,8.3886080e+06), RES(-1.4210854715202003717e-14, -1.1920928955078012062e-7)}, + {FN (arccot), ARG(-1.0e+00,-8.3886080e+06), RES(-1.4210854715202003717e-14, 1.1920928955078012062e-7)}, + {FN (arccot), ARG(2.0e+00,0.0e+00), RES(4.6364760900080611621e-1, 0.0)}, + {FN (arccot), ARG(-2.0e+00,0.0e+00), RES(-4.6364760900080611621e-1, 0.0)}, + {FN (arccot), ARG(2.0e+00,1.19209289550781250e-07), RES(4.6364760900080497935e-1, -2.3841857910156200307e-8)}, + {FN (arccot), ARG(2.0e+00,-1.19209289550781250e-07), RES(4.6364760900080497935e-1, 2.3841857910156200307e-8)}, + {FN (arccot), ARG(-2.0e+00,1.19209289550781250e-07), RES(-4.6364760900080497935e-1, -2.3841857910156200307e-8)}, + {FN (arccot), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-4.6364760900080497935e-1, 2.3841857910156200307e-8)}, + {FN (arccot), ARG(2.0e+00,5.0e-01), RES(4.4423988596007427049e-1, -9.6415620202996167238e-2)}, + {FN (arccot), ARG(2.0e+00,-5.0e-01), RES(4.4423988596007427049e-1, 9.6415620202996167238e-2)}, + {FN (arccot), ARG(-2.0e+00,5.0e-01), RES(-4.4423988596007427049e-1, -9.6415620202996167238e-2)}, + {FN (arccot), ARG(-2.0e+00,-5.0e-01), RES(-4.4423988596007427049e-1, 9.6415620202996167238e-2)}, + {FN (arccot), ARG(2.0e+00,1.0e+00), RES(3.9269908169872415481e-1, -1.7328679513998632735e-1)}, + {FN (arccot), ARG(2.0e+00,-1.0e+00), RES(3.9269908169872415481e-1, 1.7328679513998632735e-1)}, + {FN (arccot), ARG(-2.0e+00,1.0e+00), RES(-3.9269908169872415481e-1, -1.7328679513998632735e-1)}, + {FN (arccot), ARG(-2.0e+00,-1.0e+00), RES(-3.9269908169872415481e-1, 1.7328679513998632735e-1)}, + {FN (arccot), ARG(2.0e+00,2.0e+00), RES(2.5957305712326147589e-1, -2.3887786125685909036e-1)}, + {FN (arccot), ARG(2.0e+00,-2.0e+00), RES(2.5957305712326147589e-1, 2.3887786125685909036e-1)}, + {FN (arccot), ARG(-2.0e+00,2.0e+00), RES(-2.5957305712326147589e-1, -2.3887786125685909036e-1)}, + {FN (arccot), ARG(-2.0e+00,-2.0e+00), RES(-2.5957305712326147589e-1, 2.3887786125685909036e-1)}, + {FN (arccot), ARG(2.0e+00,8.3886080e+06), RES(2.8421709430402795744e-14, -1.1920928955077503843e-7)}, + {FN (arccot), ARG(2.0e+00,-8.3886080e+06), RES(2.8421709430402795744e-14, 1.1920928955077503843e-7)}, + {FN (arccot), ARG(-2.0e+00,8.3886080e+06), RES(-2.8421709430402795744e-14, -1.1920928955077503843e-7)}, + {FN (arccot), ARG(-2.0e+00,-8.3886080e+06), RES(-2.8421709430402795744e-14, 1.1920928955077503843e-7)}, + {FN (arccot), ARG(8.3886080e+06,0.0e+00), RES(1.1920928955078068531e-7, 0.0)}, + {FN (arccot), ARG(-8.3886080e+06,0.0e+00), RES(-1.1920928955078068531e-7, 0.0)}, + {FN (arccot), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.1920928955078068531e-7, -1.6940658945085766040e-21)}, + {FN (arccot), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.1920928955078068531e-7, 1.6940658945085766040e-21)}, + {FN (arccot), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.1920928955078068531e-7, -1.6940658945085766040e-21)}, + {FN (arccot), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.1920928955078068531e-7, 1.6940658945085766040e-21)}, + {FN (arccot), ARG(8.3886080e+06,5.0e-01), RES(1.1920928955078026179e-7, -7.1054273576008756410e-15)}, + {FN (arccot), ARG(8.3886080e+06,-5.0e-01), RES(1.1920928955078026179e-7, 7.1054273576008756410e-15)}, + {FN (arccot), ARG(-8.3886080e+06,5.0e-01), RES(-1.1920928955078026179e-7, -7.1054273576008756410e-15)}, + {FN (arccot), ARG(-8.3886080e+06,-5.0e-01), RES(-1.1920928955078026179e-7, 7.1054273576008756410e-15)}, + {FN (arccot), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955077899125e-7, -1.4210854715201599821e-14)}, + {FN (arccot), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955077899125e-7, 1.4210854715201599821e-14)}, + {FN (arccot), ARG(-8.3886080e+06,1.0e+00), RES(-1.1920928955077899125e-7, -1.4210854715201599821e-14)}, + {FN (arccot), ARG(-8.3886080e+06,-1.0e+00), RES(-1.1920928955077899125e-7, 1.4210854715201599821e-14)}, + {FN (arccot), ARG(8.3886080e+06,2.0e+00), RES(1.1920928955077390905e-7, -2.8421709430401987951e-14)}, + {FN (arccot), ARG(8.3886080e+06,-2.0e+00), RES(1.1920928955077390905e-7, 2.8421709430401987951e-14)}, + {FN (arccot), ARG(-8.3886080e+06,2.0e+00), RES(-1.1920928955077390905e-7, -2.8421709430401987951e-14)}, + {FN (arccot), ARG(-8.3886080e+06,-2.0e+00), RES(-1.1920928955077390905e-7, 2.8421709430401987951e-14)}, + {FN (arccot), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390766172e-8, -5.9604644775390483828e-8)}, + {FN (arccot), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390766172e-8, 5.9604644775390483828e-8)}, + {FN (arccot), ARG(-8.3886080e+06,8.3886080e+06), RES(-5.9604644775390766172e-8, -5.9604644775390483828e-8)}, + {FN (arccot), ARG(-8.3886080e+06,-8.3886080e+06), RES(-5.9604644775390766172e-8, 5.9604644775390483828e-8)}, + {FN (csch), ARG(0.0e+00,-3.45266983001243932001e-04), RES(0, 2.8963094332845964291e3)}, + {FN (csch), ARG(0.0e+00,3.45266983001243932001e-04), RES(0, -2.8963094332845964291e3)}, + {FN (csch), ARG(0.0e+00,1.57045105981189525579e+00), RES(0, -1.0000000596046477360e0)}, + {FN (csch), ARG(0.0e+00,-1.57045105981189525579e+00), RES(0, 1.0000000596046477360e0)}, + {FN (csch), ARG(0.0e+00,1.57114159377789786021e+00), RES(0, -1.0000000596046477360e0)}, + {FN (csch), ARG(0.0e+00,-1.57114159377789786021e+00), RES(0, 1.0000000596046477360e0)}, + {FN (csch), ARG(0.0e+00,3.14124738660679181379e+00), RES(0, -2.8963094332830802676e3)}, + {FN (csch), ARG(0.0e+00,-3.14124738660679181379e+00), RES(0, 2.8963094332830802676e3)}, + {FN (csch), ARG(0.0e+00,3.14193792057279441821e+00), RES(0, 2.8963094332851348839e3)}, + {FN (csch), ARG(0.0e+00,-3.14193792057279441821e+00), RES(0, -2.8963094332851348839e3)}, + {FN (csch), ARG(0.0e+00,4.71204371340168837179e+00), RES(0, 1.0000000596046477361e0)}, + {FN (csch), ARG(0.0e+00,-4.71204371340168837179e+00), RES(0, -1.0000000596046477361e0)}, + {FN (csch), ARG(0.0e+00,4.71273424736769097620e+00), RES(0, 1.0000000596046477359e0)}, + {FN (csch), ARG(0.0e+00,-4.71273424736769097620e+00), RES(0, -1.0000000596046477359e0)}, + {FN (csch), ARG(0.0e+00,6.28284004019658492979e+00), RES(0, 2.8963094332820529594e3)}, + {FN (csch), ARG(0.0e+00,-6.28284004019658492979e+00), RES(0, -2.8963094332820529594e3)}, + {FN (csch), ARG(0.0e+00,6.28353057416258753420e+00), RES(0, -2.8963094332861621921e3)}, + {FN (csch), ARG(0.0e+00,-6.28353057416258753420e+00), RES(0, 2.8963094332861621921e3)}, + {FN (csch), ARG(0.0e+00,9.42443269378637893396e+00), RES(0, -2.8963094332884762317e3)}, + {FN (csch), ARG(0.0e+00,-9.42443269378637893396e+00), RES(0, 2.8963094332884762317e3)}, + {FN (csch), ARG(0.0e+00,9.42512322775237976202e+00), RES(0, 2.8963094332946400807e3)}, + {FN (csch), ARG(0.0e+00,-9.42512322775237976202e+00), RES(0, -2.8963094332946400807e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(9.9999986092250876926e-1, 2.8963090880176545869e3)}, + {FN (csch), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(9.9999986092250876926e-1, -2.8963090880176545869e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(-9.9999986092250876926e-1, 2.8963090880176545869e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(-9.9999986092250876926e-1, -2.8963090880176545869e3)}, + {FN (csch), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(4.1159035837716456618e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(4.1159035837716456618e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(-4.1159035837716456618e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(-4.1159035837716456618e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(-4.1159035837701857686e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-4.1159035837701857686e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(4.1159035837701857686e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(4.1159035837701857686e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(-9.9999986092146180843e-1, -2.8963090880161384259e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-9.9999986092146180843e-1, 2.8963090880161384259e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(9.9999986092146180843e-1, -2.8963090880161384259e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(9.9999986092146180843e-1, 2.8963090880161384259e3)}, + {FN (csch), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(-9.9999986092288059049e-1, 2.8963090880181930415e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-9.9999986092288059049e-1, -2.8963090880181930415e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(9.9999986092288059049e-1, 2.8963090880181930415e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(9.9999986092288059049e-1, -2.8963090880181930415e3)}, + {FN (csch), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(-4.1159035837731055550e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-4.1159035837731055550e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(4.1159035837731055550e-11, 1.0000000596046406306e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(4.1159035837731055550e-11, -1.0000000596046406306e0)}, + {FN (csch), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(4.1159035837687258754e-11, 1.0000000596046406305e0)}, + {FN (csch), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(4.1159035837687258754e-11, -1.0000000596046406305e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(-4.1159035837687258754e-11, 1.0000000596046406305e0)}, + {FN (csch), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(-4.1159035837687258754e-11, -1.0000000596046406305e0)}, + {FN (csch), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(9.9999986092075241740e-1, 2.8963090880151111181e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(9.9999986092075241740e-1, -2.8963090880151111181e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(-9.9999986092075241740e-1, 2.8963090880151111181e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(-9.9999986092075241740e-1, -2.8963090880151111181e3)}, + {FN (csch), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(9.9999986092358998153e-1, -2.8963090880192203493e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(9.9999986092358998153e-1, 2.8963090880192203493e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(-9.9999986092358998153e-1, -2.8963090880192203493e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(-9.9999986092358998153e-1, 2.8963090880192203493e3)}, + {FN (csch), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(-9.9999986092518790411e-1, -2.8963090880215343881e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-9.9999986092518790411e-1, 2.8963090880215343881e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(9.9999986092518790411e-1, -2.8963090880215343881e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(9.9999986092518790411e-1, 2.8963090880215343881e3)}, + {FN (csch), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(-9.9999986092944425030e-1, 2.8963090880276982349e3)}, + {FN (csch), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-9.9999986092944425030e-1, -2.8963090880276982349e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(9.9999986092944425030e-1, 2.8963090880276982349e3)}, + {FN (csch), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(9.9999986092944425030e-1, -2.8963090880276982349e3)}, + {FN (csch), ARG(5.0e-01,-3.45266983001243932001e-04), RES(1.9190337944739187237e0, 1.4337901642789801243e-3)}, + {FN (csch), ARG(5.0e-01,3.45266983001243932001e-04), RES(1.9190337944739187237e0, -1.4337901642789801243e-3)}, + {FN (csch), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(-1.9190337944739187237e0, 1.4337901642789801243e-3)}, + {FN (csch), ARG(-5.0e-01,3.45266983001243932001e-04), RES(-1.9190337944739187237e0, -1.4337901642789801243e-3)}, + {FN (csch), ARG(5.0e-01,1.57045105981189525579e+00), RES(1.4149533035943115868e-4, -8.8681891425248302487e-1)}, + {FN (csch), ARG(5.0e-01,-1.57045105981189525579e+00), RES(1.4149533035943115868e-4, 8.8681891425248302487e-1)}, + {FN (csch), ARG(-5.0e-01,1.57045105981189525579e+00), RES(-1.4149533035943115868e-4, -8.8681891425248302487e-1)}, + {FN (csch), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(-1.4149533035943115868e-4, 8.8681891425248302487e-1)}, + {FN (csch), ARG(5.0e-01,1.57114159377789786021e+00), RES(-1.4149533035938097090e-4, -8.8681891425248302485e-1)}, + {FN (csch), ARG(5.0e-01,-1.57114159377789786021e+00), RES(-1.4149533035938097090e-4, 8.8681891425248302485e-1)}, + {FN (csch), ARG(-5.0e-01,1.57114159377789786021e+00), RES(1.4149533035938097090e-4, -8.8681891425248302485e-1)}, + {FN (csch), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(1.4149533035938097090e-4, 8.8681891425248302485e-1)}, + {FN (csch), ARG(5.0e-01,3.14124738660679181379e+00), RES(-1.9190337944739187227e0, -1.4337901642797306848e-3)}, + {FN (csch), ARG(5.0e-01,-3.14124738660679181379e+00), RES(-1.9190337944739187227e0, 1.4337901642797306848e-3)}, + {FN (csch), ARG(-5.0e-01,3.14124738660679181379e+00), RES(1.9190337944739187227e0, -1.4337901642797306848e-3)}, + {FN (csch), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(1.9190337944739187227e0, 1.4337901642797306848e-3)}, + {FN (csch), ARG(5.0e-01,3.14193792057279441821e+00), RES(-1.9190337944739187241e0, 1.4337901642787135676e-3)}, + {FN (csch), ARG(5.0e-01,-3.14193792057279441821e+00), RES(-1.9190337944739187241e0, -1.4337901642787135676e-3)}, + {FN (csch), ARG(-5.0e-01,3.14193792057279441821e+00), RES(1.9190337944739187241e0, 1.4337901642787135676e-3)}, + {FN (csch), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(1.9190337944739187241e0, -1.4337901642787135676e-3)}, + {FN (csch), ARG(5.0e-01,4.71204371340168837179e+00), RES(-1.4149533035948134646e-4, 8.8681891425248302489e-1)}, + {FN (csch), ARG(5.0e-01,-4.71204371340168837179e+00), RES(-1.4149533035948134646e-4, -8.8681891425248302489e-1)}, + {FN (csch), ARG(-5.0e-01,4.71204371340168837179e+00), RES(1.4149533035948134646e-4, 8.8681891425248302489e-1)}, + {FN (csch), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(1.4149533035948134646e-4, -8.8681891425248302489e-1)}, + {FN (csch), ARG(5.0e-01,4.71273424736769097620e+00), RES(1.4149533035933078312e-4, 8.8681891425248302483e-1)}, + {FN (csch), ARG(5.0e-01,-4.71273424736769097620e+00), RES(1.4149533035933078312e-4, -8.8681891425248302483e-1)}, + {FN (csch), ARG(-5.0e-01,4.71273424736769097620e+00), RES(-1.4149533035933078312e-4, 8.8681891425248302483e-1)}, + {FN (csch), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(-1.4149533035933078312e-4, -8.8681891425248302483e-1)}, + {FN (csch), ARG(5.0e-01,6.28284004019658492979e+00), RES(1.9190337944739187220e0, 1.4337901642802392434e-3)}, + {FN (csch), ARG(5.0e-01,-6.28284004019658492979e+00), RES(1.9190337944739187220e0, -1.4337901642802392434e-3)}, + {FN (csch), ARG(-5.0e-01,6.28284004019658492979e+00), RES(-1.9190337944739187220e0, 1.4337901642802392434e-3)}, + {FN (csch), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(-1.9190337944739187220e0, -1.4337901642802392434e-3)}, + {FN (csch), ARG(5.0e-01,6.28353057416258753420e+00), RES(1.9190337944739187248e0, -1.4337901642782050091e-3)}, + {FN (csch), ARG(5.0e-01,-6.28353057416258753420e+00), RES(1.9190337944739187248e0, 1.4337901642782050091e-3)}, + {FN (csch), ARG(-5.0e-01,6.28353057416258753420e+00), RES(-1.9190337944739187248e0, -1.4337901642782050091e-3)}, + {FN (csch), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(-1.9190337944739187248e0, 1.4337901642782050091e-3)}, + {FN (csch), ARG(5.0e-01,9.42443269378637893396e+00), RES(-1.9190337944739187263e0, -1.4337901642770594670e-3)}, + {FN (csch), ARG(5.0e-01,-9.42443269378637893396e+00), RES(-1.9190337944739187263e0, 1.4337901642770594670e-3)}, + {FN (csch), ARG(-5.0e-01,9.42443269378637893396e+00), RES(1.9190337944739187263e0, -1.4337901642770594670e-3)}, + {FN (csch), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(1.9190337944739187263e0, 1.4337901642770594670e-3)}, + {FN (csch), ARG(5.0e-01,9.42512322775237976202e+00), RES(-1.9190337944739187304e0, 1.4337901642740081154e-3)}, + {FN (csch), ARG(5.0e-01,-9.42512322775237976202e+00), RES(-1.9190337944739187304e0, -1.4337901642740081154e-3)}, + {FN (csch), ARG(-5.0e-01,9.42512322775237976202e+00), RES(1.9190337944739187304e0, 1.4337901642740081154e-3)}, + {FN (csch), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(1.9190337944739187304e0, -1.4337901642740081154e-3)}, + {FN (csch), ARG(1.0e+00,-3.45266983001243932001e-04), RES(8.5091800407377002734e-1, 3.8576176225198860914e-4)}, + {FN (csch), ARG(1.0e+00,3.45266983001243932001e-04), RES(8.5091800407377002734e-1, -3.8576176225198860914e-4)}, + {FN (csch), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(-8.5091800407377002734e-1, 3.8576176225198860914e-4)}, + {FN (csch), ARG(-1.0e+00,3.45266983001243932001e-04), RES(-8.5091800407377002734e-1, -3.8576176225198860914e-4)}, + {FN (csch), ARG(1.0e+00,1.57045105981189525579e+00), RES(1.7040802567657401279e-4, -6.4805426748157480499e-1)}, + {FN (csch), ARG(1.0e+00,-1.57045105981189525579e+00), RES(1.7040802567657401279e-4, 6.4805426748157480499e-1)}, + {FN (csch), ARG(-1.0e+00,1.57045105981189525579e+00), RES(-1.7040802567657401279e-4, -6.4805426748157480499e-1)}, + {FN (csch), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(-1.7040802567657401279e-4, 6.4805426748157480499e-1)}, + {FN (csch), ARG(1.0e+00,1.57114159377789786021e+00), RES(-1.7040802567651356981e-4, -6.4805426748157480499e-1)}, + {FN (csch), ARG(1.0e+00,-1.57114159377789786021e+00), RES(-1.7040802567651356981e-4, 6.4805426748157480499e-1)}, + {FN (csch), ARG(-1.0e+00,1.57114159377789786021e+00), RES(1.7040802567651356981e-4, -6.4805426748157480499e-1)}, + {FN (csch), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(1.7040802567651356981e-4, 6.4805426748157480499e-1)}, + {FN (csch), ARG(1.0e+00,3.14124738660679181379e+00), RES(-8.5091800407377002721e-1, -3.8576176225219054787e-4)}, + {FN (csch), ARG(1.0e+00,-3.14124738660679181379e+00), RES(-8.5091800407377002721e-1, 3.8576176225219054787e-4)}, + {FN (csch), ARG(-1.0e+00,3.14124738660679181379e+00), RES(8.5091800407377002721e-1, -3.8576176225219054787e-4)}, + {FN (csch), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(8.5091800407377002721e-1, 3.8576176225219054787e-4)}, + {FN (csch), ARG(1.0e+00,3.14193792057279441821e+00), RES(-8.5091800407377002738e-1, 3.8576176225191689193e-4)}, + {FN (csch), ARG(1.0e+00,-3.14193792057279441821e+00), RES(-8.5091800407377002738e-1, -3.8576176225191689193e-4)}, + {FN (csch), ARG(-1.0e+00,3.14193792057279441821e+00), RES(8.5091800407377002738e-1, 3.8576176225191689193e-4)}, + {FN (csch), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(8.5091800407377002738e-1, -3.8576176225191689193e-4)}, + {FN (csch), ARG(1.0e+00,4.71204371340168837179e+00), RES(-1.7040802567663445577e-4, 6.4805426748157480498e-1)}, + {FN (csch), ARG(1.0e+00,-4.71204371340168837179e+00), RES(-1.7040802567663445577e-4, -6.4805426748157480498e-1)}, + {FN (csch), ARG(-1.0e+00,4.71204371340168837179e+00), RES(1.7040802567663445577e-4, 6.4805426748157480498e-1)}, + {FN (csch), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(1.7040802567663445577e-4, -6.4805426748157480498e-1)}, + {FN (csch), ARG(1.0e+00,4.71273424736769097620e+00), RES(1.7040802567645312683e-4, 6.480542674815748050e-1)}, + {FN (csch), ARG(1.0e+00,-4.71273424736769097620e+00), RES(1.7040802567645312683e-4, -6.480542674815748050e-1)}, + {FN (csch), ARG(-1.0e+00,4.71273424736769097620e+00), RES(-1.7040802567645312683e-4, 6.480542674815748050e-1)}, + {FN (csch), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(-1.7040802567645312683e-4, -6.480542674815748050e-1)}, + {FN (csch), ARG(1.0e+00,6.28284004019658492979e+00), RES(8.5091800407377002712e-1, 3.8576176225232737584e-4)}, + {FN (csch), ARG(1.0e+00,-6.28284004019658492979e+00), RES(8.5091800407377002712e-1, -3.8576176225232737584e-4)}, + {FN (csch), ARG(-1.0e+00,6.28284004019658492979e+00), RES(-8.5091800407377002712e-1, 3.8576176225232737584e-4)}, + {FN (csch), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(-8.5091800407377002712e-1, -3.8576176225232737584e-4)}, + {FN (csch), ARG(1.0e+00,6.28353057416258753420e+00), RES(8.5091800407377002747e-1, -3.8576176225178006396e-4)}, + {FN (csch), ARG(1.0e+00,-6.28353057416258753420e+00), RES(8.5091800407377002747e-1, 3.8576176225178006396e-4)}, + {FN (csch), ARG(-1.0e+00,6.28353057416258753420e+00), RES(-8.5091800407377002747e-1, -3.8576176225178006396e-4)}, + {FN (csch), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(-8.5091800407377002747e-1, 3.8576176225178006396e-4)}, + {FN (csch), ARG(1.0e+00,9.42443269378637893396e+00), RES(-8.5091800407377002767e-1, -3.8576176225147185523e-4)}, + {FN (csch), ARG(1.0e+00,-9.42443269378637893396e+00), RES(-8.5091800407377002767e-1, 3.8576176225147185523e-4)}, + {FN (csch), ARG(-1.0e+00,9.42443269378637893396e+00), RES(8.5091800407377002767e-1, -3.8576176225147185523e-4)}, + {FN (csch), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(8.5091800407377002767e-1, 3.8576176225147185523e-4)}, + {FN (csch), ARG(1.0e+00,9.42512322775237976202e+00), RES(-8.5091800407377002820e-1, 3.8576176225065088741e-4)}, + {FN (csch), ARG(1.0e+00,-9.42512322775237976202e+00), RES(-8.5091800407377002820e-1, -3.8576176225065088741e-4)}, + {FN (csch), ARG(-1.0e+00,9.42512322775237976202e+00), RES(8.5091800407377002820e-1, 3.8576176225065088741e-4)}, + {FN (csch), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(8.5091800407377002820e-1, -3.8576176225065088741e-4)}, + {FN (csch), ARG(2.0e+00,-3.45266983001243932001e-04), RES(2.7572054583883740768e-1, 9.8749461907035665386e-5)}, + {FN (csch), ARG(2.0e+00,3.45266983001243932001e-04), RES(2.7572054583883740768e-1, -9.8749461907035665386e-5)}, + {FN (csch), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(-2.7572054583883740768e-1, 9.8749461907035665386e-5)}, + {FN (csch), ARG(-2.0e+00,3.45266983001243932001e-04), RES(-2.7572054583883740768e-1, -9.8749461907035665386e-5)}, + {FN (csch), ARG(2.0e+00,1.57045105981189525579e+00), RES(8.8471445300404633228e-5, -2.6580221522968095406e-1)}, + {FN (csch), ARG(2.0e+00,-1.57045105981189525579e+00), RES(8.8471445300404633228e-5, 2.6580221522968095406e-1)}, + {FN (csch), ARG(-2.0e+00,1.57045105981189525579e+00), RES(-8.8471445300404633228e-5, -2.6580221522968095406e-1)}, + {FN (csch), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(-8.8471445300404633228e-5, 2.6580221522968095406e-1)}, + {FN (csch), ARG(2.0e+00,1.57114159377789786021e+00), RES(-8.8471445300373252796e-5, -2.6580221522968095407e-1)}, + {FN (csch), ARG(2.0e+00,-1.57114159377789786021e+00), RES(-8.8471445300373252796e-5, 2.6580221522968095407e-1)}, + {FN (csch), ARG(-2.0e+00,1.57114159377789786021e+00), RES(8.8471445300373252796e-5, -2.6580221522968095407e-1)}, + {FN (csch), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(8.8471445300373252796e-5, 2.6580221522968095407e-1)}, + {FN (csch), ARG(2.0e+00,3.14124738660679181379e+00), RES(-2.7572054583883740766e-1, -9.8749461907087358805e-5)}, + {FN (csch), ARG(2.0e+00,-3.14124738660679181379e+00), RES(-2.7572054583883740766e-1, 9.8749461907087358805e-5)}, + {FN (csch), ARG(-2.0e+00,3.14124738660679181379e+00), RES(2.7572054583883740766e-1, -9.8749461907087358805e-5)}, + {FN (csch), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(2.7572054583883740766e-1, 9.8749461907087358805e-5)}, + {FN (csch), ARG(2.0e+00,3.14193792057279441821e+00), RES(-2.7572054583883740769e-1, 9.8749461907017306810e-5)}, + {FN (csch), ARG(2.0e+00,-3.14193792057279441821e+00), RES(-2.7572054583883740769e-1, -9.8749461907017306810e-5)}, + {FN (csch), ARG(-2.0e+00,3.14193792057279441821e+00), RES(2.7572054583883740769e-1, 9.8749461907017306810e-5)}, + {FN (csch), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(2.7572054583883740769e-1, -9.8749461907017306810e-5)}, + {FN (csch), ARG(2.0e+00,4.71204371340168837179e+00), RES(-8.8471445300436013659e-5, 2.6580221522968095405e-1)}, + {FN (csch), ARG(2.0e+00,-4.71204371340168837179e+00), RES(-8.8471445300436013659e-5, -2.6580221522968095405e-1)}, + {FN (csch), ARG(-2.0e+00,4.71204371340168837179e+00), RES(8.8471445300436013659e-5, 2.6580221522968095405e-1)}, + {FN (csch), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(8.8471445300436013659e-5, -2.6580221522968095405e-1)}, + {FN (csch), ARG(2.0e+00,4.71273424736769097620e+00), RES(8.8471445300341872364e-5, 2.6580221522968095408e-1)}, + {FN (csch), ARG(2.0e+00,-4.71273424736769097620e+00), RES(8.8471445300341872364e-5, -2.6580221522968095408e-1)}, + {FN (csch), ARG(-2.0e+00,4.71273424736769097620e+00), RES(-8.8471445300341872364e-5, 2.6580221522968095408e-1)}, + {FN (csch), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(-8.8471445300341872364e-5, -2.6580221522968095408e-1)}, + {FN (csch), ARG(2.0e+00,6.28284004019658492979e+00), RES(2.7572054583883740765e-1, 9.8749461907122384803e-5)}, + {FN (csch), ARG(2.0e+00,-6.28284004019658492979e+00), RES(2.7572054583883740765e-1, -9.8749461907122384803e-5)}, + {FN (csch), ARG(-2.0e+00,6.28284004019658492979e+00), RES(-2.7572054583883740765e-1, 9.8749461907122384803e-5)}, + {FN (csch), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(-2.7572054583883740765e-1, -9.8749461907122384803e-5)}, + {FN (csch), ARG(2.0e+00,6.28353057416258753420e+00), RES(2.7572054583883740770e-1, -9.8749461906982280812e-5)}, + {FN (csch), ARG(2.0e+00,-6.28353057416258753420e+00), RES(2.7572054583883740770e-1, 9.8749461906982280812e-5)}, + {FN (csch), ARG(-2.0e+00,6.28353057416258753420e+00), RES(-2.7572054583883740770e-1, -9.8749461906982280812e-5)}, + {FN (csch), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(-2.7572054583883740770e-1, 9.8749461906982280812e-5)}, + {FN (csch), ARG(2.0e+00,9.42443269378637893396e+00), RES(-2.7572054583883740773e-1, -9.874946190690338380e-5)}, + {FN (csch), ARG(2.0e+00,-9.42443269378637893396e+00), RES(-2.7572054583883740773e-1, 9.874946190690338380e-5)}, + {FN (csch), ARG(-2.0e+00,9.42443269378637893396e+00), RES(2.7572054583883740773e-1, -9.874946190690338380e-5)}, + {FN (csch), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(2.7572054583883740773e-1, 9.874946190690338380e-5)}, + {FN (csch), ARG(2.0e+00,9.42512322775237976202e+00), RES(-2.7572054583883740781e-1, 9.8749461906693227814e-5)}, + {FN (csch), ARG(2.0e+00,-9.42512322775237976202e+00), RES(-2.7572054583883740781e-1, -9.8749461906693227814e-5)}, + {FN (csch), ARG(-2.0e+00,9.42512322775237976202e+00), RES(2.7572054583883740781e-1, 9.8749461906693227814e-5)}, + {FN (csch), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(2.7572054583883740781e-1, -9.8749461906693227814e-5)}, + {FN (sech), ARG(0.0e+00,-3.45266983001243932001e-04), RES(1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,3.45266983001243932001e-04), RES(1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,1.57045105981189525579e+00), RES(2.8963094332835939217e3, 0.0)}, + {FN (sech), ARG(0.0e+00,-1.57045105981189525579e+00), RES(2.8963094332835939217e3, 0.0)}, + {FN (sech), ARG(0.0e+00,1.57114159377789786021e+00), RES(-2.8963094332846212298e3, 0.0)}, + {FN (sech), ARG(0.0e+00,-1.57114159377789786021e+00), RES(-2.8963094332846212298e3, 0.0)}, + {FN (sech), ARG(0.0e+00,3.14124738660679181379e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-3.14124738660679181379e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,3.14193792057279441821e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-3.14193792057279441821e+00), RES(-1.0000000596046477360e0, 0.0)}, + {FN (sech), ARG(0.0e+00,4.71204371340168837179e+00), RES(-2.8963094332825666135e3, 0.0)}, + {FN (sech), ARG(0.0e+00,-4.71204371340168837179e+00), RES(-2.8963094332825666135e3, 0.0)}, + {FN (sech), ARG(0.0e+00,4.71273424736769097620e+00), RES(2.8963094332856485380e3, 0.0)}, + {FN (sech), ARG(0.0e+00,-4.71273424736769097620e+00), RES(2.8963094332856485380e3, 0.0)}, + {FN (sech), ARG(0.0e+00,6.28284004019658492979e+00), RES(1.0000000596046477361e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-6.28284004019658492979e+00), RES(1.0000000596046477361e0, 0.0)}, + {FN (sech), ARG(0.0e+00,6.28353057416258753420e+00), RES(1.0000000596046477359e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-6.28353057416258753420e+00), RES(1.0000000596046477359e0, 0.0)}, + {FN (sech), ARG(0.0e+00,9.42443269378637893396e+00), RES(-1.0000000596046477358e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-9.42443269378637893396e+00), RES(-1.0000000596046477358e0, 0.0)}, + {FN (sech), ARG(0.0e+00,9.42512322775237976202e+00), RES(-1.0000000596046477356e0, 0.0)}, + {FN (sech), ARG(0.0e+00,-9.42512322775237976202e+00), RES(-1.0000000596046477356e0, 0.0)}, + {FN (sech), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(1.0000000596046406306e0, 4.1159035837702210125e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(1.0000000596046406306e0, -4.1159035837702210125e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(1.0000000596046406306e0, -4.1159035837702210125e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(1.0000000596046406306e0, 4.1159035837702210125e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(2.8963090880166520798e3, -9.9999986092181650394e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(2.8963090880166520798e3, 9.9999986092181650394e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(2.8963090880166520798e3, 9.9999986092181650394e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(2.8963090880166520798e3, -9.9999986092181650394e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(-2.8963090880176793876e3, -9.9999986092252589498e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-2.8963090880176793876e3, 9.9999986092252589498e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(-2.8963090880176793876e3, 9.9999986092252589498e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-2.8963090880176793876e3, -9.9999986092252589498e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(-1.0000000596046406306e0, -4.1159035837723756084e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-1.0000000596046406306e0, 4.1159035837723756084e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(-1.0000000596046406306e0, 4.1159035837723756084e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-1.0000000596046406306e0, -4.1159035837723756084e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(-1.0000000596046406305e0, 4.1159035837694558220e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-1.0000000596046406305e0, -4.1159035837694558220e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(-1.0000000596046406305e0, -4.1159035837694558220e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-1.0000000596046406305e0, 4.1159035837694558220e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(-2.8963090880156247720e3, 9.9999986092110711291e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-2.8963090880156247720e3, -9.9999986092110711291e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(-2.8963090880156247720e3, -9.9999986092110711291e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-2.8963090880156247720e3, 9.9999986092110711291e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(2.8963090880187066954e3, 9.9999986092323528601e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(2.8963090880187066954e3, -9.9999986092323528601e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(2.8963090880187066954e3, -9.9999986092323528601e-1)}, + {FN (sech), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(2.8963090880187066954e3, 9.9999986092323528601e-1)}, + {FN (sech), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(1.0000000596046406307e0, 4.1159035837738355016e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(1.0000000596046406307e0, -4.1159035837738355016e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(1.0000000596046406307e0, -4.1159035837738355016e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(1.0000000596046406307e0, 4.1159035837738355016e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(1.0000000596046406305e0, -4.1159035837679959288e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(1.0000000596046406305e0, 4.1159035837679959288e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(1.0000000596046406305e0, 4.1159035837679959288e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(1.0000000596046406305e0, -4.1159035837679959288e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(-1.0000000596046406304e0, -4.1159035837647074798e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-1.0000000596046406304e0, 4.1159035837647074798e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(-1.0000000596046406304e0, 4.1159035837647074798e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-1.0000000596046406304e0, -4.1159035837647074798e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(-1.0000000596046406301e0, 4.1159035837559481207e-11)}, + {FN (sech), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-1.0000000596046406301e0, -4.1159035837559481207e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(-1.0000000596046406301e0, -4.1159035837559481207e-11)}, + {FN (sech), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-1.0000000596046406301e0, 4.1159035837559481207e-11)}, + {FN (sech), ARG(5.0e-01,-3.45266983001243932001e-04), RES(8.8681891425248302485e-1, 1.4149533035938218250e-4)}, + {FN (sech), ARG(5.0e-01,3.45266983001243932001e-04), RES(8.8681891425248302485e-1, -1.4149533035938218250e-4)}, + {FN (sech), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(8.8681891425248302485e-1, -1.4149533035938218250e-4)}, + {FN (sech), ARG(-5.0e-01,3.45266983001243932001e-04), RES(8.8681891425248302485e-1, 1.4149533035938218250e-4)}, + {FN (sech), ARG(5.0e-01,1.57045105981189525579e+00), RES(1.4337901642794764055e-3, -1.9190337944739187231e0)}, + {FN (sech), ARG(5.0e-01,-1.57045105981189525579e+00), RES(1.4337901642794764055e-3, 1.9190337944739187231e0)}, + {FN (sech), ARG(-5.0e-01,1.57045105981189525579e+00), RES(1.4337901642794764055e-3, 1.9190337944739187231e0)}, + {FN (sech), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(1.4337901642794764055e-3, -1.9190337944739187231e0)}, + {FN (sech), ARG(5.0e-01,1.57114159377789786021e+00), RES(-1.4337901642789678469e-3, -1.9190337944739187237e0)}, + {FN (sech), ARG(5.0e-01,-1.57114159377789786021e+00), RES(-1.4337901642789678469e-3, 1.9190337944739187237e0)}, + {FN (sech), ARG(-5.0e-01,1.57114159377789786021e+00), RES(-1.4337901642789678469e-3, 1.9190337944739187237e0)}, + {FN (sech), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(-1.4337901642789678469e-3, -1.9190337944739187237e0)}, + {FN (sech), ARG(5.0e-01,3.14124738660679181379e+00), RES(-8.8681891425248302488e-1, -1.4149533035945625257e-4)}, + {FN (sech), ARG(5.0e-01,-3.14124738660679181379e+00), RES(-8.8681891425248302488e-1, 1.4149533035945625257e-4)}, + {FN (sech), ARG(-5.0e-01,3.14124738660679181379e+00), RES(-8.8681891425248302488e-1, 1.4149533035945625257e-4)}, + {FN (sech), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(-8.8681891425248302488e-1, -1.4149533035945625257e-4)}, + {FN (sech), ARG(5.0e-01,3.14193792057279441821e+00), RES(-8.8681891425248302484e-1, 1.4149533035935587701e-4)}, + {FN (sech), ARG(5.0e-01,-3.14193792057279441821e+00), RES(-8.8681891425248302484e-1, -1.4149533035935587701e-4)}, + {FN (sech), ARG(-5.0e-01,3.14193792057279441821e+00), RES(-8.8681891425248302484e-1, -1.4149533035935587701e-4)}, + {FN (sech), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(-8.8681891425248302484e-1, 1.4149533035935587701e-4)}, + {FN (sech), ARG(5.0e-01,4.71204371340168837179e+00), RES(-1.4337901642799849641e-3, 1.9190337944739187224e0)}, + {FN (sech), ARG(5.0e-01,-4.71204371340168837179e+00), RES(-1.4337901642799849641e-3, -1.9190337944739187224e0)}, + {FN (sech), ARG(-5.0e-01,4.71204371340168837179e+00), RES(-1.4337901642799849641e-3, -1.9190337944739187224e0)}, + {FN (sech), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(-1.4337901642799849641e-3, 1.9190337944739187224e0)}, + {FN (sech), ARG(5.0e-01,4.71273424736769097620e+00), RES(1.4337901642784592884e-3, 1.9190337944739187244e0)}, + {FN (sech), ARG(5.0e-01,-4.71273424736769097620e+00), RES(1.4337901642784592884e-3, -1.9190337944739187244e0)}, + {FN (sech), ARG(-5.0e-01,4.71273424736769097620e+00), RES(1.4337901642784592884e-3, -1.9190337944739187244e0)}, + {FN (sech), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(1.4337901642784592884e-3, 1.9190337944739187244e0)}, + {FN (sech), ARG(5.0e-01,6.28284004019658492979e+00), RES(8.8681891425248302490e-1, 1.4149533035950644034e-4)}, + {FN (sech), ARG(5.0e-01,-6.28284004019658492979e+00), RES(8.8681891425248302490e-1, -1.4149533035950644034e-4)}, + {FN (sech), ARG(-5.0e-01,6.28284004019658492979e+00), RES(8.8681891425248302490e-1, -1.4149533035950644034e-4)}, + {FN (sech), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(8.8681891425248302490e-1, 1.4149533035950644034e-4)}, + {FN (sech), ARG(5.0e-01,6.28353057416258753420e+00), RES(8.8681891425248302482e-1, -1.4149533035930568923e-4)}, + {FN (sech), ARG(5.0e-01,-6.28353057416258753420e+00), RES(8.8681891425248302482e-1, 1.4149533035930568923e-4)}, + {FN (sech), ARG(-5.0e-01,6.28353057416258753420e+00), RES(8.8681891425248302482e-1, 1.4149533035930568923e-4)}, + {FN (sech), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(8.8681891425248302482e-1, -1.4149533035930568923e-4)}, + {FN (sech), ARG(5.0e-01,9.42443269378637893396e+00), RES(-8.8681891425248302477e-1, -1.4149533035919263990e-4)}, + {FN (sech), ARG(5.0e-01,-9.42443269378637893396e+00), RES(-8.8681891425248302477e-1, 1.4149533035919263990e-4)}, + {FN (sech), ARG(-5.0e-01,9.42443269378637893396e+00), RES(-8.8681891425248302477e-1, 1.4149533035919263990e-4)}, + {FN (sech), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(-8.8681891425248302477e-1, -1.4149533035919263990e-4)}, + {FN (sech), ARG(5.0e-01,9.42512322775237976202e+00), RES(-8.8681891425248302464e-1, 1.4149533035889151322e-4)}, + {FN (sech), ARG(5.0e-01,-9.42512322775237976202e+00), RES(-8.8681891425248302464e-1, -1.4149533035889151322e-4)}, + {FN (sech), ARG(-5.0e-01,9.42512322775237976202e+00), RES(-8.8681891425248302464e-1, -1.4149533035889151322e-4)}, + {FN (sech), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(-8.8681891425248302464e-1, 1.4149533035889151322e-4)}, + {FN (sech), ARG(1.0e+00,-3.45266983001243932001e-04), RES(6.4805426748157480499e-1, 1.7040802567651502899e-4)}, + {FN (sech), ARG(1.0e+00,3.45266983001243932001e-04), RES(6.4805426748157480499e-1, -1.7040802567651502899e-4)}, + {FN (sech), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(6.4805426748157480499e-1, -1.7040802567651502899e-4)}, + {FN (sech), ARG(-1.0e+00,3.45266983001243932001e-04), RES(6.4805426748157480499e-1, 1.7040802567651502899e-4)}, + {FN (sech), ARG(1.0e+00,1.57045105981189525579e+00), RES(3.8576176225212213388e-4, -8.5091800407377002725e-1)}, + {FN (sech), ARG(1.0e+00,-1.57045105981189525579e+00), RES(3.8576176225212213388e-4, 8.5091800407377002725e-1)}, + {FN (sech), ARG(-1.0e+00,1.57045105981189525579e+00), RES(3.8576176225212213388e-4, 8.5091800407377002725e-1)}, + {FN (sech), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(3.8576176225212213388e-4, -8.5091800407377002725e-1)}, + {FN (sech), ARG(1.0e+00,1.57114159377789786021e+00), RES(-3.8576176225198530591e-4, -8.5091800407377002734e-1)}, + {FN (sech), ARG(1.0e+00,-1.57114159377789786021e+00), RES(-3.8576176225198530591e-4, 8.5091800407377002734e-1)}, + {FN (sech), ARG(-1.0e+00,1.57114159377789786021e+00), RES(-3.8576176225198530591e-4, 8.5091800407377002734e-1)}, + {FN (sech), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(-3.8576176225198530591e-4, -8.5091800407377002734e-1)}, + {FN (sech), ARG(1.0e+00,3.14124738660679181379e+00), RES(-6.4805426748157480499e-1, -1.7040802567660423428e-4)}, + {FN (sech), ARG(1.0e+00,-3.14124738660679181379e+00), RES(-6.4805426748157480499e-1, 1.7040802567660423428e-4)}, + {FN (sech), ARG(-1.0e+00,3.14124738660679181379e+00), RES(-6.4805426748157480499e-1, 1.7040802567660423428e-4)}, + {FN (sech), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(-6.4805426748157480499e-1, -1.7040802567660423428e-4)}, + {FN (sech), ARG(1.0e+00,3.14193792057279441821e+00), RES(-6.4805426748157480499e-1, 1.7040802567648334832e-4)}, + {FN (sech), ARG(1.0e+00,-3.14193792057279441821e+00), RES(-6.4805426748157480499e-1, -1.7040802567648334832e-4)}, + {FN (sech), ARG(-1.0e+00,3.14193792057279441821e+00), RES(-6.4805426748157480499e-1, -1.7040802567648334832e-4)}, + {FN (sech), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(-6.4805426748157480499e-1, 1.7040802567648334832e-4)}, + {FN (sech), ARG(1.0e+00,4.71204371340168837179e+00), RES(-3.8576176225225896185e-4, 8.5091800407377002716e-1)}, + {FN (sech), ARG(1.0e+00,-4.71204371340168837179e+00), RES(-3.8576176225225896185e-4, -8.5091800407377002716e-1)}, + {FN (sech), ARG(-1.0e+00,4.71204371340168837179e+00), RES(-3.8576176225225896185e-4, -8.5091800407377002716e-1)}, + {FN (sech), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(-3.8576176225225896185e-4, 8.5091800407377002716e-1)}, + {FN (sech), ARG(1.0e+00,4.71273424736769097620e+00), RES(3.8576176225184847794e-4, 8.5091800407377002743e-1)}, + {FN (sech), ARG(1.0e+00,-4.71273424736769097620e+00), RES(3.8576176225184847794e-4, -8.5091800407377002743e-1)}, + {FN (sech), ARG(-1.0e+00,4.71273424736769097620e+00), RES(3.8576176225184847794e-4, -8.5091800407377002743e-1)}, + {FN (sech), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(3.8576176225184847794e-4, 8.5091800407377002743e-1)}, + {FN (sech), ARG(1.0e+00,6.28284004019658492979e+00), RES(6.4805426748157480498e-1, 1.7040802567666467726e-4)}, + {FN (sech), ARG(1.0e+00,-6.28284004019658492979e+00), RES(6.4805426748157480498e-1, -1.7040802567666467726e-4)}, + {FN (sech), ARG(-1.0e+00,6.28284004019658492979e+00), RES(6.4805426748157480498e-1, -1.7040802567666467726e-4)}, + {FN (sech), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(6.4805426748157480498e-1, 1.7040802567666467726e-4)}, + {FN (sech), ARG(1.0e+00,6.28353057416258753420e+00), RES(6.480542674815748050e-1, -1.7040802567642290534e-4)}, + {FN (sech), ARG(1.0e+00,-6.28353057416258753420e+00), RES(6.480542674815748050e-1, 1.7040802567642290534e-4)}, + {FN (sech), ARG(-1.0e+00,6.28353057416258753420e+00), RES(6.480542674815748050e-1, 1.7040802567642290534e-4)}, + {FN (sech), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(6.480542674815748050e-1, -1.7040802567642290534e-4)}, + {FN (sech), ARG(1.0e+00,9.42443269378637893396e+00), RES(-6.4805426748157480501e-1, -1.7040802567628675588e-4)}, + {FN (sech), ARG(1.0e+00,-9.42443269378637893396e+00), RES(-6.4805426748157480501e-1, 1.7040802567628675588e-4)}, + {FN (sech), ARG(-1.0e+00,9.42443269378637893396e+00), RES(-6.4805426748157480501e-1, 1.7040802567628675588e-4)}, + {FN (sech), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(-6.4805426748157480501e-1, -1.7040802567628675588e-4)}, + {FN (sech), ARG(1.0e+00,9.42512322775237976202e+00), RES(-6.4805426748157480504e-1, 1.704080256759240980e-4)}, + {FN (sech), ARG(1.0e+00,-9.42512322775237976202e+00), RES(-6.4805426748157480504e-1, -1.704080256759240980e-4)}, + {FN (sech), ARG(-1.0e+00,9.42512322775237976202e+00), RES(-6.4805426748157480504e-1, -1.704080256759240980e-4)}, + {FN (sech), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(-6.4805426748157480504e-1, 1.704080256759240980e-4)}, + {FN (sech), ARG(2.0e+00,-3.45266983001243932001e-04), RES(2.6580221522968095407e-1, 8.8471445300374010365e-5)}, + {FN (sech), ARG(2.0e+00,3.45266983001243932001e-04), RES(2.6580221522968095407e-1, -8.8471445300374010365e-5)}, + {FN (sech), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(2.6580221522968095407e-1, -8.8471445300374010365e-5)}, + {FN (sech), ARG(-2.0e+00,3.45266983001243932001e-04), RES(2.6580221522968095407e-1, 8.8471445300374010365e-5)}, + {FN (sech), ARG(2.0e+00,1.57045105981189525579e+00), RES(9.8749461907069845806e-5, -2.7572054583883740767e-1)}, + {FN (sech), ARG(2.0e+00,-1.57045105981189525579e+00), RES(9.8749461907069845806e-5, 2.7572054583883740767e-1)}, + {FN (sech), ARG(-2.0e+00,1.57045105981189525579e+00), RES(9.8749461907069845806e-5, 2.7572054583883740767e-1)}, + {FN (sech), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(9.8749461907069845806e-5, -2.7572054583883740767e-1)}, + {FN (sech), ARG(2.0e+00,1.57114159377789786021e+00), RES(-9.8749461907034819809e-5, -2.7572054583883740768e-1)}, + {FN (sech), ARG(2.0e+00,-1.57114159377789786021e+00), RES(-9.8749461907034819809e-5, 2.7572054583883740768e-1)}, + {FN (sech), ARG(-2.0e+00,1.57114159377789786021e+00), RES(-9.8749461907034819809e-5, 2.7572054583883740768e-1)}, + {FN (sech), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(-9.8749461907034819809e-5, -2.7572054583883740768e-1)}, + {FN (sech), ARG(2.0e+00,3.14124738660679181379e+00), RES(-2.6580221522968095405e-1, -8.8471445300420323443e-5)}, + {FN (sech), ARG(2.0e+00,-3.14124738660679181379e+00), RES(-2.6580221522968095405e-1, 8.8471445300420323443e-5)}, + {FN (sech), ARG(-2.0e+00,3.14124738660679181379e+00), RES(-2.6580221522968095405e-1, 8.8471445300420323443e-5)}, + {FN (sech), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(-2.6580221522968095405e-1, -8.8471445300420323443e-5)}, + {FN (sech), ARG(2.0e+00,3.14193792057279441821e+00), RES(-2.6580221522968095407e-1, 8.8471445300357562580e-5)}, + {FN (sech), ARG(2.0e+00,-3.14193792057279441821e+00), RES(-2.6580221522968095407e-1, -8.8471445300357562580e-5)}, + {FN (sech), ARG(-2.0e+00,3.14193792057279441821e+00), RES(-2.6580221522968095407e-1, -8.8471445300357562580e-5)}, + {FN (sech), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(-2.6580221522968095407e-1, 8.8471445300357562580e-5)}, + {FN (sech), ARG(2.0e+00,4.71204371340168837179e+00), RES(-9.8749461907104871804e-5, 2.7572054583883740766e-1)}, + {FN (sech), ARG(2.0e+00,-4.71204371340168837179e+00), RES(-9.8749461907104871804e-5, -2.7572054583883740766e-1)}, + {FN (sech), ARG(-2.0e+00,4.71204371340168837179e+00), RES(-9.8749461907104871804e-5, -2.7572054583883740766e-1)}, + {FN (sech), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(-9.8749461907104871804e-5, 2.7572054583883740766e-1)}, + {FN (sech), ARG(2.0e+00,4.71273424736769097620e+00), RES(9.8749461906999793811e-5, 2.7572054583883740770e-1)}, + {FN (sech), ARG(2.0e+00,-4.71273424736769097620e+00), RES(9.8749461906999793811e-5, -2.7572054583883740770e-1)}, + {FN (sech), ARG(-2.0e+00,4.71273424736769097620e+00), RES(9.8749461906999793811e-5, -2.7572054583883740770e-1)}, + {FN (sech), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(9.8749461906999793811e-5, 2.7572054583883740770e-1)}, + {FN (sech), ARG(2.0e+00,6.28284004019658492979e+00), RES(2.6580221522968095404e-1, 8.8471445300451703875e-5)}, + {FN (sech), ARG(2.0e+00,-6.28284004019658492979e+00), RES(2.6580221522968095404e-1, -8.8471445300451703875e-5)}, + {FN (sech), ARG(-2.0e+00,6.28284004019658492979e+00), RES(2.6580221522968095404e-1, -8.8471445300451703875e-5)}, + {FN (sech), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(2.6580221522968095404e-1, 8.8471445300451703875e-5)}, + {FN (sech), ARG(2.0e+00,6.28353057416258753420e+00), RES(2.6580221522968095408e-1, -8.8471445300326182148e-5)}, + {FN (sech), ARG(2.0e+00,-6.28353057416258753420e+00), RES(2.6580221522968095408e-1, 8.8471445300326182148e-5)}, + {FN (sech), ARG(-2.0e+00,6.28353057416258753420e+00), RES(2.6580221522968095408e-1, 8.8471445300326182148e-5)}, + {FN (sech), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(2.6580221522968095408e-1, -8.8471445300326182148e-5)}, + {FN (sech), ARG(2.0e+00,9.42443269378637893396e+00), RES(-2.6580221522968095410e-1, -8.8471445300255496873e-5)}, + {FN (sech), ARG(2.0e+00,-9.42443269378637893396e+00), RES(-2.6580221522968095410e-1, 8.8471445300255496873e-5)}, + {FN (sech), ARG(-2.0e+00,9.42443269378637893396e+00), RES(-2.6580221522968095410e-1, 8.8471445300255496873e-5)}, + {FN (sech), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(-2.6580221522968095410e-1, -8.8471445300255496873e-5)}, + {FN (sech), ARG(2.0e+00,9.42512322775237976202e+00), RES(-2.6580221522968095416e-1, 8.8471445300067214283e-5)}, + {FN (sech), ARG(2.0e+00,-9.42512322775237976202e+00), RES(-2.6580221522968095416e-1, -8.8471445300067214283e-5)}, + {FN (sech), ARG(-2.0e+00,9.42512322775237976202e+00), RES(-2.6580221522968095416e-1, -8.8471445300067214283e-5)}, + {FN (sech), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(-2.6580221522968095416e-1, 8.8471445300067214283e-5)}, + {FN (coth), ARG(0.0e+00,-3.45266983001243932001e-04), RES(0, 2.8963092606511032136e3)}, + {FN (coth), ARG(0.0e+00,3.45266983001243932001e-04), RES(0, -2.8963092606511032136e3)}, + {FN (coth), ARG(0.0e+00,1.57045105981189525579e+00), RES(0, -3.4526699672104134407e-4)}, + {FN (coth), ARG(0.0e+00,-1.57045105981189525579e+00), RES(0, 3.4526699672104134407e-4)}, + {FN (coth), ARG(0.0e+00,1.57114159377789786021e+00), RES(0, 3.4526699672091887937e-4)}, + {FN (coth), ARG(0.0e+00,-1.57114159377789786021e+00), RES(0, -3.4526699672091887937e-4)}, + {FN (coth), ARG(0.0e+00,3.14124738660679181379e+00), RES(0, 2.8963092606495870519e3)}, + {FN (coth), ARG(0.0e+00,-3.14124738660679181379e+00), RES(0, -2.8963092606495870519e3)}, + {FN (coth), ARG(0.0e+00,3.14193792057279441821e+00), RES(0, -2.8963092606516416684e3)}, + {FN (coth), ARG(0.0e+00,-3.14193792057279441821e+00), RES(0, 2.8963092606516416684e3)}, + {FN (coth), ARG(0.0e+00,4.71204371340168837179e+00), RES(0, -3.4526699672116380876e-4)}, + {FN (coth), ARG(0.0e+00,-4.71204371340168837179e+00), RES(0, 3.4526699672116380876e-4)}, + {FN (coth), ARG(0.0e+00,4.71273424736769097620e+00), RES(0, 3.4526699672079641468e-4)}, + {FN (coth), ARG(0.0e+00,-4.71273424736769097620e+00), RES(0, -3.4526699672079641468e-4)}, + {FN (coth), ARG(0.0e+00,6.28284004019658492979e+00), RES(0, 2.8963092606485597437e3)}, + {FN (coth), ARG(0.0e+00,-6.28284004019658492979e+00), RES(0, -2.8963092606485597437e3)}, + {FN (coth), ARG(0.0e+00,6.28353057416258753420e+00), RES(0, -2.8963092606526689766e3)}, + {FN (coth), ARG(0.0e+00,-6.28353057416258753420e+00), RES(0, 2.8963092606526689766e3)}, + {FN (coth), ARG(0.0e+00,9.42443269378637893396e+00), RES(0, 2.8963092606549830163e3)}, + {FN (coth), ARG(0.0e+00,-9.42443269378637893396e+00), RES(0, -2.8963092606549830163e3)}, + {FN (coth), ARG(0.0e+00,9.42512322775237976202e+00), RES(0, -2.8963092606611468657e3)}, + {FN (coth), ARG(0.0e+00,-9.42512322775237976202e+00), RES(0, 2.8963092606611468657e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-3.45266983001243932001e-04), RES(9.9999992052715532101e-1, 2.8963089153841613713e3)}, + {FN (coth), ARG(1.19209289550781250e-07,3.45266983001243932001e-04), RES(9.9999992052715532101e-1, -2.8963089153841613713e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-3.45266983001243932001e-04), RES(-9.9999992052715532101e-1, 2.8963089153841613713e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,3.45266983001243932001e-04), RES(-9.9999992052715532101e-1, -2.8963089153841613713e3)}, + {FN (coth), ARG(1.19209289550781250e-07,1.57045105981189525579e+00), RES(1.1920930376163652990e-7, -3.4526699672103643753e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,-1.57045105981189525579e+00), RES(1.1920930376163652990e-7, 3.4526699672103643753e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,1.57045105981189525579e+00), RES(-1.1920930376163652990e-7, -3.4526699672103643753e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,-1.57045105981189525579e+00), RES(-1.1920930376163652990e-7, 3.4526699672103643753e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,1.57114159377789786021e+00), RES(1.1920930376163652989e-7, 3.4526699672091397283e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,-1.57114159377789786021e+00), RES(1.1920930376163652989e-7, -3.4526699672091397283e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,1.57114159377789786021e+00), RES(-1.1920930376163652989e-7, 3.4526699672091397283e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,-1.57114159377789786021e+00), RES(-1.1920930376163652989e-7, -3.4526699672091397283e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,3.14124738660679181379e+00), RES(9.9999992052610836018e-1, 2.8963089153826452102e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-3.14124738660679181379e+00), RES(9.9999992052610836018e-1, -2.8963089153826452102e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,3.14124738660679181379e+00), RES(-9.9999992052610836018e-1, 2.8963089153826452102e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-3.14124738660679181379e+00), RES(-9.9999992052610836018e-1, -2.8963089153826452102e3)}, + {FN (coth), ARG(1.19209289550781250e-07,3.14193792057279441821e+00), RES(9.9999992052752714224e-1, -2.8963089153846998260e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-3.14193792057279441821e+00), RES(9.9999992052752714224e-1, 2.8963089153846998260e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,3.14193792057279441821e+00), RES(-9.9999992052752714224e-1, -2.8963089153846998260e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-3.14193792057279441821e+00), RES(-9.9999992052752714224e-1, 2.8963089153846998260e3)}, + {FN (coth), ARG(1.19209289550781250e-07,4.71204371340168837179e+00), RES(1.1920930376163652991e-7, -3.4526699672115890222e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,-4.71204371340168837179e+00), RES(1.1920930376163652991e-7, 3.4526699672115890222e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,4.71204371340168837179e+00), RES(-1.1920930376163652991e-7, -3.4526699672115890222e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,-4.71204371340168837179e+00), RES(-1.1920930376163652991e-7, 3.4526699672115890222e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,4.71273424736769097620e+00), RES(1.1920930376163652988e-7, 3.4526699672079150814e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,-4.71273424736769097620e+00), RES(1.1920930376163652988e-7, -3.4526699672079150814e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,4.71273424736769097620e+00), RES(-1.1920930376163652988e-7, 3.4526699672079150814e-4)}, + {FN (coth), ARG(-1.19209289550781250e-07,-4.71273424736769097620e+00), RES(-1.1920930376163652988e-7, -3.4526699672079150814e-4)}, + {FN (coth), ARG(1.19209289550781250e-07,6.28284004019658492979e+00), RES(9.9999992052539896914e-1, 2.8963089153816179024e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-6.28284004019658492979e+00), RES(9.9999992052539896914e-1, -2.8963089153816179024e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,6.28284004019658492979e+00), RES(-9.9999992052539896914e-1, 2.8963089153816179024e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-6.28284004019658492979e+00), RES(-9.9999992052539896914e-1, -2.8963089153816179024e3)}, + {FN (coth), ARG(1.19209289550781250e-07,6.28353057416258753420e+00), RES(9.9999992052823653327e-1, -2.8963089153857271338e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-6.28353057416258753420e+00), RES(9.9999992052823653327e-1, 2.8963089153857271338e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,6.28353057416258753420e+00), RES(-9.9999992052823653327e-1, -2.8963089153857271338e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-6.28353057416258753420e+00), RES(-9.9999992052823653327e-1, 2.8963089153857271338e3)}, + {FN (coth), ARG(1.19209289550781250e-07,9.42443269378637893396e+00), RES(9.9999992052983445585e-1, 2.8963089153880411727e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-9.42443269378637893396e+00), RES(9.9999992052983445585e-1, -2.8963089153880411727e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,9.42443269378637893396e+00), RES(-9.9999992052983445585e-1, 2.8963089153880411727e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-9.42443269378637893396e+00), RES(-9.9999992052983445585e-1, -2.8963089153880411727e3)}, + {FN (coth), ARG(1.19209289550781250e-07,9.42512322775237976202e+00), RES(9.9999992053409080205e-1, -2.8963089153942050199e3)}, + {FN (coth), ARG(1.19209289550781250e-07,-9.42512322775237976202e+00), RES(9.9999992053409080205e-1, 2.8963089153942050199e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,9.42512322775237976202e+00), RES(-9.9999992053409080205e-1, -2.8963089153942050199e3)}, + {FN (coth), ARG(-1.19209289550781250e-07,-9.42512322775237976202e+00), RES(-9.9999992053409080205e-1, 2.8963089153942050199e3)}, + {FN (coth), ARG(5.0e-01,-3.45266983001243932001e-04), RES(2.1639524637389326002e0, 1.2715121175451222247e-3)}, + {FN (coth), ARG(5.0e-01,3.45266983001243932001e-04), RES(2.1639524637389326002e0, -1.2715121175451222247e-3)}, + {FN (coth), ARG(-5.0e-01,-3.45266983001243932001e-04), RES(-2.1639524637389326002e0, 1.2715121175451222247e-3)}, + {FN (coth), ARG(-5.0e-01,3.45266983001243932001e-04), RES(-2.1639524637389326002e0, -1.2715121175451222247e-3)}, + {FN (coth), ARG(5.0e-01,1.57045105981189525579e+00), RES(4.6211720058436229982e-1, -2.7153443992665204631e-4)}, + {FN (coth), ARG(5.0e-01,-1.57045105981189525579e+00), RES(4.6211720058436229982e-1, 2.7153443992665204631e-4)}, + {FN (coth), ARG(-5.0e-01,1.57045105981189525579e+00), RES(-4.6211720058436229982e-1, -2.7153443992665204631e-4)}, + {FN (coth), ARG(-5.0e-01,-1.57045105981189525579e+00), RES(-4.6211720058436229982e-1, 2.7153443992665204631e-4)}, + {FN (coth), ARG(5.0e-01,1.57114159377789786021e+00), RES(4.6211720058436229979e-1, 2.7153443992655573423e-4)}, + {FN (coth), ARG(5.0e-01,-1.57114159377789786021e+00), RES(4.6211720058436229979e-1, -2.7153443992655573423e-4)}, + {FN (coth), ARG(-5.0e-01,1.57114159377789786021e+00), RES(-4.6211720058436229979e-1, 2.7153443992655573423e-4)}, + {FN (coth), ARG(-5.0e-01,-1.57114159377789786021e+00), RES(-4.6211720058436229979e-1, -2.7153443992655573423e-4)}, + {FN (coth), ARG(5.0e-01,3.14124738660679181379e+00), RES(2.1639524637389325992e0, 1.2715121175457878359e-3)}, + {FN (coth), ARG(5.0e-01,-3.14124738660679181379e+00), RES(2.1639524637389325992e0, -1.2715121175457878359e-3)}, + {FN (coth), ARG(-5.0e-01,3.14124738660679181379e+00), RES(-2.1639524637389325992e0, 1.2715121175457878359e-3)}, + {FN (coth), ARG(-5.0e-01,-3.14124738660679181379e+00), RES(-2.1639524637389325992e0, -1.2715121175457878359e-3)}, + {FN (coth), ARG(5.0e-01,3.14193792057279441821e+00), RES(2.1639524637389326006e0, -1.2715121175448858373e-3)}, + {FN (coth), ARG(5.0e-01,-3.14193792057279441821e+00), RES(2.1639524637389326006e0, 1.2715121175448858373e-3)}, + {FN (coth), ARG(-5.0e-01,3.14193792057279441821e+00), RES(-2.1639524637389326006e0, -1.2715121175448858373e-3)}, + {FN (coth), ARG(-5.0e-01,-3.14193792057279441821e+00), RES(-2.1639524637389326006e0, 1.2715121175448858373e-3)}, + {FN (coth), ARG(5.0e-01,4.71204371340168837179e+00), RES(4.6211720058436229985e-1, -2.7153443992674835838e-4)}, + {FN (coth), ARG(5.0e-01,-4.71204371340168837179e+00), RES(4.6211720058436229985e-1, 2.7153443992674835838e-4)}, + {FN (coth), ARG(-5.0e-01,4.71204371340168837179e+00), RES(-4.6211720058436229985e-1, -2.7153443992674835838e-4)}, + {FN (coth), ARG(-5.0e-01,-4.71204371340168837179e+00), RES(-4.6211720058436229985e-1, 2.7153443992674835838e-4)}, + {FN (coth), ARG(5.0e-01,4.71273424736769097620e+00), RES(4.6211720058436229976e-1, 2.7153443992645942216e-4)}, + {FN (coth), ARG(5.0e-01,-4.71273424736769097620e+00), RES(4.6211720058436229976e-1, -2.7153443992645942216e-4)}, + {FN (coth), ARG(-5.0e-01,4.71273424736769097620e+00), RES(-4.6211720058436229976e-1, 2.7153443992645942216e-4)}, + {FN (coth), ARG(-5.0e-01,-4.71273424736769097620e+00), RES(-4.6211720058436229976e-1, -2.7153443992645942216e-4)}, + {FN (coth), ARG(5.0e-01,6.28284004019658492979e+00), RES(2.1639524637389325986e0, 1.2715121175462388352e-3)}, + {FN (coth), ARG(5.0e-01,-6.28284004019658492979e+00), RES(2.1639524637389325986e0, -1.2715121175462388352e-3)}, + {FN (coth), ARG(-5.0e-01,6.28284004019658492979e+00), RES(-2.1639524637389325986e0, 1.2715121175462388352e-3)}, + {FN (coth), ARG(-5.0e-01,-6.28284004019658492979e+00), RES(-2.1639524637389325986e0, -1.2715121175462388352e-3)}, + {FN (coth), ARG(5.0e-01,6.28353057416258753420e+00), RES(2.1639524637389326012e0, -1.2715121175444348380e-3)}, + {FN (coth), ARG(5.0e-01,-6.28353057416258753420e+00), RES(2.1639524637389326012e0, 1.2715121175444348380e-3)}, + {FN (coth), ARG(-5.0e-01,6.28353057416258753420e+00), RES(-2.1639524637389326012e0, -1.2715121175444348380e-3)}, + {FN (coth), ARG(-5.0e-01,-6.28353057416258753420e+00), RES(-2.1639524637389326012e0, 1.2715121175444348380e-3)}, + {FN (coth), ARG(5.0e-01,9.42443269378637893396e+00), RES(2.1639524637389326028e0, 1.2715121175434189499e-3)}, + {FN (coth), ARG(5.0e-01,-9.42443269378637893396e+00), RES(2.1639524637389326028e0, -1.2715121175434189499e-3)}, + {FN (coth), ARG(-5.0e-01,9.42443269378637893396e+00), RES(-2.1639524637389326028e0, 1.2715121175434189499e-3)}, + {FN (coth), ARG(-5.0e-01,-9.42443269378637893396e+00), RES(-2.1639524637389326028e0, -1.2715121175434189499e-3)}, + {FN (coth), ARG(5.0e-01,9.42512322775237976202e+00), RES(2.1639524637389326068e0, -1.2715121175407129542e-3)}, + {FN (coth), ARG(5.0e-01,-9.42512322775237976202e+00), RES(2.1639524637389326068e0, 1.2715121175407129542e-3)}, + {FN (coth), ARG(-5.0e-01,9.42512322775237976202e+00), RES(-2.1639524637389326068e0, -1.2715121175407129542e-3)}, + {FN (coth), ARG(-5.0e-01,-9.42512322775237976202e+00), RES(-2.1639524637389326068e0, 1.2715121175407129542e-3)}, + {FN (coth), ARG(1.0e+00,-3.45266983001243932001e-04), RES(1.3130351721648674824e0, 2.4999454374267620687e-4)}, + {FN (coth), ARG(1.0e+00,3.45266983001243932001e-04), RES(1.3130351721648674824e0, -2.4999454374267620687e-4)}, + {FN (coth), ARG(-1.0e+00,-3.45266983001243932001e-04), RES(-1.3130351721648674824e0, 2.4999454374267620687e-4)}, + {FN (coth), ARG(-1.0e+00,3.45266983001243932001e-04), RES(-1.3130351721648674824e0, -2.4999454374267620687e-4)}, + {FN (coth), ARG(1.0e+00,1.57045105981189525579e+00), RES(7.6159419408485704839e-1, -1.4500326960279979918e-4)}, + {FN (coth), ARG(1.0e+00,-1.57045105981189525579e+00), RES(7.6159419408485704839e-1, 1.4500326960279979918e-4)}, + {FN (coth), ARG(-1.0e+00,1.57045105981189525579e+00), RES(-7.6159419408485704839e-1, -1.4500326960279979918e-4)}, + {FN (coth), ARG(-1.0e+00,-1.57045105981189525579e+00), RES(-7.6159419408485704839e-1, 1.4500326960279979918e-4)}, + {FN (coth), ARG(1.0e+00,1.57114159377789786021e+00), RES(7.6159419408485704836e-1, 1.4500326960274836716e-4)}, + {FN (coth), ARG(1.0e+00,-1.57114159377789786021e+00), RES(7.6159419408485704836e-1, -1.4500326960274836716e-4)}, + {FN (coth), ARG(-1.0e+00,1.57114159377789786021e+00), RES(-7.6159419408485704836e-1, 1.4500326960274836716e-4)}, + {FN (coth), ARG(-1.0e+00,-1.57114159377789786021e+00), RES(-7.6159419408485704836e-1, -1.4500326960274836716e-4)}, + {FN (coth), ARG(1.0e+00,3.14124738660679181379e+00), RES(1.3130351721648674823e0, 2.4999454374280707411e-4)}, + {FN (coth), ARG(1.0e+00,-3.14124738660679181379e+00), RES(1.3130351721648674823e0, -2.4999454374280707411e-4)}, + {FN (coth), ARG(-1.0e+00,3.14124738660679181379e+00), RES(-1.3130351721648674823e0, 2.4999454374280707411e-4)}, + {FN (coth), ARG(-1.0e+00,-3.14124738660679181379e+00), RES(-1.3130351721648674823e0, -2.4999454374280707411e-4)}, + {FN (coth), ARG(1.0e+00,3.14193792057279441821e+00), RES(1.3130351721648674824e0, -2.4999454374262973024e-4)}, + {FN (coth), ARG(1.0e+00,-3.14193792057279441821e+00), RES(1.3130351721648674824e0, 2.4999454374262973024e-4)}, + {FN (coth), ARG(-1.0e+00,3.14193792057279441821e+00), RES(-1.3130351721648674824e0, -2.4999454374262973024e-4)}, + {FN (coth), ARG(-1.0e+00,-3.14193792057279441821e+00), RES(-1.3130351721648674824e0, 2.4999454374262973024e-4)}, + {FN (coth), ARG(1.0e+00,4.71204371340168837179e+00), RES(7.6159419408485704842e-1, -1.4500326960285123120e-4)}, + {FN (coth), ARG(1.0e+00,-4.71204371340168837179e+00), RES(7.6159419408485704842e-1, 1.4500326960285123120e-4)}, + {FN (coth), ARG(-1.0e+00,4.71204371340168837179e+00), RES(-7.6159419408485704842e-1, -1.4500326960285123120e-4)}, + {FN (coth), ARG(-1.0e+00,-4.71204371340168837179e+00), RES(-7.6159419408485704842e-1, 1.4500326960285123120e-4)}, + {FN (coth), ARG(1.0e+00,4.71273424736769097620e+00), RES(7.6159419408485704834e-1, 1.4500326960269693514e-4)}, + {FN (coth), ARG(1.0e+00,-4.71273424736769097620e+00), RES(7.6159419408485704834e-1, -1.4500326960269693514e-4)}, + {FN (coth), ARG(-1.0e+00,4.71273424736769097620e+00), RES(-7.6159419408485704834e-1, 1.4500326960269693514e-4)}, + {FN (coth), ARG(-1.0e+00,-4.71273424736769097620e+00), RES(-7.6159419408485704834e-1, -1.4500326960269693514e-4)}, + {FN (coth), ARG(1.0e+00,6.28284004019658492979e+00), RES(1.3130351721648674822e0, 2.4999454374289574604e-4)}, + {FN (coth), ARG(1.0e+00,-6.28284004019658492979e+00), RES(1.3130351721648674822e0, -2.4999454374289574604e-4)}, + {FN (coth), ARG(-1.0e+00,6.28284004019658492979e+00), RES(-1.3130351721648674822e0, 2.4999454374289574604e-4)}, + {FN (coth), ARG(-1.0e+00,-6.28284004019658492979e+00), RES(-1.3130351721648674822e0, -2.4999454374289574604e-4)}, + {FN (coth), ARG(1.0e+00,6.28353057416258753420e+00), RES(1.3130351721648674825e0, -2.4999454374254105830e-4)}, + {FN (coth), ARG(1.0e+00,-6.28353057416258753420e+00), RES(1.3130351721648674825e0, 2.4999454374254105830e-4)}, + {FN (coth), ARG(-1.0e+00,6.28353057416258753420e+00), RES(-1.3130351721648674825e0, -2.4999454374254105830e-4)}, + {FN (coth), ARG(-1.0e+00,-6.28353057416258753420e+00), RES(-1.3130351721648674825e0, 2.4999454374254105830e-4)}, + {FN (coth), ARG(1.0e+00,9.42443269378637893396e+00), RES(1.3130351721648674827e0, 2.4999454374234132236e-4)}, + {FN (coth), ARG(1.0e+00,-9.42443269378637893396e+00), RES(1.3130351721648674827e0, -2.4999454374234132236e-4)}, + {FN (coth), ARG(-1.0e+00,9.42443269378637893396e+00), RES(-1.3130351721648674827e0, 2.4999454374234132236e-4)}, + {FN (coth), ARG(-1.0e+00,-9.42443269378637893396e+00), RES(-1.3130351721648674827e0, -2.4999454374234132236e-4)}, + {FN (coth), ARG(1.0e+00,9.42512322775237976202e+00), RES(1.3130351721648674832e0, -2.4999454374180929074e-4)}, + {FN (coth), ARG(1.0e+00,-9.42512322775237976202e+00), RES(1.3130351721648674832e0, 2.4999454374180929074e-4)}, + {FN (coth), ARG(-1.0e+00,9.42512322775237976202e+00), RES(-1.3130351721648674832e0, -2.4999454374180929074e-4)}, + {FN (coth), ARG(-1.0e+00,-9.42512322775237976202e+00), RES(-1.3130351721648674832e0, 2.4999454374180929074e-4)}, + {FN (coth), ARG(2.0e+00,-3.45266983001243932001e-04), RES(1.0373147113268752620e0, 2.6247825506563736365e-5)}, + {FN (coth), ARG(2.0e+00,3.45266983001243932001e-04), RES(1.0373147113268752620e0, -2.6247825506563736365e-5)}, + {FN (coth), ARG(-2.0e+00,-3.45266983001243932001e-04), RES(-1.0373147113268752620e0, 2.6247825506563736365e-5)}, + {FN (coth), ARG(-2.0e+00,3.45266983001243932001e-04), RES(-1.0373147113268752620e0, -2.6247825506563736365e-5)}, + {FN (coth), ARG(2.0e+00,1.57045105981189525579e+00), RES(9.6402758819508310557e-1, -2.4393395410443750226e-5)}, + {FN (coth), ARG(2.0e+00,-1.57045105981189525579e+00), RES(9.6402758819508310557e-1, 2.4393395410443750226e-5)}, + {FN (coth), ARG(-2.0e+00,1.57045105981189525579e+00), RES(-9.6402758819508310557e-1, -2.4393395410443750226e-5)}, + {FN (coth), ARG(-2.0e+00,-1.57045105981189525579e+00), RES(-9.6402758819508310557e-1, 2.4393395410443750226e-5)}, + {FN (coth), ARG(2.0e+00,1.57114159377789786021e+00), RES(9.6402758819508310556e-1, 2.4393395410435097997e-5)}, + {FN (coth), ARG(2.0e+00,-1.57114159377789786021e+00), RES(9.6402758819508310556e-1, -2.4393395410435097997e-5)}, + {FN (coth), ARG(-2.0e+00,1.57114159377789786021e+00), RES(-9.6402758819508310556e-1, 2.4393395410435097997e-5)}, + {FN (coth), ARG(-2.0e+00,-1.57114159377789786021e+00), RES(-9.6402758819508310556e-1, -2.4393395410435097997e-5)}, + {FN (coth), ARG(2.0e+00,3.14124738660679181379e+00), RES(1.0373147113268752620e0, 2.6247825506577476589e-5)}, + {FN (coth), ARG(2.0e+00,-3.14124738660679181379e+00), RES(1.0373147113268752620e0, -2.6247825506577476589e-5)}, + {FN (coth), ARG(-2.0e+00,3.14124738660679181379e+00), RES(-1.0373147113268752620e0, 2.6247825506577476589e-5)}, + {FN (coth), ARG(-2.0e+00,-3.14124738660679181379e+00), RES(-1.0373147113268752620e0, -2.6247825506577476589e-5)}, + {FN (coth), ARG(2.0e+00,3.14193792057279441821e+00), RES(1.0373147113268752620e0, -2.6247825506558856616e-5)}, + {FN (coth), ARG(2.0e+00,-3.14193792057279441821e+00), RES(1.0373147113268752620e0, 2.6247825506558856616e-5)}, + {FN (coth), ARG(-2.0e+00,3.14193792057279441821e+00), RES(-1.0373147113268752620e0, -2.6247825506558856616e-5)}, + {FN (coth), ARG(-2.0e+00,-3.14193792057279441821e+00), RES(-1.0373147113268752620e0, 2.6247825506558856616e-5)}, + {FN (coth), ARG(2.0e+00,4.71204371340168837179e+00), RES(9.6402758819508310557e-1, -2.4393395410452402454e-5)}, + {FN (coth), ARG(2.0e+00,-4.71204371340168837179e+00), RES(9.6402758819508310557e-1, 2.4393395410452402454e-5)}, + {FN (coth), ARG(-2.0e+00,4.71204371340168837179e+00), RES(-9.6402758819508310557e-1, -2.4393395410452402454e-5)}, + {FN (coth), ARG(-2.0e+00,-4.71204371340168837179e+00), RES(-9.6402758819508310557e-1, 2.4393395410452402454e-5)}, + {FN (coth), ARG(2.0e+00,4.71273424736769097620e+00), RES(9.6402758819508310556e-1, 2.4393395410426445768e-5)}, + {FN (coth), ARG(2.0e+00,-4.71273424736769097620e+00), RES(9.6402758819508310556e-1, -2.4393395410426445768e-5)}, + {FN (coth), ARG(-2.0e+00,4.71273424736769097620e+00), RES(-9.6402758819508310556e-1, 2.4393395410426445768e-5)}, + {FN (coth), ARG(-2.0e+00,-4.71273424736769097620e+00), RES(-9.6402758819508310556e-1, -2.4393395410426445768e-5)}, + {FN (coth), ARG(2.0e+00,6.28284004019658492979e+00), RES(1.0373147113268752620e0, 2.6247825506586786575e-5)}, + {FN (coth), ARG(2.0e+00,-6.28284004019658492979e+00), RES(1.0373147113268752620e0, -2.6247825506586786575e-5)}, + {FN (coth), ARG(-2.0e+00,6.28284004019658492979e+00), RES(-1.0373147113268752620e0, 2.6247825506586786575e-5)}, + {FN (coth), ARG(-2.0e+00,-6.28284004019658492979e+00), RES(-1.0373147113268752620e0, -2.6247825506586786575e-5)}, + {FN (coth), ARG(2.0e+00,6.28353057416258753420e+00), RES(1.0373147113268752620e0, -2.6247825506549546629e-5)}, + {FN (coth), ARG(2.0e+00,-6.28353057416258753420e+00), RES(1.0373147113268752620e0, 2.6247825506549546629e-5)}, + {FN (coth), ARG(-2.0e+00,6.28353057416258753420e+00), RES(-1.0373147113268752620e0, -2.6247825506549546629e-5)}, + {FN (coth), ARG(-2.0e+00,-6.28353057416258753420e+00), RES(-1.0373147113268752620e0, 2.6247825506549546629e-5)}, + {FN (coth), ARG(2.0e+00,9.42443269378637893396e+00), RES(1.0373147113268752620e0, 2.6247825506528575631e-5)}, + {FN (coth), ARG(2.0e+00,-9.42443269378637893396e+00), RES(1.0373147113268752620e0, -2.6247825506528575631e-5)}, + {FN (coth), ARG(-2.0e+00,9.42443269378637893396e+00), RES(-1.0373147113268752620e0, 2.6247825506528575631e-5)}, + {FN (coth), ARG(-2.0e+00,-9.42443269378637893396e+00), RES(-1.0373147113268752620e0, -2.6247825506528575631e-5)}, + {FN (coth), ARG(2.0e+00,9.42512322775237976202e+00), RES(1.0373147113268752621e0, -2.6247825506472715712e-5)}, + {FN (coth), ARG(2.0e+00,-9.42512322775237976202e+00), RES(1.0373147113268752621e0, 2.6247825506472715712e-5)}, + {FN (coth), ARG(-2.0e+00,9.42512322775237976202e+00), RES(-1.0373147113268752621e0, -2.6247825506472715712e-5)}, + {FN (coth), ARG(-2.0e+00,-9.42512322775237976202e+00), RES(-1.0373147113268752621e0, 2.6247825506472715712e-5)}, + {FN (arccsch), ARG(0.0e+00,1.19209289550781250e-07), RES(-1.6635532333438683873e1, -1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.6635532333438683873e1, 1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,5.0e-01), RES(-1.3169578969248167086e0, -1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,-5.0e-01), RES(1.3169578969248167086e0, 1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,1.0e+00), RES(0, -1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,-1.0e+00), RES(0, 1.5707963267948966192e0)}, + {FN (arccsch), ARG(0.0e+00,2.0e+00), RES(0, -5.2359877559829887308e-1)}, + {FN (arccsch), ARG(0.0e+00,-2.0e+00), RES(0, 5.2359877559829887308e-1)}, + {FN (arccsch), ARG(0.0e+00,8.3886080e+06), RES(0, -1.1920928955078153234e-7)}, + {FN (arccsch), ARG(0.0e+00,-8.3886080e+06), RES(0, 1.1920928955078153234e-7)}, + {FN (arccsch), ARG(1.19209289550781250e-07,0.0e+00), RES(1.6635532333438690979e1, 0.0)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.6635532333438690979e1, 0.0)}, + {FN (arccsch), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.6288958743158714771e1, -7.8539816339744120419e-1)}, + {FN (arccsch), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.6288958743158714771e1, 7.8539816339744120419e-1)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.6288958743158714771e1, -7.8539816339744120419e-1)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.6288958743158714771e1, 7.8539816339744120419e-1)}, + {FN (arccsch), ARG(1.19209289550781250e-07,5.0e-01), RES(1.3169578969247948296e0, -1.5707960514928349710e0)}, + {FN (arccsch), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.3169578969247948296e0, 1.5707960514928349710e0)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,5.0e-01), RES(-1.3169578969247948296e0, -1.5707960514928349710e0)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.3169578969247948296e0, 1.5707960514928349710e0)}, + {FN (arccsch), ARG(1.19209289550781250e-07,1.0e+00), RES(3.4526696585164602772e-4, -1.5704510597947457801e0)}, + {FN (arccsch), ARG(1.19209289550781250e-07,-1.0e+00), RES(3.4526696585164602772e-4, 1.5704510597947457801e0)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,1.0e+00), RES(-3.4526696585164602772e-4, -1.5704510597947457801e0)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-3.4526696585164602772e-4, 1.5704510597947457801e0)}, + {FN (arccsch), ARG(1.19209289550781250e-07,2.0e+00), RES(3.4412757706023621662e-8, -5.2359877559829648006e-1)}, + {FN (arccsch), ARG(1.19209289550781250e-07,-2.0e+00), RES(3.4412757706023621662e-8, 5.2359877559829648006e-1)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,2.0e+00), RES(-3.4412757706023621662e-8, -5.2359877559829648006e-1)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-3.4412757706023621662e-8, 5.2359877559829648006e-1)}, + {FN (arccsch), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6940658945086127152e-21, -1.1920928955078153234e-7)}, + {FN (arccsch), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6940658945086127152e-21, 1.1920928955078153234e-7)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6940658945086127152e-21, -1.1920928955078153234e-7)}, + {FN (arccsch), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6940658945086127152e-21, 1.1920928955078153234e-7)}, + {FN (arccsch), ARG(5.0e-01,0.0e+00), RES(1.4436354751788103425e0, 0.0)}, + {FN (arccsch), ARG(-5.0e-01,0.0e+00), RES(-1.4436354751788103425e0, 0.0)}, + {FN (arccsch), ARG(5.0e-01,1.19209289550781250e-07), RES(1.4436354751787798371e0, -2.1324805998799710740e-7)}, + {FN (arccsch), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.4436354751787798371e0, 2.1324805998799710740e-7)}, + {FN (arccsch), ARG(-5.0e-01,1.19209289550781250e-07), RES(-1.4436354751787798371e0, -2.1324805998799710740e-7)}, + {FN (arccsch), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-1.4436354751787798371e0, 2.1324805998799710740e-7)}, + {FN (arccsch), ARG(5.0e-01,5.0e-01), RES(1.0612750619050356520e0, -6.6623943249251525510e-1)}, + {FN (arccsch), ARG(5.0e-01,-5.0e-01), RES(1.0612750619050356520e0, 6.6623943249251525510e-1)}, + {FN (arccsch), ARG(-5.0e-01,5.0e-01), RES(-1.0612750619050356520e0, -6.6623943249251525510e-1)}, + {FN (arccsch), ARG(-5.0e-01,-5.0e-01), RES(-1.0612750619050356520e0, 6.6623943249251525510e-1)}, + {FN (arccsch), ARG(5.0e-01,1.0e+00), RES(5.3321829058411214108e-1, -7.7308635671950473342e-1)}, + {FN (arccsch), ARG(5.0e-01,-1.0e+00), RES(5.3321829058411214108e-1, 7.7308635671950473342e-1)}, + {FN (arccsch), ARG(-5.0e-01,1.0e+00), RES(-5.3321829058411214108e-1, -7.7308635671950473342e-1)}, + {FN (arccsch), ARG(-5.0e-01,-1.0e+00), RES(-5.3321829058411214108e-1, 7.7308635671950473342e-1)}, + {FN (arccsch), ARG(5.0e-01,2.0e+00), RES(1.3261586085051183885e-1, -4.8530734047334251250e-1)}, + {FN (arccsch), ARG(5.0e-01,-2.0e+00), RES(1.3261586085051183885e-1, 4.8530734047334251250e-1)}, + {FN (arccsch), ARG(-5.0e-01,2.0e+00), RES(-1.3261586085051183885e-1, -4.8530734047334251250e-1)}, + {FN (arccsch), ARG(-5.0e-01,-2.0e+00), RES(-1.3261586085051183885e-1, 4.8530734047334251250e-1)}, + {FN (arccsch), ARG(5.0e-01,8.3886080e+06), RES(7.1054273576010271023e-15, -1.1920928955078110883e-7)}, + {FN (arccsch), ARG(5.0e-01,-8.3886080e+06), RES(7.1054273576010271023e-15, 1.1920928955078110883e-7)}, + {FN (arccsch), ARG(-5.0e-01,8.3886080e+06), RES(-7.1054273576010271023e-15, -1.1920928955078110883e-7)}, + {FN (arccsch), ARG(-5.0e-01,-8.3886080e+06), RES(-7.1054273576010271023e-15, 1.1920928955078110883e-7)}, + {FN (arccsch), ARG(1.0e+00,0.0e+00), RES(8.8137358701954302523e-1, 0.0)}, + {FN (arccsch), ARG(-1.0e+00,0.0e+00), RES(-8.8137358701954302523e-1, 0.0)}, + {FN (arccsch), ARG(1.0e+00,1.19209289550781250e-07), RES(8.8137358701953548879e-1, -8.4293697021787414719e-8)}, + {FN (arccsch), ARG(1.0e+00,-1.19209289550781250e-07), RES(8.8137358701953548879e-1, 8.4293697021787414719e-8)}, + {FN (arccsch), ARG(-1.0e+00,1.19209289550781250e-07), RES(-8.8137358701953548879e-1, -8.4293697021787414719e-8)}, + {FN (arccsch), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-8.8137358701953548879e-1, 8.4293697021787414719e-8)}, + {FN (arccsch), ARG(1.0e+00,5.0e-01), RES(7.6388434595371104541e-1, -3.1122579724476109533e-1)}, + {FN (arccsch), ARG(1.0e+00,-5.0e-01), RES(7.6388434595371104541e-1, 3.1122579724476109533e-1)}, + {FN (arccsch), ARG(-1.0e+00,5.0e-01), RES(-7.6388434595371104541e-1, -3.1122579724476109533e-1)}, + {FN (arccsch), ARG(-1.0e+00,-5.0e-01), RES(-7.6388434595371104541e-1, 3.1122579724476109533e-1)}, + {FN (arccsch), ARG(1.0e+00,1.0e+00), RES(5.3063753095251782602e-1, -4.5227844715119068206e-1)}, + {FN (arccsch), ARG(1.0e+00,-1.0e+00), RES(5.3063753095251782602e-1, 4.5227844715119068206e-1)}, + {FN (arccsch), ARG(-1.0e+00,1.0e+00), RES(-5.3063753095251782602e-1, -4.5227844715119068206e-1)}, + {FN (arccsch), ARG(-1.0e+00,-1.0e+00), RES(-5.3063753095251782602e-1, 4.5227844715119068206e-1)}, + {FN (arccsch), ARG(1.0e+00,2.0e+00), RES(2.1561241855582964497e-1, -4.0158639166780606828e-1)}, + {FN (arccsch), ARG(1.0e+00,-2.0e+00), RES(2.1561241855582964497e-1, 4.0158639166780606828e-1)}, + {FN (arccsch), ARG(-1.0e+00,2.0e+00), RES(-2.1561241855582964497e-1, -4.0158639166780606828e-1)}, + {FN (arccsch), ARG(-1.0e+00,-2.0e+00), RES(-2.1561241855582964497e-1, 4.0158639166780606828e-1)}, + {FN (arccsch), ARG(1.0e+00,8.3886080e+06), RES(1.4210854715201902743e-14, -1.1920928955077983828e-7)}, + {FN (arccsch), ARG(1.0e+00,-8.3886080e+06), RES(1.4210854715201902743e-14, 1.1920928955077983828e-7)}, + {FN (arccsch), ARG(-1.0e+00,8.3886080e+06), RES(-1.4210854715201902743e-14, -1.1920928955077983828e-7)}, + {FN (arccsch), ARG(-1.0e+00,-8.3886080e+06), RES(-1.4210854715201902743e-14, 1.1920928955077983828e-7)}, + {FN (arccsch), ARG(2.0e+00,0.0e+00), RES(4.8121182505960344750e-1, 0.0)}, + {FN (arccsch), ARG(-2.0e+00,0.0e+00), RES(-4.8121182505960344750e-1, 0.0)}, + {FN (arccsch), ARG(2.0e+00,1.19209289550781250e-07), RES(4.8121182505960201756e-1, -2.6656007498500149811e-8)}, + {FN (arccsch), ARG(2.0e+00,-1.19209289550781250e-07), RES(4.8121182505960201756e-1, 2.6656007498500149811e-8)}, + {FN (arccsch), ARG(-2.0e+00,1.19209289550781250e-07), RES(-4.8121182505960201756e-1, -2.6656007498500149811e-8)}, + {FN (arccsch), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-4.8121182505960201756e-1, 2.6656007498500149811e-8)}, + {FN (arccsch), ARG(2.0e+00,5.0e-01), RES(4.5717847686917515748e-1, -1.0654050295275703990e-1)}, + {FN (arccsch), ARG(2.0e+00,-5.0e-01), RES(4.5717847686917515748e-1, 1.0654050295275703990e-1)}, + {FN (arccsch), ARG(-2.0e+00,5.0e-01), RES(-4.5717847686917515748e-1, -1.0654050295275703990e-1)}, + {FN (arccsch), ARG(-2.0e+00,-5.0e-01), RES(-4.5717847686917515748e-1, 1.0654050295275703990e-1)}, + {FN (arccsch), ARG(2.0e+00,1.0e+00), RES(3.9656823011232897892e-1, -1.8631805410781552582e-1)}, + {FN (arccsch), ARG(2.0e+00,-1.0e+00), RES(3.9656823011232897892e-1, 1.8631805410781552582e-1)}, + {FN (arccsch), ARG(-2.0e+00,1.0e+00), RES(-3.9656823011232897892e-1, -1.8631805410781552582e-1)}, + {FN (arccsch), ARG(-2.0e+00,-1.0e+00), RES(-3.9656823011232897892e-1, 1.8631805410781552582e-1)}, + {FN (arccsch), ARG(2.0e+00,2.0e+00), RES(2.5489557334055081773e-1, -2.4452216513554014646e-1)}, + {FN (arccsch), ARG(2.0e+00,-2.0e+00), RES(2.5489557334055081773e-1, 2.4452216513554014646e-1)}, + {FN (arccsch), ARG(-2.0e+00,2.0e+00), RES(-2.5489557334055081773e-1, -2.4452216513554014646e-1)}, + {FN (arccsch), ARG(-2.0e+00,-2.0e+00), RES(-2.5489557334055081773e-1, 2.4452216513554014646e-1)}, + {FN (arccsch), ARG(2.0e+00,8.3886080e+06), RES(2.8421709430402593796e-14, -1.1920928955077475608e-7)}, + {FN (arccsch), ARG(2.0e+00,-8.3886080e+06), RES(2.8421709430402593796e-14, 1.1920928955077475608e-7)}, + {FN (arccsch), ARG(-2.0e+00,8.3886080e+06), RES(-2.8421709430402593796e-14, -1.1920928955077475608e-7)}, + {FN (arccsch), ARG(-2.0e+00,-8.3886080e+06), RES(-2.8421709430402593796e-14, 1.1920928955077475608e-7)}, + {FN (arccsch), ARG(8.3886080e+06,0.0e+00), RES(1.1920928955078096766e-7, 0.0)}, + {FN (arccsch), ARG(-8.3886080e+06,0.0e+00), RES(-1.1920928955078096766e-7, 0.0)}, + {FN (arccsch), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.1920928955078096766e-7, -1.6940658945085886411e-21)}, + {FN (arccsch), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.1920928955078096766e-7, 1.6940658945085886411e-21)}, + {FN (arccsch), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.1920928955078096766e-7, -1.6940658945085886411e-21)}, + {FN (arccsch), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.1920928955078096766e-7, 1.6940658945085886411e-21)}, + {FN (arccsch), ARG(8.3886080e+06,5.0e-01), RES(1.1920928955078054414e-7, -7.1054273576009261281e-15)}, + {FN (arccsch), ARG(8.3886080e+06,-5.0e-01), RES(1.1920928955078054414e-7, 7.1054273576009261281e-15)}, + {FN (arccsch), ARG(-8.3886080e+06,5.0e-01), RES(-1.1920928955078054414e-7, -7.1054273576009261281e-15)}, + {FN (arccsch), ARG(-8.3886080e+06,-5.0e-01), RES(-1.1920928955078054414e-7, 7.1054273576009261281e-15)}, + {FN (arccsch), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955077927359e-7, -1.4210854715201700795e-14)}, + {FN (arccsch), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955077927359e-7, 1.4210854715201700795e-14)}, + {FN (arccsch), ARG(-8.3886080e+06,1.0e+00), RES(-1.1920928955077927359e-7, -1.4210854715201700795e-14)}, + {FN (arccsch), ARG(-8.3886080e+06,-1.0e+00), RES(-1.1920928955077927359e-7, 1.4210854715201700795e-14)}, + {FN (arccsch), ARG(8.3886080e+06,2.0e+00), RES(1.1920928955077419139e-7, -2.8421709430402189899e-14)}, + {FN (arccsch), ARG(8.3886080e+06,-2.0e+00), RES(1.1920928955077419139e-7, 2.8421709430402189899e-14)}, + {FN (arccsch), ARG(-8.3886080e+06,2.0e+00), RES(-1.1920928955077419139e-7, -2.8421709430402189899e-14)}, + {FN (arccsch), ARG(-8.3886080e+06,-2.0e+00), RES(-1.1920928955077419139e-7, 2.8421709430402189899e-14)}, + {FN (arccsch), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390695586e-8, -5.9604644775390554414e-8)}, + {FN (arccsch), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390695586e-8, 5.9604644775390554414e-8)}, + {FN (arccsch), ARG(-8.3886080e+06,8.3886080e+06), RES(-5.9604644775390695586e-8, -5.9604644775390554414e-8)}, + {FN (arccsch), ARG(-8.3886080e+06,-8.3886080e+06), RES(-5.9604644775390695586e-8, 5.9604644775390554414e-8)}, + {FN (arcsech), ARG(0.0e+00,1.19209289550781250e-07), RES(1.6635532333438690979e1, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.6635532333438690979e1, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,5.0e-01), RES(1.4436354751788103425e0, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,-5.0e-01), RES(1.4436354751788103425e0, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,1.0e+00), RES(8.8137358701954302523e-1, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,-1.0e+00), RES(8.8137358701954302523e-1, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,2.0e+00), RES(4.8121182505960344750e-1, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,-2.0e+00), RES(4.8121182505960344750e-1, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,8.3886080e+06), RES(1.1920928955078096766e-7, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(0.0e+00,-8.3886080e+06), RES(1.1920928955078096766e-7, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,0.0e+00), RES(1.6635532333438683873e1, 0.0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,0.0e+00), RES(1.6635532333438683873e1, 3.1415926535897932385e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.6288958743158714771e1, -7.8539816339745541504e-1)}, + {FN (arcsech), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.6288958743158714771e1, 7.8539816339745541504e-1)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(1.6288958743158714771e1, -2.3561944901923378234e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.6288958743158714771e1, 2.3561944901923378234e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,5.0e-01), RES(1.4436354751787798371e0, -1.5707961135468366312e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,-5.0e-01), RES(1.4436354751787798371e0, 1.5707961135468366312e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,5.0e-01), RES(1.4436354751787798371e0, -1.5707965400429566072e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,-5.0e-01), RES(1.4436354751787798371e0, 1.5707965400429566072e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,1.0e+00), RES(8.8137358701953548879e-1, -1.5707962425011995974e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,-1.0e+00), RES(8.8137358701953548879e-1, 1.5707962425011995974e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,1.0e+00), RES(8.8137358701953548879e-1, -1.5707964110885936410e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,-1.0e+00), RES(8.8137358701953548879e-1, 1.5707964110885936410e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,2.0e+00), RES(4.8121182505960201756e-1, -1.5707963001388891207e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,-2.0e+00), RES(4.8121182505960201756e-1, 1.5707963001388891207e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,2.0e+00), RES(4.8121182505960201756e-1, -1.5707963534509041177e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,-2.0e+00), RES(4.8121182505960201756e-1, 1.5707963534509041177e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.1920928955078096766e-7, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.1920928955078096766e-7, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.1920928955078096766e-7, -1.5707963267948966192e0)}, + {FN (arcsech), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.1920928955078096766e-7, 1.5707963267948966192e0)}, + {FN (arcsech), ARG(5.0e-01,0.0e+00), RES(1.3169578969248167086e0, 0.0)}, + {FN (arcsech), ARG(-5.0e-01,0.0e+00), RES(1.3169578969248167086e0, 3.1415926535897932385e0)}, + {FN (arcsech), ARG(5.0e-01,1.19209289550781250e-07), RES(1.3169578969247948296e0, -2.7530206164818516969e-7)}, + {FN (arcsech), ARG(5.0e-01,-1.19209289550781250e-07), RES(1.3169578969247948296e0, 2.7530206164818516969e-7)}, + {FN (arcsech), ARG(-5.0e-01,1.19209289550781250e-07), RES(1.3169578969247948296e0, -3.1415923782877315903e0)}, + {FN (arcsech), ARG(-5.0e-01,-1.19209289550781250e-07), RES(1.3169578969247948296e0, 3.1415923782877315903e0)}, + {FN (arcsech), ARG(5.0e-01,5.0e-01), RES(1.0612750619050356520e0, -9.0455689430238136413e-1)}, + {FN (arcsech), ARG(5.0e-01,-5.0e-01), RES(1.0612750619050356520e0, 9.0455689430238136413e-1)}, + {FN (arcsech), ARG(-5.0e-01,5.0e-01), RES(1.0612750619050356520e0, -2.2370357592874118743e0)}, + {FN (arcsech), ARG(-5.0e-01,-5.0e-01), RES(1.0612750619050356520e0, 2.2370357592874118743e0)}, + {FN (arcsech), ARG(5.0e-01,1.0e+00), RES(7.6388434595371104541e-1, -1.2595705295501355239e0)}, + {FN (arcsech), ARG(5.0e-01,-1.0e+00), RES(7.6388434595371104541e-1, 1.2595705295501355239e0)}, + {FN (arcsech), ARG(-5.0e-01,1.0e+00), RES(7.6388434595371104541e-1, -1.8820221240396577146e0)}, + {FN (arcsech), ARG(-5.0e-01,-1.0e+00), RES(7.6388434595371104541e-1, 1.8820221240396577146e0)}, + {FN (arcsech), ARG(5.0e-01,2.0e+00), RES(4.5717847686917515748e-1, -1.4642558238421395793e0)}, + {FN (arcsech), ARG(5.0e-01,-2.0e+00), RES(4.5717847686917515748e-1, 1.4642558238421395793e0)}, + {FN (arcsech), ARG(-5.0e-01,2.0e+00), RES(4.5717847686917515748e-1, -1.6773368297476536591e0)}, + {FN (arcsech), ARG(-5.0e-01,-2.0e+00), RES(4.5717847686917515748e-1, 1.6773368297476536591e0)}, + {FN (arcsech), ARG(5.0e-01,8.3886080e+06), RES(1.1920928955078054414e-7, -1.5707963267948895138e0)}, + {FN (arcsech), ARG(5.0e-01,-8.3886080e+06), RES(1.1920928955078054414e-7, 1.5707963267948895138e0)}, + {FN (arcsech), ARG(-5.0e-01,8.3886080e+06), RES(1.1920928955078054414e-7, -1.5707963267949037247e0)}, + {FN (arcsech), ARG(-5.0e-01,-8.3886080e+06), RES(1.1920928955078054414e-7, 1.5707963267949037247e0)}, + {FN (arcsech), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arcsech), ARG(-1.0e+00,0.0e+00), RES(0, 3.1415926535897932385e0)}, + {FN (arcsech), ARG(1.0e+00,1.19209289550781250e-07), RES(3.4526696585164602772e-4, -3.4526700015083915182e-4)}, + {FN (arcsech), ARG(1.0e+00,-1.19209289550781250e-07), RES(3.4526696585164602772e-4, 3.4526700015083915182e-4)}, + {FN (arcsech), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.4526696585164602772e-4, -3.1412473865896423993e0)}, + {FN (arcsech), ARG(-1.0e+00,-1.19209289550781250e-07), RES(3.4526696585164602772e-4, 3.1412473865896423993e0)}, + {FN (arcsech), ARG(1.0e+00,5.0e-01), RES(5.3321829058411214108e-1, -7.9770997007539188581e-1)}, + {FN (arcsech), ARG(1.0e+00,-5.0e-01), RES(5.3321829058411214108e-1, 7.9770997007539188581e-1)}, + {FN (arcsech), ARG(-1.0e+00,5.0e-01), RES(5.3321829058411214108e-1, -2.3438826835144013527e0)}, + {FN (arcsech), ARG(-1.0e+00,-5.0e-01), RES(5.3321829058411214108e-1, 2.3438826835144013527e0)}, + {FN (arcsech), ARG(1.0e+00,1.0e+00), RES(5.3063753095251782602e-1, -1.1185178796437059372e0)}, + {FN (arcsech), ARG(1.0e+00,-1.0e+00), RES(5.3063753095251782602e-1, 1.1185178796437059372e0)}, + {FN (arcsech), ARG(-1.0e+00,1.0e+00), RES(5.3063753095251782602e-1, -2.0230747739460873013e0)}, + {FN (arcsech), ARG(-1.0e+00,-1.0e+00), RES(5.3063753095251782602e-1, 2.0230747739460873013e0)}, + {FN (arcsech), ARG(1.0e+00,2.0e+00), RES(3.9656823011232897892e-1, -1.3844782726870810934e0)}, + {FN (arcsech), ARG(1.0e+00,-2.0e+00), RES(3.9656823011232897892e-1, 1.3844782726870810934e0)}, + {FN (arcsech), ARG(-1.0e+00,2.0e+00), RES(3.9656823011232897892e-1, -1.7571143809027121451e0)}, + {FN (arcsech), ARG(-1.0e+00,-2.0e+00), RES(3.9656823011232897892e-1, 1.7571143809027121451e0)}, + {FN (arcsech), ARG(1.0e+00,8.3886080e+06), RES(1.1920928955077927359e-7, -1.5707963267948824084e0)}, + {FN (arcsech), ARG(1.0e+00,-8.3886080e+06), RES(1.1920928955077927359e-7, 1.5707963267948824084e0)}, + {FN (arcsech), ARG(-1.0e+00,8.3886080e+06), RES(1.1920928955077927359e-7, -1.5707963267949108301e0)}, + {FN (arcsech), ARG(-1.0e+00,-8.3886080e+06), RES(1.1920928955077927359e-7, 1.5707963267949108301e0)}, + {FN (arcsech), ARG(2.0e+00,0.0e+00), RES(0, 1.0471975511965977462e0)}, + {FN (arcsech), ARG(-2.0e+00,0.0e+00), RES(0, 2.0943951023931954923e0)}, + {FN (arcsech), ARG(2.0e+00,1.19209289550781250e-07), RES(3.4412757706023621662e-8, -1.0471975511966001392e0)}, + {FN (arcsech), ARG(2.0e+00,-1.19209289550781250e-07), RES(3.4412757706023621662e-8, 1.0471975511966001392e0)}, + {FN (arcsech), ARG(-2.0e+00,1.19209289550781250e-07), RES(3.4412757706023621662e-8, -2.0943951023931930993e0)}, + {FN (arcsech), ARG(-2.0e+00,-1.19209289550781250e-07), RES(3.4412757706023621662e-8, 2.0943951023931930993e0)}, + {FN (arcsech), ARG(2.0e+00,5.0e-01), RES(1.3261586085051183885e-1, -1.0854889863215541067e0)}, + {FN (arcsech), ARG(2.0e+00,-5.0e-01), RES(1.3261586085051183885e-1, 1.0854889863215541067e0)}, + {FN (arcsech), ARG(-2.0e+00,5.0e-01), RES(1.3261586085051183885e-1, -2.0561036672682391317e0)}, + {FN (arcsech), ARG(-2.0e+00,-5.0e-01), RES(1.3261586085051183885e-1, 2.0561036672682391317e0)}, + {FN (arcsech), ARG(2.0e+00,1.0e+00), RES(2.1561241855582964497e-1, -1.1692099351270905509e0)}, + {FN (arcsech), ARG(2.0e+00,-1.0e+00), RES(2.1561241855582964497e-1, 1.1692099351270905509e0)}, + {FN (arcsech), ARG(-2.0e+00,1.0e+00), RES(2.1561241855582964497e-1, -1.9723827184627026875e0)}, + {FN (arcsech), ARG(-2.0e+00,-1.0e+00), RES(2.1561241855582964497e-1, 1.9723827184627026875e0)}, + {FN (arcsech), ARG(2.0e+00,2.0e+00), RES(2.5489557334055081773e-1, -1.3262741616593564728e0)}, + {FN (arcsech), ARG(2.0e+00,-2.0e+00), RES(2.5489557334055081773e-1, 1.3262741616593564728e0)}, + {FN (arcsech), ARG(-2.0e+00,2.0e+00), RES(2.5489557334055081773e-1, -1.8153184919304367657e0)}, + {FN (arcsech), ARG(-2.0e+00,-2.0e+00), RES(2.5489557334055081773e-1, 1.8153184919304367657e0)}, + {FN (arcsech), ARG(2.0e+00,8.3886080e+06), RES(1.1920928955077419139e-7, -1.5707963267948681975e0)}, + {FN (arcsech), ARG(2.0e+00,-8.3886080e+06), RES(1.1920928955077419139e-7, 1.5707963267948681975e0)}, + {FN (arcsech), ARG(-2.0e+00,8.3886080e+06), RES(1.1920928955077419139e-7, -1.5707963267949250409e0)}, + {FN (arcsech), ARG(-2.0e+00,-8.3886080e+06), RES(1.1920928955077419139e-7, 1.5707963267949250409e0)}, + {FN (arcsech), ARG(8.3886080e+06,0.0e+00), RES(0, 1.5707962075856070684e0)}, + {FN (arcsech), ARG(-8.3886080e+06,0.0e+00), RES(0, 1.570796446004186170e0)}, + {FN (arcsech), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.6940658945086127152e-21, -1.5707962075856070684e0)}, + {FN (arcsech), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.6940658945086127152e-21, 1.5707962075856070684e0)}, + {FN (arcsech), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.6940658945086127152e-21, -1.570796446004186170e0)}, + {FN (arcsech), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.6940658945086127152e-21, 1.570796446004186170e0)}, + {FN (arcsech), ARG(8.3886080e+06,5.0e-01), RES(7.1054273576010271023e-15, -1.5707962075856070685e0)}, + {FN (arcsech), ARG(8.3886080e+06,-5.0e-01), RES(7.1054273576010271023e-15, 1.5707962075856070685e0)}, + {FN (arcsech), ARG(-8.3886080e+06,5.0e-01), RES(7.1054273576010271023e-15, -1.570796446004186170e0)}, + {FN (arcsech), ARG(-8.3886080e+06,-5.0e-01), RES(7.1054273576010271023e-15, 1.570796446004186170e0)}, + {FN (arcsech), ARG(8.3886080e+06,1.0e+00), RES(1.4210854715201902743e-14, -1.5707962075856070685e0)}, + {FN (arcsech), ARG(8.3886080e+06,-1.0e+00), RES(1.4210854715201902743e-14, 1.5707962075856070685e0)}, + {FN (arcsech), ARG(-8.3886080e+06,1.0e+00), RES(1.4210854715201902743e-14, -1.570796446004186170e0)}, + {FN (arcsech), ARG(-8.3886080e+06,-1.0e+00), RES(1.4210854715201902743e-14, 1.570796446004186170e0)}, + {FN (arcsech), ARG(8.3886080e+06,2.0e+00), RES(2.8421709430402593796e-14, -1.5707962075856070685e0)}, + {FN (arcsech), ARG(8.3886080e+06,-2.0e+00), RES(2.8421709430402593796e-14, 1.5707962075856070685e0)}, + {FN (arcsech), ARG(-8.3886080e+06,2.0e+00), RES(2.8421709430402593796e-14, -1.570796446004186170e0)}, + {FN (arcsech), ARG(-8.3886080e+06,-2.0e+00), RES(2.8421709430402593796e-14, 1.570796446004186170e0)}, + {FN (arcsech), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390695586e-8, -1.5707962671902518438e0)}, + {FN (arcsech), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390695586e-8, 1.5707962671902518438e0)}, + {FN (arcsech), ARG(-8.3886080e+06,8.3886080e+06), RES(5.9604644775390695586e-8, -1.5707963863995413946e0)}, + {FN (arcsech), ARG(-8.3886080e+06,-8.3886080e+06), RES(5.9604644775390695586e-8, 1.5707963863995413946e0)}, + {FN (arccoth), ARG(0.0e+00,1.19209289550781250e-07), RES(0, -1.5707962075856070685e0)}, + {FN (arccoth), ARG(0.0e+00,-1.19209289550781250e-07), RES(0, 1.5707962075856070685e0)}, + {FN (arccoth), ARG(0.0e+00,5.0e-01), RES(0, -1.1071487177940905030e0)}, + {FN (arccoth), ARG(0.0e+00,-5.0e-01), RES(0, 1.1071487177940905030e0)}, + {FN (arccoth), ARG(0.0e+00,1.0e+00), RES(0, -7.8539816339744830962e-1)}, + {FN (arccoth), ARG(0.0e+00,-1.0e+00), RES(0, 7.8539816339744830962e-1)}, + {FN (arccoth), ARG(0.0e+00,2.0e+00), RES(0, -4.6364760900080611621e-1)}, + {FN (arccoth), ARG(0.0e+00,-2.0e+00), RES(0, 4.6364760900080611621e-1)}, + {FN (arccoth), ARG(0.0e+00,8.3886080e+06), RES(0, -1.1920928955078068531e-7)}, + {FN (arccoth), ARG(0.0e+00,-8.3886080e+06), RES(0, 1.1920928955078068531e-7)}, + {FN (arccoth), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078181469e-7, -1.5707963267948966192e0)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.1920928955078181469e-7, 1.5707963267948966192e0)}, + {FN (arccoth), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.1920928955078012062e-7, -1.5707962075856070684e0)}, + {FN (arccoth), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.1920928955078012062e-7, 1.5707962075856070684e0)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.1920928955078012062e-7, -1.5707962075856070684e0)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.1920928955078012062e-7, 1.5707962075856070684e0)}, + {FN (arccoth), ARG(1.19209289550781250e-07,5.0e-01), RES(9.5367431640625072280e-8, -1.1071487177940859555e0)}, + {FN (arccoth), ARG(1.19209289550781250e-07,-5.0e-01), RES(9.5367431640625072280e-8, 1.1071487177940859555e0)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,5.0e-01), RES(-9.5367431640625072280e-8, -1.1071487177940859555e0)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-9.5367431640625072280e-8, 1.1071487177940859555e0)}, + {FN (arccoth), ARG(1.19209289550781250e-07,1.0e+00), RES(5.9604644775390483828e-8, -7.8539816339744475690e-1)}, + {FN (arccoth), ARG(1.19209289550781250e-07,-1.0e+00), RES(5.9604644775390483828e-8, 7.8539816339744475690e-1)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,1.0e+00), RES(-5.9604644775390483828e-8, -7.8539816339744475690e-1)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-5.9604644775390483828e-8, 7.8539816339744475690e-1)}, + {FN (arccoth), ARG(1.19209289550781250e-07,2.0e+00), RES(2.3841857910156200307e-8, -4.6364760900080497935e-1)}, + {FN (arccoth), ARG(1.19209289550781250e-07,-2.0e+00), RES(2.3841857910156200307e-8, 4.6364760900080497935e-1)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,2.0e+00), RES(-2.3841857910156200307e-8, -4.6364760900080497935e-1)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-2.3841857910156200307e-8, 4.6364760900080497935e-1)}, + {FN (arccoth), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.6940658945085766040e-21, -1.1920928955078068531e-7)}, + {FN (arccoth), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.6940658945085766040e-21, 1.1920928955078068531e-7)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(-1.6940658945085766040e-21, -1.1920928955078068531e-7)}, + {FN (arccoth), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.6940658945085766040e-21, 1.1920928955078068531e-7)}, + {FN (arccoth), ARG(5.0e-01,0.0e+00), RES(5.4930614433405484570e-1, -1.5707963267948966192e0)}, + {FN (arccoth), ARG(-5.0e-01,0.0e+00), RES(-5.4930614433405484570e-1, 1.5707963267948966192e0)}, + {FN (arccoth), ARG(5.0e-01,1.19209289550781250e-07), RES(5.4930614433404221383e-1, -1.5707961678491772182e0)}, + {FN (arccoth), ARG(5.0e-01,-1.19209289550781250e-07), RES(5.4930614433404221383e-1, 1.5707961678491772182e0)}, + {FN (arccoth), ARG(-5.0e-01,1.19209289550781250e-07), RES(-5.4930614433404221383e-1, -1.5707961678491772182e0)}, + {FN (arccoth), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-5.4930614433404221383e-1, 1.5707961678491772182e0)}, + {FN (arccoth), ARG(5.0e-01,5.0e-01), RES(4.0235947810852509365e-1, -1.0172219678978513677e0)}, + {FN (arccoth), ARG(5.0e-01,-5.0e-01), RES(4.0235947810852509365e-1, 1.0172219678978513677e0)}, + {FN (arccoth), ARG(-5.0e-01,5.0e-01), RES(-4.0235947810852509365e-1, -1.0172219678978513677e0)}, + {FN (arccoth), ARG(-5.0e-01,-5.0e-01), RES(-4.0235947810852509365e-1, 1.0172219678978513677e0)}, + {FN (arccoth), ARG(5.0e-01,1.0e+00), RES(2.3887786125685909036e-1, -7.2322066612406759210e-1)}, + {FN (arccoth), ARG(5.0e-01,-1.0e+00), RES(2.3887786125685909036e-1, 7.2322066612406759210e-1)}, + {FN (arccoth), ARG(-5.0e-01,1.0e+00), RES(-2.3887786125685909036e-1, -7.2322066612406759210e-1)}, + {FN (arccoth), ARG(-5.0e-01,-1.0e+00), RES(-2.3887786125685909036e-1, 7.2322066612406759210e-1)}, + {FN (arccoth), ARG(5.0e-01,2.0e+00), RES(9.6415620202996167238e-2, -4.4423988596007427049e-1)}, + {FN (arccoth), ARG(5.0e-01,-2.0e+00), RES(9.6415620202996167238e-2, 4.4423988596007427049e-1)}, + {FN (arccoth), ARG(-5.0e-01,2.0e+00), RES(-9.6415620202996167238e-2, -4.4423988596007427049e-1)}, + {FN (arccoth), ARG(-5.0e-01,-2.0e+00), RES(-9.6415620202996167238e-2, 4.4423988596007427049e-1)}, + {FN (arccoth), ARG(5.0e-01,8.3886080e+06), RES(7.1054273576008756410e-15, -1.1920928955078026179e-7)}, + {FN (arccoth), ARG(5.0e-01,-8.3886080e+06), RES(7.1054273576008756410e-15, 1.1920928955078026179e-7)}, + {FN (arccoth), ARG(-5.0e-01,8.3886080e+06), RES(-7.1054273576008756410e-15, -1.1920928955078026179e-7)}, + {FN (arccoth), ARG(-5.0e-01,-8.3886080e+06), RES(-7.1054273576008756410e-15, 1.1920928955078026179e-7)}, + {FN (arccoth), ARG(1.0e+00,1.19209289550781250e-07), RES(8.3177661667193446012e0, -7.8539813359512592192e-1)}, + {FN (arccoth), ARG(1.0e+00,-1.19209289550781250e-07), RES(8.3177661667193446012e0, 7.8539813359512592192e-1)}, + {FN (arccoth), ARG(-1.0e+00,1.19209289550781250e-07), RES(-8.3177661667193446012e0, -7.8539813359512592192e-1)}, + {FN (arccoth), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-8.3177661667193446012e0, 7.8539813359512592192e-1)}, + {FN (arccoth), ARG(1.0e+00,5.0e-01), RES(7.0830333601405402006e-1, -6.6290883183401623253e-1)}, + {FN (arccoth), ARG(1.0e+00,-5.0e-01), RES(7.0830333601405402006e-1, 6.6290883183401623253e-1)}, + {FN (arccoth), ARG(-1.0e+00,5.0e-01), RES(-7.0830333601405402006e-1, -6.6290883183401623253e-1)}, + {FN (arccoth), ARG(-1.0e+00,-5.0e-01), RES(-7.0830333601405402006e-1, 6.6290883183401623253e-1)}, + {FN (arccoth), ARG(1.0e+00,1.0e+00), RES(4.0235947810852509365e-1, -5.5357435889704525151e-1)}, + {FN (arccoth), ARG(1.0e+00,-1.0e+00), RES(4.0235947810852509365e-1, 5.5357435889704525151e-1)}, + {FN (arccoth), ARG(-1.0e+00,1.0e+00), RES(-4.0235947810852509365e-1, -5.5357435889704525151e-1)}, + {FN (arccoth), ARG(-1.0e+00,-1.0e+00), RES(-4.0235947810852509365e-1, 5.5357435889704525151e-1)}, + {FN (arccoth), ARG(1.0e+00,2.0e+00), RES(1.7328679513998632735e-1, -3.9269908169872415481e-1)}, + {FN (arccoth), ARG(1.0e+00,-2.0e+00), RES(1.7328679513998632735e-1, 3.9269908169872415481e-1)}, + {FN (arccoth), ARG(-1.0e+00,2.0e+00), RES(-1.7328679513998632735e-1, -3.9269908169872415481e-1)}, + {FN (arccoth), ARG(-1.0e+00,-2.0e+00), RES(-1.7328679513998632735e-1, 3.9269908169872415481e-1)}, + {FN (arccoth), ARG(1.0e+00,8.3886080e+06), RES(1.4210854715201599821e-14, -1.1920928955077899125e-7)}, + {FN (arccoth), ARG(1.0e+00,-8.3886080e+06), RES(1.4210854715201599821e-14, 1.1920928955077899125e-7)}, + {FN (arccoth), ARG(-1.0e+00,8.3886080e+06), RES(-1.4210854715201599821e-14, -1.1920928955077899125e-7)}, + {FN (arccoth), ARG(-1.0e+00,-8.3886080e+06), RES(-1.4210854715201599821e-14, 1.1920928955077899125e-7)}, + {FN (arccoth), ARG(2.0e+00,0.0e+00), RES(5.4930614433405484570e-1, 0.0)}, + {FN (arccoth), ARG(-2.0e+00,0.0e+00), RES(-5.4930614433405484570e-1, 0.0)}, + {FN (arccoth), ARG(2.0e+00,1.19209289550781250e-07), RES(5.4930614433405168773e-1, -3.9736429850260144780e-8)}, + {FN (arccoth), ARG(2.0e+00,-1.19209289550781250e-07), RES(5.4930614433405168773e-1, 3.9736429850260144780e-8)}, + {FN (arccoth), ARG(-2.0e+00,1.19209289550781250e-07), RES(-5.4930614433405168773e-1, -3.9736429850260144780e-8)}, + {FN (arccoth), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-5.4930614433405168773e-1, 3.9736429850260144780e-8)}, + {FN (arccoth), ARG(2.0e+00,5.0e-01), RES(5.0037000005253101744e-1, -1.4924946579308963897e-1)}, + {FN (arccoth), ARG(2.0e+00,-5.0e-01), RES(5.0037000005253101744e-1, 1.4924946579308963897e-1)}, + {FN (arccoth), ARG(-2.0e+00,5.0e-01), RES(-5.0037000005253101744e-1, -1.4924946579308963897e-1)}, + {FN (arccoth), ARG(-2.0e+00,-5.0e-01), RES(-5.0037000005253101744e-1, 1.4924946579308963897e-1)}, + {FN (arccoth), ARG(2.0e+00,1.0e+00), RES(4.0235947810852509365e-1, -2.3182380450040305811e-1)}, + {FN (arccoth), ARG(2.0e+00,-1.0e+00), RES(4.0235947810852509365e-1, 2.3182380450040305811e-1)}, + {FN (arccoth), ARG(-2.0e+00,1.0e+00), RES(-4.0235947810852509365e-1, -2.3182380450040305811e-1)}, + {FN (arccoth), ARG(-2.0e+00,-1.0e+00), RES(-4.0235947810852509365e-1, 2.3182380450040305811e-1)}, + {FN (arccoth), ARG(2.0e+00,2.0e+00), RES(2.3887786125685909036e-1, -2.5957305712326147589e-1)}, + {FN (arccoth), ARG(2.0e+00,-2.0e+00), RES(2.3887786125685909036e-1, 2.5957305712326147589e-1)}, + {FN (arccoth), ARG(-2.0e+00,2.0e+00), RES(-2.3887786125685909036e-1, -2.5957305712326147589e-1)}, + {FN (arccoth), ARG(-2.0e+00,-2.0e+00), RES(-2.3887786125685909036e-1, 2.5957305712326147589e-1)}, + {FN (arccoth), ARG(2.0e+00,8.3886080e+06), RES(2.8421709430401987951e-14, -1.1920928955077390905e-7)}, + {FN (arccoth), ARG(2.0e+00,-8.3886080e+06), RES(2.8421709430401987951e-14, 1.1920928955077390905e-7)}, + {FN (arccoth), ARG(-2.0e+00,8.3886080e+06), RES(-2.8421709430401987951e-14, -1.1920928955077390905e-7)}, + {FN (arccoth), ARG(-2.0e+00,-8.3886080e+06), RES(-2.8421709430401987951e-14, 1.1920928955077390905e-7)}, + {FN (arccoth), ARG(8.3886080e+06,0.0e+00), RES(1.1920928955078181469e-7, 0.0)}, + {FN (arccoth), ARG(-8.3886080e+06,0.0e+00), RES(-1.1920928955078181469e-7, 0.0)}, + {FN (arccoth), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.1920928955078181469e-7, -1.6940658945086247523e-21)}, + {FN (arccoth), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.1920928955078181469e-7, 1.6940658945086247523e-21)}, + {FN (arccoth), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(-1.1920928955078181469e-7, -1.6940658945086247523e-21)}, + {FN (arccoth), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-1.1920928955078181469e-7, 1.6940658945086247523e-21)}, + {FN (arccoth), ARG(8.3886080e+06,5.0e-01), RES(1.1920928955078139117e-7, -7.1054273576010775894e-15)}, + {FN (arccoth), ARG(8.3886080e+06,-5.0e-01), RES(1.1920928955078139117e-7, 7.1054273576010775894e-15)}, + {FN (arccoth), ARG(-8.3886080e+06,5.0e-01), RES(-1.1920928955078139117e-7, -7.1054273576010775894e-15)}, + {FN (arccoth), ARG(-8.3886080e+06,-5.0e-01), RES(-1.1920928955078139117e-7, 7.1054273576010775894e-15)}, + {FN (arccoth), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955078012062e-7, -1.4210854715202003717e-14)}, + {FN (arccoth), ARG(8.3886080e+06,-1.0e+00), RES(1.1920928955078012062e-7, 1.4210854715202003717e-14)}, + {FN (arccoth), ARG(-8.3886080e+06,1.0e+00), RES(-1.1920928955078012062e-7, -1.4210854715202003717e-14)}, + {FN (arccoth), ARG(-8.3886080e+06,-1.0e+00), RES(-1.1920928955078012062e-7, 1.4210854715202003717e-14)}, + {FN (arccoth), ARG(8.3886080e+06,2.0e+00), RES(1.1920928955077503843e-7, -2.8421709430402795744e-14)}, + {FN (arccoth), ARG(8.3886080e+06,-2.0e+00), RES(1.1920928955077503843e-7, 2.8421709430402795744e-14)}, + {FN (arccoth), ARG(-8.3886080e+06,2.0e+00), RES(-1.1920928955077503843e-7, -2.8421709430402795744e-14)}, + {FN (arccoth), ARG(-8.3886080e+06,-2.0e+00), RES(-1.1920928955077503843e-7, 2.8421709430402795744e-14)}, + {FN (arccoth), ARG(8.3886080e+06,8.3886080e+06), RES(5.9604644775390483828e-8, -5.9604644775390766172e-8)}, + {FN (arccoth), ARG(8.3886080e+06,-8.3886080e+06), RES(5.9604644775390483828e-8, 5.9604644775390766172e-8)}, + {FN (arccoth), ARG(-8.3886080e+06,8.3886080e+06), RES(-5.9604644775390483828e-8, -5.9604644775390766172e-8)}, + {FN (arccoth), ARG(-8.3886080e+06,-8.3886080e+06), RES(-5.9604644775390483828e-8, 5.9604644775390766172e-8)}, diff --git a/software/gsl-1.15/complex/results1.h b/software/gsl-1.15/complex/results1.h new file mode 100644 index 000000000..764194494 --- /dev/null +++ b/software/gsl-1.15/complex/results1.h @@ -0,0 +1,583 @@ + {FN (arg), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(0.0e+00,1.19209289550781250e-07), RES(1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,-1.19209289550781250e-07), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,5.0e-01), RES(1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,-5.0e-01), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,1.0e+00), RES(1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,-1.0e+00), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,2.0e+00), RES(1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,-2.0e+00), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,8.3886080e+06), RES(1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(0.0e+00,-8.3886080e+06), RES(-1.5707963267948966192e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,5.0e-01), RES(1.5707960883763175177e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,-5.0e-01), RES(-1.5707960883763175177e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,5.0e-01), RES(1.5707965652134757208e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-1.5707965652134757208e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,1.0e+00), RES(1.5707962075856070685e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,-1.0e+00), RES(-1.5707962075856070685e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,1.0e+00), RES(1.570796446004186170e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,-1.0e+00), RES(-1.570796446004186170e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,2.0e+00), RES(1.5707962671902518438e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,-2.0e+00), RES(-1.5707962671902518438e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,2.0e+00), RES(1.5707963863995413946e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,-2.0e+00), RES(-1.5707963863995413946e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267948824084e0, 0.0)}, + {FN (arg), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(-1.5707963267948824084e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5707963267949108301e0, 0.0)}, + {FN (arg), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(-1.5707963267949108301e0, 0.0)}, + {FN (arg), ARG(5.0e-01,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arg), ARG(5.0e-01,1.19209289550781250e-07), RES(2.3841857910155798249e-7, 0.0)}, + {FN (arg), ARG(5.0e-01,-1.19209289550781250e-07), RES(-2.3841857910155798249e-7, 0.0)}, + {FN (arg), ARG(-5.0e-01,1.19209289550781250e-07), RES(3.1415924151712141369e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-3.1415924151712141369e0, 0.0)}, + {FN (arg), ARG(5.0e-01,5.0e-01), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(5.0e-01,-5.0e-01), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(-5.0e-01,5.0e-01), RES(2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,-5.0e-01), RES(-2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(5.0e-01,1.0e+00), RES(1.1071487177940905030e0, 0.0)}, + {FN (arg), ARG(5.0e-01,-1.0e+00), RES(-1.1071487177940905030e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,1.0e+00), RES(2.0344439357957027354e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,-1.0e+00), RES(-2.0344439357957027354e0, 0.0)}, + {FN (arg), ARG(5.0e-01,2.0e+00), RES(1.3258176636680324651e0, 0.0)}, + {FN (arg), ARG(5.0e-01,-2.0e+00), RES(-1.3258176636680324651e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,2.0e+00), RES(1.8157749899217607734e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,-2.0e+00), RES(-1.8157749899217607734e0, 0.0)}, + {FN (arg), ARG(5.0e-01,8.3886080e+06), RES(1.5707962671902518438e0, 0.0)}, + {FN (arg), ARG(5.0e-01,-8.3886080e+06), RES(-1.5707962671902518438e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,8.3886080e+06), RES(1.5707963863995413946e0, 0.0)}, + {FN (arg), ARG(-5.0e-01,-8.3886080e+06), RES(-1.5707963863995413946e0, 0.0)}, + {FN (arg), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arg), ARG(1.0e+00,1.19209289550781250e-07), RES(1.1920928955078068531e-7, 0.0)}, + {FN (arg), ARG(1.0e+00,-1.19209289550781250e-07), RES(-1.1920928955078068531e-7, 0.0)}, + {FN (arg), ARG(-1.0e+00,1.19209289550781250e-07), RES(3.1415925343805036877e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,-1.19209289550781250e-07), RES(-3.1415925343805036877e0, 0.0)}, + {FN (arg), ARG(1.0e+00,5.0e-01), RES(4.6364760900080611621e-1, 0.0)}, + {FN (arg), ARG(1.0e+00,-5.0e-01), RES(-4.6364760900080611621e-1, 0.0)}, + {FN (arg), ARG(-1.0e+00,5.0e-01), RES(2.6779450445889871222e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,-5.0e-01), RES(-2.6779450445889871222e0, 0.0)}, + {FN (arg), ARG(1.0e+00,1.0e+00), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(1.0e+00,-1.0e+00), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(-1.0e+00,1.0e+00), RES(2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,-1.0e+00), RES(-2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(1.0e+00,2.0e+00), RES(1.1071487177940905030e0, 0.0)}, + {FN (arg), ARG(1.0e+00,-2.0e+00), RES(-1.1071487177940905030e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,2.0e+00), RES(2.0344439357957027354e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,-2.0e+00), RES(-2.0344439357957027354e0, 0.0)}, + {FN (arg), ARG(1.0e+00,8.3886080e+06), RES(1.5707962075856070685e0, 0.0)}, + {FN (arg), ARG(1.0e+00,-8.3886080e+06), RES(-1.5707962075856070685e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,8.3886080e+06), RES(1.570796446004186170e0, 0.0)}, + {FN (arg), ARG(-1.0e+00,-8.3886080e+06), RES(-1.570796446004186170e0, 0.0)}, + {FN (arg), ARG(2.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arg), ARG(2.0e+00,1.19209289550781250e-07), RES(5.9604644775390554414e-8, 0.0)}, + {FN (arg), ARG(2.0e+00,-1.19209289550781250e-07), RES(-5.9604644775390554414e-8, 0.0)}, + {FN (arg), ARG(-2.0e+00,1.19209289550781250e-07), RES(3.1415925939851484631e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,-1.19209289550781250e-07), RES(-3.1415925939851484631e0, 0.0)}, + {FN (arg), ARG(2.0e+00,5.0e-01), RES(2.4497866312686415417e-1, 0.0)}, + {FN (arg), ARG(2.0e+00,-5.0e-01), RES(-2.4497866312686415417e-1, 0.0)}, + {FN (arg), ARG(-2.0e+00,5.0e-01), RES(2.8966139904629290843e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,-5.0e-01), RES(-2.8966139904629290843e0, 0.0)}, + {FN (arg), ARG(2.0e+00,1.0e+00), RES(4.6364760900080611621e-1, 0.0)}, + {FN (arg), ARG(2.0e+00,-1.0e+00), RES(-4.6364760900080611621e-1, 0.0)}, + {FN (arg), ARG(-2.0e+00,1.0e+00), RES(2.6779450445889871222e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,-1.0e+00), RES(-2.6779450445889871222e0, 0.0)}, + {FN (arg), ARG(2.0e+00,2.0e+00), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(2.0e+00,-2.0e+00), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(-2.0e+00,2.0e+00), RES(2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,-2.0e+00), RES(-2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(2.0e+00,8.3886080e+06), RES(1.5707960883763175177e0, 0.0)}, + {FN (arg), ARG(2.0e+00,-8.3886080e+06), RES(-1.5707960883763175177e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,8.3886080e+06), RES(1.5707965652134757208e0, 0.0)}, + {FN (arg), ARG(-2.0e+00,-8.3886080e+06), RES(-1.5707965652134757208e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,0.0e+00), RES(0e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,0.0e+00), RES(3.1415926535897932385e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.4210854715202003717e-14, 0.0)}, + {FN (arg), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(-1.4210854715202003717e-14, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(3.1415926535897790276e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(-3.1415926535897790276e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,5.0e-01), RES(5.9604644775390554414e-8, 0.0)}, + {FN (arg), ARG(8.3886080e+06,-5.0e-01), RES(-5.9604644775390554414e-8, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,5.0e-01), RES(3.1415925939851484631e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,-5.0e-01), RES(-3.1415925939851484631e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,1.0e+00), RES(1.1920928955078068531e-7, 0.0)}, + {FN (arg), ARG(8.3886080e+06,-1.0e+00), RES(-1.1920928955078068531e-7, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,1.0e+00), RES(3.1415925343805036877e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,-1.0e+00), RES(-3.1415925343805036877e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,2.0e+00), RES(2.3841857910155798249e-7, 0.0)}, + {FN (arg), ARG(8.3886080e+06,-2.0e+00), RES(-2.3841857910155798249e-7, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,2.0e+00), RES(3.1415924151712141369e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,-2.0e+00), RES(-3.1415924151712141369e0, 0.0)}, + {FN (arg), ARG(8.3886080e+06,8.3886080e+06), RES(7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(8.3886080e+06,-8.3886080e+06), RES(-7.8539816339744830962e-1, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,8.3886080e+06), RES(2.3561944901923449288e0, 0.0)}, + {FN (arg), ARG(-8.3886080e+06,-8.3886080e+06), RES(-2.3561944901923449288e0, 0.0)}, + {FN (abs), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (abs), ARG(0.0e+00,1.19209289550781250e-07), RES(1.1920928955078125e-7, 0.0)}, + {FN (abs), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.1920928955078125e-7, 0.0)}, + {FN (abs), ARG(0.0e+00,5.0e-01), RES(5e-1, 0.0)}, + {FN (abs), ARG(0.0e+00,-5.0e-01), RES(5e-1, 0.0)}, + {FN (abs), ARG(0.0e+00,1.0e+00), RES(1e0, 0.0)}, + {FN (abs), ARG(0.0e+00,-1.0e+00), RES(1e0, 0.0)}, + {FN (abs), ARG(0.0e+00,2.0e+00), RES(2e0, 0.0)}, + {FN (abs), ARG(0.0e+00,-2.0e+00), RES(2e0, 0.0)}, + {FN (abs), ARG(0.0e+00,8.3886080e+06), RES(8.388608e6, 0.0)}, + {FN (abs), ARG(0.0e+00,-8.3886080e+06), RES(8.388608e6, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,0.0e+00), RES(1.1920928955078125e-7, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,0.0e+00), RES(1.1920928955078125e-7, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(1.6858739404357612715e-7, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.6858739404357612715e-7, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(1.6858739404357612715e-7, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(1.6858739404357612715e-7, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,5.0e-01), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,-5.0e-01), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,5.0e-01), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,-5.0e-01), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,1.0e+00), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,-1.0e+00), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,1.0e+00), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,-1.0e+00), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,2.0e+00), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,-2.0e+00), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,2.0e+00), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,-2.0e+00), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,8.3886080e+06), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(5.0e-01,0.0e+00), RES(5e-1, 0.0)}, + {FN (abs), ARG(-5.0e-01,0.0e+00), RES(5e-1, 0.0)}, + {FN (abs), ARG(5.0e-01,1.19209289550781250e-07), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(5.0e-01,-1.19209289550781250e-07), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(-5.0e-01,1.19209289550781250e-07), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(-5.0e-01,-1.19209289550781250e-07), RES(5.0000000000001421085e-1, 0.0)}, + {FN (abs), ARG(5.0e-01,5.0e-01), RES(7.0710678118654752440e-1, 0.0)}, + {FN (abs), ARG(5.0e-01,-5.0e-01), RES(7.0710678118654752440e-1, 0.0)}, + {FN (abs), ARG(-5.0e-01,5.0e-01), RES(7.0710678118654752440e-1, 0.0)}, + {FN (abs), ARG(-5.0e-01,-5.0e-01), RES(7.0710678118654752440e-1, 0.0)}, + {FN (abs), ARG(5.0e-01,1.0e+00), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(5.0e-01,-1.0e+00), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(-5.0e-01,1.0e+00), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(-5.0e-01,-1.0e+00), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(5.0e-01,2.0e+00), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(5.0e-01,-2.0e+00), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(-5.0e-01,2.0e+00), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(-5.0e-01,-2.0e+00), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(5.0e-01,8.3886080e+06), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(5.0e-01,-8.3886080e+06), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(-5.0e-01,8.3886080e+06), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(-5.0e-01,-8.3886080e+06), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (abs), ARG(1.0e+00,1.19209289550781250e-07), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(1.0e+00,-1.19209289550781250e-07), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,1.19209289550781250e-07), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,-1.19209289550781250e-07), RES(1.0000000000000071054e0, 0.0)}, + {FN (abs), ARG(1.0e+00,5.0e-01), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(1.0e+00,-5.0e-01), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,5.0e-01), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,-5.0e-01), RES(1.1180339887498948482e0, 0.0)}, + {FN (abs), ARG(1.0e+00,1.0e+00), RES(1.4142135623730950488e0, 0.0)}, + {FN (abs), ARG(1.0e+00,-1.0e+00), RES(1.4142135623730950488e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,1.0e+00), RES(1.4142135623730950488e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,-1.0e+00), RES(1.4142135623730950488e0, 0.0)}, + {FN (abs), ARG(1.0e+00,2.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(1.0e+00,-2.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,2.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(-1.0e+00,-2.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(1.0e+00,8.3886080e+06), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(1.0e+00,-8.3886080e+06), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(-1.0e+00,8.3886080e+06), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(-1.0e+00,-8.3886080e+06), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(2.0e+00,0.0e+00), RES(2e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,0.0e+00), RES(2e0, 0.0)}, + {FN (abs), ARG(2.0e+00,1.19209289550781250e-07), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(2.0e+00,-1.19209289550781250e-07), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,1.19209289550781250e-07), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,-1.19209289550781250e-07), RES(2.0000000000000035527e0, 0.0)}, + {FN (abs), ARG(2.0e+00,5.0e-01), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(2.0e+00,-5.0e-01), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,5.0e-01), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,-5.0e-01), RES(2.0615528128088302749e0, 0.0)}, + {FN (abs), ARG(2.0e+00,1.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(2.0e+00,-1.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,1.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,-1.0e+00), RES(2.2360679774997896964e0, 0.0)}, + {FN (abs), ARG(2.0e+00,2.0e+00), RES(2.8284271247461900976e0, 0.0)}, + {FN (abs), ARG(2.0e+00,-2.0e+00), RES(2.8284271247461900976e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,2.0e+00), RES(2.8284271247461900976e0, 0.0)}, + {FN (abs), ARG(-2.0e+00,-2.0e+00), RES(2.8284271247461900976e0, 0.0)}, + {FN (abs), ARG(2.0e+00,8.3886080e+06), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(2.0e+00,-8.3886080e+06), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(-2.0e+00,8.3886080e+06), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(-2.0e+00,-8.3886080e+06), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,0.0e+00), RES(8.388608e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,0.0e+00), RES(8.388608e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,1.19209289550781250e-07), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(8.3886080e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,5.0e-01), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,-5.0e-01), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,5.0e-01), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,-5.0e-01), RES(8.3886080000000149012e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,1.0e+00), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,-1.0e+00), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,1.0e+00), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,-1.0e+00), RES(8.3886080000000596046e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,2.0e+00), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,-2.0e+00), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,2.0e+00), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,-2.0e+00), RES(8.3886080000002384186e6, 0.0)}, + {FN (abs), ARG(8.3886080e+06,8.3886080e+06), RES(1.1863283203031444111e7, 0.0)}, + {FN (abs), ARG(8.3886080e+06,-8.3886080e+06), RES(1.1863283203031444111e7, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,8.3886080e+06), RES(1.1863283203031444111e7, 0.0)}, + {FN (abs), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.1863283203031444111e7, 0.0)}, + {FN (abs2), ARG(0.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (abs2), ARG(0.0e+00,1.19209289550781250e-07), RES(1.4210854715202003717e-14, 0.0)}, + {FN (abs2), ARG(0.0e+00,-1.19209289550781250e-07), RES(1.4210854715202003717e-14, 0.0)}, + {FN (abs2), ARG(0.0e+00,5.0e-01), RES(2.5e-1, 0.0)}, + {FN (abs2), ARG(0.0e+00,-5.0e-01), RES(2.5e-1, 0.0)}, + {FN (abs2), ARG(0.0e+00,1.0e+00), RES(1e0, 0.0)}, + {FN (abs2), ARG(0.0e+00,-1.0e+00), RES(1e0, 0.0)}, + {FN (abs2), ARG(0.0e+00,2.0e+00), RES(4e0, 0.0)}, + {FN (abs2), ARG(0.0e+00,-2.0e+00), RES(4e0, 0.0)}, + {FN (abs2), ARG(0.0e+00,8.3886080e+06), RES(7.0368744177664e13, 0.0)}, + {FN (abs2), ARG(0.0e+00,-8.3886080e+06), RES(7.0368744177664e13, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,0.0e+00), RES(1.4210854715202003717e-14, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,0.0e+00), RES(1.4210854715202003717e-14, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(2.8421709430404007435e-14, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(2.8421709430404007435e-14, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(2.8421709430404007435e-14, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(2.8421709430404007435e-14, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,5.0e-01), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,-5.0e-01), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,5.0e-01), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,-5.0e-01), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,1.0e+00), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,-1.0e+00), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,1.0e+00), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,-1.0e+00), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,2.0e+00), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,-2.0e+00), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,2.0e+00), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,-2.0e+00), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,8.3886080e+06), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(5.0e-01,0.0e+00), RES(2.5e-1, 0.0)}, + {FN (abs2), ARG(-5.0e-01,0.0e+00), RES(2.5e-1, 0.0)}, + {FN (abs2), ARG(5.0e-01,1.19209289550781250e-07), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(5.0e-01,-1.19209289550781250e-07), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(-5.0e-01,1.19209289550781250e-07), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(-5.0e-01,-1.19209289550781250e-07), RES(2.5000000000001421085e-1, 0.0)}, + {FN (abs2), ARG(5.0e-01,5.0e-01), RES(5e-1, 0.0)}, + {FN (abs2), ARG(5.0e-01,-5.0e-01), RES(5e-1, 0.0)}, + {FN (abs2), ARG(-5.0e-01,5.0e-01), RES(5e-1, 0.0)}, + {FN (abs2), ARG(-5.0e-01,-5.0e-01), RES(5e-1, 0.0)}, + {FN (abs2), ARG(5.0e-01,1.0e+00), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(5.0e-01,-1.0e+00), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(-5.0e-01,1.0e+00), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(-5.0e-01,-1.0e+00), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(5.0e-01,2.0e+00), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(5.0e-01,-2.0e+00), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(-5.0e-01,2.0e+00), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(-5.0e-01,-2.0e+00), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(5.0e-01,8.3886080e+06), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(5.0e-01,-8.3886080e+06), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(-5.0e-01,8.3886080e+06), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(-5.0e-01,-8.3886080e+06), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,1.19209289550781250e-07), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,-1.19209289550781250e-07), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,1.19209289550781250e-07), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,-1.19209289550781250e-07), RES(1.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,5.0e-01), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,-5.0e-01), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,5.0e-01), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,-5.0e-01), RES(1.25e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,1.0e+00), RES(2e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,-1.0e+00), RES(2e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,1.0e+00), RES(2e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,-1.0e+00), RES(2e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,2.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,-2.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,2.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(-1.0e+00,-2.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(1.0e+00,8.3886080e+06), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(1.0e+00,-8.3886080e+06), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(-1.0e+00,8.3886080e+06), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(-1.0e+00,-8.3886080e+06), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(2.0e+00,0.0e+00), RES(4e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,0.0e+00), RES(4e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,1.19209289550781250e-07), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,-1.19209289550781250e-07), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,1.19209289550781250e-07), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,-1.19209289550781250e-07), RES(4.0000000000000142109e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,5.0e-01), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,-5.0e-01), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,5.0e-01), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,-5.0e-01), RES(4.25e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,1.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,-1.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,1.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,-1.0e+00), RES(5e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,2.0e+00), RES(8e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,-2.0e+00), RES(8e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,2.0e+00), RES(8e0, 0.0)}, + {FN (abs2), ARG(-2.0e+00,-2.0e+00), RES(8e0, 0.0)}, + {FN (abs2), ARG(2.0e+00,8.3886080e+06), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(2.0e+00,-8.3886080e+06), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(-2.0e+00,8.3886080e+06), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(-2.0e+00,-8.3886080e+06), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,0.0e+00), RES(7.0368744177664e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,0.0e+00), RES(7.0368744177664e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,1.19209289550781250e-07), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(7.03687441776640e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,5.0e-01), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,-5.0e-01), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,5.0e-01), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,-5.0e-01), RES(7.036874417766425e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,1.0e+00), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,-1.0e+00), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,1.0e+00), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,-1.0e+00), RES(7.0368744177665e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,2.0e+00), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,-2.0e+00), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,2.0e+00), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,-2.0e+00), RES(7.0368744177668e13, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,8.3886080e+06), RES(1.40737488355328e14, 0.0)}, + {FN (abs2), ARG(8.3886080e+06,-8.3886080e+06), RES(1.40737488355328e14, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,8.3886080e+06), RES(1.40737488355328e14, 0.0)}, + {FN (abs2), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.40737488355328e14, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,0.0e+00), RES(-1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,0.0e+00), RES(-1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(5.0e-01,0.0e+00), RES(-6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,0.0e+00), RES(-6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (logabs), ARG(-1.0e+00,0.0e+00), RES(0e0, 0.0)}, + {FN (logabs), ARG(1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(2.0e+00,0.0e+00), RES(6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,0.0e+00), RES(6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(-2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,0.0e+00), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,0.0e+00), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(0.0e+00,1.19209289550781250e-07), RES(-1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(0.0e+00,-1.19209289550781250e-07), RES(-1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(0.0e+00,5.0e-01), RES(-6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(0.0e+00,-5.0e-01), RES(-6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(0.0e+00,1.0e+00), RES(0e0, 0.0)}, + {FN (logabs), ARG(0.0e+00,-1.0e+00), RES(0e0, 0.0)}, + {FN (logabs), ARG(0.0e+00,2.0e+00), RES(6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(0.0e+00,-2.0e+00), RES(6.9314718055994530942e-1, 0.0)}, + {FN (logabs), ARG(0.0e+00,8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(0.0e+00,-8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-1.19209289550781250e-07), RES(-1.5595811562598769462e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-5.0e-01), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-1.0e+00), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-2.0e+00), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-1.19209289550781250e-07,-8.3886080e+06), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-1.19209289550781250e-07), RES(-6.9314718055991688771e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-5.0e-01), RES(-3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-1.0e+00), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-2.0e+00), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-5.0e-01,-8.3886080e+06), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.0e+00,1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-1.19209289550781250e-07), RES(7.1054273576009513716e-15, 0.0)}, + {FN (logabs), ARG(1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-5.0e-01), RES(1.1157177565710487788e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-1.0e+00), RES(3.4657359027997265471e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-2.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-1.0e+00,-8.3886080e+06), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-1.19209289550781250e-07), RES(6.9314718055994708577e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-5.0e-01), RES(7.2345949146816273071e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-1.0e+00), RES(8.0471895621705018730e-1, 0.0)}, + {FN (logabs), ARG(2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(-2.0e+00,2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-2.0e+00), RES(1.0397207708399179641e0, 0.0)}, + {FN (logabs), ARG(2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-2.0e+00,-8.3886080e+06), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-1.19209289550781250e-07), RES(1.5942385152878742117e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-5.0e-01), RES(1.5942385152878743893e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-1.0e+00), RES(1.5942385152878749222e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-2.0e+00), RES(1.5942385152878770538e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, + {FN (logabs), ARG(-8.3886080e+06,-8.3886080e+06), RES(1.6288958743158714771e1, 0.0)}, diff --git a/software/gsl-1.15/complex/results2.h b/software/gsl-1.15/complex/results2.h new file mode 100644 index 000000000..f8b80f5b9 --- /dev/null +++ b/software/gsl-1.15/complex/results2.h @@ -0,0 +1,42 @@ + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(0.0e+00,1.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(-1.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(0.0e+00,-1.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(5.0e-01,1.00000000000000005551e-01), RES(1e0, 0.0)}, + {FN (pow), ARG(1.0e+00,0.0e+00), ARG(5.0e-01,-1.00000000000000005551e-01), RES(1e0, 0.0)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(1.0e+00,0.0e+00), RES(0, 1)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(0.0e+00,1.0e+00), RES(2.0787957635076190855e-1, 0.0)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(-1.0e+00,0.0e+00), RES(0, -1)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(0.0e+00,-1.0e+00), RES(4.8104773809653516555e0, 0.0)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(5.0e-01,1.00000000000000005551e-01), RES(6.0431891044739184057e-1, 6.0431891044739184057e-1)}, + {FN (pow), ARG(0.0e+00,1.0e+00), ARG(5.0e-01,-1.00000000000000005551e-01), RES(8.2737771622906514822e-1, 8.2737771622906514822e-1)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(1.0e+00,0.0e+00), RES(-1e0, 0.0)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(0.0e+00,1.0e+00), RES(4.3213918263772249774e-2, 0.0)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(-1.0e+00,0.0e+00), RES(-1e0, 0.0)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(0.0e+00,-1.0e+00), RES(2.3140692632779269006e1, 0.0)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(5.0e-01,1.00000000000000005551e-01), RES(0, 7.3040269104864559813e-1)}, + {FN (pow), ARG(-1.0e+00,0.0e+00), ARG(5.0e-01,-1.00000000000000005551e-01), RES(0, 1.3691077706248469087e0)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(1.0e+00,0.0e+00), RES(0, -1)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(0.0e+00,1.0e+00), RES(4.8104773809653516555e0, 0.0)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(-1.0e+00,0.0e+00), RES(0, 1)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(0.0e+00,-1.0e+00), RES(2.0787957635076190855e-1, 0.0)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(5.0e-01,1.00000000000000005551e-01), RES(8.2737771622906514822e-1, -8.2737771622906514822e-1)}, + {FN (pow), ARG(0.0e+00,-1.0e+00), ARG(5.0e-01,-1.00000000000000005551e-01), RES(6.0431891044739184057e-1, -6.0431891044739184057e-1)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(1.0e+00,0.0e+00), RES(5e-1, 1.0000000000000000555e-1)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(0.0e+00,1.0e+00), RES(6.4160554864378080418e-1, -5.1201864456768275590e-1)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(-1.0e+00,0.0e+00), RES(1.9230769230769230687e0, -3.8461538461538463509e-1)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(0.0e+00,-1.0e+00), RES(9.5219021866126714108e-1, 7.5987364224031834571e-1)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(5.0e-01,1.00000000000000005551e-01), RES(6.9977300530987816719e-1, 2.1940939105372143160e-2)}, + {FN (pow), ARG(5.0e-01,1.00000000000000005551e-01), ARG(5.0e-01,-1.00000000000000005551e-01), RES(7.1829191470060938876e-1, 1.2038189555821612762e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(0.0e+00,0.0e+00), RES(1e0, 0.0)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(1.0e+00,0.0e+00), RES(5e-1, -1.0000000000000000555e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(0.0e+00,1.0e+00), RES(9.5219021866126714108e-1, -7.5987364224031834571e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(-1.0e+00,0.0e+00), RES(1.9230769230769230687e0, 3.8461538461538463509e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(0.0e+00,-1.0e+00), RES(6.4160554864378080418e-1, 5.1201864456768275590e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(5.0e-01,1.00000000000000005551e-01), RES(7.1829191470060938876e-1, -1.2038189555821612762e-1)}, + {FN (pow), ARG(5.0e-01,-1.00000000000000005551e-01), ARG(5.0e-01,-1.00000000000000005551e-01), RES(6.9977300530987816719e-1, -2.1940939105372143160e-2)}, diff --git a/software/gsl-1.15/complex/results_real.h b/software/gsl-1.15/complex/results_real.h new file mode 100644 index 000000000..356f6f589 --- /dev/null +++ b/software/gsl-1.15/complex/results_real.h @@ -0,0 +1,115 @@ + {FN (sqrt_real), -1.0e+01, RES(0, 3.1622776601683793320e0)}, + {FN (sqrt_real), -2.0e+00, RES(0, 1.4142135623730950488e0)}, + {FN (sqrt_real), -1.0e+00, RES(0, 1)}, + {FN (sqrt_real), -7.50e-01, RES(0, 8.6602540378443864676e-1)}, + {FN (sqrt_real), -5.0e-01, RES(0, 7.0710678118654752440e-1)}, + {FN (sqrt_real), -1.250e-01, RES(0, 3.5355339059327376220e-1)}, + {FN (sqrt_real), -3.45266983001243932001e-04, RES(0, 1.8581361171917517303e-2)}, + {FN (sqrt_real), -1.19209289550781250e-07, RES(0, 3.4526698300124390840e-4)}, + {FN (sqrt_real), 0.0e+00, RES(0e0, 0.0)}, + {FN (sqrt_real), 1.19209289550781250e-07, RES(3.4526698300124390840e-4, 0.0)}, + {FN (sqrt_real), 3.45266983001243932001e-04, RES(1.8581361171917517303e-2, 0.0)}, + {FN (sqrt_real), 1.250e-01, RES(3.5355339059327376220e-1, 0.0)}, + {FN (sqrt_real), 5.0e-01, RES(7.0710678118654752440e-1, 0.0)}, + {FN (sqrt_real), 7.50e-01, RES(8.6602540378443864676e-1, 0.0)}, + {FN (sqrt_real), 1.0e+00, RES(1e0, 0.0)}, + {FN (sqrt_real), 2.0e+00, RES(1.4142135623730950488e0, 0.0)}, + {FN (sqrt_real), 1.0e+01, RES(3.1622776601683793320e0, 0.0)}, + {FN (arcsin_real), -1.0e+01, RES(-1.5707963267948966192e0, 2.9932228461263808979e0)}, + {FN (arcsin_real), -2.0e+00, RES(-1.5707963267948966192e0, 1.3169578969248167086e0)}, + {FN (arcsin_real), -1.0e+00, RES(-1.5707963267948966192e0, 0.0)}, + {FN (arcsin_real), -7.50e-01, RES(-8.4806207898148100805e-1, 0.0)}, + {FN (arcsin_real), -5.0e-01, RES(-5.2359877559829887308e-1, 0.0)}, + {FN (arcsin_real), -1.250e-01, RES(-1.2532783116806539687e-1, 0.0)}, + {FN (arcsin_real), -3.45266983001243932001e-04, RES(-3.4526698986108292481e-4, 0.0)}, + {FN (arcsin_real), -1.19209289550781250e-07, RES(-1.1920928955078153234e-7, 0.0)}, + {FN (arcsin_real), 0.0e+00, RES(0e0, 0.0)}, + {FN (arcsin_real), 1.19209289550781250e-07, RES(1.1920928955078153234e-7, 0.0)}, + {FN (arcsin_real), 3.45266983001243932001e-04, RES(3.4526698986108292481e-4, 0.0)}, + {FN (arcsin_real), 1.250e-01, RES(1.2532783116806539687e-1, 0.0)}, + {FN (arcsin_real), 5.0e-01, RES(5.2359877559829887308e-1, 0.0)}, + {FN (arcsin_real), 7.50e-01, RES(8.4806207898148100805e-1, 0.0)}, + {FN (arcsin_real), 1.0e+00, RES(1.5707963267948966192e0, 0.0)}, + {FN (arcsin_real), 2.0e+00, RES(1.5707963267948966192e0, -1.3169578969248167086e0)}, + {FN (arcsin_real), 1.0e+01, RES(1.5707963267948966192e0, -2.9932228461263808979e0)}, + {FN (arccos_real), -1.0e+01, RES(3.1415926535897932385e0, -2.9932228461263808979e0)}, + {FN (arccos_real), -2.0e+00, RES(3.1415926535897932385e0, -1.3169578969248167086e0)}, + {FN (arccos_real), -1.0e+00, RES(3.1415926535897932385e0, 0.0)}, + {FN (arccos_real), -7.50e-01, RES(2.4188584057763776273e0, 0.0)}, + {FN (arccos_real), -5.0e-01, RES(2.0943951023931954923e0, 0.0)}, + {FN (arccos_real), -1.250e-01, RES(1.6961241579629620161e0, 0.0)}, + {FN (arccos_real), -3.45266983001243932001e-04, RES(1.5711415937847577022e0, 0.0)}, + {FN (arccos_real), -1.19209289550781250e-07, RES(1.570796446004186170e0, 0.0)}, + {FN (arccos_real), 0.0e+00, RES(1.5707963267948966192e0, 0.0)}, + {FN (arccos_real), 1.19209289550781250e-07, RES(1.5707962075856070684e0, 0.0)}, + {FN (arccos_real), 3.45266983001243932001e-04, RES(1.5704510598050355363e0, 0.0)}, + {FN (arccos_real), 1.250e-01, RES(1.4454684956268312224e0, 0.0)}, + {FN (arccos_real), 5.0e-01, RES(1.0471975511965977462e0, 0.0)}, + {FN (arccos_real), 7.50e-01, RES(7.2273424781341561118e-1, 0.0)}, + {FN (arccos_real), 1.0e+00, RES(0e0, 0.0)}, + {FN (arccos_real), 2.0e+00, RES(0, 1.3169578969248167086e0)}, + {FN (arccos_real), 1.0e+01, RES(0, 2.9932228461263808979e0)}, + {FN (arccosh_real), -1.0e+01, RES(2.9932228461263808979e0, 3.1415926535897932385e0)}, + {FN (arccosh_real), -2.0e+00, RES(1.3169578969248167086e0, 3.1415926535897932385e0)}, + {FN (arccosh_real), -1.0e+00, RES(0, 3.1415926535897932385e0)}, + {FN (arccosh_real), -7.50e-01, RES(0, 2.4188584057763776273e0)}, + {FN (arccosh_real), -5.0e-01, RES(0, 2.0943951023931954923e0)}, + {FN (arccosh_real), -1.250e-01, RES(0, 1.6961241579629620161e0)}, + {FN (arccosh_real), -3.45266983001243932001e-04, RES(0, 1.5711415937847577022e0)}, + {FN (arccosh_real), -1.19209289550781250e-07, RES(0, 1.570796446004186170e0)}, + {FN (arccosh_real), 0.0e+00, RES(0, 1.5707963267948966192e0)}, + {FN (arccosh_real), 1.19209289550781250e-07, RES(0, 1.5707962075856070684e0)}, + {FN (arccosh_real), 3.45266983001243932001e-04, RES(0, 1.5704510598050355363e0)}, + {FN (arccosh_real), 1.250e-01, RES(0, 1.4454684956268312224e0)}, + {FN (arccosh_real), 5.0e-01, RES(0, 1.0471975511965977462e0)}, + {FN (arccosh_real), 7.50e-01, RES(0, 7.2273424781341561118e-1)}, + {FN (arccosh_real), 1.0e+00, RES(0e0, 0.0)}, + {FN (arccosh_real), 2.0e+00, RES(1.3169578969248167086e0, 0.0)}, + {FN (arccosh_real), 1.0e+01, RES(2.9932228461263808979e0, 0.0)}, + {FN (arctanh_real), -1.0e+01, RES(-1.0033534773107558064e-1, 1.5707963267948966192e0)}, + {FN (arctanh_real), -2.0e+00, RES(-5.4930614433405484570e-1, 1.5707963267948966192e0)}, + {FN (arctanh_real), -7.50e-01, RES(-9.7295507452765665255e-1, 0.0)}, + {FN (arctanh_real), -5.0e-01, RES(-5.4930614433405484570e-1, 0.0)}, + {FN (arctanh_real), -1.250e-01, RES(-1.2565721414045303884e-1, 0.0)}, + {FN (arctanh_real), -3.45266983001243932001e-04, RES(-3.4526699672092216295e-4, 0.0)}, + {FN (arctanh_real), -1.19209289550781250e-07, RES(-1.1920928955078181469e-7, 0.0)}, + {FN (arctanh_real), 0.0e+00, RES(0e0, 0.0)}, + {FN (arctanh_real), 1.19209289550781250e-07, RES(1.1920928955078181469e-7, 0.0)}, + {FN (arctanh_real), 3.45266983001243932001e-04, RES(3.4526699672092216295e-4, 0.0)}, + {FN (arctanh_real), 1.250e-01, RES(1.2565721414045303884e-1, 0.0)}, + {FN (arctanh_real), 5.0e-01, RES(5.4930614433405484570e-1, 0.0)}, + {FN (arctanh_real), 7.50e-01, RES(9.7295507452765665255e-1, 0.0)}, + {FN (arctanh_real), 2.0e+00, RES(5.4930614433405484570e-1, -1.5707963267948966192e0)}, + {FN (arctanh_real), 1.0e+01, RES(1.0033534773107558064e-1, -1.5707963267948966192e0)}, + {FN (arccsc_real), -1.0e+01, RES(-1.0016742116155979635e-1, 0.0)}, + {FN (arccsc_real), -2.0e+00, RES(-5.2359877559829887308e-1, 0.0)}, + {FN (arccsc_real), -1.0e+00, RES(-1.5707963267948966192e0, 0.0)}, + {FN (arccsc_real), -7.50e-01, RES(-1.5707963267948966192e0, 7.9536546122390563053e-1)}, + {FN (arccsc_real), -5.0e-01, RES(-1.5707963267948966192e0, 1.3169578969248167086e0)}, + {FN (arccsc_real), -1.250e-01, RES(-1.5707963267948966192e0, 2.7686593833135738327e0)}, + {FN (arccsc_real), -3.45266983001243932001e-04, RES(-1.5707963267948966192e0, 8.6643397271969925794e0)}, + {FN (arccsc_real), -1.19209289550781250e-07, RES(-1.5707963267948966192e0, 1.6635532333438683873e1)}, + {FN (arccsc_real), 1.19209289550781250e-07, RES(1.5707963267948966192e0, -1.6635532333438683873e1)}, + {FN (arccsc_real), 3.45266983001243932001e-04, RES(1.5707963267948966192e0, -8.6643397271969925794e0)}, + {FN (arccsc_real), 1.250e-01, RES(1.5707963267948966192e0, -2.7686593833135738327e0)}, + {FN (arccsc_real), 5.0e-01, RES(1.5707963267948966192e0, -1.3169578969248167086e0)}, + {FN (arccsc_real), 7.50e-01, RES(1.5707963267948966192e0, -7.9536546122390563053e-1)}, + {FN (arccsc_real), 1.0e+00, RES(1.5707963267948966192e0, 0.0)}, + {FN (arccsc_real), 2.0e+00, RES(5.2359877559829887308e-1, 0.0)}, + {FN (arccsc_real), 1.0e+01, RES(1.0016742116155979635e-1, 0.0)}, + {FN (arcsec_real), -1.0e+01, RES(1.6709637479564564156e0, 0.0)}, + {FN (arcsec_real), -2.0e+00, RES(2.0943951023931954923e0, 0.0)}, + {FN (arcsec_real), -1.0e+00, RES(3.1415926535897932385e0, 0.0)}, + {FN (arcsec_real), -7.50e-01, RES(3.1415926535897932385e0, -7.9536546122390563053e-1)}, + {FN (arcsec_real), -5.0e-01, RES(3.1415926535897932385e0, -1.3169578969248167086e0)}, + {FN (arcsec_real), -1.250e-01, RES(3.1415926535897932385e0, -2.7686593833135738327e0)}, + {FN (arcsec_real), -3.45266983001243932001e-04, RES(3.1415926535897932385e0, -8.6643397271969925794e0)}, + {FN (arcsec_real), -1.19209289550781250e-07, RES(3.1415926535897932385e0, -1.6635532333438683873e1)}, + {FN (arcsec_real), 1.19209289550781250e-07, RES(0, 1.6635532333438683873e1)}, + {FN (arcsec_real), 3.45266983001243932001e-04, RES(0, 8.6643397271969925794e0)}, + {FN (arcsec_real), 1.250e-01, RES(0, 2.7686593833135738327e0)}, + {FN (arcsec_real), 5.0e-01, RES(0, 1.3169578969248167086e0)}, + {FN (arcsec_real), 7.50e-01, RES(0, 7.9536546122390563053e-1)}, + {FN (arcsec_real), 1.0e+00, RES(0e0, 0.0)}, + {FN (arcsec_real), 2.0e+00, RES(1.0471975511965977462e0, 0.0)}, + {FN (arcsec_real), 1.0e+01, RES(1.4706289056333368229e0, 0.0)}, diff --git a/software/gsl-1.15/complex/results_zreal.h b/software/gsl-1.15/complex/results_zreal.h new file mode 100644 index 000000000..233802589 --- /dev/null +++ b/software/gsl-1.15/complex/results_zreal.h @@ -0,0 +1,28 @@ + {FN (pow_real), ARG(0.0e+00,0.0e+00), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,0.0e+00), 1.0e+00, RES(0e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,0.0e+00), 5.0e-01, RES(0e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,0.0e+00), 2.0e+00, RES(0e0, 0.0)}, + {FN (pow_real), ARG(1.0e+00,0.0e+00), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(1.0e+00,0.0e+00), 1.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(1.0e+00,0.0e+00), 5.0e-01, RES(1e0, 0.0)}, + {FN (pow_real), ARG(1.0e+00,0.0e+00), 2.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,1.0e+00), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,1.0e+00), 1.0e+00, RES(0, 1)}, + {FN (pow_real), ARG(0.0e+00,1.0e+00), 5.0e-01, RES(7.0710678118654752440e-1, 7.0710678118654752440e-1)}, + {FN (pow_real), ARG(0.0e+00,1.0e+00), 2.0e+00, RES(-1e0, 0.0)}, + {FN (pow_real), ARG(-1.0e+00,0.0e+00), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(-1.0e+00,0.0e+00), 1.0e+00, RES(-1e0, 0.0)}, + {FN (pow_real), ARG(-1.0e+00,0.0e+00), 5.0e-01, RES(0, 1)}, + {FN (pow_real), ARG(-1.0e+00,0.0e+00), 2.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,-1.0e+00), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(0.0e+00,-1.0e+00), 1.0e+00, RES(0, -1)}, + {FN (pow_real), ARG(0.0e+00,-1.0e+00), 5.0e-01, RES(7.0710678118654752440e-1, -7.0710678118654752440e-1)}, + {FN (pow_real), ARG(0.0e+00,-1.0e+00), 2.0e+00, RES(-1e0, 0.0)}, + {FN (pow_real), ARG(5.0e-01,1.00000000000000005551e-01), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(5.0e-01,1.00000000000000005551e-01), 1.0e+00, RES(5e-1, 1.0000000000000000555e-1)}, + {FN (pow_real), ARG(5.0e-01,1.00000000000000005551e-01), 5.0e-01, RES(7.1059902594898006379e-1, 7.0363169908974695409e-2)}, + {FN (pow_real), ARG(5.0e-01,1.00000000000000005551e-01), 2.0e+00, RES(2.3999999999999999889e-1, 1.0000000000000000555e-1)}, + {FN (pow_real), ARG(5.0e-01,-1.00000000000000005551e-01), 0.0e+00, RES(1e0, 0.0)}, + {FN (pow_real), ARG(5.0e-01,-1.00000000000000005551e-01), 1.0e+00, RES(5e-1, -1.0000000000000000555e-1)}, + {FN (pow_real), ARG(5.0e-01,-1.00000000000000005551e-01), 5.0e-01, RES(7.1059902594898006379e-1, -7.0363169908974695409e-2)}, + {FN (pow_real), ARG(5.0e-01,-1.00000000000000005551e-01), 2.0e+00, RES(2.3999999999999999889e-1, -1.0000000000000000555e-1)}, diff --git a/software/gsl-1.15/complex/test.c b/software/gsl-1.15/complex/test.c new file mode 100644 index 000000000..46b5981f1 --- /dev/null +++ b/software/gsl-1.15/complex/test.c @@ -0,0 +1,256 @@ +/* complex/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +struct f +{ + char *name; + double (*f) (gsl_complex z); + double x; + double y; + double fx; + double fy; +}; + +struct fz +{ + char *name; + gsl_complex (*f) (gsl_complex z); + double x; + double y; + double fx; + double fy; +}; + +struct fzz +{ + char *name; + gsl_complex (*f) (gsl_complex z1, gsl_complex z2); + double x1; + double y1; + double x2; + double y2; + double fx; + double fy; +}; + + +struct freal +{ + char *name; + gsl_complex (*f) (double x); + double x; + double fx; + double fy; +}; + +struct fzreal +{ + char *name; + gsl_complex (*f) (gsl_complex z, double a); + double x; + double y; + double a; + double fx; + double fy; +}; + +#define FN(x) "gsl_complex_" #x, gsl_complex_ ## x +#define ARG(x,y) x, y +#define RES(x,y) x, y + +struct f list[] = +{ +#include "results1.h" + {"", 0, 0, 0, 0, 0} +}; + + +struct fz listz[] = +{ +#include "results.h" + {"", 0, 0, 0, 0, 0} +}; + +struct fzz listzz[] = +{ + {FN (pow), ARG(0.0,0.0), ARG(0.0,0.0), RES(1.0, 0.0)}, +#include "results2.h" + {"", 0, 0, 0, 0, 0, 0, 0} +}; + +struct freal listreal[] = +{ +#include "results_real.h" + {"", 0, 0, 0, 0} +}; + + +struct fzreal listzreal[] = +{ +#include "results_zreal.h" + {"", 0, 0, 0, 0} +}; + + +#ifndef TEST_FACTOR +#ifdef RELEASED +#define TEST_FACTOR 100.0 +#else +#define TEST_FACTOR 1.0 +#endif +#endif + +int +main (void) +{ + size_t i = 0; + const double tol = TEST_FACTOR * 10 * GSL_DBL_EPSILON; + const double tolf = TEST_FACTOR * 10 * GSL_FLT_EPSILON; + + gsl_ieee_env_setup(); + + + for (i = 0 ; i < 10; i++) + { + double r = (i - 5.0) * 0.3 ; + double t = 2.0 * M_PI * i / 5 ; + double x = r * cos(t), y = r * sin(t) ; + gsl_complex z = gsl_complex_polar (r, t) ; + gsl_test_rel (GSL_REAL(z), x, tol, "gsl_complex_polar real part at (r=%g,t=%g)", r, t); + gsl_test_rel (GSL_IMAG(z), y, tol, "gsl_complex_polar imag part at (r=%g,t=%g)", r, t); + } + + i = 0; + + while (list[i].f) + { + struct f t = list[i]; + gsl_complex z = gsl_complex_rect (t.x, t.y); + double f = (t.f) (z); + gsl_test_rel (f, t.fx, tol, "%s at (%g,%g)", t.name, t.x, t.y); + i++; + } + + i = 0; + + while (listz[i].f) + { + struct fz t = listz[i]; + gsl_complex z = gsl_complex_rect (t.x, t.y); + gsl_complex fz = (t.f) (z); + double fx = GSL_REAL (fz), fy = GSL_IMAG (fz); + +#ifdef DEBUG + printf("x = "); gsl_ieee_fprintf_double (stdout, &t.x); printf("\n"); + printf("y = "); gsl_ieee_fprintf_double (stdout, &t.y); printf("\n"); + printf("fx = "); gsl_ieee_fprintf_double (stdout, &fx); printf("\n"); + printf("ex = "); gsl_ieee_fprintf_double (stdout, &t.fx); printf("\n"); + printf("fy = "); gsl_ieee_fprintf_double (stdout, &fy); printf("\n"); + printf("ey = "); gsl_ieee_fprintf_double (stdout, &t.fy); printf("\n"); +#endif + + gsl_test_rel (fx, t.fx, tol, "%s real part at (%g,%g)", t.name, t.x, t.y); + gsl_test_rel (fy, t.fy, tol, "%s imag part at (%g,%g)", t.name, t.x, t.y); + i++; + } + + i = 0; + + while (listzz[i].f) + { + struct fzz t = listzz[i]; + gsl_complex z1 = gsl_complex_rect (t.x1, t.y1); + gsl_complex z2 = gsl_complex_rect (t.x2, t.y2); + gsl_complex fz = (t.f) (z1, z2); + double fx = GSL_REAL (fz), fy = GSL_IMAG (fz); + +#ifdef DEBUG + printf("x1 = "); gsl_ieee_fprintf_double (stdout, &t.x1); printf("\n"); + printf("y1 = "); gsl_ieee_fprintf_double (stdout, &t.y1); printf("\n"); + printf("x2 = "); gsl_ieee_fprintf_double (stdout, &t.x2); printf("\n"); + printf("y2 = "); gsl_ieee_fprintf_double (stdout, &t.y2); printf("\n"); + printf("fx = "); gsl_ieee_fprintf_double (stdout, &fx); printf("\n"); + printf("ex = "); gsl_ieee_fprintf_double (stdout, &t.fx); printf("\n"); + printf("fy = "); gsl_ieee_fprintf_double (stdout, &fy); printf("\n"); + printf("ey = "); gsl_ieee_fprintf_double (stdout, &t.fy); printf("\n"); +#endif + + gsl_test_rel (fx, t.fx, tolf, "%s real part at (%g,%g;%g,%g)", t.name, t.x1, t.y1, t.x2, t.y2); + gsl_test_rel (fy, t.fy, tolf, "%s imag part at (%g,%g;%g,%g)", t.name, t.x1, t.y1, t.x2, t.y2); + i++; + } + + + i = 0; + + while (listreal[i].f) + { + struct freal t = listreal[i]; + gsl_complex fz = (t.f) (t.x); + double fx = GSL_REAL (fz), fy = GSL_IMAG (fz); + +#ifdef DEBUG + printf("x = "); gsl_ieee_fprintf_double (stdout, &t.x); printf("\n"); + printf("fx = "); gsl_ieee_fprintf_double (stdout, &fx); printf("\n"); + printf("ex = "); gsl_ieee_fprintf_double (stdout, &t.fx); printf("\n"); + printf("fy = "); gsl_ieee_fprintf_double (stdout, &fy); printf("\n"); + printf("ey = "); gsl_ieee_fprintf_double (stdout, &t.fy); printf("\n"); +#endif + + gsl_test_rel (fx, t.fx, tol, "%s real part at (%g,0)", t.name, t.x); + gsl_test_rel (fy, t.fy, tol, "%s imag part at (%g,0)", t.name, t.x); + i++; + } + + + i = 0; + + while (listzreal[i].f) + { + struct fzreal t = listzreal[i]; + gsl_complex z = gsl_complex_rect (t.x, t.y); + gsl_complex fz = (t.f) (z, t.a); + double fx = GSL_REAL (fz), fy = GSL_IMAG (fz); + +#ifdef DEBUG + printf("x = "); gsl_ieee_fprintf_double (stdout, &t.x); printf("\n"); + printf("y = "); gsl_ieee_fprintf_double (stdout, &t.y); printf("\n"); + printf("a = "); gsl_ieee_fprintf_double (stdout, &t.a); printf("\n"); + printf("fx = "); gsl_ieee_fprintf_double (stdout, &fx); printf("\n"); + printf("ex = "); gsl_ieee_fprintf_double (stdout, &t.fx); printf("\n"); + printf("fy = "); gsl_ieee_fprintf_double (stdout, &fy); printf("\n"); + printf("ey = "); gsl_ieee_fprintf_double (stdout, &t.fy); printf("\n"); +#endif + + gsl_test_rel (fx, t.fx, tol, "%s real part at (%g,0)", t.name, t.x); + gsl_test_rel (fy, t.fy, tol, "%s imag part at (%g,0)", t.name, t.x); + i++; + } + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/config.guess b/software/gsl-1.15/config.guess new file mode 100755 index 000000000..dc84c68ef --- /dev/null +++ b/software/gsl-1.15/config.guess @@ -0,0 +1,1501 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/software/gsl-1.15/config.h b/software/gsl-1.15/config.h new file mode 100644 index 000000000..cbb8a836a --- /dev/null +++ b/software/gsl-1.15/config.h @@ -0,0 +1,309 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Disable deprecated functions and enums while building */ +#define GSL_DISABLE_DEPRECATED 1 + +/* Define if you have inline with C99 behavior */ +#define HAVE_C99_INLINE 1 + +/* Define to 1 if you have the declaration of `acosh', and to 0 if you don't. + */ +#define HAVE_DECL_ACOSH 1 + +/* Define to 1 if you have the declaration of `asinh', and to 0 if you don't. + */ +#define HAVE_DECL_ASINH 1 + +/* Define to 1 if you have the declaration of `atanh', and to 0 if you don't. + */ +#define HAVE_DECL_ATANH 1 + +/* Define to 1 if you have the declaration of `expm1', and to 0 if you don't. + */ +#define HAVE_DECL_EXPM1 1 + +/* Define to 1 if you have the declaration of `feenableexcept', and to 0 if + you don't. */ +#define HAVE_DECL_FEENABLEEXCEPT 0 + +/* Define to 1 if you have the declaration of `fesettrapenable', and to 0 if + you don't. */ +#define HAVE_DECL_FESETTRAPENABLE 0 + +/* Define to 1 if you have the declaration of `finite', and to 0 if you don't. + */ +#define HAVE_DECL_FINITE 1 + +/* Define to 1 if you have the declaration of `fprnd_t', and to 0 if you + don't. */ +#define HAVE_DECL_FPRND_T 0 + +/* Define to 1 if you have the declaration of `frexp', and to 0 if you don't. + */ +#define HAVE_DECL_FREXP 1 + +/* Define to 1 if you have the declaration of `hypot', and to 0 if you don't. + */ +#define HAVE_DECL_HYPOT 1 + +/* Define to 1 if you have the declaration of `isfinite', and to 0 if you + don't. */ +#define HAVE_DECL_ISFINITE 1 + +/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. + */ +#define HAVE_DECL_ISINF 1 + +/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. + */ +#define HAVE_DECL_ISNAN 1 + +/* Define to 1 if you have the declaration of `ldexp', and to 0 if you don't. + */ +#define HAVE_DECL_LDEXP 1 + +/* Define to 1 if you have the declaration of `log1p', and to 0 if you don't. + */ +#define HAVE_DECL_LOG1P 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h */ +#define HAVE_EXIT_SUCCESS_AND_FAILURE 1 + +/* Defined on architectures with excess floating-point precision */ +#define HAVE_EXTENDED_PRECISION_REGISTERS 1 + +/* Define if x86 processor has sse extensions. */ +/* #undef HAVE_FPU_X86_SSE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define this if IEEE comparisons work correctly (e.g. NaN != NaN) */ +#define HAVE_IEEE_COMPARISONS 1 + +/* Define this if IEEE denormalized numbers are available */ +#define HAVE_IEEE_DENORMALS 1 + +/* Define if you have inline */ +#define HAVE_INLINE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define this if printf can handle %Lf for long double */ +#define HAVE_PRINTF_LONGDOUBLE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define if you need to hide the static definitions of inline functions */ +/* #undef HIDE_INLINE_STATIC */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "gsl" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gsl" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gsl 1.15" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gsl" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.15" + +/* Defined if this is an official release */ +#define RELEASED /**/ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.15" + +/* Define to 1 if type `char' is unsigned and you are not using gcc. */ +#ifndef __CHAR_UNSIGNED__ +/* # undef __CHAR_UNSIGNED__ */ +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ + +/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */ +#if !HAVE_EXIT_SUCCESS_AND_FAILURE +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 +#endif + +/* Define one of these if you have a known IEEE arithmetic interface */ +/* #undef HAVE_GNUSPARC_IEEE_INTERFACE */ +/* #undef HAVE_GNUM68K_IEEE_INTERFACE */ +/* #undef HAVE_GNUPPC_IEEE_INTERFACE */ +/* #undef HAVE_GNUX86_IEEE_INTERFACE */ +/* #undef HAVE_SUNOS4_IEEE_INTERFACE */ +/* #undef HAVE_SOLARIS_IEEE_INTERFACE */ +/* #undef HAVE_HPUX11_IEEE_INTERFACE */ +/* #undef HAVE_HPUX_IEEE_INTERFACE */ +/* #undef HAVE_TRU64_IEEE_INTERFACE */ +/* #undef HAVE_IRIX_IEEE_INTERFACE */ +/* #undef HAVE_AIX_IEEE_INTERFACE */ +/* #undef HAVE_FREEBSD_IEEE_INTERFACE */ +/* #undef HAVE_OS2EMX_IEEE_INTERFACE */ +/* #undef HAVE_NETBSD_IEEE_INTERFACE */ +/* #undef HAVE_OPENBSD_IEEE_INTERFACE */ +/* #undef HAVE_DARWIN_IEEE_INTERFACE */ +/* #undef HAVE_DARWIN86_IEEE_INTERFACE */ + +/* Define a rounding function which moves extended precision values + out of registers and rounds them to double-precision. This should + be used *sparingly*, in places where it is necessary to keep + double-precision rounding for critical expressions while running in + extended precision. For example, the following code should ensure + exact equality, even when extended precision registers are in use, + + double q = GSL_COERCE_DBL(3.0/7.0) ; + if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ; + + It carries a penalty even when the program is running in double + precision mode unless you compile a separate version of the + library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */ + +#if HAVE_EXTENDED_PRECISION_REGISTERS +#define GSL_COERCE_DBL(x) (gsl_coerce_double(x)) +#else +#define GSL_COERCE_DBL(x) (x) +#endif + +/* Substitute gsl functions for missing system functions */ + +#if !HAVE_DECL_HYPOT +#define hypot gsl_hypot +#endif + +#if !HAVE_DECL_LOG1P +#define log1p gsl_log1p +#endif + +#if !HAVE_DECL_EXPM1 +#define expm1 gsl_expm1 +#endif + +#if !HAVE_DECL_ACOSH +#define acosh gsl_acosh +#endif + +#if !HAVE_DECL_ASINH +#define asinh gsl_asinh +#endif + +#if !HAVE_DECL_ATANH +#define atanh gsl_atanh +#endif + +#if !HAVE_DECL_LDEXP +#define ldexp gsl_ldexp +#endif + +#if !HAVE_DECL_FREXP +#define frexp gsl_frexp +#endif + +#if !HAVE_DECL_ISINF +#define isinf gsl_isinf +#endif + +#if !HAVE_DECL_ISFINITE +#define isfinite gsl_finite +#endif + +#if !HAVE_DECL_FINITE +#define finite gsl_finite +#endif + +#if !HAVE_DECL_ISNAN +#define isnan gsl_isnan +#endif + +#ifdef __GNUC__ +#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0); +#else +#define DISCARD_POINTER(p) /* ignoring discarded pointer */ +#endif + +#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK) +#define GSL_RANGE_CHECK 0 /* turn off range checking by default internally */ +#endif + +#define RETURN_IF_NULL(x) if (!x) { return ; } + diff --git a/software/gsl-1.15/config.h.in b/software/gsl-1.15/config.h.in new file mode 100644 index 000000000..d39c766c9 --- /dev/null +++ b/software/gsl-1.15/config.h.in @@ -0,0 +1,308 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Disable deprecated functions and enums while building */ +#define GSL_DISABLE_DEPRECATED 1 + +/* Define if you have inline with C99 behavior */ +#undef HAVE_C99_INLINE + +/* Define to 1 if you have the declaration of `acosh', and to 0 if you don't. + */ +#undef HAVE_DECL_ACOSH + +/* Define to 1 if you have the declaration of `asinh', and to 0 if you don't. + */ +#undef HAVE_DECL_ASINH + +/* Define to 1 if you have the declaration of `atanh', and to 0 if you don't. + */ +#undef HAVE_DECL_ATANH + +/* Define to 1 if you have the declaration of `expm1', and to 0 if you don't. + */ +#undef HAVE_DECL_EXPM1 + +/* Define to 1 if you have the declaration of `feenableexcept', and to 0 if + you don't. */ +#undef HAVE_DECL_FEENABLEEXCEPT + +/* Define to 1 if you have the declaration of `fesettrapenable', and to 0 if + you don't. */ +#undef HAVE_DECL_FESETTRAPENABLE + +/* Define to 1 if you have the declaration of `finite', and to 0 if you don't. + */ +#undef HAVE_DECL_FINITE + +/* Define to 1 if you have the declaration of `fprnd_t', and to 0 if you + don't. */ +#undef HAVE_DECL_FPRND_T + +/* Define to 1 if you have the declaration of `frexp', and to 0 if you don't. + */ +#undef HAVE_DECL_FREXP + +/* Define to 1 if you have the declaration of `hypot', and to 0 if you don't. + */ +#undef HAVE_DECL_HYPOT + +/* Define to 1 if you have the declaration of `isfinite', and to 0 if you + don't. */ +#undef HAVE_DECL_ISFINITE + +/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. + */ +#undef HAVE_DECL_ISINF + +/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. + */ +#undef HAVE_DECL_ISNAN + +/* Define to 1 if you have the declaration of `ldexp', and to 0 if you don't. + */ +#undef HAVE_DECL_LDEXP + +/* Define to 1 if you have the declaration of `log1p', and to 0 if you don't. + */ +#undef HAVE_DECL_LOG1P + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h */ +#undef HAVE_EXIT_SUCCESS_AND_FAILURE + +/* Defined on architectures with excess floating-point precision */ +#undef HAVE_EXTENDED_PRECISION_REGISTERS + +/* Define if x86 processor has sse extensions. */ +#undef HAVE_FPU_X86_SSE + +/* Define to 1 if you have the header file. */ +#undef HAVE_IEEEFP_H + +/* Define this if IEEE comparisons work correctly (e.g. NaN != NaN) */ +#undef HAVE_IEEE_COMPARISONS + +/* Define this if IEEE denormalized numbers are available */ +#undef HAVE_IEEE_DENORMALS + +/* Define if you have inline */ +#undef HAVE_INLINE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define this if printf can handle %Lf for long double */ +#undef HAVE_PRINTF_LONGDOUBLE + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define if you need to hide the static definitions of inline functions */ +#undef HIDE_INLINE_STATIC + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Defined if this is an official release */ +#undef RELEASED + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if type `char' is unsigned and you are not using gcc. */ +#ifndef __CHAR_UNSIGNED__ +# undef __CHAR_UNSIGNED__ +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +#undef volatile + +/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */ +#if !HAVE_EXIT_SUCCESS_AND_FAILURE +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 +#endif + +/* Define one of these if you have a known IEEE arithmetic interface */ +#undef HAVE_GNUSPARC_IEEE_INTERFACE +#undef HAVE_GNUM68K_IEEE_INTERFACE +#undef HAVE_GNUPPC_IEEE_INTERFACE +#undef HAVE_GNUX86_IEEE_INTERFACE +#undef HAVE_SUNOS4_IEEE_INTERFACE +#undef HAVE_SOLARIS_IEEE_INTERFACE +#undef HAVE_HPUX11_IEEE_INTERFACE +#undef HAVE_HPUX_IEEE_INTERFACE +#undef HAVE_TRU64_IEEE_INTERFACE +#undef HAVE_IRIX_IEEE_INTERFACE +#undef HAVE_AIX_IEEE_INTERFACE +#undef HAVE_FREEBSD_IEEE_INTERFACE +#undef HAVE_OS2EMX_IEEE_INTERFACE +#undef HAVE_NETBSD_IEEE_INTERFACE +#undef HAVE_OPENBSD_IEEE_INTERFACE +#undef HAVE_DARWIN_IEEE_INTERFACE +#undef HAVE_DARWIN86_IEEE_INTERFACE + +/* Define a rounding function which moves extended precision values + out of registers and rounds them to double-precision. This should + be used *sparingly*, in places where it is necessary to keep + double-precision rounding for critical expressions while running in + extended precision. For example, the following code should ensure + exact equality, even when extended precision registers are in use, + + double q = GSL_COERCE_DBL(3.0/7.0) ; + if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ; + + It carries a penalty even when the program is running in double + precision mode unless you compile a separate version of the + library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */ + +#if HAVE_EXTENDED_PRECISION_REGISTERS +#define GSL_COERCE_DBL(x) (gsl_coerce_double(x)) +#else +#define GSL_COERCE_DBL(x) (x) +#endif + +/* Substitute gsl functions for missing system functions */ + +#if !HAVE_DECL_HYPOT +#define hypot gsl_hypot +#endif + +#if !HAVE_DECL_LOG1P +#define log1p gsl_log1p +#endif + +#if !HAVE_DECL_EXPM1 +#define expm1 gsl_expm1 +#endif + +#if !HAVE_DECL_ACOSH +#define acosh gsl_acosh +#endif + +#if !HAVE_DECL_ASINH +#define asinh gsl_asinh +#endif + +#if !HAVE_DECL_ATANH +#define atanh gsl_atanh +#endif + +#if !HAVE_DECL_LDEXP +#define ldexp gsl_ldexp +#endif + +#if !HAVE_DECL_FREXP +#define frexp gsl_frexp +#endif + +#if !HAVE_DECL_ISINF +#define isinf gsl_isinf +#endif + +#if !HAVE_DECL_ISFINITE +#define isfinite gsl_finite +#endif + +#if !HAVE_DECL_FINITE +#define finite gsl_finite +#endif + +#if !HAVE_DECL_ISNAN +#define isnan gsl_isnan +#endif + +#ifdef __GNUC__ +#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0); +#else +#define DISCARD_POINTER(p) /* ignoring discarded pointer */ +#endif + +#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK) +#define GSL_RANGE_CHECK 0 /* turn off range checking by default internally */ +#endif + +#define RETURN_IF_NULL(x) if (!x) { return ; } + diff --git a/software/gsl-1.15/config.log b/software/gsl-1.15/config.log new file mode 100644 index 000000000..61b77454d --- /dev/null +++ b/software/gsl-1.15/config.log @@ -0,0 +1,1439 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gsl configure 1.15, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ ./configure --disable-shared --prefix=/Users/jmatthews/Documents/Python/software/gsl-1.15 + +## --------- ## +## Platform. ## +## --------- ## + +hostname = cosmos.phys.soton.ac.uk +uname -m = x86_64 +uname -r = 12.2.0 +uname -s = Darwin +uname -v = Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 + +/usr/bin/uname -p = i386 +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = Mach kernel version: + Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 +Kernel configured for up to 8 processors. +4 processors are physically available. +8 processors are logically available. +Processor type: i486 (Intel 80486) +Processors active: 0 1 2 3 4 5 6 7 +Primary memory available: 16.00 gigabytes +Default processor set: 206 tasks, 1108 threads, 8 processors +Load average: 2.49, Mach factor: 5.50 +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /opt/gcc-4.8.1/bin +PATH: /Applications/scisoft//all/bin +PATH: /opt/local/bin +PATH: /opt/local/sbin +PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin +PATH: /sw/bin +PATH: /sw/sbin +PATH: /usr/bin +PATH: /bin +PATH: /usr/sbin +PATH: /sbin +PATH: /usr/local/bin +PATH: /opt/X11/bin +PATH: /usr/local/git/bin +PATH: /usr/texbin +PATH: /usr/X11R6/bin +PATH: . +PATH: /Applications/scisoft//all/bin +PATH: /Applications/scisoft//ppc/ppc/bin +PATH: /Users/jmatthews/Documents/Analysis_Scripts/bin +PATH: /Users/jmatthews/Documents/pyprogs +PATH: /Users/jmatthews/Documents/struct2class +PATH: /Users/jmatthews/Documents/Analysis_Scripts/bin +PATH: /Users/jmatthews/Documents/Python/bin +PATH: /Users/jmatthews/Documents/Cloudy/bin +PATH: /Users/jmatthews/Documents/Analysis_Scripts/pybin +PATH: /Users/jmatthews/Documents/disky/Utilities/ +PATH: /Users/jmatthews/Documents/cobra/source +PATH: /Users/jmatthews/Documents/disky/ +PATH: /Users/jmatthews/Documents/disky/zephyr/ +PATH: /Users/jmatthews/Documents/pyprogs +PATH: . +PATH: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tardis_sn-0.9.dev702-py2.7-macosx-10.6-intel.egg/ +PATH: /Users/jmatthews/Documents/pyprogs/ +PATH: /Users/jmatthews/Documents/disky/disk +PATH: /Users/jmatthews/Documents/atomjm +PATH: /Applications/scisoft//ppc/ppc/bin +PATH: /Users/jmatthews/Documents/utils +PATH: /Users/jmatthews/Documents/utils + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:2350: checking for a BSD-compatible install +configure:2418: result: /sw/bin/ginstall -c +configure:2429: checking whether build environment is sane +configure:2479: result: yes +configure:2620: checking for a thread-safe mkdir -p +configure:2659: result: /sw/bin/gmkdir -p +configure:2672: checking for gawk +configure:2702: result: no +configure:2672: checking for mawk +configure:2702: result: no +configure:2672: checking for nawk +configure:2702: result: no +configure:2672: checking for awk +configure:2688: found /usr/bin/awk +configure:2699: result: awk +configure:2710: checking whether make sets $(MAKE) +configure:2732: result: yes +configure:2815: checking whether to enable maintainer-specific portions of Makefiles +configure:2824: result: no +configure:2862: checking for a sed that does not truncate output +configure:2926: result: /usr/bin/sed +configure:2936: checking whether make sets $(MAKE) +configure:2958: result: yes +configure:2972: checking build system type +configure:2986: result: x86_64-apple-darwin12.2.0 +configure:3006: checking host system type +configure:3019: result: x86_64-apple-darwin12.2.0 +configure:3094: checking for gcc +configure:3121: result: cc +configure:3350: checking for C compiler version +configure:3359: cc --version >&5 +Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) +Target: x86_64-apple-darwin12.2.0 +Thread model: posix +configure:3370: $? = 0 +configure:3359: cc -v >&5 +Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) +Target: x86_64-apple-darwin12.2.0 +Thread model: posix +configure:3370: $? = 0 +configure:3359: cc -V >&5 +clang: error: argument to '-V' is missing (expected 1 value) +clang: error: no input files +configure:3370: $? = 1 +configure:3359: cc -qversion >&5 +clang: error: no input files +configure:3370: $? = 1 +configure:3390: checking whether the C compiler works +configure:3412: cc conftest.c >&5 +configure:3416: $? = 0 +configure:3464: result: yes +configure:3467: checking for C compiler default output file name +configure:3469: result: a.out +configure:3475: checking for suffix of executables +configure:3482: cc -o conftest conftest.c >&5 +configure:3486: $? = 0 +configure:3508: result: +configure:3530: checking whether we are cross compiling +configure:3538: cc -o conftest conftest.c >&5 +configure:3542: $? = 0 +configure:3549: ./conftest +configure:3553: $? = 0 +configure:3568: result: no +configure:3573: checking for suffix of object files +configure:3595: cc -c conftest.c >&5 +configure:3599: $? = 0 +configure:3620: result: o +configure:3624: checking whether we are using the GNU C compiler +configure:3643: cc -c conftest.c >&5 +configure:3643: $? = 0 +configure:3652: result: yes +configure:3661: checking whether cc accepts -g +configure:3681: cc -c -g conftest.c >&5 +configure:3681: $? = 0 +configure:3722: result: yes +configure:3739: checking for cc option to accept ISO C89 +configure:3803: cc -c -g -O2 conftest.c >&5 +configure:3803: $? = 0 +configure:3816: result: none needed +configure:3847: checking for style of include used by make +configure:3875: result: GNU +configure:3900: checking dependency style of cc +configure:4010: result: gcc3 +configure:4030: checking how to run the C preprocessor +configure:4061: cc -E conftest.c +configure:4061: $? = 0 +configure:4075: cc -E conftest.c +conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:4075: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| /* end confdefs.h. */ +| #include +configure:4100: result: cc -E +configure:4120: cc -E conftest.c +configure:4120: $? = 0 +configure:4134: cc -E conftest.c +conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. +configure:4134: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| /* end confdefs.h. */ +| #include +configure:4163: checking whether ln -s works +configure:4167: result: yes +configure:4220: checking how to print strings +configure:4247: result: printf +configure:4268: checking for a sed that does not truncate output +configure:4332: result: /usr/bin/sed +configure:4350: checking for grep that handles long lines and -e +configure:4408: result: /usr/bin/grep +configure:4413: checking for egrep +configure:4475: result: /usr/bin/grep -E +configure:4480: checking for fgrep +configure:4542: result: /usr/bin/grep -F +configure:4577: checking for ld used by cc +configure:4644: result: /usr/bin/ld +configure:4651: checking if the linker (/usr/bin/ld) is GNU ld +configure:4666: result: no +configure:4678: checking for BSD- or MS-compatible name lister (nm) +configure:4727: result: /opt/local/bin/nm +configure:4857: checking the name lister (/opt/local/bin/nm) interface +configure:4864: cc -c -g -O2 conftest.c >&5 +configure:4867: /opt/local/bin/nm "conftest.o" +configure:4870: output +0000000000000228 S _some_variable +configure:4877: result: BSD nm +configure:4881: checking the maximum length of command line arguments +configure:5006: result: 196608 +configure:5023: checking whether the shell understands some XSI constructs +configure:5033: result: yes +configure:5037: checking whether the shell understands "+=" +configure:5043: result: yes +configure:5078: checking how to convert x86_64-apple-darwin12.2.0 file names to x86_64-apple-darwin12.2.0 format +configure:5118: result: func_convert_file_noop +configure:5125: checking how to convert x86_64-apple-darwin12.2.0 file names to toolchain format +configure:5145: result: func_convert_file_noop +configure:5152: checking for /usr/bin/ld option to reload object files +configure:5159: result: -r +configure:5233: checking for objdump +configure:5263: result: no +configure:5292: checking how to recognize dependent libraries +configure:5494: result: pass_all +configure:5579: checking for dlltool +configure:5609: result: no +configure:5639: checking how to associate runtime and link libraries +configure:5666: result: printf %s\n +configure:5727: checking for ar +configure:5743: found /opt/local/bin/ar +configure:5754: result: ar +configure:5791: checking for archiver @FILE support +configure:5808: cc -c -g -O2 conftest.c >&5 +configure:5808: $? = 0 +configure:5811: ar cru libconftest.a @conftest.lst >&5 +ar: @conftest.lst: No such file or directory +configure:5814: $? = 1 +configure:5834: result: no +configure:5892: checking for strip +configure:5908: found /opt/local/bin/strip +configure:5919: result: strip +configure:5991: checking for ranlib +configure:6018: result: ranlib +configure:6120: checking command to parse /opt/local/bin/nm output from cc object +configure:6239: cc -c -g -O2 conftest.c >&5 +configure:6242: $? = 0 +configure:6246: /opt/local/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:6249: $? = 0 +cannot find nm_test_var in conftest.nm +configure:6239: cc -c -g -O2 conftest.c >&5 +configure:6242: $? = 0 +configure:6246: /opt/local/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:6249: $? = 0 +configure:6315: cc -o conftest -g -O2 conftest.c conftstm.o >&5 +configure:6318: $? = 0 +configure:6356: result: ok +configure:6393: checking for sysroot +configure:6423: result: no +configure:6666: checking for mt +configure:6696: result: no +configure:6716: checking if : is a manifest tool +configure:6722: : '-?' +configure:6730: result: no +configure:6786: checking for dsymutil +configure:6802: found /usr/bin/dsymutil +configure:6813: result: dsymutil +configure:6878: checking for nmedit +configure:6894: found /opt/local/bin/nmedit +configure:6905: result: nmedit +configure:6970: checking for lipo +configure:6986: found /opt/local/bin/lipo +configure:6997: result: lipo +configure:7062: checking for otool +configure:7078: found /opt/local/bin/otool +configure:7089: result: otool +configure:7154: checking for otool64 +configure:7184: result: no +configure:7229: checking for -single_module linker flag +cc -g -O2 -o libconftest.dylib -dynamiclib -Wl,-single_module conftest.c +configure:7256: result: yes +configure:7258: checking for -exported_symbols_list linker flag +configure:7278: cc -o conftest -g -O2 -Wl,-exported_symbols_list,conftest.sym conftest.c >&5 +configure:7278: $? = 0 +configure:7288: result: yes +configure:7290: checking for -force_load linker flag +cc -g -O2 -c -o conftest.o conftest.c +ar cru libconftest.a conftest.o +ranlib libconftest.a +cc -g -O2 -o conftest conftest.c -Wl,-force_load,./libconftest.a +configure:7320: result: yes +configure:7358: checking for ANSI C header files +configure:7378: cc -c -g -O2 conftest.c >&5 +configure:7378: $? = 0 +configure:7451: cc -o conftest -g -O2 conftest.c >&5 +configure:7451: $? = 0 +configure:7451: ./conftest +configure:7451: $? = 0 +configure:7462: result: yes +configure:7475: checking for sys/types.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for sys/stat.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for stdlib.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for string.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for memory.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for strings.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for inttypes.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for stdint.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7475: checking for unistd.h +configure:7475: cc -c -g -O2 conftest.c >&5 +configure:7475: $? = 0 +configure:7475: result: yes +configure:7489: checking for dlfcn.h +configure:7489: cc -c -g -O2 conftest.c >&5 +configure:7489: $? = 0 +configure:7489: result: yes +configure:7676: checking for objdir +configure:7691: result: .libs +configure:7958: checking if cc supports -fno-rtti -fno-exceptions +configure:7976: cc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 +configure:7980: $? = 0 +configure:7993: result: yes +configure:8303: checking for cc option to produce PIC +configure:8310: result: -fno-common -DPIC +configure:8318: checking if cc PIC flag -fno-common -DPIC works +configure:8336: cc -c -g -O2 -fno-common -DPIC -DPIC conftest.c >&5 +configure:8340: $? = 0 +configure:8353: result: yes +configure:8382: checking if cc static flag -static works +configure:8410: result: no +configure:8425: checking if cc supports -c -o file.o +configure:8446: cc -c -g -O2 -o out/conftest2.o conftest.c >&5 +configure:8450: $? = 0 +configure:8472: result: yes +configure:8480: checking if cc supports -c -o file.o +configure:8527: result: yes +configure:8560: checking whether the cc linker (/usr/bin/ld) supports shared libraries +configure:9718: result: yes +configure:9963: checking dynamic linker characteristics +configure:10699: result: darwin12.2.0 dyld +configure:10806: checking how to hardcode library paths into programs +configure:10831: result: immediate +configure:11371: checking whether stripping libraries is possible +configure:11385: result: yes +configure:11411: checking if libtool supports shared libraries +configure:11413: result: yes +configure:11416: checking whether to build shared libraries +configure:11437: result: no +configure:11440: checking whether to build static libraries +configure:11444: result: yes +configure:11480: checking for size_t +configure:11480: cc -c -g -O2 conftest.c >&5 +configure:11480: $? = 0 +configure:11480: cc -c -g -O2 conftest.c >&5 +conftest.c:60:21: error: expected expression +if (sizeof ((size_t))) + ^ +1 error generated. +configure:11480: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((size_t))) +| return 0; +| ; +| return 0; +| } +configure:11480: result: yes +configure:11491: checking for working volatile +configure:11510: cc -c -g -O2 conftest.c >&5 +configure:11510: $? = 0 +configure:11517: result: yes +configure:11525: checking for inline +configure:11541: cc -c -g -O2 conftest.c >&5 +configure:11541: $? = 0 +configure:11549: result: inline +configure:11567: checking whether char is unsigned +configure:11585: cc -c -g -O2 conftest.c >&5 +configure:11585: $? = 0 +configure:11592: result: no +configure:11741: checking for GNU-style extern inline +configure:11760: cc -c -g -O2 conftest.c >&5 +conftest.c:26:11: error: redefinition of a 'extern inline' function 'foo' is not supported in C99 mode + double foo (double x) { return x + 1.0 ; }; + ^ +conftest.c:25:25: note: previous definition is here + extern inline double foo(double x) { return x + 1.0 ; } ; + ^ +1 error generated. +configure:11760: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| extern inline double foo(double x); +| extern inline double foo(double x) { return x + 1.0 ; } ; +| double foo (double x) { return x + 1.0 ; }; +| int +| main () +| { +| foo(1.0) +| ; +| return 0; +| } +configure:11766: result: no +configure:11774: checking for C99-style inline +configure:11791: cc -c -g -O2 conftest.c >&5 +configure:11791: $? = 0 +configure:11807: cc -c -g -O2 conftest.c >&5 +configure:11807: $? = 0 +configure:11816: result: yes +configure:11831: checking ieeefp.h usability +configure:11831: cc -c -g -O2 conftest.c >&5 +conftest.c:59:10: fatal error: 'ieeefp.h' file not found +#include + ^ +1 error generated. +configure:11831: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:11831: result: no +configure:11831: checking ieeefp.h presence +configure:11831: cc -E conftest.c +conftest.c:26:10: fatal error: 'ieeefp.h' file not found +#include + ^ +1 error generated. +configure:11831: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| /* end confdefs.h. */ +| #include +configure:11831: result: no +configure:11831: checking for ieeefp.h +configure:11831: result: no +configure:11861: checking for vprintf +configure:11861: cc -o conftest -g -O2 conftest.c >&5 +conftest.c:49:6: warning: incompatible redeclaration of library function 'vprintf' +char vprintf (); + ^ +conftest.c:49:6: note: 'vprintf' is a builtin with type 'int (const char *, __va_list_tag *)' +1 warning generated. +configure:11861: $? = 0 +configure:11861: result: yes +configure:11867: checking for _doprnt +configure:11867: cc -o conftest -g -O2 conftest.c >&5 +Undefined symbols for architecture x86_64: + "__doprnt", referenced from: + _main in conftest-NuG1XI.o +ld: symbol(s) not found for architecture x86_64 +clang: error: linker command failed with exit code 1 (use -v to see invocation) +configure:11867: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| #define HAVE_VPRINTF 1 +| /* end confdefs.h. */ +| /* Define _doprnt to an innocuous variant, in case declares _doprnt. +| For example, HP-UX 11i declares gettimeofday. */ +| #define _doprnt innocuous__doprnt +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char _doprnt (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef _doprnt +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char _doprnt (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub__doprnt || defined __stub____doprnt +| choke me +| #endif +| +| int +| main () +| { +| return _doprnt (); +| ; +| return 0; +| } +configure:11867: result: no +configure:11879: checking for memcpy +configure:11879: cc -o conftest -g -O2 conftest.c >&5 +conftest.c:50:6: warning: incompatible redeclaration of library function 'memcpy' +char memcpy (); + ^ +conftest.c:50:6: note: 'memcpy' is a builtin with type 'void *(void *, const void *, unsigned long)' +1 warning generated. +configure:11879: $? = 0 +configure:11879: result: yes +configure:11892: checking for memmove +configure:11892: cc -o conftest -g -O2 conftest.c >&5 +conftest.c:51:6: warning: incompatible redeclaration of library function 'memmove' +char memmove (); + ^ +conftest.c:51:6: note: 'memmove' is a builtin with type 'void *(void *, const void *, unsigned long)' +1 warning generated. +configure:11892: $? = 0 +configure:11892: result: yes +configure:11905: checking for strdup +configure:11905: cc -o conftest -g -O2 conftest.c >&5 +conftest.c:52:6: warning: incompatible redeclaration of library function 'strdup' +char strdup (); + ^ +conftest.c:52:6: note: 'strdup' is a builtin with type 'char *(const char *)' +1 warning generated. +configure:11905: $? = 0 +configure:11905: result: yes +configure:11918: checking for strtol +configure:11918: cc -o conftest -g -O2 conftest.c >&5 +configure:11918: $? = 0 +configure:11918: result: yes +configure:11931: checking for strtoul +configure:11931: cc -o conftest -g -O2 conftest.c >&5 +configure:11931: $? = 0 +configure:11931: result: yes +configure:11946: checking for EXIT_SUCCESS and EXIT_FAILURE +configure:11970: result: yes +configure:11981: checking for cos in -lm +configure:12006: cc -o conftest -g -O2 conftest.c -lm >&5 +conftest.c:40:6: warning: incompatible redeclaration of library function 'cos' +char cos (); + ^ +conftest.c:40:6: note: 'cos' is a builtin with type 'double (double)' +1 warning generated. +configure:12006: $? = 0 +configure:12015: result: yes +configure:12028: checking whether feenableexcept is declared +configure:12028: cc -c -g -O2 conftest.c >&5 +conftest.c:44:10: error: use of undeclared identifier 'feenableexcept' + (void) feenableexcept; + ^ +1 error generated. +configure:12028: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| #define HAVE_VPRINTF 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_MEMMOVE 1 +| #define HAVE_STRDUP 1 +| #define HAVE_STRTOL 1 +| #define HAVE_STRTOUL 1 +| #define HAVE_EXIT_SUCCESS_AND_FAILURE 1 +| #define HAVE_LIBM 1 +| /* end confdefs.h. */ +| #define _GNU_SOURCE 1 +| #include +| +| int +| main () +| { +| #ifndef feenableexcept +| #ifdef __cplusplus +| (void) feenableexcept; +| #else +| (void) feenableexcept; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:12028: result: no +configure:12041: checking whether fesettrapenable is declared +configure:12041: cc -c -g -O2 conftest.c >&5 +conftest.c:45:10: error: use of undeclared identifier 'fesettrapenable' + (void) fesettrapenable; + ^ +1 error generated. +configure:12041: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| #define HAVE_VPRINTF 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_MEMMOVE 1 +| #define HAVE_STRDUP 1 +| #define HAVE_STRTOL 1 +| #define HAVE_STRTOUL 1 +| #define HAVE_EXIT_SUCCESS_AND_FAILURE 1 +| #define HAVE_LIBM 1 +| #define HAVE_DECL_FEENABLEEXCEPT 0 +| /* end confdefs.h. */ +| #define _GNU_SOURCE 1 +| #include +| +| int +| main () +| { +| #ifndef fesettrapenable +| #ifdef __cplusplus +| (void) fesettrapenable; +| #else +| (void) fesettrapenable; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:12041: result: no +configure:12054: checking whether hypot is declared +configure:12054: cc -c -g -O2 conftest.c >&5 +configure:12054: $? = 0 +configure:12054: result: yes +configure:12066: checking whether expm1 is declared +configure:12066: cc -c -g -O2 conftest.c >&5 +configure:12066: $? = 0 +configure:12066: result: yes +configure:12078: checking whether acosh is declared +configure:12078: cc -c -g -O2 conftest.c >&5 +configure:12078: $? = 0 +configure:12078: result: yes +configure:12090: checking whether asinh is declared +configure:12090: cc -c -g -O2 conftest.c >&5 +configure:12090: $? = 0 +configure:12090: result: yes +configure:12102: checking whether atanh is declared +configure:12102: cc -c -g -O2 conftest.c >&5 +configure:12102: $? = 0 +configure:12102: result: yes +configure:12114: checking whether ldexp is declared +configure:12114: cc -c -g -O2 conftest.c >&5 +configure:12114: $? = 0 +configure:12114: result: yes +configure:12126: checking whether frexp is declared +configure:12126: cc -c -g -O2 conftest.c >&5 +configure:12126: $? = 0 +configure:12126: result: yes +configure:12138: checking whether fprnd_t is declared +configure:12138: cc -c -g -O2 conftest.c >&5 +conftest.c:52:10: error: use of undeclared identifier 'fprnd_t' + (void) fprnd_t; + ^ +1 error generated. +configure:12138: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "gsl" +| #define PACKAGE_TARNAME "gsl" +| #define PACKAGE_VERSION "1.15" +| #define PACKAGE_STRING "gsl 1.15" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE_URL "" +| #define PACKAGE "gsl" +| #define VERSION "1.15" +| #define RELEASED /**/ +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_INLINE 1 +| #define HAVE_C99_INLINE 1 +| #define HAVE_VPRINTF 1 +| #define HAVE_MEMCPY 1 +| #define HAVE_MEMMOVE 1 +| #define HAVE_STRDUP 1 +| #define HAVE_STRTOL 1 +| #define HAVE_STRTOUL 1 +| #define HAVE_EXIT_SUCCESS_AND_FAILURE 1 +| #define HAVE_LIBM 1 +| #define HAVE_DECL_FEENABLEEXCEPT 0 +| #define HAVE_DECL_FESETTRAPENABLE 0 +| #define HAVE_DECL_HYPOT 1 +| #define HAVE_DECL_EXPM1 1 +| #define HAVE_DECL_ACOSH 1 +| #define HAVE_DECL_ASINH 1 +| #define HAVE_DECL_ATANH 1 +| #define HAVE_DECL_LDEXP 1 +| #define HAVE_DECL_FREXP 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| #ifndef fprnd_t +| #ifdef __cplusplus +| (void) fprnd_t; +| #else +| (void) fprnd_t; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:12138: result: no +configure:12150: checking whether isinf is declared +configure:12150: cc -c -g -O2 conftest.c >&5 +configure:12150: $? = 0 +configure:12150: result: yes +configure:12162: checking whether isfinite is declared +configure:12162: cc -c -g -O2 conftest.c >&5 +configure:12162: $? = 0 +configure:12162: result: yes +configure:12174: checking whether finite is declared +configure:12174: cc -c -g -O2 conftest.c >&5 +configure:12174: $? = 0 +configure:12174: result: yes +configure:12189: checking whether isnan is declared +configure:12189: cc -c -g -O2 conftest.c >&5 +configure:12189: $? = 0 +configure:12189: result: yes +configure:12208: checking whether log1p is declared +configure:12208: cc -c -g -O2 conftest.c >&5 +configure:12208: $? = 0 +configure:12208: result: yes +configure:12223: checking for long double stdio +configure:12244: cc -o conftest -g -O2 conftest.c -lm >&5 +configure:12244: $? = 0 +configure:12244: ./conftest +1.234 +configure:12244: $? = 0 +configure:12254: result: yes +configure:12263: checking for extended floating point registers +configure:12296: result: yes +configure:12305: checking for IEEE arithmetic interface type +configure:12368: result: unknown +configure:12498: checking for IEEE compiler flags +configure:12537: result: none +configure:12546: checking for IEEE comparisons +configure:12567: cc -o conftest -g -O2 conftest.c -lm >&5 +conftest.c:60:4: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' + exit (status); + ^ +conftest.c:60:4: note: please include the header or explicitly provide a declaration for 'exit' +1 warning generated. +configure:12567: $? = 0 +configure:12567: ./conftest +configure:12567: $? = 0 +configure:12578: result: yes +configure:12587: checking for IEEE denormalized values +configure:12609: cc -o conftest -g -O2 conftest.c -lm >&5 +conftest.c:62:4: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' + exit (status); + ^ +conftest.c:62:4: note: please include the header or explicitly provide a declaration for 'exit' +1 warning generated. +configure:12609: $? = 0 +configure:12609: ./conftest +configure:12609: $? = 0 +configure:12620: result: yes +configure:12787: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by gsl config.status 1.15, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on cosmos.phys.soton.ac.uk + +config.status:1196: creating gsl_version.h +config.status:1196: creating gsl.spec +config.status:1196: creating gsl/Makefile +config.status:1196: creating test/Makefile +config.status:1196: creating err/Makefile +config.status:1196: creating sys/Makefile +config.status:1196: creating utils/Makefile +config.status:1196: creating const/Makefile +config.status:1196: creating min/Makefile +config.status:1196: creating multimin/Makefile +config.status:1196: creating ieee-utils/Makefile +config.status:1196: creating fft/Makefile +config.status:1196: creating specfunc/Makefile +config.status:1196: creating dht/Makefile +config.status:1196: creating fit/Makefile +config.status:1196: creating multifit/Makefile +config.status:1196: creating bspline/Makefile +config.status:1196: creating statistics/Makefile +config.status:1196: creating sum/Makefile +config.status:1196: creating roots/Makefile +config.status:1196: creating multiroots/Makefile +config.status:1196: creating ntuple/Makefile +config.status:1196: creating poly/Makefile +config.status:1196: creating qrng/Makefile +config.status:1196: creating rng/Makefile +config.status:1196: creating randist/Makefile +config.status:1196: creating siman/Makefile +config.status:1196: creating integration/Makefile +config.status:1196: creating interpolation/Makefile +config.status:1196: creating doc/Makefile +config.status:1196: creating block/Makefile +config.status:1196: creating vector/Makefile +config.status:1196: creating matrix/Makefile +config.status:1196: creating histogram/Makefile +config.status:1196: creating monte/Makefile +config.status:1196: creating ode-initval/Makefile +config.status:1196: creating ode-initval2/Makefile +config.status:1196: creating cblas/Makefile +config.status:1196: creating blas/Makefile +config.status:1196: creating linalg/Makefile +config.status:1196: creating eigen/Makefile +config.status:1196: creating permutation/Makefile +config.status:1196: creating combination/Makefile +config.status:1196: creating multiset/Makefile +config.status:1196: creating sort/Makefile +config.status:1196: creating complex/Makefile +config.status:1196: creating diff/Makefile +config.status:1196: creating deriv/Makefile +config.status:1196: creating cheb/Makefile +config.status:1196: creating cdf/Makefile +config.status:1196: creating wavelet/Makefile +config.status:1196: creating Makefile +config.status:1196: creating config.h +config.status:1377: config.h is unchanged +config.status:1425: executing depfiles commands +config.status:1425: executing libtool commands + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_build=x86_64-apple-darwin12.2.0 +ac_cv_c_c99inline=yes +ac_cv_c_char_unsigned=no +ac_cv_c_compiler_gnu=yes +ac_cv_c_extended_fp=yes +ac_cv_c_extern_inline=no +ac_cv_c_ieee_comparisons=yes +ac_cv_c_ieee_denormals=yes +ac_cv_c_ieee_flags=none +ac_cv_c_ieee_interface=unknown +ac_cv_c_inline=inline +ac_cv_c_volatile=yes +ac_cv_decl_exit_success_and_failure=yes +ac_cv_env_CC_set=set +ac_cv_env_CC_value=cc +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_func__doprnt=no +ac_cv_func_memcpy=yes +ac_cv_func_memmove=yes +ac_cv_func_printf_longdouble=yes +ac_cv_func_strdup=yes +ac_cv_func_strtol=yes +ac_cv_func_strtoul=yes +ac_cv_func_vprintf=yes +ac_cv_have_decl_acosh=yes +ac_cv_have_decl_asinh=yes +ac_cv_have_decl_atanh=yes +ac_cv_have_decl_expm1=yes +ac_cv_have_decl_feenableexcept=no +ac_cv_have_decl_fesettrapenable=no +ac_cv_have_decl_finite=yes +ac_cv_have_decl_fprnd_t=no +ac_cv_have_decl_frexp=yes +ac_cv_have_decl_hypot=yes +ac_cv_have_decl_isfinite=yes +ac_cv_have_decl_isinf=yes +ac_cv_have_decl_isnan=yes +ac_cv_have_decl_ldexp=yes +ac_cv_have_decl_log1p=yes +ac_cv_header_dlfcn_h=yes +ac_cv_header_ieeefp_h=no +ac_cv_header_inttypes_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_host=x86_64-apple-darwin12.2.0 +ac_cv_lib_m_cos=yes +ac_cv_objext=o +ac_cv_path_EGREP='/usr/bin/grep -E' +ac_cv_path_FGREP='/usr/bin/grep -F' +ac_cv_path_GREP=/usr/bin/grep +ac_cv_path_SED=/usr/bin/sed +ac_cv_path_install='/sw/bin/ginstall -c' +ac_cv_path_mkdir=/sw/bin/gmkdir +ac_cv_prog_AWK=awk +ac_cv_prog_CPP='cc -E' +ac_cv_prog_ac_ct_AR=ar +ac_cv_prog_ac_ct_CC=cc +ac_cv_prog_ac_ct_DSYMUTIL=dsymutil +ac_cv_prog_ac_ct_LIPO=lipo +ac_cv_prog_ac_ct_NMEDIT=nmedit +ac_cv_prog_ac_ct_OTOOL=otool +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_ac_ct_STRIP=strip +ac_cv_prog_cc_c89= +ac_cv_prog_cc_g=yes +ac_cv_prog_make_make_set=yes +ac_cv_type_size_t=yes +am_cv_CC_dependencies_compiler_type=gcc3 +lt_cv_apple_cc_single_mod=yes +lt_cv_ar_at_file=no +lt_cv_deplibs_check_method=pass_all +lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_ld_exported_symbols_list=yes +lt_cv_ld_force_load=yes +lt_cv_ld_reload_flag=-r +lt_cv_nm_interface='BSD nm' +lt_cv_objdir=.libs +lt_cv_path_LD=/usr/bin/ld +lt_cv_path_NM=/opt/local/bin/nm +lt_cv_path_mainfest_tool=no +lt_cv_prog_compiler_c_o=yes +lt_cv_prog_compiler_pic='-fno-common -DPIC' +lt_cv_prog_compiler_pic_works=yes +lt_cv_prog_compiler_rtti_exceptions=yes +lt_cv_prog_compiler_static_works=no +lt_cv_prog_gnu_ld=no +lt_cv_sharedlib_from_linklib_cmd='printf %s\n' +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[BCDEGRST]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_max_cmd_len=196608 +lt_cv_to_host_file_cmd=func_convert_file_noop +lt_cv_to_tool_file_cmd=func_convert_file_noop + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run aclocal-1.11' +AMDEPBACKSLASH='\' +AMDEP_FALSE='#' +AMDEP_TRUE='' +AMTAR='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run tar' +AR='ar' +AUTOCONF='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoconf' +AUTOHEADER='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoheader' +AUTOMAKE='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run automake-1.11' +AWK='awk' +CC='cc' +CCDEPMODE='depmode=gcc3' +CFLAGS='-g -O2' +CPP='cc -E' +CPPFLAGS='' +CYGPATH_W='echo' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +DLLTOOL='false' +DSYMUTIL='dsymutil' +DUMPBIN='' +ECHO_C='\c' +ECHO_N='' +ECHO_T='' +EGREP='/usr/bin/grep -E' +EXEEXT='' +FGREP='/usr/bin/grep -F' +GREP='/usr/bin/grep' +GSL_CFLAGS='-I${prefix}/include' +GSL_LIBM='' +GSL_LIBS='-L${exec_prefix}/lib -lgsl' +GSL_LT_CBLAS_VERSION='0:0:0' +GSL_LT_VERSION='16:0:16' +GSL_MAJOR_VERSION='1' +GSL_MINOR_VERSION='15' +HAVE_AIX_IEEE_INTERFACE='' +HAVE_DARWIN86_IEEE_INTERFACE='' +HAVE_DARWIN_IEEE_INTERFACE='' +HAVE_FREEBSD_IEEE_INTERFACE='' +HAVE_GNUM68K_IEEE_INTERFACE='' +HAVE_GNUPPC_IEEE_INTERFACE='' +HAVE_GNUSPARC_IEEE_INTERFACE='' +HAVE_GNUX86_IEEE_INTERFACE='' +HAVE_HPUX11_IEEE_INTERFACE='' +HAVE_HPUX_IEEE_INTERFACE='' +HAVE_IRIX_IEEE_INTERFACE='' +HAVE_NETBSD_IEEE_INTERFACE='' +HAVE_OPENBSD_IEEE_INTERFACE='' +HAVE_OS2EMX_IEEE_INTERFACE='' +HAVE_SOLARIS_IEEE_INTERFACE='' +HAVE_SUNOS4_IEEE_INTERFACE='' +HAVE_TRU64_IEEE_INTERFACE='' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +LD='/usr/bin/ld' +LDFLAGS='' +LIBM='' +LIBOBJS='' +LIBS='-lm ' +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIPO='lipo' +LN_S='ln -s' +LTLIBOBJS='' +MAINT='#' +MAINTAINER_MODE_FALSE='' +MAINTAINER_MODE_TRUE='#' +MAKEINFO='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run makeinfo' +MANIFEST_TOOL=':' +MINGW32_HOST_FALSE='' +MINGW32_HOST_TRUE='#' +MKDIR_P='/sw/bin/gmkdir -p' +NM='/opt/local/bin/nm' +NMEDIT='nmedit' +OBJDUMP='false' +OBJEXT='o' +OTOOL64=':' +OTOOL='otool' +PACKAGE='gsl' +PACKAGE_BUGREPORT='' +PACKAGE_NAME='gsl' +PACKAGE_STRING='gsl 1.15' +PACKAGE_TARNAME='gsl' +PACKAGE_URL='' +PACKAGE_VERSION='1.15' +PATH_SEPARATOR=':' +RANLIB='ranlib' +SED='/usr/bin/sed' +SET_MAKE='' +SHELL='/bin/sh' +STRIP='strip' +VERSION='1.15' +ac_ct_AR='ar' +ac_ct_CC='cc' +ac_ct_DUMPBIN='' +am__EXEEXT_FALSE='' +am__EXEEXT_TRUE='#' +am__fastdepCC_FALSE='#' +am__fastdepCC_TRUE='' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__quote='' +am__tar='${AMTAR} chof - "$$tardir"' +am__untar='${AMTAR} xf -' +bindir='${exec_prefix}/bin' +build='x86_64-apple-darwin12.2.0' +build_alias='' +build_cpu='x86_64' +build_os='darwin12.2.0' +build_vendor='apple' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host='x86_64-apple-darwin12.2.0' +host_alias='' +host_cpu='x86_64' +host_os='darwin12.2.0' +host_vendor='apple' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localedir='${datarootdir}/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +mkdir_p='/sw/bin/gmkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +prefix='/Users/jmatthews/Documents/Python/software/gsl-1.15' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "gsl" +#define PACKAGE_TARNAME "gsl" +#define PACKAGE_VERSION "1.15" +#define PACKAGE_STRING "gsl 1.15" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_URL "" +#define PACKAGE "gsl" +#define VERSION "1.15" +#define RELEASED /**/ +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_INLINE 1 +#define HAVE_C99_INLINE 1 +#define HAVE_VPRINTF 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMMOVE 1 +#define HAVE_STRDUP 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +#define HAVE_EXIT_SUCCESS_AND_FAILURE 1 +#define HAVE_LIBM 1 +#define HAVE_DECL_FEENABLEEXCEPT 0 +#define HAVE_DECL_FESETTRAPENABLE 0 +#define HAVE_DECL_HYPOT 1 +#define HAVE_DECL_EXPM1 1 +#define HAVE_DECL_ACOSH 1 +#define HAVE_DECL_ASINH 1 +#define HAVE_DECL_ATANH 1 +#define HAVE_DECL_LDEXP 1 +#define HAVE_DECL_FREXP 1 +#define HAVE_DECL_FPRND_T 0 +#define HAVE_DECL_ISINF 1 +#define HAVE_DECL_ISFINITE 1 +#define HAVE_DECL_FINITE 1 +#define HAVE_DECL_ISNAN 1 +#define HAVE_DECL_LOG1P 1 +#define HAVE_PRINTF_LONGDOUBLE 1 +#define HAVE_EXTENDED_PRECISION_REGISTERS 1 +#define HAVE_UNKNOWN_IEEE_INTERFACE 1 +#define HAVE_IEEE_COMPARISONS 1 +#define HAVE_IEEE_DENORMALS 1 + +configure: exit 0 diff --git a/software/gsl-1.15/config.status b/software/gsl-1.15/config.status new file mode 100755 index 000000000..e8331fc3a --- /dev/null +++ b/software/gsl-1.15/config.status @@ -0,0 +1,2163 @@ +#! /bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gsl $as_me 1.15, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile bspline/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile ode-initval2/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile multiset/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile" +config_headers=" config.h" +config_commands=" depfiles libtool" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +ac_cs_config="'--disable-shared' '--prefix=/Users/jmatthews/Documents/Python/software/gsl-1.15' 'CC=cc'" +ac_cs_version="\ +gsl config.status 1.15 +configured by ./configure, generated by GNU Autoconf 2.68, + with options \"$ac_cs_config\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/Users/jmatthews/Documents/Python/software/gsl-1.15' +srcdir='.' +INSTALL='/sw/bin/ginstall -c' +MKDIR_P='/sw/bin/gmkdir -p' +AWK='awk' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + set X '/bin/sh' './configure' '--disable-shared' '--prefix=/Users/jmatthews/Documents/Python/software/gsl-1.15' 'CC=cc' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6 + CONFIG_SHELL='/bin/sh' + export CONFIG_SHELL + exec "$@" +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="." + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +double_quote_subst='s/\(["`\\]\)/\\\1/g' +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +macro_version='2.4' +macro_revision='1.3293' +enable_shared='no' +enable_static='yes' +pic_mode='default' +enable_fast_install='needless' +SHELL='/bin/sh' +ECHO='printf %s\n' +host_alias='' +host='x86_64-apple-darwin12.2.0' +host_os='darwin12.2.0' +build_alias='' +build='x86_64-apple-darwin12.2.0' +build_os='darwin12.2.0' +SED='/usr/bin/sed' +Xsed='/usr/bin/sed -e 1s/^X//' +GREP='/usr/bin/grep' +EGREP='/usr/bin/grep -E' +FGREP='/usr/bin/grep -F' +LD='/usr/bin/ld' +NM='/opt/local/bin/nm' +LN_S='ln -s' +max_cmd_len='196608' +ac_objext='o' +exeext='' +lt_unset='unset' +lt_SP2NL='tr \040 \012' +lt_NL2SP='tr \015\012 \040\040' +lt_cv_to_host_file_cmd='func_convert_file_noop' +lt_cv_to_tool_file_cmd='func_convert_file_noop' +reload_flag=' -r' +reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +OBJDUMP='false' +deplibs_check_method='pass_all' +file_magic_cmd='$MAGIC_CMD' +file_magic_glob='' +want_nocaseglob='no' +DLLTOOL='false' +sharedlib_from_linklib_cmd='printf %s\n' +AR='ar' +AR_FLAGS='cru' +archiver_list_spec='' +STRIP='strip' +RANLIB='ranlib' +old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $oldlib' +old_postuninstall_cmds='' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $oldlib' +lock_old_archive_extraction='yes' +CC='cc' +CFLAGS='-g -O2' +compiler='cc' +GCC='yes' +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[BCDEGRST]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[BCDEGRST]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' +nm_file_list_spec='' +lt_sysroot='' +objdir='.libs' +MAGIC_CMD='file' +lt_prog_compiler_no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' +lt_prog_compiler_pic=' -fno-common -DPIC' +lt_prog_compiler_wl='-Wl,' +lt_prog_compiler_static='' +lt_cv_prog_compiler_c_o='yes' +need_locks='no' +MANIFEST_TOOL=':' +DSYMUTIL='dsymutil' +NMEDIT='nmedit' +LIPO='lipo' +OTOOL='otool' +OTOOL64=':' +libext='a' +shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +extract_expsyms_cmds='' +archive_cmds_need_lc='no' +enable_shared_with_static_runtimes='no' +export_dynamic_flag_spec='' +whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' +compiler_needs_object='no' +old_archive_from_new_cmds='' +old_archive_from_expsyms_cmds='' +archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring $single_module' +archive_expsym_cmds='sed '\''s,^,_,'\'' < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring $single_module ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' +module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs $compiler_flags' +module_expsym_cmds='sed -e '\''s,^,_,'\'' < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs $compiler_flags ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' +with_gnu_ld='no' +allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' +no_undefined_flag='' +hardcode_libdir_flag_spec='' +hardcode_libdir_flag_spec_ld='' +hardcode_libdir_separator='' +hardcode_direct='no' +hardcode_direct_absolute='no' +hardcode_minus_L='no' +hardcode_shlibpath_var='unsupported' +hardcode_automatic='yes' +inherit_rpath='no' +link_all_deplibs='yes' +always_export_symbols='no' +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' +include_expsyms='' +prelink_cmds='' +postlink_cmds='' +file_list_spec='' +variables_saved_for_relink='PATH DYLD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' +need_lib_prefix='no' +need_version='no' +version_type='darwin' +runpath_var='' +shlibpath_var='DYLD_LIBRARY_PATH' +shlibpath_overrides_runpath='yes' +libname_spec='lib$name' +library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' +soname_spec='${libname}${release}${major}$shared_ext' +install_override_mode='' +postinstall_cmds='' +postuninstall_cmds='' +finish_cmds='' +finish_eval='' +hardcode_into_libs='no' +sys_lib_search_path_spec='/usr/lib/clang/4.1 /usr/local/lib' +sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' +hardcode_action='immediate' +enable_dlopen='unknown' +enable_dlopen_self='unknown' +enable_dlopen_self_static='unknown' +old_striplib='strip -S' +striplib='strip -x' + +LTCC='cc' +LTCFLAGS='-g -O2' +compiler='cc' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL ECHO SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag OBJDUMP deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob DLLTOOL sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix nm_file_list_spec lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_flag_spec_ld hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec sys_lib_dlsearch_path_spec; do + case `eval \\$ECHO \\""\\$$var"\\"` in + *[\\\`\"\$]*) + eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\$$var\\\"" + ;; + esac +done + +ac_aux_dir='.' +xsi_shell='yes' +lt_shell_append='yes' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='gsl' + VERSION='1.15' + TIMESTAMP='' + RM='rm -f' + ofile='libtool' + + + + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "gsl_version.h") CONFIG_FILES="$CONFIG_FILES gsl_version.h" ;; + "gsl.spec") CONFIG_FILES="$CONFIG_FILES gsl.spec" ;; + "gsl/Makefile") CONFIG_FILES="$CONFIG_FILES gsl/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "err/Makefile") CONFIG_FILES="$CONFIG_FILES err/Makefile" ;; + "sys/Makefile") CONFIG_FILES="$CONFIG_FILES sys/Makefile" ;; + "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; + "const/Makefile") CONFIG_FILES="$CONFIG_FILES const/Makefile" ;; + "min/Makefile") CONFIG_FILES="$CONFIG_FILES min/Makefile" ;; + "multimin/Makefile") CONFIG_FILES="$CONFIG_FILES multimin/Makefile" ;; + "ieee-utils/Makefile") CONFIG_FILES="$CONFIG_FILES ieee-utils/Makefile" ;; + "fft/Makefile") CONFIG_FILES="$CONFIG_FILES fft/Makefile" ;; + "specfunc/Makefile") CONFIG_FILES="$CONFIG_FILES specfunc/Makefile" ;; + "dht/Makefile") CONFIG_FILES="$CONFIG_FILES dht/Makefile" ;; + "fit/Makefile") CONFIG_FILES="$CONFIG_FILES fit/Makefile" ;; + "multifit/Makefile") CONFIG_FILES="$CONFIG_FILES multifit/Makefile" ;; + "bspline/Makefile") CONFIG_FILES="$CONFIG_FILES bspline/Makefile" ;; + "statistics/Makefile") CONFIG_FILES="$CONFIG_FILES statistics/Makefile" ;; + "sum/Makefile") CONFIG_FILES="$CONFIG_FILES sum/Makefile" ;; + "roots/Makefile") CONFIG_FILES="$CONFIG_FILES roots/Makefile" ;; + "multiroots/Makefile") CONFIG_FILES="$CONFIG_FILES multiroots/Makefile" ;; + "ntuple/Makefile") CONFIG_FILES="$CONFIG_FILES ntuple/Makefile" ;; + "poly/Makefile") CONFIG_FILES="$CONFIG_FILES poly/Makefile" ;; + "qrng/Makefile") CONFIG_FILES="$CONFIG_FILES qrng/Makefile" ;; + "rng/Makefile") CONFIG_FILES="$CONFIG_FILES rng/Makefile" ;; + "randist/Makefile") CONFIG_FILES="$CONFIG_FILES randist/Makefile" ;; + "siman/Makefile") CONFIG_FILES="$CONFIG_FILES siman/Makefile" ;; + "integration/Makefile") CONFIG_FILES="$CONFIG_FILES integration/Makefile" ;; + "interpolation/Makefile") CONFIG_FILES="$CONFIG_FILES interpolation/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "block/Makefile") CONFIG_FILES="$CONFIG_FILES block/Makefile" ;; + "vector/Makefile") CONFIG_FILES="$CONFIG_FILES vector/Makefile" ;; + "matrix/Makefile") CONFIG_FILES="$CONFIG_FILES matrix/Makefile" ;; + "histogram/Makefile") CONFIG_FILES="$CONFIG_FILES histogram/Makefile" ;; + "monte/Makefile") CONFIG_FILES="$CONFIG_FILES monte/Makefile" ;; + "ode-initval/Makefile") CONFIG_FILES="$CONFIG_FILES ode-initval/Makefile" ;; + "ode-initval2/Makefile") CONFIG_FILES="$CONFIG_FILES ode-initval2/Makefile" ;; + "cblas/Makefile") CONFIG_FILES="$CONFIG_FILES cblas/Makefile" ;; + "blas/Makefile") CONFIG_FILES="$CONFIG_FILES blas/Makefile" ;; + "linalg/Makefile") CONFIG_FILES="$CONFIG_FILES linalg/Makefile" ;; + "eigen/Makefile") CONFIG_FILES="$CONFIG_FILES eigen/Makefile" ;; + "permutation/Makefile") CONFIG_FILES="$CONFIG_FILES permutation/Makefile" ;; + "combination/Makefile") CONFIG_FILES="$CONFIG_FILES combination/Makefile" ;; + "multiset/Makefile") CONFIG_FILES="$CONFIG_FILES multiset/Makefile" ;; + "sort/Makefile") CONFIG_FILES="$CONFIG_FILES sort/Makefile" ;; + "complex/Makefile") CONFIG_FILES="$CONFIG_FILES complex/Makefile" ;; + "diff/Makefile") CONFIG_FILES="$CONFIG_FILES diff/Makefile" ;; + "deriv/Makefile") CONFIG_FILES="$CONFIG_FILES deriv/Makefile" ;; + "cheb/Makefile") CONFIG_FILES="$CONFIG_FILES cheb/Makefile" ;; + "cdf/Makefile") CONFIG_FILES="$CONFIG_FILES cdf/Makefile" ;; + "wavelet/Makefile") CONFIG_FILES="$CONFIG_FILES wavelet/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["am__EXEEXT_FALSE"]="" +S["am__EXEEXT_TRUE"]="#" +S["LTLIBOBJS"]="" +S["HAVE_DARWIN86_IEEE_INTERFACE"]="" +S["HAVE_DARWIN_IEEE_INTERFACE"]="" +S["HAVE_OPENBSD_IEEE_INTERFACE"]="" +S["HAVE_NETBSD_IEEE_INTERFACE"]="" +S["HAVE_OS2EMX_IEEE_INTERFACE"]="" +S["HAVE_FREEBSD_IEEE_INTERFACE"]="" +S["HAVE_AIX_IEEE_INTERFACE"]="" +S["HAVE_IRIX_IEEE_INTERFACE"]="" +S["HAVE_TRU64_IEEE_INTERFACE"]="" +S["HAVE_HPUX_IEEE_INTERFACE"]="" +S["HAVE_HPUX11_IEEE_INTERFACE"]="" +S["HAVE_SOLARIS_IEEE_INTERFACE"]="" +S["HAVE_SUNOS4_IEEE_INTERFACE"]="" +S["HAVE_GNUX86_IEEE_INTERFACE"]="" +S["HAVE_GNUPPC_IEEE_INTERFACE"]="" +S["HAVE_GNUM68K_IEEE_INTERFACE"]="" +S["HAVE_GNUSPARC_IEEE_INTERFACE"]="" +S["LIBOBJS"]="" +S["MINGW32_HOST_FALSE"]="" +S["MINGW32_HOST_TRUE"]="#" +S["GSL_LIBM"]="" +S["GSL_LIBS"]="-L${exec_prefix}/lib -lgsl" +S["GSL_CFLAGS"]="-I${prefix}/include" +S["LIBM"]="" +S["OTOOL64"]=":" +S["OTOOL"]="otool" +S["LIPO"]="lipo" +S["NMEDIT"]="nmedit" +S["DSYMUTIL"]="dsymutil" +S["MANIFEST_TOOL"]=":" +S["RANLIB"]="ranlib" +S["ac_ct_AR"]="ar" +S["AR"]="ar" +S["DLLTOOL"]="false" +S["OBJDUMP"]="false" +S["NM"]="/opt/local/bin/nm" +S["ac_ct_DUMPBIN"]="" +S["DUMPBIN"]="" +S["LD"]="/usr/bin/ld" +S["FGREP"]="/usr/bin/grep -F" +S["EGREP"]="/usr/bin/grep -E" +S["GREP"]="/usr/bin/grep" +S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" +S["LN_S"]="ln -s" +S["CPP"]="cc -E" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__quote"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="cc" +S["CPPFLAGS"]="" +S["LDFLAGS"]="" +S["CFLAGS"]="-g -O2" +S["CC"]="cc" +S["host_os"]="darwin12.2.0" +S["host_vendor"]="apple" +S["host_cpu"]="x86_64" +S["host"]="x86_64-apple-darwin12.2.0" +S["build_os"]="darwin12.2.0" +S["build_vendor"]="apple" +S["build_cpu"]="x86_64" +S["build"]="x86_64-apple-darwin12.2.0" +S["GSL_MINOR_VERSION"]="15" +S["GSL_MAJOR_VERSION"]="1" +S["SED"]="/usr/bin/sed" +S["GSL_LT_CBLAS_VERSION"]="0:0:0" +S["GSL_LT_VERSION"]="16:0:16" +S["MAINT"]="#" +S["MAINTAINER_MODE_FALSE"]="" +S["MAINTAINER_MODE_TRUE"]="#" +S["am__untar"]="${AMTAR} xf -" +S["am__tar"]="${AMTAR} chof - \"$$tardir\"" +S["AMTAR"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run tar" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="awk" +S["mkdir_p"]="/sw/bin/gmkdir -p" +S["MKDIR_P"]="/sw/bin/gmkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="strip" +S["install_sh"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/install-sh" +S["MAKEINFO"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run makeinfo" +S["AUTOHEADER"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoheader" +S["AUTOMAKE"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run automake-1.11" +S["AUTOCONF"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run autoconf" +S["ACLOCAL"]="${SHELL} /Users/jmatthews/Documents/Python/software/gsl-1.15/missing --run aclocal-1.11" +S["VERSION"]="1.15" +S["PACKAGE"]="gsl" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]="-lm " +S["ECHO_T"]="" +S["ECHO_N"]="" +S["ECHO_C"]="\\c" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/Users/jmatthews/Documents/Python/software/gsl-1.15" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="" +S["PACKAGE_BUGREPORT"]="" +S["PACKAGE_STRING"]="gsl 1.15" +S["PACKAGE_VERSION"]="1.15" +S["PACKAGE_TARNAME"]="gsl" +S["PACKAGE_NAME"]="gsl" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/sh" +_ACAWK +cat >>"$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"gsl\"" +D["PACKAGE_TARNAME"]=" \"gsl\"" +D["PACKAGE_VERSION"]=" \"1.15\"" +D["PACKAGE_STRING"]=" \"gsl 1.15\"" +D["PACKAGE_BUGREPORT"]=" \"\"" +D["PACKAGE_URL"]=" \"\"" +D["PACKAGE"]=" \"gsl\"" +D["VERSION"]=" \"1.15\"" +D["RELEASED"]=" /**/" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["HAVE_DLFCN_H"]=" 1" +D["LT_OBJDIR"]=" \".libs/\"" +D["HAVE_INLINE"]=" 1" +D["HAVE_C99_INLINE"]=" 1" +D["HAVE_VPRINTF"]=" 1" +D["HAVE_MEMCPY"]=" 1" +D["HAVE_MEMMOVE"]=" 1" +D["HAVE_STRDUP"]=" 1" +D["HAVE_STRTOL"]=" 1" +D["HAVE_STRTOUL"]=" 1" +D["HAVE_EXIT_SUCCESS_AND_FAILURE"]=" 1" +D["HAVE_LIBM"]=" 1" +D["HAVE_DECL_FEENABLEEXCEPT"]=" 0" +D["HAVE_DECL_FESETTRAPENABLE"]=" 0" +D["HAVE_DECL_HYPOT"]=" 1" +D["HAVE_DECL_EXPM1"]=" 1" +D["HAVE_DECL_ACOSH"]=" 1" +D["HAVE_DECL_ASINH"]=" 1" +D["HAVE_DECL_ATANH"]=" 1" +D["HAVE_DECL_LDEXP"]=" 1" +D["HAVE_DECL_FREXP"]=" 1" +D["HAVE_DECL_FPRND_T"]=" 0" +D["HAVE_DECL_ISINF"]=" 1" +D["HAVE_DECL_ISFINITE"]=" 1" +D["HAVE_DECL_FINITE"]=" 1" +D["HAVE_DECL_ISNAN"]=" 1" +D["HAVE_DECL_LOG1P"]=" 1" +D["HAVE_PRINTF_LONGDOUBLE"]=" 1" +D["HAVE_EXTENDED_PRECISION_REGISTERS"]=" 1" +D["HAVE_UNKNOWN_IEEE_INTERFACE"]=" 1" +D["HAVE_IEEE_COMPARISONS"]=" 1" +D["HAVE_IEEE_DENORMALS"]=" 1" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 diff --git a/software/gsl-1.15/config.sub b/software/gsl-1.15/config.sub new file mode 100755 index 000000000..2a55a5075 --- /dev/null +++ b/software/gsl-1.15/config.sub @@ -0,0 +1,1705 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/software/gsl-1.15/configure b/software/gsl-1.15/configure new file mode 100755 index 000000000..590c8971b --- /dev/null +++ b/software/gsl-1.15/configure @@ -0,0 +1,15076 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for gsl 1.15. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='gsl' +PACKAGE_TARNAME='gsl' +PACKAGE_VERSION='1.15' +PACKAGE_STRING='gsl 1.15' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="gsl_math.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +HAVE_DARWIN86_IEEE_INTERFACE +HAVE_DARWIN_IEEE_INTERFACE +HAVE_OPENBSD_IEEE_INTERFACE +HAVE_NETBSD_IEEE_INTERFACE +HAVE_OS2EMX_IEEE_INTERFACE +HAVE_FREEBSD_IEEE_INTERFACE +HAVE_AIX_IEEE_INTERFACE +HAVE_IRIX_IEEE_INTERFACE +HAVE_TRU64_IEEE_INTERFACE +HAVE_HPUX_IEEE_INTERFACE +HAVE_HPUX11_IEEE_INTERFACE +HAVE_SOLARIS_IEEE_INTERFACE +HAVE_SUNOS4_IEEE_INTERFACE +HAVE_GNUX86_IEEE_INTERFACE +HAVE_GNUPPC_IEEE_INTERFACE +HAVE_GNUM68K_IEEE_INTERFACE +HAVE_GNUSPARC_IEEE_INTERFACE +LIBOBJS +MINGW32_HOST_FALSE +MINGW32_HOST_TRUE +GSL_LIBM +GSL_LIBS +GSL_CFLAGS +LIBM +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +LIBTOOL +LN_S +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +GSL_MINOR_VERSION +GSL_MAJOR_VERSION +SED +GSL_LT_CBLAS_VERSION +GSL_LT_VERSION +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures gsl 1.15 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/gsl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of gsl 1.15:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +gsl configure 1.15 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by gsl $as_me 1.15, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gsl' + VERSION='1.15' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +ac_config_headers="$ac_config_headers config.h" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + +GSL_CURRENT=16 +GSL_REVISION=0 +GSL_AGE=16 +CBLAS_CURRENT=0 +CBLAS_REVISION=0 +CBLAS_AGE=0 + +GSL_LT_VERSION="${GSL_CURRENT}:${GSL_REVISION}:${GSL_AGE}" + + +GSL_LT_CBLAS_VERSION="${CBLAS_CURRENT}:${CBLAS_REVISION}:${CBLAS_AGE}" + + +case "$VERSION" in + *+) + ;; + *) + +$as_echo "#define RELEASED /**/" >>confdefs.h + + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +GSL_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([^.][^.]*\).*/\1/'` +GSL_MINOR_VERSION=`echo "$VERSION" | $SED 's/[^.][^.]*.\([^.][^.]*\).*/\1/'` + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4' +macro_revision='1.3293' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if ${ac_cv_c_volatile+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_volatile=yes +else + ac_cv_c_volatile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +$as_echo "#define volatile /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if ${ac_cv_c_char_unsigned+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_char_unsigned=no +else + ac_cv_c_char_unsigned=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h + +fi + + +GSL_CFLAGS="-I$includedir" +GSL_LIBS="-L$libdir -lgsl" +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="-lm" +fi + + ;; +esac + + +GSL_LIBM=$LIBM + + + + + +if test "$ac_cv_c_inline" != no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU-style extern inline" >&5 +$as_echo_n "checking for GNU-style extern inline... " >&6; } +if ${ac_cv_c_extern_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_extern_inline=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern $ac_cv_c_inline double foo(double x); + extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ; + double foo (double x) { return x + 1.0 ; }; +int +main () +{ + foo(1.0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_extern_inline="yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_extern_inline" >&5 +$as_echo "$ac_cv_c_extern_inline" >&6; } + + if test "$ac_cv_c_extern_inline" != no ; then + +$as_echo "#define HAVE_INLINE 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99-style inline" >&5 +$as_echo_n "checking for C99-style inline... " >&6; } +if ${ac_cv_c_c99inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_c99inline=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern inline void* foo() { foo(); return &foo ; }; +int +main () +{ + return foo() != 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_c99inline="yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$ac_cv_c_c99inline" != no ; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +inline void* foo() { foo(); return &foo ; }; +int +main () +{ + return foo() != 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_cv_c_c99inline="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_c99inline" >&5 +$as_echo "$ac_cv_c_c99inline" >&6; } + if test "$ac_cv_c_c99inline" != no ; then + +$as_echo "#define HAVE_INLINE 1" >>confdefs.h + + +$as_echo "#define HAVE_C99_INLINE 1" >>confdefs.h + + fi + fi +fi + +for ac_header in ieeefp.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" +if test "x$ac_cv_header_ieeefp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IEEEFP_H 1 +_ACEOF + +fi + +done + + + +case "$host_os" in + *mingw*) + MINGW=true + ;; +esac + + if test "$MINGW" = "true"; then + MINGW32_HOST_TRUE= + MINGW32_HOST_FALSE='#' +else + MINGW32_HOST_TRUE='#' + MINGW32_HOST_FALSE= +fi + + + +for ac_func in vprintf +do : + ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" +if test "x$ac_cv_func_vprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VPRINTF 1 +_ACEOF + +ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = xyes; then : + +$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h + +fi + +fi +done + + + +ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy" +if test "x$ac_cv_func_memcpy" = xyes; then : + $as_echo "#define HAVE_MEMCPY 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" memcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcpy.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = xyes; then : + $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" memmove.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memmove.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes; then : + $as_echo "#define HAVE_STRDUP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes; then : + $as_echo "#define HAVE_STRTOL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes; then : + $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXIT_SUCCESS and EXIT_FAILURE" >&5 +$as_echo_n "checking for EXIT_SUCCESS and EXIT_FAILURE... " >&6; } +if ${ac_cv_decl_exit_success_and_failure+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef EXIT_SUCCESS +yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + ac_cv_decl_exit_success_and_failure=yes +else + ac_cv_decl_exit_success_and_failure=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_exit_success_and_failure" >&5 +$as_echo "$ac_cv_decl_exit_success_and_failure" >&6; } + +if test "$ac_cv_decl_exit_success_and_failure" = yes ; then + +$as_echo "#define HAVE_EXIT_SUCCESS_AND_FAILURE 1" >>confdefs.h + +fi ; + + +if test "x$LIBS" = "x" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +fi + +ac_fn_c_check_decl "$LINENO" "feenableexcept" "ac_cv_have_decl_feenableexcept" "#define _GNU_SOURCE 1 +#include +" +if test "x$ac_cv_have_decl_feenableexcept" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FEENABLEEXCEPT $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "fesettrapenable" "ac_cv_have_decl_fesettrapenable" "#define _GNU_SOURCE 1 +#include +" +if test "x$ac_cv_have_decl_fesettrapenable" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FESETTRAPENABLE $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "hypot" "ac_cv_have_decl_hypot" "#include +" +if test "x$ac_cv_have_decl_hypot" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_HYPOT $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "expm1" "ac_cv_have_decl_expm1" "#include +" +if test "x$ac_cv_have_decl_expm1" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_EXPM1 $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "acosh" "ac_cv_have_decl_acosh" "#include +" +if test "x$ac_cv_have_decl_acosh" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ACOSH $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "asinh" "ac_cv_have_decl_asinh" "#include +" +if test "x$ac_cv_have_decl_asinh" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ASINH $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "atanh" "ac_cv_have_decl_atanh" "#include +" +if test "x$ac_cv_have_decl_atanh" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ATANH $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "ldexp" "ac_cv_have_decl_ldexp" "#include +" +if test "x$ac_cv_have_decl_ldexp" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LDEXP $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "frexp" "ac_cv_have_decl_frexp" "#include +" +if test "x$ac_cv_have_decl_frexp" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FREXP $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "fprnd_t" "ac_cv_have_decl_fprnd_t" "#include +" +if test "x$ac_cv_have_decl_fprnd_t" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FPRND_T $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include +" +if test "x$ac_cv_have_decl_isinf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISINF $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include +" +if test "x$ac_cv_have_decl_isfinite" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISFINITE $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "finite" "ac_cv_have_decl_finite" "#include +#if HAVE_IEEEFP_H +#include +#endif +" +if test "x$ac_cv_have_decl_finite" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FINITE $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include +" +if test "x$ac_cv_have_decl_isnan" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISNAN $ac_have_decl +_ACEOF + + +case "$host" in + *-*-*openbsd*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: avoiding OpenBSD system log1p - using gsl version" >&5 +$as_echo "avoiding OpenBSD system log1p - using gsl version" >&6; } + ;; + *) + ac_fn_c_check_decl "$LINENO" "log1p" "ac_cv_have_decl_log1p" "#include +" +if test "x$ac_cv_have_decl_log1p" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOG1P $ac_have_decl +_ACEOF + + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double stdio" >&5 +$as_echo_n "checking for long double stdio... " >&6; } +if ${ac_cv_func_printf_longdouble+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_printf_longdouble="no" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int main (void) +{ +const char * s = "5678.25"; long double x = 1.234 ; +fprintf(stderr,"%Lg\n",x) ; +sscanf(s, "%Lg", &x); +if (x == 5678.25) {exit (0);} else {exit(1); }; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_printf_longdouble="yes" +else + ac_cv_func_printf_longdouble="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_printf_longdouble" >&5 +$as_echo "$ac_cv_func_printf_longdouble" >&6; } + +if test "$ac_cv_func_printf_longdouble" != no; then + +$as_echo "#define HAVE_PRINTF_LONGDOUBLE 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended floating point registers" >&5 +$as_echo_n "checking for extended floating point registers... " >&6; } +if ${ac_cv_c_extended_fp+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host" in + *sparc*-*-*) + ac_cv_c_extended_fp=no + ;; + *powerpc*-*-*) + ac_cv_c_extended_fp=no + ;; + *hppa*-*-*) + ac_cv_c_extended_fp=no + ;; + *alpha*-*-*) + ac_cv_c_extended_fp=no + ;; + *68k*-*-*) + ac_cv_c_extended_fp=yes + ;; + *86-*-*) + ac_cv_c_extended_fp=yes + ;; + x86_64-*-*) + ac_cv_c_extended_fp=yes + ;; + *) + ac_cv_c_extended_fp=unknown + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_extended_fp" >&5 +$as_echo "$ac_cv_c_extended_fp" >&6; } + +if test $ac_cv_c_extended_fp != "no" ; then + +$as_echo "#define HAVE_EXTENDED_PRECISION_REGISTERS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEEE arithmetic interface type" >&5 +$as_echo_n "checking for IEEE arithmetic interface type... " >&6; } +if ${ac_cv_c_ieee_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host" in + sparc-*-linux*) + ac_cv_c_ieee_interface=gnusparc + ;; + m68k-*-linux*) + ac_cv_c_ieee_interface=gnum68k + ;; + powerpc-*-linux*) + ac_cv_c_ieee_interface=gnuppc + ;; + *86-*-gnu | *86_64-*-gnu | *86-*-linux* | *86_64-*-linux*) + ac_cv_c_ieee_interface=gnux86 + ;; + *-*-sunos4*) + ac_cv_c_ieee_interface=sunos4 + ;; + *-*-solaris*) + ac_cv_c_ieee_interface=solaris + ;; + *-*-hpux11*) + ac_cv_c_ieee_interface=hpux11 + ;; + *-*-hpux*) + ac_cv_c_ieee_interface=hpux + ;; + *-*-osf*) + ac_cv_c_ieee_interface=tru64 + ;; + *-*-aix*) + ac_cv_c_ieee_interface=aix + ;; + *-*-irix*) + ac_cv_c_ieee_interface=irix + ;; + powerpc-*-*darwin*) + ac_cv_c_ieee_interface=darwin + ;; + *86-*-*darwin*) + ac_cv_c_ieee_interface=darwin86 + ;; + *-*-*netbsd*) + ac_cv_c_ieee_interface=netbsd + ;; + *-*-*openbsd*) + ac_cv_c_ieee_interface=openbsd + ;; + *-*-*bsd*) + ac_cv_c_ieee_interface=freebsd + ;; + *-*-os2*) + ac_cv_c_ieee_interface=os2emx + ;; + *) + ac_cv_c_ieee_interface=unknown + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_ieee_interface" >&5 +$as_echo "$ac_cv_c_ieee_interface" >&6; } + +if test "$ac_cv_c_ieee_interface" = "gnux86" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FPU_SETCW" >&5 +$as_echo_n "checking for FPU_SETCW... " >&6; } +if ${ac_cv_c_fpu_setcw+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_fpu_setcw=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifndef _FPU_SETCW +#include +#define _FPU_SETCW(cw) __setfpucw(cw) +#endif + +int +main () +{ + unsigned short mode = 0 ; _FPU_SETCW(mode); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_fpu_setcw="yes" +else + ac_cv_c_ieee_interface=unknown +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fpu_setcw" >&5 +$as_echo "$ac_cv_c_fpu_setcw" >&6; } +fi + +if test "$ac_cv_c_ieee_interface" = "gnux86" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE extensions" >&5 +$as_echo_n "checking for SSE extensions... " >&6; } +if ${ac_cv_c_fpu_sse+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_fpu_sse=no + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) + +int +main () +{ + unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_fpu_sse="yes" +else + ac_cv_c_fpu_sse="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) + +int +main () +{ + unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_fpu_sse="yes" +else + ac_cv_c_fpu_sse="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fpu_sse" >&5 +$as_echo "$ac_cv_c_fpu_sse" >&6; } + + if test $ac_cv_c_fpu_sse = yes; then + +$as_echo "#define HAVE_FPU_X86_SSE 1" >>confdefs.h + + fi +fi + +ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE + +cat >>confdefs.h <<_ACEOF +#define $ac_tr_ieee_interface 1 +_ACEOF + + + + + + + + + + + + + + + + + + + + + +save_cflags="$CFLAGS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEEE compiler flags" >&5 +$as_echo_n "checking for IEEE compiler flags... " >&6; } +if ${ac_cv_c_ieee_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "$host" in + alpha*-*-*) + if test X"$GCC" = Xyes ; then + ieee_flags='-mieee -mfp-rounding-mode=d' + else + # This assumes Compaq's C compiler. + ieee_flags='-ieee -fprm d' + fi + ;; +esac +if test X"$ieee_flags" != X ; then + CFLAGS="$ieee_flags $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int foo; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_ieee_flags="$ieee_flags" +else + ac_cv_c_ieee_flags="none" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + ac_cv_c_ieee_flags="none" +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_ieee_flags" >&5 +$as_echo "$ac_cv_c_ieee_flags" >&6; } + +if test "$ac_cv_c_ieee_flags" != "none" ; then + CFLAGS="$ac_cv_c_ieee_flags $save_cflags" +else + CFLAGS="$save_cflags" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEEE comparisons" >&5 +$as_echo_n "checking for IEEE comparisons... " >&6; } +if ${ac_cv_c_ieee_comparisons+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_ieee_comparisons="yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int main (void) +{ + int status; double inf, nan; + inf = exp(1.0e10); + nan = inf / inf ; + status = (nan == nan); + exit (status); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_ieee_comparisons="yes" +else + ac_cv_c_ieee_comparisons="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_ieee_comparisons" >&5 +$as_echo "$ac_cv_c_ieee_comparisons" >&6; } + +if test "$ac_cv_c_ieee_comparisons" != no ; then + +$as_echo "#define HAVE_IEEE_COMPARISONS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEEE denormalized values" >&5 +$as_echo_n "checking for IEEE denormalized values... " >&6; } +if ${ac_cv_c_ieee_denormals+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_ieee_denormals="yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int main (void) +{ + int i, status; + volatile double z = 1e-308; + for (i = 0; i < 5; i++) { z = z / 10.0 ; }; + for (i = 0; i < 5; i++) { z = z * 10.0 ; }; + status = (z == 0.0); + exit (status); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_ieee_denormals="yes" +else + ac_cv_c_ieee_denormals="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_ieee_denormals" >&5 +$as_echo "$ac_cv_c_ieee_denormals" >&6; } + +if test "$ac_cv_c_ieee_denormals" != no ; then + +$as_echo "#define HAVE_IEEE_DENORMALS 1" >>confdefs.h + +fi + + + + + + + + + + + + + + + + + + + +ac_config_files="$ac_config_files gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile bspline/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile ode-initval2/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile multiset/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MINGW32_HOST_TRUE}" && test -z "${MINGW32_HOST_FALSE}"; then + as_fn_error $? "conditional \"MINGW32_HOST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by gsl $as_me 1.15, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +gsl config.status 1.15 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "gsl_version.h") CONFIG_FILES="$CONFIG_FILES gsl_version.h" ;; + "gsl.spec") CONFIG_FILES="$CONFIG_FILES gsl.spec" ;; + "gsl/Makefile") CONFIG_FILES="$CONFIG_FILES gsl/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "err/Makefile") CONFIG_FILES="$CONFIG_FILES err/Makefile" ;; + "sys/Makefile") CONFIG_FILES="$CONFIG_FILES sys/Makefile" ;; + "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; + "const/Makefile") CONFIG_FILES="$CONFIG_FILES const/Makefile" ;; + "min/Makefile") CONFIG_FILES="$CONFIG_FILES min/Makefile" ;; + "multimin/Makefile") CONFIG_FILES="$CONFIG_FILES multimin/Makefile" ;; + "ieee-utils/Makefile") CONFIG_FILES="$CONFIG_FILES ieee-utils/Makefile" ;; + "fft/Makefile") CONFIG_FILES="$CONFIG_FILES fft/Makefile" ;; + "specfunc/Makefile") CONFIG_FILES="$CONFIG_FILES specfunc/Makefile" ;; + "dht/Makefile") CONFIG_FILES="$CONFIG_FILES dht/Makefile" ;; + "fit/Makefile") CONFIG_FILES="$CONFIG_FILES fit/Makefile" ;; + "multifit/Makefile") CONFIG_FILES="$CONFIG_FILES multifit/Makefile" ;; + "bspline/Makefile") CONFIG_FILES="$CONFIG_FILES bspline/Makefile" ;; + "statistics/Makefile") CONFIG_FILES="$CONFIG_FILES statistics/Makefile" ;; + "sum/Makefile") CONFIG_FILES="$CONFIG_FILES sum/Makefile" ;; + "roots/Makefile") CONFIG_FILES="$CONFIG_FILES roots/Makefile" ;; + "multiroots/Makefile") CONFIG_FILES="$CONFIG_FILES multiroots/Makefile" ;; + "ntuple/Makefile") CONFIG_FILES="$CONFIG_FILES ntuple/Makefile" ;; + "poly/Makefile") CONFIG_FILES="$CONFIG_FILES poly/Makefile" ;; + "qrng/Makefile") CONFIG_FILES="$CONFIG_FILES qrng/Makefile" ;; + "rng/Makefile") CONFIG_FILES="$CONFIG_FILES rng/Makefile" ;; + "randist/Makefile") CONFIG_FILES="$CONFIG_FILES randist/Makefile" ;; + "siman/Makefile") CONFIG_FILES="$CONFIG_FILES siman/Makefile" ;; + "integration/Makefile") CONFIG_FILES="$CONFIG_FILES integration/Makefile" ;; + "interpolation/Makefile") CONFIG_FILES="$CONFIG_FILES interpolation/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "block/Makefile") CONFIG_FILES="$CONFIG_FILES block/Makefile" ;; + "vector/Makefile") CONFIG_FILES="$CONFIG_FILES vector/Makefile" ;; + "matrix/Makefile") CONFIG_FILES="$CONFIG_FILES matrix/Makefile" ;; + "histogram/Makefile") CONFIG_FILES="$CONFIG_FILES histogram/Makefile" ;; + "monte/Makefile") CONFIG_FILES="$CONFIG_FILES monte/Makefile" ;; + "ode-initval/Makefile") CONFIG_FILES="$CONFIG_FILES ode-initval/Makefile" ;; + "ode-initval2/Makefile") CONFIG_FILES="$CONFIG_FILES ode-initval2/Makefile" ;; + "cblas/Makefile") CONFIG_FILES="$CONFIG_FILES cblas/Makefile" ;; + "blas/Makefile") CONFIG_FILES="$CONFIG_FILES blas/Makefile" ;; + "linalg/Makefile") CONFIG_FILES="$CONFIG_FILES linalg/Makefile" ;; + "eigen/Makefile") CONFIG_FILES="$CONFIG_FILES eigen/Makefile" ;; + "permutation/Makefile") CONFIG_FILES="$CONFIG_FILES permutation/Makefile" ;; + "combination/Makefile") CONFIG_FILES="$CONFIG_FILES combination/Makefile" ;; + "multiset/Makefile") CONFIG_FILES="$CONFIG_FILES multiset/Makefile" ;; + "sort/Makefile") CONFIG_FILES="$CONFIG_FILES sort/Makefile" ;; + "complex/Makefile") CONFIG_FILES="$CONFIG_FILES complex/Makefile" ;; + "diff/Makefile") CONFIG_FILES="$CONFIG_FILES diff/Makefile" ;; + "deriv/Makefile") CONFIG_FILES="$CONFIG_FILES deriv/Makefile" ;; + "cheb/Makefile") CONFIG_FILES="$CONFIG_FILES cheb/Makefile" ;; + "cdf/Makefile") CONFIG_FILES="$CONFIG_FILES cdf/Makefile" ;; + "wavelet/Makefile") CONFIG_FILES="$CONFIG_FILES wavelet/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/software/gsl-1.15/configure.ac b/software/gsl-1.15/configure.ac new file mode 100644 index 000000000..0855ddc38 --- /dev/null +++ b/software/gsl-1.15/configure.ac @@ -0,0 +1,567 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT([gsl],[1.15]) +AC_CONFIG_SRCDIR(gsl_math.h) + +AM_INIT_AUTOMAKE([gnu]) +AC_CONFIG_HEADERS([config.h]) +AM_MAINTAINER_MODE + +dnl Library versioning (C:R:A == current:revision:age) +dnl See the libtool manual for an explanation of the numbers +dnl +dnl gsl-1.0 libgsl 0:0:0 libgslcblas 0:0:0 +dnl gsl-1.1 libgsl 1:0:1 libgslcblas 0:0:0 +dnl gsl-1.1.1 libgsl 2:0:2 libgslcblas 0:0:0 +dnl gsl-1.2 libgsl 3:0:3 libgslcblas 0:0:0 +dnl gsl-1.3 libgsl 4:0:4 libgslcblas 0:0:0 +dnl gsl-1.4 libgsl 5:0:5 libgslcblas 0:0:0 +dnl gsl-1.5 libgsl 6:0:6 libgslcblas 0:0:0 +dnl gsl-1.6 libgsl 7:0:7 libgslcblas 0:0:0 +dnl gsl-1.7 libgsl 8:0:8 libgslcblas 0:0:0 +dnl gsl-1.8 libgsl 9:0:9 libgslcblas 0:0:0 +dnl gsl-1.9 libgsl 10:0:10 libgslcblas 0:0:0 +dnl gsl-1.10 libgsl 10:0:10 (*) libgslcblas 0:0:0 +dnl gsl-1.11 libgsl 12:0:12 libgslcblas 0:0:0 +dnl gsl-1.12 libgsl 13:0:13 libgslcblas 0:0:0 +dnl gsl-1.13 libgsl 14:0:14 libgslcblas 0:0:0 +dnl gsl-1.14 libgsl 15:0:15 libgslcblas 0:0:0 +dnl gsl-1.15 libgsl 16:0:16 libgslcblas 0:0:0 +dnl +dnl (*) There was an error on this release. Firstly, the versioning +dnl numbers were not updated. Secondly, 2 functions were removed, but +dnl the age not reset--this should have been 11:0:0. However these +dnl functions were not documented and are regarded as internal, so we +dnl will assume 11:0:11. +dnl +dnl How to update library version number +dnl ==================================== +dnl +dnl C: increment if the interface has additions, changes, removals. +dnl +dnl R: increment any time the source changes; set to 0 if you +dnl incremented CURRENT +dnl +dnl A: increment if any interfaces have been added; set to 0 if any +dnl interfaces have been removed. removal has precedence over adding, +dnl so set to 0 if both happened. + +dnl +GSL_CURRENT=16 +GSL_REVISION=0 +GSL_AGE=16 +dnl +CBLAS_CURRENT=0 +CBLAS_REVISION=0 +CBLAS_AGE=0 + +GSL_LT_VERSION="${GSL_CURRENT}:${GSL_REVISION}:${GSL_AGE}" +AC_SUBST(GSL_LT_VERSION) + +GSL_LT_CBLAS_VERSION="${CBLAS_CURRENT}:${CBLAS_REVISION}:${CBLAS_AGE}" +AC_SUBST(GSL_LT_CBLAS_VERSION) + +case "$VERSION" in + *+) + ;; + *) + AC_DEFINE(RELEASED,[],[Defined if this is an official release]) + ;; +esac + +dnl Split VERSION into GSL_VERSION_MAJOR and GSL_VERSION_MINOR +dnl Follows AX_SPLIT_VERSION macro from AC-Archive +dnl Rhys Ulerich +AC_PROG_SED +GSL_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'` +GSL_MINOR_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` +AC_SUBST(GSL_MAJOR_VERSION) +AC_SUBST(GSL_MINOR_VERSION) + +dnl things required by automake +dnl AC_ARG_PROGRAM +AC_PROG_MAKE_SET + +dnl Check for which system. +AC_CANONICAL_HOST + +dnl Checks for programs. +AC_LANG(C) +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_LIBTOOL + +dnl Check compiler features +AC_TYPE_SIZE_T +dnl AC_C_CONST +AC_C_VOLATILE +AC_C_INLINE +AC_C_CHAR_UNSIGNED + +GSL_CFLAGS="-I$includedir" +GSL_LIBS="-L$libdir -lgsl" +dnl macro from libtool - can be replaced with LT_LIB_M when we require libtool 2 +AC_CHECK_LIBM +GSL_LIBM=$LIBM + +AC_SUBST(GSL_CFLAGS) +AC_SUBST(GSL_LIBS) +AC_SUBST(GSL_LIBM) + +if test "$ac_cv_c_inline" != no ; then +dnl Check for "extern inline", using a modified version of the test +dnl for AC_C_INLINE from acspecific.mt +dnl + AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline, + [ac_cv_c_extern_inline=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x); + extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ; + double foo (double x) { return x + 1.0 ; };]], [[ foo(1.0) ]])],[ac_cv_c_extern_inline="yes"],[]) + ]) + + if test "$ac_cv_c_extern_inline" != no ; then + AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline]) + else + AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline, + [ac_cv_c_c99inline=no + dnl next line is a necessary condition + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern inline void* foo() { foo(); return &foo ; };]], + [[ return foo() != 0 ]])],[ac_cv_c_c99inline="yes"],[]) + dnl but not sufficient, extern must work but inline on its own should not + if test "$ac_cv_c_c99inline" != no ; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[inline void* foo() { foo(); return &foo ; };]], + [[ return foo() != 0 ]])],[],ac_cv_c_c99inline="no") + fi + ]) + if test "$ac_cv_c_c99inline" != no ; then + AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline]) + AC_DEFINE(HAVE_C99_INLINE,[1],[Define if you have inline with C99 behavior]) + fi + fi +fi + +dnl Checks for header files. +AC_CHECK_HEADERS(ieeefp.h) + +dnl Checks for typedefs, structures, and compiler characteristics. + +case "$host_os" in + *mingw*) + MINGW=true + ;; +esac + +AM_CONDITIONAL(MINGW32_HOST, test "$MINGW" = "true") + +dnl Checks for library functions. + +dnl AC_FUNC_ALLOCA +AC_FUNC_VPRINTF + +dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added. +dnl removed strerror from this list, it's hardcoded in the err/ directory +dnl Any functions which appear in this list of functions should be provided +dnl in the utils/ directory +dnl xmalloc is not used, removed (bjg) +AC_REPLACE_FUNCS(memcpy memmove strdup strtol strtoul) + +AC_CACHE_CHECK(for EXIT_SUCCESS and EXIT_FAILURE, +ac_cv_decl_exit_success_and_failure, +AC_EGREP_CPP(yes, +[ +#include +#ifdef EXIT_SUCCESS +yes +#endif +], +ac_cv_decl_exit_success_and_failure=yes, +ac_cv_decl_exit_success_and_failure=no) +) + +if test "$ac_cv_decl_exit_success_and_failure" = yes ; then + AC_DEFINE(HAVE_EXIT_SUCCESS_AND_FAILURE,1,[Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h]) +fi ; + +dnl Use alternate libm if specified by user + +if test "x$LIBS" = "x" ; then + AC_CHECK_LIB(m, cos) +fi + +dnl Remember to put a definition in acconfig.h for each of these +AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1 +#include ]) +AC_CHECK_DECLS(fesettrapenable,,,[#define _GNU_SOURCE 1 +#include ]) +AC_CHECK_DECLS(hypot,,,[#include ]) +AC_CHECK_DECLS(expm1,,,[#include ]) +AC_CHECK_DECLS(acosh,,,[#include ]) +AC_CHECK_DECLS(asinh,,,[#include ]) +AC_CHECK_DECLS(atanh,,,[#include ]) +AC_CHECK_DECLS(ldexp,,,[#include ]) +AC_CHECK_DECLS(frexp,,,[#include ]) +AC_CHECK_DECLS([fprnd_t],[],[],[[#include ]]) +AC_CHECK_DECLS(isinf,,,[#include ]) +AC_CHECK_DECLS(isfinite,,,[#include ]) +AC_CHECK_DECLS(finite,,,[#include +#if HAVE_IEEEFP_H +#include +#endif]) +AC_CHECK_DECLS(isnan,,,[#include ]) + +dnl OpenBSD has a broken implementation of log1p. +case "$host" in + *-*-*openbsd*) + AC_MSG_RESULT([avoiding OpenBSD system log1p - using gsl version]) + ;; + *) + AC_CHECK_DECLS(log1p,,,[#include ]) + ;; +esac + +AC_CACHE_CHECK([for long double stdio], ac_cv_func_printf_longdouble, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +int main (void) +{ +const char * s = "5678.25"; long double x = 1.234 ; +fprintf(stderr,"%Lg\n",x) ; +sscanf(s, "%Lg", &x); +if (x == 5678.25) {exit (0);} else {exit(1); }; +}]])],[ac_cv_func_printf_longdouble="yes"],[ac_cv_func_printf_longdouble="no"],[ac_cv_func_printf_longdouble="no"])]) + +if test "$ac_cv_func_printf_longdouble" != no; then + AC_DEFINE(HAVE_PRINTF_LONGDOUBLE,1,[Define this if printf can handle %Lf for long double]) +fi + +AC_CACHE_CHECK([for extended floating point registers],ac_cv_c_extended_fp, +[case "$host" in + *sparc*-*-*) + ac_cv_c_extended_fp=no + ;; + *powerpc*-*-*) + ac_cv_c_extended_fp=no + ;; + *hppa*-*-*) + ac_cv_c_extended_fp=no + ;; + *alpha*-*-*) + ac_cv_c_extended_fp=no + ;; + *68k*-*-*) + ac_cv_c_extended_fp=yes + ;; + *86-*-*) + ac_cv_c_extended_fp=yes + ;; + x86_64-*-*) + ac_cv_c_extended_fp=yes + ;; + *) + ac_cv_c_extended_fp=unknown + ;; +esac +]) + +if test $ac_cv_c_extended_fp != "no" ; then + AC_DEFINE(HAVE_EXTENDED_PRECISION_REGISTERS,1,[Defined on architectures with excess floating-point precision]) +fi + +AC_CACHE_CHECK([for IEEE arithmetic interface type], ac_cv_c_ieee_interface, +[case "$host" in + sparc-*-linux*) + ac_cv_c_ieee_interface=gnusparc + ;; + m68k-*-linux*) + ac_cv_c_ieee_interface=gnum68k + ;; + powerpc-*-linux*) + ac_cv_c_ieee_interface=gnuppc + ;; + *86-*-gnu | *86_64-*-gnu | *86-*-linux* | *86_64-*-linux*) + ac_cv_c_ieee_interface=gnux86 + ;; + *-*-sunos4*) + ac_cv_c_ieee_interface=sunos4 + ;; + *-*-solaris*) + ac_cv_c_ieee_interface=solaris + ;; + *-*-hpux11*) + ac_cv_c_ieee_interface=hpux11 + ;; + *-*-hpux*) + ac_cv_c_ieee_interface=hpux + ;; + *-*-osf*) + ac_cv_c_ieee_interface=tru64 + ;; + *-*-aix*) + ac_cv_c_ieee_interface=aix + ;; + *-*-irix*) + ac_cv_c_ieee_interface=irix + ;; + powerpc-*-*darwin*) + ac_cv_c_ieee_interface=darwin + ;; + *86-*-*darwin*) + ac_cv_c_ieee_interface=darwin86 + ;; + *-*-*netbsd*) + ac_cv_c_ieee_interface=netbsd + ;; + *-*-*openbsd*) + ac_cv_c_ieee_interface=openbsd + ;; + *-*-*bsd*) + ac_cv_c_ieee_interface=freebsd + ;; + *-*-os2*) + ac_cv_c_ieee_interface=os2emx + ;; + *) + ac_cv_c_ieee_interface=unknown + ;; +esac +]) + +if test "$ac_cv_c_ieee_interface" = "gnux86" ; then + AC_CACHE_CHECK([for FPU_SETCW], ac_cv_c_fpu_setcw, + [ac_cv_c_fpu_setcw=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifndef _FPU_SETCW +#include +#define _FPU_SETCW(cw) __setfpucw(cw) +#endif +]], [[ unsigned short mode = 0 ; _FPU_SETCW(mode); ]])],[ac_cv_c_fpu_setcw="yes"],[ac_cv_c_ieee_interface=unknown]) + ]) +fi + +if test "$ac_cv_c_ieee_interface" = "gnux86" ; then + AC_CACHE_CHECK([for SSE extensions], ac_cv_c_fpu_sse, + [ac_cv_c_fpu_sse=no + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) +]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) +]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"]) +])]) + + if test $ac_cv_c_fpu_sse = yes; then + AC_DEFINE([HAVE_FPU_X86_SSE], 1, + [Define if x86 processor has sse extensions.]) + fi +fi + +ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE +AC_DEFINE_UNQUOTED($ac_tr_ieee_interface,1,[IEEE Interface Type]) + +AC_SUBST(HAVE_GNUSPARC_IEEE_INTERFACE) +AC_SUBST(HAVE_GNUM68K_IEEE_INTERFACE) +AC_SUBST(HAVE_GNUPPC_IEEE_INTERFACE) +AC_SUBST(HAVE_GNUX86_IEEE_INTERFACE) +AC_SUBST(HAVE_SUNOS4_IEEE_INTERFACE) +AC_SUBST(HAVE_SOLARIS_IEEE_INTERFACE) +AC_SUBST(HAVE_HPUX11_IEEE_INTERFACE) +AC_SUBST(HAVE_HPUX_IEEE_INTERFACE) +AC_SUBST(HAVE_TRU64_IEEE_INTERFACE) +AC_SUBST(HAVE_IRIX_IEEE_INTERFACE) +AC_SUBST(HAVE_AIX_IEEE_INTERFACE) +AC_SUBST(HAVE_FREEBSD_IEEE_INTERFACE) +AC_SUBST(HAVE_OS2EMX_IEEE_INTERFACE) +AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE) +AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE) +AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE) +AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE) + +dnl Check for IEEE control flags + +save_cflags="$CFLAGS" +AC_CACHE_CHECK([for IEEE compiler flags], ac_cv_c_ieee_flags, +[ +case "$host" in + alpha*-*-*) + if test X"$GCC" = Xyes ; then + ieee_flags='-mieee -mfp-rounding-mode=d' + else + # This assumes Compaq's C compiler. + ieee_flags='-ieee -fprm d' + fi + ;; +esac +if test X"$ieee_flags" != X ; then + CFLAGS="$ieee_flags $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_ieee_flags="$ieee_flags"],[ac_cv_c_ieee_flags="none"]) +else + ac_cv_c_ieee_flags="none" +fi]) + +if test "$ac_cv_c_ieee_flags" != "none" ; then + CFLAGS="$ac_cv_c_ieee_flags $save_cflags" +else + CFLAGS="$save_cflags" +fi + +dnl Check IEEE comparisons, whether "x != x" is true for NaNs +dnl +AC_CACHE_CHECK([for IEEE comparisons], ac_cv_c_ieee_comparisons, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +int main (void) +{ + int status; double inf, nan; + inf = exp(1.0e10); + nan = inf / inf ; + status = (nan == nan); + exit (status); +}]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"]) +]) + +if test "$ac_cv_c_ieee_comparisons" != no ; then + AC_DEFINE(HAVE_IEEE_COMPARISONS,1,[Define this if IEEE comparisons work correctly (e.g. NaN != NaN)]) +fi + +dnl Check for IEEE denormalized arithmetic +dnl +AC_CACHE_CHECK([for IEEE denormalized values], ac_cv_c_ieee_denormals, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +int main (void) +{ + int i, status; + volatile double z = 1e-308; + for (i = 0; i < 5; i++) { z = z / 10.0 ; }; + for (i = 0; i < 5; i++) { z = z * 10.0 ; }; + status = (z == 0.0); + exit (status); +}]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"]) +]) + +if test "$ac_cv_c_ieee_denormals" != no ; then + AC_DEFINE(HAVE_IEEE_DENORMALS,1,[Define this if IEEE denormalized numbers are available]) +fi + +AH_TEMPLATE([HIDE_INLINE_STATIC],[Define if you need to hide the static definitions of inline functions]) + +AH_BOTTOM([/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */ +#if !HAVE_EXIT_SUCCESS_AND_FAILURE +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 +#endif]) + +AH_BOTTOM([/* Define one of these if you have a known IEEE arithmetic interface */ +#undef HAVE_GNUSPARC_IEEE_INTERFACE +#undef HAVE_GNUM68K_IEEE_INTERFACE +#undef HAVE_GNUPPC_IEEE_INTERFACE +#undef HAVE_GNUX86_IEEE_INTERFACE +#undef HAVE_SUNOS4_IEEE_INTERFACE +#undef HAVE_SOLARIS_IEEE_INTERFACE +#undef HAVE_HPUX11_IEEE_INTERFACE +#undef HAVE_HPUX_IEEE_INTERFACE +#undef HAVE_TRU64_IEEE_INTERFACE +#undef HAVE_IRIX_IEEE_INTERFACE +#undef HAVE_AIX_IEEE_INTERFACE +#undef HAVE_FREEBSD_IEEE_INTERFACE +#undef HAVE_OS2EMX_IEEE_INTERFACE +#undef HAVE_NETBSD_IEEE_INTERFACE +#undef HAVE_OPENBSD_IEEE_INTERFACE +#undef HAVE_DARWIN_IEEE_INTERFACE +#undef HAVE_DARWIN86_IEEE_INTERFACE]) + +AH_BOTTOM([/* Define a rounding function which moves extended precision values + out of registers and rounds them to double-precision. This should + be used *sparingly*, in places where it is necessary to keep + double-precision rounding for critical expressions while running in + extended precision. For example, the following code should ensure + exact equality, even when extended precision registers are in use, + + double q = GSL_COERCE_DBL(3.0/7.0) ; + if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ; + + It carries a penalty even when the program is running in double + precision mode unless you compile a separate version of the + library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */ + +#if HAVE_EXTENDED_PRECISION_REGISTERS +#define GSL_COERCE_DBL(x) (gsl_coerce_double(x)) +#else +#define GSL_COERCE_DBL(x) (x) +#endif]) + +AH_BOTTOM([/* Substitute gsl functions for missing system functions */ + +#if !HAVE_DECL_HYPOT +#define hypot gsl_hypot +#endif + +#if !HAVE_DECL_LOG1P +#define log1p gsl_log1p +#endif + +#if !HAVE_DECL_EXPM1 +#define expm1 gsl_expm1 +#endif + +#if !HAVE_DECL_ACOSH +#define acosh gsl_acosh +#endif + +#if !HAVE_DECL_ASINH +#define asinh gsl_asinh +#endif + +#if !HAVE_DECL_ATANH +#define atanh gsl_atanh +#endif + +#if !HAVE_DECL_LDEXP +#define ldexp gsl_ldexp +#endif + +#if !HAVE_DECL_FREXP +#define frexp gsl_frexp +#endif + +#if !HAVE_DECL_ISINF +#define isinf gsl_isinf +#endif + +#if !HAVE_DECL_ISFINITE +#define isfinite gsl_finite +#endif + +#if !HAVE_DECL_FINITE +#define finite gsl_finite +#endif + +#if !HAVE_DECL_ISNAN +#define isnan gsl_isnan +#endif]) + +AH_BOTTOM([#ifdef __GNUC__ +#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0); +#else +#define DISCARD_POINTER(p) /* ignoring discarded pointer */ +#endif]) + +AH_BOTTOM([#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK) +#define GSL_RANGE_CHECK 0 /* turn off range checking by default internally */ +#endif]) + +AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; } +]) + +AH_VERBATIM([GSL_DISABLE_DEPRECATED], +[/* Disable deprecated functions and enums while building */ +#define GSL_DISABLE_DEPRECATED 1]) + +dnl +AC_CONFIG_FILES([gsl_version.h gsl.spec gsl/Makefile test/Makefile err/Makefile sys/Makefile utils/Makefile const/Makefile min/Makefile multimin/Makefile ieee-utils/Makefile fft/Makefile specfunc/Makefile dht/Makefile fit/Makefile multifit/Makefile bspline/Makefile statistics/Makefile sum/Makefile roots/Makefile multiroots/Makefile ntuple/Makefile poly/Makefile qrng/Makefile rng/Makefile randist/Makefile siman/Makefile integration/Makefile interpolation/Makefile doc/Makefile block/Makefile vector/Makefile matrix/Makefile histogram/Makefile monte/Makefile ode-initval/Makefile ode-initval2/Makefile cblas/Makefile blas/Makefile linalg/Makefile eigen/Makefile permutation/Makefile combination/Makefile multiset/Makefile sort/Makefile complex/Makefile diff/Makefile deriv/Makefile cheb/Makefile cdf/Makefile wavelet/Makefile Makefile]) +AC_OUTPUT diff --git a/software/gsl-1.15/const/.deps/test.Po b/software/gsl-1.15/const/.deps/test.Po new file mode 100644 index 000000000..80a26a713 --- /dev/null +++ b/software/gsl-1.15/const/.deps/test.Po @@ -0,0 +1,141 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_const.h ../gsl/gsl_const_num.h \ + ../gsl/gsl_const_cgs.h ../gsl/gsl_const_mks.h ../gsl/gsl_const_cgsm.h \ + ../gsl/gsl_const_mksa.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_const.h: + +../gsl/gsl_const_num.h: + +../gsl/gsl_const_cgs.h: + +../gsl/gsl_const_mks.h: + +../gsl/gsl_const_cgsm.h: + +../gsl/gsl_const_mksa.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: diff --git a/software/gsl-1.15/const/ChangeLog b/software/gsl-1.15/const/ChangeLog new file mode 100644 index 000000000..3afae7e5f --- /dev/null +++ b/software/gsl-1.15/const/ChangeLog @@ -0,0 +1,81 @@ +2009-08-17 Brian Gough + + * const.el: removed electromagnetic constants from cgs, now only + in CGSM + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2006-03-21 Brian Gough + + * test.c (main): added some extra tests + +2006-03-17 Brian Gough + + * const.el (gsl-electrical-constants): added debye unit + +2004-05-26 Brian Gough + + * test.c: added stdlib.h for exit() + +2004-03-05 Brian Gough + + * const.el: added CGS and MKS systems back in, with CGSM electrical + units excluded from CGS, for backwards compatibility + +2003-11-27 Brian Gough + + * const.el (gsl-constants): added stefan-boltzmann constant and + thomson cross section + +2003-09-18 Brian Gough + + * test.c: added a test program + + * gsl_const.h: fixed to use new header files for MKSA and CGSM + +2003-06-09 Brian Gough + + * calc-units-update.el: changed to use MKSA and CGSM units, so + that electromagnetic constants are converted correctly + +Sat Jul 20 21:25:56 2002 Brian Gough + + * calc-units-update.el (math-additional-units): changed setvar to + setq, otherwise the new values do not override the original values + +Wed May 29 22:41:31 2002 Brian Gough + + * calc-units-update.el (math-additional-units): updated unit + values, in a backwards compatible way. Made mue an absolute + value, and put Ryd in energy units. + +2002-05-18 Jochen K�pper + + * calc-units-update.el (math-additional-units): Add this file to + provide updated costants for Emacs calc. (These values are in the + current development versions of GNU Emacs and Xemacs already.) + +Mon Apr 1 19:27:57 2002 Brian Gough + + * const.el (gsl-constants): Added newton, dyne, joule, erg and + power-of-ten prefixes, Mega, Giga, Tera, etc. + +Tue Jan 8 21:48:56 2002 Brian Gough + + * const.el (gsl-constants): added bohr_radius and + vacuum_permittivity + +Tue Sep 25 15:15:33 2001 Brian Gough + + * const.el (fn): make all output double precision to avoid + possibility of unexpected integer division. + (gsl-constants): fix definition of barn and btu + (gsl-constants): added solar mass + +Tue Jan 23 16:19:50 2001 Brian Gough + + * const.el (gsl-constants): fixed definition of POINT (from pt to + point, was previously measuring 'pints') + diff --git a/software/gsl-1.15/const/Makefile.am b/software/gsl-1.15/const/Makefile.am new file mode 100644 index 000000000..9a109912e --- /dev/null +++ b/software/gsl-1.15/const/Makefile.am @@ -0,0 +1,15 @@ +pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c + +test_LDADD = ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + + + + diff --git a/software/gsl-1.15/const/Makefile.in b/software/gsl-1.15/const/Makefile.in new file mode 100644 index 000000000..047090957 --- /dev/null +++ b/software/gsl-1.15/const/Makefile.in @@ -0,0 +1,642 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = const +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(test_SOURCES) +DIST_SOURCES = $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pkginclude_HEADERS = gsl_const.h gsl_const_cgs.h gsl_const_mks.h gsl_const_cgsm.h gsl_const_mksa.h gsl_const_num.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu const/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu const/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/const/TODO b/software/gsl-1.15/const/TODO new file mode 100644 index 000000000..3fa249154 --- /dev/null +++ b/software/gsl-1.15/const/TODO @@ -0,0 +1,4 @@ +# -*- org -*- +#+CATEGORY: const + +could add RADIATION_DENSITY_CONSTANT (7.56591e-16) /* J m-3 K-4 */ diff --git a/software/gsl-1.15/const/gsl_const.h b/software/gsl-1.15/const/gsl_const.h new file mode 100644 index 000000000..5d749dc5e --- /dev/null +++ b/software/gsl-1.15/const/gsl_const.h @@ -0,0 +1,31 @@ +/* const/gsl_const.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST__ +#define __GSL_CONST__ + +#include + +#include +#include + +#include +#include + +#endif /* __GSL_CONST__ */ diff --git a/software/gsl-1.15/const/gsl_const_cgs.h b/software/gsl-1.15/const/gsl_const_cgs.h new file mode 100644 index 000000000..ab95b7b08 --- /dev/null +++ b/software/gsl-1.15/const/gsl_const_cgs.h @@ -0,0 +1,116 @@ +/* const/gsl_const_cgs.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + * 2006, 2007, 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST_CGS__ +#define __GSL_CONST_CGS__ + +#define GSL_CONST_CGS_SPEED_OF_LIGHT (2.99792458e10) /* cm / s */ +#define GSL_CONST_CGS_GRAVITATIONAL_CONSTANT (6.673e-8) /* cm^3 / g s^2 */ +#define GSL_CONST_CGS_PLANCKS_CONSTANT_H (6.62606896e-27) /* g cm^2 / s */ +#define GSL_CONST_CGS_PLANCKS_CONSTANT_HBAR (1.05457162825e-27) /* g cm^2 / s */ +#define GSL_CONST_CGS_ASTRONOMICAL_UNIT (1.49597870691e13) /* cm */ +#define GSL_CONST_CGS_LIGHT_YEAR (9.46053620707e17) /* cm */ +#define GSL_CONST_CGS_PARSEC (3.08567758135e18) /* cm */ +#define GSL_CONST_CGS_GRAV_ACCEL (9.80665e2) /* cm / s^2 */ +#define GSL_CONST_CGS_ELECTRON_VOLT (1.602176487e-12) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_MASS_ELECTRON (9.10938188e-28) /* g */ +#define GSL_CONST_CGS_MASS_MUON (1.88353109e-25) /* g */ +#define GSL_CONST_CGS_MASS_PROTON (1.67262158e-24) /* g */ +#define GSL_CONST_CGS_MASS_NEUTRON (1.67492716e-24) /* g */ +#define GSL_CONST_CGS_RYDBERG (2.17987196968e-11) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_BOLTZMANN (1.3806504e-16) /* g cm^2 / K s^2 */ +#define GSL_CONST_CGS_MOLAR_GAS (8.314472e7) /* g cm^2 / K mol s^2 */ +#define GSL_CONST_CGS_STANDARD_GAS_VOLUME (2.2710981e4) /* cm^3 / mol */ +#define GSL_CONST_CGS_MINUTE (6e1) /* s */ +#define GSL_CONST_CGS_HOUR (3.6e3) /* s */ +#define GSL_CONST_CGS_DAY (8.64e4) /* s */ +#define GSL_CONST_CGS_WEEK (6.048e5) /* s */ +#define GSL_CONST_CGS_INCH (2.54e0) /* cm */ +#define GSL_CONST_CGS_FOOT (3.048e1) /* cm */ +#define GSL_CONST_CGS_YARD (9.144e1) /* cm */ +#define GSL_CONST_CGS_MILE (1.609344e5) /* cm */ +#define GSL_CONST_CGS_NAUTICAL_MILE (1.852e5) /* cm */ +#define GSL_CONST_CGS_FATHOM (1.8288e2) /* cm */ +#define GSL_CONST_CGS_MIL (2.54e-3) /* cm */ +#define GSL_CONST_CGS_POINT (3.52777777778e-2) /* cm */ +#define GSL_CONST_CGS_TEXPOINT (3.51459803515e-2) /* cm */ +#define GSL_CONST_CGS_MICRON (1e-4) /* cm */ +#define GSL_CONST_CGS_ANGSTROM (1e-8) /* cm */ +#define GSL_CONST_CGS_HECTARE (1e8) /* cm^2 */ +#define GSL_CONST_CGS_ACRE (4.04685642241e7) /* cm^2 */ +#define GSL_CONST_CGS_BARN (1e-24) /* cm^2 */ +#define GSL_CONST_CGS_LITER (1e3) /* cm^3 */ +#define GSL_CONST_CGS_US_GALLON (3.78541178402e3) /* cm^3 */ +#define GSL_CONST_CGS_QUART (9.46352946004e2) /* cm^3 */ +#define GSL_CONST_CGS_PINT (4.73176473002e2) /* cm^3 */ +#define GSL_CONST_CGS_CUP (2.36588236501e2) /* cm^3 */ +#define GSL_CONST_CGS_FLUID_OUNCE (2.95735295626e1) /* cm^3 */ +#define GSL_CONST_CGS_TABLESPOON (1.47867647813e1) /* cm^3 */ +#define GSL_CONST_CGS_TEASPOON (4.92892159375e0) /* cm^3 */ +#define GSL_CONST_CGS_CANADIAN_GALLON (4.54609e3) /* cm^3 */ +#define GSL_CONST_CGS_UK_GALLON (4.546092e3) /* cm^3 */ +#define GSL_CONST_CGS_MILES_PER_HOUR (4.4704e1) /* cm / s */ +#define GSL_CONST_CGS_KILOMETERS_PER_HOUR (2.77777777778e1) /* cm / s */ +#define GSL_CONST_CGS_KNOT (5.14444444444e1) /* cm / s */ +#define GSL_CONST_CGS_POUND_MASS (4.5359237e2) /* g */ +#define GSL_CONST_CGS_OUNCE_MASS (2.8349523125e1) /* g */ +#define GSL_CONST_CGS_TON (9.0718474e5) /* g */ +#define GSL_CONST_CGS_METRIC_TON (1e6) /* g */ +#define GSL_CONST_CGS_UK_TON (1.0160469088e6) /* g */ +#define GSL_CONST_CGS_TROY_OUNCE (3.1103475e1) /* g */ +#define GSL_CONST_CGS_CARAT (2e-1) /* g */ +#define GSL_CONST_CGS_UNIFIED_ATOMIC_MASS (1.660538782e-24) /* g */ +#define GSL_CONST_CGS_GRAM_FORCE (9.80665e2) /* cm g / s^2 */ +#define GSL_CONST_CGS_POUND_FORCE (4.44822161526e5) /* cm g / s^2 */ +#define GSL_CONST_CGS_KILOPOUND_FORCE (4.44822161526e8) /* cm g / s^2 */ +#define GSL_CONST_CGS_POUNDAL (1.38255e4) /* cm g / s^2 */ +#define GSL_CONST_CGS_CALORIE (4.1868e7) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_BTU (1.05505585262e10) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_THERM (1.05506e15) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_HORSEPOWER (7.457e9) /* g cm^2 / s^3 */ +#define GSL_CONST_CGS_BAR (1e6) /* g / cm s^2 */ +#define GSL_CONST_CGS_STD_ATMOSPHERE (1.01325e6) /* g / cm s^2 */ +#define GSL_CONST_CGS_TORR (1.33322368421e3) /* g / cm s^2 */ +#define GSL_CONST_CGS_METER_OF_MERCURY (1.33322368421e6) /* g / cm s^2 */ +#define GSL_CONST_CGS_INCH_OF_MERCURY (3.38638815789e4) /* g / cm s^2 */ +#define GSL_CONST_CGS_INCH_OF_WATER (2.490889e3) /* g / cm s^2 */ +#define GSL_CONST_CGS_PSI (6.89475729317e4) /* g / cm s^2 */ +#define GSL_CONST_CGS_POISE (1e0) /* g / cm s */ +#define GSL_CONST_CGS_STOKES (1e0) /* cm^2 / s */ +#define GSL_CONST_CGS_STILB (1e0) /* cd / cm^2 */ +#define GSL_CONST_CGS_LUMEN (1e0) /* cd sr */ +#define GSL_CONST_CGS_LUX (1e-4) /* cd sr / cm^2 */ +#define GSL_CONST_CGS_PHOT (1e0) /* cd sr / cm^2 */ +#define GSL_CONST_CGS_FOOTCANDLE (1.076e-3) /* cd sr / cm^2 */ +#define GSL_CONST_CGS_LAMBERT (1e0) /* cd sr / cm^2 */ +#define GSL_CONST_CGS_FOOTLAMBERT (1.07639104e-3) /* cd sr / cm^2 */ +#define GSL_CONST_CGS_CURIE (3.7e10) /* 1 / s */ +#define GSL_CONST_CGS_ROENTGEN (2.58e-7) /* A s / g */ +#define GSL_CONST_CGS_RAD (1e2) /* cm^2 / s^2 */ +#define GSL_CONST_CGS_SOLAR_MASS (1.98892e33) /* g */ +#define GSL_CONST_CGS_BOHR_RADIUS (5.291772083e-9) /* cm */ +#define GSL_CONST_CGS_NEWTON (1e5) /* cm g / s^2 */ +#define GSL_CONST_CGS_DYNE (1e0) /* cm g / s^2 */ +#define GSL_CONST_CGS_JOULE (1e7) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_ERG (1e0) /* g cm^2 / s^2 */ +#define GSL_CONST_CGS_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-5) /* g / K^4 s^3 */ +#define GSL_CONST_CGS_THOMSON_CROSS_SECTION (6.65245893699e-25) /* cm^2 */ + +#endif /* __GSL_CONST_CGS__ */ diff --git a/software/gsl-1.15/const/gsl_const_cgsm.h b/software/gsl-1.15/const/gsl_const_cgsm.h new file mode 100644 index 000000000..2047e5edd --- /dev/null +++ b/software/gsl-1.15/const/gsl_const_cgsm.h @@ -0,0 +1,122 @@ +/* const/gsl_const_cgsm.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + * 2006, 2007, 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST_CGSM__ +#define __GSL_CONST_CGSM__ + +#define GSL_CONST_CGSM_SPEED_OF_LIGHT (2.99792458e10) /* cm / s */ +#define GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT (6.673e-8) /* cm^3 / g s^2 */ +#define GSL_CONST_CGSM_PLANCKS_CONSTANT_H (6.62606896e-27) /* g cm^2 / s */ +#define GSL_CONST_CGSM_PLANCKS_CONSTANT_HBAR (1.05457162825e-27) /* g cm^2 / s */ +#define GSL_CONST_CGSM_ASTRONOMICAL_UNIT (1.49597870691e13) /* cm */ +#define GSL_CONST_CGSM_LIGHT_YEAR (9.46053620707e17) /* cm */ +#define GSL_CONST_CGSM_PARSEC (3.08567758135e18) /* cm */ +#define GSL_CONST_CGSM_GRAV_ACCEL (9.80665e2) /* cm / s^2 */ +#define GSL_CONST_CGSM_ELECTRON_VOLT (1.602176487e-12) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_MASS_ELECTRON (9.10938188e-28) /* g */ +#define GSL_CONST_CGSM_MASS_MUON (1.88353109e-25) /* g */ +#define GSL_CONST_CGSM_MASS_PROTON (1.67262158e-24) /* g */ +#define GSL_CONST_CGSM_MASS_NEUTRON (1.67492716e-24) /* g */ +#define GSL_CONST_CGSM_RYDBERG (2.17987196968e-11) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_BOLTZMANN (1.3806504e-16) /* g cm^2 / K s^2 */ +#define GSL_CONST_CGSM_MOLAR_GAS (8.314472e7) /* g cm^2 / K mol s^2 */ +#define GSL_CONST_CGSM_STANDARD_GAS_VOLUME (2.2710981e4) /* cm^3 / mol */ +#define GSL_CONST_CGSM_MINUTE (6e1) /* s */ +#define GSL_CONST_CGSM_HOUR (3.6e3) /* s */ +#define GSL_CONST_CGSM_DAY (8.64e4) /* s */ +#define GSL_CONST_CGSM_WEEK (6.048e5) /* s */ +#define GSL_CONST_CGSM_INCH (2.54e0) /* cm */ +#define GSL_CONST_CGSM_FOOT (3.048e1) /* cm */ +#define GSL_CONST_CGSM_YARD (9.144e1) /* cm */ +#define GSL_CONST_CGSM_MILE (1.609344e5) /* cm */ +#define GSL_CONST_CGSM_NAUTICAL_MILE (1.852e5) /* cm */ +#define GSL_CONST_CGSM_FATHOM (1.8288e2) /* cm */ +#define GSL_CONST_CGSM_MIL (2.54e-3) /* cm */ +#define GSL_CONST_CGSM_POINT (3.52777777778e-2) /* cm */ +#define GSL_CONST_CGSM_TEXPOINT (3.51459803515e-2) /* cm */ +#define GSL_CONST_CGSM_MICRON (1e-4) /* cm */ +#define GSL_CONST_CGSM_ANGSTROM (1e-8) /* cm */ +#define GSL_CONST_CGSM_HECTARE (1e8) /* cm^2 */ +#define GSL_CONST_CGSM_ACRE (4.04685642241e7) /* cm^2 */ +#define GSL_CONST_CGSM_BARN (1e-24) /* cm^2 */ +#define GSL_CONST_CGSM_LITER (1e3) /* cm^3 */ +#define GSL_CONST_CGSM_US_GALLON (3.78541178402e3) /* cm^3 */ +#define GSL_CONST_CGSM_QUART (9.46352946004e2) /* cm^3 */ +#define GSL_CONST_CGSM_PINT (4.73176473002e2) /* cm^3 */ +#define GSL_CONST_CGSM_CUP (2.36588236501e2) /* cm^3 */ +#define GSL_CONST_CGSM_FLUID_OUNCE (2.95735295626e1) /* cm^3 */ +#define GSL_CONST_CGSM_TABLESPOON (1.47867647813e1) /* cm^3 */ +#define GSL_CONST_CGSM_TEASPOON (4.92892159375e0) /* cm^3 */ +#define GSL_CONST_CGSM_CANADIAN_GALLON (4.54609e3) /* cm^3 */ +#define GSL_CONST_CGSM_UK_GALLON (4.546092e3) /* cm^3 */ +#define GSL_CONST_CGSM_MILES_PER_HOUR (4.4704e1) /* cm / s */ +#define GSL_CONST_CGSM_KILOMETERS_PER_HOUR (2.77777777778e1) /* cm / s */ +#define GSL_CONST_CGSM_KNOT (5.14444444444e1) /* cm / s */ +#define GSL_CONST_CGSM_POUND_MASS (4.5359237e2) /* g */ +#define GSL_CONST_CGSM_OUNCE_MASS (2.8349523125e1) /* g */ +#define GSL_CONST_CGSM_TON (9.0718474e5) /* g */ +#define GSL_CONST_CGSM_METRIC_TON (1e6) /* g */ +#define GSL_CONST_CGSM_UK_TON (1.0160469088e6) /* g */ +#define GSL_CONST_CGSM_TROY_OUNCE (3.1103475e1) /* g */ +#define GSL_CONST_CGSM_CARAT (2e-1) /* g */ +#define GSL_CONST_CGSM_UNIFIED_ATOMIC_MASS (1.660538782e-24) /* g */ +#define GSL_CONST_CGSM_GRAM_FORCE (9.80665e2) /* cm g / s^2 */ +#define GSL_CONST_CGSM_POUND_FORCE (4.44822161526e5) /* cm g / s^2 */ +#define GSL_CONST_CGSM_KILOPOUND_FORCE (4.44822161526e8) /* cm g / s^2 */ +#define GSL_CONST_CGSM_POUNDAL (1.38255e4) /* cm g / s^2 */ +#define GSL_CONST_CGSM_CALORIE (4.1868e7) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_BTU (1.05505585262e10) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_THERM (1.05506e15) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_HORSEPOWER (7.457e9) /* g cm^2 / s^3 */ +#define GSL_CONST_CGSM_BAR (1e6) /* g / cm s^2 */ +#define GSL_CONST_CGSM_STD_ATMOSPHERE (1.01325e6) /* g / cm s^2 */ +#define GSL_CONST_CGSM_TORR (1.33322368421e3) /* g / cm s^2 */ +#define GSL_CONST_CGSM_METER_OF_MERCURY (1.33322368421e6) /* g / cm s^2 */ +#define GSL_CONST_CGSM_INCH_OF_MERCURY (3.38638815789e4) /* g / cm s^2 */ +#define GSL_CONST_CGSM_INCH_OF_WATER (2.490889e3) /* g / cm s^2 */ +#define GSL_CONST_CGSM_PSI (6.89475729317e4) /* g / cm s^2 */ +#define GSL_CONST_CGSM_POISE (1e0) /* g / cm s */ +#define GSL_CONST_CGSM_STOKES (1e0) /* cm^2 / s */ +#define GSL_CONST_CGSM_STILB (1e0) /* cd / cm^2 */ +#define GSL_CONST_CGSM_LUMEN (1e0) /* cd sr */ +#define GSL_CONST_CGSM_LUX (1e-4) /* cd sr / cm^2 */ +#define GSL_CONST_CGSM_PHOT (1e0) /* cd sr / cm^2 */ +#define GSL_CONST_CGSM_FOOTCANDLE (1.076e-3) /* cd sr / cm^2 */ +#define GSL_CONST_CGSM_LAMBERT (1e0) /* cd sr / cm^2 */ +#define GSL_CONST_CGSM_FOOTLAMBERT (1.07639104e-3) /* cd sr / cm^2 */ +#define GSL_CONST_CGSM_CURIE (3.7e10) /* 1 / s */ +#define GSL_CONST_CGSM_ROENTGEN (2.58e-8) /* abamp s / g */ +#define GSL_CONST_CGSM_RAD (1e2) /* cm^2 / s^2 */ +#define GSL_CONST_CGSM_SOLAR_MASS (1.98892e33) /* g */ +#define GSL_CONST_CGSM_BOHR_RADIUS (5.291772083e-9) /* cm */ +#define GSL_CONST_CGSM_NEWTON (1e5) /* cm g / s^2 */ +#define GSL_CONST_CGSM_DYNE (1e0) /* cm g / s^2 */ +#define GSL_CONST_CGSM_JOULE (1e7) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_ERG (1e0) /* g cm^2 / s^2 */ +#define GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-5) /* g / K^4 s^3 */ +#define GSL_CONST_CGSM_THOMSON_CROSS_SECTION (6.65245893699e-25) /* cm^2 */ +#define GSL_CONST_CGSM_BOHR_MAGNETON (9.27400899e-21) /* abamp cm^2 */ +#define GSL_CONST_CGSM_NUCLEAR_MAGNETON (5.05078317e-24) /* abamp cm^2 */ +#define GSL_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT (9.28476362e-21) /* abamp cm^2 */ +#define GSL_CONST_CGSM_PROTON_MAGNETIC_MOMENT (1.410606633e-23) /* abamp cm^2 */ +#define GSL_CONST_CGSM_FARADAY (9.64853429775e3) /* abamp s / mol */ +#define GSL_CONST_CGSM_ELECTRON_CHARGE (1.602176487e-20) /* abamp s */ + +#endif /* __GSL_CONST_CGSM__ */ diff --git a/software/gsl-1.15/const/gsl_const_mks.h b/software/gsl-1.15/const/gsl_const_mks.h new file mode 100644 index 000000000..bc60e2acb --- /dev/null +++ b/software/gsl-1.15/const/gsl_const_mks.h @@ -0,0 +1,126 @@ +/* const/gsl_const_mks.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + * 2006, 2007, 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST_MKS__ +#define __GSL_CONST_MKS__ + +#define GSL_CONST_MKS_SPEED_OF_LIGHT (2.99792458e8) /* m / s */ +#define GSL_CONST_MKS_GRAVITATIONAL_CONSTANT (6.673e-11) /* m^3 / kg s^2 */ +#define GSL_CONST_MKS_PLANCKS_CONSTANT_H (6.62606896e-34) /* kg m^2 / s */ +#define GSL_CONST_MKS_PLANCKS_CONSTANT_HBAR (1.05457162825e-34) /* kg m^2 / s */ +#define GSL_CONST_MKS_ASTRONOMICAL_UNIT (1.49597870691e11) /* m */ +#define GSL_CONST_MKS_LIGHT_YEAR (9.46053620707e15) /* m */ +#define GSL_CONST_MKS_PARSEC (3.08567758135e16) /* m */ +#define GSL_CONST_MKS_GRAV_ACCEL (9.80665e0) /* m / s^2 */ +#define GSL_CONST_MKS_ELECTRON_VOLT (1.602176487e-19) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_MASS_ELECTRON (9.10938188e-31) /* kg */ +#define GSL_CONST_MKS_MASS_MUON (1.88353109e-28) /* kg */ +#define GSL_CONST_MKS_MASS_PROTON (1.67262158e-27) /* kg */ +#define GSL_CONST_MKS_MASS_NEUTRON (1.67492716e-27) /* kg */ +#define GSL_CONST_MKS_RYDBERG (2.17987196968e-18) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_BOLTZMANN (1.3806504e-23) /* kg m^2 / K s^2 */ +#define GSL_CONST_MKS_MOLAR_GAS (8.314472e0) /* kg m^2 / K mol s^2 */ +#define GSL_CONST_MKS_STANDARD_GAS_VOLUME (2.2710981e-2) /* m^3 / mol */ +#define GSL_CONST_MKS_MINUTE (6e1) /* s */ +#define GSL_CONST_MKS_HOUR (3.6e3) /* s */ +#define GSL_CONST_MKS_DAY (8.64e4) /* s */ +#define GSL_CONST_MKS_WEEK (6.048e5) /* s */ +#define GSL_CONST_MKS_INCH (2.54e-2) /* m */ +#define GSL_CONST_MKS_FOOT (3.048e-1) /* m */ +#define GSL_CONST_MKS_YARD (9.144e-1) /* m */ +#define GSL_CONST_MKS_MILE (1.609344e3) /* m */ +#define GSL_CONST_MKS_NAUTICAL_MILE (1.852e3) /* m */ +#define GSL_CONST_MKS_FATHOM (1.8288e0) /* m */ +#define GSL_CONST_MKS_MIL (2.54e-5) /* m */ +#define GSL_CONST_MKS_POINT (3.52777777778e-4) /* m */ +#define GSL_CONST_MKS_TEXPOINT (3.51459803515e-4) /* m */ +#define GSL_CONST_MKS_MICRON (1e-6) /* m */ +#define GSL_CONST_MKS_ANGSTROM (1e-10) /* m */ +#define GSL_CONST_MKS_HECTARE (1e4) /* m^2 */ +#define GSL_CONST_MKS_ACRE (4.04685642241e3) /* m^2 */ +#define GSL_CONST_MKS_BARN (1e-28) /* m^2 */ +#define GSL_CONST_MKS_LITER (1e-3) /* m^3 */ +#define GSL_CONST_MKS_US_GALLON (3.78541178402e-3) /* m^3 */ +#define GSL_CONST_MKS_QUART (9.46352946004e-4) /* m^3 */ +#define GSL_CONST_MKS_PINT (4.73176473002e-4) /* m^3 */ +#define GSL_CONST_MKS_CUP (2.36588236501e-4) /* m^3 */ +#define GSL_CONST_MKS_FLUID_OUNCE (2.95735295626e-5) /* m^3 */ +#define GSL_CONST_MKS_TABLESPOON (1.47867647813e-5) /* m^3 */ +#define GSL_CONST_MKS_TEASPOON (4.92892159375e-6) /* m^3 */ +#define GSL_CONST_MKS_CANADIAN_GALLON (4.54609e-3) /* m^3 */ +#define GSL_CONST_MKS_UK_GALLON (4.546092e-3) /* m^3 */ +#define GSL_CONST_MKS_MILES_PER_HOUR (4.4704e-1) /* m / s */ +#define GSL_CONST_MKS_KILOMETERS_PER_HOUR (2.77777777778e-1) /* m / s */ +#define GSL_CONST_MKS_KNOT (5.14444444444e-1) /* m / s */ +#define GSL_CONST_MKS_POUND_MASS (4.5359237e-1) /* kg */ +#define GSL_CONST_MKS_OUNCE_MASS (2.8349523125e-2) /* kg */ +#define GSL_CONST_MKS_TON (9.0718474e2) /* kg */ +#define GSL_CONST_MKS_METRIC_TON (1e3) /* kg */ +#define GSL_CONST_MKS_UK_TON (1.0160469088e3) /* kg */ +#define GSL_CONST_MKS_TROY_OUNCE (3.1103475e-2) /* kg */ +#define GSL_CONST_MKS_CARAT (2e-4) /* kg */ +#define GSL_CONST_MKS_UNIFIED_ATOMIC_MASS (1.660538782e-27) /* kg */ +#define GSL_CONST_MKS_GRAM_FORCE (9.80665e-3) /* kg m / s^2 */ +#define GSL_CONST_MKS_POUND_FORCE (4.44822161526e0) /* kg m / s^2 */ +#define GSL_CONST_MKS_KILOPOUND_FORCE (4.44822161526e3) /* kg m / s^2 */ +#define GSL_CONST_MKS_POUNDAL (1.38255e-1) /* kg m / s^2 */ +#define GSL_CONST_MKS_CALORIE (4.1868e0) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_BTU (1.05505585262e3) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_THERM (1.05506e8) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_HORSEPOWER (7.457e2) /* kg m^2 / s^3 */ +#define GSL_CONST_MKS_BAR (1e5) /* kg / m s^2 */ +#define GSL_CONST_MKS_STD_ATMOSPHERE (1.01325e5) /* kg / m s^2 */ +#define GSL_CONST_MKS_TORR (1.33322368421e2) /* kg / m s^2 */ +#define GSL_CONST_MKS_METER_OF_MERCURY (1.33322368421e5) /* kg / m s^2 */ +#define GSL_CONST_MKS_INCH_OF_MERCURY (3.38638815789e3) /* kg / m s^2 */ +#define GSL_CONST_MKS_INCH_OF_WATER (2.490889e2) /* kg / m s^2 */ +#define GSL_CONST_MKS_PSI (6.89475729317e3) /* kg / m s^2 */ +#define GSL_CONST_MKS_POISE (1e-1) /* kg m^-1 s^-1 */ +#define GSL_CONST_MKS_STOKES (1e-4) /* m^2 / s */ +#define GSL_CONST_MKS_STILB (1e4) /* cd / m^2 */ +#define GSL_CONST_MKS_LUMEN (1e0) /* cd sr */ +#define GSL_CONST_MKS_LUX (1e0) /* cd sr / m^2 */ +#define GSL_CONST_MKS_PHOT (1e4) /* cd sr / m^2 */ +#define GSL_CONST_MKS_FOOTCANDLE (1.076e1) /* cd sr / m^2 */ +#define GSL_CONST_MKS_LAMBERT (1e4) /* cd sr / m^2 */ +#define GSL_CONST_MKS_FOOTLAMBERT (1.07639104e1) /* cd sr / m^2 */ +#define GSL_CONST_MKS_CURIE (3.7e10) /* 1 / s */ +#define GSL_CONST_MKS_ROENTGEN (2.58e-4) /* A s / kg */ +#define GSL_CONST_MKS_RAD (1e-2) /* m^2 / s^2 */ +#define GSL_CONST_MKS_SOLAR_MASS (1.98892e30) /* kg */ +#define GSL_CONST_MKS_BOHR_RADIUS (5.291772083e-11) /* m */ +#define GSL_CONST_MKS_NEWTON (1e0) /* kg m / s^2 */ +#define GSL_CONST_MKS_DYNE (1e-5) /* kg m / s^2 */ +#define GSL_CONST_MKS_JOULE (1e0) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_ERG (1e-7) /* kg m^2 / s^2 */ +#define GSL_CONST_MKS_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-8) /* kg / K^4 s^3 */ +#define GSL_CONST_MKS_THOMSON_CROSS_SECTION (6.65245893699e-29) /* m^2 */ +#define GSL_CONST_MKS_BOHR_MAGNETON (9.27400899e-24) /* A m^2 */ +#define GSL_CONST_MKS_NUCLEAR_MAGNETON (5.05078317e-27) /* A m^2 */ +#define GSL_CONST_MKS_ELECTRON_MAGNETIC_MOMENT (9.28476362e-24) /* A m^2 */ +#define GSL_CONST_MKS_PROTON_MAGNETIC_MOMENT (1.410606633e-26) /* A m^2 */ +#define GSL_CONST_MKS_FARADAY (9.64853429775e4) /* A s / mol */ +#define GSL_CONST_MKS_ELECTRON_CHARGE (1.602176487e-19) /* A s */ +#define GSL_CONST_MKS_VACUUM_PERMITTIVITY (8.854187817e-12) /* A^2 s^4 / kg m^3 */ +#define GSL_CONST_MKS_VACUUM_PERMEABILITY (1.25663706144e-6) /* kg m / A^2 s^2 */ +#define GSL_CONST_MKS_DEBYE (3.33564095198e-30) /* A s^2 / m^2 */ +#define GSL_CONST_MKS_GAUSS (1e-4) /* kg / A s^2 */ + +#endif /* __GSL_CONST_MKS__ */ diff --git a/software/gsl-1.15/const/gsl_const_mksa.h b/software/gsl-1.15/const/gsl_const_mksa.h new file mode 100644 index 000000000..5d91d1ca4 --- /dev/null +++ b/software/gsl-1.15/const/gsl_const_mksa.h @@ -0,0 +1,126 @@ +/* const/gsl_const_mksa.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + * 2006, 2007, 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST_MKSA__ +#define __GSL_CONST_MKSA__ + +#define GSL_CONST_MKSA_SPEED_OF_LIGHT (2.99792458e8) /* m / s */ +#define GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT (6.673e-11) /* m^3 / kg s^2 */ +#define GSL_CONST_MKSA_PLANCKS_CONSTANT_H (6.62606896e-34) /* kg m^2 / s */ +#define GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR (1.05457162825e-34) /* kg m^2 / s */ +#define GSL_CONST_MKSA_ASTRONOMICAL_UNIT (1.49597870691e11) /* m */ +#define GSL_CONST_MKSA_LIGHT_YEAR (9.46053620707e15) /* m */ +#define GSL_CONST_MKSA_PARSEC (3.08567758135e16) /* m */ +#define GSL_CONST_MKSA_GRAV_ACCEL (9.80665e0) /* m / s^2 */ +#define GSL_CONST_MKSA_ELECTRON_VOLT (1.602176487e-19) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_MASS_ELECTRON (9.10938188e-31) /* kg */ +#define GSL_CONST_MKSA_MASS_MUON (1.88353109e-28) /* kg */ +#define GSL_CONST_MKSA_MASS_PROTON (1.67262158e-27) /* kg */ +#define GSL_CONST_MKSA_MASS_NEUTRON (1.67492716e-27) /* kg */ +#define GSL_CONST_MKSA_RYDBERG (2.17987196968e-18) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_BOLTZMANN (1.3806504e-23) /* kg m^2 / K s^2 */ +#define GSL_CONST_MKSA_MOLAR_GAS (8.314472e0) /* kg m^2 / K mol s^2 */ +#define GSL_CONST_MKSA_STANDARD_GAS_VOLUME (2.2710981e-2) /* m^3 / mol */ +#define GSL_CONST_MKSA_MINUTE (6e1) /* s */ +#define GSL_CONST_MKSA_HOUR (3.6e3) /* s */ +#define GSL_CONST_MKSA_DAY (8.64e4) /* s */ +#define GSL_CONST_MKSA_WEEK (6.048e5) /* s */ +#define GSL_CONST_MKSA_INCH (2.54e-2) /* m */ +#define GSL_CONST_MKSA_FOOT (3.048e-1) /* m */ +#define GSL_CONST_MKSA_YARD (9.144e-1) /* m */ +#define GSL_CONST_MKSA_MILE (1.609344e3) /* m */ +#define GSL_CONST_MKSA_NAUTICAL_MILE (1.852e3) /* m */ +#define GSL_CONST_MKSA_FATHOM (1.8288e0) /* m */ +#define GSL_CONST_MKSA_MIL (2.54e-5) /* m */ +#define GSL_CONST_MKSA_POINT (3.52777777778e-4) /* m */ +#define GSL_CONST_MKSA_TEXPOINT (3.51459803515e-4) /* m */ +#define GSL_CONST_MKSA_MICRON (1e-6) /* m */ +#define GSL_CONST_MKSA_ANGSTROM (1e-10) /* m */ +#define GSL_CONST_MKSA_HECTARE (1e4) /* m^2 */ +#define GSL_CONST_MKSA_ACRE (4.04685642241e3) /* m^2 */ +#define GSL_CONST_MKSA_BARN (1e-28) /* m^2 */ +#define GSL_CONST_MKSA_LITER (1e-3) /* m^3 */ +#define GSL_CONST_MKSA_US_GALLON (3.78541178402e-3) /* m^3 */ +#define GSL_CONST_MKSA_QUART (9.46352946004e-4) /* m^3 */ +#define GSL_CONST_MKSA_PINT (4.73176473002e-4) /* m^3 */ +#define GSL_CONST_MKSA_CUP (2.36588236501e-4) /* m^3 */ +#define GSL_CONST_MKSA_FLUID_OUNCE (2.95735295626e-5) /* m^3 */ +#define GSL_CONST_MKSA_TABLESPOON (1.47867647813e-5) /* m^3 */ +#define GSL_CONST_MKSA_TEASPOON (4.92892159375e-6) /* m^3 */ +#define GSL_CONST_MKSA_CANADIAN_GALLON (4.54609e-3) /* m^3 */ +#define GSL_CONST_MKSA_UK_GALLON (4.546092e-3) /* m^3 */ +#define GSL_CONST_MKSA_MILES_PER_HOUR (4.4704e-1) /* m / s */ +#define GSL_CONST_MKSA_KILOMETERS_PER_HOUR (2.77777777778e-1) /* m / s */ +#define GSL_CONST_MKSA_KNOT (5.14444444444e-1) /* m / s */ +#define GSL_CONST_MKSA_POUND_MASS (4.5359237e-1) /* kg */ +#define GSL_CONST_MKSA_OUNCE_MASS (2.8349523125e-2) /* kg */ +#define GSL_CONST_MKSA_TON (9.0718474e2) /* kg */ +#define GSL_CONST_MKSA_METRIC_TON (1e3) /* kg */ +#define GSL_CONST_MKSA_UK_TON (1.0160469088e3) /* kg */ +#define GSL_CONST_MKSA_TROY_OUNCE (3.1103475e-2) /* kg */ +#define GSL_CONST_MKSA_CARAT (2e-4) /* kg */ +#define GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS (1.660538782e-27) /* kg */ +#define GSL_CONST_MKSA_GRAM_FORCE (9.80665e-3) /* kg m / s^2 */ +#define GSL_CONST_MKSA_POUND_FORCE (4.44822161526e0) /* kg m / s^2 */ +#define GSL_CONST_MKSA_KILOPOUND_FORCE (4.44822161526e3) /* kg m / s^2 */ +#define GSL_CONST_MKSA_POUNDAL (1.38255e-1) /* kg m / s^2 */ +#define GSL_CONST_MKSA_CALORIE (4.1868e0) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_BTU (1.05505585262e3) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_THERM (1.05506e8) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_HORSEPOWER (7.457e2) /* kg m^2 / s^3 */ +#define GSL_CONST_MKSA_BAR (1e5) /* kg / m s^2 */ +#define GSL_CONST_MKSA_STD_ATMOSPHERE (1.01325e5) /* kg / m s^2 */ +#define GSL_CONST_MKSA_TORR (1.33322368421e2) /* kg / m s^2 */ +#define GSL_CONST_MKSA_METER_OF_MERCURY (1.33322368421e5) /* kg / m s^2 */ +#define GSL_CONST_MKSA_INCH_OF_MERCURY (3.38638815789e3) /* kg / m s^2 */ +#define GSL_CONST_MKSA_INCH_OF_WATER (2.490889e2) /* kg / m s^2 */ +#define GSL_CONST_MKSA_PSI (6.89475729317e3) /* kg / m s^2 */ +#define GSL_CONST_MKSA_POISE (1e-1) /* kg m^-1 s^-1 */ +#define GSL_CONST_MKSA_STOKES (1e-4) /* m^2 / s */ +#define GSL_CONST_MKSA_STILB (1e4) /* cd / m^2 */ +#define GSL_CONST_MKSA_LUMEN (1e0) /* cd sr */ +#define GSL_CONST_MKSA_LUX (1e0) /* cd sr / m^2 */ +#define GSL_CONST_MKSA_PHOT (1e4) /* cd sr / m^2 */ +#define GSL_CONST_MKSA_FOOTCANDLE (1.076e1) /* cd sr / m^2 */ +#define GSL_CONST_MKSA_LAMBERT (1e4) /* cd sr / m^2 */ +#define GSL_CONST_MKSA_FOOTLAMBERT (1.07639104e1) /* cd sr / m^2 */ +#define GSL_CONST_MKSA_CURIE (3.7e10) /* 1 / s */ +#define GSL_CONST_MKSA_ROENTGEN (2.58e-4) /* A s / kg */ +#define GSL_CONST_MKSA_RAD (1e-2) /* m^2 / s^2 */ +#define GSL_CONST_MKSA_SOLAR_MASS (1.98892e30) /* kg */ +#define GSL_CONST_MKSA_BOHR_RADIUS (5.291772083e-11) /* m */ +#define GSL_CONST_MKSA_NEWTON (1e0) /* kg m / s^2 */ +#define GSL_CONST_MKSA_DYNE (1e-5) /* kg m / s^2 */ +#define GSL_CONST_MKSA_JOULE (1e0) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_ERG (1e-7) /* kg m^2 / s^2 */ +#define GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-8) /* kg / K^4 s^3 */ +#define GSL_CONST_MKSA_THOMSON_CROSS_SECTION (6.65245893699e-29) /* m^2 */ +#define GSL_CONST_MKSA_BOHR_MAGNETON (9.27400899e-24) /* A m^2 */ +#define GSL_CONST_MKSA_NUCLEAR_MAGNETON (5.05078317e-27) /* A m^2 */ +#define GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT (9.28476362e-24) /* A m^2 */ +#define GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT (1.410606633e-26) /* A m^2 */ +#define GSL_CONST_MKSA_FARADAY (9.64853429775e4) /* A s / mol */ +#define GSL_CONST_MKSA_ELECTRON_CHARGE (1.602176487e-19) /* A s */ +#define GSL_CONST_MKSA_VACUUM_PERMITTIVITY (8.854187817e-12) /* A^2 s^4 / kg m^3 */ +#define GSL_CONST_MKSA_VACUUM_PERMEABILITY (1.25663706144e-6) /* kg m / A^2 s^2 */ +#define GSL_CONST_MKSA_DEBYE (3.33564095198e-30) /* A s^2 / m^2 */ +#define GSL_CONST_MKSA_GAUSS (1e-4) /* kg / A s^2 */ + +#endif /* __GSL_CONST_MKSA__ */ diff --git a/software/gsl-1.15/const/gsl_const_num.h b/software/gsl-1.15/const/gsl_const_num.h new file mode 100644 index 000000000..385a660f7 --- /dev/null +++ b/software/gsl-1.15/const/gsl_const_num.h @@ -0,0 +1,43 @@ +/* const/gsl_const_num.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + * 2006, 2007, 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_CONST_NUM__ +#define __GSL_CONST_NUM__ + +#define GSL_CONST_NUM_FINE_STRUCTURE (7.297352533e-3) /* 1 */ +#define GSL_CONST_NUM_AVOGADRO (6.02214199e23) /* 1 / mol */ +#define GSL_CONST_NUM_YOTTA (1e24) /* 1 */ +#define GSL_CONST_NUM_ZETTA (1e21) /* 1 */ +#define GSL_CONST_NUM_EXA (1e18) /* 1 */ +#define GSL_CONST_NUM_PETA (1e15) /* 1 */ +#define GSL_CONST_NUM_TERA (1e12) /* 1 */ +#define GSL_CONST_NUM_GIGA (1e9) /* 1 */ +#define GSL_CONST_NUM_MEGA (1e6) /* 1 */ +#define GSL_CONST_NUM_KILO (1e3) /* 1 */ +#define GSL_CONST_NUM_MILLI (1e-3) /* 1 */ +#define GSL_CONST_NUM_MICRO (1e-6) /* 1 */ +#define GSL_CONST_NUM_NANO (1e-9) /* 1 */ +#define GSL_CONST_NUM_PICO (1e-12) /* 1 */ +#define GSL_CONST_NUM_FEMTO (1e-15) /* 1 */ +#define GSL_CONST_NUM_ATTO (1e-18) /* 1 */ +#define GSL_CONST_NUM_ZEPTO (1e-21) /* 1 */ +#define GSL_CONST_NUM_YOCTO (1e-24) /* 1 */ + +#endif /* __GSL_CONST_NUM__ */ diff --git a/software/gsl-1.15/const/test.c b/software/gsl-1.15/const/test.c new file mode 100644 index 000000000..aa5aa1c79 --- /dev/null +++ b/software/gsl-1.15/const/test.c @@ -0,0 +1,97 @@ +/* const/test.c + * + * Copyright (C) 2003, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include + +int +main (void) +{ + gsl_ieee_env_setup (); + + /* Basic check to make sure the header files are functioning */ + + { + double c = GSL_CONST_MKS_SPEED_OF_LIGHT; + double eps = GSL_CONST_MKS_VACUUM_PERMITTIVITY; + double mu = GSL_CONST_MKS_VACUUM_PERMEABILITY; + + gsl_test_rel (c, 1.0/sqrt(eps*mu), 1e-6, "speed of light (mks)"); + } + + { + double ly = GSL_CONST_CGS_LIGHT_YEAR; + double c = GSL_CONST_CGS_SPEED_OF_LIGHT; + double y = 365.2425 * GSL_CONST_CGS_DAY; + + gsl_test_rel (ly, c * y, 1e-6, "light year (cgs)"); + } + + { + double c = GSL_CONST_MKSA_SPEED_OF_LIGHT; + double eps = GSL_CONST_MKSA_VACUUM_PERMITTIVITY; + double mu = GSL_CONST_MKSA_VACUUM_PERMEABILITY; + + gsl_test_rel (c, 1.0/sqrt(eps*mu), 1e-6, "speed of light (mksa)"); + } + + { + double ly = GSL_CONST_CGSM_LIGHT_YEAR; + double c = GSL_CONST_CGSM_SPEED_OF_LIGHT; + double y = 365.2425 * GSL_CONST_CGSM_DAY; + + gsl_test_rel (ly, c * y, 1e-6, "light year (cgsm)"); + } + + { + double micro = GSL_CONST_NUM_MICRO; + double mega = GSL_CONST_NUM_MEGA; + double kilo = GSL_CONST_NUM_KILO; + + gsl_test_rel (mega/kilo, 1/(micro*kilo), 1e-10, "kilo (mega/kilo, 1/(micro*kilo))"); + } + + { + double d = GSL_CONST_MKSA_DEBYE; + double c = GSL_CONST_MKSA_SPEED_OF_LIGHT; + double desu = d * c * 1000.0; + + gsl_test_rel (desu, 1e-18, 1e-10, "debye (esu)"); + } + + { + double k = GSL_CONST_MKSA_BOLTZMANN; + double c = GSL_CONST_MKSA_SPEED_OF_LIGHT; + double h = GSL_CONST_MKSA_PLANCKS_CONSTANT_H; + double s = 2 * pow(M_PI, 5.0) * pow(k, 4.0) / (15 * pow(c, 2.0) * pow(h, 3.0)); + double sigma = GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT; + + gsl_test_rel(s, sigma, 1e-10, "stefan boltzmann constant"); + } + + + exit (gsl_test_summary ()); +} + diff --git a/software/gsl-1.15/depcomp b/software/gsl-1.15/depcomp new file mode 100755 index 000000000..df8eea7e4 --- /dev/null +++ b/software/gsl-1.15/depcomp @@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/software/gsl-1.15/deriv/.deps/deriv.Plo b/software/gsl-1.15/deriv/.deps/deriv.Plo new file mode 100644 index 000000000..f8338aa18 --- /dev/null +++ b/software/gsl-1.15/deriv/.deps/deriv.Plo @@ -0,0 +1,131 @@ +deriv.lo: deriv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_deriv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_deriv.h: diff --git a/software/gsl-1.15/deriv/.deps/test.Po b/software/gsl-1.15/deriv/.deps/test.Po new file mode 100644 index 000000000..87edab229 --- /dev/null +++ b/software/gsl-1.15/deriv/.deps/test.Po @@ -0,0 +1,136 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_deriv.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_deriv.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/deriv/ChangeLog b/software/gsl-1.15/deriv/ChangeLog new file mode 100644 index 000000000..53398e088 --- /dev/null +++ b/software/gsl-1.15/deriv/ChangeLog @@ -0,0 +1,13 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-08-22 Brian Gough + + * deriv.c (central_deriv): corrected dy term for error in h + (forward_deriv): corrected dy term for error in h + +2004-03-06 Brian Gough + + * reworking API of gsl_diff + diff --git a/software/gsl-1.15/deriv/Makefile.am b/software/gsl-1.15/deriv/Makefile.am new file mode 100644 index 000000000..2281b91af --- /dev/null +++ b/software/gsl-1.15/deriv/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgslderiv.la + +INCLUDES = -I$(top_srcdir) + +libgslderiv_la_SOURCES = deriv.c + +pkginclude_HEADERS = gsl_deriv.h + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test #demo + +test_SOURCES = test.c +test_LDADD = libgslderiv.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslderiv.la ../vector/libgslvector.la ../block/libgslblock.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la diff --git a/software/gsl-1.15/deriv/Makefile.in b/software/gsl-1.15/deriv/Makefile.in new file mode 100644 index 000000000..92a0108f9 --- /dev/null +++ b/software/gsl-1.15/deriv/Makefile.in @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = deriv +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslderiv_la_LIBADD = +am_libgslderiv_la_OBJECTS = deriv.lo +libgslderiv_la_OBJECTS = $(am_libgslderiv_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslderiv.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslderiv_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslderiv_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslderiv.la +INCLUDES = -I$(top_srcdir) +libgslderiv_la_SOURCES = deriv.c +pkginclude_HEADERS = gsl_deriv.h +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslderiv.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu deriv/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu deriv/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslderiv.la: $(libgslderiv_la_OBJECTS) $(libgslderiv_la_DEPENDENCIES) + $(LINK) $(libgslderiv_la_OBJECTS) $(libgslderiv_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES = demo.c +#demo_LDADD = libgslderiv.la ../vector/libgslvector.la ../block/libgslblock.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/deriv/deriv.c b/software/gsl-1.15/deriv/deriv.c new file mode 100644 index 000000000..2cec7941d --- /dev/null +++ b/software/gsl-1.15/deriv/deriv.c @@ -0,0 +1,178 @@ +/* deriv/deriv.c + * + * Copyright (C) 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +static void +central_deriv (const gsl_function * f, double x, double h, + double *result, double *abserr_round, double *abserr_trunc) +{ + /* Compute the derivative using the 5-point rule (x-h, x-h/2, x, + x+h/2, x+h). Note that the central point is not used. + + Compute the error using the difference between the 5-point and + the 3-point rule (x-h,x,x+h). Again the central point is not + used. */ + + double fm1 = GSL_FN_EVAL (f, x - h); + double fp1 = GSL_FN_EVAL (f, x + h); + + double fmh = GSL_FN_EVAL (f, x - h / 2); + double fph = GSL_FN_EVAL (f, x + h / 2); + + double r3 = 0.5 * (fp1 - fm1); + double r5 = (4.0 / 3.0) * (fph - fmh) - (1.0 / 3.0) * r3; + + double e3 = (fabs (fp1) + fabs (fm1)) * GSL_DBL_EPSILON; + double e5 = 2.0 * (fabs (fph) + fabs (fmh)) * GSL_DBL_EPSILON + e3; + + /* The next term is due to finite precision in x+h = O (eps * x) */ + + double dy = GSL_MAX (fabs (r3 / h), fabs (r5 / h)) *(fabs (x) / h) * GSL_DBL_EPSILON; + + /* The truncation error in the r5 approximation itself is O(h^4). + However, for safety, we estimate the error from r5-r3, which is + O(h^2). By scaling h we will minimise this estimated error, not + the actual truncation error in r5. */ + + *result = r5 / h; + *abserr_trunc = fabs ((r5 - r3) / h); /* Estimated truncation error O(h^2) */ + *abserr_round = fabs (e5 / h) + dy; /* Rounding error (cancellations) */ +} + +int +gsl_deriv_central (const gsl_function * f, double x, double h, + double *result, double *abserr) +{ + double r_0, round, trunc, error; + central_deriv (f, x, h, &r_0, &round, &trunc); + error = round + trunc; + + if (round < trunc && (round > 0 && trunc > 0)) + { + double r_opt, round_opt, trunc_opt, error_opt; + + /* Compute an optimised stepsize to minimize the total error, + using the scaling of the truncation error (O(h^2)) and + rounding error (O(1/h)). */ + + double h_opt = h * pow (round / (2.0 * trunc), 1.0 / 3.0); + central_deriv (f, x, h_opt, &r_opt, &round_opt, &trunc_opt); + error_opt = round_opt + trunc_opt; + + /* Check that the new error is smaller, and that the new derivative + is consistent with the error bounds of the original estimate. */ + + if (error_opt < error && fabs (r_opt - r_0) < 4.0 * error) + { + r_0 = r_opt; + error = error_opt; + } + } + + *result = r_0; + *abserr = error; + + return GSL_SUCCESS; +} + + +static void +forward_deriv (const gsl_function * f, double x, double h, + double *result, double *abserr_round, double *abserr_trunc) +{ + /* Compute the derivative using the 4-point rule (x+h/4, x+h/2, + x+3h/4, x+h). + + Compute the error using the difference between the 4-point and + the 2-point rule (x+h/2,x+h). */ + + double f1 = GSL_FN_EVAL (f, x + h / 4.0); + double f2 = GSL_FN_EVAL (f, x + h / 2.0); + double f3 = GSL_FN_EVAL (f, x + (3.0 / 4.0) * h); + double f4 = GSL_FN_EVAL (f, x + h); + + double r2 = 2.0*(f4 - f2); + double r4 = (22.0 / 3.0) * (f4 - f3) - (62.0 / 3.0) * (f3 - f2) + + (52.0 / 3.0) * (f2 - f1); + + /* Estimate the rounding error for r4 */ + + double e4 = 2 * 20.67 * (fabs (f4) + fabs (f3) + fabs (f2) + fabs (f1)) * GSL_DBL_EPSILON; + + /* The next term is due to finite precision in x+h = O (eps * x) */ + + double dy = GSL_MAX (fabs (r2 / h), fabs (r4 / h)) * fabs (x / h) * GSL_DBL_EPSILON; + + /* The truncation error in the r4 approximation itself is O(h^3). + However, for safety, we estimate the error from r4-r2, which is + O(h). By scaling h we will minimise this estimated error, not + the actual truncation error in r4. */ + + *result = r4 / h; + *abserr_trunc = fabs ((r4 - r2) / h); /* Estimated truncation error O(h) */ + *abserr_round = fabs (e4 / h) + dy; +} + +int +gsl_deriv_forward (const gsl_function * f, double x, double h, + double *result, double *abserr) +{ + double r_0, round, trunc, error; + forward_deriv (f, x, h, &r_0, &round, &trunc); + error = round + trunc; + + if (round < trunc && (round > 0 && trunc > 0)) + { + double r_opt, round_opt, trunc_opt, error_opt; + + /* Compute an optimised stepsize to minimize the total error, + using the scaling of the estimated truncation error (O(h)) and + rounding error (O(1/h)). */ + + double h_opt = h * pow (round / (trunc), 1.0 / 2.0); + forward_deriv (f, x, h_opt, &r_opt, &round_opt, &trunc_opt); + error_opt = round_opt + trunc_opt; + + /* Check that the new error is smaller, and that the new derivative + is consistent with the error bounds of the original estimate. */ + + if (error_opt < error && fabs (r_opt - r_0) < 4.0 * error) + { + r_0 = r_opt; + error = error_opt; + } + } + + *result = r_0; + *abserr = error; + + return GSL_SUCCESS; +} + +int +gsl_deriv_backward (const gsl_function * f, double x, double h, + double *result, double *abserr) +{ + return gsl_deriv_forward (f, x, -h, result, abserr); +} diff --git a/software/gsl-1.15/deriv/gsl_deriv.h b/software/gsl-1.15/deriv/gsl_deriv.h new file mode 100644 index 000000000..7f4694fe7 --- /dev/null +++ b/software/gsl-1.15/deriv/gsl_deriv.h @@ -0,0 +1,50 @@ +/* deriv/gsl_deriv.h + * + * Copyright (C) 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_DERIV_H__ +#define __GSL_DERIV_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_deriv_central (const gsl_function *f, + double x, double h, + double *result, double *abserr); + +int gsl_deriv_backward (const gsl_function *f, + double x, double h, + double *result, double *abserr); + +int gsl_deriv_forward (const gsl_function *f, + double x, double h, + double *result, double *abserr); + +__END_DECLS + +#endif /* __GSL_DERIV_H__ */ diff --git a/software/gsl-1.15/deriv/test.c b/software/gsl-1.15/deriv/test.c new file mode 100644 index 000000000..0157294fa --- /dev/null +++ b/software/gsl-1.15/deriv/test.c @@ -0,0 +1,209 @@ +/* deriv/test.c + * + * Copyright (C) 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +double +f1 (double x, void *params) +{ + return exp (x); +} + +double +df1 (double x, void *params) +{ + return exp (x); +} + +double +f2 (double x, void *params) +{ + if (x >= 0.0) + { + return x * sqrt (x); + } + else + { + return 0.0; + } +} + +double +df2 (double x, void *params) +{ + if (x >= 0.0) + { + return 1.5 * sqrt (x); + } + else + { + return 0.0; + } +} + +double +f3 (double x, void *params) +{ + if (x != 0.0) + { + return sin (1 / x); + } + else + { + return 0.0; + } +} + +double +df3 (double x, void *params) +{ + if (x != 0.0) + { + return -cos (1 / x) / (x * x); + } + else + { + return 0.0; + } +} + +double +f4 (double x, void *params) +{ + return exp (-x * x); +} + +double +df4 (double x, void *params) +{ + return -2.0 * x * exp (-x * x); +} + +double +f5 (double x, void *params) +{ + return x * x; +} + +double +df5 (double x, void *params) +{ + return 2.0 * x; +} + +double +f6 (double x, void *params) +{ + return 1.0 / x; +} + +double +df6 (double x, void *params) +{ + return -1.0 / (x * x); +} + +typedef int (deriv_fn) (const gsl_function * f, double x, double h, double * res, double *abserr); + +void +test (deriv_fn * deriv, gsl_function * f, gsl_function * df, double x, + const char * desc) +{ + double result, abserr; + double expected = GSL_FN_EVAL (df, x); + (*deriv) (f, x, 1e-4, &result, &abserr); + + gsl_test_abs (result, expected, GSL_MIN(1e-4,fabs(expected)) + GSL_DBL_EPSILON, desc); + + if (abserr < fabs(result-expected)) + { + gsl_test_factor (abserr, fabs(result-expected), 2, "%s error estimate", desc); + } + else if (result == expected || expected == 0.0) + { + gsl_test_abs (abserr, 0.0, 1e-6, "%s abserr", desc); + } + else + { + double d = fabs(result - expected); + gsl_test_abs (abserr, fabs(result-expected), 1e6*d, "%s abserr", desc); + } +} + +int +main () +{ + gsl_function F1, DF1, F2, DF2, F3, DF3, F4, DF4, F5, DF5, F6, DF6; + + gsl_ieee_env_setup (); + + F1.function = &f1; + DF1.function = &df1; + + F2.function = &f2; + DF2.function = &df2; + + F3.function = &f3; + DF3.function = &df3; + + F4.function = &f4; + DF4.function = &df4; + + F5.function = &f5; + DF5.function = &df5; + + F6.function = &f6; + DF6.function = &df6; + + test (&gsl_deriv_central, &F1, &DF1, 1.0, "exp(x), x=1, central deriv"); + test (&gsl_deriv_forward, &F1, &DF1, 1.0, "exp(x), x=1, forward deriv"); + test (&gsl_deriv_backward, &F1, &DF1, 1.0, "exp(x), x=1, backward deriv"); + + test (&gsl_deriv_central, &F2, &DF2, 0.1, "x^(3/2), x=0.1, central deriv"); + test (&gsl_deriv_forward, &F2, &DF2, 0.1, "x^(3/2), x=0.1, forward deriv"); + test (&gsl_deriv_backward, &F2, &DF2, 0.1, "x^(3/2), x=0.1, backward deriv"); + + test (&gsl_deriv_central, &F3, &DF3, 0.45, "sin(1/x), x=0.45, central deriv"); + test (&gsl_deriv_forward, &F3, &DF3, 0.45, "sin(1/x), x=0.45, forward deriv"); + test (&gsl_deriv_backward, &F3, &DF3, 0.45, "sin(1/x), x=0.45, backward deriv"); + + test (&gsl_deriv_central, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, central deriv"); + test (&gsl_deriv_forward, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, forward deriv"); + test (&gsl_deriv_backward, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, backward deriv"); + + test (&gsl_deriv_central, &F5, &DF5, 0.0, "x^2, x=0, central deriv"); + test (&gsl_deriv_forward, &F5, &DF5, 0.0, "x^2, x=0, forward deriv"); + test (&gsl_deriv_backward, &F5, &DF5, 0.0, "x^2, x=0, backward deriv"); + + test (&gsl_deriv_central, &F6, &DF6, 10.0, "1/x, x=10, central deriv"); + test (&gsl_deriv_forward, &F6, &DF6, 10.0, "1/x, x=10, forward deriv"); + test (&gsl_deriv_backward, &F6, &DF6, 10.0, "1/x, x=10, backward deriv"); + + exit (gsl_test_summary ()); +} + + diff --git a/software/gsl-1.15/dht/.deps/dht.Plo b/software/gsl-1.15/dht/.deps/dht.Plo new file mode 100644 index 000000000..4370dbbc9 --- /dev/null +++ b/software/gsl-1.15/dht/.deps/dht.Plo @@ -0,0 +1,138 @@ +dht.lo: dht.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_bessel.h ../gsl/gsl_mode.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_dht.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_bessel.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_dht.h: diff --git a/software/gsl-1.15/dht/.deps/test.Po b/software/gsl-1.15/dht/.deps/test.Po new file mode 100644 index 000000000..f0cd1ddaf --- /dev/null +++ b/software/gsl-1.15/dht/.deps/test.Po @@ -0,0 +1,90 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_test.h ../gsl/gsl_dht.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_test.h: + +../gsl/gsl_dht.h: diff --git a/software/gsl-1.15/dht/ChangeLog b/software/gsl-1.15/dht/ChangeLog new file mode 100644 index 000000000..e3baf4be8 --- /dev/null +++ b/software/gsl-1.15/dht/ChangeLog @@ -0,0 +1,14 @@ +2009-07-09 Brian Gough + + * dht.c (gsl_dht_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +Mon Apr 23 10:31:58 2001 Brian Gough + + * unified error handling conventions to _e for error handling + functions and no suffix for plain functions, so _impl functions + are no longer needed. + diff --git a/software/gsl-1.15/dht/Makefile.am b/software/gsl-1.15/dht/Makefile.am new file mode 100644 index 000000000..868729d31 --- /dev/null +++ b/software/gsl-1.15/dht/Makefile.am @@ -0,0 +1,15 @@ +noinst_LTLIBRARIES = libgsldht.la + +pkginclude_HEADERS = gsl_dht.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + +libgsldht_la_SOURCES = dht.c diff --git a/software/gsl-1.15/dht/Makefile.in b/software/gsl-1.15/dht/Makefile.in new file mode 100644 index 000000000..08054efdf --- /dev/null +++ b/software/gsl-1.15/dht/Makefile.in @@ -0,0 +1,662 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = dht +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgsldht_la_LIBADD = +am_libgsldht_la_OBJECTS = dht.lo +libgsldht_la_OBJECTS = $(am_libgsldht_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgsldht.la ../specfunc/libgslspecfunc.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsldht_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgsldht_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgsldht.la +pkginclude_HEADERS = gsl_dht.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +libgsldht_la_SOURCES = dht.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dht/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu dht/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsldht.la: $(libgsldht_la_OBJECTS) $(libgsldht_la_DEPENDENCIES) + $(LINK) $(libgsldht_la_OBJECTS) $(libgsldht_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dht.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/dht/dht.c b/software/gsl-1.15/dht/dht.c new file mode 100644 index 000000000..97b60224f --- /dev/null +++ b/software/gsl-1.15/dht/dht.c @@ -0,0 +1,227 @@ +/* dht/dht.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include + + +gsl_dht * +gsl_dht_alloc (size_t size) +{ + gsl_dht * t; + + if(size == 0) { + GSL_ERROR_VAL("size == 0", GSL_EDOM, 0); + } + + t = (gsl_dht *)malloc(sizeof(gsl_dht)); + + if(t == 0) { + GSL_ERROR_VAL("out of memory", GSL_ENOMEM, 0); + } + + t->size = size; + + t->xmax = -1.0; /* Make it clear that this needs to be calculated. */ + t->nu = -1.0; + + t->j = (double *)malloc((size+2)*sizeof(double)); + + if(t->j == 0) { + free(t); + GSL_ERROR_VAL("could not allocate memory for j", GSL_ENOMEM, 0); + } + + t->Jjj = (double *)malloc(size*(size+1)/2 * sizeof(double)); + + if(t->Jjj == 0) { + free(t->j); + free(t); + GSL_ERROR_VAL("could not allocate memory for Jjj", GSL_ENOMEM, 0); + } + + t->J2 = (double *)malloc((size+1)*sizeof(double)); + + if(t->J2 == 0) { + free(t->Jjj); + free(t->j); + free(t); + GSL_ERROR_VAL("could not allocate memory for J2", GSL_ENOMEM, 0); + } + + return t; +} + +/* Handle internal calculation of Bessel zeros. */ +static int +dht_bessel_zeros(gsl_dht * t) +{ + unsigned int s; + gsl_sf_result z; + int stat_z = 0; + t->j[0] = 0.0; + for(s=1; s < t->size + 2; s++) { + stat_z += gsl_sf_bessel_zero_Jnu_e(t->nu, s, &z); + t->j[s] = z.val; + } + if(stat_z != 0) { + GSL_ERROR("could not compute bessel zeroes", GSL_EFAILED); + } + else { + return GSL_SUCCESS; + } +} + +gsl_dht * +gsl_dht_new (size_t size, double nu, double xmax) +{ + int status; + + gsl_dht * dht = gsl_dht_alloc (size); + + if (dht == 0) + return 0; + + status = gsl_dht_init(dht, nu, xmax); + + if (status) + return 0; + + return dht; +} + +int +gsl_dht_init(gsl_dht * t, double nu, double xmax) +{ + if(xmax <= 0.0) { + GSL_ERROR ("xmax is not positive", GSL_EDOM); + } else if(nu < 0.0) { + GSL_ERROR ("nu is negative", GSL_EDOM); + } + else { + size_t n, m; + int stat_bz = GSL_SUCCESS; + int stat_J = 0; + double jN; + + if(nu != t->nu) { + /* Recalculate Bessel zeros if necessary. */ + t->nu = nu; + stat_bz = dht_bessel_zeros(t); + } + + jN = t->j[t->size+1]; + + t->xmax = xmax; + t->kmax = jN / xmax; + + t->J2[0] = 0.0; + for(m=1; msize+1; m++) { + gsl_sf_result J; + stat_J += gsl_sf_bessel_Jnu_e(nu + 1.0, t->j[m], &J); + t->J2[m] = J.val * J.val; + } + + /* J_nu(j[n] j[m] / j[N]) = Jjj[n(n-1)/2 + m - 1], 1 <= n,m <= size + */ + for(n=1; nsize+1; n++) { + for(m=1; m<=n; m++) { + double arg = t->j[n] * t->j[m] / jN; + gsl_sf_result J; + stat_J += gsl_sf_bessel_Jnu_e(nu, arg, &J); + t->Jjj[n*(n-1)/2 + m - 1] = J.val; + } + } + + if(stat_J != 0) { + GSL_ERROR("error computing bessel function", GSL_EFAILED); + } + else { + return stat_bz; + } + } +} + + +double gsl_dht_x_sample(const gsl_dht * t, int n) +{ + return t->j[n+1]/t->j[t->size+1] * t->xmax; +} + + +double gsl_dht_k_sample(const gsl_dht * t, int n) +{ + return t->j[n+1] / t->xmax; +} + + +void gsl_dht_free(gsl_dht * t) +{ + RETURN_IF_NULL (t); + free(t->J2); + free(t->Jjj); + free(t->j); + free(t); +} + + +int +gsl_dht_apply(const gsl_dht * t, double * f_in, double * f_out) +{ + const double jN = t->j[t->size + 1]; + const double r = t->xmax / jN; + size_t m; + size_t i; + + for(m=0; msize; m++) { + double sum = 0.0; + double Y; + for(i=0; isize; i++) { + /* Need to find max and min so that we + * address the symmetric Jjj matrix properly. + * FIXME: we can presumably optimize this + * by just running over the elements of Jjj + * in a deterministic manner. + */ + size_t m_local; + size_t n_local; + if(i < m) { + m_local = i; + n_local = m; + } + else { + m_local = m; + n_local = i; + } + Y = t->Jjj[n_local*(n_local+1)/2 + m_local] / t->J2[i+1]; + sum += Y * f_in[i]; + } + f_out[m] = sum * 2.0 * r*r; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/dht/gsl_dht.h b/software/gsl-1.15/dht/gsl_dht.h new file mode 100644 index 000000000..bfc4b2fff --- /dev/null +++ b/software/gsl-1.15/dht/gsl_dht.h @@ -0,0 +1,87 @@ +/* dht/gsl_dht.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#ifndef __GSL_DHT_H__ +#define __GSL_DHT_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +struct gsl_dht_struct { + size_t size; /* size of the sample arrays to be transformed */ + double nu; /* Bessel function order */ + double xmax; /* the upper limit to the x-sampling domain */ + double kmax; /* the upper limit to the k-sampling domain */ + double * j; /* array of computed J_nu zeros, j_{nu,s} = j[s] */ + double * Jjj; /* transform numerator, J_nu(j_i j_m / j_N) */ + double * J2; /* transform denominator, J_{nu+1}^2(j_m) */ +}; +typedef struct gsl_dht_struct gsl_dht; + + +/* Create a new transform object for a given size + * sampling array on the domain [0, xmax]. + */ +gsl_dht * gsl_dht_alloc(size_t size); +gsl_dht * gsl_dht_new(size_t size, double nu, double xmax); + +/* Recalculate a transform object for given values of nu, xmax. + * You cannot change the size of the object since the internal + * allocation is reused. + */ +int gsl_dht_init(gsl_dht * t, double nu, double xmax); + +/* The n'th computed x sample point for a given transform. + * 0 <= n <= size-1 + */ +double gsl_dht_x_sample(const gsl_dht * t, int n); + + +/* The n'th computed k sample point for a given transform. + * 0 <= n <= size-1 + */ +double gsl_dht_k_sample(const gsl_dht * t, int n); + + +/* Free a transform object. + */ +void gsl_dht_free(gsl_dht * t); + + +/* Perform a transform on a sampled array. + * f_in[0] ... f_in[size-1] and similarly for f_out[] + */ +int gsl_dht_apply(const gsl_dht * t, double * f_in, double * f_out); + + +__END_DECLS + +#endif /* __GSL_DHT_H__ */ diff --git a/software/gsl-1.15/dht/test.c b/software/gsl-1.15/dht/test.c new file mode 100644 index 000000000..03cdea479 --- /dev/null +++ b/software/gsl-1.15/dht/test.c @@ -0,0 +1,193 @@ +/* dht/test_dht.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include +#include + + +/* Test exact small transform. + */ +int +test_dht_exact(void) +{ + int stat = 0; + double f_in[3] = { 1.0, 2.0, 3.0 }; + double f_out[3]; + gsl_dht * t = gsl_dht_new(3, 1.0, 1.0); + gsl_dht_apply(t, f_in, f_out); + + /* Check values. */ + if(fabs( f_out[0]-( 0.375254649407520))/0.375254649407520 > 1.0e-14) stat++; + if(fabs( f_out[1]-(-0.133507872695560))/0.133507872695560 > 1.0e-14) stat++; + if(fabs( f_out[2]-( 0.044679925143840))/0.044679925143840 > 1.0e-14) stat++; + + + /* Check inverse. + * We have to adjust the normalization + * so we can use the same precalculated transform. + */ + gsl_dht_apply(t, f_out, f_in); + f_in[0] *= 13.323691936314223*13.323691936314223; /* jzero[1,4]^2 */ + f_in[1] *= 13.323691936314223*13.323691936314223; + f_in[2] *= 13.323691936314223*13.323691936314223; + + /* The loss of precision on the inverse + * is a little surprising. However, this + * thing is quite tricky since the band-limited + * function represented by the samples {1,2,3} + * need not be very nice. Like in any spectral + * application, you really have to have some + * a-priori knowledge of the underlying function. + */ + if(fabs( f_in[0]-1.0)/1.0 > 2.0e-05) stat++; + if(fabs( f_in[1]-2.0)/2.0 > 2.0e-05) stat++; + if(fabs( f_in[2]-3.0)/3.0 > 2.0e-05) stat++; + + gsl_dht_free(t); + + return stat; +} + + + +/* Test the transform + * Integrate[x J_0(a x) / (x^2 + 1), {x,0,Inf}] = K_0(a) + */ +int +test_dht_simple(void) +{ + int stat = 0; + int n; + double f_in[128]; + double f_out[128]; + gsl_dht * t = gsl_dht_new(128, 0.0, 100.0); + + for(n=0; n<128; n++) { + const double x = gsl_dht_x_sample(t, n); + f_in[n] = 1.0/(1.0+x*x); + } + + gsl_dht_apply(t, f_in, f_out); + + /* This is a difficult transform to calculate this way, + * since it does not satisfy the boundary condition and + * it dies quite slowly. So it is not meaningful to + * compare this to high accuracy. We only check + * that it seems to be working. + */ + if(fabs( f_out[0]-4.00)/4.00 > 0.02) stat++; + if(fabs( f_out[5]-1.84)/1.84 > 0.02) stat++; + if(fabs(f_out[10]-1.27)/1.27 > 0.02) stat++; + if(fabs(f_out[35]-0.352)/0.352 > 0.02) stat++; + if(fabs(f_out[100]-0.0237)/0.0237 > 0.02) stat++; + + gsl_dht_free(t); + + return stat; +} + + +/* Test the transform + * Integrate[ x exp(-x) J_1(a x), {x,0,Inf}] = a F(3/2, 2; 2; -a^2) + */ +int +test_dht_exp1(void) +{ + int stat = 0; + int n; + double f_in[128]; + double f_out[128]; + gsl_dht * t = gsl_dht_new(128, 1.0, 20.0); + + for(n=0; n<128; n++) { + const double x = gsl_dht_x_sample(t, n); + f_in[n] = exp(-x); + } + + gsl_dht_apply(t, f_in, f_out); + + /* Spot check. + * Note that the systematic errors in the calculation + * are quite large, so it is meaningless to compare + * to a high accuracy. + */ + if(fabs( f_out[0]-0.181)/0.181 > 0.02) stat++; + if(fabs( f_out[5]-0.357)/0.357 > 0.02) stat++; + if(fabs(f_out[10]-0.211)/0.211 > 0.02) stat++; + if(fabs(f_out[35]-0.0289)/0.0289 > 0.02) stat++; + if(fabs(f_out[100]-0.00221)/0.00211 > 0.02) stat++; + + gsl_dht_free(t); + + return stat; +} + + +/* Test the transform + * Integrate[ x^2 (1-x^2) J_1(a x), {x,0,1}] = 2/a^2 J_3(a) + */ +int +test_dht_poly1(void) +{ + int stat = 0; + int n; + double f_in[128]; + double f_out[128]; + gsl_dht * t = gsl_dht_new(128, 1.0, 1.0); + + for(n=0; n<128; n++) { + const double x = gsl_dht_x_sample(t, n); + f_in[n] = x * (1.0 - x*x); + } + + gsl_dht_apply(t, f_in, f_out); + + /* Spot check. This function satisfies the boundary condition, + * so the accuracy should be ok. + */ + if(fabs( f_out[0]-0.057274214)/0.057274214 > 1.0e-07) stat++; + if(fabs( f_out[5]-(-0.000190850))/0.000190850 > 1.0e-05) stat++; + if(fabs(f_out[10]-0.000024342)/0.000024342 > 1.0e-04) stat++; + if(fabs(f_out[35]-(-4.04e-07))/4.04e-07 > 1.0e-03) stat++; + if(fabs(f_out[100]-1.0e-08)/1.0e-08 > 0.25) stat++; + + gsl_dht_free(t); + + return stat; +} + + +int main() +{ + gsl_ieee_env_setup (); + + gsl_test( test_dht_exact(), "Small Exact DHT"); + gsl_test( test_dht_simple(), "Simple DHT"); + gsl_test( test_dht_exp1(), "Exp J1 DHT"); + gsl_test( test_dht_poly1(), "Poly J1 DHT"); + + exit (gsl_test_summary()); +} diff --git a/software/gsl-1.15/diff/.deps/diff.Plo b/software/gsl-1.15/diff/.deps/diff.Plo new file mode 100644 index 000000000..36027845d --- /dev/null +++ b/software/gsl-1.15/diff/.deps/diff.Plo @@ -0,0 +1,131 @@ +diff.lo: diff.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_diff.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_diff.h: diff --git a/software/gsl-1.15/diff/.deps/test.Po b/software/gsl-1.15/diff/.deps/test.Po new file mode 100644 index 000000000..1915697a2 --- /dev/null +++ b/software/gsl-1.15/diff/.deps/test.Po @@ -0,0 +1,136 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + ../gsl/gsl_diff.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_diff.h: diff --git a/software/gsl-1.15/diff/ChangeLog b/software/gsl-1.15/diff/ChangeLog new file mode 100644 index 000000000..e478e0a64 --- /dev/null +++ b/software/gsl-1.15/diff/ChangeLog @@ -0,0 +1,25 @@ +2008-09-18 Brian Gough + + * diff.c test.c: temporarily enable deprecated functions for + testing + + * gsl_diff.h: marked these functions deprecated, use gsl_deriv + instead. + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +Mon Apr 23 13:26:21 2001 Brian Gough + + * Makefile.am: removed demo from Makefile + + * test.c (test): changed return type to void + +Mon Feb 5 13:42:54 2001 Brian Gough + + * diff.c: moved gradient calculating function into multimin since + it depends on multimin functions + + * test.c (main): tidied up the tests + diff --git a/software/gsl-1.15/diff/Makefile.am b/software/gsl-1.15/diff/Makefile.am new file mode 100644 index 000000000..8e76280e6 --- /dev/null +++ b/software/gsl-1.15/diff/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgsldiff.la + +INCLUDES = -I$(top_srcdir) + +libgsldiff_la_SOURCES = diff.c + +pkginclude_HEADERS = gsl_diff.h + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test #demo + +test_SOURCES = test.c +test_LDADD = libgsldiff.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgsldiff.la ../vector/libgslvector.la ../block/libgslblock.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la diff --git a/software/gsl-1.15/diff/Makefile.in b/software/gsl-1.15/diff/Makefile.in new file mode 100644 index 000000000..a6abf6af9 --- /dev/null +++ b/software/gsl-1.15/diff/Makefile.in @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = diff +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgsldiff_la_LIBADD = +am_libgsldiff_la_OBJECTS = diff.lo +libgsldiff_la_OBJECTS = $(am_libgsldiff_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgsldiff.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsldiff_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgsldiff_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgsldiff.la +INCLUDES = -I$(top_srcdir) +libgsldiff_la_SOURCES = diff.c +pkginclude_HEADERS = gsl_diff.h +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgsldiff.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu diff/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu diff/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsldiff.la: $(libgsldiff_la_OBJECTS) $(libgsldiff_la_DEPENDENCIES) + $(LINK) $(libgsldiff_la_OBJECTS) $(libgsldiff_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES = demo.c +#demo_LDADD = libgsldiff.la ../vector/libgslvector.la ../block/libgslblock.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/diff/diff.c b/software/gsl-1.15/diff/diff.c new file mode 100644 index 000000000..bb7041f81 --- /dev/null +++ b/software/gsl-1.15/diff/diff.c @@ -0,0 +1,182 @@ +/* diff/diff.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#undef GSL_DISABLE_DEPRECATED +#include + +int +gsl_diff_backward (const gsl_function * f, + double x, double *result, double *abserr) +{ + /* Construct a divided difference table with a fairly large step + size to get a very rough estimate of f''. Use this to estimate + the step size which will minimize the error in calculating f'. */ + + int i, k; + double h = GSL_SQRT_DBL_EPSILON; + double a[3], d[3], a2; + + /* Algorithm based on description on pg. 204 of Conte and de Boor + (CdB) - coefficients of Newton form of polynomial of degree 2. */ + + for (i = 0; i < 3; i++) + { + a[i] = x + (i - 2.0) * h; + d[i] = GSL_FN_EVAL (f, a[i]); + } + + for (k = 1; k < 4; k++) + { + for (i = 0; i < 3 - k; i++) + { + d[i] = (d[i + 1] - d[i]) / (a[i + k] - a[i]); + } + } + + /* Adapt procedure described on pg. 282 of CdB to find best value of + step size. */ + + a2 = fabs (d[0] + d[1] + d[2]); + + if (a2 < 100.0 * GSL_SQRT_DBL_EPSILON) + { + a2 = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + h = sqrt (GSL_SQRT_DBL_EPSILON / (2.0 * a2)); + + if (h > 100.0 * GSL_SQRT_DBL_EPSILON) + { + h = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + *result = (GSL_FN_EVAL (f, x) - GSL_FN_EVAL (f, x - h)) / h; + *abserr = fabs (10.0 * a2 * h); + + return GSL_SUCCESS; +} + +int +gsl_diff_forward (const gsl_function * f, + double x, double *result, double *abserr) +{ + /* Construct a divided difference table with a fairly large step + size to get a very rough estimate of f''. Use this to estimate + the step size which will minimize the error in calculating f'. */ + + int i, k; + double h = GSL_SQRT_DBL_EPSILON; + double a[3], d[3], a2; + + /* Algorithm based on description on pg. 204 of Conte and de Boor + (CdB) - coefficients of Newton form of polynomial of degree 2. */ + + for (i = 0; i < 3; i++) + { + a[i] = x + i * h; + d[i] = GSL_FN_EVAL (f, a[i]); + } + + for (k = 1; k < 4; k++) + { + for (i = 0; i < 3 - k; i++) + { + d[i] = (d[i + 1] - d[i]) / (a[i + k] - a[i]); + } + } + + /* Adapt procedure described on pg. 282 of CdB to find best value of + step size. */ + + a2 = fabs (d[0] + d[1] + d[2]); + + if (a2 < 100.0 * GSL_SQRT_DBL_EPSILON) + { + a2 = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + h = sqrt (GSL_SQRT_DBL_EPSILON / (2.0 * a2)); + + if (h > 100.0 * GSL_SQRT_DBL_EPSILON) + { + h = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + *result = (GSL_FN_EVAL (f, x + h) - GSL_FN_EVAL (f, x)) / h; + *abserr = fabs (10.0 * a2 * h); + + return GSL_SUCCESS; +} + +int +gsl_diff_central (const gsl_function * f, + double x, double *result, double *abserr) +{ + /* Construct a divided difference table with a fairly large step + size to get a very rough estimate of f'''. Use this to estimate + the step size which will minimize the error in calculating f'. */ + + int i, k; + double h = GSL_SQRT_DBL_EPSILON; + double a[4], d[4], a3; + + /* Algorithm based on description on pg. 204 of Conte and de Boor + (CdB) - coefficients of Newton form of polynomial of degree 3. */ + + for (i = 0; i < 4; i++) + { + a[i] = x + (i - 2.0) * h; + d[i] = GSL_FN_EVAL (f, a[i]); + } + + for (k = 1; k < 5; k++) + { + for (i = 0; i < 4 - k; i++) + { + d[i] = (d[i + 1] - d[i]) / (a[i + k] - a[i]); + } + } + + /* Adapt procedure described on pg. 282 of CdB to find best + value of step size. */ + + a3 = fabs (d[0] + d[1] + d[2] + d[3]); + + if (a3 < 100.0 * GSL_SQRT_DBL_EPSILON) + { + a3 = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + h = pow (GSL_SQRT_DBL_EPSILON / (2.0 * a3), 1.0 / 3.0); + + if (h > 100.0 * GSL_SQRT_DBL_EPSILON) + { + h = 100.0 * GSL_SQRT_DBL_EPSILON; + } + + *result = (GSL_FN_EVAL (f, x + h) - GSL_FN_EVAL (f, x - h)) / (2.0 * h); + *abserr = fabs (100.0 * a3 * h * h); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/diff/gsl_diff.h b/software/gsl-1.15/diff/gsl_diff.h new file mode 100644 index 000000000..a145894f4 --- /dev/null +++ b/software/gsl-1.15/diff/gsl_diff.h @@ -0,0 +1,52 @@ +/* diff/gsl_diff.h + * + * Copyright (C) 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_DIFF_H__ +#define __GSL_DIFF_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +#ifndef GSL_DISABLE_DEPRECATED +int gsl_diff_central (const gsl_function *f, + double x, + double *result, double *abserr); + +int gsl_diff_backward (const gsl_function *f, + double x, + double *result, double *abserr); + +int gsl_diff_forward (const gsl_function *f, + double x, + double *result, double *abserr); +#endif + +__END_DECLS + +#endif /* __GSL_DIFF_H__ */ diff --git a/software/gsl-1.15/diff/test.c b/software/gsl-1.15/diff/test.c new file mode 100644 index 000000000..c3aad4adf --- /dev/null +++ b/software/gsl-1.15/diff/test.c @@ -0,0 +1,197 @@ +/* diff/test.c + * + * Copyright (C) 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#undef GSL_DISABLE_DEPRECATED +#include + +double +f1 (double x, void *params) +{ + return exp (x); +} + +double +df1 (double x, void *params) +{ + return exp (x); +} + +double +f2 (double x, void *params) +{ + if (x >= 0.0) + { + return x * sqrt (x); + } + else + { + return 0.0; + } +} + +double +df2 (double x, void *params) +{ + if (x >= 0.0) + { + return 1.5 * sqrt (x); + } + else + { + return 0.0; + } +} + +double +f3 (double x, void *params) +{ + if (x != 0.0) + { + return sin (1 / x); + } + else + { + return 0.0; + } +} + +double +df3 (double x, void *params) +{ + if (x != 0.0) + { + return -cos (1 / x) / (x * x); + } + else + { + return 0.0; + } +} + +double +f4 (double x, void *params) +{ + return exp (-x * x); +} + +double +df4 (double x, void *params) +{ + return -2.0 * x * exp (-x * x); +} + +double +f5 (double x, void *params) +{ + return x * x; +} + +double +df5 (double x, void *params) +{ + return 2.0 * x; +} + +double +f6 (double x, void *params) +{ + return 1.0 / x; +} + +double +df6 (double x, void *params) +{ + return -1.0 / (x * x); +} + +typedef int (diff_fn) (const gsl_function * f, double x, double * res, double *abserr); + +void +test (diff_fn * diff, gsl_function * f, gsl_function * df, double x, + const char * desc) +{ + double result, abserr; + double expected = GSL_FN_EVAL (df, x); + (*diff) (f, x, &result, &abserr); + gsl_test_abs (result, expected, abserr, desc); + gsl_test (fabs(result-expected) > abserr, "%s, valid error estimate", desc); +} + +int +main () +{ + gsl_function F1, DF1, F2, DF2, F3, DF3, F4, DF4, F5, DF5, F6, DF6; + + gsl_ieee_env_setup (); + + F1.function = &f1; + DF1.function = &df1; + + F2.function = &f2; + DF2.function = &df2; + + F3.function = &f3; + DF3.function = &df3; + + F4.function = &f4; + DF4.function = &df4; + + F5.function = &f5; + DF5.function = &df5; + + F6.function = &f6; + DF6.function = &df6; + + test (&gsl_diff_central, &F1, &DF1, 1.0, "exp(x), x=1, central diff"); + test (&gsl_diff_forward, &F1, &DF1, 1.0, "exp(x), x=1, forward diff"); + test (&gsl_diff_backward, &F1, &DF1, 1.0, "exp(x), x=1, backward diff"); + + test (&gsl_diff_central, &F2, &DF2, 0.1, "x^(3/2), x=0.1, central diff"); + test (&gsl_diff_forward, &F2, &DF2, 0.1, "x^(3/2), x=0.1, forward diff"); + test (&gsl_diff_backward, &F2, &DF2, 0.1, "x^(3/2), x=0.1, backward diff"); + + test (&gsl_diff_central, &F3, &DF3, 0.45, "sin(1/x), x=0.45, central diff"); + test (&gsl_diff_forward, &F3, &DF3, 0.45, "sin(1/x), x=0.45, forward diff"); + test (&gsl_diff_backward, &F3, &DF3, 0.45, "sin(1/x), x=0.45, backward diff"); + + test (&gsl_diff_central, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, central diff"); + test (&gsl_diff_forward, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, forward diff"); + test (&gsl_diff_backward, &F4, &DF4, 0.5, "exp(-x^2), x=0.5, backward diff"); + + test (&gsl_diff_central, &F5, &DF5, 0.0, "x^2, x=0, central diff"); + test (&gsl_diff_forward, &F5, &DF5, 0.0, "x^2, x=0, forward diff"); + test (&gsl_diff_backward, &F5, &DF5, 0.0, "x^2, x=0, backward diff"); + + test (&gsl_diff_central, &F6, &DF6, 10.0, "1/x, x=10, central diff"); + test (&gsl_diff_forward, &F6, &DF6, 10.0, "1/x, x=10, forward diff"); + test (&gsl_diff_backward, &F6, &DF6, 10.0, "1/x, x=10, backward diff"); + + exit (gsl_test_summary ()); +} + + diff --git a/software/gsl-1.15/doc/12-cities.eps b/software/gsl-1.15/doc/12-cities.eps new file mode 100644 index 000000000..f2b872697 --- /dev/null +++ b/software/gsl-1.15/doc/12-cities.eps @@ -0,0 +1,15622 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Jan 4 06:48:42 2007 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 56 177 500 610 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 56 177 500 610 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2564 10017 +2564 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2578 10017 +2578 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2476 10017 +2461 9930 +2461 10017 +2681 10017 +2681 9930 +2666 10017 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2520 9710 +2622 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2945 9973 +2960 10017 +2960 9930 +2945 9973 +2916 10003 +2872 10017 +2828 10017 +2784 10003 +2754 9973 +2754 9944 +2769 9915 +2784 9900 +2813 9886 +2901 9856 +2930 9842 +2960 9812 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2754 9944 +2784 9915 +2813 9900 +2901 9871 +2930 9856 +2945 9842 +2960 9812 +2960 9754 +2930 9724 +2886 9710 +2842 9710 +2798 9724 +2769 9754 +2754 9798 +2754 9710 +2769 9754 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3077 10017 +3077 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3092 10017 +3092 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3033 10017 +3209 10017 +3253 10003 +3267 9988 +3282 9959 +3282 9915 +3267 9886 +3253 9871 +3209 9856 +3092 9856 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3209 10017 +3238 10003 +3253 9988 +3267 9959 +3267 9915 +3253 9886 +3238 9871 +3209 9856 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3033 9710 +3136 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3619 9842 +3883 9842 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4264 9959 +4294 9973 +4338 10017 +4338 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4323 10003 +4323 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4264 9710 +4396 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +4528 9959 +4543 9944 +4528 9930 +4514 9944 +4514 9959 +4528 9988 +4543 10003 +4587 10017 +4646 10017 +4690 10003 +4704 9988 +4719 9959 +4719 9930 +4704 9900 +4660 9871 +4587 9842 +4558 9827 +4528 9798 +4514 9754 +4514 9710 +20 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4646 10017 +4675 10003 +4690 9988 +4704 9959 +4704 9930 +4690 9900 +4646 9871 +4587 9842 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4514 9739 +4528 9754 +4558 9754 +4631 9724 +4675 9724 +4704 9739 +4719 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4558 9754 +4631 9710 +4690 9710 +4704 9724 +4719 9754 +4719 9783 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +5188 9886 +5203 9915 +5203 9856 +5188 9886 +5174 9900 +5144 9915 +5086 9915 +5056 9900 +5042 9886 +5042 9856 +5056 9842 +5086 9827 +5159 9798 +5188 9783 +5203 9768 +15 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +5042 9871 +5056 9856 +5086 9842 +5159 9812 +5188 9798 +5203 9783 +5203 9739 +5188 9724 +5159 9710 +5100 9710 +5071 9724 +5056 9739 +5042 9768 +5042 9710 +5056 9739 +15 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5408 9915 +5452 9900 +5481 9871 +5496 9827 +5496 9798 +5481 9754 +5452 9724 +5408 9710 +5379 9710 +5335 9724 +5305 9754 +5291 9798 +5291 9827 +5305 9871 +5335 9900 +5379 9915 +16 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5379 9915 +5349 9900 +5320 9871 +5305 9827 +5305 9798 +5320 9754 +5349 9724 +5379 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5408 9710 +5437 9724 +5467 9754 +5481 9798 +5481 9827 +5467 9871 +5437 9900 +5408 9915 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5613 9915 +5613 9754 +5628 9724 +5672 9710 +5701 9710 +5745 9724 +5775 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5628 9915 +5628 9754 +5643 9724 +5672 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5775 9915 +5775 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5789 9915 +5789 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5569 9915 +5628 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5731 9915 +5789 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5775 9710 +5833 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5936 10017 +5936 9768 +5951 9724 +5980 9710 +6009 9710 +6039 9724 +6053 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5951 10017 +5951 9768 +5965 9724 +5980 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5892 9915 +6009 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6156 10017 +6156 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6171 10017 +6171 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6171 9871 +6200 9900 +6244 9915 +6273 9915 +6317 9900 +6332 9871 +6332 9710 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6273 9915 +6302 9900 +6317 9871 +6317 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6112 10017 +6171 10017 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6112 9710 +6215 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6273 9710 +6376 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6464 9915 +6522 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6478 9915 +6522 9754 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6581 9915 +6522 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6581 9915 +6640 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6596 9915 +6640 9754 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6698 9915 +6640 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6420 9915 +6522 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6654 9915 +6742 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +6816 9827 +6992 9827 +6992 9856 +6977 9886 +6962 9900 +6933 9915 +6889 9915 +6845 9900 +6816 9871 +6801 9827 +6801 9798 +6816 9754 +6845 9724 +6889 9710 +6918 9710 +6962 9724 +6992 9754 +17 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6977 9827 +6977 9871 +6962 9900 +3 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6889 9915 +6860 9900 +6830 9871 +6816 9827 +6816 9798 +6830 9754 +6860 9724 +6889 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +7226 9886 +7241 9915 +7241 9856 +7226 9886 +7212 9900 +7182 9915 +7124 9915 +7094 9900 +7080 9886 +7080 9856 +7094 9842 +7124 9827 +7197 9798 +7226 9783 +7241 9768 +15 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +7080 9871 +7094 9856 +7124 9842 +7197 9812 +7226 9798 +7241 9783 +7241 9739 +7226 9724 +7197 9710 +7138 9710 +7109 9724 +7094 9739 +7080 9768 +7080 9710 +7094 9739 +15 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7358 10017 +7358 9768 +7373 9724 +7402 9710 +7431 9710 +7461 9724 +7475 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +7373 10017 +7373 9768 +7387 9724 +7402 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7314 9915 +7431 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 18 +7959 9871 +7945 9856 +7959 9842 +7974 9856 +7974 9871 +7945 9900 +7915 9915 +7871 9915 +7827 9900 +7798 9871 +7783 9827 +7783 9798 +7798 9754 +7827 9724 +7871 9710 +7901 9710 +7945 9724 +7974 9754 +18 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7871 9915 +7842 9900 +7813 9871 +7798 9827 +7798 9798 +7813 9754 +7842 9724 +7871 9710 +8 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +8106 10003 +8091 9988 +8077 10003 +8091 10017 +4 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8091 9915 +8091 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8106 9915 +8106 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8047 9915 +8106 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8047 9710 +8150 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +8253 10017 +8253 9768 +8267 9724 +8296 9710 +8326 9710 +8355 9724 +8370 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +8267 10017 +8267 9768 +8282 9724 +8296 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8209 9915 +8326 9915 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +8487 10003 +8472 9988 +8458 10003 +8472 10017 +4 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8472 9915 +8472 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8487 9915 +8487 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8428 9915 +8487 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8428 9710 +8531 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +8619 9827 +8795 9827 +8795 9856 +8780 9886 +8766 9900 +8736 9915 +8692 9915 +8648 9900 +8619 9871 +8604 9827 +8604 9798 +8619 9754 +8648 9724 +8692 9710 +8722 9710 +8766 9724 +8795 9754 +17 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +8780 9827 +8780 9871 +8766 9900 +3 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8692 9915 +8663 9900 +8634 9871 +8619 9827 +8619 9798 +8634 9754 +8663 9724 +8692 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +9030 9886 +9044 9915 +9044 9856 +9030 9886 +9015 9900 +8986 9915 +8927 9915 +8898 9900 +8883 9886 +8883 9856 +8898 9842 +8927 9827 +9000 9798 +9030 9783 +9044 9768 +15 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +8883 9871 +8898 9856 +8927 9842 +9000 9812 +9030 9798 +9044 9783 +9044 9739 +9030 9724 +9000 9710 +8942 9710 +8912 9724 +8898 9739 +8883 9768 +8883 9710 +8898 9739 +15 MLine +End + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2315 2151 +2348 2140 +2370 2107 +2381 2052 +2381 2019 +2370 1964 +2348 1931 +2315 1920 +2293 1920 +2260 1931 +2238 1964 +2227 2019 +2227 2052 +2238 2107 +2260 2140 +2293 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2293 2151 +2271 2140 +2260 2129 +2249 2107 +2238 2052 +2238 2019 +2249 1964 +2260 1942 +2271 1931 +2293 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2315 1920 +2337 1931 +2348 1942 +2359 1964 +2370 2019 +2370 2052 +2359 2107 +2348 2129 +2337 2140 +2315 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3313 2107 +3335 2118 +3368 2151 +3368 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3357 2140 +3357 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3313 1920 +3411 1920 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3587 2151 +3620 2140 +3642 2107 +3653 2052 +3653 2019 +3642 1964 +3620 1931 +3587 1920 +3565 1920 +3532 1931 +3510 1964 +3499 2019 +3499 2052 +3510 2107 +3532 2140 +3565 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3565 2151 +3543 2140 +3532 2129 +3521 2107 +3510 2052 +3510 2019 +3521 1964 +3532 1942 +3543 1931 +3565 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3587 1920 +3609 1931 +3620 1942 +3631 1964 +3642 2019 +3642 2052 +3631 2107 +3620 2129 +3609 2140 +3587 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3807 2151 +3840 2140 +3862 2107 +3873 2052 +3873 2019 +3862 1964 +3840 1931 +3807 1920 +3785 1920 +3752 1931 +3730 1964 +3719 2019 +3719 2052 +3730 2107 +3752 2140 +3785 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3785 2151 +3763 2140 +3752 2129 +3741 2107 +3730 2052 +3730 2019 +3741 1964 +3752 1942 +3763 1931 +3785 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3807 1920 +3829 1931 +3840 1942 +3851 1964 +3862 2019 +3862 2052 +3851 2107 +3840 2129 +3829 2140 +3807 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4027 2151 +4060 2140 +4082 2107 +4093 2052 +4093 2019 +4082 1964 +4060 1931 +4027 1920 +4005 1920 +3972 1931 +3950 1964 +3939 2019 +3939 2052 +3950 2107 +3972 2140 +4005 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4005 2151 +3983 2140 +3972 2129 +3961 2107 +3950 2052 +3950 2019 +3961 1964 +3972 1942 +3983 1931 +4005 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4027 1920 +4049 1931 +4060 1942 +4071 1964 +4082 2019 +4082 2052 +4071 2107 +4060 2129 +4049 2140 +4027 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +4673 2107 +4684 2096 +4673 2085 +4662 2096 +4662 2107 +4673 2129 +4684 2140 +4717 2151 +4761 2151 +4794 2140 +4805 2129 +4816 2107 +4816 2085 +4805 2063 +4772 2041 +4717 2019 +4695 2008 +4673 1986 +4662 1953 +4662 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4761 2151 +4783 2140 +4794 2129 +4805 2107 +4805 2085 +4794 2063 +4761 2041 +4717 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4662 1942 +4673 1953 +4695 1953 +4750 1931 +4783 1931 +4805 1942 +4816 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4695 1953 +4750 1920 +4794 1920 +4805 1931 +4816 1953 +4816 1975 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4970 2151 +5003 2140 +5025 2107 +5036 2052 +5036 2019 +5025 1964 +5003 1931 +4970 1920 +4948 1920 +4915 1931 +4893 1964 +4882 2019 +4882 2052 +4893 2107 +4915 2140 +4948 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4948 2151 +4926 2140 +4915 2129 +4904 2107 +4893 2052 +4893 2019 +4904 1964 +4915 1942 +4926 1931 +4948 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4970 1920 +4992 1931 +5003 1942 +5014 1964 +5025 2019 +5025 2052 +5014 2107 +5003 2129 +4992 2140 +4970 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5190 2151 +5223 2140 +5245 2107 +5256 2052 +5256 2019 +5245 1964 +5223 1931 +5190 1920 +5168 1920 +5135 1931 +5113 1964 +5102 2019 +5102 2052 +5113 2107 +5135 2140 +5168 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5168 2151 +5146 2140 +5135 2129 +5124 2107 +5113 2052 +5113 2019 +5124 1964 +5135 1942 +5146 1931 +5168 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5190 1920 +5212 1931 +5223 1942 +5234 1964 +5245 2019 +5245 2052 +5234 2107 +5223 2129 +5212 2140 +5190 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5410 2151 +5443 2140 +5465 2107 +5476 2052 +5476 2019 +5465 1964 +5443 1931 +5410 1920 +5388 1920 +5355 1931 +5333 1964 +5322 2019 +5322 2052 +5333 2107 +5355 2140 +5388 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5388 2151 +5366 2140 +5355 2129 +5344 2107 +5333 2052 +5333 2019 +5344 1964 +5355 1942 +5366 1931 +5388 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5410 1920 +5432 1931 +5443 1942 +5454 1964 +5465 2019 +5465 2052 +5454 2107 +5443 2129 +5432 2140 +5410 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6055 2107 +6066 2096 +6055 2085 +6044 2096 +6044 2107 +6055 2129 +6066 2140 +6099 2151 +6143 2151 +6176 2140 +6187 2118 +6187 2085 +6176 2063 +6143 2052 +6110 2052 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6143 2151 +6165 2140 +6176 2118 +6176 2085 +6165 2063 +6143 2052 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6143 2052 +6165 2041 +6187 2019 +6198 1997 +6198 1964 +6187 1942 +6176 1931 +6143 1920 +6099 1920 +6066 1931 +6055 1942 +6044 1964 +6044 1975 +6055 1986 +6066 1975 +6055 1964 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6176 2030 +6187 1997 +6187 1964 +6176 1942 +6165 1931 +6143 1920 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6352 2151 +6385 2140 +6407 2107 +6418 2052 +6418 2019 +6407 1964 +6385 1931 +6352 1920 +6330 1920 +6297 1931 +6275 1964 +6264 2019 +6264 2052 +6275 2107 +6297 2140 +6330 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6330 2151 +6308 2140 +6297 2129 +6286 2107 +6275 2052 +6275 2019 +6286 1964 +6297 1942 +6308 1931 +6330 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6352 1920 +6374 1931 +6385 1942 +6396 1964 +6407 2019 +6407 2052 +6396 2107 +6385 2129 +6374 2140 +6352 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6572 2151 +6605 2140 +6627 2107 +6638 2052 +6638 2019 +6627 1964 +6605 1931 +6572 1920 +6550 1920 +6517 1931 +6495 1964 +6484 2019 +6484 2052 +6495 2107 +6517 2140 +6550 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6550 2151 +6528 2140 +6517 2129 +6506 2107 +6495 2052 +6495 2019 +6506 1964 +6517 1942 +6528 1931 +6550 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6572 1920 +6594 1931 +6605 1942 +6616 1964 +6627 2019 +6627 2052 +6616 2107 +6605 2129 +6594 2140 +6572 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6792 2151 +6825 2140 +6847 2107 +6858 2052 +6858 2019 +6847 1964 +6825 1931 +6792 1920 +6770 1920 +6737 1931 +6715 1964 +6704 2019 +6704 2052 +6715 2107 +6737 2140 +6770 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6770 2151 +6748 2140 +6737 2129 +6726 2107 +6715 2052 +6715 2019 +6726 1964 +6737 1942 +6748 1931 +6770 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6792 1920 +6814 1931 +6825 1942 +6836 1964 +6847 2019 +6847 2052 +6836 2107 +6825 2129 +6814 2140 +6792 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7526 2129 +7526 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7537 2151 +7537 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +7537 2151 +7416 1986 +7592 1986 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7493 1920 +7570 1920 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7735 2151 +7768 2140 +7790 2107 +7801 2052 +7801 2019 +7790 1964 +7768 1931 +7735 1920 +7713 1920 +7680 1931 +7658 1964 +7647 2019 +7647 2052 +7658 2107 +7680 2140 +7713 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7713 2151 +7691 2140 +7680 2129 +7669 2107 +7658 2052 +7658 2019 +7669 1964 +7680 1942 +7691 1931 +7713 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7735 1920 +7757 1931 +7768 1942 +7779 1964 +7790 2019 +7790 2052 +7779 2107 +7768 2129 +7757 2140 +7735 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7955 2151 +7988 2140 +8010 2107 +8021 2052 +8021 2019 +8010 1964 +7988 1931 +7955 1920 +7933 1920 +7900 1931 +7878 1964 +7867 2019 +7867 2052 +7878 2107 +7900 2140 +7933 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7933 2151 +7911 2140 +7900 2129 +7889 2107 +7878 2052 +7878 2019 +7889 1964 +7900 1942 +7911 1931 +7933 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7955 1920 +7977 1931 +7988 1942 +7999 1964 +8010 2019 +8010 2052 +7999 2107 +7988 2129 +7977 2140 +7955 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8174 2151 +8207 2140 +8229 2107 +8240 2052 +8240 2019 +8229 1964 +8207 1931 +8174 1920 +8152 1920 +8120 1931 +8098 1964 +8087 2019 +8087 2052 +8098 2107 +8120 2140 +8152 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8152 2151 +8131 2140 +8120 2129 +8109 2107 +8098 2052 +8098 2019 +8109 1964 +8120 1942 +8131 1931 +8152 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8174 1920 +8196 1931 +8207 1942 +8218 1964 +8229 2019 +8229 2052 +8218 2107 +8207 2129 +8196 2140 +8174 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8831 2151 +8809 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +8809 2041 +8831 2063 +8864 2074 +8897 2074 +8930 2063 +8952 2041 +8963 2008 +8963 1986 +8952 1953 +8930 1931 +8897 1920 +8864 1920 +8831 1931 +8820 1942 +8809 1964 +8809 1975 +8820 1986 +8831 1975 +8820 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8897 2074 +8919 2063 +8941 2041 +8952 2008 +8952 1986 +8941 1953 +8919 1931 +8897 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8831 2151 +8941 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +8831 2140 +8886 2140 +8941 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9117 2151 +9150 2140 +9172 2107 +9183 2052 +9183 2019 +9172 1964 +9150 1931 +9117 1920 +9095 1920 +9062 1931 +9040 1964 +9029 2019 +9029 2052 +9040 2107 +9062 2140 +9095 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9095 2151 +9073 2140 +9062 2129 +9051 2107 +9040 2052 +9040 2019 +9051 1964 +9062 1942 +9073 1931 +9095 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9117 1920 +9139 1931 +9150 1942 +9161 1964 +9172 2019 +9172 2052 +9161 2107 +9150 2129 +9139 2140 +9117 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9337 2151 +9370 2140 +9392 2107 +9403 2052 +9403 2019 +9392 1964 +9370 1931 +9337 1920 +9315 1920 +9282 1931 +9260 1964 +9249 2019 +9249 2052 +9260 2107 +9282 2140 +9315 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9315 2151 +9293 2140 +9282 2129 +9271 2107 +9260 2052 +9260 2019 +9271 1964 +9282 1942 +9293 1931 +9315 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9337 1920 +9359 1931 +9370 1942 +9381 1964 +9392 2019 +9392 2052 +9381 2107 +9370 2129 +9359 2140 +9337 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9557 2151 +9590 2140 +9612 2107 +9623 2052 +9623 2019 +9612 1964 +9590 1931 +9557 1920 +9535 1920 +9502 1931 +9480 1964 +9469 2019 +9469 2052 +9480 2107 +9502 2140 +9535 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9535 2151 +9513 2140 +9502 2129 +9491 2107 +9480 2052 +9480 2019 +9491 1964 +9502 1942 +9513 1931 +9535 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9557 1920 +9579 1931 +9590 1942 +9601 1964 +9612 2019 +9612 2052 +9601 2107 +9590 2129 +9579 2140 +9557 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2580 9216 +2580 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2580 2304 +2580 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2857 9216 +2857 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2857 2304 +2857 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3133 9216 +3133 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3133 2304 +3133 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3410 9216 +3410 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3410 2304 +3410 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3963 9216 +3963 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3963 2304 +3963 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4239 9216 +4239 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4239 2304 +4239 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4516 9216 +4516 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4516 2304 +4516 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4792 9216 +4792 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4792 2304 +4792 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5345 9216 +5345 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5345 2304 +5345 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5622 9216 +5622 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5622 2304 +5622 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5898 9216 +5898 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5898 2304 +5898 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6175 9216 +6175 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6175 2304 +6175 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6728 9216 +6728 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6728 2304 +6728 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7004 9216 +7004 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7004 2304 +7004 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7281 9216 +7281 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7281 2304 +7281 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7557 9216 +7557 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7557 2304 +7557 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8110 9216 +8110 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8110 2304 +8110 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8387 9216 +8387 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8387 2304 +8387 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8663 9216 +8663 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8663 2304 +8663 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8940 9216 +8940 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8940 2304 +8940 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1365 2824 +1376 2813 +1365 2802 +1354 2813 +1354 2824 +1365 2846 +1376 2857 +1409 2868 +1453 2868 +1486 2857 +1497 2835 +1497 2802 +1486 2780 +1453 2769 +1420 2769 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1453 2868 +1475 2857 +1486 2835 +1486 2802 +1475 2780 +1453 2769 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1453 2769 +1475 2758 +1497 2736 +1508 2714 +1508 2681 +1497 2659 +1486 2648 +1453 2637 +1409 2637 +1376 2648 +1365 2659 +1354 2681 +1354 2692 +1365 2703 +1376 2692 +1365 2681 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1486 2747 +1497 2714 +1497 2681 +1486 2659 +1475 2648 +1453 2637 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 2868 +1574 2758 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1574 2758 +1596 2780 +1629 2791 +1661 2791 +1694 2780 +1716 2758 +1727 2725 +1727 2703 +1716 2670 +1694 2648 +1661 2637 +1629 2637 +1596 2648 +1585 2659 +1574 2681 +1574 2692 +1585 2703 +1596 2692 +1585 2681 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1661 2791 +1683 2780 +1705 2758 +1716 2725 +1716 2703 +1705 2670 +1683 2648 +1661 2637 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 2868 +1705 2868 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1596 2857 +1651 2857 +1705 2868 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 2868 +1914 2857 +1936 2824 +1947 2769 +1947 2736 +1936 2681 +1914 2648 +1881 2637 +1859 2637 +1826 2648 +1804 2681 +1793 2736 +1793 2769 +1804 2824 +1826 2857 +1859 2868 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 2868 +1837 2857 +1826 2846 +1815 2824 +1804 2769 +1804 2736 +1815 2681 +1826 2659 +1837 2648 +1859 2637 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 2637 +1903 2648 +1914 2659 +1925 2681 +1936 2736 +1936 2769 +1925 2824 +1914 2846 +1903 2857 +1881 2868 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 2868 +2134 2857 +2156 2824 +2167 2769 +2167 2736 +2156 2681 +2134 2648 +2101 2637 +2079 2637 +2046 2648 +2024 2681 +2013 2736 +2013 2769 +2024 2824 +2046 2857 +2079 2868 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 2868 +2057 2857 +2046 2846 +2035 2824 +2024 2769 +2024 2736 +2035 2681 +2046 2659 +2057 2648 +2079 2637 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 2637 +2123 2648 +2134 2659 +2145 2681 +2156 2736 +2156 2769 +2145 2824 +2134 2846 +2123 2857 +2101 2868 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2736 +9078 2736 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2736 +2442 2736 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1453 3926 +1453 3717 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1464 3948 +1464 3717 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1464 3948 +1343 3783 +1519 3783 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1420 3717 +1497 3717 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1661 3948 +1694 3937 +1716 3904 +1727 3849 +1727 3816 +1716 3761 +1694 3728 +1661 3717 +1640 3717 +1607 3728 +1585 3761 +1574 3816 +1574 3849 +1585 3904 +1607 3937 +1640 3948 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1640 3948 +1618 3937 +1607 3926 +1596 3904 +1585 3849 +1585 3816 +1596 3761 +1607 3739 +1618 3728 +1640 3717 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1661 3717 +1683 3728 +1694 3739 +1705 3761 +1716 3816 +1716 3849 +1705 3904 +1694 3926 +1683 3937 +1661 3948 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 3948 +1914 3937 +1936 3904 +1947 3849 +1947 3816 +1936 3761 +1914 3728 +1881 3717 +1859 3717 +1826 3728 +1804 3761 +1793 3816 +1793 3849 +1804 3904 +1826 3937 +1859 3948 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 3948 +1837 3937 +1826 3926 +1815 3904 +1804 3849 +1804 3816 +1815 3761 +1826 3739 +1837 3728 +1859 3717 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 3717 +1903 3728 +1914 3739 +1925 3761 +1936 3816 +1936 3849 +1925 3904 +1914 3926 +1903 3937 +1881 3948 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 3948 +2134 3937 +2156 3904 +2167 3849 +2167 3816 +2156 3761 +2134 3728 +2101 3717 +2079 3717 +2046 3728 +2024 3761 +2013 3816 +2013 3849 +2024 3904 +2046 3937 +2079 3948 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 3948 +2057 3937 +2046 3926 +2035 3904 +2024 3849 +2024 3816 +2035 3761 +2046 3739 +2057 3728 +2079 3717 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 3717 +2123 3728 +2134 3739 +2145 3761 +2156 3816 +2156 3849 +2145 3904 +2134 3926 +2123 3937 +2101 3948 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3816 +9078 3816 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3816 +2442 3816 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1453 5006 +1453 4797 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1464 5028 +1464 4797 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1464 5028 +1343 4863 +1519 4863 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1420 4797 +1497 4797 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 5028 +1574 4918 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1574 4918 +1596 4940 +1629 4951 +1661 4951 +1694 4940 +1716 4918 +1727 4885 +1727 4863 +1716 4830 +1694 4808 +1661 4797 +1629 4797 +1596 4808 +1585 4819 +1574 4841 +1574 4852 +1585 4863 +1596 4852 +1585 4841 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1661 4951 +1683 4940 +1705 4918 +1716 4885 +1716 4863 +1705 4830 +1683 4808 +1661 4797 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 5028 +1705 5028 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1596 5017 +1651 5017 +1705 5028 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 5028 +1914 5017 +1936 4984 +1947 4929 +1947 4896 +1936 4841 +1914 4808 +1881 4797 +1859 4797 +1826 4808 +1804 4841 +1793 4896 +1793 4929 +1804 4984 +1826 5017 +1859 5028 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 5028 +1837 5017 +1826 5006 +1815 4984 +1804 4929 +1804 4896 +1815 4841 +1826 4819 +1837 4808 +1859 4797 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 4797 +1903 4808 +1914 4819 +1925 4841 +1936 4896 +1936 4929 +1925 4984 +1914 5006 +1903 5017 +1881 5028 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 5028 +2134 5017 +2156 4984 +2167 4929 +2167 4896 +2156 4841 +2134 4808 +2101 4797 +2079 4797 +2046 4808 +2024 4841 +2013 4896 +2013 4929 +2024 4984 +2046 5017 +2079 5028 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 5028 +2057 5017 +2046 5006 +2035 4984 +2024 4929 +2024 4896 +2035 4841 +2046 4819 +2057 4808 +2079 4797 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 4797 +2123 4808 +2134 4819 +2145 4841 +2156 4896 +2156 4929 +2145 4984 +2134 5006 +2123 5017 +2101 5028 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4896 +9078 4896 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4896 +2442 4896 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1376 6108 +1354 5998 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1354 5998 +1376 6020 +1409 6031 +1442 6031 +1475 6020 +1497 5998 +1508 5965 +1508 5943 +1497 5910 +1475 5888 +1442 5877 +1409 5877 +1376 5888 +1365 5899 +1354 5921 +1354 5932 +1365 5943 +1376 5932 +1365 5921 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1442 6031 +1464 6020 +1486 5998 +1497 5965 +1497 5943 +1486 5910 +1464 5888 +1442 5877 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1376 6108 +1486 6108 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1376 6097 +1431 6097 +1486 6108 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1661 6108 +1694 6097 +1716 6064 +1727 6009 +1727 5976 +1716 5921 +1694 5888 +1661 5877 +1640 5877 +1607 5888 +1585 5921 +1574 5976 +1574 6009 +1585 6064 +1607 6097 +1640 6108 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1640 6108 +1618 6097 +1607 6086 +1596 6064 +1585 6009 +1585 5976 +1596 5921 +1607 5899 +1618 5888 +1640 5877 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1661 5877 +1683 5888 +1694 5899 +1705 5921 +1716 5976 +1716 6009 +1705 6064 +1694 6086 +1683 6097 +1661 6108 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 6108 +1914 6097 +1936 6064 +1947 6009 +1947 5976 +1936 5921 +1914 5888 +1881 5877 +1859 5877 +1826 5888 +1804 5921 +1793 5976 +1793 6009 +1804 6064 +1826 6097 +1859 6108 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 6108 +1837 6097 +1826 6086 +1815 6064 +1804 6009 +1804 5976 +1815 5921 +1826 5899 +1837 5888 +1859 5877 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 5877 +1903 5888 +1914 5899 +1925 5921 +1936 5976 +1936 6009 +1925 6064 +1914 6086 +1903 6097 +1881 6108 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 6108 +2134 6097 +2156 6064 +2167 6009 +2167 5976 +2156 5921 +2134 5888 +2101 5877 +2079 5877 +2046 5888 +2024 5921 +2013 5976 +2013 6009 +2024 6064 +2046 6097 +2079 6108 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 6108 +2057 6097 +2046 6086 +2035 6064 +2024 6009 +2024 5976 +2035 5921 +2046 5899 +2057 5888 +2079 5877 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 5877 +2123 5888 +2134 5899 +2145 5921 +2156 5976 +2156 6009 +2145 6064 +2134 6086 +2123 6097 +2101 6108 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5976 +9078 5976 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5976 +2442 5976 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1376 7188 +1354 7078 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1354 7078 +1376 7100 +1409 7111 +1442 7111 +1475 7100 +1497 7078 +1508 7045 +1508 7023 +1497 6990 +1475 6968 +1442 6957 +1409 6957 +1376 6968 +1365 6979 +1354 7001 +1354 7012 +1365 7023 +1376 7012 +1365 7001 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1442 7111 +1464 7100 +1486 7078 +1497 7045 +1497 7023 +1486 6990 +1464 6968 +1442 6957 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1376 7188 +1486 7188 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1376 7177 +1431 7177 +1486 7188 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 7188 +1574 7078 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1574 7078 +1596 7100 +1629 7111 +1661 7111 +1694 7100 +1716 7078 +1727 7045 +1727 7023 +1716 6990 +1694 6968 +1661 6957 +1629 6957 +1596 6968 +1585 6979 +1574 7001 +1574 7012 +1585 7023 +1596 7012 +1585 7001 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1661 7111 +1683 7100 +1705 7078 +1716 7045 +1716 7023 +1705 6990 +1683 6968 +1661 6957 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 7188 +1705 7188 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1596 7177 +1651 7177 +1705 7188 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 7188 +1914 7177 +1936 7144 +1947 7089 +1947 7056 +1936 7001 +1914 6968 +1881 6957 +1859 6957 +1826 6968 +1804 7001 +1793 7056 +1793 7089 +1804 7144 +1826 7177 +1859 7188 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 7188 +1837 7177 +1826 7166 +1815 7144 +1804 7089 +1804 7056 +1815 7001 +1826 6979 +1837 6968 +1859 6957 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 6957 +1903 6968 +1914 6979 +1925 7001 +1936 7056 +1936 7089 +1925 7144 +1914 7166 +1903 7177 +1881 7188 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 7188 +2134 7177 +2156 7144 +2167 7089 +2167 7056 +2156 7001 +2134 6968 +2101 6957 +2079 6957 +2046 6968 +2024 7001 +2013 7056 +2013 7089 +2024 7144 +2046 7177 +2079 7188 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 7188 +2057 7177 +2046 7166 +2035 7144 +2024 7089 +2024 7056 +2035 7001 +2046 6979 +2057 6968 +2079 6957 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 6957 +2123 6968 +2134 6979 +2145 7001 +2156 7056 +2156 7089 +2145 7144 +2134 7166 +2123 7177 +2101 7188 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7056 +9078 7056 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7056 +2442 7056 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +1486 8235 +1475 8224 +1486 8213 +1497 8224 +1497 8235 +1486 8257 +1464 8268 +1431 8268 +1398 8257 +1376 8235 +1365 8213 +1354 8169 +1354 8103 +1365 8070 +1387 8048 +1420 8037 +1442 8037 +1475 8048 +1497 8070 +1508 8103 +1508 8114 +1497 8147 +1475 8169 +1442 8180 +1431 8180 +1398 8169 +1376 8147 +1365 8114 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +1431 8268 +1409 8257 +1387 8235 +1376 8213 +1365 8169 +1365 8103 +1376 8070 +1398 8048 +1420 8037 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1442 8037 +1464 8048 +1486 8070 +1497 8103 +1497 8114 +1486 8147 +1464 8169 +1442 8180 +8 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1661 8268 +1694 8257 +1716 8224 +1727 8169 +1727 8136 +1716 8081 +1694 8048 +1661 8037 +1640 8037 +1607 8048 +1585 8081 +1574 8136 +1574 8169 +1585 8224 +1607 8257 +1640 8268 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1640 8268 +1618 8257 +1607 8246 +1596 8224 +1585 8169 +1585 8136 +1596 8081 +1607 8059 +1618 8048 +1640 8037 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1661 8037 +1683 8048 +1694 8059 +1705 8081 +1716 8136 +1716 8169 +1705 8224 +1694 8246 +1683 8257 +1661 8268 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 8268 +1914 8257 +1936 8224 +1947 8169 +1947 8136 +1936 8081 +1914 8048 +1881 8037 +1859 8037 +1826 8048 +1804 8081 +1793 8136 +1793 8169 +1804 8224 +1826 8257 +1859 8268 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 8268 +1837 8257 +1826 8246 +1815 8224 +1804 8169 +1804 8136 +1815 8081 +1826 8059 +1837 8048 +1859 8037 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 8037 +1903 8048 +1914 8059 +1925 8081 +1936 8136 +1936 8169 +1925 8224 +1914 8246 +1903 8257 +1881 8268 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 8268 +2134 8257 +2156 8224 +2167 8169 +2167 8136 +2156 8081 +2134 8048 +2101 8037 +2079 8037 +2046 8048 +2024 8081 +2013 8136 +2013 8169 +2024 8224 +2046 8257 +2079 8268 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 8268 +2057 8257 +2046 8246 +2035 8224 +2024 8169 +2024 8136 +2035 8081 +2046 8059 +2057 8048 +2079 8037 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 8037 +2123 8048 +2134 8059 +2145 8081 +2156 8136 +2156 8169 +2145 8224 +2134 8246 +2123 8257 +2101 8268 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8136 +9078 8136 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8136 +2442 8136 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +1486 9315 +1475 9304 +1486 9293 +1497 9304 +1497 9315 +1486 9337 +1464 9348 +1431 9348 +1398 9337 +1376 9315 +1365 9293 +1354 9249 +1354 9183 +1365 9150 +1387 9128 +1420 9117 +1442 9117 +1475 9128 +1497 9150 +1508 9183 +1508 9194 +1497 9227 +1475 9249 +1442 9260 +1431 9260 +1398 9249 +1376 9227 +1365 9194 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +1431 9348 +1409 9337 +1387 9315 +1376 9293 +1365 9249 +1365 9183 +1376 9150 +1398 9128 +1420 9117 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1442 9117 +1464 9128 +1486 9150 +1497 9183 +1497 9194 +1486 9227 +1464 9249 +1442 9260 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 9348 +1574 9238 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +1574 9238 +1596 9260 +1629 9271 +1661 9271 +1694 9260 +1716 9238 +1727 9205 +1727 9183 +1716 9150 +1694 9128 +1661 9117 +1629 9117 +1596 9128 +1585 9139 +1574 9161 +1574 9172 +1585 9183 +1596 9172 +1585 9161 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1661 9271 +1683 9260 +1705 9238 +1716 9205 +1716 9183 +1705 9150 +1683 9128 +1661 9117 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1596 9348 +1705 9348 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1596 9337 +1651 9337 +1705 9348 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1881 9348 +1914 9337 +1936 9304 +1947 9249 +1947 9216 +1936 9161 +1914 9128 +1881 9117 +1859 9117 +1826 9128 +1804 9161 +1793 9216 +1793 9249 +1804 9304 +1826 9337 +1859 9348 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1859 9348 +1837 9337 +1826 9326 +1815 9304 +1804 9249 +1804 9216 +1815 9161 +1826 9139 +1837 9128 +1859 9117 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1881 9117 +1903 9128 +1914 9139 +1925 9161 +1936 9216 +1936 9249 +1925 9304 +1914 9326 +1903 9337 +1881 9348 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 9348 +2134 9337 +2156 9304 +2167 9249 +2167 9216 +2156 9161 +2134 9128 +2101 9117 +2079 9117 +2046 9128 +2024 9161 +2013 9216 +2013 9249 +2024 9304 +2046 9337 +2079 9348 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 9348 +2057 9337 +2046 9326 +2035 9304 +2024 9249 +2024 9216 +2035 9161 +2046 9139 +2057 9128 +2079 9117 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 9117 +2123 9128 +2134 9139 +2145 9161 +2156 9216 +2156 9249 +2145 9304 +2134 9326 +2123 9337 +2101 9348 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4858 1621 +4880 1610 +4891 1599 +4902 1577 +4902 1555 +4891 1533 +4880 1522 +4858 1511 +4836 1511 +4814 1522 +4803 1533 +4792 1555 +4792 1577 +4803 1599 +4814 1610 +4836 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4814 1610 +4803 1588 +4803 1544 +4814 1522 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4880 1522 +4891 1544 +4891 1588 +4880 1610 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +4891 1599 +4902 1610 +4924 1621 +4924 1610 +4902 1610 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4803 1533 +4792 1522 +4781 1500 +4781 1489 +4792 1467 +4825 1456 +4880 1456 +4913 1445 +4924 1434 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +4781 1489 +4792 1478 +4825 1467 +4880 1467 +4913 1456 +4924 1434 +4924 1423 +4913 1401 +4880 1390 +4814 1390 +4781 1401 +4770 1423 +4770 1434 +4781 1456 +4814 1467 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5001 1555 +5133 1555 +5133 1577 +5122 1599 +5111 1610 +5089 1621 +5056 1621 +5023 1610 +5001 1588 +4990 1555 +4990 1533 +5001 1500 +5023 1478 +5056 1467 +5078 1467 +5111 1478 +5133 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5122 1555 +5122 1588 +5111 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5056 1621 +5034 1610 +5012 1588 +5001 1555 +5001 1533 +5012 1500 +5034 1478 +5056 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5221 1621 +5221 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5232 1621 +5232 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5232 1588 +5254 1610 +5287 1621 +5309 1621 +5342 1610 +5353 1588 +5353 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5309 1621 +5331 1610 +5342 1588 +5342 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1621 +5232 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1467 +5265 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5309 1467 +5386 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5452 1555 +5584 1555 +5584 1577 +5573 1599 +5562 1610 +5540 1621 +5507 1621 +5474 1610 +5452 1588 +5441 1555 +5441 1533 +5452 1500 +5474 1478 +5507 1467 +5529 1467 +5562 1478 +5584 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5573 1555 +5573 1588 +5562 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5507 1621 +5485 1610 +5463 1588 +5452 1555 +5452 1533 +5463 1500 +5485 1478 +5507 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5672 1621 +5672 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5683 1621 +5683 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5683 1555 +5694 1588 +5716 1610 +5738 1621 +5771 1621 +5782 1610 +5782 1599 +5771 1588 +5760 1599 +5771 1610 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1621 +5683 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1467 +5716 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +5859 1599 +5859 1588 +5848 1588 +5848 1599 +5859 1610 +5881 1621 +5925 1621 +5947 1610 +5958 1599 +5969 1577 +5969 1500 +5980 1478 +5991 1467 +13 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +5958 1599 +5958 1500 +5969 1478 +5991 1467 +6002 1467 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +5958 1577 +5947 1566 +5881 1555 +5848 1544 +5837 1522 +5837 1500 +5848 1478 +5881 1467 +5914 1467 +5936 1478 +5958 1500 +11 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5881 1555 +5859 1544 +5848 1522 +5848 1500 +5859 1478 +5881 1467 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6079 1698 +6079 1511 +6090 1478 +6112 1467 +6134 1467 +6156 1478 +6167 1500 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6090 1698 +6090 1511 +6101 1478 +6112 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6046 1621 +6134 1621 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6255 1687 +6244 1676 +6233 1687 +6244 1698 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6244 1621 +6244 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6255 1621 +6255 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1621 +6255 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1467 +6288 1467 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6431 1621 +6464 1610 +6486 1588 +6497 1555 +6497 1533 +6486 1500 +6464 1478 +6431 1467 +6409 1467 +6376 1478 +6354 1500 +6343 1533 +6343 1555 +6354 1588 +6376 1610 +6409 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6409 1621 +6387 1610 +6365 1588 +6354 1555 +6354 1533 +6365 1500 +6387 1478 +6409 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6431 1467 +6453 1478 +6475 1500 +6486 1533 +6486 1555 +6475 1588 +6453 1610 +6431 1621 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6585 1621 +6585 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6596 1621 +6596 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6596 1588 +6618 1610 +6651 1621 +6673 1621 +6706 1610 +6717 1588 +6717 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6673 1621 +6695 1610 +6706 1588 +6706 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1621 +6596 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1467 +6629 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6673 1467 +6750 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +771 5133 +1002 5133 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +771 5144 +1002 5144 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +881 5133 +859 5111 +848 5089 +848 5067 +859 5034 +881 5012 +914 5001 +936 5001 +969 5012 +991 5034 +1002 5067 +1002 5089 +991 5111 +969 5133 +14 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +848 5067 +859 5045 +881 5023 +914 5012 +936 5012 +969 5023 +991 5045 +1002 5067 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +771 5100 +771 5144 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1002 5133 +1002 5177 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +782 5265 +793 5254 +782 5243 +771 5254 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5254 +1002 5254 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5265 +1002 5265 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5221 +848 5265 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1002 5221 +1002 5298 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +870 5463 +848 5474 +892 5474 +870 5463 +859 5452 +848 5430 +848 5386 +859 5364 +870 5353 +892 5353 +903 5364 +914 5386 +936 5441 +947 5463 +958 5474 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +881 5353 +892 5364 +903 5386 +925 5441 +936 5463 +947 5474 +980 5474 +991 5463 +1002 5441 +1002 5397 +991 5375 +980 5364 +958 5353 +1002 5353 +980 5364 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +771 5562 +958 5562 +991 5573 +1002 5595 +1002 5617 +991 5639 +969 5650 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +771 5573 +958 5573 +991 5584 +1002 5595 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5529 +848 5617 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +870 5727 +881 5727 +881 5716 +870 5716 +859 5727 +848 5749 +848 5793 +859 5815 +870 5826 +892 5837 +969 5837 +991 5848 +1002 5859 +13 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +870 5826 +969 5826 +991 5837 +1002 5859 +1002 5870 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +892 5826 +903 5815 +914 5749 +925 5716 +947 5705 +969 5705 +991 5716 +1002 5749 +1002 5782 +991 5804 +969 5826 +11 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +914 5749 +925 5727 +947 5716 +969 5716 +991 5727 +1002 5749 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5947 +1002 5947 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5958 +1002 5958 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +881 5958 +859 5980 +848 6013 +848 6035 +859 6068 +881 6079 +1002 6079 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +848 6035 +859 6057 +881 6068 +1002 6068 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +848 5914 +848 5958 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1002 5914 +1002 5991 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1002 6035 +1002 6112 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 18 +881 6299 +892 6288 +903 6299 +892 6310 +881 6310 +859 6288 +848 6266 +848 6233 +859 6200 +881 6178 +914 6167 +936 6167 +969 6178 +991 6200 +1002 6233 +1002 6255 +991 6288 +969 6310 +18 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +848 6233 +859 6211 +881 6189 +914 6178 +936 6178 +969 6189 +991 6211 +1002 6233 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +914 6387 +914 6519 +892 6519 +870 6508 +859 6497 +848 6475 +848 6442 +859 6409 +881 6387 +914 6376 +936 6376 +969 6387 +991 6409 +1002 6442 +1002 6464 +991 6497 +969 6519 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +914 6508 +881 6508 +859 6497 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +848 6442 +859 6420 +881 6398 +914 6387 +936 6387 +969 6398 +991 6420 +1002 6442 +8 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +2304 5975 +2305 7816 +2307 4950 +2308 6253 +2310 6424 +2311 7247 +2312 7226 +2314 7637 +2315 5613 +2316 5493 +2318 6547 +2319 6692 +2321 5964 +2322 7196 +2323 5558 +2325 5777 +2326 5879 +2328 6986 +2329 6683 +2330 6582 +2332 7053 +2333 6524 +2334 7103 +2336 6771 +2337 6085 +2339 6261 +2340 7658 +2341 6191 +2343 5763 +2344 5180 +2345 6647 +2347 6690 +2348 6033 +2350 5517 +2351 6947 +2352 6031 +2354 7215 +2355 5701 +2357 6826 +2358 4979 +2359 7053 +2361 7059 +2362 6081 +2363 5251 +2365 6631 +2366 7749 +2368 7219 +2369 7019 +2370 5147 +2372 6824 +2373 7042 +2375 5319 +2376 6485 +2377 6702 +2379 7476 +2380 6497 +2381 5692 +2383 7014 +2384 6696 +2386 7546 +2387 6374 +2388 7684 +2390 5675 +2391 6634 +2392 5907 +2394 6945 +2395 4627 +2397 5267 +2398 7319 +2399 6397 +2401 6962 +2402 6413 +2404 5424 +2405 4277 +2406 7412 +2408 5725 +2409 5438 +2410 7077 +2412 7297 +2413 6874 +2415 5718 +2416 7183 +2417 6089 +2419 6439 +2420 5788 +2422 7577 +2423 7135 +2424 4970 +2426 4854 +2427 7340 +2428 6868 +2430 7205 +2431 4963 +2433 5641 +2434 6536 +2435 4679 +2437 6735 +2438 4672 +2439 8293 +2441 6474 +2442 7717 +2444 7297 +2445 5583 +2446 7717 +2448 6229 +2449 7615 +2451 5946 +2452 7426 +2453 7569 +2455 7305 +2456 7030 +2457 5945 +2459 6252 +2460 6256 +2462 5037 +2463 7580 +2464 6202 +2466 6322 +2467 7211 +2469 6680 +2470 7020 +2471 7596 +2473 6861 +2474 6352 +2475 6302 +2477 6238 +2478 5681 +2480 7024 +2481 7194 +2482 7181 +2484 5997 +2485 7477 +2486 6567 +2488 5778 +2489 7126 +2491 7143 +2492 4981 +2493 7184 +2495 6655 +2496 6103 +2498 7571 +2499 7773 +2500 4533 +2502 7966 +2503 6383 +2504 5874 +2506 6128 +2507 7545 +2509 7794 +2510 5779 +2511 6850 +2513 6570 +2514 6612 +2516 6800 +2517 7324 +2518 6811 +2520 6237 +2521 5937 +2522 7023 +2524 5700 +2525 6549 +2527 5356 +2528 4062 +2529 5495 +2531 7192 +2532 7316 +2533 6114 +2535 7015 +2536 6818 +2538 6597 +2539 7315 +2540 6174 +2542 5431 +2543 4943 +2545 7012 +2546 6702 +2547 7220 +2549 6142 +2550 7649 +2551 6097 +2553 7626 +2554 5399 +2556 6739 +2557 5159 +2558 6984 +2560 6165 +2561 6070 +2563 7594 +2564 6333 +2565 6072 +2567 6981 +2568 6118 +2569 8009 +2571 6786 +2572 3964 +2574 7069 +2575 6203 +2576 7315 +2578 6263 +2579 6910 +2580 7867 +2582 7539 +2583 6058 +2585 7242 +2586 7161 +2587 4653 +2589 5701 +2590 5840 +2592 7394 +2593 6140 +2594 6588 +2596 7405 +2597 7363 +2598 6270 +2600 6828 +2601 6694 +2603 6633 +2604 5843 +2605 6859 +2607 7988 +2608 8335 +2610 6485 +2611 6899 +2612 6402 +2614 6170 +2615 6849 +2616 6781 +2618 5607 +2619 7433 +2621 6231 +2622 6930 +2623 6528 +2625 5108 +2626 5909 +2627 6618 +2629 6798 +2630 7872 +2632 6204 +2633 5670 +2634 6511 +2636 7405 +2637 7134 +2639 6024 +2640 5627 +2641 7504 +2643 6354 +2644 6328 +2645 6850 +2647 6170 +2648 5736 +2650 5071 +2651 7988 +2652 5623 +2654 7860 +2655 8050 +2657 6341 +2658 6585 +2659 7083 +2661 6648 +2662 6756 +2663 5424 +2665 6470 +2666 7593 +2668 5424 +2669 6352 +2670 6943 +2672 6103 +2673 5837 +2674 7117 +2676 6315 +2677 5418 +2679 6215 +2680 6400 +2681 6010 +2683 7503 +2684 7385 +2686 6992 +2687 6667 +2688 6781 +2690 5817 +2691 5413 +2692 5412 +2694 5498 +2695 4809 +2697 6155 +2698 6572 +2699 5742 +2701 6998 +2702 7159 +2704 5752 +2705 6282 +2706 7428 +2708 6185 +2709 5320 +2710 5352 +2712 7322 +2713 6880 +2715 5045 +2716 8073 +2717 6522 +2719 6304 +2720 6838 +2721 7607 +2723 6454 +2724 4543 +2726 5443 +2727 4373 +2728 6075 +2730 4438 +2731 6222 +2733 6471 +2734 6127 +2735 4718 +2737 6646 +2738 7497 +2739 6643 +2741 6507 +2742 7559 +2744 5945 +2745 6344 +2746 5749 +2748 3931 +2749 5983 +2751 5519 +2752 7380 +2753 6519 +2755 6871 +2756 6904 +2757 4866 +2759 6241 +2760 6975 +2762 6489 +2763 6289 +2764 7682 +2766 6684 +2767 7146 +2768 4765 +2770 6388 +2771 5567 +2773 6850 +2774 7391 +2775 6612 +2777 6446 +2778 6030 +2780 4342 +2781 4427 +2782 6825 +2784 5752 +2785 6568 +2786 7571 +2788 6257 +2789 6656 +2791 6926 +2792 6282 +2793 6897 +2795 6227 +2796 5113 +2798 7030 +2799 7242 +2800 5510 +2802 7129 +2803 6568 +2804 6192 +2806 6959 +2807 5321 +2809 4693 +2810 6100 +2811 6395 +2813 6826 +2814 5490 +2815 6969 +2817 6078 +2818 7152 +2820 6091 +2821 7381 +2822 6617 +2824 7695 +2825 5593 +2827 6622 +2828 6288 +2829 6702 +2831 6934 +2832 6624 +2833 5925 +2835 7798 +2836 4630 +2838 6688 +2839 7861 +2840 6913 +2842 6210 +2843 6419 +2845 6804 +2846 7672 +2847 7459 +2849 7743 +2850 6174 +2851 7115 +2853 7227 +2854 6955 +2856 4666 +2857 5437 +2858 7272 +2860 7161 +2861 6287 +2862 6510 +2864 7009 +2865 6230 +2867 8104 +2868 5213 +2869 7444 +2871 5270 +2872 6554 +2874 8316 +2875 6849 +2876 7049 +2878 7424 +2879 5947 +2880 7143 +2882 4998 +2883 6869 +2885 6666 +2886 5571 +2887 4916 +2889 7033 +2890 7221 +2892 6641 +2893 5717 +2894 5146 +2896 5780 +2897 6069 +2898 5560 +2900 6828 +2901 6165 +2903 5213 +2904 7420 +2905 5039 +2907 6388 +2908 7049 +2909 6891 +2911 6493 +2912 7226 +2914 7190 +2915 6023 +2916 7258 +2918 7024 +2919 7329 +2921 5204 +2922 6316 +2923 7768 +2925 5235 +2926 3984 +2927 4882 +2929 5740 +2930 6666 +2932 5163 +2933 6564 +2934 7307 +2936 5580 +2937 7181 +2939 6624 +2940 7831 +2941 7859 +2943 5221 +2944 7092 +2945 7608 +2947 5700 +2948 6040 +2950 7511 +2951 5388 +2952 7134 +2954 6344 +2955 7619 +2956 5623 +2958 5272 +2959 5360 +2961 6245 +2962 6129 +2963 6190 +2965 6880 +2966 6481 +2968 6064 +2969 5978 +2970 5826 +2972 6860 +2973 7539 +2974 5309 +2976 5697 +2977 6036 +2979 5645 +2980 7292 +2981 7775 +2983 5403 +2984 7097 +2986 6945 +2987 6146 +2988 5767 +2990 6920 +2991 6175 +2992 6384 +2994 6065 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +2994 6065 +2995 6508 +2997 6632 +2998 5605 +2999 7427 +3001 6132 +3002 6997 +3003 5107 +3005 8057 +3006 5980 +3008 6607 +3009 5047 +3010 7159 +3012 6130 +3013 6326 +3015 5480 +3016 7144 +3017 6460 +3019 6057 +3020 5236 +3021 7111 +3023 6834 +3024 7882 +3026 6138 +3027 6672 +3028 4868 +3030 5932 +3031 6708 +3033 5904 +3034 6156 +3035 7098 +3037 6948 +3038 7216 +3039 5263 +3041 4902 +3042 5075 +3044 6038 +3045 5928 +3046 6721 +3048 6916 +3049 6175 +3050 6186 +3052 5165 +3053 6628 +3055 4563 +3056 6825 +3057 6994 +3059 5837 +3060 6024 +3062 4145 +3063 6181 +3064 7149 +3066 6230 +3067 7353 +3068 5027 +3070 6784 +3071 5176 +3073 4734 +3074 6185 +3075 7018 +3077 6738 +3078 7112 +3080 5657 +3081 6499 +3082 6577 +3084 5404 +3085 6748 +3086 7088 +3088 6050 +3089 4645 +3091 7826 +3092 4502 +3093 3982 +3095 6140 +3096 6906 +3097 5287 +3099 6297 +3100 7275 +3102 7638 +3103 6758 +3104 6217 +3106 6206 +3107 6472 +3109 7863 +3110 5915 +3111 6128 +3113 7946 +3114 6022 +3115 6673 +3117 7093 +3118 7403 +3120 5984 +3121 7523 +3122 5666 +3124 5830 +3125 7180 +3127 7926 +3128 5279 +3129 7104 +3131 6301 +3132 7283 +3133 6673 +3135 5524 +3136 4270 +3138 7139 +3139 5666 +3140 6830 +3142 6505 +3143 4847 +3144 7208 +3146 5955 +3147 6739 +3149 4931 +3150 6824 +3151 6430 +3153 6334 +3154 6755 +3156 6898 +3157 7908 +3158 7316 +3160 4991 +3161 5627 +3162 6798 +3164 7575 +3165 4947 +3167 5466 +3168 7527 +3169 6864 +3171 5942 +3172 6255 +3174 6357 +3175 6552 +3176 8008 +3178 5726 +3179 5386 +3180 7356 +3182 7055 +3183 7835 +3185 5904 +3186 7610 +3187 6764 +3189 6366 +3190 7155 +3192 6349 +3193 6661 +3194 6692 +3196 7036 +3197 6412 +3198 6167 +3200 5942 +3201 6170 +3203 6511 +3204 6497 +3205 5323 +3207 5020 +3208 6034 +3209 7502 +3211 7104 +3212 6304 +3214 4423 +3215 5941 +3216 6554 +3218 5133 +3219 5137 +3221 4899 +3222 5826 +3223 7202 +3225 5999 +3226 5980 +3227 7764 +3229 5558 +3230 5769 +3232 6808 +3233 6655 +3234 7062 +3236 4576 +3237 7493 +3239 5320 +3240 6538 +3241 6106 +3243 6974 +3244 6782 +3245 5881 +3247 5960 +3248 6582 +3250 3852 +3251 7165 +3252 5777 +3254 4462 +3255 6883 +3256 5868 +3258 6677 +3259 7032 +3261 7121 +3262 6284 +3263 4604 +3265 6944 +3266 5429 +3268 5106 +3269 4632 +3270 5302 +3272 7407 +3273 6297 +3274 4845 +3276 5363 +3277 5750 +3279 6514 +3280 6256 +3281 6940 +3283 5749 +3284 5088 +3286 5680 +3287 6105 +3288 5626 +3290 7455 +3291 6419 +3292 7427 +3294 6426 +3295 6968 +3297 7535 +3298 6764 +3299 7084 +3301 6368 +3302 7328 +3303 6864 +3305 7209 +3306 5261 +3308 6392 +3309 4682 +3310 5981 +3312 6751 +3313 6832 +3315 5489 +3316 6844 +3317 6692 +3319 6347 +3320 7442 +3321 5362 +3323 5816 +3324 6621 +3326 6946 +3327 7012 +3328 5654 +3330 5382 +3331 7440 +3333 4981 +3334 6342 +3335 6539 +3337 5497 +3338 7107 +3339 6330 +3341 7525 +3342 6899 +3344 5995 +3345 5421 +3346 6763 +3348 6741 +3349 5918 +3350 6332 +3352 6261 +3353 5289 +3355 6792 +3356 4720 +3357 6069 +3359 5393 +3360 7078 +3362 6579 +3363 5048 +3364 6334 +3366 4833 +3367 5472 +3368 7092 +3370 5130 +3371 8076 +3373 5672 +3374 5522 +3375 5711 +3377 7683 +3378 6997 +3380 6467 +3381 6152 +3382 6038 +3384 6242 +3385 4935 +3386 7055 +3388 6717 +3389 7209 +3391 6157 +3392 7196 +3393 5341 +3395 7441 +3396 7034 +3397 6058 +3399 7014 +3400 6908 +3402 7481 +3403 6465 +3404 6024 +3406 5161 +3407 7598 +3409 4797 +3410 6655 +3411 6232 +3413 7690 +3414 4949 +3415 7138 +3417 5030 +3418 4984 +3420 6002 +3421 5609 +3422 6021 +3424 6210 +3425 6712 +3427 5799 +3428 4447 +3429 5318 +3431 6674 +3432 6104 +3433 5491 +3435 5034 +3436 5408 +3438 5728 +3439 5729 +3440 7040 +3442 6414 +3443 6618 +3444 4612 +3446 5057 +3447 5917 +3449 5631 +3450 7749 +3451 5845 +3453 4696 +3454 6539 +3456 5306 +3457 6940 +3458 6095 +3460 5522 +3461 7480 +3462 7401 +3464 6061 +3465 4705 +3467 7143 +3468 6591 +3469 6361 +3471 6358 +3472 6579 +3474 5328 +3475 5058 +3476 5359 +3478 7628 +3479 4818 +3480 6228 +3482 6697 +3483 5229 +3485 7214 +3486 6968 +3487 6231 +3489 7966 +3490 6855 +3491 5392 +3493 6562 +3494 4965 +3496 5518 +3497 4392 +3498 6042 +3500 5510 +3501 5253 +3503 7226 +3504 5400 +3505 5482 +3507 5709 +3508 6324 +3509 5405 +3511 5800 +3512 6493 +3514 5151 +3515 5342 +3516 5332 +3518 6004 +3519 6017 +3521 6112 +3522 4149 +3523 6556 +3525 6055 +3526 4613 +3527 6550 +3529 7414 +3530 5444 +3532 5983 +3533 5153 +3534 6227 +3536 6975 +3537 6840 +3538 6669 +3540 5521 +3541 7013 +3543 6924 +3544 6700 +3545 6718 +3547 6761 +3548 6997 +3550 4070 +3551 5336 +3552 5382 +3554 7298 +3555 6985 +3556 5151 +3558 7633 +3559 5992 +3561 4105 +3562 7280 +3563 6925 +3565 5363 +3566 6286 +3568 6211 +3569 4586 +3570 5155 +3572 4908 +3573 6782 +3574 6281 +3576 4295 +3577 6229 +3579 6564 +3580 3982 +3581 6056 +3583 4917 +3584 6610 +3585 7452 +3587 6288 +3588 6866 +3590 6604 +3591 5803 +3592 5523 +3594 7327 +3595 6162 +3597 5427 +3598 4539 +3599 4636 +3601 6353 +3602 6531 +3603 6937 +3605 6264 +3606 5553 +3608 7460 +3609 6216 +3610 5923 +3612 7448 +3613 6211 +3615 5896 +3616 7463 +3617 7677 +3619 7453 +3620 6312 +3621 6029 +3623 6315 +3624 5449 +3626 5130 +3627 5696 +3628 6288 +3630 5038 +3631 6149 +3632 5816 +3634 5556 +3635 6803 +3637 6792 +3638 6528 +3639 4853 +3641 6032 +3642 5143 +3644 5579 +3645 5671 +3646 7076 +3648 6538 +3649 4431 +3650 5194 +3652 6770 +3653 6072 +3655 4156 +3656 4607 +3657 7255 +3659 5704 +3660 6602 +3662 6843 +3663 6291 +3664 5185 +3666 7251 +3667 6110 +3668 5283 +3670 6565 +3671 6153 +3673 6825 +3674 5929 +3675 4326 +3677 5884 +3678 6694 +3679 4817 +3681 5716 +3682 7328 +3684 6636 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +3684 6636 +3685 6170 +3686 5820 +3688 5297 +3689 5708 +3691 4592 +3692 4857 +3693 6834 +3695 7258 +3696 6691 +3697 6333 +3699 7118 +3700 5369 +3702 6478 +3703 6327 +3704 6422 +3706 5175 +3707 6853 +3709 6431 +3710 5454 +3711 5344 +3713 6855 +3714 5590 +3715 7694 +3717 6550 +3718 7201 +3720 6486 +3721 4999 +3722 7183 +3724 5553 +3725 6642 +3726 4676 +3728 6758 +3729 4332 +3731 5495 +3732 5165 +3733 5613 +3735 5879 +3736 4700 +3738 4972 +3739 4334 +3740 6682 +3742 7116 +3743 5894 +3744 6361 +3746 5605 +3747 6007 +3749 5479 +3750 5883 +3751 5141 +3753 7290 +3754 6674 +3756 4964 +3757 5153 +3758 7665 +3760 4429 +3761 4644 +3762 4841 +3764 6395 +3765 5078 +3767 4876 +3768 6966 +3769 5723 +3771 7599 +3772 7060 +3773 5417 +3775 3796 +3776 5048 +3778 6809 +3779 5829 +3780 6202 +3782 5439 +3783 7151 +3785 5412 +3786 6694 +3787 4841 +3789 7062 +3790 5192 +3791 4741 +3793 4764 +3794 4839 +3796 6243 +3797 5745 +3798 5906 +3800 7574 +3801 4236 +3803 6197 +3804 7421 +3805 3958 +3807 6458 +3808 7604 +3809 5816 +3811 4430 +3812 5677 +3814 5400 +3815 5773 +3816 6096 +3818 3143 +3819 5402 +3820 7683 +3822 5902 +3823 6980 +3825 4711 +3826 4456 +3827 6765 +3829 6019 +3830 5095 +3832 4937 +3833 5773 +3834 5615 +3836 6371 +3837 6926 +3838 6176 +3840 6255 +3841 6747 +3843 7824 +3844 6753 +3845 6128 +3847 5596 +3848 3728 +3850 5860 +3851 5295 +3852 5202 +3854 5454 +3855 5691 +3856 5828 +3858 6077 +3859 4998 +3861 7756 +3862 6009 +3863 5641 +3865 4587 +3866 5874 +3867 5728 +3869 5814 +3870 6350 +3872 6834 +3873 5732 +3874 5525 +3876 5287 +3877 5901 +3879 6770 +3880 5634 +3881 6675 +3883 5801 +3884 6346 +3885 6345 +3887 3944 +3888 6323 +3890 7631 +3891 5038 +3892 5339 +3894 5718 +3895 6260 +3897 4656 +3898 5858 +3899 5914 +3901 5009 +3902 6377 +3903 6192 +3905 3838 +3906 5374 +3908 6010 +3909 6069 +3910 4908 +3912 6819 +3913 5734 +3914 5874 +3916 3925 +3917 6544 +3919 7007 +3920 4534 +3921 4806 +3923 6988 +3924 4958 +3926 4422 +3927 6334 +3928 4903 +3930 7559 +3931 6882 +3932 7246 +3934 7262 +3935 6130 +3937 3709 +3938 5727 +3939 6338 +3941 4823 +3942 6971 +3944 6382 +3945 5852 +3946 5377 +3948 6003 +3949 6432 +3950 5140 +3952 5964 +3953 6563 +3955 4698 +3956 7282 +3957 5322 +3959 6201 +3960 5999 +3961 7515 +3963 7765 +3964 6574 +3966 6829 +3967 5806 +3968 6656 +3970 6808 +3971 6480 +3973 4308 +3974 5807 +3975 4915 +3977 5140 +3978 5656 +3979 6004 +3981 7332 +3982 6410 +3984 5599 +3985 5602 +3986 5153 +3988 4864 +3989 5306 +3991 5471 +3992 5498 +3993 5240 +3995 6296 +3996 5165 +3997 7085 +3999 4961 +4000 4641 +4002 6059 +4003 5248 +4004 6500 +4006 5729 +4007 6164 +4008 4816 +4010 4014 +4011 5666 +4013 4345 +4014 4585 +4015 5984 +4017 4942 +4018 4814 +4020 5578 +4021 4211 +4022 7063 +4024 4061 +4025 4690 +4026 5719 +4028 6475 +4029 7119 +4031 4972 +4032 5645 +4033 7593 +4035 5954 +4036 6742 +4038 4801 +4039 6177 +4040 7284 +4042 6661 +4043 5013 +4044 4135 +4046 4466 +4047 4334 +4049 3960 +4050 4191 +4051 5243 +4053 7723 +4054 6634 +4056 5310 +4057 5735 +4058 7055 +4060 6541 +4061 7189 +4062 5539 +4064 6938 +4065 4548 +4067 4666 +4068 6024 +4069 5072 +4071 5066 +4072 4461 +4073 5766 +4075 4976 +4076 4248 +4078 6228 +4079 6556 +4080 6204 +4082 4209 +4083 7114 +4085 6552 +4086 6478 +4087 6333 +4089 5969 +4090 5169 +4091 7604 +4093 6236 +4094 6638 +4096 5579 +4097 6672 +4098 6449 +4100 5180 +4101 6388 +4103 4234 +4104 4391 +4105 4651 +4107 6191 +4108 6119 +4109 5000 +4111 5240 +4112 6411 +4114 5193 +4115 7274 +4116 4555 +4118 5460 +4119 3571 +4120 6938 +4122 6110 +4123 4595 +4125 5067 +4126 5035 +4127 7996 +4129 4122 +4130 6991 +4132 4827 +4133 4823 +4134 5016 +4136 5928 +4137 4319 +4138 5626 +4140 5762 +4141 5980 +4143 5354 +4144 7235 +4145 5318 +4147 6232 +4148 5351 +4150 5777 +4151 5357 +4152 5312 +4154 4073 +4155 5107 +4156 6022 +4158 3898 +4159 5845 +4161 4139 +4162 7499 +4163 6649 +4165 5487 +4166 6164 +4167 5959 +4169 5074 +4170 5523 +4172 5028 +4173 6271 +4174 5409 +4176 7406 +4177 5963 +4179 5488 +4180 4874 +4181 5595 +4183 4673 +4184 4818 +4185 4402 +4187 5036 +4188 5949 +4190 5548 +4191 4019 +4192 4972 +4194 4866 +4195 6727 +4197 5365 +4198 4732 +4199 6428 +4201 3299 +4202 4261 +4203 5529 +4205 5748 +4206 3059 +4208 5490 +4209 4973 +4210 6017 +4212 4664 +4213 3796 +4214 4896 +4216 4452 +4217 6510 +4219 4747 +4220 5521 +4221 4193 +4223 4976 +4224 4771 +4226 4945 +4227 4345 +4228 5805 +4230 5689 +4231 4711 +4232 6199 +4234 4049 +4235 5158 +4237 3510 +4238 5769 +4239 5298 +4241 5926 +4242 4664 +4244 6605 +4245 5619 +4246 4499 +4248 5892 +4249 5683 +4250 5952 +4252 6122 +4253 4120 +4255 6840 +4256 4934 +4257 5462 +4259 3921 +4260 6392 +4261 3845 +4263 4635 +4264 5077 +4266 5357 +4267 5407 +4268 4526 +4270 5522 +4271 5350 +4273 6841 +4274 5624 +4275 6043 +4277 6499 +4278 6918 +4279 7601 +4281 5802 +4282 4525 +4284 5221 +4285 6049 +4286 4410 +4288 4131 +4289 3651 +4291 6234 +4292 5942 +4293 5465 +4295 3740 +4296 4637 +4297 5424 +4299 5638 +4300 5997 +4302 5276 +4303 5294 +4304 5911 +4306 5647 +4307 3782 +4308 5702 +4310 6094 +4311 6285 +4313 5162 +4314 6497 +4315 5088 +4317 5544 +4318 4826 +4320 4705 +4321 5791 +4322 3410 +4324 5219 +4325 5887 +4326 7402 +4328 4437 +4329 4834 +4331 3945 +4332 5536 +4333 4938 +4335 4561 +4336 4568 +4338 4726 +4339 4517 +4340 4483 +4342 4659 +4343 5097 +4344 4829 +4346 6115 +4347 4631 +4349 4721 +4350 6862 +4351 6986 +4353 4668 +4354 6283 +4355 3399 +4357 4840 +4358 4100 +4360 3782 +4361 5525 +4362 5422 +4364 5764 +4365 4929 +4367 4125 +4368 4868 +4369 6211 +4371 5907 +4372 4884 +4373 4001 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +4373 4001 +4375 6307 +4376 5989 +4378 4968 +4379 5533 +4380 4396 +4382 5916 +4383 5373 +4385 5302 +4386 5738 +4387 4804 +4389 4709 +4390 6196 +4391 4473 +4393 7109 +4394 5018 +4396 4731 +4397 5907 +4398 4788 +4400 6437 +4401 5667 +4402 5365 +4404 3650 +4405 4945 +4407 3976 +4408 4879 +4409 4407 +4411 6014 +4412 4096 +4414 5222 +4415 6216 +4416 5301 +4418 5797 +4419 4803 +4420 4612 +4422 4215 +4423 4238 +4425 6240 +4426 4646 +4427 4413 +4429 5132 +4430 4949 +4432 5271 +4433 5711 +4434 4627 +4436 5084 +4437 5256 +4438 5503 +4440 4790 +4441 5481 +4443 5128 +4444 4624 +4445 4050 +4447 4813 +4448 5188 +4449 4801 +4451 5200 +4452 4263 +4454 5300 +4455 4722 +4456 5144 +4458 4835 +4459 4681 +4461 4219 +4462 3599 +4463 5365 +4465 6045 +4466 5993 +4467 3658 +4469 4438 +4470 4802 +4472 4337 +4473 5162 +4474 4701 +4476 5821 +4477 5553 +4479 6380 +4480 4313 +4481 4448 +4483 5026 +4484 5513 +4485 4882 +4487 4593 +4488 6002 +4490 4918 +4491 5307 +4492 4385 +4494 5196 +4495 4424 +4496 5074 +4498 5191 +4499 2876 +4501 5532 +4502 4186 +4503 5173 +4505 4020 +4506 5470 +4508 6183 +4509 5789 +4510 5566 +4512 7397 +4513 4030 +4514 4571 +4516 5151 +4517 4024 +4519 4736 +4520 5770 +4521 5857 +4523 3621 +4524 3999 +4526 4367 +4527 4136 +4528 4411 +4530 6602 +4531 5130 +4532 4375 +4534 4136 +4535 4354 +4537 4480 +4538 5302 +4539 5085 +4541 5188 +4542 4070 +4543 5418 +4545 3478 +4546 4261 +4548 4781 +4549 4659 +4550 5145 +4552 4164 +4553 4856 +4555 6950 +4556 4181 +4557 4789 +4559 5802 +4560 6507 +4561 6295 +4563 2845 +4564 3797 +4566 4108 +4567 5561 +4568 5758 +4570 5495 +4571 6497 +4573 4735 +4574 3843 +4575 5613 +4577 4142 +4578 4111 +4579 4694 +4581 4239 +4582 4944 +4584 5527 +4585 4880 +4586 4081 +4588 5156 +4589 4686 +4590 5033 +4592 4636 +4593 4331 +4595 4534 +4596 4100 +4597 5606 +4599 5805 +4600 5260 +4602 5058 +4603 3519 +4604 5371 +4606 4458 +4607 5803 +4608 6090 +4610 3593 +4611 6145 +4613 5581 +4614 3785 +4615 3642 +4617 5094 +4618 4028 +4620 6271 +4621 4236 +4622 4135 +4624 5583 +4625 3876 +4626 5511 +4628 4542 +4629 3819 +4631 3291 +4632 4485 +4633 5821 +4635 2945 +4636 4217 +4637 4247 +4639 5298 +4640 5690 +4642 4138 +4643 4686 +4644 6049 +4646 5350 +4647 3809 +4649 4497 +4650 4178 +4651 5365 +4653 4685 +4654 4860 +4655 3455 +4657 3674 +4658 4198 +4660 4522 +4661 5279 +4662 4441 +4664 4086 +4665 3529 +4667 4959 +4668 4313 +4669 4104 +4671 4460 +4672 5557 +4673 4769 +4675 4642 +4676 5072 +4678 4229 +4679 4214 +4680 4135 +4682 3574 +4683 5016 +4684 3918 +4686 3988 +4687 4638 +4689 3379 +4690 3912 +4691 3752 +4693 4410 +4694 3841 +4696 3147 +4697 5088 +4698 4660 +4700 4743 +4701 4963 +4702 3857 +4704 4519 +4705 4511 +4707 6638 +4708 3514 +4709 3953 +4711 4098 +4712 4830 +4714 4213 +4715 4801 +4716 4252 +4718 4835 +4719 4799 +4720 4029 +4722 4666 +4723 5112 +4725 4237 +4726 3929 +4727 5011 +4729 5031 +4730 4380 +4731 5397 +4733 4341 +4734 4368 +4736 3439 +4737 5105 +4738 4054 +4740 4108 +4741 3825 +4743 3774 +4744 4465 +4745 4408 +4747 3875 +4748 3327 +4749 4335 +4751 5010 +4752 3419 +4754 3467 +4755 5674 +4756 3545 +4758 4611 +4759 5626 +4761 4621 +4762 4163 +4763 4579 +4765 4164 +4766 3478 +4767 4734 +4769 4378 +4770 4729 +4772 4792 +4773 2917 +4774 4123 +4776 4701 +4777 3921 +4778 4556 +4780 4234 +4781 3942 +4783 3896 +4784 4881 +4785 3423 +4787 4234 +4788 3534 +4790 3747 +4791 3514 +4792 3246 +4794 5988 +4795 4811 +4796 3302 +4798 3206 +4799 4655 +4801 4662 +4802 3633 +4803 3951 +4805 3603 +4806 3966 +4808 3180 +4809 3612 +4810 3946 +4812 5075 +4813 4119 +4814 4512 +4816 4386 +4817 3565 +4819 4355 +4820 3819 +4821 4626 +4823 4929 +4824 3337 +4825 5396 +4827 3200 +4828 4573 +4830 4451 +4831 3233 +4832 4307 +4834 2969 +4835 4928 +4837 4062 +4838 4411 +4839 4053 +4841 4414 +4842 3122 +4843 3562 +4845 3344 +4846 5002 +4848 3488 +4849 3619 +4850 5116 +4852 4652 +4853 3643 +4855 3366 +4856 3762 +4857 3847 +4859 3509 +4860 3357 +4861 3683 +4863 3601 +4864 4759 +4866 3734 +4867 4163 +4868 3625 +4870 3684 +4871 3988 +4872 3739 +4874 3013 +4875 3886 +4877 4262 +4878 4208 +4879 3747 +4881 3695 +4882 3499 +4884 4756 +4885 4083 +4886 3708 +4888 4346 +4889 4228 +4890 4875 +4892 4302 +4893 3129 +4895 3595 +4896 3206 +4897 3657 +4899 3897 +4900 3714 +4902 4546 +4903 3941 +4904 3987 +4906 3399 +4907 3728 +4908 4032 +4910 4304 +4911 3607 +4913 4106 +4914 3293 +4915 4661 +4917 4094 +4918 3563 +4920 3370 +4921 3443 +4922 3681 +4924 3064 +4925 3626 +4926 3979 +4928 5253 +4929 3296 +4931 5318 +4932 3374 +4933 4219 +4935 3011 +4936 4587 +4937 5470 +4939 3823 +4940 3979 +4942 2946 +4943 3030 +4944 4637 +4946 3945 +4947 3750 +4949 4495 +4950 6040 +4951 3667 +4953 4144 +4954 3213 +4955 4001 +4957 3328 +4958 3290 +4960 4729 +4961 3859 +4962 2930 +4964 3991 +4965 4481 +4967 3328 +4968 4332 +4969 3967 +4971 3367 +4972 3517 +4973 4507 +4975 3048 +4976 4018 +4978 3168 +4979 3484 +4980 3019 +4982 3981 +4983 3219 +4984 3418 +4986 4245 +4987 2792 +4989 4461 +4990 4808 +4991 3574 +4993 3264 +4994 4046 +4996 4112 +4997 3535 +4998 3439 +5000 3694 +5001 2853 +5002 3746 +5004 3686 +5005 2864 +5007 4195 +5008 3154 +5009 3880 +5011 3566 +5012 3762 +5014 4567 +5015 3416 +5016 3373 +5018 4005 +5019 3810 +5020 4561 +5022 4018 +5023 3856 +5025 3308 +5026 3627 +5027 3297 +5029 3280 +5030 3243 +5031 3710 +5033 4076 +5034 3332 +5036 5182 +5037 2777 +5038 5224 +5040 2786 +5041 2890 +5043 4560 +5044 3147 +5045 4228 +5047 4021 +5048 2970 +5049 4851 +5051 4002 +5052 3527 +5054 3231 +5055 3118 +5056 3904 +5058 3773 +5059 3850 +5061 3070 +5062 3773 +5063 3879 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +5063 3879 +5065 3441 +5066 4339 +5067 3743 +5069 4075 +5070 3051 +5072 4049 +5073 4028 +5074 3206 +5076 3346 +5077 3790 +5078 3009 +5080 3329 +5081 3559 +5083 4121 +5084 3576 +5085 3450 +5087 2877 +5088 3404 +5090 3346 +5091 3182 +5092 2917 +5094 3480 +5095 2904 +5096 3539 +5098 4145 +5099 3587 +5101 4768 +5102 2948 +5103 3781 +5105 2945 +5106 3064 +5108 4570 +5109 3327 +5110 4250 +5112 2959 +5113 3737 +5114 3623 +5116 3186 +5117 3718 +5119 2897 +5120 2984 +5121 4505 +5123 3127 +5124 3793 +5125 4309 +5127 3412 +5128 3062 +5130 3808 +5131 2960 +5132 3298 +5134 3533 +5135 3190 +5137 3457 +5138 2788 +5139 3136 +5141 3197 +5142 3653 +5143 3043 +5145 3119 +5146 3192 +5148 3071 +5149 3284 +5150 3910 +5152 3711 +5153 3611 +5155 3356 +5156 3826 +5157 2917 +5159 3157 +5160 3312 +5161 4161 +5163 3561 +5164 3936 +5166 3871 +5167 3756 +5168 3744 +5170 3495 +5171 3013 +5172 3203 +5174 4517 +5175 3220 +5177 3923 +5178 3751 +5179 3117 +5181 4169 +5182 3055 +5184 3006 +5185 3403 +5186 2931 +5188 3579 +5189 3710 +5190 3432 +5192 3242 +5193 4417 +5195 3799 +5196 3103 +5197 2984 +5199 4025 +5200 4361 +5202 3475 +5203 3287 +5204 3220 +5206 4545 +5207 3662 +5208 3381 +5210 3982 +5211 2876 +5213 3510 +5214 3643 +5215 4000 +5217 2982 +5218 3840 +5219 3011 +5221 3072 +5222 2792 +5224 3720 +5225 2818 +5226 3808 +5228 3551 +5229 3639 +5231 2946 +5232 3743 +5233 3761 +5235 3335 +5236 3316 +5237 2889 +5239 3142 +5240 2788 +5242 3173 +5243 2806 +5244 3410 +5246 3148 +5247 3062 +5249 3936 +5250 2843 +5251 4039 +5253 3585 +5254 3841 +5255 2896 +5257 3356 +5258 3013 +5260 4154 +5261 3697 +5262 2950 +5264 3484 +5265 3633 +5266 3557 +5268 3037 +5269 3457 +5271 3461 +5272 3551 +5273 4206 +5275 3111 +5276 3106 +5278 3003 +5279 3547 +5280 3048 +5282 3915 +5283 2977 +5284 3170 +5286 3217 +5287 3901 +5289 3362 +5290 2792 +5291 3396 +5293 3077 +5294 3785 +5296 3244 +5297 3439 +5298 3267 +5300 3481 +5301 3080 +5302 3152 +5304 3088 +5305 3310 +5307 3713 +5308 3899 +5309 3541 +5311 3177 +5312 3118 +5313 3647 +5315 2988 +5316 2756 +5318 2727 +5319 2948 +5320 3117 +5322 3935 +5323 2961 +5325 3929 +5326 3201 +5327 3554 +5329 3020 +5330 3453 +5331 3253 +5333 3033 +5334 4427 +5336 2836 +5337 2921 +5338 4102 +5340 2814 +5341 3323 +5343 2988 +5344 3271 +5345 3288 +5347 2836 +5348 3468 +5349 2984 +5351 2853 +5352 2792 +5354 3206 +5355 2745 +5356 3203 +5358 3541 +5359 3217 +5360 2989 +5362 3379 +5363 3504 +5365 3251 +5366 3346 +5367 3070 +5369 3489 +5370 2946 +5372 3064 +5373 3160 +5374 2881 +5376 3045 +5377 3585 +5378 2801 +5380 3463 +5381 3051 +5383 3284 +5384 3000 +5385 3717 +5387 2952 +5388 3091 +5390 3180 +5391 3575 +5392 3165 +5394 3031 +5395 2950 +5396 2944 +5398 3282 +5399 3210 +5401 3319 +5402 3373 +5403 2919 +5405 2818 +5406 2843 +5407 3016 +5409 2716 +5410 2792 +5412 2853 +5413 2788 +5414 2897 +5416 3626 +5417 3268 +5419 2818 +5420 3655 +5421 3558 +5423 3364 +5424 3011 +5425 2898 +5427 2786 +5428 2919 +5430 3606 +5431 3429 +5432 2716 +5434 2898 +5435 2745 +5437 3037 +5438 2940 +5439 3036 +5441 2814 +5442 3247 +5443 2853 +5445 2930 +5446 2914 +5448 2817 +5449 2981 +5450 2976 +5452 2910 +5453 2878 +5454 2817 +5456 2727 +5457 3086 +5459 2817 +5460 2822 +5461 3188 +5463 3008 +5464 2898 +5466 2945 +5467 2896 +5468 2817 +5470 2916 +5471 2986 +5472 3204 +5474 2898 +5475 2756 +5477 3578 +5478 2898 +5479 3110 +5481 2853 +5482 2836 +5484 3011 +5485 3708 +5486 3119 +5488 3087 +5489 3051 +5490 3256 +5492 2942 +5493 3278 +5495 2838 +5496 2814 +5497 3027 +5499 3363 +5500 2806 +5501 2897 +5503 3186 +5504 2756 +5506 2921 +5507 3441 +5508 2858 +5510 2806 +5511 2984 +5513 3324 +5514 2939 +5515 3112 +5517 2838 +5518 2943 +5519 2955 +5521 3062 +5522 3133 +5524 3072 +5525 2881 +5526 2944 +5528 2890 +5529 3096 +5531 3266 +5532 3733 +5533 2766 +5535 2930 +5536 2756 +5537 3186 +5539 2788 +5540 2981 +5542 2788 +5543 3252 +5544 2890 +5546 3093 +5547 3157 +5548 3029 +5550 3290 +5551 2917 +5553 2992 +5554 2862 +5555 2942 +5557 3112 +5558 2917 +5560 2862 +5561 3132 +5562 2876 +5564 2910 +5565 2952 +5566 2814 +5568 2943 +5569 2999 +5571 2818 +5572 2876 +5573 3586 +5575 3002 +5576 3130 +5578 3532 +5579 3157 +5580 2817 +5582 2792 +5583 3246 +5584 2716 +5586 3204 +5587 2822 +5589 3351 +5590 3107 +5591 3048 +5593 3037 +5594 3502 +5595 3297 +5597 3290 +5598 3196 +5600 3259 +5601 2839 +5602 3924 +5604 2976 +5605 2777 +5607 3056 +5608 2914 +5609 2864 +5611 2777 +5612 2814 +5613 3511 +5615 2777 +5616 3017 +5618 3115 +5619 2792 +5620 3005 +5622 2814 +5623 2839 +5625 2864 +5626 2727 +5627 3180 +5629 2981 +5630 2977 +5631 3086 +5633 2955 +5634 2988 +5636 2988 +5637 2914 +5638 2772 +5640 3015 +5641 3077 +5642 2973 +5644 3170 +5645 3077 +5647 2973 +5648 2877 +5649 3246 +5651 2943 +5652 2992 +5654 2788 +5655 3052 +5656 2772 +5658 2814 +5659 2817 +5660 2872 +5662 2818 +5663 2801 +5665 3387 +5666 2876 +5667 3006 +5669 2788 +5670 2817 +5672 2862 +5673 2814 +5674 2814 +5676 2872 +5677 2801 +5678 3055 +5680 2838 +5681 2772 +5683 2801 +5684 2865 +5685 2931 +5687 3045 +5688 2952 +5689 2862 +5691 2982 +5692 2792 +5694 2948 +5695 2727 +5696 2885 +5698 3159 +5699 3161 +5701 3156 +5702 2806 +5703 2876 +5705 2716 +5706 2956 +5707 2716 +5709 2933 +5710 3131 +5712 2945 +5713 2919 +5714 2981 +5716 2727 +5717 2885 +5719 3035 +5720 2772 +5721 2727 +5723 2853 +5724 2843 +5725 2955 +5727 2727 +5728 2843 +5730 2845 +5731 2756 +5732 2756 +5734 2727 +5735 3152 +5736 3472 +5738 2818 +5739 2814 +5741 3105 +5742 3108 +5743 2872 +5745 3054 +5746 2727 +5748 2727 +5749 2921 +5750 2727 +5752 2943 +5753 2756 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +5753 2756 +5754 2756 +5756 2857 +5757 3025 +5759 2814 +5760 2727 +5761 2945 +5763 2756 +5764 2843 +5766 2756 +5767 3115 +5768 2777 +5770 3071 +5771 2916 +5772 2727 +5774 2788 +5775 2756 +5777 2981 +5778 2902 +5779 2838 +5781 2992 +5782 2942 +5784 2986 +5785 2772 +5786 2872 +5788 3157 +5789 2772 +5790 3007 +5792 2801 +5793 2788 +5795 2910 +5796 2772 +5797 3196 +5799 2950 +5800 2872 +5801 2788 +5803 3064 +5804 2788 +5806 2801 +5807 3006 +5808 3215 +5810 2788 +5811 2872 +5813 2772 +5814 3046 +5815 2986 +5817 2942 +5818 2788 +5819 3016 +5821 2817 +5822 2897 +5824 2878 +5825 2955 +5826 2727 +5828 2792 +5829 2745 +5831 2716 +5832 2766 +5833 3071 +5835 2806 +5836 2745 +5837 2889 +5839 3368 +5840 2986 +5842 2890 +5843 2961 +5844 2982 +5846 2716 +5847 2898 +5848 2982 +5850 2745 +5851 2836 +5853 2745 +5854 2858 +5855 2766 +5857 2745 +5858 2745 +5860 2745 +5861 3028 +5862 2806 +5864 2716 +5865 2845 +5866 2716 +5868 2876 +5869 2912 +5871 2839 +5872 2843 +5873 2946 +5875 2756 +5876 2857 +5878 2939 +5879 2916 +5880 2777 +5882 2777 +5883 2864 +5884 2792 +5886 2777 +5887 2727 +5889 2727 +5890 2885 +5891 2843 +5893 2727 +5894 2756 +5895 2727 +5897 2788 +5898 2885 +5900 2843 +5901 2727 +5902 2864 +5904 2727 +5905 2792 +5907 2864 +5908 2727 +5909 2756 +5911 2727 +5912 2756 +5913 2727 +5915 2916 +5916 2756 +5918 2727 +5919 2756 +5920 2792 +5922 2853 +5923 2727 +5925 2727 +5926 2839 +5927 2792 +5929 2857 +5930 2914 +5931 2976 +5933 3013 +5934 2766 +5936 2745 +5937 3064 +5938 2836 +5940 2961 +5941 2919 +5942 3050 +5944 2716 +5945 2716 +5947 2766 +5948 2786 +5949 2716 +5951 2786 +5952 2836 +5954 2716 +5955 2716 +5956 2716 +5958 3048 +5959 2815 +5960 2766 +5962 2786 +5963 2716 +5965 2990 +5966 2766 +5967 2716 +5969 2806 +5970 3096 +5972 2766 +5973 2716 +5974 2836 +5976 2745 +5977 2902 +5978 2960 +5980 2889 +5981 2745 +5983 2716 +5984 2945 +5985 2916 +5987 2845 +5988 2806 +5989 2716 +5991 2786 +5992 2815 +5994 2806 +5995 2716 +5996 2745 +5998 2806 +5999 2766 +6001 2716 +6002 2853 +6003 2815 +6005 2933 +6006 2786 +6007 2912 +6009 2716 +6010 2716 +6012 2716 +6013 2766 +6014 3028 +6016 2716 +6017 2716 +6019 2745 +6020 2841 +6021 2745 +6023 2836 +6024 2815 +6025 2961 +6027 2845 +6028 2745 +6030 2841 +6031 2836 +6032 2716 +6034 2766 +6035 2716 +6036 2716 +6038 2836 +6039 2716 +6041 2786 +6042 2766 +6043 2745 +6045 2716 +6046 2716 +6048 2745 +6049 2716 +6050 2716 +6052 2766 +6053 2786 +6054 2716 +6056 2845 +6057 2716 +6059 2745 +6060 2876 +6061 2766 +6063 2766 +6064 2786 +6066 2716 +6067 2716 +6068 2933 +6070 2716 +6071 2716 +6072 2716 +6074 2745 +6075 2716 +6077 2716 +6078 2786 +6079 2716 +6081 2745 +6082 2716 +6083 2853 +6085 2806 +6086 2716 +6088 2766 +6089 2845 +6090 2876 +6092 2786 +6093 2716 +6095 2836 +6096 2841 +6097 2745 +6099 2845 +6100 2874 +6101 2940 +6103 2845 +6104 2876 +6106 2766 +6107 2806 +6108 2806 +6110 2716 +6111 2841 +6113 2716 +6114 2745 +6115 2766 +6117 2716 +6118 2716 +6119 2716 +6121 2986 +6122 2853 +6124 2845 +6125 2745 +6126 3047 +6128 3093 +6129 2745 +6130 2716 +6132 2745 +6133 2716 +6135 2745 +6136 2716 +6137 2858 +6139 2716 +6140 2766 +6142 2716 +6143 2806 +6144 2745 +6146 2745 +6147 2766 +6148 2806 +6150 3020 +6151 2716 +6153 2876 +6154 2845 +6155 2766 +6157 2786 +6158 2786 +6160 2716 +6161 2745 +6162 2806 +6164 2716 +6165 2716 +6166 2745 +6168 2716 +6169 2745 +6171 2745 +6172 2745 +6173 2716 +6175 2716 +6176 2745 +6177 2716 +6179 2716 +6180 2716 +6182 2766 +6183 2716 +6184 2815 +6186 2745 +6187 2716 +6189 2745 +6190 2716 +6191 2716 +6193 2766 +6194 2944 +6195 2919 +6197 2716 +6198 2745 +6200 2845 +6201 2716 +6202 2716 +6204 2716 +6205 2716 +6207 2716 +6208 2786 +6209 2716 +6211 2716 +6212 2745 +6213 2815 +6215 2806 +6216 2716 +6218 2836 +6219 2716 +6220 2786 +6222 2836 +6223 2716 +6224 2716 +6226 2716 +6227 2786 +6229 2845 +6230 2716 +6231 2716 +6233 2916 +6234 2745 +6236 2716 +6237 2786 +6238 2745 +6240 2786 +6241 2806 +6242 2745 +6244 2716 +6245 2716 +6247 2786 +6248 2766 +6249 2853 +6251 2716 +6252 2716 +6254 2766 +6255 2766 +6256 2716 +6258 2745 +6259 2745 +6260 2716 +6262 2815 +6263 2766 +6265 2919 +6266 3047 +6267 2944 +6269 2944 +6270 2766 +6271 2766 +6273 2716 +6274 2716 +6276 2815 +6277 2716 +6278 2716 +6280 2716 +6281 2716 +6283 2845 +6284 2815 +6285 2716 +6287 2716 +6288 2766 +6289 2836 +6291 2716 +6292 2716 +6294 2716 +6295 2745 +6296 2716 +6298 2766 +6299 2716 +6301 2815 +6302 2745 +6303 2716 +6305 2745 +6306 2716 +6307 2786 +6309 2716 +6310 2858 +6312 2766 +6313 2786 +6314 2745 +6316 2745 +6317 2766 +6318 2786 +6320 2716 +6321 2716 +6323 2716 +6324 2716 +6325 2806 +6327 2716 +6328 2716 +6330 2745 +6331 2836 +6332 2716 +6334 2716 +6335 2745 +6336 2716 +6338 2716 +6339 2716 +6341 2716 +6342 2716 +6343 2786 +6345 2745 +6346 2845 +6348 2716 +6349 2745 +6350 2716 +6352 2845 +6353 2716 +6354 2716 +6356 2841 +6357 2766 +6359 2766 +6360 2806 +6361 2745 +6363 2745 +6364 2716 +6365 2766 +6367 2766 +6368 2716 +6370 2874 +6371 2858 +6372 2815 +6374 2716 +6375 2745 +6377 2716 +6378 2716 +6379 2716 +6381 2716 +6382 2786 +6383 2745 +6385 2766 +6386 2815 +6388 2716 +6389 2716 +6390 2716 +6392 2786 +6393 2745 +6395 2766 +6396 2716 +6397 2766 +6399 2716 +6400 2716 +6401 2806 +6403 2716 +6404 2716 +6406 2716 +6407 2716 +6408 2716 +6410 2716 +6411 2716 +6412 2766 +6414 2716 +6415 2716 +6417 2716 +6418 2716 +6419 2766 +6421 2874 +6422 2745 +6424 2836 +6425 2745 +6426 2716 +6428 2766 +6429 2716 +6430 2716 +6432 2716 +6433 2716 +6435 2766 +6436 2745 +6437 2786 +6439 2745 +6440 2876 +6442 2766 +6443 2766 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +6443 2766 +6444 2716 +6446 2716 +6447 2745 +6448 2716 +6450 2716 +6451 2716 +6453 2716 +6454 2716 +6455 2745 +6457 2745 +6458 2716 +6459 2716 +6461 2716 +6462 2745 +6464 2716 +6465 2745 +6466 2745 +6468 2716 +6469 2716 +6471 2716 +6472 2716 +6473 2745 +6475 2716 +6476 2716 +6477 2716 +6479 2745 +6480 2716 +6482 2716 +6483 2716 +6484 2716 +6486 2716 +6487 2745 +6489 2716 +6490 2786 +6491 2716 +6493 2745 +6494 2716 +6495 2745 +6497 2716 +6498 2716 +6500 2716 +6501 2716 +6502 2716 +6504 2745 +6505 2716 +6506 2716 +6508 2716 +6509 2745 +6511 2745 +6512 2716 +6513 2716 +6515 2745 +6516 2716 +6518 2716 +6519 2716 +6520 2766 +6522 2716 +6523 2716 +6524 2766 +6526 2716 +6527 2745 +6529 2745 +6530 2716 +6531 2716 +6533 2716 +6534 2716 +6536 2745 +6537 2716 +6538 2716 +6540 2716 +6541 2716 +6542 2716 +6544 2716 +6545 2716 +6547 2716 +6548 2716 +6549 2716 +6551 2716 +6552 2716 +6553 2716 +6555 2766 +6556 2716 +6558 2716 +6559 2716 +6560 2716 +6562 2716 +6563 2766 +6565 2716 +6566 2716 +6567 2745 +6569 2716 +6570 2716 +6571 2716 +6573 2716 +6574 2716 +6576 2716 +6577 2716 +6578 2716 +6580 2716 +6581 2716 +6583 2745 +6584 2745 +6585 2716 +6587 2745 +6588 2716 +6589 2716 +6591 2716 +6592 2716 +6594 2716 +6595 2716 +6596 2716 +6598 2716 +6599 2716 +6600 2716 +6602 2716 +6603 2716 +6605 2716 +6606 2716 +6607 2716 +6609 2716 +6610 2716 +6612 2716 +6613 2766 +6614 2716 +6616 2716 +6617 2766 +6618 2716 +6620 2716 +6621 2716 +6623 2716 +6624 2806 +6625 2716 +6627 2745 +6628 2716 +6630 2716 +6631 2716 +6632 2716 +6634 2716 +6635 2745 +6636 2716 +6638 2745 +6639 2716 +6641 2716 +6642 2716 +6643 2745 +6645 2716 +6646 2745 +6648 2745 +6649 2716 +6650 2745 +6652 2716 +6653 2716 +6654 2716 +6656 2766 +6657 2716 +6659 2716 +6660 2716 +6661 2716 +6663 2716 +6664 2716 +6665 2745 +6667 2716 +6668 2745 +6670 2745 +6671 2716 +6672 2716 +6674 2716 +6675 2716 +6677 2745 +6678 2745 +6679 2716 +6681 2716 +6682 2716 +6683 2745 +6685 2766 +6686 2766 +6688 2716 +6689 2716 +6690 2716 +6692 2716 +6693 2716 +6695 2716 +6696 2716 +6697 2745 +6699 2716 +6700 2745 +6701 2716 +6703 2716 +6704 2716 +6706 2716 +6707 2716 +6708 2716 +6710 2745 +6711 2716 +6712 2716 +6714 2716 +6715 2716 +6717 2716 +6718 2716 +6719 2836 +6721 2745 +6722 2716 +6724 2716 +6725 2716 +6726 2716 +6728 2716 +6729 2716 +6730 2766 +6732 2745 +6733 2716 +6735 2716 +6736 2716 +6737 2716 +6739 2716 +6740 2716 +6742 2745 +6743 2716 +6744 2745 +6746 2716 +6747 2716 +6748 2716 +6750 2716 +6751 2745 +6753 2716 +6754 2716 +6755 2716 +6757 2745 +6758 2745 +6759 2716 +6761 2716 +6762 2786 +6764 2745 +6765 2716 +6766 2716 +6768 2716 +6769 2716 +6771 2716 +6772 2716 +6773 2745 +6775 2745 +6776 2716 +6777 2716 +6779 2745 +6780 2745 +6782 2716 +6783 2716 +6784 2716 +6786 2745 +6787 2716 +6789 2716 +6790 2716 +6791 2716 +6793 2766 +6794 2716 +6795 2716 +6797 2716 +6798 2716 +6800 2716 +6801 2716 +6802 2716 +6804 2716 +6805 2716 +6806 2716 +6808 2716 +6809 2716 +6811 2745 +6812 2786 +6813 2786 +6815 2745 +6816 2716 +6818 2716 +6819 2716 +6820 2716 +6822 2745 +6823 2716 +6824 2745 +6826 2716 +6827 2716 +6829 2716 +6830 2716 +6831 2716 +6833 2716 +6834 2716 +6836 2716 +6837 2716 +6838 2716 +6840 2716 +6841 2745 +6842 2716 +6844 2716 +6845 2716 +6847 2745 +6848 2745 +6849 2716 +6851 2745 +6852 2716 +6853 2716 +6855 2745 +6856 2716 +6858 2716 +6859 2716 +6860 2716 +6862 2716 +6863 2716 +6865 2716 +6866 2716 +6867 2716 +6869 2716 +6870 2716 +6871 2716 +6873 2716 +6874 2716 +6876 2716 +6877 2745 +6878 2716 +6880 2745 +6881 2716 +6883 2716 +6884 2716 +6885 2716 +6887 2716 +6888 2716 +6889 2716 +6891 2716 +6892 2716 +6894 2716 +6895 2716 +6896 2716 +6898 2716 +6899 2716 +6900 2716 +6902 2716 +6903 2716 +6905 2716 +6906 2745 +6907 2716 +6909 2716 +6910 2716 +6912 2716 +6913 2716 +6914 2716 +6916 2716 +6917 2716 +6918 2716 +6920 2716 +6921 2716 +6923 2716 +6924 2745 +6925 2716 +6927 2716 +6928 2716 +6930 2716 +6931 2716 +6932 2716 +6934 2716 +6935 2716 +6936 2716 +6938 2716 +6939 2716 +6941 2716 +6942 2716 +6943 2716 +6945 2716 +6946 2716 +6947 2745 +6949 2716 +6950 2745 +6952 2716 +6953 2716 +6954 2716 +6956 2716 +6957 2716 +6959 2716 +6960 2716 +6961 2716 +6963 2716 +6964 2716 +6965 2716 +6967 2716 +6968 2745 +6970 2716 +6971 2716 +6972 2745 +6974 2716 +6975 2716 +6977 2716 +6978 2745 +6979 2716 +6981 2716 +6982 2716 +6983 2716 +6985 2716 +6986 2716 +6988 2716 +6989 2716 +6990 2716 +6992 2716 +6993 2716 +6994 2716 +6996 2716 +6997 2745 +6999 2716 +7000 2716 +7001 2745 +7003 2716 +7004 2716 +7006 2716 +7007 2716 +7008 2716 +7010 2716 +7011 2716 +7012 2716 +7014 2716 +7015 2716 +7017 2716 +7018 2716 +7019 2716 +7021 2716 +7022 2716 +7024 2716 +7025 2716 +7026 2716 +7028 2716 +7029 2716 +7030 2716 +7032 2745 +7033 2716 +7035 2716 +7036 2716 +7037 2716 +7039 2745 +7040 2716 +7041 2716 +7043 2716 +7044 2716 +7046 2716 +7047 2716 +7048 2716 +7050 2716 +7051 2716 +7053 2716 +7054 2716 +7055 2716 +7057 2716 +7058 2745 +7059 2745 +7061 2716 +7062 2716 +7064 2716 +7065 2716 +7066 2716 +7068 2716 +7069 2716 +7071 2716 +7072 2716 +7073 2716 +7075 2716 +7076 2716 +7077 2716 +7079 2716 +7080 2716 +7082 2716 +7083 2716 +7084 2745 +7086 2716 +7087 2716 +7088 2716 +7090 2745 +7091 2716 +7093 2716 +7094 2716 +7095 2716 +7097 2716 +7098 2716 +7100 2716 +7101 2716 +7102 2716 +7104 2716 +7105 2716 +7106 2716 +7108 2716 +7109 2716 +7111 2716 +7112 2745 +7113 2716 +7115 2716 +7116 2716 +7118 2716 +7119 2716 +7120 2716 +7122 2716 +7123 2716 +7124 2745 +7126 2716 +7127 2716 +7129 2716 +7130 2716 +7131 2716 +7133 2716 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +7133 2716 +7134 2716 +7135 2716 +7137 2716 +7138 2716 +7140 2716 +7141 2716 +7142 2716 +7144 2716 +7145 2716 +7147 2716 +7148 2745 +7149 2745 +7151 2745 +7152 2716 +7153 2716 +7155 2716 +7156 2716 +7158 2716 +7159 2716 +7160 2716 +7162 2716 +7163 2716 +7165 2716 +7166 2716 +7167 2716 +7169 2716 +7170 2716 +7171 2716 +7173 2716 +7174 2716 +7176 2716 +7177 2716 +7178 2716 +7180 2716 +7181 2716 +7182 2716 +7184 2716 +7185 2716 +7187 2716 +7188 2716 +7189 2716 +7191 2716 +7192 2716 +7194 2716 +7195 2716 +7196 2716 +7198 2716 +7199 2716 +7200 2716 +7202 2716 +7203 2716 +7205 2716 +7206 2716 +7207 2716 +7209 2716 +7210 2716 +7212 2716 +7213 2716 +7214 2745 +7216 2716 +7217 2716 +7218 2716 +7220 2716 +7221 2716 +7223 2716 +7224 2716 +7225 2716 +7227 2716 +7228 2716 +7229 2716 +7231 2716 +7232 2716 +7234 2716 +7235 2716 +7236 2716 +7238 2716 +7239 2716 +7241 2716 +7242 2716 +7243 2716 +7245 2716 +7246 2716 +7247 2716 +7249 2716 +7250 2716 +7252 2716 +7253 2716 +7254 2716 +7256 2716 +7257 2716 +7259 2716 +7260 2716 +7261 2716 +7263 2716 +7264 2716 +7265 2716 +7267 2716 +7268 2716 +7270 2716 +7271 2716 +7272 2716 +7274 2716 +7275 2716 +7276 2716 +7278 2716 +7279 2716 +7281 2716 +7282 2716 +7283 2716 +7285 2716 +7286 2716 +7288 2716 +7289 2716 +7290 2716 +7292 2716 +7293 2716 +7294 2716 +7296 2716 +7297 2716 +7299 2766 +7300 2716 +7301 2716 +7303 2716 +7304 2716 +7306 2716 +7307 2716 +7308 2716 +7310 2716 +7311 2716 +7312 2716 +7314 2716 +7315 2716 +7317 2716 +7318 2716 +7319 2716 +7321 2716 +7322 2716 +7323 2716 +7325 2716 +7326 2716 +7328 2716 +7329 2716 +7330 2716 +7332 2716 +7333 2716 +7335 2716 +7336 2716 +7337 2716 +7339 2716 +7340 2716 +7341 2716 +7343 2716 +7344 2716 +7346 2716 +7347 2716 +7348 2716 +7350 2716 +7351 2716 +7353 2716 +7354 2716 +7355 2716 +7357 2716 +7358 2716 +7359 2716 +7361 2716 +7362 2716 +7364 2716 +7365 2716 +7366 2716 +7368 2716 +7369 2716 +7370 2716 +7372 2716 +7373 2716 +7375 2716 +7376 2716 +7377 2716 +7379 2716 +7380 2716 +7382 2716 +7383 2716 +7384 2716 +7386 2716 +7387 2716 +7388 2716 +7390 2716 +7391 2716 +7393 2716 +7394 2716 +7395 2716 +7397 2716 +7398 2716 +7400 2716 +7401 2716 +7402 2716 +7404 2716 +7405 2716 +7406 2716 +7408 2716 +7409 2716 +7411 2716 +7412 2716 +7413 2716 +7415 2716 +7416 2716 +7417 2716 +7419 2716 +7420 2716 +7422 2716 +7423 2716 +7424 2716 +7426 2716 +7427 2716 +7429 2716 +7430 2716 +7431 2716 +7433 2716 +7434 2716 +7435 2716 +7437 2716 +7438 2716 +7440 2716 +7441 2716 +7442 2716 +7444 2716 +7445 2716 +7447 2716 +7448 2716 +7449 2716 +7451 2716 +7452 2716 +7453 2716 +7455 2716 +7456 2716 +7458 2716 +7459 2716 +7460 2716 +7462 2716 +7463 2716 +7464 2716 +7466 2716 +7467 2716 +7469 2716 +7470 2716 +7471 2716 +7473 2716 +7474 2716 +7476 2716 +7477 2716 +7478 2716 +7480 2716 +7481 2716 +7482 2716 +7484 2716 +7485 2716 +7487 2716 +7488 2716 +7489 2716 +7491 2716 +7492 2716 +7494 2716 +7495 2716 +7496 2716 +7498 2716 +7499 2716 +7500 2716 +7502 2716 +7503 2716 +7505 2716 +7506 2716 +7507 2716 +7509 2716 +7510 2716 +7512 2716 +7513 2716 +7514 2716 +7516 2716 +7517 2716 +7518 2716 +7520 2716 +7521 2716 +7523 2716 +7524 2716 +7525 2716 +7527 2716 +7528 2716 +7529 2716 +7531 2716 +7532 2716 +7534 2716 +7535 2716 +7536 2716 +7538 2716 +7539 2716 +7541 2716 +7542 2716 +7543 2716 +7545 2716 +7546 2716 +7547 2716 +7549 2716 +7550 2716 +7552 2716 +7553 2716 +7554 2716 +7556 2716 +7557 2716 +7559 2716 +7560 2716 +7561 2716 +7563 2716 +7564 2716 +7565 2716 +7567 2716 +7568 2716 +7570 2716 +7571 2716 +7572 2716 +7574 2716 +7575 2716 +7576 2716 +7578 2716 +7579 2716 +7581 2745 +7582 2745 +7583 2745 +7585 2716 +7586 2716 +7588 2716 +7589 2716 +7590 2716 +7592 2716 +7593 2716 +7594 2716 +7596 2716 +7597 2716 +7599 2716 +7600 2716 +7601 2716 +7603 2716 +7604 2716 +7606 2716 +7607 2716 +7608 2716 +7610 2716 +7611 2716 +7612 2716 +7614 2716 +7615 2716 +7617 2716 +7618 2716 +7619 2716 +7621 2716 +7622 2716 +7623 2716 +7625 2716 +7626 2716 +7628 2716 +7629 2716 +7630 2716 +7632 2716 +7633 2716 +7635 2716 +7636 2716 +7637 2716 +7639 2716 +7640 2716 +7641 2716 +7643 2716 +7644 2716 +7646 2716 +7647 2716 +7648 2716 +7650 2716 +7651 2716 +7653 2716 +7654 2716 +7655 2716 +7657 2716 +7658 2716 +7659 2716 +7661 2716 +7662 2716 +7664 2716 +7665 2716 +7666 2716 +7668 2716 +7669 2716 +7670 2716 +7672 2716 +7673 2716 +7675 2716 +7676 2716 +7677 2716 +7679 2716 +7680 2716 +7682 2716 +7683 2716 +7684 2716 +7686 2716 +7687 2716 +7688 2716 +7690 2716 +7691 2716 +7693 2716 +7694 2716 +7695 2716 +7697 2716 +7698 2716 +7700 2716 +7701 2716 +7702 2716 +7704 2716 +7705 2716 +7706 2716 +7708 2716 +7709 2716 +7711 2716 +7712 2716 +7713 2716 +7715 2716 +7716 2716 +7717 2716 +7719 2716 +7720 2716 +7722 2716 +7723 2716 +7724 2716 +7726 2716 +7727 2716 +7729 2716 +7730 2716 +7731 2716 +7733 2716 +7734 2716 +7735 2716 +7737 2716 +7738 2716 +7740 2716 +7741 2716 +7742 2716 +7744 2716 +7745 2716 +7747 2716 +7748 2716 +7749 2716 +7751 2716 +7752 2716 +7753 2716 +7755 2716 +7756 2716 +7758 2716 +7759 2716 +7760 2716 +7762 2716 +7763 2716 +7764 2716 +7766 2716 +7767 2716 +7769 2716 +7770 2716 +7771 2716 +7773 2716 +7774 2716 +7776 2716 +7777 2716 +7778 2716 +7780 2716 +7781 2716 +7782 2716 +7784 2716 +7785 2716 +7787 2716 +7788 2716 +7789 2716 +7791 2716 +7792 2716 +7794 2716 +7795 2716 +7796 2716 +7798 2716 +7799 2716 +7800 2716 +7802 2716 +7803 2716 +7805 2716 +7806 2716 +7807 2716 +7809 2716 +7810 2716 +7811 2716 +7813 2716 +7814 2716 +7816 2716 +7817 2716 +7818 2716 +7820 2716 +7821 2716 +7823 2716 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +7823 2716 +7824 2716 +7825 2716 +7827 2716 +7828 2716 +7829 2716 +7831 2716 +7832 2716 +7834 2716 +7835 2716 +7836 2716 +7838 2716 +7839 2716 +7841 2716 +7842 2716 +7843 2716 +7845 2716 +7846 2716 +7847 2716 +7849 2716 +7850 2716 +7852 2716 +7853 2716 +7854 2716 +7856 2716 +7857 2716 +7858 2716 +7860 2716 +7861 2716 +7863 2716 +7864 2716 +7865 2716 +7867 2716 +7868 2716 +7870 2716 +7871 2716 +7872 2716 +7874 2716 +7875 2716 +7876 2716 +7878 2716 +7879 2716 +7881 2716 +7882 2716 +7883 2716 +7885 2716 +7886 2716 +7888 2716 +7889 2716 +7890 2716 +7892 2716 +7893 2716 +7894 2716 +7896 2716 +7897 2716 +7899 2716 +7900 2716 +7901 2716 +7903 2716 +7904 2716 +7905 2716 +7907 2716 +7908 2716 +7910 2716 +7911 2716 +7912 2716 +7914 2716 +7915 2716 +7917 2716 +7918 2716 +7919 2716 +7921 2716 +7922 2716 +7923 2716 +7925 2716 +7926 2716 +7928 2716 +7929 2716 +7930 2716 +7932 2716 +7933 2716 +7935 2716 +7936 2716 +7937 2716 +7939 2716 +7940 2716 +7941 2716 +7943 2716 +7944 2716 +7946 2716 +7947 2716 +7948 2716 +7950 2716 +7951 2716 +7952 2716 +7954 2716 +7955 2716 +7957 2716 +7958 2716 +7959 2716 +7961 2716 +7962 2716 +7964 2716 +7965 2716 +7966 2716 +7968 2716 +7969 2716 +7970 2716 +7972 2716 +7973 2716 +7975 2716 +7976 2716 +7977 2716 +7979 2716 +7980 2716 +7982 2716 +7983 2716 +7984 2716 +7986 2716 +7987 2716 +7988 2716 +7990 2716 +7991 2716 +7993 2716 +7994 2716 +7995 2716 +7997 2716 +7998 2716 +7999 2716 +8001 2716 +8002 2716 +8004 2716 +8005 2716 +8006 2716 +8008 2716 +8009 2716 +8011 2716 +8012 2716 +8013 2716 +8015 2716 +8016 2716 +8017 2716 +8019 2716 +8020 2716 +8022 2716 +8023 2716 +8024 2716 +8026 2716 +8027 2716 +8029 2716 +8030 2716 +8031 2716 +8033 2716 +8034 2716 +8035 2716 +8037 2716 +8038 2716 +8040 2716 +8041 2716 +8042 2716 +8044 2716 +8045 2716 +8046 2716 +8048 2716 +8049 2716 +8051 2716 +8052 2716 +8053 2716 +8055 2716 +8056 2716 +8058 2716 +8059 2716 +8060 2716 +8062 2716 +8063 2716 +8064 2716 +8066 2716 +8067 2716 +8069 2716 +8070 2716 +8071 2716 +8073 2716 +8074 2716 +8076 2716 +8077 2716 +8078 2716 +8080 2716 +8081 2716 +8082 2716 +8084 2716 +8085 2716 +8087 2716 +8088 2716 +8089 2716 +8091 2716 +8092 2716 +8093 2716 +8095 2716 +8096 2716 +8098 2716 +8099 2716 +8100 2716 +8102 2716 +8103 2716 +8105 2716 +8106 2716 +8107 2716 +8109 2716 +8110 2716 +8111 2716 +8113 2716 +8114 2716 +8116 2716 +8117 2716 +8118 2716 +8120 2716 +8121 2716 +8123 2716 +8124 2716 +8125 2716 +8127 2716 +8128 2716 +8129 2716 +8131 2716 +8132 2716 +8134 2716 +8135 2716 +8136 2716 +8138 2716 +8139 2716 +8140 2716 +8142 2716 +8143 2716 +8145 2716 +8146 2716 +8147 2716 +8149 2716 +8150 2716 +8152 2716 +8153 2716 +8154 2716 +8156 2716 +8157 2716 +8158 2716 +8160 2716 +8161 2716 +8163 2716 +8164 2716 +8165 2716 +8167 2716 +8168 2716 +8170 2716 +8171 2716 +8172 2716 +8174 2716 +8175 2716 +8176 2716 +8178 2716 +8179 2716 +8181 2716 +8182 2716 +8183 2716 +8185 2716 +8186 2716 +8187 2716 +8189 2716 +8190 2716 +8192 2716 +8193 2716 +8194 2716 +8196 2716 +8197 2716 +8199 2716 +8200 2716 +8201 2716 +8203 2716 +8204 2716 +8205 2716 +8207 2716 +8208 2716 +8210 2716 +8211 2716 +8212 2716 +8214 2716 +8215 2716 +8217 2716 +8218 2716 +8219 2716 +8221 2716 +8222 2716 +8223 2716 +8225 2716 +8226 2716 +8228 2716 +8229 2716 +8230 2716 +8232 2716 +8233 2716 +8234 2716 +8236 2716 +8237 2716 +8239 2716 +8240 2716 +8241 2716 +8243 2716 +8244 2716 +8246 2716 +8247 2716 +8248 2716 +8250 2716 +8251 2716 +8252 2716 +8254 2716 +8255 2716 +8257 2716 +8258 2716 +8259 2716 +8261 2716 +8262 2716 +8264 2716 +8265 2716 +8266 2716 +8268 2716 +8269 2716 +8270 2716 +8272 2716 +8273 2716 +8275 2716 +8276 2716 +8277 2716 +8279 2716 +8280 2716 +8281 2716 +8283 2716 +8284 2716 +8286 2716 +8287 2716 +8288 2716 +8290 2716 +8291 2716 +8293 2716 +8294 2716 +8295 2716 +8297 2716 +8298 2716 +8299 2716 +8301 2716 +8302 2716 +8304 2716 +8305 2716 +8306 2716 +8308 2716 +8309 2716 +8311 2716 +8312 2716 +8313 2716 +8315 2716 +8316 2716 +8317 2716 +8319 2716 +8320 2716 +8322 2716 +8323 2716 +8324 2716 +8326 2716 +8327 2716 +8328 2716 +8330 2716 +8331 2716 +8333 2716 +8334 2716 +8335 2716 +8337 2716 +8338 2716 +8340 2716 +8341 2716 +8342 2716 +8344 2716 +8345 2716 +8346 2716 +8348 2716 +8349 2716 +8351 2716 +8352 2716 +8353 2716 +8355 2716 +8356 2716 +8358 2716 +8359 2716 +8360 2716 +8362 2716 +8363 2716 +8364 2716 +8366 2716 +8367 2716 +8369 2716 +8370 2716 +8371 2716 +8373 2716 +8374 2716 +8376 2716 +8377 2716 +8378 2716 +8380 2716 +8381 2716 +8382 2716 +8384 2716 +8385 2716 +8387 2716 +8388 2716 +8389 2716 +8391 2716 +8392 2716 +8393 2716 +8395 2716 +8396 2716 +8398 2716 +8399 2716 +8400 2716 +8402 2716 +8403 2716 +8405 2716 +8406 2716 +8407 2716 +8409 2716 +8410 2716 +8411 2716 +8413 2716 +8414 2716 +8416 2716 +8417 2716 +8418 2716 +8420 2716 +8421 2716 +8423 2716 +8424 2716 +8425 2716 +8427 2716 +8428 2716 +8429 2716 +8431 2716 +8432 2716 +8434 2716 +8435 2716 +8436 2716 +8438 2716 +8439 2716 +8440 2716 +8442 2716 +8443 2716 +8445 2716 +8446 2716 +8447 2716 +8449 2716 +8450 2716 +8452 2716 +8453 2716 +8454 2716 +8456 2716 +8457 2716 +8458 2716 +8460 2716 +8461 2716 +8463 2716 +8464 2716 +8465 2716 +8467 2716 +8468 2716 +8470 2716 +8471 2716 +8472 2716 +8474 2716 +8475 2716 +8476 2716 +8478 2716 +8479 2716 +8481 2716 +8482 2716 +8483 2716 +8485 2716 +8486 2716 +8487 2716 +8489 2716 +8490 2716 +8492 2716 +8493 2716 +8494 2716 +8496 2716 +8497 2716 +8499 2716 +8500 2716 +8501 2716 +8503 2716 +8504 2716 +8505 2716 +8507 2716 +8508 2716 +8510 2716 +8511 2716 +8512 2716 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 119 +8512 2716 +8514 2716 +8515 2716 +8517 2716 +8518 2716 +8519 2716 +8521 2716 +8522 2716 +8523 2716 +8525 2716 +8526 2716 +8528 2716 +8529 2716 +8530 2716 +8532 2716 +8533 2716 +8534 2716 +8536 2716 +8537 2716 +8539 2716 +8540 2716 +8541 2716 +8543 2716 +8544 2716 +8546 2716 +8547 2716 +8548 2716 +8550 2716 +8551 2716 +8552 2716 +8554 2716 +8555 2716 +8557 2716 +8558 2716 +8559 2716 +8561 2716 +8562 2716 +8564 2716 +8565 2716 +8566 2716 +8568 2716 +8569 2716 +8570 2716 +8572 2716 +8573 2716 +8575 2716 +8576 2716 +8577 2716 +8579 2716 +8580 2716 +8581 2716 +8583 2716 +8584 2716 +8586 2716 +8587 2716 +8588 2716 +8590 2716 +8591 2716 +8593 2716 +8594 2716 +8595 2716 +8597 2716 +8598 2716 +8599 2716 +8601 2716 +8602 2716 +8604 2716 +8605 2716 +8606 2716 +8608 2716 +8609 2716 +8611 2716 +8612 2716 +8613 2716 +8615 2716 +8616 2716 +8617 2716 +8619 2716 +8620 2716 +8622 2716 +8623 2716 +8624 2716 +8626 2716 +8627 2716 +8628 2716 +8630 2716 +8631 2716 +8633 2716 +8634 2716 +8635 2716 +8637 2716 +8638 2716 +8640 2716 +8641 2716 +8642 2716 +8644 2716 +8645 2716 +8646 2716 +8648 2716 +8649 2716 +8651 2716 +8652 2716 +8653 2716 +8655 2716 +8656 2716 +8658 2716 +8659 2716 +8660 2716 +8662 2716 +8663 2716 +8664 2716 +8666 2716 +8667 2716 +8669 2716 +8670 2716 +8671 2716 +8673 2716 +8674 2716 +8675 2716 +119 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/ChangeLog b/software/gsl-1.15/doc/ChangeLog new file mode 100644 index 000000000..4121e90a7 --- /dev/null +++ b/software/gsl-1.15/doc/ChangeLog @@ -0,0 +1,67 @@ +2009-07-10 Brian Gough + + * gsl-ref.texi: use the dircategory "Software libraries" as used + in the Free Software Directory + +2006-02-09 Brian Gough + + * Makefile.am: disable pdf, as it would require maintaining a + separate set of figure files. + +Mon Apr 7 12:54:30 MDT 2003 G. Jungman + + * specfunc-gamma.texi: added entry for gsl_sf_gamma_inc_(), + gsl_sf_gamma_inc() + + +2000-10-26 Mark Galassi + + * gsl-ref.texi: small changes to update the author list. + +Mon Oct 23 21:49:25 2000 Brian Gough + + * usage.texi: added info on portability functions + +Sat Jul 15 23:52:59 2000 Brian Gough + + * Makefile.am (EXTRA_DIST): added gsl-design.texi to the + distributed files + +Thu May 18 12:11:24 2000 Brian Gough + + * gsl-ref.texi (Preliminaries): changed the phrase "collection of + routines for numerical analysis" to "... numerical computing", as + on the web page. + +Wed Apr 26 17:46:48 2000 Brian Gough + + * math.texi: added a chapter on the elementary functions and + constants in gsl_math.h + +Tue Apr 4 21:45:27 2000 Brian Gough + + * upgraded texinfo.tex to texinfo-4.0 + +2000-04-01 Mark Galassi + + * roots.texi (Providing the function to solve): fixed a typo, + THANKS Dave Morrison. + +1999-12-03 Mark Galassi + + * gsl-ref.texi, gsl-design.texi: updated my email address. + + * gsl-design.texi: minor changes. + +Tue Feb 16 11:36:03 1999 Brian Gough + + * statistics.texi: removed the multiple descriptions of double, + int versions of the functions. Now we just describe the double + versions and note the existence of the corresponding versions for + other types. + + * ChangeLog: added a changelog file for the documentation, + although it is not required by the GNU Coding standards. I use the + Changelogs to keep track of pending changes that I need to commit + to repository. + diff --git a/software/gsl-1.15/doc/Makefile.am b/software/gsl-1.15/doc/Makefile.am new file mode 100644 index 000000000..04e3d9cd3 --- /dev/null +++ b/software/gsl-1.15/doc/Makefile.am @@ -0,0 +1,21 @@ +## Process this file with automake to produce Makefile.in + +info_TEXINFOS = gsl-ref.texi +noinst_TEXINFOS = gsl-design.texi +gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi rng.texi randist.texi roots.texi statistics.texi specfunc.texi specfunc-airy.texi specfunc-bessel.texi specfunc-clausen.texi specfunc-coulomb.texi specfunc-coupling.texi specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi specfunc-elementary.texi specfunc-ellint.texi specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi specfunc-expint.texi specfunc-fermi-dirac.texi specfunc-gamma.texi specfunc-gegenbauer.texi specfunc-hyperg.texi specfunc-lambert.texi specfunc-laguerre.texi specfunc-legendre.texi specfunc-log.texi specfunc-mathieu.texi specfunc-pow-int.texi specfunc-psi.texi specfunc-synchrotron.texi specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi siman.texi vectors.texi debug.texi histogram.texi ode-initval.texi integration.texi ieee754.texi montecarlo.texi sum.texi intro.texi usage.texi dwt.texi dht.texi interp.texi poly.texi linalg.texi eigen.texi multiroots.texi sort.texi permutation.texi combination.texi multiset.texi complex.texi math.texi fitting.texi multifit.texi const.texi ntuple.texi diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi autoconf.texi freemanuals.texi bspline.texi + +man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 + +figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps initial-route.eps final-route.eps fft-complex-radix2-f.eps fft-complex-radix2-t.eps fft-complex-radix2.eps fft-real-mixedradix.eps roots-bisection.eps roots-false-position.eps roots-newtons-method.eps roots-secant-method.eps histogram.eps histogram2d.eps min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps ntuple.eps qrng.eps cheb.eps vdp.eps interp2.eps rand-beta.tex rand-binomial.tex rand-cauchy.tex rand-chisq.tex rand-erlang.tex rand-exponential.tex rand-fdist.tex rand-flat.tex rand-gamma.tex rand-gaussian.tex rand-geometric.tex rand-laplace.tex rand-logarithmic.tex rand-logistic.tex rand-lognormal.tex rand-pareto.tex rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex landau.dat rand-landau.tex dwt-orig.eps dwt-samp.eps interpp2.eps bspline.eps + +examples_src = examples/blas.c examples/block.c examples/cblas.c examples/cdf.c examples/cheb.c examples/combination.c examples/multiset.c examples/const.c examples/demo_fn.c examples/diff.c examples/eigen.c examples/fft.c examples/fftmr.c examples/fftreal.c examples/fitting.c examples/fitting2.c examples/fitting3.c examples/histogram.c examples/histogram2d.c examples/ieee.c examples/ieeeround.c examples/integration.c examples/interp.c examples/intro.c examples/linalglu.c examples/matrix.c examples/matrixw.c examples/min.c examples/monte.c examples/ntupler.c examples/ntuplew.c examples/ode-initval.c examples/odefixed.c examples/permseq.c examples/permshuffle.c examples/polyroots.c examples/qrng.c examples/randpoisson.c examples/randwalk.c examples/rng.c examples/rngunif.c examples/rootnewt.c examples/roots.c examples/siman.c examples/sortsmall.c examples/specfun.c examples/specfun_e.c examples/stat.c examples/statsort.c examples/sum.c examples/vector.c examples/vectorr.c examples/vectorview.c examples/vectorw.c examples/demo_fn.h examples/dwt.c examples/expfit.c examples/nlfit.c examples/interpp.c examples/eigen_nonsymm.c examples/bspline.c examples/multimin.c examples/multiminfn.c examples/nmsimplex.c examples/ode-initval-low-level.c + +examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/multiset.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out examples/ecg.dat examples/dwt.dat examples/multimin.out examples/nmsimplex.out + +noinst_DATA = $(examples_src) $(examples_out) $(figures) + +EXTRA_DIST = $(man_MANS) $(noinst_DATA) gsl-design.texi fftalgorithms.tex fftalgorithms.bib algorithm.sty algorithmic.sty calc.sty statnotes.tex + +# pdf disabled, use postscript and ps2pdf +.PHONY: pdf +pdf: diff --git a/software/gsl-1.15/doc/Makefile.in b/software/gsl-1.15/doc/Makefile.in new file mode 100644 index 000000000..38ffd249d --- /dev/null +++ b/software/gsl-1.15/doc/Makefile.in @@ -0,0 +1,840 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(gsl_ref_TEXINFOS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ + $(srcdir)/version.texi ChangeLog mdate-sh texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/gsl-ref.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = gsl-ref.dvi +PDFS = gsl-ref.pdf +PSS = gsl-ref.ps +HTMLS = gsl-ref.html +TEXINFOS = gsl-ref.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(man3dir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +man3dir = $(mandir)/man3 +NROFF = nroff +MANS = $(man_MANS) +DATA = $(noinst_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +info_TEXINFOS = gsl-ref.texi +noinst_TEXINFOS = gsl-design.texi +gsl_ref_TEXINFOS = err.texi cblas.texi blas.texi min.texi fft.texi \ + rng.texi randist.texi roots.texi statistics.texi specfunc.texi \ + specfunc-airy.texi specfunc-bessel.texi specfunc-clausen.texi \ + specfunc-coulomb.texi specfunc-coupling.texi \ + specfunc-dawson.texi specfunc-debye.texi specfunc-dilog.texi \ + specfunc-elementary.texi specfunc-ellint.texi \ + specfunc-elljac.texi specfunc-erf.texi specfunc-exp.texi \ + specfunc-expint.texi specfunc-fermi-dirac.texi \ + specfunc-gamma.texi specfunc-gegenbauer.texi \ + specfunc-hyperg.texi specfunc-lambert.texi \ + specfunc-laguerre.texi specfunc-legendre.texi \ + specfunc-log.texi specfunc-mathieu.texi specfunc-pow-int.texi \ + specfunc-psi.texi specfunc-synchrotron.texi \ + specfunc-transport.texi specfunc-trig.texi specfunc-zeta.texi \ + siman.texi vectors.texi debug.texi histogram.texi \ + ode-initval.texi integration.texi ieee754.texi montecarlo.texi \ + sum.texi intro.texi usage.texi dwt.texi dht.texi interp.texi \ + poly.texi linalg.texi eigen.texi multiroots.texi sort.texi \ + permutation.texi combination.texi multiset.texi complex.texi \ + math.texi fitting.texi multifit.texi const.texi ntuple.texi \ + diff.texi qrng.texi cheb.texi multimin.texi gpl.texi fdl.texi \ + autoconf.texi freemanuals.texi bspline.texi +man_MANS = gsl.3 gsl-config.1 gsl-randist.1 gsl-histogram.1 +figures = multimin.eps siman-test.eps siman-energy.eps 12-cities.eps \ + initial-route.eps final-route.eps fft-complex-radix2-f.eps \ + fft-complex-radix2-t.eps fft-complex-radix2.eps \ + fft-real-mixedradix.eps roots-bisection.eps \ + roots-false-position.eps roots-newtons-method.eps \ + roots-secant-method.eps histogram.eps histogram2d.eps \ + min-interval.eps fit-wlinear.eps fit-wlinear2.eps fit-exp.eps \ + ntuple.eps qrng.eps cheb.eps vdp.eps interp2.eps rand-beta.tex \ + rand-binomial.tex rand-cauchy.tex rand-chisq.tex \ + rand-erlang.tex rand-exponential.tex rand-fdist.tex \ + rand-flat.tex rand-gamma.tex rand-gaussian.tex \ + rand-geometric.tex rand-laplace.tex rand-logarithmic.tex \ + rand-logistic.tex rand-lognormal.tex rand-pareto.tex \ + rand-poisson.tex rand-hypergeometric.tex rand-nbinomial.tex \ + rand-pascal.tex rand-bivariate-gaussian.tex rand-rayleigh.tex \ + rand-rayleigh-tail.tex rand-tdist.tex rand-weibull.tex \ + random-walk.tex randplots.gnp rand-exppow.tex rand-levy.tex \ + rand-levyskew.tex rand-gumbel.tex rand-bernoulli.tex \ + rand-gaussian-tail.tex rand-gumbel1.tex rand-gumbel2.tex \ + landau.dat rand-landau.tex dwt-orig.eps dwt-samp.eps \ + interpp2.eps bspline.eps +examples_src = examples/blas.c examples/block.c examples/cblas.c \ + examples/cdf.c examples/cheb.c examples/combination.c \ + examples/multiset.c examples/const.c examples/demo_fn.c \ + examples/diff.c examples/eigen.c examples/fft.c \ + examples/fftmr.c examples/fftreal.c examples/fitting.c \ + examples/fitting2.c examples/fitting3.c examples/histogram.c \ + examples/histogram2d.c examples/ieee.c examples/ieeeround.c \ + examples/integration.c examples/interp.c examples/intro.c \ + examples/linalglu.c examples/matrix.c examples/matrixw.c \ + examples/min.c examples/monte.c examples/ntupler.c \ + examples/ntuplew.c examples/ode-initval.c examples/odefixed.c \ + examples/permseq.c examples/permshuffle.c examples/polyroots.c \ + examples/qrng.c examples/randpoisson.c examples/randwalk.c \ + examples/rng.c examples/rngunif.c examples/rootnewt.c \ + examples/roots.c examples/siman.c examples/sortsmall.c \ + examples/specfun.c examples/specfun_e.c examples/stat.c \ + examples/statsort.c examples/sum.c examples/vector.c \ + examples/vectorr.c examples/vectorview.c examples/vectorw.c \ + examples/demo_fn.h examples/dwt.c examples/expfit.c \ + examples/nlfit.c examples/interpp.c examples/eigen_nonsymm.c \ + examples/bspline.c examples/multimin.c examples/multiminfn.c \ + examples/nmsimplex.c examples/ode-initval-low-level.c +examples_out = examples/blas.out examples/block.out examples/cblas.out examples/cdf.out examples/combination.out examples/multiset.out examples/const.out examples/diff.out examples/integration.out examples/intro.out examples/linalglu.out examples/min.out examples/polyroots.out examples/randpoisson.2.out examples/randpoisson.out examples/rng.out examples/rngunif.2.out examples/rngunif.out examples/sortsmall.out examples/specfun.out examples/specfun_e.out examples/stat.out examples/statsort.out examples/sum.out examples/vectorview.out examples/ecg.dat examples/dwt.dat examples/multimin.out examples/nmsimplex.out +noinst_DATA = $(examples_src) $(examples_out) $(figures) +EXTRA_DIST = $(man_MANS) $(noinst_DATA) gsl-design.texi fftalgorithms.tex fftalgorithms.bib algorithm.sty algorithmic.sty calc.sty statnotes.tex +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.texi.info: + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/gsl-ref.info: gsl-ref.texi $(srcdir)/version.texi $(gsl_ref_TEXINFOS) +gsl-ref.dvi: gsl-ref.texi $(srcdir)/version.texi $(gsl_ref_TEXINFOS) +gsl-ref.pdf: gsl-ref.texi $(srcdir)/version.texi $(gsl_ref_TEXINFOS) +gsl-ref.html: gsl-ref.texi $(srcdir)/version.texi $(gsl_ref_TEXINFOS) +$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: gsl-ref.texi $(top_srcdir)/configure + @(dir=.; test -f ./gsl-ref.texi || dir=$(srcdir); \ + set `$(SHELL) $(srcdir)/mdate-sh $$dir/gsl-ref.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: +@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf gsl-ref.aux gsl-ref.cp gsl-ref.cps gsl-ref.fn gsl-ref.fns \ + gsl-ref.ky gsl-ref.kys gsl-ref.log gsl-ref.pg gsl-ref.pgs \ + gsl-ref.tmp gsl-ref.toc gsl-ref.tp gsl-ref.tps gsl-ref.vr \ + gsl-ref.vrs + +clean-aminfo: + -test -z "gsl-ref.dvi gsl-ref.pdf gsl-ref.ps gsl-ref.html" \ + || rm -rf gsl-ref.dvi gsl-ref.pdf gsl-ref.ps gsl-ref.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } +install-man3: $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" + @list=''; test -n "$(man3dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) $(MANS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am install-man + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d$$p"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done + @$(POST_INSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: install-man1 install-man3 + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool mostlyclean-vti + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-pdf-am uninstall-ps-am + +uninstall-man: uninstall-man1 uninstall-man3 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + clean-libtool dist-info distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man3 install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ + uninstall-html-am uninstall-info-am uninstall-man \ + uninstall-man1 uninstall-man3 uninstall-pdf-am uninstall-ps-am + + +# pdf disabled, use postscript and ps2pdf +.PHONY: pdf +pdf: + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/doc/algorithm.sty b/software/gsl-1.15/doc/algorithm.sty new file mode 100644 index 000000000..843e3d5b9 --- /dev/null +++ b/software/gsl-1.15/doc/algorithm.sty @@ -0,0 +1,79 @@ +% ALGORITHM STYLE -- Released 8 April 1996 +% for LaTeX-2e +% Copyright -- 1994 Peter Williams +% E-mail Peter.Williams@dsto.defence.gov.au +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{algorithm} +\typeout{Document Style `algorithm' - floating environment} + +\RequirePackage{float} +\RequirePackage{ifthen} +\newcommand{\ALG@within}{nothing} +\newboolean{ALG@within} +\setboolean{ALG@within}{false} +\newcommand{\ALG@floatstyle}{ruled} +\newcommand{\ALG@name}{Algorithm} +\newcommand{\listalgorithmname}{List of \ALG@name s} + +% Declare Options +% first appearance +\DeclareOption{plain}{ + \renewcommand{\ALG@floatstyle}{plain} +} +\DeclareOption{ruled}{ + \renewcommand{\ALG@floatstyle}{ruled} +} +\DeclareOption{boxed}{ + \renewcommand{\ALG@floatstyle}{boxed} +} +% then numbering convention +\DeclareOption{part}{ + \renewcommand{\ALG@within}{part} + \setboolean{ALG@within}{true} +} +\DeclareOption{chapter}{ + \renewcommand{\ALG@within}{chapter} + \setboolean{ALG@within}{true} +} +\DeclareOption{section}{ + \renewcommand{\ALG@within}{section} + \setboolean{ALG@within}{true} +} +\DeclareOption{subsection}{ + \renewcommand{\ALG@within}{subsection} + \setboolean{ALG@within}{true} +} +\DeclareOption{subsubsection}{ + \renewcommand{\ALG@within}{subsubsection} + \setboolean{ALG@within}{true} +} +\DeclareOption{nothing}{ + \renewcommand{\ALG@within}{nothing} + \setboolean{ALG@within}{true} +} +\DeclareOption*{\edef\ALG@name{\CurrentOption}} + +% ALGORITHM +% +\ProcessOptions +\floatstyle{\ALG@floatstyle} +\ifthenelse{\boolean{ALG@within}}{ + \ifthenelse{\equal{\ALG@within}{part}} + {\newfloat{algorithm}{htbp}{loa}[part]}{} + \ifthenelse{\equal{\ALG@within}{chapter}} + {\newfloat{algorithm}{htbp}{loa}[chapter]}{} + \ifthenelse{\equal{\ALG@within}{section}} + {\newfloat{algorithm}{htbp}{loa}[section]}{} + \ifthenelse{\equal{\ALG@within}{subsection}} + {\newfloat{algorithm}{htbp}{loa}[subsection]}{} + \ifthenelse{\equal{\ALG@within}{subsubsection}} + {\newfloat{algorithm}{htbp}{loa}[subsubsection]}{} + \ifthenelse{\equal{\ALG@within}{nothing}} + {\newfloat{algorithm}{htbp}{loa}}{} +}{ + \newfloat{algorithm}{htbp}{loa} +} +\floatname{algorithm}{\ALG@name} + +\newcommand{\listofalgorithms}{\listof{algorithm}{\listalgorithmname}} + diff --git a/software/gsl-1.15/doc/algorithmic.sty b/software/gsl-1.15/doc/algorithmic.sty new file mode 100644 index 000000000..68f18aa0a --- /dev/null +++ b/software/gsl-1.15/doc/algorithmic.sty @@ -0,0 +1,158 @@ +% ALGORITHMIC STYLE -- Released 8 APRIL 1996 +% for LaTeX version 2e +% Copyright -- 1994 Peter Williams +% E-mail PeterWilliams@dsto.defence.gov.au +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{algorithmic} +\typeout{Document Style `algorithmic' - environment} +% +\RequirePackage{ifthen} +\RequirePackage{calc} +\newboolean{ALC@noend} +\setboolean{ALC@noend}{false} +\newcounter{ALC@line} +\newcounter{ALC@rem} +\newlength{\ALC@tlm} +% +\DeclareOption{noend}{\setboolean{ALC@noend}{true}} +% +\ProcessOptions +% +% ALGORITHMIC +\newcommand{\algorithmicrequire}{\textbf{Require:}} +\newcommand{\algorithmicensure}{\textbf{Ensure:}} +\newcommand{\algorithmiccomment}[1]{\{#1\}} +\newcommand{\algorithmicend}{\textbf{end}} +\newcommand{\algorithmicif}{\textbf{if}} +\newcommand{\algorithmicthen}{\textbf{then}} +\newcommand{\algorithmicelse}{\textbf{else}} +\newcommand{\algorithmicelsif}{\algorithmicelse\ \algorithmicif} +\newcommand{\algorithmicendif}{\algorithmicend\ \algorithmicif} +\newcommand{\algorithmicfor}{\textbf{for}} +\newcommand{\algorithmicforall}{\textbf{for all}} +\newcommand{\algorithmicdo}{\textbf{do}} +\newcommand{\algorithmicendfor}{\algorithmicend\ \algorithmicfor} +\newcommand{\algorithmicwhile}{\textbf{while}} +\newcommand{\algorithmicendwhile}{\algorithmicend\ \algorithmicwhile} +\newcommand{\algorithmicloop}{\textbf{loop}} +\newcommand{\algorithmicendloop}{\algorithmicend\ \algorithmicloop} +\newcommand{\algorithmicrepeat}{\textbf{repeat}} +\newcommand{\algorithmicuntil}{\textbf{until}} +\def\ALC@item[#1]{% +\if@noparitem \@donoparitem + \else \if@inlabel \indent \par \fi + \ifhmode \unskip\unskip \par \fi + \if@newlist \if@nobreak \@nbitem \else + \addpenalty\@beginparpenalty + \addvspace\@topsep \addvspace{-\parskip}\fi + \else \addpenalty\@itempenalty \addvspace\itemsep + \fi + \global\@inlabeltrue +\fi +\everypar{\global\@minipagefalse\global\@newlistfalse + \if@inlabel\global\@inlabelfalse \hskip -\parindent \box\@labels + \penalty\z@ \fi + \everypar{}}\global\@nobreakfalse +\if@noitemarg \@noitemargfalse \if@nmbrlist \refstepcounter{\@listctr}\fi \fi +\sbox\@tempboxa{\makelabel{#1}}% +\global\setbox\@labels + \hbox{\unhbox\@labels \hskip \itemindent + \hskip -\labelwidth \hskip -\ALC@tlm + \ifdim \wd\@tempboxa >\labelwidth + \box\@tempboxa + \else \hbox to\labelwidth {\unhbox\@tempboxa}\fi + \hskip \ALC@tlm}\ignorespaces} +% +\newenvironment{algorithmic}[1][0]{ +\let\@item\ALC@item + \newcommand{\ALC@lno}{% +\ifthenelse{\equal{\arabic{ALC@rem}}{0}} +{{\footnotesize \arabic{ALC@line}:}}{}% +} +\let\@listii\@listi +\let\@listiii\@listi +\let\@listiv\@listi +\let\@listv\@listi +\let\@listvi\@listi +\let\@listvii\@listi + \newenvironment{ALC@g}{ + \begin{list}{\ALC@lno}{ \itemsep\z@ \itemindent\z@ + \listparindent\z@ \rightmargin\z@ + \topsep\z@ \partopsep\z@ \parskip\z@\parsep\z@ + \leftmargin 1em + \addtolength{\ALC@tlm}{\leftmargin} + } + } + {\end{list}} + \newcommand{\ALC@it}{\addtocounter{ALC@line}{1}\addtocounter{ALC@rem}{1}\ifthenelse{\equal{\arabic{ALC@rem}}{#1}}{\setcounter{ALC@rem}{0}}{}\item} + \newcommand{\ALC@com}[1]{\ifthenelse{\equal{##1}{default}}% +{}{\ \algorithmiccomment{##1}}} + \newcommand{\REQUIRE}{\item[\algorithmicrequire]} + \newcommand{\ENSURE}{\item[\algorithmicensure]} + \newcommand{\STATE}{\ALC@it} + \newcommand{\COMMENT}[1]{\algorithmiccomment{##1}} + \newenvironment{ALC@if}{\begin{ALC@g}}{\end{ALC@g}} + \newenvironment{ALC@for}{\begin{ALC@g}}{\end{ALC@g}} + \newenvironment{ALC@whl}{\begin{ALC@g}}{\end{ALC@g}} + \newenvironment{ALC@loop}{\begin{ALC@g}}{\end{ALC@g}} + \newenvironment{ALC@rpt}{\begin{ALC@g}}{\end{ALC@g}} + \renewcommand{\\}{\@centercr} + \newcommand{\IF}[2][default]{\ALC@it\algorithmicif\ ##2\ \algorithmicthen% +\ALC@com{##1}\begin{ALC@if}} + \newcommand{\ELSE}[1][default]{\end{ALC@if}\ALC@it\algorithmicelse% +\ALC@com{##1}\begin{ALC@if}} + \newcommand{\ELSIF}[2][default]% +{\end{ALC@if}\ALC@it\algorithmicelsif\ ##2\ \algorithmicthen% +\ALC@com{##1}\begin{ALC@if}} + \newcommand{\FOR}[2][default]{\ALC@it\algorithmicfor\ ##2\ \algorithmicdo% +\ALC@com{##1}\begin{ALC@for}} + \newcommand{\FORALL}[2][default]{\ALC@it\algorithmicforall\ ##2\ % +\algorithmicdo% +\ALC@com{##1}\begin{ALC@for}} + \newcommand{\WHILE}[2][default]{\ALC@it\algorithmicwhile\ ##2\ % +\algorithmicdo% +\ALC@com{##1}\begin{ALC@whl}} + \newcommand{\LOOP}[1][default]{\ALC@it\algorithmicloop% +\ALC@com{##1}\begin{ALC@loop}} + \newcommand{\REPEAT}[1][default]{\ALC@it\algorithmicrepeat% +\ALC@com{##1}\begin{ALC@rpt}} + \newcommand{\UNTIL}[1]{\end{ALC@rpt}\ALC@it\algorithmicuntil\ ##1} + \ifthenelse{\boolean{ALC@noend}}{ + \newcommand{\ENDIF}{\end{ALC@if}} + \newcommand{\ENDFOR}{\end{ALC@for}} + \newcommand{\ENDWHILE}{\end{ALC@whl}} + \newcommand{\ENDLOOP}{\end{ALC@loop}} + }{ + \newcommand{\ENDIF}{\end{ALC@if}\ALC@it\algorithmicendif} + \newcommand{\ENDFOR}{\end{ALC@for}\ALC@it\algorithmicendfor} + \newcommand{\ENDWHILE}{\end{ALC@whl}\ALC@it\algorithmicendwhile} + \newcommand{\ENDLOOP}{\end{ALC@loop}\ALC@it\algorithmicendloop} + } + \renewcommand{\@toodeep}{} + \begin{list}{\ALC@lno}{\setcounter{ALC@line}{0}\setcounter{ALC@rem}{0}% + \itemsep\z@ \itemindent\z@ \listparindent\z@% + \partopsep\z@ \parskip\z@ \parsep\z@% + \labelsep 0.5em \topsep 0.2em% +\ifthenelse{\equal{#1}{0}} + {\labelwidth 0.5em } + {\labelwidth 1.2em } +\leftmargin\labelwidth \addtolength{\leftmargin}{\labelsep} + \ALC@tlm\labelsep + } +} +{\end{list}} + + + + + + + + + + + + + + + diff --git a/software/gsl-1.15/doc/autoconf.texi b/software/gsl-1.15/doc/autoconf.texi new file mode 100644 index 000000000..95ea221ab --- /dev/null +++ b/software/gsl-1.15/doc/autoconf.texi @@ -0,0 +1,132 @@ +@cindex autoconf, using with GSL + +For applications using @code{autoconf} the standard macro +@code{AC_CHECK_LIB} can be used to link with GSL automatically +from a @code{configure} script. The library itself depends on the +presence of a @sc{cblas} and math library as well, so these must also be +located before linking with the main @code{libgsl} file. The following +commands should be placed in the @file{configure.ac} file to perform +these tests, + +@example +AC_CHECK_LIB([m],[cos]) +AC_CHECK_LIB([gslcblas],[cblas_dgemm]) +AC_CHECK_LIB([gsl],[gsl_blas_dgemm]) +@end example + +@noindent +It is important to check for @code{libm} and @code{libgslcblas} before +@code{libgsl}, otherwise the tests will fail. Assuming the libraries +are found the output during the configure stage looks like this, + +@example +checking for cos in -lm... yes +checking for cblas_dgemm in -lgslcblas... yes +checking for gsl_blas_dgemm in -lgsl... yes +@end example + +@noindent +If the library is found then the tests will define the macros +@code{HAVE_LIBGSL}, @code{HAVE_LIBGSLCBLAS}, @code{HAVE_LIBM} and add +the options @code{-lgsl -lgslcblas -lm} to the variable @code{LIBS}. + +The tests above will find any version of the library. They are suitable +for general use, where the versions of the functions are not important. +An alternative macro is available in the file @file{gsl.m4} to test for +a specific version of the library. To use this macro simply add the +following line to your @file{configure.in} file instead of the tests +above: + +@example +AX_PATH_GSL(GSL_VERSION, + [action-if-found], + [action-if-not-found]) +@end example + +@noindent +The argument @code{GSL_VERSION} should be the two or three digit +@sc{major.minor} or @sc{major.minor.micro} version number of the release +you require. A suitable choice for @code{action-if-not-found} is, + +@example +AC_MSG_ERROR(could not find required version of GSL) +@end example + +@noindent +Then you can add the variables @code{GSL_LIBS} and @code{GSL_CFLAGS} to +your Makefile.am files to obtain the correct compiler flags. +@code{GSL_LIBS} is equal to the output of the @code{gsl-config --libs} +command and @code{GSL_CFLAGS} is equal to @code{gsl-config --cflags} +command. For example, + +@example +libfoo_la_LDFLAGS = -lfoo $(GSL_LIBS) -lgslcblas +@end example + +@noindent +Note that the macro @code{AX_PATH_GSL} needs to use the C compiler so it +should appear in the @file{configure.in} file before the macro +@code{AC_LANG_CPLUSPLUS} for programs that use C++. + +To test for @code{inline} the following test should be placed in your +@file{configure.in} file, + +@example +AC_C_INLINE + +if test "$ac_cv_c_inline" != no ; then + AC_DEFINE(HAVE_INLINE,1) + AC_SUBST(HAVE_INLINE) +fi +@end example + +@noindent +and the macro will then be defined in the compilation flags or by +including the file @file{config.h} before any library headers. + +The following autoconf test will check for @code{extern inline}, + +@smallexample +dnl Check for "extern inline", using a modified version +dnl of the test for AC_C_INLINE from acspecific.mt +dnl +AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline, +[ac_cv_c_extern_inline=no +AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x); +extern $ac_cv_c_inline double foo(double x) @{ return x+1.0; @}; +double foo (double x) @{ return x + 1.0; @};], +[ foo(1.0) ], +[ac_cv_c_extern_inline="yes"]) +]) + +if test "$ac_cv_c_extern_inline" != no ; then + AC_DEFINE(HAVE_INLINE,1) + AC_SUBST(HAVE_INLINE) +fi +@end smallexample + +The substitution of portability functions can be made automatically if +you use @code{autoconf}. For example, to test whether the BSD function +@code{hypot} is available you can include the following line in the +configure file @file{configure.in} for your application, + +@example +AC_CHECK_FUNCS(hypot) +@end example + +@noindent +and place the following macro definitions in the file +@file{config.h.in}, + +@example +/* Substitute gsl_hypot for missing system hypot */ + +#ifndef HAVE_HYPOT +#define hypot gsl_hypot +#endif +@end example + +@noindent +The application source files can then use the include command +@code{#include } to substitute @code{gsl_hypot} for each +occurrence of @code{hypot} when @code{hypot} is not available. diff --git a/software/gsl-1.15/doc/blas.texi b/software/gsl-1.15/doc/blas.texi new file mode 100644 index 000000000..f4529eafc --- /dev/null +++ b/software/gsl-1.15/doc/blas.texi @@ -0,0 +1,698 @@ +@cindex linear algebra, BLAS +@cindex matrix, operations +@cindex vector, operations +@cindex BLAS +@cindex CBLAS +@cindex Basic Linear Algebra Subroutines (BLAS) + +The Basic Linear Algebra Subprograms (@sc{blas}) define a set of fundamental +operations on vectors and matrices which can be used to create optimized +higher-level linear algebra functionality. + +The library provides a low-level layer which corresponds directly to the +C-language @sc{blas} standard, referred to here as ``@sc{cblas}'', and a +higher-level interface for operations on GSL vectors and matrices. +Users who are interested in simple operations on GSL vector and matrix +objects should use the high-level layer described +in this chapter. The functions are declared in the file +@file{gsl_blas.h} and should satisfy the needs of most users. + +Note that GSL matrices are implemented using dense-storage so the +interface only includes the corresponding dense-storage @sc{blas} +functions. The full @sc{blas} functionality for band-format and +packed-format matrices is available through the low-level @sc{cblas} +interface. Similarly, GSL vectors are restricted to positive strides, +whereas the low-level @sc{cblas} interface supports negative +strides as specified in the @sc{blas} standard.@footnote{In the low-level +@sc{cblas} interface, a negative stride accesses the vector elements +in reverse order, i.e. the @math{i}-th element is given by +@math{(N-i)*|incx|} for @math{incx < 0}.} + +The interface for the @code{gsl_cblas} layer is specified in the file +@file{gsl_cblas.h}. This interface corresponds to the @sc{blas} Technical +Forum's standard for the C interface to legacy @sc{blas} +implementations. Users who have access to other conforming @sc{cblas} +implementations can use these in place of the version provided by the +library. Note that users who have only a Fortran @sc{blas} library can +use a @sc{cblas} conformant wrapper to convert it into a @sc{cblas} +library. A reference @sc{cblas} wrapper for legacy Fortran +implementations exists as part of the @sc{cblas} standard and can +be obtained from Netlib. The complete set of @sc{cblas} functions is +listed in an appendix (@pxref{GSL CBLAS Library}). + +There are three levels of @sc{blas} operations, + +@table @b +@item Level 1 +Vector operations, e.g. @math{y = \alpha x + y} +@item Level 2 +Matrix-vector operations, e.g. @math{y = \alpha A x + \beta y} +@item Level 3 +Matrix-matrix operations, e.g. @math{C = \alpha A B + C} +@end table + +@noindent +Each routine has a name which specifies the operation, the type of +matrices involved and their precisions. Some of the most common +operations and their names are given below, + +@table @b +@item DOT +scalar product, @math{x^T y} +@item AXPY +vector sum, @math{\alpha x + y} +@item MV +matrix-vector product, @math{A x} +@item SV +matrix-vector solve, @math{inv(A) x} +@item MM +matrix-matrix product, @math{A B} +@item SM +matrix-matrix solve, @math{inv(A) B} +@end table + +@noindent +The types of matrices are, + +@table @b +@item GE +general +@item GB +general band +@item SY +symmetric +@item SB +symmetric band +@item SP +symmetric packed +@item HE +hermitian +@item HB +hermitian band +@item HP +hermitian packed +@item TR +triangular +@item TB +triangular band +@item TP +triangular packed +@end table + +@noindent +Each operation is defined for four precisions, + +@table @b +@item S +single real +@item D +double real +@item C +single complex +@item Z +double complex +@end table + +@noindent +Thus, for example, the name @sc{sgemm} stands for ``single-precision +general matrix-matrix multiply'' and @sc{zgemm} stands for +``double-precision complex matrix-matrix multiply''. + +Note that the vector and matrix arguments to BLAS functions must not +be aliased, as the results are undefined when the underlying arrays +overlap (@pxref{Aliasing of arrays}). + +@menu +* GSL BLAS Interface:: +* BLAS Examples:: +* BLAS References and Further Reading:: +@end menu + +@node GSL BLAS Interface +@section GSL BLAS Interface + +GSL provides dense vector and matrix objects, based on the relevant +built-in types. The library provides an interface to the @sc{blas} +operations which apply to these objects. The interface to this +functionality is given in the file @file{gsl_blas.h}. + +@comment CblasNoTrans, CblasTrans, CblasConjTrans +@comment CblasUpper, CblasLower +@comment CblasNonUnit, CblasUnit +@comment CblasLeft, CblasRight + +@menu +* Level 1 GSL BLAS Interface:: +* Level 2 GSL BLAS Interface:: +* Level 3 GSL BLAS Interface:: +@end menu + +@node Level 1 GSL BLAS Interface +@subsection Level 1 + +@deftypefun int gsl_blas_sdsdot (float @var{alpha}, const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, float * @var{result}) +@cindex DOT, Level-1 BLAS +This function computes the sum @math{\alpha + x^T y} for the vectors +@var{x} and @var{y}, returning the result in @var{result}. +@end deftypefun + +@deftypefun int gsl_blas_sdot (const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, float * @var{result}) +@deftypefunx int gsl_blas_dsdot (const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, double * @var{result}) +@deftypefunx int gsl_blas_ddot (const gsl_vector * @var{x}, const gsl_vector * @var{y}, double * @var{result}) +These functions compute the scalar product @math{x^T y} for the vectors +@var{x} and @var{y}, returning the result in @var{result}. +@end deftypefun + +@deftypefun int gsl_blas_cdotu (const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_complex_float * @var{dotu}) +@deftypefunx int gsl_blas_zdotu (const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_complex * @var{dotu}) +These functions compute the complex scalar product @math{x^T y} for the +vectors @var{x} and @var{y}, returning the result in @var{dotu} +@end deftypefun + +@deftypefun int gsl_blas_cdotc (const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_complex_float * @var{dotc}) +@deftypefunx int gsl_blas_zdotc (const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_complex * @var{dotc}) +These functions compute the complex conjugate scalar product @math{x^H +y} for the vectors @var{x} and @var{y}, returning the result in +@var{dotc} +@end deftypefun + +@deftypefun float gsl_blas_snrm2 (const gsl_vector_float * @var{x}) +@deftypefunx double gsl_blas_dnrm2 (const gsl_vector * @var{x}) +@cindex NRM2, Level-1 BLAS +These functions compute the Euclidean norm +@c{$||x||_2 = \sqrt{\sum x_i^2}$} +@math{||x||_2 = \sqrt @{\sum x_i^2@}} of the vector @var{x}. +@end deftypefun + +@deftypefun float gsl_blas_scnrm2 (const gsl_vector_complex_float * @var{x}) +@deftypefunx double gsl_blas_dznrm2 (const gsl_vector_complex * @var{x}) +These functions compute the Euclidean norm of the complex vector @var{x}, +@tex +\beforedisplay +$$ +||x||_2 = \sqrt{\sum (\Re(x_i)^2 + \Im(x_i)^2)}. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +||x||_2 = \sqrt @{\sum (\Re(x_i)^2 + \Im(x_i)^2)@}. +@end example +@end ifinfo +@end deftypefun + +@deftypefun float gsl_blas_sasum (const gsl_vector_float * @var{x}) +@deftypefunx double gsl_blas_dasum (const gsl_vector * @var{x}) +@cindex ASUM, Level-1 BLAS +These functions compute the absolute sum @math{\sum |x_i|} of the +elements of the vector @var{x}. +@end deftypefun + +@deftypefun float gsl_blas_scasum (const gsl_vector_complex_float * @var{x}) +@deftypefunx double gsl_blas_dzasum (const gsl_vector_complex * @var{x}) +These functions compute the sum of the magnitudes of the real and +imaginary parts of the complex vector @var{x}, +@c{$\sum \left( |\Re(x_i)| + |\Im(x_i)| \right)$} +@math{\sum |\Re(x_i)| + |\Im(x_i)|}. +@end deftypefun + +@deftypefun CBLAS_INDEX_t gsl_blas_isamax (const gsl_vector_float * @var{x}) +@deftypefunx CBLAS_INDEX_t gsl_blas_idamax (const gsl_vector * @var{x}) +@deftypefunx CBLAS_INDEX_t gsl_blas_icamax (const gsl_vector_complex_float * @var{x}) +@deftypefunx CBLAS_INDEX_t gsl_blas_izamax (const gsl_vector_complex * @var{x}) +@cindex AMAX, Level-1 BLAS +These functions return the index of the largest element of the vector +@var{x}. The largest element is determined by its absolute magnitude for +real vectors and by the sum of the magnitudes of the real and imaginary +parts @math{|\Re(x_i)| + |\Im(x_i)|} for complex vectors. If the +largest value occurs several times then the index of the first +occurrence is returned. +@end deftypefun + +@deftypefun int gsl_blas_sswap (gsl_vector_float * @var{x}, gsl_vector_float * @var{y}) +@deftypefunx int gsl_blas_dswap (gsl_vector * @var{x}, gsl_vector * @var{y}) +@deftypefunx int gsl_blas_cswap (gsl_vector_complex_float * @var{x}, gsl_vector_complex_float * @var{y}) +@deftypefunx int gsl_blas_zswap (gsl_vector_complex * @var{x}, gsl_vector_complex * @var{y}) +@cindex SWAP, Level-1 BLAS +These functions exchange the elements of the vectors @var{x} and @var{y}. +@end deftypefun + +@deftypefun int gsl_blas_scopy (const gsl_vector_float * @var{x}, gsl_vector_float * @var{y}) +@deftypefunx int gsl_blas_dcopy (const gsl_vector * @var{x}, gsl_vector * @var{y}) +@deftypefunx int gsl_blas_ccopy (const gsl_vector_complex_float * @var{x}, gsl_vector_complex_float * @var{y}) +@deftypefunx int gsl_blas_zcopy (const gsl_vector_complex * @var{x}, gsl_vector_complex * @var{y}) +@cindex COPY, Level-1 BLAS +These functions copy the elements of the vector @var{x} into the vector +@var{y}. +@end deftypefun + + +@deftypefun int gsl_blas_saxpy (float @var{alpha}, const gsl_vector_float * @var{x}, gsl_vector_float * @var{y}) +@deftypefunx int gsl_blas_daxpy (double @var{alpha}, const gsl_vector * @var{x}, gsl_vector * @var{y}) +@deftypefunx int gsl_blas_caxpy (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, gsl_vector_complex_float * @var{y}) +@deftypefunx int gsl_blas_zaxpy (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, gsl_vector_complex * @var{y}) +@cindex AXPY, Level-1 BLAS +@cindex DAXPY, Level-1 BLAS +@cindex SAXPY, Level-1 BLAS +These functions compute the sum @math{y = \alpha x + y} for the vectors +@var{x} and @var{y}. +@end deftypefun + +@deftypefun void gsl_blas_sscal (float @var{alpha}, gsl_vector_float * @var{x}) +@deftypefunx void gsl_blas_dscal (double @var{alpha}, gsl_vector * @var{x}) +@deftypefunx void gsl_blas_cscal (const gsl_complex_float @var{alpha}, gsl_vector_complex_float * @var{x}) +@deftypefunx void gsl_blas_zscal (const gsl_complex @var{alpha}, gsl_vector_complex * @var{x}) +@deftypefunx void gsl_blas_csscal (float @var{alpha}, gsl_vector_complex_float * @var{x}) +@deftypefunx void gsl_blas_zdscal (double @var{alpha}, gsl_vector_complex * @var{x}) +@cindex SCAL, Level-1 BLAS +These functions rescale the vector @var{x} by the multiplicative factor +@var{alpha}. +@end deftypefun + +@deftypefun int gsl_blas_srotg (float @var{a}[], float @var{b}[], float @var{c}[], float @var{s}[]) +@deftypefunx int gsl_blas_drotg (double @var{a}[], double @var{b}[], double @var{c}[], double @var{s}[]) +@cindex ROTG, Level-1 BLAS +@cindex Givens Rotation, BLAS +These functions compute a Givens rotation @math{(c,s)} which zeroes the +vector @math{(a,b)}, +@tex +\beforedisplay +$$ +\left( +\matrix{c&s\cr +-s&c\cr} +\right) +\left( +\matrix{a\cr +b\cr} +\right) += +\left( +\matrix{r'\cr +0\cr} +\right) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +[ c s ] [ a ] = [ r ] +[ -s c ] [ b ] [ 0 ] +@end example + +@end ifinfo +@noindent +The variables @var{a} and @var{b} are overwritten by the routine. +@end deftypefun + +@deftypefun int gsl_blas_srot (gsl_vector_float * @var{x}, gsl_vector_float * @var{y}, float @var{c}, float @var{s}) +@deftypefunx int gsl_blas_drot (gsl_vector * @var{x}, gsl_vector * @var{y}, const double @var{c}, const double @var{s}) +These functions apply a Givens rotation @math{(x', y') = (c x + s y, -s +x + c y)} to the vectors @var{x}, @var{y}. +@end deftypefun + +@deftypefun int gsl_blas_srotmg (float @var{d1}[], float @var{d2}[], float @var{b1}[], float @var{b2}, float @var{P}[]) +@deftypefunx int gsl_blas_drotmg (double @var{d1}[], double @var{d2}[], double @var{b1}[], double @var{b2}, double @var{P}[]) +@cindex Modified Givens Rotation, BLAS +@cindex Givens Rotation, Modified, BLAS +These functions compute a modified Givens transformation. The modified +Givens transformation is defined in the original Level-1 @sc{blas} +specification, given in the references. +@end deftypefun + +@deftypefun int gsl_blas_srotm (gsl_vector_float * @var{x}, gsl_vector_float * @var{y}, const float @var{P}[]) +@deftypefunx int gsl_blas_drotm (gsl_vector * @var{x}, gsl_vector * @var{y}, const double @var{P}[]) +These functions apply a modified Givens transformation. +@end deftypefun + +@node Level 2 GSL BLAS Interface +@subsection Level 2 + +@deftypefun int gsl_blas_sgemv (CBLAS_TRANSPOSE_t @var{TransA}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_vector_float * @var{x}, float @var{beta}, gsl_vector_float * @var{y}) +@deftypefunx int gsl_blas_dgemv (CBLAS_TRANSPOSE_t @var{TransA}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_vector * @var{x}, double @var{beta}, gsl_vector * @var{y}) +@deftypefunx int gsl_blas_cgemv (CBLAS_TRANSPOSE_t @var{TransA}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_vector_complex_float * @var{x}, const gsl_complex_float @var{beta}, gsl_vector_complex_float * @var{y}) +@deftypefunx int gsl_blas_zgemv (CBLAS_TRANSPOSE_t @var{TransA}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{x}, const gsl_complex @var{beta}, gsl_vector_complex * @var{y}) +@cindex GEMV, Level-2 BLAS +These functions compute the matrix-vector product and sum @math{y = +\alpha op(A) x + \beta y}, where @math{op(A) = A}, +@math{A^T}, @math{A^H} for @var{TransA} = @code{CblasNoTrans}, +@code{CblasTrans}, @code{CblasConjTrans}. +@end deftypefun + + +@deftypefun int gsl_blas_strmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_float * @var{A}, gsl_vector_float * @var{x}) +@deftypefunx int gsl_blas_dtrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix * @var{A}, gsl_vector * @var{x}) +@deftypefunx int gsl_blas_ctrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex_float * @var{A}, gsl_vector_complex_float * @var{x}) +@deftypefunx int gsl_blas_ztrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{x}) +@cindex TRMV, Level-2 BLAS +These functions compute the matrix-vector product +@math{x = op(A) x} for the triangular matrix @var{A}, where +@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = +@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When +@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} is +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +of @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then the +diagonal of the matrix is used, but if @var{Diag} is @code{CblasUnit} +then the diagonal elements of the matrix @var{A} are taken as unity and +are not referenced. +@end deftypefun + + +@deftypefun int gsl_blas_strsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_float * @var{A}, gsl_vector_float * @var{x}) +@deftypefunx int gsl_blas_dtrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix * @var{A}, gsl_vector * @var{x}) +@deftypefunx int gsl_blas_ctrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex_float * @var{A}, gsl_vector_complex_float * @var{x}) +@deftypefunx int gsl_blas_ztrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{x}) +@cindex TRSV, Level-2 BLAS +These functions compute @math{inv(op(A)) x} for @var{x}, where +@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = +@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When +@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} is +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +of @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then the +diagonal of the matrix is used, but if @var{Diag} is @code{CblasUnit} +then the diagonal elements of the matrix @var{A} are taken as unity and +are not referenced. +@end deftypefun + + +@deftypefun int gsl_blas_ssymv (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_vector_float * @var{x}, float @var{beta}, gsl_vector_float * @var{y}) +@deftypefunx int gsl_blas_dsymv (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_vector * @var{x}, double @var{beta}, gsl_vector * @var{y}) +@cindex SYMV, Level-2 BLAS +These functions compute the matrix-vector product and sum @math{y = +\alpha A x + \beta y} for the symmetric matrix @var{A}. Since the +matrix @var{A} is symmetric only its upper half or lower half need to be +stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle +and diagonal of @var{A} are used, and when @var{Uplo} is +@code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. +@end deftypefun + +@deftypefun int gsl_blas_chemv (CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_vector_complex_float * @var{x}, const gsl_complex_float @var{beta}, gsl_vector_complex_float * @var{y}) +@deftypefunx int gsl_blas_zhemv (CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{x}, const gsl_complex @var{beta}, gsl_vector_complex * @var{y}) +@cindex HEMV, Level-2 BLAS +These functions compute the matrix-vector product and sum @math{y = +\alpha A x + \beta y} for the hermitian matrix @var{A}. Since the +matrix @var{A} is hermitian only its upper half or lower half need to be +stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle +and diagonal of @var{A} are used, and when @var{Uplo} is +@code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. The imaginary elements of the diagonal are automatically assumed +to be zero and are not referenced. +@end deftypefun + +@deftypefun int gsl_blas_sger (float @var{alpha}, const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, gsl_matrix_float * @var{A}) +@deftypefunx int gsl_blas_dger (double @var{alpha}, const gsl_vector * @var{x}, const gsl_vector * @var{y}, gsl_matrix * @var{A}) +@deftypefunx int gsl_blas_cgeru (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A}) +@deftypefunx int gsl_blas_zgeru (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A}) +@cindex GER, Level-2 BLAS +@cindex GERU, Level-2 BLAS +These functions compute the rank-1 update @math{A = \alpha x y^T + A} of +the matrix @var{A}. +@end deftypefun + +@deftypefun int gsl_blas_cgerc (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A}) +@deftypefunx int gsl_blas_zgerc (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A}) +@cindex GERC, Level-2 BLAS +These functions compute the conjugate rank-1 update @math{A = \alpha x +y^H + A} of the matrix @var{A}. +@end deftypefun + +@deftypefun int gsl_blas_ssyr (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_float * @var{x}, gsl_matrix_float * @var{A}) +@deftypefunx int gsl_blas_dsyr (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector * @var{x}, gsl_matrix * @var{A}) +@cindex SYR, Level-2 BLAS +These functions compute the symmetric rank-1 update @math{A = \alpha x +x^T + A} of the symmetric matrix @var{A}. Since the matrix @var{A} is +symmetric only its upper half or lower half need to be stored. When +@var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of +@var{A} are used, and when @var{Uplo} is @code{CblasLower} then the +lower triangle and diagonal of @var{A} are used. +@end deftypefun + +@deftypefun int gsl_blas_cher (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_complex_float * @var{x}, gsl_matrix_complex_float * @var{A}) +@deftypefunx int gsl_blas_zher (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector_complex * @var{x}, gsl_matrix_complex * @var{A}) +@cindex HER, Level-2 BLAS +These functions compute the hermitian rank-1 update @math{A = \alpha x +x^H + A} of the hermitian matrix @var{A}. Since the matrix @var{A} is +hermitian only its upper half or lower half need to be stored. When +@var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of +@var{A} are used, and when @var{Uplo} is @code{CblasLower} then the +lower triangle and diagonal of @var{A} are used. The imaginary elements +of the diagonal are automatically set to zero. +@end deftypefun + +@deftypefun int gsl_blas_ssyr2 (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, gsl_matrix_float * @var{A}) +@deftypefunx int gsl_blas_dsyr2 (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector * @var{x}, const gsl_vector * @var{y}, gsl_matrix * @var{A}) +@cindex SYR2, Level-2 BLAS +These functions compute the symmetric rank-2 update @math{A = \alpha x +y^T + \alpha y x^T + A} of the symmetric matrix @var{A}. Since the +matrix @var{A} is symmetric only its upper half or lower half need to be +stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle +and diagonal of @var{A} are used, and when @var{Uplo} is +@code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. +@end deftypefun + +@deftypefun int gsl_blas_cher2 (CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A}) +@deftypefunx int gsl_blas_zher2 (CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A}) +@cindex HER2, Level-2 BLAS +These functions compute the hermitian rank-2 update @math{A = \alpha x +y^H + \alpha^* y x^H + A} of the hermitian matrix @var{A}. Since the +matrix @var{A} is hermitian only its upper half or lower half need to be +stored. When @var{Uplo} is @code{CblasUpper} then the upper triangle +and diagonal of @var{A} are used, and when @var{Uplo} is +@code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. The imaginary elements of the diagonal are automatically set to zero. +@end deftypefun + +@node Level 3 GSL BLAS Interface +@subsection Level 3 + + +@deftypefun int gsl_blas_sgemm (CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_TRANSPOSE_t @var{TransB}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_matrix_float * @var{B}, float @var{beta}, gsl_matrix_float * @var{C}) +@deftypefunx int gsl_blas_dgemm (CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_TRANSPOSE_t @var{TransB}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_matrix * @var{B}, double @var{beta}, gsl_matrix * @var{C}) +@deftypefunx int gsl_blas_cgemm (CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_TRANSPOSE_t @var{TransB}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_matrix_complex_float * @var{B}, const gsl_complex_float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zgemm (CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_TRANSPOSE_t @var{TransB}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{B}, const gsl_complex @var{beta}, gsl_matrix_complex * @var{C}) +@cindex GEMM, Level-3 BLAS +These functions compute the matrix-matrix product and sum @math{C = +\alpha op(A) op(B) + \beta C} where @math{op(A) = A}, @math{A^T}, +@math{A^H} for @var{TransA} = @code{CblasNoTrans}, @code{CblasTrans}, +@code{CblasConjTrans} and similarly for the parameter @var{TransB}. +@end deftypefun + + +@deftypefun int gsl_blas_ssymm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_matrix_float * @var{B}, float @var{beta}, gsl_matrix_float * @var{C}) +@deftypefunx int gsl_blas_dsymm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_matrix * @var{B}, double @var{beta}, gsl_matrix * @var{C}) +@deftypefunx int gsl_blas_csymm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_matrix_complex_float * @var{B}, const gsl_complex_float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zsymm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{B}, const gsl_complex @var{beta}, gsl_matrix_complex * @var{C}) +@cindex SYMM, Level-3 BLAS +These functions compute the matrix-matrix product and sum @math{C = +\alpha A B + \beta C} for @var{Side} is @code{CblasLeft} and @math{C = +\alpha B A + \beta C} for @var{Side} is @code{CblasRight}, where the +matrix @var{A} is symmetric. When @var{Uplo} is @code{CblasUpper} then +the upper triangle and diagonal of @var{A} are used, and when @var{Uplo} +is @code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. +@end deftypefun + +@deftypefun int gsl_blas_chemm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_matrix_complex_float * @var{B}, const gsl_complex_float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zhemm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{B}, const gsl_complex @var{beta}, gsl_matrix_complex * @var{C}) +@cindex HEMM, Level-3 BLAS +These functions compute the matrix-matrix product and sum @math{C = +\alpha A B + \beta C} for @var{Side} is @code{CblasLeft} and @math{C = +\alpha B A + \beta C} for @var{Side} is @code{CblasRight}, where the +matrix @var{A} is hermitian. When @var{Uplo} is @code{CblasUpper} then +the upper triangle and diagonal of @var{A} are used, and when @var{Uplo} +is @code{CblasLower} then the lower triangle and diagonal of @var{A} are +used. The imaginary elements of the diagonal are automatically set to +zero. +@end deftypefun + +@deftypefun int gsl_blas_strmm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, float @var{alpha}, const gsl_matrix_float * @var{A}, gsl_matrix_float * @var{B}) +@deftypefunx int gsl_blas_dtrmm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, double @var{alpha}, const gsl_matrix * @var{A}, gsl_matrix * @var{B}) +@deftypefunx int gsl_blas_ctrmm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, gsl_matrix_complex_float * @var{B}) +@deftypefunx int gsl_blas_ztrmm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}) +@cindex TRMM, Level-3 BLAS +These functions compute the matrix-matrix product @math{B = \alpha op(A) +B} for @var{Side} is @code{CblasLeft} and @math{B = \alpha B op(A)} for +@var{Side} is @code{CblasRight}. The matrix @var{A} is triangular and +@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = +@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When +@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} is +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +of @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then the +diagonal of @var{A} is used, but if @var{Diag} is @code{CblasUnit} then +the diagonal elements of the matrix @var{A} are taken as unity and are +not referenced. +@end deftypefun + + +@deftypefun int gsl_blas_strsm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, float @var{alpha}, const gsl_matrix_float * @var{A}, gsl_matrix_float * @var{B}) +@deftypefunx int gsl_blas_dtrsm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, double @var{alpha}, const gsl_matrix * @var{A}, gsl_matrix * @var{B}) +@deftypefunx int gsl_blas_ctrsm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, gsl_matrix_complex_float * @var{B}) +@deftypefunx int gsl_blas_ztrsm (CBLAS_SIDE_t @var{Side}, CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}) +@cindex TRSM, Level-3 BLAS +These functions compute the inverse-matrix matrix product +@math{B = \alpha op(inv(A))B} for @var{Side} is +@code{CblasLeft} and @math{B = \alpha B op(inv(A))} for +@var{Side} is @code{CblasRight}. The matrix @var{A} is triangular and +@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = +@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When +@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} is +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +of @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then the +diagonal of @var{A} is used, but if @var{Diag} is @code{CblasUnit} then +the diagonal elements of the matrix @var{A} are taken as unity and are +not referenced. +@end deftypefun + +@deftypefun int gsl_blas_ssyrk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, float @var{alpha}, const gsl_matrix_float * @var{A}, float @var{beta}, gsl_matrix_float * @var{C}) +@deftypefunx int gsl_blas_dsyrk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, double @var{alpha}, const gsl_matrix * @var{A}, double @var{beta}, gsl_matrix * @var{C}) +@deftypefunx int gsl_blas_csyrk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_complex_float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zsyrk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_complex @var{beta}, gsl_matrix_complex * @var{C}) +@cindex SYRK, Level-3 BLAS +These functions compute a rank-k update of the symmetric matrix @var{C}, +@math{C = \alpha A A^T + \beta C} when @var{Trans} is +@code{CblasNoTrans} and @math{C = \alpha A^T A + \beta C} when +@var{Trans} is @code{CblasTrans}. Since the matrix @var{C} is symmetric +only its upper half or lower half need to be stored. When @var{Uplo} is +@code{CblasUpper} then the upper triangle and diagonal of @var{C} are +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +and diagonal of @var{C} are used. +@end deftypefun + +@deftypefun int gsl_blas_cherk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, float @var{alpha}, const gsl_matrix_complex_float * @var{A}, float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zherk (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, double @var{alpha}, const gsl_matrix_complex * @var{A}, double @var{beta}, gsl_matrix_complex * @var{C}) +@cindex HERK, Level-3 BLAS +These functions compute a rank-k update of the hermitian matrix @var{C}, +@math{C = \alpha A A^H + \beta C} when @var{Trans} is +@code{CblasNoTrans} and @math{C = \alpha A^H A + \beta C} when +@var{Trans} is @code{CblasConjTrans}. Since the matrix @var{C} is hermitian +only its upper half or lower half need to be stored. When @var{Uplo} is +@code{CblasUpper} then the upper triangle and diagonal of @var{C} are +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +and diagonal of @var{C} are used. The imaginary elements of the +diagonal are automatically set to zero. +@end deftypefun + +@deftypefun int gsl_blas_ssyr2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_matrix_float * @var{B}, float @var{beta}, gsl_matrix_float * @var{C}) +@deftypefunx int gsl_blas_dsyr2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_matrix * @var{B}, double @var{beta}, gsl_matrix * @var{C}) +@deftypefunx int gsl_blas_csyr2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_matrix_complex_float * @var{B}, const gsl_complex_float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zsyr2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{B}, const gsl_complex @var{beta}, gsl_matrix_complex * @var{C}) +@cindex SYR2K, Level-3 BLAS +These functions compute a rank-2k update of the symmetric matrix @var{C}, +@math{C = \alpha A B^T + \alpha B A^T + \beta C} when @var{Trans} is +@code{CblasNoTrans} and @math{C = \alpha A^T B + \alpha B^T A + \beta C} when +@var{Trans} is @code{CblasTrans}. Since the matrix @var{C} is symmetric +only its upper half or lower half need to be stored. When @var{Uplo} is +@code{CblasUpper} then the upper triangle and diagonal of @var{C} are +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +and diagonal of @var{C} are used. +@end deftypefun + +@deftypefun int gsl_blas_cher2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_matrix_complex_float * @var{B}, float @var{beta}, gsl_matrix_complex_float * @var{C}) +@deftypefunx int gsl_blas_zher2k (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{Trans}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{B}, double @var{beta}, gsl_matrix_complex * @var{C}) +@cindex HER2K, Level-3 BLAS +These functions compute a rank-2k update of the hermitian matrix @var{C}, +@math{C = \alpha A B^H + \alpha^* B A^H + \beta C} when @var{Trans} is +@code{CblasNoTrans} and @math{C = \alpha A^H B + \alpha^* B^H A + \beta C} when +@var{Trans} is @code{CblasConjTrans}. Since the matrix @var{C} is hermitian +only its upper half or lower half need to be stored. When @var{Uplo} is +@code{CblasUpper} then the upper triangle and diagonal of @var{C} are +used, and when @var{Uplo} is @code{CblasLower} then the lower triangle +and diagonal of @var{C} are used. The imaginary elements of the +diagonal are automatically set to zero. +@end deftypefun + +@node BLAS Examples +@section Examples + +The following program computes the product of two matrices using the +Level-3 @sc{blas} function @sc{dgemm}, +@tex +\beforedisplay +$$ +\left( +\matrix{0.11&0.12&0.13\cr +0.21&0.22&0.23\cr} +\right) +\left( +\matrix{1011&1012\cr +1021&1022\cr +1031&1031\cr} +\right) += +\left( +\matrix{367.76&368.12\cr +674.06&674.72\cr} +\right) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +[ 0.11 0.12 0.13 ] [ 1011 1012 ] [ 367.76 368.12 ] +[ 0.21 0.22 0.23 ] [ 1021 1022 ] = [ 674.06 674.72 ] + [ 1031 1032 ] +@end example + +@end ifinfo +@noindent +The matrices are stored in row major order, according to the C convention +for arrays. + +@example +@verbatiminclude examples/blas.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out +@verbatiminclude examples/blas.out +@end example + +@node BLAS References and Further Reading +@section References and Further Reading + +Information on the @sc{blas} standards, including both the legacy and +updated interface standards, is available online from the @sc{blas} +Homepage and @sc{blas} Technical Forum web-site. + +@itemize @w{} +@item +@cite{BLAS Homepage} @* +@uref{http://www.netlib.org/blas/} +@item +@cite{BLAS Technical Forum} @* +@uref{http://www.netlib.org/blas/blast-forum/} +@end itemize + +@noindent +The following papers contain the specifications for Level 1, Level 2 and +Level 3 @sc{blas}. + +@itemize @w{} +@item +C. Lawson, R. Hanson, D. Kincaid, F. Krogh, ``Basic Linear Algebra +Subprograms for Fortran Usage'', @cite{ACM Transactions on Mathematical +Software}, Vol.@: 5 (1979), Pages 308--325. + +@item +J.J. Dongarra, J. DuCroz, S. Hammarling, R. Hanson, ``An Extended Set of +Fortran Basic Linear Algebra Subprograms'', @cite{ACM Transactions on +Mathematical Software}, Vol.@: 14, No.@: 1 (1988), Pages 1--32. + +@item +J.J. Dongarra, I. Duff, J. DuCroz, S. Hammarling, ``A Set of +Level 3 Basic Linear Algebra Subprograms'', @cite{ACM Transactions on +Mathematical Software}, Vol.@: 16 (1990), Pages 1--28. +@end itemize + +@noindent +Postscript versions of the latter two papers are available from +@uref{http://www.netlib.org/blas/}. A @sc{cblas} wrapper for Fortran @sc{blas} +libraries is available from the same location. diff --git a/software/gsl-1.15/doc/bspline.eps b/software/gsl-1.15/doc/bspline.eps new file mode 100644 index 000000000..daf235a91 --- /dev/null +++ b/software/gsl-1.15/doc/bspline.eps @@ -0,0 +1,6930 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.2 +%%Title: PostScript plot +%%CreationDate: Fri Nov 2 13:18:54 2007 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 60 174 480 570 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.1 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.1 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 60 174 480 570 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 128.156 214.1855 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 174.236 214.1855 ] concat +%I +[ +(2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3226 9216 +3226 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3226 2304 +3226 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 220.316 214.1855 ] concat +%I +[ +(4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4147 9216 +4147 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4147 2304 +4147 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 266.396 214.1855 ] concat +%I +[ +(6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 312.476 214.1855 ] concat +%I +[ +(8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5990 9216 +5990 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5990 2304 +5990 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 353.5119 214.1855 ] concat +%I +[ +(10) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 399.5919 214.1855 ] concat +%I +[ +(12) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 445.6719 214.1855 ] concat +%I +[ +(14) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8755 9216 +8755 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8755 2304 +8755 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2765 9216 +2765 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2765 2304 +2765 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3226 9216 +3226 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3226 2304 +3226 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4147 9216 +4147 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4147 2304 +4147 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5530 9216 +5530 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5530 2304 +5530 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5990 9216 +5990 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5990 2304 +5990 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7373 9216 +7373 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7373 2304 +7373 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8294 9216 +8294 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8294 2304 +8294 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8755 9216 +8755 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8755 2304 +8755 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 92.19974 229.8568 ] concat +%I +[ +(-1.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 92.19974 304.9872 ] concat +%I +[ +(-0.5) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3807 +9078 3807 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3807 +2442 3807 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 380.1176 ] concat +%I +[ +(0.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5309 +9078 5309 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5309 +2442 5309 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 455.2481 ] concat +%I +[ +(0.5) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6812 +9078 6812 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6812 +2442 6812 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 530.3785 ] concat +%I +[ +(1.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8314 +9078 8314 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8314 +2442 8314 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2605 +9161 2605 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2605 +2359 2605 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2905 +9161 2905 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2905 +2359 2905 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3206 +9161 3206 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3206 +2359 3206 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3506 +9161 3506 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3506 +2359 3506 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3807 +9161 3807 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3807 +2359 3807 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4107 +9161 4107 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4107 +2359 4107 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4408 +9161 4408 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4408 +2359 4408 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4708 +9161 4708 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4708 +2359 4708 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5009 +9161 5009 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5009 +2359 5009 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5309 +9161 5309 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5309 +2359 5309 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5610 +9161 5610 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5610 +2359 5610 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5910 +9161 5910 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5910 +2359 5910 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6211 +9161 6211 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6211 +2359 6211 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6511 +9161 6511 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6511 +2359 6511 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6812 +9161 6812 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6812 +2359 6812 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7112 +9161 7112 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7112 +2359 7112 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7413 +9161 7413 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7413 +2359 7413 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7713 +9161 7713 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7713 +2359 7713 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8014 +9161 8014 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8014 +2359 8014 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8314 +9161 8314 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8314 +2359 8314 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8615 +9161 8615 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8615 +2359 8615 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8915 +9161 8915 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8915 +2359 8915 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 34952 +1 0 0 [ 1.48 4.43 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5309 +9216 5309 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 301.464 191.5487 ] concat +%I +[ +(x) +] Text +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 6.123234e-17 1 -1 6.123234e-17 64.69371 391.464 ] concat +%I +[ +(y) +] Text +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 8355 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2339 8257 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2373 8726 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2408 8382 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2443 8371 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2478 7656 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2512 7274 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2547 7605 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2582 7630 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2617 7691 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2651 7338 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2686 6935 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2721 6893 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2756 6855 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2790 6753 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2825 6390 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2860 6199 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2894 6064 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2929 5829 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2964 5639 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2999 5483 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3033 5279 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3068 5093 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3103 4937 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3138 4752 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3172 4536 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3207 4368 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3242 4294 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3277 4077 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3311 3710 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3346 3814 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3381 3703 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3415 3573 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3450 3923 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3485 3250 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3520 3295 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3554 3272 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3589 3023 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3624 2796 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3659 3201 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3693 2843 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3728 2711 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3763 3280 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3798 3283 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3832 2745 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3867 3422 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3902 2947 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3936 3099 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3971 3519 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4006 3594 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4041 3431 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4075 3791 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4110 3869 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4145 3878 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4180 4047 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4214 4234 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4249 4254 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4284 4518 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4319 4612 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4353 4884 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4388 4957 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4423 5085 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4457 5236 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4492 5373 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4527 5488 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4562 5710 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4596 5803 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4631 6002 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4666 6082 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4701 6098 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4735 6382 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4770 6272 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4805 6543 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4840 6442 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4874 6608 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4909 6895 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4944 6807 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4978 7300 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5013 7121 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5048 7153 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5083 7007 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5117 6747 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5152 6974 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5187 6989 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5222 6529 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5256 6784 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5291 6517 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5326 6660 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5361 6696 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5395 6594 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5430 6672 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5465 6528 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5499 6304 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5534 6318 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5569 6338 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5604 6356 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5638 6312 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5673 6064 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5708 5967 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5743 5923 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5777 5774 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5812 5628 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5847 5549 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5882 5459 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5916 5334 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5951 5230 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5986 5140 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6021 5064 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6055 4985 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6090 4859 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6125 4671 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6159 4756 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6194 4667 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6229 4531 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6264 4437 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6298 4176 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6333 4301 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6368 4248 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6403 4321 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6437 4018 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6472 4221 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6507 3938 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6542 4095 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6576 4252 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6611 4099 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6646 4177 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6680 4045 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6715 4018 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6750 4104 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6785 4266 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6819 4199 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6854 4365 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6889 4399 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6924 4330 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6958 4439 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6993 4551 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7028 4543 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7063 4677 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7097 4713 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7132 4761 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7167 4734 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7201 4961 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7236 5032 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7271 5051 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7306 5145 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7340 5241 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7375 5319 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7410 5392 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7445 5428 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7479 5515 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7514 5605 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7549 5671 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7584 5729 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7618 5800 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7653 5888 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7688 5862 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7722 5946 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7757 5983 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7792 6033 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7827 6170 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7861 5989 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7896 6199 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7931 6052 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7966 6206 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8000 6191 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8035 6193 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8070 6229 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8105 6143 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8139 6168 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8174 6220 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8209 6082 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8243 6040 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8278 5967 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8313 6104 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8348 5976 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8382 5899 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8417 5996 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8452 5780 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8487 5888 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8521 5780 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8556 5743 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8591 5754 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8626 5663 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8660 5558 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8695 5498 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8730 5432 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8764 5389 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8799 5340 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8834 5287 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8869 5221 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8903 5180 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8938 5136 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8973 5095 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9008 5015 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9042 4917 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9077 4909 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9112 4914 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9147 4849 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9181 4839 10 Circ +End + +Begin %I Circ +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +9216 4819 10 Circ +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 151 +2304 8375 +2350 8317 +2396 8230 +2442 8114 +2488 7974 +2534 7812 +2580 7629 +2627 7429 +2673 7213 +2719 6985 +2765 6747 +2811 6500 +2857 6249 +2903 5994 +2949 5739 +2995 5486 +3041 5237 +3087 4996 +3133 4763 +3180 4539 +3226 4327 +3272 4127 +3318 3940 +3364 3768 +3410 3611 +3456 3470 +3502 3347 +3548 3242 +3594 3158 +3640 3094 +3686 3052 +3732 3033 +3779 3038 +3825 3069 +3871 3125 +3917 3207 +3963 3311 +4009 3436 +4055 3579 +4101 3737 +4147 3909 +4193 4091 +4239 4283 +4285 4480 +4332 4682 +4378 4884 +4424 5087 +4470 5285 +4516 5479 +4562 5664 +4608 5839 +4654 6002 +4700 6152 +4746 6289 +4792 6413 +4838 6523 +4884 6620 +4931 6704 +4977 6773 +5023 6828 +5069 6869 +5115 6896 +5161 6908 +5207 6905 +5253 6887 +5299 6854 +5345 6805 +5391 6742 +5437 6663 +5484 6570 +5530 6466 +5576 6351 +5622 6227 +5668 6097 +5714 5960 +5760 5820 +5806 5677 +5852 5533 +5898 5390 +5944 5249 +5990 5113 +6036 4981 +6083 4857 +6129 4741 +6175 4636 +6221 4541 +6267 4457 +6313 4384 +6359 4321 +6405 4268 +6451 4226 +6497 4195 +6543 4174 +6589 4163 +6636 4162 +6682 4172 +6728 4191 +6774 4221 +6820 4261 +6866 4310 +6912 4370 +6958 4439 +7004 4517 +7050 4603 +7096 4694 +7142 4791 +7188 4892 +7235 4996 +7281 5102 +7327 5208 +7373 5313 +7419 5416 +7465 5517 +7511 5613 +7557 5704 +7603 5789 +7649 5865 +7695 5933 +7741 5992 +7788 6041 +7834 6081 +7880 6112 +7926 6135 +7972 6150 +8018 6156 +8064 6155 +8110 6146 +8156 6130 +8202 6108 +8248 6078 +8294 6042 +8340 6000 +8387 5952 +8433 5898 +8479 5839 +8525 5775 +8571 5707 +8617 5636 +8663 5563 +8709 5488 +8755 5413 +8801 5337 +8847 5263 +8893 5190 +8940 5121 +8986 5054 +9032 4992 +9078 4935 +9124 4884 +9170 4840 +9216 4803 +151 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/bspline.texi b/software/gsl-1.15/doc/bspline.texi new file mode 100644 index 000000000..ab75aa102 --- /dev/null +++ b/software/gsl-1.15/doc/bspline.texi @@ -0,0 +1,271 @@ +@cindex basis splines, B-splines +@cindex splines, basis + +This chapter describes functions for the computation of smoothing +basis splines (B-splines). A smoothing spline differs from an +interpolating spline in that the resulting curve is not required to +pass through each datapoint. @xref{Interpolation}, for information +about interpolating splines. + +The header file @file{gsl_bspline.h} contains the prototypes for the +bspline functions and related declarations. + +@menu +* Overview of B-splines:: +* Initializing the B-splines solver:: +* Constructing the knots vector:: +* Evaluation of B-spline basis functions:: +* Evaluation of B-spline basis function derivatives:: +* Obtaining Greville abscissae for B-spline basis functions:: +* Example programs for B-splines:: +* References and Further Reading:: +@end menu + +@node Overview of B-splines +@section Overview +@cindex basis splines, overview + +B-splines are commonly used as basis functions to fit smoothing +curves to large data sets. To do this, the abscissa axis is +broken up into some number of intervals, where the endpoints +of each interval are called @dfn{breakpoints}. These breakpoints +are then converted to @dfn{knots} by imposing various continuity +and smoothness conditions at each interface. Given a nondecreasing +knot vector +@c{$t = \{t_0, t_1, \dots, t_{n+k-1}\}$} +@math{t = @{t_0, t_1, @dots{}, t_@{n+k-1@}@}}, +the @math{n} basis splines of order @math{k} are defined by +@tex +\beforedisplay +$$ +B_{i,1}(x) = \left\{\matrix{1, & t_i \le x < t_{i+1}\cr + 0, & else}\right. +$$ +$$ +B_{i,k}(x) = {(x - t_i) \over (t_{i+k-1} - t_i)} B_{i,k-1}(x) + + {(t_{i+k} - x) \over (t_{i+k} - t_{i+1})} B_{i+1,k-1}(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +B_(i,1)(x) = (1, t_i <= x < t_(i+1) + (0, else +B_(i,k)(x) = [(x - t_i)/(t_(i+k-1) - t_i)] B_(i,k-1)(x) + + [(t_(i+k) - x)/(t_(i+k) - t_(i+1))] B_(i+1,k-1)(x) +@end example + +@end ifinfo +@noindent +for @math{i = 0, @dots{}, n-1}. The common case of cubic B-splines +is given by @math{k = 4}. The above recurrence relation can be +evaluated in a numerically stable way by the de Boor algorithm. + +If we define appropriate knots on an interval @math{[a,b]} then +the B-spline basis functions form a complete set on that interval. +Therefore we can expand a smoothing function as +@tex +\beforedisplay +$$ +f(x) = \sum_{i=0}^{n-1} c_i B_{i,k}(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(x) = \sum_i c_i B_(i,k)(x) +@end example + +@end ifinfo +@noindent +given enough @math{(x_j, f(x_j))} data pairs. The coefficients +@math{c_i} can be readily obtained from a least-squares fit. + +@node Initializing the B-splines solver +@section Initializing the B-splines solver +@cindex basis splines, initializing + +The computation of B-spline functions requires a preallocated +workspace of type @code{gsl_bspline_workspace}. If B-spline +derivatives are also required, an additional +@code{gsl_bspline_deriv_workspace} is needed. + +@deftypefun {gsl_bspline_workspace *} gsl_bspline_alloc (const size_t @var{k}, const size_t @var{nbreak}) +@tpindex gsl_bspline_workspace +This function allocates a workspace for computing B-splines of order +@var{k}. The number of breakpoints is given by @var{nbreak}. This +leads to @math{n = nbreak + k - 2} basis functions. Cubic B-splines +are specified by @math{k = 4}. The size of the workspace is +@math{O(5k + nbreak)}. +@end deftypefun + +@deftypefun void gsl_bspline_free (gsl_bspline_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun {gsl_bspline_deriv_workspace *} gsl_bspline_deriv_alloc (const size_t @var{k}) +@tpindex gsl_bspline_deriv_workspace +This function allocates a workspace for computing the derivatives of a +B-spline basis function of order @var{k}. The size of the workspace +is @math{O(2k^2)}. +@end deftypefun + +@deftypefun void gsl_bspline_deriv_free (gsl_bspline_deriv_workspace * @var{w}) +This function frees the memory associated with the derivative +workspace @var{w}. +@end deftypefun + +@node Constructing the knots vector +@section Constructing the knots vector +@cindex knots, basis splines + +@deftypefun int gsl_bspline_knots (const gsl_vector * @var{breakpts}, gsl_bspline_workspace * @var{w}) +This function computes the knots associated with the given breakpoints +and stores them internally in @code{w->knots}. +@end deftypefun + +@deftypefun int gsl_bspline_knots_uniform (const double @var{a}, const double @var{b}, gsl_bspline_workspace * @var{w}) +This function assumes uniformly spaced breakpoints on @math{[a,b]} +and constructs the corresponding knot vector using the previously +specified @var{nbreak} parameter. The knots are stored in +@code{w->knots}. +@end deftypefun + +@node Evaluation of B-spline basis functions +@section Evaluation of B-splines +@cindex basis splines, evaluation + +@deftypefun int gsl_bspline_eval (const double @var{x}, gsl_vector * @var{B}, gsl_bspline_workspace * @var{w}) +This function evaluates all B-spline basis functions at the position +@var{x} and stores them in the vector @var{B}, so that the @math{i}-th element +is @math{B_i(x)}. The vector @var{B} must be of length +@math{n = nbreak + k - 2}. This value may also be obtained by calling +@code{gsl_bspline_ncoeffs}. +Computing all the basis functions at once is more efficient than +computing them individually, due to the nature of the defining +recurrence relation. +@end deftypefun + +@deftypefun int gsl_bspline_eval_nonzero (const double @var{x}, gsl_vector * @var{Bk}, size_t * @var{istart}, size_t * @var{iend}, gsl_bspline_workspace * @var{w}) +This function evaluates all potentially nonzero B-spline basis +functions at the position @var{x} and stores them in the vector @var{Bk}, so +that the @math{i}-th element is @c{$B_{(istart+i)}(x)$} +@math{B_(istart+i)(x)}. +The last element of @var{Bk} is @c{$B_{iend}(x)$} +@math{B_(iend)(x)}. The vector @var{Bk} must be +of length @math{k}. By returning only the nonzero basis functions, +this function +allows quantities involving linear combinations of the @math{B_i(x)} +to be computed without unnecessary terms +(such linear combinations occur, for example, +when evaluating an interpolated function). +@end deftypefun + +@deftypefun size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * @var{w}) +This function returns the number of B-spline coefficients given by +@math{n = nbreak + k - 2}. +@end deftypefun + +@node Evaluation of B-spline basis function derivatives +@section Evaluation of B-spline derivatives +@cindex basis splines, derivatives + +@deftypefun int gsl_bspline_deriv_eval (const double @var{x}, const size_t @var{nderiv}, gsl_matrix * @var{dB}, gsl_bspline_workspace * @var{w}, gsl_bspline_deriv_workspace * @var{dw}) +This function evaluates all B-spline basis function derivatives of orders +@math{0} through @math{nderiv} (inclusive) at the position @var{x} +and stores them in the matrix @var{dB}. The @math{(i,j)}-th element of @var{dB} +is @math{d^jB_i(x)/dx^j}. The matrix @var{dB} must be +of size @math{n = nbreak + k - 2} by @math{nderiv + 1}. +The value @math{n} may also be obtained +by calling @code{gsl_bspline_ncoeffs}. Note that function evaluations +are included as the zeroth order derivatives in @var{dB}. +Computing all the basis function derivatives at once is more efficient +than computing them individually, due to the nature of the defining +recurrence relation. +@end deftypefun + +@deftypefun int gsl_bspline_deriv_eval_nonzero (const double @var{x}, const size_t @var{nderiv}, gsl_matrix * @var{dB}, size_t * @var{istart}, size_t * @var{iend}, gsl_bspline_workspace * @var{w}, gsl_bspline_deriv_workspace * @var{dw}) +This function evaluates all potentially nonzero B-spline basis function +derivatives of orders @math{0} through @math{nderiv} (inclusive) at +the position @var{x} and stores them in the matrix @var{dB}. The +@math{(i,j)}-th element of @var{dB} is @c{$d^jB_{(istart+i)}(x)/dx^j$} +@math{d^j/dx^j B_(istart+i)(x)}. The last row +of @var{dB} contains @c{$d^jB_{iend}(x)/dx^j$} +@math{d^j/dx^j B_(iend)(x)}. The matrix @var{dB} must be +of size @math{k} by at least @math{nderiv + 1}. Note that function +evaluations are included as the zeroth order derivatives in @var{dB}. +By returning only the nonzero basis functions, this function allows +quantities involving linear combinations of the @math{B_i(x)} and +their derivatives to be computed without unnecessary terms. +@end deftypefun + +@node Obtaining Greville abscissae for B-spline basis functions +@section Greville abscissae +@cindex basis splines, Greville abscissae + +The Greville abscissae are defined to be the mean location of @math{k-1} +consecutive knots in the knot vector for each basis spline function of order +@math{k}. Note that the first and last knots in the knot vector are excluded +when applying this definition; consequently there are +@code{gsl_bspline_ncoeffs} Greville abscissa. They are often used in B-spline +collocation applications and may also be called Marsden-Schoenberg points. + +The above definition is undefined for @math{k=1}. The implementation chooses +to return interval midpoints in the degenerate @math{k=1} case. + +@deftypefun double gsl_bspline_greville_abscissa (size_t @var{i}, gsl_bspline_workspace *@var{w}); +Returns the location of the @math{i}-th Greville abscissa for the given spline +basis. Here, @math{i = 0}, ..., @code{gsl_bspline_ncoeffs(w) - 1}. +@end deftypefun + +@node Example programs for B-splines +@section Examples +@cindex basis splines, examples + +The following program computes a linear least squares fit to data using +cubic B-spline basis functions with uniform breakpoints. The data is +generated from the curve @math{y(x) = \cos{(x)} \exp{(-x/10)}} on +the interval @math{[0, 15]} with Gaussian noise added. + +@example +@verbatiminclude examples/bspline.c +@end example + +The output can be plotted with @sc{gnu} @code{graph}. + +@example +$ ./a.out > bspline.dat +chisq/dof = 1.118217e+00, Rsq = 0.989771 +$ graph -T ps -X x -Y y -x 0 15 -y -1 1.3 < bspline.dat > bspline.ps +@end example + +@iftex +@sp 1 +@center @image{bspline,3.4in} +@end iftex + +@node References and Further Reading +@section References and Further Reading + +Further information on the algorithms described in this section can be +found in the following book, + +@itemize @w{} +C. de Boor, @cite{A Practical Guide to Splines} (1978), Springer-Verlag, +ISBN 0-387-90356-9. +@end itemize + +Further information of Greville abscissae and B-spline collocation +can be found in the following paper, + +@itemize @w{} +Richard W. Johnson, Higher order B-spline collocation at the Greville +abscissae. @cite{Applied Numerical Mathematics}. vol.@: 52, 2005, 63--75. +@end itemize + +@noindent +A large collection of B-spline routines is available in the +@sc{pppack} library available at @uref{http://www.netlib.org/pppack}, +which is also part of @sc{slatec}. diff --git a/software/gsl-1.15/doc/calc.sty b/software/gsl-1.15/doc/calc.sty new file mode 100644 index 000000000..086273e3a --- /dev/null +++ b/software/gsl-1.15/doc/calc.sty @@ -0,0 +1,150 @@ +%% +%% This is file `calc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% calc.dtx (with options: `package') + +%% File `calc.dtx'. +%% Copyright (C) 1992--1995 Kresten Krab Thorup and Frank Jensen. +%% All rights reserved. + +\def\fileversion{v4.0c (TEST)} +\def\filedate{1995/04/10} + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{calc}[\filedate\space\fileversion] +\typeout{Package: `calc' \fileversion\space <\filedate> (KKT and FJ)} +\def\calc@assign@generic#1#2#3#4{\let\calc@A#1\let\calc@B#2% + \expandafter\calc@open\expandafter(#4!% + \global\calc@A\calc@B\endgroup#3\calc@B} +\def\calc@assign@count{\calc@assign@generic\calc@Acount\calc@Bcount} +\def\calc@assign@dimen{\calc@assign@generic\calc@Adimen\calc@Bdimen} +\def\calc@assign@skip{\calc@assign@generic\calc@Askip\calc@Bskip} +\newcount\calc@Acount \newcount\calc@Bcount +\newdimen\calc@Adimen \newdimen\calc@Bdimen +\newskip\calc@Askip \newskip\calc@Bskip +\def\setcounter#1#2{\@ifundefined{c@#1}{\@nocounterr{#1}}% + {\calc@assign@count{\global\csname c@#1\endcsname}{#2}}} +\def\addtocounter#1#2{\@ifundefined{c@#1}{\@nocounterr{#1}}% + {\calc@assign@count{\global\advance\csname c@#1\endcsname}{#2}}} +\DeclareRobustCommand\setlength{\calc@assign@skip} +\DeclareRobustCommand\addtolength[1]{\calc@assign@skip{\advance#1}} +\def\calc@pre@scan#1{% + \ifx(#1% + \let\calc@next\calc@open + \else + \let\calc@next\calc@numeric + \fi + \calc@next#1} +\def\calc@open({\begingroup\aftergroup\calc@initB + \begingroup\aftergroup\calc@initB + \calc@pre@scan} +\def\calc@initB{\calc@B\calc@A} +\def\calc@numeric{\afterassignment\calc@post@scan \global\calc@A} +\def\calc@post@scan#1{% + \ifx#1!\let\calc@next\endgroup \else + \ifx#1+\let\calc@next\calc@add \else + \ifx#1-\let\calc@next\calc@subtract \else + \ifx#1*\let\calc@next\calc@multiplyx \else + \ifx#1/\let\calc@next\calc@dividex \else + \ifx#1)\let\calc@next\calc@close \else \calc@error#1% + \fi + \fi + \fi + \fi + \fi + \fi + \calc@next} +\def\calc@add{\calc@generic@add\calc@addAtoB} +\def\calc@subtract{\calc@generic@add\calc@subtractAfromB} +\def\calc@generic@add#1{\endgroup\global\calc@A\calc@B\endgroup + \begingroup\aftergroup#1\begingroup\aftergroup\calc@initB + \calc@pre@scan} +\def\calc@addAtoB{\advance\calc@B\calc@A} +\def\calc@subtractAfromB{\advance\calc@B-\calc@A} +\def\calc@multiplyx#1{\def\calc@tmp{#1}% + \ifx\calc@tmp\calc@ratio@x \let\calc@next\calc@ratio@multiply \else + \ifx\calc@tmp\calc@real@x \let\calc@next\calc@real@multiply \else + \let\calc@next\calc@multiply + \fi + \fi + \calc@next#1} +\def\calc@dividex#1{\def\calc@tmp{#1}% + \ifx\calc@tmp\calc@ratio@x \let\calc@next\calc@ratio@divide \else + \ifx\calc@tmp\calc@real@x \let\calc@next\calc@real@divide \else + \let\calc@next\calc@divide + \fi + \fi + \calc@next#1} +\def\calc@ratio@x{\ratio} +\def\calc@real@x{\real} +\def\calc@multiply{\calc@generic@multiply\calc@multiplyBbyA} +\def\calc@divide{\calc@generic@multiply\calc@divideBbyA} +\def\calc@generic@multiply#1{\endgroup\begingroup + \let\calc@A\calc@Acount \let\calc@B\calc@Bcount + \aftergroup#1\calc@pre@scan} +\def\calc@multiplyBbyA{\multiply\calc@B\calc@Acount} +\def\calc@divideBbyA{\divide\calc@B\calc@Acount} +\def\calc@close + {\endgroup\global\calc@A\calc@B + \endgroup\global\calc@A\calc@B + \calc@post@scan} +\def\calc@ratio@multiply\ratio{\calc@ratio@evaluate} +\def\calc@ratio@divide\ratio#1#2{\calc@ratio@evaluate{#2}{#1}} +\let\calc@numerator=\calc@Bcount +\newcount\calc@denominator +\def\calc@ratio@evaluate#1#2{% + \endgroup\begingroup + \calc@assign@dimen\calc@numerator{#1}% + \calc@assign@dimen\calc@denominator{#2}% + \gdef\calc@the@ratio{}% + \ifnum\calc@numerator<0 \calc@numerator-\calc@numerator + \gdef\calc@the@ratio{-}% + \fi + \ifnum\calc@denominator<0 \calc@denominator-\calc@denominator + \xdef\calc@the@ratio{\calc@the@ratio-}% + \fi + \calc@Acount\calc@numerator + \divide\calc@Acount\calc@denominator + \xdef\calc@the@ratio{\calc@the@ratio\number\calc@Acount.}% + \calc@next@digit \calc@next@digit \calc@next@digit + \calc@next@digit \calc@next@digit \calc@next@digit + \endgroup + \calc@multiply@by@real\calc@the@ratio + \begingroup + \calc@post@scan} +\def\calc@next@digit{% + \multiply\calc@Acount\calc@denominator + \advance\calc@numerator -\calc@Acount + \multiply\calc@numerator 10 + \calc@Acount\calc@numerator + \divide\calc@Acount\calc@denominator + \xdef\calc@the@ratio{\calc@the@ratio\number\calc@Acount}} +\def\calc@multiply@by@real#1{\calc@Bdimen #1\calc@B \calc@B\calc@Bdimen} +\def\calc@real@multiply\real#1{\endgroup + \calc@multiply@by@real{#1}\begingroup + \calc@post@scan} +\def\calc@real@divide\real#1{\calc@ratio@evaluate{1pt}{#1pt}} +\def\calc@error#1{% + \errhelp{Calc error: I expected to see one of: + - * / )}% + \errmessage{Invalid character `#1' in arithmetic expression}} +\endinput +%% +%% End of file `calc.sty'. diff --git a/software/gsl-1.15/doc/cblas.texi b/software/gsl-1.15/doc/cblas.texi new file mode 100644 index 000000000..05ae6e7ff --- /dev/null +++ b/software/gsl-1.15/doc/cblas.texi @@ -0,0 +1,514 @@ +@cindex Low-level CBLAS +@cindex CBLAS, Low-level interface +@cindex BLAS, Low-level C interface +@cindex Basic Linear Algebra Subroutines (BLAS) +The prototypes for the low-level @sc{cblas} functions are declared in +the file @file{gsl_cblas.h}. For the definition of the functions +consult the documentation available from Netlib (@pxref{BLAS References +and Further Reading}). + +@menu +* Level 1 CBLAS Functions:: +* Level 2 CBLAS Functions:: +* Level 3 CBLAS Functions:: +* GSL CBLAS Examples:: +@end menu + +@node Level 1 CBLAS Functions +@section Level 1 + +@deftypefun float cblas_sdsdot (const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun double cblas_dsdot (const int @var{N}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun float cblas_sdot (const int @var{N}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun double cblas_ddot (const int @var{N}, const double * @var{x}, const int @var{incx}, const double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_cdotu_sub (const int @var{N}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{dotu}) +@end deftypefun + +@deftypefun void cblas_cdotc_sub (const int @var{N}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{dotc}) +@end deftypefun + +@deftypefun void cblas_zdotu_sub (const int @var{N}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{dotu}) +@end deftypefun + +@deftypefun void cblas_zdotc_sub (const int @var{N}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{dotc}) +@end deftypefun + +@deftypefun float cblas_snrm2 (const int @var{N}, const float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun float cblas_sasum (const int @var{N}, const float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun double cblas_dnrm2 (const int @var{N}, const double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun double cblas_dasum (const int @var{N}, const double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun float cblas_scnrm2 (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun float cblas_scasum (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun double cblas_dznrm2 (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun double cblas_dzasum (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun CBLAS_INDEX cblas_isamax (const int @var{N}, const float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun CBLAS_INDEX cblas_idamax (const int @var{N}, const double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun CBLAS_INDEX cblas_icamax (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun CBLAS_INDEX cblas_izamax (const int @var{N}, const void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_sswap (const int @var{N}, float * @var{x}, const int @var{incx}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_scopy (const int @var{N}, const float * @var{x}, const int @var{incx}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_saxpy (const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dswap (const int @var{N}, double * @var{x}, const int @var{incx}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dcopy (const int @var{N}, const double * @var{x}, const int @var{incx}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_daxpy (const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_cswap (const int @var{N}, void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_ccopy (const int @var{N}, const void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_caxpy (const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zswap (const int @var{N}, void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zcopy (const int @var{N}, const void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zaxpy (const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_srotg (float * @var{a}, float * @var{b}, float * @var{c}, float * @var{s}) +@end deftypefun + +@deftypefun void cblas_srotmg (float * @var{d1}, float * @var{d2}, float * @var{b1}, const float @var{b2}, float * @var{P}) +@end deftypefun + +@deftypefun void cblas_srot (const int @var{N}, float * @var{x}, const int @var{incx}, float * @var{y}, const int @var{incy}, const float @var{c}, const float @var{s}) +@end deftypefun + +@deftypefun void cblas_srotm (const int @var{N}, float * @var{x}, const int @var{incx}, float * @var{y}, const int @var{incy}, const float * @var{P}) +@end deftypefun + +@deftypefun void cblas_drotg (double * @var{a}, double * @var{b}, double * @var{c}, double * @var{s}) +@end deftypefun + +@deftypefun void cblas_drotmg (double * @var{d1}, double * @var{d2}, double * @var{b1}, const double @var{b2}, double * @var{P}) +@end deftypefun + +@deftypefun void cblas_drot (const int @var{N}, double * @var{x}, const int @var{incx}, double * @var{y}, const int @var{incy}, const double @var{c}, const double @var{s}) +@end deftypefun + +@deftypefun void cblas_drotm (const int @var{N}, double * @var{x}, const int @var{incx}, double * @var{y}, const int @var{incy}, const double * @var{P}) +@end deftypefun + +@deftypefun void cblas_sscal (const int @var{N}, const float @var{alpha}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dscal (const int @var{N}, const double @var{alpha}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_cscal (const int @var{N}, const void * @var{alpha}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_zscal (const int @var{N}, const void * @var{alpha}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_csscal (const int @var{N}, const float @var{alpha}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_zdscal (const int @var{N}, const double @var{alpha}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@node Level 2 CBLAS Functions +@section Level 2 + +@deftypefun void cblas_sgemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{x}, const int @var{incx}, const float @var{beta}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_sgbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const int @var{KL}, const int @var{KU}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{x}, const int @var{incx}, const float @var{beta}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_strmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const float * @var{A}, const int @var{lda}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_stbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const float * @var{A}, const int @var{lda}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_stpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const float * @var{Ap}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_strsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const float * @var{A}, const int @var{lda}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_stbsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const float * @var{A}, const int @var{lda}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_stpsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const float * @var{Ap}, float * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dgemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{x}, const int @var{incx}, const double @var{beta}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dgbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const int @var{KL}, const int @var{KU}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{x}, const int @var{incx}, const double @var{beta}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dtrmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const double * @var{A}, const int @var{lda}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dtbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const double * @var{A}, const int @var{lda}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dtpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const double * @var{Ap}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dtrsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const double * @var{A}, const int @var{lda}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dtbsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const double * @var{A}, const int @var{lda}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_dtpsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const double * @var{Ap}, double * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_cgemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_cgbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const int @var{KL}, const int @var{KU}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_ctrmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ctbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ctpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{Ap}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ctrsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ctbsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ctpsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{Ap}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_zgemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zgbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_TRANSPOSE @var{TransA}, const int @var{M}, const int @var{N}, const int @var{KL}, const int @var{KU}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_ztrmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ztbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ztpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{Ap}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ztrsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ztbsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const int @var{K}, const void * @var{A}, const int @var{lda}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ztpsv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{N}, const void * @var{Ap}, void * @var{x}, const int @var{incx}) +@end deftypefun + +@deftypefun void cblas_ssymv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{x}, const int @var{incx}, const float @var{beta}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_ssbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const int @var{K}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{x}, const int @var{incx}, const float @var{beta}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_sspmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{Ap}, const float * @var{x}, const int @var{incx}, const float @var{beta}, float * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_sger (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}, float * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_ssyr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, float * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_sspr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, float * @var{Ap}) +@end deftypefun + +@deftypefun void cblas_ssyr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}, float * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_sspr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const float * @var{x}, const int @var{incx}, const float * @var{y}, const int @var{incy}, float * @var{A}) +@end deftypefun + +@deftypefun void cblas_dsymv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{x}, const int @var{incx}, const double @var{beta}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dsbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const int @var{K}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{x}, const int @var{incx}, const double @var{beta}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dspmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{Ap}, const double * @var{x}, const int @var{incx}, const double @var{beta}, double * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_dger (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, const double * @var{y}, const int @var{incy}, double * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_dsyr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, double * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_dspr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, double * @var{Ap}) +@end deftypefun + +@deftypefun void cblas_dsyr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, const double * @var{y}, const int @var{incy}, double * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_dspr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const double * @var{x}, const int @var{incx}, const double * @var{y}, const int @var{incy}, double * @var{A}) +@end deftypefun + +@deftypefun void cblas_chemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_chbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_chpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{Ap}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_cgeru (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_cgerc (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_cher (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_chpr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const float @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{A}) +@end deftypefun + +@deftypefun void cblas_cher2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_chpr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{Ap}) +@end deftypefun + +@deftypefun void cblas_zhemv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zhbmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zhpmv (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{Ap}, const void * @var{x}, const int @var{incx}, const void * @var{beta}, void * @var{y}, const int @var{incy}) +@end deftypefun + +@deftypefun void cblas_zgeru (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_zgerc (const enum CBLAS_ORDER @var{order}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_zher (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_zhpr (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const double @var{alpha}, const void * @var{x}, const int @var{incx}, void * @var{A}) +@end deftypefun + +@deftypefun void cblas_zher2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{A}, const int @var{lda}) +@end deftypefun + +@deftypefun void cblas_zhpr2 (const enum CBLAS_ORDER @var{order}, const enum CBLAS_UPLO @var{Uplo}, const int @var{N}, const void * @var{alpha}, const void * @var{x}, const int @var{incx}, const void * @var{y}, const int @var{incy}, void * @var{Ap}) +@end deftypefun + +@node Level 3 CBLAS Functions +@section Level 3 + + +@deftypefun void cblas_sgemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_TRANSPOSE @var{TransB}, const int @var{M}, const int @var{N}, const int @var{K}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{B}, const int @var{ldb}, const float @var{beta}, float * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_ssymm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{B}, const int @var{ldb}, const float @var{beta}, float * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_ssyrk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float @var{beta}, float * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_ssyr2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, const float * @var{B}, const int @var{ldb}, const float @var{beta}, float * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_strmm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, float * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_strsm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const float @var{alpha}, const float * @var{A}, const int @var{lda}, float * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_dgemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_TRANSPOSE @var{TransB}, const int @var{M}, const int @var{N}, const int @var{K}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{B}, const int @var{ldb}, const double @var{beta}, double * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_dsymm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{B}, const int @var{ldb}, const double @var{beta}, double * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_dsyrk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double @var{beta}, double * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_dsyr2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, const double * @var{B}, const int @var{ldb}, const double @var{beta}, double * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_dtrmm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, double * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_dtrsm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const double @var{alpha}, const double * @var{A}, const int @var{lda}, double * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_cgemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_TRANSPOSE @var{TransB}, const int @var{M}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_csymm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_csyrk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_csyr2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_ctrmm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, void * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_ctrsm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, void * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_zgemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_TRANSPOSE @var{TransB}, const int @var{M}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zsymm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zsyrk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zsyr2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_ztrmm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, void * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_ztrsm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{TransA}, const enum CBLAS_DIAG @var{Diag}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, void * @var{B}, const int @var{ldb}) +@end deftypefun + +@deftypefun void cblas_chemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_cherk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const float @var{alpha}, const void * @var{A}, const int @var{lda}, const float @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_cher2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const float @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zhemm (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_SIDE @var{Side}, const enum CBLAS_UPLO @var{Uplo}, const int @var{M}, const int @var{N}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const void * @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zherk (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const double @var{alpha}, const void * @var{A}, const int @var{lda}, const double @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_zher2k (const enum CBLAS_ORDER @var{Order}, const enum CBLAS_UPLO @var{Uplo}, const enum CBLAS_TRANSPOSE @var{Trans}, const int @var{N}, const int @var{K}, const void * @var{alpha}, const void * @var{A}, const int @var{lda}, const void * @var{B}, const int @var{ldb}, const double @var{beta}, void * @var{C}, const int @var{ldc}) +@end deftypefun + +@deftypefun void cblas_xerbla (int @var{p}, const char * @var{rout}, const char * @var{form}, ...) +@end deftypefun + +@node GSL CBLAS Examples +@section Examples + +The following program computes the product of two matrices using the +Level-3 @sc{blas} function @sc{sgemm}, +@tex +\beforedisplay +$$ +\left( +\matrix{0.11&0.12&0.13\cr +0.21&0.22&0.23\cr} +\right) +\left( +\matrix{1011&1012\cr +1021&1022\cr +1031&1032\cr} +\right) += +\left( +\matrix{367.76&368.12\cr +674.06&674.72\cr} +\right) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +[ 0.11 0.12 0.13 ] [ 1011 1012 ] [ 367.76 368.12 ] +[ 0.21 0.22 0.23 ] [ 1021 1022 ] = [ 674.06 674.72 ] + [ 1031 1032 ] +@end example + +@end ifinfo +@noindent +The matrices are stored in row major order but could be stored in column +major order if the first argument of the call to @code{cblas_sgemm} was +changed to @code{CblasColMajor}. + +@example +@verbatiminclude examples/cblas.c +@end example + +@noindent +To compile the program use the following command line, + +@example +$ gcc -Wall demo.c -lgslcblas +@end example + +@noindent +There is no need to link with the main library @code{-lgsl} in this +case as the @sc{cblas} library is an independent unit. Here is the output +from the program, + +@example +$ ./a.out +@verbatiminclude examples/cblas.out +@end example diff --git a/software/gsl-1.15/doc/cheb.eps b/software/gsl-1.15/doc/cheb.eps new file mode 100644 index 000000000..6e868afda --- /dev/null +++ b/software/gsl-1.15/doc/cheb.eps @@ -0,0 +1,3348 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: cheb.eps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Wed Apr 25 18:48:58 2001 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 410 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +420 280 M +63 0 V +6549 0 R +-63 0 V +336 280 M +(0) Rshow +420 1198 M +63 0 V +6549 0 R +-63 0 V +-6633 0 R +(0.2) Rshow +420 2117 M +63 0 V +6549 0 R +-63 0 V +-6633 0 R +(0.4) Rshow +420 3035 M +63 0 V +6549 0 R +-63 0 V +-6633 0 R +(0.6) Rshow +420 3954 M +63 0 V +6549 0 R +-63 0 V +-6633 0 R +(0.8) Rshow +420 4872 M +63 0 V +6549 0 R +-63 0 V +-6633 0 R +(1) Rshow +420 280 M +0 63 V +0 4529 R +0 -63 V +420 140 M +(0) Cshow +1742 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.2) Cshow +3065 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.4) Cshow +4387 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.6) Cshow +5710 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.8) Cshow +7032 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(1) Cshow +1.000 UL +LTb +420 280 M +6612 0 V +0 4592 V +-6612 0 V +420 280 L +1.000 UL +LT0 +420 1428 M +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +currentpoint stroke M +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 2296 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +currentpoint stroke M +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +1.000 UL +LT1 +420 1331 M +7 20 V +6 19 V +7 17 V +6 16 V +7 15 V +7 14 V +6 12 V +7 12 V +7 10 V +6 10 V +7 8 V +6 8 V +7 7 V +7 6 V +6 5 V +7 5 V +6 3 V +7 4 V +7 2 V +6 2 V +7 1 V +6 1 V +7 1 V +7 -1 V +6 0 V +7 -1 V +7 -2 V +6 -1 V +7 -3 V +6 -2 V +7 -3 V +7 -3 V +6 -3 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +6 -5 V +7 -5 V +7 -4 V +6 -5 V +7 -5 V +7 -5 V +6 -5 V +7 -5 V +6 -5 V +7 -5 V +7 -5 V +6 -5 V +7 -5 V +6 -5 V +7 -5 V +7 -5 V +6 -5 V +7 -4 V +6 -5 V +7 -4 V +7 -5 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +6 -4 V +7 -4 V +7 -3 V +6 -4 V +7 -3 V +6 -3 V +7 -3 V +7 -2 V +6 -3 V +7 -3 V +7 -2 V +6 -2 V +7 -2 V +6 -2 V +7 -2 V +7 -1 V +6 -1 V +7 -2 V +6 -1 V +7 -1 V +7 0 V +6 -1 V +7 -1 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +7 1 V +6 0 V +7 1 V +6 1 V +7 1 V +7 1 V +6 1 V +7 2 V +6 1 V +7 2 V +7 2 V +6 2 V +7 1 V +6 3 V +7 2 V +7 2 V +6 2 V +7 3 V +7 3 V +6 2 V +7 3 V +6 3 V +7 3 V +7 3 V +6 3 V +7 3 V +6 3 V +7 4 V +7 3 V +6 3 V +7 4 V +7 3 V +6 4 V +7 3 V +6 4 V +7 4 V +7 3 V +6 4 V +7 4 V +6 4 V +7 4 V +7 3 V +6 4 V +7 4 V +6 4 V +7 4 V +7 4 V +6 3 V +7 4 V +7 4 V +6 4 V +7 4 V +6 3 V +7 4 V +7 4 V +6 3 V +7 4 V +6 4 V +7 3 V +7 4 V +6 3 V +7 4 V +6 3 V +7 3 V +7 4 V +6 3 V +7 3 V +7 3 V +6 3 V +7 3 V +6 3 V +7 3 V +7 3 V +6 3 V +7 2 V +6 3 V +7 2 V +7 3 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 1 V +7 2 V +6 1 V +7 2 V +7 1 V +6 1 V +7 1 V +6 1 V +7 1 V +7 1 V +6 0 V +7 1 V +7 1 V +6 0 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 -1 V +7 0 V +6 -1 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 -2 V +7 -1 V +6 -2 V +7 -1 V +7 -2 V +6 -2 V +7 -2 V +6 -2 V +7 -2 V +7 -3 V +6 -2 V +7 -2 V +6 -3 V +7 -2 V +7 -3 V +6 -3 V +7 -3 V +7 -2 V +6 -3 V +7 -3 V +6 -4 V +7 -3 V +7 -3 V +6 -3 V +7 -4 V +6 -3 V +7 -4 V +7 -3 V +6 -4 V +7 -4 V +6 -3 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -5 V +7 -4 V +6 -4 V +7 -4 V +7 -5 V +6 -4 V +7 -4 V +7 -5 V +6 -4 V +7 -5 V +6 -4 V +7 -4 V +7 -5 V +6 -4 V +7 -5 V +6 -4 V +7 -5 V +7 -4 V +6 -4 V +7 -5 V +6 -4 V +7 -5 V +7 -4 V +6 -4 V +7 -5 V +7 -4 V +6 -4 V +7 -5 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -4 V +6 -4 V +7 -4 V +7 -3 V +6 -4 V +7 -4 V +7 -3 V +6 -4 V +7 -3 V +6 -3 V +7 -4 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -2 V +6 -3 V +7 -3 V +6 -2 V +7 -3 V +7 -2 V +6 -2 V +7 -2 V +7 -3 V +6 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -1 V +6 -2 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 0 V +7 0 V +6 -1 V +7 0 V +7 0 V +6 0 V +7 0 V +6 1 V +7 0 V +7 1 V +6 1 V +7 0 V +6 1 V +7 2 V +7 1 V +6 1 V +7 2 V +7 2 V +6 1 V +7 2 V +6 2 V +7 3 V +7 2 V +6 3 V +7 2 V +6 3 V +7 3 V +7 3 V +6 3 V +7 4 V +6 3 V +7 4 V +7 4 V +6 4 V +7 4 V +7 4 V +6 5 V +7 4 V +6 5 V +7 5 V +7 5 V +6 5 V +7 5 V +6 6 V +7 5 V +7 6 V +6 6 V +7 6 V +7 6 V +6 6 V +7 7 V +6 6 V +7 7 V +7 7 V +6 7 V +7 7 V +6 8 V +7 7 V +7 8 V +6 8 V +7 7 V +6 8 V +7 9 V +7 8 V +6 8 V +7 9 V +7 9 V +6 9 V +7 9 V +6 9 V +7 9 V +7 9 V +6 10 V +currentpoint stroke M +7 10 V +6 9 V +7 10 V +7 10 V +6 11 V +7 10 V +6 10 V +7 11 V +7 11 V +6 10 V +7 11 V +7 11 V +6 11 V +7 12 V +6 11 V +7 12 V +7 11 V +6 12 V +7 12 V +6 12 V +7 12 V +7 12 V +6 12 V +7 12 V +6 13 V +7 12 V +7 13 V +6 13 V +7 12 V +7 13 V +6 13 V +7 13 V +6 13 V +7 14 V +7 13 V +6 13 V +7 14 V +6 13 V +7 14 V +7 14 V +6 14 V +7 13 V +7 14 V +6 14 V +7 14 V +6 14 V +7 15 V +7 14 V +6 14 V +7 14 V +6 15 V +7 14 V +7 15 V +6 14 V +7 15 V +6 14 V +7 15 V +7 15 V +6 14 V +7 15 V +7 15 V +6 15 V +7 15 V +6 14 V +7 15 V +7 15 V +6 15 V +7 15 V +6 15 V +7 15 V +7 15 V +6 15 V +7 15 V +6 15 V +7 15 V +7 15 V +6 15 V +7 15 V +7 15 V +6 15 V +7 15 V +6 15 V +7 15 V +7 15 V +6 15 V +7 15 V +6 15 V +7 15 V +7 14 V +6 15 V +7 15 V +6 15 V +7 15 V +7 14 V +6 15 V +7 15 V +7 14 V +6 15 V +7 14 V +6 15 V +7 14 V +7 14 V +6 15 V +7 14 V +6 14 V +7 14 V +7 14 V +6 14 V +7 14 V +7 14 V +6 14 V +7 14 V +6 13 V +7 14 V +7 14 V +6 13 V +7 14 V +6 13 V +7 13 V +7 13 V +6 13 V +7 13 V +6 13 V +7 13 V +7 13 V +6 13 V +7 12 V +7 13 V +6 12 V +7 12 V +6 13 V +7 12 V +7 12 V +6 12 V +7 11 V +6 12 V +7 12 V +7 11 V +6 12 V +7 11 V +6 11 V +7 11 V +7 11 V +6 11 V +7 11 V +7 10 V +6 11 V +7 10 V +6 11 V +7 10 V +7 10 V +6 10 V +7 10 V +6 9 V +7 10 V +7 9 V +6 10 V +7 9 V +6 9 V +7 9 V +7 9 V +6 9 V +7 8 V +7 9 V +6 8 V +7 8 V +6 8 V +7 8 V +7 8 V +6 8 V +7 8 V +6 7 V +7 7 V +7 8 V +6 7 V +7 7 V +7 7 V +6 6 V +7 7 V +6 6 V +7 7 V +7 6 V +6 6 V +7 6 V +6 6 V +7 5 V +7 6 V +6 5 V +7 6 V +6 5 V +7 5 V +7 5 V +6 4 V +7 5 V +7 5 V +6 4 V +7 4 V +6 5 V +7 4 V +7 3 V +6 4 V +7 4 V +6 3 V +7 4 V +7 3 V +6 3 V +7 3 V +6 3 V +7 3 V +7 3 V +6 2 V +7 3 V +7 2 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 1 V +6 2 V +7 1 V +7 1 V +6 1 V +7 1 V +7 1 V +6 1 V +7 1 V +6 0 V +7 1 V +7 0 V +6 1 V +7 0 V +6 0 V +7 0 V +7 0 V +6 0 V +7 0 V +6 -1 V +7 0 V +7 -1 V +6 0 V +7 -1 V +7 -1 V +6 -1 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 -2 V +6 -1 V +7 -1 V +7 -2 V +6 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -1 V +6 -2 V +7 -2 V +7 -2 V +6 -2 V +7 -3 V +6 -2 V +7 -2 V +7 -2 V +6 -3 V +7 -2 V +6 -2 V +7 -3 V +7 -2 V +6 -3 V +7 -3 V +6 -2 V +7 -3 V +7 -3 V +6 -2 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +6 -2 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -4 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -3 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -2 V +6 -3 V +7 -3 V +7 -3 V +6 -3 V +7 -2 V +6 -3 V +7 -3 V +7 -2 V +6 -3 V +7 -2 V +7 -3 V +6 -2 V +7 -3 V +6 -2 V +7 -2 V +7 -3 V +6 -2 V +7 -2 V +6 -2 V +7 -2 V +7 -3 V +6 -2 V +7 -2 V +6 -2 V +7 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -1 V +7 -2 V +6 -1 V +7 -2 V +7 -1 V +6 -2 V +7 -1 V +6 -1 V +7 -2 V +7 -1 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 -1 V +6 -1 V +7 0 V +7 -1 V +6 -1 V +7 0 V +6 -1 V +7 -1 V +7 0 V +6 0 V +7 -1 V +6 0 V +7 0 V +7 0 V +6 0 V +7 -1 V +7 0 V +6 1 V +7 0 V +6 0 V +7 0 V +7 0 V +6 1 V +7 0 V +6 0 V +7 1 V +7 1 V +6 0 V +7 1 V +6 0 V +7 1 V +7 1 V +6 1 V +7 1 V +7 1 V +6 1 V +7 1 V +6 1 V +7 1 V +currentpoint stroke M +7 1 V +6 1 V +7 1 V +6 2 V +7 1 V +7 1 V +6 2 V +7 1 V +6 2 V +7 1 V +7 2 V +6 1 V +7 2 V +7 2 V +6 1 V +7 2 V +6 2 V +7 2 V +7 1 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 2 V +7 1 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 2 V +6 2 V +7 2 V +7 3 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 2 V +6 2 V +7 2 V +7 1 V +6 2 V +7 2 V +6 2 V +7 2 V +7 2 V +6 2 V +7 1 V +6 2 V +7 2 V +7 2 V +6 1 V +7 2 V +7 2 V +6 1 V +7 2 V +6 1 V +7 2 V +7 1 V +6 1 V +7 2 V +6 1 V +7 1 V +7 2 V +6 1 V +7 1 V +7 1 V +6 1 V +7 1 V +6 1 V +7 1 V +7 0 V +6 1 V +7 1 V +6 1 V +7 0 V +7 1 V +6 0 V +7 1 V +6 0 V +7 0 V +7 0 V +6 1 V +7 0 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 -1 V +6 0 V +7 0 V +6 -1 V +7 0 V +7 -1 V +6 0 V +7 -1 V +6 -1 V +7 -1 V +7 0 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 -2 V +6 -1 V +7 -1 V +7 -1 V +6 -2 V +7 -1 V +6 -2 V +7 -1 V +7 -2 V +6 -1 V +7 -2 V +6 -2 V +7 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -2 V +7 -2 V +6 -2 V +7 -3 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -2 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -2 V +7 -2 V +6 -2 V +7 -2 V +7 -2 V +6 -2 V +7 -2 V +6 -1 V +7 -2 V +7 -2 V +6 -1 V +7 -2 V +7 -1 V +6 -1 V +7 -2 V +6 -1 V +7 -1 V +7 -1 V +6 -1 V +7 0 V +6 -1 V +7 -1 V +7 0 V +6 0 V +7 0 V +6 0 V +7 0 V +7 1 V +6 0 V +7 1 V +7 1 V +6 1 V +7 1 V +6 2 V +7 2 V +7 1 V +6 3 V +7 2 V +6 3 V +7 3 V +7 3 V +6 3 V +7 4 V +6 4 V +7 4 V +7 5 V +6 5 V +7 5 V +7 6 V +6 6 V +7 6 V +6 7 V +7 7 V +1.000 UL +LT2 +420 1457 M +7 -54 V +6 0 V +7 19 V +6 19 V +7 13 V +7 3 V +6 -4 V +7 -11 V +7 -12 V +6 -12 V +7 -11 V +6 -6 V +7 -3 V +7 1 V +6 5 V +7 7 V +6 9 V +7 9 V +7 9 V +6 8 V +7 6 V +6 5 V +7 1 V +7 0 V +6 -2 V +7 -5 V +7 -6 V +6 -6 V +7 -8 V +6 -7 V +7 -7 V +7 -7 V +6 -5 V +7 -4 V +6 -3 V +7 -1 V +7 0 V +6 2 V +7 3 V +6 4 V +7 5 V +7 6 V +6 6 V +7 7 V +7 6 V +6 6 V +7 5 V +6 5 V +7 4 V +7 2 V +6 2 V +7 1 V +6 -1 V +7 -2 V +7 -2 V +6 -4 V +7 -4 V +6 -5 V +7 -5 V +7 -6 V +6 -5 V +7 -6 V +7 -6 V +6 -5 V +7 -4 V +6 -4 V +7 -3 V +7 -3 V +6 -1 V +7 -1 V +6 0 V +7 1 V +7 2 V +6 3 V +7 3 V +7 4 V +6 4 V +7 5 V +6 5 V +7 5 V +7 6 V +6 5 V +7 5 V +6 4 V +7 5 V +7 3 V +6 4 V +7 2 V +6 2 V +7 1 V +7 1 V +6 0 V +7 -1 V +7 -2 V +6 -2 V +7 -3 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -5 V +6 -5 V +7 -5 V +7 -5 V +6 -5 V +7 -5 V +6 -4 V +7 -4 V +7 -3 V +6 -3 V +7 -2 V +7 -2 V +6 -1 V +7 -1 V +6 0 V +7 1 V +7 1 V +6 2 V +7 2 V +6 3 V +7 4 V +7 3 V +6 5 V +7 4 V +7 5 V +6 4 V +7 5 V +6 5 V +7 5 V +7 5 V +6 4 V +7 4 V +6 4 V +7 3 V +7 3 V +6 3 V +7 1 V +6 2 V +7 1 V +7 0 V +6 0 V +7 -1 V +7 -2 V +6 -2 V +7 -2 V +6 -3 V +7 -3 V +7 -4 V +6 -4 V +7 -5 V +6 -4 V +7 -5 V +7 -5 V +6 -4 V +7 -5 V +6 -5 V +7 -5 V +7 -4 V +6 -4 V +7 -4 V +7 -3 V +6 -3 V +7 -3 V +6 -2 V +7 -2 V +7 -1 V +6 0 V +7 0 V +6 0 V +7 1 V +7 2 V +6 2 V +7 2 V +6 3 V +7 3 V +7 4 V +6 4 V +7 4 V +7 5 V +6 5 V +7 5 V +6 5 V +7 5 V +7 4 V +6 5 V +7 5 V +6 4 V +7 5 V +7 4 V +6 3 V +7 3 V +7 3 V +6 3 V +7 1 V +6 2 V +7 1 V +7 0 V +6 0 V +7 -1 V +6 -1 V +7 -2 V +7 -2 V +6 -2 V +7 -3 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -5 V +7 -5 V +6 -5 V +7 -5 V +6 -5 V +7 -6 V +7 -5 V +6 -5 V +7 -5 V +6 -4 V +7 -5 V +7 -4 V +6 -4 V +7 -3 V +6 -3 V +7 -3 V +7 -2 V +6 -1 V +7 -1 V +7 -1 V +6 0 V +7 0 V +6 1 V +7 2 V +7 2 V +6 2 V +7 3 V +6 4 V +7 3 V +7 5 V +6 4 V +7 5 V +6 5 V +7 5 V +7 6 V +6 5 V +7 6 V +7 5 V +6 6 V +7 6 V +6 5 V +7 5 V +7 5 V +6 5 V +7 4 V +6 4 V +7 4 V +7 3 V +6 3 V +7 2 V +7 1 V +6 2 V +7 0 V +6 0 V +7 0 V +7 -1 V +6 -2 V +7 -2 V +6 -2 V +7 -4 V +7 -3 V +6 -4 V +7 -5 V +6 -4 V +7 -6 V +7 -5 V +6 -6 V +7 -6 V +7 -6 V +6 -6 V +7 -6 V +6 -7 V +7 -6 V +7 -6 V +6 -6 V +7 -6 V +6 -5 V +7 -6 V +7 -5 V +6 -4 V +7 -4 V +6 -4 V +7 -3 V +7 -3 V +6 -2 V +7 -2 V +7 -1 V +6 0 V +7 0 V +6 1 V +7 2 V +7 2 V +6 2 V +7 3 V +6 4 V +7 4 V +7 5 V +6 5 V +7 6 V +6 6 V +7 6 V +7 7 V +6 7 V +7 7 V +7 7 V +6 8 V +7 7 V +6 7 V +7 8 V +7 7 V +6 6 V +7 7 V +6 6 V +7 6 V +7 6 V +6 5 V +7 5 V +7 4 V +6 3 V +7 3 V +6 2 V +7 2 V +7 1 V +6 0 V +7 0 V +6 -1 V +7 -2 V +7 -3 V +6 -3 V +7 -4 V +6 -4 V +7 -6 V +7 -5 V +6 -7 V +7 -7 V +7 -7 V +6 -8 V +7 -8 V +6 -8 V +7 -9 V +7 -9 V +6 -9 V +7 -9 V +6 -9 V +7 -9 V +7 -9 V +6 -9 V +7 -8 V +6 -8 V +7 -8 V +7 -7 V +6 -7 V +7 -6 V +7 -6 V +6 -5 V +7 -4 V +6 -3 V +7 -3 V +7 -2 V +6 -1 V +7 0 V +6 1 V +7 1 V +7 3 V +6 3 V +7 4 V +7 6 V +6 6 V +7 6 V +6 8 V +7 8 V +7 9 V +6 10 V +7 10 V +6 11 V +7 11 V +7 11 V +6 12 V +7 12 V +6 12 V +7 13 V +7 12 V +6 12 V +7 12 V +7 12 V +6 12 V +7 11 V +6 10 V +7 10 V +7 9 V +6 9 V +currentpoint stroke M +7 7 V +6 7 V +7 5 V +7 5 V +6 4 V +7 2 V +6 1 V +7 1 V +7 -2 V +6 -2 V +7 -4 V +7 -5 V +6 -6 V +7 -8 V +6 -9 V +7 -10 V +7 -11 V +6 -12 V +7 -14 V +6 -14 V +7 -16 V +7 -16 V +6 -18 V +7 -18 V +6 -18 V +7 -19 V +7 -20 V +6 -20 V +7 -20 V +7 -20 V +6 -20 V +7 -20 V +6 -19 V +7 -19 V +7 -18 V +6 -18 V +7 -17 V +6 -15 V +7 -15 V +7 -13 V +6 -12 V +7 -10 V +7 -9 V +6 -7 V +7 -4 V +6 -3 V +7 -1 V +7 2 V +6 4 V +7 6 V +6 9 V +7 12 V +7 14 V +6 16 V +7 20 V +6 22 V +7 25 V +7 28 V +6 30 V +7 33 V +7 36 V +6 38 V +7 42 V +6 43 V +7 46 V +7 49 V +6 51 V +7 53 V +6 55 V +7 58 V +7 59 V +6 61 V +7 62 V +6 64 V +7 66 V +7 66 V +6 68 V +7 68 V +7 69 V +6 69 V +7 70 V +6 70 V +7 70 V +7 70 V +6 69 V +7 69 V +6 68 V +7 67 V +7 66 V +6 65 V +7 63 V +6 62 V +7 60 V +7 59 V +6 56 V +7 55 V +7 52 V +6 50 V +7 48 V +6 45 V +7 43 V +7 40 V +6 38 V +7 35 V +6 32 V +7 29 V +7 27 V +6 24 V +7 22 V +7 18 V +6 16 V +7 14 V +6 10 V +7 9 V +7 5 V +6 4 V +7 1 V +6 -1 V +7 -3 V +7 -6 V +6 -7 V +7 -8 V +6 -11 V +7 -12 V +7 -13 V +6 -15 V +7 -16 V +7 -16 V +6 -18 V +7 -18 V +6 -19 V +7 -19 V +7 -20 V +6 -20 V +7 -19 V +6 -20 V +7 -20 V +7 -19 V +6 -19 V +7 -18 V +6 -18 V +7 -17 V +7 -16 V +6 -15 V +7 -15 V +7 -13 V +6 -12 V +7 -11 V +6 -10 V +7 -9 V +7 -7 V +6 -7 V +7 -5 V +6 -4 V +7 -2 V +7 -1 V +6 0 V +7 1 V +6 2 V +7 3 V +7 5 V +6 5 V +7 6 V +7 8 V +6 8 V +7 9 V +6 9 V +7 10 V +7 11 V +6 11 V +7 11 V +6 12 V +7 12 V +7 12 V +6 12 V +7 12 V +7 12 V +6 12 V +7 11 V +6 11 V +7 11 V +7 10 V +6 10 V +7 9 V +6 8 V +7 8 V +7 7 V +6 6 V +7 6 V +6 4 V +7 4 V +7 3 V +6 2 V +7 2 V +7 0 V +6 0 V +7 -2 V +6 -2 V +7 -3 V +7 -3 V +6 -4 V +7 -5 V +6 -6 V +7 -6 V +7 -7 V +6 -7 V +7 -7 V +6 -8 V +7 -8 V +7 -9 V +6 -9 V +7 -8 V +7 -9 V +6 -9 V +7 -9 V +6 -8 V +7 -9 V +7 -8 V +6 -8 V +7 -7 V +6 -7 V +7 -7 V +7 -6 V +6 -6 V +7 -5 V +7 -5 V +6 -4 V +7 -3 V +6 -3 V +7 -2 V +7 -1 V +6 -1 V +7 0 V +6 0 V +7 2 V +7 2 V +6 2 V +7 3 V +6 4 V +7 4 V +7 4 V +6 5 V +7 6 V +7 6 V +6 6 V +7 6 V +6 7 V +7 7 V +7 7 V +6 7 V +7 7 V +6 7 V +7 7 V +7 7 V +6 6 V +7 7 V +6 6 V +7 6 V +7 5 V +6 5 V +7 5 V +7 4 V +6 4 V +7 3 V +6 3 V +7 2 V +7 1 V +6 1 V +7 1 V +6 0 V +7 -1 V +7 -1 V +6 -2 V +7 -2 V +6 -3 V +7 -3 V +7 -4 V +6 -4 V +7 -4 V +7 -5 V +6 -5 V +7 -5 V +6 -6 V +7 -6 V +7 -6 V +6 -6 V +7 -6 V +6 -6 V +7 -5 V +7 -6 V +6 -6 V +7 -5 V +7 -6 V +6 -5 V +7 -4 V +6 -5 V +7 -4 V +7 -3 V +6 -3 V +7 -3 V +6 -2 V +7 -2 V +7 -1 V +6 -1 V +7 0 V +6 0 V +7 1 V +7 1 V +6 2 V +7 2 V +7 3 V +6 3 V +7 3 V +6 4 V +7 4 V +7 4 V +6 5 V +7 5 V +6 5 V +7 5 V +7 5 V +6 5 V +7 6 V +6 5 V +7 5 V +7 5 V +6 5 V +7 5 V +7 4 V +6 4 V +7 4 V +6 3 V +7 4 V +7 2 V +6 2 V +7 2 V +6 2 V +7 1 V +7 0 V +6 0 V +7 -1 V +6 -1 V +7 -1 V +7 -2 V +6 -2 V +7 -3 V +7 -3 V +6 -3 V +7 -4 V +6 -4 V +7 -4 V +7 -5 V +6 -4 V +7 -5 V +6 -5 V +7 -5 V +7 -4 V +6 -5 V +7 -5 V +7 -4 V +6 -5 V +7 -4 V +6 -4 V +7 -4 V +7 -3 V +6 -3 V +7 -2 V +6 -3 V +7 -1 V +7 -2 V +6 0 V +7 -1 V +6 0 V +7 1 V +7 1 V +6 1 V +7 2 V +7 2 V +6 3 V +7 3 V +6 3 V +7 3 V +7 4 V +6 4 V +7 5 V +6 4 V +7 4 V +7 5 V +6 5 V +7 4 V +6 5 V +7 4 V +7 4 V +6 4 V +7 4 V +7 3 V +6 3 V +7 3 V +6 2 V +7 2 V +currentpoint stroke M +7 1 V +6 2 V +7 0 V +6 0 V +7 0 V +7 -1 V +6 -1 V +7 -2 V +6 -2 V +7 -2 V +7 -3 V +6 -3 V +7 -4 V +7 -3 V +6 -4 V +7 -4 V +6 -5 V +7 -4 V +7 -4 V +6 -5 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -4 V +7 -3 V +7 -3 V +6 -3 V +7 -2 V +6 -2 V +7 -1 V +7 -1 V +6 -1 V +7 0 V +6 1 V +7 1 V +7 1 V +6 2 V +7 3 V +6 2 V +7 3 V +7 4 V +6 3 V +7 4 V +7 4 V +6 5 V +7 4 V +6 4 V +7 5 V +7 4 V +6 4 V +7 4 V +6 3 V +7 4 V +7 3 V +6 2 V +7 3 V +6 1 V +7 2 V +7 1 V +6 0 V +7 0 V +7 -1 V +6 -1 V +7 -2 V +6 -2 V +7 -3 V +7 -3 V +6 -3 V +7 -4 V +6 -4 V +7 -4 V +7 -4 V +6 -5 V +7 -4 V +7 -4 V +6 -5 V +7 -4 V +6 -3 V +7 -4 V +7 -3 V +6 -3 V +7 -2 V +6 -2 V +7 -1 V +7 0 V +6 0 V +7 0 V +6 1 V +7 2 V +7 2 V +6 3 V +7 3 V +7 3 V +6 4 V +7 4 V +6 5 V +7 4 V +7 5 V +6 4 V +7 4 V +6 5 V +7 4 V +7 3 V +6 3 V +7 3 V +6 2 V +7 2 V +7 0 V +6 1 V +7 -1 V +7 -1 V +6 -2 V +7 -2 V +6 -3 V +7 -3 V +7 -4 V +6 -4 V +7 -5 V +6 -5 V +7 -5 V +7 -4 V +6 -5 V +7 -4 V +6 -4 V +7 -4 V +7 -3 V +6 -2 V +7 -2 V +7 -1 V +6 0 V +7 1 V +6 1 V +7 2 V +7 3 V +6 4 V +7 4 V +6 5 V +7 4 V +7 6 V +6 5 V +7 5 V +7 5 V +6 4 V +7 4 V +6 3 V +7 3 V +7 1 V +6 1 V +7 -1 V +6 -1 V +7 -3 V +7 -3 V +6 -4 V +7 -5 V +6 -6 V +7 -6 V +7 -5 V +6 -6 V +7 -6 V +7 -4 V +6 -4 V +7 -3 V +6 -2 V +7 0 V +7 1 V +6 3 V +7 4 V +6 5 V +7 5 V +7 7 V +6 7 V +7 7 V +6 6 V +7 5 V +7 4 V +6 3 V +7 0 V +7 -2 V +6 -4 V +7 -5 V +6 -8 V +7 -8 V +7 -9 V +6 -8 V +7 -6 V +6 -4 V +7 -2 V +7 3 V +6 6 V +7 9 V +6 12 V +7 11 V +7 10 V +6 4 V +7 -3 V +7 -12 V +6 -18 V +7 -17 V +6 0 V +7 50 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/cheb.texi b/software/gsl-1.15/doc/cheb.texi new file mode 100644 index 000000000..220b25c56 --- /dev/null +++ b/software/gsl-1.15/doc/cheb.texi @@ -0,0 +1,194 @@ +@cindex Chebyshev series +@cindex fitting, using Chebyshev polynomials +@cindex interpolation, using Chebyshev polynomials + +This chapter describes routines for computing Chebyshev approximations +to univariate functions. A Chebyshev approximation is a truncation of +the series @math{f(x) = \sum c_n T_n(x)}, where the Chebyshev +polynomials @math{T_n(x) = \cos(n \arccos x)} provide an orthogonal +basis of polynomials on the interval @math{[-1,1]} with the weight +function @c{$1 / \sqrt{1-x^2}$} +@math{1 / \sqrt@{1-x^2@}}. The first few Chebyshev polynomials are, +@math{T_0(x) = 1}, @math{T_1(x) = x}, @math{T_2(x) = 2 x^2 - 1}. +For further information see Abramowitz & Stegun, Chapter 22. + +The functions described in this chapter are declared in the header file +@file{gsl_chebyshev.h}. + +@menu +* Chebyshev Definitions:: +* Creation and Calculation of Chebyshev Series:: +* Auxiliary Functions for Chebyshev Series:: +* Chebyshev Series Evaluation:: +* Derivatives and Integrals:: +* Chebyshev Approximation Examples:: +* Chebyshev Approximation References and Further Reading:: +@end menu + +@node Chebyshev Definitions +@section Definitions +@tpindex gsl_cheb_series +A Chebyshev series is stored using the following structure, + +@example +typedef struct +@{ + double * c; /* coefficients c[0] .. c[order] */ + int order; /* order of expansion */ + double a; /* lower interval point */ + double b; /* upper interval point */ + ... +@} gsl_cheb_series +@end example + +@noindent +The approximation is made over the range @math{[a,b]} using +@var{order}+1 terms, including the coefficient @math{c[0]}. The series +is computed using the following convention, +@tex +\beforedisplay +$$ +f(x) = {c_0 \over 2} + \sum_{n=1} c_n T_n(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(x) = (c_0 / 2) + \sum_@{n=1@} c_n T_n(x) +@end example + +@end ifinfo +@noindent +which is needed when accessing the coefficients directly. + +@node Creation and Calculation of Chebyshev Series +@section Creation and Calculation of Chebyshev Series + +@deftypefun {gsl_cheb_series *} gsl_cheb_alloc (const size_t @var{n}) +This function allocates space for a Chebyshev series of order @var{n} +and returns a pointer to a new @code{gsl_cheb_series} struct. +@end deftypefun + +@deftypefun void gsl_cheb_free (gsl_cheb_series * @var{cs}) +This function frees a previously allocated Chebyshev series @var{cs}. +@end deftypefun + +@deftypefun int gsl_cheb_init (gsl_cheb_series * @var{cs}, const gsl_function * @var{f}, const double @var{a}, const double @var{b}) +This function computes the Chebyshev approximation @var{cs} for the +function @var{f} over the range @math{(a,b)} to the previously specified +order. The computation of the Chebyshev approximation is an +@math{O(n^2)} process, and requires @math{n} function evaluations. +@end deftypefun + +@node Auxiliary Functions for Chebyshev Series +@section Auxiliary Functions +The following functions provide information about an existing +Chebyshev series. + +@deftypefun size_t gsl_cheb_order (const gsl_cheb_series * @var{cs}) +This function returns the order of Chebyshev series @var{cs}. +@end deftypefun + +@deftypefun size_t gsl_cheb_size (const gsl_cheb_series * @var{cs}) +@deftypefunx {double *} gsl_cheb_coeffs (const gsl_cheb_series * @var{cs}) +These functions return the size of the Chebyshev coefficient array +@code{c[]} and a pointer to its location in memory for the Chebyshev +series @var{cs}. +@end deftypefun + +@node Chebyshev Series Evaluation +@section Chebyshev Series Evaluation + +@deftypefun double gsl_cheb_eval (const gsl_cheb_series * @var{cs}, double @var{x}) +This function evaluates the Chebyshev series @var{cs} at a given point @var{x}. +@end deftypefun + +@deftypefun int gsl_cheb_eval_err (const gsl_cheb_series * @var{cs}, const double @var{x}, double * @var{result}, double * @var{abserr}) +This function computes the Chebyshev series @var{cs} at a given point +@var{x}, estimating both the series @var{result} and its absolute error +@var{abserr}. The error estimate is made from the first neglected term +in the series. +@end deftypefun + +@deftypefun double gsl_cheb_eval_n (const gsl_cheb_series * @var{cs}, size_t @var{order}, double @var{x}) +This function evaluates the Chebyshev series @var{cs} at a given point +@var{x}, to (at most) the given order @var{order}. +@end deftypefun + +@deftypefun int gsl_cheb_eval_n_err (const gsl_cheb_series * @var{cs}, const size_t @var{order}, const double @var{x}, double * @var{result}, double * @var{abserr}) +This function evaluates a Chebyshev series @var{cs} at a given point +@var{x}, estimating both the series @var{result} and its absolute error +@var{abserr}, to (at most) the given order @var{order}. The error +estimate is made from the first neglected term in the series. +@end deftypefun + +@comment @deftypefun double gsl_cheb_eval_mode (const gsl_cheb_series * @var{cs}, double @var{x}, gsl_mode_t @var{mode}) +@comment @end deftypefun + +@comment @deftypefun int gsl_cheb_eval_mode_err (const gsl_cheb_series * @var{cs}, const double @var{x}, gsl_mode_t @var{mode}, double * @var{result}, double * @var{abserr}) +@comment Evaluate a Chebyshev series at a given point, using the default +@comment order for double precision mode(s) and the single precision +@comment order for other modes. +@comment @end deftypefun + + +@node Derivatives and Integrals +@section Derivatives and Integrals + +The following functions allow a Chebyshev series to be differentiated or +integrated, producing a new Chebyshev series. Note that the error +estimate produced by evaluating the derivative series will be +underestimated due to the contribution of higher order terms being +neglected. + +@deftypefun int gsl_cheb_calc_deriv (gsl_cheb_series * @var{deriv}, const gsl_cheb_series * @var{cs}) +This function computes the derivative of the series @var{cs}, storing +the derivative coefficients in the previously allocated @var{deriv}. +The two series @var{cs} and @var{deriv} must have been allocated with +the same order. +@end deftypefun + +@deftypefun int gsl_cheb_calc_integ (gsl_cheb_series * @var{integ}, const gsl_cheb_series * @var{cs}) +This function computes the integral of the series @var{cs}, storing the +integral coefficients in the previously allocated @var{integ}. The two +series @var{cs} and @var{integ} must have been allocated with the same +order. The lower limit of the integration is taken to be the left hand +end of the range @var{a}. +@end deftypefun + +@node Chebyshev Approximation Examples +@section Examples + +The following example program computes Chebyshev approximations to a +step function. This is an extremely difficult approximation to make, +due to the discontinuity, and was chosen as an example where +approximation error is visible. For smooth functions the Chebyshev +approximation converges extremely rapidly and errors would not be +visible. + +@example +@verbatiminclude examples/cheb.c +@end example + +@noindent +The output from the program gives the original function, 10-th order +approximation and 40-th order approximation, all sampled at intervals of +0.001 in @math{x}. + +@iftex +@sp 1 +@center @image{cheb,3.4in} +@end iftex + +@node Chebyshev Approximation References and Further Reading +@section References and Further Reading + +The following paper describes the use of Chebyshev series, + +@itemize @w{} +@item +R. Broucke, ``Ten Subroutines for the Manipulation of Chebyshev Series +[C1] (Algorithm 446)''. @cite{Communications of the ACM} 16(4), 254--256 +(1973) +@end itemize diff --git a/software/gsl-1.15/doc/combination.texi b/software/gsl-1.15/doc/combination.texi new file mode 100644 index 000000000..516cba82b --- /dev/null +++ b/software/gsl-1.15/doc/combination.texi @@ -0,0 +1,223 @@ +@cindex combinations + +This chapter describes functions for creating and manipulating +combinations. A combination @math{c} is represented by an array of +@math{k} integers in the range 0 to @math{n-1}, where each value +@math{c_i} occurs at most once. The combination @math{c} corresponds to +indices of @math{k} elements chosen from an @math{n} element vector. +Combinations are useful for iterating over all @math{k}-element subsets +of a set. + +The functions described in this chapter are defined in the header file +@file{gsl_combination.h}. + +@menu +* The Combination struct:: +* Combination allocation:: +* Accessing combination elements:: +* Combination properties:: +* Combination functions:: +* Reading and writing combinations:: +* Combination Examples:: +* Combination References and Further Reading:: +@end menu + +@node The Combination struct +@section The Combination struct +@tpindex gsl_combination +A combination is defined by a structure containing three components, the +values of @math{n} and @math{k}, and a pointer to the combination array. +The elements of the combination array are all of type @code{size_t}, and +are stored in increasing order. The @code{gsl_combination} structure +looks like this, + +@example +typedef struct +@{ + size_t n; + size_t k; + size_t *data; +@} gsl_combination; +@end example +@comment + +@noindent + +@node Combination allocation +@section Combination allocation + +@deftypefun {gsl_combination *} gsl_combination_alloc (size_t @var{n}, size_t @var{k}) +This function allocates memory for a new combination with parameters +@var{n}, @var{k}. The combination is not initialized and its elements +are undefined. Use the function @code{gsl_combination_calloc} if you +want to create a combination which is initialized to the +lexicographically first combination. A null pointer is returned if +insufficient memory is available to create the combination. +@end deftypefun + +@deftypefun {gsl_combination *} gsl_combination_calloc (size_t @var{n}, size_t @var{k}) +This function allocates memory for a new combination with parameters +@var{n}, @var{k} and initializes it to the lexicographically first +combination. A null pointer is returned if insufficient memory is +available to create the combination. +@end deftypefun + +@deftypefun void gsl_combination_init_first (gsl_combination * @var{c}) +This function initializes the combination @var{c} to the +lexicographically first combination, i.e. @math{(0,1,2,@dots{},k-1)}. +@end deftypefun + +@deftypefun void gsl_combination_init_last (gsl_combination * @var{c}) +This function initializes the combination @var{c} to the +lexicographically last combination, i.e. @math{(n-k,n-k+1,@dots{},n-1)}. +@end deftypefun + +@deftypefun void gsl_combination_free (gsl_combination * @var{c}) +This function frees all the memory used by the combination @var{c}. +@end deftypefun + +@deftypefun int gsl_combination_memcpy (gsl_combination * @var{dest}, const gsl_combination * @var{src}) +This function copies the elements of the combination @var{src} into the +combination @var{dest}. The two combinations must have the same size. +@end deftypefun + + +@node Accessing combination elements +@section Accessing combination elements + +The following function can be used to access the elements of a combination. + +@deftypefun size_t gsl_combination_get (const gsl_combination * @var{c}, const size_t @var{i}) +This function returns the value of the @var{i}-th element of the +combination @var{c}. If @var{i} lies outside the allowed range of 0 to +@math{@var{k}-1} then the error handler is invoked and 0 is returned. @inlinefn{} +@end deftypefun + +@node Combination properties +@section Combination properties + +@deftypefun size_t gsl_combination_n (const gsl_combination * @var{c}) +This function returns the range (@math{n}) of the combination @var{c}. +@end deftypefun + +@deftypefun size_t gsl_combination_k (const gsl_combination * @var{c}) +This function returns the number of elements (@math{k}) in the combination @var{c}. +@end deftypefun + +@deftypefun {size_t *} gsl_combination_data (const gsl_combination * @var{c}) +This function returns a pointer to the array of elements in the +combination @var{c}. +@end deftypefun + +@deftypefun int gsl_combination_valid (gsl_combination * @var{c}) +@cindex checking combination for validity +@cindex testing combination for validity +This function checks that the combination @var{c} is valid. The @var{k} +elements should lie in the range 0 to @math{@var{n}-1}, with each +value occurring once at most and in increasing order. +@end deftypefun + +@node Combination functions +@section Combination functions + +@deftypefun int gsl_combination_next (gsl_combination * @var{c}) +@cindex iterating through combinations +This function advances the combination @var{c} to the next combination +in lexicographic order and returns @code{GSL_SUCCESS}. If no further +combinations are available it returns @code{GSL_FAILURE} and leaves +@var{c} unmodified. Starting with the first combination and +repeatedly applying this function will iterate through all possible +combinations of a given order. +@end deftypefun + +@deftypefun int gsl_combination_prev (gsl_combination * @var{c}) +This function steps backwards from the combination @var{c} to the +previous combination in lexicographic order, returning +@code{GSL_SUCCESS}. If no previous combination is available it returns +@code{GSL_FAILURE} and leaves @var{c} unmodified. +@end deftypefun + + +@node Reading and writing combinations +@section Reading and writing combinations + +The library provides functions for reading and writing combinations to a +file as binary data or formatted text. + +@deftypefun int gsl_combination_fwrite (FILE * @var{stream}, const gsl_combination * @var{c}) +This function writes the elements of the combination @var{c} to the +stream @var{stream} in binary format. The function returns +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_combination_fread (FILE * @var{stream}, gsl_combination * @var{c}) +This function reads elements from the open stream @var{stream} into the +combination @var{c} in binary format. The combination @var{c} must be +preallocated with correct values of @math{n} and @math{k} since the +function uses the size of @var{c} to determine how many bytes to read. +The function returns @code{GSL_EFAILED} if there was a problem reading +from the file. The data is assumed to have been written in the native +binary format on the same architecture. +@end deftypefun + +@deftypefun int gsl_combination_fprintf (FILE * @var{stream}, const gsl_combination * @var{c}, const char * @var{format}) +This function writes the elements of the combination @var{c} +line-by-line to the stream @var{stream} using the format specifier +@var{format}, which should be suitable for a type of @var{size_t}. +In ISO C99 the type modifier @code{z} represents @code{size_t}, so +@code{"%zu\n"} is a suitable format.@footnote{In versions of the +GNU C library prior to the ISO C99 standard, +the type modifier @code{Z} was used instead.} The function returns +@code{GSL_EFAILED} if there was a problem writing to the file. +@end deftypefun + +@deftypefun int gsl_combination_fscanf (FILE * @var{stream}, gsl_combination * @var{c}) +This function reads formatted data from the stream @var{stream} into the +combination @var{c}. The combination @var{c} must be preallocated with +correct values of @math{n} and @math{k} since the function uses the size of @var{c} to +determine how many numbers to read. The function returns +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun + + +@node Combination Examples +@section Examples +The example program below prints all subsets of the set +@math{@{0,1,2,3@}} ordered by size. Subsets of the same size are +ordered lexicographically. + +@example +@verbatiminclude examples/combination.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out +@verbatiminclude examples/combination.out +@end example + +@noindent +All 16 subsets are generated, and the subsets of each size are sorted +lexicographically. + + +@node Combination References and Further Reading +@section References and Further Reading + +@noindent +Further information on combinations can be found in, + +@itemize @w{} +@item +Donald L. Kreher, Douglas R. Stinson, @cite{Combinatorial Algorithms: +Generation, Enumeration and Search}, 1998, CRC Press LLC, ISBN +084933988X +@end itemize + +@noindent + + diff --git a/software/gsl-1.15/doc/complex.texi b/software/gsl-1.15/doc/complex.texi new file mode 100644 index 000000000..ef0097bce --- /dev/null +++ b/software/gsl-1.15/doc/complex.texi @@ -0,0 +1,493 @@ +@cindex complex numbers + +The functions described in this chapter provide support for complex +numbers. The algorithms take care to avoid unnecessary intermediate +underflows and overflows, allowing the functions to be evaluated over +as much of the complex plane as possible. + +@comment FIXME: this still needs to be +@comment done for the csc,sec,cot,csch,sech,coth functions + +For multiple-valued functions the branch cuts have been chosen to follow +the conventions of Abramowitz and Stegun in the @cite{Handbook of +Mathematical Functions}. The functions return principal values which are +the same as those in GNU Calc, which in turn are the same as those in +@cite{Common Lisp, The Language (Second Edition)}@footnote{Note that the +first edition uses different definitions.} and the HP-28/48 series of +calculators. + +The complex types are defined in the header file @file{gsl_complex.h}, +while the corresponding complex functions and arithmetic operations are +defined in @file{gsl_complex_math.h}. + +@menu +* Representation of complex numbers:: +* Properties of complex numbers:: +* Complex arithmetic operators:: +* Elementary Complex Functions:: +* Complex Trigonometric Functions:: +* Inverse Complex Trigonometric Functions:: +* Complex Hyperbolic Functions:: +* Inverse Complex Hyperbolic Functions:: +* Complex Number References and Further Reading:: +@end menu + +@node Representation of complex numbers +@section Representation of complex numbers +@cindex representations of complex numbers +@cindex polar form of complex numbers +@tindex gsl_complex + +Complex numbers are represented using the type @code{gsl_complex}. The +internal representation of this type may vary across platforms and +should not be accessed directly. The functions and macros described +below allow complex numbers to be manipulated in a portable way. + +For reference, the default form of the @code{gsl_complex} type is +given by the following struct, + +@example +typedef struct +@{ + double dat[2]; +@} gsl_complex; +@end example + +@noindent +The real and imaginary part are stored in contiguous elements of a two +element array. This eliminates any padding between the real and +imaginary parts, @code{dat[0]} and @code{dat[1]}, allowing the struct to +be mapped correctly onto packed complex arrays. + +@deftypefun gsl_complex gsl_complex_rect (double @var{x}, double @var{y}) +This function uses the rectangular Cartesian components +(@var{x},@var{y}) to return the complex number @math{z = x + i y}. @inlinefn{} +@end deftypefun + +@deftypefun gsl_complex gsl_complex_polar (double @var{r}, double @var{theta}) +This function returns the complex number @math{z = r \exp(i \theta) = r +(\cos(\theta) + i \sin(\theta))} from the polar representation +(@var{r},@var{theta}). +@end deftypefun + +@defmac GSL_REAL (@var{z}) +@defmacx GSL_IMAG (@var{z}) +These macros return the real and imaginary parts of the complex number +@var{z}. +@end defmac + +@defmac GSL_SET_COMPLEX (@var{zp}, @var{x}, @var{y}) +This macro uses the Cartesian components (@var{x},@var{y}) to set the +real and imaginary parts of the complex number pointed to by @var{zp}. +For example, + +@example +GSL_SET_COMPLEX(&z, 3, 4) +@end example + +@noindent +sets @var{z} to be @math{3 + 4i}. +@end defmac + +@defmac GSL_SET_REAL (@var{zp},@var{x}) +@defmacx GSL_SET_IMAG (@var{zp},@var{y}) +These macros allow the real and imaginary parts of the complex number +pointed to by @var{zp} to be set independently. +@end defmac + +@node Properties of complex numbers +@section Properties of complex numbers + +@deftypefun double gsl_complex_arg (gsl_complex @var{z}) +@cindex argument of complex number +This function returns the argument of the complex number @var{z}, +@math{\arg(z)}, where @c{$-\pi < \arg(z) \leq \pi$} +@math{-\pi < \arg(z) <= \pi}. +@end deftypefun + +@deftypefun double gsl_complex_abs (gsl_complex @var{z}) +@cindex magnitude of complex number +This function returns the magnitude of the complex number @var{z}, @math{|z|}. +@end deftypefun + +@deftypefun double gsl_complex_abs2 (gsl_complex @var{z}) +This function returns the squared magnitude of the complex number +@var{z}, @math{|z|^2}. +@end deftypefun + +@deftypefun double gsl_complex_logabs (gsl_complex @var{z}) +This function returns the natural logarithm of the magnitude of the +complex number @var{z}, @math{\log|z|}. It allows an accurate +evaluation of @math{\log|z|} when @math{|z|} is close to one. The direct +evaluation of @code{log(gsl_complex_abs(z))} would lead to a loss of +precision in this case. +@end deftypefun + + +@node Complex arithmetic operators +@section Complex arithmetic operators +@cindex complex arithmetic + +@deftypefun gsl_complex gsl_complex_add (gsl_complex @var{a}, gsl_complex @var{b}) +This function returns the sum of the complex numbers @var{a} and +@var{b}, @math{z=a+b}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_sub (gsl_complex @var{a}, gsl_complex @var{b}) +This function returns the difference of the complex numbers @var{a} and +@var{b}, @math{z=a-b}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_mul (gsl_complex @var{a}, gsl_complex @var{b}) +This function returns the product of the complex numbers @var{a} and +@var{b}, @math{z=ab}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_div (gsl_complex @var{a}, gsl_complex @var{b}) +This function returns the quotient of the complex numbers @var{a} and +@var{b}, @math{z=a/b}. +@end deftypefun + + +@deftypefun gsl_complex gsl_complex_add_real (gsl_complex @var{a}, double @var{x}) +This function returns the sum of the complex number @var{a} and the +real number @var{x}, @math{z=a+x}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_sub_real (gsl_complex @var{a}, double @var{x}) +This function returns the difference of the complex number @var{a} and the +real number @var{x}, @math{z=a-x}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_mul_real (gsl_complex @var{a}, double @var{x}) +This function returns the product of the complex number @var{a} and the +real number @var{x}, @math{z=ax}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_div_real (gsl_complex @var{a}, double @var{x}) +This function returns the quotient of the complex number @var{a} and the +real number @var{x}, @math{z=a/x}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_add_imag (gsl_complex @var{a}, double @var{y}) +This function returns the sum of the complex number @var{a} and the +imaginary number @math{i}@var{y}, @math{z=a+iy}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_sub_imag (gsl_complex @var{a}, double @var{y}) +This function returns the difference of the complex number @var{a} and the +imaginary number @math{i}@var{y}, @math{z=a-iy}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_mul_imag (gsl_complex @var{a}, double @var{y}) +This function returns the product of the complex number @var{a} and the +imaginary number @math{i}@var{y}, @math{z=a*(iy)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_div_imag (gsl_complex @var{a}, double @var{y}) +This function returns the quotient of the complex number @var{a} and the +imaginary number @math{i}@var{y}, @math{z=a/(iy)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_conjugate (gsl_complex @var{z}) +@cindex conjugate of complex number +This function returns the complex conjugate of the complex number +@var{z}, @math{z^* = x - i y}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_inverse (gsl_complex @var{z}) +This function returns the inverse, or reciprocal, of the complex number +@var{z}, @math{1/z = (x - i y)/(x^2 + y^2)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_negative (gsl_complex @var{z}) +This function returns the negative of the complex number +@var{z}, @math{-z = (-x) + i(-y)}. +@end deftypefun + + +@node Elementary Complex Functions +@section Elementary Complex Functions + +@deftypefun gsl_complex gsl_complex_sqrt (gsl_complex @var{z}) +@cindex square root of complex number +This function returns the square root of the complex number @var{z}, +@math{\sqrt z}. The branch cut is the negative real axis. The result +always lies in the right half of the complex plane. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_sqrt_real (double @var{x}) +This function returns the complex square root of the real number +@var{x}, where @var{x} may be negative. +@end deftypefun + + +@deftypefun gsl_complex gsl_complex_pow (gsl_complex @var{z}, gsl_complex @var{a}) +@cindex power of complex number +@cindex exponentiation of complex number +The function returns the complex number @var{z} raised to the complex +power @var{a}, @math{z^a}. This is computed as @math{\exp(\log(z)*a)} +using complex logarithms and complex exponentials. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_pow_real (gsl_complex @var{z}, double @var{x}) +This function returns the complex number @var{z} raised to the real +power @var{x}, @math{z^x}. +@end deftypefun + + +@deftypefun gsl_complex gsl_complex_exp (gsl_complex @var{z}) +This function returns the complex exponential of the complex number +@var{z}, @math{\exp(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_log (gsl_complex @var{z}) +@cindex logarithm of complex number +This function returns the complex natural logarithm (base @math{e}) of +the complex number @var{z}, @math{\log(z)}. The branch cut is the +negative real axis. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_log10 (gsl_complex @var{z}) +This function returns the complex base-10 logarithm of +the complex number @var{z}, @c{$\log_{10}(z)$} +@math{\log_10 (z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_log_b (gsl_complex @var{z}, gsl_complex @var{b}) +This function returns the complex base-@var{b} logarithm of the complex +number @var{z}, @math{\log_b(z)}. This quantity is computed as the ratio +@math{\log(z)/\log(b)}. +@end deftypefun + + +@node Complex Trigonometric Functions +@section Complex Trigonometric Functions +@cindex trigonometric functions of complex numbers + +@deftypefun gsl_complex gsl_complex_sin (gsl_complex @var{z}) +@cindex sin, of complex number +This function returns the complex sine of the complex number @var{z}, +@math{\sin(z) = (\exp(iz) - \exp(-iz))/(2i)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_cos (gsl_complex @var{z}) +@cindex cosine of complex number +This function returns the complex cosine of the complex number @var{z}, +@math{\cos(z) = (\exp(iz) + \exp(-iz))/2}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_tan (gsl_complex @var{z}) +@cindex tangent of complex number +This function returns the complex tangent of the complex number @var{z}, +@math{\tan(z) = \sin(z)/\cos(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_sec (gsl_complex @var{z}) +This function returns the complex secant of the complex number @var{z}, +@math{\sec(z) = 1/\cos(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_csc (gsl_complex @var{z}) +This function returns the complex cosecant of the complex number @var{z}, +@math{\csc(z) = 1/\sin(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_cot (gsl_complex @var{z}) +This function returns the complex cotangent of the complex number @var{z}, +@math{\cot(z) = 1/\tan(z)}. +@end deftypefun + + +@node Inverse Complex Trigonometric Functions +@section Inverse Complex Trigonometric Functions +@cindex inverse complex trigonometric functions + +@deftypefun gsl_complex gsl_complex_arcsin (gsl_complex @var{z}) +This function returns the complex arcsine of the complex number @var{z}, +@math{\arcsin(z)}. The branch cuts are on the real axis, less than @math{-1} +and greater than @math{1}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arcsin_real (double @var{z}) +This function returns the complex arcsine of the real number @var{z}, +@math{\arcsin(z)}. For @math{z} between @math{-1} and @math{1}, the +function returns a real value in the range @math{[-\pi/2,\pi/2]}. For +@math{z} less than @math{-1} the result has a real part of @math{-\pi/2} +and a positive imaginary part. For @math{z} greater than @math{1} the +result has a real part of @math{\pi/2} and a negative imaginary part. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccos (gsl_complex @var{z}) +This function returns the complex arccosine of the complex number @var{z}, +@math{\arccos(z)}. The branch cuts are on the real axis, less than @math{-1} +and greater than @math{1}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccos_real (double @var{z}) +This function returns the complex arccosine of the real number @var{z}, +@math{\arccos(z)}. For @math{z} between @math{-1} and @math{1}, the +function returns a real value in the range @math{[0,\pi]}. For @math{z} +less than @math{-1} the result has a real part of @math{\pi} and a +negative imaginary part. For @math{z} greater than @math{1} the result +is purely imaginary and positive. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arctan (gsl_complex @var{z}) +This function returns the complex arctangent of the complex number +@var{z}, @math{\arctan(z)}. The branch cuts are on the imaginary axis, +below @math{-i} and above @math{i}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arcsec (gsl_complex @var{z}) +This function returns the complex arcsecant of the complex number @var{z}, +@math{\arcsec(z) = \arccos(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arcsec_real (double @var{z}) +This function returns the complex arcsecant of the real number @var{z}, +@math{\arcsec(z) = \arccos(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccsc (gsl_complex @var{z}) +This function returns the complex arccosecant of the complex number @var{z}, +@math{\arccsc(z) = \arcsin(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccsc_real (double @var{z}) +This function returns the complex arccosecant of the real number @var{z}, +@math{\arccsc(z) = \arcsin(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccot (gsl_complex @var{z}) +This function returns the complex arccotangent of the complex number @var{z}, +@math{\arccot(z) = \arctan(1/z)}. +@end deftypefun + + +@node Complex Hyperbolic Functions +@section Complex Hyperbolic Functions +@cindex hyperbolic functions, complex numbers + +@deftypefun gsl_complex gsl_complex_sinh (gsl_complex @var{z}) +This function returns the complex hyperbolic sine of the complex number +@var{z}, @math{\sinh(z) = (\exp(z) - \exp(-z))/2}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_cosh (gsl_complex @var{z}) +This function returns the complex hyperbolic cosine of the complex number +@var{z}, @math{\cosh(z) = (\exp(z) + \exp(-z))/2}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_tanh (gsl_complex @var{z}) +This function returns the complex hyperbolic tangent of the complex number +@var{z}, @math{\tanh(z) = \sinh(z)/\cosh(z)}. +@end deftypefun + + +@deftypefun gsl_complex gsl_complex_sech (gsl_complex @var{z}) +This function returns the complex hyperbolic secant of the complex +number @var{z}, @math{\sech(z) = 1/\cosh(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_csch (gsl_complex @var{z}) +This function returns the complex hyperbolic cosecant of the complex +number @var{z}, @math{\csch(z) = 1/\sinh(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_coth (gsl_complex @var{z}) +This function returns the complex hyperbolic cotangent of the complex +number @var{z}, @math{\coth(z) = 1/\tanh(z)}. +@end deftypefun + + +@node Inverse Complex Hyperbolic Functions +@section Inverse Complex Hyperbolic Functions +@cindex inverse hyperbolic functions, complex numbers + +@deftypefun gsl_complex gsl_complex_arcsinh (gsl_complex @var{z}) +This function returns the complex hyperbolic arcsine of the +complex number @var{z}, @math{\arcsinh(z)}. The branch cuts are on the +imaginary axis, below @math{-i} and above @math{i}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccosh (gsl_complex @var{z}) +This function returns the complex hyperbolic arccosine of the complex +number @var{z}, @math{\arccosh(z)}. The branch cut is on the real +axis, less than @math{1}. Note that in this case we use the negative +square root in formula 4.6.21 of Abramowitz & Stegun giving +@c{$\arccosh(z)=\log(z-\sqrt{z^2-1})$} +@math{\arccosh(z)=\log(z-\sqrt@{z^2-1@})}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccosh_real (double @var{z}) +This function returns the complex hyperbolic arccosine of +the real number @var{z}, @math{\arccosh(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arctanh (gsl_complex @var{z}) +This function returns the complex hyperbolic arctangent of the complex +number @var{z}, @math{\arctanh(z)}. The branch cuts are on the real +axis, less than @math{-1} and greater than @math{1}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arctanh_real (double @var{z}) +This function returns the complex hyperbolic arctangent of the real +number @var{z}, @math{\arctanh(z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arcsech (gsl_complex @var{z}) +This function returns the complex hyperbolic arcsecant of the complex +number @var{z}, @math{\arcsech(z) = \arccosh(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccsch (gsl_complex @var{z}) +This function returns the complex hyperbolic arccosecant of the complex +number @var{z}, @math{\arccsch(z) = \arcsin(1/z)}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_arccoth (gsl_complex @var{z}) +This function returns the complex hyperbolic arccotangent of the complex +number @var{z}, @math{\arccoth(z) = \arctanh(1/z)}. +@end deftypefun + +@node Complex Number References and Further Reading +@section References and Further Reading + +The implementations of the elementary and trigonometric functions are +based on the following papers, + +@itemize @w{} +@item +T. E. Hull, Thomas F. Fairgrieve, Ping Tak Peter Tang, +``Implementing Complex Elementary Functions Using Exception +Handling'', @cite{ACM Transactions on Mathematical Software}, Volume 20 +(1994), pp 215--244, Corrigenda, p553 + +@item +T. E. Hull, Thomas F. Fairgrieve, Ping Tak Peter Tang, +``Implementing the complex arcsin and arccosine functions using exception +handling'', @cite{ACM Transactions on Mathematical Software}, Volume 23 +(1997) pp 299--335 +@end itemize + +@noindent +The general formulas and details of branch cuts can be found in the +following books, + +@itemize @w{} +@item +Abramowitz and Stegun, @cite{Handbook of Mathematical Functions}, +``Circular Functions in Terms of Real and Imaginary Parts'', Formulas +4.3.55--58, +``Inverse Circular Functions in Terms of Real and Imaginary Parts'', +Formulas 4.4.37--39, +``Hyperbolic Functions in Terms of Real and Imaginary Parts'', +Formulas 4.5.49--52, +``Inverse Hyperbolic Functions---relation to Inverse Circular Functions'', +Formulas 4.6.14--19. + +@item +Dave Gillespie, @cite{Calc Manual}, Free Software Foundation, ISBN +1-882114-18-3 +@end itemize diff --git a/software/gsl-1.15/doc/const.texi b/software/gsl-1.15/doc/const.texi new file mode 100644 index 000000000..034905e83 --- /dev/null +++ b/software/gsl-1.15/doc/const.texi @@ -0,0 +1,576 @@ +@cindex physical constants +@cindex constants, physical +@cindex conversion of units +@cindex units, conversion of +This chapter describes macros for the values of physical constants, such +as the speed of light, @math{c}, and gravitational constant, @math{G}. +The values are available in different unit systems, including the +standard MKSA system (meters, kilograms, seconds, amperes) and the CGSM +system (centimeters, grams, seconds, gauss), which is commonly used in +Astronomy. + +The definitions of constants in the MKSA system are available in the file +@file{gsl_const_mksa.h}. The constants in the CGSM system are defined in +@file{gsl_const_cgsm.h}. Dimensionless constants, such as the fine +structure constant, which are pure numbers are defined in +@file{gsl_const_num.h}. + +@menu +* Fundamental Constants:: +* Astronomy and Astrophysics:: +* Atomic and Nuclear Physics:: +* Measurement of Time:: +* Imperial Units :: +* Speed and Nautical Units:: +* Printers Units:: +* Volume Area and Length:: +* Mass and Weight :: +* Thermal Energy and Power:: +* Pressure:: +* Viscosity:: +* Light and Illumination:: +* Radioactivity:: +* Force and Energy:: +* Prefixes:: +* Physical Constant Examples:: +* Physical Constant References and Further Reading:: +@end menu + +The full list of constants is described briefly below. Consult the +header files themselves for the values of the constants used in the +library. + +@node Fundamental Constants +@section Fundamental Constants +@cindex fundamental constants +@cindex constants, fundamental +@table @code +@item GSL_CONST_MKSA_SPEED_OF_LIGHT +The speed of light in vacuum, @math{c}. + +@item GSL_CONST_MKSA_VACUUM_PERMEABILITY +The permeability of free space, @math{\mu_0}. This constant is defined +in the MKSA system only. + +@item GSL_CONST_MKSA_VACUUM_PERMITTIVITY +The permittivity of free space, @math{\epsilon_0}. This constant is +defined in the MKSA system only. + +@item GSL_CONST_MKSA_PLANCKS_CONSTANT_H +Planck's constant, @math{h}. + +@item GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR +Planck's constant divided by @math{2\pi}, @math{\hbar}. + +@item GSL_CONST_NUM_AVOGADRO +Avogadro's number, @math{N_a}. + +@item GSL_CONST_MKSA_FARADAY +The molar charge of 1 Faraday. + +@item GSL_CONST_MKSA_BOLTZMANN +The Boltzmann constant, @math{k}. + +@item GSL_CONST_MKSA_MOLAR_GAS +The molar gas constant, @math{R_0}. + +@item GSL_CONST_MKSA_STANDARD_GAS_VOLUME +The standard gas volume, @math{V_0}. + +@item GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT +The Stefan-Boltzmann radiation constant, @math{\sigma}. + +@item GSL_CONST_MKSA_GAUSS +The magnetic field of 1 Gauss. +@end table + +@node Astronomy and Astrophysics +@section Astronomy and Astrophysics +@cindex astronomical constants +@table @code +@item GSL_CONST_MKSA_ASTRONOMICAL_UNIT +The length of 1 astronomical unit (mean earth-sun distance), @math{au}. + +@item GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT +The gravitational constant, @math{G}. + +@item GSL_CONST_MKSA_LIGHT_YEAR +The distance of 1 light-year, @math{ly}. + +@item GSL_CONST_MKSA_PARSEC +The distance of 1 parsec, @math{pc}. + +@item GSL_CONST_MKSA_GRAV_ACCEL +The standard gravitational acceleration on Earth, @math{g}. + +@item GSL_CONST_MKSA_SOLAR_MASS +The mass of the Sun. +@end table + +@node Atomic and Nuclear Physics +@section Atomic and Nuclear Physics +@cindex atomic physics, constants +@cindex nuclear physics, constants +@table @code +@item GSL_CONST_MKSA_ELECTRON_CHARGE +The charge of the electron, @math{e}. + +@item GSL_CONST_MKSA_ELECTRON_VOLT +The energy of 1 electron volt, @math{eV}. + +@item GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS +The unified atomic mass, @math{amu}. + +@item GSL_CONST_MKSA_MASS_ELECTRON +The mass of the electron, @math{m_e}. + +@item GSL_CONST_MKSA_MASS_MUON +The mass of the muon, @math{m_\mu}. + +@item GSL_CONST_MKSA_MASS_PROTON +The mass of the proton, @math{m_p}. + +@item GSL_CONST_MKSA_MASS_NEUTRON +The mass of the neutron, @math{m_n}. + +@item GSL_CONST_NUM_FINE_STRUCTURE +The electromagnetic fine structure constant @math{\alpha}. + +@item GSL_CONST_MKSA_RYDBERG +The Rydberg constant, @math{Ry}, in units of energy. This is related to +the Rydberg inverse wavelength @math{R_\infty} by @math{Ry = h c R_\infty}. + +@item GSL_CONST_MKSA_BOHR_RADIUS +The Bohr radius, @math{a_0}. + +@item GSL_CONST_MKSA_ANGSTROM +The length of 1 angstrom. + +@item GSL_CONST_MKSA_BARN +The area of 1 barn. + +@item GSL_CONST_MKSA_BOHR_MAGNETON +The Bohr Magneton, @math{\mu_B}. + +@item GSL_CONST_MKSA_NUCLEAR_MAGNETON +The Nuclear Magneton, @math{\mu_N}. + +@item GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT +The absolute value of the magnetic moment of the electron, @math{\mu_e}. +The physical magnetic moment of the electron is negative. + +@item GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT +The magnetic moment of the proton, @math{\mu_p}. + +@item GSL_CONST_MKSA_THOMSON_CROSS_SECTION +The Thomson cross section, @math{\sigma_T}. + +@item GSL_CONST_MKSA_DEBYE +The electric dipole moment of 1 Debye, @math{D}. +@end table + + +@node Measurement of Time +@section Measurement of Time +@cindex time units +@table @code +@item GSL_CONST_MKSA_MINUTE +The number of seconds in 1 minute. + +@item GSL_CONST_MKSA_HOUR +The number of seconds in 1 hour. + +@item GSL_CONST_MKSA_DAY +The number of seconds in 1 day. + +@item GSL_CONST_MKSA_WEEK +The number of seconds in 1 week. +@end table + + +@node Imperial Units +@section Imperial Units +@cindex imperial units +@cindex units, imperial +@table @code +@item GSL_CONST_MKSA_INCH +The length of 1 inch. + +@item GSL_CONST_MKSA_FOOT +The length of 1 foot. + +@item GSL_CONST_MKSA_YARD +The length of 1 yard. + +@item GSL_CONST_MKSA_MILE +The length of 1 mile. + +@item GSL_CONST_MKSA_MIL +The length of 1 mil (1/1000th of an inch). +@end table + + +@node Speed and Nautical Units +@section Speed and Nautical Units +@cindex nautical units + +@table @code +@item GSL_CONST_MKSA_KILOMETERS_PER_HOUR +The speed of 1 kilometer per hour. + +@item GSL_CONST_MKSA_MILES_PER_HOUR +The speed of 1 mile per hour. + +@item GSL_CONST_MKSA_NAUTICAL_MILE +The length of 1 nautical mile. + +@item GSL_CONST_MKSA_FATHOM +The length of 1 fathom. + +@item GSL_CONST_MKSA_KNOT +The speed of 1 knot. +@end table + + +@node Printers Units +@section Printers Units +@cindex printers units + +@table @code +@item GSL_CONST_MKSA_POINT +The length of 1 printer's point (1/72 inch). + +@item GSL_CONST_MKSA_TEXPOINT +The length of 1 TeX point (1/72.27 inch). +@end table + + +@node Volume Area and Length +@section Volume, Area and Length +@cindex volume units + +@table @code +@item GSL_CONST_MKSA_MICRON +The length of 1 micron. + +@item GSL_CONST_MKSA_HECTARE +The area of 1 hectare. + +@item GSL_CONST_MKSA_ACRE +The area of 1 acre. + +@item GSL_CONST_MKSA_LITER +The volume of 1 liter. + +@item GSL_CONST_MKSA_US_GALLON +The volume of 1 US gallon. + +@item GSL_CONST_MKSA_CANADIAN_GALLON +The volume of 1 Canadian gallon. + +@item GSL_CONST_MKSA_UK_GALLON +The volume of 1 UK gallon. + +@item GSL_CONST_MKSA_QUART +The volume of 1 quart. + +@item GSL_CONST_MKSA_PINT +The volume of 1 pint. +@end table + + +@comment @node Cookery +@comment @section Cookery +@comment @commentindex cookery units + +@comment @table @commentode +@comment @item GSL_CONST_MKSA_CUP +@comment The volume of 1 cup. + +@comment @item GSL_CONST_MKSA_FLUID_OUNCE +@comment The volume of 1 fluid ounce. + +@comment @item GSL_CONST_MKSA_TABLESPOON +@comment The volume of 1 tablespoon. + +@comment @item GSL_CONST_MKSA_TEASPOON +@comment The volume of 1 teaspoon. +@comment @end table + + +@node Mass and Weight +@section Mass and Weight +@cindex mass, units of +@cindex weight, units of +@table @code +@item GSL_CONST_MKSA_POUND_MASS +The mass of 1 pound. + +@item GSL_CONST_MKSA_OUNCE_MASS +The mass of 1 ounce. + +@item GSL_CONST_MKSA_TON +The mass of 1 ton. + +@item GSL_CONST_MKSA_METRIC_TON +The mass of 1 metric ton (1000 kg). + +@item GSL_CONST_MKSA_UK_TON +The mass of 1 UK ton. + +@item GSL_CONST_MKSA_TROY_OUNCE +The mass of 1 troy ounce. + +@item GSL_CONST_MKSA_CARAT +The mass of 1 carat. + +@item GSL_CONST_MKSA_GRAM_FORCE +The force of 1 gram weight. + +@item GSL_CONST_MKSA_POUND_FORCE +The force of 1 pound weight. + +@item GSL_CONST_MKSA_KILOPOUND_FORCE +The force of 1 kilopound weight. + +@item GSL_CONST_MKSA_POUNDAL +The force of 1 poundal. +@end table + + +@node Thermal Energy and Power +@section Thermal Energy and Power +@cindex energy, units of +@cindex power, units of +@cindex thermal energy, units of +@table @code +@item GSL_CONST_MKSA_CALORIE +The energy of 1 calorie. + +@item GSL_CONST_MKSA_BTU +The energy of 1 British Thermal Unit, @math{btu}. + +@item GSL_CONST_MKSA_THERM +The energy of 1 Therm. + +@item GSL_CONST_MKSA_HORSEPOWER +The power of 1 horsepower. +@end table + + +@node Pressure +@section Pressure +@cindex pressure, units of +@table @code +@item GSL_CONST_MKSA_BAR +The pressure of 1 bar. + +@item GSL_CONST_MKSA_STD_ATMOSPHERE +The pressure of 1 standard atmosphere. + +@item GSL_CONST_MKSA_TORR +The pressure of 1 torr. + +@item GSL_CONST_MKSA_METER_OF_MERCURY +The pressure of 1 meter of mercury. + +@item GSL_CONST_MKSA_INCH_OF_MERCURY +The pressure of 1 inch of mercury. + +@item GSL_CONST_MKSA_INCH_OF_WATER +The pressure of 1 inch of water. + +@item GSL_CONST_MKSA_PSI +The pressure of 1 pound per square inch. +@end table + +@node Viscosity +@section Viscosity +@cindex viscosity, units of +@table @code +@item GSL_CONST_MKSA_POISE +The dynamic viscosity of 1 poise. + +@item GSL_CONST_MKSA_STOKES +The kinematic viscosity of 1 stokes. +@end table + + +@node Light and Illumination +@section Light and Illumination +@cindex light, units of +@cindex illumination, units of + +@table @code +@item GSL_CONST_MKSA_STILB +The luminance of 1 stilb. + +@item GSL_CONST_MKSA_LUMEN +The luminous flux of 1 lumen. + +@item GSL_CONST_MKSA_LUX +The illuminance of 1 lux. + +@item GSL_CONST_MKSA_PHOT +The illuminance of 1 phot. + +@item GSL_CONST_MKSA_FOOTCANDLE +The illuminance of 1 footcandle. + +@item GSL_CONST_MKSA_LAMBERT +The luminance of 1 lambert. + +@item GSL_CONST_MKSA_FOOTLAMBERT +The luminance of 1 footlambert. +@end table + + +@node Radioactivity +@section Radioactivity +@cindex radioactivity, units of +@table @code +@item GSL_CONST_MKSA_CURIE +The activity of 1 curie. + +@item GSL_CONST_MKSA_ROENTGEN +The exposure of 1 roentgen. + +@item GSL_CONST_MKSA_RAD +The absorbed dose of 1 rad. +@end table + + +@node Force and Energy +@section Force and Energy +@cindex force and energy, units of +@table @code +@item GSL_CONST_MKSA_NEWTON +The SI unit of force, 1 Newton. + +@item GSL_CONST_MKSA_DYNE +The force of 1 Dyne = @c{$10^{-5}$} +@math{10^-5} Newton. + +@item GSL_CONST_MKSA_JOULE +The SI unit of energy, 1 Joule. + +@item GSL_CONST_MKSA_ERG +The energy 1 erg = @c{$10^{-7}$} +@math{10^-7} Joule. +@end table + + +@node Prefixes +@section Prefixes +@cindex prefixes +@cindex constants, prefixes + +These constants are dimensionless scaling factors. + +@table @code +@item GSL_CONST_NUM_YOTTA +@c{$10^{24}$} +@math{10^24} + +@item GSL_CONST_NUM_ZETTA +@c{$10^{21}$} +@math{10^21} + +@item GSL_CONST_NUM_EXA +@c{$10^{18}$} +@math{10^18} + +@item GSL_CONST_NUM_PETA +@c{$10^{15}$} +@math{10^15} + +@item GSL_CONST_NUM_TERA +@c{$10^{12}$} +@math{10^12} + +@item GSL_CONST_NUM_GIGA +@math{10^9} + +@item GSL_CONST_NUM_MEGA +@math{10^6} + +@item GSL_CONST_NUM_KILO +@math{10^3} + +@item GSL_CONST_NUM_MILLI +@c{$10^{-3}$} +@math{10^-3} + +@item GSL_CONST_NUM_MICRO +@c{$10^{-6}$} +@math{10^-6} + +@item GSL_CONST_NUM_NANO +@c{$10^{-9}$} +@math{10^-9} + +@item GSL_CONST_NUM_PICO +@c{$10^{-12}$} +@math{10^-12} + +@item GSL_CONST_NUM_FEMTO +@c{$10^{-15}$} +@math{10^-15} + +@item GSL_CONST_NUM_ATTO +@c{$10^{-18}$} +@math{10^-18} + +@item GSL_CONST_NUM_ZEPTO +@c{$10^{-21}$} +@math{10^-21} + +@item GSL_CONST_NUM_YOCTO +@c{$10^{-24}$} +@math{10^-24} +@end table + +@node Physical Constant Examples +@section Examples + +The following program demonstrates the use of the physical constants in +a calculation. In this case, the goal is to calculate the range of +light-travel times from Earth to Mars. + +The required data is the average distance of each planet from the Sun in +astronomical units (the eccentricities and inclinations of the orbits +will be neglected for the purposes of this calculation). The average +radius of the orbit of Mars is 1.52 astronomical units, and for the +orbit of Earth it is 1 astronomical unit (by definition). These values +are combined with the MKSA values of the constants for the speed of +light and the length of an astronomical unit to produce a result for the +shortest and longest light-travel times in seconds. The figures are +converted into minutes before being displayed. + +@example +@verbatiminclude examples/const.c +@end example + +@noindent +Here is the output from the program, + +@example +@verbatiminclude examples/const.out +@end example + +@node Physical Constant References and Further Reading +@section References and Further Reading + +The authoritative sources for physical constants are the 2006 CODATA +recommended values, published in the article below. Further +information on the values of physical constants is also available from +the NIST website. + +@itemize @w{} +@item P.J. Mohr, B.N. Taylor, D.B. Newell, ``CODATA Recommended +Values of the Fundamental Physical Constants: 2006'', Reviews of +Modern Physics, 80(2), pp. 633--730 (2008). +@item @uref{http://www.physics.nist.gov/cuu/Constants/index.html} +@item @uref{http://physics.nist.gov/Pubs/SP811/appenB9.html} +@end itemize + diff --git a/software/gsl-1.15/doc/debug.texi b/software/gsl-1.15/doc/debug.texi new file mode 100644 index 000000000..3bf71106a --- /dev/null +++ b/software/gsl-1.15/doc/debug.texi @@ -0,0 +1,389 @@ +This chapter describes some tips and tricks for debugging numerical +programs which use GSL. + +@menu +* Using gdb:: +* Examining floating point registers:: +* Handling floating point exceptions:: +* GCC warning options for numerical programs:: +* Debugging References:: +@end menu + +@node Using gdb +@section Using gdb +@cindex gdb +@cindex debugging numerical programs +@cindex breakpoints +Any errors reported by the library are passed to the function +@code{gsl_error}. By running your programs under gdb and setting a +breakpoint in this function you can automatically catch any library +errors. You can add a breakpoint for every session by putting + +@example +break gsl_error +@end example +@comment + +@noindent +into your @file{.gdbinit} file in the directory where your program is +started. + +If the breakpoint catches an error then you can use a backtrace +(@code{bt}) to see the call-tree, and the arguments which possibly +caused the error. By moving up into the calling function you can +investigate the values of variables at that point. Here is an example +from the program @code{fft/test_trap}, which contains the following +line, + +@smallexample +status = gsl_fft_complex_wavetable_alloc (0, &complex_wavetable); +@end smallexample + +@noindent +The function @code{gsl_fft_complex_wavetable_alloc} takes the length of +an FFT as its first argument. When this line is executed an error will +be generated because the length of an FFT is not allowed to be zero. + +To debug this problem we start @code{gdb}, using the file +@file{.gdbinit} to define a breakpoint in @code{gsl_error}, + +@smallexample +$ gdb test_trap + +GDB is free software and you are welcome to distribute copies +of it under certain conditions; type "show copying" to see +the conditions. There is absolutely no warranty for GDB; +type "show warranty" for details. GDB 4.16 (i586-debian-linux), +Copyright 1996 Free Software Foundation, Inc. + +Breakpoint 1 at 0x8050b1e: file error.c, line 14. +@end smallexample + +@noindent +When we run the program this breakpoint catches the error and shows the +reason for it. + +@smallexample +(gdb) run +Starting program: test_trap + +Breakpoint 1, gsl_error (reason=0x8052b0d + "length n must be positive integer", + file=0x8052b04 "c_init.c", line=108, gsl_errno=1) + at error.c:14 +14 if (gsl_error_handler) +@end smallexample +@comment + +@noindent +The first argument of @code{gsl_error} is always a string describing the +error. Now we can look at the backtrace to see what caused the problem, + +@smallexample +(gdb) bt +#0 gsl_error (reason=0x8052b0d + "length n must be positive integer", + file=0x8052b04 "c_init.c", line=108, gsl_errno=1) + at error.c:14 +#1 0x8049376 in gsl_fft_complex_wavetable_alloc (n=0, + wavetable=0xbffff778) at c_init.c:108 +#2 0x8048a00 in main (argc=1, argv=0xbffff9bc) + at test_trap.c:94 +#3 0x80488be in ___crt_dummy__ () +@end smallexample +@comment + +@noindent +We can see that the error was generated in the function +@code{gsl_fft_complex_wavetable_alloc} when it was called with an +argument of @var{n=0}. The original call came from line 94 in the +file @file{test_trap.c}. + +By moving up to the level of the original call we can find the line that +caused the error, + +@smallexample +(gdb) up +#1 0x8049376 in gsl_fft_complex_wavetable_alloc (n=0, + wavetable=0xbffff778) at c_init.c:108 +108 GSL_ERROR ("length n must be positive integer", GSL_EDOM); +(gdb) up +#2 0x8048a00 in main (argc=1, argv=0xbffff9bc) + at test_trap.c:94 +94 status = gsl_fft_complex_wavetable_alloc (0, + &complex_wavetable); +@end smallexample +@comment + +@noindent +Thus we have found the line that caused the problem. From this point we +could also print out the values of other variables such as +@code{complex_wavetable}. + +@node Examining floating point registers +@section Examining floating point registers +@cindex floating point registers + +The contents of floating point registers can be examined using the +command @code{info float} (on supported platforms). + +@smallexample +(gdb) info float + st0: 0xc4018b895aa17a945000 Valid Normal -7.838871e+308 + st1: 0x3ff9ea3f50e4d7275000 Valid Normal 0.0285946 + st2: 0x3fe790c64ce27dad4800 Valid Normal 6.7415931e-08 + st3: 0x3ffaa3ef0df6607d7800 Spec Normal 0.0400229 + st4: 0x3c028000000000000000 Valid Normal 4.4501477e-308 + st5: 0x3ffef5412c22219d9000 Zero Normal 0.9580257 + st6: 0x3fff8000000000000000 Valid Normal 1 + st7: 0xc4028b65a1f6d243c800 Valid Normal -1.566206e+309 + fctrl: 0x0272 53 bit; NEAR; mask DENOR UNDER LOS; + fstat: 0xb9ba flags 0001; top 7; excep DENOR OVERF UNDER LOS + ftag: 0x3fff + fip: 0x08048b5c + fcs: 0x051a0023 + fopoff: 0x08086820 + fopsel: 0x002b +@end smallexample + +@noindent +Individual registers can be examined using the variables @var{$reg}, +where @var{reg} is the register name. + +@smallexample +(gdb) p $st1 +$1 = 0.02859464454261210347719 +@end smallexample + +@node Handling floating point exceptions +@section Handling floating point exceptions +@cindex exceptions, floating point +@cindex floating point exceptions + +It is possible to stop the program whenever a @code{SIGFPE} floating +point exception occurs. This can be useful for finding the cause of an +unexpected infinity or @code{NaN}. The current handler settings can be +shown with the command @code{info signal SIGFPE}. + +@smallexample +(gdb) info signal SIGFPE +Signal Stop Print Pass to program Description +SIGFPE Yes Yes Yes Arithmetic exception +@end smallexample + +@noindent +Unless the program uses a signal handler the default setting should be +changed so that SIGFPE is not passed to the program, as this would cause +it to exit. The command @code{handle SIGFPE stop nopass} prevents this. + +@smallexample +(gdb) handle SIGFPE stop nopass +Signal Stop Print Pass to program Description +SIGFPE Yes Yes No Arithmetic exception +@end smallexample + +@noindent +Depending on the platform it may be necessary to instruct the kernel to +generate signals for floating point exceptions. For programs using GSL +this can be achieved using the @code{GSL_IEEE_MODE} environment variable +in conjunction with the function @code{gsl_ieee_env_setup} as described +in @pxref{IEEE floating-point arithmetic}. + +@example +(gdb) set env GSL_IEEE_MODE=double-precision +@end example + + +@node GCC warning options for numerical programs +@section GCC warning options for numerical programs +@cindex warning options +@cindex gcc warning options + +Writing reliable numerical programs in C requires great care. The +following GCC warning options are recommended when compiling numerical +programs: + +@comment Uninitialized variables, conversions to and from integers or from +@comment signed to unsigned integers can all cause hard-to-find problems. For +@comment many non-numerical programs compiling with @code{gcc}'s warning option +@comment @code{-Wall} provides a good check against common errors. However, for +@comment numerical programs @code{-Wall} is not enough. + +@comment If you are unconvinced take a look at this program which contains an +@comment error that can occur in numerical code, + +@comment @example +@comment #include +@comment #include + +@comment double f (int x); + +@comment int main () +@comment @{ +@comment double a = 1.5; +@comment double y = f(a); +@comment printf("a = %g, sqrt(a) = %g\n", a, y); +@comment return 0; +@comment @} + +@comment double f(x) @{ +@comment return sqrt(x); +@comment @} +@comment @end example + +@comment @noindent +@comment This code compiles cleanly with @code{-Wall} but produces some strange +@comment output, + +@comment @example +@comment bash$ gcc -Wall tmp.c -lm +@comment bash$ ./a.out +@comment a = 1.5, sqrt(a) = 1 +@comment @end example + +@comment @noindent +@comment Note that adding @code{-ansi} does not help here, since the program does +@comment not contain any invalid constructs. What is happening is that the +@comment prototype for the function @code{f(int x)} is not consistent with the +@comment function call @code{f(y)}, where @code{y} is a floating point +@comment number. This results in the argument being silently converted to an +@comment integer. This is valid C, but in a numerical program it also likely to +@comment be a programming error so we would like to be warned about it. (If we +@comment genuinely wanted to convert @code{y} to an integer then we could use an +@comment explicit cast, @code{(int)y}). + +@comment Fortunately GCC provides many additional warnings which can alert you to +@comment problems such as this. You just have to remember to use them. Here is a +@comment set of recommended warning options for numerical programs. + +@example +gcc -ansi -pedantic -Werror -Wall -W + -Wmissing-prototypes -Wstrict-prototypes + -Wconversion -Wshadow -Wpointer-arith + -Wcast-qual -Wcast-align + -Wwrite-strings -Wnested-externs + -fshort-enums -fno-common -Dinline= -g -O2 +@end example + +@noindent +For details of each option consult the manual @cite{Using and Porting +GCC}. The following table gives a brief explanation of what types of +errors these options catch. + +@table @code +@item -ansi -pedantic +Use ANSI C, and reject any non-ANSI extensions. These flags help in +writing portable programs that will compile on other systems. +@item -Werror +Consider warnings to be errors, so that compilation stops. This prevents +warnings from scrolling off the top of the screen and being lost. You +won't be able to compile the program until it is completely +warning-free. +@item -Wall +This turns on a set of warnings for common programming problems. You +need @code{-Wall}, but it is not enough on its own. +@item -O2 +Turn on optimization. The warnings for uninitialized variables in +@code{-Wall} rely on the optimizer to analyze the code. If there is no +optimization then these warnings aren't generated. +@item -W +This turns on some extra warnings not included in @code{-Wall}, such as +missing return values and comparisons between signed and unsigned +integers. +@item -Wmissing-prototypes -Wstrict-prototypes +Warn if there are any missing or inconsistent prototypes. Without +prototypes it is harder to detect problems with incorrect arguments. +@item -Wconversion +The main use of this option is to warn about conversions from signed to +unsigned integers. For example, @code{unsigned int x = -1}. If you need +to perform such a conversion you can use an explicit cast. +@item -Wshadow +This warns whenever a local variable shadows another local variable. If +two variables have the same name then it is a potential source of +confusion. +@item -Wpointer-arith -Wcast-qual -Wcast-align +These options warn if you try to do pointer arithmetic for types which +don't have a size, such as @code{void}, if you remove a @code{const} +cast from a pointer, or if you cast a pointer to a type which has a +different size, causing an invalid alignment. +@item -Wwrite-strings +This option gives string constants a @code{const} qualifier so that it +will be a compile-time error to attempt to overwrite them. +@item -fshort-enums +This option makes the type of @code{enum} as short as possible. Normally +this makes an @code{enum} different from an @code{int}. Consequently any +attempts to assign a pointer-to-int to a pointer-to-enum will generate a +cast-alignment warning. +@item -fno-common +This option prevents global variables being simultaneously defined in +different object files (you get an error at link time). Such a variable +should be defined in one file and referred to in other files with an +@code{extern} declaration. +@item -Wnested-externs +This warns if an @code{extern} declaration is encountered within a +function. +@item -Dinline= +The @code{inline} keyword is not part of ANSI C. Thus if you want to use +@code{-ansi} with a program which uses inline functions you can use this +preprocessor definition to remove the @code{inline} keywords. +@item -g +It always makes sense to put debugging symbols in the executable so that +you can debug it using @code{gdb}. The only effect of debugging symbols +is to increase the size of the file, and you can use the @code{strip} +command to remove them later if necessary. +@end table + +@comment For comparison, this is what happens when the test program above is +@comment compiled with these options. + +@comment @example +@comment bash$ gcc -ansi -pedantic -Werror -W -Wall -Wtraditional +@comment -Wconversion -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align +@comment -Wwrite-strings -Waggregate-return -Wstrict-prototypes -fshort-enums +@comment -fno-common -Wmissing-prototypes -Wnested-externs -Dinline= +@comment -g -O4 tmp.c +@comment cc1: warnings being treated as errors +@comment tmp.c:7: warning: function declaration isn't a prototype +@comment tmp.c: In function `main': +@comment tmp.c:9: warning: passing arg 1 of `f' as integer rather than floating +@comment due to prototype +@comment tmp.c: In function `f': +@comment tmp.c:14: warning: type of `x' defaults to `int' +@comment tmp.c:15: warning: passing arg 1 of `sqrt' as floating rather than integer +@comment due to prototype +@comment make: *** [tmp] Error 1 +@comment @end example + +@comment @noindent +@comment The error in the prototype is flagged, plus the fact that we should have +@comment defined main as @code{int main (void)} in ANSI C. Clearly there is some +@comment work to do before this program is ready to run. + +@node Debugging References +@section References and Further Reading + +The following books are essential reading for anyone writing and +debugging numerical programs with @sc{gcc} and @sc{gdb}. + +@itemize @w{} +@item +R.M. Stallman, @cite{Using and Porting GNU CC}, Free Software +Foundation, ISBN 1882114388 + +@item +R.M. Stallman, R.H. Pesch, @cite{Debugging with GDB: The GNU +Source-Level Debugger}, Free Software Foundation, ISBN 1882114779 +@end itemize + +@noindent +For a tutorial introduction to the GNU C Compiler and related programs, +see + +@itemize @w{} +@item +B.J. Gough, @url{http://www.network-theory.co.uk/gcc/intro/,@cite{An +Introduction to GCC},@cite{An Introduction to GCC}}, Network Theory +Ltd, ISBN 0954161793 +@end itemize + + diff --git a/software/gsl-1.15/doc/dht.texi b/software/gsl-1.15/doc/dht.texi new file mode 100644 index 000000000..92286f207 --- /dev/null +++ b/software/gsl-1.15/doc/dht.texi @@ -0,0 +1,159 @@ +@cindex discrete Hankel transforms +@cindex Hankel transforms, discrete +@cindex transforms, Hankel +This chapter describes functions for performing Discrete Hankel +Transforms (DHTs). The functions are declared in the header file +@file{gsl_dht.h}. + +@menu +* Discrete Hankel Transform Definition:: +* Discrete Hankel Transform Functions:: +* Discrete Hankel Transform References:: +@end menu + +@node Discrete Hankel Transform Definition +@section Definitions + +The discrete Hankel transform acts on a vector of sampled data, where +the samples are assumed to have been taken at points related to the +zeroes of a Bessel function of fixed order; compare this to the case of +the discrete Fourier transform, where samples are taken at points +related to the zeroes of the sine or cosine function. + +Specifically, let @math{f(t)} be a function on the unit interval and +@c{$j_{\nu,m}$} +@math{j_(\nu,m)} the @math{m}-th zero of the Bessel function +@math{J_\nu(x)}. Then the finite @math{\nu}-Hankel transform of +@math{f(t)} is defined to be the set of numbers @math{g_m} given by, +@tex +\beforedisplay +$$ +g_m = \int_0^1 t dt\, J_\nu(j_{\nu,m}t) f(t), +$$ +\afterdisplay +@end tex +@ifinfo +@example +g_m = \int_0^1 t dt J_\nu(j_(\nu,m)t) f(t), +@end example + +@end ifinfo +@noindent +so that, +@tex +\beforedisplay +$$ +f(t) = \sum_{m=1}^\infty {{2 J_\nu(j_{\nu,m}t)}\over{J_{\nu+1}(j_{\nu,m})^2}} g_m. +$$ +\afterdisplay +@end tex +@ifinfo +@example +f(t) = \sum_@{m=1@}^\infty (2 J_\nu(j_(\nu,m)t) / J_(\nu+1)(j_(\nu,m))^2) g_m. +@end example + +@end ifinfo +@noindent +Suppose that @math{f} is band-limited in the sense that +@math{g_m=0} for @math{m > M}. Then we have the following +fundamental sampling theorem. +@tex +\beforedisplay +$$ +g_m = {{2}\over{j_{\nu,M}^2}} + \sum_{k=1}^{M-1} f\left({{j_{\nu,k}}\over{j_{\nu,M}}}\right) + {{J_\nu(j_{\nu,m} j_{\nu,k} / j_{\nu,M})}\over{J_{\nu+1}(j_{\nu,k})^2}}. +$$ +\afterdisplay +@end tex +@ifinfo +@example +g_m = (2 / j_(\nu,M)^2) + \sum_@{k=1@}^@{M-1@} f(j_(\nu,k)/j_(\nu,M)) + (J_\nu(j_(\nu,m) j_(\nu,k) / j_(\nu,M)) / J_(\nu+1)(j_(\nu,k))^2). +@end example + +@end ifinfo +@noindent +It is this discrete expression which defines the discrete Hankel +transform. The kernel in the summation above defines the matrix of the +@math{\nu}-Hankel transform of size @math{M-1}. The coefficients of +this matrix, being dependent on @math{\nu} and @math{M}, must be +precomputed and stored; the @code{gsl_dht} object encapsulates this +data. The allocation function @code{gsl_dht_alloc} returns a +@code{gsl_dht} object which must be properly initialized with +@code{gsl_dht_init} before it can be used to perform transforms on data +sample vectors, for fixed @math{\nu} and @math{M}, using the +@code{gsl_dht_apply} function. The implementation allows a scaling of +the fundamental interval, for convenience, so that one can assume the +function is defined on the interval @math{[0,X]}, rather than the unit +interval. + +Notice that by assumption @math{f(t)} vanishes at the endpoints +of the interval, consistent with the inversion formula +and the sampling formula given above. Therefore, this transform +corresponds to an orthogonal expansion in eigenfunctions +of the Dirichlet problem for the Bessel differential equation. + + +@node Discrete Hankel Transform Functions +@section Functions + +@deftypefun {gsl_dht *} gsl_dht_alloc (size_t @var{size}) +@tpindex gsl_dht +This function allocates a Discrete Hankel transform object of size +@var{size}. +@end deftypefun + +@deftypefun int gsl_dht_init (gsl_dht * @var{t}, double @var{nu}, double @var{xmax}) +This function initializes the transform @var{t} for the given values of +@var{nu} and @var{xmax}. +@end deftypefun + +@deftypefun {gsl_dht *} gsl_dht_new (size_t @var{size}, double @var{nu}, double @var{xmax}) +This function allocates a Discrete Hankel transform object of size +@var{size} and initializes it for the given values of @var{nu} and +@var{xmax}. +@end deftypefun + +@deftypefun void gsl_dht_free (gsl_dht * @var{t}) +This function frees the transform @var{t}. +@end deftypefun + +@deftypefun int gsl_dht_apply (const gsl_dht * @var{t}, double * @var{f_in}, double * @var{f_out}) +This function applies the transform @var{t} to the array @var{f_in} +whose size is equal to the size of the transform. The result is stored +in the array @var{f_out} which must be of the same length. + +Applying this function to its output gives the original data +multiplied by @c{$(1/j_{\nu,M})^2$} +@math{(1/j_(\nu,M))^2}, up to numerical errors. +@end deftypefun + +@deftypefun double gsl_dht_x_sample (const gsl_dht * @var{t}, int @var{n}) +This function returns the value of the @var{n}-th sample point in the unit interval, +@c{${({j_{\nu,n+1}} / {j_{\nu,M}}}) X$} +@math{(j_@{\nu,n+1@}/j_@{\nu,M@}) X}. These are the +points where the function @math{f(t)} is assumed to be sampled. +@end deftypefun + +@deftypefun double gsl_dht_k_sample (const gsl_dht * @var{t}, int @var{n}) +This function returns the value of the @var{n}-th sample point in ``k-space'', +@c{${{j_{\nu,n+1}} / X}$} +@math{j_@{\nu,n+1@}/X}. +@end deftypefun + +@node Discrete Hankel Transform References +@section References and Further Reading + +The algorithms used by these functions are described in the following papers, + +@itemize @w{} +@item +H. Fisk Johnson, Comp.@: Phys.@: Comm.@: 43, 181 (1987). +@end itemize + +@itemize @w{} +@item +D. Lemoine, J. Chem.@: Phys.@: 101, 3936 (1994). +@end itemize diff --git a/software/gsl-1.15/doc/diff.texi b/software/gsl-1.15/doc/diff.texi new file mode 100644 index 000000000..17f466a8c --- /dev/null +++ b/software/gsl-1.15/doc/diff.texi @@ -0,0 +1,105 @@ +@cindex differentiation of functions, numeric +@cindex functions, numerical differentiation +@cindex derivatives, calculating numerically +@cindex numerical derivatives +@cindex slope, see numerical derivative + +The functions described in this chapter compute numerical derivatives by +finite differencing. An adaptive algorithm is used to find the best +choice of finite difference and to estimate the error in the derivative. +These functions are declared in the header file @file{gsl_deriv.h}. + +@menu +* Numerical Differentiation functions:: +* Numerical Differentiation Examples:: +* Numerical Differentiation References:: +@end menu + +@node Numerical Differentiation functions +@section Functions + +@deftypefun int gsl_deriv_central (const gsl_function * @var{f}, double @var{x}, double @var{h}, double * @var{result}, double * @var{abserr}) +This function computes the numerical derivative of the function @var{f} +at the point @var{x} using an adaptive central difference algorithm with +a step-size of @var{h}. The derivative is returned in @var{result} and an +estimate of its absolute error is returned in @var{abserr}. + +The initial value of @var{h} is used to estimate an optimal step-size, +based on the scaling of the truncation error and round-off error in the +derivative calculation. The derivative is computed using a 5-point rule +for equally spaced abscissae at @math{x-h}, @math{x-h/2}, @math{x}, +@math{x+h/2}, @math{x+h}, with an error estimate taken from the difference +between the 5-point rule and the corresponding 3-point rule @math{x-h}, +@math{x}, @math{x+h}. Note that the value of the function at @math{x} +does not contribute to the derivative calculation, so only 4-points are +actually used. +@end deftypefun + +@deftypefun int gsl_deriv_forward (const gsl_function * @var{f}, double @var{x}, double @var{h}, double * @var{result}, double * @var{abserr}) +This function computes the numerical derivative of the function @var{f} +at the point @var{x} using an adaptive forward difference algorithm with +a step-size of @var{h}. The function is evaluated only at points greater +than @var{x}, and never at @var{x} itself. The derivative is returned in +@var{result} and an estimate of its absolute error is returned in +@var{abserr}. This function should be used if @math{f(x)} has a +discontinuity at @var{x}, or is undefined for values less than @var{x}. + +The initial value of @var{h} is used to estimate an optimal step-size, +based on the scaling of the truncation error and round-off error in the +derivative calculation. The derivative at @math{x} is computed using an +``open'' 4-point rule for equally spaced abscissae at @math{x+h/4}, +@math{x+h/2}, @math{x+3h/4}, @math{x+h}, with an error estimate taken +from the difference between the 4-point rule and the corresponding +2-point rule @math{x+h/2}, @math{x+h}. +@end deftypefun + +@deftypefun int gsl_deriv_backward (const gsl_function * @var{f}, double @var{x}, double @var{h}, double * @var{result}, double * @var{abserr}) +This function computes the numerical derivative of the function @var{f} +at the point @var{x} using an adaptive backward difference algorithm +with a step-size of @var{h}. The function is evaluated only at points +less than @var{x}, and never at @var{x} itself. The derivative is +returned in @var{result} and an estimate of its absolute error is +returned in @var{abserr}. This function should be used if @math{f(x)} +has a discontinuity at @var{x}, or is undefined for values greater than +@var{x}. + +This function is equivalent to calling @code{gsl_deriv_forward} with a +negative step-size. +@end deftypefun + +@node Numerical Differentiation Examples +@section Examples + +The following code estimates the derivative of the function +@c{$f(x) = x^{3/2}$} +@math{f(x) = x^@{3/2@}} +at @math{x=2} and at @math{x=0}. The function @math{f(x)} is +undefined for @math{x<0} so the derivative at @math{x=0} is computed +using @code{gsl_deriv_forward}. + +@example +@verbatiminclude examples/diff.c +@end example + +@noindent +Here is the output of the program, + +@example +$ ./a.out +@verbatiminclude examples/diff.out +@end example + +@node Numerical Differentiation References +@section References and Further Reading + +The algorithms used by these functions are described in the following sources: + +@itemize @w{} +@item +Abramowitz and Stegun, @cite{Handbook of Mathematical Functions}, +Section 25.3.4, and Table 25.5 (Coefficients for Differentiation). + +@item +S.D. Conte and Carl de Boor, @cite{Elementary Numerical Analysis: An +Algorithmic Approach}, McGraw-Hill, 1972. +@end itemize diff --git a/software/gsl-1.15/doc/dwt-orig.eps b/software/gsl-1.15/doc/dwt-orig.eps new file mode 100644 index 000000000..2bf4de749 --- /dev/null +++ b/software/gsl-1.15/doc/dwt-orig.eps @@ -0,0 +1,2657 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Jul 22 17:12:05 2004 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 112 210 487 402 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 112 210 487 402 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 5760 Rect +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 130.678 218.1928 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2304 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 171.356 218.1928 ] concat +%I +[ +(32) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3168 5760 +3168 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3168 2304 +3168 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 214.556 218.1928 ] concat +%I +[ +(64) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 5760 +4032 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 257.756 218.1928 ] concat +%I +[ +(96) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4896 5760 +4896 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4896 2304 +4896 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 298.434 218.1928 ] concat +%I +[ +(128) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 5760 +5760 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 341.634 218.1928 ] concat +%I +[ +(160) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6624 5760 +6624 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6624 2304 +6624 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 384.834 218.1928 ] concat +%I +[ +(192) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 5760 +7488 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 428.034 218.1928 ] concat +%I +[ +(224) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8352 5760 +8352 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8352 2304 +8352 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 471.234 218.1928 ] concat +%I +[ +(256) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9216 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 112.6999 226.0284 ] concat +%I +[ +(-0.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9147 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2373 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 112.6999 245.2284 ] concat +%I +[ +(-0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2688 +9147 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2688 +2373 2688 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 264.4284 ] concat +%I +[ +(0.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3072 +9147 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +2373 3072 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 283.6284 ] concat +%I +[ +(0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9147 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2373 3456 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 302.8284 ] concat +%I +[ +(0.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3840 +9147 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3840 +2373 3840 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 322.0284 ] concat +%I +[ +(0.6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4224 +9147 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4224 +2373 4224 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 341.2284 ] concat +%I +[ +(0.8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9147 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2373 4608 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 360.4284 ] concat +%I +[ +(1.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4992 +9147 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4992 +2373 4992 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 379.6284 ] concat +%I +[ +(1.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5376 +9147 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5376 +2373 5376 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 398.8284 ] concat +%I +[ +(1.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9147 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2373 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9188 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2332 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2496 +9188 2496 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2496 +2332 2496 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2688 +9188 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2688 +2332 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2880 +9188 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2880 +2332 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3072 +9188 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +2332 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3264 +9188 3264 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3264 +2332 3264 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9188 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2332 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3648 +9188 3648 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3648 +2332 3648 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3840 +9188 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3840 +2332 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9188 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2332 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4224 +9188 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4224 +2332 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4416 +9188 4416 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4416 +2332 4416 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9188 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2332 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4800 +9188 4800 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4800 +2332 4800 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4992 +9188 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4992 +2332 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5184 +9188 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5184 +2332 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5376 +9188 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5376 +2332 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5568 +9188 5568 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5568 +2332 5568 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9188 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2332 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 34952 +1 0 0 [ 1.48 4.43 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +9216 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 256 +2304 3161 +2331 3161 +2358 3170 +2385 3209 +2412 3209 +2439 3199 +2466 3257 +2493 3266 +2520 3295 +2547 3305 +2574 3295 +2601 3276 +2628 3247 +2655 3266 +2682 3257 +2709 3257 +2736 3257 +2763 3247 +2790 3238 +2817 3228 +2844 3238 +2871 3266 +2898 3286 +2925 3295 +2952 3218 +2979 3142 +3006 3142 +3033 3113 +3060 3094 +3087 3055 +3114 3055 +3141 3065 +3168 3084 +3195 3074 +3222 3084 +3249 3065 +3276 3036 +3303 3026 +3330 3036 +3357 3036 +3384 3017 +3411 3026 +3438 3007 +3465 3055 +3492 3046 +3519 3055 +3546 3074 +3573 3026 +3600 3007 +3627 3036 +3654 3055 +3681 3065 +3708 3055 +3735 3017 +3762 2988 +3789 2998 +3816 2959 +3843 2873 +3870 2834 +3897 2777 +3924 2710 +3951 2662 +3978 2719 +4005 2892 +4032 3113 +4059 3382 +4086 3660 +4113 4140 +4140 4630 +4167 5071 +4194 5369 +4221 5494 +4248 5426 +4275 5138 +4302 4630 +4329 4006 +4356 3478 +4383 3170 +4410 2940 +4437 2825 +4464 2777 +4491 2815 +4518 2873 +4545 2940 +4572 2940 +4599 2950 +4626 2940 +4653 2959 +4680 2959 +4707 2959 +4734 2930 +4761 2950 +4788 2950 +4815 2950 +4842 2969 +4869 2930 +4896 2902 +4923 2902 +4950 2921 +4977 2930 +5004 2940 +5031 2911 +5058 2930 +5085 2950 +5112 2969 +5139 2940 +5166 2940 +5193 2911 +5220 2902 +5247 2902 +5274 2940 +5301 2940 +5328 2930 +5355 2911 +5382 2892 +5409 2921 +5436 2902 +5463 2911 +5490 2902 +5517 2892 +5544 2902 +5571 2921 +5598 2921 +5625 2930 +5652 2940 +5679 2911 +5706 2902 +5733 2940 +5760 2940 +5787 2950 +5814 2950 +5841 2902 +5868 2911 +5895 2930 +5922 2940 +5949 2969 +5976 2940 +6003 2930 +6030 2902 +6057 2921 +6084 2940 +6111 2940 +6138 2950 +6165 2911 +6192 2892 +6219 2892 +6246 2921 +6273 2930 +6300 2911 +6327 2892 +6354 2882 +6381 2882 +6408 2902 +6435 2892 +6462 2873 +6489 2882 +6516 2854 +6543 2863 +6570 2863 +6597 2882 +6624 2863 +6651 2825 +6678 2815 +6705 2825 +6732 2854 +6759 2834 +6786 2825 +6813 2815 +6840 2786 +6867 2806 +6894 2815 +6921 2825 +6948 2815 +6975 2786 +7002 2777 +7029 2806 +7056 2825 +7083 2834 +7110 2844 +7137 2854 +7164 2844 +7191 2902 +7218 2930 +7245 2978 +7272 2988 +7299 2998 +7326 2988 +7353 3036 +7380 3065 +7407 3084 +7434 3074 +7461 3055 +7488 3055 +7515 3074 +7542 3094 +7569 3113 +7596 3113 +7623 3074 +7650 3074 +7677 3084 +7704 3103 +7731 3103 +7758 3122 +7785 3074 +7812 3055 +7839 3103 +7866 3094 +7893 3113 +7920 3113 +7947 3074 +7974 3065 +8001 3094 +8028 3103 +8055 3084 +8082 3103 +8109 3084 +8136 3084 +8163 3094 +8190 3122 +8217 3132 +8244 3103 +8271 3094 +8298 3074 +8325 3084 +8352 3113 +8379 3084 +8406 3084 +8433 3084 +8460 3055 +8487 3084 +8514 3074 +8541 3084 +8568 3065 +8595 3046 +8622 3036 +8649 3046 +8676 3046 +8703 3055 +8730 3065 +8757 3026 +8784 3017 +8811 3026 +8838 3046 +8865 3055 +8892 3055 +8919 3026 +8946 3026 +8973 3026 +9000 3074 +9027 3055 +9054 3046 +9081 3036 +9108 3007 +9135 3046 +9162 3055 +9189 3055 +256 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/dwt-samp.eps b/software/gsl-1.15/doc/dwt-samp.eps new file mode 100644 index 000000000..14fd3a8f7 --- /dev/null +++ b/software/gsl-1.15/doc/dwt-samp.eps @@ -0,0 +1,2657 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Jul 22 17:12:13 2004 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 112 210 487 402 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 112 210 487 402 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 5760 Rect +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 130.678 218.1928 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2304 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 171.356 218.1928 ] concat +%I +[ +(32) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3168 5760 +3168 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3168 2304 +3168 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 214.556 218.1928 ] concat +%I +[ +(64) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 5760 +4032 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 257.756 218.1928 ] concat +%I +[ +(96) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4896 5760 +4896 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4896 2304 +4896 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 298.434 218.1928 ] concat +%I +[ +(128) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 5760 +5760 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 341.634 218.1928 ] concat +%I +[ +(160) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6624 5760 +6624 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6624 2304 +6624 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 384.834 218.1928 ] concat +%I +[ +(192) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 5760 +7488 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 428.034 218.1928 ] concat +%I +[ +(224) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8352 5760 +8352 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8352 2304 +8352 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 471.234 218.1928 ] concat +%I +[ +(256) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9216 5691 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2373 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 112.6999 226.0284 ] concat +%I +[ +(-0.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9147 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2373 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 112.6999 245.2284 ] concat +%I +[ +(-0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2688 +9147 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2688 +2373 2688 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 264.4284 ] concat +%I +[ +(0.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3072 +9147 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +2373 3072 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 283.6284 ] concat +%I +[ +(0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9147 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2373 3456 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 302.8284 ] concat +%I +[ +(0.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3840 +9147 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3840 +2373 3840 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 322.0284 ] concat +%I +[ +(0.6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4224 +9147 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4224 +2373 4224 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 341.2284 ] concat +%I +[ +(0.8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9147 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2373 4608 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 360.4284 ] concat +%I +[ +(1.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4992 +9147 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4992 +2373 4992 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 379.6284 ] concat +%I +[ +(1.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5376 +9147 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5376 +2373 5376 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-9-*-*-*-*-*-*-* +/Helvetica 9.072000 SetF +%I t +[ 1 0 0 1 117.9979 398.8284 ] concat +%I +[ +(1.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9147 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2373 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9188 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2332 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2496 +9188 2496 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2496 +2332 2496 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2688 +9188 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2688 +2332 2688 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2880 +9188 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2880 +2332 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3072 +9188 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +2332 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3264 +9188 3264 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3264 +2332 3264 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9188 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2332 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3648 +9188 3648 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3648 +2332 3648 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3840 +9188 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3840 +2332 3840 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9188 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2332 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4224 +9188 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4224 +2332 4224 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4416 +9188 4416 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4416 +2332 4416 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9188 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2332 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4800 +9188 4800 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4800 +2332 4800 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4992 +9188 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4992 +2332 4992 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5184 +9188 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5184 +2332 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5376 +9188 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5376 +2332 5376 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5568 +9188 5568 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5568 +2332 5568 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9188 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2332 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 34952 +1 0 0 [ 1.48 4.43 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3072 +9216 3072 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 256 +2304 3104 +2331 3133 +2358 3151 +2385 3172 +2412 3182 +2439 3195 +2466 3211 +2493 3226 +2520 3230 +2547 3238 +2574 3248 +2601 3257 +2628 3269 +2655 3280 +2682 3291 +2709 3302 +2736 3272 +2763 3253 +2790 3244 +2817 3233 +2844 3233 +2871 3230 +2898 3224 +2925 3219 +2952 3170 +2979 3133 +3006 3107 +3033 3079 +3060 3062 +3087 3042 +3114 3018 +3141 2996 +3168 3041 +3195 3068 +3222 3077 +3249 3091 +3276 3087 +3303 3088 +3330 3093 +3357 3097 +3384 3083 +3411 3074 +3438 3070 +3465 3064 +3492 3064 +3519 3062 +3546 3059 +3573 3056 +3600 3044 +3627 3036 +3654 3029 +3681 3022 +3708 3016 +3735 3011 +3762 3004 +3789 2998 +3816 2918 +3843 2858 +3870 2817 +3897 2771 +3924 2760 +3951 2739 +3978 2709 +4005 2681 +4032 3062 +4059 3334 +4086 3727 +4113 4088 +4140 4611 +4167 5091 +4194 5289 +4221 5563 +4248 5317 +4275 5210 +4302 4533 +4329 4009 +4356 3548 +4383 3070 +4410 2955 +4437 2743 +4464 2875 +4491 2915 +4518 2863 +4545 2836 +4572 2893 +4599 2928 +4626 2940 +4653 2958 +4680 2933 +4707 2920 +4734 2918 +4761 2913 +4788 2920 +4815 2924 +4842 2924 +4869 2925 +4896 2920 +4923 2917 +4950 2916 +4977 2913 +5004 2913 +5031 2912 +5058 2911 +5085 2910 +5112 2910 +5139 2910 +5166 2910 +5193 2910 +5220 2909 +5247 2908 +5274 2908 +5301 2907 +5328 2907 +5355 2907 +5382 2907 +5409 2906 +5436 2906 +5463 2905 +5490 2905 +5517 2905 +5544 2904 +5571 2904 +5598 2903 +5625 2903 +5652 2902 +5679 2902 +5706 2902 +5733 2901 +5760 2901 +5787 2901 +5814 2900 +5841 2900 +5868 2900 +5895 2900 +5922 2899 +5949 2899 +5976 2899 +6003 2898 +6030 2898 +6057 2898 +6084 2897 +6111 2897 +6138 2897 +6165 2896 +6192 2896 +6219 2895 +6246 2895 +6273 2895 +6300 2894 +6327 2894 +6354 2894 +6381 2893 +6408 2893 +6435 2892 +6462 2892 +6489 2892 +6516 2891 +6543 2891 +6570 2891 +6597 2890 +6624 2873 +6651 2860 +6678 2852 +6705 2843 +6732 2838 +6759 2832 +6786 2824 +6813 2817 +6840 2815 +6867 2811 +6894 2806 +6921 2802 +6948 2796 +6975 2791 +7002 2785 +7029 2780 +7056 2839 +7083 2881 +7110 2906 +7137 2935 +7164 2947 +7191 2964 +7218 2985 +7245 3005 +7272 3008 +7299 3015 +7326 3027 +7353 3038 +7380 3053 +7407 3067 +7434 3080 +7461 3093 +7488 3068 +7515 3052 +7542 3048 +7569 3040 +7596 3043 +7623 3043 +7650 3040 +7677 3038 +7704 3046 +7731 3052 +7758 3055 +7785 3058 +7812 3059 +7839 3061 +7866 3063 +7893 3065 +7920 3077 +7947 3087 +7974 3094 +8001 3102 +8028 3106 +8055 3112 +8082 3118 +8109 3125 +8136 3128 +8163 3132 +8190 3137 +8217 3142 +8244 3147 +8271 3152 +8298 3157 +8325 3162 +8352 3139 +8379 3123 +8406 3115 +8433 3105 +8460 3102 +8487 3097 +8514 3091 +8541 3085 +8568 3086 +8595 3086 +8622 3083 +8649 3081 +8676 3077 +8703 3073 +8730 3070 +8757 3067 +8784 3072 +8811 3074 +8838 3075 +8865 3076 +8892 3074 +8919 3074 +8946 3074 +8973 3074 +9000 3072 +9027 3070 +9054 3069 +9081 3068 +9108 3067 +9135 3066 +9162 3065 +9189 3064 +256 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/dwt.texi b/software/gsl-1.15/doc/dwt.texi new file mode 100644 index 000000000..56e4068d5 --- /dev/null +++ b/software/gsl-1.15/doc/dwt.texi @@ -0,0 +1,452 @@ +@cindex DWT, see wavelet transforms +@cindex wavelet transforms +@cindex transforms, wavelet + +This chapter describes functions for performing Discrete Wavelet +Transforms (DWTs). The library includes wavelets for real data in both +one and two dimensions. The wavelet functions are declared in the header +files @file{gsl_wavelet.h} and @file{gsl_wavelet2d.h}. + +@menu +* DWT Definitions:: +* DWT Initialization:: +* DWT Transform Functions:: +* DWT Examples:: +* DWT References:: +@end menu + +@node DWT Definitions +@section Definitions +@cindex DWT, mathematical definition + +The continuous wavelet transform and its inverse are defined by +the relations, +@iftex +@tex +\beforedisplay +$$ +w(s, \tau) = \int_{-\infty}^\infty f(t) * \psi^*_{s,\tau}(t) dt +$$ +\afterdisplay +@end tex +@end iftex +@ifinfo + +@example +w(s,\tau) = \int f(t) * \psi^*_@{s,\tau@}(t) dt +@end example + +@end ifinfo +@noindent +and, +@tex +\beforedisplay +$$ +f(t) = \int_0^\infty ds \int_{-\infty}^\infty w(s, \tau) * \psi_{s,\tau}(t) d\tau +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(t) = \int \int_@{-\infty@}^\infty w(s, \tau) * \psi_@{s,\tau@}(t) d\tau ds +@end example + +@end ifinfo +@noindent +where the basis functions @c{$\psi_{s,\tau}$} +@math{\psi_@{s,\tau@}} are obtained by scaling +and translation from a single function, referred to as the @dfn{mother +wavelet}. + +The discrete version of the wavelet transform acts on equally-spaced +samples, with fixed scaling and translation steps (@math{s}, +@math{\tau}). The frequency and time axes are sampled @dfn{dyadically} +on scales of @math{2^j} through a level parameter @math{j}. +@c The wavelet @math{\psi} +@c can be expressed in terms of a scaling function @math{\varphi}, +@c +@c @tex +@c \beforedisplay +@c $$ +@c \psi(2^{j-1},t) = \sum_{k=0}^{2^j-1} g_j(k) * \bar{\varphi}(2^j t-k) +@c $$ +@c \afterdisplay +@c @end tex +@c @ifinfo +@c @example +@c \psi(2^@{j-1@},t) = \sum_@{k=0@}^@{2^j-1@} g_j(k) * \bar@{\varphi@}(2^j t-k) +@c @end example +@c @end ifinfo +@c @noindent +@c and +@c +@c @tex +@c \beforedisplay +@c $$ +@c \varphi(2^{j-1},t) = \sum_{k=0}^{2^j-1} h_j(k) * \bar{\varphi}(2^j t-k) +@c $$ +@c \afterdisplay +@c @end tex +@c @ifinfo +@c @example +@c \varphi(2^@{j-1@},t) = \sum_@{k=0@}^@{2^j-1@} h_j(k) * \bar@{\varphi@}(2^j t-k) +@c @end example +@c @end ifinfo +@c @noindent +@c The functions @math{\psi} and @math{\varphi} are related through the +@c coefficients +@c @c{$g_{n} = (-1)^n h_{L-1-n}$} +@c @math{g_@{n@} = (-1)^n h_@{L-1-n@}} +@c for @c{$n=0 \dots L-1$} +@c @math{n=0 ... L-1}, +@c where @math{L} is the total number of coefficients. The two sets of +@c coefficients @math{h_j} and @math{g_i} define the scaling function and +@c the wavelet. +The resulting family of functions @c{$\{\psi_{j,n}\}$} +@math{@{\psi_@{j,n@}@}} +constitutes an orthonormal +basis for square-integrable signals. + +The discrete wavelet transform is an @math{O(N)} algorithm, and is also +referred to as the @dfn{fast wavelet transform}. + +@node DWT Initialization +@section Initialization +@cindex DWT initialization +@tpindex gsl_wavelet_type + +The @code{gsl_wavelet} structure contains the filter coefficients +defining the wavelet and any associated offset parameters. + +@deftypefun {gsl_wavelet *} gsl_wavelet_alloc (const gsl_wavelet_type * @var{T}, size_t @var{k}) +@tpindex gsl_wavelet +This function allocates and initializes a wavelet object of type +@var{T}. The parameter @var{k} selects the specific member of the +wavelet family. A null pointer is returned if insufficient memory is +available or if a unsupported member is selected. +@end deftypefun + +The following wavelet types are implemented: + +@deffn {Wavelet} gsl_wavelet_daubechies +@deffnx {Wavelet} gsl_wavelet_daubechies_centered +@cindex Daubechies wavelets +@cindex maximal phase, Daubechies wavelets +This is the Daubechies wavelet family of maximum phase with @math{k/2} +vanishing moments. The implemented wavelets are +@c{$k=4, 6, \dots, 20$} +@math{k=4, 6, @dots{}, 20}, with @var{k} even. +@end deffn + +@deffn {Wavelet} gsl_wavelet_haar +@deffnx {Wavelet} gsl_wavelet_haar_centered +@cindex Haar wavelets +This is the Haar wavelet. The only valid choice of @math{k} for the +Haar wavelet is @math{k=2}. +@end deffn + +@deffn {Wavelet} gsl_wavelet_bspline +@deffnx {Wavelet} gsl_wavelet_bspline_centered +@cindex biorthogonal wavelets +@cindex B-spline wavelets +This is the biorthogonal B-spline wavelet family of order @math{(i,j)}. +The implemented values of @math{k = 100*i + j} are 103, 105, 202, 204, +206, 208, 301, 303, 305 307, 309. +@end deffn + +@noindent +The centered forms of the wavelets align the coefficients of the various +sub-bands on edges. Thus the resulting visualization of the +coefficients of the wavelet transform in the phase plane is easier to +understand. + +@deftypefun {const char *} gsl_wavelet_name (const gsl_wavelet * @var{w}) +This function returns a pointer to the name of the wavelet family for +@var{w}. +@end deftypefun + +@c @deftypefun {void} gsl_wavelet_print (const gsl_wavelet * @var{w}) +@c This function prints the filter coefficients (@code{**h1}, @code{**g1}, @code{**h2}, @code{**g2}) of the wavelet object @var{w}. +@c @end deftypefun + +@deftypefun {void} gsl_wavelet_free (gsl_wavelet * @var{w}) +This function frees the wavelet object @var{w}. +@end deftypefun + +The @code{gsl_wavelet_workspace} structure contains scratch space of the +same size as the input data and is used to hold intermediate results +during the transform. + +@deftypefun {gsl_wavelet_workspace *} gsl_wavelet_workspace_alloc (size_t @var{n}) +@tpindex gsl_wavelet_workspace +This function allocates a workspace for the discrete wavelet transform. +To perform a one-dimensional transform on @var{n} elements, a workspace +of size @var{n} must be provided. For two-dimensional transforms of +@var{n}-by-@var{n} matrices it is sufficient to allocate a workspace of +size @var{n}, since the transform operates on individual rows and +columns. A null pointer is returned if insufficient memory is available. +@end deftypefun + +@deftypefun {void} gsl_wavelet_workspace_free (gsl_wavelet_workspace * @var{work}) +This function frees the allocated workspace @var{work}. +@end deftypefun + +@node DWT Transform Functions +@section Transform Functions + +This sections describes the actual functions performing the discrete +wavelet transform. Note that the transforms use periodic boundary +conditions. If the signal is not periodic in the sample length then +spurious coefficients will appear at the beginning and end of each level +of the transform. + +@menu +* DWT in one dimension:: +* DWT in two dimension:: +@end menu + +@node DWT in one dimension +@subsection Wavelet transforms in one dimension +@cindex DWT, one dimensional + +@deftypefun int gsl_wavelet_transform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) +@deftypefunx int gsl_wavelet_transform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_workspace * @var{work}) +@deftypefunx int gsl_wavelet_transform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{stride}, size_t @var{n}, gsl_wavelet_workspace * @var{work}) + +These functions compute in-place forward and inverse discrete wavelet +transforms of length @var{n} with stride @var{stride} on the array +@var{data}. The length of the transform @var{n} is restricted to powers +of two. For the @code{transform} version of the function the argument +@var{dir} can be either @code{forward} (@math{+1}) or @code{backward} +(@math{-1}). A workspace @var{work} of length @var{n} must be provided. + +For the forward transform, the elements of the original array are +replaced by the discrete wavelet +transform @c{$f_i \rightarrow w_{j,k}$} +@math{f_i -> w_@{j,k@}} +in a packed triangular storage layout, +where @var{j} is the index of the level +@c{$j = 0 \dots J-1$} +@math{j = 0 ... J-1} +and +@var{k} is the index of the coefficient within each level, +@c{$k = 0 \dots 2^j - 1$} +@math{k = 0 ... (2^j)-1}. +The total number of levels is @math{J = \log_2(n)}. The output data +has the following form, +@tex +\beforedisplay +$$ +(s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0},\cdots, d_{j,k},\cdots, d_{J-1,2^{J-1} - 1}) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +(s_@{-1,0@}, d_@{0,0@}, d_@{1,0@}, d_@{1,1@}, d_@{2,0@}, ..., + d_@{j,k@}, ..., d_@{J-1,2^@{J-1@}-1@}) +@end example + +@end ifinfo +@noindent +where the first element is the smoothing coefficient @c{$s_{-1,0}$} +@math{s_@{-1,0@}}, followed by the detail coefficients @c{$d_{j,k}$} +@math{d_@{j,k@}} for each level +@math{j}. The backward transform inverts these coefficients to obtain +the original data. + +These functions return a status of @code{GSL_SUCCESS} upon successful +completion. @code{GSL_EINVAL} is returned if @var{n} is not an integer +power of 2 or if insufficient workspace is provided. +@end deftypefun + +@node DWT in two dimension +@subsection Wavelet transforms in two dimension +@cindex DWT, two dimensional + +The library provides functions to perform two-dimensional discrete +wavelet transforms on square matrices. The matrix dimensions must be an +integer power of two. There are two possible orderings of the rows and +columns in the two-dimensional wavelet transform, referred to as the +``standard'' and ``non-standard'' forms. + +The ``standard'' transform performs a complete discrete wavelet +transform on the rows of the matrix, followed by a separate complete +discrete wavelet transform on the columns of the resulting +row-transformed matrix. This procedure uses the same ordering as a +two-dimensional Fourier transform. + +The ``non-standard'' transform is performed in interleaved passes on the +rows and columns of the matrix for each level of the transform. The +first level of the transform is applied to the matrix rows, and then to +the matrix columns. This procedure is then repeated across the rows and +columns of the data for the subsequent levels of the transform, until +the full discrete wavelet transform is complete. The non-standard form +of the discrete wavelet transform is typically used in image analysis. + +The functions described in this section are declared in the header file +@file{gsl_wavelet2d.h}. + +@deftypefun {int} gsl_wavelet2d_transform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_transform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_transform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) + +These functions compute two-dimensional in-place forward and inverse +discrete wavelet transforms in standard form on the +array @var{data} stored in row-major form with dimensions @var{size1} +and @var{size2} and physical row length @var{tda}. The dimensions must +be equal (square matrix) and are restricted to powers of two. For the +@code{transform} version of the function the argument @var{dir} can be +either @code{forward} (@math{+1}) or @code{backward} (@math{-1}). A +workspace @var{work} of the appropriate size must be provided. On exit, +the appropriate elements of the array @var{data} are replaced by their +two-dimensional wavelet transform. + +The functions return a status of @code{GSL_SUCCESS} upon successful +completion. @code{GSL_EINVAL} is returned if @var{size1} and +@var{size2} are not equal and integer powers of 2, or if insufficient +workspace is provided. +@end deftypefun + +@deftypefun {int} gsl_wavelet2d_transform_matrix (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) +These functions compute the two-dimensional in-place wavelet transform +on a matrix @var{a}. +@end deftypefun + +@deftypefun {int} gsl_wavelet2d_nstransform (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_nstransform_forward (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_nstransform_inverse (const gsl_wavelet * @var{w}, double * @var{data}, size_t @var{tda}, size_t @var{size1}, size_t @var{size2}, gsl_wavelet_workspace * @var{work}) +These functions compute the two-dimensional wavelet transform in +non-standard form. +@end deftypefun + +@deftypefun {int} gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_direction @var{dir}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) +@deftypefunx {int} gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * @var{w}, gsl_matrix * @var{m}, gsl_wavelet_workspace * @var{work}) +These functions compute the non-standard form of the two-dimensional +in-place wavelet transform on a matrix @var{a}. +@end deftypefun + +@node DWT Examples +@section Examples + +The following program demonstrates the use of the one-dimensional +wavelet transform functions. It computes an approximation to an input +signal (of length 256) using the 20 largest components of the wavelet +transform, while setting the others to zero. + +@example +@verbatiminclude examples/dwt.c +@end example + +@noindent +The output can be used with the @sc{gnu} plotutils @code{graph} program, + +@example +$ ./a.out ecg.dat > dwt.dat +$ graph -T ps -x 0 256 32 -h 0.3 -a dwt.dat > dwt.ps +@end example + +@iftex +The graphs below show an original and compressed version of a sample ECG +recording from the MIT-BIH Arrhythmia Database, part of the PhysioNet +archive of public-domain of medical datasets. + +@sp 1 +@center @image{dwt-orig,3.4in} +@center @image{dwt-samp,3.4in} +@quotation +Original (upper) and wavelet-compressed (lower) ECG signals, using the +20 largest components of the Daubechies(4) discrete wavelet transform. +@end quotation +@end iftex + +@node DWT References +@section References and Further Reading + +The mathematical background to wavelet transforms is covered in the +original lectures by Daubechies, + +@itemize @w{} +@item +Ingrid Daubechies. +Ten Lectures on Wavelets. +@cite{CBMS-NSF Regional Conference Series in Applied Mathematics} (1992), +SIAM, ISBN 0898712742. +@end itemize + +@noindent +An easy to read introduction to the subject with an emphasis on the +application of the wavelet transform in various branches of science is, + +@itemize @w{} +@item +Paul S. Addison. @cite{The Illustrated Wavelet Transform Handbook}. +Institute of Physics Publishing (2002), ISBN 0750306920. +@end itemize + +@noindent +For extensive coverage of signal analysis by wavelets, wavelet packets +and local cosine bases see, + +@itemize @w{} +@item +S. G. Mallat. @cite{A wavelet tour of signal processing} (Second +edition). Academic Press (1999), ISBN 012466606X. +@end itemize + +@noindent +The concept of multiresolution analysis underlying the wavelet transform +is described in, + +@itemize @w{} +@item +S. G. Mallat. +Multiresolution Approximations and Wavelet Orthonormal Bases of L@math{^2}(R). +@cite{Transactions of the American Mathematical Society}, 315(1), 1989, 69--87. +@end itemize + +@itemize @w{} +@item +S. G. Mallat. +A Theory for Multiresolution Signal Decomposition---The Wavelet Representation. +@cite{IEEE Transactions on Pattern Analysis and Machine Intelligence}, 11, 1989, +674--693. +@end itemize + +@noindent +The coefficients for the individual wavelet families implemented by the +library can be found in the following papers, + +@itemize @w{} +@item +I. Daubechies. +Orthonormal Bases of Compactly Supported Wavelets. +@cite{Communications on Pure and Applied Mathematics}, 41 (1988) 909--996. +@end itemize + +@itemize @w{} +@item +A. Cohen, I. Daubechies, and J.-C. Feauveau. +Biorthogonal Bases of Compactly Supported Wavelets. +@cite{Communications on Pure and Applied Mathematics}, 45 (1992) +485--560. +@end itemize + +@noindent +The PhysioNet archive of physiological datasets can be found online at +@uref{http://www.physionet.org/} and is described in the following +paper, + +@itemize @w{} +@item +Goldberger et al. +PhysioBank, PhysioToolkit, and PhysioNet: Components +of a New Research Resource for Complex Physiologic +Signals. +@cite{Circulation} 101(23):e215-e220 2000. +@end itemize diff --git a/software/gsl-1.15/doc/eigen.texi b/software/gsl-1.15/doc/eigen.texi new file mode 100644 index 000000000..15f5248c5 --- /dev/null +++ b/software/gsl-1.15/doc/eigen.texi @@ -0,0 +1,851 @@ +@cindex eigenvalues and eigenvectors +This chapter describes functions for computing eigenvalues and +eigenvectors of matrices. There are routines for real symmetric, +real nonsymmetric, complex hermitian, real generalized symmetric-definite, +complex generalized hermitian-definite, and real generalized nonsymmetric +eigensystems. Eigenvalues can be computed with or without eigenvectors. +The hermitian and real symmetric matrix algorithms are symmetric bidiagonalization +followed by QR reduction. The nonsymmetric algorithm is the Francis QR +double-shift. The generalized nonsymmetric algorithm is the QZ method due +to Moler and Stewart. + +The functions described in this chapter are declared in the header file +@file{gsl_eigen.h}. + +@menu +* Real Symmetric Matrices:: +* Complex Hermitian Matrices:: +* Real Nonsymmetric Matrices:: +* Real Generalized Symmetric-Definite Eigensystems:: +* Complex Generalized Hermitian-Definite Eigensystems:: +* Real Generalized Nonsymmetric Eigensystems:: +* Sorting Eigenvalues and Eigenvectors:: +* Eigenvalue and Eigenvector Examples:: +* Eigenvalue and Eigenvector References:: +@end menu + +@node Real Symmetric Matrices +@section Real Symmetric Matrices +@cindex symmetric matrix, real, eigensystem +@cindex real symmetric matrix, eigensystem + +For real symmetric matrices, the library uses the symmetric +bidiagonalization and QR reduction method. This is described in Golub +& van Loan, section 8.3. The computed eigenvalues are accurate to an +absolute accuracy of @math{\epsilon ||A||_2}, where @math{\epsilon} is +the machine precision. + +@deftypefun {gsl_eigen_symm_workspace *} gsl_eigen_symm_alloc (const size_t @var{n}) +@tpindex gsl_eigen_symm_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} real symmetric matrices. The size of the workspace +is @math{O(2n)}. +@end deftypefun + +@deftypefun void gsl_eigen_symm_free (gsl_eigen_symm_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_symm (gsl_matrix * @var{A}, gsl_vector * @var{eval}, gsl_eigen_symm_workspace * @var{w}) +This function computes the eigenvalues of the real symmetric matrix +@var{A}. Additional workspace of the appropriate size must be provided +in @var{w}. The diagonal and lower triangular part of @var{A} are +destroyed during the computation, but the strict upper triangular part +is not referenced. The eigenvalues are stored in the vector @var{eval} +and are unordered. +@end deftypefun + +@deftypefun {gsl_eigen_symmv_workspace *} gsl_eigen_symmv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_symmv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} real symmetric matrices. The size of +the workspace is @math{O(4n)}. +@end deftypefun + +@deftypefun void gsl_eigen_symmv_free (gsl_eigen_symmv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_symmv (gsl_matrix * @var{A}, gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_symmv_workspace * @var{w}) +This function computes the eigenvalues and eigenvectors of the real +symmetric matrix @var{A}. Additional workspace of the appropriate size +must be provided in @var{w}. The diagonal and lower triangular part of +@var{A} are destroyed during the computation, but the strict upper +triangular part is not referenced. The eigenvalues are stored in the +vector @var{eval} and are unordered. The corresponding eigenvectors are +stored in the columns of the matrix @var{evec}. For example, the +eigenvector in the first column corresponds to the first eigenvalue. +The eigenvectors are guaranteed to be mutually orthogonal and normalised +to unit magnitude. +@end deftypefun + +@node Complex Hermitian Matrices +@section Complex Hermitian Matrices + +For hermitian matrices, the library uses the complex form of +the symmetric bidiagonalization and QR reduction method. + +@cindex hermitian matrix, complex, eigensystem +@cindex complex hermitian matrix, eigensystem +@deftypefun {gsl_eigen_herm_workspace *} gsl_eigen_herm_alloc (const size_t @var{n}) +@tpindex gsl_eigen_herm_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} complex hermitian matrices. The size of the workspace +is @math{O(3n)}. +@end deftypefun + +@deftypefun void gsl_eigen_herm_free (gsl_eigen_herm_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_herm (gsl_matrix_complex * @var{A}, gsl_vector * @var{eval}, gsl_eigen_herm_workspace * @var{w}) +This function computes the eigenvalues of the complex hermitian matrix +@var{A}. Additional workspace of the appropriate size must be provided +in @var{w}. The diagonal and lower triangular part of @var{A} are +destroyed during the computation, but the strict upper triangular part +is not referenced. The imaginary parts of the diagonal are assumed to be +zero and are not referenced. The eigenvalues are stored in the vector +@var{eval} and are unordered. +@end deftypefun + +@deftypefun {gsl_eigen_hermv_workspace *} gsl_eigen_hermv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_hermv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} complex hermitian matrices. The size of +the workspace is @math{O(5n)}. +@end deftypefun + +@deftypefun void gsl_eigen_hermv_free (gsl_eigen_hermv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_hermv (gsl_matrix_complex * @var{A}, gsl_vector * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_hermv_workspace * @var{w}) +This function computes the eigenvalues and eigenvectors of the complex +hermitian matrix @var{A}. Additional workspace of the appropriate size +must be provided in @var{w}. The diagonal and lower triangular part of +@var{A} are destroyed during the computation, but the strict upper +triangular part is not referenced. The imaginary parts of the diagonal +are assumed to be zero and are not referenced. The eigenvalues are +stored in the vector @var{eval} and are unordered. The corresponding +complex eigenvectors are stored in the columns of the matrix @var{evec}. +For example, the eigenvector in the first column corresponds to the +first eigenvalue. The eigenvectors are guaranteed to be mutually +orthogonal and normalised to unit magnitude. +@end deftypefun + +@node Real Nonsymmetric Matrices +@section Real Nonsymmetric Matrices +@cindex nonsymmetric matrix, real, eigensystem +@cindex real nonsymmetric matrix, eigensystem + +The solution of the real nonsymmetric eigensystem problem for a +matrix @math{A} involves computing the Schur decomposition +@tex +\beforedisplay +$$ +A = Z T Z^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = Z T Z^T +@end example + +@end ifinfo +where @math{Z} is an orthogonal matrix of Schur vectors and @math{T}, +the Schur form, is quasi upper triangular with diagonal +@math{1}-by-@math{1} blocks which are real eigenvalues of @math{A}, and +diagonal @math{2}-by-@math{2} blocks whose eigenvalues are complex +conjugate eigenvalues of @math{A}. The algorithm used is the double-shift +Francis method. + +@deftypefun {gsl_eigen_nonsymm_workspace *} gsl_eigen_nonsymm_alloc (const size_t @var{n}) +@tpindex gsl_eigen_nonsymm_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} real nonsymmetric matrices. The size of the workspace +is @math{O(2n)}. +@end deftypefun + +@deftypefun void gsl_eigen_nonsymm_free (gsl_eigen_nonsymm_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun void gsl_eigen_nonsymm_params (const int @var{compute_t}, const int @var{balance}, gsl_eigen_nonsymm_workspace * @var{w}) +This function sets some parameters which determine how the eigenvalue +problem is solved in subsequent calls to @code{gsl_eigen_nonsymm}. + +If @var{compute_t} is set to 1, the full Schur form @math{T} will be +computed by @code{gsl_eigen_nonsymm}. If it is set to 0, +@math{T} will not be computed (this is the default setting). Computing +the full Schur form @math{T} requires approximately 1.5--2 times the +number of flops. + +If @var{balance} is set to 1, a balancing transformation is applied +to the matrix prior to computing eigenvalues. This transformation is +designed to make the rows and columns of the matrix have comparable +norms, and can result in more accurate eigenvalues for matrices +whose entries vary widely in magnitude. See @ref{Balancing} for more +information. Note that the balancing transformation does not preserve +the orthogonality of the Schur vectors, so if you wish to compute the +Schur vectors with @code{gsl_eigen_nonsymm_Z} you will obtain the Schur +vectors of the balanced matrix instead of the original matrix. The +relationship will be +@tex +\beforedisplay +$$ +T = Q^t D^{-1} A D Q +$$ +\afterdisplay +@end tex +@ifinfo + +@example +T = Q^t D^(-1) A D Q +@end example + +@end ifinfo +@noindent +where @var{Q} is the matrix of Schur vectors for the balanced matrix, and +@var{D} is the balancing transformation. Then @code{gsl_eigen_nonsymm_Z} +will compute a matrix @var{Z} which satisfies +@tex +\beforedisplay +$$ +T = Z^{-1} A Z +$$ +\afterdisplay +@end tex +@ifinfo + +@example +T = Z^(-1) A Z +@end example + +@end ifinfo +@noindent +with @math{Z = D Q}. Note that @var{Z} will not be orthogonal. For +this reason, balancing is not performed by default. +@end deftypefun + +@deftypefun int gsl_eigen_nonsymm (gsl_matrix * @var{A}, gsl_vector_complex * @var{eval}, gsl_eigen_nonsymm_workspace * @var{w}) +This function computes the eigenvalues of the real nonsymmetric matrix +@var{A} and stores them in the vector @var{eval}. If @math{T} is +desired, it is stored in the upper portion of @var{A} on output. +Otherwise, on output, the diagonal of @var{A} will contain the +@math{1}-by-@math{1} real eigenvalues and @math{2}-by-@math{2} +complex conjugate eigenvalue systems, and the rest of @var{A} is +destroyed. In rare cases, this function may fail to find all +eigenvalues. If this happens, an error code is returned +and the number of converged eigenvalues is stored in @code{w->n_evals}. +The converged eigenvalues are stored in the beginning of @var{eval}. +@end deftypefun + +@deftypefun int gsl_eigen_nonsymm_Z (gsl_matrix * @var{A}, gsl_vector_complex * @var{eval}, gsl_matrix * @var{Z}, gsl_eigen_nonsymm_workspace * @var{w}) +This function is identical to @code{gsl_eigen_nonsymm} except that it also +computes the Schur vectors and stores them into @var{Z}. +@end deftypefun + +@deftypefun {gsl_eigen_nonsymmv_workspace *} gsl_eigen_nonsymmv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_nonsymmv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} real nonsymmetric matrices. The +size of the workspace is @math{O(5n)}. +@end deftypefun + +@deftypefun void gsl_eigen_nonsymmv_free (gsl_eigen_nonsymmv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun void gsl_eigen_nonsymmv_params (const int @var{balance}, gsl_eigen_nonsymm_workspace * @var{w}) +This function sets parameters which determine how the eigenvalue +problem is solved in subsequent calls to @code{gsl_eigen_nonsymmv}. +If @var{balance} is set to 1, a balancing transformation is applied +to the matrix. See @code{gsl_eigen_nonsymm_params} for more information. +Balancing is turned off by default since it does not preserve the +orthogonality of the Schur vectors. +@end deftypefun + +@deftypefun int gsl_eigen_nonsymmv (gsl_matrix * @var{A}, gsl_vector_complex * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_nonsymmv_workspace * @var{w}) +This function computes eigenvalues and right eigenvectors of the +@var{n}-by-@var{n} real nonsymmetric matrix @var{A}. It first calls +@code{gsl_eigen_nonsymm} to compute the eigenvalues, Schur form @math{T}, and +Schur vectors. Then it finds eigenvectors of @math{T} and backtransforms +them using the Schur vectors. The Schur vectors are destroyed in the +process, but can be saved by using @code{gsl_eigen_nonsymmv_Z}. The +computed eigenvectors are normalized to have unit magnitude. On +output, the upper portion of @var{A} contains the Schur form +@math{T}. If @code{gsl_eigen_nonsymm} fails, no eigenvectors are +computed, and an error code is returned. +@end deftypefun + +@deftypefun int gsl_eigen_nonsymmv_Z (gsl_matrix * @var{A}, gsl_vector_complex * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_matrix * @var{Z}, gsl_eigen_nonsymmv_workspace * @var{w}) +This function is identical to @code{gsl_eigen_nonsymmv} except that it also saves +the Schur vectors into @var{Z}. +@end deftypefun + +@node Real Generalized Symmetric-Definite Eigensystems +@section Real Generalized Symmetric-Definite Eigensystems +@cindex generalized symmetric eigensystems + +The real generalized symmetric-definite eigenvalue problem is to find +eigenvalues @math{\lambda} and eigenvectors @math{x} such that +@tex +\beforedisplay +$$ +A x = \lambda B x +$$ +\afterdisplay +@end tex +@ifinfo +@example +A x = \lambda B x +@end example +@end ifinfo +where @math{A} and @math{B} are symmetric matrices, and @math{B} is +positive-definite. This problem reduces to the standard symmetric +eigenvalue problem by applying the Cholesky decomposition to @math{B}: +@tex +\beforedisplay +$$ +\eqalign{ +A x & = \lambda B x \cr +A x & = \lambda L L^t x \cr +\left( L^{-1} A L^{-t} \right) L^t x & = \lambda L^t x +} +$$ +\afterdisplay +@end tex +@ifinfo +@example + A x = \lambda B x + A x = \lambda L L^t x +( L^@{-1@} A L^@{-t@} ) L^t x = \lambda L^t x +@end example +@end ifinfo +Therefore, the problem becomes @math{C y = \lambda y} where +@c{$C = L^{-1} A L^{-t}$} +@math{C = L^@{-1@} A L^@{-t@}} +is symmetric, and @math{y = L^t x}. The standard +symmetric eigensolver can be applied to the matrix @math{C}. +The resulting eigenvectors are backtransformed to find the +vectors of the original problem. The eigenvalues and eigenvectors +of the generalized symmetric-definite eigenproblem are always real. + +@deftypefun {gsl_eigen_gensymm_workspace *} gsl_eigen_gensymm_alloc (const size_t @var{n}) +@tpindex gsl_eigen_gensymm_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} real generalized symmetric-definite eigensystems. The +size of the workspace is @math{O(2n)}. +@end deftypefun + +@deftypefun void gsl_eigen_gensymm_free (gsl_eigen_gensymm_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_gensymm (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector * @var{eval}, gsl_eigen_gensymm_workspace * @var{w}) +This function computes the eigenvalues of the real generalized +symmetric-definite matrix pair (@var{A}, @var{B}), and stores them +in @var{eval}, using the method outlined above. On output, @var{B} +contains its Cholesky decomposition and @var{A} is destroyed. +@end deftypefun + +@deftypefun {gsl_eigen_gensymmv_workspace *} gsl_eigen_gensymmv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_gensymmv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} real generalized symmetric-definite +eigensystems. The size of the workspace is @math{O(4n)}. +@end deftypefun + +@deftypefun void gsl_eigen_gensymmv_free (gsl_eigen_gensymmv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_gensymmv (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_gensymmv_workspace * @var{w}) +This function computes the eigenvalues and eigenvectors of the real +generalized symmetric-definite matrix pair (@var{A}, @var{B}), and +stores them in @var{eval} and @var{evec} respectively. The computed +eigenvectors are normalized to have unit magnitude. On output, +@var{B} contains its Cholesky decomposition and @var{A} is destroyed. +@end deftypefun + +@node Complex Generalized Hermitian-Definite Eigensystems +@section Complex Generalized Hermitian-Definite Eigensystems +@cindex generalized hermitian definite eigensystems + +The complex generalized hermitian-definite eigenvalue problem is to find +eigenvalues @math{\lambda} and eigenvectors @math{x} such that +@tex +\beforedisplay +$$ +A x = \lambda B x +$$ +\afterdisplay +@end tex +@ifinfo +@example +A x = \lambda B x +@end example +@end ifinfo +where @math{A} and @math{B} are hermitian matrices, and @math{B} is +positive-definite. Similarly to the real case, this can be reduced +to @math{C y = \lambda y} where +@c{$C = L^{-1} A L^{-\dagger}$} +@math{C = L^@{-1@} A L^@{-H@}} +is hermitian, and +@c{$y = L^{\dagger} x$} +@math{y = L^H x}. The standard +hermitian eigensolver can be applied to the matrix @math{C}. +The resulting eigenvectors are backtransformed to find the +vectors of the original problem. The eigenvalues +of the generalized hermitian-definite eigenproblem are always real. + +@deftypefun {gsl_eigen_genherm_workspace *} gsl_eigen_genherm_alloc (const size_t @var{n}) +@tpindex gsl_eigen_genherm_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} complex generalized hermitian-definite eigensystems. The +size of the workspace is @math{O(3n)}. +@end deftypefun + +@deftypefun void gsl_eigen_genherm_free (gsl_eigen_genherm_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_genherm (gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}, gsl_vector * @var{eval}, gsl_eigen_genherm_workspace * @var{w}) +This function computes the eigenvalues of the complex generalized +hermitian-definite matrix pair (@var{A}, @var{B}), and stores them +in @var{eval}, using the method outlined above. On output, @var{B} +contains its Cholesky decomposition and @var{A} is destroyed. +@end deftypefun + +@deftypefun {gsl_eigen_genhermv_workspace *} gsl_eigen_genhermv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_genhermv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} complex generalized hermitian-definite +eigensystems. The size of the workspace is @math{O(5n)}. +@end deftypefun + +@deftypefun void gsl_eigen_genhermv_free (gsl_eigen_genhermv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_genhermv (gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}, gsl_vector * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_genhermv_workspace * @var{w}) +This function computes the eigenvalues and eigenvectors of the complex +generalized hermitian-definite matrix pair (@var{A}, @var{B}), and +stores them in @var{eval} and @var{evec} respectively. The computed +eigenvectors are normalized to have unit magnitude. On output, +@var{B} contains its Cholesky decomposition and @var{A} is destroyed. +@end deftypefun + +@node Real Generalized Nonsymmetric Eigensystems +@section Real Generalized Nonsymmetric Eigensystems +@cindex generalized eigensystems + +Given two square matrices (@math{A}, @math{B}), the generalized +nonsymmetric eigenvalue problem is to find eigenvalues @math{\lambda} and +eigenvectors @math{x} such that +@tex +\beforedisplay +$$ +A x = \lambda B x +$$ +\afterdisplay +@end tex +@ifinfo +@example +A x = \lambda B x +@end example +@end ifinfo +We may also define the problem as finding eigenvalues @math{\mu} and +eigenvectors @math{y} such that +@tex +\beforedisplay +$$ +\mu A y = B y +$$ +\afterdisplay +@end tex +@ifinfo +@example +\mu A y = B y +@end example +@end ifinfo +Note that these two problems are equivalent (with @math{\lambda = 1/\mu}) +if neither @math{\lambda} nor @math{\mu} is zero. If say, @math{\lambda} +is zero, then it is still a well defined eigenproblem, but its alternate +problem involving @math{\mu} is not. Therefore, to allow for zero +(and infinite) eigenvalues, the problem which is actually solved is +@tex +\beforedisplay +$$ +\beta A x = \alpha B x +$$ +\afterdisplay +@end tex +@ifinfo +@example +\beta A x = \alpha B x +@end example +@end ifinfo +The eigensolver routines below will return two values @math{\alpha} +and @math{\beta} and leave it to the user to perform the divisions +@math{\lambda = \alpha / \beta} and @math{\mu = \beta / \alpha}. + +If the determinant of the matrix pencil @math{A - \lambda B} is zero +for all @math{\lambda}, the problem is said to be singular; otherwise +it is called regular. Singularity normally leads to some +@math{\alpha = \beta = 0} which means the eigenproblem is ill-conditioned +and generally does not have well defined eigenvalue solutions. The +routines below are intended for regular matrix pencils and could yield +unpredictable results when applied to singular pencils. + +The solution of the real generalized nonsymmetric eigensystem problem for a +matrix pair @math{(A, B)} involves computing the generalized Schur +decomposition +@tex +\beforedisplay +$$ +A = Q S Z^T +$$ +$$ +B = Q T Z^T +$$ +\afterdisplay +@end tex +@ifinfo +@example +A = Q S Z^T +B = Q T Z^T +@end example +@end ifinfo +where @math{Q} and @math{Z} are orthogonal matrices of left and right +Schur vectors respectively, and @math{(S, T)} is the generalized Schur +form whose diagonal elements give the @math{\alpha} and @math{\beta} +values. The algorithm used is the QZ method due to Moler and Stewart +(see references). + +@deftypefun {gsl_eigen_gen_workspace *} gsl_eigen_gen_alloc (const size_t @var{n}) +@tpindex gsl_eigen_gen_workspace +This function allocates a workspace for computing eigenvalues of +@var{n}-by-@var{n} real generalized nonsymmetric eigensystems. The +size of the workspace is @math{O(n)}. +@end deftypefun + +@deftypefun void gsl_eigen_gen_free (gsl_eigen_gen_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun void gsl_eigen_gen_params (const int @var{compute_s}, const int @var{compute_t}, const int @var{balance}, gsl_eigen_gen_workspace * @var{w}) +This function sets some parameters which determine how the eigenvalue +problem is solved in subsequent calls to @code{gsl_eigen_gen}. + +If @var{compute_s} is set to 1, the full Schur form @math{S} will be +computed by @code{gsl_eigen_gen}. If it is set to 0, +@math{S} will not be computed (this is the default setting). @math{S} +is a quasi upper triangular matrix with 1-by-1 and 2-by-2 blocks +on its diagonal. 1-by-1 blocks correspond to real eigenvalues, and +2-by-2 blocks correspond to complex eigenvalues. + +If @var{compute_t} is set to 1, the full Schur form @math{T} will be +computed by @code{gsl_eigen_gen}. If it is set to 0, +@math{T} will not be computed (this is the default setting). @math{T} +is an upper triangular matrix with non-negative elements on its diagonal. +Any 2-by-2 blocks in @math{S} will correspond to a 2-by-2 diagonal +block in @math{T}. + +The @var{balance} parameter is currently ignored, since generalized +balancing is not yet implemented. +@end deftypefun + +@deftypefun int gsl_eigen_gen (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_eigen_gen_workspace * @var{w}) +This function computes the eigenvalues of the real generalized nonsymmetric +matrix pair (@var{A}, @var{B}), and stores them as pairs in +(@var{alpha}, @var{beta}), where @var{alpha} is complex and @var{beta} is +real. If @math{\beta_i} is non-zero, then +@math{\lambda = \alpha_i / \beta_i} is an eigenvalue. Likewise, +if @math{\alpha_i} is non-zero, then +@math{\mu = \beta_i / \alpha_i} is an eigenvalue of the alternate +problem @math{\mu A y = B y}. The elements of @var{beta} are normalized +to be non-negative. + +If @math{S} is desired, it is stored in @var{A} on output. If @math{T} +is desired, it is stored in @var{B} on output. The ordering of +eigenvalues in (@var{alpha}, @var{beta}) follows the ordering +of the diagonal blocks in the Schur forms @math{S} and @math{T}. In rare +cases, this function may fail to find all eigenvalues. If this occurs, an +error code is returned. +@end deftypefun + +@deftypefun int gsl_eigen_gen_QZ (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_matrix * @var{Q}, gsl_matrix * @var{Z}, gsl_eigen_gen_workspace * @var{w}) +This function is identical to @code{gsl_eigen_gen} except that it also +computes the left and right Schur vectors and stores them into @var{Q} +and @var{Z} respectively. +@end deftypefun + +@deftypefun {gsl_eigen_genv_workspace *} gsl_eigen_genv_alloc (const size_t @var{n}) +@tpindex gsl_eigen_genv_workspace +This function allocates a workspace for computing eigenvalues and +eigenvectors of @var{n}-by-@var{n} real generalized nonsymmetric +eigensystems. The size of the workspace is @math{O(7n)}. +@end deftypefun + +@deftypefun void gsl_eigen_genv_free (gsl_eigen_genv_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_eigen_genv (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_matrix_complex * @var{evec}, gsl_eigen_genv_workspace * @var{w}) +This function computes eigenvalues and right eigenvectors of the +@var{n}-by-@var{n} real generalized nonsymmetric matrix pair +(@var{A}, @var{B}). The eigenvalues are stored in (@var{alpha}, @var{beta}) +and the eigenvectors are stored in @var{evec}. It first calls +@code{gsl_eigen_gen} to compute the eigenvalues, Schur forms, and +Schur vectors. Then it finds eigenvectors of the Schur forms and +backtransforms them using the Schur vectors. The Schur vectors are +destroyed in the process, but can be saved by using +@code{gsl_eigen_genv_QZ}. The computed eigenvectors are normalized +to have unit magnitude. On output, (@var{A}, @var{B}) contains +the generalized Schur form (@math{S}, @math{T}). If @code{gsl_eigen_gen} +fails, no eigenvectors are computed, and an error code is returned. +@end deftypefun + +@deftypefun int gsl_eigen_genv_QZ (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_matrix_complex * @var{evec}, gsl_matrix * @var{Q}, gsl_matrix * @var{Z}, gsl_eigen_genv_workspace * @var{w}) +This function is identical to @code{gsl_eigen_genv} except that it also +computes the left and right Schur vectors and stores them into @var{Q} +and @var{Z} respectively. +@end deftypefun + +@node Sorting Eigenvalues and Eigenvectors +@section Sorting Eigenvalues and Eigenvectors +@cindex sorting eigenvalues and eigenvectors + +@deftypefun int gsl_eigen_symmv_sort (gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vector +@var{eval} and the corresponding real eigenvectors stored in the columns +of the matrix @var{evec} into ascending or descending order according to +the value of the parameter @var{sort_type}, + +@table @code +@item GSL_EIGEN_SORT_VAL_ASC +ascending order in numerical value +@item GSL_EIGEN_SORT_VAL_DESC +descending order in numerical value +@item GSL_EIGEN_SORT_ABS_ASC +ascending order in magnitude +@item GSL_EIGEN_SORT_ABS_DESC +descending order in magnitude +@end table + +@end deftypefun + +@deftypefun int gsl_eigen_hermv_sort (gsl_vector * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vector +@var{eval} and the corresponding complex eigenvectors stored in the +columns of the matrix @var{evec} into ascending or descending order +according to the value of the parameter @var{sort_type} as shown above. +@end deftypefun + +@deftypefun int gsl_eigen_nonsymmv_sort (gsl_vector_complex * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vector +@var{eval} and the corresponding complex eigenvectors stored in the +columns of the matrix @var{evec} into ascending or descending order +according to the value of the parameter @var{sort_type} as shown above. +Only @code{GSL_EIGEN_SORT_ABS_ASC} and @code{GSL_EIGEN_SORT_ABS_DESC} are +supported due to the eigenvalues being complex. +@end deftypefun + +@deftypefun int gsl_eigen_gensymmv_sort (gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vector +@var{eval} and the corresponding real eigenvectors stored in the columns +of the matrix @var{evec} into ascending or descending order according to +the value of the parameter @var{sort_type} as shown above. +@end deftypefun + +@deftypefun int gsl_eigen_genhermv_sort (gsl_vector * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vector +@var{eval} and the corresponding complex eigenvectors stored in the columns +of the matrix @var{evec} into ascending or descending order according to +the value of the parameter @var{sort_type} as shown above. +@end deftypefun + +@deftypefun int gsl_eigen_genv_sort (gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_matrix_complex * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +This function simultaneously sorts the eigenvalues stored in the vectors +(@var{alpha}, @var{beta}) and the corresponding complex eigenvectors +stored in the columns of the matrix @var{evec} into ascending or +descending order according to the value of the parameter @var{sort_type} +as shown above. Only @code{GSL_EIGEN_SORT_ABS_ASC} and +@code{GSL_EIGEN_SORT_ABS_DESC} are supported due to the eigenvalues being +complex. +@end deftypefun + +@comment @deftypefun int gsl_eigen_jacobi (gsl_matrix * @var{matrix}, gsl_vector * @var{eval}, gsl_matrix * @var{evec}, unsigned int @var{max_rot}, unsigned int * @var{nrot}) +@comment This function finds the eigenvectors and eigenvalues of a real symmetric +@comment matrix by Jacobi iteration. The data in the input matrix is destroyed. +@comment @end deftypefun + +@comment @deftypefun int gsl_la_invert_jacobi (const gsl_matrix * @var{matrix}, gsl_matrix * @var{ainv}, unsigned int @var{max_rot}) +@comment Invert a matrix by Jacobi iteration. +@comment @end deftypefun + +@comment @deftypefun int gsl_eigen_sort (gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_sort_t @var{sort_type}) +@comment This functions sorts the eigensystem results based on eigenvalues. +@comment Sorts in order of increasing value or increasing +@comment absolute value, depending on the value of +@comment @var{sort_type}, which can be @code{GSL_EIGEN_SORT_VALUE} +@comment or @code{GSL_EIGEN_SORT_ABSVALUE}. +@comment @end deftypefun + +@node Eigenvalue and Eigenvector Examples +@section Examples + +The following program computes the eigenvalues and eigenvectors of the 4-th order Hilbert matrix, @math{H(i,j) = 1/(i + j + 1)}. + +@example +@verbatiminclude examples/eigen.c +@end example + +@noindent +Here is the beginning of the output from the program, + +@example +$ ./a.out +eigenvalue = 9.67023e-05 +eigenvector = +-0.0291933 +0.328712 +-0.791411 +0.514553 +... +@end example + +@noindent +This can be compared with the corresponding output from @sc{gnu octave}, + +@example +octave> [v,d] = eig(hilb(4)); +octave> diag(d) +ans = + + 9.6702e-05 + 6.7383e-03 + 1.6914e-01 + 1.5002e+00 + +octave> v +v = + + 0.029193 0.179186 -0.582076 0.792608 + -0.328712 -0.741918 0.370502 0.451923 + 0.791411 0.100228 0.509579 0.322416 + -0.514553 0.638283 0.514048 0.252161 +@end example + +@noindent +Note that the eigenvectors can differ by a change of sign, since the +sign of an eigenvector is arbitrary. + +The following program illustrates the use of the nonsymmetric +eigensolver, by computing the eigenvalues and eigenvectors of +the Vandermonde matrix +@c{$V(x;i,j) = x_i^{n - j}$} +@math{V(x;i,j) = x_i^@{n - j@}} +with @math{x = (-1,-2,3,4)}. + +@example +@verbatiminclude examples/eigen_nonsymm.c +@end example + +@noindent +Here is the beginning of the output from the program, + +@example +$ ./a.out +eigenvalue = -6.41391 + 0i +eigenvector = +-0.0998822 + 0i +-0.111251 + 0i +0.292501 + 0i +0.944505 + 0i +eigenvalue = 5.54555 + 3.08545i +eigenvector = +-0.043487 + -0.0076308i +0.0642377 + -0.142127i +-0.515253 + 0.0405118i +-0.840592 + -0.00148565i +... +@end example + +@noindent +This can be compared with the corresponding output from @sc{gnu octave}, + +@example +octave> [v,d] = eig(vander([-1 -2 3 4])); +octave> diag(d) +ans = + + -6.4139 + 0.0000i + 5.5456 + 3.0854i + 5.5456 - 3.0854i + 2.3228 + 0.0000i + +octave> v +v = + + Columns 1 through 3: + + -0.09988 + 0.00000i -0.04350 - 0.00755i -0.04350 + 0.00755i + -0.11125 + 0.00000i 0.06399 - 0.14224i 0.06399 + 0.14224i + 0.29250 + 0.00000i -0.51518 + 0.04142i -0.51518 - 0.04142i + 0.94451 + 0.00000i -0.84059 + 0.00000i -0.84059 - 0.00000i + + Column 4: + + -0.14493 + 0.00000i + 0.35660 + 0.00000i + 0.91937 + 0.00000i + 0.08118 + 0.00000i + +@end example +Note that the eigenvectors corresponding to the eigenvalue +@math{5.54555 + 3.08545i} differ by the multiplicative constant +@math{0.9999984 + 0.0017674i} which is an arbitrary phase factor +of magnitude 1. + +@node Eigenvalue and Eigenvector References +@section References and Further Reading + +Further information on the algorithms described in this section can be +found in the following book, + +@itemize @w{} +@item +G. H. Golub, C. F. Van Loan, @cite{Matrix Computations} (3rd Ed, 1996), +Johns Hopkins University Press, ISBN 0-8018-5414-8. +@end itemize + +@noindent +Further information on the generalized eigensystems QZ algorithm +can be found in this paper, + +@itemize @w{} +@item +C. Moler, G. Stewart, ``An Algorithm for Generalized Matrix Eigenvalue +Problems'', SIAM J. Numer. Anal., Vol 10, No 2, 1973. +@end itemize + +@noindent +@cindex LAPACK +Eigensystem routines for very large matrices can be found in the +Fortran library @sc{lapack}. The @sc{lapack} library is described in, + +@itemize @w{} +@item +@cite{LAPACK Users' Guide} (Third Edition, 1999), Published by SIAM, +ISBN 0-89871-447-8. + +@uref{http://www.netlib.org/lapack} +@end itemize + +@noindent +The @sc{lapack} source code can be found at the website above along with +an online copy of the users guide. diff --git a/software/gsl-1.15/doc/err.texi b/software/gsl-1.15/doc/err.texi new file mode 100644 index 000000000..b7480f0b7 --- /dev/null +++ b/software/gsl-1.15/doc/err.texi @@ -0,0 +1,306 @@ +@cindex error handling +This chapter describes the way that GSL functions report and handle +errors. By examining the status information returned by every function +you can determine whether it succeeded or failed, and if it failed you +can find out what the precise cause of failure was. You can also define +your own error handling functions to modify the default behavior of the +library. + +The functions described in this section are declared in the header file +@file{gsl_errno.h}. + +@menu +* Error Reporting:: +* Error Codes:: +* Error Handlers:: +* Using GSL error reporting in your own functions:: +* Error Reporting Examples:: +@end menu + +@node Error Reporting +@section Error Reporting + +The library follows the thread-safe error reporting conventions of the +@sc{posix} Threads library. Functions return a non-zero error code to +indicate an error and @code{0} to indicate success. + +@example +int status = gsl_function (...) + +if (status) @{ /* an error occurred */ + ..... + /* status value specifies the type of error */ +@} +@end example + +The routines report an error whenever they cannot perform the task +requested of them. For example, a root-finding function would return a +non-zero error code if could not converge to the requested accuracy, or +exceeded a limit on the number of iterations. Situations like this are +a normal occurrence when using any mathematical library and you should +check the return status of the functions that you call. + +Whenever a routine reports an error the return value specifies the type +of error. The return value is analogous to the value of the variable +@code{errno} in the C library. The caller can examine the return code +and decide what action to take, including ignoring the error if it is +not considered serious. + +In addition to reporting errors by return codes the library also has an +error handler function @code{gsl_error}. This function is called by +other library functions when they report an error, just before they +return to the caller. The default behavior of the error handler is to +print a message and abort the program, + +@example +gsl: file.c:67: ERROR: invalid argument supplied by user +Default GSL error handler invoked. +Aborted +@end example + +The purpose of the @code{gsl_error} handler is to provide a function +where a breakpoint can be set that will catch library errors when +running under the debugger. It is not intended for use in production +programs, which should handle any errors using the return codes. + +@node Error Codes +@section Error Codes +@cindex error codes, reserved +The error code numbers returned by library functions are defined in +the file @file{gsl_errno.h}. They all have the prefix @code{GSL_} and +expand to non-zero constant integer values. Error codes above 1024 are +reserved for applications, and are not used by the library. Many of +the error codes use the same base name as the corresponding error code +in the C library. Here are some of the most common error codes, + +@cindex error codes +@deftypevr {Macro} int GSL_EDOM +Domain error; used by mathematical functions when an argument value does +not fall into the domain over which the function is defined (like +EDOM in the C library) +@end deftypevr + +@deftypevr {Macro} int GSL_ERANGE +Range error; used by mathematical functions when the result value is not +representable because of overflow or underflow (like ERANGE in the C +library) +@end deftypevr + +@deftypevr {Macro} int GSL_ENOMEM +No memory available. The system cannot allocate more virtual memory +because its capacity is full (like ENOMEM in the C library). This error +is reported when a GSL routine encounters problems when trying to +allocate memory with @code{malloc}. +@end deftypevr + +@deftypevr {Macro} int GSL_EINVAL +Invalid argument. This is used to indicate various kinds of problems +with passing the wrong argument to a library function (like EINVAL in the C +library). +@end deftypevr + +The error codes can be converted into an error message using the +function @code{gsl_strerror}. + +@deftypefun {const char *} gsl_strerror (const int @var{gsl_errno}) +This function returns a pointer to a string describing the error code +@var{gsl_errno}. For example, + +@example +printf ("error: %s\n", gsl_strerror (status)); +@end example + +@noindent +would print an error message like @code{error: output range error} for a +status value of @code{GSL_ERANGE}. +@end deftypefun + +@node Error Handlers +@section Error Handlers +@cindex Error handlers + +The default behavior of the GSL error handler is to print a short +message and call @code{abort}. When this default is in use programs +will stop with a core-dump whenever a library routine reports an error. +This is intended as a fail-safe default for programs which do not check +the return status of library routines (we don't encourage you to write +programs this way). + +If you turn off the default error handler it is your responsibility to +check the return values of routines and handle them yourself. You can +also customize the error behavior by providing a new error handler. For +example, an alternative error handler could log all errors to a file, +ignore certain error conditions (such as underflows), or start the +debugger and attach it to the current process when an error occurs. + +All GSL error handlers have the type @code{gsl_error_handler_t}, which is +defined in @file{gsl_errno.h}, + +@deftp {Data Type} gsl_error_handler_t + +This is the type of GSL error handler functions. An error handler will +be passed four arguments which specify the reason for the error (a +string), the name of the source file in which it occurred (also a +string), the line number in that file (an integer) and the error number +(an integer). The source file and line number are set at compile time +using the @code{__FILE__} and @code{__LINE__} directives in the +preprocessor. An error handler function returns type @code{void}. +Error handler functions should be defined like this, + +@example +void handler (const char * reason, + const char * file, + int line, + int gsl_errno) +@end example +@end deftp +@comment + +@noindent +To request the use of your own error handler you need to call the +function @code{gsl_set_error_handler} which is also declared in +@file{gsl_errno.h}, + +@deftypefun {gsl_error_handler_t *} gsl_set_error_handler (gsl_error_handler_t * @var{new_handler}) + +This function sets a new error handler, @var{new_handler}, for the GSL +library routines. The previous handler is returned (so that you can +restore it later). Note that the pointer to a user defined error +handler function is stored in a static variable, so there can be only +one error handler per program. This function should be not be used in +multi-threaded programs except to set up a program-wide error handler +from a master thread. The following example shows how to set and +restore a new error handler, + +@example +/* save original handler, install new handler */ +old_handler = gsl_set_error_handler (&my_handler); + +/* code uses new handler */ +..... + +/* restore original handler */ +gsl_set_error_handler (old_handler); +@end example + +@noindent +To use the default behavior (@code{abort} on error) set the error +handler to @code{NULL}, + +@example +old_handler = gsl_set_error_handler (NULL); +@end example +@end deftypefun + +@deftypefun {gsl_error_handler_t *} gsl_set_error_handler_off () +This function turns off the error handler by defining an error handler +which does nothing. This will cause the program to continue after any +error, so the return values from any library routines must be checked. +This is the recommended behavior for production programs. The previous +handler is returned (so that you can restore it later). +@end deftypefun + +The error behavior can be changed for specific applications by +recompiling the library with a customized definition of the +@code{GSL_ERROR} macro in the file @file{gsl_errno.h}. + +@node Using GSL error reporting in your own functions +@section Using GSL error reporting in your own functions +@cindex error handling macros +If you are writing numerical functions in a program which also uses GSL +code you may find it convenient to adopt the same error reporting +conventions as in the library. + +To report an error you need to call the function @code{gsl_error} with a +string describing the error and then return an appropriate error code +from @code{gsl_errno.h}, or a special value, such as @code{NaN}. For +convenience the file @file{gsl_errno.h} defines two macros which carry +out these steps: + +@deffn {Macro} GSL_ERROR (@var{reason}, @var{gsl_errno}) + +This macro reports an error using the GSL conventions and returns a +status value of @code{gsl_errno}. It expands to the following code fragment, + +@example +gsl_error (reason, __FILE__, __LINE__, gsl_errno); +return gsl_errno; +@end example + +@noindent +The macro definition in @file{gsl_errno.h} actually wraps the code +in a @code{do @{ ... @} while (0)} block to prevent possible +parsing problems. +@end deffn + +Here is an example of how the macro could be used to report that a +routine did not achieve a requested tolerance. To report the error the +routine needs to return the error code @code{GSL_ETOL}. + +@example +if (residual > tolerance) + @{ + GSL_ERROR("residual exceeds tolerance", GSL_ETOL); + @} +@end example + +@deffn {Macro} GSL_ERROR_VAL (@var{reason}, @var{gsl_errno}, @var{value}) + +This macro is the same as @code{GSL_ERROR} but returns a user-defined +value of @var{value} instead of an error code. It can be used for +mathematical functions that return a floating point value. +@end deffn + +The following example shows how to return a @code{NaN} at a mathematical +singularity using the @code{GSL_ERROR_VAL} macro, + +@example +if (x == 0) + @{ + GSL_ERROR_VAL("argument lies on singularity", + GSL_ERANGE, GSL_NAN); + @} +@end example + + +@node Error Reporting Examples +@section Examples + +Here is an example of some code which checks the return value of a +function where an error might be reported, + +@example +#include +#include +#include + +... + int status; + size_t n = 37; + + gsl_set_error_handler_off(); + + status = gsl_fft_complex_radix2_forward (data, stride, n); + + if (status) @{ + if (status == GSL_EINVAL) @{ + fprintf (stderr, "invalid argument, n=%d\n", n); + @} else @{ + fprintf (stderr, "failed, gsl_errno=%d\n", + status); + @} + exit (-1); + @} +... +@end example +@comment + +@noindent +The function @code{gsl_fft_complex_radix2} only accepts integer lengths +which are a power of two. If the variable @code{n} is not a power of +two then the call to the library function will return @code{GSL_EINVAL}, +indicating that the length argument is invalid. The function call to +@code{gsl_set_error_handler_off} stops the default error handler from +aborting the program. The @code{else} clause catches any other possible +errors. + diff --git a/software/gsl-1.15/doc/examples/blas.c b/software/gsl-1.15/doc/examples/blas.c new file mode 100644 index 000000000..ab4b39bd3 --- /dev/null +++ b/software/gsl-1.15/doc/examples/blas.c @@ -0,0 +1,31 @@ +#include +#include + +int +main (void) +{ + double a[] = { 0.11, 0.12, 0.13, + 0.21, 0.22, 0.23 }; + + double b[] = { 1011, 1012, + 1021, 1022, + 1031, 1032 }; + + double c[] = { 0.00, 0.00, + 0.00, 0.00 }; + + gsl_matrix_view A = gsl_matrix_view_array(a, 2, 3); + gsl_matrix_view B = gsl_matrix_view_array(b, 3, 2); + gsl_matrix_view C = gsl_matrix_view_array(c, 2, 2); + + /* Compute C = A B */ + + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, + 1.0, &A.matrix, &B.matrix, + 0.0, &C.matrix); + + printf ("[ %g, %g\n", c[0], c[1]); + printf (" %g, %g ]\n", c[2], c[3]); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/blas.out b/software/gsl-1.15/doc/examples/blas.out new file mode 100644 index 000000000..e8ec9603a --- /dev/null +++ b/software/gsl-1.15/doc/examples/blas.out @@ -0,0 +1,2 @@ +[ 367.76, 368.12 + 674.06, 674.72 ] \ No newline at end of file diff --git a/software/gsl-1.15/doc/examples/block.c b/software/gsl-1.15/doc/examples/block.c new file mode 100644 index 000000000..53f62a17f --- /dev/null +++ b/software/gsl-1.15/doc/examples/block.c @@ -0,0 +1,14 @@ +#include +#include + +int +main (void) +{ + gsl_block * b = gsl_block_alloc (100); + + printf ("length of block = %u\n", b->size); + printf ("block data address = %#x\n", b->data); + + gsl_block_free (b); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/block.out b/software/gsl-1.15/doc/examples/block.out new file mode 100644 index 000000000..1f84cd013 --- /dev/null +++ b/software/gsl-1.15/doc/examples/block.out @@ -0,0 +1,2 @@ +length of block = 100 +block data address = 0x804b0d8 diff --git a/software/gsl-1.15/doc/examples/bspline.c b/software/gsl-1.15/doc/examples/bspline.c new file mode 100644 index 000000000..5e742bf3c --- /dev/null +++ b/software/gsl-1.15/doc/examples/bspline.c @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +/* number of data points to fit */ +#define N 200 + +/* number of fit coefficients */ +#define NCOEFFS 12 + +/* nbreak = ncoeffs + 2 - k = ncoeffs - 2 since k = 4 */ +#define NBREAK (NCOEFFS - 2) + +int +main (void) +{ + const size_t n = N; + const size_t ncoeffs = NCOEFFS; + const size_t nbreak = NBREAK; + size_t i, j; + gsl_bspline_workspace *bw; + gsl_vector *B; + double dy; + gsl_rng *r; + gsl_vector *c, *w; + gsl_vector *x, *y; + gsl_matrix *X, *cov; + gsl_multifit_linear_workspace *mw; + double chisq, Rsq, dof, tss; + + gsl_rng_env_setup(); + r = gsl_rng_alloc(gsl_rng_default); + + /* allocate a cubic bspline workspace (k = 4) */ + bw = gsl_bspline_alloc(4, nbreak); + B = gsl_vector_alloc(ncoeffs); + + x = gsl_vector_alloc(n); + y = gsl_vector_alloc(n); + X = gsl_matrix_alloc(n, ncoeffs); + c = gsl_vector_alloc(ncoeffs); + w = gsl_vector_alloc(n); + cov = gsl_matrix_alloc(ncoeffs, ncoeffs); + mw = gsl_multifit_linear_alloc(n, ncoeffs); + + printf("#m=0,S=0\n"); + /* this is the data to be fitted */ + for (i = 0; i < n; ++i) + { + double sigma; + double xi = (15.0 / (N - 1)) * i; + double yi = cos(xi) * exp(-0.1 * xi); + + sigma = 0.1 * yi; + dy = gsl_ran_gaussian(r, sigma); + yi += dy; + + gsl_vector_set(x, i, xi); + gsl_vector_set(y, i, yi); + gsl_vector_set(w, i, 1.0 / (sigma * sigma)); + + printf("%f %f\n", xi, yi); + } + + /* use uniform breakpoints on [0, 15] */ + gsl_bspline_knots_uniform(0.0, 15.0, bw); + + /* construct the fit matrix X */ + for (i = 0; i < n; ++i) + { + double xi = gsl_vector_get(x, i); + + /* compute B_j(xi) for all j */ + gsl_bspline_eval(xi, B, bw); + + /* fill in row i of X */ + for (j = 0; j < ncoeffs; ++j) + { + double Bj = gsl_vector_get(B, j); + gsl_matrix_set(X, i, j, Bj); + } + } + + /* do the fit */ + gsl_multifit_wlinear(X, w, y, c, cov, &chisq, mw); + + dof = n - ncoeffs; + tss = gsl_stats_wtss(w->data, 1, y->data, 1, y->size); + Rsq = 1.0 - chisq / tss; + + fprintf(stderr, "chisq/dof = %e, Rsq = %f\n", + chisq / dof, Rsq); + + /* output the smoothed curve */ + { + double xi, yi, yerr; + + printf("#m=1,S=0\n"); + for (xi = 0.0; xi < 15.0; xi += 0.1) + { + gsl_bspline_eval(xi, B, bw); + gsl_multifit_linear_est(B, c, cov, &yi, &yerr); + printf("%f %f\n", xi, yi); + } + } + + gsl_rng_free(r); + gsl_bspline_free(bw); + gsl_vector_free(B); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_matrix_free(X); + gsl_vector_free(c); + gsl_vector_free(w); + gsl_matrix_free(cov); + gsl_multifit_linear_free(mw); + + return 0; +} /* main() */ diff --git a/software/gsl-1.15/doc/examples/cblas.c b/software/gsl-1.15/doc/examples/cblas.c new file mode 100644 index 000000000..cb6b31aff --- /dev/null +++ b/software/gsl-1.15/doc/examples/cblas.c @@ -0,0 +1,33 @@ +#include +#include + +int +main (void) +{ + int lda = 3; + + float A[] = { 0.11, 0.12, 0.13, + 0.21, 0.22, 0.23 }; + + int ldb = 2; + + float B[] = { 1011, 1012, + 1021, 1022, + 1031, 1032 }; + + int ldc = 2; + + float C[] = { 0.00, 0.00, + 0.00, 0.00 }; + + /* Compute C = A B */ + + cblas_sgemm (CblasRowMajor, + CblasNoTrans, CblasNoTrans, 2, 2, 3, + 1.0, A, lda, B, ldb, 0.0, C, ldc); + + printf ("[ %g, %g\n", C[0], C[1]); + printf (" %g, %g ]\n", C[2], C[3]); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/cblas.out b/software/gsl-1.15/doc/examples/cblas.out new file mode 100644 index 000000000..a0f51d748 --- /dev/null +++ b/software/gsl-1.15/doc/examples/cblas.out @@ -0,0 +1,2 @@ +[ 367.76, 368.12 + 674.06, 674.72 ] diff --git a/software/gsl-1.15/doc/examples/cdf.c b/software/gsl-1.15/doc/examples/cdf.c new file mode 100644 index 000000000..968eb96df --- /dev/null +++ b/software/gsl-1.15/doc/examples/cdf.c @@ -0,0 +1,23 @@ +#include +#include + +int +main (void) +{ + double P, Q; + double x = 2.0; + + P = gsl_cdf_ugaussian_P (x); + printf ("prob(x < %f) = %f\n", x, P); + + Q = gsl_cdf_ugaussian_Q (x); + printf ("prob(x > %f) = %f\n", x, Q); + + x = gsl_cdf_ugaussian_Pinv (P); + printf ("Pinv(%f) = %f\n", P, x); + + x = gsl_cdf_ugaussian_Qinv (Q); + printf ("Qinv(%f) = %f\n", Q, x); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/cdf.out b/software/gsl-1.15/doc/examples/cdf.out new file mode 100644 index 000000000..f04b75b63 --- /dev/null +++ b/software/gsl-1.15/doc/examples/cdf.out @@ -0,0 +1,4 @@ +prob(x < 2.000000) = 0.977250 +prob(x > 2.000000) = 0.022750 +Pinv(0.977250) = 2.000000 +Qinv(0.022750) = 2.000000 diff --git a/software/gsl-1.15/doc/examples/cheb.c b/software/gsl-1.15/doc/examples/cheb.c new file mode 100644 index 000000000..58a0c5469 --- /dev/null +++ b/software/gsl-1.15/doc/examples/cheb.c @@ -0,0 +1,40 @@ +#include +#include +#include + +double +f (double x, void *p) +{ + if (x < 0.5) + return 0.25; + else + return 0.75; +} + +int +main (void) +{ + int i, n = 10000; + + gsl_cheb_series *cs = gsl_cheb_alloc (40); + + gsl_function F; + + F.function = f; + F.params = 0; + + gsl_cheb_init (cs, &F, 0.0, 1.0); + + for (i = 0; i < n; i++) + { + double x = i / (double)n; + double r10 = gsl_cheb_eval_n (cs, 10, x); + double r40 = gsl_cheb_eval (cs, x); + printf ("%g %g %g %g\n", + x, GSL_FN_EVAL (&F, x), r10, r40); + } + + gsl_cheb_free (cs); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/combination.c b/software/gsl-1.15/doc/examples/combination.c new file mode 100644 index 000000000..708174ffa --- /dev/null +++ b/software/gsl-1.15/doc/examples/combination.c @@ -0,0 +1,25 @@ +#include +#include + +int +main (void) +{ + gsl_combination * c; + size_t i; + + printf ("All subsets of {0,1,2,3} by size:\n") ; + for (i = 0; i <= 4; i++) + { + c = gsl_combination_calloc (4, i); + do + { + printf ("{"); + gsl_combination_fprintf (stdout, c, " %u"); + printf (" }\n"); + } + while (gsl_combination_next (c) == GSL_SUCCESS); + gsl_combination_free (c); + } + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/combination.out b/software/gsl-1.15/doc/examples/combination.out new file mode 100644 index 000000000..a9050ab22 --- /dev/null +++ b/software/gsl-1.15/doc/examples/combination.out @@ -0,0 +1,17 @@ +All subsets of {0,1,2,3} by size: +{ } +{ 0 } +{ 1 } +{ 2 } +{ 3 } +{ 0 1 } +{ 0 2 } +{ 0 3 } +{ 1 2 } +{ 1 3 } +{ 2 3 } +{ 0 1 2 } +{ 0 1 3 } +{ 0 2 3 } +{ 1 2 3 } +{ 0 1 2 3 } diff --git a/software/gsl-1.15/doc/examples/const.c b/software/gsl-1.15/doc/examples/const.c new file mode 100644 index 000000000..47718c51d --- /dev/null +++ b/software/gsl-1.15/doc/examples/const.c @@ -0,0 +1,25 @@ +#include +#include + +int +main (void) +{ + double c = GSL_CONST_MKSA_SPEED_OF_LIGHT; + double au = GSL_CONST_MKSA_ASTRONOMICAL_UNIT; + double minutes = GSL_CONST_MKSA_MINUTE; + + /* distance stored in meters */ + double r_earth = 1.00 * au; + double r_mars = 1.52 * au; + + double t_min, t_max; + + t_min = (r_mars - r_earth) / c; + t_max = (r_mars + r_earth) / c; + + printf ("light travel time from Earth to Mars:\n"); + printf ("minimum = %.1f minutes\n", t_min / minutes); + printf ("maximum = %.1f minutes\n", t_max / minutes); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/const.out b/software/gsl-1.15/doc/examples/const.out new file mode 100644 index 000000000..6552a3d99 --- /dev/null +++ b/software/gsl-1.15/doc/examples/const.out @@ -0,0 +1,3 @@ +light travel time from Earth to Mars: +minimum = 4.3 minutes +maximum = 21.0 minutes diff --git a/software/gsl-1.15/doc/examples/demo_fn.c b/software/gsl-1.15/doc/examples/demo_fn.c new file mode 100644 index 000000000..4d8a5520b --- /dev/null +++ b/software/gsl-1.15/doc/examples/demo_fn.c @@ -0,0 +1,40 @@ +double +quadratic (double x, void *params) +{ + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + return (a * x + b) * x + c; +} + +double +quadratic_deriv (double x, void *params) +{ + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + return 2.0 * a * x + b; +} + +void +quadratic_fdf (double x, void *params, + double *y, double *dy) +{ + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + *y = (a * x + b) * x + c; + *dy = 2.0 * a * x + b; +} diff --git a/software/gsl-1.15/doc/examples/demo_fn.h b/software/gsl-1.15/doc/examples/demo_fn.h new file mode 100644 index 000000000..77aeea1d9 --- /dev/null +++ b/software/gsl-1.15/doc/examples/demo_fn.h @@ -0,0 +1,9 @@ +struct quadratic_params + { + double a, b, c; + }; + +double quadratic (double x, void *params); +double quadratic_deriv (double x, void *params); +void quadratic_fdf (double x, void *params, + double *y, double *dy); diff --git a/software/gsl-1.15/doc/examples/diff.c b/software/gsl-1.15/doc/examples/diff.c new file mode 100644 index 000000000..b32e1934f --- /dev/null +++ b/software/gsl-1.15/doc/examples/diff.c @@ -0,0 +1,32 @@ +#include +#include +#include + +double f (double x, void * params) +{ + return pow (x, 1.5); +} + +int +main (void) +{ + gsl_function F; + double result, abserr; + + F.function = &f; + F.params = 0; + + printf ("f(x) = x^(3/2)\n"); + + gsl_deriv_central (&F, 2.0, 1e-8, &result, &abserr); + printf ("x = 2.0\n"); + printf ("f'(x) = %.10f +/- %.10f\n", result, abserr); + printf ("exact = %.10f\n\n", 1.5 * sqrt(2.0)); + + gsl_deriv_forward (&F, 0.0, 1e-8, &result, &abserr); + printf ("x = 0.0\n"); + printf ("f'(x) = %.10f +/- %.10f\n", result, abserr); + printf ("exact = %.10f\n", 0.0); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/diff.out b/software/gsl-1.15/doc/examples/diff.out new file mode 100644 index 000000000..dab42d593 --- /dev/null +++ b/software/gsl-1.15/doc/examples/diff.out @@ -0,0 +1,8 @@ +f(x) = x^(3/2) +x = 2.0 +f'(x) = 2.1213203120 +/- 0.0000004064 +exact = 2.1213203436 + +x = 0.0 +f'(x) = 0.0000000160 +/- 0.0000000339 +exact = 0.0000000000 diff --git a/software/gsl-1.15/doc/examples/dwt.c b/software/gsl-1.15/doc/examples/dwt.c new file mode 100644 index 000000000..062b2c6c8 --- /dev/null +++ b/software/gsl-1.15/doc/examples/dwt.c @@ -0,0 +1,54 @@ +#include +#include +#include +#include + +int +main (int argc, char **argv) +{ + int i, n = 256, nc = 20; + double *data = malloc (n * sizeof (double)); + double *abscoeff = malloc (n * sizeof (double)); + size_t *p = malloc (n * sizeof (size_t)); + + FILE * f; + gsl_wavelet *w; + gsl_wavelet_workspace *work; + + w = gsl_wavelet_alloc (gsl_wavelet_daubechies, 4); + work = gsl_wavelet_workspace_alloc (n); + + f = fopen (argv[1], "r"); + for (i = 0; i < n; i++) + { + fscanf (f, "%lg", &data[i]); + } + fclose (f); + + gsl_wavelet_transform_forward (w, data, 1, n, work); + + for (i = 0; i < n; i++) + { + abscoeff[i] = fabs (data[i]); + } + + gsl_sort_index (p, abscoeff, 1, n); + + for (i = 0; (i + nc) < n; i++) + data[p[i]] = 0; + + gsl_wavelet_transform_inverse (w, data, 1, n, work); + + for (i = 0; i < n; i++) + { + printf ("%g\n", data[i]); + } + + gsl_wavelet_free (w); + gsl_wavelet_workspace_free (work); + + free (data); + free (abscoeff); + free (p); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/dwt.dat b/software/gsl-1.15/doc/examples/dwt.dat new file mode 100644 index 000000000..e7ff47bc5 --- /dev/null +++ b/software/gsl-1.15/doc/examples/dwt.dat @@ -0,0 +1,256 @@ +0.0167729 +0.031888 +0.0412921 +0.0522264 +0.0574496 +0.0642031 +0.0724869 +0.0803607 +0.0825233 +0.0862162 +0.0914394 +0.0962525 +0.102596 +0.108529 +0.114053 +0.119686 +0.104007 +0.094039 +0.0897813 +0.0839935 +0.0839162 +0.0823088 +0.0791713 +0.0764437 +0.0509741 +0.0315983 +0.0183161 +0.00340114 +-0.00542012 +-0.0158742 +-0.0279611 +-0.0396104 +-0.0160286 +-0.00188697 +0.00281451 +0.0100455 +0.00783627 +0.00815656 +0.0110063 +0.0131783 +0.00591016 +0.00117148 +-0.00103772 +-0.00392469 +-0.00428218 +-0.00531744 +-0.00703047 +-0.0085619 +-0.014332 +-0.0189663 +-0.0224649 +-0.0262678 +-0.0289349 +-0.0319064 +-0.0351822 +-0.0383765 +-0.0801973 +-0.111668 +-0.132789 +-0.156683 +-0.162696 +-0.1735 +-0.189095 +-0.203407 +-0.00510083 +0.136235 +0.341101 +0.528945 +0.801527 +1.0514 +1.15485 +1.29754 +1.16912 +1.11335 +0.760921 +0.487984 +0.24772 +-0.00129903 +-0.0610099 +-0.171446 +-0.102442 +-0.081519 +-0.108677 +-0.122951 +-0.0931296 +-0.0751235 +-0.0689329 +-0.0595764 +-0.0723311 +-0.0791611 +-0.0800665 +-0.0825593 +-0.0791275 +-0.0772832 +-0.0770263 +-0.0763442 +-0.078946 +-0.080668 +-0.0815099 +-0.0825877 +-0.0827855 +-0.083219 +-0.0838884 +-0.0844945 +-0.0842208 +-0.0841828 +-0.0843805 +-0.0845151 +-0.0848855 +-0.0851927 +-0.0854368 +-0.0856977 +-0.0858204 +-0.0859801 +-0.0861769 +-0.0863638 +-0.0865877 +-0.0868017 +-0.0870057 +-0.0872124 +-0.0874562 +-0.08769 +-0.0879139 +-0.0881405 +-0.0883571 +-0.0885764 +-0.0887984 +-0.0890196 +-0.0890797 +-0.0891829 +-0.0893293 +-0.0894642 +-0.0896423 +-0.0898087 +-0.0899636 +-0.0901216 +-0.0903228 +-0.0905125 +-0.0906905 +-0.0908717 +-0.0910413 +-0.0912139 +-0.0913897 +-0.0915647 +-0.0917828 +-0.0919894 +-0.0921844 +-0.0923825 +-0.092569 +-0.0927586 +-0.0929514 +-0.0931433 +-0.0933236 +-0.093507 +-0.0936935 +-0.0938792 +-0.094068 +-0.094256 +-0.0944431 +-0.0946305 +-0.103627 +-0.110264 +-0.11454 +-0.119448 +-0.121996 +-0.125177 +-0.12899 +-0.132633 +-0.133916 +-0.135831 +-0.138379 +-0.140758 +-0.143768 +-0.14661 +-0.149282 +-0.151999 +-0.121242 +-0.0994544 +-0.0866362 +-0.0714146 +-0.0651625 +-0.056507 +-0.0454482 +-0.0350333 +-0.033588 +-0.0297392 +-0.0234871 +-0.017879 +-0.00986753 +-0.00250002 +0.00422351 +0.0111196 +-0.00226639 +-0.0102178 +-0.0127347 +-0.0167077 +-0.0152462 +-0.0152409 +-0.0166917 +-0.0177524 +-0.0133785 +-0.0104608 +-0.00899926 +-0.00714755 +-0.00675204 +-0.00596633 +-0.00479045 +-0.00371911 +0.00278678 +0.00783649 +0.01143 +0.0154137 +0.0179412 +0.0208589 +0.0241668 +0.0273702 +0.0291173 +0.0312547 +0.0337822 +0.0362052 +0.0390183 +0.0417269 +0.044331 +0.0469631 +0.0347545 +0.0265225 +0.0222671 +0.0169461 +0.0156016 +0.0131917 +0.00971622 +0.00652626 +0.00731282 +0.00703387 +0.00568942 +0.00463047 +0.00250601 +0.000667052 +-0.000886403 +-0.00251636 +-0.000169788 +0.00111128 +0.00132683 +0.00182789 +0.00126344 +0.000984496 +0.000991051 +0.000921107 +-0.000214344 +-0.00106429 +-0.00162874 +-0.00226969 +-0.00262514 +-0.00305708 +-0.00356553 +-0.00405348 diff --git a/software/gsl-1.15/doc/examples/ecg.dat b/software/gsl-1.15/doc/examples/ecg.dat new file mode 100644 index 000000000..5ea824a2c --- /dev/null +++ b/software/gsl-1.15/doc/examples/ecg.dat @@ -0,0 +1,256 @@ + 0.0462458471760794 + 0.0462458471760794 + 0.0512458471760794 + 0.0712458471760795 + 0.0712458471760795 + 0.0662458471760795 + 0.0962458471760795 + 0.101245847176079 + 0.116245847176079 + 0.121245847176079 + 0.116245847176079 + 0.106245847176079 + 0.0912458471760794 + 0.101245847176079 + 0.0962458471760795 + 0.0962458471760795 + 0.0962458471760795 + 0.0912458471760794 + 0.0862458471760795 + 0.0812458471760795 + 0.0862458471760795 + 0.101245847176079 + 0.111245847176079 + 0.116245847176079 + 0.0762458471760795 + 0.0362458471760795 + 0.0362458471760795 + 0.0212458471760795 + 0.0112458471760795 + -0.00875415282392056 + -0.00875415282392056 + -0.00375415282392055 + 0.00624584717607946 + 0.00124584717607945 + 0.00624584717607946 + -0.00375415282392055 + -0.0187541528239206 + -0.0237541528239205 + -0.0187541528239206 + -0.0187541528239206 + -0.0287541528239205 + -0.0237541528239205 + -0.0337541528239205 + -0.00875415282392056 + -0.0137541528239206 + -0.00875415282392056 + 0.00124584717607945 + -0.0237541528239205 + -0.0337541528239205 + -0.0187541528239206 + -0.00875415282392056 + -0.00375415282392055 + -0.00875415282392056 + -0.0287541528239205 + -0.0437541528239205 + -0.0387541528239205 + -0.0587541528239205 + -0.103754152823921 + -0.123754152823921 + -0.153754152823921 + -0.188754152823921 + -0.213754152823921 + -0.183754152823921 + -0.0937541528239205 + 0.0212458471760795 + 0.161245847176079 + 0.306245847176079 + 0.556245847176079 + 0.81124584717608 + 1.04124584717608 + 1.19624584717608 + 1.26124584717608 + 1.22624584717608 + 1.07624584717608 + 0.81124584717608 + 0.486245847176079 + 0.211245847176079 + 0.0512458471760794 + -0.0687541528239206 + -0.128754152823921 + -0.153754152823921 + -0.133754152823921 + -0.103754152823921 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0687541528239206 + -0.0587541528239205 + -0.0587541528239205 + -0.0587541528239205 + -0.0737541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0537541528239205 + -0.0737541528239206 + -0.0887541528239205 + -0.0887541528239205 + -0.0787541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0737541528239206 + -0.0637541528239206 + -0.0537541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0887541528239205 + -0.0887541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0737541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0787541528239206 + -0.0887541528239205 + -0.0837541528239206 + -0.0887541528239205 + -0.0937541528239205 + -0.0887541528239205 + -0.0787541528239206 + -0.0787541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0837541528239206 + -0.0887541528239205 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0637541528239206 + -0.0887541528239205 + -0.0837541528239206 + -0.0737541528239206 + -0.0687541528239206 + -0.0537541528239205 + -0.0687541528239206 + -0.0737541528239206 + -0.0887541528239205 + -0.0787541528239206 + -0.0687541528239206 + -0.0687541528239206 + -0.0637541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0937541528239205 + -0.0787541528239206 + -0.0737541528239206 + -0.0837541528239206 + -0.0937541528239205 + -0.0987541528239205 + -0.0987541528239205 + -0.0887541528239205 + -0.0937541528239205 + -0.103754152823921 + -0.0987541528239205 + -0.113754152823921 + -0.108754152823921 + -0.108754152823921 + -0.0987541528239205 + -0.108754152823921 + -0.128754152823921 + -0.133754152823921 + -0.128754152823921 + -0.113754152823921 + -0.123754152823921 + -0.128754152823921 + -0.133754152823921 + -0.148754152823921 + -0.138754152823921 + -0.133754152823921 + -0.128754152823921 + -0.133754152823921 + -0.148754152823921 + -0.153754152823921 + -0.138754152823921 + -0.128754152823921 + -0.123754152823921 + -0.118754152823921 + -0.113754152823921 + -0.118754152823921 + -0.0887541528239205 + -0.0737541528239206 + -0.0487541528239205 + -0.0437541528239205 + -0.0387541528239205 + -0.0437541528239205 + -0.0187541528239206 + -0.00375415282392055 + 0.00624584717607946 + 0.00124584717607945 + -0.00875415282392056 + -0.00875415282392056 + 0.00124584717607945 + 0.0112458471760795 + 0.0212458471760795 + 0.0212458471760795 + 0.00124584717607945 + 0.00124584717607945 + 0.00624584717607946 + 0.0162458471760795 + 0.0162458471760795 + 0.0262458471760795 + 0.00124584717607945 + -0.00875415282392056 + 0.0162458471760795 + 0.0112458471760795 + 0.0212458471760795 + 0.0212458471760795 + 0.00124584717607945 + -0.00375415282392055 + 0.0112458471760795 + 0.0162458471760795 + 0.00624584717607946 + 0.0162458471760795 + 0.00624584717607946 + 0.00624584717607946 + 0.0112458471760795 + 0.0262458471760795 + 0.0312458471760795 + 0.0162458471760795 + 0.0112458471760795 + 0.00124584717607945 + 0.00624584717607946 + 0.0212458471760795 + 0.00624584717607946 + 0.00624584717607946 + 0.00624584717607946 + -0.00875415282392056 + 0.00624584717607946 + 0.00124584717607945 + 0.00624584717607946 + -0.00375415282392055 + -0.0137541528239206 + -0.0187541528239206 + -0.0137541528239206 + -0.0137541528239206 + -0.00875415282392056 + -0.00375415282392055 + -0.0237541528239205 + -0.0287541528239205 + -0.0237541528239205 + -0.0137541528239206 + -0.00875415282392056 + -0.00875415282392056 + -0.0237541528239205 + -0.0237541528239205 + -0.0237541528239205 + 0.00124584717607945 + -0.00875415282392056 + -0.0137541528239206 + -0.0187541528239206 + -0.0337541528239205 + -0.0137541528239206 + -0.00875415282392056 + -0.00875415282392056 diff --git a/software/gsl-1.15/doc/examples/eigen.c b/software/gsl-1.15/doc/examples/eigen.c new file mode 100644 index 000000000..a24c912fc --- /dev/null +++ b/software/gsl-1.15/doc/examples/eigen.c @@ -0,0 +1,50 @@ +#include +#include +#include + +int +main (void) +{ + double data[] = { 1.0 , 1/2.0, 1/3.0, 1/4.0, + 1/2.0, 1/3.0, 1/4.0, 1/5.0, + 1/3.0, 1/4.0, 1/5.0, 1/6.0, + 1/4.0, 1/5.0, 1/6.0, 1/7.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (data, 4, 4); + + gsl_vector *eval = gsl_vector_alloc (4); + gsl_matrix *evec = gsl_matrix_alloc (4, 4); + + gsl_eigen_symmv_workspace * w = + gsl_eigen_symmv_alloc (4); + + gsl_eigen_symmv (&m.matrix, eval, evec, w); + + gsl_eigen_symmv_free (w); + + gsl_eigen_symmv_sort (eval, evec, + GSL_EIGEN_SORT_ABS_ASC); + + { + int i; + + for (i = 0; i < 4; i++) + { + double eval_i + = gsl_vector_get (eval, i); + gsl_vector_view evec_i + = gsl_matrix_column (evec, i); + + printf ("eigenvalue = %g\n", eval_i); + printf ("eigenvector = \n"); + gsl_vector_fprintf (stdout, + &evec_i.vector, "%g"); + } + } + + gsl_vector_free (eval); + gsl_matrix_free (evec); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/eigen_nonsymm.c b/software/gsl-1.15/doc/examples/eigen_nonsymm.c new file mode 100644 index 000000000..eb1a4e59d --- /dev/null +++ b/software/gsl-1.15/doc/examples/eigen_nonsymm.c @@ -0,0 +1,55 @@ +#include +#include +#include + +int +main (void) +{ + double data[] = { -1.0, 1.0, -1.0, 1.0, + -8.0, 4.0, -2.0, 1.0, + 27.0, 9.0, 3.0, 1.0, + 64.0, 16.0, 4.0, 1.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (data, 4, 4); + + gsl_vector_complex *eval = gsl_vector_complex_alloc (4); + gsl_matrix_complex *evec = gsl_matrix_complex_alloc (4, 4); + + gsl_eigen_nonsymmv_workspace * w = + gsl_eigen_nonsymmv_alloc (4); + + gsl_eigen_nonsymmv (&m.matrix, eval, evec, w); + + gsl_eigen_nonsymmv_free (w); + + gsl_eigen_nonsymmv_sort (eval, evec, + GSL_EIGEN_SORT_ABS_DESC); + + { + int i, j; + + for (i = 0; i < 4; i++) + { + gsl_complex eval_i + = gsl_vector_complex_get (eval, i); + gsl_vector_complex_view evec_i + = gsl_matrix_complex_column (evec, i); + + printf ("eigenvalue = %g + %gi\n", + GSL_REAL(eval_i), GSL_IMAG(eval_i)); + printf ("eigenvector = \n"); + for (j = 0; j < 4; ++j) + { + gsl_complex z = + gsl_vector_complex_get(&evec_i.vector, j); + printf("%g + %gi\n", GSL_REAL(z), GSL_IMAG(z)); + } + } + } + + gsl_vector_complex_free(eval); + gsl_matrix_complex_free(evec); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/expfit.c b/software/gsl-1.15/doc/examples/expfit.c new file mode 100644 index 000000000..f94cf2b8b --- /dev/null +++ b/software/gsl-1.15/doc/examples/expfit.c @@ -0,0 +1,70 @@ +/* expfit.c -- model functions for exponential + background */ + +struct data { + size_t n; + double * y; + double * sigma; +}; + +int +expb_f (const gsl_vector * x, void *data, + gsl_vector * f) +{ + size_t n = ((struct data *)data)->n; + double *y = ((struct data *)data)->y; + double *sigma = ((struct data *) data)->sigma; + + double A = gsl_vector_get (x, 0); + double lambda = gsl_vector_get (x, 1); + double b = gsl_vector_get (x, 2); + + size_t i; + + for (i = 0; i < n; i++) + { + /* Model Yi = A * exp(-lambda * i) + b */ + double t = i; + double Yi = A * exp (-lambda * t) + b; + gsl_vector_set (f, i, (Yi - y[i])/sigma[i]); + } + + return GSL_SUCCESS; +} + +int +expb_df (const gsl_vector * x, void *data, + gsl_matrix * J) +{ + size_t n = ((struct data *)data)->n; + double *sigma = ((struct data *) data)->sigma; + + double A = gsl_vector_get (x, 0); + double lambda = gsl_vector_get (x, 1); + + size_t i; + + for (i = 0; i < n; i++) + { + /* Jacobian matrix J(i,j) = dfi / dxj, */ + /* where fi = (Yi - yi)/sigma[i], */ + /* Yi = A * exp(-lambda * i) + b */ + /* and the xj are the parameters (A,lambda,b) */ + double t = i; + double s = sigma[i]; + double e = exp(-lambda * t); + gsl_matrix_set (J, i, 0, e/s); + gsl_matrix_set (J, i, 1, -t * A * e/s); + gsl_matrix_set (J, i, 2, 1/s); + } + return GSL_SUCCESS; +} + +int +expb_fdf (const gsl_vector * x, void *data, + gsl_vector * f, gsl_matrix * J) +{ + expb_f (x, data, f); + expb_df (x, data, J); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/doc/examples/fft.c b/software/gsl-1.15/doc/examples/fft.c new file mode 100644 index 000000000..aa00242fd --- /dev/null +++ b/software/gsl-1.15/doc/examples/fft.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include + +#define REAL(z,i) ((z)[2*(i)]) +#define IMAG(z,i) ((z)[2*(i)+1]) + +int +main (void) +{ + int i; double data[2*128]; + + for (i = 0; i < 128; i++) + { + REAL(data,i) = 0.0; IMAG(data,i) = 0.0; + } + + REAL(data,0) = 1.0; + + for (i = 1; i <= 10; i++) + { + REAL(data,i) = REAL(data,128-i) = 1.0; + } + + for (i = 0; i < 128; i++) + { + printf ("%d %e %e\n", i, + REAL(data,i), IMAG(data,i)); + } + printf ("\n"); + + gsl_fft_complex_radix2_forward (data, 1, 128); + + for (i = 0; i < 128; i++) + { + printf ("%d %e %e\n", i, + REAL(data,i)/sqrt(128), + IMAG(data,i)/sqrt(128)); + } + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/fftmr.c b/software/gsl-1.15/doc/examples/fftmr.c new file mode 100644 index 000000000..0a43e0ac6 --- /dev/null +++ b/software/gsl-1.15/doc/examples/fftmr.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include + +#define REAL(z,i) ((z)[2*(i)]) +#define IMAG(z,i) ((z)[2*(i)+1]) + +int +main (void) +{ + int i; + const int n = 630; + double data[2*n]; + + gsl_fft_complex_wavetable * wavetable; + gsl_fft_complex_workspace * workspace; + + for (i = 0; i < n; i++) + { + REAL(data,i) = 0.0; + IMAG(data,i) = 0.0; + } + + data[0] = 1.0; + + for (i = 1; i <= 10; i++) + { + REAL(data,i) = REAL(data,n-i) = 1.0; + } + + for (i = 0; i < n; i++) + { + printf ("%d: %e %e\n", i, REAL(data,i), + IMAG(data,i)); + } + printf ("\n"); + + wavetable = gsl_fft_complex_wavetable_alloc (n); + workspace = gsl_fft_complex_workspace_alloc (n); + + for (i = 0; i < wavetable->nf; i++) + { + printf ("# factor %d: %d\n", i, + wavetable->factor[i]); + } + + gsl_fft_complex_forward (data, 1, n, + wavetable, workspace); + + for (i = 0; i < n; i++) + { + printf ("%d: %e %e\n", i, REAL(data,i), + IMAG(data,i)); + } + + gsl_fft_complex_wavetable_free (wavetable); + gsl_fft_complex_workspace_free (workspace); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/fftreal.c b/software/gsl-1.15/doc/examples/fftreal.c new file mode 100644 index 000000000..ec3445825 --- /dev/null +++ b/software/gsl-1.15/doc/examples/fftreal.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include + +int +main (void) +{ + int i, n = 100; + double data[n]; + + gsl_fft_real_wavetable * real; + gsl_fft_halfcomplex_wavetable * hc; + gsl_fft_real_workspace * work; + + for (i = 0; i < n; i++) + { + data[i] = 0.0; + } + + for (i = n / 3; i < 2 * n / 3; i++) + { + data[i] = 1.0; + } + + for (i = 0; i < n; i++) + { + printf ("%d: %e\n", i, data[i]); + } + printf ("\n"); + + work = gsl_fft_real_workspace_alloc (n); + real = gsl_fft_real_wavetable_alloc (n); + + gsl_fft_real_transform (data, 1, n, + real, work); + + gsl_fft_real_wavetable_free (real); + + for (i = 11; i < n; i++) + { + data[i] = 0; + } + + hc = gsl_fft_halfcomplex_wavetable_alloc (n); + + gsl_fft_halfcomplex_inverse (data, 1, n, + hc, work); + gsl_fft_halfcomplex_wavetable_free (hc); + + for (i = 0; i < n; i++) + { + printf ("%d: %e\n", i, data[i]); + } + + gsl_fft_real_workspace_free (work); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/fitting.c b/software/gsl-1.15/doc/examples/fitting.c new file mode 100644 index 000000000..5c3696971 --- /dev/null +++ b/software/gsl-1.15/doc/examples/fitting.c @@ -0,0 +1,45 @@ +#include +#include + +int +main (void) +{ + int i, n = 4; + double x[4] = { 1970, 1980, 1990, 2000 }; + double y[4] = { 12, 11, 14, 13 }; + double w[4] = { 0.1, 0.2, 0.3, 0.4 }; + + double c0, c1, cov00, cov01, cov11, chisq; + + gsl_fit_wlinear (x, 1, w, 1, y, 1, n, + &c0, &c1, &cov00, &cov01, &cov11, + &chisq); + + printf ("# best fit: Y = %g + %g X\n", c0, c1); + printf ("# covariance matrix:\n"); + printf ("# [ %g, %g\n# %g, %g]\n", + cov00, cov01, cov01, cov11); + printf ("# chisq = %g\n", chisq); + + for (i = 0; i < n; i++) + printf ("data: %g %g %g\n", + x[i], y[i], 1/sqrt(w[i])); + + printf ("\n"); + + for (i = -30; i < 130; i++) + { + double xf = x[0] + (i/100.0) * (x[n-1] - x[0]); + double yf, yf_err; + + gsl_fit_linear_est (xf, + c0, c1, + cov00, cov01, cov11, + &yf, &yf_err); + + printf ("fit: %g %g\n", xf, yf); + printf ("hi : %g %g\n", xf, yf + yf_err); + printf ("lo : %g %g\n", xf, yf - yf_err); + } + return 0; +} diff --git a/software/gsl-1.15/doc/examples/fitting2.c b/software/gsl-1.15/doc/examples/fitting2.c new file mode 100644 index 000000000..43f8c0670 --- /dev/null +++ b/software/gsl-1.15/doc/examples/fitting2.c @@ -0,0 +1,80 @@ +#include +#include + +int +main (int argc, char **argv) +{ + int i, n; + double xi, yi, ei, chisq; + gsl_matrix *X, *cov; + gsl_vector *y, *w, *c; + + if (argc != 2) + { + fprintf (stderr,"usage: fit n < data\n"); + exit (-1); + } + + n = atoi (argv[1]); + + X = gsl_matrix_alloc (n, 3); + y = gsl_vector_alloc (n); + w = gsl_vector_alloc (n); + + c = gsl_vector_alloc (3); + cov = gsl_matrix_alloc (3, 3); + + for (i = 0; i < n; i++) + { + int count = fscanf (stdin, "%lg %lg %lg", + &xi, &yi, &ei); + + if (count != 3) + { + fprintf (stderr, "error reading file\n"); + exit (-1); + } + + printf ("%g %g +/- %g\n", xi, yi, ei); + + gsl_matrix_set (X, i, 0, 1.0); + gsl_matrix_set (X, i, 1, xi); + gsl_matrix_set (X, i, 2, xi*xi); + + gsl_vector_set (y, i, yi); + gsl_vector_set (w, i, 1.0/(ei*ei)); + } + + { + gsl_multifit_linear_workspace * work + = gsl_multifit_linear_alloc (n, 3); + gsl_multifit_wlinear (X, w, y, c, cov, + &chisq, work); + gsl_multifit_linear_free (work); + } + +#define C(i) (gsl_vector_get(c,(i))) +#define COV(i,j) (gsl_matrix_get(cov,(i),(j))) + + { + printf ("# best fit: Y = %g + %g X + %g X^2\n", + C(0), C(1), C(2)); + + printf ("# covariance matrix:\n"); + printf ("[ %+.5e, %+.5e, %+.5e \n", + COV(0,0), COV(0,1), COV(0,2)); + printf (" %+.5e, %+.5e, %+.5e \n", + COV(1,0), COV(1,1), COV(1,2)); + printf (" %+.5e, %+.5e, %+.5e ]\n", + COV(2,0), COV(2,1), COV(2,2)); + printf ("# chisq = %g\n", chisq); + } + + gsl_matrix_free (X); + gsl_vector_free (y); + gsl_vector_free (w); + gsl_vector_free (c); + gsl_matrix_free (cov); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/fitting3.c b/software/gsl-1.15/doc/examples/fitting3.c new file mode 100644 index 000000000..a3f1e3285 --- /dev/null +++ b/software/gsl-1.15/doc/examples/fitting3.c @@ -0,0 +1,29 @@ +#include +#include +#include + +int +main (void) +{ + double x; + const gsl_rng_type * T; + gsl_rng * r; + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (x = 0.1; x < 2; x+= 0.1) + { + double y0 = exp (x); + double sigma = 0.1 * y0; + double dy = gsl_ran_gaussian (r, sigma); + + printf ("%g %g %g\n", x, y0 + dy, sigma); + } + + gsl_rng_free(r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/histogram.c b/software/gsl-1.15/doc/examples/histogram.c new file mode 100644 index 000000000..a3c515009 --- /dev/null +++ b/software/gsl-1.15/doc/examples/histogram.c @@ -0,0 +1,37 @@ +#include +#include +#include + +int +main (int argc, char **argv) +{ + double a, b; + size_t n; + + if (argc != 4) + { + printf ("Usage: gsl-histogram xmin xmax n\n" + "Computes a histogram of the data " + "on stdin using n bins from xmin " + "to xmax\n"); + exit (0); + } + + a = atof (argv[1]); + b = atof (argv[2]); + n = atoi (argv[3]); + + { + double x; + gsl_histogram * h = gsl_histogram_alloc (n); + gsl_histogram_set_ranges_uniform (h, a, b); + + while (fscanf (stdin, "%lg", &x) == 1) + { + gsl_histogram_increment (h, x); + } + gsl_histogram_fprintf (stdout, h, "%g", "%g"); + gsl_histogram_free (h); + } + exit (0); +} diff --git a/software/gsl-1.15/doc/examples/histogram2d.c b/software/gsl-1.15/doc/examples/histogram2d.c new file mode 100644 index 000000000..3fcabb48e --- /dev/null +++ b/software/gsl-1.15/doc/examples/histogram2d.c @@ -0,0 +1,50 @@ +#include +#include +#include + +int +main (void) +{ + const gsl_rng_type * T; + gsl_rng * r; + + gsl_histogram2d * h = gsl_histogram2d_alloc (10, 10); + + gsl_histogram2d_set_ranges_uniform (h, + 0.0, 1.0, + 0.0, 1.0); + + gsl_histogram2d_accumulate (h, 0.3, 0.3, 1); + gsl_histogram2d_accumulate (h, 0.8, 0.1, 5); + gsl_histogram2d_accumulate (h, 0.7, 0.9, 0.5); + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + { + int i; + gsl_histogram2d_pdf * p + = gsl_histogram2d_pdf_alloc (h->nx, h->ny); + + gsl_histogram2d_pdf_init (p, h); + + for (i = 0; i < 1000; i++) { + double x, y; + double u = gsl_rng_uniform (r); + double v = gsl_rng_uniform (r); + + gsl_histogram2d_pdf_sample (p, u, v, &x, &y); + + printf ("%g %g\n", x, y); + } + + gsl_histogram2d_pdf_free (p); + } + + gsl_histogram2d_free (h); + gsl_rng_free (r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/ieee.c b/software/gsl-1.15/doc/examples/ieee.c new file mode 100644 index 000000000..c7f111092 --- /dev/null +++ b/software/gsl-1.15/doc/examples/ieee.c @@ -0,0 +1,22 @@ +#include +#include + +int +main (void) +{ + float f = 1.0/3.0; + double d = 1.0/3.0; + + double fd = f; /* promote from float to double */ + + printf (" f="); gsl_ieee_printf_float(&f); + printf ("\n"); + + printf ("fd="); gsl_ieee_printf_double(&fd); + printf ("\n"); + + printf (" d="); gsl_ieee_printf_double(&d); + printf ("\n"); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/ieeeround.c b/software/gsl-1.15/doc/examples/ieeeround.c new file mode 100644 index 000000000..04f837db2 --- /dev/null +++ b/software/gsl-1.15/doc/examples/ieeeround.c @@ -0,0 +1,30 @@ +#include +#include +#include + +int +main (void) +{ + double x = 1, oldsum = 0, sum = 0; + int i = 0; + + gsl_ieee_env_setup (); /* read GSL_IEEE_MODE */ + + do + { + i++; + + oldsum = sum; + sum += x; + x = x / i; + + printf ("i=%2d sum=%.18f error=%g\n", + i, sum, sum - M_E); + + if (i > 30) + break; + } + while (sum != oldsum); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/integration.c b/software/gsl-1.15/doc/examples/integration.c new file mode 100644 index 000000000..a8f2450f3 --- /dev/null +++ b/software/gsl-1.15/doc/examples/integration.c @@ -0,0 +1,37 @@ +#include +#include +#include + +double f (double x, void * params) { + double alpha = *(double *) params; + double f = log(alpha*x) / sqrt(x); + return f; +} + +int +main (void) +{ + gsl_integration_workspace * w + = gsl_integration_workspace_alloc (1000); + + double result, error; + double expected = -4.0; + double alpha = 1.0; + + gsl_function F; + F.function = &f; + F.params = α + + gsl_integration_qags (&F, 0, 1, 0, 1e-7, 1000, + w, &result, &error); + + printf ("result = % .18f\n", result); + printf ("exact result = % .18f\n", expected); + printf ("estimated error = % .18f\n", error); + printf ("actual error = % .18f\n", result - expected); + printf ("intervals = %d\n", w->size); + + gsl_integration_workspace_free (w); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/integration.out b/software/gsl-1.15/doc/examples/integration.out new file mode 100644 index 000000000..4758ebf22 --- /dev/null +++ b/software/gsl-1.15/doc/examples/integration.out @@ -0,0 +1,5 @@ +result = -3.999999999999973799 +exact result = -4.000000000000000000 +estimated error = 0.000000000000246025 +actual error = 0.000000000000026201 +intervals = 8 diff --git a/software/gsl-1.15/doc/examples/interp.c b/software/gsl-1.15/doc/examples/interp.c new file mode 100644 index 000000000..5c6e8fcaf --- /dev/null +++ b/software/gsl-1.15/doc/examples/interp.c @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include + +int +main (void) +{ + int i; + double xi, yi, x[10], y[10]; + + printf ("#m=0,S=2\n"); + + for (i = 0; i < 10; i++) + { + x[i] = i + 0.5 * sin (i); + y[i] = i + cos (i * i); + printf ("%g %g\n", x[i], y[i]); + } + + printf ("#m=1,S=0\n"); + + { + gsl_interp_accel *acc + = gsl_interp_accel_alloc (); + gsl_spline *spline + = gsl_spline_alloc (gsl_interp_cspline, 10); + + gsl_spline_init (spline, x, y, 10); + + for (xi = x[0]; xi < x[9]; xi += 0.01) + { + yi = gsl_spline_eval (spline, xi, acc); + printf ("%g %g\n", xi, yi); + } + gsl_spline_free (spline); + gsl_interp_accel_free (acc); + } + return 0; +} diff --git a/software/gsl-1.15/doc/examples/interpp.c b/software/gsl-1.15/doc/examples/interpp.c new file mode 100644 index 000000000..02488a1c8 --- /dev/null +++ b/software/gsl-1.15/doc/examples/interpp.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include +#include + +int +main (void) +{ + int N = 4; + double x[4] = {0.00, 0.10, 0.27, 0.30}; + double y[4] = {0.15, 0.70, -0.10, 0.15}; + /* Note: y[0] == y[3] for periodic data */ + + gsl_interp_accel *acc = gsl_interp_accel_alloc (); + const gsl_interp_type *t = gsl_interp_cspline_periodic; + gsl_spline *spline = gsl_spline_alloc (t, N); + + int i; double xi, yi; + + printf ("#m=0,S=5\n"); + for (i = 0; i < N; i++) + { + printf ("%g %g\n", x[i], y[i]); + } + + printf ("#m=1,S=0\n"); + gsl_spline_init (spline, x, y, N); + + for (i = 0; i <= 100; i++) + { + xi = (1 - i / 100.0) * x[0] + (i / 100.0) * x[N-1]; + yi = gsl_spline_eval (spline, xi, acc); + printf ("%g %g\n", xi, yi); + } + + gsl_spline_free (spline); + gsl_interp_accel_free (acc); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/intro.c b/software/gsl-1.15/doc/examples/intro.c new file mode 100644 index 000000000..bd2848271 --- /dev/null +++ b/software/gsl-1.15/doc/examples/intro.c @@ -0,0 +1,11 @@ +#include +#include + +int +main (void) +{ + double x = 5.0; + double y = gsl_sf_bessel_J0 (x); + printf ("J0(%g) = %.18e\n", x, y); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/intro.out b/software/gsl-1.15/doc/examples/intro.out new file mode 100644 index 000000000..ca264ddfc --- /dev/null +++ b/software/gsl-1.15/doc/examples/intro.out @@ -0,0 +1 @@ +J0(5) = -1.775967713143382920e-01 diff --git a/software/gsl-1.15/doc/examples/linalglu.c b/software/gsl-1.15/doc/examples/linalglu.c new file mode 100644 index 000000000..61b5293ed --- /dev/null +++ b/software/gsl-1.15/doc/examples/linalglu.c @@ -0,0 +1,36 @@ +#include +#include + +int +main (void) +{ + double a_data[] = { 0.18, 0.60, 0.57, 0.96, + 0.41, 0.24, 0.99, 0.58, + 0.14, 0.30, 0.97, 0.66, + 0.51, 0.13, 0.19, 0.85 }; + + double b_data[] = { 1.0, 2.0, 3.0, 4.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (a_data, 4, 4); + + gsl_vector_view b + = gsl_vector_view_array (b_data, 4); + + gsl_vector *x = gsl_vector_alloc (4); + + int s; + + gsl_permutation * p = gsl_permutation_alloc (4); + + gsl_linalg_LU_decomp (&m.matrix, p, &s); + + gsl_linalg_LU_solve (&m.matrix, p, &b.vector, x); + + printf ("x = \n"); + gsl_vector_fprintf (stdout, x, "%g"); + + gsl_permutation_free (p); + gsl_vector_free (x); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/linalglu.out b/software/gsl-1.15/doc/examples/linalglu.out new file mode 100644 index 000000000..406f59aa5 --- /dev/null +++ b/software/gsl-1.15/doc/examples/linalglu.out @@ -0,0 +1,4 @@ +x = -4.05205 +-12.6056 +1.66091 +8.69377 diff --git a/software/gsl-1.15/doc/examples/matrix.c b/software/gsl-1.15/doc/examples/matrix.c new file mode 100644 index 000000000..770468762 --- /dev/null +++ b/software/gsl-1.15/doc/examples/matrix.c @@ -0,0 +1,22 @@ +#include +#include + +int +main (void) +{ + int i, j; + gsl_matrix * m = gsl_matrix_alloc (10, 3); + + for (i = 0; i < 10; i++) + for (j = 0; j < 3; j++) + gsl_matrix_set (m, i, j, 0.23 + 100*i + j); + + for (i = 0; i < 100; i++) /* OUT OF RANGE ERROR */ + for (j = 0; j < 3; j++) + printf ("m(%d,%d) = %g\n", i, j, + gsl_matrix_get (m, i, j)); + + gsl_matrix_free (m); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/matrixw.c b/software/gsl-1.15/doc/examples/matrixw.c new file mode 100644 index 000000000..b05ffbd03 --- /dev/null +++ b/software/gsl-1.15/doc/examples/matrixw.c @@ -0,0 +1,40 @@ +#include +#include + +int +main (void) +{ + int i, j, k = 0; + gsl_matrix * m = gsl_matrix_alloc (100, 100); + gsl_matrix * a = gsl_matrix_alloc (100, 100); + + for (i = 0; i < 100; i++) + for (j = 0; j < 100; j++) + gsl_matrix_set (m, i, j, 0.23 + i + j); + + { + FILE * f = fopen ("test.dat", "wb"); + gsl_matrix_fwrite (f, m); + fclose (f); + } + + { + FILE * f = fopen ("test.dat", "rb"); + gsl_matrix_fread (f, a); + fclose (f); + } + + for (i = 0; i < 100; i++) + for (j = 0; j < 100; j++) + { + double mij = gsl_matrix_get (m, i, j); + double aij = gsl_matrix_get (a, i, j); + if (mij != aij) k++; + } + + gsl_matrix_free (m); + gsl_matrix_free (a); + + printf ("differences = %d (should be zero)\n", k); + return (k > 0); +} diff --git a/software/gsl-1.15/doc/examples/min.c b/software/gsl-1.15/doc/examples/min.c new file mode 100644 index 000000000..45d79a94f --- /dev/null +++ b/software/gsl-1.15/doc/examples/min.c @@ -0,0 +1,65 @@ +#include +#include +#include +#include + +double fn1 (double x, void * params) +{ + return cos(x) + 1.0; +} + +int +main (void) +{ + int status; + int iter = 0, max_iter = 100; + const gsl_min_fminimizer_type *T; + gsl_min_fminimizer *s; + double m = 2.0, m_expected = M_PI; + double a = 0.0, b = 6.0; + gsl_function F; + + F.function = &fn1; + F.params = 0; + + T = gsl_min_fminimizer_brent; + s = gsl_min_fminimizer_alloc (T); + gsl_min_fminimizer_set (s, &F, m, a, b); + + printf ("using %s method\n", + gsl_min_fminimizer_name (s)); + + printf ("%5s [%9s, %9s] %9s %10s %9s\n", + "iter", "lower", "upper", "min", + "err", "err(est)"); + + printf ("%5d [%.7f, %.7f] %.7f %+.7f %.7f\n", + iter, a, b, + m, m - m_expected, b - a); + + do + { + iter++; + status = gsl_min_fminimizer_iterate (s); + + m = gsl_min_fminimizer_x_minimum (s); + a = gsl_min_fminimizer_x_lower (s); + b = gsl_min_fminimizer_x_upper (s); + + status + = gsl_min_test_interval (a, b, 0.001, 0.0); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d [%.7f, %.7f] " + "%.7f %+.7f %.7f\n", + iter, a, b, + m, m - m_expected, b - a); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_min_fminimizer_free (s); + + return status; +} diff --git a/software/gsl-1.15/doc/examples/min.out b/software/gsl-1.15/doc/examples/min.out new file mode 100644 index 000000000..93d02fc93 --- /dev/null +++ b/software/gsl-1.15/doc/examples/min.out @@ -0,0 +1,13 @@ + 0 [0.0000000, 6.0000000] 2.0000000 -1.1415927 6.0000000 + 1 [2.0000000, 6.0000000] 3.2758640 +0.1342713 4.0000000 + 2 [2.0000000, 3.2831929] 3.2758640 +0.1342713 1.2831929 + 3 [2.8689068, 3.2831929] 3.2758640 +0.1342713 0.4142862 + 4 [2.8689068, 3.2831929] 3.2758640 +0.1342713 0.4142862 + 5 [2.8689068, 3.2758640] 3.1460585 +0.0044658 0.4069572 + 6 [3.1346075, 3.2758640] 3.1460585 +0.0044658 0.1412565 + 7 [3.1346075, 3.1874620] 3.1460585 +0.0044658 0.0528545 + 8 [3.1346075, 3.1460585] 3.1460585 +0.0044658 0.0114510 + 9 [3.1346075, 3.1460585] 3.1424060 +0.0008133 0.0114510 + 10 [3.1346075, 3.1424060] 3.1415885 -0.0000041 0.0077985 +Converged: + 11 [3.1415885, 3.1424060] 3.1415927 -0.0000000 0.0008175 diff --git a/software/gsl-1.15/doc/examples/monte.c b/software/gsl-1.15/doc/examples/monte.c new file mode 100644 index 000000000..a2b95fcf9 --- /dev/null +++ b/software/gsl-1.15/doc/examples/monte.c @@ -0,0 +1,106 @@ +#include +#include +#include +#include +#include +#include + +/* Computation of the integral, + + I = int (dx dy dz)/(2pi)^3 1/(1-cos(x)cos(y)cos(z)) + + over (-pi,-pi,-pi) to (+pi, +pi, +pi). The exact answer + is Gamma(1/4)^4/(4 pi^3). This example is taken from + C.Itzykson, J.M.Drouffe, "Statistical Field Theory - + Volume 1", Section 1.1, p21, which cites the original + paper M.L.Glasser, I.J.Zucker, Proc.Natl.Acad.Sci.USA 74 + 1800 (1977) */ + +/* For simplicity we compute the integral over the region + (0,0,0) -> (pi,pi,pi) and multiply by 8 */ + +double exact = 1.3932039296856768591842462603255; + +double +g (double *k, size_t dim, void *params) +{ + double A = 1.0 / (M_PI * M_PI * M_PI); + return A / (1.0 - cos (k[0]) * cos (k[1]) * cos (k[2])); +} + +void +display_results (char *title, double result, double error) +{ + printf ("%s ==================\n", title); + printf ("result = % .6f\n", result); + printf ("sigma = % .6f\n", error); + printf ("exact = % .6f\n", exact); + printf ("error = % .6f = %.2g sigma\n", result - exact, + fabs (result - exact) / error); +} + +int +main (void) +{ + double res, err; + + double xl[3] = { 0, 0, 0 }; + double xu[3] = { M_PI, M_PI, M_PI }; + + const gsl_rng_type *T; + gsl_rng *r; + + gsl_monte_function G = { &g, 3, 0 }; + + size_t calls = 500000; + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + { + gsl_monte_plain_state *s = gsl_monte_plain_alloc (3); + gsl_monte_plain_integrate (&G, xl, xu, 3, calls, r, s, + &res, &err); + gsl_monte_plain_free (s); + + display_results ("plain", res, err); + } + + { + gsl_monte_miser_state *s = gsl_monte_miser_alloc (3); + gsl_monte_miser_integrate (&G, xl, xu, 3, calls, r, s, + &res, &err); + gsl_monte_miser_free (s); + + display_results ("miser", res, err); + } + + { + gsl_monte_vegas_state *s = gsl_monte_vegas_alloc (3); + + gsl_monte_vegas_integrate (&G, xl, xu, 3, 10000, r, s, + &res, &err); + display_results ("vegas warm-up", res, err); + + printf ("converging...\n"); + + do + { + gsl_monte_vegas_integrate (&G, xl, xu, 3, calls/5, r, s, + &res, &err); + printf ("result = % .6f sigma = % .6f " + "chisq/dof = %.1f\n", res, err, gsl_monte_vegas_chisq (s)); + } + while (fabs (gsl_monte_vegas_chisq (s) - 1.0) > 0.5); + + display_results ("vegas final", res, err); + + gsl_monte_vegas_free (s); + } + + gsl_rng_free (r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/multimin.c b/software/gsl-1.15/doc/examples/multimin.c new file mode 100644 index 000000000..4ebe61f84 --- /dev/null +++ b/software/gsl-1.15/doc/examples/multimin.c @@ -0,0 +1,58 @@ +int +main (void) +{ + size_t iter = 0; + int status; + + const gsl_multimin_fdfminimizer_type *T; + gsl_multimin_fdfminimizer *s; + + /* Position of the minimum (1,2), scale factors + 10,20, height 30. */ + double par[5] = { 1.0, 2.0, 10.0, 20.0, 30.0 }; + + gsl_vector *x; + gsl_multimin_function_fdf my_func; + + my_func.n = 2; + my_func.f = my_f; + my_func.df = my_df; + my_func.fdf = my_fdf; + my_func.params = par; + + /* Starting point, x = (5,7) */ + x = gsl_vector_alloc (2); + gsl_vector_set (x, 0, 5.0); + gsl_vector_set (x, 1, 7.0); + + T = gsl_multimin_fdfminimizer_conjugate_fr; + s = gsl_multimin_fdfminimizer_alloc (T, 2); + + gsl_multimin_fdfminimizer_set (s, &my_func, x, 0.01, 1e-4); + + do + { + iter++; + status = gsl_multimin_fdfminimizer_iterate (s); + + if (status) + break; + + status = gsl_multimin_test_gradient (s->gradient, 1e-3); + + if (status == GSL_SUCCESS) + printf ("Minimum found at:\n"); + + printf ("%5d %.5f %.5f %10.5f\n", iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + s->f); + + } + while (status == GSL_CONTINUE && iter < 100); + + gsl_multimin_fdfminimizer_free (s); + gsl_vector_free (x); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/multimin.out b/software/gsl-1.15/doc/examples/multimin.out new file mode 100644 index 000000000..21bab9901 --- /dev/null +++ b/software/gsl-1.15/doc/examples/multimin.out @@ -0,0 +1,15 @@ + x y f + 1 4.99629 6.99072 687.84780 + 2 4.98886 6.97215 683.55456 + 3 4.97400 6.93501 675.01278 + 4 4.94429 6.86073 658.10798 + 5 4.88487 6.71217 625.01340 + 6 4.76602 6.41506 561.68440 + 7 4.52833 5.82083 446.46694 + 8 4.05295 4.63238 261.79422 + 9 3.10219 2.25548 75.49762 + 10 2.85185 1.62963 67.03704 + 11 2.19088 1.76182 45.31640 + 12 0.86892 2.02622 30.18555 +Minimum found at: + 13 1.00000 2.00000 30.00000 diff --git a/software/gsl-1.15/doc/examples/multiminfn.c b/software/gsl-1.15/doc/examples/multiminfn.c new file mode 100644 index 000000000..dd2d388c7 --- /dev/null +++ b/software/gsl-1.15/doc/examples/multiminfn.c @@ -0,0 +1,39 @@ +/* Paraboloid centered on (p[0],p[1]), with + scale factors (p[2],p[3]) and minimum p[4] */ + +double +my_f (const gsl_vector *v, void *params) +{ + double x, y; + double *p = (double *)params; + + x = gsl_vector_get(v, 0); + y = gsl_vector_get(v, 1); + + return p[2] * (x - p[0]) * (x - p[0]) + + p[3] * (y - p[1]) * (y - p[1]) + p[4]; +} + +/* The gradient of f, df = (df/dx, df/dy). */ +void +my_df (const gsl_vector *v, void *params, + gsl_vector *df) +{ + double x, y; + double *p = (double *)params; + + x = gsl_vector_get(v, 0); + y = gsl_vector_get(v, 1); + + gsl_vector_set(df, 0, 2.0 * p[2] * (x - p[0])); + gsl_vector_set(df, 1, 2.0 * p[3] * (y - p[1])); +} + +/* Compute both f and df together. */ +void +my_fdf (const gsl_vector *x, void *params, + double *f, gsl_vector *df) +{ + *f = my_f(x, params); + my_df(x, params, df); +} diff --git a/software/gsl-1.15/doc/examples/multiset.c b/software/gsl-1.15/doc/examples/multiset.c new file mode 100644 index 000000000..6ac1e7c14 --- /dev/null +++ b/software/gsl-1.15/doc/examples/multiset.c @@ -0,0 +1,25 @@ +#include +#include + +int +main (void) +{ + gsl_multiset * c; + size_t i; + + printf ("All multisets of {0,1,2,3} by size:\n") ; + for (i = 0; i <= 4; i++) + { + c = gsl_multiset_calloc (4, i); + do + { + printf ("{"); + gsl_multiset_fprintf (stdout, c, " %u"); + printf (" }\n"); + } + while (gsl_multiset_next (c) == GSL_SUCCESS); + gsl_multiset_free (c); + } + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/multiset.out b/software/gsl-1.15/doc/examples/multiset.out new file mode 100644 index 000000000..b071e1ba7 --- /dev/null +++ b/software/gsl-1.15/doc/examples/multiset.out @@ -0,0 +1,71 @@ +all multisets of {0,1,2,3} by size: +{ } +{ 0 } +{ 1 } +{ 2 } +{ 3 } +{ 0 0 } +{ 0 1 } +{ 0 2 } +{ 0 3 } +{ 1 1 } +{ 1 2 } +{ 1 3 } +{ 2 2 } +{ 2 3 } +{ 3 3 } +{ 0 0 0 } +{ 0 0 1 } +{ 0 0 2 } +{ 0 0 3 } +{ 0 1 1 } +{ 0 1 2 } +{ 0 1 3 } +{ 0 2 2 } +{ 0 2 3 } +{ 0 3 3 } +{ 1 1 1 } +{ 1 1 2 } +{ 1 1 3 } +{ 1 2 2 } +{ 1 2 3 } +{ 1 3 3 } +{ 2 2 2 } +{ 2 2 3 } +{ 2 3 3 } +{ 3 3 3 } +{ 0 0 0 0 } +{ 0 0 0 1 } +{ 0 0 0 2 } +{ 0 0 0 3 } +{ 0 0 1 1 } +{ 0 0 1 2 } +{ 0 0 1 3 } +{ 0 0 2 2 } +{ 0 0 2 3 } +{ 0 0 3 3 } +{ 0 1 1 1 } +{ 0 1 1 2 } +{ 0 1 1 3 } +{ 0 1 2 2 } +{ 0 1 2 3 } +{ 0 1 3 3 } +{ 0 2 2 2 } +{ 0 2 2 3 } +{ 0 2 3 3 } +{ 0 3 3 3 } +{ 1 1 1 1 } +{ 1 1 1 2 } +{ 1 1 1 3 } +{ 1 1 2 2 } +{ 1 1 2 3 } +{ 1 1 3 3 } +{ 1 2 2 2 } +{ 1 2 2 3 } +{ 1 2 3 3 } +{ 1 3 3 3 } +{ 2 2 2 2 } +{ 2 2 2 3 } +{ 2 2 3 3 } +{ 2 3 3 3 } +{ 3 3 3 3 } diff --git a/software/gsl-1.15/doc/examples/nlfit.c b/software/gsl-1.15/doc/examples/nlfit.c new file mode 100644 index 000000000..49b413765 --- /dev/null +++ b/software/gsl-1.15/doc/examples/nlfit.c @@ -0,0 +1,115 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "expfit.c" + +#define N 40 + +void print_state (size_t iter, gsl_multifit_fdfsolver * s); + +int +main (void) +{ + const gsl_multifit_fdfsolver_type *T; + gsl_multifit_fdfsolver *s; + int status; + unsigned int i, iter = 0; + const size_t n = N; + const size_t p = 3; + + gsl_matrix *covar = gsl_matrix_alloc (p, p); + double y[N], sigma[N]; + struct data d = { n, y, sigma}; + gsl_multifit_function_fdf f; + double x_init[3] = { 1.0, 0.0, 0.0 }; + gsl_vector_view x = gsl_vector_view_array (x_init, p); + const gsl_rng_type * type; + gsl_rng * r; + + gsl_rng_env_setup(); + + type = gsl_rng_default; + r = gsl_rng_alloc (type); + + f.f = &expb_f; + f.df = &expb_df; + f.fdf = &expb_fdf; + f.n = n; + f.p = p; + f.params = &d; + + /* This is the data to be fitted */ + + for (i = 0; i < n; i++) + { + double t = i; + y[i] = 1.0 + 5 * exp (-0.1 * t) + + gsl_ran_gaussian (r, 0.1); + sigma[i] = 0.1; + printf ("data: %u %g %g\n", i, y[i], sigma[i]); + }; + + T = gsl_multifit_fdfsolver_lmsder; + s = gsl_multifit_fdfsolver_alloc (T, n, p); + gsl_multifit_fdfsolver_set (s, &f, &x.vector); + + print_state (iter, s); + + do + { + iter++; + status = gsl_multifit_fdfsolver_iterate (s); + + printf ("status = %s\n", gsl_strerror (status)); + + print_state (iter, s); + + if (status) + break; + + status = gsl_multifit_test_delta (s->dx, s->x, + 1e-4, 1e-4); + } + while (status == GSL_CONTINUE && iter < 500); + + gsl_multifit_covar (s->J, 0.0, covar); + +#define FIT(i) gsl_vector_get(s->x, i) +#define ERR(i) sqrt(gsl_matrix_get(covar,i,i)) + + { + double chi = gsl_blas_dnrm2(s->f); + double dof = n - p; + double c = GSL_MAX_DBL(1, chi / sqrt(dof)); + + printf("chisq/dof = %g\n", pow(chi, 2.0) / dof); + + printf ("A = %.5f +/- %.5f\n", FIT(0), c*ERR(0)); + printf ("lambda = %.5f +/- %.5f\n", FIT(1), c*ERR(1)); + printf ("b = %.5f +/- %.5f\n", FIT(2), c*ERR(2)); + } + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multifit_fdfsolver_free (s); + gsl_matrix_free (covar); + gsl_rng_free (r); + return 0; +} + +void +print_state (size_t iter, gsl_multifit_fdfsolver * s) +{ + printf ("iter: %3u x = % 15.8f % 15.8f % 15.8f " + "|f(x)| = %g\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + gsl_vector_get (s->x, 2), + gsl_blas_dnrm2 (s->f)); +} diff --git a/software/gsl-1.15/doc/examples/nmsimplex.c b/software/gsl-1.15/doc/examples/nmsimplex.c new file mode 100644 index 000000000..7be26a0db --- /dev/null +++ b/software/gsl-1.15/doc/examples/nmsimplex.c @@ -0,0 +1,62 @@ +int +main(void) +{ + double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; + + const gsl_multimin_fminimizer_type *T = + gsl_multimin_fminimizer_nmsimplex2; + gsl_multimin_fminimizer *s = NULL; + gsl_vector *ss, *x; + gsl_multimin_function minex_func; + + size_t iter = 0; + int status; + double size; + + /* Starting point */ + x = gsl_vector_alloc (2); + gsl_vector_set (x, 0, 5.0); + gsl_vector_set (x, 1, 7.0); + + /* Set initial step sizes to 1 */ + ss = gsl_vector_alloc (2); + gsl_vector_set_all (ss, 1.0); + + /* Initialize method and iterate */ + minex_func.n = 2; + minex_func.f = my_f; + minex_func.params = par; + + s = gsl_multimin_fminimizer_alloc (T, 2); + gsl_multimin_fminimizer_set (s, &minex_func, x, ss); + + do + { + iter++; + status = gsl_multimin_fminimizer_iterate(s); + + if (status) + break; + + size = gsl_multimin_fminimizer_size (s); + status = gsl_multimin_test_size (size, 1e-2); + + if (status == GSL_SUCCESS) + { + printf ("converged to minimum at\n"); + } + + printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + s->fval, size); + } + while (status == GSL_CONTINUE && iter < 100); + + gsl_vector_free(x); + gsl_vector_free(ss); + gsl_multimin_fminimizer_free (s); + + return status; +} diff --git a/software/gsl-1.15/doc/examples/nmsimplex.out b/software/gsl-1.15/doc/examples/nmsimplex.out new file mode 100644 index 000000000..8cc43246f --- /dev/null +++ b/software/gsl-1.15/doc/examples/nmsimplex.out @@ -0,0 +1,25 @@ + 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.130 + 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 + 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 + 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.409 + 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 + 6 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 + 7 0.000e+00 3.000e+00 f() = 60.000 size = 1.847 + 8 2.094e+00 1.875e+00 f() = 42.275 size = 1.321 + 9 2.578e-01 1.906e+00 f() = 35.684 size = 1.069 + 10 5.879e-01 2.445e+00 f() = 35.664 size = 0.841 + 11 1.258e+00 2.025e+00 f() = 30.680 size = 0.476 + 12 1.258e+00 2.025e+00 f() = 30.680 size = 0.367 + 13 1.093e+00 1.849e+00 f() = 30.539 size = 0.300 + 14 8.830e-01 2.004e+00 f() = 30.137 size = 0.172 + 15 8.830e-01 2.004e+00 f() = 30.137 size = 0.126 + 16 9.582e-01 2.060e+00 f() = 30.090 size = 0.106 + 17 1.022e+00 2.004e+00 f() = 30.005 size = 0.063 + 18 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 + 19 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 + 20 1.022e+00 2.004e+00 f() = 30.005 size = 0.027 + 21 1.022e+00 2.004e+00 f() = 30.005 size = 0.022 + 22 9.920e-01 1.997e+00 f() = 30.001 size = 0.016 + 23 9.920e-01 1.997e+00 f() = 30.001 size = 0.013 +converged to minimum at + 24 9.920e-01 1.997e+00 f() = 30.001 size = 0.008 diff --git a/software/gsl-1.15/doc/examples/ntupler.c b/software/gsl-1.15/doc/examples/ntupler.c new file mode 100644 index 000000000..a92652203 --- /dev/null +++ b/software/gsl-1.15/doc/examples/ntupler.c @@ -0,0 +1,72 @@ +#include +#include +#include + +struct data +{ + double x; + double y; + double z; +}; + +int sel_func (void *ntuple_data, void *params); +double val_func (void *ntuple_data, void *params); + +int +main (void) +{ + struct data ntuple_row; + + gsl_ntuple *ntuple + = gsl_ntuple_open ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + double lower = 1.5; + + gsl_ntuple_select_fn S; + gsl_ntuple_value_fn V; + + gsl_histogram *h = gsl_histogram_alloc (100); + gsl_histogram_set_ranges_uniform(h, 0.0, 10.0); + + S.function = &sel_func; + S.params = &lower; + + V.function = &val_func; + V.params = 0; + + gsl_ntuple_project (h, ntuple, &V, &S); + gsl_histogram_fprintf (stdout, h, "%f", "%f"); + gsl_histogram_free (h); + gsl_ntuple_close (ntuple); + + return 0; +} + +int +sel_func (void *ntuple_data, void *params) +{ + struct data * data = (struct data *) ntuple_data; + double x, y, z, E2, scale; + scale = *(double *) params; + + x = data->x; + y = data->y; + z = data->z; + + E2 = x * x + y * y + z * z; + + return E2 > scale; +} + +double +val_func (void *ntuple_data, void *params) +{ + struct data * data = (struct data *) ntuple_data; + double x, y, z; + + x = data->x; + y = data->y; + z = data->z; + + return x * x + y * y + z * z; +} diff --git a/software/gsl-1.15/doc/examples/ntuplew.c b/software/gsl-1.15/doc/examples/ntuplew.c new file mode 100644 index 000000000..82f6fa483 --- /dev/null +++ b/software/gsl-1.15/doc/examples/ntuplew.c @@ -0,0 +1,43 @@ +#include +#include +#include + +struct data +{ + double x; + double y; + double z; +}; + +int +main (void) +{ + const gsl_rng_type * T; + gsl_rng * r; + + struct data ntuple_row; + int i; + + gsl_ntuple *ntuple + = gsl_ntuple_create ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < 10000; i++) + { + ntuple_row.x = gsl_ran_ugaussian (r); + ntuple_row.y = gsl_ran_ugaussian (r); + ntuple_row.z = gsl_ran_ugaussian (r); + + gsl_ntuple_write (ntuple); + } + + gsl_ntuple_close (ntuple); + gsl_rng_free (r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/ode-initval-low-level.c b/software/gsl-1.15/doc/examples/ode-initval-low-level.c new file mode 100644 index 000000000..bbc1b34de --- /dev/null +++ b/software/gsl-1.15/doc/examples/ode-initval-low-level.c @@ -0,0 +1,38 @@ +int +main (void) +{ + const gsl_odeiv2_step_type * T + = gsl_odeiv2_step_rk8pd; + + gsl_odeiv2_step * s + = gsl_odeiv2_step_alloc (T, 2); + gsl_odeiv2_control * c + = gsl_odeiv2_control_y_new (1e-6, 0.0); + gsl_odeiv2_evolve * e + = gsl_odeiv2_evolve_alloc (2); + + double mu = 10; + gsl_odeiv2_system sys = {func, jac, 2, &mu}; + + double t = 0.0, t1 = 100.0; + double h = 1e-6; + double y[2] = { 1.0, 0.0 }; + + while (t < t1) + { + int status = gsl_odeiv2_evolve_apply (e, c, s, + &sys, + &t, t1, + &h, y); + + if (status != GSL_SUCCESS) + break; + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_evolve_free (e); + gsl_odeiv2_control_free (c); + gsl_odeiv2_step_free (s); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/ode-initval.c b/software/gsl-1.15/doc/examples/ode-initval.c new file mode 100644 index 000000000..5a336515d --- /dev/null +++ b/software/gsl-1.15/doc/examples/ode-initval.c @@ -0,0 +1,62 @@ +#include +#include +#include +#include + +int +func (double t, const double y[], double f[], + void *params) +{ + double mu = *(double *)params; + f[0] = y[1]; + f[1] = -y[0] - mu*y[1]*(y[0]*y[0] - 1); + return GSL_SUCCESS; +} + +int +jac (double t, const double y[], double *dfdy, + double dfdt[], void *params) +{ + double mu = *(double *)params; + gsl_matrix_view dfdy_mat + = gsl_matrix_view_array (dfdy, 2, 2); + gsl_matrix * m = &dfdy_mat.matrix; + gsl_matrix_set (m, 0, 0, 0.0); + gsl_matrix_set (m, 0, 1, 1.0); + gsl_matrix_set (m, 1, 0, -2.0*mu*y[0]*y[1] - 1.0); + gsl_matrix_set (m, 1, 1, -mu*(y[0]*y[0] - 1.0)); + dfdt[0] = 0.0; + dfdt[1] = 0.0; + return GSL_SUCCESS; +} + +int +main (void) +{ + double mu = 10; + gsl_odeiv2_system sys = {func, jac, 2, &mu}; + + gsl_odeiv2_driver * d = + gsl_odeiv2_driver_alloc_y_new (&sys, gsl_odeiv2_step_rk8pd, + 1e-6, 1e-6, 0.0); + int i; + double t = 0.0, t1 = 100.0; + double y[2] = { 1.0, 0.0 }; + + for (i = 1; i <= 100; i++) + { + double ti = i * t1 / 100.0; + int status = gsl_odeiv2_driver_apply (d, &t, ti, y); + + if (status != GSL_SUCCESS) + { + printf ("error, return value=%d\n", status); + break; + } + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_driver_free (d); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/odefixed.c b/software/gsl-1.15/doc/examples/odefixed.c new file mode 100644 index 000000000..f2eda35bf --- /dev/null +++ b/software/gsl-1.15/doc/examples/odefixed.c @@ -0,0 +1,30 @@ +int +main (void) +{ + double mu = 10; + gsl_odeiv2_system sys = { func, jac, 2, &mu }; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_y_new (&sys, gsl_odeiv2_step_rk4, + 1e-3, 1e-8, 1e-8); + + double t = 0.0; + double y[2] = { 1.0, 0.0 }; + int i, s; + + for (i = 0; i < 100; i++) + { + s = gsl_odeiv2_driver_apply_fixed_step (d, &t, 1e-3, 1000, y); + + if (s != GSL_SUCCESS) + { + printf ("error: driver returned %d\n", s); + break; + } + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_driver_free (d); + return s; +} diff --git a/software/gsl-1.15/doc/examples/permseq.c b/software/gsl-1.15/doc/examples/permseq.c new file mode 100644 index 000000000..08ebf63a6 --- /dev/null +++ b/software/gsl-1.15/doc/examples/permseq.c @@ -0,0 +1,21 @@ +#include +#include + +int +main (void) +{ + gsl_permutation * p = gsl_permutation_alloc (3); + + gsl_permutation_init (p); + + do + { + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + } + while (gsl_permutation_next(p) == GSL_SUCCESS); + + gsl_permutation_free (p); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/permshuffle.c b/software/gsl-1.15/doc/examples/permshuffle.c new file mode 100644 index 000000000..72478641d --- /dev/null +++ b/software/gsl-1.15/doc/examples/permshuffle.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include + +int +main (void) +{ + const size_t N = 10; + const gsl_rng_type * T; + gsl_rng * r; + + gsl_permutation * p = gsl_permutation_alloc (N); + gsl_permutation * q = gsl_permutation_alloc (N); + + gsl_rng_env_setup(); + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("initial permutation:"); + gsl_permutation_init (p); + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + + printf (" random permutation:"); + gsl_ran_shuffle (r, p->data, N, sizeof(size_t)); + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + + printf ("inverse permutation:"); + gsl_permutation_inverse (q, p); + gsl_permutation_fprintf (stdout, q, " %u"); + printf ("\n"); + + gsl_permutation_free (p); + gsl_permutation_free (q); + gsl_rng_free (r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/polyroots.c b/software/gsl-1.15/doc/examples/polyroots.c new file mode 100644 index 000000000..6debbd54b --- /dev/null +++ b/software/gsl-1.15/doc/examples/polyroots.c @@ -0,0 +1,26 @@ +#include +#include + +int +main (void) +{ + int i; + /* coefficients of P(x) = -1 + x^5 */ + double a[6] = { -1, 0, 0, 0, 0, 1 }; + double z[10]; + + gsl_poly_complex_workspace * w + = gsl_poly_complex_workspace_alloc (6); + + gsl_poly_complex_solve (a, 6, w, z); + + gsl_poly_complex_workspace_free (w); + + for (i = 0; i < 5; i++) + { + printf ("z%d = %+.18f %+.18f\n", + i, z[2*i], z[2*i+1]); + } + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/polyroots.out b/software/gsl-1.15/doc/examples/polyroots.out new file mode 100644 index 000000000..253fe1145 --- /dev/null +++ b/software/gsl-1.15/doc/examples/polyroots.out @@ -0,0 +1,5 @@ +z0 = -0.809016994374947451 +0.587785252292473137 +z1 = -0.809016994374947451 -0.587785252292473137 +z2 = +0.309016994374947451 +0.951056516295153642 +z3 = +0.309016994374947451 -0.951056516295153642 +z4 = +1.000000000000000000 +0.000000000000000000 diff --git a/software/gsl-1.15/doc/examples/qrng.c b/software/gsl-1.15/doc/examples/qrng.c new file mode 100644 index 000000000..5275209a1 --- /dev/null +++ b/software/gsl-1.15/doc/examples/qrng.c @@ -0,0 +1,19 @@ +#include +#include + +int +main (void) +{ + int i; + gsl_qrng * q = gsl_qrng_alloc (gsl_qrng_sobol, 2); + + for (i = 0; i < 1024; i++) + { + double v[2]; + gsl_qrng_get (q, v); + printf ("%.5f %.5f\n", v[0], v[1]); + } + + gsl_qrng_free (q); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/randpoisson.2.out b/software/gsl-1.15/doc/examples/randpoisson.2.out new file mode 100644 index 000000000..fbe36a2ea --- /dev/null +++ b/software/gsl-1.15/doc/examples/randpoisson.2.out @@ -0,0 +1,2 @@ +GSL_RNG_SEED=123 + 4 5 6 3 3 1 4 2 5 5 diff --git a/software/gsl-1.15/doc/examples/randpoisson.c b/software/gsl-1.15/doc/examples/randpoisson.c new file mode 100644 index 000000000..ef69b72f1 --- /dev/null +++ b/software/gsl-1.15/doc/examples/randpoisson.c @@ -0,0 +1,35 @@ +#include +#include +#include + +int +main (void) +{ + const gsl_rng_type * T; + gsl_rng * r; + + int i, n = 10; + double mu = 3.0; + + /* create a generator chosen by the + environment variable GSL_RNG_TYPE */ + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + /* print n random variates chosen from + the poisson distribution with mean + parameter mu */ + + for (i = 0; i < n; i++) + { + unsigned int k = gsl_ran_poisson (r, mu); + printf (" %u", k); + } + + printf ("\n"); + gsl_rng_free (r); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/randpoisson.out b/software/gsl-1.15/doc/examples/randpoisson.out new file mode 100644 index 000000000..1639cca42 --- /dev/null +++ b/software/gsl-1.15/doc/examples/randpoisson.out @@ -0,0 +1 @@ + 2 5 5 2 1 0 3 4 1 1 diff --git a/software/gsl-1.15/doc/examples/randwalk.c b/software/gsl-1.15/doc/examples/randwalk.c new file mode 100644 index 000000000..588aa5026 --- /dev/null +++ b/software/gsl-1.15/doc/examples/randwalk.c @@ -0,0 +1,29 @@ +#include +#include +#include + +int +main (void) +{ + int i; + double x = 0, y = 0, dx, dy; + + const gsl_rng_type * T; + gsl_rng * r; + + gsl_rng_env_setup(); + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("%g %g\n", x, y); + + for (i = 0; i < 10; i++) + { + gsl_ran_dir_2d (r, &dx, &dy); + x += dx; y += dy; + printf ("%g %g\n", x, y); + } + + gsl_rng_free (r); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/rng.c b/software/gsl-1.15/doc/examples/rng.c new file mode 100644 index 000000000..633026414 --- /dev/null +++ b/software/gsl-1.15/doc/examples/rng.c @@ -0,0 +1,22 @@ +#include +#include + +gsl_rng * r; /* global generator */ + +int +main (void) +{ + const gsl_rng_type * T; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("generator type: %s\n", gsl_rng_name (r)); + printf ("seed = %lu\n", gsl_rng_default_seed); + printf ("first value = %lu\n", gsl_rng_get (r)); + + gsl_rng_free (r); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/rng.out b/software/gsl-1.15/doc/examples/rng.out new file mode 100644 index 000000000..00f33a335 --- /dev/null +++ b/software/gsl-1.15/doc/examples/rng.out @@ -0,0 +1,3 @@ +generator type: mt19937 +seed = 0 +first value = 4293858116 diff --git a/software/gsl-1.15/doc/examples/rngunif.2.out b/software/gsl-1.15/doc/examples/rngunif.2.out new file mode 100644 index 000000000..d04fccd22 --- /dev/null +++ b/software/gsl-1.15/doc/examples/rngunif.2.out @@ -0,0 +1,12 @@ +GSL_RNG_TYPE=mrg +GSL_RNG_SEED=123 +0.33050 +0.86631 +0.32982 +0.67620 +0.53391 +0.06457 +0.16847 +0.70229 +0.04371 +0.86374 diff --git a/software/gsl-1.15/doc/examples/rngunif.c b/software/gsl-1.15/doc/examples/rngunif.c new file mode 100644 index 000000000..ca4b2db2d --- /dev/null +++ b/software/gsl-1.15/doc/examples/rngunif.c @@ -0,0 +1,26 @@ +#include +#include + +int +main (void) +{ + const gsl_rng_type * T; + gsl_rng * r; + + int i, n = 10; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < n; i++) + { + double u = gsl_rng_uniform (r); + printf ("%.5f\n", u); + } + + gsl_rng_free (r); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/rngunif.out b/software/gsl-1.15/doc/examples/rngunif.out new file mode 100644 index 000000000..b4049efd2 --- /dev/null +++ b/software/gsl-1.15/doc/examples/rngunif.out @@ -0,0 +1,10 @@ +0.99974 +0.16291 +0.28262 +0.94720 +0.23166 +0.48497 +0.95748 +0.74431 +0.54004 +0.73995 diff --git a/software/gsl-1.15/doc/examples/rootnewt.c b/software/gsl-1.15/doc/examples/rootnewt.c new file mode 100644 index 000000000..fea5f1101 --- /dev/null +++ b/software/gsl-1.15/doc/examples/rootnewt.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include + +#include "demo_fn.h" +#include "demo_fn.c" + +int +main (void) +{ + int status; + int iter = 0, max_iter = 100; + const gsl_root_fdfsolver_type *T; + gsl_root_fdfsolver *s; + double x0, x = 5.0, r_expected = sqrt (5.0); + gsl_function_fdf FDF; + struct quadratic_params params = {1.0, 0.0, -5.0}; + + FDF.f = &quadratic; + FDF.df = &quadratic_deriv; + FDF.fdf = &quadratic_fdf; + FDF.params = ¶ms; + + T = gsl_root_fdfsolver_newton; + s = gsl_root_fdfsolver_alloc (T); + gsl_root_fdfsolver_set (s, &FDF, x); + + printf ("using %s method\n", + gsl_root_fdfsolver_name (s)); + + printf ("%-5s %10s %10s %10s\n", + "iter", "root", "err", "err(est)"); + do + { + iter++; + status = gsl_root_fdfsolver_iterate (s); + x0 = x; + x = gsl_root_fdfsolver_root (s); + status = gsl_root_test_delta (x, x0, 0, 1e-3); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d %10.7f %+10.7f %10.7f\n", + iter, x, x - r_expected, x - x0); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_root_fdfsolver_free (s); + return status; +} diff --git a/software/gsl-1.15/doc/examples/roots.c b/software/gsl-1.15/doc/examples/roots.c new file mode 100644 index 000000000..7854fbc8e --- /dev/null +++ b/software/gsl-1.15/doc/examples/roots.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include + +#include "demo_fn.h" +#include "demo_fn.c" + +int +main (void) +{ + int status; + int iter = 0, max_iter = 100; + const gsl_root_fsolver_type *T; + gsl_root_fsolver *s; + double r = 0, r_expected = sqrt (5.0); + double x_lo = 0.0, x_hi = 5.0; + gsl_function F; + struct quadratic_params params = {1.0, 0.0, -5.0}; + + F.function = &quadratic; + F.params = ¶ms; + + T = gsl_root_fsolver_brent; + s = gsl_root_fsolver_alloc (T); + gsl_root_fsolver_set (s, &F, x_lo, x_hi); + + printf ("using %s method\n", + gsl_root_fsolver_name (s)); + + printf ("%5s [%9s, %9s] %9s %10s %9s\n", + "iter", "lower", "upper", "root", + "err", "err(est)"); + + do + { + iter++; + status = gsl_root_fsolver_iterate (s); + r = gsl_root_fsolver_root (s); + x_lo = gsl_root_fsolver_x_lower (s); + x_hi = gsl_root_fsolver_x_upper (s); + status = gsl_root_test_interval (x_lo, x_hi, + 0, 0.001); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d [%.7f, %.7f] %.7f %+.7f %.7f\n", + iter, x_lo, x_hi, + r, r - r_expected, + x_hi - x_lo); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_root_fsolver_free (s); + + return status; +} diff --git a/software/gsl-1.15/doc/examples/siman.c b/software/gsl-1.15/doc/examples/siman.c new file mode 100644 index 000000000..50f08e06e --- /dev/null +++ b/software/gsl-1.15/doc/examples/siman.c @@ -0,0 +1,82 @@ +#include +#include +#include +#include + +/* set up parameters for this simulated annealing run */ + +/* how many points do we try before stepping */ +#define N_TRIES 200 + +/* how many iterations for each T? */ +#define ITERS_FIXED_T 1000 + +/* max step size in random walk */ +#define STEP_SIZE 1.0 + +/* Boltzmann constant */ +#define K 1.0 + +/* initial temperature */ +#define T_INITIAL 0.008 + +/* damping factor for temperature */ +#define MU_T 1.003 +#define T_MIN 2.0e-6 + +gsl_siman_params_t params + = {N_TRIES, ITERS_FIXED_T, STEP_SIZE, + K, T_INITIAL, MU_T, T_MIN}; + +/* now some functions to test in one dimension */ +double E1(void *xp) +{ + double x = * ((double *) xp); + + return exp(-pow((x-1.0),2.0))*sin(8*x); +} + +double M1(void *xp, void *yp) +{ + double x = *((double *) xp); + double y = *((double *) yp); + + return fabs(x - y); +} + +void S1(const gsl_rng * r, void *xp, double step_size) +{ + double old_x = *((double *) xp); + double new_x; + + double u = gsl_rng_uniform(r); + new_x = u * 2 * step_size - step_size + old_x; + + memcpy(xp, &new_x, sizeof(new_x)); +} + +void P1(void *xp) +{ + printf ("%12g", *((double *) xp)); +} + +int +main(int argc, char *argv[]) +{ + const gsl_rng_type * T; + gsl_rng * r; + + double x_initial = 15.5; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc(T); + + gsl_siman_solve(r, &x_initial, E1, S1, M1, P1, + NULL, NULL, NULL, + sizeof(double), params); + + gsl_rng_free (r); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/sortsmall.c b/software/gsl-1.15/doc/examples/sortsmall.c new file mode 100644 index 000000000..5b725176c --- /dev/null +++ b/software/gsl-1.15/doc/examples/sortsmall.c @@ -0,0 +1,38 @@ +#include +#include + +int +main (void) +{ + const gsl_rng_type * T; + gsl_rng * r; + + size_t i, k = 5, N = 100000; + + double * x = malloc (N * sizeof(double)); + double * small = malloc (k * sizeof(double)); + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < N; i++) + { + x[i] = gsl_rng_uniform(r); + } + + gsl_sort_smallest (small, k, x, 1, N); + + printf ("%d smallest values from %d\n", k, N); + + for (i = 0; i < k; i++) + { + printf ("%d: %.18f\n", i, small[i]); + } + + free (x); + free (small); + gsl_rng_free (r); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/sortsmall.out b/software/gsl-1.15/doc/examples/sortsmall.out new file mode 100644 index 000000000..b8c7c936c --- /dev/null +++ b/software/gsl-1.15/doc/examples/sortsmall.out @@ -0,0 +1,6 @@ +5 smallest values from 100000 +0: 0.000003489200025797 +1: 0.000008199829608202 +2: 0.000008953968062997 +3: 0.000010712770745158 +4: 0.000033531803637743 diff --git a/software/gsl-1.15/doc/examples/specfun.c b/software/gsl-1.15/doc/examples/specfun.c new file mode 100644 index 000000000..7c1a9b019 --- /dev/null +++ b/software/gsl-1.15/doc/examples/specfun.c @@ -0,0 +1,15 @@ +#include +#include + +int +main (void) +{ + double x = 5.0; + double expected = -0.17759677131433830434739701; + + double y = gsl_sf_bessel_J0 (x); + + printf ("J0(5.0) = %.18f\n", y); + printf ("exact = %.18f\n", expected); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/specfun.out b/software/gsl-1.15/doc/examples/specfun.out new file mode 100644 index 000000000..dbe2443a0 --- /dev/null +++ b/software/gsl-1.15/doc/examples/specfun.out @@ -0,0 +1,2 @@ +J0(5.0) = -0.177596771314338292 +exact = -0.177596771314338292 diff --git a/software/gsl-1.15/doc/examples/specfun_e.c b/software/gsl-1.15/doc/examples/specfun_e.c new file mode 100644 index 000000000..4f41f2a0c --- /dev/null +++ b/software/gsl-1.15/doc/examples/specfun_e.c @@ -0,0 +1,21 @@ +#include +#include +#include + +int +main (void) +{ + double x = 5.0; + gsl_sf_result result; + + double expected = -0.17759677131433830434739701; + + int status = gsl_sf_bessel_J0_e (x, &result); + + printf ("status = %s\n", gsl_strerror(status)); + printf ("J0(5.0) = %.18f\n" + " +/- % .18f\n", + result.val, result.err); + printf ("exact = %.18f\n", expected); + return status; +} diff --git a/software/gsl-1.15/doc/examples/specfun_e.out b/software/gsl-1.15/doc/examples/specfun_e.out new file mode 100644 index 000000000..61e131459 --- /dev/null +++ b/software/gsl-1.15/doc/examples/specfun_e.out @@ -0,0 +1,4 @@ +status = success +J0(5.0) = -0.177596771314338292 + +/- 0.000000000000000193 +exact = -0.177596771314338292 diff --git a/software/gsl-1.15/doc/examples/stat.c b/software/gsl-1.15/doc/examples/stat.c new file mode 100644 index 000000000..253f70444 --- /dev/null +++ b/software/gsl-1.15/doc/examples/stat.c @@ -0,0 +1,23 @@ +#include +#include + +int +main(void) +{ + double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6}; + double mean, variance, largest, smallest; + + mean = gsl_stats_mean(data, 1, 5); + variance = gsl_stats_variance(data, 1, 5); + largest = gsl_stats_max(data, 1, 5); + smallest = gsl_stats_min(data, 1, 5); + + printf ("The dataset is %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + printf ("The sample mean is %g\n", mean); + printf ("The estimated variance is %g\n", variance); + printf ("The largest value is %g\n", largest); + printf ("The smallest value is %g\n", smallest); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/stat.out b/software/gsl-1.15/doc/examples/stat.out new file mode 100644 index 000000000..a1d53bc35 --- /dev/null +++ b/software/gsl-1.15/doc/examples/stat.out @@ -0,0 +1,5 @@ +The dataset is 17.2, 18.1, 16.5, 18.3, 12.6 +The sample mean is 16.54 +The estimated variance is 5.373 +The largest value is 18.3 +The smallest value is 12.6 diff --git a/software/gsl-1.15/doc/examples/statsort.c b/software/gsl-1.15/doc/examples/statsort.c new file mode 100644 index 000000000..2780f673d --- /dev/null +++ b/software/gsl-1.15/doc/examples/statsort.c @@ -0,0 +1,36 @@ +#include +#include +#include + +int +main(void) +{ + double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6}; + double median, upperq, lowerq; + + printf ("Original dataset: %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + gsl_sort (data, 1, 5); + + printf ("Sorted dataset: %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + median + = gsl_stats_median_from_sorted_data (data, + 1, 5); + + upperq + = gsl_stats_quantile_from_sorted_data (data, + 1, 5, + 0.75); + lowerq + = gsl_stats_quantile_from_sorted_data (data, + 1, 5, + 0.25); + + printf ("The median is %g\n", median); + printf ("The upper quartile is %g\n", upperq); + printf ("The lower quartile is %g\n", lowerq); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/statsort.out b/software/gsl-1.15/doc/examples/statsort.out new file mode 100644 index 000000000..628522c16 --- /dev/null +++ b/software/gsl-1.15/doc/examples/statsort.out @@ -0,0 +1,5 @@ +Original dataset: 17.2, 18.1, 16.5, 18.3, 12.6 +Sorted dataset: 12.6, 16.5, 17.2, 18.1, 18.3 +The median is 17.2 +The upper quartile is 18.1 +The lower quartile is 16.5 diff --git a/software/gsl-1.15/doc/examples/sum.c b/software/gsl-1.15/doc/examples/sum.c new file mode 100644 index 000000000..c0237ea9c --- /dev/null +++ b/software/gsl-1.15/doc/examples/sum.c @@ -0,0 +1,47 @@ +#include +#include +#include + +#define N 20 + +int +main (void) +{ + double t[N]; + double sum_accel, err; + double sum = 0; + int n; + + gsl_sum_levin_u_workspace * w + = gsl_sum_levin_u_alloc (N); + + const double zeta_2 = M_PI * M_PI / 6.0; + + /* terms for zeta(2) = \sum_{n=1}^{\infty} 1/n^2 */ + + for (n = 0; n < N; n++) + { + double np1 = n + 1.0; + t[n] = 1.0 / (np1 * np1); + sum += t[n]; + } + + gsl_sum_levin_u_accel (t, N, w, &sum_accel, &err); + + printf ("term-by-term sum = % .16f using %d terms\n", + sum, N); + + printf ("term-by-term sum = % .16f using %d terms\n", + w->sum_plain, w->terms_used); + + printf ("exact value = % .16f\n", zeta_2); + printf ("accelerated sum = % .16f using %d terms\n", + sum_accel, w->terms_used); + + printf ("estimated error = % .16f\n", err); + printf ("actual error = % .16f\n", + sum_accel - zeta_2); + + gsl_sum_levin_u_free (w); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/sum.out b/software/gsl-1.15/doc/examples/sum.out new file mode 100644 index 000000000..28089e975 --- /dev/null +++ b/software/gsl-1.15/doc/examples/sum.out @@ -0,0 +1,6 @@ +term-by-term sum = 1.5961632439130233 using 20 terms +term-by-term sum = 1.5759958390005426 using 13 terms +exact value = 1.6449340668482264 +accelerated sum = 1.6449340668166479 using 13 terms +estimated error = 0.0000000000508580 +actual error = -0.0000000000315785 diff --git a/software/gsl-1.15/doc/examples/vector.c b/software/gsl-1.15/doc/examples/vector.c new file mode 100644 index 000000000..27462b00c --- /dev/null +++ b/software/gsl-1.15/doc/examples/vector.c @@ -0,0 +1,22 @@ +#include +#include + +int +main (void) +{ + int i; + gsl_vector * v = gsl_vector_alloc (3); + + for (i = 0; i < 3; i++) + { + gsl_vector_set (v, i, 1.23 + i); + } + + for (i = 0; i < 100; i++) /* OUT OF RANGE ERROR */ + { + printf ("v_%d = %g\n", i, gsl_vector_get (v, i)); + } + + gsl_vector_free (v); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/vectorr.c b/software/gsl-1.15/doc/examples/vectorr.c new file mode 100644 index 000000000..203986b27 --- /dev/null +++ b/software/gsl-1.15/doc/examples/vectorr.c @@ -0,0 +1,23 @@ +#include +#include + +int +main (void) +{ + int i; + gsl_vector * v = gsl_vector_alloc (10); + + { + FILE * f = fopen ("test.dat", "r"); + gsl_vector_fscanf (f, v); + fclose (f); + } + + for (i = 0; i < 10; i++) + { + printf ("%g\n", gsl_vector_get(v, i)); + } + + gsl_vector_free (v); + return 0; +} diff --git a/software/gsl-1.15/doc/examples/vectorview.c b/software/gsl-1.15/doc/examples/vectorview.c new file mode 100644 index 000000000..9225c2894 --- /dev/null +++ b/software/gsl-1.15/doc/examples/vectorview.c @@ -0,0 +1,30 @@ +#include +#include +#include +#include + +int +main (void) +{ + size_t i,j; + + gsl_matrix *m = gsl_matrix_alloc (10, 10); + + for (i = 0; i < 10; i++) + for (j = 0; j < 10; j++) + gsl_matrix_set (m, i, j, sin (i) + cos (j)); + + for (j = 0; j < 10; j++) + { + gsl_vector_view column = gsl_matrix_column (m, j); + double d; + + d = gsl_blas_dnrm2 (&column.vector); + + printf ("matrix column %d, norm = %g\n", j, d); + } + + gsl_matrix_free (m); + + return 0; +} diff --git a/software/gsl-1.15/doc/examples/vectorview.out b/software/gsl-1.15/doc/examples/vectorview.out new file mode 100644 index 000000000..0138c2457 --- /dev/null +++ b/software/gsl-1.15/doc/examples/vectorview.out @@ -0,0 +1,10 @@ +matrix column 0, norm = 4.31461 +matrix column 1, norm = 3.1205 +matrix column 2, norm = 2.19316 +matrix column 3, norm = 3.26114 +matrix column 4, norm = 2.53416 +matrix column 5, norm = 2.57281 +matrix column 6, norm = 4.20469 +matrix column 7, norm = 3.65202 +matrix column 8, norm = 2.08524 +matrix column 9, norm = 3.07313 diff --git a/software/gsl-1.15/doc/examples/vectorw.c b/software/gsl-1.15/doc/examples/vectorw.c new file mode 100644 index 000000000..f25468b89 --- /dev/null +++ b/software/gsl-1.15/doc/examples/vectorw.c @@ -0,0 +1,23 @@ +#include +#include + +int +main (void) +{ + int i; + gsl_vector * v = gsl_vector_alloc (100); + + for (i = 0; i < 100; i++) + { + gsl_vector_set (v, i, 1.23 + i); + } + + { + FILE * f = fopen ("test.dat", "w"); + gsl_vector_fprintf (f, v, "%.5g"); + fclose (f); + } + + gsl_vector_free (v); + return 0; +} diff --git a/software/gsl-1.15/doc/fdl.texi b/software/gsl-1.15/doc/fdl.texi new file mode 100644 index 000000000..14050a6bb --- /dev/null +++ b/software/gsl-1.15/doc/fdl.texi @@ -0,0 +1,513 @@ +@c The GNU Free Documentation License. +@center Version 1.3, 3 November 2008 +@iftex +@smallerfonts @rm +@end iftex + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. + +@display +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{http://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is +not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{http://www.gnu.org/copyleft/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + +@end enumerate + +@page +@heading ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free + Documentation License, Version 1.3 or any later version + published by the Free Software Foundation; with no + Invariant Sections, no Front-Cover Texts, and no + Back-Cover Texts. A copy of the license is included in + the section entitled ``GNU Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with@dots{}Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their + titles}, with the Front-Cover Texts being @var{list}, and + with the Back-Cover Texts being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@iftex +@textfonts @rm +@end iftex +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + diff --git a/software/gsl-1.15/doc/fft-complex-radix2-f.eps b/software/gsl-1.15/doc/fft-complex-radix2-f.eps new file mode 100644 index 000000000..7ce33678e --- /dev/null +++ b/software/gsl-1.15/doc/fft-complex-radix2-f.eps @@ -0,0 +1,298 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Creator: gnuplot +%%DocumentFonts: Helvetica +%%BoundingBox: 50 50 410 302 +%%EndComments +/gnudict 40 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/vshift -46 def +/dl {10 mul} def +/hpt 31.5 def +/vpt 31.5 def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/PL { stroke gnulinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 0 1 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def +/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/P { stroke [] 0 setdash + currentlinewidth 2 div sub M + 0 currentlinewidth V stroke } def +/D { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + P } def +/A { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/B { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + P } def +/C { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/T { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + P } def +/S { 2 copy A C} def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +/Helvetica findfont 140 scalefont setfont +newpath +LTa +672 1163 M +6297 0 V +672 211 M +0 4758 V +LTb +672 211 M +63 0 V +6234 0 R +-63 0 V +588 211 M +(-0.5) Rshow +672 1163 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0) Rshow +672 2114 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.5) Rshow +672 3066 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1) Rshow +672 4017 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1.5) Rshow +672 4969 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(2) Rshow +672 211 M +0 63 V +0 4695 R +0 -63 V +672 71 M +(0) Cshow +1664 211 M +0 63 V +0 4695 R +0 -63 V +1664 71 M +(20) Cshow +2655 211 M +0 63 V +0 4695 R +0 -63 V +2655 71 M +(40) Cshow +3647 211 M +0 63 V +0 4695 R +0 -63 V +3647 71 M +(60) Cshow +4639 211 M +0 63 V +0 4695 R +0 -63 V +4639 71 M +(80) Cshow +5630 211 M +0 63 V +0 4695 R +0 -63 V +5630 71 M +(100) Cshow +6622 211 M +0 63 V +0 4695 R +0 -63 V +6622 71 M +(120) Cshow +672 211 M +6297 0 V +0 4758 V +-6297 0 V +672 211 L +LT0 +672 4695 D +722 4541 D +771 4103 D +821 3449 D +870 2676 D +920 1898 D +969 1219 D +1019 720 D +1069 446 D +1118 397 D +1168 537 D +1217 799 D +1267 1106 D +1317 1380 D +1366 1564 D +1416 1627 D +1465 1569 D +1515 1418 D +1564 1220 D +1614 1028 D +1664 887 D +1713 826 D +1763 855 D +1812 957 D +1862 1104 D +1912 1254 D +1961 1372 D +2011 1429 D +2060 1416 D +2110 1340 D +2159 1223 D +2209 1098 D +2259 994 D +2308 939 D +2358 942 D +2407 1002 D +2457 1099 D +2507 1209 D +2556 1303 D +2606 1358 D +2655 1361 D +2705 1313 D +2754 1229 D +2804 1130 D +2854 1042 D +2903 987 D +2953 979 D +3002 1018 D +3052 1093 D +3102 1185 D +3151 1269 D +3201 1325 D +3250 1338 D +3300 1305 D +3349 1237 D +3399 1150 D +3449 1067 D +3498 1010 D +3548 993 D +3597 1019 D +3647 1083 D +3697 1167 D +3746 1249 D +3796 1309 D +3845 1331 D +3895 1309 D +3944 1249 D +3994 1167 D +4044 1083 D +4093 1019 D +4143 993 D +4192 1010 D +4242 1067 D +4292 1150 D +4341 1237 D +4391 1305 D +4440 1338 D +4490 1325 D +4539 1269 D +4589 1185 D +4639 1093 D +4688 1018 D +4738 979 D +4787 987 D +4837 1042 D +4887 1130 D +4936 1229 D +4986 1313 D +5035 1361 D +5085 1358 D +5134 1303 D +5184 1209 D +5234 1099 D +5283 1002 D +5333 942 D +5382 939 D +5432 994 D +5482 1098 D +5531 1223 D +5581 1340 D +5630 1416 D +5680 1429 D +5729 1372 D +5779 1254 D +5829 1104 D +5878 957 D +5928 855 D +5977 826 D +6027 887 D +6077 1028 D +6126 1220 D +6176 1418 D +6225 1569 D +6275 1627 D +6324 1564 D +6374 1380 D +6424 1106 D +6473 799 D +6523 537 D +6572 397 D +6622 446 D +6672 720 D +6721 1219 D +6771 1898 D +6820 2676 D +6870 3449 D +6919 4103 D +6969 4541 D +stroke +grestore +end +showpage +%%Trailer diff --git a/software/gsl-1.15/doc/fft-complex-radix2-t.eps b/software/gsl-1.15/doc/fft-complex-radix2-t.eps new file mode 100644 index 000000000..775fe8c18 --- /dev/null +++ b/software/gsl-1.15/doc/fft-complex-radix2-t.eps @@ -0,0 +1,426 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Creator: gnuplot +%%DocumentFonts: Helvetica +%%BoundingBox: 50 50 410 302 +%%EndComments +/gnudict 40 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/vshift -46 def +/dl {10 mul} def +/hpt 31.5 def +/vpt 31.5 def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/PL { stroke gnulinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 0 1 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def +/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/P { stroke [] 0 setdash + currentlinewidth 2 div sub M + 0 currentlinewidth V stroke } def +/D { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + P } def +/A { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/B { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + P } def +/C { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/T { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + P } def +/S { 2 copy A C} def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +/Helvetica findfont 140 scalefont setfont +newpath +LTa +672 1163 M +6297 0 V +672 211 M +0 4758 V +LTb +672 211 M +63 0 V +6234 0 R +-63 0 V +588 211 M +(-0.5) Rshow +672 1163 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0) Rshow +672 2114 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.5) Rshow +672 3066 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1) Rshow +672 4017 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1.5) Rshow +672 4969 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(2) Rshow +672 211 M +0 63 V +0 4695 R +0 -63 V +672 71 M +(0) Cshow +1664 211 M +0 63 V +0 4695 R +0 -63 V +1664 71 M +(20) Cshow +2655 211 M +0 63 V +0 4695 R +0 -63 V +2655 71 M +(40) Cshow +3647 211 M +0 63 V +0 4695 R +0 -63 V +3647 71 M +(60) Cshow +4639 211 M +0 63 V +0 4695 R +0 -63 V +4639 71 M +(80) Cshow +5630 211 M +0 63 V +0 4695 R +0 -63 V +5630 71 M +(100) Cshow +6622 211 M +0 63 V +0 4695 R +0 -63 V +6622 71 M +(120) Cshow +672 211 M +6297 0 V +0 4758 V +-6297 0 V +672 211 L +LT0 +672 3066 M +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 -1903 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +50 0 V +49 0 V +50 1903 V +49 0 V +50 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +49 0 V +50 0 V +672 3066 D +722 3066 D +771 3066 D +821 3066 D +870 3066 D +920 3066 D +969 3066 D +1019 3066 D +1069 3066 D +1118 3066 D +1168 3066 D +1217 1163 D +1267 1163 D +1317 1163 D +1366 1163 D +1416 1163 D +1465 1163 D +1515 1163 D +1564 1163 D +1614 1163 D +1664 1163 D +1713 1163 D +1763 1163 D +1812 1163 D +1862 1163 D +1912 1163 D +1961 1163 D +2011 1163 D +2060 1163 D +2110 1163 D +2159 1163 D +2209 1163 D +2259 1163 D +2308 1163 D +2358 1163 D +2407 1163 D +2457 1163 D +2507 1163 D +2556 1163 D +2606 1163 D +2655 1163 D +2705 1163 D +2754 1163 D +2804 1163 D +2854 1163 D +2903 1163 D +2953 1163 D +3002 1163 D +3052 1163 D +3102 1163 D +3151 1163 D +3201 1163 D +3250 1163 D +3300 1163 D +3349 1163 D +3399 1163 D +3449 1163 D +3498 1163 D +3548 1163 D +3597 1163 D +3647 1163 D +3697 1163 D +3746 1163 D +3796 1163 D +3845 1163 D +3895 1163 D +3944 1163 D +3994 1163 D +4044 1163 D +4093 1163 D +4143 1163 D +4192 1163 D +4242 1163 D +4292 1163 D +4341 1163 D +4391 1163 D +4440 1163 D +4490 1163 D +4539 1163 D +4589 1163 D +4639 1163 D +4688 1163 D +4738 1163 D +4787 1163 D +4837 1163 D +4887 1163 D +4936 1163 D +4986 1163 D +5035 1163 D +5085 1163 D +5134 1163 D +5184 1163 D +5234 1163 D +5283 1163 D +5333 1163 D +5382 1163 D +5432 1163 D +5482 1163 D +5531 1163 D +5581 1163 D +5630 1163 D +5680 1163 D +5729 1163 D +5779 1163 D +5829 1163 D +5878 1163 D +5928 1163 D +5977 1163 D +6027 1163 D +6077 1163 D +6126 1163 D +6176 1163 D +6225 1163 D +6275 1163 D +6324 1163 D +6374 1163 D +6424 1163 D +6473 1163 D +6523 3066 D +6572 3066 D +6622 3066 D +6672 3066 D +6721 3066 D +6771 3066 D +6820 3066 D +6870 3066 D +6919 3066 D +6969 3066 D +stroke +grestore +end +showpage +%%Trailer diff --git a/software/gsl-1.15/doc/fft-complex-radix2.eps b/software/gsl-1.15/doc/fft-complex-radix2.eps new file mode 100644 index 000000000..b653132ec --- /dev/null +++ b/software/gsl-1.15/doc/fft-complex-radix2.eps @@ -0,0 +1,682 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Creator: gnuplot +%%DocumentFonts: Helvetica +%%BoundingBox: 50 50 410 302 +%%EndComments +/gnudict 40 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/vshift -46 def +/dl {10 mul} def +/hpt 31.5 def +/vpt 31.5 def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/PL { stroke gnulinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 0 1 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def +/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/P { stroke [] 0 setdash + currentlinewidth 2 div sub M + 0 currentlinewidth V stroke } def +/D { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + P } def +/A { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/B { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + P } def +/C { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/T { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + P } def +/S { 2 copy A C} def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +/Helvetica findfont 140 scalefont setfont +newpath +LTa +672 1163 M +6297 0 V +672 211 M +0 4758 V +LTb +672 211 M +63 0 V +6234 0 R +-63 0 V +588 211 M +(-0.5) Rshow +672 1163 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0) Rshow +672 2114 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.5) Rshow +672 3066 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1) Rshow +672 4017 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1.5) Rshow +672 4969 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(2) Rshow +672 211 M +0 63 V +0 4695 R +0 -63 V +672 71 M +(0) Cshow +1656 211 M +0 63 V +0 4695 R +0 -63 V +1656 71 M +(20) Cshow +2640 211 M +0 63 V +0 4695 R +0 -63 V +2640 71 M +(40) Cshow +3624 211 M +0 63 V +0 4695 R +0 -63 V +3624 71 M +(60) Cshow +4608 211 M +0 63 V +0 4695 R +0 -63 V +4608 71 M +(80) Cshow +5592 211 M +0 63 V +0 4695 R +0 -63 V +5592 71 M +(100) Cshow +6575 211 M +0 63 V +0 4695 R +0 -63 V +6575 71 M +(120) Cshow +672 211 M +6297 0 V +0 4758 V +-6297 0 V +672 211 L +LT0 +672 3066 M +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 -1903 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +49 1903 V +49 0 V +49 0 V +50 0 V +49 0 V +49 0 V +49 0 V +49 0 V +50 0 V +49 0 V +672 4695 M +49 -154 V +49 -438 V +50 -654 V +49 -773 V +49 -778 V +49 -679 V +49 -499 V +50 -274 V +49 -49 V +49 140 V +49 262 V +49 307 V +50 274 V +49 184 V +49 63 V +49 -58 V +49 -151 V +50 -198 V +49 -192 V +49 -141 V +49 -61 V +49 29 V +49 102 V +50 147 V +49 150 V +49 118 V +49 57 V +49 -13 V +50 -76 V +49 -117 V +49 -125 V +49 -104 V +49 -55 V +50 3 V +49 60 V +49 97 V +49 110 V +49 94 V +50 55 V +49 3 V +49 -48 V +49 -84 V +49 -99 V +50 -88 V +49 -55 V +49 -8 V +49 39 V +49 75 V +50 92 V +49 84 V +49 56 V +49 13 V +49 -33 V +50 -68 V +49 -87 V +49 -83 V +49 -57 V +49 -17 V +50 26 V +49 64 V +49 84 V +49 82 V +49 60 V +50 22 V +49 -22 V +49 -60 V +49 -82 V +49 -84 V +49 -64 V +50 -26 V +49 17 V +49 57 V +49 83 V +49 87 V +50 68 V +49 33 V +49 -13 V +49 -56 V +49 -84 V +50 -92 V +49 -75 V +49 -39 V +49 8 V +49 55 V +50 88 V +49 99 V +49 84 V +49 48 V +49 -3 V +50 -55 V +49 -94 V +49 -110 V +49 -97 V +49 -60 V +50 -3 V +49 55 V +49 104 V +49 125 V +49 117 V +50 76 V +49 13 V +49 -57 V +49 -118 V +49 -150 V +50 -147 V +49 -102 V +49 -29 V +49 61 V +49 141 V +49 192 V +50 198 V +49 151 V +49 58 V +49 -63 V +49 -184 V +50 -274 V +49 -307 V +49 -262 V +49 -140 V +49 49 V +50 274 V +49 499 V +49 679 V +49 778 V +49 773 V +50 654 V +49 438 V +672 3066 D +721 3066 D +770 3066 D +820 3066 D +869 3066 D +918 3066 D +967 3066 D +1016 3066 D +1066 3066 D +1115 3066 D +1164 3066 D +1213 1163 D +1262 1163 D +1312 1163 D +1361 1163 D +1410 1163 D +1459 1163 D +1508 1163 D +1558 1163 D +1607 1163 D +1656 1163 D +1705 1163 D +1754 1163 D +1803 1163 D +1853 1163 D +1902 1163 D +1951 1163 D +2000 1163 D +2049 1163 D +2099 1163 D +2148 1163 D +2197 1163 D +2246 1163 D +2295 1163 D +2345 1163 D +2394 1163 D +2443 1163 D +2492 1163 D +2541 1163 D +2591 1163 D +2640 1163 D +2689 1163 D +2738 1163 D +2787 1163 D +2837 1163 D +2886 1163 D +2935 1163 D +2984 1163 D +3033 1163 D +3083 1163 D +3132 1163 D +3181 1163 D +3230 1163 D +3279 1163 D +3329 1163 D +3378 1163 D +3427 1163 D +3476 1163 D +3525 1163 D +3575 1163 D +3624 1163 D +3673 1163 D +3722 1163 D +3771 1163 D +3821 1163 D +3870 1163 D +3919 1163 D +3968 1163 D +4017 1163 D +4066 1163 D +4116 1163 D +4165 1163 D +4214 1163 D +4263 1163 D +4312 1163 D +4362 1163 D +4411 1163 D +4460 1163 D +4509 1163 D +4558 1163 D +4608 1163 D +4657 1163 D +4706 1163 D +4755 1163 D +4804 1163 D +4854 1163 D +4903 1163 D +4952 1163 D +5001 1163 D +5050 1163 D +5100 1163 D +5149 1163 D +5198 1163 D +5247 1163 D +5296 1163 D +5346 1163 D +5395 1163 D +5444 1163 D +5493 1163 D +5542 1163 D +5592 1163 D +5641 1163 D +5690 1163 D +5739 1163 D +5788 1163 D +5838 1163 D +5887 1163 D +5936 1163 D +5985 1163 D +6034 1163 D +6083 1163 D +6133 1163 D +6182 1163 D +6231 1163 D +6280 1163 D +6329 1163 D +6379 1163 D +6428 1163 D +6477 3066 D +6526 3066 D +6575 3066 D +6625 3066 D +6674 3066 D +6723 3066 D +6772 3066 D +6821 3066 D +6871 3066 D +6920 3066 D +672 4695 D +721 4541 D +770 4103 D +820 3449 D +869 2676 D +918 1898 D +967 1219 D +1016 720 D +1066 446 D +1115 397 D +1164 537 D +1213 799 D +1262 1106 D +1312 1380 D +1361 1564 D +1410 1627 D +1459 1569 D +1508 1418 D +1558 1220 D +1607 1028 D +1656 887 D +1705 826 D +1754 855 D +1803 957 D +1853 1104 D +1902 1254 D +1951 1372 D +2000 1429 D +2049 1416 D +2099 1340 D +2148 1223 D +2197 1098 D +2246 994 D +2295 939 D +2345 942 D +2394 1002 D +2443 1099 D +2492 1209 D +2541 1303 D +2591 1358 D +2640 1361 D +2689 1313 D +2738 1229 D +2787 1130 D +2837 1042 D +2886 987 D +2935 979 D +2984 1018 D +3033 1093 D +3083 1185 D +3132 1269 D +3181 1325 D +3230 1338 D +3279 1305 D +3329 1237 D +3378 1150 D +3427 1067 D +3476 1010 D +3525 993 D +3575 1019 D +3624 1083 D +3673 1167 D +3722 1249 D +3771 1309 D +3821 1331 D +3870 1309 D +3919 1249 D +3968 1167 D +4017 1083 D +4066 1019 D +4116 993 D +4165 1010 D +4214 1067 D +4263 1150 D +4312 1237 D +4362 1305 D +4411 1338 D +4460 1325 D +4509 1269 D +4558 1185 D +4608 1093 D +4657 1018 D +4706 979 D +4755 987 D +4804 1042 D +4854 1130 D +4903 1229 D +4952 1313 D +5001 1361 D +5050 1358 D +5100 1303 D +5149 1209 D +5198 1099 D +5247 1002 D +5296 942 D +5346 939 D +5395 994 D +5444 1098 D +5493 1223 D +5542 1340 D +5592 1416 D +5641 1429 D +5690 1372 D +5739 1254 D +5788 1104 D +5838 957 D +5887 855 D +5936 826 D +5985 887 D +6034 1028 D +6083 1220 D +6133 1418 D +6182 1569 D +6231 1627 D +6280 1564 D +6329 1380 D +6379 1106 D +6428 799 D +6477 537 D +6526 397 D +6575 446 D +6625 720 D +6674 1219 D +6723 1898 D +6772 2676 D +6821 3449 D +6871 4103 D +6920 4541 D +stroke +grestore +end +showpage +%%Trailer diff --git a/software/gsl-1.15/doc/fft-real-mixedradix.eps b/software/gsl-1.15/doc/fft-real-mixedradix.eps new file mode 100644 index 000000000..b62901846 --- /dev/null +++ b/software/gsl-1.15/doc/fft-real-mixedradix.eps @@ -0,0 +1,606 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Creator: gnuplot +%%DocumentFonts: Helvetica +%%BoundingBox: 50 50 410 302 +%%EndComments +/gnudict 40 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/vshift -46 def +/dl {10 mul} def +/hpt 31.5 def +/vpt 31.5 def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/PL { stroke gnulinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 0 1 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def +/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/P { stroke [] 0 setdash + currentlinewidth 2 div sub M + 0 currentlinewidth V stroke } def +/D { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + P } def +/A { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/B { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + P } def +/C { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/T { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + P } def +/S { 2 copy A C} def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +/Helvetica findfont 140 scalefont setfont +newpath +LTa +672 891 M +6297 0 V +672 211 M +0 4758 V +LTb +672 211 M +63 0 V +6234 0 R +-63 0 V +588 211 M +(-0.2) Rshow +672 891 M +63 0 V +6234 0 R +-63 0 V +588 891 M +(0) Rshow +672 1570 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.2) Rshow +672 2250 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.4) Rshow +672 2930 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.6) Rshow +672 3610 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(0.8) Rshow +672 4289 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1) Rshow +672 4969 M +63 0 V +6234 0 R +-63 0 V +-6318 0 R +(1.2) Rshow +672 211 M +0 63 V +0 4695 R +0 -63 V +672 71 M +(0) Cshow +1302 211 M +0 63 V +0 4695 R +0 -63 V +1302 71 M +(10) Cshow +1931 211 M +0 63 V +0 4695 R +0 -63 V +1931 71 M +(20) Cshow +2561 211 M +0 63 V +0 4695 R +0 -63 V +2561 71 M +(30) Cshow +3191 211 M +0 63 V +0 4695 R +0 -63 V +3191 71 M +(40) Cshow +3820 211 M +0 63 V +0 4695 R +0 -63 V +3820 71 M +(50) Cshow +4450 211 M +0 63 V +0 4695 R +0 -63 V +4450 71 M +(60) Cshow +5080 211 M +0 63 V +0 4695 R +0 -63 V +5080 71 M +(70) Cshow +5710 211 M +0 63 V +0 4695 R +0 -63 V +5710 71 M +(80) Cshow +6339 211 M +0 63 V +0 4695 R +0 -63 V +6339 71 M +(90) Cshow +6969 211 M +0 63 V +0 4695 R +0 -63 V +6969 71 M +(100) Cshow +672 211 M +6297 0 V +0 4758 V +-6297 0 V +672 211 L +LT0 +672 891 M +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +62 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 3398 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +62 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +4828 891 L +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +62 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +672 997 M +63 -23 V +63 -35 V +63 -42 V +63 -44 V +63 -39 V +63 -30 V +63 -15 V +63 1 V +63 19 V +63 34 V +63 47 V +63 52 V +63 51 V +63 43 V +63 28 V +63 8 V +62 -16 V +63 -41 V +63 -62 V +63 -77 V +63 -83 V +63 -78 V +63 -60 V +63 -29 V +63 15 V +63 69 V +63 130 V +63 195 V +63 258 V +63 316 V +63 362 V +63 395 V +63 410 V +63 407 V +63 384 V +63 345 V +63 291 V +63 225 V +63 155 V +63 83 V +63 16 V +63 -41 V +63 -85 V +63 -113 V +63 -124 V +63 -117 V +63 -96 V +63 -63 V +63 -22 V +62 22 V +63 63 V +63 96 V +63 117 V +63 124 V +63 113 V +63 85 V +63 41 V +63 -16 V +63 -83 V +63 -155 V +63 -225 V +63 -291 V +63 -345 V +63 -384 V +63 -407 V +63 -410 V +63 -395 V +63 -362 V +63 -316 V +63 -258 V +63 -195 V +63 -130 V +63 -69 V +63 -15 V +63 29 V +63 60 V +63 78 V +63 83 V +63 77 V +63 62 V +63 41 V +63 16 V +63 -8 V +62 -28 V +63 -43 V +63 -51 V +63 -52 V +63 -47 V +63 -34 V +63 -19 V +63 -1 V +63 15 V +63 30 V +63 39 V +63 44 V +63 42 V +63 35 V +63 23 V +63 8 V +672 891 D +735 891 D +798 891 D +861 891 D +924 891 D +987 891 D +1050 891 D +1113 891 D +1176 891 D +1239 891 D +1302 891 D +1365 891 D +1428 891 D +1491 891 D +1554 891 D +1617 891 D +1680 891 D +1742 891 D +1805 891 D +1868 891 D +1931 891 D +1994 891 D +2057 891 D +2120 891 D +2183 891 D +2246 891 D +2309 891 D +2372 891 D +2435 891 D +2498 891 D +2561 891 D +2624 891 D +2687 891 D +2750 4289 D +2813 4289 D +2876 4289 D +2939 4289 D +3002 4289 D +3065 4289 D +3128 4289 D +3191 4289 D +3254 4289 D +3317 4289 D +3380 4289 D +3443 4289 D +3506 4289 D +3569 4289 D +3632 4289 D +3695 4289 D +3758 4289 D +3820 4289 D +3883 4289 D +3946 4289 D +4009 4289 D +4072 4289 D +4135 4289 D +4198 4289 D +4261 4289 D +4324 4289 D +4387 4289 D +4450 4289 D +4513 4289 D +4576 4289 D +4639 4289 D +4702 4289 D +4765 4289 D +4828 891 D +4891 891 D +4954 891 D +5017 891 D +5080 891 D +5143 891 D +5206 891 D +5269 891 D +5332 891 D +5395 891 D +5458 891 D +5521 891 D +5584 891 D +5647 891 D +5710 891 D +5773 891 D +5836 891 D +5899 891 D +5961 891 D +6024 891 D +6087 891 D +6150 891 D +6213 891 D +6276 891 D +6339 891 D +6402 891 D +6465 891 D +6528 891 D +6591 891 D +6654 891 D +6717 891 D +6780 891 D +6843 891 D +6906 891 D +672 997 D +735 974 D +798 939 D +861 897 D +924 853 D +987 814 D +1050 784 D +1113 769 D +1176 770 D +1239 789 D +1302 823 D +1365 870 D +1428 922 D +1491 973 D +1554 1016 D +1617 1044 D +1680 1052 D +1742 1036 D +1805 995 D +1868 933 D +1931 856 D +1994 773 D +2057 695 D +2120 635 D +2183 606 D +2246 621 D +2309 690 D +2372 820 D +2435 1015 D +2498 1273 D +2561 1589 D +2624 1951 D +2687 2346 D +2750 2756 D +2813 3163 D +2876 3547 D +2939 3892 D +3002 4183 D +3065 4408 D +3128 4563 D +3191 4646 D +3254 4662 D +3317 4621 D +3380 4536 D +3443 4423 D +3506 4299 D +3569 4182 D +3632 4086 D +3695 4023 D +3758 4001 D +3820 4023 D +3883 4086 D +3946 4182 D +4009 4299 D +4072 4423 D +4135 4536 D +4198 4621 D +4261 4662 D +4324 4646 D +4387 4563 D +4450 4408 D +4513 4183 D +4576 3892 D +4639 3547 D +4702 3163 D +4765 2756 D +4828 2346 D +4891 1951 D +4954 1589 D +5017 1273 D +5080 1015 D +5143 820 D +5206 690 D +5269 621 D +5332 606 D +5395 635 D +5458 695 D +5521 773 D +5584 856 D +5647 933 D +5710 995 D +5773 1036 D +5836 1052 D +5899 1044 D +5961 1016 D +6024 973 D +6087 922 D +6150 870 D +6213 823 D +6276 789 D +6339 770 D +6402 769 D +6465 784 D +6528 814 D +6591 853 D +6654 897 D +6717 939 D +6780 974 D +6843 997 D +6906 1005 D +stroke +grestore +end +showpage +%%Trailer diff --git a/software/gsl-1.15/doc/fft.texi b/software/gsl-1.15/doc/fft.texi new file mode 100644 index 000000000..bf08c4be5 --- /dev/null +++ b/software/gsl-1.15/doc/fft.texi @@ -0,0 +1,1039 @@ +@cindex FFT +@cindex Fast Fourier Transforms, see FFT +@cindex Fourier Transforms, see FFT +@cindex Discrete Fourier Transforms, see FFT +@cindex DFTs, see FFT + +This chapter describes functions for performing Fast Fourier Transforms +(FFTs). The library includes radix-2 routines (for lengths which are a +power of two) and mixed-radix routines (which work for any length). For +efficiency there are separate versions of the routines for real data and +for complex data. The mixed-radix routines are a reimplementation of the +@sc{fftpack} library of Paul Swarztrauber. Fortran code for @sc{fftpack} is +available on Netlib (@sc{fftpack} also includes some routines for sine and +cosine transforms but these are currently not available in GSL). For +details and derivations of the underlying algorithms consult the +document @cite{GSL FFT Algorithms} (@pxref{FFT References and Further Reading}) + +@menu +* Mathematical Definitions:: +* Overview of complex data FFTs:: +* Radix-2 FFT routines for complex data:: +* Mixed-radix FFT routines for complex data:: +* Overview of real data FFTs:: +* Radix-2 FFT routines for real data:: +* Mixed-radix FFT routines for real data:: +* FFT References and Further Reading:: +@end menu + +@node Mathematical Definitions +@section Mathematical Definitions +@cindex FFT mathematical definition + +Fast Fourier Transforms are efficient algorithms for +calculating the discrete Fourier transform (DFT), +@tex +\beforedisplay +$$ +x_j = \sum_{k=0}^{n-1} z_k \exp(-2\pi i j k / n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_j = \sum_@{k=0@}^@{n-1@} z_k \exp(-2\pi i j k / n) +@end example +@end ifinfo + +The DFT usually arises as an approximation to the continuous Fourier +transform when functions are sampled at discrete intervals in space or +time. The naive evaluation of the discrete Fourier transform is a +matrix-vector multiplication +@c{$W\vec{z}$} +@math{W\vec@{z@}}. A general matrix-vector multiplication takes +@math{O(n^2)} operations for @math{n} data-points. Fast Fourier +transform algorithms use a divide-and-conquer strategy to factorize the +matrix @math{W} into smaller sub-matrices, corresponding to the integer +factors of the length @math{n}. If @math{n} can be factorized into a +product of integers +@c{$f_1 f_2 \ldots f_m$} +@math{f_1 f_2 ... f_m} then the DFT can be computed in @math{O(n \sum +f_i)} operations. For a radix-2 FFT this gives an operation count of +@math{O(n \log_2 n)}. + +All the FFT functions offer three types of transform: forwards, inverse +and backwards, based on the same mathematical definitions. The +definition of the @dfn{forward Fourier transform}, +@c{$x = \hbox{FFT}(z)$} +@math{x = FFT(z)}, is, +@tex +\beforedisplay +$$ +x_j = \sum_{k=0}^{n-1} z_k \exp(-2\pi i j k / n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_j = \sum_@{k=0@}^@{n-1@} z_k \exp(-2\pi i j k / n) +@end example + +@end ifinfo +@noindent +and the definition of the @dfn{inverse Fourier transform}, +@c{$x = \hbox{IFFT}(z)$} +@math{x = IFFT(z)}, is, +@tex +\beforedisplay +$$ +z_j = {1 \over n} \sum_{k=0}^{n-1} x_k \exp(2\pi i j k / n). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z_j = @{1 \over n@} \sum_@{k=0@}^@{n-1@} x_k \exp(2\pi i j k / n). +@end example + +@end ifinfo +@noindent +The factor of @math{1/n} makes this a true inverse. For example, a call +to @code{gsl_fft_complex_forward} followed by a call to +@code{gsl_fft_complex_inverse} should return the original data (within +numerical errors). + +In general there are two possible choices for the sign of the +exponential in the transform/ inverse-transform pair. GSL follows the +same convention as @sc{fftpack}, using a negative exponential for the forward +transform. The advantage of this convention is that the inverse +transform recreates the original function with simple Fourier +synthesis. Numerical Recipes uses the opposite convention, a positive +exponential in the forward transform. + +The @dfn{backwards FFT} is simply our terminology for an unscaled +version of the inverse FFT, +@tex +\beforedisplay +$$ +z^{backwards}_j = \sum_{k=0}^{n-1} x_k \exp(2\pi i j k / n). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z^@{backwards@}_j = \sum_@{k=0@}^@{n-1@} x_k \exp(2\pi i j k / n). +@end example + +@end ifinfo +@noindent +When the overall scale of the result is unimportant it is often +convenient to use the backwards FFT instead of the inverse to save +unnecessary divisions. + +@node Overview of complex data FFTs +@section Overview of complex data FFTs +@cindex FFT, complex data + +The inputs and outputs for the complex FFT routines are @dfn{packed +arrays} of floating point numbers. In a packed array the real and +imaginary parts of each complex number are placed in alternate +neighboring elements. For example, the following definition of a packed +array of length 6, + +@example +double x[3*2]; +gsl_complex_packed_array data = x; +@end example + +@noindent +can be used to hold an array of three complex numbers, @code{z[3]}, in +the following way, + +@example +data[0] = Re(z[0]) +data[1] = Im(z[0]) +data[2] = Re(z[1]) +data[3] = Im(z[1]) +data[4] = Re(z[2]) +data[5] = Im(z[2]) +@end example + +@noindent +The array indices for the data have the same ordering as those +in the definition of the DFT---i.e. there are no index transformations +or permutations of the data. + +A @dfn{stride} parameter allows the user to perform transforms on the +elements @code{z[stride*i]} instead of @code{z[i]}. A stride greater +than 1 can be used to take an in-place FFT of the column of a matrix. A +stride of 1 accesses the array without any additional spacing between +elements. + +To perform an FFT on a vector argument, such as @code{gsl_vector_complex +* v}, use the following definitions (or their equivalents) when calling +the functions described in this chapter: + +@example +gsl_complex_packed_array data = v->data; +size_t stride = v->stride; +size_t n = v->size; +@end example + +For physical applications it is important to remember that the index +appearing in the DFT does not correspond directly to a physical +frequency. If the time-step of the DFT is @math{\Delta} then the +frequency-domain includes both positive and negative frequencies, +ranging from @math{-1/(2\Delta)} through 0 to @math{+1/(2\Delta)}. The +positive frequencies are stored from the beginning of the array up to +the middle, and the negative frequencies are stored backwards from the +end of the array. + +Here is a table which shows the layout of the array @var{data}, and the +correspondence between the time-domain data @math{z}, and the +frequency-domain data @math{x}. + +@example +index z x = FFT(z) + +0 z(t = 0) x(f = 0) +1 z(t = 1) x(f = 1/(n Delta)) +2 z(t = 2) x(f = 2/(n Delta)) +. ........ .................. +n/2 z(t = n/2) x(f = +1/(2 Delta), + -1/(2 Delta)) +. ........ .................. +n-3 z(t = n-3) x(f = -3/(n Delta)) +n-2 z(t = n-2) x(f = -2/(n Delta)) +n-1 z(t = n-1) x(f = -1/(n Delta)) +@end example + +@noindent +When @math{n} is even the location @math{n/2} contains the most positive +and negative frequencies (@math{+1/(2 \Delta)}, @math{-1/(2 \Delta)}) +which are equivalent. If @math{n} is odd then general structure of the +table above still applies, but @math{n/2} does not appear. + + +@node Radix-2 FFT routines for complex data +@section Radix-2 FFT routines for complex data +@cindex FFT of complex data, radix-2 algorithm +@cindex Radix-2 FFT, complex data + +The radix-2 algorithms described in this section are simple and compact, +although not necessarily the most efficient. They use the Cooley-Tukey +algorithm to compute in-place complex FFTs for lengths which are a power +of 2---no additional storage is required. The corresponding +self-sorting mixed-radix routines offer better performance at the +expense of requiring additional working space. + +All the functions described in this section are declared in the header file @file{gsl_fft_complex.h}. + +@deftypefun int gsl_fft_complex_radix2_forward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +@deftypefunx int gsl_fft_complex_radix2_transform (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, gsl_fft_direction @var{sign}) + +@deftypefunx int gsl_fft_complex_radix2_backward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +@deftypefunx int gsl_fft_complex_radix2_inverse (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +These functions compute forward, backward and inverse FFTs of length +@var{n} with stride @var{stride}, on the packed complex array @var{data} +using an in-place radix-2 decimation-in-time algorithm. The length of +the transform @var{n} is restricted to powers of two. For the +@code{transform} version of the function the @var{sign} argument can be +either @code{forward} (@math{-1}) or @code{backward} (@math{+1}). + +The functions return a value of @code{GSL_SUCCESS} if no errors were +detected, or @code{GSL_EDOM} if the length of the data @var{n} is not a +power of two. +@end deftypefun + +@deftypefun int gsl_fft_complex_radix2_dif_forward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +@deftypefunx int gsl_fft_complex_radix2_dif_transform (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, gsl_fft_direction @var{sign}) + +@deftypefunx int gsl_fft_complex_radix2_dif_backward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +@deftypefunx int gsl_fft_complex_radix2_dif_inverse (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}) + +These are decimation-in-frequency versions of the radix-2 FFT functions. + +@end deftypefun + + +@comment @node Example of using radix-2 FFT routines for complex data +@comment @subsection Example of using radix-2 FFT routines for complex data + +Here is an example program which computes the FFT of a short pulse in a +sample of length 128. To make the resulting Fourier transform real the +pulse is defined for equal positive and negative times (@math{-10} +@dots{} @math{10}), where the negative times wrap around the end of the +array. + +@example +@verbatiminclude examples/fft.c +@end example + +@noindent +Note that we have assumed that the program is using the default error +handler (which calls @code{abort} for any errors). If you are not using +a safe error handler you would need to check the return status of +@code{gsl_fft_complex_radix2_forward}. + +The transformed data is rescaled by @math{1/\sqrt n} so that it fits on +the same plot as the input. Only the real part is shown, by the choice +of the input data the imaginary part is zero. Allowing for the +wrap-around of negative times at @math{t=128}, and working in units of +@math{k/n}, the DFT approximates the continuum Fourier transform, giving +a modulated sine function. +@iftex +@tex +\beforedisplay +$$ +\int_{-a}^{+a} e^{-2 \pi i k x} dx = {\sin(2\pi k a) \over\pi k} +$$ +\afterdisplay +@end tex + +@sp 1 +@center @image{fft-complex-radix2-t,2.8in} +@center @image{fft-complex-radix2-f,2.8in} +@quotation +A pulse and its discrete Fourier transform, output from +the example program. +@end quotation +@end iftex + +@node Mixed-radix FFT routines for complex data +@section Mixed-radix FFT routines for complex data +@cindex FFT of complex data, mixed-radix algorithm +@cindex Mixed-radix FFT, complex data + +This section describes mixed-radix FFT algorithms for complex data. The +mixed-radix functions work for FFTs of any length. They are a +reimplementation of Paul Swarztrauber's Fortran @sc{fftpack} library. +The theory is explained in the review article @cite{Self-sorting +Mixed-radix FFTs} by Clive Temperton. The routines here use the same +indexing scheme and basic algorithms as @sc{fftpack}. + +The mixed-radix algorithm is based on sub-transform modules---highly +optimized small length FFTs which are combined to create larger FFTs. +There are efficient modules for factors of 2, 3, 4, 5, 6 and 7. The +modules for the composite factors of 4 and 6 are faster than combining +the modules for @math{2*2} and @math{2*3}. + +For factors which are not implemented as modules there is a fall-back to +a general length-@math{n} module which uses Singleton's method for +efficiently computing a DFT. This module is @math{O(n^2)}, and slower +than a dedicated module would be but works for any length @math{n}. Of +course, lengths which use the general length-@math{n} module will still +be factorized as much as possible. For example, a length of 143 will be +factorized into @math{11*13}. Large prime factors are the worst case +scenario, e.g. as found in @math{n=2*3*99991}, and should be avoided +because their @math{O(n^2)} scaling will dominate the run-time (consult +the document @cite{GSL FFT Algorithms} included in the GSL distribution +if you encounter this problem). + +The mixed-radix initialization function @code{gsl_fft_complex_wavetable_alloc} +returns the list of factors chosen by the library for a given length +@math{n}. It can be used to check how well the length has been +factorized, and estimate the run-time. To a first approximation the +run-time scales as @math{n \sum f_i}, where the @math{f_i} are the +factors of @math{n}. For programs under user control you may wish to +issue a warning that the transform will be slow when the length is +poorly factorized. If you frequently encounter data lengths which +cannot be factorized using the existing small-prime modules consult +@cite{GSL FFT Algorithms} for details on adding support for other +factors. + +@comment First, the space for the trigonometric lookup tables and scratch area is +@comment allocated by a call to one of the @code{alloc} functions. We +@comment call the combination of factorization, scratch space and trigonometric +@comment lookup arrays a @dfn{wavetable}. It contains the sine and cosine +@comment waveforms for the all the frequencies that will be used in the FFT. + +@comment The wavetable is initialized by a call to the corresponding @code{init} +@comment function. It factorizes the data length, using the implemented +@comment subtransforms as preferred factors wherever possible. The trigonometric +@comment lookup table for the chosen factorization is also computed. + +@comment An FFT is computed by a call to one of the @code{forward}, +@comment @code{backward} or @code{inverse} functions, with the data, length and +@comment wavetable as arguments. + +All the functions described in this section are declared in the header +file @file{gsl_fft_complex.h}. + +@deftypefun {gsl_fft_complex_wavetable *} gsl_fft_complex_wavetable_alloc (size_t @var{n}) +This function prepares a trigonometric lookup table for a complex FFT of +length @var{n}. The function returns a pointer to the newly allocated +@code{gsl_fft_complex_wavetable} if no errors were detected, and a null +pointer in the case of error. The length @var{n} is factorized into a +product of subtransforms, and the factors and their trigonometric +coefficients are stored in the wavetable. The trigonometric coefficients +are computed using direct calls to @code{sin} and @code{cos}, for +accuracy. Recursion relations could be used to compute the lookup table +faster, but if an application performs many FFTs of the same length then +this computation is a one-off overhead which does not affect the final +throughput. + +The wavetable structure can be used repeatedly for any transform of the +same length. The table is not modified by calls to any of the other FFT +functions. The same wavetable can be used for both forward and backward +(or inverse) transforms of a given length. +@end deftypefun + +@deftypefun void gsl_fft_complex_wavetable_free (gsl_fft_complex_wavetable * @var{wavetable}) +This function frees the memory associated with the wavetable +@var{wavetable}. The wavetable can be freed if no further FFTs of the +same length will be needed. +@end deftypefun + +@noindent +These functions operate on a @code{gsl_fft_complex_wavetable} structure +which contains internal parameters for the FFT. It is not necessary to +set any of the components directly but it can sometimes be useful to +examine them. For example, the chosen factorization of the FFT length +is given and can be used to provide an estimate of the run-time or +numerical error. The wavetable structure is declared in the header file +@file{gsl_fft_complex.h}. + +@deftp {Data Type} gsl_fft_complex_wavetable +This is a structure that holds the factorization and trigonometric +lookup tables for the mixed radix fft algorithm. It has the following +components: + +@table @code +@item size_t n +This is the number of complex data points + +@item size_t nf +This is the number of factors that the length @code{n} was decomposed into. + +@item size_t factor[64] +This is the array of factors. Only the first @code{nf} elements are +used. + +@comment (FIXME: This is a fixed length array and therefore probably in +@comment violation of the GNU Coding Standards). + +@item gsl_complex * trig +This is a pointer to a preallocated trigonometric lookup table of +@code{n} complex elements. + +@item gsl_complex * twiddle[64] +This is an array of pointers into @code{trig}, giving the twiddle +factors for each pass. +@end table +@end deftp + +@noindent +The mixed radix algorithms require additional working space to hold +the intermediate steps of the transform. + +@deftypefun {gsl_fft_complex_workspace *} gsl_fft_complex_workspace_alloc (size_t @var{n}) +@tpindex gsl_fft_complex_workspace +This function allocates a workspace for a complex transform of length +@var{n}. +@end deftypefun + +@deftypefun void gsl_fft_complex_workspace_free (gsl_fft_complex_workspace * @var{workspace}) +This function frees the memory associated with the workspace +@var{workspace}. The workspace can be freed if no further FFTs of the +same length will be needed. +@end deftypefun + +@comment @deftp {Data Type} gsl_fft_complex_workspace +@comment This is a structure that holds the workspace for the mixed radix fft +@comment algorithm. It has the following components: +@comment +@comment @table @code +@comment @item gsl_complex * scratch +@comment This is a pointer to a workspace of @code{n} complex elements, +@comment capable of holding intermediate copies of the original data set. +@comment @end table +@comment @end deftp + +@noindent +The following functions compute the transform, + +@deftypefun int gsl_fft_complex_forward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, const gsl_fft_complex_wavetable * @var{wavetable}, gsl_fft_complex_workspace * @var{work}) +@deftypefunx int gsl_fft_complex_transform (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, const gsl_fft_complex_wavetable * @var{wavetable}, gsl_fft_complex_workspace * @var{work}, gsl_fft_direction @var{sign}) +@deftypefunx int gsl_fft_complex_backward (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, const gsl_fft_complex_wavetable * @var{wavetable}, gsl_fft_complex_workspace * @var{work}) +@deftypefunx int gsl_fft_complex_inverse (gsl_complex_packed_array @var{data}, size_t @var{stride}, size_t @var{n}, const gsl_fft_complex_wavetable * @var{wavetable}, gsl_fft_complex_workspace * @var{work}) + +These functions compute forward, backward and inverse FFTs of length +@var{n} with stride @var{stride}, on the packed complex array +@var{data}, using a mixed radix decimation-in-frequency algorithm. +There is no restriction on the length @var{n}. Efficient modules are +provided for subtransforms of length 2, 3, 4, 5, 6 and 7. Any remaining +factors are computed with a slow, @math{O(n^2)}, general-@math{n} +module. The caller must supply a @var{wavetable} containing the +trigonometric lookup tables and a workspace @var{work}. For the +@code{transform} version of the function the @var{sign} argument can be +either @code{forward} (@math{-1}) or @code{backward} (@math{+1}). + +The functions return a value of @code{0} if no errors were detected. The +following @code{gsl_errno} conditions are defined for these functions: + +@table @code +@item GSL_EDOM +The length of the data @var{n} is not a positive integer (i.e. @var{n} +is zero). + +@item GSL_EINVAL +The length of the data @var{n} and the length used to compute the given +@var{wavetable} do not match. +@end table +@end deftypefun + +@comment @node Example of using mixed-radix FFT routines for complex data +@comment @subsection Example of using mixed-radix FFT routines for complex data + +Here is an example program which computes the FFT of a short pulse in a +sample of length 630 (@math{=2*3*3*5*7}) using the mixed-radix +algorithm. + +@example +@verbatiminclude examples/fftmr.c +@end example + +@noindent +Note that we have assumed that the program is using the default +@code{gsl} error handler (which calls @code{abort} for any errors). If +you are not using a safe error handler you would need to check the +return status of all the @code{gsl} routines. + +@node Overview of real data FFTs +@section Overview of real data FFTs +@cindex FFT of real data +The functions for real data are similar to those for complex data. +However, there is an important difference between forward and inverse +transforms. The Fourier transform of a real sequence is not real. It is +a complex sequence with a special symmetry: +@tex +\beforedisplay +$$ +z_k = z_{n-k}^* +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z_k = z_@{n-k@}^* +@end example + +@end ifinfo +@noindent +A sequence with this symmetry is called @dfn{conjugate-complex} or +@dfn{half-complex}. This different structure requires different +storage layouts for the forward transform (from real to half-complex) +and inverse transform (from half-complex back to real). As a +consequence the routines are divided into two sets: functions in +@code{gsl_fft_real} which operate on real sequences and functions in +@code{gsl_fft_halfcomplex} which operate on half-complex sequences. + +Functions in @code{gsl_fft_real} compute the frequency coefficients of a +real sequence. The half-complex coefficients @math{c} of a real sequence +@math{x} are given by Fourier analysis, +@tex +\beforedisplay +$$ +c_k = \sum_{j=0}^{n-1} x_j \exp(-2 \pi i j k /n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +c_k = \sum_@{j=0@}^@{n-1@} x_j \exp(-2 \pi i j k /n) +@end example + +@end ifinfo +@noindent +Functions in @code{gsl_fft_halfcomplex} compute inverse or backwards +transforms. They reconstruct real sequences by Fourier synthesis from +their half-complex frequency coefficients, @math{c}, +@tex +\beforedisplay +$$ +x_j = {1 \over n} \sum_{k=0}^{n-1} c_k \exp(2 \pi i j k /n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_j = @{1 \over n@} \sum_@{k=0@}^@{n-1@} c_k \exp(2 \pi i j k /n) +@end example + +@end ifinfo +@noindent +The symmetry of the half-complex sequence implies that only half of the +complex numbers in the output need to be stored. The remaining half can +be reconstructed using the half-complex symmetry condition. This works +for all lengths, even and odd---when the length is even the middle value +where @math{k=n/2} is also real. Thus only @var{n} real numbers are +required to store the half-complex sequence, and the transform of a real +sequence can be stored in the same size array as the original data. + +The precise storage arrangements depend on the algorithm, and are +different for radix-2 and mixed-radix routines. The radix-2 function +operates in-place, which constrains the locations where each element can +be stored. The restriction forces real and imaginary parts to be stored +far apart. The mixed-radix algorithm does not have this restriction, and +it stores the real and imaginary parts of a given term in neighboring +locations (which is desirable for better locality of memory accesses). + +@node Radix-2 FFT routines for real data +@section Radix-2 FFT routines for real data +@cindex FFT of real data, radix-2 algorithm +@cindex Radix-2 FFT for real data + +This section describes radix-2 FFT algorithms for real data. They use +the Cooley-Tukey algorithm to compute in-place FFTs for lengths which +are a power of 2. + +The radix-2 FFT functions for real data are declared in the header files +@file{gsl_fft_real.h} + +@deftypefun int gsl_fft_real_radix2_transform (double @var{data}[], size_t @var{stride}, size_t @var{n}) + +This function computes an in-place radix-2 FFT of length @var{n} and +stride @var{stride} on the real array @var{data}. The output is a +half-complex sequence, which is stored in-place. The arrangement of the +half-complex terms uses the following scheme: for @math{k < n/2} the +real part of the @math{k}-th term is stored in location @math{k}, and +the corresponding imaginary part is stored in location @math{n-k}. Terms +with @math{k > n/2} can be reconstructed using the symmetry +@c{$z_k = z^*_{n-k}$} +@math{z_k = z^*_@{n-k@}}. +The terms for @math{k=0} and @math{k=n/2} are both purely +real, and count as a special case. Their real parts are stored in +locations @math{0} and @math{n/2} respectively, while their imaginary +parts which are zero are not stored. + +The following table shows the correspondence between the output +@var{data} and the equivalent results obtained by considering the input +data as a complex sequence with zero imaginary part (assuming @var{stride=1}), + +@example +complex[0].real = data[0] +complex[0].imag = 0 +complex[1].real = data[1] +complex[1].imag = data[n-1] +............... ................ +complex[k].real = data[k] +complex[k].imag = data[n-k] +............... ................ +complex[n/2].real = data[n/2] +complex[n/2].imag = 0 +............... ................ +complex[k'].real = data[k] k' = n - k +complex[k'].imag = -data[n-k] +............... ................ +complex[n-1].real = data[1] +complex[n-1].imag = -data[n-1] +@end example +@noindent +Note that the output data can be converted into the full complex +sequence using the function @code{gsl_fft_halfcomplex_radix2_unpack} +described below. + +@end deftypefun +The radix-2 FFT functions for halfcomplex data are declared in the +header file @file{gsl_fft_halfcomplex.h}. + +@deftypefun int gsl_fft_halfcomplex_radix2_inverse (double @var{data}[], size_t @var{stride}, size_t @var{n}) +@deftypefunx int gsl_fft_halfcomplex_radix2_backward (double @var{data}[], size_t @var{stride}, size_t @var{n}) + +These functions compute the inverse or backwards in-place radix-2 FFT of +length @var{n} and stride @var{stride} on the half-complex sequence +@var{data} stored according the output scheme used by +@code{gsl_fft_real_radix2}. The result is a real array stored in natural +order. +@end deftypefun + +@deftypefun int gsl_fft_halfcomplex_radix2_unpack (const double @var{halfcomplex_coefficient}[], gsl_complex_packed_array @var{complex_coefficient}, size_t @var{stride}, size_t @var{n}) +This function converts @var{halfcomplex_coefficient}, an array of +half-complex coefficients as returned by @code{gsl_fft_real_radix2_transform}, into an ordinary complex array, @var{complex_coefficient}. It fills in the +complex array using the symmetry +@c{$z_k = z_{n-k}^*$} +@math{z_k = z_@{n-k@}^*} +to reconstruct the redundant elements. The algorithm for the conversion +is, + +@example +complex_coefficient[0].real + = halfcomplex_coefficient[0]; +complex_coefficient[0].imag + = 0.0; + +for (i = 1; i < n - i; i++) + @{ + double hc_real + = halfcomplex_coefficient[i*stride]; + double hc_imag + = halfcomplex_coefficient[(n-i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + @} + +if (i == n - i) + @{ + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + @} +@end example +@end deftypefun + +@node Mixed-radix FFT routines for real data +@section Mixed-radix FFT routines for real data +@cindex FFT of real data, mixed-radix algorithm +@cindex Mixed-radix FFT, real data + +This section describes mixed-radix FFT algorithms for real data. The +mixed-radix functions work for FFTs of any length. They are a +reimplementation of the real-FFT routines in the Fortran @sc{fftpack} library +by Paul Swarztrauber. The theory behind the algorithm is explained in +the article @cite{Fast Mixed-Radix Real Fourier Transforms} by Clive +Temperton. The routines here use the same indexing scheme and basic +algorithms as @sc{fftpack}. + +The functions use the @sc{fftpack} storage convention for half-complex +sequences. In this convention the half-complex transform of a real +sequence is stored with frequencies in increasing order, starting at +zero, with the real and imaginary parts of each frequency in neighboring +locations. When a value is known to be real the imaginary part is not +stored. The imaginary part of the zero-frequency component is never +stored. It is known to be zero (since the zero frequency component is +simply the sum of the input data (all real)). For a sequence of even +length the imaginary part of the frequency @math{n/2} is not stored +either, since the symmetry +@c{$z_k = z_{n-k}^*$} +@math{z_k = z_@{n-k@}^*} implies that this is +purely real too. + +The storage scheme is best shown by some examples. The table below +shows the output for an odd-length sequence, @math{n=5}. The two columns +give the correspondence between the 5 values in the half-complex +sequence returned by @code{gsl_fft_real_transform}, @var{halfcomplex}[] and the +values @var{complex}[] that would be returned if the same real input +sequence were passed to @code{gsl_fft_complex_backward} as a complex +sequence (with imaginary parts set to @code{0}), + +@example +complex[0].real = halfcomplex[0] +complex[0].imag = 0 +complex[1].real = halfcomplex[1] +complex[1].imag = halfcomplex[2] +complex[2].real = halfcomplex[3] +complex[2].imag = halfcomplex[4] +complex[3].real = halfcomplex[3] +complex[3].imag = -halfcomplex[4] +complex[4].real = halfcomplex[1] +complex[4].imag = -halfcomplex[2] +@end example + +@noindent +The upper elements of the @var{complex} array, @code{complex[3]} and +@code{complex[4]} are filled in using the symmetry condition. The +imaginary part of the zero-frequency term @code{complex[0].imag} is +known to be zero by the symmetry. + +The next table shows the output for an even-length sequence, @math{n=6} +In the even case there are two values which are purely real, + +@example +complex[0].real = halfcomplex[0] +complex[0].imag = 0 +complex[1].real = halfcomplex[1] +complex[1].imag = halfcomplex[2] +complex[2].real = halfcomplex[3] +complex[2].imag = halfcomplex[4] +complex[3].real = halfcomplex[5] +complex[3].imag = 0 +complex[4].real = halfcomplex[3] +complex[4].imag = -halfcomplex[4] +complex[5].real = halfcomplex[1] +complex[5].imag = -halfcomplex[2] +@end example + +@noindent +The upper elements of the @var{complex} array, @code{complex[4]} and +@code{complex[5]} are filled in using the symmetry condition. Both +@code{complex[0].imag} and @code{complex[3].imag} are known to be zero. + +All these functions are declared in the header files +@file{gsl_fft_real.h} and @file{gsl_fft_halfcomplex.h}. + +@deftypefun {gsl_fft_real_wavetable *} gsl_fft_real_wavetable_alloc (size_t @var{n}) +@deftypefunx {gsl_fft_halfcomplex_wavetable *} gsl_fft_halfcomplex_wavetable_alloc (size_t @var{n}) +@tpindex gsl_fft_real_wavetable +@tpindex gsl_fft_halfcomplex_wavetable +These functions prepare trigonometric lookup tables for an FFT of size +@math{n} real elements. The functions return a pointer to the newly +allocated struct if no errors were detected, and a null pointer in the +case of error. The length @var{n} is factorized into a product of +subtransforms, and the factors and their trigonometric coefficients are +stored in the wavetable. The trigonometric coefficients are computed +using direct calls to @code{sin} and @code{cos}, for accuracy. +Recursion relations could be used to compute the lookup table faster, +but if an application performs many FFTs of the same length then +computing the wavetable is a one-off overhead which does not affect the +final throughput. + +The wavetable structure can be used repeatedly for any transform of the +same length. The table is not modified by calls to any of the other FFT +functions. The appropriate type of wavetable must be used for forward +real or inverse half-complex transforms. +@end deftypefun + +@deftypefun void gsl_fft_real_wavetable_free (gsl_fft_real_wavetable * @var{wavetable}) +@deftypefunx void gsl_fft_halfcomplex_wavetable_free (gsl_fft_halfcomplex_wavetable * @var{wavetable}) +These functions free the memory associated with the wavetable +@var{wavetable}. The wavetable can be freed if no further FFTs of the +same length will be needed. +@end deftypefun + +@noindent +The mixed radix algorithms require additional working space to hold +the intermediate steps of the transform, + +@deftypefun {gsl_fft_real_workspace *} gsl_fft_real_workspace_alloc (size_t @var{n}) +@tpindex gsl_fft_real_workspace +This function allocates a workspace for a real transform of length +@var{n}. The same workspace can be used for both forward real and inverse +halfcomplex transforms. +@end deftypefun + +@deftypefun void gsl_fft_real_workspace_free (gsl_fft_real_workspace * @var{workspace}) +This function frees the memory associated with the workspace +@var{workspace}. The workspace can be freed if no further FFTs of the +same length will be needed. +@end deftypefun + +@noindent +The following functions compute the transforms of real and half-complex +data, + +@deftypefun int gsl_fft_real_transform (double @var{data}[], size_t @var{stride}, size_t @var{n}, const gsl_fft_real_wavetable * @var{wavetable}, gsl_fft_real_workspace * @var{work}) +@deftypefunx int gsl_fft_halfcomplex_transform (double @var{data}[], size_t @var{stride}, size_t @var{n}, const gsl_fft_halfcomplex_wavetable * @var{wavetable}, gsl_fft_real_workspace * @var{work}) +These functions compute the FFT of @var{data}, a real or half-complex +array of length @var{n}, using a mixed radix decimation-in-frequency +algorithm. For @code{gsl_fft_real_transform} @var{data} is an array of +time-ordered real data. For @code{gsl_fft_halfcomplex_transform} +@var{data} contains Fourier coefficients in the half-complex ordering +described above. There is no restriction on the length @var{n}. +Efficient modules are provided for subtransforms of length 2, 3, 4 and +5. Any remaining factors are computed with a slow, @math{O(n^2)}, +general-n module. The caller must supply a @var{wavetable} containing +trigonometric lookup tables and a workspace @var{work}. +@end deftypefun + +@deftypefun int gsl_fft_real_unpack (const double @var{real_coefficient}[], gsl_complex_packed_array @var{complex_coefficient}, size_t @var{stride}, size_t @var{n}) + +This function converts a single real array, @var{real_coefficient} into +an equivalent complex array, @var{complex_coefficient}, (with imaginary +part set to zero), suitable for @code{gsl_fft_complex} routines. The +algorithm for the conversion is simply, + +@example +for (i = 0; i < n; i++) + @{ + complex_coefficient[i*stride].real + = real_coefficient[i*stride]; + complex_coefficient[i*stride].imag + = 0.0; + @} +@end example +@end deftypefun + +@deftypefun int gsl_fft_halfcomplex_unpack (const double @var{halfcomplex_coefficient}[], gsl_complex_packed_array @var{complex_coefficient}, size_t @var{stride}, size_t @var{n}) + +This function converts @var{halfcomplex_coefficient}, an array of +half-complex coefficients as returned by @code{gsl_fft_real_transform}, into an +ordinary complex array, @var{complex_coefficient}. It fills in the +complex array using the symmetry +@c{$z_k = z_{n-k}^*$} +@math{z_k = z_@{n-k@}^*} +to reconstruct the redundant elements. The algorithm for the conversion +is, + +@example +complex_coefficient[0].real + = halfcomplex_coefficient[0]; +complex_coefficient[0].imag + = 0.0; + +for (i = 1; i < n - i; i++) + @{ + double hc_real + = halfcomplex_coefficient[(2 * i - 1)*stride]; + double hc_imag + = halfcomplex_coefficient[(2 * i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + @} + +if (i == n - i) + @{ + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + @} +@end example +@end deftypefun + +@comment @node Example of using mixed-radix FFT routines for real data +@comment @subsection Example of using mixed-radix FFT routines for real data + +Here is an example program using @code{gsl_fft_real_transform} and +@code{gsl_fft_halfcomplex_inverse}. It generates a real signal in the +shape of a square pulse. The pulse is Fourier transformed to frequency +space, and all but the lowest ten frequency components are removed from +the array of Fourier coefficients returned by +@code{gsl_fft_real_transform}. + +The remaining Fourier coefficients are transformed back to the +time-domain, to give a filtered version of the square pulse. Since +Fourier coefficients are stored using the half-complex symmetry both +positive and negative frequencies are removed and the final filtered +signal is also real. + +@example +@verbatiminclude examples/fftreal.c +@end example + +@iftex +@sp 1 +@center @image{fft-real-mixedradix,3.4in} + +@center Low-pass filtered version of a real pulse, +@center output from the example program. +@end iftex + +@node FFT References and Further Reading +@section References and Further Reading + +A good starting point for learning more about the FFT is the review +article @cite{Fast Fourier Transforms: A Tutorial Review and A State of +the Art} by Duhamel and Vetterli, + +@itemize @w{} +@item +P. Duhamel and M. Vetterli. +Fast Fourier transforms: A tutorial review and a state of the art. +@cite{Signal Processing}, 19:259--299, 1990. +@end itemize + +@noindent +To find out about the algorithms used in the GSL routines you may want +to consult the document @cite{GSL FFT Algorithms} (it is included +in GSL, as @file{doc/fftalgorithms.tex}). This has general information +on FFTs and explicit derivations of the implementation for each +routine. There are also references to the relevant literature. For +convenience some of the more important references are reproduced below. + +@noindent +There are several introductory books on the FFT with example programs, +such as @cite{The Fast Fourier Transform} by Brigham and @cite{DFT/FFT +and Convolution Algorithms} by Burrus and Parks, + +@itemize @w{} +@item +E. Oran Brigham. +@cite{The Fast Fourier Transform}. +Prentice Hall, 1974. + +@item +C. S. Burrus and T. W. Parks. +@cite{DFT/FFT and Convolution Algorithms}. +Wiley, 1984. +@end itemize + +@noindent +Both these introductory books cover the radix-2 FFT in some detail. +The mixed-radix algorithm at the heart of the @sc{fftpack} routines is +reviewed in Clive Temperton's paper, + +@itemize @w{} +@item +Clive Temperton. +Self-sorting mixed-radix fast Fourier transforms. +@cite{Journal of Computational Physics}, 52(1):1--23, 1983. +@end itemize + +@noindent +The derivation of FFTs for real-valued data is explained in the +following two articles, + +@itemize @w{} +@item +Henrik V. Sorenson, Douglas L. Jones, Michael T. Heideman, and C. Sidney +Burrus. +Real-valued fast Fourier transform algorithms. +@cite{IEEE Transactions on Acoustics, Speech, and Signal Processing}, +ASSP-35(6):849--863, 1987. + +@item +Clive Temperton. +Fast mixed-radix real Fourier transforms. +@cite{Journal of Computational Physics}, 52:340--350, 1983. +@end itemize + +@noindent +In 1979 the IEEE published a compendium of carefully-reviewed Fortran +FFT programs in @cite{Programs for Digital Signal Processing}. It is a +useful reference for implementations of many different FFT +algorithms, + +@itemize @w{} +@item +Digital Signal Processing Committee and IEEE Acoustics, Speech, and Signal +Processing Committee, editors. +@cite{Programs for Digital Signal Processing}. +IEEE Press, 1979. +@end itemize +@comment @noindent +@comment There is also an annotated bibliography of papers on the FFT and related +@comment topics by Burrus, + +@comment @itemize @w{} +@comment @item C. S. Burrus. Notes on the FFT. +@comment @end itemize +@comment @noindent +@comment The notes are available from @url{http://www-dsp.rice.edu/res/fft/fftnote.asc}. + +@noindent +For large-scale FFT work we recommend the use of the dedicated FFTW library +by Frigo and Johnson. The FFTW library is self-optimizing---it +automatically tunes itself for each hardware platform in order to +achieve maximum performance. It is available under the GNU GPL. + +@itemize @w{} +@item +FFTW Website, @uref{http://www.fftw.org/} +@end itemize + +@noindent +The source code for @sc{fftpack} is available from Netlib, + +@itemize @w{} +@item +FFTPACK, @uref{http://www.netlib.org/fftpack/} +@end itemize + + diff --git a/software/gsl-1.15/doc/fftalgorithms.bib b/software/gsl-1.15/doc/fftalgorithms.bib new file mode 100644 index 000000000..1a8506e6d --- /dev/null +++ b/software/gsl-1.15/doc/fftalgorithms.bib @@ -0,0 +1,240 @@ +@string{jcp = {Journal of Computational Physics}} +@string{assp = {IEEE Transactions on Acoustics, Speech, and Signal Processing}} + + +@Article{mehalic85, + author = {Mehalic and Rustan and Route}, + title = {Effects of Architecture Implementation on {DFT} Algorithm +Performance}, + journal = assp, + year = 1985, + volume = {ASP-33}, + pages = {684-693} +} + +@Article{temperton83, + author = {Clive Temperton}, + title = {Self-Sorting Mixed-Radix Fast Fourier Transforms}, + journal = {Journal of Computational Physics}, + year = 1983, + volume = 52, + number = 1, + pages = {1-23} +} + +@Article{symfft, + title= {Symmetric {FFT}s}, + author= {Paul N. Swarztrauber}, + journal= {Mathematics of Computation}, + volume= {47}, + number= {185}, + pages = {323-346}, + year = {1986} +} + +@Article{temperton83real, + author = {Clive Temperton}, + title = {Fast Mixed-Radix Real Fourier Transforms}, + journal = {Journal of Computational Physics}, + year = 1983, + volume = 52, + pages = {340-350} +} + +@Article{temperton85, + author = {Clive Temperton}, + title = {Implementation of a Self-Sorting In-Place Prime Factor {FFT} + Algorithm}, + journal = {Journal of Computational Physics}, + year = 1985, + volume = 58, + pages = {283-299} +} + +@Article{temperton83pfa, + author = {Clive Temperton}, + title = {A Note on Prime Factor {FFT} Algorithms}, + journal = {Journal of Computational Physics}, + year = 1983, + volume = 58, + pages = {198-204} +} + +@Article{burrus87real, + author = {Henrik V. Sorenson and Douglas L. Jones and Michael T. Heideman and C. Sidney Burrus}, + title = {Real-Valued Fast Fourier Transform Algorithms}, + journal = assp, + year = 1987, + volume = {ASSP-35}, + number = 6, + pages = {849-863} +} + +@Article{sorenson86, + author = {Henrik V. Sorenson and Michael T. Heideman and C. Sidney Burrus}, + title = {On Computing the Split-Radix {FFT} }, + journal = assp, + year = 1986, + volume = {ASSP-34}, + number = 1, + pages = {152-156} +} + +@Article{duhamel86, + author = {Pierre Duhamel}, + title = {Implementation of Split-Radix {FFT} Algorithms for Complex, Real, and Real-Symmetric Data}, + journal = assp, + year = 1986, + volume = {ASSP-34}, + number = 2, + pages = {285-295} +} + +@Article{visscher96, + author = {P. B. Visscher}, + title = {The {FFT}: Fourier Transforming One Bit at a Time}, + journal = {Computers in Physics}, + year = 1996, + volume = 10, + number = 5, + month = {Sep/Oct}, + pages = {438-443} +} + +@Article{uniyal94:_trans_real_value_sequen, + author = {P. R. Uniyal}, + title = {Transforming Real-Value Sequences: Fast Fourier versus Fast Hartley Tranform Algorithms}, + journal = {IEEE Transactions on Signal Processing}, + year = 1994, + volume = 42, + number = 11, + pages = {3249-3254 } +} + + + +@Article{duhamel90, + author = {P. Duhamel and M. Vetterli}, + title = {Fast Fourier Transforms: A Tutorial Review and A State of the Art}, + journal = {Signal Processing}, + year = 1990, + volume = 19, + pages = {259-299} +} + +@Article{rodriguez89, + author = {Jeffrey J. Rodriguez}, + title = {An Improved {FFT} Digit-Reversal Algorithm}, + journal = assp, + year = 1989, + volume = 37, + number = 8, + pages = {1298-1300} +} + +@Article{rosel89, + author = {Petr R\"osel}, + title = {Timing of some bit reversal algorithms}, + journal = {Signal Processing}, + year = 1989, + volume = 18, + pages = {425-433} +} + + +@Book{brigham74, + author = {E. Oran Brigham}, + title = {The Fast Fourier Transform}, + publisher = {Prentice Hall}, + year = 1974, + isbn = {0-13-307496-X} +} + + + + +@Book{elliott82, + author = {Douglas F. Elliott and K. Ramamohan Rao}, + title = {Fast transforms: algorithms, analyses, applications}, + publisher = {Academic Press}, + year = 1982, + note = {This book does not contain actual code, but covers the +more advanced mathematics and number theory needed in the derivation +of fast transforms.}, + isbn = {0-12-237080-5} +} + +@Article{raderprimes, + author = {Charles M. Rader}, + title = {Discrete Fourier Transform when the number of data + samples is prime}, + journal = {IEEE Proceedings}, + year = 1968, + volume = 56, + number = 6, + pages = {1107-1108} +} + +@Book{mcclellan79, + author = {James H. McClellan and Charles M. Rader}, + title = {Number Theory in Digital Signal Processing}, + publisher = {Prentice-Hall}, + year = 1979, + isbn = {ISBN 0-13-627349-1} +} + +@Book{burrus84, + author = {C. S. Burrus and T. W. Parks}, + title = {DFT/FFT and Convolution Algorithms}, + publisher = {Wiley}, + year = 1984, + isbn = {0-471-81932-8} +} + + + +@Book{smith95, + author = {Winthrop W. Smith and Joanne M. Smith}, + title = {Handbook of Real-Time Fast Fourier Transforms}, + publisher = {IEEE Press}, + year = 1995, + isbn = {0-7803-1091-8} +} + + +@Book{committee79, + title = {Programs for Digital Signal Processing}, + publisher = {IEEE Press}, + year = 1979, + editor = {Digital Signal Processing Committee and {IEEE Acoustics, +Speech, and Signal Processing Committee}}, + isbn = {0-87942-127-4 (pb) 0-87942-128-2 (hb)} +} + +@Book{blahut, + author = {Richard E. Blahut}, + title = {Fast Algorithms for Digital Signal Processing}, + publisher = {Addison-Wesley}, + year = 1984, + isbn = {0-201-10155-6} +} + +@Unpublished{burrus-note, + author = {C. S. Burrus}, + title = {Notes on the {FFT}}, + note = {Available from http://www-dsp.rice.edu/res/fft/fftnote.asc} +} + + +@Article{singleton, + author = {Richard C. Singleton}, + title = {An Algorithm for Computing the Mixed Radix Fast + Fourier Transform}, + journal = {IEEE Transactions on Audio and Electroacoustics}, + year = 1969, + volume = {AU-17}, + number = 2, + month = {June}, + pages = {93-103} +} + diff --git a/software/gsl-1.15/doc/fftalgorithms.tex b/software/gsl-1.15/doc/fftalgorithms.tex new file mode 100644 index 000000000..6e464ab39 --- /dev/null +++ b/software/gsl-1.15/doc/fftalgorithms.tex @@ -0,0 +1,3296 @@ +\documentclass[fleqn,12pt]{article} +% +\setlength{\oddsidemargin}{-0.25in} +\setlength{\textwidth}{7.0in} +\setlength{\topmargin}{-0.25in} +\setlength{\textheight}{9.5in} +% +\usepackage{algorithmic} +\newenvironment{algorithm}{\begin{quote} %\vspace{1em} +\begin{algorithmic}\samepage}{\end{algorithmic} %\vspace{1em} +\end{quote}} +\newcommand{\Real}{\mathop{\mathrm{Re}}} +\newcommand{\Imag}{\mathop{\mathrm{Im}}} + +\begin{document} +\title{FFT Algorithms} +\author{Brian Gough, {\tt bjg@network-theory.co.uk}} +\date{May 1997} +\maketitle + +\section{Introduction} + +Fast Fourier Transforms (FFTs) are efficient algorithms for +calculating the discrete Fourier transform (DFT), +% +\begin{eqnarray} +h_a &=& \mathrm{DFT}(g_b) \\ + &=& \sum_{b=0}^{N-1} g_b \exp(-2\pi i a b /N) \qquad 0 \leq a \leq N-1\\ + &=& \sum_{b=0}^{N-1} g_b W_N^{ab} \qquad W_N= \exp(-2\pi i/N) +\end{eqnarray} +% +The DFT usually arises as an approximation to the continuous Fourier +transform when functions are sampled at discrete intervals in space or +time. The naive evaluation of the discrete Fourier transform is a +matrix-vector multiplication ${\mathbf W}\vec{g}$, and would take +$O(N^2)$ operations for $N$ data-points. The general principle of the +Fast Fourier Transform algorithms is to use a divide-and-conquer +strategy to factorize the matrix $W$ into smaller sub-matrices, +typically reducing the operation count to $O(N \sum f_i)$ if $N$ can +be factorized into smaller integers, $N=f_1 f_2 \dots f_n$. + +This chapter explains the algorithms used in the GSL FFT routines +and provides some information on how to extend them. To learn more about +the FFT you should read the review article {\em Fast Fourier +Transforms: A Tutorial Review and A State of the Art} by Duhamel and +Vetterli~\cite{duhamel90}. There are several introductory books on the +FFT with example programs, such as {\em The Fast Fourier Transform} by +Brigham~\cite{brigham74} and {\em DFT/FFT and Convolution Algorithms} +by Burrus and Parks~\cite{burrus84}. In 1979 the IEEE published a +compendium of carefully-reviewed Fortran FFT programs in {\em Programs +for Digital Signal Processing}~\cite{committee79} which is a useful +reference for implementations of many different FFT algorithms. If you +are interested in using DSPs then the {\em Handbook of Real-Time Fast +Fourier Transforms}~\cite{smith95} provides detailed information on +the algorithms and hardware needed to design, build and test DSP +applications. Many FFT algorithms rely on results from number theory. +These results are covered in the books {\em Fast transforms: +algorithms, analyses, applications}, by Elliott and +Rao~\cite{elliott82}, {\em Fast Algorithms for Digital Signal +Processing} by Blahut~\cite{blahut} and {\em Number Theory in Digital +Signal Processing} by McClellan and Rader~\cite{mcclellan79}. There is +also an annotated bibliography of papers on the FFT and related topics +by Burrus~\cite{burrus-note}. + +\section{Families of FFT algorithms} +% +There are two main families of FFT algorithms: the Cooley-Tukey +algorithm and the Prime Factor algorithm. These differ in the way they +map the full FFT into smaller sub-transforms. Of the Cooley-Tukey +algorithms there are two types of routine in common use: mixed-radix +(general-$N$) algorithms and radix-2 (power of 2) algorithms. Each +type of algorithm can be further classified by additional characteristics, +such as whether it operates in-place or uses additional scratch space, +whether its output is in a sorted or scrambled order, and whether it +uses decimation-in-time or -frequency iterations. + +Mixed-radix algorithms work by factorizing the data vector into +shorter lengths. These can then be transformed by small-$N$ FFTs. +Typical programs include FFTs for small prime factors, such as 2, 3, +5, \dots which are highly optimized. The small-$N$ FFT modules act as +building blocks and can be multiplied together to make longer +transforms. By combining a reasonable set of modules it is possible to +compute FFTs of many different lengths. If the small-$N$ modules are +supplemented by an $O(N^2)$ general-$N$ module then an FFT of any +length can be computed, in principle. Of course, any lengths which +contain large prime factors would perform only as $O(N^2)$. + +Radix-2 algorithms, or ``power of two'' algorithms, are simplified +versions of the mixed-radix algorithm. They are restricted to lengths +which are a power of two. The basic radix-2 FFT module only involves +addition and subtraction, so the algorithms are very simple. Radix-2 +algorithms have been the subject of much research into optimizing the +FFT. Many of the most efficient radix-2 routines are based on the +``split-radix'' algorithm. This is actually a hybrid which combines +the best parts of both radix-2 and radix-4 (``power of 4'') +algorithms~\cite{sorenson86,duhamel86}. + +The prime factor algorithm (PFA) is an alternative form of general-$N$ +algorithm based on a different way of recombining small-$N$ FFT +modules~\cite{temperton83pfa,temperton85}. It has a very simple indexing +scheme which makes it attractive. However it only works in the case +where all factors are mutually prime. This requirement makes it more +suitable as a specialized algorithm for given lengths. + + +\begin{subsection}{FFTs of prime lengths} +% + Large prime lengths cannot be handled efficiently by any of these +algorithms. However it may still possible to compute a DFT, by using +results from number theory. Rader showed that it is possible to +convert a length-$p$ FFT (where $p$ is prime) into a convolution of +length-($p-1$). There is a simple identity between the convolution of +length $N$ and the FFT of the same length, so if $p-1$ is easily +factorizable this allows the convolution to be computed efficiently +via the FFT. The idea is presented in the original paper by +Rader~\cite{raderprimes} (also reprinted in~\cite{mcclellan79}), but +for more details see the theoretical books mentioned earlier. +\end{subsection} + +%\subsection{In-place algorithms vs algorithms using scratch space} +%% +%For simple algorithms, such as the Radix-2 algorithms, the FFT can be +%performed in-place, without additional memory. For this to be possible +%the index calculations must be simple enough that the calculation of +%the result to be stored in index $k$ can be carried out at the same +%time as the data in $k$ is used, so that no temporary storage is +%needed. + +%The mixed-radix algorithm is too complicated for this. It requires an +%area of scratch space sufficient to hold intermediate copies of the +%input data. + +%\subsection{Self-sorting algorithms vs scrambling algorithms} +%% +%A self-sorting algorithm At each iteration of the FFT internal permutations are included +%which leave the final iteration in its natural order. + + +%The mixed-radix algorithm can be made self-sorting. The additional +%scratch space helps here, although it is in fact possible to design +%self-sorting algorithms which do not require scratch +%space. + + +%The in-place radix-2 algorithm is not self-sorting. The data is +%permuted, and transformed into bit-reversed order. Note that +%bit-reversal only refers to the order of the array, not the values for +%each index which are of course not changed. More precisely, the data +%stored in location $[b_n \dots b_2 b_1 b_0]$ is moved to location +%$[b_0 b_1 b_2 \dots b_n]$, where $b_0 \dots b_n$ are the raw bits of a +%given index. Placing the data in bit reversed order is easily done, +%using right shifts to extract the least significant bits of the index +%and left-shifts to feed them into a register for the bit-reversed +%location. Simple radix-2 FFT usually recompute the bit reverse +%ordering in the naive way for every call. For repeated calls it might +%be worthwhile to precompute the permutation and cache it. There are +%also more sophisticated algorithms which reduce the number of +%operations needed to perform bit-reversal~\cite{bit-reversal}. + + +%\begin{subsection}{Decimation-in-time (DIT) vs Decimation-in-Frequency (DIF)} + +%\end{subsection} + + +\subsection{Optimization} +% +There is no such thing as the single fastest FFT {\em algorithm}. FFT +algorithms involve a mixture of floating point calculations, integer +arithmetic and memory access. Each of these operations will have +different relative speeds on different platforms. The performance of +an algorithm is a function of the hardware it is implemented on. The +goal of optimization is thus to choose the algorithm best suited to +the characteristics of a given hardware platform. + +For example, the Winograd Fourier Transform (WFTA) is an algorithm +which is designed to reduce the number of floating point +multiplications in the FFT. However, it does this at the expense of +using many more additions and data transfers than other algorithms. +As a consequence the WFTA might be a good candidate algorithm for +machines where data transfers occupy a negligible time relative to +floating point arithmetic. However on most modern machines, where the +speed of data transfers is comparable to or slower than floating point +operations, it would be outperformed by an algorithm which used a +better mix of operations (i.e. more floating point operations but +fewer data transfers). + +For a study of this sort of effect in detail, comparing the different +algorithms on different platforms consult the paper {\it Effects of +Architecture Implementation on DFT Algorithm Performance} by Mehalic, +Rustan and Route~\cite{mehalic85}. The paper was written in the early +1980's and has data for super- and mini-computers which you are +unlikely to see today, except in a museum. However, the methodology is +still valid and it would be interesting to see similar results for +present day computers. + + +\section{FFT Concepts} +% +Factorization is the key principle of the mixed-radix FFT divide-and-conquer +strategy. If $N$ can be factorized into a product of $n_f$ integers, +% +\begin{equation} +N = f_1 f_2 ... f_{n_f} , +\end{equation} +% +then the FFT itself can be divided into smaller FFTs for each factor. +More precisely, an FFT of length $N$ can be broken up into, +% +\begin{quote} +\begin{tabular}{l} +$(N/f_1)$ FFTs of length $f_1$, \\ +$(N/f_2)$ FFTs of length $f_2$, \\ +\dots \\ +$(N/f_{n_f})$ FFTs of length $f_{n_f}$. +\end{tabular} +\end{quote} +% +The total number of operations for these sub-operations will be $O( +N(f_1 + f_2 + ... + f_{n_f}))$. When the factors of $N$ are all small +integers this will be substantially less than $O(N^2)$. For example, +when $N$ is a power of 2 an FFT of length $N=2^m$ can be reduced to $m +N/2$ FFTs of length 2, or $O(N\log_2 N)$ operations. Here is a +demonstration which shows this: + +We start with the full DFT, +% +\begin{eqnarray} +h_a &=& \sum_{b=0}^{N-1} g_b W_N^{ab} \qquad W_N=\exp(-2\pi i/N) +\end{eqnarray} +% +and split the sum into even and odd terms, +% +\begin{eqnarray} +\phantom{h_a} +% &=& \left(\sum_{b=0,2,4,\dots} + \sum_{b=1,3,5,\dots}\right) g_b W_N^{ab}\\ + &=& \sum_{b=0}^{N/2-1} g_{2b} W_N^{a(2b)} + + \sum_{b=0}^{N/2-1} g_{2b+1} W_N^{a(2b+1)}. +\end{eqnarray} +% +This converts the original DFT of length $N$ into two DFTs of length +$N/2$, +% +\begin{equation} +h_a = \sum_{b=0}^{N/2-1} g_{2b} W_{(N/2)}^{ab} + + W_N^a \sum_{b=0}^{N/2-1} g_{2b+1} W_{(N/2)}^{ab} +\end{equation} +% +The first term is a DFT of the even elements of $g$. The second term +is a DFT of the odd elements of $g$, premultiplied by an exponential +factor $W_N^k$ (known as a {\em twiddle factor}). +% +\begin{equation} +\mathrm{DFT}(h) = \mathrm{DFT}(g_{even}) + W_N^k \mathrm{DFT}(g_{odd}) +\end{equation} +% +By splitting the DFT into its even and odd parts we have reduced the +operation count from $N^2$ (for a DFT of length $N$) to $2 (N/2)^2$ +(for two DFTs of length $N/2$). The cost of the splitting is that we +need an additional $O(N)$ operations to multiply by the twiddle factor +$W_N^k$ and recombine the two sums. + +We can repeat the splitting procedure recursively $\log_2 N$ times +until the full DFT is reduced to DFTs of single terms. The DFT of a +single value is just the identity operation, which costs nothing. +However since $O(N)$ operations were needed at each stage to recombine +the even and odd parts the total number of operations to obtain the +full DFT is $O(N \log_2 N)$. If we had used a length which was a +product of factors $f_1$, $f_2$, $\dots$ we could have split the sum +in a similar way. First we would split terms corresponding to the +factor $f_1$, instead of the even and odd terms corresponding to a +factor of two. Then we would repeat this procedure for the subsequent +factors. This would lead to a final operation count of $O(N \sum +f_i)$. + +This procedure gives some motivation for why the number of operations +in a DFT can in principle be reduced from $O(N^2)$ to $O(N \sum f_i)$. +It does not give a good explanation of how to implement the algorithm +in practice which is what we shall do in the next section. + +\section{Radix-2 Algorithms} +% +For radix-2 FFTs it is natural to write array indices in binary form +because the length of the data is a power of two. This is nicely +explained in the article {\em The FFT: Fourier Transforming One Bit at +a Time} by P.B. Visscher~\cite{visscher96}. A binary representation +for indices is the key to deriving the simplest efficient radix-2 +algorithms. + +We can write an index $b$ ($0 \leq b < 2^{n-1}$) in binary +representation like this, +% +\begin{equation} +b = [b_{n-1} \dots b_1 b_0] = 2^{n-1}b_{n-1} + \dots + 2 b_1 + b_0 . +\end{equation} +% +Each of the $b_0, b_1, \dots, b_{n-1}$ are the bits (either 0 or 1) of +$b$. + +Using this notation the original definition of the DFT +can be rewritten as a sum over the bits of $b$, +% +\begin{equation} +h(a) = \sum_{b=0}^{N-1} g_b \exp(-2\pi i a b /N) +\end{equation} +% +to give an equivalent summation like this, +% +\begin{equation} +h([a_{n-1} \dots a_1 a_0]) = +\sum_{b_0=0}^{1} +\sum_{b_1=0}^{1} +\dots +\sum_{b_{n-1}=0}^{1} + g([b_{n-1} \dots b_1 b_0]) W_N^{ab} +\end{equation} +% +where the bits of $a$ are $a=[a_{n-1} \dots a_1 a_0]$. + +To reduce the number of operations in the sum we will use the +periodicity of the exponential term, +% +\begin{equation} +W_N^{x+N} = W_N^{x}. +\end{equation} +% +Most of the products $ab$ in $W_N^{ab}$ are greater than $N$. By +making use of this periodicity they can all be collapsed down into the +range $0\dots N-1$. This allows us to reduce the number of operations +by combining common terms, modulo $N$. Using this idea we can derive +decimation-in-time or decimation-in-frequency algorithms, depending on +how we break the DFT summation down into common terms. We'll first +consider the decimation-in-time algorithm. + +\subsection{Radix-2 Decimation-in-Time (DIT)} +% +To derive the decimation-in-time algorithm we start by separating +out the most significant bit of the index $b$, +% +\begin{equation} +[b_{n-1} \dots b_1 b_0] = 2^{n-1}b_{n-1} + [b_{n-2} \dots b_1 b_0] +\end{equation} +% +Now we can evaluate the innermost sum of the DFT without any +dependence on the remaining bits of $b$ in the exponential, +% +\begin{eqnarray} +h([a_{n-1} \dots a_1 a_0]) &=& +\sum_{b_0=0}^{1} +\sum_{b_1=0}^{1} +\dots +\sum_{b_{n-1}=0}^{1} + g(b) +W_N^{a(2^{n-1}b_{n-1}+[b_{n-2} \dots b_1 b_0])} \\ + &=& +\sum_{b_0=0}^{1} +\sum_{b_1=0}^{1} +\dots +\sum_{b_{n-2}=0}^{1} +W_N^{a[b_{n-2} \dots b_1 b_0]} +\sum_{b_{n-1}=0}^{1} + g(b) +W_N^{a(2^{n-1}b_{n-1})} +\end{eqnarray} +% +Looking at the term $W_N^{a(2^{n-1}b_{n-1})}$ we see that we can also +remove most of the dependence on $a$ as well, by using the periodicity of the +exponential, +% +\begin{eqnarray} +W_N^{a(2^{n-1}b_{n-1})} &=& +\exp(-2\pi i [a_{n-1} \dots a_1 a_0] 2^{n-1} b_{n-1}/ 2^n )\\ +&=& \exp(-2\pi i [a_{n-1} \dots a_1 a_0] b_{n-1}/ 2 )\\ +&=& \exp(-2\pi i ( 2^{n-2}a_{n-1} + \dots + a_1 + (a_0/2)) b_{n-1} )\\ +&=& \exp(-2\pi i a_0 b_{n-1}/2 ) \\ +&=& W_2^{a_0 b_{n-1}} +\end{eqnarray} +% +Thus the innermost exponential term simplifies so that it only +involves the highest order bit of $b$ and the lowest order bit of $a$, +and the sum can be reduced to, +% +\begin{equation} +h([a_{n-1} \dots a_1 a_0]) += +\sum_{b_0=0}^{1} +\sum_{b_1=0}^{1} +\dots +\sum_{b_{n-2}=0}^{1} +W_N^{a[b_{n-2} \dots b_1 b_0]} +\sum_{b_{n-1}=0}^{1} + g(b) +W_2^{a_0 b_{n-1}}. +\end{equation} +% +We can repeat this this procedure for the next most significant bit of +$b$, $b_{n-2}$, using a similar identity, +% +\begin{eqnarray} +W_N^{a(2^{n-2}b_{n-2})} +&=& \exp(-2\pi i [a_{n-1} \dots a_1 a_0] 2^{n-2} b_{n-2}/ 2^n )\\ +&=& W_4^{ [a_1 a_0] b_{n-2}}. +\end{eqnarray} +% +to give a formula with even less dependence on the bits of $a$, +% +\begin{equation} +h([a_{n-1} \dots a_1 a_0]) += +\sum_{b_0=0}^{1} +\sum_{b_1=0}^{1} +\dots +\sum_{b_{n-3}=0}^{1} +W_N^{a[b_{n-3} \dots b_1 b_0]} +\sum_{b_{n-2}=0}^{1} +W_4^{[a_1 a_0] b_{n-2}} +\sum_{b_{n-1}=0}^{1} + g(b) +W_2^{a_0 b_{n-1}}. +\end{equation} +% +If we repeat the process for all the remaining bits we obtain a +simplified DFT formula which is the basis of the radix-2 +decimation-in-time algorithm, +% +\begin{eqnarray} +h([a_{n-1} \dots a_1 a_0]) &=& +\sum_{b_0=0}^{1} +W_{N}^{[a_{n-1} \dots a_1 a_0]b_0} +%\sum_{b_1=0}^{1} +%W_{N/2}^{[a_{n-1} \dots a_1 a_0]b_1} +\dots +\sum_{b_{n-2}=0}^{1} +W_4^{ [a_1 a_0] b_{n-2}} +\sum_{b_{n-1}=0}^{1} +W_2^{a_0 b_{n-1}} +g(b) +\end{eqnarray} +% +To convert the formula to an algorithm we expand out the sum +recursively, evaluating each of the intermediate summations, which we +denote by $g_1$, $g_2$, \dots, $g_n$, +% +\begin{eqnarray} +g_1(a_0, b_{n-2}, b_{n-3}, \dots, b_1, b_0) +&=& +\sum_{b_{n-1}=0}^{1} +W_2^{a_0 b_{n-1}} +g([b_{n-1} b_{n-2} b_{n-3} \dots b_1 b_0]) \\ +g_2(a_0, {}_{\phantom{-2}} a_{1}, b_{n-3}, \dots, b_1, b_0) +&=& +\sum_{b_{n-2}=0}^{1} +W_4^{[a_1 a_0] b_{n-2}} +g_1(a_0, b_{n-2}, b_{n-3}, \dots, b_1, b_0) \\ +g_3(a_0, {}_{\phantom{-2}} a_{1}, {}_{\phantom{-3}} a_{2}, \dots, b_1, b_0) +&=& +\sum_{b_{n-3}=0}^{1} +W_8^{[a_2 a_1 a_0] b_{n-2}} +g_2(a_0, a_1, b_{n-3}, \dots, b_1, b_0) \\ +\dots &=& \dots \\ +g_n(a_0, a_{1}, a_{2}, \dots, a_{n-2}, a_{n-1}) +&=& +\sum_{b_{0}=0}^{1} +W_N^{[a_{n-1} \dots a_1 a_0]b_0} +g_{n-1}(a_0, a_1, a_2, \dots, a_{n-2}, b_0) +\end{eqnarray} +% +After the final sum, we can obtain the transform $h$ from $g_n$, +% +\begin{equation} +h([a_{n-1} \dots a_1 a_0]) += +g_n(a_0, a_1, \dots, a_{n-1}) +\end{equation} +% +Note that we left the storage arrangements of the intermediate sums +unspecified by using the bits as function arguments and not as an +index. The storage of intermediate sums is different for the +decimation-in-time and decimation-in-frequency algorithms. + +Before deciding on the best storage scheme we'll show that the results +of each stage, $g_1$, $g_2$, \dots, can be carried out {\em +in-place}. For example, in the case of $g_1$, the inputs are, +% +\begin{equation} +g([\underline{b_{n-1}} b_{n-2} b_{n-3} \dots b_1 b_0]) +\end{equation} +% +for $b_{n-1}=(0,1)$, and the corresponding outputs are, +% +\begin{equation} +g_1(\underline{a_0},b_{n-2}, b_{n-3}, \dots, b_1, b_0) +\end{equation} +% +for $a_0=(0,1)$. It's clear that if we hold $b_{n-2}, b_{n-3}, \dots, +b_1, b_0$ fixed and compute the sum over $b_{n-1}$ in memory for both +values of $a_0 = 0,1$ then we can store the result for $a_0=0$ in the +location which originally had $b_0=0$ and the result for $a_0=1$ in +the location which originally had $b_0=1$. The two inputs and two +outputs are known as {\em dual node pairs}. At each stage of the +calculation the sums for each dual node pair are independent of the +others. It is this property which allows an in-place calculation. + +So for an in-place pass our storage has to be arranged so that the two +outputs $g_1(a_0,\dots)$ overwrite the two input terms +$g([b_{n-1},\dots])$. Note that the order of $a$ is reversed from the +natural order of $b$, i.e.@: the least significant bit of $a$ +replaces the most significant bit of $b$. This is inconvenient +because $a$ occurs in its natural order in all the exponentials, +$W^{ab}$. We could keep track of both $a$ and its bit-reverse, +$a^{\mathit bit-reversed}$ at all times but there is a neat trick +which avoids this: if we bit-reverse the order of the input data $g$ +before we start the calculation we can also bit-reverse the order of +$a$ when storing intermediate results. Since the storage involving $a$ +was originally in bit-reversed order the switch in the input $g$ now +allows us to use normal ordered storage for $a$, the same ordering +that occurs in the exponential factors. + +This is complicated to explain, so here is an example of the 4 passes +needed for an $N=16$ decimation-in-time FFT, with the initial data +stored in bit-reversed order, +% +\begin{eqnarray} +g_1([b_0 b_1 b_2 a_0]) +&=& +\sum_{b_3=0}^{1} W_2^{a_0 b_3} g([b_0 b_1 b_2 b_3]) +\\ +g_2([b_0 b_1 a_1 a_0]) +&=& +\sum_{b_2=0}^{1} W_4^{[a_1 a_0] b_2} g_1([b_0 b_1 b_2 a_0]) +\\ +g_3([b_0 a_2 a_1 a_0]) +&=& +\sum_{b_1=0}^{1} W_8^{[a_2 a_1 a_0] b_1} g_2([b_0 b_1 a_1 a_0]) +\\ +h(a) = g_4([a_3 a_2 a_1 a_0]) +&=& +\sum_{b_0=0}^{1} W_{16}^{[a_3 a_2 a_1 a_0] b_0} g_3([b_0 a_2 a_1 a_0]) +\end{eqnarray} +% +We compensate for the bit reversal of the input data by accessing $g$ +with the bit-reversed form of $b$ in the first stage. This ensures +that we are still carrying out the same calculation, using the same +data, and not accessing different values. Only single bits of $b$ ever +occur in the exponential so we never need the bit-reversed form of +$b$. + +Let's examine the third pass in detail, +% +\begin{equation} +g_3([b_0 a_2 a_1 a_0]) += +\sum_{b_1=0}^{1} W_8^{[a_2 a_1 a_0] b_1} g_2([b_0 b_1 a_1 a_0]) +\end{equation} +% +First note that only one bit, $b_1$, varies in each summation. The +other bits of $b$ ($b_0$) and of $a$ ($a_1 a_0$) are essentially +``spectators'' -- we must loop over all combinations of these bits and +carry out the same basic calculation for each, remembering to update +the exponentials involving $W_8$ appropriately. If we are storing the +results in-place (with $g_3$ overwriting $g_2$ we will need to compute +the sums involving $b_1=0,1$ and $a_2=0,1$ simultaneously. +% +\begin{equation} +\left( +\begin{array}{c} +g_3([b_0 0 a_1 a_0]) \vphantom{W_8^{[]}} \\ +g_3([b_0 1 a_1 a_0]) \vphantom{W_8^{[]}} +\end{array} +\right) += +\left( +\begin{array}{c} +g_2([b_0 0 a_1 a_0]) + W_8^{[0 a_1 a_0]} g_2([b_2 1 a_1 a_0]) \\ +g_2([b_0 0 a_1 a_0]) + W_8^{[1 a_1 a_0]} g_2([b_2 1 a_1 a_0]) +\end{array} +\right) +\end{equation} +% +We can write this in a more symmetric form by simplifying the exponential, +% +\begin{equation} +W_8^{[a_2 a_1 a_0]} += W_8^{4 a_2 + [a_1 a_0]} += (-1)^{a_2} W_8^{[a_1 a_0]} +\end{equation} +% +\begin{equation} +\left( +\begin{array}{c} +g_3([b_0 0 a_1 a_0]) \vphantom{W_8^{[]}} \\ +g_3([b_0 1 a_1 a_0]) \vphantom{W_8^{[]}} +\end{array} +\right) += +\left( +\begin{array}{c} +g_2([b_0 0 a_1 a_0]) + W_8^{[a_1 a_0]} g_2([b_2 1 a_1 a_0]) \\ +g_2([b_0 0 a_1 a_0]) - W_8^{[a_1 a_0]} g_2([b_2 1 a_1 a_0]) +\end{array} +\right) +\end{equation} +% +The exponentials $W_8^{[a_1 a_0]}$ are referred to as {\em twiddle +factors}. The form of this calculation, a symmetrical sum and +difference involving a twiddle factor is called {\em a butterfly}. +It is often shown diagrammatically, and in the case $b_0=a_0=a_1=0$ +would be drawn like this, +% +\begin{center} +\setlength{\unitlength}{1cm} +\begin{picture}(9,4) +% +%\put(0,0){\line(1,0){8}} +%\put(0,0){\line(0,1){4}} +%\put(8,4){\line(0,-1){4}} +%\put(8,4){\line(-1,0){8}} +% +\put(0,1){$g_2(4)$} \put(4.5,1){$g_3(4)=g_2(0) - W^a_8 g_2(4)$} +\put(0,3){$g_2(0)$} \put(4.5,3){$g_3(0)=g_2(0) + W^a_8 g_2(4)$} +\put(1,1){\vector(1,0){0.5}} +\put(1.5,1){\line(1,0){0.5}} +\put(1.5,0.5){$W^a_8$} +\put(1,3){\vector(1,0){0.5}}\put(1.5,3){\line(1,0){0.5}} +\put(2,1){\circle*{0.1}} +\put(2,3){\circle*{0.1}} +\put(2,1){\vector(1,1){2}} +\put(2,1){\vector(1,0){1}} +\put(3,1){\line(1,0){1}} +\put(3,0.5){$-1$} +\put(2,3){\vector(1,-1){2}} +\put(2,3){\vector(1,0){1}} +\put(3,3){\line(1,0){1}} +\put(4,1){\circle*{0.1}} +\put(4,3){\circle*{0.1}} +\end{picture} +\end{center} +% +The inputs are shown on the left and the outputs on the right. The +outputs are computed by multiplying the incoming lines by their +accompanying factors (shown next to the lines) and summing the results +at each node. + +In general, denoting the bit for dual-node pairs by $\Delta$ and the +remaining bits of $a$ and $b$ by ${\hat a}$ and ${\hat b}$, the +butterfly is, +% +\begin{equation} +\left( +\begin{array}{c} +g({\hat b} + {\hat a}) \\ +g({\hat b} + \Delta + {\hat a}) \\ +\end{array} +\right) +\leftarrow +\left( +\begin{array}{c} +g({\hat b} + {\hat a}) + W_{2\Delta}^{\hat a} g({\hat b} + \Delta + {\hat a})\\ +g({\hat b} + {\hat a}) - W_{2\Delta}^{\hat a} g({\hat b} + \Delta + {\hat a}) +\end{array} +\right) +\end{equation} +% +where ${\hat a}$ runs from $0 \dots \Delta-1$ and ${\hat b}$ runs +through $0 \times 2\Delta$, $1\times 2\Delta$, $\dots$, $(N/\Delta - +1)2\Delta$. The value of $\Delta$ is 1 on the first pass, 2 on the +second pass and $2^{n-1}$ on the $n$-th pass. Each pass requires +$N/2$ in-place computations, each involving two input locations and +two output locations. + +In the example above $\Delta = [100] = 4$, ${\hat a} = [a_1 a_0]$ and +${\hat b} = [b_0 0 0 0]$. + +This leads to the canonical radix-2 decimation-in-time FFT algorithm +for $2^n$ data points stored in the array $g(0) \dots g(2^n-1)$. +% +\begin{algorithm} +\STATE bit-reverse ordering of $g$ +\STATE {$\Delta \Leftarrow 1$} +\FOR {$\mbox{pass} = 1 \dots n$} + \STATE {$W \Leftarrow \exp(-2 \pi i / 2\Delta)$} + \FOR {$(a = 0 ; a < \Delta ; a{++})$} + \FOR{$(b = 0 ; b < N ; b {+=} 2*\Delta)$} + \STATE{$t_0 \Leftarrow g(b+a) + W^a g(b+\Delta+a)$} + \STATE{$t_1 \Leftarrow g(b+a) - W^a g(b+\Delta+a)$} + \STATE{$g(b+a) \Leftarrow t_0$} + \STATE{$g(b+\Delta+a) \Leftarrow t_1$} + \ENDFOR + \ENDFOR + \STATE{$\Delta \Leftarrow 2\Delta$} +\ENDFOR +\end{algorithm} +% +%This algorithm appears in Numerical Recipes as the routine {\tt +%four1}, where the implementation is attributed to N.M. Brenner. +% +\subsection{Details of the Implementation} +It is straightforward to implement a simple radix-2 decimation-in-time +routine from the algorithm above. Some optimizations can be made by +pulling the special case of $a=0$ out of the loop over $a$, to avoid +unnecessary multiplications when $W^a=1$, +% +\begin{algorithm} + \FOR{$(b = 0 ; b < N ; b {+=} 2*\Delta)$} + \STATE{$t_0 \Leftarrow g(b) + g(b+\Delta)$} + \STATE{$t_1 \Leftarrow g(b) - g(b+\Delta)$} + \STATE{$g(b) \Leftarrow t_0$} + \STATE{$g(b+\Delta) \Leftarrow t_1$} + \ENDFOR +\end{algorithm} +% +There are several algorithms for doing fast bit-reversal. We use the +Gold-Rader algorithm, which is simple and does not require any working +space, +% +\begin{algorithm} +\FOR{$i = 0 \dots n - 2$} + \STATE {$ k = n / 2 $} + \IF {$i < j$} + \STATE {swap $g(i)$ and $g(j)$} + \ENDIF + + \WHILE {$k \leq j$} + \STATE{$j \Leftarrow j - k$} + \STATE{$k \Leftarrow k / 2$} + \ENDWHILE + + \STATE{$j \Leftarrow j + k$} +\ENDFOR +\end{algorithm} +% +The Gold-Rader algorithm is typically twice as fast as a naive +bit-reversal algorithm (where the bit reversal is carried out by +left-shifts and right-shifts on the index). The library also has a +routine for the Rodriguez bit reversal algorithm, which also does not +require any working space~\cite{rodriguez89}. There are faster bit +reversal algorithms, but they all use additional scratch +space~\cite{rosel89}. + +Within the loop for $a$ we can compute $W^a$ using a trigonometric +recursion relation, +% +\begin{eqnarray} +W^{a+1} &=& W W^a \\ + &=& (\cos(2\pi/2\Delta) + i \sin(2\pi/2\Delta)) W^a +\end{eqnarray} +% +This requires only $2 \log_2 N$ trigonometric calls, to compute the +initial values of $\exp(2\pi i /2\Delta)$ for each pass. + +\subsection{Radix-2 Decimation-in-Frequency (DIF)} +% +To derive the decimation-in-frequency algorithm we start by separating +out the lowest order bit of the index $a$. Here is an example for the +decimation-in-frequency $N=16$ DFT. +% +\begin{eqnarray} +W_{16}^{[a_3 a_2 a_1 a_0][b_3 b_2 b_1 b_0]} +&=& +W_{16}^{[a_3 a_2 a_1 a_0][b_2 b_1 b_0]} W_{16}^{[a_3 a_2 a_1 a_0] [b_3 +0 0 0]} \\ +&=& +W_8^{[a_3 a_2 a_1][b_2 b_1 b_0]} W_{16}^{a_0 [b_2 b_1 b_0]} W_2^{a_0 +b_3} \\ +&=& +W_8^{[a_3 a_2 a_1][b_2 b_1 b_0]} W_{16}^{a_0 [b_2 b_1 b_0]} (-1)^{a_0 b_3} +\end{eqnarray} +% +By repeating the same type of the expansion on the term, +% +\begin{equation} +W_8^{[a_3 a_2 a_1][b_2 b_1 b_0]} +\end{equation} +% +we can reduce the transform to an alternative simple form, +% +\begin{equation} +h(a) = +\sum_{b_0=0}^1 (-1)^{a_3 b_0} W_4^{a_2 b_0} +\sum_{b_1=0}^1 (-1)^{a_2 b_1} W_8^{a_1 [b_1 b_0]} +\sum_{b_2=0}^1 (-1)^{a_1 b_2} W_{16}^{a_0 [b_2 b_1 b_0]} +\sum_{b_3=0}^1 (-1)^{a_0 b_3} g(b) +\end{equation} +% +To implement this we can again write the sum recursively. In this case +we do not have the problem of the order of $a$ being bit reversed -- +the calculation can be done in-place using the natural ordering of +$a$ and $b$, +% +\begin{eqnarray} +g_1([a_0 b_2 b_1 b_0]) +&=& +W_{16}^{a_0 [b_2 b_1 b_0]} +\sum_{b_3=0}^1 (-1)^{a_0 b_3} g([b_3 b_2 b_1 b_0]) \\ +g_2([a_0 a_1 b_1 b_0]) +&=& +W_{8}^{a_1 [b_1 b_0]} +\sum_{b_2=0}^1 (-1)^{a_1 b_2} g_1([a_0 b_2 b_1 b_0]) \\ +g_3([a_0 a_1 a_2 b_0]) +&=& +W_{4}^{a_2 b_0} +\sum_{b_1=0}^1 (-1)^{a_2 b_1} g_2([a_0 a_1 b_1 b_0]) \\ +h(a) += +g_4([a_0 a_1 a_2 a_3]) +&=& +\sum_{b_0=0}^1 (-1)^{a_3 b_0} g_3([a_0 a_1 a_2 b_0]) +\end{eqnarray} +% +The final pass leaves the data for $h(a)$ in bit-reversed order, but +this is easily fixed by a final bit-reversal of the ordering. + +The basic in-place calculation or butterfly for each pass is slightly +different from the decimation-in-time version, +% +\begin{equation} +\left( +\begin{array}{c} +g({\hat a} + {\hat b}) \\ +g({\hat a} + \Delta + {\hat b}) \\ +\end{array} +\right) +\leftarrow +\left( +\begin{array}{c} +g({\hat a} + {\hat b}) + g({\hat a} + \Delta + {\hat b})\\ +W_{\Delta}^{\hat b} +\left( g({\hat a} + {\hat b}) - g({\hat a} + \Delta + {\hat b}) \right) +\end{array} +\right) +\end{equation} +% +In each pass ${\hat b}$ runs from $0 \dots \Delta-1$ and ${\hat +a}$ runs from $0, 2\Delta, \dots, (N/\Delta -1) \Delta$. On the first +pass we start with $\Delta=16$, and on subsequent passes $\Delta$ takes +the values $8, 4, \dots, 1$. + +This leads to the canonical radix-2 decimation-in-frequency FFT +algorithm for $2^n$ data points stored in the array $g(0) \dots +g(2^n-1)$. +% +\begin{algorithm} +\STATE {$\Delta \Leftarrow 2^{n-1}$} +\FOR {$\mbox{pass} = 1 \dots n$} + \STATE {$W \Leftarrow \exp(-2 \pi i / 2\Delta)$} + \FOR {$(b = 0 ; b < \Delta ; b++)$} + \FOR{$(a = 0 ; a < N ; a += 2*\Delta)$} + \STATE{$t_0 \Leftarrow g(b+a) + g(a+\Delta+b)$} + \STATE{$t_1 \Leftarrow W^b \left( g(a+b) - g(a+\Delta+b) \right)$} + \STATE{$g(a+b) \Leftarrow t_0$} + \STATE{$g(a+\Delta+b) \Leftarrow t_1$} + \ENDFOR + \ENDFOR + \STATE{$\Delta \Leftarrow \Delta/2$} +\ENDFOR +\STATE bit-reverse ordering of $g$ +\end{algorithm} +% + +\section{Self-Sorting Mixed-Radix Complex FFTs} +% +This section is based on the review article {\em Self-sorting +Mixed-Radix Fast Fourier Transforms} by Clive +Temperton~\cite{temperton83}. You should consult his article for full +details of all the possible algorithms (there are many +variations). Here I have annotated the derivation of the simplest +mixed-radix decimation-in-frequency algorithm. + +For general-$N$ FFT algorithms the simple binary-notation of radix-2 +algorithms is no longer useful. The mixed-radix FFT has to be built +up using products of matrices acting on a data vector. The aim is to +take the full DFT matrix $W_N$ and factor it into a set of small, +sparse matrices corresponding to each factor of $N$. + + +We'll denote the components of matrices using either subscripts or +function notation, +% +\begin{equation} +M_{ij} = M(i,j) +\end{equation} +% +with (C-like) indices running from 0 to $N-1$. Matrix products will be +denoted using square brackets, +% +\begin{equation} +[AB]_{ij} = \sum_{k} A_{ik} B_{kj} +\end{equation} +% +% +Three special matrices will be needed in the mixed-radix factorization +of the DFT: the identity matrix, $I$, a permutation matrix, $P$ and a +matrix of twiddle factors, $D$, as well as the normal DFT matrices +$W_n$. + +We write the identity matrix of order $r$ as $I_r(n,m)$, +% +\begin{equation} +I_r(n,m) = \delta_{nm} +\end{equation} +% +for $0 \leq n,m \leq r-1$. + +We also need to define a permutation matrix $P^a_b$ that performs +digit reversal of the ordering of a vector. If the index of a vector +$j= 0\dots N-1$ is factorized into $j = la +m$, with $0 \leq l \leq +b-1$ and $0 \leq m \leq a-1$ then the operation of the matrix $P$ will +exchange positions $la+m$ and $mb+l$ in the vector (this sort of +digit-reversal is the generalization of bit-reversal to a number +system with exponents $a$ and $b$). + +In mathematical terms $P$ is a square matrix of size $ab \times ab$ +with the property, +% +\begin{eqnarray} +P^a_b(j,k) &=& 1 ~\mbox{if}~ j=ra+s ~\mbox{and}~ k=sb+r \\ + &=& 0 ~\mbox{otherwise} +\end{eqnarray} +% + +Finally the FFT algorithm needs a matrix of twiddle factors, $D^a_b$, +for the trigonometric sums. $D^a_b$ is a diagonal square matrix of +size $ab \times ab$ with the definition, +% +\begin{eqnarray} +D^a_b(j,k) &=& \omega^{sr}_{ab} ~\mbox{if}~ j=k=sb+r \\ + &=& 0 ~\mbox{otherwise} +\end{eqnarray} +% +where $\omega_{ab} = e^{-2\pi i/ab}$. + + +\subsection{The Kronecker Product} +The Kronecker matrix product plays an important role in all the +algorithms for combining operations on different subspaces. The +Kronecker product $A \otimes B$ of two square matrices $A$ and $B$, of +sizes $a \times a$ and $b \times b$ respectively, is a square matrix +of size $a b \times a b$, defined as, +% +\begin{equation} +[A \otimes B] (tb+u, rb+s) = A(t,r) B(u,s) +\end{equation} +% +where $0 \leq u,s < b$ and $0 \leq t,r < a$. Let's examine a specific +example. If we take a $2 \times 2$ matrix and a $3 +\times 3$ matrix, +% +\begin{equation} +\begin{array}{ll} +A = +\left( +\begin{array}{cc} +a_{11} & a_{12} \\ +a_{21} & a_{22} +\end{array} +\right) +& +B = +\left( +\begin{array}{ccc} +b_{11} & b_{12} & b_{13} \\ +b_{21} & b_{22} & b_{23} \\ +b_{31} & b_{32} & b_{33} +\end{array} +\right) +\end{array} +\end{equation} +% +then the Kronecker product $A \otimes B$ is, +% +\begin{eqnarray} +A \otimes B &= & +\left( +\begin{array}{cc} +a_{11} B & a_{12} B \\ +a_{12} B & a_{22} B +\end{array} +\right) \\ + &=& +\left( +\begin{array}{cccccc} +a_{11} b_{11} & a_{11} b_{12} & a_{11} b_{13} & + a_{12} b_{11} & a_{12} b_{12} & a_{12} b_{13} \\ +a_{11} b_{21} & a_{11} b_{22} & a_{11} b_{23} & + a_{12} b_{21} & a_{12} b_{22} & a_{12} b_{23} \\ +a_{11} b_{31} & a_{11} b_{32} & a_{11} b_{33} & + a_{12} b_{31} & a_{12} b_{32} & a_{12} b_{33} \\ +a_{21} b_{11} & a_{21} b_{12} & a_{21} b_{13} & + a_{22} b_{11} & a_{22} b_{12} & a_{22} b_{13} \\ +a_{21} b_{21} & a_{21} b_{22} & a_{21} b_{23} & + a_{22} b_{21} & a_{22} b_{22} & a_{22} b_{23} \\ +a_{21} b_{31} & a_{21} b_{32} & a_{21} b_{33} & + a_{22} b_{31} & a_{22} b_{32} & a_{22} b_{33} +\end{array} +\right) +\end{eqnarray} +% +When the Kronecker product $A \otimes B$ acts on a vector of length +$ab$, each matrix operates on a different subspace of the vector. +Writing the index $i$ as $i=t b + u$, with $0\leq u \leq b-1$ +and $0\leq t\leq a$, we can see this explicitly by looking at components, +% +\begin{eqnarray} +[(A \otimes B) v]_{(tb+u)} +& = & \sum_{t'=0}^{a-1} \sum_{u'=0}^{b-1} + [A \otimes B]_{(tb+u,t'b+u')} v_{t'b+u'} \\ +& = & \sum_{t'u'} A_{tt'} B_{uu'} v_{t'b+u'} +\end{eqnarray} +% +The matrix $B$ operates on the ``index'' $u'$, for all values of $t'$, and +the matrix $A$ operates on the ``index'' $t'$, for all values of $u'$. +% +The most important property needed for deriving the FFT factorization +is that the matrix product of two Kronecker products is the Kronecker +product of the two matrix products, +% +\begin{equation} +(A \otimes B)(C \otimes D) = (AC \otimes BD) +\end{equation} +% +This follows straightforwardly from the original definition of the +Kronecker product. + +\subsection{Two factor case, $N=ab$} +% +First consider the simplest possibility, where the data length $N$ can +be divided into two factors, $N=ab$. The aim is to reduce the DFT +matrix $W_N$ into simpler matrices corresponding to each factor. To +make the derivation easier we will start from the known factorization +and verify it (the initial factorization can be guessed by +generalizing from simple cases). Here is the factorization we are +going to prove, +% +\begin{equation} +W_{ab} = (W_b \otimes I_a) P^a_b D^a_b (W_a \otimes I_b). +\end{equation} +% +We can check it by expanding the product into components, +% +\begin{eqnarray} +\lefteqn{[(W_b \otimes I_a) P^a_b D^a_b (W_a \otimes I_b)](la+m,rb+s)} \\ +& = & +\sum_{u=0}^{b-1} \sum_{t=0}^{a-1} +[(W_b \otimes I_a)](la+m,ua+t) [P^a_b D^a_b (W_a \otimes I_b)](ua+t,rb+s) +\end{eqnarray} +% +where we have split the indices to match the Kronecker product $0 \leq +m, r \leq a$, $0 \leq l, s \leq b$. The first term in the sum can +easily be reduced to its component form, +% +\begin{eqnarray} +[(W_b \otimes I_a)](la+m,ua+t) +&=& W_b(l,u) I_a(m,t) \\ +&=& \omega_b^{lu} \delta_{mt} +\end{eqnarray} +% +The second term is more complicated. We can expand the Kronecker +product like this, +\begin{eqnarray} +(W_a \otimes I_b)(tb+u,rb+s) +&=& W_a(t,r) I_a(u,s) \\ +&=& \omega_a^{tr} \delta_{us} +\end{eqnarray} +% +and use this term to build up the product, $P^a_b D^a_b (W_a \otimes +I_b)$. We first multiply by $D^a_b$, +% +\begin{equation} +[D^a_b (W_a \otimes I_b)](tb+u,rb+s) += +\omega^{tu}_{ab} \omega^{tr}_{a} \delta_{su} +\end{equation} +% +and then apply the permutation matrix, $P^a_b$, which digit-reverses +the ordering of the first index, to obtain, +% +\begin{equation} +[P^a_b D^a_b (W_a \otimes I_b)](ua+t,rb+s) += +\omega^{tu}_{ab} \omega^{tr}_{a} \delta_{su} +\end{equation} +% +Combining the two terms in the matrix product we can obtain the full +expansion in terms of the exponential $\omega$, +% +\begin{eqnarray} +[(W_b \otimes I_a) P^a_b D^a_b (W_a \otimes I_b)](la+m,rb+s) +&=& +\sum_{u=0}^{b-1} \sum_{t=0}^{a-1} +\omega_b^{lu} \delta_{mt} \omega^{tu}_{ab} \omega^{tr}_{a} \delta_{su} +\end{eqnarray} +% +If we evaluate this sum explicitly we can make the connection between +the product involving $W_a$ and $W_b$ (above) and the expansion of the +full DFT matrix $W_{ab}$, +% +\begin{eqnarray} +\sum_{u=0}^{b-1} \sum_{t=0}^{a-1} +\omega_b^{lu} \delta_{mt} \omega^{tu}_{ab} \omega^{tr}_{a} \delta_{su} +&=& \omega^{ls}_b \omega^{ms}_{ab} \omega^{mr}_a \\ +&=& \omega^{als + ms +bmr}_{ab} \\ +&=& \omega^{als + ms +bmr}_{ab} \omega^{lrab}_{ab} \quad\mbox{using~} \omega^{ab}_{ab} =1\\ +&=& \omega^{(la+m)(rb+s)}_{ab} \\ +&=& W_{ab}(la+m,rb+s) +\end{eqnarray} +% +The final line shows that matrix product given above is identical to +the full two-factor DFT matrix, $W_{ab}$. +% +Thus the full DFT matrix $W_{ab}$ for two factors $a$, $b$ can be +broken down into a product of sub-transforms, $W_a$ and $W_b$, plus +permutations, $P$, and twiddle factors, $D$, according to the formula, +% +\begin{equation} +W_{ab} = (W_b \otimes I_a) P^a_b D^a_b (W_a \otimes I_b). +\end{equation} +% +This relation is the foundation of the general-$N$ mixed-radix FFT algorithm. + +\subsection{Three factor case, $N=abc$} +% +The result for the two-factor expansion can easily be generalized to +three factors. We first consider $abc$ as being a product of two +factors $a$ and $(bc)$, and then further expand the product $(bc)$ into +$b$ and $c$. The first step of the expansion looks like this, +% +\begin{eqnarray} +W_{abc} &=& W_{a(bc)}\\ +&=& (W_{bc} \otimes I_a) P^a_{bc} D^a_{bc} (W_a \otimes I_{bc}) . +\end{eqnarray} +% +And after using the two-factor result to expand out $W_{bc}$ we obtain +the factorization of $W_{abc}$, +% +\begin{eqnarray} +W_{abc} &=& (((W_c \otimes I_b) P^b_c D^b_c (W_b \otimes I_c)) \otimes I_a ) +P^a_{bc} D^a_{bc} (W_a \otimes I_{bc}) \\ +&=& (W_c \otimes I_{ab}) (P^b_c D^b_c \otimes I_a) (W_b \otimes I_{ac}) P^a_{bc} D^a_{bc} (W_a \otimes I_c) +\end{eqnarray} +% +We can write this factorization in a product form, with one term for +each factor, +% +\begin{equation} +W_{abc} = T_3 T_2 T_1 +\end{equation} +% +where we read off $T_1$, $T_2$ and $T_3$, +% +\begin{eqnarray} +T_1 &=& P^a_{bc} D^a_{bc} (W_a \otimes I_{bc}) \\ +T_2 &=& (P^b_c D^b_c \otimes I_a) (W_b \otimes I_{ac}) \\ +T_3 &=& (W_c \otimes I_{ab} ) +\end{eqnarray} +% + + +\subsection{General case, $N=f_1 f_2 \dots f_{n_f}$} +% +If we continue the procedure that we have used for two- and +three-factors then a general pattern begins to emerge in the +factorization of $W_{f_1 f_2 \dots f_{n_f}}$. To see the beginning of +the pattern we can rewrite the three factor case as, +% +\begin{eqnarray} +T_1 &=& (P^a_{bc} D^a_{bc} \otimes I_1) (W_a \otimes I_{bc}) \\ +T_2 &=& (P^b_c D^b_c \otimes I_a) (W_b \otimes I_{ac}) \\ +T_3 &=& (P^c_1 D^c_1 \otimes I_{ab}) (W_c \otimes I_{ab} ) +\end{eqnarray} +% +using the special cases $P^c_1 = D^c_1 = I_c$. +% +In general, we can write the factorization of $W_N$ for $N= f_1 f_2 +\dots f_{n_f}$ as, +% +\begin{equation} +W_N = T_{n_f} \dots T_2 T_1 +\end{equation} +% +where the matrix factors $T_i$ are, +% +\begin{equation} +T_i = (P^{f_i}_{q_i} D^{f_i}_{q_i} \otimes I_{p_{i-1}}) ( W_{f_i} +\otimes I_{m_i}) +\end{equation} +% +We have defined the following three additional variables $p$, $q$ and +$m$ to denote different partial products of the factors, +% +\begin{eqnarray} +p_i &=& f_1 f_2 \dots f_i \quad (p_0 = 1) \\ +q_i &=& N / p_i \\ +m_i &=& N / f_i +\end{eqnarray} +% +Note that the FFT modules $W$ are applied before the permutations $P$, +which makes this a decimation-in-frequency algorithm. + +\subsection{Implementation} +% +Now to the implementation of the algorithm. We start with a vector of +data, $z$, as input and want to apply the transform, +% +\begin{eqnarray} +x &=& W_N z \\ + &=& T_{n_f} \dots T_2 T_1 z +\end{eqnarray} +% +where $T_i = (P^{f_i}_{q_i} D^{f_i}_{q_i} \otimes I_{p_{i-1}}) ( +W_{f_i} \otimes I_{m_i})$. + +The outer structure of the implementation will be a loop over the +$n_f$ factors, applying each matrix $T_i$ to the vector in turn to +build up the complete transform. +% +\begin{algorithm} +\FOR{$(i = 1 \dots n_f)$} + \STATE{$v \Leftarrow T_i v $} +\ENDFOR +\end{algorithm} +% +The order of the factors is not important. Now we examine the iteration +$v \Leftarrow T_i v$, which we'll write as, +% +\begin{equation} +v' = +(P^{f_i}_{q_i} D^{f_i}_{q_i} \otimes I_{p_{i-1}}) ~ +( W_{f_i} \otimes I_{m_i}) v +\end{equation} +% +There are two Kronecker product matrices in this iteration. The +rightmost matrix, which is the first to be applied, is a DFT of length +$f_i$ applied to $N/f_i$ subsets of the data. We'll call this $t$, +since it will be a temporary array, +% +\begin{equation} +t = (W_{f_i} \otimes I_{m_i}) v +\end{equation} +% +The second matrix applies a permutation and the exponential +twiddle-factors. We'll call this $v'$, since it is the result of the +full iteration on $v$, +% +\begin{equation} +v' = (P^{f_i}_{q_i} D^{f_i}_{q_i} \otimes I_{p_{i-1}}) t +\end{equation} + +The effect of the matrix $(W_{f_i} \otimes I_{m_i})$ is best seen by +an example. Suppose the factor is $f_i = 3$, and the length of the FFT +is $N=6$, then the relevant Kronecker product is, +% +\begin{equation} +t = (W_3 \otimes I_2) v +\end{equation} +% +which expands out to, +% +\begin{equation} +\left( +\begin{array}{c} +t_0 \\ +t_1 \\ +t_2 \\ +t_3 \\ +t_4 \\ +t_5 +\end{array} +\right) += +\left( +\begin{array}{cccccc} +W_3(1,1) & 0 & W_3(1,2) & 0 & W_3(1,3) & 0 \\ +0 & W_3(1,1) & 0 & W_3(1,2) & 0 & W_3(1,3) \\ +W_3(2,1) & 0 & W_3(2,2) & 0 & W_3(2,3) & 0 \\ +0 & W_3(2,1) & 0 & W_3(2,2) & 0 & W_3(2,3) \\ +W_3(3,1) & 0 & W_3(3,2) & 0 & W_3(3,3) & 0 \\ +0 & W_3(3,1) & 0 & W_3(3,2) & 0 & W_3(3,3) +\end{array} +\right) +\left( +\begin{array}{c} +v_0 \\ +v_1 \\ +v_2 \\ +v_3 \\ +v_4 \\ +v_5 +\end{array} +\right) +\end{equation} +% +We can rearrange the components in a computationally convenient form, +\begin{equation} +\left( +\begin{array}{c} +t_0 \\ +t_2 \\ +t_4 \\ +t_1 \\ +t_3 \\ +t_5 +\end{array} +\right) += +\left( +\begin{array}{cccccc} +W_3(1,1) & W_3(1,2) & W_3(1,3) & 0 & 0 & 0 \\ +W_3(2,1) & W_3(2,2) & W_3(2,3) & 0 & 0 & 0 \\ +W_3(3,1) & W_3(3,2) & W_3(3,3) & 0 & 0 & 0 \\ +0 & 0 & 0 & W_3(1,1) & W_3(1,2) & W_3(1,3) \\ +0 & 0 & 0 & W_3(2,1) & W_3(2,2) & W_3(2,3) \\ +0 & 0 & 0 & W_3(3,1) & W_3(3,2) & W_3(3,3) +\end{array} +\right) +\left( +\begin{array}{c} +v_0 \\ +v_2 \\ +v_4 \\ +v_1 \\ +v_3 \\ +v_5 +\end{array} +\right) +\end{equation} +% +which clearly shows that we just need to apply the $3\times 3$ DFT +matrix $W_3$ twice, once to the sub-vector of elements $(v_0, v_2, v_4)$, +and independently to the remaining sub-vector $(v_1, v_3, v_5)$. + +In the general case, if we index $t$ as $t_k = t(\lambda,\mu) = +t_{\lambda m + \mu}$ then $\lambda = 0 \dots f-1$ is an index within +each transform of length $f$ and $\mu = 0 \dots m-1$ labels the +independent subsets of data. We can see this by showing the +calculation with all indices present, +% +\begin{equation} +t = (W_f \otimes I_m) z +\end{equation} +% +becomes, +% +\begin{eqnarray} +t_{\lambda m + \mu} &=& \sum_{\lambda'=0}^{f-1} \sum_{\mu'=0}^{m-1} + (W_f \otimes I_m)_{(\lambda m + \mu)(\lambda' m + \mu')} + z_{\lambda'm + \mu} \\ +&=& \sum_{\lambda'\mu'} (W_f)_{\lambda\lambda'} \delta_{\mu\mu'} + z_{\lambda'm+\mu'} \\ +&=& \sum_{\lambda'} (W_f)_{\lambda\lambda'} z_{\lambda'm+\mu} +\end{eqnarray} +% +The DFTs on the index $\lambda$ will be computed using +special optimized modules for each $f$. + +To calculate the next stage, +% +\begin{equation} +v'=(P^f_q D^f_q \otimes I_{p_{i-1}}) t +\end{equation} +% +we note that the Kronecker product has the property of performing +$p_{i-1}$ independent multiplications of $PD$ on $q_{i-1}$ different +subsets of $t$. The index $\mu$ of $t(\lambda,\mu)$ which runs from 0 +to $m$ will include $q_i$ copies of each $PD$ operation because +$m=p_{i-1}q$, i.e.@: we can split the index $\mu$ further into $\mu = a +p_{i-1} + b$, where $a = 0 \dots q-1$ and $b=0 \dots p_{i-1}$, +% +\begin{eqnarray} +\lambda m + \mu &=& \lambda m + a p_{i-1} + b \\ + &=& (\lambda q + a) p_{i-1} + b. +\end{eqnarray} +% +Now we can expand the second stage, +% +\begin{eqnarray} +v'&=& (P^f_q D^f_q \otimes I_{p_{i-1}}) t \\ +v'_{\lambda m + \mu} &=& \sum_{\lambda' \mu'} + (P^f_q D^f_q \otimes I_{p_{i-1}})_{(\lambda m + \mu)(\lambda' m + \mu')} + t_{\lambda' m + \mu'} \\ +v'_{(\lambda q + a) p_{i-1} + b} &=& \sum_{\lambda' a' b'} +( +P^f_q D^f_q \otimes I_{p_{i-1}} +)_{((\lambda q+ a)p_{i-1} + b)((\lambda' q+ a')p_{i-1} + b')} +t_{(\lambda' q + a')p_{i-1} +b'} +\end{eqnarray} +% +The first step in removing redundant indices is to take advantage of +the identity matrix $I$ and separate the subspaces of the Kronecker +product, +% +\begin{equation} +( +P^f_q D^f_q \otimes I_{p_{i-1}} +)_{((\lambda q+ a)p_{i-1} + b)((\lambda' q+ a')p_{i-1} + b')} += +(P^f_q D^f_q)_{(\lambda q + a)(\lambda' q + a')} +\delta_{bb'} +\end{equation} +% +This eliminates one sum, leaving us with, +% +\begin{equation} +v'_{(\lambda q + a) p_{i-1} + b} += +\sum_{\lambda' a' } +(P^f_q D^f_q)_{(\lambda q + a)(\lambda' q + a')} t_{(\lambda'q+a')p_{i-1} + b} +\end{equation} +% +We can insert the definition of $D^f_q$ to give, +% +\begin{equation} +\phantom{v'_{(\lambda q + a) p_{i-1} + b}} += \sum_{\lambda'a'} (P^f_q)_{(\lambda q + a)(\lambda'q + a')} +\omega^{\lambda'a'}_{q_{i-1}} t_{(\lambda'q+a')p_{i-1}+b} +\end{equation} +% +Using the definition of $P^f_q$, which exchanges an index of $\lambda +q + a$ with $a f + \lambda$, we get a final result with no matrix +multiplication, +% +\begin{equation} +v'_{(a f + \lambda) p_{i-1} + b} += \omega^{\lambda a}_{q_{i-1}} t_{(\lambda q + a)p_{i-1} + b} +\end{equation} +% +All we have to do is premultiply each element of the temporary vector +$t$ by an exponential twiddle factor and store the result in another +index location, according to the digit reversal permutation of $P$. + +Here is the algorithm to implement the mixed-radix FFT, +% +\begin{algorithm} +\FOR{$i = 1 \dots n_f$} +\FOR{$a = 0 \dots q-1$} +\FOR{$b = 0 \dots p_{i-1} - 1$} +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$t_\lambda \Leftarrow + \sum_{\lambda'=0}^{f-1} W_f(\lambda,\lambda') v_{b+\lambda'm+ap_{i-1}}$} + \COMMENT{DFT matrix-multiply module} +\ENDFOR +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$v'_{(af+\lambda)p_{i-1}+b} + \Leftarrow \omega^{\lambda a}_{q_{i-1}} t_\lambda$} +\ENDFOR +\ENDFOR +\ENDFOR +\STATE{$v \Leftarrow v'$} +\ENDFOR +\end{algorithm} +% +\subsection{Details of the implementation} +% +First the function {\tt gsl\_fft\_complex\_wavetable\_alloc} allocates +$n$ elements of scratch space (to hold the vector $v'$ for each +iteration) and $n$ elements for a trigonometric lookup table of +twiddle factors. + +Then the length $n$ must be factorized. There is a general +factorization function {\tt gsl\_fft\_factorize} which takes a list of +preferred factors. It first factors out the preferred factors and then +removes general remaining prime factors. + +The algorithm used to generate the trigonometric lookup table is +% +\begin{algorithm} +\FOR {$a = 1 \dots n_f$} +\FOR {$b = 1 \dots f_i - 1$} +\FOR {$c = 1 \dots q_i$} +\STATE $\mbox{trig[k++]} = \exp(- 2\pi i b c p_{a-1}/N)$ +\ENDFOR +\ENDFOR +\ENDFOR +\end{algorithm} +% +Note that $\sum_{1}^{n_f} \sum_{0}^{f_i-1} \sum_{1}^{q_i} = +\sum_{1}^{n_f} (f_i-1)q_i = n - 1$ so $n$ elements are always +sufficient to store the lookup table. This is chosen because we need +to compute $\omega_{q_i-1}^{\lambda a} t_\lambda$ in +the FFT. In terms of the lookup table we can write this as, +% +\begin{eqnarray} +\omega_{q_{i-1}}^{\lambda a} t_\lambda +&=& \exp(-2\pi i \lambda a/q_{i-1}) t_\lambda \\ +&=& \exp(-2\pi i \lambda a p_{i-1}/N) t_\lambda \\ +&=& \left\{ + \begin{array}{ll} + t_\lambda & a=0 \\ + \mbox{trig}[\mbox{twiddle[i]}+\lambda q+(a-1)] t_\lambda & a\not=0 +\end{array} +\right. +\end{eqnarray} +% +\begin{sloppypar} +\noindent +The array {\tt twiddle[i]} maintains a set of pointers into {\tt trig} +for the starting points for the outer loop. The core of the +implementation is {\tt gsl\_fft\_complex}. This function loops over +the chosen factors of $N$, computing the iteration $v'=T_i v$ for each +pass. When the DFT for a factor is implemented the iteration is +handed-off to a dedicated small-$N$ module, such as {\tt +gsl\_fft\_complex\_pass\_3} or {\tt +gsl\_fft\_complex\_pass\_5}. Unimplemented factors are handled +by the general-$N$ routine {\tt gsl\_fft\_complex\_pass\_n}. The +structure of one of the small-$N$ modules is a simple transcription of +the basic algorithm given above. Here is an example for {\tt +gsl\_fft\_complex\_pass\_3}. For a pass with a factor of 3 we have to +calculate the following expression, +\end{sloppypar}% +\begin{equation} +v'_{(a f + \lambda) p_{i-1} + b} += +\sum_{\lambda' = 0,1,2} +\omega^{\lambda a}_{q_{i-1}} W^{\lambda \lambda'}_{3} +v_{b + \lambda' m + a p_{i-1}} +\end{equation} +% +for $b = 0 \dots p_{i-1} - 1$, $a = 0 \dots q_{i} - 1$ and $\lambda = +0, 1, 2$. This is implemented as, +% +\begin{algorithm} +\FOR {$a = 0 \dots q-1$} +\FOR {$b = 0 \dots p_{i-1} - 1$} +\STATE {$ + \left( + \begin{array}{c} + t_0 \\ t_1 \\ t_2 + \end{array} + \right) + = + \left( + \begin{array}{ccc} + W^{0}_3 & W^{0}_3 & W^{0}_3 \\ + W^{0}_3 & W^{1}_3 & W^{2}_3 \\ + W^{0}_3 & W^{2}_3 & W^{4}_3 + \end{array} + \right) + \left( + \begin{array}{l} + v_{b + a p_{i-1}} \\ + v_{b + a p_{i-1} + m} \\ + v_{b + a p_{i-1} +2m} + \end{array} + \right)$} + \STATE {$ v'_{a p_{i} + b} = t_0$} + \STATE {$ v'_{a p_{i} + b + p_{i-1}} = \omega^{a}_{q_{i-1}} t_1$} + \STATE {$ v'_{a p_{i} + b + 2 p_{i-1}} = \omega^{2a}_{q_{i-1}} t_2$} +\ENDFOR +\ENDFOR +\end{algorithm} +% +In the code we use the variables {\tt from0}, {\tt from1}, {\tt from2} +to index the input locations, +% +\begin{eqnarray} +\mbox{\tt from0} &=& b + a p_{i-1} \\ +\mbox{\tt from1} &=& b + a p_{i-1} + m \\ +\mbox{\tt from2} &=& b + a p_{i-1} + 2m +\end{eqnarray} +% +and the variables {\tt to0}, {\tt to1}, {\tt to2} to index the output +locations in the scratch vector $v'$, +% +\begin{eqnarray} +\mbox{\tt to0} &=& b + a p_{i} \\ +\mbox{\tt to1} &=& b + a p_{i} + p_{i-1} \\ +\mbox{\tt to2} &=& b + a p_{i} + 2 p_{i-1} +\end{eqnarray} +% +The DFT matrix multiplication is computed using the optimized +sub-transform modules given in the next section. The twiddle factors +$\omega^a_{q_{i-1}}$ are taken out of the {\tt trig} array. + +To compute the inverse transform we go back to the definition of the +Fourier transform and note that the inverse matrix is just the complex +conjugate of the forward matrix (with a factor of $1/N$), +% +\begin{equation} +W^{-1}_N = W^*_N / N +\end{equation} +% +Therefore we can easily compute the inverse transform by conjugating +all the complex elements of the DFT matrices and twiddle factors that +we apply. (An alternative strategy is to conjugate the input data, +take a forward transform, and then conjugate the output data). + +\section{Fast Sub-transform Modules} +% +To implement the mixed-radix FFT we still need to compute the +small-$N$ DFTs for each factor. Fortunately many highly-optimized +small-$N$ modules are available, following the work of Winograd who +showed how to derive efficient small-$N$ sub-transforms by number +theoretic techniques. + +The algorithms in this section all compute, +% +\begin{equation} +x_a = \sum_{b=0}^{N-1} W_N^{ab} z_b +\end{equation} +% +The sub-transforms given here are the ones recommended by Temperton +and differ slightly from the canonical Winograd modules. According to +Temperton~\cite{temperton83} they are slightly more robust against +rounding errors and trade off some additions for multiplications. +% +For the $N=2$ DFT, +% +\begin{equation} +\begin{array}{ll} +x_0 = z_0 + z_1, & +x_1 = z_0 - z_1. +\end{array} +\end{equation} +% +For the $N=3$ DFT, +% +\begin{equation} +\begin{array}{lll} +t_1 = z_1 + z_2, & +t_2 = z_0 - t_1/2, & +t_3 = \sin(\pi/3) (z_1 - z_2), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +x_0 = z_0 + t_1, & +x_1 = t_2 + i t_3, & +x_2 = t_2 - i t_3. +\end{array} +\end{equation} +% +The $N=4$ transform involves only additions and subtractions, +% +\begin{equation} +\begin{array}{llll} +t_1 = z_0 + z_2, & +t_2 = z_1 + z_3, & +t_3 = z_0 - z_2, & +t_4 = z_1 - z_3, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +x_0 = t_1 + t_2, & +x_1 = t_3 + i t_4, & +x_2 = t_1 - t_2, & +x_3 = t_3 - i t_4. +\end{array} +\end{equation} +% +For the $N=5$ DFT, +% +\begin{equation} +\begin{array}{llll} +t_1 = z_1 + z_4, & +t_2 = z_2 + z_3, & +t_3 = z_1 - z_4, & +t_4 = z_2 - z_3, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +t_5 = t_1 + t_2, & +t_6 = (\sqrt{5}/4) (t_1 - t_2), & +t_7 = z_0 - t_5/4, \\ +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +t_8 = t_7 + t_6, & +t_9 = t_7 - t_6, \\ +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +t_{10} = \sin(2\pi/5) t_3 + \sin(2\pi/10) t_4, & +t_{11} = \sin(2\pi/10) t_3 - \sin(2\pi/5) t_4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +x_0 = z_0 + t_5, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +x_1 = t_8 + i t_{10}, & +x_2 = t_9 + i t_{11}, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{llll} +x_3 = t_9 - i t_{11}, & +x_4 = t_8 - i t_{10}. +\end{array} +\end{equation} +% +The DFT matrix for $N=6$ can be written as a combination of $N=3$ and +$N=2$ transforms with index permutations, +% +\begin{equation} +\left( +\begin{array}{c} +x_0 \\ +x_4 \\ +x_2 \\ +\hline x_3 \\ +x_1 \\ +x_5 +\end{array} +\right) += +\left( +\begin{array}{ccc|ccc} + & & & & & \\ + &W_3& & &W_3& \\ + & & & & & \\ +\hline & & & & & \\ + &W_3& & &-W_3& \\ + & & & & & +\end{array} +\right) +\left( +\begin{array}{c} +z_0 \\ +z_2 \\ +z_4 \\ +\hline z_3 \\ +z_5 \\ +z_1 +\end{array} +\right) +\end{equation} +% +This simplification is an example of the Prime Factor Algorithm, which +can be used because the factors 2 and 3 are mutually prime. For more +details consult one of the books on number theory for +FFTs~\cite{elliott82,blahut}. We can take advantage of the simple +indexing scheme of the PFA to write the $N=6$ DFT as, +% +\begin{equation} +\begin{array}{lll} +t_1 = z_2 + z_4, & +t_2 = z_0 - t_1/2, & +t_3 = \sin(\pi/3) (z_2 - z_4), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +t_4 = z_5 + z_1, & +t_5 = z_3 - t_4/2, & +t_6 = \sin(\pi/3) (z_5 - z_1), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +t_7 = z_0 + t_1, & +t_8 = t_2 + i t_3, & +t_9 = t_2 - i t_3, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +t_{10} = z_3 + t_4, & +t_{11} = t_5 + i t_6, & +t_{12} = t_5 - i t_6, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +x_0 = t_7 + t_{10}, & +x_4 = t_8 + t_{11}, & +x_2 = t_9 + t_{12}, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +x_3 = t_7 - t_{10}, & +x_1 = t_8 - t_{11}, & +x_5 = t_9 - t_{12}. +\end{array} +\end{equation} + +For any remaining general factors we use Singleton's efficient method +for computing a DFT~\cite{singleton}. Although it is an $O(N^2)$ +algorithm it does reduce the number of multiplications by a factor of +4 compared with a naive evaluation of the DFT. If we look at the +general structure of a DFT matrix, shown schematically below, +% +\begin{equation} +\left( +\begin{array}{c} +h_0 \\ +h_1 \\ +h_2 \\ +\vdots \\ +h_{N-2} \\ +h_{N-1} +\end{array} +\right) += +\left( +\begin{array}{cccccc} +1 & 1 & 1 & \cdots & 1 & 1 \\ +1 & W & W & \cdots & W & W \\ +1 & W & W & \cdots & W & W \\ +\vdots & \vdots & \vdots & \cdots & \vdots & \vdots \\ +1 & W & W & \cdots & W & W \\ +1 & W & W & \cdots & W & W +\end{array} +\right) +\left( +\begin{array}{c} +g_0 \\ +g_1 \\ +g_2 \\ +\vdots \\ +g_{N-2} \\ +g_{N-1} +\end{array} +\right) +\end{equation} +% +we see that the outer elements of the DFT matrix are all unity. We can +remove these trivial multiplications but we will still be left with an +$(N-1) \times (N-1)$ sub-matrix of complex entries, which would appear +to require $(N-1)^2$ complex multiplications. Singleton's method, +uses symmetries of the DFT matrix to convert the complex +multiplications to an equivalent number of real multiplications. We +start with the definition of the DFT in component form, +% +\begin{equation} +a_k + i b_k = \sum_{j=0} (x_j+iy_j)(\cos(2\pi jk/f) - i\sin(2\pi jk/f)) +\end{equation} +% +The zeroth component can be computed using only additions, +% +\begin{equation} +a_0 + i b_0 = \sum_{j=0}^{(f-1)} x_j + i y_j +\end{equation} +% +We can rewrite the remaining components as, +% +\begin{eqnarray} +a_k + i b_k & = x_0 + i y_0 & + + \sum_{j=1}^{(f-1)/2} (x_j + x_{f-j}) \cos(2\pi jk/f) + + (y_j - y_{f-j}) \sin(2\pi jk/f) \\ +& & + i\sum_{j=1}^{(f-1)/2} (y_j + y_{f-j}) \cos(2\pi jk/f) + - (x_j - x_{f-j}) \sin(2\pi jk/f) +\end{eqnarray} +% +by using the following trigonometric identities, +% +\begin{eqnarray} + \cos(2\pi(f-j)k/f) &=& \phantom{-}\cos(2\pi jk/f) \\ + \sin(2\pi(f-j)k/f) &=& -\sin(2\pi jk/f) +\end{eqnarray} +% +These remaining components can all be computed using four partial +sums, +% +\begin{eqnarray} +a_k + i b_k & = & (a^+_k - a^-_k) + i (b^+_k + b^-_k) \\ +a_{f-k} + i b_{f-k} & = & (a^+_k + a^-_k) + i (b^+_k - b^-_k) +\end{eqnarray} +% +for $k = 1, 2, \dots, (f-1)/2$, where, +% +\begin{eqnarray} +a^+_k &=& x_0 + \sum_{j=1}^{(f-1)/2} (x_j + x_{f-j}) \cos(2\pi jk/f) \\ +a^-_k &=& \phantom{x_0} - \sum_{j=1}^{(f-1)/2} (y_j - y_{f-j}) \sin(2\pi jk/f) \\ +b^+_k &=& y_0 + \sum_{j=1}^{(f-1)/2} (y_j + y_{f-j}) \cos(2\pi jk/f) \\ +b^-_k &=& \phantom{y_0} - \sum_{j=1}^{(f-1)/2} (x_j - x_{f-j}) \sin(2\pi jk/f) +\end{eqnarray} +% +Note that the higher components $k'=f-k$ can be obtained directly +without further computation once $a^+$, $a^-$, $b^+$ and $b^-$ are +known. There are $4 \times (f-1)/2$ different sums, each involving +$(f-1)/2$ real multiplications, giving a total of $(f-1)^2$ real +multiplications instead of $(f-1)^2$ complex multiplications. + +To implement Singleton's method we make use of the input and output +vectors $v$ and $v'$ as scratch space, copying data back and forth +between them to obtain the final result. First we use $v'$ to store +the terms of the symmetrized and anti-symmetrized vectors of the form +$x_j + x_{f-j}$ and $x_j - y_{f-j}$. Then we multiply these by the +appropriate trigonometric factors to compute the partial sums $a^+$, +$a^-$, $b^+$ and $b^-$, storing the results $a_k + i b_k$ and $a_{f-k} ++ i b_{f-k}$ back in $v$. Finally we multiply the DFT output by any +necessary twiddle factors and place the results in $v'$. + +\section{FFTs for real data} +% +This section is based on the articles {\em Fast Mixed-Radix Real + Fourier Transforms} by Clive Temperton~\cite{temperton83real} and +{\em Real-Valued Fast Fourier Transform Algorithms} by Sorensen, +Jones, Heideman and Burrus~\cite{burrus87real}. The DFT of a real +sequence has a special symmetry, called a {\em conjugate-complex} or +{\em half-complex} symmetry, +% +\begin{equation} +h(a) = h(N-a)^* +\end{equation} +% +The element $h(0)$ is real, and when $N$ is even $h(N/2)$ is also +real. It is straightforward to prove the symmetry, +% +\begin{eqnarray} +h(a) &=& \sum W^{ab}_N g(b) \\ +h(N-a)^* &=& \sum W^{-(N-a)b}_N g(b)^* \\ + &=& \sum W^{-Nb}_N W^{ab}_N g(b) \qquad{(W^N_N=1)} \\ + &=& \sum W^{ab}_N g(b) +\end{eqnarray} +% +Real-valued data is very common in practice (perhaps more common that +complex data) so it is worth having efficient FFT routines for real +data. In principle an FFT for real data should need half the +operations of an FFT on the equivalent complex data (where the +imaginary parts are set to zero). There are two different strategies +for computing FFTs of real-valued data: + +One strategy is to ``pack'' the real data (of length $N$) into a +complex array (of length $N/2$) by index transformations. A complex +FFT routine can then be used to compute the transform of that array. +By further index transformations the result can actually by +``unpacked'' to the FFT of the original real data. It is also possible +to do two real FFTs simultaneously by packing one in the real part and +the other in the imaginary part of the complex array. These +techniques have some disadvantages. The packing and unpacking +procedures always add $O(N)$ operations, and packing a real array of +length $N$ into a complex array of length $N/2$ is only possible if +$N$ is even. In addition, if two unconnected datasets with very +different magnitudes are packed together in the same FFT there could +be ``cross-talk'' between them due to a loss of precision. + +A more straightforward strategy is to start with an FFT algorithm, +such as the complex mixed-radix algorithm, and prune out all the +operations involving the zero imaginary parts of the initial data. The +FFT is linear so the imaginary part of the data can be decoupled from +the real part. This procedure leads to a dedicated FFT for real-valued +data which works for any length and does not perform any unnecessary +operations. It also allows us to derive a corresponding inverse FFT +routine which transforms a half-complex sequence back into real data. + +\subsection{Radix-2 FFTs for real data} +% +Before embarking on the full mixed-radix real FFT we'll start with the +radix-2 case. It contains all the essential features of the +general-$N$ algorithm. To make it easier to see the analogy between +the two we will use the mixed-radix notation to describe the +factors. The factors are all 2, +% +\begin{equation} +f_1 = 2, f_2 = 2, \dots, f_{n_f} = 2 +\end{equation} +% +and the products $p_i$ are powers of 2, +% +\begin{eqnarray} +p_0 & = & 1 \\ +p_1 & = & f_1 = 2 \\ +p_2 & = & f_1 f_2 = 4 \\ +\dots &=& \dots \\ +p_i & = & f_1 f_2 \dots f_i = 2^i +\end{eqnarray} +% +Using this notation we can rewrite the radix-2 decimation-in-time +algorithm as, +% +\begin{algorithm} +\STATE bit-reverse ordering of $g$ +\FOR {$i = 1 \dots n$} + \FOR {$a = 0 \dots p_{i-1} - 1$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$ + \left( + \begin{array}{c} + g(b p_i + a) \\ + g(b p_i + p_{i-1} + a) + \end{array} + \right) + = + \left( + \begin{array}{c} + g(b p_i + a) + W^a_{p_i} g(b p_i + p_{i-1} + a) \\ + g(b p_i + a) - W^a_{p_i} g(b p_i + p_{i-1} + a) + \end{array} + \right) $} + \ENDFOR + \ENDFOR +\ENDFOR +\end{algorithm} +% +where we have used $p_i = 2 \Delta$, and factored $2 \Delta$ out of +the original definition of $b$ ($b \to b p_i$). + +If we go back to the original recurrence relations we can see how to +write the intermediate results in a way which make the +real/half-complex symmetries explicit at each step. The first pass is +just a set of FFTs of length-2 on real values, +% +\begin{equation} +g_1([b_0 b_1 b_2 a_0]) = \sum_{b_3} W^{a_0 b_3}_2 g([b_0 b_1 b_2 b_3]) +\end{equation} +% +Using the symmetry $FFT(x)_k = FFT(x)^*_{N-k}$ we have the reality +condition, +% +\begin{eqnarray} +g_1([b_0 b_1 b_2 0]) &=& \mbox{real} \\ +g_1([b_0 b_1 b_2 1]) &=& \mbox{real'} +\end{eqnarray} +% +In the next pass we have a set of length-4 FFTs on the original data, +% +\begin{eqnarray} +g_2([b_0 b_1 b_1 a_0]) +&=& +\sum_{b_2}\sum_{b_3} +W^{[a_1 a_0]b_2}_4 W^{a_0 b_3}_2 +g([b_0 b_1 b_2 b_3]) \\ +&=& +\sum_{b_2}\sum_{b_3} +W^{[a_1 a_0][b_3 b_2]}_4 +g([b_0 b_1 b_2 b_3]) +\end{eqnarray} +% +This time symmetry gives us the following conditions on the +transformed data, +% +\begin{eqnarray} +g_2([b_0 b_1 0 0]) &=& \mbox{real} \\ +g_2([b_0 b_1 0 1]) &=& x + i y \\ +g_2([b_0 b_1 1 0]) &=& \mbox{real'} \\ +g_2([b_0 b_1 1 1]) &=& x - i y +\end{eqnarray} +% +We can see a pattern emerging here: the $i$-th pass computes a set of +independent length-$2^i$ FFTs on the original real data, +% +\begin{eqnarray} +g_i ( b p_i + a ) = \sum_{a' = 0}^{p_i-1} W_{p_i}^{aa'} g(b p_i + a') +\quad +\mbox{for $b = 0 \dots q_i - 1$} +\end{eqnarray} +% +As a consequence the we can apply the symmetry for an FFT of real data +to all the intermediate results -- not just the final result. +In general after the $i$-th pass we will +have the symmetry, +% +\begin{eqnarray} +g_i(b p_i) &=& \mbox{real} \\ +g_i(b p_i + a) &=& g_i(b p_i + p_i - a)^* \qquad a = 1 \dots p_{i}/2 - 1 \\ +g_i(b p_i + p_{i}/2) &=& \mbox{real'} +\end{eqnarray} +% +In the next section we'll show that this is a general property of +decimation-in-time algorithms. The same is not true for the +decimation-in-frequency algorithm, which does not have any simple +symmetries in the intermediate results. + +Since we can obtain the values of $g_i(b p_i + a)$ for $a > p_i/2$ +from the values for $a < p_i/2$ we can cut our computation and +storage in half compared with the full-complex case. +% +We can easily rewrite the algorithm to show how the computation can be +halved, simply by limiting all terms to involve only values for $a +\leq p_{i}/2$. Whenever we encounter a term $g_i(b p_i + a)$ with $a > +p_{i}/2$ we rewrite it in terms of its complex symmetry partner, +$g_i(b p_i + a')^*$, where $a' = p_i - a$. The butterfly computes two +values for each value of $a$, $b p_i + a$ and $b p_i + p_{i-1} - a$, +so we actually only need to compute from $a = 0$ to $p_{i-1}/2$. This +gives the following algorithm, +% +\begin{algorithm} +\FOR {$a = 0 \dots p_{i-1}/2$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$ + \left( + \begin{array}{c} + g(b p_i + a) \\ + g(b p_i + p_{i-1} - a)^* + \end{array} + \right) + = + \left( + \begin{array}{c} + g(b p_{i} + a) + W^a_{p_i} g(b p_i + p_{i-1} + a) \\ + g(b p_{i} + a) - W^a_{p_i} g(b p_i + p_{i-1} + a) + \end{array} + \right) $} + \ENDFOR + \ENDFOR +\end{algorithm} +% +Although we have halved the number of operations we also need a +storage arrangement which will halve the memory requirement. The +algorithm above is still formulated in terms of a complex array $g$, +but the input to our routine will naturally be an array of $N$ real +values which we want to use in-place. + +Therefore we need a storage scheme which lays out the real and +imaginary parts within the real array, in a natural way so that there +is no need for complicated index calculations. In the radix-2 +algorithm we do not have any additional scratch space. The storage +scheme has to be designed to accommodate the in-place calculation +taking account of dual node pairs. + +Here is a scheme which takes these restrictions into account: On the +$i$-th pass we store the real part of $g(b p_i + a)$ in location $b +p_i + a$. We store the imaginary part in location $b p_i + p_i - +a$. This is the redundant location which corresponds to the conjugate +term $g(b p_i + a)^* = g(b p_i + p_i -a)$, so it is not needed. When +the results are purely real (as in the case $a = 0$ and $a = p_i/2$ we +store only the real part and drop the zero imaginary part). + +This storage scheme has to work in-place, because the radix-2 routines +should not use any scratch space. We will now check the in-place +property for each butterfly. A crucial point is that the scheme is +pass-dependent. Namely, when we are computing the result for pass $i$ +we are reading the results of pass $i-1$, and we must access them +using the scheme from the previous pass, i.e. we have to remember that +the results from the previous pass were stored using $b p_{i-1} + a$, +not $b p_i + a$, and the symmetry for these results will be $g_{i-1}(b +p_{i-1} + a) = g_{i-1}(b p_{i-1} + p_{i-1} - a)^*$. To take this into +account we'll write the right hand side of the iteration, $g_{i-1}$, +in terms of $p_{i-1}$. For example, instead of $b p_i$, which occurs +naturally in $g_i(b p_i + a)$ we will use $2 b p_{i-1}$, since $p_i = +2 p_{i-1}$. + +Let's start with the butterfly for $a = 0$, +% +\begin{equation} +\left( +\begin{array}{c} +g(b p_i) \\ +g(b p_i + p_{i-1})^* +\end{array} +\right) += +\left( +\begin{array}{c} +g(2 b p_{i-1}) + g((2 b + 1) p_{i-1}) \\ +g(2 b p_{i-1}) - g((2 b + 1) p_{i-1}) +\end{array} +\right) +\end{equation} +% +By the symmetry $g_{i-1}(b p_{i-1} + a) = g_{i-1}(b p_{i-1} + p_{i-1} +- a)^*$ all the inputs are purely real. The input $g(2 b p_{i-1})$ is +read from location $2 b p_{i-1}$ and $g((2 b + 1) p_{i-1})$ is read +from the location $(2 b + 1) p_{i-1}$. Here is the full breakdown, +% +\begin{center} +\renewcommand{\arraystretch}{1.5} +\begin{tabular}{|l|lll|} +\hline Term & & Location & \\ +\hline +$g(2 b p_{i-1})$ + & real part & $2 b p_{i-1} $ &$= b p_i$ \\ + & imag part & --- & \\ +$g((2 b+1) p_{i-1})$ + & real part & $(2 b + 1) p_{i-1} $&$= b p_i + p_{i-1} $ \\ + & imag part & --- & \\ +\hline +$g(b p_{i})$ + & real part & $b p_i$ &\\ + & imag part & --- & \\ +$g(b p_{i} + p_{i-1})$ + & real part & $b p_i + p_{i-1}$& \\ + & imag part & --- & \\ +\hline +\end{tabular} +\end{center} +% +The conjugation of the output term $g(b p_i + p_{i-1})^*$ is +irrelevant here since the results are purely real. The real results +are stored in locations $b p_i$ and $b p_i + p_{i-1}$, which +overwrites the inputs in-place. + +The general butterfly for $a = 1 \dots p_{i-1}/2 - 1$ is, +% +\begin{equation} +\left( +\begin{array}{c} +g(b p_i + a) \\ +g(b p_i + p_{i-1} - a)^* +\end{array} +\right) += +\left( +\begin{array}{c} +g(2 b p_{i-1} + a) + W^a_{p_i} g((2 b + 1) p_{i-1} + a) \\ +g(2 b p_{i-1} + a) - W^a_{p_i} g((2 b + 1) p_{i-1} + a) +\end{array} +\right) +\end{equation} +% +All the terms are complex. To store a conjugated term like $g(b' p_i + +a')^*$ where $a > p_i/2$ we take the real part and store it in +location $b' p_i + a'$ and then take imaginary part, negate it, and +store the result in location $b' p_i + p_i - a'$. + +Here is the full breakdown of the inputs and outputs from the +butterfly, +% +\begin{center} +\renewcommand{\arraystretch}{1.5} +\begin{tabular}{|l|lll|} +\hline Term & & Location & \\ +\hline +$g(2 b p_{i-1} + a)$ + & real part & $2 b p_{i-1} + a $ &$= b p_i + a$ \\ + & imag part & $2 b p_{i-1} + p_{i-1} - a$ &$= b p_i + p_{i-1} - a$ \\ +$g((2 b+1) p_{i-1} + a)$ + & real part & $(2 b+1) p_{i-1} + a $&$= b p_i + p_{i-1} + a $ \\ + & imag part & $(2 b+1) p_{i-1} + p_{i-1} - a $&$= b p_i + p_i - a$\\ +\hline +$g(b p_{i} + a)$ + & real part & $b p_i + a$ &\\ + & imag part & $b p_i + p_i - a$& \\ +$g(b p_{i} + p_{i-1} - a)$ + & real part & $b p_i + p_{i-1} - a$& \\ + & imag part & $b p_i + p_{i-1} + a$& \\ +\hline +\end{tabular} +\end{center} +% +By comparing the input locations and output locations we can see +that the calculation is done in place. + +The final butterfly for $a = p_{i-1}/2$ is, +% +\begin{equation} +\left( +\begin{array}{c} +g(b p_i + p_{i-1}/2) \\ +g(b p_i + p_{i-1} - p_{i-1}/2)^* +\end{array} +\right) += +\left( +\begin{array}{c} +g(2 b p_{i-1} + p_{i-1}/2) - i g((2 b + 1) p_{i-1} + p_{i-1}/2) \\ +g(2 b p_{i-1} + p_{i-1}/2) + i g((2 b + 1) p_{i-1} + p_{i-1}/2) +\end{array} +\right) +\end{equation} +% +where we have substituted for the twiddle factor, $W^a_{p_i} = -i$, +% +\begin{eqnarray} +W^{p_{i-1}/2}_{p_i} &=& \exp(-2\pi i p_{i-1}/2 p_i) \\ + &=& \exp(-2\pi i /4) \\ + &=& -i +\end{eqnarray} +% +For this butterfly the second line is just the conjugate of the first, +because $p_{i-1} - p_{i-1}/2 = p_{i-1}/2$. Therefore we only need to +consider the first line. The breakdown of the inputs and outputs is, +% +\begin{center} +\renewcommand{\arraystretch}{1.5} +\begin{tabular}{|l|lll|} +\hline Term & & Location & \\ +\hline +$g(2 b p_{i-1} + p_{i-1}/2)$ + & real part & $2 b p_{i-1} + p_{i-1}/2 $ &$= b p_i + p_{i-1}/2$ \\ + & imag part & --- & \\ +$g((2 b + 1) p_{i-1} + p_{i-1}/2)$ + & real part & $(2 b + 1) p_{i-1} + p_{i-1}/2 $&$= b p_i + p_{i} - p_{i-1}/2 $ \\ + & imag part & --- & \\ +\hline +$g(b p_{i} + p_{i-1}/2)$ + & real part & $b p_i + p_{i-1}/2$ &\\ + & imag part & $b p_i + p_i - p_{i-1}/2$& \\ +\hline +\end{tabular} +\end{center} +% +By comparing the locations of the inputs and outputs with the +operations in the butterfly we find that this computation is very +simple: the effect of the butterfly is to negate the location $b p_i + +p_i - p_{i-1}/2$ and leave other locations unchanged. This is clearly +an in-place operation. + +Here is the radix-2 algorithm for real data, in full, with the cases +of $a=0$, $a=1\dots p_{i-1}/2 - 1$ and $a = p_{i-1}/2$ in separate +blocks, +% +\begin{algorithm} +\STATE bit-reverse ordering of $g$ +\FOR {$i = 1 \dots n$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$\left( + \begin{array}{c} + g(b p_i) \\ + g(b p_i + p_{i-1}) + \end{array} + \right) + \Leftarrow + \left( + \begin{array}{c} + g(b p_{i}) + g(b p_{i} + p_{i-1}) \\ + g(b p_{i}) - g(b p_{i} + p_{i-1}) + \end{array} + \right)$} + \ENDFOR + + \FOR {$a = 1 \dots p_{i-1}/2 - 1$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$(\Real z_0, \Imag z_0) \Leftarrow + (g(b p_i + a), g(b p_i + p_{i-1} - a))$} + \STATE{$(\Real z_1, \Imag z_1) \Leftarrow + (g(b p_i + p_{i-1} + a), g(b p_i + p_{i} - a))$} + \STATE{$t_0 \Leftarrow z_0 + W^a_{p_i} z_1$} + \STATE{$t_1 \Leftarrow z_0 - W^a_{p_i} z_1$} + \STATE{$(g(b p_{i} + a),g(b p_{i} + p_i - a) \Leftarrow + (\Real t_0, \Imag t_0)$} + \STATE{$(g(b p_{i} + p_{i-1} - a), g(b p_{i} + p_{i-1} + a)) + \Leftarrow + (\Real t_1, -\Imag t_1)$} + \ENDFOR + \ENDFOR + + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$g(b p_{i} + p_{i} - p_{i-1}/2) \Leftarrow -g(b p_{i} + p_{i} - p_{i-1}/2)$} + \ENDFOR + +\ENDFOR +\end{algorithm} +% +We split the loop over $a$ into three parts, $a=0$, $a=1\dots +p_{i-1}/2-1$ and $a = p_{i-1}/2$ for efficiency. When $a=0$ we have +$W^a_{p_i}=1$ so we can eliminate a complex multiplication within the +loop over $b$. When $a=p_{i-1}/2$ we have $W^a_{p_i} = -i$ which does +not require a full complex multiplication either. + + +\subsubsection{Calculating the Inverse} +% +The inverse FFT of complex data was easy to calculate, simply by +taking the complex conjugate of the DFT matrix. The input data and +output data were both complex and did not have any special +symmetry. For real data the inverse FFT is more complicated because +the half-complex symmetry of the transformed data is +different from the purely real input data. + +We can compute an inverse by stepping backwards through the forward +transform. To simplify the inversion it's convenient to write the +forward algorithm with the butterfly in matrix form, +% +\begin{algorithm} +\FOR {$i = 1 \dots n$} + \FOR {$a = 0 \dots p_{i-1}/2$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$ + \left( + \begin{array}{c} + g(b p_i + a) \\ + g(b p_i + p_{i-1} + a) + \end{array} + \right) + = + \left( + \begin{array}{cc} + 1 & W^a_{p_{i}} \\ + 1 & -W^a_{p_{i}} + \end{array} + \right) + \left( + \begin{array}{c} + g(2 b p_{i-1} + a) \\ + g((2 b + 1) p_{i-1} + a) + \end{array} + \right) $} + \ENDFOR + \ENDFOR +\ENDFOR +\end{algorithm} +% +To invert the algorithm we run the iterations backwards and invert the +matrix multiplication in the innermost loop, +% +\begin{algorithm} +\FOR {$i = n \dots 1$} + \FOR {$a = 0 \dots p_{i-1}/2$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$ + \left( + \begin{array}{c} + g(2 b p_{i-1} + a) \\ + g((2 b + 1) p_{i-1} + a) + \end{array} + \right) + = + \left( + \begin{array}{cc} + 1 & W^a_{p_{i}} \\ + 1 & -W^a_{p_{i}} + \end{array} + \right)^{-1} + \left( + \begin{array}{c} + g(b p_i + a) \\ + g(b p_i + p_{i-1} + a) + \end{array} + \right) $} + \ENDFOR + \ENDFOR +\ENDFOR +\end{algorithm} +% +There is no need to reverse the loops over $a$ and $b$ because the +result is independent of their order. The inverse of the matrix that +appears is, +% +\begin{equation} +\left( +\begin{array}{cc} +1 & W^a_{p_{i}} \\ +1 & -W^a_{p_{i}} +\end{array} +\right)^{-1} += +{1 \over 2} +\left( +\begin{array}{cc} +1 & 1 \\ +W^{-a}_{p_{i}} & -W^{-a}_{p_{i}} +\end{array} +\right) +\end{equation} +% +To save divisions we remove the factor of $1/2$ inside the loop. This +computes the unnormalized inverse, and the normalized inverse can be +retrieved by dividing the final result by $N = 2^n$. + +Here is the radix-2 half-complex to real inverse FFT algorithm, taking +into account the radix-2 storage scheme, +% +\begin{algorithm} +\FOR {$i = n \dots 1$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$\left( + \begin{array}{c} + g(b p_i) \\ + g(b p_i + p_{i-1}) + \end{array} + \right) + \Leftarrow + \left( + \begin{array}{c} + g(b p_{i}) + g(b p_{i} + p_{i-1}) \\ + g(b p_{i}) - g(b p_{i} + p_{i-1}) + \end{array} + \right)$} + \ENDFOR + + \FOR {$a = 1 \dots p_{i-1}/2 - 1$} + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$(\Real z_0, \Imag z_0) + \Leftarrow + (g(b p_i + a), g(b p_i + p_{i} - a))$} + \STATE{$(\Real z_1, \Imag z_1) + \Leftarrow + (g(b p_i + p_{i-1} - a), -g(b p_i + p_{i-1} + a))$} + \STATE{$t_0 \Leftarrow z_0 + z_1$} + \STATE{$t_1 \Leftarrow z_0 - z_1$} + \STATE{$(g(b p_{i} + a), g(b p_{i} + p_{i-1} - a)) + \Leftarrow + (\Real t_0, \Imag t_0) $} + \STATE{$(g(b p_{i} + p_{i-1} + a),g(b p_{i} + p_{i} - a)) + \Leftarrow + (\Real(W^a_{p_i}t_1), \Imag(W^a_{p_i}t_1))$} + \ENDFOR + \ENDFOR + + \FOR{$b = 0 \dots q_i - 1$} + \STATE{$g(b p_{i} + p_{i-1}/2) \Leftarrow 2 g(b p_{i} + p_{i-1}/2)$} + \STATE{$g(b p_{i} + p_{i-1} + p_{i-1}/2) \Leftarrow -2 g(b p_{i} + p_{i-1} + p_{i-1}/2)$} + \ENDFOR + +\ENDFOR +\STATE bit-reverse ordering of $g$ +\end{algorithm} + + + +\subsection{Mixed-Radix FFTs for real data} +% +As discussed earlier the radix-2 decimation-in-time algorithm had the +special property that its intermediate passes are interleaved Fourier +transforms of the original data, and this generalizes to the +mixed-radix algorithm. The complex mixed-radix algorithm that we +derived earlier was a decimation-in-frequency algorithm, but we can +obtain a decimation-in-time version by taking the transpose of the +decimation-in-frequency DFT matrix like this, +% +\begin{eqnarray} +W_N &=& W_N^T \\ +&=& (T_{n_f} \dots T_2 T_1)^T \\ +&=& T_1^T T_2^T \dots T_{n_f}^T +\end{eqnarray} +% +with, +% +\begin{eqnarray} +T_i^T &=& \left( (P^{f_i}_{q_i} D^{f_i}_{q_i} \otimes I_{p_{i-1}}) + (W_{f_i} \otimes I_{m_i}) \right)^T \\ + &=& (W_{f_i} \otimes I_{m_i}) + ( D^{f_i}_{q_i} (P^{f_i}_{q_i})^T \otimes I_{p_{i-1}}). +\end{eqnarray} +% +We have used the fact that $W$, $D$ and $I$ are symmetric and that the +permutation matrix $P$ obeys, +% +\begin{equation} +(P^a_b)^T = P^b_a. +\end{equation} +% +From the definitions of $D$ and $P$ we can derive the following identity, +% +\begin{equation} +D^a_b P^b_a = P^b_a D^b_a. +\end{equation} +% +This allows us to put the transpose into a simple form, +% +\begin{equation} +T_i^T = (W_{f_i} \otimes I_{m_i}) + (P^{q_i}_{f_i} D^{q_i}_{f_i} \otimes I_{p_{i-1}}). +\end{equation} +% +The transposed matrix, $T^T$ applies the digit-reversal $P$ before the +DFT $W$, giving the required decimation-in-time algorithm. The +transpose reverses the order of the factors --- $T_{n_f}$ is applied +first and $T_1$ is applied last. For convenience we can reverse the +order of the factors, $f_1 \leftrightarrow f_{n_f}$, $f_2 +\leftrightarrow f_{n_f-1}$, \dots and make the corresponding +substitution $p_{i-1} \leftrightarrow q_i$. These substitutions give +us a decimation-in-time algorithm with the same ordering as the +decimation-in-frequency algorithm, +% +\begin{equation} +W_N = T_{n_f} \dots T_2 T_1 +\end{equation} +% +\begin{equation} +T_i = (W_{f_i} \otimes I_{m_i}) + (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i} \otimes I_{q_i}) +\end{equation} +% +where $p_i$, $q_i$ and $m_i$ now have the same meanings as before, +namely, +% +\begin{eqnarray} +p_i &=& f_1 f_2 \dots f_i \quad (p_0 = 1) \\ +q_i &=& N / p_i \\ +m_i &=& N / f_i +\end{eqnarray} +% +Now we would like to prove that the iteration for computing $x = W z = +T_{n_f} \dots T_2 T_1 z$ has the special property interleaving +property. If we write the result of each intermediate pass as +$v^{(i)}$, +% +\begin{eqnarray} +v^{(0)} &=& z \\ +v^{(1)} &=& T_1 v^{(0)} \\ +v^{(2)} &=& T_2 v^{(1)} \\ +\dots &=& \dots \\ +v^{(i)} &=& T_i v^{(i-1)} +\end{eqnarray} +% +then we will show that the intermediate results $v^{(i)}$ on any pass +can be written as, +% +\begin{equation} +v^{(i)} = (W_{p_i} \otimes I_{q_i}) z +\end{equation} +% +Each intermediate stage will be a set of $q_i$ interleaved Fourier +transforms, each of length $p_i$. We can prove this result by +induction. First we assume that the result is true for $v^{(i-1)}$, +% +\begin{equation} +v^{(i-1)} = (W_{p_{i-1}} \otimes I_{q_{i-1}}) z \qquad \mbox{(assumption)} +\end{equation} +% +And then we examine the next iteration using this assumption, +% +\begin{eqnarray} +v^{(i)} &=& T_i v^{(i-1)} \\ + &=& T_i (W_{p_{i-1}} \otimes I_{q_{i-1}}) z \\ + &=& (W_{f_i} \otimes I_{m_i}) + (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i} \otimes I_{q_i}) + (W_{p_{i-1}} \otimes I_{q_{i-1}}) z \label{dit-induction} +\end{eqnarray} +% +Using the relation $m_i = p_{i-1} q_i$, we can write $I_{m_i}$ as +$I_{p_{i-1} q_i}$ and $I_{q_{i-1}}$ as $I_{f_i q_i}$. By combining these +with the basic matrix identity, +% +\begin{equation} +I_{ab} = I_a \otimes I_b +\end{equation} +% +we can rewrite $v^{(i)}$ in the following form, +% +\begin{equation} +v^{(i)} = (((W_{f_i} \otimes I_{p_{i-1}}) + (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i}) + (W_{p_{i-1}} \otimes I_{f_i})) \otimes I_{q_i}) z . +\end{equation} +% +The first part of this matrix product is the two-factor expansion of +$W_{ab}$, for $a = p_{i-1}$ and $b = f_i$, +% +\begin{equation} +W_{p_{i-1} f_i} = ((W_{f_i} \otimes I_{p_{i-1}}) + (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i}) + (W_{p_{i-1}} \otimes I_{f_i})). +\end{equation} +% +If we substitute this result, remembering that $p_i = p_{i-1} f_i$, we +obtain, +% +\begin{equation} +v^{(i)} = (W_{p_i} \otimes I_{q_i}) z +\end{equation} +% +which is the desired result. The case $i=1$ can be verified +explicitly, and induction then shows that the result is true for all +$i$. As discussed for the radix-2 algorithm this result is important +because if the initial data $z$ is real then each intermediate pass is +a set of interleaved Fourier transforms of $z$, having half-complex +symmetries (appropriately applied in the subspaces of the Kronecker +product). Consequently only $N$ real numbers are needed to store the +intermediate and final results. + +\subsection{Implementation} +% +The implementation of the mixed-radix real FFT algorithm follows the +same principles as the full complex transform. Some of the steps are +applied in the opposite order because we are dealing with a decimation +in time algorithm instead of a decimation in frequency algorithm, but +the basic outer structure of the algorithm is the same. We want to +apply the factorized version of the DFT matrix $W_N$ to the input +vector $z$, +% +\begin{eqnarray} +x &=& W_N z \\ + &=& T_{n_f} \dots T_2 T_1 z +\end{eqnarray} +% +We loop over the $n_f$ factors, applying each matrix $T_i$ to the +vector in turn to build up the complete transform, +% +\begin{algorithm} +\FOR{$(i = 1 \dots n_f)$} + \STATE{$v \Leftarrow T_i v $} +\ENDFOR +\end{algorithm} +% +In this case the definition of $T_i$ is different because we have +taken the transpose, +% +\begin{equation} +T_i = + (W_{f_i} \otimes I_{m_i}) + (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i} \otimes I_{q_i}). +\end{equation} +% +We'll define a temporary vector $t$ to denote the results of applying the +rightmost matrix, +% +\begin{equation} +t = (P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i} \otimes I_{q_i}) v +\end{equation} +% +If we expand this out into individual components, as before, we find a +similar simplification, +% +\begin{eqnarray} +t_{aq+b} +&=& +\sum_{a'b'} +(P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i} \otimes I_{q_i})_{(aq+b)(a'q+b')} +v_{a'q+b'} \\ +&=& +\sum_{a'} +(P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i})_{a a'} +v_{a'q+b} +\end{eqnarray} +% +We have factorized the indices into the form $aq+b$, with $0 \leq a < +p_{i}$ and $0 \leq b < q$. Just as in the decimation in frequency +algorithm we can split the index $a$ to remove the matrix +multiplication completely. We have to write $a$ as $\mu f + \lambda$, +where $0 \leq \mu < p_{i-1}$ and $0 \leq \lambda < f$, +% +\begin{eqnarray} +t_{(\mu f + \lambda)q+b} +&=& +\sum_{\mu'\lambda'} +(P^{p_{i-1}}_{f_i} D^{p_{i-1}}_{f_i})_{(\mu f + \lambda)(\mu' f + \lambda')} +v_{(\mu' f + \lambda')q+b} +\\ +&=& +\sum_{\mu'\lambda'} +(P^{p_{i-1}}_{f_i})_{(\mu f + \lambda)(\mu' f + \lambda')} +\omega^{\mu'\lambda'}_{p_{i}} +v_{(\mu' f + \lambda')q+b} +\end{eqnarray} +% +The matrix $P^{p_{i-1}}_{f_i}$ exchanges an index of $(\mu f + +\lambda) q + b$ with $(\lambda p_{i-1} + \mu) q + b$, giving a final +result of, +% +\begin{eqnarray} +t_{(\lambda p_{i-1} + \mu) q + b} += +w^{\mu\lambda}_{p_i} v_{(\mu f + \lambda)q +b} +\end{eqnarray} +% +To calculate the next stage, +% +\begin{equation} +v' = (W_{f_i} \otimes I_{m_i}) t, +\end{equation} +% +we temporarily rearrange the index of $t$ to separate the $m_{i}$ +independent DFTs in the Kronecker product, +% +\begin{equation} +v'_{(\lambda p_{i-1} + \mu) q + b} += +\sum_{\lambda' \mu' b'} +(W_{f_i} \otimes I_{m_i})_{ +((\lambda p_{i-1} + \mu) q + b) +((\lambda' p_{i-1} + \mu') q + b')} +t_{(\lambda' p_{i-1} + \mu') q + b'} +\end{equation} +% +If we use the identity $m = p_{i-1} q$ to rewrite the index of $t$ +like this, +% +\begin{equation} +t_{(\lambda p_{i-1} + \mu) q + b} = t_{\lambda m + (\mu q + b)} +\end{equation} +% +we can split the Kronecker product, +% +\begin{eqnarray} +v'_{(\lambda p_{i-1} + \mu) q + b} +&=& +\sum_{\lambda' \mu' b'} +(W_{f_i} \otimes I_{m_i})_{ +((\lambda p_{i-1} + \mu) q + b) +((\lambda' p_{i-1} + \mu') q + b')} +t_{(\lambda' p_{i-1} + \mu') q + b'}\\ +&=& +\sum_{\lambda'} +(W_{f_i})_{\lambda \lambda'} +t_{\lambda' m_i + (\mu q + b)} +\end{eqnarray} +% +If we switch back to the original form of the index in the last line we obtain, +% +\begin{eqnarray} +\phantom{v'_{(\lambda p_{i-1} + \mu) q + b}} +&=& +\sum_{\lambda'} +(W_{f_i})_{\lambda \lambda'} +t_{(\lambda p_{i-1} + \mu) q + b} +\end{eqnarray} +% +which allows us to substitute our previous result for $t$, +% +\begin{equation} +v'_{(\lambda p_{i-1} + \mu) q + b} += +\sum_{\lambda'} +(W_{f_i})_{\lambda \lambda'} +w^{\mu\lambda'}_{p_i} v_{(\mu f + \lambda')q + b} +\end{equation} +% +This gives us the basic decimation-in-time mixed-radix algorithm for +complex data which we will be able to specialize to real data, +% +\begin{algorithm} +\FOR{$i = 1 \dots n_f$} +\FOR{$\mu = 0 \dots p_{i-1} - 1$} +\FOR{$b = 0 \dots q-1$} +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$t_\lambda \Leftarrow + \omega^{\mu\lambda'}_{p_{i}} v_{(\mu f + \lambda')q + b}$} +\ENDFOR +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$v'_{(\lambda p_{i-1} + \mu)q + b} = + \sum_{\lambda'=0}^{f-1} W_f(\lambda,\lambda') t_{\lambda'}$} + \COMMENT{DFT matrix-multiply module} +\ENDFOR +\ENDFOR +\ENDFOR +\STATE{$v \Leftarrow v'$} +\ENDFOR +\end{algorithm} +% +We are now at the point where we can convert an algorithm formulated +in terms of complex variables to one in terms of real variables by +choosing a suitable storage scheme. We will adopt the FFTPACK storage +convention. FFTPACK uses a scheme where individual FFTs are +contiguous, not interleaved, and real-imaginary pairs are stored in +neighboring locations. This has better locality than was possible for +the radix-2 case. + +The interleaving of the intermediate FFTs results from the Kronecker +product, $W_p \otimes I_q$. The FFTs can be made contiguous if we +reorder the Kronecker product on the intermediate passes, +% +\begin{equation} +W_p \otimes I_q \Rightarrow I_q \otimes W_p +\end{equation} +% +This can be implemented by a simple change in indexing. On pass-$i$ +we store element $v_{a q_i + b}$ in location $v_{b p_i+a}$. We +compensate for this change by making the same transposition when +reading the data. Note that this only affects the indices of the +intermediate passes. On the zeroth iteration the transposition has no +effect because $p_0 = 1$. Similarly there is no effect on the last +iteration, which has $q_{n_f} = 1$. This is how the algorithm above +looks after this index transformation, +% +\begin{algorithm} +\FOR{$i = 1 \dots n_f$} +\FOR{$\mu = 0 \dots p_{i-1} - 1$} +\FOR{$b = 0 \dots q-1$} +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$t_\lambda \Leftarrow + \omega^{\mu\lambda'}_{p_{i}} v_{(\lambda'q + b)p_{i-1} + \mu}$} +\ENDFOR +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$v'_{b p + (\lambda p_{i-1} + \mu)} = + \sum_{\lambda'=0}^{f-1} W_f(\lambda,\lambda') t_{\lambda'}$} + \COMMENT{DFT matrix-multiply module} +\ENDFOR +\ENDFOR +\ENDFOR +\STATE{$v \Leftarrow v'$} +\ENDFOR +\end{algorithm} +% +We transpose the input terms by writing the index in the form $a +q_{i-1} + b$, to take account of the pass-dependence of the scheme, +% +\begin{equation} +v_{(\mu f + \lambda')q + b} = v_{\mu q_{i-1} + \lambda'q + b} +\end{equation} +% +We used the identity $q_{i-1} = f q$ to split the index. Note that in +this form $\lambda'q + b$ runs from 0 to $q_{i-1} - 1$ as $b$ runs +from 0 to $q-1$ and $\lambda'$ runs from 0 to $f-1$. The transposition +for the input terms then gives, +% +\begin{equation} +v_{\mu q_{i-1} + \lambda'q + b} \Rightarrow v_{(\lambda'q + b) p_{i-1} + \mu} +\end{equation} +% +In the FFTPACK scheme the intermediate output data have the same +half-complex symmetry as the radix-2 example, namely, +% +\begin{equation} +v^{(i)}_{b p + a} = v^{(i)*}_{b p + (p - a)} +\end{equation} +% +and on the input data from the previous pass have the symmetry, +% +\begin{equation} +v^{(i-1)}_{(\lambda' q + b) p_{i-1} + \mu} = v^{(i-1)*}_{(\lambda' q + +b) p_{i-1} + (p_{i-1} - \mu)} +\end{equation} +% +Using these symmetries we can halve the storage and computation +requirements for each pass. Compared with the radix-2 algorithm we +have more freedom because the computation does not have to be done in +place. The storage scheme adopted by FFTPACK places elements +sequentially with real and imaginary parts in neighboring +locations. Imaginary parts which are known to be zero are not +stored. Here are the full details of the scheme, +% +\begin{center} +\renewcommand{\arraystretch}{1.5} +\begin{tabular}{|l|lll|} +\hline Term & & Location & \\ +\hline +$g(b p_i)$ + & real part & $b p_{i} $ & \\ + & imag part & --- & \\ +\hline +$g(b p_i + a)$ + & real part & $b p_{i} + 2a - 1 $& for $a = 1 \dots p_i/2 - 1$ \\ + & imag part & $b p_{i} + 2a$ & \\ +\hline +$g(b p_{i} + p_{i}/2)$ + & real part & $b p_i + p_{i} - 1$ & if $p_i$ is even\\ + & imag part & --- & \\ +\hline +\end{tabular} +\end{center} +% +The real element for $a=0$ is stored in location $bp$. The real parts +for $a = 1 \dots p/2 - 1$ are stored in locations $bp + 2a -1$ and the +imaginary parts are stored in locations $b p + 2 a$. When $p$ is even +the term for $a = p/2$ is purely real and we store it in location $bp ++ p - 1$. The zero imaginary part is not stored. + +When we compute the basic iteration, +% +\begin{equation} +v^{(i)}_{b p + (\lambda p_{i-1} + \mu)} = \sum_{\lambda'} +W^{\lambda \lambda'}_f +\omega^{\mu\lambda'}_{p_i} v^{(i-1)}_{(\lambda' q + b)p_{i-1} + \mu} +\end{equation} +% +we eliminate the redundant conjugate terms with $a > p_{i}/2$ as we +did in the radix-2 algorithm. Whenever we need to store a term with $a +> p_{i}/2$ we consider instead the corresponding conjugate term with +$a' = p - a$. Similarly when reading data we replace terms with $\mu > +p_{i-1}/2$ with the corresponding conjugate term for $\mu' = p_{i-1} - +\mu$. + +Since the input data on each stage has half-complex symmetry we only +need to consider the range $\mu=0 \dots p_{i-1}/2$. We can consider +the best ways to implement the basic iteration for each pass, $\mu = 0 +\dots p_{i-1}/2$. + +On the first pass where $\mu=0$ we will be accessing elements which +are the zeroth components of the independent transforms $W_{p_{i-1}} +\otimes I_{q_{i-1}}$, and are purely real. +% +We can code the pass with $\mu=0$ as a special case for real input +data, and conjugate-complex output. When $\mu=0$ the twiddle factors +$\omega^{\mu\lambda'}_{p_i}$ are all unity, giving a further saving. +We can obtain small-$N$ real-data DFT modules by removing the +redundant operations from the complex modules. +% +For example the $N=3$ module was, +% +\begin{equation} +\begin{array}{lll} +t_1 = z_1 + z_2, & +t_2 = z_0 - t_1/2, & +t_3 = \sin(\pi/3) (z_1 - z_2), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +x_0 = z_0 + t_1, & +x_1 = t_2 + i t_3, & +x_2 = t_2 - i t_3. +\end{array} +\end{equation} +% +In the complex case all the operations were complex, for complex input +data $z_0$, $z_1$, $z_2$. In the real case $z_0$, $z_1$ and $z_2$ are +all real. Consequently $t_1$, $t_2$ and $t_3$ are also real, and the +symmetry $x_1 = t_1 + i t_2 = x^*_2$ means that we do not have to +compute $x_2$ once we have computed $x_1$. + +For subsequent passes $\mu = 1 \dots p_{i-1}/2 - 1$ the input data is +complex and we have to compute full complex DFTs using the same +modules as in the complex case. Note that the inputs are all of the +form $v_{(\lambda q + b) p_{i-1} + \mu}$ with $\mu < p_{i-1}/2$ so we +never need to use the symmetry to access the conjugate elements with +$\mu > p_{i-1}/2$. + +If $p_{i-1}$ is even then we reach the halfway point $\mu=p_{i-1}/2$, +which is another special case. The input data in this case is purely +real because $\mu = p_{i-1} - \mu$ for $\mu = p_{i-1}/2$. We can code +this as a special case, using real inputs and real-data DFT modules as +we did for $\mu=0$. However, for $\mu = p_{i-1}/2$ the twiddle factors +are not unity, +% +\begin{eqnarray} +\omega^{\mu\lambda'}_{p_i} &=& \omega^{(p_{i-1}/2)\lambda'}_{p_i} \\ +&=& \exp(-i\pi\lambda'/f_i) +\end{eqnarray} +% +These twiddle factors introduce an additional phase which modifies the +symmetry of the outputs. Instead of the conjugate-complex symmetry +which applied for $\mu=0$ there is a shifted conjugate-complex +symmetry, +% +\begin{equation} +t_\lambda = t^*_{f-(\lambda+1)} +\end{equation} +% +This is easily proved, +% +\begin{eqnarray} +t_\lambda +&=& +\sum e^{-2\pi i \lambda\lambda'/f_i} e^{-i\pi \lambda'/f_i} r_{\lambda'} \\ +t_{f - (\lambda + 1)} +&=& +\sum e^{-2\pi i (f-\lambda-1)\lambda'/f_i} e^{-i\pi \lambda'/f_i} r_{\lambda'} \\ +&=& +\sum e^{2\pi i \lambda\lambda'/f_i} e^{i\pi \lambda'/f_i} r_{\lambda'} \\ +&=& t^*_\lambda +\end{eqnarray} +% +The symmetry of the output means that we only need to compute half of +the output terms, the remaining terms being conjugates or zero +imaginary parts. For example, when $f=4$ the outputs are $(x_0 + i +y_0, x_1 + i y_1, x_1 - i y_1, x_0 - i y_0)$. For $f=5$ the outputs +are $(x_0 + i y_0, x_1 + i y_1, x_2, x_1 - i y_1, x_0 - i y_0)$. By +combining the twiddle factors and DFT matrix we can make a combined +module which applies both at the same time. By starting from the +complex DFT modules and bringing in twiddle factors we can derive +optimized modules. Here are the modules given by Temperton for $z = W +\Omega x$ where $x$ is real and $z$ has the shifted conjugate-complex +symmetry. The matrix of twiddle factors, $\Omega$, is given by, +% +\begin{equation} +\Omega = \mathrm{diag}(1, e^{-i\pi/f}, e^{-2\pi i/f}, \dots, e^{-i\pi(f-1)/f}) +\end{equation} +% +We write $z$ in terms of two real vectors $z = a + i b$. +% +For $N=2$, +% +\begin{equation} +\begin{array}{ll} +a_0 = x_0, & +b_0 = - x_1. +\end{array} +\end{equation} +% +For $N=3$, +% +\begin{equation} +\begin{array}{l} +t_1 = x_1 - x_2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_0 = x_0 + t_1/2, & b_0 = x_0 - t_1, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{l} +a_1 = - \sin(\pi/3) (x_1 + x_2) +\end{array} +\end{equation} +% +For $N=4$, +% +\begin{equation} +\begin{array}{ll} +t_1 = (x_1 - x_3)/\sqrt{2}, & t_2 = (x_1 + x_3)/\sqrt{2}, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_0 = x_0 + t_1, & b_0 = -x_2 - t_2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_1 = x_0 - t_1, & b_1 = x_2 - t_2. +\end{array} +\end{equation} +% +For $N=5$, +% +\begin{equation} +\begin{array}{ll} +t_1 = x_1 - x_4, & t_2 = x_1 + x_4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_3 = x_2 - x_3, & t_4 = x_2 + x_3, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_5 = t_1 - t_3, & t_6 = x_0 + t_5 / 4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_7 = (\sqrt{5}/4)(t_1 + t_3) & +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_0 = t_6 + t_7, & b_0 = -\sin(2\pi/10) t_2 - \sin(2\pi/5) t_4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_1 = t_6 - t_7, & b_1 = -\sin(2\pi/5) t_2 + \sin(2\pi/10) t_4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_2 = x_0 - t_5 & +\end{array} +\end{equation} +% +For $N=6$, +% +\begin{equation} +\begin{array}{ll} +t_1 = \sin(\pi/3)(x_5 - x_1), & t_2 = \sin(\pi/3) (x_2 + x_4), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_3 = x_2 - x_4, & t_4 = x_1 + x_5, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_5 = x_0 + t_3 / 2, & t_6 = -x_3 - t_4 / 2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_0 = t_5 - t_1, & b_0 = t_6 - t_2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_1 = x_0 - t_3, & b_1 = x_3 - t_4, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +a_2 = t_5 + t_1, & b_2 = t_6 + t_2 +\end{array} +\end{equation} + +\section{Computing the mixed-radix inverse for real data} +% +To compute the inverse of the mixed-radix FFT on real data we step +through the algorithm in reverse and invert each operation. + +This gives the following algorithm using FFTPACK indexing, +% +\begin{algorithm} +\FOR{$i = n_f \dots 1$} +\FOR{$\mu = 0 \dots p_{i-1} - 1$} +\FOR{$b = 0 \dots q-1$} +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$t_{\lambda'} = + \sum_{\lambda'=0}^{f-1} W_f(\lambda,\lambda') + v_{b p + (\lambda p_{i-1} + \mu)}$} + \COMMENT{DFT matrix-multiply module} +\ENDFOR +\FOR{$\lambda = 0 \dots f-1$} +\STATE{$v'_{(\lambda'q + b)p_{i-1} + \mu} \Leftarrow + \omega^{-\mu\lambda'}_{p_{i}} t_\lambda$} +\ENDFOR + +\ENDFOR +\ENDFOR +\STATE{$v \Leftarrow v'$} +\ENDFOR +\end{algorithm} +% +When $\mu=0$ we are applying an inverse DFT to half-complex data, +giving a real result. The twiddle factors are all unity. We can code +this as a special case, just as we did for the forward routine. We +start with complex module and eliminate the redundant terms. In this +case it is the final result which has the zero imaginary part, and we +eliminate redundant terms by using the half-complex symmetry of the +input data. + +When $\mu=1 \dots p_{i-1}/2 - 1$ we have full complex transforms on +complex data, so no simplification is possible. + +When $\mu = p_{i-1}/2$ (which occurs only when $p_{i-1}$ is even) we +have a combination of twiddle factors and DFTs on data with the +shifted half-complex symmetry which give a real result. We implement +this as a special module, essentially by inverting the system of +equations given for the forward case. We use the modules given by +Temperton, appropriately modified for our version of the algorithm. He +uses a slightly different convention which differs by factors of two +for some terms (consult his paper for details~\cite{temperton83real}). + +For $N=2$, +% +\begin{equation} +\begin{array}{ll} +x_0 = 2 a_0, & x_1 = - 2 b_0 . +\end{array} +\end{equation} +% +For $N=3$, +% +\begin{equation} +\begin{array}{ll} +t_1 = a_0 - a_1, & t_2 = \sqrt{3} b_1, \\ +\end{array} +\end{equation} +\begin{equation} +\begin{array}{lll} +x_0 = 2 a_0 + a_1, & x_1 = t_1 - t_2, & x_2 = - t_1 - t_2 +\end{array} +\end{equation} +% +For $N=4$, +\begin{equation} +\begin{array}{ll} +t_1 = \sqrt{2} (b_0 + b_1), & t_2 = \sqrt{2} (a_0 - a_1), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +x_0 = 2(a_0 + a_1), & x_1 = t_2 - t_1 , +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +x_2 = 2(b_1 - b_0), & x_3 = -(t_2 + t_1). +\end{array} +\end{equation} +% +For $N=5$, +% +\begin{equation} +\begin{array}{ll} +t_1 = 2 (a_0 + a_1), & t_2 = t_1 / 4 - a_2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_3 = (\sqrt{5}/2) (a_0 - a_1), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{l} +t_4 = 2(\sin(2\pi/10) b_0 + \sin(2\pi/5) b_1), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{l} +t_5 = 2(\sin(2\pi/10) b_0 - \sin(2\pi/5) b_1), +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +t_6 = t_3 + t_2, & t_7 = t_3 - t_2, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +x_0 = t_1 + a_2, & x_1 = t_6 - t_4 , +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +x_2 = t_7 - t_5, & x_3 = - t_7 - t_5, +\end{array} +\end{equation} +\begin{equation} +\begin{array}{ll} +x_4 = -t_6 - t_4. +\end{array} +\end{equation} + +\section{Conclusions} +% +We have described the basic algorithms for one-dimensional radix-2 and +mixed-radix FFTs. It would be nice to have a pedagogical explanation +of the split-radix FFT algorithm, which is faster than the simple +radix-2 algorithm we used. We could also have a whole chapter on +multidimensional FFTs. +% +%\section{Multidimensional FFTs} +%\section{Testing FFTs, Numerical Analysis} + +%\nocite{*} +\bibliographystyle{unsrt} +\bibliography{fftalgorithms} + +\end{document} + + + + diff --git a/software/gsl-1.15/doc/final-route.eps b/software/gsl-1.15/doc/final-route.eps new file mode 100644 index 000000000..c2df8d1f0 --- /dev/null +++ b/software/gsl-1.15/doc/final-route.eps @@ -0,0 +1,11635 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Jan 4 10:56:46 2007 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 101 194 489 610 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 101 194 489 610 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3590 10017 +3590 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3605 10017 +3605 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +3502 10017 +3487 9930 +3487 10017 +3707 10017 +3707 9930 +3693 10017 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3546 9710 +3649 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3971 9973 +3986 10017 +3986 9930 +3971 9973 +3942 10003 +3898 10017 +3854 10017 +3810 10003 +3781 9973 +3781 9944 +3795 9915 +3810 9900 +3839 9886 +3927 9856 +3957 9842 +3986 9812 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3781 9944 +3810 9915 +3839 9900 +3927 9871 +3957 9856 +3971 9842 +3986 9812 +3986 9754 +3957 9724 +3913 9710 +3869 9710 +3825 9724 +3795 9754 +3781 9798 +3781 9710 +3795 9754 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4103 10017 +4103 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4118 10017 +4118 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4059 10017 +4235 10017 +4279 10003 +4294 9988 +4308 9959 +4308 9915 +4294 9886 +4279 9871 +4235 9856 +4118 9856 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4235 10017 +4264 10003 +4279 9988 +4294 9959 +4294 9915 +4279 9886 +4264 9871 +4235 9856 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4059 9710 +4162 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4646 9842 +4910 9842 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +5437 10003 +5423 9988 +5437 9973 +5452 9988 +5437 10003 +5408 10017 +5364 10017 +5320 10003 +5291 9973 +5276 9930 +5276 9710 +11 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +5364 10017 +5335 10003 +5305 9973 +5291 9930 +5291 9710 +5 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5437 9915 +5437 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5452 9915 +5452 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5232 9915 +5452 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5232 9710 +5335 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5393 9710 +5496 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5599 9915 +5599 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5613 9915 +5613 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5613 9871 +5643 9900 +5687 9915 +5716 9915 +5760 9900 +5775 9871 +5775 9710 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5716 9915 +5745 9900 +5760 9871 +5760 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5555 9915 +5613 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5555 9710 +5657 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5716 9710 +5819 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +5921 9886 +5921 9871 +5907 9871 +5907 9886 +5921 9900 +5951 9915 +6009 9915 +6039 9900 +6053 9886 +6068 9856 +6068 9754 +6083 9724 +6097 9710 +13 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +6053 9886 +6053 9754 +6068 9724 +6097 9710 +6112 9710 +5 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +6053 9856 +6039 9842 +5951 9827 +5907 9812 +5892 9783 +5892 9754 +5907 9724 +5951 9710 +5995 9710 +6024 9724 +6053 9754 +11 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5951 9827 +5921 9812 +5907 9783 +5907 9754 +5921 9724 +5951 9710 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6215 10017 +6215 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6229 10017 +6229 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6171 10017 +6229 10017 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6171 9710 +6273 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6361 9842 +6625 9842 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6845 9915 +6889 9900 +6918 9871 +6933 9827 +6933 9798 +6918 9754 +6889 9724 +6845 9710 +6816 9710 +6772 9724 +6742 9754 +6728 9798 +6728 9827 +6742 9871 +6772 9900 +6816 9915 +16 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6816 9915 +6786 9900 +6757 9871 +6742 9827 +6742 9798 +6757 9754 +6786 9724 +6816 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6845 9710 +6874 9724 +6904 9754 +6918 9798 +6918 9827 +6904 9871 +6874 9900 +6845 9915 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7050 9915 +7050 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7065 9915 +7065 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7065 9827 +7080 9871 +7109 9900 +7138 9915 +7182 9915 +7197 9900 +7197 9886 +7182 9871 +7168 9886 +7182 9900 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7006 9915 +7065 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7006 9710 +7109 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7446 10017 +7446 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7461 10017 +7461 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +7446 9871 +7417 9900 +7387 9915 +7358 9915 +7314 9900 +7285 9871 +7270 9827 +7270 9798 +7285 9754 +7314 9724 +7358 9710 +7387 9710 +7417 9724 +7446 9754 +14 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7358 9915 +7329 9900 +7299 9871 +7285 9827 +7285 9798 +7299 9754 +7329 9724 +7358 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7402 10017 +7461 10017 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7446 9710 +7505 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +7593 9827 +7769 9827 +7769 9856 +7754 9886 +7739 9900 +7710 9915 +7666 9915 +7622 9900 +7593 9871 +7578 9827 +7578 9798 +7593 9754 +7622 9724 +7666 9710 +7695 9710 +7739 9724 +7769 9754 +17 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +7754 9827 +7754 9871 +7739 9900 +3 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7666 9915 +7637 9900 +7607 9871 +7593 9827 +7593 9798 +7607 9754 +7637 9724 +7666 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7886 9915 +7886 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7901 9915 +7901 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7901 9827 +7915 9871 +7945 9900 +7974 9915 +8018 9915 +8033 9900 +8033 9886 +8018 9871 +8003 9886 +8018 9900 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7842 9915 +7901 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7842 9710 +7945 9710 +2 MLine +End + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2059 2097 +2172 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2235 2147 +2247 2153 +2266 2172 +2266 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2260 2166 +2260 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2235 2040 +2291 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2361 2147 +2373 2153 +2392 2172 +2392 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2386 2166 +2386 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2361 2040 +2417 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2524 2159 +2524 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2530 2172 +2530 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2530 2172 +2461 2078 +2562 2078 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2505 2040 +2549 2040 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2827 2097 +2940 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3003 2147 +3015 2153 +3034 2172 +3034 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3028 2166 +3028 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3003 2040 +3059 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3129 2147 +3141 2153 +3160 2172 +3160 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3154 2166 +3154 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3129 2040 +3185 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +3242 2147 +3248 2141 +3242 2134 +3235 2141 +3235 2147 +3242 2159 +3248 2166 +3267 2172 +3292 2172 +3311 2166 +3317 2159 +3323 2147 +3323 2134 +3317 2122 +3298 2109 +3267 2097 +3254 2090 +3242 2078 +3235 2059 +3235 2040 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3292 2172 +3304 2166 +3311 2159 +3317 2147 +3317 2134 +3311 2122 +3292 2109 +3267 2097 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +3235 2053 +3242 2059 +3254 2059 +3286 2046 +3304 2046 +3317 2053 +3323 2059 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +3254 2059 +3286 2040 +3311 2040 +3317 2046 +3323 2059 +3323 2072 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 9216 +3072 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 2304 +3072 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3595 2097 +3708 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3771 2147 +3783 2153 +3802 2172 +3802 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3796 2166 +3796 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3771 2040 +3827 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3897 2147 +3909 2153 +3928 2172 +3928 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3922 2166 +3922 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3897 2040 +3953 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4054 2172 +4072 2166 +4085 2147 +4091 2115 +4091 2097 +4085 2065 +4072 2046 +4054 2040 +4041 2040 +4022 2046 +4010 2065 +4003 2097 +4003 2115 +4010 2147 +4022 2166 +4041 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4041 2172 +4029 2166 +4022 2159 +4016 2147 +4010 2115 +4010 2097 +4016 2065 +4022 2053 +4029 2046 +4041 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4054 2040 +4066 2046 +4072 2053 +4079 2065 +4085 2097 +4085 2115 +4079 2147 +4072 2159 +4066 2166 +4054 2172 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 9216 +3840 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 2304 +3840 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4363 2097 +4476 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4539 2147 +4551 2153 +4570 2172 +4570 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4564 2166 +4564 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4539 2040 +4595 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4696 2172 +4715 2166 +4727 2147 +4734 2115 +4734 2097 +4727 2065 +4715 2046 +4696 2040 +4683 2040 +4665 2046 +4652 2065 +4646 2097 +4646 2115 +4652 2147 +4665 2166 +4683 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4683 2172 +4671 2166 +4665 2159 +4658 2147 +4652 2115 +4652 2097 +4658 2065 +4665 2053 +4671 2046 +4683 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4696 2040 +4709 2046 +4715 2053 +4721 2065 +4727 2097 +4727 2115 +4721 2147 +4715 2159 +4709 2166 +4696 2172 +10 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +4828 2172 +4847 2166 +4853 2153 +4853 2134 +4847 2122 +4828 2115 +4803 2115 +4784 2122 +4778 2134 +4778 2153 +4784 2166 +4803 2172 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4803 2172 +4790 2166 +4784 2153 +4784 2134 +4790 2122 +4803 2115 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4828 2115 +4840 2122 +4847 2134 +4847 2153 +4840 2166 +4828 2172 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4803 2115 +4784 2109 +4778 2103 +4771 2090 +4771 2065 +4778 2053 +4784 2046 +4803 2040 +4828 2040 +4847 2046 +4853 2053 +4859 2065 +4859 2090 +4853 2103 +4847 2109 +4828 2115 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4803 2115 +4790 2109 +4784 2103 +4778 2090 +4778 2065 +4784 2053 +4790 2046 +4803 2040 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4828 2040 +4840 2046 +4847 2053 +4853 2065 +4853 2090 +4847 2103 +4840 2109 +4828 2115 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5131 2097 +5244 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5307 2147 +5319 2153 +5338 2172 +5338 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5332 2166 +5332 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5307 2040 +5363 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5464 2172 +5483 2166 +5495 2147 +5502 2115 +5502 2097 +5495 2065 +5483 2046 +5464 2040 +5451 2040 +5433 2046 +5420 2065 +5414 2097 +5414 2115 +5420 2147 +5433 2166 +5451 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5451 2172 +5439 2166 +5433 2159 +5426 2147 +5420 2115 +5420 2097 +5426 2065 +5433 2053 +5439 2046 +5451 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5464 2040 +5477 2046 +5483 2053 +5489 2065 +5495 2097 +5495 2115 +5489 2147 +5483 2159 +5477 2166 +5464 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +5615 2153 +5608 2147 +5615 2141 +5621 2147 +5621 2153 +5615 2166 +5602 2172 +5583 2172 +5565 2166 +5552 2153 +5546 2141 +5539 2115 +5539 2078 +5546 2059 +5558 2046 +5577 2040 +5590 2040 +5608 2046 +5621 2059 +5627 2078 +5627 2084 +5621 2103 +5608 2115 +5590 2122 +5583 2122 +5565 2115 +5552 2103 +5546 2084 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +5583 2172 +5571 2166 +5558 2153 +5552 2141 +5546 2115 +5546 2078 +5552 2059 +5565 2046 +5577 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5590 2040 +5602 2046 +5615 2059 +5621 2078 +5621 2084 +5615 2103 +5602 2115 +5590 2122 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 9216 +5376 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 2304 +5376 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5899 2097 +6012 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6075 2147 +6087 2153 +6106 2172 +6106 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6100 2166 +6100 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6075 2040 +6131 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6232 2172 +6251 2166 +6263 2147 +6270 2115 +6270 2097 +6263 2065 +6251 2046 +6232 2040 +6219 2040 +6201 2046 +6188 2065 +6182 2097 +6182 2115 +6188 2147 +6201 2166 +6219 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6219 2172 +6207 2166 +6201 2159 +6194 2147 +6188 2115 +6188 2097 +6194 2065 +6201 2053 +6207 2046 +6219 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6232 2040 +6245 2046 +6251 2053 +6257 2065 +6263 2097 +6263 2115 +6257 2147 +6251 2159 +6245 2166 +6232 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6364 2159 +6364 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6370 2172 +6370 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6370 2172 +6301 2078 +6402 2078 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6345 2040 +6389 2040 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 9216 +6144 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 2304 +6144 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6667 2097 +6780 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6843 2147 +6855 2153 +6874 2172 +6874 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6868 2166 +6868 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6843 2040 +6899 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7000 2172 +7019 2166 +7031 2147 +7038 2115 +7038 2097 +7031 2065 +7019 2046 +7000 2040 +6987 2040 +6969 2046 +6956 2065 +6950 2097 +6950 2115 +6956 2147 +6969 2166 +6987 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6987 2172 +6975 2166 +6969 2159 +6962 2147 +6956 2115 +6956 2097 +6962 2065 +6969 2053 +6975 2046 +6987 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7000 2040 +7013 2046 +7019 2053 +7025 2065 +7031 2097 +7031 2115 +7025 2147 +7019 2159 +7013 2166 +7000 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +7082 2147 +7088 2141 +7082 2134 +7075 2141 +7075 2147 +7082 2159 +7088 2166 +7107 2172 +7132 2172 +7151 2166 +7157 2159 +7163 2147 +7163 2134 +7157 2122 +7138 2109 +7107 2097 +7094 2090 +7082 2078 +7075 2059 +7075 2040 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7132 2172 +7144 2166 +7151 2159 +7157 2147 +7157 2134 +7151 2122 +7132 2109 +7107 2097 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7075 2053 +7082 2059 +7094 2059 +7126 2046 +7144 2046 +7157 2053 +7163 2059 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +7094 2059 +7126 2040 +7151 2040 +7157 2046 +7163 2059 +7163 2072 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7435 2097 +7548 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +7611 2147 +7623 2153 +7642 2172 +7642 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7636 2166 +7636 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7611 2040 +7667 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7768 2172 +7787 2166 +7799 2147 +7806 2115 +7806 2097 +7799 2065 +7787 2046 +7768 2040 +7755 2040 +7737 2046 +7724 2065 +7718 2097 +7718 2115 +7724 2147 +7737 2166 +7755 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7755 2172 +7743 2166 +7737 2159 +7730 2147 +7724 2115 +7724 2097 +7730 2065 +7737 2053 +7743 2046 +7755 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7768 2040 +7781 2046 +7787 2053 +7793 2065 +7799 2097 +7799 2115 +7793 2147 +7787 2159 +7781 2166 +7768 2172 +10 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7894 2172 +7912 2166 +7925 2147 +7931 2115 +7931 2097 +7925 2065 +7912 2046 +7894 2040 +7881 2040 +7862 2046 +7850 2065 +7843 2097 +7843 2115 +7850 2147 +7862 2166 +7881 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7881 2172 +7869 2166 +7862 2159 +7856 2147 +7850 2115 +7850 2097 +7856 2065 +7862 2053 +7869 2046 +7881 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7894 2040 +7906 2046 +7912 2053 +7919 2065 +7925 2097 +7925 2115 +7919 2147 +7912 2159 +7906 2166 +7894 2172 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 9216 +7680 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 2304 +7680 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8266 2097 +8379 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +8505 2128 +8498 2109 +8486 2097 +8467 2090 +8461 2090 +8442 2097 +8429 2109 +8423 2128 +8423 2134 +8429 2153 +8442 2166 +8461 2172 +8473 2172 +8492 2166 +8505 2153 +8511 2134 +8511 2097 +8505 2072 +8498 2059 +8486 2046 +8467 2040 +8448 2040 +8435 2046 +8429 2059 +8429 2065 +8435 2072 +8442 2065 +8435 2059 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8461 2090 +8448 2097 +8435 2109 +8429 2128 +8429 2134 +8435 2153 +8448 2166 +8461 2172 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +8473 2172 +8486 2166 +8498 2153 +8505 2134 +8505 2097 +8498 2072 +8492 2059 +8479 2046 +8467 2040 +9 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +8605 2172 +8624 2166 +8630 2153 +8630 2134 +8624 2122 +8605 2115 +8580 2115 +8561 2122 +8555 2134 +8555 2153 +8561 2166 +8580 2172 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8580 2172 +8567 2166 +8561 2153 +8561 2134 +8567 2122 +8580 2115 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8605 2115 +8618 2122 +8624 2134 +8624 2153 +8618 2166 +8605 2172 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8580 2115 +8561 2109 +8555 2103 +8549 2090 +8549 2065 +8555 2053 +8561 2046 +8580 2040 +8605 2040 +8624 2046 +8630 2053 +8637 2065 +8637 2090 +8630 2103 +8624 2109 +8605 2115 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8580 2115 +8567 2109 +8561 2103 +8555 2090 +8555 2065 +8561 2053 +8567 2046 +8580 2040 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8605 2040 +8618 2046 +8624 2053 +8630 2065 +8630 2090 +8624 2103 +8618 2109 +8605 2115 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 9216 +8448 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 2304 +8448 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9034 2097 +9147 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +9273 2128 +9266 2109 +9254 2097 +9235 2090 +9229 2090 +9210 2097 +9197 2109 +9191 2128 +9191 2134 +9197 2153 +9210 2166 +9229 2172 +9241 2172 +9260 2166 +9273 2153 +9279 2134 +9279 2097 +9273 2072 +9266 2059 +9254 2046 +9235 2040 +9216 2040 +9203 2046 +9197 2059 +9197 2065 +9203 2072 +9210 2065 +9203 2059 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +9229 2090 +9216 2097 +9203 2109 +9197 2128 +9197 2134 +9203 2153 +9216 2166 +9229 2172 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +9241 2172 +9254 2166 +9266 2153 +9273 2134 +9273 2097 +9266 2072 +9260 2059 +9247 2046 +9235 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +9392 2153 +9386 2147 +9392 2141 +9398 2147 +9398 2153 +9392 2166 +9379 2172 +9361 2172 +9342 2166 +9329 2153 +9323 2141 +9317 2115 +9317 2078 +9323 2059 +9335 2046 +9354 2040 +9367 2040 +9386 2046 +9398 2059 +9405 2078 +9405 2084 +9398 2103 +9386 2115 +9367 2122 +9361 2122 +9342 2115 +9329 2103 +9323 2084 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +9361 2172 +9348 2166 +9335 2153 +9329 2141 +9323 2115 +9323 2078 +9329 2059 +9342 2046 +9354 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +9367 2040 +9379 2046 +9392 2059 +9398 2078 +9398 2084 +9392 2103 +9379 2115 +9367 2122 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2688 9216 +2688 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2688 2304 +2688 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 9216 +3072 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 2304 +3072 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 9216 +3456 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 2304 +3456 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 9216 +3840 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 2304 +3840 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4224 9216 +4224 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4224 2304 +4224 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4992 9216 +4992 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4992 2304 +4992 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 9216 +5376 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 2304 +5376 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 9216 +6144 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 2304 +6144 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6528 9216 +6528 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6528 2304 +6528 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7296 9216 +7296 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7296 2304 +7296 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 9216 +7680 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 2304 +7680 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 9216 +8064 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 2304 +8064 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 9216 +8448 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 2304 +8448 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8832 9216 +8832 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8832 2304 +8832 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 2354 +1980 2348 +1974 2342 +1968 2348 +1968 2354 +1974 2367 +1980 2373 +1999 2379 +2024 2379 +2043 2373 +2050 2361 +2050 2342 +2043 2329 +2024 2323 +2006 2323 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 2379 +2037 2373 +2043 2361 +2043 2342 +2037 2329 +2024 2323 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 2323 +2037 2317 +2050 2304 +2056 2291 +2056 2273 +2050 2260 +2043 2254 +2024 2247 +1999 2247 +1980 2254 +1974 2260 +1968 2273 +1968 2279 +1974 2285 +1980 2279 +1974 2273 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 2310 +2050 2291 +2050 2273 +2043 2260 +2037 2254 +2024 2247 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +2100 2354 +2106 2348 +2100 2342 +2093 2348 +2093 2354 +2100 2367 +2106 2373 +2125 2379 +2150 2379 +2169 2373 +2175 2367 +2181 2354 +2181 2342 +2175 2329 +2156 2317 +2125 2304 +2112 2298 +2100 2285 +2093 2266 +2093 2247 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2150 2379 +2163 2373 +2169 2367 +2175 2354 +2175 2342 +2169 2329 +2150 2317 +2125 2304 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2093 2260 +2100 2266 +2112 2266 +2144 2254 +2163 2254 +2175 2260 +2181 2266 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2112 2266 +2144 2247 +2169 2247 +2175 2254 +2181 2266 +2181 2279 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 3506 +1980 3500 +1974 3494 +1968 3500 +1968 3506 +1974 3519 +1980 3525 +1999 3531 +2024 3531 +2043 3525 +2050 3513 +2050 3494 +2043 3481 +2024 3475 +2006 3475 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 3531 +2037 3525 +2043 3513 +2043 3494 +2037 3481 +2024 3475 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 3475 +2037 3469 +2050 3456 +2056 3443 +2056 3425 +2050 3412 +2043 3406 +2024 3399 +1999 3399 +1980 3406 +1974 3412 +1968 3425 +1968 3431 +1974 3437 +1980 3431 +1974 3425 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 3462 +2050 3443 +2050 3425 +2043 3412 +2037 3406 +2024 3399 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +2100 3506 +2106 3500 +2100 3494 +2093 3500 +2093 3506 +2100 3519 +2106 3525 +2125 3531 +2150 3531 +2169 3525 +2175 3513 +2175 3494 +2169 3481 +2150 3475 +2131 3475 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2150 3531 +2163 3525 +2169 3513 +2169 3494 +2163 3481 +2150 3475 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2150 3475 +2163 3469 +2175 3456 +2181 3443 +2181 3425 +2175 3412 +2169 3406 +2150 3399 +2125 3399 +2106 3406 +2100 3412 +2093 3425 +2093 3431 +2100 3437 +2106 3431 +2100 3425 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2169 3462 +2175 3443 +2175 3425 +2169 3412 +2163 3406 +2150 3399 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9078 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2442 3456 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 4658 +1980 4652 +1974 4646 +1968 4652 +1968 4658 +1974 4671 +1980 4677 +1999 4683 +2024 4683 +2043 4677 +2050 4665 +2050 4646 +2043 4633 +2024 4627 +2006 4627 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 4683 +2037 4677 +2043 4665 +2043 4646 +2037 4633 +2024 4627 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 4627 +2037 4621 +2050 4608 +2056 4595 +2056 4577 +2050 4564 +2043 4558 +2024 4551 +1999 4551 +1980 4558 +1974 4564 +1968 4577 +1968 4583 +1974 4589 +1980 4583 +1974 4577 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 4614 +2050 4595 +2050 4577 +2043 4564 +2037 4558 +2024 4551 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2150 4671 +2150 4551 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2156 4683 +2156 4551 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2156 4683 +2087 4589 +2188 4589 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2131 4551 +2175 4551 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9078 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2442 4608 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 5810 +1980 5804 +1974 5798 +1968 5804 +1968 5810 +1974 5823 +1980 5829 +1999 5835 +2024 5835 +2043 5829 +2050 5817 +2050 5798 +2043 5785 +2024 5779 +2006 5779 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 5835 +2037 5829 +2043 5817 +2043 5798 +2037 5785 +2024 5779 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 5779 +2037 5773 +2050 5760 +2056 5747 +2056 5729 +2050 5716 +2043 5710 +2024 5703 +1999 5703 +1980 5710 +1974 5716 +1968 5729 +1968 5735 +1974 5741 +1980 5735 +1974 5729 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 5766 +2050 5747 +2050 5729 +2043 5716 +2037 5710 +2024 5703 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2106 5835 +2093 5773 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2093 5773 +2106 5785 +2125 5791 +2144 5791 +2163 5785 +2175 5773 +2181 5754 +2181 5741 +2175 5722 +2163 5710 +2144 5703 +2125 5703 +2106 5710 +2100 5716 +2093 5729 +2093 5735 +2100 5741 +2106 5735 +2100 5729 +19 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2144 5791 +2156 5785 +2169 5773 +2175 5754 +2175 5741 +2169 5722 +2156 5710 +2144 5703 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2106 5835 +2169 5835 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2106 5829 +2137 5829 +2169 5835 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9078 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2442 5760 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 6962 +1980 6956 +1974 6950 +1968 6956 +1968 6962 +1974 6975 +1980 6981 +1999 6987 +2024 6987 +2043 6981 +2050 6969 +2050 6950 +2043 6937 +2024 6931 +2006 6931 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 6987 +2037 6981 +2043 6969 +2043 6950 +2037 6937 +2024 6931 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 6931 +2037 6925 +2050 6912 +2056 6899 +2056 6881 +2050 6868 +2043 6862 +2024 6855 +1999 6855 +1980 6862 +1974 6868 +1968 6881 +1968 6887 +1974 6893 +1980 6887 +1974 6881 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 6918 +2050 6899 +2050 6881 +2043 6868 +2037 6862 +2024 6855 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2169 6969 +2163 6962 +2169 6956 +2175 6962 +2175 6969 +2169 6981 +2156 6987 +2137 6987 +2119 6981 +2106 6969 +2100 6956 +2093 6931 +2093 6893 +2100 6874 +2112 6862 +2131 6855 +2144 6855 +2163 6862 +2175 6874 +2181 6893 +2181 6899 +2175 6918 +2163 6931 +2144 6937 +2137 6937 +2119 6931 +2106 6918 +2100 6899 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2137 6987 +2125 6981 +2112 6969 +2106 6956 +2100 6931 +2100 6893 +2106 6874 +2119 6862 +2131 6855 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2144 6855 +2156 6862 +2169 6874 +2175 6893 +2175 6899 +2169 6918 +2156 6931 +2144 6937 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9078 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2442 6912 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 8114 +1980 8108 +1974 8102 +1968 8108 +1968 8114 +1974 8127 +1980 8133 +1999 8139 +2024 8139 +2043 8133 +2050 8121 +2050 8102 +2043 8089 +2024 8083 +2006 8083 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 8139 +2037 8133 +2043 8121 +2043 8102 +2037 8089 +2024 8083 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 8083 +2037 8077 +2050 8064 +2056 8051 +2056 8033 +2050 8020 +2043 8014 +2024 8007 +1999 8007 +1980 8014 +1974 8020 +1968 8033 +1968 8039 +1974 8045 +1980 8039 +1974 8033 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 8070 +2050 8051 +2050 8033 +2043 8020 +2037 8014 +2024 8007 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2093 8139 +2093 8102 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2093 8114 +2100 8127 +2112 8139 +2125 8139 +2156 8121 +2169 8121 +2175 8127 +2181 8139 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2100 8127 +2112 8133 +2125 8133 +2156 8121 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2181 8139 +2181 8121 +2175 8102 +2150 8070 +2144 8058 +2137 8039 +2137 8007 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +2175 8102 +2144 8070 +2137 8058 +2131 8039 +2131 8007 +5 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9078 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2442 8064 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 9266 +1980 9260 +1974 9254 +1968 9260 +1968 9266 +1974 9279 +1980 9285 +1999 9291 +2024 9291 +2043 9285 +2050 9273 +2050 9254 +2043 9241 +2024 9235 +2006 9235 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 9291 +2037 9285 +2043 9273 +2043 9254 +2037 9241 +2024 9235 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 9235 +2037 9229 +2050 9216 +2056 9203 +2056 9185 +2050 9172 +2043 9166 +2024 9159 +1999 9159 +1980 9166 +1974 9172 +1968 9185 +1968 9191 +1974 9197 +1980 9191 +1974 9185 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 9222 +2050 9203 +2050 9185 +2043 9172 +2037 9166 +2024 9159 +6 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +2150 9291 +2169 9285 +2175 9273 +2175 9254 +2169 9241 +2150 9235 +2125 9235 +2106 9241 +2100 9254 +2100 9273 +2106 9285 +2125 9291 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2125 9291 +2112 9285 +2106 9273 +2106 9254 +2112 9241 +2125 9235 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2150 9235 +2163 9241 +2169 9254 +2169 9273 +2163 9285 +2150 9291 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2125 9235 +2106 9229 +2100 9222 +2093 9210 +2093 9185 +2100 9172 +2106 9166 +2125 9159 +2150 9159 +2169 9166 +2175 9172 +2181 9185 +2181 9210 +2175 9222 +2169 9229 +2150 9235 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2125 9235 +2112 9229 +2106 9222 +2100 9210 +2100 9185 +2106 9172 +2112 9166 +2125 9159 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2150 9159 +2163 9166 +2169 9172 +2175 9185 +2175 9210 +2169 9222 +2163 9229 +2150 9235 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2880 +9161 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2880 +2359 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9161 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2359 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9161 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2359 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9161 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2359 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5184 +9161 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5184 +2359 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6336 +9161 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6336 +2359 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9161 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2359 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7488 +9161 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7488 +2359 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9161 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2359 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8640 +9161 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8640 +2359 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4384 1906 +4384 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4390 1906 +4390 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4365 1906 +4390 1906 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4365 1774 +4409 1774 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4491 1862 +4510 1856 +4522 1843 +4528 1824 +4528 1812 +4522 1793 +4510 1780 +4491 1774 +4478 1774 +4459 1780 +4447 1793 +4440 1812 +4440 1824 +4447 1843 +4459 1856 +4478 1862 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4478 1862 +4466 1856 +4453 1843 +4447 1824 +4447 1812 +4453 1793 +4466 1780 +4478 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4491 1774 +4503 1780 +4516 1793 +4522 1812 +4522 1824 +4516 1843 +4503 1856 +4491 1862 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4579 1862 +4579 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4585 1862 +4585 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4585 1843 +4598 1856 +4616 1862 +4629 1862 +4648 1856 +4654 1843 +4654 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4629 1862 +4642 1856 +4648 1843 +4648 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4560 1862 +4585 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4560 1774 +4604 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4629 1774 +4673 1774 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4748 1862 +4761 1856 +4767 1849 +4773 1837 +4773 1824 +4767 1812 +4761 1805 +4748 1799 +4736 1799 +4723 1805 +4717 1812 +4711 1824 +4711 1837 +4717 1849 +4723 1856 +4736 1862 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4723 1856 +4717 1843 +4717 1818 +4723 1805 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4761 1805 +4767 1818 +4767 1843 +4761 1856 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +4767 1849 +4773 1856 +4786 1862 +4786 1856 +4773 1856 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4717 1812 +4711 1805 +4704 1793 +4704 1787 +4711 1774 +4729 1768 +4761 1768 +4780 1761 +4786 1755 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +4704 1787 +4711 1780 +4729 1774 +4761 1774 +4780 1768 +4786 1755 +4786 1749 +4780 1736 +4761 1730 +4723 1730 +4704 1736 +4698 1749 +4698 1755 +4704 1768 +4723 1774 +15 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4843 1900 +4836 1893 +4830 1900 +4836 1906 +4 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4836 1862 +4836 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4843 1862 +4843 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4817 1862 +4843 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4817 1774 +4861 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4905 1906 +4905 1799 +4912 1780 +4924 1774 +4937 1774 +4949 1780 +4956 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4912 1906 +4912 1799 +4918 1780 +4924 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4887 1862 +4937 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5000 1862 +5000 1793 +5006 1780 +5025 1774 +5037 1774 +5056 1780 +5069 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5006 1862 +5006 1793 +5012 1780 +5025 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 1862 +5069 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5075 1862 +5075 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4981 1862 +5006 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5050 1862 +5075 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 1774 +5094 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5201 1906 +5201 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5207 1906 +5207 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +5201 1843 +5188 1856 +5176 1862 +5163 1862 +5144 1856 +5132 1843 +5125 1824 +5125 1812 +5132 1793 +5144 1780 +5163 1774 +5176 1774 +5188 1780 +5201 1793 +14 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5163 1862 +5150 1856 +5138 1843 +5132 1824 +5132 1812 +5138 1793 +5150 1780 +5163 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5182 1906 +5207 1906 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5201 1774 +5226 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5264 1824 +5339 1824 +5339 1837 +5333 1849 +5326 1856 +5314 1862 +5295 1862 +5276 1856 +5264 1843 +5257 1824 +5257 1812 +5264 1793 +5276 1780 +5295 1774 +5308 1774 +5326 1780 +5339 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5333 1824 +5333 1843 +5326 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5295 1862 +5282 1856 +5270 1843 +5264 1824 +5264 1812 +5270 1793 +5282 1780 +5295 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5528 1931 +5515 1918 +5502 1900 +5490 1875 +5484 1843 +5484 1818 +5490 1787 +5502 1761 +5515 1743 +5528 1730 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5515 1918 +5502 1893 +5496 1875 +5490 1843 +5490 1818 +5496 1787 +5502 1768 +5515 1743 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5571 1831 +5685 1831 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5842 1862 +5842 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5848 1862 +5848 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5848 1843 +5861 1856 +5879 1862 +5892 1862 +5911 1856 +5917 1843 +5917 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5892 1862 +5905 1856 +5911 1843 +5911 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5917 1843 +5930 1856 +5949 1862 +5961 1862 +5980 1856 +5986 1843 +5986 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5961 1862 +5974 1856 +5980 1843 +5980 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5823 1862 +5848 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5823 1774 +5867 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5892 1774 +5936 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5961 1774 +6005 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +6043 1824 +6118 1824 +6118 1837 +6112 1849 +6106 1856 +6093 1862 +6074 1862 +6055 1856 +6043 1843 +6036 1824 +6036 1812 +6043 1793 +6055 1780 +6074 1774 +6087 1774 +6106 1780 +6118 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6112 1824 +6112 1843 +6106 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6074 1862 +6062 1856 +6049 1843 +6043 1824 +6043 1812 +6049 1793 +6062 1780 +6074 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +6168 1849 +6168 1843 +6162 1843 +6162 1849 +6168 1856 +6181 1862 +6206 1862 +6219 1856 +6225 1849 +6231 1837 +6231 1793 +6238 1780 +6244 1774 +13 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +6225 1849 +6225 1793 +6231 1780 +6244 1774 +6250 1774 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +6225 1837 +6219 1831 +6181 1824 +6162 1818 +6156 1805 +6156 1793 +6162 1780 +6181 1774 +6200 1774 +6212 1780 +6225 1793 +11 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6181 1824 +6168 1818 +6162 1805 +6162 1793 +6168 1780 +6181 1774 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6294 1862 +6294 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6300 1862 +6300 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6300 1843 +6313 1856 +6332 1862 +6344 1862 +6363 1856 +6370 1843 +6370 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6344 1862 +6357 1856 +6363 1843 +6363 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6275 1862 +6300 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6275 1774 +6319 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6344 1774 +6388 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6483 1849 +6489 1862 +6489 1837 +6483 1849 +6476 1856 +6464 1862 +6439 1862 +6426 1856 +6420 1849 +6420 1837 +6426 1831 +6439 1824 +6470 1812 +6483 1805 +6489 1799 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6420 1843 +6426 1837 +6439 1831 +6470 1818 +6483 1812 +6489 1805 +6489 1787 +6483 1780 +6470 1774 +6445 1774 +6432 1780 +6426 1787 +6420 1799 +6420 1774 +6426 1787 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6633 1862 +6659 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6640 1862 +6659 1793 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6684 1862 +6659 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6684 1862 +6709 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6690 1862 +6709 1793 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6734 1862 +6709 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6615 1862 +6659 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6715 1862 +6753 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +6784 1824 +6860 1824 +6860 1837 +6853 1849 +6847 1856 +6835 1862 +6816 1862 +6797 1856 +6784 1843 +6778 1824 +6778 1812 +6784 1793 +6797 1780 +6816 1774 +6828 1774 +6847 1780 +6860 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6853 1824 +6853 1843 +6847 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6816 1862 +6803 1856 +6791 1843 +6784 1824 +6784 1812 +6791 1793 +6803 1780 +6816 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6960 1849 +6966 1862 +6966 1837 +6960 1849 +6954 1856 +6941 1862 +6916 1862 +6904 1856 +6897 1849 +6897 1837 +6904 1831 +6916 1824 +6948 1812 +6960 1805 +6966 1799 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6897 1843 +6904 1837 +6916 1831 +6948 1818 +6960 1812 +6966 1805 +6966 1787 +6960 1780 +6948 1774 +6922 1774 +6910 1780 +6904 1787 +6897 1799 +6897 1774 +6904 1787 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7017 1906 +7017 1799 +7023 1780 +7036 1774 +7048 1774 +7061 1780 +7067 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +7023 1906 +7023 1799 +7029 1780 +7036 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6998 1862 +7048 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7098 1931 +7111 1918 +7124 1900 +7136 1875 +7142 1843 +7142 1818 +7136 1787 +7124 1761 +7111 1743 +7098 1730 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7111 1918 +7124 1893 +7130 1875 +7136 1843 +7136 1818 +7130 1787 +7124 1768 +7111 1743 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5370 +1804 5370 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5377 +1804 5377 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5352 +1672 5377 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5352 +1804 5396 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +1729 5440 +1735 5440 +1735 5433 +1729 5433 +1723 5440 +1716 5452 +1716 5477 +1723 5490 +1729 5496 +1742 5502 +1786 5502 +1798 5509 +1804 5515 +13 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +1729 5496 +1786 5496 +1798 5502 +1804 5515 +1804 5521 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +1742 5496 +1748 5490 +1754 5452 +1760 5433 +1773 5427 +1786 5427 +1798 5433 +1804 5452 +1804 5471 +1798 5484 +1786 5496 +11 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1754 5452 +1760 5440 +1773 5433 +1786 5433 +1798 5440 +1804 5452 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1672 5565 +1779 5565 +1798 5571 +1804 5584 +1804 5597 +1798 5609 +1786 5615 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1672 5571 +1779 5571 +1798 5578 +1804 5584 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5546 +1716 5597 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1679 5666 +1685 5659 +1679 5653 +1672 5659 +4 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5659 +1804 5659 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5666 +1804 5666 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5641 +1716 5666 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5641 +1804 5685 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1672 5729 +1779 5729 +1798 5735 +1804 5747 +1804 5760 +1798 5773 +1786 5779 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1672 5735 +1779 5735 +1798 5741 +1804 5747 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5710 +1716 5760 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1716 5823 +1786 5823 +1798 5829 +1804 5848 +1804 5861 +1798 5879 +1786 5892 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 5829 +1786 5829 +1798 5835 +1804 5848 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5892 +1804 5892 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5898 +1804 5898 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5804 +1716 5829 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5873 +1716 5898 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5892 +1804 5917 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6024 +1804 6024 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6030 +1804 6030 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +1735 6024 +1723 6011 +1716 5999 +1716 5986 +1723 5967 +1735 5955 +1754 5949 +1767 5949 +1786 5955 +1798 5967 +1804 5986 +1804 5999 +1798 6011 +1786 6024 +14 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1716 5986 +1723 5974 +1735 5961 +1754 5955 +1767 5955 +1786 5961 +1798 5974 +1804 5986 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6005 +1672 6030 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 6024 +1804 6049 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +1754 6087 +1754 6162 +1742 6162 +1729 6156 +1723 6150 +1716 6137 +1716 6118 +1723 6099 +1735 6087 +1754 6080 +1767 6080 +1786 6087 +1798 6099 +1804 6118 +1804 6131 +1798 6150 +1786 6162 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1754 6156 +1735 6156 +1723 6150 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1716 6118 +1723 6106 +1735 6093 +1754 6087 +1767 6087 +1786 6093 +1798 6106 +1804 6118 +8 MLine +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5395 6543 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6451 5080 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8920 3214 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5084 2696 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3045 4078 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4324 6359 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4385 8467 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4658 8398 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4669 5933 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5138 5898 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5268 6785 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5407 6647 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5395 6543 32 Circ +End + +Begin %I Poly +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +5407 6647 +5268 6785 +5138 5898 +4669 5933 +4658 8398 +4385 8467 +4324 6359 +3045 4078 +5084 2696 +8920 3214 +6451 5080 +5395 6543 +12 Poly +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/fit-exp.eps b/software/gsl-1.15/doc/fit-exp.eps new file mode 100644 index 000000000..da25ffeac --- /dev/null +++ b/software/gsl-1.15/doc/fit-exp.eps @@ -0,0 +1,767 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tmp.eps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Sun Sep 24 21:06:38 2000 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 410 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +392 420 M +63 0 V +6577 0 R +-63 0 V +308 420 M +(0) Rshow +392 1056 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(1) Rshow +392 1692 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(2) Rshow +392 2328 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(3) Rshow +392 2964 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(4) Rshow +392 3600 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(5) Rshow +392 4236 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(6) Rshow +392 4872 M +63 0 V +6577 0 R +-63 0 V +-6661 0 R +(7) Rshow +392 420 M +0 63 V +0 4389 R +0 -63 V +392 280 M +(0) Cshow +1222 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(5) Cshow +2052 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(10) Cshow +2882 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(15) Cshow +3712 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(20) Cshow +4542 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(25) Cshow +5372 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(30) Cshow +6202 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(35) Cshow +7032 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(40) Cshow +1.000 UL +LTb +392 420 M +6640 0 V +0 4452 V +-6640 0 V +392 420 L +0 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(y) Cshow +grestore +3712 140 M +(t) Cshow +1.000 UP +1.000 UL +LT0 +6381 4739 M +('data' using 2:3:4) Rshow +6465 4739 M +399 0 V +-399 31 R +0 -62 V +399 62 R +0 -62 V +392 4100 M +0 127 V +361 4100 M +62 0 V +-62 127 R +62 0 V +558 3929 M +0 128 V +527 3929 M +62 0 V +-62 128 R +62 0 V +724 3679 M +0 127 V +693 3679 M +62 0 V +-62 127 R +62 0 V +890 3396 M +0 127 V +859 3396 M +62 0 V +-62 127 R +62 0 V +135 -334 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -359 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -372 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -186 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -361 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -370 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -123 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -161 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -220 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -447 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -12 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -378 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -120 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -125 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -283 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -69 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -272 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -173 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -48 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -249 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -57 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -278 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -88 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -155 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -73 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -349 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 59 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -260 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -146 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -39 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -218 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -135 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -156 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -72 R +0 127 V +-31 -127 R +62 0 V +-62 127 R +62 0 V +135 -86 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +135 -159 R +0 128 V +-31 -128 R +62 0 V +-62 128 R +62 0 V +392 4164 Pls +558 3993 Pls +724 3742 Pls +890 3459 Pls +1056 3253 Pls +1222 3021 Pls +1388 2776 Pls +1554 2717 Pls +1720 2483 Pls +1886 2239 Pls +2052 2244 Pls +2218 2211 Pls +2384 2118 Pls +2550 1798 Pls +2716 1912 Pls +2882 1662 Pls +3048 1669 Pls +3214 1672 Pls +3380 1517 Pls +3546 1575 Pls +3712 1429 Pls +3878 1384 Pls +4044 1463 Pls +4210 1342 Pls +4376 1411 Pls +4542 1261 Pls +4708 1301 Pls +4874 1273 Pls +5040 1327 Pls +5206 1104 Pls +5372 1290 Pls +5538 1158 Pls +5704 1139 Pls +5870 1228 Pls +6036 1136 Pls +6202 1129 Pls +6368 1100 Pls +6534 1156 Pls +6700 1197 Pls +6866 1166 Pls +6664 4739 Pls +1.000 UL +LT1 +6381 4599 M +(f\(x\)) Rshow +6465 4599 M +399 0 V +392 4251 M +67 -127 V +67 -122 V +67 -117 V +67 -112 V +67 -108 V +67 -104 V +67 -99 V +68 -96 V +67 -92 V +67 -88 V +67 -84 V +67 -81 V +67 -78 V +67 -75 V +67 -72 V +67 -69 V +67 -66 V +67 -64 V +67 -61 V +67 -59 V +67 -56 V +68 -54 V +67 -52 V +67 -50 V +67 -48 V +67 -46 V +67 -44 V +67 -42 V +67 -41 V +67 -39 V +67 -38 V +67 -36 V +67 -34 V +67 -33 V +67 -32 V +68 -31 V +67 -29 V +67 -29 V +67 -27 V +67 -26 V +67 -25 V +67 -24 V +67 -23 V +67 -22 V +67 -21 V +67 -20 V +67 -20 V +67 -19 V +67 -18 V +68 -17 V +67 -17 V +67 -16 V +67 -15 V +67 -15 V +67 -14 V +67 -14 V +67 -13 V +67 -12 V +67 -12 V +67 -12 V +67 -11 V +67 -11 V +67 -10 V +68 -10 V +67 -9 V +67 -9 V +67 -9 V +67 -8 V +67 -8 V +67 -8 V +67 -7 V +67 -7 V +67 -7 V +67 -7 V +67 -6 V +67 -6 V +67 -6 V +68 -5 V +67 -6 V +67 -5 V +67 -5 V +67 -4 V +67 -5 V +67 -4 V +67 -4 V +67 -4 V +67 -4 V +67 -4 V +67 -4 V +67 -3 V +67 -3 V +68 -3 V +67 -3 V +67 -3 V +67 -3 V +67 -3 V +67 -2 V +67 -3 V +67 -2 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/fit-wlinear.eps b/software/gsl-1.15/doc/fit-wlinear.eps new file mode 100644 index 000000000..2b2737b31 --- /dev/null +++ b/software/gsl-1.15/doc/fit-wlinear.eps @@ -0,0 +1,6958 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 1.6 +%%Title: PostScript plot +%%CreationDate: Sun Aug 6 11:26:34 2000 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 85 180 500 576 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/arrowWidth 4 def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eofill +} { +eoclip +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eofill +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 85 180 500 576 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Poly +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2304 2304 +2304 9216 +9216 9216 +9216 2304 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1930 2107 +1952 2118 +1985 2151 +1985 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1974 2140 +1974 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1930 1920 +2029 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2260 2074 +2249 2041 +2227 2019 +2194 2008 +2183 2008 +2150 2019 +2128 2041 +2117 2074 +2117 2085 +2128 2118 +2150 2140 +2183 2151 +2205 2151 +2238 2140 +2260 2118 +2271 2085 +2271 2019 +2260 1975 +2249 1953 +2227 1931 +2194 1920 +2161 1920 +2139 1931 +2128 1953 +2128 1964 +2139 1975 +2150 1964 +2139 1953 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2183 2008 +2161 2019 +2139 2041 +2128 2074 +2128 2085 +2139 2118 +2161 2140 +2183 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2205 2151 +2227 2140 +2249 2118 +2260 2085 +2260 2019 +2249 1975 +2238 1953 +2216 1931 +2194 1920 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2469 2118 +2458 2107 +2469 2096 +2480 2107 +2480 2118 +2469 2140 +2447 2151 +2414 2151 +2381 2140 +2359 2118 +2348 2096 +2337 2052 +2337 1986 +2348 1953 +2370 1931 +2403 1920 +2425 1920 +2458 1931 +2480 1953 +2491 1986 +2491 1997 +2480 2030 +2458 2052 +2425 2063 +2414 2063 +2381 2052 +2359 2030 +2348 1997 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2414 2151 +2392 2140 +2370 2118 +2359 2096 +2348 2052 +2348 1986 +2359 1953 +2381 1931 +2403 1920 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2425 1920 +2447 1931 +2469 1953 +2480 1986 +2480 1997 +2469 2030 +2447 2052 +2425 2063 +8 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2623 2151 +2590 2140 +2568 2107 +2557 2052 +2557 2019 +2568 1964 +2590 1931 +2623 1920 +2645 1920 +2678 1931 +2700 1964 +2711 2019 +2711 2052 +2700 2107 +2678 2140 +2645 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2623 2151 +2601 2140 +2590 2129 +2579 2107 +2568 2052 +2568 2019 +2579 1964 +2590 1942 +2601 1931 +2623 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2645 1920 +2667 1931 +2678 1942 +2689 1964 +2700 2019 +2700 2052 +2689 2107 +2678 2129 +2667 2140 +2645 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3313 2107 +3335 2118 +3368 2151 +3368 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3357 2140 +3357 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3313 1920 +3411 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +3642 2074 +3631 2041 +3609 2019 +3576 2008 +3565 2008 +3532 2019 +3510 2041 +3499 2074 +3499 2085 +3510 2118 +3532 2140 +3565 2151 +3587 2151 +3620 2140 +3642 2118 +3653 2085 +3653 2019 +3642 1975 +3631 1953 +3609 1931 +3576 1920 +3543 1920 +3521 1931 +3510 1953 +3510 1964 +3521 1975 +3532 1964 +3521 1953 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3565 2008 +3543 2019 +3521 2041 +3510 2074 +3510 2085 +3521 2118 +3543 2140 +3565 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +3587 2151 +3609 2140 +3631 2118 +3642 2085 +3642 2019 +3631 1975 +3620 1953 +3598 1931 +3576 1920 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3719 2151 +3719 2085 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3719 2107 +3730 2129 +3752 2151 +3774 2151 +3829 2118 +3851 2118 +3862 2129 +3873 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3730 2129 +3752 2140 +3774 2140 +3829 2118 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +3873 2151 +3873 2118 +3862 2085 +3818 2030 +3807 2008 +3796 1975 +3796 1920 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +3862 2085 +3807 2030 +3796 2008 +3785 1975 +3785 1920 +5 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4005 2151 +3972 2140 +3950 2107 +3939 2052 +3939 2019 +3950 1964 +3972 1931 +4005 1920 +4027 1920 +4060 1931 +4082 1964 +4093 2019 +4093 2052 +4082 2107 +4060 2140 +4027 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4005 2151 +3983 2140 +3972 2129 +3961 2107 +3950 2052 +3950 2019 +3961 1964 +3972 1942 +3983 1931 +4005 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4027 1920 +4049 1931 +4060 1942 +4071 1964 +4082 2019 +4082 2052 +4071 2107 +4060 2129 +4049 2140 +4027 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4695 2107 +4717 2118 +4750 2151 +4750 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4739 2140 +4739 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4695 1920 +4794 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +5025 2074 +5014 2041 +4992 2019 +4959 2008 +4948 2008 +4915 2019 +4893 2041 +4882 2074 +4882 2085 +4893 2118 +4915 2140 +4948 2151 +4970 2151 +5003 2140 +5025 2118 +5036 2085 +5036 2019 +5025 1975 +5014 1953 +4992 1931 +4959 1920 +4926 1920 +4904 1931 +4893 1953 +4893 1964 +4904 1975 +4915 1964 +4904 1953 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4948 2008 +4926 2019 +4904 2041 +4893 2074 +4893 2085 +4904 2118 +4926 2140 +4948 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4970 2151 +4992 2140 +5014 2118 +5025 2085 +5025 2019 +5014 1975 +5003 1953 +4981 1931 +4959 1920 +9 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +5157 2151 +5124 2140 +5113 2118 +5113 2085 +5124 2063 +5157 2052 +5201 2052 +5234 2063 +5245 2085 +5245 2118 +5234 2140 +5201 2151 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5157 2151 +5135 2140 +5124 2118 +5124 2085 +5135 2063 +5157 2052 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5201 2052 +5223 2063 +5234 2085 +5234 2118 +5223 2140 +5201 2151 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5157 2052 +5124 2041 +5113 2030 +5102 2008 +5102 1964 +5113 1942 +5124 1931 +5157 1920 +5201 1920 +5234 1931 +5245 1942 +5256 1964 +5256 2008 +5245 2030 +5234 2041 +5201 2052 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5157 2052 +5135 2041 +5124 2030 +5113 2008 +5113 1964 +5124 1942 +5135 1931 +5157 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5201 1920 +5223 1931 +5234 1942 +5245 1964 +5245 2008 +5234 2030 +5223 2041 +5201 2052 +8 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5388 2151 +5355 2140 +5333 2107 +5322 2052 +5322 2019 +5333 1964 +5355 1931 +5388 1920 +5410 1920 +5443 1931 +5465 1964 +5476 2019 +5476 2052 +5465 2107 +5443 2140 +5410 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5388 2151 +5366 2140 +5355 2129 +5344 2107 +5333 2052 +5333 2019 +5344 1964 +5355 1942 +5366 1931 +5388 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5410 1920 +5432 1931 +5443 1942 +5454 1964 +5465 2019 +5465 2052 +5454 2107 +5443 2129 +5432 2140 +5410 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6077 2107 +6099 2118 +6132 2151 +6132 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6121 2140 +6121 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6077 1920 +6176 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +6407 2074 +6396 2041 +6374 2019 +6341 2008 +6330 2008 +6297 2019 +6275 2041 +6264 2074 +6264 2085 +6275 2118 +6297 2140 +6330 2151 +6352 2151 +6385 2140 +6407 2118 +6418 2085 +6418 2019 +6407 1975 +6396 1953 +6374 1931 +6341 1920 +6308 1920 +6286 1931 +6275 1953 +6275 1964 +6286 1975 +6297 1964 +6286 1953 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6330 2008 +6308 2019 +6286 2041 +6275 2074 +6275 2085 +6286 2118 +6308 2140 +6330 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +6352 2151 +6374 2140 +6396 2118 +6407 2085 +6407 2019 +6396 1975 +6385 1953 +6363 1931 +6341 1920 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +6627 2074 +6616 2041 +6594 2019 +6561 2008 +6550 2008 +6517 2019 +6495 2041 +6484 2074 +6484 2085 +6495 2118 +6517 2140 +6550 2151 +6572 2151 +6605 2140 +6627 2118 +6638 2085 +6638 2019 +6627 1975 +6616 1953 +6594 1931 +6561 1920 +6528 1920 +6506 1931 +6495 1953 +6495 1964 +6506 1975 +6517 1964 +6506 1953 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6550 2008 +6528 2019 +6506 2041 +6495 2074 +6495 2085 +6506 2118 +6528 2140 +6550 2151 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +6572 2151 +6594 2140 +6616 2118 +6627 2085 +6627 2019 +6616 1975 +6605 1953 +6583 1931 +6561 1920 +9 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6770 2151 +6737 2140 +6715 2107 +6704 2052 +6704 2019 +6715 1964 +6737 1931 +6770 1920 +6792 1920 +6825 1931 +6847 1964 +6858 2019 +6858 2052 +6847 2107 +6825 2140 +6792 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6770 2151 +6748 2140 +6737 2129 +6726 2107 +6715 2052 +6715 2019 +6726 1964 +6737 1942 +6748 1931 +6770 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6792 1920 +6814 1931 +6825 1942 +6836 1964 +6847 2019 +6847 2052 +6836 2107 +6825 2129 +6814 2140 +6792 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +7438 2107 +7449 2096 +7438 2085 +7427 2096 +7427 2107 +7438 2129 +7449 2140 +7482 2151 +7526 2151 +7559 2140 +7570 2129 +7581 2107 +7581 2085 +7570 2063 +7537 2041 +7482 2019 +7460 2008 +7438 1986 +7427 1953 +7427 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7526 2151 +7548 2140 +7559 2129 +7570 2107 +7570 2085 +7559 2063 +7526 2041 +7482 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7427 1942 +7438 1953 +7460 1953 +7515 1931 +7548 1931 +7570 1942 +7581 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +7460 1953 +7515 1920 +7559 1920 +7570 1931 +7581 1953 +7581 1975 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7713 2151 +7680 2140 +7658 2107 +7647 2052 +7647 2019 +7658 1964 +7680 1931 +7713 1920 +7735 1920 +7768 1931 +7790 1964 +7801 2019 +7801 2052 +7790 2107 +7768 2140 +7735 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7713 2151 +7691 2140 +7680 2129 +7669 2107 +7658 2052 +7658 2019 +7669 1964 +7680 1942 +7691 1931 +7713 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7735 1920 +7757 1931 +7768 1942 +7779 1964 +7790 2019 +7790 2052 +7779 2107 +7768 2129 +7757 2140 +7735 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7933 2151 +7900 2140 +7878 2107 +7867 2052 +7867 2019 +7878 1964 +7900 1931 +7933 1920 +7955 1920 +7988 1931 +8010 1964 +8021 2019 +8021 2052 +8010 2107 +7988 2140 +7955 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7933 2151 +7911 2140 +7900 2129 +7889 2107 +7878 2052 +7878 2019 +7889 1964 +7900 1942 +7911 1931 +7933 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7955 1920 +7977 1931 +7988 1942 +7999 1964 +8010 2019 +8010 2052 +7999 2107 +7988 2129 +7977 2140 +7955 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8152 2151 +8120 2140 +8098 2107 +8087 2052 +8087 2019 +8098 1964 +8120 1931 +8152 1920 +8174 1920 +8207 1931 +8229 1964 +8240 2019 +8240 2052 +8229 2107 +8207 2140 +8174 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8152 2151 +8131 2140 +8120 2129 +8109 2107 +8098 2052 +8098 2019 +8109 1964 +8120 1942 +8131 1931 +8152 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8174 1920 +8196 1931 +8207 1942 +8218 1964 +8229 2019 +8229 2052 +8218 2107 +8207 2129 +8196 2140 +8174 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +8820 2107 +8831 2096 +8820 2085 +8809 2096 +8809 2107 +8820 2129 +8831 2140 +8864 2151 +8908 2151 +8941 2140 +8952 2129 +8963 2107 +8963 2085 +8952 2063 +8919 2041 +8864 2019 +8842 2008 +8820 1986 +8809 1953 +8809 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8908 2151 +8930 2140 +8941 2129 +8952 2107 +8952 2085 +8941 2063 +8908 2041 +8864 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +8809 1942 +8820 1953 +8842 1953 +8897 1931 +8930 1931 +8952 1942 +8963 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8842 1953 +8897 1920 +8941 1920 +8952 1931 +8963 1953 +8963 1975 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9095 2151 +9062 2140 +9040 2107 +9029 2052 +9029 2019 +9040 1964 +9062 1931 +9095 1920 +9117 1920 +9150 1931 +9172 1964 +9183 2019 +9183 2052 +9172 2107 +9150 2140 +9117 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9095 2151 +9073 2140 +9062 2129 +9051 2107 +9040 2052 +9040 2019 +9051 1964 +9062 1942 +9073 1931 +9095 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9117 1920 +9139 1931 +9150 1942 +9161 1964 +9172 2019 +9172 2052 +9161 2107 +9150 2129 +9139 2140 +9117 2151 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +9282 2107 +9304 2118 +9337 2151 +9337 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9326 2140 +9326 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9282 1920 +9381 1920 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9535 2151 +9502 2140 +9480 2107 +9469 2052 +9469 2019 +9480 1964 +9502 1931 +9535 1920 +9557 1920 +9590 1931 +9612 1964 +9623 2019 +9623 2052 +9612 2107 +9590 2140 +9557 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9535 2151 +9513 2140 +9502 2129 +9491 2107 +9480 2052 +9480 2019 +9491 1964 +9502 1942 +9513 1931 +9535 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9557 1920 +9579 1931 +9590 1942 +9601 1964 +9612 2019 +9612 2052 +9601 2107 +9590 2129 +9579 2140 +9557 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2580 9216 +2580 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2580 2304 +2580 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2857 9216 +2857 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2857 2304 +2857 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3133 9216 +3133 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3133 2304 +3133 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3410 9216 +3410 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3410 2304 +3410 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3963 9216 +3963 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3963 2304 +3963 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4239 9216 +4239 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4239 2304 +4239 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4516 9216 +4516 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4516 2304 +4516 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4792 9216 +4792 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4792 2304 +4792 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5345 9216 +5345 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5345 2304 +5345 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5622 9216 +5622 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5622 2304 +5622 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5898 9216 +5898 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5898 2304 +5898 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6175 9216 +6175 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6175 2304 +6175 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6728 9216 +6728 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6728 2304 +6728 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7004 9216 +7004 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7004 2304 +7004 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7281 9216 +7281 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7281 2304 +7281 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7557 9216 +7557 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7557 2304 +7557 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8110 9216 +8110 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8110 2304 +8110 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8387 9216 +8387 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8387 2304 +8387 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8663 9216 +8663 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8663 2304 +8663 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8940 9216 +8940 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8940 2304 +8940 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2079 2436 +2046 2425 +2024 2392 +2013 2337 +2013 2304 +2024 2249 +2046 2216 +2079 2205 +2101 2205 +2134 2216 +2156 2249 +2167 2304 +2167 2337 +2156 2392 +2134 2425 +2101 2436 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 2436 +2057 2425 +2046 2414 +2035 2392 +2024 2337 +2024 2304 +2035 2249 +2046 2227 +2057 2216 +2079 2205 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 2205 +2123 2216 +2134 2227 +2145 2249 +2156 2304 +2156 2337 +2145 2392 +2134 2414 +2123 2425 +2101 2436 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 4164 +2013 4054 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2013 4054 +2035 4076 +2068 4087 +2101 4087 +2134 4076 +2156 4054 +2167 4021 +2167 3999 +2156 3966 +2134 3944 +2101 3933 +2068 3933 +2035 3944 +2024 3955 +2013 3977 +2013 3988 +2024 3999 +2035 3988 +2024 3977 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 4087 +2123 4076 +2145 4054 +2156 4021 +2156 3999 +2145 3966 +2123 3944 +2101 3933 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 4164 +2145 4164 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2035 4153 +2090 4153 +2145 4164 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9078 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2442 4032 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1826 5848 +1848 5859 +1881 5892 +1881 5661 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1870 5881 +1870 5661 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1826 5661 +1925 5661 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2079 5892 +2046 5881 +2024 5848 +2013 5793 +2013 5760 +2024 5705 +2046 5672 +2079 5661 +2101 5661 +2134 5672 +2156 5705 +2167 5760 +2167 5793 +2156 5848 +2134 5881 +2101 5892 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 5892 +2057 5881 +2046 5870 +2035 5848 +2024 5793 +2024 5760 +2035 5705 +2046 5683 +2057 5672 +2079 5661 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 5661 +2123 5672 +2134 5683 +2145 5705 +2156 5760 +2156 5793 +2145 5848 +2134 5870 +2123 5881 +2101 5892 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9078 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2442 5760 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1826 7576 +1848 7587 +1881 7620 +1881 7389 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1870 7609 +1870 7389 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1826 7389 +1925 7389 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 7620 +2013 7510 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2013 7510 +2035 7532 +2068 7543 +2101 7543 +2134 7532 +2156 7510 +2167 7477 +2167 7455 +2156 7422 +2134 7400 +2101 7389 +2068 7389 +2035 7400 +2024 7411 +2013 7433 +2013 7444 +2024 7455 +2035 7444 +2024 7433 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 7543 +2123 7532 +2145 7510 +2156 7477 +2156 7455 +2145 7422 +2123 7400 +2101 7389 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 7620 +2145 7620 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2035 7609 +2090 7609 +2145 7620 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7488 +9078 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7488 +2442 7488 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +1804 9304 +1815 9293 +1804 9282 +1793 9293 +1793 9304 +1804 9326 +1815 9337 +1848 9348 +1892 9348 +1925 9337 +1936 9326 +1947 9304 +1947 9282 +1936 9260 +1903 9238 +1848 9216 +1826 9205 +1804 9183 +1793 9150 +1793 9117 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 9348 +1914 9337 +1925 9326 +1936 9304 +1936 9282 +1925 9260 +1892 9238 +1848 9216 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1793 9139 +1804 9150 +1826 9150 +1881 9128 +1914 9128 +1936 9139 +1947 9150 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1826 9150 +1881 9117 +1925 9117 +1936 9128 +1947 9150 +1947 9172 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2079 9348 +2046 9337 +2024 9304 +2013 9249 +2013 9216 +2024 9161 +2046 9128 +2079 9117 +2101 9117 +2134 9128 +2156 9161 +2167 9216 +2167 9249 +2156 9304 +2134 9337 +2101 9348 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 9348 +2057 9337 +2046 9326 +2035 9304 +2024 9249 +2024 9216 +2035 9161 +2046 9139 +2057 9128 +2079 9117 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 9117 +2123 9128 +2134 9139 +2145 9161 +2156 9216 +2156 9249 +2145 9304 +2134 9326 +2123 9337 +2101 9348 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2650 +9161 2650 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2650 +2359 2650 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2995 +9161 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2995 +2359 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3341 +9161 3341 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3341 +2359 3341 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3686 +9161 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2359 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9161 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2359 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4378 +9161 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4378 +2359 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4723 +9161 4723 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4723 +2359 4723 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5069 +9161 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2359 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5414 +9161 5414 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5414 +2359 5414 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6106 +9161 6106 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6106 +2359 6106 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6451 +9161 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2359 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6797 +9161 6797 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6797 +2359 6797 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7142 +9161 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7142 +2359 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7488 +9161 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7488 +2359 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7834 +9161 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2359 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8179 +9161 8179 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8179 +2359 8179 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8525 +9161 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8525 +2359 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8870 +9161 8870 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8870 +2359 8870 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5694 1621 +5815 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5705 1621 +5826 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5826 1621 +5694 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5672 1621 +5738 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5782 1621 +5848 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5672 1467 +5738 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5782 1467 +5848 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1354 5700 +1508 5765 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1354 5711 +1486 5765 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +1354 5831 +1508 5765 +1552 5744 +1574 5722 +1585 5700 +1585 5689 +1574 5678 +1563 5689 +1574 5700 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1354 5678 +1354 5744 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1354 5787 +1354 5853 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3583 5358 +3790 5358 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 5358 +3686 7544 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3583 7544 +3790 7544 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3622 6451 +3751 6451 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 6386 +3686 6516 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4965 5333 +5172 5333 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 5333 +5069 6878 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4965 6878 +5172 6878 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5004 6106 +5134 6106 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 6041 +5069 6170 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6348 6511 +6555 6511 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6511 +6451 7773 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6348 7773 +6555 7773 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6386 7142 +6516 7142 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 7078 +6451 7207 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7730 6250 +7937 6250 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6250 +7834 7343 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7730 7343 +7937 7343 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7769 6797 +7898 6797 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6732 +7834 6862 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 160 +2442 6126 +2484 6133 +2525 6139 +2567 6145 +2608 6151 +2650 6157 +2691 6164 +2733 6170 +2774 6176 +2815 6182 +2857 6189 +2898 6195 +2940 6201 +2981 6207 +3023 6213 +3064 6220 +3106 6226 +3147 6232 +3189 6238 +3230 6245 +3272 6251 +3313 6257 +3355 6263 +3396 6269 +3438 6276 +3479 6282 +3521 6288 +3562 6294 +3603 6301 +3645 6307 +3686 6313 +3728 6319 +3769 6325 +3811 6332 +3852 6338 +3894 6344 +3935 6350 +3977 6357 +4018 6363 +4060 6369 +4101 6375 +4143 6381 +4184 6388 +4226 6394 +4267 6400 +4308 6406 +4350 6412 +4391 6419 +4433 6425 +4474 6431 +4516 6437 +4557 6444 +4599 6450 +4640 6456 +4682 6462 +4723 6468 +4765 6475 +4806 6481 +4848 6487 +4889 6493 +4931 6500 +4972 6506 +5014 6512 +5055 6518 +5096 6524 +5138 6531 +5179 6537 +5221 6543 +5262 6549 +5304 6556 +5345 6562 +5387 6568 +5428 6574 +5470 6580 +5511 6587 +5553 6593 +5594 6599 +5636 6605 +5677 6612 +5719 6618 +5760 6624 +5801 6630 +5843 6636 +5884 6643 +5926 6649 +5967 6655 +6009 6661 +6050 6668 +6092 6674 +6133 6680 +6175 6686 +6216 6692 +6258 6699 +6299 6705 +6341 6711 +6382 6717 +6424 6724 +6465 6730 +6506 6736 +6548 6742 +6589 6748 +6631 6755 +6672 6761 +6714 6767 +6755 6773 +6797 6780 +6838 6786 +6880 6792 +6921 6798 +6963 6804 +7004 6811 +7046 6817 +7087 6823 +7129 6829 +7170 6836 +7212 6842 +7253 6848 +7294 6854 +7336 6860 +7377 6867 +7419 6873 +7460 6879 +7502 6885 +7543 6891 +7585 6898 +7626 6904 +7668 6910 +7709 6916 +7751 6923 +7792 6929 +7834 6935 +7875 6941 +7917 6947 +7958 6954 +7999 6960 +8041 6966 +8082 6972 +8124 6979 +8165 6985 +8207 6991 +8248 6997 +8290 7003 +8331 7010 +8373 7016 +8414 7022 +8456 7028 +8497 7035 +8539 7041 +8580 7047 +8622 7053 +8663 7059 +8705 7066 +8746 7072 +8787 7078 +8829 7084 +8870 7091 +8912 7097 +8953 7103 +8995 7109 +9036 7115 +160 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 34952 +1 0 0 [ 1 3 1 3 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 160 +2442 7186 +2484 7183 +2525 7179 +2567 7176 +2608 7172 +2650 7169 +2691 7165 +2733 7162 +2774 7158 +2815 7155 +2857 7151 +2898 7148 +2940 7144 +2981 7141 +3023 7138 +3064 7134 +3106 7131 +3147 7127 +3189 7124 +3230 7121 +3272 7118 +3313 7114 +3355 7111 +3396 7108 +3438 7105 +3479 7101 +3521 7098 +3562 7095 +3603 7092 +3645 7089 +3686 7086 +3728 7083 +3769 7080 +3811 7077 +3852 7074 +3894 7071 +3935 7068 +3977 7065 +4018 7062 +4060 7060 +4101 7057 +4143 7054 +4184 7051 +4226 7049 +4267 7046 +4308 7044 +4350 7041 +4391 7039 +4433 7037 +4474 7034 +4516 7032 +4557 7030 +4599 7028 +4640 7026 +4682 7024 +4723 7022 +4765 7020 +4806 7018 +4848 7016 +4889 7015 +4931 7013 +4972 7012 +5014 7011 +5055 7009 +5096 7008 +5138 7007 +5179 7007 +5221 7006 +5262 7005 +5304 7005 +5345 7004 +5387 7004 +5428 7004 +5470 7004 +5511 7005 +5553 7005 +5594 7006 +5636 7007 +5677 7008 +5719 7009 +5760 7010 +5801 7012 +5843 7014 +5884 7016 +5926 7019 +5967 7021 +6009 7024 +6050 7027 +6092 7031 +6133 7035 +6175 7039 +6216 7043 +6258 7048 +6299 7053 +6341 7058 +6382 7063 +6424 7069 +6465 7075 +6506 7082 +6548 7089 +6589 7096 +6631 7103 +6672 7111 +6714 7119 +6755 7127 +6797 7136 +6838 7145 +6880 7154 +6921 7163 +6963 7173 +7004 7183 +7046 7193 +7087 7203 +7129 7214 +7170 7225 +7212 7236 +7253 7247 +7294 7259 +7336 7271 +7377 7283 +7419 7295 +7460 7307 +7502 7319 +7543 7332 +7585 7345 +7626 7358 +7668 7371 +7709 7384 +7751 7397 +7792 7410 +7834 7424 +7875 7437 +7917 7451 +7958 7465 +7999 7479 +8041 7493 +8082 7507 +8124 7521 +8165 7535 +8207 7550 +8248 7564 +8290 7579 +8331 7593 +8373 7608 +8414 7622 +8456 7637 +8497 7652 +8539 7667 +8580 7682 +8622 7697 +8663 7712 +8705 7727 +8746 7742 +8787 7757 +8829 7772 +8870 7787 +8912 7802 +8953 7818 +8995 7833 +9036 7848 +160 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 34952 +1 0 0 [ 1 3 1 3 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 160 +2442 5066 +2484 5082 +2525 5098 +2567 5114 +2608 5130 +2650 5146 +2691 5162 +2733 5178 +2774 5194 +2815 5210 +2857 5226 +2898 5242 +2940 5258 +2981 5273 +3023 5289 +3064 5305 +3106 5321 +3147 5337 +3189 5352 +3230 5368 +3272 5384 +3313 5400 +3355 5415 +3396 5431 +3438 5447 +3479 5462 +3521 5478 +3562 5494 +3603 5509 +3645 5525 +3686 5540 +3728 5556 +3769 5571 +3811 5587 +3852 5602 +3894 5617 +3935 5633 +3977 5648 +4018 5663 +4060 5678 +4101 5694 +4143 5709 +4184 5724 +4226 5739 +4267 5754 +4308 5769 +4350 5784 +4391 5799 +4433 5813 +4474 5828 +4516 5843 +4557 5857 +4599 5872 +4640 5886 +4682 5901 +4723 5915 +4765 5930 +4806 5944 +4848 5958 +4889 5972 +4931 5986 +4972 6000 +5014 6013 +5055 6027 +5096 6041 +5138 6054 +5179 6067 +5221 6080 +5262 6094 +5304 6106 +5345 6119 +5387 6132 +5428 6144 +5470 6157 +5511 6169 +5553 6181 +5594 6192 +5636 6204 +5677 6215 +5719 6227 +5760 6238 +5801 6248 +5843 6259 +5884 6269 +5926 6279 +5967 6289 +6009 6298 +6050 6308 +6092 6317 +6133 6325 +6175 6334 +6216 6342 +6258 6350 +6299 6357 +6341 6364 +6382 6371 +6424 6378 +6465 6384 +6506 6390 +6548 6396 +6589 6401 +6631 6406 +6672 6411 +6714 6415 +6755 6419 +6797 6423 +6838 6427 +6880 6430 +6921 6433 +6963 6436 +7004 6438 +7046 6441 +7087 6443 +7129 6444 +7170 6446 +7212 6447 +7253 6448 +7294 6449 +7336 6450 +7377 6451 +7419 6451 +7460 6451 +7502 6451 +7543 6451 +7585 6451 +7626 6450 +7668 6450 +7709 6449 +7751 6448 +7792 6447 +7834 6446 +7875 6445 +7917 6444 +7958 6442 +7999 6441 +8041 6439 +8082 6438 +8124 6436 +8165 6434 +8207 6432 +8248 6430 +8290 6428 +8331 6426 +8373 6424 +8414 6422 +8456 6420 +8497 6417 +8539 6415 +8580 6412 +8622 6410 +8663 6407 +8705 6405 +8746 6402 +8787 6399 +8829 6397 +8870 6394 +8912 6391 +8953 6388 +8995 6385 +9036 6383 +160 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/fit-wlinear2.eps b/software/gsl-1.15/doc/fit-wlinear2.eps new file mode 100644 index 000000000..a59a80954 --- /dev/null +++ b/software/gsl-1.15/doc/fit-wlinear2.eps @@ -0,0 +1,5908 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 1.6 +%%Title: PostScript plot +%%CreationDate: Sun Jul 29 14:10:38 2001 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 117 195 492 580 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/arrowWidth 4 def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eofill +} { +eoclip +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eofill +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 117 195 492 580 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Poly +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2304 2304 +2304 9216 +9216 9216 +9216 2304 +4 Poly +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 120.5899 213.1332 ] concat +%I +[ +(0.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 206.9899 213.1332 ] concat +%I +[ +(0.5) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 9216 +4032 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 293.3899 213.1332 ] concat +%I +[ +(1.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 379.7899 213.1332 ] concat +%I +[ +(1.5) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 9216 +7488 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 466.1899 213.1332 ] concat +%I +[ +(2.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 9216 +2650 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 2304 +2650 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 9216 +2995 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 2304 +2995 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 9216 +3341 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 2304 +3341 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 9216 +4032 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 9216 +4378 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 2304 +4378 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 9216 +4723 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 2304 +4723 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 9216 +5414 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 2304 +5414 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 9216 +6106 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 2304 +6106 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 9216 +6797 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 2304 +6797 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 9216 +7142 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 2304 +7142 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 9216 +7488 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 9216 +8179 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 2304 +8179 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 9216 +8525 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 2304 +8525 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 9216 +8870 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 2304 +8870 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 229.3306 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 278.702 ] concat +%I +[ +(1) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3291 +9078 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3291 +2442 3291 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 328.0734 ] concat +%I +[ +(2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4279 +9078 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4279 +2442 4279 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 377.4449 ] concat +%I +[ +(3) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5266 +9078 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5266 +2442 5266 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 426.8163 ] concat +%I +[ +(4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6254 +9078 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6254 +2442 6254 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 476.1877 ] concat +%I +[ +(5) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7241 +9078 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7241 +2442 7241 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 525.5592 ] concat +%I +[ +(6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8229 +9078 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8229 +2442 8229 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 574.9306 ] concat +%I +[ +(7) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2798 +9161 2798 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2798 +2359 2798 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3291 +9161 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3291 +2359 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3785 +9161 3785 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3785 +2359 3785 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4279 +9161 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4279 +2359 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4773 +9161 4773 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4773 +2359 4773 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5266 +9161 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5266 +2359 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6254 +9161 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6254 +2359 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6747 +9161 6747 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6747 +2359 6747 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7241 +9161 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7241 +2359 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7735 +9161 7735 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7735 +2359 7735 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8229 +9161 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8229 +2359 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8722 +9161 8722 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8722 +2359 8722 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2546 3162 +2753 3162 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3162 +2650 3380 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2546 3380 +2753 3380 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3206 +2650 3336 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3271 +2706 3303 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3271 +2593 3239 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3271 +2706 3239 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 3271 +2593 3303 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2892 3503 +3099 3503 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3503 +2995 3744 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2892 3744 +3099 3744 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3558 +2995 3688 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3623 +3051 3656 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3623 +2939 3591 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3623 +3051 3591 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 3623 +2939 3656 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3237 3677 +3444 3677 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3677 +3341 3944 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3237 3944 +3444 3944 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3746 +3341 3875 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3811 +3397 3843 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3811 +3285 3778 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3811 +3397 3778 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 3811 +3285 3843 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3583 3740 +3790 3740 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3740 +3686 4034 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3583 4034 +3790 4034 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3822 +3686 3952 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3887 +3743 3919 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3887 +3630 3855 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3887 +3743 3855 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 3887 +3630 3919 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3928 3936 +4136 3936 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 3936 +4032 4261 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3928 4261 +4136 4261 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 4034 +4032 4163 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 4098 +4088 4131 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 4098 +3976 4066 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 4098 +4088 4066 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 4098 +3976 4131 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4274 4025 +4481 4025 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4025 +4378 4384 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4274 4384 +4481 4384 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4140 +4378 4269 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4205 +4434 4237 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4205 +4321 4172 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4205 +4434 4172 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 4205 +4321 4237 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4620 4013 +4827 4013 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4013 +4723 4411 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4620 4411 +4827 4411 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4147 +4723 4277 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4212 +4779 4245 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4212 +4667 4180 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4212 +4779 4180 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 4212 +4667 4245 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4965 4563 +5172 4563 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4563 +5069 5003 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4965 5003 +5172 5003 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4718 +5069 4848 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4783 +5125 4816 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4783 +5013 4751 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4783 +5125 4751 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 4783 +5013 4816 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5311 4481 +5518 4481 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4481 +5414 4967 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5311 4967 +5518 4967 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4659 +5414 4789 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4724 +5471 4756 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4724 +5358 4692 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4724 +5471 4692 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 4724 +5358 4756 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5656 4257 +5864 4257 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4257 +5760 4794 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5656 4794 +5864 4794 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4460 +5760 4590 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4525 +5816 4558 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4525 +5704 4493 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4525 +5816 4493 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 4525 +5704 4558 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6002 5058 +6209 5058 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5058 +6106 5651 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6002 5651 +6209 5651 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5290 +6106 5420 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5355 +6162 5387 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5355 +6049 5322 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5355 +6162 5322 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 5355 +6049 5387 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6348 5751 +6555 5751 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 5751 +6451 6407 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6348 6407 +6555 6407 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6014 +6451 6144 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6079 +6507 6111 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6079 +6395 6047 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6079 +6507 6047 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 6079 +6395 6111 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6693 6156 +6900 6156 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6156 +6797 6880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6693 6880 +6900 6880 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6453 +6797 6583 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6518 +6853 6550 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6518 +6741 6486 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6518 +6853 6486 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 6518 +6741 6550 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7039 5122 +7246 5122 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5122 +7142 5923 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7039 5923 +7246 5923 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5458 +7142 5588 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5523 +7199 5555 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5523 +7086 5490 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5523 +7199 5490 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 5523 +7086 5555 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7384 6788 +7592 6788 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 6788 +7488 7673 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7384 7673 +7592 7673 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 7166 +7488 7295 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 7230 +7544 7263 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 7230 +7432 7198 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 7230 +7544 7198 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 7230 +7432 7263 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7730 5908 +7937 5908 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 5908 +7834 6886 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7730 6886 +7937 6886 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6332 +7834 6462 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6397 +7890 6430 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6397 +7777 6365 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6397 +7890 6365 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 6397 +7777 6430 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8076 6922 +8283 6922 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 6922 +8179 8003 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8076 8003 +8283 8003 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 7397 +8179 7527 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 7462 +8235 7495 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 7462 +8123 7430 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 7462 +8235 7430 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 7462 +8123 7495 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8421 8010 +8628 8010 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8010 +8525 9205 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8421 9205 +8628 9205 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8543 +8525 8672 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8608 +8581 8640 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8608 +8469 8575 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8608 +8581 8575 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 8608 +8469 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8767 7571 +8974 7571 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 7571 +8870 8891 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8767 8891 +8974 8891 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 8167 +8870 8296 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 8231 +8927 8264 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 8231 +8814 8199 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 8231 +8927 8199 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 8231 +8814 8264 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 200 +2304 3314 +2339 3324 +2373 3334 +2408 3343 +2442 3353 +2477 3364 +2511 3374 +2546 3385 +2580 3395 +2615 3406 +2650 3417 +2684 3429 +2719 3440 +2753 3452 +2788 3463 +2822 3475 +2857 3488 +2892 3500 +2926 3512 +2961 3525 +2995 3538 +3030 3551 +3064 3564 +3099 3577 +3133 3591 +3168 3604 +3203 3618 +3237 3632 +3272 3647 +3306 3661 +3341 3675 +3375 3690 +3410 3705 +3444 3720 +3479 3735 +3514 3751 +3548 3766 +3583 3782 +3617 3798 +3652 3814 +3686 3831 +3721 3847 +3756 3864 +3790 3880 +3825 3897 +3859 3915 +3894 3932 +3928 3949 +3963 3967 +3997 3985 +4032 4003 +4067 4021 +4101 4039 +4136 4058 +4170 4077 +4205 4096 +4239 4115 +4274 4134 +4308 4153 +4343 4173 +4378 4193 +4412 4212 +4447 4233 +4481 4253 +4516 4273 +4550 4294 +4585 4315 +4620 4336 +4654 4357 +4689 4378 +4723 4399 +4758 4421 +4792 4443 +4827 4465 +4861 4487 +4896 4509 +4931 4532 +4965 4555 +5000 4578 +5034 4601 +5069 4624 +5103 4647 +5138 4671 +5172 4694 +5207 4718 +5242 4742 +5276 4767 +5311 4791 +5345 4816 +5380 4840 +5414 4865 +5449 4890 +5484 4916 +5518 4941 +5553 4967 +5587 4993 +5622 5019 +5656 5045 +5691 5071 +5725 5098 +5760 5124 +5795 5151 +5829 5178 +5864 5205 +5898 5233 +5933 5260 +5967 5288 +6002 5316 +6036 5344 +6071 5372 +6106 5401 +6140 5429 +6175 5458 +6209 5487 +6244 5516 +6278 5545 +6313 5575 +6348 5604 +6382 5634 +6417 5664 +6451 5694 +6486 5724 +6520 5755 +6555 5785 +6589 5816 +6624 5847 +6659 5878 +6693 5910 +6728 5941 +6762 5973 +6797 6005 +6831 6037 +6866 6069 +6900 6102 +6935 6134 +6970 6167 +7004 6200 +7039 6233 +7073 6266 +7108 6299 +7142 6333 +7177 6367 +7212 6401 +7246 6435 +7281 6469 +7315 6504 +7350 6538 +7384 6573 +7419 6608 +7453 6643 +7488 6679 +7523 6714 +7557 6750 +7592 6786 +7626 6822 +7661 6858 +7695 6894 +7730 6931 +7764 6967 +7799 7004 +7834 7041 +7868 7079 +7903 7116 +7937 7154 +7972 7191 +8006 7229 +8041 7267 +8076 7306 +8110 7344 +8145 7383 +8179 7422 +8214 7460 +8248 7500 +8283 7539 +8317 7578 +8352 7618 +8387 7658 +8421 7698 +8456 7738 +8490 7778 +8525 7819 +8559 7860 +8594 7901 +8628 7942 +8663 7983 +8698 8024 +8732 8066 +8767 8107 +8801 8149 +8836 8191 +8870 8234 +8905 8276 +8940 8319 +8974 8362 +9009 8404 +9043 8448 +9078 8491 +9112 8534 +9147 8578 +9181 8622 +200 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/fitting.texi b/software/gsl-1.15/doc/fitting.texi new file mode 100644 index 000000000..6066322b9 --- /dev/null +++ b/software/gsl-1.15/doc/fitting.texi @@ -0,0 +1,518 @@ +@cindex fitting +@cindex least squares fit +@cindex regression, least squares +@cindex weighted linear fits +@cindex unweighted linear fits +This chapter describes routines for performing least squares fits to +experimental data using linear combinations of functions. The data +may be weighted or unweighted, i.e. with known or unknown errors. For +weighted data the functions compute the best fit parameters and their +associated covariance matrix. For unweighted data the covariance +matrix is estimated from the scatter of the points, giving a +variance-covariance matrix. + +The functions are divided into separate versions for simple one- or +two-parameter regression and multiple-parameter fits. The functions +are declared in the header file @file{gsl_fit.h}. + +@menu +* Fitting Overview:: +* Linear regression:: +* Linear fitting without a constant term:: +* Multi-parameter fitting:: +* Fitting Examples:: +* Fitting References and Further Reading:: +@end menu + +@node Fitting Overview +@section Overview + +Least-squares fits are found by minimizing @math{\chi^2} +(chi-squared), the weighted sum of squared residuals over @math{n} +experimental datapoints @math{(x_i, y_i)} for the model @math{Y(c,x)}, +@tex +\beforedisplay +$$ +\chi^2 = \sum_i w_i (y_i - Y(c, x_i))^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\chi^2 = \sum_i w_i (y_i - Y(c, x_i))^2 +@end example + +@end ifinfo +@noindent +The @math{p} parameters of the model are @c{$c = \{c_0, c_1, \dots\}$} +@math{c = @{c_0, c_1, @dots{}@}}. The +weight factors @math{w_i} are given by @math{w_i = 1/\sigma_i^2}, +where @math{\sigma_i} is the experimental error on the data-point +@math{y_i}. The errors are assumed to be +Gaussian and uncorrelated. +For unweighted data the chi-squared sum is computed without any weight factors. + +The fitting routines return the best-fit parameters @math{c} and their +@math{p \times p} covariance matrix. The covariance matrix measures the +statistical errors on the best-fit parameters resulting from the +errors on the data, @math{\sigma_i}, and is defined +@cindex covariance matrix, linear fits +as @c{$C_{ab} = \langle \delta c_a \delta c_b \rangle$} +@math{C_@{ab@} = <\delta c_a \delta c_b>} where @c{$\langle \, \rangle$} +@math{< >} denotes an average over the Gaussian error distributions of the underlying datapoints. + +The covariance matrix is calculated by error propagation from the data +errors @math{\sigma_i}. The change in a fitted parameter @math{\delta +c_a} caused by a small change in the data @math{\delta y_i} is given +by +@tex +\beforedisplay +$$ +\delta c_a = \sum_i {\partial c_a \over \partial y_i} \delta y_i +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\delta c_a = \sum_i (dc_a/dy_i) \delta y_i +@end example + +@end ifinfo +@noindent +allowing the covariance matrix to be written in terms of the errors on the data, +@tex +\beforedisplay +$$ +C_{ab} = \sum_{i,j} {\partial c_a \over \partial y_i} + {\partial c_b \over \partial y_j} + \langle \delta y_i \delta y_j \rangle +$$ +\afterdisplay +@end tex +@ifinfo + +@example +C_@{ab@} = \sum_@{i,j@} (dc_a/dy_i) (dc_b/dy_j) <\delta y_i \delta y_j> +@end example + +@end ifinfo +@noindent +For uncorrelated data the fluctuations of the underlying datapoints satisfy +@c{$\langle \delta y_i \delta y_j \rangle = \sigma_i^2 \delta_{ij}$} +@math{<\delta y_i \delta y_j> = \sigma_i^2 \delta_@{ij@}}, giving a +corresponding parameter covariance matrix of +@tex +\beforedisplay +$$ +C_{ab} = \sum_{i} {1 \over w_i} {\partial c_a \over \partial y_i} {\partial c_b \over \partial y_i} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +C_@{ab@} = \sum_i (1/w_i) (dc_a/dy_i) (dc_b/dy_i) +@end example + +@end ifinfo +@noindent +When computing the covariance matrix for unweighted data, i.e. data with unknown errors, +the weight factors @math{w_i} in this sum are replaced by the single estimate @math{w = +1/\sigma^2}, where @math{\sigma^2} is the computed variance of the +residuals about the best-fit model, @math{\sigma^2 = \sum (y_i - Y(c,x_i))^2 / (n-p)}. +This is referred to as the @dfn{variance-covariance matrix}. +@cindex variance-covariance matrix, linear fits + +The standard deviations of the best-fit parameters are given by the +square root of the corresponding diagonal elements of +the covariance matrix, @c{$\sigma_{c_a} = \sqrt{C_{aa}}$} +@math{\sigma_@{c_a@} = \sqrt@{C_@{aa@}@}}. +The correlation coefficient of the fit parameters @math{c_a} and @math{c_b} +is given by @c{$\rho_{ab} = C_{ab} / \sqrt{C_{aa} C_{bb}}$} +@math{\rho_@{ab@} = C_@{ab@} / \sqrt@{C_@{aa@} C_@{bb@}@}}. + +@node Linear regression +@section Linear regression +@cindex linear regression + +The functions described in this section can be used to perform +least-squares fits to a straight line model, @math{Y(c,x) = c_0 + c_1 x}. + +@cindex covariance matrix, from linear regression +@deftypefun int gsl_fit_linear (const double * @var{x}, const size_t @var{xstride}, const double * @var{y}, const size_t @var{ystride}, size_t @var{n}, double * @var{c0}, double * @var{c1}, double * @var{cov00}, double * @var{cov01}, double * @var{cov11}, double * @var{sumsq}) +This function computes the best-fit linear regression coefficients +(@var{c0},@var{c1}) of the model @math{Y = c_0 + c_1 X} for the dataset +(@var{x}, @var{y}), two vectors of length @var{n} with strides +@var{xstride} and @var{ystride}. The errors on @var{y} are assumed unknown so +the variance-covariance matrix for the +parameters (@var{c0}, @var{c1}) is estimated from the scatter of the +points around the best-fit line and returned via the parameters +(@var{cov00}, @var{cov01}, @var{cov11}). +The sum of squares of the residuals from the best-fit line is returned +in @var{sumsq}. Note: the correlation coefficient of the data can be computed using @code{gsl_stats_correlation} (@pxref{Correlation}), it does not depend on the fit. +@end deftypefun + +@deftypefun int gsl_fit_wlinear (const double * @var{x}, const size_t @var{xstride}, const double * @var{w}, const size_t @var{wstride}, const double * @var{y}, const size_t @var{ystride}, size_t @var{n}, double * @var{c0}, double * @var{c1}, double * @var{cov00}, double * @var{cov01}, double * @var{cov11}, double * @var{chisq}) +This function computes the best-fit linear regression coefficients +(@var{c0},@var{c1}) of the model @math{Y = c_0 + c_1 X} for the weighted +dataset (@var{x}, @var{y}), two vectors of length @var{n} with strides +@var{xstride} and @var{ystride}. The vector @var{w}, of length @var{n} +and stride @var{wstride}, specifies the weight of each datapoint. The +weight is the reciprocal of the variance for each datapoint in @var{y}. + +The covariance matrix for the parameters (@var{c0}, @var{c1}) is +computed using the weights and returned via the parameters +(@var{cov00}, @var{cov01}, @var{cov11}). The weighted sum of squares +of the residuals from the best-fit line, @math{\chi^2}, is returned in +@var{chisq}. +@end deftypefun + +@deftypefun int gsl_fit_linear_est (double @var{x}, double @var{c0}, double @var{c1}, double @var{cov00}, double @var{cov01}, double @var{cov11}, double * @var{y}, double * @var{y_err}) +This function uses the best-fit linear regression coefficients +@var{c0}, @var{c1} and their covariance +@var{cov00}, @var{cov01}, @var{cov11} to compute the fitted function +@var{y} and its standard deviation @var{y_err} for the model @math{Y = +c_0 + c_1 X} at the point @var{x}. +@end deftypefun + +@node Linear fitting without a constant term +@section Linear fitting without a constant term + +The functions described in this section can be used to perform +least-squares fits to a straight line model without a constant term, +@math{Y = c_1 X}. + +@deftypefun int gsl_fit_mul (const double * @var{x}, const size_t @var{xstride}, const double * @var{y}, const size_t @var{ystride}, size_t @var{n}, double * @var{c1}, double * @var{cov11}, double * @var{sumsq}) +This function computes the best-fit linear regression coefficient +@var{c1} of the model @math{Y = c_1 X} for the datasets (@var{x}, +@var{y}), two vectors of length @var{n} with strides @var{xstride} and +@var{ystride}. The errors on @var{y} are assumed unknown so the +variance of the parameter @var{c1} is estimated from +the scatter of the points around the best-fit line and returned via the +parameter @var{cov11}. The sum of squares of the residuals from the +best-fit line is returned in @var{sumsq}. +@end deftypefun + +@deftypefun int gsl_fit_wmul (const double * @var{x}, const size_t @var{xstride}, const double * @var{w}, const size_t @var{wstride}, const double * @var{y}, const size_t @var{ystride}, size_t @var{n}, double * @var{c1}, double * @var{cov11}, double * @var{sumsq}) +This function computes the best-fit linear regression coefficient +@var{c1} of the model @math{Y = c_1 X} for the weighted datasets +(@var{x}, @var{y}), two vectors of length @var{n} with strides +@var{xstride} and @var{ystride}. The vector @var{w}, of length @var{n} +and stride @var{wstride}, specifies the weight of each datapoint. The +weight is the reciprocal of the variance for each datapoint in @var{y}. + +The variance of the parameter @var{c1} is computed using the weights +and returned via the parameter @var{cov11}. The weighted sum of +squares of the residuals from the best-fit line, @math{\chi^2}, is +returned in @var{chisq}. +@end deftypefun + +@deftypefun int gsl_fit_mul_est (double @var{x}, double @var{c1}, double @var{cov11}, double * @var{y}, double * @var{y_err}) +This function uses the best-fit linear regression coefficient @var{c1} +and its covariance @var{cov11} to compute the fitted function +@var{y} and its standard deviation @var{y_err} for the model @math{Y = +c_1 X} at the point @var{x}. +@end deftypefun + +@node Multi-parameter fitting +@section Multi-parameter fitting +@cindex multi-parameter regression +@cindex fits, multi-parameter linear +The functions described in this section perform least-squares fits to a +general linear model, @math{y = X c} where @math{y} is a vector of +@math{n} observations, @math{X} is an @math{n} by @math{p} matrix of +predictor variables, and the elements of the vector @math{c} are the @math{p} unknown best-fit parameters which are to be estimated. The chi-squared value is given by @c{$\chi^2 = \sum_i w_i (y_i - \sum_j X_{ij} c_j)^2$} +@math{\chi^2 = \sum_i w_i (y_i - \sum_j X_@{ij@} c_j)^2}. + +This formulation can be used for fits to any number of functions and/or +variables by preparing the @math{n}-by-@math{p} matrix @math{X} +appropriately. For example, to fit to a @math{p}-th order polynomial in +@var{x}, use the following matrix, +@tex +\beforedisplay +$$ +X_{ij} = x_i^j +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X_@{ij@} = x_i^j +@end example + +@end ifinfo +@noindent +where the index @math{i} runs over the observations and the index +@math{j} runs from 0 to @math{p-1}. + +To fit to a set of @math{p} sinusoidal functions with fixed frequencies +@math{\omega_1}, @math{\omega_2}, @dots{}, @math{\omega_p}, use, +@tex +\beforedisplay +$$ +X_{ij} = \sin(\omega_j x_i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X_@{ij@} = sin(\omega_j x_i) +@end example + +@end ifinfo +@noindent +To fit to @math{p} independent variables @math{x_1}, @math{x_2}, @dots{}, +@math{x_p}, use, +@tex +\beforedisplay +$$ +X_{ij} = x_j(i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X_@{ij@} = x_j(i) +@end example + +@end ifinfo +@noindent +where @math{x_j(i)} is the @math{i}-th value of the predictor variable +@math{x_j}. + +The functions described in this section are declared in the header file +@file{gsl_multifit.h}. + +The solution of the general linear least-squares system requires an +additional working space for intermediate results, such as the singular +value decomposition of the matrix @math{X}. + +@deftypefun {gsl_multifit_linear_workspace *} gsl_multifit_linear_alloc (size_t @var{n}, size_t @var{p}) +@tpindex gsl_multifit_linear_workspace +This function allocates a workspace for fitting a model to @var{n} +observations using @var{p} parameters. +@end deftypefun + +@deftypefun void gsl_multifit_linear_free (gsl_multifit_linear_workspace * @var{work}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_multifit_linear (const gsl_matrix * @var{X}, const gsl_vector * @var{y}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +This function computes the best-fit parameters @var{c} of the model +@math{y = X c} for the observations @var{y} and the matrix of +predictor variables @var{X}, using the preallocated workspace provided +in @var{work}. The variance-covariance matrix of the model parameters +@var{cov} is estimated from the scatter of the observations about the +best-fit. The sum of squares of the residuals from the best-fit, +@math{\chi^2}, is returned in @var{chisq}. If the coefficient of +determination is desired, it can be computed from the expression +@math{R^2 = 1 - \chi^2 / TSS}, where the total sum of squares (TSS) of +the observations @var{y} may be computed from @code{gsl_stats_tss}. + +The best-fit is found by singular value decomposition of the matrix +@var{X} using the modified Golub-Reinsch SVD algorithm, with column +scaling to improve the accuracy of the singular values. Any components +which have zero singular value (to machine precision) are discarded +from the fit. +@end deftypefun + +@deftypefun int gsl_multifit_wlinear (const gsl_matrix * @var{X}, const gsl_vector * @var{w}, const gsl_vector * @var{y}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +This function computes the best-fit parameters @var{c} of the weighted +model @math{y = X c} for the observations @var{y} with weights @var{w} +and the matrix of predictor variables @var{X}, using the preallocated +workspace provided in @var{work}. The covariance matrix of the model +parameters @var{cov} is computed with the given weights. The weighted +sum of squares of the residuals from the best-fit, @math{\chi^2}, is +returned in @var{chisq}. If the coefficient of determination is +desired, it can be computed from the expression @math{R^2 = 1 - \chi^2 +/ WTSS}, where the weighted total sum of squares (WTSS) of the +observations @var{y} may be computed from @code{gsl_stats_wtss}. +@end deftypefun + +@deftypefun int gsl_multifit_linear_svd (const gsl_matrix * @var{X}, const gsl_vector * @var{y}, double @var{tol}, size_t * @var{rank}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +@deftypefunx int gsl_multifit_wlinear_svd (const gsl_matrix * @var{X}, const gsl_vector * @var{w}, const gsl_vector * @var{y}, double @var{tol}, size_t * @var{rank}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +In these functions components of the fit are discarded if the ratio of +singular values @math{s_i/s_0} falls below the user-specified +tolerance @var{tol}, and the effective rank is returned in @var{rank}. +@end deftypefun + +@deftypefun int gsl_multifit_linear_usvd (const gsl_matrix * @var{X}, const gsl_vector * @var{y}, double @var{tol}, size_t * @var{rank}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +@deftypefunx int gsl_multifit_wlinear_usvd (const gsl_matrix * @var{X}, const gsl_vector * @var{w}, const gsl_vector * @var{y}, double @var{tol}, size_t * @var{rank}, gsl_vector * @var{c}, gsl_matrix * @var{cov}, double * @var{chisq}, gsl_multifit_linear_workspace * @var{work}) +These functions compute the fit using an SVD without column scaling. +@end deftypefun + +@deftypefun int gsl_multifit_linear_est (const gsl_vector * @var{x}, const gsl_vector * @var{c}, const gsl_matrix * @var{cov}, double * @var{y}, double * @var{y_err}) +This function uses the best-fit multilinear regression coefficients +@var{c} and their covariance matrix +@var{cov} to compute the fitted function value +@var{y} and its standard deviation @var{y_err} for the model @math{y = x.c} +at the point @var{x}. +@end deftypefun + +@deftypefun int gsl_multifit_linear_residuals (const gsl_matrix * @var{X}, const gsl_vector * @var{y}, const gsl_vector * @var{c}, gsl_vector * @var{r}) +This function computes the vector of residuals @math{r = y - X c} for +the observations @var{y}, coefficients @var{c} and matrix of predictor +variables @var{X}. +@end deftypefun + +@node Fitting Examples +@section Examples + +The following program computes a least squares straight-line fit to a +simple dataset, and outputs the best-fit line and its +associated one standard-deviation error bars. + +@example +@verbatiminclude examples/fitting.c +@end example + +@noindent +The following commands extract the data from the output of the program +and display it using the @sc{gnu} plotutils @code{graph} utility, + +@example +$ ./demo > tmp +$ more tmp +# best fit: Y = -106.6 + 0.06 X +# covariance matrix: +# [ 39602, -19.9 +# -19.9, 0.01] +# chisq = 0.8 + +$ for n in data fit hi lo ; + do + grep "^$n" tmp | cut -d: -f2 > $n ; + done +$ graph -T X -X x -Y y -y 0 20 -m 0 -S 2 -Ie data + -S 0 -I a -m 1 fit -m 2 hi -m 2 lo +@end example + +@iftex +@sp 1 +@center @image{fit-wlinear,3.0in} +@end iftex + +The next program performs a quadratic fit @math{y = c_0 + c_1 x + c_2 +x^2} to a weighted dataset using the generalised linear fitting function +@code{gsl_multifit_wlinear}. The model matrix @math{X} for a quadratic +fit is given by, +@tex +\beforedisplay +$$ +X=\pmatrix{1&x_0&x_0^2\cr +1&x_1&x_1^2\cr +1&x_2&x_2^2\cr +\dots&\dots&\dots\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X = [ 1 , x_0 , x_0^2 ; + 1 , x_1 , x_1^2 ; + 1 , x_2 , x_2^2 ; + ... , ... , ... ] +@end example + +@end ifinfo +@noindent +where the column of ones corresponds to the constant term @math{c_0}. +The two remaining columns corresponds to the terms @math{c_1 x} and +@math{c_2 x^2}. + +The program reads @var{n} lines of data in the format (@var{x}, @var{y}, +@var{err}) where @var{err} is the error (standard deviation) in the +value @var{y}. + +@example +@verbatiminclude examples/fitting2.c +@end example + +@noindent +A suitable set of data for fitting can be generated using the following +program. It outputs a set of points with gaussian errors from the curve +@math{y = e^x} in the region @math{0 < x < 2}. + +@example +@verbatiminclude examples/fitting3.c +@end example + +@noindent +The data can be prepared by running the resulting executable program, + +@example +$ ./generate > exp.dat +$ more exp.dat +0.1 0.97935 0.110517 +0.2 1.3359 0.12214 +0.3 1.52573 0.134986 +0.4 1.60318 0.149182 +0.5 1.81731 0.164872 +0.6 1.92475 0.182212 +.... +@end example + +@noindent +To fit the data use the previous program, with the number of data points +given as the first argument. In this case there are 19 data points. + +@example +$ ./fit 19 < exp.dat +0.1 0.97935 +/- 0.110517 +0.2 1.3359 +/- 0.12214 +... +# best fit: Y = 1.02318 + 0.956201 X + 0.876796 X^2 +# covariance matrix: +[ +1.25612e-02, -3.64387e-02, +1.94389e-02 + -3.64387e-02, +1.42339e-01, -8.48761e-02 + +1.94389e-02, -8.48761e-02, +5.60243e-02 ] +# chisq = 23.0987 +@end example + +@noindent +The parameters of the quadratic fit match the coefficients of the +expansion of @math{e^x}, taking into account the errors on the +parameters and the @math{O(x^3)} difference between the exponential and +quadratic functions for the larger values of @math{x}. The errors on +the parameters are given by the square-root of the corresponding +diagonal elements of the covariance matrix. The chi-squared per degree +of freedom is 1.4, indicating a reasonable fit to the data. + +@iftex +@sp 1 +@center @image{fit-wlinear2,3.0in} +@end iftex + +@node Fitting References and Further Reading +@section References and Further Reading + +A summary of formulas and techniques for least squares fitting can be +found in the ``Statistics'' chapter of the Annual Review of Particle +Physics prepared by the Particle Data Group, + +@itemize @w{} +@item +@cite{Review of Particle Properties}, +R.M. Barnett et al., Physical Review D54, 1 (1996) +@uref{http://pdg.lbl.gov/} +@end itemize + +@noindent +The Review of Particle Physics is available online at the website given +above. + +@cindex NIST Statistical Reference Datasets +@cindex Statistical Reference Datasets (StRD) +The tests used to prepare these routines are based on the NIST +Statistical Reference Datasets. The datasets and their documentation are +available from NIST at the following website, + +@center @uref{http://www.nist.gov/itl/div898/strd/index.html}. + + diff --git a/software/gsl-1.15/doc/freemanuals.texi b/software/gsl-1.15/doc/freemanuals.texi new file mode 100644 index 000000000..7ba2ba8b8 --- /dev/null +++ b/software/gsl-1.15/doc/freemanuals.texi @@ -0,0 +1,99 @@ +@cindex free documentation + +@quotation +@i{The following article was written by Richard Stallman, founder of the +GNU Project.} +@end quotation + + +The biggest deficiency in the free software community today is not in +the software---it is the lack of good free documentation that we can +include with the free software. Many of our most important +programs do not come with free reference manuals and free introductory +texts. Documentation is an essential part of any software package; +when an important free software package does not come with a free +manual and a free tutorial, that is a major gap. We have many such +gaps today. + +Consider Perl, for instance. The tutorial manuals that people +normally use are non-free. How did this come about? Because the +authors of those manuals published them with restrictive terms---no +copying, no modification, source files not available---which exclude +them from the free software world. + +That wasn't the first time this sort of thing happened, and it was far +from the last. Many times we have heard a GNU user eagerly describe a +manual that he is writing, his intended contribution to the community, +only to learn that he had ruined everything by signing a publication +contract to make it non-free. + +Free documentation, like free software, is a matter of freedom, not +price. The problem with the non-free manual is not that publishers +charge a price for printed copies---that in itself is fine. (The Free +Software Foundation sells printed copies of manuals, too.) The +problem is the restrictions on the use of the manual. Free manuals +are available in source code form, and give you permission to copy and +modify. Non-free manuals do not allow this. + +The criteria of freedom for a free manual are roughly the same as for +free software. Redistribution (including the normal kinds of +commercial redistribution) must be permitted, so that the manual can +accompany every copy of the program, both on-line and on paper. + +Permission for modification of the technical content is crucial too. +When people modify the software, adding or changing features, if they +are conscientious they will change the manual too---so they can +provide accurate and clear documentation for the modified program. A +manual that leaves you no choice but to write a new manual to document +a changed version of the program is not really available to our +community. + +Some kinds of limits on the way modification is handled are +acceptable. For example, requirements to preserve the original +author's copyright notice, the distribution terms, or the list of +authors, are ok. It is also no problem to require modified versions +to include notice that they were modified. Even entire sections that +may not be deleted or changed are acceptable, as long as they deal +with nontechnical topics (like this one). These kinds of restrictions +are acceptable because they don't obstruct the community's normal use +of the manual. + +However, it must be possible to modify all the @emph{technical} +content of the manual, and then distribute the result in all the usual +media, through all the usual channels. Otherwise, the restrictions +obstruct the use of the manual, it is not free, and we need another +manual to replace it. + +Please spread the word about this issue. Our community continues to +lose manuals to proprietary publishing. If we spread the word that +free software needs free reference manuals and free tutorials, perhaps +the next person who wants to contribute by writing documentation will +realize, before it is too late, that only free manuals contribute to +the free software community. + +If you are writing documentation, please insist on publishing it under +the GNU Free Documentation License or another free documentation +license. Remember that this decision requires your approval---you +don't have to let the publisher decide. Some commercial publishers +will use a free license if you insist, but they will not propose the +option; it is up to you to raise the issue and say firmly that this is +what you want. If the publisher you are dealing with refuses, please +try other publishers. If you're not sure whether a proposed license +is free, write to @email{licensing@@gnu.org}. + +You can encourage commercial publishers to sell more free, copylefted +manuals and tutorials by buying them, and particularly by buying +copies from the publishers that paid for their writing or for major +improvements. Meanwhile, try to avoid buying non-free documentation +at all. Check the distribution terms of a manual before you buy it, +and insist that whoever seeks your business must respect your freedom. +Check the history of the book, and try reward the publishers that have +paid or pay the authors to work on it. + +The Free Software Foundation maintains a list of free documentation +published by other publishers: + +@itemize @w{} +@item +@uref{http://www.fsf.org/doc/other-free-books.html} +@end itemize diff --git a/software/gsl-1.15/doc/gpl.texi b/software/gsl-1.15/doc/gpl.texi new file mode 100644 index 000000000..d417e8fdd --- /dev/null +++ b/software/gsl-1.15/doc/gpl.texi @@ -0,0 +1,723 @@ +@center Version 3, 29 June 2007 +@iftex +@smallerfonts @rm +@end iftex + +@c This file is intended to be included in another file. + +@display +Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. +@end display + +@heading Preamble + +The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom +to share and change all versions of a program--to make sure it remains +free software for all its users. We, the Free Software Foundation, +use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You +can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you +have certain responsibilities if you distribute copies of the +software, or if you modify it: responsibilities to respect the freedom +of others. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, +receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + +Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the +manufacturer can do so. This is fundamentally incompatible with the +aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for +individuals to use, which is precisely where it is most unacceptable. +Therefore, we have designed this version of the GPL to prohibit the +practice for those products. If such problems arise substantially in +other domains, we stand ready to extend this provision to those +domains in future versions of the GPL, as needed to protect the +freedom of users. + +Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish +to avoid the special danger that patents applied to a free program +could make it effectively proprietary. To prevent this, the GPL +assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and +modification follow. + +@heading TERMS AND CONDITIONS + +@enumerate 0 +@item Definitions. + +``This License'' refers to version 3 of the GNU General Public License. + +``Copyright'' also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +``The Program'' refers to any copyrightable work licensed under this +License. Each licensee is addressed as ``you''. ``Licensees'' and +``recipients'' may be individuals or organizations. + +To ``modify'' a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a ``modified version'' of +the earlier work or a work ``based on'' the earlier work. + +A ``covered work'' means either the unmodified Program or a work based +on the Program. + +To ``propagate'' a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To ``convey'' a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays ``Appropriate Legal Notices'' to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +@item Source Code. + +The ``source code'' for a work means the preferred form of the work for +making modifications to it. ``Object code'' means any non-source form +of a work. + +A ``Standard Interface'' means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The ``System Libraries'' of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +``Major Component'', in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The ``Corresponding Source'' for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +@item Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + +@item Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +@item Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +@item Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +@enumerate a +@item +The work must carry prominent notices stating that you modified it, +and giving a relevant date. + +@item +The work must carry prominent notices stating that it is released +under this License and any conditions added under section 7. This +requirement modifies the requirement in section 4 to ``keep intact all +notices''. + +@item +You must license the entire work, as a whole, under this License to +anyone who comes into possession of a copy. This License will +therefore apply, along with any applicable section 7 additional terms, +to the whole of the work, and all its parts, regardless of how they +are packaged. This License gives no permission to license the work in +any other way, but it does not invalidate such permission if you have +separately received it. + +@item +If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your work +need not make them do so. +@end enumerate + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +``aggregate'' if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +@item Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +@enumerate a +@item +Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium customarily +used for software interchange. + +@item +Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a written +offer, valid for at least three years and valid for as long as you +offer spare parts or customer support for that product model, to give +anyone who possesses the object code either (1) a copy of the +Corresponding Source for all the software in the product that is +covered by this License, on a durable physical medium customarily used +for software interchange, for a price no more than your reasonable +cost of physically performing this conveying of source, or (2) access +to copy the Corresponding Source from a network server at no charge. + +@item +Convey individual copies of the object code with a copy of the written +offer to provide the Corresponding Source. This alternative is +allowed only occasionally and noncommercially, and only if you +received the object code with such an offer, in accord with subsection +6b. + +@item +Convey the object code by offering access from a designated place +(gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to copy +the object code is a network server, the Corresponding Source may be +on a different server (operated by you or a third party) that supports +equivalent copying facilities, provided you maintain clear directions +next to the object code saying where to find the Corresponding Source. +Regardless of what server hosts the Corresponding Source, you remain +obligated to ensure that it is available for as long as needed to +satisfy these requirements. + +@item +Convey the object code using peer-to-peer transmission, provided you +inform other peers where the object code and Corresponding Source of +the work are being offered to the general public at no charge under +subsection 6d. + +@end enumerate + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A ``User Product'' is either (1) a ``consumer product'', which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +``normally used'' refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +``Installation Information'' for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +@item Additional Terms. + +``Additional permissions'' are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +@enumerate a +@item +Disclaiming warranty or limiting liability differently from the terms +of sections 15 and 16 of this License; or + +@item +Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices +displayed by works containing it; or + +@item +Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or + +@item +Limiting the use for publicity purposes of names of licensors or +authors of the material; or + +@item +Declining to grant rights under trademark law for use of some trade +names, trademarks, or service marks; or + +@item +Requiring indemnification of licensors and authors of that material by +anyone who conveys the material (or modified versions of it) with +contractual assumptions of liability to the recipient, for any +liability that these contractual assumptions directly impose on those +licensors and authors. +@end enumerate + +All other non-permissive additional terms are considered ``further +restrictions'' within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +@item Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +@item Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +@item Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An ``entity transaction'' is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +@item Patents. + +A ``contributor'' is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's ``contributor version''. + +A contributor's ``essential patent claims'' are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, ``control'' includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a ``patent license'' is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To ``grant'' such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. ``Knowingly relying'' means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is ``discriminatory'' if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +@item No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey +a covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree +to terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +@item Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + +@item Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU General Public +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that numbered version or +of any later version published by the Free Software Foundation. If +the Program does not specify a version number of the GNU General +Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU General Public License can be used, that proxy's public +statement of acceptance of a version permanently authorizes you to +choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +@item Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +@item Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +@item Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +@end enumerate + +@heading END OF TERMS AND CONDITIONS + +@heading How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the ``copyright'' line and a pointer to where the full notice is found. + +@smallexample +@var{one line to give the program's name and a brief idea @*of what it does.} +Copyright (C) @var{year} @var{name of author} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see @url{http://www.gnu.org/licenses/}. +@end smallexample + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + +@smallexample +@var{program} Copyright (C) @var{year} @var{name of author} +This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. +This is free software, and you are welcome to redistribute it +under certain conditions; type @samp{show c} for details. +@end smallexample + +The hypothetical commands @samp{show w} and @samp{show c} should show +the appropriate parts of the General Public License. Of course, your +program's commands might be different; for a GUI interface, you would +use an ``about box''. + +You should also get your employer (if you work as a programmer) or school, +if any, to sign a ``copyright disclaimer'' for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +@url{http://www.gnu.org/licenses/}. + +The GNU General Public License does not permit incorporating your +program into proprietary programs. If your program is a subroutine +library, you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use +the GNU Lesser General Public License instead of this License. But +first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. + +@iftex +@* +@textfonts @rm +@end iftex diff --git a/software/gsl-1.15/doc/gsl-config.1 b/software/gsl-1.15/doc/gsl-config.1 new file mode 100644 index 000000000..2a744870f --- /dev/null +++ b/software/gsl-1.15/doc/gsl-config.1 @@ -0,0 +1,41 @@ +.TH GSL 1 "22 May 2001" +.SH NAME +gsl-config - script to get version number and compiler flags of the installed GSL library +.SH SYNOPSIS +.B gsl-config +[\-\-prefix] [\-\-version] [\-\-libs] [\-\-libs\-without\-cblas] [\-\-cflags] +.SH DESCRIPTION +.PP +\fIgsl-config\fP is a tool that is used to configure to determine +the compiler and linker flags that should be used to compile +and link programs that use \fIGSL\fP. It is also used internally +to the .m4 macros for GNU autoconf that are included with \fIGSL\fP. +. +.SH OPTIONS +\fIgsl-config\fP accepts the following options: +.TP 8 +.B \-\-version +Print the currently installed version of \fIGSL\fP on the standard output. +.TP 8 +.B \-\-libs +Print the linker flags that are necessary to link a \fIGSL\fP program, with cblas +.TP 8 +.B \-\-libs\-without\-cblas +Print the linker flags that are necessary to link a \fIGSL\fP program, without cblas +.TP 8 +.B \-\-cflags +Print the compiler flags that are necessary to compile a \fIGSL\fP program. +.TP 8 +.B \-\-prefix +Show the GSL installation prefix. +.SH SEE ALSO +.BR gtk-config (1), +.BR gnome-config (1) +.SH COPYRIGHT +Copyright \(co 2001 Christopher R. Gabriel + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. diff --git a/software/gsl-1.15/doc/gsl-design.texi b/software/gsl-1.15/doc/gsl-design.texi new file mode 100644 index 000000000..6e195d94d --- /dev/null +++ b/software/gsl-1.15/doc/gsl-design.texi @@ -0,0 +1,1636 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename gsl-design.info +@settitle GNU Scientific Library +@finalout +@c -@setchapternewpage odd +@c %**end of header + +@dircategory Scientific software +@direntry +* GSL-design: (GSL-design). GNU Scientific Library -- Design +@end direntry + +@comment @include version-design.texi +@set GSL @i{GNU Scientific Library} + +@ifinfo +This file documents the @value{GSL}. + +Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 The GSL Project. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License''. +@end ifinfo + +@titlepage +@title GNU Scientific Library -- Design document +@comment @subtitle Edition @value{EDITION}, for gsl Version @value{VERSION} +@comment @subtitle @value{UPDATED} +@author Mark Galassi +Los Alamos National Laboratory + +@author James Theiler +Astrophysics and Radiation Measurements Group, Los Alamos National Laboratory + +@author Brian Gough +Network Theory Limited + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1996,1997,1998,1999,2000,2001,2004 The GSL Project. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by the Foundation. +@end titlepage + +@contents + +@node Top, Motivation, (dir), (dir) +@top About GSL + +@ifinfo +This file documents the design of @value{GSL}, a collection of numerical +routines for scientific computing. + +More information about GSL can be found at the project homepage, +@uref{http://www.gnu.org/software/gsl/}. +@end ifinfo + +The @value{GSL} is a library of scientific subroutines. It aims to +provide a convenient interface to routines that do standard (and not so +standard) tasks that arise in scientific research. More than that, it +also provides the source code. Users are welcome to alter, adjust, +modify, and improve the interfaces and/or implementations of whichever +routines might be needed for a particular purpose. + +GSL is intended to provide a free equivalent to existing proprietary +numerical libraries written in C or Fortran, such as NAG, IMSL's CNL, +IBM's ESSL, and SGI's SCSL. + +The target platform is a low-end desktop workstation. The goal is to +provide something which is generally useful, and the library is aimed at +general users rather than specialists. + +@menu +* Motivation:: +* Contributing:: +* Design:: +* Bibliography:: +* Copying:: +* GNU Free Documentation License:: +@end menu + +@node Motivation, Contributing, Top, Top +@chapter Motivation +@cindex numerical analysis +@cindex free software + +There is a need for scientists and engineers to have a numerical library +that: +@itemize @bullet +@item +is free (in the sense of freedom, not in the sense of gratis; see the +GNU General Public License), so that people can use that library, +redistribute it, modify it @dots{} +@item +is written in C using modern coding conventions, calling conventions, +scoping @dots{} +@item +is clearly and pedagogically documented; preferably with TeXinfo, so as +to allow online info, WWW and TeX output. +@item +uses top quality state-of-the-art algorithms. +@item +is portable and configurable using @emph{autoconf} and @emph{automake}. +@item +basically, is GNUlitically correct. +@end itemize + +There are strengths and weaknesses with existing libraries: + +@emph{Netlib} (http://www.netlib.org/) is probably the most advanced set +of numerical algorithms available on the net, maintained by AT&T. +Unfortunately most of the software is written in Fortran, with strange +calling conventions in many places. It is also not very well collected, +so it is a lot of work to get started with netlib. + +@emph{GAMS} (http://gams.nist.gov/) is an extremely well organized set +of pointers to scientific software, but like netlib, the individual +routines vary in their quality and their level of documentation. + +@emph{Numerical Recipes} (http://www.nr.com, +http://cfata2.harvard.edu/nr/) is an excellent book: it explains the +algorithms in a very clear way. Unfortunately the authors released the +source code under a license which allows you to use it, but prevents you +from re-distributing it. Thus Numerical Recipes is not @emph{free} in +the sense of @emph{freedom}. On top of that, the implementation suffers +from @emph{fortranitis} and other +limitations. [http://www.lysator.liu.se/c/num-recipes-in-c.html] + +@emph{SLATEC} is a large public domain collection of numerical routines +in Fortran written under a Department of Energy program in the +1970's. The routines are well tested and have a reasonable overall +design (given the limitations of that era). GSL should aim to be a +modern version of SLATEC. + +@emph{NSWC} is the Naval Surface Warfare Center numerical library. It +is a large public-domain Fortran library, containing a lot of +high-quality code. Documentation for the library is hard to find, only +a few photocopies of the printed manual are still in circulation. + +@emph{NAG} and @emph{IMSL} both sell high-quality libraries which are +proprietary. The NAG library is more advanced and has wider scope than +IMSL. The IMSL library leans more towards ease-of-use and makes +extensive use of variable length argument lists to emulate "default +arguments". + +@emph{ESSL} and @emph{SCSL} are proprietary libraries from IBM and SGI. + +@emph{Forth Scientific Library} [see the URL +http://www.taygeta.com/fsl/sciforth.html]. Mainly of interest to Forth +users. + +@emph{Numerical Algorithms with C} G. Engeln-Mullges, F. Uhlig. A nice +numerical library written in ANSI C with an accompanying +textbook. Source code is available but the library is not free software. + +@emph{NUMAL} A C version of the NUMAL library has been written by +H.T. Lau and is published as a book and disk with the title "A Numerical +Library in C for Scientists and Engineers". Source code is available but +the library is not free software. + +@emph{C Mathematical Function Handbook} by Louis Baker. A library of +function approximations and methods corresponding to those in the +"Handbook of Mathematical Functions" by Abramowitz and Stegun. Source +code is available but the library is not free software. + +@emph{CCMATH} by Daniel A. Atkinson. A C numerical library covering +similar areas to GSL. The code is quite terse. Earlier versions were +under the GPL but unfortunately it has changed to the LGPL in recent +versions. + +@emph{CEPHES} A useful collection of high-quality special functions +written in C. Not GPL'ed. + +@emph{WNLIB} A small collection of numerical routines written in C by +Will Naylor. Public domain. + +@emph{MESHACH} A comprehensive matrix-vector linear algebra library +written in C. Freely available but not GPL'ed (non-commercial license). + +@emph{CERNLIB} is a large high-quality Fortran library developed at CERN +over many years. It was originally non-free software but has recently +been released under the GPL. + +@emph{COLT} is a free numerical library in Java developed at CERN by +Wolfgang Hoschek. It is under a BSD-style license. + +The long-term goal will be to provide a framework to which the real +numerical experts (or their graduate students) will contribute. + +@node Contributing, Design, Motivation, Top +@chapter Contributing + +This design document was originally written in 1996. As of 2004, GSL +itself is essentially feature complete, the developers are not actively +working on any major new functionality. + +The main emphasis is now on ensuring the stability of the existing +functions, improving consistency, tidying up a few problem areas and +fixing any bugs that are reported. Potential contributors are +encouraged to gain familiarity with the library by investigating and +fixing known problems listed in the @file{BUGS} file in the CVS +repository. + +Adding large amounts of new code is difficult because it leads to +differences in the maturity of different parts of the library. To +maintain stability, any new functionality is encouraged as +@dfn{packages}, built on top of GSL and maintained independently by the +author, as in other free software projects (such as the Perl CPAN +archive and TeX CTAN archive, etc). + +@menu +* Packages:: +@end menu + +@node Packages, , Contributing, Contributing +@section Packages + +The design of GSL permits extensions to be used alongside the existing +library easily by simple linking. For example, additional random number +generators can be provided in a separate library: + +@example +$ tar xvfz rngextra-0.1.tar.gz +$ cd rngextra-0.1 +$ ./configure; make; make check; make install +$ ... +$ gcc -Wall main.c -lrngextra -lgsl -lgslcblas -lm +@end example + +The points below summarise the package design guidelines. These are +intended to ensure that packages are consistent with GSL itself, to make +life easier for the end-user and make it possible to distribute popular +well-tested packages as part of the core GSL in future. + +@itemize @bullet +@item Follow the GSL and GNU coding standards described in this document + +This means using the standard GNU packaging tools, such as Automake, +providing documentation in Texinfo format, and a test suite. The test +suite should run using @samp{make check}, and use the test functions +provided in GSL to produce the output with @code{PASS:}/@code{FAIL:} +lines. It is not essential to use libtool since packages are likely to +be small, a static library is sufficient and simpler to build. + +@item Use a new unique prefix for the package (do not use @samp{gsl_} -- this is reserved for internal use). + +For example, a package of additional random number generators might use +the prefix @code{rngextra}. + +@example +#include + +gsl_rng * r = gsl_rng_alloc (rngextra_lsfr32); +@end example + +@item Use a meaningful version number which reflects the state of development + +Generally, @code{0.x} are alpha versions, which provide no guarantees. +Following that, @code{0.9.x} are beta versions, which should be essentially +complete, subject only to minor changes and bug fixes. The first major +release is @code{1.0}. Any version number of @code{1.0} or higher +should be suitable for production use with a well-defined API. + +The API must not change in a major release and should be +backwards-compatible in its behavior (excluding actual bug-fixes), so +that existing code do not have to be modified. Note that the API +includes all exported definitions, including data-structures defined +with @code{struct}. If you need to change the API in a package, it +requires a new major release (e.g. @code{2.0}). + +@item Use the GNU General Public License (GPL) + +Follow the normal procedures of obtaining a copyright disclaimer if you +would like to have the package considered for inclusion in GSL itself in +the future (@pxref{Legal issues}). +@end itemize + +Post announcements of your package releases to +@email{gsl-discuss@@sourceware.org} so that information about them +can be added to the GSL webpages. + +For security, sign your package with GPG (@code{gpg --detach-sign +@var{file}}). + +An example package @samp{rngextra} containing two additional random +number generators can be found at +@url{http://www.network-theory.co.uk/download/rngextra/}. + +@node Design, Bibliography, Contributing, Top +@chapter Design + +@menu +* Language for implementation:: +* Interface to other languages:: +* What routines are implemented:: +* What routines are not implemented:: +* Design of Numerical Libraries:: +* Code Reuse:: +* Standards and conventions:: +* Background and Preparation:: +* Choice of Algorithms:: +* Documentation:: +* Namespace:: +* Header files:: +* Target system:: +* Function Names:: +* Object-orientation:: +* Comments:: +* Minimal structs:: +* Algorithm decomposition:: +* Memory allocation and ownership:: +* Memory layout:: +* Linear Algebra Levels:: +* Error estimates:: +* Exceptions and Error handling:: +* Persistence:: +* Using Return Values:: +* Variable Names:: +* Datatype widths:: +* size_t:: +* Arrays vs Pointers:: +* Pointers:: +* Constness:: +* Pseudo-templates:: +* Arbitrary Constants:: +* Test suites:: +* Compilation:: +* Thread-safety:: +* Legal issues:: +* Non-UNIX portability:: +* Compatibility with other libraries:: +* Parallelism:: +* Precision:: +* Miscellaneous:: +@end menu + +@node Language for implementation, Interface to other languages, Design, Design +@section Language for implementation + +@strong{One language only (C)} + +Advantages: simpler, compiler available and quite universal. + +@node Interface to other languages, What routines are implemented, Language for implementation, Design +@section Interface to other languages + +Wrapper packages are supplied as "extra" packages; not as part of the +"core". They are maintained separately by independent contributors. + +Use standard tools to make wrappers: swig, g-wrap + +@node What routines are implemented, What routines are not implemented, Interface to other languages, Design +@section What routines are implemented + +Anything which is in any of the existing libraries. Obviously it makes +sense to prioritize and write code for the most important areas first. + +@c @itemize @bullet +@c @item Random number generators + +@c Includes both random number generators and routines to give various +@c interesting distributions. + +@c @item Statistics + +@c @item Special Functions + +@c What I (jt) envision for this section is a collection of routines for +@c reliable and accurate (but not necessarily fast or efficient) estimation +@c of values for special functions, explicitly using Taylor series, asymptotic +@c expansions, continued fraction expansions, etc. As well as these routines, +@c fast approximations will also be provided, primarily based on Chebyshev +@c polynomials and ratios of polynomials. In this vision, the approximations +@c will be the "standard" routines for the users, and the exact (so-called) +@c routines will be used for verification of the approximations. It may also +@c be useful to provide various identity-checking routines as part of the +@c verification suite. + +@c @item Curve fitting + +@c polynomial, special functions, spline + +@c @item Ordinary differential equations + +@c @item Partial differential equations + +@c @item Fourier Analysis + +@c @item Wavelets + +@c @item Matrix operations: linear equations + +@c @item Matrix operations: eigenvalues and spectral analysis + +@c @item Matrix operations: any others? + +@c @item Direct integration + +@c @item Monte Carlo methods + +@c @item Simulated annealing + +@c @item Genetic algorithms + +@c We need to think about what kinds of algorithms are basic generally +@c useful numerical algorithms, and which ones are special purpose +@c research projects. We should concentrate on supplying the former. + +@c @item Cellular automata + +@c @end itemize + +@node What routines are not implemented, Design of Numerical Libraries, What routines are implemented, Design +@section What routines are not implemented + +@itemize @bullet +@item anything which already exists as a high-quality GPL'ed package. + +@item anything which is too big + -- i.e. an application in its own right rather than a subroutine + +For example, partial differential equation solvers are often huge and +very specialized applications (since there are so many types of PDEs, +types of solution, types of grid, etc). This sort of thing should +remain separate. It is better to point people to the good applications +which exist. + +@item anything which is independent and useful separately. + +Arguably functions for manipulating date and time, or financial +functions might be included in a "scientific" library. However, these +sorts of modules could equally well be used independently in other +programs, so it makes sense for them to be separate libraries. +@end itemize + +@node Design of Numerical Libraries, Code Reuse, What routines are not implemented, Design +@section Design of Numerical Libraries + +In writing a numerical library there is a unavoidable conflict between +completeness and simplicity. Completeness refers to the ability to +perform operations on different objects so that the group is +"closed". In mathematics objects can be combined and operated on in an +infinite number of ways. For example, I can take the derivative of a +scalar field with respect to a vector and the derivative of a vector +field wrt.@: a scalar (along a path). + +There is a definite tendency to unconsciously try to reproduce all these +possibilities in a numerical library, by adding new features one by +one. After all, it is always easy enough to support just one more +feature @dots{} so why not? + +Looking at the big picture, no-one would start out by saying "I want to +be able to represent every possible mathematical object and operation +using C structs" -- this is a strategy which is doomed to fail. There +is a limited amount of complexity which can be represented in a +programming language like C. Attempts to reproduce the complexity of +mathematics within such a language would just lead to a morass of +unmaintainable code. However, it's easy to go down that road if you +don't think about it ahead of time. + +It is better to choose simplicity over completeness. In designing new +parts of the library keep modules independent where possible. If +interdependencies between modules are introduced be sure about where you +are going to draw the line. + +@node Code Reuse, Standards and conventions, Design of Numerical Libraries, Design +@section Code Reuse + +It is useful if people can grab a single source file and include it in +their own programs without needing the whole library. Try to allow +standalone files like this whenever it is reasonable. Obviously the +user might need to define a few macros, such as GSL_ERROR, to compile +the file but that is ok. Examples where this can be done: grabbing a +single random number generator. + +@node Standards and conventions, Background and Preparation, Code Reuse, Design +@section Standards and conventions + +The people who kick off this project should set the coding standards and +conventions. In order of precedence the standards that we follow are, + +@itemize @bullet +@item We follow the GNU Coding Standards. +@item We follow the conventions of the ANSI Standard C Library. +@item We follow the conventions of the GNU C Library. +@item We follow the conventions of the glib GTK support Library. +@end itemize + +The references for these standards are the @cite{GNU Coding Standards} +document, Harbison and Steele @cite{C: A Reference Manual}, the +@cite{GNU C Library Manual} (version 2), and the Glib source code. + +For mathematical formulas, always follow the conventions in Abramowitz & +Stegun, the @cite{Handbook of Mathematical Functions}, since it is the +definitive reference and also in the public domain. + +If the project has a philosophy it is to "Think in C". Since we are +working in C we should only do what is natural in C, rather than trying +to simulate features of other languages. If there is something which is +unnatural in C and has to be simulated then we avoid using it. If this +means leaving something out of the library, or only offering a limited +version then so be it. It is not worthwhile making the library +over-complicated. There are numerical libraries in other languages, and +if people need the features of those languages it would be sensible for +them to use the corresponding libraries, rather than coercing a C +library into doing that job. + +It should be borne in mind at all time that C is a macro-assembler. If +you are in doubt about something being too complicated ask yourself the +question "Would I try to write this in macro-assembler?" If the answer +is obviously "No" then do not try to include it in GSL. [BJG] + +It will be useful to read the following papers, + +@itemize @w{} +@item +Kiem-Phong Vo, ``The Discipline and Method Architecture for Reusable +Libraries'', Software - Practice & Experience, v.30, pp.107-128, 2000. +@end itemize + +@noindent +It is available from +@uref{http://www.research.att.com/sw/tools/sfio/dm-spe.ps} or the earlier +technical report Kiem-Phong Vo, "An Architecture for Reusable Libraries" +@uref{http://citeseer.nj.nec.com/48973.html}. + +There are associated papers on Vmalloc, SFIO, and CDT which are also +relevant to the design of portable C libraries. + +@itemize @w{} +@item +Kiem-Phong Vo, ``Vmalloc: A General and Efficient Memory +Allocator''. Software Practice & Experience, 26:1--18, 1996. + +@uref{http://www.research.att.com/sw/tools/vmalloc/vmalloc.ps} +@item +Kiem-Phong Vo. ``Cdt: A Container Data Type Library''. Soft. Prac. & +Exp., 27:1177--1197, 1997 + +@uref{http://www.research.att.com/sw/tools/cdt/cdt.ps} +@item +David G. Korn and Kiem-Phong Vo, ``Sfio: Safe/Fast String/File IO'', +Proceedings of the Summer '91 Usenix Conference, pp. 235-256, 1991. + +@uref{http://citeseer.nj.nec.com/korn91sfio.html} +@end itemize + +Source code should be indented according to the GNU Coding Standards, +with spaces not tabs. For example, by using the @code{indent} command: + +@example +indent -gnu -nut *.c *.h +@end example + +@noindent +The @code{-nut} option converts tabs into spaces. + +@node Background and Preparation, Choice of Algorithms, Standards and conventions, Design +@section Background and Preparation + +Before implementing something be sure to research the subject +thoroughly! This will save a lot of time in the long-run. The two most +important steps are, + +@enumerate +@item +to determine whether there is already a free library (GPL or +GPL-compatible) which does the job. If so, there is no need to +reimplement it. Carry out a search on Netlib, GAMs, na-net, +sci.math.num-analysis and the web in general. This should also provide +you with a list of existing proprietary libraries which are relevant, +keep a note of these for future reference in step 2. + +@item +make a comparative survey of existing implementations in the +commercial/free libraries. Examine the typical APIs, methods of +communication between program and subroutine, and classify them so that +you are familiar with the key concepts or features that an +implementation may or may not have, depending on the relevant tradeoffs +chosen. Be sure to review the documentation of existing libraries for +useful references. + +@item +read up on the subject and determine the state-of-the-art. Find the +latest review papers. A search of the following journals should be +undertaken. + +@itemize @w{} +@item ACM Transactions on Mathematical Software +@item Numerische Mathematik +@item Journal of Computation and Applied Mathematics +@item Computer Physics Communications +@item SIAM Journal of Numerical Analysis +@item SIAM Journal of Scientific Computing +@end itemize +@end enumerate + +@noindent +Keep in mind that GSL is not a research project. Making a good +implementation is difficult enough, without also needing to invent new +algorithms. We want to implement existing algorithms whenever +possible. Making minor improvements is ok, but don't let it be a +time-sink. + +@node Choice of Algorithms, Documentation, Background and Preparation, Design +@section Choice of Algorithms + +Whenever possible choose algorithms which scale well and always remember +to handle asymptotic cases. This is particularly relevant for functions +with integer arguments. It is tempting to implement these using the +simple @math{O(n)} algorithms used to define the functions, such as the +many recurrence relations found in Abramowitz and Stegun. While such +methods might be acceptable for @math{n=O(10-100)} they will not be +satisfactory for a user who needs to compute the same function for +@math{n=1000000}. + +Similarly, do not make the implicit assumption that multivariate data +has been scaled to have components of the same size or O(1). Algorithms +should take care of any necessary scaling or balancing internally, and +use appropriate norms (e.g. |Dx| where D is a diagonal scaling matrix, +rather than |x|). + +@node Documentation, Namespace, Choice of Algorithms, Design +@section Documentation +Documentation: the project leaders should give examples of how things +are to be documented. High quality documentation is absolutely +mandatory, so documentation should introduce the topic, and give careful +reference for the provided functions. The priority is to provide +reference documentation for each function. It is not necessary to +provide tutorial documentation. + +Use free software, such as GNU Plotutils, to produce the graphs in the +manual. + +Some of the graphs have been made with gnuplot which is not truly free +(or GNU) software, and some have been made with proprietary +programs. These should be replaced with output from GNU plotutils. + +When citing references be sure to use the standard, definitive and +best reference books in the field, rather than lesser known text-books +or introductory books which happen to be available (e.g. from +undergraduate studies). For example, references concerning algorithms +should be to Knuth, references concerning statistics should be to +Kendall & Stuart, references concerning special functions should be to +Abramowitz & Stegun (Handbook of Mathematical Functions AMS-55), etc. +Wherever possible refer to Abramowitz & Stegun rather than other +reference books because it is a public domain work, so it is +inexpensive and freely redistributable. + +The standard references have a better chance of being available in an +accessible library for the user. If they are not available and the user +decides to buy a copy in order to look up the reference then this also +gives them the best quality book which should also cover the largest +number of other references in the GSL Manual. If many different books +were to be referenced this would be an expensive and inefficient use of +resources for a user who needs to look up the details of the algorithms. +Reference books also stay in print much longer than text books, which +are often out-of-print after a few years. + +Similarly, cite original papers wherever possible. Be sure to keep +copies of these for your own reference (e.g. when dealing with bug +reports) or to pass on to future maintainers. + +If you need help in tracking down references, ask on the +@code{gsl-discuss} mailing list. There is a group of volunteers with +access to good libraries who have offered to help GSL developers get +copies of papers. + +@c [JT section: written by James Theiler + +@c And we furthermore promise to try as hard as possible to document +@c the software: this will ideally involve discussion of why you might want +@c to use it, what precisely it does, how precisely to invoke it, +@c how more-or-less it works, and where we learned about the algorithm, +@c and (unless we wrote it from scratch) where we got the code. +@c We do not plan to write this entire package from scratch, but to cannibalize +@c existing mathematical freeware, just as we expect our own software to +@c be cannibalized.] + +To write mathematics in the texinfo file you can use the @code{@@math} +command with @emph{simple} TeX commands. These are automatically +surrounded by @code{$...$} for math mode. For example, + +@example +to calculate the coefficient @@math@{\alpha@} use the function... +@end example + +@noindent +will be correctly formatted in both online and TeX versions of the +documentation. + +Note that you cannot use the special characters @{ and @} +inside the @code{@@math} command because these conflict between TeX +and Texinfo. This is a problem if you want to write something like +@code{\sqrt@{x+y@}}. + +To work around it you can precede the math command with a special +macro @code{@@c} which contains the explicit TeX commands you want to +use (no restrictions), and put an ASCII approximation into the +@code{@@math} command (you can write @code{@@@{} and +@code{@@@}} there for the left and right braces). The explicit TeX +commands are used in the TeX output and the argument of @code{@@math} +in the plain info output. + +Note that the @code{@@c@{@}} macro must go at the end of the +preceding line, because everything else after it is ignored---as far +as texinfo is concerned it's actually a 'comment'. The comment +command @@c has been modified to capture a TeX expression which is +output by the next @@math command. For ordinary comments use the @@comment +command. + +For example, + +@example +this is a test @@c@{$\sqrt@{x+y@}$@} +@@math@{\sqrt@@@{x+y@@@}@} +@end example + +@noindent +is equivalent to @code{this is a test $\sqrt@{x+y@}$} in plain TeX +and @code{this is a test @@math@{\sqrt@@@{x+y@@@}@}} in Info. + +It looks nicer if some of the more cryptic TeX commands are given +a C-style ascii version, e.g. + +@example +for @@c@{$x \ge y$@} +@@math@{x >= y@} +@end example + +@noindent +will be appropriately displayed in both TeX and Info. + + +@node Namespace, Header files, Documentation, Design +@section Namespace + +Use @code{gsl_} as a prefix for all exported functions and variables. + +Use @code{GSL_} as a prefix for all exported macros. + +All exported header files should have a filename with the prefix @code{gsl_}. + +All installed libraries should have a name like libgslhistogram.a + +Any installed executables (utility programs etc) should have the prefix +@code{gsl-} (with a hyphen, not an underscore). + +All function names, variables, etc.@: should be in lower case. Macros and +preprocessor variables should be in upper case. + +Some common conventions in variable and function names: + +@table @code +@item p1 +plus 1, e.g. function @code{log1p(x)} or a variable like @code{kp1}, @math{=k+1}. + +@item m1 +minus 1, e.g. function @code{expm1(x)} or a variable like @code{km1}, @math{=k-1}. +@end table + +@node Header files, Target system, Namespace, Design +@section Header files + +Installed header files should be idempotent, i.e. surround them by the +preprocessor conditionals like the following, + +@example +#ifndef __GSL_HISTOGRAM_H__ +#define __GSL_HISTOGRAM_H__ +... +#endif /* __GSL_HISTOGRAM_H__ */ +@end example + +@node Target system, Function Names, Header files, Design +@section Target system + +The target system is ANSI C, with a full Standard C Library, and IEEE +arithmetic. + +@node Function Names, Object-orientation, Target system, Design +@section Function Names + +Each module has a name, which prefixes any function names in that +module, e.g. the module gsl_fft has function names like +gsl_fft_init. The modules correspond to subdirectories of the library +source tree. + +@node Object-orientation, Comments, Function Names, Design +@section Object-orientation + +The algorithms should be object oriented, but only to the extent that is +easy in portable ANSI C. The use of casting or other tricks to simulate +inheritance is not desirable, and the user should not have to be aware +of anything like that. This means many types of patterns are ruled +out. However, this is not considered a problem -- they are too +complicated for the library. + +Note: it is possible to define an abstract base class easily in C, using +function pointers. See the rng directory for an example. + +When reimplementing public domain Fortran code, please try to introduce +the appropriate object concepts as structs, rather than translating the +code literally in terms of arrays. The structs can be useful just +within the file, you don't need to export them to the user. + +For example, if a Fortran program repeatedly uses a subroutine like, + +@example +SUBROUTINE RESIZE (X, K, ND, K1) +@end example + +@noindent +where X(K,D) represents a grid to be resized to X(K1,D) you can make +this more readable by introducing a struct, + +@smallexample +struct grid @{ + int nd; /* number of dimensions */ + int k; /* number of bins */ + double * x; /* partition of axes, array of size x[k][nd] */ +@} + +void +resize_grid (struct grid * g, int k_new) +@{ +... +@} +@end smallexample + +@noindent +Similarly, if you have a frequently recurring code fragment within a +single file you can define a static or static inline function for it. +This is typesafe and saves writing out everything in full. + + +@node Comments, Minimal structs, Object-orientation, Design +@section Comments + +Follow the GNU Coding Standards. A relevant quote is, + +``Please write complete sentences and capitalize the first word. If a +lower-case identifier comes at the beginning of a sentence, don't +capitalize it! Changing the spelling makes it a different identifier. +If you don't like starting a sentence with a lower case letter, write +the sentence differently (e.g., "The identifier lower-case is ...").'' + +@node Minimal structs, Algorithm decomposition, Comments, Design +@section Minimal structs + +We prefer to make structs which are @dfn{minimal}. For example, if a +certain type of problem can be solved by several classes of algorithm +(e.g. with and without derivative information) it is better to make +separate types of struct to handle those cases. i.e. run time type +identification is not desirable. + +@node Algorithm decomposition, Memory allocation and ownership, Minimal structs, Design +@section Algorithm decomposition + +Iterative algorithms should be decomposed into an INITIALIZE, ITERATE, +TEST form, so that the user can control the progress of the iteration +and print out intermediate results. This is better than using +call-backs or using flags to control whether the function prints out +intermediate results. In fact, call-backs should not be used -- if they +seem necessary then it's a sign that the algorithm should be broken down +further into individual components so that the user has complete control +over them. + +For example, when solving a differential equation the user may need to +be able to advance the solution by individual steps, while tracking a +realtime process. This is only possible if the algorithm is broken down +into step-level components. Higher level decompositions would not give +sufficient flexibility. + +@node Memory allocation and ownership, Memory layout, Algorithm decomposition, Design +@section Memory allocation and ownership + +Functions which allocate memory on the heap should end in _alloc +(e.g. gsl_foo_alloc) and be deallocated by a corresponding _free function +(gsl_foo_free). + +Be sure to free any memory allocated by your function if you have to +return an error in a partially initialized object. + +Don't allocate memory 'temporarily' inside a function and then free it +before the function returns. This prevents the user from controlling +memory allocation. All memory should be allocated and freed through +separate functions and passed around as a "workspace" argument. This +allows memory allocation to be factored out of tight loops. + +To avoid confusion over ownership, workspaces should not own each +other or contain other workspaces. For clarity and ease of use in +different contexts, they should be allocated from integer arguments +rather than derived from other structs. + +@node Memory layout, Linear Algebra Levels, Memory allocation and ownership, Design +@section Memory layout + +We use flat blocks of memory to store matrices and vectors, not C-style +pointer-to-pointer arrays. The matrices are stored in row-major order +-- i.e. the column index (second index) moves continuously through memory. + +@node Linear Algebra Levels, Error estimates, Memory layout, Design +@section Linear Algebra Levels + +Functions using linear algebra are divided into two levels: + +For purely "1d" functions we use the C-style arguments (double *, +stride, size) so that it is simpler to use the functions in a normal C +program, without needing to invoke all the gsl_vector machinery. + +The philosophy here is to minimize the learning curve. If someone only +needs to use one function, like an fft, they can do so without having +to learn about gsl_vector. + +This leads to the question of why we don't do the same for matrices. +In that case the argument list gets too long and confusing, with +(size1, size2, tda) for each matrix and potential ambiguities over row +vs column ordering. In this case, it makes sense to use gsl_vector and +gsl_matrix, which take care of this for the user. + +So really the library has two levels -- a lower level based on C types +for 1d operations, and a higher level based on gsl_matrix and +gsl_vector for general linear algebra. + +Of course, it would be possible to define a vector version of the +lower level functions too. So far we have not done that because it was +not essential -- it could be done but it is easy enough to get by +using the C arguments, by typing v->data, v->stride, v->size instead. +A gsl_vector version of low-level functions would mainly be a +convenience. + +Please use BLAS routines internally within the library whenever possible +for efficiency. + +@node Error estimates, Exceptions and Error handling, Linear Algebra Levels, Design +@section Error estimates + +In the special functions error bounds are given as twice the expected +``Gaussian'' error, i.e.@: 2-sigma, so the result is inside the error +98% of the time. People expect the true value to be within +/- the +quoted error (this wouldn't be the case 32% of the time for 1 sigma). +Obviously the errors are not Gaussian but a factor of two works well +in practice. + +@node Exceptions and Error handling, Persistence, Error estimates, Design +@section Exceptions and Error handling + +The basic error handling procedure is the return code (see gsl_errno.h +for a list of allowed values). Use the GSL_ERROR macro to mark an +error. The current definition of this macro is not ideal but it can be +changed at compile time. + +You should always use the GSL_ERROR macro to indicate an error, rather +than just returning an error code. The macro allows the user to trap +errors using the debugger (by setting a breakpoint on the function +gsl_error). + +The only circumstances where GSL_ERROR should not be used are where the +return value is "indicative" rather than an error -- for example, the +iterative routines use the return code to indicate the success or +failure of an iteration. By the nature of an iterative algorithm +"failure" (a return code of GSL_CONTINUE) is a normal occurrence and +there is no need to use GSL_ERROR there. + +Be sure to free any memory allocated by your function if you return an +error (in particular for errors in partially initialized objects). + +@node Persistence, Using Return Values, Exceptions and Error handling, Design +@section Persistence + +If you make an object foo which uses blocks of memory (e.g. vector, +matrix, histogram) you can provide functions for reading and writing +those blocks, + +@smallexample +int gsl_foo_fread (FILE * stream, gsl_foo * v); +int gsl_foo_fwrite (FILE * stream, const gsl_foo * v); +int gsl_foo_fscanf (FILE * stream, gsl_foo * v); +int gsl_foo_fprintf (FILE * stream, const gsl_foo * v, const char *format); +@end smallexample + +@noindent +Only dump out the blocks of memory, not any associated parameters such +as lengths. The idea is for the user to build higher level input/output +facilities using the functions the library provides. The fprintf/fscanf +versions should be portable between architectures, while the binary +versions should be the "raw" version of the data. Use the functions + +@smallexample +int gsl_block_fread (FILE * stream, gsl_block * b); +int gsl_block_fwrite (FILE * stream, const gsl_block * b); +int gsl_block_fscanf (FILE * stream, gsl_block * b); +int gsl_block_fprintf (FILE * stream, const gsl_block * b, const char *format); +@end smallexample + +@noindent +or + +@smallexample +int gsl_block_raw_fread (FILE * stream, double * b, size_t n, size_t stride); +int gsl_block_raw_fwrite (FILE * stream, const double * b, size_t n, size_t stri +de); +int gsl_block_raw_fscanf (FILE * stream, double * b, size_t n, size_t stride); +int gsl_block_raw_fprintf (FILE * stream, const double * b, size_t n, size_t str +ide, const char *format); +@end smallexample + +@noindent +to do the actual reading and writing. + +@node Using Return Values, Variable Names, Persistence, Design +@section Using Return Values + +Always assign a return value to a variable before using it. This allows +easier debugging of the function, and inspection and modification of the +return value. If the variable is only needed temporarily then enclose +it in a suitable scope. + +For example, instead of writing, + +@example +a = f(g(h(x,y))) +@end example + +@noindent +use temporary variables to store the intermediate values, +@example +@{ + double u = h(x,y); + double v = g(u); + a = f(v); +@} +@end example + +@noindent +These can then be inspected more easily in the debugger, and breakpoints +can be placed more precisely. The compiler will eliminate the temporary +variables automatically when the program is compiled with optimization. + +@node Variable Names, Datatype widths, Using Return Values, Design +@section Variable Names + +Try to follow existing conventions for variable names, + +@table @code +@item dim +number of dimensions +@item w +pointer to workspace +@item state +pointer to state variable (use @code{s} if you need to save characters) +@item result +pointer to result (output variable) +@item abserr +absolute error +@item relerr +relative error +@item epsabs +absolute tolerance +@item epsrel +relative tolerance +@item size +the size of an array or vector e.g. double array[size] +@item stride +the stride of a vector +@item size1 +the number of rows in a matrix +@item size2 +the number of columns in a matrix +@item n +general integer number, e.g. number of elements of array, in fft, etc +@item r +random number generator (gsl_rng) +@end table + +@node Datatype widths, size_t, Variable Names, Design +@section Datatype widths + +Be aware that in ANSI C the type @code{int} is only guaranteed to +provide 16-bits. It may provide more, but is not guaranteed to. +Therefore if you require 32 bits you must use @code{long int}, which +will have 32 bits or more. Of course, on many platforms the type +@code{int} does have 32 bits instead of 16 bits but we have to code to +the ANSI standard rather than a specific platform. + +@node size_t, Arrays vs Pointers, Datatype widths, Design +@section size_t + +All objects (blocks of memory, etc) should be measured in terms of a +@code{size_t} type. Therefore any iterations (e.g. @code{for(i=0; i= 0; i--) @{ ... @} /* DOESN'T WORK */ +@end example + +@noindent +use something like + +@example +for (i = N; i-- > 0;) @{ ... @} +@end example + +@noindent +to avoid problems with wrap-around at @code{i=0}. Note that the +post-decrement ensures that the loop variable is tested before it +reaches zero. Beware that @code{i} will wraparound on exit from the +loop. (This could also be written as @code{for (i = N; i--;)} since +the test for @code{i>0} is equivalent to @code{i!=0} for an unsigned +integer) + +If you really want to avoid confusion use a separate variable to invert +the loop order, +@example +for (i = 0; i < N; i++) @{ j = N - i; ... @} +@end example + +Note (BJG). Originally, I suggested using + +@example +for (i = N; i > 0 && i--;) @{ ... @} +@end example + +which makes the test for @code{i>0} explicit and leaves @code{i=0} on +exit from the loop. However, it is slower as there is an additional +branch which prevents unrolling. Thanks to J. Seward for pointing +this out. + +Note: As a matter of style, please use post-increment (@code{i++}) and +post-decrement (@code{i--}) operators by default and only use +pre-increment (@code{++i}) and pre-decrement (@code{--i}) operators +where specifically needed. + +@node Arrays vs Pointers, Pointers, size_t, Design +@section Arrays vs Pointers + +A function can be declared with either pointer arguments or array +arguments. The C standard considers these to be equivalent. However, it +is useful to distinguish between the case of a pointer, representing a +single object which is being modified, and an array which represents a +set of objects with unit stride (that are modified or not depending on +the presence of @code{const}). For vectors, where the stride is not +required to be unity, the pointer form is preferred. + +@smallexample +/* real value, set on output */ +int foo (double * x); + +/* real vector, modified */ +int foo (double * x, size_t stride, size_t n); + +/* constant real vector */ +int foo (const double * x, size_t stride, size_t n); + +/* real array, modified */ +int bar (double x[], size_t n); + +/* real array, not modified */ +int baz (const double x[], size_t n); +@end smallexample + +@node Pointers, Constness, Arrays vs Pointers, Design +@section Pointers + +Avoid dereferencing pointers on the right-hand side of an expression where +possible. It's better to introduce a temporary variable. This is +easier for the compiler to optimise and also more readable since it +avoids confusion between the use of @code{*} for multiplication and +dereferencing. + +@example +while (fabs (f) < 0.5) +@{ + *e = *e - 1; + f *= 2; +@} +@end example + +@noindent +is better written as, + +@example +@{ + int p = *e; + + while (fabs(f) < 0.5) + @{ + p--; + f *= 2; + @} + + *e = p; +@} +@end example + +@node Constness, Pseudo-templates, Pointers, Design +@section Constness + +Use @code{const} in function prototypes wherever an object pointed to by +a pointer is constant (obviously). For variables which are meaningfully +constant within a function/scope use @code{const} also. This prevents +you from accidentally modifying a variable which should be constant +(e.g. length of an array, etc). It can also help the compiler do +optimization. These comments also apply to arguments passed by value +which should be made @code{const} when that is meaningful. + +@node Pseudo-templates, Arbitrary Constants, Constness, Design +@section Pseudo-templates + +There are some pseudo-template macros available in @file{templates_on.h} +and @file{templates_off.h}. See a directory link @file{block} for +details on how to use them. Use sparingly, they are a bit of a +nightmare, but unavoidable in places. + +In particular, the convention is: templates are used for operations on +"data" only (vectors, matrices, statistics, sorting). This is intended +to cover the case where the program must interface with an external +data-source which produces a fixed type. e.g. a big array of char's +produced by an 8-bit counter. + +All other functions can use double, for floating point, or the +appropriate integer type for integers (e.g. unsigned long int for random +numbers). It is not the intention to provide a fully templated version +of the library. + +That would be "putting a quart into a pint pot". To summarize, almost +everything should be in a "natural type" which is appropriate for +typical usage, and templates are there to handle a few cases where it is +unavoidable that other data-types will be encountered. + +For floating point work "double" is considered a "natural type". This +sort of idea is a part of the C language. + +@node Arbitrary Constants, Test suites, Pseudo-templates, Design +@section Arbitrary Constants + +Avoid arbitrary constants. + +For example, don't hard code "small" values like '1e-30', '1e-100' or +@code{10*GSL_DBL_EPSILON} into the routines. This is not appropriate +for a general purpose library. + +Compute values accurately using IEEE arithmetic. If errors are +potentially significant then error terms should be estimated reliably +and returned to the user, by analytically deriving an error propagation +formula, not using guesswork. + +A careful consideration of the algorithm usually shows that arbitrary +constants are unnecessary, and represent an important parameter which +should be accessible to the user. + +For example, consider the following code: + +@example +if (residual < 1e-30) @{ + return 0.0; /* residual is zero within round-off error */ +@} +@end example + +@noindent +This should be rewritten as, + +@example + return residual; +@end example + +@noindent +in order to allow the user to determine whether the residual is +significant or not. + +The only place where it is acceptable to use constants like +@code{GSL_DBL_EPSILON} is in function approximations, (e.g.@: Taylor +series, asymptotic expansions, etc). In these cases it is not an +arbitrary constant, but an inherent part of the algorithm. + +@node Test suites, Compilation, Arbitrary Constants, Design +@section Test suites + +The implementor of each module should provide a reasonable test suite +for the routines. + +The test suite should be a program that uses the library and checks the +result against known results, or invokes the library several times and +does a statistical analysis on the results (for example in the case of +random number generators). + +Ideally the one test program per directory should aim for 100% path +coverage of the code. Obviously it would be a lot of work to really +achieve this, so prioritize testing on the critical parts and use +inspection for the rest. Test all the error conditions by explicitly +provoking them, because we consider it a serious defect if the function +does not return an error for an invalid parameter. N.B. Don't bother to +test for null pointers -- it's sufficient for the library to segfault if +the user provides an invalid pointer. + +The tests should be deterministic. Use the @code{gsl_test} functions +provided to perform separate tests for each feature with a separate +output PASS/FAIL line, so that any failure can be uniquely identified. + +Use realistic test cases with 'high entropy'. Tests on simple values +such as 1 or 0 may not reveal bugs. For example, a test using a value +of @math{x=1} will not pick up a missing factor of @math{x} in the code. +Similarly, a test using a value of @math{x=0} will not pick any missing +terms involving @math{x} in the code. Use values like @math{2.385} to +avoid silent failures. + +If your test uses multiple values make sure there are no simple +relations between them that could allow bugs to be missed through silent +cancellations. + +If you need some random floats to put in the test programs use @code{od -f +/dev/random} as a source of inspiration. + +Don't use @code{sprintf} to create output strings in the tests. It can +cause hard to find bugs in the test programs themselves. The functions +@code{gsl_test_...} support format string arguments so use these +instead. + +@node Compilation, Thread-safety, Test suites, Design +@section Compilation + +Make sure everything compiles cleanly. Use the strict compilation +options for extra checking. + +@smallexample +make CFLAGS="-ansi -pedantic -Werror -W -Wall -Wtraditional -Wconversion + -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings + -Wstrict-prototypes -fshort-enums -fno-common -Wmissing-prototypes + -Wnested-externs -Dinline= -g -O4" +@end smallexample + +@noindent +Also use @code{checkergcc} to check for memory problems on the stack and +the heap. It's the best memory checking tool. If checkergcc isn't +available then Electric Fence will check the heap, which is better than +no checking. + +There is a new tool @code{valgrind} for checking memory access. Test +the code with this as well. + +Make sure that the library will also compile with C++ compilers +(g++). This should not be too much of a problem if you have been writing +in ANSI C. + +@node Thread-safety, Legal issues, Compilation, Design +@section Thread-safety + +The library should be usable in thread-safe programs. All the functions +should be thread-safe, in the sense that they shouldn't use static +variables. + +We don't require everything to be completely thread safe, but anything +that isn't should be obvious. For example, some global variables are +used to control the overall behavior of the library (range-checking +on/off, function to call on fatal error, etc). Since these are accessed +directly by the user it is obvious to the multi-threaded programmer that +they shouldn't be modified by different threads. + +There is no need to provide any explicit support for threads +(e.g. locking mechanisms etc), just to avoid anything which would make +it impossible for someone to call a GSL routine from a multithreaded +program. + + +@node Legal issues, Non-UNIX portability, Thread-safety, Design +@section Legal issues + +@itemize @bullet +@item +Each contributor must make sure her code is under the GNU General Public +License (GPL). This means getting a disclaimer from your employer. +@item +We must clearly understand ownership of existing code and algorithms. +@item +Each contributor can retain ownership of their code, or sign it over to +FSF as they prefer. + +There is a standard disclaimer in the GPL (take a look at it). The more +specific you make your disclaimer the more likely it is that it will be +accepted by an employer. For example, + +@smallexample +Yoyodyne, Inc., hereby disclaims all copyright interest in the software +`GNU Scientific Library - Legendre Functions' (routines for computing +Legendre functions numerically in C) written by James Hacker. + +, 1 April 1989 +Ty Coon, President of Vice +@end smallexample + +@item +Obviously: don't use or translate non-free code. + +In particular don't copy or translate code from @cite{Numerical Recipes} +or @cite{ACM TOMS}. + +Numerical Recipes is under a strict license and is not free software. +The publishers Cambridge University Press claim copyright on all aspects +of the book and the code, including function names, variable names and +ordering of mathematical subexpressions. Routines in GSL should not +refer to Numerical Recipes or be based on it in any way. + +The ACM algorithms published in TOMS (Transactions on Mathematical +Software) are not public domain, even though they are distributed on the +internet -- the ACM uses a special non-commercial license which is not +compatible with the GPL. The details of this license can be found on the +cover page of ACM Transactions on Mathematical Software or on the ACM +Website. + +Only use code which is explicitly under a free license: GPL or Public +Domain. If there is no license on the code then this does not mean it +is public domain -- an explicit statement is required. If in doubt check +with the author. + +@item +I @strong{think} one can reference algorithms from classic books on +numerical analysis (BJG: yes, provided the code is an independent +implementation and not copied from any existing software. For +example, it would be ok to read the papers in ACM TOMS and make an +independent implementation from their description). +@end itemize + +@node Non-UNIX portability, Compatibility with other libraries, Legal issues, Design +@section Non-UNIX portability + +There is good reason to make this library work on non-UNIX systems. It +is probably safe to ignore DOS and only worry about windows95/windowsNT +portability (so filenames can be long, I think). + +On the other hand, nobody should be forced to use non-UNIX systems for +development. + +The best solution is probably to issue guidelines for portability, like +saying "don't use XYZ unless you absolutely have to". Then the Windows +people will be able to do their porting. + +@node Compatibility with other libraries, Parallelism, Non-UNIX portability, Design +@section Compatibility with other libraries + +We do not regard compatibility with other numerical libraries as a +priority. + +However, other libraries, such as Numerical Recipes, are widely used. +If somebody writes the code to allow drop-in replacement of these +libraries it would be useful to people. If it is done, it would be as a +separate wrapper that can be maintained and shipped separately. + +There is a separate issue of system libraries, such as BSD math library +and functions like @code{expm1}, @code{log1p}, @code{hypot}. The +functions in this library are available on nearly every platform (but +not all). + +In this case, it is best to write code in terms of these native +functions to take advantage of the vendor-supplied system library (for +example log1p is a machine instruction on the Intel x86). The library +also provides portable implementations e.g. @code{gsl_hypot} which are +used as an automatic fall back via autoconf when necessary. See the +usage of @code{hypot} in @file{gsl/complex/math.c}, the implementation +of @code{gsl_hypot} and the corresponding parts of files +@file{configure.in} and @file{config.h.in} as an example. + +@node Parallelism, Precision, Compatibility with other libraries, Design +@section Parallelism + +We don't intend to provide support for parallelism within the library +itself. A parallel library would require a completely different design +and would carry overhead that other applications do not need. + +@node Precision, Miscellaneous, Parallelism, Design +@section Precision + +For algorithms which use cutoffs or other precision-related terms please +express these in terms of @code{GSL_DBL_EPSILON} and @code{GSL_DBL_MIN}, or powers or +combinations of these. This makes it easier to port the routines to +different precisions. + +@node Miscellaneous, , Precision, Design +@section Miscellaneous + +Don't use the letter @code{l} as a variable name --- it is difficult to +distinguish from the number @code{1}. (This seems to be a favorite in +old Fortran programs). + +Final tip: one perfect routine is better than any number of routines +containing errors. + +@node Bibliography, Copying, Design, Top +@chapter Bibliography + +@section General numerics + +@itemize + +@item +@cite{Numerical Computation} (2 Volumes) by C.W. Ueberhuber, +Springer 1997, ISBN 3540620583 (Vol 1) and ISBN 3540620575 (Vol 2). + +@item +@cite{Accuracy and Stability of Numerical Algorithms} by N.J. Higham, +SIAM, ISBN 0898715210. + +@item +@cite{Sources and Development of Mathematical Software} edited by W.R. Cowell, +Prentice Hall, ISBN 0138235015. + +@item +@cite{A Survey of Numerical Mathematics (2 vols)} by D.M. Young and R.T. Gregory, + ISBN 0486656918, ISBN 0486656926. + +@item +@cite{Methods and Programs for Mathematical Functions} by Stephen L. Moshier, +Hard to find (ISBN 13578980X or 0135789982, possibly others). + +@item +@cite{Numerical Methods That Work} by Forman S. Acton, + ISBN 0883854503. + +@item +@cite{Real Computing Made Real: Preventing Errors in Scientific and Engineering Calculations} by Forman S. Acton, + ISBN 0486442217. +@end itemize + +@section Reference + +@itemize +@item +@cite{Handbook of Mathematical Functions} edited by Abramowitz & Stegun, +Dover, ISBN 0486612724. + +@item +@cite{The Art of Computer Programming} (3rd Edition, 3 Volumes) by D. Knuth, +Addison Wesley, ISBN 0201485419. +@end itemize + +@section Subject specific + +@itemize +@item +@cite{Matrix Computations} (3rd Ed) by G.H. Golub, C.F. Van Loan, +Johns Hopkins University Press 1996, ISBN 0801854148. + +@item +@cite{LAPACK Users' Guide} (3rd Edition), +SIAM 1999, ISBN 0898714478. + +@item +@cite{Treatise on the Theory of Bessel Functions 2ND Edition} by G N Watson, + ISBN 0521483913. + +@item +@cite{Higher Transcendental Functions satisfying nonhomogeneous linear differential equations} by A W Babister, + ISBN 1114401773. + +@end itemize + +@node Copying, GNU Free Documentation License, Bibliography, Top +@unnumbered Copying + + The subroutines and source code in the @value{GSL} package are "free"; +this means that everyone is free to use them and free to redistribute +them on a free basis. The @value{GSL}-related programs are not in the +public domain; they are copyrighted and there are restrictions on their +distribution, but these restrictions are designed to permit everything +that a good cooperating citizen would want to do. What is not allowed +is to try to prevent others from further sharing any version of these +programs that they might get from you. + + Specifically, we want to make sure that you have the right to give +away copies of the programs that relate to @value{GSL}, that you receive +source code or else can get it if you want it, that you can change these +programs or use pieces of them in new free programs, and that you know +you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of the @value{GSL}-related code, you must give the recipients all +the rights that you have. You must make sure that they, too, receive or +can get the source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone +finds out that there is no warranty for the programs that relate to +@value{GSL}. If these programs are modified by someone else and passed +on, we want their recipients to know that what they have is not what we +distributed, so that any problems introduced by others will not reflect +on our reputation. + + The precise conditions of the licenses for the programs currently +being distributed that relate to @value{GSL} are found in the General +Public Licenses that accompany them. + +@node GNU Free Documentation License, , Copying, Top +@unnumbered GNU Free Documentation License +@include fdl.texi + +@c @printindex cp + +@c @node Function Index +@c @unnumbered Function Index + +@c @printindex fn + +@c @node Variable Index +@c @unnumbered Variable Index + +@c @printindex vr + +@c @node Type Index +@c @unnumbered Type Index + +@c @printindex tp + +@bye diff --git a/software/gsl-1.15/doc/gsl-histogram.1 b/software/gsl-1.15/doc/gsl-histogram.1 new file mode 100644 index 000000000..66f9b5af0 --- /dev/null +++ b/software/gsl-1.15/doc/gsl-histogram.1 @@ -0,0 +1,42 @@ +.\" Man page contributed by Dirk Eddelbuettel +.\" and released under the GNU General Public License +.TH GSL-HISTOGRAM 1 "" GNU +.SH NAME +gsl-histogram - compute histogram of data on stdin +.SH SYNOPSYS +.B gsl-histogram xmin xmax [n] +.SH DESCRIPTION +.B gsl-histogram +is a demonstration program for the GNU Scientific Library. +It takes three arguments, specifying the upper and lower bounds of the +histogram and the number of bins. It then reads numbers from `stdin', +one line at a time, and adds them to the histogram. When there is no +more data to read it prints out the accumulated histogram using +gsl_histogram_fprintf. If n is unspecified then bins of integer width +are used. +.SH EXAMPLE +Here is an example. We generate 10000 random samples from a Cauchy +distribution with a width of 30 and histogram them over the range -100 to +100, using 200 bins. + + gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat + +A plot of the resulting histogram will show the familiar shape of the +Cauchy distribution with fluctuations caused by the finite sample +size. + + awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X + +.SH SEE ALSO +.BR gsl(3) , +.BR gsl-randist(1) . + +.SH AUTHOR +.B gsl-histogram +was written by Brian Gough. +Copyright 1996-2000; for copying conditions see the GNU General +Public Licence. + +This manual page was added by the Dirk Eddelbuettel +, the Debian GNU/Linux maintainer for +.BR GSL . diff --git a/software/gsl-1.15/doc/gsl-randist.1 b/software/gsl-1.15/doc/gsl-randist.1 new file mode 100644 index 000000000..4a0616966 --- /dev/null +++ b/software/gsl-1.15/doc/gsl-randist.1 @@ -0,0 +1,38 @@ +.\" Man page contributed by Dirk Eddelbuettel +.\" and released under the GNU General Public License +.TH GSL-RANDIST 1 "" GNU +.SH NAME +gsl-randist - generate random samples from various distributions +.SH SYNOPSYS +.B gsl-randist seed n DIST param1 param2 [..] +.SH DESCRIPTION +.B gsl-randist +is a demonstration program for the GNU Scientific Library. +It generates n random samples from the distribution DIST using the distribution +parameters param1, param2, ... +.SH EXAMPLE +Here is an example. We generate 10000 random samples from a Cauchy +distribution with a width of 30 and histogram them over the range -100 to +100, using 200 bins. + + gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat + +A plot of the resulting histogram will show the familiar shape of the +Cauchy distribution with fluctuations caused by the finite sample +size. + + awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X + +.SH SEE ALSO +.BR gsl(3) , +.BR gsl-histogram(1) . + +.SH AUTHOR +.B gsl-randist +was written by James Theiler and Brian Gough. +Copyright 1996-2000; for copying conditions see the GNU General +Public Licence. + +This manual page was added by the Dirk Eddelbuettel +, the Debian GNU/Linux maintainer for +.BR GSL . diff --git a/software/gsl-1.15/doc/gsl-ref.info b/software/gsl-1.15/doc/gsl-ref.info new file mode 100644 index 000000000..c0331d3fb --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.info @@ -0,0 +1,630 @@ +This is gsl-ref.info, produced by makeinfo version 4.13 from +gsl-ref.texi. + +INFO-DIR-SECTION Software libraries +START-INFO-DIR-ENTRY +* gsl-ref: (gsl-ref). GNU Scientific Library - Reference +END-INFO-DIR-ENTRY + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +Indirect: +gsl-ref.info-1: 948 +gsl-ref.info-2: 300146 +gsl-ref.info-3: 598317 +gsl-ref.info-4: 898064 +gsl-ref.info-5: 1168153 +gsl-ref.info-6: 1435602 + +Tag Table: +(Indirect) +Node: Top948 +Node: Introduction3679 +Node: Routines available in GSL4331 +Node: GSL is Free Software6246 +Node: Obtaining GSL8638 +Node: No Warranty9665 +Node: Reporting Bugs10171 +Ref: Reporting Bugs-Footnote-111127 +Node: Further Information11177 +Node: Conventions used in this manual12190 +Node: Using the library12954 +Node: An Example Program13540 +Ref: An Example Program-Footnote-114283 +Node: Compiling and Linking14390 +Node: Linking programs with the library15460 +Ref: Linking programs with the library-Footnote-116862 +Ref: Linking programs with the library-Footnote-216899 +Node: Linking with an alternative BLAS library16952 +Node: Shared Libraries18034 +Ref: Shared Libraries-Footnote-119509 +Node: ANSI C Compliance19557 +Node: Inline functions20650 +Node: Long double22188 +Node: Portability functions23776 +Node: Alternative optimized functions25173 +Node: Support for different numeric types26631 +Node: Compatibility with C++29694 +Node: Aliasing of arrays30266 +Node: Thread-safety31017 +Node: Deprecated Functions32104 +Node: Code Reuse32729 +Node: Error Handling33373 +Node: Error Reporting34123 +Node: Error Codes36015 +Node: Error Handlers37871 +Node: Using GSL error reporting in your own functions41508 +Node: Error Reporting Examples43466 +Node: Mathematical Functions44678 +Node: Mathematical Constants45439 +Node: Infinities and Not-a-number46569 +Ref: Infinities and Not-a-number-Footnote-147676 +Node: Elementary Functions48086 +Node: Small integer powers50533 +Node: Testing the Sign of Numbers52180 +Node: Testing for Odd and Even Numbers52611 +Node: Maximum and Minimum functions53167 +Node: Approximate Comparison of Floating Point Numbers55442 +Node: Complex Numbers56801 +Ref: Complex Numbers-Footnote-158127 +Node: Representation of complex numbers58191 +Node: Properties of complex numbers60128 +Node: Complex arithmetic operators61133 +Node: Elementary Complex Functions63879 +Node: Complex Trigonometric Functions65699 +Node: Inverse Complex Trigonometric Functions66920 +Node: Complex Hyperbolic Functions69526 +Node: Inverse Complex Hyperbolic Functions70822 +Node: Complex Number References and Further Reading72810 +Node: Polynomials74206 +Node: Polynomial Evaluation74973 +Node: Divided Difference Representation of Polynomials76383 +Node: Quadratic Equations78132 +Node: Cubic Equations80072 +Node: General Polynomial Equations81654 +Node: Roots of Polynomials Examples83999 +Node: Roots of Polynomials References and Further Reading85388 +Node: Special Functions86333 +Node: Special Function Usage88327 +Node: The gsl_sf_result struct89510 +Node: Special Function Modes90774 +Node: Airy Functions and Derivatives91710 +Node: Airy Functions92411 +Node: Derivatives of Airy Functions93771 +Node: Zeros of Airy Functions95283 +Node: Zeros of Derivatives of Airy Functions96002 +Node: Bessel Functions96761 +Node: Regular Cylindrical Bessel Functions97953 +Node: Irregular Cylindrical Bessel Functions99277 +Node: Regular Modified Cylindrical Bessel Functions100735 +Node: Irregular Modified Cylindrical Bessel Functions103562 +Node: Regular Spherical Bessel Functions106530 +Node: Irregular Spherical Bessel Functions108744 +Node: Regular Modified Spherical Bessel Functions110431 +Node: Irregular Modified Spherical Bessel Functions112434 +Node: Regular Bessel Function - Fractional Order114497 +Node: Irregular Bessel Functions - Fractional Order115495 +Node: Regular Modified Bessel Functions - Fractional Order116077 +Node: Irregular Modified Bessel Functions - Fractional Order117002 +Node: Zeros of Regular Bessel Functions118238 +Node: Clausen Functions119341 +Node: Coulomb Functions119945 +Node: Normalized Hydrogenic Bound States120394 +Node: Coulomb Wave Functions121507 +Node: Coulomb Wave Function Normalization Constant124917 +Node: Coupling Coefficients125670 +Node: 3-j Symbols126393 +Node: 6-j Symbols126997 +Node: 9-j Symbols127621 +Node: Dawson Function128327 +Node: Debye Functions128894 +Node: Dilogarithm130668 +Node: Real Argument130963 +Node: Complex Argument131656 +Node: Elementary Operations132125 +Node: Elliptic Integrals132949 +Node: Definition of Legendre Forms133521 +Node: Definition of Carlson Forms134341 +Node: Legendre Form of Complete Elliptic Integrals135038 +Node: Legendre Form of Incomplete Elliptic Integrals136606 +Node: Carlson Forms138794 +Node: Elliptic Functions (Jacobi)140341 +Node: Error Functions140922 +Node: Error Function141373 +Node: Complementary Error Function141746 +Node: Log Complementary Error Function142206 +Node: Probability functions142658 +Node: Exponential Functions143911 +Node: Exponential Function144294 +Node: Relative Exponential Functions145517 +Node: Exponentiation With Error Estimate147189 +Node: Exponential Integrals148398 +Node: Exponential Integral148880 +Node: Ei(x)149807 +Node: Hyperbolic Integrals150255 +Node: Ei_3(x)150911 +Node: Trigonometric Integrals151303 +Node: Arctangent Integral151902 +Node: Fermi-Dirac Function152302 +Node: Complete Fermi-Dirac Integrals152672 +Node: Incomplete Fermi-Dirac Integrals155240 +Node: Gamma and Beta Functions155883 +Node: Gamma Functions156456 +Node: Factorials159565 +Node: Pochhammer Symbol162118 +Node: Incomplete Gamma Functions163624 +Node: Beta Functions164873 +Node: Incomplete Beta Function165625 +Node: Gegenbauer Functions166336 +Node: Hypergeometric Functions167986 +Node: Laguerre Functions172249 +Node: Lambert W Functions173812 +Node: Legendre Functions and Spherical Harmonics174850 +Node: Legendre Polynomials175439 +Node: Associated Legendre Polynomials and Spherical Harmonics177494 +Node: Conical Functions180327 +Node: Radial Functions for Hyperbolic Space182450 +Node: Logarithm and Related Functions184627 +Node: Mathieu Functions186251 +Node: Mathieu Function Workspace187600 +Node: Mathieu Function Characteristic Values188414 +Node: Angular Mathieu Functions189486 +Node: Radial Mathieu Functions190522 +Node: Power Function191764 +Node: Psi (Digamma) Function192691 +Node: Digamma Function193211 +Node: Trigamma Function194041 +Node: Polygamma Function194618 +Node: Synchrotron Functions195002 +Node: Transport Functions195765 +Node: Trigonometric Functions196912 +Node: Circular Trigonometric Functions197535 +Node: Trigonometric Functions for Complex Arguments198544 +Node: Hyperbolic Trigonometric Functions199580 +Node: Conversion Functions200183 +Node: Restriction Functions200966 +Node: Trigonometric Functions With Error Estimates201898 +Node: Zeta Functions202808 +Node: Riemann Zeta Function203266 +Node: Riemann Zeta Function Minus One203945 +Node: Hurwitz Zeta Function204716 +Node: Eta Function205221 +Node: Special Functions Examples205780 +Node: Special Functions References and Further Reading207474 +Node: Vectors and Matrices208744 +Node: Data types209503 +Node: Blocks210706 +Node: Block allocation211622 +Node: Reading and writing blocks213106 +Node: Example programs for blocks215170 +Node: Vectors215797 +Node: Vector allocation217683 +Node: Accessing vector elements219301 +Ref: Accessing vector elements-Footnote-1222443 +Node: Initializing vector elements222682 +Node: Reading and writing vectors223376 +Node: Vector views225466 +Node: Copying vectors232908 +Node: Exchanging elements233768 +Node: Vector operations234326 +Node: Finding maximum and minimum elements of vectors236092 +Node: Vector properties237678 +Node: Example programs for vectors238652 +Node: Matrices240941 +Node: Matrix allocation243799 +Node: Accessing matrix elements245466 +Node: Initializing matrix elements247415 +Node: Reading and writing matrices248211 +Node: Matrix views250314 +Node: Creating row and column views257454 +Node: Copying matrices261924 +Node: Copying rows and columns262520 +Node: Exchanging rows and columns264197 +Node: Matrix operations265675 +Node: Finding maximum and minimum elements of matrices267642 +Node: Matrix properties269546 +Node: Example programs for matrices270648 +Node: Vector and Matrix References and Further Reading274719 +Node: Permutations275205 +Node: The Permutation struct276493 +Node: Permutation allocation276997 +Node: Accessing permutation elements278431 +Node: Permutation properties279274 +Node: Permutation functions279979 +Node: Applying Permutations281236 +Node: Reading and writing permutations283162 +Ref: Reading and writing permutations-Footnote-1285377 +Node: Permutations in cyclic form285489 +Node: Permutation Examples288914 +Node: Permutation References and Further Reading291457 +Node: Combinations292131 +Node: The Combination struct292978 +Node: Combination allocation293530 +Node: Accessing combination elements295315 +Node: Combination properties295974 +Node: Combination functions296860 +Node: Reading and writing combinations297800 +Ref: Reading and writing combinations-Footnote-1300034 +Node: Combination Examples300146 +Node: Combination References and Further Reading301454 +Node: Multisets301858 +Node: The Multiset struct302784 +Node: Multiset allocation303306 +Node: Accessing multiset elements304997 +Node: Multiset properties305626 +Node: Multiset functions306439 +Node: Reading and writing multisets307349 +Ref: Reading and writing multisets-Footnote-1309500 +Node: Multiset Examples309612 +Node: Sorting311720 +Node: Sorting objects312667 +Node: Sorting vectors315578 +Node: Selecting the k smallest or largest elements318154 +Node: Computing the rank321488 +Node: Sorting Examples322689 +Node: Sorting References and Further Reading324333 +Node: BLAS Support324879 +Ref: BLAS Support-Footnote-1328254 +Node: GSL BLAS Interface328422 +Node: Level 1 GSL BLAS Interface328909 +Node: Level 2 GSL BLAS Interface335648 +Node: Level 3 GSL BLAS Interface344944 +Node: BLAS Examples356084 +Node: BLAS References and Further Reading357505 +Node: Linear Algebra358852 +Node: LU Decomposition359977 +Node: QR Decomposition365222 +Node: QR Decomposition with Column Pivoting371531 +Node: Singular Value Decomposition375986 +Node: Cholesky Decomposition379982 +Node: Tridiagonal Decomposition of Real Symmetric Matrices383222 +Node: Tridiagonal Decomposition of Hermitian Matrices385070 +Node: Hessenberg Decomposition of Real Matrices387022 +Node: Hessenberg-Triangular Decomposition of Real Matrices389432 +Node: Bidiagonalization390552 +Node: Householder Transformations392977 +Node: Householder solver for linear systems395329 +Node: Tridiagonal Systems396234 +Node: Balancing399106 +Node: Linear Algebra Examples399907 +Node: Linear Algebra References and Further Reading401895 +Node: Eigensystems403542 +Node: Real Symmetric Matrices404756 +Node: Complex Hermitian Matrices407270 +Node: Real Nonsymmetric Matrices409897 +Node: Real Generalized Symmetric-Definite Eigensystems415610 +Node: Complex Generalized Hermitian-Definite Eigensystems418482 +Node: Real Generalized Nonsymmetric Eigensystems421189 +Node: Sorting Eigenvalues and Eigenvectors427773 +Node: Eigenvalue and Eigenvector Examples431050 +Node: Eigenvalue and Eigenvector References436440 +Node: Fast Fourier Transforms437465 +Node: Mathematical Definitions438674 +Node: Overview of complex data FFTs441079 +Node: Radix-2 FFT routines for complex data444022 +Node: Mixed-radix FFT routines for complex data448234 +Node: Overview of real data FFTs457563 +Node: Radix-2 FFT routines for real data459997 +Node: Mixed-radix FFT routines for real data464426 +Node: FFT References and Further Reading475100 +Node: Numerical Integration477969 +Node: Numerical Integration Introduction479735 +Node: Integrands without weight functions482004 +Node: Integrands with weight functions482833 +Node: Integrands with singular weight functions483544 +Node: QNG non-adaptive Gauss-Kronrod integration484462 +Node: QAG adaptive integration485743 +Node: QAGS adaptive integration with singularities488374 +Node: QAGP adaptive integration with known singular points490174 +Node: QAGI adaptive integration on infinite intervals491488 +Node: QAWC adaptive integration for Cauchy principal values493781 +Node: QAWS adaptive integration for singular functions494956 +Node: QAWO adaptive integration for oscillatory functions498178 +Node: QAWF adaptive integration for Fourier integrals501957 +Node: CQUAD doubly-adaptive integration504582 +Node: Fixed order Gauss-Legendre integration507819 +Node: Numerical integration error codes509797 +Node: Numerical integration examples510556 +Node: Numerical integration References and Further Reading512602 +Node: Random Number Generation513593 +Node: General comments on random numbers515095 +Node: The Random Number Generator Interface517045 +Node: Random number generator initialization518403 +Node: Sampling from a random number generator520776 +Node: Auxiliary random number generator functions524017 +Node: Random number environment variables526337 +Node: Copying random number generator state528863 +Node: Reading and writing random number generator state529838 +Node: Random number generator algorithms531232 +Node: Unix random number generators541167 +Node: Other random number generators544885 +Node: Random Number Generator Performance553519 +Node: Random Number Generator Examples554640 +Node: Random Number References and Further Reading556196 +Node: Random Number Acknowledgements557493 +Node: Quasi-Random Sequences557979 +Node: Quasi-random number generator initialization559086 +Node: Sampling from a quasi-random number generator560101 +Node: Auxiliary quasi-random number generator functions560798 +Node: Saving and resorting quasi-random number generator state561744 +Node: Quasi-random number generator algorithms562552 +Node: Quasi-random number generator examples563688 +Node: Quasi-random number references564673 +Node: Random Number Distributions565199 +Node: Random Number Distribution Introduction568398 +Node: The Gaussian Distribution570193 +Node: The Gaussian Tail Distribution572854 +Node: The Bivariate Gaussian Distribution574523 +Node: The Exponential Distribution575846 +Node: The Laplace Distribution576985 +Node: The Exponential Power Distribution578082 +Node: The Cauchy Distribution579350 +Node: The Rayleigh Distribution580599 +Node: The Rayleigh Tail Distribution581771 +Node: The Landau Distribution582643 +Node: The Levy alpha-Stable Distributions583598 +Node: The Levy skew alpha-Stable Distribution584656 +Node: The Gamma Distribution586268 +Node: The Flat (Uniform) Distribution587925 +Node: The Lognormal Distribution589077 +Node: The Chi-squared Distribution590425 +Node: The F-distribution591829 +Node: The t-distribution593465 +Node: The Beta Distribution594859 +Node: The Logistic Distribution596018 +Node: The Pareto Distribution597147 +Node: Spherical Vector Distributions598317 +Node: The Weibull Distribution601151 +Node: The Type-1 Gumbel Distribution602345 +Node: The Type-2 Gumbel Distribution603582 +Node: The Dirichlet Distribution604813 +Node: General Discrete Distributions606480 +Node: The Poisson Distribution610347 +Node: The Bernoulli Distribution611355 +Node: The Binomial Distribution612106 +Node: The Multinomial Distribution613311 +Node: The Negative Binomial Distribution615080 +Node: The Pascal Distribution616445 +Node: The Geometric Distribution617603 +Node: The Hypergeometric Distribution618851 +Node: The Logarithmic Distribution620504 +Node: Shuffling and Sampling621295 +Node: Random Number Distribution Examples624114 +Node: Random Number Distribution References and Further Reading627310 +Node: Statistics629453 +Node: Mean and standard deviation and variance630853 +Node: Absolute deviation634361 +Node: Higher moments (skewness and kurtosis)635653 +Node: Autocorrelation637786 +Node: Covariance638600 +Node: Correlation639576 +Node: Weighted Samples640285 +Node: Maximum and Minimum values646135 +Node: Median and Percentiles648874 +Node: Example statistical programs651289 +Node: Statistics References and Further Reading653949 +Node: Histograms655157 +Node: The histogram struct656917 +Node: Histogram allocation658720 +Node: Copying Histograms661681 +Node: Updating and accessing histogram elements662357 +Node: Searching histogram ranges665624 +Node: Histogram Statistics666623 +Node: Histogram Operations668483 +Node: Reading and writing histograms670555 +Node: Resampling from histograms673597 +Node: The histogram probability distribution struct674395 +Node: Example programs for histograms677426 +Node: Two dimensional histograms679489 +Node: The 2D histogram struct680210 +Node: 2D Histogram allocation682018 +Node: Copying 2D Histograms684089 +Node: Updating and accessing 2D histogram elements684794 +Node: Searching 2D histogram ranges688450 +Node: 2D Histogram Statistics689469 +Node: 2D Histogram Operations692328 +Node: Reading and writing 2D histograms694502 +Node: Resampling from 2D histograms698131 +Node: Example programs for 2D histograms701150 +Node: N-tuples702978 +Node: The ntuple struct704234 +Node: Creating ntuples704712 +Node: Opening an existing ntuple file705379 +Node: Writing ntuples706007 +Node: Reading ntuples706468 +Node: Closing an ntuple file706799 +Node: Histogramming ntuple values707139 +Node: Example ntuple programs709147 +Node: Ntuple References and Further Reading712476 +Node: Monte Carlo Integration712797 +Node: Monte Carlo Interface714042 +Node: PLAIN Monte Carlo716665 +Node: MISER719119 +Ref: MISER-Footnote-1725795 +Node: VEGAS725920 +Node: Monte Carlo Examples735471 +Node: Monte Carlo Integration References and Further Reading741456 +Node: Simulated Annealing742238 +Node: Simulated Annealing algorithm743445 +Node: Simulated Annealing functions744599 +Node: Examples with Simulated Annealing749134 +Node: Trivial example749688 +Node: Traveling Salesman Problem752339 +Node: Simulated Annealing References and Further Reading755652 +Node: Ordinary Differential Equations756063 +Node: Defining the ODE System757254 +Node: Stepping Functions760080 +Node: Adaptive Step-size Control767022 +Node: Evolution773094 +Node: Driver777211 +Node: ODE Example programs781150 +Node: ODE References and Further Reading786218 +Node: Interpolation787978 +Node: Introduction to Interpolation789149 +Node: Interpolation Functions789590 +Node: Interpolation Types790797 +Node: Index Look-up and Acceleration793520 +Node: Evaluation of Interpolating Functions795572 +Node: Higher-level Interface798073 +Node: Interpolation Example programs800112 +Node: Interpolation References and Further Reading803328 +Node: Numerical Differentiation803901 +Node: Numerical Differentiation functions804490 +Node: Numerical Differentiation Examples807348 +Node: Numerical Differentiation References808761 +Node: Chebyshev Approximations809312 +Node: Chebyshev Definitions810373 +Node: Creation and Calculation of Chebyshev Series811163 +Node: Auxiliary Functions for Chebyshev Series812148 +Node: Chebyshev Series Evaluation812888 +Node: Derivatives and Integrals814268 +Node: Chebyshev Approximation Examples815510 +Node: Chebyshev Approximation References and Further Reading817006 +Node: Series Acceleration817455 +Node: Acceleration functions818220 +Node: Acceleration functions without error estimation820545 +Node: Example of accelerating a series823155 +Node: Series Acceleration References825501 +Node: Wavelet Transforms826389 +Node: DWT Definitions826930 +Node: DWT Initialization827882 +Node: DWT Transform Functions830531 +Node: DWT in one dimension831066 +Node: DWT in two dimension833085 +Node: DWT Examples837663 +Node: DWT References839480 +Node: Discrete Hankel Transforms841643 +Node: Discrete Hankel Transform Definition842111 +Node: Discrete Hankel Transform Functions844310 +Node: Discrete Hankel Transform References845974 +Node: One dimensional Root-Finding846378 +Node: Root Finding Overview847638 +Node: Root Finding Caveats849496 +Node: Initializing the Solver851263 +Node: Providing the function to solve853896 +Node: Search Bounds and Guesses857444 +Node: Root Finding Iteration858307 +Node: Search Stopping Parameters860156 +Node: Root Bracketing Algorithms862670 +Node: Root Finding Algorithms using Derivatives865968 +Ref: Root Finding Algorithms using Derivatives-Footnote-1869510 +Node: Root Finding Examples869665 +Node: Root Finding References and Further Reading876953 +Node: One dimensional Minimization877592 +Node: Minimization Overview878894 +Node: Minimization Caveats880600 +Node: Initializing the Minimizer881937 +Node: Providing the function to minimize884178 +Node: Minimization Iteration884656 +Node: Minimization Stopping Parameters886792 +Node: Minimization Algorithms888401 +Node: Minimization Examples891005 +Node: Minimization References and Further Reading893932 +Node: Multidimensional Root-Finding894388 +Node: Overview of Multidimensional Root Finding895877 +Node: Initializing the Multidimensional Solver898064 +Node: Providing the multidimensional system of equations to solve901295 +Node: Iteration of the multidimensional solver906200 +Node: Search Stopping Parameters for the multidimensional solver908479 +Node: Algorithms using Derivatives910216 +Node: Algorithms without Derivatives915045 +Node: Example programs for Multidimensional Root finding918133 +Node: References and Further Reading for Multidimensional Root Finding926746 +Node: Multidimensional Minimization927985 +Node: Multimin Overview929338 +Node: Multimin Caveats931415 +Node: Initializing the Multidimensional Minimizer932164 +Node: Providing a function to minimize935325 +Node: Multimin Iteration939377 +Node: Multimin Stopping Criteria941576 +Node: Multimin Algorithms with Derivatives943145 +Node: Multimin Algorithms without Derivatives946673 +Node: Multimin Examples949673 +Node: Multimin References and Further Reading956239 +Node: Least-Squares Fitting957104 +Node: Fitting Overview958103 +Node: Linear regression960437 +Node: Linear fitting without a constant term963039 +Node: Multi-parameter fitting965232 +Node: Fitting Examples971046 +Node: Fitting References and Further Reading977871 +Node: Nonlinear Least-Squares Fitting978693 +Node: Overview of Nonlinear Least-Squares Fitting980143 +Node: Initializing the Nonlinear Least-Squares Solver981610 +Node: Providing the Function to be Minimized984475 +Node: Iteration of the Minimization Algorithm987412 +Node: Search Stopping Parameters for Minimization Algorithms989262 +Node: Minimization Algorithms using Derivatives991357 +Ref: Minimization Algorithms using Derivatives-Footnote-1994838 +Node: Minimization Algorithms without Derivatives994927 +Node: Computing the covariance matrix of best fit parameters995319 +Node: Example programs for Nonlinear Least-Squares Fitting997353 +Node: References and Further Reading for Nonlinear Least-Squares Fitting1005081 +Node: Basis Splines1005817 +Node: Overview of B-splines1006717 +Node: Initializing the B-splines solver1008026 +Node: Constructing the knots vector1009402 +Node: Evaluation of B-spline basis functions1010189 +Node: Evaluation of B-spline basis function derivatives1011846 +Node: Obtaining Greville abscissae for B-spline basis functions1013838 +Node: Example programs for B-splines1014880 +Node: References and Further Reading1018892 +Node: Physical Constants1019697 +Node: Fundamental Constants1021107 +Node: Astronomy and Astrophysics1022246 +Node: Atomic and Nuclear Physics1022911 +Node: Measurement of Time1024562 +Node: Imperial Units1024992 +Node: Speed and Nautical Units1025434 +Node: Printers Units1025938 +Node: Volume Area and Length1026261 +Node: Mass and Weight1026947 +Node: Thermal Energy and Power1027766 +Node: Pressure1028189 +Node: Viscosity1028802 +Node: Light and Illumination1029078 +Node: Radioactivity1029670 +Node: Force and Energy1030005 +Node: Prefixes1030409 +Node: Physical Constant Examples1031152 +Node: Physical Constant References and Further Reading1032941 +Node: IEEE floating-point arithmetic1033671 +Node: Representation of floating point numbers1034257 +Node: Setting up your IEEE environment1038738 +Node: IEEE References and Further Reading1045730 +Node: Debugging Numerical Programs1046885 +Node: Using gdb1047369 +Node: Examining floating point registers1050712 +Node: Handling floating point exceptions1051997 +Node: GCC warning options for numerical programs1053409 +Node: Debugging References1057371 +Node: Contributors to GSL1058083 +Node: Autoconf Macros1062552 +Node: GSL CBLAS Library1066581 +Node: Level 1 CBLAS Functions1067108 +Node: Level 2 CBLAS Functions1072410 +Node: Level 3 CBLAS Functions1089080 +Node: GSL CBLAS Examples1098742 +Node: Free Software Needs Free Documentation1100304 +Node: GNU General Public License1105373 +Node: GNU Free Documentation License1142985 +Node: Function Index1168153 +Node: Variable Index1417524 +Node: Type Index1420827 +Node: Concept Index1435602 + +End Tag Table diff --git a/software/gsl-1.15/doc/gsl-ref.info-1 b/software/gsl-1.15/doc/gsl-ref.info-1 new file mode 100644 index 000000000..bdc5d7bbc --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.info-1 @@ -0,0 +1,7374 @@ +This is gsl-ref.info, produced by makeinfo version 4.13 from +gsl-ref.texi. + +INFO-DIR-SECTION Software libraries +START-INFO-DIR-ENTRY +* gsl-ref: (gsl-ref). GNU Scientific Library - Reference +END-INFO-DIR-ENTRY + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +File: gsl-ref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + +GSL +*** + +This file documents the GNU Scientific Library (GSL), a collection of +numerical routines for scientific computing. It corresponds to release +1.15 of the library. Please report any errors in this manual to +. + + More information about GSL can be found at the project homepage, +`http://www.gnu.org/software/gsl/'. + + Printed copies of this manual can be purchased from Network Theory +Ltd at `http://www.network-theory.co.uk/gsl/manual/'. The money raised +from sales of the manual helps support the development of GSL. + + A Japanese translation of this manual is available from the GSL +project homepage thanks to Daisuke Tominaga. + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +* Menu: + +* Introduction:: +* Using the library:: +* Error Handling:: +* Mathematical Functions:: +* Complex Numbers:: +* Polynomials:: +* Special Functions:: +* Vectors and Matrices:: +* Permutations:: +* Combinations:: +* Multisets:: +* Sorting:: +* BLAS Support:: +* Linear Algebra:: +* Eigensystems:: +* Fast Fourier Transforms:: +* Numerical Integration:: +* Random Number Generation:: +* Quasi-Random Sequences:: +* Random Number Distributions:: +* Statistics:: +* Histograms:: +* N-tuples:: +* Monte Carlo Integration:: +* Simulated Annealing:: +* Ordinary Differential Equations:: +* Interpolation:: +* Numerical Differentiation:: +* Chebyshev Approximations:: +* Series Acceleration:: +* Wavelet Transforms:: +* Discrete Hankel Transforms:: +* One dimensional Root-Finding:: +* One dimensional Minimization:: +* Multidimensional Root-Finding:: +* Multidimensional Minimization:: +* Least-Squares Fitting:: +* Nonlinear Least-Squares Fitting:: +* Basis Splines:: +* Physical Constants:: +* IEEE floating-point arithmetic:: +* Debugging Numerical Programs:: +* Contributors to GSL:: +* Autoconf Macros:: +* GSL CBLAS Library:: +* Free Software Needs Free Documentation:: +* GNU General Public License:: +* GNU Free Documentation License:: +* Function Index:: +* Variable Index:: +* Type Index:: +* Concept Index:: + + +File: gsl-ref.info, Node: Introduction, Next: Using the library, Prev: Top, Up: Top + +1 Introduction +************** + +The GNU Scientific Library (GSL) is a collection of routines for +numerical computing. The routines have been written from scratch in C, +and present a modern Applications Programming Interface (API) for C +programmers, allowing wrappers to be written for very high level +languages. The source code is distributed under the GNU General Public +License. + +* Menu: + +* Routines available in GSL:: +* GSL is Free Software:: +* Obtaining GSL:: +* No Warranty:: +* Reporting Bugs:: +* Further Information:: +* Conventions used in this manual:: + + +File: gsl-ref.info, Node: Routines available in GSL, Next: GSL is Free Software, Up: Introduction + +1.1 Routines available in GSL +============================= + +The library covers a wide range of topics in numerical computing. +Routines are available for the following areas, + + Complex Numbers Roots of Polynomials + Special Functions Vectors and Matrices + Permutations Combinations + Sorting BLAS Support + Linear Algebra CBLAS Library + Fast Fourier Transforms Eigensystems + Random Numbers Quadrature + Random Distributions Quasi-Random Sequences + Histograms Statistics + Monte Carlo Integration N-Tuples + Differential Equations Simulated Annealing + Numerical Differentiation Interpolation + Series Acceleration Chebyshev Approximations + Root-Finding Discrete Hankel Transforms + Least-Squares Fitting Minimization + IEEE Floating-Point Physical Constants + Basis Splines Wavelets + +The use of these routines is described in this manual. Each chapter +provides detailed definitions of the functions, followed by example +programs and references to the articles on which the algorithms are +based. + + Where possible the routines have been based on reliable public-domain +packages such as FFTPACK and QUADPACK, which the developers of GSL have +reimplemented in C with modern coding conventions. + + +File: gsl-ref.info, Node: GSL is Free Software, Next: Obtaining GSL, Prev: Routines available in GSL, Up: Introduction + +1.2 GSL is Free Software +======================== + +The subroutines in the GNU Scientific Library are "free software"; this +means that everyone is free to use them, and to redistribute them in +other free programs. The library is not in the public domain; it is +copyrighted and there are conditions on its distribution. These +conditions are designed to permit everything that a good cooperating +citizen would want to do. What is not allowed is to try to prevent +others from further sharing any version of the software that they might +get from you. + + Specifically, we want to make sure that you have the right to share +copies of programs that you are given which use the GNU Scientific +Library, that you receive their source code or else can get it if you +want it, that you can change these programs or use pieces of them in new +free programs, and that you know you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of any code which uses the GNU Scientific Library, you must give +the recipients all the rights that you have received. You must make +sure that they, too, receive or can get the source code, both to the +library and the code which uses it. And you must tell them their +rights. This means that the library should not be redistributed in +proprietary programs. + + Also, for our own protection, we must make certain that everyone +finds out that there is no warranty for the GNU Scientific Library. If +these programs are modified by someone else and passed on, we want their +recipients to know that what they have is not what we distributed, so +that any problems introduced by others will not reflect on our +reputation. + + The precise conditions for the distribution of software related to +the GNU Scientific Library are found in the GNU General Public License +(*note GNU General Public License::). Further information about this +license is available from the GNU Project webpage `Frequently Asked +Questions about the GNU GPL', + + `http://www.gnu.org/copyleft/gpl-faq.html' + +The Free Software Foundation also operates a license consulting service +for commercial users (contact details available from +`http://www.fsf.org/'). + + +File: gsl-ref.info, Node: Obtaining GSL, Next: No Warranty, Prev: GSL is Free Software, Up: Introduction + +1.3 Obtaining GSL +================= + +The source code for the library can be obtained in different ways, by +copying it from a friend, purchasing it on CDROM or downloading it from +the internet. A list of public ftp servers which carry the source code +can be found on the GNU website, + + `http://www.gnu.org/software/gsl/' + +The preferred platform for the library is a GNU system, which allows it +to take advantage of additional features in the GNU C compiler and GNU C +library. However, the library is fully portable and should compile on +most systems with a C compiler. + + Announcements of new releases, updates and other relevant events are +made on the `info-gsl@gnu.org' mailing list. To subscribe to this +low-volume list, send an email of the following form: + + To: info-gsl-request@gnu.org + Subject: subscribe + +You will receive a response asking you to reply in order to confirm +your subscription. + + +File: gsl-ref.info, Node: No Warranty, Next: Reporting Bugs, Prev: Obtaining GSL, Up: Introduction + +1.4 No Warranty +=============== + +The software described in this manual has no warranty, it is provided +"as is". It is your responsibility to validate the behavior of the +routines and their accuracy using the source code provided, or to +purchase support and warranties from commercial redistributors. Consult +the GNU General Public license for further details (*note GNU General +Public License::). + + +File: gsl-ref.info, Node: Reporting Bugs, Next: Further Information, Prev: No Warranty, Up: Introduction + +1.5 Reporting Bugs +================== + +A list of known bugs can be found in the `BUGS' file included in the +GSL distribution or online in the GSL bug tracker.(1) Details of +compilation problems can be found in the `INSTALL' file. + + If you find a bug which is not listed in these files, please report +it to . + + All bug reports should include: + + * The version number of GSL + + * The hardware and operating system + + * The compiler used, including version number and compilation options + + * A description of the bug behavior + + * A short program which exercises the bug + +It is useful if you can check whether the same problem occurs when the +library is compiled without optimization. Thank you. + + Any errors or omissions in this manual can also be reported to the +same address. + + ---------- Footnotes ---------- + + (1) `http://savannah.gnu.org/bugs/?group=gsl' + + +File: gsl-ref.info, Node: Further Information, Next: Conventions used in this manual, Prev: Reporting Bugs, Up: Introduction + +1.6 Further Information +======================= + +Additional information, including online copies of this manual, links to +related projects, and mailing list archives are available from the +website mentioned above. + + Any questions about the use and installation of the library can be +asked on the mailing list `help-gsl@gnu.org'. To subscribe to this +list, send an email of the following form: + + To: help-gsl-request@gnu.org + Subject: subscribe + +This mailing list can be used to ask questions not covered by this +manual, and to contact the developers of the library. + + If you would like to refer to the GNU Scientific Library in a journal +article, the recommended way is to cite this reference manual, e.g. `M. +Galassi et al, GNU Scientific Library Reference Manual (3rd Ed.), ISBN +0954612078'. + + If you want to give a url, use "`http://www.gnu.org/software/gsl/'". + + +File: gsl-ref.info, Node: Conventions used in this manual, Prev: Further Information, Up: Introduction + +1.7 Conventions used in this manual +=================================== + +This manual contains many examples which can be typed at the keyboard. +A command entered at the terminal is shown like this, + + $ command + +The first character on the line is the terminal prompt, and should not +be typed. The dollar sign `$' is used as the standard prompt in this +manual, although some systems may use a different character. + + The examples assume the use of the GNU operating system. There may +be minor differences in the output on other systems. The commands for +setting environment variables use the Bourne shell syntax of the +standard GNU shell (`bash'). + + +File: gsl-ref.info, Node: Using the library, Next: Error Handling, Prev: Introduction, Up: Top + +2 Using the library +******************* + +This chapter describes how to compile programs that use GSL, and +introduces its conventions. + +* Menu: + +* An Example Program:: +* Compiling and Linking:: +* Shared Libraries:: +* ANSI C Compliance:: +* Inline functions:: +* Long double:: +* Portability functions:: +* Alternative optimized functions:: +* Support for different numeric types:: +* Compatibility with C++:: +* Aliasing of arrays:: +* Thread-safety:: +* Deprecated Functions:: +* Code Reuse:: + + +File: gsl-ref.info, Node: An Example Program, Next: Compiling and Linking, Up: Using the library + +2.1 An Example Program +====================== + +The following short program demonstrates the use of the library by +computing the value of the Bessel function J_0(x) for x=5, + + #include + #include + + int + main (void) + { + double x = 5.0; + double y = gsl_sf_bessel_J0 (x); + printf ("J0(%g) = %.18e\n", x, y); + return 0; + } + +The output is shown below, and should be correct to double-precision +accuracy,(1) + + J0(5) = -1.775967713143382920e-01 + +The steps needed to compile this program are described in the following +sections. + + ---------- Footnotes ---------- + + (1) The last few digits may vary slightly depending on the compiler +and platform used--this is normal. + + +File: gsl-ref.info, Node: Compiling and Linking, Next: Shared Libraries, Prev: An Example Program, Up: Using the library + +2.2 Compiling and Linking +========================= + +The library header files are installed in their own `gsl' directory. +You should write any preprocessor include statements with a `gsl/' +directory prefix thus, + + #include + +If the directory is not installed on the standard search path of your +compiler you will also need to provide its location to the preprocessor +as a command line flag. The default location of the `gsl' directory is +`/usr/local/include/gsl'. A typical compilation command for a source +file `example.c' with the GNU C compiler `gcc' is, + + $ gcc -Wall -I/usr/local/include -c example.c + +This results in an object file `example.o'. The default include path +for `gcc' searches `/usr/local/include' automatically so the `-I' +option can actually be omitted when GSL is installed in its default +location. + +* Menu: + +* Linking programs with the library:: +* Linking with an alternative BLAS library:: + + +File: gsl-ref.info, Node: Linking programs with the library, Next: Linking with an alternative BLAS library, Up: Compiling and Linking + +2.2.1 Linking programs with the library +--------------------------------------- + +The library is installed as a single file, `libgsl.a'. A shared +version of the library `libgsl.so' is also installed on systems that +support shared libraries. The default location of these files is +`/usr/local/lib'. If this directory is not on the standard search path +of your linker you will also need to provide its location as a command +line flag. + + To link against the library you need to specify both the main +library and a supporting CBLAS library, which provides standard basic +linear algebra subroutines. A suitable CBLAS implementation is +provided in the library `libgslcblas.a' if your system does not provide +one. The following example shows how to link an application with the +library, + + $ gcc -L/usr/local/lib example.o -lgsl -lgslcblas -lm + +The default library path for `gcc' searches `/usr/local/lib' +automatically so the `-L' option can be omitted when GSL is installed +in its default location. + + The option `-lm' links with the system math library. On some systems +it is not needed.(1) + + For a tutorial introduction to the GNU C Compiler and related +programs, see `An Introduction to GCC' (ISBN 0954161793).(2) + + ---------- Footnotes ---------- + + (1) It is not needed on MacOS X. + + (2) `http://www.network-theory.co.uk/gcc/intro/' + + +File: gsl-ref.info, Node: Linking with an alternative BLAS library, Prev: Linking programs with the library, Up: Compiling and Linking + +2.2.2 Linking with an alternative BLAS library +---------------------------------------------- + +The following command line shows how you would link the same application +with an alternative CBLAS library `libcblas.a', + + $ gcc example.o -lgsl -lcblas -lm + +For the best performance an optimized platform-specific CBLAS library +should be used for `-lcblas'. The library must conform to the CBLAS +standard. The ATLAS package provides a portable high-performance BLAS +library with a CBLAS interface. It is free software and should be +installed for any work requiring fast vector and matrix operations. +The following command line will link with the ATLAS library and its +CBLAS interface, + + $ gcc example.o -lgsl -lcblas -latlas -lm + +If the ATLAS library is installed in a non-standard directory use the +`-L' option to add it to the search path, as described above. + + For more information about BLAS functions see *note BLAS Support::. + + +File: gsl-ref.info, Node: Shared Libraries, Next: ANSI C Compliance, Prev: Compiling and Linking, Up: Using the library + +2.3 Shared Libraries +==================== + +To run a program linked with the shared version of the library the +operating system must be able to locate the corresponding `.so' file at +runtime. If the library cannot be found, the following error will +occur: + + $ ./a.out + ./a.out: error while loading shared libraries: + libgsl.so.0: cannot open shared object file: No such + file or directory + +To avoid this error, either modify the system dynamic linker +configuration(1) or define the shell variable `LD_LIBRARY_PATH' to +include the directory where the library is installed. + + For example, in the Bourne shell (`/bin/sh' or `/bin/bash'), the +library search path can be set with the following commands: + + $ LD_LIBRARY_PATH=/usr/local/lib + $ export LD_LIBRARY_PATH + $ ./example + +In the C-shell (`/bin/csh' or `/bin/tcsh') the equivalent command is, + + % setenv LD_LIBRARY_PATH /usr/local/lib + +The standard prompt for the C-shell in the example above is the percent +character `%', and should not be typed as part of the command. + + To save retyping these commands each session they can be placed in an +individual or system-wide login file. + + To compile a statically linked version of the program, use the +`-static' flag in `gcc', + + $ gcc -static example.o -lgsl -lgslcblas -lm + + ---------- Footnotes ---------- + + (1) `/etc/ld.so.conf' on GNU/Linux systems. + + +File: gsl-ref.info, Node: ANSI C Compliance, Next: Inline functions, Prev: Shared Libraries, Up: Using the library + +2.4 ANSI C Compliance +===================== + +The library is written in ANSI C and is intended to conform to the ANSI +C standard (C89). It should be portable to any system with a working +ANSI C compiler. + + The library does not rely on any non-ANSI extensions in the +interface it exports to the user. Programs you write using GSL can be +ANSI compliant. Extensions which can be used in a way compatible with +pure ANSI C are supported, however, via conditional compilation. This +allows the library to take advantage of compiler extensions on those +platforms which support them. + + When an ANSI C feature is known to be broken on a particular system +the library will exclude any related functions at compile-time. This +should make it impossible to link a program that would use these +functions and give incorrect results. + + To avoid namespace conflicts all exported function names and +variables have the prefix `gsl_', while exported macros have the prefix +`GSL_'. + + +File: gsl-ref.info, Node: Inline functions, Next: Long double, Prev: ANSI C Compliance, Up: Using the library + +2.5 Inline functions +==================== + +The `inline' keyword is not part of the original ANSI C standard (C89) +so the library does not export any inline function definitions by +default. Inline functions were introduced officially in the newer C99 +standard but most C89 compilers have also included `inline' as an +extension for a long time. + + To allow the use of inline functions, the library provides optional +inline versions of performance-critical routines by conditional +compilation in the exported header files. The inline versions of these +functions can be included by defining the macro `HAVE_INLINE' when +compiling an application, + + $ gcc -Wall -c -DHAVE_INLINE example.c + +If you use `autoconf' this macro can be defined automatically. If you +do not define the macro `HAVE_INLINE' then the slower non-inlined +versions of the functions will be used instead. + + By default, the actual form of the inline keyword is `extern +inline', which is a `gcc' extension that eliminates unnecessary +function definitions. If the form `extern inline' causes problems with +other compilers a stricter autoconf test can be used, see *note +Autoconf Macros::. + + When compiling with `gcc' in C99 mode (`gcc -std=c99') the header +files automatically switch to C99-compatible inline function +declarations instead of `extern inline'. With other C99 compilers, +define the macro `GSL_C99_INLINE' to use these declarations. + + +File: gsl-ref.info, Node: Long double, Next: Portability functions, Prev: Inline functions, Up: Using the library + +2.6 Long double +=============== + +In general, the algorithms in the library are written for double +precision only. The `long double' type is not supported for actual +computation. + + One reason for this choice is that the precision of `long double' is +platform dependent. The IEEE standard only specifies the minimum +precision of extended precision numbers, while the precision of +`double' is the same on all platforms. + + However, it is sometimes necessary to interact with external data in +long-double format, so the vector and matrix datatypes include +long-double versions. + + It should be noted that in some system libraries the `stdio.h' +formatted input/output functions `printf' and `scanf' are not +implemented correctly for `long double'. Undefined or incorrect +results are avoided by testing these functions during the `configure' +stage of library compilation and eliminating certain GSL functions +which depend on them if necessary. The corresponding line in the +`configure' output looks like this, + + checking whether printf works with long double... no + +Consequently when `long double' formatted input/output does not work on +a given system it should be impossible to link a program which uses GSL +functions dependent on this. + + If it is necessary to work on a system which does not support +formatted `long double' input/output then the options are to use binary +formats or to convert `long double' results into `double' for reading +and writing. + + +File: gsl-ref.info, Node: Portability functions, Next: Alternative optimized functions, Prev: Long double, Up: Using the library + +2.7 Portability functions +========================= + +To help in writing portable applications GSL provides some +implementations of functions that are found in other libraries, such as +the BSD math library. You can write your application to use the native +versions of these functions, and substitute the GSL versions via a +preprocessor macro if they are unavailable on another platform. + + For example, after determining whether the BSD function `hypot' is +available you can include the following macro definitions in a file +`config.h' with your application, + + /* Substitute gsl_hypot for missing system hypot */ + + #ifndef HAVE_HYPOT + #define hypot gsl_hypot + #endif + +The application source files can then use the include command `#include +' to replace each occurrence of `hypot' by `gsl_hypot' when +`hypot' is not available. This substitution can be made automatically +if you use `autoconf', see *note Autoconf Macros::. + + In most circumstances the best strategy is to use the native +versions of these functions when available, and fall back to GSL +versions otherwise, since this allows your application to take +advantage of any platform-specific optimizations in the system library. +This is the strategy used within GSL itself. + + +File: gsl-ref.info, Node: Alternative optimized functions, Next: Support for different numeric types, Prev: Portability functions, Up: Using the library + +2.8 Alternative optimized functions +=================================== + +The main implementation of some functions in the library will not be +optimal on all architectures. For example, there are several ways to +compute a Gaussian random variate and their relative speeds are +platform-dependent. In cases like this the library provides alternative +implementations of these functions with the same interface. If you +write your application using calls to the standard implementation you +can select an alternative version later via a preprocessor definition. +It is also possible to introduce your own optimized functions this way +while retaining portability. The following lines demonstrate the use of +a platform-dependent choice of methods for sampling from the Gaussian +distribution, + + #ifdef SPARC + #define gsl_ran_gaussian gsl_ran_gaussian_ratio_method + #endif + #ifdef INTEL + #define gsl_ran_gaussian my_gaussian + #endif + +These lines would be placed in the configuration header file `config.h' +of the application, which should then be included by all the source +files. Note that the alternative implementations will not produce +bit-for-bit identical results, and in the case of random number +distributions will produce an entirely different stream of random +variates. + + +File: gsl-ref.info, Node: Support for different numeric types, Next: Compatibility with C++, Prev: Alternative optimized functions, Up: Using the library + +2.9 Support for different numeric types +======================================= + +Many functions in the library are defined for different numeric types. +This feature is implemented by varying the name of the function with a +type-related modifier--a primitive form of C++ templates. The modifier +is inserted into the function name after the initial module prefix. +The following table shows the function names defined for all the +numeric types of an imaginary module `gsl_foo' with function `fn', + + gsl_foo_fn double + gsl_foo_long_double_fn long double + gsl_foo_float_fn float + gsl_foo_long_fn long + gsl_foo_ulong_fn unsigned long + gsl_foo_int_fn int + gsl_foo_uint_fn unsigned int + gsl_foo_short_fn short + gsl_foo_ushort_fn unsigned short + gsl_foo_char_fn char + gsl_foo_uchar_fn unsigned char + +The normal numeric precision `double' is considered the default and +does not require a suffix. For example, the function `gsl_stats_mean' +computes the mean of double precision numbers, while the function +`gsl_stats_int_mean' computes the mean of integers. + + A corresponding scheme is used for library defined types, such as +`gsl_vector' and `gsl_matrix'. In this case the modifier is appended +to the type name. For example, if a module defines a new +type-dependent struct or typedef `gsl_foo' it is modified for other +types in the following way, + + gsl_foo double + gsl_foo_long_double long double + gsl_foo_float float + gsl_foo_long long + gsl_foo_ulong unsigned long + gsl_foo_int int + gsl_foo_uint unsigned int + gsl_foo_short short + gsl_foo_ushort unsigned short + gsl_foo_char char + gsl_foo_uchar unsigned char + +When a module contains type-dependent definitions the library provides +individual header files for each type. The filenames are modified as +shown in the below. For convenience the default header includes the +definitions for all the types. To include only the double precision +header file, or any other specific type, use its individual filename. + + #include All types + #include double + #include long double + #include float + #include long + #include unsigned long + #include int + #include unsigned int + #include short + #include unsigned short + #include char + #include unsigned char + + +File: gsl-ref.info, Node: Compatibility with C++, Next: Aliasing of arrays, Prev: Support for different numeric types, Up: Using the library + +2.10 Compatibility with C++ +=========================== + +The library header files automatically define functions to have `extern +"C"' linkage when included in C++ programs. This allows the functions +to be called directly from C++. + + To use C++ exception handling within user-defined functions passed to +the library as parameters, the library must be built with the +additional `CFLAGS' compilation option `-fexceptions'. + + +File: gsl-ref.info, Node: Aliasing of arrays, Next: Thread-safety, Prev: Compatibility with C++, Up: Using the library + +2.11 Aliasing of arrays +======================= + +The library assumes that arrays, vectors and matrices passed as +modifiable arguments are not aliased and do not overlap with each other. +This removes the need for the library to handle overlapping memory +regions as a special case, and allows additional optimizations to be +used. If overlapping memory regions are passed as modifiable arguments +then the results of such functions will be undefined. If the arguments +will not be modified (for example, if a function prototype declares them +as `const' arguments) then overlapping or aliased memory regions can be +safely used. + + +File: gsl-ref.info, Node: Thread-safety, Next: Deprecated Functions, Prev: Aliasing of arrays, Up: Using the library + +2.12 Thread-safety +================== + +The library can be used in multi-threaded programs. All the functions +are thread-safe, in the sense that they do not use static variables. +Memory is always associated with objects and not with functions. For +functions which use "workspace" objects as temporary storage the +workspaces should be allocated on a per-thread basis. For functions +which use "table" objects as read-only memory the tables can be used by +multiple threads simultaneously. Table arguments are always declared +`const' in function prototypes, to indicate that they may be safely +accessed by different threads. + + There are a small number of static global variables which are used to +control the overall behavior of the library (e.g. whether to use +range-checking, the function to call on fatal error, etc). These +variables are set directly by the user, so they should be initialized +once at program startup and not modified by different threads. + + +File: gsl-ref.info, Node: Deprecated Functions, Next: Code Reuse, Prev: Thread-safety, Up: Using the library + +2.13 Deprecated Functions +========================= + +From time to time, it may be necessary for the definitions of some +functions to be altered or removed from the library. In these +circumstances the functions will first be declared "deprecated" and +then removed from subsequent versions of the library. Functions that +are deprecated can be disabled in the current release by setting the +preprocessor definition `GSL_DISABLE_DEPRECATED'. This allows existing +code to be tested for forwards compatibility. + + +File: gsl-ref.info, Node: Code Reuse, Prev: Deprecated Functions, Up: Using the library + +2.14 Code Reuse +=============== + +Where possible the routines in the library have been written to avoid +dependencies between modules and files. This should make it possible to +extract individual functions for use in your own applications, without +needing to have the whole library installed. You may need to define +certain macros such as `GSL_ERROR' and remove some `#include' +statements in order to compile the files as standalone units. Reuse of +the library code in this way is encouraged, subject to the terms of the +GNU General Public License. + + +File: gsl-ref.info, Node: Error Handling, Next: Mathematical Functions, Prev: Using the library, Up: Top + +3 Error Handling +**************** + +This chapter describes the way that GSL functions report and handle +errors. By examining the status information returned by every function +you can determine whether it succeeded or failed, and if it failed you +can find out what the precise cause of failure was. You can also define +your own error handling functions to modify the default behavior of the +library. + + The functions described in this section are declared in the header +file `gsl_errno.h'. + +* Menu: + +* Error Reporting:: +* Error Codes:: +* Error Handlers:: +* Using GSL error reporting in your own functions:: +* Error Reporting Examples:: + + +File: gsl-ref.info, Node: Error Reporting, Next: Error Codes, Up: Error Handling + +3.1 Error Reporting +=================== + +The library follows the thread-safe error reporting conventions of the +POSIX Threads library. Functions return a non-zero error code to +indicate an error and `0' to indicate success. + + int status = gsl_function (...) + + if (status) { /* an error occurred */ + ..... + /* status value specifies the type of error */ + } + + The routines report an error whenever they cannot perform the task +requested of them. For example, a root-finding function would return a +non-zero error code if could not converge to the requested accuracy, or +exceeded a limit on the number of iterations. Situations like this are +a normal occurrence when using any mathematical library and you should +check the return status of the functions that you call. + + Whenever a routine reports an error the return value specifies the +type of error. The return value is analogous to the value of the +variable `errno' in the C library. The caller can examine the return +code and decide what action to take, including ignoring the error if it +is not considered serious. + + In addition to reporting errors by return codes the library also has +an error handler function `gsl_error'. This function is called by +other library functions when they report an error, just before they +return to the caller. The default behavior of the error handler is to +print a message and abort the program, + + gsl: file.c:67: ERROR: invalid argument supplied by user + Default GSL error handler invoked. + Aborted + + The purpose of the `gsl_error' handler is to provide a function +where a breakpoint can be set that will catch library errors when +running under the debugger. It is not intended for use in production +programs, which should handle any errors using the return codes. + + +File: gsl-ref.info, Node: Error Codes, Next: Error Handlers, Prev: Error Reporting, Up: Error Handling + +3.2 Error Codes +=============== + +The error code numbers returned by library functions are defined in the +file `gsl_errno.h'. They all have the prefix `GSL_' and expand to +non-zero constant integer values. Error codes above 1024 are reserved +for applications, and are not used by the library. Many of the error +codes use the same base name as the corresponding error code in the C +library. Here are some of the most common error codes, + + -- Macro: int GSL_EDOM + Domain error; used by mathematical functions when an argument + value does not fall into the domain over which the function is + defined (like EDOM in the C library) + + -- Macro: int GSL_ERANGE + Range error; used by mathematical functions when the result value + is not representable because of overflow or underflow (like ERANGE + in the C library) + + -- Macro: int GSL_ENOMEM + No memory available. The system cannot allocate more virtual + memory because its capacity is full (like ENOMEM in the C + library). This error is reported when a GSL routine encounters + problems when trying to allocate memory with `malloc'. + + -- Macro: int GSL_EINVAL + Invalid argument. This is used to indicate various kinds of + problems with passing the wrong argument to a library function + (like EINVAL in the C library). + + The error codes can be converted into an error message using the +function `gsl_strerror'. + + -- Function: const char * gsl_strerror (const int GSL_ERRNO) + This function returns a pointer to a string describing the error + code GSL_ERRNO. For example, + + printf ("error: %s\n", gsl_strerror (status)); + + would print an error message like `error: output range error' for a + status value of `GSL_ERANGE'. + + +File: gsl-ref.info, Node: Error Handlers, Next: Using GSL error reporting in your own functions, Prev: Error Codes, Up: Error Handling + +3.3 Error Handlers +================== + +The default behavior of the GSL error handler is to print a short +message and call `abort'. When this default is in use programs will +stop with a core-dump whenever a library routine reports an error. +This is intended as a fail-safe default for programs which do not check +the return status of library routines (we don't encourage you to write +programs this way). + + If you turn off the default error handler it is your responsibility +to check the return values of routines and handle them yourself. You +can also customize the error behavior by providing a new error handler. +For example, an alternative error handler could log all errors to a +file, ignore certain error conditions (such as underflows), or start the +debugger and attach it to the current process when an error occurs. + + All GSL error handlers have the type `gsl_error_handler_t', which is +defined in `gsl_errno.h', + + -- Data Type: gsl_error_handler_t + This is the type of GSL error handler functions. An error handler + will be passed four arguments which specify the reason for the + error (a string), the name of the source file in which it occurred + (also a string), the line number in that file (an integer) and the + error number (an integer). The source file and line number are + set at compile time using the `__FILE__' and `__LINE__' directives + in the preprocessor. An error handler function returns type + `void'. Error handler functions should be defined like this, + + void handler (const char * reason, + const char * file, + int line, + int gsl_errno) + +To request the use of your own error handler you need to call the +function `gsl_set_error_handler' which is also declared in +`gsl_errno.h', + + -- Function: gsl_error_handler_t * gsl_set_error_handler + (gsl_error_handler_t * NEW_HANDLER) + This function sets a new error handler, NEW_HANDLER, for the GSL + library routines. The previous handler is returned (so that you + can restore it later). Note that the pointer to a user defined + error handler function is stored in a static variable, so there + can be only one error handler per program. This function should + be not be used in multi-threaded programs except to set up a + program-wide error handler from a master thread. The following + example shows how to set and restore a new error handler, + + /* save original handler, install new handler */ + old_handler = gsl_set_error_handler (&my_handler); + + /* code uses new handler */ + ..... + + /* restore original handler */ + gsl_set_error_handler (old_handler); + + To use the default behavior (`abort' on error) set the error + handler to `NULL', + + old_handler = gsl_set_error_handler (NULL); + + -- Function: gsl_error_handler_t * gsl_set_error_handler_off () + This function turns off the error handler by defining an error + handler which does nothing. This will cause the program to + continue after any error, so the return values from any library + routines must be checked. This is the recommended behavior for + production programs. The previous handler is returned (so that + you can restore it later). + + The error behavior can be changed for specific applications by +recompiling the library with a customized definition of the `GSL_ERROR' +macro in the file `gsl_errno.h'. + + +File: gsl-ref.info, Node: Using GSL error reporting in your own functions, Next: Error Reporting Examples, Prev: Error Handlers, Up: Error Handling + +3.4 Using GSL error reporting in your own functions +=================================================== + +If you are writing numerical functions in a program which also uses GSL +code you may find it convenient to adopt the same error reporting +conventions as in the library. + + To report an error you need to call the function `gsl_error' with a +string describing the error and then return an appropriate error code +from `gsl_errno.h', or a special value, such as `NaN'. For convenience +the file `gsl_errno.h' defines two macros which carry out these steps: + + -- Macro: GSL_ERROR (REASON, GSL_ERRNO) + This macro reports an error using the GSL conventions and returns a + status value of `gsl_errno'. It expands to the following code + fragment, + + gsl_error (reason, __FILE__, __LINE__, gsl_errno); + return gsl_errno; + + The macro definition in `gsl_errno.h' actually wraps the code in a + `do { ... } while (0)' block to prevent possible parsing problems. + + Here is an example of how the macro could be used to report that a +routine did not achieve a requested tolerance. To report the error the +routine needs to return the error code `GSL_ETOL'. + + if (residual > tolerance) + { + GSL_ERROR("residual exceeds tolerance", GSL_ETOL); + } + + -- Macro: GSL_ERROR_VAL (REASON, GSL_ERRNO, VALUE) + This macro is the same as `GSL_ERROR' but returns a user-defined + value of VALUE instead of an error code. It can be used for + mathematical functions that return a floating point value. + + The following example shows how to return a `NaN' at a mathematical +singularity using the `GSL_ERROR_VAL' macro, + + if (x == 0) + { + GSL_ERROR_VAL("argument lies on singularity", + GSL_ERANGE, GSL_NAN); + } + + +File: gsl-ref.info, Node: Error Reporting Examples, Prev: Using GSL error reporting in your own functions, Up: Error Handling + +3.5 Examples +============ + +Here is an example of some code which checks the return value of a +function where an error might be reported, + + #include + #include + #include + + ... + int status; + size_t n = 37; + + gsl_set_error_handler_off(); + + status = gsl_fft_complex_radix2_forward (data, stride, n); + + if (status) { + if (status == GSL_EINVAL) { + fprintf (stderr, "invalid argument, n=%d\n", n); + } else { + fprintf (stderr, "failed, gsl_errno=%d\n", + status); + } + exit (-1); + } + ... + +The function `gsl_fft_complex_radix2' only accepts integer lengths +which are a power of two. If the variable `n' is not a power of two +then the call to the library function will return `GSL_EINVAL', +indicating that the length argument is invalid. The function call to +`gsl_set_error_handler_off' stops the default error handler from +aborting the program. The `else' clause catches any other possible +errors. + + +File: gsl-ref.info, Node: Mathematical Functions, Next: Complex Numbers, Prev: Error Handling, Up: Top + +4 Mathematical Functions +************************ + +This chapter describes basic mathematical functions. Some of these +functions are present in system libraries, but the alternative versions +given here can be used as a substitute when the system functions are not +available. + + The functions and macros described in this chapter are defined in the +header file `gsl_math.h'. + +* Menu: + +* Mathematical Constants:: +* Infinities and Not-a-number:: +* Elementary Functions:: +* Small integer powers:: +* Testing the Sign of Numbers:: +* Testing for Odd and Even Numbers:: +* Maximum and Minimum functions:: +* Approximate Comparison of Floating Point Numbers:: + + +File: gsl-ref.info, Node: Mathematical Constants, Next: Infinities and Not-a-number, Up: Mathematical Functions + +4.1 Mathematical Constants +========================== + +The library ensures that the standard BSD mathematical constants are +defined. For reference, here is a list of the constants: + +`M_E' + The base of exponentials, e + +`M_LOG2E' + The base-2 logarithm of e, \log_2 (e) + +`M_LOG10E' + The base-10 logarithm of e, \log_10 (e) + +`M_SQRT2' + The square root of two, \sqrt 2 + +`M_SQRT1_2' + The square root of one-half, \sqrt{1/2} + +`M_SQRT3' + The square root of three, \sqrt 3 + +`M_PI' + The constant pi, \pi + +`M_PI_2' + Pi divided by two, \pi/2 + +`M_PI_4' + Pi divided by four, \pi/4 + +`M_SQRTPI' + The square root of pi, \sqrt\pi + +`M_2_SQRTPI' + Two divided by the square root of pi, 2/\sqrt\pi + +`M_1_PI' + The reciprocal of pi, 1/\pi + +`M_2_PI' + Twice the reciprocal of pi, 2/\pi + +`M_LN10' + The natural logarithm of ten, \ln(10) + +`M_LN2' + The natural logarithm of two, \ln(2) + +`M_LNPI' + The natural logarithm of pi, \ln(\pi) + +`M_EULER' + Euler's constant, \gamma + + + +File: gsl-ref.info, Node: Infinities and Not-a-number, Next: Elementary Functions, Prev: Mathematical Constants, Up: Mathematical Functions + +4.2 Infinities and Not-a-number +=============================== + + -- Macro: GSL_POSINF + This macro contains the IEEE representation of positive infinity, + +\infty. It is computed from the expression `+1.0/0.0'. + + -- Macro: GSL_NEGINF + This macro contains the IEEE representation of negative infinity, + -\infty. It is computed from the expression `-1.0/0.0'. + + -- Macro: GSL_NAN + This macro contains the IEEE representation of the Not-a-Number + symbol, `NaN'. It is computed from the ratio `0.0/0.0'. + + -- Function: int gsl_isnan (const double X) + This function returns 1 if X is not-a-number. + + -- Function: int gsl_isinf (const double X) + This function returns +1 if X is positive infinity, -1 if X is + negative infinity and 0 otherwise.(1) + + -- Function: int gsl_finite (const double X) + This function returns 1 if X is a real number, and 0 if it is + infinite or not-a-number. + + ---------- Footnotes ---------- + + (1) Note that the C99 standard only requires the system `isinf' +function to return a non-zero value, without the sign of the infinity. +The implementation in some earlier versions of GSL used the system +`isinf' function and may have this behavior on some platforms. +Therefore, it is advisable to test the sign of X separately, if needed, +rather than relying the sign of the return value from `gsl_isinf()'. + + +File: gsl-ref.info, Node: Elementary Functions, Next: Small integer powers, Prev: Infinities and Not-a-number, Up: Mathematical Functions + +4.3 Elementary Functions +======================== + +The following routines provide portable implementations of functions +found in the BSD math library. When native versions are not available +the functions described here can be used instead. The substitution can +be made automatically if you use `autoconf' to compile your application +(*note Portability functions::). + + -- Function: double gsl_log1p (const double X) + This function computes the value of \log(1+x) in a way that is + accurate for small X. It provides an alternative to the BSD math + function `log1p(x)'. + + -- Function: double gsl_expm1 (const double X) + This function computes the value of \exp(x)-1 in a way that is + accurate for small X. It provides an alternative to the BSD math + function `expm1(x)'. + + -- Function: double gsl_hypot (const double X, const double Y) + This function computes the value of \sqrt{x^2 + y^2} in a way that + avoids overflow. It provides an alternative to the BSD math + function `hypot(x,y)'. + + -- Function: double gsl_hypot3 (const double X, const double Y, const + double Z) + This function computes the value of \sqrt{x^2 + y^2 + z^2} in a + way that avoids overflow. + + -- Function: double gsl_acosh (const double X) + This function computes the value of \arccosh(x). It provides an + alternative to the standard math function `acosh(x)'. + + -- Function: double gsl_asinh (const double X) + This function computes the value of \arcsinh(x). It provides an + alternative to the standard math function `asinh(x)'. + + -- Function: double gsl_atanh (const double X) + This function computes the value of \arctanh(x). It provides an + alternative to the standard math function `atanh(x)'. + + -- Function: double gsl_ldexp (double X, int E) + This function computes the value of x * 2^e. It provides an + alternative to the standard math function `ldexp(x,e)'. + + -- Function: double gsl_frexp (double X, int * E) + This function splits the number x into its normalized fraction f + and exponent e, such that x = f * 2^e and 0.5 <= f < 1. The + function returns f and stores the exponent in e. If x is zero, + both f and e are set to zero. This function provides an + alternative to the standard math function `frexp(x, e)'. + + +File: gsl-ref.info, Node: Small integer powers, Next: Testing the Sign of Numbers, Prev: Elementary Functions, Up: Mathematical Functions + +4.4 Small integer powers +======================== + +A common complaint about the standard C library is its lack of a +function for calculating (small) integer powers. GSL provides some +simple functions to fill this gap. For reasons of efficiency, these +functions do not check for overflow or underflow conditions. + + -- Function: double gsl_pow_int (double X, int N) + -- Function: double gsl_pow_uint (double X, unsigned int N) + These routines computes the power x^n for integer N. The power is + computed efficiently--for example, x^8 is computed as ((x^2)^2)^2, + requiring only 3 multiplications. A version of this function + which also computes the numerical error in the result is available + as `gsl_sf_pow_int_e'. + + -- Function: double gsl_pow_2 (const double X) + -- Function: double gsl_pow_3 (const double X) + -- Function: double gsl_pow_4 (const double X) + -- Function: double gsl_pow_5 (const double X) + -- Function: double gsl_pow_6 (const double X) + -- Function: double gsl_pow_7 (const double X) + -- Function: double gsl_pow_8 (const double X) + -- Function: double gsl_pow_9 (const double X) + These functions can be used to compute small integer powers x^2, + x^3, etc. efficiently. The functions will be inlined when + `HAVE_INLINE' is defined, so that use of these functions should be + as efficient as explicitly writing the corresponding product + expression. + + #include + double y = gsl_pow_4 (3.141) /* compute 3.141**4 */ + + +File: gsl-ref.info, Node: Testing the Sign of Numbers, Next: Testing for Odd and Even Numbers, Prev: Small integer powers, Up: Mathematical Functions + +4.5 Testing the Sign of Numbers +=============================== + + -- Macro: GSL_SIGN (x) + This macro returns the sign of X. It is defined as `((x) >= 0 ? 1 + : -1)'. Note that with this definition the sign of zero is positive + (regardless of its IEEE sign bit). + + +File: gsl-ref.info, Node: Testing for Odd and Even Numbers, Next: Maximum and Minimum functions, Prev: Testing the Sign of Numbers, Up: Mathematical Functions + +4.6 Testing for Odd and Even Numbers +==================================== + + -- Macro: GSL_IS_ODD (n) + This macro evaluates to 1 if N is odd and 0 if N is even. The + argument N must be of integer type. + + -- Macro: GSL_IS_EVEN (n) + This macro is the opposite of `GSL_IS_ODD(n)'. It evaluates to 1 if + N is even and 0 if N is odd. The argument N must be of integer + type. + + +File: gsl-ref.info, Node: Maximum and Minimum functions, Next: Approximate Comparison of Floating Point Numbers, Prev: Testing for Odd and Even Numbers, Up: Mathematical Functions + +4.7 Maximum and Minimum functions +================================= + +Note that the following macros perform multiple evaluations of their +arguments, so they should not be used with arguments that have side +effects (such as a call to a random number generator). + + -- Macro: GSL_MAX (a, b) + This macro returns the maximum of A and B. It is defined as `((a) + > (b) ? (a):(b))'. + + -- Macro: GSL_MIN (a, b) + This macro returns the minimum of A and B. It is defined as `((a) + < (b) ? (a):(b))'. + + -- Function: extern inline double GSL_MAX_DBL (double A, double B) + This function returns the maximum of the double precision numbers + A and B using an inline function. The use of a function allows for + type checking of the arguments as an extra safety feature. On + platforms where inline functions are not available the macro + `GSL_MAX' will be automatically substituted. + + -- Function: extern inline double GSL_MIN_DBL (double A, double B) + This function returns the minimum of the double precision numbers + A and B using an inline function. The use of a function allows for + type checking of the arguments as an extra safety feature. On + platforms where inline functions are not available the macro + `GSL_MIN' will be automatically substituted. + + -- Function: extern inline int GSL_MAX_INT (int A, int B) + -- Function: extern inline int GSL_MIN_INT (int A, int B) + These functions return the maximum or minimum of the integers A + and B using an inline function. On platforms where inline + functions are not available the macros `GSL_MAX' or `GSL_MIN' will + be automatically substituted. + + -- Function: extern inline long double GSL_MAX_LDBL (long double A, + long double B) + -- Function: extern inline long double GSL_MIN_LDBL (long double A, + long double B) + These functions return the maximum or minimum of the long doubles A + and B using an inline function. On platforms where inline + functions are not available the macros `GSL_MAX' or `GSL_MIN' will + be automatically substituted. + + +File: gsl-ref.info, Node: Approximate Comparison of Floating Point Numbers, Prev: Maximum and Minimum functions, Up: Mathematical Functions + +4.8 Approximate Comparison of Floating Point Numbers +==================================================== + +It is sometimes useful to be able to compare two floating point numbers +approximately, to allow for rounding and truncation errors. The +following function implements the approximate floating-point comparison +algorithm proposed by D.E. Knuth in Section 4.2.2 of `Seminumerical +Algorithms' (3rd edition). + + -- Function: int gsl_fcmp (double X, double Y, double EPSILON) + This function determines whether x and y are approximately equal + to a relative accuracy EPSILON. + + The relative accuracy is measured using an interval of size 2 + \delta, where \delta = 2^k \epsilon and k is the maximum base-2 + exponent of x and y as computed by the function `frexp'. + + If x and y lie within this interval, they are considered + approximately equal and the function returns 0. Otherwise if x < + y, the function returns -1, or if x > y, the function returns +1. + + Note that x and y are compared to relative accuracy, so this + function is not suitable for testing whether a value is + approximately zero. + + The implementation is based on the package `fcmp' by T.C. Belding. + + +File: gsl-ref.info, Node: Complex Numbers, Next: Polynomials, Prev: Mathematical Functions, Up: Top + +5 Complex Numbers +***************** + +The functions described in this chapter provide support for complex +numbers. The algorithms take care to avoid unnecessary intermediate +underflows and overflows, allowing the functions to be evaluated over +as much of the complex plane as possible. + + For multiple-valued functions the branch cuts have been chosen to +follow the conventions of Abramowitz and Stegun in the `Handbook of +Mathematical Functions'. The functions return principal values which are +the same as those in GNU Calc, which in turn are the same as those in +`Common Lisp, The Language (Second Edition)'(1) and the HP-28/48 series +of calculators. + + The complex types are defined in the header file `gsl_complex.h', +while the corresponding complex functions and arithmetic operations are +defined in `gsl_complex_math.h'. + +* Menu: + +* Representation of complex numbers:: +* Properties of complex numbers:: +* Complex arithmetic operators:: +* Elementary Complex Functions:: +* Complex Trigonometric Functions:: +* Inverse Complex Trigonometric Functions:: +* Complex Hyperbolic Functions:: +* Inverse Complex Hyperbolic Functions:: +* Complex Number References and Further Reading:: + + ---------- Footnotes ---------- + + (1) Note that the first edition uses different definitions. + + +File: gsl-ref.info, Node: Representation of complex numbers, Next: Properties of complex numbers, Up: Complex Numbers + +5.1 Representation of complex numbers +===================================== + +Complex numbers are represented using the type `gsl_complex'. The +internal representation of this type may vary across platforms and +should not be accessed directly. The functions and macros described +below allow complex numbers to be manipulated in a portable way. + + For reference, the default form of the `gsl_complex' type is given +by the following struct, + + typedef struct + { + double dat[2]; + } gsl_complex; + +The real and imaginary part are stored in contiguous elements of a two +element array. This eliminates any padding between the real and +imaginary parts, `dat[0]' and `dat[1]', allowing the struct to be +mapped correctly onto packed complex arrays. + + -- Function: gsl_complex gsl_complex_rect (double X, double Y) + This function uses the rectangular Cartesian components (X,Y) to + return the complex number z = x + i y. An inline version of this + function is used when `HAVE_INLINE' is defined. + + -- Function: gsl_complex gsl_complex_polar (double R, double THETA) + This function returns the complex number z = r \exp(i \theta) = r + (\cos(\theta) + i \sin(\theta)) from the polar representation + (R,THETA). + + -- Macro: GSL_REAL (Z) + -- Macro: GSL_IMAG (Z) + These macros return the real and imaginary parts of the complex + number Z. + + -- Macro: GSL_SET_COMPLEX (ZP, X, Y) + This macro uses the Cartesian components (X,Y) to set the real and + imaginary parts of the complex number pointed to by ZP. For + example, + + GSL_SET_COMPLEX(&z, 3, 4) + + sets Z to be 3 + 4i. + + -- Macro: GSL_SET_REAL (ZP,X) + -- Macro: GSL_SET_IMAG (ZP,Y) + These macros allow the real and imaginary parts of the complex + number pointed to by ZP to be set independently. + + +File: gsl-ref.info, Node: Properties of complex numbers, Next: Complex arithmetic operators, Prev: Representation of complex numbers, Up: Complex Numbers + +5.2 Properties of complex numbers +================================= + + -- Function: double gsl_complex_arg (gsl_complex Z) + This function returns the argument of the complex number Z, + \arg(z), where -\pi < \arg(z) <= \pi. + + -- Function: double gsl_complex_abs (gsl_complex Z) + This function returns the magnitude of the complex number Z, |z|. + + -- Function: double gsl_complex_abs2 (gsl_complex Z) + This function returns the squared magnitude of the complex number + Z, |z|^2. + + -- Function: double gsl_complex_logabs (gsl_complex Z) + This function returns the natural logarithm of the magnitude of the + complex number Z, \log|z|. It allows an accurate evaluation of + \log|z| when |z| is close to one. The direct evaluation of + `log(gsl_complex_abs(z))' would lead to a loss of precision in + this case. + + +File: gsl-ref.info, Node: Complex arithmetic operators, Next: Elementary Complex Functions, Prev: Properties of complex numbers, Up: Complex Numbers + +5.3 Complex arithmetic operators +================================ + + -- Function: gsl_complex gsl_complex_add (gsl_complex A, gsl_complex B) + This function returns the sum of the complex numbers A and B, + z=a+b. + + -- Function: gsl_complex gsl_complex_sub (gsl_complex A, gsl_complex B) + This function returns the difference of the complex numbers A and + B, z=a-b. + + -- Function: gsl_complex gsl_complex_mul (gsl_complex A, gsl_complex B) + This function returns the product of the complex numbers A and B, + z=ab. + + -- Function: gsl_complex gsl_complex_div (gsl_complex A, gsl_complex B) + This function returns the quotient of the complex numbers A and B, + z=a/b. + + -- Function: gsl_complex gsl_complex_add_real (gsl_complex A, double X) + This function returns the sum of the complex number A and the real + number X, z=a+x. + + -- Function: gsl_complex gsl_complex_sub_real (gsl_complex A, double X) + This function returns the difference of the complex number A and + the real number X, z=a-x. + + -- Function: gsl_complex gsl_complex_mul_real (gsl_complex A, double X) + This function returns the product of the complex number A and the + real number X, z=ax. + + -- Function: gsl_complex gsl_complex_div_real (gsl_complex A, double X) + This function returns the quotient of the complex number A and the + real number X, z=a/x. + + -- Function: gsl_complex gsl_complex_add_imag (gsl_complex A, double Y) + This function returns the sum of the complex number A and the + imaginary number iY, z=a+iy. + + -- Function: gsl_complex gsl_complex_sub_imag (gsl_complex A, double Y) + This function returns the difference of the complex number A and + the imaginary number iY, z=a-iy. + + -- Function: gsl_complex gsl_complex_mul_imag (gsl_complex A, double Y) + This function returns the product of the complex number A and the + imaginary number iY, z=a*(iy). + + -- Function: gsl_complex gsl_complex_div_imag (gsl_complex A, double Y) + This function returns the quotient of the complex number A and the + imaginary number iY, z=a/(iy). + + -- Function: gsl_complex gsl_complex_conjugate (gsl_complex Z) + This function returns the complex conjugate of the complex number + Z, z^* = x - i y. + + -- Function: gsl_complex gsl_complex_inverse (gsl_complex Z) + This function returns the inverse, or reciprocal, of the complex + number Z, 1/z = (x - i y)/(x^2 + y^2). + + -- Function: gsl_complex gsl_complex_negative (gsl_complex Z) + This function returns the negative of the complex number Z, -z = + (-x) + i(-y). + + +File: gsl-ref.info, Node: Elementary Complex Functions, Next: Complex Trigonometric Functions, Prev: Complex arithmetic operators, Up: Complex Numbers + +5.4 Elementary Complex Functions +================================ + + -- Function: gsl_complex gsl_complex_sqrt (gsl_complex Z) + This function returns the square root of the complex number Z, + \sqrt z. The branch cut is the negative real axis. The result + always lies in the right half of the complex plane. + + -- Function: gsl_complex gsl_complex_sqrt_real (double X) + This function returns the complex square root of the real number + X, where X may be negative. + + -- Function: gsl_complex gsl_complex_pow (gsl_complex Z, gsl_complex A) + The function returns the complex number Z raised to the complex + power A, z^a. This is computed as \exp(\log(z)*a) using complex + logarithms and complex exponentials. + + -- Function: gsl_complex gsl_complex_pow_real (gsl_complex Z, double X) + This function returns the complex number Z raised to the real + power X, z^x. + + -- Function: gsl_complex gsl_complex_exp (gsl_complex Z) + This function returns the complex exponential of the complex number + Z, \exp(z). + + -- Function: gsl_complex gsl_complex_log (gsl_complex Z) + This function returns the complex natural logarithm (base e) of + the complex number Z, \log(z). The branch cut is the negative + real axis. + + -- Function: gsl_complex gsl_complex_log10 (gsl_complex Z) + This function returns the complex base-10 logarithm of the complex + number Z, \log_10 (z). + + -- Function: gsl_complex gsl_complex_log_b (gsl_complex Z, gsl_complex + B) + This function returns the complex base-B logarithm of the complex + number Z, \log_b(z). This quantity is computed as the ratio + \log(z)/\log(b). + + +File: gsl-ref.info, Node: Complex Trigonometric Functions, Next: Inverse Complex Trigonometric Functions, Prev: Elementary Complex Functions, Up: Complex Numbers + +5.5 Complex Trigonometric Functions +=================================== + + -- Function: gsl_complex gsl_complex_sin (gsl_complex Z) + This function returns the complex sine of the complex number Z, + \sin(z) = (\exp(iz) - \exp(-iz))/(2i). + + -- Function: gsl_complex gsl_complex_cos (gsl_complex Z) + This function returns the complex cosine of the complex number Z, + \cos(z) = (\exp(iz) + \exp(-iz))/2. + + -- Function: gsl_complex gsl_complex_tan (gsl_complex Z) + This function returns the complex tangent of the complex number Z, + \tan(z) = \sin(z)/\cos(z). + + -- Function: gsl_complex gsl_complex_sec (gsl_complex Z) + This function returns the complex secant of the complex number Z, + \sec(z) = 1/\cos(z). + + -- Function: gsl_complex gsl_complex_csc (gsl_complex Z) + This function returns the complex cosecant of the complex number Z, + \csc(z) = 1/\sin(z). + + -- Function: gsl_complex gsl_complex_cot (gsl_complex Z) + This function returns the complex cotangent of the complex number + Z, \cot(z) = 1/\tan(z). + + +File: gsl-ref.info, Node: Inverse Complex Trigonometric Functions, Next: Complex Hyperbolic Functions, Prev: Complex Trigonometric Functions, Up: Complex Numbers + +5.6 Inverse Complex Trigonometric Functions +=========================================== + + -- Function: gsl_complex gsl_complex_arcsin (gsl_complex Z) + This function returns the complex arcsine of the complex number Z, + \arcsin(z). The branch cuts are on the real axis, less than -1 and + greater than 1. + + -- Function: gsl_complex gsl_complex_arcsin_real (double Z) + This function returns the complex arcsine of the real number Z, + \arcsin(z). For z between -1 and 1, the function returns a real + value in the range [-\pi/2,\pi/2]. For z less than -1 the result + has a real part of -\pi/2 and a positive imaginary part. For z + greater than 1 the result has a real part of \pi/2 and a negative + imaginary part. + + -- Function: gsl_complex gsl_complex_arccos (gsl_complex Z) + This function returns the complex arccosine of the complex number + Z, \arccos(z). The branch cuts are on the real axis, less than -1 + and greater than 1. + + -- Function: gsl_complex gsl_complex_arccos_real (double Z) + This function returns the complex arccosine of the real number Z, + \arccos(z). For z between -1 and 1, the function returns a real + value in the range [0,\pi]. For z less than -1 the result has a + real part of \pi and a negative imaginary part. For z greater + than 1 the result is purely imaginary and positive. + + -- Function: gsl_complex gsl_complex_arctan (gsl_complex Z) + This function returns the complex arctangent of the complex number + Z, \arctan(z). The branch cuts are on the imaginary axis, below -i + and above i. + + -- Function: gsl_complex gsl_complex_arcsec (gsl_complex Z) + This function returns the complex arcsecant of the complex number + Z, \arcsec(z) = \arccos(1/z). + + -- Function: gsl_complex gsl_complex_arcsec_real (double Z) + This function returns the complex arcsecant of the real number Z, + \arcsec(z) = \arccos(1/z). + + -- Function: gsl_complex gsl_complex_arccsc (gsl_complex Z) + This function returns the complex arccosecant of the complex + number Z, \arccsc(z) = \arcsin(1/z). + + -- Function: gsl_complex gsl_complex_arccsc_real (double Z) + This function returns the complex arccosecant of the real number Z, + \arccsc(z) = \arcsin(1/z). + + -- Function: gsl_complex gsl_complex_arccot (gsl_complex Z) + This function returns the complex arccotangent of the complex + number Z, \arccot(z) = \arctan(1/z). + + +File: gsl-ref.info, Node: Complex Hyperbolic Functions, Next: Inverse Complex Hyperbolic Functions, Prev: Inverse Complex Trigonometric Functions, Up: Complex Numbers + +5.7 Complex Hyperbolic Functions +================================ + + -- Function: gsl_complex gsl_complex_sinh (gsl_complex Z) + This function returns the complex hyperbolic sine of the complex + number Z, \sinh(z) = (\exp(z) - \exp(-z))/2. + + -- Function: gsl_complex gsl_complex_cosh (gsl_complex Z) + This function returns the complex hyperbolic cosine of the complex + number Z, \cosh(z) = (\exp(z) + \exp(-z))/2. + + -- Function: gsl_complex gsl_complex_tanh (gsl_complex Z) + This function returns the complex hyperbolic tangent of the + complex number Z, \tanh(z) = \sinh(z)/\cosh(z). + + -- Function: gsl_complex gsl_complex_sech (gsl_complex Z) + This function returns the complex hyperbolic secant of the complex + number Z, \sech(z) = 1/\cosh(z). + + -- Function: gsl_complex gsl_complex_csch (gsl_complex Z) + This function returns the complex hyperbolic cosecant of the + complex number Z, \csch(z) = 1/\sinh(z). + + -- Function: gsl_complex gsl_complex_coth (gsl_complex Z) + This function returns the complex hyperbolic cotangent of the + complex number Z, \coth(z) = 1/\tanh(z). + + +File: gsl-ref.info, Node: Inverse Complex Hyperbolic Functions, Next: Complex Number References and Further Reading, Prev: Complex Hyperbolic Functions, Up: Complex Numbers + +5.8 Inverse Complex Hyperbolic Functions +======================================== + + -- Function: gsl_complex gsl_complex_arcsinh (gsl_complex Z) + This function returns the complex hyperbolic arcsine of the + complex number Z, \arcsinh(z). The branch cuts are on the + imaginary axis, below -i and above i. + + -- Function: gsl_complex gsl_complex_arccosh (gsl_complex Z) + This function returns the complex hyperbolic arccosine of the + complex number Z, \arccosh(z). The branch cut is on the real + axis, less than 1. Note that in this case we use the negative + square root in formula 4.6.21 of Abramowitz & Stegun giving + \arccosh(z)=\log(z-\sqrt{z^2-1}). + + -- Function: gsl_complex gsl_complex_arccosh_real (double Z) + This function returns the complex hyperbolic arccosine of the real + number Z, \arccosh(z). + + -- Function: gsl_complex gsl_complex_arctanh (gsl_complex Z) + This function returns the complex hyperbolic arctangent of the + complex number Z, \arctanh(z). The branch cuts are on the real + axis, less than -1 and greater than 1. + + -- Function: gsl_complex gsl_complex_arctanh_real (double Z) + This function returns the complex hyperbolic arctangent of the real + number Z, \arctanh(z). + + -- Function: gsl_complex gsl_complex_arcsech (gsl_complex Z) + This function returns the complex hyperbolic arcsecant of the + complex number Z, \arcsech(z) = \arccosh(1/z). + + -- Function: gsl_complex gsl_complex_arccsch (gsl_complex Z) + This function returns the complex hyperbolic arccosecant of the + complex number Z, \arccsch(z) = \arcsin(1/z). + + -- Function: gsl_complex gsl_complex_arccoth (gsl_complex Z) + This function returns the complex hyperbolic arccotangent of the + complex number Z, \arccoth(z) = \arctanh(1/z). + + +File: gsl-ref.info, Node: Complex Number References and Further Reading, Prev: Inverse Complex Hyperbolic Functions, Up: Complex Numbers + +5.9 References and Further Reading +================================== + +The implementations of the elementary and trigonometric functions are +based on the following papers, + + T. E. Hull, Thomas F. Fairgrieve, Ping Tak Peter Tang, + "Implementing Complex Elementary Functions Using Exception + Handling", `ACM Transactions on Mathematical Software', Volume 20 + (1994), pp 215-244, Corrigenda, p553 + + T. E. Hull, Thomas F. Fairgrieve, Ping Tak Peter Tang, + "Implementing the complex arcsin and arccosine functions using + exception handling", `ACM Transactions on Mathematical Software', + Volume 23 (1997) pp 299-335 + +The general formulas and details of branch cuts can be found in the +following books, + + Abramowitz and Stegun, `Handbook of Mathematical Functions', + "Circular Functions in Terms of Real and Imaginary Parts", Formulas + 4.3.55-58, "Inverse Circular Functions in Terms of Real and + Imaginary Parts", Formulas 4.4.37-39, "Hyperbolic Functions in + Terms of Real and Imaginary Parts", Formulas 4.5.49-52, "Inverse + Hyperbolic Functions--relation to Inverse Circular Functions", + Formulas 4.6.14-19. + + Dave Gillespie, `Calc Manual', Free Software Foundation, ISBN + 1-882114-18-3 + + +File: gsl-ref.info, Node: Polynomials, Next: Special Functions, Prev: Complex Numbers, Up: Top + +6 Polynomials +************* + +This chapter describes functions for evaluating and solving polynomials. +There are routines for finding real and complex roots of quadratic and +cubic equations using analytic methods. An iterative polynomial solver +is also available for finding the roots of general polynomials with real +coefficients (of any order). The functions are declared in the header +file `gsl_poly.h'. + +* Menu: + +* Polynomial Evaluation:: +* Divided Difference Representation of Polynomials:: +* Quadratic Equations:: +* Cubic Equations:: +* General Polynomial Equations:: +* Roots of Polynomials Examples:: +* Roots of Polynomials References and Further Reading:: + + +File: gsl-ref.info, Node: Polynomial Evaluation, Next: Divided Difference Representation of Polynomials, Up: Polynomials + +6.1 Polynomial Evaluation +========================= + +The functions described here evaluate the polynomial P(x) = c[0] + c[1] +x + c[2] x^2 + \dots + c[len-1] x^{len-1} using Horner's method for +stability. Inline versions of these functions are used when +`HAVE_INLINE' is defined. + + -- Function: double gsl_poly_eval (const double C[], const int LEN, + const double X) + This function evaluates a polynomial with real coefficients for + the real variable X. + + -- Function: gsl_complex gsl_poly_complex_eval (const double C[], + const int LEN, const gsl_complex Z) + This function evaluates a polynomial with real coefficients for + the complex variable Z. + + -- Function: gsl_complex gsl_complex_poly_complex_eval (const + gsl_complex C[], const int LEN, const gsl_complex Z) + This function evaluates a polynomial with complex coefficients for + the complex variable Z. + + -- Function: int gsl_poly_eval_derivs (const double C[], const size_t + LENC, const double X, double RES[], const size_t LENRES) + This function evaluates a polynomial and its derivatives storing + the results in the array RES of size LENRES. The output array + contains the values of d^k P/d x^k for the specified value of X + starting with k = 0. + + +File: gsl-ref.info, Node: Divided Difference Representation of Polynomials, Next: Quadratic Equations, Prev: Polynomial Evaluation, Up: Polynomials + +6.2 Divided Difference Representation of Polynomials +==================================================== + +The functions described here manipulate polynomials stored in Newton's +divided-difference representation. The use of divided-differences is +described in Abramowitz & Stegun sections 25.1.4 and 25.2.26. + + -- Function: int gsl_poly_dd_init (double DD[], const double XA[], + const double YA[], size_t SIZE) + This function computes a divided-difference representation of the + interpolating polynomial for the points (XA, YA) stored in the + arrays XA and YA of length SIZE. On output the + divided-differences of (XA,YA) are stored in the array DD, also of + length SIZE. + + -- Function: double gsl_poly_dd_eval (const double DD[], const double + XA[], const size_t SIZE, const double X) + This function evaluates the polynomial stored in + divided-difference form in the arrays DD and XA of length SIZE at + the point X. An inline version of this function is used when + `HAVE_INLINE' is defined. + + -- Function: int gsl_poly_dd_taylor (double C[], double XP, const + double DD[], const double XA[], size_t SIZE, double W[]) + This function converts the divided-difference representation of a + polynomial to a Taylor expansion. The divided-difference + representation is supplied in the arrays DD and XA of length SIZE. + On output the Taylor coefficients of the polynomial expanded about + the point XP are stored in the array C also of length SIZE. A + workspace of length SIZE must be provided in the array W. + + +File: gsl-ref.info, Node: Quadratic Equations, Next: Cubic Equations, Prev: Divided Difference Representation of Polynomials, Up: Polynomials + +6.3 Quadratic Equations +======================= + + -- Function: int gsl_poly_solve_quadratic (double A, double B, double + C, double * X0, double * X1) + This function finds the real roots of the quadratic equation, + + a x^2 + b x + c = 0 + + The number of real roots (either zero, one or two) is returned, and + their locations are stored in X0 and X1. If no real roots are + found then X0 and X1 are not modified. If one real root is found + (i.e. if a=0) then it is stored in X0. When two real roots are + found they are stored in X0 and X1 in ascending order. The case + of coincident roots is not considered special. For example + (x-1)^2=0 will have two roots, which happen to have exactly equal + values. + + The number of roots found depends on the sign of the discriminant + b^2 - 4 a c. This will be subject to rounding and cancellation + errors when computed in double precision, and will also be subject + to errors if the coefficients of the polynomial are inexact. + These errors may cause a discrete change in the number of roots. + However, for polynomials with small integer coefficients the + discriminant can always be computed exactly. + + + -- Function: int gsl_poly_complex_solve_quadratic (double A, double B, + double C, gsl_complex * Z0, gsl_complex * Z1) + This function finds the complex roots of the quadratic equation, + + a z^2 + b z + c = 0 + + The number of complex roots is returned (either one or two) and the + locations of the roots are stored in Z0 and Z1. The roots are + returned in ascending order, sorted first by their real components + and then by their imaginary components. If only one real root is + found (i.e. if a=0) then it is stored in Z0. + + + +File: gsl-ref.info, Node: Cubic Equations, Next: General Polynomial Equations, Prev: Quadratic Equations, Up: Polynomials + +6.4 Cubic Equations +=================== + + -- Function: int gsl_poly_solve_cubic (double A, double B, double C, + double * X0, double * X1, double * X2) + This function finds the real roots of the cubic equation, + + x^3 + a x^2 + b x + c = 0 + + with a leading coefficient of unity. The number of real roots + (either one or three) is returned, and their locations are stored + in X0, X1 and X2. If one real root is found then only X0 is + modified. When three real roots are found they are stored in X0, + X1 and X2 in ascending order. The case of coincident roots is not + considered special. For example, the equation (x-1)^3=0 will have + three roots with exactly equal values. As in the quadratic case, + finite precision may cause equal or closely-spaced real roots to + move off the real axis into the complex plane, leading to a + discrete change in the number of real roots. + + -- Function: int gsl_poly_complex_solve_cubic (double A, double B, + double C, gsl_complex * Z0, gsl_complex * Z1, gsl_complex * + Z2) + This function finds the complex roots of the cubic equation, + + z^3 + a z^2 + b z + c = 0 + + The number of complex roots is returned (always three) and the + locations of the roots are stored in Z0, Z1 and Z2. The roots are + returned in ascending order, sorted first by their real components + and then by their imaginary components. + + + +File: gsl-ref.info, Node: General Polynomial Equations, Next: Roots of Polynomials Examples, Prev: Cubic Equations, Up: Polynomials + +6.5 General Polynomial Equations +================================ + +The roots of polynomial equations cannot be found analytically beyond +the special cases of the quadratic, cubic and quartic equation. The +algorithm described in this section uses an iterative method to find the +approximate locations of roots of higher order polynomials. + + -- Function: gsl_poly_complex_workspace * +gsl_poly_complex_workspace_alloc (size_t N) + This function allocates space for a `gsl_poly_complex_workspace' + struct and a workspace suitable for solving a polynomial with N + coefficients using the routine `gsl_poly_complex_solve'. + + The function returns a pointer to the newly allocated + `gsl_poly_complex_workspace' if no errors were detected, and a null + pointer in the case of error. + + -- Function: void gsl_poly_complex_workspace_free + (gsl_poly_complex_workspace * W) + This function frees all the memory associated with the workspace W. + + -- Function: int gsl_poly_complex_solve (const double * A, size_t N, + gsl_poly_complex_workspace * W, gsl_complex_packed_ptr Z) + This function computes the roots of the general polynomial P(x) = + a_0 + a_1 x + a_2 x^2 + ... + a_{n-1} x^{n-1} using balanced-QR + reduction of the companion matrix. The parameter N specifies the + length of the coefficient array. The coefficient of the highest + order term must be non-zero. The function requires a workspace W + of the appropriate size. The n-1 roots are returned in the packed + complex array Z of length 2(n-1), alternating real and imaginary + parts. + + The function returns `GSL_SUCCESS' if all the roots are found. If + the QR reduction does not converge, the error handler is invoked + with an error code of `GSL_EFAILED'. Note that due to finite + precision, roots of higher multiplicity are returned as a cluster + of simple roots with reduced accuracy. The solution of + polynomials with higher-order roots requires specialized + algorithms that take the multiplicity structure into account (see + e.g. Z. Zeng, Algorithm 835, ACM Transactions on Mathematical + Software, Volume 30, Issue 2 (2004), pp 218-236). + + +File: gsl-ref.info, Node: Roots of Polynomials Examples, Next: Roots of Polynomials References and Further Reading, Prev: General Polynomial Equations, Up: Polynomials + +6.6 Examples +============ + +To demonstrate the use of the general polynomial solver we will take the +polynomial P(x) = x^5 - 1 which has the following roots, + + 1, e^{2\pi i /5}, e^{4\pi i /5}, e^{6\pi i /5}, e^{8\pi i /5} + +The following program will find these roots. + + #include + #include + + int + main (void) + { + int i; + /* coefficients of P(x) = -1 + x^5 */ + double a[6] = { -1, 0, 0, 0, 0, 1 }; + double z[10]; + + gsl_poly_complex_workspace * w + = gsl_poly_complex_workspace_alloc (6); + + gsl_poly_complex_solve (a, 6, w, z); + + gsl_poly_complex_workspace_free (w); + + for (i = 0; i < 5; i++) + { + printf ("z%d = %+.18f %+.18f\n", + i, z[2*i], z[2*i+1]); + } + + return 0; + } + +The output of the program is, + + $ ./a.out + z0 = -0.809016994374947451 +0.587785252292473137 + z1 = -0.809016994374947451 -0.587785252292473137 + z2 = +0.309016994374947451 +0.951056516295153642 + z3 = +0.309016994374947451 -0.951056516295153642 + z4 = +1.000000000000000000 +0.000000000000000000 + +which agrees with the analytic result, z_n = \exp(2 \pi n i/5). + + +File: gsl-ref.info, Node: Roots of Polynomials References and Further Reading, Prev: Roots of Polynomials Examples, Up: Polynomials + +6.7 References and Further Reading +================================== + +The balanced-QR method and its error analysis are described in the +following papers, + + R.S. Martin, G. Peters and J.H. Wilkinson, "The QR Algorithm for + Real Hessenberg Matrices", `Numerische Mathematik', 14 (1970), + 219-231. + + B.N. Parlett and C. Reinsch, "Balancing a Matrix for Calculation of + Eigenvalues and Eigenvectors", `Numerische Mathematik', 13 (1969), + 293-304. + + A. Edelman and H. Murakami, "Polynomial roots from companion matrix + eigenvalues", `Mathematics of Computation', Vol. 64, No. 210 + (1995), 763-776. + +The formulas for divided differences are given in Abramowitz and Stegun, + + Abramowitz and Stegun, `Handbook of Mathematical Functions', + Sections 25.1.4 and 25.2.26. + + +File: gsl-ref.info, Node: Special Functions, Next: Vectors and Matrices, Prev: Polynomials, Up: Top + +7 Special Functions +******************* + +This chapter describes the GSL special function library. The library +includes routines for calculating the values of Airy functions, Bessel +functions, Clausen functions, Coulomb wave functions, Coupling +coefficients, the Dawson function, Debye functions, Dilogarithms, +Elliptic integrals, Jacobi elliptic functions, Error functions, +Exponential integrals, Fermi-Dirac functions, Gamma functions, +Gegenbauer functions, Hypergeometric functions, Laguerre functions, +Legendre functions and Spherical Harmonics, the Psi (Digamma) Function, +Synchrotron functions, Transport functions, Trigonometric functions and +Zeta functions. Each routine also computes an estimate of the numerical +error in the calculated value of the function. + + The functions in this chapter are declared in individual header +files, such as `gsl_sf_airy.h', `gsl_sf_bessel.h', etc. The complete +set of header files can be included using the file `gsl_sf.h'. + +* Menu: + +* Special Function Usage:: +* The gsl_sf_result struct:: +* Special Function Modes:: +* Airy Functions and Derivatives:: +* Bessel Functions:: +* Clausen Functions:: +* Coulomb Functions:: +* Coupling Coefficients:: +* Dawson Function:: +* Debye Functions:: +* Dilogarithm:: +* Elementary Operations:: +* Elliptic Integrals:: +* Elliptic Functions (Jacobi):: +* Error Functions:: +* Exponential Functions:: +* Exponential Integrals:: +* Fermi-Dirac Function:: +* Gamma and Beta Functions:: +* Gegenbauer Functions:: +* Hypergeometric Functions:: +* Laguerre Functions:: +* Lambert W Functions:: +* Legendre Functions and Spherical Harmonics:: +* Logarithm and Related Functions:: +* Mathieu Functions:: +* Power Function:: +* Psi (Digamma) Function:: +* Synchrotron Functions:: +* Transport Functions:: +* Trigonometric Functions:: +* Zeta Functions:: +* Special Functions Examples:: +* Special Functions References and Further Reading:: + + +File: gsl-ref.info, Node: Special Function Usage, Next: The gsl_sf_result struct, Up: Special Functions + +7.1 Usage +========= + +The special functions are available in two calling conventions, a +"natural form" which returns the numerical value of the function and an +"error-handling form" which returns an error code. The two types of +function provide alternative ways of accessing the same underlying code. + + The "natural form" returns only the value of the function and can be +used directly in mathematical expressions. For example, the following +function call will compute the value of the Bessel function J_0(x), + + double y = gsl_sf_bessel_J0 (x); + +There is no way to access an error code or to estimate the error using +this method. To allow access to this information the alternative +error-handling form stores the value and error in a modifiable argument, + + gsl_sf_result result; + int status = gsl_sf_bessel_J0_e (x, &result); + +The error-handling functions have the suffix `_e'. The returned status +value indicates error conditions such as overflow, underflow or loss of +precision. If there are no errors the error-handling functions return +`GSL_SUCCESS'. + + +File: gsl-ref.info, Node: The gsl_sf_result struct, Next: Special Function Modes, Prev: Special Function Usage, Up: Special Functions + +7.2 The gsl_sf_result struct +============================ + +The error handling form of the special functions always calculate an +error estimate along with the value of the result. Therefore, +structures are provided for amalgamating a value and error estimate. +These structures are declared in the header file `gsl_sf_result.h'. + + The `gsl_sf_result' struct contains value and error fields. + + typedef struct + { + double val; + double err; + } gsl_sf_result; + +The field VAL contains the value and the field ERR contains an estimate +of the absolute error in the value. + + In some cases, an overflow or underflow can be detected and handled +by a function. In this case, it may be possible to return a scaling +exponent as well as an error/value pair in order to save the result from +exceeding the dynamic range of the built-in types. The +`gsl_sf_result_e10' struct contains value and error fields as well as +an exponent field such that the actual result is obtained as `result * +10^(e10)'. + + typedef struct + { + double val; + double err; + int e10; + } gsl_sf_result_e10; + + +File: gsl-ref.info, Node: Special Function Modes, Next: Airy Functions and Derivatives, Prev: The gsl_sf_result struct, Up: Special Functions + +7.3 Modes +========= + +The goal of the library is to achieve double precision accuracy wherever +possible. However the cost of evaluating some special functions to +double precision can be significant, particularly where very high order +terms are required. In these cases a `mode' argument allows the +accuracy of the function to be reduced in order to improve performance. +The following precision levels are available for the mode argument, + +`GSL_PREC_DOUBLE' + Double-precision, a relative accuracy of approximately 2 * 10^-16. + +`GSL_PREC_SINGLE' + Single-precision, a relative accuracy of approximately 10^-7. + +`GSL_PREC_APPROX' + Approximate values, a relative accuracy of approximately 5 * 10^-4. + +The approximate mode provides the fastest evaluation at the lowest +accuracy. + + +File: gsl-ref.info, Node: Airy Functions and Derivatives, Next: Bessel Functions, Prev: Special Function Modes, Up: Special Functions + +7.4 Airy Functions and Derivatives +================================== + +The Airy functions Ai(x) and Bi(x) are defined by the integral +representations, + + Ai(x) = (1/\pi) \int_0^\infty \cos((1/3) t^3 + xt) dt + Bi(x) = (1/\pi) \int_0^\infty (e^(-(1/3) t^3 + xt) + \sin((1/3) t^3 + xt)) dt + +For further information see Abramowitz & Stegun, Section 10.4. The Airy +functions are defined in the header file `gsl_sf_airy.h'. + +* Menu: + +* Airy Functions:: +* Derivatives of Airy Functions:: +* Zeros of Airy Functions:: +* Zeros of Derivatives of Airy Functions:: + + +File: gsl-ref.info, Node: Airy Functions, Next: Derivatives of Airy Functions, Up: Airy Functions and Derivatives + +7.4.1 Airy Functions +-------------------- + + -- Function: double gsl_sf_airy_Ai (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Ai_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the Airy function Ai(x) with an accuracy + specified by MODE. + + -- Function: double gsl_sf_airy_Bi (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Bi_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the Airy function Bi(x) with an accuracy + specified by MODE. + + -- Function: double gsl_sf_airy_Ai_scaled (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Ai_scaled_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute a scaled version of the Airy function + S_A(x) Ai(x). For x>0 the scaling factor S_A(x) is \exp(+(2/3) + x^(3/2)), and is 1 for x<0. + + -- Function: double gsl_sf_airy_Bi_scaled (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Bi_scaled_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute a scaled version of the Airy function + S_B(x) Bi(x). For x>0 the scaling factor S_B(x) is exp(-(2/3) + x^(3/2)), and is 1 for x<0. + + +File: gsl-ref.info, Node: Derivatives of Airy Functions, Next: Zeros of Airy Functions, Prev: Airy Functions, Up: Airy Functions and Derivatives + +7.4.2 Derivatives of Airy Functions +----------------------------------- + + -- Function: double gsl_sf_airy_Ai_deriv (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Ai_deriv_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the Airy function derivative Ai'(x) with an + accuracy specified by MODE. + + -- Function: double gsl_sf_airy_Bi_deriv (double X, gsl_mode_t MODE) + -- Function: int gsl_sf_airy_Bi_deriv_e (double X, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the Airy function derivative Bi'(x) with an + accuracy specified by MODE. + + -- Function: double gsl_sf_airy_Ai_deriv_scaled (double X, gsl_mode_t + MODE) + -- Function: int gsl_sf_airy_Ai_deriv_scaled_e (double X, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the scaled Airy function derivative S_A(x) + Ai'(x). For x>0 the scaling factor S_A(x) is \exp(+(2/3) + x^(3/2)), and is 1 for x<0. + + -- Function: double gsl_sf_airy_Bi_deriv_scaled (double X, gsl_mode_t + MODE) + -- Function: int gsl_sf_airy_Bi_deriv_scaled_e (double X, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the scaled Airy function derivative S_B(x) + Bi'(x). For x>0 the scaling factor S_B(x) is exp(-(2/3) x^(3/2)), + and is 1 for x<0. + + +File: gsl-ref.info, Node: Zeros of Airy Functions, Next: Zeros of Derivatives of Airy Functions, Prev: Derivatives of Airy Functions, Up: Airy Functions and Derivatives + +7.4.3 Zeros of Airy Functions +----------------------------- + + -- Function: double gsl_sf_airy_zero_Ai (unsigned int S) + -- Function: int gsl_sf_airy_zero_Ai_e (unsigned int S, gsl_sf_result + * RESULT) + These routines compute the location of the S-th zero of the Airy + function Ai(x). + + -- Function: double gsl_sf_airy_zero_Bi (unsigned int S) + -- Function: int gsl_sf_airy_zero_Bi_e (unsigned int S, gsl_sf_result + * RESULT) + These routines compute the location of the S-th zero of the Airy + function Bi(x). + + +File: gsl-ref.info, Node: Zeros of Derivatives of Airy Functions, Prev: Zeros of Airy Functions, Up: Airy Functions and Derivatives + +7.4.4 Zeros of Derivatives of Airy Functions +-------------------------------------------- + + -- Function: double gsl_sf_airy_zero_Ai_deriv (unsigned int S) + -- Function: int gsl_sf_airy_zero_Ai_deriv_e (unsigned int S, + gsl_sf_result * RESULT) + These routines compute the location of the S-th zero of the Airy + function derivative Ai'(x). + + -- Function: double gsl_sf_airy_zero_Bi_deriv (unsigned int S) + -- Function: int gsl_sf_airy_zero_Bi_deriv_e (unsigned int S, + gsl_sf_result * RESULT) + These routines compute the location of the S-th zero of the Airy + function derivative Bi'(x). + + +File: gsl-ref.info, Node: Bessel Functions, Next: Clausen Functions, Prev: Airy Functions and Derivatives, Up: Special Functions + +7.5 Bessel Functions +==================== + +The routines described in this section compute the Cylindrical Bessel +functions J_n(x), Y_n(x), Modified cylindrical Bessel functions I_n(x), +K_n(x), Spherical Bessel functions j_l(x), y_l(x), and Modified +Spherical Bessel functions i_l(x), k_l(x). For more information see +Abramowitz & Stegun, Chapters 9 and 10. The Bessel functions are +defined in the header file `gsl_sf_bessel.h'. + +* Menu: + +* Regular Cylindrical Bessel Functions:: +* Irregular Cylindrical Bessel Functions:: +* Regular Modified Cylindrical Bessel Functions:: +* Irregular Modified Cylindrical Bessel Functions:: +* Regular Spherical Bessel Functions:: +* Irregular Spherical Bessel Functions:: +* Regular Modified Spherical Bessel Functions:: +* Irregular Modified Spherical Bessel Functions:: +* Regular Bessel Function - Fractional Order:: +* Irregular Bessel Functions - Fractional Order:: +* Regular Modified Bessel Functions - Fractional Order:: +* Irregular Modified Bessel Functions - Fractional Order:: +* Zeros of Regular Bessel Functions:: + + +File: gsl-ref.info, Node: Regular Cylindrical Bessel Functions, Next: Irregular Cylindrical Bessel Functions, Up: Bessel Functions + +7.5.1 Regular Cylindrical Bessel Functions +------------------------------------------ + + -- Function: double gsl_sf_bessel_J0 (double X) + -- Function: int gsl_sf_bessel_J0_e (double X, gsl_sf_result * RESULT) + These routines compute the regular cylindrical Bessel function of + zeroth order, J_0(x). + + -- Function: double gsl_sf_bessel_J1 (double X) + -- Function: int gsl_sf_bessel_J1_e (double X, gsl_sf_result * RESULT) + These routines compute the regular cylindrical Bessel function of + first order, J_1(x). + + -- Function: double gsl_sf_bessel_Jn (int N, double X) + -- Function: int gsl_sf_bessel_Jn_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the regular cylindrical Bessel function of + order N, J_n(x). + + -- Function: int gsl_sf_bessel_Jn_array (int NMIN, int NMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the regular cylindrical Bessel + functions J_n(x) for n from NMIN to NMAX inclusive, storing the + results in the array RESULT_ARRAY. The values are computed using + recurrence relations for efficiency, and therefore may differ + slightly from the exact values. + + +File: gsl-ref.info, Node: Irregular Cylindrical Bessel Functions, Next: Regular Modified Cylindrical Bessel Functions, Prev: Regular Cylindrical Bessel Functions, Up: Bessel Functions + +7.5.2 Irregular Cylindrical Bessel Functions +-------------------------------------------- + + -- Function: double gsl_sf_bessel_Y0 (double X) + -- Function: int gsl_sf_bessel_Y0_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular cylindrical Bessel function + of zeroth order, Y_0(x), for x>0. + + -- Function: double gsl_sf_bessel_Y1 (double X) + -- Function: int gsl_sf_bessel_Y1_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular cylindrical Bessel function + of first order, Y_1(x), for x>0. + + -- Function: double gsl_sf_bessel_Yn (int N, double X) + -- Function: int gsl_sf_bessel_Yn_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the irregular cylindrical Bessel function of + order N, Y_n(x), for x>0. + + -- Function: int gsl_sf_bessel_Yn_array (int NMIN, int NMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the irregular cylindrical + Bessel functions Y_n(x) for n from NMIN to NMAX inclusive, storing + the results in the array RESULT_ARRAY. The domain of the function + is x>0. The values are computed using recurrence relations for + efficiency, and therefore may differ slightly from the exact + values. + + +File: gsl-ref.info, Node: Regular Modified Cylindrical Bessel Functions, Next: Irregular Modified Cylindrical Bessel Functions, Prev: Irregular Cylindrical Bessel Functions, Up: Bessel Functions + +7.5.3 Regular Modified Cylindrical Bessel Functions +--------------------------------------------------- + + -- Function: double gsl_sf_bessel_I0 (double X) + -- Function: int gsl_sf_bessel_I0_e (double X, gsl_sf_result * RESULT) + These routines compute the regular modified cylindrical Bessel + function of zeroth order, I_0(x). + + -- Function: double gsl_sf_bessel_I1 (double X) + -- Function: int gsl_sf_bessel_I1_e (double X, gsl_sf_result * RESULT) + These routines compute the regular modified cylindrical Bessel + function of first order, I_1(x). + + -- Function: double gsl_sf_bessel_In (int N, double X) + -- Function: int gsl_sf_bessel_In_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the regular modified cylindrical Bessel + function of order N, I_n(x). + + -- Function: int gsl_sf_bessel_In_array (int NMIN, int NMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the regular modified + cylindrical Bessel functions I_n(x) for n from NMIN to NMAX + inclusive, storing the results in the array RESULT_ARRAY. The + start of the range NMIN must be positive or zero. The values are + computed using recurrence relations for efficiency, and therefore + may differ slightly from the exact values. + + -- Function: double gsl_sf_bessel_I0_scaled (double X) + -- Function: int gsl_sf_bessel_I0_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled regular modified cylindrical + Bessel function of zeroth order \exp(-|x|) I_0(x). + + -- Function: double gsl_sf_bessel_I1_scaled (double X) + -- Function: int gsl_sf_bessel_I1_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled regular modified cylindrical + Bessel function of first order \exp(-|x|) I_1(x). + + -- Function: double gsl_sf_bessel_In_scaled (int N, double X) + -- Function: int gsl_sf_bessel_In_scaled_e (int N, double X, + gsl_sf_result * RESULT) + These routines compute the scaled regular modified cylindrical + Bessel function of order N, \exp(-|x|) I_n(x) + + -- Function: int gsl_sf_bessel_In_scaled_array (int NMIN, int NMAX, + double X, double RESULT_ARRAY[]) + This routine computes the values of the scaled regular cylindrical + Bessel functions \exp(-|x|) I_n(x) for n from NMIN to NMAX + inclusive, storing the results in the array RESULT_ARRAY. The + start of the range NMIN must be positive or zero. The values are + computed using recurrence relations for efficiency, and therefore + may differ slightly from the exact values. + + +File: gsl-ref.info, Node: Irregular Modified Cylindrical Bessel Functions, Next: Regular Spherical Bessel Functions, Prev: Regular Modified Cylindrical Bessel Functions, Up: Bessel Functions + +7.5.4 Irregular Modified Cylindrical Bessel Functions +----------------------------------------------------- + + -- Function: double gsl_sf_bessel_K0 (double X) + -- Function: int gsl_sf_bessel_K0_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular modified cylindrical Bessel + function of zeroth order, K_0(x), for x > 0. + + -- Function: double gsl_sf_bessel_K1 (double X) + -- Function: int gsl_sf_bessel_K1_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular modified cylindrical Bessel + function of first order, K_1(x), for x > 0. + + -- Function: double gsl_sf_bessel_Kn (int N, double X) + -- Function: int gsl_sf_bessel_Kn_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the irregular modified cylindrical Bessel + function of order N, K_n(x), for x > 0. + + -- Function: int gsl_sf_bessel_Kn_array (int NMIN, int NMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the irregular modified + cylindrical Bessel functions K_n(x) for n from NMIN to NMAX + inclusive, storing the results in the array RESULT_ARRAY. The + start of the range NMIN must be positive or zero. The domain of + the function is x>0. The values are computed using recurrence + relations for efficiency, and therefore may differ slightly from + the exact values. + + -- Function: double gsl_sf_bessel_K0_scaled (double X) + -- Function: int gsl_sf_bessel_K0_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled irregular modified cylindrical + Bessel function of zeroth order \exp(x) K_0(x) for x>0. + + -- Function: double gsl_sf_bessel_K1_scaled (double X) + -- Function: int gsl_sf_bessel_K1_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled irregular modified cylindrical + Bessel function of first order \exp(x) K_1(x) for x>0. + + -- Function: double gsl_sf_bessel_Kn_scaled (int N, double X) + -- Function: int gsl_sf_bessel_Kn_scaled_e (int N, double X, + gsl_sf_result * RESULT) + These routines compute the scaled irregular modified cylindrical + Bessel function of order N, \exp(x) K_n(x), for x>0. + + -- Function: int gsl_sf_bessel_Kn_scaled_array (int NMIN, int NMAX, + double X, double RESULT_ARRAY[]) + This routine computes the values of the scaled irregular + cylindrical Bessel functions \exp(x) K_n(x) for n from NMIN to + NMAX inclusive, storing the results in the array RESULT_ARRAY. The + start of the range NMIN must be positive or zero. The domain of + the function is x>0. The values are computed using recurrence + relations for efficiency, and therefore may differ slightly from + the exact values. + + +File: gsl-ref.info, Node: Regular Spherical Bessel Functions, Next: Irregular Spherical Bessel Functions, Prev: Irregular Modified Cylindrical Bessel Functions, Up: Bessel Functions + +7.5.5 Regular Spherical Bessel Functions +---------------------------------------- + + -- Function: double gsl_sf_bessel_j0 (double X) + -- Function: int gsl_sf_bessel_j0_e (double X, gsl_sf_result * RESULT) + These routines compute the regular spherical Bessel function of + zeroth order, j_0(x) = \sin(x)/x. + + -- Function: double gsl_sf_bessel_j1 (double X) + -- Function: int gsl_sf_bessel_j1_e (double X, gsl_sf_result * RESULT) + These routines compute the regular spherical Bessel function of + first order, j_1(x) = (\sin(x)/x - \cos(x))/x. + + -- Function: double gsl_sf_bessel_j2 (double X) + -- Function: int gsl_sf_bessel_j2_e (double X, gsl_sf_result * RESULT) + These routines compute the regular spherical Bessel function of + second order, j_2(x) = ((3/x^2 - 1)\sin(x) - 3\cos(x)/x)/x. + + -- Function: double gsl_sf_bessel_jl (int L, double X) + -- Function: int gsl_sf_bessel_jl_e (int L, double X, gsl_sf_result * + RESULT) + These routines compute the regular spherical Bessel function of + order L, j_l(x), for l >= 0 and x >= 0. + + -- Function: int gsl_sf_bessel_jl_array (int LMAX, double X, double + RESULT_ARRAY[]) + This routine computes the values of the regular spherical Bessel + functions j_l(x) for l from 0 to LMAX inclusive for lmax >= 0 and + x >= 0, storing the results in the array RESULT_ARRAY. The values + are computed using recurrence relations for efficiency, and + therefore may differ slightly from the exact values. + + -- Function: int gsl_sf_bessel_jl_steed_array (int LMAX, double X, + double * RESULT_ARRAY) + This routine uses Steed's method to compute the values of the + regular spherical Bessel functions j_l(x) for l from 0 to LMAX + inclusive for lmax >= 0 and x >= 0, storing the results in the + array RESULT_ARRAY. The Steed/Barnett algorithm is described in + `Comp. Phys. Comm.' 21, 297 (1981). Steed's method is more stable + than the recurrence used in the other functions but is also slower. + + +File: gsl-ref.info, Node: Irregular Spherical Bessel Functions, Next: Regular Modified Spherical Bessel Functions, Prev: Regular Spherical Bessel Functions, Up: Bessel Functions + +7.5.6 Irregular Spherical Bessel Functions +------------------------------------------ + + -- Function: double gsl_sf_bessel_y0 (double X) + -- Function: int gsl_sf_bessel_y0_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular spherical Bessel function of + zeroth order, y_0(x) = -\cos(x)/x. + + -- Function: double gsl_sf_bessel_y1 (double X) + -- Function: int gsl_sf_bessel_y1_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular spherical Bessel function of + first order, y_1(x) = -(\cos(x)/x + \sin(x))/x. + + -- Function: double gsl_sf_bessel_y2 (double X) + -- Function: int gsl_sf_bessel_y2_e (double X, gsl_sf_result * RESULT) + These routines compute the irregular spherical Bessel function of + second order, y_2(x) = (-3/x^3 + 1/x)\cos(x) - (3/x^2)\sin(x). + + -- Function: double gsl_sf_bessel_yl (int L, double X) + -- Function: int gsl_sf_bessel_yl_e (int L, double X, gsl_sf_result * + RESULT) + These routines compute the irregular spherical Bessel function of + order L, y_l(x), for l >= 0. + + -- Function: int gsl_sf_bessel_yl_array (int LMAX, double X, double + RESULT_ARRAY[]) + This routine computes the values of the irregular spherical Bessel + functions y_l(x) for l from 0 to LMAX inclusive for lmax >= 0, + storing the results in the array RESULT_ARRAY. The values are + computed using recurrence relations for efficiency, and therefore + may differ slightly from the exact values. + + +File: gsl-ref.info, Node: Regular Modified Spherical Bessel Functions, Next: Irregular Modified Spherical Bessel Functions, Prev: Irregular Spherical Bessel Functions, Up: Bessel Functions + +7.5.7 Regular Modified Spherical Bessel Functions +------------------------------------------------- + +The regular modified spherical Bessel functions i_l(x) are related to +the modified Bessel functions of fractional order, i_l(x) = +\sqrt{\pi/(2x)} I_{l+1/2}(x) + + -- Function: double gsl_sf_bessel_i0_scaled (double X) + -- Function: int gsl_sf_bessel_i0_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled regular modified spherical Bessel + function of zeroth order, \exp(-|x|) i_0(x). + + -- Function: double gsl_sf_bessel_i1_scaled (double X) + -- Function: int gsl_sf_bessel_i1_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled regular modified spherical Bessel + function of first order, \exp(-|x|) i_1(x). + + -- Function: double gsl_sf_bessel_i2_scaled (double X) + -- Function: int gsl_sf_bessel_i2_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled regular modified spherical Bessel + function of second order, \exp(-|x|) i_2(x) + + -- Function: double gsl_sf_bessel_il_scaled (int L, double X) + -- Function: int gsl_sf_bessel_il_scaled_e (int L, double X, + gsl_sf_result * RESULT) + These routines compute the scaled regular modified spherical Bessel + function of order L, \exp(-|x|) i_l(x) + + -- Function: int gsl_sf_bessel_il_scaled_array (int LMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the scaled regular modified + cylindrical Bessel functions \exp(-|x|) i_l(x) for l from 0 to + LMAX inclusive for lmax >= 0, storing the results in the array + RESULT_ARRAY. The values are computed using recurrence relations + for efficiency, and therefore may differ slightly from the exact + values. + + +File: gsl-ref.info, Node: Irregular Modified Spherical Bessel Functions, Next: Regular Bessel Function - Fractional Order, Prev: Regular Modified Spherical Bessel Functions, Up: Bessel Functions + +7.5.8 Irregular Modified Spherical Bessel Functions +--------------------------------------------------- + +The irregular modified spherical Bessel functions k_l(x) are related to +the irregular modified Bessel functions of fractional order, k_l(x) = +\sqrt{\pi/(2x)} K_{l+1/2}(x). + + -- Function: double gsl_sf_bessel_k0_scaled (double X) + -- Function: int gsl_sf_bessel_k0_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled irregular modified spherical + Bessel function of zeroth order, \exp(x) k_0(x), for x>0. + + -- Function: double gsl_sf_bessel_k1_scaled (double X) + -- Function: int gsl_sf_bessel_k1_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled irregular modified spherical + Bessel function of first order, \exp(x) k_1(x), for x>0. + + -- Function: double gsl_sf_bessel_k2_scaled (double X) + -- Function: int gsl_sf_bessel_k2_scaled_e (double X, gsl_sf_result * + RESULT) + These routines compute the scaled irregular modified spherical + Bessel function of second order, \exp(x) k_2(x), for x>0. + + -- Function: double gsl_sf_bessel_kl_scaled (int L, double X) + -- Function: int gsl_sf_bessel_kl_scaled_e (int L, double X, + gsl_sf_result * RESULT) + These routines compute the scaled irregular modified spherical + Bessel function of order L, \exp(x) k_l(x), for x>0. + + -- Function: int gsl_sf_bessel_kl_scaled_array (int LMAX, double X, + double RESULT_ARRAY[]) + This routine computes the values of the scaled irregular modified + spherical Bessel functions \exp(x) k_l(x) for l from 0 to LMAX + inclusive for lmax >= 0 and x>0, storing the results in the array + RESULT_ARRAY. The values are computed using recurrence relations + for efficiency, and therefore may differ slightly from the exact + values. + + +File: gsl-ref.info, Node: Regular Bessel Function - Fractional Order, Next: Irregular Bessel Functions - Fractional Order, Prev: Irregular Modified Spherical Bessel Functions, Up: Bessel Functions + +7.5.9 Regular Bessel Function--Fractional Order +----------------------------------------------- + + -- Function: double gsl_sf_bessel_Jnu (double NU, double X) + -- Function: int gsl_sf_bessel_Jnu_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the regular cylindrical Bessel function of + fractional order \nu, J_\nu(x). + + -- Function: int gsl_sf_bessel_sequence_Jnu_e (double NU, gsl_mode_t + MODE, size_t SIZE, double V[]) + This function computes the regular cylindrical Bessel function of + fractional order \nu, J_\nu(x), evaluated at a series of x values. + The array V of length SIZE contains the x values. They are + assumed to be strictly ordered and positive. The array is + over-written with the values of J_\nu(x_i). + + +File: gsl-ref.info, Node: Irregular Bessel Functions - Fractional Order, Next: Regular Modified Bessel Functions - Fractional Order, Prev: Regular Bessel Function - Fractional Order, Up: Bessel Functions + +7.5.10 Irregular Bessel Functions--Fractional Order +--------------------------------------------------- + + -- Function: double gsl_sf_bessel_Ynu (double NU, double X) + -- Function: int gsl_sf_bessel_Ynu_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the irregular cylindrical Bessel function of + fractional order \nu, Y_\nu(x). + + +File: gsl-ref.info, Node: Regular Modified Bessel Functions - Fractional Order, Next: Irregular Modified Bessel Functions - Fractional Order, Prev: Irregular Bessel Functions - Fractional Order, Up: Bessel Functions + +7.5.11 Regular Modified Bessel Functions--Fractional Order +---------------------------------------------------------- + + -- Function: double gsl_sf_bessel_Inu (double NU, double X) + -- Function: int gsl_sf_bessel_Inu_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the regular modified Bessel function of + fractional order \nu, I_\nu(x) for x>0, \nu>0. + + -- Function: double gsl_sf_bessel_Inu_scaled (double NU, double X) + -- Function: int gsl_sf_bessel_Inu_scaled_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the scaled regular modified Bessel function + of fractional order \nu, \exp(-|x|)I_\nu(x) for x>0, \nu>0. + + +File: gsl-ref.info, Node: Irregular Modified Bessel Functions - Fractional Order, Next: Zeros of Regular Bessel Functions, Prev: Regular Modified Bessel Functions - Fractional Order, Up: Bessel Functions + +7.5.12 Irregular Modified Bessel Functions--Fractional Order +------------------------------------------------------------ + + -- Function: double gsl_sf_bessel_Knu (double NU, double X) + -- Function: int gsl_sf_bessel_Knu_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the irregular modified Bessel function of + fractional order \nu, K_\nu(x) for x>0, \nu>0. + + -- Function: double gsl_sf_bessel_lnKnu (double NU, double X) + -- Function: int gsl_sf_bessel_lnKnu_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the logarithm of the irregular modified + Bessel function of fractional order \nu, \ln(K_\nu(x)) for x>0, + \nu>0. + + -- Function: double gsl_sf_bessel_Knu_scaled (double NU, double X) + -- Function: int gsl_sf_bessel_Knu_scaled_e (double NU, double X, + gsl_sf_result * RESULT) + These routines compute the scaled irregular modified Bessel + function of fractional order \nu, \exp(+|x|) K_\nu(x) for x>0, + \nu>0. + + +File: gsl-ref.info, Node: Zeros of Regular Bessel Functions, Prev: Irregular Modified Bessel Functions - Fractional Order, Up: Bessel Functions + +7.5.13 Zeros of Regular Bessel Functions +---------------------------------------- + + -- Function: double gsl_sf_bessel_zero_J0 (unsigned int S) + -- Function: int gsl_sf_bessel_zero_J0_e (unsigned int S, + gsl_sf_result * RESULT) + These routines compute the location of the S-th positive zero of + the Bessel function J_0(x). + + -- Function: double gsl_sf_bessel_zero_J1 (unsigned int S) + -- Function: int gsl_sf_bessel_zero_J1_e (unsigned int S, + gsl_sf_result * RESULT) + These routines compute the location of the S-th positive zero of + the Bessel function J_1(x). + + -- Function: double gsl_sf_bessel_zero_Jnu (double NU, unsigned int S) + -- Function: int gsl_sf_bessel_zero_Jnu_e (double NU, unsigned int S, + gsl_sf_result * RESULT) + These routines compute the location of the S-th positive zero of + the Bessel function J_\nu(x). The current implementation does not + support negative values of NU. + + +File: gsl-ref.info, Node: Clausen Functions, Next: Coulomb Functions, Prev: Bessel Functions, Up: Special Functions + +7.6 Clausen Functions +===================== + +The Clausen function is defined by the following integral, + + Cl_2(x) = - \int_0^x dt \log(2 \sin(t/2)) + +It is related to the dilogarithm by Cl_2(\theta) = \Im +Li_2(\exp(i\theta)). The Clausen functions are declared in the header +file `gsl_sf_clausen.h'. + + -- Function: double gsl_sf_clausen (double X) + -- Function: int gsl_sf_clausen_e (double X, gsl_sf_result * RESULT) + These routines compute the Clausen integral Cl_2(x). + + +File: gsl-ref.info, Node: Coulomb Functions, Next: Coupling Coefficients, Prev: Clausen Functions, Up: Special Functions + +7.7 Coulomb Functions +===================== + +The prototypes of the Coulomb functions are declared in the header file +`gsl_sf_coulomb.h'. Both bound state and scattering solutions are +available. + +* Menu: + +* Normalized Hydrogenic Bound States:: +* Coulomb Wave Functions:: +* Coulomb Wave Function Normalization Constant:: + + +File: gsl-ref.info, Node: Normalized Hydrogenic Bound States, Next: Coulomb Wave Functions, Up: Coulomb Functions + +7.7.1 Normalized Hydrogenic Bound States +---------------------------------------- + + -- Function: double gsl_sf_hydrogenicR_1 (double Z, double R) + -- Function: int gsl_sf_hydrogenicR_1_e (double Z, double R, + gsl_sf_result * RESULT) + These routines compute the lowest-order normalized hydrogenic bound + state radial wavefunction R_1 := 2Z \sqrt{Z} \exp(-Z r). + + -- Function: double gsl_sf_hydrogenicR (int N, int L, double Z, double + R) + -- Function: int gsl_sf_hydrogenicR_e (int N, int L, double Z, double + R, gsl_sf_result * RESULT) + These routines compute the N-th normalized hydrogenic bound state + radial wavefunction, + + R_n := 2 (Z^{3/2}/n^2) \sqrt{(n-l-1)!/(n+l)!} \exp(-Z r/n) (2Zr/n)^l + L^{2l+1}_{n-l-1}(2Zr/n). + + where L^a_b(x) is the generalized Laguerre polynomial (*note + Laguerre Functions::). The normalization is chosen such that the + wavefunction \psi is given by \psi(n,l,r) = R_n Y_{lm}. + + +File: gsl-ref.info, Node: Coulomb Wave Functions, Next: Coulomb Wave Function Normalization Constant, Prev: Normalized Hydrogenic Bound States, Up: Coulomb Functions + +7.7.2 Coulomb Wave Functions +---------------------------- + +The Coulomb wave functions F_L(\eta,x), G_L(\eta,x) are described in +Abramowitz & Stegun, Chapter 14. Because there can be a large dynamic +range of values for these functions, overflows are handled gracefully. +If an overflow occurs, `GSL_EOVRFLW' is signalled and exponent(s) are +returned through the modifiable parameters EXP_F, EXP_G. The full +solution can be reconstructed from the following relations, + + F_L(eta,x) = fc[k_L] * exp(exp_F) + G_L(eta,x) = gc[k_L] * exp(exp_G) + + F_L'(eta,x) = fcp[k_L] * exp(exp_F) + G_L'(eta,x) = gcp[k_L] * exp(exp_G) + + + -- Function: int gsl_sf_coulomb_wave_FG_e (double ETA, double X, + double L_F, int K, gsl_sf_result * F, gsl_sf_result * FP, + gsl_sf_result * G, gsl_sf_result * GP, double * EXP_F, double + * EXP_G) + This function computes the Coulomb wave functions F_L(\eta,x), + G_{L-k}(\eta,x) and their derivatives F'_L(\eta,x), + G'_{L-k}(\eta,x) with respect to x. The parameters are restricted + to L, L-k > -1/2, x > 0 and integer k. Note that L itself is not + restricted to being an integer. The results are stored in the + parameters F, G for the function values and FP, GP for the + derivative values. If an overflow occurs, `GSL_EOVRFLW' is + returned and scaling exponents are stored in the modifiable + parameters EXP_F, EXP_G. + + -- Function: int gsl_sf_coulomb_wave_F_array (double L_MIN, int KMAX, + double ETA, double X, double FC_ARRAY[], double * F_EXPONENT) + This function computes the Coulomb wave function F_L(\eta,x) for L + = Lmin \dots Lmin + kmax, storing the results in FC_ARRAY. In the + case of overflow the exponent is stored in F_EXPONENT. + + -- Function: int gsl_sf_coulomb_wave_FG_array (double L_MIN, int KMAX, + double ETA, double X, double FC_ARRAY[], double GC_ARRAY[], + double * F_EXPONENT, double * G_EXPONENT) + This function computes the functions F_L(\eta,x), G_L(\eta,x) for + L = Lmin \dots Lmin + kmax storing the results in FC_ARRAY and + GC_ARRAY. In the case of overflow the exponents are stored in + F_EXPONENT and G_EXPONENT. + + -- Function: int gsl_sf_coulomb_wave_FGp_array (double L_MIN, int + KMAX, double ETA, double X, double FC_ARRAY[], double + FCP_ARRAY[], double GC_ARRAY[], double GCP_ARRAY[], double * + F_EXPONENT, double * G_EXPONENT) + This function computes the functions F_L(\eta,x), G_L(\eta,x) and + their derivatives F'_L(\eta,x), G'_L(\eta,x) for L = Lmin \dots + Lmin + kmax storing the results in FC_ARRAY, GC_ARRAY, FCP_ARRAY + and GCP_ARRAY. In the case of overflow the exponents are stored + in F_EXPONENT and G_EXPONENT. + + -- Function: int gsl_sf_coulomb_wave_sphF_array (double L_MIN, int + KMAX, double ETA, double X, double FC_ARRAY[], double + F_EXPONENT[]) + This function computes the Coulomb wave function divided by the + argument F_L(\eta, x)/x for L = Lmin \dots Lmin + kmax, storing the + results in FC_ARRAY. In the case of overflow the exponent is + stored in F_EXPONENT. This function reduces to spherical Bessel + functions in the limit \eta \to 0. + + +File: gsl-ref.info, Node: Coulomb Wave Function Normalization Constant, Prev: Coulomb Wave Functions, Up: Coulomb Functions + +7.7.3 Coulomb Wave Function Normalization Constant +-------------------------------------------------- + +The Coulomb wave function normalization constant is defined in +Abramowitz 14.1.7. + + -- Function: int gsl_sf_coulomb_CL_e (double L, double ETA, + gsl_sf_result * RESULT) + This function computes the Coulomb wave function normalization + constant C_L(\eta) for L > -1. + + -- Function: int gsl_sf_coulomb_CL_array (double LMIN, int KMAX, + double ETA, double CL[]) + This function computes the Coulomb wave function normalization + constant C_L(\eta) for L = Lmin \dots Lmin + kmax, Lmin > -1. + + +File: gsl-ref.info, Node: Coupling Coefficients, Next: Dawson Function, Prev: Coulomb Functions, Up: Special Functions + +7.8 Coupling Coefficients +========================= + +The Wigner 3-j, 6-j and 9-j symbols give the coupling coefficients for +combined angular momentum vectors. Since the arguments of the standard +coupling coefficient functions are integer or half-integer, the +arguments of the following functions are, by convention, integers equal +to twice the actual spin value. For information on the 3-j coefficients +see Abramowitz & Stegun, Section 27.9. The functions described in this +section are declared in the header file `gsl_sf_coupling.h'. + +* Menu: + +* 3-j Symbols:: +* 6-j Symbols:: +* 9-j Symbols:: + + +File: gsl-ref.info, Node: 3-j Symbols, Next: 6-j Symbols, Up: Coupling Coefficients + +7.8.1 3-j Symbols +----------------- + + -- Function: double gsl_sf_coupling_3j (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_MA, int TWO_MB, int TWO_MC) + -- Function: int gsl_sf_coupling_3j_e (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_MA, int TWO_MB, int TWO_MC, gsl_sf_result * + RESULT) + These routines compute the Wigner 3-j coefficient, + + (ja jb jc + ma mb mc) + + where the arguments are given in half-integer units, ja = + TWO_JA/2, ma = TWO_MA/2, etc. + + +File: gsl-ref.info, Node: 6-j Symbols, Next: 9-j Symbols, Prev: 3-j Symbols, Up: Coupling Coefficients + +7.8.2 6-j Symbols +----------------- + + -- Function: double gsl_sf_coupling_6j (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_JD, int TWO_JE, int TWO_JF) + -- Function: int gsl_sf_coupling_6j_e (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_JD, int TWO_JE, int TWO_JF, gsl_sf_result * + RESULT) + These routines compute the Wigner 6-j coefficient, + + {ja jb jc + jd je jf} + + where the arguments are given in half-integer units, ja = + TWO_JA/2, ma = TWO_MA/2, etc. + + +File: gsl-ref.info, Node: 9-j Symbols, Prev: 6-j Symbols, Up: Coupling Coefficients + +7.8.3 9-j Symbols +----------------- + + -- Function: double gsl_sf_coupling_9j (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_JD, int TWO_JE, int TWO_JF, int TWO_JG, int + TWO_JH, int TWO_JI) + -- Function: int gsl_sf_coupling_9j_e (int TWO_JA, int TWO_JB, int + TWO_JC, int TWO_JD, int TWO_JE, int TWO_JF, int TWO_JG, int + TWO_JH, int TWO_JI, gsl_sf_result * RESULT) + These routines compute the Wigner 9-j coefficient, + + {ja jb jc + jd je jf + jg jh ji} + + where the arguments are given in half-integer units, ja = + TWO_JA/2, ma = TWO_MA/2, etc. + + +File: gsl-ref.info, Node: Dawson Function, Next: Debye Functions, Prev: Coupling Coefficients, Up: Special Functions + +7.9 Dawson Function +=================== + +The Dawson integral is defined by \exp(-x^2) \int_0^x dt \exp(t^2). A +table of Dawson's integral can be found in Abramowitz & Stegun, Table +7.5. The Dawson functions are declared in the header file +`gsl_sf_dawson.h'. + + -- Function: double gsl_sf_dawson (double X) + -- Function: int gsl_sf_dawson_e (double X, gsl_sf_result * RESULT) + These routines compute the value of Dawson's integral for X. + + +File: gsl-ref.info, Node: Debye Functions, Next: Dilogarithm, Prev: Dawson Function, Up: Special Functions + +7.10 Debye Functions +==================== + +The Debye functions D_n(x) are defined by the following integral, + + D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)) + +For further information see Abramowitz & Stegun, Section 27.1. The +Debye functions are declared in the header file `gsl_sf_debye.h'. + + -- Function: double gsl_sf_debye_1 (double X) + -- Function: int gsl_sf_debye_1_e (double X, gsl_sf_result * RESULT) + These routines compute the first-order Debye function D_1(x) = + (1/x) \int_0^x dt (t/(e^t - 1)). + + -- Function: double gsl_sf_debye_2 (double X) + -- Function: int gsl_sf_debye_2_e (double X, gsl_sf_result * RESULT) + These routines compute the second-order Debye function D_2(x) = + (2/x^2) \int_0^x dt (t^2/(e^t - 1)). + + -- Function: double gsl_sf_debye_3 (double X) + -- Function: int gsl_sf_debye_3_e (double X, gsl_sf_result * RESULT) + These routines compute the third-order Debye function D_3(x) = + (3/x^3) \int_0^x dt (t^3/(e^t - 1)). + + -- Function: double gsl_sf_debye_4 (double X) + -- Function: int gsl_sf_debye_4_e (double X, gsl_sf_result * RESULT) + These routines compute the fourth-order Debye function D_4(x) = + (4/x^4) \int_0^x dt (t^4/(e^t - 1)). + + -- Function: double gsl_sf_debye_5 (double X) + -- Function: int gsl_sf_debye_5_e (double X, gsl_sf_result * RESULT) + These routines compute the fifth-order Debye function D_5(x) = + (5/x^5) \int_0^x dt (t^5/(e^t - 1)). + + -- Function: double gsl_sf_debye_6 (double X) + -- Function: int gsl_sf_debye_6_e (double X, gsl_sf_result * RESULT) + These routines compute the sixth-order Debye function D_6(x) = + (6/x^6) \int_0^x dt (t^6/(e^t - 1)). + + +File: gsl-ref.info, Node: Dilogarithm, Next: Elementary Operations, Prev: Debye Functions, Up: Special Functions + +7.11 Dilogarithm +================ + +The functions described in this section are declared in the header file +`gsl_sf_dilog.h'. + +* Menu: + +* Real Argument:: +* Complex Argument:: + + +File: gsl-ref.info, Node: Real Argument, Next: Complex Argument, Up: Dilogarithm + +7.11.1 Real Argument +-------------------- + + -- Function: double gsl_sf_dilog (double X) + -- Function: int gsl_sf_dilog_e (double X, gsl_sf_result * RESULT) + These routines compute the dilogarithm for a real argument. In + Lewin's notation this is Li_2(x), the real part of the dilogarithm + of a real x. It is defined by the integral representation Li_2(x) + = - \Re \int_0^x ds \log(1-s) / s. Note that \Im(Li_2(x)) = 0 for + x <= 1, and -\pi\log(x) for x > 1. + + Note that Abramowitz & Stegun refer to the Spence integral + S(x)=Li_2(1-x) as the dilogarithm rather than Li_2(x). + + +File: gsl-ref.info, Node: Complex Argument, Prev: Real Argument, Up: Dilogarithm + +7.11.2 Complex Argument +----------------------- + + -- Function: int gsl_sf_complex_dilog_e (double R, double THETA, + gsl_sf_result * RESULT_RE, gsl_sf_result * RESULT_IM) + This function computes the full complex-valued dilogarithm for the + complex argument z = r \exp(i \theta). The real and imaginary + parts of the result are returned in RESULT_RE, RESULT_IM. + + +File: gsl-ref.info, Node: Elementary Operations, Next: Elliptic Integrals, Prev: Dilogarithm, Up: Special Functions + +7.12 Elementary Operations +========================== + +The following functions allow for the propagation of errors when +combining quantities by multiplication. The functions are declared in +the header file `gsl_sf_elementary.h'. + + -- Function: int gsl_sf_multiply_e (double X, double Y, gsl_sf_result + * RESULT) + This function multiplies X and Y storing the product and its + associated error in RESULT. + + -- Function: int gsl_sf_multiply_err_e (double X, double DX, double Y, + double DY, gsl_sf_result * RESULT) + This function multiplies X and Y with associated absolute errors + DX and DY. The product xy +/- xy \sqrt((dx/x)^2 +(dy/y)^2) is + stored in RESULT. + + +File: gsl-ref.info, Node: Elliptic Integrals, Next: Elliptic Functions (Jacobi), Prev: Elementary Operations, Up: Special Functions + +7.13 Elliptic Integrals +======================= + +The functions described in this section are declared in the header file +`gsl_sf_ellint.h'. Further information about the elliptic integrals +can be found in Abramowitz & Stegun, Chapter 17. + +* Menu: + +* Definition of Legendre Forms:: +* Definition of Carlson Forms:: +* Legendre Form of Complete Elliptic Integrals:: +* Legendre Form of Incomplete Elliptic Integrals:: +* Carlson Forms:: + + +File: gsl-ref.info, Node: Definition of Legendre Forms, Next: Definition of Carlson Forms, Up: Elliptic Integrals + +7.13.1 Definition of Legendre Forms +----------------------------------- + +The Legendre forms of elliptic integrals F(\phi,k), E(\phi,k) and +\Pi(\phi,k,n) are defined by, + + F(\phi,k) = \int_0^\phi dt 1/\sqrt((1 - k^2 \sin^2(t))) + + E(\phi,k) = \int_0^\phi dt \sqrt((1 - k^2 \sin^2(t))) + + Pi(\phi,k,n) = \int_0^\phi dt 1/((1 + n \sin^2(t))\sqrt(1 - k^2 \sin^2(t))) + +The complete Legendre forms are denoted by K(k) = F(\pi/2, k) and E(k) += E(\pi/2, k). + + The notation used here is based on Carlson, `Numerische Mathematik' +33 (1979) 1 and differs slightly from that used by Abramowitz & Stegun, +where the functions are given in terms of the parameter m = k^2 and n +is replaced by -n. + + +File: gsl-ref.info, Node: Definition of Carlson Forms, Next: Legendre Form of Complete Elliptic Integrals, Prev: Definition of Legendre Forms, Up: Elliptic Integrals + +7.13.2 Definition of Carlson Forms +---------------------------------- + +The Carlson symmetric forms of elliptical integrals RC(x,y), RD(x,y,z), +RF(x,y,z) and RJ(x,y,z,p) are defined by, + + RC(x,y) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1) + + RD(x,y,z) = 3/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-3/2) + + RF(x,y,z) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) + + RJ(x,y,z,p) = 3/2 \int_0^\infty dt + (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) (t+p)^(-1) + + +File: gsl-ref.info, Node: Legendre Form of Complete Elliptic Integrals, Next: Legendre Form of Incomplete Elliptic Integrals, Prev: Definition of Carlson Forms, Up: Elliptic Integrals + +7.13.3 Legendre Form of Complete Elliptic Integrals +--------------------------------------------------- + + -- Function: double gsl_sf_ellint_Kcomp (double K, gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_Kcomp_e (double K, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the complete elliptic integral K(k) to the + accuracy specified by the mode variable MODE. Note that + Abramowitz & Stegun define this function in terms of the parameter + m = k^2. + + -- Function: double gsl_sf_ellint_Ecomp (double K, gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_Ecomp_e (double K, gsl_mode_t MODE, + gsl_sf_result * RESULT) + These routines compute the complete elliptic integral E(k) to the + accuracy specified by the mode variable MODE. Note that + Abramowitz & Stegun define this function in terms of the parameter + m = k^2. + + -- Function: double gsl_sf_ellint_Pcomp (double K, double N, + gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_Pcomp_e (double K, double N, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the complete elliptic integral \Pi(k,n) to + the accuracy specified by the mode variable MODE. Note that + Abramowitz & Stegun define this function in terms of the + parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of + sign n \to -n. + + +File: gsl-ref.info, Node: Legendre Form of Incomplete Elliptic Integrals, Next: Carlson Forms, Prev: Legendre Form of Complete Elliptic Integrals, Up: Elliptic Integrals + +7.13.4 Legendre Form of Incomplete Elliptic Integrals +----------------------------------------------------- + + -- Function: double gsl_sf_ellint_F (double PHI, double K, gsl_mode_t + MODE) + -- Function: int gsl_sf_ellint_F_e (double PHI, double K, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral F(\phi,k) + to the accuracy specified by the mode variable MODE. Note that + Abramowitz & Stegun define this function in terms of the parameter + m = k^2. + + -- Function: double gsl_sf_ellint_E (double PHI, double K, gsl_mode_t + MODE) + -- Function: int gsl_sf_ellint_E_e (double PHI, double K, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral E(\phi,k) + to the accuracy specified by the mode variable MODE. Note that + Abramowitz & Stegun define this function in terms of the parameter + m = k^2. + + -- Function: double gsl_sf_ellint_P (double PHI, double K, double N, + gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_P_e (double PHI, double K, double N, + gsl_mode_t MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral + \Pi(\phi,k,n) to the accuracy specified by the mode variable MODE. + Note that Abramowitz & Stegun define this function in terms of the + parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of + sign n \to -n. + + -- Function: double gsl_sf_ellint_D (double PHI, double K, double N, + gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_D_e (double PHI, double K, double N, + gsl_mode_t MODE, gsl_sf_result * RESULT) + These functions compute the incomplete elliptic integral D(\phi,k) + which is defined through the Carlson form RD(x,y,z) by the + following relation, + + D(\phi,k,n) = (1/3)(\sin(\phi))^3 RD (1-\sin^2(\phi), 1-k^2 \sin^2(\phi), 1). + The argument N is not used and will be removed in a future release. + + + +File: gsl-ref.info, Node: Carlson Forms, Prev: Legendre Form of Incomplete Elliptic Integrals, Up: Elliptic Integrals + +7.13.5 Carlson Forms +-------------------- + + -- Function: double gsl_sf_ellint_RC (double X, double Y, gsl_mode_t + MODE) + -- Function: int gsl_sf_ellint_RC_e (double X, double Y, gsl_mode_t + MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral RC(x,y) to + the accuracy specified by the mode variable MODE. + + -- Function: double gsl_sf_ellint_RD (double X, double Y, double Z, + gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_RD_e (double X, double Y, double Z, + gsl_mode_t MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral RD(x,y,z) + to the accuracy specified by the mode variable MODE. + + -- Function: double gsl_sf_ellint_RF (double X, double Y, double Z, + gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_RF_e (double X, double Y, double Z, + gsl_mode_t MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral RF(x,y,z) + to the accuracy specified by the mode variable MODE. + + -- Function: double gsl_sf_ellint_RJ (double X, double Y, double Z, + double P, gsl_mode_t MODE) + -- Function: int gsl_sf_ellint_RJ_e (double X, double Y, double Z, + double P, gsl_mode_t MODE, gsl_sf_result * RESULT) + These routines compute the incomplete elliptic integral RJ(x,y,z,p) + to the accuracy specified by the mode variable MODE. + + +File: gsl-ref.info, Node: Elliptic Functions (Jacobi), Next: Error Functions, Prev: Elliptic Integrals, Up: Special Functions + +7.14 Elliptic Functions (Jacobi) +================================ + +The Jacobian Elliptic functions are defined in Abramowitz & Stegun, +Chapter 16. The functions are declared in the header file +`gsl_sf_elljac.h'. + + -- Function: int gsl_sf_elljac_e (double U, double M, double * SN, + double * CN, double * DN) + This function computes the Jacobian elliptic functions sn(u|m), + cn(u|m), dn(u|m) by descending Landen transformations. + + +File: gsl-ref.info, Node: Error Functions, Next: Exponential Functions, Prev: Elliptic Functions (Jacobi), Up: Special Functions + +7.15 Error Functions +==================== + +The error function is described in Abramowitz & Stegun, Chapter 7. The +functions in this section are declared in the header file +`gsl_sf_erf.h'. + +* Menu: + +* Error Function:: +* Complementary Error Function:: +* Log Complementary Error Function:: +* Probability functions:: + + +File: gsl-ref.info, Node: Error Function, Next: Complementary Error Function, Up: Error Functions + +7.15.1 Error Function +--------------------- + + -- Function: double gsl_sf_erf (double X) + -- Function: int gsl_sf_erf_e (double X, gsl_sf_result * RESULT) + These routines compute the error function erf(x), where erf(x) = + (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2). + + +File: gsl-ref.info, Node: Complementary Error Function, Next: Log Complementary Error Function, Prev: Error Function, Up: Error Functions + +7.15.2 Complementary Error Function +----------------------------------- + + -- Function: double gsl_sf_erfc (double X) + -- Function: int gsl_sf_erfc_e (double X, gsl_sf_result * RESULT) + These routines compute the complementary error function erfc(x) = + 1 - erf(x) = (2/\sqrt(\pi)) \int_x^\infty \exp(-t^2). + + +File: gsl-ref.info, Node: Log Complementary Error Function, Next: Probability functions, Prev: Complementary Error Function, Up: Error Functions + +7.15.3 Log Complementary Error Function +--------------------------------------- + + -- Function: double gsl_sf_log_erfc (double X) + -- Function: int gsl_sf_log_erfc_e (double X, gsl_sf_result * RESULT) + These routines compute the logarithm of the complementary error + function \log(\erfc(x)). + + +File: gsl-ref.info, Node: Probability functions, Prev: Log Complementary Error Function, Up: Error Functions + +7.15.4 Probability functions +---------------------------- + +The probability functions for the Normal or Gaussian distribution are +described in Abramowitz & Stegun, Section 26.2. + + -- Function: double gsl_sf_erf_Z (double X) + -- Function: int gsl_sf_erf_Z_e (double X, gsl_sf_result * RESULT) + These routines compute the Gaussian probability density function + Z(x) = (1/\sqrt{2\pi}) \exp(-x^2/2). + + -- Function: double gsl_sf_erf_Q (double X) + -- Function: int gsl_sf_erf_Q_e (double X, gsl_sf_result * RESULT) + These routines compute the upper tail of the Gaussian probability + function Q(x) = (1/\sqrt{2\pi}) \int_x^\infty dt \exp(-t^2/2). + + The "hazard function" for the normal distribution, also known as the +inverse Mills' ratio, is defined as, + + h(x) = Z(x)/Q(x) = \sqrt{2/\pi} \exp(-x^2 / 2) / \erfc(x/\sqrt 2) + +It decreases rapidly as x approaches -\infty and asymptotes to h(x) +\sim x as x approaches +\infty. + + -- Function: double gsl_sf_hazard (double X) + -- Function: int gsl_sf_hazard_e (double X, gsl_sf_result * RESULT) + These routines compute the hazard function for the normal + distribution. + + +File: gsl-ref.info, Node: Exponential Functions, Next: Exponential Integrals, Prev: Error Functions, Up: Special Functions + +7.16 Exponential Functions +========================== + +The functions described in this section are declared in the header file +`gsl_sf_exp.h'. + +* Menu: + +* Exponential Function:: +* Relative Exponential Functions:: +* Exponentiation With Error Estimate:: + + +File: gsl-ref.info, Node: Exponential Function, Next: Relative Exponential Functions, Up: Exponential Functions + +7.16.1 Exponential Function +--------------------------- + + -- Function: double gsl_sf_exp (double X) + -- Function: int gsl_sf_exp_e (double X, gsl_sf_result * RESULT) + These routines provide an exponential function \exp(x) using GSL + semantics and error checking. + + -- Function: int gsl_sf_exp_e10_e (double X, gsl_sf_result_e10 * + RESULT) + This function computes the exponential \exp(x) using the + `gsl_sf_result_e10' type to return a result with extended range. + This function may be useful if the value of \exp(x) would overflow + the numeric range of `double'. + + -- Function: double gsl_sf_exp_mult (double X, double Y) + -- Function: int gsl_sf_exp_mult_e (double X, double Y, gsl_sf_result + * RESULT) + These routines exponentiate X and multiply by the factor Y to + return the product y \exp(x). + + -- Function: int gsl_sf_exp_mult_e10_e (const double X, const double + Y, gsl_sf_result_e10 * RESULT) + This function computes the product y \exp(x) using the + `gsl_sf_result_e10' type to return a result with extended numeric + range. + + +File: gsl-ref.info, Node: Relative Exponential Functions, Next: Exponentiation With Error Estimate, Prev: Exponential Function, Up: Exponential Functions + +7.16.2 Relative Exponential Functions +------------------------------------- + + -- Function: double gsl_sf_expm1 (double X) + -- Function: int gsl_sf_expm1_e (double X, gsl_sf_result * RESULT) + These routines compute the quantity \exp(x)-1 using an algorithm + that is accurate for small x. + + -- Function: double gsl_sf_exprel (double X) + -- Function: int gsl_sf_exprel_e (double X, gsl_sf_result * RESULT) + These routines compute the quantity (\exp(x)-1)/x using an + algorithm that is accurate for small x. For small x the algorithm + is based on the expansion (\exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + + x^3/(2*3*4) + \dots. + + -- Function: double gsl_sf_exprel_2 (double X) + -- Function: int gsl_sf_exprel_2_e (double X, gsl_sf_result * RESULT) + These routines compute the quantity 2(\exp(x)-1-x)/x^2 using an + algorithm that is accurate for small x. For small x the algorithm + is based on the expansion 2(\exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + + x^3/(3*4*5) + \dots. + + -- Function: double gsl_sf_exprel_n (int N, double X) + -- Function: int gsl_sf_exprel_n_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the N-relative exponential, which is the + N-th generalization of the functions `gsl_sf_exprel' and + `gsl_sf_exprel_2'. The N-relative exponential is given by, + + exprel_N(x) = N!/x^N (\exp(x) - \sum_{k=0}^{N-1} x^k/k!) + = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... + = 1F1 (1,1+N,x) + + +File: gsl-ref.info, Node: Exponentiation With Error Estimate, Prev: Relative Exponential Functions, Up: Exponential Functions + +7.16.3 Exponentiation With Error Estimate +----------------------------------------- + + -- Function: int gsl_sf_exp_err_e (double X, double DX, gsl_sf_result + * RESULT) + This function exponentiates X with an associated absolute error DX. + + -- Function: int gsl_sf_exp_err_e10_e (double X, double DX, + gsl_sf_result_e10 * RESULT) + This function exponentiates a quantity X with an associated + absolute error DX using the `gsl_sf_result_e10' type to return a + result with extended range. + + -- Function: int gsl_sf_exp_mult_err_e (double X, double DX, double Y, + double DY, gsl_sf_result * RESULT) + This routine computes the product y \exp(x) for the quantities X, + Y with associated absolute errors DX, DY. + + -- Function: int gsl_sf_exp_mult_err_e10_e (double X, double DX, + double Y, double DY, gsl_sf_result_e10 * RESULT) + This routine computes the product y \exp(x) for the quantities X, + Y with associated absolute errors DX, DY using the + `gsl_sf_result_e10' type to return a result with extended range. + + +File: gsl-ref.info, Node: Exponential Integrals, Next: Fermi-Dirac Function, Prev: Exponential Functions, Up: Special Functions + +7.17 Exponential Integrals +========================== + +Information on the exponential integrals can be found in Abramowitz & +Stegun, Chapter 5. These functions are declared in the header file +`gsl_sf_expint.h'. + +* Menu: + +* Exponential Integral:: +* Ei(x):: +* Hyperbolic Integrals:: +* Ei_3(x):: +* Trigonometric Integrals:: +* Arctangent Integral:: + + +File: gsl-ref.info, Node: Exponential Integral, Next: Ei(x), Up: Exponential Integrals + +7.17.1 Exponential Integral +--------------------------- + + -- Function: double gsl_sf_expint_E1 (double X) + -- Function: int gsl_sf_expint_E1_e (double X, gsl_sf_result * RESULT) + These routines compute the exponential integral E_1(x), + + E_1(x) := \Re \int_1^\infty dt \exp(-xt)/t. + + + + -- Function: double gsl_sf_expint_E2 (double X) + -- Function: int gsl_sf_expint_E2_e (double X, gsl_sf_result * RESULT) + These routines compute the second-order exponential integral + E_2(x), + + E_2(x) := \Re \int_1^\infty dt \exp(-xt)/t^2. + + + + -- Function: double gsl_sf_expint_En (int N, double X) + -- Function: int gsl_sf_expint_En_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the exponential integral E_n(x) of order n, + + E_n(x) := \Re \int_1^\infty dt \exp(-xt)/t^n. + + + + +File: gsl-ref.info, Node: Ei(x), Next: Hyperbolic Integrals, Prev: Exponential Integral, Up: Exponential Integrals + +7.17.2 Ei(x) +------------ + + -- Function: double gsl_sf_expint_Ei (double X) + -- Function: int gsl_sf_expint_Ei_e (double X, gsl_sf_result * RESULT) + These routines compute the exponential integral Ei(x), + + Ei(x) := - PV(\int_{-x}^\infty dt \exp(-t)/t) + + where PV denotes the principal value of the integral. + + +File: gsl-ref.info, Node: Hyperbolic Integrals, Next: Ei_3(x), Prev: Ei(x), Up: Exponential Integrals + +7.17.3 Hyperbolic Integrals +--------------------------- + + -- Function: double gsl_sf_Shi (double X) + -- Function: int gsl_sf_Shi_e (double X, gsl_sf_result * RESULT) + These routines compute the integral Shi(x) = \int_0^x dt + \sinh(t)/t. + + -- Function: double gsl_sf_Chi (double X) + -- Function: int gsl_sf_Chi_e (double X, gsl_sf_result * RESULT) + These routines compute the integral Chi(x) := \Re[ \gamma_E + + \log(x) + \int_0^x dt (\cosh(t)-1)/t] , where \gamma_E is the + Euler constant (available as the macro `M_EULER'). + + +File: gsl-ref.info, Node: Ei_3(x), Next: Trigonometric Integrals, Prev: Hyperbolic Integrals, Up: Exponential Integrals + +7.17.4 Ei_3(x) +-------------- + + -- Function: double gsl_sf_expint_3 (double X) + -- Function: int gsl_sf_expint_3_e (double X, gsl_sf_result * RESULT) + These routines compute the third-order exponential integral + Ei_3(x) = \int_0^xdt \exp(-t^3) for x >= 0. + + +File: gsl-ref.info, Node: Trigonometric Integrals, Next: Arctangent Integral, Prev: Ei_3(x), Up: Exponential Integrals + +7.17.5 Trigonometric Integrals +------------------------------ + + -- Function: double gsl_sf_Si (const double X) + -- Function: int gsl_sf_Si_e (double X, gsl_sf_result * RESULT) + These routines compute the Sine integral Si(x) = \int_0^x dt + \sin(t)/t. + + -- Function: double gsl_sf_Ci (const double X) + -- Function: int gsl_sf_Ci_e (double X, gsl_sf_result * RESULT) + These routines compute the Cosine integral Ci(x) = -\int_x^\infty + dt \cos(t)/t for x > 0. + + +File: gsl-ref.info, Node: Arctangent Integral, Prev: Trigonometric Integrals, Up: Exponential Integrals + +7.17.6 Arctangent Integral +-------------------------- + + -- Function: double gsl_sf_atanint (double X) + -- Function: int gsl_sf_atanint_e (double X, gsl_sf_result * RESULT) + These routines compute the Arctangent integral, which is defined + as AtanInt(x) = \int_0^x dt \arctan(t)/t. + + +File: gsl-ref.info, Node: Fermi-Dirac Function, Next: Gamma and Beta Functions, Prev: Exponential Integrals, Up: Special Functions + +7.18 Fermi-Dirac Function +========================= + +The functions described in this section are declared in the header file +`gsl_sf_fermi_dirac.h'. + +* Menu: + +* Complete Fermi-Dirac Integrals:: +* Incomplete Fermi-Dirac Integrals:: + + +File: gsl-ref.info, Node: Complete Fermi-Dirac Integrals, Next: Incomplete Fermi-Dirac Integrals, Up: Fermi-Dirac Function + +7.18.1 Complete Fermi-Dirac Integrals +------------------------------------- + +The complete Fermi-Dirac integral F_j(x) is given by, + + F_j(x) := (1/\Gamma(j+1)) \int_0^\infty dt (t^j / (\exp(t-x) + 1)) + Note that the Fermi-Dirac integral is sometimes defined without the +normalisation factor in other texts. + + -- Function: double gsl_sf_fermi_dirac_m1 (double X) + -- Function: int gsl_sf_fermi_dirac_m1_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral with an + index of -1. This integral is given by F_{-1}(x) = e^x / (1 + + e^x). + + -- Function: double gsl_sf_fermi_dirac_0 (double X) + -- Function: int gsl_sf_fermi_dirac_0_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral with an + index of 0. This integral is given by F_0(x) = \ln(1 + e^x). + + -- Function: double gsl_sf_fermi_dirac_1 (double X) + -- Function: int gsl_sf_fermi_dirac_1_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral with an + index of 1, F_1(x) = \int_0^\infty dt (t /(\exp(t-x)+1)). + + -- Function: double gsl_sf_fermi_dirac_2 (double X) + -- Function: int gsl_sf_fermi_dirac_2_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral with an + index of 2, F_2(x) = (1/2) \int_0^\infty dt (t^2 /(\exp(t-x)+1)). + + -- Function: double gsl_sf_fermi_dirac_int (int J, double X) + -- Function: int gsl_sf_fermi_dirac_int_e (int J, double X, + gsl_sf_result * RESULT) + These routines compute the complete Fermi-Dirac integral with an + integer index of j, F_j(x) = (1/\Gamma(j+1)) \int_0^\infty dt (t^j + /(\exp(t-x)+1)). + + -- Function: double gsl_sf_fermi_dirac_mhalf (double X) + -- Function: int gsl_sf_fermi_dirac_mhalf_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral + F_{-1/2}(x). + + -- Function: double gsl_sf_fermi_dirac_half (double X) + -- Function: int gsl_sf_fermi_dirac_half_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral + F_{1/2}(x). + + -- Function: double gsl_sf_fermi_dirac_3half (double X) + -- Function: int gsl_sf_fermi_dirac_3half_e (double X, gsl_sf_result * + RESULT) + These routines compute the complete Fermi-Dirac integral + F_{3/2}(x). + + +File: gsl-ref.info, Node: Incomplete Fermi-Dirac Integrals, Prev: Complete Fermi-Dirac Integrals, Up: Fermi-Dirac Function + +7.18.2 Incomplete Fermi-Dirac Integrals +--------------------------------------- + +The incomplete Fermi-Dirac integral F_j(x,b) is given by, + + F_j(x,b) := (1/\Gamma(j+1)) \int_b^\infty dt (t^j / (\Exp(t-x) + 1)) + + -- Function: double gsl_sf_fermi_dirac_inc_0 (double X, double B) + -- Function: int gsl_sf_fermi_dirac_inc_0_e (double X, double B, + gsl_sf_result * RESULT) + These routines compute the incomplete Fermi-Dirac integral with an + index of zero, F_0(x,b) = \ln(1 + e^{b-x}) - (b-x). + + +File: gsl-ref.info, Node: Gamma and Beta Functions, Next: Gegenbauer Functions, Prev: Fermi-Dirac Function, Up: Special Functions + +7.19 Gamma and Beta Functions +============================= + +This following routines compute the gamma and beta functions in their +full and incomplete forms, as well as various kinds of factorials. The +functions described in this section are declared in the header file +`gsl_sf_gamma.h'. + +* Menu: + +* Gamma Functions:: +* Factorials:: +* Pochhammer Symbol:: +* Incomplete Gamma Functions:: +* Beta Functions:: +* Incomplete Beta Function:: + + +File: gsl-ref.info, Node: Gamma Functions, Next: Factorials, Up: Gamma and Beta Functions + +7.19.1 Gamma Functions +---------------------- + +The Gamma function is defined by the following integral, + + \Gamma(x) = \int_0^\infty dt t^{x-1} \exp(-t) + +It is related to the factorial function by \Gamma(n)=(n-1)! for +positive integer n. Further information on the Gamma function can be +found in Abramowitz & Stegun, Chapter 6. + + -- Function: double gsl_sf_gamma (double X) + -- Function: int gsl_sf_gamma_e (double X, gsl_sf_result * RESULT) + These routines compute the Gamma function \Gamma(x), subject to x + not being a negative integer or zero. The function is computed + using the real Lanczos method. The maximum value of x such that + \Gamma(x) is not considered an overflow is given by the macro + `GSL_SF_GAMMA_XMAX' and is 171.0. + + -- Function: double gsl_sf_lngamma (double X) + -- Function: int gsl_sf_lngamma_e (double X, gsl_sf_result * RESULT) + These routines compute the logarithm of the Gamma function, + \log(\Gamma(x)), subject to x not being a negative integer or + zero. For x<0 the real part of \log(\Gamma(x)) is returned, which + is equivalent to \log(|\Gamma(x)|). The function is computed + using the real Lanczos method. + + -- Function: int gsl_sf_lngamma_sgn_e (double X, gsl_sf_result * + RESULT_LG, double * SGN) + This routine computes the sign of the gamma function and the + logarithm of its magnitude, subject to x not being a negative + integer or zero. The function is computed using the real Lanczos + method. The value of the gamma function and its error can be + reconstructed using the relation \Gamma(x) = sgn * + \exp(result\_lg), taking into account the two components of + RESULT_LG. + + -- Function: double gsl_sf_gammastar (double X) + -- Function: int gsl_sf_gammastar_e (double X, gsl_sf_result * RESULT) + These routines compute the regulated Gamma Function \Gamma^*(x) + for x > 0. The regulated gamma function is given by, + + \Gamma^*(x) = \Gamma(x)/(\sqrt{2\pi} x^{(x-1/2)} \exp(-x)) + = (1 + (1/12x) + ...) for x \to \infty + and is a useful suggestion of Temme. + + -- Function: double gsl_sf_gammainv (double X) + -- Function: int gsl_sf_gammainv_e (double X, gsl_sf_result * RESULT) + These routines compute the reciprocal of the gamma function, + 1/\Gamma(x) using the real Lanczos method. + + -- Function: int gsl_sf_lngamma_complex_e (double ZR, double ZI, + gsl_sf_result * LNR, gsl_sf_result * ARG) + This routine computes \log(\Gamma(z)) for complex z=z_r+i z_i and + z not a negative integer or zero, using the complex Lanczos + method. The returned parameters are lnr = \log|\Gamma(z)| and arg + = \arg(\Gamma(z)) in (-\pi,\pi]. Note that the phase part (ARG) + is not well-determined when |z| is very large, due to inevitable + roundoff in restricting to (-\pi,\pi]. This will result in a + `GSL_ELOSS' error when it occurs. The absolute value part (LNR), + however, never suffers from loss of precision. + + +File: gsl-ref.info, Node: Factorials, Next: Pochhammer Symbol, Prev: Gamma Functions, Up: Gamma and Beta Functions + +7.19.2 Factorials +----------------- + +Although factorials can be computed from the Gamma function, using the +relation n! = \Gamma(n+1) for non-negative integer n, it is usually +more efficient to call the functions in this section, particularly for +small values of n, whose factorial values are maintained in hardcoded +tables. + + -- Function: double gsl_sf_fact (unsigned int N) + -- Function: int gsl_sf_fact_e (unsigned int N, gsl_sf_result * RESULT) + These routines compute the factorial n!. The factorial is related + to the Gamma function by n! = \Gamma(n+1). The maximum value of n + such that n! is not considered an overflow is given by the macro + `GSL_SF_FACT_NMAX' and is 170. + + -- Function: double gsl_sf_doublefact (unsigned int N) + -- Function: int gsl_sf_doublefact_e (unsigned int N, gsl_sf_result * + RESULT) + These routines compute the double factorial n!! = n(n-2)(n-4) + \dots. The maximum value of n such that n!! is not considered an + overflow is given by the macro `GSL_SF_DOUBLEFACT_NMAX' and is 297. + + -- Function: double gsl_sf_lnfact (unsigned int N) + -- Function: int gsl_sf_lnfact_e (unsigned int N, gsl_sf_result * + RESULT) + These routines compute the logarithm of the factorial of N, + \log(n!). The algorithm is faster than computing \ln(\Gamma(n+1)) + via `gsl_sf_lngamma' for n < 170, but defers for larger N. + + -- Function: double gsl_sf_lndoublefact (unsigned int N) + -- Function: int gsl_sf_lndoublefact_e (unsigned int N, gsl_sf_result + * RESULT) + These routines compute the logarithm of the double factorial of N, + \log(n!!). + + -- Function: double gsl_sf_choose (unsigned int N, unsigned int M) + -- Function: int gsl_sf_choose_e (unsigned int N, unsigned int M, + gsl_sf_result * RESULT) + These routines compute the combinatorial factor `n choose m' = + n!/(m!(n-m)!) + + -- Function: double gsl_sf_lnchoose (unsigned int N, unsigned int M) + -- Function: int gsl_sf_lnchoose_e (unsigned int N, unsigned int M, + gsl_sf_result * RESULT) + These routines compute the logarithm of `n choose m'. This is + equivalent to the sum \log(n!) - \log(m!) - \log((n-m)!). + + -- Function: double gsl_sf_taylorcoeff (int N, double X) + -- Function: int gsl_sf_taylorcoeff_e (int N, double X, gsl_sf_result + * RESULT) + These routines compute the Taylor coefficient x^n / n! for x >= 0, + n >= 0. + + +File: gsl-ref.info, Node: Pochhammer Symbol, Next: Incomplete Gamma Functions, Prev: Factorials, Up: Gamma and Beta Functions + +7.19.3 Pochhammer Symbol +------------------------ + + -- Function: double gsl_sf_poch (double A, double X) + -- Function: int gsl_sf_poch_e (double A, double X, gsl_sf_result * + RESULT) + These routines compute the Pochhammer symbol (a)_x = \Gamma(a + + x)/\Gamma(a). The Pochhammer symbol is also known as the Apell + symbol and sometimes written as (a,x). When a and a+x are + negative integers or zero, the limiting value of the ratio is + returned. + + -- Function: double gsl_sf_lnpoch (double A, double X) + -- Function: int gsl_sf_lnpoch_e (double A, double X, gsl_sf_result * + RESULT) + These routines compute the logarithm of the Pochhammer symbol, + \log((a)_x) = \log(\Gamma(a + x)/\Gamma(a)). + + -- Function: int gsl_sf_lnpoch_sgn_e (double A, double X, + gsl_sf_result * RESULT, double * SGN) + These routines compute the sign of the Pochhammer symbol and the + logarithm of its magnitude. The computed parameters are result = + \log(|(a)_x|) with a corresponding error term, and sgn = + \sgn((a)_x) where (a)_x = \Gamma(a + x)/\Gamma(a). + + -- Function: double gsl_sf_pochrel (double A, double X) + -- Function: int gsl_sf_pochrel_e (double A, double X, gsl_sf_result * + RESULT) + These routines compute the relative Pochhammer symbol ((a)_x - + 1)/x where (a)_x = \Gamma(a + x)/\Gamma(a). + + +File: gsl-ref.info, Node: Incomplete Gamma Functions, Next: Beta Functions, Prev: Pochhammer Symbol, Up: Gamma and Beta Functions + +7.19.4 Incomplete Gamma Functions +--------------------------------- + + -- Function: double gsl_sf_gamma_inc (double A, double X) + -- Function: int gsl_sf_gamma_inc_e (double A, double X, gsl_sf_result + * RESULT) + These functions compute the unnormalized incomplete Gamma Function + \Gamma(a,x) = \int_x^\infty dt t^{a-1} \exp(-t) for a real and x + >= 0. + + -- Function: double gsl_sf_gamma_inc_Q (double A, double X) + -- Function: int gsl_sf_gamma_inc_Q_e (double A, double X, + gsl_sf_result * RESULT) + These routines compute the normalized incomplete Gamma Function + Q(a,x) = 1/\Gamma(a) \int_x^\infty dt t^{a-1} \exp(-t) for a > 0, + x >= 0. + + -- Function: double gsl_sf_gamma_inc_P (double A, double X) + -- Function: int gsl_sf_gamma_inc_P_e (double A, double X, + gsl_sf_result * RESULT) + These routines compute the complementary normalized incomplete + Gamma Function P(a,x) = 1 - Q(a,x) = 1/\Gamma(a) \int_0^x dt + t^{a-1} \exp(-t) for a > 0, x >= 0. + + Note that Abramowitz & Stegun call P(a,x) the incomplete gamma + function (section 6.5). + + +File: gsl-ref.info, Node: Beta Functions, Next: Incomplete Beta Function, Prev: Incomplete Gamma Functions, Up: Gamma and Beta Functions + +7.19.5 Beta Functions +--------------------- + + -- Function: double gsl_sf_beta (double A, double B) + -- Function: int gsl_sf_beta_e (double A, double B, gsl_sf_result * + RESULT) + These routines compute the Beta Function, B(a,b) = + \Gamma(a)\Gamma(b)/\Gamma(a+b) subject to a and b not being + negative integers. + + -- Function: double gsl_sf_lnbeta (double A, double B) + -- Function: int gsl_sf_lnbeta_e (double A, double B, gsl_sf_result * + RESULT) + These routines compute the logarithm of the Beta Function, + \log(B(a,b)) subject to a and b not being negative integers. + + +File: gsl-ref.info, Node: Incomplete Beta Function, Prev: Beta Functions, Up: Gamma and Beta Functions + +7.19.6 Incomplete Beta Function +------------------------------- + + -- Function: double gsl_sf_beta_inc (double A, double B, double X) + -- Function: int gsl_sf_beta_inc_e (double A, double B, double X, + gsl_sf_result * RESULT) + These routines compute the normalized incomplete Beta function + I_x(a,b)=B_x(a,b)/B(a,b) where B_x(a,b) = \int_0^x t^{a-1} + (1-t)^{b-1} dt for 0 <= x <= 1. For a > 0, b > 0 the value is + computed using a continued fraction expansion. For all other + values it is computed using the relation I_x(a,b,x) = (1/a) x^a + 2F1(a,1-b,a+1,x)/B(a,b). + + +File: gsl-ref.info, Node: Gegenbauer Functions, Next: Hypergeometric Functions, Prev: Gamma and Beta Functions, Up: Special Functions + +7.20 Gegenbauer Functions +========================= + +The Gegenbauer polynomials are defined in Abramowitz & Stegun, Chapter +22, where they are known as Ultraspherical polynomials. The functions +described in this section are declared in the header file +`gsl_sf_gegenbauer.h'. + + -- Function: double gsl_sf_gegenpoly_1 (double LAMBDA, double X) + -- Function: double gsl_sf_gegenpoly_2 (double LAMBDA, double X) + -- Function: double gsl_sf_gegenpoly_3 (double LAMBDA, double X) + -- Function: int gsl_sf_gegenpoly_1_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_gegenpoly_2_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_gegenpoly_3_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + These functions evaluate the Gegenbauer polynomials + C^{(\lambda)}_n(x) using explicit representations for n =1, 2, 3. + + -- Function: double gsl_sf_gegenpoly_n (int N, double LAMBDA, double X) + -- Function: int gsl_sf_gegenpoly_n_e (int N, double LAMBDA, double X, + gsl_sf_result * RESULT) + These functions evaluate the Gegenbauer polynomial + C^{(\lambda)}_n(x) for a specific value of N, LAMBDA, X subject to + \lambda > -1/2, n >= 0. + + -- Function: int gsl_sf_gegenpoly_array (int NMAX, double LAMBDA, + double X, double RESULT_ARRAY[]) + This function computes an array of Gegenbauer polynomials + C^{(\lambda)}_n(x) for n = 0, 1, 2, \dots, nmax, subject to + \lambda > -1/2, nmax >= 0. + + +File: gsl-ref.info, Node: Hypergeometric Functions, Next: Laguerre Functions, Prev: Gegenbauer Functions, Up: Special Functions + +7.21 Hypergeometric Functions +============================= + +Hypergeometric functions are described in Abramowitz & Stegun, Chapters +13 and 15. These functions are declared in the header file +`gsl_sf_hyperg.h'. + + -- Function: double gsl_sf_hyperg_0F1 (double C, double X) + -- Function: int gsl_sf_hyperg_0F1_e (double C, double X, + gsl_sf_result * RESULT) + These routines compute the hypergeometric function 0F1(c,x). + + -- Function: double gsl_sf_hyperg_1F1_int (int M, int N, double X) + -- Function: int gsl_sf_hyperg_1F1_int_e (int M, int N, double X, + gsl_sf_result * RESULT) + These routines compute the confluent hypergeometric function + 1F1(m,n,x) = M(m,n,x) for integer parameters M, N. + + -- Function: double gsl_sf_hyperg_1F1 (double A, double B, double X) + -- Function: int gsl_sf_hyperg_1F1_e (double A, double B, double X, + gsl_sf_result * RESULT) + These routines compute the confluent hypergeometric function + 1F1(a,b,x) = M(a,b,x) for general parameters A, B. + + -- Function: double gsl_sf_hyperg_U_int (int M, int N, double X) + -- Function: int gsl_sf_hyperg_U_int_e (int M, int N, double X, + gsl_sf_result * RESULT) + These routines compute the confluent hypergeometric function + U(m,n,x) for integer parameters M, N. + + -- Function: int gsl_sf_hyperg_U_int_e10_e (int M, int N, double X, + gsl_sf_result_e10 * RESULT) + This routine computes the confluent hypergeometric function + U(m,n,x) for integer parameters M, N using the `gsl_sf_result_e10' + type to return a result with extended range. + + -- Function: double gsl_sf_hyperg_U (double A, double B, double X) + -- Function: int gsl_sf_hyperg_U_e (double A, double B, double X, + gsl_sf_result * RESULT) + These routines compute the confluent hypergeometric function + U(a,b,x). + + -- Function: int gsl_sf_hyperg_U_e10_e (double A, double B, double X, + gsl_sf_result_e10 * RESULT) + This routine computes the confluent hypergeometric function + U(a,b,x) using the `gsl_sf_result_e10' type to return a result + with extended range. + + -- Function: double gsl_sf_hyperg_2F1 (double A, double B, double C, + double X) + -- Function: int gsl_sf_hyperg_2F1_e (double A, double B, double C, + double X, gsl_sf_result * RESULT) + These routines compute the Gauss hypergeometric function + 2F1(a,b,c,x) = F(a,b,c,x) for |x| < 1. + + If the arguments (a,b,c,x) are too close to a singularity then the + function can return the error code `GSL_EMAXITER' when the series + approximation converges too slowly. This occurs in the region of + x=1, c - a - b = m for integer m. + + -- Function: double gsl_sf_hyperg_2F1_conj (double AR, double AI, + double C, double X) + -- Function: int gsl_sf_hyperg_2F1_conj_e (double AR, double AI, + double C, double X, gsl_sf_result * RESULT) + These routines compute the Gauss hypergeometric function 2F1(a_R + + i a_I, a_R - i a_I, c, x) with complex parameters for |x| < 1. + + -- Function: double gsl_sf_hyperg_2F1_renorm (double A, double B, + double C, double X) + -- Function: int gsl_sf_hyperg_2F1_renorm_e (double A, double B, + double C, double X, gsl_sf_result * RESULT) + These routines compute the renormalized Gauss hypergeometric + function 2F1(a,b,c,x) / \Gamma(c) for |x| < 1. + + -- Function: double gsl_sf_hyperg_2F1_conj_renorm (double AR, double + AI, double C, double X) + -- Function: int gsl_sf_hyperg_2F1_conj_renorm_e (double AR, double + AI, double C, double X, gsl_sf_result * RESULT) + These routines compute the renormalized Gauss hypergeometric + function 2F1(a_R + i a_I, a_R - i a_I, c, x) / \Gamma(c) for |x| < + 1. + + -- Function: double gsl_sf_hyperg_2F0 (double A, double B, double X) + -- Function: int gsl_sf_hyperg_2F0_e (double A, double B, double X, + gsl_sf_result * RESULT) + These routines compute the hypergeometric function 2F0(a,b,x). + The series representation is a divergent hypergeometric series. + However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x) + + +File: gsl-ref.info, Node: Laguerre Functions, Next: Lambert W Functions, Prev: Hypergeometric Functions, Up: Special Functions + +7.22 Laguerre Functions +======================= + +The generalized Laguerre polynomials are defined in terms of confluent +hypergeometric functions as L^a_n(x) = ((a+1)_n / n!) 1F1(-n,a+1,x), +and are sometimes referred to as the associated Laguerre polynomials. +They are related to the plain Laguerre polynomials L_n(x) by L^0_n(x) = +L_n(x) and L^k_n(x) = (-1)^k (d^k/dx^k) L_(n+k)(x). For more +information see Abramowitz & Stegun, Chapter 22. + + The functions described in this section are declared in the header +file `gsl_sf_laguerre.h'. + + -- Function: double gsl_sf_laguerre_1 (double A, double X) + -- Function: double gsl_sf_laguerre_2 (double A, double X) + -- Function: double gsl_sf_laguerre_3 (double A, double X) + -- Function: int gsl_sf_laguerre_1_e (double A, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_laguerre_2_e (double A, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_laguerre_3_e (double A, double X, + gsl_sf_result * RESULT) + These routines evaluate the generalized Laguerre polynomials + L^a_1(x), L^a_2(x), L^a_3(x) using explicit representations. + + -- Function: double gsl_sf_laguerre_n (const int N, const double A, + const double X) + -- Function: int gsl_sf_laguerre_n_e (int N, double A, double X, + gsl_sf_result * RESULT) + These routines evaluate the generalized Laguerre polynomials + L^a_n(x) for a > -1, n >= 0. + + + +File: gsl-ref.info, Node: Lambert W Functions, Next: Legendre Functions and Spherical Harmonics, Prev: Laguerre Functions, Up: Special Functions + +7.23 Lambert W Functions +======================== + +Lambert's W functions, W(x), are defined to be solutions of the +equation W(x) \exp(W(x)) = x. This function has multiple branches for x +< 0; however, it has only two real-valued branches. We define W_0(x) to +be the principal branch, where W > -1 for x < 0, and W_{-1}(x) to be +the other real branch, where W < -1 for x < 0. The Lambert functions +are declared in the header file `gsl_sf_lambert.h'. + + -- Function: double gsl_sf_lambert_W0 (double X) + -- Function: int gsl_sf_lambert_W0_e (double X, gsl_sf_result * RESULT) + These compute the principal branch of the Lambert W function, + W_0(x). + + -- Function: double gsl_sf_lambert_Wm1 (double X) + -- Function: int gsl_sf_lambert_Wm1_e (double X, gsl_sf_result * + RESULT) + These compute the secondary real-valued branch of the Lambert W + function, W_{-1}(x). + + +File: gsl-ref.info, Node: Legendre Functions and Spherical Harmonics, Next: Logarithm and Related Functions, Prev: Lambert W Functions, Up: Special Functions + +7.24 Legendre Functions and Spherical Harmonics +=============================================== + +The Legendre Functions and Legendre Polynomials are described in +Abramowitz & Stegun, Chapter 8. These functions are declared in the +header file `gsl_sf_legendre.h'. + +* Menu: + +* Legendre Polynomials:: +* Associated Legendre Polynomials and Spherical Harmonics:: +* Conical Functions:: +* Radial Functions for Hyperbolic Space:: + + +File: gsl-ref.info, Node: Legendre Polynomials, Next: Associated Legendre Polynomials and Spherical Harmonics, Up: Legendre Functions and Spherical Harmonics + +7.24.1 Legendre Polynomials +--------------------------- + + -- Function: double gsl_sf_legendre_P1 (double X) + -- Function: double gsl_sf_legendre_P2 (double X) + -- Function: double gsl_sf_legendre_P3 (double X) + -- Function: int gsl_sf_legendre_P1_e (double X, gsl_sf_result * + RESULT) + -- Function: int gsl_sf_legendre_P2_e (double X, gsl_sf_result * + RESULT) + -- Function: int gsl_sf_legendre_P3_e (double X, gsl_sf_result * + RESULT) + These functions evaluate the Legendre polynomials P_l(x) using + explicit representations for l=1, 2, 3. + + -- Function: double gsl_sf_legendre_Pl (int L, double X) + -- Function: int gsl_sf_legendre_Pl_e (int L, double X, gsl_sf_result + * RESULT) + These functions evaluate the Legendre polynomial P_l(x) for a + specific value of L, X subject to l >= 0, |x| <= 1 + + -- Function: int gsl_sf_legendre_Pl_array (int LMAX, double X, double + RESULT_ARRAY[]) + -- Function: int gsl_sf_legendre_Pl_deriv_array (int LMAX, double X, + double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[]) + These functions compute arrays of Legendre polynomials P_l(x) and + derivatives dP_l(x)/dx, for l = 0, \dots, lmax, |x| <= 1 + + -- Function: double gsl_sf_legendre_Q0 (double X) + -- Function: int gsl_sf_legendre_Q0_e (double X, gsl_sf_result * + RESULT) + These routines compute the Legendre function Q_0(x) for x > -1, x + != 1. + + -- Function: double gsl_sf_legendre_Q1 (double X) + -- Function: int gsl_sf_legendre_Q1_e (double X, gsl_sf_result * + RESULT) + These routines compute the Legendre function Q_1(x) for x > -1, x + != 1. + + -- Function: double gsl_sf_legendre_Ql (int L, double X) + -- Function: int gsl_sf_legendre_Ql_e (int L, double X, gsl_sf_result + * RESULT) + These routines compute the Legendre function Q_l(x) for x > -1, x + != 1 and l >= 0. + + +File: gsl-ref.info, Node: Associated Legendre Polynomials and Spherical Harmonics, Next: Conical Functions, Prev: Legendre Polynomials, Up: Legendre Functions and Spherical Harmonics + +7.24.2 Associated Legendre Polynomials and Spherical Harmonics +-------------------------------------------------------------- + +The following functions compute the associated Legendre Polynomials +P_l^m(x). Note that this function grows combinatorially with l and can +overflow for l larger than about 150. There is no trouble for small m, +but overflow occurs when m and l are both large. Rather than allow +overflows, these functions refuse to calculate P_l^m(x) and return +`GSL_EOVRFLW' when they can sense that l and m are too big. + + If you want to calculate a spherical harmonic, then _do not_ use +these functions. Instead use `gsl_sf_legendre_sphPlm' below, which +uses a similar recursion, but with the normalized functions. + + -- Function: double gsl_sf_legendre_Plm (int L, int M, double X) + -- Function: int gsl_sf_legendre_Plm_e (int L, int M, double X, + gsl_sf_result * RESULT) + These routines compute the associated Legendre polynomial P_l^m(x) + for m >= 0, l >= m, |x| <= 1. + + -- Function: int gsl_sf_legendre_Plm_array (int LMAX, int M, double X, + double RESULT_ARRAY[]) + -- Function: int gsl_sf_legendre_Plm_deriv_array (int LMAX, int M, + double X, double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[]) + These functions compute arrays of Legendre polynomials P_l^m(x) + and derivatives dP_l^m(x)/dx, for m >= 0, l = |m|, ..., lmax, |x| + <= 1. + + -- Function: double gsl_sf_legendre_sphPlm (int L, int M, double X) + -- Function: int gsl_sf_legendre_sphPlm_e (int L, int M, double X, + gsl_sf_result * RESULT) + These routines compute the normalized associated Legendre + polynomial \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x) + suitable for use in spherical harmonics. The parameters must + satisfy m >= 0, l >= m, |x| <= 1. Theses routines avoid the + overflows that occur for the standard normalization of P_l^m(x). + + -- Function: int gsl_sf_legendre_sphPlm_array (int LMAX, int M, double + X, double RESULT_ARRAY[]) + -- Function: int gsl_sf_legendre_sphPlm_deriv_array (int LMAX, int M, + double X, double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[]) + These functions compute arrays of normalized associated Legendre + functions \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x), and + derivatives, for m >= 0, l = |m|, ..., lmax, |x| <= 1.0 + + -- Function: int gsl_sf_legendre_array_size (const int LMAX, const int + M) + This function returns the size of RESULT_ARRAY[] needed for the + array versions of P_l^m(x), LMAX - M + 1. An inline version of + this function is used when `HAVE_INLINE' is defined. + + +File: gsl-ref.info, Node: Conical Functions, Next: Radial Functions for Hyperbolic Space, Prev: Associated Legendre Polynomials and Spherical Harmonics, Up: Legendre Functions and Spherical Harmonics + +7.24.3 Conical Functions +------------------------ + +The Conical Functions P^\mu_{-(1/2)+i\lambda}(x) and +Q^\mu_{-(1/2)+i\lambda} are described in Abramowitz & Stegun, Section +8.12. + + -- Function: double gsl_sf_conicalP_half (double LAMBDA, double X) + -- Function: int gsl_sf_conicalP_half_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + These routines compute the irregular Spherical Conical Function + P^{1/2}_{-1/2 + i \lambda}(x) for x > -1. + + -- Function: double gsl_sf_conicalP_mhalf (double LAMBDA, double X) + -- Function: int gsl_sf_conicalP_mhalf_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + These routines compute the regular Spherical Conical Function + P^{-1/2}_{-1/2 + i \lambda}(x) for x > -1. + + -- Function: double gsl_sf_conicalP_0 (double LAMBDA, double X) + -- Function: int gsl_sf_conicalP_0_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + These routines compute the conical function P^0_{-1/2 + i + \lambda}(x) for x > -1. + + -- Function: double gsl_sf_conicalP_1 (double LAMBDA, double X) + -- Function: int gsl_sf_conicalP_1_e (double LAMBDA, double X, + gsl_sf_result * RESULT) + These routines compute the conical function P^1_{-1/2 + i + \lambda}(x) for x > -1. + + -- Function: double gsl_sf_conicalP_sph_reg (int L, double LAMBDA, + double X) + -- Function: int gsl_sf_conicalP_sph_reg_e (int L, double LAMBDA, + double X, gsl_sf_result * RESULT) + These routines compute the Regular Spherical Conical Function + P^{-1/2-l}_{-1/2 + i \lambda}(x) for x > -1, l >= -1. + + -- Function: double gsl_sf_conicalP_cyl_reg (int M, double LAMBDA, + double X) + -- Function: int gsl_sf_conicalP_cyl_reg_e (int M, double LAMBDA, + double X, gsl_sf_result * RESULT) + These routines compute the Regular Cylindrical Conical Function + P^{-m}_{-1/2 + i \lambda}(x) for x > -1, m >= -1. + + +File: gsl-ref.info, Node: Radial Functions for Hyperbolic Space, Prev: Conical Functions, Up: Legendre Functions and Spherical Harmonics + +7.24.4 Radial Functions for Hyperbolic Space +-------------------------------------------- + +The following spherical functions are specializations of Legendre +functions which give the regular eigenfunctions of the Laplacian on a +3-dimensional hyperbolic space H3d. Of particular interest is the flat +limit, \lambda \to \infty, \eta \to 0, \lambda\eta fixed. + + -- Function: double gsl_sf_legendre_H3d_0 (double LAMBDA, double ETA) + -- Function: int gsl_sf_legendre_H3d_0_e (double LAMBDA, double ETA, + gsl_sf_result * RESULT) + These routines compute the zeroth radial eigenfunction of the + Laplacian on the 3-dimensional hyperbolic space, + L^{H3d}_0(\lambda,\eta) := \sin(\lambda\eta)/(\lambda\sinh(\eta)) + for \eta >= 0. In the flat limit this takes the form + L^{H3d}_0(\lambda,\eta) = j_0(\lambda\eta). + + -- Function: double gsl_sf_legendre_H3d_1 (double LAMBDA, double ETA) + -- Function: int gsl_sf_legendre_H3d_1_e (double LAMBDA, double ETA, + gsl_sf_result * RESULT) + These routines compute the first radial eigenfunction of the + Laplacian on the 3-dimensional hyperbolic space, + L^{H3d}_1(\lambda,\eta) := 1/\sqrt{\lambda^2 + 1} \sin(\lambda + \eta)/(\lambda \sinh(\eta)) (\coth(\eta) - \lambda + \cot(\lambda\eta)) for \eta >= 0. In the flat limit this takes + the form L^{H3d}_1(\lambda,\eta) = j_1(\lambda\eta). + + -- Function: double gsl_sf_legendre_H3d (int L, double LAMBDA, double + ETA) + -- Function: int gsl_sf_legendre_H3d_e (int L, double LAMBDA, double + ETA, gsl_sf_result * RESULT) + These routines compute the L-th radial eigenfunction of the + Laplacian on the 3-dimensional hyperbolic space \eta >= 0, l >= 0. + In the flat limit this takes the form L^{H3d}_l(\lambda,\eta) = + j_l(\lambda\eta). + + -- Function: int gsl_sf_legendre_H3d_array (int LMAX, double LAMBDA, + double ETA, double RESULT_ARRAY[]) + This function computes an array of radial eigenfunctions + L^{H3d}_l(\lambda, \eta) for 0 <= l <= lmax. + + +File: gsl-ref.info, Node: Logarithm and Related Functions, Next: Mathieu Functions, Prev: Legendre Functions and Spherical Harmonics, Up: Special Functions + +7.25 Logarithm and Related Functions +==================================== + +Information on the properties of the Logarithm function can be found in +Abramowitz & Stegun, Chapter 4. The functions described in this section +are declared in the header file `gsl_sf_log.h'. + + -- Function: double gsl_sf_log (double X) + -- Function: int gsl_sf_log_e (double X, gsl_sf_result * RESULT) + These routines compute the logarithm of X, \log(x), for x > 0. + + -- Function: double gsl_sf_log_abs (double X) + -- Function: int gsl_sf_log_abs_e (double X, gsl_sf_result * RESULT) + These routines compute the logarithm of the magnitude of X, + \log(|x|), for x \ne 0. + + -- Function: int gsl_sf_complex_log_e (double ZR, double ZI, + gsl_sf_result * LNR, gsl_sf_result * THETA) + This routine computes the complex logarithm of z = z_r + i z_i. + The results are returned as LNR, THETA such that \exp(lnr + i + \theta) = z_r + i z_i, where \theta lies in the range [-\pi,\pi]. + + -- Function: double gsl_sf_log_1plusx (double X) + -- Function: int gsl_sf_log_1plusx_e (double X, gsl_sf_result * RESULT) + These routines compute \log(1 + x) for x > -1 using an algorithm + that is accurate for small x. + + -- Function: double gsl_sf_log_1plusx_mx (double X) + -- Function: int gsl_sf_log_1plusx_mx_e (double X, gsl_sf_result * + RESULT) + These routines compute \log(1 + x) - x for x > -1 using an + algorithm that is accurate for small x. + + +File: gsl-ref.info, Node: Mathieu Functions, Next: Power Function, Prev: Logarithm and Related Functions, Up: Special Functions + +7.26 Mathieu Functions +====================== + +The routines described in this section compute the angular and radial +Mathieu functions, and their characteristic values. Mathieu functions +are the solutions of the following two differential equations: + + d^2y/dv^2 + (a - 2q\cos 2v)y = 0 + d^2f/du^2 - (a - 2q\cosh 2u)f = 0 + +The angular Mathieu functions ce_r(x,q), se_r(x,q) are the even and odd +periodic solutions of the first equation, which is known as Mathieu's +equation. These exist only for the discrete sequence of characteristic +values a=a_r(q) (even-periodic) and a=b_r(q) (odd-periodic). + + The radial Mathieu functions Mc^{(j)}_{r}(z,q), Ms^{(j)}_{r}(z,q) +are the solutions of the second equation, which is referred to as +Mathieu's modified equation. The radial Mathieu functions of the +first, second, third and fourth kind are denoted by the parameter j, +which takes the value 1, 2, 3 or 4. + + For more information on the Mathieu functions, see Abramowitz and +Stegun, Chapter 20. These functions are defined in the header file +`gsl_sf_mathieu.h'. + +* Menu: + +* Mathieu Function Workspace:: +* Mathieu Function Characteristic Values:: +* Angular Mathieu Functions:: +* Radial Mathieu Functions:: + + +File: gsl-ref.info, Node: Mathieu Function Workspace, Next: Mathieu Function Characteristic Values, Up: Mathieu Functions + +7.26.1 Mathieu Function Workspace +--------------------------------- + +The Mathieu functions can be computed for a single order or for +multiple orders, using array-based routines. The array-based routines +require a preallocated workspace. + + -- Function: gsl_sf_mathieu_workspace * gsl_sf_mathieu_alloc (size_t + N, double QMAX) + This function returns a workspace for the array versions of the + Mathieu routines. The arguments N and QMAX specify the maximum + order and q-value of Mathieu functions which can be computed with + this workspace. + + + -- Function: void gsl_sf_mathieu_free (gsl_sf_mathieu_workspace * WORK) + This function frees the workspace WORK. + + +File: gsl-ref.info, Node: Mathieu Function Characteristic Values, Next: Angular Mathieu Functions, Prev: Mathieu Function Workspace, Up: Mathieu Functions + +7.26.2 Mathieu Function Characteristic Values +--------------------------------------------- + + -- Function: int gsl_sf_mathieu_a (int N, double Q, gsl_sf_result * + RESULT) + -- Function: int gsl_sf_mathieu_b (int N, double Q, gsl_sf_result * + RESULT) + These routines compute the characteristic values a_n(q), b_n(q) of + the Mathieu functions ce_n(q,x) and se_n(q,x), respectively. + + -- Function: int gsl_sf_mathieu_a_array (int ORDER_MIN, int ORDER_MAX, + double Q, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + -- Function: int gsl_sf_mathieu_b_array (int ORDER_MIN, int ORDER_MAX, + double Q, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + These routines compute a series of Mathieu characteristic values + a_n(q), b_n(q) for n from ORDER_MIN to ORDER_MAX inclusive, + storing the results in the array RESULT_ARRAY. + + +File: gsl-ref.info, Node: Angular Mathieu Functions, Next: Radial Mathieu Functions, Prev: Mathieu Function Characteristic Values, Up: Mathieu Functions + +7.26.3 Angular Mathieu Functions +-------------------------------- + + -- Function: int gsl_sf_mathieu_ce (int N, double Q, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_mathieu_se (int N, double Q, double X, + gsl_sf_result * RESULT) + These routines compute the angular Mathieu functions ce_n(q,x) and + se_n(q,x), respectively. + + -- Function: int gsl_sf_mathieu_ce_array (int NMIN, int NMAX, double + Q, double X, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + -- Function: int gsl_sf_mathieu_se_array (int NMIN, int NMAX, double + Q, double X, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + These routines compute a series of the angular Mathieu functions + ce_n(q,x) and se_n(q,x) of order n from NMIN to NMAX inclusive, + storing the results in the array RESULT_ARRAY. + + +File: gsl-ref.info, Node: Radial Mathieu Functions, Prev: Angular Mathieu Functions, Up: Mathieu Functions + +7.26.4 Radial Mathieu Functions +------------------------------- + + -- Function: int gsl_sf_mathieu_Mc (int J, int N, double Q, double X, + gsl_sf_result * RESULT) + -- Function: int gsl_sf_mathieu_Ms (int J, int N, double Q, double X, + gsl_sf_result * RESULT) + These routines compute the radial J-th kind Mathieu functions + Mc_n^{(j)}(q,x) and Ms_n^{(j)}(q,x) of order N. + + The allowed values of J are 1 and 2. The functions for j = 3,4 + can be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and + M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or + Ms_n^{(j)}. + + -- Function: int gsl_sf_mathieu_Mc_array (int J, int NMIN, int NMAX, + double Q, double X, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + -- Function: int gsl_sf_mathieu_Ms_array (int J, int NMIN, int NMAX, + double Q, double X, gsl_sf_mathieu_workspace * WORK, double + RESULT_ARRAY[]) + These routines compute a series of the radial Mathieu functions of + kind J, with order from NMIN to NMAX inclusive, storing the + results in the array RESULT_ARRAY. + + +File: gsl-ref.info, Node: Power Function, Next: Psi (Digamma) Function, Prev: Mathieu Functions, Up: Special Functions + +7.27 Power Function +=================== + +The following functions are equivalent to the function `gsl_pow_int' +(*note Small integer powers::) with an error estimate. These functions +are declared in the header file `gsl_sf_pow_int.h'. + + -- Function: double gsl_sf_pow_int (double X, int N) + -- Function: int gsl_sf_pow_int_e (double X, int N, gsl_sf_result * + RESULT) + These routines compute the power x^n for integer N. The power is + computed using the minimum number of multiplications. For example, + x^8 is computed as ((x^2)^2)^2, requiring only 3 multiplications. + For reasons of efficiency, these functions do not check for + overflow or underflow conditions. + + #include + /* compute 3.0**12 */ + double y = gsl_sf_pow_int(3.0, 12); + + +File: gsl-ref.info, Node: Psi (Digamma) Function, Next: Synchrotron Functions, Prev: Power Function, Up: Special Functions + +7.28 Psi (Digamma) Function +=========================== + +The polygamma functions of order n are defined by + + \psi^{(n)}(x) = (d/dx)^n \psi(x) = (d/dx)^{n+1} \log(\Gamma(x)) + +where \psi(x) = \Gamma'(x)/\Gamma(x) is known as the digamma function. +These functions are declared in the header file `gsl_sf_psi.h'. + +* Menu: + +* Digamma Function:: +* Trigamma Function:: +* Polygamma Function:: + + +File: gsl-ref.info, Node: Digamma Function, Next: Trigamma Function, Up: Psi (Digamma) Function + +7.28.1 Digamma Function +----------------------- + + -- Function: double gsl_sf_psi_int (int N) + -- Function: int gsl_sf_psi_int_e (int N, gsl_sf_result * RESULT) + These routines compute the digamma function \psi(n) for positive + integer N. The digamma function is also called the Psi function. + + -- Function: double gsl_sf_psi (double X) + -- Function: int gsl_sf_psi_e (double X, gsl_sf_result * RESULT) + These routines compute the digamma function \psi(x) for general x, + x \ne 0. + + -- Function: double gsl_sf_psi_1piy (double Y) + -- Function: int gsl_sf_psi_1piy_e (double Y, gsl_sf_result * RESULT) + These routines compute the real part of the digamma function on + the line 1+i y, \Re[\psi(1 + i y)]. + + +File: gsl-ref.info, Node: Trigamma Function, Next: Polygamma Function, Prev: Digamma Function, Up: Psi (Digamma) Function + +7.28.2 Trigamma Function +------------------------ + + -- Function: double gsl_sf_psi_1_int (int N) + -- Function: int gsl_sf_psi_1_int_e (int N, gsl_sf_result * RESULT) + These routines compute the Trigamma function \psi'(n) for positive + integer n. + + -- Function: double gsl_sf_psi_1 (double X) + -- Function: int gsl_sf_psi_1_e (double X, gsl_sf_result * RESULT) + These routines compute the Trigamma function \psi'(x) for general + x. + + +File: gsl-ref.info, Node: Polygamma Function, Prev: Trigamma Function, Up: Psi (Digamma) Function + +7.28.3 Polygamma Function +------------------------- + + -- Function: double gsl_sf_psi_n (int N, double X) + -- Function: int gsl_sf_psi_n_e (int N, double X, gsl_sf_result * + RESULT) + These routines compute the polygamma function \psi^{(n)}(x) for n + >= 0, x > 0. + + +File: gsl-ref.info, Node: Synchrotron Functions, Next: Transport Functions, Prev: Psi (Digamma) Function, Up: Special Functions + +7.29 Synchrotron Functions +========================== + +The functions described in this section are declared in the header file +`gsl_sf_synchrotron.h'. + + -- Function: double gsl_sf_synchrotron_1 (double X) + -- Function: int gsl_sf_synchrotron_1_e (double X, gsl_sf_result * + RESULT) + These routines compute the first synchrotron function x + \int_x^\infty dt K_{5/3}(t) for x >= 0. + + -- Function: double gsl_sf_synchrotron_2 (double X) + -- Function: int gsl_sf_synchrotron_2_e (double X, gsl_sf_result * + RESULT) + These routines compute the second synchrotron function x + K_{2/3}(x) for x >= 0. + + +File: gsl-ref.info, Node: Transport Functions, Next: Trigonometric Functions, Prev: Synchrotron Functions, Up: Special Functions + +7.30 Transport Functions +======================== + +The transport functions J(n,x) are defined by the integral +representations J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2. They are +declared in the header file `gsl_sf_transport.h'. + + -- Function: double gsl_sf_transport_2 (double X) + -- Function: int gsl_sf_transport_2_e (double X, gsl_sf_result * + RESULT) + These routines compute the transport function J(2,x). + + -- Function: double gsl_sf_transport_3 (double X) + -- Function: int gsl_sf_transport_3_e (double X, gsl_sf_result * + RESULT) + These routines compute the transport function J(3,x). + + -- Function: double gsl_sf_transport_4 (double X) + -- Function: int gsl_sf_transport_4_e (double X, gsl_sf_result * + RESULT) + These routines compute the transport function J(4,x). + + -- Function: double gsl_sf_transport_5 (double X) + -- Function: int gsl_sf_transport_5_e (double X, gsl_sf_result * + RESULT) + These routines compute the transport function J(5,x). + + +File: gsl-ref.info, Node: Trigonometric Functions, Next: Zeta Functions, Prev: Transport Functions, Up: Special Functions + +7.31 Trigonometric Functions +============================ + +The library includes its own trigonometric functions in order to provide +consistency across platforms and reliable error estimates. These +functions are declared in the header file `gsl_sf_trig.h'. + +* Menu: + +* Circular Trigonometric Functions:: +* Trigonometric Functions for Complex Arguments:: +* Hyperbolic Trigonometric Functions:: +* Conversion Functions:: +* Restriction Functions:: +* Trigonometric Functions With Error Estimates:: + + +File: gsl-ref.info, Node: Circular Trigonometric Functions, Next: Trigonometric Functions for Complex Arguments, Up: Trigonometric Functions + +7.31.1 Circular Trigonometric Functions +--------------------------------------- + + -- Function: double gsl_sf_sin (double X) + -- Function: int gsl_sf_sin_e (double X, gsl_sf_result * RESULT) + These routines compute the sine function \sin(x). + + -- Function: double gsl_sf_cos (double X) + -- Function: int gsl_sf_cos_e (double X, gsl_sf_result * RESULT) + These routines compute the cosine function \cos(x). + + -- Function: double gsl_sf_hypot (double X, double Y) + -- Function: int gsl_sf_hypot_e (double X, double Y, gsl_sf_result * + RESULT) + These routines compute the hypotenuse function \sqrt{x^2 + y^2} + avoiding overflow and underflow. + + -- Function: double gsl_sf_sinc (double X) + -- Function: int gsl_sf_sinc_e (double X, gsl_sf_result * RESULT) + These routines compute \sinc(x) = \sin(\pi x) / (\pi x) for any + value of X. + + +File: gsl-ref.info, Node: Trigonometric Functions for Complex Arguments, Next: Hyperbolic Trigonometric Functions, Prev: Circular Trigonometric Functions, Up: Trigonometric Functions + +7.31.2 Trigonometric Functions for Complex Arguments +---------------------------------------------------- + + -- Function: int gsl_sf_complex_sin_e (double ZR, double ZI, + gsl_sf_result * SZR, gsl_sf_result * SZI) + This function computes the complex sine, \sin(z_r + i z_i) storing + the real and imaginary parts in SZR, SZI. + + -- Function: int gsl_sf_complex_cos_e (double ZR, double ZI, + gsl_sf_result * CZR, gsl_sf_result * CZI) + This function computes the complex cosine, \cos(z_r + i z_i) + storing the real and imaginary parts in CZR, CZI. + + -- Function: int gsl_sf_complex_logsin_e (double ZR, double ZI, + gsl_sf_result * LSZR, gsl_sf_result * LSZI) + This function computes the logarithm of the complex sine, + \log(\sin(z_r + i z_i)) storing the real and imaginary parts in + LSZR, LSZI. + + +File: gsl-ref.info, Node: Hyperbolic Trigonometric Functions, Next: Conversion Functions, Prev: Trigonometric Functions for Complex Arguments, Up: Trigonometric Functions + +7.31.3 Hyperbolic Trigonometric Functions +----------------------------------------- + + -- Function: double gsl_sf_lnsinh (double X) + -- Function: int gsl_sf_lnsinh_e (double X, gsl_sf_result * RESULT) + These routines compute \log(\sinh(x)) for x > 0. + + -- Function: double gsl_sf_lncosh (double X) + -- Function: int gsl_sf_lncosh_e (double X, gsl_sf_result * RESULT) + These routines compute \log(\cosh(x)) for any X. + + +File: gsl-ref.info, Node: Conversion Functions, Next: Restriction Functions, Prev: Hyperbolic Trigonometric Functions, Up: Trigonometric Functions + +7.31.4 Conversion Functions +--------------------------- + + -- Function: int gsl_sf_polar_to_rect (double R, double THETA, + gsl_sf_result * X, gsl_sf_result * Y); + This function converts the polar coordinates (R,THETA) to + rectilinear coordinates (X,Y), x = r\cos(\theta), y = + r\sin(\theta). + + -- Function: int gsl_sf_rect_to_polar (double X, double Y, + gsl_sf_result * R, gsl_sf_result * THETA) + This function converts the rectilinear coordinates (X,Y) to polar + coordinates (R,THETA), such that x = r\cos(\theta), y = + r\sin(\theta). The argument THETA lies in the range [-\pi, \pi]. + + +File: gsl-ref.info, Node: Restriction Functions, Next: Trigonometric Functions With Error Estimates, Prev: Conversion Functions, Up: Trigonometric Functions + +7.31.5 Restriction Functions +---------------------------- + + -- Function: double gsl_sf_angle_restrict_symm (double THETA) + -- Function: int gsl_sf_angle_restrict_symm_e (double * THETA) + These routines force the angle THETA to lie in the range + (-\pi,\pi]. + + Note that the mathematical value of \pi is slightly greater than + `M_PI', so the machine numbers `M_PI' and `-M_PI' are included in + the range. + + -- Function: double gsl_sf_angle_restrict_pos (double THETA) + -- Function: int gsl_sf_angle_restrict_pos_e (double * THETA) + These routines force the angle THETA to lie in the range [0, 2\pi). + + Note that the mathematical value of 2\pi is slightly greater than + `2*M_PI', so the machine number `2*M_PI' is included in the range. + + + +File: gsl-ref.info, Node: Trigonometric Functions With Error Estimates, Prev: Restriction Functions, Up: Trigonometric Functions + +7.31.6 Trigonometric Functions With Error Estimates +--------------------------------------------------- + + -- Function: int gsl_sf_sin_err_e (double X, double DX, gsl_sf_result + * RESULT) + This routine computes the sine of an angle X with an associated + absolute error DX, \sin(x \pm dx). Note that this function is + provided in the error-handling form only since its purpose is to + compute the propagated error. + + -- Function: int gsl_sf_cos_err_e (double X, double DX, gsl_sf_result + * RESULT) + This routine computes the cosine of an angle X with an associated + absolute error DX, \cos(x \pm dx). Note that this function is + provided in the error-handling form only since its purpose is to + compute the propagated error. + + +File: gsl-ref.info, Node: Zeta Functions, Next: Special Functions Examples, Prev: Trigonometric Functions, Up: Special Functions + +7.32 Zeta Functions +=================== + +The Riemann zeta function is defined in Abramowitz & Stegun, Section +23.2. The functions described in this section are declared in the +header file `gsl_sf_zeta.h'. + +* Menu: + +* Riemann Zeta Function:: +* Riemann Zeta Function Minus One:: +* Hurwitz Zeta Function:: +* Eta Function:: + + +File: gsl-ref.info, Node: Riemann Zeta Function, Next: Riemann Zeta Function Minus One, Up: Zeta Functions + +7.32.1 Riemann Zeta Function +---------------------------- + +The Riemann zeta function is defined by the infinite sum \zeta(s) = +\sum_{k=1}^\infty k^{-s}. + + -- Function: double gsl_sf_zeta_int (int N) + -- Function: int gsl_sf_zeta_int_e (int N, gsl_sf_result * RESULT) + These routines compute the Riemann zeta function \zeta(n) for + integer N, n \ne 1. + + -- Function: double gsl_sf_zeta (double S) + -- Function: int gsl_sf_zeta_e (double S, gsl_sf_result * RESULT) + These routines compute the Riemann zeta function \zeta(s) for + arbitrary S, s \ne 1. + + +File: gsl-ref.info, Node: Riemann Zeta Function Minus One, Next: Hurwitz Zeta Function, Prev: Riemann Zeta Function, Up: Zeta Functions + +7.32.2 Riemann Zeta Function Minus One +-------------------------------------- + +For large positive argument, the Riemann zeta function approaches one. +In this region the fractional part is interesting, and therefore we +need a function to evaluate it explicitly. + + -- Function: double gsl_sf_zetam1_int (int N) + -- Function: int gsl_sf_zetam1_int_e (int N, gsl_sf_result * RESULT) + These routines compute \zeta(n) - 1 for integer N, n \ne 1. + + -- Function: double gsl_sf_zetam1 (double S) + -- Function: int gsl_sf_zetam1_e (double S, gsl_sf_result * RESULT) + These routines compute \zeta(s) - 1 for arbitrary S, s \ne 1. + + +File: gsl-ref.info, Node: Hurwitz Zeta Function, Next: Eta Function, Prev: Riemann Zeta Function Minus One, Up: Zeta Functions + +7.32.3 Hurwitz Zeta Function +---------------------------- + +The Hurwitz zeta function is defined by \zeta(s,q) = \sum_0^\infty +(k+q)^{-s}. + + -- Function: double gsl_sf_hzeta (double S, double Q) + -- Function: int gsl_sf_hzeta_e (double S, double Q, gsl_sf_result * + RESULT) + These routines compute the Hurwitz zeta function \zeta(s,q) for s + > 1, q > 0. + + +File: gsl-ref.info, Node: Eta Function, Prev: Hurwitz Zeta Function, Up: Zeta Functions + +7.32.4 Eta Function +------------------- + +The eta function is defined by \eta(s) = (1-2^{1-s}) \zeta(s). + + -- Function: double gsl_sf_eta_int (int N) + -- Function: int gsl_sf_eta_int_e (int N, gsl_sf_result * RESULT) + These routines compute the eta function \eta(n) for integer N. + + -- Function: double gsl_sf_eta (double S) + -- Function: int gsl_sf_eta_e (double S, gsl_sf_result * RESULT) + These routines compute the eta function \eta(s) for arbitrary S. + + +File: gsl-ref.info, Node: Special Functions Examples, Next: Special Functions References and Further Reading, Prev: Zeta Functions, Up: Special Functions + +7.33 Examples +============= + +The following example demonstrates the use of the error handling form of +the special functions, in this case to compute the Bessel function +J_0(5.0), + + #include + #include + #include + + int + main (void) + { + double x = 5.0; + gsl_sf_result result; + + double expected = -0.17759677131433830434739701; + + int status = gsl_sf_bessel_J0_e (x, &result); + + printf ("status = %s\n", gsl_strerror(status)); + printf ("J0(5.0) = %.18f\n" + " +/- % .18f\n", + result.val, result.err); + printf ("exact = %.18f\n", expected); + return status; + } + +Here are the results of running the program, + + $ ./a.out + status = success + J0(5.0) = -0.177596771314338292 + +/- 0.000000000000000193 + exact = -0.177596771314338292 + +The next program computes the same quantity using the natural form of +the function. In this case the error term RESULT.ERR and return status +are not accessible. + + #include + #include + + int + main (void) + { + double x = 5.0; + double expected = -0.17759677131433830434739701; + + double y = gsl_sf_bessel_J0 (x); + + printf ("J0(5.0) = %.18f\n", y); + printf ("exact = %.18f\n", expected); + return 0; + } + +The results of the function are the same, + + $ ./a.out + J0(5.0) = -0.177596771314338292 + exact = -0.177596771314338292 + + +File: gsl-ref.info, Node: Special Functions References and Further Reading, Prev: Special Functions Examples, Up: Special Functions + +7.34 References and Further Reading +=================================== + +The library follows the conventions of `Abramowitz & Stegun' where +possible, + Abramowitz & Stegun (eds.), `Handbook of Mathematical Functions' + +The following papers contain information on the algorithms used to +compute the special functions, + Allan J. MacLeod, MISCFUN: A software package to compute uncommon + special functions. `ACM Trans. Math. Soft.', vol. 22, 1996, + 288-301 + + G.N. Watson, A Treatise on the Theory of Bessel Functions, 2nd + Edition (Cambridge University Press, 1944). + + G. Nemeth, Mathematical Approximations of Special Functions, Nova + Science Publishers, ISBN 1-56072-052-2 + + B.C. Carlson, Special Functions of Applied Mathematics (1977) + + N. M. Temme, Special Functions: An Introduction to the Classical + Functions of Mathematical Physics (1996), ISBN 978-0471113133. + + W.J. Thompson, Atlas for Computing Mathematical Functions, John + Wiley & Sons, New York (1997). + + Y.Y. Luke, Algorithms for the Computation of Mathematical + Functions, Academic Press, New York (1977). + + + +File: gsl-ref.info, Node: Vectors and Matrices, Next: Permutations, Prev: Special Functions, Up: Top + +8 Vectors and Matrices +********************** + +The functions described in this chapter provide a simple vector and +matrix interface to ordinary C arrays. The memory management of these +arrays is implemented using a single underlying type, known as a block. +By writing your functions in terms of vectors and matrices you can pass +a single structure containing both data and dimensions as an argument +without needing additional function parameters. The structures are +compatible with the vector and matrix formats used by BLAS routines. + +* Menu: + +* Data types:: +* Blocks:: +* Vectors:: +* Matrices:: +* Vector and Matrix References and Further Reading:: + + +File: gsl-ref.info, Node: Data types, Next: Blocks, Up: Vectors and Matrices + +8.1 Data types +============== + +All the functions are available for each of the standard data-types. +The versions for `double' have the prefix `gsl_block', `gsl_vector' and +`gsl_matrix'. Similarly the versions for single-precision `float' +arrays have the prefix `gsl_block_float', `gsl_vector_float' and +`gsl_matrix_float'. The full list of available types is given below, + + gsl_block double + gsl_block_float float + gsl_block_long_double long double + gsl_block_int int + gsl_block_uint unsigned int + gsl_block_long long + gsl_block_ulong unsigned long + gsl_block_short short + gsl_block_ushort unsigned short + gsl_block_char char + gsl_block_uchar unsigned char + gsl_block_complex complex double + gsl_block_complex_float complex float + gsl_block_complex_long_double complex long double + +Corresponding types exist for the `gsl_vector' and `gsl_matrix' +functions. + + +File: gsl-ref.info, Node: Blocks, Next: Vectors, Prev: Data types, Up: Vectors and Matrices + +8.2 Blocks +========== + +For consistency all memory is allocated through a `gsl_block' +structure. The structure contains two components, the size of an area +of memory and a pointer to the memory. The `gsl_block' structure looks +like this, + + typedef struct + { + size_t size; + double * data; + } gsl_block; + +Vectors and matrices are made by "slicing" an underlying block. A slice +is a set of elements formed from an initial offset and a combination of +indices and step-sizes. In the case of a matrix the step-size for the +column index represents the row-length. The step-size for a vector is +known as the "stride". + + The functions for allocating and deallocating blocks are defined in +`gsl_block.h' + +* Menu: + +* Block allocation:: +* Reading and writing blocks:: +* Example programs for blocks:: + + +File: gsl-ref.info, Node: Block allocation, Next: Reading and writing blocks, Up: Blocks + +8.2.1 Block allocation +---------------------- + +The functions for allocating memory to a block follow the style of +`malloc' and `free'. In addition they also perform their own error +checking. If there is insufficient memory available to allocate a +block then the functions call the GSL error handler (with an error +number of `GSL_ENOMEM') in addition to returning a null pointer. Thus +if you use the library error handler to abort your program then it +isn't necessary to check every `alloc'. + + -- Function: gsl_block * gsl_block_alloc (size_t N) + This function allocates memory for a block of N double-precision + elements, returning a pointer to the block struct. The block is + not initialized and so the values of its elements are undefined. + Use the function `gsl_block_calloc' if you want to ensure that all + the elements are initialized to zero. + + A null pointer is returned if insufficient memory is available to + create the block. + + -- Function: gsl_block * gsl_block_calloc (size_t N) + This function allocates memory for a block and initializes all the + elements of the block to zero. + + -- Function: void gsl_block_free (gsl_block * B) + This function frees the memory used by a block B previously + allocated with `gsl_block_alloc' or `gsl_block_calloc'. The block + B must be a valid block object (a null pointer is not allowed). + + +File: gsl-ref.info, Node: Reading and writing blocks, Next: Example programs for blocks, Prev: Block allocation, Up: Blocks + +8.2.2 Reading and writing blocks +-------------------------------- + +The library provides functions for reading and writing blocks to a file +as binary data or formatted text. + + -- Function: int gsl_block_fwrite (FILE * STREAM, const gsl_block * B) + This function writes the elements of the block B to the stream + STREAM in binary format. The return value is 0 for success and + `GSL_EFAILED' if there was a problem writing to the file. Since + the data is written in the native binary format it may not be + portable between different architectures. + + -- Function: int gsl_block_fread (FILE * STREAM, gsl_block * B) + This function reads into the block B from the open stream STREAM + in binary format. The block B must be preallocated with the + correct length since the function uses the size of B to determine + how many bytes to read. The return value is 0 for success and + `GSL_EFAILED' if there was a problem reading from the file. The + data is assumed to have been written in the native binary format + on the same architecture. + + -- Function: int gsl_block_fprintf (FILE * STREAM, const gsl_block * + B, const char * FORMAT) + This function writes the elements of the block B line-by-line to + the stream STREAM using the format specifier FORMAT, which should + be one of the `%g', `%e' or `%f' formats for floating point + numbers and `%d' for integers. The function returns 0 for success + and `GSL_EFAILED' if there was a problem writing to the file. + + -- Function: int gsl_block_fscanf (FILE * STREAM, gsl_block * B) + This function reads formatted data from the stream STREAM into the + block B. The block B must be preallocated with the correct length + since the function uses the size of B to determine how many + numbers to read. The function returns 0 for success and + `GSL_EFAILED' if there was a problem reading from the file. + + +File: gsl-ref.info, Node: Example programs for blocks, Prev: Reading and writing blocks, Up: Blocks + +8.2.3 Example programs for blocks +--------------------------------- + +The following program shows how to allocate a block, + + #include + #include + + int + main (void) + { + gsl_block * b = gsl_block_alloc (100); + + printf ("length of block = %u\n", b->size); + printf ("block data address = %#x\n", b->data); + + gsl_block_free (b); + return 0; + } + +Here is the output from the program, + + length of block = 100 + block data address = 0x804b0d8 + + +File: gsl-ref.info, Node: Vectors, Next: Matrices, Prev: Blocks, Up: Vectors and Matrices + +8.3 Vectors +=========== + +Vectors are defined by a `gsl_vector' structure which describes a slice +of a block. Different vectors can be created which point to the same +block. A vector slice is a set of equally-spaced elements of an area +of memory. + + The `gsl_vector' structure contains five components, the "size", the +"stride", a pointer to the memory where the elements are stored, DATA, +a pointer to the block owned by the vector, BLOCK, if any, and an +ownership flag, OWNER. The structure is very simple and looks like +this, + + typedef struct + { + size_t size; + size_t stride; + double * data; + gsl_block * block; + int owner; + } gsl_vector; + +The SIZE is simply the number of vector elements. The range of valid +indices runs from 0 to `size-1'. The STRIDE is the step-size from one +element to the next in physical memory, measured in units of the +appropriate datatype. The pointer DATA gives the location of the first +element of the vector in memory. The pointer BLOCK stores the location +of the memory block in which the vector elements are located (if any). +If the vector owns this block then the OWNER field is set to one and +the block will be deallocated when the vector is freed. If the vector +points to a block owned by another object then the OWNER field is zero +and any underlying block will not be deallocated with the vector. + + The functions for allocating and accessing vectors are defined in +`gsl_vector.h' + +* Menu: + +* Vector allocation:: +* Accessing vector elements:: +* Initializing vector elements:: +* Reading and writing vectors:: +* Vector views:: +* Copying vectors:: +* Exchanging elements:: +* Vector operations:: +* Finding maximum and minimum elements of vectors:: +* Vector properties:: +* Example programs for vectors:: + + +File: gsl-ref.info, Node: Vector allocation, Next: Accessing vector elements, Up: Vectors + +8.3.1 Vector allocation +----------------------- + +The functions for allocating memory to a vector follow the style of +`malloc' and `free'. In addition they also perform their own error +checking. If there is insufficient memory available to allocate a +vector then the functions call the GSL error handler (with an error +number of `GSL_ENOMEM') in addition to returning a null pointer. Thus +if you use the library error handler to abort your program then it +isn't necessary to check every `alloc'. + + -- Function: gsl_vector * gsl_vector_alloc (size_t N) + This function creates a vector of length N, returning a pointer to + a newly initialized vector struct. A new block is allocated for the + elements of the vector, and stored in the BLOCK component of the + vector struct. The block is "owned" by the vector, and will be + deallocated when the vector is deallocated. + + -- Function: gsl_vector * gsl_vector_calloc (size_t N) + This function allocates memory for a vector of length N and + initializes all the elements of the vector to zero. + + -- Function: void gsl_vector_free (gsl_vector * V) + This function frees a previously allocated vector V. If the + vector was created using `gsl_vector_alloc' then the block + underlying the vector will also be deallocated. If the vector has + been created from another object then the memory is still owned by + that object and will not be deallocated. The vector V must be a + valid vector object (a null pointer is not allowed). + + +File: gsl-ref.info, Node: Accessing vector elements, Next: Initializing vector elements, Prev: Vector allocation, Up: Vectors + +8.3.2 Accessing vector elements +------------------------------- + +Unlike FORTRAN compilers, C compilers do not usually provide support +for range checking of vectors and matrices.(1) The functions +`gsl_vector_get' and `gsl_vector_set' can perform portable range +checking for you and report an error if you attempt to access elements +outside the allowed range. + + The functions for accessing the elements of a vector or matrix are +defined in `gsl_vector.h' and declared `extern inline' to eliminate +function-call overhead. You must compile your program with the +preprocessor macro `HAVE_INLINE' defined to use these functions. + + If necessary you can turn off range checking completely without +modifying any source files by recompiling your program with the +preprocessor definition `GSL_RANGE_CHECK_OFF'. Provided your compiler +supports inline functions the effect of turning off range checking is +to replace calls to `gsl_vector_get(v,i)' by `v->data[i*v->stride]' and +calls to `gsl_vector_set(v,i,x)' by `v->data[i*v->stride]=x'. Thus +there should be no performance penalty for using the range checking +functions when range checking is turned off. + + If you use a C99 compiler which requires inline functions in header +files to be declared `inline' instead of `extern inline', define the +macro `GSL_C99_INLINE' (*note Inline functions::). With GCC this is +selected automatically when compiling in C99 mode (`-std=c99'). + + If inline functions are not used, calls to the functions +`gsl_vector_get' and `gsl_vector_set' will link to the compiled +versions of these functions in the library itself. The range checking +in these functions is controlled by the global integer variable +`gsl_check_range'. It is enabled by default--to disable it, set +`gsl_check_range' to zero. Due to function-call overhead, there is +less benefit in disabling range checking here than for inline functions. + + -- Function: double gsl_vector_get (const gsl_vector * V, size_t I) + This function returns the I-th element of a vector V. If I lies + outside the allowed range of 0 to N-1 then the error handler is + invoked and 0 is returned. An inline version of this function is + used when `HAVE_INLINE' is defined. + + -- Function: void gsl_vector_set (gsl_vector * V, size_t I, double X) + This function sets the value of the I-th element of a vector V to + X. If I lies outside the allowed range of 0 to N-1 then the error + handler is invoked. An inline version of this function is used + when `HAVE_INLINE' is defined. + + -- Function: double * gsl_vector_ptr (gsl_vector * V, size_t I) + -- Function: const double * gsl_vector_const_ptr (const gsl_vector * + V, size_t I) + These functions return a pointer to the I-th element of a vector + V. If I lies outside the allowed range of 0 to N-1 then the error + handler is invoked and a null pointer is returned. Inline + versions of these functions are used when `HAVE_INLINE' is defined. + + ---------- Footnotes ---------- + + (1) Range checking is available in the GNU C Compiler +bounds-checking extension, but it is not part of the default +installation of GCC. Memory accesses can also be checked with Valgrind +or the `gcc -fmudflap' memory protection option. + + +File: gsl-ref.info, Node: Initializing vector elements, Next: Reading and writing vectors, Prev: Accessing vector elements, Up: Vectors + +8.3.3 Initializing vector elements +---------------------------------- + + -- Function: void gsl_vector_set_all (gsl_vector * V, double X) + This function sets all the elements of the vector V to the value X. + + -- Function: void gsl_vector_set_zero (gsl_vector * V) + This function sets all the elements of the vector V to zero. + + -- Function: int gsl_vector_set_basis (gsl_vector * V, size_t I) + This function makes a basis vector by setting all the elements of + the vector V to zero except for the I-th element which is set to + one. + + +File: gsl-ref.info, Node: Reading and writing vectors, Next: Vector views, Prev: Initializing vector elements, Up: Vectors + +8.3.4 Reading and writing vectors +--------------------------------- + +The library provides functions for reading and writing vectors to a file +as binary data or formatted text. + + -- Function: int gsl_vector_fwrite (FILE * STREAM, const gsl_vector * + V) + This function writes the elements of the vector V to the stream + STREAM in binary format. The return value is 0 for success and + `GSL_EFAILED' if there was a problem writing to the file. Since + the data is written in the native binary format it may not be + portable between different architectures. + + -- Function: int gsl_vector_fread (FILE * STREAM, gsl_vector * V) + This function reads into the vector V from the open stream STREAM + in binary format. The vector V must be preallocated with the + correct length since the function uses the size of V to determine + how many bytes to read. The return value is 0 for success and + `GSL_EFAILED' if there was a problem reading from the file. The + data is assumed to have been written in the native binary format + on the same architecture. + + -- Function: int gsl_vector_fprintf (FILE * STREAM, const gsl_vector * + V, const char * FORMAT) + This function writes the elements of the vector V line-by-line to + the stream STREAM using the format specifier FORMAT, which should + be one of the `%g', `%e' or `%f' formats for floating point + numbers and `%d' for integers. The function returns 0 for success + and `GSL_EFAILED' if there was a problem writing to the file. + + -- Function: int gsl_vector_fscanf (FILE * STREAM, gsl_vector * V) + This function reads formatted data from the stream STREAM into the + vector V. The vector V must be preallocated with the correct + length since the function uses the size of V to determine how many + numbers to read. The function returns 0 for success and + `GSL_EFAILED' if there was a problem reading from the file. + + +File: gsl-ref.info, Node: Vector views, Next: Copying vectors, Prev: Reading and writing vectors, Up: Vectors + +8.3.5 Vector views +------------------ + +In addition to creating vectors from slices of blocks it is also +possible to slice vectors and create vector views. For example, a +subvector of another vector can be described with a view, or two views +can be made which provide access to the even and odd elements of a +vector. + + A vector view is a temporary object, stored on the stack, which can +be used to operate on a subset of vector elements. Vector views can be +defined for both constant and non-constant vectors, using separate types +that preserve constness. A vector view has the type `gsl_vector_view' +and a constant vector view has the type `gsl_vector_const_view'. In +both cases the elements of the view can be accessed as a `gsl_vector' +using the `vector' component of the view object. A pointer to a vector +of type `gsl_vector *' or `const gsl_vector *' can be obtained by +taking the address of this component with the `&' operator. + + When using this pointer it is important to ensure that the view +itself remains in scope--the simplest way to do so is by always writing +the pointer as `&'VIEW`.vector', and never storing this value in +another variable. + + -- Function: gsl_vector_view gsl_vector_subvector (gsl_vector * V, + size_t OFFSET, size_t N) + -- Function: gsl_vector_const_view gsl_vector_const_subvector (const + gsl_vector * V, size_t OFFSET, size_t N) + These functions return a vector view of a subvector of another + vector V. The start of the new vector is offset by OFFSET elements + from the start of the original vector. The new vector has N + elements. Mathematically, the I-th element of the new vector V' + is given by, + + v'(i) = v->data[(offset + i)*v->stride] + + where the index I runs from 0 to `n-1'. + + The `data' pointer of the returned vector struct is set to null if + the combined parameters (OFFSET,N) overrun the end of the original + vector. + + The new vector is only a view of the block underlying the original + vector, V. The block containing the elements of V is not owned by + the new vector. When the view goes out of scope the original + vector V and its block will continue to exist. The original + memory can only be deallocated by freeing the original vector. Of + course, the original vector should not be deallocated while the + view is still in use. + + The function `gsl_vector_const_subvector' is equivalent to + `gsl_vector_subvector' but can be used for vectors which are + declared `const'. + + -- Function: gsl_vector_view gsl_vector_subvector_with_stride + (gsl_vector * V, size_t OFFSET, size_t STRIDE, size_t N) + -- Function: gsl_vector_const_view +gsl_vector_const_subvector_with_stride (const gsl_vector * V, size_t + OFFSET, size_t STRIDE, size_t N) + These functions return a vector view of a subvector of another + vector V with an additional stride argument. The subvector is + formed in the same way as for `gsl_vector_subvector' but the new + vector has N elements with a step-size of STRIDE from one element + to the next in the original vector. Mathematically, the I-th + element of the new vector V' is given by, + + v'(i) = v->data[(offset + i*stride)*v->stride] + + where the index I runs from 0 to `n-1'. + + Note that subvector views give direct access to the underlying + elements of the original vector. For example, the following code + will zero the even elements of the vector `v' of length `n', while + leaving the odd elements untouched, + + gsl_vector_view v_even + = gsl_vector_subvector_with_stride (v, 0, 2, n/2); + gsl_vector_set_zero (&v_even.vector); + + A vector view can be passed to any subroutine which takes a vector + argument just as a directly allocated vector would be, using + `&'VIEW`.vector'. For example, the following code computes the + norm of the odd elements of `v' using the BLAS routine DNRM2, + + gsl_vector_view v_odd + = gsl_vector_subvector_with_stride (v, 1, 2, n/2); + double r = gsl_blas_dnrm2 (&v_odd.vector); + + The function `gsl_vector_const_subvector_with_stride' is equivalent + to `gsl_vector_subvector_with_stride' but can be used for vectors + which are declared `const'. + + -- Function: gsl_vector_view gsl_vector_complex_real + (gsl_vector_complex * V) + -- Function: gsl_vector_const_view gsl_vector_complex_const_real + (const gsl_vector_complex * V) + These functions return a vector view of the real parts of the + complex vector V. + + The function `gsl_vector_complex_const_real' is equivalent to + `gsl_vector_complex_real' but can be used for vectors which are + declared `const'. + + -- Function: gsl_vector_view gsl_vector_complex_imag + (gsl_vector_complex * V) + -- Function: gsl_vector_const_view gsl_vector_complex_const_imag + (const gsl_vector_complex * V) + These functions return a vector view of the imaginary parts of the + complex vector V. + + The function `gsl_vector_complex_const_imag' is equivalent to + `gsl_vector_complex_imag' but can be used for vectors which are + declared `const'. + + -- Function: gsl_vector_view gsl_vector_view_array (double * BASE, + size_t N) + -- Function: gsl_vector_const_view gsl_vector_const_view_array (const + double * BASE, size_t N) + These functions return a vector view of an array. The start of + the new vector is given by BASE and has N elements. + Mathematically, the I-th element of the new vector V' is given by, + + v'(i) = base[i] + + where the index I runs from 0 to `n-1'. + + The array containing the elements of V is not owned by the new + vector view. When the view goes out of scope the original array + will continue to exist. The original memory can only be + deallocated by freeing the original pointer BASE. Of course, the + original array should not be deallocated while the view is still + in use. + + The function `gsl_vector_const_view_array' is equivalent to + `gsl_vector_view_array' but can be used for arrays which are + declared `const'. + + -- Function: gsl_vector_view gsl_vector_view_array_with_stride (double + * BASE, size_t STRIDE, size_t N) + -- Function: gsl_vector_const_view +gsl_vector_const_view_array_with_stride (const double * BASE, size_t + STRIDE, size_t N) + These functions return a vector view of an array BASE with an + additional stride argument. The subvector is formed in the same + way as for `gsl_vector_view_array' but the new vector has N + elements with a step-size of STRIDE from one element to the next + in the original array. Mathematically, the I-th element of the new + vector V' is given by, + + v'(i) = base[i*stride] + + where the index I runs from 0 to `n-1'. + + Note that the view gives direct access to the underlying elements + of the original array. A vector view can be passed to any + subroutine which takes a vector argument just as a directly + allocated vector would be, using `&'VIEW`.vector'. + + The function `gsl_vector_const_view_array_with_stride' is + equivalent to `gsl_vector_view_array_with_stride' but can be used + for arrays which are declared `const'. + + +File: gsl-ref.info, Node: Copying vectors, Next: Exchanging elements, Prev: Vector views, Up: Vectors + +8.3.6 Copying vectors +--------------------- + +Common operations on vectors such as addition and multiplication are +available in the BLAS part of the library (*note BLAS Support::). +However, it is useful to have a small number of utility functions which +do not require the full BLAS code. The following functions fall into +this category. + + -- Function: int gsl_vector_memcpy (gsl_vector * DEST, const + gsl_vector * SRC) + This function copies the elements of the vector SRC into the + vector DEST. The two vectors must have the same length. + + -- Function: int gsl_vector_swap (gsl_vector * V, gsl_vector * W) + This function exchanges the elements of the vectors V and W by + copying. The two vectors must have the same length. + + +File: gsl-ref.info, Node: Exchanging elements, Next: Vector operations, Prev: Copying vectors, Up: Vectors + +8.3.7 Exchanging elements +------------------------- + +The following function can be used to exchange, or permute, the elements +of a vector. + + -- Function: int gsl_vector_swap_elements (gsl_vector * V, size_t I, + size_t J) + This function exchanges the I-th and J-th elements of the vector V + in-place. + + -- Function: int gsl_vector_reverse (gsl_vector * V) + This function reverses the order of the elements of the vector V. + + +File: gsl-ref.info, Node: Vector operations, Next: Finding maximum and minimum elements of vectors, Prev: Exchanging elements, Up: Vectors + +8.3.8 Vector operations +----------------------- + + -- Function: int gsl_vector_add (gsl_vector * A, const gsl_vector * B) + This function adds the elements of vector B to the elements of + vector A. The result a_i \leftarrow a_i + b_i is stored in A and + B remains unchanged. The two vectors must have the same length. + + -- Function: int gsl_vector_sub (gsl_vector * A, const gsl_vector * B) + This function subtracts the elements of vector B from the elements + of vector A. The result a_i \leftarrow a_i - b_i is stored in A + and B remains unchanged. The two vectors must have the same + length. + + -- Function: int gsl_vector_mul (gsl_vector * A, const gsl_vector * B) + This function multiplies the elements of vector A by the elements + of vector B. The result a_i \leftarrow a_i * b_i is stored in A + and B remains unchanged. The two vectors must have the same length. + + -- Function: int gsl_vector_div (gsl_vector * A, const gsl_vector * B) + This function divides the elements of vector A by the elements of + vector B. The result a_i \leftarrow a_i / b_i is stored in A and + B remains unchanged. The two vectors must have the same length. + + -- Function: int gsl_vector_scale (gsl_vector * A, const double X) + This function multiplies the elements of vector A by the constant + factor X. The result a_i \leftarrow x a_i is stored in A. + + -- Function: int gsl_vector_add_constant (gsl_vector * A, const double + X) + This function adds the constant value X to the elements of the + vector A. The result a_i \leftarrow a_i + x is stored in A. + + +File: gsl-ref.info, Node: Finding maximum and minimum elements of vectors, Next: Vector properties, Prev: Vector operations, Up: Vectors + +8.3.9 Finding maximum and minimum elements of vectors +----------------------------------------------------- + +The following operations are only defined for real vectors. + + -- Function: double gsl_vector_max (const gsl_vector * V) + This function returns the maximum value in the vector V. + + -- Function: double gsl_vector_min (const gsl_vector * V) + This function returns the minimum value in the vector V. + + -- Function: void gsl_vector_minmax (const gsl_vector * V, double * + MIN_OUT, double * MAX_OUT) + This function returns the minimum and maximum values in the vector + V, storing them in MIN_OUT and MAX_OUT. + + -- Function: size_t gsl_vector_max_index (const gsl_vector * V) + This function returns the index of the maximum value in the vector + V. When there are several equal maximum elements then the lowest + index is returned. + + -- Function: size_t gsl_vector_min_index (const gsl_vector * V) + This function returns the index of the minimum value in the vector + V. When there are several equal minimum elements then the lowest + index is returned. + + -- Function: void gsl_vector_minmax_index (const gsl_vector * V, + size_t * IMIN, size_t * IMAX) + This function returns the indices of the minimum and maximum + values in the vector V, storing them in IMIN and IMAX. When there + are several equal minimum or maximum elements then the lowest + indices are returned. + + +File: gsl-ref.info, Node: Vector properties, Next: Example programs for vectors, Prev: Finding maximum and minimum elements of vectors, Up: Vectors + +8.3.10 Vector properties +------------------------ + +The following functions are defined for real and complex vectors. For +complex vectors both the real and imaginary parts must satisfy the +conditions. + + -- Function: int gsl_vector_isnull (const gsl_vector * V) + -- Function: int gsl_vector_ispos (const gsl_vector * V) + -- Function: int gsl_vector_isneg (const gsl_vector * V) + -- Function: int gsl_vector_isnonneg (const gsl_vector * V) + These functions return 1 if all the elements of the vector V are + zero, strictly positive, strictly negative, or non-negative + respectively, and 0 otherwise. + + -- Function: int gsl_vector_equal (const gsl_vector * U, const + gsl_vector * V) + This function returns 1 if the vectors U and V are equal (by + comparison of element values) and 0 otherwise. + + +File: gsl-ref.info, Node: Example programs for vectors, Prev: Vector properties, Up: Vectors + +8.3.11 Example programs for vectors +----------------------------------- + +This program shows how to allocate, initialize and read from a vector +using the functions `gsl_vector_alloc', `gsl_vector_set' and +`gsl_vector_get'. + + #include + #include + + int + main (void) + { + int i; + gsl_vector * v = gsl_vector_alloc (3); + + for (i = 0; i < 3; i++) + { + gsl_vector_set (v, i, 1.23 + i); + } + + for (i = 0; i < 100; i++) /* OUT OF RANGE ERROR */ + { + printf ("v_%d = %g\n", i, gsl_vector_get (v, i)); + } + + gsl_vector_free (v); + return 0; + } + +Here is the output from the program. The final loop attempts to read +outside the range of the vector `v', and the error is trapped by the +range-checking code in `gsl_vector_get'. + + $ ./a.out + v_0 = 1.23 + v_1 = 2.23 + v_2 = 3.23 + gsl: vector_source.c:12: ERROR: index out of range + Default GSL error handler invoked. + Aborted (core dumped) + +The next program shows how to write a vector to a file. + + #include + #include + + int + main (void) + { + int i; + gsl_vector * v = gsl_vector_alloc (100); + + for (i = 0; i < 100; i++) + { + gsl_vector_set (v, i, 1.23 + i); + } + + { + FILE * f = fopen ("test.dat", "w"); + gsl_vector_fprintf (f, v, "%.5g"); + fclose (f); + } + + gsl_vector_free (v); + return 0; + } + +After running this program the file `test.dat' should contain the +elements of `v', written using the format specifier `%.5g'. The vector +could then be read back in using the function `gsl_vector_fscanf (f, +v)' as follows: + + #include + #include + + int + main (void) + { + int i; + gsl_vector * v = gsl_vector_alloc (10); + + { + FILE * f = fopen ("test.dat", "r"); + gsl_vector_fscanf (f, v); + fclose (f); + } + + for (i = 0; i < 10; i++) + { + printf ("%g\n", gsl_vector_get(v, i)); + } + + gsl_vector_free (v); + return 0; + } + + +File: gsl-ref.info, Node: Matrices, Next: Vector and Matrix References and Further Reading, Prev: Vectors, Up: Vectors and Matrices + +8.4 Matrices +============ + +Matrices are defined by a `gsl_matrix' structure which describes a +generalized slice of a block. Like a vector it represents a set of +elements in an area of memory, but uses two indices instead of one. + + The `gsl_matrix' structure contains six components, the two +dimensions of the matrix, a physical dimension, a pointer to the memory +where the elements of the matrix are stored, DATA, a pointer to the +block owned by the matrix BLOCK, if any, and an ownership flag, OWNER. +The physical dimension determines the memory layout and can differ from +the matrix dimension to allow the use of submatrices. The `gsl_matrix' +structure is very simple and looks like this, + + typedef struct + { + size_t size1; + size_t size2; + size_t tda; + double * data; + gsl_block * block; + int owner; + } gsl_matrix; + +Matrices are stored in row-major order, meaning that each row of +elements forms a contiguous block in memory. This is the standard +"C-language ordering" of two-dimensional arrays. Note that FORTRAN +stores arrays in column-major order. The number of rows is SIZE1. The +range of valid row indices runs from 0 to `size1-1'. Similarly SIZE2 +is the number of columns. The range of valid column indices runs from +0 to `size2-1'. The physical row dimension TDA, or "trailing +dimension", specifies the size of a row of the matrix as laid out in +memory. + + For example, in the following matrix SIZE1 is 3, SIZE2 is 4, and TDA +is 8. The physical memory layout of the matrix begins in the top left +hand-corner and proceeds from left to right along each row in turn. + + 00 01 02 03 XX XX XX XX + 10 11 12 13 XX XX XX XX + 20 21 22 23 XX XX XX XX + +Each unused memory location is represented by "`XX'". The pointer DATA +gives the location of the first element of the matrix in memory. The +pointer BLOCK stores the location of the memory block in which the +elements of the matrix are located (if any). If the matrix owns this +block then the OWNER field is set to one and the block will be +deallocated when the matrix is freed. If the matrix is only a slice of +a block owned by another object then the OWNER field is zero and any +underlying block will not be freed. + + The functions for allocating and accessing matrices are defined in +`gsl_matrix.h' + +* Menu: + +* Matrix allocation:: +* Accessing matrix elements:: +* Initializing matrix elements:: +* Reading and writing matrices:: +* Matrix views:: +* Creating row and column views:: +* Copying matrices:: +* Copying rows and columns:: +* Exchanging rows and columns:: +* Matrix operations:: +* Finding maximum and minimum elements of matrices:: +* Matrix properties:: +* Example programs for matrices:: + + +File: gsl-ref.info, Node: Matrix allocation, Next: Accessing matrix elements, Up: Matrices + +8.4.1 Matrix allocation +----------------------- + +The functions for allocating memory to a matrix follow the style of +`malloc' and `free'. They also perform their own error checking. If +there is insufficient memory available to allocate a matrix then the +functions call the GSL error handler (with an error number of +`GSL_ENOMEM') in addition to returning a null pointer. Thus if you use +the library error handler to abort your program then it isn't necessary +to check every `alloc'. + + -- Function: gsl_matrix * gsl_matrix_alloc (size_t N1, size_t N2) + This function creates a matrix of size N1 rows by N2 columns, + returning a pointer to a newly initialized matrix struct. A new + block is allocated for the elements of the matrix, and stored in + the BLOCK component of the matrix struct. The block is "owned" by + the matrix, and will be deallocated when the matrix is deallocated. + + -- Function: gsl_matrix * gsl_matrix_calloc (size_t N1, size_t N2) + This function allocates memory for a matrix of size N1 rows by N2 + columns and initializes all the elements of the matrix to zero. + + -- Function: void gsl_matrix_free (gsl_matrix * M) + This function frees a previously allocated matrix M. If the + matrix was created using `gsl_matrix_alloc' then the block + underlying the matrix will also be deallocated. If the matrix has + been created from another object then the memory is still owned by + that object and will not be deallocated. The matrix M must be a + valid matrix object (a null pointer is not allowed). + + +File: gsl-ref.info, Node: Accessing matrix elements, Next: Initializing matrix elements, Prev: Matrix allocation, Up: Matrices + +8.4.2 Accessing matrix elements +------------------------------- + +The functions for accessing the elements of a matrix use the same range +checking system as vectors. You can turn off range checking by +recompiling your program with the preprocessor definition +`GSL_RANGE_CHECK_OFF'. + + The elements of the matrix are stored in "C-order", where the second +index moves continuously through memory. More precisely, the element +accessed by the function `gsl_matrix_get(m,i,j)' and +`gsl_matrix_set(m,i,j,x)' is + + m->data[i * m->tda + j] + +where TDA is the physical row-length of the matrix. + + -- Function: double gsl_matrix_get (const gsl_matrix * M, size_t I, + size_t J) + This function returns the (i,j)-th element of a matrix M. If I or + J lie outside the allowed range of 0 to N1-1 and 0 to N2-1 then + the error handler is invoked and 0 is returned. An inline version + of this function is used when `HAVE_INLINE' is defined. + + -- Function: void gsl_matrix_set (gsl_matrix * M, size_t I, size_t J, + double X) + This function sets the value of the (i,j)-th element of a matrix M + to X. If I or J lies outside the allowed range of 0 to N1-1 and 0 + to N2-1 then the error handler is invoked. An inline version of + this function is used when `HAVE_INLINE' is defined. + + -- Function: double * gsl_matrix_ptr (gsl_matrix * M, size_t I, size_t + J) + -- Function: const double * gsl_matrix_const_ptr (const gsl_matrix * + M, size_t I, size_t J) + These functions return a pointer to the (i,j)-th element of a + matrix M. If I or J lie outside the allowed range of 0 to N1-1 + and 0 to N2-1 then the error handler is invoked and a null pointer + is returned. Inline versions of these functions are used when + `HAVE_INLINE' is defined. + + +File: gsl-ref.info, Node: Initializing matrix elements, Next: Reading and writing matrices, Prev: Accessing matrix elements, Up: Matrices + +8.4.3 Initializing matrix elements +---------------------------------- + + -- Function: void gsl_matrix_set_all (gsl_matrix * M, double X) + This function sets all the elements of the matrix M to the value X. + + -- Function: void gsl_matrix_set_zero (gsl_matrix * M) + This function sets all the elements of the matrix M to zero. + + -- Function: void gsl_matrix_set_identity (gsl_matrix * M) + This function sets the elements of the matrix M to the + corresponding elements of the identity matrix, m(i,j) = + \delta(i,j), i.e. a unit diagonal with all off-diagonal elements + zero. This applies to both square and rectangular matrices. + + +File: gsl-ref.info, Node: Reading and writing matrices, Next: Matrix views, Prev: Initializing matrix elements, Up: Matrices + +8.4.4 Reading and writing matrices +---------------------------------- + +The library provides functions for reading and writing matrices to a +file as binary data or formatted text. + + -- Function: int gsl_matrix_fwrite (FILE * STREAM, const gsl_matrix * + M) + This function writes the elements of the matrix M to the stream + STREAM in binary format. The return value is 0 for success and + `GSL_EFAILED' if there was a problem writing to the file. Since + the data is written in the native binary format it may not be + portable between different architectures. + + -- Function: int gsl_matrix_fread (FILE * STREAM, gsl_matrix * M) + This function reads into the matrix M from the open stream STREAM + in binary format. The matrix M must be preallocated with the + correct dimensions since the function uses the size of M to + determine how many bytes to read. The return value is 0 for + success and `GSL_EFAILED' if there was a problem reading from the + file. The data is assumed to have been written in the native + binary format on the same architecture. + + -- Function: int gsl_matrix_fprintf (FILE * STREAM, const gsl_matrix * + M, const char * FORMAT) + This function writes the elements of the matrix M line-by-line to + the stream STREAM using the format specifier FORMAT, which should + be one of the `%g', `%e' or `%f' formats for floating point + numbers and `%d' for integers. The function returns 0 for success + and `GSL_EFAILED' if there was a problem writing to the file. + + -- Function: int gsl_matrix_fscanf (FILE * STREAM, gsl_matrix * M) + This function reads formatted data from the stream STREAM into the + matrix M. The matrix M must be preallocated with the correct + dimensions since the function uses the size of M to determine how + many numbers to read. The function returns 0 for success and + `GSL_EFAILED' if there was a problem reading from the file. + + +File: gsl-ref.info, Node: Matrix views, Next: Creating row and column views, Prev: Reading and writing matrices, Up: Matrices + +8.4.5 Matrix views +------------------ + +A matrix view is a temporary object, stored on the stack, which can be +used to operate on a subset of matrix elements. Matrix views can be +defined for both constant and non-constant matrices using separate types +that preserve constness. A matrix view has the type `gsl_matrix_view' +and a constant matrix view has the type `gsl_matrix_const_view'. In +both cases the elements of the view can by accessed using the `matrix' +component of the view object. A pointer `gsl_matrix *' or `const +gsl_matrix *' can be obtained by taking the address of the `matrix' +component with the `&' operator. In addition to matrix views it is +also possible to create vector views of a matrix, such as row or column +views. + + -- Function: gsl_matrix_view gsl_matrix_submatrix (gsl_matrix * M, + size_t K1, size_t K2, size_t N1, size_t N2) + -- Function: gsl_matrix_const_view gsl_matrix_const_submatrix (const + gsl_matrix * M, size_t K1, size_t K2, size_t N1, size_t N2) + These functions return a matrix view of a submatrix of the matrix + M. The upper-left element of the submatrix is the element (K1,K2) + of the original matrix. The submatrix has N1 rows and N2 columns. + The physical number of columns in memory given by TDA is + unchanged. Mathematically, the (i,j)-th element of the new matrix + is given by, + + m'(i,j) = m->data[(k1*m->tda + k2) + i*m->tda + j] + + where the index I runs from 0 to `n1-1' and the index J runs from + 0 to `n2-1'. + + The `data' pointer of the returned matrix struct is set to null if + the combined parameters (I,J,N1,N2,TDA) overrun the ends of the + original matrix. + + The new matrix view is only a view of the block underlying the + existing matrix, M. The block containing the elements of M is not + owned by the new matrix view. When the view goes out of scope the + original matrix M and its block will continue to exist. The + original memory can only be deallocated by freeing the original + matrix. Of course, the original matrix should not be deallocated + while the view is still in use. + + The function `gsl_matrix_const_submatrix' is equivalent to + `gsl_matrix_submatrix' but can be used for matrices which are + declared `const'. + + -- Function: gsl_matrix_view gsl_matrix_view_array (double * BASE, + size_t N1, size_t N2) + -- Function: gsl_matrix_const_view gsl_matrix_const_view_array (const + double * BASE, size_t N1, size_t N2) + These functions return a matrix view of the array BASE. The + matrix has N1 rows and N2 columns. The physical number of columns + in memory is also given by N2. Mathematically, the (i,j)-th + element of the new matrix is given by, + + m'(i,j) = base[i*n2 + j] + + where the index I runs from 0 to `n1-1' and the index J runs from + 0 to `n2-1'. + + The new matrix is only a view of the array BASE. When the view + goes out of scope the original array BASE will continue to exist. + The original memory can only be deallocated by freeing the original + array. Of course, the original array should not be deallocated + while the view is still in use. + + The function `gsl_matrix_const_view_array' is equivalent to + `gsl_matrix_view_array' but can be used for matrices which are + declared `const'. + + -- Function: gsl_matrix_view gsl_matrix_view_array_with_tda (double * + BASE, size_t N1, size_t N2, size_t TDA) + -- Function: gsl_matrix_const_view + gsl_matrix_const_view_array_with_tda (const double * BASE, + size_t N1, size_t N2, size_t TDA) + These functions return a matrix view of the array BASE with a + physical number of columns TDA which may differ from the + corresponding dimension of the matrix. The matrix has N1 rows and + N2 columns, and the physical number of columns in memory is given + by TDA. Mathematically, the (i,j)-th element of the new matrix is + given by, + + m'(i,j) = base[i*tda + j] + + where the index I runs from 0 to `n1-1' and the index J runs from + 0 to `n2-1'. + + The new matrix is only a view of the array BASE. When the view + goes out of scope the original array BASE will continue to exist. + The original memory can only be deallocated by freeing the original + array. Of course, the original array should not be deallocated + while the view is still in use. + + The function `gsl_matrix_const_view_array_with_tda' is equivalent + to `gsl_matrix_view_array_with_tda' but can be used for matrices + which are declared `const'. + + -- Function: gsl_matrix_view gsl_matrix_view_vector (gsl_vector * V, + size_t N1, size_t N2) + -- Function: gsl_matrix_const_view gsl_matrix_const_view_vector (const + gsl_vector * V, size_t N1, size_t N2) + These functions return a matrix view of the vector V. The matrix + has N1 rows and N2 columns. The vector must have unit stride. The + physical number of columns in memory is also given by N2. + Mathematically, the (i,j)-th element of the new matrix is given by, + + m'(i,j) = v->data[i*n2 + j] + + where the index I runs from 0 to `n1-1' and the index J runs from + 0 to `n2-1'. + + The new matrix is only a view of the vector V. When the view goes + out of scope the original vector V will continue to exist. The + original memory can only be deallocated by freeing the original + vector. Of course, the original vector should not be deallocated + while the view is still in use. + + The function `gsl_matrix_const_view_vector' is equivalent to + `gsl_matrix_view_vector' but can be used for matrices which are + declared `const'. + + -- Function: gsl_matrix_view gsl_matrix_view_vector_with_tda + (gsl_vector * V, size_t N1, size_t N2, size_t TDA) + -- Function: gsl_matrix_const_view +gsl_matrix_const_view_vector_with_tda (const gsl_vector * V, size_t N1, + size_t N2, size_t TDA) + These functions return a matrix view of the vector V with a + physical number of columns TDA which may differ from the + corresponding matrix dimension. The vector must have unit stride. + The matrix has N1 rows and N2 columns, and the physical number of + columns in memory is given by TDA. Mathematically, the (i,j)-th + element of the new matrix is given by, + + m'(i,j) = v->data[i*tda + j] + + where the index I runs from 0 to `n1-1' and the index J runs from + 0 to `n2-1'. + + The new matrix is only a view of the vector V. When the view goes + out of scope the original vector V will continue to exist. The + original memory can only be deallocated by freeing the original + vector. Of course, the original vector should not be deallocated + while the view is still in use. + + The function `gsl_matrix_const_view_vector_with_tda' is equivalent + to `gsl_matrix_view_vector_with_tda' but can be used for matrices + which are declared `const'. + + +File: gsl-ref.info, Node: Creating row and column views, Next: Copying matrices, Prev: Matrix views, Up: Matrices + +8.4.6 Creating row and column views +----------------------------------- + +In general there are two ways to access an object, by reference or by +copying. The functions described in this section create vector views +which allow access to a row or column of a matrix by reference. +Modifying elements of the view is equivalent to modifying the matrix, +since both the vector view and the matrix point to the same memory +block. + + -- Function: gsl_vector_view gsl_matrix_row (gsl_matrix * M, size_t I) + -- Function: gsl_vector_const_view gsl_matrix_const_row (const + gsl_matrix * M, size_t I) + These functions return a vector view of the I-th row of the matrix + M. The `data' pointer of the new vector is set to null if I is + out of range. + + The function `gsl_vector_const_row' is equivalent to + `gsl_matrix_row' but can be used for matrices which are declared + `const'. + + -- Function: gsl_vector_view gsl_matrix_column (gsl_matrix * M, size_t + J) + -- Function: gsl_vector_const_view gsl_matrix_const_column (const + gsl_matrix * M, size_t J) + These functions return a vector view of the J-th column of the + matrix M. The `data' pointer of the new vector is set to null if + J is out of range. + + The function `gsl_vector_const_column' is equivalent to + `gsl_matrix_column' but can be used for matrices which are declared + `const'. + + -- Function: gsl_vector_view gsl_matrix_subrow (gsl_matrix * M, size_t + I, size_t OFFSET, size_t N) + -- Function: gsl_vector_const_view gsl_matrix_const_subrow (const + gsl_matrix * M, size_t I, size_t OFFSET, size_t N) + These functions return a vector view of the I-th row of the matrix + M beginning at OFFSET elements past the first column and + containing N elements. The `data' pointer of the new vector is set + to null if I, OFFSET, or N are out of range. + + The function `gsl_vector_const_subrow' is equivalent to + `gsl_matrix_subrow' but can be used for matrices which are declared + `const'. + + -- Function: gsl_vector_view gsl_matrix_subcolumn (gsl_matrix * M, + size_t J, size_t OFFSET, size_t N) + -- Function: gsl_vector_const_view gsl_matrix_const_subcolumn (const + gsl_matrix * M, size_t J, size_t OFFSET, size_t N) + These functions return a vector view of the J-th column of the + matrix M beginning at OFFSET elements past the first row and + containing N elements. The `data' pointer of the new vector is set + to null if J, OFFSET, or N are out of range. + + The function `gsl_vector_const_subcolumn' is equivalent to + `gsl_matrix_subcolumn' but can be used for matrices which are + declared `const'. + + -- Function: gsl_vector_view gsl_matrix_diagonal (gsl_matrix * M) + -- Function: gsl_vector_const_view gsl_matrix_const_diagonal (const + gsl_matrix * M) + These functions return a vector view of the diagonal of the matrix + M. The matrix M is not required to be square. For a rectangular + matrix the length of the diagonal is the same as the smaller + dimension of the matrix. + + The function `gsl_matrix_const_diagonal' is equivalent to + `gsl_matrix_diagonal' but can be used for matrices which are + declared `const'. + + -- Function: gsl_vector_view gsl_matrix_subdiagonal (gsl_matrix * M, + size_t K) + -- Function: gsl_vector_const_view gsl_matrix_const_subdiagonal (const + gsl_matrix * M, size_t K) + These functions return a vector view of the K-th subdiagonal of + the matrix M. The matrix M is not required to be square. The + diagonal of the matrix corresponds to k = 0. + + The function `gsl_matrix_const_subdiagonal' is equivalent to + `gsl_matrix_subdiagonal' but can be used for matrices which are + declared `const'. + + -- Function: gsl_vector_view gsl_matrix_superdiagonal (gsl_matrix * M, + size_t K) + -- Function: gsl_vector_const_view gsl_matrix_const_superdiagonal + (const gsl_matrix * M, size_t K) + These functions return a vector view of the K-th superdiagonal of + the matrix M. The matrix M is not required to be square. The + diagonal of the matrix corresponds to k = 0. + + The function `gsl_matrix_const_superdiagonal' is equivalent to + `gsl_matrix_superdiagonal' but can be used for matrices which are + declared `const'. + + +File: gsl-ref.info, Node: Copying matrices, Next: Copying rows and columns, Prev: Creating row and column views, Up: Matrices + +8.4.7 Copying matrices +---------------------- + + -- Function: int gsl_matrix_memcpy (gsl_matrix * DEST, const + gsl_matrix * SRC) + This function copies the elements of the matrix SRC into the + matrix DEST. The two matrices must have the same size. + + -- Function: int gsl_matrix_swap (gsl_matrix * M1, gsl_matrix * M2) + This function exchanges the elements of the matrices M1 and M2 by + copying. The two matrices must have the same size. + + +File: gsl-ref.info, Node: Copying rows and columns, Next: Exchanging rows and columns, Prev: Copying matrices, Up: Matrices + +8.4.8 Copying rows and columns +------------------------------ + +The functions described in this section copy a row or column of a matrix +into a vector. This allows the elements of the vector and the matrix to +be modified independently. Note that if the matrix and the vector point +to overlapping regions of memory then the result will be undefined. The +same effect can be achieved with more generality using +`gsl_vector_memcpy' with vector views of rows and columns. + + -- Function: int gsl_matrix_get_row (gsl_vector * V, const gsl_matrix + * M, size_t I) + This function copies the elements of the I-th row of the matrix M + into the vector V. The length of the vector must be the same as + the length of the row. + + -- Function: int gsl_matrix_get_col (gsl_vector * V, const gsl_matrix + * M, size_t J) + This function copies the elements of the J-th column of the matrix + M into the vector V. The length of the vector must be the same as + the length of the column. + + -- Function: int gsl_matrix_set_row (gsl_matrix * M, size_t I, const + gsl_vector * V) + This function copies the elements of the vector V into the I-th + row of the matrix M. The length of the vector must be the same as + the length of the row. + + -- Function: int gsl_matrix_set_col (gsl_matrix * M, size_t J, const + gsl_vector * V) + This function copies the elements of the vector V into the J-th + column of the matrix M. The length of the vector must be the same + as the length of the column. + + +File: gsl-ref.info, Node: Exchanging rows and columns, Next: Matrix operations, Prev: Copying rows and columns, Up: Matrices + +8.4.9 Exchanging rows and columns +--------------------------------- + +The following functions can be used to exchange the rows and columns of +a matrix. + + -- Function: int gsl_matrix_swap_rows (gsl_matrix * M, size_t I, + size_t J) + This function exchanges the I-th and J-th rows of the matrix M + in-place. + + -- Function: int gsl_matrix_swap_columns (gsl_matrix * M, size_t I, + size_t J) + This function exchanges the I-th and J-th columns of the matrix M + in-place. + + -- Function: int gsl_matrix_swap_rowcol (gsl_matrix * M, size_t I, + size_t J) + This function exchanges the I-th row and J-th column of the matrix + M in-place. The matrix must be square for this operation to be + possible. + + -- Function: int gsl_matrix_transpose_memcpy (gsl_matrix * DEST, const + gsl_matrix * SRC) + This function makes the matrix DEST the transpose of the matrix + SRC by copying the elements of SRC into DEST. This function works + for all matrices provided that the dimensions of the matrix DEST + match the transposed dimensions of the matrix SRC. + + -- Function: int gsl_matrix_transpose (gsl_matrix * M) + This function replaces the matrix M by its transpose by copying + the elements of the matrix in-place. The matrix must be square + for this operation to be possible. + + +File: gsl-ref.info, Node: Matrix operations, Next: Finding maximum and minimum elements of matrices, Prev: Exchanging rows and columns, Up: Matrices + +8.4.10 Matrix operations +------------------------ + +The following operations are defined for real and complex matrices. + + -- Function: int gsl_matrix_add (gsl_matrix * A, const gsl_matrix * B) + This function adds the elements of matrix B to the elements of + matrix A. The result a(i,j) \leftarrow a(i,j) + b(i,j) is stored + in A and B remains unchanged. The two matrices must have the same + dimensions. + + -- Function: int gsl_matrix_sub (gsl_matrix * A, const gsl_matrix * B) + This function subtracts the elements of matrix B from the elements + of matrix A. The result a(i,j) \leftarrow a(i,j) - b(i,j) is + stored in A and B remains unchanged. The two matrices must have + the same dimensions. + + -- Function: int gsl_matrix_mul_elements (gsl_matrix * A, const + gsl_matrix * B) + This function multiplies the elements of matrix A by the elements + of matrix B. The result a(i,j) \leftarrow a(i,j) * b(i,j) is + stored in A and B remains unchanged. The two matrices must have + the same dimensions. + + -- Function: int gsl_matrix_div_elements (gsl_matrix * A, const + gsl_matrix * B) + This function divides the elements of matrix A by the elements of + matrix B. The result a(i,j) \leftarrow a(i,j) / b(i,j) is stored + in A and B remains unchanged. The two matrices must have the same + dimensions. + + -- Function: int gsl_matrix_scale (gsl_matrix * A, const double X) + This function multiplies the elements of matrix A by the constant + factor X. The result a(i,j) \leftarrow x a(i,j) is stored in A. + + -- Function: int gsl_matrix_add_constant (gsl_matrix * A, const double + X) + This function adds the constant value X to the elements of the + matrix A. The result a(i,j) \leftarrow a(i,j) + x is stored in A. + + +File: gsl-ref.info, Node: Finding maximum and minimum elements of matrices, Next: Matrix properties, Prev: Matrix operations, Up: Matrices + +8.4.11 Finding maximum and minimum elements of matrices +------------------------------------------------------- + +The following operations are only defined for real matrices. + + -- Function: double gsl_matrix_max (const gsl_matrix * M) + This function returns the maximum value in the matrix M. + + -- Function: double gsl_matrix_min (const gsl_matrix * M) + This function returns the minimum value in the matrix M. + + -- Function: void gsl_matrix_minmax (const gsl_matrix * M, double * + MIN_OUT, double * MAX_OUT) + This function returns the minimum and maximum values in the matrix + M, storing them in MIN_OUT and MAX_OUT. + + -- Function: void gsl_matrix_max_index (const gsl_matrix * M, size_t * + IMAX, size_t * JMAX) + This function returns the indices of the maximum value in the + matrix M, storing them in IMAX and JMAX. When there are several + equal maximum elements then the first element found is returned, + searching in row-major order. + + -- Function: void gsl_matrix_min_index (const gsl_matrix * M, size_t * + IMIN, size_t * JMIN) + This function returns the indices of the minimum value in the + matrix M, storing them in IMIN and JMIN. When there are several + equal minimum elements then the first element found is returned, + searching in row-major order. + + -- Function: void gsl_matrix_minmax_index (const gsl_matrix * M, + size_t * IMIN, size_t * JMIN, size_t * IMAX, size_t * JMAX) + This function returns the indices of the minimum and maximum + values in the matrix M, storing them in (IMIN,JMIN) and + (IMAX,JMAX). When there are several equal minimum or maximum + elements then the first elements found are returned, searching in + row-major order. + + +File: gsl-ref.info, Node: Matrix properties, Next: Example programs for matrices, Prev: Finding maximum and minimum elements of matrices, Up: Matrices + +8.4.12 Matrix properties +------------------------ + +The following functions are defined for real and complex matrices. For +complex matrices both the real and imaginary parts must satisfy the +conditions. + + -- Function: int gsl_matrix_isnull (const gsl_matrix * M) + -- Function: int gsl_matrix_ispos (const gsl_matrix * M) + -- Function: int gsl_matrix_isneg (const gsl_matrix * M) + -- Function: int gsl_matrix_isnonneg (const gsl_matrix * M) + These functions return 1 if all the elements of the matrix M are + zero, strictly positive, strictly negative, or non-negative + respectively, and 0 otherwise. To test whether a matrix is + positive-definite, use the Cholesky decomposition (*note Cholesky + Decomposition::). + + -- Function: int gsl_matrix_equal (const gsl_matrix * A, const + gsl_matrix * B) + This function returns 1 if the matrices A and B are equal (by + comparison of element values) and 0 otherwise. + + +File: gsl-ref.info, Node: Example programs for matrices, Prev: Matrix properties, Up: Matrices + +8.4.13 Example programs for matrices +------------------------------------ + +The program below shows how to allocate, initialize and read from a +matrix using the functions `gsl_matrix_alloc', `gsl_matrix_set' and +`gsl_matrix_get'. + + #include + #include + + int + main (void) + { + int i, j; + gsl_matrix * m = gsl_matrix_alloc (10, 3); + + for (i = 0; i < 10; i++) + for (j = 0; j < 3; j++) + gsl_matrix_set (m, i, j, 0.23 + 100*i + j); + + for (i = 0; i < 100; i++) /* OUT OF RANGE ERROR */ + for (j = 0; j < 3; j++) + printf ("m(%d,%d) = %g\n", i, j, + gsl_matrix_get (m, i, j)); + + gsl_matrix_free (m); + + return 0; + } + +Here is the output from the program. The final loop attempts to read +outside the range of the matrix `m', and the error is trapped by the +range-checking code in `gsl_matrix_get'. + + $ ./a.out + m(0,0) = 0.23 + m(0,1) = 1.23 + m(0,2) = 2.23 + m(1,0) = 100.23 + m(1,1) = 101.23 + m(1,2) = 102.23 + ... + m(9,2) = 902.23 + gsl: matrix_source.c:13: ERROR: first index out of range + Default GSL error handler invoked. + Aborted (core dumped) + +The next program shows how to write a matrix to a file. + + #include + #include + + int + main (void) + { + int i, j, k = 0; + gsl_matrix * m = gsl_matrix_alloc (100, 100); + gsl_matrix * a = gsl_matrix_alloc (100, 100); + + for (i = 0; i < 100; i++) + for (j = 0; j < 100; j++) + gsl_matrix_set (m, i, j, 0.23 + i + j); + + { + FILE * f = fopen ("test.dat", "wb"); + gsl_matrix_fwrite (f, m); + fclose (f); + } + + { + FILE * f = fopen ("test.dat", "rb"); + gsl_matrix_fread (f, a); + fclose (f); + } + + for (i = 0; i < 100; i++) + for (j = 0; j < 100; j++) + { + double mij = gsl_matrix_get (m, i, j); + double aij = gsl_matrix_get (a, i, j); + if (mij != aij) k++; + } + + gsl_matrix_free (m); + gsl_matrix_free (a); + + printf ("differences = %d (should be zero)\n", k); + return (k > 0); + } + +After running this program the file `test.dat' should contain the +elements of `m', written in binary format. The matrix which is read +back in using the function `gsl_matrix_fread' should be exactly equal +to the original matrix. + + The following program demonstrates the use of vector views. The +program computes the column norms of a matrix. + + #include + #include + #include + #include + + int + main (void) + { + size_t i,j; + + gsl_matrix *m = gsl_matrix_alloc (10, 10); + + for (i = 0; i < 10; i++) + for (j = 0; j < 10; j++) + gsl_matrix_set (m, i, j, sin (i) + cos (j)); + + for (j = 0; j < 10; j++) + { + gsl_vector_view column = gsl_matrix_column (m, j); + double d; + + d = gsl_blas_dnrm2 (&column.vector); + + printf ("matrix column %d, norm = %g\n", j, d); + } + + gsl_matrix_free (m); + + return 0; + } + +Here is the output of the program, + + $ ./a.out + matrix column 0, norm = 4.31461 + matrix column 1, norm = 3.1205 + matrix column 2, norm = 2.19316 + matrix column 3, norm = 3.26114 + matrix column 4, norm = 2.53416 + matrix column 5, norm = 2.57281 + matrix column 6, norm = 4.20469 + matrix column 7, norm = 3.65202 + matrix column 8, norm = 2.08524 + matrix column 9, norm = 3.07313 + +The results can be confirmed using GNU OCTAVE, + + $ octave + GNU Octave, version 2.0.16.92 + octave> m = sin(0:9)' * ones(1,10) + + ones(10,1) * cos(0:9); + octave> sqrt(sum(m.^2)) + ans = + 4.3146 3.1205 2.1932 3.2611 2.5342 2.5728 + 4.2047 3.6520 2.0852 3.0731 + + +File: gsl-ref.info, Node: Vector and Matrix References and Further Reading, Prev: Matrices, Up: Vectors and Matrices + +8.5 References and Further Reading +================================== + +The block, vector and matrix objects in GSL follow the `valarray' model +of C++. A description of this model can be found in the following +reference, + + B. Stroustrup, `The C++ Programming Language' (3rd Ed), Section + 22.4 Vector Arithmetic. Addison-Wesley 1997, ISBN 0-201-88954-4. + + +File: gsl-ref.info, Node: Permutations, Next: Combinations, Prev: Vectors and Matrices, Up: Top + +9 Permutations +************** + +This chapter describes functions for creating and manipulating +permutations. A permutation p is represented by an array of n integers +in the range 0 to n-1, where each value p_i occurs once and only once. +The application of a permutation p to a vector v yields a new vector v' +where v'_i = v_{p_i}. For example, the array (0,1,3,2) represents a +permutation which exchanges the last two elements of a four element +vector. The corresponding identity permutation is (0,1,2,3). + + Note that the permutations produced by the linear algebra routines +correspond to the exchange of matrix columns, and so should be +considered as applying to row-vectors in the form v' = v P rather than +column-vectors, when permuting the elements of a vector. + + The functions described in this chapter are defined in the header +file `gsl_permutation.h'. + +* Menu: + +* The Permutation struct:: +* Permutation allocation:: +* Accessing permutation elements:: +* Permutation properties:: +* Permutation functions:: +* Applying Permutations:: +* Reading and writing permutations:: +* Permutations in cyclic form:: +* Permutation Examples:: +* Permutation References and Further Reading:: + + +File: gsl-ref.info, Node: The Permutation struct, Next: Permutation allocation, Up: Permutations + +9.1 The Permutation struct +========================== + +A permutation is defined by a structure containing two components, the +size of the permutation and a pointer to the permutation array. The +elements of the permutation array are all of type `size_t'. The +`gsl_permutation' structure looks like this, + + typedef struct + { + size_t size; + size_t * data; + } gsl_permutation; + + + +File: gsl-ref.info, Node: Permutation allocation, Next: Accessing permutation elements, Prev: The Permutation struct, Up: Permutations + +9.2 Permutation allocation +========================== + + -- Function: gsl_permutation * gsl_permutation_alloc (size_t N) + This function allocates memory for a new permutation of size N. + The permutation is not initialized and its elements are undefined. + Use the function `gsl_permutation_calloc' if you want to create a + permutation which is initialized to the identity. A null pointer is + returned if insufficient memory is available to create the + permutation. + + -- Function: gsl_permutation * gsl_permutation_calloc (size_t N) + This function allocates memory for a new permutation of size N and + initializes it to the identity. A null pointer is returned if + insufficient memory is available to create the permutation. + + -- Function: void gsl_permutation_init (gsl_permutation * P) + This function initializes the permutation P to the identity, i.e. + (0,1,2,...,n-1). + + -- Function: void gsl_permutation_free (gsl_permutation * P) + This function frees all the memory used by the permutation P. + + -- Function: int gsl_permutation_memcpy (gsl_permutation * DEST, const + gsl_permutation * SRC) + This function copies the elements of the permutation SRC into the + permutation DEST. The two permutations must have the same size. + + +File: gsl-ref.info, Node: Accessing permutation elements, Next: Permutation properties, Prev: Permutation allocation, Up: Permutations + +9.3 Accessing permutation elements +================================== + +The following functions can be used to access and manipulate +permutations. + + -- Function: size_t gsl_permutation_get (const gsl_permutation * P, + const size_t I) + This function returns the value of the I-th element of the + permutation P. If I lies outside the allowed range of 0 to N-1 + then the error handler is invoked and 0 is returned. An inline + version of this function is used when `HAVE_INLINE' is defined. + + -- Function: int gsl_permutation_swap (gsl_permutation * P, const + size_t I, const size_t J) + This function exchanges the I-th and J-th elements of the + permutation P. + + +File: gsl-ref.info, Node: Permutation properties, Next: Permutation functions, Prev: Accessing permutation elements, Up: Permutations + +9.4 Permutation properties +========================== + + -- Function: size_t gsl_permutation_size (const gsl_permutation * P) + This function returns the size of the permutation P. + + -- Function: size_t * gsl_permutation_data (const gsl_permutation * P) + This function returns a pointer to the array of elements in the + permutation P. + + -- Function: int gsl_permutation_valid (const gsl_permutation * P) + This function checks that the permutation P is valid. The N + elements should contain each of the numbers 0 to N-1 once and only + once. + + +File: gsl-ref.info, Node: Permutation functions, Next: Applying Permutations, Prev: Permutation properties, Up: Permutations + +9.5 Permutation functions +========================= + + -- Function: void gsl_permutation_reverse (gsl_permutation * P) + This function reverses the elements of the permutation P. + + -- Function: int gsl_permutation_inverse (gsl_permutation * INV, const + gsl_permutation * P) + This function computes the inverse of the permutation P, storing + the result in INV. + + -- Function: int gsl_permutation_next (gsl_permutation * P) + This function advances the permutation P to the next permutation + in lexicographic order and returns `GSL_SUCCESS'. If no further + permutations are available it returns `GSL_FAILURE' and leaves P + unmodified. Starting with the identity permutation and repeatedly + applying this function will iterate through all possible + permutations of a given order. + + -- Function: int gsl_permutation_prev (gsl_permutation * P) + This function steps backwards from the permutation P to the + previous permutation in lexicographic order, returning + `GSL_SUCCESS'. If no previous permutation is available it returns + `GSL_FAILURE' and leaves P unmodified. + + +File: gsl-ref.info, Node: Applying Permutations, Next: Reading and writing permutations, Prev: Permutation functions, Up: Permutations + +9.6 Applying Permutations +========================= + + -- Function: int gsl_permute (const size_t * P, double * DATA, size_t + STRIDE, size_t N) + This function applies the permutation P to the array DATA of size + N with stride STRIDE. + + -- Function: int gsl_permute_inverse (const size_t * P, double * DATA, + size_t STRIDE, size_t N) + This function applies the inverse of the permutation P to the + array DATA of size N with stride STRIDE. + + -- Function: int gsl_permute_vector (const gsl_permutation * P, + gsl_vector * V) + This function applies the permutation P to the elements of the + vector V, considered as a row-vector acted on by a permutation + matrix from the right, v' = v P. The j-th column of the + permutation matrix P is given by the P_j-th column of the identity + matrix. The permutation P and the vector V must have the same + length. + + -- Function: int gsl_permute_vector_inverse (const gsl_permutation * + P, gsl_vector * V) + This function applies the inverse of the permutation P to the + elements of the vector V, considered as a row-vector acted on by + an inverse permutation matrix from the right, v' = v P^T. Note + that for permutation matrices the inverse is the same as the + transpose. The j-th column of the permutation matrix P is given by + the P_j-th column of the identity matrix. The permutation P and + the vector V must have the same length. + + -- Function: int gsl_permutation_mul (gsl_permutation * P, const + gsl_permutation * PA, const gsl_permutation * PB) + This function combines the two permutations PA and PB into a + single permutation P, where P = PA * PB. The permutation P is + equivalent to applying PB first and then PA. + + +File: gsl-ref.info, Node: Reading and writing permutations, Next: Permutations in cyclic form, Prev: Applying Permutations, Up: Permutations + +9.7 Reading and writing permutations +==================================== + +The library provides functions for reading and writing permutations to a +file as binary data or formatted text. + + -- Function: int gsl_permutation_fwrite (FILE * STREAM, const + gsl_permutation * P) + This function writes the elements of the permutation P to the + stream STREAM in binary format. The function returns + `GSL_EFAILED' if there was a problem writing to the file. Since + the data is written in the native binary format it may not be + portable between different architectures. + + -- Function: int gsl_permutation_fread (FILE * STREAM, gsl_permutation + * P) + This function reads into the permutation P from the open stream + STREAM in binary format. The permutation P must be preallocated + with the correct length since the function uses the size of P to + determine how many bytes to read. The function returns + `GSL_EFAILED' if there was a problem reading from the file. The + data is assumed to have been written in the native binary format + on the same architecture. + + -- Function: int gsl_permutation_fprintf (FILE * STREAM, const + gsl_permutation * P, const char * FORMAT) + This function writes the elements of the permutation P + line-by-line to the stream STREAM using the format specifier + FORMAT, which should be suitable for a type of SIZE_T. In ISO C99 + the type modifier `z' represents `size_t', so `"%zu\n"' is a + suitable format.(1) The function returns `GSL_EFAILED' if there + was a problem writing to the file. + + -- Function: int gsl_permutation_fscanf (FILE * STREAM, + gsl_permutation * P) + This function reads formatted data from the stream STREAM into the + permutation P. The permutation P must be preallocated with the + correct length since the function uses the size of P to determine + how many numbers to read. The function returns `GSL_EFAILED' if + there was a problem reading from the file. + + ---------- Footnotes ---------- + + (1) In versions of the GNU C library prior to the ISO C99 standard, +the type modifier `Z' was used instead. + + +File: gsl-ref.info, Node: Permutations in cyclic form, Next: Permutation Examples, Prev: Reading and writing permutations, Up: Permutations + +9.8 Permutations in cyclic form +=============================== + +A permutation can be represented in both "linear" and "cyclic" +notations. The functions described in this section convert between the +two forms. The linear notation is an index mapping, and has already +been described above. The cyclic notation expresses a permutation as a +series of circular rearrangements of groups of elements, or "cycles". + + For example, under the cycle (1 2 3), 1 is replaced by 2, 2 is +replaced by 3 and 3 is replaced by 1 in a circular fashion. Cycles of +different sets of elements can be combined independently, for example +(1 2 3) (4 5) combines the cycle (1 2 3) with the cycle (4 5), which is +an exchange of elements 4 and 5. A cycle of length one represents an +element which is unchanged by the permutation and is referred to as a +"singleton". + + It can be shown that every permutation can be decomposed into +combinations of cycles. The decomposition is not unique, but can always +be rearranged into a standard "canonical form" by a reordering of +elements. The library uses the canonical form defined in Knuth's `Art +of Computer Programming' (Vol 1, 3rd Ed, 1997) Section 1.3.3, p.178. + + The procedure for obtaining the canonical form given by Knuth is, + + 1. Write all singleton cycles explicitly + + 2. Within each cycle, put the smallest number first + + 3. Order the cycles in decreasing order of the first number in the + cycle. + +For example, the linear representation (2 4 3 0 1) is represented as (1 +4) (0 2 3) in canonical form. The permutation corresponds to an +exchange of elements 1 and 4, and rotation of elements 0, 2 and 3. + + The important property of the canonical form is that it can be +reconstructed from the contents of each cycle without the brackets. In +addition, by removing the brackets it can be considered as a linear +representation of a different permutation. In the example given above +the permutation (2 4 3 0 1) would become (1 4 0 2 3). This mapping has +many applications in the theory of permutations. + + -- Function: int gsl_permutation_linear_to_canonical (gsl_permutation + * Q, const gsl_permutation * P) + This function computes the canonical form of the permutation P and + stores it in the output argument Q. + + -- Function: int gsl_permutation_canonical_to_linear (gsl_permutation + * P, const gsl_permutation * Q) + This function converts a permutation Q in canonical form back into + linear form storing it in the output argument P. + + -- Function: size_t gsl_permutation_inversions (const gsl_permutation + * P) + This function counts the number of inversions in the permutation + P. An inversion is any pair of elements that are not in order. + For example, the permutation 2031 has three inversions, + corresponding to the pairs (2,0) (2,1) and (3,1). The identity + permutation has no inversions. + + -- Function: size_t gsl_permutation_linear_cycles (const + gsl_permutation * P) + This function counts the number of cycles in the permutation P, + given in linear form. + + -- Function: size_t gsl_permutation_canonical_cycles (const + gsl_permutation * Q) + This function counts the number of cycles in the permutation Q, + given in canonical form. + + +File: gsl-ref.info, Node: Permutation Examples, Next: Permutation References and Further Reading, Prev: Permutations in cyclic form, Up: Permutations + +9.9 Examples +============ + +The example program below creates a random permutation (by shuffling the +elements of the identity) and finds its inverse. + + #include + #include + #include + #include + + int + main (void) + { + const size_t N = 10; + const gsl_rng_type * T; + gsl_rng * r; + + gsl_permutation * p = gsl_permutation_alloc (N); + gsl_permutation * q = gsl_permutation_alloc (N); + + gsl_rng_env_setup(); + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("initial permutation:"); + gsl_permutation_init (p); + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + + printf (" random permutation:"); + gsl_ran_shuffle (r, p->data, N, sizeof(size_t)); + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + + printf ("inverse permutation:"); + gsl_permutation_inverse (q, p); + gsl_permutation_fprintf (stdout, q, " %u"); + printf ("\n"); + + gsl_permutation_free (p); + gsl_permutation_free (q); + gsl_rng_free (r); + + return 0; + } + +Here is the output from the program, + + $ ./a.out + initial permutation: 0 1 2 3 4 5 6 7 8 9 + random permutation: 1 3 5 2 7 6 0 4 9 8 + inverse permutation: 6 0 3 1 7 2 5 4 9 8 + +The random permutation `p[i]' and its inverse `q[i]' are related +through the identity `p[q[i]] = i', which can be verified from the +output. + + The next example program steps forwards through all possible third +order permutations, starting from the identity, + + #include + #include + + int + main (void) + { + gsl_permutation * p = gsl_permutation_alloc (3); + + gsl_permutation_init (p); + + do + { + gsl_permutation_fprintf (stdout, p, " %u"); + printf ("\n"); + } + while (gsl_permutation_next(p) == GSL_SUCCESS); + + gsl_permutation_free (p); + + return 0; + } + +Here is the output from the program, + + $ ./a.out + 0 1 2 + 0 2 1 + 1 0 2 + 1 2 0 + 2 0 1 + 2 1 0 + +The permutations are generated in lexicographic order. To reverse the +sequence, begin with the final permutation (which is the reverse of the +identity) and replace `gsl_permutation_next' with +`gsl_permutation_prev'. + + +File: gsl-ref.info, Node: Permutation References and Further Reading, Prev: Permutation Examples, Up: Permutations + +9.10 References and Further Reading +=================================== + +The subject of permutations is covered extensively in Knuth's `Sorting +and Searching', + + Donald E. Knuth, `The Art of Computer Programming: Sorting and + Searching' (Vol 3, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. + +For the definition of the "canonical form" see, + + Donald E. Knuth, `The Art of Computer Programming: Fundamental + Algorithms' (Vol 1, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. + Section 1.3.3, `An Unusual Correspondence', p.178-179. + + +File: gsl-ref.info, Node: Combinations, Next: Multisets, Prev: Permutations, Up: Top + +10 Combinations +*************** + +This chapter describes functions for creating and manipulating +combinations. A combination c is represented by an array of k integers +in the range 0 to n-1, where each value c_i occurs at most once. The +combination c corresponds to indices of k elements chosen from an n +element vector. Combinations are useful for iterating over all +k-element subsets of a set. + + The functions described in this chapter are defined in the header +file `gsl_combination.h'. + +* Menu: + +* The Combination struct:: +* Combination allocation:: +* Accessing combination elements:: +* Combination properties:: +* Combination functions:: +* Reading and writing combinations:: +* Combination Examples:: +* Combination References and Further Reading:: + + +File: gsl-ref.info, Node: The Combination struct, Next: Combination allocation, Up: Combinations + +10.1 The Combination struct +=========================== + +A combination is defined by a structure containing three components, the +values of n and k, and a pointer to the combination array. The +elements of the combination array are all of type `size_t', and are +stored in increasing order. The `gsl_combination' structure looks like +this, + + typedef struct + { + size_t n; + size_t k; + size_t *data; + } gsl_combination; + + + +File: gsl-ref.info, Node: Combination allocation, Next: Accessing combination elements, Prev: The Combination struct, Up: Combinations + +10.2 Combination allocation +=========================== + + -- Function: gsl_combination * gsl_combination_alloc (size_t N, size_t + K) + This function allocates memory for a new combination with + parameters N, K. The combination is not initialized and its + elements are undefined. Use the function `gsl_combination_calloc' + if you want to create a combination which is initialized to the + lexicographically first combination. A null pointer is returned if + insufficient memory is available to create the combination. + + -- Function: gsl_combination * gsl_combination_calloc (size_t N, + size_t K) + This function allocates memory for a new combination with + parameters N, K and initializes it to the lexicographically first + combination. A null pointer is returned if insufficient memory is + available to create the combination. + + -- Function: void gsl_combination_init_first (gsl_combination * C) + This function initializes the combination C to the + lexicographically first combination, i.e. (0,1,2,...,k-1). + + -- Function: void gsl_combination_init_last (gsl_combination * C) + This function initializes the combination C to the + lexicographically last combination, i.e. (n-k,n-k+1,...,n-1). + + -- Function: void gsl_combination_free (gsl_combination * C) + This function frees all the memory used by the combination C. + + -- Function: int gsl_combination_memcpy (gsl_combination * DEST, const + gsl_combination * SRC) + This function copies the elements of the combination SRC into the + combination DEST. The two combinations must have the same size. + + +File: gsl-ref.info, Node: Accessing combination elements, Next: Combination properties, Prev: Combination allocation, Up: Combinations + +10.3 Accessing combination elements +=================================== + +The following function can be used to access the elements of a +combination. + + -- Function: size_t gsl_combination_get (const gsl_combination * C, + const size_t I) + This function returns the value of the I-th element of the + combination C. If I lies outside the allowed range of 0 to K-1 + then the error handler is invoked and 0 is returned. An inline + version of this function is used when `HAVE_INLINE' is defined. + + +File: gsl-ref.info, Node: Combination properties, Next: Combination functions, Prev: Accessing combination elements, Up: Combinations + +10.4 Combination properties +=========================== + + -- Function: size_t gsl_combination_n (const gsl_combination * C) + This function returns the range (n) of the combination C. + + -- Function: size_t gsl_combination_k (const gsl_combination * C) + This function returns the number of elements (k) in the + combination C. + + -- Function: size_t * gsl_combination_data (const gsl_combination * C) + This function returns a pointer to the array of elements in the + combination C. + + -- Function: int gsl_combination_valid (gsl_combination * C) + This function checks that the combination C is valid. The K + elements should lie in the range 0 to N-1, with each value + occurring once at most and in increasing order. + + +File: gsl-ref.info, Node: Combination functions, Next: Reading and writing combinations, Prev: Combination properties, Up: Combinations + +10.5 Combination functions +========================== + + -- Function: int gsl_combination_next (gsl_combination * C) + This function advances the combination C to the next combination + in lexicographic order and returns `GSL_SUCCESS'. If no further + combinations are available it returns `GSL_FAILURE' and leaves C + unmodified. Starting with the first combination and repeatedly + applying this function will iterate through all possible + combinations of a given order. + + -- Function: int gsl_combination_prev (gsl_combination * C) + This function steps backwards from the combination C to the + previous combination in lexicographic order, returning + `GSL_SUCCESS'. If no previous combination is available it returns + `GSL_FAILURE' and leaves C unmodified. + + +File: gsl-ref.info, Node: Reading and writing combinations, Next: Combination Examples, Prev: Combination functions, Up: Combinations + +10.6 Reading and writing combinations +===================================== + +The library provides functions for reading and writing combinations to a +file as binary data or formatted text. + + -- Function: int gsl_combination_fwrite (FILE * STREAM, const + gsl_combination * C) + This function writes the elements of the combination C to the + stream STREAM in binary format. The function returns + `GSL_EFAILED' if there was a problem writing to the file. Since + the data is written in the native binary format it may not be + portable between different architectures. + + -- Function: int gsl_combination_fread (FILE * STREAM, gsl_combination + * C) + This function reads elements from the open stream STREAM into the + combination C in binary format. The combination C must be + preallocated with correct values of n and k since the function + uses the size of C to determine how many bytes to read. The + function returns `GSL_EFAILED' if there was a problem reading from + the file. The data is assumed to have been written in the native + binary format on the same architecture. + + -- Function: int gsl_combination_fprintf (FILE * STREAM, const + gsl_combination * C, const char * FORMAT) + This function writes the elements of the combination C + line-by-line to the stream STREAM using the format specifier + FORMAT, which should be suitable for a type of SIZE_T. In ISO C99 + the type modifier `z' represents `size_t', so `"%zu\n"' is a + suitable format.(1) The function returns `GSL_EFAILED' if there + was a problem writing to the file. + + -- Function: int gsl_combination_fscanf (FILE * STREAM, + gsl_combination * C) + This function reads formatted data from the stream STREAM into the + combination C. The combination C must be preallocated with + correct values of n and k since the function uses the size of C to + determine how many numbers to read. The function returns + `GSL_EFAILED' if there was a problem reading from the file. + + ---------- Footnotes ---------- + + (1) In versions of the GNU C library prior to the ISO C99 standard, +the type modifier `Z' was used instead. + diff --git a/software/gsl-1.15/doc/gsl-ref.info-2 b/software/gsl-1.15/doc/gsl-ref.info-2 new file mode 100644 index 000000000..c3743f322 --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.info-2 @@ -0,0 +1,7031 @@ +This is gsl-ref.info, produced by makeinfo version 4.13 from +gsl-ref.texi. + +INFO-DIR-SECTION Software libraries +START-INFO-DIR-ENTRY +* gsl-ref: (gsl-ref). GNU Scientific Library - Reference +END-INFO-DIR-ENTRY + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +File: gsl-ref.info, Node: Combination Examples, Next: Combination References and Further Reading, Prev: Reading and writing combinations, Up: Combinations + +10.7 Examples +============= + +The example program below prints all subsets of the set {0,1,2,3} +ordered by size. Subsets of the same size are ordered +lexicographically. + + #include + #include + + int + main (void) + { + gsl_combination * c; + size_t i; + + printf ("All subsets of {0,1,2,3} by size:\n") ; + for (i = 0; i <= 4; i++) + { + c = gsl_combination_calloc (4, i); + do + { + printf ("{"); + gsl_combination_fprintf (stdout, c, " %u"); + printf (" }\n"); + } + while (gsl_combination_next (c) == GSL_SUCCESS); + gsl_combination_free (c); + } + + return 0; + } + +Here is the output from the program, + + $ ./a.out + All subsets of {0,1,2,3} by size: + { } + { 0 } + { 1 } + { 2 } + { 3 } + { 0 1 } + { 0 2 } + { 0 3 } + { 1 2 } + { 1 3 } + { 2 3 } + { 0 1 2 } + { 0 1 3 } + { 0 2 3 } + { 1 2 3 } + { 0 1 2 3 } + +All 16 subsets are generated, and the subsets of each size are sorted +lexicographically. + + +File: gsl-ref.info, Node: Combination References and Further Reading, Prev: Combination Examples, Up: Combinations + +10.8 References and Further Reading +=================================== + +Further information on combinations can be found in, + + Donald L. Kreher, Douglas R. Stinson, `Combinatorial Algorithms: + Generation, Enumeration and Search', 1998, CRC Press LLC, ISBN + 084933988X + + + +File: gsl-ref.info, Node: Multisets, Next: Sorting, Prev: Combinations, Up: Top + +11 Multisets +************ + +This chapter describes functions for creating and manipulating +multisets. A multiset c is represented by an array of k integers in the +range 0 to n-1, where each value c_i may occur more than once. The +multiset c corresponds to indices of k elements chosen from an n +element vector with replacement. In mathematical terms, n is the +cardinality of the multiset while k is the maximum multiplicity of any +value. Multisets are useful, for example, when iterating over the +indices of a k-th order symmetric tensor in n-space. + + The functions described in this chapter are defined in the header +file `gsl_multiset.h'. + +* Menu: + +* The Multiset struct:: +* Multiset allocation:: +* Accessing multiset elements:: +* Multiset properties:: +* Multiset functions:: +* Reading and writing multisets:: +* Multiset Examples:: + + +File: gsl-ref.info, Node: The Multiset struct, Next: Multiset allocation, Up: Multisets + +11.1 The Multiset struct +======================== + +A multiset is defined by a structure containing three components, the +values of n and k, and a pointer to the multiset array. The elements +of the multiset array are all of type `size_t', and are stored in +increasing order. The `gsl_multiset' structure looks like this, + + typedef struct + { + size_t n; + size_t k; + size_t *data; + } gsl_multiset; + + + +File: gsl-ref.info, Node: Multiset allocation, Next: Accessing multiset elements, Prev: The Multiset struct, Up: Multisets + +11.2 Multiset allocation +======================== + + -- Function: gsl_multiset * gsl_multiset_alloc (size_t N, size_t K) + This function allocates memory for a new multiset with parameters + N, K. The multiset is not initialized and its elements are + undefined. Use the function `gsl_multiset_calloc' if you want to + create a multiset which is initialized to the lexicographically + first multiset element. A null pointer is returned if insufficient + memory is available to create the multiset. + + -- Function: gsl_multiset * gsl_multiset_calloc (size_t N, size_t K) + This function allocates memory for a new multiset with parameters + N, K and initializes it to the lexicographically first multiset + element. A null pointer is returned if insufficient memory is + available to create the multiset. + + -- Function: void gsl_multiset_init_first (gsl_multiset * C) + This function initializes the multiset C to the lexicographically + first multiset element, i.e. 0 repeated k times. + + -- Function: void gsl_multiset_init_last (gsl_multiset * C) + This function initializes the multiset C to the lexicographically + last multiset element, i.e. n-1 repeated k times. + + -- Function: void gsl_multiset_free (gsl_multiset * C) + This function frees all the memory used by the multiset C. + + -- Function: int gsl_multiset_memcpy (gsl_multiset * DEST, const + gsl_multiset * SRC) + This function copies the elements of the multiset SRC into the + multiset DEST. The two multisets must have the same size. + + +File: gsl-ref.info, Node: Accessing multiset elements, Next: Multiset properties, Prev: Multiset allocation, Up: Multisets + +11.3 Accessing multiset elements +================================ + +The following function can be used to access the elements of a multiset. + + -- Function: size_t gsl_multiset_get (const gsl_multiset * C, const + size_t I) + This function returns the value of the I-th element of the + multiset C. If I lies outside the allowed range of 0 to K-1 then + the error handler is invoked and 0 is returned. An inline version + of this function is used when `HAVE_INLINE' is defined. + + +File: gsl-ref.info, Node: Multiset properties, Next: Multiset functions, Prev: Accessing multiset elements, Up: Multisets + +11.4 Multiset properties +======================== + + -- Function: size_t gsl_multiset_n (const gsl_multiset * C) + This function returns the range (n) of the multiset C. + + -- Function: size_t gsl_multiset_k (const gsl_multiset * C) + This function returns the number of elements (k) in the multiset C. + + -- Function: size_t * gsl_multiset_data (const gsl_multiset * C) + This function returns a pointer to the array of elements in the + multiset C. + + -- Function: int gsl_multiset_valid (gsl_multiset * C) + This function checks that the multiset C is valid. The K elements + should lie in the range 0 to N-1, with each value occurring in + nondecreasing order. + + +File: gsl-ref.info, Node: Multiset functions, Next: Reading and writing multisets, Prev: Multiset properties, Up: Multisets + +11.5 Multiset functions +======================= + + -- Function: int gsl_multiset_next (gsl_multiset * C) + This function advances the multiset C to the next multiset element + in lexicographic order and returns `GSL_SUCCESS'. If no further + multisets elements are available it returns `GSL_FAILURE' and + leaves C unmodified. Starting with the first multiset and + repeatedly applying this function will iterate through all + possible multisets of a given order. + + -- Function: int gsl_multiset_prev (gsl_multiset * C) + This function steps backwards from the multiset C to the previous + multiset element in lexicographic order, returning `GSL_SUCCESS'. + If no previous multiset is available it returns `GSL_FAILURE' and + leaves C unmodified. + + +File: gsl-ref.info, Node: Reading and writing multisets, Next: Multiset Examples, Prev: Multiset functions, Up: Multisets + +11.6 Reading and writing multisets +================================== + +The library provides functions for reading and writing multisets to a +file as binary data or formatted text. + + -- Function: int gsl_multiset_fwrite (FILE * STREAM, const + gsl_multiset * C) + This function writes the elements of the multiset C to the stream + STREAM in binary format. The function returns `GSL_EFAILED' if + there was a problem writing to the file. Since the data is + written in the native binary format it may not be portable between + different architectures. + + -- Function: int gsl_multiset_fread (FILE * STREAM, gsl_multiset * C) + This function reads elements from the open stream STREAM into the + multiset C in binary format. The multiset C must be preallocated + with correct values of n and k since the function uses the size of + C to determine how many bytes to read. The function returns + `GSL_EFAILED' if there was a problem reading from the file. The + data is assumed to have been written in the native binary format + on the same architecture. + + -- Function: int gsl_multiset_fprintf (FILE * STREAM, const + gsl_multiset * C, const char * FORMAT) + This function writes the elements of the multiset C line-by-line + to the stream STREAM using the format specifier FORMAT, which + should be suitable for a type of SIZE_T. In ISO C99 the type + modifier `z' represents `size_t', so `"%zu\n"' is a suitable + format.(1) The function returns `GSL_EFAILED' if there was a + problem writing to the file. + + -- Function: int gsl_multiset_fscanf (FILE * STREAM, gsl_multiset * C) + This function reads formatted data from the stream STREAM into the + multiset C. The multiset C must be preallocated with correct + values of n and k since the function uses the size of C to + determine how many numbers to read. The function returns + `GSL_EFAILED' if there was a problem reading from the file. + + ---------- Footnotes ---------- + + (1) In versions of the GNU C library prior to the ISO C99 standard, +the type modifier `Z' was used instead. + + +File: gsl-ref.info, Node: Multiset Examples, Prev: Reading and writing multisets, Up: Multisets + +11.7 Examples +============= + +The example program below prints all multisets elements containing the +values {0,1,2,3} ordered by size. Multiset elements of the same size +are ordered lexicographically. + + #include + #include + + int + main (void) + { + gsl_multiset * c; + size_t i; + + printf ("All multisets of {0,1,2,3} by size:\n") ; + for (i = 0; i <= 4; i++) + { + c = gsl_multiset_calloc (4, i); + do + { + printf ("{"); + gsl_multiset_fprintf (stdout, c, " %u"); + printf (" }\n"); + } + while (gsl_multiset_next (c) == GSL_SUCCESS); + gsl_multiset_free (c); + } + + return 0; + } + +Here is the output from the program, + + $ ./a.out + all multisets of {0,1,2,3} by size: + { } + { 0 } + { 1 } + { 2 } + { 3 } + { 0 0 } + { 0 1 } + { 0 2 } + { 0 3 } + { 1 1 } + { 1 2 } + { 1 3 } + { 2 2 } + { 2 3 } + { 3 3 } + { 0 0 0 } + { 0 0 1 } + { 0 0 2 } + { 0 0 3 } + { 0 1 1 } + { 0 1 2 } + { 0 1 3 } + { 0 2 2 } + { 0 2 3 } + { 0 3 3 } + { 1 1 1 } + { 1 1 2 } + { 1 1 3 } + { 1 2 2 } + { 1 2 3 } + { 1 3 3 } + { 2 2 2 } + { 2 2 3 } + { 2 3 3 } + { 3 3 3 } + { 0 0 0 0 } + { 0 0 0 1 } + { 0 0 0 2 } + { 0 0 0 3 } + { 0 0 1 1 } + { 0 0 1 2 } + { 0 0 1 3 } + { 0 0 2 2 } + { 0 0 2 3 } + { 0 0 3 3 } + { 0 1 1 1 } + { 0 1 1 2 } + { 0 1 1 3 } + { 0 1 2 2 } + { 0 1 2 3 } + { 0 1 3 3 } + { 0 2 2 2 } + { 0 2 2 3 } + { 0 2 3 3 } + { 0 3 3 3 } + { 1 1 1 1 } + { 1 1 1 2 } + { 1 1 1 3 } + { 1 1 2 2 } + { 1 1 2 3 } + { 1 1 3 3 } + { 1 2 2 2 } + { 1 2 2 3 } + { 1 2 3 3 } + { 1 3 3 3 } + { 2 2 2 2 } + { 2 2 2 3 } + { 2 2 3 3 } + { 2 3 3 3 } + { 3 3 3 3 } + +All 70 multisets are generated and sorted lexicographically. + + +File: gsl-ref.info, Node: Sorting, Next: BLAS Support, Prev: Multisets, Up: Top + +12 Sorting +********** + +This chapter describes functions for sorting data, both directly and +indirectly (using an index). All the functions use the "heapsort" +algorithm. Heapsort is an O(N \log N) algorithm which operates +in-place and does not require any additional storage. It also provides +consistent performance, the running time for its worst-case (ordered +data) being not significantly longer than the average and best cases. +Note that the heapsort algorithm does not preserve the relative ordering +of equal elements--it is an "unstable" sort. However the resulting +order of equal elements will be consistent across different platforms +when using these functions. + +* Menu: + +* Sorting objects:: +* Sorting vectors:: +* Selecting the k smallest or largest elements:: +* Computing the rank:: +* Sorting Examples:: +* Sorting References and Further Reading:: + + +File: gsl-ref.info, Node: Sorting objects, Next: Sorting vectors, Up: Sorting + +12.1 Sorting objects +==================== + +The following function provides a simple alternative to the standard +library function `qsort'. It is intended for systems lacking `qsort', +not as a replacement for it. The function `qsort' should be used +whenever possible, as it will be faster and can provide stable ordering +of equal elements. Documentation for `qsort' is available in the `GNU +C Library Reference Manual'. + + The functions described in this section are defined in the header +file `gsl_heapsort.h'. + + -- Function: void gsl_heapsort (void * ARRAY, size_t COUNT, size_t + SIZE, gsl_comparison_fn_t COMPARE) + This function sorts the COUNT elements of the array ARRAY, each of + size SIZE, into ascending order using the comparison function + COMPARE. The type of the comparison function is defined by, + + int (*gsl_comparison_fn_t) (const void * a, + const void * b) + + A comparison function should return a negative integer if the first + argument is less than the second argument, `0' if the two arguments + are equal and a positive integer if the first argument is greater + than the second argument. + + For example, the following function can be used to sort doubles + into ascending numerical order. + + int + compare_doubles (const double * a, + const double * b) + { + if (*a > *b) + return 1; + else if (*a < *b) + return -1; + else + return 0; + } + + The appropriate function call to perform the sort is, + + gsl_heapsort (array, count, sizeof(double), + compare_doubles); + + Note that unlike `qsort' the heapsort algorithm cannot be made into + a stable sort by pointer arithmetic. The trick of comparing + pointers for equal elements in the comparison function does not + work for the heapsort algorithm. The heapsort algorithm performs + an internal rearrangement of the data which destroys its initial + ordering. + + -- Function: int gsl_heapsort_index (size_t * P, const void * ARRAY, + size_t COUNT, size_t SIZE, gsl_comparison_fn_t COMPARE) + This function indirectly sorts the COUNT elements of the array + ARRAY, each of size SIZE, into ascending order using the + comparison function COMPARE. The resulting permutation is stored + in P, an array of length N. The elements of P give the index of + the array element which would have been stored in that position if + the array had been sorted in place. The first element of P gives + the index of the least element in ARRAY, and the last element of P + gives the index of the greatest element in ARRAY. The array + itself is not changed. + + +File: gsl-ref.info, Node: Sorting vectors, Next: Selecting the k smallest or largest elements, Prev: Sorting objects, Up: Sorting + +12.2 Sorting vectors +==================== + +The following functions will sort the elements of an array or vector, +either directly or indirectly. They are defined for all real and +integer types using the normal suffix rules. For example, the `float' +versions of the array functions are `gsl_sort_float' and +`gsl_sort_float_index'. The corresponding vector functions are +`gsl_sort_vector_float' and `gsl_sort_vector_float_index'. The +prototypes are available in the header files `gsl_sort_float.h' +`gsl_sort_vector_float.h'. The complete set of prototypes can be +included using the header files `gsl_sort.h' and `gsl_sort_vector.h'. + + There are no functions for sorting complex arrays or vectors, since +the ordering of complex numbers is not uniquely defined. To sort a +complex vector by magnitude compute a real vector containing the +magnitudes of the complex elements, and sort this vector indirectly. +The resulting index gives the appropriate ordering of the original +complex vector. + + -- Function: void gsl_sort (double * DATA, size_t STRIDE, size_t N) + This function sorts the N elements of the array DATA with stride + STRIDE into ascending numerical order. + + -- Function: void gsl_sort_vector (gsl_vector * V) + This function sorts the elements of the vector V into ascending + numerical order. + + -- Function: void gsl_sort_index (size_t * P, const double * DATA, + size_t STRIDE, size_t N) + This function indirectly sorts the N elements of the array DATA + with stride STRIDE into ascending order, storing the resulting + permutation in P. The array P must be allocated with a sufficient + length to store the N elements of the permutation. The elements + of P give the index of the array element which would have been + stored in that position if the array had been sorted in place. + The array DATA is not changed. + + -- Function: int gsl_sort_vector_index (gsl_permutation * P, const + gsl_vector * V) + This function indirectly sorts the elements of the vector V into + ascending order, storing the resulting permutation in P. The + elements of P give the index of the vector element which would + have been stored in that position if the vector had been sorted in + place. The first element of P gives the index of the least element + in V, and the last element of P gives the index of the greatest + element in V. The vector V is not changed. + + +File: gsl-ref.info, Node: Selecting the k smallest or largest elements, Next: Computing the rank, Prev: Sorting vectors, Up: Sorting + +12.3 Selecting the k smallest or largest elements +================================================= + +The functions described in this section select the k smallest or +largest elements of a data set of size N. The routines use an O(kN) +direct insertion algorithm which is suited to subsets that are small +compared with the total size of the dataset. For example, the routines +are useful for selecting the 10 largest values from one million data +points, but not for selecting the largest 100,000 values. If the +subset is a significant part of the total dataset it may be faster to +sort all the elements of the dataset directly with an O(N \log N) +algorithm and obtain the smallest or largest values that way. + + -- Function: int gsl_sort_smallest (double * DEST, size_t K, const + double * SRC, size_t STRIDE, size_t N) + This function copies the K smallest elements of the array SRC, of + size N and stride STRIDE, in ascending numerical order into the + array DEST. The size K of the subset must be less than or equal + to N. The data SRC is not modified by this operation. + + -- Function: int gsl_sort_largest (double * DEST, size_t K, const + double * SRC, size_t STRIDE, size_t N) + This function copies the K largest elements of the array SRC, of + size N and stride STRIDE, in descending numerical order into the + array DEST. K must be less than or equal to N. The data SRC is not + modified by this operation. + + -- Function: int gsl_sort_vector_smallest (double * DEST, size_t K, + const gsl_vector * V) + -- Function: int gsl_sort_vector_largest (double * DEST, size_t K, + const gsl_vector * V) + These functions copy the K smallest or largest elements of the + vector V into the array DEST. K must be less than or equal to the + length of the vector V. + + The following functions find the indices of the k smallest or +largest elements of a dataset, + + -- Function: int gsl_sort_smallest_index (size_t * P, size_t K, const + double * SRC, size_t STRIDE, size_t N) + This function stores the indices of the K smallest elements of the + array SRC, of size N and stride STRIDE, in the array P. The + indices are chosen so that the corresponding data is in ascending + numerical order. K must be less than or equal to N. The data SRC + is not modified by this operation. + + -- Function: int gsl_sort_largest_index (size_t * P, size_t K, const + double * SRC, size_t STRIDE, size_t N) + This function stores the indices of the K largest elements of the + array SRC, of size N and stride STRIDE, in the array P. The + indices are chosen so that the corresponding data is in descending + numerical order. K must be less than or equal to N. The data SRC + is not modified by this operation. + + -- Function: int gsl_sort_vector_smallest_index (size_t * P, size_t K, + const gsl_vector * V) + -- Function: int gsl_sort_vector_largest_index (size_t * P, size_t K, + const gsl_vector * V) + These functions store the indices of the K smallest or largest + elements of the vector V in the array P. K must be less than or + equal to the length of the vector V. + + +File: gsl-ref.info, Node: Computing the rank, Next: Sorting Examples, Prev: Selecting the k smallest or largest elements, Up: Sorting + +12.4 Computing the rank +======================= + +The "rank" of an element is its order in the sorted data. The rank is +the inverse of the index permutation, P. It can be computed using the +following algorithm, + + for (i = 0; i < p->size; i++) + { + size_t pi = p->data[i]; + rank->data[pi] = i; + } + +This can be computed directly from the function +`gsl_permutation_inverse(rank,p)'. + + The following function will print the rank of each element of the +vector V, + + void + print_rank (gsl_vector * v) + { + size_t i; + size_t n = v->size; + gsl_permutation * perm = gsl_permutation_alloc(n); + gsl_permutation * rank = gsl_permutation_alloc(n); + + gsl_sort_vector_index (perm, v); + gsl_permutation_inverse (rank, perm); + + for (i = 0; i < n; i++) + { + double vi = gsl_vector_get(v, i); + printf ("element = %d, value = %g, rank = %d\n", + i, vi, rank->data[i]); + } + + gsl_permutation_free (perm); + gsl_permutation_free (rank); + } + + +File: gsl-ref.info, Node: Sorting Examples, Next: Sorting References and Further Reading, Prev: Computing the rank, Up: Sorting + +12.5 Examples +============= + +The following example shows how to use the permutation P to print the +elements of the vector V in ascending order, + + gsl_sort_vector_index (p, v); + + for (i = 0; i < v->size; i++) + { + double vpi = gsl_vector_get (v, p->data[i]); + printf ("order = %d, value = %g\n", i, vpi); + } + +The next example uses the function `gsl_sort_smallest' to select the 5 +smallest numbers from 100000 uniform random variates stored in an array, + + #include + #include + + int + main (void) + { + const gsl_rng_type * T; + gsl_rng * r; + + size_t i, k = 5, N = 100000; + + double * x = malloc (N * sizeof(double)); + double * small = malloc (k * sizeof(double)); + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < N; i++) + { + x[i] = gsl_rng_uniform(r); + } + + gsl_sort_smallest (small, k, x, 1, N); + + printf ("%d smallest values from %d\n", k, N); + + for (i = 0; i < k; i++) + { + printf ("%d: %.18f\n", i, small[i]); + } + + free (x); + free (small); + gsl_rng_free (r); + return 0; + } + The output lists the 5 smallest values, in ascending order, + + $ ./a.out + 5 smallest values from 100000 + 0: 0.000003489200025797 + 1: 0.000008199829608202 + 2: 0.000008953968062997 + 3: 0.000010712770745158 + 4: 0.000033531803637743 + + +File: gsl-ref.info, Node: Sorting References and Further Reading, Prev: Sorting Examples, Up: Sorting + +12.6 References and Further Reading +=================================== + +The subject of sorting is covered extensively in Knuth's `Sorting and +Searching', + + Donald E. Knuth, `The Art of Computer Programming: Sorting and + Searching' (Vol 3, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. + +The Heapsort algorithm is described in the following book, + + Robert Sedgewick, `Algorithms in C', Addison-Wesley, ISBN + 0201514257. + + +File: gsl-ref.info, Node: BLAS Support, Next: Linear Algebra, Prev: Sorting, Up: Top + +13 BLAS Support +*************** + +The Basic Linear Algebra Subprograms (BLAS) define a set of fundamental +operations on vectors and matrices which can be used to create optimized +higher-level linear algebra functionality. + + The library provides a low-level layer which corresponds directly to +the C-language BLAS standard, referred to here as "CBLAS", and a +higher-level interface for operations on GSL vectors and matrices. +Users who are interested in simple operations on GSL vector and matrix +objects should use the high-level layer described in this chapter. The +functions are declared in the file `gsl_blas.h' and should satisfy the +needs of most users. + + Note that GSL matrices are implemented using dense-storage so the +interface only includes the corresponding dense-storage BLAS functions. +The full BLAS functionality for band-format and packed-format matrices +is available through the low-level CBLAS interface. Similarly, GSL +vectors are restricted to positive strides, whereas the low-level CBLAS +interface supports negative strides as specified in the BLAS +standard.(1) + + The interface for the `gsl_cblas' layer is specified in the file +`gsl_cblas.h'. This interface corresponds to the BLAS Technical +Forum's standard for the C interface to legacy BLAS implementations. +Users who have access to other conforming CBLAS implementations can use +these in place of the version provided by the library. Note that users +who have only a Fortran BLAS library can use a CBLAS conformant wrapper +to convert it into a CBLAS library. A reference CBLAS wrapper for +legacy Fortran implementations exists as part of the CBLAS standard and +can be obtained from Netlib. The complete set of CBLAS functions is +listed in an appendix (*note GSL CBLAS Library::). + + There are three levels of BLAS operations, + +Level 1 + Vector operations, e.g. y = \alpha x + y + +Level 2 + Matrix-vector operations, e.g. y = \alpha A x + \beta y + +Level 3 + Matrix-matrix operations, e.g. C = \alpha A B + C + +Each routine has a name which specifies the operation, the type of +matrices involved and their precisions. Some of the most common +operations and their names are given below, + +DOT + scalar product, x^T y + +AXPY + vector sum, \alpha x + y + +MV + matrix-vector product, A x + +SV + matrix-vector solve, inv(A) x + +MM + matrix-matrix product, A B + +SM + matrix-matrix solve, inv(A) B + +The types of matrices are, + +GE + general + +GB + general band + +SY + symmetric + +SB + symmetric band + +SP + symmetric packed + +HE + hermitian + +HB + hermitian band + +HP + hermitian packed + +TR + triangular + +TB + triangular band + +TP + triangular packed + +Each operation is defined for four precisions, + +S + single real + +D + double real + +C + single complex + +Z + double complex + +Thus, for example, the name SGEMM stands for "single-precision general +matrix-matrix multiply" and ZGEMM stands for "double-precision complex +matrix-matrix multiply". + + Note that the vector and matrix arguments to BLAS functions must not +be aliased, as the results are undefined when the underlying arrays +overlap (*note Aliasing of arrays::). + +* Menu: + +* GSL BLAS Interface:: +* BLAS Examples:: +* BLAS References and Further Reading:: + + ---------- Footnotes ---------- + + (1) In the low-level CBLAS interface, a negative stride accesses the +vector elements in reverse order, i.e. the i-th element is given by +(N-i)*|incx| for incx < 0. + + +File: gsl-ref.info, Node: GSL BLAS Interface, Next: BLAS Examples, Up: BLAS Support + +13.1 GSL BLAS Interface +======================= + +GSL provides dense vector and matrix objects, based on the relevant +built-in types. The library provides an interface to the BLAS +operations which apply to these objects. The interface to this +functionality is given in the file `gsl_blas.h'. + +* Menu: + +* Level 1 GSL BLAS Interface:: +* Level 2 GSL BLAS Interface:: +* Level 3 GSL BLAS Interface:: + + +File: gsl-ref.info, Node: Level 1 GSL BLAS Interface, Next: Level 2 GSL BLAS Interface, Up: GSL BLAS Interface + +13.1.1 Level 1 +-------------- + + -- Function: int gsl_blas_sdsdot (float ALPHA, const gsl_vector_float + * X, const gsl_vector_float * Y, float * RESULT) + This function computes the sum \alpha + x^T y for the vectors X + and Y, returning the result in RESULT. + + -- Function: int gsl_blas_sdot (const gsl_vector_float * X, const + gsl_vector_float * Y, float * RESULT) + -- Function: int gsl_blas_dsdot (const gsl_vector_float * X, const + gsl_vector_float * Y, double * RESULT) + -- Function: int gsl_blas_ddot (const gsl_vector * X, const gsl_vector + * Y, double * RESULT) + These functions compute the scalar product x^T y for the vectors X + and Y, returning the result in RESULT. + + -- Function: int gsl_blas_cdotu (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, gsl_complex_float * DOTU) + -- Function: int gsl_blas_zdotu (const gsl_vector_complex * X, const + gsl_vector_complex * Y, gsl_complex * DOTU) + These functions compute the complex scalar product x^T y for the + vectors X and Y, returning the result in DOTU + + -- Function: int gsl_blas_cdotc (const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, gsl_complex_float * DOTC) + -- Function: int gsl_blas_zdotc (const gsl_vector_complex * X, const + gsl_vector_complex * Y, gsl_complex * DOTC) + These functions compute the complex conjugate scalar product x^H y + for the vectors X and Y, returning the result in DOTC + + -- Function: float gsl_blas_snrm2 (const gsl_vector_float * X) + -- Function: double gsl_blas_dnrm2 (const gsl_vector * X) + These functions compute the Euclidean norm ||x||_2 = \sqrt {\sum + x_i^2} of the vector X. + + -- Function: float gsl_blas_scnrm2 (const gsl_vector_complex_float * X) + -- Function: double gsl_blas_dznrm2 (const gsl_vector_complex * X) + These functions compute the Euclidean norm of the complex vector X, + + ||x||_2 = \sqrt {\sum (\Re(x_i)^2 + \Im(x_i)^2)}. + + -- Function: float gsl_blas_sasum (const gsl_vector_float * X) + -- Function: double gsl_blas_dasum (const gsl_vector * X) + These functions compute the absolute sum \sum |x_i| of the + elements of the vector X. + + -- Function: float gsl_blas_scasum (const gsl_vector_complex_float * X) + -- Function: double gsl_blas_dzasum (const gsl_vector_complex * X) + These functions compute the sum of the magnitudes of the real and + imaginary parts of the complex vector X, \sum |\Re(x_i)| + + |\Im(x_i)|. + + -- Function: CBLAS_INDEX_t gsl_blas_isamax (const gsl_vector_float * X) + -- Function: CBLAS_INDEX_t gsl_blas_idamax (const gsl_vector * X) + -- Function: CBLAS_INDEX_t gsl_blas_icamax (const + gsl_vector_complex_float * X) + -- Function: CBLAS_INDEX_t gsl_blas_izamax (const gsl_vector_complex * + X) + These functions return the index of the largest element of the + vector X. The largest element is determined by its absolute + magnitude for real vectors and by the sum of the magnitudes of the + real and imaginary parts |\Re(x_i)| + |\Im(x_i)| for complex + vectors. If the largest value occurs several times then the index + of the first occurrence is returned. + + -- Function: int gsl_blas_sswap (gsl_vector_float * X, + gsl_vector_float * Y) + -- Function: int gsl_blas_dswap (gsl_vector * X, gsl_vector * Y) + -- Function: int gsl_blas_cswap (gsl_vector_complex_float * X, + gsl_vector_complex_float * Y) + -- Function: int gsl_blas_zswap (gsl_vector_complex * X, + gsl_vector_complex * Y) + These functions exchange the elements of the vectors X and Y. + + -- Function: int gsl_blas_scopy (const gsl_vector_float * X, + gsl_vector_float * Y) + -- Function: int gsl_blas_dcopy (const gsl_vector * X, gsl_vector * Y) + -- Function: int gsl_blas_ccopy (const gsl_vector_complex_float * X, + gsl_vector_complex_float * Y) + -- Function: int gsl_blas_zcopy (const gsl_vector_complex * X, + gsl_vector_complex * Y) + These functions copy the elements of the vector X into the vector + Y. + + -- Function: int gsl_blas_saxpy (float ALPHA, const gsl_vector_float * + X, gsl_vector_float * Y) + -- Function: int gsl_blas_daxpy (double ALPHA, const gsl_vector * X, + gsl_vector * Y) + -- Function: int gsl_blas_caxpy (const gsl_complex_float ALPHA, const + gsl_vector_complex_float * X, gsl_vector_complex_float * Y) + -- Function: int gsl_blas_zaxpy (const gsl_complex ALPHA, const + gsl_vector_complex * X, gsl_vector_complex * Y) + These functions compute the sum y = \alpha x + y for the vectors X + and Y. + + -- Function: void gsl_blas_sscal (float ALPHA, gsl_vector_float * X) + -- Function: void gsl_blas_dscal (double ALPHA, gsl_vector * X) + -- Function: void gsl_blas_cscal (const gsl_complex_float ALPHA, + gsl_vector_complex_float * X) + -- Function: void gsl_blas_zscal (const gsl_complex ALPHA, + gsl_vector_complex * X) + -- Function: void gsl_blas_csscal (float ALPHA, + gsl_vector_complex_float * X) + -- Function: void gsl_blas_zdscal (double ALPHA, gsl_vector_complex * + X) + These functions rescale the vector X by the multiplicative factor + ALPHA. + + -- Function: int gsl_blas_srotg (float A[], float B[], float C[], + float S[]) + -- Function: int gsl_blas_drotg (double A[], double B[], double C[], + double S[]) + These functions compute a Givens rotation (c,s) which zeroes the + vector (a,b), + + [ c s ] [ a ] = [ r ] + [ -s c ] [ b ] [ 0 ] + + The variables A and B are overwritten by the routine. + + -- Function: int gsl_blas_srot (gsl_vector_float * X, gsl_vector_float + * Y, float C, float S) + -- Function: int gsl_blas_drot (gsl_vector * X, gsl_vector * Y, const + double C, const double S) + These functions apply a Givens rotation (x', y') = (c x + s y, -s + x + c y) to the vectors X, Y. + + -- Function: int gsl_blas_srotmg (float D1[], float D2[], float B1[], + float B2, float P[]) + -- Function: int gsl_blas_drotmg (double D1[], double D2[], double + B1[], double B2, double P[]) + These functions compute a modified Givens transformation. The + modified Givens transformation is defined in the original Level-1 + BLAS specification, given in the references. + + -- Function: int gsl_blas_srotm (gsl_vector_float * X, + gsl_vector_float * Y, const float P[]) + -- Function: int gsl_blas_drotm (gsl_vector * X, gsl_vector * Y, const + double P[]) + These functions apply a modified Givens transformation. + + +File: gsl-ref.info, Node: Level 2 GSL BLAS Interface, Next: Level 3 GSL BLAS Interface, Prev: Level 1 GSL BLAS Interface, Up: GSL BLAS Interface + +13.1.2 Level 2 +-------------- + + -- Function: int gsl_blas_sgemv (CBLAS_TRANSPOSE_t TRANSA, float + ALPHA, const gsl_matrix_float * A, const gsl_vector_float * + X, float BETA, gsl_vector_float * Y) + -- Function: int gsl_blas_dgemv (CBLAS_TRANSPOSE_t TRANSA, double + ALPHA, const gsl_matrix * A, const gsl_vector * X, double + BETA, gsl_vector * Y) + -- Function: int gsl_blas_cgemv (CBLAS_TRANSPOSE_t TRANSA, const + gsl_complex_float ALPHA, const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, const gsl_complex_float + BETA, gsl_vector_complex_float * Y) + -- Function: int gsl_blas_zgemv (CBLAS_TRANSPOSE_t TRANSA, const + gsl_complex ALPHA, const gsl_matrix_complex * A, const + gsl_vector_complex * X, const gsl_complex BETA, + gsl_vector_complex * Y) + These functions compute the matrix-vector product and sum y = + \alpha op(A) x + \beta y, where op(A) = A, A^T, A^H for TRANSA = + `CblasNoTrans', `CblasTrans', `CblasConjTrans'. + + -- Function: int gsl_blas_strmv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_float * A, + gsl_vector_float * X) + -- Function: int gsl_blas_dtrmv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix * A, gsl_vector * + X) + -- Function: int gsl_blas_ctrmv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_complex_float * + A, gsl_vector_complex_float * X) + -- Function: int gsl_blas_ztrmv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_complex * A, + gsl_vector_complex * X) + These functions compute the matrix-vector product x = op(A) x for + the triangular matrix A, where op(A) = A, A^T, A^H for TRANSA = + `CblasNoTrans', `CblasTrans', `CblasConjTrans'. When UPLO is + `CblasUpper' then the upper triangle of A is used, and when UPLO + is `CblasLower' then the lower triangle of A is used. If DIAG is + `CblasNonUnit' then the diagonal of the matrix is used, but if + DIAG is `CblasUnit' then the diagonal elements of the matrix A are + taken as unity and are not referenced. + + -- Function: int gsl_blas_strsv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_float * A, + gsl_vector_float * X) + -- Function: int gsl_blas_dtrsv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix * A, gsl_vector * + X) + -- Function: int gsl_blas_ctrsv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_complex_float * + A, gsl_vector_complex_float * X) + -- Function: int gsl_blas_ztrsv (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANSA, CBLAS_DIAG_t DIAG, const gsl_matrix_complex * A, + gsl_vector_complex * X) + These functions compute inv(op(A)) x for X, where op(A) = A, A^T, + A^H for TRANSA = `CblasNoTrans', `CblasTrans', `CblasConjTrans'. + When UPLO is `CblasUpper' then the upper triangle of A is used, + and when UPLO is `CblasLower' then the lower triangle of A is + used. If DIAG is `CblasNonUnit' then the diagonal of the matrix + is used, but if DIAG is `CblasUnit' then the diagonal elements of + the matrix A are taken as unity and are not referenced. + + -- Function: int gsl_blas_ssymv (CBLAS_UPLO_t UPLO, float ALPHA, const + gsl_matrix_float * A, const gsl_vector_float * X, float BETA, + gsl_vector_float * Y) + -- Function: int gsl_blas_dsymv (CBLAS_UPLO_t UPLO, double ALPHA, + const gsl_matrix * A, const gsl_vector * X, double BETA, + gsl_vector * Y) + These functions compute the matrix-vector product and sum y = + \alpha A x + \beta y for the symmetric matrix A. Since the matrix + A is symmetric only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of A are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of A are used. + + -- Function: int gsl_blas_chemv (CBLAS_UPLO_t UPLO, const + gsl_complex_float ALPHA, const gsl_matrix_complex_float * A, + const gsl_vector_complex_float * X, const gsl_complex_float + BETA, gsl_vector_complex_float * Y) + -- Function: int gsl_blas_zhemv (CBLAS_UPLO_t UPLO, const gsl_complex + ALPHA, const gsl_matrix_complex * A, const gsl_vector_complex + * X, const gsl_complex BETA, gsl_vector_complex * Y) + These functions compute the matrix-vector product and sum y = + \alpha A x + \beta y for the hermitian matrix A. Since the matrix + A is hermitian only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of A are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of A are used. The imaginary elements + of the diagonal are automatically assumed to be zero and are not + referenced. + + -- Function: int gsl_blas_sger (float ALPHA, const gsl_vector_float * + X, const gsl_vector_float * Y, gsl_matrix_float * A) + -- Function: int gsl_blas_dger (double ALPHA, const gsl_vector * X, + const gsl_vector * Y, gsl_matrix * A) + -- Function: int gsl_blas_cgeru (const gsl_complex_float ALPHA, const + gsl_vector_complex_float * X, const gsl_vector_complex_float + * Y, gsl_matrix_complex_float * A) + -- Function: int gsl_blas_zgeru (const gsl_complex ALPHA, const + gsl_vector_complex * X, const gsl_vector_complex * Y, + gsl_matrix_complex * A) + These functions compute the rank-1 update A = \alpha x y^T + A of + the matrix A. + + -- Function: int gsl_blas_cgerc (const gsl_complex_float ALPHA, const + gsl_vector_complex_float * X, const gsl_vector_complex_float + * Y, gsl_matrix_complex_float * A) + -- Function: int gsl_blas_zgerc (const gsl_complex ALPHA, const + gsl_vector_complex * X, const gsl_vector_complex * Y, + gsl_matrix_complex * A) + These functions compute the conjugate rank-1 update A = \alpha x + y^H + A of the matrix A. + + -- Function: int gsl_blas_ssyr (CBLAS_UPLO_t UPLO, float ALPHA, const + gsl_vector_float * X, gsl_matrix_float * A) + -- Function: int gsl_blas_dsyr (CBLAS_UPLO_t UPLO, double ALPHA, const + gsl_vector * X, gsl_matrix * A) + These functions compute the symmetric rank-1 update A = \alpha x + x^T + A of the symmetric matrix A. Since the matrix A is + symmetric only its upper half or lower half need to be stored. + When UPLO is `CblasUpper' then the upper triangle and diagonal of + A are used, and when UPLO is `CblasLower' then the lower triangle + and diagonal of A are used. + + -- Function: int gsl_blas_cher (CBLAS_UPLO_t UPLO, float ALPHA, const + gsl_vector_complex_float * X, gsl_matrix_complex_float * A) + -- Function: int gsl_blas_zher (CBLAS_UPLO_t UPLO, double ALPHA, const + gsl_vector_complex * X, gsl_matrix_complex * A) + These functions compute the hermitian rank-1 update A = \alpha x + x^H + A of the hermitian matrix A. Since the matrix A is + hermitian only its upper half or lower half need to be stored. + When UPLO is `CblasUpper' then the upper triangle and diagonal of + A are used, and when UPLO is `CblasLower' then the lower triangle + and diagonal of A are used. The imaginary elements of the + diagonal are automatically set to zero. + + -- Function: int gsl_blas_ssyr2 (CBLAS_UPLO_t UPLO, float ALPHA, const + gsl_vector_float * X, const gsl_vector_float * Y, + gsl_matrix_float * A) + -- Function: int gsl_blas_dsyr2 (CBLAS_UPLO_t UPLO, double ALPHA, + const gsl_vector * X, const gsl_vector * Y, gsl_matrix * A) + These functions compute the symmetric rank-2 update A = \alpha x + y^T + \alpha y x^T + A of the symmetric matrix A. Since the + matrix A is symmetric only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of A are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of A are used. + + -- Function: int gsl_blas_cher2 (CBLAS_UPLO_t UPLO, const + gsl_complex_float ALPHA, const gsl_vector_complex_float * X, + const gsl_vector_complex_float * Y, gsl_matrix_complex_float + * A) + -- Function: int gsl_blas_zher2 (CBLAS_UPLO_t UPLO, const gsl_complex + ALPHA, const gsl_vector_complex * X, const gsl_vector_complex + * Y, gsl_matrix_complex * A) + These functions compute the hermitian rank-2 update A = \alpha x + y^H + \alpha^* y x^H + A of the hermitian matrix A. Since the + matrix A is hermitian only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of A are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of A are used. The imaginary elements + of the diagonal are automatically set to zero. + + +File: gsl-ref.info, Node: Level 3 GSL BLAS Interface, Prev: Level 2 GSL BLAS Interface, Up: GSL BLAS Interface + +13.1.3 Level 3 +-------------- + + -- Function: int gsl_blas_sgemm (CBLAS_TRANSPOSE_t TRANSA, + CBLAS_TRANSPOSE_t TRANSB, float ALPHA, const gsl_matrix_float + * A, const gsl_matrix_float * B, float BETA, gsl_matrix_float + * C) + -- Function: int gsl_blas_dgemm (CBLAS_TRANSPOSE_t TRANSA, + CBLAS_TRANSPOSE_t TRANSB, double ALPHA, const gsl_matrix * A, + const gsl_matrix * B, double BETA, gsl_matrix * C) + -- Function: int gsl_blas_cgemm (CBLAS_TRANSPOSE_t TRANSA, + CBLAS_TRANSPOSE_t TRANSB, const gsl_complex_float ALPHA, + const gsl_matrix_complex_float * A, const + gsl_matrix_complex_float * B, const gsl_complex_float BETA, + gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zgemm (CBLAS_TRANSPOSE_t TRANSA, + CBLAS_TRANSPOSE_t TRANSB, const gsl_complex ALPHA, const + gsl_matrix_complex * A, const gsl_matrix_complex * B, const + gsl_complex BETA, gsl_matrix_complex * C) + These functions compute the matrix-matrix product and sum C = + \alpha op(A) op(B) + \beta C where op(A) = A, A^T, A^H for TRANSA + = `CblasNoTrans', `CblasTrans', `CblasConjTrans' and similarly for + the parameter TRANSB. + + -- Function: int gsl_blas_ssymm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + float ALPHA, const gsl_matrix_float * A, const + gsl_matrix_float * B, float BETA, gsl_matrix_float * C) + -- Function: int gsl_blas_dsymm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + double ALPHA, const gsl_matrix * A, const gsl_matrix * B, + double BETA, gsl_matrix * C) + -- Function: int gsl_blas_csymm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + const gsl_complex_float ALPHA, const gsl_matrix_complex_float + * A, const gsl_matrix_complex_float * B, const + gsl_complex_float BETA, gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zsymm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + const gsl_complex ALPHA, const gsl_matrix_complex * A, const + gsl_matrix_complex * B, const gsl_complex BETA, + gsl_matrix_complex * C) + These functions compute the matrix-matrix product and sum C = + \alpha A B + \beta C for SIDE is `CblasLeft' and C = \alpha B A + + \beta C for SIDE is `CblasRight', where the matrix A is symmetric. + When UPLO is `CblasUpper' then the upper triangle and diagonal of + A are used, and when UPLO is `CblasLower' then the lower triangle + and diagonal of A are used. + + -- Function: int gsl_blas_chemm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + const gsl_complex_float ALPHA, const gsl_matrix_complex_float + * A, const gsl_matrix_complex_float * B, const + gsl_complex_float BETA, gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zhemm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + const gsl_complex ALPHA, const gsl_matrix_complex * A, const + gsl_matrix_complex * B, const gsl_complex BETA, + gsl_matrix_complex * C) + These functions compute the matrix-matrix product and sum C = + \alpha A B + \beta C for SIDE is `CblasLeft' and C = \alpha B A + + \beta C for SIDE is `CblasRight', where the matrix A is hermitian. + When UPLO is `CblasUpper' then the upper triangle and diagonal of + A are used, and when UPLO is `CblasLower' then the lower triangle + and diagonal of A are used. The imaginary elements of the + diagonal are automatically set to zero. + + -- Function: int gsl_blas_strmm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, float ALPHA, + const gsl_matrix_float * A, gsl_matrix_float * B) + -- Function: int gsl_blas_dtrmm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, double ALPHA, + const gsl_matrix * A, gsl_matrix * B) + -- Function: int gsl_blas_ctrmm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, const + gsl_complex_float ALPHA, const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B) + -- Function: int gsl_blas_ztrmm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, const + gsl_complex ALPHA, const gsl_matrix_complex * A, + gsl_matrix_complex * B) + These functions compute the matrix-matrix product B = \alpha op(A) + B for SIDE is `CblasLeft' and B = \alpha B op(A) for SIDE is + `CblasRight'. The matrix A is triangular and op(A) = A, A^T, A^H + for TRANSA = `CblasNoTrans', `CblasTrans', `CblasConjTrans'. When + UPLO is `CblasUpper' then the upper triangle of A is used, and + when UPLO is `CblasLower' then the lower triangle of A is used. + If DIAG is `CblasNonUnit' then the diagonal of A is used, but if + DIAG is `CblasUnit' then the diagonal elements of the matrix A are + taken as unity and are not referenced. + + -- Function: int gsl_blas_strsm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, float ALPHA, + const gsl_matrix_float * A, gsl_matrix_float * B) + -- Function: int gsl_blas_dtrsm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, double ALPHA, + const gsl_matrix * A, gsl_matrix * B) + -- Function: int gsl_blas_ctrsm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, const + gsl_complex_float ALPHA, const gsl_matrix_complex_float * A, + gsl_matrix_complex_float * B) + -- Function: int gsl_blas_ztrsm (CBLAS_SIDE_t SIDE, CBLAS_UPLO_t UPLO, + CBLAS_TRANSPOSE_t TRANSA, CBLAS_DIAG_t DIAG, const + gsl_complex ALPHA, const gsl_matrix_complex * A, + gsl_matrix_complex * B) + These functions compute the inverse-matrix matrix product B = + \alpha op(inv(A))B for SIDE is `CblasLeft' and B = \alpha B + op(inv(A)) for SIDE is `CblasRight'. The matrix A is triangular + and op(A) = A, A^T, A^H for TRANSA = `CblasNoTrans', `CblasTrans', + `CblasConjTrans'. When UPLO is `CblasUpper' then the upper + triangle of A is used, and when UPLO is `CblasLower' then the + lower triangle of A is used. If DIAG is `CblasNonUnit' then the + diagonal of A is used, but if DIAG is `CblasUnit' then the + diagonal elements of the matrix A are taken as unity and are not + referenced. + + -- Function: int gsl_blas_ssyrk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, float ALPHA, const gsl_matrix_float * A, float BETA, + gsl_matrix_float * C) + -- Function: int gsl_blas_dsyrk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, double ALPHA, const gsl_matrix * A, double BETA, + gsl_matrix * C) + -- Function: int gsl_blas_csyrk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex_float ALPHA, const + gsl_matrix_complex_float * A, const gsl_complex_float BETA, + gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zsyrk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex ALPHA, const gsl_matrix_complex * A, + const gsl_complex BETA, gsl_matrix_complex * C) + These functions compute a rank-k update of the symmetric matrix C, + C = \alpha A A^T + \beta C when TRANS is `CblasNoTrans' and C = + \alpha A^T A + \beta C when TRANS is `CblasTrans'. Since the + matrix C is symmetric only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of C are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of C are used. + + -- Function: int gsl_blas_cherk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, float ALPHA, const gsl_matrix_complex_float * A, float + BETA, gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zherk (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, double ALPHA, const gsl_matrix_complex * A, double + BETA, gsl_matrix_complex * C) + These functions compute a rank-k update of the hermitian matrix C, + C = \alpha A A^H + \beta C when TRANS is `CblasNoTrans' and C = + \alpha A^H A + \beta C when TRANS is `CblasConjTrans'. Since the + matrix C is hermitian only its upper half or lower half need to be + stored. When UPLO is `CblasUpper' then the upper triangle and + diagonal of C are used, and when UPLO is `CblasLower' then the + lower triangle and diagonal of C are used. The imaginary elements + of the diagonal are automatically set to zero. + + -- Function: int gsl_blas_ssyr2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, float ALPHA, const gsl_matrix_float * A, const + gsl_matrix_float * B, float BETA, gsl_matrix_float * C) + -- Function: int gsl_blas_dsyr2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, double ALPHA, const gsl_matrix * A, const gsl_matrix * + B, double BETA, gsl_matrix * C) + -- Function: int gsl_blas_csyr2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex_float ALPHA, const + gsl_matrix_complex_float * A, const gsl_matrix_complex_float + * B, const gsl_complex_float BETA, gsl_matrix_complex_float * + C) + -- Function: int gsl_blas_zsyr2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex ALPHA, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, const gsl_complex BETA, + gsl_matrix_complex * C) + These functions compute a rank-2k update of the symmetric matrix C, + C = \alpha A B^T + \alpha B A^T + \beta C when TRANS is + `CblasNoTrans' and C = \alpha A^T B + \alpha B^T A + \beta C when + TRANS is `CblasTrans'. Since the matrix C is symmetric only its + upper half or lower half need to be stored. When UPLO is + `CblasUpper' then the upper triangle and diagonal of C are used, + and when UPLO is `CblasLower' then the lower triangle and diagonal + of C are used. + + -- Function: int gsl_blas_cher2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex_float ALPHA, const + gsl_matrix_complex_float * A, const gsl_matrix_complex_float + * B, float BETA, gsl_matrix_complex_float * C) + -- Function: int gsl_blas_zher2k (CBLAS_UPLO_t UPLO, CBLAS_TRANSPOSE_t + TRANS, const gsl_complex ALPHA, const gsl_matrix_complex * A, + const gsl_matrix_complex * B, double BETA, gsl_matrix_complex + * C) + These functions compute a rank-2k update of the hermitian matrix C, + C = \alpha A B^H + \alpha^* B A^H + \beta C when TRANS is + `CblasNoTrans' and C = \alpha A^H B + \alpha^* B^H A + \beta C when + TRANS is `CblasConjTrans'. Since the matrix C is hermitian only + its upper half or lower half need to be stored. When UPLO is + `CblasUpper' then the upper triangle and diagonal of C are used, + and when UPLO is `CblasLower' then the lower triangle and diagonal + of C are used. The imaginary elements of the diagonal are + automatically set to zero. + + +File: gsl-ref.info, Node: BLAS Examples, Next: BLAS References and Further Reading, Prev: GSL BLAS Interface, Up: BLAS Support + +13.2 Examples +============= + +The following program computes the product of two matrices using the +Level-3 BLAS function DGEMM, + + [ 0.11 0.12 0.13 ] [ 1011 1012 ] [ 367.76 368.12 ] + [ 0.21 0.22 0.23 ] [ 1021 1022 ] = [ 674.06 674.72 ] + [ 1031 1032 ] + +The matrices are stored in row major order, according to the C +convention for arrays. + + #include + #include + + int + main (void) + { + double a[] = { 0.11, 0.12, 0.13, + 0.21, 0.22, 0.23 }; + + double b[] = { 1011, 1012, + 1021, 1022, + 1031, 1032 }; + + double c[] = { 0.00, 0.00, + 0.00, 0.00 }; + + gsl_matrix_view A = gsl_matrix_view_array(a, 2, 3); + gsl_matrix_view B = gsl_matrix_view_array(b, 3, 2); + gsl_matrix_view C = gsl_matrix_view_array(c, 2, 2); + + /* Compute C = A B */ + + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, + 1.0, &A.matrix, &B.matrix, + 0.0, &C.matrix); + + printf ("[ %g, %g\n", c[0], c[1]); + printf (" %g, %g ]\n", c[2], c[3]); + + return 0; + } + +Here is the output from the program, + + $ ./a.out + [ 367.76, 368.12 + 674.06, 674.72 ] + + +File: gsl-ref.info, Node: BLAS References and Further Reading, Prev: BLAS Examples, Up: BLAS Support + +13.3 References and Further Reading +=================================== + +Information on the BLAS standards, including both the legacy and +updated interface standards, is available online from the BLAS Homepage +and BLAS Technical Forum web-site. + + `BLAS Homepage' + `http://www.netlib.org/blas/' + + `BLAS Technical Forum' + `http://www.netlib.org/blas/blast-forum/' + +The following papers contain the specifications for Level 1, Level 2 and +Level 3 BLAS. + + C. Lawson, R. Hanson, D. Kincaid, F. Krogh, "Basic Linear Algebra + Subprograms for Fortran Usage", `ACM Transactions on Mathematical + Software', Vol. 5 (1979), Pages 308-325. + + J.J. Dongarra, J. DuCroz, S. Hammarling, R. Hanson, "An Extended + Set of Fortran Basic Linear Algebra Subprograms", `ACM + Transactions on Mathematical Software', Vol. 14, No. 1 (1988), + Pages 1-32. + + J.J. Dongarra, I. Duff, J. DuCroz, S. Hammarling, "A Set of Level + 3 Basic Linear Algebra Subprograms", `ACM Transactions on + Mathematical Software', Vol. 16 (1990), Pages 1-28. + +Postscript versions of the latter two papers are available from +`http://www.netlib.org/blas/'. A CBLAS wrapper for Fortran BLAS +libraries is available from the same location. + + +File: gsl-ref.info, Node: Linear Algebra, Next: Eigensystems, Prev: BLAS Support, Up: Top + +14 Linear Algebra +***************** + +This chapter describes functions for solving linear systems. The +library provides linear algebra operations which operate directly on +the `gsl_vector' and `gsl_matrix' objects. These routines use the +standard algorithms from Golub & Van Loan's `Matrix Computations' with +Level-1 and Level-2 BLAS calls for efficiency. + + The functions described in this chapter are declared in the header +file `gsl_linalg.h'. + +* Menu: + +* LU Decomposition:: +* QR Decomposition:: +* QR Decomposition with Column Pivoting:: +* Singular Value Decomposition:: +* Cholesky Decomposition:: +* Tridiagonal Decomposition of Real Symmetric Matrices:: +* Tridiagonal Decomposition of Hermitian Matrices:: +* Hessenberg Decomposition of Real Matrices:: +* Hessenberg-Triangular Decomposition of Real Matrices:: +* Bidiagonalization:: +* Householder Transformations:: +* Householder solver for linear systems:: +* Tridiagonal Systems:: +* Balancing:: +* Linear Algebra Examples:: +* Linear Algebra References and Further Reading:: + + +File: gsl-ref.info, Node: LU Decomposition, Next: QR Decomposition, Up: Linear Algebra + +14.1 LU Decomposition +===================== + +A general square matrix A has an LU decomposition into upper and lower +triangular matrices, + + P A = L U + +where P is a permutation matrix, L is unit lower triangular matrix and +U is upper triangular matrix. For square matrices this decomposition +can be used to convert the linear system A x = b into a pair of +triangular systems (L y = P b, U x = y), which can be solved by forward +and back-substitution. Note that the LU decomposition is valid for +singular matrices. + + -- Function: int gsl_linalg_LU_decomp (gsl_matrix * A, gsl_permutation + * P, int * SIGNUM) + -- Function: int gsl_linalg_complex_LU_decomp (gsl_matrix_complex * A, + gsl_permutation * P, int * SIGNUM) + These functions factorize the square matrix A into the LU + decomposition PA = LU. On output the diagonal and upper + triangular part of the input matrix A contain the matrix U. The + lower triangular part of the input matrix (excluding the diagonal) + contains L. The diagonal elements of L are unity, and are not + stored. + + The permutation matrix P is encoded in the permutation P. The j-th + column of the matrix P is given by the k-th column of the identity + matrix, where k = p_j the j-th element of the permutation vector. + The sign of the permutation is given by SIGNUM. It has the value + (-1)^n, where n is the number of interchanges in the permutation. + + The algorithm used in the decomposition is Gaussian Elimination + with partial pivoting (Golub & Van Loan, `Matrix Computations', + Algorithm 3.4.1). + + -- Function: int gsl_linalg_LU_solve (const gsl_matrix * LU, const + gsl_permutation * P, const gsl_vector * B, gsl_vector * X) + -- Function: int gsl_linalg_complex_LU_solve (const gsl_matrix_complex + * LU, const gsl_permutation * P, const gsl_vector_complex * + B, gsl_vector_complex * X) + These functions solve the square system A x = b using the LU + decomposition of A into (LU, P) given by `gsl_linalg_LU_decomp' or + `gsl_linalg_complex_LU_decomp' as input. + + -- Function: int gsl_linalg_LU_svx (const gsl_matrix * LU, const + gsl_permutation * P, gsl_vector * X) + -- Function: int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * + LU, const gsl_permutation * P, gsl_vector_complex * X) + These functions solve the square system A x = b in-place using the + precomputed LU decomposition of A into (LU,P). On input X should + contain the right-hand side b, which is replaced by the solution + on output. + + -- Function: int gsl_linalg_LU_refine (const gsl_matrix * A, const + gsl_matrix * LU, const gsl_permutation * P, const gsl_vector + * B, gsl_vector * X, gsl_vector * RESIDUAL) + -- Function: int gsl_linalg_complex_LU_refine (const + gsl_matrix_complex * A, const gsl_matrix_complex * LU, const + gsl_permutation * P, const gsl_vector_complex * B, + gsl_vector_complex * X, gsl_vector_complex * RESIDUAL) + These functions apply an iterative improvement to X, the solution + of A x = b, from the precomputed LU decomposition of A into + (LU,P). The initial residual r = A x - b is also computed and + stored in RESIDUAL. + + -- Function: int gsl_linalg_LU_invert (const gsl_matrix * LU, const + gsl_permutation * P, gsl_matrix * INVERSE) + -- Function: int gsl_linalg_complex_LU_invert (const + gsl_matrix_complex * LU, const gsl_permutation * P, + gsl_matrix_complex * INVERSE) + These functions compute the inverse of a matrix A from its LU + decomposition (LU,P), storing the result in the matrix INVERSE. + The inverse is computed by solving the system A x = b for each + column of the identity matrix. It is preferable to avoid direct + use of the inverse whenever possible, as the linear solver + functions can obtain the same result more efficiently and reliably + (consult any introductory textbook on numerical linear algebra for + details). + + -- Function: double gsl_linalg_LU_det (gsl_matrix * LU, int SIGNUM) + -- Function: gsl_complex gsl_linalg_complex_LU_det (gsl_matrix_complex + * LU, int SIGNUM) + These functions compute the determinant of a matrix A from its LU + decomposition, LU. The determinant is computed as the product of + the diagonal elements of U and the sign of the row permutation + SIGNUM. + + -- Function: double gsl_linalg_LU_lndet (gsl_matrix * LU) + -- Function: double gsl_linalg_complex_LU_lndet (gsl_matrix_complex * + LU) + These functions compute the logarithm of the absolute value of the + determinant of a matrix A, \ln|\det(A)|, from its LU + decomposition, LU. This function may be useful if the direct + computation of the determinant would overflow or underflow. + + -- Function: int gsl_linalg_LU_sgndet (gsl_matrix * LU, int SIGNUM) + -- Function: gsl_complex gsl_linalg_complex_LU_sgndet + (gsl_matrix_complex * LU, int SIGNUM) + These functions compute the sign or phase factor of the + determinant of a matrix A, \det(A)/|\det(A)|, from its LU + decomposition, LU. + + +File: gsl-ref.info, Node: QR Decomposition, Next: QR Decomposition with Column Pivoting, Prev: LU Decomposition, Up: Linear Algebra + +14.2 QR Decomposition +===================== + +A general rectangular M-by-N matrix A has a QR decomposition into the +product of an orthogonal M-by-M square matrix Q (where Q^T Q = I) and +an M-by-N right-triangular matrix R, + + A = Q R + +This decomposition can be used to convert the linear system A x = b +into the triangular system R x = Q^T b, which can be solved by +back-substitution. Another use of the QR decomposition is to compute an +orthonormal basis for a set of vectors. The first N columns of Q form +an orthonormal basis for the range of A, ran(A), when A has full column +rank. + + -- Function: int gsl_linalg_QR_decomp (gsl_matrix * A, gsl_vector * + TAU) + This function factorizes the M-by-N matrix A into the QR + decomposition A = Q R. On output the diagonal and upper + triangular part of the input matrix contain the matrix R. The + vector TAU and the columns of the lower triangular part of the + matrix A contain the Householder coefficients and Householder + vectors which encode the orthogonal matrix Q. The vector TAU must + be of length k=\min(M,N). The matrix Q is related to these + components by, Q = Q_k ... Q_2 Q_1 where Q_i = I - \tau_i v_i + v_i^T and v_i is the Householder vector v_i = + (0,...,1,A(i+1,i),A(i+2,i),...,A(m,i)). This is the same storage + scheme as used by LAPACK. + + The algorithm used to perform the decomposition is Householder QR + (Golub & Van Loan, `Matrix Computations', Algorithm 5.2.1). + + -- Function: int gsl_linalg_QR_solve (const gsl_matrix * QR, const + gsl_vector * TAU, const gsl_vector * B, gsl_vector * X) + This function solves the square system A x = b using the QR + decomposition of A held in (QR, TAU) which must have been computed + previously with `gsl_linalg_QR_decomp'. The least-squares + solution for rectangular systems can be found using + `gsl_linalg_QR_lssolve'. + + -- Function: int gsl_linalg_QR_svx (const gsl_matrix * QR, const + gsl_vector * TAU, gsl_vector * X) + This function solves the square system A x = b in-place using the + QR decomposition of A held in (QR,TAU) which must have been + computed previously by `gsl_linalg_QR_decomp'. On input X should + contain the right-hand side b, which is replaced by the solution + on output. + + -- Function: int gsl_linalg_QR_lssolve (const gsl_matrix * QR, const + gsl_vector * TAU, const gsl_vector * B, gsl_vector * X, + gsl_vector * RESIDUAL) + This function finds the least squares solution to the + overdetermined system A x = b where the matrix A has more rows than + columns. The least squares solution minimizes the Euclidean norm + of the residual, ||Ax - b||.The routine requires as input the QR + decomposition of A into (QR, TAU) given by `gsl_linalg_QR_decomp'. + The solution is returned in X. The residual is computed as a + by-product and stored in RESIDUAL. + + -- Function: int gsl_linalg_QR_QTvec (const gsl_matrix * QR, const + gsl_vector * TAU, gsl_vector * V) + This function applies the matrix Q^T encoded in the decomposition + (QR,TAU) to the vector V, storing the result Q^T v in V. The + matrix multiplication is carried out directly using the encoding + of the Householder vectors without needing to form the full matrix + Q^T. + + -- Function: int gsl_linalg_QR_Qvec (const gsl_matrix * QR, const + gsl_vector * TAU, gsl_vector * V) + This function applies the matrix Q encoded in the decomposition + (QR,TAU) to the vector V, storing the result Q v in V. The matrix + multiplication is carried out directly using the encoding of the + Householder vectors without needing to form the full matrix Q. + + -- Function: int gsl_linalg_QR_QTmat (const gsl_matrix * QR, const + gsl_vector * TAU, gsl_matrix * A) + This function applies the matrix Q^T encoded in the decomposition + (QR,TAU) to the matrix A, storing the result Q^T A in A. The + matrix multiplication is carried out directly using the encoding + of the Householder vectors without needing to form the full matrix + Q^T. + + -- Function: int gsl_linalg_QR_Rsolve (const gsl_matrix * QR, const + gsl_vector * B, gsl_vector * X) + This function solves the triangular system R x = b for X. It may + be useful if the product b' = Q^T b has already been computed + using `gsl_linalg_QR_QTvec'. + + -- Function: int gsl_linalg_QR_Rsvx (const gsl_matrix * QR, gsl_vector + * X) + This function solves the triangular system R x = b for X in-place. + On input X should contain the right-hand side b and is replaced by + the solution on output. This function may be useful if the product + b' = Q^T b has already been computed using `gsl_linalg_QR_QTvec'. + + -- Function: int gsl_linalg_QR_unpack (const gsl_matrix * QR, const + gsl_vector * TAU, gsl_matrix * Q, gsl_matrix * R) + This function unpacks the encoded QR decomposition (QR,TAU) into + the matrices Q and R, where Q is M-by-M and R is M-by-N. + + -- Function: int gsl_linalg_QR_QRsolve (gsl_matrix * Q, gsl_matrix * + R, const gsl_vector * B, gsl_vector * X) + This function solves the system R x = Q^T b for X. It can be used + when the QR decomposition of a matrix is available in unpacked + form as (Q, R). + + -- Function: int gsl_linalg_QR_update (gsl_matrix * Q, gsl_matrix * R, + gsl_vector * W, const gsl_vector * V) + This function performs a rank-1 update w v^T of the QR + decomposition (Q, R). The update is given by Q'R' = Q (R + w v^T) + where the output matrices Q' and R' are also orthogonal and right + triangular. Note that W is destroyed by the update. + + -- Function: int gsl_linalg_R_solve (const gsl_matrix * R, const + gsl_vector * B, gsl_vector * X) + This function solves the triangular system R x = b for the N-by-N + matrix R. + + -- Function: int gsl_linalg_R_svx (const gsl_matrix * R, gsl_vector * + X) + This function solves the triangular system R x = b in-place. On + input X should contain the right-hand side b, which is replaced by + the solution on output. + + +File: gsl-ref.info, Node: QR Decomposition with Column Pivoting, Next: Singular Value Decomposition, Prev: QR Decomposition, Up: Linear Algebra + +14.3 QR Decomposition with Column Pivoting +========================================== + +The QR decomposition can be extended to the rank deficient case by +introducing a column permutation P, + + A P = Q R + +The first r columns of Q form an orthonormal basis for the range of A +for a matrix with column rank r. This decomposition can also be used +to convert the linear system A x = b into the triangular system R y = +Q^T b, x = P y, which can be solved by back-substitution and +permutation. We denote the QR decomposition with column pivoting by +QRP^T since A = Q R P^T. + + -- Function: int gsl_linalg_QRPT_decomp (gsl_matrix * A, gsl_vector * + TAU, gsl_permutation * P, int * SIGNUM, gsl_vector * NORM) + This function factorizes the M-by-N matrix A into the QRP^T + decomposition A = Q R P^T. On output the diagonal and upper + triangular part of the input matrix contain the matrix R. The + permutation matrix P is stored in the permutation P. The sign of + the permutation is given by SIGNUM. It has the value (-1)^n, where + n is the number of interchanges in the permutation. The vector TAU + and the columns of the lower triangular part of the matrix A + contain the Householder coefficients and vectors which encode the + orthogonal matrix Q. The vector TAU must be of length + k=\min(M,N). The matrix Q is related to these components by, Q = + Q_k ... Q_2 Q_1 where Q_i = I - \tau_i v_i v_i^T and v_i is the + Householder vector v_i = (0,...,1,A(i+1,i),A(i+2,i),...,A(m,i)). + This is the same storage scheme as used by LAPACK. The vector + NORM is a workspace of length N used for column pivoting. + + The algorithm used to perform the decomposition is Householder QR + with column pivoting (Golub & Van Loan, `Matrix Computations', + Algorithm 5.4.1). + + -- Function: int gsl_linalg_QRPT_decomp2 (const gsl_matrix * A, + gsl_matrix * Q, gsl_matrix * R, gsl_vector * TAU, + gsl_permutation * P, int * SIGNUM, gsl_vector * NORM) + This function factorizes the matrix A into the decomposition A = Q + R P^T without modifying A itself and storing the output in the + separate matrices Q and R. + + -- Function: int gsl_linalg_QRPT_solve (const gsl_matrix * QR, const + gsl_vector * TAU, const gsl_permutation * P, const gsl_vector + * B, gsl_vector * X) + This function solves the square system A x = b using the QRP^T + decomposition of A held in (QR, TAU, P) which must have been + computed previously by `gsl_linalg_QRPT_decomp'. + + -- Function: int gsl_linalg_QRPT_svx (const gsl_matrix * QR, const + gsl_vector * TAU, const gsl_permutation * P, gsl_vector * X) + This function solves the square system A x = b in-place using the + QRP^T decomposition of A held in (QR,TAU,P). On input X should + contain the right-hand side b, which is replaced by the solution + on output. + + -- Function: int gsl_linalg_QRPT_QRsolve (const gsl_matrix * Q, const + gsl_matrix * R, const gsl_permutation * P, const gsl_vector * + B, gsl_vector * X) + This function solves the square system R P^T x = Q^T b for X. It + can be used when the QR decomposition of a matrix is available in + unpacked form as (Q, R). + + -- Function: int gsl_linalg_QRPT_update (gsl_matrix * Q, gsl_matrix * + R, const gsl_permutation * P, gsl_vector * W, const + gsl_vector * V) + This function performs a rank-1 update w v^T of the QRP^T + decomposition (Q, R, P). The update is given by Q'R' = Q (R + w + v^T P) where the output matrices Q' and R' are also orthogonal and + right triangular. Note that W is destroyed by the update. The + permutation P is not changed. + + -- Function: int gsl_linalg_QRPT_Rsolve (const gsl_matrix * QR, const + gsl_permutation * P, const gsl_vector * B, gsl_vector * X) + This function solves the triangular system R P^T x = b for the + N-by-N matrix R contained in QR. + + -- Function: int gsl_linalg_QRPT_Rsvx (const gsl_matrix * QR, const + gsl_permutation * P, gsl_vector * X) + This function solves the triangular system R P^T x = b in-place + for the N-by-N matrix R contained in QR. On input X should contain + the right-hand side b, which is replaced by the solution on output. + + +File: gsl-ref.info, Node: Singular Value Decomposition, Next: Cholesky Decomposition, Prev: QR Decomposition with Column Pivoting, Up: Linear Algebra + +14.4 Singular Value Decomposition +================================= + +A general rectangular M-by-N matrix A has a singular value +decomposition (SVD) into the product of an M-by-N orthogonal matrix U, +an N-by-N diagonal matrix of singular values S and the transpose of an +N-by-N orthogonal square matrix V, + + A = U S V^T + +The singular values \sigma_i = S_{ii} are all non-negative and are +generally chosen to form a non-increasing sequence \sigma_1 >= \sigma_2 +>= ... >= \sigma_N >= 0. + + The singular value decomposition of a matrix has many practical uses. +The condition number of the matrix is given by the ratio of the largest +singular value to the smallest singular value. The presence of a zero +singular value indicates that the matrix is singular. The number of +non-zero singular values indicates the rank of the matrix. In practice +singular value decomposition of a rank-deficient matrix will not produce +exact zeroes for singular values, due to finite numerical precision. +Small singular values should be edited by choosing a suitable tolerance. + + For a rank-deficient matrix, the null space of A is given by the +columns of V corresponding to the zero singular values. Similarly, the +range of A is given by columns of U corresponding to the non-zero +singular values. + + Note that the routines here compute the "thin" version of the SVD +with U as M-by-N orthogonal matrix. This allows in-place computation +and is the most commonly-used form in practice. Mathematically, the +"full" SVD is defined with U as an M-by-M orthogonal matrix and S as an +M-by-N diagonal matrix (with additional rows of zeros). + + -- Function: int gsl_linalg_SV_decomp (gsl_matrix * A, gsl_matrix * V, + gsl_vector * S, gsl_vector * WORK) + This function factorizes the M-by-N matrix A into the singular + value decomposition A = U S V^T for M >= N. On output the matrix + A is replaced by U. The diagonal elements of the singular value + matrix S are stored in the vector S. The singular values are + non-negative and form a non-increasing sequence from S_1 to S_N. + The matrix V contains the elements of V in untransposed form. To + form the product U S V^T it is necessary to take the transpose of + V. A workspace of length N is required in WORK. + + This routine uses the Golub-Reinsch SVD algorithm. + + -- Function: int gsl_linalg_SV_decomp_mod (gsl_matrix * A, gsl_matrix + * X, gsl_matrix * V, gsl_vector * S, gsl_vector * WORK) + This function computes the SVD using the modified Golub-Reinsch + algorithm, which is faster for M>>N. It requires the vector WORK + of length N and the N-by-N matrix X as additional working space. + + -- Function: int gsl_linalg_SV_decomp_jacobi (gsl_matrix * A, + gsl_matrix * V, gsl_vector * S) + This function computes the SVD of the M-by-N matrix A using + one-sided Jacobi orthogonalization for M >= N. The Jacobi method + can compute singular values to higher relative accuracy than + Golub-Reinsch algorithms (see references for details). + + -- Function: int gsl_linalg_SV_solve (const gsl_matrix * U, const + gsl_matrix * V, const gsl_vector * S, const gsl_vector * B, + gsl_vector * X) + This function solves the system A x = b using the singular value + decomposition (U, S, V) of A which must have been computed + previously with `gsl_linalg_SV_decomp'. + + Only non-zero singular values are used in computing the solution. + The parts of the solution corresponding to singular values of zero + are ignored. Other singular values can be edited out by setting + them to zero before calling this function. + + In the over-determined case where A has more rows than columns the + system is solved in the least squares sense, returning the solution + X which minimizes ||A x - b||_2. + + +File: gsl-ref.info, Node: Cholesky Decomposition, Next: Tridiagonal Decomposition of Real Symmetric Matrices, Prev: Singular Value Decomposition, Up: Linear Algebra + +14.5 Cholesky Decomposition +=========================== + +A symmetric, positive definite square matrix A has a Cholesky +decomposition into a product of a lower triangular matrix L and its +transpose L^T, + + A = L L^T + +This is sometimes referred to as taking the square-root of a matrix. The +Cholesky decomposition can only be carried out when all the eigenvalues +of the matrix are positive. This decomposition can be used to convert +the linear system A x = b into a pair of triangular systems (L y = b, +L^T x = y), which can be solved by forward and back-substitution. + + -- Function: int gsl_linalg_cholesky_decomp (gsl_matrix * A) + -- Function: int gsl_linalg_complex_cholesky_decomp + (gsl_matrix_complex * A) + These functions factorize the symmetric, positive-definite square + matrix A into the Cholesky decomposition A = L L^T (or A = L L^H + for the complex case). On input, the values from the diagonal and + lower-triangular part of the matrix A are used (the upper + triangular part is ignored). On output the diagonal and lower + triangular part of the input matrix A contain the matrix L, while + the upper triangular part of the input matrix is overwritten with + L^T (the diagonal terms being identical for both L and L^T). If + the matrix is not positive-definite then the decomposition will + fail, returning the error code `GSL_EDOM'. + + When testing whether a matrix is positive-definite, disable the + error handler first to avoid triggering an error. + + -- Function: int gsl_linalg_cholesky_solve (const gsl_matrix * + CHOLESKY, const gsl_vector * B, gsl_vector * X) + -- Function: int gsl_linalg_complex_cholesky_solve (const + gsl_matrix_complex * CHOLESKY, const gsl_vector_complex * B, + gsl_vector_complex * X) + These functions solve the system A x = b using the Cholesky + decomposition of A held in the matrix CHOLESKY which must have + been previously computed by `gsl_linalg_cholesky_decomp' or + `gsl_linalg_complex_cholesky_decomp'. + + -- Function: int gsl_linalg_cholesky_svx (const gsl_matrix * CHOLESKY, + gsl_vector * X) + -- Function: int gsl_linalg_complex_cholesky_svx (const + gsl_matrix_complex * CHOLESKY, gsl_vector_complex * X) + These functions solve the system A x = b in-place using the + Cholesky decomposition of A held in the matrix CHOLESKY which must + have been previously computed by `gsl_linalg_cholesky_decomp' or + `gsl_linalg_complex_cholesky_decomp'. On input X should contain + the right-hand side b, which is replaced by the solution on output. + + -- Function: int gsl_linalg_cholesky_invert (gsl_matrix * CHOLESKY) + -- Function: int gsl_linalg_complex_cholesky_invert + (gsl_matrix_complex * CHOLESKY) + These functions compute the inverse of a matrix from its Cholesky + decomposition CHOLESKY, which must have been previously computed + by `gsl_linalg_cholesky_decomp' or + `gsl_linalg_complex_cholesky_decomp'. On output, the inverse is + stored in-place in CHOLESKY. + + +File: gsl-ref.info, Node: Tridiagonal Decomposition of Real Symmetric Matrices, Next: Tridiagonal Decomposition of Hermitian Matrices, Prev: Cholesky Decomposition, Up: Linear Algebra + +14.6 Tridiagonal Decomposition of Real Symmetric Matrices +========================================================= + +A symmetric matrix A can be factorized by similarity transformations +into the form, + + A = Q T Q^T + +where Q is an orthogonal matrix and T is a symmetric tridiagonal matrix. + + -- Function: int gsl_linalg_symmtd_decomp (gsl_matrix * A, gsl_vector + * TAU) + This function factorizes the symmetric square matrix A into the + symmetric tridiagonal decomposition Q T Q^T. On output the + diagonal and subdiagonal part of the input matrix A contain the + tridiagonal matrix T. The remaining lower triangular part of the + input matrix contains the Householder vectors which, together with + the Householder coefficients TAU, encode the orthogonal matrix Q. + This storage scheme is the same as used by LAPACK. The upper + triangular part of A is not referenced. + + -- Function: int gsl_linalg_symmtd_unpack (const gsl_matrix * A, const + gsl_vector * TAU, gsl_matrix * Q, gsl_vector * DIAG, + gsl_vector * SUBDIAG) + This function unpacks the encoded symmetric tridiagonal + decomposition (A, TAU) obtained from `gsl_linalg_symmtd_decomp' + into the orthogonal matrix Q, the vector of diagonal elements DIAG + and the vector of subdiagonal elements SUBDIAG. + + -- Function: int gsl_linalg_symmtd_unpack_T (const gsl_matrix * A, + gsl_vector * DIAG, gsl_vector * SUBDIAG) + This function unpacks the diagonal and subdiagonal of the encoded + symmetric tridiagonal decomposition (A, TAU) obtained from + `gsl_linalg_symmtd_decomp' into the vectors DIAG and SUBDIAG. + + +File: gsl-ref.info, Node: Tridiagonal Decomposition of Hermitian Matrices, Next: Hessenberg Decomposition of Real Matrices, Prev: Tridiagonal Decomposition of Real Symmetric Matrices, Up: Linear Algebra + +14.7 Tridiagonal Decomposition of Hermitian Matrices +==================================================== + +A hermitian matrix A can be factorized by similarity transformations +into the form, + + A = U T U^T + +where U is a unitary matrix and T is a real symmetric tridiagonal +matrix. + + -- Function: int gsl_linalg_hermtd_decomp (gsl_matrix_complex * A, + gsl_vector_complex * TAU) + This function factorizes the hermitian matrix A into the symmetric + tridiagonal decomposition U T U^T. On output the real parts of + the diagonal and subdiagonal part of the input matrix A contain + the tridiagonal matrix T. The remaining lower triangular part of + the input matrix contains the Householder vectors which, together + with the Householder coefficients TAU, encode the unitary matrix + U. This storage scheme is the same as used by LAPACK. The upper + triangular part of A and imaginary parts of the diagonal are not + referenced. + + -- Function: int gsl_linalg_hermtd_unpack (const gsl_matrix_complex * + A, const gsl_vector_complex * TAU, gsl_matrix_complex * U, + gsl_vector * DIAG, gsl_vector * SUBDIAG) + This function unpacks the encoded tridiagonal decomposition (A, + TAU) obtained from `gsl_linalg_hermtd_decomp' into the unitary + matrix U, the real vector of diagonal elements DIAG and the real + vector of subdiagonal elements SUBDIAG. + + -- Function: int gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex + * A, gsl_vector * DIAG, gsl_vector * SUBDIAG) + This function unpacks the diagonal and subdiagonal of the encoded + tridiagonal decomposition (A, TAU) obtained from the + `gsl_linalg_hermtd_decomp' into the real vectors DIAG and SUBDIAG. + + +File: gsl-ref.info, Node: Hessenberg Decomposition of Real Matrices, Next: Hessenberg-Triangular Decomposition of Real Matrices, Prev: Tridiagonal Decomposition of Hermitian Matrices, Up: Linear Algebra + +14.8 Hessenberg Decomposition of Real Matrices +============================================== + +A general real matrix A can be decomposed by orthogonal similarity +transformations into the form + + A = U H U^T + + where U is orthogonal and H is an upper Hessenberg matrix, meaning +that it has zeros below the first subdiagonal. The Hessenberg reduction +is the first step in the Schur decomposition for the nonsymmetric +eigenvalue problem, but has applications in other areas as well. + + -- Function: int gsl_linalg_hessenberg_decomp (gsl_matrix * A, + gsl_vector * TAU) + This function computes the Hessenberg decomposition of the matrix + A by applying the similarity transformation H = U^T A U. On + output, H is stored in the upper portion of A. The information + required to construct the matrix U is stored in the lower + triangular portion of A. U is a product of N - 2 Householder + matrices. The Householder vectors are stored in the lower portion + of A (below the subdiagonal) and the Householder coefficients are + stored in the vector TAU. TAU must be of length N. + + -- Function: int gsl_linalg_hessenberg_unpack (gsl_matrix * H, + gsl_vector * TAU, gsl_matrix * U) + This function constructs the orthogonal matrix U from the + information stored in the Hessenberg matrix H along with the + vector TAU. H and TAU are outputs from + `gsl_linalg_hessenberg_decomp'. + + -- Function: int gsl_linalg_hessenberg_unpack_accum (gsl_matrix * H, + gsl_vector * TAU, gsl_matrix * V) + This function is similar to `gsl_linalg_hessenberg_unpack', except + it accumulates the matrix U into V, so that V' = VU. The matrix V + must be initialized prior to calling this function. Setting V to + the identity matrix provides the same result as + `gsl_linalg_hessenberg_unpack'. If H is order N, then V must have + N columns but may have any number of rows. + + -- Function: int gsl_linalg_hessenberg_set_zero (gsl_matrix * H) + This function sets the lower triangular portion of H, below the + subdiagonal, to zero. It is useful for clearing out the + Householder vectors after calling `gsl_linalg_hessenberg_decomp'. + + +File: gsl-ref.info, Node: Hessenberg-Triangular Decomposition of Real Matrices, Next: Bidiagonalization, Prev: Hessenberg Decomposition of Real Matrices, Up: Linear Algebra + +14.9 Hessenberg-Triangular Decomposition of Real Matrices +========================================================= + +A general real matrix pair (A, B) can be decomposed by orthogonal +similarity transformations into the form + + A = U H V^T + B = U R V^T + + where U and V are orthogonal, H is an upper Hessenberg matrix, and R +is upper triangular. The Hessenberg-Triangular reduction is the first +step in the generalized Schur decomposition for the generalized +eigenvalue problem. + + -- Function: int gsl_linalg_hesstri_decomp (gsl_matrix * A, gsl_matrix + * B, gsl_matrix * U, gsl_matrix * V, gsl_vector * WORK) + This function computes the Hessenberg-Triangular decomposition of + the matrix pair (A, B). On output, H is stored in A, and R is + stored in B. If U and V are provided (they may be null), the + similarity transformations are stored in them. Additional + workspace of length N is needed in WORK. + + +File: gsl-ref.info, Node: Bidiagonalization, Next: Householder Transformations, Prev: Hessenberg-Triangular Decomposition of Real Matrices, Up: Linear Algebra + +14.10 Bidiagonalization +======================= + +A general matrix A can be factorized by similarity transformations into +the form, + + A = U B V^T + +where U and V are orthogonal matrices and B is a N-by-N bidiagonal +matrix with non-zero entries only on the diagonal and superdiagonal. +The size of U is M-by-N and the size of V is N-by-N. + + -- Function: int gsl_linalg_bidiag_decomp (gsl_matrix * A, gsl_vector + * TAU_U, gsl_vector * TAU_V) + This function factorizes the M-by-N matrix A into bidiagonal form + U B V^T. The diagonal and superdiagonal of the matrix B are + stored in the diagonal and superdiagonal of A. The orthogonal + matrices U and V are stored as compressed Householder vectors in + the remaining elements of A. The Householder coefficients are + stored in the vectors TAU_U and TAU_V. The length of TAU_U must + equal the number of elements in the diagonal of A and the length + of TAU_V should be one element shorter. + + -- Function: int gsl_linalg_bidiag_unpack (const gsl_matrix * A, const + gsl_vector * TAU_U, gsl_matrix * U, const gsl_vector * TAU_V, + gsl_matrix * V, gsl_vector * DIAG, gsl_vector * SUPERDIAG) + This function unpacks the bidiagonal decomposition of A produced by + `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate + orthogonal matrices U, V and the diagonal vector DIAG and + superdiagonal SUPERDIAG. Note that U is stored as a compact + M-by-N orthogonal matrix satisfying U^T U = I for efficiency. + + -- Function: int gsl_linalg_bidiag_unpack2 (gsl_matrix * A, gsl_vector + * TAU_U, gsl_vector * TAU_V, gsl_matrix * V) + This function unpacks the bidiagonal decomposition of A produced by + `gsl_linalg_bidiag_decomp', (A, TAU_U, TAU_V) into the separate + orthogonal matrices U, V and the diagonal vector DIAG and + superdiagonal SUPERDIAG. The matrix U is stored in-place in A. + + -- Function: int gsl_linalg_bidiag_unpack_B (const gsl_matrix * A, + gsl_vector * DIAG, gsl_vector * SUPERDIAG) + This function unpacks the diagonal and superdiagonal of the + bidiagonal decomposition of A from `gsl_linalg_bidiag_decomp', into + the diagonal vector DIAG and superdiagonal vector SUPERDIAG. + + +File: gsl-ref.info, Node: Householder Transformations, Next: Householder solver for linear systems, Prev: Bidiagonalization, Up: Linear Algebra + +14.11 Householder Transformations +================================= + +A Householder transformation is a rank-1 modification of the identity +matrix which can be used to zero out selected elements of a vector. A +Householder matrix P takes the form, + + P = I - \tau v v^T + +where v is a vector (called the "Householder vector") and \tau = 2/(v^T +v). The functions described in this section use the rank-1 structure +of the Householder matrix to create and apply Householder +transformations efficiently. + + -- Function: double gsl_linalg_householder_transform (gsl_vector * V) + -- Function: gsl_complex gsl_linalg_complex_householder_transform + (gsl_vector_complex * V) + This function prepares a Householder transformation P = I - \tau v + v^T which can be used to zero all the elements of the input vector + except the first. On output the transformation is stored in the + vector V and the scalar \tau is returned. + + -- Function: int gsl_linalg_householder_hm (double TAU, const + gsl_vector * V, gsl_matrix * A) + -- Function: int gsl_linalg_complex_householder_hm (gsl_complex TAU, + const gsl_vector_complex * V, gsl_matrix_complex * A) + This function applies the Householder matrix P defined by the + scalar TAU and the vector V to the left-hand side of the matrix A. + On output the result P A is stored in A. + + -- Function: int gsl_linalg_householder_mh (double TAU, const + gsl_vector * V, gsl_matrix * A) + -- Function: int gsl_linalg_complex_householder_mh (gsl_complex TAU, + const gsl_vector_complex * V, gsl_matrix_complex * A) + This function applies the Householder matrix P defined by the + scalar TAU and the vector V to the right-hand side of the matrix + A. On output the result A P is stored in A. + + -- Function: int gsl_linalg_householder_hv (double TAU, const + gsl_vector * V, gsl_vector * W) + -- Function: int gsl_linalg_complex_householder_hv (gsl_complex TAU, + const gsl_vector_complex * V, gsl_vector_complex * W) + This function applies the Householder transformation P defined by + the scalar TAU and the vector V to the vector W. On output the + result P w is stored in W. + + +File: gsl-ref.info, Node: Householder solver for linear systems, Next: Tridiagonal Systems, Prev: Householder Transformations, Up: Linear Algebra + +14.12 Householder solver for linear systems +=========================================== + + -- Function: int gsl_linalg_HH_solve (gsl_matrix * A, const gsl_vector + * B, gsl_vector * X) + This function solves the system A x = b directly using Householder + transformations. On output the solution is stored in X and B is + not modified. The matrix A is destroyed by the Householder + transformations. + + -- Function: int gsl_linalg_HH_svx (gsl_matrix * A, gsl_vector * X) + This function solves the system A x = b in-place using Householder + transformations. On input X should contain the right-hand side b, + which is replaced by the solution on output. The matrix A is + destroyed by the Householder transformations. + + +File: gsl-ref.info, Node: Tridiagonal Systems, Next: Balancing, Prev: Householder solver for linear systems, Up: Linear Algebra + +14.13 Tridiagonal Systems +========================= + +The functions described in this section efficiently solve symmetric, +non-symmetric and cyclic tridiagonal systems with minimal storage. +Note that the current implementations of these functions use a variant +of Cholesky decomposition, so the tridiagonal matrix must be positive +definite. For non-positive definite matrices, the functions return the +error code `GSL_ESING'. + + -- Function: int gsl_linalg_solve_tridiag (const gsl_vector * DIAG, + const gsl_vector * E, const gsl_vector * F, const gsl_vector + * B, gsl_vector * X) + This function solves the general N-by-N system A x = b where A is + tridiagonal (N >= 2). The super-diagonal and sub-diagonal vectors + E and F must be one element shorter than the diagonal vector DIAG. + The form of A for the 4-by-4 case is shown below, + + A = ( d_0 e_0 0 0 ) + ( f_0 d_1 e_1 0 ) + ( 0 f_1 d_2 e_2 ) + ( 0 0 f_2 d_3 ) + + + -- Function: int gsl_linalg_solve_symm_tridiag (const gsl_vector * + DIAG, const gsl_vector * E, const gsl_vector * B, gsl_vector + * X) + This function solves the general N-by-N system A x = b where A is + symmetric tridiagonal (N >= 2). The off-diagonal vector E must be + one element shorter than the diagonal vector DIAG. The form of A + for the 4-by-4 case is shown below, + + A = ( d_0 e_0 0 0 ) + ( e_0 d_1 e_1 0 ) + ( 0 e_1 d_2 e_2 ) + ( 0 0 e_2 d_3 ) + + -- Function: int gsl_linalg_solve_cyc_tridiag (const gsl_vector * + DIAG, const gsl_vector * E, const gsl_vector * F, const + gsl_vector * B, gsl_vector * X) + This function solves the general N-by-N system A x = b where A is + cyclic tridiagonal (N >= 3). The cyclic super-diagonal and + sub-diagonal vectors E and F must have the same number of elements + as the diagonal vector DIAG. The form of A for the 4-by-4 case is + shown below, + + A = ( d_0 e_0 0 f_3 ) + ( f_0 d_1 e_1 0 ) + ( 0 f_1 d_2 e_2 ) + ( e_3 0 f_2 d_3 ) + + -- Function: int gsl_linalg_solve_symm_cyc_tridiag (const gsl_vector * + DIAG, const gsl_vector * E, const gsl_vector * B, gsl_vector + * X) + This function solves the general N-by-N system A x = b where A is + symmetric cyclic tridiagonal (N >= 3). The cyclic off-diagonal + vector E must have the same number of elements as the diagonal + vector DIAG. The form of A for the 4-by-4 case is shown below, + + A = ( d_0 e_0 0 e_3 ) + ( e_0 d_1 e_1 0 ) + ( 0 e_1 d_2 e_2 ) + ( e_3 0 e_2 d_3 ) + + +File: gsl-ref.info, Node: Balancing, Next: Linear Algebra Examples, Prev: Tridiagonal Systems, Up: Linear Algebra + +14.14 Balancing +=============== + +The process of balancing a matrix applies similarity transformations to +make the rows and columns have comparable norms. This is useful, for +example, to reduce roundoff errors in the solution of eigenvalue +problems. Balancing a matrix A consists of replacing A with a similar +matrix + + A' = D^(-1) A D + + where D is a diagonal matrix whose entries are powers of the +floating point radix. + + -- Function: int gsl_linalg_balance_matrix (gsl_matrix * A, gsl_vector + * D) + This function replaces the matrix A with its balanced counterpart + and stores the diagonal elements of the similarity transformation + into the vector D. + + +File: gsl-ref.info, Node: Linear Algebra Examples, Next: Linear Algebra References and Further Reading, Prev: Balancing, Up: Linear Algebra + +14.15 Examples +============== + +The following program solves the linear system A x = b. The system to +be solved is, + + [ 0.18 0.60 0.57 0.96 ] [x0] [1.0] + [ 0.41 0.24 0.99 0.58 ] [x1] = [2.0] + [ 0.14 0.30 0.97 0.66 ] [x2] [3.0] + [ 0.51 0.13 0.19 0.85 ] [x3] [4.0] + +and the solution is found using LU decomposition of the matrix A. + + #include + #include + + int + main (void) + { + double a_data[] = { 0.18, 0.60, 0.57, 0.96, + 0.41, 0.24, 0.99, 0.58, + 0.14, 0.30, 0.97, 0.66, + 0.51, 0.13, 0.19, 0.85 }; + + double b_data[] = { 1.0, 2.0, 3.0, 4.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (a_data, 4, 4); + + gsl_vector_view b + = gsl_vector_view_array (b_data, 4); + + gsl_vector *x = gsl_vector_alloc (4); + + int s; + + gsl_permutation * p = gsl_permutation_alloc (4); + + gsl_linalg_LU_decomp (&m.matrix, p, &s); + + gsl_linalg_LU_solve (&m.matrix, p, &b.vector, x); + + printf ("x = \n"); + gsl_vector_fprintf (stdout, x, "%g"); + + gsl_permutation_free (p); + gsl_vector_free (x); + return 0; + } + +Here is the output from the program, + + x = -4.05205 + -12.6056 + 1.66091 + 8.69377 + +This can be verified by multiplying the solution x by the original +matrix A using GNU OCTAVE, + + octave> A = [ 0.18, 0.60, 0.57, 0.96; + 0.41, 0.24, 0.99, 0.58; + 0.14, 0.30, 0.97, 0.66; + 0.51, 0.13, 0.19, 0.85 ]; + + octave> x = [ -4.05205; -12.6056; 1.66091; 8.69377]; + + octave> A * x + ans = + 1.0000 + 2.0000 + 3.0000 + 4.0000 + +This reproduces the original right-hand side vector, b, in accordance +with the equation A x = b. + + +File: gsl-ref.info, Node: Linear Algebra References and Further Reading, Prev: Linear Algebra Examples, Up: Linear Algebra + +14.16 References and Further Reading +==================================== + +Further information on the algorithms described in this section can be +found in the following book, + + G. H. Golub, C. F. Van Loan, `Matrix Computations' (3rd Ed, 1996), + Johns Hopkins University Press, ISBN 0-8018-5414-8. + +The LAPACK library is described in the following manual, + + `LAPACK Users' Guide' (Third Edition, 1999), Published by SIAM, + ISBN 0-89871-447-8. + + `http://www.netlib.org/lapack' + +The LAPACK source code can be found at the website above, along with an +online copy of the users guide. + +The Modified Golub-Reinsch algorithm is described in the following +paper, + + T.F. Chan, "An Improved Algorithm for Computing the Singular Value + Decomposition", `ACM Transactions on Mathematical Software', 8 + (1982), pp 72-83. + +The Jacobi algorithm for singular value decomposition is described in +the following papers, + + J.C. Nash, "A one-sided transformation method for the singular + value decomposition and algebraic eigenproblem", `Computer + Journal', Volume 18, Number 1 (1975), p 74-76 + + J.C. Nash and S. Shlien "Simple algorithms for the partial singular + value decomposition", `Computer Journal', Volume 30 (1987), p + 268-275. + + James Demmel, Kresn_evals'. The + converged eigenvalues are stored in the beginning of EVAL. + + -- Function: int gsl_eigen_nonsymm_Z (gsl_matrix * A, + gsl_vector_complex * EVAL, gsl_matrix * Z, + gsl_eigen_nonsymm_workspace * W) + This function is identical to `gsl_eigen_nonsymm' except that it + also computes the Schur vectors and stores them into Z. + + -- Function: gsl_eigen_nonsymmv_workspace * gsl_eigen_nonsymmv_alloc + (const size_t N) + This function allocates a workspace for computing eigenvalues and + eigenvectors of N-by-N real nonsymmetric matrices. The size of the + workspace is O(5n). + + -- Function: void gsl_eigen_nonsymmv_free + (gsl_eigen_nonsymmv_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: void gsl_eigen_nonsymmv_params (const int BALANCE, + gsl_eigen_nonsymm_workspace * W) + This function sets parameters which determine how the eigenvalue + problem is solved in subsequent calls to `gsl_eigen_nonsymmv'. If + BALANCE is set to 1, a balancing transformation is applied to the + matrix. See `gsl_eigen_nonsymm_params' for more information. + Balancing is turned off by default since it does not preserve the + orthogonality of the Schur vectors. + + -- Function: int gsl_eigen_nonsymmv (gsl_matrix * A, + gsl_vector_complex * EVAL, gsl_matrix_complex * EVEC, + gsl_eigen_nonsymmv_workspace * W) + This function computes eigenvalues and right eigenvectors of the + N-by-N real nonsymmetric matrix A. It first calls + `gsl_eigen_nonsymm' to compute the eigenvalues, Schur form T, and + Schur vectors. Then it finds eigenvectors of T and backtransforms + them using the Schur vectors. The Schur vectors are destroyed in + the process, but can be saved by using `gsl_eigen_nonsymmv_Z'. The + computed eigenvectors are normalized to have unit magnitude. On + output, the upper portion of A contains the Schur form T. If + `gsl_eigen_nonsymm' fails, no eigenvectors are computed, and an + error code is returned. + + -- Function: int gsl_eigen_nonsymmv_Z (gsl_matrix * A, + gsl_vector_complex * EVAL, gsl_matrix_complex * EVEC, + gsl_matrix * Z, gsl_eigen_nonsymmv_workspace * W) + This function is identical to `gsl_eigen_nonsymmv' except that it + also saves the Schur vectors into Z. + + +File: gsl-ref.info, Node: Real Generalized Symmetric-Definite Eigensystems, Next: Complex Generalized Hermitian-Definite Eigensystems, Prev: Real Nonsymmetric Matrices, Up: Eigensystems + +15.4 Real Generalized Symmetric-Definite Eigensystems +===================================================== + +The real generalized symmetric-definite eigenvalue problem is to find +eigenvalues \lambda and eigenvectors x such that + A x = \lambda B x + where A and B are symmetric matrices, and B is positive-definite. +This problem reduces to the standard symmetric eigenvalue problem by +applying the Cholesky decomposition to B: + A x = \lambda B x + A x = \lambda L L^t x + ( L^{-1} A L^{-t} ) L^t x = \lambda L^t x + Therefore, the problem becomes C y = \lambda y where C = L^{-1} A +L^{-t} is symmetric, and y = L^t x. The standard symmetric eigensolver +can be applied to the matrix C. The resulting eigenvectors are +backtransformed to find the vectors of the original problem. The +eigenvalues and eigenvectors of the generalized symmetric-definite +eigenproblem are always real. + + -- Function: gsl_eigen_gensymm_workspace * gsl_eigen_gensymm_alloc + (const size_t N) + This function allocates a workspace for computing eigenvalues of + N-by-N real generalized symmetric-definite eigensystems. The size + of the workspace is O(2n). + + -- Function: void gsl_eigen_gensymm_free (gsl_eigen_gensymm_workspace + * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_eigen_gensymm (gsl_matrix * A, gsl_matrix * B, + gsl_vector * EVAL, gsl_eigen_gensymm_workspace * W) + This function computes the eigenvalues of the real generalized + symmetric-definite matrix pair (A, B), and stores them in EVAL, + using the method outlined above. On output, B contains its + Cholesky decomposition and A is destroyed. + + -- Function: gsl_eigen_gensymmv_workspace * gsl_eigen_gensymmv_alloc + (const size_t N) + This function allocates a workspace for computing eigenvalues and + eigenvectors of N-by-N real generalized symmetric-definite + eigensystems. The size of the workspace is O(4n). + + -- Function: void gsl_eigen_gensymmv_free + (gsl_eigen_gensymmv_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_eigen_gensymmv (gsl_matrix * A, gsl_matrix * B, + gsl_vector * EVAL, gsl_matrix * EVEC, + gsl_eigen_gensymmv_workspace * W) + This function computes the eigenvalues and eigenvectors of the real + generalized symmetric-definite matrix pair (A, B), and stores them + in EVAL and EVEC respectively. The computed eigenvectors are + normalized to have unit magnitude. On output, B contains its + Cholesky decomposition and A is destroyed. + + +File: gsl-ref.info, Node: Complex Generalized Hermitian-Definite Eigensystems, Next: Real Generalized Nonsymmetric Eigensystems, Prev: Real Generalized Symmetric-Definite Eigensystems, Up: Eigensystems + +15.5 Complex Generalized Hermitian-Definite Eigensystems +======================================================== + +The complex generalized hermitian-definite eigenvalue problem is to find +eigenvalues \lambda and eigenvectors x such that + A x = \lambda B x + where A and B are hermitian matrices, and B is positive-definite. +Similarly to the real case, this can be reduced to C y = \lambda y where +C = L^{-1} A L^{-H} is hermitian, and y = L^H x. The standard hermitian +eigensolver can be applied to the matrix C. The resulting eigenvectors +are backtransformed to find the vectors of the original problem. The +eigenvalues of the generalized hermitian-definite eigenproblem are +always real. + + -- Function: gsl_eigen_genherm_workspace * gsl_eigen_genherm_alloc + (const size_t N) + This function allocates a workspace for computing eigenvalues of + N-by-N complex generalized hermitian-definite eigensystems. The + size of the workspace is O(3n). + + -- Function: void gsl_eigen_genherm_free (gsl_eigen_genherm_workspace + * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_eigen_genherm (gsl_matrix_complex * A, + gsl_matrix_complex * B, gsl_vector * EVAL, + gsl_eigen_genherm_workspace * W) + This function computes the eigenvalues of the complex generalized + hermitian-definite matrix pair (A, B), and stores them in EVAL, + using the method outlined above. On output, B contains its + Cholesky decomposition and A is destroyed. + + -- Function: gsl_eigen_genhermv_workspace * gsl_eigen_genhermv_alloc + (const size_t N) + This function allocates a workspace for computing eigenvalues and + eigenvectors of N-by-N complex generalized hermitian-definite + eigensystems. The size of the workspace is O(5n). + + -- Function: void gsl_eigen_genhermv_free + (gsl_eigen_genhermv_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_eigen_genhermv (gsl_matrix_complex * A, + gsl_matrix_complex * B, gsl_vector * EVAL, gsl_matrix_complex + * EVEC, gsl_eigen_genhermv_workspace * W) + This function computes the eigenvalues and eigenvectors of the + complex generalized hermitian-definite matrix pair (A, B), and + stores them in EVAL and EVEC respectively. The computed + eigenvectors are normalized to have unit magnitude. On output, B + contains its Cholesky decomposition and A is destroyed. + + +File: gsl-ref.info, Node: Real Generalized Nonsymmetric Eigensystems, Next: Sorting Eigenvalues and Eigenvectors, Prev: Complex Generalized Hermitian-Definite Eigensystems, Up: Eigensystems + +15.6 Real Generalized Nonsymmetric Eigensystems +=============================================== + +Given two square matrices (A, B), the generalized nonsymmetric +eigenvalue problem is to find eigenvalues \lambda and eigenvectors x +such that + A x = \lambda B x + We may also define the problem as finding eigenvalues \mu and +eigenvectors y such that + \mu A y = B y + Note that these two problems are equivalent (with \lambda = 1/\mu) +if neither \lambda nor \mu is zero. If say, \lambda is zero, then it is +still a well defined eigenproblem, but its alternate problem involving +\mu is not. Therefore, to allow for zero (and infinite) eigenvalues, +the problem which is actually solved is + \beta A x = \alpha B x + The eigensolver routines below will return two values \alpha and +\beta and leave it to the user to perform the divisions \lambda = +\alpha / \beta and \mu = \beta / \alpha. + + If the determinant of the matrix pencil A - \lambda B is zero for +all \lambda, the problem is said to be singular; otherwise it is called +regular. Singularity normally leads to some \alpha = \beta = 0 which +means the eigenproblem is ill-conditioned and generally does not have +well defined eigenvalue solutions. The routines below are intended for +regular matrix pencils and could yield unpredictable results when +applied to singular pencils. + + The solution of the real generalized nonsymmetric eigensystem +problem for a matrix pair (A, B) involves computing the generalized +Schur decomposition + A = Q S Z^T + B = Q T Z^T + where Q and Z are orthogonal matrices of left and right Schur +vectors respectively, and (S, T) is the generalized Schur form whose +diagonal elements give the \alpha and \beta values. The algorithm used +is the QZ method due to Moler and Stewart (see references). + + -- Function: gsl_eigen_gen_workspace * gsl_eigen_gen_alloc (const + size_t N) + This function allocates a workspace for computing eigenvalues of + N-by-N real generalized nonsymmetric eigensystems. The size of the + workspace is O(n). + + -- Function: void gsl_eigen_gen_free (gsl_eigen_gen_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: void gsl_eigen_gen_params (const int COMPUTE_S, const int + COMPUTE_T, const int BALANCE, gsl_eigen_gen_workspace * W) + This function sets some parameters which determine how the + eigenvalue problem is solved in subsequent calls to + `gsl_eigen_gen'. + + If COMPUTE_S is set to 1, the full Schur form S will be computed + by `gsl_eigen_gen'. If it is set to 0, S will not be computed + (this is the default setting). S is a quasi upper triangular + matrix with 1-by-1 and 2-by-2 blocks on its diagonal. 1-by-1 + blocks correspond to real eigenvalues, and 2-by-2 blocks + correspond to complex eigenvalues. + + If COMPUTE_T is set to 1, the full Schur form T will be computed + by `gsl_eigen_gen'. If it is set to 0, T will not be computed + (this is the default setting). T is an upper triangular matrix + with non-negative elements on its diagonal. Any 2-by-2 blocks in + S will correspond to a 2-by-2 diagonal block in T. + + The BALANCE parameter is currently ignored, since generalized + balancing is not yet implemented. + + -- Function: int gsl_eigen_gen (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * ALPHA, gsl_vector * BETA, + gsl_eigen_gen_workspace * W) + This function computes the eigenvalues of the real generalized + nonsymmetric matrix pair (A, B), and stores them as pairs in + (ALPHA, BETA), where ALPHA is complex and BETA is real. If \beta_i + is non-zero, then \lambda = \alpha_i / \beta_i is an eigenvalue. + Likewise, if \alpha_i is non-zero, then \mu = \beta_i / \alpha_i + is an eigenvalue of the alternate problem \mu A y = B y. The + elements of BETA are normalized to be non-negative. + + If S is desired, it is stored in A on output. If T is desired, it + is stored in B on output. The ordering of eigenvalues in (ALPHA, + BETA) follows the ordering of the diagonal blocks in the Schur + forms S and T. In rare cases, this function may fail to find all + eigenvalues. If this occurs, an error code is returned. + + -- Function: int gsl_eigen_gen_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * ALPHA, gsl_vector * BETA, gsl_matrix * + Q, gsl_matrix * Z, gsl_eigen_gen_workspace * W) + This function is identical to `gsl_eigen_gen' except that it also + computes the left and right Schur vectors and stores them into Q + and Z respectively. + + -- Function: gsl_eigen_genv_workspace * gsl_eigen_genv_alloc (const + size_t N) + This function allocates a workspace for computing eigenvalues and + eigenvectors of N-by-N real generalized nonsymmetric eigensystems. + The size of the workspace is O(7n). + + -- Function: void gsl_eigen_genv_free (gsl_eigen_genv_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_eigen_genv (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * ALPHA, gsl_vector * BETA, + gsl_matrix_complex * EVEC, gsl_eigen_genv_workspace * W) + This function computes eigenvalues and right eigenvectors of the + N-by-N real generalized nonsymmetric matrix pair (A, B). The + eigenvalues are stored in (ALPHA, BETA) and the eigenvectors are + stored in EVEC. It first calls `gsl_eigen_gen' to compute the + eigenvalues, Schur forms, and Schur vectors. Then it finds + eigenvectors of the Schur forms and backtransforms them using the + Schur vectors. The Schur vectors are destroyed in the process, but + can be saved by using `gsl_eigen_genv_QZ'. The computed + eigenvectors are normalized to have unit magnitude. On output, (A, + B) contains the generalized Schur form (S, T). If `gsl_eigen_gen' + fails, no eigenvectors are computed, and an error code is returned. + + -- Function: int gsl_eigen_genv_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * ALPHA, gsl_vector * BETA, + gsl_matrix_complex * EVEC, gsl_matrix * Q, gsl_matrix * Z, + gsl_eigen_genv_workspace * W) + This function is identical to `gsl_eigen_genv' except that it also + computes the left and right Schur vectors and stores them into Q + and Z respectively. + + +File: gsl-ref.info, Node: Sorting Eigenvalues and Eigenvectors, Next: Eigenvalue and Eigenvector Examples, Prev: Real Generalized Nonsymmetric Eigensystems, Up: Eigensystems + +15.7 Sorting Eigenvalues and Eigenvectors +========================================= + + -- Function: int gsl_eigen_symmv_sort (gsl_vector * EVAL, gsl_matrix * + EVEC, gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vector EVAL and the corresponding real eigenvectors stored in the + columns of the matrix EVEC into ascending or descending order + according to the value of the parameter SORT_TYPE, + + `GSL_EIGEN_SORT_VAL_ASC' + ascending order in numerical value + + `GSL_EIGEN_SORT_VAL_DESC' + descending order in numerical value + + `GSL_EIGEN_SORT_ABS_ASC' + ascending order in magnitude + + `GSL_EIGEN_SORT_ABS_DESC' + descending order in magnitude + + + -- Function: int gsl_eigen_hermv_sort (gsl_vector * EVAL, + gsl_matrix_complex * EVEC, gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vector EVAL and the corresponding complex eigenvectors stored in + the columns of the matrix EVEC into ascending or descending order + according to the value of the parameter SORT_TYPE as shown above. + + -- Function: int gsl_eigen_nonsymmv_sort (gsl_vector_complex * EVAL, + gsl_matrix_complex * EVEC, gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vector EVAL and the corresponding complex eigenvectors stored in + the columns of the matrix EVEC into ascending or descending order + according to the value of the parameter SORT_TYPE as shown above. + Only `GSL_EIGEN_SORT_ABS_ASC' and `GSL_EIGEN_SORT_ABS_DESC' are + supported due to the eigenvalues being complex. + + -- Function: int gsl_eigen_gensymmv_sort (gsl_vector * EVAL, + gsl_matrix * EVEC, gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vector EVAL and the corresponding real eigenvectors stored in the + columns of the matrix EVEC into ascending or descending order + according to the value of the parameter SORT_TYPE as shown above. + + -- Function: int gsl_eigen_genhermv_sort (gsl_vector * EVAL, + gsl_matrix_complex * EVEC, gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vector EVAL and the corresponding complex eigenvectors stored in + the columns of the matrix EVEC into ascending or descending order + according to the value of the parameter SORT_TYPE as shown above. + + -- Function: int gsl_eigen_genv_sort (gsl_vector_complex * ALPHA, + gsl_vector * BETA, gsl_matrix_complex * EVEC, + gsl_eigen_sort_t SORT_TYPE) + This function simultaneously sorts the eigenvalues stored in the + vectors (ALPHA, BETA) and the corresponding complex eigenvectors + stored in the columns of the matrix EVEC into ascending or + descending order according to the value of the parameter SORT_TYPE + as shown above. Only `GSL_EIGEN_SORT_ABS_ASC' and + `GSL_EIGEN_SORT_ABS_DESC' are supported due to the eigenvalues + being complex. + + +File: gsl-ref.info, Node: Eigenvalue and Eigenvector Examples, Next: Eigenvalue and Eigenvector References, Prev: Sorting Eigenvalues and Eigenvectors, Up: Eigensystems + +15.8 Examples +============= + +The following program computes the eigenvalues and eigenvectors of the +4-th order Hilbert matrix, H(i,j) = 1/(i + j + 1). + + #include + #include + #include + + int + main (void) + { + double data[] = { 1.0 , 1/2.0, 1/3.0, 1/4.0, + 1/2.0, 1/3.0, 1/4.0, 1/5.0, + 1/3.0, 1/4.0, 1/5.0, 1/6.0, + 1/4.0, 1/5.0, 1/6.0, 1/7.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (data, 4, 4); + + gsl_vector *eval = gsl_vector_alloc (4); + gsl_matrix *evec = gsl_matrix_alloc (4, 4); + + gsl_eigen_symmv_workspace * w = + gsl_eigen_symmv_alloc (4); + + gsl_eigen_symmv (&m.matrix, eval, evec, w); + + gsl_eigen_symmv_free (w); + + gsl_eigen_symmv_sort (eval, evec, + GSL_EIGEN_SORT_ABS_ASC); + + { + int i; + + for (i = 0; i < 4; i++) + { + double eval_i + = gsl_vector_get (eval, i); + gsl_vector_view evec_i + = gsl_matrix_column (evec, i); + + printf ("eigenvalue = %g\n", eval_i); + printf ("eigenvector = \n"); + gsl_vector_fprintf (stdout, + &evec_i.vector, "%g"); + } + } + + gsl_vector_free (eval); + gsl_matrix_free (evec); + + return 0; + } + +Here is the beginning of the output from the program, + + $ ./a.out + eigenvalue = 9.67023e-05 + eigenvector = + -0.0291933 + 0.328712 + -0.791411 + 0.514553 + ... + +This can be compared with the corresponding output from GNU OCTAVE, + + octave> [v,d] = eig(hilb(4)); + octave> diag(d) + ans = + + 9.6702e-05 + 6.7383e-03 + 1.6914e-01 + 1.5002e+00 + + octave> v + v = + + 0.029193 0.179186 -0.582076 0.792608 + -0.328712 -0.741918 0.370502 0.451923 + 0.791411 0.100228 0.509579 0.322416 + -0.514553 0.638283 0.514048 0.252161 + +Note that the eigenvectors can differ by a change of sign, since the +sign of an eigenvector is arbitrary. + + The following program illustrates the use of the nonsymmetric +eigensolver, by computing the eigenvalues and eigenvectors of the +Vandermonde matrix V(x;i,j) = x_i^{n - j} with x = (-1,-2,3,4). + + #include + #include + #include + + int + main (void) + { + double data[] = { -1.0, 1.0, -1.0, 1.0, + -8.0, 4.0, -2.0, 1.0, + 27.0, 9.0, 3.0, 1.0, + 64.0, 16.0, 4.0, 1.0 }; + + gsl_matrix_view m + = gsl_matrix_view_array (data, 4, 4); + + gsl_vector_complex *eval = gsl_vector_complex_alloc (4); + gsl_matrix_complex *evec = gsl_matrix_complex_alloc (4, 4); + + gsl_eigen_nonsymmv_workspace * w = + gsl_eigen_nonsymmv_alloc (4); + + gsl_eigen_nonsymmv (&m.matrix, eval, evec, w); + + gsl_eigen_nonsymmv_free (w); + + gsl_eigen_nonsymmv_sort (eval, evec, + GSL_EIGEN_SORT_ABS_DESC); + + { + int i, j; + + for (i = 0; i < 4; i++) + { + gsl_complex eval_i + = gsl_vector_complex_get (eval, i); + gsl_vector_complex_view evec_i + = gsl_matrix_complex_column (evec, i); + + printf ("eigenvalue = %g + %gi\n", + GSL_REAL(eval_i), GSL_IMAG(eval_i)); + printf ("eigenvector = \n"); + for (j = 0; j < 4; ++j) + { + gsl_complex z = + gsl_vector_complex_get(&evec_i.vector, j); + printf("%g + %gi\n", GSL_REAL(z), GSL_IMAG(z)); + } + } + } + + gsl_vector_complex_free(eval); + gsl_matrix_complex_free(evec); + + return 0; + } + +Here is the beginning of the output from the program, + + $ ./a.out + eigenvalue = -6.41391 + 0i + eigenvector = + -0.0998822 + 0i + -0.111251 + 0i + 0.292501 + 0i + 0.944505 + 0i + eigenvalue = 5.54555 + 3.08545i + eigenvector = + -0.043487 + -0.0076308i + 0.0642377 + -0.142127i + -0.515253 + 0.0405118i + -0.840592 + -0.00148565i + ... + +This can be compared with the corresponding output from GNU OCTAVE, + + octave> [v,d] = eig(vander([-1 -2 3 4])); + octave> diag(d) + ans = + + -6.4139 + 0.0000i + 5.5456 + 3.0854i + 5.5456 - 3.0854i + 2.3228 + 0.0000i + + octave> v + v = + + Columns 1 through 3: + + -0.09988 + 0.00000i -0.04350 - 0.00755i -0.04350 + 0.00755i + -0.11125 + 0.00000i 0.06399 - 0.14224i 0.06399 + 0.14224i + 0.29250 + 0.00000i -0.51518 + 0.04142i -0.51518 - 0.04142i + 0.94451 + 0.00000i -0.84059 + 0.00000i -0.84059 - 0.00000i + + Column 4: + + -0.14493 + 0.00000i + 0.35660 + 0.00000i + 0.91937 + 0.00000i + 0.08118 + 0.00000i + Note that the eigenvectors corresponding to the eigenvalue 5.54555 + +3.08545i differ by the multiplicative constant 0.9999984 + 0.0017674i +which is an arbitrary phase factor of magnitude 1. + + +File: gsl-ref.info, Node: Eigenvalue and Eigenvector References, Prev: Eigenvalue and Eigenvector Examples, Up: Eigensystems + +15.9 References and Further Reading +=================================== + +Further information on the algorithms described in this section can be +found in the following book, + + G. H. Golub, C. F. Van Loan, `Matrix Computations' (3rd Ed, 1996), + Johns Hopkins University Press, ISBN 0-8018-5414-8. + +Further information on the generalized eigensystems QZ algorithm can be +found in this paper, + + C. Moler, G. Stewart, "An Algorithm for Generalized Matrix + Eigenvalue Problems", SIAM J. Numer. Anal., Vol 10, No 2, 1973. + +Eigensystem routines for very large matrices can be found in the +Fortran library LAPACK. The LAPACK library is described in, + + `LAPACK Users' Guide' (Third Edition, 1999), Published by SIAM, + ISBN 0-89871-447-8. + + `http://www.netlib.org/lapack' + +The LAPACK source code can be found at the website above along with an +online copy of the users guide. + + +File: gsl-ref.info, Node: Fast Fourier Transforms, Next: Numerical Integration, Prev: Eigensystems, Up: Top + +16 Fast Fourier Transforms (FFTs) +********************************* + +This chapter describes functions for performing Fast Fourier Transforms +(FFTs). The library includes radix-2 routines (for lengths which are a +power of two) and mixed-radix routines (which work for any length). For +efficiency there are separate versions of the routines for real data and +for complex data. The mixed-radix routines are a reimplementation of +the FFTPACK library of Paul Swarztrauber. Fortran code for FFTPACK is +available on Netlib (FFTPACK also includes some routines for sine and +cosine transforms but these are currently not available in GSL). For +details and derivations of the underlying algorithms consult the +document `GSL FFT Algorithms' (*note FFT References and Further +Reading::) + +* Menu: + +* Mathematical Definitions:: +* Overview of complex data FFTs:: +* Radix-2 FFT routines for complex data:: +* Mixed-radix FFT routines for complex data:: +* Overview of real data FFTs:: +* Radix-2 FFT routines for real data:: +* Mixed-radix FFT routines for real data:: +* FFT References and Further Reading:: + + +File: gsl-ref.info, Node: Mathematical Definitions, Next: Overview of complex data FFTs, Up: Fast Fourier Transforms + +16.1 Mathematical Definitions +============================= + +Fast Fourier Transforms are efficient algorithms for calculating the +discrete Fourier transform (DFT), + + x_j = \sum_{k=0}^{n-1} z_k \exp(-2\pi i j k / n) + + The DFT usually arises as an approximation to the continuous Fourier +transform when functions are sampled at discrete intervals in space or +time. The naive evaluation of the discrete Fourier transform is a +matrix-vector multiplication W\vec{z}. A general matrix-vector +multiplication takes O(n^2) operations for n data-points. Fast Fourier +transform algorithms use a divide-and-conquer strategy to factorize the +matrix W into smaller sub-matrices, corresponding to the integer +factors of the length n. If n can be factorized into a product of +integers f_1 f_2 ... f_m then the DFT can be computed in O(n \sum f_i) +operations. For a radix-2 FFT this gives an operation count of O(n +\log_2 n). + + All the FFT functions offer three types of transform: forwards, +inverse and backwards, based on the same mathematical definitions. The +definition of the "forward Fourier transform", x = FFT(z), is, + + x_j = \sum_{k=0}^{n-1} z_k \exp(-2\pi i j k / n) + +and the definition of the "inverse Fourier transform", x = IFFT(z), is, + + z_j = {1 \over n} \sum_{k=0}^{n-1} x_k \exp(2\pi i j k / n). + +The factor of 1/n makes this a true inverse. For example, a call to +`gsl_fft_complex_forward' followed by a call to +`gsl_fft_complex_inverse' should return the original data (within +numerical errors). + + In general there are two possible choices for the sign of the +exponential in the transform/ inverse-transform pair. GSL follows the +same convention as FFTPACK, using a negative exponential for the forward +transform. The advantage of this convention is that the inverse +transform recreates the original function with simple Fourier +synthesis. Numerical Recipes uses the opposite convention, a positive +exponential in the forward transform. + + The "backwards FFT" is simply our terminology for an unscaled +version of the inverse FFT, + + z^{backwards}_j = \sum_{k=0}^{n-1} x_k \exp(2\pi i j k / n). + +When the overall scale of the result is unimportant it is often +convenient to use the backwards FFT instead of the inverse to save +unnecessary divisions. + + +File: gsl-ref.info, Node: Overview of complex data FFTs, Next: Radix-2 FFT routines for complex data, Prev: Mathematical Definitions, Up: Fast Fourier Transforms + +16.2 Overview of complex data FFTs +================================== + +The inputs and outputs for the complex FFT routines are "packed arrays" +of floating point numbers. In a packed array the real and imaginary +parts of each complex number are placed in alternate neighboring +elements. For example, the following definition of a packed array of +length 6, + + double x[3*2]; + gsl_complex_packed_array data = x; + +can be used to hold an array of three complex numbers, `z[3]', in the +following way, + + data[0] = Re(z[0]) + data[1] = Im(z[0]) + data[2] = Re(z[1]) + data[3] = Im(z[1]) + data[4] = Re(z[2]) + data[5] = Im(z[2]) + +The array indices for the data have the same ordering as those in the +definition of the DFT--i.e. there are no index transformations or +permutations of the data. + + A "stride" parameter allows the user to perform transforms on the +elements `z[stride*i]' instead of `z[i]'. A stride greater than 1 can +be used to take an in-place FFT of the column of a matrix. A stride of +1 accesses the array without any additional spacing between elements. + + To perform an FFT on a vector argument, such as `gsl_vector_complex +* v', use the following definitions (or their equivalents) when calling +the functions described in this chapter: + + gsl_complex_packed_array data = v->data; + size_t stride = v->stride; + size_t n = v->size; + + For physical applications it is important to remember that the index +appearing in the DFT does not correspond directly to a physical +frequency. If the time-step of the DFT is \Delta then the +frequency-domain includes both positive and negative frequencies, +ranging from -1/(2\Delta) through 0 to +1/(2\Delta). The positive +frequencies are stored from the beginning of the array up to the +middle, and the negative frequencies are stored backwards from the end +of the array. + + Here is a table which shows the layout of the array DATA, and the +correspondence between the time-domain data z, and the frequency-domain +data x. + + index z x = FFT(z) + + 0 z(t = 0) x(f = 0) + 1 z(t = 1) x(f = 1/(n Delta)) + 2 z(t = 2) x(f = 2/(n Delta)) + . ........ .................. + n/2 z(t = n/2) x(f = +1/(2 Delta), + -1/(2 Delta)) + . ........ .................. + n-3 z(t = n-3) x(f = -3/(n Delta)) + n-2 z(t = n-2) x(f = -2/(n Delta)) + n-1 z(t = n-1) x(f = -1/(n Delta)) + +When n is even the location n/2 contains the most positive and negative +frequencies (+1/(2 \Delta), -1/(2 \Delta)) which are equivalent. If n +is odd then general structure of the table above still applies, but n/2 +does not appear. + + +File: gsl-ref.info, Node: Radix-2 FFT routines for complex data, Next: Mixed-radix FFT routines for complex data, Prev: Overview of complex data FFTs, Up: Fast Fourier Transforms + +16.3 Radix-2 FFT routines for complex data +========================================== + +The radix-2 algorithms described in this section are simple and compact, +although not necessarily the most efficient. They use the Cooley-Tukey +algorithm to compute in-place complex FFTs for lengths which are a power +of 2--no additional storage is required. The corresponding +self-sorting mixed-radix routines offer better performance at the +expense of requiring additional working space. + + All the functions described in this section are declared in the +header file `gsl_fft_complex.h'. + + -- Function: int gsl_fft_complex_radix2_forward + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + -- Function: int gsl_fft_complex_radix2_transform + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N, + gsl_fft_direction SIGN) + -- Function: int gsl_fft_complex_radix2_backward + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + -- Function: int gsl_fft_complex_radix2_inverse + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + These functions compute forward, backward and inverse FFTs of + length N with stride STRIDE, on the packed complex array DATA + using an in-place radix-2 decimation-in-time algorithm. The + length of the transform N is restricted to powers of two. For the + `transform' version of the function the SIGN argument can be + either `forward' (-1) or `backward' (+1). + + The functions return a value of `GSL_SUCCESS' if no errors were + detected, or `GSL_EDOM' if the length of the data N is not a power + of two. + + -- Function: int gsl_fft_complex_radix2_dif_forward + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + -- Function: int gsl_fft_complex_radix2_dif_transform + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N, + gsl_fft_direction SIGN) + -- Function: int gsl_fft_complex_radix2_dif_backward + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + -- Function: int gsl_fft_complex_radix2_dif_inverse + (gsl_complex_packed_array DATA, size_t STRIDE, size_t N) + These are decimation-in-frequency versions of the radix-2 FFT + functions. + + + Here is an example program which computes the FFT of a short pulse +in a sample of length 128. To make the resulting Fourier transform +real the pulse is defined for equal positive and negative times (-10 +... 10), where the negative times wrap around the end of the array. + + #include + #include + #include + #include + + #define REAL(z,i) ((z)[2*(i)]) + #define IMAG(z,i) ((z)[2*(i)+1]) + + int + main (void) + { + int i; double data[2*128]; + + for (i = 0; i < 128; i++) + { + REAL(data,i) = 0.0; IMAG(data,i) = 0.0; + } + + REAL(data,0) = 1.0; + + for (i = 1; i <= 10; i++) + { + REAL(data,i) = REAL(data,128-i) = 1.0; + } + + for (i = 0; i < 128; i++) + { + printf ("%d %e %e\n", i, + REAL(data,i), IMAG(data,i)); + } + printf ("\n"); + + gsl_fft_complex_radix2_forward (data, 1, 128); + + for (i = 0; i < 128; i++) + { + printf ("%d %e %e\n", i, + REAL(data,i)/sqrt(128), + IMAG(data,i)/sqrt(128)); + } + + return 0; + } + +Note that we have assumed that the program is using the default error +handler (which calls `abort' for any errors). If you are not using a +safe error handler you would need to check the return status of +`gsl_fft_complex_radix2_forward'. + + The transformed data is rescaled by 1/\sqrt n so that it fits on the +same plot as the input. Only the real part is shown, by the choice of +the input data the imaginary part is zero. Allowing for the +wrap-around of negative times at t=128, and working in units of k/n, +the DFT approximates the continuum Fourier transform, giving a +modulated sine function. + + +File: gsl-ref.info, Node: Mixed-radix FFT routines for complex data, Next: Overview of real data FFTs, Prev: Radix-2 FFT routines for complex data, Up: Fast Fourier Transforms + +16.4 Mixed-radix FFT routines for complex data +============================================== + +This section describes mixed-radix FFT algorithms for complex data. The +mixed-radix functions work for FFTs of any length. They are a +reimplementation of Paul Swarztrauber's Fortran FFTPACK library. The +theory is explained in the review article `Self-sorting Mixed-radix +FFTs' by Clive Temperton. The routines here use the same indexing +scheme and basic algorithms as FFTPACK. + + The mixed-radix algorithm is based on sub-transform modules--highly +optimized small length FFTs which are combined to create larger FFTs. +There are efficient modules for factors of 2, 3, 4, 5, 6 and 7. The +modules for the composite factors of 4 and 6 are faster than combining +the modules for 2*2 and 2*3. + + For factors which are not implemented as modules there is a +fall-back to a general length-n module which uses Singleton's method for +efficiently computing a DFT. This module is O(n^2), and slower than a +dedicated module would be but works for any length n. Of course, +lengths which use the general length-n module will still be factorized +as much as possible. For example, a length of 143 will be factorized +into 11*13. Large prime factors are the worst case scenario, e.g. as +found in n=2*3*99991, and should be avoided because their O(n^2) +scaling will dominate the run-time (consult the document `GSL FFT +Algorithms' included in the GSL distribution if you encounter this +problem). + + The mixed-radix initialization function +`gsl_fft_complex_wavetable_alloc' returns the list of factors chosen by +the library for a given length n. It can be used to check how well the +length has been factorized, and estimate the run-time. To a first +approximation the run-time scales as n \sum f_i, where the f_i are the +factors of n. For programs under user control you may wish to issue a +warning that the transform will be slow when the length is poorly +factorized. If you frequently encounter data lengths which cannot be +factorized using the existing small-prime modules consult `GSL FFT +Algorithms' for details on adding support for other factors. + + All the functions described in this section are declared in the +header file `gsl_fft_complex.h'. + + -- Function: gsl_fft_complex_wavetable * +gsl_fft_complex_wavetable_alloc (size_t N) + This function prepares a trigonometric lookup table for a complex + FFT of length N. The function returns a pointer to the newly + allocated `gsl_fft_complex_wavetable' if no errors were detected, + and a null pointer in the case of error. The length N is + factorized into a product of subtransforms, and the factors and + their trigonometric coefficients are stored in the wavetable. The + trigonometric coefficients are computed using direct calls to + `sin' and `cos', for accuracy. Recursion relations could be used + to compute the lookup table faster, but if an application performs + many FFTs of the same length then this computation is a one-off + overhead which does not affect the final throughput. + + The wavetable structure can be used repeatedly for any transform + of the same length. The table is not modified by calls to any of + the other FFT functions. The same wavetable can be used for both + forward and backward (or inverse) transforms of a given length. + + -- Function: void gsl_fft_complex_wavetable_free + (gsl_fft_complex_wavetable * WAVETABLE) + This function frees the memory associated with the wavetable + WAVETABLE. The wavetable can be freed if no further FFTs of the + same length will be needed. + +These functions operate on a `gsl_fft_complex_wavetable' structure +which contains internal parameters for the FFT. It is not necessary to +set any of the components directly but it can sometimes be useful to +examine them. For example, the chosen factorization of the FFT length +is given and can be used to provide an estimate of the run-time or +numerical error. The wavetable structure is declared in the header file +`gsl_fft_complex.h'. + + -- Data Type: gsl_fft_complex_wavetable + This is a structure that holds the factorization and trigonometric + lookup tables for the mixed radix fft algorithm. It has the + following components: + + `size_t n' + This is the number of complex data points + + `size_t nf' + This is the number of factors that the length `n' was + decomposed into. + + `size_t factor[64]' + This is the array of factors. Only the first `nf' elements + are used. + + `gsl_complex * trig' + This is a pointer to a preallocated trigonometric lookup + table of `n' complex elements. + + `gsl_complex * twiddle[64]' + This is an array of pointers into `trig', giving the twiddle + factors for each pass. + +The mixed radix algorithms require additional working space to hold the +intermediate steps of the transform. + + -- Function: gsl_fft_complex_workspace * +gsl_fft_complex_workspace_alloc (size_t N) + This function allocates a workspace for a complex transform of + length N. + + -- Function: void gsl_fft_complex_workspace_free + (gsl_fft_complex_workspace * WORKSPACE) + This function frees the memory associated with the workspace + WORKSPACE. The workspace can be freed if no further FFTs of the + same length will be needed. + +The following functions compute the transform, + + -- Function: int gsl_fft_complex_forward (gsl_complex_packed_array + DATA, size_t STRIDE, size_t N, const + gsl_fft_complex_wavetable * WAVETABLE, + gsl_fft_complex_workspace * WORK) + -- Function: int gsl_fft_complex_transform (gsl_complex_packed_array + DATA, size_t STRIDE, size_t N, const + gsl_fft_complex_wavetable * WAVETABLE, + gsl_fft_complex_workspace * WORK, gsl_fft_direction SIGN) + -- Function: int gsl_fft_complex_backward (gsl_complex_packed_array + DATA, size_t STRIDE, size_t N, const + gsl_fft_complex_wavetable * WAVETABLE, + gsl_fft_complex_workspace * WORK) + -- Function: int gsl_fft_complex_inverse (gsl_complex_packed_array + DATA, size_t STRIDE, size_t N, const + gsl_fft_complex_wavetable * WAVETABLE, + gsl_fft_complex_workspace * WORK) + These functions compute forward, backward and inverse FFTs of + length N with stride STRIDE, on the packed complex array DATA, + using a mixed radix decimation-in-frequency algorithm. There is + no restriction on the length N. Efficient modules are provided + for subtransforms of length 2, 3, 4, 5, 6 and 7. Any remaining + factors are computed with a slow, O(n^2), general-n module. The + caller must supply a WAVETABLE containing the trigonometric lookup + tables and a workspace WORK. For the `transform' version of the + function the SIGN argument can be either `forward' (-1) or + `backward' (+1). + + The functions return a value of `0' if no errors were detected. The + following `gsl_errno' conditions are defined for these functions: + + `GSL_EDOM' + The length of the data N is not a positive integer (i.e. N is + zero). + + `GSL_EINVAL' + The length of the data N and the length used to compute the + given WAVETABLE do not match. + + Here is an example program which computes the FFT of a short pulse +in a sample of length 630 (=2*3*3*5*7) using the mixed-radix algorithm. + + #include + #include + #include + #include + + #define REAL(z,i) ((z)[2*(i)]) + #define IMAG(z,i) ((z)[2*(i)+1]) + + int + main (void) + { + int i; + const int n = 630; + double data[2*n]; + + gsl_fft_complex_wavetable * wavetable; + gsl_fft_complex_workspace * workspace; + + for (i = 0; i < n; i++) + { + REAL(data,i) = 0.0; + IMAG(data,i) = 0.0; + } + + data[0] = 1.0; + + for (i = 1; i <= 10; i++) + { + REAL(data,i) = REAL(data,n-i) = 1.0; + } + + for (i = 0; i < n; i++) + { + printf ("%d: %e %e\n", i, REAL(data,i), + IMAG(data,i)); + } + printf ("\n"); + + wavetable = gsl_fft_complex_wavetable_alloc (n); + workspace = gsl_fft_complex_workspace_alloc (n); + + for (i = 0; i < wavetable->nf; i++) + { + printf ("# factor %d: %d\n", i, + wavetable->factor[i]); + } + + gsl_fft_complex_forward (data, 1, n, + wavetable, workspace); + + for (i = 0; i < n; i++) + { + printf ("%d: %e %e\n", i, REAL(data,i), + IMAG(data,i)); + } + + gsl_fft_complex_wavetable_free (wavetable); + gsl_fft_complex_workspace_free (workspace); + return 0; + } + +Note that we have assumed that the program is using the default `gsl' +error handler (which calls `abort' for any errors). If you are not +using a safe error handler you would need to check the return status of +all the `gsl' routines. + + +File: gsl-ref.info, Node: Overview of real data FFTs, Next: Radix-2 FFT routines for real data, Prev: Mixed-radix FFT routines for complex data, Up: Fast Fourier Transforms + +16.5 Overview of real data FFTs +=============================== + +The functions for real data are similar to those for complex data. +However, there is an important difference between forward and inverse +transforms. The Fourier transform of a real sequence is not real. It +is a complex sequence with a special symmetry: + + z_k = z_{n-k}^* + +A sequence with this symmetry is called "conjugate-complex" or +"half-complex". This different structure requires different storage +layouts for the forward transform (from real to half-complex) and +inverse transform (from half-complex back to real). As a consequence +the routines are divided into two sets: functions in `gsl_fft_real' +which operate on real sequences and functions in `gsl_fft_halfcomplex' +which operate on half-complex sequences. + + Functions in `gsl_fft_real' compute the frequency coefficients of a +real sequence. The half-complex coefficients c of a real sequence x +are given by Fourier analysis, + + c_k = \sum_{j=0}^{n-1} x_j \exp(-2 \pi i j k /n) + +Functions in `gsl_fft_halfcomplex' compute inverse or backwards +transforms. They reconstruct real sequences by Fourier synthesis from +their half-complex frequency coefficients, c, + + x_j = {1 \over n} \sum_{k=0}^{n-1} c_k \exp(2 \pi i j k /n) + +The symmetry of the half-complex sequence implies that only half of the +complex numbers in the output need to be stored. The remaining half can +be reconstructed using the half-complex symmetry condition. This works +for all lengths, even and odd--when the length is even the middle value +where k=n/2 is also real. Thus only N real numbers are required to +store the half-complex sequence, and the transform of a real sequence +can be stored in the same size array as the original data. + + The precise storage arrangements depend on the algorithm, and are +different for radix-2 and mixed-radix routines. The radix-2 function +operates in-place, which constrains the locations where each element can +be stored. The restriction forces real and imaginary parts to be stored +far apart. The mixed-radix algorithm does not have this restriction, +and it stores the real and imaginary parts of a given term in +neighboring locations (which is desirable for better locality of memory +accesses). + + +File: gsl-ref.info, Node: Radix-2 FFT routines for real data, Next: Mixed-radix FFT routines for real data, Prev: Overview of real data FFTs, Up: Fast Fourier Transforms + +16.6 Radix-2 FFT routines for real data +======================================= + +This section describes radix-2 FFT algorithms for real data. They use +the Cooley-Tukey algorithm to compute in-place FFTs for lengths which +are a power of 2. + + The radix-2 FFT functions for real data are declared in the header +files `gsl_fft_real.h' + + -- Function: int gsl_fft_real_radix2_transform (double DATA[], size_t + STRIDE, size_t N) + This function computes an in-place radix-2 FFT of length N and + stride STRIDE on the real array DATA. The output is a + half-complex sequence, which is stored in-place. The arrangement + of the half-complex terms uses the following scheme: for k < n/2 + the real part of the k-th term is stored in location k, and the + corresponding imaginary part is stored in location n-k. Terms + with k > n/2 can be reconstructed using the symmetry z_k = + z^*_{n-k}. The terms for k=0 and k=n/2 are both purely real, and + count as a special case. Their real parts are stored in locations + 0 and n/2 respectively, while their imaginary parts which are zero + are not stored. + + The following table shows the correspondence between the output + DATA and the equivalent results obtained by considering the input + data as a complex sequence with zero imaginary part (assuming + STRIDE=1), + + complex[0].real = data[0] + complex[0].imag = 0 + complex[1].real = data[1] + complex[1].imag = data[n-1] + ............... ................ + complex[k].real = data[k] + complex[k].imag = data[n-k] + ............... ................ + complex[n/2].real = data[n/2] + complex[n/2].imag = 0 + ............... ................ + complex[k'].real = data[k] k' = n - k + complex[k'].imag = -data[n-k] + ............... ................ + complex[n-1].real = data[1] + complex[n-1].imag = -data[n-1] + Note that the output data can be converted into the full complex + sequence using the function `gsl_fft_halfcomplex_radix2_unpack' + described below. + + The radix-2 FFT functions for halfcomplex data are declared in the +header file `gsl_fft_halfcomplex.h'. + + -- Function: int gsl_fft_halfcomplex_radix2_inverse (double DATA[], + size_t STRIDE, size_t N) + -- Function: int gsl_fft_halfcomplex_radix2_backward (double DATA[], + size_t STRIDE, size_t N) + These functions compute the inverse or backwards in-place radix-2 + FFT of length N and stride STRIDE on the half-complex sequence + DATA stored according the output scheme used by + `gsl_fft_real_radix2'. The result is a real array stored in + natural order. + + -- Function: int gsl_fft_halfcomplex_radix2_unpack (const double + HALFCOMPLEX_COEFFICIENT[], gsl_complex_packed_array + COMPLEX_COEFFICIENT, size_t STRIDE, size_t N) + This function converts HALFCOMPLEX_COEFFICIENT, an array of + half-complex coefficients as returned by + `gsl_fft_real_radix2_transform', into an ordinary complex array, + COMPLEX_COEFFICIENT. It fills in the complex array using the + symmetry z_k = z_{n-k}^* to reconstruct the redundant elements. + The algorithm for the conversion is, + + complex_coefficient[0].real + = halfcomplex_coefficient[0]; + complex_coefficient[0].imag + = 0.0; + + for (i = 1; i < n - i; i++) + { + double hc_real + = halfcomplex_coefficient[i*stride]; + double hc_imag + = halfcomplex_coefficient[(n-i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + } + + if (i == n - i) + { + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + } + + +File: gsl-ref.info, Node: Mixed-radix FFT routines for real data, Next: FFT References and Further Reading, Prev: Radix-2 FFT routines for real data, Up: Fast Fourier Transforms + +16.7 Mixed-radix FFT routines for real data +=========================================== + +This section describes mixed-radix FFT algorithms for real data. The +mixed-radix functions work for FFTs of any length. They are a +reimplementation of the real-FFT routines in the Fortran FFTPACK library +by Paul Swarztrauber. The theory behind the algorithm is explained in +the article `Fast Mixed-Radix Real Fourier Transforms' by Clive +Temperton. The routines here use the same indexing scheme and basic +algorithms as FFTPACK. + + The functions use the FFTPACK storage convention for half-complex +sequences. In this convention the half-complex transform of a real +sequence is stored with frequencies in increasing order, starting at +zero, with the real and imaginary parts of each frequency in neighboring +locations. When a value is known to be real the imaginary part is not +stored. The imaginary part of the zero-frequency component is never +stored. It is known to be zero (since the zero frequency component is +simply the sum of the input data (all real)). For a sequence of even +length the imaginary part of the frequency n/2 is not stored either, +since the symmetry z_k = z_{n-k}^* implies that this is purely real too. + + The storage scheme is best shown by some examples. The table below +shows the output for an odd-length sequence, n=5. The two columns give +the correspondence between the 5 values in the half-complex sequence +returned by `gsl_fft_real_transform', HALFCOMPLEX[] and the values +COMPLEX[] that would be returned if the same real input sequence were +passed to `gsl_fft_complex_backward' as a complex sequence (with +imaginary parts set to `0'), + + complex[0].real = halfcomplex[0] + complex[0].imag = 0 + complex[1].real = halfcomplex[1] + complex[1].imag = halfcomplex[2] + complex[2].real = halfcomplex[3] + complex[2].imag = halfcomplex[4] + complex[3].real = halfcomplex[3] + complex[3].imag = -halfcomplex[4] + complex[4].real = halfcomplex[1] + complex[4].imag = -halfcomplex[2] + +The upper elements of the COMPLEX array, `complex[3]' and `complex[4]' +are filled in using the symmetry condition. The imaginary part of the +zero-frequency term `complex[0].imag' is known to be zero by the +symmetry. + + The next table shows the output for an even-length sequence, n=6 In +the even case there are two values which are purely real, + + complex[0].real = halfcomplex[0] + complex[0].imag = 0 + complex[1].real = halfcomplex[1] + complex[1].imag = halfcomplex[2] + complex[2].real = halfcomplex[3] + complex[2].imag = halfcomplex[4] + complex[3].real = halfcomplex[5] + complex[3].imag = 0 + complex[4].real = halfcomplex[3] + complex[4].imag = -halfcomplex[4] + complex[5].real = halfcomplex[1] + complex[5].imag = -halfcomplex[2] + +The upper elements of the COMPLEX array, `complex[4]' and `complex[5]' +are filled in using the symmetry condition. Both `complex[0].imag' and +`complex[3].imag' are known to be zero. + + All these functions are declared in the header files +`gsl_fft_real.h' and `gsl_fft_halfcomplex.h'. + + -- Function: gsl_fft_real_wavetable * gsl_fft_real_wavetable_alloc + (size_t N) + -- Function: gsl_fft_halfcomplex_wavetable * +gsl_fft_halfcomplex_wavetable_alloc (size_t N) + These functions prepare trigonometric lookup tables for an FFT of + size n real elements. The functions return a pointer to the newly + allocated struct if no errors were detected, and a null pointer in + the case of error. The length N is factorized into a product of + subtransforms, and the factors and their trigonometric + coefficients are stored in the wavetable. The trigonometric + coefficients are computed using direct calls to `sin' and `cos', + for accuracy. Recursion relations could be used to compute the + lookup table faster, but if an application performs many FFTs of + the same length then computing the wavetable is a one-off overhead + which does not affect the final throughput. + + The wavetable structure can be used repeatedly for any transform + of the same length. The table is not modified by calls to any of + the other FFT functions. The appropriate type of wavetable must + be used for forward real or inverse half-complex transforms. + + -- Function: void gsl_fft_real_wavetable_free (gsl_fft_real_wavetable + * WAVETABLE) + -- Function: void gsl_fft_halfcomplex_wavetable_free + (gsl_fft_halfcomplex_wavetable * WAVETABLE) + These functions free the memory associated with the wavetable + WAVETABLE. The wavetable can be freed if no further FFTs of the + same length will be needed. + +The mixed radix algorithms require additional working space to hold the +intermediate steps of the transform, + + -- Function: gsl_fft_real_workspace * gsl_fft_real_workspace_alloc + (size_t N) + This function allocates a workspace for a real transform of length + N. The same workspace can be used for both forward real and + inverse halfcomplex transforms. + + -- Function: void gsl_fft_real_workspace_free (gsl_fft_real_workspace + * WORKSPACE) + This function frees the memory associated with the workspace + WORKSPACE. The workspace can be freed if no further FFTs of the + same length will be needed. + +The following functions compute the transforms of real and half-complex +data, + + -- Function: int gsl_fft_real_transform (double DATA[], size_t STRIDE, + size_t N, const gsl_fft_real_wavetable * WAVETABLE, + gsl_fft_real_workspace * WORK) + -- Function: int gsl_fft_halfcomplex_transform (double DATA[], size_t + STRIDE, size_t N, const gsl_fft_halfcomplex_wavetable * + WAVETABLE, gsl_fft_real_workspace * WORK) + These functions compute the FFT of DATA, a real or half-complex + array of length N, using a mixed radix decimation-in-frequency + algorithm. For `gsl_fft_real_transform' DATA is an array of + time-ordered real data. For `gsl_fft_halfcomplex_transform' DATA + contains Fourier coefficients in the half-complex ordering + described above. There is no restriction on the length N. + Efficient modules are provided for subtransforms of length 2, 3, 4 + and 5. Any remaining factors are computed with a slow, O(n^2), + general-n module. The caller must supply a WAVETABLE containing + trigonometric lookup tables and a workspace WORK. + + -- Function: int gsl_fft_real_unpack (const double REAL_COEFFICIENT[], + gsl_complex_packed_array COMPLEX_COEFFICIENT, size_t STRIDE, + size_t N) + This function converts a single real array, REAL_COEFFICIENT into + an equivalent complex array, COMPLEX_COEFFICIENT, (with imaginary + part set to zero), suitable for `gsl_fft_complex' routines. The + algorithm for the conversion is simply, + + for (i = 0; i < n; i++) + { + complex_coefficient[i*stride].real + = real_coefficient[i*stride]; + complex_coefficient[i*stride].imag + = 0.0; + } + + -- Function: int gsl_fft_halfcomplex_unpack (const double + HALFCOMPLEX_COEFFICIENT[], gsl_complex_packed_array + COMPLEX_COEFFICIENT, size_t STRIDE, size_t N) + This function converts HALFCOMPLEX_COEFFICIENT, an array of + half-complex coefficients as returned by `gsl_fft_real_transform', + into an ordinary complex array, COMPLEX_COEFFICIENT. It fills in + the complex array using the symmetry z_k = z_{n-k}^* to + reconstruct the redundant elements. The algorithm for the + conversion is, + + complex_coefficient[0].real + = halfcomplex_coefficient[0]; + complex_coefficient[0].imag + = 0.0; + + for (i = 1; i < n - i; i++) + { + double hc_real + = halfcomplex_coefficient[(2 * i - 1)*stride]; + double hc_imag + = halfcomplex_coefficient[(2 * i)*stride]; + complex_coefficient[i*stride].real = hc_real; + complex_coefficient[i*stride].imag = hc_imag; + complex_coefficient[(n - i)*stride].real = hc_real; + complex_coefficient[(n - i)*stride].imag = -hc_imag; + } + + if (i == n - i) + { + complex_coefficient[i*stride].real + = halfcomplex_coefficient[(n - 1)*stride]; + complex_coefficient[i*stride].imag + = 0.0; + } + + Here is an example program using `gsl_fft_real_transform' and +`gsl_fft_halfcomplex_inverse'. It generates a real signal in the shape +of a square pulse. The pulse is Fourier transformed to frequency +space, and all but the lowest ten frequency components are removed from +the array of Fourier coefficients returned by `gsl_fft_real_transform'. + + The remaining Fourier coefficients are transformed back to the +time-domain, to give a filtered version of the square pulse. Since +Fourier coefficients are stored using the half-complex symmetry both +positive and negative frequencies are removed and the final filtered +signal is also real. + + #include + #include + #include + #include + #include + + int + main (void) + { + int i, n = 100; + double data[n]; + + gsl_fft_real_wavetable * real; + gsl_fft_halfcomplex_wavetable * hc; + gsl_fft_real_workspace * work; + + for (i = 0; i < n; i++) + { + data[i] = 0.0; + } + + for (i = n / 3; i < 2 * n / 3; i++) + { + data[i] = 1.0; + } + + for (i = 0; i < n; i++) + { + printf ("%d: %e\n", i, data[i]); + } + printf ("\n"); + + work = gsl_fft_real_workspace_alloc (n); + real = gsl_fft_real_wavetable_alloc (n); + + gsl_fft_real_transform (data, 1, n, + real, work); + + gsl_fft_real_wavetable_free (real); + + for (i = 11; i < n; i++) + { + data[i] = 0; + } + + hc = gsl_fft_halfcomplex_wavetable_alloc (n); + + gsl_fft_halfcomplex_inverse (data, 1, n, + hc, work); + gsl_fft_halfcomplex_wavetable_free (hc); + + for (i = 0; i < n; i++) + { + printf ("%d: %e\n", i, data[i]); + } + + gsl_fft_real_workspace_free (work); + return 0; + } + + +File: gsl-ref.info, Node: FFT References and Further Reading, Prev: Mixed-radix FFT routines for real data, Up: Fast Fourier Transforms + +16.8 References and Further Reading +=================================== + +A good starting point for learning more about the FFT is the review +article `Fast Fourier Transforms: A Tutorial Review and A State of the +Art' by Duhamel and Vetterli, + + P. Duhamel and M. Vetterli. Fast Fourier transforms: A tutorial + review and a state of the art. `Signal Processing', 19:259-299, + 1990. + +To find out about the algorithms used in the GSL routines you may want +to consult the document `GSL FFT Algorithms' (it is included in GSL, as +`doc/fftalgorithms.tex'). This has general information on FFTs and +explicit derivations of the implementation for each routine. There are +also references to the relevant literature. For convenience some of +the more important references are reproduced below. + +There are several introductory books on the FFT with example programs, +such as `The Fast Fourier Transform' by Brigham and `DFT/FFT and +Convolution Algorithms' by Burrus and Parks, + + E. Oran Brigham. `The Fast Fourier Transform'. Prentice Hall, + 1974. + + C. S. Burrus and T. W. Parks. `DFT/FFT and Convolution + Algorithms'. Wiley, 1984. + +Both these introductory books cover the radix-2 FFT in some detail. +The mixed-radix algorithm at the heart of the FFTPACK routines is +reviewed in Clive Temperton's paper, + + Clive Temperton. Self-sorting mixed-radix fast Fourier transforms. + `Journal of Computational Physics', 52(1):1-23, 1983. + +The derivation of FFTs for real-valued data is explained in the +following two articles, + + Henrik V. Sorenson, Douglas L. Jones, Michael T. Heideman, and C. + Sidney Burrus. Real-valued fast Fourier transform algorithms. + `IEEE Transactions on Acoustics, Speech, and Signal Processing', + ASSP-35(6):849-863, 1987. + + Clive Temperton. Fast mixed-radix real Fourier transforms. + `Journal of Computational Physics', 52:340-350, 1983. + +In 1979 the IEEE published a compendium of carefully-reviewed Fortran +FFT programs in `Programs for Digital Signal Processing'. It is a +useful reference for implementations of many different FFT algorithms, + + Digital Signal Processing Committee and IEEE Acoustics, Speech, + and Signal Processing Committee, editors. `Programs for Digital + Signal Processing'. IEEE Press, 1979. + +For large-scale FFT work we recommend the use of the dedicated FFTW +library by Frigo and Johnson. The FFTW library is self-optimizing--it +automatically tunes itself for each hardware platform in order to +achieve maximum performance. It is available under the GNU GPL. + + FFTW Website, `http://www.fftw.org/' + +The source code for FFTPACK is available from Netlib, + + FFTPACK, `http://www.netlib.org/fftpack/' + + +File: gsl-ref.info, Node: Numerical Integration, Next: Random Number Generation, Prev: Fast Fourier Transforms, Up: Top + +17 Numerical Integration +************************ + +This chapter describes routines for performing numerical integration +(quadrature) of a function in one dimension. There are routines for +adaptive and non-adaptive integration of general functions, with +specialised routines for specific cases. These include integration over +infinite and semi-infinite ranges, singular integrals, including +logarithmic singularities, computation of Cauchy principal values and +oscillatory integrals. The library reimplements the algorithms used in +QUADPACK, a numerical integration package written by Piessens, de +Doncker-Kapenga, Ueberhuber and Kahaner. Fortran code for QUADPACK is +available on Netlib. Also included are non-adaptive, fixed-order +Gauss-Legendre integration routines with high precision coefficients by +Pavel Holoborodko. + + The functions described in this chapter are declared in the header +file `gsl_integration.h'. + +* Menu: + +* Numerical Integration Introduction:: +* QNG non-adaptive Gauss-Kronrod integration:: +* QAG adaptive integration:: +* QAGS adaptive integration with singularities:: +* QAGP adaptive integration with known singular points:: +* QAGI adaptive integration on infinite intervals:: +* QAWC adaptive integration for Cauchy principal values:: +* QAWS adaptive integration for singular functions:: +* QAWO adaptive integration for oscillatory functions:: +* QAWF adaptive integration for Fourier integrals:: +* CQUAD doubly-adaptive integration:: +* Fixed order Gauss-Legendre integration:: +* Numerical integration error codes:: +* Numerical integration examples:: +* Numerical integration References and Further Reading:: + + +File: gsl-ref.info, Node: Numerical Integration Introduction, Next: QNG non-adaptive Gauss-Kronrod integration, Up: Numerical Integration + +17.1 Introduction +================= + +Each algorithm computes an approximation to a definite integral of the +form, + + I = \int_a^b f(x) w(x) dx + +where w(x) is a weight function (for general integrands w(x)=1). The +user provides absolute and relative error bounds (epsabs, epsrel) which +specify the following accuracy requirement, + + |RESULT - I| <= max(epsabs, epsrel |I|) + +where RESULT is the numerical approximation obtained by the algorithm. +The algorithms attempt to estimate the absolute error ABSERR = |RESULT +- I| in such a way that the following inequality holds, + + |RESULT - I| <= ABSERR <= max(epsabs, epsrel |I|) + +In short, the routines return the first approximation which has an +absolute error smaller than epsabs or a relative error smaller than +epsrel. + + Note that this is an either-or constraint, not simultaneous. To +compute to a specified absolute error, set epsrel to zero. To compute +to a specified relative error, set epsabs to zero. The routines will +fail to converge if the error bounds are too stringent, but always +return the best approximation obtained up to that stage. + + The algorithms in QUADPACK use a naming convention based on the +following letters, + + `Q' - quadrature routine + + `N' - non-adaptive integrator + `A' - adaptive integrator + + `G' - general integrand (user-defined) + `W' - weight function with integrand + + `S' - singularities can be more readily integrated + `P' - points of special difficulty can be supplied + `I' - infinite range of integration + `O' - oscillatory weight function, cos or sin + `F' - Fourier integral + `C' - Cauchy principal value + +The algorithms are built on pairs of quadrature rules, a higher order +rule and a lower order rule. The higher order rule is used to compute +the best approximation to an integral over a small range. The +difference between the results of the higher order rule and the lower +order rule gives an estimate of the error in the approximation. + +* Menu: + +* Integrands without weight functions:: +* Integrands with weight functions:: +* Integrands with singular weight functions:: + + +File: gsl-ref.info, Node: Integrands without weight functions, Next: Integrands with weight functions, Up: Numerical Integration Introduction + +17.1.1 Integrands without weight functions +------------------------------------------ + +The algorithms for general functions (without a weight function) are +based on Gauss-Kronrod rules. + + A Gauss-Kronrod rule begins with a classical Gaussian quadrature +rule of order m. This is extended with additional points between each +of the abscissae to give a higher order Kronrod rule of order 2m+1. +The Kronrod rule is efficient because it reuses existing function +evaluations from the Gaussian rule. + + The higher order Kronrod rule is used as the best approximation to +the integral, and the difference between the two rules is used as an +estimate of the error in the approximation. + + +File: gsl-ref.info, Node: Integrands with weight functions, Next: Integrands with singular weight functions, Prev: Integrands without weight functions, Up: Numerical Integration Introduction + +17.1.2 Integrands with weight functions +--------------------------------------- + +For integrands with weight functions the algorithms use Clenshaw-Curtis +quadrature rules. + + A Clenshaw-Curtis rule begins with an n-th order Chebyshev +polynomial approximation to the integrand. This polynomial can be +integrated exactly to give an approximation to the integral of the +original function. The Chebyshev expansion can be extended to higher +orders to improve the approximation and provide an estimate of the +error. + + +File: gsl-ref.info, Node: Integrands with singular weight functions, Prev: Integrands with weight functions, Up: Numerical Integration Introduction + +17.1.3 Integrands with singular weight functions +------------------------------------------------ + +The presence of singularities (or other behavior) in the integrand can +cause slow convergence in the Chebyshev approximation. The modified +Clenshaw-Curtis rules used in QUADPACK separate out several common +weight functions which cause slow convergence. + + These weight functions are integrated analytically against the +Chebyshev polynomials to precompute "modified Chebyshev moments". +Combining the moments with the Chebyshev approximation to the function +gives the desired integral. The use of analytic integration for the +singular part of the function allows exact cancellations and +substantially improves the overall convergence behavior of the +integration. + + +File: gsl-ref.info, Node: QNG non-adaptive Gauss-Kronrod integration, Next: QAG adaptive integration, Prev: Numerical Integration Introduction, Up: Numerical Integration + +17.2 QNG non-adaptive Gauss-Kronrod integration +=============================================== + +The QNG algorithm is a non-adaptive procedure which uses fixed +Gauss-Kronrod-Patterson abscissae to sample the integrand at a maximum +of 87 points. It is provided for fast integration of smooth functions. + + -- Function: int gsl_integration_qng (const gsl_function * F, double + A, double B, double EPSABS, double EPSREL, double * RESULT, + double * ABSERR, size_t * NEVAL) + This function applies the Gauss-Kronrod 10-point, 21-point, + 43-point and 87-point integration rules in succession until an + estimate of the integral of f over (a,b) is achieved within the + desired absolute and relative error limits, EPSABS and EPSREL. The + function returns the final approximation, RESULT, an estimate of + the absolute error, ABSERR and the number of function evaluations + used, NEVAL. The Gauss-Kronrod rules are designed in such a way + that each rule uses all the results of its predecessors, in order + to minimize the total number of function evaluations. + + +File: gsl-ref.info, Node: QAG adaptive integration, Next: QAGS adaptive integration with singularities, Prev: QNG non-adaptive Gauss-Kronrod integration, Up: Numerical Integration + +17.3 QAG adaptive integration +============================= + +The QAG algorithm is a simple adaptive integration procedure. The +integration region is divided into subintervals, and on each iteration +the subinterval with the largest estimated error is bisected. This +reduces the overall error rapidly, as the subintervals become +concentrated around local difficulties in the integrand. These +subintervals are managed by a `gsl_integration_workspace' struct, which +handles the memory for the subinterval ranges, results and error +estimates. + + -- Function: gsl_integration_workspace * +gsl_integration_workspace_alloc (size_t N) + This function allocates a workspace sufficient to hold N double + precision intervals, their integration results and error estimates. + + -- Function: void gsl_integration_workspace_free + (gsl_integration_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_integration_qag (const gsl_function * F, double + A, double B, double EPSABS, double EPSREL, size_t LIMIT, int + KEY, gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function applies an integration rule adaptively until an + estimate of the integral of f over (a,b) is achieved within the + desired absolute and relative error limits, EPSABS and EPSREL. + The function returns the final approximation, RESULT, and an + estimate of the absolute error, ABSERR. The integration rule is + determined by the value of KEY, which should be chosen from the + following symbolic names, + + GSL_INTEG_GAUSS15 (key = 1) + GSL_INTEG_GAUSS21 (key = 2) + GSL_INTEG_GAUSS31 (key = 3) + GSL_INTEG_GAUSS41 (key = 4) + GSL_INTEG_GAUSS51 (key = 5) + GSL_INTEG_GAUSS61 (key = 6) + + corresponding to the 15, 21, 31, 41, 51 and 61 point Gauss-Kronrod + rules. The higher-order rules give better accuracy for smooth + functions, while lower-order rules save time when the function + contains local difficulties, such as discontinuities. + + On each iteration the adaptive integration strategy bisects the + interval with the largest error estimate. The subintervals and + their results are stored in the memory provided by WORKSPACE. The + maximum number of subintervals is given by LIMIT, which may not + exceed the allocated size of the workspace. + + +File: gsl-ref.info, Node: QAGS adaptive integration with singularities, Next: QAGP adaptive integration with known singular points, Prev: QAG adaptive integration, Up: Numerical Integration + +17.4 QAGS adaptive integration with singularities +================================================= + +The presence of an integrable singularity in the integration region +causes an adaptive routine to concentrate new subintervals around the +singularity. As the subintervals decrease in size the successive +approximations to the integral converge in a limiting fashion. This +approach to the limit can be accelerated using an extrapolation +procedure. The QAGS algorithm combines adaptive bisection with the Wynn +epsilon-algorithm to speed up the integration of many types of +integrable singularities. + + -- Function: int gsl_integration_qags (const gsl_function * F, double + A, double B, double EPSABS, double EPSREL, size_t LIMIT, + gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function applies the Gauss-Kronrod 21-point integration rule + adaptively until an estimate of the integral of f over (a,b) is + achieved within the desired absolute and relative error limits, + EPSABS and EPSREL. The results are extrapolated using the + epsilon-algorithm, which accelerates the convergence of the + integral in the presence of discontinuities and integrable + singularities. The function returns the final approximation from + the extrapolation, RESULT, and an estimate of the absolute error, + ABSERR. The subintervals and their results are stored in the + memory provided by WORKSPACE. The maximum number of subintervals + is given by LIMIT, which may not exceed the allocated size of the + workspace. + + + +File: gsl-ref.info, Node: QAGP adaptive integration with known singular points, Next: QAGI adaptive integration on infinite intervals, Prev: QAGS adaptive integration with singularities, Up: Numerical Integration + +17.5 QAGP adaptive integration with known singular points +========================================================= + + -- Function: int gsl_integration_qagp (const gsl_function * F, double + * PTS, size_t NPTS, double EPSABS, double EPSREL, size_t + LIMIT, gsl_integration_workspace * WORKSPACE, double * + RESULT, double * ABSERR) + This function applies the adaptive integration algorithm QAGS + taking account of the user-supplied locations of singular points. + The array PTS of length NPTS should contain the endpoints of the + integration ranges defined by the integration region and locations + of the singularities. For example, to integrate over the region + (a,b) with break-points at x_1, x_2, x_3 (where a < x_1 < x_2 < + x_3 < b) the following PTS array should be used + + pts[0] = a + pts[1] = x_1 + pts[2] = x_2 + pts[3] = x_3 + pts[4] = b + + with NPTS = 5. + + If you know the locations of the singular points in the integration + region then this routine will be faster than `QAGS'. + + + +File: gsl-ref.info, Node: QAGI adaptive integration on infinite intervals, Next: QAWC adaptive integration for Cauchy principal values, Prev: QAGP adaptive integration with known singular points, Up: Numerical Integration + +17.6 QAGI adaptive integration on infinite intervals +==================================================== + + -- Function: int gsl_integration_qagi (gsl_function * F, double + EPSABS, double EPSREL, size_t LIMIT, + gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function computes the integral of the function F over the + infinite interval (-\infty,+\infty). The integral is mapped onto + the semi-open interval (0,1] using the transformation x = (1-t)/t, + + \int_{-\infty}^{+\infty} dx f(x) = + \int_0^1 dt (f((1-t)/t) + f((-1+t)/t))/t^2. + + It is then integrated using the QAGS algorithm. The normal + 21-point Gauss-Kronrod rule of QAGS is replaced by a 15-point + rule, because the transformation can generate an integrable + singularity at the origin. In this case a lower-order rule is + more efficient. + + -- Function: int gsl_integration_qagiu (gsl_function * F, double A, + double EPSABS, double EPSREL, size_t LIMIT, + gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function computes the integral of the function F over the + semi-infinite interval (a,+\infty). The integral is mapped onto + the semi-open interval (0,1] using the transformation x = a + + (1-t)/t, + + \int_{a}^{+\infty} dx f(x) = + \int_0^1 dt f(a + (1-t)/t)/t^2 + + and then integrated using the QAGS algorithm. + + -- Function: int gsl_integration_qagil (gsl_function * F, double B, + double EPSABS, double EPSREL, size_t LIMIT, + gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function computes the integral of the function F over the + semi-infinite interval (-\infty,b). The integral is mapped onto + the semi-open interval (0,1] using the transformation x = b - + (1-t)/t, + + \int_{-\infty}^{b} dx f(x) = + \int_0^1 dt f(b - (1-t)/t)/t^2 + + and then integrated using the QAGS algorithm. + + +File: gsl-ref.info, Node: QAWC adaptive integration for Cauchy principal values, Next: QAWS adaptive integration for singular functions, Prev: QAGI adaptive integration on infinite intervals, Up: Numerical Integration + +17.7 QAWC adaptive integration for Cauchy principal values +========================================================== + + -- Function: int gsl_integration_qawc (gsl_function * F, double A, + double B, double C, double EPSABS, double EPSREL, size_t + LIMIT, gsl_integration_workspace * WORKSPACE, double * + RESULT, double * ABSERR) + This function computes the Cauchy principal value of the integral + of f over (a,b), with a singularity at C, + + I = \int_a^b dx f(x) / (x - c) + + The adaptive bisection algorithm of QAG is used, with + modifications to ensure that subdivisions do not occur at the + singular point x = c. When a subinterval contains the point x = c + or is close to it then a special 25-point modified Clenshaw-Curtis + rule is used to control the singularity. Further away from the + singularity the algorithm uses an ordinary 15-point Gauss-Kronrod + integration rule. + + + +File: gsl-ref.info, Node: QAWS adaptive integration for singular functions, Next: QAWO adaptive integration for oscillatory functions, Prev: QAWC adaptive integration for Cauchy principal values, Up: Numerical Integration + +17.8 QAWS adaptive integration for singular functions +===================================================== + +The QAWS algorithm is designed for integrands with algebraic-logarithmic +singularities at the end-points of an integration region. In order to +work efficiently the algorithm requires a precomputed table of +Chebyshev moments. + + -- Function: gsl_integration_qaws_table * +gsl_integration_qaws_table_alloc (double ALPHA, double BETA, int MU, + int NU) + This function allocates space for a `gsl_integration_qaws_table' + struct describing a singular weight function W(x) with the + parameters (\alpha, \beta, \mu, \nu), + + W(x) = (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x) + + where \alpha > -1, \beta > -1, and \mu = 0, 1, \nu = 0, 1. The + weight function can take four different forms depending on the + values of \mu and \nu, + + W(x) = (x-a)^alpha (b-x)^beta (mu = 0, nu = 0) + W(x) = (x-a)^alpha (b-x)^beta log(x-a) (mu = 1, nu = 0) + W(x) = (x-a)^alpha (b-x)^beta log(b-x) (mu = 0, nu = 1) + W(x) = (x-a)^alpha (b-x)^beta log(x-a) log(b-x) (mu = 1, nu = 1) + + The singular points (a,b) do not have to be specified until the + integral is computed, where they are the endpoints of the + integration range. + + The function returns a pointer to the newly allocated table + `gsl_integration_qaws_table' if no errors were detected, and 0 in + the case of error. + + -- Function: int gsl_integration_qaws_table_set + (gsl_integration_qaws_table * T, double ALPHA, double BETA, + int MU, int NU) + This function modifies the parameters (\alpha, \beta, \mu, \nu) of + an existing `gsl_integration_qaws_table' struct T. + + -- Function: void gsl_integration_qaws_table_free + (gsl_integration_qaws_table * T) + This function frees all the memory associated with the + `gsl_integration_qaws_table' struct T. + + -- Function: int gsl_integration_qaws (gsl_function * F, const double + A, const double B, gsl_integration_qaws_table * T, const + double EPSABS, const double EPSREL, const size_t LIMIT, + gsl_integration_workspace * WORKSPACE, double * RESULT, + double * ABSERR) + This function computes the integral of the function f(x) over the + interval (a,b) with the singular weight function (x-a)^\alpha + (b-x)^\beta \log^\mu (x-a) \log^\nu (b-x). The parameters of the + weight function (\alpha, \beta, \mu, \nu) are taken from the table + T. The integral is, + + I = \int_a^b dx f(x) (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x). + + The adaptive bisection algorithm of QAG is used. When a + subinterval contains one of the endpoints then a special 25-point + modified Clenshaw-Curtis rule is used to control the + singularities. For subintervals which do not include the + endpoints an ordinary 15-point Gauss-Kronrod integration rule is + used. + + + +File: gsl-ref.info, Node: QAWO adaptive integration for oscillatory functions, Next: QAWF adaptive integration for Fourier integrals, Prev: QAWS adaptive integration for singular functions, Up: Numerical Integration + +17.9 QAWO adaptive integration for oscillatory functions +======================================================== + +The QAWO algorithm is designed for integrands with an oscillatory +factor, \sin(\omega x) or \cos(\omega x). In order to work efficiently +the algorithm requires a table of Chebyshev moments which must be +pre-computed with calls to the functions below. + + -- Function: gsl_integration_qawo_table * +gsl_integration_qawo_table_alloc (double OMEGA, double L, enum + gsl_integration_qawo_enum SINE, size_t N) + This function allocates space for a `gsl_integration_qawo_table' + struct and its associated workspace describing a sine or cosine + weight function W(x) with the parameters (\omega, L), + + W(x) = sin(omega x) + W(x) = cos(omega x) + + The parameter L must be the length of the interval over which the + function will be integrated L = b - a. The choice of sine or + cosine is made with the parameter SINE which should be chosen from + one of the two following symbolic values: + + GSL_INTEG_COSINE + GSL_INTEG_SINE + + The `gsl_integration_qawo_table' is a table of the trigonometric + coefficients required in the integration process. The parameter N + determines the number of levels of coefficients that are computed. + Each level corresponds to one bisection of the interval L, so that + N levels are sufficient for subintervals down to the length L/2^n. + The integration routine `gsl_integration_qawo' returns the error + `GSL_ETABLE' if the number of levels is insufficient for the + requested accuracy. + + + -- Function: int gsl_integration_qawo_table_set + (gsl_integration_qawo_table * T, double OMEGA, double L, enum + gsl_integration_qawo_enum SINE) + This function changes the parameters OMEGA, L and SINE of the + existing workspace T. + + -- Function: int gsl_integration_qawo_table_set_length + (gsl_integration_qawo_table * T, double L) + This function allows the length parameter L of the workspace T to + be changed. + + -- Function: void gsl_integration_qawo_table_free + (gsl_integration_qawo_table * T) + This function frees all the memory associated with the workspace T. + + -- Function: int gsl_integration_qawo (gsl_function * F, const double + A, const double EPSABS, const double EPSREL, const size_t + LIMIT, gsl_integration_workspace * WORKSPACE, + gsl_integration_qawo_table * WF, double * RESULT, double * + ABSERR) + This function uses an adaptive algorithm to compute the integral of + f over (a,b) with the weight function \sin(\omega x) or + \cos(\omega x) defined by the table WF, + + I = \int_a^b dx f(x) sin(omega x) + I = \int_a^b dx f(x) cos(omega x) + + The results are extrapolated using the epsilon-algorithm to + accelerate the convergence of the integral. The function returns + the final approximation from the extrapolation, RESULT, and an + estimate of the absolute error, ABSERR. The subintervals and + their results are stored in the memory provided by WORKSPACE. The + maximum number of subintervals is given by LIMIT, which may not + exceed the allocated size of the workspace. + + Those subintervals with "large" widths d where d\omega > 4 are + computed using a 25-point Clenshaw-Curtis integration rule, which + handles the oscillatory behavior. Subintervals with a "small" + widths where d\omega < 4 are computed using a 15-point + Gauss-Kronrod integration. + + + +File: gsl-ref.info, Node: QAWF adaptive integration for Fourier integrals, Next: CQUAD doubly-adaptive integration, Prev: QAWO adaptive integration for oscillatory functions, Up: Numerical Integration + +17.10 QAWF adaptive integration for Fourier integrals +===================================================== + + -- Function: int gsl_integration_qawf (gsl_function * F, const double + A, const double EPSABS, const size_t LIMIT, + gsl_integration_workspace * WORKSPACE, + gsl_integration_workspace * CYCLE_WORKSPACE, + gsl_integration_qawo_table * WF, double * RESULT, double * + ABSERR) + This function attempts to compute a Fourier integral of the + function F over the semi-infinite interval [a,+\infty). + + I = \int_a^{+\infty} dx f(x) sin(omega x) + I = \int_a^{+\infty} dx f(x) cos(omega x) + + The parameter \omega and choice of \sin or \cos is taken from the + table WF (the length L can take any value, since it is overridden + by this function to a value appropriate for the Fourier + integration). The integral is computed using the QAWO algorithm + over each of the subintervals, + + C_1 = [a, a + c] + C_2 = [a + c, a + 2 c] + ... = ... + C_k = [a + (k-1) c, a + k c] + + where c = (2 floor(|\omega|) + 1) \pi/|\omega|. The width c is + chosen to cover an odd number of periods so that the contributions + from the intervals alternate in sign and are monotonically + decreasing when F is positive and monotonically decreasing. The + sum of this sequence of contributions is accelerated using the + epsilon-algorithm. + + This function works to an overall absolute tolerance of ABSERR. + The following strategy is used: on each interval C_k the algorithm + tries to achieve the tolerance + + TOL_k = u_k abserr + + where u_k = (1 - p)p^{k-1} and p = 9/10. The sum of the geometric + series of contributions from each interval gives an overall + tolerance of ABSERR. + + If the integration of a subinterval leads to difficulties then the + accuracy requirement for subsequent intervals is relaxed, + + TOL_k = u_k max(abserr, max_{in - 1], this function obtains the I-th + Gauss-Legendre point XI and weight WI on the interval [A,B]. The + points and weights are ordered by increasing point value. A + function f may be integrated on [A,B] by summing wi * f(xi) over I. + + -- Function: void gsl_integration_glfixed_table_free + (gsl_integration_glfixed_table * T) + This function frees the memory associated with the table T. + + +File: gsl-ref.info, Node: Numerical integration error codes, Next: Numerical integration examples, Prev: Fixed order Gauss-Legendre integration, Up: Numerical Integration + +17.13 Error codes +================= + +In addition to the standard error codes for invalid arguments the +functions can return the following values, + +`GSL_EMAXITER' + the maximum number of subdivisions was exceeded. + +`GSL_EROUND' + cannot reach tolerance because of roundoff error, or roundoff + error was detected in the extrapolation table. + +`GSL_ESING' + a non-integrable singularity or other bad integrand behavior was + found in the integration interval. + +`GSL_EDIVERGE' + the integral is divergent, or too slowly convergent to be + integrated numerically. + + +File: gsl-ref.info, Node: Numerical integration examples, Next: Numerical integration References and Further Reading, Prev: Numerical integration error codes, Up: Numerical Integration + +17.14 Examples +============== + +The integrator `QAGS' will handle a large class of definite integrals. +For example, consider the following integral, which has an +algebraic-logarithmic singularity at the origin, + + \int_0^1 x^{-1/2} log(x) dx = -4 + +The program below computes this integral to a relative accuracy bound of +`1e-7'. + + #include + #include + #include + + double f (double x, void * params) { + double alpha = *(double *) params; + double f = log(alpha*x) / sqrt(x); + return f; + } + + int + main (void) + { + gsl_integration_workspace * w + = gsl_integration_workspace_alloc (1000); + + double result, error; + double expected = -4.0; + double alpha = 1.0; + + gsl_function F; + F.function = &f; + F.params = α + + gsl_integration_qags (&F, 0, 1, 0, 1e-7, 1000, + w, &result, &error); + + printf ("result = % .18f\n", result); + printf ("exact result = % .18f\n", expected); + printf ("estimated error = % .18f\n", error); + printf ("actual error = % .18f\n", result - expected); + printf ("intervals = %d\n", w->size); + + gsl_integration_workspace_free (w); + + return 0; + } + +The results below show that the desired accuracy is achieved after 8 +subdivisions. + + $ ./a.out + result = -3.999999999999973799 + exact result = -4.000000000000000000 + estimated error = 0.000000000000246025 + actual error = 0.000000000000026201 + intervals = 8 + +In fact, the extrapolation procedure used by `QAGS' produces an +accuracy of almost twice as many digits. The error estimate returned by +the extrapolation procedure is larger than the actual error, giving a +margin of safety of one order of magnitude. + + +File: gsl-ref.info, Node: Numerical integration References and Further Reading, Prev: Numerical integration examples, Up: Numerical Integration + +17.15 References and Further Reading +==================================== + +The following book is the definitive reference for QUADPACK, and was +written by the original authors. It provides descriptions of the +algorithms, program listings, test programs and examples. It also +includes useful advice on numerical integration and many references to +the numerical integration literature used in developing QUADPACK. + + R. Piessens, E. de Doncker-Kapenga, C.W. Ueberhuber, D.K. Kahaner. + `QUADPACK A subroutine package for automatic integration' Springer + Verlag, 1983. + +The CQUAD integration algorithm is described in the following paper: + + P. Gonnet, "Increasing the Reliability of Adaptive Quadrature Using + Explicit Interpolants", `ACM Transactions on Mathematical + Software', Volume 37 (2010), Issue 3, Article 26. + + +File: gsl-ref.info, Node: Random Number Generation, Next: Quasi-Random Sequences, Prev: Numerical Integration, Up: Top + +18 Random Number Generation +*************************** + +The library provides a large collection of random number generators +which can be accessed through a uniform interface. Environment +variables allow you to select different generators and seeds at runtime, +so that you can easily switch between generators without needing to +recompile your program. Each instance of a generator keeps track of its +own state, allowing the generators to be used in multi-threaded +programs. Additional functions are available for transforming uniform +random numbers into samples from continuous or discrete probability +distributions such as the Gaussian, log-normal or Poisson distributions. + + These functions are declared in the header file `gsl_rng.h'. + +* Menu: + +* General comments on random numbers:: +* The Random Number Generator Interface:: +* Random number generator initialization:: +* Sampling from a random number generator:: +* Auxiliary random number generator functions:: +* Random number environment variables:: +* Copying random number generator state:: +* Reading and writing random number generator state:: +* Random number generator algorithms:: +* Unix random number generators:: +* Other random number generators:: +* Random Number Generator Performance:: +* Random Number Generator Examples:: +* Random Number References and Further Reading:: +* Random Number Acknowledgements:: + + +File: gsl-ref.info, Node: General comments on random numbers, Next: The Random Number Generator Interface, Up: Random Number Generation + +18.1 General comments on random numbers +======================================= + +In 1988, Park and Miller wrote a paper entitled "Random number +generators: good ones are hard to find." [Commun. ACM, 31, 1192-1201]. +Fortunately, some excellent random number generators are available, +though poor ones are still in common use. You may be happy with the +system-supplied random number generator on your computer, but you should +be aware that as computers get faster, requirements on random number +generators increase. Nowadays, a simulation that calls a random number +generator millions of times can often finish before you can make it down +the hall to the coffee machine and back. + + A very nice review of random number generators was written by Pierre +L'Ecuyer, as Chapter 4 of the book: Handbook on Simulation, Jerry Banks, +ed. (Wiley, 1997). The chapter is available in postscript from +L'Ecuyer's ftp site (see references). Knuth's volume on Seminumerical +Algorithms (originally published in 1968) devotes 170 pages to random +number generators, and has recently been updated in its 3rd edition +(1997). It is brilliant, a classic. If you don't own it, you should +stop reading right now, run to the nearest bookstore, and buy it. + + A good random number generator will satisfy both theoretical and +statistical properties. Theoretical properties are often hard to obtain +(they require real math!), but one prefers a random number generator +with a long period, low serial correlation, and a tendency _not_ to +"fall mainly on the planes." Statistical tests are performed with +numerical simulations. Generally, a random number generator is used to +estimate some quantity for which the theory of probability provides an +exact answer. Comparison to this exact answer provides a measure of +"randomness". + + +File: gsl-ref.info, Node: The Random Number Generator Interface, Next: Random number generator initialization, Prev: General comments on random numbers, Up: Random Number Generation + +18.2 The Random Number Generator Interface +========================================== + +It is important to remember that a random number generator is not a +"real" function like sine or cosine. Unlike real functions, successive +calls to a random number generator yield different return values. Of +course that is just what you want for a random number generator, but to +achieve this effect, the generator must keep track of some kind of +"state" variable. Sometimes this state is just an integer (sometimes +just the value of the previously generated random number), but often it +is more complicated than that and may involve a whole array of numbers, +possibly with some indices thrown in. To use the random number +generators, you do not need to know the details of what comprises the +state, and besides that varies from algorithm to algorithm. + + The random number generator library uses two special structs, +`gsl_rng_type' which holds static information about each type of +generator and `gsl_rng' which describes an instance of a generator +created from a given `gsl_rng_type'. + + The functions described in this section are declared in the header +file `gsl_rng.h'. + + +File: gsl-ref.info, Node: Random number generator initialization, Next: Sampling from a random number generator, Prev: The Random Number Generator Interface, Up: Random Number Generation + +18.3 Random number generator initialization +=========================================== + + -- Function: gsl_rng * gsl_rng_alloc (const gsl_rng_type * T) + This function returns a pointer to a newly-created instance of a + random number generator of type T. For example, the following + code creates an instance of the Tausworthe generator, + + gsl_rng * r = gsl_rng_alloc (gsl_rng_taus); + + If there is insufficient memory to create the generator then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + The generator is automatically initialized with the default seed, + `gsl_rng_default_seed'. This is zero by default but can be changed + either directly or by using the environment variable `GSL_RNG_SEED' + (*note Random number environment variables::). + + The details of the available generator types are described later + in this chapter. + + -- Function: void gsl_rng_set (const gsl_rng * R, unsigned long int S) + This function initializes (or `seeds') the random number + generator. If the generator is seeded with the same value of S on + two different runs, the same stream of random numbers will be + generated by successive calls to the routines below. If different + values of S >= 1 are supplied, then the generated streams of random + numbers should be completely different. If the seed S is zero + then the standard seed from the original implementation is used + instead. For example, the original Fortran source code for the + `ranlux' generator used a seed of 314159265, and so choosing S + equal to zero reproduces this when using `gsl_rng_ranlux'. + + When using multiple seeds with the same generator, choose seed + values greater than zero to avoid collisions with the default + setting. + + Note that the most generators only accept 32-bit seeds, with higher + values being reduced modulo 2^32. For generators with smaller + ranges the maximum seed value will typically be lower. + + -- Function: void gsl_rng_free (gsl_rng * R) + This function frees all the memory associated with the generator R. + + +File: gsl-ref.info, Node: Sampling from a random number generator, Next: Auxiliary random number generator functions, Prev: Random number generator initialization, Up: Random Number Generation + +18.4 Sampling from a random number generator +============================================ + +The following functions return uniformly distributed random numbers, +either as integers or double precision floating point numbers. Inline +versions of these functions are used when `HAVE_INLINE' is defined. To +obtain non-uniform distributions *note Random Number Distributions::. + + -- Function: unsigned long int gsl_rng_get (const gsl_rng * R) + This function returns a random integer from the generator R. The + minimum and maximum values depend on the algorithm used, but all + integers in the range [MIN,MAX] are equally likely. The values of + MIN and MAX can determined using the auxiliary functions + `gsl_rng_max (r)' and `gsl_rng_min (r)'. + + -- Function: double gsl_rng_uniform (const gsl_rng * R) + This function returns a double precision floating point number + uniformly distributed in the range [0,1). The range includes 0.0 + but excludes 1.0. The value is typically obtained by dividing the + result of `gsl_rng_get(r)' by `gsl_rng_max(r) + 1.0' in double + precision. Some generators compute this ratio internally so that + they can provide floating point numbers with more than 32 bits of + randomness (the maximum number of bits that can be portably + represented in a single `unsigned long int'). + + -- Function: double gsl_rng_uniform_pos (const gsl_rng * R) + This function returns a positive double precision floating point + number uniformly distributed in the range (0,1), excluding both + 0.0 and 1.0. The number is obtained by sampling the generator + with the algorithm of `gsl_rng_uniform' until a non-zero value is + obtained. You can use this function if you need to avoid a + singularity at 0.0. + + -- Function: unsigned long int gsl_rng_uniform_int (const gsl_rng * R, + unsigned long int N) + This function returns a random integer from 0 to n-1 inclusive by + scaling down and/or discarding samples from the generator R. All + integers in the range [0,n-1] are produced with equal probability. + For generators with a non-zero minimum value an offset is applied + so that zero is returned with the correct probability. + + Note that this function is designed for sampling from ranges + smaller than the range of the underlying generator. The parameter + N must be less than or equal to the range of the generator R. If + N is larger than the range of the generator then the function + calls the error handler with an error code of `GSL_EINVAL' and + returns zero. + + In particular, this function is not intended for generating the + full range of unsigned integer values [0,2^32-1]. Instead choose a + generator with the maximal integer range and zero minimum value, + such as `gsl_rng_ranlxd1', `gsl_rng_mt19937' or `gsl_rng_taus', + and sample it directly using `gsl_rng_get'. The range of each + generator can be found using the auxiliary functions described in + the next section. + + +File: gsl-ref.info, Node: Auxiliary random number generator functions, Next: Random number environment variables, Prev: Sampling from a random number generator, Up: Random Number Generation + +18.5 Auxiliary random number generator functions +================================================ + +The following functions provide information about an existing +generator. You should use them in preference to hard-coding the +generator parameters into your own code. + + -- Function: const char * gsl_rng_name (const gsl_rng * R) + This function returns a pointer to the name of the generator. For + example, + + printf ("r is a '%s' generator\n", + gsl_rng_name (r)); + + would print something like `r is a 'taus' generator'. + + -- Function: unsigned long int gsl_rng_max (const gsl_rng * R) + `gsl_rng_max' returns the largest value that `gsl_rng_get' can + return. + + -- Function: unsigned long int gsl_rng_min (const gsl_rng * R) + `gsl_rng_min' returns the smallest value that `gsl_rng_get' can + return. Usually this value is zero. There are some generators + with algorithms that cannot return zero, and for these generators + the minimum value is 1. + + -- Function: void * gsl_rng_state (const gsl_rng * R) + -- Function: size_t gsl_rng_size (const gsl_rng * R) + These functions return a pointer to the state of generator R and + its size. You can use this information to access the state + directly. For example, the following code will write the state of + a generator to a stream, + + void * state = gsl_rng_state (r); + size_t n = gsl_rng_size (r); + fwrite (state, n, 1, stream); + + -- Function: const gsl_rng_type ** gsl_rng_types_setup (void) + This function returns a pointer to an array of all the available + generator types, terminated by a null pointer. The function should + be called once at the start of the program, if needed. The + following code fragment shows how to iterate over the array of + generator types to print the names of the available algorithms, + + const gsl_rng_type **t, **t0; + + t0 = gsl_rng_types_setup (); + + printf ("Available generators:\n"); + + for (t = t0; *t != 0; t++) + { + printf ("%s\n", (*t)->name); + } + + +File: gsl-ref.info, Node: Random number environment variables, Next: Copying random number generator state, Prev: Auxiliary random number generator functions, Up: Random Number Generation + +18.6 Random number environment variables +======================================== + +The library allows you to choose a default generator and seed from the +environment variables `GSL_RNG_TYPE' and `GSL_RNG_SEED' and the +function `gsl_rng_env_setup'. This makes it easy try out different +generators and seeds without having to recompile your program. + + -- Function: const gsl_rng_type * gsl_rng_env_setup (void) + This function reads the environment variables `GSL_RNG_TYPE' and + `GSL_RNG_SEED' and uses their values to set the corresponding + library variables `gsl_rng_default' and `gsl_rng_default_seed'. + These global variables are defined as follows, + + extern const gsl_rng_type *gsl_rng_default + extern unsigned long int gsl_rng_default_seed + + The environment variable `GSL_RNG_TYPE' should be the name of a + generator, such as `taus' or `mt19937'. The environment variable + `GSL_RNG_SEED' should contain the desired seed value. It is + converted to an `unsigned long int' using the C library function + `strtoul'. + + If you don't specify a generator for `GSL_RNG_TYPE' then + `gsl_rng_mt19937' is used as the default. The initial value of + `gsl_rng_default_seed' is zero. + + +Here is a short program which shows how to create a global generator +using the environment variables `GSL_RNG_TYPE' and `GSL_RNG_SEED', + + #include + #include + + gsl_rng * r; /* global generator */ + + int + main (void) + { + const gsl_rng_type * T; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("generator type: %s\n", gsl_rng_name (r)); + printf ("seed = %lu\n", gsl_rng_default_seed); + printf ("first value = %lu\n", gsl_rng_get (r)); + + gsl_rng_free (r); + return 0; + } + +Running the program without any environment variables uses the initial +defaults, an `mt19937' generator with a seed of 0, + + $ ./a.out + generator type: mt19937 + seed = 0 + first value = 4293858116 + +By setting the two variables on the command line we can change the +default generator and the seed, + + $ GSL_RNG_TYPE="taus" GSL_RNG_SEED=123 ./a.out + GSL_RNG_TYPE=taus + GSL_RNG_SEED=123 + generator type: taus + seed = 123 + first value = 2720986350 + + +File: gsl-ref.info, Node: Copying random number generator state, Next: Reading and writing random number generator state, Prev: Random number environment variables, Up: Random Number Generation + +18.7 Copying random number generator state +========================================== + +The above methods do not expose the random number `state' which changes +from call to call. It is often useful to be able to save and restore +the state. To permit these practices, a few somewhat more advanced +functions are supplied. These include: + + -- Function: int gsl_rng_memcpy (gsl_rng * DEST, const gsl_rng * SRC) + This function copies the random number generator SRC into the + pre-existing generator DEST, making DEST into an exact copy of + SRC. The two generators must be of the same type. + + -- Function: gsl_rng * gsl_rng_clone (const gsl_rng * R) + This function returns a pointer to a newly created generator which + is an exact copy of the generator R. + + +File: gsl-ref.info, Node: Reading and writing random number generator state, Next: Random number generator algorithms, Prev: Copying random number generator state, Up: Random Number Generation + +18.8 Reading and writing random number generator state +====================================================== + +The library provides functions for reading and writing the random +number state to a file as binary data. + + -- Function: int gsl_rng_fwrite (FILE * STREAM, const gsl_rng * R) + This function writes the random number state of the random number + generator R to the stream STREAM in binary format. The return + value is 0 for success and `GSL_EFAILED' if there was a problem + writing to the file. Since the data is written in the native + binary format it may not be portable between different + architectures. + + -- Function: int gsl_rng_fread (FILE * STREAM, gsl_rng * R) + This function reads the random number state into the random number + generator R from the open stream STREAM in binary format. The + random number generator R must be preinitialized with the correct + random number generator type since type information is not saved. + The return value is 0 for success and `GSL_EFAILED' if there was a + problem reading from the file. The data is assumed to have been + written in the native binary format on the same architecture. + + +File: gsl-ref.info, Node: Random number generator algorithms, Next: Unix random number generators, Prev: Reading and writing random number generator state, Up: Random Number Generation + +18.9 Random number generator algorithms +======================================= + +The functions described above make no reference to the actual algorithm +used. This is deliberate so that you can switch algorithms without +having to change any of your application source code. The library +provides a large number of generators of different types, including +simulation quality generators, generators provided for compatibility +with other libraries and historical generators from the past. + + The following generators are recommended for use in simulation. They +have extremely long periods, low correlation and pass most statistical +tests. For the most reliable source of uncorrelated numbers, the +second-generation RANLUX generators have the strongest proof of +randomness. + + -- Generator: gsl_rng_mt19937 + The MT19937 generator of Makoto Matsumoto and Takuji Nishimura is a + variant of the twisted generalized feedback shift-register + algorithm, and is known as the "Mersenne Twister" generator. It + has a Mersenne prime period of 2^19937 - 1 (about 10^6000) and is + equi-distributed in 623 dimensions. It has passed the DIEHARD + statistical tests. It uses 624 words of state per generator and is + comparable in speed to the other generators. The original + generator used a default seed of 4357 and choosing S equal to zero + in `gsl_rng_set' reproduces this. Later versions switched to 5489 + as the default seed, you can choose this explicitly via + `gsl_rng_set' instead if you require it. + + For more information see, + Makoto Matsumoto and Takuji Nishimura, "Mersenne Twister: A + 623-dimensionally equidistributed uniform pseudorandom number + generator". `ACM Transactions on Modeling and Computer + Simulation', Vol. 8, No. 1 (Jan. 1998), Pages 3-30 + + The generator `gsl_rng_mt19937' uses the second revision of the + seeding procedure published by the two authors above in 2002. The + original seeding procedures could cause spurious artifacts for + some seed values. They are still available through the alternative + generators `gsl_rng_mt19937_1999' and `gsl_rng_mt19937_1998'. + + -- Generator: gsl_rng_ranlxs0 + -- Generator: gsl_rng_ranlxs1 + -- Generator: gsl_rng_ranlxs2 + The generator `ranlxs0' is a second-generation version of the + RANLUX algorithm of Lu"scher, which produces "luxury random + numbers". This generator provides single precision output (24 + bits) at three luxury levels `ranlxs0', `ranlxs1' and `ranlxs2', + in increasing order of strength. It uses double-precision + floating point arithmetic internally and can be significantly + faster than the integer version of `ranlux', particularly on + 64-bit architectures. The period of the generator is about + 10^171. The algorithm has mathematically proven properties and + can provide truly decorrelated numbers at a known level of + randomness. The higher luxury levels provide increased + decorrelation between samples as an additional safety margin. + + Note that the range of allowed seeds for this generator is + [0,2^31-1]. Higher seed values are wrapped modulo 2^31. + + -- Generator: gsl_rng_ranlxd1 + -- Generator: gsl_rng_ranlxd2 + These generators produce double precision output (48 bits) from the + RANLXS generator. The library provides two luxury levels + `ranlxd1' and `ranlxd2', in increasing order of strength. + + -- Generator: gsl_rng_ranlux + -- Generator: gsl_rng_ranlux389 + The `ranlux' generator is an implementation of the original + algorithm developed by Lu"scher. It uses a + lagged-fibonacci-with-skipping algorithm to produce "luxury random + numbers". It is a 24-bit generator, originally designed for + single-precision IEEE floating point numbers. This implementation + is based on integer arithmetic, while the second-generation + versions RANLXS and RANLXD described above provide floating-point + implementations which will be faster on many platforms. The + period of the generator is about 10^171. The algorithm has + mathematically proven properties and it can provide truly + decorrelated numbers at a known level of randomness. The default + level of decorrelation recommended by Lu"scher is provided by + `gsl_rng_ranlux', while `gsl_rng_ranlux389' gives the highest + level of randomness, with all 24 bits decorrelated. Both types of + generator use 24 words of state per generator. + + For more information see, + M. Lu"scher, "A portable high-quality random number generator + for lattice field theory calculations", `Computer Physics + Communications', 79 (1994) 100-110. + + F. James, "RANLUX: A Fortran implementation of the + high-quality pseudo-random number generator of Lu"scher", + `Computer Physics Communications', 79 (1994) 111-114 + + -- Generator: gsl_rng_cmrg + This is a combined multiple recursive generator by L'Ecuyer. Its + sequence is, + + z_n = (x_n - y_n) mod m_1 + + where the two underlying generators x_n and y_n are, + + x_n = (a_1 x_{n-1} + a_2 x_{n-2} + a_3 x_{n-3}) mod m_1 + y_n = (b_1 y_{n-1} + b_2 y_{n-2} + b_3 y_{n-3}) mod m_2 + + with coefficients a_1 = 0, a_2 = 63308, a_3 = -183326, b_1 = 86098, + b_2 = 0, b_3 = -539608, and moduli m_1 = 2^31 - 1 = 2147483647 and + m_2 = 2145483479. + + The period of this generator is lcm(m_1^3-1, m_2^3-1), which is + approximately 2^185 (about 10^56). It uses 6 words of state per + generator. For more information see, + + P. L'Ecuyer, "Combined Multiple Recursive Random Number + Generators", `Operations Research', 44, 5 (1996), 816-822. + + -- Generator: gsl_rng_mrg + This is a fifth-order multiple recursive generator by L'Ecuyer, + Blouin and Coutre. Its sequence is, + + x_n = (a_1 x_{n-1} + a_5 x_{n-5}) mod m + + with a_1 = 107374182, a_2 = a_3 = a_4 = 0, a_5 = 104480 and m = + 2^31 - 1. + + The period of this generator is about 10^46. It uses 5 words of + state per generator. More information can be found in the + following paper, + P. L'Ecuyer, F. Blouin, and R. Coutre, "A search for good + multiple recursive random number generators", `ACM + Transactions on Modeling and Computer Simulation' 3, 87-98 + (1993). + + -- Generator: gsl_rng_taus + -- Generator: gsl_rng_taus2 + This is a maximally equidistributed combined Tausworthe generator + by L'Ecuyer. The sequence is, + + x_n = (s1_n ^^ s2_n ^^ s3_n) + + where, + + s1_{n+1} = (((s1_n&4294967294)<<12)^^(((s1_n<<13)^^s1_n)>>19)) + s2_{n+1} = (((s2_n&4294967288)<< 4)^^(((s2_n<< 2)^^s2_n)>>25)) + s3_{n+1} = (((s3_n&4294967280)<<17)^^(((s3_n<< 3)^^s3_n)>>11)) + + computed modulo 2^32. In the formulas above ^^ denotes + "exclusive-or". Note that the algorithm relies on the properties + of 32-bit unsigned integers and has been implemented using a + bitmask of `0xFFFFFFFF' to make it work on 64 bit machines. + + The period of this generator is 2^88 (about 10^26). It uses 3 + words of state per generator. For more information see, + + P. L'Ecuyer, "Maximally Equidistributed Combined Tausworthe + Generators", `Mathematics of Computation', 65, 213 (1996), + 203-213. + + The generator `gsl_rng_taus2' uses the same algorithm as + `gsl_rng_taus' but with an improved seeding procedure described in + the paper, + + P. L'Ecuyer, "Tables of Maximally Equidistributed Combined + LFSR Generators", `Mathematics of Computation', 68, 225 + (1999), 261-269 + + The generator `gsl_rng_taus2' should now be used in preference to + `gsl_rng_taus'. + + -- Generator: gsl_rng_gfsr4 + The `gfsr4' generator is like a lagged-fibonacci generator, and + produces each number as an `xor''d sum of four previous values. + + r_n = r_{n-A} ^^ r_{n-B} ^^ r_{n-C} ^^ r_{n-D} + + Ziff (ref below) notes that "it is now widely known" that two-tap + registers (such as R250, which is described below) have serious + flaws, the most obvious one being the three-point correlation that + comes from the definition of the generator. Nice mathematical + properties can be derived for GFSR's, and numerics bears out the + claim that 4-tap GFSR's with appropriately chosen offsets are as + random as can be measured, using the author's test. + + This implementation uses the values suggested the example on p392 + of Ziff's article: A=471, B=1586, C=6988, D=9689. + + If the offsets are appropriately chosen (such as the one ones in + this implementation), then the sequence is said to be maximal; + that means that the period is 2^D - 1, where D is the longest lag. + (It is one less than 2^D because it is not permitted to have all + zeros in the `ra[]' array.) For this implementation with D=9689 + that works out to about 10^2917. + + Note that the implementation of this generator using a 32-bit + integer amounts to 32 parallel implementations of one-bit + generators. One consequence of this is that the period of this + 32-bit generator is the same as for the one-bit generator. + Moreover, this independence means that all 32-bit patterns are + equally likely, and in particular that 0 is an allowed random + value. (We are grateful to Heiko Bauke for clarifying for us these + properties of GFSR random number generators.) + + For more information see, + Robert M. Ziff, "Four-tap shift-register-sequence + random-number generators", `Computers in Physics', 12(4), + Jul/Aug 1998, pp 385-392. + + +File: gsl-ref.info, Node: Unix random number generators, Next: Other random number generators, Prev: Random number generator algorithms, Up: Random Number Generation + +18.10 Unix random number generators +=================================== + +The standard Unix random number generators `rand', `random' and +`rand48' are provided as part of GSL. Although these generators are +widely available individually often they aren't all available on the +same platform. This makes it difficult to write portable code using +them and so we have included the complete set of Unix generators in GSL +for convenience. Note that these generators don't produce high-quality +randomness and aren't suitable for work requiring accurate statistics. +However, if you won't be measuring statistical quantities and just want +to introduce some variation into your program then these generators are +quite acceptable. + + -- Generator: gsl_rng_rand + This is the BSD `rand' generator. Its sequence is + + x_{n+1} = (a x_n + c) mod m + + with a = 1103515245, c = 12345 and m = 2^31. The seed specifies + the initial value, x_1. The period of this generator is 2^31, and + it uses 1 word of storage per generator. + + -- Generator: gsl_rng_random_bsd + -- Generator: gsl_rng_random_libc5 + -- Generator: gsl_rng_random_glibc2 + These generators implement the `random' family of functions, a set + of linear feedback shift register generators originally used in BSD + Unix. There are several versions of `random' in use today: the + original BSD version (e.g. on SunOS4), a libc5 version (found on + older GNU/Linux systems) and a glibc2 version. Each version uses a + different seeding procedure, and thus produces different sequences. + + The original BSD routines accepted a variable length buffer for the + generator state, with longer buffers providing higher-quality + randomness. The `random' function implemented algorithms for + buffer lengths of 8, 32, 64, 128 and 256 bytes, and the algorithm + with the largest length that would fit into the user-supplied + buffer was used. To support these algorithms additional + generators are available with the following names, + + gsl_rng_random8_bsd + gsl_rng_random32_bsd + gsl_rng_random64_bsd + gsl_rng_random128_bsd + gsl_rng_random256_bsd + + where the numeric suffix indicates the buffer length. The + original BSD `random' function used a 128-byte default buffer and + so `gsl_rng_random_bsd' has been made equivalent to + `gsl_rng_random128_bsd'. Corresponding versions of the `libc5' + and `glibc2' generators are also available, with the names + `gsl_rng_random8_libc5', `gsl_rng_random8_glibc2', etc. + + -- Generator: gsl_rng_rand48 + This is the Unix `rand48' generator. Its sequence is + + x_{n+1} = (a x_n + c) mod m + + defined on 48-bit unsigned integers with a = 25214903917, c = 11 + and m = 2^48. The seed specifies the upper 32 bits of the initial + value, x_1, with the lower 16 bits set to `0x330E'. The function + `gsl_rng_get' returns the upper 32 bits from each term of the + sequence. This does not have a direct parallel in the original + `rand48' functions, but forcing the result to type `long int' + reproduces the output of `mrand48'. The function + `gsl_rng_uniform' uses the full 48 bits of internal state to return + the double precision number x_n/m, which is equivalent to the + function `drand48'. Note that some versions of the GNU C Library + contained a bug in `mrand48' function which caused it to produce + different results (only the lower 16-bits of the return value were + set). + + +File: gsl-ref.info, Node: Other random number generators, Next: Random Number Generator Performance, Prev: Unix random number generators, Up: Random Number Generation + +18.11 Other random number generators +==================================== + +The generators in this section are provided for compatibility with +existing libraries. If you are converting an existing program to use +GSL then you can select these generators to check your new +implementation against the original one, using the same random number +generator. After verifying that your new program reproduces the +original results you can then switch to a higher-quality generator. + + Note that most of the generators in this section are based on single +linear congruence relations, which are the least sophisticated type of +generator. In particular, linear congruences have poor properties when +used with a non-prime modulus, as several of these routines do (e.g. +with a power of two modulus, 2^31 or 2^32). This leads to periodicity +in the least significant bits of each number, with only the higher bits +having any randomness. Thus if you want to produce a random bitstream +it is best to avoid using the least significant bits. + + -- Generator: gsl_rng_ranf + This is the CRAY random number generator `RANF'. Its sequence is + + x_{n+1} = (a x_n) mod m + + defined on 48-bit unsigned integers with a = 44485709377909 and m + = 2^48. The seed specifies the lower 32 bits of the initial value, + x_1, with the lowest bit set to prevent the seed taking an even + value. The upper 16 bits of x_1 are set to 0. A consequence of + this procedure is that the pairs of seeds 2 and 3, 4 and 5, etc. + produce the same sequences. + + The generator compatible with the CRAY MATHLIB routine RANF. It + produces double precision floating point numbers which should be + identical to those from the original RANF. + + There is a subtlety in the implementation of the seeding. The + initial state is reversed through one step, by multiplying by the + modular inverse of a mod m. This is done for compatibility with + the original CRAY implementation. + + Note that you can only seed the generator with integers up to + 2^32, while the original CRAY implementation uses non-portable + wide integers which can cover all 2^48 states of the generator. + + The function `gsl_rng_get' returns the upper 32 bits from each term + of the sequence. The function `gsl_rng_uniform' uses the full 48 + bits to return the double precision number x_n/m. + + The period of this generator is 2^46. + + -- Generator: gsl_rng_ranmar + This is the RANMAR lagged-fibonacci generator of Marsaglia, Zaman + and Tsang. It is a 24-bit generator, originally designed for + single-precision IEEE floating point numbers. It was included in + the CERNLIB high-energy physics library. + + -- Generator: gsl_rng_r250 + This is the shift-register generator of Kirkpatrick and Stoll. The + sequence is based on the recurrence + + x_n = x_{n-103} ^^ x_{n-250} + + where ^^ denotes "exclusive-or", defined on 32-bit words. The + period of this generator is about 2^250 and it uses 250 words of + state per generator. + + For more information see, + S. Kirkpatrick and E. Stoll, "A very fast shift-register + sequence random number generator", `Journal of Computational + Physics', 40, 517-526 (1981) + + -- Generator: gsl_rng_tt800 + This is an earlier version of the twisted generalized feedback + shift-register generator, and has been superseded by the + development of MT19937. However, it is still an acceptable + generator in its own right. It has a period of 2^800 and uses 33 + words of storage per generator. + + For more information see, + Makoto Matsumoto and Yoshiharu Kurita, "Twisted GFSR + Generators II", `ACM Transactions on Modelling and Computer + Simulation', Vol. 4, No. 3, 1994, pages 254-266. + + -- Generator: gsl_rng_vax + This is the VAX generator `MTH$RANDOM'. Its sequence is, + + x_{n+1} = (a x_n + c) mod m + + with a = 69069, c = 1 and m = 2^32. The seed specifies the + initial value, x_1. The period of this generator is 2^32 and it + uses 1 word of storage per generator. + + -- Generator: gsl_rng_transputer + This is the random number generator from the INMOS Transputer + Development system. Its sequence is, + + x_{n+1} = (a x_n) mod m + + with a = 1664525 and m = 2^32. The seed specifies the initial + value, x_1. + + -- Generator: gsl_rng_randu + This is the IBM `RANDU' generator. Its sequence is + + x_{n+1} = (a x_n) mod m + + with a = 65539 and m = 2^31. The seed specifies the initial value, + x_1. The period of this generator was only 2^29. It has become a + textbook example of a poor generator. + + -- Generator: gsl_rng_minstd + This is Park and Miller's "minimal standard" MINSTD generator, a + simple linear congruence which takes care to avoid the major + pitfalls of such algorithms. Its sequence is, + + x_{n+1} = (a x_n) mod m + + with a = 16807 and m = 2^31 - 1 = 2147483647. The seed specifies + the initial value, x_1. The period of this generator is about + 2^31. + + This generator is used in the IMSL Library (subroutine RNUN) and in + MATLAB (the RAND function). It is also sometimes known by the + acronym "GGL" (I'm not sure what that stands for). + + For more information see, + Park and Miller, "Random Number Generators: Good ones are + hard to find", `Communications of the ACM', October 1988, + Volume 31, No 10, pages 1192-1201. + + -- Generator: gsl_rng_uni + -- Generator: gsl_rng_uni32 + This is a reimplementation of the 16-bit SLATEC random number + generator RUNIF. A generalization of the generator to 32 bits is + provided by `gsl_rng_uni32'. The original source code is + available from NETLIB. + + -- Generator: gsl_rng_slatec + This is the SLATEC random number generator RAND. It is ancient. + The original source code is available from NETLIB. + + -- Generator: gsl_rng_zuf + This is the ZUFALL lagged Fibonacci series generator of Peterson. + Its sequence is, + + t = u_{n-273} + u_{n-607} + u_n = t - floor(t) + + The original source code is available from NETLIB. For more + information see, + W. Petersen, "Lagged Fibonacci Random Number Generators for + the NEC SX-3", `International Journal of High Speed + Computing' (1994). + + -- Generator: gsl_rng_knuthran2 + This is a second-order multiple recursive generator described by + Knuth in `Seminumerical Algorithms', 3rd Ed., page 108. Its + sequence is, + + x_n = (a_1 x_{n-1} + a_2 x_{n-2}) mod m + + with a_1 = 271828183, a_2 = 314159269, and m = 2^31 - 1. + + -- Generator: gsl_rng_knuthran2002 + -- Generator: gsl_rng_knuthran + This is a second-order multiple recursive generator described by + Knuth in `Seminumerical Algorithms', 3rd Ed., Section 3.6. Knuth + provides its C code. The updated routine `gsl_rng_knuthran2002' + is from the revised 9th printing and corrects some weaknesses in + the earlier version, which is implemented as `gsl_rng_knuthran'. + + -- Generator: gsl_rng_borosh13 + -- Generator: gsl_rng_fishman18 + -- Generator: gsl_rng_fishman20 + -- Generator: gsl_rng_lecuyer21 + -- Generator: gsl_rng_waterman14 + These multiplicative generators are taken from Knuth's + `Seminumerical Algorithms', 3rd Ed., pages 106-108. Their sequence + is, + + x_{n+1} = (a x_n) mod m + + where the seed specifies the initial value, x_1. The parameters a + and m are as follows, Borosh-Niederreiter: a = 1812433253, m = + 2^32, Fishman18: a = 62089911, m = 2^31 - 1, Fishman20: a = 48271, + m = 2^31 - 1, L'Ecuyer: a = 40692, m = 2^31 - 249, Waterman: a = + 1566083941, m = 2^32. + + -- Generator: gsl_rng_fishman2x + This is the L'Ecuyer-Fishman random number generator. It is taken + from Knuth's `Seminumerical Algorithms', 3rd Ed., page 108. Its + sequence is, + + z_{n+1} = (x_n - y_n) mod m + + with m = 2^31 - 1. x_n and y_n are given by the `fishman20' and + `lecuyer21' algorithms. The seed specifies the initial value, x_1. + + + -- Generator: gsl_rng_coveyou + This is the Coveyou random number generator. It is taken from + Knuth's `Seminumerical Algorithms', 3rd Ed., Section 3.2.2. Its + sequence is, + + x_{n+1} = (x_n (x_n + 1)) mod m + + with m = 2^32. The seed specifies the initial value, x_1. + + +File: gsl-ref.info, Node: Random Number Generator Performance, Next: Random Number Generator Examples, Prev: Other random number generators, Up: Random Number Generation + +18.12 Performance +================= + +The following table shows the relative performance of a selection the +available random number generators. The fastest simulation quality +generators are `taus', `gfsr4' and `mt19937'. The generators which +offer the best mathematically-proven quality are those based on the +RANLUX algorithm. + + 1754 k ints/sec, 870 k doubles/sec, taus + 1613 k ints/sec, 855 k doubles/sec, gfsr4 + 1370 k ints/sec, 769 k doubles/sec, mt19937 + 565 k ints/sec, 571 k doubles/sec, ranlxs0 + 400 k ints/sec, 405 k doubles/sec, ranlxs1 + 490 k ints/sec, 389 k doubles/sec, mrg + 407 k ints/sec, 297 k doubles/sec, ranlux + 243 k ints/sec, 254 k doubles/sec, ranlxd1 + 251 k ints/sec, 253 k doubles/sec, ranlxs2 + 238 k ints/sec, 215 k doubles/sec, cmrg + 247 k ints/sec, 198 k doubles/sec, ranlux389 + 141 k ints/sec, 140 k doubles/sec, ranlxd2 + + +File: gsl-ref.info, Node: Random Number Generator Examples, Next: Random Number References and Further Reading, Prev: Random Number Generator Performance, Up: Random Number Generation + +18.13 Examples +============== + +The following program demonstrates the use of a random number generator +to produce uniform random numbers in the range [0.0, 1.0), + + #include + #include + + int + main (void) + { + const gsl_rng_type * T; + gsl_rng * r; + + int i, n = 10; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < n; i++) + { + double u = gsl_rng_uniform (r); + printf ("%.5f\n", u); + } + + gsl_rng_free (r); + + return 0; + } + +Here is the output of the program, + + $ ./a.out + 0.99974 + 0.16291 + 0.28262 + 0.94720 + 0.23166 + 0.48497 + 0.95748 + 0.74431 + 0.54004 + 0.73995 + +The numbers depend on the seed used by the generator. The default seed +can be changed with the `GSL_RNG_SEED' environment variable to produce +a different stream of numbers. The generator itself can be changed +using the environment variable `GSL_RNG_TYPE'. Here is the output of +the program using a seed value of 123 and the multiple-recursive +generator `mrg', + + $ GSL_RNG_SEED=123 GSL_RNG_TYPE=mrg ./a.out + GSL_RNG_TYPE=mrg + GSL_RNG_SEED=123 + 0.33050 + 0.86631 + 0.32982 + 0.67620 + 0.53391 + 0.06457 + 0.16847 + 0.70229 + 0.04371 + 0.86374 + + +File: gsl-ref.info, Node: Random Number References and Further Reading, Next: Random Number Acknowledgements, Prev: Random Number Generator Examples, Up: Random Number Generation + +18.14 References and Further Reading +==================================== + +The subject of random number generation and testing is reviewed +extensively in Knuth's `Seminumerical Algorithms'. + + Donald E. Knuth, `The Art of Computer Programming: Seminumerical + Algorithms' (Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842. + +Further information is available in the review paper written by Pierre +L'Ecuyer, + + P. L'Ecuyer, "Random Number Generation", Chapter 4 of the Handbook + on Simulation, Jerry Banks Ed., Wiley, 1998, 93-137. + + `http://www.iro.umontreal.ca/~lecuyer/papers.html' in the file + `handsim.ps'. + +The source code for the DIEHARD random number generator tests is also +available online, + + `DIEHARD source code' G. Marsaglia, + + `http://stat.fsu.edu/pub/diehard/' + +A comprehensive set of random number generator tests is available from +NIST, + + NIST Special Publication 800-22, "A Statistical Test Suite for the + Validation of Random Number Generators and Pseudo Random Number + Generators for Cryptographic Applications". + + `http://csrc.nist.gov/rng/' + + +File: gsl-ref.info, Node: Random Number Acknowledgements, Prev: Random Number References and Further Reading, Up: Random Number Generation + +18.15 Acknowledgements +====================== + +Thanks to Makoto Matsumoto, Takuji Nishimura and Yoshiharu Kurita for +making the source code to their generators (MT19937, MM&TN; TT800, +MM&YK) available under the GNU General Public License. Thanks to Martin +Lu"scher for providing notes and source code for the RANLXS and RANLXD +generators. + + +File: gsl-ref.info, Node: Quasi-Random Sequences, Next: Random Number Distributions, Prev: Random Number Generation, Up: Top + +19 Quasi-Random Sequences +************************* + +This chapter describes functions for generating quasi-random sequences +in arbitrary dimensions. A quasi-random sequence progressively covers a +d-dimensional space with a set of points that are uniformly +distributed. Quasi-random sequences are also known as low-discrepancy +sequences. The quasi-random sequence generators use an interface that +is similar to the interface for random number generators, except that +seeding is not required--each generator produces a single sequence. + + The functions described in this section are declared in the header +file `gsl_qrng.h'. + +* Menu: + +* Quasi-random number generator initialization:: +* Sampling from a quasi-random number generator:: +* Auxiliary quasi-random number generator functions:: +* Saving and resorting quasi-random number generator state:: +* Quasi-random number generator algorithms:: +* Quasi-random number generator examples:: +* Quasi-random number references:: + + +File: gsl-ref.info, Node: Quasi-random number generator initialization, Next: Sampling from a quasi-random number generator, Up: Quasi-Random Sequences + +19.1 Quasi-random number generator initialization +================================================= + + -- Function: gsl_qrng * gsl_qrng_alloc (const gsl_qrng_type * T, + unsigned int D) + This function returns a pointer to a newly-created instance of a + quasi-random sequence generator of type T and dimension D. If + there is insufficient memory to create the generator then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: void gsl_qrng_free (gsl_qrng * Q) + This function frees all the memory associated with the generator Q. + + -- Function: void gsl_qrng_init (gsl_qrng * Q) + This function reinitializes the generator Q to its starting point. + Note that quasi-random sequences do not use a seed and always + produce the same set of values. + + +File: gsl-ref.info, Node: Sampling from a quasi-random number generator, Next: Auxiliary quasi-random number generator functions, Prev: Quasi-random number generator initialization, Up: Quasi-Random Sequences + +19.2 Sampling from a quasi-random number generator +================================================== + + -- Function: int gsl_qrng_get (const gsl_qrng * Q, double X[]) + This function stores the next point from the sequence generator Q + in the array X. The space available for X must match the + dimension of the generator. The point X will lie in the range 0 < + x_i < 1 for each x_i. An inline version of this function is used + when `HAVE_INLINE' is defined. + + +File: gsl-ref.info, Node: Auxiliary quasi-random number generator functions, Next: Saving and resorting quasi-random number generator state, Prev: Sampling from a quasi-random number generator, Up: Quasi-Random Sequences + +19.3 Auxiliary quasi-random number generator functions +====================================================== + + -- Function: const char * gsl_qrng_name (const gsl_qrng * Q) + This function returns a pointer to the name of the generator. + + -- Function: size_t gsl_qrng_size (const gsl_qrng * Q) + -- Function: void * gsl_qrng_state (const gsl_qrng * Q) + These functions return a pointer to the state of generator R and + its size. You can use this information to access the state + directly. For example, the following code will write the state of + a generator to a stream, + + void * state = gsl_qrng_state (q); + size_t n = gsl_qrng_size (q); + fwrite (state, n, 1, stream); + + +File: gsl-ref.info, Node: Saving and resorting quasi-random number generator state, Next: Quasi-random number generator algorithms, Prev: Auxiliary quasi-random number generator functions, Up: Quasi-Random Sequences + +19.4 Saving and resorting quasi-random number generator state +============================================================= + + -- Function: int gsl_qrng_memcpy (gsl_qrng * DEST, const gsl_qrng * + SRC) + This function copies the quasi-random sequence generator SRC into + the pre-existing generator DEST, making DEST into an exact copy of + SRC. The two generators must be of the same type. + + -- Function: gsl_qrng * gsl_qrng_clone (const gsl_qrng * Q) + This function returns a pointer to a newly created generator which + is an exact copy of the generator Q. + + +File: gsl-ref.info, Node: Quasi-random number generator algorithms, Next: Quasi-random number generator examples, Prev: Saving and resorting quasi-random number generator state, Up: Quasi-Random Sequences + +19.5 Quasi-random number generator algorithms +============================================= + +The following quasi-random sequence algorithms are available, + + -- Generator: gsl_qrng_niederreiter_2 + This generator uses the algorithm described in Bratley, Fox, + Niederreiter, `ACM Trans. Model. Comp. Sim.' 2, 195 (1992). It is + valid up to 12 dimensions. + + -- Generator: gsl_qrng_sobol + This generator uses the Sobol sequence described in Antonov, + Saleev, `USSR Comput. Maths. Math. Phys.' 19, 252 (1980). It is + valid up to 40 dimensions. + + -- Generator: gsl_qrng_halton + -- Generator: gsl_qrng_reversehalton + These generators use the Halton and reverse Halton sequences + described in J.H. Halton, `Numerische Mathematik' 2, 84-90 (1960) + and B. Vandewoestyne and R. Cools `Computational and Applied + Mathematics' 189, 1&2, 341-361 (2006). They are valid up to 1229 + dimensions. + + +File: gsl-ref.info, Node: Quasi-random number generator examples, Next: Quasi-random number references, Prev: Quasi-random number generator algorithms, Up: Quasi-Random Sequences + +19.6 Examples +============= + +The following program prints the first 1024 points of the 2-dimensional +Sobol sequence. + + #include + #include + + int + main (void) + { + int i; + gsl_qrng * q = gsl_qrng_alloc (gsl_qrng_sobol, 2); + + for (i = 0; i < 1024; i++) + { + double v[2]; + gsl_qrng_get (q, v); + printf ("%.5f %.5f\n", v[0], v[1]); + } + + gsl_qrng_free (q); + return 0; + } + +Here is the output from the program, + + $ ./a.out + 0.50000 0.50000 + 0.75000 0.25000 + 0.25000 0.75000 + 0.37500 0.37500 + 0.87500 0.87500 + 0.62500 0.12500 + 0.12500 0.62500 + .... + +It can be seen that successive points progressively fill-in the spaces +between previous points. + + +File: gsl-ref.info, Node: Quasi-random number references, Prev: Quasi-random number generator examples, Up: Quasi-Random Sequences + +19.7 References +=============== + +The implementations of the quasi-random sequence routines are based on +the algorithms described in the following paper, + + P. Bratley and B.L. Fox and H. Niederreiter, "Algorithm 738: + Programs to Generate Niederreiter's Low-discrepancy Sequences", + `ACM Transactions on Mathematical Software', Vol. 20, No. 4, + December, 1994, p. 494-495. + + +File: gsl-ref.info, Node: Random Number Distributions, Next: Statistics, Prev: Quasi-Random Sequences, Up: Top + +20 Random Number Distributions +****************************** + +This chapter describes functions for generating random variates and +computing their probability distributions. Samples from the +distributions described in this chapter can be obtained using any of the +random number generators in the library as an underlying source of +randomness. + + In the simplest cases a non-uniform distribution can be obtained +analytically from the uniform distribution of a random number generator +by applying an appropriate transformation. This method uses one call to +the random number generator. More complicated distributions are created +by the "acceptance-rejection" method, which compares the desired +distribution against a distribution which is similar and known +analytically. This usually requires several samples from the generator. + + The library also provides cumulative distribution functions and +inverse cumulative distribution functions, sometimes referred to as +quantile functions. The cumulative distribution functions and their +inverses are computed separately for the upper and lower tails of the +distribution, allowing full accuracy to be retained for small results. + + The functions for random variates and probability density functions +described in this section are declared in `gsl_randist.h'. The +corresponding cumulative distribution functions are declared in +`gsl_cdf.h'. + + Note that the discrete random variate functions always return a +value of type `unsigned int', and on most platforms this has a maximum +value of 2^32-1 ~=~ 4.29e9. They should only be called with a safe +range of parameters (where there is a negligible probability of a +variate exceeding this limit) to prevent incorrect results due to +overflow. + +* Menu: + +* Random Number Distribution Introduction:: +* The Gaussian Distribution:: +* The Gaussian Tail Distribution:: +* The Bivariate Gaussian Distribution:: +* The Exponential Distribution:: +* The Laplace Distribution:: +* The Exponential Power Distribution:: +* The Cauchy Distribution:: +* The Rayleigh Distribution:: +* The Rayleigh Tail Distribution:: +* The Landau Distribution:: +* The Levy alpha-Stable Distributions:: +* The Levy skew alpha-Stable Distribution:: +* The Gamma Distribution:: +* The Flat (Uniform) Distribution:: +* The Lognormal Distribution:: +* The Chi-squared Distribution:: +* The F-distribution:: +* The t-distribution:: +* The Beta Distribution:: +* The Logistic Distribution:: +* The Pareto Distribution:: +* Spherical Vector Distributions:: +* The Weibull Distribution:: +* The Type-1 Gumbel Distribution:: +* The Type-2 Gumbel Distribution:: +* The Dirichlet Distribution:: +* General Discrete Distributions:: +* The Poisson Distribution:: +* The Bernoulli Distribution:: +* The Binomial Distribution:: +* The Multinomial Distribution:: +* The Negative Binomial Distribution:: +* The Pascal Distribution:: +* The Geometric Distribution:: +* The Hypergeometric Distribution:: +* The Logarithmic Distribution:: +* Shuffling and Sampling:: +* Random Number Distribution Examples:: +* Random Number Distribution References and Further Reading:: + + +File: gsl-ref.info, Node: Random Number Distribution Introduction, Next: The Gaussian Distribution, Up: Random Number Distributions + +20.1 Introduction +================= + +Continuous random number distributions are defined by a probability +density function, p(x), such that the probability of x occurring in the +infinitesimal range x to x+dx is p dx. + + The cumulative distribution function for the lower tail P(x) is +defined by the integral, + + P(x) = \int_{-\infty}^{x} dx' p(x') + +and gives the probability of a variate taking a value less than x. + + The cumulative distribution function for the upper tail Q(x) is +defined by the integral, + + Q(x) = \int_{x}^{+\infty} dx' p(x') + +and gives the probability of a variate taking a value greater than x. + + The upper and lower cumulative distribution functions are related by +P(x) + Q(x) = 1 and satisfy 0 <= P(x) <= 1, 0 <= Q(x) <= 1. + + The inverse cumulative distributions, x=P^{-1}(P) and x=Q^{-1}(Q) +give the values of x which correspond to a specific value of P or Q. +They can be used to find confidence limits from probability values. + + For discrete distributions the probability of sampling the integer +value k is given by p(k), where \sum_k p(k) = 1. The cumulative +distribution for the lower tail P(k) of a discrete distribution is +defined as, + + P(k) = \sum_{i <= k} p(i) + +where the sum is over the allowed range of the distribution less than +or equal to k. + + The cumulative distribution for the upper tail of a discrete +distribution Q(k) is defined as + + Q(k) = \sum_{i > k} p(i) + +giving the sum of probabilities for all values greater than k. These +two definitions satisfy the identity P(k)+Q(k)=1. + + If the range of the distribution is 1 to n inclusive then P(n)=1, +Q(n)=0 while P(1) = p(1), Q(1)=1-p(1). + + +File: gsl-ref.info, Node: The Gaussian Distribution, Next: The Gaussian Tail Distribution, Prev: Random Number Distribution Introduction, Up: Random Number Distributions + +20.2 The Gaussian Distribution +============================== + + -- Function: double gsl_ran_gaussian (const gsl_rng * R, double SIGMA) + This function returns a Gaussian random variate, with mean zero and + standard deviation SIGMA. The probability distribution for + Gaussian random variates is, + + p(x) dx = {1 \over \sqrt{2 \pi \sigma^2}} \exp (-x^2 / 2\sigma^2) dx + + for x in the range -\infty to +\infty. Use the transformation z = + \mu + x on the numbers returned by `gsl_ran_gaussian' to obtain a + Gaussian distribution with mean \mu. This function uses the + Box-Muller algorithm which requires two calls to the random number + generator R. + + -- Function: double gsl_ran_gaussian_pdf (double X, double SIGMA) + This function computes the probability density p(x) at X for a + Gaussian distribution with standard deviation SIGMA, using the + formula given above. + + + -- Function: double gsl_ran_gaussian_ziggurat (const gsl_rng * R, + double SIGMA) + -- Function: double gsl_ran_gaussian_ratio_method (const gsl_rng * R, + double SIGMA) + This function computes a Gaussian random variate using the + alternative Marsaglia-Tsang ziggurat and Kinderman-Monahan-Leva + ratio methods. The Ziggurat algorithm is the fastest available + algorithm in most cases. + + -- Function: double gsl_ran_ugaussian (const gsl_rng * R) + -- Function: double gsl_ran_ugaussian_pdf (double X) + -- Function: double gsl_ran_ugaussian_ratio_method (const gsl_rng * R) + These functions compute results for the unit Gaussian + distribution. They are equivalent to the functions above with a + standard deviation of one, SIGMA = 1. + + -- Function: double gsl_cdf_gaussian_P (double X, double SIGMA) + -- Function: double gsl_cdf_gaussian_Q (double X, double SIGMA) + -- Function: double gsl_cdf_gaussian_Pinv (double P, double SIGMA) + -- Function: double gsl_cdf_gaussian_Qinv (double Q, double SIGMA) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Gaussian distribution with + standard deviation SIGMA. + + -- Function: double gsl_cdf_ugaussian_P (double X) + -- Function: double gsl_cdf_ugaussian_Q (double X) + -- Function: double gsl_cdf_ugaussian_Pinv (double P) + -- Function: double gsl_cdf_ugaussian_Qinv (double Q) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the unit Gaussian distribution. + + +File: gsl-ref.info, Node: The Gaussian Tail Distribution, Next: The Bivariate Gaussian Distribution, Prev: The Gaussian Distribution, Up: Random Number Distributions + +20.3 The Gaussian Tail Distribution +=================================== + + -- Function: double gsl_ran_gaussian_tail (const gsl_rng * R, double + A, double SIGMA) + This function provides random variates from the upper tail of a + Gaussian distribution with standard deviation SIGMA. The values + returned are larger than the lower limit A, which must be + positive. The method is based on Marsaglia's famous + rectangle-wedge-tail algorithm (Ann. Math. Stat. 32, 894-899 + (1961)), with this aspect explained in Knuth, v2, 3rd ed, p139,586 + (exercise 11). + + The probability distribution for Gaussian tail random variates is, + + p(x) dx = {1 \over N(a;\sigma) \sqrt{2 \pi \sigma^2}} \exp (- x^2/(2 \sigma^2)) dx + + for x > a where N(a;\sigma) is the normalization constant, + + N(a;\sigma) = (1/2) erfc(a / sqrt(2 sigma^2)). + + + -- Function: double gsl_ran_gaussian_tail_pdf (double X, double A, + double SIGMA) + This function computes the probability density p(x) at X for a + Gaussian tail distribution with standard deviation SIGMA and lower + limit A, using the formula given above. + + + -- Function: double gsl_ran_ugaussian_tail (const gsl_rng * R, double + A) + -- Function: double gsl_ran_ugaussian_tail_pdf (double X, double A) + These functions compute results for the tail of a unit Gaussian + distribution. They are equivalent to the functions above with a + standard deviation of one, SIGMA = 1. + + +File: gsl-ref.info, Node: The Bivariate Gaussian Distribution, Next: The Exponential Distribution, Prev: The Gaussian Tail Distribution, Up: Random Number Distributions + +20.4 The Bivariate Gaussian Distribution +======================================== + + -- Function: void gsl_ran_bivariate_gaussian (const gsl_rng * R, + double SIGMA_X, double SIGMA_Y, double RHO, double * X, + double * Y) + This function generates a pair of correlated Gaussian variates, + with mean zero, correlation coefficient RHO and standard deviations + SIGMA_X and SIGMA_Y in the x and y directions. The probability + distribution for bivariate Gaussian random variates is, + + p(x,y) dx dy = {1 \over 2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}} \exp (-(x^2/\sigma_x^2 + y^2/\sigma_y^2 - 2 \rho x y/(\sigma_x\sigma_y))/2(1-\rho^2)) dx dy + + for x,y in the range -\infty to +\infty. The correlation + coefficient RHO should lie between 1 and -1. + + -- Function: double gsl_ran_bivariate_gaussian_pdf (double X, double + Y, double SIGMA_X, double SIGMA_Y, double RHO) + This function computes the probability density p(x,y) at (X,Y) for + a bivariate Gaussian distribution with standard deviations + SIGMA_X, SIGMA_Y and correlation coefficient RHO, using the + formula given above. + + + +File: gsl-ref.info, Node: The Exponential Distribution, Next: The Laplace Distribution, Prev: The Bivariate Gaussian Distribution, Up: Random Number Distributions + +20.5 The Exponential Distribution +================================= + + -- Function: double gsl_ran_exponential (const gsl_rng * R, double MU) + This function returns a random variate from the exponential + distribution with mean MU. The distribution is, + + p(x) dx = {1 \over \mu} \exp(-x/\mu) dx + + for x >= 0. + + -- Function: double gsl_ran_exponential_pdf (double X, double MU) + This function computes the probability density p(x) at X for an + exponential distribution with mean MU, using the formula given + above. + + + -- Function: double gsl_cdf_exponential_P (double X, double MU) + -- Function: double gsl_cdf_exponential_Q (double X, double MU) + -- Function: double gsl_cdf_exponential_Pinv (double P, double MU) + -- Function: double gsl_cdf_exponential_Qinv (double Q, double MU) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the exponential distribution + with mean MU. + + +File: gsl-ref.info, Node: The Laplace Distribution, Next: The Exponential Power Distribution, Prev: The Exponential Distribution, Up: Random Number Distributions + +20.6 The Laplace Distribution +============================= + + -- Function: double gsl_ran_laplace (const gsl_rng * R, double A) + This function returns a random variate from the Laplace + distribution with width A. The distribution is, + + p(x) dx = {1 \over 2 a} \exp(-|x/a|) dx + + for -\infty < x < \infty. + + -- Function: double gsl_ran_laplace_pdf (double X, double A) + This function computes the probability density p(x) at X for a + Laplace distribution with width A, using the formula given above. + + + -- Function: double gsl_cdf_laplace_P (double X, double A) + -- Function: double gsl_cdf_laplace_Q (double X, double A) + -- Function: double gsl_cdf_laplace_Pinv (double P, double A) + -- Function: double gsl_cdf_laplace_Qinv (double Q, double A) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Laplace distribution with + width A. + + +File: gsl-ref.info, Node: The Exponential Power Distribution, Next: The Cauchy Distribution, Prev: The Laplace Distribution, Up: Random Number Distributions + +20.7 The Exponential Power Distribution +======================================= + + -- Function: double gsl_ran_exppow (const gsl_rng * R, double A, + double B) + This function returns a random variate from the exponential power + distribution with scale parameter A and exponent B. The + distribution is, + + p(x) dx = {1 \over 2 a \Gamma(1+1/b)} \exp(-|x/a|^b) dx + + for x >= 0. For b = 1 this reduces to the Laplace distribution. + For b = 2 it has the same form as a Gaussian distribution, but + with a = \sqrt{2} \sigma. + + -- Function: double gsl_ran_exppow_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for an + exponential power distribution with scale parameter A and exponent + B, using the formula given above. + + + -- Function: double gsl_cdf_exppow_P (double X, double A, double B) + -- Function: double gsl_cdf_exppow_Q (double X, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) for the exponential power distribution with parameters + A and B. + + +File: gsl-ref.info, Node: The Cauchy Distribution, Next: The Rayleigh Distribution, Prev: The Exponential Power Distribution, Up: Random Number Distributions + +20.8 The Cauchy Distribution +============================ + + -- Function: double gsl_ran_cauchy (const gsl_rng * R, double A) + This function returns a random variate from the Cauchy + distribution with scale parameter A. The probability distribution + for Cauchy random variates is, + + p(x) dx = {1 \over a\pi (1 + (x/a)^2) } dx + + for x in the range -\infty to +\infty. The Cauchy distribution is + also known as the Lorentz distribution. + + -- Function: double gsl_ran_cauchy_pdf (double X, double A) + This function computes the probability density p(x) at X for a + Cauchy distribution with scale parameter A, using the formula + given above. + + + -- Function: double gsl_cdf_cauchy_P (double X, double A) + -- Function: double gsl_cdf_cauchy_Q (double X, double A) + -- Function: double gsl_cdf_cauchy_Pinv (double P, double A) + -- Function: double gsl_cdf_cauchy_Qinv (double Q, double A) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Cauchy distribution with + scale parameter A. + + +File: gsl-ref.info, Node: The Rayleigh Distribution, Next: The Rayleigh Tail Distribution, Prev: The Cauchy Distribution, Up: Random Number Distributions + +20.9 The Rayleigh Distribution +============================== + + -- Function: double gsl_ran_rayleigh (const gsl_rng * R, double SIGMA) + This function returns a random variate from the Rayleigh + distribution with scale parameter SIGMA. The distribution is, + + p(x) dx = {x \over \sigma^2} \exp(- x^2/(2 \sigma^2)) dx + + for x > 0. + + -- Function: double gsl_ran_rayleigh_pdf (double X, double SIGMA) + This function computes the probability density p(x) at X for a + Rayleigh distribution with scale parameter SIGMA, using the + formula given above. + + + -- Function: double gsl_cdf_rayleigh_P (double X, double SIGMA) + -- Function: double gsl_cdf_rayleigh_Q (double X, double SIGMA) + -- Function: double gsl_cdf_rayleigh_Pinv (double P, double SIGMA) + -- Function: double gsl_cdf_rayleigh_Qinv (double Q, double SIGMA) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Rayleigh distribution with + scale parameter SIGMA. + + +File: gsl-ref.info, Node: The Rayleigh Tail Distribution, Next: The Landau Distribution, Prev: The Rayleigh Distribution, Up: Random Number Distributions + +20.10 The Rayleigh Tail Distribution +==================================== + + -- Function: double gsl_ran_rayleigh_tail (const gsl_rng * R, double + A, double SIGMA) + This function returns a random variate from the tail of the + Rayleigh distribution with scale parameter SIGMA and a lower limit + of A. The distribution is, + + p(x) dx = {x \over \sigma^2} \exp ((a^2 - x^2) /(2 \sigma^2)) dx + + for x > a. + + -- Function: double gsl_ran_rayleigh_tail_pdf (double X, double A, + double SIGMA) + This function computes the probability density p(x) at X for a + Rayleigh tail distribution with scale parameter SIGMA and lower + limit A, using the formula given above. + + + +File: gsl-ref.info, Node: The Landau Distribution, Next: The Levy alpha-Stable Distributions, Prev: The Rayleigh Tail Distribution, Up: Random Number Distributions + +20.11 The Landau Distribution +============================= + + -- Function: double gsl_ran_landau (const gsl_rng * R) + This function returns a random variate from the Landau + distribution. The probability distribution for Landau random + variates is defined analytically by the complex integral, + + p(x) = (1/(2 \pi i)) \int_{c-i\infty}^{c+i\infty} ds exp(s log(s) + x s) + For numerical purposes it is more convenient to use the following + equivalent form of the integral, + + p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t). + + -- Function: double gsl_ran_landau_pdf (double X) + This function computes the probability density p(x) at X for the + Landau distribution using an approximation to the formula given + above. + + + +File: gsl-ref.info, Node: The Levy alpha-Stable Distributions, Next: The Levy skew alpha-Stable Distribution, Prev: The Landau Distribution, Up: Random Number Distributions + +20.12 The Levy alpha-Stable Distributions +========================================= + + -- Function: double gsl_ran_levy (const gsl_rng * R, double C, double + ALPHA) + This function returns a random variate from the Levy symmetric + stable distribution with scale C and exponent ALPHA. The symmetric + stable probability distribution is defined by a Fourier transform, + + p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^alpha) + + There is no explicit solution for the form of p(x) and the library + does not define a corresponding `pdf' function. For \alpha = 1 + the distribution reduces to the Cauchy distribution. For \alpha = + 2 it is a Gaussian distribution with \sigma = \sqrt{2} c. For + \alpha < 1 the tails of the distribution become extremely wide. + + The algorithm only works for 0 < alpha <= 2. + + + +File: gsl-ref.info, Node: The Levy skew alpha-Stable Distribution, Next: The Gamma Distribution, Prev: The Levy alpha-Stable Distributions, Up: Random Number Distributions + +20.13 The Levy skew alpha-Stable Distribution +============================================= + + -- Function: double gsl_ran_levy_skew (const gsl_rng * R, double C, + double ALPHA, double BETA) + This function returns a random variate from the Levy skew stable + distribution with scale C, exponent ALPHA and skewness parameter + BETA. The skewness parameter must lie in the range [-1,1]. The + Levy skew stable probability distribution is defined by a Fourier + transform, + + p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^alpha (1-i beta sign(t) tan(pi alpha/2))) + + When \alpha = 1 the term \tan(\pi \alpha/2) is replaced by + -(2/\pi)\log|t|. There is no explicit solution for the form of + p(x) and the library does not define a corresponding `pdf' + function. For \alpha = 2 the distribution reduces to a Gaussian + distribution with \sigma = \sqrt{2} c and the skewness parameter + has no effect. For \alpha < 1 the tails of the distribution + become extremely wide. The symmetric distribution corresponds to + \beta = 0. + + The algorithm only works for 0 < alpha <= 2. + + The Levy alpha-stable distributions have the property that if N +alpha-stable variates are drawn from the distribution p(c, \alpha, +\beta) then the sum Y = X_1 + X_2 + \dots + X_N will also be +distributed as an alpha-stable variate, p(N^(1/\alpha) c, \alpha, +\beta). + + + +File: gsl-ref.info, Node: The Gamma Distribution, Next: The Flat (Uniform) Distribution, Prev: The Levy skew alpha-Stable Distribution, Up: Random Number Distributions + +20.14 The Gamma Distribution +============================ + + -- Function: double gsl_ran_gamma (const gsl_rng * R, double A, double + B) + This function returns a random variate from the gamma + distribution. The distribution function is, + + p(x) dx = {1 \over \Gamma(a) b^a} x^{a-1} e^{-x/b} dx + + for x > 0. + + The gamma distribution with an integer parameter A is known as the + Erlang distribution. + + The variates are computed using the Marsaglia-Tsang fast gamma + method. This function for this method was previously called + `gsl_ran_gamma_mt' and can still be accessed using this name. + + -- Function: double gsl_ran_gamma_knuth (const gsl_rng * R, double A, + double B) + This function returns a gamma variate using the algorithms from + Knuth (vol 2). + + -- Function: double gsl_ran_gamma_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + gamma distribution with parameters A and B, using the formula + given above. + + + -- Function: double gsl_cdf_gamma_P (double X, double A, double B) + -- Function: double gsl_cdf_gamma_Q (double X, double A, double B) + -- Function: double gsl_cdf_gamma_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_gamma_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the gamma distribution with + parameters A and B. + + +File: gsl-ref.info, Node: The Flat (Uniform) Distribution, Next: The Lognormal Distribution, Prev: The Gamma Distribution, Up: Random Number Distributions + +20.15 The Flat (Uniform) Distribution +===================================== + + -- Function: double gsl_ran_flat (const gsl_rng * R, double A, double + B) + This function returns a random variate from the flat (uniform) + distribution from A to B. The distribution is, + + p(x) dx = {1 \over (b-a)} dx + + if a <= x < b and 0 otherwise. + + -- Function: double gsl_ran_flat_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + uniform distribution from A to B, using the formula given above. + + + -- Function: double gsl_cdf_flat_P (double X, double A, double B) + -- Function: double gsl_cdf_flat_Q (double X, double A, double B) + -- Function: double gsl_cdf_flat_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_flat_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for a uniform distribution from A to + B. + + +File: gsl-ref.info, Node: The Lognormal Distribution, Next: The Chi-squared Distribution, Prev: The Flat (Uniform) Distribution, Up: Random Number Distributions + +20.16 The Lognormal Distribution +================================ + + -- Function: double gsl_ran_lognormal (const gsl_rng * R, double ZETA, + double SIGMA) + This function returns a random variate from the lognormal + distribution. The distribution function is, + + p(x) dx = {1 \over x \sqrt{2 \pi \sigma^2} } \exp(-(\ln(x) - \zeta)^2/2 \sigma^2) dx + + for x > 0. + + -- Function: double gsl_ran_lognormal_pdf (double X, double ZETA, + double SIGMA) + This function computes the probability density p(x) at X for a + lognormal distribution with parameters ZETA and SIGMA, using the + formula given above. + + + -- Function: double gsl_cdf_lognormal_P (double X, double ZETA, double + SIGMA) + -- Function: double gsl_cdf_lognormal_Q (double X, double ZETA, double + SIGMA) + -- Function: double gsl_cdf_lognormal_Pinv (double P, double ZETA, + double SIGMA) + -- Function: double gsl_cdf_lognormal_Qinv (double Q, double ZETA, + double SIGMA) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the lognormal distribution with + parameters ZETA and SIGMA. + + +File: gsl-ref.info, Node: The Chi-squared Distribution, Next: The F-distribution, Prev: The Lognormal Distribution, Up: Random Number Distributions + +20.17 The Chi-squared Distribution +================================== + +The chi-squared distribution arises in statistics. If Y_i are n +independent Gaussian random variates with unit variance then the +sum-of-squares, + + X_i = \sum_i Y_i^2 + +has a chi-squared distribution with n degrees of freedom. + + -- Function: double gsl_ran_chisq (const gsl_rng * R, double NU) + This function returns a random variate from the chi-squared + distribution with NU degrees of freedom. The distribution function + is, + + p(x) dx = {1 \over 2 \Gamma(\nu/2) } (x/2)^{\nu/2 - 1} \exp(-x/2) dx + + for x >= 0. + + -- Function: double gsl_ran_chisq_pdf (double X, double NU) + This function computes the probability density p(x) at X for a + chi-squared distribution with NU degrees of freedom, using the + formula given above. + + + -- Function: double gsl_cdf_chisq_P (double X, double NU) + -- Function: double gsl_cdf_chisq_Q (double X, double NU) + -- Function: double gsl_cdf_chisq_Pinv (double P, double NU) + -- Function: double gsl_cdf_chisq_Qinv (double Q, double NU) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the chi-squared distribution + with NU degrees of freedom. + + +File: gsl-ref.info, Node: The F-distribution, Next: The t-distribution, Prev: The Chi-squared Distribution, Up: Random Number Distributions + +20.18 The F-distribution +======================== + +The F-distribution arises in statistics. If Y_1 and Y_2 are +chi-squared deviates with \nu_1 and \nu_2 degrees of freedom then the +ratio, + + X = { (Y_1 / \nu_1) \over (Y_2 / \nu_2) } + +has an F-distribution F(x;\nu_1,\nu_2). + + -- Function: double gsl_ran_fdist (const gsl_rng * R, double NU1, + double NU2) + This function returns a random variate from the F-distribution + with degrees of freedom NU1 and NU2. The distribution function is, + + p(x) dx = + { \Gamma((\nu_1 + \nu_2)/2) + \over \Gamma(\nu_1/2) \Gamma(\nu_2/2) } + \nu_1^{\nu_1/2} \nu_2^{\nu_2/2} + x^{\nu_1/2 - 1} (\nu_2 + \nu_1 x)^{-\nu_1/2 -\nu_2/2} + + for x >= 0. + + -- Function: double gsl_ran_fdist_pdf (double X, double NU1, double + NU2) + This function computes the probability density p(x) at X for an + F-distribution with NU1 and NU2 degrees of freedom, using the + formula given above. + + + -- Function: double gsl_cdf_fdist_P (double X, double NU1, double NU2) + -- Function: double gsl_cdf_fdist_Q (double X, double NU1, double NU2) + -- Function: double gsl_cdf_fdist_Pinv (double P, double NU1, double + NU2) + -- Function: double gsl_cdf_fdist_Qinv (double Q, double NU1, double + NU2) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the F-distribution with NU1 and + NU2 degrees of freedom. + + +File: gsl-ref.info, Node: The t-distribution, Next: The Beta Distribution, Prev: The F-distribution, Up: Random Number Distributions + +20.19 The t-distribution +======================== + +The t-distribution arises in statistics. If Y_1 has a normal +distribution and Y_2 has a chi-squared distribution with \nu degrees of +freedom then the ratio, + + X = { Y_1 \over \sqrt{Y_2 / \nu} } + +has a t-distribution t(x;\nu) with \nu degrees of freedom. + + -- Function: double gsl_ran_tdist (const gsl_rng * R, double NU) + This function returns a random variate from the t-distribution. + The distribution function is, + + p(x) dx = {\Gamma((\nu + 1)/2) \over \sqrt{\pi \nu} \Gamma(\nu/2)} + (1 + x^2/\nu)^{-(\nu + 1)/2} dx + + for -\infty < x < +\infty. + + -- Function: double gsl_ran_tdist_pdf (double X, double NU) + This function computes the probability density p(x) at X for a + t-distribution with NU degrees of freedom, using the formula given + above. + + + -- Function: double gsl_cdf_tdist_P (double X, double NU) + -- Function: double gsl_cdf_tdist_Q (double X, double NU) + -- Function: double gsl_cdf_tdist_Pinv (double P, double NU) + -- Function: double gsl_cdf_tdist_Qinv (double Q, double NU) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the t-distribution with NU + degrees of freedom. + + +File: gsl-ref.info, Node: The Beta Distribution, Next: The Logistic Distribution, Prev: The t-distribution, Up: Random Number Distributions + +20.20 The Beta Distribution +=========================== + + -- Function: double gsl_ran_beta (const gsl_rng * R, double A, double + B) + This function returns a random variate from the beta distribution. + The distribution function is, + + p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx + + for 0 <= x <= 1. + + -- Function: double gsl_ran_beta_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + beta distribution with parameters A and B, using the formula given + above. + + + -- Function: double gsl_cdf_beta_P (double X, double A, double B) + -- Function: double gsl_cdf_beta_Q (double X, double A, double B) + -- Function: double gsl_cdf_beta_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_beta_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the beta distribution with + parameters A and B. + + +File: gsl-ref.info, Node: The Logistic Distribution, Next: The Pareto Distribution, Prev: The Beta Distribution, Up: Random Number Distributions + +20.21 The Logistic Distribution +=============================== + + -- Function: double gsl_ran_logistic (const gsl_rng * R, double A) + This function returns a random variate from the logistic + distribution. The distribution function is, + + p(x) dx = { \exp(-x/a) \over a (1 + \exp(-x/a))^2 } dx + + for -\infty < x < +\infty. + + -- Function: double gsl_ran_logistic_pdf (double X, double A) + This function computes the probability density p(x) at X for a + logistic distribution with scale parameter A, using the formula + given above. + + + -- Function: double gsl_cdf_logistic_P (double X, double A) + -- Function: double gsl_cdf_logistic_Q (double X, double A) + -- Function: double gsl_cdf_logistic_Pinv (double P, double A) + -- Function: double gsl_cdf_logistic_Qinv (double Q, double A) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the logistic distribution with + scale parameter A. + + +File: gsl-ref.info, Node: The Pareto Distribution, Next: Spherical Vector Distributions, Prev: The Logistic Distribution, Up: Random Number Distributions + +20.22 The Pareto Distribution +============================= + + -- Function: double gsl_ran_pareto (const gsl_rng * R, double A, + double B) + This function returns a random variate from the Pareto + distribution of order A. The distribution function is, + + p(x) dx = (a/b) / (x/b)^{a+1} dx + + for x >= b. + + -- Function: double gsl_ran_pareto_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + Pareto distribution with exponent A and scale B, using the formula + given above. + + + -- Function: double gsl_cdf_pareto_P (double X, double A, double B) + -- Function: double gsl_cdf_pareto_Q (double X, double A, double B) + -- Function: double gsl_cdf_pareto_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_pareto_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Pareto distribution with + exponent A and scale B. + diff --git a/software/gsl-1.15/doc/gsl-ref.info-3 b/software/gsl-1.15/doc/gsl-ref.info-3 new file mode 100644 index 000000000..4a0f1774b --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.info-3 @@ -0,0 +1,7407 @@ +This is gsl-ref.info, produced by makeinfo version 4.13 from +gsl-ref.texi. + +INFO-DIR-SECTION Software libraries +START-INFO-DIR-ENTRY +* gsl-ref: (gsl-ref). GNU Scientific Library - Reference +END-INFO-DIR-ENTRY + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +File: gsl-ref.info, Node: Spherical Vector Distributions, Next: The Weibull Distribution, Prev: The Pareto Distribution, Up: Random Number Distributions + +20.23 Spherical Vector Distributions +==================================== + +The spherical distributions generate random vectors, located on a +spherical surface. They can be used as random directions, for example +in the steps of a random walk. + + -- Function: void gsl_ran_dir_2d (const gsl_rng * R, double * X, + double * Y) + -- Function: void gsl_ran_dir_2d_trig_method (const gsl_rng * R, + double * X, double * Y) + This function returns a random direction vector v = (X,Y) in two + dimensions. The vector is normalized such that |v|^2 = x^2 + y^2 + = 1. The obvious way to do this is to take a uniform random + number between 0 and 2\pi and let X and Y be the sine and cosine + respectively. Two trig functions would have been expensive in the + old days, but with modern hardware implementations, this is + sometimes the fastest way to go. This is the case for the Pentium + (but not the case for the Sun Sparcstation). One can avoid the + trig evaluations by choosing X and Y in the interior of a unit + circle (choose them at random from the interior of the enclosing + square, and then reject those that are outside the unit circle), + and then dividing by \sqrt{x^2 + y^2}. A much cleverer approach, + attributed to von Neumann (See Knuth, v2, 3rd ed, p140, exercise + 23), requires neither trig nor a square root. In this approach, U + and V are chosen at random from the interior of a unit circle, and + then x=(u^2-v^2)/(u^2+v^2) and y=2uv/(u^2+v^2). + + -- Function: void gsl_ran_dir_3d (const gsl_rng * R, double * X, + double * Y, double * Z) + This function returns a random direction vector v = (X,Y,Z) in + three dimensions. The vector is normalized such that |v|^2 = x^2 + + y^2 + z^2 = 1. The method employed is due to Robert E. Knop + (CACM 13, 326 (1970)), and explained in Knuth, v2, 3rd ed, p136. + It uses the surprising fact that the distribution projected along + any axis is actually uniform (this is only true for 3 dimensions). + + -- Function: void gsl_ran_dir_nd (const gsl_rng * R, size_t N, double + * X) + This function returns a random direction vector v = + (x_1,x_2,...,x_n) in N dimensions. The vector is normalized such + that |v|^2 = x_1^2 + x_2^2 + ... + x_n^2 = 1. The method uses the + fact that a multivariate Gaussian distribution is spherically + symmetric. Each component is generated to have a Gaussian + distribution, and then the components are normalized. The method + is described by Knuth, v2, 3rd ed, p135-136, and attributed to G. + W. Brown, Modern Mathematics for the Engineer (1956). + + +File: gsl-ref.info, Node: The Weibull Distribution, Next: The Type-1 Gumbel Distribution, Prev: Spherical Vector Distributions, Up: Random Number Distributions + +20.24 The Weibull Distribution +============================== + + -- Function: double gsl_ran_weibull (const gsl_rng * R, double A, + double B) + This function returns a random variate from the Weibull + distribution. The distribution function is, + + p(x) dx = {b \over a^b} x^{b-1} \exp(-(x/a)^b) dx + + for x >= 0. + + -- Function: double gsl_ran_weibull_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + Weibull distribution with scale A and exponent B, using the + formula given above. + + + -- Function: double gsl_cdf_weibull_P (double X, double A, double B) + -- Function: double gsl_cdf_weibull_Q (double X, double A, double B) + -- Function: double gsl_cdf_weibull_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_weibull_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Weibull distribution with + scale A and exponent B. + + +File: gsl-ref.info, Node: The Type-1 Gumbel Distribution, Next: The Type-2 Gumbel Distribution, Prev: The Weibull Distribution, Up: Random Number Distributions + +20.25 The Type-1 Gumbel Distribution +==================================== + + -- Function: double gsl_ran_gumbel1 (const gsl_rng * R, double A, + double B) + This function returns a random variate from the Type-1 Gumbel + distribution. The Type-1 Gumbel distribution function is, + + p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx + + for -\infty < x < \infty. + + -- Function: double gsl_ran_gumbel1_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + Type-1 Gumbel distribution with parameters A and B, using the + formula given above. + + + -- Function: double gsl_cdf_gumbel1_P (double X, double A, double B) + -- Function: double gsl_cdf_gumbel1_Q (double X, double A, double B) + -- Function: double gsl_cdf_gumbel1_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_gumbel1_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Type-1 Gumbel distribution + with parameters A and B. + + +File: gsl-ref.info, Node: The Type-2 Gumbel Distribution, Next: The Dirichlet Distribution, Prev: The Type-1 Gumbel Distribution, Up: Random Number Distributions + +20.26 The Type-2 Gumbel Distribution +==================================== + + -- Function: double gsl_ran_gumbel2 (const gsl_rng * R, double A, + double B) + This function returns a random variate from the Type-2 Gumbel + distribution. The Type-2 Gumbel distribution function is, + + p(x) dx = a b x^{-a-1} \exp(-b x^{-a}) dx + + for 0 < x < \infty. + + -- Function: double gsl_ran_gumbel2_pdf (double X, double A, double B) + This function computes the probability density p(x) at X for a + Type-2 Gumbel distribution with parameters A and B, using the + formula given above. + + + -- Function: double gsl_cdf_gumbel2_P (double X, double A, double B) + -- Function: double gsl_cdf_gumbel2_Q (double X, double A, double B) + -- Function: double gsl_cdf_gumbel2_Pinv (double P, double A, double B) + -- Function: double gsl_cdf_gumbel2_Qinv (double Q, double A, double B) + These functions compute the cumulative distribution functions + P(x), Q(x) and their inverses for the Type-2 Gumbel distribution + with parameters A and B. + + +File: gsl-ref.info, Node: The Dirichlet Distribution, Next: General Discrete Distributions, Prev: The Type-2 Gumbel Distribution, Up: Random Number Distributions + +20.27 The Dirichlet Distribution +================================ + + -- Function: void gsl_ran_dirichlet (const gsl_rng * R, size_t K, + const double ALPHA[], double THETA[]) + This function returns an array of K random variates from a + Dirichlet distribution of order K-1. The distribution function is + + p(\theta_1, ..., \theta_K) d\theta_1 ... d\theta_K = + (1/Z) \prod_{i=1}^K \theta_i^{\alpha_i - 1} \delta(1 -\sum_{i=1}^K \theta_i) d\theta_1 ... d\theta_K + + for theta_i >= 0 and alpha_i > 0. The delta function ensures that + \sum \theta_i = 1. The normalization factor Z is + + Z = {\prod_{i=1}^K \Gamma(\alpha_i)} / {\Gamma( \sum_{i=1}^K \alpha_i)} + + The random variates are generated by sampling K values from gamma + distributions with parameters a=alpha_i, b=1, and renormalizing. + See A.M. Law, W.D. Kelton, `Simulation Modeling and Analysis' + (1991). + + -- Function: double gsl_ran_dirichlet_pdf (size_t K, const double + ALPHA[], const double THETA[]) + This function computes the probability density p(\theta_1, ... , + \theta_K) at THETA[K] for a Dirichlet distribution with parameters + ALPHA[K], using the formula given above. + + -- Function: double gsl_ran_dirichlet_lnpdf (size_t K, const double + ALPHA[], const double THETA[]) + This function computes the logarithm of the probability density + p(\theta_1, ... , \theta_K) for a Dirichlet distribution with + parameters ALPHA[K]. + + +File: gsl-ref.info, Node: General Discrete Distributions, Next: The Poisson Distribution, Prev: The Dirichlet Distribution, Up: Random Number Distributions + +20.28 General Discrete Distributions +==================================== + +Given K discrete events with different probabilities P[k], produce a +random value k consistent with its probability. + + The obvious way to do this is to preprocess the probability list by +generating a cumulative probability array with K+1 elements: + + C[0] = 0 + C[k+1] = C[k]+P[k]. + +Note that this construction produces C[K]=1. Now choose a uniform +deviate u between 0 and 1, and find the value of k such that C[k] <= u +< C[k+1]. Although this in principle requires of order \log K steps per +random number generation, they are fast steps, and if you use something +like \lfloor uK \rfloor as a starting point, you can often do pretty +well. + + But faster methods have been devised. Again, the idea is to +preprocess the probability list, and save the result in some form of +lookup table; then the individual calls for a random discrete event can +go rapidly. An approach invented by G. Marsaglia (Generating discrete +random variables in a computer, Comm ACM 6, 37-38 (1963)) is very +clever, and readers interested in examples of good algorithm design are +directed to this short and well-written paper. Unfortunately, for +large K, Marsaglia's lookup table can be quite large. + + A much better approach is due to Alastair J. Walker (An efficient +method for generating discrete random variables with general +distributions, ACM Trans on Mathematical Software 3, 253-256 (1977); +see also Knuth, v2, 3rd ed, p120-121,139). This requires two lookup +tables, one floating point and one integer, but both only of size K. +After preprocessing, the random numbers are generated in O(1) time, +even for large K. The preprocessing suggested by Walker requires +O(K^2) effort, but that is not actually necessary, and the +implementation provided here only takes O(K) effort. In general, more +preprocessing leads to faster generation of the individual random +numbers, but a diminishing return is reached pretty early. Knuth points +out that the optimal preprocessing is combinatorially difficult for +large K. + + This method can be used to speed up some of the discrete random +number generators below, such as the binomial distribution. To use it +for something like the Poisson Distribution, a modification would have +to be made, since it only takes a finite set of K outcomes. + + -- Function: gsl_ran_discrete_t * gsl_ran_discrete_preproc (size_t K, + const double * P) + This function returns a pointer to a structure that contains the + lookup table for the discrete random number generator. The array + P[] contains the probabilities of the discrete events; these array + elements must all be positive, but they needn't add up to one (so + you can think of them more generally as "weights")--the + preprocessor will normalize appropriately. This return value is + used as an argument for the `gsl_ran_discrete' function below. + + -- Function: size_t gsl_ran_discrete (const gsl_rng * R, const + gsl_ran_discrete_t * G) + After the preprocessor, above, has been called, you use this + function to get the discrete random numbers. + + -- Function: double gsl_ran_discrete_pdf (size_t K, const + gsl_ran_discrete_t * G) + Returns the probability P[k] of observing the variable K. Since + P[k] is not stored as part of the lookup table, it must be + recomputed; this computation takes O(K), so if K is large and you + care about the original array P[k] used to create the lookup + table, then you should just keep this original array P[k] around. + + -- Function: void gsl_ran_discrete_free (gsl_ran_discrete_t * G) + De-allocates the lookup table pointed to by G. + + +File: gsl-ref.info, Node: The Poisson Distribution, Next: The Bernoulli Distribution, Prev: General Discrete Distributions, Up: Random Number Distributions + +20.29 The Poisson Distribution +============================== + + -- Function: unsigned int gsl_ran_poisson (const gsl_rng * R, double + MU) + This function returns a random integer from the Poisson + distribution with mean MU. The probability distribution for + Poisson variates is, + + p(k) = {\mu^k \over k!} \exp(-\mu) + + for k >= 0. + + -- Function: double gsl_ran_poisson_pdf (unsigned int K, double MU) + This function computes the probability p(k) of obtaining K from a + Poisson distribution with mean MU, using the formula given above. + + + -- Function: double gsl_cdf_poisson_P (unsigned int K, double MU) + -- Function: double gsl_cdf_poisson_Q (unsigned int K, double MU) + These functions compute the cumulative distribution functions + P(k), Q(k) for the Poisson distribution with parameter MU. + + +File: gsl-ref.info, Node: The Bernoulli Distribution, Next: The Binomial Distribution, Prev: The Poisson Distribution, Up: Random Number Distributions + +20.30 The Bernoulli Distribution +================================ + + -- Function: unsigned int gsl_ran_bernoulli (const gsl_rng * R, double + P) + This function returns either 0 or 1, the result of a Bernoulli + trial with probability P. The probability distribution for a + Bernoulli trial is, + + p(0) = 1 - p + p(1) = p + + + -- Function: double gsl_ran_bernoulli_pdf (unsigned int K, double P) + This function computes the probability p(k) of obtaining K from a + Bernoulli distribution with probability parameter P, using the + formula given above. + + + +File: gsl-ref.info, Node: The Binomial Distribution, Next: The Multinomial Distribution, Prev: The Bernoulli Distribution, Up: Random Number Distributions + +20.31 The Binomial Distribution +=============================== + + -- Function: unsigned int gsl_ran_binomial (const gsl_rng * R, double + P, unsigned int N) + This function returns a random integer from the binomial + distribution, the number of successes in N independent trials with + probability P. The probability distribution for binomial variates + is, + + p(k) = {n! \over k! (n-k)! } p^k (1-p)^{n-k} + + for 0 <= k <= n. + + -- Function: double gsl_ran_binomial_pdf (unsigned int K, double P, + unsigned int N) + This function computes the probability p(k) of obtaining K from a + binomial distribution with parameters P and N, using the formula + given above. + + + -- Function: double gsl_cdf_binomial_P (unsigned int K, double P, + unsigned int N) + -- Function: double gsl_cdf_binomial_Q (unsigned int K, double P, + unsigned int N) + These functions compute the cumulative distribution functions + P(k), Q(k) for the binomial distribution with parameters P and N. + + +File: gsl-ref.info, Node: The Multinomial Distribution, Next: The Negative Binomial Distribution, Prev: The Binomial Distribution, Up: Random Number Distributions + +20.32 The Multinomial Distribution +================================== + + -- Function: void gsl_ran_multinomial (const gsl_rng * R, size_t K, + unsigned int N, const double P[], unsigned int N[]) + This function computes a random sample N[] from the multinomial + distribution formed by N trials from an underlying distribution + P[K]. The distribution function for N[] is, + + P(n_1, n_2, ..., n_K) = + (N!/(n_1! n_2! ... n_K!)) p_1^n_1 p_2^n_2 ... p_K^n_K + + where (n_1, n_2, ..., n_K) are nonnegative integers with + sum_{k=1}^K n_k = N, and (p_1, p_2, ..., p_K) is a probability + distribution with \sum p_i = 1. If the array P[K] is not + normalized then its entries will be treated as weights and + normalized appropriately. The arrays N[] and P[] must both be of + length K. + + Random variates are generated using the conditional binomial + method (see C.S. Davis, `The computer generation of multinomial + random variates', Comp. Stat. Data Anal. 16 (1993) 205-217 for + details). + + -- Function: double gsl_ran_multinomial_pdf (size_t K, const double + P[], const unsigned int N[]) + This function computes the probability P(n_1, n_2, ..., n_K) of + sampling N[K] from a multinomial distribution with parameters + P[K], using the formula given above. + + -- Function: double gsl_ran_multinomial_lnpdf (size_t K, const double + P[], const unsigned int N[]) + This function returns the logarithm of the probability for the + multinomial distribution P(n_1, n_2, ..., n_K) with parameters + P[K]. + + +File: gsl-ref.info, Node: The Negative Binomial Distribution, Next: The Pascal Distribution, Prev: The Multinomial Distribution, Up: Random Number Distributions + +20.33 The Negative Binomial Distribution +======================================== + + -- Function: unsigned int gsl_ran_negative_binomial (const gsl_rng * + R, double P, double N) + This function returns a random integer from the negative binomial + distribution, the number of failures occurring before N successes + in independent trials with probability P of success. The + probability distribution for negative binomial variates is, + + p(k) = {\Gamma(n + k) \over \Gamma(k+1) \Gamma(n) } p^n (1-p)^k + + Note that n is not required to be an integer. + + -- Function: double gsl_ran_negative_binomial_pdf (unsigned int K, + double P, double N) + This function computes the probability p(k) of obtaining K from a + negative binomial distribution with parameters P and N, using the + formula given above. + + + -- Function: double gsl_cdf_negative_binomial_P (unsigned int K, + double P, double N) + -- Function: double gsl_cdf_negative_binomial_Q (unsigned int K, + double P, double N) + These functions compute the cumulative distribution functions + P(k), Q(k) for the negative binomial distribution with parameters + P and N. + + +File: gsl-ref.info, Node: The Pascal Distribution, Next: The Geometric Distribution, Prev: The Negative Binomial Distribution, Up: Random Number Distributions + +20.34 The Pascal Distribution +============================= + + -- Function: unsigned int gsl_ran_pascal (const gsl_rng * R, double P, + unsigned int N) + This function returns a random integer from the Pascal + distribution. The Pascal distribution is simply a negative + binomial distribution with an integer value of n. + + p(k) = {(n + k - 1)! \over k! (n - 1)! } p^n (1-p)^k + + for k >= 0 + + -- Function: double gsl_ran_pascal_pdf (unsigned int K, double P, + unsigned int N) + This function computes the probability p(k) of obtaining K from a + Pascal distribution with parameters P and N, using the formula + given above. + + + -- Function: double gsl_cdf_pascal_P (unsigned int K, double P, + unsigned int N) + -- Function: double gsl_cdf_pascal_Q (unsigned int K, double P, + unsigned int N) + These functions compute the cumulative distribution functions + P(k), Q(k) for the Pascal distribution with parameters P and N. + + +File: gsl-ref.info, Node: The Geometric Distribution, Next: The Hypergeometric Distribution, Prev: The Pascal Distribution, Up: Random Number Distributions + +20.35 The Geometric Distribution +================================ + + -- Function: unsigned int gsl_ran_geometric (const gsl_rng * R, double + P) + This function returns a random integer from the geometric + distribution, the number of independent trials with probability P + until the first success. The probability distribution for + geometric variates is, + + p(k) = p (1-p)^(k-1) + + for k >= 1. Note that the distribution begins with k=1 with this + definition. There is another convention in which the exponent k-1 + is replaced by k. + + -- Function: double gsl_ran_geometric_pdf (unsigned int K, double P) + This function computes the probability p(k) of obtaining K from a + geometric distribution with probability parameter P, using the + formula given above. + + + -- Function: double gsl_cdf_geometric_P (unsigned int K, double P) + -- Function: double gsl_cdf_geometric_Q (unsigned int K, double P) + These functions compute the cumulative distribution functions + P(k), Q(k) for the geometric distribution with parameter P. + + +File: gsl-ref.info, Node: The Hypergeometric Distribution, Next: The Logarithmic Distribution, Prev: The Geometric Distribution, Up: Random Number Distributions + +20.36 The Hypergeometric Distribution +===================================== + + -- Function: unsigned int gsl_ran_hypergeometric (const gsl_rng * R, + unsigned int N1, unsigned int N2, unsigned int T) + This function returns a random integer from the hypergeometric + distribution. The probability distribution for hypergeometric + random variates is, + + p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t) + + where C(a,b) = a!/(b!(a-b)!) and t <= n_1 + n_2. The domain of k + is max(0,t-n_2), ..., min(t,n_1). + + If a population contains n_1 elements of "type 1" and n_2 elements + of "type 2" then the hypergeometric distribution gives the + probability of obtaining k elements of "type 1" in t samples from + the population without replacement. + + -- Function: double gsl_ran_hypergeometric_pdf (unsigned int K, + unsigned int N1, unsigned int N2, unsigned int T) + This function computes the probability p(k) of obtaining K from a + hypergeometric distribution with parameters N1, N2, T, using the + formula given above. + + + -- Function: double gsl_cdf_hypergeometric_P (unsigned int K, unsigned + int N1, unsigned int N2, unsigned int T) + -- Function: double gsl_cdf_hypergeometric_Q (unsigned int K, unsigned + int N1, unsigned int N2, unsigned int T) + These functions compute the cumulative distribution functions + P(k), Q(k) for the hypergeometric distribution with parameters N1, + N2 and T. + + +File: gsl-ref.info, Node: The Logarithmic Distribution, Next: Shuffling and Sampling, Prev: The Hypergeometric Distribution, Up: Random Number Distributions + +20.37 The Logarithmic Distribution +================================== + + -- Function: unsigned int gsl_ran_logarithmic (const gsl_rng * R, + double P) + This function returns a random integer from the logarithmic + distribution. The probability distribution for logarithmic random + variates is, + + p(k) = {-1 \over \log(1-p)} {(p^k \over k)} + + for k >= 1. + + -- Function: double gsl_ran_logarithmic_pdf (unsigned int K, double P) + This function computes the probability p(k) of obtaining K from a + logarithmic distribution with probability parameter P, using the + formula given above. + + + +File: gsl-ref.info, Node: Shuffling and Sampling, Next: Random Number Distribution Examples, Prev: The Logarithmic Distribution, Up: Random Number Distributions + +20.38 Shuffling and Sampling +============================ + +The following functions allow the shuffling and sampling of a set of +objects. The algorithms rely on a random number generator as a source +of randomness and a poor quality generator can lead to correlations in +the output. In particular it is important to avoid generators with a +short period. For more information see Knuth, v2, 3rd ed, Section +3.4.2, "Random Sampling and Shuffling". + + -- Function: void gsl_ran_shuffle (const gsl_rng * R, void * BASE, + size_t N, size_t SIZE) + This function randomly shuffles the order of N objects, each of + size SIZE, stored in the array BASE[0..N-1]. The output of the + random number generator R is used to produce the permutation. The + algorithm generates all possible n! permutations with equal + probability, assuming a perfect source of random numbers. + + The following code shows how to shuffle the numbers from 0 to 51, + + int a[52]; + + for (i = 0; i < 52; i++) + { + a[i] = i; + } + + gsl_ran_shuffle (r, a, 52, sizeof (int)); + + + -- Function: int gsl_ran_choose (const gsl_rng * R, void * DEST, + size_t K, void * SRC, size_t N, size_t SIZE) + This function fills the array DEST[k] with K objects taken + randomly from the N elements of the array SRC[0..N-1]. The + objects are each of size SIZE. The output of the random number + generator R is used to make the selection. The algorithm ensures + all possible samples are equally likely, assuming a perfect source + of randomness. + + The objects are sampled _without_ replacement, thus each object can + only appear once in DEST[k]. It is required that K be less than + or equal to `n'. The objects in DEST will be in the same relative + order as those in SRC. You will need to call `gsl_ran_shuffle(r, + dest, n, size)' if you want to randomize the order. + + The following code shows how to select a random sample of three + unique numbers from the set 0 to 99, + + double a[3], b[100]; + + for (i = 0; i < 100; i++) + { + b[i] = (double) i; + } + + gsl_ran_choose (r, a, 3, b, 100, sizeof (double)); + + + -- Function: void gsl_ran_sample (const gsl_rng * R, void * DEST, + size_t K, void * SRC, size_t N, size_t SIZE) + This function is like `gsl_ran_choose' but samples K items from + the original array of N items SRC with replacement, so the same + object can appear more than once in the output sequence DEST. + There is no requirement that K be less than N in this case. + + +File: gsl-ref.info, Node: Random Number Distribution Examples, Next: Random Number Distribution References and Further Reading, Prev: Shuffling and Sampling, Up: Random Number Distributions + +20.39 Examples +============== + +The following program demonstrates the use of a random number generator +to produce variates from a distribution. It prints 10 samples from the +Poisson distribution with a mean of 3. + + #include + #include + #include + + int + main (void) + { + const gsl_rng_type * T; + gsl_rng * r; + + int i, n = 10; + double mu = 3.0; + + /* create a generator chosen by the + environment variable GSL_RNG_TYPE */ + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + /* print n random variates chosen from + the poisson distribution with mean + parameter mu */ + + for (i = 0; i < n; i++) + { + unsigned int k = gsl_ran_poisson (r, mu); + printf (" %u", k); + } + + printf ("\n"); + gsl_rng_free (r); + return 0; + } + +If the library and header files are installed under `/usr/local' (the +default location) then the program can be compiled with these options, + + $ gcc -Wall demo.c -lgsl -lgslcblas -lm + +Here is the output of the program, + + $ ./a.out + 2 5 5 2 1 0 3 4 1 1 + +The variates depend on the seed used by the generator. The seed for the +default generator type `gsl_rng_default' can be changed with the +`GSL_RNG_SEED' environment variable to produce a different stream of +variates, + + $ GSL_RNG_SEED=123 ./a.out + GSL_RNG_SEED=123 + 4 5 6 3 3 1 4 2 5 5 + +The following program generates a random walk in two dimensions. + + #include + #include + #include + + int + main (void) + { + int i; + double x = 0, y = 0, dx, dy; + + const gsl_rng_type * T; + gsl_rng * r; + + gsl_rng_env_setup(); + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + printf ("%g %g\n", x, y); + + for (i = 0; i < 10; i++) + { + gsl_ran_dir_2d (r, &dx, &dy); + x += dx; y += dy; + printf ("%g %g\n", x, y); + } + + gsl_rng_free (r); + return 0; + } + +Here is some output from the program, four 10-step random walks from +the origin, + + The following program computes the upper and lower cumulative +distribution functions for the standard normal distribution at x=2. + + #include + #include + + int + main (void) + { + double P, Q; + double x = 2.0; + + P = gsl_cdf_ugaussian_P (x); + printf ("prob(x < %f) = %f\n", x, P); + + Q = gsl_cdf_ugaussian_Q (x); + printf ("prob(x > %f) = %f\n", x, Q); + + x = gsl_cdf_ugaussian_Pinv (P); + printf ("Pinv(%f) = %f\n", P, x); + + x = gsl_cdf_ugaussian_Qinv (Q); + printf ("Qinv(%f) = %f\n", Q, x); + + return 0; + } + +Here is the output of the program, + + prob(x < 2.000000) = 0.977250 + prob(x > 2.000000) = 0.022750 + Pinv(0.977250) = 2.000000 + Qinv(0.022750) = 2.000000 + + +File: gsl-ref.info, Node: Random Number Distribution References and Further Reading, Prev: Random Number Distribution Examples, Up: Random Number Distributions + +20.40 References and Further Reading +==================================== + +For an encyclopaedic coverage of the subject readers are advised to +consult the book `Non-Uniform Random Variate Generation' by Luc +Devroye. It covers every imaginable distribution and provides hundreds +of algorithms. + + Luc Devroye, `Non-Uniform Random Variate Generation', + Springer-Verlag, ISBN 0-387-96305-7. Available online at + `http://cg.scs.carleton.ca/~luc/rnbookindex.html'. + +The subject of random variate generation is also reviewed by Knuth, who +describes algorithms for all the major distributions. + + Donald E. Knuth, `The Art of Computer Programming: Seminumerical + Algorithms' (Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842. + +The Particle Data Group provides a short review of techniques for +generating distributions of random numbers in the "Monte Carlo" section +of its Annual Review of Particle Physics. + + `Review of Particle Properties' R.M. Barnett et al., Physical + Review D54, 1 (1996) `http://pdg.lbl.gov/'. + +The Review of Particle Physics is available online in postscript and pdf +format. + +An overview of methods used to compute cumulative distribution functions +can be found in `Statistical Computing' by W.J. Kennedy and J.E. +Gentle. Another general reference is `Elements of Statistical +Computing' by R.A. Thisted. + + William E. Kennedy and James E. Gentle, `Statistical Computing' + (1980), Marcel Dekker, ISBN 0-8247-6898-1. + + Ronald A. Thisted, `Elements of Statistical Computing' (1988), + Chapman & Hall, ISBN 0-412-01371-1. + +The cumulative distribution functions for the Gaussian distribution are +based on the following papers, + + `Rational Chebyshev Approximations Using Linear Equations', W.J. + Cody, W. Fraser, J.F. Hart. Numerische Mathematik 12, 242-251 + (1968). + + `Rational Chebyshev Approximations for the Error Function', W.J. + Cody. Mathematics of Computation 23, n107, 631-637 (July 1969). + + +File: gsl-ref.info, Node: Statistics, Next: Histograms, Prev: Random Number Distributions, Up: Top + +21 Statistics +************* + +This chapter describes the statistical functions in the library. The +basic statistical functions include routines to compute the mean, +variance and standard deviation. More advanced functions allow you to +calculate absolute deviations, skewness, and kurtosis as well as the +median and arbitrary percentiles. The algorithms use recurrence +relations to compute average quantities in a stable way, without large +intermediate values that might overflow. + + The functions are available in versions for datasets in the standard +floating-point and integer types. The versions for double precision +floating-point data have the prefix `gsl_stats' and are declared in the +header file `gsl_statistics_double.h'. The versions for integer data +have the prefix `gsl_stats_int' and are declared in the header file +`gsl_statistics_int.h'. All the functions operate on C arrays with a +STRIDE parameter specifying the spacing between elements. + +* Menu: + +* Mean and standard deviation and variance:: +* Absolute deviation:: +* Higher moments (skewness and kurtosis):: +* Autocorrelation:: +* Covariance:: +* Correlation:: +* Weighted Samples:: +* Maximum and Minimum values:: +* Median and Percentiles:: +* Example statistical programs:: +* Statistics References and Further Reading:: + + +File: gsl-ref.info, Node: Mean and standard deviation and variance, Next: Absolute deviation, Up: Statistics + +21.1 Mean, Standard Deviation and Variance +========================================== + + -- Function: double gsl_stats_mean (const double DATA[], size_t + STRIDE, size_t N) + This function returns the arithmetic mean of DATA, a dataset of + length N with stride STRIDE. The arithmetic mean, or "sample + mean", is denoted by \Hat\mu and defined as, + + \Hat\mu = (1/N) \sum x_i + + where x_i are the elements of the dataset DATA. For samples drawn + from a gaussian distribution the variance of \Hat\mu is \sigma^2 / + N. + + -- Function: double gsl_stats_variance (const double DATA[], size_t + STRIDE, size_t N) + This function returns the estimated, or "sample", variance of + DATA, a dataset of length N with stride STRIDE. The estimated + variance is denoted by \Hat\sigma^2 and is defined by, + + \Hat\sigma^2 = (1/(N-1)) \sum (x_i - \Hat\mu)^2 + + where x_i are the elements of the dataset DATA. Note that the + normalization factor of 1/(N-1) results from the derivation of + \Hat\sigma^2 as an unbiased estimator of the population variance + \sigma^2. For samples drawn from a Gaussian distribution the + variance of \Hat\sigma^2 itself is 2 \sigma^4 / N. + + This function computes the mean via a call to `gsl_stats_mean'. If + you have already computed the mean then you can pass it directly to + `gsl_stats_variance_m'. + + -- Function: double gsl_stats_variance_m (const double DATA[], size_t + STRIDE, size_t N, double MEAN) + This function returns the sample variance of DATA relative to the + given value of MEAN. The function is computed with \Hat\mu + replaced by the value of MEAN that you supply, + + \Hat\sigma^2 = (1/(N-1)) \sum (x_i - mean)^2 + + -- Function: double gsl_stats_sd (const double DATA[], size_t STRIDE, + size_t N) + -- Function: double gsl_stats_sd_m (const double DATA[], size_t + STRIDE, size_t N, double MEAN) + The standard deviation is defined as the square root of the + variance. These functions return the square root of the + corresponding variance functions above. + + -- Function: double gsl_stats_tss (const double DATA[], size_t STRIDE, + size_t N) + -- Function: double gsl_stats_tss_m (const double DATA[], size_t + STRIDE, size_t N, double MEAN) + These functions return the total sum of squares (TSS) of DATA about + the mean. For `gsl_stats_tss_m' the user-supplied value of MEAN + is used, and for `gsl_stats_tss' it is computed using + `gsl_stats_mean'. + + TSS = \sum (x_i - mean)^2 + + -- Function: double gsl_stats_variance_with_fixed_mean (const double + DATA[], size_t STRIDE, size_t N, double MEAN) + This function computes an unbiased estimate of the variance of + DATA when the population mean MEAN of the underlying distribution + is known _a priori_. In this case the estimator for the variance + uses the factor 1/N and the sample mean \Hat\mu is replaced by the + known population mean \mu, + + \Hat\sigma^2 = (1/N) \sum (x_i - \mu)^2 + + -- Function: double gsl_stats_sd_with_fixed_mean (const double DATA[], + size_t STRIDE, size_t N, double MEAN) + This function calculates the standard deviation of DATA for a + fixed population mean MEAN. The result is the square root of the + corresponding variance function. + + +File: gsl-ref.info, Node: Absolute deviation, Next: Higher moments (skewness and kurtosis), Prev: Mean and standard deviation and variance, Up: Statistics + +21.2 Absolute deviation +======================= + + -- Function: double gsl_stats_absdev (const double DATA[], size_t + STRIDE, size_t N) + This function computes the absolute deviation from the mean of + DATA, a dataset of length N with stride STRIDE. The absolute + deviation from the mean is defined as, + + absdev = (1/N) \sum |x_i - \Hat\mu| + + where x_i are the elements of the dataset DATA. The absolute + deviation from the mean provides a more robust measure of the + width of a distribution than the variance. This function computes + the mean of DATA via a call to `gsl_stats_mean'. + + -- Function: double gsl_stats_absdev_m (const double DATA[], size_t + STRIDE, size_t N, double MEAN) + This function computes the absolute deviation of the dataset DATA + relative to the given value of MEAN, + + absdev = (1/N) \sum |x_i - mean| + + This function is useful if you have already computed the mean of + DATA (and want to avoid recomputing it), or wish to calculate the + absolute deviation relative to another value (such as zero, or the + median). + + +File: gsl-ref.info, Node: Higher moments (skewness and kurtosis), Next: Autocorrelation, Prev: Absolute deviation, Up: Statistics + +21.3 Higher moments (skewness and kurtosis) +=========================================== + + -- Function: double gsl_stats_skew (const double DATA[], size_t + STRIDE, size_t N) + This function computes the skewness of DATA, a dataset of length N + with stride STRIDE. The skewness is defined as, + + skew = (1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^3 + + where x_i are the elements of the dataset DATA. The skewness + measures the asymmetry of the tails of a distribution. + + The function computes the mean and estimated standard deviation of + DATA via calls to `gsl_stats_mean' and `gsl_stats_sd'. + + -- Function: double gsl_stats_skew_m_sd (const double DATA[], size_t + STRIDE, size_t N, double MEAN, double SD) + This function computes the skewness of the dataset DATA using the + given values of the mean MEAN and standard deviation SD, + + skew = (1/N) \sum ((x_i - mean)/sd)^3 + + These functions are useful if you have already computed the mean + and standard deviation of DATA and want to avoid recomputing them. + + -- Function: double gsl_stats_kurtosis (const double DATA[], size_t + STRIDE, size_t N) + This function computes the kurtosis of DATA, a dataset of length N + with stride STRIDE. The kurtosis is defined as, + + kurtosis = ((1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^4) - 3 + + The kurtosis measures how sharply peaked a distribution is, + relative to its width. The kurtosis is normalized to zero for a + Gaussian distribution. + + -- Function: double gsl_stats_kurtosis_m_sd (const double DATA[], + size_t STRIDE, size_t N, double MEAN, double SD) + This function computes the kurtosis of the dataset DATA using the + given values of the mean MEAN and standard deviation SD, + + kurtosis = ((1/N) \sum ((x_i - mean)/sd)^4) - 3 + + This function is useful if you have already computed the mean and + standard deviation of DATA and want to avoid recomputing them. + + +File: gsl-ref.info, Node: Autocorrelation, Next: Covariance, Prev: Higher moments (skewness and kurtosis), Up: Statistics + +21.4 Autocorrelation +==================== + + -- Function: double gsl_stats_lag1_autocorrelation (const double + DATA[], const size_t STRIDE, const size_t N) + This function computes the lag-1 autocorrelation of the dataset + DATA. + + a_1 = {\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i-1} - \Hat\mu) + \over + \sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i} - \Hat\mu)} + + -- Function: double gsl_stats_lag1_autocorrelation_m (const double + DATA[], const size_t STRIDE, const size_t N, const double + MEAN) + This function computes the lag-1 autocorrelation of the dataset + DATA using the given value of the mean MEAN. + + + +File: gsl-ref.info, Node: Covariance, Next: Correlation, Prev: Autocorrelation, Up: Statistics + +21.5 Covariance +=============== + + -- Function: double gsl_stats_covariance (const double DATA1[], const + size_t STRIDE1, const double DATA2[], const size_t STRIDE2, + const size_t N) + This function computes the covariance of the datasets DATA1 and + DATA2 which must both be of the same length N. + + covar = (1/(n - 1)) \sum_{i = 1}^{n} (x_i - \Hat x) (y_i - \Hat y) + + -- Function: double gsl_stats_covariance_m (const double DATA1[], + const size_t STRIDE1, const double DATA2[], const size_t + STRIDE2, const size_t N, const double MEAN1, const double + MEAN2) + This function computes the covariance of the datasets DATA1 and + DATA2 using the given values of the means, MEAN1 and MEAN2. This + is useful if you have already computed the means of DATA1 and + DATA2 and want to avoid recomputing them. + + +File: gsl-ref.info, Node: Correlation, Next: Weighted Samples, Prev: Covariance, Up: Statistics + +21.6 Correlation +================ + + -- Function: double gsl_stats_correlation (const double DATA1[], const + size_t STRIDE1, const double DATA2[], const size_t STRIDE2, + const size_t N) + This function efficiently computes the Pearson correlation + coefficient between the datasets DATA1 and DATA2 which must both + be of the same length N. + r = cov(x, y) / (\Hat\sigma_x \Hat\sigma_y) + = {1/(n-1) \sum (x_i - \Hat x) (y_i - \Hat y) + \over + \sqrt{1/(n-1) \sum (x_i - \Hat x)^2} \sqrt{1/(n-1) \sum (y_i - \Hat y)^2} + } + + +File: gsl-ref.info, Node: Weighted Samples, Next: Maximum and Minimum values, Prev: Correlation, Up: Statistics + +21.7 Weighted Samples +===================== + +The functions described in this section allow the computation of +statistics for weighted samples. The functions accept an array of +samples, x_i, with associated weights, w_i. Each sample x_i is +considered as having been drawn from a Gaussian distribution with +variance \sigma_i^2. The sample weight w_i is defined as the +reciprocal of this variance, w_i = 1/\sigma_i^2. Setting a weight to +zero corresponds to removing a sample from a dataset. + + -- Function: double gsl_stats_wmean (const double W[], size_t WSTRIDE, + const double DATA[], size_t STRIDE, size_t N) + This function returns the weighted mean of the dataset DATA with + stride STRIDE and length N, using the set of weights W with stride + WSTRIDE and length N. The weighted mean is defined as, + + \Hat\mu = (\sum w_i x_i) / (\sum w_i) + + -- Function: double gsl_stats_wvariance (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N) + This function returns the estimated variance of the dataset DATA + with stride STRIDE and length N, using the set of weights W with + stride WSTRIDE and length N. The estimated variance of a weighted + dataset is calculated as, + + \Hat\sigma^2 = ((\sum w_i)/((\sum w_i)^2 - \sum (w_i^2))) + \sum w_i (x_i - \Hat\mu)^2 + + Note that this expression reduces to an unweighted variance with + the familiar 1/(N-1) factor when there are N equal non-zero + weights. + + -- Function: double gsl_stats_wvariance_m (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N, double + WMEAN) + This function returns the estimated variance of the weighted + dataset DATA using the given weighted mean WMEAN. + + -- Function: double gsl_stats_wsd (const double W[], size_t WSTRIDE, + const double DATA[], size_t STRIDE, size_t N) + The standard deviation is defined as the square root of the + variance. This function returns the square root of the + corresponding variance function `gsl_stats_wvariance' above. + + -- Function: double gsl_stats_wsd_m (const double W[], size_t WSTRIDE, + const double DATA[], size_t STRIDE, size_t N, double WMEAN) + This function returns the square root of the corresponding variance + function `gsl_stats_wvariance_m' above. + + -- Function: double gsl_stats_wvariance_with_fixed_mean (const double + W[], size_t WSTRIDE, const double DATA[], size_t STRIDE, + size_t N, const double MEAN) + This function computes an unbiased estimate of the variance of the + weighted dataset DATA when the population mean MEAN of the + underlying distribution is known _a priori_. In this case the + estimator for the variance replaces the sample mean \Hat\mu by the + known population mean \mu, + + \Hat\sigma^2 = (\sum w_i (x_i - \mu)^2) / (\sum w_i) + + -- Function: double gsl_stats_wsd_with_fixed_mean (const double W[], + size_t WSTRIDE, const double DATA[], size_t STRIDE, size_t N, + const double MEAN) + The standard deviation is defined as the square root of the + variance. This function returns the square root of the + corresponding variance function above. + + -- Function: double gsl_stats_wtss (const double W[], const size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N) + -- Function: double gsl_stats_wtss_m (const double W[], const size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N, double + WMEAN) + These functions return the weighted total sum of squares (TSS) of + DATA about the weighted mean. For `gsl_stats_wtss_m' the + user-supplied value of WMEAN is used, and for `gsl_stats_wtss' it + is computed using `gsl_stats_wmean'. + + TSS = \sum w_i (x_i - wmean)^2 + + -- Function: double gsl_stats_wabsdev (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N) + This function computes the weighted absolute deviation from the + weighted mean of DATA. The absolute deviation from the mean is + defined as, + + absdev = (\sum w_i |x_i - \Hat\mu|) / (\sum w_i) + + -- Function: double gsl_stats_wabsdev_m (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N, double + WMEAN) + This function computes the absolute deviation of the weighted + dataset DATA about the given weighted mean WMEAN. + + -- Function: double gsl_stats_wskew (const double W[], size_t WSTRIDE, + const double DATA[], size_t STRIDE, size_t N) + This function computes the weighted skewness of the dataset DATA. + + skew = (\sum w_i ((x_i - \Hat x)/\Hat \sigma)^3) / (\sum w_i) + + -- Function: double gsl_stats_wskew_m_sd (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N, double + WMEAN, double WSD) + This function computes the weighted skewness of the dataset DATA + using the given values of the weighted mean and weighted standard + deviation, WMEAN and WSD. + + -- Function: double gsl_stats_wkurtosis (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N) + This function computes the weighted kurtosis of the dataset DATA. + + kurtosis = ((\sum w_i ((x_i - \Hat x)/\Hat \sigma)^4) / (\sum w_i)) - 3 + + -- Function: double gsl_stats_wkurtosis_m_sd (const double W[], size_t + WSTRIDE, const double DATA[], size_t STRIDE, size_t N, double + WMEAN, double WSD) + This function computes the weighted kurtosis of the dataset DATA + using the given values of the weighted mean and weighted standard + deviation, WMEAN and WSD. + + +File: gsl-ref.info, Node: Maximum and Minimum values, Next: Median and Percentiles, Prev: Weighted Samples, Up: Statistics + +21.8 Maximum and Minimum values +=============================== + +The following functions find the maximum and minimum values of a +dataset (or their indices). If the data contains `NaN's then a `NaN' +will be returned, since the maximum or minimum value is undefined. For +functions which return an index, the location of the first `NaN' in the +array is returned. + + -- Function: double gsl_stats_max (const double DATA[], size_t STRIDE, + size_t N) + This function returns the maximum value in DATA, a dataset of + length N with stride STRIDE. The maximum value is defined as the + value of the element x_i which satisfies x_i >= x_j for all j. + + If you want instead to find the element with the largest absolute + magnitude you will need to apply `fabs' or `abs' to your data + before calling this function. + + -- Function: double gsl_stats_min (const double DATA[], size_t STRIDE, + size_t N) + This function returns the minimum value in DATA, a dataset of + length N with stride STRIDE. The minimum value is defined as the + value of the element x_i which satisfies x_i <= x_j for all j. + + If you want instead to find the element with the smallest absolute + magnitude you will need to apply `fabs' or `abs' to your data + before calling this function. + + -- Function: void gsl_stats_minmax (double * MIN, double * MAX, const + double DATA[], size_t STRIDE, size_t N) + This function finds both the minimum and maximum values MIN, MAX + in DATA in a single pass. + + -- Function: size_t gsl_stats_max_index (const double DATA[], size_t + STRIDE, size_t N) + This function returns the index of the maximum value in DATA, a + dataset of length N with stride STRIDE. The maximum value is + defined as the value of the element x_i which satisfies x_i >= x_j + for all j. When there are several equal maximum elements then the + first one is chosen. + + -- Function: size_t gsl_stats_min_index (const double DATA[], size_t + STRIDE, size_t N) + This function returns the index of the minimum value in DATA, a + dataset of length N with stride STRIDE. The minimum value is + defined as the value of the element x_i which satisfies x_i >= x_j + for all j. When there are several equal minimum elements then the + first one is chosen. + + -- Function: void gsl_stats_minmax_index (size_t * MIN_INDEX, size_t * + MAX_INDEX, const double DATA[], size_t STRIDE, size_t N) + This function returns the indexes MIN_INDEX, MAX_INDEX of the + minimum and maximum values in DATA in a single pass. + + +File: gsl-ref.info, Node: Median and Percentiles, Next: Example statistical programs, Prev: Maximum and Minimum values, Up: Statistics + +21.9 Median and Percentiles +=========================== + +The median and percentile functions described in this section operate on +sorted data. For convenience we use "quantiles", measured on a scale +of 0 to 1, instead of percentiles (which use a scale of 0 to 100). + + -- Function: double gsl_stats_median_from_sorted_data (const double + SORTED_DATA[], size_t STRIDE, size_t N) + This function returns the median value of SORTED_DATA, a dataset + of length N with stride STRIDE. The elements of the array must be + in ascending numerical order. There are no checks to see whether + the data are sorted, so the function `gsl_sort' should always be + used first. + + When the dataset has an odd number of elements the median is the + value of element (n-1)/2. When the dataset has an even number of + elements the median is the mean of the two nearest middle values, + elements (n-1)/2 and n/2. Since the algorithm for computing the + median involves interpolation this function always returns a + floating-point number, even for integer data types. + + -- Function: double gsl_stats_quantile_from_sorted_data (const double + SORTED_DATA[], size_t STRIDE, size_t N, double F) + This function returns a quantile value of SORTED_DATA, a + double-precision array of length N with stride STRIDE. The + elements of the array must be in ascending numerical order. The + quantile is determined by the F, a fraction between 0 and 1. For + example, to compute the value of the 75th percentile F should have + the value 0.75. + + There are no checks to see whether the data are sorted, so the + function `gsl_sort' should always be used first. + + The quantile is found by interpolation, using the formula + + quantile = (1 - \delta) x_i + \delta x_{i+1} + + where i is `floor'((n - 1)f) and \delta is (n-1)f - i. + + Thus the minimum value of the array (`data[0*stride]') is given by + F equal to zero, the maximum value (`data[(n-1)*stride]') is given + by F equal to one and the median value is given by F equal to 0.5. + Since the algorithm for computing quantiles involves interpolation + this function always returns a floating-point number, even for + integer data types. + + +File: gsl-ref.info, Node: Example statistical programs, Next: Statistics References and Further Reading, Prev: Median and Percentiles, Up: Statistics + +21.10 Examples +============== + +Here is a basic example of how to use the statistical functions: + + #include + #include + + int + main(void) + { + double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6}; + double mean, variance, largest, smallest; + + mean = gsl_stats_mean(data, 1, 5); + variance = gsl_stats_variance(data, 1, 5); + largest = gsl_stats_max(data, 1, 5); + smallest = gsl_stats_min(data, 1, 5); + + printf ("The dataset is %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + printf ("The sample mean is %g\n", mean); + printf ("The estimated variance is %g\n", variance); + printf ("The largest value is %g\n", largest); + printf ("The smallest value is %g\n", smallest); + return 0; + } + + The program should produce the following output, + + The dataset is 17.2, 18.1, 16.5, 18.3, 12.6 + The sample mean is 16.54 + The estimated variance is 5.373 + The largest value is 18.3 + The smallest value is 12.6 + + Here is an example using sorted data, + + #include + #include + #include + + int + main(void) + { + double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6}; + double median, upperq, lowerq; + + printf ("Original dataset: %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + gsl_sort (data, 1, 5); + + printf ("Sorted dataset: %g, %g, %g, %g, %g\n", + data[0], data[1], data[2], data[3], data[4]); + + median + = gsl_stats_median_from_sorted_data (data, + 1, 5); + + upperq + = gsl_stats_quantile_from_sorted_data (data, + 1, 5, + 0.75); + lowerq + = gsl_stats_quantile_from_sorted_data (data, + 1, 5, + 0.25); + + printf ("The median is %g\n", median); + printf ("The upper quartile is %g\n", upperq); + printf ("The lower quartile is %g\n", lowerq); + return 0; + } + + This program should produce the following output, + + Original dataset: 17.2, 18.1, 16.5, 18.3, 12.6 + Sorted dataset: 12.6, 16.5, 17.2, 18.1, 18.3 + The median is 17.2 + The upper quartile is 18.1 + The lower quartile is 16.5 + + +File: gsl-ref.info, Node: Statistics References and Further Reading, Prev: Example statistical programs, Up: Statistics + +21.11 References and Further Reading +==================================== + +The standard reference for almost any topic in statistics is the +multi-volume `Advanced Theory of Statistics' by Kendall and Stuart. + + Maurice Kendall, Alan Stuart, and J. Keith Ord. `The Advanced + Theory of Statistics' (multiple volumes) reprinted as `Kendall's + Advanced Theory of Statistics'. Wiley, ISBN 047023380X. + +Many statistical concepts can be more easily understood by a Bayesian +approach. The following book by Gelman, Carlin, Stern and Rubin gives a +comprehensive coverage of the subject. + + Andrew Gelman, John B. Carlin, Hal S. Stern, Donald B. Rubin. + `Bayesian Data Analysis'. Chapman & Hall, ISBN 0412039915. + +For physicists the Particle Data Group provides useful reviews of +Probability and Statistics in the "Mathematical Tools" section of its +Annual Review of Particle Physics. + + `Review of Particle Properties' R.M. Barnett et al., Physical + Review D54, 1 (1996) + +The Review of Particle Physics is available online at the website +`http://pdg.lbl.gov/'. + + +File: gsl-ref.info, Node: Histograms, Next: N-tuples, Prev: Statistics, Up: Top + +22 Histograms +************* + +This chapter describes functions for creating histograms. Histograms +provide a convenient way of summarizing the distribution of a set of +data. A histogram consists of a set of "bins" which count the number of +events falling into a given range of a continuous variable x. In GSL +the bins of a histogram contain floating-point numbers, so they can be +used to record both integer and non-integer distributions. The bins +can use arbitrary sets of ranges (uniformly spaced bins are the +default). Both one and two-dimensional histograms are supported. + + Once a histogram has been created it can also be converted into a +probability distribution function. The library provides efficient +routines for selecting random samples from probability distributions. +This can be useful for generating simulations based on real data. + + The functions are declared in the header files `gsl_histogram.h' and +`gsl_histogram2d.h'. + +* Menu: + +* The histogram struct:: +* Histogram allocation:: +* Copying Histograms:: +* Updating and accessing histogram elements:: +* Searching histogram ranges:: +* Histogram Statistics:: +* Histogram Operations:: +* Reading and writing histograms:: +* Resampling from histograms:: +* The histogram probability distribution struct:: +* Example programs for histograms:: +* Two dimensional histograms:: +* The 2D histogram struct:: +* 2D Histogram allocation:: +* Copying 2D Histograms:: +* Updating and accessing 2D histogram elements:: +* Searching 2D histogram ranges:: +* 2D Histogram Statistics:: +* 2D Histogram Operations:: +* Reading and writing 2D histograms:: +* Resampling from 2D histograms:: +* Example programs for 2D histograms:: + + +File: gsl-ref.info, Node: The histogram struct, Next: Histogram allocation, Up: Histograms + +22.1 The histogram struct +========================= + +A histogram is defined by the following struct, + + -- Data Type: gsl_histogram + `size_t n' + This is the number of histogram bins + + `double * range' + The ranges of the bins are stored in an array of N+1 elements + pointed to by RANGE. + + `double * bin' + The counts for each bin are stored in an array of N elements + pointed to by BIN. The bins are floating-point numbers, so + you can increment them by non-integer values if necessary. + +The range for BIN[i] is given by RANGE[i] to RANGE[i+1]. For n bins +there are n+1 entries in the array RANGE. Each bin is inclusive at the +lower end and exclusive at the upper end. Mathematically this means +that the bins are defined by the following inequality, + bin[i] corresponds to range[i] <= x < range[i+1] + +Here is a diagram of the correspondence between ranges and bins on the +number-line for x, + + + [ bin[0] )[ bin[1] )[ bin[2] )[ bin[3] )[ bin[4] ) + ---|---------|---------|---------|---------|---------|--- x + r[0] r[1] r[2] r[3] r[4] r[5] + +In this picture the values of the RANGE array are denoted by r. On the +left-hand side of each bin the square bracket `[' denotes an inclusive +lower bound (r <= x), and the round parentheses `)' on the right-hand +side denote an exclusive upper bound (x < r). Thus any samples which +fall on the upper end of the histogram are excluded. If you want to +include this value for the last bin you will need to add an extra bin +to your histogram. + + The `gsl_histogram' struct and its associated functions are defined +in the header file `gsl_histogram.h'. + + +File: gsl-ref.info, Node: Histogram allocation, Next: Copying Histograms, Prev: The histogram struct, Up: Histograms + +22.2 Histogram allocation +========================= + +The functions for allocating memory to a histogram follow the style of +`malloc' and `free'. In addition they also perform their own error +checking. If there is insufficient memory available to allocate a +histogram then the functions call the error handler (with an error +number of `GSL_ENOMEM') in addition to returning a null pointer. Thus +if you use the library error handler to abort your program then it +isn't necessary to check every histogram `alloc'. + + -- Function: gsl_histogram * gsl_histogram_alloc (size_t N) + This function allocates memory for a histogram with N bins, and + returns a pointer to a newly created `gsl_histogram' struct. If + insufficient memory is available a null pointer is returned and the + error handler is invoked with an error code of `GSL_ENOMEM'. The + bins and ranges are not initialized, and should be prepared using + one of the range-setting functions below in order to make the + histogram ready for use. + + -- Function: int gsl_histogram_set_ranges (gsl_histogram * H, const + double RANGE[], size_t SIZE) + This function sets the ranges of the existing histogram H using + the array RANGE of size SIZE. The values of the histogram bins + are reset to zero. The `range' array should contain the desired + bin limits. The ranges can be arbitrary, subject to the + restriction that they are monotonically increasing. + + The following example shows how to create a histogram with + logarithmic bins with ranges [1,10), [10,100) and [100,1000). + + gsl_histogram * h = gsl_histogram_alloc (3); + + /* bin[0] covers the range 1 <= x < 10 */ + /* bin[1] covers the range 10 <= x < 100 */ + /* bin[2] covers the range 100 <= x < 1000 */ + + double range[4] = { 1.0, 10.0, 100.0, 1000.0 }; + + gsl_histogram_set_ranges (h, range, 4); + + Note that the size of the RANGE array should be defined to be one + element bigger than the number of bins. The additional element is + required for the upper value of the final bin. + + -- Function: int gsl_histogram_set_ranges_uniform (gsl_histogram * H, + double XMIN, double XMAX) + This function sets the ranges of the existing histogram H to cover + the range XMIN to XMAX uniformly. The values of the histogram + bins are reset to zero. The bin ranges are shown in the table + below, + bin[0] corresponds to xmin <= x < xmin + d + bin[1] corresponds to xmin + d <= x < xmin + 2 d + ...... + bin[n-1] corresponds to xmin + (n-1)d <= x < xmax + + where d is the bin spacing, d = (xmax-xmin)/n. + + -- Function: void gsl_histogram_free (gsl_histogram * H) + This function frees the histogram H and all of the memory + associated with it. + + +File: gsl-ref.info, Node: Copying Histograms, Next: Updating and accessing histogram elements, Prev: Histogram allocation, Up: Histograms + +22.3 Copying Histograms +======================= + + -- Function: int gsl_histogram_memcpy (gsl_histogram * DEST, const + gsl_histogram * SRC) + This function copies the histogram SRC into the pre-existing + histogram DEST, making DEST into an exact copy of SRC. The two + histograms must be of the same size. + + -- Function: gsl_histogram * gsl_histogram_clone (const gsl_histogram + * SRC) + This function returns a pointer to a newly created histogram which + is an exact copy of the histogram SRC. + + +File: gsl-ref.info, Node: Updating and accessing histogram elements, Next: Searching histogram ranges, Prev: Copying Histograms, Up: Histograms + +22.4 Updating and accessing histogram elements +============================================== + +There are two ways to access histogram bins, either by specifying an x +coordinate or by using the bin-index directly. The functions for +accessing the histogram through x coordinates use a binary search to +identify the bin which covers the appropriate range. + + -- Function: int gsl_histogram_increment (gsl_histogram * H, double X) + This function updates the histogram H by adding one (1.0) to the + bin whose range contains the coordinate X. + + If X lies in the valid range of the histogram then the function + returns zero to indicate success. If X is less than the lower + limit of the histogram then the function returns `GSL_EDOM', and + none of bins are modified. Similarly, if the value of X is greater + than or equal to the upper limit of the histogram then the function + returns `GSL_EDOM', and none of the bins are modified. The error + handler is not called, however, since it is often necessary to + compute histograms for a small range of a larger dataset, ignoring + the values outside the range of interest. + + -- Function: int gsl_histogram_accumulate (gsl_histogram * H, double + X, double WEIGHT) + This function is similar to `gsl_histogram_increment' but increases + the value of the appropriate bin in the histogram H by the + floating-point number WEIGHT. + + -- Function: double gsl_histogram_get (const gsl_histogram * H, size_t + I) + This function returns the contents of the I-th bin of the histogram + H. If I lies outside the valid range of indices for the histogram + then the error handler is called with an error code of `GSL_EDOM' + and the function returns 0. + + -- Function: int gsl_histogram_get_range (const gsl_histogram * H, + size_t I, double * LOWER, double * UPPER) + This function finds the upper and lower range limits of the I-th + bin of the histogram H. If the index I is valid then the + corresponding range limits are stored in LOWER and UPPER. The + lower limit is inclusive (i.e. events with this coordinate are + included in the bin) and the upper limit is exclusive (i.e. events + with the coordinate of the upper limit are excluded and fall in the + neighboring higher bin, if it exists). The function returns 0 to + indicate success. If I lies outside the valid range of indices for + the histogram then the error handler is called and the function + returns an error code of `GSL_EDOM'. + + -- Function: double gsl_histogram_max (const gsl_histogram * H) + -- Function: double gsl_histogram_min (const gsl_histogram * H) + -- Function: size_t gsl_histogram_bins (const gsl_histogram * H) + These functions return the maximum upper and minimum lower range + limits and the number of bins of the histogram H. They provide a + way of determining these values without accessing the + `gsl_histogram' struct directly. + + -- Function: void gsl_histogram_reset (gsl_histogram * H) + This function resets all the bins in the histogram H to zero. + + +File: gsl-ref.info, Node: Searching histogram ranges, Next: Histogram Statistics, Prev: Updating and accessing histogram elements, Up: Histograms + +22.5 Searching histogram ranges +=============================== + +The following functions are used by the access and update routines to +locate the bin which corresponds to a given x coordinate. + + -- Function: int gsl_histogram_find (const gsl_histogram * H, double + X, size_t * I) + This function finds and sets the index I to the bin number which + covers the coordinate X in the histogram H. The bin is located + using a binary search. The search includes an optimization for + histograms with uniform range, and will return the correct bin + immediately in this case. If X is found in the range of the + histogram then the function sets the index I and returns + `GSL_SUCCESS'. If X lies outside the valid range of the histogram + then the function returns `GSL_EDOM' and the error handler is + invoked. + + +File: gsl-ref.info, Node: Histogram Statistics, Next: Histogram Operations, Prev: Searching histogram ranges, Up: Histograms + +22.6 Histogram Statistics +========================= + + -- Function: double gsl_histogram_max_val (const gsl_histogram * H) + This function returns the maximum value contained in the histogram + bins. + + -- Function: size_t gsl_histogram_max_bin (const gsl_histogram * H) + This function returns the index of the bin containing the maximum + value. In the case where several bins contain the same maximum + value the smallest index is returned. + + -- Function: double gsl_histogram_min_val (const gsl_histogram * H) + This function returns the minimum value contained in the histogram + bins. + + -- Function: size_t gsl_histogram_min_bin (const gsl_histogram * H) + This function returns the index of the bin containing the minimum + value. In the case where several bins contain the same maximum + value the smallest index is returned. + + -- Function: double gsl_histogram_mean (const gsl_histogram * H) + This function returns the mean of the histogrammed variable, where + the histogram is regarded as a probability distribution. Negative + bin values are ignored for the purposes of this calculation. The + accuracy of the result is limited by the bin width. + + -- Function: double gsl_histogram_sigma (const gsl_histogram * H) + This function returns the standard deviation of the histogrammed + variable, where the histogram is regarded as a probability + distribution. Negative bin values are ignored for the purposes of + this calculation. The accuracy of the result is limited by the bin + width. + + -- Function: double gsl_histogram_sum (const gsl_histogram * H) + This function returns the sum of all bin values. Negative bin + values are included in the sum. + + +File: gsl-ref.info, Node: Histogram Operations, Next: Reading and writing histograms, Prev: Histogram Statistics, Up: Histograms + +22.7 Histogram Operations +========================= + + -- Function: int gsl_histogram_equal_bins_p (const gsl_histogram * H1, + const gsl_histogram * H2) + This function returns 1 if the all of the individual bin ranges of + the two histograms are identical, and 0 otherwise. + + -- Function: int gsl_histogram_add (gsl_histogram * H1, const + gsl_histogram * H2) + This function adds the contents of the bins in histogram H2 to the + corresponding bins of histogram H1, i.e. h'_1(i) = h_1(i) + + h_2(i). The two histograms must have identical bin ranges. + + -- Function: int gsl_histogram_sub (gsl_histogram * H1, const + gsl_histogram * H2) + This function subtracts the contents of the bins in histogram H2 + from the corresponding bins of histogram H1, i.e. h'_1(i) = h_1(i) + - h_2(i). The two histograms must have identical bin ranges. + + -- Function: int gsl_histogram_mul (gsl_histogram * H1, const + gsl_histogram * H2) + This function multiplies the contents of the bins of histogram H1 + by the contents of the corresponding bins in histogram H2, i.e. + h'_1(i) = h_1(i) * h_2(i). The two histograms must have identical + bin ranges. + + -- Function: int gsl_histogram_div (gsl_histogram * H1, const + gsl_histogram * H2) + This function divides the contents of the bins of histogram H1 by + the contents of the corresponding bins in histogram H2, i.e. + h'_1(i) = h_1(i) / h_2(i). The two histograms must have identical + bin ranges. + + -- Function: int gsl_histogram_scale (gsl_histogram * H, double SCALE) + This function multiplies the contents of the bins of histogram H + by the constant SCALE, i.e. h'_1(i) = h_1(i) * scale. + + -- Function: int gsl_histogram_shift (gsl_histogram * H, double OFFSET) + This function shifts the contents of the bins of histogram H by + the constant OFFSET, i.e. h'_1(i) = h_1(i) + offset. + + +File: gsl-ref.info, Node: Reading and writing histograms, Next: Resampling from histograms, Prev: Histogram Operations, Up: Histograms + +22.8 Reading and writing histograms +=================================== + +The library provides functions for reading and writing histograms to a +file as binary data or formatted text. + + -- Function: int gsl_histogram_fwrite (FILE * STREAM, const + gsl_histogram * H) + This function writes the ranges and bins of the histogram H to the + stream STREAM in binary format. The return value is 0 for success + and `GSL_EFAILED' if there was a problem writing to the file. + Since the data is written in the native binary format it may not + be portable between different architectures. + + -- Function: int gsl_histogram_fread (FILE * STREAM, gsl_histogram * H) + This function reads into the histogram H from the open stream + STREAM in binary format. The histogram H must be preallocated + with the correct size since the function uses the number of bins + in H to determine how many bytes to read. The return value is 0 + for success and `GSL_EFAILED' if there was a problem reading from + the file. The data is assumed to have been written in the native + binary format on the same architecture. + + -- Function: int gsl_histogram_fprintf (FILE * STREAM, const + gsl_histogram * H, const char * RANGE_FORMAT, const char * + BIN_FORMAT) + This function writes the ranges and bins of the histogram H + line-by-line to the stream STREAM using the format specifiers + RANGE_FORMAT and BIN_FORMAT. These should be one of the `%g', + `%e' or `%f' formats for floating point numbers. The function + returns 0 for success and `GSL_EFAILED' if there was a problem + writing to the file. The histogram output is formatted in three + columns, and the columns are separated by spaces, like this, + + range[0] range[1] bin[0] + range[1] range[2] bin[1] + range[2] range[3] bin[2] + .... + range[n-1] range[n] bin[n-1] + + The values of the ranges are formatted using RANGE_FORMAT and the + value of the bins are formatted using BIN_FORMAT. Each line + contains the lower and upper limit of the range of the bins and the + value of the bin itself. Since the upper limit of one bin is the + lower limit of the next there is duplication of these values + between lines but this allows the histogram to be manipulated with + line-oriented tools. + + -- Function: int gsl_histogram_fscanf (FILE * STREAM, gsl_histogram * + H) + This function reads formatted data from the stream STREAM into the + histogram H. The data is assumed to be in the three-column format + used by `gsl_histogram_fprintf'. The histogram H must be + preallocated with the correct length since the function uses the + size of H to determine how many numbers to read. The function + returns 0 for success and `GSL_EFAILED' if there was a problem + reading from the file. + + +File: gsl-ref.info, Node: Resampling from histograms, Next: The histogram probability distribution struct, Prev: Reading and writing histograms, Up: Histograms + +22.9 Resampling from histograms +=============================== + +A histogram made by counting events can be regarded as a measurement of +a probability distribution. Allowing for statistical error, the height +of each bin represents the probability of an event where the value of x +falls in the range of that bin. The probability distribution function +has the one-dimensional form p(x)dx where, + + p(x) = n_i/ (N w_i) + +In this equation n_i is the number of events in the bin which contains +x, w_i is the width of the bin and N is the total number of events. +The distribution of events within each bin is assumed to be uniform. + + +File: gsl-ref.info, Node: The histogram probability distribution struct, Next: Example programs for histograms, Prev: Resampling from histograms, Up: Histograms + +22.10 The histogram probability distribution struct +=================================================== + +The probability distribution function for a histogram consists of a set +of "bins" which measure the probability of an event falling into a +given range of a continuous variable x. A probability distribution +function is defined by the following struct, which actually stores the +cumulative probability distribution function. This is the natural +quantity for generating samples via the inverse transform method, +because there is a one-to-one mapping between the cumulative +probability distribution and the range [0,1]. It can be shown that by +taking a uniform random number in this range and finding its +corresponding coordinate in the cumulative probability distribution we +obtain samples with the desired probability distribution. + + -- Data Type: gsl_histogram_pdf + `size_t n' + This is the number of bins used to approximate the probability + distribution function. + + `double * range' + The ranges of the bins are stored in an array of N+1 elements + pointed to by RANGE. + + `double * sum' + The cumulative probability for the bins is stored in an array + of N elements pointed to by SUM. + +The following functions allow you to create a `gsl_histogram_pdf' +struct which represents this probability distribution and generate +random samples from it. + + -- Function: gsl_histogram_pdf * gsl_histogram_pdf_alloc (size_t N) + This function allocates memory for a probability distribution with + N bins and returns a pointer to a newly initialized + `gsl_histogram_pdf' struct. If insufficient memory is available a + null pointer is returned and the error handler is invoked with an + error code of `GSL_ENOMEM'. + + -- Function: int gsl_histogram_pdf_init (gsl_histogram_pdf * P, const + gsl_histogram * H) + This function initializes the probability distribution P with the + contents of the histogram H. If any of the bins of H are negative + then the error handler is invoked with an error code of `GSL_EDOM' + because a probability distribution cannot contain negative values. + + -- Function: void gsl_histogram_pdf_free (gsl_histogram_pdf * P) + This function frees the probability distribution function P and + all of the memory associated with it. + + -- Function: double gsl_histogram_pdf_sample (const gsl_histogram_pdf + * P, double R) + This function uses R, a uniform random number between zero and + one, to compute a single random sample from the probability + distribution P. The algorithm used to compute the sample s is + given by the following formula, + + s = range[i] + delta * (range[i+1] - range[i]) + + where i is the index which satisfies sum[i] <= r < sum[i+1] and + delta is (r - sum[i])/(sum[i+1] - sum[i]). + + +File: gsl-ref.info, Node: Example programs for histograms, Next: Two dimensional histograms, Prev: The histogram probability distribution struct, Up: Histograms + +22.11 Example programs for histograms +===================================== + +The following program shows how to make a simple histogram of a column +of numerical data supplied on `stdin'. The program takes three +arguments, specifying the upper and lower bounds of the histogram and +the number of bins. It then reads numbers from `stdin', one line at a +time, and adds them to the histogram. When there is no more data to +read it prints out the accumulated histogram using +`gsl_histogram_fprintf'. + + #include + #include + #include + + int + main (int argc, char **argv) + { + double a, b; + size_t n; + + if (argc != 4) + { + printf ("Usage: gsl-histogram xmin xmax n\n" + "Computes a histogram of the data " + "on stdin using n bins from xmin " + "to xmax\n"); + exit (0); + } + + a = atof (argv[1]); + b = atof (argv[2]); + n = atoi (argv[3]); + + { + double x; + gsl_histogram * h = gsl_histogram_alloc (n); + gsl_histogram_set_ranges_uniform (h, a, b); + + while (fscanf (stdin, "%lg", &x) == 1) + { + gsl_histogram_increment (h, x); + } + gsl_histogram_fprintf (stdout, h, "%g", "%g"); + gsl_histogram_free (h); + } + exit (0); + } + +Here is an example of the program in use. We generate 10000 random +samples from a Cauchy distribution with a width of 30 and histogram +them over the range -100 to 100, using 200 bins. + + $ gsl-randist 0 10000 cauchy 30 + | gsl-histogram -100 100 200 > histogram.dat + +A plot of the resulting histogram shows the familiar shape of the +Cauchy distribution and the fluctuations caused by the finite sample +size. + + $ awk '{print $1, $3 ; print $2, $3}' histogram.dat + | graph -T X + + +File: gsl-ref.info, Node: Two dimensional histograms, Next: The 2D histogram struct, Prev: Example programs for histograms, Up: Histograms + +22.12 Two dimensional histograms +================================ + +A two dimensional histogram consists of a set of "bins" which count the +number of events falling in a given area of the (x,y) plane. The +simplest way to use a two dimensional histogram is to record +two-dimensional position information, n(x,y). Another possibility is +to form a "joint distribution" by recording related variables. For +example a detector might record both the position of an event (x) and +the amount of energy it deposited E. These could be histogrammed as +the joint distribution n(x,E). + + +File: gsl-ref.info, Node: The 2D histogram struct, Next: 2D Histogram allocation, Prev: Two dimensional histograms, Up: Histograms + +22.13 The 2D histogram struct +============================= + +Two dimensional histograms are defined by the following struct, + + -- Data Type: gsl_histogram2d + `size_t nx, ny' + This is the number of histogram bins in the x and y + directions. + + `double * xrange' + The ranges of the bins in the x-direction are stored in an + array of NX + 1 elements pointed to by XRANGE. + + `double * yrange' + The ranges of the bins in the y-direction are stored in an + array of NY + 1 elements pointed to by YRANGE. + + `double * bin' + The counts for each bin are stored in an array pointed to by + BIN. The bins are floating-point numbers, so you can + increment them by non-integer values if necessary. The array + BIN stores the two dimensional array of bins in a single + block of memory according to the mapping `bin(i,j)' = `bin[i + * ny + j]'. + +The range for `bin(i,j)' is given by `xrange[i]' to `xrange[i+1]' in +the x-direction and `yrange[j]' to `yrange[j+1]' in the y-direction. +Each bin is inclusive at the lower end and exclusive at the upper end. +Mathematically this means that the bins are defined by the following +inequality, + bin(i,j) corresponds to xrange[i] <= x < xrange[i+1] + and yrange[j] <= y < yrange[j+1] + +Note that any samples which fall on the upper sides of the histogram are +excluded. If you want to include these values for the side bins you +will need to add an extra row or column to your histogram. + + The `gsl_histogram2d' struct and its associated functions are +defined in the header file `gsl_histogram2d.h'. + + +File: gsl-ref.info, Node: 2D Histogram allocation, Next: Copying 2D Histograms, Prev: The 2D histogram struct, Up: Histograms + +22.14 2D Histogram allocation +============================= + +The functions for allocating memory to a 2D histogram follow the style +of `malloc' and `free'. In addition they also perform their own error +checking. If there is insufficient memory available to allocate a +histogram then the functions call the error handler (with an error +number of `GSL_ENOMEM') in addition to returning a null pointer. Thus +if you use the library error handler to abort your program then it +isn't necessary to check every 2D histogram `alloc'. + + -- Function: gsl_histogram2d * gsl_histogram2d_alloc (size_t NX, + size_t NY) + This function allocates memory for a two-dimensional histogram with + NX bins in the x direction and NY bins in the y direction. The + function returns a pointer to a newly created `gsl_histogram2d' + struct. If insufficient memory is available a null pointer is + returned and the error handler is invoked with an error code of + `GSL_ENOMEM'. The bins and ranges must be initialized with one of + the functions below before the histogram is ready for use. + + -- Function: int gsl_histogram2d_set_ranges (gsl_histogram2d * H, + const double XRANGE[], size_t XSIZE, const double YRANGE[], + size_t YSIZE) + This function sets the ranges of the existing histogram H using + the arrays XRANGE and YRANGE of size XSIZE and YSIZE respectively. + The values of the histogram bins are reset to zero. + + -- Function: int gsl_histogram2d_set_ranges_uniform (gsl_histogram2d * + H, double XMIN, double XMAX, double YMIN, double YMAX) + This function sets the ranges of the existing histogram H to cover + the ranges XMIN to XMAX and YMIN to YMAX uniformly. The values of + the histogram bins are reset to zero. + + -- Function: void gsl_histogram2d_free (gsl_histogram2d * H) + This function frees the 2D histogram H and all of the memory + associated with it. + + +File: gsl-ref.info, Node: Copying 2D Histograms, Next: Updating and accessing 2D histogram elements, Prev: 2D Histogram allocation, Up: Histograms + +22.15 Copying 2D Histograms +=========================== + + -- Function: int gsl_histogram2d_memcpy (gsl_histogram2d * DEST, const + gsl_histogram2d * SRC) + This function copies the histogram SRC into the pre-existing + histogram DEST, making DEST into an exact copy of SRC. The two + histograms must be of the same size. + + -- Function: gsl_histogram2d * gsl_histogram2d_clone (const + gsl_histogram2d * SRC) + This function returns a pointer to a newly created histogram which + is an exact copy of the histogram SRC. + + +File: gsl-ref.info, Node: Updating and accessing 2D histogram elements, Next: Searching 2D histogram ranges, Prev: Copying 2D Histograms, Up: Histograms + +22.16 Updating and accessing 2D histogram elements +================================================== + +You can access the bins of a two-dimensional histogram either by +specifying a pair of (x,y) coordinates or by using the bin indices +(i,j) directly. The functions for accessing the histogram through +(x,y) coordinates use binary searches in the x and y directions to +identify the bin which covers the appropriate range. + + -- Function: int gsl_histogram2d_increment (gsl_histogram2d * H, + double X, double Y) + This function updates the histogram H by adding one (1.0) to the + bin whose x and y ranges contain the coordinates (X,Y). + + If the point (x,y) lies inside the valid ranges of the histogram + then the function returns zero to indicate success. If (x,y) lies + outside the limits of the histogram then the function returns + `GSL_EDOM', and none of the bins are modified. The error handler + is not called, since it is often necessary to compute histograms + for a small range of a larger dataset, ignoring any coordinates + outside the range of interest. + + -- Function: int gsl_histogram2d_accumulate (gsl_histogram2d * H, + double X, double Y, double WEIGHT) + This function is similar to `gsl_histogram2d_increment' but + increases the value of the appropriate bin in the histogram H by + the floating-point number WEIGHT. + + -- Function: double gsl_histogram2d_get (const gsl_histogram2d * H, + size_t I, size_t J) + This function returns the contents of the (I,J)-th bin of the + histogram H. If (I,J) lies outside the valid range of indices for + the histogram then the error handler is called with an error code + of `GSL_EDOM' and the function returns 0. + + -- Function: int gsl_histogram2d_get_xrange (const gsl_histogram2d * + H, size_t I, double * XLOWER, double * XUPPER) + -- Function: int gsl_histogram2d_get_yrange (const gsl_histogram2d * + H, size_t J, double * YLOWER, double * YUPPER) + These functions find the upper and lower range limits of the I-th + and J-th bins in the x and y directions of the histogram H. The + range limits are stored in XLOWER and XUPPER or YLOWER and YUPPER. + The lower limits are inclusive (i.e. events with these coordinates + are included in the bin) and the upper limits are exclusive (i.e. + events with the value of the upper limit are not included and fall + in the neighboring higher bin, if it exists). The functions + return 0 to indicate success. If I or J lies outside the valid + range of indices for the histogram then the error handler is + called with an error code of `GSL_EDOM'. + + -- Function: double gsl_histogram2d_xmax (const gsl_histogram2d * H) + -- Function: double gsl_histogram2d_xmin (const gsl_histogram2d * H) + -- Function: size_t gsl_histogram2d_nx (const gsl_histogram2d * H) + -- Function: double gsl_histogram2d_ymax (const gsl_histogram2d * H) + -- Function: double gsl_histogram2d_ymin (const gsl_histogram2d * H) + -- Function: size_t gsl_histogram2d_ny (const gsl_histogram2d * H) + These functions return the maximum upper and minimum lower range + limits and the number of bins for the x and y directions of the + histogram H. They provide a way of determining these values + without accessing the `gsl_histogram2d' struct directly. + + -- Function: void gsl_histogram2d_reset (gsl_histogram2d * H) + This function resets all the bins of the histogram H to zero. + + +File: gsl-ref.info, Node: Searching 2D histogram ranges, Next: 2D Histogram Statistics, Prev: Updating and accessing 2D histogram elements, Up: Histograms + +22.17 Searching 2D histogram ranges +=================================== + +The following functions are used by the access and update routines to +locate the bin which corresponds to a given (x,y) coordinate. + + -- Function: int gsl_histogram2d_find (const gsl_histogram2d * H, + double X, double Y, size_t * I, size_t * J) + This function finds and sets the indices I and J to the to the bin + which covers the coordinates (X,Y). The bin is located using a + binary search. The search includes an optimization for histograms + with uniform ranges, and will return the correct bin immediately + in this case. If (x,y) is found then the function sets the indices + (I,J) and returns `GSL_SUCCESS'. If (x,y) lies outside the valid + range of the histogram then the function returns `GSL_EDOM' and + the error handler is invoked. + + +File: gsl-ref.info, Node: 2D Histogram Statistics, Next: 2D Histogram Operations, Prev: Searching 2D histogram ranges, Up: Histograms + +22.18 2D Histogram Statistics +============================= + + -- Function: double gsl_histogram2d_max_val (const gsl_histogram2d * H) + This function returns the maximum value contained in the histogram + bins. + + -- Function: void gsl_histogram2d_max_bin (const gsl_histogram2d * H, + size_t * I, size_t * J) + This function finds the indices of the bin containing the maximum + value in the histogram H and stores the result in (I,J). In the + case where several bins contain the same maximum value the first + bin found is returned. + + -- Function: double gsl_histogram2d_min_val (const gsl_histogram2d * H) + This function returns the minimum value contained in the histogram + bins. + + -- Function: void gsl_histogram2d_min_bin (const gsl_histogram2d * H, + size_t * I, size_t * J) + This function finds the indices of the bin containing the minimum + value in the histogram H and stores the result in (I,J). In the + case where several bins contain the same maximum value the first + bin found is returned. + + -- Function: double gsl_histogram2d_xmean (const gsl_histogram2d * H) + This function returns the mean of the histogrammed x variable, + where the histogram is regarded as a probability distribution. + Negative bin values are ignored for the purposes of this + calculation. + + -- Function: double gsl_histogram2d_ymean (const gsl_histogram2d * H) + This function returns the mean of the histogrammed y variable, + where the histogram is regarded as a probability distribution. + Negative bin values are ignored for the purposes of this + calculation. + + -- Function: double gsl_histogram2d_xsigma (const gsl_histogram2d * H) + This function returns the standard deviation of the histogrammed x + variable, where the histogram is regarded as a probability + distribution. Negative bin values are ignored for the purposes of + this calculation. + + -- Function: double gsl_histogram2d_ysigma (const gsl_histogram2d * H) + This function returns the standard deviation of the histogrammed y + variable, where the histogram is regarded as a probability + distribution. Negative bin values are ignored for the purposes of + this calculation. + + -- Function: double gsl_histogram2d_cov (const gsl_histogram2d * H) + This function returns the covariance of the histogrammed x and y + variables, where the histogram is regarded as a probability + distribution. Negative bin values are ignored for the purposes of + this calculation. + + -- Function: double gsl_histogram2d_sum (const gsl_histogram2d * H) + This function returns the sum of all bin values. Negative bin + values are included in the sum. + + +File: gsl-ref.info, Node: 2D Histogram Operations, Next: Reading and writing 2D histograms, Prev: 2D Histogram Statistics, Up: Histograms + +22.19 2D Histogram Operations +============================= + + -- Function: int gsl_histogram2d_equal_bins_p (const gsl_histogram2d * + H1, const gsl_histogram2d * H2) + This function returns 1 if all the individual bin ranges of the two + histograms are identical, and 0 otherwise. + + -- Function: int gsl_histogram2d_add (gsl_histogram2d * H1, const + gsl_histogram2d * H2) + This function adds the contents of the bins in histogram H2 to the + corresponding bins of histogram H1, i.e. h'_1(i,j) = h_1(i,j) + + h_2(i,j). The two histograms must have identical bin ranges. + + -- Function: int gsl_histogram2d_sub (gsl_histogram2d * H1, const + gsl_histogram2d * H2) + This function subtracts the contents of the bins in histogram H2 + from the corresponding bins of histogram H1, i.e. h'_1(i,j) = + h_1(i,j) - h_2(i,j). The two histograms must have identical bin + ranges. + + -- Function: int gsl_histogram2d_mul (gsl_histogram2d * H1, const + gsl_histogram2d * H2) + This function multiplies the contents of the bins of histogram H1 + by the contents of the corresponding bins in histogram H2, i.e. + h'_1(i,j) = h_1(i,j) * h_2(i,j). The two histograms must have + identical bin ranges. + + -- Function: int gsl_histogram2d_div (gsl_histogram2d * H1, const + gsl_histogram2d * H2) + This function divides the contents of the bins of histogram H1 by + the contents of the corresponding bins in histogram H2, i.e. + h'_1(i,j) = h_1(i,j) / h_2(i,j). The two histograms must have + identical bin ranges. + + -- Function: int gsl_histogram2d_scale (gsl_histogram2d * H, double + SCALE) + This function multiplies the contents of the bins of histogram H + by the constant SCALE, i.e. h'_1(i,j) = h_1(i,j) scale. + + -- Function: int gsl_histogram2d_shift (gsl_histogram2d * H, double + OFFSET) + This function shifts the contents of the bins of histogram H by + the constant OFFSET, i.e. h'_1(i,j) = h_1(i,j) + offset. + + +File: gsl-ref.info, Node: Reading and writing 2D histograms, Next: Resampling from 2D histograms, Prev: 2D Histogram Operations, Up: Histograms + +22.20 Reading and writing 2D histograms +======================================= + +The library provides functions for reading and writing two dimensional +histograms to a file as binary data or formatted text. + + -- Function: int gsl_histogram2d_fwrite (FILE * STREAM, const + gsl_histogram2d * H) + This function writes the ranges and bins of the histogram H to the + stream STREAM in binary format. The return value is 0 for success + and `GSL_EFAILED' if there was a problem writing to the file. + Since the data is written in the native binary format it may not + be portable between different architectures. + + -- Function: int gsl_histogram2d_fread (FILE * STREAM, gsl_histogram2d + * H) + This function reads into the histogram H from the stream STREAM in + binary format. The histogram H must be preallocated with the + correct size since the function uses the number of x and y bins in + H to determine how many bytes to read. The return value is 0 for + success and `GSL_EFAILED' if there was a problem reading from the + file. The data is assumed to have been written in the native + binary format on the same architecture. + + -- Function: int gsl_histogram2d_fprintf (FILE * STREAM, const + gsl_histogram2d * H, const char * RANGE_FORMAT, const char * + BIN_FORMAT) + This function writes the ranges and bins of the histogram H + line-by-line to the stream STREAM using the format specifiers + RANGE_FORMAT and BIN_FORMAT. These should be one of the `%g', + `%e' or `%f' formats for floating point numbers. The function + returns 0 for success and `GSL_EFAILED' if there was a problem + writing to the file. The histogram output is formatted in five + columns, and the columns are separated by spaces, like this, + + xrange[0] xrange[1] yrange[0] yrange[1] bin(0,0) + xrange[0] xrange[1] yrange[1] yrange[2] bin(0,1) + xrange[0] xrange[1] yrange[2] yrange[3] bin(0,2) + .... + xrange[0] xrange[1] yrange[ny-1] yrange[ny] bin(0,ny-1) + + xrange[1] xrange[2] yrange[0] yrange[1] bin(1,0) + xrange[1] xrange[2] yrange[1] yrange[2] bin(1,1) + xrange[1] xrange[2] yrange[1] yrange[2] bin(1,2) + .... + xrange[1] xrange[2] yrange[ny-1] yrange[ny] bin(1,ny-1) + + .... + + xrange[nx-1] xrange[nx] yrange[0] yrange[1] bin(nx-1,0) + xrange[nx-1] xrange[nx] yrange[1] yrange[2] bin(nx-1,1) + xrange[nx-1] xrange[nx] yrange[1] yrange[2] bin(nx-1,2) + .... + xrange[nx-1] xrange[nx] yrange[ny-1] yrange[ny] bin(nx-1,ny-1) + + Each line contains the lower and upper limits of the bin and the + contents of the bin. Since the upper limits of the each bin are + the lower limits of the neighboring bins there is duplication of + these values but this allows the histogram to be manipulated with + line-oriented tools. + + -- Function: int gsl_histogram2d_fscanf (FILE * STREAM, + gsl_histogram2d * H) + This function reads formatted data from the stream STREAM into the + histogram H. The data is assumed to be in the five-column format + used by `gsl_histogram2d_fprintf'. The histogram H must be + preallocated with the correct lengths since the function uses the + sizes of H to determine how many numbers to read. The function + returns 0 for success and `GSL_EFAILED' if there was a problem + reading from the file. + + +File: gsl-ref.info, Node: Resampling from 2D histograms, Next: Example programs for 2D histograms, Prev: Reading and writing 2D histograms, Up: Histograms + +22.21 Resampling from 2D histograms +=================================== + +As in the one-dimensional case, a two-dimensional histogram made by +counting events can be regarded as a measurement of a probability +distribution. Allowing for statistical error, the height of each bin +represents the probability of an event where (x,y) falls in the range +of that bin. For a two-dimensional histogram the probability +distribution takes the form p(x,y) dx dy where, + + p(x,y) = n_{ij}/ (N A_{ij}) + +In this equation n_{ij} is the number of events in the bin which +contains (x,y), A_{ij} is the area of the bin and N is the total number +of events. The distribution of events within each bin is assumed to be +uniform. + + -- Data Type: gsl_histogram2d_pdf + `size_t nx, ny' + This is the number of histogram bins used to approximate the + probability distribution function in the x and y directions. + + `double * xrange' + The ranges of the bins in the x-direction are stored in an + array of NX + 1 elements pointed to by XRANGE. + + `double * yrange' + The ranges of the bins in the y-direction are stored in an + array of NY + 1 pointed to by YRANGE. + + `double * sum' + The cumulative probability for the bins is stored in an array + of NX*NY elements pointed to by SUM. + +The following functions allow you to create a `gsl_histogram2d_pdf' +struct which represents a two dimensional probability distribution and +generate random samples from it. + + -- Function: gsl_histogram2d_pdf * gsl_histogram2d_pdf_alloc (size_t + NX, size_t NY) + This function allocates memory for a two-dimensional probability + distribution of size NX-by-NY and returns a pointer to a newly + initialized `gsl_histogram2d_pdf' struct. If insufficient memory + is available a null pointer is returned and the error handler is + invoked with an error code of `GSL_ENOMEM'. + + -- Function: int gsl_histogram2d_pdf_init (gsl_histogram2d_pdf * P, + const gsl_histogram2d * H) + This function initializes the two-dimensional probability + distribution calculated P from the histogram H. If any of the + bins of H are negative then the error handler is invoked with an + error code of `GSL_EDOM' because a probability distribution cannot + contain negative values. + + -- Function: void gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * P) + This function frees the two-dimensional probability distribution + function P and all of the memory associated with it. + + -- Function: int gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf + * P, double R1, double R2, double * X, double * Y) + This function uses two uniform random numbers between zero and one, + R1 and R2, to compute a single random sample from the + two-dimensional probability distribution P. + + +File: gsl-ref.info, Node: Example programs for 2D histograms, Prev: Resampling from 2D histograms, Up: Histograms + +22.22 Example programs for 2D histograms +======================================== + +This program demonstrates two features of two-dimensional histograms. +First a 10-by-10 two-dimensional histogram is created with x and y +running from 0 to 1. Then a few sample points are added to the +histogram, at (0.3,0.3) with a height of 1, at (0.8,0.1) with a height +of 5 and at (0.7,0.9) with a height of 0.5. This histogram with three +events is used to generate a random sample of 1000 simulated events, +which are printed out. + + #include + #include + #include + + int + main (void) + { + const gsl_rng_type * T; + gsl_rng * r; + + gsl_histogram2d * h = gsl_histogram2d_alloc (10, 10); + + gsl_histogram2d_set_ranges_uniform (h, + 0.0, 1.0, + 0.0, 1.0); + + gsl_histogram2d_accumulate (h, 0.3, 0.3, 1); + gsl_histogram2d_accumulate (h, 0.8, 0.1, 5); + gsl_histogram2d_accumulate (h, 0.7, 0.9, 0.5); + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + { + int i; + gsl_histogram2d_pdf * p + = gsl_histogram2d_pdf_alloc (h->nx, h->ny); + + gsl_histogram2d_pdf_init (p, h); + + for (i = 0; i < 1000; i++) { + double x, y; + double u = gsl_rng_uniform (r); + double v = gsl_rng_uniform (r); + + gsl_histogram2d_pdf_sample (p, u, v, &x, &y); + + printf ("%g %g\n", x, y); + } + + gsl_histogram2d_pdf_free (p); + } + + gsl_histogram2d_free (h); + gsl_rng_free (r); + + return 0; + } + + + +File: gsl-ref.info, Node: N-tuples, Next: Monte Carlo Integration, Prev: Histograms, Up: Top + +23 N-tuples +*********** + +This chapter describes functions for creating and manipulating +"ntuples", sets of values associated with events. The ntuples are +stored in files. Their values can be extracted in any combination and +"booked" in a histogram using a selection function. + + The values to be stored are held in a user-defined data structure, +and an ntuple is created associating this data structure with a file. +The values are then written to the file (normally inside a loop) using +the ntuple functions described below. + + A histogram can be created from ntuple data by providing a selection +function and a value function. The selection function specifies whether +an event should be included in the subset to be analyzed or not. The +value function computes the entry to be added to the histogram for each +event. + + All the ntuple functions are defined in the header file +`gsl_ntuple.h' + +* Menu: + +* The ntuple struct:: +* Creating ntuples:: +* Opening an existing ntuple file:: +* Writing ntuples:: +* Reading ntuples :: +* Closing an ntuple file:: +* Histogramming ntuple values:: +* Example ntuple programs:: +* Ntuple References and Further Reading:: + + +File: gsl-ref.info, Node: The ntuple struct, Next: Creating ntuples, Up: N-tuples + +23.1 The ntuple struct +====================== + +Ntuples are manipulated using the `gsl_ntuple' struct. This struct +contains information on the file where the ntuple data is stored, a +pointer to the current ntuple data row and the size of the user-defined +ntuple data struct. + + typedef struct { + FILE * file; + void * ntuple_data; + size_t size; + } gsl_ntuple; + + +File: gsl-ref.info, Node: Creating ntuples, Next: Opening an existing ntuple file, Prev: The ntuple struct, Up: N-tuples + +23.2 Creating ntuples +===================== + + -- Function: gsl_ntuple * gsl_ntuple_create (char * FILENAME, void * + NTUPLE_DATA, size_t SIZE) + This function creates a new write-only ntuple file FILENAME for + ntuples of size SIZE and returns a pointer to the newly created + ntuple struct. Any existing file with the same name is truncated + to zero length and overwritten. A pointer to memory for the + current ntuple row NTUPLE_DATA must be supplied--this is used to + copy ntuples in and out of the file. + + +File: gsl-ref.info, Node: Opening an existing ntuple file, Next: Writing ntuples, Prev: Creating ntuples, Up: N-tuples + +23.3 Opening an existing ntuple file +==================================== + + -- Function: gsl_ntuple * gsl_ntuple_open (char * FILENAME, void * + NTUPLE_DATA, size_t SIZE) + This function opens an existing ntuple file FILENAME for reading + and returns a pointer to a corresponding ntuple struct. The + ntuples in the file must have size SIZE. A pointer to memory for + the current ntuple row NTUPLE_DATA must be supplied--this is used + to copy ntuples in and out of the file. + + +File: gsl-ref.info, Node: Writing ntuples, Next: Reading ntuples, Prev: Opening an existing ntuple file, Up: N-tuples + +23.4 Writing ntuples +==================== + + -- Function: int gsl_ntuple_write (gsl_ntuple * NTUPLE) + This function writes the current ntuple NTUPLE->NTUPLE_DATA of + size NTUPLE->SIZE to the corresponding file. + + -- Function: int gsl_ntuple_bookdata (gsl_ntuple * NTUPLE) + This function is a synonym for `gsl_ntuple_write'. + + +File: gsl-ref.info, Node: Reading ntuples, Next: Closing an ntuple file, Prev: Writing ntuples, Up: N-tuples + +23.5 Reading ntuples +==================== + + -- Function: int gsl_ntuple_read (gsl_ntuple * NTUPLE) + This function reads the current row of the ntuple file for NTUPLE + and stores the values in NTUPLE->DATA. + + +File: gsl-ref.info, Node: Closing an ntuple file, Next: Histogramming ntuple values, Prev: Reading ntuples, Up: N-tuples + +23.6 Closing an ntuple file +=========================== + + -- Function: int gsl_ntuple_close (gsl_ntuple * NTUPLE) + This function closes the ntuple file NTUPLE and frees its + associated allocated memory. + + +File: gsl-ref.info, Node: Histogramming ntuple values, Next: Example ntuple programs, Prev: Closing an ntuple file, Up: N-tuples + +23.7 Histogramming ntuple values +================================ + +Once an ntuple has been created its contents can be histogrammed in +various ways using the function `gsl_ntuple_project'. Two user-defined +functions must be provided, a function to select events and a function +to compute scalar values. The selection function and the value function +both accept the ntuple row as a first argument and other parameters as +a second argument. + + The "selection function" determines which ntuple rows are selected +for histogramming. It is defined by the following struct, + + typedef struct { + int (* function) (void * ntuple_data, void * params); + void * params; + } gsl_ntuple_select_fn; + +The struct component FUNCTION should return a non-zero value for each +ntuple row that is to be included in the histogram. + + The "value function" computes scalar values for those ntuple rows +selected by the selection function, + + typedef struct { + double (* function) (void * ntuple_data, void * params); + void * params; + } gsl_ntuple_value_fn; + +In this case the struct component FUNCTION should return the value to +be added to the histogram for the ntuple row. + + -- Function: int gsl_ntuple_project (gsl_histogram * H, gsl_ntuple * + NTUPLE, gsl_ntuple_value_fn * VALUE_FUNC, + gsl_ntuple_select_fn * SELECT_FUNC) + This function updates the histogram H from the ntuple NTUPLE using + the functions VALUE_FUNC and SELECT_FUNC. For each ntuple row + where the selection function SELECT_FUNC is non-zero the + corresponding value of that row is computed using the function + VALUE_FUNC and added to the histogram. Those ntuple rows where + SELECT_FUNC returns zero are ignored. New entries are added to + the histogram, so subsequent calls can be used to accumulate + further data in the same histogram. + + +File: gsl-ref.info, Node: Example ntuple programs, Next: Ntuple References and Further Reading, Prev: Histogramming ntuple values, Up: N-tuples + +23.8 Examples +============= + +The following example programs demonstrate the use of ntuples in +managing a large dataset. The first program creates a set of 10,000 +simulated "events", each with 3 associated values (x,y,z). These are +generated from a Gaussian distribution with unit variance, for +demonstration purposes, and written to the ntuple file `test.dat'. + + #include + #include + #include + + struct data + { + double x; + double y; + double z; + }; + + int + main (void) + { + const gsl_rng_type * T; + gsl_rng * r; + + struct data ntuple_row; + int i; + + gsl_ntuple *ntuple + = gsl_ntuple_create ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (i = 0; i < 10000; i++) + { + ntuple_row.x = gsl_ran_ugaussian (r); + ntuple_row.y = gsl_ran_ugaussian (r); + ntuple_row.z = gsl_ran_ugaussian (r); + + gsl_ntuple_write (ntuple); + } + + gsl_ntuple_close (ntuple); + gsl_rng_free (r); + + return 0; + } + +The next program analyses the ntuple data in the file `test.dat'. The +analysis procedure is to compute the squared-magnitude of each event, +E^2=x^2+y^2+z^2, and select only those which exceed a lower limit of +1.5. The selected events are then histogrammed using their E^2 values. + + #include + #include + #include + + struct data + { + double x; + double y; + double z; + }; + + int sel_func (void *ntuple_data, void *params); + double val_func (void *ntuple_data, void *params); + + int + main (void) + { + struct data ntuple_row; + + gsl_ntuple *ntuple + = gsl_ntuple_open ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + double lower = 1.5; + + gsl_ntuple_select_fn S; + gsl_ntuple_value_fn V; + + gsl_histogram *h = gsl_histogram_alloc (100); + gsl_histogram_set_ranges_uniform(h, 0.0, 10.0); + + S.function = &sel_func; + S.params = &lower; + + V.function = &val_func; + V.params = 0; + + gsl_ntuple_project (h, ntuple, &V, &S); + gsl_histogram_fprintf (stdout, h, "%f", "%f"); + gsl_histogram_free (h); + gsl_ntuple_close (ntuple); + + return 0; + } + + int + sel_func (void *ntuple_data, void *params) + { + struct data * data = (struct data *) ntuple_data; + double x, y, z, E2, scale; + scale = *(double *) params; + + x = data->x; + y = data->y; + z = data->z; + + E2 = x * x + y * y + z * z; + + return E2 > scale; + } + + double + val_func (void *ntuple_data, void *params) + { + struct data * data = (struct data *) ntuple_data; + double x, y, z; + + x = data->x; + y = data->y; + z = data->z; + + return x * x + y * y + z * z; + } + + The following plot shows the distribution of the selected events. +Note the cut-off at the lower bound. + + +File: gsl-ref.info, Node: Ntuple References and Further Reading, Prev: Example ntuple programs, Up: N-tuples + +23.9 References and Further Reading +=================================== + +Further information on the use of ntuples can be found in the +documentation for the CERN packages PAW and HBOOK (available online). + + +File: gsl-ref.info, Node: Monte Carlo Integration, Next: Simulated Annealing, Prev: N-tuples, Up: Top + +24 Monte Carlo Integration +************************** + +This chapter describes routines for multidimensional Monte Carlo +integration. These include the traditional Monte Carlo method and +adaptive algorithms such as VEGAS and MISER which use importance +sampling and stratified sampling techniques. Each algorithm computes an +estimate of a multidimensional definite integral of the form, + + I = \int_xl^xu dx \int_yl^yu dy ... f(x, y, ...) + +over a hypercubic region ((x_l,x_u), (y_l,y_u), ...) using a fixed +number of function calls. The routines also provide a statistical +estimate of the error on the result. This error estimate should be +taken as a guide rather than as a strict error bound--random sampling +of the region may not uncover all the important features of the +function, resulting in an underestimate of the error. + + The functions are defined in separate header files for each routine, +`gsl_monte_plain.h', `gsl_monte_miser.h' and `gsl_monte_vegas.h'. + +* Menu: + +* Monte Carlo Interface:: +* PLAIN Monte Carlo:: +* MISER:: +* VEGAS:: +* Monte Carlo Examples:: +* Monte Carlo Integration References and Further Reading:: + + +File: gsl-ref.info, Node: Monte Carlo Interface, Next: PLAIN Monte Carlo, Up: Monte Carlo Integration + +24.1 Interface +============== + +All of the Monte Carlo integration routines use the same general form of +interface. There is an allocator to allocate memory for control +variables and workspace, a routine to initialize those control +variables, the integrator itself, and a function to free the space when +done. + + Each integration function requires a random number generator to be +supplied, and returns an estimate of the integral and its standard +deviation. The accuracy of the result is determined by the number of +function calls specified by the user. If a known level of accuracy is +required this can be achieved by calling the integrator several times +and averaging the individual results until the desired accuracy is +obtained. + + Random sample points used within the Monte Carlo routines are always +chosen strictly within the integration region, so that endpoint +singularities are automatically avoided. + + The function to be integrated has its own datatype, defined in the +header file `gsl_monte.h'. + + -- Data Type: gsl_monte_function + This data type defines a general function with parameters for Monte + Carlo integration. + + `double (* f) (double * X, size_t DIM, void * PARAMS)' + this function should return the value f(x,params) for the + argument X and parameters PARAMS, where X is an array of size + DIM giving the coordinates of the point where the function is + to be evaluated. + + `size_t dim' + the number of dimensions for X. + + `void * params' + a pointer to the parameters of the function. + +Here is an example for a quadratic function in two dimensions, + + f(x,y) = a x^2 + b x y + c y^2 + +with a = 3, b = 2, c = 1. The following code defines a +`gsl_monte_function' `F' which you could pass to an integrator: + + struct my_f_params { double a; double b; double c; }; + + double + my_f (double x[], size_t dim, void * p) { + struct my_f_params * fp = (struct my_f_params *)p; + + if (dim != 2) + { + fprintf (stderr, "error: dim != 2"); + abort (); + } + + return fp->a * x[0] * x[0] + + fp->b * x[0] * x[1] + + fp->c * x[1] * x[1]; + } + + gsl_monte_function F; + struct my_f_params params = { 3.0, 2.0, 1.0 }; + + F.f = &my_f; + F.dim = 2; + F.params = ¶ms; + +The function f(x) can be evaluated using the following macro, + + #define GSL_MONTE_FN_EVAL(F,x) + (*((F)->f))(x,(F)->dim,(F)->params) + + +File: gsl-ref.info, Node: PLAIN Monte Carlo, Next: MISER, Prev: Monte Carlo Interface, Up: Monte Carlo Integration + +24.2 PLAIN Monte Carlo +====================== + +The plain Monte Carlo algorithm samples points randomly from the +integration region to estimate the integral and its error. Using this +algorithm the estimate of the integral E(f; N) for N randomly +distributed points x_i is given by, + + E(f; N) = = V = (V / N) \sum_i^N f(x_i) + +where V is the volume of the integration region. The error on this +estimate \sigma(E;N) is calculated from the estimated variance of the +mean, + + \sigma^2 (E; N) = (V^2 / N^2) \sum_i^N (f(x_i) - )^2. + +For large N this variance decreases asymptotically as \Var(f)/N, where +\Var(f) is the true variance of the function over the integration +region. The error estimate itself should decrease as +\sigma(f)/\sqrt{N}. The familiar law of errors decreasing as +1/\sqrt{N} applies--to reduce the error by a factor of 10 requires a +100-fold increase in the number of sample points. + + The functions described in this section are declared in the header +file `gsl_monte_plain.h'. + + -- Function: gsl_monte_plain_state * gsl_monte_plain_alloc (size_t DIM) + This function allocates and initializes a workspace for Monte Carlo + integration in DIM dimensions. + + -- Function: int gsl_monte_plain_init (gsl_monte_plain_state* S) + This function initializes a previously allocated integration state. + This allows an existing workspace to be reused for different + integrations. + + -- Function: int gsl_monte_plain_integrate (gsl_monte_function * F, + const double XL[], const double XU[], size_t DIM, size_t + CALLS, gsl_rng * R, gsl_monte_plain_state * S, double * + RESULT, double * ABSERR) + This routines uses the plain Monte Carlo algorithm to integrate the + function F over the DIM-dimensional hypercubic region defined by + the lower and upper limits in the arrays XL and XU, each of size + DIM. The integration uses a fixed number of function calls CALLS, + and obtains random sampling points using the random number + generator R. A previously allocated workspace S must be supplied. + The result of the integration is returned in RESULT, with an + estimated absolute error ABSERR. + + -- Function: void gsl_monte_plain_free (gsl_monte_plain_state * S) + This function frees the memory associated with the integrator state + S. + + +File: gsl-ref.info, Node: MISER, Next: VEGAS, Prev: PLAIN Monte Carlo, Up: Monte Carlo Integration + +24.3 MISER +========== + +The MISER algorithm of Press and Farrar is based on recursive +stratified sampling. This technique aims to reduce the overall +integration error by concentrating integration points in the regions of +highest variance. + + The idea of stratified sampling begins with the observation that for +two disjoint regions a and b with Monte Carlo estimates of the integral +E_a(f) and E_b(f) and variances \sigma_a^2(f) and \sigma_b^2(f), the +variance \Var(f) of the combined estimate E(f) = (1/2) (E_a(f) + E_b(f)) +is given by, + + \Var(f) = (\sigma_a^2(f) / 4 N_a) + (\sigma_b^2(f) / 4 N_b). + +It can be shown that this variance is minimized by distributing the +points such that, + + N_a / (N_a + N_b) = \sigma_a / (\sigma_a + \sigma_b). + +Hence the smallest error estimate is obtained by allocating sample +points in proportion to the standard deviation of the function in each +sub-region. + + The MISER algorithm proceeds by bisecting the integration region +along one coordinate axis to give two sub-regions at each step. The +direction is chosen by examining all d possible bisections and +selecting the one which will minimize the combined variance of the two +sub-regions. The variance in the sub-regions is estimated by sampling +with a fraction of the total number of points available to the current +step. The same procedure is then repeated recursively for each of the +two half-spaces from the best bisection. The remaining sample points are +allocated to the sub-regions using the formula for N_a and N_b. This +recursive allocation of integration points continues down to a +user-specified depth where each sub-region is integrated using a plain +Monte Carlo estimate. These individual values and their error +estimates are then combined upwards to give an overall result and an +estimate of its error. + + The functions described in this section are declared in the header +file `gsl_monte_miser.h'. + + -- Function: gsl_monte_miser_state * gsl_monte_miser_alloc (size_t DIM) + This function allocates and initializes a workspace for Monte Carlo + integration in DIM dimensions. The workspace is used to maintain + the state of the integration. + + -- Function: int gsl_monte_miser_init (gsl_monte_miser_state* S) + This function initializes a previously allocated integration state. + This allows an existing workspace to be reused for different + integrations. + + -- Function: int gsl_monte_miser_integrate (gsl_monte_function * F, + const double XL[], const double XU[], size_t DIM, size_t + CALLS, gsl_rng * R, gsl_monte_miser_state * S, double * + RESULT, double * ABSERR) + This routines uses the MISER Monte Carlo algorithm to integrate the + function F over the DIM-dimensional hypercubic region defined by + the lower and upper limits in the arrays XL and XU, each of size + DIM. The integration uses a fixed number of function calls CALLS, + and obtains random sampling points using the random number + generator R. A previously allocated workspace S must be supplied. + The result of the integration is returned in RESULT, with an + estimated absolute error ABSERR. + + -- Function: void gsl_monte_miser_free (gsl_monte_miser_state * S) + This function frees the memory associated with the integrator state + S. + + The MISER algorithm has several configurable parameters which can be +changed using the following two functions.(1) + + -- Function: void gsl_monte_miser_params_get (const + gsl_monte_miser_state * S, gsl_monte_miser_params * PARAMS) + This function copies the parameters of the integrator state into + the user-supplied PARAMS structure. + + -- Function: void gsl_monte_miser_params_set (gsl_monte_miser_state * + S, const gsl_monte_miser_params * PARAMS) + This function sets the integrator parameters based on values + provided in the PARAMS structure. + + Typically the values of the parameters are first read using +`gsl_monte_miser_params_get', the necessary changes are made to the +fields of the PARAMS structure, and the values are copied back into the +integrator state using `gsl_monte_miser_params_set'. The functions use +the `gsl_monte_miser_params' structure which contains the following +fields: + + -- Variable: double estimate_frac + This parameter specifies the fraction of the currently available + number of function calls which are allocated to estimating the + variance at each recursive step. The default value is 0.1. + + -- Variable: size_t min_calls + This parameter specifies the minimum number of function calls + required for each estimate of the variance. If the number of + function calls allocated to the estimate using ESTIMATE_FRAC falls + below MIN_CALLS then MIN_CALLS are used instead. This ensures + that each estimate maintains a reasonable level of accuracy. The + default value of MIN_CALLS is `16 * dim'. + + -- Variable: size_t min_calls_per_bisection + This parameter specifies the minimum number of function calls + required to proceed with a bisection step. When a recursive step + has fewer calls available than MIN_CALLS_PER_BISECTION it performs + a plain Monte Carlo estimate of the current sub-region and + terminates its branch of the recursion. The default value of this + parameter is `32 * min_calls'. + + -- Variable: double alpha + This parameter controls how the estimated variances for the two + sub-regions of a bisection are combined when allocating points. + With recursive sampling the overall variance should scale better + than 1/N, since the values from the sub-regions will be obtained + using a procedure which explicitly minimizes their variance. To + accommodate this behavior the MISER algorithm allows the total + variance to depend on a scaling parameter \alpha, + + \Var(f) = {\sigma_a \over N_a^\alpha} + {\sigma_b \over N_b^\alpha}. + + The authors of the original paper describing MISER recommend the + value \alpha = 2 as a good choice, obtained from numerical + experiments, and this is used as the default value in this + implementation. + + -- Variable: double dither + This parameter introduces a random fractional variation of size + DITHER into each bisection, which can be used to break the + symmetry of integrands which are concentrated near the exact + center of the hypercubic integration region. The default value of + dither is zero, so no variation is introduced. If needed, a + typical value of DITHER is 0.1. + + ---------- Footnotes ---------- + + (1) The previous method of accessing these fields directly through +the `gsl_monte_miser_state' struct is now deprecated. + + +File: gsl-ref.info, Node: VEGAS, Next: Monte Carlo Examples, Prev: MISER, Up: Monte Carlo Integration + +24.4 VEGAS +========== + +The VEGAS algorithm of Lepage is based on importance sampling. It +samples points from the probability distribution described by the +function |f|, so that the points are concentrated in the regions that +make the largest contribution to the integral. + + In general, if the Monte Carlo integral of f is sampled with points +distributed according to a probability distribution described by the +function g, we obtain an estimate E_g(f; N), + + E_g(f; N) = E(f/g; N) + +with a corresponding variance, + + \Var_g(f; N) = \Var(f/g; N). + +If the probability distribution is chosen as g = |f|/I(|f|) then it can +be shown that the variance V_g(f; N) vanishes, and the error in the +estimate will be zero. In practice it is not possible to sample from +the exact distribution g for an arbitrary function, so importance +sampling algorithms aim to produce efficient approximations to the +desired distribution. + + The VEGAS algorithm approximates the exact distribution by making a +number of passes over the integration region while histogramming the +function f. Each histogram is used to define a sampling distribution +for the next pass. Asymptotically this procedure converges to the +desired distribution. In order to avoid the number of histogram bins +growing like K^d the probability distribution is approximated by a +separable function: g(x_1, x_2, ...) = g_1(x_1) g_2(x_2) ... so that +the number of bins required is only Kd. This is equivalent to locating +the peaks of the function from the projections of the integrand onto +the coordinate axes. The efficiency of VEGAS depends on the validity +of this assumption. It is most efficient when the peaks of the +integrand are well-localized. If an integrand can be rewritten in a +form which is approximately separable this will increase the efficiency +of integration with VEGAS. + + VEGAS incorporates a number of additional features, and combines both +stratified sampling and importance sampling. The integration region is +divided into a number of "boxes", with each box getting a fixed number +of points (the goal is 2). Each box can then have a fractional number +of bins, but if the ratio of bins-per-box is less than two, Vegas +switches to a kind variance reduction (rather than importance sampling). + + -- Function: gsl_monte_vegas_state * gsl_monte_vegas_alloc (size_t DIM) + This function allocates and initializes a workspace for Monte Carlo + integration in DIM dimensions. The workspace is used to maintain + the state of the integration. + + -- Function: int gsl_monte_vegas_init (gsl_monte_vegas_state* S) + This function initializes a previously allocated integration state. + This allows an existing workspace to be reused for different + integrations. + + -- Function: int gsl_monte_vegas_integrate (gsl_monte_function * F, + double XL[], double XU[], size_t DIM, size_t CALLS, gsl_rng * + R, gsl_monte_vegas_state * S, double * RESULT, double * + ABSERR) + This routines uses the VEGAS Monte Carlo algorithm to integrate the + function F over the DIM-dimensional hypercubic region defined by + the lower and upper limits in the arrays XL and XU, each of size + DIM. The integration uses a fixed number of function calls CALLS, + and obtains random sampling points using the random number + generator R. A previously allocated workspace S must be supplied. + The result of the integration is returned in RESULT, with an + estimated absolute error ABSERR. The result and its error + estimate are based on a weighted average of independent samples. + The chi-squared per degree of freedom for the weighted average is + returned via the state struct component, S->CHISQ, and must be + consistent with 1 for the weighted average to be reliable. + + -- Function: void gsl_monte_vegas_free (gsl_monte_vegas_state * S) + This function frees the memory associated with the integrator state + S. + + The VEGAS algorithm computes a number of independent estimates of the +integral internally, according to the `iterations' parameter described +below, and returns their weighted average. Random sampling of the +integrand can occasionally produce an estimate where the error is zero, +particularly if the function is constant in some regions. An estimate +with zero error causes the weighted average to break down and must be +handled separately. In the original Fortran implementations of VEGAS +the error estimate is made non-zero by substituting a small value +(typically `1e-30'). The implementation in GSL differs from this and +avoids the use of an arbitrary constant--it either assigns the value a +weight which is the average weight of the preceding estimates or +discards it according to the following procedure, + +current estimate has zero error, weighted average has finite error + The current estimate is assigned a weight which is the average + weight of the preceding estimates. + +current estimate has finite error, previous estimates had zero error + The previous estimates are discarded and the weighted averaging + procedure begins with the current estimate. + +current estimate has zero error, previous estimates had zero error + The estimates are averaged using the arithmetic mean, but no error + is computed. + + The convergence of the algorithm can be tested using the overall +chi-squared value of the results, which is available from the following +function: + + -- Function: double gsl_monte_vegas_chisq (const gsl_monte_vegas_state + * S) + This function returns the chi-squared per degree of freedom for the + weighted estimate of the integral. The returned value should be + close to 1. A value which differs significantly from 1 indicates + that the values from different iterations are inconsistent. In + this case the weighted error will be under-estimated, and further + iterations of the algorithm are needed to obtain reliable results. + + -- Function: void gsl_monte_vegas_runval (const gsl_monte_vegas_state + * S, double * RESULT, double * SIGMA) + This function returns the raw (unaveraged) values of the integral + RESULT and its error SIGMA from the most recent iteration of the + algorithm. + + The VEGAS algorithm is highly configurable. Several parameters can +be changed using the following two functions. + + -- Function: void gsl_monte_vegas_params_get (const + gsl_monte_vegas_state * S, gsl_monte_vegas_params * PARAMS) + This function copies the parameters of the integrator state into + the user-supplied PARAMS structure. + + -- Function: void gsl_monte_vegas_params_set (gsl_monte_vegas_state * + S, const gsl_monte_vegas_params * PARAMS) + This function sets the integrator parameters based on values + provided in the PARAMS structure. + + Typically the values of the parameters are first read using +`gsl_monte_vegas_params_get', the necessary changes are made to the +fields of the PARAMS structure, and the values are copied back into the +integrator state using `gsl_monte_vegas_params_set'. The functions use +the `gsl_monte_vegas_params' structure which contains the following +fields: + + -- Variable: double alpha + The parameter `alpha' controls the stiffness of the rebinning + algorithm. It is typically set between one and two. A value of + zero prevents rebinning of the grid. The default value is 1.5. + + -- Variable: size_t iterations + The number of iterations to perform for each call to the routine. + The default value is 5 iterations. + + -- Variable: int stage + Setting this determines the "stage" of the calculation. Normally, + `stage = 0' which begins with a new uniform grid and empty weighted + average. Calling VEGAS with `stage = 1' retains the grid from the + previous run but discards the weighted average, so that one can + "tune" the grid using a relatively small number of points and then + do a large run with `stage = 1' on the optimized grid. Setting + `stage = 2' keeps the grid and the weighted average from the + previous run, but may increase (or decrease) the number of + histogram bins in the grid depending on the number of calls + available. Choosing `stage = 3' enters at the main loop, so that + nothing is changed, and is equivalent to performing additional + iterations in a previous call. + + -- Variable: int mode + The possible choices are `GSL_VEGAS_MODE_IMPORTANCE', + `GSL_VEGAS_MODE_STRATIFIED', `GSL_VEGAS_MODE_IMPORTANCE_ONLY'. + This determines whether VEGAS will use importance sampling or + stratified sampling, or whether it can pick on its own. In low + dimensions VEGAS uses strict stratified sampling (more precisely, + stratified sampling is chosen if there are fewer than 2 bins per + box). + + -- Variable: int verbose + -- Variable: FILE * ostream + These parameters set the level of information printed by VEGAS. All + information is written to the stream OSTREAM. The default setting + of VERBOSE is `-1', which turns off all output. A VERBOSE value + of `0' prints summary information about the weighted average and + final result, while a value of `1' also displays the grid + coordinates. A value of `2' prints information from the rebinning + procedure for each iteration. + + The above fields and the CHISQ value can also be accessed directly +in the `gsl_monte_vegas_state' but such use is deprecated. + + +File: gsl-ref.info, Node: Monte Carlo Examples, Next: Monte Carlo Integration References and Further Reading, Prev: VEGAS, Up: Monte Carlo Integration + +24.5 Examples +============= + +The example program below uses the Monte Carlo routines to estimate the +value of the following 3-dimensional integral from the theory of random +walks, + + I = \int_{-pi}^{+pi} {dk_x/(2 pi)} + \int_{-pi}^{+pi} {dk_y/(2 pi)} + \int_{-pi}^{+pi} {dk_z/(2 pi)} + 1 / (1 - cos(k_x)cos(k_y)cos(k_z)). + +The analytic value of this integral can be shown to be I = +\Gamma(1/4)^4/(4 \pi^3) = 1.393203929685676859.... The integral gives +the mean time spent at the origin by a random walk on a body-centered +cubic lattice in three dimensions. + + For simplicity we will compute the integral over the region (0,0,0) +to (\pi,\pi,\pi) and multiply by 8 to obtain the full result. The +integral is slowly varying in the middle of the region but has +integrable singularities at the corners (0,0,0), (0,\pi,\pi), +(\pi,0,\pi) and (\pi,\pi,0). The Monte Carlo routines only select +points which are strictly within the integration region and so no +special measures are needed to avoid these singularities. + + #include + #include + #include + #include + #include + #include + + /* Computation of the integral, + + I = int (dx dy dz)/(2pi)^3 1/(1-cos(x)cos(y)cos(z)) + + over (-pi,-pi,-pi) to (+pi, +pi, +pi). The exact answer + is Gamma(1/4)^4/(4 pi^3). This example is taken from + C.Itzykson, J.M.Drouffe, "Statistical Field Theory - + Volume 1", Section 1.1, p21, which cites the original + paper M.L.Glasser, I.J.Zucker, Proc.Natl.Acad.Sci.USA 74 + 1800 (1977) */ + + /* For simplicity we compute the integral over the region + (0,0,0) -> (pi,pi,pi) and multiply by 8 */ + + double exact = 1.3932039296856768591842462603255; + + double + g (double *k, size_t dim, void *params) + { + double A = 1.0 / (M_PI * M_PI * M_PI); + return A / (1.0 - cos (k[0]) * cos (k[1]) * cos (k[2])); + } + + void + display_results (char *title, double result, double error) + { + printf ("%s ==================\n", title); + printf ("result = % .6f\n", result); + printf ("sigma = % .6f\n", error); + printf ("exact = % .6f\n", exact); + printf ("error = % .6f = %.2g sigma\n", result - exact, + fabs (result - exact) / error); + } + + int + main (void) + { + double res, err; + + double xl[3] = { 0, 0, 0 }; + double xu[3] = { M_PI, M_PI, M_PI }; + + const gsl_rng_type *T; + gsl_rng *r; + + gsl_monte_function G = { &g, 3, 0 }; + + size_t calls = 500000; + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + { + gsl_monte_plain_state *s = gsl_monte_plain_alloc (3); + gsl_monte_plain_integrate (&G, xl, xu, 3, calls, r, s, + &res, &err); + gsl_monte_plain_free (s); + + display_results ("plain", res, err); + } + + { + gsl_monte_miser_state *s = gsl_monte_miser_alloc (3); + gsl_monte_miser_integrate (&G, xl, xu, 3, calls, r, s, + &res, &err); + gsl_monte_miser_free (s); + + display_results ("miser", res, err); + } + + { + gsl_monte_vegas_state *s = gsl_monte_vegas_alloc (3); + + gsl_monte_vegas_integrate (&G, xl, xu, 3, 10000, r, s, + &res, &err); + display_results ("vegas warm-up", res, err); + + printf ("converging...\n"); + + do + { + gsl_monte_vegas_integrate (&G, xl, xu, 3, calls/5, r, s, + &res, &err); + printf ("result = % .6f sigma = % .6f " + "chisq/dof = %.1f\n", res, err, gsl_monte_vegas_chisq (s)); + } + while (fabs (gsl_monte_vegas_chisq (s) - 1.0) > 0.5); + + display_results ("vegas final", res, err); + + gsl_monte_vegas_free (s); + } + + gsl_rng_free (r); + + return 0; + } + +With 500,000 function calls the plain Monte Carlo algorithm achieves a +fractional error of 1%. The estimated error `sigma' is roughly +consistent with the actual error-the computed result differs from the +true result by about 1.4 standard deviations, + + plain ================== + result = 1.412209 + sigma = 0.013436 + exact = 1.393204 + error = 0.019005 = 1.4 sigma + +The MISER algorithm reduces the error by a factor of four, and also +correctly estimates the error, + + miser ================== + result = 1.391322 + sigma = 0.003461 + exact = 1.393204 + error = -0.001882 = 0.54 sigma + +In the case of the VEGAS algorithm the program uses an initial warm-up +run of 10,000 function calls to prepare, or "warm up", the grid. This +is followed by a main run with five iterations of 100,000 function +calls. The chi-squared per degree of freedom for the five iterations are +checked for consistency with 1, and the run is repeated if the results +have not converged. In this case the estimates are consistent on the +first pass. + + vegas warm-up ================== + result = 1.392673 + sigma = 0.003410 + exact = 1.393204 + error = -0.000531 = 0.16 sigma + converging... + result = 1.393281 sigma = 0.000362 chisq/dof = 1.5 + vegas final ================== + result = 1.393281 + sigma = 0.000362 + exact = 1.393204 + error = 0.000077 = 0.21 sigma + +If the value of `chisq' had differed significantly from 1 it would +indicate inconsistent results, with a correspondingly underestimated +error. The final estimate from VEGAS (using a similar number of +function calls) is significantly more accurate than the other two +algorithms. + + +File: gsl-ref.info, Node: Monte Carlo Integration References and Further Reading, Prev: Monte Carlo Examples, Up: Monte Carlo Integration + +24.6 References and Further Reading +=================================== + +The MISER algorithm is described in the following article by Press and +Farrar, + + W.H. Press, G.R. Farrar, `Recursive Stratified Sampling for + Multidimensional Monte Carlo Integration', Computers in Physics, + v4 (1990), pp190-195. + +The VEGAS algorithm is described in the following papers, + + G.P. Lepage, `A New Algorithm for Adaptive Multidimensional + Integration', Journal of Computational Physics 27, 192-203, (1978) + + G.P. Lepage, `VEGAS: An Adaptive Multi-dimensional Integration + Program', Cornell preprint CLNS 80-447, March 1980 + + +File: gsl-ref.info, Node: Simulated Annealing, Next: Ordinary Differential Equations, Prev: Monte Carlo Integration, Up: Top + +25 Simulated Annealing +********************** + +Stochastic search techniques are used when the structure of a space is +not well understood or is not smooth, so that techniques like Newton's +method (which requires calculating Jacobian derivative matrices) cannot +be used. In particular, these techniques are frequently used to solve +combinatorial optimization problems, such as the traveling salesman +problem. + + The goal is to find a point in the space at which a real valued +"energy function" (or "cost function") is minimized. Simulated +annealing is a minimization technique which has given good results in +avoiding local minima; it is based on the idea of taking a random walk +through the space at successively lower temperatures, where the +probability of taking a step is given by a Boltzmann distribution. + + The functions described in this chapter are declared in the header +file `gsl_siman.h'. + +* Menu: + +* Simulated Annealing algorithm:: +* Simulated Annealing functions:: +* Examples with Simulated Annealing:: +* Simulated Annealing References and Further Reading:: + + +File: gsl-ref.info, Node: Simulated Annealing algorithm, Next: Simulated Annealing functions, Up: Simulated Annealing + +25.1 Simulated Annealing algorithm +================================== + +The simulated annealing algorithm takes random walks through the problem +space, looking for points with low energies; in these random walks, the +probability of taking a step is determined by the Boltzmann +distribution, + + p = e^{-(E_{i+1} - E_i)/(kT)} + +if E_{i+1} > E_i, and p = 1 when E_{i+1} <= E_i. + + In other words, a step will occur if the new energy is lower. If +the new energy is higher, the transition can still occur, and its +likelihood is proportional to the temperature T and inversely +proportional to the energy difference E_{i+1} - E_i. + + The temperature T is initially set to a high value, and a random +walk is carried out at that temperature. Then the temperature is +lowered very slightly according to a "cooling schedule", for example: T +-> T/mu_T where \mu_T is slightly greater than 1. + + The slight probability of taking a step that gives higher energy is +what allows simulated annealing to frequently get out of local minima. + + +File: gsl-ref.info, Node: Simulated Annealing functions, Next: Examples with Simulated Annealing, Prev: Simulated Annealing algorithm, Up: Simulated Annealing + +25.2 Simulated Annealing functions +================================== + + -- Function: void gsl_siman_solve (const gsl_rng * R, void * X0_P, + gsl_siman_Efunc_t EF, gsl_siman_step_t TAKE_STEP, + gsl_siman_metric_t DISTANCE, gsl_siman_print_t + PRINT_POSITION, gsl_siman_copy_t COPYFUNC, + gsl_siman_copy_construct_t COPY_CONSTRUCTOR, + gsl_siman_destroy_t DESTRUCTOR, size_t ELEMENT_SIZE, + gsl_siman_params_t PARAMS) + This function performs a simulated annealing search through a given + space. The space is specified by providing the functions EF and + DISTANCE. The simulated annealing steps are generated using the + random number generator R and the function TAKE_STEP. + + The starting configuration of the system should be given by X0_P. + The routine offers two modes for updating configurations, a + fixed-size mode and a variable-size mode. In the fixed-size mode + the configuration is stored as a single block of memory of size + ELEMENT_SIZE. Copies of this configuration are created, copied + and destroyed internally using the standard library functions + `malloc', `memcpy' and `free'. The function pointers COPYFUNC, + COPY_CONSTRUCTOR and DESTRUCTOR should be null pointers in + fixed-size mode. In the variable-size mode the functions + COPYFUNC, COPY_CONSTRUCTOR and DESTRUCTOR are used to create, copy + and destroy configurations internally. The variable ELEMENT_SIZE + should be zero in the variable-size mode. + + The PARAMS structure (described below) controls the run by + providing the temperature schedule and other tunable parameters to + the algorithm. + + On exit the best result achieved during the search is placed in + `*X0_P'. If the annealing process has been successful this should + be a good approximation to the optimal point in the space. + + If the function pointer PRINT_POSITION is not null, a debugging + log will be printed to `stdout' with the following columns: + + #-iter #-evals temperature position energy best_energy + + and the output of the function PRINT_POSITION itself. If + PRINT_POSITION is null then no information is printed. + +The simulated annealing routines require several user-specified +functions to define the configuration space and energy function. The +prototypes for these functions are given below. + + -- Data Type: gsl_siman_Efunc_t + This function type should return the energy of a configuration XP. + + double (*gsl_siman_Efunc_t) (void *xp) + + -- Data Type: gsl_siman_step_t + This function type should modify the configuration XP using a + random step taken from the generator R, up to a maximum distance of + STEP_SIZE. + + void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, + double step_size) + + -- Data Type: gsl_siman_metric_t + This function type should return the distance between two + configurations XP and YP. + + double (*gsl_siman_metric_t) (void *xp, void *yp) + + -- Data Type: gsl_siman_print_t + This function type should print the contents of the configuration + XP. + + void (*gsl_siman_print_t) (void *xp) + + -- Data Type: gsl_siman_copy_t + This function type should copy the configuration SOURCE into DEST. + + void (*gsl_siman_copy_t) (void *source, void *dest) + + -- Data Type: gsl_siman_copy_construct_t + This function type should create a new copy of the configuration + XP. + + void * (*gsl_siman_copy_construct_t) (void *xp) + + -- Data Type: gsl_siman_destroy_t + This function type should destroy the configuration XP, freeing its + memory. + + void (*gsl_siman_destroy_t) (void *xp) + + -- Data Type: gsl_siman_params_t + These are the parameters that control a run of `gsl_siman_solve'. + This structure contains all the information needed to control the + search, beyond the energy function, the step function and the + initial guess. + + `int n_tries' + The number of points to try for each step. + + `int iters_fixed_T' + The number of iterations at each temperature. + + `double step_size' + The maximum step size in the random walk. + + `double k, t_initial, mu_t, t_min' + The parameters of the Boltzmann distribution and cooling + schedule. + + +File: gsl-ref.info, Node: Examples with Simulated Annealing, Next: Simulated Annealing References and Further Reading, Prev: Simulated Annealing functions, Up: Simulated Annealing + +25.3 Examples +============= + +The simulated annealing package is clumsy, and it has to be because it +is written in C, for C callers, and tries to be polymorphic at the same +time. But here we provide some examples which can be pasted into your +application with little change and should make things easier. + +* Menu: + +* Trivial example:: +* Traveling Salesman Problem:: + + +File: gsl-ref.info, Node: Trivial example, Next: Traveling Salesman Problem, Up: Examples with Simulated Annealing + +25.3.1 Trivial example +---------------------- + +The first example, in one dimensional Cartesian space, sets up an energy +function which is a damped sine wave; this has many local minima, but +only one global minimum, somewhere between 1.0 and 1.5. The initial +guess given is 15.5, which is several local minima away from the global +minimum. + + #include + #include + #include + #include + + /* set up parameters for this simulated annealing run */ + + /* how many points do we try before stepping */ + #define N_TRIES 200 + + /* how many iterations for each T? */ + #define ITERS_FIXED_T 1000 + + /* max step size in random walk */ + #define STEP_SIZE 1.0 + + /* Boltzmann constant */ + #define K 1.0 + + /* initial temperature */ + #define T_INITIAL 0.008 + + /* damping factor for temperature */ + #define MU_T 1.003 + #define T_MIN 2.0e-6 + + gsl_siman_params_t params + = {N_TRIES, ITERS_FIXED_T, STEP_SIZE, + K, T_INITIAL, MU_T, T_MIN}; + + /* now some functions to test in one dimension */ + double E1(void *xp) + { + double x = * ((double *) xp); + + return exp(-pow((x-1.0),2.0))*sin(8*x); + } + + double M1(void *xp, void *yp) + { + double x = *((double *) xp); + double y = *((double *) yp); + + return fabs(x - y); + } + + void S1(const gsl_rng * r, void *xp, double step_size) + { + double old_x = *((double *) xp); + double new_x; + + double u = gsl_rng_uniform(r); + new_x = u * 2 * step_size - step_size + old_x; + + memcpy(xp, &new_x, sizeof(new_x)); + } + + void P1(void *xp) + { + printf ("%12g", *((double *) xp)); + } + + int + main(int argc, char *argv[]) + { + const gsl_rng_type * T; + gsl_rng * r; + + double x_initial = 15.5; + + gsl_rng_env_setup(); + + T = gsl_rng_default; + r = gsl_rng_alloc(T); + + gsl_siman_solve(r, &x_initial, E1, S1, M1, P1, + NULL, NULL, NULL, + sizeof(double), params); + + gsl_rng_free (r); + return 0; + } + + Here are a couple of plots that are generated by running +`siman_test' in the following way: + + $ ./siman_test | awk '!/^#/ {print $1, $4}' + | graph -y 1.34 1.4 -W0 -X generation -Y position + | plot -Tps > siman-test.eps + $ ./siman_test | awk '!/^#/ {print $1, $5}' + | graph -y -0.88 -0.83 -W0 -X generation -Y energy + | plot -Tps > siman-energy.eps + + +File: gsl-ref.info, Node: Traveling Salesman Problem, Prev: Trivial example, Up: Examples with Simulated Annealing + +25.3.2 Traveling Salesman Problem +--------------------------------- + +The TSP ("Traveling Salesman Problem") is the classic combinatorial +optimization problem. I have provided a very simple version of it, +based on the coordinates of twelve cities in the southwestern United +States. This should maybe be called the "Flying Salesman Problem", +since I am using the great-circle distance between cities, rather than +the driving distance. Also: I assume the earth is a sphere, so I don't +use geoid distances. + + The `gsl_siman_solve' routine finds a route which is 3490.62 +Kilometers long; this is confirmed by an exhaustive search of all +possible routes with the same initial city. + + The full code can be found in `siman/siman_tsp.c', but I include +here some plots generated in the following way: + + $ ./siman_tsp > tsp.output + $ grep -v "^#" tsp.output + | awk '{print $1, $NF}' + | graph -y 3300 6500 -W0 -X generation -Y distance + -L "TSP - 12 southwest cities" + | plot -Tps > 12-cities.eps + $ grep initial_city_coord tsp.output + | awk '{print $2, $3}' + | graph -X "longitude (- means west)" -Y "latitude" + -L "TSP - initial-order" -f 0.03 -S 1 0.1 + | plot -Tps > initial-route.eps + $ grep final_city_coord tsp.output + | awk '{print $2, $3}' + | graph -X "longitude (- means west)" -Y "latitude" + -L "TSP - final-order" -f 0.03 -S 1 0.1 + | plot -Tps > final-route.eps + +This is the output showing the initial order of the cities; longitude is +negative, since it is west and I want the plot to look like a map. + + # initial coordinates of cities (longitude and latitude) + ###initial_city_coord: -105.95 35.68 Santa Fe + ###initial_city_coord: -112.07 33.54 Phoenix + ###initial_city_coord: -106.62 35.12 Albuquerque + ###initial_city_coord: -103.2 34.41 Clovis + ###initial_city_coord: -107.87 37.29 Durango + ###initial_city_coord: -96.77 32.79 Dallas + ###initial_city_coord: -105.92 35.77 Tesuque + ###initial_city_coord: -107.84 35.15 Grants + ###initial_city_coord: -106.28 35.89 Los Alamos + ###initial_city_coord: -106.76 32.34 Las Cruces + ###initial_city_coord: -108.58 37.35 Cortez + ###initial_city_coord: -108.74 35.52 Gallup + ###initial_city_coord: -105.95 35.68 Santa Fe + + The optimal route turns out to be: + + # final coordinates of cities (longitude and latitude) + ###final_city_coord: -105.95 35.68 Santa Fe + ###final_city_coord: -103.2 34.41 Clovis + ###final_city_coord: -96.77 32.79 Dallas + ###final_city_coord: -106.76 32.34 Las Cruces + ###final_city_coord: -112.07 33.54 Phoenix + ###final_city_coord: -108.74 35.52 Gallup + ###final_city_coord: -108.58 37.35 Cortez + ###final_city_coord: -107.87 37.29 Durango + ###final_city_coord: -107.84 35.15 Grants + ###final_city_coord: -106.62 35.12 Albuquerque + ###final_city_coord: -106.28 35.89 Los Alamos + ###final_city_coord: -105.92 35.77 Tesuque + ###final_city_coord: -105.95 35.68 Santa Fe + +Here's a plot of the cost function (energy) versus generation (point in +the calculation at which a new temperature is set) for this problem: + + +File: gsl-ref.info, Node: Simulated Annealing References and Further Reading, Prev: Examples with Simulated Annealing, Up: Simulated Annealing + +25.4 References and Further Reading +=================================== + +Further information is available in the following book, + + `Modern Heuristic Techniques for Combinatorial Problems', Colin R. + Reeves (ed.), McGraw-Hill, 1995 (ISBN 0-07-709239-2). + + +File: gsl-ref.info, Node: Ordinary Differential Equations, Next: Interpolation, Prev: Simulated Annealing, Up: Top + +26 Ordinary Differential Equations +********************************** + +This chapter describes functions for solving ordinary differential +equation (ODE) initial value problems. The library provides a variety +of low-level methods, such as Runge-Kutta and Bulirsch-Stoer routines, +and higher-level components for adaptive step-size control. The +components can be combined by the user to achieve the desired solution, +with full access to any intermediate steps. A driver object can be used +as a high level wrapper for easy use of low level functions. + + These functions are declared in the header file `gsl_odeiv2.h'. +This is a new interface in version 1.15 and uses the prefix +`gsl_odeiv2' for all functions. It is recommended over the previous +`gsl_odeiv' implementation defined in `gsl_odeiv.h' The old interface +has been retained under the original name for backwards compatibility. + +* Menu: + +* Defining the ODE System:: +* Stepping Functions:: +* Adaptive Step-size Control:: +* Evolution:: +* Driver:: +* ODE Example programs:: +* ODE References and Further Reading:: + + +File: gsl-ref.info, Node: Defining the ODE System, Next: Stepping Functions, Up: Ordinary Differential Equations + +26.1 Defining the ODE System +============================ + +The routines solve the general n-dimensional first-order system, + + dy_i(t)/dt = f_i(t, y_1(t), ..., y_n(t)) + +for i = 1, \dots, n. The stepping functions rely on the vector of +derivatives f_i and the Jacobian matrix, J_{ij} = df_i(t,y(t)) / dy_j. +A system of equations is defined using the `gsl_odeiv2_system' datatype. + + -- Data Type: gsl_odeiv2_system + This data type defines a general ODE system with arbitrary + parameters. + + `int (* function) (double t, const double y[], double dydt[], void * params)' + This function should store the vector elements + f_i(t,y,params) in the array DYDT, for arguments (T,Y) and + parameters PARAMS. + + The function should return `GSL_SUCCESS' if the calculation + was completed successfully. Any other return value indicates + an error. A special return value `GSL_EBADFUNC' causes + `gsl_odeiv2' routines to immediately stop and return. The + user must call an appropriate reset function (e.g. + `gsl_odeiv2_driver_reset' or `gsl_odeiv2_step_reset') before + continuing. Use return values distinct from standard GSL + error codes to distinguish your function as the source of the + error. + + `int (* jacobian) (double t, const double y[], double * dfdy, double dfdt[], void * params);' + This function should store the vector of derivative elements + in the array DFDT and the Jacobian matrix J_{ij} in the array + DFDY, regarded as a row-ordered matrix `J(i,j) = dfdy[i * + dimension + j]' where `dimension' is the dimension of the + system. + + Not all of the stepper algorithms of `gsl_odeiv2' make use of + the Jacobian matrix, so it may not be necessary to provide + this function (the `jacobian' element of the struct can be + replaced by a null pointer for those algorithms). + + The function should return `GSL_SUCCESS' if the calculation + was completed successfully. Any other return value indicates + an error. A special return value `GSL_EBADFUNC' causes + `gsl_odeiv2' routines to immediately stop and return. The + user must call an appropriate reset function (e.g. + `gsl_odeiv2_driver_reset' or `gsl_odeiv2_step_reset') before + continuing. Use return values distinct from standard GSL + error codes to distinguish your function as the source of the + error. + + `size_t dimension;' + This is the dimension of the system of equations. + + `void * params' + This is a pointer to the arbitrary parameters of the system. + + +File: gsl-ref.info, Node: Stepping Functions, Next: Adaptive Step-size Control, Prev: Defining the ODE System, Up: Ordinary Differential Equations + +26.2 Stepping Functions +======================= + +The lowest level components are the "stepping functions" which advance +a solution from time t to t+h for a fixed step-size h and estimate the +resulting local error. + + -- Function: gsl_odeiv2_step * gsl_odeiv2_step_alloc (const + gsl_odeiv2_step_type * T, size_t DIM) + This function returns a pointer to a newly allocated instance of a + stepping function of type T for a system of DIM dimensions. Please + note that if you use a stepper method that requires access to a + driver object, it is advisable to use a driver allocation method, + which automatically allocates a stepper, too. + + -- Function: int gsl_odeiv2_step_reset (gsl_odeiv2_step * S) + This function resets the stepping function S. It should be used + whenever the next use of S will not be a continuation of a + previous step. + + -- Function: void gsl_odeiv2_step_free (gsl_odeiv2_step * S) + This function frees all the memory associated with the stepping + function S. + + -- Function: const char * gsl_odeiv2_step_name (const gsl_odeiv2_step + * S) + This function returns a pointer to the name of the stepping + function. For example, + + printf ("step method is '%s'\n", + gsl_odeiv2_step_name (s)); + + would print something like `step method is 'rkf45''. + + -- Function: unsigned int gsl_odeiv2_step_order (const gsl_odeiv2_step + * S) + This function returns the order of the stepping function on the + previous step. The order can vary if the stepping function itself + is adaptive. + + -- Function: int gsl_odeiv2_step_set_driver (gsl_odeiv2_step * S, + const gsl_odeiv2_driver * D) + This function sets a pointer of the driver object D for stepper S, + to allow the stepper to access control (and evolve) object through + the driver object. This is a requirement for some steppers, to get + the desired error level for internal iteration of stepper. + Allocation of a driver object calls this function automatically. + + -- Function: int gsl_odeiv2_step_apply (gsl_odeiv2_step * S, double T, + double H, double Y[], double YERR[], const double DYDT_IN[], + double DYDT_OUT[], const gsl_odeiv2_system * SYS) + This function applies the stepping function S to the system of + equations defined by SYS, using the step-size H to advance the + system from time T and state Y to time T+H. The new state of the + system is stored in Y on output, with an estimate of the absolute + error in each component stored in YERR. If the argument DYDT_IN + is not null it should point an array containing the derivatives + for the system at time T on input. This is optional as the + derivatives will be computed internally if they are not provided, + but allows the reuse of existing derivative information. On + output the new derivatives of the system at time T+H will be + stored in DYDT_OUT if it is not null. + + The stepping function returns `GSL_FAILURE' if it is unable to + compute the requested step. Also, if the user-supplied functions + defined in the system SYS return a status other than `GSL_SUCCESS' + the step will be aborted. In that case, the elements of Y will be + restored to their pre-step values and the error code from the + user-supplied function will be returned. Failure may be due to a + singularity in the system or too large step-size H. In that case + the step should be attempted again with a smaller step-size, e.g. + H/2. + + If the driver object is not appropriately set via + `gsl_odeiv2_step_set_driver' for those steppers that need it, the + stepping function returns `GSL_EFAULT'. If the user-supplied + functions defined in the system SYS returns `GSL_EBADFUNC', the + function returns immediately with the same return code. In this + case the user must call `gsl_odeiv2_step_reset' before calling + this function again. + + + The following algorithms are available, + + -- Step Type: gsl_odeiv2_step_rk2 + Explicit embedded Runge-Kutta (2, 3) method. + + -- Step Type: gsl_odeiv2_step_rk4 + Explicit 4th order (classical) Runge-Kutta. Error estimation is + carried out by the step doubling method. For more efficient + estimate of the error, use the embedded methods described below. + + -- Step Type: gsl_odeiv2_step_rkf45 + Explicit embedded Runge-Kutta-Fehlberg (4, 5) method. This method + is a good general-purpose integrator. + + -- Step Type: gsl_odeiv2_step_rkck + Explicit embedded Runge-Kutta Cash-Karp (4, 5) method. + + -- Step Type: gsl_odeiv2_step_rk8pd + Explicit embedded Runge-Kutta Prince-Dormand (8, 9) method. + + -- Step Type: gsl_odeiv2_step_rk1imp + Implicit Gaussian first order Runge-Kutta. Also known as implicit + Euler or backward Euler method. Error estimation is carried out by + the step doubling method. This algorithm requires the Jacobian and + access to the driver object via `gsl_odeiv2_step_set_driver'. + + -- Step Type: gsl_odeiv2_step_rk2imp + Implicit Gaussian second order Runge-Kutta. Also known as implicit + mid-point rule. Error estimation is carried out by the step + doubling method. This stepper requires the Jacobian and access to + the driver object via `gsl_odeiv2_step_set_driver'. + + -- Step Type: gsl_odeiv2_step_rk4imp + Implicit Gaussian 4th order Runge-Kutta. Error estimation is + carried out by the step doubling method. This algorithm requires + the Jacobian and access to the driver object via + `gsl_odeiv2_step_set_driver'. + + -- Step Type: gsl_odeiv2_step_bsimp + Implicit Bulirsch-Stoer method of Bader and Deuflhard. The method + is generally suitable for stiff problems. This stepper requires the + Jacobian. + + -- Step Type: gsl_odeiv2_step_msadams + A variable-coefficient linear multistep Adams method in Nordsieck + form. This stepper uses explicit Adams-Bashforth (predictor) and + implicit Adams-Moulton (corrector) methods in P(EC)^m functional + iteration mode. Method order varies dynamically between 1 and 12. + This stepper requires the access to the driver object via + `gsl_odeiv2_step_set_driver'. + + -- Step Type: gsl_odeiv2_step_msbdf + A variable-coefficient linear multistep backward differentiation + formula (BDF) method in Nordsieck form. This stepper uses the + explicit BDF formula as predictor and implicit BDF formula as + corrector. A modified Newton iteration method is used to solve the + system of non-linear equations. Method order varies dynamically + between 1 and 5. The method is generally suitable for stiff + problems. This stepper requires the Jacobian and the access to the + driver object via `gsl_odeiv2_step_set_driver'. + + +File: gsl-ref.info, Node: Adaptive Step-size Control, Next: Evolution, Prev: Stepping Functions, Up: Ordinary Differential Equations + +26.3 Adaptive Step-size Control +=============================== + +The control function examines the proposed change to the solution +produced by a stepping function and attempts to determine the optimal +step-size for a user-specified level of error. + + -- Function: gsl_odeiv2_control * gsl_odeiv2_control_standard_new + (double EPS_ABS, double EPS_REL, double A_Y, double A_DYDT) + The standard control object is a four parameter heuristic based on + absolute and relative errors EPS_ABS and EPS_REL, and scaling + factors A_Y and A_DYDT for the system state y(t) and derivatives + y'(t) respectively. + + The step-size adjustment procedure for this method begins by + computing the desired error level D_i for each component, + + D_i = eps_abs + eps_rel * (a_y |y_i| + a_dydt h |y\prime_i|) + + and comparing it with the observed error E_i = |yerr_i|. If the + observed error E exceeds the desired error level D by more than + 10% for any component then the method reduces the step-size by an + appropriate factor, + + h_new = h_old * S * (E/D)^(-1/q) + + where q is the consistency order of the method (e.g. q=4 for 4(5) + embedded RK), and S is a safety factor of 0.9. The ratio E/D is + taken to be the maximum of the ratios E_i/D_i. + + If the observed error E is less than 50% of the desired error + level D for the maximum ratio E_i/D_i then the algorithm takes the + opportunity to increase the step-size to bring the error in line + with the desired level, + + h_new = h_old * S * (E/D)^(-1/(q+1)) + + This encompasses all the standard error scaling methods. To avoid + uncontrolled changes in the stepsize, the overall scaling factor is + limited to the range 1/5 to 5. + + -- Function: gsl_odeiv2_control * gsl_odeiv2_control_y_new (double + EPS_ABS, double EPS_REL) + This function creates a new control object which will keep the + local error on each step within an absolute error of EPS_ABS and + relative error of EPS_REL with respect to the solution y_i(t). + This is equivalent to the standard control object with A_Y=1 and + A_DYDT=0. + + -- Function: gsl_odeiv2_control * gsl_odeiv2_control_yp_new (double + EPS_ABS, double EPS_REL) + This function creates a new control object which will keep the + local error on each step within an absolute error of EPS_ABS and + relative error of EPS_REL with respect to the derivatives of the + solution y'_i(t). This is equivalent to the standard control + object with A_Y=0 and A_DYDT=1. + + -- Function: gsl_odeiv2_control * gsl_odeiv2_control_scaled_new + (double EPS_ABS, double EPS_REL, double A_Y, double A_DYDT, + const double SCALE_ABS[], size_t DIM) + This function creates a new control object which uses the same + algorithm as `gsl_odeiv2_control_standard_new' but with an + absolute error which is scaled for each component by the array + SCALE_ABS. The formula for D_i for this control object is, + + D_i = eps_abs * s_i + eps_rel * (a_y |y_i| + a_dydt h |y\prime_i|) + + where s_i is the i-th component of the array SCALE_ABS. The same + error control heuristic is used by the Matlab ODE suite. + + -- Function: gsl_odeiv2_control * gsl_odeiv2_control_alloc (const + gsl_odeiv2_control_type * T) + This function returns a pointer to a newly allocated instance of a + control function of type T. This function is only needed for + defining new types of control functions. For most purposes the + standard control functions described above should be sufficient. + + -- Function: int gsl_odeiv2_control_init (gsl_odeiv2_control * C, + double EPS_ABS, double EPS_REL, double A_Y, double A_DYDT) + This function initializes the control function C with the + parameters EPS_ABS (absolute error), EPS_REL (relative error), A_Y + (scaling factor for y) and A_DYDT (scaling factor for derivatives). + + -- Function: void gsl_odeiv2_control_free (gsl_odeiv2_control * C) + This function frees all the memory associated with the control + function C. + + -- Function: int gsl_odeiv2_control_hadjust (gsl_odeiv2_control * C, + gsl_odeiv2_step * S, const double Y[], const double YERR[], + const double DYDT[], double * H) + This function adjusts the step-size H using the control function + C, and the current values of Y, YERR and DYDT. The stepping + function STEP is also needed to determine the order of the method. + If the error in the y-values YERR is found to be too large then + the step-size H is reduced and the function returns + `GSL_ODEIV_HADJ_DEC'. If the error is sufficiently small then H + may be increased and `GSL_ODEIV_HADJ_INC' is returned. The + function returns `GSL_ODEIV_HADJ_NIL' if the step-size is + unchanged. The goal of the function is to estimate the largest + step-size which satisfies the user-specified accuracy requirements + for the current point. + + -- Function: const char * gsl_odeiv2_control_name (const + gsl_odeiv2_control * C) + This function returns a pointer to the name of the control + function. For example, + + printf ("control method is '%s'\n", + gsl_odeiv2_control_name (c)); + + would print something like `control method is 'standard'' + + -- Function: int gsl_odeiv2_control_errlevel (gsl_odeiv2_control * C, + const double Y, const double DYDT, const double H, const + size_t IND, double * ERRLEV) + This function calculates the desired error level of the INDth + component to ERRLEV. It requires the value (Y) and value of the + derivative (DYDT) of the component, and the current step size H. + + -- Function: int gsl_odeiv2_control_set_driver (gsl_odeiv2_control * + C, const gsl_odeiv2_driver * D) + This function sets a pointer of the driver object D for control + object C. + + +File: gsl-ref.info, Node: Evolution, Next: Driver, Prev: Adaptive Step-size Control, Up: Ordinary Differential Equations + +26.4 Evolution +============== + +The evolution function combines the results of a stepping function and +control function to reliably advance the solution forward one step +using an acceptable step-size. + + -- Function: gsl_odeiv2_evolve * gsl_odeiv2_evolve_alloc (size_t DIM) + This function returns a pointer to a newly allocated instance of an + evolution function for a system of DIM dimensions. + + -- Function: int gsl_odeiv2_evolve_apply (gsl_odeiv2_evolve * E, + gsl_odeiv2_control * CON, gsl_odeiv2_step * STEP, const + gsl_odeiv2_system * SYS, double * T, double T1, double * H, + double Y[]) + This function advances the system (E, SYS) from time T and + position Y using the stepping function STEP. The new time and + position are stored in T and Y on output. + + The initial step-size is taken as H. The control function CON is + applied to check whether the local error estimated by the stepping + function STEP using step-size H exceeds the required error + tolerance. If the error is too high, the step is retried by + calling STEP with a decreased step-size. This process is continued + until an acceptable step-size is found. An estimate of the local + error for the step can be obtained from the components of the + array `E->yerr[]'. + + If the user-supplied functions defined in the system SYS returns + `GSL_EBADFUNC', the function returns immediately with the same + return code. In this case the user must call + `gsl_odeiv2_step_reset' and `gsl_odeiv2_evolve_reset' before + calling this function again. + + Otherwise, if the user-supplied functions defined in the system + SYS or the stepping function STEP return a status other than + `GSL_SUCCESS', the step is retried with a decreased step-size. If + the step-size decreases below machine precision, a status of + `GSL_FAILURE' is returned if the user functions returned + `GSL_SUCCESS'. Otherwise the value returned by user function is + returned. If no acceptable step can be made, T and Y will be + restored to their pre-step values and H contains the final + attempted step-size. + + If the step is successful the function returns a suggested + step-size for the next step in H. The maximum time T1 is guaranteed + not to be exceeded by the time-step. On the final time-step the + value of T will be set to T1 exactly. + + -- Function: int gsl_odeiv2_evolve_apply_fixed_step (gsl_odeiv2_evolve + * E, gsl_odeiv2_control * CON, gsl_odeiv2_step * STEP, const + gsl_odeiv2_system * SYS, double * T, const double H, double + Y[]) + This function advances the ODE-system (E, SYS, CON) from time T + and position Y using the stepping function STEP by a specified + step size H. If the local error estimated by the stepping function + exceeds the desired error level, the step is not taken and the + function returns `GSL_FAILURE'. Otherwise the value returned by + user function is returned. + + -- Function: int gsl_odeiv2_evolve_reset (gsl_odeiv2_evolve * E) + This function resets the evolution function E. It should be used + whenever the next use of E will not be a continuation of a + previous step. + + -- Function: void gsl_odeiv2_evolve_free (gsl_odeiv2_evolve * E) + This function frees all the memory associated with the evolution + function E. + + -- Function: int gsl_odeiv2_evolve_set_driver (gsl_odeiv2_evolve * E, + const gsl_odeiv2_driver * D) + This function sets a pointer of the driver object D for evolve + object E. + + If a system has discontinuous changes in the derivatives at known +points, it is advisable to evolve the system between each discontinuity +in sequence. For example, if a step-change in an external driving +force occurs at times t_a, t_b and t_c then evolution should be carried +out over the ranges (t_0,t_a), (t_a,t_b), (t_b,t_c), and (t_c,t_1) +separately and not directly over the range (t_0,t_1). + + +File: gsl-ref.info, Node: Driver, Next: ODE Example programs, Prev: Evolution, Up: Ordinary Differential Equations + +26.5 Driver +=========== + +The driver object is a high level wrapper that combines the evolution, +control and stepper objects for easy use. + + -- Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_y_new (const + gsl_odeiv2_system * SYS, const gsl_odeiv2_step_type * T, + const double HSTART, const double EPSABS, const double EPSREL) + -- Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_yp_new (const + gsl_odeiv2_system * SYS, const gsl_odeiv2_step_type * T, + const double HSTART, const double EPSABS, const double EPSREL) + -- Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_standard_new + (const gsl_odeiv2_system * SYS, const gsl_odeiv2_step_type * + T, const double HSTART, const double EPSABS, const double + EPSREL, const double A_Y, const double A_DYDT) + -- Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_scaled_new + (const gsl_odeiv2_system * SYS, const gsl_odeiv2_step_type * + T, const double HSTART, const double EPSABS, const double + EPSREL, const double A_Y, const double A_DYDT, const double + SCALE_ABS[]) + These functions return a pointer to a newly allocated instance of a + driver object. The functions automatically allocate and initialise + the evolve, control and stepper objects for ODE system SYS using + stepper type T. The initial step size is given in HSTART. The rest + of the arguments follow the syntax and semantics of the control + functions with same name (`gsl_odeiv2_control_*_new'). + + -- Function: int gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver * d, + const double hmin) + The function sets a minimum for allowed step size HMIN for driver + D. Default value is 0. + + -- Function: int gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver * d, + const double hmax) + The function sets a maximum for allowed step size HMAX for driver + D. Default value is `GSL_DBL_MAX'. + + -- Function: int gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver * d, + const unsigned long int nmax) + The function sets a maximum for allowed number of steps NMAX for + driver D. Default value of 0 sets no limit for steps. + + -- Function: int gsl_odeiv2_driver_apply (gsl_odeiv2_driver * D, + double * T, const double T1, double Y[]) + This function evolves the driver system D from T to T1. Initially + vector Y should contain the values of dependent variables at point + T. If the function is unable to complete the calculation, an error + code from `gsl_odeiv2_evolve_apply' is returned, and T and Y + contain the values from last successful step. + + If maximum number of steps is reached, a value of `GSL_EMAXITER' + is returned. If the step size drops below minimum value, the + function returns with `GSL_ENOPROG'. If the user-supplied functions + defined in the system SYS returns `GSL_EBADFUNC', the function + returns immediately with the same return code. In this case the + user must call `gsl_odeiv2_driver_reset' before calling this + function again. + + -- Function: int gsl_odeiv2_driver_apply_fixed_step (gsl_odeiv2_driver + * D, double * T, const double H, const unsigned long int N, + double Y[]) + This function evolves the driver system D from T with N steps of + size H. If the function is unable to complete the calculation, an + error code from `gsl_odeiv2_evolve_apply_fixed_step' is returned, + and T and Y contain the values from last successful step. + + -- Function: int gsl_odeiv2_driver_reset (gsl_odeiv2_driver * d) + This function resets the evolution and stepper objects. + + -- Function: int gsl_odeiv2_driver_free (gsl_odeiv2_driver * d) + This function frees the driver object, and the related evolution, + stepper and control objects. + + +File: gsl-ref.info, Node: ODE Example programs, Next: ODE References and Further Reading, Prev: Driver, Up: Ordinary Differential Equations + +26.6 Examples +============= + +The following program solves the second-order nonlinear Van der Pol +oscillator equation, + + x\prime\prime(t) + \mu x\prime(t) (x(t)^2 - 1) + x(t) = 0 + +This can be converted into a first order system suitable for use with +the routines described in this chapter by introducing a separate +variable for the velocity, y = x'(t), + + x\prime = y + y\prime = -x + \mu y (1-x^2) + +The program begins by defining functions for these derivatives and +their Jacobian. The main function uses driver level functions to solve +the problem. The program evolves the solution from (y, y\prime) = (1, +0) at t=0 to t=100. The step-size h is automatically adjusted by the +controller to maintain an absolute accuracy of 10^{-6} in the function +values Y. The loop in the example prints the solution at the points +t_i = 1, 2, \dots, 100. + + #include + #include + #include + #include + + int + func (double t, const double y[], double f[], + void *params) + { + double mu = *(double *)params; + f[0] = y[1]; + f[1] = -y[0] - mu*y[1]*(y[0]*y[0] - 1); + return GSL_SUCCESS; + } + + int + jac (double t, const double y[], double *dfdy, + double dfdt[], void *params) + { + double mu = *(double *)params; + gsl_matrix_view dfdy_mat + = gsl_matrix_view_array (dfdy, 2, 2); + gsl_matrix * m = &dfdy_mat.matrix; + gsl_matrix_set (m, 0, 0, 0.0); + gsl_matrix_set (m, 0, 1, 1.0); + gsl_matrix_set (m, 1, 0, -2.0*mu*y[0]*y[1] - 1.0); + gsl_matrix_set (m, 1, 1, -mu*(y[0]*y[0] - 1.0)); + dfdt[0] = 0.0; + dfdt[1] = 0.0; + return GSL_SUCCESS; + } + + int + main (void) + { + double mu = 10; + gsl_odeiv2_system sys = {func, jac, 2, &mu}; + + gsl_odeiv2_driver * d = + gsl_odeiv2_driver_alloc_y_new (&sys, gsl_odeiv2_step_rk8pd, + 1e-6, 1e-6, 0.0); + int i; + double t = 0.0, t1 = 100.0; + double y[2] = { 1.0, 0.0 }; + + for (i = 1; i <= 100; i++) + { + double ti = i * t1 / 100.0; + int status = gsl_odeiv2_driver_apply (d, &t, ti, y); + + if (status != GSL_SUCCESS) + { + printf ("error, return value=%d\n", status); + break; + } + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_driver_free (d); + return 0; + } + +The user can work with the lower level functions directly, as in the +following example. In this case an intermediate result is printed after +each successful step instead of equidistant time points. + + int + main (void) + { + const gsl_odeiv2_step_type * T + = gsl_odeiv2_step_rk8pd; + + gsl_odeiv2_step * s + = gsl_odeiv2_step_alloc (T, 2); + gsl_odeiv2_control * c + = gsl_odeiv2_control_y_new (1e-6, 0.0); + gsl_odeiv2_evolve * e + = gsl_odeiv2_evolve_alloc (2); + + double mu = 10; + gsl_odeiv2_system sys = {func, jac, 2, &mu}; + + double t = 0.0, t1 = 100.0; + double h = 1e-6; + double y[2] = { 1.0, 0.0 }; + + while (t < t1) + { + int status = gsl_odeiv2_evolve_apply (e, c, s, + &sys, + &t, t1, + &h, y); + + if (status != GSL_SUCCESS) + break; + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_evolve_free (e); + gsl_odeiv2_control_free (c); + gsl_odeiv2_step_free (s); + return 0; + } + +For functions with multiple parameters, the appropriate information can +be passed in through the PARAMS argument in `gsl_odeiv2_system' +definition (MU in this example) by using a pointer to a struct. + +It is also possible to work with a non-adaptive integrator, using only +the stepping function itself, `gsl_odeiv2_driver_apply_fixed_step' or +`gsl_odeiv2_evolve_apply_fixed_step'. The following program uses the +driver level function, with fourth-order Runge-Kutta stepping function +with a fixed stepsize of 0.001. + + int + main (void) + { + double mu = 10; + gsl_odeiv2_system sys = { func, jac, 2, &mu }; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_y_new (&sys, gsl_odeiv2_step_rk4, + 1e-3, 1e-8, 1e-8); + + double t = 0.0; + double y[2] = { 1.0, 0.0 }; + int i, s; + + for (i = 0; i < 100; i++) + { + s = gsl_odeiv2_driver_apply_fixed_step (d, &t, 1e-3, 1000, y); + + if (s != GSL_SUCCESS) + { + printf ("error: driver returned %d\n", s); + break; + } + + printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); + } + + gsl_odeiv2_driver_free (d); + return s; + } + + +File: gsl-ref.info, Node: ODE References and Further Reading, Prev: ODE Example programs, Up: Ordinary Differential Equations + +26.7 References and Further Reading +=================================== + + Ascher, U.M., Petzold, L.R., `Computer Methods for Ordinary + Differential and Differential-Algebraic Equations', SIAM, + Philadelphia, 1998. + + Hairer, E., Norsett, S. P., Wanner, G., `Solving Ordinary + Differential Equations I: Nonstiff Problems', Springer, Berlin, + 1993. + + Hairer, E., Wanner, G., `Solving Ordinary Differential Equations + II: Stiff and Differential-Algebraic Problems', Springer, Berlin, + 1996. + + Many of the basic Runge-Kutta formulas can be found in the Handbook +of Mathematical Functions, + + Abramowitz & Stegun (eds.), `Handbook of Mathematical Functions', + Section 25.5. + +The implicit Bulirsch-Stoer algorithm `bsimp' is described in the +following paper, + + G. Bader and P. Deuflhard, "A Semi-Implicit Mid-Point Rule for + Stiff Systems of Ordinary Differential Equations.", Numer. Math. + 41, 373-398, 1983. + +The Adams and BDF multistep methods `msadams' and `msbdf' are based on +the following articles, + + G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the + Numerical Solution of Ordinary Differential Equations.", ACM + Trans. Math. Software, 1, 71-96, 1975. + + P. N. Brown, G. D. Byrne and A. C. Hindmarsh, "VODE: A + Variable-coefficient ODE Solver.", SIAM J. Sci. Stat. Comput. 10, + 1038-1051, 1989. + + A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, + D. E. Shumaker and C. S. Woodward, "SUNDIALS: Suite of Nonlinear + and Differential/Algebraic Equation Solvers.", ACM Trans. Math. + Software 31, 363-396, 2005. + + +File: gsl-ref.info, Node: Interpolation, Next: Numerical Differentiation, Prev: Ordinary Differential Equations, Up: Top + +27 Interpolation +**************** + +This chapter describes functions for performing interpolation. The +library provides a variety of interpolation methods, including Cubic +splines and Akima splines. The interpolation types are interchangeable, +allowing different methods to be used without recompiling. +Interpolations can be defined for both normal and periodic boundary +conditions. Additional functions are available for computing +derivatives and integrals of interpolating functions. + + These interpolation methods produce curves that pass through each +datapoint. To interpolate noisy data with a smoothing curve see *note +Basis Splines::. + + The functions described in this section are declared in the header +files `gsl_interp.h' and `gsl_spline.h'. + +* Menu: + +* Introduction to Interpolation:: +* Interpolation Functions:: +* Interpolation Types:: +* Index Look-up and Acceleration:: +* Evaluation of Interpolating Functions:: +* Higher-level Interface:: +* Interpolation Example programs:: +* Interpolation References and Further Reading:: + + +File: gsl-ref.info, Node: Introduction to Interpolation, Next: Interpolation Functions, Up: Interpolation + +27.1 Introduction +================= + +Given a set of data points (x_1, y_1) \dots (x_n, y_n) the routines +described in this section compute a continuous interpolating function +y(x) such that y(x_i) = y_i. The interpolation is piecewise smooth, +and its behavior at the end-points is determined by the type of +interpolation used. + + +File: gsl-ref.info, Node: Interpolation Functions, Next: Interpolation Types, Prev: Introduction to Interpolation, Up: Interpolation + +27.2 Interpolation Functions +============================ + +The interpolation function for a given dataset is stored in a +`gsl_interp' object. These are created by the following functions. + + -- Function: gsl_interp * gsl_interp_alloc (const gsl_interp_type * T, + size_t SIZE) + This function returns a pointer to a newly allocated interpolation + object of type T for SIZE data-points. + + -- Function: int gsl_interp_init (gsl_interp * INTERP, const double + XA[], const double YA[], size_t SIZE) + This function initializes the interpolation object INTERP for the + data (XA,YA) where XA and YA are arrays of size SIZE. The + interpolation object (`gsl_interp') does not save the data arrays + XA and YA and only stores the static state computed from the data. + The XA data array is always assumed to be strictly ordered, with + increasing x values; the behavior for other arrangements is not + defined. + + -- Function: void gsl_interp_free (gsl_interp * INTERP) + This function frees the interpolation object INTERP. + + +File: gsl-ref.info, Node: Interpolation Types, Next: Index Look-up and Acceleration, Prev: Interpolation Functions, Up: Interpolation + +27.3 Interpolation Types +======================== + +The interpolation library provides six interpolation types: + + -- Interpolation Type: gsl_interp_linear + Linear interpolation. This interpolation method does not require + any additional memory. + + -- Interpolation Type: gsl_interp_polynomial + Polynomial interpolation. This method should only be used for + interpolating small numbers of points because polynomial + interpolation introduces large oscillations, even for well-behaved + datasets. The number of terms in the interpolating polynomial is + equal to the number of points. + + -- Interpolation Type: gsl_interp_cspline + Cubic spline with natural boundary conditions. The resulting + curve is piecewise cubic on each interval, with matching first and + second derivatives at the supplied data-points. The second + derivative is chosen to be zero at the first point and last point. + + -- Interpolation Type: gsl_interp_cspline_periodic + Cubic spline with periodic boundary conditions. The resulting + curve is piecewise cubic on each interval, with matching first and + second derivatives at the supplied data-points. The derivatives + at the first and last points are also matched. Note that the last + point in the data must have the same y-value as the first point, + otherwise the resulting periodic interpolation will have a + discontinuity at the boundary. + + + -- Interpolation Type: gsl_interp_akima + Non-rounded Akima spline with natural boundary conditions. This + method uses the non-rounded corner algorithm of Wodicka. + + -- Interpolation Type: gsl_interp_akima_periodic + Non-rounded Akima spline with periodic boundary conditions. This + method uses the non-rounded corner algorithm of Wodicka. + + The following related functions are available: + + -- Function: const char * gsl_interp_name (const gsl_interp * INTERP) + This function returns the name of the interpolation type used by + INTERP. For example, + + printf ("interp uses '%s' interpolation.\n", + gsl_interp_name (interp)); + + would print something like, + + interp uses 'cspline' interpolation. + + -- Function: unsigned int gsl_interp_min_size (const gsl_interp * + INTERP) + -- Function: unsigned int gsl_interp_type_min_size (const + gsl_interp_type * T) + These functions return the minimum number of points required by the + interpolation object INTERP or interpolation type T. For example, + Akima spline interpolation requires a minimum of 5 points. + + +File: gsl-ref.info, Node: Index Look-up and Acceleration, Next: Evaluation of Interpolating Functions, Prev: Interpolation Types, Up: Interpolation + +27.4 Index Look-up and Acceleration +=================================== + +The state of searches can be stored in a `gsl_interp_accel' object, +which is a kind of iterator for interpolation lookups. It caches the +previous value of an index lookup. When the subsequent interpolation +point falls in the same interval its index value can be returned +immediately. + + -- Function: size_t gsl_interp_bsearch (const double X_ARRAY[], double + X, size_t INDEX_LO, size_t INDEX_HI) + This function returns the index i of the array X_ARRAY such that + `x_array[i] <= x < x_array[i+1]'. The index is searched for in + the range [INDEX_LO,INDEX_HI]. An inline version of this function + is used when `HAVE_INLINE' is defined. + + -- Function: gsl_interp_accel * gsl_interp_accel_alloc (void) + This function returns a pointer to an accelerator object, which is + a kind of iterator for interpolation lookups. It tracks the state + of lookups, thus allowing for application of various acceleration + strategies. + + -- Function: size_t gsl_interp_accel_find (gsl_interp_accel * A, const + double X_ARRAY[], size_t SIZE, double X) + This function performs a lookup action on the data array X_ARRAY + of size SIZE, using the given accelerator A. This is how lookups + are performed during evaluation of an interpolation. The function + returns an index i such that `x_array[i] <= x < x_array[i+1]'. An + inline version of this function is used when `HAVE_INLINE' is + defined. + + -- Function: int gsl_interp_accel_reset (gsl_interp_accel * ACC); + This function reinitializes the accelerator object ACC. It should + be used when the cached information is no longer applicable--for + example, when switching to a new dataset. + + -- Function: void gsl_interp_accel_free (gsl_interp_accel* ACC) + This function frees the accelerator object ACC. + + +File: gsl-ref.info, Node: Evaluation of Interpolating Functions, Next: Higher-level Interface, Prev: Index Look-up and Acceleration, Up: Interpolation + +27.5 Evaluation of Interpolating Functions +========================================== + + -- Function: double gsl_interp_eval (const gsl_interp * INTERP, const + double XA[], const double YA[], double X, gsl_interp_accel * + ACC) + -- Function: int gsl_interp_eval_e (const gsl_interp * INTERP, const + double XA[], const double YA[], double X, gsl_interp_accel * + ACC, double * Y) + These functions return the interpolated value of Y for a given + point X, using the interpolation object INTERP, data arrays XA and + YA and the accelerator ACC. When X is outside the range of XA, + the error code `GSL_EDOM' is returned with a value of `GSL_NAN' for + Y. + + -- Function: double gsl_interp_eval_deriv (const gsl_interp * INTERP, + const double XA[], const double YA[], double X, + gsl_interp_accel * ACC) + -- Function: int gsl_interp_eval_deriv_e (const gsl_interp * INTERP, + const double XA[], const double YA[], double X, + gsl_interp_accel * ACC, double * D) + These functions return the derivative D of an interpolated + function for a given point X, using the interpolation object + INTERP, data arrays XA and YA and the accelerator ACC. + + -- Function: double gsl_interp_eval_deriv2 (const gsl_interp * INTERP, + const double XA[], const double YA[], double X, + gsl_interp_accel * ACC) + -- Function: int gsl_interp_eval_deriv2_e (const gsl_interp * INTERP, + const double XA[], const double YA[], double X, + gsl_interp_accel * ACC, double * D2) + These functions return the second derivative D2 of an interpolated + function for a given point X, using the interpolation object + INTERP, data arrays XA and YA and the accelerator ACC. + + -- Function: double gsl_interp_eval_integ (const gsl_interp * INTERP, + const double XA[], const double YA[], double A, double B, + gsl_interp_accel * ACC) + -- Function: int gsl_interp_eval_integ_e (const gsl_interp * INTERP, + const double XA[], const double YA[], double A, double B, + gsl_interp_accel * ACC, double * RESULT) + These functions return the numerical integral RESULT of an + interpolated function over the range [A, B], using the + interpolation object INTERP, data arrays XA and YA and the + accelerator ACC. + + +File: gsl-ref.info, Node: Higher-level Interface, Next: Interpolation Example programs, Prev: Evaluation of Interpolating Functions, Up: Interpolation + +27.6 Higher-level Interface +=========================== + +The functions described in the previous sections required the user to +supply pointers to the x and y arrays on each call. The following +functions are equivalent to the corresponding `gsl_interp' functions +but maintain a copy of this data in the `gsl_spline' object. This +removes the need to pass both XA and YA as arguments on each +evaluation. These functions are defined in the header file +`gsl_spline.h'. + + -- Function: gsl_spline * gsl_spline_alloc (const gsl_interp_type * T, + size_t SIZE) + + -- Function: int gsl_spline_init (gsl_spline * SPLINE, const double + XA[], const double YA[], size_t SIZE) + + -- Function: void gsl_spline_free (gsl_spline * SPLINE) + + -- Function: const char * gsl_spline_name (const gsl_spline * SPLINE) + + -- Function: unsigned int gsl_spline_min_size (const gsl_spline * + SPLINE) + + -- Function: double gsl_spline_eval (const gsl_spline * SPLINE, double + X, gsl_interp_accel * ACC) + -- Function: int gsl_spline_eval_e (const gsl_spline * SPLINE, double + X, gsl_interp_accel * ACC, double * Y) + + -- Function: double gsl_spline_eval_deriv (const gsl_spline * SPLINE, + double X, gsl_interp_accel * ACC) + -- Function: int gsl_spline_eval_deriv_e (const gsl_spline * SPLINE, + double X, gsl_interp_accel * ACC, double * D) + + -- Function: double gsl_spline_eval_deriv2 (const gsl_spline * SPLINE, + double X, gsl_interp_accel * ACC) + -- Function: int gsl_spline_eval_deriv2_e (const gsl_spline * SPLINE, + double X, gsl_interp_accel * ACC, double * D2) + + -- Function: double gsl_spline_eval_integ (const gsl_spline * SPLINE, + double A, double B, gsl_interp_accel * ACC) + -- Function: int gsl_spline_eval_integ_e (const gsl_spline * SPLINE, + double A, double B, gsl_interp_accel * ACC, double * RESULT) + + +File: gsl-ref.info, Node: Interpolation Example programs, Next: Interpolation References and Further Reading, Prev: Higher-level Interface, Up: Interpolation + +27.7 Examples +============= + +The following program demonstrates the use of the interpolation and +spline functions. It computes a cubic spline interpolation of the +10-point dataset (x_i, y_i) where x_i = i + \sin(i)/2 and y_i = i + +\cos(i^2) for i = 0 \dots 9. + + #include + #include + #include + #include + #include + + int + main (void) + { + int i; + double xi, yi, x[10], y[10]; + + printf ("#m=0,S=2\n"); + + for (i = 0; i < 10; i++) + { + x[i] = i + 0.5 * sin (i); + y[i] = i + cos (i * i); + printf ("%g %g\n", x[i], y[i]); + } + + printf ("#m=1,S=0\n"); + + { + gsl_interp_accel *acc + = gsl_interp_accel_alloc (); + gsl_spline *spline + = gsl_spline_alloc (gsl_interp_cspline, 10); + + gsl_spline_init (spline, x, y, 10); + + for (xi = x[0]; xi < x[9]; xi += 0.01) + { + yi = gsl_spline_eval (spline, xi, acc); + printf ("%g %g\n", xi, yi); + } + gsl_spline_free (spline); + gsl_interp_accel_free (acc); + } + return 0; + } + +The output is designed to be used with the GNU plotutils `graph' +program, + + $ ./a.out > interp.dat + $ graph -T ps < interp.dat > interp.ps + +The result shows a smooth interpolation of the original points. The +interpolation method can be changed simply by varying the first +argument of `gsl_spline_alloc'. + + The next program demonstrates a periodic cubic spline with 4 data +points. Note that the first and last points must be supplied with the +same y-value for a periodic spline. + + #include + #include + #include + #include + #include + + int + main (void) + { + int N = 4; + double x[4] = {0.00, 0.10, 0.27, 0.30}; + double y[4] = {0.15, 0.70, -0.10, 0.15}; + /* Note: y[0] == y[3] for periodic data */ + + gsl_interp_accel *acc = gsl_interp_accel_alloc (); + const gsl_interp_type *t = gsl_interp_cspline_periodic; + gsl_spline *spline = gsl_spline_alloc (t, N); + + int i; double xi, yi; + + printf ("#m=0,S=5\n"); + for (i = 0; i < N; i++) + { + printf ("%g %g\n", x[i], y[i]); + } + + printf ("#m=1,S=0\n"); + gsl_spline_init (spline, x, y, N); + + for (i = 0; i <= 100; i++) + { + xi = (1 - i / 100.0) * x[0] + (i / 100.0) * x[N-1]; + yi = gsl_spline_eval (spline, xi, acc); + printf ("%g %g\n", xi, yi); + } + + gsl_spline_free (spline); + gsl_interp_accel_free (acc); + return 0; + } + +The output can be plotted with GNU `graph'. + + $ ./a.out > interp.dat + $ graph -T ps < interp.dat > interp.ps + +The result shows a periodic interpolation of the original points. The +slope of the fitted curve is the same at the beginning and end of the +data, and the second derivative is also. + + +File: gsl-ref.info, Node: Interpolation References and Further Reading, Prev: Interpolation Example programs, Up: Interpolation + +27.8 References and Further Reading +=================================== + +Descriptions of the interpolation algorithms and further references can +be found in the following books: + + C.W. Ueberhuber, `Numerical Computation (Volume 1), Chapter 9 + "Interpolation"', Springer (1997), ISBN 3-540-62058-3. + + D.M. Young, R.T. Gregory `A Survey of Numerical Mathematics + (Volume 1), Chapter 6.8', Dover (1988), ISBN 0-486-65691-8. + + + +File: gsl-ref.info, Node: Numerical Differentiation, Next: Chebyshev Approximations, Prev: Interpolation, Up: Top + +28 Numerical Differentiation +**************************** + +The functions described in this chapter compute numerical derivatives by +finite differencing. An adaptive algorithm is used to find the best +choice of finite difference and to estimate the error in the derivative. +These functions are declared in the header file `gsl_deriv.h'. + +* Menu: + +* Numerical Differentiation functions:: +* Numerical Differentiation Examples:: +* Numerical Differentiation References:: + + +File: gsl-ref.info, Node: Numerical Differentiation functions, Next: Numerical Differentiation Examples, Up: Numerical Differentiation + +28.1 Functions +============== + + -- Function: int gsl_deriv_central (const gsl_function * F, double X, + double H, double * RESULT, double * ABSERR) + This function computes the numerical derivative of the function F + at the point X using an adaptive central difference algorithm with + a step-size of H. The derivative is returned in RESULT and an + estimate of its absolute error is returned in ABSERR. + + The initial value of H is used to estimate an optimal step-size, + based on the scaling of the truncation error and round-off error + in the derivative calculation. The derivative is computed using a + 5-point rule for equally spaced abscissae at x-h, x-h/2, x, x+h/2, + x+h, with an error estimate taken from the difference between the + 5-point rule and the corresponding 3-point rule x-h, x, x+h. Note + that the value of the function at x does not contribute to the + derivative calculation, so only 4-points are actually used. + + -- Function: int gsl_deriv_forward (const gsl_function * F, double X, + double H, double * RESULT, double * ABSERR) + This function computes the numerical derivative of the function F + at the point X using an adaptive forward difference algorithm with + a step-size of H. The function is evaluated only at points greater + than X, and never at X itself. The derivative is returned in + RESULT and an estimate of its absolute error is returned in + ABSERR. This function should be used if f(x) has a discontinuity + at X, or is undefined for values less than X. + + The initial value of H is used to estimate an optimal step-size, + based on the scaling of the truncation error and round-off error + in the derivative calculation. The derivative at x is computed + using an "open" 4-point rule for equally spaced abscissae at x+h/4, + x+h/2, x+3h/4, x+h, with an error estimate taken from the + difference between the 4-point rule and the corresponding 2-point + rule x+h/2, x+h. + + -- Function: int gsl_deriv_backward (const gsl_function * F, double X, + double H, double * RESULT, double * ABSERR) + This function computes the numerical derivative of the function F + at the point X using an adaptive backward difference algorithm + with a step-size of H. The function is evaluated only at points + less than X, and never at X itself. The derivative is returned in + RESULT and an estimate of its absolute error is returned in + ABSERR. This function should be used if f(x) has a discontinuity + at X, or is undefined for values greater than X. + + This function is equivalent to calling `gsl_deriv_forward' with a + negative step-size. + + +File: gsl-ref.info, Node: Numerical Differentiation Examples, Next: Numerical Differentiation References, Prev: Numerical Differentiation functions, Up: Numerical Differentiation + +28.2 Examples +============= + +The following code estimates the derivative of the function f(x) = +x^{3/2} at x=2 and at x=0. The function f(x) is undefined for x<0 so +the derivative at x=0 is computed using `gsl_deriv_forward'. + + #include + #include + #include + + double f (double x, void * params) + { + return pow (x, 1.5); + } + + int + main (void) + { + gsl_function F; + double result, abserr; + + F.function = &f; + F.params = 0; + + printf ("f(x) = x^(3/2)\n"); + + gsl_deriv_central (&F, 2.0, 1e-8, &result, &abserr); + printf ("x = 2.0\n"); + printf ("f'(x) = %.10f +/- %.10f\n", result, abserr); + printf ("exact = %.10f\n\n", 1.5 * sqrt(2.0)); + + gsl_deriv_forward (&F, 0.0, 1e-8, &result, &abserr); + printf ("x = 0.0\n"); + printf ("f'(x) = %.10f +/- %.10f\n", result, abserr); + printf ("exact = %.10f\n", 0.0); + + return 0; + } + +Here is the output of the program, + + $ ./a.out + f(x) = x^(3/2) + x = 2.0 + f'(x) = 2.1213203120 +/- 0.0000004064 + exact = 2.1213203436 + + x = 0.0 + f'(x) = 0.0000000160 +/- 0.0000000339 + exact = 0.0000000000 + + +File: gsl-ref.info, Node: Numerical Differentiation References, Prev: Numerical Differentiation Examples, Up: Numerical Differentiation + +28.3 References and Further Reading +=================================== + +The algorithms used by these functions are described in the following +sources: + + Abramowitz and Stegun, `Handbook of Mathematical Functions', + Section 25.3.4, and Table 25.5 (Coefficients for Differentiation). + + S.D. Conte and Carl de Boor, `Elementary Numerical Analysis: An + Algorithmic Approach', McGraw-Hill, 1972. + + +File: gsl-ref.info, Node: Chebyshev Approximations, Next: Series Acceleration, Prev: Numerical Differentiation, Up: Top + +29 Chebyshev Approximations +*************************** + +This chapter describes routines for computing Chebyshev approximations +to univariate functions. A Chebyshev approximation is a truncation of +the series f(x) = \sum c_n T_n(x), where the Chebyshev polynomials +T_n(x) = \cos(n \arccos x) provide an orthogonal basis of polynomials +on the interval [-1,1] with the weight function 1 / \sqrt{1-x^2}. The +first few Chebyshev polynomials are, T_0(x) = 1, T_1(x) = x, T_2(x) = 2 +x^2 - 1. For further information see Abramowitz & Stegun, Chapter 22. + + The functions described in this chapter are declared in the header +file `gsl_chebyshev.h'. + +* Menu: + +* Chebyshev Definitions:: +* Creation and Calculation of Chebyshev Series:: +* Auxiliary Functions for Chebyshev Series:: +* Chebyshev Series Evaluation:: +* Derivatives and Integrals:: +* Chebyshev Approximation Examples:: +* Chebyshev Approximation References and Further Reading:: + + +File: gsl-ref.info, Node: Chebyshev Definitions, Next: Creation and Calculation of Chebyshev Series, Up: Chebyshev Approximations + +29.1 Definitions +================ + +A Chebyshev series is stored using the following structure, + + typedef struct + { + double * c; /* coefficients c[0] .. c[order] */ + int order; /* order of expansion */ + double a; /* lower interval point */ + double b; /* upper interval point */ + ... + } gsl_cheb_series + +The approximation is made over the range [a,b] using ORDER+1 terms, +including the coefficient c[0]. The series is computed using the +following convention, + + f(x) = (c_0 / 2) + \sum_{n=1} c_n T_n(x) + +which is needed when accessing the coefficients directly. + + +File: gsl-ref.info, Node: Creation and Calculation of Chebyshev Series, Next: Auxiliary Functions for Chebyshev Series, Prev: Chebyshev Definitions, Up: Chebyshev Approximations + +29.2 Creation and Calculation of Chebyshev Series +================================================= + + -- Function: gsl_cheb_series * gsl_cheb_alloc (const size_t N) + This function allocates space for a Chebyshev series of order N + and returns a pointer to a new `gsl_cheb_series' struct. + + -- Function: void gsl_cheb_free (gsl_cheb_series * CS) + This function frees a previously allocated Chebyshev series CS. + + -- Function: int gsl_cheb_init (gsl_cheb_series * CS, const + gsl_function * F, const double A, const double B) + This function computes the Chebyshev approximation CS for the + function F over the range (a,b) to the previously specified order. + The computation of the Chebyshev approximation is an O(n^2) + process, and requires n function evaluations. + + +File: gsl-ref.info, Node: Auxiliary Functions for Chebyshev Series, Next: Chebyshev Series Evaluation, Prev: Creation and Calculation of Chebyshev Series, Up: Chebyshev Approximations + +29.3 Auxiliary Functions +======================== + +The following functions provide information about an existing Chebyshev +series. + + -- Function: size_t gsl_cheb_order (const gsl_cheb_series * CS) + This function returns the order of Chebyshev series CS. + + -- Function: size_t gsl_cheb_size (const gsl_cheb_series * CS) + -- Function: double * gsl_cheb_coeffs (const gsl_cheb_series * CS) + These functions return the size of the Chebyshev coefficient array + `c[]' and a pointer to its location in memory for the Chebyshev + series CS. + + +File: gsl-ref.info, Node: Chebyshev Series Evaluation, Next: Derivatives and Integrals, Prev: Auxiliary Functions for Chebyshev Series, Up: Chebyshev Approximations + +29.4 Chebyshev Series Evaluation +================================ + + -- Function: double gsl_cheb_eval (const gsl_cheb_series * CS, double + X) + This function evaluates the Chebyshev series CS at a given point X. + + -- Function: int gsl_cheb_eval_err (const gsl_cheb_series * CS, const + double X, double * RESULT, double * ABSERR) + This function computes the Chebyshev series CS at a given point X, + estimating both the series RESULT and its absolute error ABSERR. + The error estimate is made from the first neglected term in the + series. + + -- Function: double gsl_cheb_eval_n (const gsl_cheb_series * CS, + size_t ORDER, double X) + This function evaluates the Chebyshev series CS at a given point + X, to (at most) the given order ORDER. + + -- Function: int gsl_cheb_eval_n_err (const gsl_cheb_series * CS, + const size_t ORDER, const double X, double * RESULT, double * + ABSERR) + This function evaluates a Chebyshev series CS at a given point X, + estimating both the series RESULT and its absolute error ABSERR, + to (at most) the given order ORDER. The error estimate is made + from the first neglected term in the series. + + +File: gsl-ref.info, Node: Derivatives and Integrals, Next: Chebyshev Approximation Examples, Prev: Chebyshev Series Evaluation, Up: Chebyshev Approximations + +29.5 Derivatives and Integrals +============================== + +The following functions allow a Chebyshev series to be differentiated or +integrated, producing a new Chebyshev series. Note that the error +estimate produced by evaluating the derivative series will be +underestimated due to the contribution of higher order terms being +neglected. + + -- Function: int gsl_cheb_calc_deriv (gsl_cheb_series * DERIV, const + gsl_cheb_series * CS) + This function computes the derivative of the series CS, storing + the derivative coefficients in the previously allocated DERIV. + The two series CS and DERIV must have been allocated with the same + order. + + -- Function: int gsl_cheb_calc_integ (gsl_cheb_series * INTEG, const + gsl_cheb_series * CS) + This function computes the integral of the series CS, storing the + integral coefficients in the previously allocated INTEG. The two + series CS and INTEG must have been allocated with the same order. + The lower limit of the integration is taken to be the left hand + end of the range A. + + +File: gsl-ref.info, Node: Chebyshev Approximation Examples, Next: Chebyshev Approximation References and Further Reading, Prev: Derivatives and Integrals, Up: Chebyshev Approximations + +29.6 Examples +============= + +The following example program computes Chebyshev approximations to a +step function. This is an extremely difficult approximation to make, +due to the discontinuity, and was chosen as an example where +approximation error is visible. For smooth functions the Chebyshev +approximation converges extremely rapidly and errors would not be +visible. + + #include + #include + #include + + double + f (double x, void *p) + { + if (x < 0.5) + return 0.25; + else + return 0.75; + } + + int + main (void) + { + int i, n = 10000; + + gsl_cheb_series *cs = gsl_cheb_alloc (40); + + gsl_function F; + + F.function = f; + F.params = 0; + + gsl_cheb_init (cs, &F, 0.0, 1.0); + + for (i = 0; i < n; i++) + { + double x = i / (double)n; + double r10 = gsl_cheb_eval_n (cs, 10, x); + double r40 = gsl_cheb_eval (cs, x); + printf ("%g %g %g %g\n", + x, GSL_FN_EVAL (&F, x), r10, r40); + } + + gsl_cheb_free (cs); + + return 0; + } + +The output from the program gives the original function, 10-th order +approximation and 40-th order approximation, all sampled at intervals of +0.001 in x. + + +File: gsl-ref.info, Node: Chebyshev Approximation References and Further Reading, Prev: Chebyshev Approximation Examples, Up: Chebyshev Approximations + +29.7 References and Further Reading +=================================== + +The following paper describes the use of Chebyshev series, + + R. Broucke, "Ten Subroutines for the Manipulation of Chebyshev + Series [C1] (Algorithm 446)". `Communications of the ACM' 16(4), + 254-256 (1973) + + +File: gsl-ref.info, Node: Series Acceleration, Next: Wavelet Transforms, Prev: Chebyshev Approximations, Up: Top + +30 Series Acceleration +********************** + +The functions described in this chapter accelerate the convergence of a +series using the Levin u-transform. This method takes a small number of +terms from the start of a series and uses a systematic approximation to +compute an extrapolated value and an estimate of its error. The +u-transform works for both convergent and divergent series, including +asymptotic series. + + These functions are declared in the header file `gsl_sum.h'. + +* Menu: + +* Acceleration functions:: +* Acceleration functions without error estimation:: +* Example of accelerating a series:: +* Series Acceleration References:: + + +File: gsl-ref.info, Node: Acceleration functions, Next: Acceleration functions without error estimation, Up: Series Acceleration + +30.1 Acceleration functions +=========================== + +The following functions compute the full Levin u-transform of a series +with its error estimate. The error estimate is computed by propagating +rounding errors from each term through to the final extrapolation. + + These functions are intended for summing analytic series where each +term is known to high accuracy, and the rounding errors are assumed to +originate from finite precision. They are taken to be relative errors of +order `GSL_DBL_EPSILON' for each term. + + The calculation of the error in the extrapolated value is an O(N^2) +process, which is expensive in time and memory. A faster but less +reliable method which estimates the error from the convergence of the +extrapolated value is described in the next section. For the method +described here a full table of intermediate values and derivatives +through to O(N) must be computed and stored, but this does give a +reliable error estimate. + + -- Function: gsl_sum_levin_u_workspace * gsl_sum_levin_u_alloc (size_t + N) + This function allocates a workspace for a Levin u-transform of N + terms. The size of the workspace is O(2n^2 + 3n). + + -- Function: void gsl_sum_levin_u_free (gsl_sum_levin_u_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_sum_levin_u_accel (const double * ARRAY, size_t + ARRAY_SIZE, gsl_sum_levin_u_workspace * W, double * + SUM_ACCEL, double * ABSERR) + This function takes the terms of a series in ARRAY of size + ARRAY_SIZE and computes the extrapolated limit of the series using + a Levin u-transform. Additional working space must be provided in + W. The extrapolated sum is stored in SUM_ACCEL, with an estimate + of the absolute error stored in ABSERR. The actual term-by-term + sum is returned in `w->sum_plain'. The algorithm calculates the + truncation error (the difference between two successive + extrapolations) and round-off error (propagated from the individual + terms) to choose an optimal number of terms for the extrapolation. + All the terms of the series passed in through ARRAY should be + non-zero. + + +File: gsl-ref.info, Node: Acceleration functions without error estimation, Next: Example of accelerating a series, Prev: Acceleration functions, Up: Series Acceleration + +30.2 Acceleration functions without error estimation +==================================================== + +The functions described in this section compute the Levin u-transform of +series and attempt to estimate the error from the "truncation error" in +the extrapolation, the difference between the final two approximations. +Using this method avoids the need to compute an intermediate table of +derivatives because the error is estimated from the behavior of the +extrapolated value itself. Consequently this algorithm is an O(N) +process and only requires O(N) terms of storage. If the series +converges sufficiently fast then this procedure can be acceptable. It +is appropriate to use this method when there is a need to compute many +extrapolations of series with similar convergence properties at +high-speed. For example, when numerically integrating a function +defined by a parameterized series where the parameter varies only +slightly. A reliable error estimate should be computed first using the +full algorithm described above in order to verify the consistency of the +results. + + -- Function: gsl_sum_levin_utrunc_workspace * +gsl_sum_levin_utrunc_alloc (size_t N) + This function allocates a workspace for a Levin u-transform of N + terms, without error estimation. The size of the workspace is + O(3n). + + -- Function: void gsl_sum_levin_utrunc_free + (gsl_sum_levin_utrunc_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_sum_levin_utrunc_accel (const double * ARRAY, + size_t ARRAY_SIZE, gsl_sum_levin_utrunc_workspace * W, double + * SUM_ACCEL, double * ABSERR_TRUNC) + This function takes the terms of a series in ARRAY of size + ARRAY_SIZE and computes the extrapolated limit of the series using + a Levin u-transform. Additional working space must be provided in + W. The extrapolated sum is stored in SUM_ACCEL. The actual + term-by-term sum is returned in `w->sum_plain'. The algorithm + terminates when the difference between two successive + extrapolations reaches a minimum or is sufficiently small. The + difference between these two values is used as estimate of the + error and is stored in ABSERR_TRUNC. To improve the reliability + of the algorithm the extrapolated values are replaced by moving + averages when calculating the truncation error, smoothing out any + fluctuations. + + +File: gsl-ref.info, Node: Example of accelerating a series, Next: Series Acceleration References, Prev: Acceleration functions without error estimation, Up: Series Acceleration + +30.3 Examples +============= + +The following code calculates an estimate of \zeta(2) = \pi^2 / 6 using +the series, + + \zeta(2) = 1 + 1/2^2 + 1/3^2 + 1/4^2 + ... + +After N terms the error in the sum is O(1/N), making direct summation +of the series converge slowly. + + #include + #include + #include + + #define N 20 + + int + main (void) + { + double t[N]; + double sum_accel, err; + double sum = 0; + int n; + + gsl_sum_levin_u_workspace * w + = gsl_sum_levin_u_alloc (N); + + const double zeta_2 = M_PI * M_PI / 6.0; + + /* terms for zeta(2) = \sum_{n=1}^{\infty} 1/n^2 */ + + for (n = 0; n < N; n++) + { + double np1 = n + 1.0; + t[n] = 1.0 / (np1 * np1); + sum += t[n]; + } + + gsl_sum_levin_u_accel (t, N, w, &sum_accel, &err); + + printf ("term-by-term sum = % .16f using %d terms\n", + sum, N); + + printf ("term-by-term sum = % .16f using %d terms\n", + w->sum_plain, w->terms_used); + + printf ("exact value = % .16f\n", zeta_2); + printf ("accelerated sum = % .16f using %d terms\n", + sum_accel, w->terms_used); + + printf ("estimated error = % .16f\n", err); + printf ("actual error = % .16f\n", + sum_accel - zeta_2); + + gsl_sum_levin_u_free (w); + return 0; + } + +The output below shows that the Levin u-transform is able to obtain an +estimate of the sum to 1 part in 10^10 using the first eleven terms of +the series. The error estimate returned by the function is also +accurate, giving the correct number of significant digits. + + $ ./a.out + term-by-term sum = 1.5961632439130233 using 20 terms + term-by-term sum = 1.5759958390005426 using 13 terms + exact value = 1.6449340668482264 + accelerated sum = 1.6449340668166479 using 13 terms + estimated error = 0.0000000000508580 + actual error = -0.0000000000315785 + +Note that a direct summation of this series would require 10^10 terms +to achieve the same precision as the accelerated sum does in 13 terms. + + +File: gsl-ref.info, Node: Series Acceleration References, Prev: Example of accelerating a series, Up: Series Acceleration + +30.4 References and Further Reading +=================================== + +The algorithms used by these functions are described in the following +papers, + + T. Fessler, W.F. Ford, D.A. Smith, HURRY: An acceleration + algorithm for scalar sequences and series `ACM Transactions on + Mathematical Software', 9(3):346-354, 1983. and Algorithm 602 + 9(3):355-357, 1983. + +The theory of the u-transform was presented by Levin, + + D. Levin, Development of Non-Linear Transformations for Improving + Convergence of Sequences, `Intern. J. Computer Math.' B3:371-388, + 1973. + +A review paper on the Levin Transform is available online, + Herbert H. H. Homeier, Scalar Levin-Type Sequence Transformations, + `http://arxiv.org/abs/math/0005209'. + + +File: gsl-ref.info, Node: Wavelet Transforms, Next: Discrete Hankel Transforms, Prev: Series Acceleration, Up: Top + +31 Wavelet Transforms +********************* + +This chapter describes functions for performing Discrete Wavelet +Transforms (DWTs). The library includes wavelets for real data in both +one and two dimensions. The wavelet functions are declared in the +header files `gsl_wavelet.h' and `gsl_wavelet2d.h'. + +* Menu: + +* DWT Definitions:: +* DWT Initialization:: +* DWT Transform Functions:: +* DWT Examples:: +* DWT References:: + + +File: gsl-ref.info, Node: DWT Definitions, Next: DWT Initialization, Up: Wavelet Transforms + +31.1 Definitions +================ + +The continuous wavelet transform and its inverse are defined by the +relations, + + w(s,\tau) = \int f(t) * \psi^*_{s,\tau}(t) dt + +and, + + f(t) = \int \int_{-\infty}^\infty w(s, \tau) * \psi_{s,\tau}(t) d\tau ds + +where the basis functions \psi_{s,\tau} are obtained by scaling and +translation from a single function, referred to as the "mother wavelet". + + The discrete version of the wavelet transform acts on equally-spaced +samples, with fixed scaling and translation steps (s, \tau). The +frequency and time axes are sampled "dyadically" on scales of 2^j +through a level parameter j. The resulting family of functions +{\psi_{j,n}} constitutes an orthonormal basis for square-integrable +signals. + + The discrete wavelet transform is an O(N) algorithm, and is also +referred to as the "fast wavelet transform". + + +File: gsl-ref.info, Node: DWT Initialization, Next: DWT Transform Functions, Prev: DWT Definitions, Up: Wavelet Transforms + +31.2 Initialization +=================== + +The `gsl_wavelet' structure contains the filter coefficients defining +the wavelet and any associated offset parameters. + + -- Function: gsl_wavelet * gsl_wavelet_alloc (const gsl_wavelet_type * + T, size_t K) + This function allocates and initializes a wavelet object of type + T. The parameter K selects the specific member of the wavelet + family. A null pointer is returned if insufficient memory is + available or if a unsupported member is selected. + + The following wavelet types are implemented: + + -- Wavelet: gsl_wavelet_daubechies + -- Wavelet: gsl_wavelet_daubechies_centered + This is the Daubechies wavelet family of maximum phase with k/2 + vanishing moments. The implemented wavelets are k=4, 6, ..., 20, + with K even. + + -- Wavelet: gsl_wavelet_haar + -- Wavelet: gsl_wavelet_haar_centered + This is the Haar wavelet. The only valid choice of k for the Haar + wavelet is k=2. + + -- Wavelet: gsl_wavelet_bspline + -- Wavelet: gsl_wavelet_bspline_centered + This is the biorthogonal B-spline wavelet family of order (i,j). + The implemented values of k = 100*i + j are 103, 105, 202, 204, + 206, 208, 301, 303, 305 307, 309. + +The centered forms of the wavelets align the coefficients of the various +sub-bands on edges. Thus the resulting visualization of the +coefficients of the wavelet transform in the phase plane is easier to +understand. + + -- Function: const char * gsl_wavelet_name (const gsl_wavelet * W) + This function returns a pointer to the name of the wavelet family + for W. + + -- Function: void gsl_wavelet_free (gsl_wavelet * W) + This function frees the wavelet object W. + + The `gsl_wavelet_workspace' structure contains scratch space of the +same size as the input data and is used to hold intermediate results +during the transform. + + -- Function: gsl_wavelet_workspace * gsl_wavelet_workspace_alloc + (size_t N) + This function allocates a workspace for the discrete wavelet + transform. To perform a one-dimensional transform on N elements, + a workspace of size N must be provided. For two-dimensional + transforms of N-by-N matrices it is sufficient to allocate a + workspace of size N, since the transform operates on individual + rows and columns. A null pointer is returned if insufficient + memory is available. + + -- Function: void gsl_wavelet_workspace_free (gsl_wavelet_workspace * + WORK) + This function frees the allocated workspace WORK. + + +File: gsl-ref.info, Node: DWT Transform Functions, Next: DWT Examples, Prev: DWT Initialization, Up: Wavelet Transforms + +31.3 Transform Functions +======================== + +This sections describes the actual functions performing the discrete +wavelet transform. Note that the transforms use periodic boundary +conditions. If the signal is not periodic in the sample length then +spurious coefficients will appear at the beginning and end of each level +of the transform. + +* Menu: + +* DWT in one dimension:: +* DWT in two dimension:: + + +File: gsl-ref.info, Node: DWT in one dimension, Next: DWT in two dimension, Up: DWT Transform Functions + +31.3.1 Wavelet transforms in one dimension +------------------------------------------ + + -- Function: int gsl_wavelet_transform (const gsl_wavelet * W, double + * DATA, size_t STRIDE, size_t N, gsl_wavelet_direction DIR, + gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet_transform_forward (const gsl_wavelet * W, + double * DATA, size_t STRIDE, size_t N, gsl_wavelet_workspace + * WORK) + -- Function: int gsl_wavelet_transform_inverse (const gsl_wavelet * W, + double * DATA, size_t STRIDE, size_t N, gsl_wavelet_workspace + * WORK) + These functions compute in-place forward and inverse discrete + wavelet transforms of length N with stride STRIDE on the array + DATA. The length of the transform N is restricted to powers of + two. For the `transform' version of the function the argument DIR + can be either `forward' (+1) or `backward' (-1). A workspace WORK + of length N must be provided. + + For the forward transform, the elements of the original array are + replaced by the discrete wavelet transform f_i -> w_{j,k} in a + packed triangular storage layout, where J is the index of the level + j = 0 ... J-1 and K is the index of the coefficient within each + level, k = 0 ... (2^j)-1. The total number of levels is J = + \log_2(n). The output data has the following form, + + (s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0}, ..., + d_{j,k}, ..., d_{J-1,2^{J-1}-1}) + + where the first element is the smoothing coefficient s_{-1,0}, + followed by the detail coefficients d_{j,k} for each level j. The + backward transform inverts these coefficients to obtain the + original data. + + These functions return a status of `GSL_SUCCESS' upon successful + completion. `GSL_EINVAL' is returned if N is not an integer power + of 2 or if insufficient workspace is provided. + + +File: gsl-ref.info, Node: DWT in two dimension, Prev: DWT in one dimension, Up: DWT Transform Functions + +31.3.2 Wavelet transforms in two dimension +------------------------------------------ + +The library provides functions to perform two-dimensional discrete +wavelet transforms on square matrices. The matrix dimensions must be an +integer power of two. There are two possible orderings of the rows and +columns in the two-dimensional wavelet transform, referred to as the +"standard" and "non-standard" forms. + + The "standard" transform performs a complete discrete wavelet +transform on the rows of the matrix, followed by a separate complete +discrete wavelet transform on the columns of the resulting +row-transformed matrix. This procedure uses the same ordering as a +two-dimensional Fourier transform. + + The "non-standard" transform is performed in interleaved passes on +the rows and columns of the matrix for each level of the transform. The +first level of the transform is applied to the matrix rows, and then to +the matrix columns. This procedure is then repeated across the rows and +columns of the data for the subsequent levels of the transform, until +the full discrete wavelet transform is complete. The non-standard form +of the discrete wavelet transform is typically used in image analysis. + + The functions described in this section are declared in the header +file `gsl_wavelet2d.h'. + + -- Function: int gsl_wavelet2d_transform (const gsl_wavelet * W, + double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_direction DIR, gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_transform_forward (const gsl_wavelet * + W, double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_transform_inverse (const gsl_wavelet * + W, double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_workspace * WORK) + These functions compute two-dimensional in-place forward and + inverse discrete wavelet transforms in standard form on the array + DATA stored in row-major form with dimensions SIZE1 and SIZE2 and + physical row length TDA. The dimensions must be equal (square + matrix) and are restricted to powers of two. For the `transform' + version of the function the argument DIR can be either `forward' + (+1) or `backward' (-1). A workspace WORK of the appropriate size + must be provided. On exit, the appropriate elements of the array + DATA are replaced by their two-dimensional wavelet transform. + + The functions return a status of `GSL_SUCCESS' upon successful + completion. `GSL_EINVAL' is returned if SIZE1 and SIZE2 are not + equal and integer powers of 2, or if insufficient workspace is + provided. + + -- Function: int gsl_wavelet2d_transform_matrix (const gsl_wavelet * + W, gsl_matrix * M, gsl_wavelet_direction DIR, + gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_transform_matrix_forward (const + gsl_wavelet * W, gsl_matrix * M, gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_transform_matrix_inverse (const + gsl_wavelet * W, gsl_matrix * M, gsl_wavelet_workspace * WORK) + These functions compute the two-dimensional in-place wavelet + transform on a matrix A. + + -- Function: int gsl_wavelet2d_nstransform (const gsl_wavelet * W, + double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_direction DIR, gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_nstransform_forward (const gsl_wavelet + * W, double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_nstransform_inverse (const gsl_wavelet + * W, double * DATA, size_t TDA, size_t SIZE1, size_t SIZE2, + gsl_wavelet_workspace * WORK) + These functions compute the two-dimensional wavelet transform in + non-standard form. + + -- Function: int gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * + W, gsl_matrix * M, gsl_wavelet_direction DIR, + gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_nstransform_matrix_forward (const + gsl_wavelet * W, gsl_matrix * M, gsl_wavelet_workspace * WORK) + -- Function: int gsl_wavelet2d_nstransform_matrix_inverse (const + gsl_wavelet * W, gsl_matrix * M, gsl_wavelet_workspace * WORK) + These functions compute the non-standard form of the + two-dimensional in-place wavelet transform on a matrix A. + + +File: gsl-ref.info, Node: DWT Examples, Next: DWT References, Prev: DWT Transform Functions, Up: Wavelet Transforms + +31.4 Examples +============= + +The following program demonstrates the use of the one-dimensional +wavelet transform functions. It computes an approximation to an input +signal (of length 256) using the 20 largest components of the wavelet +transform, while setting the others to zero. + + #include + #include + #include + #include + + int + main (int argc, char **argv) + { + int i, n = 256, nc = 20; + double *data = malloc (n * sizeof (double)); + double *abscoeff = malloc (n * sizeof (double)); + size_t *p = malloc (n * sizeof (size_t)); + + FILE * f; + gsl_wavelet *w; + gsl_wavelet_workspace *work; + + w = gsl_wavelet_alloc (gsl_wavelet_daubechies, 4); + work = gsl_wavelet_workspace_alloc (n); + + f = fopen (argv[1], "r"); + for (i = 0; i < n; i++) + { + fscanf (f, "%lg", &data[i]); + } + fclose (f); + + gsl_wavelet_transform_forward (w, data, 1, n, work); + + for (i = 0; i < n; i++) + { + abscoeff[i] = fabs (data[i]); + } + + gsl_sort_index (p, abscoeff, 1, n); + + for (i = 0; (i + nc) < n; i++) + data[p[i]] = 0; + + gsl_wavelet_transform_inverse (w, data, 1, n, work); + + for (i = 0; i < n; i++) + { + printf ("%g\n", data[i]); + } + + gsl_wavelet_free (w); + gsl_wavelet_workspace_free (work); + + free (data); + free (abscoeff); + free (p); + return 0; + } + +The output can be used with the GNU plotutils `graph' program, + + $ ./a.out ecg.dat > dwt.dat + $ graph -T ps -x 0 256 32 -h 0.3 -a dwt.dat > dwt.ps + + +File: gsl-ref.info, Node: DWT References, Prev: DWT Examples, Up: Wavelet Transforms + +31.5 References and Further Reading +=================================== + +The mathematical background to wavelet transforms is covered in the +original lectures by Daubechies, + + Ingrid Daubechies. Ten Lectures on Wavelets. `CBMS-NSF Regional + Conference Series in Applied Mathematics' (1992), SIAM, ISBN + 0898712742. + +An easy to read introduction to the subject with an emphasis on the +application of the wavelet transform in various branches of science is, + + Paul S. Addison. `The Illustrated Wavelet Transform Handbook'. + Institute of Physics Publishing (2002), ISBN 0750306920. + +For extensive coverage of signal analysis by wavelets, wavelet packets +and local cosine bases see, + + S. G. Mallat. `A wavelet tour of signal processing' (Second + edition). Academic Press (1999), ISBN 012466606X. + +The concept of multiresolution analysis underlying the wavelet transform +is described in, + + S. G. Mallat. Multiresolution Approximations and Wavelet + Orthonormal Bases of L^2(R). `Transactions of the American + Mathematical Society', 315(1), 1989, 69-87. + + S. G. Mallat. A Theory for Multiresolution Signal + Decomposition--The Wavelet Representation. `IEEE Transactions on + Pattern Analysis and Machine Intelligence', 11, 1989, 674-693. + +The coefficients for the individual wavelet families implemented by the +library can be found in the following papers, + + I. Daubechies. Orthonormal Bases of Compactly Supported Wavelets. + `Communications on Pure and Applied Mathematics', 41 (1988) + 909-996. + + A. Cohen, I. Daubechies, and J.-C. Feauveau. Biorthogonal Bases + of Compactly Supported Wavelets. `Communications on Pure and + Applied Mathematics', 45 (1992) 485-560. + +The PhysioNet archive of physiological datasets can be found online at +`http://www.physionet.org/' and is described in the following paper, + + Goldberger et al. PhysioBank, PhysioToolkit, and PhysioNet: + Components of a New Research Resource for Complex Physiologic + Signals. `Circulation' 101(23):e215-e220 2000. + + +File: gsl-ref.info, Node: Discrete Hankel Transforms, Next: One dimensional Root-Finding, Prev: Wavelet Transforms, Up: Top + +32 Discrete Hankel Transforms +***************************** + +This chapter describes functions for performing Discrete Hankel +Transforms (DHTs). The functions are declared in the header file +`gsl_dht.h'. + +* Menu: + +* Discrete Hankel Transform Definition:: +* Discrete Hankel Transform Functions:: +* Discrete Hankel Transform References:: + + +File: gsl-ref.info, Node: Discrete Hankel Transform Definition, Next: Discrete Hankel Transform Functions, Up: Discrete Hankel Transforms + +32.1 Definitions +================ + +The discrete Hankel transform acts on a vector of sampled data, where +the samples are assumed to have been taken at points related to the +zeroes of a Bessel function of fixed order; compare this to the case of +the discrete Fourier transform, where samples are taken at points +related to the zeroes of the sine or cosine function. + + Specifically, let f(t) be a function on the unit interval and +j_(\nu,m) the m-th zero of the Bessel function J_\nu(x). Then the +finite \nu-Hankel transform of f(t) is defined to be the set of numbers +g_m given by, + g_m = \int_0^1 t dt J_\nu(j_(\nu,m)t) f(t), + +so that, + f(t) = \sum_{m=1}^\infty (2 J_\nu(j_(\nu,m)t) / J_(\nu+1)(j_(\nu,m))^2) g_m. + +Suppose that f is band-limited in the sense that g_m=0 for m > M. Then +we have the following fundamental sampling theorem. + g_m = (2 / j_(\nu,M)^2) + \sum_{k=1}^{M-1} f(j_(\nu,k)/j_(\nu,M)) + (J_\nu(j_(\nu,m) j_(\nu,k) / j_(\nu,M)) / J_(\nu+1)(j_(\nu,k))^2). + +It is this discrete expression which defines the discrete Hankel +transform. The kernel in the summation above defines the matrix of the +\nu-Hankel transform of size M-1. The coefficients of this matrix, +being dependent on \nu and M, must be precomputed and stored; the +`gsl_dht' object encapsulates this data. The allocation function +`gsl_dht_alloc' returns a `gsl_dht' object which must be properly +initialized with `gsl_dht_init' before it can be used to perform +transforms on data sample vectors, for fixed \nu and M, using the +`gsl_dht_apply' function. The implementation allows a scaling of the +fundamental interval, for convenience, so that one can assume the +function is defined on the interval [0,X], rather than the unit +interval. + + Notice that by assumption f(t) vanishes at the endpoints of the +interval, consistent with the inversion formula and the sampling +formula given above. Therefore, this transform corresponds to an +orthogonal expansion in eigenfunctions of the Dirichlet problem for the +Bessel differential equation. + + +File: gsl-ref.info, Node: Discrete Hankel Transform Functions, Next: Discrete Hankel Transform References, Prev: Discrete Hankel Transform Definition, Up: Discrete Hankel Transforms + +32.2 Functions +============== + + -- Function: gsl_dht * gsl_dht_alloc (size_t SIZE) + This function allocates a Discrete Hankel transform object of size + SIZE. + + -- Function: int gsl_dht_init (gsl_dht * T, double NU, double XMAX) + This function initializes the transform T for the given values of + NU and XMAX. + + -- Function: gsl_dht * gsl_dht_new (size_t SIZE, double NU, double + XMAX) + This function allocates a Discrete Hankel transform object of size + SIZE and initializes it for the given values of NU and XMAX. + + -- Function: void gsl_dht_free (gsl_dht * T) + This function frees the transform T. + + -- Function: int gsl_dht_apply (const gsl_dht * T, double * F_IN, + double * F_OUT) + This function applies the transform T to the array F_IN whose size + is equal to the size of the transform. The result is stored in + the array F_OUT which must be of the same length. + + Applying this function to its output gives the original data + multiplied by (1/j_(\nu,M))^2, up to numerical errors. + + -- Function: double gsl_dht_x_sample (const gsl_dht * T, int N) + This function returns the value of the N-th sample point in the + unit interval, (j_{\nu,n+1}/j_{\nu,M}) X. These are the points + where the function f(t) is assumed to be sampled. + + -- Function: double gsl_dht_k_sample (const gsl_dht * T, int N) + This function returns the value of the N-th sample point in + "k-space", j_{\nu,n+1}/X. + + +File: gsl-ref.info, Node: Discrete Hankel Transform References, Prev: Discrete Hankel Transform Functions, Up: Discrete Hankel Transforms + +32.3 References and Further Reading +=================================== + +The algorithms used by these functions are described in the following +papers, + + H. Fisk Johnson, Comp. Phys. Comm. 43, 181 (1987). + + D. Lemoine, J. Chem. Phys. 101, 3936 (1994). + + +File: gsl-ref.info, Node: One dimensional Root-Finding, Next: One dimensional Minimization, Prev: Discrete Hankel Transforms, Up: Top + +33 One dimensional Root-Finding +******************************* + +This chapter describes routines for finding roots of arbitrary +one-dimensional functions. The library provides low level components +for a variety of iterative solvers and convergence tests. These can be +combined by the user to achieve the desired solution, with full access +to the intermediate steps of the iteration. Each class of methods uses +the same framework, so that you can switch between solvers at runtime +without needing to recompile your program. Each instance of a solver +keeps track of its own state, allowing the solvers to be used in +multi-threaded programs. + + The header file `gsl_roots.h' contains prototypes for the root +finding functions and related declarations. + +* Menu: + +* Root Finding Overview:: +* Root Finding Caveats:: +* Initializing the Solver:: +* Providing the function to solve:: +* Search Bounds and Guesses:: +* Root Finding Iteration:: +* Search Stopping Parameters:: +* Root Bracketing Algorithms:: +* Root Finding Algorithms using Derivatives:: +* Root Finding Examples:: +* Root Finding References and Further Reading:: + + +File: gsl-ref.info, Node: Root Finding Overview, Next: Root Finding Caveats, Up: One dimensional Root-Finding + +33.1 Overview +============= + +One-dimensional root finding algorithms can be divided into two classes, +"root bracketing" and "root polishing". Algorithms which proceed by +bracketing a root are guaranteed to converge. Bracketing algorithms +begin with a bounded region known to contain a root. The size of this +bounded region is reduced, iteratively, until it encloses the root to a +desired tolerance. This provides a rigorous error estimate for the +location of the root. + + The technique of "root polishing" attempts to improve an initial +guess to the root. These algorithms converge only if started "close +enough" to a root, and sacrifice a rigorous error bound for speed. By +approximating the behavior of a function in the vicinity of a root they +attempt to find a higher order improvement of an initial guess. When +the behavior of the function is compatible with the algorithm and a good +initial guess is available a polishing algorithm can provide rapid +convergence. + + In GSL both types of algorithm are available in similar frameworks. +The user provides a high-level driver for the algorithms, and the +library provides the individual functions necessary for each of the +steps. There are three main phases of the iteration. The steps are, + + * initialize solver state, S, for algorithm T + + * update S using the iteration T + + * test S for convergence, and repeat iteration if necessary + +The state for bracketing solvers is held in a `gsl_root_fsolver' +struct. The updating procedure uses only function evaluations (not +derivatives). The state for root polishing solvers is held in a +`gsl_root_fdfsolver' struct. The updates require both the function and +its derivative (hence the name `fdf') to be supplied by the user. + + +File: gsl-ref.info, Node: Root Finding Caveats, Next: Initializing the Solver, Prev: Root Finding Overview, Up: One dimensional Root-Finding + +33.2 Caveats +============ + +Note that root finding functions can only search for one root at a time. +When there are several roots in the search area, the first root to be +found will be returned; however it is difficult to predict which of the +roots this will be. _In most cases, no error will be reported if you +try to find a root in an area where there is more than one._ + + Care must be taken when a function may have a multiple root (such as +f(x) = (x-x_0)^2 or f(x) = (x-x_0)^3). It is not possible to use +root-bracketing algorithms on even-multiplicity roots. For these +algorithms the initial interval must contain a zero-crossing, where the +function is negative at one end of the interval and positive at the +other end. Roots with even-multiplicity do not cross zero, but only +touch it instantaneously. Algorithms based on root bracketing will +still work for odd-multiplicity roots (e.g. cubic, quintic, ...). Root +polishing algorithms generally work with higher multiplicity roots, but +at a reduced rate of convergence. In these cases the "Steffenson +algorithm" can be used to accelerate the convergence of multiple roots. + + While it is not absolutely required that f have a root within the +search region, numerical root finding functions should not be used +haphazardly to check for the _existence_ of roots. There are better +ways to do this. Because it is easy to create situations where +numerical root finders can fail, it is a bad idea to throw a root +finder at a function you do not know much about. In general it is best +to examine the function visually by plotting before searching for a +root. + + +File: gsl-ref.info, Node: Initializing the Solver, Next: Providing the function to solve, Prev: Root Finding Caveats, Up: One dimensional Root-Finding + +33.3 Initializing the Solver +============================ + + -- Function: gsl_root_fsolver * gsl_root_fsolver_alloc (const + gsl_root_fsolver_type * T) + This function returns a pointer to a newly allocated instance of a + solver of type T. For example, the following code creates an + instance of a bisection solver, + + const gsl_root_fsolver_type * T + = gsl_root_fsolver_bisection; + gsl_root_fsolver * s + = gsl_root_fsolver_alloc (T); + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: gsl_root_fdfsolver * gsl_root_fdfsolver_alloc (const + gsl_root_fdfsolver_type * T) + This function returns a pointer to a newly allocated instance of a + derivative-based solver of type T. For example, the following + code creates an instance of a Newton-Raphson solver, + + const gsl_root_fdfsolver_type * T + = gsl_root_fdfsolver_newton; + gsl_root_fdfsolver * s + = gsl_root_fdfsolver_alloc (T); + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: int gsl_root_fsolver_set (gsl_root_fsolver * S, + gsl_function * F, double X_LOWER, double X_UPPER) + This function initializes, or reinitializes, an existing solver S + to use the function F and the initial search interval [X_LOWER, + X_UPPER]. + + -- Function: int gsl_root_fdfsolver_set (gsl_root_fdfsolver * S, + gsl_function_fdf * FDF, double ROOT) + This function initializes, or reinitializes, an existing solver S + to use the function and derivative FDF and the initial guess ROOT. + + -- Function: void gsl_root_fsolver_free (gsl_root_fsolver * S) + -- Function: void gsl_root_fdfsolver_free (gsl_root_fdfsolver * S) + These functions free all the memory associated with the solver S. + + -- Function: const char * gsl_root_fsolver_name (const + gsl_root_fsolver * S) + -- Function: const char * gsl_root_fdfsolver_name (const + gsl_root_fdfsolver * S) + These functions return a pointer to the name of the solver. For + example, + + printf ("s is a '%s' solver\n", + gsl_root_fsolver_name (s)); + + would print something like `s is a 'bisection' solver'. + + +File: gsl-ref.info, Node: Providing the function to solve, Next: Search Bounds and Guesses, Prev: Initializing the Solver, Up: One dimensional Root-Finding + +33.4 Providing the function to solve +==================================== + +You must provide a continuous function of one variable for the root +finders to operate on, and, sometimes, its first derivative. In order +to allow for general parameters the functions are defined by the +following data types: + + -- Data Type: gsl_function + This data type defines a general function with parameters. + + `double (* function) (double X, void * PARAMS)' + this function should return the value f(x,params) for + argument X and parameters PARAMS + + `void * params' + a pointer to the parameters of the function + + Here is an example for the general quadratic function, + + f(x) = a x^2 + b x + c + +with a = 3, b = 2, c = 1. The following code defines a `gsl_function' +`F' which you could pass to a root finder as a function pointer: + + struct my_f_params { double a; double b; double c; }; + + double + my_f (double x, void * p) { + struct my_f_params * params + = (struct my_f_params *)p; + double a = (params->a); + double b = (params->b); + double c = (params->c); + + return (a * x + b) * x + c; + } + + gsl_function F; + struct my_f_params params = { 3.0, 2.0, 1.0 }; + + F.function = &my_f; + F.params = ¶ms; + +The function f(x) can be evaluated using the macro `GSL_FN_EVAL(&F,x)' +defined in `gsl_math.h'. + + -- Data Type: gsl_function_fdf + This data type defines a general function with parameters and its + first derivative. + + `double (* f) (double X, void * PARAMS)' + this function should return the value of f(x,params) for + argument X and parameters PARAMS + + `double (* df) (double X, void * PARAMS)' + this function should return the value of the derivative of F + with respect to X, f'(x,params), for argument X and + parameters PARAMS + + `void (* fdf) (double X, void * PARAMS, double * F, double * DF)' + this function should set the values of the function F to + f(x,params) and its derivative DF to f'(x,params) for + argument X and parameters PARAMS. This function provides an + optimization of the separate functions for f(x) and f'(x)--it + is always faster to compute the function and its derivative + at the same time. + + `void * params' + a pointer to the parameters of the function + + Here is an example where f(x) = 2\exp(2x): + + double + my_f (double x, void * params) + { + return exp (2 * x); + } + + double + my_df (double x, void * params) + { + return 2 * exp (2 * x); + } + + void + my_fdf (double x, void * params, + double * f, double * df) + { + double t = exp (2 * x); + + *f = t; + *df = 2 * t; /* uses existing value */ + } + + gsl_function_fdf FDF; + + FDF.f = &my_f; + FDF.df = &my_df; + FDF.fdf = &my_fdf; + FDF.params = 0; + +The function f(x) can be evaluated using the macro +`GSL_FN_FDF_EVAL_F(&FDF,x)' and the derivative f'(x) can be evaluated +using the macro `GSL_FN_FDF_EVAL_DF(&FDF,x)'. Both the function y = +f(x) and its derivative dy = f'(x) can be evaluated at the same time +using the macro `GSL_FN_FDF_EVAL_F_DF(&FDF,x,y,dy)'. The macro stores +f(x) in its Y argument and f'(x) in its DY argument--both of these +should be pointers to `double'. + + +File: gsl-ref.info, Node: Search Bounds and Guesses, Next: Root Finding Iteration, Prev: Providing the function to solve, Up: One dimensional Root-Finding + +33.5 Search Bounds and Guesses +============================== + +You provide either search bounds or an initial guess; this section +explains how search bounds and guesses work and how function arguments +control them. + + A guess is simply an x value which is iterated until it is within +the desired precision of a root. It takes the form of a `double'. + + Search bounds are the endpoints of an interval which is iterated +until the length of the interval is smaller than the requested +precision. The interval is defined by two values, the lower limit and +the upper limit. Whether the endpoints are intended to be included in +the interval or not depends on the context in which the interval is +used. + + +File: gsl-ref.info, Node: Root Finding Iteration, Next: Search Stopping Parameters, Prev: Search Bounds and Guesses, Up: One dimensional Root-Finding + +33.6 Iteration +============== + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + + -- Function: int gsl_root_fsolver_iterate (gsl_root_fsolver * S) + -- Function: int gsl_root_fdfsolver_iterate (gsl_root_fdfsolver * S) + These functions perform a single iteration of the solver S. If the + iteration encounters an unexpected problem then an error code will + be returned, + + `GSL_EBADFUNC' + the iteration encountered a singular point where the function + or its derivative evaluated to `Inf' or `NaN'. + + `GSL_EZERODIV' + the derivative of the function vanished at the iteration + point, preventing the algorithm from continuing without a + division by zero. + + The solver maintains a current best estimate of the root at all +times. The bracketing solvers also keep track of the current best +interval bounding the root. This information can be accessed with the +following auxiliary functions, + + -- Function: double gsl_root_fsolver_root (const gsl_root_fsolver * S) + -- Function: double gsl_root_fdfsolver_root (const gsl_root_fdfsolver + * S) + These functions return the current estimate of the root for the + solver S. + + -- Function: double gsl_root_fsolver_x_lower (const gsl_root_fsolver * + S) + -- Function: double gsl_root_fsolver_x_upper (const gsl_root_fsolver * + S) + These functions return the current bracketing interval for the + solver S. + + +File: gsl-ref.info, Node: Search Stopping Parameters, Next: Root Bracketing Algorithms, Prev: Root Finding Iteration, Up: One dimensional Root-Finding + +33.7 Search Stopping Parameters +=============================== + +A root finding procedure should stop when one of the following +conditions is true: + + * A root has been found to within the user-specified precision. + + * A user-specified maximum number of iterations has been reached. + + * An error has occurred. + +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result in +several standard ways. + + -- Function: int gsl_root_test_interval (double X_LOWER, double + X_UPPER, double EPSABS, double EPSREL) + This function tests for the convergence of the interval [X_LOWER, + X_UPPER] with absolute error EPSABS and relative error EPSREL. + The test returns `GSL_SUCCESS' if the following condition is + achieved, + + |a - b| < epsabs + epsrel min(|a|,|b|) + + when the interval x = [a,b] does not include the origin. If the + interval includes the origin then \min(|a|,|b|) is replaced by + zero (which is the minimum value of |x| over the interval). This + ensures that the relative error is accurately estimated for roots + close to the origin. + + This condition on the interval also implies that any estimate of + the root r in the interval satisfies the same condition with + respect to the true root r^*, + + |r - r^*| < epsabs + epsrel r^* + + assuming that the true root r^* is contained within the interval. + + -- Function: int gsl_root_test_delta (double X1, double X0, double + EPSABS, double EPSREL) + This function tests for the convergence of the sequence ..., X0, + X1 with absolute error EPSABS and relative error EPSREL. The test + returns `GSL_SUCCESS' if the following condition is achieved, + + |x_1 - x_0| < epsabs + epsrel |x_1| + + and returns `GSL_CONTINUE' otherwise. + + -- Function: int gsl_root_test_residual (double F, double EPSABS) + This function tests the residual value F against the absolute + error bound EPSABS. The test returns `GSL_SUCCESS' if the + following condition is achieved, + + |f| < epsabs + + and returns `GSL_CONTINUE' otherwise. This criterion is suitable + for situations where the precise location of the root, x, is + unimportant provided a value can be found where the residual, + |f(x)|, is small enough. + + +File: gsl-ref.info, Node: Root Bracketing Algorithms, Next: Root Finding Algorithms using Derivatives, Prev: Search Stopping Parameters, Up: One dimensional Root-Finding + +33.8 Root Bracketing Algorithms +=============================== + +The root bracketing algorithms described in this section require an +initial interval which is guaranteed to contain a root--if a and b are +the endpoints of the interval then f(a) must differ in sign from f(b). +This ensures that the function crosses zero at least once in the +interval. If a valid initial interval is used then these algorithm +cannot fail, provided the function is well-behaved. + + Note that a bracketing algorithm cannot find roots of even degree, +since these do not cross the x-axis. + + -- Solver: gsl_root_fsolver_bisection + The "bisection algorithm" is the simplest method of bracketing the + roots of a function. It is the slowest algorithm provided by the + library, with linear convergence. + + On each iteration, the interval is bisected and the value of the + function at the midpoint is calculated. The sign of this value is + used to determine which half of the interval does not contain a + root. That half is discarded to give a new, smaller interval + containing the root. This procedure can be continued indefinitely + until the interval is sufficiently small. + + At any time the current estimate of the root is taken as the + midpoint of the interval. + + + -- Solver: gsl_root_fsolver_falsepos + The "false position algorithm" is a method of finding roots based + on linear interpolation. Its convergence is linear, but it is + usually faster than bisection. + + On each iteration a line is drawn between the endpoints (a,f(a)) + and (b,f(b)) and the point where this line crosses the x-axis + taken as a "midpoint". The value of the function at this point is + calculated and its sign is used to determine which side of the + interval does not contain a root. That side is discarded to give a + new, smaller interval containing the root. This procedure can be + continued indefinitely until the interval is sufficiently small. + + The best estimate of the root is taken from the linear + interpolation of the interval on the current iteration. + + + -- Solver: gsl_root_fsolver_brent + The "Brent-Dekker method" (referred to here as "Brent's method") + combines an interpolation strategy with the bisection algorithm. + This produces a fast algorithm which is still robust. + + On each iteration Brent's method approximates the function using an + interpolating curve. On the first iteration this is a linear + interpolation of the two endpoints. For subsequent iterations the + algorithm uses an inverse quadratic fit to the last three points, + for higher accuracy. The intercept of the interpolating curve + with the x-axis is taken as a guess for the root. If it lies + within the bounds of the current interval then the interpolating + point is accepted, and used to generate a smaller interval. If + the interpolating point is not accepted then the algorithm falls + back to an ordinary bisection step. + + The best estimate of the root is taken from the most recent + interpolation or bisection. + + +File: gsl-ref.info, Node: Root Finding Algorithms using Derivatives, Next: Root Finding Examples, Prev: Root Bracketing Algorithms, Up: One dimensional Root-Finding + +33.9 Root Finding Algorithms using Derivatives +============================================== + +The root polishing algorithms described in this section require an +initial guess for the location of the root. There is no absolute +guarantee of convergence--the function must be suitable for this +technique and the initial guess must be sufficiently close to the root +for it to work. When these conditions are satisfied then convergence is +quadratic. + + These algorithms make use of both the function and its derivative. + + -- Derivative Solver: gsl_root_fdfsolver_newton + Newton's Method is the standard root-polishing algorithm. The + algorithm begins with an initial guess for the location of the + root. On each iteration, a line tangent to the function f is + drawn at that position. The point where this line crosses the + x-axis becomes the new guess. The iteration is defined by the + following sequence, + + x_{i+1} = x_i - f(x_i)/f'(x_i) + + Newton's method converges quadratically for single roots, and + linearly for multiple roots. + + + -- Derivative Solver: gsl_root_fdfsolver_secant + The "secant method" is a simplified version of Newton's method + which does not require the computation of the derivative on every + step. + + On its first iteration the algorithm begins with Newton's method, + using the derivative to compute a first step, + + x_1 = x_0 - f(x_0)/f'(x_0) + + Subsequent iterations avoid the evaluation of the derivative by + replacing it with a numerical estimate, the slope of the line + through the previous two points, + + x_{i+1} = x_i f(x_i) / f'_{est} where + f'_{est} = (f(x_i) - f(x_{i-1})/(x_i - x_{i-1}) + + When the derivative does not change significantly in the vicinity + of the root the secant method gives a useful saving. + Asymptotically the secant method is faster than Newton's method + whenever the cost of evaluating the derivative is more than 0.44 + times the cost of evaluating the function itself. As with all + methods of computing a numerical derivative the estimate can + suffer from cancellation errors if the separation of the points + becomes too small. + + On single roots, the method has a convergence of order (1 + \sqrt + 5)/2 (approximately 1.62). It converges linearly for multiple + roots. + + + -- Derivative Solver: gsl_root_fdfsolver_steffenson + The "Steffenson Method"(1) provides the fastest convergence of all + the routines. It combines the basic Newton algorithm with an + Aitken "delta-squared" acceleration. If the Newton iterates are + x_i then the acceleration procedure generates a new sequence R_i, + + R_i = x_i - (x_{i+1} - x_i)^2 / (x_{i+2} - 2 x_{i+1} + x_{i}) + + which converges faster than the original sequence under reasonable + conditions. The new sequence requires three terms before it can + produce its first value so the method returns accelerated values + on the second and subsequent iterations. On the first iteration + it returns the ordinary Newton estimate. The Newton iterate is + also returned if the denominator of the acceleration term ever + becomes zero. + + As with all acceleration procedures this method can become + unstable if the function is not well-behaved. + + ---------- Footnotes ---------- + + (1) J.F. Steffensen (1873-1961). The spelling used in the name of +the function is slightly incorrect, but has been preserved to avoid +incompatibility. + + +File: gsl-ref.info, Node: Root Finding Examples, Next: Root Finding References and Further Reading, Prev: Root Finding Algorithms using Derivatives, Up: One dimensional Root-Finding + +33.10 Examples +============== + +For any root finding algorithm we need to prepare the function to be +solved. For this example we will use the general quadratic equation +described earlier. We first need a header file (`demo_fn.h') to define +the function parameters, + + struct quadratic_params + { + double a, b, c; + }; + + double quadratic (double x, void *params); + double quadratic_deriv (double x, void *params); + void quadratic_fdf (double x, void *params, + double *y, double *dy); + +We place the function definitions in a separate file (`demo_fn.c'), + + double + quadratic (double x, void *params) + { + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + return (a * x + b) * x + c; + } + + double + quadratic_deriv (double x, void *params) + { + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + return 2.0 * a * x + b; + } + + void + quadratic_fdf (double x, void *params, + double *y, double *dy) + { + struct quadratic_params *p + = (struct quadratic_params *) params; + + double a = p->a; + double b = p->b; + double c = p->c; + + *y = (a * x + b) * x + c; + *dy = 2.0 * a * x + b; + } + +The first program uses the function solver `gsl_root_fsolver_brent' for +Brent's method and the general quadratic defined above to solve the +following equation, + + x^2 - 5 = 0 + +with solution x = \sqrt 5 = 2.236068... + + #include + #include + #include + #include + + #include "demo_fn.h" + #include "demo_fn.c" + + int + main (void) + { + int status; + int iter = 0, max_iter = 100; + const gsl_root_fsolver_type *T; + gsl_root_fsolver *s; + double r = 0, r_expected = sqrt (5.0); + double x_lo = 0.0, x_hi = 5.0; + gsl_function F; + struct quadratic_params params = {1.0, 0.0, -5.0}; + + F.function = &quadratic; + F.params = ¶ms; + + T = gsl_root_fsolver_brent; + s = gsl_root_fsolver_alloc (T); + gsl_root_fsolver_set (s, &F, x_lo, x_hi); + + printf ("using %s method\n", + gsl_root_fsolver_name (s)); + + printf ("%5s [%9s, %9s] %9s %10s %9s\n", + "iter", "lower", "upper", "root", + "err", "err(est)"); + + do + { + iter++; + status = gsl_root_fsolver_iterate (s); + r = gsl_root_fsolver_root (s); + x_lo = gsl_root_fsolver_x_lower (s); + x_hi = gsl_root_fsolver_x_upper (s); + status = gsl_root_test_interval (x_lo, x_hi, + 0, 0.001); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d [%.7f, %.7f] %.7f %+.7f %.7f\n", + iter, x_lo, x_hi, + r, r - r_expected, + x_hi - x_lo); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_root_fsolver_free (s); + + return status; + } + +Here are the results of the iterations, + + $ ./a.out + using brent method + iter [ lower, upper] root err err(est) + 1 [1.0000000, 5.0000000] 1.0000000 -1.2360680 4.0000000 + 2 [1.0000000, 3.0000000] 3.0000000 +0.7639320 2.0000000 + 3 [2.0000000, 3.0000000] 2.0000000 -0.2360680 1.0000000 + 4 [2.2000000, 3.0000000] 2.2000000 -0.0360680 0.8000000 + 5 [2.2000000, 2.2366300] 2.2366300 +0.0005621 0.0366300 + Converged: + 6 [2.2360634, 2.2366300] 2.2360634 -0.0000046 0.0005666 + +If the program is modified to use the bisection solver instead of +Brent's method, by changing `gsl_root_fsolver_brent' to +`gsl_root_fsolver_bisection' the slower convergence of the Bisection +method can be observed, + + $ ./a.out + using bisection method + iter [ lower, upper] root err err(est) + 1 [0.0000000, 2.5000000] 1.2500000 -0.9860680 2.5000000 + 2 [1.2500000, 2.5000000] 1.8750000 -0.3610680 1.2500000 + 3 [1.8750000, 2.5000000] 2.1875000 -0.0485680 0.6250000 + 4 [2.1875000, 2.5000000] 2.3437500 +0.1076820 0.3125000 + 5 [2.1875000, 2.3437500] 2.2656250 +0.0295570 0.1562500 + 6 [2.1875000, 2.2656250] 2.2265625 -0.0095055 0.0781250 + 7 [2.2265625, 2.2656250] 2.2460938 +0.0100258 0.0390625 + 8 [2.2265625, 2.2460938] 2.2363281 +0.0002601 0.0195312 + 9 [2.2265625, 2.2363281] 2.2314453 -0.0046227 0.0097656 + 10 [2.2314453, 2.2363281] 2.2338867 -0.0021813 0.0048828 + 11 [2.2338867, 2.2363281] 2.2351074 -0.0009606 0.0024414 + Converged: + 12 [2.2351074, 2.2363281] 2.2357178 -0.0003502 0.0012207 + + The next program solves the same function using a derivative solver +instead. + + #include + #include + #include + #include + + #include "demo_fn.h" + #include "demo_fn.c" + + int + main (void) + { + int status; + int iter = 0, max_iter = 100; + const gsl_root_fdfsolver_type *T; + gsl_root_fdfsolver *s; + double x0, x = 5.0, r_expected = sqrt (5.0); + gsl_function_fdf FDF; + struct quadratic_params params = {1.0, 0.0, -5.0}; + + FDF.f = &quadratic; + FDF.df = &quadratic_deriv; + FDF.fdf = &quadratic_fdf; + FDF.params = ¶ms; + + T = gsl_root_fdfsolver_newton; + s = gsl_root_fdfsolver_alloc (T); + gsl_root_fdfsolver_set (s, &FDF, x); + + printf ("using %s method\n", + gsl_root_fdfsolver_name (s)); + + printf ("%-5s %10s %10s %10s\n", + "iter", "root", "err", "err(est)"); + do + { + iter++; + status = gsl_root_fdfsolver_iterate (s); + x0 = x; + x = gsl_root_fdfsolver_root (s); + status = gsl_root_test_delta (x, x0, 0, 1e-3); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d %10.7f %+10.7f %10.7f\n", + iter, x, x - r_expected, x - x0); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_root_fdfsolver_free (s); + return status; + } + +Here are the results for Newton's method, + + $ ./a.out + using newton method + iter root err err(est) + 1 3.0000000 +0.7639320 -2.0000000 + 2 2.3333333 +0.0972654 -0.6666667 + 3 2.2380952 +0.0020273 -0.0952381 + Converged: + 4 2.2360689 +0.0000009 -0.0020263 + +Note that the error can be estimated more accurately by taking the +difference between the current iterate and next iterate rather than the +previous iterate. The other derivative solvers can be investigated by +changing `gsl_root_fdfsolver_newton' to `gsl_root_fdfsolver_secant' or +`gsl_root_fdfsolver_steffenson'. + + +File: gsl-ref.info, Node: Root Finding References and Further Reading, Prev: Root Finding Examples, Up: One dimensional Root-Finding + +33.11 References and Further Reading +==================================== + +For information on the Brent-Dekker algorithm see the following two +papers, + + R. P. Brent, "An algorithm with guaranteed convergence for finding + a zero of a function", `Computer Journal', 14 (1971) 422-425 + + J. C. P. Bus and T. J. Dekker, "Two Efficient Algorithms with + Guaranteed Convergence for Finding a Zero of a Function", `ACM + Transactions of Mathematical Software', Vol. 1 No. 4 (1975) 330-345 + + +File: gsl-ref.info, Node: One dimensional Minimization, Next: Multidimensional Root-Finding, Prev: One dimensional Root-Finding, Up: Top + +34 One dimensional Minimization +******************************* + +This chapter describes routines for finding minima of arbitrary +one-dimensional functions. The library provides low level components +for a variety of iterative minimizers and convergence tests. These can +be combined by the user to achieve the desired solution, with full +access to the intermediate steps of the algorithms. Each class of +methods uses the same framework, so that you can switch between +minimizers at runtime without needing to recompile your program. Each +instance of a minimizer keeps track of its own state, allowing the +minimizers to be used in multi-threaded programs. + + The header file `gsl_min.h' contains prototypes for the minimization +functions and related declarations. To use the minimization algorithms +to find the maximum of a function simply invert its sign. + +* Menu: + +* Minimization Overview:: +* Minimization Caveats:: +* Initializing the Minimizer:: +* Providing the function to minimize:: +* Minimization Iteration:: +* Minimization Stopping Parameters:: +* Minimization Algorithms:: +* Minimization Examples:: +* Minimization References and Further Reading:: + + +File: gsl-ref.info, Node: Minimization Overview, Next: Minimization Caveats, Up: One dimensional Minimization + +34.1 Overview +============= + +The minimization algorithms begin with a bounded region known to contain +a minimum. The region is described by a lower bound a and an upper +bound b, with an estimate of the location of the minimum x. + +The value of the function at x must be less than the value of the +function at the ends of the interval, + + f(a) > f(x) < f(b) + +This condition guarantees that a minimum is contained somewhere within +the interval. On each iteration a new point x' is selected using one +of the available algorithms. If the new point is a better estimate of +the minimum, i.e. where f(x') < f(x), then the current estimate of the +minimum x is updated. The new point also allows the size of the +bounded interval to be reduced, by choosing the most compact set of +points which satisfies the constraint f(a) > f(x) < f(b). The interval +is reduced until it encloses the true minimum to a desired tolerance. +This provides a best estimate of the location of the minimum and a +rigorous error estimate. + + Several bracketing algorithms are available within a single +framework. The user provides a high-level driver for the algorithm, +and the library provides the individual functions necessary for each of +the steps. There are three main phases of the iteration. The steps +are, + + * initialize minimizer state, S, for algorithm T + + * update S using the iteration T + + * test S for convergence, and repeat iteration if necessary + +The state for the minimizers is held in a `gsl_min_fminimizer' struct. +The updating procedure uses only function evaluations (not derivatives). + + +File: gsl-ref.info, Node: Minimization Caveats, Next: Initializing the Minimizer, Prev: Minimization Overview, Up: One dimensional Minimization + +34.2 Caveats +============ + +Note that minimization functions can only search for one minimum at a +time. When there are several minima in the search area, the first +minimum to be found will be returned; however it is difficult to predict +which of the minima this will be. _In most cases, no error will be +reported if you try to find a minimum in an area where there is more +than one._ + + With all minimization algorithms it can be difficult to determine the +location of the minimum to full numerical precision. The behavior of +the function in the region of the minimum x^* can be approximated by a +Taylor expansion, + + y = f(x^*) + (1/2) f''(x^*) (x - x^*)^2 + +and the second term of this expansion can be lost when added to the +first term at finite precision. This magnifies the error in locating +x^*, making it proportional to \sqrt \epsilon (where \epsilon is the +relative accuracy of the floating point numbers). For functions with +higher order minima, such as x^4, the magnification of the error is +correspondingly worse. The best that can be achieved is to converge to +the limit of numerical accuracy in the function values, rather than the +location of the minimum itself. + + +File: gsl-ref.info, Node: Initializing the Minimizer, Next: Providing the function to minimize, Prev: Minimization Caveats, Up: One dimensional Minimization + +34.3 Initializing the Minimizer +=============================== + + -- Function: gsl_min_fminimizer * gsl_min_fminimizer_alloc (const + gsl_min_fminimizer_type * T) + This function returns a pointer to a newly allocated instance of a + minimizer of type T. For example, the following code creates an + instance of a golden section minimizer, + + const gsl_min_fminimizer_type * T + = gsl_min_fminimizer_goldensection; + gsl_min_fminimizer * s + = gsl_min_fminimizer_alloc (T); + + If there is insufficient memory to create the minimizer then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: int gsl_min_fminimizer_set (gsl_min_fminimizer * S, + gsl_function * F, double X_MINIMUM, double X_LOWER, double + X_UPPER) + This function sets, or resets, an existing minimizer S to use the + function F and the initial search interval [X_LOWER, X_UPPER], + with a guess for the location of the minimum X_MINIMUM. + + If the interval given does not contain a minimum, then the function + returns an error code of `GSL_EINVAL'. + + -- Function: int gsl_min_fminimizer_set_with_values + (gsl_min_fminimizer * S, gsl_function * F, double X_MINIMUM, + double F_MINIMUM, double X_LOWER, double F_LOWER, double + X_UPPER, double F_UPPER) + This function is equivalent to `gsl_min_fminimizer_set' but uses + the values F_MINIMUM, F_LOWER and F_UPPER instead of computing + `f(x_minimum)', `f(x_lower)' and `f(x_upper)'. + + -- Function: void gsl_min_fminimizer_free (gsl_min_fminimizer * S) + This function frees all the memory associated with the minimizer S. + + -- Function: const char * gsl_min_fminimizer_name (const + gsl_min_fminimizer * S) + This function returns a pointer to the name of the minimizer. For + example, + + printf ("s is a '%s' minimizer\n", + gsl_min_fminimizer_name (s)); + + would print something like `s is a 'brent' minimizer'. + + +File: gsl-ref.info, Node: Providing the function to minimize, Next: Minimization Iteration, Prev: Initializing the Minimizer, Up: One dimensional Minimization + +34.4 Providing the function to minimize +======================================= + +You must provide a continuous function of one variable for the +minimizers to operate on. In order to allow for general parameters the +functions are defined by a `gsl_function' data type (*note Providing +the function to solve::). + + +File: gsl-ref.info, Node: Minimization Iteration, Next: Minimization Stopping Parameters, Prev: Providing the function to minimize, Up: One dimensional Minimization + +34.5 Iteration +============== + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any minimizer of +the corresponding type. The same functions work for all minimizers so +that different methods can be substituted at runtime without +modifications to the code. + + -- Function: int gsl_min_fminimizer_iterate (gsl_min_fminimizer * S) + This function performs a single iteration of the minimizer S. If + the iteration encounters an unexpected problem then an error code + will be returned, + + `GSL_EBADFUNC' + the iteration encountered a singular point where the function + evaluated to `Inf' or `NaN'. + + `GSL_FAILURE' + the algorithm could not improve the current best + approximation or bounding interval. + + The minimizer maintains a current best estimate of the position of +the minimum at all times, and the current interval bounding the minimum. +This information can be accessed with the following auxiliary functions, + + -- Function: double gsl_min_fminimizer_x_minimum (const + gsl_min_fminimizer * S) + This function returns the current estimate of the position of the + minimum for the minimizer S. + + -- Function: double gsl_min_fminimizer_x_upper (const + gsl_min_fminimizer * S) + -- Function: double gsl_min_fminimizer_x_lower (const + gsl_min_fminimizer * S) + These functions return the current upper and lower bound of the + interval for the minimizer S. + + -- Function: double gsl_min_fminimizer_f_minimum (const + gsl_min_fminimizer * S) + -- Function: double gsl_min_fminimizer_f_upper (const + gsl_min_fminimizer * S) + -- Function: double gsl_min_fminimizer_f_lower (const + gsl_min_fminimizer * S) + These functions return the value of the function at the current + estimate of the minimum and at the upper and lower bounds of the + interval for the minimizer S. + + +File: gsl-ref.info, Node: Minimization Stopping Parameters, Next: Minimization Algorithms, Prev: Minimization Iteration, Up: One dimensional Minimization + +34.6 Stopping Parameters +======================== + +A minimization procedure should stop when one of the following +conditions is true: + + * A minimum has been found to within the user-specified precision. + + * A user-specified maximum number of iterations has been reached. + + * An error has occurred. + +The handling of these conditions is under user control. The function +below allows the user to test the precision of the current result. + + -- Function: int gsl_min_test_interval (double X_LOWER, double + X_UPPER, double EPSABS, double EPSREL) + This function tests for the convergence of the interval [X_LOWER, + X_UPPER] with absolute error EPSABS and relative error EPSREL. + The test returns `GSL_SUCCESS' if the following condition is + achieved, + + |a - b| < epsabs + epsrel min(|a|,|b|) + + when the interval x = [a,b] does not include the origin. If the + interval includes the origin then \min(|a|,|b|) is replaced by + zero (which is the minimum value of |x| over the interval). This + ensures that the relative error is accurately estimated for minima + close to the origin. + + This condition on the interval also implies that any estimate of + the minimum x_m in the interval satisfies the same condition with + respect to the true minimum x_m^*, + + |x_m - x_m^*| < epsabs + epsrel x_m^* + + assuming that the true minimum x_m^* is contained within the + interval. + + +File: gsl-ref.info, Node: Minimization Algorithms, Next: Minimization Examples, Prev: Minimization Stopping Parameters, Up: One dimensional Minimization + +34.7 Minimization Algorithms +============================ + +The minimization algorithms described in this section require an initial +interval which is guaranteed to contain a minimum--if a and b are the +endpoints of the interval and x is an estimate of the minimum then f(a) +> f(x) < f(b). This ensures that the function has at least one minimum +somewhere in the interval. If a valid initial interval is used then +these algorithm cannot fail, provided the function is well-behaved. + + -- Minimizer: gsl_min_fminimizer_goldensection + The "golden section algorithm" is the simplest method of bracketing + the minimum of a function. It is the slowest algorithm provided + by the library, with linear convergence. + + On each iteration, the algorithm first compares the subintervals + from the endpoints to the current minimum. The larger subinterval + is divided in a golden section (using the famous ratio (3-\sqrt + 5)/2 = 0.3189660...) and the value of the function at this new + point is calculated. The new value is used with the constraint + f(a') > f(x') < f(b') to a select new interval containing the + minimum, by discarding the least useful point. This procedure can + be continued indefinitely until the interval is sufficiently + small. Choosing the golden section as the bisection ratio can be + shown to provide the fastest convergence for this type of + algorithm. + + + -- Minimizer: gsl_min_fminimizer_brent + The "Brent minimization algorithm" combines a parabolic + interpolation with the golden section algorithm. This produces a + fast algorithm which is still robust. + + The outline of the algorithm can be summarized as follows: on each + iteration Brent's method approximates the function using an + interpolating parabola through three existing points. The minimum + of the parabola is taken as a guess for the minimum. If it lies + within the bounds of the current interval then the interpolating + point is accepted, and used to generate a smaller interval. If + the interpolating point is not accepted then the algorithm falls + back to an ordinary golden section step. The full details of + Brent's method include some additional checks to improve + convergence. + + -- Minimizer: gsl_min_fminimizer_quad_golden + This is a variant of Brent's algorithm which uses the safeguarded + step-length algorithm of Gill and Murray. + + +File: gsl-ref.info, Node: Minimization Examples, Next: Minimization References and Further Reading, Prev: Minimization Algorithms, Up: One dimensional Minimization + +34.8 Examples +============= + +The following program uses the Brent algorithm to find the minimum of +the function f(x) = \cos(x) + 1, which occurs at x = \pi. The starting +interval is (0,6), with an initial guess for the minimum of 2. + + #include + #include + #include + #include + + double fn1 (double x, void * params) + { + return cos(x) + 1.0; + } + + int + main (void) + { + int status; + int iter = 0, max_iter = 100; + const gsl_min_fminimizer_type *T; + gsl_min_fminimizer *s; + double m = 2.0, m_expected = M_PI; + double a = 0.0, b = 6.0; + gsl_function F; + + F.function = &fn1; + F.params = 0; + + T = gsl_min_fminimizer_brent; + s = gsl_min_fminimizer_alloc (T); + gsl_min_fminimizer_set (s, &F, m, a, b); + + printf ("using %s method\n", + gsl_min_fminimizer_name (s)); + + printf ("%5s [%9s, %9s] %9s %10s %9s\n", + "iter", "lower", "upper", "min", + "err", "err(est)"); + + printf ("%5d [%.7f, %.7f] %.7f %+.7f %.7f\n", + iter, a, b, + m, m - m_expected, b - a); + + do + { + iter++; + status = gsl_min_fminimizer_iterate (s); + + m = gsl_min_fminimizer_x_minimum (s); + a = gsl_min_fminimizer_x_lower (s); + b = gsl_min_fminimizer_x_upper (s); + + status + = gsl_min_test_interval (a, b, 0.001, 0.0); + + if (status == GSL_SUCCESS) + printf ("Converged:\n"); + + printf ("%5d [%.7f, %.7f] " + "%.7f %+.7f %.7f\n", + iter, a, b, + m, m - m_expected, b - a); + } + while (status == GSL_CONTINUE && iter < max_iter); + + gsl_min_fminimizer_free (s); + + return status; + } + +Here are the results of the minimization procedure. + + $ ./a.out + 0 [0.0000000, 6.0000000] 2.0000000 -1.1415927 6.0000000 + 1 [2.0000000, 6.0000000] 3.2758640 +0.1342713 4.0000000 + 2 [2.0000000, 3.2831929] 3.2758640 +0.1342713 1.2831929 + 3 [2.8689068, 3.2831929] 3.2758640 +0.1342713 0.4142862 + 4 [2.8689068, 3.2831929] 3.2758640 +0.1342713 0.4142862 + 5 [2.8689068, 3.2758640] 3.1460585 +0.0044658 0.4069572 + 6 [3.1346075, 3.2758640] 3.1460585 +0.0044658 0.1412565 + 7 [3.1346075, 3.1874620] 3.1460585 +0.0044658 0.0528545 + 8 [3.1346075, 3.1460585] 3.1460585 +0.0044658 0.0114510 + 9 [3.1346075, 3.1460585] 3.1424060 +0.0008133 0.0114510 + 10 [3.1346075, 3.1424060] 3.1415885 -0.0000041 0.0077985 + Converged: + 11 [3.1415885, 3.1424060] 3.1415927 -0.0000000 0.0008175 + + +File: gsl-ref.info, Node: Minimization References and Further Reading, Prev: Minimization Examples, Up: One dimensional Minimization + +34.9 References and Further Reading +=================================== + +Further information on Brent's algorithm is available in the following +book, + + Richard Brent, `Algorithms for minimization without derivatives', + Prentice-Hall (1973), republished by Dover in paperback (2002), + ISBN 0-486-41998-3. + + +File: gsl-ref.info, Node: Multidimensional Root-Finding, Next: Multidimensional Minimization, Prev: One dimensional Minimization, Up: Top + +35 Multidimensional Root-Finding +******************************** + +This chapter describes functions for multidimensional root-finding +(solving nonlinear systems with n equations in n unknowns). The +library provides low level components for a variety of iterative +solvers and convergence tests. These can be combined by the user to +achieve the desired solution, with full access to the intermediate +steps of the iteration. Each class of methods uses the same framework, +so that you can switch between solvers at runtime without needing to +recompile your program. Each instance of a solver keeps track of its +own state, allowing the solvers to be used in multi-threaded programs. +The solvers are based on the original Fortran library MINPACK. + + The header file `gsl_multiroots.h' contains prototypes for the +multidimensional root finding functions and related declarations. + +* Menu: + +* Overview of Multidimensional Root Finding:: +* Initializing the Multidimensional Solver:: +* Providing the multidimensional system of equations to solve:: +* Iteration of the multidimensional solver:: +* Search Stopping Parameters for the multidimensional solver:: +* Algorithms using Derivatives:: +* Algorithms without Derivatives:: +* Example programs for Multidimensional Root finding:: +* References and Further Reading for Multidimensional Root Finding:: + + +File: gsl-ref.info, Node: Overview of Multidimensional Root Finding, Next: Initializing the Multidimensional Solver, Up: Multidimensional Root-Finding + +35.1 Overview +============= + +The problem of multidimensional root finding requires the simultaneous +solution of n equations, f_i, in n variables, x_i, + + f_i (x_1, ..., x_n) = 0 for i = 1 ... n. + +In general there are no bracketing methods available for n dimensional +systems, and no way of knowing whether any solutions exist. All +algorithms proceed from an initial guess using a variant of the Newton +iteration, + + x -> x' = x - J^{-1} f(x) + +where x, f are vector quantities and J is the Jacobian matrix J_{ij} = +d f_i / d x_j. Additional strategies can be used to enlarge the region +of convergence. These include requiring a decrease in the norm |f| on +each step proposed by Newton's method, or taking steepest-descent steps +in the direction of the negative gradient of |f|. + + Several root-finding algorithms are available within a single +framework. The user provides a high-level driver for the algorithms, +and the library provides the individual functions necessary for each of +the steps. There are three main phases of the iteration. The steps +are, + + * initialize solver state, S, for algorithm T + + * update S using the iteration T + + * test S for convergence, and repeat iteration if necessary + +The evaluation of the Jacobian matrix can be problematic, either because +programming the derivatives is intractable or because computation of the +n^2 terms of the matrix becomes too expensive. For these reasons the +algorithms provided by the library are divided into two classes +according to whether the derivatives are available or not. + + The state for solvers with an analytic Jacobian matrix is held in a +`gsl_multiroot_fdfsolver' struct. The updating procedure requires both +the function and its derivatives to be supplied by the user. + + The state for solvers which do not use an analytic Jacobian matrix is +held in a `gsl_multiroot_fsolver' struct. The updating procedure uses +only function evaluations (not derivatives). The algorithms estimate +the matrix J or J^{-1} by approximate methods. + diff --git a/software/gsl-1.15/doc/gsl-ref.info-4 b/software/gsl-1.15/doc/gsl-ref.info-4 new file mode 100644 index 000000000..117c1cb30 --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.info-4 @@ -0,0 +1,6600 @@ +This is gsl-ref.info, produced by makeinfo version 4.13 from +gsl-ref.texi. + +INFO-DIR-SECTION Software libraries +START-INFO-DIR-ENTRY +* gsl-ref: (gsl-ref). GNU Scientific Library - Reference +END-INFO-DIR-ENTRY + + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "GNU General Public License" and "Free Software +Needs Free Documentation", the Front-Cover text being "A GNU Manual", +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled "GNU Free Documentation +License". + + (a) The Back-Cover Text is: "You have the freedom to copy and modify +this GNU Manual." + + +File: gsl-ref.info, Node: Initializing the Multidimensional Solver, Next: Providing the multidimensional system of equations to solve, Prev: Overview of Multidimensional Root Finding, Up: Multidimensional Root-Finding + +35.2 Initializing the Solver +============================ + +The following functions initialize a multidimensional solver, either +with or without derivatives. The solver itself depends only on the +dimension of the problem and the algorithm and can be reused for +different problems. + + -- Function: gsl_multiroot_fsolver * gsl_multiroot_fsolver_alloc + (const gsl_multiroot_fsolver_type * T, size_t N) + This function returns a pointer to a newly allocated instance of a + solver of type T for a system of N dimensions. For example, the + following code creates an instance of a hybrid solver, to solve a + 3-dimensional system of equations. + + const gsl_multiroot_fsolver_type * T + = gsl_multiroot_fsolver_hybrid; + gsl_multiroot_fsolver * s + = gsl_multiroot_fsolver_alloc (T, 3); + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: gsl_multiroot_fdfsolver * gsl_multiroot_fdfsolver_alloc + (const gsl_multiroot_fdfsolver_type * T, size_t N) + This function returns a pointer to a newly allocated instance of a + derivative solver of type T for a system of N dimensions. For + example, the following code creates an instance of a + Newton-Raphson solver, for a 2-dimensional system of equations. + + const gsl_multiroot_fdfsolver_type * T + = gsl_multiroot_fdfsolver_newton; + gsl_multiroot_fdfsolver * s = + gsl_multiroot_fdfsolver_alloc (T, 2); + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: int gsl_multiroot_fsolver_set (gsl_multiroot_fsolver * S, + gsl_multiroot_function * F, const gsl_vector * X) + -- Function: int gsl_multiroot_fdfsolver_set (gsl_multiroot_fdfsolver + * S, gsl_multiroot_function_fdf * FDF, const gsl_vector * X) + These functions set, or reset, an existing solver S to use the + function F or function and derivative FDF, and the initial guess + X. Note that the initial position is copied from X, this argument + is not modified by subsequent iterations. + + -- Function: void gsl_multiroot_fsolver_free (gsl_multiroot_fsolver * + S) + -- Function: void gsl_multiroot_fdfsolver_free + (gsl_multiroot_fdfsolver * S) + These functions free all the memory associated with the solver S. + + -- Function: const char * gsl_multiroot_fsolver_name (const + gsl_multiroot_fsolver * S) + -- Function: const char * gsl_multiroot_fdfsolver_name (const + gsl_multiroot_fdfsolver * S) + These functions return a pointer to the name of the solver. For + example, + + printf ("s is a '%s' solver\n", + gsl_multiroot_fdfsolver_name (s)); + + would print something like `s is a 'newton' solver'. + + +File: gsl-ref.info, Node: Providing the multidimensional system of equations to solve, Next: Iteration of the multidimensional solver, Prev: Initializing the Multidimensional Solver, Up: Multidimensional Root-Finding + +35.3 Providing the function to solve +==================================== + +You must provide n functions of n variables for the root finders to +operate on. In order to allow for general parameters the functions are +defined by the following data types: + + -- Data Type: gsl_multiroot_function + This data type defines a general system of functions with + parameters. + + `int (* f) (const gsl_vector * X, void * PARAMS, gsl_vector * F)' + this function should store the vector result f(x,params) in F + for argument X and parameters PARAMS, returning an + appropriate error code if the function cannot be computed. + + `size_t n' + the dimension of the system, i.e. the number of components of + the vectors X and F. + + `void * params' + a pointer to the parameters of the function. + +Here is an example using Powell's test function, + + f_1(x) = A x_0 x_1 - 1, + f_2(x) = exp(-x_0) + exp(-x_1) - (1 + 1/A) + +with A = 10^4. The following code defines a `gsl_multiroot_function' +system `F' which you could pass to a solver: + + struct powell_params { double A; }; + + int + powell (gsl_vector * x, void * p, gsl_vector * f) { + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + + gsl_vector_set (f, 0, A * x0 * x1 - 1); + gsl_vector_set (f, 1, (exp(-x0) + exp(-x1) + - (1.0 + 1.0/A))); + return GSL_SUCCESS + } + + gsl_multiroot_function F; + struct powell_params params = { 10000.0 }; + + F.f = &powell; + F.n = 2; + F.params = ¶ms; + + -- Data Type: gsl_multiroot_function_fdf + This data type defines a general system of functions with + parameters and the corresponding Jacobian matrix of derivatives, + + `int (* f) (const gsl_vector * X, void * PARAMS, gsl_vector * F)' + this function should store the vector result f(x,params) in F + for argument X and parameters PARAMS, returning an + appropriate error code if the function cannot be computed. + + `int (* df) (const gsl_vector * X, void * PARAMS, gsl_matrix * J)' + this function should store the N-by-N matrix result J_ij = d + f_i(x,params) / d x_j in J for argument X and parameters + PARAMS, returning an appropriate error code if the function + cannot be computed. + + `int (* fdf) (const gsl_vector * X, void * PARAMS, gsl_vector * F, gsl_matrix * J)' + This function should set the values of the F and J as above, + for arguments X and parameters PARAMS. This function + provides an optimization of the separate functions for f(x) + and J(x)--it is always faster to compute the function and its + derivative at the same time. + + `size_t n' + the dimension of the system, i.e. the number of components of + the vectors X and F. + + `void * params' + a pointer to the parameters of the function. + +The example of Powell's test function defined above can be extended to +include analytic derivatives using the following code, + + int + powell_df (gsl_vector * x, void * p, gsl_matrix * J) + { + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + gsl_matrix_set (J, 0, 0, A * x1); + gsl_matrix_set (J, 0, 1, A * x0); + gsl_matrix_set (J, 1, 0, -exp(-x0)); + gsl_matrix_set (J, 1, 1, -exp(-x1)); + return GSL_SUCCESS + } + + int + powell_fdf (gsl_vector * x, void * p, + gsl_matrix * f, gsl_matrix * J) { + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + + const double u0 = exp(-x0); + const double u1 = exp(-x1); + + gsl_vector_set (f, 0, A * x0 * x1 - 1); + gsl_vector_set (f, 1, u0 + u1 - (1 + 1/A)); + + gsl_matrix_set (J, 0, 0, A * x1); + gsl_matrix_set (J, 0, 1, A * x0); + gsl_matrix_set (J, 1, 0, -u0); + gsl_matrix_set (J, 1, 1, -u1); + return GSL_SUCCESS + } + + gsl_multiroot_function_fdf FDF; + + FDF.f = &powell_f; + FDF.df = &powell_df; + FDF.fdf = &powell_fdf; + FDF.n = 2; + FDF.params = 0; + +Note that the function `powell_fdf' is able to reuse existing terms +from the function when calculating the Jacobian, thus saving time. + + +File: gsl-ref.info, Node: Iteration of the multidimensional solver, Next: Search Stopping Parameters for the multidimensional solver, Prev: Providing the multidimensional system of equations to solve, Up: Multidimensional Root-Finding + +35.4 Iteration +============== + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + + -- Function: int gsl_multiroot_fsolver_iterate (gsl_multiroot_fsolver + * S) + -- Function: int gsl_multiroot_fdfsolver_iterate + (gsl_multiroot_fdfsolver * S) + These functions perform a single iteration of the solver S. If the + iteration encounters an unexpected problem then an error code will + be returned, + + `GSL_EBADFUNC' + the iteration encountered a singular point where the function + or its derivative evaluated to `Inf' or `NaN'. + + `GSL_ENOPROG' + the iteration is not making any progress, preventing the + algorithm from continuing. + + The solver maintains a current best estimate of the root `s->x' and +its function value `s->f' at all times. This information can be +accessed with the following auxiliary functions, + + -- Function: gsl_vector * gsl_multiroot_fsolver_root (const + gsl_multiroot_fsolver * S) + -- Function: gsl_vector * gsl_multiroot_fdfsolver_root (const + gsl_multiroot_fdfsolver * S) + These functions return the current estimate of the root for the + solver S, given by `s->x'. + + -- Function: gsl_vector * gsl_multiroot_fsolver_f (const + gsl_multiroot_fsolver * S) + -- Function: gsl_vector * gsl_multiroot_fdfsolver_f (const + gsl_multiroot_fdfsolver * S) + These functions return the function value f(x) at the current + estimate of the root for the solver S, given by `s->f'. + + -- Function: gsl_vector * gsl_multiroot_fsolver_dx (const + gsl_multiroot_fsolver * S) + -- Function: gsl_vector * gsl_multiroot_fdfsolver_dx (const + gsl_multiroot_fdfsolver * S) + These functions return the last step dx taken by the solver S, + given by `s->dx'. + + +File: gsl-ref.info, Node: Search Stopping Parameters for the multidimensional solver, Next: Algorithms using Derivatives, Prev: Iteration of the multidimensional solver, Up: Multidimensional Root-Finding + +35.5 Search Stopping Parameters +=============================== + +A root finding procedure should stop when one of the following +conditions is true: + + * A multidimensional root has been found to within the + user-specified precision. + + * A user-specified maximum number of iterations has been reached. + + * An error has occurred. + +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result in +several standard ways. + + -- Function: int gsl_multiroot_test_delta (const gsl_vector * DX, + const gsl_vector * X, double EPSABS, double EPSREL) + This function tests for the convergence of the sequence by + comparing the last step DX with the absolute error EPSABS and + relative error EPSREL to the current position X. The test returns + `GSL_SUCCESS' if the following condition is achieved, + + |dx_i| < epsabs + epsrel |x_i| + + for each component of X and returns `GSL_CONTINUE' otherwise. + + -- Function: int gsl_multiroot_test_residual (const gsl_vector * F, + double EPSABS) + This function tests the residual value F against the absolute + error bound EPSABS. The test returns `GSL_SUCCESS' if the + following condition is achieved, + + \sum_i |f_i| < epsabs + + and returns `GSL_CONTINUE' otherwise. This criterion is suitable + for situations where the precise location of the root, x, is + unimportant provided a value can be found where the residual is + small enough. + + +File: gsl-ref.info, Node: Algorithms using Derivatives, Next: Algorithms without Derivatives, Prev: Search Stopping Parameters for the multidimensional solver, Up: Multidimensional Root-Finding + +35.6 Algorithms using Derivatives +================================= + +The root finding algorithms described in this section make use of both +the function and its derivative. They require an initial guess for the +location of the root, but there is no absolute guarantee of +convergence--the function must be suitable for this technique and the +initial guess must be sufficiently close to the root for it to work. +When the conditions are satisfied then convergence is quadratic. + + -- Derivative Solver: gsl_multiroot_fdfsolver_hybridsj + This is a modified version of Powell's Hybrid method as + implemented in the HYBRJ algorithm in MINPACK. Minpack was + written by Jorge J. More', Burton S. Garbow and Kenneth E. + Hillstrom. The Hybrid algorithm retains the fast convergence of + Newton's method but will also reduce the residual when Newton's + method is unreliable. + + The algorithm uses a generalized trust region to keep each step + under control. In order to be accepted a proposed new position x' + must satisfy the condition |D (x' - x)| < \delta, where D is a + diagonal scaling matrix and \delta is the size of the trust + region. The components of D are computed internally, using the + column norms of the Jacobian to estimate the sensitivity of the + residual to each component of x. This improves the behavior of the + algorithm for badly scaled functions. + + On each iteration the algorithm first determines the standard + Newton step by solving the system J dx = - f. If this step falls + inside the trust region it is used as a trial step in the next + stage. If not, the algorithm uses the linear combination of the + Newton and gradient directions which is predicted to minimize the + norm of the function while staying inside the trust region, + + dx = - \alpha J^{-1} f(x) - \beta \nabla |f(x)|^2. + + This combination of Newton and gradient directions is referred to + as a "dogleg step". + + The proposed step is now tested by evaluating the function at the + resulting point, x'. If the step reduces the norm of the function + sufficiently then it is accepted and size of the trust region is + increased. If the proposed step fails to improve the solution + then the size of the trust region is decreased and another trial + step is computed. + + The speed of the algorithm is increased by computing the changes + to the Jacobian approximately, using a rank-1 update. If two + successive attempts fail to reduce the residual then the full + Jacobian is recomputed. The algorithm also monitors the progress + of the solution and returns an error if several steps fail to make + any improvement, + + `GSL_ENOPROG' + the iteration is not making any progress, preventing the + algorithm from continuing. + + `GSL_ENOPROGJ' + re-evaluations of the Jacobian indicate that the iteration is + not making any progress, preventing the algorithm from + continuing. + + + -- Derivative Solver: gsl_multiroot_fdfsolver_hybridj + This algorithm is an unscaled version of `hybridsj'. The steps are + controlled by a spherical trust region |x' - x| < \delta, instead + of a generalized region. This can be useful if the generalized + region estimated by `hybridsj' is inappropriate. + + -- Derivative Solver: gsl_multiroot_fdfsolver_newton + Newton's Method is the standard root-polishing algorithm. The + algorithm begins with an initial guess for the location of the + solution. On each iteration a linear approximation to the + function F is used to estimate the step which will zero all the + components of the residual. The iteration is defined by the + following sequence, + + x -> x' = x - J^{-1} f(x) + + where the Jacobian matrix J is computed from the derivative + functions provided by F. The step dx is obtained by solving the + linear system, + + J dx = - f(x) + + using LU decomposition. If the Jacobian matrix is singular, an + error code of `GSL_EDOM' is returned. + + -- Derivative Solver: gsl_multiroot_fdfsolver_gnewton + This is a modified version of Newton's method which attempts to + improve global convergence by requiring every step to reduce the + Euclidean norm of the residual, |f(x)|. If the Newton step leads + to an increase in the norm then a reduced step of relative size, + + t = (\sqrt(1 + 6 r) - 1) / (3 r) + + is proposed, with r being the ratio of norms |f(x')|^2/|f(x)|^2. + This procedure is repeated until a suitable step size is found. + + +File: gsl-ref.info, Node: Algorithms without Derivatives, Next: Example programs for Multidimensional Root finding, Prev: Algorithms using Derivatives, Up: Multidimensional Root-Finding + +35.7 Algorithms without Derivatives +=================================== + +The algorithms described in this section do not require any derivative +information to be supplied by the user. Any derivatives needed are +approximated by finite differences. Note that if the +finite-differencing step size chosen by these routines is inappropriate, +an explicit user-supplied numerical derivative can always be used with +the algorithms described in the previous section. + + -- Solver: gsl_multiroot_fsolver_hybrids + This is a version of the Hybrid algorithm which replaces calls to + the Jacobian function by its finite difference approximation. The + finite difference approximation is computed using + `gsl_multiroots_fdjac' with a relative step size of + `GSL_SQRT_DBL_EPSILON'. Note that this step size will not be + suitable for all problems. + + -- Solver: gsl_multiroot_fsolver_hybrid + This is a finite difference version of the Hybrid algorithm without + internal scaling. + + -- Solver: gsl_multiroot_fsolver_dnewton + The "discrete Newton algorithm" is the simplest method of solving a + multidimensional system. It uses the Newton iteration + + x -> x - J^{-1} f(x) + + where the Jacobian matrix J is approximated by taking finite + differences of the function F. The approximation scheme used by + this implementation is, + + J_{ij} = (f_i(x + \delta_j) - f_i(x)) / \delta_j + + where \delta_j is a step of size \sqrt\epsilon |x_j| with \epsilon + being the machine precision (\epsilon \approx 2.22 \times 10^-16). + The order of convergence of Newton's algorithm is quadratic, but + the finite differences require n^2 function evaluations on each + iteration. The algorithm may become unstable if the finite + differences are not a good approximation to the true derivatives. + + -- Solver: gsl_multiroot_fsolver_broyden + The "Broyden algorithm" is a version of the discrete Newton + algorithm which attempts to avoids the expensive update of the + Jacobian matrix on each iteration. The changes to the Jacobian + are also approximated, using a rank-1 update, + + J^{-1} \to J^{-1} - (J^{-1} df - dx) dx^T J^{-1} / dx^T J^{-1} df + + where the vectors dx and df are the changes in x and f. On the + first iteration the inverse Jacobian is estimated using finite + differences, as in the discrete Newton algorithm. + + This approximation gives a fast update but is unreliable if the + changes are not small, and the estimate of the inverse Jacobian + becomes worse as time passes. The algorithm has a tendency to + become unstable unless it starts close to the root. The Jacobian + is refreshed if this instability is detected (consult the source + for details). + + This algorithm is included only for demonstration purposes, and is + not recommended for serious use. + + +File: gsl-ref.info, Node: Example programs for Multidimensional Root finding, Next: References and Further Reading for Multidimensional Root Finding, Prev: Algorithms without Derivatives, Up: Multidimensional Root-Finding + +35.8 Examples +============= + +The multidimensional solvers are used in a similar way to the +one-dimensional root finding algorithms. This first example +demonstrates the `hybrids' scaled-hybrid algorithm, which does not +require derivatives. The program solves the Rosenbrock system of +equations, + + f_1 (x, y) = a (1 - x) + f_2 (x, y) = b (y - x^2) + +with a = 1, b = 10. The solution of this system lies at (x,y) = (1,1) +in a narrow valley. + + The first stage of the program is to define the system of equations, + + #include + #include + #include + #include + + struct rparams + { + double a; + double b; + }; + + int + rosenbrock_f (const gsl_vector * x, void *params, + gsl_vector * f) + { + double a = ((struct rparams *) params)->a; + double b = ((struct rparams *) params)->b; + + const double x0 = gsl_vector_get (x, 0); + const double x1 = gsl_vector_get (x, 1); + + const double y0 = a * (1 - x0); + const double y1 = b * (x1 - x0 * x0); + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + return GSL_SUCCESS; + } + +The main program begins by creating the function object `f', with the +arguments `(x,y)' and parameters `(a,b)'. The solver `s' is initialized +to use this function, with the `hybrids' method. + + int + main (void) + { + const gsl_multiroot_fsolver_type *T; + gsl_multiroot_fsolver *s; + + int status; + size_t i, iter = 0; + + const size_t n = 2; + struct rparams p = {1.0, 10.0}; + gsl_multiroot_function f = {&rosenbrock_f, n, &p}; + + double x_init[2] = {-10.0, -5.0}; + gsl_vector *x = gsl_vector_alloc (n); + + gsl_vector_set (x, 0, x_init[0]); + gsl_vector_set (x, 1, x_init[1]); + + T = gsl_multiroot_fsolver_hybrids; + s = gsl_multiroot_fsolver_alloc (T, 2); + gsl_multiroot_fsolver_set (s, &f, x); + + print_state (iter, s); + + do + { + iter++; + status = gsl_multiroot_fsolver_iterate (s); + + print_state (iter, s); + + if (status) /* check if solver is stuck */ + break; + + status = + gsl_multiroot_test_residual (s->f, 1e-7); + } + while (status == GSL_CONTINUE && iter < 1000); + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multiroot_fsolver_free (s); + gsl_vector_free (x); + return 0; + } + +Note that it is important to check the return status of each solver +step, in case the algorithm becomes stuck. If an error condition is +detected, indicating that the algorithm cannot proceed, then the error +can be reported to the user, a new starting point chosen or a different +algorithm used. + + The intermediate state of the solution is displayed by the following +function. The solver state contains the vector `s->x' which is the +current position, and the vector `s->f' with corresponding function +values. + + int + print_state (size_t iter, gsl_multiroot_fsolver * s) + { + printf ("iter = %3u x = % .3f % .3f " + "f(x) = % .3e % .3e\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + gsl_vector_get (s->f, 0), + gsl_vector_get (s->f, 1)); + } + +Here are the results of running the program. The algorithm is started at +(-10,-5) far from the solution. Since the solution is hidden in a +narrow valley the earliest steps follow the gradient of the function +downhill, in an attempt to reduce the large value of the residual. Once +the root has been approximately located, on iteration 8, the Newton +behavior takes over and convergence is very rapid. + + iter = 0 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 + iter = 1 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 + iter = 2 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 + iter = 3 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 + iter = 4 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 + iter = 5 x = -1.274 -5.680 f(x) = 2.274e+00 -7.302e+01 + iter = 6 x = -1.274 -5.680 f(x) = 2.274e+00 -7.302e+01 + iter = 7 x = 0.249 0.298 f(x) = 7.511e-01 2.359e+00 + iter = 8 x = 0.249 0.298 f(x) = 7.511e-01 2.359e+00 + iter = 9 x = 1.000 0.878 f(x) = 1.268e-10 -1.218e+00 + iter = 10 x = 1.000 0.989 f(x) = 1.124e-11 -1.080e-01 + iter = 11 x = 1.000 1.000 f(x) = 0.000e+00 0.000e+00 + status = success + +Note that the algorithm does not update the location on every +iteration. Some iterations are used to adjust the trust-region +parameter, after trying a step which was found to be divergent, or to +recompute the Jacobian, when poor convergence behavior is detected. + + The next example program adds derivative information, in order to +accelerate the solution. There are two derivative functions +`rosenbrock_df' and `rosenbrock_fdf'. The latter computes both the +function and its derivative simultaneously. This allows the +optimization of any common terms. For simplicity we substitute calls to +the separate `f' and `df' functions at this point in the code below. + + int + rosenbrock_df (const gsl_vector * x, void *params, + gsl_matrix * J) + { + const double a = ((struct rparams *) params)->a; + const double b = ((struct rparams *) params)->b; + + const double x0 = gsl_vector_get (x, 0); + + const double df00 = -a; + const double df01 = 0; + const double df10 = -2 * b * x0; + const double df11 = b; + + gsl_matrix_set (J, 0, 0, df00); + gsl_matrix_set (J, 0, 1, df01); + gsl_matrix_set (J, 1, 0, df10); + gsl_matrix_set (J, 1, 1, df11); + + return GSL_SUCCESS; + } + + int + rosenbrock_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * J) + { + rosenbrock_f (x, params, f); + rosenbrock_df (x, params, J); + + return GSL_SUCCESS; + } + +The main program now makes calls to the corresponding `fdfsolver' +versions of the functions, + + int + main (void) + { + const gsl_multiroot_fdfsolver_type *T; + gsl_multiroot_fdfsolver *s; + + int status; + size_t i, iter = 0; + + const size_t n = 2; + struct rparams p = {1.0, 10.0}; + gsl_multiroot_function_fdf f = {&rosenbrock_f, + &rosenbrock_df, + &rosenbrock_fdf, + n, &p}; + + double x_init[2] = {-10.0, -5.0}; + gsl_vector *x = gsl_vector_alloc (n); + + gsl_vector_set (x, 0, x_init[0]); + gsl_vector_set (x, 1, x_init[1]); + + T = gsl_multiroot_fdfsolver_gnewton; + s = gsl_multiroot_fdfsolver_alloc (T, n); + gsl_multiroot_fdfsolver_set (s, &f, x); + + print_state (iter, s); + + do + { + iter++; + + status = gsl_multiroot_fdfsolver_iterate (s); + + print_state (iter, s); + + if (status) + break; + + status = gsl_multiroot_test_residual (s->f, 1e-7); + } + while (status == GSL_CONTINUE && iter < 1000); + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multiroot_fdfsolver_free (s); + gsl_vector_free (x); + return 0; + } + +The addition of derivative information to the `hybrids' solver does not +make any significant difference to its behavior, since it able to +approximate the Jacobian numerically with sufficient accuracy. To +illustrate the behavior of a different derivative solver we switch to +`gnewton'. This is a traditional Newton solver with the constraint that +it scales back its step if the full step would lead "uphill". Here is +the output for the `gnewton' algorithm, + + iter = 0 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 + iter = 1 x = -4.231 -65.317 f(x) = 5.231e+00 -8.321e+02 + iter = 2 x = 1.000 -26.358 f(x) = -8.882e-16 -2.736e+02 + iter = 3 x = 1.000 1.000 f(x) = -2.220e-16 -4.441e-15 + status = success + +The convergence is much more rapid, but takes a wide excursion out to +the point (-4.23,-65.3). This could cause the algorithm to go astray in +a realistic application. The hybrid algorithm follows the downhill +path to the solution more reliably. + + +File: gsl-ref.info, Node: References and Further Reading for Multidimensional Root Finding, Prev: Example programs for Multidimensional Root finding, Up: Multidimensional Root-Finding + +35.9 References and Further Reading +=================================== + +The original version of the Hybrid method is described in the following +articles by Powell, + + M.J.D. Powell, "A Hybrid Method for Nonlinear Equations" (Chap 6, p + 87-114) and "A Fortran Subroutine for Solving systems of Nonlinear + Algebraic Equations" (Chap 7, p 115-161), in `Numerical Methods for + Nonlinear Algebraic Equations', P. Rabinowitz, editor. Gordon and + Breach, 1970. + +The following papers are also relevant to the algorithms described in +this section, + + J.J. More', M.Y. Cosnard, "Numerical Solution of Nonlinear + Equations", `ACM Transactions on Mathematical Software', Vol 5, No + 1, (1979), p 64-85 + + C.G. Broyden, "A Class of Methods for Solving Nonlinear + Simultaneous Equations", `Mathematics of Computation', Vol 19 + (1965), p 577-593 + + J.J. More', B.S. Garbow, K.E. Hillstrom, "Testing Unconstrained + Optimization Software", ACM Transactions on Mathematical Software, + Vol 7, No 1 (1981), p 17-41 + + +File: gsl-ref.info, Node: Multidimensional Minimization, Next: Least-Squares Fitting, Prev: Multidimensional Root-Finding, Up: Top + +36 Multidimensional Minimization +******************************** + +This chapter describes routines for finding minima of arbitrary +multidimensional functions. The library provides low level components +for a variety of iterative minimizers and convergence tests. These can +be combined by the user to achieve the desired solution, while providing +full access to the intermediate steps of the algorithms. Each class of +methods uses the same framework, so that you can switch between +minimizers at runtime without needing to recompile your program. Each +instance of a minimizer keeps track of its own state, allowing the +minimizers to be used in multi-threaded programs. The minimization +algorithms can be used to maximize a function by inverting its sign. + + The header file `gsl_multimin.h' contains prototypes for the +minimization functions and related declarations. + +* Menu: + +* Multimin Overview:: +* Multimin Caveats:: +* Initializing the Multidimensional Minimizer:: +* Providing a function to minimize:: +* Multimin Iteration:: +* Multimin Stopping Criteria:: +* Multimin Algorithms with Derivatives:: +* Multimin Algorithms without Derivatives:: +* Multimin Examples:: +* Multimin References and Further Reading:: + + +File: gsl-ref.info, Node: Multimin Overview, Next: Multimin Caveats, Up: Multidimensional Minimization + +36.1 Overview +============= + +The problem of multidimensional minimization requires finding a point x +such that the scalar function, + + f(x_1, ..., x_n) + +takes a value which is lower than at any neighboring point. For smooth +functions the gradient g = \nabla f vanishes at the minimum. In general +there are no bracketing methods available for the minimization of +n-dimensional functions. The algorithms proceed from an initial guess +using a search algorithm which attempts to move in a downhill direction. + + Algorithms making use of the gradient of the function perform a +one-dimensional line minimisation along this direction until the lowest +point is found to a suitable tolerance. The search direction is then +updated with local information from the function and its derivatives, +and the whole process repeated until the true n-dimensional minimum is +found. + + Algorithms which do not require the gradient of the function use +different strategies. For example, the Nelder-Mead Simplex algorithm +maintains n+1 trial parameter vectors as the vertices of a +n-dimensional simplex. On each iteration it tries to improve the worst +vertex of the simplex by geometrical transformations. The iterations +are continued until the overall size of the simplex has decreased +sufficiently. + + Both types of algorithms use a standard framework. The user provides +a high-level driver for the algorithms, and the library provides the +individual functions necessary for each of the steps. There are three +main phases of the iteration. The steps are, + + * initialize minimizer state, S, for algorithm T + + * update S using the iteration T + + * test S for convergence, and repeat iteration if necessary + +Each iteration step consists either of an improvement to the +line-minimisation in the current direction or an update to the search +direction itself. The state for the minimizers is held in a +`gsl_multimin_fdfminimizer' struct or a `gsl_multimin_fminimizer' +struct. + + +File: gsl-ref.info, Node: Multimin Caveats, Next: Initializing the Multidimensional Minimizer, Prev: Multimin Overview, Up: Multidimensional Minimization + +36.2 Caveats +============ + +Note that the minimization algorithms can only search for one local +minimum at a time. When there are several local minima in the search +area, the first minimum to be found will be returned; however it is +difficult to predict which of the minima this will be. In most cases, +no error will be reported if you try to find a local minimum in an area +where there is more than one. + + It is also important to note that the minimization algorithms find +local minima; there is no way to determine whether a minimum is a global +minimum of the function in question. + + +File: gsl-ref.info, Node: Initializing the Multidimensional Minimizer, Next: Providing a function to minimize, Prev: Multimin Caveats, Up: Multidimensional Minimization + +36.3 Initializing the Multidimensional Minimizer +================================================ + +The following function initializes a multidimensional minimizer. The +minimizer itself depends only on the dimension of the problem and the +algorithm and can be reused for different problems. + + -- Function: gsl_multimin_fdfminimizer * +gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type * + T, size_t N) + -- Function: gsl_multimin_fminimizer * gsl_multimin_fminimizer_alloc + (const gsl_multimin_fminimizer_type * T, size_t N) + This function returns a pointer to a newly allocated instance of a + minimizer of type T for an N-dimension function. If there is + insufficient memory to create the minimizer then the function + returns a null pointer and the error handler is invoked with an + error code of `GSL_ENOMEM'. + + -- Function: int gsl_multimin_fdfminimizer_set + (gsl_multimin_fdfminimizer * S, gsl_multimin_function_fdf * + FDF, const gsl_vector * X, double STEP_SIZE, double TOL) + This function initializes the minimizer S to minimize the function + FDF starting from the initial point X. The size of the first + trial step is given by STEP_SIZE. The accuracy of the line + minimization is specified by TOL. The precise meaning of this + parameter depends on the method used. Typically the line + minimization is considered successful if the gradient of the + function g is orthogonal to the current search direction p to a + relative accuracy of TOL, where dot(p,g) < tol |p| |g|. A TOL + value of 0.1 is suitable for most purposes, since line + minimization only needs to be carried out approximately. Note + that setting TOL to zero will force the use of "exact" + line-searches, which are extremely expensive. + + -- Function: int gsl_multimin_fminimizer_set (gsl_multimin_fminimizer + * S, gsl_multimin_function * F, const gsl_vector * X, const + gsl_vector * STEP_SIZE) + This function initializes the minimizer S to minimize the function + F, starting from the initial point X. The size of the initial + trial steps is given in vector STEP_SIZE. The precise meaning of + this parameter depends on the method used. + + -- Function: void gsl_multimin_fdfminimizer_free + (gsl_multimin_fdfminimizer * S) + -- Function: void gsl_multimin_fminimizer_free + (gsl_multimin_fminimizer * S) + This function frees all the memory associated with the minimizer S. + + -- Function: const char * gsl_multimin_fdfminimizer_name (const + gsl_multimin_fdfminimizer * S) + -- Function: const char * gsl_multimin_fminimizer_name (const + gsl_multimin_fminimizer * S) + This function returns a pointer to the name of the minimizer. For + example, + + printf ("s is a '%s' minimizer\n", + gsl_multimin_fdfminimizer_name (s)); + + would print something like `s is a 'conjugate_pr' minimizer'. + + +File: gsl-ref.info, Node: Providing a function to minimize, Next: Multimin Iteration, Prev: Initializing the Multidimensional Minimizer, Up: Multidimensional Minimization + +36.4 Providing a function to minimize +===================================== + +You must provide a parametric function of n variables for the +minimizers to operate on. You may also need to provide a routine which +calculates the gradient of the function and a third routine which +calculates both the function value and the gradient together. In order +to allow for general parameters the functions are defined by the +following data types: + + -- Data Type: gsl_multimin_function_fdf + This data type defines a general function of n variables with + parameters and the corresponding gradient vector of derivatives, + + `double (* f) (const gsl_vector * X, void * PARAMS)' + this function should return the result f(x,params) for + argument X and parameters PARAMS. If the function cannot be + computed, an error value of `GSL_NAN' should be returned. + + `void (* df) (const gsl_vector * X, void * PARAMS, gsl_vector * G)' + this function should store the N-dimensional gradient g_i = d + f(x,params) / d x_i in the vector G for argument X and + parameters PARAMS, returning an appropriate error code if the + function cannot be computed. + + `void (* fdf) (const gsl_vector * X, void * PARAMS, double * f, gsl_vector * G)' + This function should set the values of the F and G as above, + for arguments X and parameters PARAMS. This function + provides an optimization of the separate functions for f(x) + and g(x)--it is always faster to compute the function and its + derivative at the same time. + + `size_t n' + the dimension of the system, i.e. the number of components of + the vectors X. + + `void * params' + a pointer to the parameters of the function. + + -- Data Type: gsl_multimin_function + This data type defines a general function of n variables with + parameters, + + `double (* f) (const gsl_vector * X, void * PARAMS)' + this function should return the result f(x,params) for + argument X and parameters PARAMS. If the function cannot be + computed, an error value of `GSL_NAN' should be returned. + + `size_t n' + the dimension of the system, i.e. the number of components of + the vectors X. + + `void * params' + a pointer to the parameters of the function. + +The following example function defines a simple two-dimensional +paraboloid with five parameters, + + /* Paraboloid centered on (p[0],p[1]), with + scale factors (p[2],p[3]) and minimum p[4] */ + + double + my_f (const gsl_vector *v, void *params) + { + double x, y; + double *p = (double *)params; + + x = gsl_vector_get(v, 0); + y = gsl_vector_get(v, 1); + + return p[2] * (x - p[0]) * (x - p[0]) + + p[3] * (y - p[1]) * (y - p[1]) + p[4]; + } + + /* The gradient of f, df = (df/dx, df/dy). */ + void + my_df (const gsl_vector *v, void *params, + gsl_vector *df) + { + double x, y; + double *p = (double *)params; + + x = gsl_vector_get(v, 0); + y = gsl_vector_get(v, 1); + + gsl_vector_set(df, 0, 2.0 * p[2] * (x - p[0])); + gsl_vector_set(df, 1, 2.0 * p[3] * (y - p[1])); + } + + /* Compute both f and df together. */ + void + my_fdf (const gsl_vector *x, void *params, + double *f, gsl_vector *df) + { + *f = my_f(x, params); + my_df(x, params, df); + } + +The function can be initialized using the following code, + + gsl_multimin_function_fdf my_func; + + /* Paraboloid center at (1,2), scale factors (10, 20), + minimum value 30 */ + double p[5] = { 1.0, 2.0, 10.0, 20.0, 30.0 }; + + my_func.n = 2; /* number of function components */ + my_func.f = &my_f; + my_func.df = &my_df; + my_func.fdf = &my_fdf; + my_func.params = (void *)p; + + +File: gsl-ref.info, Node: Multimin Iteration, Next: Multimin Stopping Criteria, Prev: Providing a function to minimize, Up: Multidimensional Minimization + +36.5 Iteration +============== + +The following function drives the iteration of each algorithm. The +function performs one iteration to update the state of the minimizer. +The same function works for all minimizers so that different methods can +be substituted at runtime without modifications to the code. + + -- Function: int gsl_multimin_fdfminimizer_iterate + (gsl_multimin_fdfminimizer * S) + -- Function: int gsl_multimin_fminimizer_iterate + (gsl_multimin_fminimizer * S) + These functions perform a single iteration of the minimizer S. If + the iteration encounters an unexpected problem then an error code + will be returned. The error code `GSL_ENOPROG' signifies that the + minimizer is unable to improve on its current estimate, either due + to numerical difficulty or because a genuine local minimum has been + reached. + +The minimizer maintains a current best estimate of the minimum at all +times. This information can be accessed with the following auxiliary +functions, + + -- Function: gsl_vector * gsl_multimin_fdfminimizer_x (const + gsl_multimin_fdfminimizer * S) + -- Function: gsl_vector * gsl_multimin_fminimizer_x (const + gsl_multimin_fminimizer * S) + -- Function: double gsl_multimin_fdfminimizer_minimum (const + gsl_multimin_fdfminimizer * S) + -- Function: double gsl_multimin_fminimizer_minimum (const + gsl_multimin_fminimizer * S) + -- Function: gsl_vector * gsl_multimin_fdfminimizer_gradient (const + gsl_multimin_fdfminimizer * S) + -- Function: double gsl_multimin_fminimizer_size (const + gsl_multimin_fminimizer * S) + These functions return the current best estimate of the location + of the minimum, the value of the function at that point, its + gradient, and minimizer specific characteristic size for the + minimizer S. + + -- Function: int gsl_multimin_fdfminimizer_restart + (gsl_multimin_fdfminimizer * S) + This function resets the minimizer S to use the current point as a + new starting point. + + +File: gsl-ref.info, Node: Multimin Stopping Criteria, Next: Multimin Algorithms with Derivatives, Prev: Multimin Iteration, Up: Multidimensional Minimization + +36.6 Stopping Criteria +====================== + +A minimization procedure should stop when one of the following +conditions is true: + + * A minimum has been found to within the user-specified precision. + + * A user-specified maximum number of iterations has been reached. + + * An error has occurred. + +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result. + + -- Function: int gsl_multimin_test_gradient (const gsl_vector * G, + double EPSABS) + This function tests the norm of the gradient G against the + absolute tolerance EPSABS. The gradient of a multidimensional + function goes to zero at a minimum. The test returns `GSL_SUCCESS' + if the following condition is achieved, + + |g| < epsabs + + and returns `GSL_CONTINUE' otherwise. A suitable choice of EPSABS + can be made from the desired accuracy in the function for small + variations in x. The relationship between these quantities is + given by \delta f = g \delta x. + + -- Function: int gsl_multimin_test_size (const double SIZE, double + EPSABS) + This function tests the minimizer specific characteristic size (if + applicable to the used minimizer) against absolute tolerance + EPSABS. The test returns `GSL_SUCCESS' if the size is smaller + than tolerance, otherwise `GSL_CONTINUE' is returned. + + +File: gsl-ref.info, Node: Multimin Algorithms with Derivatives, Next: Multimin Algorithms without Derivatives, Prev: Multimin Stopping Criteria, Up: Multidimensional Minimization + +36.7 Algorithms with Derivatives +================================ + +There are several minimization methods available. The best choice of +algorithm depends on the problem. The algorithms described in this +section use the value of the function and its gradient at each +evaluation point. + + -- Minimizer: gsl_multimin_fdfminimizer_conjugate_fr + This is the Fletcher-Reeves conjugate gradient algorithm. The + conjugate gradient algorithm proceeds as a succession of line + minimizations. The sequence of search directions is used to build + up an approximation to the curvature of the function in the + neighborhood of the minimum. + + An initial search direction P is chosen using the gradient, and + line minimization is carried out in that direction. The accuracy + of the line minimization is specified by the parameter TOL. The + minimum along this line occurs when the function gradient G and + the search direction P are orthogonal. The line minimization + terminates when dot(p,g) < tol |p| |g|. The search direction is + updated using the Fletcher-Reeves formula p' = g' - \beta g where + \beta=-|g'|^2/|g|^2, and the line minimization is then repeated + for the new search direction. + + -- Minimizer: gsl_multimin_fdfminimizer_conjugate_pr + This is the Polak-Ribiere conjugate gradient algorithm. It is + similar to the Fletcher-Reeves method, differing only in the + choice of the coefficient \beta. Both methods work well when the + evaluation point is close enough to the minimum of the objective + function that it is well approximated by a quadratic hypersurface. + + -- Minimizer: gsl_multimin_fdfminimizer_vector_bfgs2 + -- Minimizer: gsl_multimin_fdfminimizer_vector_bfgs + These methods use the vector Broyden-Fletcher-Goldfarb-Shanno + (BFGS) algorithm. This is a quasi-Newton method which builds up + an approximation to the second derivatives of the function f using + the difference between successive gradient vectors. By combining + the first and second derivatives the algorithm is able to take + Newton-type steps towards the function minimum, assuming quadratic + behavior in that region. + + The `bfgs2' version of this minimizer is the most efficient + version available, and is a faithful implementation of the line + minimization scheme described in Fletcher's `Practical Methods of + Optimization', Algorithms 2.6.2 and 2.6.4. It supersedes the + original `bfgs' routine and requires substantially fewer function + and gradient evaluations. The user-supplied tolerance TOL + corresponds to the parameter \sigma used by Fletcher. A value of + 0.1 is recommended for typical use (larger values correspond to + less accurate line searches). + + + -- Minimizer: gsl_multimin_fdfminimizer_steepest_descent + The steepest descent algorithm follows the downhill gradient of the + function at each step. When a downhill step is successful the + step-size is increased by a factor of two. If the downhill step + leads to a higher function value then the algorithm backtracks and + the step size is decreased using the parameter TOL. A suitable + value of TOL for most applications is 0.1. The steepest descent + method is inefficient and is included only for demonstration + purposes. + + +File: gsl-ref.info, Node: Multimin Algorithms without Derivatives, Next: Multimin Examples, Prev: Multimin Algorithms with Derivatives, Up: Multidimensional Minimization + +36.8 Algorithms without Derivatives +=================================== + +The algorithms described in this section use only the value of the +function at each evaluation point. + + -- Minimizer: gsl_multimin_fminimizer_nmsimplex2 + -- Minimizer: gsl_multimin_fminimizer_nmsimplex + These methods use the Simplex algorithm of Nelder and Mead. + Starting from the initial vector X = p_0, the algorithm constructs + an additional n vectors p_i using the step size vector s = + STEP_SIZE as follows: + + p_0 = (x_0, x_1, ... , x_n) + p_1 = (x_0 + s_0, x_1, ... , x_n) + p_2 = (x_0, x_1 + s_1, ... , x_n) + ... = ... + p_n = (x_0, x_1, ... , x_n + s_n) + + These vectors form the n+1 vertices of a simplex in n dimensions. + On each iteration the algorithm uses simple geometrical + transformations to update the vector corresponding to the highest + function value. The geometric transformations are reflection, + reflection followed by expansion, contraction and multiple + contraction. Using these transformations the simplex moves through + the space towards the minimum, where it contracts itself. + + After each iteration, the best vertex is returned. Note, that due + to the nature of the algorithm not every step improves the current + best parameter vector. Usually several iterations are required. + + The minimizer-specific characteristic size is calculated as the + average distance from the geometrical center of the simplex to all + its vertices. This size can be used as a stopping criteria, as the + simplex contracts itself near the minimum. The size is returned by + the function `gsl_multimin_fminimizer_size'. + + The `nmsimplex2' version of this minimiser is a new O(N) operations + implementation of the earlier O(N^2) operations `nmsimplex' + minimiser. It uses the same underlying algorithm, but the simplex + updates are computed more efficiently for high-dimensional + problems. In addition, the size of simplex is calculated as the + RMS distance of each vertex from the center rather than the mean + distance, allowing a linear update of this quantity on each step. + The memory usage is O(N^2) for both algorithms. + + -- Minimizer: gsl_multimin_fminimizer_nmsimplex2rand + This method is a variant of `nmsimplex2' which initialises the + simplex around the starting point X using a randomly-oriented set + of basis vectors instead of the fixed coordinate axes. The final + dimensions of the simplex are scaled along the coordinate axes by + the vector STEP_SIZE. The randomisation uses a simple + deterministic generator so that repeated calls to + `gsl_multimin_fminimizer_set' for a given solver object will vary + the orientation in a well-defined way. + + +File: gsl-ref.info, Node: Multimin Examples, Next: Multimin References and Further Reading, Prev: Multimin Algorithms without Derivatives, Up: Multidimensional Minimization + +36.9 Examples +============= + +This example program finds the minimum of the paraboloid function +defined earlier. The location of the minimum is offset from the origin +in x and y, and the function value at the minimum is non-zero. The main +program is given below, it requires the example function given earlier +in this chapter. + + int + main (void) + { + size_t iter = 0; + int status; + + const gsl_multimin_fdfminimizer_type *T; + gsl_multimin_fdfminimizer *s; + + /* Position of the minimum (1,2), scale factors + 10,20, height 30. */ + double par[5] = { 1.0, 2.0, 10.0, 20.0, 30.0 }; + + gsl_vector *x; + gsl_multimin_function_fdf my_func; + + my_func.n = 2; + my_func.f = my_f; + my_func.df = my_df; + my_func.fdf = my_fdf; + my_func.params = par; + + /* Starting point, x = (5,7) */ + x = gsl_vector_alloc (2); + gsl_vector_set (x, 0, 5.0); + gsl_vector_set (x, 1, 7.0); + + T = gsl_multimin_fdfminimizer_conjugate_fr; + s = gsl_multimin_fdfminimizer_alloc (T, 2); + + gsl_multimin_fdfminimizer_set (s, &my_func, x, 0.01, 1e-4); + + do + { + iter++; + status = gsl_multimin_fdfminimizer_iterate (s); + + if (status) + break; + + status = gsl_multimin_test_gradient (s->gradient, 1e-3); + + if (status == GSL_SUCCESS) + printf ("Minimum found at:\n"); + + printf ("%5d %.5f %.5f %10.5f\n", iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + s->f); + + } + while (status == GSL_CONTINUE && iter < 100); + + gsl_multimin_fdfminimizer_free (s); + gsl_vector_free (x); + + return 0; + } + +The initial step-size is chosen as 0.01, a conservative estimate in this +case, and the line minimization parameter is set at 0.0001. The program +terminates when the norm of the gradient has been reduced below 0.001. +The output of the program is shown below, + + x y f + 1 4.99629 6.99072 687.84780 + 2 4.98886 6.97215 683.55456 + 3 4.97400 6.93501 675.01278 + 4 4.94429 6.86073 658.10798 + 5 4.88487 6.71217 625.01340 + 6 4.76602 6.41506 561.68440 + 7 4.52833 5.82083 446.46694 + 8 4.05295 4.63238 261.79422 + 9 3.10219 2.25548 75.49762 + 10 2.85185 1.62963 67.03704 + 11 2.19088 1.76182 45.31640 + 12 0.86892 2.02622 30.18555 + Minimum found at: + 13 1.00000 2.00000 30.00000 + +Note that the algorithm gradually increases the step size as it +successfully moves downhill, as can be seen by plotting the successive +points. + +The conjugate gradient algorithm finds the minimum on its second +direction because the function is purely quadratic. Additional +iterations would be needed for a more complicated function. + + Here is another example using the Nelder-Mead Simplex algorithm to +minimize the same example object function, as above. + + int + main(void) + { + double par[5] = {1.0, 2.0, 10.0, 20.0, 30.0}; + + const gsl_multimin_fminimizer_type *T = + gsl_multimin_fminimizer_nmsimplex2; + gsl_multimin_fminimizer *s = NULL; + gsl_vector *ss, *x; + gsl_multimin_function minex_func; + + size_t iter = 0; + int status; + double size; + + /* Starting point */ + x = gsl_vector_alloc (2); + gsl_vector_set (x, 0, 5.0); + gsl_vector_set (x, 1, 7.0); + + /* Set initial step sizes to 1 */ + ss = gsl_vector_alloc (2); + gsl_vector_set_all (ss, 1.0); + + /* Initialize method and iterate */ + minex_func.n = 2; + minex_func.f = my_f; + minex_func.params = par; + + s = gsl_multimin_fminimizer_alloc (T, 2); + gsl_multimin_fminimizer_set (s, &minex_func, x, ss); + + do + { + iter++; + status = gsl_multimin_fminimizer_iterate(s); + + if (status) + break; + + size = gsl_multimin_fminimizer_size (s); + status = gsl_multimin_test_size (size, 1e-2); + + if (status == GSL_SUCCESS) + { + printf ("converged to minimum at\n"); + } + + printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + s->fval, size); + } + while (status == GSL_CONTINUE && iter < 100); + + gsl_vector_free(x); + gsl_vector_free(ss); + gsl_multimin_fminimizer_free (s); + + return status; + } + +The minimum search stops when the Simplex size drops to 0.01. The +output is shown below. + + 1 6.500e+00 5.000e+00 f() = 512.500 size = 1.130 + 2 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 + 3 5.250e+00 4.000e+00 f() = 290.625 size = 1.409 + 4 5.500e+00 1.000e+00 f() = 252.500 size = 1.409 + 5 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 + 6 2.625e+00 3.500e+00 f() = 101.406 size = 1.847 + 7 0.000e+00 3.000e+00 f() = 60.000 size = 1.847 + 8 2.094e+00 1.875e+00 f() = 42.275 size = 1.321 + 9 2.578e-01 1.906e+00 f() = 35.684 size = 1.069 + 10 5.879e-01 2.445e+00 f() = 35.664 size = 0.841 + 11 1.258e+00 2.025e+00 f() = 30.680 size = 0.476 + 12 1.258e+00 2.025e+00 f() = 30.680 size = 0.367 + 13 1.093e+00 1.849e+00 f() = 30.539 size = 0.300 + 14 8.830e-01 2.004e+00 f() = 30.137 size = 0.172 + 15 8.830e-01 2.004e+00 f() = 30.137 size = 0.126 + 16 9.582e-01 2.060e+00 f() = 30.090 size = 0.106 + 17 1.022e+00 2.004e+00 f() = 30.005 size = 0.063 + 18 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 + 19 1.022e+00 2.004e+00 f() = 30.005 size = 0.043 + 20 1.022e+00 2.004e+00 f() = 30.005 size = 0.027 + 21 1.022e+00 2.004e+00 f() = 30.005 size = 0.022 + 22 9.920e-01 1.997e+00 f() = 30.001 size = 0.016 + 23 9.920e-01 1.997e+00 f() = 30.001 size = 0.013 + converged to minimum at + 24 9.920e-01 1.997e+00 f() = 30.001 size = 0.008 + +The simplex size first increases, while the simplex moves towards the +minimum. After a while the size begins to decrease as the simplex +contracts around the minimum. + + +File: gsl-ref.info, Node: Multimin References and Further Reading, Prev: Multimin Examples, Up: Multidimensional Minimization + +36.10 References and Further Reading +==================================== + +The conjugate gradient and BFGS methods are described in detail in the +following book, + + R. Fletcher, `Practical Methods of Optimization (Second Edition)' + Wiley (1987), ISBN 0471915475. + + A brief description of multidimensional minimization algorithms and +more recent references can be found in, + + C.W. Ueberhuber, `Numerical Computation (Volume 2)', Chapter 14, + Section 4.4 "Minimization Methods", p. 325-335, Springer (1997), + ISBN 3-540-62057-5. + +The simplex algorithm is described in the following paper, + + J.A. Nelder and R. Mead, `A simplex method for function + minimization', Computer Journal vol. 7 (1965), 308-313. + + + +File: gsl-ref.info, Node: Least-Squares Fitting, Next: Nonlinear Least-Squares Fitting, Prev: Multidimensional Minimization, Up: Top + +37 Least-Squares Fitting +************************ + +This chapter describes routines for performing least squares fits to +experimental data using linear combinations of functions. The data may +be weighted or unweighted, i.e. with known or unknown errors. For +weighted data the functions compute the best fit parameters and their +associated covariance matrix. For unweighted data the covariance +matrix is estimated from the scatter of the points, giving a +variance-covariance matrix. + + The functions are divided into separate versions for simple one- or +two-parameter regression and multiple-parameter fits. The functions +are declared in the header file `gsl_fit.h'. + +* Menu: + +* Fitting Overview:: +* Linear regression:: +* Linear fitting without a constant term:: +* Multi-parameter fitting:: +* Fitting Examples:: +* Fitting References and Further Reading:: + + +File: gsl-ref.info, Node: Fitting Overview, Next: Linear regression, Up: Least-Squares Fitting + +37.1 Overview +============= + +Least-squares fits are found by minimizing \chi^2 (chi-squared), the +weighted sum of squared residuals over n experimental datapoints (x_i, +y_i) for the model Y(c,x), + + \chi^2 = \sum_i w_i (y_i - Y(c, x_i))^2 + +The p parameters of the model are c = {c_0, c_1, ...}. The weight +factors w_i are given by w_i = 1/\sigma_i^2, where \sigma_i is the +experimental error on the data-point y_i. The errors are assumed to be +Gaussian and uncorrelated. For unweighted data the chi-squared sum is +computed without any weight factors. + + The fitting routines return the best-fit parameters c and their p +\times p covariance matrix. The covariance matrix measures the +statistical errors on the best-fit parameters resulting from the errors +on the data, \sigma_i, and is defined as C_{ab} = <\delta c_a \delta +c_b> where < > denotes an average over the Gaussian error distributions +of the underlying datapoints. + + The covariance matrix is calculated by error propagation from the +data errors \sigma_i. The change in a fitted parameter \delta c_a +caused by a small change in the data \delta y_i is given by + + \delta c_a = \sum_i (dc_a/dy_i) \delta y_i + +allowing the covariance matrix to be written in terms of the errors on +the data, + + C_{ab} = \sum_{i,j} (dc_a/dy_i) (dc_b/dy_j) <\delta y_i \delta y_j> + +For uncorrelated data the fluctuations of the underlying datapoints +satisfy <\delta y_i \delta y_j> = \sigma_i^2 \delta_{ij}, giving a +corresponding parameter covariance matrix of + + C_{ab} = \sum_i (1/w_i) (dc_a/dy_i) (dc_b/dy_i) + +When computing the covariance matrix for unweighted data, i.e. data +with unknown errors, the weight factors w_i in this sum are replaced by +the single estimate w = 1/\sigma^2, where \sigma^2 is the computed +variance of the residuals about the best-fit model, \sigma^2 = \sum +(y_i - Y(c,x_i))^2 / (n-p). This is referred to as the +"variance-covariance matrix". + + The standard deviations of the best-fit parameters are given by the +square root of the corresponding diagonal elements of the covariance +matrix, \sigma_{c_a} = \sqrt{C_{aa}}. The correlation coefficient of +the fit parameters c_a and c_b is given by \rho_{ab} = C_{ab} / +\sqrt{C_{aa} C_{bb}}. + + +File: gsl-ref.info, Node: Linear regression, Next: Linear fitting without a constant term, Prev: Fitting Overview, Up: Least-Squares Fitting + +37.2 Linear regression +====================== + +The functions described in this section can be used to perform +least-squares fits to a straight line model, Y(c,x) = c_0 + c_1 x. + + -- Function: int gsl_fit_linear (const double * X, const size_t + XSTRIDE, const double * Y, const size_t YSTRIDE, size_t N, + double * C0, double * C1, double * COV00, double * COV01, + double * COV11, double * SUMSQ) + This function computes the best-fit linear regression coefficients + (C0,C1) of the model Y = c_0 + c_1 X for the dataset (X, Y), two + vectors of length N with strides XSTRIDE and YSTRIDE. The errors + on Y are assumed unknown so the variance-covariance matrix for the + parameters (C0, C1) is estimated from the scatter of the points + around the best-fit line and returned via the parameters (COV00, + COV01, COV11). The sum of squares of the residuals from the + best-fit line is returned in SUMSQ. Note: the correlation + coefficient of the data can be computed using + `gsl_stats_correlation' (*note Correlation::), it does not depend + on the fit. + + -- Function: int gsl_fit_wlinear (const double * X, const size_t + XSTRIDE, const double * W, const size_t WSTRIDE, const double + * Y, const size_t YSTRIDE, size_t N, double * C0, double * + C1, double * COV00, double * COV01, double * COV11, double * + CHISQ) + This function computes the best-fit linear regression coefficients + (C0,C1) of the model Y = c_0 + c_1 X for the weighted dataset (X, + Y), two vectors of length N with strides XSTRIDE and YSTRIDE. The + vector W, of length N and stride WSTRIDE, specifies the weight of + each datapoint. The weight is the reciprocal of the variance for + each datapoint in Y. + + The covariance matrix for the parameters (C0, C1) is computed + using the weights and returned via the parameters (COV00, COV01, + COV11). The weighted sum of squares of the residuals from the + best-fit line, \chi^2, is returned in CHISQ. + + -- Function: int gsl_fit_linear_est (double X, double C0, double C1, + double COV00, double COV01, double COV11, double * Y, double + * Y_ERR) + This function uses the best-fit linear regression coefficients C0, + C1 and their covariance COV00, COV01, COV11 to compute the fitted + function Y and its standard deviation Y_ERR for the model Y = c_0 + + c_1 X at the point X. + + +File: gsl-ref.info, Node: Linear fitting without a constant term, Next: Multi-parameter fitting, Prev: Linear regression, Up: Least-Squares Fitting + +37.3 Linear fitting without a constant term +=========================================== + +The functions described in this section can be used to perform +least-squares fits to a straight line model without a constant term, Y += c_1 X. + + -- Function: int gsl_fit_mul (const double * X, const size_t XSTRIDE, + const double * Y, const size_t YSTRIDE, size_t N, double * + C1, double * COV11, double * SUMSQ) + This function computes the best-fit linear regression coefficient + C1 of the model Y = c_1 X for the datasets (X, Y), two vectors of + length N with strides XSTRIDE and YSTRIDE. The errors on Y are + assumed unknown so the variance of the parameter C1 is estimated + from the scatter of the points around the best-fit line and + returned via the parameter COV11. The sum of squares of the + residuals from the best-fit line is returned in SUMSQ. + + -- Function: int gsl_fit_wmul (const double * X, const size_t XSTRIDE, + const double * W, const size_t WSTRIDE, const double * Y, + const size_t YSTRIDE, size_t N, double * C1, double * COV11, + double * SUMSQ) + This function computes the best-fit linear regression coefficient + C1 of the model Y = c_1 X for the weighted datasets (X, Y), two + vectors of length N with strides XSTRIDE and YSTRIDE. The vector + W, of length N and stride WSTRIDE, specifies the weight of each + datapoint. The weight is the reciprocal of the variance for each + datapoint in Y. + + The variance of the parameter C1 is computed using the weights and + returned via the parameter COV11. The weighted sum of squares of + the residuals from the best-fit line, \chi^2, is returned in CHISQ. + + -- Function: int gsl_fit_mul_est (double X, double C1, double COV11, + double * Y, double * Y_ERR) + This function uses the best-fit linear regression coefficient C1 + and its covariance COV11 to compute the fitted function Y and its + standard deviation Y_ERR for the model Y = c_1 X at the point X. + + +File: gsl-ref.info, Node: Multi-parameter fitting, Next: Fitting Examples, Prev: Linear fitting without a constant term, Up: Least-Squares Fitting + +37.4 Multi-parameter fitting +============================ + +The functions described in this section perform least-squares fits to a +general linear model, y = X c where y is a vector of n observations, X +is an n by p matrix of predictor variables, and the elements of the +vector c are the p unknown best-fit parameters which are to be +estimated. The chi-squared value is given by \chi^2 = \sum_i w_i (y_i +- \sum_j X_{ij} c_j)^2. + + This formulation can be used for fits to any number of functions +and/or variables by preparing the n-by-p matrix X appropriately. For +example, to fit to a p-th order polynomial in X, use the following +matrix, + + X_{ij} = x_i^j + +where the index i runs over the observations and the index j runs from +0 to p-1. + + To fit to a set of p sinusoidal functions with fixed frequencies +\omega_1, \omega_2, ..., \omega_p, use, + + X_{ij} = sin(\omega_j x_i) + +To fit to p independent variables x_1, x_2, ..., x_p, use, + + X_{ij} = x_j(i) + +where x_j(i) is the i-th value of the predictor variable x_j. + + The functions described in this section are declared in the header +file `gsl_multifit.h'. + + The solution of the general linear least-squares system requires an +additional working space for intermediate results, such as the singular +value decomposition of the matrix X. + + -- Function: gsl_multifit_linear_workspace * gsl_multifit_linear_alloc + (size_t N, size_t P) + This function allocates a workspace for fitting a model to N + observations using P parameters. + + -- Function: void gsl_multifit_linear_free + (gsl_multifit_linear_workspace * WORK) + This function frees the memory associated with the workspace W. + + -- Function: int gsl_multifit_linear (const gsl_matrix * X, const + gsl_vector * Y, gsl_vector * C, gsl_matrix * COV, double * + CHISQ, gsl_multifit_linear_workspace * WORK) + This function computes the best-fit parameters C of the model y = + X c for the observations Y and the matrix of predictor variables + X, using the preallocated workspace provided in WORK. The + variance-covariance matrix of the model parameters COV is + estimated from the scatter of the observations about the best-fit. + The sum of squares of the residuals from the best-fit, \chi^2, is + returned in CHISQ. If the coefficient of determination is desired, + it can be computed from the expression R^2 = 1 - \chi^2 / TSS, + where the total sum of squares (TSS) of the observations Y may be + computed from `gsl_stats_tss'. + + The best-fit is found by singular value decomposition of the matrix + X using the modified Golub-Reinsch SVD algorithm, with column + scaling to improve the accuracy of the singular values. Any + components which have zero singular value (to machine precision) + are discarded from the fit. + + -- Function: int gsl_multifit_wlinear (const gsl_matrix * X, const + gsl_vector * W, const gsl_vector * Y, gsl_vector * C, + gsl_matrix * COV, double * CHISQ, + gsl_multifit_linear_workspace * WORK) + This function computes the best-fit parameters C of the weighted + model y = X c for the observations Y with weights W and the matrix + of predictor variables X, using the preallocated workspace + provided in WORK. The covariance matrix of the model parameters + COV is computed with the given weights. The weighted sum of + squares of the residuals from the best-fit, \chi^2, is returned in + CHISQ. If the coefficient of determination is desired, it can be + computed from the expression R^2 = 1 - \chi^2 / WTSS, where the + weighted total sum of squares (WTSS) of the observations Y may be + computed from `gsl_stats_wtss'. + + -- Function: int gsl_multifit_linear_svd (const gsl_matrix * X, const + gsl_vector * Y, double TOL, size_t * RANK, gsl_vector * C, + gsl_matrix * COV, double * CHISQ, + gsl_multifit_linear_workspace * WORK) + -- Function: int gsl_multifit_wlinear_svd (const gsl_matrix * X, const + gsl_vector * W, const gsl_vector * Y, double TOL, size_t * + RANK, gsl_vector * C, gsl_matrix * COV, double * CHISQ, + gsl_multifit_linear_workspace * WORK) + In these functions components of the fit are discarded if the + ratio of singular values s_i/s_0 falls below the user-specified + tolerance TOL, and the effective rank is returned in RANK. + + -- Function: int gsl_multifit_linear_usvd (const gsl_matrix * X, const + gsl_vector * Y, double TOL, size_t * RANK, gsl_vector * C, + gsl_matrix * COV, double * CHISQ, + gsl_multifit_linear_workspace * WORK) + -- Function: int gsl_multifit_wlinear_usvd (const gsl_matrix * X, + const gsl_vector * W, const gsl_vector * Y, double TOL, + size_t * RANK, gsl_vector * C, gsl_matrix * COV, double * + CHISQ, gsl_multifit_linear_workspace * WORK) + These functions compute the fit using an SVD without column + scaling. + + -- Function: int gsl_multifit_linear_est (const gsl_vector * X, const + gsl_vector * C, const gsl_matrix * COV, double * Y, double * + Y_ERR) + This function uses the best-fit multilinear regression coefficients + C and their covariance matrix COV to compute the fitted function + value Y and its standard deviation Y_ERR for the model y = x.c at + the point X. + + -- Function: int gsl_multifit_linear_residuals (const gsl_matrix * X, + const gsl_vector * Y, const gsl_vector * C, gsl_vector * R) + This function computes the vector of residuals r = y - X c for the + observations Y, coefficients C and matrix of predictor variables X. + + +File: gsl-ref.info, Node: Fitting Examples, Next: Fitting References and Further Reading, Prev: Multi-parameter fitting, Up: Least-Squares Fitting + +37.5 Examples +============= + +The following program computes a least squares straight-line fit to a +simple dataset, and outputs the best-fit line and its associated one +standard-deviation error bars. + + #include + #include + + int + main (void) + { + int i, n = 4; + double x[4] = { 1970, 1980, 1990, 2000 }; + double y[4] = { 12, 11, 14, 13 }; + double w[4] = { 0.1, 0.2, 0.3, 0.4 }; + + double c0, c1, cov00, cov01, cov11, chisq; + + gsl_fit_wlinear (x, 1, w, 1, y, 1, n, + &c0, &c1, &cov00, &cov01, &cov11, + &chisq); + + printf ("# best fit: Y = %g + %g X\n", c0, c1); + printf ("# covariance matrix:\n"); + printf ("# [ %g, %g\n# %g, %g]\n", + cov00, cov01, cov01, cov11); + printf ("# chisq = %g\n", chisq); + + for (i = 0; i < n; i++) + printf ("data: %g %g %g\n", + x[i], y[i], 1/sqrt(w[i])); + + printf ("\n"); + + for (i = -30; i < 130; i++) + { + double xf = x[0] + (i/100.0) * (x[n-1] - x[0]); + double yf, yf_err; + + gsl_fit_linear_est (xf, + c0, c1, + cov00, cov01, cov11, + &yf, &yf_err); + + printf ("fit: %g %g\n", xf, yf); + printf ("hi : %g %g\n", xf, yf + yf_err); + printf ("lo : %g %g\n", xf, yf - yf_err); + } + return 0; + } + +The following commands extract the data from the output of the program +and display it using the GNU plotutils `graph' utility, + + $ ./demo > tmp + $ more tmp + # best fit: Y = -106.6 + 0.06 X + # covariance matrix: + # [ 39602, -19.9 + # -19.9, 0.01] + # chisq = 0.8 + + $ for n in data fit hi lo ; + do + grep "^$n" tmp | cut -d: -f2 > $n ; + done + $ graph -T X -X x -Y y -y 0 20 -m 0 -S 2 -Ie data + -S 0 -I a -m 1 fit -m 2 hi -m 2 lo + + The next program performs a quadratic fit y = c_0 + c_1 x + c_2 x^2 +to a weighted dataset using the generalised linear fitting function +`gsl_multifit_wlinear'. The model matrix X for a quadratic fit is +given by, + + X = [ 1 , x_0 , x_0^2 ; + 1 , x_1 , x_1^2 ; + 1 , x_2 , x_2^2 ; + ... , ... , ... ] + +where the column of ones corresponds to the constant term c_0. The two +remaining columns corresponds to the terms c_1 x and c_2 x^2. + + The program reads N lines of data in the format (X, Y, ERR) where +ERR is the error (standard deviation) in the value Y. + + #include + #include + + int + main (int argc, char **argv) + { + int i, n; + double xi, yi, ei, chisq; + gsl_matrix *X, *cov; + gsl_vector *y, *w, *c; + + if (argc != 2) + { + fprintf (stderr,"usage: fit n < data\n"); + exit (-1); + } + + n = atoi (argv[1]); + + X = gsl_matrix_alloc (n, 3); + y = gsl_vector_alloc (n); + w = gsl_vector_alloc (n); + + c = gsl_vector_alloc (3); + cov = gsl_matrix_alloc (3, 3); + + for (i = 0; i < n; i++) + { + int count = fscanf (stdin, "%lg %lg %lg", + &xi, &yi, &ei); + + if (count != 3) + { + fprintf (stderr, "error reading file\n"); + exit (-1); + } + + printf ("%g %g +/- %g\n", xi, yi, ei); + + gsl_matrix_set (X, i, 0, 1.0); + gsl_matrix_set (X, i, 1, xi); + gsl_matrix_set (X, i, 2, xi*xi); + + gsl_vector_set (y, i, yi); + gsl_vector_set (w, i, 1.0/(ei*ei)); + } + + { + gsl_multifit_linear_workspace * work + = gsl_multifit_linear_alloc (n, 3); + gsl_multifit_wlinear (X, w, y, c, cov, + &chisq, work); + gsl_multifit_linear_free (work); + } + + #define C(i) (gsl_vector_get(c,(i))) + #define COV(i,j) (gsl_matrix_get(cov,(i),(j))) + + { + printf ("# best fit: Y = %g + %g X + %g X^2\n", + C(0), C(1), C(2)); + + printf ("# covariance matrix:\n"); + printf ("[ %+.5e, %+.5e, %+.5e \n", + COV(0,0), COV(0,1), COV(0,2)); + printf (" %+.5e, %+.5e, %+.5e \n", + COV(1,0), COV(1,1), COV(1,2)); + printf (" %+.5e, %+.5e, %+.5e ]\n", + COV(2,0), COV(2,1), COV(2,2)); + printf ("# chisq = %g\n", chisq); + } + + gsl_matrix_free (X); + gsl_vector_free (y); + gsl_vector_free (w); + gsl_vector_free (c); + gsl_matrix_free (cov); + + return 0; + } + +A suitable set of data for fitting can be generated using the following +program. It outputs a set of points with gaussian errors from the curve +y = e^x in the region 0 < x < 2. + + #include + #include + #include + + int + main (void) + { + double x; + const gsl_rng_type * T; + gsl_rng * r; + + gsl_rng_env_setup (); + + T = gsl_rng_default; + r = gsl_rng_alloc (T); + + for (x = 0.1; x < 2; x+= 0.1) + { + double y0 = exp (x); + double sigma = 0.1 * y0; + double dy = gsl_ran_gaussian (r, sigma); + + printf ("%g %g %g\n", x, y0 + dy, sigma); + } + + gsl_rng_free(r); + + return 0; + } + +The data can be prepared by running the resulting executable program, + + $ ./generate > exp.dat + $ more exp.dat + 0.1 0.97935 0.110517 + 0.2 1.3359 0.12214 + 0.3 1.52573 0.134986 + 0.4 1.60318 0.149182 + 0.5 1.81731 0.164872 + 0.6 1.92475 0.182212 + .... + +To fit the data use the previous program, with the number of data points +given as the first argument. In this case there are 19 data points. + + $ ./fit 19 < exp.dat + 0.1 0.97935 +/- 0.110517 + 0.2 1.3359 +/- 0.12214 + ... + # best fit: Y = 1.02318 + 0.956201 X + 0.876796 X^2 + # covariance matrix: + [ +1.25612e-02, -3.64387e-02, +1.94389e-02 + -3.64387e-02, +1.42339e-01, -8.48761e-02 + +1.94389e-02, -8.48761e-02, +5.60243e-02 ] + # chisq = 23.0987 + +The parameters of the quadratic fit match the coefficients of the +expansion of e^x, taking into account the errors on the parameters and +the O(x^3) difference between the exponential and quadratic functions +for the larger values of x. The errors on the parameters are given by +the square-root of the corresponding diagonal elements of the +covariance matrix. The chi-squared per degree of freedom is 1.4, +indicating a reasonable fit to the data. + + +File: gsl-ref.info, Node: Fitting References and Further Reading, Prev: Fitting Examples, Up: Least-Squares Fitting + +37.6 References and Further Reading +=================================== + +A summary of formulas and techniques for least squares fitting can be +found in the "Statistics" chapter of the Annual Review of Particle +Physics prepared by the Particle Data Group, + + `Review of Particle Properties', R.M. Barnett et al., Physical + Review D54, 1 (1996) `http://pdg.lbl.gov/' + +The Review of Particle Physics is available online at the website given +above. + + The tests used to prepare these routines are based on the NIST +Statistical Reference Datasets. The datasets and their documentation are +available from NIST at the following website, + + `http://www.nist.gov/itl/div898/strd/index.html'. + + +File: gsl-ref.info, Node: Nonlinear Least-Squares Fitting, Next: Basis Splines, Prev: Least-Squares Fitting, Up: Top + +38 Nonlinear Least-Squares Fitting +********************************** + +This chapter describes functions for multidimensional nonlinear +least-squares fitting. The library provides low level components for a +variety of iterative solvers and convergence tests. These can be +combined by the user to achieve the desired solution, with full access +to the intermediate steps of the iteration. Each class of methods uses +the same framework, so that you can switch between solvers at runtime +without needing to recompile your program. Each instance of a solver +keeps track of its own state, allowing the solvers to be used in +multi-threaded programs. + + The header file `gsl_multifit_nlin.h' contains prototypes for the +multidimensional nonlinear fitting functions and related declarations. + +* Menu: + +* Overview of Nonlinear Least-Squares Fitting:: +* Initializing the Nonlinear Least-Squares Solver:: +* Providing the Function to be Minimized:: +* Iteration of the Minimization Algorithm:: +* Search Stopping Parameters for Minimization Algorithms:: +* Minimization Algorithms using Derivatives:: +* Minimization Algorithms without Derivatives:: +* Computing the covariance matrix of best fit parameters:: +* Example programs for Nonlinear Least-Squares Fitting:: +* References and Further Reading for Nonlinear Least-Squares Fitting:: + + +File: gsl-ref.info, Node: Overview of Nonlinear Least-Squares Fitting, Next: Initializing the Nonlinear Least-Squares Solver, Up: Nonlinear Least-Squares Fitting + +38.1 Overview +============= + +The problem of multidimensional nonlinear least-squares fitting requires +the minimization of the squared residuals of n functions, f_i, in p +parameters, x_i, + + \Phi(x) = (1/2) || F(x) ||^2 + = (1/2) \sum_{i=1}^{n} f_i(x_1, ..., x_p)^2 + +All algorithms proceed from an initial guess using the linearization, + + \psi(p) = || F(x+p) || ~=~ || F(x) + J p || + +where x is the initial point, p is the proposed step and J is the +Jacobian matrix J_{ij} = d f_i / d x_j. Additional strategies are used +to enlarge the region of convergence. These include requiring a +decrease in the norm ||F|| on each step or using a trust region to +avoid steps which fall outside the linear regime. + + To perform a weighted least-squares fit of a nonlinear model Y(x,t) +to data (t_i, y_i) with independent Gaussian errors \sigma_i, use +function components of the following form, + + f_i = (Y(x, t_i) - y_i) / \sigma_i + +Note that the model parameters are denoted by x in this chapter since +the non-linear least-squares algorithms are described geometrically +(i.e. finding the minimum of a surface). The independent variable of +any data to be fitted is denoted by t. + + With the definition above the Jacobian is J_{ij} =(1 / \sigma_i) d +Y_i / d x_j, where Y_i = Y(x,t_i). + + +File: gsl-ref.info, Node: Initializing the Nonlinear Least-Squares Solver, Next: Providing the Function to be Minimized, Prev: Overview of Nonlinear Least-Squares Fitting, Up: Nonlinear Least-Squares Fitting + +38.2 Initializing the Solver +============================ + + -- Function: gsl_multifit_fsolver * gsl_multifit_fsolver_alloc (const + gsl_multifit_fsolver_type * T, size_t N, size_t P) + This function returns a pointer to a newly allocated instance of a + solver of type T for N observations and P parameters. The number + of observations N must be greater than or equal to parameters P. + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: gsl_multifit_fdfsolver * gsl_multifit_fdfsolver_alloc + (const gsl_multifit_fdfsolver_type * T, size_t N, size_t P) + This function returns a pointer to a newly allocated instance of a + derivative solver of type T for N observations and P parameters. + For example, the following code creates an instance of a + Levenberg-Marquardt solver for 100 data points and 3 parameters, + + const gsl_multifit_fdfsolver_type * T + = gsl_multifit_fdfsolver_lmder; + gsl_multifit_fdfsolver * s + = gsl_multifit_fdfsolver_alloc (T, 100, 3); + + The number of observations N must be greater than or equal to + parameters P. + + If there is insufficient memory to create the solver then the + function returns a null pointer and the error handler is invoked + with an error code of `GSL_ENOMEM'. + + -- Function: int gsl_multifit_fsolver_set (gsl_multifit_fsolver * S, + gsl_multifit_function * F, const gsl_vector * X) + This function initializes, or reinitializes, an existing solver S + to use the function F and the initial guess X. + + -- Function: int gsl_multifit_fdfsolver_set (gsl_multifit_fdfsolver * + S, gsl_multifit_function_fdf * FDF, const gsl_vector * X) + This function initializes, or reinitializes, an existing solver S + to use the function and derivative FDF and the initial guess X. + + -- Function: void gsl_multifit_fsolver_free (gsl_multifit_fsolver * S) + -- Function: void gsl_multifit_fdfsolver_free (gsl_multifit_fdfsolver + * S) + These functions free all the memory associated with the solver S. + + -- Function: const char * gsl_multifit_fsolver_name (const + gsl_multifit_fsolver * S) + -- Function: const char * gsl_multifit_fdfsolver_name (const + gsl_multifit_fdfsolver * S) + These functions return a pointer to the name of the solver. For + example, + + printf ("s is a '%s' solver\n", + gsl_multifit_fdfsolver_name (s)); + + would print something like `s is a 'lmder' solver'. + + +File: gsl-ref.info, Node: Providing the Function to be Minimized, Next: Iteration of the Minimization Algorithm, Prev: Initializing the Nonlinear Least-Squares Solver, Up: Nonlinear Least-Squares Fitting + +38.3 Providing the Function to be Minimized +=========================================== + +You must provide n functions of p variables for the minimization +algorithms to operate on. In order to allow for arbitrary parameters +the functions are defined by the following data types: + + -- Data Type: gsl_multifit_function + This data type defines a general system of functions with + arbitrary parameters. + + `int (* f) (const gsl_vector * X, void * PARAMS, gsl_vector * F)' + this function should store the vector result f(x,params) in F + for argument X and arbitrary parameters PARAMS, returning an + appropriate error code if the function cannot be computed. + + `size_t n' + the number of functions, i.e. the number of components of the + vector F. + + `size_t p' + the number of independent variables, i.e. the number of + components of the vector X. + + `void * params' + a pointer to the arbitrary parameters of the function. + + -- Data Type: gsl_multifit_function_fdf + This data type defines a general system of functions with + arbitrary parameters and the corresponding Jacobian matrix of + derivatives, + + `int (* f) (const gsl_vector * X, void * PARAMS, gsl_vector * F)' + this function should store the vector result f(x,params) in F + for argument X and arbitrary parameters PARAMS, returning an + appropriate error code if the function cannot be computed. + + `int (* df) (const gsl_vector * X, void * PARAMS, gsl_matrix * J)' + this function should store the N-by-P matrix result J_ij = d + f_i(x,params) / d x_j in J for argument X and arbitrary + parameters PARAMS, returning an appropriate error code if the + function cannot be computed. + + `int (* fdf) (const gsl_vector * X, void * PARAMS, gsl_vector * F, gsl_matrix * J)' + This function should set the values of the F and J as above, + for arguments X and arbitrary parameters PARAMS. This + function provides an optimization of the separate functions + for f(x) and J(x)--it is always faster to compute the + function and its derivative at the same time. + + `size_t n' + the number of functions, i.e. the number of components of the + vector F. + + `size_t p' + the number of independent variables, i.e. the number of + components of the vector X. + + `void * params' + a pointer to the arbitrary parameters of the function. + + Note that when fitting a non-linear model against experimental data, +the data is passed to the functions above using the PARAMS argument and +the trial best-fit parameters through the X argument. + + +File: gsl-ref.info, Node: Iteration of the Minimization Algorithm, Next: Search Stopping Parameters for Minimization Algorithms, Prev: Providing the Function to be Minimized, Up: Nonlinear Least-Squares Fitting + +38.4 Iteration +============== + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + + -- Function: int gsl_multifit_fsolver_iterate (gsl_multifit_fsolver * + S) + -- Function: int gsl_multifit_fdfsolver_iterate + (gsl_multifit_fdfsolver * S) + These functions perform a single iteration of the solver S. If + the iteration encounters an unexpected problem then an error code + will be returned. The solver maintains a current estimate of the + best-fit parameters at all times. + + The solver struct S contains the following entries, which can be +used to track the progress of the solution: + +`gsl_vector * x' + The current position. + +`gsl_vector * f' + The function value at the current position. + +`gsl_vector * dx' + The difference between the current position and the previous + position, i.e. the last step, taken as a vector. + +`gsl_matrix * J' + The Jacobian matrix at the current position (for the + `gsl_multifit_fdfsolver' struct only) + + The best-fit information also can be accessed with the following +auxiliary functions, + + -- Function: gsl_vector * gsl_multifit_fsolver_position (const + gsl_multifit_fsolver * S) + -- Function: gsl_vector * gsl_multifit_fdfsolver_position (const + gsl_multifit_fdfsolver * S) + These functions return the current position (i.e. best-fit + parameters) `s->x' of the solver S. + + +File: gsl-ref.info, Node: Search Stopping Parameters for Minimization Algorithms, Next: Minimization Algorithms using Derivatives, Prev: Iteration of the Minimization Algorithm, Up: Nonlinear Least-Squares Fitting + +38.5 Search Stopping Parameters +=============================== + +A minimization procedure should stop when one of the following +conditions is true: + + * A minimum has been found to within the user-specified precision. + + * A user-specified maximum number of iterations has been reached. + + * An error has occurred. + +The handling of these conditions is under user control. The functions +below allow the user to test the current estimate of the best-fit +parameters in several standard ways. + + -- Function: int gsl_multifit_test_delta (const gsl_vector * DX, const + gsl_vector * X, double EPSABS, double EPSREL) + This function tests for the convergence of the sequence by + comparing the last step DX with the absolute error EPSABS and + relative error EPSREL to the current position X. The test returns + `GSL_SUCCESS' if the following condition is achieved, + + |dx_i| < epsabs + epsrel |x_i| + + for each component of X and returns `GSL_CONTINUE' otherwise. + + -- Function: int gsl_multifit_test_gradient (const gsl_vector * G, + double EPSABS) + This function tests the residual gradient G against the absolute + error bound EPSABS. Mathematically, the gradient should be + exactly zero at the minimum. The test returns `GSL_SUCCESS' if the + following condition is achieved, + + \sum_i |g_i| < epsabs + + and returns `GSL_CONTINUE' otherwise. This criterion is suitable + for situations where the precise location of the minimum, x, is + unimportant provided a value can be found where the gradient is + small enough. + + -- Function: int gsl_multifit_gradient (const gsl_matrix * J, const + gsl_vector * F, gsl_vector * G) + This function computes the gradient G of \Phi(x) = (1/2) + ||F(x)||^2 from the Jacobian matrix J and the function values F, + using the formula g = J^T f. + + +File: gsl-ref.info, Node: Minimization Algorithms using Derivatives, Next: Minimization Algorithms without Derivatives, Prev: Search Stopping Parameters for Minimization Algorithms, Up: Nonlinear Least-Squares Fitting + +38.6 Minimization Algorithms using Derivatives +============================================== + +The minimization algorithms described in this section make use of both +the function and its derivative. They require an initial guess for the +location of the minimum. There is no absolute guarantee of +convergence--the function must be suitable for this technique and the +initial guess must be sufficiently close to the minimum for it to work. + + -- Derivative Solver: gsl_multifit_fdfsolver_lmsder + This is a robust and efficient version of the Levenberg-Marquardt + algorithm as implemented in the scaled LMDER routine in MINPACK. + Minpack was written by Jorge J. More', Burton S. Garbow and + Kenneth E. Hillstrom. + + The algorithm uses a generalized trust region to keep each step + under control. In order to be accepted a proposed new position x' + must satisfy the condition |D (x' - x)| < \delta, where D is a + diagonal scaling matrix and \delta is the size of the trust + region. The components of D are computed internally, using the + column norms of the Jacobian to estimate the sensitivity of the + residual to each component of x. This improves the behavior of the + algorithm for badly scaled functions. + + On each iteration the algorithm attempts to minimize the linear + system |F + J p| subject to the constraint |D p| < \Delta. The + solution to this constrained linear system is found using the + Levenberg-Marquardt method. + + The proposed step is now tested by evaluating the function at the + resulting point, x'. If the step reduces the norm of the function + sufficiently, and follows the predicted behavior of the function + within the trust region, then it is accepted and the size of the + trust region is increased. If the proposed step fails to improve + the solution, or differs significantly from the expected behavior + within the trust region, then the size of the trust region is + decreased and another trial step is computed. + + The algorithm also monitors the progress of the solution and + returns an error if the changes in the solution are smaller than + the machine precision. The possible error codes are, + + `GSL_ETOLF' + the decrease in the function falls below machine precision + + `GSL_ETOLX' + the change in the position vector falls below machine + precision + + `GSL_ETOLG' + the norm of the gradient, relative to the norm of the + function, falls below machine precision + + `GSL_ENOPROG' + the routine has made 10 or more attempts to find a suitable + trial step without success (but subsequent calls can be made + to continue the search).(1) + + These error codes indicate that further iterations will be + unlikely to change the solution from its current value. + + -- Derivative Solver: gsl_multifit_fdfsolver_lmder + This is an unscaled version of the LMDER algorithm. The elements + of the diagonal scaling matrix D are set to 1. This algorithm may + be useful in circumstances where the scaled version of LMDER + converges too slowly, or the function is already scaled + appropriately. + + ---------- Footnotes ---------- + + (1) The return code `GSL_CONTINUE' was used for this case in +versions prior to 1.14. + + +File: gsl-ref.info, Node: Minimization Algorithms without Derivatives, Next: Computing the covariance matrix of best fit parameters, Prev: Minimization Algorithms using Derivatives, Up: Nonlinear Least-Squares Fitting + +38.7 Minimization Algorithms without Derivatives +================================================ + +There are no algorithms implemented in this section at the moment. + + +File: gsl-ref.info, Node: Computing the covariance matrix of best fit parameters, Next: Example programs for Nonlinear Least-Squares Fitting, Prev: Minimization Algorithms without Derivatives, Up: Nonlinear Least-Squares Fitting + +38.8 Computing the covariance matrix of best fit parameters +=========================================================== + + -- Function: int gsl_multifit_covar (const gsl_matrix * J, double + EPSREL, gsl_matrix * COVAR) + This function uses the Jacobian matrix J to compute the covariance + matrix of the best-fit parameters, COVAR. The parameter EPSREL is + used to remove linear-dependent columns when J is rank deficient. + + The covariance matrix is given by, + + covar = (J^T J)^{-1} + + and is computed by QR decomposition of J with column-pivoting. Any + columns of R which satisfy + + |R_{kk}| <= epsrel |R_{11}| + + are considered linearly-dependent and are excluded from the + covariance matrix (the corresponding rows and columns of the + covariance matrix are set to zero). + + If the minimisation uses the weighted least-squares function f_i = + (Y(x, t_i) - y_i) / \sigma_i then the covariance matrix above + gives the statistical error on the best-fit parameters resulting + from the Gaussian errors \sigma_i on the underlying data y_i. + This can be verified from the relation \delta f = J \delta c and + the fact that the fluctuations in f from the data y_i are + normalised by \sigma_i and so satisfy <\delta f \delta f^T> = I. + + For an unweighted least-squares function f_i = (Y(x, t_i) - y_i) + the covariance matrix above should be multiplied by the variance + of the residuals about the best-fit \sigma^2 = \sum (y_i - + Y(x,t_i))^2 / (n-p) to give the variance-covariance matrix + \sigma^2 C. This estimates the statistical error on the best-fit + parameters from the scatter of the underlying data. + + For more information about covariance matrices see *note Fitting + Overview::. + + +File: gsl-ref.info, Node: Example programs for Nonlinear Least-Squares Fitting, Next: References and Further Reading for Nonlinear Least-Squares Fitting, Prev: Computing the covariance matrix of best fit parameters, Up: Nonlinear Least-Squares Fitting + +38.9 Examples +============= + +The following example program fits a weighted exponential model with +background to experimental data, Y = A \exp(-\lambda t) + b. The first +part of the program sets up the functions `expb_f' and `expb_df' to +calculate the model and its Jacobian. The appropriate fitting function +is given by, + + f_i = ((A \exp(-\lambda t_i) + b) - y_i)/\sigma_i + +where we have chosen t_i = i. The Jacobian matrix J is the derivative +of these functions with respect to the three parameters (A, \lambda, +b). It is given by, + + J_{ij} = d f_i / d x_j + +where x_0 = A, x_1 = \lambda and x_2 = b. + + /* expfit.c -- model functions for exponential + background */ + + struct data { + size_t n; + double * y; + double * sigma; + }; + + int + expb_f (const gsl_vector * x, void *data, + gsl_vector * f) + { + size_t n = ((struct data *)data)->n; + double *y = ((struct data *)data)->y; + double *sigma = ((struct data *) data)->sigma; + + double A = gsl_vector_get (x, 0); + double lambda = gsl_vector_get (x, 1); + double b = gsl_vector_get (x, 2); + + size_t i; + + for (i = 0; i < n; i++) + { + /* Model Yi = A * exp(-lambda * i) + b */ + double t = i; + double Yi = A * exp (-lambda * t) + b; + gsl_vector_set (f, i, (Yi - y[i])/sigma[i]); + } + + return GSL_SUCCESS; + } + + int + expb_df (const gsl_vector * x, void *data, + gsl_matrix * J) + { + size_t n = ((struct data *)data)->n; + double *sigma = ((struct data *) data)->sigma; + + double A = gsl_vector_get (x, 0); + double lambda = gsl_vector_get (x, 1); + + size_t i; + + for (i = 0; i < n; i++) + { + /* Jacobian matrix J(i,j) = dfi / dxj, */ + /* where fi = (Yi - yi)/sigma[i], */ + /* Yi = A * exp(-lambda * i) + b */ + /* and the xj are the parameters (A,lambda,b) */ + double t = i; + double s = sigma[i]; + double e = exp(-lambda * t); + gsl_matrix_set (J, i, 0, e/s); + gsl_matrix_set (J, i, 1, -t * A * e/s); + gsl_matrix_set (J, i, 2, 1/s); + } + return GSL_SUCCESS; + } + + int + expb_fdf (const gsl_vector * x, void *data, + gsl_vector * f, gsl_matrix * J) + { + expb_f (x, data, f); + expb_df (x, data, J); + + return GSL_SUCCESS; + } + +The main part of the program sets up a Levenberg-Marquardt solver and +some simulated random data. The data uses the known parameters +(1.0,5.0,0.1) combined with Gaussian noise (standard deviation = 0.1) +over a range of 40 timesteps. The initial guess for the parameters is +chosen as (0.0, 1.0, 0.0). + + #include + #include + #include + #include + #include + #include + #include + + #include "expfit.c" + + #define N 40 + + void print_state (size_t iter, gsl_multifit_fdfsolver * s); + + int + main (void) + { + const gsl_multifit_fdfsolver_type *T; + gsl_multifit_fdfsolver *s; + int status; + unsigned int i, iter = 0; + const size_t n = N; + const size_t p = 3; + + gsl_matrix *covar = gsl_matrix_alloc (p, p); + double y[N], sigma[N]; + struct data d = { n, y, sigma}; + gsl_multifit_function_fdf f; + double x_init[3] = { 1.0, 0.0, 0.0 }; + gsl_vector_view x = gsl_vector_view_array (x_init, p); + const gsl_rng_type * type; + gsl_rng * r; + + gsl_rng_env_setup(); + + type = gsl_rng_default; + r = gsl_rng_alloc (type); + + f.f = &expb_f; + f.df = &expb_df; + f.fdf = &expb_fdf; + f.n = n; + f.p = p; + f.params = &d; + + /* This is the data to be fitted */ + + for (i = 0; i < n; i++) + { + double t = i; + y[i] = 1.0 + 5 * exp (-0.1 * t) + + gsl_ran_gaussian (r, 0.1); + sigma[i] = 0.1; + printf ("data: %u %g %g\n", i, y[i], sigma[i]); + }; + + T = gsl_multifit_fdfsolver_lmsder; + s = gsl_multifit_fdfsolver_alloc (T, n, p); + gsl_multifit_fdfsolver_set (s, &f, &x.vector); + + print_state (iter, s); + + do + { + iter++; + status = gsl_multifit_fdfsolver_iterate (s); + + printf ("status = %s\n", gsl_strerror (status)); + + print_state (iter, s); + + if (status) + break; + + status = gsl_multifit_test_delta (s->dx, s->x, + 1e-4, 1e-4); + } + while (status == GSL_CONTINUE && iter < 500); + + gsl_multifit_covar (s->J, 0.0, covar); + + #define FIT(i) gsl_vector_get(s->x, i) + #define ERR(i) sqrt(gsl_matrix_get(covar,i,i)) + + { + double chi = gsl_blas_dnrm2(s->f); + double dof = n - p; + double c = GSL_MAX_DBL(1, chi / sqrt(dof)); + + printf("chisq/dof = %g\n", pow(chi, 2.0) / dof); + + printf ("A = %.5f +/- %.5f\n", FIT(0), c*ERR(0)); + printf ("lambda = %.5f +/- %.5f\n", FIT(1), c*ERR(1)); + printf ("b = %.5f +/- %.5f\n", FIT(2), c*ERR(2)); + } + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multifit_fdfsolver_free (s); + gsl_matrix_free (covar); + gsl_rng_free (r); + return 0; + } + + void + print_state (size_t iter, gsl_multifit_fdfsolver * s) + { + printf ("iter: %3u x = % 15.8f % 15.8f % 15.8f " + "|f(x)| = %g\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + gsl_vector_get (s->x, 2), + gsl_blas_dnrm2 (s->f)); + } + +The iteration terminates when the change in x is smaller than 0.0001, as +both an absolute and relative change. Here are the results of running +the program: + + iter: 0 x=1.00000000 0.00000000 0.00000000 |f(x)|=117.349 + status=success + iter: 1 x=1.64659312 0.01814772 0.64659312 |f(x)|=76.4578 + status=success + iter: 2 x=2.85876037 0.08092095 1.44796363 |f(x)|=37.6838 + status=success + iter: 3 x=4.94899512 0.11942928 1.09457665 |f(x)|=9.58079 + status=success + iter: 4 x=5.02175572 0.10287787 1.03388354 |f(x)|=5.63049 + status=success + iter: 5 x=5.04520433 0.10405523 1.01941607 |f(x)|=5.44398 + status=success + iter: 6 x=5.04535782 0.10404906 1.01924871 |f(x)|=5.44397 + chisq/dof = 0.800996 + A = 5.04536 +/- 0.06028 + lambda = 0.10405 +/- 0.00316 + b = 1.01925 +/- 0.03782 + status = success + +The approximate values of the parameters are found correctly, and the +chi-squared value indicates a good fit (the chi-squared per degree of +freedom is approximately 1). In this case the errors on the parameters +can be estimated from the square roots of the diagonal elements of the +covariance matrix. + + If the chi-squared value shows a poor fit (i.e. chi^2/dof >> 1) then +the error estimates obtained from the covariance matrix will be too +small. In the example program the error estimates are multiplied by +\sqrt{\chi^2/dof} in this case, a common way of increasing the errors +for a poor fit. Note that a poor fit will result from the use an +inappropriate model, and the scaled error estimates may then be outside +the range of validity for Gaussian errors. + + +File: gsl-ref.info, Node: References and Further Reading for Nonlinear Least-Squares Fitting, Prev: Example programs for Nonlinear Least-Squares Fitting, Up: Nonlinear Least-Squares Fitting + +38.10 References and Further Reading +==================================== + +The MINPACK algorithm is described in the following article, + + J.J. More', `The Levenberg-Marquardt Algorithm: Implementation and + Theory', Lecture Notes in Mathematics, v630 (1978), ed G. Watson. + +The following paper is also relevant to the algorithms described in this +section, + + J.J. More', B.S. Garbow, K.E. Hillstrom, "Testing Unconstrained + Optimization Software", ACM Transactions on Mathematical Software, + Vol 7, No 1 (1981), p 17-41. + + +File: gsl-ref.info, Node: Basis Splines, Next: Physical Constants, Prev: Nonlinear Least-Squares Fitting, Up: Top + +39 Basis Splines +**************** + +This chapter describes functions for the computation of smoothing basis +splines (B-splines). A smoothing spline differs from an interpolating +spline in that the resulting curve is not required to pass through each +datapoint. *Note Interpolation::, for information about interpolating +splines. + + The header file `gsl_bspline.h' contains the prototypes for the +bspline functions and related declarations. + +* Menu: + +* Overview of B-splines:: +* Initializing the B-splines solver:: +* Constructing the knots vector:: +* Evaluation of B-spline basis functions:: +* Evaluation of B-spline basis function derivatives:: +* Obtaining Greville abscissae for B-spline basis functions:: +* Example programs for B-splines:: +* References and Further Reading:: + + +File: gsl-ref.info, Node: Overview of B-splines, Next: Initializing the B-splines solver, Up: Basis Splines + +39.1 Overview +============= + +B-splines are commonly used as basis functions to fit smoothing curves +to large data sets. To do this, the abscissa axis is broken up into +some number of intervals, where the endpoints of each interval are +called "breakpoints". These breakpoints are then converted to "knots" +by imposing various continuity and smoothness conditions at each +interface. Given a nondecreasing knot vector t = {t_0, t_1, ..., +t_{n+k-1}}, the n basis splines of order k are defined by + + B_(i,1)(x) = (1, t_i <= x < t_(i+1) + (0, else + B_(i,k)(x) = [(x - t_i)/(t_(i+k-1) - t_i)] B_(i,k-1)(x) + + [(t_(i+k) - x)/(t_(i+k) - t_(i+1))] B_(i+1,k-1)(x) + +for i = 0, ..., n-1. The common case of cubic B-splines is given by k = +4. The above recurrence relation can be evaluated in a numerically +stable way by the de Boor algorithm. + + If we define appropriate knots on an interval [a,b] then the +B-spline basis functions form a complete set on that interval. +Therefore we can expand a smoothing function as + + f(x) = \sum_i c_i B_(i,k)(x) + +given enough (x_j, f(x_j)) data pairs. The coefficients c_i can be +readily obtained from a least-squares fit. + + +File: gsl-ref.info, Node: Initializing the B-splines solver, Next: Constructing the knots vector, Prev: Overview of B-splines, Up: Basis Splines + +39.2 Initializing the B-splines solver +====================================== + +The computation of B-spline functions requires a preallocated workspace +of type `gsl_bspline_workspace'. If B-spline derivatives are also +required, an additional `gsl_bspline_deriv_workspace' is needed. + + -- Function: gsl_bspline_workspace * gsl_bspline_alloc (const size_t + K, const size_t NBREAK) + This function allocates a workspace for computing B-splines of + order K. The number of breakpoints is given by NBREAK. This leads + to n = nbreak + k - 2 basis functions. Cubic B-splines are + specified by k = 4. The size of the workspace is O(5k + nbreak). + + -- Function: void gsl_bspline_free (gsl_bspline_workspace * W) + This function frees the memory associated with the workspace W. + + -- Function: gsl_bspline_deriv_workspace * gsl_bspline_deriv_alloc + (const size_t K) + This function allocates a workspace for computing the derivatives + of a B-spline basis function of order K. The size of the workspace + is O(2k^2). + + -- Function: void gsl_bspline_deriv_free (gsl_bspline_deriv_workspace + * W) + This function frees the memory associated with the derivative + workspace W. + + +File: gsl-ref.info, Node: Constructing the knots vector, Next: Evaluation of B-spline basis functions, Prev: Initializing the B-splines solver, Up: Basis Splines + +39.3 Constructing the knots vector +================================== + + -- Function: int gsl_bspline_knots (const gsl_vector * BREAKPTS, + gsl_bspline_workspace * W) + This function computes the knots associated with the given + breakpoints and stores them internally in `w->knots'. + + -- Function: int gsl_bspline_knots_uniform (const double A, const + double B, gsl_bspline_workspace * W) + This function assumes uniformly spaced breakpoints on [a,b] and + constructs the corresponding knot vector using the previously + specified NBREAK parameter. The knots are stored in `w->knots'. + + +File: gsl-ref.info, Node: Evaluation of B-spline basis functions, Next: Evaluation of B-spline basis function derivatives, Prev: Constructing the knots vector, Up: Basis Splines + +39.4 Evaluation of B-splines +============================ + + -- Function: int gsl_bspline_eval (const double X, gsl_vector * B, + gsl_bspline_workspace * W) + This function evaluates all B-spline basis functions at the + position X and stores them in the vector B, so that the i-th + element is B_i(x). The vector B must be of length n = nbreak + k - + 2. This value may also be obtained by calling + `gsl_bspline_ncoeffs'. Computing all the basis functions at once + is more efficient than computing them individually, due to the + nature of the defining recurrence relation. + + -- Function: int gsl_bspline_eval_nonzero (const double X, gsl_vector + * BK, size_t * ISTART, size_t * IEND, gsl_bspline_workspace * + W) + This function evaluates all potentially nonzero B-spline basis + functions at the position X and stores them in the vector BK, so + that the i-th element is B_(istart+i)(x). The last element of BK + is B_(iend)(x). The vector BK must be of length k. By returning + only the nonzero basis functions, this function allows quantities + involving linear combinations of the B_i(x) to be computed without + unnecessary terms (such linear combinations occur, for example, + when evaluating an interpolated function). + + -- Function: size_t gsl_bspline_ncoeffs (gsl_bspline_workspace * W) + This function returns the number of B-spline coefficients given by + n = nbreak + k - 2. + + +File: gsl-ref.info, Node: Evaluation of B-spline basis function derivatives, Next: Obtaining Greville abscissae for B-spline basis functions, Prev: Evaluation of B-spline basis functions, Up: Basis Splines + +39.5 Evaluation of B-spline derivatives +======================================= + + -- Function: int gsl_bspline_deriv_eval (const double X, const size_t + NDERIV, gsl_matrix * DB, gsl_bspline_workspace * W, + gsl_bspline_deriv_workspace * DW) + This function evaluates all B-spline basis function derivatives of + orders 0 through nderiv (inclusive) at the position X and stores + them in the matrix DB. The (i,j)-th element of DB is + d^jB_i(x)/dx^j. The matrix DB must be of size n = nbreak + k - 2 + by nderiv + 1. The value n may also be obtained by calling + `gsl_bspline_ncoeffs'. Note that function evaluations are + included as the zeroth order derivatives in DB. Computing all the + basis function derivatives at once is more efficient than + computing them individually, due to the nature of the defining + recurrence relation. + + -- Function: int gsl_bspline_deriv_eval_nonzero (const double X, const + size_t NDERIV, gsl_matrix * DB, size_t * ISTART, size_t * + IEND, gsl_bspline_workspace * W, gsl_bspline_deriv_workspace + * DW) + This function evaluates all potentially nonzero B-spline basis + function derivatives of orders 0 through nderiv (inclusive) at the + position X and stores them in the matrix DB. The (i,j)-th element + of DB is d^j/dx^j B_(istart+i)(x). The last row of DB contains + d^j/dx^j B_(iend)(x). The matrix DB must be of size k by at least + nderiv + 1. Note that function evaluations are included as the + zeroth order derivatives in DB. By returning only the nonzero + basis functions, this function allows quantities involving linear + combinations of the B_i(x) and their derivatives to be computed + without unnecessary terms. + + +File: gsl-ref.info, Node: Obtaining Greville abscissae for B-spline basis functions, Next: Example programs for B-splines, Prev: Evaluation of B-spline basis function derivatives, Up: Basis Splines + +39.6 Greville abscissae +======================= + +The Greville abscissae are defined to be the mean location of k-1 +consecutive knots in the knot vector for each basis spline function of +order k. Note that the first and last knots in the knot vector are +excluded when applying this definition; consequently there are +`gsl_bspline_ncoeffs' Greville abscissa. They are often used in +B-spline collocation applications and may also be called +Marsden-Schoenberg points. + + The above definition is undefined for k=1. The implementation +chooses to return interval midpoints in the degenerate k=1 case. + + -- Function: double gsl_bspline_greville_abscissa (size_t I, + gsl_bspline_workspace *W); + Returns the location of the i-th Greville abscissa for the given + spline basis. Here, i = 0, ..., `gsl_bspline_ncoeffs(w) - 1'. + + +File: gsl-ref.info, Node: Example programs for B-splines, Next: References and Further Reading, Prev: Obtaining Greville abscissae for B-spline basis functions, Up: Basis Splines + +39.7 Examples +============= + +The following program computes a linear least squares fit to data using +cubic B-spline basis functions with uniform breakpoints. The data is +generated from the curve y(x) = \cos(x) \exp(-x/10) on the interval [0, +15] with Gaussian noise added. + + #include + #include + #include + #include + #include + #include + #include + #include + + /* number of data points to fit */ + #define N 200 + + /* number of fit coefficients */ + #define NCOEFFS 12 + + /* nbreak = ncoeffs + 2 - k = ncoeffs - 2 since k = 4 */ + #define NBREAK (NCOEFFS - 2) + + int + main (void) + { + const size_t n = N; + const size_t ncoeffs = NCOEFFS; + const size_t nbreak = NBREAK; + size_t i, j; + gsl_bspline_workspace *bw; + gsl_vector *B; + double dy; + gsl_rng *r; + gsl_vector *c, *w; + gsl_vector *x, *y; + gsl_matrix *X, *cov; + gsl_multifit_linear_workspace *mw; + double chisq, Rsq, dof, tss; + + gsl_rng_env_setup(); + r = gsl_rng_alloc(gsl_rng_default); + + /* allocate a cubic bspline workspace (k = 4) */ + bw = gsl_bspline_alloc(4, nbreak); + B = gsl_vector_alloc(ncoeffs); + + x = gsl_vector_alloc(n); + y = gsl_vector_alloc(n); + X = gsl_matrix_alloc(n, ncoeffs); + c = gsl_vector_alloc(ncoeffs); + w = gsl_vector_alloc(n); + cov = gsl_matrix_alloc(ncoeffs, ncoeffs); + mw = gsl_multifit_linear_alloc(n, ncoeffs); + + printf("#m=0,S=0\n"); + /* this is the data to be fitted */ + for (i = 0; i < n; ++i) + { + double sigma; + double xi = (15.0 / (N - 1)) * i; + double yi = cos(xi) * exp(-0.1 * xi); + + sigma = 0.1 * yi; + dy = gsl_ran_gaussian(r, sigma); + yi += dy; + + gsl_vector_set(x, i, xi); + gsl_vector_set(y, i, yi); + gsl_vector_set(w, i, 1.0 / (sigma * sigma)); + + printf("%f %f\n", xi, yi); + } + + /* use uniform breakpoints on [0, 15] */ + gsl_bspline_knots_uniform(0.0, 15.0, bw); + + /* construct the fit matrix X */ + for (i = 0; i < n; ++i) + { + double xi = gsl_vector_get(x, i); + + /* compute B_j(xi) for all j */ + gsl_bspline_eval(xi, B, bw); + + /* fill in row i of X */ + for (j = 0; j < ncoeffs; ++j) + { + double Bj = gsl_vector_get(B, j); + gsl_matrix_set(X, i, j, Bj); + } + } + + /* do the fit */ + gsl_multifit_wlinear(X, w, y, c, cov, &chisq, mw); + + dof = n - ncoeffs; + tss = gsl_stats_wtss(w->data, 1, y->data, 1, y->size); + Rsq = 1.0 - chisq / tss; + + fprintf(stderr, "chisq/dof = %e, Rsq = %f\n", + chisq / dof, Rsq); + + /* output the smoothed curve */ + { + double xi, yi, yerr; + + printf("#m=1,S=0\n"); + for (xi = 0.0; xi < 15.0; xi += 0.1) + { + gsl_bspline_eval(xi, B, bw); + gsl_multifit_linear_est(B, c, cov, &yi, &yerr); + printf("%f %f\n", xi, yi); + } + } + + gsl_rng_free(r); + gsl_bspline_free(bw); + gsl_vector_free(B); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_matrix_free(X); + gsl_vector_free(c); + gsl_vector_free(w); + gsl_matrix_free(cov); + gsl_multifit_linear_free(mw); + + return 0; + } /* main() */ + + The output can be plotted with GNU `graph'. + + $ ./a.out > bspline.dat + chisq/dof = 1.118217e+00, Rsq = 0.989771 + $ graph -T ps -X x -Y y -x 0 15 -y -1 1.3 < bspline.dat > bspline.ps + + +File: gsl-ref.info, Node: References and Further Reading, Prev: Example programs for B-splines, Up: Basis Splines + +39.8 References and Further Reading +=================================== + +Further information on the algorithms described in this section can be +found in the following book, + + C. de Boor, `A Practical Guide to Splines' (1978), Springer-Verlag, + ISBN 0-387-90356-9. + + Further information of Greville abscissae and B-spline collocation +can be found in the following paper, + + Richard W. Johnson, Higher order B-spline collocation at the + Greville abscissae. `Applied Numerical Mathematics'. vol. 52, + 2005, 63-75. + +A large collection of B-spline routines is available in the PPPACK +library available at `http://www.netlib.org/pppack', which is also part +of SLATEC. + + +File: gsl-ref.info, Node: Physical Constants, Next: IEEE floating-point arithmetic, Prev: Basis Splines, Up: Top + +40 Physical Constants +********************* + +This chapter describes macros for the values of physical constants, such +as the speed of light, c, and gravitational constant, G. The values +are available in different unit systems, including the standard MKSA +system (meters, kilograms, seconds, amperes) and the CGSM system +(centimeters, grams, seconds, gauss), which is commonly used in +Astronomy. + + The definitions of constants in the MKSA system are available in the +file `gsl_const_mksa.h'. The constants in the CGSM system are defined +in `gsl_const_cgsm.h'. Dimensionless constants, such as the fine +structure constant, which are pure numbers are defined in +`gsl_const_num.h'. + +* Menu: + +* Fundamental Constants:: +* Astronomy and Astrophysics:: +* Atomic and Nuclear Physics:: +* Measurement of Time:: +* Imperial Units :: +* Speed and Nautical Units:: +* Printers Units:: +* Volume Area and Length:: +* Mass and Weight :: +* Thermal Energy and Power:: +* Pressure:: +* Viscosity:: +* Light and Illumination:: +* Radioactivity:: +* Force and Energy:: +* Prefixes:: +* Physical Constant Examples:: +* Physical Constant References and Further Reading:: + + The full list of constants is described briefly below. Consult the +header files themselves for the values of the constants used in the +library. + + +File: gsl-ref.info, Node: Fundamental Constants, Next: Astronomy and Astrophysics, Up: Physical Constants + +40.1 Fundamental Constants +========================== + +`GSL_CONST_MKSA_SPEED_OF_LIGHT' + The speed of light in vacuum, c. + +`GSL_CONST_MKSA_VACUUM_PERMEABILITY' + The permeability of free space, \mu_0. This constant is defined in + the MKSA system only. + +`GSL_CONST_MKSA_VACUUM_PERMITTIVITY' + The permittivity of free space, \epsilon_0. This constant is + defined in the MKSA system only. + +`GSL_CONST_MKSA_PLANCKS_CONSTANT_H' + Planck's constant, h. + +`GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR' + Planck's constant divided by 2\pi, \hbar. + +`GSL_CONST_NUM_AVOGADRO' + Avogadro's number, N_a. + +`GSL_CONST_MKSA_FARADAY' + The molar charge of 1 Faraday. + +`GSL_CONST_MKSA_BOLTZMANN' + The Boltzmann constant, k. + +`GSL_CONST_MKSA_MOLAR_GAS' + The molar gas constant, R_0. + +`GSL_CONST_MKSA_STANDARD_GAS_VOLUME' + The standard gas volume, V_0. + +`GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT' + The Stefan-Boltzmann radiation constant, \sigma. + +`GSL_CONST_MKSA_GAUSS' + The magnetic field of 1 Gauss. + + +File: gsl-ref.info, Node: Astronomy and Astrophysics, Next: Atomic and Nuclear Physics, Prev: Fundamental Constants, Up: Physical Constants + +40.2 Astronomy and Astrophysics +=============================== + +`GSL_CONST_MKSA_ASTRONOMICAL_UNIT' + The length of 1 astronomical unit (mean earth-sun distance), au. + +`GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT' + The gravitational constant, G. + +`GSL_CONST_MKSA_LIGHT_YEAR' + The distance of 1 light-year, ly. + +`GSL_CONST_MKSA_PARSEC' + The distance of 1 parsec, pc. + +`GSL_CONST_MKSA_GRAV_ACCEL' + The standard gravitational acceleration on Earth, g. + +`GSL_CONST_MKSA_SOLAR_MASS' + The mass of the Sun. + + +File: gsl-ref.info, Node: Atomic and Nuclear Physics, Next: Measurement of Time, Prev: Astronomy and Astrophysics, Up: Physical Constants + +40.3 Atomic and Nuclear Physics +=============================== + +`GSL_CONST_MKSA_ELECTRON_CHARGE' + The charge of the electron, e. + +`GSL_CONST_MKSA_ELECTRON_VOLT' + The energy of 1 electron volt, eV. + +`GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS' + The unified atomic mass, amu. + +`GSL_CONST_MKSA_MASS_ELECTRON' + The mass of the electron, m_e. + +`GSL_CONST_MKSA_MASS_MUON' + The mass of the muon, m_\mu. + +`GSL_CONST_MKSA_MASS_PROTON' + The mass of the proton, m_p. + +`GSL_CONST_MKSA_MASS_NEUTRON' + The mass of the neutron, m_n. + +`GSL_CONST_NUM_FINE_STRUCTURE' + The electromagnetic fine structure constant \alpha. + +`GSL_CONST_MKSA_RYDBERG' + The Rydberg constant, Ry, in units of energy. This is related to + the Rydberg inverse wavelength R_\infty by Ry = h c R_\infty. + +`GSL_CONST_MKSA_BOHR_RADIUS' + The Bohr radius, a_0. + +`GSL_CONST_MKSA_ANGSTROM' + The length of 1 angstrom. + +`GSL_CONST_MKSA_BARN' + The area of 1 barn. + +`GSL_CONST_MKSA_BOHR_MAGNETON' + The Bohr Magneton, \mu_B. + +`GSL_CONST_MKSA_NUCLEAR_MAGNETON' + The Nuclear Magneton, \mu_N. + +`GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT' + The absolute value of the magnetic moment of the electron, \mu_e. + The physical magnetic moment of the electron is negative. + +`GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT' + The magnetic moment of the proton, \mu_p. + +`GSL_CONST_MKSA_THOMSON_CROSS_SECTION' + The Thomson cross section, \sigma_T. + +`GSL_CONST_MKSA_DEBYE' + The electric dipole moment of 1 Debye, D. + + +File: gsl-ref.info, Node: Measurement of Time, Next: Imperial Units, Prev: Atomic and Nuclear Physics, Up: Physical Constants + +40.4 Measurement of Time +======================== + +`GSL_CONST_MKSA_MINUTE' + The number of seconds in 1 minute. + +`GSL_CONST_MKSA_HOUR' + The number of seconds in 1 hour. + +`GSL_CONST_MKSA_DAY' + The number of seconds in 1 day. + +`GSL_CONST_MKSA_WEEK' + The number of seconds in 1 week. + + +File: gsl-ref.info, Node: Imperial Units, Next: Speed and Nautical Units, Prev: Measurement of Time, Up: Physical Constants + +40.5 Imperial Units +=================== + +`GSL_CONST_MKSA_INCH' + The length of 1 inch. + +`GSL_CONST_MKSA_FOOT' + The length of 1 foot. + +`GSL_CONST_MKSA_YARD' + The length of 1 yard. + +`GSL_CONST_MKSA_MILE' + The length of 1 mile. + +`GSL_CONST_MKSA_MIL' + The length of 1 mil (1/1000th of an inch). + + +File: gsl-ref.info, Node: Speed and Nautical Units, Next: Printers Units, Prev: Imperial Units, Up: Physical Constants + +40.6 Speed and Nautical Units +============================= + +`GSL_CONST_MKSA_KILOMETERS_PER_HOUR' + The speed of 1 kilometer per hour. + +`GSL_CONST_MKSA_MILES_PER_HOUR' + The speed of 1 mile per hour. + +`GSL_CONST_MKSA_NAUTICAL_MILE' + The length of 1 nautical mile. + +`GSL_CONST_MKSA_FATHOM' + The length of 1 fathom. + +`GSL_CONST_MKSA_KNOT' + The speed of 1 knot. + + +File: gsl-ref.info, Node: Printers Units, Next: Volume Area and Length, Prev: Speed and Nautical Units, Up: Physical Constants + +40.7 Printers Units +=================== + +`GSL_CONST_MKSA_POINT' + The length of 1 printer's point (1/72 inch). + +`GSL_CONST_MKSA_TEXPOINT' + The length of 1 TeX point (1/72.27 inch). + + +File: gsl-ref.info, Node: Volume Area and Length, Next: Mass and Weight, Prev: Printers Units, Up: Physical Constants + +40.8 Volume, Area and Length +============================ + +`GSL_CONST_MKSA_MICRON' + The length of 1 micron. + +`GSL_CONST_MKSA_HECTARE' + The area of 1 hectare. + +`GSL_CONST_MKSA_ACRE' + The area of 1 acre. + +`GSL_CONST_MKSA_LITER' + The volume of 1 liter. + +`GSL_CONST_MKSA_US_GALLON' + The volume of 1 US gallon. + +`GSL_CONST_MKSA_CANADIAN_GALLON' + The volume of 1 Canadian gallon. + +`GSL_CONST_MKSA_UK_GALLON' + The volume of 1 UK gallon. + +`GSL_CONST_MKSA_QUART' + The volume of 1 quart. + +`GSL_CONST_MKSA_PINT' + The volume of 1 pint. + + +File: gsl-ref.info, Node: Mass and Weight, Next: Thermal Energy and Power, Prev: Volume Area and Length, Up: Physical Constants + +40.9 Mass and Weight +==================== + +`GSL_CONST_MKSA_POUND_MASS' + The mass of 1 pound. + +`GSL_CONST_MKSA_OUNCE_MASS' + The mass of 1 ounce. + +`GSL_CONST_MKSA_TON' + The mass of 1 ton. + +`GSL_CONST_MKSA_METRIC_TON' + The mass of 1 metric ton (1000 kg). + +`GSL_CONST_MKSA_UK_TON' + The mass of 1 UK ton. + +`GSL_CONST_MKSA_TROY_OUNCE' + The mass of 1 troy ounce. + +`GSL_CONST_MKSA_CARAT' + The mass of 1 carat. + +`GSL_CONST_MKSA_GRAM_FORCE' + The force of 1 gram weight. + +`GSL_CONST_MKSA_POUND_FORCE' + The force of 1 pound weight. + +`GSL_CONST_MKSA_KILOPOUND_FORCE' + The force of 1 kilopound weight. + +`GSL_CONST_MKSA_POUNDAL' + The force of 1 poundal. + + +File: gsl-ref.info, Node: Thermal Energy and Power, Next: Pressure, Prev: Mass and Weight, Up: Physical Constants + +40.10 Thermal Energy and Power +============================== + +`GSL_CONST_MKSA_CALORIE' + The energy of 1 calorie. + +`GSL_CONST_MKSA_BTU' + The energy of 1 British Thermal Unit, btu. + +`GSL_CONST_MKSA_THERM' + The energy of 1 Therm. + +`GSL_CONST_MKSA_HORSEPOWER' + The power of 1 horsepower. + + +File: gsl-ref.info, Node: Pressure, Next: Viscosity, Prev: Thermal Energy and Power, Up: Physical Constants + +40.11 Pressure +============== + +`GSL_CONST_MKSA_BAR' + The pressure of 1 bar. + +`GSL_CONST_MKSA_STD_ATMOSPHERE' + The pressure of 1 standard atmosphere. + +`GSL_CONST_MKSA_TORR' + The pressure of 1 torr. + +`GSL_CONST_MKSA_METER_OF_MERCURY' + The pressure of 1 meter of mercury. + +`GSL_CONST_MKSA_INCH_OF_MERCURY' + The pressure of 1 inch of mercury. + +`GSL_CONST_MKSA_INCH_OF_WATER' + The pressure of 1 inch of water. + +`GSL_CONST_MKSA_PSI' + The pressure of 1 pound per square inch. + + +File: gsl-ref.info, Node: Viscosity, Next: Light and Illumination, Prev: Pressure, Up: Physical Constants + +40.12 Viscosity +=============== + +`GSL_CONST_MKSA_POISE' + The dynamic viscosity of 1 poise. + +`GSL_CONST_MKSA_STOKES' + The kinematic viscosity of 1 stokes. + + +File: gsl-ref.info, Node: Light and Illumination, Next: Radioactivity, Prev: Viscosity, Up: Physical Constants + +40.13 Light and Illumination +============================ + +`GSL_CONST_MKSA_STILB' + The luminance of 1 stilb. + +`GSL_CONST_MKSA_LUMEN' + The luminous flux of 1 lumen. + +`GSL_CONST_MKSA_LUX' + The illuminance of 1 lux. + +`GSL_CONST_MKSA_PHOT' + The illuminance of 1 phot. + +`GSL_CONST_MKSA_FOOTCANDLE' + The illuminance of 1 footcandle. + +`GSL_CONST_MKSA_LAMBERT' + The luminance of 1 lambert. + +`GSL_CONST_MKSA_FOOTLAMBERT' + The luminance of 1 footlambert. + + +File: gsl-ref.info, Node: Radioactivity, Next: Force and Energy, Prev: Light and Illumination, Up: Physical Constants + +40.14 Radioactivity +=================== + +`GSL_CONST_MKSA_CURIE' + The activity of 1 curie. + +`GSL_CONST_MKSA_ROENTGEN' + The exposure of 1 roentgen. + +`GSL_CONST_MKSA_RAD' + The absorbed dose of 1 rad. + + +File: gsl-ref.info, Node: Force and Energy, Next: Prefixes, Prev: Radioactivity, Up: Physical Constants + +40.15 Force and Energy +====================== + +`GSL_CONST_MKSA_NEWTON' + The SI unit of force, 1 Newton. + +`GSL_CONST_MKSA_DYNE' + The force of 1 Dyne = 10^-5 Newton. + +`GSL_CONST_MKSA_JOULE' + The SI unit of energy, 1 Joule. + +`GSL_CONST_MKSA_ERG' + The energy 1 erg = 10^-7 Joule. + + +File: gsl-ref.info, Node: Prefixes, Next: Physical Constant Examples, Prev: Force and Energy, Up: Physical Constants + +40.16 Prefixes +============== + +These constants are dimensionless scaling factors. + +`GSL_CONST_NUM_YOTTA' + 10^24 + +`GSL_CONST_NUM_ZETTA' + 10^21 + +`GSL_CONST_NUM_EXA' + 10^18 + +`GSL_CONST_NUM_PETA' + 10^15 + +`GSL_CONST_NUM_TERA' + 10^12 + +`GSL_CONST_NUM_GIGA' + 10^9 + +`GSL_CONST_NUM_MEGA' + 10^6 + +`GSL_CONST_NUM_KILO' + 10^3 + +`GSL_CONST_NUM_MILLI' + 10^-3 + +`GSL_CONST_NUM_MICRO' + 10^-6 + +`GSL_CONST_NUM_NANO' + 10^-9 + +`GSL_CONST_NUM_PICO' + 10^-12 + +`GSL_CONST_NUM_FEMTO' + 10^-15 + +`GSL_CONST_NUM_ATTO' + 10^-18 + +`GSL_CONST_NUM_ZEPTO' + 10^-21 + +`GSL_CONST_NUM_YOCTO' + 10^-24 + + +File: gsl-ref.info, Node: Physical Constant Examples, Next: Physical Constant References and Further Reading, Prev: Prefixes, Up: Physical Constants + +40.17 Examples +============== + +The following program demonstrates the use of the physical constants in +a calculation. In this case, the goal is to calculate the range of +light-travel times from Earth to Mars. + + The required data is the average distance of each planet from the +Sun in astronomical units (the eccentricities and inclinations of the +orbits will be neglected for the purposes of this calculation). The +average radius of the orbit of Mars is 1.52 astronomical units, and for +the orbit of Earth it is 1 astronomical unit (by definition). These +values are combined with the MKSA values of the constants for the speed +of light and the length of an astronomical unit to produce a result for +the shortest and longest light-travel times in seconds. The figures are +converted into minutes before being displayed. + + #include + #include + + int + main (void) + { + double c = GSL_CONST_MKSA_SPEED_OF_LIGHT; + double au = GSL_CONST_MKSA_ASTRONOMICAL_UNIT; + double minutes = GSL_CONST_MKSA_MINUTE; + + /* distance stored in meters */ + double r_earth = 1.00 * au; + double r_mars = 1.52 * au; + + double t_min, t_max; + + t_min = (r_mars - r_earth) / c; + t_max = (r_mars + r_earth) / c; + + printf ("light travel time from Earth to Mars:\n"); + printf ("minimum = %.1f minutes\n", t_min / minutes); + printf ("maximum = %.1f minutes\n", t_max / minutes); + + return 0; + } + +Here is the output from the program, + + light travel time from Earth to Mars: + minimum = 4.3 minutes + maximum = 21.0 minutes + + +File: gsl-ref.info, Node: Physical Constant References and Further Reading, Prev: Physical Constant Examples, Up: Physical Constants + +40.18 References and Further Reading +==================================== + +The authoritative sources for physical constants are the 2006 CODATA +recommended values, published in the article below. Further information +on the values of physical constants is also available from the NIST +website. + + P.J. Mohr, B.N. Taylor, D.B. Newell, "CODATA Recommended Values of + the Fundamental Physical Constants: 2006", Reviews of Modern + Physics, 80(2), pp. 633-730 (2008). + + `http://www.physics.nist.gov/cuu/Constants/index.html' + + `http://physics.nist.gov/Pubs/SP811/appenB9.html' + + +File: gsl-ref.info, Node: IEEE floating-point arithmetic, Next: Debugging Numerical Programs, Prev: Physical Constants, Up: Top + +41 IEEE floating-point arithmetic +********************************* + +This chapter describes functions for examining the representation of +floating point numbers and controlling the floating point environment of +your program. The functions described in this chapter are declared in +the header file `gsl_ieee_utils.h'. + +* Menu: + +* Representation of floating point numbers:: +* Setting up your IEEE environment:: +* IEEE References and Further Reading:: + + +File: gsl-ref.info, Node: Representation of floating point numbers, Next: Setting up your IEEE environment, Up: IEEE floating-point arithmetic + +41.1 Representation of floating point numbers +============================================= + +The IEEE Standard for Binary Floating-Point Arithmetic defines binary +formats for single and double precision numbers. Each number is +composed of three parts: a "sign bit" (s), an "exponent" (E) and a +"fraction" (f). The numerical value of the combination (s,E,f) is +given by the following formula, + + (-1)^s (1.fffff...) 2^E + +The sign bit is either zero or one. The exponent ranges from a minimum +value E_min to a maximum value E_max depending on the precision. The +exponent is converted to an unsigned number e, known as the "biased +exponent", for storage by adding a "bias" parameter, e = E + bias. The +sequence fffff... represents the digits of the binary fraction f. The +binary digits are stored in "normalized form", by adjusting the +exponent to give a leading digit of 1. Since the leading digit is +always 1 for normalized numbers it is assumed implicitly and does not +have to be stored. Numbers smaller than 2^(E_min) are be stored in +"denormalized form" with a leading zero, + + (-1)^s (0.fffff...) 2^(E_min) + +This allows gradual underflow down to 2^(E_min - p) for p bits of +precision. A zero is encoded with the special exponent of 2^(E_min - +1) and infinities with the exponent of 2^(E_max + 1). + +The format for single precision numbers uses 32 bits divided in the +following way, + + seeeeeeeefffffffffffffffffffffff + + s = sign bit, 1 bit + e = exponent, 8 bits (E_min=-126, E_max=127, bias=127) + f = fraction, 23 bits + +The format for double precision numbers uses 64 bits divided in the +following way, + + seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff + + s = sign bit, 1 bit + e = exponent, 11 bits (E_min=-1022, E_max=1023, bias=1023) + f = fraction, 52 bits + +It is often useful to be able to investigate the behavior of a +calculation at the bit-level and the library provides functions for +printing the IEEE representations in a human-readable form. + + -- Function: void gsl_ieee_fprintf_float (FILE * STREAM, const float * + X) + -- Function: void gsl_ieee_fprintf_double (FILE * STREAM, const double + * X) + These functions output a formatted version of the IEEE + floating-point number pointed to by X to the stream STREAM. A + pointer is used to pass the number indirectly, to avoid any + undesired promotion from `float' to `double'. The output takes + one of the following forms, + + `NaN' + the Not-a-Number symbol + + `Inf, -Inf' + positive or negative infinity + + `1.fffff...*2^E, -1.fffff...*2^E' + a normalized floating point number + + `0.fffff...*2^E, -0.fffff...*2^E' + a denormalized floating point number + + `0, -0' + positive or negative zero + + + The output can be used directly in GNU Emacs Calc mode by + preceding it with `2#' to indicate binary. + + -- Function: void gsl_ieee_printf_float (const float * X) + -- Function: void gsl_ieee_printf_double (const double * X) + These functions output a formatted version of the IEEE + floating-point number pointed to by X to the stream `stdout'. + +The following program demonstrates the use of the functions by printing +the single and double precision representations of the fraction 1/3. +For comparison the representation of the value promoted from single to +double precision is also printed. + + #include + #include + + int + main (void) + { + float f = 1.0/3.0; + double d = 1.0/3.0; + + double fd = f; /* promote from float to double */ + + printf (" f="); gsl_ieee_printf_float(&f); + printf ("\n"); + + printf ("fd="); gsl_ieee_printf_double(&fd); + printf ("\n"); + + printf (" d="); gsl_ieee_printf_double(&d); + printf ("\n"); + + return 0; + } + +The binary representation of 1/3 is 0.01010101... . The output below +shows that the IEEE format normalizes this fraction to give a leading +digit of 1, + + f= 1.01010101010101010101011*2^-2 + fd= 1.0101010101010101010101100000000000000000000000000000*2^-2 + d= 1.0101010101010101010101010101010101010101010101010101*2^-2 + +The output also shows that a single-precision number is promoted to +double-precision by adding zeros in the binary representation. + + +File: gsl-ref.info, Node: Setting up your IEEE environment, Next: IEEE References and Further Reading, Prev: Representation of floating point numbers, Up: IEEE floating-point arithmetic + +41.2 Setting up your IEEE environment +===================================== + +The IEEE standard defines several "modes" for controlling the behavior +of floating point operations. These modes specify the important +properties of computer arithmetic: the direction used for rounding (e.g. +whether numbers should be rounded up, down or to the nearest number), +the rounding precision and how the program should handle arithmetic +exceptions, such as division by zero. + + Many of these features can now be controlled via standard functions +such as `fpsetround', which should be used whenever they are available. +Unfortunately in the past there has been no universal API for +controlling their behavior--each system has had its own low-level way +of accessing them. To help you write portable programs GSL allows you +to specify modes in a platform-independent way using the environment +variable `GSL_IEEE_MODE'. The library then takes care of all the +necessary machine-specific initializations for you when you call the +function `gsl_ieee_env_setup'. + + -- Function: void gsl_ieee_env_setup () + This function reads the environment variable `GSL_IEEE_MODE' and + attempts to set up the corresponding specified IEEE modes. The + environment variable should be a list of keywords, separated by + commas, like this, + + `GSL_IEEE_MODE' = "KEYWORD,KEYWORD,..." + + where KEYWORD is one of the following mode-names, + + `single-precision' + + `double-precision' + + `extended-precision' + + `round-to-nearest' + + `round-down' + + `round-up' + + `round-to-zero' + + `mask-all' + + `mask-invalid' + + `mask-denormalized' + + `mask-division-by-zero' + + `mask-overflow' + + `mask-underflow' + + `trap-inexact' + + `trap-common' + + If `GSL_IEEE_MODE' is empty or undefined then the function returns + immediately and no attempt is made to change the system's IEEE + mode. When the modes from `GSL_IEEE_MODE' are turned on the + function prints a short message showing the new settings to remind + you that the results of the program will be affected. + + If the requested modes are not supported by the platform being + used then the function calls the error handler and returns an + error code of `GSL_EUNSUP'. + + When options are specified using this method, the resulting mode is + based on a default setting of the highest available precision + (double precision or extended precision, depending on the + platform) in round-to-nearest mode, with all exceptions enabled + apart from the INEXACT exception. The INEXACT exception is + generated whenever rounding occurs, so it must generally be + disabled in typical scientific calculations. All other + floating-point exceptions are enabled by default, including + underflows and the use of denormalized numbers, for safety. They + can be disabled with the individual `mask-' settings or together + using `mask-all'. + + The following adjusted combination of modes is convenient for many + purposes, + + GSL_IEEE_MODE="double-precision,"\ + "mask-underflow,"\ + "mask-denormalized" + + This choice ignores any errors relating to small numbers (either + denormalized, or underflowing to zero) but traps overflows, + division by zero and invalid operations. + + Note that on the x86 series of processors this function sets both + the original x87 mode and the newer MXCSR mode, which controls SSE + floating-point operations. The SSE floating-point units do not + have a precision-control bit, and always work in double-precision. + The single-precision and extended-precision keywords have no + effect in this case. + +To demonstrate the effects of different rounding modes consider the +following program which computes e, the base of natural logarithms, by +summing a rapidly-decreasing series, + + e = 1 + 1/2! + 1/3! + 1/4! + ... + = 2.71828182846... + + #include + #include + #include + + int + main (void) + { + double x = 1, oldsum = 0, sum = 0; + int i = 0; + + gsl_ieee_env_setup (); /* read GSL_IEEE_MODE */ + + do + { + i++; + + oldsum = sum; + sum += x; + x = x / i; + + printf ("i=%2d sum=%.18f error=%g\n", + i, sum, sum - M_E); + + if (i > 30) + break; + } + while (sum != oldsum); + + return 0; + } + +Here are the results of running the program in `round-to-nearest' mode. +This is the IEEE default so it isn't really necessary to specify it +here, + + $ GSL_IEEE_MODE="round-to-nearest" ./a.out + i= 1 sum=1.000000000000000000 error=-1.71828 + i= 2 sum=2.000000000000000000 error=-0.718282 + .... + i=18 sum=2.718281828459045535 error=4.44089e-16 + i=19 sum=2.718281828459045535 error=4.44089e-16 + +After nineteen terms the sum converges to within 4 \times 10^-16 of the +correct value. If we now change the rounding mode to `round-down' the +final result is less accurate, + + $ GSL_IEEE_MODE="round-down" ./a.out + i= 1 sum=1.000000000000000000 error=-1.71828 + .... + i=19 sum=2.718281828459041094 error=-3.9968e-15 + +The result is about 4 \times 10^-15 below the correct value, an order +of magnitude worse than the result obtained in the `round-to-nearest' +mode. + + If we change to rounding mode to `round-up' then the final result is +higher than the correct value (when we add each term to the sum the +final result is always rounded up, which increases the sum by at least +one tick until the added term underflows to zero). To avoid this +problem we would need to use a safer converge criterion, such as `while +(fabs(sum - oldsum) > epsilon)', with a suitably chosen value of +epsilon. + + Finally we can see the effect of computing the sum using +single-precision rounding, in the default `round-to-nearest' mode. In +this case the program thinks it is still using double precision numbers +but the CPU rounds the result of each floating point operation to +single-precision accuracy. This simulates the effect of writing the +program using single-precision `float' variables instead of `double' +variables. The iteration stops after about half the number of +iterations and the final result is much less accurate, + + $ GSL_IEEE_MODE="single-precision" ./a.out + .... + i=12 sum=2.718281984329223633 error=1.5587e-07 + +with an error of O(10^-7), which corresponds to single precision +accuracy (about 1 part in 10^7). Continuing the iterations further +does not decrease the error because all the subsequent results are +rounded to the same value. + + +File: gsl-ref.info, Node: IEEE References and Further Reading, Prev: Setting up your IEEE environment, Up: IEEE floating-point arithmetic + +41.3 References and Further Reading +=================================== + +The reference for the IEEE standard is, + + ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point + Arithmetic. + +A more pedagogical introduction to the standard can be found in the +following paper, + + David Goldberg: What Every Computer Scientist Should Know About + Floating-Point Arithmetic. `ACM Computing Surveys', Vol. 23, No. 1 + (March 1991), pages 5-48. + + Corrigendum: `ACM Computing Surveys', Vol. 23, No. 3 (September + 1991), page 413. and see also the sections by B. A. Wichmann and + Charles B. Dunham in Surveyor's Forum: "What Every Computer + Scientist Should Know About Floating-Point Arithmetic". `ACM + Computing Surveys', Vol. 24, No. 3 (September 1992), page 319. + +A detailed textbook on IEEE arithmetic and its practical use is +available from SIAM Press, + + Michael L. Overton, `Numerical Computing with IEEE Floating Point + Arithmetic', SIAM Press, ISBN 0898715717. + + + +File: gsl-ref.info, Node: Debugging Numerical Programs, Next: Contributors to GSL, Prev: IEEE floating-point arithmetic, Up: Top + +Appendix A Debugging Numerical Programs +*************************************** + +This chapter describes some tips and tricks for debugging numerical +programs which use GSL. + +* Menu: + +* Using gdb:: +* Examining floating point registers:: +* Handling floating point exceptions:: +* GCC warning options for numerical programs:: +* Debugging References:: + + +File: gsl-ref.info, Node: Using gdb, Next: Examining floating point registers, Up: Debugging Numerical Programs + +A.1 Using gdb +============= + +Any errors reported by the library are passed to the function +`gsl_error'. By running your programs under gdb and setting a +breakpoint in this function you can automatically catch any library +errors. You can add a breakpoint for every session by putting + + break gsl_error + +into your `.gdbinit' file in the directory where your program is +started. + + If the breakpoint catches an error then you can use a backtrace +(`bt') to see the call-tree, and the arguments which possibly caused +the error. By moving up into the calling function you can investigate +the values of variables at that point. Here is an example from the +program `fft/test_trap', which contains the following line, + + status = gsl_fft_complex_wavetable_alloc (0, &complex_wavetable); + +The function `gsl_fft_complex_wavetable_alloc' takes the length of an +FFT as its first argument. When this line is executed an error will be +generated because the length of an FFT is not allowed to be zero. + + To debug this problem we start `gdb', using the file `.gdbinit' to +define a breakpoint in `gsl_error', + + $ gdb test_trap + + GDB is free software and you are welcome to distribute copies + of it under certain conditions; type "show copying" to see + the conditions. There is absolutely no warranty for GDB; + type "show warranty" for details. GDB 4.16 (i586-debian-linux), + Copyright 1996 Free Software Foundation, Inc. + + Breakpoint 1 at 0x8050b1e: file error.c, line 14. + +When we run the program this breakpoint catches the error and shows the +reason for it. + + (gdb) run + Starting program: test_trap + + Breakpoint 1, gsl_error (reason=0x8052b0d + "length n must be positive integer", + file=0x8052b04 "c_init.c", line=108, gsl_errno=1) + at error.c:14 + 14 if (gsl_error_handler) + +The first argument of `gsl_error' is always a string describing the +error. Now we can look at the backtrace to see what caused the problem, + + (gdb) bt + #0 gsl_error (reason=0x8052b0d + "length n must be positive integer", + file=0x8052b04 "c_init.c", line=108, gsl_errno=1) + at error.c:14 + #1 0x8049376 in gsl_fft_complex_wavetable_alloc (n=0, + wavetable=0xbffff778) at c_init.c:108 + #2 0x8048a00 in main (argc=1, argv=0xbffff9bc) + at test_trap.c:94 + #3 0x80488be in ___crt_dummy__ () + +We can see that the error was generated in the function +`gsl_fft_complex_wavetable_alloc' when it was called with an argument +of N=0. The original call came from line 94 in the file `test_trap.c'. + + By moving up to the level of the original call we can find the line +that caused the error, + + (gdb) up + #1 0x8049376 in gsl_fft_complex_wavetable_alloc (n=0, + wavetable=0xbffff778) at c_init.c:108 + 108 GSL_ERROR ("length n must be positive integer", GSL_EDOM); + (gdb) up + #2 0x8048a00 in main (argc=1, argv=0xbffff9bc) + at test_trap.c:94 + 94 status = gsl_fft_complex_wavetable_alloc (0, + &complex_wavetable); + +Thus we have found the line that caused the problem. From this point we +could also print out the values of other variables such as +`complex_wavetable'. + + +File: gsl-ref.info, Node: Examining floating point registers, Next: Handling floating point exceptions, Prev: Using gdb, Up: Debugging Numerical Programs + +A.2 Examining floating point registers +====================================== + +The contents of floating point registers can be examined using the +command `info float' (on supported platforms). + + (gdb) info float + st0: 0xc4018b895aa17a945000 Valid Normal -7.838871e+308 + st1: 0x3ff9ea3f50e4d7275000 Valid Normal 0.0285946 + st2: 0x3fe790c64ce27dad4800 Valid Normal 6.7415931e-08 + st3: 0x3ffaa3ef0df6607d7800 Spec Normal 0.0400229 + st4: 0x3c028000000000000000 Valid Normal 4.4501477e-308 + st5: 0x3ffef5412c22219d9000 Zero Normal 0.9580257 + st6: 0x3fff8000000000000000 Valid Normal 1 + st7: 0xc4028b65a1f6d243c800 Valid Normal -1.566206e+309 + fctrl: 0x0272 53 bit; NEAR; mask DENOR UNDER LOS; + fstat: 0xb9ba flags 0001; top 7; excep DENOR OVERF UNDER LOS + ftag: 0x3fff + fip: 0x08048b5c + fcs: 0x051a0023 + fopoff: 0x08086820 + fopsel: 0x002b + +Individual registers can be examined using the variables $REG, where +REG is the register name. + + (gdb) p $st1 + $1 = 0.02859464454261210347719 + + +File: gsl-ref.info, Node: Handling floating point exceptions, Next: GCC warning options for numerical programs, Prev: Examining floating point registers, Up: Debugging Numerical Programs + +A.3 Handling floating point exceptions +====================================== + +It is possible to stop the program whenever a `SIGFPE' floating point +exception occurs. This can be useful for finding the cause of an +unexpected infinity or `NaN'. The current handler settings can be +shown with the command `info signal SIGFPE'. + + (gdb) info signal SIGFPE + Signal Stop Print Pass to program Description + SIGFPE Yes Yes Yes Arithmetic exception + +Unless the program uses a signal handler the default setting should be +changed so that SIGFPE is not passed to the program, as this would cause +it to exit. The command `handle SIGFPE stop nopass' prevents this. + + (gdb) handle SIGFPE stop nopass + Signal Stop Print Pass to program Description + SIGFPE Yes Yes No Arithmetic exception + +Depending on the platform it may be necessary to instruct the kernel to +generate signals for floating point exceptions. For programs using GSL +this can be achieved using the `GSL_IEEE_MODE' environment variable in +conjunction with the function `gsl_ieee_env_setup' as described in +*note IEEE floating-point arithmetic::. + + (gdb) set env GSL_IEEE_MODE=double-precision + + +File: gsl-ref.info, Node: GCC warning options for numerical programs, Next: Debugging References, Prev: Handling floating point exceptions, Up: Debugging Numerical Programs + +A.4 GCC warning options for numerical programs +============================================== + +Writing reliable numerical programs in C requires great care. The +following GCC warning options are recommended when compiling numerical +programs: + + gcc -ansi -pedantic -Werror -Wall -W + -Wmissing-prototypes -Wstrict-prototypes + -Wconversion -Wshadow -Wpointer-arith + -Wcast-qual -Wcast-align + -Wwrite-strings -Wnested-externs + -fshort-enums -fno-common -Dinline= -g -O2 + +For details of each option consult the manual `Using and Porting GCC'. +The following table gives a brief explanation of what types of errors +these options catch. + +`-ansi -pedantic' + Use ANSI C, and reject any non-ANSI extensions. These flags help + in writing portable programs that will compile on other systems. + +`-Werror' + Consider warnings to be errors, so that compilation stops. This + prevents warnings from scrolling off the top of the screen and + being lost. You won't be able to compile the program until it is + completely warning-free. + +`-Wall' + This turns on a set of warnings for common programming problems. + You need `-Wall', but it is not enough on its own. + +`-O2' + Turn on optimization. The warnings for uninitialized variables in + `-Wall' rely on the optimizer to analyze the code. If there is no + optimization then these warnings aren't generated. + +`-W' + This turns on some extra warnings not included in `-Wall', such as + missing return values and comparisons between signed and unsigned + integers. + +`-Wmissing-prototypes -Wstrict-prototypes' + Warn if there are any missing or inconsistent prototypes. Without + prototypes it is harder to detect problems with incorrect + arguments. + +`-Wconversion' + The main use of this option is to warn about conversions from + signed to unsigned integers. For example, `unsigned int x = -1'. + If you need to perform such a conversion you can use an explicit + cast. + +`-Wshadow' + This warns whenever a local variable shadows another local + variable. If two variables have the same name then it is a + potential source of confusion. + +`-Wpointer-arith -Wcast-qual -Wcast-align' + These options warn if you try to do pointer arithmetic for types + which don't have a size, such as `void', if you remove a `const' + cast from a pointer, or if you cast a pointer to a type which has a + different size, causing an invalid alignment. + +`-Wwrite-strings' + This option gives string constants a `const' qualifier so that it + will be a compile-time error to attempt to overwrite them. + +`-fshort-enums' + This option makes the type of `enum' as short as possible. + Normally this makes an `enum' different from an `int'. + Consequently any attempts to assign a pointer-to-int to a + pointer-to-enum will generate a cast-alignment warning. + +`-fno-common' + This option prevents global variables being simultaneously defined + in different object files (you get an error at link time). Such a + variable should be defined in one file and referred to in other + files with an `extern' declaration. + +`-Wnested-externs' + This warns if an `extern' declaration is encountered within a + function. + +`-Dinline=' + The `inline' keyword is not part of ANSI C. Thus if you want to use + `-ansi' with a program which uses inline functions you can use this + preprocessor definition to remove the `inline' keywords. + +`-g' + It always makes sense to put debugging symbols in the executable + so that you can debug it using `gdb'. The only effect of + debugging symbols is to increase the size of the file, and you can + use the `strip' command to remove them later if necessary. + + +File: gsl-ref.info, Node: Debugging References, Prev: GCC warning options for numerical programs, Up: Debugging Numerical Programs + +A.5 References and Further Reading +================================== + +The following books are essential reading for anyone writing and +debugging numerical programs with GCC and GDB. + + R.M. Stallman, `Using and Porting GNU CC', Free Software + Foundation, ISBN 1882114388 + + R.M. Stallman, R.H. Pesch, `Debugging with GDB: The GNU + Source-Level Debugger', Free Software Foundation, ISBN 1882114779 + +For a tutorial introduction to the GNU C Compiler and related programs, +see + + B.J. Gough, `An Introduction to GCC', Network Theory Ltd, ISBN + 0954161793 + + +File: gsl-ref.info, Node: Contributors to GSL, Next: Autoconf Macros, Prev: Debugging Numerical Programs, Up: Top + +Appendix B Contributors to GSL +****************************** + +(See the AUTHORS file in the distribution for up-to-date information.) + +*Mark Galassi* + Conceived GSL (with James Theiler) and wrote the design document. + Wrote the simulated annealing package and the relevant chapter in + the manual. + +*James Theiler* + Conceived GSL (with Mark Galassi). Wrote the random number + generators and the relevant chapter in this manual. + +*Jim Davies* + Wrote the statistical routines and the relevant chapter in this + manual. + +*Brian Gough* + FFTs, numerical integration, random number generators and + distributions, root finding, minimization and fitting, polynomial + solvers, complex numbers, physical constants, permutations, vector + and matrix functions, histograms, statistics, ieee-utils, revised + CBLAS Level 2 & 3, matrix decompositions, eigensystems, cumulative + distribution functions, testing, documentation and releases. + +*Reid Priedhorsky* + Wrote and documented the initial version of the root finding + routines while at Los Alamos National Laboratory, Mathematical + Modeling and Analysis Group. + +*Gerard Jungman* + Special Functions, Series acceleration, ODEs, BLAS, Linear Algebra, + Eigensystems, Hankel Transforms. + +*Mike Booth* + Wrote the Monte Carlo library. + +*Jorma Olavi Ta"htinen* + Wrote the initial complex arithmetic functions. + +*Thomas Walter* + Wrote the initial heapsort routines and Cholesky decomposition. + +*Fabrice Rossi* + Multidimensional minimization. + +*Carlo Perassi* + Implementation of the random number generators in Knuth's + `Seminumerical Algorithms', 3rd Ed. + +*Szymon Jaroszewicz* + Wrote the routines for generating combinations. + +*Nicolas Darnis* + Wrote the cyclic functions and the initial functions for canonical + permutations. + +*Jason H. Stover* + Wrote the major cumulative distribution functions. + +*Ivo Alxneit* + Wrote the routines for wavelet transforms. + +*Tuomo Keskitalo* + Improved the implementation of the ODE solvers and wrote the + ode-initval2 routines. + +*Lowell Johnson* + Implementation of the Mathieu functions. + +*Patrick Alken* + Implementation of non-symmetric and generalized eigensystems and + B-splines. + +*Rhys Ulerich* + Wrote the multiset routines. + +*Pavel Holoborodko* + Wrote the fixed order Gauss-Legendre quadrature routines. + +*Pedro Gonnet* + Wrote the CQUAD integration routines. + + + Thanks to Nigel Lowry for help in proofreading the manual. + + The non-symmetric eigensystems routines contain code based on the +LAPACK linear algebra library. LAPACK is distributed under the +following license: + + + Copyright (c) 1992-2006 The University of Tennessee. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + + * Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +File: gsl-ref.info, Node: Autoconf Macros, Next: GSL CBLAS Library, Prev: Contributors to GSL, Up: Top + +Appendix C Autoconf Macros +************************** + +For applications using `autoconf' the standard macro `AC_CHECK_LIB' can +be used to link with GSL automatically from a `configure' script. The +library itself depends on the presence of a CBLAS and math library as +well, so these must also be located before linking with the main +`libgsl' file. The following commands should be placed in the +`configure.ac' file to perform these tests, + + AC_CHECK_LIB([m],[cos]) + AC_CHECK_LIB([gslcblas],[cblas_dgemm]) + AC_CHECK_LIB([gsl],[gsl_blas_dgemm]) + +It is important to check for `libm' and `libgslcblas' before `libgsl', +otherwise the tests will fail. Assuming the libraries are found the +output during the configure stage looks like this, + + checking for cos in -lm... yes + checking for cblas_dgemm in -lgslcblas... yes + checking for gsl_blas_dgemm in -lgsl... yes + +If the library is found then the tests will define the macros +`HAVE_LIBGSL', `HAVE_LIBGSLCBLAS', `HAVE_LIBM' and add the options +`-lgsl -lgslcblas -lm' to the variable `LIBS'. + + The tests above will find any version of the library. They are +suitable for general use, where the versions of the functions are not +important. An alternative macro is available in the file `gsl.m4' to +test for a specific version of the library. To use this macro simply +add the following line to your `configure.in' file instead of the tests +above: + + AX_PATH_GSL(GSL_VERSION, + [action-if-found], + [action-if-not-found]) + +The argument `GSL_VERSION' should be the two or three digit MAJOR.MINOR +or MAJOR.MINOR.MICRO version number of the release you require. A +suitable choice for `action-if-not-found' is, + + AC_MSG_ERROR(could not find required version of GSL) + +Then you can add the variables `GSL_LIBS' and `GSL_CFLAGS' to your +Makefile.am files to obtain the correct compiler flags. `GSL_LIBS' is +equal to the output of the `gsl-config --libs' command and `GSL_CFLAGS' +is equal to `gsl-config --cflags' command. For example, + + libfoo_la_LDFLAGS = -lfoo $(GSL_LIBS) -lgslcblas + +Note that the macro `AX_PATH_GSL' needs to use the C compiler so it +should appear in the `configure.in' file before the macro +`AC_LANG_CPLUSPLUS' for programs that use C++. + + To test for `inline' the following test should be placed in your +`configure.in' file, + + AC_C_INLINE + + if test "$ac_cv_c_inline" != no ; then + AC_DEFINE(HAVE_INLINE,1) + AC_SUBST(HAVE_INLINE) + fi + +and the macro will then be defined in the compilation flags or by +including the file `config.h' before any library headers. + + The following autoconf test will check for `extern inline', + + dnl Check for "extern inline", using a modified version + dnl of the test for AC_C_INLINE from acspecific.mt + dnl + AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline, + [ac_cv_c_extern_inline=no + AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x); + extern $ac_cv_c_inline double foo(double x) { return x+1.0; }; + double foo (double x) { return x + 1.0; };], + [ foo(1.0) ], + [ac_cv_c_extern_inline="yes"]) + ]) + + if test "$ac_cv_c_extern_inline" != no ; then + AC_DEFINE(HAVE_INLINE,1) + AC_SUBST(HAVE_INLINE) + fi + + The substitution of portability functions can be made automatically +if you use `autoconf'. For example, to test whether the BSD function +`hypot' is available you can include the following line in the +configure file `configure.in' for your application, + + AC_CHECK_FUNCS(hypot) + +and place the following macro definitions in the file `config.h.in', + + /* Substitute gsl_hypot for missing system hypot */ + + #ifndef HAVE_HYPOT + #define hypot gsl_hypot + #endif + +The application source files can then use the include command `#include +' to substitute `gsl_hypot' for each occurrence of `hypot' +when `hypot' is not available. + + +File: gsl-ref.info, Node: GSL CBLAS Library, Next: Free Software Needs Free Documentation, Prev: Autoconf Macros, Up: Top + +Appendix D GSL CBLAS Library +**************************** + +The prototypes for the low-level CBLAS functions are declared in the +file `gsl_cblas.h'. For the definition of the functions consult the +documentation available from Netlib (*note BLAS References and Further +Reading::). + +* Menu: + +* Level 1 CBLAS Functions:: +* Level 2 CBLAS Functions:: +* Level 3 CBLAS Functions:: +* GSL CBLAS Examples:: + + +File: gsl-ref.info, Node: Level 1 CBLAS Functions, Next: Level 2 CBLAS Functions, Up: GSL CBLAS Library + +D.1 Level 1 +=========== + + -- Function: float cblas_sdsdot (const int N, const float ALPHA, const + float * X, const int INCX, const float * Y, const int INCY) + + -- Function: double cblas_dsdot (const int N, const float * X, const + int INCX, const float * Y, const int INCY) + + -- Function: float cblas_sdot (const int N, const float * X, const int + INCX, const float * Y, const int INCY) + + -- Function: double cblas_ddot (const int N, const double * X, const + int INCX, const double * Y, const int INCY) + + -- Function: void cblas_cdotu_sub (const int N, const void * X, const + int INCX, const void * Y, const int INCY, void * DOTU) + + -- Function: void cblas_cdotc_sub (const int N, const void * X, const + int INCX, const void * Y, const int INCY, void * DOTC) + + -- Function: void cblas_zdotu_sub (const int N, const void * X, const + int INCX, const void * Y, const int INCY, void * DOTU) + + -- Function: void cblas_zdotc_sub (const int N, const void * X, const + int INCX, const void * Y, const int INCY, void * DOTC) + + -- Function: float cblas_snrm2 (const int N, const float * X, const + int INCX) + + -- Function: float cblas_sasum (const int N, const float * X, const + int INCX) + + -- Function: double cblas_dnrm2 (const int N, const double * X, const + int INCX) + + -- Function: double cblas_dasum (const int N, const double * X, const + int INCX) + + -- Function: float cblas_scnrm2 (const int N, const void * X, const + int INCX) + + -- Function: float cblas_scasum (const int N, const void * X, const + int INCX) + + -- Function: double cblas_dznrm2 (const int N, const void * X, const + int INCX) + + -- Function: double cblas_dzasum (const int N, const void * X, const + int INCX) + + -- Function: CBLAS_INDEX cblas_isamax (const int N, const float * X, + const int INCX) + + -- Function: CBLAS_INDEX cblas_idamax (const int N, const double * X, + const int INCX) + + -- Function: CBLAS_INDEX cblas_icamax (const int N, const void * X, + const int INCX) + + -- Function: CBLAS_INDEX cblas_izamax (const int N, const void * X, + const int INCX) + + -- Function: void cblas_sswap (const int N, float * X, const int INCX, + float * Y, const int INCY) + + -- Function: void cblas_scopy (const int N, const float * X, const int + INCX, float * Y, const int INCY) + + -- Function: void cblas_saxpy (const int N, const float ALPHA, const + float * X, const int INCX, float * Y, const int INCY) + + -- Function: void cblas_dswap (const int N, double * X, const int + INCX, double * Y, const int INCY) + + -- Function: void cblas_dcopy (const int N, const double * X, const + int INCX, double * Y, const int INCY) + + -- Function: void cblas_daxpy (const int N, const double ALPHA, const + double * X, const int INCX, double * Y, const int INCY) + + -- Function: void cblas_cswap (const int N, void * X, const int INCX, + void * Y, const int INCY) + + -- Function: void cblas_ccopy (const int N, const void * X, const int + INCX, void * Y, const int INCY) + + -- Function: void cblas_caxpy (const int N, const void * ALPHA, const + void * X, const int INCX, void * Y, const int INCY) + + -- Function: void cblas_zswap (const int N, void * X, const int INCX, + void * Y, const int INCY) + + -- Function: void cblas_zcopy (const int N, const void * X, const int + INCX, void * Y, const int INCY) + + -- Function: void cblas_zaxpy (const int N, const void * ALPHA, const + void * X, const int INCX, void * Y, const int INCY) + + -- Function: void cblas_srotg (float * A, float * B, float * C, float + * S) + + -- Function: void cblas_srotmg (float * D1, float * D2, float * B1, + const float B2, float * P) + + -- Function: void cblas_srot (const int N, float * X, const int INCX, + float * Y, const int INCY, const float C, const float S) + + -- Function: void cblas_srotm (const int N, float * X, const int INCX, + float * Y, const int INCY, const float * P) + + -- Function: void cblas_drotg (double * A, double * B, double * C, + double * S) + + -- Function: void cblas_drotmg (double * D1, double * D2, double * B1, + const double B2, double * P) + + -- Function: void cblas_drot (const int N, double * X, const int INCX, + double * Y, const int INCY, const double C, const double S) + + -- Function: void cblas_drotm (const int N, double * X, const int + INCX, double * Y, const int INCY, const double * P) + + -- Function: void cblas_sscal (const int N, const float ALPHA, float * + X, const int INCX) + + -- Function: void cblas_dscal (const int N, const double ALPHA, double + * X, const int INCX) + + -- Function: void cblas_cscal (const int N, const void * ALPHA, void * + X, const int INCX) + + -- Function: void cblas_zscal (const int N, const void * ALPHA, void * + X, const int INCX) + + -- Function: void cblas_csscal (const int N, const float ALPHA, void * + X, const int INCX) + + -- Function: void cblas_zdscal (const int N, const double ALPHA, void + * X, const int INCX) + + +File: gsl-ref.info, Node: Level 2 CBLAS Functions, Next: Level 3 CBLAS Functions, Prev: Level 1 CBLAS Functions, Up: GSL CBLAS Library + +D.2 Level 2 +=========== + + -- Function: void cblas_sgemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + float ALPHA, const float * A, const int LDA, const float * X, + const int INCX, const float BETA, float * Y, const int INCY) + + -- Function: void cblas_sgbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + int KL, const int KU, const float ALPHA, const float * A, + const int LDA, const float * X, const int INCX, const float + BETA, float * Y, const int INCY) + + -- Function: void cblas_strmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const float * A, + const int LDA, float * X, const int INCX) + + -- Function: void cblas_stbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + float * A, const int LDA, float * X, const int INCX) + + -- Function: void cblas_stpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const float * AP, + float * X, const int INCX) + + -- Function: void cblas_strsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const float * A, + const int LDA, float * X, const int INCX) + + -- Function: void cblas_stbsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + float * A, const int LDA, float * X, const int INCX) + + -- Function: void cblas_stpsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const float * AP, + float * X, const int INCX) + + -- Function: void cblas_dgemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + double ALPHA, const double * A, const int LDA, const double * + X, const int INCX, const double BETA, double * Y, const int + INCY) + + -- Function: void cblas_dgbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + int KL, const int KU, const double ALPHA, const double * A, + const int LDA, const double * X, const int INCX, const double + BETA, double * Y, const int INCY) + + -- Function: void cblas_dtrmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const double * A, + const int LDA, double * X, const int INCX) + + -- Function: void cblas_dtbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + double * A, const int LDA, double * X, const int INCX) + + -- Function: void cblas_dtpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const double * AP, + double * X, const int INCX) + + -- Function: void cblas_dtrsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const double * A, + const int LDA, double * X, const int INCX) + + -- Function: void cblas_dtbsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + double * A, const int LDA, double * X, const int INCX) + + -- Function: void cblas_dtpsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const double * AP, + double * X, const int INCX) + + -- Function: void cblas_cgemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + void * ALPHA, const void * A, const int LDA, const void * X, + const int INCX, const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_cgbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + int KL, const int KU, const void * ALPHA, const void * A, + const int LDA, const void * X, const int INCX, const void * + BETA, void * Y, const int INCY) + + -- Function: void cblas_ctrmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * A, + const int LDA, void * X, const int INCX) + + -- Function: void cblas_ctbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + void * A, const int LDA, void * X, const int INCX) + + -- Function: void cblas_ctpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * AP, + void * X, const int INCX) + + -- Function: void cblas_ctrsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * A, + const int LDA, void * X, const int INCX) + + -- Function: void cblas_ctbsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + void * A, const int LDA, void * X, const int INCX) + + -- Function: void cblas_ctpsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * AP, + void * X, const int INCX) + + -- Function: void cblas_zgemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + void * ALPHA, const void * A, const int LDA, const void * X, + const int INCX, const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_zgbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const int M, const int N, const + int KL, const int KU, const void * ALPHA, const void * A, + const int LDA, const void * X, const int INCX, const void * + BETA, void * Y, const int INCY) + + -- Function: void cblas_ztrmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * A, + const int LDA, void * X, const int INCX) + + -- Function: void cblas_ztbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + void * A, const int LDA, void * X, const int INCX) + + -- Function: void cblas_ztpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * AP, + void * X, const int INCX) + + -- Function: void cblas_ztrsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * A, + const int LDA, void * X, const int INCX) + + -- Function: void cblas_ztbsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const int K, const + void * A, const int LDA, void * X, const int INCX) + + -- Function: void cblas_ztpsv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANSA, + const enum CBLAS_DIAG DIAG, const int N, const void * AP, + void * X, const int INCX) + + -- Function: void cblas_ssymv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const float ALPHA, const + float * A, const int LDA, const float * X, const int INCX, + const float BETA, float * Y, const int INCY) + + -- Function: void cblas_ssbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const int K, const float + ALPHA, const float * A, const int LDA, const float * X, const + int INCX, const float BETA, float * Y, const int INCY) + + -- Function: void cblas_sspmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const float ALPHA, const + float * AP, const float * X, const int INCX, const float + BETA, float * Y, const int INCY) + + -- Function: void cblas_sger (const enum CBLAS_ORDER ORDER, const int + M, const int N, const float ALPHA, const float * X, const int + INCX, const float * Y, const int INCY, float * A, const int + LDA) + + -- Function: void cblas_ssyr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const float ALPHA, const float + * X, const int INCX, float * A, const int LDA) + + -- Function: void cblas_sspr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const float ALPHA, const float + * X, const int INCX, float * AP) + + -- Function: void cblas_ssyr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const float ALPHA, const + float * X, const int INCX, const float * Y, const int INCY, + float * A, const int LDA) + + -- Function: void cblas_sspr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const float ALPHA, const + float * X, const int INCX, const float * Y, const int INCY, + float * A) + + -- Function: void cblas_dsymv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * A, const int LDA, const double * X, const int INCX, + const double BETA, double * Y, const int INCY) + + -- Function: void cblas_dsbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const int K, const double + ALPHA, const double * A, const int LDA, const double * X, + const int INCX, const double BETA, double * Y, const int INCY) + + -- Function: void cblas_dspmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * AP, const double * X, const int INCX, const double + BETA, double * Y, const int INCY) + + -- Function: void cblas_dger (const enum CBLAS_ORDER ORDER, const int + M, const int N, const double ALPHA, const double * X, const + int INCX, const double * Y, const int INCY, double * A, const + int LDA) + + -- Function: void cblas_dsyr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * X, const int INCX, double * A, const int LDA) + + -- Function: void cblas_dspr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * X, const int INCX, double * AP) + + -- Function: void cblas_dsyr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * X, const int INCX, const double * Y, const int INCY, + double * A, const int LDA) + + -- Function: void cblas_dspr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const double ALPHA, const + double * X, const int INCX, const double * Y, const int INCY, + double * A) + + -- Function: void cblas_chemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * A, const int LDA, const void * X, const int INCX, + const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_chbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const int K, const void * + ALPHA, const void * A, const int LDA, const void * X, const + int INCX, const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_chpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * AP, const void * X, const int INCX, const void * BETA, + void * Y, const int INCY) + + -- Function: void cblas_cgeru (const enum CBLAS_ORDER ORDER, const int + M, const int N, const void * ALPHA, const void * X, const int + INCX, const void * Y, const int INCY, void * A, const int LDA) + + -- Function: void cblas_cgerc (const enum CBLAS_ORDER ORDER, const int + M, const int N, const void * ALPHA, const void * X, const int + INCX, const void * Y, const int INCY, void * A, const int LDA) + + -- Function: void cblas_cher (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const float ALPHA, const void * + X, const int INCX, void * A, const int LDA) + + -- Function: void cblas_chpr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const float ALPHA, const void * + X, const int INCX, void * A) + + -- Function: void cblas_cher2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * X, const int INCX, const void * Y, const int INCY, + void * A, const int LDA) + + -- Function: void cblas_chpr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * X, const int INCX, const void * Y, const int INCY, + void * AP) + + -- Function: void cblas_zhemv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * A, const int LDA, const void * X, const int INCX, + const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_zhbmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const int K, const void * + ALPHA, const void * A, const int LDA, const void * X, const + int INCX, const void * BETA, void * Y, const int INCY) + + -- Function: void cblas_zhpmv (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * AP, const void * X, const int INCX, const void * BETA, + void * Y, const int INCY) + + -- Function: void cblas_zgeru (const enum CBLAS_ORDER ORDER, const int + M, const int N, const void * ALPHA, const void * X, const int + INCX, const void * Y, const int INCY, void * A, const int LDA) + + -- Function: void cblas_zgerc (const enum CBLAS_ORDER ORDER, const int + M, const int N, const void * ALPHA, const void * X, const int + INCX, const void * Y, const int INCY, void * A, const int LDA) + + -- Function: void cblas_zher (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const double ALPHA, const void + * X, const int INCX, void * A, const int LDA) + + -- Function: void cblas_zhpr (const enum CBLAS_ORDER ORDER, const enum + CBLAS_UPLO UPLO, const int N, const double ALPHA, const void + * X, const int INCX, void * A) + + -- Function: void cblas_zher2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * X, const int INCX, const void * Y, const int INCY, + void * A, const int LDA) + + -- Function: void cblas_zhpr2 (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const int N, const void * ALPHA, const + void * X, const int INCX, const void * Y, const int INCY, + void * AP) + + +File: gsl-ref.info, Node: Level 3 CBLAS Functions, Next: GSL CBLAS Examples, Prev: Level 2 CBLAS Functions, Up: GSL CBLAS Library + +D.3 Level 3 +=========== + + -- Function: void cblas_sgemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const enum CBLAS_TRANSPOSE + TRANSB, const int M, const int N, const int K, const float + ALPHA, const float * A, const int LDA, const float * B, const + int LDB, const float BETA, float * C, const int LDC) + + -- Function: void cblas_ssymm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const float ALPHA, const float * A, const int + LDA, const float * B, const int LDB, const float BETA, float + * C, const int LDC) + + -- Function: void cblas_ssyrk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const float ALPHA, const float * A, const + int LDA, const float BETA, float * C, const int LDC) + + -- Function: void cblas_ssyr2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const float ALPHA, const float * A, const + int LDA, const float * B, const int LDB, const float BETA, + float * C, const int LDC) + + -- Function: void cblas_strmm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const float ALPHA, const float * A, const int + LDA, float * B, const int LDB) + + -- Function: void cblas_strsm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const float ALPHA, const float * A, const int + LDA, float * B, const int LDB) + + -- Function: void cblas_dgemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const enum CBLAS_TRANSPOSE + TRANSB, const int M, const int N, const int K, const double + ALPHA, const double * A, const int LDA, const double * B, + const int LDB, const double BETA, double * C, const int LDC) + + -- Function: void cblas_dsymm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const double ALPHA, const double * A, const + int LDA, const double * B, const int LDB, const double BETA, + double * C, const int LDC) + + -- Function: void cblas_dsyrk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const double ALPHA, const double * A, + const int LDA, const double BETA, double * C, const int LDC) + + -- Function: void cblas_dsyr2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const double ALPHA, const double * A, + const int LDA, const double * B, const int LDB, const double + BETA, double * C, const int LDC) + + -- Function: void cblas_dtrmm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const double ALPHA, const double * A, const + int LDA, double * B, const int LDB) + + -- Function: void cblas_dtrsm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const double ALPHA, const double * A, const + int LDA, double * B, const int LDB) + + -- Function: void cblas_cgemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const enum CBLAS_TRANSPOSE + TRANSB, const int M, const int N, const int K, const void * + ALPHA, const void * A, const int LDA, const void * B, const + int LDB, const void * BETA, void * C, const int LDC) + + -- Function: void cblas_csymm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, const void * B, const int LDB, const void * BETA, void * + C, const int LDC) + + -- Function: void cblas_csyrk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * BETA, void * C, const int LDC) + + -- Function: void cblas_csyr2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * B, const int LDB, const void * BETA, + void * C, const int LDC) + + -- Function: void cblas_ctrmm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, void * B, const int LDB) + + -- Function: void cblas_ctrsm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, void * B, const int LDB) + + -- Function: void cblas_zgemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_TRANSPOSE TRANSA, const enum CBLAS_TRANSPOSE + TRANSB, const int M, const int N, const int K, const void * + ALPHA, const void * A, const int LDA, const void * B, const + int LDB, const void * BETA, void * C, const int LDC) + + -- Function: void cblas_zsymm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, const void * B, const int LDB, const void * BETA, void * + C, const int LDC) + + -- Function: void cblas_zsyrk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * BETA, void * C, const int LDC) + + -- Function: void cblas_zsyr2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * B, const int LDB, const void * BETA, + void * C, const int LDC) + + -- Function: void cblas_ztrmm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, void * B, const int LDB) + + -- Function: void cblas_ztrsm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const enum + CBLAS_TRANSPOSE TRANSA, const enum CBLAS_DIAG DIAG, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, void * B, const int LDB) + + -- Function: void cblas_chemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, const void * B, const int LDB, const void * BETA, void * + C, const int LDC) + + -- Function: void cblas_cherk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const float ALPHA, const void * A, const + int LDA, const float BETA, void * C, const int LDC) + + -- Function: void cblas_cher2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * B, const int LDB, const float BETA, + void * C, const int LDC) + + -- Function: void cblas_zhemm (const enum CBLAS_ORDER ORDER, const + enum CBLAS_SIDE SIDE, const enum CBLAS_UPLO UPLO, const int + M, const int N, const void * ALPHA, const void * A, const int + LDA, const void * B, const int LDB, const void * BETA, void * + C, const int LDC) + + -- Function: void cblas_zherk (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const double ALPHA, const void * A, const + int LDA, const double BETA, void * C, const int LDC) + + -- Function: void cblas_zher2k (const enum CBLAS_ORDER ORDER, const + enum CBLAS_UPLO UPLO, const enum CBLAS_TRANSPOSE TRANS, const + int N, const int K, const void * ALPHA, const void * A, const + int LDA, const void * B, const int LDB, const double BETA, + void * C, const int LDC) + + -- Function: void cblas_xerbla (int P, const char * ROUT, const char * + FORM, ...) + + +File: gsl-ref.info, Node: GSL CBLAS Examples, Prev: Level 3 CBLAS Functions, Up: GSL CBLAS Library + +D.4 Examples +============ + +The following program computes the product of two matrices using the +Level-3 BLAS function SGEMM, + + [ 0.11 0.12 0.13 ] [ 1011 1012 ] [ 367.76 368.12 ] + [ 0.21 0.22 0.23 ] [ 1021 1022 ] = [ 674.06 674.72 ] + [ 1031 1032 ] + +The matrices are stored in row major order but could be stored in column +major order if the first argument of the call to `cblas_sgemm' was +changed to `CblasColMajor'. + + #include + #include + + int + main (void) + { + int lda = 3; + + float A[] = { 0.11, 0.12, 0.13, + 0.21, 0.22, 0.23 }; + + int ldb = 2; + + float B[] = { 1011, 1012, + 1021, 1022, + 1031, 1032 }; + + int ldc = 2; + + float C[] = { 0.00, 0.00, + 0.00, 0.00 }; + + /* Compute C = A B */ + + cblas_sgemm (CblasRowMajor, + CblasNoTrans, CblasNoTrans, 2, 2, 3, + 1.0, A, lda, B, ldb, 0.0, C, ldc); + + printf ("[ %g, %g\n", C[0], C[1]); + printf (" %g, %g ]\n", C[2], C[3]); + + return 0; + } + +To compile the program use the following command line, + + $ gcc -Wall demo.c -lgslcblas + +There is no need to link with the main library `-lgsl' in this case as +the CBLAS library is an independent unit. Here is the output from the +program, + + $ ./a.out + [ 367.76, 368.12 + 674.06, 674.72 ] + + +File: gsl-ref.info, Node: Free Software Needs Free Documentation, Next: GNU General Public License, Prev: GSL CBLAS Library, Up: Top + +Free Software Needs Free Documentation +************************************** + + The following article was written by Richard Stallman, founder of + the GNU Project. + + The biggest deficiency in the free software community today is not in +the software--it is the lack of good free documentation that we can +include with the free software. Many of our most important programs do +not come with free reference manuals and free introductory texts. +Documentation is an essential part of any software package; when an +important free software package does not come with a free manual and a +free tutorial, that is a major gap. We have many such gaps today. + + Consider Perl, for instance. The tutorial manuals that people +normally use are non-free. How did this come about? Because the +authors of those manuals published them with restrictive terms--no +copying, no modification, source files not available--which exclude +them from the free software world. + + That wasn't the first time this sort of thing happened, and it was +far from the last. Many times we have heard a GNU user eagerly +describe a manual that he is writing, his intended contribution to the +community, only to learn that he had ruined everything by signing a +publication contract to make it non-free. + + Free documentation, like free software, is a matter of freedom, not +price. The problem with the non-free manual is not that publishers +charge a price for printed copies--that in itself is fine. (The Free +Software Foundation sells printed copies of manuals, too.) The problem +is the restrictions on the use of the manual. Free manuals are +available in source code form, and give you permission to copy and +modify. Non-free manuals do not allow this. + + The criteria of freedom for a free manual are roughly the same as for +free software. Redistribution (including the normal kinds of +commercial redistribution) must be permitted, so that the manual can +accompany every copy of the program, both on-line and on paper. + + Permission for modification of the technical content is crucial too. +When people modify the software, adding or changing features, if they +are conscientious they will change the manual too--so they can provide +accurate and clear documentation for the modified program. A manual +that leaves you no choice but to write a new manual to document a +changed version of the program is not really available to our community. + + Some kinds of limits on the way modification is handled are +acceptable. For example, requirements to preserve the original +author's copyright notice, the distribution terms, or the list of +authors, are ok. It is also no problem to require modified versions to +include notice that they were modified. Even entire sections that may +not be deleted or changed are acceptable, as long as they deal with +nontechnical topics (like this one). These kinds of restrictions are +acceptable because they don't obstruct the community's normal use of +the manual. + + However, it must be possible to modify all the _technical_ content +of the manual, and then distribute the result in all the usual media, +through all the usual channels. Otherwise, the restrictions obstruct +the use of the manual, it is not free, and we need another manual to +replace it. + + Please spread the word about this issue. Our community continues to +lose manuals to proprietary publishing. If we spread the word that +free software needs free reference manuals and free tutorials, perhaps +the next person who wants to contribute by writing documentation will +realize, before it is too late, that only free manuals contribute to +the free software community. + + If you are writing documentation, please insist on publishing it +under the GNU Free Documentation License or another free documentation +license. Remember that this decision requires your approval--you don't +have to let the publisher decide. Some commercial publishers will use +a free license if you insist, but they will not propose the option; it +is up to you to raise the issue and say firmly that this is what you +want. If the publisher you are dealing with refuses, please try other +publishers. If you're not sure whether a proposed license is free, +write to . + + You can encourage commercial publishers to sell more free, copylefted +manuals and tutorials by buying them, and particularly by buying copies +from the publishers that paid for their writing or for major +improvements. Meanwhile, try to avoid buying non-free documentation at +all. Check the distribution terms of a manual before you buy it, and +insist that whoever seeks your business must respect your freedom. +Check the history of the book, and try reward the publishers that have +paid or pay the authors to work on it. + + The Free Software Foundation maintains a list of free documentation +published by other publishers: + + `http://www.fsf.org/doc/other-free-books.html' + + +File: gsl-ref.info, Node: GNU General Public License, Next: GNU Free Documentation License, Prev: Free Software Needs Free Documentation, Up: Top + +GNU General Public License +************************** + + Version 3, 29 June 2007 + Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' + + Everyone is permitted to copy and distribute verbatim copies of this + license document, but changing it is not allowed. + +Preamble +======== + +The GNU General Public License is a free, copyleft license for software +and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program-to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you +have certain responsibilities if you distribute copies of the software, +or if you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the +manufacturer can do so. This is fundamentally incompatible with the +aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for +individuals to use, which is precisely where it is most unacceptable. +Therefore, we have designed this version of the GPL to prohibit the +practice for those products. If such problems arise substantially in +other domains, we stand ready to extend this provision to those domains +in future versions of the GPL, as needed to protect the freedom of +users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +TERMS AND CONDITIONS +==================== + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public + License. + + "Copyright" also means copyright-like laws that apply to other + kinds of works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this + License. Each licensee is addressed as "you". "Licensees" and + "recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the + work in a fashion requiring copyright permission, other than the + making of an exact copy. The resulting work is called a "modified + version" of the earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work + based on the Program. + + To "propagate" a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it + on a computer or modifying a private copy. Propagation includes + copying, distribution (with or without modification), making + available to the public, and in some countries other activities as + well. + + To "convey" a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user + through a computer network, with no transfer of a copy, is not + conveying. + + An interactive user interface displays "Appropriate Legal Notices" + to the extent that it includes a convenient and prominently visible + feature that (1) displays an appropriate copyright notice, and (2) + tells the user that there is no warranty for the work (except to + the extent that warranties are provided), that licensees may + convey the work under this License, and how to view a copy of this + License. If the interface presents a list of user commands or + options, such as a menu, a prominent item in the list meets this + criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work + for making modifications to it. "Object code" means any + non-source form of a work. + + A "Standard Interface" means an interface that either is an + official standard defined by a recognized standards body, or, in + the case of interfaces specified for a particular programming + language, one that is widely used among developers working in that + language. + + The "System Libraries" of an executable work include anything, + other than the work as a whole, that (a) is included in the normal + form of packaging a Major Component, but which is not part of that + Major Component, and (b) serves only to enable use of the work + with that Major Component, or to implement a Standard Interface + for which an implementation is available to the public in source + code form. A "Major Component", in this context, means a major + essential component (kernel, window system, and so on) of the + specific operating system (if any) on which the executable work + runs, or a compiler used to produce the work, or an object code + interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all + the source code needed to generate, install, and (for an executable + work) run the object code and to modify the work, including + scripts to control those activities. However, it does not include + the work's System Libraries, or general-purpose tools or generally + available free programs which are used unmodified in performing + those activities but which are not part of the work. For example, + Corresponding Source includes interface definition files + associated with source files for the work, and the source code for + shared libraries and dynamically linked subprograms that the work + is specifically designed to require, such as by intimate data + communication or control flow between those subprograms and other + parts of the work. + + The Corresponding Source need not include anything that users can + regenerate automatically from other parts of the Corresponding + Source. + + The Corresponding Source for a work in source code form is that + same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program. The output from running + a covered work is covered by this License only if the output, + given its content, constitutes a covered work. This License + acknowledges your rights of fair use or other equivalent, as + provided by copyright law. + + You may make, run and propagate covered works that you do not + convey, without conditions so long as your license otherwise + remains in force. You may convey covered works to others for the + sole purpose of having them make modifications exclusively for + you, or provide you with facilities for running those works, + provided that you comply with the terms of this License in + conveying all material for which you do not control copyright. + Those thus making or running the covered works for you must do so + exclusively on your behalf, under your direction and control, on + terms that prohibit them from making any copies of your + copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under + the conditions stated below. Sublicensing is not allowed; section + 10 makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under + article 11 of the WIPO copyright treaty adopted on 20 December + 1996, or similar laws prohibiting or restricting circumvention of + such measures. + + When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such + circumvention is effected by exercising rights under this License + with respect to the covered work, and you disclaim any intention + to limit operation or modification of the work as a means of + enforcing, against the work's users, your or third parties' legal + rights to forbid circumvention of technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; + keep intact all notices stating that this License and any + non-permissive terms added in accord with section 7 apply to the + code; keep intact all notices of the absence of any warranty; and + give all recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, + and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the + terms of section 4, provided that you also meet all of these + conditions: + + a. The work must carry prominent notices stating that you + modified it, and giving a relevant date. + + b. The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in + section 4 to "keep intact all notices". + + c. You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable + section 7 additional terms, to the whole of the work, and all + its parts, regardless of how they are packaged. This License + gives no permission to license the work in any other way, but + it does not invalidate such permission if you have separately + received it. + + d. If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has + interactive interfaces that do not display Appropriate Legal + Notices, your work need not make them do so. + + A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered + work, and which are not combined with it such as to form a larger + program, in or on a volume of a storage or distribution medium, is + called an "aggregate" if the compilation and its resulting + copyright are not used to limit the access or legal rights of the + compilation's users beyond what the individual works permit. + Inclusion of a covered work in an aggregate does not cause this + License to apply to the other parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms + of sections 4 and 5, provided that you also convey the + machine-readable Corresponding Source under the terms of this + License, in one of these ways: + + a. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for + as long as you offer spare parts or customer support for that + product model, to give anyone who possesses the object code + either (1) a copy of the Corresponding Source for all the + software in the product that is covered by this License, on a + durable physical medium customarily used for software + interchange, for a price no more than your reasonable cost of + physically performing this conveying of source, or (2) access + to copy the Corresponding Source from a network server at no + charge. + + c. Convey individual copies of the object code with a copy of + the written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, + and only if you received the object code with such an offer, + in accord with subsection 6b. + + d. Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access + to the Corresponding Source in the same way through the same + place at no further charge. You need not require recipients + to copy the Corresponding Source along with the object code. + If the place to copy the object code is a network server, the + Corresponding Source may be on a different server (operated + by you or a third party) that supports equivalent copying + facilities, provided you maintain clear directions next to + the object code saying where to find the Corresponding Source. + Regardless of what server hosts the Corresponding Source, you + remain obligated to ensure that it is available for as long + as needed to satisfy these requirements. + + e. Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the + general public at no charge under subsection 6d. + + + A separable portion of the object code, whose source code is + excluded from the Corresponding Source as a System Library, need + not be included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means + any tangible personal property which is normally used for personal, + family, or household purposes, or (2) anything designed or sold for + incorporation into a dwelling. In determining whether a product + is a consumer product, doubtful cases shall be resolved in favor of + coverage. For a particular product received by a particular user, + "normally used" refers to a typical or common use of that class of + product, regardless of the status of the particular user or of the + way in which the particular user actually uses, or expects or is + expected to use, the product. A product is a consumer product + regardless of whether the product has substantial commercial, + industrial or non-consumer uses, unless such uses represent the + only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, + procedures, authorization keys, or other information required to + install and execute modified versions of a covered work in that + User Product from a modified version of its Corresponding Source. + The information must suffice to ensure that the continued + functioning of the modified object code is in no case prevented or + interfered with solely because modification has been made. + + If you convey an object code work under this section in, or with, + or specifically for use in, a User Product, and the conveying + occurs as part of a transaction in which the right of possession + and use of the User Product is transferred to the recipient in + perpetuity or for a fixed term (regardless of how the transaction + is characterized), the Corresponding Source conveyed under this + section must be accompanied by the Installation Information. But + this requirement does not apply if neither you nor any third party + retains the ability to install modified object code on the User + Product (for example, the work has been installed in ROM). + + The requirement to provide Installation Information does not + include a requirement to continue to provide support service, + warranty, or updates for a work that has been modified or + installed by the recipient, or for the User Product in which it + has been modified or installed. Access to a network may be denied + when the modification itself materially and adversely affects the + operation of the network or violates the rules and protocols for + communication across the network. + + Corresponding Source conveyed, and Installation Information + provided, in accord with this section must be in a format that is + publicly documented (and with an implementation available to the + public in source code form), and must require no special password + or key for unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of + this License by making exceptions from one or more of its + conditions. Additional permissions that are applicable to the + entire Program shall be treated as though they were included in + this License, to the extent that they are valid under applicable + law. If additional permissions apply only to part of the Program, + that part may be used separately under those permissions, but the + entire Program remains governed by this License without regard to + the additional permissions. + + When you convey a copy of a covered work, you may at your option + remove any additional permissions from that copy, or from any part + of it. (Additional permissions may be written to require their own + removal in certain cases when you modify the work.) You may place + additional permissions on material, added by you to a covered work, + for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material + you add to a covered work, you may (if authorized by the copyright + holders of that material) supplement the terms of this License + with terms: + + a. Disclaiming warranty or limiting liability differently from + the terms of sections 15 and 16 of this License; or + + b. Requiring preservation of specified reasonable legal notices + or author attributions in that material or in the Appropriate + Legal Notices displayed by works containing it; or + + c. Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be + marked in reasonable ways as different from the original + version; or + + d. Limiting the use for publicity purposes of names of licensors + or authors of the material; or + + e. Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f. Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified + versions of it) with contractual assumptions of liability to + the recipient, for any liability that these contractual + assumptions directly impose on those licensors and authors. + + All other non-permissive additional terms are considered "further + restrictions" within the meaning of section 10. If the Program as + you received it, or any part of it, contains a notice stating that + it is governed by this License along with a term that is a further + restriction, you may remove that term. If a license document + contains a further restriction but permits relicensing or + conveying under this License, you may add to a covered work + material governed by the terms of that license document, provided + that the further restriction does not survive such relicensing or + conveying. + + If you add terms to a covered work in accord with this section, you + must place, in the relevant source files, a statement of the + additional terms that apply to those files, or a notice indicating + where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in + the form of a separately written license, or stated as exceptions; + the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or + modify it is void, and will automatically terminate your rights + under this License (including any patent licenses granted under + the third paragraph of section 11). + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, you do not qualify to receive new + licenses for the same material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or + run a copy of the Program. Ancillary propagation of a covered work + occurring solely as a consequence of using peer-to-peer + transmission to receive a copy likewise does not require + acceptance. However, nothing other than this License grants you + permission to propagate or modify any covered work. These actions + infringe copyright if you do not accept this License. Therefore, + by modifying or propagating a covered work, you indicate your + acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically + receives a license from the original licensors, to run, modify and + propagate that work, subject to this License. You are not + responsible for enforcing compliance by third parties with this + License. + + An "entity transaction" is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a + covered work results from an entity transaction, each party to that + transaction who receives a copy of the work also receives whatever + licenses to the work the party's predecessor in interest had or + could give under the previous paragraph, plus a right to + possession of the Corresponding Source of the work from the + predecessor in interest, if the predecessor has it or can get it + with reasonable efforts. + + You may not impose any further restrictions on the exercise of the + rights granted or affirmed under this License. For example, you + may not impose a license fee, royalty, or other charge for + exercise of rights granted under this License, and you may not + initiate litigation (including a cross-claim or counterclaim in a + lawsuit) alleging that any patent claim is infringed by making, + using, selling, offering for sale, or importing the Program or any + portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. + The work thus licensed is called the contributor's "contributor + version". + + A contributor's "essential patent claims" are all patent claims + owned or controlled by the contributor, whether already acquired or + hereafter acquired, that would be infringed by some manner, + permitted by this License, of making, using, or selling its + contributor version, but do not include claims that would be + infringed only as a consequence of further modification of the + contributor version. For purposes of this definition, "control" + includes the right to grant patent sublicenses in a manner + consistent with the requirements of this License. + + Each contributor grants you a non-exclusive, worldwide, + royalty-free patent license under the contributor's essential + patent claims, to make, use, sell, offer for sale, import and + otherwise run, modify and propagate the contents of its + contributor version. + + In the following three paragraphs, a "patent license" is any + express agreement or commitment, however denominated, not to + enforce a patent (such as an express permission to practice a + patent or covenant not to sue for patent infringement). To + "grant" such a patent license to a party means to make such an + agreement or commitment not to enforce a patent against the party. + + If you convey a covered work, knowingly relying on a patent + license, and the Corresponding Source of the work is not available + for anyone to copy, free of charge and under the terms of this + License, through a publicly available network server or other + readily accessible means, then you must either (1) cause the + Corresponding Source to be so available, or (2) arrange to deprive + yourself of the benefit of the patent license for this particular + work, or (3) arrange, in a manner consistent with the requirements + of this License, to extend the patent license to downstream + recipients. "Knowingly relying" means you have actual knowledge + that, but for the patent license, your conveying the covered work + in a country, or your recipient's use of the covered work in a + country, would infringe one or more identifiable patents in that + country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties + receiving the covered work authorizing them to use, propagate, + modify or convey a specific copy of the covered work, then the + patent license you grant is automatically extended to all + recipients of the covered work and works based on it. + + A patent license is "discriminatory" if it does not include within + the scope of its coverage, prohibits the exercise of, or is + conditioned on the non-exercise of one or more of the rights that + are specifically granted under this License. You may not convey a + covered work if you are a party to an arrangement with a third + party that is in the business of distributing software, under + which you make payment to the third party based on the extent of + your activity of conveying the work, and under which the third + party grants, to any of the parties who would receive the covered + work from you, a discriminatory patent license (a) in connection + with copies of the covered work conveyed by you (or copies made + from those copies), or (b) primarily for and in connection with + specific products or compilations that contain the covered work, + unless you entered into that arrangement, or that patent license + was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting + any implied license or other defenses to infringement that may + otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot convey a covered work so as to satisfy + simultaneously your obligations under this License and any other + pertinent obligations, then as a consequence you may not convey it + at all. For example, if you agree to terms that obligate you to + collect a royalty for further conveying from those to whom you + convey the Program, the only way you could satisfy both those + terms and this License would be to refrain entirely from conveying + the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have + permission to link or combine any covered work with a work licensed + under version 3 of the GNU Affero General Public License into a + single combined work, and to convey the resulting work. The terms + of this License will continue to apply to the part which is the + covered work, but the special requirements of the GNU Affero + General Public License, section 13, concerning interaction through + a network will apply to the combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new + versions of the GNU General Public License from time to time. + Such new versions will be similar in spirit to the present + version, but may differ in detail to address new problems or + concerns. + + Each version is given a distinguishing version number. If the + Program specifies that a certain numbered version of the GNU + General Public License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that numbered version or of any later version published by the + Free Software Foundation. If the Program does not specify a + version number of the GNU General Public License, you may choose + any version ever published by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future + versions of the GNU General Public License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Program. + + Later license versions may give you additional or different + permissions. However, no additional obligations are imposed on any + author or copyright holder as a result of your choosing to follow a + later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE + COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE + RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. + SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES + AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU + FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE + THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA + BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF + THE POSSIBILITY OF SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided + above cannot be given local legal effect according to their terms, + reviewing courts shall apply local law that most closely + approximates an absolute waiver of all civil liability in + connection with the Program, unless a warranty or assumption of + liability accompanies a copy of the Program in return for a fee. + + +END OF TERMS AND CONDITIONS +=========================== + +How to Apply These Terms to Your New Programs +============================================= + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and a brief idea + of whAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see `http://www.gnu.org/licenses/'. + + Also add information on how to contact you by electronic and paper +mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + PROGRAM Copyright (C) YEAR NAME OF AUTHOR + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, your +program's commands might be different; for a GUI interface, you would +use an "about box". + + You should also get your employer (if you work as a programmer) or +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. For more information on this, and how to apply and follow +the GNU GPL, see `http://www.gnu.org/licenses/'. + + The GNU General Public License does not permit incorporating your +program into proprietary programs. If your program is a subroutine +library, you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +GNU Lesser General Public License instead of this License. But first, +please read `http://www.gnu.org/philosophy/why-not-lgpl.html'. + + +File: gsl-ref.info, Node: GNU Free Documentation License, Next: Function Index, Prev: GNU General Public License, Up: Top + +GNU Free Documentation License +****************************** + + Version 1.3, 3 November 2008 + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + `http://fsf.org/' + + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is + not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it + can be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You + accept the license if you copy, modify or distribute the work in a + way requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. If a section does not fit the above definition of + Secondary then it is not allowed to be designated as Invariant. + The Document may contain zero Invariant Sections. If the Document + does not identify any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup, or absence of + markup, has been arranged to thwart or discourage subsequent + modification by readers is not Transparent. An image format is + not Transparent if used for any substantial amount of text. A + copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML, PostScript or PDF designed for + human modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats that + can be read and edited only by proprietary word processors, SGML or + XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML, PostScript or PDF + produced by some word processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a computer-network location from + which the general network-using public has access to download + using public-standard network protocols a complete Transparent + copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section Entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, receipt of a copy of some or all of + the same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free + Documentation License, Version 1.3 or any later version + published by the Free Software Foundation; with no + Invariant Sections, no Front-Cover Texts, and no + Back-Cover Texts. A copy of the license is included in + the section entitled ``GNU Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR + TITLES, with the Front-Cover Texts being LIST, and + with the Back-Cover Texts being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. + diff --git a/software/gsl-1.15/doc/gsl-ref.info-5 b/software/gsl-1.15/doc/gsl-ref.info-5 new file mode 100644 index 0000000000000000000000000000000000000000..611a508f5294aa2b0ea4d3c46ade5031675e72da GIT binary patch literal 268397 zcmd75ZFAhVvM#zm?(&~FsP!ppSCr$C{F-~~R4KA-Yc1PxEGIeHr%th`8IHtwW;h{d z^x|KC8vucBfDOp;B|xjzk`;++J?w5Y8vTZkS9K@gf0y0rpskia)SG4Vz1X(RVn44I z;^I!M%TJa3uDGt+u5LEs(GRmDv22_51M^F}>bCyj!Gp7RFMmFGarWWh{Pg7G+0XC9 zd9&Qzlx-ze^+j8@b=5sM|9Jf2+ukxp3;=7Z7irMq$PrjF*pQ_K# z)aU2li^GQxAF9tY_4!bJK2o0_eg6P{`dEDpzYAZ(@4{#JUHGhiccy-KHWMGOD)H+4 zjrdrVYhVlf`S(@3t~F-_!Ez_X^roIyo38p^{MO5D_QR2A z+6U$4POM6xU@Sg}puDI!-JbO-{ESlZC==K*OIBB_Zc;rIaPYC59fpU4V2E`12Xs#Tl z(iJM8%WA#8AIec8D9>h;E7hc2p}KNewe$PAl1M;@Ph0`D`w5{uCIY&eQf&_(KcP^j zRNL8Os*0^2P{cF32X%Lox=xO++)ZfW#PerVSMJ*BOq_cT+D+-N%pOuNZg0;hZY4~R|7s{kuaRk&(xR_@T9j>$!?#w=vZo1RqY(@?LuANd>W<*yOWw-wVt|ZzH z#UtW6EvAh+JtH3fV&bS1(Uk>6onk&hTGvU;$j-c&Hq`T&?97X4Lp_g(>m;E}w;hVd z1!#_JDvABhV z5@SnZuF&nUo6^lboKdyC=bW0>@XwCu&fMLz2_+Sfm^o0U^!N{H5@yj&8tOTsiy5GN zfwfH)<9D{hX@eS1slPI9P{Y}o0m^hv!r_eiw%y&7PQnr04gt!PYU|jQNuy3rJOND@ zb$U!!(4Lh4tYO&i+7)cP%905%kbrLksyx2_{brQ~EhEUHJ zxY>!aWa24xvnP!@iKkRoKHn2|O6yQQrq=fJJtx(~P)Mk!o|o(LHgY^n3xy_k>&2u{ z9+M+k-AxOHxY_mRNufL;i@CdJ0i``1iX#Wgq}75?NxA`!%<*t`+7mC~boZE*#4Cs%-@9o8>yCh?4Xo3Yx8%wfc>IYnA2S;2QBbA}tUsjN;iQ4}*)zI= zrVXsqELqo08O@$Oqh8#k(d-#5y8^CE85VpTys+%^NP4mnEWm2v< z0-7|MO)J)+*LXr}D-P-LecEU?EuIIiOsOk0`+i%s&^CK-+%{2+e@6R*K2KUhIeSQS z<@2;Pl+>a8JaOkPiDpYEQ+DnW6Zd&>&p{|@0BrV%_$!|$4S>z4UHLp|0L&@TlTapf zv*{iLP$q05KBA!>31zw_;-iOj1x?#T{G7yBK11j37et*>?LqXQDxplLwuf|j1VEYa zba+J54HC+9wN6L0a8W^tRTyc*pGsGr((Mqq5<}8Qvy(xgd(hRCvACm$q%Q9B)pk;~ zB>^xAWlFWBQ0{S8(q=wpN7UL*8y0*{;!HTXHn|e2-|N z(FToXmdyIibTtP-6N8f;jrFs%e-jOVq(&oj#XsRqY<5{{y%7Vwi3LGYqai1RUQ)3* zNOCkf>Wq?tGi5kQks8fFZ=xq$jV9e5F7OPcB^52LNX{FbE~k=;R97VD&13fj6CYBg z(WJA*Lbvr;-o)orB}b$4TZm@j)19jLKs3=oA<228i&PQK#OEm$kao~a=oio2vu1o& zRPq(>*_%bQt0lSK=xQ#MRJ5@rHJX_&pLNiLn>doA(cNJVn)~+fbhfy!8gkJDnUkD1 zx(yc5#GG`So=g?@^P>Xs{>Ie25i=FRC%lObJ5G+~sb~G7SyPQBVWiFT{T9)F3XLYA zC#oBCiKJpJ6{*q84sDJ@`NhDSNC84}G`f%4;mw2*6EA)vc{5?eM9+~$-b{SD^Ymuo z)7=0~WDHDld-L2oPep6zQ?DtZulYc|i4KF&XwrEU{Qy;hCgzGJN8@D@<0D~`qrrT$ zvc>VKFv-#A0l-#L@xd_Z(YP_u_-vTuX!P(N%bWOknB-{mKuCfnHX$ZC8a+M%(L{&D zBuC>}zxbS(CkA>MImQi-Ihc%Wi-j#HK&axJ#kNW@fi%M^+xD^5?oUg*9v&n zZ`x?mBh?~ic@v+2pe2!K0IAXR7b;OnO_|s9V(Iab0Gc-mJ<(^bMs8m?SihQHl}LcSUOcNJ7hPTW@wt zK8*9BDi`(UQk0v8xM}O1{Q5$o>_+OYrDt)4riH)AV-X@b8d~w(qp3n*M3l)Sg`x<- zuD1#BIQ?ts*<(cHQk0<=OV4Bsuy$Li+_6P*wgIIpSM_J9dAqAh{B)pysS{nZx~|%h z^pMnZ_n;P4TVM0ga)BZTM+a1OU9JXdc?#d$E3+Y*rDc=2D7(57%l&39Es9WY1y5a9 zW36D4EgXO>HqGX9)ixIFR3J%s!U4H#tKmAxCSHuS^`Kb6%1r>~Pkf1ZN0TXwY#_}E zkdZ3Mo@cBGHL_fSBx#Wz)MZ;;*Q*tnwu^3FcO98$`}4)FtT)n}z3Lwl=AlX~n>Ms` z$CB-kgP%6duCq&2v#$Sq(rh4DzX#jVn_u;;xUS~AW-QZ7N-=uwsXtQeH#M-s%OK|f zq%ZwY+hq@EGjFQplI2m>b&37&^To2bsCH%Xo);X*@1xu;;Suqo1{u~Dd*xC-aOC^9 z|D*Rtac4px^(GM2ObW!F5-pHlrs0S!Z$co`aKuJ96p(t;tigc_=!p_d|40%&vBw_= z3@@VOV60Ov!OYA3{OT^i7rlB;)FVmw;%JM363`dPmxNFped(d_0!q#mXE7Tn({RPc zG?cDf)!kn~RZ*7qUP^~V0v7@5X%LAijSnwA9urc@C><>1CO)RDIP|Pa^MNd>z8Tx<5*?j&$hV<8X%uP z@0**dO`=5{Dn?++t;~nYvDM23xVu4CDO>dNKt5w#VjE+{;$CS)dO}0-Yo}ShUXYMI zKO>N&483XFLqh01-DMW|&>JhY+s3&vj5g@vUM@bPedUVLId!k24 z5ixoMh^FL`qeoX@Y}&BFme%pL^GFIs!lHO-usuk=703k1k=v@=u3$EOY_+}7kECD^ z)_zO&SS(>3N{PkUI}8?IMty=xiYg@*=O}8iOv4vfUz$q@RfHTMwWq%6A4#GxE@Lbh zmNQC7DZ%iZ;Z-I%7*~A_XLx&@9E`JDt(waXB+f%gzaET!B#F|5&~RFl9*uJfMc%M# zlOBz8Iwxo*;f=8C5`DWSw2dpf z{9ZkhWPv%h$3WpU2)0kjpoCDIwcbN<1k~@~@}I;|obACtnT9KlXS^+C&&xf!A|FYj zD;$)#fRaIR;uqTn>f)MEI8f_~ek2K7+$Gdw3GhYfZ9*)L;udPoC$k;NyX&Y-QE2;&s`|z=@gdqgjiws20Tc}VUH%n z3+g^Xjt2IGz6z0}J$oD3W=kfe_Ppv-6e-q~zByDDmCB9Mdf;_a~VBU17O z-K(qWf^Qd+uCMwyf#x>Vg(KVPPRiAM4@D2MD+d~OPT<$?x~uA1oI~T$c-=YZb4h&Q zWX=oK1H=_czmP3Yx;aR7{K=~{FWYi8TI&HSkp%<2hZTF}Kx#0DXm%8sV1>UF-SPgm zUe(U!uc}ugk<@UK-dtjfv;_e+9|LI>8mT!BJ2WhuqG|(!$kM~XUOj}f;q+NbE(07a zD>uR_HX;6`hlBmSiaU|^D9N4t7HQ_LJ7|U4g=9AkKG&i*Ettz7z}$8Lopq^dUHy63 zy(pDledNZ5yK=LJ2%_5ALL1@IBgqRF0V7H!My585qs1hZ zO}WDl63E1zBaDGlO#C>3Oqj@iLNHxc?5=V=pI1IqiZwH`JhMw1AQn@#J z!2nt?QnK1BnJ7vafpZ1L#r0fBSF41124gYEQDQBz#iFR!B^T!a-ARq-2oI>pp90*h z;Sd?Ms8Zu`b|uZ9c0O--r9Ruhke?13pnE=jZ0pMgdfHW4xOmymwHZrvq(IKFNK_)EGMp^)=N=xJDLzauC!YAm>!jJ0qmw0 zC20~QqU`v2b$MC#h}HgX&M8@DX+B~Vt(#9RO}vKLIu7l;tG)$k9#MbOEC7J^El6|d z-6*b2E=^3?;@X6hENA^QF962h0hZO9Z$O&t<^<5DmL|)xUHL6Y^N3S4fHpPDSg%py z;?&IFoD%v!c)vWFSG*1XyL33V0R$WP-|Cp-?}HOq!UAzvR@WbmYQz?=x3 z+J68NtKbAuLLK7p@Qy0Mla@tJz^-Qz@1PP$30cJ82{@(%Phu7g-1vFG>m!g-vS@&3 zQFC!KK!Xb{;lg)vDN2O^&xCOhyerliB8g|ZIEWMfRs4ZDKde6o@;cQy3R!|;Y~de6l?rT*Ael~AFbq=LaSp+S5!IEDj%rZk9yv$tvfVstu#0eUjnP`Ayh z3{(Sss31+%K^obXboQ%qgO)KjA#KiphZLChcv={n9bix{?HTUzp@<+ciD}*Fp_>ShraX)dwy{u{EgOr5 zNBU36)T1j+A^Kx0WYV@({bQ!x~ z2*>(qSabMO(6PerviV?P39^O-7g+?ECGx?-Yj74U7`=o5&9{QJ-L8g}cm|bhw95p`&K zqAO)#6Tc8M!opOugte)HClo2jd_u&-iiCCh&2Y;m|6l|`wJG5L0SN-Ppul@2UR4{Y zo`Vb8;NF9Ga9hybx-ZQ-l?1xGZda|xs?K_9_e6^>Y{asodt{v&L>Dv~`O(=}7@~t2 zDdn0gyUUL5@lfxIU;aCwdfCxEAEJXhmA#v(%tm11QgmUwhNtB{hMR*I)lyn)xbI>7 z<$;kQD`E+gUn0}N#PhxjlU*y*!Nf?31CvjvO$YPQa9vBG^EX#c2NSnpmz!*B)pRf! z8?L$8HN*JEIebsH5}nGWEU#y*I@LC>|65&=H`dOFsY}bg@Lk~p`*?0P<+SFOO-|wbCC!TZYSOYT&?}n$8>!7QhU9yaQzAm`6ASIh~|FtxMz`o-IF2jS4shWcQa5~5)(ujG<(rjnt-zz;za()aXeY!(>N1Wi|R zG}uu?(1b*l9F6Z;XxBC%s`O~QXpTk`SnL_sIu>+mnZX_Q_xRe*emC-3f8xa+dNjNa zDSMp~jemAGXjmOej>bQt8#HWOD?J)-k1%N1FjjIjeyp@d!<)j?Xl4&>&caz!yw{c* zjd&J9!>Mt4G~SM7Bvo)~oE**b5N|lcoY5*{v9zZ_-117zr5TP>(rCgP1bAQy&AExe zjP4A24!wlJ?+(eKa9m+e+tM#h%N2j4l3d|!UvemZ96~_}NhmE>u(uD@mXC)d=ZYT? z)?DF?3_!_fXLRMptMfO->4y(Le+VA(0F@BGLK)trfQJQ)!)#j7R@*)%TyMl(vu{On zvl)LjjoL6Q#NxN(H({95K*Zj2XlYr`!tf*)NkQJ&EiE`aXE|R7dut>J_&DCe@SaY6>Uz*&LW zf@2046{EDfIf0Q4ff(CXF26&lrBkz}>~5747{)Rfj!`k@<`}lIP+&eHi3&b)8(F-d znS#41ud7{ov8r4zJ2NYRTb}2vv6auGt-w z2OAZe8YlWAhsJtH3Qa!%WN*}uAqIL0a}YYX*6IiN=6CX!gqUHB%MvOoe*%5~ zdND%e#0!KX<2)p-p3t)1so>oWOnioLnJ6Jpw&|dqawm3BqB9b&+*g!?G(zu}8yN{- z0MBluM8aZ>F`onjC80R?vofFfO>Ja|l2)*U@n)O_dsUU&KsH08z^q1d@h23EcXGMl zg0U{DAq3HhMRm&>1d|@&2;sTls_u3TT<5kvTomPez6bI7BLRQi!ihx2x#b0Q@JxSK z#^DQLe|hZ7GO+d9{t1bXAK(r^UYoZNKdZ6rU}wfEvd0zdKv}ICW@fGfW%R2dusx7M znXj4+(@}ZSZ11GdD5TMNV%-Y|NW35>XNpp335M|L}- zP^!Q7;Nip7S6x92E7;!J_hR=HDr+r`q&80s_b zhe}O>kq*?dZPwBr+20z=i^8fAOB!4|3CNG+0j3;)9^=v7oK<^3%&eX)fNU{_&mm?; zPYyshSCs;4VS1{!ze+8dK*yih$Th_W&M-I6D6P5T-6dcYWRm2e&DmxhD5J+D_(%;x zDfXKhN_%u)WLhY^liOX@OGbelD5Hl0Fd*&d3P0{KEfoGd+3nd*RR_xGt|1?FyahMa zQCPi8Ot8Wqvtg~24CO8cHpc9|?LRmdP2?BcbGo$ebJD9DZ%kUmL%7{6HlZ zuUM9=h&y8|^9zgFRf<5)M$To>Q3%T{nE*8D^5OPW1QH!drH=h#$n8LuBPk9hs!{|} z9FSJENe&A-d4?mD-%xFigJgomHP#uJ@gYLVjZBD`h!1xjPi`-8e1c_qvE0GXqn1gDR`zSYkSjyat}nFgCG$j><@JYVpx z@&sbV0diJzBseZgPIs2k52~E*OB_syJSh$)fl=_MQ4rQ^>tBt|4=ki2a^ce`aTkW$ zviURZ6xuhe-zWk(nzY=u!!`)F`2z*2r!VE$iJsQVZXOY24)4O5Oq@Cq!{kJ0(Tq(lG*n-HOL8QrZS>*a3S1ddi967`X= zKAqHrNE}DrN;L@5A~uhea`ku_N( z?d>>wR$=NZR*OZmhfZ>zQN#Nhmu5!HR?UdfeK=zUcplprwS!IlO&=N*Iruk`rp0D$ zu)?-&VMNX{z_#4jp4mVu#m2KOJ2rI)kz<_B-X6aiND=j4el?V7-*i6q?XtG~2&4#| zT3h z7^uDmDHkZ*cPXgL)l!a)@>T4m{HADHxS~$HD)(J?@TP*BEEa7F84~MC6st#8D4U7+ zvLeIY0ETCUH%BBZGCY=tk=Y`*tjPEk`B!;~GDQ3J%ke9b&^q9}X38bNQZrxx%NYws zK&YVB4YgYRTL=M;wSCX*vCW4#sFN0A8i-h1;X~XH**FbEEI{)ha&99)e9sG7wgHPz z8#$R#j&Fo6$W|!(lU&+vwVqxefb%?p(;$Q{r13hm(D^2&_^$Z^{QZQ-2ep3U zq}osS*m2KNaT%EjW zc!)oTAvWE-UO`K4)836fG8F6ae3oYKo<|j1OQcokRGyc#_Q05VLKZqE#}=M&j(xx? z39NwNU(F12$q5W63=@uNV21-a<^<+OQyq>S7QTvQ1%_!2y|thy2e?E|U~ZJxaLi{_ zZ$5JZ!(vFPWAbapt;-3_jk_6+DPYrz5({;Djyc|(*#Y~1&zy~LY|DjZVLcSKnkfqu zHzW_@icQmVx#DgU18Xen54-v^yH;X^u-&|8&Zb2Ig+2D?EobNSCl7`Lbf4L}^==LL+f1F!z{ zy4s9=TZ?jmdQ3mRcoBn?3lkO(*AM~Wf}?~_8K#EfQLNi=4YdRfXk_XkrdR{Cf>R%t zDILi$qQ2$3U@^aZ)5WTE^!|*Q~C+JtHZSftW2% zx@&JCB<2YQpAAp?yBsVcvZ|8u1W!RBBt&15B0-NLgoNlzQY0Aq2qHm!NsDB#ihDhQ ziPBvK_5;q*#Z_Ne`Wn9{KEj-qPL4%U#&@jD=)mBbD@YtT{kc9poWa({!C6C=Nq(e< zGc+%Zu*jVU=@DUc$y4MvzYaH~H@|utk>pyxWn+KH-5kn*YGz?OY zAi@g>hJ;oSXLm5g2tBt!jUl170xyy7P%%PJB80k24^o8C?4fmJhlq#?yq`xyZ=_d9 z5dUDuiy#u1dF~Ni!2tW+VyHtB)5q5Oey&2vD=lBcFM^v>ZpOZk7*EJ9MAoUC2I9ba z_FU8ui;s?%ISoY29#}4RUA2L0M;Sl=HOy((KO4#!h8eF$7qK1QG6V+++~RZ9V);vM zaD%mWWw`_WKzQ4fTD7^sF`8#Y*MrleXOsr!2FL0g98Fp4g5VBdg}^L2RY&I>prn~e zqJF+F_WE@(Fvr>`yWWO+s8v_xg5pBvN_2PKu3C@fm0{0wzb+&&bWjZ>{V#PoQUk** znOU&tp<1uiz@xwtd9Qxl;fliXvQg>b-~>^IJH~6x#~sW-GjNF4st~2;4o-6E;czai z;ZDqV8Ti18kmDX2GI5U+n|ct@z-2Y0Vu+sFbT$$ixU647=(+DG!mABj)-NIS#MT}m zqJhi$1%ze~IYPrIk0ur45$2}|qL59C5yBSPp3pBJ*o{R&`sIV`$*3r(IRg1o1464V zumQvfVW&4D`sKslCq(WOBZNM}iQjP~d$Gk3J@cgoulCEw>&mMZ(Uf9@aDpvC6rdww zgr3@RGb9vZQIya#-)DqZ`w-e3V~7UFL?9H98I&?d^ay)$@zp|rqJ%JUhJ*&5W-t91 zq1i)5v-k2!CVKMy5<-~mwus(;46QbwM?y77oHVQbdL!P~*Nsf8jZ`r>*aLp~V1apQ zf}!wI0>fHq%CUeo$jLFBl}&*KmS9d`PlpQ{L>XApIe|SJnk)boFcCR{;pK2tlmU~I z6Bx4*0>=WDCnvC{{(cxS^-;@8a=<$G3WP#VOq387IQ24AdR5Ht<^`OTWg3?3`EW3n z-;v2zao(RaO(1u0=+K0^yY+fVEk+1O12~8jp#h{AA?$;72n}ec4Jbxv5CJ^@EwuN* zv`*84_nYh-^Sr(XX0!Xce|v`!FYoPN%;G8jEa%OI(IrJVzhe|iBt z0dtu}UU=`9QAAi2Ulrt5(Wi6x?FzJbK6)6`4!&@4vc4Z(Fnp9O8BXk*<#7I;aCcgM z9%0_5xt#fhES?ESSg3>bYq~NgJa8K@y;a3KqQT2Z;hVkT!5Tj#RG7Pm$v&Z8Ek+3Q z;D%771)wKHW?Ug69G~42f;&yv>rEx37$M9<8ba#4;J=i5GjY;Zko|^|_O`iEb$N4r zxVWyXo3UcASaxp#!5z=QZF!9GVPyei{bL7^aR^*UIRIfyzyY+~wJsJVGuaQ-K{4T_ z&<~G3)|clFC&PPBmNw3HZZTsMgt%)>H}uy0QB6RdmL6vZWd+Rmd zjbNl~2wpJ&v@$RnQ;6opLKh6=!GlxQ zdpyDG1prTK*JH5#$m;}PlV=y0xupemrjEF-qpb)V@khoK%r2-@Ffo?F*`V$=Tz8zp z(ys>A>sQ?K`Hr9RN*rM@=%f~=8IFE^f*9h^GleFgxf8dTO#hY^e2d&#atcMJeVqxY6i zQc&iI?Qbc;I|inEStFLnceM`fi z)8$e~zhz=&V6VZUElPsP;cH_-TMsBW1RnssjfCh1@}dKXYT;IV|kW+GcFvLPxe^BW&quk!6cPg@#<0O+e@6i&pPl2J0R3&Dh7v=)7$wK zRM+>}lN4vrfm@~Efb6+5ae6p|qk(}lU=46IJ)FVOQB`2W>5;3+OAlwT4O%#GUEF%U zb+*Fva4@ypuL(XxtrzLrNKOD7+XjS4JXq5)TLx>#1_n_f8ic6tMKpV8%g87qO=tiq z@@g~9BRMhT?eYI+taATS1`);z-uAJA<$g1l0|~|oI%$>e0TnNPdJ_ZnmIN=70aAXi z0d)4xZNPK*BmIT+9MY@I0D2Q=Q4T=53SR*_i%!9j%*p{sduBbLZ$XDh2p*y(ThkEWf5*l4?NrcCRQY)==y)OsK*lJ5o`YsY~&{}#C zVNS$FBd=&Gw4AK^I(!*jM2|3L>_XvUXvrCamD%e78tt#iS*w*kMI=W<;)*Vs+uT-{ zoTGgtz^I&77ssi361vT8b#*-3crV|A!>Lxa0rV|6oX!rpgV~CZu>#8rYsgv`>zF%c z=6u&|w=!JuzHDIkZABSenB1d-&pyn@f&?4pF8U>J`O+DcJ$g zD8TF(A)H=Fc@$uFj1Z28qJ#oVBtmHBE2Mt4o{+ypqJ;1eK$zX`H=MPN5hAhE{c2Y) zYgyQIUApHPX^Z5?3Cy6{tFnA~0#?t#9G7`zD!!pIvlo=NImb5a)8j!B}T_QXM#i=&yunAQBIJ2+=<% z*>jPsIU+$1FYYkXVV`6bhR{}P7?(&4lH)+&IYsPM2f_<^MFF6^9<30Sv_f#;ItN{D zaOAu>1m~YQr_no7Rz8FXxe+x#*T^@o-r*=psJzi85DklOl&9ey+3hXFfaQ~e)=8O1 zHrvOU=N_VO`KE%1Q#Vl1Jw)H~0YnqZ%wzj7M&k?EU%yjvkNChoM1TF}<{oy&4+QJ4 z->JBV17ooY7$*wdl_jPW>$&zoQ!o=u3-P^tyF~r>+4C+ zZ^YRzq@m5IoQA?3bkag$RIG;r4zJIdq)=w0zQE(k(9nvcPz2*m_FMtqx?b$zK5XPo zQYbUV_wJ!|*Zzcr#9VoXMVX#}_CqXbxq|bd)&`1-%q^jU+dFCd5+;ytvE4WkmuS|%|Tq5S^9 zTUOW>HS}P1khzqjkn6rMV5AM!JFN}iK`Zf}`%8%77E3tsDmd_rActHvZf*QCE{Wi= zd_!Q{yue6%D+|oo_woyrBnMb{jtR5!vkA++mY3iRX2j(kxdt*NxDN9IyJwj@U6+<&jJ-I-ath0Ncul^HEx*>1 zUJM4FW3-uLxq9)G`!EhyM7>4sIkpy3vHcrhTnNo}{5=&(EL4jTBH2NPVUDexf?+uH zkz?3q-PP;u%JdA|_w)=bEl$3W!?f0-78Vl&&q5|y?~K}4Q4FfK`RFe zmDmayiA>|sdl4B2(ZW-Ds`cp*k$y4MtzLef2a#Rxy+oYDEzg6x~?}_jbwbeB&&CFll{HCRmogr9Hio*^pMs3azPtpkkgJEg1$O(SoRlu7?g6 zz~{I9BZ5va?Ne1`(32q)9t04Ga!uO&niV%!b+YCGnNi4^kd2YV~6r5k11CSSw zmVo?LD#K`J7N1#hX4vOQA*Pudwv=#cs1h!gbsMN&gGab!?^WqoLM!O0poUJpTvUay zfyLO5PXhvmMV1h^?1!&59BVTm#3(gm8p)Z*Q0V`SA!1D9rn()nN0G9GaAb=u2Ve+o z+seD_)&PqUVr(q*3DtgqkS1jbam=+xt`*pX+DL__3seumR+6tQ9aMfR65}L z=n2hN{Cp&d=>&cz3Bk?t`e`ULT~#A34P>%G0yf(3pEOLi^V#S-nH|xZ`<@VtR}U)C z&+xPUm8#piBYYb5-F!$O(m!D$1G~^(1B?brRo0LKK+Ik=qQ$r-wEUNnY5PIJ>yS7=ePSNqA+{%_BsLQUl2QtS34RPx6k@)k} z+C&dc)wZkZx^nucQ==gTwH}(mnH`v%8jW~nEsuxhs$BfJ_cov8Xt3DPLnC)pe|05C z^UQ_}JT!w7a0W@u9)={P2JS8jh}|KFlJf?y*zkBGU6%!vA<(YE)M#c{$K|8hLH56F z9qyz?Be34nLv!Z}3A84|3dg<^AI)|MCpm90FxaEfx}rCR!c*lJN{_q-``#@Wh}V=+5PKl#st)8A99b%9$!D^(RIMqu1W6NkVW)xvdrjlsM|q zsWC#>rRx&nwyY>3EUb44K~Sd}82A{Xr#ATQ5|ZZUYF)a82QfnEJaL3-*VBv=vW5CX zLUK4h8t40@<`b%}WyuEXJBd^H8H^5SHguJk$c@h`Fa#1grx;8 zAy$uKgr3+|AeRuUM^QpHVCxd%wy`L)2bwJx7B4esM1-HI$viLZKv8=-9qb;O5GS)Z zp@FGYgf3(?p`(k^io_5NcUMJ-m06UK7}#t@Xx)_yn2FnjpLEfu zd8hv02qA%EyFEgG7ZJZi+E0&s9g?78h@SfvvggsGzm3SZkUgPiTjn4hK}2R9yF8k6 zQM@Q28^3c2EgwA|aw$ScJZHtv+Q&GvG5-W}J=go4nsyShkniyk8ZRB^8gdLzP$Ypo zOHw2lL3EM8EnPL>k@wH9`ay|85G0*|&NcZ%xJ!H4wCk}VC3ZdVaCS|B9hvFjU>g#J z6NrlvID&*&$I%!J^iw2(JeUcw!O>I52%3!hkzX4v4`zKJLL7P<+2CI$Ot|TIn7C}% z`;==OeGLZ*pH9of9Xx9|nD{7bCQO(ypqK(lHN19-JUsS=)I1_C0tmbN`=mN#_fYb> zkl};i*6`8^iUgBRBbgu8E^8q2Is#`$CqNQy6OXO8L;2E=g>bekS3-&4Jh2`M0|&M& z$e`=(RI({OcQEQg;RKSW1kU(=4)!rRNcK*`19+l7j^zncZdC-*SX&hyvnY^2_Lls8 zG5SKXp*0F5ko`>w+kVVRsjN|BfAffG0qDct^%hC*xz|BI*fp|(%6@3Fd=O?7(2;Km-Z6Lfq zhoQ32HC$BO=vwg}9@#W&xV93anlO!j%-cn<9?k)xN}C-|MT+KCwSfkul>-Q7$c}l- zQh+fEPch$L)N_LBME(9U;vY4pqARZd*&47pOjuOve5zt~KoEP;q+&;PxFY4v8f=hj1Zt{l;w)74L zb|^iP?WU;jWBD}LB&=iz7z0NX334Kg7$`Lucjeuxfhj}G$3z&t)ybPH0~f`Zz-*yQ zCY4SCfw?b`f_9Hr8cIqa#BG;Acspe{60=uivqnO`oic=C_KFg^DcHcjAp{MWl?z!qH^r0b z@IevzCVb*NFRyjU^+JHt z)wC+#0lQ2DG)#}%ja6ulzN^AYJymM`^w$&c5>tE%Um&vHLp?9y&?dRLY(dzih_Z2{ zq#wpz6u_%;Mdo|>EQ~X-9Q(>l%qJ;q5f2-H#<3+?D0tLW_yR#*E8IyJinpi(MJ_$o z}8+u7aZnXgy`z)D^hkZ6*7mhkj>V;G-*}unAWs>^@i`#eNi--9nqtdU;Uz~ivp%Lq6Y6zV%B9il${cLjl{`n11Hs`-iX*j-_wvdj z6i50;l5oWuPYNc$nbcs=T52$GFnm%JWN z#;QlR#(2(9Qj!-<205cylNJvaU}-!}xDgp*Q&;=tQXPC`(VRI2jdZ}lDFzbBq6SZr zsmkp|b-ulVm@m{`ir=847Y^7|RAa?4F%E%<3fP`63%I8Ds&UcfL1ZIm2GNm=!f3Mm zHwz-18(HuBt;~vbs1P$5MjfTgNRWc zQ0Od(aImV2sD*59W76uz0AxXgck@X^)$JDIpqm{OO>n9twfYnvanvZunkRU;b(R5- zd%^%b5Z>olqlD(;c`q}AS-2#V4!mA#Cy`1m87d5AN?lqmzyl1jO8I9m59BlU%x~~k39wkL`X!Dy=b2O6B0!zyiSBKg2yV)^}bo3EFiGZBbsR0wv zU@f3@VB8po1tUw;n!zz6IT%lM^=lWqvSzkY2h2x!B#EqS*``)uf@mnPEQqiW%0cwG zzP#Ln)Z9hxAfiXqkvt6#Ox3`_6iyf}2(z*j81qO5VVOTQ6qL2W=8+U=yp<(0@~auo z8Etbu-fgRcnRun1Oo7Nf3tnnOJa;l7@^(#yC|EZp^+)mOFf)%1@8wZSL@tl6KuOw5 zqqhTfl016tJd$3KTu1|6<$>hJ5m$1a(|*7mYKh*cN78dgLm6--4;1$_u`0JKC>sy4 zMGESTek2K79Ji;(65>l@EN&DWru&6671|QMfk&Y8ZhKW8obSqum5kcqscWq850(zd zykubKAc6tw5a|yYy-PM}k>y`BI5r4M7cmY{I-;{ zEbrlpd?W`~vflyFawhl~>i5 zY#_Ja$UpRtBw>u>RTwY<&Pc|j1mk)Y7ECx)Xu;$O6*`E9JaX8R3X!|2I@vT3Jp84t zt$E_qjdZGvCkQ2Jm5*zGcQSVtG{0(B+J*9Kj%%U_4aICsmlSu1kQ=$!n-DyYN)mdN zu(r^3xGWg{&60z$eQ9!6Krn1_A~_hx`XLzB;y7SZEpNQ>*=3JJG!R%GM9!MHsi2U2 z74&W-qTlr+Np>s8Dekch*wQc1#8|Y^d3FA#_;7mshF{snR4`Ks`WYR4SKnB{CbHD; zZ7zhZJZE1aE;T@Q(X>r>H4C+I|Ga}rOaUu^>w6rDS2MgDL^fi^8y(?VlC7GM6~H7$ zZEJK`HD9-v5$y^Iar73b=Ps(|y1HwE(fAw!JbY+dX{7+G&2<5zY4^;8Yq< z3NVNQw9fNvN9l6xxaXYDjFPO0 zM75hee|{94P?XEK3s>voGa*ENM>;T?AaujJzVbs$PP(3&sLywaUgTyj#)ostfLN*-+tS zO^9lG3AzD>7S`ZxH@yTOIdLpNwJzJBQ;@@Y3cUJHN)G~}K{ydxm1JNV>CBeM;Ii)s zwEX_&kz=?z=s&CiJukqx9HN{(auG$xQcd8XA36Ka4ieZAdFHZSGcxf5v`nH3T8Vu7 z&kS!tk*jhChN9cAS9*0zAQ{4<^K|4%2w($(H?>DErsOC zuIhGh$JdIV6@Ffo?fgod@0#sa`ZmxzSi%^b@vgJ-HcEv?-ka5OS2iX`L&iK?-oS+} z^FNrWB9pvx!)*1%#$5nQG$f@MS%?K$$3a#L+Q~S=Oh^hR1C8#SpeBX zw$GtL_8C`BDM$`LSmhJ|L>ZL@kllv}prNp|&G3}QF(f#>g%BDt`F=uJo;DyvnR7oO z+(rzcpT2IL;l*A^Xwr2S1~lXl4TL0H_}D7#b7-n{W)CL;K$KBA))_`c2%xW7XDq9~ zW}RUIoFLMKD09AGoeg;XxoVrhruN_Pqb`{q4mY443b$M>lpONE2bs(9yvPQ7q~RH( zo)($66^!IR@KAWOofgW_#44`*R8Ou+_aK{4lZK|r@GQF~xllHjtEzw#q#PUzbG-dj z=7;_#5a}eY_BbkyNdswR2S8kDB?V%mszV^%-P+BIrv&0!LYE^Fh{KYkK%9MRS8igr z@E*5wcmkT+c964x3&q=V^@Hfo(C!;)Le5+0J+$9RV}vN8i>m9YRdE(7g!xci?pI|i z-ZqPR3Aa;{g)sn#m-i&%A9j(z zB1Hc2?%M!f1_9&kISA15&zJK6V0!-9NI$|mGvd7$UJm}*j3WUUDpwxxF9SgA?4)E%ng6TGDR`3_Y%OGG(wxED5|9m+Q1e|^aQy1Uo-@WiM@Q*~+t%F0%z=N zdfj5;6@MO1E<9yVU-z9*bJzxE75-~8;FIgiX28Ws5pc!NqZx2HHDLWp{MY85Gm3XK$$K&Z zbUfRP?&m|toJam0@>I{-_8Unf{yXFzP6UzJp+1>R6UGSjie(@s-xj!3BJhw;B{Bdr ztYU0IL2GPz=&u$AVtO7jE}P}y7XZw`L*_L6@6g$R;b8`d+%e(bA%}b-h>V~=g|c=G z#PpiTI0(SQZ)!C&`-nV`G8vSAhYoQJzzpk{OEmsFbe@|AB6qX{ zh@O1=V8%2Mxl;2r?k! zd3LWXGa%yv0)Oz{H}$`#Jstu;o_DxBGXiARscORJY87nLUPd-h%n43|VwPq$P(krA%P|)yXX4OB#SioAH%VyG-j$?5TYsDD zD3^qW>%@=|aY8PefKa^&-Xn6h(ZlL?l}mG^xvriW&{#q*mKqD?%gI%EE|g^RYq39mjOI;wGD5s*E=zU4o`A8N(0Cy)a9R*aj5A%v*>DIXn1DZgxk;GM z@r*?WCS(eLIQm?v??z5fd0zw~ttXB8IT0foKBsbGt{((KLorBW86`yBElY@TO7A5^ z_c$c<_YpaLzn0J(&i_z6>Ze9xulC4YiaoP?LO!l2A(ls1<;ojaD_Im}wo^rEUriG7 z;oL`veYG_YDfVhkX@Nzg2n``c39;huwpV{wYEHq3Mbs1WF~tx$qbXpE@Kr}i%X~Vi z+qs%=6tD^-Ii;Qg@Y_~yOw{#JTWQ<+d^V7RM)UW2chygRKJ9k(8up*jc2sxu?N`nE zqBwcumqTcXCyn~K_`STYtl<>z;3lqeRey#HT43lJC`|`rvvy<2)OATLKGvn30v|1K znrr?PH^86b<&cLgzOf|fEp5#yjpWq;N>U`=*5D%X1(y_w6CQP?^J?oeB`Ff8vd2LJ z#@APsq)70t8s#PJw=ik$vN-yawctkwe~Rh-MIT#d(I<@5pseHi}J>~?#ON+{TDCP&#i^lCwp^Pq#KeZ z#Ii?`iV~t;(xSS!tBQbQ3#4AipIbn^E*V60&RS0>2q{X4?q!-#C~bNVA}Y0>&{rXH z%B3`+BX*rhZpU8DF=RcVuR}EC(W9?JH005vuR`QZ)7G!{_^S}%rKMoldO}}^Xvm`{ zUx#SOqbFa5$Qfj&;vGReaug;^Z!wV<6V)>|n`SaYffKd#;Zu|l4F)Wl{l%(ULMV}k z6^jkJOT-f5*%T#24O_K>U2Rvq;PF66r-JdXixx~0IInVqIf+r9!tZW(31W|qhh`A+ zFFF-MD%Bq0={Lng=SXc3ep5Vj65j@)jOTHD9O$7AT0++5G?f-Q(PD~^kMI3ArGw6m z9|j@Ey~%X&kl9P#e?vOxxYUM&5+BFK33QN?@Q0It5}uUp3XX)zov|l%)fSVl1>%e^OcmFEq%|-psu>!h|o8EFs9%-`lhrXoHVCl~?My(y$ zw_K9PkTKUL1_(Lp0|@;R5SJwPzHKhbi+WY>?!?kwZ3kRZ@0|`GzcoQY}j-p z3+(F7E$imF;9QvtvnVz#WMyz@coYoHRrQ zyjt&9fuLVnnbF9q!4X=O$eq#Gl2f#WICwFo#Nq7Ny<9?yj5reO@XXg?sVy4SkVDx} zIn`YtGZ`ojW@S$6;^@2Ef7)$I8AjFv?Fj{yFhyY>S2z5NB#Nn-Or5~X(>eG6luePGw-}*J7fXYS* zaS{quFDK-Td))3N#MH~C)>t=KbGu!KR<8u2Du`<+p`wg2XVbCDfqYS~L+dynB2Q=9 zD%7N#i$}gU1Bi-{naLwHH+gisRfq!XGY=vsKU--;ehrsYA@z|(vweSE@+f3_GV#c> z&kE7BQlo1voS4^Ai)GavW=le$*OH{7gy?yES+#4peYu9)X4v|Co8fsWA3S&=AGFTS zSQgUJYzGnZj(HH#*eFHB?Iw8;QO$M`O~xZfvxy#YhC2(7oO@O&k2p^;52DaoJ7Rhm zvLJd)PZpF%3X!Kvc@WVE0!75IsE?pRRmRJN_Q<(y%tz$0C=()D;z<$Jo1xt%l@}?w zQY*ajfQ2s!r#SV93vQ9|^zcqt3o zx6SG<(1i0!{`{icS1mDz<5(Ogibim-uapvpqcfHt+_?}$osb{Sx<(w?`9V+0C>K7} zm69LyG)i#f=7$sSK^**z;tBcT#0wAyAHqzC!^xcx9NFbU*X>pLxoj5!vkE3UW&NE~ zv8;ixyihJ-QXtf8y1HAm4H)lw{()tSX}^b&G_UQW;-_X0vue(FV~z@->zJTocbsgf zoIICL`ER*oX*&zrPC>t1>qSs1>>GXxsU67G1>m2eXH5Tew^?W&e`EbY+ zxl<&@@{HjNU>Wix2Nsqu)7Y2C%$hy~eSx7z!!ZttW%PuGnykKPECWHM#zNymK9;uH zKtD9WlJThH^@c#j`IB4%o{-C<9uZfZ0Bb#p$d#HU#6pS@ay47# z5ny1E9$Hv*^=H>HJ?^?@UaP^>c2>cANC&|nbvfK!O|Hfpd|sFBT8=dytCZ5ovaJl% z*GFt1_d~g$U5%ZZ7_N3aJ(vG{Th6PI45zDS1Q=I#niH6lG@~5j#!P1g<}4`6G3Fef z6Bxf7K*tKEvmq-m$KF$pF{!1Tz?@98qhqe^P)=1&V9umI3+z3kVA9t192LZzjbt61 z+yTMCo9c8poLD&G;GLM1{GjnWf+IUW*cJ7jccD`9!`aHs%6@;8oga>GVsY^8QwjOu zbSI&H@OK&}#Nl+?Q5=h^t*^bg&M9&5>xI8dF(nQfyCnP|kz8ft)u(AaMfa42s=W53 z_6m0Gy?o7%DBuvrvEGkA4Z)41Y5Cg-@KN#KHR8zhw7? zoQ?sM3*%d-^~s#LI^xK_*FECplHImHqWN9R54beo{c335r(N3olG0EI=6zbIPR7LJ z>cG5D43$;Ho~!;rZd$1Bxo#7`H8XZ+rc;c*QiQmjOglAELeA>h#BW24wJ*ENuqPD4 z6eZ;NjBrb5cNI=5kf>P3tCLm=Rp{mV45E(JB}V0B8#eJV^D(A-iiw1{my8l}^=TO# zc`sEnM#%NpHj)sBMQeDJkaI@esD^@|LdDt%oUuqNO~_sX>D!qYp~o(d6r$j}#Rxg& zX9iJs$&Yu55pp*sXp@*n*4%se=@oR8K&OPh`9{uuGT8?A)g+>1?~&cenfk&I8E} zu2@LC{4zmuj<*PD%`qwuBxkDfib7%-l?jp)H3dlJMaL@=sCXVo&Hy#ZC4j{6M=!Zd zkQ@^Zko>KUT7gWE95+WoiVPSANLdE@`b$n?3h^ozCThRo63nZ*+83dcoVWVtwq!t@ zT$M0IXa}J?xI%L-ek)h|(QeUnZUnK&24`NaT3L}fjkFfoYSnNJ>H}oIH|?ix#B{uq z^)_fO0!C_pCZz%T&$j!Zl8Wi=oLA?>Se&{IqrYzho=IXX>?(iTO~V%&*E4+S zSltyO`BI`;83e;KCOH^qCBew(dJA(60-QNrRpzFJpP?Z@T|zz9GIF;o3xppJpA-o7 z#$>R-H?`Dhjl~_DgSm=21lTGGMhQ_FNkTC5G6*V0$hqgHClr!(6p?cxgGm@=TkIO> zB4RJ4gj>q5tG1IDmXF=o>THqQ<|fqpphWh*xgird`YGck*hI7XJ)sC^B82F{aNC6j zM{6B=QLBKRWsAaO5YdAQ5Mn#OH5s8Uvv&rw&^X$FQ1Hd>A>_Rp)B>{2sS1<~R)-L| z3q!sd-&uM;A$mwrJlfWGp_LJ3wzK9XA|MoEQi!_5cwdWY&{&m_f2=LkVJzSXDX`*fN*q*E&g1M*rmKO<`D)iDxCYo|Nt`38p-`?sl%CPieigz$ znVPN~_5h}+#^l1}@hNn(iegqECn}h`f<{|q9=^b-Q_C_F&zy4~$T1i_l&ErHqJBqr z2WkAa*|p7vb!5)*=hhnP&{IHv=}1CY$2jYe;bjLnMXp8|2`s~N00wLBFdwCx|zj? zx>}c;O`3LQT3LNhH*;Dbl(h;-8{#WDP0AnE-Fbhve%Gj0_KIP9`o51s9HBWP+qNz*pyQiu1Eq?^wI1)JT2$ zSV3BLb18OLl{l|2H=658nZ zJ>xD4`}sZmIfq9ih--)`G{6(Zv_5)43gx6@P;V9$R~e(39V2w)ASxh+dI@3)AUm&C zfW^q{ljzpvY6XvrrWO5f3V1|D=f@HuX~~f<+W(cn3r~QLT;U<{8IJG_oB$u`zM}Ye z22OzQk*j}N*Lm&<5mRI``A5E}Cd9vHoDhr1D4vgO0*;Z&X7Zweg)srXC%7#Ue1U~A z0X|Y1%;57hW&(VVF`m4IO$aJ20<}BRxWBG1ud4Q7Rb5y5ZrB#;%13j<(C5)es_QbC z@=J<@qzn;>?%MHJWMZC>)#oD_p3al<x051WpVUQ-q!r32AHekqkML7KtyNP~}!~%SJ*znkV(94mrJvZLGhF*O31h z%zDxan-&S_0?<6!lVrpM8Wz-dz(L96 zcrpA%2o=LFTFKuSA)+se(7b^mcyL&Rzc$=|PVk5N%qFQDL@4f_&~@3?<%X^9JZa1i zkuIrzH6%*mh$p`5K29%y0g4q**Ltvhs`(@};;g!{Gq&w!DQ{$68H@ zgV3G&8hnTGisMNsf_g1LuIxqi%HO~sBha9 zInGT=z5=W(n3T6EmTdz{4#$&fQ7lR`g!HZYp@Q+gYUi*7Ylyy#wAx7JqvleqHXymo zNPNqnnNWisVPTd*11deV{7Q$C^M)Kj2$}$UlA|G$%N3fx_NCHGR)>>nFln$>NQRq) zF*)$>+q~wZftlwRoKi{&+1!dY~&_8 z2OG=0%-F~rDHj`OMKWU}_pm5zH?gzi?-fK-!Q~R?<$5bUE4f1YgWEID5cPyu{)-r) z=UCdK5t(BXr)CjCGv8smF@!iP6eZ-HNpIG!$yav5e2Nefq&rW)T5Jc75h5WgLx^Xz zL=_`Mrc_%(oK~v0ixGO_d4M<4+;bAU57Bd<*|B{if@t>8vsO1TGan%&o?-@0^C)JM zqlA1!F#{SSy4+$|!5F!%!NrM4cI_T2 znTI0ckqD_-&3-48mIztm0?m~&DmhNT;0X7j0mOmqrh!P7uMcr3)M+5%trmTqK)D!1 z6xFhopMF#IH=@B_Q~0Kd=h}S%3CRoRWb|l|P>2!2Ivhi2AWaL%AX1586Y@5Quy(E| zG>_zudqgZDyq3}sYNS_mt6#4GwI-RYp3rq&-SmY@mPa$Jd}j%@P-}(OG(t$=-sur? zv1mR;2+bba6R$_e#d0qp@!S``5`D4Var=W*^$yx1Ohwn&rBZmdvTp@?Sakaf{olxB zc(Dk31P0!DLOMLqL95gP5=0!Oesw&t_3#cMsU^ccbB<20)H6KN1_<2?Nh6v)vgWfV zw5UUgCCejr;bV@fCsaY;i|Db|o&IzGYTH(l+SS@G=y`-EyPnW;+d`U{Z$9`?!A&Zl zKoFW1H*M{d2adD9U>TKx18X8=8`HzVyavJvCMA0|^VZBdr-o2BFE>1wMf&%`ZQQ_- z;taf5dN|l7(!;r|2D_Kl=+t%$=Rx;i>TbhTO(;OW>CKs4S~GjHK|&4G_L6x2i_aBH8`#x+Pt`nGuV51w^ox&y(wU8Wv{+1l)Scq;Yp{r z^Q&@mDOanpZ$AXjN8ksn0voT{6nGENKSXp>?wP(`0vK61%nJStirwHozWOtoGvw1a zZX|Zz^x~3uE=sDS>jIV z0!yqBQU8?+mYU<9q7);9_3MVvO}XXREGb1d)xiP-LWNn-9>wUA_q{Iu0D3QvW_TM` z|7u9cJ%CD55gyI3fb6D(%Kd70xG3PPE}NK_P3zSszWDv4s5fGF(}+b4g?Dm>)kx9A zC)RARI0^uB12s^Z*C}yWUy;XAtJz(>l}?D`sa;Jx4hZG8wJH2biNmUX3NGGsnU>a4rRf8Qw$P$YKg`(|AN*vZ-=5Sbvq{qQ%EAqoxGfCxwSvrm% z8V8Cep*V2;;^odNh|bGN(>P7tSv4&)g|CdX))*yZH+4g3QSL9QIgAJ&22^5%a8n-=8i0xs!f1jaG)#BtwFsYMgfK{L z2wjyWmr;<^VuUcWN(l{KN`s0L^8JJ&(i{>agsox*ku?-UO_GGb@o6^D+%dA_gTbi* z4zv)OFVP zD;!8ZHrodeTpADl%lUZl;6MKJ|ESRl|M8#y_rZTb&G2Ub;{*7jTy3vP@&C^L*HCAT ztmMDHoxVCgC#^f`XC@J)R+J(XCnA68?b-S1hX5g+?_EIEK@~C)>hG#gF+w_S)E6vN zP`+J8X39kf30>hPhk%?se_ouudvo^gG{~&faUB^4v2_jN_+-Oq1N znWZ_N|b=BC5@G4Wj~O zuiHrHZG5?R$M=oL0b{kSWu&gs?RD>(-9dS=;*(+WG3)oV9F3yu#-#RxrBgrGPx?7AVr7$M#D2mzdnCXjD)))0gZF*EpM4`n;kkSc0CSYam=VLj^4iZ^$96})xeWTcdvFq7nUx%mWxxjwdiV$Vh*MuTPDLg-zq zHii6uP^+Pia3x+T{|3AoaM9j@`rN_2$B@*Ti&IIUyX$tK+2 z?EriYPs>_`%|Wm5RSK9G0d`0Xe+o3N zi-15uPbWvlOEWVv(spiUqr2J#c<|$W+g#VG^*|o$%rA&tqYri?X+IvJ%wH&$i$G_O z$O8$df?vVi>oI!1r{hO_)6k9e32DOvE>Ezq3Yxa4jB-T zqtF~!V;xSgr_k~y1V{76J|>_^=%T!+SM}}=DidU7>;)KjxLI`6b1)uD)Yw=ZA1vn3 zX9xqDd~0y>%df{T#G=_>tnLoVMY-M8*A;}YVcx9%#gP^p22lv@;&P>jMR|MSOSuoi z@4ACG6&x}bZ3<*KeS{+WtGsCn4;JY9FUPedeM~&jX1=$Ux=}%T~Op%5HaX4%>?JJqYC!OhNn6A5SJJk_S0HqdPNSMaIle5@(0@z4t$XRX$7oySywg^lQ5s6 zpr{>WfqRH6!oea?*lZy+gi?$QM>8X~h?s@vu7Ym^9O=Q2nU&}__=ds6^!S?r6EIqc+4xgEC*ga187TVgs z1#F>(>293rW$1>Wv;VS)LQb<%N9WOlwe}26SQ%Qg)5FD1J_Q%12DqCnJpro#>Ragm zz+)y9XpR$joZam9Q0EXKqoa-bF-yjtOMF65G9)kMESB7z7Oze884T~G=t+)y)ral( z(bNk?oks&>(EDI`GB}u~gQ~;&`cQ@+c5TDY!8kTy((_%lJ&>0!K|)DL^!;_dMue+Cm8Bx*Lz);#skp{{XITrR{KaZSZsQ8+pO*| zXYHpBl=k&yVd6bJx@p!h9!8v+Jzy-(SX1#AGz)}S(p%JD_Ao34Qs}e*9#RJ>OY`yk zF7bub@LRwKY$+h`q-qTLQU+5+Cu}Jqd|~rcV+F)_8`m+TtezrDg+Ha$Jwwu16ONtND4Mg#7*tTtO?Kxe{{ovqI^X1!O^B zw85SWIw>fS0+Bzr+pPHA*!i){x81A(4TPY<(GA;hSxX>Ge(a;Ewl@0*ifZ^XIYm7Su z2rfndpZv~ajnZOp^Kx*=*4S!5r&0twoIHSVBh`R(rFH;O4i1rfbCk$bL>np;*cFxo z5V-QD&cfJB{RNmh%pJw1y>qePa-8dEGz6{({? z{r(~%&pJrWOjcQfA<<-3GBPqUGVZvZrbUE*lVaA(liMHD`E9lxE%I!<8YScC<|(?1 zza{i;bf4r!n$4rPKlXQ{+dRA5(hn_@$Mnaot<#I6PrZZFtKRT%aDDpeA{u75%ZE5m zqFH*A$9b9*Tf^(UtLvT_d3bSs_1o5;_1AxhUa2`>{}@$&jxRn(!%>>dm+5Ufiq3e} zr>GZQCAUeQ%ty)A;l)9D_AN{_$QDm|I+-q`SA*A4|NZ-)w(0lJ{QDRF{eC;zdGqEC z|L*he9sa$`zu#_e;nR2g8qeZ2p2crGi{JcgpP%jbqw8rB9S_f<>m$}{HcoG!q9yIlI2*0*u;#7Re4ONX zFNv0zuZXf+{tsd0C{L2;Kn;wSv`uH}D47?@cJxKHHoWigiT8WJKRrL^mLlN%RAObDYeRJf20D zG&5}!gYpBdF8aZned{7g#zhVMKWy{jj`D22>uJy+s zwzmG;)=@f3KIlWE&TMp%jq&Cn!!cMaqf-#e<2FbyPwqcN*H4SYy!Cm3H?qanmN$0m z&+gCG)_?rx|4nI*|M<`UhXZ<^%vT?_@Z!I3MzZO8Fg3eNX5j!dMj= zmB8&CZ`qG@D*lb1SF?1U;Q60k1EigU2Fy?*t-%iQ$khU9 zo!~`s3;s%cHWVPTQM(7xi$TrqE}`b9mx7x2F9nczG)iV*-h7APhABX$NtJGf{C2eG zjQ%n5PGvmGim6BPwFmQXmeA!E=TFhmYA#nvAnKPb-W!7}M0d$@nvK_hGh8N%1yR3+ zB2o+L@4P2k!9(C1I|d# z1X`mUtiANrS41>twpO6{8YR<@yGLY6C zNNOBakhZseSXe?j-}~!!be7yFvtB>iKieDDZXFMZ`Yh$rAcz)N%56MK0zvcB4xhOB zWHpO(hDB+K&v3vW70cL!lx-lo}|H-{`mxDzpF zj293FA91{(z>FXjLNh3EcyK;$XBp@lXJwJ4&=uyZyBlaD;ET=^1Mi6={lq0daUo9x zLSUaS{Wu>jv75McAmA?(h>f#4EbiH1MBX&aZ~{dV`GhqyS}Co2mOQE@dh=c8*&@l8 zxJIi3gK^!T>A(Q-%PFop=v>JosR1NQday8=4wEHs%4!ikWve_oJv=;wa&w*#;= z|IY`Oe+Dc7DO+Sv&iPDGKCqky7#E8yU#f+9^ml_b6tP!+s zB5c1_9=tPgcpuM11)>X2e_bSCX!$mBo(_t((rOa}j0a=%EFi-&{W4^aG06<&ZHNx# zeX_8zNh`XAMOb68RfvvZEKFxJn4xcq5e(Kb42tyg>1G+Hb2?qs5gv4C9*D5m**`eiY~_gR_^`gM`nxO) z>_aKdRtf#?b^C<^6;yt@cMCU9Ghm)y1Jk&DzQoe!O*t<=a5tOGGmnO6%5`V~)Sq@L_`}~BSGZc0OmZRfg6wf9ZYjWGs9k?9q zLM(qdYdl}g$X+xj2}On$BAy=DD>)EciYdG}3*!x}aNDA~;(mnG=b*>#K3v0#JSoV+ ztS#F0Hiy^L?w5y=(B%tU>71`!_+R7t_3=_qjQdNA zZRLsfQ&N2aKs__p2;)<$hqiHYnaFQa2&&VJ5wu1N*{p%wq}nxWjtq+ z)SD~(iT1(mzri$ux9y<`wCjDjI3Wz<#suFuj#u#Z$Mae~DLAeSZ4KLvR$RU5@|V>Z zUx_FYBaMI>n?3YqWFU?PY(8VNuS=U0`rs=?Wn#RUWutEuvDXI&{}ab(!5Zed(&_?j zm^!8u*-%8IX)^i-y4Z%%Y$@(x^28qx2C^)2a$!3`IO4~Rpf!`3EUf%?1OD)h&7^BF zBWB&n_{KTuKF`=kB+T+p+U4b)2fj@dBRO|&mhdNHmks!9Kv74NH@)@q`R)yil6m$t zPUiM{W!&7+RqDnCD99|6;F}fdKg=9P-wi~EZ{IOsL*p113wZ?NH2Gltn1Rpp^ilKg z^0-j6*k_^pW;N*{5DT|e$`Jtw530Lfakqkz)4|wZO_brwr$tPJOM03;(1FT%xXUW^ zk>5N~ty!r$RgINNGcjc-8rVb55;nXQ%k%~+ukTLT>^&L$*ME_OF3$r^%cm+hSRYC3 z^bI^hWHdY(hN4c;UEES-~MGy0Z1J!E;Uqx)1wXhB!@%ab++aXur*4armNt2l%f z2q(hG_(_;G9VED4p?iyqM?Z8#4~1P3v)+AL3#+Z#E}Mnp@<;F4~%j8S2^^) zU-!NaqF9F>D1Q~>o~%Ok(*@p!=Lry-VTn%Po#V^5um(VDYddX7lr)lPo24f_&g$s>l;j;rIeo__A^KDAK19|V~5>j zz|kwfvk)2KokXAbg}pjMTi~&M7N-W&3|94TVE75$&so8DRS6p0%zD^?J1h{nePlL(lmbP4OWo-3h%NK&ceSH zsgZuge$$79!|%=4hsE>x)iDcW;36PGKH~7KK;j&&khFjsLYY0vVzap-${$!IA=FuU z&-ecbLD~R|giToQ5IBQl$z0Ljj{yz4qG67j=WT<-Q2j@pJ-|zcvuXjobeZajU`B-K zffz1m9ns*`-S*szC_Lg1FvLz{CVI=to2}h@e(rDIE3LsLm5<+1mrcL(*nhpC%GbNc-g2OiW1vFxW4r zY6k{p7&*n^Lnf<2P(rT*M1^;`fT*vw9z>nDVPe6;+(W|U2q+uH>zL1v5lZHo=p75X zd}O&y7Pi#zfe&y~9j2EP=Rmg1>cCU=xNBO!bzW>{#eBU`^m>T71% zBzmFfXCsh?Q?ACwOGaZ&lq{bO`_zWTj@HxKAk9Y{@!LRjfq3bTzOQipA7AJmL~0M_ zx3CW&QgupF{3OvrqCT?1N6zBOD#?*(>7Ig;xUgX&*(qHId&Jto&cLTbrR=y8Kw%wbp$%(XZ(FNAukSsZ^o1aWo5y#KbEz{ZrreaMY9^X zwIRp)Ogizvp)ZnmtZL~1O~p`aZ#A%MFC>RuppWf1Q8YX-4}rRn`Gf7NiS7nn>(9XT zRg7sM=3;1EB3D5&5D*jmBAV~@Sd4}68&fJI#fyGmqmdraJ~$FwTZ0trlSI)%4X{Wt zLVjgk@T=dZk0u_-yOoi3%AYyfOLd|ph2Ow=0Q9iYZ%kfAqEm+<96`y%wG9e_iG`4u z%`4i1$u#Ah2+rD-EK`>pv7*irQbC0X_X77C!Ln-;>abKKAi>6~aJD&zPA1~Kah&%R zjP4FJ#6$4ffJdqP8;BtZrcM*6Gr)J|H|Bw^aGq4S3k0&Z-uq z`=^&j{9C!bJM1am=u<@f7&sqc8STooIC#RT8;f7K6q9TZVFX*Tge|Wd9+a96;?+$u zLRv2D`)l%u*2VA%$`9fPjyc$H8>nHLgVzwj!QQjdtXj`qmMp7rg4mY{$y~6XD8Ifo z9y47c$z`99TU=SVw>jG6-g7k*S z7Yc$zQ6B`0oP92PH}Oszj?7=!q;3-Y*aX9gf8QOG~aA01sgN69-5QFIhT z#zgHZs9QNatns`c4KmaPCilFK@@8>C?@tw^0YW>OigEg$k@vx;-2B-)7FLWp>yT1m)z0ezt=h(pJ-$X>NU$=N?DMAGK0Z)-03p{ui%PD;+H z68Xq~FN-vKbs%G38|!M&i*%gA5g>-TD&<(94(u>1b$UWjx!jaV+}b&CC${#})(cNH zLbTgGL{bc>5u%Hp69SBEDSSFOL^%-hk(oRB@E#mYjB%Dk6*d0MfewIhl(ToW!h&7q-3^ykpq#|>Z^&C% zn#;gF7Ze^S5UXJ=-5KUFaewQ9Xd#OGvx4j|IM2?o+lMLtgwN$x+u;3cZvn!*p5=W}MBaqEnGh=IcsHc4Ms< zW8}f7>t___kfK;^*1S>-m~2MS_jI_G$D;JvBk7jnwCcmL#J$bNCxjdhmQ+vFJvkB zQ*~HbSd38c66cRdjwA;&Ns6Mre~4xeZH$v5SiI?-B9+fbdZ5wBs+jft)a}?`97rT! zfn$M6do5kFuN8i;6V~QU)DnSlF%B;H0V&T@6xb ztMxEVZ?xh5RwJ))Vz;@9TB4Zec-~0VnxJ+$JEft^H_UWRF?Toshw{B-{J6{>0@q+c z647(&pC0BpLYvJ_)tHbm(dZd7ZJy{bM>(p=dW{Zf26j~VqANTHq8y2VMpzgYO=0Kt zB*WVc%Hd%Yc5ZourW}dJbS8pj0TOI}&t);x1p3dqiPX{JuhQqLfo?QJ>vl`NY6_Y{ z!Q$rC$uKB&JWPoZ{-I!qc%mBjlU|v^5l@6+nK4u2>LX7^DCof2a7NcU>Arf#! zM#x8&6$hdR!9HW78Ce=s2Wd@fEl`1kE%p@XG)D0^+|TzYf55(JJrC*);T;S`l%9D{ z6PBU}Gm&C-2!3HD7~VX3>@D!lhxbBqEAR?BhzKussTBA0gKk@*o9Bbav20+$5QV;HcDJci^C_j6M%d zLrTj+;i!BLiynnYmQIvD_4vEF1j`Zpkai;*XCfN#heDE7GOR$f$$+e&T4zTVs#Ft6 z2|~g&N1;>-EUREt_^GI3a-DK?i`-$@qg6V7$?w&5#WryVH+Uai2PNUDVOXeR#$LCh zWI97{1k|tQPBr$ZvHeiTNaB{SDR&cw2}#_Vn=`wHExW_?kqV2Cb+J8)c)Qw~qiZ61 zlf+Z+8t~1du9G0l_Q+{O$dk+MC`o~m(jJp>kFwQ}JFE+WBCp7Ko1QZz%&A(5=9e@> z=#8sF$guTxTuRWoYm_LK#mGUZw5vU z&*^-t#)kLzEI|}&Z^*@!&?U7!Ky;6jfhiv58~N<}EmjLV`a646UD-k_WGLUS127y(a*1=*3`r!L@*+`H1Ay{ zNaJOj^~+78FPU4c4bmmEDC*egSb_>E2h=PL8N^PrG`i4Wi$uoEcW$Cq0v1V#&|9l+ zIO=7B>khuqrU$~Z)hvf;g1pRY{nJNgnE0hxUG-c*7(rp8lrJ|yQ#)HB`X4J)`9=ve z>KzwNMk8!PC*`3jlcBea7dpt1dqp0hZS)Pwnn%NFdb^|~Fx~`{ohBq?s|j2AJCH2f z|Cs|cb()3d)*xDwFykC4)G|G4u4P)8Bq(L**=!O>N}!)oM=5-iAp-9 zuax!Ib|(_*MQ(b|m%X|6dhxorM@?PagKi;1R%Ex!hd4(x7!1e=vS0|Is#!84zdGs? zdH{xo<2jBG$M|S=HV_Kd6Jm@vcO@MO1k zAYP>U{75;ljaF2WjbvyWA`$P8pJ7yk3^`2#g(VSw*Sn0kokZ^=+E?b;xT)YKS(mv> zsV=!m73*8Ay1BN?h2<22Y1I&;4Pf`o369Fo7#Ktw%6WU zG86#K7oB;rvk97=7NOy&ZtM_BZO)wFCR3RL7py5wp>vGfP$yHFBII5vcv#MN%2bxG zkt^ydrGVnG7dS&tXyFZS@W_w-ZVNgJ@s+Zg9H5`VGUEd*2Af9@%oF`kPq|7EcHjo8 zw*{=ljSnMEbp@4ZcP@DB0LEie+EFFBaWEv>ElQ_Z&2;FZC>3dJ?WSl1$!A@BcNys0 zgXZw+8O%bZX|=~K`fs@3@bTf*;2GdZv5^*`k=SfN^Z6w}qi}+=F#*Q7ZD3PqrC zm`^iA&TSWB=}REQaT%KP3{fm;LcOXTxLSv1mn+R3UwqbVFuFvhA9(Z`x>e5$KWYS` zJVgB!7b~leQJ!Qo>SeXQ|DASBxgMwRy}qP`3)Jr4(TV8y(~Gmyi^J-6D-O0f1coNM zx;XxQczEcQ3D7K1{k?*f4-rTe6PKS37)TzJ)*onz^?PyqJCYyJGpuoioYmnCjS$g; zy$l44l1*J$eoy*u>fs^g+&V1BWU2PGo9NXw3KmCwH(QEep?7=zNIlWsWzh)HPAx>> z(DFoU5S_$GdtO&5OURn?LQi#LYqsFnz%EJ8hf~5YVnCrnQn|n-0W748Y6d5JUk*1N zd8};nsh`GwPznjmNX+zLK;~jqWtI67rE6jpkFLjtvLE$XV?Wvd^y#CE$r9gD|GikE zU?gSp-zMm{h;TUeI_Pq>5G5(OIp~R>Vop*ZQ#7|>ha}oh;5*8olCUkkD##6ju)N?+ zC;-T!fPbX?%_T&s{v77|;*UMM*2xP|N2N;upm`DMsFb8Vc_HHNF4yn`G&?Urz?5tx zg65+Jr`e7nB3*lCjQ%egH_re@iMuUABc&CrGR|?js1`>qV?;iGpJo>)C{_#87X`Mi z>&E2_^NQF}3?8fH$Z>-`1Iei&?E=oXVs?0Xx%Wf`PCKl3ZHILT=M-Mu4BZIsAV@+c zK)&RtYz89cYPx{CNtYqJ$XpKGCHNICaRdmyrRd zF$2|3WNM}rF%AufEg;Q7t&rqbGn9+yX-NbE7zjv8AGIOupJeC+hIVyy|5JtmRnS4L z+$8sL?+%mC*-EaTkP=>jwm`HH_Zx-Z_zV zdS8nZ;G_gvA&wnWAlww5b6{Gbp#7wUZrox_6Nvs|u~kdbE{@uQ=O^}T3Oqv#54;iI zd+)^LqafRasxEepjk43Hah}0%5}|XtX4>}Dn^&8=0dTV=X_+c5(n#L|yDeGiT8!|J z{3HhsqwE@iPG^ZajmvDO*LM7e4m>8*tLAjDgQCrjvkn~8+oFDVs2onh4S-PBC^SBH z`DnUuEaH)G!!`5<(H}(FeJ3jiI#lQY2+LYTwTPv+tROKQwyBt*;TYg*dO;FcUG=Wv14gyg;HM!a za%Ru4*(Qx99V)3^J5K%H^0PtZs?&cFyw18bpo$F&&@G=NY4@>$IE6rCaVEJ+d7RiCOPTEe?mO|C^WdC+r;e%oFe=+}g-QT?rml7RqVC6Mn@(Sm_X=g4{kg~JO%4Wg+K0Zj2AVpAOwt>f4y zs7&-1NOp^R;x-JAtBd%e84@O|uE0rW=rMre{uETVrcB=%w`C_+!Kw2=P{gEnIPFvg zv$27lAVv>EvXXA+t!o-6Y9yP?C|yQe7)xc!S5HVyhP*D0(0{{M?x~*WY6ZEd_i?p^ zf-Z^o?sV%WlHO`q8XO^9AxvA0wxchH$EA1&e#du&XoytQGV;sBox@>nuB*odhzl~c z>)de?-S)|Bp`|tLkfRtgfaIjR@h~l|g(4hw#W}FJIdxj~(3o*xafcy>0?pE>VSPv& zr~{J(ZfgW-Xyop2U@FIVhk-_dTPSH41)i5M2j-Nc>H}e}G3APjvYWqSu(E?HSKK=h zv`Q0kM-!Y3lAmaRImNoi3LU>9XsKf-U{Sh?bSoF+>ojI_AL)YpFx9 z2T!$FvOY2%Jf(9Gn4ge&-muvwSH|W53g(LN4{+tErfJaPmkUc7b}j4myz-j8f`FVF zT@|`)zaEwXLi>$GE27fWDo;3;=fX7OQXHQi2)swgY(+kN)svvfh5ypmn_>F4 zub|e9*pPDHNyfdhYHA-bio~ar3@t1qdR$*^pr%tXf3g5VWwhW3bp~p33VqeG$u-*8 zl+on7f)wCt_LAJ&0g25>u7TJ;9xd8x#4xP)&4I&gR*iwUyn82Y8;Wb-BSWo^r49_V zHE<|Xs0T`m`z0n&4F|#*bep*6w(-*{&`(Mv#+l$=a&ffAhTNDrp&^Vu9?6T~6%q+3WEA8R}Jx(0-Grovj7*FDfS znr+*(GQw*?Z64kdpv_+hc3_d;JS-?&NR)yYLjvz|irQ?GDP6-i%4B0DI0SU+H?5c$ z3J_65Du8f}q#|+pd_%(Fx=47_fx=ob8YXghlwDD)+=}L3I64ub6|AFTcp(rEDz-_EZ((k`<)m8 zw4L@V3LMy2rWwRu>Y-ex3k-3VIfU>_JX zkjREdj)K<5lh&W#o_G4}#bgANj@ZM;e;L5eIK{VlMn(N@;sP~a3X0jRZFIx6MkonO zuG=Ky=OVG}1fn>RKEJKOX0_~dg6gZ1f<_Ja2+!*5;gbR*j zXd6gk`R?rC_p{UetG%n=e!twiKB)nN_iQ+gb2wtpQd9y*`*ra*coc+4=I>oXiRHwZ zAnI%@RdbFw_t4;tIv=~2SE%(xY&*sJe6SEm52>rXN&^;s*bG}B)C*`ceN}Fg zRe~~hIWeOQ+L`(cP0uMEOtLdzJxcHt-L+4lfZ`|_2dIK?^fEYdsGo7$ON9&KkSOj@ zKMUr9|7=6iix~wgtqEolfFO8a81uc>Vw#jLjdJ+Z?xb-^*f2`gLIy-rR}_CDzb1)V z4*j80CDCxTpl~DYS}aK*@>O&>85d&>T%MDX%P~Ma)1nL?69o~>`zUllGEvPefJiOP z4kNJiM2dbSQ%&;DsA*`eDXzxwW+oEbnSw~A0&y`ew&H=HT-Yl1J3^d-Xjd=IoGlKt zG9>QKLrddf-5j&C^Mk`Hdkc7w&#aXWvux6TMw7P|9cYr21vsPyA0O*H zfiE5!Mnx7n^M+liVMZ1T%O1^lfvd{uFd1F5-+@HuyxH8ZFKyl$czd^JZGmIDfTeg)AE z8(_VqU1p={G)5&mBn>~^A!xy@&G`hS?(m7j!o~RDO#~1AOW8qbP3J*JQqVZTWa*vSezKe zGAbw!VAdO-6g)Dt4PeChluhbu0;%(*{wQG7&^Dk^ycROLa1C>wd_eerXPFsh#5T=6 zl))x@AoQYG(*kkiPpIhjj};db@~8cE1q*ji6+Ij3F`;&w`Pfg*l;Vd4A^H$vFUH2xU z93R@>cs|ciiHrT_GVA6jWOpJsWL6W3ZLUIuP-}@*kM>uSl02k$9XV@7fyQ<(DP~*4 zR>0fDi7X}ULsK>XJ&%v5g!2)Rs||AsGgr` zDahZ#11Sm#UX|+hf*M=nzI9+8UD>pP7y@VAZTJi8;tI%d8gmRv?JSsRkS7vVmP4{2 zC*=r1Pj~a^K207%-9bNb+aCpxQh91aVt8d6jbLgb6(!rWu(c?X@K`mG_~Fp-G=sHp zfWk>h@eQWmgf4E?e;7_C{k~VpD=5d%;H+-eZdw;R_A@Jn1|Uc&Ye4D(pkI{q0UpOi z>ZBJ;!`^qxIRKANRDUV(kXXsCmKqrkXKb^1SayCpqF$U0i=wmIA)*_r5fB{u2TmbX z@Xo4F<;(Ojy@MeME~EmLU=HHdO#*2c61Z1wcWq%^ZUAu?V~BC&kPY_7dVjrw~|U}G3@dWHqBjf4^iAgyx9H*xrjDgkKf;Tin2 zUxx55i5q+p9%`OJI+#e3CYx7-DNO;v@O2f%Tz8IK{o+rs_#h#nwnUGttNq%?Ab7iv z9x}cEJOi`N$$?Mn=-4S==6nN(TH;IHVro>7u7%oeQm_f%Wll6~eepd+r5cXP=SZ=F zXdt5k9VMmx`EX?O#$Kt=bWm&_KzD&8F^v02x}&c*@lmnW=qquuF4kJaRyI$1b?`*p zab|D#GGt_tZ0*psoE8@!CKkIz#GoZn{H=GD-lQl=?m84Zq#$u*_!I;;>OCk3hEQ8h zB3fqpdPPAnCg!8NDCcxlLZ3g zpt=-j65_-Pb;=gR3-50#DiSXiw5M*|9?`u=^+P@C5=Izqw?uD(FvNNrBuEr9b9q(=_5)c}2O>GAyZ zf+D>U=K~(7lOwoo=w21JI0c5d+@Nm;QVwrIQo21x!OE&5M^PMGvAmz zonUxYOtc#!Y+npvnSc@TGYD!$-?>qo&oUSxx$+OC_gct#n4?7U5>U{vl3*?eZ4jKz?nzF zLZU%!b=nchTnfK4W+oyr~*<=gcAp%`8&5x;soAgWwf)&aaMf z0h4A4(HnuGqg7tOfvtmHBxWr_$zrm4W+={}0w2mBSfM?TT-lc*AersYisw%*< zzl4Wh+;vA%@5X*A!EG&>nK)7fJJge)aw>rhc~?w5FglepHCnIzEIFf9lCha_6n?Ds zuj~~g^6!PMW+Sqsg-0nI07skujn0BII7CL|Xo^i%4g~8OU{2d$cnvDfIH0P2!;nLK z7EgC|8FembEy3f}N}&1%R0Tnw#0y=-0fh!o<)Jr(SdAP_)F$F#p+Mqn3yY#!kWe4o zxIJCfr6UmaiS#o=JypXV20jZcnz{;Wo96&|R;q-q4!a`LYpDY(Y~iyA__Bk~b--^> z*(=M(MVgGh(djb2O(n3~Kbs|PhxyS=P0{%smr@sRmjj!_m@7${4rlh#GDDpl&U$nk zjCk?8JFf-C@ySKy3ht2wrY(bWcC(Ce+z_v@t^!50 zIm?Nx6(-H0)N#SVa+fU@vIWJ5N%%cGExBB5DUBIUT7)M^+Wg)e8LhZFC#6&{f1>Xn z0juC~6aBZL07FTkwnir3ZO^_F)jSgPpyM*dsiKNnDwJMjNcmica)36Z?qDM1DWfxG zeUpv`68k{Ks^vN7*v_IuZD0+%*kXjpRC2&PnV>8XfBm5*h2z(~ub-lL9D^WX>~W7g z`Np%l>B0gGnG`L`9+Yg7JdP58f{Vd9nYd_%3CqjTY7sqUt6b6yllgs`XLBmY7!)R` zHwmoXYs|@f^^wI(4Qi=Cx$9AK6x2ao;>IkFt-HIapD_f;u;=h;9 zFe4dw=4FuvaQB&OxOTxJ0$|uc3k{gAej=kXs1xsZui1Rg7pW%*_%fhf9VTiog?WcF z)=?W0LBx(nt`;@X<=Nipg*%Ke?cv5L8&N7KVb_CK&ag^#39(>YW=Qjev7X{Avb)9% z2R<5VXnSX)K6til7GO0JmIBvs*iyv0_&KQU4EioY;Ueu;hZlhbqXMhL)~Z@pX=qTM zCP0C!QSUKiSaQ*8967LGw_p@bmwLyf^9FL$tB3}wHaJ0P6B}3Tpu`g6Wsyd&4pJWZ z+JF)oBTvd3m{5dcgToFX+IrZb8P*mcbpJM$0wX!wd{!z0CbdWix3VH!`Q%b}Y>F1O zIOS%TVaYzb;D%I2eyC?U%q|{aeAW?!YA%oO$V8P>P@d88h7MXPZzLvthG%mz0I)Cg zPlb$zV3rAr9m3VdO}N5tJ5FLM1#G!!f)vY2-~sf|)2ZaMKoQ`S>M8X`8Jr7TBw3nl zdQRWXmM2Vfi}1(Vv+a_i8fNJbANmwT746VBY{RBqs$tC&T|x&KCA|ZxsWBgKM-6>M z*DdW0dtMfp2q&@F;H9PS<6(`xQ4y+f6W^eZAeue9vSu~2jjmIZw#VH9>z;${p30>M zCenHs!C-E42ml5u?DSQl8>*H+3k?#r#H5e`^1?M)r%VbUuKtM{Cdz-P3r#{B7r3c( z@}_ri9Wp0g+5Uz0>)x>w5^LSgC8%gvox&G%lkg>{&j5yp)d3S>cU50f(MogNy`eTv zG#GsM!~Th!yFL^N}}Q>+ri-+J`YZ0Y}P6AEbM9s*?b*%tG^DO1s{gh z!bgUNLA)AGpTOF{q|*hiUd}lQjmWP@&ja+R8PFqGACRo4EhWKe64n?PhE%i6rZfD# zjW+oH=aD3aHEy}4NW(n?@Ak#>xFLqYaoRIr9>=Sq=zWA;36+iYHV3z||9VxfZQ@@S z>VFvKmpY;MJ^83Sk#HqdKW35MXX1@6Pb9+zQfB5-4GYT_KJOhoqd!Ocegt)#;8M~t zt?Xw;;dJArC#?P|rw+rcW!6WvJ(r~$l^(Z0ovaAu)~NQW4uz-%NQJrso_0H|0xzg@ zs4PMawGe?GAh_*vh*vxB-bBSTyU8uuZixVT`%BYznN92hAnDcTvkX@?_YTSx;D!p^ zI)C-SF&S1KEKEr*ILDHR1uZ!!RV!GU6n(u}-_KxiwRdswc_S@FT`>Rt8_p*JL`Rze z>I9-lTH0U}CzZzDbmsk^%{7B~B2%i7neUx)qiaf_DZ44!SObitl=uh50wbU5f~lc+ zniv1Ut+x^dgDgoVsSL^DU*>V2W0`k9NS6I6fQ!1u9Vok8`JJ|Jg*9ljh~z2#d8 zxH{jv+6Yw_j3j!;l^w3)ry12I_Kd~uIg{f{yw?nE!}%)c(ZF2CDdN^3Yv<_=w|Ma& z@_^x?Z9v4%au(yD%G=;v=0&Is38bNL0Qa;ZD>Ve*_G5S%nhl`PQ6p&JYge(y5X>bA zDP%bD75q%_HBfwEIqyLzMt;j@+MB2H0hOTrj@gInI)*11?nd~zzk?4MaH!;SP#xU1 zx5$Nwv`DfYaoG@1;pXxo@ODvuS@9%jr#Ppyp|gm+HsIKxZQ+3yKOwh>++Z)E<+)8y zM^`hqEv0v;+s$R*=v-Ymqg;$(U4fF)*tW}(G=umz6l^uFcl{q6bqTsCff?$CS8|8? zl6B3Tv6mW_b;E+{4f+dB0gW;i)@^L#LtSmL0bm`zzGtuX`1G+LTq{*IibV8Sb@V~ z!-cJLBM>0c+4?F?5dSle{+29b6S`Ig0~ci7uuy=Ag!2(OUJXG=&N)~Uj}-mFde7Cz zxBu=$(o*f}Vi2{)SAVWb9Gxw?{wioo1?T) z;X_V+Ap(lNAGL?#(KiI)fl_VB#y}gd%-s%lsMZnqv#E#XV5@a#-U&1DplK|x&CsY6 zbW@Bcs0QT0af@J|1PW$>a2050&PKJ4mR%0=%RO*7>l2J|vO+MTvqw5HejlB;#*%Y! zOhbZo`4*wx2c}e(!h+-NktN>t>Wx+oyPINej=8+>fYa&cfzDMOmj0O^T&vz{++m~*B{Mrf`H2A@FRXz=hu`%j8K8)7QNkKIE6CoUyf{RpBbycaHsnW+ z1-2=2dkfr2Xvc##=m_v}pE%M_AiECSSON+{*##vvh~S){^vswn<-jev#?B|`+Tuu7 zbOzmWIpO7BX?fnH{+C)SlIO@|7j&BQ&;+1E_JpgBEEL1Nzh3^fnOC)53`A7B;b8A< zGcc`}Ch5Q7x-A8|M2=T8BnOSMj7&{~>Rtr>QZ2aMbT|@)J?+rx{-wZn@f;-VpC7#2s8Hl=tpoY`*)#K|mzzCEl zPq6U8u#He^%2`EC{=iuhFEGM)_$%JGxU+w@^&iWTpY|8y_v+66V(W;_7uro{1p1LDb zb19Ws36;kNW^^R5M2S`AB3Y7Jp7^vC{7T`dALQ)VtOKM`s3tO+h3h+Ikme&UFwing zZ2zV_BIH8A)#asAQ~ib5;ha@3SG}Mfh+~S|qnhKip%%~g%a<~sN(!Ue+}kJ7WW*55 z&PX>6hI1%Q>J%kBgWI#omXi+KPmVNDbG~3>PSp^rV1oRDLJvtPrz(tMsjkRx$pcBh zenxlY%#w1$qY4@y&(I0Chj3d&9Yt-##|g{CSE1*TKBG+%#R(z|kr#7^OA2`^(JO+G z9^)zq-_UpmM)~4(pi`m*)fsvvgW%A=7d#FkmR|}_V-I?<`phY$MZ^{qm|+IdWlcq8 zg|`l}nc#-yfJ(XpJil~w^Aw$AkoM3H9ktCO1i{S<;ddkle(*jNXD*BX-Xx*y3u+6S zV1-P*_xQhW)E=H~>?=>;63dAlZ@kXi(}aL6=*&{6;aMLWpz6!JPIOYMS}EFGWN3cX zr0UvJJ(OWOV@f{oH4GUc;jxl$&4--BWo_uZnkYJ?C|YNj{GV%tgr+54plS$V;`5!| z=f!Ba6r{3HwLqnfBUgJw=D9JrOP=7skaiR=OnVODg#&yJYYskkkmX~lLC&$*7Kq9{ z^=LkCqUM+;Z*@9Ct9f`(mRBsm@tNsDE4|C+D9-AEqn3G=fB?qmQ)^^PCKn6jiGI2z z=)mSE;Y#b~M0EniSt4 zwI!r&sknm=_I*DKKcvK1_%JmodmWU>k^rd!)#1i)6aW?XDa-QqjHw-?Kbw=osuPuK z2Jytk!skvI2EoeGs1{V26f2`@y# zc0Nr{^jB_e!?)!lk9!Z7D|7{1MoaV&qe*Mh&FCr8t^FZ5$!elLCma^58=%v>8-8&FA|D9%f8E(6L+T|CW4(>z`;QQ890i?VnAcJ&ObsCa<((9+-GSfk-@SEg~w zcig1@TjuHn%}0%$=EEeB8||H?{!bd3X8@yiszqp|5uwvZPh0n(-x(vDCS{iHI z3k$sJsH#POmz|Q=C`Eu0l5Tk|sko&2699v>9Y?4&#T`~$8B@uHQec5Lj&5V<;M|V| z0vU_;FnXqA6sc013XGeN5ubrOnOZ^xVykiuYe?WphCY@cn+6Lkfq^CQ@t}_#FpQ|n zxX}~2f7|yGS)%^|wN>#9c^{^Xhq7E))mzq^fm_CY>l`3#V;q}$aPQlWO$(7{bO8lFnkZ1Vcze8<-JY3bET!KRTv@ggy+2 zpzz)A9~h!*Jb)BB^*|eN2}>lnU_YwD<()sm5kq8#wg%Cvx75-uYi9);=RIiXv~9N8 zBlqt)Ef71+{#(sc@|0GIkQs>iMd&_4x5?-giu2L~uUnx^rT~Dngf?Q!%_+6s03$Cp z_X$)JA%Gk^7S}5_nCn!1PKA({+GOB~c=({XLb4neB8RoZ0x=S)EV1^R1faLSeCQCM z)x5sTce&D%)8xBcg)opH%n`7w`2%9xrc~>RVnnD(AGWq~WY4JZU2n*78HIM|2iho+ zd{;$0fkzZ}riGXfoR~CHB-K^4IV6F@@r*KCn?Xg#!uac3>xHz#Hs&vMvm+oC9p;?Y zvGCVCQpqP13WSEt(V@I$RvQ$*EJ+~Bqq4Px4EwX$2CFAp8x7&$x2+f!4F}q?>6a>9 z26Y-;Qr5vIrox7?fJjx_FMFGd5(7b0vk$y_AZf?;&-RAVaJ3+_ zj1Cg>HEunTijOsZ)Y3h%Ic!uWDtzOKr5gQebHIX{Xag1M$OjHFXvO%V;4lrU(?4Lj zszP;&iw+kef2u<@U~A(%fUw6?f`<7*AoZsVGO0f!DibwKlMcqb0_mBqOLrf?bBam*dAQsOgd+r(H|5yU(MB0 zr524C{5^}Q!^|@JY9oV7*06^-pOdwedcAXog7dWV@^~0H4JZjB0)j9T%8sFiVRKJ%`d4&A;Z%YuV-n=yQ5`zJJ%w?vmt|=pz1iQc85jAjU}~(@HY+%N>E%-)Hqiv mM^A5|S9i45tnjyVGFd?s_9_wS$L(KY*=<@%sh9oM*8d05lh1Vk literal 0 HcmV?d00001 diff --git a/software/gsl-1.15/doc/gsl-ref.texi b/software/gsl-1.15/doc/gsl-ref.texi new file mode 100644 index 000000000..ce8bed39b --- /dev/null +++ b/software/gsl-1.15/doc/gsl-ref.texi @@ -0,0 +1,671 @@ +\input texinfo @c -*-texinfo-*- +@c This will be for the printing version of the manual +@c @input config-local.texi +@c %**start of header +@setfilename gsl-ref.info +@settitle GNU Scientific Library -- Reference Manual +@finalout +@set frontcontents +@ifset publish +@setchapternewpage odd +@end ifset +@c %**end of header + +@dircategory Software libraries +@direntry +* gsl-ref: (gsl-ref). GNU Scientific Library -- Reference +@end direntry + +@c How to use the math macros +@c ========================== +@c +@c For simple expressions, simply use the @math{} command, e.g. +@c +@c @math{\exp(x)/(1+x^2)} +@c +@c but if the expression includes characters that need to be 'escaped' +@c in texinfo, like '{' or '}', or needs different output for TeX and info, +@c then use the following form, +@c +@c blah blah blah @c{$y^{1+b} \le \pi$} +@c @math{y^@{1+b@} <= \pi} +@c +@c The first part using @c{} must appear at the end of a line (it reads +@c up to the line end -- as far as texinfo is concerned it's actually +@c a 'comment'). The comment command @c has been modified to capture +@c a TeX expression which is output by the next @math. +@c +@c For ordinary comments use the @comment command. + +@tex +% Mathematical macros taken from the GNU Calc Manual +% ================================================== +% +% Some special kludges to make TeX formatting prettier. +% Because makeinfo.c exists, we can't just define new commands. +% So instead, we take over little-used existing commands. +% +\gdef\goodtex{\tex \let\rm\goodrm \let\t\ttfont \mathactive} +\gdef\goodrm{\fam0\tenrm} +\gdef\math{\goodtex$\mathxxx} +\gdef\mathxxx#1{#1$\endgroup} +% +\global\let\oldxrefX=\xrefX +\gdef\xrefX[#1]{\begingroup\let\math=\dfn\oldxrefX[#1]\endgroup} +% +% Redefine @c{tex-stuff} \n @whatever{info-stuff}. +\gdef\c{\futurelet\next\mycxxx} +\gdef\mycxxx{% + \ifx\next\bgroup \goodtex\let\next\mycxxy + \else\ifx\next\mindex \let\next\relax + \else\ifx\next\kindex \let\next\relax + \else\ifx\next\starindex \let\next\relax \else \let\next\comment + \fi\fi\fi\fi \next +} +\gdef\mycxxy#1#2{#1\endgroup\mycxxz} +\gdef\mycxxz#1{} +% +% Define \Hat to take over from \hat as an accent +\gdef\Hat{\mathaccent "705E} +% +%\gdef\beforedisplay{\vskip-10pt} +%\gdef\afterdisplay{\vskip-5pt} +\gdef\beforedisplay{} +\gdef\afterdisplay{} +{\globaldefs = 1 +\abovedisplayskip=7pt plus 2pt minus 1pt +\belowdisplayskip=7pt plus 2pt minus 1pt +\abovedisplayshortskip=7pt plus 2pt minus 1pt +\belowdisplayshortskip=7pt plus 2pt minus 1pt} +%\abovedisplayskip=12pt plus 3pt minus 3pt +%\belowdisplayskip=12pt plus 3pt minus 3pt +%\abovedisplayshortskip=7pt plus 1pt minus 1pt +%\belowdisplayshortskip=7pt plus 1pt minus 1pt +%\gdef\beforedisplayh{\vskip-25pt} +%\gdef\afterdisplayh{\vskip-10pt} +% +\gdef\arcsec{\hbox{\rm arcsec}} +\gdef\arccsc{\hbox{\rm arccsc}} +\gdef\arccot{\hbox{\rm arccot}} +\gdef\sech{\hbox{\rm sech}} +\gdef\csch{\hbox{\rm csch}} +\gdef\coth{\hbox{\rm coth}} +\gdef\arcsinh{\hbox{\rm arcsinh}} +\gdef\arccosh{\hbox{\rm arccosh}} +\gdef\arctanh{\hbox{\rm arctanh}} +\gdef\arcsech{\hbox{\rm arcsech}} +\gdef\arccsch{\hbox{\rm arccsch}} +\gdef\arccoth{\hbox{\rm arccoth}} +% +\gdef\Re{\hbox{\rm Re}} +\gdef\Im{\hbox{\rm Im}} +\gdef\Sin{\hbox{\rm Sin}} +\gdef\Cos{\hbox{\rm Cos}} +\gdef\Log{\hbox{\rm Log}} +% +\gdef\erf{\hbox{\rm erf}} +\gdef\erfc{\hbox{\rm erfc}} +\gdef\sinc{\hbox{\rm sinc}} +\gdef\sgn{\hbox{\rm sgn}} +\gdef\sign{\hbox{\rm sign}} +\gdef\det{\hbox{\rm det}} +\gdef\Var{\hbox{\rm Var}} +\gdef\arg{\hbox{\rm arg}} % avoid temporary clobbering of arg in texinfo-4.8 +@end tex + +@macro inlinefn +An inline version of this function is used when @code{HAVE_INLINE} is defined. +@end macro + +@macro inlinefns +Inline versions of these functions are used when @code{HAVE_INLINE} is defined. +@end macro + +@include version.texi +@set GSL @i{GNU Scientific Library} + +@copying +Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The GSL Team. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being ``GNU General Public License'' and ``Free Software +Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'', +and with the Back-Cover Text being (a) (see below). A copy of the +license is included in the section entitled ``GNU Free Documentation +License''. + +(a) The Back-Cover Text is: ``You have the freedom to copy and modify this +GNU Manual.'' +@end copying + +@titlepage +@title GNU Scientific Library +@subtitle Reference Manual +@subtitle Edition @value{EDITION}, for GSL Version @value{VERSION} +@subtitle @value{UPDATED} + +@author Mark Galassi +Los Alamos National Laboratory +@comment @email{rosalia@@lanl.gov} +@sp 1 + +@author Jim Davies +Department of Computer Science, Georgia Institute of Technology +@comment @email{jimmyd@@nis.lanl.gov} +@sp 1 + +@author James Theiler +Astrophysics and Radiation Measurements Group, Los Alamos National Laboratory +@comment @email{jt@@nis.lanl.gov} +@sp 1 + +@author Brian Gough +Network Theory Limited +@comment @email{bjg@@network-theory.co.uk} +@sp 1 + +@comment Asked to be moved to 'contributors' appendix +@comment @author Reid Priedhorsky +@comment Mathematical Modeling and Analysis Group, Los Alamos National Laboratory +@comment @email{rp@@lanl.gov} +@comment @sp 1 + +@author Gerard Jungman +Theoretical Astrophysics Group, Los Alamos National Laboratory +@comment @email{jungman@@lanl.gov} +@sp 1 + +@author Patrick Alken +Department of Physics, University of Colorado at Boulder +@sp 1 + +@author Michael Booth +Department of Physics and Astronomy, The Johns Hopkins University +@comment @email{booth@@planck.pha.jhu.edu} or @email{booth@@debian.org} +@sp 1 + +@author Fabrice Rossi +University of Paris-Dauphine +@comment @email{rossi@@ufrmd.dauphine.fr} +@sp 1 +@page +@vskip 0pt plus 1filll +@insertcopying +@ifclear publish +Printed copies of this manual can be purchased from Network Theory Ltd +at @uref{http://www.network-theory.co.uk/gsl/manual/}. + +The money raised from sales of the manual helps support the +development of GSL. +@end ifclear +@end titlepage + +@iftex +@ifset frontcontents +@contents +@end ifset +@end iftex + +@ifnottex +@node Top, Introduction, (dir), (dir) +@top GSL + +This file documents the @value{GSL} (GSL), a collection of numerical +routines for scientific computing. It corresponds to release +@value{VERSION} of the library. Please report any errors in this +manual to @email{bug-gsl@@gnu.org}. + +More information about GSL can be found at the project homepage, +@uref{http://www.gnu.org/software/gsl/}. + +Printed copies of this manual can be purchased from Network Theory Ltd +at @uref{http://www.network-theory.co.uk/gsl/manual/}. The money +raised from sales of the manual helps support the development of GSL. + +A Japanese translation of this manual is available from the GSL +project homepage thanks to Daisuke Tominaga. + +@insertcopying +@sp 1 +@end ifnottex + +@menu +* Introduction:: +* Using the library:: +* Error Handling:: +* Mathematical Functions:: +* Complex Numbers:: +* Polynomials:: +* Special Functions:: +* Vectors and Matrices:: +* Permutations:: +* Combinations:: +* Multisets:: +* Sorting:: +* BLAS Support:: +* Linear Algebra:: +* Eigensystems:: +* Fast Fourier Transforms:: +* Numerical Integration:: +* Random Number Generation:: +* Quasi-Random Sequences:: +* Random Number Distributions:: +* Statistics:: +* Histograms:: +* N-tuples:: +* Monte Carlo Integration:: +* Simulated Annealing:: +* Ordinary Differential Equations:: +* Interpolation:: +* Numerical Differentiation:: +* Chebyshev Approximations:: +* Series Acceleration:: +* Wavelet Transforms:: +* Discrete Hankel Transforms:: +* One dimensional Root-Finding:: +* One dimensional Minimization:: +* Multidimensional Root-Finding:: +* Multidimensional Minimization:: +* Least-Squares Fitting:: +* Nonlinear Least-Squares Fitting:: +* Basis Splines:: +* Physical Constants:: +* IEEE floating-point arithmetic:: +* Debugging Numerical Programs:: +* Contributors to GSL:: +* Autoconf Macros:: +* GSL CBLAS Library:: +* Free Software Needs Free Documentation:: +* GNU General Public License:: +* GNU Free Documentation License:: +* Function Index:: +* Variable Index:: +* Type Index:: +* Concept Index:: +@end menu + +@node Introduction, Using the library, Top, Top +@chapter Introduction +@include intro.texi + +@node Using the library, Error Handling, Introduction, Top +@chapter Using the library +@cindex usage, compiling application programs +@include usage.texi + +@node Error Handling, Mathematical Functions, Using the library, Top +@chapter Error Handling +@cindex Errors +@include err.texi + +@node Mathematical Functions, Complex Numbers, Error Handling, Top +@chapter Mathematical Functions +@include math.texi + +@node Complex Numbers, Polynomials, Mathematical Functions, Top +@chapter Complex Numbers +@include complex.texi + +@node Polynomials, Special Functions, Complex Numbers, Top +@chapter Polynomials +@include poly.texi + +@node Special Functions, Vectors and Matrices, Polynomials, Top +@chapter Special Functions +@include specfunc.texi + +@node Vectors and Matrices, Permutations, Special Functions, Top +@chapter Vectors and Matrices +@include vectors.texi + +@node Permutations, Combinations, Vectors and Matrices, Top +@chapter Permutations +@include permutation.texi + +@node Combinations, Multisets, Permutations, Top +@chapter Combinations +@include combination.texi + +@node Multisets, Sorting, Combinations, Top +@chapter Multisets +@include multiset.texi + +@node Sorting, BLAS Support, Multisets, Top +@chapter Sorting +@include sort.texi + +@node BLAS Support, Linear Algebra, Sorting, Top +@chapter BLAS Support +@include blas.texi + +@node Linear Algebra, Eigensystems, BLAS Support, Top +@chapter Linear Algebra +@include linalg.texi + +@node Eigensystems, Fast Fourier Transforms, Linear Algebra, Top +@chapter Eigensystems +@include eigen.texi + +@node Fast Fourier Transforms, Numerical Integration, Eigensystems, Top +@chapter Fast Fourier Transforms (FFTs) +@include fft.texi + +@node Numerical Integration, Random Number Generation, Fast Fourier Transforms, Top +@chapter Numerical Integration +@include integration.texi + +@node Random Number Generation, Quasi-Random Sequences, Numerical Integration, Top +@chapter Random Number Generation +@include rng.texi + +@node Quasi-Random Sequences, Random Number Distributions, Random Number Generation, Top +@chapter Quasi-Random Sequences +@include qrng.texi + +@node Random Number Distributions, Statistics, Quasi-Random Sequences, Top +@chapter Random Number Distributions +@include randist.texi + +@node Statistics, Histograms, Random Number Distributions, Top +@chapter Statistics +@include statistics.texi + +@node Histograms, N-tuples, Statistics, Top +@chapter Histograms +@include histogram.texi + +@node N-tuples, Monte Carlo Integration, Histograms, Top +@chapter N-tuples +@include ntuple.texi + +@node Monte Carlo Integration, Simulated Annealing, N-tuples, Top +@chapter Monte Carlo Integration +@include montecarlo.texi + +@node Simulated Annealing, Ordinary Differential Equations, Monte Carlo Integration, Top +@chapter Simulated Annealing +@include siman.texi + +@node Ordinary Differential Equations, Interpolation, Simulated Annealing, Top +@chapter Ordinary Differential Equations +@include ode-initval.texi + +@node Interpolation, Numerical Differentiation, Ordinary Differential Equations, Top +@chapter Interpolation +@include interp.texi + +@node Numerical Differentiation, Chebyshev Approximations, Interpolation, Top +@chapter Numerical Differentiation +@include diff.texi + +@node Chebyshev Approximations, Series Acceleration, Numerical Differentiation, Top +@chapter Chebyshev Approximations +@include cheb.texi + +@node Series Acceleration, Wavelet Transforms, Chebyshev Approximations, Top +@chapter Series Acceleration +@include sum.texi + +@node Wavelet Transforms, Discrete Hankel Transforms, Series Acceleration, Top +@chapter Wavelet Transforms +@include dwt.texi + +@node Discrete Hankel Transforms, One dimensional Root-Finding, Wavelet Transforms, Top +@chapter Discrete Hankel Transforms +@include dht.texi + +@node One dimensional Root-Finding, One dimensional Minimization, Discrete Hankel Transforms, Top +@chapter One dimensional Root-Finding +@include roots.texi + +@node One dimensional Minimization, Multidimensional Root-Finding, One dimensional Root-Finding, Top +@chapter One dimensional Minimization +@include min.texi + +@node Multidimensional Root-Finding, Multidimensional Minimization, One dimensional Minimization, Top +@chapter Multidimensional Root-Finding +@include multiroots.texi + +@node Multidimensional Minimization, Least-Squares Fitting, Multidimensional Root-Finding, Top +@chapter Multidimensional Minimization +@include multimin.texi + +@node Least-Squares Fitting, Nonlinear Least-Squares Fitting, Multidimensional Minimization, Top +@chapter Least-Squares Fitting +@include fitting.texi + +@node Nonlinear Least-Squares Fitting, Basis Splines, Least-Squares Fitting, Top +@chapter Nonlinear Least-Squares Fitting +@include multifit.texi + +@node Basis Splines, Physical Constants, Nonlinear Least-Squares Fitting, Top +@chapter Basis Splines +@include bspline.texi + +@node Physical Constants, IEEE floating-point arithmetic, Basis Splines, Top +@chapter Physical Constants +@include const.texi + +@node IEEE floating-point arithmetic, Debugging Numerical Programs, Physical Constants, Top +@chapter IEEE floating-point arithmetic +@include ieee754.texi + +@node Debugging Numerical Programs, Contributors to GSL, IEEE floating-point arithmetic, Top +@appendix Debugging Numerical Programs +@include debug.texi + +@node Contributors to GSL, Autoconf Macros, Debugging Numerical Programs, Top +@appendix Contributors to GSL + +(See the AUTHORS file in the distribution for up-to-date information.) + +@table @strong +@item Mark Galassi +Conceived GSL (with James Theiler) and wrote the design document. Wrote +the simulated annealing package and the relevant chapter in the manual. + +@item James Theiler +Conceived GSL (with Mark Galassi). Wrote the random number generators +and the relevant chapter in this manual. + +@item Jim Davies +Wrote the statistical routines and the relevant chapter in this +manual. + +@item Brian Gough +FFTs, numerical integration, random number generators and distributions, +root finding, minimization and fitting, polynomial solvers, complex +numbers, physical constants, permutations, vector and matrix functions, +histograms, statistics, ieee-utils, revised @sc{cblas} Level 2 & 3, +matrix decompositions, eigensystems, cumulative distribution functions, +testing, documentation and releases. + +@item Reid Priedhorsky +Wrote and documented the initial version of the root finding routines +while at Los Alamos National Laboratory, Mathematical Modeling and +Analysis Group. +@comment email: reid@reidster.net + +@item Gerard Jungman +Special Functions, Series acceleration, ODEs, BLAS, Linear Algebra, +Eigensystems, Hankel Transforms. + +@item Mike Booth +Wrote the Monte Carlo library. + +@item Jorma Olavi T@"ahtinen +Wrote the initial complex arithmetic functions. + +@item Thomas Walter +Wrote the initial heapsort routines and Cholesky decomposition. + +@item Fabrice Rossi +Multidimensional minimization. + +@item Carlo Perassi +Implementation of the random number generators in Knuth's +@cite{Seminumerical Algorithms}, 3rd Ed. + +@item Szymon Jaroszewicz +@comment +Wrote the routines for generating combinations. + +@item Nicolas Darnis +Wrote the cyclic functions and the initial functions for canonical +permutations. + +@item Jason H. Stover +@comment (jason@sakla.net) +Wrote the major cumulative distribution functions. + +@item Ivo Alxneit +Wrote the routines for wavelet transforms. + +@item Tuomo Keskitalo +Improved the implementation of the ODE solvers and wrote the +ode-initval2 routines. + +@item Lowell Johnson +Implementation of the Mathieu functions. + +@item Patrick Alken +Implementation of non-symmetric and generalized eigensystems and B-splines. + +@item Rhys Ulerich +Wrote the multiset routines. + +@item Pavel Holoborodko +Wrote the fixed order Gauss-Legendre quadrature routines. + +@item Pedro Gonnet +Wrote the @sc{cquad} integration routines. + + + +@end table + +Thanks to Nigel Lowry for help in proofreading the manual. + +The non-symmetric eigensystems routines contain code based on the +LAPACK linear algebra library. LAPACK is distributed under the +following license: + +@iftex +@smallerfonts @rm +@end iftex +@sp 1 +@quotation +Copyright (c) 1992-2006 The University of Tennessee. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +@bullet{} Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +@bullet{} Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer listed +in this license in the documentation and/or other materials +provided with the distribution. + +@bullet{} Neither the name of the copyright holders nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@end quotation + +@iftex +@textfonts @rm +@end iftex + + + +@node Autoconf Macros, GSL CBLAS Library, Contributors to GSL, Top +@appendix Autoconf Macros +@include autoconf.texi + +@node GSL CBLAS Library, Free Software Needs Free Documentation, Autoconf Macros, Top +@appendix GSL CBLAS Library +@include cblas.texi + +@comment @node Copyright, GNU General Public License, Contributors to GSL, Top +@comment @unnumbered Copyright +@comment @include science.texi + +@node Free Software Needs Free Documentation, GNU General Public License, GSL CBLAS Library, Top +@unnumbered Free Software Needs Free Documentation +@include freemanuals.texi + +@node GNU General Public License, GNU Free Documentation License, Free Software Needs Free Documentation, Top +@unnumbered GNU General Public License +@include gpl.texi + +@node GNU Free Documentation License, Function Index, GNU General Public License, Top +@unnumbered GNU Free Documentation License +@include fdl.texi + +@comment htmlhelp: @printindex fn +@comment htmlhelp: @printindex vr +@comment htmlhelp: @printindex tp +@comment htmlhelp: @printindex cp +@comment htmlhelp: @bye + +@iftex +@normalbottom +@end iftex + +@node Function Index, Variable Index, GNU Free Documentation License, Top +@unnumbered Function Index + +@printindex fn + +@node Variable Index, Type Index, Function Index, Top +@unnumbered Variable Index + +@printindex vr + +@node Type Index, Concept Index, Variable Index, Top +@unnumbered Type Index + +@printindex tp + +@node Concept Index, , Type Index, Top +@unnumbered Concept Index + +@printindex cp + +@ifclear frontcontents +@comment Use @setchapternewpage odd to ensure that the contents starts +@comment on an odd page so that it can always be moved to the front when +@comment printing two-up. +@setchapternewpage odd +@contents +@end ifclear + +@ifset extrablankpages +@comment final page must be blank for printed version +@page +@headings off +@* +@page +@* +@comment @page +@comment @* +@comment @page +@comment @* +@end ifset +@bye diff --git a/software/gsl-1.15/doc/gsl.3 b/software/gsl-1.15/doc/gsl.3 new file mode 100644 index 000000000..1f82292a8 --- /dev/null +++ b/software/gsl-1.15/doc/gsl.3 @@ -0,0 +1,58 @@ +.TH GSL 3 "GNU Scientific Library" "GSL Team" \" -*- nroff -*- +.SH NAME +gsl - GNU Scientific Library +.SH SYNOPSIS +#include +.SH DESCRIPTION +The GNU Scientific Library (GSL) is a collection of routines for +numerical computing. The routines are written from scratch by the GSL +team in C, and present a modern Applications Programming Interface +(API) for C programmers, allowing wrappers to be written for very high +level languages. +.PP +The library covers the following areas, +.TP +.nf +.BR +Complex Numbers +Roots of Polynomials +Special Functions +Vectors and Matrices +Permutations +Combinations +Sorting +BLAS Support +Linear Algebra +Eigensystems +Fast Fourier Transforms +Quadrature +Random Numbers +Quasi-Random Sequences +Random Distributions +Statistics +Histograms +N-Tuples +Monte Carlo Integration +Simulated Annealing +Differential Equations +Interpolation +Numerical Differentiation +Chebyshev Approximations +Series Acceleration +Discrete Hankel Transforms +Root-Finding +Minimization +Least-Squares Fitting +Physical Constants +IEEE Floating-Point +.fi +.PP +For more information please consult the GSL Reference Manual, which is +available as an info file. You can read it online using the shell +command +.B info gsl-ref +(if the library is installed). +.PP +Please report any bugs to +.B bug-gsl@gnu.org. + diff --git a/software/gsl-1.15/doc/histogram.eps b/software/gsl-1.15/doc/histogram.eps new file mode 100644 index 000000000..93505f351 --- /dev/null +++ b/software/gsl-1.15/doc/histogram.eps @@ -0,0 +1,3088 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 1.6 +%%Title: PostScript plot +%%CreationDate: Sat Aug 18 20:49:32 2001 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 97 195 494 580 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/arrowWidth 4 def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eofill +} { +eoclip +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eofill +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 97 195 494 580 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Poly +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2304 2304 +2304 9216 +9216 9216 +9216 2304 +4 Poly +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 112.7699 213.1332 ] concat +%I +[ +(-100) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 204.2139 213.1332 ] concat +%I +[ +(-50) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 9216 +4032 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 300.956 213.1332 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 382.3119 213.1332 ] concat +%I +[ +(50) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 9216 +7488 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 463.6679 213.1332 ] concat +%I +[ +(100) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 9216 +2650 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2650 2304 +2650 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 9216 +2995 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2995 2304 +2995 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 9216 +3341 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3341 2304 +3341 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 9216 +4032 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4032 2304 +4032 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 9216 +4378 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4378 2304 +4378 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 9216 +4723 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4723 2304 +4723 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 9216 +5414 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5414 2304 +5414 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 9216 +6106 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6106 2304 +6106 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 9216 +6797 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6797 2304 +6797 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 9216 +7142 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7142 2304 +7142 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 9216 +7488 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7488 2304 +7488 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 9216 +8179 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8179 2304 +8179 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 9216 +8525 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8525 2304 +8525 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 9216 +8870 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8870 2304 +8870 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 34952 +1 0 0 [ 1 3 1 3 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 9216 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 229.3306 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 107.8399 278.702 ] concat +%I +[ +(20) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3291 +9078 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3291 +2442 3291 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 107.8399 328.0734 ] concat +%I +[ +(40) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4279 +9078 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4279 +2442 4279 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 107.8399 377.4449 ] concat +%I +[ +(60) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5266 +9078 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5266 +2442 5266 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 107.8399 426.8163 ] concat +%I +[ +(80) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6254 +9078 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6254 +2442 6254 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 97.75181 476.1877 ] concat +%I +[ +(100) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7241 +9078 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7241 +2442 7241 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 97.75181 525.5592 ] concat +%I +[ +(120) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8229 +9078 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8229 +2442 8229 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 97.75181 574.9306 ] concat +%I +[ +(140) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2798 +9161 2798 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2798 +2359 2798 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3291 +9161 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3291 +2359 3291 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3785 +9161 3785 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3785 +2359 3785 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4279 +9161 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4279 +2359 4279 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4773 +9161 4773 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4773 +2359 4773 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5266 +9161 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5266 +2359 5266 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6254 +9161 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6254 +2359 6254 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6747 +9161 6747 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6747 +2359 6747 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7241 +9161 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7241 +2359 7241 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7735 +9161 7735 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7735 +2359 7735 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8229 +9161 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8229 +2359 8229 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8722 +9161 8722 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8722 +2359 8722 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 400 +2304 2748 +2339 2748 +2339 2501 +2373 2501 +2373 2896 +2408 2896 +2408 2896 +2442 2896 +2442 2896 +2477 2896 +2477 2650 +2511 2650 +2511 2650 +2546 2650 +2546 2896 +2580 2896 +2580 2896 +2615 2896 +2615 2650 +2650 2650 +2650 2551 +2684 2551 +2684 2847 +2719 2847 +2719 2650 +2753 2650 +2753 2847 +2788 2847 +2788 2995 +2822 2995 +2822 2896 +2857 2896 +2857 3291 +2892 3291 +2892 2650 +2926 2650 +2926 3291 +2961 3291 +2961 3094 +2995 3094 +2995 2798 +3030 2798 +3030 3045 +3064 3045 +3064 2896 +3099 2896 +3099 2847 +3133 2847 +3133 3143 +3168 3143 +3168 3193 +3203 3193 +3203 2748 +3237 2748 +3237 3193 +3272 3193 +3272 2896 +3306 2896 +3306 3390 +3341 3390 +3341 2995 +3375 2995 +3375 3143 +3410 3143 +3410 3242 +3444 3242 +3444 3440 +3479 3440 +3479 3291 +3514 3291 +3514 2995 +3548 2995 +3548 2748 +3583 2748 +3583 3193 +3617 3193 +3617 3094 +3652 3094 +3652 3291 +3686 3291 +3686 3143 +3721 3143 +3721 3785 +3756 3785 +3756 3341 +3790 3341 +3790 3637 +3825 3637 +3825 3983 +3859 3983 +3859 3440 +3894 3440 +3894 3538 +3928 3538 +3928 3538 +3963 3538 +3963 3736 +3997 3736 +3997 3588 +4032 3588 +4032 3538 +4067 3538 +4067 3390 +4101 3390 +4101 4279 +4136 4279 +4136 3686 +4170 3686 +4170 4476 +4205 4476 +4205 4032 +4239 4032 +4239 4328 +4274 4328 +4274 4081 +4308 4081 +4308 4773 +4343 4773 +4343 5168 +4378 5168 +4378 4032 +4412 4032 +4412 4229 +4447 4229 +4447 4476 +4481 4476 +4481 4921 +4516 4921 +4516 4180 +4550 4180 +4550 4378 +4585 4378 +4585 4871 +4620 4871 +4620 4921 +4654 4921 +4654 4180 +4689 4180 +4689 4526 +4723 4526 +4723 5464 +4758 5464 +4758 5711 +4792 5711 +4792 5563 +4827 5563 +4827 5316 +4861 5316 +4861 5217 +4896 5217 +4896 5908 +4931 5908 +4931 4921 +4965 4921 +4965 6106 +5000 6106 +5000 5612 +5034 5612 +5034 6056 +5069 6056 +5069 5908 +5103 5908 +5103 6204 +5138 6204 +5138 6698 +5172 6698 +5172 6994 +5207 6994 +5207 7044 +5242 7044 +5242 6994 +5276 6994 +5276 6599 +5311 6599 +5311 6846 +5345 6846 +5345 7093 +5380 7093 +5380 7636 +5414 7636 +5414 6056 +5449 6056 +5449 7340 +5484 7340 +5484 6994 +5518 6994 +5518 7439 +5553 7439 +5553 7241 +5587 7241 +5587 7192 +5622 7192 +5622 7932 +5656 7932 +5656 7389 +5691 7389 +5691 7192 +5725 7192 +5725 7340 +5760 7340 +5760 6550 +5795 6550 +5795 8278 +5829 8278 +5829 6994 +5864 6994 +5864 7291 +5898 7291 +5898 7636 +5933 7636 +5933 7241 +5967 7241 +5967 6945 +6002 6945 +6002 7537 +6036 7537 +6036 7587 +6071 7587 +6071 7241 +6106 7241 +6106 6599 +6140 6599 +6140 7587 +6175 7587 +6175 7932 +6209 7932 +6209 5859 +6244 5859 +6244 7340 +6278 7340 +6278 5661 +6313 5661 +6313 6352 +6348 6352 +6348 6303 +6382 6303 +6382 6254 +6417 6254 +6417 5957 +6451 5957 +6451 6106 +6486 6106 +6486 5414 +6520 5414 +6520 4773 +6555 4773 +6555 5019 +6589 5019 +6589 5563 +6624 5563 +6624 5661 +6659 5661 +6659 4822 +6693 4822 +6693 5266 +6728 5266 +6728 5266 +6762 5266 +6762 5069 +6797 5069 +6797 5168 +6831 5168 +6831 4229 +6866 4229 +6866 4526 +6900 4526 +6900 4674 +6935 4674 +6935 4921 +6970 4921 +6970 3835 +7004 3835 +7004 4229 +7039 4229 +7039 3983 +7073 3983 +7073 3835 +7108 3835 +7108 4279 +7142 4279 +7142 4229 +7177 4229 +7177 3884 +7212 3884 +7212 4427 +7246 4427 +7246 3637 +7281 3637 +7281 3983 +7315 3983 +7315 3637 +7350 3637 +7350 3686 +7384 3686 +7384 3884 +7419 3884 +7419 3538 +7453 3538 +7453 3637 +7488 3637 +7488 3785 +7523 3785 +7523 3291 +7557 3291 +7557 3835 +7592 3835 +7592 3045 +7626 3045 +7626 3390 +7661 3390 +7661 3736 +7695 3736 +7695 3785 +7730 3785 +7730 3440 +7764 3440 +7764 2946 +7799 2946 +7799 3094 +7834 3094 +7834 3045 +7868 3045 +7868 3094 +7903 3094 +7903 3686 +7937 3686 +7937 3242 +7972 3242 +7972 3686 +8006 3686 +8006 3242 +8041 3242 +8041 3637 +8076 3637 +8076 3242 +8110 3242 +8110 3143 +8145 3143 +8145 3143 +8179 3143 +8179 3291 +8214 3291 +8214 3094 +8248 3094 +8248 3045 +8283 3045 +8283 2896 +8317 2896 +8317 2748 +8352 2748 +8352 3440 +8387 3440 +8387 3045 +8421 3045 +8421 2798 +8456 2798 +8456 3143 +8490 3143 +8490 2798 +8525 2798 +8525 3045 +8559 3045 +8559 2551 +8594 2551 +8594 2798 +8628 2798 +8628 2995 +8663 2995 +8663 2946 +8698 2946 +8698 2699 +8732 2699 +8732 3045 +8767 3045 +8767 3094 +8801 3094 +8801 2650 +8836 2650 +8836 2798 +8870 2798 +8870 3045 +8905 3045 +8905 3045 +8940 3045 +8940 2798 +8974 2798 +8974 2748 +9009 2748 +9009 2798 +9043 2798 +9043 2650 +9078 2650 +9078 2650 +9112 2650 +9112 2995 +9147 2995 +9147 2847 +9181 2847 +9181 2748 +9216 2748 +400 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/histogram.texi b/software/gsl-1.15/doc/histogram.texi new file mode 100644 index 000000000..37f4f3ebc --- /dev/null +++ b/software/gsl-1.15/doc/histogram.texi @@ -0,0 +1,1173 @@ +@cindex histograms +@cindex binning data +This chapter describes functions for creating histograms. Histograms +provide a convenient way of summarizing the distribution of a set of +data. A histogram consists of a set of @dfn{bins} which count the number +of events falling into a given range of a continuous variable @math{x}. +In GSL the bins of a histogram contain floating-point numbers, so they +can be used to record both integer and non-integer distributions. The +bins can use arbitrary sets of ranges (uniformly spaced bins are the +default). Both one and two-dimensional histograms are supported. + +Once a histogram has been created it can also be converted into a +probability distribution function. The library provides efficient +routines for selecting random samples from probability distributions. +This can be useful for generating simulations based on real data. + +The functions are declared in the header files @file{gsl_histogram.h} +and @file{gsl_histogram2d.h}. + +@menu +* The histogram struct:: +* Histogram allocation:: +* Copying Histograms:: +* Updating and accessing histogram elements:: +* Searching histogram ranges:: +* Histogram Statistics:: +* Histogram Operations:: +* Reading and writing histograms:: +* Resampling from histograms:: +* The histogram probability distribution struct:: +* Example programs for histograms:: +* Two dimensional histograms:: +* The 2D histogram struct:: +* 2D Histogram allocation:: +* Copying 2D Histograms:: +* Updating and accessing 2D histogram elements:: +* Searching 2D histogram ranges:: +* 2D Histogram Statistics:: +* 2D Histogram Operations:: +* Reading and writing 2D histograms:: +* Resampling from 2D histograms:: +* Example programs for 2D histograms:: +@end menu + +@node The histogram struct +@section The histogram struct + +A histogram is defined by the following struct, + +@deftp {Data Type} {gsl_histogram} +@table @code +@item size_t n +This is the number of histogram bins +@item double * range +The ranges of the bins are stored in an array of @math{@var{n}+1} elements +pointed to by @var{range}. +@item double * bin +The counts for each bin are stored in an array of @var{n} elements +pointed to by @var{bin}. The bins are floating-point numbers, so you can +increment them by non-integer values if necessary. +@end table +@end deftp +@comment + +@noindent +The range for @var{bin}[i] is given by @var{range}[i] to +@var{range}[i+1]. For @math{n} bins there are @math{n+1} entries in the +array @var{range}. Each bin is inclusive at the lower end and exclusive +at the upper end. Mathematically this means that the bins are defined by +the following inequality, +@tex +\beforedisplay +$$ +\hbox{bin[i] corresponds to range[i]} \le x < \hbox{range[i+1]} +$$ +\afterdisplay +@end tex +@ifinfo +@display +bin[i] corresponds to range[i] <= x < range[i+1] +@end display + +@end ifinfo +@noindent +Here is a diagram of the correspondence between ranges and bins on the +number-line for @math{x}, + +@smallexample + + [ bin[0] )[ bin[1] )[ bin[2] )[ bin[3] )[ bin[4] ) + ---|---------|---------|---------|---------|---------|--- x + r[0] r[1] r[2] r[3] r[4] r[5] + +@end smallexample + +@noindent +In this picture the values of the @var{range} array are denoted by +@math{r}. On the left-hand side of each bin the square bracket +@samp{[} denotes an inclusive lower bound +(@c{$r \le x$} +@math{r <= x}), and the round parentheses @samp{)} on the right-hand +side denote an exclusive upper bound (@math{x < r}). Thus any samples +which fall on the upper end of the histogram are excluded. If you want +to include this value for the last bin you will need to add an extra bin +to your histogram. + +The @code{gsl_histogram} struct and its associated functions are defined +in the header file @file{gsl_histogram.h}. + +@node Histogram allocation +@section Histogram allocation +The functions for allocating memory to a histogram follow the style of +@code{malloc} and @code{free}. In addition they also perform their own +error checking. If there is insufficient memory available to allocate a +histogram then the functions call the error handler (with an error +number of @code{GSL_ENOMEM}) in addition to returning a null pointer. +Thus if you use the library error handler to abort your program then it +isn't necessary to check every histogram @code{alloc}. + +@deftypefun {gsl_histogram *} gsl_histogram_alloc (size_t @var{n}) +This function allocates memory for a histogram with @var{n} bins, and +returns a pointer to a newly created @code{gsl_histogram} struct. If +insufficient memory is available a null pointer is returned and the +error handler is invoked with an error code of @code{GSL_ENOMEM}. The +bins and ranges are not initialized, and should be prepared using one of +the range-setting functions below in order to make the histogram ready +for use. +@end deftypefun + +@comment @deftypefun {gsl_histogram *} gsl_histogram_calloc (size_t @var{n}) +@comment This function allocates memory for a histogram with @var{n} bins, and +@comment returns a pointer to its newly initialized @code{gsl_histogram} struct. +@comment The bins are uniformly spaced with a total range of +@comment @c{$0 \le x < n$} +@comment @math{0 <= x < n}, +@comment as shown in the table below. + +@comment @tex +@comment \beforedisplay +@comment $$ +@comment \matrix{ +@comment \hbox{bin[0]}&\hbox{corresponds to}& 0 \le x < 1\cr +@comment \hbox{bin[1]}&\hbox{corresponds to}& 1 \le x < 2\cr +@comment \dots&\dots&\dots\cr +@comment \hbox{bin[n-1]}&\hbox{corresponds to}&n-1 \le x < n} +@comment $$ +@comment \afterdisplay +@comment @end tex +@comment @ifinfo +@comment @display +@comment bin[0] corresponds to 0 <= x < 1 +@comment bin[1] corresponds to 1 <= x < 2 +@comment @dots{} +@comment bin[n-1] corresponds to n-1 <= x < n +@comment @end display +@comment @end ifinfo +@comment @noindent +@comment The bins are initialized to zero so the histogram is ready for use. + +@comment If insufficient memory is available a null pointer is returned and the +@comment error handler is invoked with an error code of @code{GSL_ENOMEM}. +@comment @end deftypefun + +@comment @deftypefun {gsl_histogram *} gsl_histogram_calloc_uniform (size_t @var{n}, double @var{xmin}, double @var{xmax}) +@comment This function allocates memory for a histogram with @var{n} uniformly +@comment spaced bins from @var{xmin} to @var{xmax}, and returns a pointer to the +@comment newly initialized @code{gsl_histogram} struct. +@comment If insufficient memory is available a null pointer is returned and the +@comment error handler is invoked with an error code of @code{GSL_ENOMEM}. +@comment @end deftypefun + +@comment @deftypefun {gsl_histogram *} gsl_histogram_calloc_range (size_t @var{n}, double * @var{range}) +@comment This function allocates a histogram of size @var{n} using the @math{n+1} +@comment bin ranges specified by the array @var{range}. +@comment @end deftypefun + +@deftypefun int gsl_histogram_set_ranges (gsl_histogram * @var{h}, const double @var{range}[], size_t @var{size}) +This function sets the ranges of the existing histogram @var{h} using +the array @var{range} of size @var{size}. The values of the histogram +bins are reset to zero. The @code{range} array should contain the +desired bin limits. The ranges can be arbitrary, subject to the +restriction that they are monotonically increasing. + +The following example shows how to create a histogram with logarithmic +bins with ranges [1,10), [10,100) and [100,1000). + +@example +gsl_histogram * h = gsl_histogram_alloc (3); + +/* bin[0] covers the range 1 <= x < 10 */ +/* bin[1] covers the range 10 <= x < 100 */ +/* bin[2] covers the range 100 <= x < 1000 */ + +double range[4] = @{ 1.0, 10.0, 100.0, 1000.0 @}; + +gsl_histogram_set_ranges (h, range, 4); +@end example + +@noindent +Note that the size of the @var{range} array should be defined to be one +element bigger than the number of bins. The additional element is +required for the upper value of the final bin. +@end deftypefun + +@deftypefun int gsl_histogram_set_ranges_uniform (gsl_histogram * @var{h}, double @var{xmin}, double @var{xmax}) +This function sets the ranges of the existing histogram @var{h} to cover +the range @var{xmin} to @var{xmax} uniformly. The values of the +histogram bins are reset to zero. The bin ranges are shown in the table +below, +@tex +\beforedisplay +$$ +\matrix{\hbox{bin[0]}&\hbox{corresponds to}& xmin \le x < xmin + d\cr +\hbox{bin[1]} &\hbox{corresponds to}& xmin + d \le x < xmin + 2 d\cr +\dots&\dots&\dots\cr +\hbox{bin[n-1]} & \hbox{corresponds to}& xmin + (n-1)d \le x < xmax} +$$ +\afterdisplay +@end tex +@ifinfo +@display +bin[0] corresponds to xmin <= x < xmin + d +bin[1] corresponds to xmin + d <= x < xmin + 2 d +...... +bin[n-1] corresponds to xmin + (n-1)d <= x < xmax +@end display + +@end ifinfo +@noindent +where @math{d} is the bin spacing, @math{d = (xmax-xmin)/n}. +@end deftypefun + +@deftypefun void gsl_histogram_free (gsl_histogram * @var{h}) +This function frees the histogram @var{h} and all of the memory +associated with it. +@end deftypefun + +@node Copying Histograms +@section Copying Histograms + +@deftypefun int gsl_histogram_memcpy (gsl_histogram * @var{dest}, const gsl_histogram * @var{src}) +This function copies the histogram @var{src} into the pre-existing +histogram @var{dest}, making @var{dest} into an exact copy of @var{src}. +The two histograms must be of the same size. +@end deftypefun + +@deftypefun {gsl_histogram *} gsl_histogram_clone (const gsl_histogram * @var{src}) +This function returns a pointer to a newly created histogram which is an +exact copy of the histogram @var{src}. +@end deftypefun + +@node Updating and accessing histogram elements +@section Updating and accessing histogram elements + +There are two ways to access histogram bins, either by specifying an +@math{x} coordinate or by using the bin-index directly. The functions +for accessing the histogram through @math{x} coordinates use a binary +search to identify the bin which covers the appropriate range. + +@deftypefun int gsl_histogram_increment (gsl_histogram * @var{h}, double @var{x}) +This function updates the histogram @var{h} by adding one (1.0) to the +bin whose range contains the coordinate @var{x}. + +If @var{x} lies in the valid range of the histogram then the function +returns zero to indicate success. If @var{x} is less than the lower +limit of the histogram then the function returns @code{GSL_EDOM}, and +none of bins are modified. Similarly, if the value of @var{x} is greater +than or equal to the upper limit of the histogram then the function +returns @code{GSL_EDOM}, and none of the bins are modified. The error +handler is not called, however, since it is often necessary to compute +histograms for a small range of a larger dataset, ignoring the values +outside the range of interest. +@end deftypefun + +@deftypefun int gsl_histogram_accumulate (gsl_histogram * @var{h}, double @var{x}, double @var{weight}) +This function is similar to @code{gsl_histogram_increment} but increases +the value of the appropriate bin in the histogram @var{h} by the +floating-point number @var{weight}. +@end deftypefun + +@deftypefun double gsl_histogram_get (const gsl_histogram * @var{h}, size_t @var{i}) +This function returns the contents of the @var{i}-th bin of the histogram +@var{h}. If @var{i} lies outside the valid range of indices for the +histogram then the error handler is called with an error code of +@code{GSL_EDOM} and the function returns 0. +@end deftypefun + +@deftypefun int gsl_histogram_get_range (const gsl_histogram * @var{h}, size_t @var{i}, double * @var{lower}, double * @var{upper}) +This function finds the upper and lower range limits of the @var{i}-th +bin of the histogram @var{h}. If the index @var{i} is valid then the +corresponding range limits are stored in @var{lower} and @var{upper}. +The lower limit is inclusive (i.e. events with this coordinate are +included in the bin) and the upper limit is exclusive (i.e. events with +the coordinate of the upper limit are excluded and fall in the +neighboring higher bin, if it exists). The function returns 0 to +indicate success. If @var{i} lies outside the valid range of indices for +the histogram then the error handler is called and the function returns +an error code of @code{GSL_EDOM}. +@end deftypefun + +@deftypefun double gsl_histogram_max (const gsl_histogram * @var{h}) +@deftypefunx double gsl_histogram_min (const gsl_histogram * @var{h}) +@deftypefunx size_t gsl_histogram_bins (const gsl_histogram * @var{h}) +These functions return the maximum upper and minimum lower range limits +and the number of bins of the histogram @var{h}. They provide a way of +determining these values without accessing the @code{gsl_histogram} +struct directly. +@end deftypefun + +@deftypefun void gsl_histogram_reset (gsl_histogram * @var{h}) +This function resets all the bins in the histogram @var{h} to zero. +@end deftypefun + +@node Searching histogram ranges +@section Searching histogram ranges + +The following functions are used by the access and update routines to +locate the bin which corresponds to a given @math{x} coordinate. + +@deftypefun int gsl_histogram_find (const gsl_histogram * @var{h}, double @var{x}, size_t * @var{i}) +This function finds and sets the index @var{i} to the bin number which +covers the coordinate @var{x} in the histogram @var{h}. The bin is +located using a binary search. The search includes an optimization for +histograms with uniform range, and will return the correct bin +immediately in this case. If @var{x} is found in the range of the +histogram then the function sets the index @var{i} and returns +@code{GSL_SUCCESS}. If @var{x} lies outside the valid range of the +histogram then the function returns @code{GSL_EDOM} and the error +handler is invoked. +@end deftypefun + +@node Histogram Statistics +@section Histogram Statistics +@cindex histogram statistics +@cindex statistics, from histogram +@cindex maximum value, from histogram +@cindex minimum value, from histogram +@deftypefun double gsl_histogram_max_val (const gsl_histogram * @var{h}) +This function returns the maximum value contained in the histogram bins. +@end deftypefun + +@deftypefun size_t gsl_histogram_max_bin (const gsl_histogram * @var{h}) +This function returns the index of the bin containing the maximum +value. In the case where several bins contain the same maximum value the +smallest index is returned. +@end deftypefun + +@deftypefun double gsl_histogram_min_val (const gsl_histogram * @var{h}) +This function returns the minimum value contained in the histogram bins. +@end deftypefun + +@deftypefun size_t gsl_histogram_min_bin (const gsl_histogram * @var{h}) +This function returns the index of the bin containing the minimum +value. In the case where several bins contain the same maximum value the +smallest index is returned. +@end deftypefun + +@cindex mean value, from histogram +@deftypefun double gsl_histogram_mean (const gsl_histogram * @var{h}) +This function returns the mean of the histogrammed variable, where the +histogram is regarded as a probability distribution. Negative bin values +are ignored for the purposes of this calculation. The accuracy of the +result is limited by the bin width. +@end deftypefun + +@cindex standard deviation, from histogram +@cindex variance, from histogram +@deftypefun double gsl_histogram_sigma (const gsl_histogram * @var{h}) +This function returns the standard deviation of the histogrammed +variable, where the histogram is regarded as a probability +distribution. Negative bin values are ignored for the purposes of this +calculation. The accuracy of the result is limited by the bin width. +@end deftypefun + +@deftypefun double gsl_histogram_sum (const gsl_histogram * @var{h}) +This function returns the sum of all bin values. Negative bin values +are included in the sum. +@end deftypefun + +@node Histogram Operations +@section Histogram Operations + +@deftypefun int gsl_histogram_equal_bins_p (const gsl_histogram * @var{h1}, const gsl_histogram * @var{h2}) +This function returns 1 if the all of the individual bin +ranges of the two histograms are identical, and 0 +otherwise. +@end deftypefun + +@deftypefun int gsl_histogram_add (gsl_histogram * @var{h1}, const gsl_histogram * @var{h2}) +This function adds the contents of the bins in histogram @var{h2} to the +corresponding bins of histogram @var{h1}, i.e. @math{h'_1(i) = h_1(i) + +h_2(i)}. The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram_sub (gsl_histogram * @var{h1}, const gsl_histogram * @var{h2}) +This function subtracts the contents of the bins in histogram @var{h2} +from the corresponding bins of histogram @var{h1}, i.e. @math{h'_1(i) = +h_1(i) - h_2(i)}. The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram_mul (gsl_histogram * @var{h1}, const gsl_histogram * @var{h2}) +This function multiplies the contents of the bins of histogram @var{h1} +by the contents of the corresponding bins in histogram @var{h2}, +i.e. @math{h'_1(i) = h_1(i) * h_2(i)}. The two histograms must have +identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram_div (gsl_histogram * @var{h1}, const gsl_histogram * @var{h2}) +This function divides the contents of the bins of histogram @var{h1} by +the contents of the corresponding bins in histogram @var{h2}, +i.e. @math{h'_1(i) = h_1(i) / h_2(i)}. The two histograms must have +identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram_scale (gsl_histogram * @var{h}, double @var{scale}) +This function multiplies the contents of the bins of histogram @var{h} +by the constant @var{scale}, i.e. @c{$h'_1(i) = h_1(i) * \hbox{\it scale}$} +@math{h'_1(i) = h_1(i) * scale}. +@end deftypefun + +@deftypefun int gsl_histogram_shift (gsl_histogram * @var{h}, double @var{offset}) +This function shifts the contents of the bins of histogram @var{h} by +the constant @var{offset}, i.e. @c{$h'_1(i) = h_1(i) + \hbox{\it offset}$} +@math{h'_1(i) = h_1(i) + offset}. +@end deftypefun + +@node Reading and writing histograms +@section Reading and writing histograms + +The library provides functions for reading and writing histograms to a file +as binary data or formatted text. + +@deftypefun int gsl_histogram_fwrite (FILE * @var{stream}, const gsl_histogram * @var{h}) +This function writes the ranges and bins of the histogram @var{h} to the +stream @var{stream} in binary format. The return value is 0 for success +and @code{GSL_EFAILED} if there was a problem writing to the file. Since +the data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_histogram_fread (FILE * @var{stream}, gsl_histogram * @var{h}) +This function reads into the histogram @var{h} from the open stream +@var{stream} in binary format. The histogram @var{h} must be +preallocated with the correct size since the function uses the number of +bins in @var{h} to determine how many bytes to read. The return value is +0 for success and @code{GSL_EFAILED} if there was a problem reading from +the file. The data is assumed to have been written in the native binary +format on the same architecture. +@end deftypefun + +@deftypefun int gsl_histogram_fprintf (FILE * @var{stream}, const gsl_histogram * @var{h}, const char * @var{range_format}, const char * @var{bin_format}) +This function writes the ranges and bins of the histogram @var{h} +line-by-line to the stream @var{stream} using the format specifiers +@var{range_format} and @var{bin_format}. These should be one of the +@code{%g}, @code{%e} or @code{%f} formats for floating point +numbers. The function returns 0 for success and @code{GSL_EFAILED} if +there was a problem writing to the file. The histogram output is +formatted in three columns, and the columns are separated by spaces, +like this, + +@example +range[0] range[1] bin[0] +range[1] range[2] bin[1] +range[2] range[3] bin[2] +.... +range[n-1] range[n] bin[n-1] +@end example + +@noindent +The values of the ranges are formatted using @var{range_format} and the +value of the bins are formatted using @var{bin_format}. Each line +contains the lower and upper limit of the range of the bins and the +value of the bin itself. Since the upper limit of one bin is the lower +limit of the next there is duplication of these values between lines but +this allows the histogram to be manipulated with line-oriented tools. +@end deftypefun + +@deftypefun int gsl_histogram_fscanf (FILE * @var{stream}, gsl_histogram * @var{h}) +This function reads formatted data from the stream @var{stream} into the +histogram @var{h}. The data is assumed to be in the three-column format +used by @code{gsl_histogram_fprintf}. The histogram @var{h} must be +preallocated with the correct length since the function uses the size of +@var{h} to determine how many numbers to read. The function returns 0 +for success and @code{GSL_EFAILED} if there was a problem reading from +the file. +@end deftypefun + +@node Resampling from histograms +@section Resampling from histograms +@cindex resampling from histograms +@cindex sampling from histograms +@cindex probability distributions, from histograms + +A histogram made by counting events can be regarded as a measurement of +a probability distribution. Allowing for statistical error, the height +of each bin represents the probability of an event where the value of +@math{x} falls in the range of that bin. The probability distribution +function has the one-dimensional form @math{p(x)dx} where, +@tex +\beforedisplay +$$ +p(x) = n_i/ (N w_i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) = n_i/ (N w_i) +@end example + +@end ifinfo +@noindent +In this equation @math{n_i} is the number of events in the bin which +contains @math{x}, @math{w_i} is the width of the bin and @math{N} is +the total number of events. The distribution of events within each bin +is assumed to be uniform. + +@node The histogram probability distribution struct +@section The histogram probability distribution struct +@cindex probability distribution, from histogram +@cindex sampling from histograms +@cindex random sampling from histograms +@cindex histograms, random sampling from +The probability distribution function for a histogram consists of a set +of @dfn{bins} which measure the probability of an event falling into a +given range of a continuous variable @math{x}. A probability +distribution function is defined by the following struct, which actually +stores the cumulative probability distribution function. This is the +natural quantity for generating samples via the inverse transform +method, because there is a one-to-one mapping between the cumulative +probability distribution and the range [0,1]. It can be shown that by +taking a uniform random number in this range and finding its +corresponding coordinate in the cumulative probability distribution we +obtain samples with the desired probability distribution. + +@deftp {Data Type} {gsl_histogram_pdf} +@table @code +@item size_t n +This is the number of bins used to approximate the probability +distribution function. +@item double * range +The ranges of the bins are stored in an array of @math{@var{n}+1} elements +pointed to by @var{range}. +@item double * sum +The cumulative probability for the bins is stored in an array of +@var{n} elements pointed to by @var{sum}. +@end table +@end deftp +@comment + +@noindent +The following functions allow you to create a @code{gsl_histogram_pdf} +struct which represents this probability distribution and generate +random samples from it. + +@deftypefun {gsl_histogram_pdf *} gsl_histogram_pdf_alloc (size_t @var{n}) +This function allocates memory for a probability distribution with +@var{n} bins and returns a pointer to a newly initialized +@code{gsl_histogram_pdf} struct. If insufficient memory is available a +null pointer is returned and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_histogram_pdf_init (gsl_histogram_pdf * @var{p}, const gsl_histogram * @var{h}) +This function initializes the probability distribution @var{p} with +the contents of the histogram @var{h}. If any of the bins of @var{h} are +negative then the error handler is invoked with an error code of +@code{GSL_EDOM} because a probability distribution cannot contain +negative values. +@end deftypefun + +@deftypefun void gsl_histogram_pdf_free (gsl_histogram_pdf * @var{p}) +This function frees the probability distribution function @var{p} and +all of the memory associated with it. +@end deftypefun + +@deftypefun double gsl_histogram_pdf_sample (const gsl_histogram_pdf * @var{p}, double @var{r}) +This function uses @var{r}, a uniform random number between zero and +one, to compute a single random sample from the probability distribution +@var{p}. The algorithm used to compute the sample @math{s} is given by +the following formula, +@tex +\beforedisplay +$$ +s = \hbox{range}[i] + \delta * (\hbox{range}[i+1] - \hbox{range}[i]) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +s = range[i] + delta * (range[i+1] - range[i]) +@end example + +@end ifinfo +@noindent +where @math{i} is the index which satisfies +@c{$sum[i] \le r < sum[i+1]$} +@math{sum[i] <= r < sum[i+1]} and +@math{delta} is +@c{$(r - sum[i])/(sum[i+1] - sum[i])$} +@math{(r - sum[i])/(sum[i+1] - sum[i])}. +@end deftypefun + +@node Example programs for histograms +@section Example programs for histograms + +The following program shows how to make a simple histogram of a column +of numerical data supplied on @code{stdin}. The program takes three +arguments, specifying the upper and lower bounds of the histogram and +the number of bins. It then reads numbers from @code{stdin}, one line at +a time, and adds them to the histogram. When there is no more data to +read it prints out the accumulated histogram using +@code{gsl_histogram_fprintf}. + +@example +@verbatiminclude examples/histogram.c +@end example + +@noindent +Here is an example of the program in use. We generate 10000 random +samples from a Cauchy distribution with a width of 30 and histogram +them over the range -100 to 100, using 200 bins. + +@example +$ gsl-randist 0 10000 cauchy 30 + | gsl-histogram -100 100 200 > histogram.dat +@end example + +@noindent +A plot of the resulting histogram shows the familiar shape of the +Cauchy distribution and the fluctuations caused by the finite sample +size. + +@example +$ awk '@{print $1, $3 ; print $2, $3@}' histogram.dat + | graph -T X +@end example + +@iftex +@sp 1 +@center @image{histogram,3.0in,2.8in} +@end iftex + +@node Two dimensional histograms +@section Two dimensional histograms +@cindex two dimensional histograms +@cindex 2D histograms + +A two dimensional histogram consists of a set of @dfn{bins} which count +the number of events falling in a given area of the @math{(x,y)} +plane. The simplest way to use a two dimensional histogram is to record +two-dimensional position information, @math{n(x,y)}. Another possibility +is to form a @dfn{joint distribution} by recording related +variables. For example a detector might record both the position of an +event (@math{x}) and the amount of energy it deposited @math{E}. These +could be histogrammed as the joint distribution @math{n(x,E)}. + +@node The 2D histogram struct +@section The 2D histogram struct + +Two dimensional histograms are defined by the following struct, + +@deftp {Data Type} {gsl_histogram2d} +@table @code +@item size_t nx, ny +This is the number of histogram bins in the x and y directions. +@item double * xrange +The ranges of the bins in the x-direction are stored in an array of +@math{@var{nx} + 1} elements pointed to by @var{xrange}. +@item double * yrange +The ranges of the bins in the y-direction are stored in an array of +@math{@var{ny} + 1} elements pointed to by @var{yrange}. +@item double * bin +The counts for each bin are stored in an array pointed to by @var{bin}. +The bins are floating-point numbers, so you can increment them by +non-integer values if necessary. The array @var{bin} stores the two +dimensional array of bins in a single block of memory according to the +mapping @code{bin(i,j)} = @code{bin[i * ny + j]}. +@end table +@end deftp +@comment + +@noindent +The range for @code{bin(i,j)} is given by @code{xrange[i]} to +@code{xrange[i+1]} in the x-direction and @code{yrange[j]} to +@code{yrange[j+1]} in the y-direction. Each bin is inclusive at the lower +end and exclusive at the upper end. Mathematically this means that the +bins are defined by the following inequality, +@tex +\beforedisplay +$$ +\matrix{ +\hbox{bin(i,j) corresponds to} & + \hbox{\it xrange}[i] \le x < \hbox{\it xrange}[i+1] \cr + \hbox{and} & \hbox{\it yrange}[j] \le y < \hbox{\it yrange}[j+1]} +$$ +\afterdisplay +@end tex +@ifinfo +@display +bin(i,j) corresponds to xrange[i] <= x < xrange[i+1] + and yrange[j] <= y < yrange[j+1] +@end display + +@end ifinfo +@noindent +Note that any samples which fall on the upper sides of the histogram are +excluded. If you want to include these values for the side bins you will +need to add an extra row or column to your histogram. + +The @code{gsl_histogram2d} struct and its associated functions are +defined in the header file @file{gsl_histogram2d.h}. + +@node 2D Histogram allocation +@section 2D Histogram allocation + +The functions for allocating memory to a 2D histogram follow the style +of @code{malloc} and @code{free}. In addition they also perform their +own error checking. If there is insufficient memory available to +allocate a histogram then the functions call the error handler (with +an error number of @code{GSL_ENOMEM}) in addition to returning a null +pointer. Thus if you use the library error handler to abort your program +then it isn't necessary to check every 2D histogram @code{alloc}. + +@deftypefun {gsl_histogram2d *} gsl_histogram2d_alloc (size_t @var{nx}, size_t @var{ny}) +This function allocates memory for a two-dimensional histogram with +@var{nx} bins in the x direction and @var{ny} bins in the y direction. +The function returns a pointer to a newly created @code{gsl_histogram2d} +struct. If insufficient memory is available a null pointer is returned +and the error handler is invoked with an error code of +@code{GSL_ENOMEM}. The bins and ranges must be initialized with one of +the functions below before the histogram is ready for use. +@end deftypefun + +@comment @deftypefun {gsl_histogram2d *} gsl_histogram2d_calloc (size_t @var{nx}, size_t @var{ny}) +@comment This function allocates memory for a two-dimensional histogram with +@comment @var{nx} bins in the x direction and @var{ny} bins in the y +@comment direction. The function returns a pointer to a newly initialized +@comment @code{gsl_histogram2d} struct. The bins are uniformly spaced with a +@comment total range of +@comment @c{$0 \le x < nx$} +@comment @math{0 <= x < nx} in the x-direction and +@comment @c{$0 \le y < ny$} +@comment @math{0 <= y < ny} in the y-direction, as shown in the table below. +@comment +@comment The bins are initialized to zero so the histogram is ready for use. +@comment +@comment If insufficient memory is available a null pointer is returned and the +@comment error handler is invoked with an error code of @code{GSL_ENOMEM}. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_histogram2d *} gsl_histogram2d_calloc_uniform (size_t @var{nx}, size_t @var{ny}, double @var{xmin}, double @var{xmax}, double @var{ymin}, double @var{ymax}) +@comment This function allocates a histogram of size @var{nx}-by-@var{ny} which +@comment uniformly covers the ranges @var{xmin} to @var{xmax} and @var{ymin} to +@comment @var{ymax} in the @math{x} and @math{y} directions respectively. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_histogram2d *} gsl_histogram2d_calloc_range (size_t @var{nx}, size_t @var{ny}, double * @var{xrange}, double * @var{yrange}) +@comment This function allocates a histogram of size @var{nx}-by-@var{ny} using +@comment the @math{nx+1} and @math{ny+1} bin ranges specified by the arrays +@comment @var{xrange} and @var{yrange}. +@comment @end deftypefun + +@deftypefun int gsl_histogram2d_set_ranges (gsl_histogram2d * @var{h}, const double @var{xrange}[], size_t @var{xsize}, const double @var{yrange}[], size_t @var{ysize}) +This function sets the ranges of the existing histogram @var{h} using +the arrays @var{xrange} and @var{yrange} of size @var{xsize} and +@var{ysize} respectively. The values of the histogram bins are reset to +zero. +@end deftypefun + +@deftypefun int gsl_histogram2d_set_ranges_uniform (gsl_histogram2d * @var{h}, double @var{xmin}, double @var{xmax}, double @var{ymin}, double @var{ymax}) +This function sets the ranges of the existing histogram @var{h} to cover +the ranges @var{xmin} to @var{xmax} and @var{ymin} to @var{ymax} +uniformly. The values of the histogram bins are reset to zero. +@end deftypefun + +@deftypefun void gsl_histogram2d_free (gsl_histogram2d * @var{h}) +This function frees the 2D histogram @var{h} and all of the memory +associated with it. +@end deftypefun + +@node Copying 2D Histograms +@section Copying 2D Histograms + +@deftypefun int gsl_histogram2d_memcpy (gsl_histogram2d * @var{dest}, const gsl_histogram2d * @var{src}) +This function copies the histogram @var{src} into the pre-existing +histogram @var{dest}, making @var{dest} into an exact copy of @var{src}. +The two histograms must be of the same size. +@end deftypefun + +@deftypefun {gsl_histogram2d *} gsl_histogram2d_clone (const gsl_histogram2d * @var{src}) +This function returns a pointer to a newly created histogram which is an +exact copy of the histogram @var{src}. +@end deftypefun + +@node Updating and accessing 2D histogram elements +@section Updating and accessing 2D histogram elements + +You can access the bins of a two-dimensional histogram either by +specifying a pair of @math{(x,y)} coordinates or by using the bin +indices @math{(i,j)} directly. The functions for accessing the histogram +through @math{(x,y)} coordinates use binary searches in the x and y +directions to identify the bin which covers the appropriate range. + +@deftypefun int gsl_histogram2d_increment (gsl_histogram2d * @var{h}, double @var{x}, double @var{y}) +This function updates the histogram @var{h} by adding one (1.0) to the +bin whose x and y ranges contain the coordinates (@var{x},@var{y}). + +If the point @math{(x,y)} lies inside the valid ranges of the +histogram then the function returns zero to indicate success. If +@math{(x,y)} lies outside the limits of the histogram then the +function returns @code{GSL_EDOM}, and none of the bins are modified. The +error handler is not called, since it is often necessary to compute +histograms for a small range of a larger dataset, ignoring any +coordinates outside the range of interest. +@end deftypefun + +@deftypefun int gsl_histogram2d_accumulate (gsl_histogram2d * @var{h}, double @var{x}, double @var{y}, double @var{weight}) +This function is similar to @code{gsl_histogram2d_increment} but increases +the value of the appropriate bin in the histogram @var{h} by the +floating-point number @var{weight}. +@end deftypefun + +@deftypefun double gsl_histogram2d_get (const gsl_histogram2d * @var{h}, size_t @var{i}, size_t @var{j}) +This function returns the contents of the (@var{i},@var{j})-th bin of the +histogram @var{h}. If (@var{i},@var{j}) lies outside the valid range of +indices for the histogram then the error handler is called with an error +code of @code{GSL_EDOM} and the function returns 0. +@end deftypefun + +@deftypefun int gsl_histogram2d_get_xrange (const gsl_histogram2d * @var{h}, size_t @var{i}, double * @var{xlower}, double * @var{xupper}) +@deftypefunx int gsl_histogram2d_get_yrange (const gsl_histogram2d * @var{h}, size_t @var{j}, double * @var{ylower}, double * @var{yupper}) +These functions find the upper and lower range limits of the @var{i}-th +and @var{j}-th bins in the x and y directions of the histogram @var{h}. +The range limits are stored in @var{xlower} and @var{xupper} or +@var{ylower} and @var{yupper}. The lower limits are inclusive +(i.e. events with these coordinates are included in the bin) and the +upper limits are exclusive (i.e. events with the value of the upper +limit are not included and fall in the neighboring higher bin, if it +exists). The functions return 0 to indicate success. If @var{i} or +@var{j} lies outside the valid range of indices for the histogram then +the error handler is called with an error code of @code{GSL_EDOM}. +@end deftypefun + +@deftypefun double gsl_histogram2d_xmax (const gsl_histogram2d * @var{h}) +@deftypefunx double gsl_histogram2d_xmin (const gsl_histogram2d * @var{h}) +@deftypefunx size_t gsl_histogram2d_nx (const gsl_histogram2d * @var{h}) +@deftypefunx double gsl_histogram2d_ymax (const gsl_histogram2d * @var{h}) +@deftypefunx double gsl_histogram2d_ymin (const gsl_histogram2d * @var{h}) +@deftypefunx size_t gsl_histogram2d_ny (const gsl_histogram2d * @var{h}) +These functions return the maximum upper and minimum lower range limits +and the number of bins for the x and y directions of the histogram +@var{h}. They provide a way of determining these values without +accessing the @code{gsl_histogram2d} struct directly. +@end deftypefun + +@deftypefun void gsl_histogram2d_reset (gsl_histogram2d * @var{h}) +This function resets all the bins of the histogram @var{h} to zero. +@end deftypefun + +@node Searching 2D histogram ranges +@section Searching 2D histogram ranges + +The following functions are used by the access and update routines to +locate the bin which corresponds to a given @math{(x,y)} coordinate. + +@deftypefun int gsl_histogram2d_find (const gsl_histogram2d * @var{h}, double @var{x}, double @var{y}, size_t * @var{i}, size_t * @var{j}) +This function finds and sets the indices @var{i} and @var{j} to the to +the bin which covers the coordinates (@var{x},@var{y}). The bin is +located using a binary search. The search includes an optimization for +histograms with uniform ranges, and will return the correct bin immediately +in this case. If @math{(x,y)} is found then the function sets the +indices (@var{i},@var{j}) and returns @code{GSL_SUCCESS}. If +@math{(x,y)} lies outside the valid range of the histogram then the +function returns @code{GSL_EDOM} and the error handler is invoked. +@end deftypefun + +@node 2D Histogram Statistics +@section 2D Histogram Statistics + +@deftypefun double gsl_histogram2d_max_val (const gsl_histogram2d * @var{h}) +This function returns the maximum value contained in the histogram bins. +@end deftypefun + +@deftypefun void gsl_histogram2d_max_bin (const gsl_histogram2d * @var{h}, size_t * @var{i}, size_t * @var{j}) +This function finds the indices of the bin containing the maximum value +in the histogram @var{h} and stores the result in (@var{i},@var{j}). In +the case where several bins contain the same maximum value the first bin +found is returned. +@end deftypefun + +@deftypefun double gsl_histogram2d_min_val (const gsl_histogram2d * @var{h}) +This function returns the minimum value contained in the histogram bins. +@end deftypefun + +@deftypefun void gsl_histogram2d_min_bin (const gsl_histogram2d * @var{h}, size_t * @var{i}, size_t * @var{j}) +This function finds the indices of the bin containing the minimum value +in the histogram @var{h} and stores the result in (@var{i},@var{j}). In +the case where several bins contain the same maximum value the first bin +found is returned. +@end deftypefun + +@deftypefun double gsl_histogram2d_xmean (const gsl_histogram2d * @var{h}) +This function returns the mean of the histogrammed x variable, where the +histogram is regarded as a probability distribution. Negative bin values +are ignored for the purposes of this calculation. +@end deftypefun + +@deftypefun double gsl_histogram2d_ymean (const gsl_histogram2d * @var{h}) +This function returns the mean of the histogrammed y variable, where the +histogram is regarded as a probability distribution. Negative bin values +are ignored for the purposes of this calculation. +@end deftypefun + +@deftypefun double gsl_histogram2d_xsigma (const gsl_histogram2d * @var{h}) +This function returns the standard deviation of the histogrammed +x variable, where the histogram is regarded as a probability +distribution. Negative bin values are ignored for the purposes of this +calculation. +@end deftypefun + +@deftypefun double gsl_histogram2d_ysigma (const gsl_histogram2d * @var{h}) +This function returns the standard deviation of the histogrammed +y variable, where the histogram is regarded as a probability +distribution. Negative bin values are ignored for the purposes of this +calculation. +@end deftypefun + +@deftypefun double gsl_histogram2d_cov (const gsl_histogram2d * @var{h}) +This function returns the covariance of the histogrammed x and y +variables, where the histogram is regarded as a probability +distribution. Negative bin values are ignored for the purposes of this +calculation. +@end deftypefun + +@deftypefun double gsl_histogram2d_sum (const gsl_histogram2d * @var{h}) +This function returns the sum of all bin values. Negative bin values +are included in the sum. +@end deftypefun + +@node 2D Histogram Operations +@section 2D Histogram Operations + +@deftypefun int gsl_histogram2d_equal_bins_p (const gsl_histogram2d * @var{h1}, const gsl_histogram2d * @var{h2}) +This function returns 1 if all the individual bin ranges of the two +histograms are identical, and 0 otherwise. +@end deftypefun + +@deftypefun int gsl_histogram2d_add (gsl_histogram2d * @var{h1}, const gsl_histogram2d * @var{h2}) +This function adds the contents of the bins in histogram @var{h2} to the +corresponding bins of histogram @var{h1}, +i.e. @math{h'_1(i,j) = h_1(i,j) + h_2(i,j)}. +The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram2d_sub (gsl_histogram2d * @var{h1}, const gsl_histogram2d * @var{h2}) +This function subtracts the contents of the bins in histogram @var{h2} from the +corresponding bins of histogram @var{h1}, +i.e. @math{h'_1(i,j) = h_1(i,j) - h_2(i,j)}. +The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram2d_mul (gsl_histogram2d * @var{h1}, const gsl_histogram2d * @var{h2}) +This function multiplies the contents of the bins of histogram @var{h1} +by the contents of the corresponding bins in histogram @var{h2}, +i.e. @math{h'_1(i,j) = h_1(i,j) * h_2(i,j)}. +The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram2d_div (gsl_histogram2d * @var{h1}, const gsl_histogram2d * @var{h2}) +This function divides the contents of the bins of histogram @var{h1} +by the contents of the corresponding bins in histogram @var{h2}, +i.e. @math{h'_1(i,j) = h_1(i,j) / h_2(i,j)}. +The two histograms must have identical bin ranges. +@end deftypefun + +@deftypefun int gsl_histogram2d_scale (gsl_histogram2d * @var{h}, double @var{scale}) +This function multiplies the contents of the bins of histogram @var{h} +by the constant @var{scale}, i.e. @c{$h'_1(i,j) = h_1(i,j) * \hbox{\it scale}$} +@math{h'_1(i,j) = h_1(i,j) scale}. +@end deftypefun + +@deftypefun int gsl_histogram2d_shift (gsl_histogram2d * @var{h}, double @var{offset}) +This function shifts the contents of the bins of histogram @var{h} +by the constant @var{offset}, i.e. @c{$h'_1(i,j) = h_1(i,j) + \hbox{\it offset}$} +@math{h'_1(i,j) = h_1(i,j) + offset}. +@end deftypefun + +@node Reading and writing 2D histograms +@section Reading and writing 2D histograms + +The library provides functions for reading and writing two dimensional +histograms to a file as binary data or formatted text. + +@deftypefun int gsl_histogram2d_fwrite (FILE * @var{stream}, const gsl_histogram2d * @var{h}) +This function writes the ranges and bins of the histogram @var{h} to the +stream @var{stream} in binary format. The return value is 0 for success +and @code{GSL_EFAILED} if there was a problem writing to the file. Since +the data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_histogram2d_fread (FILE * @var{stream}, gsl_histogram2d * @var{h}) +This function reads into the histogram @var{h} from the stream +@var{stream} in binary format. The histogram @var{h} must be +preallocated with the correct size since the function uses the number of +x and y bins in @var{h} to determine how many bytes to read. The return +value is 0 for success and @code{GSL_EFAILED} if there was a problem +reading from the file. The data is assumed to have been written in the +native binary format on the same architecture. +@end deftypefun + +@deftypefun int gsl_histogram2d_fprintf (FILE * @var{stream}, const gsl_histogram2d * @var{h}, const char * @var{range_format}, const char * @var{bin_format}) +This function writes the ranges and bins of the histogram @var{h} +line-by-line to the stream @var{stream} using the format specifiers +@var{range_format} and @var{bin_format}. These should be one of the +@code{%g}, @code{%e} or @code{%f} formats for floating point +numbers. The function returns 0 for success and @code{GSL_EFAILED} if +there was a problem writing to the file. The histogram output is +formatted in five columns, and the columns are separated by spaces, +like this, + +@smallexample +xrange[0] xrange[1] yrange[0] yrange[1] bin(0,0) +xrange[0] xrange[1] yrange[1] yrange[2] bin(0,1) +xrange[0] xrange[1] yrange[2] yrange[3] bin(0,2) +.... +xrange[0] xrange[1] yrange[ny-1] yrange[ny] bin(0,ny-1) + +xrange[1] xrange[2] yrange[0] yrange[1] bin(1,0) +xrange[1] xrange[2] yrange[1] yrange[2] bin(1,1) +xrange[1] xrange[2] yrange[1] yrange[2] bin(1,2) +.... +xrange[1] xrange[2] yrange[ny-1] yrange[ny] bin(1,ny-1) + +.... + +xrange[nx-1] xrange[nx] yrange[0] yrange[1] bin(nx-1,0) +xrange[nx-1] xrange[nx] yrange[1] yrange[2] bin(nx-1,1) +xrange[nx-1] xrange[nx] yrange[1] yrange[2] bin(nx-1,2) +.... +xrange[nx-1] xrange[nx] yrange[ny-1] yrange[ny] bin(nx-1,ny-1) +@end smallexample + +@noindent +Each line contains the lower and upper limits of the bin and the +contents of the bin. Since the upper limits of the each bin are the +lower limits of the neighboring bins there is duplication of these +values but this allows the histogram to be manipulated with +line-oriented tools. +@end deftypefun + +@deftypefun int gsl_histogram2d_fscanf (FILE * @var{stream}, gsl_histogram2d * @var{h}) +This function reads formatted data from the stream @var{stream} into the +histogram @var{h}. The data is assumed to be in the five-column format +used by @code{gsl_histogram2d_fprintf}. The histogram @var{h} must be +preallocated with the correct lengths since the function uses the sizes +of @var{h} to determine how many numbers to read. The function returns 0 +for success and @code{GSL_EFAILED} if there was a problem reading from +the file. +@end deftypefun + +@node Resampling from 2D histograms +@section Resampling from 2D histograms + +As in the one-dimensional case, a two-dimensional histogram made by +counting events can be regarded as a measurement of a probability +distribution. Allowing for statistical error, the height of each bin +represents the probability of an event where (@math{x},@math{y}) falls in +the range of that bin. For a two-dimensional histogram the probability +distribution takes the form @math{p(x,y) dx dy} where, +@tex +\beforedisplay +$$ +p(x,y) = n_{ij}/ (N A_{ij}) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x,y) = n_@{ij@}/ (N A_@{ij@}) +@end example + +@end ifinfo +@noindent +In this equation +@c{$n_{ij}$} +@math{n_@{ij@}} is the number of events in the bin which +contains @math{(x,y)}, +@c{$A_{ij}$} +@math{A_@{ij@}} is the area of the bin and @math{N} is +the total number of events. The distribution of events within each bin +is assumed to be uniform. + +@deftp {Data Type} {gsl_histogram2d_pdf} +@table @code +@item size_t nx, ny +This is the number of histogram bins used to approximate the probability +distribution function in the x and y directions. +@item double * xrange +The ranges of the bins in the x-direction are stored in an array of +@math{@var{nx} + 1} elements pointed to by @var{xrange}. +@item double * yrange +The ranges of the bins in the y-direction are stored in an array of +@math{@var{ny} + 1} pointed to by @var{yrange}. +@item double * sum +The cumulative probability for the bins is stored in an array of +@var{nx}*@var{ny} elements pointed to by @var{sum}. +@end table +@end deftp +@comment + +@noindent +The following functions allow you to create a @code{gsl_histogram2d_pdf} +struct which represents a two dimensional probability distribution and +generate random samples from it. + +@deftypefun {gsl_histogram2d_pdf *} gsl_histogram2d_pdf_alloc (size_t @var{nx}, size_t @var{ny}) +This function allocates memory for a two-dimensional probability +distribution of size @var{nx}-by-@var{ny} and returns a pointer to a +newly initialized @code{gsl_histogram2d_pdf} struct. If insufficient +memory is available a null pointer is returned and the error handler is +invoked with an error code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_histogram2d_pdf_init (gsl_histogram2d_pdf * @var{p}, const gsl_histogram2d * @var{h}) +This function initializes the two-dimensional probability distribution +calculated @var{p} from the histogram @var{h}. If any of the bins of +@var{h} are negative then the error handler is invoked with an error +code of @code{GSL_EDOM} because a probability distribution cannot +contain negative values. +@end deftypefun + +@deftypefun void gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * @var{p}) +This function frees the two-dimensional probability distribution +function @var{p} and all of the memory associated with it. +@end deftypefun + +@deftypefun int gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf * @var{p}, double @var{r1}, double @var{r2}, double * @var{x}, double * @var{y}) +This function uses two uniform random numbers between zero and one, +@var{r1} and @var{r2}, to compute a single random sample from the +two-dimensional probability distribution @var{p}. +@end deftypefun + +@page +@node Example programs for 2D histograms +@section Example programs for 2D histograms +This program demonstrates two features of two-dimensional histograms. +First a 10-by-10 two-dimensional histogram is created with x and y running +from 0 to 1. Then a few sample points are added to the histogram, at +(0.3,0.3) with a height of 1, at (0.8,0.1) with a height of 5 and at +(0.7,0.9) with a height of 0.5. This histogram with three events is +used to generate a random sample of 1000 simulated events, which are +printed out. + +@example +@verbatiminclude examples/histogram2d.c +@end example + +@noindent +@iftex +The following plot shows the distribution of the simulated events. Using +a higher resolution grid we can see the original underlying histogram +and also the statistical fluctuations caused by the events being +uniformly distributed over the area of the original bins. + +@sp 1 +@center @image{histogram2d,3.4in} +@end iftex + diff --git a/software/gsl-1.15/doc/histogram2d.eps b/software/gsl-1.15/doc/histogram2d.eps new file mode 100644 index 000000000..a26062a09 --- /dev/null +++ b/software/gsl-1.15/doc/histogram2d.eps @@ -0,0 +1,776 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%BoundingBox: 0 0 567 567 +%%Title: paw.eps +%%Creator: HIGZ Version 1.23/07 +%%CreationDate: 98/05/04 19.25 +%%EndComments +%%BeginProlog +80 dict begin +/s {stroke} def /l {lineto} def /m {moveto} def /t {translate} def +/sw {stringwidth} def /r {rotate} def /rl {roll} def /R {repeat} def +/d {rlineto} def /rm {rmoveto} def /gr {grestore} def /f {eofill} def +/c {setrgbcolor} def /lw {setlinewidth} def /sd {setdash} def +/cl {closepath} def /sf {scalefont setfont} def /black {0 setgray} def +/box {m dup 0 exch d exch 0 d 0 exch neg d cl} def +/NC{systemdict begin initclip end}def/C{NC box clip newpath}def +/bl {box s} def /bf {box f} def /Y { 0 exch d} def /X { 0 d} def +/mp {newpath /y exch def /x exch def} def +/side {[w .77 mul w .23 mul] .385 w mul sd w 0 l currentpoint t -144 r} def +/mr {mp x y w2 0 360 arc} def /m24 {mr s} def /m20 {mr f} def +/mb {mp x y w2 add m w2 neg 0 d 0 w neg d w 0 d 0 w d cl} def +/mt {mp x y w2 add m w2 neg w neg d w 0 d cl} def +/m21 {mb f} def /m25 {mb s} def /m22 {mt f} def /m26 {mt s} def +/m23 {mp x y w2 sub m w2 w d w neg 0 d cl f} def +/m27 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl s} def +/m28 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d + 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d + 0 w3 neg d w3 neg 0 d cl s } def +/m29 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t + 4 {side} repeat cl fill gr} def +/m30 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t + 5 {side} repeat s gr} def +/m31 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d + x w2 sub y w2 add m w w neg d x w2 sub y w2 + sub m w w d s} def +/m2 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d s} def +/m5 {mp x w2 sub y w2 sub m w w d x w2 sub y w2 add m w w neg d s} def +/DP {/PT exch def gsave 47.2 47.2 scale PT 1 eq { 16 16 1 [ 16 0 0 16 neg 0 16 +] { < AA AA 55 55 AA AA 55 55 AA AA 55 55 AA AA 55 55 AA AA 55 55 AA AA 55 55 +AA AA 55 55 AA AA 55 55 > } image } if PT 2 eq { 16 16 1 [ 16 0 0 16 neg 0 16 +] { < BB BB EE EE BB BB EE EE BB BB EE EE BB BB EE EE BB BB EE EE BB BB EE EE +BB BB EE EE BB BB EE EE > } image } if PT 3 eq { 16 16 1 [ 16 0 0 16 neg 0 16 +] { < FF FF BB BB FF FF EE EE FF FF BB BB FF FF EE EE FF FF BB BB FF FF EE EE +FF FF BB BB FF FF EE EE > } image } if PT 4 eq { 16 16 1 [ 16 0 0 16 neg 0 16 +] { < DF DF BF BF 7F 7F FE FE FD FD FB FB F7 F7 EF EF DF DF BF BF 7F 7F FE FE +FD FD FB FB F7 F7 EF EF > } image } if PT 5 eq { 16 16 1 [ 16 0 0 16 neg 0 16 +] { < 7F 7F BF B F DF DF EF EF F7 F7 FB FB FD FD FE FE 7F 7F BF BF DF DF EF +EF F7 F7 FB FB FD FD FE FE > } image } if PT 6 eq { 16 16 1 [ 16 0 0 16 neg 0 +16 ] { < BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB +BB BB BB BB BB BB BB BB BB > } image } if PT 7 eq { 16 16 1 [ 16 0 0 16 neg 0 +16 ] { < FF FF FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF FF FF 00 +00 FF FF FF FF FF FF 00 00 > } image } if PT 8 eq { 16 16 1 [ 16 0 0 16 neg 0 +16 ] { < EE EE 47 47 83 83 C5 C5 EE EE 5C 5C 38 38 74 74 EE EE 47 47 83 83 C5 +C5 EE EE 5C 5C 38 38 74 74 > } image } if PT 9 eq { 16 16 1 [ 16 0 0 16 neg 0 +16 ] { < EF EF EF EF D7 D7 38 38 FE FE FE FE 7D 7D 83 83 EF EF EF EF D7 D7 38 +38 FE FE FE FE 7D 7D 83 83 > } image } if PT 10 eq { 16 16 1 [ 16 0 0 16 neg +0 16 ] { < EF EF EF EF EF EF 00 00 FE FE FE FE FE FE 00 00 EF EF EF EF EF EF +00 00 FE FE FE FE FE FE 00 00 > } image } if PT 11 eq { 16 16 1 [ 16 0 0 16 +neg 0 16 ] { < F7 F7 B6 B6 D5 D5 E3 E3 D5 D5 B6 B6 F7 F7 FF FF 7F 7F 6B 6B 5D +5D 3E 3E 5D 5D 6B 6B 7F 7F FF FF > } image } if PT 12 eq { 16 16 1 [ 16 0 0 +16 neg 0 16 ] { < E3 E3 DD DD BE BE BE BE BE BE DD DD E3 E3 FF FF 3E 3E DD DD +EB EB EB EB EB EB DD DD 3E 3E FF FF > } image } if PT 13 eq { 16 16 1 [ 16 0 +0 16 neg 0 16 ] { < FE FE 7D 7D BB BB D7 D7 EF EF D7 D7 BB BB 7D 7D FE FE 7D +7D BB BB D7 D7 EF EF D7 D7 BB BB 7D 7D > } image } if PT 14 eq { 16 16 1 [ 16 +0 0 16 neg 0 16 ] { < 00 00 EE EF EE EF EE EF 0E E0 EE EE EE EE EE EE 00 EE +FE EE FE EE FE EE 00 00 FE EF FE EF FE EF > } image } if PT 15 eq { 16 16 1 [ +16 0 0 16 neg 0 16 ] { < DD DD AA AA DD DD FF FF 77 77 AA AA 77 77 FF FF DD +DD AA AA DD DD FF FF 77 77 AA AA 77 77 FF FF > } image } if PT 16 eq { 16 16 +1 [ 16 0 0 16 neg 0 16 ] { < F1 F1 EE EE 1F 1F FF FF F1 F1 EE EE 1F 1F FF FF +F1 F1 EE EE 1F 1F FF FF F1 F1 EE EE 1F 1F FF FF > } image } if PT 17 eq { 16 +16 1 [ 16 0 0 16 neg 0 16 ] { < EE EE DD DD BB BB FF FF EE EE DD DD BB BB FF + FF EE EE DD DD BB BB FF FF EE EE DD DD BB BB FF FF > } image } if PT 18 eq { +16 16 1 [ 16 0 0 16 neg 0 16 ] { < BB BB DD DD EE EE FF FF BB BB DD DD EE EE +FF FF BB BB DD DD EE EE FF FF BB BB DD DD EE EE FF FF > } image } if PT 19 eq +{ 16 16 1 [ 16 0 0 16 neg 0 16 ] { < 1F FC 67 F3 7B EF BD DE BD DE DE BD E6 +B3 F8 0F E6 B3 DE BD BD DE BD DE 7B EF 67 F3 1F FC 7F FF > } image } if PT +20 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < DD DD EE EE EE EE EE EE DD DD BB +BB BB BB BB BB DD DD EE EE EE EE EE EE DD DD BB BB BB BB BB BB > } image } +if PT 21 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < 0E 0E EF EF EF EF EF EF E0 +E0 FE FE FE FE FE FE 0E 0E EF EF EF EF EF EF E0 E0 FE FE FE FE FE FE > } +image } if PT 22 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < 70 70 F7 F7 F7 F7 F7 +F7 07 07 7F 7F 7F 7F 7F 7F 70 70 F7 F7 F7 F7 F7 F7 07 07 7F 7F 7F 7F 7F 7F > +} image } if PT 23 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < AA AA 55 55 A9 A9 +D1 D1 E1 E1 D1 D1 A9 A9 55 55 AA AA 55 55 A9 A9 D1 D1 E1 E1 D1 D1 A9 A9 55 55 +> } image } if PT 24 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < FF FE FF FC EA +A8 D5 54 EA A8 D5 54 E8 28 D4 54 E8 E8 D4 D4 E8 EA 54 D5 A8 EA 54 D5 00 C0 00 +80 > } image } if PT 25 eq { 16 16 1 [ 16 0 0 16 neg 0 16 ] { < FF FE FF FC +FF F8 FF F0 F0 00 F0 00 F0 20 F0 60 F0 E0 F1 E0 F3 E0 F0 00 E0 00 C0 00 80 00 +00 00 > } image } if gr } def /FA { /PT exch def gsave clip 0 0 translate 1 1 +54 { 1 sub 47.2 mul /Xcurr exch def 1 1 74 { 1 sub 47.2 mul /Ycurr exch def +gsave Xcurr Ycurr translate PT DP gr } for } for gr newpath } def +/reencdict 24 dict def /ReEncode {reencdict begin /nco&na exch def +/nfnam exch def /basefontname exch def /basefontdict basefontname findfont def +/newfont basefontdict maxlength dict def basefontdict {exch dup /FID ne +{dup /Encoding eq {exch dup length array copy newfont 3 1 roll put} {exch +newfont 3 1 roll put} ifelse} {pop pop} ifelse } forall newfont +/FontName nfnam put nco&na aload pop nco&na length 2 idiv {newfont +/Encoding get 3 1 roll put} repeat nfnam newfont definefont pop end } def +/accvec [ 176 /agrave 181 /Agrave 190 /acircumflex 192 /Acircumflex +201 /adieresis 204 /Adieresis 209 /ccedilla 210 /Ccedilla 211 /eacute +212 /Eacute 213 /egrave 214 /Egrave 215 /ecircumflex 216 /Ecircumflex +217 /edieresis 218 /Edieresis 219 /icircumflex 220 /Icircumflex +221 /idieresis 222 /Idieresis 223 /ntilde 224 /Ntilde 226 /ocircumflex +228 /Ocircumflex 229 /odieresis 230 /Odieresis 231 /ucircumflex 236 /Ucircumflex +237 /udieresis 238 /Udieresis 239 /aring 242 /Aring 243 /ydieresis +244 /Ydieresis 246 /aacute 247 /Aacute 252 /ugrave 253 /Ugrave] def +/Times-Roman /Times-Roman accvec ReEncode +/Times-Italic /Times-Italic accvec ReEncode +/Times-Bold /Times-Bold accvec ReEncode +/Times-BoldItalic /Times-BoldItalic accvec ReEncode +/Helvetica /Helvetica accvec ReEncode +/Helvetica-Oblique /Helvetica-Oblique accvec ReEncode +/Helvetica-Bold /Helvetica-Bold accvec ReEncode +/Helvetica-BoldOblique /Helvetica-BoldOblique accvec ReEncode +/Courier /Courier accvec ReEncode +/Courier-Oblique /Courier-Oblique accvec ReEncode +/Courier-Bold /Courier-Bold accvec ReEncode +/Courier-BoldOblique /Courier-BoldOblique accvec ReEncode +/oshow {gsave [] 0 sd true charpath stroke gr} def +/stwn { /fs exch def /fn exch def /text exch def fn findfont fs sf + text sw pop xs add /xs exch def} def +/stwb { /fs exch def /fn exch def /nbas exch def /textf exch def +textf length /tlen exch def nbas tlen gt {/nbas tlen def} if +fn findfont fs sf textf dup length nbas sub nbas getinterval sw +pop neg xs add /xs exch def} def +/accspe [ 65 /plusminus 66 /bar 67 /existential 68 /universal +69 /exclam 70 /numbersign 71 /greater 72 /question 73 /integral +74 /colon 75 /semicolon 76 /less 77 /bracketleft 78 /bracketright +79 /greaterequal 80 /braceleft 81 /braceright 82 /radical +83 /spade 84 /heart 85 /diamond 86 /club 87 /lessequal +88 /multiply 89 /percent 90 /infinity 48 /circlemultiply 49 /circleplus +50 /emptyset 51 /lozenge 52 /bullet 53 /arrowright 54 /arrowup +55 /arrowleft 56 /arrowdown 57 /arrowboth 48 /degree 44 /comma 43 /plus + 45 /angle 42 /angleleft 47 /divide 61 /notequal 40 /equivalence 41 /second + 97 /approxequal 98 /congruent 99 /perpendicular 100 /partialdiff 101 /florin + 102 /intersection 103 /union 104 /propersuperset 105 /reflexsuperset + 106 /notsubset 107 /propersubset 108 /reflexsubset 109 /element 110 /notelement + 111 /gradient 112 /logicaland 113 /logicalor 114 /arrowdblboth + 115 /arrowdblleft 116 /arrowdblup 117 /arrowdblright 118 /arrowdbldown + 119 /ampersand 120 /omega1 121 /similar 122 /aleph ] def +/Symbol /Special accspe ReEncode +%%EndProlog + gsave .25 .25 scale gsave 0 0 t black [] 0 sd 1 lw 2268 2268 0 0 bl 2268 2268 + 0 0 C 1814 1814 227 227 C NC 891 227 m 38 10 d s 907 253 m 22 -16 d s 869 244 m + 38 9 d s 869 244 m 22 -17 d s 929 237 m 39 9 d s 945 263 m 23 -17 d s 907 253 m + 38 10 d s 968 246 m 38 10 d s 984 273 m 22 -17 d s 945 263 m 39 10 d s 1006 256 + m 38 10 d s 1022 283 m 22 -17 d s 984 273 m 38 10 d s 1044 266 m 39 10 d s 1060 + 293 m 23 -17 d s 1022 283 m 38 10 d s 1083 276 m 38 9 d s 1099 302 m 22 -17 d s + 1060 293 m 39 9 d s 1121 285 m 38 10 d s 1137 312 m 22 -17 d s 1099 302 m 38 10 + d s 1159 295 m 39 10 d s 1176 322 m 22 -17 d s 1137 312 m 39 10 d s 1198 305 m + 38 10 d s 1214 332 m 22 -17 d s 1176 322 m 38 10 d s 1236 315 m 38 9 d s 1252 + 341 m 22 -17 d s 1214 332 m 38 9 d s 1274 324 m 39 10 d s 1291 351 m 22 -17 d s + 1252 341 m 39 10 d s 1313 334 m 38 10 d s 1329 361 m 22 -17 d s 1291 351 m 38 + 10 d s 1351 344 m 38 10 d s 1367 371 m 22 -17 d s 1329 361 m 38 10 d s 1329 361 + m 12 -10 d s 1389 354 m 39 9 d s 1406 380 m 22 -17 d s 1367 371 m 39 9 d s 1428 + 363 m 38 10 d s 1444 390 m 22 -17 d s 1406 380 m 38 10 d s 1466 373 m 38 10 d s + 1482 400 m 22 -17 d s 1444 390 m 38 10 d s 1504 383 m 39 10 d s 1521 410 m 22 + -17 d s 1482 400 m 39 10 d s 1543 393 m 38 9 d s 1559 419 m 22 -17 d s 1521 410 + m 38 9 d s 1581 402 m 38 10 d s 1597 429 m 22 -17 d s 1559 419 m 38 10 d s 1619 + 412 m 39 10 d s 1636 439 m 22 -17 d s 1597 429 m 39 10 d s 1658 422 m 38 10 d s + 1674 449 m 22 -17 d s 1636 439 m 38 10 d s 1696 432 m 38 10 d s 1712 458 m 22 + -16 d s 1674 449 m 38 9 d s 1734 442 m 39 9 d s 1751 468 m 22 -17 d s 1712 458 + m 39 10 d s 1773 451 m 38 10 d s 1789 478 m 22 -17 d s 1751 468 m 38 10 d s + 1811 461 m 38 10 d s 1827 488 m 22 -17 d s 1789 478 m 38 10 d s 1849 471 m 39 + 10 d s 1866 497 m 22 -16 d s 1827 488 m 39 9 d s 1888 481 m 38 9 d s 1904 507 m + 22 -17 d s 1866 497 m 38 10 d s 1926 490 m 39 10 d s 1942 517 m 23 -17 d s 1904 + 507 m 38 10 d s 1965 500 m 38 10 d s 1981 527 m 22 -17 d s 1942 517 m 39 10 d s + 2003 510 m 38 10 d s 2019 537 m 22 -17 d s 1981 527 m 38 10 d s 885 270 m 22 + -17 d s 847 261 m 38 9 d s 847 261 m 22 -17 d s 923 280 m 22 -17 d s 885 270 m + 38 10 d s 962 290 m 22 -17 d s 923 280 m 39 10 d s 1000 300 m 22 -17 d s 962 + 290 m 38 10 d s 1038 309 m 22 -16 d s 1000 300 m 38 9 d s 1077 319 m 22 -17 d s + 1038 309 m 39 10 d s 1115 329 m 22 -17 d s 1077 319 m 38 10 d s 1153 339 m 23 + -17 d s 1115 329 m 38 10 d s 1192 348 m 22 -16 d s 1153 339 m 39 9 d s 1230 358 + m 22 -17 d s 1192 348 m 38 10 d s 1268 368 m 23 -17 d s 1230 358 m 38 10 d s + 1307 378 m 22 -17 d s 1268 368 m 39 10 d s 1345 388 m 22 -17 d s 1307 378 m 38 + 10 d s 1319 368 m 10 -7 d s 1383 397 m 23 -17 d s 1345 388 m 38 9 d s 1422 407 + m 22 -17 d s 1383 397 m 39 10 d s 1460 417 m 22 -17 d s 1422 407 m 38 10 d s + 1498 427 m 23 -17 d s 1460 417 m 38 10 d s 1537 436 m 22 -17 d s 1498 427 m 39 + 9 d s 1575 446 m 22 -17 d s 1537 436 m 38 10 d s 1613 456 m 23 -17 d s 1575 446 + m 38 10 d s 1652 466 m 22 -17 d s 1613 456 m 39 10 d s 1690 475 m 22 -17 d s + 1652 466 m 38 9 d s 1729 485 m 22 -17 d s 1690 475 m 39 10 d s 1767 495 m 22 + -17 d s 1729 485 m 38 10 d s 1805 505 m 22 -17 d s 1767 495 m 38 10 d s 1844 + 514 m 22 -17 d s 1805 505 m 39 9 d s 1882 524 m 22 -17 d s 1844 514 m 38 10 d s + 1920 534 m 22 -17 d s 1882 524 m 38 10 d s 1959 544 m 22 -17 d s 1920 534 m 39 + 10 d s 1997 553 m 22 -16 d s 1959 544 m 38 9 d s 863 287 m 22 -17 d s 825 278 m + 38 9 d s 825 278 m 22 -17 d s 901 297 m 22 -17 d s 863 287 m 38 10 d s 940 307 + m 22 -17 d s 901 297 m 39 10 d s 978 317 m 22 -17 d s 940 307 m 38 10 d s 1016 + 326 m 22 -17 d s 978 317 m 38 9 d s 1055 336 m 22 -17 d s 1016 326 m 39 10 d s + 1093 346 m 22 -17 d s 1055 336 m 38 10 d s 1131 356 m 22 -17 d s 1093 346 m 38 + 10 d s 1170 365 m 22 -17 d s 1131 356 m 39 9 d s 1208 375 m 22 -17 d s 1170 365 + m 38 10 d s 1246 385 m 22 -17 d s 1208 375 m 38 10 d s 1285 395 m 22 -17 d s + 1246 385 m 39 10 d s 1323 404 m 22 -16 d s 1285 395 m 38 9 d s 1361 414 m 22 + -17 d s 1323 404 m 38 10 d s 1400 424 m 22 -17 d s 1361 414 m 39 10 d s 1438 + 434 m 22 -17 d s 1400 424 m 38 10 d s 1476 443 m 22 -16 d s 1438 434 m 38 9 d s + 1515 453 m 22 -17 d s 1476 443 m 39 10 d s 1553 463 m 22 -17 d s 1515 453 m 38 + 10 d s 1591 473 m 22 -17 d s 1553 463 m 38 10 d s 1630 482 m 22 -16 d s 1591 + 473 m 39 9 d s 1594 471 m 3 -2 d s 1602 464 m 3 -2 d s 1605 462 m 3 -2 d s 1668 + 492 m 22 -17 d s 1630 482 m 38 10 d s 1706 502 m 23 -17 d s 1668 492 m 38 10 d + s 1745 512 m 22 -17 d s 1706 502 m 39 10 d s 1783 522 m 22 -17 d s 1745 512 m + 38 10 d s 1821 531 m 23 -17 d s 1783 522 m 38 9 d s 1860 541 m 22 -17 d s 1821 + 531 m 39 10 d s 1898 551 m 22 -17 d s 1860 541 m 38 10 d s 1936 561 m 23 -17 d + s 1898 551 m 38 10 d s 1975 570 m 22 -17 d s 1936 561 m 39 9 d s 841 304 m 22 + -17 d s 802 294 m 39 10 d s 802 294 m 23 -16 d s 879 314 m 22 -17 d s 841 304 m + 38 10 d s 917 324 m 23 -17 d s 879 314 m 38 10 d s 956 333 m 22 -16 d s 917 324 + m 39 9 d s 994 343 m 22 -17 d s 956 333 m 38 10 d s 1032 353 m 23 -17 d s 994 + 343 m 38 10 d s 1071 363 m 22 -17 d s 1032 353 m 39 10 d s 1109 373 m 22 -17 d + s 1071 363 m 38 10 d s 1147 382 m 23 -17 d s 1109 373 m 38 9 d s 1186 392 m 22 + -17 d s 1147 382 m 39 10 d s 1224 402 m 22 -17 d s 1186 392 m 38 10 d s 1262 + 412 m 23 -17 d s 1224 402 m 38 10 d s 1301 421 m 22 -17 d s 1262 412 m 39 9 d s + 1339 431 m 22 -17 d s 1301 421 m 38 10 d s 1378 441 m 22 -17 d s 1339 431 m 39 + 10 d s 1416 451 m 22 -17 d s 1378 441 m 38 10 d s 1454 460 m 22 -17 d s 1416 + 451 m 38 9 d s 1493 470 m 22 -17 d s 1454 460 m 39 10 d s 1531 480 m 22 -17 d s + 1493 470 m 38 10 d s 1501 464 m 3 -2 d s 1509 457 m 3 -2 d s 1512 455 m 3 -2 d + s 1569 490 m 22 -17 d s 1531 480 m 38 10 d s 1608 499 m 22 -17 d s 1569 490 m + 39 9 d s 1646 509 m 22 -17 d s 1608 499 m 38 10 d s 1684 519 m 22 -17 d s 1646 + 509 m 38 10 d s 1723 529 m 22 -17 d s 1684 519 m 39 10 d s 1761 538 m 22 -16 d + s 1723 529 m 38 9 d s 1799 548 m 22 -17 d s 1761 538 m 38 10 d s 1838 558 m 22 + -17 d s 1799 548 m 39 10 d s 1876 568 m 22 -17 d s 1838 558 m 38 10 d s 1914 + 577 m 22 -16 d s 1876 568 m 38 9 d s 1953 587 m 22 -17 d s 1914 577 m 39 10 d s + 819 321 m 22 -17 d s 780 311 m 39 10 d s 780 311 m 22 -17 d s 857 331 m 22 -17 + d s 819 321 m 38 10 d s 895 341 m 22 -17 d s 857 331 m 38 10 d s 934 350 m 22 + -17 d s 895 341 m 39 9 d s 972 360 m 22 -17 d s 934 350 m 38 10 d s 1010 370 m + 22 -17 d s 972 360 m 38 10 d s 1049 380 m 22 -17 d s 1010 370 m 39 10 d s 1087 + 389 m 22 -16 d s 1049 380 m 38 9 d s 1125 399 m 22 -17 d s 1087 389 m 38 10 d s + 1164 409 m 22 -17 d s 1125 399 m 39 10 d s 1202 419 m 22 -17 d s 1164 409 m 38 + 10 d s 1240 428 m 22 -16 d s 1202 419 m 38 9 d s 1279 438 m 22 -17 d s 1240 428 + m 39 10 d s 1317 448 m 22 -17 d s 1279 438 m 38 10 d s 1355 458 m 23 -17 d s + 1317 448 m 38 10 d s 1394 468 m 22 -17 d s 1355 458 m 39 10 d s 1432 477 m 22 + -17 d s 1394 468 m 38 9 d s 1470 487 m 23 -17 d s 1432 477 m 38 10 d s 1509 497 + m 22 -17 d s 1470 487 m 39 10 d s 1547 507 m 22 -17 d s 1509 497 m 38 10 d s + 1585 516 m 23 -17 d s 1547 507 m 38 9 d s 1624 526 m 22 -17 d s 1585 516 m 39 + 10 d s 1662 536 m 22 -17 d s 1624 526 m 38 10 d s 1700 546 m 23 -17 d s 1662 + 536 m 38 10 d s 1739 555 m 22 -17 d s 1700 546 m 39 9 d s 1777 565 m 22 -17 d s + 1739 555 m 38 10 d s 1815 575 m 23 -17 d s 1777 565 m 38 10 d s 1854 585 m 22 + -17 d s 1815 575 m 39 10 d s 1892 594 m 22 -17 d s 1854 585 m 38 9 d s 1931 604 + m 22 -17 d s 1892 594 m 39 10 d s 796 338 m 23 -17 d s 758 328 m 38 10 d s 758 + 328 m 22 -17 d s 835 348 m 22 -17 d s 796 338 m 39 10 d s 873 358 m 22 -17 d s + 835 348 m 38 10 d s 911 367 m 23 -17 d s 873 358 m 38 9 d s 950 377 m 22 -17 d + s 911 367 m 39 10 d s 988 387 m 22 -17 d s 950 377 m 38 10 d s 1026 397 m 23 + -17 d s 988 387 m 38 10 d s 1065 406 m 22 -17 d s 1026 397 m 39 9 d s 1103 416 + m 22 -17 d s 1065 406 m 38 10 d s 1142 426 m 22 -17 d s 1103 416 m 39 10 d s + 1180 436 m 22 -17 d s 1142 426 m 38 10 d s 1218 445 m 22 -17 d s 1180 436 m 38 + 9 d s 1257 455 m 22 -17 d s 1218 445 m 39 10 d s 1295 465 m 22 -17 d s 1257 455 + m 38 10 d s 1333 475 m 22 -17 d s 1295 465 m 38 10 d s 1372 484 m 22 -16 d s + 1333 475 m 39 9 d s 1410 494 m 22 -17 d s 1372 484 m 38 10 d s 1448 504 m 22 + -17 d s 1410 494 m 38 10 d s 1487 514 m 22 -17 d s 1448 504 m 39 10 d s 1525 + 523 m 22 -16 d s 1487 514 m 38 9 d s 1563 533 m 22 -17 d s 1525 523 m 38 10 d s + 1602 543 m 22 -17 d s 1563 533 m 39 10 d s 1640 553 m 22 -17 d s 1602 543 m 38 + 10 d s 1678 562 m 22 -16 d s 1640 553 m 38 9 d s 1717 572 m 22 -17 d s 1678 562 + m 39 10 d s 1755 582 m 22 -17 d s 1717 572 m 38 10 d s 1793 592 m 22 -17 d s + 1755 582 m 38 10 d s 1832 602 m 22 -17 d s 1793 592 m 39 10 d s 1870 611 m 22 + -17 d s 1832 602 m 38 9 d s 1908 621 m 23 -17 d s 1870 611 m 38 10 d s 774 355 + m 22 -17 d s 736 345 m 38 10 d s 736 345 m 22 -17 d s 813 365 m 22 -17 d s 774 + 355 m 39 10 d s 851 374 m 22 -16 d s 813 365 m 38 9 d s 889 384 m 22 -17 d s + 851 374 m 38 10 d s 927 371 m 2 1 d s 932 372 m 2 1 d s 937 374 m 13 3 d s 928 + 394 m 22 -17 d s 889 384 m 39 10 d s 950 377 m 10 3 d s 963 380 m 5 2 d s 970 + 382 m 3 1 d s 978 384 m 2 1 d s 966 404 m 22 -17 d s 928 394 m 38 10 d s 1004 + 413 m 22 -16 d s 966 404 m 38 9 d s 1043 423 m 22 -17 d s 1004 413 m 39 10 d s + 1081 433 m 22 -17 d s 1043 423 m 38 10 d s 1119 443 m 23 -17 d s 1081 433 m 38 + 10 d s 1158 453 m 22 -17 d s 1119 443 m 39 10 d s 1196 462 m 22 -17 d s 1158 + 453 m 38 9 d s 1228 448 m 3 1 d s 1236 450 m 3 1 d s 1241 451 m 5 2 d s 1249 + 453 m 8 2 d s 1234 472 m 23 -17 d s 1196 462 m 38 10 d s 1257 455 m 12 3 d s + 1276 460 m 9 2 d s 1273 482 m 22 -17 d s 1234 472 m 39 10 d s 1311 492 m 22 -17 + d s 1273 482 m 38 10 d s 1349 501 m 23 -17 d s 1311 492 m 38 9 d s 1388 511 m + 22 -17 d s 1349 501 m 39 10 d s 1426 521 m 22 -17 d s 1388 511 m 38 10 d s 1448 + 504 m 16 4 d s 1466 508 m 3 1 d s 1471 510 m 3 X s 1464 531 m 23 -17 d s 1426 + 521 m 38 10 d s 1497 516 m 2 1 d s 1504 518 m 3 1 d s 1510 520 m 5 1 d s 1517 + 522 m 8 1 d s 1503 540 m 22 -17 d s 1464 531 m 39 9 d s 1541 550 m 22 -17 d s + 1503 540 m 38 10 d s 1579 560 m 23 -17 d s 1541 550 m 38 10 d s 1618 570 m 22 + -17 d s 1579 560 m 39 10 d s 1656 579 m 22 -17 d s 1618 570 m 38 9 d s 1695 589 + m 22 -17 d s 1656 579 m 39 10 d s 1717 572 m 15 4 d s 1735 577 m 2 X s 1740 578 + m 2 1 d s 1733 599 m 22 -17 d s 1695 589 m 38 10 d s 1771 609 m 22 -17 d s 1733 + 599 m 38 10 d s 1810 618 m 22 -16 d s 1771 609 m 39 9 d s 1848 628 m 22 -17 d s + 1810 618 m 38 10 d s 1886 638 m 22 -17 d s 1848 628 m 38 10 d s 752 372 m 22 + -17 d s 714 362 m 38 10 d s 714 362 m 22 -17 d s 791 382 m 22 -17 d s 752 372 m + 39 10 d s 829 391 m 22 -17 d s 791 382 m 38 9 d s 867 401 m 22 -17 d s 829 391 + m 38 10 d s 906 411 m 22 -17 d s 867 401 m 39 10 d s 944 421 m 22 -17 d s 906 + 411 m 38 10 d s 982 430 m 22 -17 d s 944 421 m 38 9 d s 1021 440 m 22 -17 d s + 982 430 m 39 10 d s 1059 450 m 22 -17 d s 1021 440 m 38 10 d s 1097 460 m 22 + -17 d s 1059 450 m 38 10 d s 1136 469 m 22 -16 d s 1097 460 m 39 9 d s 1174 479 + m 22 -17 d s 1136 469 m 38 10 d s 1212 489 m 22 -17 d s 1174 479 m 38 10 d s + 1251 499 m 22 -17 d s 1212 489 m 39 10 d s 1289 508 m 22 -16 d s 1251 499 m 38 + 9 d s 1327 518 m 22 -17 d s 1289 508 m 38 10 d s 1366 528 m 22 -17 d s 1327 518 + m 39 10 d s 1404 538 m 22 -17 d s 1366 528 m 38 10 d s 1442 548 m 22 -17 d s + 1404 538 m 38 10 d s 1481 557 m 22 -17 d s 1442 548 m 39 9 d s 1519 567 m 22 + -17 d s 1481 557 m 38 10 d s 1557 577 m 22 -17 d s 1519 567 m 38 10 d s 1596 + 587 m 22 -17 d s 1557 577 m 39 10 d s 1634 596 m 22 -17 d s 1596 587 m 38 9 d s + 1672 606 m 23 -17 d s 1634 596 m 38 10 d s 1711 616 m 22 -17 d s 1672 606 m 39 + 10 d s 1749 626 m 22 -17 d s 1711 616 m 38 10 d s 1787 635 m 23 -17 d s 1749 + 626 m 38 9 d s 1826 645 m 22 -17 d s 1787 635 m 39 10 d s 1864 655 m 22 -17 d s + 1826 645 m 38 10 d s 730 389 m 22 -17 d s 692 379 m 38 10 d s 692 379 m 22 -17 + d s 768 398 m 23 -16 d s 730 389 m 38 9 d s 807 408 m 22 -17 d s 768 398 m 39 + 10 d s 845 418 m 22 -17 d s 807 408 m 38 10 d s 883 428 m 23 -17 d s 845 418 m + 38 10 d s 922 438 m 22 -17 d s 883 428 m 39 10 d s 960 447 m 22 -17 d s 922 438 + m 38 9 d s 998 457 m 23 -17 d s 960 447 m 38 10 d s 1037 467 m 22 -17 d s 998 + 457 m 39 10 d s 1075 477 m 22 -17 d s 1037 467 m 38 10 d s 1113 486 m 23 -17 d + s 1075 477 m 38 9 d s 1152 496 m 22 -17 d s 1113 486 m 39 10 d s 1190 506 m 22 + -17 d s 1152 496 m 38 10 d s 1228 516 m 23 -17 d s 1190 506 m 38 10 d s 1267 + 525 m 22 -17 d s 1228 516 m 39 9 d s 1305 535 m 22 -17 d s 1267 525 m 38 10 d s + 1344 545 m 22 -17 d s 1305 535 m 39 10 d s 1382 555 m 22 -17 d s 1344 545 m 38 + 10 d s 1420 564 m 22 -16 d s 1382 555 m 38 9 d s 1459 574 m 22 -17 d s 1420 564 + m 39 10 d s 1497 584 m 22 -17 d s 1459 574 m 38 10 d s 1535 594 m 22 -17 d s + 1497 584 m 38 10 d s 1574 603 m 22 -16 d s 1535 594 m 39 9 d s 1612 613 m 22 + -17 d s 1574 603 m 38 10 d s 1650 623 m 22 -17 d s 1612 613 m 38 10 d s 1689 + 633 m 22 -17 d s 1650 623 m 39 10 d s 1727 643 m 22 -17 d s 1689 633 m 38 10 d + s 1765 652 m 22 -17 d s 1727 643 m 38 9 d s 1804 662 m 22 -17 d s 1765 652 m 39 + 10 d s 1842 672 m 22 -17 d s 1804 662 m 38 10 d s 708 406 m 22 -17 d s 670 396 + m 38 10 d s 670 396 m 22 -17 d s 746 415 m 22 -17 d s 708 406 m 38 9 d s 785 + 425 m 22 -17 d s 746 415 m 39 10 d s 823 435 m 22 -17 d s 785 425 m 38 10 d s + 861 445 m 22 -17 d s 823 435 m 38 10 d s 900 454 m 22 -16 d s 861 445 m 39 9 d + s 938 464 m 22 -17 d s 900 454 m 38 10 d s 976 474 m 22 -17 d s 938 464 m 38 10 + d s 1015 484 m 22 -17 d s 976 474 m 39 10 d s 1075 477 m 206 Y s 1037 674 m 38 + 9 d s 1037 467 m 207 Y s 1015 691 m 22 -17 d s 1015 484 m 207 Y s 1053 700 m 22 + -17 d s 1015 691 m 38 9 d s 1113 486 m 148 Y s 1075 624 m 38 10 d s 1091 651 m + 22 -17 d s 1076 647 m 15 4 d s 1152 496 m 187 Y s 1113 673 m 39 10 d s 1113 634 + m 39 Y s 1091 690 m 22 -17 d s 1091 651 m 39 Y s 1130 700 m 22 -17 d s 1091 690 + m 39 10 d s 1168 523 m 22 -17 d s 1153 519 m 15 4 d s 1206 533 m 22 -17 d s + 1168 523 m 38 10 d s 1245 542 m 22 -17 d s 1206 533 m 39 9 d s 1283 552 m 22 + -17 d s 1245 542 m 38 10 d s 1321 562 m 23 -17 d s 1283 552 m 38 10 d s 1360 + 572 m 22 -17 d s 1321 562 m 39 10 d s 1398 581 m 22 -17 d s 1360 572 m 38 9 d s + 1436 591 m 23 -17 d s 1398 581 m 38 10 d s 1475 601 m 22 -17 d s 1436 591 m 39 + 10 d s 1513 611 m 22 -17 d s 1475 601 m 38 10 d s 1551 620 m 23 -17 d s 1513 + 611 m 38 9 d s 1590 630 m 22 -17 d s 1551 620 m 39 10 d s 1628 640 m 22 -17 d s + 1590 630 m 38 10 d s 1666 650 m 23 -17 d s 1628 640 m 38 10 d s 1705 659 m 22 + -16 d s 1666 650 m 39 9 d s 1743 669 m 22 -17 d s 1705 659 m 38 10 d s 1781 679 + m 23 -17 d s 1743 669 m 38 10 d s 1820 689 m 22 -17 d s 1781 679 m 39 10 d s + 686 423 m 22 -17 d s 647 413 m 39 10 d s 647 413 m 23 -17 d s 724 432 m 22 -17 + d s 686 423 m 38 9 d s 762 442 m 23 -17 d s 724 432 m 38 10 d s 801 452 m 22 + -17 d s 762 442 m 39 10 d s 839 462 m 22 -17 d s 801 452 m 38 10 d s 877 471 m + 23 -17 d s 839 462 m 38 9 d s 916 481 m 22 -17 d s 877 471 m 39 10 d s 954 491 + m 22 -17 d s 916 481 m 38 10 d s 992 501 m 23 -17 d s 954 491 m 38 10 d s 992 + 629 m 23 -17 d s 992 501 m 128 Y s 992 629 m 23 6 d s 1076 657 m 15 4 d s 1077 + 672 m 14 -11 d s 1151 535 m 17 -12 d s 1184 549 m 22 -16 d s 1151 541 m 33 8 d + s 1223 559 m 22 -17 d s 1184 549 m 39 10 d s 1261 569 m 22 -17 d s 1223 559 m + 38 10 d s 1299 579 m 22 -17 d s 1261 569 m 38 10 d s 1338 588 m 22 -16 d s 1299 + 579 m 39 9 d s 1376 598 m 22 -17 d s 1338 588 m 38 10 d s 1414 608 m 22 -17 d s + 1376 598 m 38 10 d s 1453 618 m 22 -17 d s 1414 608 m 39 10 d s 1491 628 m 22 + -17 d s 1453 618 m 38 10 d s 1529 637 m 22 -17 d s 1491 628 m 38 9 d s 1568 647 + m 22 -17 d s 1529 637 m 39 10 d s 1606 657 m 22 -17 d s 1568 647 m 38 10 d s + 1644 667 m 22 -17 d s 1606 657 m 38 10 d s 1683 676 m 22 -17 d s 1644 667 m 39 + 9 d s 1721 686 m 22 -17 d s 1683 676 m 38 10 d s 1759 696 m 22 -17 d s 1721 686 + m 38 10 d s 1798 706 m 22 -17 d s 1759 696 m 39 10 d s 664 439 m 22 -16 d s 625 + 430 m 39 9 d s 625 430 m 22 -17 d s 702 449 m 22 -17 d s 664 439 m 38 10 d s + 740 459 m 22 -17 d s 702 449 m 38 10 d s 779 469 m 22 -17 d s 740 459 m 39 10 d + s 817 478 m 22 -16 d s 779 469 m 38 9 d s 855 488 m 22 -17 d s 817 478 m 38 10 + d s 894 498 m 22 -17 d s 855 488 m 39 10 d s 932 508 m 22 -17 d s 894 498 m 38 + 10 d s 970 518 m 22 -17 d s 932 508 m 38 10 d s 1031 694 m 23 Y s 992 707 m 39 + 10 d s 992 629 m 78 Y s 970 724 m 22 -17 d s 970 518 m 206 Y s 1009 734 m 22 + -17 d s 970 724 m 39 10 d s 1069 689 m 18 Y s 1031 697 m 38 10 d s 1047 724 m + 22 -17 d s 1028 719 m 19 5 d s 1162 566 m 22 -17 d s 1152 564 m 10 2 d s 1200 + 576 m 23 -17 d s 1162 566 m 38 10 d s 1239 586 m 22 -17 d s 1200 576 m 39 10 d + s 1277 596 m 22 -17 d s 1239 586 m 38 10 d s 1315 605 m 23 -17 d s 1277 596 m + 38 9 d s 1354 615 m 22 -17 d s 1315 605 m 39 10 d s 1392 625 m 22 -17 d s 1354 + 615 m 38 10 d s 1430 635 m 23 -17 d s 1392 625 m 38 10 d s 1469 644 m 22 -16 d + s 1430 635 m 39 9 d s 1507 654 m 22 -17 d s 1469 644 m 38 10 d s 1545 664 m 23 + -17 d s 1507 654 m 38 10 d s 1584 674 m 22 -17 d s 1545 664 m 39 10 d s 1622 + 683 m 22 -16 d s 1584 674 m 38 9 d s 1661 693 m 22 -17 d s 1622 683 m 39 10 d s + 1699 703 m 22 -17 d s 1661 693 m 38 10 d s 1737 713 m 22 -17 d s 1699 703 m 38 + 10 d s 1776 723 m 22 -17 d s 1737 713 m 39 10 d s 641 434 m 2 X s 646 435 m 2 1 + d s 651 436 m 13 3 d s 641 456 m 23 -17 d s 603 447 m 38 9 d s 603 447 m 22 -17 + d s 664 439 m 38 10 d s 680 466 m 22 -17 d s 641 456 m 39 10 d s 702 449 m 15 4 + d s 720 454 m 2 X s 725 455 m 3 1 d s 718 476 m 22 -17 d s 680 466 m 38 10 d s + 757 486 m 22 -17 d s 718 476 m 39 10 d s 795 495 m 22 -17 d s 757 486 m 38 9 d + s 833 505 m 22 -17 d s 795 495 m 38 10 d s 872 515 m 22 -17 d s 833 505 m 39 10 + d s 909 502 m 3 1 d s 914 503 m 3 1 d s 919 505 m 13 3 d s 910 525 m 22 -17 d s + 872 515 m 38 10 d s 932 508 m 38 10 d s 948 534 m 22 -16 d s 910 525 m 38 9 d s + 948 534 m 21 6 d s 1152 574 m 10 -8 d s 1177 570 m 3 1 d s 1183 572 m 2 X s + 1188 573 m 12 3 d s 1178 593 m 22 -17 d s 1153 586 m 25 7 d s 1211 579 m 2 X s + 1218 581 m 3 X s 1223 582 m 6 1 d s 1231 584 m 8 2 d s 1217 603 m 22 -17 d s + 1178 593 m 39 10 d s 1239 586 m 12 3 d s 1258 591 m 10 2 d s 1255 613 m 22 -17 + d s 1217 603 m 38 10 d s 1293 622 m 22 -17 d s 1255 613 m 38 9 d s 1332 632 m + 22 -17 d s 1293 622 m 39 10 d s 1370 642 m 22 -17 d s 1332 632 m 38 10 d s 1392 + 625 m 38 10 d s 1408 652 m 22 -17 d s 1370 642 m 38 10 d s 1430 635 m 39 9 d s + 1447 661 m 22 -17 d s 1408 652 m 39 9 d s 1485 671 m 22 -17 d s 1447 661 m 38 + 10 d s 1523 681 m 22 -17 d s 1485 671 m 38 10 d s 1562 691 m 22 -17 d s 1523 + 681 m 39 10 d s 1592 676 m 2 X s 1604 679 m 11 3 d s 1617 682 m 5 1 d s 1600 + 700 m 22 -17 d s 1562 691 m 38 9 d s 1622 683 m 39 10 d s 1638 710 m 23 -17 d s + 1600 700 m 38 10 d s 1661 693 m 38 10 d s 1677 720 m 22 -17 d s 1638 710 m 39 + 10 d s 1699 703 m 38 10 d s 1715 730 m 22 -17 d s 1677 720 m 38 10 d s 1744 715 + m 5 1 d s 1756 718 m 10 2 d s 1771 721 m 5 2 d s 1753 739 m 23 -16 d s 1715 730 + m 38 9 d s 619 473 m 22 -17 d s 581 463 m 38 10 d s 581 463 m 22 -16 d s 658 + 483 m 22 -17 d s 619 473 m 39 10 d s 696 493 m 22 -17 d s 658 483 m 38 10 d s + 734 503 m 23 -17 d s 696 493 m 38 10 d s 773 512 m 22 -17 d s 734 503 m 39 9 d + s 811 522 m 22 -17 d s 773 512 m 38 10 d s 849 532 m 23 -17 d s 811 522 m 38 10 + d s 888 542 m 22 -17 d s 849 532 m 39 10 d s 926 551 m 22 -17 d s 888 542 m 38 + 9 d s 964 561 m 5 -4 d s 926 551 m 38 10 d s 964 561 m 6 1 d s 1156 610 m 22 + -17 d s 1151 609 m 5 1 d s 1194 620 m 23 -17 d s 1156 610 m 38 10 d s 1233 629 + m 22 -16 d s 1194 620 m 39 9 d s 1271 639 m 22 -17 d s 1233 629 m 38 10 d s + 1310 649 m 22 -17 d s 1271 639 m 39 10 d s 1348 659 m 22 -17 d s 1310 649 m 38 + 10 d s 1386 668 m 22 -16 d s 1348 659 m 38 9 d s 1425 678 m 22 -17 d s 1386 668 + m 39 10 d s 1463 688 m 22 -17 d s 1425 678 m 38 10 d s 1501 698 m 22 -17 d s + 1463 688 m 38 10 d s 1540 708 m 22 -17 d s 1501 698 m 39 10 d s 1578 717 m 22 + -17 d s 1540 708 m 38 9 d s 1616 727 m 22 -17 d s 1578 717 m 38 10 d s 1655 737 + m 22 -17 d s 1616 727 m 39 10 d s 1693 747 m 22 -17 d s 1655 737 m 38 10 d s + 1731 756 m 22 -17 d s 1693 747 m 38 9 d s 597 490 m 22 -17 d s 559 480 m 38 10 + d s 559 480 m 22 -17 d s 636 500 m 22 -17 d s 597 490 m 39 10 d s 674 510 m 22 + -17 d s 636 500 m 38 10 d s 712 519 m 22 -16 d s 674 510 m 38 9 d s 751 529 m + 22 -17 d s 712 519 m 39 10 d s 789 539 m 22 -17 d s 751 529 m 38 10 d s 827 549 + m 22 -17 d s 789 539 m 38 10 d s 866 558 m 22 -16 d s 827 549 m 39 9 d s 904 + 568 m 22 -17 d s 866 558 m 38 10 d s 942 578 m 22 -17 d s 904 568 m 38 10 d s + 942 578 m 28 7 d s 1151 614 m 5 -4 d s 1172 637 m 22 -17 d s 1152 631 m 20 6 d + s 1211 646 m 22 -17 d s 1172 637 m 39 9 d s 1249 656 m 22 -17 d s 1211 646 m 38 + 10 d s 1287 666 m 23 -17 d s 1249 656 m 38 10 d s 1326 676 m 22 -17 d s 1287 + 666 m 39 10 d s 1364 685 m 22 -17 d s 1326 676 m 38 9 d s 1402 695 m 23 -17 d s + 1364 685 m 38 10 d s 1441 705 m 22 -17 d s 1402 695 m 39 10 d s 1479 715 m 22 + -17 d s 1441 705 m 38 10 d s 1517 724 m 23 -16 d s 1479 715 m 38 9 d s 1556 734 + m 22 -17 d s 1517 724 m 39 10 d s 1594 744 m 22 -17 d s 1556 734 m 38 10 d s + 1632 754 m 23 -17 d s 1594 744 m 38 10 d s 1671 763 m 22 -16 d s 1632 754 m 39 + 9 d s 1709 773 m 22 -17 d s 1671 763 m 38 10 d s 575 507 m 22 -17 d s 537 497 m + 38 10 d s 537 497 m 22 -17 d s 613 517 m 23 -17 d s 575 507 m 38 10 d s 652 527 + m 22 -17 d s 613 517 m 39 10 d s 690 536 m 22 -17 d s 652 527 m 38 9 d s 728 + 546 m 23 -17 d s 690 536 m 38 10 d s 767 556 m 22 -17 d s 728 546 m 39 10 d s + 805 566 m 22 -17 d s 767 556 m 38 10 d s 843 575 m 23 -17 d s 805 566 m 38 9 d + s 882 585 m 22 -17 d s 843 575 m 39 10 d s 920 595 m 22 -17 d s 882 585 m 38 10 + d s 958 605 m 12 -9 d s 920 595 m 38 10 d s 958 605 m 11 2 d s 1153 652 m 19 + -15 d s 1189 663 m 22 -17 d s 1153 654 m 36 9 d s 1227 673 m 22 -17 d s 1189 + 663 m 38 10 d s 1265 683 m 22 -17 d s 1227 673 m 38 10 d s 1304 693 m 22 -17 d + s 1265 683 m 39 10 d s 1342 702 m 22 -17 d s 1304 693 m 38 9 d s 1380 712 m 22 + -17 d s 1342 702 m 38 10 d s 1419 722 m 22 -17 d s 1380 712 m 39 10 d s 1457 + 732 m 22 -17 d s 1419 722 m 38 10 d s 1495 741 m 22 -17 d s 1457 732 m 38 9 d s + 1534 751 m 22 -17 d s 1495 741 m 39 10 d s 1572 761 m 22 -17 d s 1534 751 m 38 + 10 d s 1610 771 m 22 -17 d s 1572 761 m 38 10 d s 1649 780 m 22 -17 d s 1610 + 771 m 39 9 d s 1687 790 m 22 -17 d s 1649 780 m 38 10 d s 553 524 m 22 -17 d s + 515 514 m 38 10 d s 515 514 m 22 -17 d s 591 534 m 22 -17 d s 553 524 m 38 10 d + s 630 543 m 22 -16 d s 591 534 m 39 9 d s 668 553 m 22 -17 d s 630 543 m 38 10 + d s 706 563 m 22 -17 d s 668 553 m 38 10 d s 745 573 m 22 -17 d s 706 563 m 39 + 10 d s 783 583 m 22 -17 d s 745 573 m 38 10 d s 821 592 m 22 -17 d s 783 583 m + 38 9 d s 860 602 m 22 -17 d s 821 592 m 39 10 d s 898 612 m 22 -17 d s 860 602 + m 38 10 d s 936 622 m 22 -17 d s 898 612 m 38 10 d s 936 622 m 34 8 d s 1166 + 680 m 23 -17 d s 1151 676 m 15 4 d s 1205 690 m 22 -17 d s 1166 680 m 39 10 d s + 1243 700 m 22 -17 d s 1205 690 m 38 10 d s 1281 709 m 23 -16 d s 1243 700 m 38 + 9 d s 1320 719 m 22 -17 d s 1281 709 m 39 10 d s 1358 729 m 22 -17 d s 1320 719 + m 38 10 d s 1396 739 m 23 -17 d s 1358 729 m 38 10 d s 1435 748 m 22 -16 d s + 1396 739 m 39 9 d s 1473 758 m 22 -17 d s 1435 748 m 38 10 d s 1511 768 m 23 + -17 d s 1473 758 m 38 10 d s 1550 778 m 22 -17 d s 1511 768 m 39 10 d s 1588 + 788 m 22 -17 d s 1550 778 m 38 10 d s 1627 797 m 22 -17 d s 1588 788 m 39 9 d s + 1665 807 m 22 -17 d s 1627 797 m 38 10 d s 531 541 m 22 -17 d s 492 531 m 39 10 + d s 492 531 m 23 -17 d s 569 551 m 22 -17 d s 531 541 m 38 10 d s 607 560 m 23 + -17 d s 569 551 m 38 9 d s 646 570 m 22 -17 d s 607 560 m 39 10 d s 684 580 m + 22 -17 d s 646 570 m 38 10 d s 723 590 m 22 -17 d s 684 580 m 39 10 d s 761 599 + m 22 -16 d s 723 590 m 38 9 d s 799 609 m 22 -17 d s 761 599 m 38 10 d s 838 + 619 m 22 -17 d s 799 609 m 39 10 d s 876 629 m 22 -17 d s 838 619 m 38 10 d s + 914 638 m 22 -16 d s 876 629 m 38 9 d s 953 648 m 17 -13 d s 914 638 m 39 10 d + s 953 648 m 17 5 d s 953 648 m 12 -9 d s 1075 679 m 16 4 d s 1144 697 m 22 -17 + d s 1136 695 m 8 2 d s 1183 707 m 22 -17 d s 1144 697 m 39 10 d s 1221 717 m 22 + -17 d s 1183 707 m 38 10 d s 1259 726 m 22 -17 d s 1221 717 m 38 9 d s 1298 736 + m 22 -17 d s 1259 726 m 39 10 d s 1336 746 m 22 -17 d s 1298 736 m 38 10 d s + 1374 756 m 22 -17 d s 1336 746 m 38 10 d s 1413 765 m 22 -17 d s 1374 756 m 39 + 9 d s 1451 775 m 22 -17 d s 1413 765 m 38 10 d s 1489 785 m 22 -17 d s 1451 775 + m 38 10 d s 1528 795 m 22 -17 d s 1489 785 m 39 10 d s 1566 804 m 22 -16 d s + 1528 795 m 38 9 d s 1604 814 m 23 -17 d s 1566 804 m 38 10 d s 1643 824 m 22 + -17 d s 1604 814 m 39 10 d s 492 531 m s 509 558 m 22 -17 d s 470 548 m 39 10 d + s 470 548 m 22 -17 d s 547 568 m 22 -17 d s 509 558 m 38 10 d s 585 577 m 22 + -17 d s 547 568 m 38 9 d s 624 587 m 22 -17 d s 585 577 m 39 10 d s 662 597 m + 22 -17 d s 624 587 m 38 10 d s 700 607 m 23 -17 d s 662 597 m 38 10 d s 739 616 + m 22 -17 d s 700 607 m 39 9 d s 777 626 m 22 -17 d s 739 616 m 38 10 d s 815 + 636 m 23 -17 d s 777 626 m 38 10 d s 854 646 m 22 -17 d s 815 636 m 39 10 d s + 892 655 m 22 -17 d s 854 646 m 38 9 d s 930 665 m 23 -17 d s 892 655 m 38 10 d + s 930 665 m 39 10 d s 930 665 m 9 -6 d s 941 657 m 6 -5 d s 1084 704 m 15 -12 d + s 1068 700 m 16 4 d s 1122 714 m 22 -17 d s 1084 704 m 38 10 d s 1160 724 m 23 + -17 d s 1122 714 m 38 10 d s 1199 733 m 22 -16 d s 1160 724 m 39 9 d s 1237 743 + m 22 -17 d s 1199 733 m 38 10 d s 1276 753 m 22 -17 d s 1237 743 m 39 10 d s + 1314 763 m 22 -17 d s 1276 753 m 38 10 d s 1352 773 m 22 -17 d s 1314 763 m 38 + 10 d s 1391 782 m 22 -17 d s 1352 773 m 39 9 d s 1429 792 m 22 -17 d s 1391 782 + m 38 10 d s 1467 802 m 22 -17 d s 1429 792 m 38 10 d s 1506 812 m 22 -17 d s + 1467 802 m 39 10 d s 1544 821 m 22 -17 d s 1506 812 m 38 9 d s 1582 831 m 22 + -17 d s 1544 821 m 38 10 d s 1621 841 m 22 -17 d s 1582 831 m 39 10 d s 487 575 + m 22 -17 d s 448 565 m 39 10 d s 448 565 m 22 -17 d s 525 584 m 22 -16 d s 487 + 575 m 38 9 d s 563 594 m 22 -17 d s 525 584 m 38 10 d s 602 604 m 22 -17 d s + 563 594 m 39 10 d s 640 614 m 22 -17 d s 602 604 m 38 10 d s 678 623 m 22 -16 d + s 640 614 m 38 9 d s 717 633 m 22 -17 d s 678 623 m 39 10 d s 755 643 m 22 -17 + d s 717 633 m 38 10 d s 793 653 m 22 -17 d s 755 643 m 38 10 d s 832 663 m 22 + -17 d s 793 653 m 39 10 d s 870 672 m 22 -17 d s 832 663 m 38 9 d s 908 682 m + 22 -17 d s 870 672 m 38 10 d s 947 692 m 22 -17 d s 908 682 m 39 10 d s 916 676 + m 5 -3 d s 926 669 m 4 -4 d s 947 692 m 23 6 d s 1062 721 m 22 -17 d s 1055 719 + m 7 2 d s 1100 731 m 22 -17 d s 1062 721 m 38 10 d s 1138 741 m 22 -17 d s 1100 + 731 m 38 10 d s 1177 750 m 22 -17 d s 1138 741 m 39 9 d s 1215 760 m 22 -17 d s + 1177 750 m 38 10 d s 1253 770 m 23 -17 d s 1215 760 m 38 10 d s 1292 780 m 22 + -17 d s 1253 770 m 39 10 d s 1330 789 m 22 -16 d s 1292 780 m 38 9 d s 1368 799 + m 23 -17 d s 1330 789 m 38 10 d s 1407 809 m 22 -17 d s 1368 799 m 39 10 d s + 1445 819 m 22 -17 d s 1407 809 m 38 10 d s 1483 828 m 23 -16 d s 1445 819 m 38 + 9 d s 1522 838 m 22 -17 d s 1483 828 m 39 10 d s 1560 848 m 22 -17 d s 1522 838 + m 38 10 d s 1598 858 m 23 -17 d s 1560 848 m 38 10 d s 464 592 m 23 -17 d s 426 + 582 m 38 10 d s 426 582 m 22 -17 d s 503 601 m 22 -17 d s 464 592 m 39 9 d s + 541 611 m 22 -17 d s 503 601 m 38 10 d s 579 621 m 23 -17 d s 541 611 m 38 10 d + s 618 631 m 22 -17 d s 579 621 m 39 10 d s 656 640 m 22 -17 d s 618 631 m 38 9 + d s 694 650 m 23 -17 d s 656 640 m 38 10 d s 733 660 m 22 -17 d s 694 650 m 39 + 10 d s 771 670 m 22 -17 d s 733 660 m 38 10 d s 809 679 m 23 -16 d s 771 670 m + 38 9 d s 848 689 m 22 -17 d s 809 679 m 39 10 d s 886 699 m 22 -17 d s 848 689 + m 38 10 d s 924 709 m 23 -17 d s 886 699 m 38 10 d s 963 718 m 7 -5 d s 924 709 + m 39 9 d s 963 718 m 7 2 d s 1040 738 m 22 -17 d s 1011 731 m 29 7 d s 1078 748 + m 22 -17 d s 1040 738 m 38 10 d s 1116 758 m 22 -17 d s 1078 748 m 38 10 d s + 1155 767 m 22 -17 d s 1116 758 m 39 9 d s 1193 777 m 22 -17 d s 1155 767 m 38 + 10 d s 1231 787 m 22 -17 d s 1193 777 m 38 10 d s 1270 797 m 22 -17 d s 1231 + 787 m 39 10 d s 1308 806 m 22 -17 d s 1270 797 m 38 9 d s 1346 816 m 22 -17 d s + 1308 806 m 38 10 d s 1385 826 m 22 -17 d s 1346 816 m 39 10 d s 1423 836 m 22 + -17 d s 1385 826 m 38 10 d s 1461 845 m 22 -17 d s 1423 836 m 38 9 d s 1500 855 + m 22 -17 d s 1461 845 m 39 10 d s 1538 865 m 22 -17 d s 1500 855 m 38 10 d s + 1576 875 m 22 -17 d s 1538 865 m 38 10 d s 442 609 m 22 -17 d s 404 599 m 38 10 + d s 404 599 m 22 -17 d s 481 618 m 22 -17 d s 442 609 m 39 9 d s 519 628 m 22 + -17 d s 481 618 m 38 10 d s 557 638 m 22 -17 d s 519 628 m 38 10 d s 596 648 m + 22 -17 d s 557 638 m 39 10 d s 634 657 m 22 -17 d s 596 648 m 38 9 d s 672 667 + m 22 -17 d s 634 657 m 38 10 d s 711 677 m 22 -17 d s 672 667 m 39 10 d s 749 + 687 m 22 -17 d s 711 677 m 38 10 d s 787 696 m 22 -17 d s 749 687 m 38 9 d s + 826 706 m 22 -17 d s 787 696 m 39 10 d s 864 716 m 22 -17 d s 826 706 m 38 10 d + s 902 726 m 22 -17 d s 864 716 m 38 10 d s 941 735 m 22 -17 d s 902 726 m 39 9 + d s 979 745 m 18 -13 d s 941 735 m 38 10 d s 1017 755 m 23 -17 d s 979 745 m 38 + 10 d s 1056 765 m 22 -17 d s 1017 755 m 39 10 d s 1094 774 m 22 -16 d s 1056 + 765 m 38 9 d s 1132 784 m 23 -17 d s 1094 774 m 38 10 d s 1171 794 m 22 -17 d s + 1132 784 m 39 10 d s 1209 804 m 22 -17 d s 1171 794 m 38 10 d s 1247 813 m 23 + -16 d s 1209 804 m 38 9 d s 1286 823 m 22 -17 d s 1247 813 m 39 10 d s 1324 833 + m 22 -17 d s 1286 823 m 38 10 d s 1362 843 m 23 -17 d s 1324 833 m 38 10 d s + 1401 853 m 22 -17 d s 1362 843 m 39 10 d s 1439 862 m 22 -17 d s 1401 853 m 38 + 9 d s 1500 855 m 158 Y s 1461 1003 m 39 10 d s 1461 845 m 158 Y s 1439 1020 m + 22 -17 d s 1439 862 m 158 Y s 1477 1030 m 23 -17 d s 1439 1020 m 38 10 d s 1538 + 865 m 79 Y s 1500 934 m 38 10 d s 1516 961 m 22 -17 d s 1498 956 m 18 5 d s + 1576 875 m 108 Y s 1538 973 m 38 10 d s 1538 944 m 29 Y s 1516 990 m 22 -17 d s + 1516 961 m 29 Y s 1554 1000 m 22 -17 d s 1516 990 m 38 10 d s 420 625 m 22 -16 + d s 382 616 m 38 9 d s 382 616 m 22 -17 d s 458 635 m 23 -17 d s 420 625 m 38 + 10 d s 497 645 m 22 -17 d s 458 635 m 39 10 d s 535 655 m 22 -17 d s 497 645 m + 38 10 d s 573 664 m 23 -16 d s 535 655 m 38 9 d s 612 674 m 22 -17 d s 573 664 + m 39 10 d s 650 684 m 22 -17 d s 612 674 m 38 10 d s 689 694 m 22 -17 d s 650 + 684 m 39 10 d s 727 703 m 22 -16 d s 689 694 m 38 9 d s 765 713 m 22 -17 d s + 727 703 m 38 10 d s 804 723 m 22 -17 d s 765 713 m 39 10 d s 842 733 m 22 -17 d + s 804 723 m 38 10 d s 880 743 m 22 -17 d s 842 733 m 38 10 d s 919 752 m 22 -17 + d s 880 743 m 39 9 d s 957 762 m 22 -17 d s 919 752 m 38 10 d s 995 772 m 22 + -17 d s 957 762 m 38 10 d s 1034 782 m 22 -17 d s 995 772 m 39 10 d s 1072 791 + m 22 -17 d s 1034 782 m 38 9 d s 1110 801 m 22 -17 d s 1072 791 m 38 10 d s + 1149 811 m 22 -17 d s 1110 801 m 39 10 d s 1187 821 m 22 -17 d s 1149 811 m 38 + 10 d s 1225 830 m 22 -17 d s 1187 821 m 38 9 d s 1264 840 m 22 -17 d s 1225 830 + m 39 10 d s 1302 850 m 22 -17 d s 1264 840 m 38 10 d s 1340 860 m 22 -17 d s + 1302 850 m 38 10 d s 1379 869 m 22 -16 d s 1340 860 m 39 9 d s 1417 879 m 22 + -17 d s 1379 869 m 38 10 d s 1417 958 m 22 -17 d s 1417 879 m 79 Y s 1417 958 m + 23 6 d s 1498 966 m 18 4 d s 1499 984 m 17 -14 d s 1554 1000 m 20 Y s 1516 1010 + m 38 10 d s 1516 990 m 20 Y s 1494 1027 m 22 -17 d s 1494 1017 m 10 Y s 1532 + 1037 m 22 -17 d s 1494 1027 m 38 10 d s 398 642 m 22 -17 d s 360 633 m 38 9 d s + 360 633 m 22 -17 d s 436 652 m 22 -17 d s 398 642 m 38 10 d s 475 662 m 22 -17 + d s 436 652 m 39 10 d s 513 672 m 22 -17 d s 475 662 m 38 10 d s 551 681 m 22 + -17 d s 513 672 m 38 9 d s 590 691 m 22 -17 d s 551 681 m 39 10 d s 628 701 m + 22 -17 d s 590 691 m 38 10 d s 666 711 m 23 -17 d s 628 701 m 38 10 d s 705 720 + m 22 -17 d s 666 711 m 39 9 d s 743 730 m 22 -17 d s 705 720 m 38 10 d s 781 + 740 m 23 -17 d s 743 730 m 38 10 d s 820 750 m 22 -17 d s 781 740 m 39 10 d s + 858 759 m 22 -16 d s 820 750 m 38 9 d s 896 769 m 23 -17 d s 858 759 m 38 10 d + s 935 779 m 22 -17 d s 896 769 m 39 10 d s 973 789 m 22 -17 d s 935 779 m 38 10 + d s 1011 798 m 23 -16 d s 973 789 m 38 9 d s 1050 808 m 22 -17 d s 1011 798 m + 39 10 d s 1088 818 m 22 -17 d s 1050 808 m 38 10 d s 1126 828 m 23 -17 d s 1088 + 818 m 38 10 d s 1165 838 m 22 -17 d s 1126 828 m 39 10 d s 1203 847 m 22 -17 d + s 1165 838 m 38 9 d s 1242 857 m 22 -17 d s 1203 847 m 39 10 d s 1280 867 m 22 + -17 d s 1242 857 m 38 10 d s 1318 877 m 22 -17 d s 1280 867 m 38 10 d s 1357 + 886 m 22 -17 d s 1318 877 m 39 9 d s 1395 896 m 22 -17 d s 1357 886 m 38 10 d s + 1395 955 m 22 -17 d s 1395 896 m 59 Y s 1433 965 m 3 -2 d s 1395 955 m 38 10 d + s 376 659 m 22 -17 d s 337 649 m 39 10 d s 337 649 m 23 -16 d s 414 669 m 22 + -17 d s 376 659 m 38 10 d s 453 679 m 22 -17 d s 414 669 m 39 10 d s 513 672 m + 787 Y s 475 1450 m 38 9 d s 475 662 m 788 Y s 453 1467 m 22 -17 d s 453 679 m + 788 Y s 491 1476 m 22 -17 d s 453 1467 m 38 9 d s 551 681 m 867 Y s 513 1538 m + 38 10 d s 513 1459 m 79 Y s 491 1555 m 22 -17 d s 491 1476 m 79 Y s 529 1565 m + 22 -17 d s 491 1555 m 38 10 d s 590 691 m 788 Y s 551 1469 m 39 10 d s 568 1496 + m 22 -17 d s 552 1492 m 16 4 d s 606 718 m 22 -17 d s 591 714 m 15 4 d s 644 + 728 m 22 -17 d s 606 718 m 38 10 d s 683 737 m 22 -17 d s 644 728 m 39 9 d s + 721 747 m 22 -17 d s 683 737 m 38 10 d s 759 757 m 22 -17 d s 721 747 m 38 10 d + s 798 767 m 22 -17 d s 759 757 m 39 10 d s 836 776 m 22 -17 d s 798 767 m 38 9 + d s 874 786 m 22 -17 d s 836 776 m 38 10 d s 913 796 m 22 -17 d s 874 786 m 39 + 10 d s 951 806 m 22 -17 d s 913 796 m 38 10 d s 989 815 m 22 -17 d s 951 806 m + 38 9 d s 1028 825 m 22 -17 d s 989 815 m 39 10 d s 1066 835 m 22 -17 d s 1028 + 825 m 38 10 d s 1104 845 m 22 -17 d s 1066 835 m 38 10 d s 1143 854 m 22 -16 d + s 1104 845 m 39 9 d s 1181 864 m 22 -17 d s 1143 854 m 38 10 d s 1219 874 m 23 + -17 d s 1181 864 m 38 10 d s 1258 884 m 22 -17 d s 1219 874 m 39 10 d s 1296 + 893 m 22 -16 d s 1258 884 m 38 9 d s 1334 903 m 23 -17 d s 1296 893 m 38 10 d s + 1373 913 m 22 -17 d s 1334 903 m 39 10 d s 1373 913 m 23 6 d s 337 649 m cl s + 354 676 m 22 -17 d s 315 666 m 39 10 d s 315 666 m 22 -17 d s 392 686 m 22 -17 + d s 354 676 m 38 10 d s 430 696 m 23 -17 d s 392 686 m 38 10 d s 453 1536 m 38 + 9 d s 453 1467 m 69 Y s 430 1552 m 23 -16 d s 430 696 m 856 Y s 469 1562 m 22 + -17 d s 430 1552 m 39 10 d s 568 1496 m 226 Y s 529 1713 m 39 9 d s 529 1565 m + 148 Y s 507 1730 m 22 -17 d s 507 1559 m 171 Y s 545 1739 m 23 -17 d s 507 1730 + m 38 9 d s 589 730 m 17 -12 d s 622 744 m 22 -16 d s 589 736 m 33 8 d s 660 754 + m 23 -17 d s 622 744 m 38 10 d s 699 764 m 22 -17 d s 660 754 m 39 10 d s 737 + 774 m 22 -17 d s 699 764 m 38 10 d s 775 783 m 23 -16 d s 737 774 m 38 9 d s + 814 793 m 22 -17 d s 775 783 m 39 10 d s 852 803 m 22 -17 d s 814 793 m 38 10 d + s 890 813 m 23 -17 d s 852 803 m 38 10 d s 929 823 m 22 -17 d s 890 813 m 39 10 + d s 967 832 m 22 -17 d s 929 823 m 38 9 d s 1006 842 m 22 -17 d s 967 832 m 39 + 10 d s 1044 852 m 22 -17 d s 1006 842 m 38 10 d s 1082 862 m 22 -17 d s 1044 + 852 m 38 10 d s 1121 871 m 22 -17 d s 1082 862 m 39 9 d s 1159 881 m 22 -17 d s + 1121 871 m 38 10 d s 1197 891 m 22 -17 d s 1159 881 m 38 10 d s 1236 901 m 22 + -17 d s 1197 891 m 39 10 d s 1274 910 m 22 -17 d s 1236 901 m 38 9 d s 1312 920 + m 22 -17 d s 1274 910 m 38 10 d s 1351 930 m 22 -17 d s 1312 920 m 39 10 d s + 1389 940 m 5 -5 d s 1351 930 m 38 10 d s 1389 940 m 5 1 d s 332 693 m 22 -17 d + s 293 683 m 39 10 d s 293 683 m 22 -17 d s 370 703 m 22 -17 d s 332 693 m 38 10 + d s 408 713 m 22 -17 d s 370 703 m 38 10 d s 408 1530 m 22 -17 d s 408 713 m + 817 Y s 408 1530 m 23 6 d s 485 1658 m 22 -17 d s 485 1549 m 109 Y s 485 1658 m + 20 5 d s 600 761 m 22 -17 d s 590 759 m 10 2 d s 638 771 m 22 -17 d s 600 761 m + 38 10 d s 677 781 m 22 -17 d s 638 771 m 39 10 d s 715 791 m 22 -17 d s 677 781 + m 38 10 d s 753 800 m 22 -17 d s 715 791 m 38 9 d s 792 810 m 22 -17 d s 753 + 800 m 39 10 d s 830 820 m 22 -17 d s 792 810 m 38 10 d s 868 830 m 22 -17 d s + 830 820 m 38 10 d s 907 839 m 22 -16 d s 868 830 m 39 9 d s 945 849 m 22 -17 d + s 907 839 m 38 10 d s 983 859 m 23 -17 d s 945 849 m 38 10 d s 1022 869 m 22 + -17 d s 983 859 m 39 10 d s 1060 878 m 22 -16 d s 1022 869 m 38 9 d s 1098 888 + m 23 -17 d s 1060 878 m 38 10 d s 1137 898 m 22 -17 d s 1098 888 m 39 10 d s + 1175 908 m 22 -17 d s 1137 898 m 38 10 d s 1213 918 m 23 -17 d s 1175 908 m 38 + 10 d s 1252 927 m 22 -17 d s 1213 918 m 39 9 d s 1290 937 m 22 -17 d s 1252 927 + m 38 10 d s 1328 947 m 23 -17 d s 1290 937 m 38 10 d s 1367 957 m 22 -17 d s + 1328 947 m 39 10 d s 1405 966 m 8 -6 d s 1367 957 m 38 9 d s 1405 966 m 36 9 d + s 293 683 m cl s 309 710 m 23 -17 d s 271 700 m 38 10 d s 271 700 m 22 -17 d s + 348 720 m 22 -17 d s 309 710 m 39 10 d s 386 729 m 22 -16 d s 348 720 m 38 9 d + s 386 729 m 22 6 d s 590 769 m 10 -8 d s 616 788 m 22 -17 d s 591 782 m 25 6 d + s 655 798 m 22 -17 d s 616 788 m 39 10 d s 693 808 m 22 -17 d s 655 798 m 38 10 + d s 731 817 m 22 -17 d s 693 808 m 38 9 d s 770 827 m 22 -17 d s 731 817 m 39 + 10 d s 808 837 m 22 -17 d s 770 827 m 38 10 d s 846 847 m 22 -17 d s 808 837 m + 38 10 d s 885 856 m 22 -17 d s 846 847 m 39 9 d s 923 866 m 22 -17 d s 885 856 + m 38 10 d s 961 876 m 22 -17 d s 923 866 m 38 10 d s 1000 886 m 22 -17 d s 961 + 876 m 39 10 d s 1038 895 m 22 -17 d s 1000 886 m 38 9 d s 1076 905 m 22 -17 d s + 1038 895 m 38 10 d s 1115 915 m 22 -17 d s 1076 905 m 39 10 d s 1153 925 m 22 + -17 d s 1115 915 m 38 10 d s 1191 934 m 22 -16 d s 1153 925 m 38 9 d s 1230 944 + m 22 -17 d s 1191 934 m 39 10 d s 1268 954 m 22 -17 d s 1230 944 m 38 10 d s + 1323 946 m 3 X s 1306 964 m 22 -17 d s 1268 954 m 38 10 d s 1345 973 m 22 -16 d + s 1306 964 m 39 9 d s 1383 983 m 22 -17 d s 1345 973 m 38 10 d s 1438 975 m 3 X + s 1421 993 m 20 -15 d s 1383 983 m 38 10 d s 287 727 m 22 -17 d s 249 717 m 38 + 10 d s 249 717 m 22 -17 d s 326 737 m 22 -17 d s 287 727 m 39 10 d s 364 746 m + 22 -17 d s 326 737 m 38 9 d s 402 756 m 5 -4 d s 364 746 m 38 10 d s 402 756 m + 5 1 d s 594 805 m 22 -17 d s 589 804 m 5 1 d s 632 815 m 23 -17 d s 594 805 m + 38 10 d s 671 824 m 22 -16 d s 632 815 m 39 9 d s 709 834 m 22 -17 d s 671 824 + m 38 10 d s 747 844 m 23 -17 d s 709 834 m 38 10 d s 709 834 m 17 -13 d s 786 + 854 m 22 -17 d s 747 844 m 39 10 d s 824 863 m 22 -16 d s 786 854 m 38 9 d s + 862 873 m 23 -17 d s 824 863 m 38 10 d s 901 883 m 22 -17 d s 862 873 m 39 10 d + s 939 893 m 22 -17 d s 901 883 m 38 10 d s 977 903 m 23 -17 d s 939 893 m 38 10 + d s 1016 912 m 22 -17 d s 977 903 m 39 9 d s 1054 922 m 22 -17 d s 1016 912 m + 38 10 d s 1092 932 m 23 -17 d s 1054 922 m 38 10 d s 1131 942 m 22 -17 d s 1092 + 932 m 39 10 d s 1169 951 m 22 -17 d s 1131 942 m 38 9 d s 1208 961 m 22 -17 d s + 1169 951 m 39 10 d s 1246 971 m 22 -17 d s 1208 961 m 38 10 d s 1284 981 m 22 + -17 d s 1246 971 m 38 10 d s 1323 990 m 22 -17 d s 1284 981 m 39 9 d s 1361 + 1000 m 22 -17 d s 1323 990 m 38 10 d s 1399 1010 m 22 -17 d s 1361 1000 m 38 10 + d s 249 717 m cl s 265 744 m 22 -17 d s 227 734 m 38 10 d s 227 734 m 22 -17 d + s 303 754 m 23 -17 d s 265 744 m 38 10 d s 342 763 m 22 -17 d s 303 754 m 39 9 + d s 380 773 m 22 -17 d s 342 763 m 38 10 d s 380 773 m 28 7 d s 589 809 m 5 -4 + d s 610 832 m 22 -17 d s 590 826 m 20 6 d s 649 841 m 22 -17 d s 610 832 m 39 9 + d s 687 851 m 22 -17 d s 649 841 m 38 10 d s 725 861 m 22 -17 d s 687 851 m 38 + 10 d s 764 871 m 22 -17 d s 725 861 m 39 10 d s 802 880 m 22 -17 d s 764 871 m + 38 9 d s 840 890 m 22 -17 d s 802 880 m 38 10 d s 879 900 m 22 -17 d s 840 890 + m 39 10 d s 917 910 m 22 -17 d s 879 900 m 38 10 d s 955 919 m 22 -16 d s 917 + 910 m 38 9 d s 994 929 m 22 -17 d s 955 919 m 39 10 d s 1032 939 m 22 -17 d s + 994 929 m 38 10 d s 1070 949 m 22 -17 d s 1032 939 m 38 10 d s 1109 958 m 22 + -16 d s 1070 949 m 39 9 d s 1147 968 m 22 -17 d s 1109 958 m 38 10 d s 1185 978 + m 23 -17 d s 1147 968 m 38 10 d s 1224 988 m 22 -17 d s 1185 978 m 39 10 d s + 1279 979 m 3 1 d s 1262 998 m 22 -17 d s 1224 988 m 38 10 d s 1300 1007 m 23 + -17 d s 1262 998 m 38 9 d s 1339 1017 m 22 -17 d s 1300 1007 m 39 10 d s 1377 + 1027 m 22 -17 d s 1339 1017 m 38 10 d s [4 8] 0 sd 227 931 m 180 46 d s 589 + 1023 m 788 201 d s 227 1128 m 180 46 d s 589 1220 m 788 201 d s 227 1325 m 180 + 46 d s 589 1417 m 788 201 d s 227 1522 m 258 66 d s 566 1608 m 811 207 d s 227 + 1719 m 1150 293 d s [] 0 sd 227 734 m s 758 869 m 44 11 d s 979 925 m 111 29 d + s 1244 993 m 133 34 d s 1377 1027 m 1014 Y s 227 1748 m 1150 293 d s 227 734 m + 1014 Y s [4 8] 0 sd 1377 1224 m 664 -507 d s 1377 1421 m 664 -507 d s 1377 1618 + m 664 -507 d s 1377 1815 m 664 -508 d s 1377 2012 m 664 -508 d s [] 0 sd 1377 + 1027 m s 1437 981 m 3 -3 d s 1619 842 m 7 -5 d s 1709 773 m s 1951 589 m 7 -6 d + s 2041 520 m 1014 Y s 1377 2041 m 664 -507 d s 227 734 m 664 -507 d s 891 227 m + 1014 Y s 227 1748 m 664 -507 d s 227 734 m 1014 Y s 891 227 m 1150 293 d s 2041 + 520 m 1014 Y s 891 1241 m 1150 293 d s 891 1241 m cl s 891 227 m 1150 293 d s + 891 193 m 34 Y s 914 216 m 17 Y s 937 222 m 17 Y s 960 227 m 17 Y s 983 233 m + 17 Y s 1006 222 m 34 Y s 1029 245 m 17 Y s 1052 251 m 17 Y s 1075 257 m 17 Y s + 1098 262 m 18 Y s 1121 251 m 34 Y s 1144 274 m 17 Y s 1167 280 m 17 Y s 1190 + 286 m 17 Y s 1213 292 m 17 Y s 1236 281 m 34 Y s 1259 303 m 18 Y s 1282 309 m + 17 Y s 1305 315 m 17 Y s 1328 321 m 17 Y s 1351 310 m 34 Y s 1374 333 m 17 Y s + 1397 339 m 17 Y s 1420 344 m 18 Y s 1443 350 m 17 Y s 1466 339 m 34 Y s 1489 + 362 m 17 Y s 1512 368 m 17 Y s 1535 374 m 17 Y s 1558 380 m 17 Y s 1581 368 m + 34 Y s 1604 391 m 17 Y s 1627 397 m 17 Y s 1650 403 m 17 Y s 1673 409 m 17 Y s + 1696 398 m 34 Y s 1719 421 m 17 Y s 1742 426 m 17 Y s 1765 432 m 17 Y s 1788 + 438 m 17 Y s 1811 427 m 34 Y s 1834 450 m 17 Y s 1857 456 m 17 Y s 1880 462 m + 17 Y s 1903 467 m 17 Y s 1926 456 m 34 Y s 1949 479 m 17 Y s 1972 485 m 17 Y s + 1995 491 m 17 Y s 2018 497 m 17 Y s 2041 486 m 34 Y s 893 174 m -4 -2 d -3 -5 d + -2 -7 d -5 Y 2 -7 d 3 -5 d 4 -1 d 3 X 5 1 d 3 5 d 1 7 d 5 Y -1 7 d -3 5 d -5 2 + d -3 X cl s 994 203 m -5 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -4 d 5 -2 d 3 X 4 2 + d 3 4 d 2 8 d 4 Y -2 8 d -3 4 d -4 2 d -3 X cl s 1018 174 m -2 -1 d 2 -2 d 1 2 + d -1 1 d cl s 1034 197 m 3 1 d 5 5 d -32 Y s 1109 232 m -5 -1 d -3 -5 d -2 -8 d + -4 Y 2 -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 5 d -4 1 d -3 X + cl s 1133 203 m -2 -1 d 2 -2 d 1 2 d -1 1 d cl s 1146 225 m 1 Y 2 3 d 1 2 d 3 1 + d 6 X 3 -1 d 2 -2 d 1 -3 d -3 Y -1 -3 d -3 -5 d -15 -15 d 21 X s 1224 261 m -5 + -1 d -3 -5 d -2 -7 d -5 Y 2 -7 d 3 -5 d 5 -1 d 3 X 4 1 d 3 5 d 2 7 d 5 Y -2 7 d + -3 5 d -4 1 d -3 X cl s 1248 233 m -2 -2 d 2 -1 d 1 1 d -1 2 d cl s 1263 261 m + 17 X -10 -12 d 5 X 3 -1 d 2 -2 d 1 -4 d -3 Y -1 -5 d -4 -3 d -4 -1 d -5 X -4 1 + d -2 2 d -1 3 d s 1339 291 m -5 -2 d -3 -4 d -1 -8 d -5 Y 1 -7 d 3 -5 d 5 -1 d + 3 X 4 1 d 3 5 d 2 7 d 5 Y -2 8 d -3 4 d -4 2 d -3 X cl s 1363 262 m -2 -2 d 2 + -1 d 1 1 d -1 2 d cl s 1390 291 m -15 -22 d 23 X s 1390 291 m -32 Y s 1454 320 + m -5 -2 d -3 -4 d -1 -8 d -4 Y 1 -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 4 d 2 8 d 4 Y + -2 8 d -3 4 d -4 2 d -3 X cl s 1478 291 m -2 -1 d 2 -2 d 1 2 d -1 1 d cl s 1508 + 320 m -15 X -2 -14 d 2 2 d 4 1 d 5 X 5 -1 d 3 -3 d 1 -5 d -3 Y -1 -4 d -3 -3 d + -5 -2 d -5 X -4 2 d -2 1 d -1 3 d s 1569 349 m -5 -1 d -3 -5 d -1 -7 d -5 Y 1 + -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 4 d 2 8 d 5 Y -2 7 d -3 5 d -4 1 d -3 X cl s + 1593 320 m -2 -1 d 2 -2 d 1 2 d -1 1 d cl s 1625 345 m -2 3 d -4 1 d -3 X -5 -1 + d -3 -5 d -2 -7 d -8 Y 2 -6 d 3 -3 d 5 -2 d 1 X 5 2 d 3 3 d 1 5 d 1 Y -1 5 d -3 + 3 d -5 1 d -1 X -5 -1 d -3 -3 d -2 -5 d s 1684 378 m -5 -1 d -3 -5 d -1 -7 d -5 + Y 1 -7 d 3 -5 d 5 -1 d 3 X 4 1 d 3 5 d 2 7 d 5 Y -2 7 d -3 5 d -4 1 d -3 X cl s + 1708 350 m -2 -2 d 2 -1 d 1 1 d -1 2 d cl s 1741 378 m -15 -31 d s 1720 378 m + 21 X s 1799 408 m -5 -2 d -3 -4 d -1 -8 d -4 Y 1 -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 + 4 d 2 8 d 4 Y -2 8 d -3 4 d -4 2 d -3 X cl s 1823 379 m -2 -1 d 2 -2 d 1 2 d -1 + 1 d cl s 1843 408 m -5 -2 d -1 -3 d -3 Y 1 -3 d 3 -1 d 6 -2 d 5 -1 d 3 -3 d 1 + -3 d -5 Y -1 -3 d -2 -1 d -4 -2 d -6 X -5 2 d -1 1 d -2 3 d 5 Y 2 3 d 3 3 d 4 1 + d 6 2 d 3 1 d 2 3 d 3 Y -2 3 d -4 2 d -6 X cl s 1914 437 m -5 -1 d -3 -5 d -1 + -8 d -4 Y 1 -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 5 d -4 1 d + -3 X cl s 1938 408 m -2 -1 d 2 -2 d 1 2 d -1 1 d cl s 1970 426 m -2 -4 d -3 -3 + d -4 -2 d -2 X -4 2 d -3 3 d -2 4 d 2 Y 2 5 d 3 3 d 4 1 d 2 X 4 -1 d 3 -3 d 2 + -7 d -7 Y -2 -8 d -3 -4 d -4 -2 d -3 X -5 2 d -1 3 d s 2039 460 m 3 2 d 5 4 d + -31 Y s 891 227 m -664 507 d s 891 193 m 34 Y s 878 220 m 17 Y s 864 230 m 17 Y + s 851 240 m 17 Y s 838 250 m 17 Y s 825 243 m 35 Y s 811 271 m 17 Y s 798 281 m + 17 Y s 785 291 m 17 Y s 771 301 m 17 Y s 758 294 m 34 Y s 745 321 m 17 Y s 732 + 332 m 17 Y s 718 342 m 17 Y s 705 352 m 17 Y s 692 345 m 34 Y s 678 372 m 17 Y + s 665 382 m 17 Y s 652 392 m 17 Y s 639 403 m 17 Y s 625 396 m 34 Y s 612 423 m + 17 Y s 599 433 m 17 Y s 585 443 m 17 Y s 572 453 m 17 Y s 559 446 m 34 Y s 546 + 474 m 17 Y s 532 484 m 17 Y s 519 494 m 17 Y s 506 504 m 17 Y s 492 497 m 34 Y + s 479 524 m 17 Y s 466 534 m 17 Y s 453 545 m 17 Y s 439 555 m 17 Y s 426 548 m + 34 Y s 413 575 m 17 Y s 399 585 m 17 Y s 386 595 m 17 Y s 373 605 m 17 Y s 360 + 599 m 34 Y s 346 626 m 17 Y s 333 636 m 17 Y s 320 646 m 17 Y s 306 656 m 17 Y + s 293 649 m 34 Y s 280 676 m 17 Y s 267 687 m 17 Y s 253 697 m 17 Y s 240 707 m + 17 Y s 227 700 m 34 Y s 891 193 m 34 Y s 880 133 m -5 -2 d -3 -4 d -1 -8 d -4 Y + 1 -8 d 3 -5 d 5 -1 d 3 X 4 1 d 3 5 d 2 8 d 4 Y -2 8 d -3 4 d -4 2 d -3 X cl s + 771 183 m -4 -1 d -3 -5 d -2 -7 d -5 Y 2 -7 d 3 -5 d 4 -1 d 3 X 5 1 d 3 5 d 2 7 + d 5 Y -2 7 d -3 5 d -5 1 d -3 X cl s 796 155 m -2 -2 d 2 -1 d 1 1 d -1 2 d cl s + 812 177 m 3 2 d 5 4 d -31 Y s 705 234 m -5 -1 d -3 -5 d -1 -7 d -5 Y 1 -8 d 3 + -4 d 5 -2 d 3 X 5 2 d 3 4 d 1 8 d 5 Y -1 7 d -3 5 d -5 1 d -3 X cl s 729 205 m + -1 -1 d 1 -2 d 2 2 d -2 1 d cl s 743 227 m 1 Y 1 3 d 2 2 d 3 1 d 6 X 3 -1 d 1 + -2 d 2 -3 d -3 Y -2 -3 d -3 -5 d -15 -15 d 21 X s 639 285 m -5 -2 d -3 -4 d -1 + -8 d -4 Y 1 -8 d 3 -4 d 5 -2 d 3 X 4 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 4 d -4 2 d + -3 X cl s 663 256 m -2 -1 d 2 -2 d 1 2 d -1 1 d cl s 678 285 m 17 X -10 -12 d 5 + X 3 -2 d 2 -1 d 1 -5 d -3 Y -1 -4 d -3 -3 d -5 -2 d -5 X -4 2 d -2 1 d -1 3 d s + 572 336 m -4 -2 d -3 -4 d -2 -8 d -5 Y 2 -7 d 3 -5 d 4 -1 d 3 X 5 1 d 3 5 d 1 7 + d 5 Y -1 8 d -3 4 d -5 2 d -3 X cl s 596 307 m -1 -2 d 1 -1 d 2 1 d -2 2 d cl s + 624 336 m -16 -22 d 23 X s 624 336 m -32 Y s 506 386 m -5 -1 d -3 -5 d -1 -7 d + -5 Y 1 -7 d 3 -5 d 5 -1 d 3 X 4 1 d 3 5 d 2 7 d 5 Y -2 7 d -3 5 d -4 1 d -3 X + cl s 530 358 m -2 -2 d 2 -1 d 1 1 d -1 2 d cl s 560 386 m -15 X -1 -13 d 1 1 d + 5 2 d 4 X 5 -2 d 3 -3 d 1 -4 d -3 Y -1 -5 d -3 -3 d -5 -1 d -4 X -5 1 d -1 2 d + -2 3 d s 439 437 m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -4 d 4 -2 d 3 X 5 2 d + 3 4 d 1 8 d 4 Y -1 8 d -3 4 d -5 2 d -3 X cl s 464 408 m -2 -1 d 2 -2 d 1 2 d + -1 1 d cl s 495 432 m -1 3 d -5 2 d -3 X -4 -2 d -3 -4 d -2 -8 d -7 Y 2 -6 d 3 + -3 d 4 -2 d 2 X 4 2 d 3 3 d 2 4 d 2 Y -2 4 d -3 3 d -4 2 d -2 X -4 -2 d -3 -3 d + -2 -4 d s 373 488 m -5 -2 d -3 -4 d -1 -8 d -4 Y 1 -8 d 3 -5 d 5 -1 d 3 X 4 1 d + 4 5 d 1 8 d 4 Y -1 8 d -4 4 d -4 2 d -3 X cl s 397 459 m -1 -2 d 1 -1 d 2 1 d + -2 2 d cl s 430 488 m -15 -32 d s 409 488 m 21 X s 307 538 m -5 -1 d -3 -5 d -2 + -7 d -5 Y 2 -7 d 3 -5 d 5 -1 d 3 X 4 1 d 3 5 d 2 7 d 5 Y -2 7 d -3 5 d -4 1 d + -3 X cl s 331 510 m -2 -2 d 2 -1 d 1 1 d -1 2 d cl s 350 538 m -4 -1 d -2 -3 d + -3 Y 2 -3 d 3 -2 d 6 -1 d 4 -2 d 3 -3 d 2 -3 d -4 Y -2 -3 d -1 -2 d -5 -1 d -6 + X -4 1 d -2 2 d -1 3 d 4 Y 1 3 d 3 3 d 5 2 d 6 1 d 3 2 d 1 3 d 3 Y -1 3 d -5 1 + d -6 X cl s 240 589 m -4 -1 d -3 -5 d -2 -7 d -5 Y 2 -8 d 3 -4 d 4 -2 d 3 X 5 2 + d 3 4 d 1 8 d 5 Y -1 7 d -3 5 d -5 1 d -3 X cl s 264 560 m -1 -1 d 1 -2 d 2 2 d + -2 1 d cl s 296 579 m -1 -5 d -3 -3 d -5 -2 d -2 X -4 2 d -3 3 d -2 5 d 1 Y 2 5 + d 3 3 d 4 1 d 2 X 5 -1 d 3 -3 d 1 -6 d -8 Y -1 -8 d -3 -4 d -5 -2 d -3 X -5 2 d + -1 3 d s 211 634 m 3 1 d 5 5 d -32 Y s 227 734 m 1014 Y s 193 734 m 34 X s 210 + 783 m 17 X s 210 832 m 17 X s 210 882 m 17 X s 193 931 m 34 X s 210 980 m 17 X + s 210 1029 m 17 X s 210 1079 m 17 X s 193 1128 m 34 X s 210 1177 m 17 X s 210 + 1226 m 17 X s 210 1276 m 17 X s 193 1325 m 34 X s 210 1374 m 17 X s 210 1423 m + 17 X s 210 1473 m 17 X s 193 1522 m 34 X s 210 1571 m 17 X s 210 1620 m 17 X s + 210 1670 m 17 X s 193 1719 m 34 X s 193 1719 m 34 X s 153 750 m -4 -2 d -3 -4 d + -2 -8 d -4 Y 2 -8 d 3 -4 d 4 -2 d 3 X 5 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 4 d -5 2 + d -3 X cl s 116 939 m 2 Y 1 3 d 2 1 d 3 2 d 6 X 3 -2 d 1 -1 d 2 -3 d -3 Y -2 -3 + d -3 -5 d -15 -15 d 21 X s 153 947 m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -4 d + 4 -2 d 3 X 5 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 4 d -5 2 d -3 X cl s 129 1144 m -15 + -21 d 23 X s 129 1144 m -32 Y s 153 1144 m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d + 3 -4 d 4 -2 d 3 X 5 2 d 3 4 d 2 8 d 4 Y -2 8 d -3 4 d -5 2 d -3 X cl s 134 1336 + m -2 3 d -4 2 d -3 X -5 -2 d -3 -4 d -1 -8 d -7 Y 1 -6 d 3 -3 d 5 -2 d 1 X 5 2 + d 3 3 d 1 4 d 2 Y -1 4 d -3 3 d -5 2 d -1 X -5 -2 d -3 -3 d -1 -4 d s 153 1341 + m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -4 d 4 -2 d 3 X 5 2 d 3 4 d 2 8 d 4 Y + -2 8 d -3 4 d -5 2 d -3 X cl s 122 1538 m -5 -2 d -1 -3 d -3 Y 1 -3 d 3 -1 d 6 + -2 d 5 -1 d 3 -3 d 1 -3 d -5 Y -1 -3 d -2 -2 d -4 -1 d -6 X -5 1 d -1 2 d -2 3 + d 5 Y 2 3 d 3 3 d 4 1 d 6 2 d 3 1 d 2 3 d 3 Y -2 3 d -4 2 d -6 X cl s 153 1538 + m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -5 d 4 -1 d 3 X 5 1 d 3 5 d 2 8 d 4 Y + -2 8 d -3 4 d -5 2 d -3 X cl s 88 1729 m 3 1 d 5 5 d -32 Y s 123 1735 m -4 -2 d + -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -5 d 4 -1 d 3 X 5 1 d 3 5 d 1 8 d 4 Y -1 8 d -3 4 + d -5 2 d -3 X cl s 153 1735 m -4 -2 d -3 -4 d -2 -8 d -4 Y 2 -8 d 3 -5 d 4 -1 d + 3 X 5 1 d 3 5 d 2 8 d 4 Y -2 8 d -3 4 d -5 2 d -3 X cl s 1041 71 m 18 X 3 Y -1 + 3 d -2 2 d -3 1 d -4 X -3 -1 d -3 -3 d -2 -5 d -3 Y 2 -4 d 3 -4 d 3 -1 d 4 X 3 + 1 d 3 4 d s 1068 80 m 17 -21 d s 1085 80 m -17 -21 d s 1112 80 m -21 Y s 1112 + 76 m -3 3 d -3 1 d -5 X -3 -1 d -3 -3 d -1 -5 d -3 Y 1 -4 d 3 -4 d 3 -1 d 5 X 3 + 1 d 3 4 d s 1124 80 m -21 Y s 1124 74 m 5 5 d 3 1 d 4 X 3 -1 d 2 -5 d -15 Y s + 1141 74 m 4 5 d 3 1 d 5 X 3 -1 d 1 -5 d -15 Y s 1170 80 m -32 Y s 1170 76 m 3 3 + d 3 1 d 4 X 3 -1 d 3 -3 d 2 -5 d -3 Y -2 -4 d -3 -4 d -3 -1 d -4 X -3 1 d -3 4 + d s 1198 91 m -32 Y s 1209 71 m 18 X 3 Y -2 3 d -1 2 d -3 1 d -5 X -3 -1 d -3 + -3 d -1 -5 d -3 Y 1 -4 d 3 -4 d 3 -1 d 5 X 3 1 d 3 4 d s + gr gr +showpage +end +%%EOF diff --git a/software/gsl-1.15/doc/ieee754.texi b/software/gsl-1.15/doc/ieee754.texi new file mode 100644 index 000000000..84c93e3ad --- /dev/null +++ b/software/gsl-1.15/doc/ieee754.texi @@ -0,0 +1,470 @@ +@cindex IEEE floating point + +This chapter describes functions for examining the representation of +floating point numbers and controlling the floating point environment of +your program. The functions described in this chapter are declared in +the header file @file{gsl_ieee_utils.h}. + +@menu +* Representation of floating point numbers:: +* Setting up your IEEE environment:: +* IEEE References and Further Reading:: +@end menu + +@node Representation of floating point numbers +@section Representation of floating point numbers +@cindex IEEE format for floating point numbers +@cindex bias, IEEE format +@cindex exponent, IEEE format +@cindex sign bit, IEEE format +@cindex mantissa, IEEE format +The IEEE Standard for Binary Floating-Point Arithmetic defines binary +formats for single and double precision numbers. Each number is composed +of three parts: a @dfn{sign bit} (@math{s}), an @dfn{exponent} +(@math{E}) and a @dfn{fraction} (@math{f}). The numerical value of the +combination @math{(s,E,f)} is given by the following formula, +@tex +\beforedisplay +$$ +(-1)^s (1 \cdot fffff\dots) 2^E +$$ +\afterdisplay +@end tex +@ifinfo + +@example +(-1)^s (1.fffff...) 2^E +@end example + +@end ifinfo +@noindent +@cindex normalized form, IEEE format +@cindex denormalized form, IEEE format +The sign bit is either zero or one. The exponent ranges from a minimum value +@c{$E_{min}$} +@math{E_min} +to a maximum value +@c{$E_{max}$} +@math{E_max} depending on the precision. The exponent is converted to an +unsigned number +@math{e}, known as the @dfn{biased exponent}, for storage by adding a +@dfn{bias} parameter, +@c{$e = E + \hbox{\it bias}$} +@math{e = E + bias}. +The sequence @math{fffff...} represents the digits of the binary +fraction @math{f}. The binary digits are stored in @dfn{normalized +form}, by adjusting the exponent to give a leading digit of @math{1}. +Since the leading digit is always 1 for normalized numbers it is +assumed implicitly and does not have to be stored. +Numbers smaller than +@c{$2^{E_{min}}$} +@math{2^(E_min)} +are be stored in @dfn{denormalized form} with a leading zero, +@tex +\beforedisplay +$$ +(-1)^s (0 \cdot fffff\dots) 2^{E_{min}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +(-1)^s (0.fffff...) 2^(E_min) +@end example + +@end ifinfo +@noindent +@cindex zero, IEEE format +@cindex infinity, IEEE format +This allows gradual underflow down to +@c{$2^{E_{min} - p}$} +@math{2^(E_min - p)} for @math{p} bits of precision. +A zero is encoded with the special exponent of +@c{$2^{E_{min}-1}$} +@math{2^(E_min - 1)} and infinities with the exponent of +@c{$2^{E_{max}+1}$} +@math{2^(E_max + 1)}. + +@noindent +@cindex single precision, IEEE format +The format for single precision numbers uses 32 bits divided in the +following way, + +@smallexample +seeeeeeeefffffffffffffffffffffff + +s = sign bit, 1 bit +e = exponent, 8 bits (E_min=-126, E_max=127, bias=127) +f = fraction, 23 bits +@end smallexample + +@noindent +@cindex double precision, IEEE format +The format for double precision numbers uses 64 bits divided in the +following way, + +@smallexample +seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff + +s = sign bit, 1 bit +e = exponent, 11 bits (E_min=-1022, E_max=1023, bias=1023) +f = fraction, 52 bits +@end smallexample + +@noindent +It is often useful to be able to investigate the behavior of a +calculation at the bit-level and the library provides functions for +printing the IEEE representations in a human-readable form. + +@comment float vs double vs long double +@comment (how many digits are available for each) + +@deftypefun void gsl_ieee_fprintf_float (FILE * @var{stream}, const float * @var{x}) +@deftypefunx void gsl_ieee_fprintf_double (FILE * @var{stream}, const double * @var{x}) +These functions output a formatted version of the IEEE floating-point +number pointed to by @var{x} to the stream @var{stream}. A pointer is +used to pass the number indirectly, to avoid any undesired promotion +from @code{float} to @code{double}. The output takes one of the +following forms, + +@table @code +@item NaN +the Not-a-Number symbol + +@item Inf, -Inf +positive or negative infinity + +@item 1.fffff...*2^E, -1.fffff...*2^E +a normalized floating point number + +@item 0.fffff...*2^E, -0.fffff...*2^E +a denormalized floating point number + +@item 0, -0 +positive or negative zero + +@comment @item [non-standard IEEE float], [non-standard IEEE double] +@comment an unrecognized encoding +@end table + +The output can be used directly in GNU Emacs Calc mode by preceding it +with @code{2#} to indicate binary. +@end deftypefun + +@deftypefun void gsl_ieee_printf_float (const float * @var{x}) +@deftypefunx void gsl_ieee_printf_double (const double * @var{x}) +These functions output a formatted version of the IEEE floating-point +number pointed to by @var{x} to the stream @code{stdout}. +@end deftypefun + +@noindent +The following program demonstrates the use of the functions by printing +the single and double precision representations of the fraction +@math{1/3}. For comparison the representation of the value promoted from +single to double precision is also printed. + +@example +@verbatiminclude examples/ieee.c +@end example + +@noindent +The binary representation of @math{1/3} is @math{0.01010101... }. The +output below shows that the IEEE format normalizes this fraction to give +a leading digit of 1, + +@smallexample + f= 1.01010101010101010101011*2^-2 +fd= 1.0101010101010101010101100000000000000000000000000000*2^-2 + d= 1.0101010101010101010101010101010101010101010101010101*2^-2 +@end smallexample + +@noindent +The output also shows that a single-precision number is promoted to +double-precision by adding zeros in the binary representation. + +@comment importance of using 1.234L in long double calculations + +@comment @example +@comment int main (void) +@comment @{ +@comment long double x = 1.0, y = 1.0; + +@comment x = x + 0.2; +@comment y = y + 0.2L; + +@comment printf(" d %.20Lf\n",x); +@comment printf("ld %.20Lf\n",y); + +@comment return 1; +@comment @} + +@comment d 1.20000000000000001110 +@comment ld 1.20000000000000000004 +@comment @end example + + +@node Setting up your IEEE environment +@section Setting up your IEEE environment +@cindex IEEE exceptions +@cindex precision, IEEE arithmetic +@cindex rounding mode +@cindex arithmetic exceptions +@cindex exceptions, IEEE arithmetic +@cindex division by zero, IEEE exceptions +@cindex underflow, IEEE exceptions +@cindex overflow, IEEE exceptions +The IEEE standard defines several @dfn{modes} for controlling the +behavior of floating point operations. These modes specify the important +properties of computer arithmetic: the direction used for rounding (e.g. +whether numbers should be rounded up, down or to the nearest number), +the rounding precision and how the program should handle arithmetic +exceptions, such as division by zero. + +Many of these features can now be controlled via standard functions such +as @code{fpsetround}, which should be used whenever they are available. +Unfortunately in the past there has been no universal API for +controlling their behavior---each system has had its own low-level way +of accessing them. To help you write portable programs GSL allows you +to specify modes in a platform-independent way using the environment +variable @code{GSL_IEEE_MODE}. The library then takes care of all the +necessary machine-specific initializations for you when you call the +function @code{gsl_ieee_env_setup}. + +@deftypefun void gsl_ieee_env_setup () +@vrindex @env{GSL_IEEE_MODE} +This function reads the environment variable @code{GSL_IEEE_MODE} and +attempts to set up the corresponding specified IEEE modes. The +environment variable should be a list of keywords, separated by +commas, like this, + +@display +@code{GSL_IEEE_MODE} = "@var{keyword},@var{keyword},..." +@end display + +@noindent +where @var{keyword} is one of the following mode-names, + +@itemize @w{} +@item +@code{single-precision} +@item +@code{double-precision} +@item +@code{extended-precision} +@item +@code{round-to-nearest} +@item +@code{round-down} +@item +@code{round-up} +@item +@code{round-to-zero} +@item +@code{mask-all} +@item +@code{mask-invalid} +@item +@code{mask-denormalized} +@item +@code{mask-division-by-zero} +@item +@code{mask-overflow} +@item +@code{mask-underflow} +@item +@code{trap-inexact} +@item +@code{trap-common} +@end itemize + +If @code{GSL_IEEE_MODE} is empty or undefined then the function returns +immediately and no attempt is made to change the system's IEEE +mode. When the modes from @code{GSL_IEEE_MODE} are turned on the +function prints a short message showing the new settings to remind you +that the results of the program will be affected. + +If the requested modes are not supported by the platform being used then +the function calls the error handler and returns an error code of +@code{GSL_EUNSUP}. + +When options are specified using this method, the resulting mode is +based on a default setting of the highest available precision (double +precision or extended precision, depending on the platform) in +round-to-nearest mode, with all exceptions enabled apart from the +@sc{inexact} exception. The @sc{inexact} exception is generated +whenever rounding occurs, so it must generally be disabled in typical +scientific calculations. All other floating-point exceptions are +enabled by default, including underflows and the use of denormalized +numbers, for safety. They can be disabled with the individual +@code{mask-} settings or together using @code{mask-all}. + +The following adjusted combination of modes is convenient for many +purposes, + +@example +GSL_IEEE_MODE="double-precision,"\ + "mask-underflow,"\ + "mask-denormalized" +@end example + +@noindent +This choice ignores any errors relating to small numbers (either +denormalized, or underflowing to zero) but traps overflows, division by +zero and invalid operations. + +Note that on the x86 series of processors this function sets both the +original x87 mode and the newer @sc{mxcsr} mode, which controls SSE +floating-point operations. The SSE floating-point units do not have a +precision-control bit, and always work in double-precision. The +single-precision and extended-precision keywords have no effect in +this case. +@end deftypefun + +@noindent +To demonstrate the effects of different rounding modes consider the +following program which computes @math{e}, the base of natural +logarithms, by summing a rapidly-decreasing series, +@tex +\beforedisplay +$$ +e = 1 + {1 \over 2!} + {1 \over 3!} + {1 \over 4!} + \dots + = 2.71828182846... +$$ +\afterdisplay +@end tex +@ifinfo + +@example +e = 1 + 1/2! + 1/3! + 1/4! + ... + = 2.71828182846... +@end example +@end ifinfo + +@example +@verbatiminclude examples/ieeeround.c +@end example + +@noindent +Here are the results of running the program in @code{round-to-nearest} +mode. This is the IEEE default so it isn't really necessary to specify +it here, + +@example +$ GSL_IEEE_MODE="round-to-nearest" ./a.out +i= 1 sum=1.000000000000000000 error=-1.71828 +i= 2 sum=2.000000000000000000 error=-0.718282 +.... +i=18 sum=2.718281828459045535 error=4.44089e-16 +i=19 sum=2.718281828459045535 error=4.44089e-16 +@end example + +@noindent +After nineteen terms the sum converges to within @c{$4 \times 10^{-16}$} +@math{4 \times 10^-16} of the correct value. +If we now change the rounding mode to +@code{round-down} the final result is less accurate, + +@example +$ GSL_IEEE_MODE="round-down" ./a.out +i= 1 sum=1.000000000000000000 error=-1.71828 +.... +i=19 sum=2.718281828459041094 error=-3.9968e-15 +@end example + +@noindent +The result is about +@c{$4 \times 10^{-15}$} +@math{4 \times 10^-15} +below the correct value, an order of magnitude worse than the result +obtained in the @code{round-to-nearest} mode. + +If we change to rounding mode to @code{round-up} then the final result +is higher than the correct value (when we add each term to the sum the +final result is always rounded up, which increases the sum by at least +one tick until the added term underflows to zero). To avoid this +problem we would need to use a safer converge criterion, such as +@code{while (fabs(sum - oldsum) > epsilon)}, with a suitably chosen +value of epsilon. + +Finally we can see the effect of computing the sum using +single-precision rounding, in the default @code{round-to-nearest} +mode. In this case the program thinks it is still using double precision +numbers but the CPU rounds the result of each floating point operation +to single-precision accuracy. This simulates the effect of writing the +program using single-precision @code{float} variables instead of +@code{double} variables. The iteration stops after about half the number +of iterations and the final result is much less accurate, + +@example +$ GSL_IEEE_MODE="single-precision" ./a.out +.... +i=12 sum=2.718281984329223633 error=1.5587e-07 +@end example + +@noindent +with an error of +@c{$O(10^{-7})$} +@math{O(10^-7)}, which corresponds to single +precision accuracy (about 1 part in @math{10^7}). Continuing the +iterations further does not decrease the error because all the +subsequent results are rounded to the same value. + +@node IEEE References and Further Reading +@section References and Further Reading + +The reference for the IEEE standard is, + +@itemize @w{} +@item +ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic. +@end itemize + +@noindent +A more pedagogical introduction to the standard can be found in the +following paper, + +@itemize @w{} +@item +David Goldberg: What Every Computer Scientist Should Know About +Floating-Point Arithmetic. @cite{ACM Computing Surveys}, Vol.@: 23, No.@: 1 +(March 1991), pages 5--48. + +Corrigendum: @cite{ACM Computing Surveys}, Vol.@: 23, No.@: 3 (September +1991), page 413. and see also the sections by B. A. Wichmann and Charles +B. Dunham in Surveyor's Forum: ``What Every Computer Scientist Should +Know About Floating-Point Arithmetic''. @cite{ACM Computing Surveys}, +Vol.@: 24, No.@: 3 (September 1992), page 319. +@end itemize + +@noindent + +A detailed textbook on IEEE arithmetic and its practical use is +available from SIAM Press, + +@itemize @w{} +@item +Michael L. Overton, @cite{Numerical Computing with IEEE Floating Point Arithmetic}, +SIAM Press, ISBN 0898715717. +@end itemize + +@noindent + +@comment to turn on math exception handling use __setfpucw, see +@comment /usr/include/i386/fpu_control.h +@comment e.g. +@comment #include +@comment #include +@comment #include +@comment double f (double x); +@comment int main () +@comment { +@comment double a = 0; +@comment double y, z; +@comment __setfpucw(0x1372); +@comment mention extended vs double precision on Pentium, and how to get around +@comment it (-ffloat-store, or selective use of volatile) + +@comment On the alpha the option -mieee is needed with gcc +@comment In Digital's compiler the equivalent is -ieee, -ieee-with-no-inexact +@comment and -ieee-with-inexact, or -fpe1 or -fpe2 diff --git a/software/gsl-1.15/doc/initial-route.eps b/software/gsl-1.15/doc/initial-route.eps new file mode 100644 index 000000000..0f7e864c9 --- /dev/null +++ b/software/gsl-1.15/doc/initial-route.eps @@ -0,0 +1,11867 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Jan 4 10:56:26 2007 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 101 194 489 610 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 101 194 489 610 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3399 10017 +3399 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3414 10017 +3414 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +3311 10017 +3297 9930 +3297 10017 +3517 10017 +3517 9930 +3502 10017 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3355 9710 +3458 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3781 9973 +3795 10017 +3795 9930 +3781 9973 +3751 10003 +3707 10017 +3663 10017 +3619 10003 +3590 9973 +3590 9944 +3605 9915 +3619 9900 +3649 9886 +3737 9856 +3766 9842 +3795 9812 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3590 9944 +3619 9915 +3649 9900 +3737 9871 +3766 9856 +3781 9842 +3795 9812 +3795 9754 +3766 9724 +3722 9710 +3678 9710 +3634 9724 +3605 9754 +3590 9798 +3590 9710 +3605 9754 +16 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3913 10017 +3913 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3927 10017 +3927 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3869 10017 +4045 10017 +4089 10003 +4103 9988 +4118 9959 +4118 9915 +4103 9886 +4089 9871 +4045 9856 +3927 9856 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4045 10017 +4074 10003 +4089 9988 +4103 9959 +4103 9915 +4089 9886 +4074 9871 +4045 9856 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3869 9710 +3971 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4455 9842 +4719 9842 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5100 10003 +5086 9988 +5071 10003 +5086 10017 +4 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5086 9915 +5086 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5100 9915 +5100 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5042 9915 +5100 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5042 9710 +5144 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5247 9915 +5247 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5261 9915 +5261 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5261 9871 +5291 9900 +5335 9915 +5364 9915 +5408 9900 +5423 9871 +5423 9710 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5364 9915 +5393 9900 +5408 9871 +5408 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5203 9915 +5261 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5203 9710 +5305 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5364 9710 +5467 9710 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5584 10003 +5569 9988 +5555 10003 +5569 10017 +4 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5569 9915 +5569 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5584 9915 +5584 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5525 9915 +5584 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5525 9710 +5628 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5731 10017 +5731 9768 +5745 9724 +5775 9710 +5804 9710 +5833 9724 +5848 9754 +7 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5745 10017 +5745 9768 +5760 9724 +5775 9710 +4 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5687 9915 +5804 9915 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5965 10003 +5951 9988 +5936 10003 +5951 10017 +4 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5951 9915 +5951 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5965 9915 +5965 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5907 9915 +5965 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5907 9710 +6009 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +6112 9886 +6112 9871 +6097 9871 +6097 9886 +6112 9900 +6141 9915 +6200 9915 +6229 9900 +6244 9886 +6259 9856 +6259 9754 +6273 9724 +6288 9710 +13 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +6244 9886 +6244 9754 +6259 9724 +6288 9710 +6302 9710 +5 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +6244 9856 +6229 9842 +6141 9827 +6097 9812 +6083 9783 +6083 9754 +6097 9724 +6141 9710 +6185 9710 +6215 9724 +6244 9754 +11 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6141 9827 +6112 9812 +6097 9783 +6097 9754 +6112 9724 +6141 9710 +6 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6405 10017 +6405 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6420 10017 +6420 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6361 10017 +6420 10017 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6361 9710 +6464 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 9842 +6816 9842 +2 MLine +End + +Begin %I Poly +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7036 9915 +7080 9900 +7109 9871 +7124 9827 +7124 9798 +7109 9754 +7080 9724 +7036 9710 +7006 9710 +6962 9724 +6933 9754 +6918 9798 +6918 9827 +6933 9871 +6962 9900 +7006 9915 +16 Poly +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7006 9915 +6977 9900 +6948 9871 +6933 9827 +6933 9798 +6948 9754 +6977 9724 +7006 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7036 9710 +7065 9724 +7094 9754 +7109 9798 +7109 9827 +7094 9871 +7065 9900 +7036 9915 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7241 9915 +7241 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7256 9915 +7256 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7256 9827 +7270 9871 +7299 9900 +7329 9915 +7373 9915 +7387 9900 +7387 9886 +7373 9871 +7358 9886 +7373 9900 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7197 9915 +7256 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7197 9710 +7299 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7637 10017 +7637 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7651 10017 +7651 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +7637 9871 +7607 9900 +7578 9915 +7549 9915 +7505 9900 +7475 9871 +7461 9827 +7461 9798 +7475 9754 +7505 9724 +7549 9710 +7578 9710 +7607 9724 +7637 9754 +14 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7549 9915 +7519 9900 +7490 9871 +7475 9827 +7475 9798 +7490 9754 +7519 9724 +7549 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7593 10017 +7651 10017 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7637 9710 +7695 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +7783 9827 +7959 9827 +7959 9856 +7945 9886 +7930 9900 +7901 9915 +7857 9915 +7813 9900 +7783 9871 +7769 9827 +7769 9798 +7783 9754 +7813 9724 +7857 9710 +7886 9710 +7930 9724 +7959 9754 +17 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +7945 9827 +7945 9871 +7930 9900 +3 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7857 9915 +7827 9900 +7798 9871 +7783 9827 +7783 9798 +7798 9754 +7827 9724 +7857 9710 +8 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8077 9915 +8077 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8091 9915 +8091 9710 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8091 9827 +8106 9871 +8135 9900 +8165 9915 +8209 9915 +8223 9900 +8223 9886 +8209 9871 +8194 9886 +8209 9900 +10 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8033 9915 +8091 9915 +2 MLine +End + +Begin %I MLine +[1.040989 0 0 1.040989 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8033 9710 +8135 9710 +2 MLine +End + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2059 2097 +2172 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2235 2147 +2247 2153 +2266 2172 +2266 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2260 2166 +2260 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2235 2040 +2291 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2361 2147 +2373 2153 +2392 2172 +2392 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2386 2166 +2386 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2361 2040 +2417 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2524 2159 +2524 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2530 2172 +2530 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2530 2172 +2461 2078 +2562 2078 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2505 2040 +2549 2040 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2827 2097 +2940 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3003 2147 +3015 2153 +3034 2172 +3034 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3028 2166 +3028 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3003 2040 +3059 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3129 2147 +3141 2153 +3160 2172 +3160 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3154 2166 +3154 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3129 2040 +3185 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +3242 2147 +3248 2141 +3242 2134 +3235 2141 +3235 2147 +3242 2159 +3248 2166 +3267 2172 +3292 2172 +3311 2166 +3317 2159 +3323 2147 +3323 2134 +3317 2122 +3298 2109 +3267 2097 +3254 2090 +3242 2078 +3235 2059 +3235 2040 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3292 2172 +3304 2166 +3311 2159 +3317 2147 +3317 2134 +3311 2122 +3292 2109 +3267 2097 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +3235 2053 +3242 2059 +3254 2059 +3286 2046 +3304 2046 +3317 2053 +3323 2059 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +3254 2059 +3286 2040 +3311 2040 +3317 2046 +3323 2059 +3323 2072 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 9216 +3072 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 2304 +3072 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3595 2097 +3708 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3771 2147 +3783 2153 +3802 2172 +3802 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3796 2166 +3796 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3771 2040 +3827 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +3897 2147 +3909 2153 +3928 2172 +3928 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3922 2166 +3922 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3897 2040 +3953 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4054 2172 +4072 2166 +4085 2147 +4091 2115 +4091 2097 +4085 2065 +4072 2046 +4054 2040 +4041 2040 +4022 2046 +4010 2065 +4003 2097 +4003 2115 +4010 2147 +4022 2166 +4041 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4041 2172 +4029 2166 +4022 2159 +4016 2147 +4010 2115 +4010 2097 +4016 2065 +4022 2053 +4029 2046 +4041 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4054 2040 +4066 2046 +4072 2053 +4079 2065 +4085 2097 +4085 2115 +4079 2147 +4072 2159 +4066 2166 +4054 2172 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 9216 +3840 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 2304 +3840 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4363 2097 +4476 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4539 2147 +4551 2153 +4570 2172 +4570 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4564 2166 +4564 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4539 2040 +4595 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4696 2172 +4715 2166 +4727 2147 +4734 2115 +4734 2097 +4727 2065 +4715 2046 +4696 2040 +4683 2040 +4665 2046 +4652 2065 +4646 2097 +4646 2115 +4652 2147 +4665 2166 +4683 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4683 2172 +4671 2166 +4665 2159 +4658 2147 +4652 2115 +4652 2097 +4658 2065 +4665 2053 +4671 2046 +4683 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4696 2040 +4709 2046 +4715 2053 +4721 2065 +4727 2097 +4727 2115 +4721 2147 +4715 2159 +4709 2166 +4696 2172 +10 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +4828 2172 +4847 2166 +4853 2153 +4853 2134 +4847 2122 +4828 2115 +4803 2115 +4784 2122 +4778 2134 +4778 2153 +4784 2166 +4803 2172 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4803 2172 +4790 2166 +4784 2153 +4784 2134 +4790 2122 +4803 2115 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +4828 2115 +4840 2122 +4847 2134 +4847 2153 +4840 2166 +4828 2172 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4803 2115 +4784 2109 +4778 2103 +4771 2090 +4771 2065 +4778 2053 +4784 2046 +4803 2040 +4828 2040 +4847 2046 +4853 2053 +4859 2065 +4859 2090 +4853 2103 +4847 2109 +4828 2115 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4803 2115 +4790 2109 +4784 2103 +4778 2090 +4778 2065 +4784 2053 +4790 2046 +4803 2040 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4828 2040 +4840 2046 +4847 2053 +4853 2065 +4853 2090 +4847 2103 +4840 2109 +4828 2115 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5131 2097 +5244 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5307 2147 +5319 2153 +5338 2172 +5338 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5332 2166 +5332 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5307 2040 +5363 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5464 2172 +5483 2166 +5495 2147 +5502 2115 +5502 2097 +5495 2065 +5483 2046 +5464 2040 +5451 2040 +5433 2046 +5420 2065 +5414 2097 +5414 2115 +5420 2147 +5433 2166 +5451 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5451 2172 +5439 2166 +5433 2159 +5426 2147 +5420 2115 +5420 2097 +5426 2065 +5433 2053 +5439 2046 +5451 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5464 2040 +5477 2046 +5483 2053 +5489 2065 +5495 2097 +5495 2115 +5489 2147 +5483 2159 +5477 2166 +5464 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +5615 2153 +5608 2147 +5615 2141 +5621 2147 +5621 2153 +5615 2166 +5602 2172 +5583 2172 +5565 2166 +5552 2153 +5546 2141 +5539 2115 +5539 2078 +5546 2059 +5558 2046 +5577 2040 +5590 2040 +5608 2046 +5621 2059 +5627 2078 +5627 2084 +5621 2103 +5608 2115 +5590 2122 +5583 2122 +5565 2115 +5552 2103 +5546 2084 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +5583 2172 +5571 2166 +5558 2153 +5552 2141 +5546 2115 +5546 2078 +5552 2059 +5565 2046 +5577 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5590 2040 +5602 2046 +5615 2059 +5621 2078 +5621 2084 +5615 2103 +5602 2115 +5590 2122 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 9216 +5376 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 2304 +5376 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5899 2097 +6012 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6075 2147 +6087 2153 +6106 2172 +6106 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6100 2166 +6100 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6075 2040 +6131 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6232 2172 +6251 2166 +6263 2147 +6270 2115 +6270 2097 +6263 2065 +6251 2046 +6232 2040 +6219 2040 +6201 2046 +6188 2065 +6182 2097 +6182 2115 +6188 2147 +6201 2166 +6219 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6219 2172 +6207 2166 +6201 2159 +6194 2147 +6188 2115 +6188 2097 +6194 2065 +6201 2053 +6207 2046 +6219 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6232 2040 +6245 2046 +6251 2053 +6257 2065 +6263 2097 +6263 2115 +6257 2147 +6251 2159 +6245 2166 +6232 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6364 2159 +6364 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6370 2172 +6370 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6370 2172 +6301 2078 +6402 2078 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6345 2040 +6389 2040 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 9216 +6144 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 2304 +6144 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6667 2097 +6780 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6843 2147 +6855 2153 +6874 2172 +6874 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6868 2166 +6868 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6843 2040 +6899 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7000 2172 +7019 2166 +7031 2147 +7038 2115 +7038 2097 +7031 2065 +7019 2046 +7000 2040 +6987 2040 +6969 2046 +6956 2065 +6950 2097 +6950 2115 +6956 2147 +6969 2166 +6987 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6987 2172 +6975 2166 +6969 2159 +6962 2147 +6956 2115 +6956 2097 +6962 2065 +6969 2053 +6975 2046 +6987 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7000 2040 +7013 2046 +7019 2053 +7025 2065 +7031 2097 +7031 2115 +7025 2147 +7019 2159 +7013 2166 +7000 2172 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +7082 2147 +7088 2141 +7082 2134 +7075 2141 +7075 2147 +7082 2159 +7088 2166 +7107 2172 +7132 2172 +7151 2166 +7157 2159 +7163 2147 +7163 2134 +7157 2122 +7138 2109 +7107 2097 +7094 2090 +7082 2078 +7075 2059 +7075 2040 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7132 2172 +7144 2166 +7151 2159 +7157 2147 +7157 2134 +7151 2122 +7132 2109 +7107 2097 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7075 2053 +7082 2059 +7094 2059 +7126 2046 +7144 2046 +7157 2053 +7163 2059 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +7094 2059 +7126 2040 +7151 2040 +7157 2046 +7163 2059 +7163 2072 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7435 2097 +7548 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +7611 2147 +7623 2153 +7642 2172 +7642 2040 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7636 2166 +7636 2040 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7611 2040 +7667 2040 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7768 2172 +7787 2166 +7799 2147 +7806 2115 +7806 2097 +7799 2065 +7787 2046 +7768 2040 +7755 2040 +7737 2046 +7724 2065 +7718 2097 +7718 2115 +7724 2147 +7737 2166 +7755 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7755 2172 +7743 2166 +7737 2159 +7730 2147 +7724 2115 +7724 2097 +7730 2065 +7737 2053 +7743 2046 +7755 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7768 2040 +7781 2046 +7787 2053 +7793 2065 +7799 2097 +7799 2115 +7793 2147 +7787 2159 +7781 2166 +7768 2172 +10 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7894 2172 +7912 2166 +7925 2147 +7931 2115 +7931 2097 +7925 2065 +7912 2046 +7894 2040 +7881 2040 +7862 2046 +7850 2065 +7843 2097 +7843 2115 +7850 2147 +7862 2166 +7881 2172 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7881 2172 +7869 2166 +7862 2159 +7856 2147 +7850 2115 +7850 2097 +7856 2065 +7862 2053 +7869 2046 +7881 2040 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7894 2040 +7906 2046 +7912 2053 +7919 2065 +7925 2097 +7925 2115 +7919 2147 +7912 2159 +7906 2166 +7894 2172 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 9216 +7680 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 2304 +7680 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8266 2097 +8379 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +8505 2128 +8498 2109 +8486 2097 +8467 2090 +8461 2090 +8442 2097 +8429 2109 +8423 2128 +8423 2134 +8429 2153 +8442 2166 +8461 2172 +8473 2172 +8492 2166 +8505 2153 +8511 2134 +8511 2097 +8505 2072 +8498 2059 +8486 2046 +8467 2040 +8448 2040 +8435 2046 +8429 2059 +8429 2065 +8435 2072 +8442 2065 +8435 2059 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8461 2090 +8448 2097 +8435 2109 +8429 2128 +8429 2134 +8435 2153 +8448 2166 +8461 2172 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +8473 2172 +8486 2166 +8498 2153 +8505 2134 +8505 2097 +8498 2072 +8492 2059 +8479 2046 +8467 2040 +9 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +8605 2172 +8624 2166 +8630 2153 +8630 2134 +8624 2122 +8605 2115 +8580 2115 +8561 2122 +8555 2134 +8555 2153 +8561 2166 +8580 2172 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8580 2172 +8567 2166 +8561 2153 +8561 2134 +8567 2122 +8580 2115 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8605 2115 +8618 2122 +8624 2134 +8624 2153 +8618 2166 +8605 2172 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8580 2115 +8561 2109 +8555 2103 +8549 2090 +8549 2065 +8555 2053 +8561 2046 +8580 2040 +8605 2040 +8624 2046 +8630 2053 +8637 2065 +8637 2090 +8630 2103 +8624 2109 +8605 2115 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8580 2115 +8567 2109 +8561 2103 +8555 2090 +8555 2065 +8561 2053 +8567 2046 +8580 2040 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +8605 2040 +8618 2046 +8624 2053 +8630 2065 +8630 2090 +8624 2103 +8618 2109 +8605 2115 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 9216 +8448 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 2304 +8448 2442 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9034 2097 +9147 2097 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +9273 2128 +9266 2109 +9254 2097 +9235 2090 +9229 2090 +9210 2097 +9197 2109 +9191 2128 +9191 2134 +9197 2153 +9210 2166 +9229 2172 +9241 2172 +9260 2166 +9273 2153 +9279 2134 +9279 2097 +9273 2072 +9266 2059 +9254 2046 +9235 2040 +9216 2040 +9203 2046 +9197 2059 +9197 2065 +9203 2072 +9210 2065 +9203 2059 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +9229 2090 +9216 2097 +9203 2109 +9197 2128 +9197 2134 +9203 2153 +9216 2166 +9229 2172 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +9241 2172 +9254 2166 +9266 2153 +9273 2134 +9273 2097 +9266 2072 +9260 2059 +9247 2046 +9235 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +9392 2153 +9386 2147 +9392 2141 +9398 2147 +9398 2153 +9392 2166 +9379 2172 +9361 2172 +9342 2166 +9329 2153 +9323 2141 +9317 2115 +9317 2078 +9323 2059 +9335 2046 +9354 2040 +9367 2040 +9386 2046 +9398 2059 +9405 2078 +9405 2084 +9398 2103 +9386 2115 +9367 2122 +9361 2122 +9342 2115 +9329 2103 +9323 2084 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +9361 2172 +9348 2166 +9335 2153 +9329 2141 +9323 2115 +9323 2078 +9329 2059 +9342 2046 +9354 2040 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +9367 2040 +9379 2046 +9392 2059 +9398 2078 +9398 2084 +9392 2103 +9379 2115 +9367 2122 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2688 9216 +2688 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2688 2304 +2688 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 9216 +3072 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3072 2304 +3072 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 9216 +3456 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 2304 +3456 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 9216 +3840 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3840 2304 +3840 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4224 9216 +4224 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4224 2304 +4224 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4992 9216 +4992 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4992 2304 +4992 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 9216 +5376 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5376 2304 +5376 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 9216 +6144 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6144 2304 +6144 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6528 9216 +6528 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6528 2304 +6528 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7296 9216 +7296 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7296 2304 +7296 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 9216 +7680 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7680 2304 +7680 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 9216 +8064 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 2304 +8064 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 9216 +8448 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8448 2304 +8448 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8832 9216 +8832 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8832 2304 +8832 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 2354 +1980 2348 +1974 2342 +1968 2348 +1968 2354 +1974 2367 +1980 2373 +1999 2379 +2024 2379 +2043 2373 +2050 2361 +2050 2342 +2043 2329 +2024 2323 +2006 2323 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 2379 +2037 2373 +2043 2361 +2043 2342 +2037 2329 +2024 2323 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 2323 +2037 2317 +2050 2304 +2056 2291 +2056 2273 +2050 2260 +2043 2254 +2024 2247 +1999 2247 +1980 2254 +1974 2260 +1968 2273 +1968 2279 +1974 2285 +1980 2279 +1974 2273 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 2310 +2050 2291 +2050 2273 +2043 2260 +2037 2254 +2024 2247 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +2100 2354 +2106 2348 +2100 2342 +2093 2348 +2093 2354 +2100 2367 +2106 2373 +2125 2379 +2150 2379 +2169 2373 +2175 2367 +2181 2354 +2181 2342 +2175 2329 +2156 2317 +2125 2304 +2112 2298 +2100 2285 +2093 2266 +2093 2247 +20 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2150 2379 +2163 2373 +2169 2367 +2175 2354 +2175 2342 +2169 2329 +2150 2317 +2125 2304 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2093 2260 +2100 2266 +2112 2266 +2144 2254 +2163 2254 +2175 2260 +2181 2266 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2112 2266 +2144 2247 +2169 2247 +2175 2254 +2181 2266 +2181 2279 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 3506 +1980 3500 +1974 3494 +1968 3500 +1968 3506 +1974 3519 +1980 3525 +1999 3531 +2024 3531 +2043 3525 +2050 3513 +2050 3494 +2043 3481 +2024 3475 +2006 3475 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 3531 +2037 3525 +2043 3513 +2043 3494 +2037 3481 +2024 3475 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 3475 +2037 3469 +2050 3456 +2056 3443 +2056 3425 +2050 3412 +2043 3406 +2024 3399 +1999 3399 +1980 3406 +1974 3412 +1968 3425 +1968 3431 +1974 3437 +1980 3431 +1974 3425 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 3462 +2050 3443 +2050 3425 +2043 3412 +2037 3406 +2024 3399 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +2100 3506 +2106 3500 +2100 3494 +2093 3500 +2093 3506 +2100 3519 +2106 3525 +2125 3531 +2150 3531 +2169 3525 +2175 3513 +2175 3494 +2169 3481 +2150 3475 +2131 3475 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2150 3531 +2163 3525 +2169 3513 +2169 3494 +2163 3481 +2150 3475 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2150 3475 +2163 3469 +2175 3456 +2181 3443 +2181 3425 +2175 3412 +2169 3406 +2150 3399 +2125 3399 +2106 3406 +2100 3412 +2093 3425 +2093 3431 +2100 3437 +2106 3431 +2100 3425 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2169 3462 +2175 3443 +2175 3425 +2169 3412 +2163 3406 +2150 3399 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9078 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2442 3456 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 4658 +1980 4652 +1974 4646 +1968 4652 +1968 4658 +1974 4671 +1980 4677 +1999 4683 +2024 4683 +2043 4677 +2050 4665 +2050 4646 +2043 4633 +2024 4627 +2006 4627 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 4683 +2037 4677 +2043 4665 +2043 4646 +2037 4633 +2024 4627 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 4627 +2037 4621 +2050 4608 +2056 4595 +2056 4577 +2050 4564 +2043 4558 +2024 4551 +1999 4551 +1980 4558 +1974 4564 +1968 4577 +1968 4583 +1974 4589 +1980 4583 +1974 4577 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 4614 +2050 4595 +2050 4577 +2043 4564 +2037 4558 +2024 4551 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2150 4671 +2150 4551 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2156 4683 +2156 4551 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2156 4683 +2087 4589 +2188 4589 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2131 4551 +2175 4551 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9078 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2442 4608 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 5810 +1980 5804 +1974 5798 +1968 5804 +1968 5810 +1974 5823 +1980 5829 +1999 5835 +2024 5835 +2043 5829 +2050 5817 +2050 5798 +2043 5785 +2024 5779 +2006 5779 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 5835 +2037 5829 +2043 5817 +2043 5798 +2037 5785 +2024 5779 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 5779 +2037 5773 +2050 5760 +2056 5747 +2056 5729 +2050 5716 +2043 5710 +2024 5703 +1999 5703 +1980 5710 +1974 5716 +1968 5729 +1968 5735 +1974 5741 +1980 5735 +1974 5729 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 5766 +2050 5747 +2050 5729 +2043 5716 +2037 5710 +2024 5703 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2106 5835 +2093 5773 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2093 5773 +2106 5785 +2125 5791 +2144 5791 +2163 5785 +2175 5773 +2181 5754 +2181 5741 +2175 5722 +2163 5710 +2144 5703 +2125 5703 +2106 5710 +2100 5716 +2093 5729 +2093 5735 +2100 5741 +2106 5735 +2100 5729 +19 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2144 5791 +2156 5785 +2169 5773 +2175 5754 +2175 5741 +2169 5722 +2156 5710 +2144 5703 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2106 5835 +2169 5835 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2106 5829 +2137 5829 +2169 5835 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9078 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2442 5760 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 6962 +1980 6956 +1974 6950 +1968 6956 +1968 6962 +1974 6975 +1980 6981 +1999 6987 +2024 6987 +2043 6981 +2050 6969 +2050 6950 +2043 6937 +2024 6931 +2006 6931 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 6987 +2037 6981 +2043 6969 +2043 6950 +2037 6937 +2024 6931 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 6931 +2037 6925 +2050 6912 +2056 6899 +2056 6881 +2050 6868 +2043 6862 +2024 6855 +1999 6855 +1980 6862 +1974 6868 +1968 6881 +1968 6887 +1974 6893 +1980 6887 +1974 6881 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 6918 +2050 6899 +2050 6881 +2043 6868 +2037 6862 +2024 6855 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2169 6969 +2163 6962 +2169 6956 +2175 6962 +2175 6969 +2169 6981 +2156 6987 +2137 6987 +2119 6981 +2106 6969 +2100 6956 +2093 6931 +2093 6893 +2100 6874 +2112 6862 +2131 6855 +2144 6855 +2163 6862 +2175 6874 +2181 6893 +2181 6899 +2175 6918 +2163 6931 +2144 6937 +2137 6937 +2119 6931 +2106 6918 +2100 6899 +28 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2137 6987 +2125 6981 +2112 6969 +2106 6956 +2100 6931 +2100 6893 +2106 6874 +2119 6862 +2131 6855 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2144 6855 +2156 6862 +2169 6874 +2175 6893 +2175 6899 +2169 6918 +2156 6931 +2144 6937 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9078 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2442 6912 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 8114 +1980 8108 +1974 8102 +1968 8108 +1968 8114 +1974 8127 +1980 8133 +1999 8139 +2024 8139 +2043 8133 +2050 8121 +2050 8102 +2043 8089 +2024 8083 +2006 8083 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 8139 +2037 8133 +2043 8121 +2043 8102 +2037 8089 +2024 8083 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 8083 +2037 8077 +2050 8064 +2056 8051 +2056 8033 +2050 8020 +2043 8014 +2024 8007 +1999 8007 +1980 8014 +1974 8020 +1968 8033 +1968 8039 +1974 8045 +1980 8039 +1974 8033 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 8070 +2050 8051 +2050 8033 +2043 8020 +2037 8014 +2024 8007 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2093 8139 +2093 8102 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2093 8114 +2100 8127 +2112 8139 +2125 8139 +2156 8121 +2169 8121 +2175 8127 +2181 8139 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2100 8127 +2112 8133 +2125 8133 +2156 8121 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2181 8139 +2181 8121 +2175 8102 +2150 8070 +2144 8058 +2137 8039 +2137 8007 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +2175 8102 +2144 8070 +2137 8058 +2131 8039 +2131 8007 +5 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9078 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2442 8064 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1974 9266 +1980 9260 +1974 9254 +1968 9260 +1968 9266 +1974 9279 +1980 9285 +1999 9291 +2024 9291 +2043 9285 +2050 9273 +2050 9254 +2043 9241 +2024 9235 +2006 9235 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2024 9291 +2037 9285 +2043 9273 +2043 9254 +2037 9241 +2024 9235 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2024 9235 +2037 9229 +2050 9216 +2056 9203 +2056 9185 +2050 9172 +2043 9166 +2024 9159 +1999 9159 +1980 9166 +1974 9172 +1968 9185 +1968 9191 +1974 9197 +1980 9191 +1974 9185 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2043 9222 +2050 9203 +2050 9185 +2043 9172 +2037 9166 +2024 9159 +6 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +2150 9291 +2169 9285 +2175 9273 +2175 9254 +2169 9241 +2150 9235 +2125 9235 +2106 9241 +2100 9254 +2100 9273 +2106 9285 +2125 9291 +12 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2125 9291 +2112 9285 +2106 9273 +2106 9254 +2112 9241 +2125 9235 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2150 9235 +2163 9241 +2169 9254 +2169 9273 +2163 9285 +2150 9291 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2125 9235 +2106 9229 +2100 9222 +2093 9210 +2093 9185 +2100 9172 +2106 9166 +2125 9159 +2150 9159 +2169 9166 +2175 9172 +2181 9185 +2181 9210 +2175 9222 +2169 9229 +2150 9235 +16 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2125 9235 +2112 9229 +2106 9222 +2100 9210 +2100 9185 +2106 9172 +2112 9166 +2125 9159 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2150 9159 +2163 9166 +2169 9172 +2175 9185 +2175 9210 +2169 9222 +2163 9229 +2150 9235 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2880 +9161 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2880 +2359 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9161 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2359 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9161 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2359 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9161 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2359 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5184 +9161 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5184 +2359 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6336 +9161 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6336 +2359 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9161 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2359 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7488 +9161 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7488 +2359 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9161 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2359 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8640 +9161 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8640 +2359 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4384 1906 +4384 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4390 1906 +4390 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4365 1906 +4390 1906 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4365 1774 +4409 1774 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4491 1862 +4510 1856 +4522 1843 +4528 1824 +4528 1812 +4522 1793 +4510 1780 +4491 1774 +4478 1774 +4459 1780 +4447 1793 +4440 1812 +4440 1824 +4447 1843 +4459 1856 +4478 1862 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4478 1862 +4466 1856 +4453 1843 +4447 1824 +4447 1812 +4453 1793 +4466 1780 +4478 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +4491 1774 +4503 1780 +4516 1793 +4522 1812 +4522 1824 +4516 1843 +4503 1856 +4491 1862 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4579 1862 +4579 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4585 1862 +4585 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4585 1843 +4598 1856 +4616 1862 +4629 1862 +4648 1856 +4654 1843 +4654 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4629 1862 +4642 1856 +4648 1843 +4648 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4560 1862 +4585 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4560 1774 +4604 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4629 1774 +4673 1774 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4748 1862 +4761 1856 +4767 1849 +4773 1837 +4773 1824 +4767 1812 +4761 1805 +4748 1799 +4736 1799 +4723 1805 +4717 1812 +4711 1824 +4711 1837 +4717 1849 +4723 1856 +4736 1862 +16 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4723 1856 +4717 1843 +4717 1818 +4723 1805 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4761 1805 +4767 1818 +4767 1843 +4761 1856 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +4767 1849 +4773 1856 +4786 1862 +4786 1856 +4773 1856 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4717 1812 +4711 1805 +4704 1793 +4704 1787 +4711 1774 +4729 1768 +4761 1768 +4780 1761 +4786 1755 +9 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +4704 1787 +4711 1780 +4729 1774 +4761 1774 +4780 1768 +4786 1755 +4786 1749 +4780 1736 +4761 1730 +4723 1730 +4704 1736 +4698 1749 +4698 1755 +4704 1768 +4723 1774 +15 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4843 1900 +4836 1893 +4830 1900 +4836 1906 +4 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4836 1862 +4836 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4843 1862 +4843 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4817 1862 +4843 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4817 1774 +4861 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +4905 1906 +4905 1799 +4912 1780 +4924 1774 +4937 1774 +4949 1780 +4956 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4912 1906 +4912 1799 +4918 1780 +4924 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4887 1862 +4937 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5000 1862 +5000 1793 +5006 1780 +5025 1774 +5037 1774 +5056 1780 +5069 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5006 1862 +5006 1793 +5012 1780 +5025 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 1862 +5069 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5075 1862 +5075 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4981 1862 +5006 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5050 1862 +5075 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 1774 +5094 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5201 1906 +5201 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5207 1906 +5207 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +5201 1843 +5188 1856 +5176 1862 +5163 1862 +5144 1856 +5132 1843 +5125 1824 +5125 1812 +5132 1793 +5144 1780 +5163 1774 +5176 1774 +5188 1780 +5201 1793 +14 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5163 1862 +5150 1856 +5138 1843 +5132 1824 +5132 1812 +5138 1793 +5150 1780 +5163 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5182 1906 +5207 1906 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5201 1774 +5226 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5264 1824 +5339 1824 +5339 1837 +5333 1849 +5326 1856 +5314 1862 +5295 1862 +5276 1856 +5264 1843 +5257 1824 +5257 1812 +5264 1793 +5276 1780 +5295 1774 +5308 1774 +5326 1780 +5339 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5333 1824 +5333 1843 +5326 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5295 1862 +5282 1856 +5270 1843 +5264 1824 +5264 1812 +5270 1793 +5282 1780 +5295 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5528 1931 +5515 1918 +5502 1900 +5490 1875 +5484 1843 +5484 1818 +5490 1787 +5502 1761 +5515 1743 +5528 1730 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5515 1918 +5502 1893 +5496 1875 +5490 1843 +5490 1818 +5496 1787 +5502 1768 +5515 1743 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5571 1831 +5685 1831 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5842 1862 +5842 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5848 1862 +5848 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5848 1843 +5861 1856 +5879 1862 +5892 1862 +5911 1856 +5917 1843 +5917 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5892 1862 +5905 1856 +5911 1843 +5911 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5917 1843 +5930 1856 +5949 1862 +5961 1862 +5980 1856 +5986 1843 +5986 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5961 1862 +5974 1856 +5980 1843 +5980 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5823 1862 +5848 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5823 1774 +5867 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5892 1774 +5936 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5961 1774 +6005 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +6043 1824 +6118 1824 +6118 1837 +6112 1849 +6106 1856 +6093 1862 +6074 1862 +6055 1856 +6043 1843 +6036 1824 +6036 1812 +6043 1793 +6055 1780 +6074 1774 +6087 1774 +6106 1780 +6118 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6112 1824 +6112 1843 +6106 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6074 1862 +6062 1856 +6049 1843 +6043 1824 +6043 1812 +6049 1793 +6062 1780 +6074 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +6168 1849 +6168 1843 +6162 1843 +6162 1849 +6168 1856 +6181 1862 +6206 1862 +6219 1856 +6225 1849 +6231 1837 +6231 1793 +6238 1780 +6244 1774 +13 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +6225 1849 +6225 1793 +6231 1780 +6244 1774 +6250 1774 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +6225 1837 +6219 1831 +6181 1824 +6162 1818 +6156 1805 +6156 1793 +6162 1780 +6181 1774 +6200 1774 +6212 1780 +6225 1793 +11 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6181 1824 +6168 1818 +6162 1805 +6162 1793 +6168 1780 +6181 1774 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6294 1862 +6294 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6300 1862 +6300 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6300 1843 +6313 1856 +6332 1862 +6344 1862 +6363 1856 +6370 1843 +6370 1774 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6344 1862 +6357 1856 +6363 1843 +6363 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6275 1862 +6300 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6275 1774 +6319 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6344 1774 +6388 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6483 1849 +6489 1862 +6489 1837 +6483 1849 +6476 1856 +6464 1862 +6439 1862 +6426 1856 +6420 1849 +6420 1837 +6426 1831 +6439 1824 +6470 1812 +6483 1805 +6489 1799 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6420 1843 +6426 1837 +6439 1831 +6470 1818 +6483 1812 +6489 1805 +6489 1787 +6483 1780 +6470 1774 +6445 1774 +6432 1780 +6426 1787 +6420 1799 +6420 1774 +6426 1787 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6633 1862 +6659 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6640 1862 +6659 1793 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6684 1862 +6659 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6684 1862 +6709 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6690 1862 +6709 1793 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6734 1862 +6709 1774 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6615 1862 +6659 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6715 1862 +6753 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +6784 1824 +6860 1824 +6860 1837 +6853 1849 +6847 1856 +6835 1862 +6816 1862 +6797 1856 +6784 1843 +6778 1824 +6778 1812 +6784 1793 +6797 1780 +6816 1774 +6828 1774 +6847 1780 +6860 1793 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +6853 1824 +6853 1843 +6847 1856 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6816 1862 +6803 1856 +6791 1843 +6784 1824 +6784 1812 +6791 1793 +6803 1780 +6816 1774 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6960 1849 +6966 1862 +6966 1837 +6960 1849 +6954 1856 +6941 1862 +6916 1862 +6904 1856 +6897 1849 +6897 1837 +6904 1831 +6916 1824 +6948 1812 +6960 1805 +6966 1799 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +6897 1843 +6904 1837 +6916 1831 +6948 1818 +6960 1812 +6966 1805 +6966 1787 +6960 1780 +6948 1774 +6922 1774 +6910 1780 +6904 1787 +6897 1799 +6897 1774 +6904 1787 +15 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7017 1906 +7017 1799 +7023 1780 +7036 1774 +7048 1774 +7061 1780 +7067 1793 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +7023 1906 +7023 1799 +7029 1780 +7036 1774 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6998 1862 +7048 1862 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7098 1931 +7111 1918 +7124 1900 +7136 1875 +7142 1843 +7142 1818 +7136 1787 +7124 1761 +7111 1743 +7098 1730 +10 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7111 1918 +7124 1893 +7130 1875 +7136 1843 +7136 1818 +7130 1787 +7124 1768 +7111 1743 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5370 +1804 5370 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5377 +1804 5377 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 5352 +1672 5377 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5352 +1804 5396 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +1729 5440 +1735 5440 +1735 5433 +1729 5433 +1723 5440 +1716 5452 +1716 5477 +1723 5490 +1729 5496 +1742 5502 +1786 5502 +1798 5509 +1804 5515 +13 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +1729 5496 +1786 5496 +1798 5502 +1804 5515 +1804 5521 +5 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +1742 5496 +1748 5490 +1754 5452 +1760 5433 +1773 5427 +1786 5427 +1798 5433 +1804 5452 +1804 5471 +1798 5484 +1786 5496 +11 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1754 5452 +1760 5440 +1773 5433 +1786 5433 +1798 5440 +1804 5452 +6 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1672 5565 +1779 5565 +1798 5571 +1804 5584 +1804 5597 +1798 5609 +1786 5615 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1672 5571 +1779 5571 +1798 5578 +1804 5584 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5546 +1716 5597 +2 MLine +End + +Begin %I Poly +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1679 5666 +1685 5659 +1679 5653 +1672 5659 +4 Poly +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5659 +1804 5659 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5666 +1804 5666 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5641 +1716 5666 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5641 +1804 5685 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1672 5729 +1779 5729 +1798 5735 +1804 5747 +1804 5760 +1798 5773 +1786 5779 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1672 5735 +1779 5735 +1798 5741 +1804 5747 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5710 +1716 5760 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1716 5823 +1786 5823 +1798 5829 +1804 5848 +1804 5861 +1798 5879 +1786 5892 +7 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 5829 +1786 5829 +1798 5835 +1804 5848 +4 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5892 +1804 5892 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5898 +1804 5898 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5804 +1716 5829 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1716 5873 +1716 5898 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 5892 +1804 5917 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6024 +1804 6024 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6030 +1804 6030 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +1735 6024 +1723 6011 +1716 5999 +1716 5986 +1723 5967 +1735 5955 +1754 5949 +1767 5949 +1786 5955 +1798 5967 +1804 5986 +1804 5999 +1798 6011 +1786 6024 +14 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1716 5986 +1723 5974 +1735 5961 +1754 5955 +1767 5955 +1786 5961 +1798 5974 +1804 5986 +8 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1672 6005 +1672 6030 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1804 6024 +1804 6049 +2 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +1754 6087 +1754 6162 +1742 6162 +1729 6156 +1723 6150 +1716 6137 +1716 6118 +1723 6099 +1735 6087 +1754 6080 +1767 6080 +1786 6087 +1798 6099 +1804 6118 +1804 6131 +1798 6150 +1786 6162 +17 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1754 6156 +1735 6156 +1723 6150 +3 MLine +End + +Begin %I MLine +[0.4461382 0 0 0.4461382 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1716 6118 +1723 6106 +1735 6093 +1754 6087 +1767 6087 +1786 6093 +1798 6106 +1804 6118 +8 MLine +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5395 6543 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +3045 4078 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5138 5898 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6451 5080 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4658 8398 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8920 3214 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5407 6647 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4669 5933 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5268 6785 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5084 2696 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4385 8467 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4324 6359 32 Circ +End + +Begin %I Circ +[1.08 0 0 1.08 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5395 6543 32 Circ +End + +Begin %I Poly +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +4324 6359 +4385 8467 +5084 2696 +5268 6785 +4669 5933 +5407 6647 +8920 3214 +4658 8398 +6451 5080 +5138 5898 +3045 4078 +5395 6543 +12 Poly +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/integration.texi b/software/gsl-1.15/doc/integration.texi new file mode 100644 index 000000000..f8c89f056 --- /dev/null +++ b/software/gsl-1.15/doc/integration.texi @@ -0,0 +1,973 @@ +@cindex quadrature +@cindex numerical integration (quadrature) +@cindex integration, numerical (quadrature) +@cindex QUADPACK + +This chapter describes routines for performing numerical integration +(quadrature) of a function in one dimension. There are routines for +adaptive and non-adaptive integration of general functions, with +specialised routines for specific cases. These include integration over +infinite and semi-infinite ranges, singular integrals, including +logarithmic singularities, computation of Cauchy principal values and +oscillatory integrals. The library reimplements the algorithms used in +@sc{quadpack}, a numerical integration package written by Piessens, +de Doncker-Kapenga, Ueberhuber and Kahaner. Fortran code for @sc{quadpack} is +available on Netlib. Also included are non-adaptive, fixed-order +Gauss-Legendre integration routines with high precision coefficients +by Pavel Holoborodko. + +The functions described in this chapter are declared in the header file +@file{gsl_integration.h}. + +@menu +* Numerical Integration Introduction:: +* QNG non-adaptive Gauss-Kronrod integration:: +* QAG adaptive integration:: +* QAGS adaptive integration with singularities:: +* QAGP adaptive integration with known singular points:: +* QAGI adaptive integration on infinite intervals:: +* QAWC adaptive integration for Cauchy principal values:: +* QAWS adaptive integration for singular functions:: +* QAWO adaptive integration for oscillatory functions:: +* QAWF adaptive integration for Fourier integrals:: +* CQUAD doubly-adaptive integration:: +* Fixed order Gauss-Legendre integration:: +* Numerical integration error codes:: +* Numerical integration examples:: +* Numerical integration References and Further Reading:: +@end menu + +@node Numerical Integration Introduction +@section Introduction + +Each algorithm computes an approximation to a definite integral of the +form, +@tex +\beforedisplay +$$ +I = \int_a^b f(x) w(x) \,dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_a^b f(x) w(x) dx +@end example + +@end ifinfo +@noindent +where @math{w(x)} is a weight function (for general integrands @math{w(x)=1}). +The user provides absolute and relative error bounds +@c{$(\hbox{\it epsabs}, \hbox{\it epsrel}\,)$} +@math{(epsabs, epsrel)} which specify the following accuracy requirement, +@tex +\beforedisplay +$$ +|\hbox{\it RESULT} - I| \leq \max(\hbox{\it epsabs}, \hbox{\it epsrel}\, |I|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|RESULT - I| <= max(epsabs, epsrel |I|) +@end example + +@end ifinfo +@noindent +where +@c{$\hbox{\it RESULT}$} +@math{RESULT} is the numerical approximation obtained by the +algorithm. The algorithms attempt to estimate the absolute error +@c{$\hbox{\it ABSERR} = |\hbox{\it RESULT} - I|$} +@math{ABSERR = |RESULT - I|} in such a way that the following inequality +holds, +@tex +\beforedisplay +$$ +|\hbox{\it RESULT} - I| \leq \hbox{\it ABSERR} \leq \max(\hbox{\it epsabs}, \hbox{\it epsrel}\,|I|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|RESULT - I| <= ABSERR <= max(epsabs, epsrel |I|) +@end example + +@end ifinfo +@noindent +In short, the routines return the first approximation +which has an absolute error smaller than @c{$\hbox{\it epsabs}$} +@math{epsabs} or a relative error smaller than @c{$\hbox{\it epsrel}$} +@math{epsrel}. + +Note that this is an @i{either-or} constraint, +not simultaneous. To compute to a specified absolute error, set @c{$\hbox{\it epsrel}$} +@math{epsrel} to zero. To compute to a specified relative error, +set @c{$\hbox{\it epsabs}$} +@math{epsabs} to zero. +The routines will fail to converge if the error bounds are too +stringent, but always return the best approximation obtained up to +that stage. + +The algorithms in @sc{quadpack} use a naming convention based on the +following letters, + +@display +@code{Q} - quadrature routine + +@code{N} - non-adaptive integrator +@code{A} - adaptive integrator + +@code{G} - general integrand (user-defined) +@code{W} - weight function with integrand + +@code{S} - singularities can be more readily integrated +@code{P} - points of special difficulty can be supplied +@code{I} - infinite range of integration +@code{O} - oscillatory weight function, cos or sin +@code{F} - Fourier integral +@code{C} - Cauchy principal value +@end display + +@noindent +The algorithms are built on pairs of quadrature rules, a higher order +rule and a lower order rule. The higher order rule is used to compute +the best approximation to an integral over a small range. The +difference between the results of the higher order rule and the lower +order rule gives an estimate of the error in the approximation. + +@menu +* Integrands without weight functions:: +* Integrands with weight functions:: +* Integrands with singular weight functions:: +@end menu + +@node Integrands without weight functions +@subsection Integrands without weight functions +@cindex Gauss-Kronrod quadrature +The algorithms for general functions (without a weight function) are +based on Gauss-Kronrod rules. + +A Gauss-Kronrod rule begins with a classical Gaussian quadrature rule of +order @math{m}. This is extended with additional points between each of +the abscissae to give a higher order Kronrod rule of order @math{2m+1}. +The Kronrod rule is efficient because it reuses existing function +evaluations from the Gaussian rule. + +The higher order Kronrod rule is used as the best approximation to the +integral, and the difference between the two rules is used as an +estimate of the error in the approximation. + +@node Integrands with weight functions +@subsection Integrands with weight functions +@cindex Clenshaw-Curtis quadrature +@cindex Modified Clenshaw-Curtis quadrature +For integrands with weight functions the algorithms use Clenshaw-Curtis +quadrature rules. + +A Clenshaw-Curtis rule begins with an @math{n}-th order Chebyshev +polynomial approximation to the integrand. This polynomial can be +integrated exactly to give an approximation to the integral of the +original function. The Chebyshev expansion can be extended to higher +orders to improve the approximation and provide an estimate of the +error. + +@node Integrands with singular weight functions +@subsection Integrands with singular weight functions + +The presence of singularities (or other behavior) in the integrand can +cause slow convergence in the Chebyshev approximation. The modified +Clenshaw-Curtis rules used in @sc{quadpack} separate out several common +weight functions which cause slow convergence. + +These weight functions are integrated analytically against the Chebyshev +polynomials to precompute @dfn{modified Chebyshev moments}. Combining +the moments with the Chebyshev approximation to the function gives the +desired integral. The use of analytic integration for the singular part +of the function allows exact cancellations and substantially improves +the overall convergence behavior of the integration. + + +@node QNG non-adaptive Gauss-Kronrod integration +@section QNG non-adaptive Gauss-Kronrod integration +@cindex QNG quadrature algorithm + +The QNG algorithm is a non-adaptive procedure which uses fixed +Gauss-Kronrod-Patterson abscissae to sample the integrand at a maximum of 87 +points. It is provided for fast integration of smooth functions. + +@deftypefun int gsl_integration_qng (const gsl_function * @var{f}, double @var{a}, double @var{b}, double @var{epsabs}, double @var{epsrel}, double * @var{result}, double * @var{abserr}, size_t * @var{neval}) + +This function applies the Gauss-Kronrod 10-point, 21-point, 43-point and +87-point integration rules in succession until an estimate of the +integral of @math{f} over @math{(a,b)} is achieved within the desired +absolute and relative error limits, @var{epsabs} and @var{epsrel}. The +function returns the final approximation, @var{result}, an estimate of +the absolute error, @var{abserr} and the number of function evaluations +used, @var{neval}. The Gauss-Kronrod rules are designed in such a way +that each rule uses all the results of its predecessors, in order to +minimize the total number of function evaluations. +@end deftypefun + + +@node QAG adaptive integration +@section QAG adaptive integration +@cindex QAG quadrature algorithm + +The QAG algorithm is a simple adaptive integration procedure. The +integration region is divided into subintervals, and on each iteration +the subinterval with the largest estimated error is bisected. This +reduces the overall error rapidly, as the subintervals become +concentrated around local difficulties in the integrand. These +subintervals are managed by a @code{gsl_integration_workspace} struct, +which handles the memory for the subinterval ranges, results and error +estimates. + +@deftypefun {gsl_integration_workspace *} gsl_integration_workspace_alloc (size_t @var{n}) +@tpindex gsl_integration_workspace +This function allocates a workspace sufficient to hold @var{n} double +precision intervals, their integration results and error estimates. +@end deftypefun + +@deftypefun void gsl_integration_workspace_free (gsl_integration_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_integration_qag (const gsl_function * @var{f}, double @var{a}, double @var{b}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, int @var{key}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function applies an integration rule adaptively until an estimate +of the integral of @math{f} over @math{(a,b)} is achieved within the +desired absolute and relative error limits, @var{epsabs} and +@var{epsrel}. The function returns the final approximation, +@var{result}, and an estimate of the absolute error, @var{abserr}. The +integration rule is determined by the value of @var{key}, which should +be chosen from the following symbolic names, + +@example +GSL_INTEG_GAUSS15 (key = 1) +GSL_INTEG_GAUSS21 (key = 2) +GSL_INTEG_GAUSS31 (key = 3) +GSL_INTEG_GAUSS41 (key = 4) +GSL_INTEG_GAUSS51 (key = 5) +GSL_INTEG_GAUSS61 (key = 6) +@end example + +@noindent +corresponding to the 15, 21, 31, 41, 51 and 61 point Gauss-Kronrod +rules. The higher-order rules give better accuracy for smooth functions, +while lower-order rules save time when the function contains local +difficulties, such as discontinuities. + +On each iteration the adaptive integration strategy bisects the interval +with the largest error estimate. The subintervals and their results are +stored in the memory provided by @var{workspace}. The maximum number of +subintervals is given by @var{limit}, which may not exceed the allocated +size of the workspace. +@end deftypefun + + +@node QAGS adaptive integration with singularities +@section QAGS adaptive integration with singularities +@cindex QAGS quadrature algorithm + +The presence of an integrable singularity in the integration region +causes an adaptive routine to concentrate new subintervals around the +singularity. As the subintervals decrease in size the successive +approximations to the integral converge in a limiting fashion. This +approach to the limit can be accelerated using an extrapolation +procedure. The QAGS algorithm combines adaptive bisection with the Wynn +epsilon-algorithm to speed up the integration of many types of +integrable singularities. + +@deftypefun int gsl_integration_qags (const gsl_function * @var{f}, double @var{a}, double @var{b}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function applies the Gauss-Kronrod 21-point integration rule +adaptively until an estimate of the integral of @math{f} over +@math{(a,b)} is achieved within the desired absolute and relative error +limits, @var{epsabs} and @var{epsrel}. The results are extrapolated +using the epsilon-algorithm, which accelerates the convergence of the +integral in the presence of discontinuities and integrable +singularities. The function returns the final approximation from the +extrapolation, @var{result}, and an estimate of the absolute error, +@var{abserr}. The subintervals and their results are stored in the +memory provided by @var{workspace}. The maximum number of subintervals +is given by @var{limit}, which may not exceed the allocated size of the +workspace. + +@end deftypefun + +@node QAGP adaptive integration with known singular points +@section QAGP adaptive integration with known singular points +@cindex QAGP quadrature algorithm +@cindex singular points, specifying positions in quadrature +@deftypefun int gsl_integration_qagp (const gsl_function * @var{f}, double * @var{pts}, size_t @var{npts}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function applies the adaptive integration algorithm QAGS taking +account of the user-supplied locations of singular points. The array +@var{pts} of length @var{npts} should contain the endpoints of the +integration ranges defined by the integration region and locations of +the singularities. For example, to integrate over the region +@math{(a,b)} with break-points at @math{x_1, x_2, x_3} (where +@math{a < x_1 < x_2 < x_3 < b}) the following @var{pts} array should be used + +@example +pts[0] = a +pts[1] = x_1 +pts[2] = x_2 +pts[3] = x_3 +pts[4] = b +@end example + +@noindent +with @var{npts} = 5. + +@noindent +If you know the locations of the singular points in the integration +region then this routine will be faster than @code{QAGS}. + +@end deftypefun + +@node QAGI adaptive integration on infinite intervals +@section QAGI adaptive integration on infinite intervals +@cindex QAGI quadrature algorithm + +@deftypefun int gsl_integration_qagi (gsl_function * @var{f}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function computes the integral of the function @var{f} over the +infinite interval @math{(-\infty,+\infty)}. The integral is mapped onto the +semi-open interval @math{(0,1]} using the transformation @math{x = (1-t)/t}, +@tex +\beforedisplay +$$ +\int_{-\infty}^{+\infty} dx \, f(x) + = \int_0^1 dt \, (f((1-t)/t) + f(-(1-t)/t))/t^2. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\int_@{-\infty@}^@{+\infty@} dx f(x) = + \int_0^1 dt (f((1-t)/t) + f((-1+t)/t))/t^2. +@end example + +@end ifinfo +@noindent +It is then integrated using the QAGS algorithm. The normal 21-point +Gauss-Kronrod rule of QAGS is replaced by a 15-point rule, because the +transformation can generate an integrable singularity at the origin. In +this case a lower-order rule is more efficient. +@end deftypefun + +@deftypefun int gsl_integration_qagiu (gsl_function * @var{f}, double @var{a}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function computes the integral of the function @var{f} over the +semi-infinite interval @math{(a,+\infty)}. The integral is mapped onto the +semi-open interval @math{(0,1]} using the transformation @math{x = a + (1-t)/t}, +@tex +\beforedisplay +$$ +\int_{a}^{+\infty} dx \, f(x) + = \int_0^1 dt \, f(a + (1-t)/t)/t^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\int_@{a@}^@{+\infty@} dx f(x) = + \int_0^1 dt f(a + (1-t)/t)/t^2 +@end example + +@end ifinfo +@noindent +and then integrated using the QAGS algorithm. +@end deftypefun + +@deftypefun int gsl_integration_qagil (gsl_function * @var{f}, double @var{b}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) +This function computes the integral of the function @var{f} over the +semi-infinite interval @math{(-\infty,b)}. The integral is mapped onto the +semi-open interval @math{(0,1]} using the transformation @math{x = b - (1-t)/t}, +@tex +\beforedisplay +$$ +\int_{-\infty}^{b} dx \, f(x) + = \int_0^1 dt \, f(b - (1-t)/t)/t^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\int_@{-\infty@}^@{b@} dx f(x) = + \int_0^1 dt f(b - (1-t)/t)/t^2 +@end example + +@end ifinfo +@noindent +and then integrated using the QAGS algorithm. +@end deftypefun + +@node QAWC adaptive integration for Cauchy principal values +@section QAWC adaptive integration for Cauchy principal values +@cindex QAWC quadrature algorithm +@cindex Cauchy principal value, by numerical quadrature +@deftypefun int gsl_integration_qawc (gsl_function * @var{f}, double @var{a}, double @var{b}, double @var{c}, double @var{epsabs}, double @var{epsrel}, size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function computes the Cauchy principal value of the integral of +@math{f} over @math{(a,b)}, with a singularity at @var{c}, +@tex +\beforedisplay +$$ +I = \int_a^b dx\, {f(x) \over x - c} + = \lim_{\epsilon \to 0} +\left\{ +\int_a^{c-\epsilon} dx\, {f(x) \over x - c} ++ +\int_{c+\epsilon}^b dx\, {f(x) \over x - c} +\right\} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_a^b dx f(x) / (x - c) +@end example + +@end ifinfo +@noindent +The adaptive bisection algorithm of QAG is used, with modifications to +ensure that subdivisions do not occur at the singular point @math{x = c}. +When a subinterval contains the point @math{x = c} or is close to +it then a special 25-point modified Clenshaw-Curtis rule is used to control +the singularity. Further away from the +singularity the algorithm uses an ordinary 15-point Gauss-Kronrod +integration rule. + +@end deftypefun + +@node QAWS adaptive integration for singular functions +@section QAWS adaptive integration for singular functions +@cindex QAWS quadrature algorithm +@cindex singular functions, numerical integration of +The QAWS algorithm is designed for integrands with algebraic-logarithmic +singularities at the end-points of an integration region. In order to +work efficiently the algorithm requires a precomputed table of +Chebyshev moments. + +@deftypefun {gsl_integration_qaws_table *} gsl_integration_qaws_table_alloc (double @var{alpha}, double @var{beta}, int @var{mu}, int @var{nu}) +@tpindex gsl_integration_qaws_table +This function allocates space for a @code{gsl_integration_qaws_table} +struct describing a singular weight function +@math{W(x)} with the parameters @math{(\alpha, \beta, \mu, \nu)}, +@tex +\beforedisplay +$$ +W(x) = (x - a)^\alpha (b - x)^\beta \log^\mu (x - a) \log^\nu (b - x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +W(x) = (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x) +@end example + +@end ifinfo +@noindent +where @math{\alpha > -1}, @math{\beta > -1}, and @math{\mu = 0, 1}, +@math{\nu = 0, 1}. The weight function can take four different forms +depending on the values of @math{\mu} and @math{\nu}, +@tex +\beforedisplay +$$ +\matrix{ +W(x) = (x - a)^\alpha (b - x)^\beta + \hfill~ (\mu = 0, \nu = 0) \cr +W(x) = (x - a)^\alpha (b - x)^\beta \log(x - a) + \hfill~ (\mu = 1, \nu = 0) \cr +W(x) = (x - a)^\alpha (b - x)^\beta \log(b - x) + \hfill~ (\mu = 0, \nu = 1) \cr +W(x) = (x - a)^\alpha (b - x)^\beta \log(x - a) \log(b - x) + \hfill~ (\mu = 1, \nu = 1) +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +W(x) = (x-a)^alpha (b-x)^beta (mu = 0, nu = 0) +W(x) = (x-a)^alpha (b-x)^beta log(x-a) (mu = 1, nu = 0) +W(x) = (x-a)^alpha (b-x)^beta log(b-x) (mu = 0, nu = 1) +W(x) = (x-a)^alpha (b-x)^beta log(x-a) log(b-x) (mu = 1, nu = 1) +@end example + +@end ifinfo +@noindent +The singular points @math{(a,b)} do not have to be specified until the +integral is computed, where they are the endpoints of the integration +range. + +The function returns a pointer to the newly allocated table +@code{gsl_integration_qaws_table} if no errors were detected, and 0 in +the case of error. +@end deftypefun + +@deftypefun int gsl_integration_qaws_table_set (gsl_integration_qaws_table * @var{t}, double @var{alpha}, double @var{beta}, int @var{mu}, int @var{nu}) +This function modifies the parameters @math{(\alpha, \beta, \mu, \nu)} of +an existing @code{gsl_integration_qaws_table} struct @var{t}. +@end deftypefun + +@deftypefun void gsl_integration_qaws_table_free (gsl_integration_qaws_table * @var{t}) +This function frees all the memory associated with the +@code{gsl_integration_qaws_table} struct @var{t}. +@end deftypefun + +@deftypefun int gsl_integration_qaws (gsl_function * @var{f}, const double @var{a}, const double @var{b}, gsl_integration_qaws_table * @var{t}, const double @var{epsabs}, const double @var{epsrel}, const size_t @var{limit}, gsl_integration_workspace * @var{workspace}, double * @var{result}, double * @var{abserr}) + +This function computes the integral of the function @math{f(x)} over the +interval @math{(a,b)} with the singular weight function +@math{(x-a)^\alpha (b-x)^\beta \log^\mu (x-a) \log^\nu (b-x)}. The parameters +of the weight function @math{(\alpha, \beta, \mu, \nu)} are taken from the +table @var{t}. The integral is, +@tex +\beforedisplay +$$ +I = \int_a^b dx\, f(x) (x - a)^\alpha (b - x)^\beta + \log^\mu (x - a) \log^\nu (b - x). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_a^b dx f(x) (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x). +@end example + +@end ifinfo +@noindent +The adaptive bisection algorithm of QAG is used. When a subinterval +contains one of the endpoints then a special 25-point modified +Clenshaw-Curtis rule is used to control the singularities. For +subintervals which do not include the endpoints an ordinary 15-point +Gauss-Kronrod integration rule is used. + +@end deftypefun + +@node QAWO adaptive integration for oscillatory functions +@section QAWO adaptive integration for oscillatory functions +@cindex QAWO quadrature algorithm +@cindex oscillatory functions, numerical integration of +The QAWO algorithm is designed for integrands with an oscillatory +factor, @math{\sin(\omega x)} or @math{\cos(\omega x)}. In order to +work efficiently the algorithm requires a table of Chebyshev moments +which must be pre-computed with calls to the functions below. + +@deftypefun {gsl_integration_qawo_table *} gsl_integration_qawo_table_alloc (double @var{omega}, double @var{L}, enum gsl_integration_qawo_enum @var{sine}, size_t @var{n}) +@tpindex gsl_integration_qawo_table +This function allocates space for a @code{gsl_integration_qawo_table} +struct and its associated workspace describing a sine or cosine weight +function @math{W(x)} with the parameters @math{(\omega, L)}, +@tex +\beforedisplay +$$ +\eqalign{ +W(x) & = \left\{\matrix{\sin(\omega x) \cr \cos(\omega x)} \right\} +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +W(x) = sin(omega x) +W(x) = cos(omega x) +@end example + +@end ifinfo +@noindent +The parameter @var{L} must be the length of the interval over which the +function will be integrated @math{L = b - a}. The choice of sine or +cosine is made with the parameter @var{sine} which should be chosen from +one of the two following symbolic values: + +@example +GSL_INTEG_COSINE +GSL_INTEG_SINE +@end example + +@noindent +The @code{gsl_integration_qawo_table} is a table of the trigonometric +coefficients required in the integration process. The parameter @var{n} +determines the number of levels of coefficients that are computed. Each +level corresponds to one bisection of the interval @math{L}, so that +@var{n} levels are sufficient for subintervals down to the length +@math{L/2^n}. The integration routine @code{gsl_integration_qawo} +returns the error @code{GSL_ETABLE} if the number of levels is +insufficient for the requested accuracy. + +@end deftypefun + +@deftypefun int gsl_integration_qawo_table_set (gsl_integration_qawo_table * @var{t}, double @var{omega}, double @var{L}, enum gsl_integration_qawo_enum @var{sine}) +This function changes the parameters @var{omega}, @var{L} and @var{sine} +of the existing workspace @var{t}. +@end deftypefun + +@deftypefun int gsl_integration_qawo_table_set_length (gsl_integration_qawo_table * @var{t}, double @var{L}) +This function allows the length parameter @var{L} of the workspace +@var{t} to be changed. +@end deftypefun + +@deftypefun void gsl_integration_qawo_table_free (gsl_integration_qawo_table * @var{t}) +This function frees all the memory associated with the workspace @var{t}. +@end deftypefun + +@deftypefun int gsl_integration_qawo (gsl_function * @var{f}, const double @var{a}, const double @var{epsabs}, const double @var{epsrel}, const size_t @var{limit}, gsl_integration_workspace * @var{workspace}, gsl_integration_qawo_table * @var{wf}, double * @var{result}, double * @var{abserr}) + +This function uses an adaptive algorithm to compute the integral of +@math{f} over @math{(a,b)} with the weight function +@math{\sin(\omega x)} or @math{\cos(\omega x)} defined +by the table @var{wf}, +@tex +\beforedisplay +$$ +\eqalign{ +I & = \int_a^b dx\, f(x) \left\{ \matrix{\sin(\omega x) \cr \cos(\omega x)}\right\} +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_a^b dx f(x) sin(omega x) +I = \int_a^b dx f(x) cos(omega x) +@end example + +@end ifinfo +@noindent +The results are extrapolated using the epsilon-algorithm to accelerate +the convergence of the integral. The function returns the final +approximation from the extrapolation, @var{result}, and an estimate of +the absolute error, @var{abserr}. The subintervals and their results are +stored in the memory provided by @var{workspace}. The maximum number of +subintervals is given by @var{limit}, which may not exceed the allocated +size of the workspace. + +Those subintervals with ``large'' widths @math{d} where @math{d\omega > 4} are +computed using a 25-point Clenshaw-Curtis integration rule, which handles the +oscillatory behavior. Subintervals with a ``small'' widths where +@math{d\omega < 4} are computed using a 15-point Gauss-Kronrod integration. + +@end deftypefun + +@node QAWF adaptive integration for Fourier integrals +@section QAWF adaptive integration for Fourier integrals +@cindex QAWF quadrature algorithm +@cindex Fourier integrals, numerical + +@deftypefun int gsl_integration_qawf (gsl_function * @var{f}, const double @var{a}, const double @var{epsabs}, const size_t @var{limit}, gsl_integration_workspace * @var{workspace}, gsl_integration_workspace * @var{cycle_workspace}, gsl_integration_qawo_table * @var{wf}, double * @var{result}, double * @var{abserr}) + +This function attempts to compute a Fourier integral of the function +@var{f} over the semi-infinite interval @math{[a,+\infty)}. +@tex +\beforedisplay +$$ +\eqalign{ +I & = \int_a^{+\infty} dx\, f(x) \left\{ \matrix{ \sin(\omega x) \cr + \cos(\omega x) } \right\} +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_a^@{+\infty@} dx f(x) sin(omega x) +I = \int_a^@{+\infty@} dx f(x) cos(omega x) +@end example +@end ifinfo + +The parameter @math{\omega} and choice of @math{\sin} or @math{\cos} is +taken from the table @var{wf} (the length @var{L} can take any value, +since it is overridden by this function to a value appropriate for the +Fourier integration). The integral is computed using the QAWO algorithm +over each of the subintervals, +@tex +\beforedisplay +$$ +\eqalign{ +C_1 & = [a, a + c] \cr +C_2 & = [a + c, a + 2c] \cr +\dots & = \dots \cr +C_k & = [a + (k-1) c, a + k c] +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +C_1 = [a, a + c] +C_2 = [a + c, a + 2 c] +... = ... +C_k = [a + (k-1) c, a + k c] +@end example + +@end ifinfo +@noindent +where +@c{$c = (2 \,\hbox{floor}(|\omega|) + 1) \pi/|\omega|$} +@math{c = (2 floor(|\omega|) + 1) \pi/|\omega|}. The width @math{c} is +chosen to cover an odd number of periods so that the contributions from +the intervals alternate in sign and are monotonically decreasing when +@var{f} is positive and monotonically decreasing. The sum of this +sequence of contributions is accelerated using the epsilon-algorithm. + +This function works to an overall absolute tolerance of +@var{abserr}. The following strategy is used: on each interval +@math{C_k} the algorithm tries to achieve the tolerance +@tex +\beforedisplay +$$ +TOL_k = u_k \hbox{\it abserr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +TOL_k = u_k abserr +@end example + +@end ifinfo +@noindent +where +@c{$u_k = (1 - p)p^{k-1}$} +@math{u_k = (1 - p)p^@{k-1@}} and @math{p = 9/10}. +The sum of the geometric series of contributions from each interval +gives an overall tolerance of @var{abserr}. + +If the integration of a subinterval leads to difficulties then the +accuracy requirement for subsequent intervals is relaxed, +@tex +\beforedisplay +$$ +TOL_k = u_k \max(\hbox{\it abserr}, \max_{in - 1]}, this function obtains the +@var{i}-th Gauss-Legendre point @var{xi} and weight @var{wi} on the interval +[@var{a},@var{b}]. The points and weights are ordered by increasing point +value. A function @math{f} may be integrated on [@var{a},@var{b}] by summing +@math{wi * f(xi)} over @var{i}. +@end deftypefun + +@deftypefun void gsl_integration_glfixed_table_free ({gsl_integration_glfixed_table *} @var{t}) +@tpindex gsl_integration_glfixed_table +This function frees the memory associated with the table @var{t}. +@end deftypefun + +@node Numerical integration error codes +@section Error codes + +In addition to the standard error codes for invalid arguments the +functions can return the following values, + +@table @code +@item GSL_EMAXITER +the maximum number of subdivisions was exceeded. +@item GSL_EROUND +cannot reach tolerance because of roundoff error, +or roundoff error was detected in the extrapolation table. +@item GSL_ESING +a non-integrable singularity or other bad integrand behavior was found +in the integration interval. +@item GSL_EDIVERGE +the integral is divergent, or too slowly convergent to be integrated +numerically. +@end table + +@node Numerical integration examples +@section Examples + +The integrator @code{QAGS} will handle a large class of definite +integrals. For example, consider the following integral, which has an +algebraic-logarithmic singularity at the origin, +@tex +\beforedisplay +$$ +\int_0^1 x^{-1/2} \log(x) \,dx = -4 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\int_0^1 x^@{-1/2@} log(x) dx = -4 +@end example + +@end ifinfo +@noindent +The program below computes this integral to a relative accuracy bound of +@code{1e-7}. + +@example +@verbatiminclude examples/integration.c +@end example + +@noindent +The results below show that the desired accuracy is achieved after 8 +subdivisions. + +@example +$ ./a.out +@verbatiminclude examples/integration.out +@end example + +@noindent +In fact, the extrapolation procedure used by @code{QAGS} produces an +accuracy of almost twice as many digits. The error estimate returned by +the extrapolation procedure is larger than the actual error, giving a +margin of safety of one order of magnitude. + + +@node Numerical integration References and Further Reading +@section References and Further Reading + +The following book is the definitive reference for @sc{quadpack}, and was +written by the original authors. It provides descriptions of the +algorithms, program listings, test programs and examples. It also +includes useful advice on numerical integration and many references to +the numerical integration literature used in developing @sc{quadpack}. + +@itemize @w{} +@item +R. Piessens, E. de Doncker-Kapenga, C.W. Ueberhuber, D.K. Kahaner. +@cite{@sc{quadpack} A subroutine package for automatic integration} +Springer Verlag, 1983. +@end itemize + +@noindent +The @sc{cquad} integration algorithm is described in the following paper: + +@itemize @w{} +@item +P. Gonnet, ``Increasing the Reliability of Adaptive Quadrature Using +Explicit Interpolants'', @cite{ACM Transactions on Mathematical +Software}, Volume 37 (2010), Issue 3, Article 26. +@end itemize + + + + + + diff --git a/software/gsl-1.15/doc/interp.texi b/software/gsl-1.15/doc/interp.texi new file mode 100644 index 000000000..a127f9458 --- /dev/null +++ b/software/gsl-1.15/doc/interp.texi @@ -0,0 +1,338 @@ +@cindex interpolation +@cindex spline + +This chapter describes functions for performing interpolation. The +library provides a variety of interpolation methods, including Cubic +splines and Akima splines. The interpolation types are interchangeable, +allowing different methods to be used without recompiling. +Interpolations can be defined for both normal and periodic boundary +conditions. Additional functions are available for computing +derivatives and integrals of interpolating functions. + +These interpolation methods produce curves that pass through each +datapoint. To interpolate noisy data with a smoothing curve see +@ref{Basis Splines}. + +The functions described in this section are declared in the header files +@file{gsl_interp.h} and @file{gsl_spline.h}. + +@menu +* Introduction to Interpolation:: +* Interpolation Functions:: +* Interpolation Types:: +* Index Look-up and Acceleration:: +* Evaluation of Interpolating Functions:: +* Higher-level Interface:: +* Interpolation Example programs:: +* Interpolation References and Further Reading:: +@end menu + +@node Introduction to Interpolation +@section Introduction + +Given a set of data points @math{(x_1, y_1) \dots (x_n, y_n)} the +routines described in this section compute a continuous interpolating +function @math{y(x)} such that @math{y(x_i) = y_i}. The interpolation +is piecewise smooth, and its behavior at the end-points is determined by +the type of interpolation used. + +@node Interpolation Functions +@section Interpolation Functions + +The interpolation function for a given dataset is stored in a +@code{gsl_interp} object. These are created by the following functions. + +@deftypefun {gsl_interp *} gsl_interp_alloc (const gsl_interp_type * @var{T}, size_t @var{size}) +@tpindex gsl_interp +This function returns a pointer to a newly allocated interpolation +object of type @var{T} for @var{size} data-points. +@end deftypefun + +@deftypefun int gsl_interp_init (gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], size_t @var{size}) +This function initializes the interpolation object @var{interp} for the +data (@var{xa},@var{ya}) where @var{xa} and @var{ya} are arrays of size +@var{size}. The interpolation object (@code{gsl_interp}) does not save +the data arrays @var{xa} and @var{ya} and only stores the static state +computed from the data. The @var{xa} data array is always assumed to be +strictly ordered, with increasing @math{x} values; +the behavior for other arrangements is not defined. +@end deftypefun + +@deftypefun void gsl_interp_free (gsl_interp * @var{interp}) +This function frees the interpolation object @var{interp}. +@end deftypefun + +@node Interpolation Types +@section Interpolation Types +@tpindex gsl_interp_type +The interpolation library provides six interpolation types: + +@deffn {Interpolation Type} gsl_interp_linear +@cindex linear interpolation +Linear interpolation. This interpolation method does not require any +additional memory. +@end deffn + +@deffn {Interpolation Type} gsl_interp_polynomial +@cindex polynomial interpolation +Polynomial interpolation. This method should only be used for +interpolating small numbers of points because polynomial interpolation +introduces large oscillations, even for well-behaved datasets. The +number of terms in the interpolating polynomial is equal to the number +of points. +@end deffn + +@deffn {Interpolation Type} gsl_interp_cspline +@cindex cubic splines +Cubic spline with natural boundary conditions. The resulting curve is +piecewise cubic on each interval, with matching first and second +derivatives at the supplied data-points. The second derivative is +chosen to be zero at the first point and last point. +@end deffn + +@deffn {Interpolation Type} gsl_interp_cspline_periodic +Cubic spline with periodic boundary conditions. The resulting curve +is piecewise cubic on each interval, with matching first and second +derivatives at the supplied data-points. The derivatives at the first +and last points are also matched. Note that the last point in the +data must have the same y-value as the first point, otherwise the +resulting periodic interpolation will have a discontinuity at the +boundary. + +@end deffn + +@deffn {Interpolation Type} gsl_interp_akima +@cindex Akima splines +Non-rounded Akima spline with natural boundary conditions. This method +uses the non-rounded corner algorithm of Wodicka. +@end deffn + +@deffn {Interpolation Type} gsl_interp_akima_periodic +Non-rounded Akima spline with periodic boundary conditions. This method +uses the non-rounded corner algorithm of Wodicka. +@end deffn + +The following related functions are available: + +@deftypefun {const char *} gsl_interp_name (const gsl_interp * @var{interp}) +This function returns the name of the interpolation type used by @var{interp}. +For example, + +@example +printf ("interp uses '%s' interpolation.\n", + gsl_interp_name (interp)); +@end example + +@noindent +would print something like, + +@example +interp uses 'cspline' interpolation. +@end example +@end deftypefun + +@deftypefun {unsigned int} gsl_interp_min_size (const gsl_interp * @var{interp}) +@deftypefunx {unsigned int} gsl_interp_type_min_size (const gsl_interp_type * @var{T}) +These functions return the minimum number of points required by the +interpolation object @var{interp} or interpolation type @var{T}. For +example, Akima spline interpolation requires a minimum of 5 points. +@end deftypefun + + + +@node Index Look-up and Acceleration +@section Index Look-up and Acceleration + +The state of searches can be stored in a @code{gsl_interp_accel} object, +which is a kind of iterator for interpolation lookups. It caches the +previous value of an index lookup. When the subsequent interpolation +point falls in the same interval its index value can be returned +immediately. + +@deftypefun size_t gsl_interp_bsearch (const double @var{x_array}[], double @var{x}, size_t @var{index_lo}, size_t @var{index_hi}) +This function returns the index @math{i} of the array @var{x_array} such +that @code{x_array[i] <= x < x_array[i+1]}. The index is searched for +in the range [@var{index_lo},@var{index_hi}]. @inlinefn{} +@end deftypefun + +@deftypefun {gsl_interp_accel *} gsl_interp_accel_alloc (void) +@tpindex gsl_interp_accel +This function returns a pointer to an accelerator object, which is a +kind of iterator for interpolation lookups. It tracks the state of +lookups, thus allowing for application of various acceleration +strategies. +@end deftypefun + +@deftypefun size_t gsl_interp_accel_find (gsl_interp_accel * @var{a}, const double @var{x_array}[], size_t @var{size}, double @var{x}) +This function performs a lookup action on the data array @var{x_array} +of size @var{size}, using the given accelerator @var{a}. This is how +lookups are performed during evaluation of an interpolation. The +function returns an index @math{i} such that @code{x_array[i] <= x < +x_array[i+1]}. @inlinefn{} +@end deftypefun + +@deftypefun int gsl_interp_accel_reset (gsl_interp_accel * @var{acc}); +This function reinitializes the accelerator object @var{acc}. It +should be used when the cached information is no longer +applicable---for example, when switching to a new dataset. +@end deftypefun + +@deftypefun void gsl_interp_accel_free (gsl_interp_accel* @var{acc}) +This function frees the accelerator object @var{acc}. +@end deftypefun + +@node Evaluation of Interpolating Functions +@section Evaluation of Interpolating Functions + +@deftypefun double gsl_interp_eval (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_interp_eval_e (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}, double * @var{y}) +These functions return the interpolated value of @var{y} for a given +point @var{x}, using the interpolation object @var{interp}, data +arrays @var{xa} and @var{ya} and the accelerator @var{acc}. When +@var{x} is outside the range of @var{xa}, the error code +@code{GSL_EDOM} is returned with a value of @code{GSL_NAN} for +@var{y}. +@end deftypefun + +@deftypefun double gsl_interp_eval_deriv (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_interp_eval_deriv_e (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}, double * @var{d}) +These functions return the derivative @var{d} of an interpolated +function for a given point @var{x}, using the interpolation object +@var{interp}, data arrays @var{xa} and @var{ya} and the accelerator +@var{acc}. +@end deftypefun + +@deftypefun double gsl_interp_eval_deriv2 (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_interp_eval_deriv2_e (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{acc}, double * @var{d2}) +These functions return the second derivative @var{d2} of an interpolated +function for a given point @var{x}, using the interpolation object +@var{interp}, data arrays @var{xa} and @var{ya} and the accelerator +@var{acc}. +@end deftypefun + +@deftypefun double gsl_interp_eval_integ (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{a}, double @var{b}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_interp_eval_integ_e (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{a}, double @var{b}, gsl_interp_accel * @var{acc}, double * @var{result}) +These functions return the numerical integral @var{result} of an +interpolated function over the range [@var{a}, @var{b}], using the +interpolation object @var{interp}, data arrays @var{xa} and @var{ya} and +the accelerator @var{acc}. +@end deftypefun + +@node Higher-level Interface +@section Higher-level Interface + +The functions described in the previous sections required the user to +supply pointers to the @math{x} and @math{y} arrays on each call. The +following functions are equivalent to the corresponding +@code{gsl_interp} functions but maintain a copy of this data in the +@code{gsl_spline} object. This removes the need to pass both @var{xa} +and @var{ya} as arguments on each evaluation. These functions are +defined in the header file @file{gsl_spline.h}. + +@deftypefun {gsl_spline *} gsl_spline_alloc (const gsl_interp_type * @var{T}, size_t @var{size}) +@tpindex gsl_spline +@end deftypefun + +@deftypefun int gsl_spline_init (gsl_spline * @var{spline}, const double @var{xa}[], const double @var{ya}[], size_t @var{size}) +@end deftypefun + +@deftypefun void gsl_spline_free (gsl_spline * @var{spline}) +@end deftypefun + +@deftypefun {const char *} gsl_spline_name (const gsl_spline * @var{spline}) +@end deftypefun + +@deftypefun {unsigned int} gsl_spline_min_size (const gsl_spline * @var{spline}) +@end deftypefun + +@deftypefun double gsl_spline_eval (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_spline_eval_e (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}, double * @var{y}) +@end deftypefun + +@deftypefun double gsl_spline_eval_deriv (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_spline_eval_deriv_e (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}, double * @var{d}) +@end deftypefun + +@deftypefun double gsl_spline_eval_deriv2 (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_spline_eval_deriv2_e (const gsl_spline * @var{spline}, double @var{x}, gsl_interp_accel * @var{acc}, double * @var{d2}) +@end deftypefun + +@deftypefun double gsl_spline_eval_integ (const gsl_spline * @var{spline}, double @var{a}, double @var{b}, gsl_interp_accel * @var{acc}) +@deftypefunx int gsl_spline_eval_integ_e (const gsl_spline * @var{spline}, double @var{a}, double @var{b}, gsl_interp_accel * @var{acc}, double * @var{result}) +@end deftypefun + +@node Interpolation Example programs +@section Examples + +The following program demonstrates the use of the interpolation and +spline functions. It computes a cubic spline interpolation of the +10-point dataset @math{(x_i, y_i)} where @math{x_i = i + \sin(i)/2} and +@math{y_i = i + \cos(i^2)} for @math{i = 0 \dots 9}. + +@example +@verbatiminclude examples/interp.c +@end example + +@noindent +The output is designed to be used with the @sc{gnu} plotutils +@code{graph} program, + +@example +$ ./a.out > interp.dat +$ graph -T ps < interp.dat > interp.ps +@end example + +@iftex +@sp 1 +@center @image{interp2,3.4in} +@end iftex + +@noindent +The result shows a smooth interpolation of the original points. The +interpolation method can be changed simply by varying the first argument of +@code{gsl_spline_alloc}. + +The next program demonstrates a periodic cubic spline with 4 data +points. Note that the first and last points must be supplied with +the same y-value for a periodic spline. + +@example +@verbatiminclude examples/interpp.c +@end example + +@noindent + +The output can be plotted with @sc{gnu} @code{graph}. + +@example +$ ./a.out > interp.dat +$ graph -T ps < interp.dat > interp.ps +@end example + +@iftex +@sp 1 +@center @image{interpp2,3.4in} +@end iftex + +@noindent +The result shows a periodic interpolation of the original points. The +slope of the fitted curve is the same at the beginning and end of the +data, and the second derivative is also. + +@node Interpolation References and Further Reading +@section References and Further Reading + +Descriptions of the interpolation algorithms and further references can +be found in the following books: + +@itemize @w{} +@item C.W. Ueberhuber, +@cite{Numerical Computation (Volume 1), Chapter 9 ``Interpolation''}, +Springer (1997), ISBN 3-540-62058-3. + +@item D.M. Young, R.T. Gregory +@cite{A Survey of Numerical Mathematics (Volume 1), Chapter 6.8}, +Dover (1988), ISBN 0-486-65691-8. +@end itemize + +@noindent diff --git a/software/gsl-1.15/doc/interp2.eps b/software/gsl-1.15/doc/interp2.eps new file mode 100644 index 000000000..522036a0c --- /dev/null +++ b/software/gsl-1.15/doc/interp2.eps @@ -0,0 +1,3252 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Thu Mar 17 17:03:59 2005 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 107 197 835 580 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth 2 mul setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 107 197 835 580 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 16128 9216 Rect +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 128.156 214.1855 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 266.396 214.1855 ] concat +%I +[ +(2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 404.636 214.1855 ] concat +%I +[ +(4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 542.876 214.1855 ] concat +%I +[ +(6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +10598 9216 +10598 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +10598 2304 +10598 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 681.116 214.1855 ] concat +%I +[ +(8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +13363 9216 +13363 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +13363 2304 +13363 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 814.3119 214.1855 ] concat +%I +[ +(10) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 9216 +16128 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 2304 +16128 2442 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 9216 +3686 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3686 2304 +3686 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 9216 +5069 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5069 2304 +5069 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 9216 +6451 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6451 2304 +6451 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 9216 +7834 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7834 2304 +7834 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +10598 9216 +10598 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +10598 2304 +10598 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +11981 9216 +11981 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +11981 2304 +11981 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +13363 9216 +13363 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +13363 2304 +13363 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +14746 9216 +14746 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +14746 2304 +14746 2359 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 9216 +16128 9161 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 2304 +16128 2359 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 229.8568 ] concat +%I +[ +(0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 2304 +15990 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 298.9768 ] concat +%I +[ +(2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 3686 +15990 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2442 3686 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 368.0968 ] concat +%I +[ +(4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 5069 +15990 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2442 5069 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 437.2168 ] concat +%I +[ +(6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 6451 +15990 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2442 6451 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 117.9279 506.3368 ] concat +%I +[ +(8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 7834 +15990 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2442 7834 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 107.8399 575.4568 ] concat +%I +[ +(10) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 9216 +15990 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 2304 +16073 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 2995 +16073 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2995 +2359 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 3686 +16073 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2359 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 4378 +16073 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4378 +2359 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 5069 +16073 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2359 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 5760 +16073 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 6451 +16073 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2359 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 7142 +16073 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7142 +2359 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 7834 +16073 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2359 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 8525 +16073 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8525 +2359 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +16128 9216 +16073 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2196 2887 2412 3103 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +4160 3261 4376 3477 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +5589 3127 5805 3343 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +6441 3640 6657 3856 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +7202 4299 7418 4515 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +8445 6337 8661 6553 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +10297 6255 10513 6471 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +12327 7242 12543 7458 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +13939 7996 14155 8212 Rect +End + +Begin %I Rect +[0.54 0 0 0.54 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg Black +0 0 0 SetCBg +%I p +0.000000 SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +14922 8954 15138 9170 Rect +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +2304 2995 +2318 3000 +2332 3005 +2345 3010 +2359 3015 +2373 3019 +2387 3024 +2401 3029 +2415 3034 +2428 3039 +2442 3043 +2456 3048 +2470 3053 +2484 3058 +2498 3063 +2511 3067 +2525 3072 +2539 3077 +2553 3082 +2567 3086 +2580 3091 +2594 3096 +2608 3100 +2622 3105 +2636 3110 +2650 3114 +2663 3119 +2677 3123 +2691 3128 +2705 3133 +2719 3137 +2733 3142 +2746 3146 +2760 3151 +2774 3155 +2788 3160 +2802 3164 +2815 3168 +2829 3173 +2843 3177 +2857 3181 +2871 3186 +2885 3190 +2898 3194 +2912 3198 +2926 3203 +2940 3207 +2954 3211 +2968 3215 +2981 3219 +2995 3223 +3009 3227 +3023 3231 +3037 3235 +3050 3239 +3064 3243 +3078 3247 +3092 3250 +3106 3254 +3120 3258 +3133 3261 +3147 3265 +3161 3269 +3175 3272 +3189 3276 +3203 3279 +3216 3283 +3230 3286 +3244 3289 +3258 3293 +3272 3296 +3286 3299 +3299 3302 +3313 3305 +3327 3308 +3341 3311 +3355 3314 +3368 3317 +3382 3320 +3396 3323 +3410 3326 +3424 3328 +3438 3331 +3451 3334 +3465 3336 +3479 3339 +3493 3341 +3507 3344 +3521 3346 +3534 3348 +3548 3350 +3562 3353 +3576 3355 +3590 3357 +3603 3359 +3617 3361 +3631 3362 +3645 3364 +3659 3366 +3673 3368 +3686 3369 +3700 3371 +3714 3372 +3728 3374 +3742 3375 +3756 3376 +3769 3377 +3783 3378 +3797 3379 +3811 3380 +3825 3381 +3838 3382 +3852 3383 +3866 3384 +3880 3384 +3894 3385 +3908 3385 +3921 3386 +3935 3386 +3949 3386 +3963 3386 +3977 3386 +3991 3386 +4004 3386 +4018 3386 +4032 3386 +4046 3386 +4060 3385 +4073 3385 +4087 3384 +4101 3383 +4115 3383 +4129 3382 +4143 3381 +4156 3380 +4170 3379 +4184 3378 +4198 3376 +4212 3375 +4226 3374 +4239 3372 +4253 3371 +4267 3369 +4281 3367 +4295 3365 +4308 3363 +4322 3361 +4336 3359 +4350 3357 +4364 3354 +4378 3352 +4391 3349 +4405 3347 +4419 3344 +4433 3342 +4447 3339 +4461 3336 +4474 3333 +4488 3331 +4502 3328 +4516 3325 +4530 3322 +4543 3319 +4557 3316 +4571 3313 +4585 3309 +4599 3306 +4613 3303 +4626 3300 +4640 3297 +4654 3294 +4668 3290 +4682 3287 +4696 3284 +4709 3281 +4723 3277 +4737 3274 +4751 3271 +4765 3268 +4778 3265 +4792 3261 +4806 3258 +4820 3255 +4834 3252 +4848 3249 +4861 3246 +4875 3243 +4889 3240 +4903 3237 +4917 3234 +4931 3231 +4944 3228 +4958 3226 +4972 3223 +4986 3220 +5000 3218 +5014 3215 +5027 3213 +5041 3210 +5055 3208 +5069 3206 +5083 3204 +5096 3202 +5110 3200 +5124 3198 +5138 3196 +5152 3194 +5166 3193 +5179 3191 +5193 3190 +5207 3189 +5221 3187 +5235 3186 +5249 3185 +5262 3184 +5276 3184 +5290 3183 +5304 3183 +5318 3182 +5331 3182 +5345 3182 +5359 3182 +5373 3182 +5387 3183 +5401 3183 +5414 3184 +5428 3185 +5442 3185 +5456 3187 +5470 3188 +5484 3189 +5497 3191 +5511 3193 +5525 3195 +5539 3197 +5553 3199 +5566 3201 +5580 3204 +5594 3207 +5608 3210 +5622 3213 +5636 3217 +5649 3220 +5663 3224 +5677 3228 +5691 3233 +5705 3237 +5719 3242 +5732 3247 +5746 3252 +5760 3257 +5774 3262 +5788 3268 +5801 3274 +5815 3280 +5829 3286 +5843 3293 +5857 3299 +5871 3306 +5884 3313 +5898 3320 +5912 3327 +5926 3334 +5940 3342 +5954 3350 +5967 3357 +5981 3365 +5995 3373 +6009 3381 +6023 3390 +6036 3398 +6050 3406 +6064 3415 +6078 3424 +6092 3432 +6106 3441 +6119 3450 +6133 3459 +6147 3468 +6161 3478 +6175 3487 +6189 3496 +6202 3505 +6216 3515 +6230 3524 +6244 3534 +6258 3544 +6271 3553 +6285 3563 +6299 3572 +6313 3582 +6327 3592 +6341 3602 +6354 3611 +6368 3621 +6382 3631 +6396 3641 +6410 3651 +6424 3660 +6437 3670 +6451 3680 +6465 3690 +6479 3699 +6493 3709 +6506 3719 +6520 3728 +6534 3738 +6548 3747 +6562 3757 +6576 3766 +6589 3776 +6603 3785 +6617 3794 +6631 3804 +6645 3813 +6659 3822 +6672 3832 +6686 3841 +6700 3850 +6714 3860 +6728 3869 +6742 3879 +6755 3888 +6769 3898 +6783 3908 +6797 3917 +6811 3927 +6824 3937 +6838 3947 +6852 3957 +6866 3968 +6880 3978 +6894 3988 +6907 3999 +6921 4010 +6935 4021 +6949 4032 +6963 4043 +6977 4055 +6990 4067 +7004 4078 +7018 4091 +7032 4103 +7046 4115 +7059 4128 +7073 4141 +7087 4154 +7101 4168 +7115 4181 +7129 4195 +7142 4209 +7156 4224 +7170 4239 +7184 4254 +7198 4269 +7212 4285 +7225 4301 +7239 4317 +7253 4334 +7267 4351 +7281 4368 +7294 4386 +7308 4404 +7322 4422 +7336 4441 +7350 4460 +7364 4480 +7377 4500 +7391 4520 +7405 4540 +7419 4561 +7433 4582 +7447 4603 +7460 4625 +7474 4647 +7488 4669 +7502 4692 +7516 4714 +7529 4737 +7543 4760 +7557 4784 +7571 4807 +7585 4831 +7599 4855 +7612 4879 +7626 4903 +7640 4928 +7654 4952 +7668 4977 +7682 5002 +7695 5027 +7709 5052 +7723 5078 +7737 5103 +7751 5128 +7764 5154 +7778 5179 +7792 5205 +7806 5231 +7820 5257 +7834 5282 +7847 5308 +7861 5334 +7875 5360 +7889 5386 +7903 5411 +7917 5437 +7930 5463 +7944 5489 +7958 5514 +7972 5540 +7986 5566 +7999 5591 +8013 5616 +8027 5642 +8041 5667 +8055 5692 +8069 5717 +8082 5742 +8096 5767 +8110 5791 +8124 5816 +8138 5840 +8152 5864 +8165 5888 +8179 5911 +8193 5935 +8207 5958 +8221 5981 +8234 6004 +8248 6027 +8262 6049 +8276 6071 +8290 6093 +8304 6114 +8317 6136 +8331 6156 +8345 6177 +8359 6197 +8373 6217 +8387 6237 +8400 6257 +8414 6276 +8428 6294 +8442 6312 +8456 6330 +8470 6348 +8483 6365 +8497 6382 +8511 6398 +8525 6414 +8539 6429 +8552 6444 +8566 6459 +8580 6473 +8594 6487 +8608 6500 +8622 6513 +8635 6525 +8649 6537 +8663 6549 +8677 6560 +8691 6571 +8705 6581 +8718 6591 +8732 6600 +8746 6610 +8760 6618 +8774 6627 +8787 6635 +8801 6642 +8815 6650 +8829 6657 +8843 6663 +8857 6670 +8870 6676 +8884 6681 +8898 6686 +8912 6691 +8926 6696 +8940 6700 +8953 6704 +8967 6708 +8981 6711 +8995 6714 +9009 6717 +9022 6720 +9036 6722 +9050 6724 +9064 6725 +9078 6727 +9092 6728 +9105 6729 +9119 6729 +9133 6730 +9147 6730 +9161 6730 +9175 6729 +9188 6729 +9202 6728 +500 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 422 +9202 6728 +9216 6727 +9230 6726 +9244 6724 +9257 6723 +9271 6721 +9285 6719 +9299 6717 +9313 6714 +9327 6712 +9340 6709 +9354 6706 +9368 6703 +9382 6700 +9396 6696 +9410 6693 +9423 6689 +9437 6685 +9451 6681 +9465 6677 +9479 6673 +9492 6668 +9506 6664 +9520 6659 +9534 6655 +9548 6650 +9562 6645 +9575 6640 +9589 6635 +9603 6630 +9617 6625 +9631 6619 +9645 6614 +9658 6609 +9672 6603 +9686 6598 +9700 6592 +9714 6587 +9727 6581 +9741 6575 +9755 6570 +9769 6564 +9783 6558 +9797 6552 +9810 6547 +9824 6541 +9838 6535 +9852 6529 +9866 6524 +9880 6518 +9893 6512 +9907 6507 +9921 6501 +9935 6495 +9949 6490 +9962 6484 +9976 6479 +9990 6474 +10004 6468 +10018 6463 +10032 6458 +10045 6453 +10059 6448 +10073 6443 +10087 6438 +10101 6433 +10115 6428 +10128 6424 +10142 6419 +10156 6415 +10170 6411 +10184 6407 +10198 6403 +10211 6399 +10225 6395 +10239 6392 +10253 6389 +10267 6385 +10280 6382 +10294 6379 +10308 6377 +10322 6374 +10336 6372 +10350 6370 +10363 6368 +10377 6366 +10391 6364 +10405 6363 +10419 6362 +10433 6361 +10446 6360 +10460 6359 +10474 6359 +10488 6359 +10502 6359 +10515 6359 +10529 6359 +10543 6360 +10557 6361 +10571 6362 +10585 6363 +10598 6364 +10612 6366 +10626 6368 +10640 6370 +10654 6372 +10668 6374 +10681 6376 +10695 6379 +10709 6382 +10723 6385 +10737 6388 +10750 6391 +10764 6394 +10778 6398 +10792 6402 +10806 6405 +10820 6409 +10833 6414 +10847 6418 +10861 6422 +10875 6427 +10889 6432 +10903 6437 +10916 6442 +10930 6447 +10944 6452 +10958 6457 +10972 6463 +10985 6468 +10999 6474 +11013 6480 +11027 6486 +11041 6492 +11055 6499 +11068 6505 +11082 6511 +11096 6518 +11110 6525 +11124 6531 +11138 6538 +11151 6545 +11165 6552 +11179 6560 +11193 6567 +11207 6574 +11220 6582 +11234 6589 +11248 6597 +11262 6605 +11276 6612 +11290 6620 +11303 6628 +11317 6636 +11331 6645 +11345 6653 +11359 6661 +11373 6669 +11386 6678 +11400 6686 +11414 6695 +11428 6703 +11442 6712 +11455 6721 +11469 6729 +11483 6738 +11497 6747 +11511 6756 +11525 6765 +11538 6774 +11552 6783 +11566 6792 +11580 6801 +11594 6810 +11608 6819 +11621 6828 +11635 6838 +11649 6847 +11663 6856 +11677 6865 +11690 6875 +11704 6884 +11718 6893 +11732 6903 +11746 6912 +11760 6922 +11773 6931 +11787 6940 +11801 6950 +11815 6959 +11829 6969 +11843 6978 +11856 6987 +11870 6997 +11884 7006 +11898 7016 +11912 7025 +11926 7034 +11939 7044 +11953 7053 +11967 7062 +11981 7072 +11995 7081 +12008 7090 +12022 7099 +12036 7108 +12050 7117 +12064 7127 +12078 7136 +12091 7145 +12105 7154 +12119 7163 +12133 7171 +12147 7180 +12161 7189 +12174 7198 +12188 7206 +12202 7215 +12216 7224 +12230 7232 +12243 7241 +12257 7249 +12271 7257 +12285 7266 +12299 7274 +12313 7282 +12326 7290 +12340 7298 +12354 7306 +12368 7314 +12382 7321 +12396 7329 +12409 7336 +12423 7344 +12437 7351 +12451 7359 +12465 7366 +12478 7373 +12492 7380 +12506 7387 +12520 7394 +12534 7400 +12548 7407 +12561 7414 +12575 7420 +12589 7427 +12603 7433 +12617 7439 +12631 7446 +12644 7452 +12658 7458 +12672 7464 +12686 7470 +12700 7476 +12713 7482 +12727 7488 +12741 7494 +12755 7499 +12769 7505 +12783 7511 +12796 7516 +12810 7522 +12824 7527 +12838 7533 +12852 7538 +12866 7544 +12879 7549 +12893 7555 +12907 7560 +12921 7565 +12935 7571 +12948 7576 +12962 7581 +12976 7586 +12990 7592 +13004 7597 +13018 7602 +13031 7607 +13045 7612 +13059 7618 +13073 7623 +13087 7628 +13101 7633 +13114 7638 +13128 7644 +13142 7649 +13156 7654 +13170 7659 +13183 7665 +13197 7670 +13211 7675 +13225 7680 +13239 7686 +13253 7691 +13266 7696 +13280 7702 +13294 7707 +13308 7713 +13322 7718 +13336 7724 +13349 7729 +13363 7735 +13377 7741 +13391 7746 +13405 7752 +13418 7758 +13432 7764 +13446 7770 +13460 7775 +13474 7781 +13488 7788 +13501 7794 +13515 7800 +13529 7806 +13543 7812 +13557 7819 +13571 7825 +13584 7832 +13598 7838 +13612 7845 +13626 7852 +13640 7858 +13654 7865 +13667 7872 +13681 7879 +13695 7887 +13709 7894 +13723 7901 +13736 7909 +13750 7916 +13764 7924 +13778 7931 +13792 7939 +13806 7947 +13819 7955 +13833 7963 +13847 7972 +13861 7980 +13875 7988 +13889 7997 +13902 8006 +13916 8015 +13930 8024 +13944 8033 +13958 8042 +13971 8051 +13985 8061 +13999 8070 +14013 8080 +14027 8090 +14041 8100 +14054 8110 +14068 8120 +14082 8131 +14096 8141 +14110 8152 +14124 8163 +14137 8174 +14151 8185 +14165 8196 +14179 8207 +14193 8219 +14206 8230 +14220 8242 +14234 8254 +14248 8265 +14262 8277 +14276 8290 +14289 8302 +14303 8314 +14317 8327 +14331 8339 +14345 8352 +14359 8365 +14372 8377 +14386 8390 +14400 8403 +14414 8416 +14428 8430 +14441 8443 +14455 8456 +14469 8470 +14483 8483 +14497 8497 +14511 8511 +14524 8524 +14538 8538 +14552 8552 +14566 8566 +14580 8580 +14594 8594 +14607 8608 +14621 8623 +14635 8637 +14649 8651 +14663 8666 +14676 8680 +14690 8695 +14704 8709 +14718 8724 +14732 8738 +14746 8753 +14759 8768 +14773 8782 +14787 8797 +14801 8812 +14815 8827 +14829 8842 +14842 8857 +14856 8872 +14870 8887 +14884 8902 +14898 8917 +14911 8932 +14925 8947 +14939 8962 +14953 8977 +14967 8992 +14981 9007 +14994 9022 +15008 9037 +15022 9052 +422 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/interpp2.eps b/software/gsl-1.15/doc/interpp2.eps new file mode 100644 index 000000000..f153f0d77 --- /dev/null +++ b/software/gsl-1.15/doc/interpp2.eps @@ -0,0 +1,2004 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Sat Dec 24 16:36:40 2005 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 92 197 497 580 +%%DocumentNeededResources: font Helvetica +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: font Helvetica +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Helvetica +/DrawDict 50 dict def +DrawDict begin +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/minus/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve +/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut +/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] def +/reencodeISO { +dup dup findfont dup length dict begin +{ 1 index /FID ne { def }{ pop pop } ifelse } forall +/Encoding ISOLatin1Encoding def +currentdict end definefont +} def +/Helvetica reencodeISO def +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: font Helvetica +%%PageBoundingBox: 92 197 497 580 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 115.5459 214.1855 ] concat +%I +[ +(0.00) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 173.1459 214.1855 ] concat +%I +[ +(0.05) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 9216 +3456 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 2304 +3456 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 230.7459 214.1855 ] concat +%I +[ +(0.10) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 288.3459 214.1855 ] concat +%I +[ +(0.15) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 345.9459 214.1855 ] concat +%I +[ +(0.20) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 403.5459 214.1855 ] concat +%I +[ +(0.25) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 9216 +8064 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 2304 +8064 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 461.1459 214.1855 ] concat +%I +[ +(0.30) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 92.19974 229.8568 ] concat +%I +[ +(-0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 298.9768 ] concat +%I +[ +(0.0) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3686 +9078 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2442 3686 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 368.0968 ] concat +%I +[ +(0.2) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5069 +9078 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2442 5069 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 437.2168 ] concat +%I +[ +(0.4) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6451 +9078 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2442 6451 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 506.3368 ] concat +%I +[ +(0.6) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7834 +9078 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2442 7834 +2 MLine +End + +Begin %I Text +%I cfg Black +0 0 0 SetCFg +%I f -*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-* +/Helvetica 18.144000 SetF +%I t +[ 1 0 0 1 102.7958 575.4568 ] concat +%I +[ +(0.8) +] Text +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2995 +9161 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2995 +2359 2995 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3686 +9161 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2359 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4378 +9161 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4378 +2359 4378 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5069 +9161 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2359 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6451 +9161 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2359 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7142 +9161 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7142 +2359 7142 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7834 +9161 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2359 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8525 +9161 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8525 +2359 8525 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 34952 +1 0 0 [ 1.48 4.43 ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +9216 3686 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2239 4658 +2369 4788 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2369 4658 +2239 4788 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4543 8460 +4673 8590 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4673 8460 +4543 8590 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8460 2930 +8590 3060 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8590 2930 +8460 3060 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9151 4658 +9281 4788 +2 MLine +End + +Begin %I MLine +[0.324 0 0 0.324 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9281 4658 +9151 4788 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 101 +2304 4723 +2373 4920 +2442 5115 +2511 5308 +2580 5499 +2650 5687 +2719 5872 +2788 6054 +2857 6232 +2926 6406 +2995 6576 +3064 6741 +3133 6901 +3203 7056 +3272 7205 +3341 7348 +3410 7485 +3479 7616 +3548 7739 +3617 7855 +3686 7964 +3756 8065 +3825 8157 +3894 8241 +3963 8316 +4032 8381 +4101 8437 +4170 8484 +4239 8519 +4308 8545 +4378 8559 +4447 8563 +4516 8554 +4585 8534 +4654 8502 +4723 8458 +4792 8402 +4861 8335 +4931 8258 +5000 8171 +5069 8075 +5138 7970 +5207 7857 +5276 7736 +5345 7608 +5414 7473 +5484 7332 +5553 7185 +5622 7033 +5691 6876 +5760 6716 +5829 6552 +5898 6385 +5967 6215 +6036 6043 +6106 5870 +6175 5696 +6244 5522 +6313 5348 +6382 5174 +6451 5002 +6520 4831 +6589 4663 +6659 4497 +6728 4335 +6797 4177 +6866 4022 +6935 3873 +7004 3729 +7073 3591 +7142 3460 +7212 3335 +7281 3218 +7350 3109 +7419 3009 +7488 2918 +7557 2836 +7626 2764 +7695 2703 +7764 2654 +7834 2615 +7903 2590 +7972 2577 +8041 2577 +8110 2591 +8179 2619 +8248 2663 +8317 2721 +8387 2796 +8456 2887 +8525 2995 +8594 3120 +8663 3261 +8732 3416 +8801 3582 +8870 3758 +8940 3943 +9009 4133 +9078 4328 +9147 4525 +9216 4723 +101 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/intro.texi b/software/gsl-1.15/doc/intro.texi new file mode 100644 index 000000000..3b34ddf96 --- /dev/null +++ b/software/gsl-1.15/doc/intro.texi @@ -0,0 +1,246 @@ +@cindex license of GSL +@cindex GNU General Public License +The GNU Scientific Library (GSL) is a collection of routines for +numerical computing. The routines have been written from scratch in C, +and present a modern Applications Programming Interface +(API) for C programmers, allowing wrappers to be written for very +high level languages. The source code is distributed under the GNU +General Public License. + + +@menu +* Routines available in GSL:: +* GSL is Free Software:: +* Obtaining GSL:: +* No Warranty:: +* Reporting Bugs:: +* Further Information:: +* Conventions used in this manual:: +@end menu + +@node Routines available in GSL +@section Routines available in GSL + +The library covers a wide range of topics in numerical computing. +Routines are available for the following areas, + +@iftex +@sp 1 +@end iftex +@multitable @columnfractions 0.05 0.45 0.45 0.05 +@item @tab Complex Numbers @tab Roots of Polynomials +@item @tab Special Functions @tab Vectors and Matrices +@item @tab Permutations @tab Combinations +@item @tab Sorting @tab BLAS Support +@item @tab Linear Algebra @tab CBLAS Library +@item @tab Fast Fourier Transforms @tab Eigensystems +@item @tab Random Numbers @tab Quadrature +@item @tab Random Distributions @tab Quasi-Random Sequences +@item @tab Histograms @tab Statistics +@item @tab Monte Carlo Integration @tab N-Tuples +@item @tab Differential Equations @tab Simulated Annealing +@item @tab Numerical Differentiation @tab Interpolation +@item @tab Series Acceleration @tab Chebyshev Approximations +@item @tab Root-Finding @tab Discrete Hankel Transforms +@item @tab Least-Squares Fitting @tab Minimization +@item @tab IEEE Floating-Point @tab Physical Constants +@item @tab Basis Splines @tab Wavelets +@end multitable +@iftex +@sp 1 +@end iftex + +@noindent +The use of these routines is described in this manual. Each chapter +provides detailed definitions of the functions, followed by example +programs and references to the articles on which the algorithms are +based. + +Where possible the routines have been based on reliable public-domain +packages such as FFTPACK and QUADPACK, which the developers of GSL +have reimplemented in C with modern coding conventions. + +@node GSL is Free Software +@section GSL is Free Software +@cindex free software, explanation of +The subroutines in the GNU Scientific Library are ``free software''; +this means that everyone is free to use them, and to redistribute them +in other free programs. The library is not in the public domain; it is +copyrighted and there are conditions on its distribution. These +conditions are designed to permit everything that a good cooperating +citizen would want to do. What is not allowed is to try to prevent +others from further sharing any version of the software that they might +get from you. + +Specifically, we want to make sure that you have the right to share +copies of programs that you are given which use the GNU Scientific +Library, that you receive their source code or else can get it if you +want it, that you can change these programs or use pieces of them in new +free programs, and that you know you can do these things. + +To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of any code which uses the GNU Scientific Library, you must give +the recipients all the rights that you have received. You must make +sure that they, too, receive or can get the source code, both to the +library and the code which uses it. And you must tell them their +rights. This means that the library should not be redistributed in +proprietary programs. + +Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for the GNU Scientific Library. If these +programs are modified by someone else and passed on, we want their +recipients to know that what they have is not what we distributed, so +that any problems introduced by others will not reflect on our +reputation. + +The precise conditions for the distribution of software related to the +GNU Scientific Library are found in the GNU General Public License +(@pxref{GNU General Public License}). Further information about this +license is available from the GNU Project webpage @cite{Frequently Asked +Questions about the GNU GPL}, + +@itemize @w{} +@item +@uref{http://www.gnu.org/copyleft/gpl-faq.html} +@end itemize + +@noindent +The Free Software Foundation also operates a license consulting +service for commercial users (contact details available from +@uref{http://www.fsf.org/}). + +@node Obtaining GSL +@section Obtaining GSL +@cindex obtaining GSL +@cindex downloading GSL +@cindex mailing list for GSL announcements +@cindex info-gsl mailing list +The source code for the library can be obtained in different ways, by +copying it from a friend, purchasing it on @sc{cdrom} or downloading it +from the internet. A list of public ftp servers which carry the source +code can be found on the GNU website, + +@itemize @w{} +@item +@uref{http://www.gnu.org/software/gsl/} +@end itemize + +@noindent +The preferred platform for the library is a GNU system, which allows it +to take advantage of additional features in the GNU C compiler and GNU C +library. However, the library is fully portable and should compile on +most systems with a C compiler. + +Announcements of new releases, updates and other relevant events are +made on the @code{info-gsl@@gnu.org} mailing list. To subscribe to this +low-volume list, send an email of the following form: + +@example +To: info-gsl-request@@gnu.org +Subject: subscribe +@end example + +@noindent +You will receive a response asking you to reply in order to confirm +your subscription. + +@node No Warranty +@section No Warranty +@cindex warranty (none) +The software described in this manual has no warranty, it is provided +``as is''. It is your responsibility to validate the behavior of the +routines and their accuracy using the source code provided, or to +purchase support and warranties from commercial redistributors. Consult +the GNU General Public license for further details (@pxref{GNU General +Public License}). + +@node Reporting Bugs +@section Reporting Bugs +@cindex reporting bugs in GSL +@cindex bugs, how to report +@cindex bug-gsl mailing list +@cindex mailing list, bug-gsl +A list of known bugs can be found in the @file{BUGS} file included in +the GSL distribution or online in the GSL bug tracker.@footnote{@url{http://savannah.gnu.org/bugs/?group=gsl}} Details of compilation problems can be found in +the @file{INSTALL} file. + +If you find a bug which is not listed in these files, please report it to +@email{bug-gsl@@gnu.org}. + +All bug reports should include: + +@itemize @bullet +@item +The version number of GSL +@item +The hardware and operating system +@item +The compiler used, including version number and compilation options +@item +A description of the bug behavior +@item +A short program which exercises the bug +@end itemize + +@noindent +It is useful if you can check whether the same problem occurs when the +library is compiled without optimization. Thank you. + +Any errors or omissions in this manual can also be reported to the +same address. + +@node Further Information +@section Further Information +@cindex mailing list archives +@cindex website, developer information +@cindex contacting the GSL developers +Additional information, including online copies of this manual, links to +related projects, and mailing list archives are available from the +website mentioned above. + +Any questions about the use and installation of the library can be asked +on the mailing list @code{help-gsl@@gnu.org}. To subscribe to this +list, send an email of the following form: + +@example +To: help-gsl-request@@gnu.org +Subject: subscribe +@end example + +@noindent +This mailing list can be used to ask questions not covered by this +manual, and to contact the developers of the library. + +If you would like to refer to the GNU Scientific Library in a journal +article, the recommended way is to cite this reference manual, +e.g. @cite{M. Galassi et al, GNU Scientific Library Reference Manual (3rd +Ed.), ISBN 0954612078}. + +If you want to give a url, use ``@uref{http://www.gnu.org/software/gsl/}''. + +@node Conventions used in this manual +@section Conventions used in this manual +@cindex conventions, used in manual +@cindex examples, conventions used in +@cindex shell prompt +@cindex @code{$}, shell prompt +This manual contains many examples which can be typed at the keyboard. +A command entered at the terminal is shown like this, + +@example +$ @i{command} +@end example + +@noindent +@cindex dollar sign @code{$}, shell prompt +The first character on the line is the terminal prompt, and should not +be typed. The dollar sign @samp{$} is used as the standard prompt in +this manual, although some systems may use a different character. + +The examples assume the use of the GNU operating system. There may be +minor differences in the output on other systems. The commands for +setting environment variables use the Bourne shell syntax of the +standard GNU shell (@code{bash}). + + diff --git a/software/gsl-1.15/doc/landau.dat b/software/gsl-1.15/doc/landau.dat new file mode 100644 index 000000000..0c7d3375e --- /dev/null +++ b/software/gsl-1.15/doc/landau.dat @@ -0,0 +1,201 @@ +-5.0000000e+00 5.7299683e-24 +-4.9000000e+00 9.8386598e-22 +-4.8000000e+00 1.0303677e-19 +-4.7000000e+00 6.8985179e-18 +-4.6000000e+00 3.0811780e-16 +-4.5000000e+00 9.5412629e-15 +-4.4000000e+00 2.1211024e-13 +-4.3000000e+00 3.4936723e-12 +-4.2000000e+00 4.3869439e-11 +-4.1000000e+00 4.3093980e-10 +-4.0000000e+00 3.3899539e-09 +-3.9000000e+00 2.1811027e-08 +-3.8000000e+00 1.1699636e-07 +-3.7000000e+00 5.3235423e-07 +-3.6000000e+00 2.0872004e-06 +-3.5000000e+00 7.1518499e-06 +-3.4000000e+00 2.1693693e-05 +-3.3000000e+00 5.8931800e-05 +-3.2000000e+00 1.4488646e-04 +-3.1000000e+00 3.2545783e-04 +-3.0000000e+00 6.7372862e-04 +-2.9000000e+00 1.2953225e-03 +-2.8000000e+00 2.3293325e-03 +-2.7000000e+00 3.9428747e-03 +-2.6000000e+00 6.3186831e-03 +-2.5000000e+00 9.6369248e-03 +-2.4000000e+00 1.4053985e-02 +-2.3000000e+00 1.9681837e-02 +-2.2000000e+00 2.6571531e-02 +-2.1000000e+00 3.4703439e-02 +-2.0000000e+00 4.3985478e-02 +-1.9000000e+00 5.4259062e-02 +-1.8000000e+00 6.5311333e-02 +-1.7000000e+00 7.6891507e-02 +-1.6000000e+00 8.8728939e-02 +-1.5000000e+00 1.0055075e-01 +-1.4000000e+00 1.1209734e-01 +-1.3000000e+00 1.2313470e-01 +-1.2000000e+00 1.3346307e-01 +-1.1000000e+00 1.4292196e-01 +-1.0000000e+00 1.5139191e-01 +-9.0000000e-01 1.5879352e-01 +-8.0000000e-01 1.6508452e-01 +-7.0000000e-01 1.7025552e-01 +-6.0000000e-01 1.7432489e-01 +-5.0000000e-01 1.7733355e-01 +-4.0000000e-01 1.7933968e-01 +-3.0000000e-01 1.8041398e-01 +-2.0000000e-01 1.8063532e-01 +-1.0000000e-01 1.8008710e-01 +-1.0269563e-15 1.7885416e-01 +1.0000000e-01 1.7702044e-01 +2.0000000e-01 1.7466703e-01 +3.0000000e-01 1.7187090e-01 +4.0000000e-01 1.6870392e-01 +5.0000000e-01 1.6523228e-01 +6.0000000e-01 1.6151625e-01 +7.0000000e-01 1.5761010e-01 +8.0000000e-01 1.5356220e-01 +9.0000000e-01 1.4941526e-01 +1.0000000e-00 1.4520664e-01 +1.1000000e+00 1.4096874e-01 +1.2000000e+00 1.3672939e-01 +1.3000000e+00 1.3251227e-01 +1.4000000e+00 1.2833731e-01 +1.5000000e+00 1.2422109e-01 +1.6000000e+00 1.2017724e-01 +1.7000000e+00 1.1621676e-01 +1.8000000e+00 1.1234837e-01 +1.9000000e+00 1.0857877e-01 +2.0000000e+00 1.0491299e-01 +2.1000000e+00 1.0135454e-01 +2.2000000e+00 9.7905675e-02 +2.3000000e+00 9.4567597e-02 +2.4000000e+00 9.1340593e-02 +2.5000000e+00 8.8224201e-02 +2.6000000e+00 8.5217338e-02 +2.7000000e+00 8.2318412e-02 +2.8000000e+00 7.9525419e-02 +2.9000000e+00 7.6836028e-02 +3.0000000e+00 7.4247655e-02 +3.1000000e+00 7.1757520e-02 +3.2000000e+00 6.9362706e-02 +3.3000000e+00 6.7060199e-02 +3.4000000e+00 6.4846927e-02 +3.5000000e+00 6.2719789e-02 +3.6000000e+00 6.0675685e-02 +3.7000000e+00 5.8711536e-02 +3.8000000e+00 5.6824298e-02 +3.9000000e+00 5.5010981e-02 +4.0000000e+00 5.3268657e-02 +4.1000000e+00 5.1594472e-02 +4.2000000e+00 4.9985647e-02 +4.3000000e+00 4.8439490e-02 +4.4000000e+00 4.6953393e-02 +4.5000000e+00 4.5524840e-02 +4.6000000e+00 4.4151403e-02 +4.7000000e+00 4.2830744e-02 +4.8000000e+00 4.1560618e-02 +4.9000000e+00 4.0338866e-02 +5.0000000e+00 3.9163420e-02 +5.1000000e+00 3.8032293e-02 +5.2000000e+00 3.6943588e-02 +5.3000000e+00 3.5895483e-02 +5.4000000e+00 3.4886240e-02 +5.5000000e+00 3.3914195e-02 +5.6000000e+00 3.2977757e-02 +5.7000000e+00 3.2075409e-02 +5.8000000e+00 3.1205698e-02 +5.9000000e+00 3.0367240e-02 +6.0000000e+00 2.9558712e-02 +6.1000000e+00 2.8778853e-02 +6.2000000e+00 2.8026456e-02 +6.3000000e+00 2.7300373e-02 +6.4000000e+00 2.6599507e-02 +6.5000000e+00 2.5922811e-02 +6.6000000e+00 2.5269286e-02 +6.7000000e+00 2.4637980e-02 +6.8000000e+00 2.4027982e-02 +6.9000000e+00 2.3438424e-02 +7.0000000e+00 2.2868480e-02 +7.1000000e+00 2.2317357e-02 +7.2000000e+00 2.1784301e-02 +7.3000000e+00 2.1268592e-02 +7.4000000e+00 2.0769543e-02 +7.5000000e+00 2.0286495e-02 +7.6000000e+00 1.9818822e-02 +7.7000000e+00 1.9365924e-02 +7.8000000e+00 1.8927229e-02 +7.9000000e+00 1.8502190e-02 +8.0000000e+00 1.8090284e-02 +8.1000000e+00 1.7691010e-02 +8.2000000e+00 1.7303892e-02 +8.3000000e+00 1.6928471e-02 +8.4000000e+00 1.6564312e-02 +8.5000000e+00 1.6210995e-02 +8.6000000e+00 1.5868120e-02 +8.7000000e+00 1.5535304e-02 +8.8000000e+00 1.5212181e-02 +8.9000000e+00 1.4898400e-02 +9.0000000e+00 1.4593624e-02 +9.1000000e+00 1.4297531e-02 +9.2000000e+00 1.4009812e-02 +9.3000000e+00 1.3730172e-02 +9.4000000e+00 1.3458328e-02 +9.5000000e+00 1.3194007e-02 +9.6000000e+00 1.2936948e-02 +9.7000000e+00 1.2686902e-02 +9.8000000e+00 1.2443629e-02 +9.9000000e+00 1.2206897e-02 +1.0000000e+01 1.1976487e-02 +1.0100000e+01 1.1752186e-02 +1.0200000e+01 1.1533791e-02 +1.0300000e+01 1.1321105e-02 +1.0400000e+01 1.1113940e-02 +1.0500000e+01 1.0912115e-02 +1.0600000e+01 1.0715458e-02 +1.0700000e+01 1.0523801e-02 +1.0800000e+01 1.0336983e-02 +1.0900000e+01 1.0154849e-02 +1.1000000e+01 9.9772519e-03 +1.1100000e+01 9.8040478e-03 +1.1200000e+01 9.6350992e-03 +1.1300000e+01 9.4702736e-03 +1.1400000e+01 9.3094433e-03 +1.1500000e+01 9.1524856e-03 +1.1600000e+01 8.9992820e-03 +1.1700000e+01 8.8497185e-03 +1.1800000e+01 8.7036852e-03 +1.1900000e+01 8.5610761e-03 +1.2000000e+01 8.4217891e-03 +1.2100000e+01 8.2857256e-03 +1.2200000e+01 8.1527907e-03 +1.2300000e+01 8.0228928e-03 +1.2400000e+01 7.8959433e-03 +1.2500000e+01 7.7718570e-03 +1.2600000e+01 7.6505515e-03 +1.2700000e+01 7.5319472e-03 +1.2800000e+01 7.4159673e-03 +1.2900000e+01 7.3025377e-03 +1.3000000e+01 7.1915866e-03 +1.3100000e+01 7.0830449e-03 +1.3200000e+01 6.9768457e-03 +1.3300000e+01 6.8729241e-03 +1.3400000e+01 6.7712178e-03 +1.3500000e+01 6.6716662e-03 +1.3600000e+01 6.5742109e-03 +1.3700000e+01 6.4787954e-03 +1.3800000e+01 6.3853647e-03 +1.3900000e+01 6.2938662e-03 +1.4000000e+01 6.2042484e-03 +1.4100000e+01 6.1164618e-03 +1.4200000e+01 6.0304583e-03 +1.4300000e+01 5.9461914e-03 +1.4400000e+01 5.8636161e-03 +1.4500000e+01 5.7826888e-03 +1.4600000e+01 5.7033672e-03 +1.4700000e+01 5.6256103e-03 +1.4800000e+01 5.5493784e-03 +1.4900000e+01 5.4746330e-03 +1.5000000e+01 5.4013369e-03 diff --git a/software/gsl-1.15/doc/linalg.texi b/software/gsl-1.15/doc/linalg.texi new file mode 100644 index 000000000..c2982ba0f --- /dev/null +++ b/software/gsl-1.15/doc/linalg.texi @@ -0,0 +1,1203 @@ +@cindex linear algebra +@cindex solution of linear systems, Ax=b +@cindex matrix factorization +@cindex factorization of matrices + +This chapter describes functions for solving linear systems. The +library provides linear algebra operations which operate directly on +the @code{gsl_vector} and @code{gsl_matrix} objects. These routines +use the standard algorithms from Golub & Van Loan's @cite{Matrix +Computations} with Level-1 and Level-2 BLAS calls for efficiency. + +The functions described in this chapter are declared in the header file +@file{gsl_linalg.h}. + + +@menu +* LU Decomposition:: +* QR Decomposition:: +* QR Decomposition with Column Pivoting:: +* Singular Value Decomposition:: +* Cholesky Decomposition:: +* Tridiagonal Decomposition of Real Symmetric Matrices:: +* Tridiagonal Decomposition of Hermitian Matrices:: +* Hessenberg Decomposition of Real Matrices:: +* Hessenberg-Triangular Decomposition of Real Matrices:: +* Bidiagonalization:: +* Householder Transformations:: +* Householder solver for linear systems:: +* Tridiagonal Systems:: +* Balancing:: +* Linear Algebra Examples:: +* Linear Algebra References and Further Reading:: +@end menu + +@node LU Decomposition +@section LU Decomposition +@cindex LU decomposition + +A general square matrix @math{A} has an @math{LU} decomposition into +upper and lower triangular matrices, +@tex +\beforedisplay +$$ +P A = L U +$$ +\afterdisplay +@end tex +@ifinfo + +@example +P A = L U +@end example + +@end ifinfo +@noindent +where @math{P} is a permutation matrix, @math{L} is unit lower +triangular matrix and @math{U} is upper triangular matrix. For square +matrices this decomposition can be used to convert the linear system +@math{A x = b} into a pair of triangular systems (@math{L y = P b}, +@math{U x = y}), which can be solved by forward and back-substitution. +Note that the @math{LU} decomposition is valid for singular matrices. + +@deftypefun int gsl_linalg_LU_decomp (gsl_matrix * @var{A}, gsl_permutation * @var{p}, int * @var{signum}) +@deftypefunx int gsl_linalg_complex_LU_decomp (gsl_matrix_complex * @var{A}, gsl_permutation * @var{p}, int * @var{signum}) +These functions factorize the square matrix @var{A} into the @math{LU} +decomposition @math{PA = LU}. On output the diagonal and upper +triangular part of the input matrix @var{A} contain the matrix +@math{U}. The lower triangular part of the input matrix (excluding the +diagonal) contains @math{L}. The diagonal elements of @math{L} are +unity, and are not stored. + +The permutation matrix @math{P} is encoded in the permutation +@var{p}. The @math{j}-th column of the matrix @math{P} is given by the +@math{k}-th column of the identity matrix, where @math{k = p_j} the +@math{j}-th element of the permutation vector. The sign of the +permutation is given by @var{signum}. It has the value @math{(-1)^n}, +where @math{n} is the number of interchanges in the permutation. + +The algorithm used in the decomposition is Gaussian Elimination with +partial pivoting (Golub & Van Loan, @cite{Matrix Computations}, +Algorithm 3.4.1). +@end deftypefun + +@cindex linear systems, solution of +@deftypefun int gsl_linalg_LU_solve (const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +@deftypefunx int gsl_linalg_complex_LU_solve (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) +These functions solve the square system @math{A x = b} using the @math{LU} +decomposition of @math{A} into (@var{LU}, @var{p}) given by +@code{gsl_linalg_LU_decomp} or @code{gsl_linalg_complex_LU_decomp} as input. +@end deftypefun + +@deftypefun int gsl_linalg_LU_svx (const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) +@deftypefunx int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, gsl_vector_complex * @var{x}) +These functions solve the square system @math{A x = b} in-place using the +precomputed @math{LU} decomposition of @math{A} into (@var{LU},@var{p}). On input +@var{x} should contain the right-hand side @math{b}, which is replaced +by the solution on output. +@end deftypefun + +@cindex refinement of solutions in linear systems +@cindex iterative refinement of solutions in linear systems +@cindex linear systems, refinement of solutions +@deftypefun int gsl_linalg_LU_refine (const gsl_matrix * @var{A}, const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}, gsl_vector * @var{residual}) +@deftypefunx int gsl_linalg_complex_LU_refine (const gsl_matrix_complex * @var{A}, const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}, gsl_vector_complex * @var{residual}) +These functions apply an iterative improvement to @var{x}, the solution +of @math{A x = b}, from the precomputed @math{LU} decomposition of @math{A} into +(@var{LU},@var{p}). The initial residual @math{r = A x - b} is also +computed and stored in @var{residual}. +@end deftypefun + +@cindex inverse of a matrix, by LU decomposition +@cindex matrix inverse +@deftypefun int gsl_linalg_LU_invert (const gsl_matrix * @var{LU}, const gsl_permutation * @var{p}, gsl_matrix * @var{inverse}) +@deftypefunx int gsl_linalg_complex_LU_invert (const gsl_matrix_complex * @var{LU}, const gsl_permutation * @var{p}, gsl_matrix_complex * @var{inverse}) +These functions compute the inverse of a matrix @math{A} from its +@math{LU} decomposition (@var{LU},@var{p}), storing the result in the +matrix @var{inverse}. The inverse is computed by solving the system +@math{A x = b} for each column of the identity matrix. It is preferable +to avoid direct use of the inverse whenever possible, as the linear +solver functions can obtain the same result more efficiently and +reliably (consult any introductory textbook on numerical linear algebra +for details). +@end deftypefun + +@cindex determinant of a matrix, by LU decomposition +@cindex matrix determinant +@deftypefun double gsl_linalg_LU_det (gsl_matrix * @var{LU}, int @var{signum}) +@deftypefunx gsl_complex gsl_linalg_complex_LU_det (gsl_matrix_complex * @var{LU}, int @var{signum}) +These functions compute the determinant of a matrix @math{A} from its +@math{LU} decomposition, @var{LU}. The determinant is computed as the +product of the diagonal elements of @math{U} and the sign of the row +permutation @var{signum}. +@end deftypefun + +@cindex logarithm of the determinant of a matrix +@deftypefun double gsl_linalg_LU_lndet (gsl_matrix * @var{LU}) +@deftypefunx double gsl_linalg_complex_LU_lndet (gsl_matrix_complex * @var{LU}) +These functions compute the logarithm of the absolute value of the +determinant of a matrix @math{A}, @math{\ln|\det(A)|}, from its @math{LU} +decomposition, @var{LU}. This function may be useful if the direct +computation of the determinant would overflow or underflow. +@end deftypefun + +@cindex sign of the determinant of a matrix +@deftypefun int gsl_linalg_LU_sgndet (gsl_matrix * @var{LU}, int @var{signum}) +@deftypefunx gsl_complex gsl_linalg_complex_LU_sgndet (gsl_matrix_complex * @var{LU}, int @var{signum}) +These functions compute the sign or phase factor of the determinant of a +matrix @math{A}, @math{\det(A)/|\det(A)|}, from its @math{LU} decomposition, +@var{LU}. +@end deftypefun + +@node QR Decomposition +@section QR Decomposition +@cindex QR decomposition + +A general rectangular @math{M}-by-@math{N} matrix @math{A} has a +@math{QR} decomposition into the product of an orthogonal +@math{M}-by-@math{M} square matrix @math{Q} (where @math{Q^T Q = I}) and +an @math{M}-by-@math{N} right-triangular matrix @math{R}, +@tex +\beforedisplay +$$ +A = Q R +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = Q R +@end example + +@end ifinfo +@noindent +This decomposition can be used to convert the linear system @math{A x = +b} into the triangular system @math{R x = Q^T b}, which can be solved by +back-substitution. Another use of the @math{QR} decomposition is to +compute an orthonormal basis for a set of vectors. The first @math{N} +columns of @math{Q} form an orthonormal basis for the range of @math{A}, +@math{ran(A)}, when @math{A} has full column rank. + +@deftypefun int gsl_linalg_QR_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau}) +This function factorizes the @math{M}-by-@math{N} matrix @var{A} into +the @math{QR} decomposition @math{A = Q R}. On output the diagonal and +upper triangular part of the input matrix contain the matrix +@math{R}. The vector @var{tau} and the columns of the lower triangular +part of the matrix @var{A} contain the Householder coefficients and +Householder vectors which encode the orthogonal matrix @var{Q}. The +vector @var{tau} must be of length @math{k=\min(M,N)}. The matrix +@math{Q} is related to these components by, @math{Q = Q_k ... Q_2 Q_1} +where @math{Q_i = I - \tau_i v_i v_i^T} and @math{v_i} is the +Householder vector @math{v_i = +(0,...,1,A(i+1,i),A(i+2,i),...,A(m,i))}. This is the same storage scheme +as used by @sc{lapack}. + +The algorithm used to perform the decomposition is Householder QR (Golub +& Van Loan, @cite{Matrix Computations}, Algorithm 5.2.1). +@end deftypefun + +@deftypefun int gsl_linalg_QR_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the square system @math{A x = b} using the @math{QR} +decomposition of @math{A} held in (@var{QR}, @var{tau}) which must +have been computed previously with @code{gsl_linalg_QR_decomp}. +The least-squares solution for +rectangular systems can be found using @code{gsl_linalg_QR_lssolve}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_vector * @var{x}) +This function solves the square system @math{A x = b} in-place using +the @math{QR} decomposition of @math{A} held in (@var{QR},@var{tau}) +which must have been computed previously by +@code{gsl_linalg_QR_decomp}. On input @var{x} should contain the +right-hand side @math{b}, which is replaced by the solution on output. +@end deftypefun + +@deftypefun int gsl_linalg_QR_lssolve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_vector * @var{b}, gsl_vector * @var{x}, gsl_vector * @var{residual}) +This function finds the least squares solution to the overdetermined +system @math{A x = b} where the matrix @var{A} has more rows than +columns. The least squares solution minimizes the Euclidean norm of the +residual, @math{||Ax - b||}.The routine requires as input +the @math{QR} decomposition +of @math{A} into (@var{QR}, @var{tau}) given by +@code{gsl_linalg_QR_decomp}. The solution is returned in @var{x}. The +residual is computed as a by-product and stored in @var{residual}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_QTvec (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_vector * @var{v}) +This function applies the matrix @math{Q^T} encoded in the decomposition +(@var{QR},@var{tau}) to the vector @var{v}, storing the result @math{Q^T +v} in @var{v}. The matrix multiplication is carried out directly using +the encoding of the Householder vectors without needing to form the full +matrix @math{Q^T}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_Qvec (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_vector * @var{v}) +This function applies the matrix @math{Q} encoded in the decomposition +(@var{QR},@var{tau}) to the vector @var{v}, storing the result @math{Q +v} in @var{v}. The matrix multiplication is carried out directly using +the encoding of the Householder vectors without needing to form the full +matrix @math{Q}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_QTmat (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_matrix * @var{A}) +This function applies the matrix @math{Q^T} encoded in the decomposition +(@var{QR},@var{tau}) to the matrix @var{A}, storing the result @math{Q^T +A} in @var{A}. The matrix multiplication is carried out directly using +the encoding of the Householder vectors without needing to form the full +matrix @math{Q^T}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_Rsolve (const gsl_matrix * @var{QR}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the triangular system @math{R x = b} for +@var{x}. It may be useful if the product @math{b' = Q^T b} has already +been computed using @code{gsl_linalg_QR_QTvec}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_Rsvx (const gsl_matrix * @var{QR}, gsl_vector * @var{x}) +This function solves the triangular system @math{R x = b} for @var{x} +in-place. On input @var{x} should contain the right-hand side @math{b} +and is replaced by the solution on output. This function may be useful if +the product @math{b' = Q^T b} has already been computed using +@code{gsl_linalg_QR_QTvec}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_unpack (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, gsl_matrix * @var{Q}, gsl_matrix * @var{R}) +This function unpacks the encoded @math{QR} decomposition +(@var{QR},@var{tau}) into the matrices @var{Q} and @var{R}, where +@var{Q} is @math{M}-by-@math{M} and @var{R} is @math{M}-by-@math{N}. +@end deftypefun + +@deftypefun int gsl_linalg_QR_QRsolve (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the system @math{R x = Q^T b} for @var{x}. It can +be used when the @math{QR} decomposition of a matrix is available in +unpacked form as (@var{Q}, @var{R}). +@end deftypefun + +@deftypefun int gsl_linalg_QR_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, gsl_vector * @var{w}, const gsl_vector * @var{v}) +This function performs a rank-1 update @math{w v^T} of the @math{QR} +decomposition (@var{Q}, @var{R}). The update is given by @math{Q'R' = Q +(R + w v^T)} where the output matrices @math{Q'} and @math{R'} are also +orthogonal and right triangular. Note that @var{w} is destroyed by the +update. +@end deftypefun + +@deftypefun int gsl_linalg_R_solve (const gsl_matrix * @var{R}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the triangular system @math{R x = b} for the +@math{N}-by-@math{N} matrix @var{R}. +@end deftypefun + +@deftypefun int gsl_linalg_R_svx (const gsl_matrix * @var{R}, gsl_vector * @var{x}) +This function solves the triangular system @math{R x = b} in-place. On +input @var{x} should contain the right-hand side @math{b}, which is +replaced by the solution on output. +@end deftypefun + +@node QR Decomposition with Column Pivoting +@section QR Decomposition with Column Pivoting +@cindex QR decomposition with column pivoting + +The @math{QR} decomposition can be extended to the rank deficient case +by introducing a column permutation @math{P}, +@tex +\beforedisplay +$$ +A P = Q R +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A P = Q R +@end example + +@end ifinfo +@noindent +The first @math{r} columns of @math{Q} form an orthonormal basis +for the range of @math{A} for a matrix with column rank @math{r}. This +decomposition can also be used to convert the linear system @math{A x = +b} into the triangular system @math{R y = Q^T b, x = P y}, which can be +solved by back-substitution and permutation. We denote the @math{QR} +decomposition with column pivoting by @math{QRP^T} since @math{A = Q R +P^T}. + +@deftypefun int gsl_linalg_QRPT_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau}, gsl_permutation * @var{p}, int * @var{signum}, gsl_vector * @var{norm}) +This function factorizes the @math{M}-by-@math{N} matrix @var{A} into +the @math{QRP^T} decomposition @math{A = Q R P^T}. On output the +diagonal and upper triangular part of the input matrix contain the +matrix @math{R}. The permutation matrix @math{P} is stored in the +permutation @var{p}. The sign of the permutation is given by +@var{signum}. It has the value @math{(-1)^n}, where @math{n} is the +number of interchanges in the permutation. The vector @var{tau} and the +columns of the lower triangular part of the matrix @var{A} contain the +Householder coefficients and vectors which encode the orthogonal matrix +@var{Q}. The vector @var{tau} must be of length @math{k=\min(M,N)}. The +matrix @math{Q} is related to these components by, @math{Q = Q_k ... Q_2 +Q_1} where @math{Q_i = I - \tau_i v_i v_i^T} and @math{v_i} is the +Householder vector @math{v_i = +(0,...,1,A(i+1,i),A(i+2,i),...,A(m,i))}. This is the same storage scheme +as used by @sc{lapack}. The vector @var{norm} is a workspace of length +@var{N} used for column pivoting. + +The algorithm used to perform the decomposition is Householder QR with +column pivoting (Golub & Van Loan, @cite{Matrix Computations}, Algorithm +5.4.1). +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_decomp2 (const gsl_matrix * @var{A}, gsl_matrix * @var{q}, gsl_matrix * @var{r}, gsl_vector * @var{tau}, gsl_permutation * @var{p}, int * @var{signum}, gsl_vector * @var{norm}) +This function factorizes the matrix @var{A} into the decomposition +@math{A = Q R P^T} without modifying @var{A} itself and storing the +output in the separate matrices @var{q} and @var{r}. +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the square system @math{A x = b} using the @math{QRP^T} +decomposition of @math{A} held in (@var{QR}, @var{tau}, @var{p}) which must +have been computed previously by @code{gsl_linalg_QRPT_decomp}. +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) +This function solves the square system @math{A x = b} in-place using the +@math{QRP^T} decomposition of @math{A} held in +(@var{QR},@var{tau},@var{p}). On input @var{x} should contain the +right-hand side @math{b}, which is replaced by the solution on output. +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_QRsolve (const gsl_matrix * @var{Q}, const gsl_matrix * @var{R}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the square system @math{R P^T x = Q^T b} for +@var{x}. It can be used when the @math{QR} decomposition of a matrix is +available in unpacked form as (@var{Q}, @var{R}). +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, const gsl_permutation * @var{p}, gsl_vector * @var{w}, const gsl_vector * @var{v}) +This function performs a rank-1 update @math{w v^T} of the @math{QRP^T} +decomposition (@var{Q}, @var{R}, @var{p}). The update is given by +@math{Q'R' = Q (R + w v^T P)} where the output matrices @math{Q'} and +@math{R'} are also orthogonal and right triangular. Note that @var{w} is +destroyed by the update. The permutation @var{p} is not changed. +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_Rsolve (const gsl_matrix * @var{QR}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the triangular system @math{R P^T x = b} for the +@math{N}-by-@math{N} matrix @math{R} contained in @var{QR}. +@end deftypefun + +@deftypefun int gsl_linalg_QRPT_Rsvx (const gsl_matrix * @var{QR}, const gsl_permutation * @var{p}, gsl_vector * @var{x}) +This function solves the triangular system @math{R P^T x = b} in-place +for the @math{N}-by-@math{N} matrix @math{R} contained in @var{QR}. On +input @var{x} should contain the right-hand side @math{b}, which is +replaced by the solution on output. +@end deftypefun + +@node Singular Value Decomposition +@section Singular Value Decomposition +@cindex SVD +@cindex singular value decomposition + +A general rectangular @math{M}-by-@math{N} matrix @math{A} has a +singular value decomposition (@sc{svd}) into the product of an +@math{M}-by-@math{N} orthogonal matrix @math{U}, an @math{N}-by-@math{N} +diagonal matrix of singular values @math{S} and the transpose of an +@math{N}-by-@math{N} orthogonal square matrix @math{V}, +@tex +\beforedisplay +$$ +A = U S V^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = U S V^T +@end example + +@end ifinfo +@noindent +The singular values +@c{$\sigma_i = S_{ii}$} +@math{\sigma_i = S_@{ii@}} are all non-negative and are +generally chosen to form a non-increasing sequence +@c{$\sigma_1 \ge \sigma_2 \ge ... \ge \sigma_N \ge 0$} +@math{\sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0}. + +The singular value decomposition of a matrix has many practical uses. +The condition number of the matrix is given by the ratio of the largest +singular value to the smallest singular value. The presence of a zero +singular value indicates that the matrix is singular. The number of +non-zero singular values indicates the rank of the matrix. In practice +singular value decomposition of a rank-deficient matrix will not produce +exact zeroes for singular values, due to finite numerical +precision. Small singular values should be edited by choosing a suitable +tolerance. + +For a rank-deficient matrix, the null space of @math{A} is given by +the columns of @math{V} corresponding to the zero singular values. +Similarly, the range of @math{A} is given by columns of @math{U} +corresponding to the non-zero singular values. + +Note that the routines here compute the ``thin'' version of the SVD +with @math{U} as @math{M}-by-@math{N} orthogonal matrix. This allows +in-place computation and is the most commonly-used form in practice. +Mathematically, the ``full'' SVD is defined with @math{U} as an +@math{M}-by-@math{M} orthogonal matrix and @math{S} as an +@math{M}-by-@math{N} diagonal matrix (with additional rows of zeros). + +@deftypefun int gsl_linalg_SV_decomp (gsl_matrix * @var{A}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work}) +This function factorizes the @math{M}-by-@math{N} matrix @var{A} into +the singular value decomposition @math{A = U S V^T} for @c{$M \ge N$} +@math{M >= N}. On output the matrix @var{A} is replaced by +@math{U}. The diagonal elements of the singular value matrix @math{S} +are stored in the vector @var{S}. The singular values are non-negative +and form a non-increasing sequence from @math{S_1} to @math{S_N}. The +matrix @var{V} contains the elements of @math{V} in untransposed +form. To form the product @math{U S V^T} it is necessary to take the +transpose of @var{V}. A workspace of length @var{N} is required in +@var{work}. + +This routine uses the Golub-Reinsch SVD algorithm. +@end deftypefun + +@deftypefun int gsl_linalg_SV_decomp_mod (gsl_matrix * @var{A}, gsl_matrix * @var{X}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work}) +This function computes the SVD using the modified Golub-Reinsch +algorithm, which is faster for @c{$M \gg N$} +@math{M>>N}. It requires the vector @var{work} of length @var{N} and the +@math{N}-by-@math{N} matrix @var{X} as additional working space. +@end deftypefun + +@deftypefun int gsl_linalg_SV_decomp_jacobi (gsl_matrix * @var{A}, gsl_matrix * @var{V}, gsl_vector * @var{S}) +@cindex Jacobi orthogonalization +This function computes the SVD of the @math{M}-by-@math{N} matrix @var{A} +using one-sided Jacobi orthogonalization for @c{$M \ge N$} +@math{M >= N}. The Jacobi method can compute singular values to higher +relative accuracy than Golub-Reinsch algorithms (see references for +details). +@end deftypefun + +@deftypefun int gsl_linalg_SV_solve (const gsl_matrix * @var{U}, const gsl_matrix * @var{V}, const gsl_vector * @var{S}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the system @math{A x = b} using the singular value +decomposition (@var{U}, @var{S}, @var{V}) of @math{A} which must +have been computed previously with @code{gsl_linalg_SV_decomp}. + +Only non-zero singular values are used in computing the solution. The +parts of the solution corresponding to singular values of zero are +ignored. Other singular values can be edited out by setting them to +zero before calling this function. + +In the over-determined case where @var{A} has more rows than columns the +system is solved in the least squares sense, returning the solution +@var{x} which minimizes @math{||A x - b||_2}. +@end deftypefun + +@node Cholesky Decomposition +@section Cholesky Decomposition +@cindex Cholesky decomposition +@cindex square root of a matrix, Cholesky decomposition +@cindex matrix square root, Cholesky decomposition + +A symmetric, positive definite square matrix @math{A} has a Cholesky +decomposition into a product of a lower triangular matrix @math{L} and +its transpose @math{L^T}, +@tex +\beforedisplay +$$ +A = L L^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = L L^T +@end example + +@end ifinfo +@noindent +This is sometimes referred to as taking the square-root of a matrix. The +Cholesky decomposition can only be carried out when all the eigenvalues +of the matrix are positive. This decomposition can be used to convert +the linear system @math{A x = b} into a pair of triangular systems +(@math{L y = b}, @math{L^T x = y}), which can be solved by forward and +back-substitution. + +@deftypefun int gsl_linalg_cholesky_decomp (gsl_matrix * @var{A}) +@deftypefunx int gsl_linalg_complex_cholesky_decomp (gsl_matrix_complex * @var{A}) +These functions factorize the symmetric, positive-definite square matrix +@var{A} into the Cholesky decomposition @math{A = L L^T} (or +@c{$A = L L^{\dagger}$} +@math{A = L L^H} +for the complex case). On input, the values from the diagonal and lower-triangular part of the matrix @var{A} are used (the upper triangular part is ignored). On output the diagonal and lower triangular part of the input +matrix @var{A} contain the matrix @math{L}, while the upper triangular part +of the input matrix is overwritten with @math{L^T} (the diagonal terms being +identical for both @math{L} and @math{L^T}). If the matrix is not +positive-definite then the decomposition will fail, returning the +error code @code{GSL_EDOM}. + +When testing whether a matrix is positive-definite, disable the error +handler first to avoid triggering an error. +@end deftypefun + +@deftypefun int gsl_linalg_cholesky_solve (const gsl_matrix * @var{cholesky}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +@deftypefunx int gsl_linalg_complex_cholesky_solve (const gsl_matrix_complex * @var{cholesky}, const gsl_vector_complex * @var{b}, gsl_vector_complex * @var{x}) +These functions solve the system @math{A x = b} using the Cholesky +decomposition of @math{A} held in the matrix @var{cholesky} which must +have been previously computed by @code{gsl_linalg_cholesky_decomp} or +@code{gsl_linalg_complex_cholesky_decomp}. +@end deftypefun + +@deftypefun int gsl_linalg_cholesky_svx (const gsl_matrix * @var{cholesky}, gsl_vector * @var{x}) +@deftypefunx int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * @var{cholesky}, gsl_vector_complex * @var{x}) +These functions solve the system @math{A x = b} in-place using the +Cholesky decomposition of @math{A} held in the matrix @var{cholesky} +which must have been previously computed by +@code{gsl_linalg_cholesky_decomp} or +@code{gsl_linalg_complex_cholesky_decomp}. On input @var{x} should +contain the right-hand side @math{b}, which is replaced by the +solution on output. +@end deftypefun + +@deftypefun int gsl_linalg_cholesky_invert (gsl_matrix * @var{cholesky}) +@deftypefunx int gsl_linalg_complex_cholesky_invert (gsl_matrix_complex * @var{cholesky}) +These functions compute the inverse of a matrix from its Cholesky +decomposition @var{cholesky}, which must have been previously computed +by @code{gsl_linalg_cholesky_decomp} or +@code{gsl_linalg_complex_cholesky_decomp}. On output, the inverse is +stored in-place in @var{cholesky}. +@end deftypefun + +@node Tridiagonal Decomposition of Real Symmetric Matrices +@section Tridiagonal Decomposition of Real Symmetric Matrices +@cindex tridiagonal decomposition + +A symmetric matrix @math{A} can be factorized by similarity +transformations into the form, +@tex +\beforedisplay +$$ +A = Q T Q^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = Q T Q^T +@end example + +@end ifinfo +@noindent +where @math{Q} is an orthogonal matrix and @math{T} is a symmetric +tridiagonal matrix. + +@deftypefun int gsl_linalg_symmtd_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau}) +This function factorizes the symmetric square matrix @var{A} into the +symmetric tridiagonal decomposition @math{Q T Q^T}. On output the +diagonal and subdiagonal part of the input matrix @var{A} contain the +tridiagonal matrix @math{T}. The remaining lower triangular part of the +input matrix contains the Householder vectors which, together with the +Householder coefficients @var{tau}, encode the orthogonal matrix +@math{Q}. This storage scheme is the same as used by @sc{lapack}. The +upper triangular part of @var{A} is not referenced. +@end deftypefun + +@deftypefun int gsl_linalg_symmtd_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau}, gsl_matrix * @var{Q}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag}) +This function unpacks the encoded symmetric tridiagonal decomposition +(@var{A}, @var{tau}) obtained from @code{gsl_linalg_symmtd_decomp} into +the orthogonal matrix @var{Q}, the vector of diagonal elements @var{diag} +and the vector of subdiagonal elements @var{subdiag}. +@end deftypefun + +@deftypefun int gsl_linalg_symmtd_unpack_T (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag}) +This function unpacks the diagonal and subdiagonal of the encoded +symmetric tridiagonal decomposition (@var{A}, @var{tau}) obtained from +@code{gsl_linalg_symmtd_decomp} into the vectors @var{diag} and @var{subdiag}. +@end deftypefun + +@node Tridiagonal Decomposition of Hermitian Matrices +@section Tridiagonal Decomposition of Hermitian Matrices +@cindex tridiagonal decomposition + +A hermitian matrix @math{A} can be factorized by similarity +transformations into the form, +@tex +\beforedisplay +$$ +A = U T U^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = U T U^T +@end example + +@end ifinfo +@noindent +where @math{U} is a unitary matrix and @math{T} is a real symmetric +tridiagonal matrix. + + +@deftypefun int gsl_linalg_hermtd_decomp (gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{tau}) +This function factorizes the hermitian matrix @var{A} into the symmetric +tridiagonal decomposition @math{U T U^T}. On output the real parts of +the diagonal and subdiagonal part of the input matrix @var{A} contain +the tridiagonal matrix @math{T}. The remaining lower triangular part of +the input matrix contains the Householder vectors which, together with +the Householder coefficients @var{tau}, encode the unitary matrix +@math{U}. This storage scheme is the same as used by @sc{lapack}. The +upper triangular part of @var{A} and imaginary parts of the diagonal are +not referenced. +@end deftypefun + +@deftypefun int gsl_linalg_hermtd_unpack (const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{tau}, gsl_matrix_complex * @var{U}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag}) +This function unpacks the encoded tridiagonal decomposition (@var{A}, +@var{tau}) obtained from @code{gsl_linalg_hermtd_decomp} into the +unitary matrix @var{U}, the real vector of diagonal elements @var{diag} and +the real vector of subdiagonal elements @var{subdiag}. +@end deftypefun + +@deftypefun int gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag}) +This function unpacks the diagonal and subdiagonal of the encoded +tridiagonal decomposition (@var{A}, @var{tau}) obtained from the +@code{gsl_linalg_hermtd_decomp} into the real vectors +@var{diag} and @var{subdiag}. +@end deftypefun + +@node Hessenberg Decomposition of Real Matrices +@section Hessenberg Decomposition of Real Matrices +@cindex Hessenberg decomposition + +A general real matrix @math{A} can be decomposed by orthogonal +similarity transformations into the form +@tex +\beforedisplay +$$ +A = U H U^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = U H U^T +@end example + +@end ifinfo +where @math{U} is orthogonal and @math{H} is an upper Hessenberg matrix, +meaning that it has zeros below the first subdiagonal. The +Hessenberg reduction is the first step in the Schur decomposition +for the nonsymmetric eigenvalue problem, but has applications in +other areas as well. + +@deftypefun int gsl_linalg_hessenberg_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau}) +This function computes the Hessenberg decomposition of the matrix +@var{A} by applying the similarity transformation @math{H = U^T A U}. +On output, @math{H} is stored in the upper portion of @var{A}. The +information required to construct the matrix @math{U} is stored in +the lower triangular portion of @var{A}. @math{U} is a product +of @math{N - 2} Householder matrices. The Householder vectors +are stored in the lower portion of @var{A} (below the subdiagonal) +and the Householder coefficients are stored in the vector @var{tau}. +@var{tau} must be of length @var{N}. +@end deftypefun + +@deftypefun int gsl_linalg_hessenberg_unpack (gsl_matrix * @var{H}, gsl_vector * @var{tau}, gsl_matrix * @var{U}) +This function constructs the orthogonal matrix @math{U} from the +information stored in the Hessenberg matrix @var{H} along with the +vector @var{tau}. @var{H} and @var{tau} are outputs from +@code{gsl_linalg_hessenberg_decomp}. +@end deftypefun + +@deftypefun int gsl_linalg_hessenberg_unpack_accum (gsl_matrix * @var{H}, gsl_vector * @var{tau}, gsl_matrix * @var{V}) +This function is similar to @code{gsl_linalg_hessenberg_unpack}, except +it accumulates the matrix @var{U} into @var{V}, so that @math{V' = VU}. +The matrix @var{V} must be initialized prior to calling this function. +Setting @var{V} to the identity matrix provides the same result as +@code{gsl_linalg_hessenberg_unpack}. If @var{H} is order @var{N}, then +@var{V} must have @var{N} columns but may have any number of rows. +@end deftypefun + +@deftypefun int gsl_linalg_hessenberg_set_zero (gsl_matrix * @var{H}) +This function sets the lower triangular portion of @var{H}, below +the subdiagonal, to zero. It is useful for clearing out the +Householder vectors after calling @code{gsl_linalg_hessenberg_decomp}. +@end deftypefun + +@node Hessenberg-Triangular Decomposition of Real Matrices +@section Hessenberg-Triangular Decomposition of Real Matrices +@cindex Hessenberg triangular decomposition + +A general real matrix pair (@math{A}, @math{B}) can be decomposed by +orthogonal similarity transformations into the form +@tex +\beforedisplay +$$ +A = U H V^T +$$ +$$ +B = U R V^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = U H V^T +B = U R V^T +@end example + +@end ifinfo +where @math{U} and @math{V} are orthogonal, @math{H} is an upper +Hessenberg matrix, and @math{R} is upper triangular. The +Hessenberg-Triangular reduction is the first step in the generalized +Schur decomposition for the generalized eigenvalue problem. + +@deftypefun int gsl_linalg_hesstri_decomp (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_matrix * @var{U}, gsl_matrix * @var{V}, gsl_vector * @var{work}) +This function computes the Hessenberg-Triangular decomposition of the +matrix pair (@var{A}, @var{B}). On output, @math{H} is stored in @var{A}, +and @math{R} is stored in @var{B}. If @var{U} and @var{V} are provided +(they may be null), the similarity transformations are stored in them. +Additional workspace of length @math{N} is needed in @var{work}. +@end deftypefun + +@node Bidiagonalization +@section Bidiagonalization +@cindex bidiagonalization of real matrices + +A general matrix @math{A} can be factorized by similarity +transformations into the form, +@tex +\beforedisplay +$$ +A = U B V^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = U B V^T +@end example + +@end ifinfo +@noindent +where @math{U} and @math{V} are orthogonal matrices and @math{B} is a +@math{N}-by-@math{N} bidiagonal matrix with non-zero entries only on the +diagonal and superdiagonal. The size of @var{U} is @math{M}-by-@math{N} +and the size of @var{V} is @math{N}-by-@math{N}. + +@deftypefun int gsl_linalg_bidiag_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V}) +This function factorizes the @math{M}-by-@math{N} matrix @var{A} into +bidiagonal form @math{U B V^T}. The diagonal and superdiagonal of the +matrix @math{B} are stored in the diagonal and superdiagonal of @var{A}. +The orthogonal matrices @math{U} and @var{V} are stored as compressed +Householder vectors in the remaining elements of @var{A}. The +Householder coefficients are stored in the vectors @var{tau_U} and +@var{tau_V}. The length of @var{tau_U} must equal the number of +elements in the diagonal of @var{A} and the length of @var{tau_V} should +be one element shorter. +@end deftypefun + +@deftypefun int gsl_linalg_bidiag_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau_U}, gsl_matrix * @var{U}, const gsl_vector * @var{tau_V}, gsl_matrix * @var{V}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) +This function unpacks the bidiagonal decomposition of @var{A} produced by +@code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) +into the separate orthogonal matrices @var{U}, @var{V} and the diagonal +vector @var{diag} and superdiagonal @var{superdiag}. Note that @var{U} +is stored as a compact @math{M}-by-@math{N} orthogonal matrix satisfying +@math{U^T U = I} for efficiency. +@end deftypefun + +@deftypefun int gsl_linalg_bidiag_unpack2 (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V}, gsl_matrix * @var{V}) +This function unpacks the bidiagonal decomposition of @var{A} produced by +@code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V}) +into the separate orthogonal matrices @var{U}, @var{V} and the diagonal +vector @var{diag} and superdiagonal @var{superdiag}. The matrix @var{U} +is stored in-place in @var{A}. +@end deftypefun + +@deftypefun int gsl_linalg_bidiag_unpack_B (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag}) +This function unpacks the diagonal and superdiagonal of the bidiagonal +decomposition of @var{A} from @code{gsl_linalg_bidiag_decomp}, into +the diagonal vector @var{diag} and superdiagonal vector @var{superdiag}. +@end deftypefun + +@node Householder Transformations +@section Householder Transformations +@cindex Householder matrix +@cindex Householder transformation +@cindex transformation, Householder + +A Householder transformation is a rank-1 modification of the identity +matrix which can be used to zero out selected elements of a vector. A +Householder matrix @math{P} takes the form, +@tex +\beforedisplay +$$ +P = I - \tau v v^T +$$ +\afterdisplay +@end tex +@ifinfo + +@example +P = I - \tau v v^T +@end example + +@end ifinfo +@noindent +where @math{v} is a vector (called the @dfn{Householder vector}) and +@math{\tau = 2/(v^T v)}. The functions described in this section use the +rank-1 structure of the Householder matrix to create and apply +Householder transformations efficiently. + +@deftypefun double gsl_linalg_householder_transform (gsl_vector * @var{v}) +@deftypefunx gsl_complex gsl_linalg_complex_householder_transform (gsl_vector_complex * @var{v}) +This function prepares a Householder transformation @math{P = I - \tau v +v^T} which can be used to zero all the elements of the input vector except +the first. On output the transformation is stored in the vector @var{v} +and the scalar @math{\tau} is returned. +@end deftypefun + +@deftypefun int gsl_linalg_householder_hm (double @var{tau}, const gsl_vector * @var{v}, gsl_matrix * @var{A}) +@deftypefunx int gsl_linalg_complex_householder_hm (gsl_complex @var{tau}, const gsl_vector_complex * @var{v}, gsl_matrix_complex * @var{A}) +This function applies the Householder matrix @math{P} defined by the +scalar @var{tau} and the vector @var{v} to the left-hand side of the +matrix @var{A}. On output the result @math{P A} is stored in @var{A}. +@end deftypefun + +@deftypefun int gsl_linalg_householder_mh (double @var{tau}, const gsl_vector * @var{v}, gsl_matrix * @var{A}) +@deftypefunx int gsl_linalg_complex_householder_mh (gsl_complex @var{tau}, const gsl_vector_complex * @var{v}, gsl_matrix_complex * @var{A}) +This function applies the Householder matrix @math{P} defined by the +scalar @var{tau} and the vector @var{v} to the right-hand side of the +matrix @var{A}. On output the result @math{A P} is stored in @var{A}. +@end deftypefun + +@deftypefun int gsl_linalg_householder_hv (double @var{tau}, const gsl_vector * @var{v}, gsl_vector * @var{w}) +@deftypefunx int gsl_linalg_complex_householder_hv (gsl_complex @var{tau}, const gsl_vector_complex * @var{v}, gsl_vector_complex * @var{w}) +This function applies the Householder transformation @math{P} defined by +the scalar @var{tau} and the vector @var{v} to the vector @var{w}. On +output the result @math{P w} is stored in @var{w}. +@end deftypefun + +@comment @deftypefun int gsl_linalg_householder_hm1 (double tau, gsl_matrix * A) +@comment This function applies the Householder transform, defined by the scalar +@comment @var{tau} and the vector @var{v}, to a matrix being build up from the +@comment identity matrix, using the first column of @var{A} as a householder vector. +@comment @end deftypefun + +@node Householder solver for linear systems +@section Householder solver for linear systems +@cindex solution of linear system by Householder transformations +@cindex Householder linear solver + +@deftypefun int gsl_linalg_HH_solve (gsl_matrix * @var{A}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the system @math{A x = b} directly using +Householder transformations. On output the solution is stored in @var{x} +and @var{b} is not modified. The matrix @var{A} is destroyed by the +Householder transformations. +@end deftypefun + +@deftypefun int gsl_linalg_HH_svx (gsl_matrix * @var{A}, gsl_vector * @var{x}) +This function solves the system @math{A x = b} in-place using +Householder transformations. On input @var{x} should contain the +right-hand side @math{b}, which is replaced by the solution on output. The +matrix @var{A} is destroyed by the Householder transformations. +@end deftypefun + +@node Tridiagonal Systems +@section Tridiagonal Systems +@cindex tridiagonal systems + +The functions described in this section efficiently solve symmetric, +non-symmetric and cyclic tridiagonal systems with minimal storage. +Note that the current implementations of these functions use a variant +of Cholesky decomposition, so the tridiagonal matrix must be positive +definite. For non-positive definite matrices, the functions return +the error code @code{GSL_ESING}. + +@deftypefun int gsl_linalg_solve_tridiag (const gsl_vector * @var{diag}, const gsl_vector * @var{e}, const gsl_vector * @var{f}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the general @math{N}-by-@math{N} system @math{A x = +b} where @var{A} is tridiagonal (@c{$N\geq 2$} +@math{N >= 2}). The super-diagonal and +sub-diagonal vectors @var{e} and @var{f} must be one element shorter +than the diagonal vector @var{diag}. The form of @var{A} for the 4-by-4 +case is shown below, +@tex +\beforedisplay +$$ +A = \pmatrix{d_0&e_0& 0& 0\cr + f_0&d_1&e_1& 0\cr + 0 &f_1&d_2&e_2\cr + 0 &0 &f_2&d_3\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = ( d_0 e_0 0 0 ) + ( f_0 d_1 e_1 0 ) + ( 0 f_1 d_2 e_2 ) + ( 0 0 f_2 d_3 ) +@end example +@end ifinfo +@noindent +@end deftypefun + +@deftypefun int gsl_linalg_solve_symm_tridiag (const gsl_vector * @var{diag}, const gsl_vector * @var{e}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the general @math{N}-by-@math{N} system @math{A x = +b} where @var{A} is symmetric tridiagonal (@c{$N\geq 2$} +@math{N >= 2}). The off-diagonal vector +@var{e} must be one element shorter than the diagonal vector @var{diag}. +The form of @var{A} for the 4-by-4 case is shown below, +@tex +\beforedisplay +$$ +A = \pmatrix{d_0&e_0& 0& 0\cr + e_0&d_1&e_1& 0\cr + 0 &e_1&d_2&e_2\cr + 0 &0 &e_2&d_3\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = ( d_0 e_0 0 0 ) + ( e_0 d_1 e_1 0 ) + ( 0 e_1 d_2 e_2 ) + ( 0 0 e_2 d_3 ) +@end example +@end ifinfo +@end deftypefun + +@deftypefun int gsl_linalg_solve_cyc_tridiag (const gsl_vector * @var{diag}, const gsl_vector * @var{e}, const gsl_vector * @var{f}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the general @math{N}-by-@math{N} system @math{A x = +b} where @var{A} is cyclic tridiagonal (@c{$N\geq 3$} +@math{N >= 3}). The cyclic super-diagonal and +sub-diagonal vectors @var{e} and @var{f} must have the same number of +elements as the diagonal vector @var{diag}. The form of @var{A} for the +4-by-4 case is shown below, +@tex +\beforedisplay +$$ +A = \pmatrix{d_0&e_0& 0 &f_3\cr + f_0&d_1&e_1& 0 \cr + 0 &f_1&d_2&e_2\cr + e_3& 0 &f_2&d_3\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = ( d_0 e_0 0 f_3 ) + ( f_0 d_1 e_1 0 ) + ( 0 f_1 d_2 e_2 ) + ( e_3 0 f_2 d_3 ) +@end example +@end ifinfo +@end deftypefun + + +@deftypefun int gsl_linalg_solve_symm_cyc_tridiag (const gsl_vector * @var{diag}, const gsl_vector * @var{e}, const gsl_vector * @var{b}, gsl_vector * @var{x}) +This function solves the general @math{N}-by-@math{N} system @math{A x = +b} where @var{A} is symmetric cyclic tridiagonal (@c{$N\geq 3$} +@math{N >= 3}). The cyclic +off-diagonal vector @var{e} must have the same number of elements as the +diagonal vector @var{diag}. The form of @var{A} for the 4-by-4 case is +shown below, +@tex +\beforedisplay +$$ +A = \pmatrix{d_0&e_0& 0 &e_3\cr + e_0&d_1&e_1& 0 \cr + 0 &e_1&d_2&e_2\cr + e_3& 0 &e_2&d_3\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A = ( d_0 e_0 0 e_3 ) + ( e_0 d_1 e_1 0 ) + ( 0 e_1 d_2 e_2 ) + ( e_3 0 e_2 d_3 ) +@end example +@end ifinfo +@end deftypefun + +@node Balancing +@section Balancing +@cindex balancing matrices + +The process of balancing a matrix applies similarity transformations +to make the rows and columns have comparable norms. This is +useful, for example, to reduce roundoff errors in the solution +of eigenvalue problems. Balancing a matrix @math{A} consists +of replacing @math{A} with a similar matrix +@tex +\beforedisplay +$$ +A' = D^{-1} A D +$$ +\afterdisplay +@end tex +@ifinfo + +@example +A' = D^(-1) A D +@end example + +@end ifinfo +where @math{D} is a diagonal matrix whose entries are powers +of the floating point radix. + +@deftypefun int gsl_linalg_balance_matrix (gsl_matrix * @var{A}, gsl_vector * @var{D}) +This function replaces the matrix @var{A} with its balanced counterpart +and stores the diagonal elements of the similarity transformation +into the vector @var{D}. +@end deftypefun + +@node Linear Algebra Examples +@section Examples + +The following program solves the linear system @math{A x = b}. The +system to be solved is, +@tex +\beforedisplay +$$ +\left( +\matrix{0.18& 0.60& 0.57& 0.96\cr +0.41& 0.24& 0.99& 0.58\cr +0.14& 0.30& 0.97& 0.66\cr +0.51& 0.13& 0.19& 0.85} +\right) +\left( +\matrix{x_0\cr +x_1\cr +x_2\cr +x_3} +\right) += +\left( +\matrix{1.0\cr +2.0\cr +3.0\cr +4.0} +\right) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +[ 0.18 0.60 0.57 0.96 ] [x0] [1.0] +[ 0.41 0.24 0.99 0.58 ] [x1] = [2.0] +[ 0.14 0.30 0.97 0.66 ] [x2] [3.0] +[ 0.51 0.13 0.19 0.85 ] [x3] [4.0] +@end example + +@end ifinfo +@noindent +and the solution is found using LU decomposition of the matrix @math{A}. + +@example +@verbatiminclude examples/linalglu.c +@end example + +@noindent +Here is the output from the program, + +@example +@verbatiminclude examples/linalglu.out +@end example + +@noindent +This can be verified by multiplying the solution @math{x} by the +original matrix @math{A} using @sc{gnu octave}, + +@example +octave> A = [ 0.18, 0.60, 0.57, 0.96; + 0.41, 0.24, 0.99, 0.58; + 0.14, 0.30, 0.97, 0.66; + 0.51, 0.13, 0.19, 0.85 ]; + +octave> x = [ -4.05205; -12.6056; 1.66091; 8.69377]; + +octave> A * x +ans = + 1.0000 + 2.0000 + 3.0000 + 4.0000 +@end example + +@noindent +This reproduces the original right-hand side vector, @math{b}, in +accordance with the equation @math{A x = b}. + +@node Linear Algebra References and Further Reading +@section References and Further Reading + +Further information on the algorithms described in this section can be +found in the following book, + +@itemize @w{} +@item +G. H. Golub, C. F. Van Loan, @cite{Matrix Computations} (3rd Ed, 1996), +Johns Hopkins University Press, ISBN 0-8018-5414-8. +@end itemize + +@noindent +The @sc{lapack} library is described in the following manual, + +@itemize @w{} +@item +@cite{LAPACK Users' Guide} (Third Edition, 1999), Published by SIAM, +ISBN 0-89871-447-8. + +@uref{http://www.netlib.org/lapack} +@end itemize + +@noindent +The @sc{lapack} source code can be found at the website above, along +with an online copy of the users guide. + +@noindent +The Modified Golub-Reinsch algorithm is described in the following paper, + +@itemize @w{} +@item +T.F. Chan, ``An Improved Algorithm for Computing the Singular Value +Decomposition'', @cite{ACM Transactions on Mathematical Software}, 8 +(1982), pp 72--83. +@end itemize + +@noindent +The Jacobi algorithm for singular value decomposition is described in +the following papers, + +@itemize @w{} +@item +J.C. Nash, ``A one-sided transformation method for the singular value +decomposition and algebraic eigenproblem'', @cite{Computer Journal}, +Volume 18, Number 1 (1975), p 74--76 + +@item +J.C. Nash and S. Shlien ``Simple algorithms for the partial singular +value decomposition'', @cite{Computer Journal}, Volume 30 (1987), p +268--275. + +@item +James Demmel, Kre@v{s}imir Veseli@'c, ``Jacobi's Method is more accurate than +QR'', @cite{Lapack Working Note 15} (LAWN-15), October 1989. Available +from netlib, @uref{http://www.netlib.org/lapack/} in the @code{lawns} or +@code{lawnspdf} directories. +@end itemize + + + diff --git a/software/gsl-1.15/doc/math.texi b/software/gsl-1.15/doc/math.texi new file mode 100644 index 000000000..dc5a02824 --- /dev/null +++ b/software/gsl-1.15/doc/math.texi @@ -0,0 +1,364 @@ +@cindex elementary functions +@cindex mathematical functions, elementary + +This chapter describes basic mathematical functions. Some of these +functions are present in system libraries, but the alternative versions +given here can be used as a substitute when the system functions are not +available. + +The functions and macros described in this chapter are defined in the +header file @file{gsl_math.h}. + +@menu +* Mathematical Constants:: +* Infinities and Not-a-number:: +* Elementary Functions:: +* Small integer powers:: +* Testing the Sign of Numbers:: +* Testing for Odd and Even Numbers:: +* Maximum and Minimum functions:: +* Approximate Comparison of Floating Point Numbers:: +@end menu + +@node Mathematical Constants +@section Mathematical Constants +@cindex mathematical constants, defined as macros +@cindex numerical constants, defined as macros +@cindex constants, mathematical---defined as macros +@cindex macros for mathematical constants +The library ensures that the standard @sc{bsd} mathematical constants +are defined. For reference, here is a list of the constants: + +@table @code +@item M_E +@cindex e, defined as a macro +The base of exponentials, @math{e} + +@item M_LOG2E +The base-2 logarithm of @math{e}, @math{\log_2 (e)} + +@item M_LOG10E +The base-10 logarithm of @math{e}, @c{$\log_{10}(e)$} +@math{\log_10 (e)} + +@item M_SQRT2 +The square root of two, @math{\sqrt 2} + +@item M_SQRT1_2 +The square root of one-half, @c{$\sqrt{1/2}$} +@math{\sqrt@{1/2@}} + +@item M_SQRT3 +The square root of three, @math{\sqrt 3} + +@item M_PI +@cindex pi, defined as a macro +The constant pi, @math{\pi} + +@item M_PI_2 +Pi divided by two, @math{\pi/2} + +@item M_PI_4 +Pi divided by four, @math{\pi/4} + +@item M_SQRTPI +The square root of pi, @math{\sqrt\pi} + +@item M_2_SQRTPI +Two divided by the square root of pi, @math{2/\sqrt\pi} + +@item M_1_PI +The reciprocal of pi, @math{1/\pi} + +@item M_2_PI +Twice the reciprocal of pi, @math{2/\pi} + +@item M_LN10 +The natural logarithm of ten, @math{\ln(10)} + +@item M_LN2 +The natural logarithm of two, @math{\ln(2)} + +@item M_LNPI +The natural logarithm of pi, @math{\ln(\pi)} + +@item M_EULER +@cindex Euler's constant, defined as a macro +Euler's constant, @math{\gamma} + +@end table + +@node Infinities and Not-a-number +@section Infinities and Not-a-number + +@cindex infinity, defined as a macro +@cindex IEEE infinity, defined as a macro +@cindex NaN, defined as a macro +@cindex Not-a-number, defined as a macro +@cindex IEEE NaN, defined as a macro + +@defvr {Macro} GSL_POSINF +This macro contains the IEEE representation of positive infinity, +@math{+\infty}. It is computed from the expression @code{+1.0/0.0}. +@end defvr + +@defvr {Macro} GSL_NEGINF +This macro contains the IEEE representation of negative infinity, +@math{-\infty}. It is computed from the expression @code{-1.0/0.0}. +@end defvr + +@defvr {Macro} GSL_NAN +This macro contains the IEEE representation of the Not-a-Number symbol, +@code{NaN}. It is computed from the ratio @code{0.0/0.0}. +@end defvr + +@deftypefun int gsl_isnan (const double @var{x}) +This function returns 1 if @var{x} is not-a-number. +@end deftypefun + +@deftypefun int gsl_isinf (const double @var{x}) +This function returns @math{+1} if @var{x} is positive infinity, +@math{-1} if @var{x} is negative infinity and 0 +otherwise.@footnote{Note that the C99 standard only requires the +system @code{isinf} function to return a non-zero value, without the +sign of the infinity. The implementation in some earlier versions of +GSL used the system @code{isinf} function and may have this behavior +on some platforms. Therefore, it is advisable to test the sign of +@var{x} separately, if needed, rather than relying the sign of the +return value from @code{gsl_isinf()}.} +@end deftypefun + +@deftypefun int gsl_finite (const double @var{x}) +This function returns 1 if @var{x} is a real number, and 0 if it is +infinite or not-a-number. +@end deftypefun + + +@node Elementary Functions +@section Elementary Functions + +The following routines provide portable implementations of functions +found in the BSD math library. When native versions are not available +the functions described here can be used instead. The substitution can +be made automatically if you use @code{autoconf} to compile your +application (@pxref{Portability functions}). + +@deftypefun double gsl_log1p (const double @var{x}) +@cindex log1p +@cindex logarithm, computed accurately near 1 +This function computes the value of @math{\log(1+x)} in a way that is +accurate for small @var{x}. It provides an alternative to the BSD math +function @code{log1p(x)}. +@end deftypefun + +@deftypefun double gsl_expm1 (const double @var{x}) +@cindex expm1 +@cindex exponential, difference from 1 computed accurately +This function computes the value of @math{\exp(x)-1} in a way that is +accurate for small @var{x}. It provides an alternative to the BSD math +function @code{expm1(x)}. +@end deftypefun + +@deftypefun double gsl_hypot (const double @var{x}, const double @var{y}) +@cindex hypot +@cindex euclidean distance function, hypot +@cindex length, computed accurately using hypot +This function computes the value of +@c{$\sqrt{x^2 + y^2}$} +@math{\sqrt@{x^2 + y^2@}} in a way that avoids overflow. It provides an +alternative to the BSD math function @code{hypot(x,y)}. +@end deftypefun + +@deftypefun double gsl_hypot3 (const double @var{x}, const double @var{y}, const double @var{z}) +@cindex euclidean distance function, hypot +@cindex length, computed accurately using hypot +This function computes the value of +@c{$\sqrt{x^2 + y^2 + z^2}$} +@math{\sqrt@{x^2 + y^2 + z^2@}} in a way that avoids overflow. +@end deftypefun + +@deftypefun double gsl_acosh (const double @var{x}) +@cindex acosh +@cindex hyperbolic cosine, inverse +@cindex inverse hyperbolic cosine +This function computes the value of @math{\arccosh(x)}. It provides an +alternative to the standard math function @code{acosh(x)}. +@end deftypefun + +@deftypefun double gsl_asinh (const double @var{x}) +@cindex asinh +@cindex hyperbolic sine, inverse +@cindex inverse hyperbolic sine +This function computes the value of @math{\arcsinh(x)}. It provides an +alternative to the standard math function @code{asinh(x)}. +@end deftypefun + +@deftypefun double gsl_atanh (const double @var{x}) +@cindex atanh +@cindex hyperbolic tangent, inverse +@cindex inverse hyperbolic tangent +This function computes the value of @math{\arctanh(x)}. It provides an +alternative to the standard math function @code{atanh(x)}. +@end deftypefun + + +@deftypefun double gsl_ldexp (double @var{x}, int @var{e}) +@cindex ldexp +This function computes the value of @math{x * 2^e}. It provides an +alternative to the standard math function @code{ldexp(x,e)}. +@end deftypefun + +@deftypefun double gsl_frexp (double @var{x}, int * @var{e}) +@cindex frexp +This function splits the number @math{x} into its normalized fraction +@math{f} and exponent @math{e}, such that @math{x = f * 2^e} and +@c{$0.5 \le f < 1$} +@math{0.5 <= f < 1}. The function returns @math{f} and stores the +exponent in @math{e}. If @math{x} is zero, both @math{f} and @math{e} +are set to zero. This function provides an alternative to the standard +math function @code{frexp(x, e)}. +@end deftypefun + +@node Small integer powers +@section Small integer powers + +A common complaint about the standard C library is its lack of a +function for calculating (small) integer powers. GSL provides some simple +functions to fill this gap. For reasons of efficiency, these functions +do not check for overflow or underflow conditions. + +@deftypefun double gsl_pow_int (double @var{x}, int @var{n}) +@deftypefunx double gsl_pow_uint (double @var{x}, unsigned int @var{n}) +These routines computes the power @math{x^n} for integer @var{n}. The +power is computed efficiently---for example, @math{x^8} is computed as +@math{((x^2)^2)^2}, requiring only 3 multiplications. A version of this +function which also computes the numerical error in the result is +available as @code{gsl_sf_pow_int_e}. +@end deftypefun + +@deftypefun double gsl_pow_2 (const double @var{x}) +@deftypefunx double gsl_pow_3 (const double @var{x}) +@deftypefunx double gsl_pow_4 (const double @var{x}) +@deftypefunx double gsl_pow_5 (const double @var{x}) +@deftypefunx double gsl_pow_6 (const double @var{x}) +@deftypefunx double gsl_pow_7 (const double @var{x}) +@deftypefunx double gsl_pow_8 (const double @var{x}) +@deftypefunx double gsl_pow_9 (const double @var{x}) +These functions can be used to compute small integer powers @math{x^2}, +@math{x^3}, etc. efficiently. The functions will be inlined when +@code{HAVE_INLINE} is defined, so that use of these functions +should be as efficient as explicitly writing the corresponding +product expression. +@end deftypefun + +@example +#include +double y = gsl_pow_4 (3.141) /* compute 3.141**4 */ +@end example + +@node Testing the Sign of Numbers +@section Testing the Sign of Numbers + +@defmac GSL_SIGN (x) +This macro returns the sign of @var{x}. It is defined as @code{((x) >= 0 +? 1 : -1)}. Note that with this definition the sign of zero is positive +(regardless of its @sc{ieee} sign bit). +@end defmac + +@node Testing for Odd and Even Numbers +@section Testing for Odd and Even Numbers + +@defmac GSL_IS_ODD (n) +This macro evaluates to 1 if @var{n} is odd and 0 if @var{n} is +even. The argument @var{n} must be of integer type. +@end defmac + +@defmac GSL_IS_EVEN (n) +This macro is the opposite of @code{GSL_IS_ODD(n)}. It evaluates to 1 if +@var{n} is even and 0 if @var{n} is odd. The argument @var{n} must be of +integer type. +@end defmac + +@node Maximum and Minimum functions +@section Maximum and Minimum functions + +Note that the following macros perform multiple evaluations of their +arguments, so they should not be used with arguments that have side +effects (such as a call to a random number generator). + +@defmac GSL_MAX (a, b) +@cindex maximum of two numbers +This macro returns the maximum of @var{a} and @var{b}. It is defined +as @code{((a) > (b) ? (a):(b))}. +@end defmac + +@defmac GSL_MIN (a, b) +@cindex minimum of two numbers +This macro returns the minimum of @var{a} and @var{b}. It is defined as +@code{((a) < (b) ? (a):(b))}. +@end defmac + +@deftypefun {extern inline double} GSL_MAX_DBL (double @var{a}, double @var{b}) +This function returns the maximum of the double precision numbers +@var{a} and @var{b} using an inline function. The use of a function +allows for type checking of the arguments as an extra safety feature. On +platforms where inline functions are not available the macro +@code{GSL_MAX} will be automatically substituted. +@end deftypefun + +@deftypefun {extern inline double} GSL_MIN_DBL (double @var{a}, double @var{b}) +This function returns the minimum of the double precision numbers +@var{a} and @var{b} using an inline function. The use of a function +allows for type checking of the arguments as an extra safety feature. On +platforms where inline functions are not available the macro +@code{GSL_MIN} will be automatically substituted. +@end deftypefun + +@deftypefun {extern inline int} GSL_MAX_INT (int @var{a}, int @var{b}) +@deftypefunx {extern inline int} GSL_MIN_INT (int @var{a}, int @var{b}) +These functions return the maximum or minimum of the integers @var{a} +and @var{b} using an inline function. On platforms where inline +functions are not available the macros @code{GSL_MAX} or @code{GSL_MIN} +will be automatically substituted. +@end deftypefun + +@deftypefun {extern inline long double} GSL_MAX_LDBL (long double @var{a}, long double @var{b}) +@deftypefunx {extern inline long double} GSL_MIN_LDBL (long double @var{a}, long double @var{b}) +These functions return the maximum or minimum of the long doubles @var{a} +and @var{b} using an inline function. On platforms where inline +functions are not available the macros @code{GSL_MAX} or @code{GSL_MIN} +will be automatically substituted. +@end deftypefun + +@node Approximate Comparison of Floating Point Numbers +@section Approximate Comparison of Floating Point Numbers + +It is sometimes useful to be able to compare two floating point numbers +approximately, to allow for rounding and truncation errors. The following +function implements the approximate floating-point comparison algorithm +proposed by D.E. Knuth in Section 4.2.2 of @cite{Seminumerical +Algorithms} (3rd edition). + +@deftypefun int gsl_fcmp (double @var{x}, double @var{y}, double @var{epsilon}) +@cindex approximate comparison of floating point numbers +@cindex safe comparison of floating point numbers +@cindex floating point numbers, approximate comparison +This function determines whether @math{x} and @math{y} are approximately +equal to a relative accuracy @var{epsilon}. + +The relative accuracy is measured using an interval of size @math{2 +\delta}, where @math{\delta = 2^k \epsilon} and @math{k} is the +maximum base-2 exponent of @math{x} and @math{y} as computed by the +function @code{frexp}. + +If @math{x} and @math{y} lie within this interval, they are considered +approximately equal and the function returns 0. Otherwise if @math{x < +y}, the function returns @math{-1}, or if @math{x > y}, the function returns +@math{+1}. + +Note that @math{x} and @math{y} are compared to relative accuracy, so +this function is not suitable for testing whether a value is +approximately zero. + +The implementation is based on the package @code{fcmp} by T.C. Belding. +@end deftypefun diff --git a/software/gsl-1.15/doc/mdate-sh b/software/gsl-1.15/doc/mdate-sh new file mode 100755 index 000000000..e631b2219 --- /dev/null +++ b/software/gsl-1.15/doc/mdate-sh @@ -0,0 +1,205 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 Free +# Software Foundation, Inc. +# written by Ulrich Drepper , June 1995 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No file. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification time of FILE. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume `unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +else + ls_command='ls -l -d' +fi +# Avoid user/group names that might have spaces, when possible. +if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" +fi + +# A `ls -l' line looks as follows on OS/2. +# drwxrwx--- 0 Aug 11 2001 foo +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# words should be skipped to get the date. + +# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. +set x`$ls_command /` + +# Find which argument is the month. +month= +command= +until test $month +do + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/software/gsl-1.15/doc/min-interval.eps b/software/gsl-1.15/doc/min-interval.eps new file mode 100644 index 000000000..96b7913cd --- /dev/null +++ b/software/gsl-1.15/doc/min-interval.eps @@ -0,0 +1,330 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tmp.xfig.eps +%%Creator: fig2dev Version 3.2 Patchlevel 1 +%%CreationDate: Mon Aug 16 15:21:28 1999 +%%For: bjg@netsci (Brian Gough,,,,) +%%Orientation: Portrait +%%BoundingBox: 0 0 346 205 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def +/col32 {0.557 0.557 0.557 srgb} bind def +/col33 {0.255 0.271 0.255 srgb} bind def +/col34 {0.557 0.557 0.557 srgb} bind def +/col35 {0.255 0.271 0.255 srgb} bind def +/col36 {0.557 0.557 0.557 srgb} bind def +/col37 {0.255 0.271 0.255 srgb} bind def +/col38 {0.557 0.557 0.557 srgb} bind def +/col39 {0.255 0.271 0.255 srgb} bind def +/col40 {0.557 0.557 0.557 srgb} bind def +/col41 {0.255 0.271 0.255 srgb} bind def +/col42 {0.557 0.557 0.557 srgb} bind def +/col43 {0.255 0.271 0.255 srgb} bind def +/col44 {0.557 0.557 0.557 srgb} bind def +/col45 {0.557 0.557 0.557 srgb} bind def +/col46 {0.557 0.557 0.557 srgb} bind def +/col47 {0.557 0.557 0.557 srgb} bind def +/col48 {0.557 0.557 0.557 srgb} bind def +/col49 {0.557 0.557 0.557 srgb} bind def +/col50 {0.557 0.557 0.557 srgb} bind def +/col51 {0.557 0.557 0.557 srgb} bind def +/col52 {0.557 0.557 0.557 srgb} bind def +/col53 {0.557 0.557 0.557 srgb} bind def +/col54 {0.557 0.557 0.557 srgb} bind def +/col55 {0.255 0.271 0.255 srgb} bind def +/col56 {0.557 0.557 0.557 srgb} bind def +/col57 {0.255 0.271 0.255 srgb} bind def +/col58 {0.557 0.557 0.557 srgb} bind def +/col59 {0.255 0.271 0.255 srgb} bind def +/col60 {0.557 0.557 0.557 srgb} bind def +/col61 {0.255 0.271 0.255 srgb} bind def +/col62 {0.557 0.557 0.557 srgb} bind def +/col63 {0.255 0.271 0.255 srgb} bind def +/col64 {0.557 0.557 0.557 srgb} bind def +/col65 {0.255 0.271 0.255 srgb} bind def +/col66 {0.557 0.557 0.557 srgb} bind def +/col67 {0.255 0.271 0.255 srgb} bind def +/col68 {0.557 0.557 0.557 srgb} bind def +/col69 {0.255 0.271 0.255 srgb} bind def +/col70 {0.557 0.557 0.557 srgb} bind def +/col71 {0.255 0.271 0.255 srgb} bind def +/col72 {0.557 0.557 0.557 srgb} bind def + +end +save +-30.0 227.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Times-Roman /Times-Roman-iso isovec ReEncode + /DrawEllipse { + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def + /savematrix mtrx currentmatrix def + x y tr xrad yrad sc 0 0 1 startangle endangle arc + closepath + savematrix setmatrix + } def + +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n -1000 4776 m -1000 -1000 l 7264 -1000 l 7264 4776 l cp clip + 0.06000 0.06000 sc +7.500 slw +% Ellipse +n 2175 2250 25 25 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr + +% Ellipse +n 4050 2700 25 25 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr + +% Ellipse +n 5475 1555 25 25 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr + +/Times-Roman-iso ff 180.00 scf sf +1950 2475 m +gs 1 -1 sc (\(a\)) col0 sh gr +/Times-Roman-iso ff 180.00 scf sf +5500 1800 m +gs 1 -1 sc (\(b\)) col0 sh gr +/Times-Roman-iso ff 180.00 scf sf +4200 2925 m +gs 1 -1 sc (\(x\)) col0 sh gr +% Polyline +n 744 3590 m 819 3590 l gs col-1 s gr +% Polyline +n 6226 3590 m 6151 3590 l gs col-1 s gr +% Polyline +n 744 3062 m 819 3062 l gs col-1 s gr +% Polyline +n 6226 3062 m 6151 3062 l gs col-1 s gr +% Polyline +n 744 2535 m 819 2535 l gs col-1 s gr +% Polyline +n 6226 2535 m 6151 2535 l gs col-1 s gr +% Polyline +n 744 2007 m 819 2007 l gs col-1 s gr +% Polyline +n 6226 2007 m 6151 2007 l gs col-1 s gr +% Polyline +n 744 1479 m 819 1479 l gs col-1 s gr +% Polyline +n 6226 1479 m 6151 1479 l gs col-1 s gr +% Polyline +n 744 952 m 819 952 l gs col-1 s gr +% Polyline +n 6226 952 m 6151 952 l gs col-1 s gr +% Polyline +n 744 424 m 819 424 l gs col-1 s gr +% Polyline +n 6226 424 m 6151 424 l gs col-1 s gr +% Polyline +n 744 3590 m 744 3515 l gs col-1 s gr +% Polyline +n 744 424 m 744 499 l gs col-1 s gr +% Polyline +n 1658 3590 m 1658 3515 l gs col-1 s gr +% Polyline +n 1658 424 m 1658 499 l gs col-1 s gr +% Polyline +n 2571 3590 m 2571 3515 l gs col-1 s gr +% Polyline +n 2571 424 m 2571 499 l gs col-1 s gr +% Polyline +n 3485 3590 m 3485 3515 l gs col-1 s gr +% Polyline +n 3485 424 m 3485 499 l gs col-1 s gr +% Polyline +n 4399 3590 m 4399 3515 l gs col-1 s gr +% Polyline +n 4399 424 m 4399 499 l gs col-1 s gr +% Polyline +n 5312 3590 m 5312 3515 l gs col-1 s gr +% Polyline +n 5312 424 m 5312 499 l gs col-1 s gr +% Polyline +n 6226 3590 m 6226 3515 l gs col-1 s gr +% Polyline +n 6226 424 m 6226 499 l gs col-1 s gr +% Polyline +n 744 3590 m 6226 3590 l 6226 424 l 744 424 l 744 3590 l cp gs col-1 s gr +% Polyline +n 6074 561 m 6082 561 l gs col-1 s gr +% Polyline +n 744 424 m 799 519 l 855 612 l 910 703 l 965 792 l 1021 879 l + 1076 965 l 1132 1048 l 1187 1129 l 1242 1209 l 1298 1286 l + 1353 1362 l 1408 1436 l 1464 1507 l 1519 1577 l 1575 1645 l + 1630 1711 l 1685 1775 l 1741 1837 l 1796 1897 l 1851 1955 l + 1907 2011 l 1962 2066 l 2018 2118 l 2073 2168 l 2128 2217 l + 2184 2263 l 2239 2308 l 2294 2351 l 2350 2391 l 2405 2430 l + 2461 2467 l 2516 2502 l 2571 2535 l 2627 2566 l 2682 2595 l + 2737 2622 l 2793 2647 l 2848 2670 l 2904 2692 l 2959 2711 l + 3014 2728 l 3070 2744 l 3125 2758 l 3180 2769 l 3236 2779 l + 3291 2787 l 3347 2792 l 3402 2796 l 3457 2798 l 3513 2798 l + 3568 2796 l 3623 2792 l 3679 2787 l 3734 2779 l 3790 2769 l + 3845 2758 l 3900 2744 l 3956 2728 l 4011 2711 l 4066 2692 l + 4122 2670 l 4177 2647 l 4233 2622 l 4288 2595 l 4343 2566 l + 4399 2535 l 4454 2502 l 4509 2467 l 4565 2430 l 4620 2391 l + 4676 2351 l 4731 2308 l 4786 2263 l 4842 2217 l 4897 2168 l + 4952 2118 l 5008 2066 l 5063 2011 l 5119 1955 l 5174 1897 l + 5229 1837 l 5285 1775 l 5340 1711 l 5395 1645 l 5451 1577 l + 5506 1507 l 5562 1436 l 5617 1362 l 5672 1286 l 5728 1209 l + 5783 1129 l 5838 1048 l 5894 965 l 5949 879 l 6005 792 l + 6060 703 l 6115 612 l 6171 519 l 6226 424 l gs col-1 s gr +/Times-Roman-iso ff 150.00 scf sf +670 3652 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 3124 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 2597 m +gs 1 -1 sc (4) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 2069 m +gs 1 -1 sc (6) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 1541 m +gs 1 -1 sc (8) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 1014 m +gs 1 -1 sc (10) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +670 486 m +gs 1 -1 sc (12) dup sw pop neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +744 3776 m +gs 1 -1 sc (-3) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +1658 3776 m +gs 1 -1 sc (-2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +2571 3776 m +gs 1 -1 sc (-1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +3485 3776 m +gs 1 -1 sc (0) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +4399 3776 m +gs 1 -1 sc (1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +5312 3776 m +gs 1 -1 sc (2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman-iso ff 150.00 scf sf +6226 3776 m +gs 1 -1 sc (3) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs +showpage diff --git a/software/gsl-1.15/doc/min.texi b/software/gsl-1.15/doc/min.texi new file mode 100644 index 000000000..477167fa1 --- /dev/null +++ b/software/gsl-1.15/doc/min.texi @@ -0,0 +1,408 @@ +@cindex optimization, see minimization +@cindex maximization, see minimization +@cindex minimization, one-dimensional +@cindex finding minima +@cindex nonlinear functions, minimization + +This chapter describes routines for finding minima of arbitrary +one-dimensional functions. The library provides low level components +for a variety of iterative minimizers and convergence tests. These can be +combined by the user to achieve the desired solution, with full access +to the intermediate steps of the algorithms. Each class of methods uses +the same framework, so that you can switch between minimizers at runtime +without needing to recompile your program. Each instance of a minimizer +keeps track of its own state, allowing the minimizers to be used in +multi-threaded programs. + +The header file @file{gsl_min.h} contains prototypes for the +minimization functions and related declarations. To use the minimization +algorithms to find the maximum of a function simply invert its sign. + +@menu +* Minimization Overview:: +* Minimization Caveats:: +* Initializing the Minimizer:: +* Providing the function to minimize:: +* Minimization Iteration:: +* Minimization Stopping Parameters:: +* Minimization Algorithms:: +* Minimization Examples:: +* Minimization References and Further Reading:: +@end menu + +@node Minimization Overview +@section Overview +@cindex minimization, overview + +The minimization algorithms begin with a bounded region known to contain +a minimum. The region is described by a lower bound @math{a} and an +upper bound @math{b}, with an estimate of the location of the minimum +@math{x}. + +@iftex +@sp 1 +@center @image{min-interval,3.4in} +@end iftex + +@noindent +The value of the function at @math{x} must be less than the value of the +function at the ends of the interval, +@tex +$$f(a) > f(x) < f(b)$$ +@end tex +@ifinfo + +@example +f(a) > f(x) < f(b) +@end example + +@end ifinfo +@noindent +This condition guarantees that a minimum is contained somewhere within +the interval. On each iteration a new point @math{x'} is selected using +one of the available algorithms. If the new point is a better estimate +of the minimum, i.e.@: where @math{f(x') < f(x)}, then the current +estimate of the minimum @math{x} is updated. The new point also allows +the size of the bounded interval to be reduced, by choosing the most +compact set of points which satisfies the constraint @math{f(a) > f(x) < +f(b)}. The interval is reduced until it encloses the true minimum to a +desired tolerance. This provides a best estimate of the location of the +minimum and a rigorous error estimate. + +Several bracketing algorithms are available within a single framework. +The user provides a high-level driver for the algorithm, and the +library provides the individual functions necessary for each of the +steps. There are three main phases of the iteration. The steps are, + +@itemize @bullet +@item +initialize minimizer state, @var{s}, for algorithm @var{T} + +@item +update @var{s} using the iteration @var{T} + +@item +test @var{s} for convergence, and repeat iteration if necessary +@end itemize + +@noindent +The state for the minimizers is held in a @code{gsl_min_fminimizer} +struct. The updating procedure uses only function evaluations (not +derivatives). + +@node Minimization Caveats +@section Caveats +@cindex minimization, caveats + +Note that minimization functions can only search for one minimum at a +time. When there are several minima in the search area, the first +minimum to be found will be returned; however it is difficult to predict +which of the minima this will be. @emph{In most cases, no error will be +reported if you try to find a minimum in an area where there is more +than one.} + +With all minimization algorithms it can be difficult to determine the +location of the minimum to full numerical precision. The behavior of the +function in the region of the minimum @math{x^*} can be approximated by +a Taylor expansion, +@tex +$$ +y = f(x^*) + {1 \over 2} f''(x^*) (x - x^*)^2 +$$ +@end tex +@ifinfo + +@example +y = f(x^*) + (1/2) f''(x^*) (x - x^*)^2 +@end example + +@end ifinfo +@noindent +and the second term of this expansion can be lost when added to the +first term at finite precision. This magnifies the error in locating +@math{x^*}, making it proportional to @math{\sqrt \epsilon} (where +@math{\epsilon} is the relative accuracy of the floating point numbers). +For functions with higher order minima, such as @math{x^4}, the +magnification of the error is correspondingly worse. The best that can +be achieved is to converge to the limit of numerical accuracy in the +function values, rather than the location of the minimum itself. + +@node Initializing the Minimizer +@section Initializing the Minimizer + +@deftypefun {gsl_min_fminimizer *} gsl_min_fminimizer_alloc (const gsl_min_fminimizer_type * @var{T}) +@tpindex gsl_min_fminimizer +@tpindex gsl_min_fminimizer_type +This function returns a pointer to a newly allocated instance of a +minimizer of type @var{T}. For example, the following code +creates an instance of a golden section minimizer, + +@example +const gsl_min_fminimizer_type * T + = gsl_min_fminimizer_goldensection; +gsl_min_fminimizer * s + = gsl_min_fminimizer_alloc (T); +@end example + +If there is insufficient memory to create the minimizer then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_min_fminimizer_set (gsl_min_fminimizer * @var{s}, gsl_function * @var{f}, double @var{x_minimum}, double @var{x_lower}, double @var{x_upper}) +This function sets, or resets, an existing minimizer @var{s} to use the +function @var{f} and the initial search interval [@var{x_lower}, +@var{x_upper}], with a guess for the location of the minimum +@var{x_minimum}. + +If the interval given does not contain a minimum, then the function +returns an error code of @code{GSL_EINVAL}. +@end deftypefun + +@deftypefun int gsl_min_fminimizer_set_with_values (gsl_min_fminimizer * @var{s}, gsl_function * @var{f}, double @var{x_minimum}, double @var{f_minimum}, double @var{x_lower}, double @var{f_lower}, double @var{x_upper}, double @var{f_upper}) +This function is equivalent to @code{gsl_min_fminimizer_set} but uses +the values @var{f_minimum}, @var{f_lower} and @var{f_upper} instead of +computing @code{f(x_minimum)}, @code{f(x_lower)} and @code{f(x_upper)}. +@end deftypefun + + +@deftypefun void gsl_min_fminimizer_free (gsl_min_fminimizer * @var{s}) +This function frees all the memory associated with the minimizer +@var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_min_fminimizer_name (const gsl_min_fminimizer * @var{s}) +This function returns a pointer to the name of the minimizer. For example, + +@example +printf ("s is a '%s' minimizer\n", + gsl_min_fminimizer_name (s)); +@end example + +@noindent +would print something like @code{s is a 'brent' minimizer}. +@end deftypefun + +@node Providing the function to minimize +@section Providing the function to minimize +@cindex minimization, providing a function to minimize + +You must provide a continuous function of one variable for the +minimizers to operate on. In order to allow for general parameters the +functions are defined by a @code{gsl_function} data type +(@pxref{Providing the function to solve}). + +@node Minimization Iteration +@section Iteration + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any minimizer of the +corresponding type. The same functions work for all minimizers so that +different methods can be substituted at runtime without modifications to +the code. + +@deftypefun int gsl_min_fminimizer_iterate (gsl_min_fminimizer * @var{s}) +This function performs a single iteration of the minimizer @var{s}. If the +iteration encounters an unexpected problem then an error code will be +returned, + +@table @code +@item GSL_EBADFUNC +the iteration encountered a singular point where the function evaluated +to @code{Inf} or @code{NaN}. + +@item GSL_FAILURE +the algorithm could not improve the current best approximation or +bounding interval. +@end table +@end deftypefun + +The minimizer maintains a current best estimate of the position of the +minimum at all times, and the current interval bounding the minimum. +This information can be accessed with the following auxiliary functions, + +@deftypefun double gsl_min_fminimizer_x_minimum (const gsl_min_fminimizer * @var{s}) +This function returns the current estimate of the position of the +minimum for the minimizer @var{s}. +@end deftypefun + +@deftypefun double gsl_min_fminimizer_x_upper (const gsl_min_fminimizer * @var{s}) +@deftypefunx double gsl_min_fminimizer_x_lower (const gsl_min_fminimizer * @var{s}) +These functions return the current upper and lower bound of the interval +for the minimizer @var{s}. +@end deftypefun + +@deftypefun double gsl_min_fminimizer_f_minimum (const gsl_min_fminimizer * @var{s}) +@deftypefunx double gsl_min_fminimizer_f_upper (const gsl_min_fminimizer * @var{s}) +@deftypefunx double gsl_min_fminimizer_f_lower (const gsl_min_fminimizer * @var{s}) +These functions return the value of the function at the current estimate +of the minimum and at the upper and lower bounds of the interval for the +minimizer @var{s}. +@end deftypefun + +@node Minimization Stopping Parameters +@section Stopping Parameters +@cindex minimization, stopping parameters + +A minimization procedure should stop when one of the following +conditions is true: + +@itemize @bullet +@item +A minimum has been found to within the user-specified precision. + +@item +A user-specified maximum number of iterations has been reached. + +@item +An error has occurred. +@end itemize + +@noindent +The handling of these conditions is under user control. The function +below allows the user to test the precision of the current result. + +@deftypefun int gsl_min_test_interval (double @var{x_lower}, double @var{x_upper}, double @var{epsabs}, double @var{epsrel}) +This function tests for the convergence of the interval [@var{x_lower}, +@var{x_upper}] with absolute error @var{epsabs} and relative error +@var{epsrel}. The test returns @code{GSL_SUCCESS} if the following +condition is achieved, +@tex +\beforedisplay +$$ +|a - b| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, \min(|a|,|b|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|a - b| < epsabs + epsrel min(|a|,|b|) +@end example + +@end ifinfo +@noindent +when the interval @math{x = [a,b]} does not include the origin. If the +interval includes the origin then @math{\min(|a|,|b|)} is replaced by +zero (which is the minimum value of @math{|x|} over the interval). This +ensures that the relative error is accurately estimated for minima close +to the origin. + +This condition on the interval also implies that any estimate of the +minimum @math{x_m} in the interval satisfies the same condition with respect +to the true minimum @math{x_m^*}, +@tex +\beforedisplay +$$ +|x_m - x_m^*| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, x_m^* +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|x_m - x_m^*| < epsabs + epsrel x_m^* +@end example + +@end ifinfo +@noindent +assuming that the true minimum @math{x_m^*} is contained within the interval. +@end deftypefun + +@comment ============================================================ + +@node Minimization Algorithms +@section Minimization Algorithms + +The minimization algorithms described in this section require an initial +interval which is guaranteed to contain a minimum---if @math{a} and +@math{b} are the endpoints of the interval and @math{x} is an estimate +of the minimum then @math{f(a) > f(x) < f(b)}. This ensures that the +function has at least one minimum somewhere in the interval. If a valid +initial interval is used then these algorithm cannot fail, provided the +function is well-behaved. + +@deffn {Minimizer} gsl_min_fminimizer_goldensection + +@cindex golden section algorithm for finding minima +@cindex minimum finding, golden section algorithm + +The @dfn{golden section algorithm} is the simplest method of bracketing +the minimum of a function. It is the slowest algorithm provided by the +library, with linear convergence. + +On each iteration, the algorithm first compares the subintervals from +the endpoints to the current minimum. The larger subinterval is divided +in a golden section (using the famous ratio @math{(3-\sqrt 5)/2 = +0.3189660}@dots{}) and the value of the function at this new point is +calculated. The new value is used with the constraint @math{f(a') > +f(x') < f(b')} to a select new interval containing the minimum, by +discarding the least useful point. This procedure can be continued +indefinitely until the interval is sufficiently small. Choosing the +golden section as the bisection ratio can be shown to provide the +fastest convergence for this type of algorithm. + +@end deffn + +@comment ============================================================ + +@deffn {Minimizer} gsl_min_fminimizer_brent +@cindex Brent's method for finding minima +@cindex minimum finding, Brent's method + +The @dfn{Brent minimization algorithm} combines a parabolic +interpolation with the golden section algorithm. This produces a fast +algorithm which is still robust. + +The outline of the algorithm can be summarized as follows: on each +iteration Brent's method approximates the function using an +interpolating parabola through three existing points. The minimum of the +parabola is taken as a guess for the minimum. If it lies within the +bounds of the current interval then the interpolating point is accepted, +and used to generate a smaller interval. If the interpolating point is +not accepted then the algorithm falls back to an ordinary golden section +step. The full details of Brent's method include some additional checks +to improve convergence. +@end deffn + +@deffn {Minimizer} gsl_min_fminimizer_quad_golden +@cindex safeguarded step-length algorithm +This is a variant of Brent's algorithm which uses the safeguarded +step-length algorithm of Gill and Murray. +@end deffn + +@comment ============================================================ + +@node Minimization Examples +@section Examples + +The following program uses the Brent algorithm to find the minimum of +the function @math{f(x) = \cos(x) + 1}, which occurs at @math{x = \pi}. +The starting interval is @math{(0,6)}, with an initial guess for the +minimum of @math{2}. + +@example +@verbatiminclude examples/min.c +@end example + +@noindent +Here are the results of the minimization procedure. + +@smallexample +$ ./a.out +@verbatiminclude examples/min.out +@end smallexample + +@node Minimization References and Further Reading +@section References and Further Reading + +Further information on Brent's algorithm is available in the following +book, + +@itemize @w{} +@item +Richard Brent, @cite{Algorithms for minimization without derivatives}, +Prentice-Hall (1973), republished by Dover in paperback (2002), ISBN +0-486-41998-3. +@end itemize + diff --git a/software/gsl-1.15/doc/montecarlo.texi b/software/gsl-1.15/doc/montecarlo.texi new file mode 100644 index 000000000..16a40100c --- /dev/null +++ b/software/gsl-1.15/doc/montecarlo.texi @@ -0,0 +1,767 @@ +@cindex Monte Carlo integration +@cindex stratified sampling in Monte Carlo integration +@cindex multidimensional integration +This chapter describes routines for multidimensional Monte Carlo +integration. These include the traditional Monte Carlo method and +adaptive algorithms such as @sc{vegas} and @sc{miser} which use +importance sampling and stratified sampling techniques. Each algorithm +computes an estimate of a multidimensional definite integral of the +form, +@tex +\beforedisplay +$$ +I = \int_{x_l}^{x_u} dx\,\int_{y_l}^{y_u}dy\,... f(x,y,...) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_xl^xu dx \int_yl^yu dy ... f(x, y, ...) +@end example + +@end ifinfo +@noindent +over a hypercubic region @math{((x_l,x_u)}, @math{(y_l,y_u), ...)} using +a fixed number of function calls. The routines also provide a +statistical estimate of the error on the result. This error estimate +should be taken as a guide rather than as a strict error bound---random +sampling of the region may not uncover all the important features +of the function, resulting in an underestimate of the error. + +The functions are defined in separate header files for each routine, +@file{gsl_monte_plain.h}, @file{gsl_monte_miser.h} and +@file{gsl_monte_vegas.h}. + +@menu +* Monte Carlo Interface:: +* PLAIN Monte Carlo:: +* MISER:: +* VEGAS:: +* Monte Carlo Examples:: +* Monte Carlo Integration References and Further Reading:: +@end menu + +@node Monte Carlo Interface +@section Interface +All of the Monte Carlo integration routines use the same general form of +interface. There is an allocator to allocate memory for control +variables and workspace, a routine to initialize those control +variables, the integrator itself, and a function to free the space when +done. + +Each integration function requires a random number generator to be +supplied, and returns an estimate of the integral and its standard +deviation. The accuracy of the result is determined by the number of +function calls specified by the user. If a known level of accuracy is +required this can be achieved by calling the integrator several times +and averaging the individual results until the desired accuracy is +obtained. + +Random sample points used within the Monte Carlo routines are always +chosen strictly within the integration region, so that endpoint +singularities are automatically avoided. + +The function to be integrated has its own datatype, defined in the +header file @file{gsl_monte.h}. + +@deftp {Data Type} gsl_monte_function + +This data type defines a general function with parameters for Monte +Carlo integration. + +@table @code +@item double (* f) (double * @var{x}, size_t @var{dim}, void * @var{params}) +this function should return the value +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} for the argument @var{x} and parameters @var{params}, +where @var{x} is an array of size @var{dim} giving the coordinates of +the point where the function is to be evaluated. + +@item size_t dim +the number of dimensions for @var{x}. + +@item void * params +a pointer to the parameters of the function. +@end table +@end deftp + +@noindent +Here is an example for a quadratic function in two dimensions, +@tex +\beforedisplay +$$ +f(x,y) = a x^2 + b x y + c y^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(x,y) = a x^2 + b x y + c y^2 +@end example + +@end ifinfo +@noindent +with @math{a = 3}, @math{b = 2}, @math{c = 1}. The following code +defines a @code{gsl_monte_function} @code{F} which you could pass to an +integrator: + +@example +struct my_f_params @{ double a; double b; double c; @}; + +double +my_f (double x[], size_t dim, void * p) @{ + struct my_f_params * fp = (struct my_f_params *)p; + + if (dim != 2) + @{ + fprintf (stderr, "error: dim != 2"); + abort (); + @} + + return fp->a * x[0] * x[0] + + fp->b * x[0] * x[1] + + fp->c * x[1] * x[1]; +@} + +gsl_monte_function F; +struct my_f_params params = @{ 3.0, 2.0, 1.0 @}; + +F.f = &my_f; +F.dim = 2; +F.params = ¶ms; +@end example + +@noindent +The function @math{f(x)} can be evaluated using the following macro, + +@example +#define GSL_MONTE_FN_EVAL(F,x) + (*((F)->f))(x,(F)->dim,(F)->params) +@end example + +@node PLAIN Monte Carlo +@section PLAIN Monte Carlo +@cindex plain Monte Carlo +The plain Monte Carlo algorithm samples points randomly from the +integration region to estimate the integral and its error. Using this +algorithm the estimate of the integral @math{E(f; N)} for @math{N} +randomly distributed points @math{x_i} is given by, +@tex +\beforedisplay +$$ +E(f; N) = V \langle f \rangle = {V \over N} \sum_i^N f(x_i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +E(f; N) = = V = (V / N) \sum_i^N f(x_i) +@end example + +@end ifinfo +@noindent +where @math{V} is the volume of the integration region. The error on +this estimate @math{\sigma(E;N)} is calculated from the estimated +variance of the mean, +@tex +\beforedisplay +$$ +\sigma^2 (E; N) = {V^2 \over N^2 } \sum_i^N (f(x_i) - \langle f \rangle)^2. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\sigma^2 (E; N) = (V^2 / N^2) \sum_i^N (f(x_i) - )^2. +@end example + +@end ifinfo +@noindent +For large @math{N} this variance decreases asymptotically as +@math{\Var(f)/N}, where @math{\Var(f)} is the true variance of the +function over the integration region. The error estimate itself should +decrease as @c{$\sigma(f)/\sqrt{N}$} +@math{\sigma(f)/\sqrt@{N@}}. The familiar law of errors +decreasing as @c{$1/\sqrt{N}$} +@math{1/\sqrt@{N@}} applies---to reduce the error by a +factor of 10 requires a 100-fold increase in the number of sample +points. + +The functions described in this section are declared in the header file +@file{gsl_monte_plain.h}. + +@deftypefun {gsl_monte_plain_state *} gsl_monte_plain_alloc (size_t @var{dim}) +@tpindex gsl_monte_plain_state +This function allocates and initializes a workspace for Monte Carlo +integration in @var{dim} dimensions. +@end deftypefun + +@deftypefun int gsl_monte_plain_init (gsl_monte_plain_state* @var{s}) +This function initializes a previously allocated integration state. +This allows an existing workspace to be reused for different +integrations. +@end deftypefun + +@deftypefun int gsl_monte_plain_integrate (gsl_monte_function * @var{f}, const double @var{xl}[], const double @var{xu}[], size_t @var{dim}, size_t @var{calls}, gsl_rng * @var{r}, gsl_monte_plain_state * @var{s}, double * @var{result}, double * @var{abserr}) +This routines uses the plain Monte Carlo algorithm to integrate the +function @var{f} over the @var{dim}-dimensional hypercubic region +defined by the lower and upper limits in the arrays @var{xl} and +@var{xu}, each of size @var{dim}. The integration uses a fixed number +of function calls @var{calls}, and obtains random sampling points using +the random number generator @var{r}. A previously allocated workspace +@var{s} must be supplied. The result of the integration is returned in +@var{result}, with an estimated absolute error @var{abserr}. +@end deftypefun + +@deftypefun void gsl_monte_plain_free (gsl_monte_plain_state * @var{s}) +This function frees the memory associated with the integrator state +@var{s}. +@end deftypefun + +@node MISER +@section MISER +@cindex MISER monte carlo integration +@cindex recursive stratified sampling, MISER + +The @sc{miser} algorithm of Press and Farrar is based on recursive +stratified sampling. This technique aims to reduce the overall +integration error by concentrating integration points in the regions of +highest variance. + +The idea of stratified sampling begins with the observation that for two +disjoint regions @math{a} and @math{b} with Monte Carlo estimates of the +integral @math{E_a(f)} and @math{E_b(f)} and variances +@math{\sigma_a^2(f)} and @math{\sigma_b^2(f)}, the variance +@math{\Var(f)} of the combined estimate +@c{$E(f) = {1\over 2} (E_a(f) + E_b(f))$} +@math{E(f) = (1/2) (E_a(f) + E_b(f))} +is given by, +@tex +\beforedisplay +$$ +\Var(f) = {\sigma_a^2(f) \over 4 N_a} + {\sigma_b^2(f) \over 4 N_b}. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Var(f) = (\sigma_a^2(f) / 4 N_a) + (\sigma_b^2(f) / 4 N_b). +@end example + +@end ifinfo +@noindent +It can be shown that this variance is minimized by distributing the +points such that, +@tex +\beforedisplay +$$ +{N_a \over N_a+N_b} = {\sigma_a \over \sigma_a + \sigma_b}. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +N_a / (N_a + N_b) = \sigma_a / (\sigma_a + \sigma_b). +@end example + +@end ifinfo +@noindent +Hence the smallest error estimate is obtained by allocating sample +points in proportion to the standard deviation of the function in each +sub-region. + +The @sc{miser} algorithm proceeds by bisecting the integration region +along one coordinate axis to give two sub-regions at each step. The +direction is chosen by examining all @math{d} possible bisections and +selecting the one which will minimize the combined variance of the two +sub-regions. The variance in the sub-regions is estimated by sampling +with a fraction of the total number of points available to the current +step. The same procedure is then repeated recursively for each of the +two half-spaces from the best bisection. The remaining sample points are +allocated to the sub-regions using the formula for @math{N_a} and +@math{N_b}. This recursive allocation of integration points continues +down to a user-specified depth where each sub-region is integrated using +a plain Monte Carlo estimate. These individual values and their error +estimates are then combined upwards to give an overall result and an +estimate of its error. + +The functions described in this section are declared in the header file +@file{gsl_monte_miser.h}. + +@deftypefun {gsl_monte_miser_state *} gsl_monte_miser_alloc (size_t @var{dim}) +@tpindex gsl_monte_miser_state +This function allocates and initializes a workspace for Monte Carlo +integration in @var{dim} dimensions. The workspace is used to maintain +the state of the integration. +@end deftypefun + +@deftypefun int gsl_monte_miser_init (gsl_monte_miser_state* @var{s}) +This function initializes a previously allocated integration state. +This allows an existing workspace to be reused for different +integrations. +@end deftypefun + +@deftypefun int gsl_monte_miser_integrate (gsl_monte_function * @var{f}, const double @var{xl}[], const double @var{xu}[], size_t @var{dim}, size_t @var{calls}, gsl_rng * @var{r}, gsl_monte_miser_state * @var{s}, double * @var{result}, double * @var{abserr}) +This routines uses the @sc{miser} Monte Carlo algorithm to integrate the +function @var{f} over the @var{dim}-dimensional hypercubic region +defined by the lower and upper limits in the arrays @var{xl} and +@var{xu}, each of size @var{dim}. The integration uses a fixed number +of function calls @var{calls}, and obtains random sampling points using +the random number generator @var{r}. A previously allocated workspace +@var{s} must be supplied. The result of the integration is returned in +@var{result}, with an estimated absolute error @var{abserr}. +@end deftypefun + +@deftypefun void gsl_monte_miser_free (gsl_monte_miser_state * @var{s}) +This function frees the memory associated with the integrator state +@var{s}. +@end deftypefun + +The @sc{miser} algorithm has several configurable parameters which can +be changed using the following two functions.@footnote{The previous +method of accessing these fields directly through the +@code{gsl_monte_miser_state} struct is now deprecated.} + +@deftypefun void gsl_monte_miser_params_get (const gsl_monte_miser_state * @var{s}, gsl_monte_miser_params * @var{params}) +This function copies the parameters of the integrator state into the +user-supplied @var{params} structure. +@end deftypefun + +@deftypefun void gsl_monte_miser_params_set (gsl_monte_miser_state * @var{s}, const gsl_monte_miser_params * @var{params}) +This function sets the integrator parameters based on values provided +in the @var{params} structure. +@end deftypefun + +Typically the values of the parameters are first read using +@code{gsl_monte_miser_params_get}, the necessary changes are made to +the fields of the @var{params} structure, and the values are copied +back into the integrator state using +@code{gsl_monte_miser_params_set}. The functions use the +@code{gsl_monte_miser_params} structure which contains the following +fields: + +@deftypevar double estimate_frac +This parameter specifies the fraction of the currently available number of +function calls which are allocated to estimating the variance at each +recursive step. The default value is 0.1. +@end deftypevar + +@deftypevar size_t min_calls +This parameter specifies the minimum number of function calls required +for each estimate of the variance. If the number of function calls +allocated to the estimate using @var{estimate_frac} falls below +@var{min_calls} then @var{min_calls} are used instead. This ensures +that each estimate maintains a reasonable level of accuracy. The +default value of @var{min_calls} is @code{16 * dim}. +@end deftypevar + +@deftypevar size_t min_calls_per_bisection +This parameter specifies the minimum number of function calls required +to proceed with a bisection step. When a recursive step has fewer calls +available than @var{min_calls_per_bisection} it performs a plain Monte +Carlo estimate of the current sub-region and terminates its branch of +the recursion. The default value of this parameter is @code{32 * +min_calls}. +@end deftypevar + +@deftypevar double alpha +This parameter controls how the estimated variances for the two +sub-regions of a bisection are combined when allocating points. With +recursive sampling the overall variance should scale better than +@math{1/N}, since the values from the sub-regions will be obtained using +a procedure which explicitly minimizes their variance. To accommodate +this behavior the @sc{miser} algorithm allows the total variance to +depend on a scaling parameter @math{\alpha}, +@tex +\beforedisplay +$$ +\Var(f) = {\sigma_a \over N_a^\alpha} + {\sigma_b \over N_b^\alpha}. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Var(f) = @{\sigma_a \over N_a^\alpha@} + @{\sigma_b \over N_b^\alpha@}. +@end example + +@end ifinfo +@noindent +The authors of the original paper describing @sc{miser} recommend the +value @math{\alpha = 2} as a good choice, obtained from numerical +experiments, and this is used as the default value in this +implementation. +@end deftypevar + +@deftypevar double dither +This parameter introduces a random fractional variation of size +@var{dither} into each bisection, which can be used to break the +symmetry of integrands which are concentrated near the exact center of +the hypercubic integration region. The default value of dither is zero, +so no variation is introduced. If needed, a typical value of +@var{dither} is 0.1. +@end deftypevar + +@node VEGAS +@section VEGAS +@cindex VEGAS Monte Carlo integration +@cindex importance sampling, VEGAS + +The @sc{vegas} algorithm of Lepage is based on importance sampling. It +samples points from the probability distribution described by the +function @math{|f|}, so that the points are concentrated in the regions +that make the largest contribution to the integral. + +In general, if the Monte Carlo integral of @math{f} is sampled with +points distributed according to a probability distribution described by +the function @math{g}, we obtain an estimate @math{E_g(f; N)}, +@tex +\beforedisplay +$$ +E_g(f; N) = E(f/g; N) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +E_g(f; N) = E(f/g; N) +@end example + +@end ifinfo +@noindent +with a corresponding variance, +@tex +\beforedisplay +$$ +\Var_g(f; N) = \Var(f/g; N). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Var_g(f; N) = \Var(f/g; N). +@end example + +@end ifinfo +@noindent +If the probability distribution is chosen as @math{g = |f|/I(|f|)} then +it can be shown that the variance @math{V_g(f; N)} vanishes, and the +error in the estimate will be zero. In practice it is not possible to +sample from the exact distribution @math{g} for an arbitrary function, so +importance sampling algorithms aim to produce efficient approximations +to the desired distribution. + +The @sc{vegas} algorithm approximates the exact distribution by making a +number of passes over the integration region while histogramming the +function @math{f}. Each histogram is used to define a sampling +distribution for the next pass. Asymptotically this procedure converges +to the desired distribution. In order +to avoid the number of histogram bins growing like @math{K^d} the +probability distribution is approximated by a separable function: +@c{$g(x_1, x_2,\ldots) = g_1(x_1) g_2(x_2)\ldots$} +@math{g(x_1, x_2, ...) = g_1(x_1) g_2(x_2) ...} +so that the number of bins required is only @math{Kd}. +This is equivalent to locating the peaks of the function from the +projections of the integrand onto the coordinate axes. The efficiency +of @sc{vegas} depends on the validity of this assumption. It is most +efficient when the peaks of the integrand are well-localized. If an +integrand can be rewritten in a form which is approximately separable +this will increase the efficiency of integration with @sc{vegas}. + +@sc{vegas} incorporates a number of additional features, and combines both +stratified sampling and importance sampling. The integration region is +divided into a number of ``boxes'', with each box getting a fixed +number of points (the goal is 2). Each box can then have a fractional +number of bins, but if the ratio of bins-per-box is less than two, Vegas switches to a +kind variance reduction (rather than importance sampling). + + +@deftypefun {gsl_monte_vegas_state *} gsl_monte_vegas_alloc (size_t @var{dim}) +@tpindex gsl_monte_vegas_state +This function allocates and initializes a workspace for Monte Carlo +integration in @var{dim} dimensions. The workspace is used to maintain +the state of the integration. +@end deftypefun + +@deftypefun int gsl_monte_vegas_init (gsl_monte_vegas_state* @var{s}) +This function initializes a previously allocated integration state. +This allows an existing workspace to be reused for different +integrations. +@end deftypefun + +@deftypefun int gsl_monte_vegas_integrate (gsl_monte_function * @var{f}, double @var{xl}[], double @var{xu}[], size_t @var{dim}, size_t @var{calls}, gsl_rng * @var{r}, gsl_monte_vegas_state * @var{s}, double * @var{result}, double * @var{abserr}) +This routines uses the @sc{vegas} Monte Carlo algorithm to integrate the +function @var{f} over the @var{dim}-dimensional hypercubic region +defined by the lower and upper limits in the arrays @var{xl} and +@var{xu}, each of size @var{dim}. The integration uses a fixed number +of function calls @var{calls}, and obtains random sampling points using +the random number generator @var{r}. A previously allocated workspace +@var{s} must be supplied. The result of the integration is returned in +@var{result}, with an estimated absolute error @var{abserr}. The result +and its error estimate are based on a weighted average of independent +samples. The chi-squared per degree of freedom for the weighted average +is returned via the state struct component, @var{s->chisq}, and must be +consistent with 1 for the weighted average to be reliable. +@end deftypefun + +@deftypefun void gsl_monte_vegas_free (gsl_monte_vegas_state * @var{s}) +This function frees the memory associated with the integrator state +@var{s}. +@end deftypefun + +The @sc{vegas} algorithm computes a number of independent estimates of the +integral internally, according to the @code{iterations} parameter +described below, and returns their weighted average. Random sampling of +the integrand can occasionally produce an estimate where the error is +zero, particularly if the function is constant in some regions. An +estimate with zero error causes the weighted average to break down and +must be handled separately. In the original Fortran implementations of +@sc{vegas} the error estimate is made non-zero by substituting a small +value (typically @code{1e-30}). The implementation in GSL differs from +this and avoids the use of an arbitrary constant---it either assigns +the value a weight which is the average weight of the preceding +estimates or discards it according to the following procedure, + +@table @asis +@item current estimate has zero error, weighted average has finite error + +The current estimate is assigned a weight which is the average weight of +the preceding estimates. + +@item current estimate has finite error, previous estimates had zero error + +The previous estimates are discarded and the weighted averaging +procedure begins with the current estimate. + +@item current estimate has zero error, previous estimates had zero error + +The estimates are averaged using the arithmetic mean, but no error is computed. +@end table + +The convergence of the algorithm can be tested using the overall +chi-squared value of the results, which is available from the +following function: + +@deftypefun double gsl_monte_vegas_chisq (const gsl_monte_vegas_state * @var{s}) +This function returns the chi-squared per degree of freedom for the +weighted estimate of the integral. The returned value should be close +to 1. A value which differs significantly from 1 indicates that the +values from different iterations are inconsistent. In this case the +weighted error will be under-estimated, and further iterations of the +algorithm are needed to obtain reliable results. +@end deftypefun + +@deftypefun void gsl_monte_vegas_runval (const gsl_monte_vegas_state * @var{s}, double * @var{result}, double * @var{sigma}) +This function returns the raw (unaveraged) values of the integral +@var{result} and its error @var{sigma} from the most recent iteration +of the algorithm. +@end deftypefun + +The @sc{vegas} algorithm is highly configurable. Several parameters +can be changed using the following two functions. + +@deftypefun void gsl_monte_vegas_params_get (const gsl_monte_vegas_state * @var{s}, gsl_monte_vegas_params * @var{params}) +This function copies the parameters of the integrator state into the +user-supplied @var{params} structure. +@end deftypefun + +@deftypefun void gsl_monte_vegas_params_set (gsl_monte_vegas_state * @var{s}, const gsl_monte_vegas_params * @var{params}) +This function sets the integrator parameters based on values provided +in the @var{params} structure. +@end deftypefun + +Typically the values of the parameters are first read using +@code{gsl_monte_vegas_params_get}, the necessary changes are made to +the fields of the @var{params} structure, and the values are copied +back into the integrator state using +@code{gsl_monte_vegas_params_set}. The functions use the +@code{gsl_monte_vegas_params} structure which contains the following +fields: + +@deftypevar double alpha +The parameter @code{alpha} controls the stiffness of the rebinning +algorithm. It is typically set between one and two. A value of zero +prevents rebinning of the grid. The default value is 1.5. +@end deftypevar + +@deftypevar size_t iterations +The number of iterations to perform for each call to the routine. The +default value is 5 iterations. +@end deftypevar + +@deftypevar int stage +Setting this determines the @dfn{stage} of the calculation. Normally, +@code{stage = 0} which begins with a new uniform grid and empty weighted +average. Calling @sc{vegas} with @code{stage = 1} retains the grid from the +previous run but discards the weighted average, so that one can ``tune'' +the grid using a relatively small number of points and then do a large +run with @code{stage = 1} on the optimized grid. Setting @code{stage = +2} keeps the grid and the weighted average from the previous run, but +may increase (or decrease) the number of histogram bins in the grid +depending on the number of calls available. Choosing @code{stage = 3} +enters at the main loop, so that nothing is changed, and is equivalent +to performing additional iterations in a previous call. +@end deftypevar + +@deftypevar int mode +The possible choices are @code{GSL_VEGAS_MODE_IMPORTANCE}, +@code{GSL_VEGAS_MODE_STRATIFIED}, @code{GSL_VEGAS_MODE_IMPORTANCE_ONLY}. +This determines whether @sc{vegas} will use importance sampling or +stratified sampling, or whether it can pick on its own. In low +dimensions @sc{vegas} uses strict stratified sampling (more precisely, +stratified sampling is chosen if there are fewer than 2 bins per box). +@end deftypevar + +@deftypevar int verbose +@deftypevarx {FILE *} ostream +These parameters set the level of information printed by @sc{vegas}. All +information is written to the stream @var{ostream}. The default setting +of @var{verbose} is @code{-1}, which turns off all output. A +@var{verbose} value of @code{0} prints summary information about the +weighted average and final result, while a value of @code{1} also +displays the grid coordinates. A value of @code{2} prints information +from the rebinning procedure for each iteration. +@end deftypevar + +The above fields and the @var{chisq} value can also be accessed +directly in the @code{gsl_monte_vegas_state} but such use is +deprecated. + +@node Monte Carlo Examples +@section Examples + +The example program below uses the Monte Carlo routines to estimate the +value of the following 3-dimensional integral from the theory of random +walks, +@tex +\beforedisplay +$$ +I = \int_{-\pi}^{+\pi} {dk_x \over 2\pi} + \int_{-\pi}^{+\pi} {dk_y \over 2\pi} + \int_{-\pi}^{+\pi} {dk_z \over 2\pi} + { 1 \over (1 - \cos(k_x)\cos(k_y)\cos(k_z))}. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +I = \int_@{-pi@}^@{+pi@} @{dk_x/(2 pi)@} + \int_@{-pi@}^@{+pi@} @{dk_y/(2 pi)@} + \int_@{-pi@}^@{+pi@} @{dk_z/(2 pi)@} + 1 / (1 - cos(k_x)cos(k_y)cos(k_z)). +@end example + +@end ifinfo +@noindent +The analytic value of this integral can be shown to be @math{I = +\Gamma(1/4)^4/(4 \pi^3) = 1.393203929685676859...}. The integral gives +the mean time spent at the origin by a random walk on a body-centered +cubic lattice in three dimensions. + +For simplicity we will compute the integral over the region +@math{(0,0,0)} to @math{(\pi,\pi,\pi)} and multiply by 8 to obtain the +full result. The integral is slowly varying in the middle of the region +but has integrable singularities at the corners @math{(0,0,0)}, +@math{(0,\pi,\pi)}, @math{(\pi,0,\pi)} and @math{(\pi,\pi,0)}. The +Monte Carlo routines only select points which are strictly within the +integration region and so no special measures are needed to avoid these +singularities. + +@smallexample +@verbatiminclude examples/monte.c +@end smallexample + +@noindent +With 500,000 function calls the plain Monte Carlo algorithm achieves a +fractional error of 1%. The estimated error @code{sigma} is roughly +consistent with the actual error--the computed result differs from +the true result by about 1.4 standard deviations, + +@example +plain ================== +result = 1.412209 +sigma = 0.013436 +exact = 1.393204 +error = 0.019005 = 1.4 sigma +@end example + +@noindent +The @sc{miser} algorithm reduces the error by a factor of four, and also +correctly estimates the error, + +@example +miser ================== +result = 1.391322 +sigma = 0.003461 +exact = 1.393204 +error = -0.001882 = 0.54 sigma +@end example + +@noindent +In the case of the @sc{vegas} algorithm the program uses an initial +warm-up run of 10,000 function calls to prepare, or ``warm up'', the grid. +This is followed by a main run with five iterations of 100,000 function +calls. The chi-squared per degree of freedom for the five iterations are +checked for consistency with 1, and the run is repeated if the results +have not converged. In this case the estimates are consistent on the +first pass. + +@example +vegas warm-up ================== +result = 1.392673 +sigma = 0.003410 +exact = 1.393204 +error = -0.000531 = 0.16 sigma +converging... +result = 1.393281 sigma = 0.000362 chisq/dof = 1.5 +vegas final ================== +result = 1.393281 +sigma = 0.000362 +exact = 1.393204 +error = 0.000077 = 0.21 sigma +@end example + +@noindent +If the value of @code{chisq} had differed significantly from 1 it would +indicate inconsistent results, with a correspondingly underestimated +error. The final estimate from @sc{vegas} (using a similar number of +function calls) is significantly more accurate than the other two +algorithms. + +@node Monte Carlo Integration References and Further Reading +@section References and Further Reading + +The @sc{miser} algorithm is described in the following article by Press +and Farrar, + +@itemize @w{} +@item +W.H. Press, G.R. Farrar, @cite{Recursive Stratified Sampling for +Multidimensional Monte Carlo Integration}, +Computers in Physics, v4 (1990), pp190--195. +@end itemize + +@noindent +The @sc{vegas} algorithm is described in the following papers, + +@itemize @w{} +@item +G.P. Lepage, +@cite{A New Algorithm for Adaptive Multidimensional Integration}, +Journal of Computational Physics 27, 192--203, (1978) + +@item +G.P. Lepage, +@cite{VEGAS: An Adaptive Multi-dimensional Integration Program}, +Cornell preprint CLNS 80-447, March 1980 +@end itemize + diff --git a/software/gsl-1.15/doc/multifit.texi b/software/gsl-1.15/doc/multifit.texi new file mode 100644 index 000000000..00c2de2b5 --- /dev/null +++ b/software/gsl-1.15/doc/multifit.texi @@ -0,0 +1,655 @@ +@cindex nonlinear least squares fitting +@cindex least squares fitting, nonlinear + +This chapter describes functions for multidimensional nonlinear +least-squares fitting. The library provides low level components for a +variety of iterative solvers and convergence tests. These can be +combined by the user to achieve the desired solution, with full access +to the intermediate steps of the iteration. Each class of methods uses +the same framework, so that you can switch between solvers at runtime +without needing to recompile your program. Each instance of a solver +keeps track of its own state, allowing the solvers to be used in +multi-threaded programs. + +The header file @file{gsl_multifit_nlin.h} contains prototypes for the +multidimensional nonlinear fitting functions and related declarations. + +@menu +* Overview of Nonlinear Least-Squares Fitting:: +* Initializing the Nonlinear Least-Squares Solver:: +* Providing the Function to be Minimized:: +* Iteration of the Minimization Algorithm:: +* Search Stopping Parameters for Minimization Algorithms:: +* Minimization Algorithms using Derivatives:: +* Minimization Algorithms without Derivatives:: +* Computing the covariance matrix of best fit parameters:: +* Example programs for Nonlinear Least-Squares Fitting:: +* References and Further Reading for Nonlinear Least-Squares Fitting:: +@end menu + +@node Overview of Nonlinear Least-Squares Fitting +@section Overview +@cindex nonlinear least squares fitting, overview + +The problem of multidimensional nonlinear least-squares fitting requires +the minimization of the squared residuals of @math{n} functions, +@math{f_i}, in @math{p} parameters, @math{x_i}, +@tex +\beforedisplay +$$ +\Phi(x) = {1 \over 2} || F(x) ||^2 + = {1 \over 2} \sum_{i=1}^{n} f_i (x_1, \dots, x_p)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Phi(x) = (1/2) || F(x) ||^2 + = (1/2) \sum_@{i=1@}^@{n@} f_i(x_1, ..., x_p)^2 +@end example + +@end ifinfo +@noindent +All algorithms proceed from an initial guess using the linearization, +@tex +\beforedisplay +$$ +\psi(p) = || F(x+p) || \approx || F(x) + J p\, || +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\psi(p) = || F(x+p) || ~=~ || F(x) + J p || +@end example + +@end ifinfo +@noindent +where @math{x} is the initial point, @math{p} is the proposed step +and @math{J} is the +Jacobian matrix @c{$J_{ij} = \partial f_i / \partial x_j$} +@math{J_@{ij@} = d f_i / d x_j}. +Additional strategies are used to enlarge the region of convergence. +These include requiring a decrease in the norm @math{||F||} on each +step or using a trust region to avoid steps which fall outside the linear +regime. + +To perform a weighted least-squares fit of a nonlinear model +@math{Y(x,t)} to data (@math{t_i}, @math{y_i}) with independent Gaussian +errors @math{\sigma_i}, use function components of the following form, +@tex +\beforedisplay +$$ +f_i = {(Y(x, t_i) - y_i) \over \sigma_i} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f_i = (Y(x, t_i) - y_i) / \sigma_i +@end example + +@end ifinfo +@noindent +Note that the model parameters are denoted by @math{x} in this chapter +since the non-linear least-squares algorithms are described +geometrically (i.e. finding the minimum of a surface). The +independent variable of any data to be fitted is denoted by @math{t}. + +@cindex Jacobian matrix, fitting +With the definition above the Jacobian is +@c{$J_{ij} = (1 / \sigma_i) \partial Y_i / \partial x_j$} +@math{J_@{ij@} =(1 / \sigma_i) d Y_i / d x_j}, where @math{Y_i = Y(x,t_i)}. + + +@node Initializing the Nonlinear Least-Squares Solver +@section Initializing the Solver + +@deftypefun {gsl_multifit_fsolver *} gsl_multifit_fsolver_alloc (const gsl_multifit_fsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) +@tpindex gsl_multifit_fsolver +@tpindex gsl_multifit_fsolver_type +This function returns a pointer to a newly allocated instance of a +solver of type @var{T} for @var{n} observations and @var{p} parameters. +The number of observations @var{n} must be greater than or equal to +parameters @var{p}. + +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun {gsl_multifit_fdfsolver *} gsl_multifit_fdfsolver_alloc (const gsl_multifit_fdfsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) +@tpindex gsl_multifit_fdfsolver +@tpindex gsl_multifit_fdfsolver_type +This function returns a pointer to a newly allocated instance of a +derivative solver of type @var{T} for @var{n} observations and @var{p} +parameters. For example, the following code creates an instance of a +Levenberg-Marquardt solver for 100 data points and 3 parameters, + +@example +const gsl_multifit_fdfsolver_type * T + = gsl_multifit_fdfsolver_lmder; +gsl_multifit_fdfsolver * s + = gsl_multifit_fdfsolver_alloc (T, 100, 3); +@end example + +@noindent +The number of observations @var{n} must be greater than or equal to +parameters @var{p}. + +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_multifit_fsolver_set (gsl_multifit_fsolver * @var{s}, gsl_multifit_function * @var{f}, const gsl_vector * @var{x}) +This function initializes, or reinitializes, an existing solver @var{s} +to use the function @var{f} and the initial guess @var{x}. +@end deftypefun + +@deftypefun int gsl_multifit_fdfsolver_set (gsl_multifit_fdfsolver * @var{s}, gsl_multifit_function_fdf * @var{fdf}, const gsl_vector * @var{x}) +This function initializes, or reinitializes, an existing solver @var{s} +to use the function and derivative @var{fdf} and the initial guess +@var{x}. +@end deftypefun + +@deftypefun void gsl_multifit_fsolver_free (gsl_multifit_fsolver * @var{s}) +@deftypefunx void gsl_multifit_fdfsolver_free (gsl_multifit_fdfsolver * @var{s}) +These functions free all the memory associated with the solver @var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_multifit_fsolver_name (const gsl_multifit_fsolver * @var{s}) +@deftypefunx {const char *} gsl_multifit_fdfsolver_name (const gsl_multifit_fdfsolver * @var{s}) +These functions return a pointer to the name of the solver. For example, + +@example +printf ("s is a '%s' solver\n", + gsl_multifit_fdfsolver_name (s)); +@end example + +@noindent +would print something like @code{s is a 'lmder' solver}. +@end deftypefun + +@node Providing the Function to be Minimized +@section Providing the Function to be Minimized + +You must provide @math{n} functions of @math{p} variables for the +minimization algorithms to operate on. In order to allow for +arbitrary parameters the functions are defined by the following data +types: + +@deftp {Data Type} gsl_multifit_function +This data type defines a general system of functions with arbitrary parameters. + +@table @code +@item int (* f) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}) +this function should store the vector result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} in @var{f} for argument @var{x} and arbitrary parameters @var{params}, +returning an appropriate error code if the function cannot be computed. + +@item size_t n +the number of functions, i.e. the number of components of the +vector @var{f}. + +@item size_t p +the number of independent variables, i.e. the number of components of +the vector @var{x}. + +@item void * params +a pointer to the arbitrary parameters of the function. +@end table +@end deftp + +@deftp {Data Type} gsl_multifit_function_fdf +This data type defines a general system of functions with arbitrary parameters and +the corresponding Jacobian matrix of derivatives, + +@table @code +@item int (* f) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}) +this function should store the vector result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} in @var{f} for argument @var{x} and arbitrary parameters @var{params}, +returning an appropriate error code if the function cannot be computed. + +@item int (* df) (const gsl_vector * @var{x}, void * @var{params}, gsl_matrix * @var{J}) +this function should store the @var{n}-by-@var{p} matrix result +@c{$J_{ij} = \partial f_i(x,\hbox{\it params}) / \partial x_j$} +@math{J_ij = d f_i(x,params) / d x_j} in @var{J} for argument @var{x} +and arbitrary parameters @var{params}, returning an appropriate error code if the +function cannot be computed. + +@item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) +This function should set the values of the @var{f} and @var{J} as above, +for arguments @var{x} and arbitrary parameters @var{params}. This function +provides an optimization of the separate functions for @math{f(x)} and +@math{J(x)}---it is always faster to compute the function and its +derivative at the same time. + +@item size_t n +the number of functions, i.e. the number of components of the +vector @var{f}. + +@item size_t p +the number of independent variables, i.e. the number of components of +the vector @var{x}. + +@item void * params +a pointer to the arbitrary parameters of the function. +@end table +@end deftp + +Note that when fitting a non-linear model against experimental data, +the data is passed to the functions above using the +@var{params} argument and the trial best-fit parameters through the +@var{x} argument. + +@node Iteration of the Minimization Algorithm +@section Iteration + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + +@deftypefun int gsl_multifit_fsolver_iterate (gsl_multifit_fsolver * @var{s}) +@deftypefunx int gsl_multifit_fdfsolver_iterate (gsl_multifit_fdfsolver * @var{s}) +These functions perform a single iteration of the solver @var{s}. If +the iteration encounters an unexpected problem then an error code will +be returned. The solver maintains a current estimate of the best-fit +parameters at all times. +@end deftypefun + +The solver struct @var{s} contains the following entries, which can +be used to track the progress of the solution: + +@table @code +@item gsl_vector * x +The current position. + +@item gsl_vector * f +The function value at the current position. + +@item gsl_vector * dx +The difference between the current position and the previous position, +i.e. the last step, taken as a vector. + +@item gsl_matrix * J +The Jacobian matrix at the current position (for the +@code{gsl_multifit_fdfsolver} struct only) +@end table + +The best-fit information also can be accessed with the following +auxiliary functions, + +@deftypefun {gsl_vector *} gsl_multifit_fsolver_position (const gsl_multifit_fsolver * @var{s}) +@deftypefunx {gsl_vector *} gsl_multifit_fdfsolver_position (const gsl_multifit_fdfsolver * @var{s}) +These functions return the current position (i.e. best-fit parameters) +@code{s->x} of the solver @var{s}. +@end deftypefun + +@node Search Stopping Parameters for Minimization Algorithms +@section Search Stopping Parameters +@cindex nonlinear fitting, stopping parameters + +A minimization procedure should stop when one of the following conditions is +true: + +@itemize @bullet +@item +A minimum has been found to within the user-specified precision. + +@item +A user-specified maximum number of iterations has been reached. + +@item +An error has occurred. +@end itemize + +@noindent +The handling of these conditions is under user control. The functions +below allow the user to test the current estimate of the best-fit +parameters in several standard ways. + +@deftypefun int gsl_multifit_test_delta (const gsl_vector * @var{dx}, const gsl_vector * @var{x}, double @var{epsabs}, double @var{epsrel}) + +This function tests for the convergence of the sequence by comparing the +last step @var{dx} with the absolute error @var{epsabs} and relative +error @var{epsrel} to the current position @var{x}. The test returns +@code{GSL_SUCCESS} if the following condition is achieved, +@tex +\beforedisplay +$$ +|dx_i| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, |x_i| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|dx_i| < epsabs + epsrel |x_i| +@end example + +@end ifinfo +@noindent +for each component of @var{x} and returns @code{GSL_CONTINUE} otherwise. +@end deftypefun + +@cindex residual, in nonlinear systems of equations +@deftypefun int gsl_multifit_test_gradient (const gsl_vector * @var{g}, double @var{epsabs}) +This function tests the residual gradient @var{g} against the absolute +error bound @var{epsabs}. Mathematically, the gradient should be +exactly zero at the minimum. The test returns @code{GSL_SUCCESS} if the +following condition is achieved, +@tex +\beforedisplay +$$ +\sum_i |g_i| < \hbox{\it epsabs} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\sum_i |g_i| < epsabs +@end example + +@end ifinfo +@noindent +and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable +for situations where the precise location of the minimum, @math{x}, +is unimportant provided a value can be found where the gradient is small +enough. +@end deftypefun + + +@deftypefun int gsl_multifit_gradient (const gsl_matrix * @var{J}, const gsl_vector * @var{f}, gsl_vector * @var{g}) +This function computes the gradient @var{g} of @math{\Phi(x) = (1/2) +||F(x)||^2} from the Jacobian matrix @math{J} and the function values +@var{f}, using the formula @math{g = J^T f}. +@end deftypefun + +@node Minimization Algorithms using Derivatives +@section Minimization Algorithms using Derivatives + +The minimization algorithms described in this section make use of both +the function and its derivative. They require an initial guess for the +location of the minimum. There is no absolute guarantee of +convergence---the function must be suitable for this technique and the +initial guess must be sufficiently close to the minimum for it to work. + +@comment ============================================================ +@cindex Levenberg-Marquardt algorithms +@deffn {Derivative Solver} gsl_multifit_fdfsolver_lmsder +@cindex LMDER algorithm +@cindex MINPACK, minimization algorithms +This is a robust and efficient version of the Levenberg-Marquardt +algorithm as implemented in the scaled @sc{lmder} routine in +@sc{minpack}. Minpack was written by Jorge J. Mor@'e, Burton S. Garbow +and Kenneth E. Hillstrom. + +The algorithm uses a generalized trust region to keep each step under +control. In order to be accepted a proposed new position @math{x'} must +satisfy the condition @math{|D (x' - x)| < \delta}, where @math{D} is a +diagonal scaling matrix and @math{\delta} is the size of the trust +region. The components of @math{D} are computed internally, using the +column norms of the Jacobian to estimate the sensitivity of the residual +to each component of @math{x}. This improves the behavior of the +algorithm for badly scaled functions. + +On each iteration the algorithm attempts to minimize the linear system +@math{|F + J p|} subject to the constraint @math{|D p| < \Delta}. The +solution to this constrained linear system is found using the +Levenberg-Marquardt method. + +The proposed step is now tested by evaluating the function at the +resulting point, @math{x'}. If the step reduces the norm of the +function sufficiently, and follows the predicted behavior of the +function within the trust region, then it is accepted and the size of the +trust region is increased. If the proposed step fails to improve the +solution, or differs significantly from the expected behavior within +the trust region, then the size of the trust region is decreased and +another trial step is computed. + +The algorithm also monitors the progress of the solution and returns an +error if the changes in the solution are smaller than the machine +precision. The possible error codes are, + +@table @code +@item GSL_ETOLF +the decrease in the function falls below machine precision + +@item GSL_ETOLX +the change in the position vector falls below machine precision + +@item GSL_ETOLG +the norm of the gradient, relative to the norm of the function, falls +below machine precision + +@item GSL_ENOPROG +the routine has made 10 or more attempts to find a suitable trial step +without success (but subsequent calls can be made to continue the +search).@footnote{The return code @code{GSL_CONTINUE} was used for +this case in versions prior to 1.14.} +@end table + +@noindent +These error codes indicate that further iterations will be unlikely to +change the solution from its current value. +@end deffn + +@deffn {Derivative Solver} gsl_multifit_fdfsolver_lmder +This is an unscaled version of the @sc{lmder} algorithm. The elements of the +diagonal scaling matrix @math{D} are set to 1. This algorithm may be +useful in circumstances where the scaled version of @sc{lmder} converges too +slowly, or the function is already scaled appropriately. +@end deffn + +@node Minimization Algorithms without Derivatives +@section Minimization Algorithms without Derivatives + +There are no algorithms implemented in this section at the moment. + +@node Computing the covariance matrix of best fit parameters +@section Computing the covariance matrix of best fit parameters +@cindex best-fit parameters, covariance +@cindex least squares, covariance of best-fit parameters +@cindex covariance matrix, nonlinear fits + +@deftypefun int gsl_multifit_covar (const gsl_matrix * @var{J}, double @var{epsrel}, gsl_matrix * @var{covar}) +This function uses the Jacobian matrix @var{J} to compute the covariance +matrix of the best-fit parameters, @var{covar}. The parameter +@var{epsrel} is used to remove linear-dependent columns when @var{J} is +rank deficient. + +The covariance matrix is given by, +@tex +\beforedisplay +$$ +C = (J^T J)^{-1} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +covar = (J^T J)^@{-1@} +@end example + +@end ifinfo +@noindent +and is computed by QR decomposition of J with column-pivoting. Any +columns of @math{R} which satisfy +@tex +\beforedisplay +$$ +|R_{kk}| \leq epsrel |R_{11}| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|R_@{kk@}| <= epsrel |R_@{11@}| +@end example + +@end ifinfo +@noindent +are considered linearly-dependent and are excluded from the covariance +matrix (the corresponding rows and columns of the covariance matrix are +set to zero). + +If the minimisation uses the weighted least-squares function +@math{f_i = (Y(x, t_i) - y_i) / \sigma_i} then the covariance +matrix above gives the statistical error on the best-fit parameters +resulting from the Gaussian errors @math{\sigma_i} on +the underlying data @math{y_i}. This can be verified from the relation +@math{\delta f = J \delta c} and the fact that the fluctuations in @math{f} +from the data @math{y_i} are normalised by @math{\sigma_i} and +so satisfy @c{$\langle \delta f \delta f^T \rangle = I$} +@math{<\delta f \delta f^T> = I}. + +For an unweighted least-squares function @math{f_i = (Y(x, t_i) - +y_i)} the covariance matrix above should be multiplied by the variance +of the residuals about the best-fit @math{\sigma^2 = \sum (y_i - Y(x,t_i))^2 / (n-p)} +to give the variance-covariance +matrix @math{\sigma^2 C}. This estimates the statistical error on the +best-fit parameters from the scatter of the underlying data. + +For more information about covariance matrices see @ref{Fitting Overview}. +@end deftypefun + +@comment ============================================================ + +@node Example programs for Nonlinear Least-Squares Fitting +@section Examples + +The following example program fits a weighted exponential model with +background to experimental data, @math{Y = A \exp(-\lambda t) + b}. The +first part of the program sets up the functions @code{expb_f} and +@code{expb_df} to calculate the model and its Jacobian. The appropriate +fitting function is given by, +@tex +\beforedisplay +$$ +f_i = ((A \exp(-\lambda t_i) + b) - y_i)/\sigma_i +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f_i = ((A \exp(-\lambda t_i) + b) - y_i)/\sigma_i +@end example + +@end ifinfo +@noindent +where we have chosen @math{t_i = i}. The Jacobian matrix @math{J} is +the derivative of these functions with respect to the three parameters +(@math{A}, @math{\lambda}, @math{b}). It is given by, +@tex +\beforedisplay +$$ +J_{ij} = {\partial f_i \over \partial x_j} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +J_@{ij@} = d f_i / d x_j +@end example + +@end ifinfo +@noindent +where @math{x_0 = A}, @math{x_1 = \lambda} and @math{x_2 = b}. + +@example +@verbatiminclude examples/expfit.c +@end example + +@noindent +The main part of the program sets up a Levenberg-Marquardt solver and +some simulated random data. The data uses the known parameters +(1.0,5.0,0.1) combined with Gaussian noise (standard deviation = 0.1) +over a range of 40 timesteps. The initial guess for the parameters is +chosen as (0.0, 1.0, 0.0). + +@example +@verbatiminclude examples/nlfit.c +@end example + +@noindent +The iteration terminates when the change in x is smaller than 0.0001, as +both an absolute and relative change. Here are the results of running +the program: + +@smallexample +iter: 0 x=1.00000000 0.00000000 0.00000000 |f(x)|=117.349 +status=success +iter: 1 x=1.64659312 0.01814772 0.64659312 |f(x)|=76.4578 +status=success +iter: 2 x=2.85876037 0.08092095 1.44796363 |f(x)|=37.6838 +status=success +iter: 3 x=4.94899512 0.11942928 1.09457665 |f(x)|=9.58079 +status=success +iter: 4 x=5.02175572 0.10287787 1.03388354 |f(x)|=5.63049 +status=success +iter: 5 x=5.04520433 0.10405523 1.01941607 |f(x)|=5.44398 +status=success +iter: 6 x=5.04535782 0.10404906 1.01924871 |f(x)|=5.44397 +chisq/dof = 0.800996 +A = 5.04536 +/- 0.06028 +lambda = 0.10405 +/- 0.00316 +b = 1.01925 +/- 0.03782 +status = success +@end smallexample + +@noindent +The approximate values of the parameters are found correctly, and the +chi-squared value indicates a good fit (the chi-squared per degree of +freedom is approximately 1). In this case the errors on the parameters +can be estimated from the square roots of the diagonal elements of the +covariance matrix. + +If the chi-squared value shows a poor fit (i.e. @c{$\chi^2/(n-p) \gg 1$} +@math{chi^2/dof >> 1}) then the error estimates obtained from the +covariance matrix will be too small. In the example program the error estimates +are multiplied by @c{$\sqrt{\chi^2/(n-p)}$} +@math{\sqrt@{\chi^2/dof@}} in this case, a common way of increasing the +errors for a poor fit. Note that a poor fit will result from the use +an inappropriate model, and the scaled error estimates may then +be outside the range of validity for Gaussian errors. + +@iftex +@sp 1 +@center @image{fit-exp,3.4in} +@end iftex + +@node References and Further Reading for Nonlinear Least-Squares Fitting +@section References and Further Reading + +The @sc{minpack} algorithm is described in the following article, + +@itemize @w{} +@item +J.J. Mor@'e, @cite{The Levenberg-Marquardt Algorithm: Implementation and +Theory}, Lecture Notes in Mathematics, v630 (1978), ed G. Watson. +@end itemize + +@noindent +The following paper is also relevant to the algorithms described in this +section, + +@itemize @w{} +@item +J.J. Mor@'e, B.S. Garbow, K.E. Hillstrom, ``Testing Unconstrained +Optimization Software'', ACM Transactions on Mathematical Software, Vol +7, No 1 (1981), p 17--41. +@end itemize + diff --git a/software/gsl-1.15/doc/multimin.eps b/software/gsl-1.15/doc/multimin.eps new file mode 100644 index 000000000..9db303498 --- /dev/null +++ b/software/gsl-1.15/doc/multimin.eps @@ -0,0 +1,778 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: minplot.eps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Thu Oct 25 17:40:53 2001 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 301 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +252 280 M +63 0 V +4724 0 R +-63 0 V +168 280 M +(0) Rshow +252 854 M +63 0 V +4724 0 R +-63 0 V +168 854 M +(1) Rshow +252 1428 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(2) Rshow +252 2002 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(3) Rshow +252 2576 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(4) Rshow +252 3150 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(5) Rshow +252 3724 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(6) Rshow +252 4298 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(7) Rshow +252 4872 M +63 0 V +4724 0 R +-63 0 V +-4808 0 R +(8) Rshow +252 280 M +0 63 V +0 4529 R +0 -63 V +252 140 M +(0) Cshow +850 280 M +0 63 V +0 4529 R +0 -63 V +850 140 M +(1) Cshow +1449 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(2) Cshow +2047 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(3) Cshow +2646 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(4) Cshow +3244 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(5) Cshow +3842 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(6) Cshow +4441 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(7) Cshow +5039 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(8) Cshow +1.000 UL +LTb +252 280 M +4787 0 V +0 4592 V +-4787 0 V +252 280 L +1.000 UP +1.000 UL +LT0 +3242 4293 M +-5 -11 V +-9 -21 V +-17 -43 V +-36 -85 V +-71 -171 V +2962 3621 L +2677 2939 L +2108 1575 L +1958 1215 L +-395 76 V +772 1443 L +78 -15 V +3242 4293 Pls +3237 4282 Pls +3228 4261 Pls +3211 4218 Pls +3175 4133 Pls +3104 3962 Pls +2962 3621 Pls +2677 2939 Pls +2108 1575 Pls +1958 1215 Pls +1563 1291 Pls +772 1443 Pls +850 1428 Pls +1.000 UL +LT1 +1020 1817 M +-59 10 V +-59 5 V +-61 2 V +-60 -3 V +-60 -7 V +-58 -11 V +-56 -14 V +-54 -19 V +-51 -22 V +-47 -26 V +-44 -28 V +-38 -32 V +-34 -33 V +-29 -37 V +-23 -37 V +-18 -40 V +-11 -40 V +-6 -41 V +1 -41 V +7 -40 V +13 -40 V +18 -39 V +24 -38 V +30 -36 V +35 -33 V +40 -31 V +44 -28 V +48 -25 V +52 -21 V +54 -18 V +57 -14 V +58 -10 V +60 -6 V +60 -2 V +61 2 V +59 7 V +59 10 V +56 15 V +55 18 V +51 22 V +47 25 V +44 28 V +39 31 V +35 34 V +29 36 V +24 37 V +18 40 V +12 40 V +6 41 V +0 40 V +-6 41 V +-12 40 V +-18 40 V +-24 37 V +-29 36 V +-35 34 V +-39 31 V +-44 28 V +-47 25 V +-51 22 V +-55 18 V +-56 15 V +-59 10 V +-59 7 V +-61 2 V +-60 -2 V +-60 -6 V +-58 -10 V +-57 -14 V +-54 -18 V +-52 -21 V +-48 -25 V +-44 -28 V +-40 -31 V +-35 -33 V +-30 -36 V +-24 -38 V +-18 -39 V +-13 -40 V +-7 -40 V +-1 -41 V +6 -41 V +11 -40 V +18 -40 V +23 -37 V +29 -37 V +34 -33 V +38 -32 V +44 -28 V +47 -26 V +51 -22 V +54 -19 V +56 -14 V +58 -11 V +60 -7 V +60 -3 V +61 2 V +59 5 V +59 10 V +1.000 UL +LT2 +1096 1992 M +-85 14 V +-86 8 V +-88 2 V +-87 -4 V +-87 -10 V +-84 -15 V +-82 -22 V +-78 -27 V +-74 -32 V +-68 -37 V +-25 -16 V +0 -850 R +38 -24 V +70 -36 V +75 -31 V +79 -26 V +82 -20 V +85 -15 V +86 -8 V +88 -3 V +87 3 V +87 9 V +84 16 V +82 20 V +79 27 V +74 31 V +69 37 V +63 41 V +57 45 V +50 49 V +42 52 V +35 54 V +26 57 V +18 58 V +8 59 V +0 60 V +-8 59 V +-18 58 V +-26 57 V +-35 54 V +-42 52 V +-50 49 V +-57 45 V +-63 41 V +-69 37 V +-74 31 V +-79 27 V +-82 20 V +-84 16 V +-87 9 V +-87 3 V +-88 -3 V +-86 -8 V +-85 -15 V +-82 -20 V +-79 -26 V +-75 -31 V +-70 -36 V +-38 -24 V +0 -850 R +25 -16 V +68 -37 V +74 -32 V +78 -27 V +82 -22 V +84 -15 V +87 -10 V +87 -4 V +88 2 V +86 8 V +85 14 V +1.000 UL +LT3 +1202 2235 M +-121 20 V +-125 12 V +-125 3 V +-125 -6 V +583 2250 L +462 2227 L +345 2197 L +-93 -32 V +252 691 M +4 -2 V +368 652 L +486 623 L +608 603 L +732 590 L +125 -4 V +125 5 V +124 13 V +121 22 V +117 30 V +112 38 V +106 45 V +99 52 V +91 59 V +81 64 V +72 70 V +60 74 V +49 79 V +38 81 V +25 83 V +13 85 V +0 84 V +-13 85 V +-25 83 V +-38 81 V +-49 79 V +-60 74 V +-72 70 V +-81 64 V +-91 59 V +-99 52 V +-106 45 V +-112 38 V +-117 30 V +-121 22 V +-124 13 V +-125 5 V +-125 -4 V +608 2253 L +486 2233 L +368 2204 L +256 2167 L +-4 -2 V +252 691 M +93 -32 V +462 629 L +583 606 L +706 592 L +125 -6 V +125 3 V +125 12 V +121 20 V +1.000 UL +LT4 +1351 2576 M +-173 28 V +-177 17 V +-178 4 V +-178 -8 V +470 2597 L +298 2565 L +-46 -12 V +252 303 M +80 -19 V +21 -4 V +992 0 R +41 7 V +167 43 V +159 53 V +151 65 V +141 74 V +129 83 V +115 92 V +102 100 V +86 105 V +70 112 V +53 115 V +36 118 V +18 121 V +0 120 V +-18 121 V +-36 118 V +-53 115 V +-70 112 V +-86 105 V +-102 100 V +-115 92 V +-129 83 V +-141 74 V +-151 65 V +-159 53 V +-167 43 V +-173 31 V +-176 18 V +-178 7 V +-178 -5 V +505 2602 L +332 2572 L +-80 -19 V +252 303 M +46 -12 V +59 -11 V +994 0 R +1.000 UL +LT5 +1560 3056 M +-245 40 V +-251 24 V +-252 6 V +560 3114 L +310 3086 L +-58 -11 V +2693 280 M +140 112 V +144 140 V +122 151 V +100 157 V +75 164 V +51 168 V +25 170 V +0 172 V +-25 170 V +-51 168 V +-75 164 V +-100 157 V +-122 151 V +-144 140 V +-164 131 V +-183 118 V +-199 106 V +-214 91 V +-227 76 V +-236 60 V +-245 44 V +-249 26 V +-253 10 V +-252 -8 V +361 3093 L +252 3074 L +1.000 UL +LT6 +1855 3731 M +-348 57 V +-354 32 V +-357 9 V +439 3813 L +252 3792 L +3955 280 M +76 94 V +140 223 V +107 231 V +72 238 V +36 241 V +0 242 V +-36 241 V +-72 238 V +-107 231 V +-140 223 V +-173 212 V +-204 200 V +-232 184 V +-258 168 V +-282 148 V +-303 129 V +-320 108 V +-335 85 V +-346 62 V +-353 38 V +-356 13 V +512 3818 L +252 3792 L +1.000 UL +LT7 +2270 4684 M +-491 81 V +-501 46 V +-505 12 V +269 4801 L +-17 -2 V +5039 3282 M +-223 219 V +-328 260 V +-366 237 V +-399 211 V +-428 182 V +-453 152 V +-473 121 V +-489 87 V +-499 54 V +-505 19 V +371 4808 L +252 4796 L +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/multimin.texi b/software/gsl-1.15/doc/multimin.texi new file mode 100644 index 000000000..57ed457e6 --- /dev/null +++ b/software/gsl-1.15/doc/multimin.texi @@ -0,0 +1,597 @@ +@cindex minimization, multidimensional + +This chapter describes routines for finding minima of arbitrary +multidimensional functions. The library provides low level components +for a variety of iterative minimizers and convergence tests. These can +be combined by the user to achieve the desired solution, while providing +full access to the intermediate steps of the algorithms. Each class of +methods uses the same framework, so that you can switch between +minimizers at runtime without needing to recompile your program. Each +instance of a minimizer keeps track of its own state, allowing the +minimizers to be used in multi-threaded programs. The minimization +algorithms can be used to maximize a function by inverting its sign. + +The header file @file{gsl_multimin.h} contains prototypes for the +minimization functions and related declarations. + +@menu +* Multimin Overview:: +* Multimin Caveats:: +* Initializing the Multidimensional Minimizer:: +* Providing a function to minimize:: +* Multimin Iteration:: +* Multimin Stopping Criteria:: +* Multimin Algorithms with Derivatives:: +* Multimin Algorithms without Derivatives:: +* Multimin Examples:: +* Multimin References and Further Reading:: +@end menu + +@node Multimin Overview +@section Overview + +The problem of multidimensional minimization requires finding a point +@math{x} such that the scalar function, +@tex +\beforedisplay +$$ +f(x_1, \dots, x_n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(x_1, @dots{}, x_n) +@end example + +@end ifinfo +@noindent +takes a value which is lower than at any neighboring point. For smooth +functions the gradient @math{g = \nabla f} vanishes at the minimum. In +general there are no bracketing methods available for the +minimization of @math{n}-dimensional functions. The algorithms +proceed from an initial guess using a search algorithm which attempts +to move in a downhill direction. + +Algorithms making use of the gradient of the function perform a +one-dimensional line minimisation along this direction until the lowest +point is found to a suitable tolerance. The search direction is then +updated with local information from the function and its derivatives, +and the whole process repeated until the true @math{n}-dimensional +minimum is found. + +Algorithms which do not require the gradient of the function use +different strategies. For example, the Nelder-Mead Simplex algorithm +maintains @math{n+1} trial parameter vectors as the vertices of a +@math{n}-dimensional simplex. On each iteration it tries to improve +the worst vertex of the simplex by geometrical transformations. The +iterations are continued until the overall size of the simplex has +decreased sufficiently. + +Both types of algorithms use a standard framework. The user provides a +high-level driver for the algorithms, and the library provides the +individual functions necessary for each of the steps. There are three +main phases of the iteration. The steps are, + +@itemize @bullet +@item +initialize minimizer state, @var{s}, for algorithm @var{T} + +@item +update @var{s} using the iteration @var{T} + +@item +test @var{s} for convergence, and repeat iteration if necessary +@end itemize + +@noindent +Each iteration step consists either of an improvement to the +line-minimisation in the current direction or an update to the search +direction itself. The state for the minimizers is held in a +@code{gsl_multimin_fdfminimizer} struct or a +@code{gsl_multimin_fminimizer} struct. + +@node Multimin Caveats +@section Caveats +@cindex Multimin, caveats + +Note that the minimization algorithms can only search for one local +minimum at a time. When there are several local minima in the search +area, the first minimum to be found will be returned; however it is +difficult to predict which of the minima this will be. In most cases, +no error will be reported if you try to find a local minimum in an area +where there is more than one. + +It is also important to note that the minimization algorithms find local +minima; there is no way to determine whether a minimum is a global +minimum of the function in question. + +@node Initializing the Multidimensional Minimizer +@section Initializing the Multidimensional Minimizer +The following function initializes a multidimensional minimizer. The +minimizer itself depends only on the dimension of the problem and the +algorithm and can be reused for different problems. + +@deftypefun {gsl_multimin_fdfminimizer *} gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type * @var{T}, size_t @var{n}) +@deftypefunx {gsl_multimin_fminimizer *} gsl_multimin_fminimizer_alloc (const gsl_multimin_fminimizer_type * @var{T}, size_t @var{n}) +@tpindex gsl_multimin_fdfminimizer +@tpindex gsl_multimin_fminimizer +@tpindex gsl_multimin_fdfminimizer_type +@tpindex gsl_multimin_fminimizer_type +This function returns a pointer to a newly allocated instance of a +minimizer of type @var{T} for an @var{n}-dimension function. If there +is insufficient memory to create the minimizer then the function returns +a null pointer and the error handler is invoked with an error code of +@code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_multimin_fdfminimizer_set (gsl_multimin_fdfminimizer * @var{s}, gsl_multimin_function_fdf * @var{fdf}, const gsl_vector * @var{x}, double @var{step_size}, double @var{tol}) +This function initializes the minimizer @var{s} to minimize the function +@var{fdf} starting from the initial point @var{x}. The size of the +first trial step is given by @var{step_size}. The accuracy of the line +minimization is specified by @var{tol}. The precise meaning of this +parameter depends on the method used. Typically the line minimization +is considered successful if the gradient of the function @math{g} is +orthogonal to the current search direction @math{p} to a relative +accuracy of @var{tol}, where @c{$p\cdot g < tol |p| |g|$} +@math{dot(p,g) < tol |p| |g|}. A @var{tol} value of 0.1 is +suitable for most purposes, since line minimization only needs to +be carried out approximately. Note that setting @var{tol} to zero will +force the use of ``exact'' line-searches, which are extremely expensive. + +@deftypefunx int gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * @var{s}, gsl_multimin_function * @var{f}, const gsl_vector * @var{x}, const gsl_vector * @var{step_size}) +This function initializes the minimizer @var{s} to minimize the function +@var{f}, starting from the initial point +@var{x}. The size of the initial trial steps is given in vector +@var{step_size}. The precise meaning of this parameter depends on the +method used. +@end deftypefun + +@deftypefun void gsl_multimin_fdfminimizer_free (gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx void gsl_multimin_fminimizer_free (gsl_multimin_fminimizer * @var{s}) +This function frees all the memory associated with the minimizer +@var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_multimin_fdfminimizer_name (const gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx {const char *} gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * @var{s}) +This function returns a pointer to the name of the minimizer. For example, + +@example +printf ("s is a '%s' minimizer\n", + gsl_multimin_fdfminimizer_name (s)); +@end example + +@noindent +would print something like @code{s is a 'conjugate_pr' minimizer}. +@end deftypefun + +@node Providing a function to minimize +@section Providing a function to minimize + +You must provide a parametric function of @math{n} variables for the +minimizers to operate on. You may also need to provide a routine which +calculates the gradient of the function and a third routine which +calculates both the function value and the gradient together. In order +to allow for general parameters the functions are defined by the +following data types: + +@deftp {Data Type} gsl_multimin_function_fdf +This data type defines a general function of @math{n} variables with +parameters and the corresponding gradient vector of derivatives, + +@table @code +@item double (* f) (const gsl_vector * @var{x}, void * @var{params}) +this function should return the result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} for argument @var{x} and parameters @var{params}. +If the function cannot be computed, an error value of @code{GSL_NAN} +should be returned. + +@item void (* df) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{g}) +this function should store the @var{n}-dimensional gradient +@c{$g_i = \partial f(x,\hbox{\it params}) / \partial x_i$} +@math{g_i = d f(x,params) / d x_i} in the vector @var{g} for argument @var{x} +and parameters @var{params}, returning an appropriate error code if the +function cannot be computed. + +@item void (* fdf) (const gsl_vector * @var{x}, void * @var{params}, double * f, gsl_vector * @var{g}) +This function should set the values of the @var{f} and @var{g} as above, +for arguments @var{x} and parameters @var{params}. This function +provides an optimization of the separate functions for @math{f(x)} and +@math{g(x)}---it is always faster to compute the function and its +derivative at the same time. + +@item size_t n +the dimension of the system, i.e. the number of components of the +vectors @var{x}. + +@item void * params +a pointer to the parameters of the function. +@end table +@end deftp +@deftp {Data Type} gsl_multimin_function +This data type defines a general function of @math{n} variables with +parameters, + +@table @code +@item double (* f) (const gsl_vector * @var{x}, void * @var{params}) +this function should return the result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} for argument @var{x} and parameters @var{params}. +If the function cannot be computed, an error value of @code{GSL_NAN} +should be returned. + +@item size_t n +the dimension of the system, i.e. the number of components of the +vectors @var{x}. + +@item void * params +a pointer to the parameters of the function. +@end table +@end deftp + +@noindent +The following example function defines a simple two-dimensional +paraboloid with five parameters, + +@example +@verbatiminclude examples/multiminfn.c +@end example + +@noindent +The function can be initialized using the following code, + +@example +gsl_multimin_function_fdf my_func; + +/* Paraboloid center at (1,2), scale factors (10, 20), + minimum value 30 */ +double p[5] = @{ 1.0, 2.0, 10.0, 20.0, 30.0 @}; + +my_func.n = 2; /* number of function components */ +my_func.f = &my_f; +my_func.df = &my_df; +my_func.fdf = &my_fdf; +my_func.params = (void *)p; +@end example + +@node Multimin Iteration +@section Iteration + +The following function drives the iteration of each algorithm. The +function performs one iteration to update the state of the minimizer. +The same function works for all minimizers so that different methods can +be substituted at runtime without modifications to the code. + +@deftypefun int gsl_multimin_fdfminimizer_iterate (gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx int gsl_multimin_fminimizer_iterate (gsl_multimin_fminimizer * @var{s}) +These functions perform a single iteration of the minimizer @var{s}. +If the iteration encounters an unexpected problem then an error code +will be returned. The error code @code{GSL_ENOPROG} signifies that +the minimizer is unable to improve on its current estimate, either due +to numerical difficulty or because a genuine local minimum has been +reached. +@end deftypefun + +@noindent +The minimizer maintains a current best estimate of the minimum at all +times. This information can be accessed with the following auxiliary +functions, + +@deftypefun {gsl_vector *} gsl_multimin_fdfminimizer_x (const gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx {gsl_vector *} gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * @var{s}) +@deftypefunx double gsl_multimin_fdfminimizer_minimum (const gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx double gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * @var{s}) +@deftypefunx {gsl_vector *} gsl_multimin_fdfminimizer_gradient (const gsl_multimin_fdfminimizer * @var{s}) +@deftypefunx double gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * @var{s}) +These functions return the current best estimate of the location of the +minimum, the value of the function at that point, its gradient, +and minimizer specific characteristic size for the minimizer @var{s}. +@end deftypefun + +@deftypefun int gsl_multimin_fdfminimizer_restart (gsl_multimin_fdfminimizer * @var{s}) +This function resets the minimizer @var{s} to use the current point as a +new starting point. +@end deftypefun + +@node Multimin Stopping Criteria +@section Stopping Criteria + +A minimization procedure should stop when one of the following +conditions is true: + +@itemize @bullet +@item +A minimum has been found to within the user-specified precision. + +@item +A user-specified maximum number of iterations has been reached. + +@item +An error has occurred. +@end itemize + +@noindent +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result. + +@deftypefun int gsl_multimin_test_gradient (const gsl_vector * @var{g}, double @var{epsabs}) +This function tests the norm of the gradient @var{g} against the +absolute tolerance @var{epsabs}. The gradient of a multidimensional +function goes to zero at a minimum. The test returns @code{GSL_SUCCESS} +if the following condition is achieved, +@tex +\beforedisplay +$$ +|g| < \hbox{\it epsabs} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|g| < epsabs +@end example + +@end ifinfo +@noindent +and returns @code{GSL_CONTINUE} otherwise. A suitable choice of +@var{epsabs} can be made from the desired accuracy in the function for +small variations in @math{x}. The relationship between these quantities +is given by @c{$\delta{f} = g\,\delta{x}$} +@math{\delta f = g \delta x}. +@end deftypefun + +@deftypefun int gsl_multimin_test_size (const double @var{size}, double @var{epsabs}) +This function tests the minimizer specific characteristic +size (if applicable to the used minimizer) against absolute tolerance @var{epsabs}. +The test returns @code{GSL_SUCCESS} if the size is smaller than tolerance, +otherwise @code{GSL_CONTINUE} is returned. +@end deftypefun + +@node Multimin Algorithms with Derivatives +@section Algorithms with Derivatives + +There are several minimization methods available. The best choice of +algorithm depends on the problem. The algorithms described in this +section use the value of the function and its gradient at each +evaluation point. + +@deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_fr +@cindex Fletcher-Reeves conjugate gradient algorithm, minimization +@cindex Conjugate gradient algorithm, minimization +@cindex minimization, conjugate gradient algorithm +This is the Fletcher-Reeves conjugate gradient algorithm. The conjugate +gradient algorithm proceeds as a succession of line minimizations. The +sequence of search directions is used to build up an approximation to the +curvature of the function in the neighborhood of the minimum. + +An initial search direction @var{p} is chosen using the gradient, and line +minimization is carried out in that direction. The accuracy of the line +minimization is specified by the parameter @var{tol}. The minimum +along this line occurs when the function gradient @var{g} and the search direction +@var{p} are orthogonal. The line minimization terminates when +@c{$p\cdot g < tol |p| |g|$} +@math{dot(p,g) < tol |p| |g|}. The +search direction is updated using the Fletcher-Reeves formula +@math{p' = g' - \beta g} where @math{\beta=-|g'|^2/|g|^2}, and +the line minimization is then repeated for the new search +direction. +@end deffn + +@deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_pr +@cindex Polak-Ribiere algorithm, minimization +@cindex minimization, Polak-Ribiere algorithm +This is the Polak-Ribiere conjugate gradient algorithm. It is similar +to the Fletcher-Reeves method, differing only in the choice of the +coefficient @math{\beta}. Both methods work well when the evaluation +point is close enough to the minimum of the objective function that it +is well approximated by a quadratic hypersurface. +@end deffn + +@deffn {Minimizer} gsl_multimin_fdfminimizer_vector_bfgs2 +@deffnx {Minimizer} gsl_multimin_fdfminimizer_vector_bfgs +@cindex BFGS algorithm, minimization +@cindex minimization, BFGS algorithm +These methods use the vector Broyden-Fletcher-Goldfarb-Shanno (BFGS) +algorithm. This is a quasi-Newton method which builds up an approximation +to the second derivatives of the function @math{f} using the difference +between successive gradient vectors. By combining the first and second +derivatives the algorithm is able to take Newton-type steps towards the +function minimum, assuming quadratic behavior in that region. + +The @code{bfgs2} version of this minimizer is the most efficient +version available, and is a faithful implementation of the line +minimization scheme described in Fletcher's @cite{Practical Methods of +Optimization}, Algorithms 2.6.2 and 2.6.4. It supersedes the original +@code{bfgs} routine and requires substantially fewer function and +gradient evaluations. The user-supplied tolerance @var{tol} +corresponds to the parameter @math{\sigma} used by Fletcher. A value +of 0.1 is recommended for typical use (larger values correspond to +less accurate line searches). + +@end deffn + +@deffn {Minimizer} gsl_multimin_fdfminimizer_steepest_descent +@cindex steepest descent algorithm, minimization +@cindex minimization, steepest descent algorithm +The steepest descent algorithm follows the downhill gradient of the +function at each step. When a downhill step is successful the step-size +is increased by a factor of two. If the downhill step leads to a higher +function value then the algorithm backtracks and the step size is +decreased using the parameter @var{tol}. A suitable value of @var{tol} +for most applications is 0.1. The steepest descent method is +inefficient and is included only for demonstration purposes. +@end deffn + +@node Multimin Algorithms without Derivatives +@section Algorithms without Derivatives + +The algorithms described in this section use only the value of the function +at each evaluation point. + +@deffn {Minimizer} gsl_multimin_fminimizer_nmsimplex2 +@deffnx {Minimizer} gsl_multimin_fminimizer_nmsimplex +@cindex Nelder-Mead simplex algorithm for minimization +@cindex simplex algorithm, minimization +@cindex minimization, simplex algorithm +These methods use the Simplex algorithm of Nelder and Mead. +Starting from the initial vector @math{@var{x} = p_0}, the algorithm +constructs an additional @math{n} vectors @math{p_i} +using the step size vector @c{$s = \var{step\_size}$} +@math{s = @var{step_size}} as follows: +@tex +\beforedisplay +$$ +\eqalign{ +p_0 & = (x_0, x_1, \cdots , x_n) \cr +p_1 & = (x_0 + s_0, x_1, \cdots , x_n) \cr +p_2 & = (x_0, x_1 + s_1, \cdots , x_n) \cr +\dots &= \dots \cr +p_n & = (x_0, x_1, \cdots , x_n + s_n) \cr +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p_0 = (x_0, x_1, ... , x_n) +p_1 = (x_0 + s_0, x_1, ... , x_n) +p_2 = (x_0, x_1 + s_1, ... , x_n) +... = ... +p_n = (x_0, x_1, ... , x_n + s_n) +@end example + +@end ifinfo +@noindent +These vectors form the @math{n+1} vertices of a simplex in @math{n} +dimensions. On each iteration the algorithm uses simple geometrical +transformations to update the vector corresponding to the highest +function value. The geometric transformations are reflection, +reflection followed by expansion, contraction and multiple +contraction. Using these transformations the simplex moves through +the space towards the minimum, where it contracts itself. + +After each iteration, the best vertex is returned. Note, that due to +the nature of the algorithm not every step improves the current +best parameter vector. Usually several iterations are required. + +The minimizer-specific characteristic size is calculated as the +average distance from the geometrical center of the simplex to all its +vertices. This size can be used as a stopping criteria, as the +simplex contracts itself near the minimum. The size is returned by the +function @code{gsl_multimin_fminimizer_size}. + +The @code{nmsimplex2} version of this minimiser is a new @math{O(N)} operations +implementation of the earlier @math{O(N^2)} operations @code{nmsimplex} +minimiser. It uses the same underlying algorithm, but the simplex +updates are computed more efficiently for high-dimensional problems. +In addition, the size of simplex is calculated as the @sc{rms} +distance of each vertex from the center rather than the mean distance, +allowing a linear update of this quantity on each step. The memory usage is +@math{O(N^2)} for both algorithms. +@end deffn + +@deffn {Minimizer} gsl_multimin_fminimizer_nmsimplex2rand +This method is a variant of @code{nmsimplex2} which initialises the +simplex around the starting point @var{x} using a randomly-oriented +set of basis vectors instead of the fixed coordinate axes. The +final dimensions of the simplex are scaled along the coordinate axes by the +vector @var{step_size}. The randomisation uses a simple deterministic +generator so that repeated calls to @code{gsl_multimin_fminimizer_set} for +a given solver object will vary the orientation in a well-defined way. +@end deffn + +@node Multimin Examples +@section Examples + +This example program finds the minimum of the paraboloid function +defined earlier. The location of the minimum is offset from the origin +in @math{x} and @math{y}, and the function value at the minimum is +non-zero. The main program is given below, it requires the example +function given earlier in this chapter. + +@smallexample +@verbatiminclude examples/multimin.c +@end smallexample + +@noindent +The initial step-size is chosen as 0.01, a conservative estimate in this +case, and the line minimization parameter is set at 0.0001. The program +terminates when the norm of the gradient has been reduced below +0.001. The output of the program is shown below, + +@example +@verbatiminclude examples/multimin.out +@end example + +@noindent +Note that the algorithm gradually increases the step size as it +successfully moves downhill, as can be seen by plotting the successive +points. + +@iftex +@sp 1 +@center @image{multimin,3.4in} +@end iftex + +@noindent +The conjugate gradient algorithm finds the minimum on its second +direction because the function is purely quadratic. Additional +iterations would be needed for a more complicated function. + +Here is another example using the Nelder-Mead Simplex algorithm to +minimize the same example object function, as above. + +@smallexample +@verbatiminclude examples/nmsimplex.c +@end smallexample + +@noindent +The minimum search stops when the Simplex size drops to 0.01. The output is +shown below. + +@example +@verbatiminclude examples/nmsimplex.out +@end example + +@noindent +The simplex size first increases, while the simplex moves towards the +minimum. After a while the size begins to decrease as the simplex +contracts around the minimum. + +@node Multimin References and Further Reading +@section References and Further Reading + +The conjugate gradient and BFGS methods are described in detail in the +following book, + +@itemize @w{} +@item R. Fletcher, +@cite{Practical Methods of Optimization (Second Edition)} Wiley +(1987), ISBN 0471915475. +@end itemize + +A brief description of multidimensional minimization algorithms and +more recent references can be found in, + +@itemize @w{} +@item C.W. Ueberhuber, +@cite{Numerical Computation (Volume 2)}, Chapter 14, Section 4.4 +``Minimization Methods'', p.@: 325--335, Springer (1997), ISBN +3-540-62057-5. +@end itemize + +@noindent +The simplex algorithm is described in the following paper, + +@itemize @w{} +@item J.A. Nelder and R. Mead, +@cite{A simplex method for function minimization}, Computer Journal +vol.@: 7 (1965), 308--313. +@end itemize + +@noindent diff --git a/software/gsl-1.15/doc/multiroots.texi b/software/gsl-1.15/doc/multiroots.texi new file mode 100644 index 000000000..2521d4721 --- /dev/null +++ b/software/gsl-1.15/doc/multiroots.texi @@ -0,0 +1,1088 @@ +@cindex solving nonlinear systems of equations +@cindex nonlinear systems of equations, solution of +@cindex systems of equations, nonlinear + +This chapter describes functions for multidimensional root-finding +(solving nonlinear systems with @math{n} equations in @math{n} +unknowns). The library provides low level components for a variety of +iterative solvers and convergence tests. These can be combined by the +user to achieve the desired solution, with full access to the +intermediate steps of the iteration. Each class of methods uses the +same framework, so that you can switch between solvers at runtime +without needing to recompile your program. Each instance of a solver +keeps track of its own state, allowing the solvers to be used in +multi-threaded programs. The solvers are based on the original Fortran +library @sc{minpack}. + +The header file @file{gsl_multiroots.h} contains prototypes for the +multidimensional root finding functions and related declarations. + +@menu +* Overview of Multidimensional Root Finding:: +* Initializing the Multidimensional Solver:: +* Providing the multidimensional system of equations to solve:: +* Iteration of the multidimensional solver:: +* Search Stopping Parameters for the multidimensional solver:: +* Algorithms using Derivatives:: +* Algorithms without Derivatives:: +* Example programs for Multidimensional Root finding:: +* References and Further Reading for Multidimensional Root Finding:: +@end menu + +@node Overview of Multidimensional Root Finding +@section Overview +@cindex multidimensional root finding, overview + +The problem of multidimensional root finding requires the simultaneous +solution of @math{n} equations, @math{f_i}, in @math{n} variables, +@math{x_i}, +@tex +\beforedisplay +$$ +f_i (x_1, \dots, x_n) = 0 \qquad\hbox{for}~i = 1 \dots n. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f_i (x_1, ..., x_n) = 0 for i = 1 ... n. +@end example + +@end ifinfo +@noindent +In general there are no bracketing methods available for @math{n} +dimensional systems, and no way of knowing whether any solutions +exist. All algorithms proceed from an initial guess using a variant of +the Newton iteration, +@tex +\beforedisplay +$$ +x \to x' = x - J^{-1} f(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x -> x' = x - J^@{-1@} f(x) +@end example + +@end ifinfo +@noindent +where @math{x}, @math{f} are vector quantities and @math{J} is the +Jacobian matrix @c{$J_{ij} = \partial f_i / \partial x_j$} +@math{J_@{ij@} = d f_i / d x_j}. +Additional strategies can be used to enlarge the region of +convergence. These include requiring a decrease in the norm @math{|f|} on +each step proposed by Newton's method, or taking steepest-descent steps in +the direction of the negative gradient of @math{|f|}. + +Several root-finding algorithms are available within a single framework. +The user provides a high-level driver for the algorithms, and the +library provides the individual functions necessary for each of the +steps. There are three main phases of the iteration. The steps are, + +@itemize @bullet +@item +initialize solver state, @var{s}, for algorithm @var{T} + +@item +update @var{s} using the iteration @var{T} + +@item +test @var{s} for convergence, and repeat iteration if necessary +@end itemize + +@noindent +The evaluation of the Jacobian matrix can be problematic, either because +programming the derivatives is intractable or because computation of the +@math{n^2} terms of the matrix becomes too expensive. For these reasons +the algorithms provided by the library are divided into two classes according +to whether the derivatives are available or not. + +@cindex Jacobian matrix, root finding +The state for solvers with an analytic Jacobian matrix is held in a +@code{gsl_multiroot_fdfsolver} struct. The updating procedure requires +both the function and its derivatives to be supplied by the user. + +The state for solvers which do not use an analytic Jacobian matrix is +held in a @code{gsl_multiroot_fsolver} struct. The updating procedure +uses only function evaluations (not derivatives). The algorithms +estimate the matrix @math{J} or @c{$J^{-1}$} +@math{J^@{-1@}} by approximate methods. + +@node Initializing the Multidimensional Solver +@section Initializing the Solver + +The following functions initialize a multidimensional solver, either +with or without derivatives. The solver itself depends only on the +dimension of the problem and the algorithm and can be reused for +different problems. + +@deftypefun {gsl_multiroot_fsolver *} gsl_multiroot_fsolver_alloc (const gsl_multiroot_fsolver_type * @var{T}, size_t @var{n}) +@tpindex gsl_multiroot_fsolver +@tpindex gsl_multiroot_fsolver_type +This function returns a pointer to a newly allocated instance of a +solver of type @var{T} for a system of @var{n} dimensions. +For example, the following code creates an instance of a hybrid solver, +to solve a 3-dimensional system of equations. + +@example +const gsl_multiroot_fsolver_type * T + = gsl_multiroot_fsolver_hybrid; +gsl_multiroot_fsolver * s + = gsl_multiroot_fsolver_alloc (T, 3); +@end example + +@noindent +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun {gsl_multiroot_fdfsolver *} gsl_multiroot_fdfsolver_alloc (const gsl_multiroot_fdfsolver_type * @var{T}, size_t @var{n}) +@tpindex gsl_multiroot_fdfsolver +@tpindex gsl_multiroot_fdfsolver_type +This function returns a pointer to a newly allocated instance of a +derivative solver of type @var{T} for a system of @var{n} dimensions. +For example, the following code creates an instance of a Newton-Raphson solver, +for a 2-dimensional system of equations. + +@example +const gsl_multiroot_fdfsolver_type * T + = gsl_multiroot_fdfsolver_newton; +gsl_multiroot_fdfsolver * s = + gsl_multiroot_fdfsolver_alloc (T, 2); +@end example + +@noindent +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun int gsl_multiroot_fsolver_set (gsl_multiroot_fsolver * @var{s}, gsl_multiroot_function * @var{f}, const gsl_vector * @var{x}) +@deftypefunx int gsl_multiroot_fdfsolver_set (gsl_multiroot_fdfsolver * @var{s}, gsl_multiroot_function_fdf * @var{fdf}, const gsl_vector * @var{x}) +These functions set, or reset, an existing solver @var{s} to use the +function @var{f} or function and derivative @var{fdf}, and the initial +guess @var{x}. Note that the initial position is copied from @var{x}, this +argument is not modified by subsequent iterations. +@end deftypefun + +@deftypefun void gsl_multiroot_fsolver_free (gsl_multiroot_fsolver * @var{s}) +@deftypefunx void gsl_multiroot_fdfsolver_free (gsl_multiroot_fdfsolver * @var{s}) +These functions free all the memory associated with the solver @var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_multiroot_fsolver_name (const gsl_multiroot_fsolver * @var{s}) +@deftypefunx {const char *} gsl_multiroot_fdfsolver_name (const gsl_multiroot_fdfsolver * @var{s}) +These functions return a pointer to the name of the solver. For example, + +@example +printf ("s is a '%s' solver\n", + gsl_multiroot_fdfsolver_name (s)); +@end example + +@noindent +would print something like @code{s is a 'newton' solver}. +@end deftypefun + +@node Providing the multidimensional system of equations to solve +@section Providing the function to solve +@cindex multidimensional root finding, providing a function to solve + +You must provide @math{n} functions of @math{n} variables for the root +finders to operate on. In order to allow for general parameters the +functions are defined by the following data types: + +@deftp {Data Type} gsl_multiroot_function +This data type defines a general system of functions with parameters. + +@table @code +@item int (* f) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}) +this function should store the vector result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} in @var{f} for argument @var{x} and parameters @var{params}, +returning an appropriate error code if the function cannot be computed. + +@item size_t n +the dimension of the system, i.e. the number of components of the +vectors @var{x} and @var{f}. + +@item void * params +a pointer to the parameters of the function. +@end table +@end deftp + +@noindent +Here is an example using Powell's test function, +@tex +\beforedisplay +$$ +f_1(x) = A x_0 x_1 - 1, +f_2(x) = \exp(-x_0) + \exp(-x_1) - (1 + 1/A) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f_1(x) = A x_0 x_1 - 1, +f_2(x) = exp(-x_0) + exp(-x_1) - (1 + 1/A) +@end example + +@end ifinfo +@noindent +with @math{A = 10^4}. The following code defines a +@code{gsl_multiroot_function} system @code{F} which you could pass to a +solver: + +@example +struct powell_params @{ double A; @}; + +int +powell (gsl_vector * x, void * p, gsl_vector * f) @{ + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + + gsl_vector_set (f, 0, A * x0 * x1 - 1); + gsl_vector_set (f, 1, (exp(-x0) + exp(-x1) + - (1.0 + 1.0/A))); + return GSL_SUCCESS +@} + +gsl_multiroot_function F; +struct powell_params params = @{ 10000.0 @}; + +F.f = &powell; +F.n = 2; +F.params = ¶ms; +@end example + +@deftp {Data Type} gsl_multiroot_function_fdf +This data type defines a general system of functions with parameters and +the corresponding Jacobian matrix of derivatives, + +@table @code +@item int (* f) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}) +this function should store the vector result +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} in @var{f} for argument @var{x} and parameters @var{params}, +returning an appropriate error code if the function cannot be computed. + +@item int (* df) (const gsl_vector * @var{x}, void * @var{params}, gsl_matrix * @var{J}) +this function should store the @var{n}-by-@var{n} matrix result +@c{$J_{ij} = \partial f_i(x,\hbox{\it params}) / \partial x_j$} +@math{J_ij = d f_i(x,params) / d x_j} in @var{J} for argument @var{x} +and parameters @var{params}, returning an appropriate error code if the +function cannot be computed. + +@item int (* fdf) (const gsl_vector * @var{x}, void * @var{params}, gsl_vector * @var{f}, gsl_matrix * @var{J}) +This function should set the values of the @var{f} and @var{J} as above, +for arguments @var{x} and parameters @var{params}. This function +provides an optimization of the separate functions for @math{f(x)} and +@math{J(x)}---it is always faster to compute the function and its +derivative at the same time. + +@item size_t n +the dimension of the system, i.e. the number of components of the +vectors @var{x} and @var{f}. + +@item void * params +a pointer to the parameters of the function. +@end table +@end deftp + +@noindent +The example of Powell's test function defined above can be extended to +include analytic derivatives using the following code, + +@example +int +powell_df (gsl_vector * x, void * p, gsl_matrix * J) +@{ + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + gsl_matrix_set (J, 0, 0, A * x1); + gsl_matrix_set (J, 0, 1, A * x0); + gsl_matrix_set (J, 1, 0, -exp(-x0)); + gsl_matrix_set (J, 1, 1, -exp(-x1)); + return GSL_SUCCESS +@} + +int +powell_fdf (gsl_vector * x, void * p, + gsl_matrix * f, gsl_matrix * J) @{ + struct powell_params * params + = *(struct powell_params *)p; + const double A = (params->A); + const double x0 = gsl_vector_get(x,0); + const double x1 = gsl_vector_get(x,1); + + const double u0 = exp(-x0); + const double u1 = exp(-x1); + + gsl_vector_set (f, 0, A * x0 * x1 - 1); + gsl_vector_set (f, 1, u0 + u1 - (1 + 1/A)); + + gsl_matrix_set (J, 0, 0, A * x1); + gsl_matrix_set (J, 0, 1, A * x0); + gsl_matrix_set (J, 1, 0, -u0); + gsl_matrix_set (J, 1, 1, -u1); + return GSL_SUCCESS +@} + +gsl_multiroot_function_fdf FDF; + +FDF.f = &powell_f; +FDF.df = &powell_df; +FDF.fdf = &powell_fdf; +FDF.n = 2; +FDF.params = 0; +@end example + +@noindent +Note that the function @code{powell_fdf} is able to reuse existing terms +from the function when calculating the Jacobian, thus saving time. + +@node Iteration of the multidimensional solver +@section Iteration + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + +@deftypefun int gsl_multiroot_fsolver_iterate (gsl_multiroot_fsolver * @var{s}) +@deftypefunx int gsl_multiroot_fdfsolver_iterate (gsl_multiroot_fdfsolver * @var{s}) +These functions perform a single iteration of the solver @var{s}. If the +iteration encounters an unexpected problem then an error code will be +returned, + +@table @code +@item GSL_EBADFUNC +the iteration encountered a singular point where the function or its +derivative evaluated to @code{Inf} or @code{NaN}. + +@item GSL_ENOPROG +the iteration is not making any progress, preventing the algorithm from +continuing. +@end table +@end deftypefun + +The solver maintains a current best estimate of the root @code{s->x} +and its function value @code{s->f} at all times. This information can +be accessed with the following auxiliary functions, + +@deftypefun {gsl_vector *} gsl_multiroot_fsolver_root (const gsl_multiroot_fsolver * @var{s}) +@deftypefunx {gsl_vector *} gsl_multiroot_fdfsolver_root (const gsl_multiroot_fdfsolver * @var{s}) +These functions return the current estimate of the root for the solver @var{s}, given by @code{s->x}. +@end deftypefun + +@deftypefun {gsl_vector *} gsl_multiroot_fsolver_f (const gsl_multiroot_fsolver * @var{s}) +@deftypefunx {gsl_vector *} gsl_multiroot_fdfsolver_f (const gsl_multiroot_fdfsolver * @var{s}) +These functions return the function value @math{f(x)} at the current +estimate of the root for the solver @var{s}, given by @code{s->f}. +@end deftypefun + +@deftypefun {gsl_vector *} gsl_multiroot_fsolver_dx (const gsl_multiroot_fsolver * @var{s}) +@deftypefunx {gsl_vector *} gsl_multiroot_fdfsolver_dx (const gsl_multiroot_fdfsolver * @var{s}) +These functions return the last step @math{dx} taken by the solver +@var{s}, given by @code{s->dx}. +@end deftypefun + +@node Search Stopping Parameters for the multidimensional solver +@section Search Stopping Parameters +@cindex root finding, stopping parameters + +A root finding procedure should stop when one of the following conditions is +true: + +@itemize @bullet +@item +A multidimensional root has been found to within the user-specified precision. + +@item +A user-specified maximum number of iterations has been reached. + +@item +An error has occurred. +@end itemize + +@noindent +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result in +several standard ways. + +@deftypefun int gsl_multiroot_test_delta (const gsl_vector * @var{dx}, const gsl_vector * @var{x}, double @var{epsabs}, double @var{epsrel}) + +This function tests for the convergence of the sequence by comparing the +last step @var{dx} with the absolute error @var{epsabs} and relative +error @var{epsrel} to the current position @var{x}. The test returns +@code{GSL_SUCCESS} if the following condition is achieved, +@tex +\beforedisplay +$$ +|dx_i| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, |x_i| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|dx_i| < epsabs + epsrel |x_i| +@end example + +@end ifinfo +@noindent +for each component of @var{x} and returns @code{GSL_CONTINUE} otherwise. +@end deftypefun + +@cindex residual, in nonlinear systems of equations +@deftypefun int gsl_multiroot_test_residual (const gsl_vector * @var{f}, double @var{epsabs}) +This function tests the residual value @var{f} against the absolute +error bound @var{epsabs}. The test returns @code{GSL_SUCCESS} if the +following condition is achieved, +@tex +\beforedisplay +$$ +\sum_i |f_i| < \hbox{\it epsabs} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\sum_i |f_i| < epsabs +@end example + +@end ifinfo +@noindent +and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable +for situations where the precise location of the root, @math{x}, is +unimportant provided a value can be found where the residual is small +enough. +@end deftypefun + +@comment ============================================================ + +@node Algorithms using Derivatives +@section Algorithms using Derivatives + +The root finding algorithms described in this section make use of both +the function and its derivative. They require an initial guess for the +location of the root, but there is no absolute guarantee of +convergence---the function must be suitable for this technique and the +initial guess must be sufficiently close to the root for it to work. +When the conditions are satisfied then convergence is quadratic. + + +@comment ============================================================ +@cindex HYBRID algorithms for nonlinear systems +@deffn {Derivative Solver} gsl_multiroot_fdfsolver_hybridsj +@cindex HYBRIDSJ algorithm +@cindex MINPACK, minimization algorithms +This is a modified version of Powell's Hybrid method as implemented in +the @sc{hybrj} algorithm in @sc{minpack}. Minpack was written by Jorge +J. Mor@'e, Burton S. Garbow and Kenneth E. Hillstrom. The Hybrid +algorithm retains the fast convergence of Newton's method but will also +reduce the residual when Newton's method is unreliable. + +The algorithm uses a generalized trust region to keep each step under +control. In order to be accepted a proposed new position @math{x'} must +satisfy the condition @math{|D (x' - x)| < \delta}, where @math{D} is a +diagonal scaling matrix and @math{\delta} is the size of the trust +region. The components of @math{D} are computed internally, using the +column norms of the Jacobian to estimate the sensitivity of the residual +to each component of @math{x}. This improves the behavior of the +algorithm for badly scaled functions. + +On each iteration the algorithm first determines the standard Newton +step by solving the system @math{J dx = - f}. If this step falls inside +the trust region it is used as a trial step in the next stage. If not, +the algorithm uses the linear combination of the Newton and gradient +directions which is predicted to minimize the norm of the function while +staying inside the trust region, +@tex +\beforedisplay +$$ +dx = - \alpha J^{-1} f(x) - \beta \nabla |f(x)|^2. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +dx = - \alpha J^@{-1@} f(x) - \beta \nabla |f(x)|^2. +@end example + +@end ifinfo +@noindent +This combination of Newton and gradient directions is referred to as a +@dfn{dogleg step}. + +The proposed step is now tested by evaluating the function at the +resulting point, @math{x'}. If the step reduces the norm of the function +sufficiently then it is accepted and size of the trust region is +increased. If the proposed step fails to improve the solution then the +size of the trust region is decreased and another trial step is +computed. + +The speed of the algorithm is increased by computing the changes to the +Jacobian approximately, using a rank-1 update. If two successive +attempts fail to reduce the residual then the full Jacobian is +recomputed. The algorithm also monitors the progress of the solution +and returns an error if several steps fail to make any improvement, + +@table @code +@item GSL_ENOPROG +the iteration is not making any progress, preventing the algorithm from +continuing. + +@item GSL_ENOPROGJ +re-evaluations of the Jacobian indicate that the iteration is not +making any progress, preventing the algorithm from continuing. +@end table + +@end deffn + +@deffn {Derivative Solver} gsl_multiroot_fdfsolver_hybridj +@cindex HYBRIDJ algorithm +This algorithm is an unscaled version of @code{hybridsj}. The steps are +controlled by a spherical trust region @math{|x' - x| < \delta}, instead +of a generalized region. This can be useful if the generalized region +estimated by @code{hybridsj} is inappropriate. +@end deffn + + +@deffn {Derivative Solver} gsl_multiroot_fdfsolver_newton +@cindex Newton's method for systems of nonlinear equations + +Newton's Method is the standard root-polishing algorithm. The algorithm +begins with an initial guess for the location of the solution. On each +iteration a linear approximation to the function @math{F} is used to +estimate the step which will zero all the components of the residual. +The iteration is defined by the following sequence, +@tex +\beforedisplay +$$ +x \to x' = x - J^{-1} f(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x -> x' = x - J^@{-1@} f(x) +@end example + +@end ifinfo +@noindent +where the Jacobian matrix @math{J} is computed from the derivative +functions provided by @var{f}. The step @math{dx} is obtained by solving +the linear system, +@tex +\beforedisplay +$$ +J \,dx = - f(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +J dx = - f(x) +@end example + +@end ifinfo +@noindent +using LU decomposition. If the Jacobian matrix is singular, an error +code of @code{GSL_EDOM} is returned. +@end deffn + +@comment ============================================================ + +@deffn {Derivative Solver} gsl_multiroot_fdfsolver_gnewton +@cindex Modified Newton's method for nonlinear systems +@cindex Newton algorithm, globally convergent +This is a modified version of Newton's method which attempts to improve +global convergence by requiring every step to reduce the Euclidean norm +of the residual, @math{|f(x)|}. If the Newton step leads to an increase +in the norm then a reduced step of relative size, +@tex +\beforedisplay +$$ +t = (\sqrt{1 + 6 r} - 1) / (3 r) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +t = (\sqrt(1 + 6 r) - 1) / (3 r) +@end example + +@end ifinfo +@noindent +is proposed, with @math{r} being the ratio of norms +@math{|f(x')|^2/|f(x)|^2}. This procedure is repeated until a suitable step +size is found. +@end deffn + +@comment ============================================================ + +@node Algorithms without Derivatives +@section Algorithms without Derivatives + +The algorithms described in this section do not require any derivative +information to be supplied by the user. Any derivatives needed are +approximated by finite differences. Note that if the +finite-differencing step size chosen by these routines is inappropriate, +an explicit user-supplied numerical derivative can always be used with +the algorithms described in the previous section. + +@deffn {Solver} gsl_multiroot_fsolver_hybrids +@cindex HYBRIDS algorithm, scaled without derivatives +This is a version of the Hybrid algorithm which replaces calls to the +Jacobian function by its finite difference approximation. The finite +difference approximation is computed using @code{gsl_multiroots_fdjac} +with a relative step size of @code{GSL_SQRT_DBL_EPSILON}. Note that +this step size will not be suitable for all problems. +@end deffn + +@deffn {Solver} gsl_multiroot_fsolver_hybrid +@cindex HYBRID algorithm, unscaled without derivatives +This is a finite difference version of the Hybrid algorithm without +internal scaling. +@end deffn + +@comment ============================================================ + +@deffn {Solver} gsl_multiroot_fsolver_dnewton + +@cindex Discrete Newton algorithm for multidimensional roots +@cindex Newton algorithm, discrete + +The @dfn{discrete Newton algorithm} is the simplest method of solving a +multidimensional system. It uses the Newton iteration +@tex +\beforedisplay +$$ +x \to x - J^{-1} f(x) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x -> x - J^@{-1@} f(x) +@end example + +@end ifinfo +@noindent +where the Jacobian matrix @math{J} is approximated by taking finite +differences of the function @var{f}. The approximation scheme used by +this implementation is, +@tex +\beforedisplay +$$ +J_{ij} = (f_i(x + \delta_j) - f_i(x)) / \delta_j +$$ +\afterdisplay +@end tex +@ifinfo + +@example +J_@{ij@} = (f_i(x + \delta_j) - f_i(x)) / \delta_j +@end example + +@end ifinfo +@noindent +where @math{\delta_j} is a step of size @math{\sqrt\epsilon |x_j|} with +@math{\epsilon} being the machine precision +(@c{$\epsilon \approx 2.22 \times 10^{-16}$} +@math{\epsilon \approx 2.22 \times 10^-16}). +The order of convergence of Newton's algorithm is quadratic, but the +finite differences require @math{n^2} function evaluations on each +iteration. The algorithm may become unstable if the finite differences +are not a good approximation to the true derivatives. +@end deffn + +@comment ============================================================ + +@deffn {Solver} gsl_multiroot_fsolver_broyden +@cindex Broyden algorithm for multidimensional roots +@cindex multidimensional root finding, Broyden algorithm + +The @dfn{Broyden algorithm} is a version of the discrete Newton +algorithm which attempts to avoids the expensive update of the Jacobian +matrix on each iteration. The changes to the Jacobian are also +approximated, using a rank-1 update, +@tex +\beforedisplay +$$ +J^{-1} \to J^{-1} - (J^{-1} df - dx) dx^T J^{-1} / dx^T J^{-1} df +$$ +\afterdisplay +@end tex +@ifinfo + +@example +J^@{-1@} \to J^@{-1@} - (J^@{-1@} df - dx) dx^T J^@{-1@} / dx^T J^@{-1@} df +@end example + +@end ifinfo +@noindent +where the vectors @math{dx} and @math{df} are the changes in @math{x} +and @math{f}. On the first iteration the inverse Jacobian is estimated +using finite differences, as in the discrete Newton algorithm. + +This approximation gives a fast update but is unreliable if the changes +are not small, and the estimate of the inverse Jacobian becomes worse as +time passes. The algorithm has a tendency to become unstable unless it +starts close to the root. The Jacobian is refreshed if this instability +is detected (consult the source for details). + +This algorithm is included only for demonstration purposes, and is not +recommended for serious use. +@end deffn + +@comment ============================================================ + + +@node Example programs for Multidimensional Root finding +@section Examples + +The multidimensional solvers are used in a similar way to the +one-dimensional root finding algorithms. This first example +demonstrates the @code{hybrids} scaled-hybrid algorithm, which does not +require derivatives. The program solves the Rosenbrock system of equations, +@tex +\beforedisplay +$$ +f_1 (x, y) = a (1 - x),~ +f_2 (x, y) = b (y - x^2) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f_1 (x, y) = a (1 - x) +f_2 (x, y) = b (y - x^2) +@end example + +@end ifinfo +@noindent +with @math{a = 1, b = 10}. The solution of this system lies at +@math{(x,y) = (1,1)} in a narrow valley. + +The first stage of the program is to define the system of equations, + +@example +#include +#include +#include +#include + +struct rparams + @{ + double a; + double b; + @}; + +int +rosenbrock_f (const gsl_vector * x, void *params, + gsl_vector * f) +@{ + double a = ((struct rparams *) params)->a; + double b = ((struct rparams *) params)->b; + + const double x0 = gsl_vector_get (x, 0); + const double x1 = gsl_vector_get (x, 1); + + const double y0 = a * (1 - x0); + const double y1 = b * (x1 - x0 * x0); + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + return GSL_SUCCESS; +@} +@end example + +@noindent +The main program begins by creating the function object @code{f}, with +the arguments @code{(x,y)} and parameters @code{(a,b)}. The solver +@code{s} is initialized to use this function, with the @code{hybrids} +method. + +@example +int +main (void) +@{ + const gsl_multiroot_fsolver_type *T; + gsl_multiroot_fsolver *s; + + int status; + size_t i, iter = 0; + + const size_t n = 2; + struct rparams p = @{1.0, 10.0@}; + gsl_multiroot_function f = @{&rosenbrock_f, n, &p@}; + + double x_init[2] = @{-10.0, -5.0@}; + gsl_vector *x = gsl_vector_alloc (n); + + gsl_vector_set (x, 0, x_init[0]); + gsl_vector_set (x, 1, x_init[1]); + + T = gsl_multiroot_fsolver_hybrids; + s = gsl_multiroot_fsolver_alloc (T, 2); + gsl_multiroot_fsolver_set (s, &f, x); + + print_state (iter, s); + + do + @{ + iter++; + status = gsl_multiroot_fsolver_iterate (s); + + print_state (iter, s); + + if (status) /* check if solver is stuck */ + break; + + status = + gsl_multiroot_test_residual (s->f, 1e-7); + @} + while (status == GSL_CONTINUE && iter < 1000); + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multiroot_fsolver_free (s); + gsl_vector_free (x); + return 0; +@} +@end example + +@noindent +Note that it is important to check the return status of each solver +step, in case the algorithm becomes stuck. If an error condition is +detected, indicating that the algorithm cannot proceed, then the error +can be reported to the user, a new starting point chosen or a different +algorithm used. + +The intermediate state of the solution is displayed by the following +function. The solver state contains the vector @code{s->x} which is the +current position, and the vector @code{s->f} with corresponding function +values. + +@example +int +print_state (size_t iter, gsl_multiroot_fsolver * s) +@{ + printf ("iter = %3u x = % .3f % .3f " + "f(x) = % .3e % .3e\n", + iter, + gsl_vector_get (s->x, 0), + gsl_vector_get (s->x, 1), + gsl_vector_get (s->f, 0), + gsl_vector_get (s->f, 1)); +@} +@end example + +@noindent +Here are the results of running the program. The algorithm is started at +@math{(-10,-5)} far from the solution. Since the solution is hidden in +a narrow valley the earliest steps follow the gradient of the function +downhill, in an attempt to reduce the large value of the residual. Once +the root has been approximately located, on iteration 8, the Newton +behavior takes over and convergence is very rapid. + +@smallexample +iter = 0 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 +iter = 1 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 +iter = 2 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 +iter = 3 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 +iter = 4 x = -3.976 24.827 f(x) = 4.976e+00 9.020e+01 +iter = 5 x = -1.274 -5.680 f(x) = 2.274e+00 -7.302e+01 +iter = 6 x = -1.274 -5.680 f(x) = 2.274e+00 -7.302e+01 +iter = 7 x = 0.249 0.298 f(x) = 7.511e-01 2.359e+00 +iter = 8 x = 0.249 0.298 f(x) = 7.511e-01 2.359e+00 +iter = 9 x = 1.000 0.878 f(x) = 1.268e-10 -1.218e+00 +iter = 10 x = 1.000 0.989 f(x) = 1.124e-11 -1.080e-01 +iter = 11 x = 1.000 1.000 f(x) = 0.000e+00 0.000e+00 +status = success +@end smallexample + +@noindent +Note that the algorithm does not update the location on every +iteration. Some iterations are used to adjust the trust-region +parameter, after trying a step which was found to be divergent, or to +recompute the Jacobian, when poor convergence behavior is detected. + +The next example program adds derivative information, in order to +accelerate the solution. There are two derivative functions +@code{rosenbrock_df} and @code{rosenbrock_fdf}. The latter computes both +the function and its derivative simultaneously. This allows the +optimization of any common terms. For simplicity we substitute calls to +the separate @code{f} and @code{df} functions at this point in the code +below. + +@example +int +rosenbrock_df (const gsl_vector * x, void *params, + gsl_matrix * J) +@{ + const double a = ((struct rparams *) params)->a; + const double b = ((struct rparams *) params)->b; + + const double x0 = gsl_vector_get (x, 0); + + const double df00 = -a; + const double df01 = 0; + const double df10 = -2 * b * x0; + const double df11 = b; + + gsl_matrix_set (J, 0, 0, df00); + gsl_matrix_set (J, 0, 1, df01); + gsl_matrix_set (J, 1, 0, df10); + gsl_matrix_set (J, 1, 1, df11); + + return GSL_SUCCESS; +@} + +int +rosenbrock_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * J) +@{ + rosenbrock_f (x, params, f); + rosenbrock_df (x, params, J); + + return GSL_SUCCESS; +@} +@end example + +@noindent +The main program now makes calls to the corresponding @code{fdfsolver} +versions of the functions, + +@example +int +main (void) +@{ + const gsl_multiroot_fdfsolver_type *T; + gsl_multiroot_fdfsolver *s; + + int status; + size_t i, iter = 0; + + const size_t n = 2; + struct rparams p = @{1.0, 10.0@}; + gsl_multiroot_function_fdf f = @{&rosenbrock_f, + &rosenbrock_df, + &rosenbrock_fdf, + n, &p@}; + + double x_init[2] = @{-10.0, -5.0@}; + gsl_vector *x = gsl_vector_alloc (n); + + gsl_vector_set (x, 0, x_init[0]); + gsl_vector_set (x, 1, x_init[1]); + + T = gsl_multiroot_fdfsolver_gnewton; + s = gsl_multiroot_fdfsolver_alloc (T, n); + gsl_multiroot_fdfsolver_set (s, &f, x); + + print_state (iter, s); + + do + @{ + iter++; + + status = gsl_multiroot_fdfsolver_iterate (s); + + print_state (iter, s); + + if (status) + break; + + status = gsl_multiroot_test_residual (s->f, 1e-7); + @} + while (status == GSL_CONTINUE && iter < 1000); + + printf ("status = %s\n", gsl_strerror (status)); + + gsl_multiroot_fdfsolver_free (s); + gsl_vector_free (x); + return 0; +@} +@end example + +@noindent +The addition of derivative information to the @code{hybrids} solver does +not make any significant difference to its behavior, since it able to +approximate the Jacobian numerically with sufficient accuracy. To +illustrate the behavior of a different derivative solver we switch to +@code{gnewton}. This is a traditional Newton solver with the constraint +that it scales back its step if the full step would lead ``uphill''. Here +is the output for the @code{gnewton} algorithm, + +@smallexample +iter = 0 x = -10.000 -5.000 f(x) = 1.100e+01 -1.050e+03 +iter = 1 x = -4.231 -65.317 f(x) = 5.231e+00 -8.321e+02 +iter = 2 x = 1.000 -26.358 f(x) = -8.882e-16 -2.736e+02 +iter = 3 x = 1.000 1.000 f(x) = -2.220e-16 -4.441e-15 +status = success +@end smallexample + +@noindent +The convergence is much more rapid, but takes a wide excursion out to +the point @math{(-4.23,-65.3)}. This could cause the algorithm to go +astray in a realistic application. The hybrid algorithm follows the +downhill path to the solution more reliably. + +@node References and Further Reading for Multidimensional Root Finding +@section References and Further Reading + +The original version of the Hybrid method is described in the following +articles by Powell, + +@itemize @w{} +@item +M.J.D. Powell, ``A Hybrid Method for Nonlinear Equations'' (Chap 6, p +87--114) and ``A Fortran Subroutine for Solving systems of Nonlinear +Algebraic Equations'' (Chap 7, p 115--161), in @cite{Numerical Methods for +Nonlinear Algebraic Equations}, P. Rabinowitz, editor. Gordon and +Breach, 1970. +@end itemize + +@noindent +The following papers are also relevant to the algorithms described in +this section, + +@itemize @w{} +@item +J.J. Mor@'e, M.Y. Cosnard, ``Numerical Solution of Nonlinear Equations'', +@cite{ACM Transactions on Mathematical Software}, Vol 5, No 1, (1979), p 64--85 + +@item +C.G. Broyden, ``A Class of Methods for Solving Nonlinear +Simultaneous Equations'', @cite{Mathematics of Computation}, Vol 19 (1965), +p 577--593 + +@item +J.J. Mor@'e, B.S. Garbow, K.E. Hillstrom, ``Testing Unconstrained +Optimization Software'', ACM Transactions on Mathematical Software, Vol +7, No 1 (1981), p 17--41 +@end itemize + diff --git a/software/gsl-1.15/doc/multiset.texi b/software/gsl-1.15/doc/multiset.texi new file mode 100644 index 000000000..000f5324b --- /dev/null +++ b/software/gsl-1.15/doc/multiset.texi @@ -0,0 +1,201 @@ +@cindex multisets + +This chapter describes functions for creating and manipulating multisets. A +multiset @math{c} is represented by an array of @math{k} integers in the range +0 to @math{n-1}, where each value @math{c_i} may occur more than once. The +multiset @math{c} corresponds to indices of @math{k} elements chosen from an +@math{n} element vector with replacement. In mathematical terms, @math{n} is +the cardinality of the multiset while @math{k} is the maximum multiplicity of +any value. Multisets are useful, for example, when iterating over the indices +of a @math{k}-th order symmetric tensor in @math{n}-space. + +The functions described in this chapter are defined in the header file +@file{gsl_multiset.h}. + +@menu +* The Multiset struct:: +* Multiset allocation:: +* Accessing multiset elements:: +* Multiset properties:: +* Multiset functions:: +* Reading and writing multisets:: +* Multiset Examples:: +@end menu + +@node The Multiset struct +@section The Multiset struct +@tpindex gsl_multiset +A multiset is defined by a structure containing three components, the +values of @math{n} and @math{k}, and a pointer to the multiset array. +The elements of the multiset array are all of type @code{size_t}, and +are stored in increasing order. The @code{gsl_multiset} structure +looks like this, + +@example +typedef struct +@{ + size_t n; + size_t k; + size_t *data; +@} gsl_multiset; +@end example +@comment + +@noindent + +@node Multiset allocation +@section Multiset allocation + +@deftypefun {gsl_multiset *} gsl_multiset_alloc (size_t @var{n}, size_t @var{k}) +This function allocates memory for a new multiset with parameters @var{n}, +@var{k}. The multiset is not initialized and its elements are undefined. Use +the function @code{gsl_multiset_calloc} if you want to create a multiset which +is initialized to the lexicographically first multiset element. A null pointer +is returned if insufficient memory is available to create the multiset. +@end deftypefun + +@deftypefun {gsl_multiset *} gsl_multiset_calloc (size_t @var{n}, size_t @var{k}) +This function allocates memory for a new multiset with parameters @var{n}, +@var{k} and initializes it to the lexicographically first multiset element. A +null pointer is returned if insufficient memory is available to create the +multiset. +@end deftypefun + +@deftypefun void gsl_multiset_init_first (gsl_multiset * @var{c}) +This function initializes the multiset @var{c} to the lexicographically first +multiset element, i.e. @math{0} repeated @math{k} times. +@end deftypefun + +@deftypefun void gsl_multiset_init_last (gsl_multiset * @var{c}) +This function initializes the multiset @var{c} to the lexicographically last +multiset element, i.e. @math{n-1} repeated @math{k} times. +@end deftypefun + +@deftypefun void gsl_multiset_free (gsl_multiset * @var{c}) +This function frees all the memory used by the multiset @var{c}. +@end deftypefun + +@deftypefun int gsl_multiset_memcpy (gsl_multiset * @var{dest}, const gsl_multiset * @var{src}) +This function copies the elements of the multiset @var{src} into the +multiset @var{dest}. The two multisets must have the same size. +@end deftypefun + + +@node Accessing multiset elements +@section Accessing multiset elements + +The following function can be used to access the elements of a multiset. + +@deftypefun size_t gsl_multiset_get (const gsl_multiset * @var{c}, const size_t @var{i}) +This function returns the value of the @var{i}-th element of the +multiset @var{c}. If @var{i} lies outside the allowed range of 0 to +@math{@var{k}-1} then the error handler is invoked and 0 is returned. @inlinefn{} +@end deftypefun + +@node Multiset properties +@section Multiset properties + +@deftypefun size_t gsl_multiset_n (const gsl_multiset * @var{c}) +This function returns the range (@math{n}) of the multiset @var{c}. +@end deftypefun + +@deftypefun size_t gsl_multiset_k (const gsl_multiset * @var{c}) +This function returns the number of elements (@math{k}) in the multiset @var{c}. +@end deftypefun + +@deftypefun {size_t *} gsl_multiset_data (const gsl_multiset * @var{c}) +This function returns a pointer to the array of elements in the +multiset @var{c}. +@end deftypefun + +@deftypefun int gsl_multiset_valid (gsl_multiset * @var{c}) +@cindex checking multiset for validity +@cindex testing multiset for validity +This function checks that the multiset @var{c} is valid. The @var{k} +elements should lie in the range 0 to @math{@var{n}-1}, with each +value occurring in nondecreasing order. +@end deftypefun + +@node Multiset functions +@section Multiset functions + +@deftypefun int gsl_multiset_next (gsl_multiset * @var{c}) +@cindex iterating through multisets +This function advances the multiset @var{c} to the next multiset element in +lexicographic order and returns @code{GSL_SUCCESS}. If no further multisets +elements are available it returns @code{GSL_FAILURE} and leaves @var{c} +unmodified. Starting with the first multiset and repeatedly applying this +function will iterate through all possible multisets of a given order. +@end deftypefun + +@deftypefun int gsl_multiset_prev (gsl_multiset * @var{c}) +This function steps backwards from the multiset @var{c} to the previous +multiset element in lexicographic order, returning @code{GSL_SUCCESS}. If no +previous multiset is available it returns @code{GSL_FAILURE} and leaves @var{c} +unmodified. +@end deftypefun + +@node Reading and writing multisets +@section Reading and writing multisets + +The library provides functions for reading and writing multisets to a +file as binary data or formatted text. + +@deftypefun int gsl_multiset_fwrite (FILE * @var{stream}, const gsl_multiset * @var{c}) +This function writes the elements of the multiset @var{c} to the +stream @var{stream} in binary format. The function returns +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_multiset_fread (FILE * @var{stream}, gsl_multiset * @var{c}) +This function reads elements from the open stream @var{stream} into the +multiset @var{c} in binary format. The multiset @var{c} must be +preallocated with correct values of @math{n} and @math{k} since the +function uses the size of @var{c} to determine how many bytes to read. +The function returns @code{GSL_EFAILED} if there was a problem reading +from the file. The data is assumed to have been written in the native +binary format on the same architecture. +@end deftypefun + +@deftypefun int gsl_multiset_fprintf (FILE * @var{stream}, const gsl_multiset * @var{c}, const char * @var{format}) +This function writes the elements of the multiset @var{c} +line-by-line to the stream @var{stream} using the format specifier +@var{format}, which should be suitable for a type of @var{size_t}. +In ISO C99 the type modifier @code{z} represents @code{size_t}, so +@code{"%zu\n"} is a suitable format.@footnote{In versions of the +GNU C library prior to the ISO C99 standard, +the type modifier @code{Z} was used instead.} The function returns +@code{GSL_EFAILED} if there was a problem writing to the file. +@end deftypefun + +@deftypefun int gsl_multiset_fscanf (FILE * @var{stream}, gsl_multiset * @var{c}) +This function reads formatted data from the stream @var{stream} into the +multiset @var{c}. The multiset @var{c} must be preallocated with +correct values of @math{n} and @math{k} since the function uses the size of @var{c} to +determine how many numbers to read. The function returns +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun + + +@node Multiset Examples +@section Examples +The example program below prints all multisets elements containing the values +@math{@{0,1,2,3@}} ordered by size. Multiset elements of the same size are +ordered lexicographically. + +@example +@verbatiminclude examples/multiset.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out +@verbatiminclude examples/multiset.out +@end example + +@noindent +All 70 multisets are generated and sorted lexicographically. diff --git a/software/gsl-1.15/doc/ntuple.eps b/software/gsl-1.15/doc/ntuple.eps new file mode 100644 index 000000000..f0664772e --- /dev/null +++ b/software/gsl-1.15/doc/ntuple.eps @@ -0,0 +1,555 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tmp2.eps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Mon Jan 22 20:12:36 2001 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 410 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +560 420 M +63 0 V +6409 0 R +-63 0 V +476 420 M +(0) Rshow +560 1310 M +63 0 V +6409 0 R +-63 0 V +-6493 0 R +(50) Rshow +560 2201 M +63 0 V +6409 0 R +-63 0 V +-6493 0 R +(100) Rshow +560 3091 M +63 0 V +6409 0 R +-63 0 V +-6493 0 R +(150) Rshow +560 3982 M +63 0 V +6409 0 R +-63 0 V +-6493 0 R +(200) Rshow +560 4872 M +63 0 V +6409 0 R +-63 0 V +-6493 0 R +(250) Rshow +560 420 M +0 63 V +0 4389 R +0 -63 V +560 280 M +(0) Cshow +1207 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(1) Cshow +1854 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(2) Cshow +2502 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(3) Cshow +3149 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(4) Cshow +3796 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(5) Cshow +4443 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(6) Cshow +5090 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(7) Cshow +5738 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(8) Cshow +6385 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(9) Cshow +7032 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +(10) Cshow +1.000 UL +LTb +560 420 M +6472 0 V +0 4452 V +-6472 0 V +560 420 L +0 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(n) Cshow +grestore +3796 140 M +(E2) Cshow +1.000 UL +LT0 +560 420 M +65 0 V +64 0 V +65 0 V +65 0 V +65 0 V +64 0 V +65 0 V +65 0 V +64 0 V +65 0 V +65 0 V +65 0 V +64 0 V +65 0 V +65 0 V +0 4149 V +65 0 V +0 36 V +64 0 V +0 -766 V +65 0 V +0 623 V +65 0 V +0 -552 V +64 0 V +0 54 V +65 0 V +0 -143 V +65 0 V +0 -302 V +65 0 V +0 35 V +64 0 V +0 160 V +65 0 V +0 -195 V +65 0 V +0 -89 V +64 0 V +0 -161 V +65 0 V +0 -142 V +65 0 V +0 160 V +65 0 V +0 -516 V +64 0 V +0 71 V +65 0 V +0 214 V +65 0 V +0 -250 V +64 0 V +0 107 V +65 0 V +0 -267 V +65 0 V +0 -196 V +65 0 V +0 196 V +64 0 V +0 -374 V +65 0 V +0 516 V +65 0 V +0 -356 V +65 0 V +0 -463 V +64 0 V +0 -53 V +65 0 V +0 320 V +65 0 V +0 -231 V +64 0 V +0 36 V +65 0 V +0 -72 V +65 0 V +0 339 V +65 0 V +0 -196 V +64 0 V +65 0 V +0 -303 V +65 0 V +0 -267 V +64 0 V +0 214 V +65 0 V +0 -178 V +65 0 V +0 -36 V +65 0 V +0 -54 V +64 0 V +0 -142 V +65 0 V +0 249 V +65 0 V +0 -374 V +64 0 V +0 -35 V +65 0 V +0 35 V +65 0 V +0 -17 V +65 0 V +0 17 V +64 0 V +0 -178 V +65 0 V +0 -35 V +65 0 V +0 89 V +65 0 V +0 35 V +64 0 V +0 -213 V +65 0 V +0 106 V +65 0 V +0 143 V +64 0 V +0 -249 V +65 0 V +0 142 V +65 0 V +0 -107 V +65 0 V +0 -142 V +64 0 V +0 142 V +65 0 V +0 -142 V +65 0 V +0 89 V +64 0 V +0 -71 V +65 0 V +0 89 V +65 0 V +0 -72 V +65 0 V +0 54 V +64 0 V +0 -160 V +65 0 V +0 71 V +65 0 V +0 -71 V +64 0 V +0 -143 V +65 0 V +0 125 V +65 0 V +0 89 V +65 0 V +0 -214 V +64 0 V +0 125 V +65 0 V +0 18 V +65 0 V +0 -214 V +65 0 V +0 160 V +64 0 V +0 36 V +65 0 V +0 -178 V +65 0 V +0 71 V +64 0 V +0 -18 V +65 0 V +0 -18 V +65 0 V +0 72 V +65 0 V +0 -54 V +64 0 V +0 54 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/ntuple.texi b/software/gsl-1.15/doc/ntuple.texi new file mode 100644 index 000000000..ad676a466 --- /dev/null +++ b/software/gsl-1.15/doc/ntuple.texi @@ -0,0 +1,198 @@ +@cindex ntuples + +This chapter describes functions for creating and manipulating +@dfn{ntuples}, sets of values associated with events. The ntuples +are stored in files. Their values can be extracted in any combination +and @dfn{booked} in a histogram using a selection function. + +The values to be stored are held in a user-defined data structure, and +an ntuple is created associating this data structure with a file. The +values are then written to the file (normally inside a loop) using +the ntuple functions described below. + +A histogram can be created from ntuple data by providing a selection +function and a value function. The selection function specifies whether +an event should be included in the subset to be analyzed or not. The value +function computes the entry to be added to the histogram for each +event. + +All the ntuple functions are defined in the header file +@file{gsl_ntuple.h} + +@menu +* The ntuple struct:: +* Creating ntuples:: +* Opening an existing ntuple file:: +* Writing ntuples:: +* Reading ntuples :: +* Closing an ntuple file:: +* Histogramming ntuple values:: +* Example ntuple programs:: +* Ntuple References and Further Reading:: +@end menu + +@node The ntuple struct +@section The ntuple struct +@tpindex gsl_ntuple +Ntuples are manipulated using the @code{gsl_ntuple} struct. This struct +contains information on the file where the ntuple data is stored, a +pointer to the current ntuple data row and the size of the user-defined +ntuple data struct. + +@example +typedef struct @{ + FILE * file; + void * ntuple_data; + size_t size; +@} gsl_ntuple; +@end example + +@node Creating ntuples +@section Creating ntuples + +@deftypefun {gsl_ntuple *} gsl_ntuple_create (char * @var{filename}, void * @var{ntuple_data}, size_t @var{size}) +This function creates a new write-only ntuple file @var{filename} for +ntuples of size @var{size} and returns a pointer to the newly created +ntuple struct. Any existing file with the same name is truncated to +zero length and overwritten. A pointer to memory for the current ntuple +row @var{ntuple_data} must be supplied---this is used to copy ntuples +in and out of the file. +@end deftypefun + +@node Opening an existing ntuple file +@section Opening an existing ntuple file + +@deftypefun {gsl_ntuple *} gsl_ntuple_open (char * @var{filename}, void * @var{ntuple_data}, size_t @var{size}) +This function opens an existing ntuple file @var{filename} for reading +and returns a pointer to a corresponding ntuple struct. The ntuples in +the file must have size @var{size}. A pointer to memory for the current +ntuple row @var{ntuple_data} must be supplied---this is used to copy +ntuples in and out of the file. +@end deftypefun + +@node Writing ntuples +@section Writing ntuples + +@deftypefun int gsl_ntuple_write (gsl_ntuple * @var{ntuple}) +This function writes the current ntuple @var{ntuple->ntuple_data} of +size @var{ntuple->size} to the corresponding file. +@end deftypefun + +@deftypefun int gsl_ntuple_bookdata (gsl_ntuple * @var{ntuple}) +This function is a synonym for @code{gsl_ntuple_write}. +@end deftypefun + +@node Reading ntuples +@section Reading ntuples + +@deftypefun int gsl_ntuple_read (gsl_ntuple * @var{ntuple}) +This function reads the current row of the ntuple file for @var{ntuple} +and stores the values in @var{ntuple->data}. +@end deftypefun + +@node Closing an ntuple file +@section Closing an ntuple file + +@deftypefun int gsl_ntuple_close (gsl_ntuple * @var{ntuple}) +This function closes the ntuple file @var{ntuple} and frees its +associated allocated memory. +@end deftypefun + +@node Histogramming ntuple values +@section Histogramming ntuple values + +Once an ntuple has been created its contents can be histogrammed in +various ways using the function @code{gsl_ntuple_project}. Two +user-defined functions must be provided, a function to select events and +a function to compute scalar values. The selection function and the +value function both accept the ntuple row as a first argument and other +parameters as a second argument. + +@cindex selection function, ntuples +@tpindex gsl_ntuple_select_fn +The @dfn{selection function} determines which ntuple rows are selected +for histogramming. It is defined by the following struct, + +@smallexample +typedef struct @{ + int (* function) (void * ntuple_data, void * params); + void * params; +@} gsl_ntuple_select_fn; +@end smallexample + +@noindent +The struct component @var{function} should return a non-zero value for +each ntuple row that is to be included in the histogram. + +@cindex value function, ntuples +@tpindex gsl_ntuple_value_fn +The @dfn{value function} computes scalar values for those ntuple rows +selected by the selection function, + +@smallexample +typedef struct @{ + double (* function) (void * ntuple_data, void * params); + void * params; +@} gsl_ntuple_value_fn; +@end smallexample + +@noindent +In this case the struct component @var{function} should return the value +to be added to the histogram for the ntuple row. + +@cindex histogram, from ntuple +@cindex projection of ntuples +@deftypefun int gsl_ntuple_project (gsl_histogram * @var{h}, gsl_ntuple * @var{ntuple}, gsl_ntuple_value_fn * @var{value_func}, gsl_ntuple_select_fn * @var{select_func}) +This function updates the histogram @var{h} from the ntuple @var{ntuple} +using the functions @var{value_func} and @var{select_func}. For each +ntuple row where the selection function @var{select_func} is non-zero the +corresponding value of that row is computed using the function +@var{value_func} and added to the histogram. Those ntuple rows where +@var{select_func} returns zero are ignored. New entries are added to +the histogram, so subsequent calls can be used to accumulate further +data in the same histogram. +@end deftypefun + +@node Example ntuple programs +@section Examples + +The following example programs demonstrate the use of ntuples in +managing a large dataset. The first program creates a set of 10,000 +simulated ``events'', each with 3 associated values @math{(x,y,z)}. These +are generated from a Gaussian distribution with unit variance, for +demonstration purposes, and written to the ntuple file @file{test.dat}. + +@example +@verbatiminclude examples/ntuplew.c +@end example + +@noindent +The next program analyses the ntuple data in the file @file{test.dat}. +The analysis procedure is to compute the squared-magnitude of each +event, @math{E^2=x^2+y^2+z^2}, and select only those which exceed a +lower limit of 1.5. The selected events are then histogrammed using +their @math{E^2} values. + +@example +@verbatiminclude examples/ntupler.c +@end example + +@need 3000 +The following plot shows the distribution of the selected events. +Note the cut-off at the lower bound. + +@iftex +@sp 1 +@center @image{ntuple,3.4in} +@end iftex + +@node Ntuple References and Further Reading +@section References and Further Reading +@cindex PAW +@cindex HBOOK + +Further information on the use of ntuples can be found in the +documentation for the @sc{cern} packages @sc{paw} and @sc{hbook} +(available online). + + diff --git a/software/gsl-1.15/doc/ode-initval.texi b/software/gsl-1.15/doc/ode-initval.texi new file mode 100644 index 000000000..01fa2e22a --- /dev/null +++ b/software/gsl-1.15/doc/ode-initval.texi @@ -0,0 +1,770 @@ +@cindex differential equations, initial value problems +@cindex initial value problems, differential equations +@cindex ordinary differential equations, initial value problem +@cindex ODEs, initial value problems +This chapter describes functions for solving ordinary differential +equation (ODE) initial value problems. The library provides a variety +of low-level methods, such as Runge-Kutta and Bulirsch-Stoer routines, +and higher-level components for adaptive step-size control. The +components can be combined by the user to achieve the desired +solution, with full access to any intermediate steps. A driver object +can be used as a high level wrapper for easy use of low level +functions. + +These functions are declared in the header file @file{gsl_odeiv2.h}. +This is a new interface in version 1.15 and uses the prefix +@code{gsl_odeiv2} for all functions. It is recommended over the +previous @code{gsl_odeiv} implementation defined in @file{gsl_odeiv.h} +The old interface has been retained under the original name for +backwards compatibility. + +@menu +* Defining the ODE System:: +* Stepping Functions:: +* Adaptive Step-size Control:: +* Evolution:: +* Driver:: +* ODE Example programs:: +* ODE References and Further Reading:: +@end menu + +@node Defining the ODE System +@section Defining the ODE System + +The routines solve the general @math{n}-dimensional first-order system, +@tex +\beforedisplay +$$ +{dy_i(t) \over dt} = f_i (t, y_1(t), \dots y_n(t)) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +dy_i(t)/dt = f_i(t, y_1(t), ..., y_n(t)) +@end example + +@end ifinfo +@noindent +for @math{i = 1, \dots, n}. The stepping functions rely on the vector +of derivatives @math{f_i} and the Jacobian matrix, +@c{$J_{ij} = \partial f_i(t, y(t)) / \partial y_j$} +@math{J_@{ij@} = df_i(t,y(t)) / dy_j}. +A system of equations is defined using the @code{gsl_odeiv2_system} +datatype. + +@deftp {Data Type} gsl_odeiv2_system +This data type defines a general ODE system with arbitrary parameters. + +@table @code +@item int (* function) (double t, const double y[], double dydt[], void * params) +This function should store the vector elements +@c{$f_i(t,y,\hbox{\it params})$} +@math{f_i(t,y,params)} in the array @var{dydt}, +for arguments (@var{t},@var{y}) and parameters @var{params}. + +The function should return @code{GSL_SUCCESS} if the calculation was +completed successfully. Any other return value indicates an error. A +special return value @code{GSL_EBADFUNC} causes @code{gsl_odeiv2} +routines to immediately stop and return. The user must call an +appropriate reset function (e.g. @code{gsl_odeiv2_driver_reset} or +@code{gsl_odeiv2_step_reset}) before continuing. Use return values +distinct from standard GSL error codes to distinguish your function as +the source of the error. + +@item int (* jacobian) (double t, const double y[], double * dfdy, double dfdt[], void * params); +@cindex Jacobian matrix, ODEs +This function should store the vector of derivative elements +@c{$\partial f_i(t,y,params) / \partial t$} @math{df_i(t,y,params)/dt} +in the array @var{dfdt} and the Jacobian matrix @c{$J_{ij}$} +@math{J_@{ij@}} in the array @var{dfdy}, regarded as a row-ordered +matrix @code{J(i,j) = dfdy[i * dimension + j]} where @code{dimension} +is the dimension of the system. + +Not all of the stepper algorithms of @code{gsl_odeiv2} make use of the +Jacobian matrix, so it may not be necessary to provide this function +(the @code{jacobian} element of the struct can be replaced by a null +pointer for those algorithms). + +The function should return @code{GSL_SUCCESS} if the calculation was +completed successfully. Any other return value indicates an error. A +special return value @code{GSL_EBADFUNC} causes @code{gsl_odeiv2} +routines to immediately stop and return. The user must call an +appropriate reset function (e.g. @code{gsl_odeiv2_driver_reset} or +@code{gsl_odeiv2_step_reset}) before continuing. Use return values +distinct from standard GSL error codes to distinguish your function as +the source of the error. + +@item size_t dimension; +This is the dimension of the system of equations. + +@item void * params +This is a pointer to the arbitrary parameters of the system. +@end table +@end deftp + +@node Stepping Functions +@section Stepping Functions + +The lowest level components are the @dfn{stepping functions} which +advance a solution from time @math{t} to @math{t+h} for a fixed +step-size @math{h} and estimate the resulting local error. + +@deftypefun {gsl_odeiv2_step *} gsl_odeiv2_step_alloc (const gsl_odeiv2_step_type * @var{T}, size_t @var{dim}) +@tpindex gsl_odeiv2_step +@tpindex gsl_odeiv2_step_type +This function returns a pointer to a newly allocated instance of a +stepping function of type @var{T} for a system of @var{dim} +dimensions. Please note that if you use a stepper method that +requires access to a driver object, it is advisable to use a driver +allocation method, which automatically allocates a stepper, too. +@end deftypefun + +@deftypefun int gsl_odeiv2_step_reset (gsl_odeiv2_step * @var{s}) +This function resets the stepping function @var{s}. It should be used +whenever the next use of @var{s} will not be a continuation of a +previous step. +@end deftypefun + +@deftypefun void gsl_odeiv2_step_free (gsl_odeiv2_step * @var{s}) +This function frees all the memory associated with the stepping function +@var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_odeiv2_step_name (const gsl_odeiv2_step * @var{s}) +This function returns a pointer to the name of the stepping function. +For example, + +@example +printf ("step method is '%s'\n", + gsl_odeiv2_step_name (s)); +@end example + +@noindent +would print something like @code{step method is 'rkf45'}. +@end deftypefun + +@deftypefun {unsigned int} gsl_odeiv2_step_order (const gsl_odeiv2_step * @var{s}) +This function returns the order of the stepping function on the previous +step. The order can vary if the stepping function itself is adaptive. +@end deftypefun + +@deftypefun int gsl_odeiv2_step_set_driver (gsl_odeiv2_step * @var{s}, const gsl_odeiv2_driver * @var{d}) +This function sets a pointer of the driver object @var{d} for stepper +@var{s}, to allow the stepper to access control (and evolve) object +through the driver object. This is a requirement for some steppers, to +get the desired error level for internal iteration of +stepper. Allocation of a driver object calls this function +automatically. +@end deftypefun + +@deftypefun int gsl_odeiv2_step_apply (gsl_odeiv2_step * @var{s}, double @var{t}, double @var{h}, double @var{y}[], double @var{yerr}[], const double @var{dydt_in}[], double @var{dydt_out}[], const gsl_odeiv2_system * @var{sys}) +This function applies the stepping function @var{s} to the system of +equations defined by @var{sys}, using the step-size @var{h} to advance +the system from time @var{t} and state @var{y} to time @var{t}+@var{h}. +The new state of the system is stored in @var{y} on output, with an +estimate of the absolute error in each component stored in @var{yerr}. +If the argument @var{dydt_in} is not null it should point an array +containing the derivatives for the system at time @var{t} on input. This +is optional as the derivatives will be computed internally if they are +not provided, but allows the reuse of existing derivative information. +On output the new derivatives of the system at time @var{t}+@var{h} will +be stored in @var{dydt_out} if it is not null. + +The stepping function returns @code{GSL_FAILURE} if it is unable to +compute the requested step. Also, if the user-supplied functions +defined in the system @var{sys} return a status other than +@code{GSL_SUCCESS} the step will be aborted. In that case, the +elements of @var{y} will be restored to their pre-step values and the +error code from the user-supplied function will be returned. Failure +may be due to a singularity in the system or too large step-size +@var{h}. In that case the step should be attempted again with a +smaller step-size, e.g. @math{@var{h}/2}. + +If the driver object is not appropriately set via +@code{gsl_odeiv2_step_set_driver} for those steppers that need it, the +stepping function returns @code{GSL_EFAULT}. If the user-supplied +functions defined in the system @var{sys} returns @code{GSL_EBADFUNC}, +the function returns immediately with the same return code. In this +case the user must call @code{gsl_odeiv2_step_reset} before calling +this function again. + +@end deftypefun + +The following algorithms are available, + +@deffn {Step Type} gsl_odeiv2_step_rk2 +@cindex RK2, Runge-Kutta method +@cindex Runge-Kutta methods, ordinary differential equations +Explicit embedded Runge-Kutta (2, 3) method. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rk4 +@cindex RK4, Runge-Kutta method +Explicit 4th order (classical) Runge-Kutta. Error estimation is +carried out by the step doubling method. For more efficient estimate +of the error, use the embedded methods described below. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rkf45 +@cindex Fehlberg method, differential equations +@cindex RKF45, Runge-Kutta-Fehlberg method +Explicit embedded Runge-Kutta-Fehlberg (4, 5) method. This method is +a good general-purpose integrator. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rkck +@cindex Runge-Kutta Cash-Karp method +@cindex Cash-Karp, Runge-Kutta method +Explicit embedded Runge-Kutta Cash-Karp (4, 5) method. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rk8pd +@cindex Runge-Kutta Prince-Dormand method +@cindex Prince-Dormand, Runge-Kutta method +Explicit embedded Runge-Kutta Prince-Dormand (8, 9) method. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rk1imp +@cindex Implicit Euler method +Implicit Gaussian first order Runge-Kutta. Also known as implicit +Euler or backward Euler method. Error estimation is carried out by the +step doubling method. This algorithm requires the Jacobian and +access to the driver object via @code{gsl_odeiv2_step_set_driver}. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rk2imp +@cindex Implicit Runge-Kutta method +Implicit Gaussian second order Runge-Kutta. Also known as implicit +mid-point rule. Error estimation is carried out by the step doubling +method. This stepper requires the Jacobian and access to the driver +object via @code{gsl_odeiv2_step_set_driver}. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_rk4imp +Implicit Gaussian 4th order Runge-Kutta. Error estimation is carried +out by the step doubling method. This algorithm requires the Jacobian +and access to the driver object via @code{gsl_odeiv2_step_set_driver}. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_bsimp +@cindex Bulirsch-Stoer method +@cindex Bader and Deuflhard, Bulirsch-Stoer method. +@cindex Deuflhard and Bader, Bulirsch-Stoer method. +Implicit Bulirsch-Stoer method of Bader and Deuflhard. The method is +generally suitable for stiff problems. This stepper requires the +Jacobian. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_msadams +@cindex Adams method +@cindex multistep methods, ODEs +@cindex predictor-corrector method, ODEs +@cindex Nordsieck form +A variable-coefficient linear multistep Adams method in Nordsieck +form. This stepper uses explicit Adams-Bashforth (predictor) and +implicit Adams-Moulton (corrector) methods in @math{P(EC)^m} +functional iteration mode. Method order varies dynamically between 1 +and 12. This stepper requires the access to the driver object via +@code{gsl_odeiv2_step_set_driver}. +@end deffn + +@deffn {Step Type} gsl_odeiv2_step_msbdf +@cindex BDF method +A variable-coefficient linear multistep backward differentiation +formula (BDF) method in Nordsieck form. This stepper uses the explicit +BDF formula as predictor and implicit BDF formula as corrector. A +modified Newton iteration method is used to solve the system of +non-linear equations. Method order varies dynamically between 1 and +5. The method is generally suitable for stiff problems. This stepper +requires the Jacobian and the access to the driver object via +@code{gsl_odeiv2_step_set_driver}. +@end deffn + +@node Adaptive Step-size Control +@section Adaptive Step-size Control +@cindex Adaptive step-size control, differential equations + +The control function examines the proposed change to the solution +produced by a stepping function and attempts to determine the optimal +step-size for a user-specified level of error. + +@deftypefun {gsl_odeiv2_control *} gsl_odeiv2_control_standard_new (double @var{eps_abs}, double @var{eps_rel}, double @var{a_y}, double @var{a_dydt}) +@tpindex gsl_odeiv2_control +@tpindex gsl_odeiv2_control_type +The standard control object is a four parameter heuristic based on +absolute and relative errors @var{eps_abs} and @var{eps_rel}, and +scaling factors @var{a_y} and @var{a_dydt} for the system state +@math{y(t)} and derivatives @math{y'(t)} respectively. + +The step-size adjustment procedure for this method begins by computing +the desired error level @math{D_i} for each component, +@tex +\beforedisplay +$$ +D_i = \epsilon_{abs} + \epsilon_{rel} * (a_{y} |y_i| + a_{dydt} h |y\prime_i|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +D_i = eps_abs + eps_rel * (a_y |y_i| + a_dydt h |y\prime_i|) +@end example + +@end ifinfo +@noindent +and comparing it with the observed error @math{E_i = |yerr_i|}. If the +observed error @var{E} exceeds the desired error level @var{D} by more +than 10% for any component then the method reduces the step-size by an +appropriate factor, +@tex +\beforedisplay +$$ +h_{new} = h_{old} * S * (E/D)^{-1/q} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +h_new = h_old * S * (E/D)^(-1/q) +@end example + +@end ifinfo +@noindent +where @math{q} is the consistency order of the method (e.g. @math{q=4} for +4(5) embedded RK), and @math{S} is a safety factor of 0.9. The ratio +@math{E/D} is taken to be the maximum of the ratios +@math{E_i/D_i}. + +If the observed error @math{E} is less than 50% of the desired error +level @var{D} for the maximum ratio @math{E_i/D_i} then the algorithm +takes the opportunity to increase the step-size to bring the error in +line with the desired level, +@tex +\beforedisplay +$$ +h_{new} = h_{old} * S * (E/D)^{-1/(q+1)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +h_new = h_old * S * (E/D)^(-1/(q+1)) +@end example + +@end ifinfo +@noindent +This encompasses all the standard error scaling methods. To avoid +uncontrolled changes in the stepsize, the overall scaling factor is +limited to the range @math{1/5} to 5. +@end deftypefun + +@deftypefun {gsl_odeiv2_control *} gsl_odeiv2_control_y_new (double @var{eps_abs}, double @var{eps_rel}) +This function creates a new control object which will keep the local +error on each step within an absolute error of @var{eps_abs} and +relative error of @var{eps_rel} with respect to the solution @math{y_i(t)}. +This is equivalent to the standard control object with @var{a_y}=1 and +@var{a_dydt}=0. +@end deftypefun + +@deftypefun {gsl_odeiv2_control *} gsl_odeiv2_control_yp_new (double @var{eps_abs}, double @var{eps_rel}) +This function creates a new control object which will keep the local +error on each step within an absolute error of @var{eps_abs} and +relative error of @var{eps_rel} with respect to the derivatives of the +solution @math{y'_i(t)}. This is equivalent to the standard control +object with @var{a_y}=0 and @var{a_dydt}=1. +@end deftypefun + + +@deftypefun {gsl_odeiv2_control *} gsl_odeiv2_control_scaled_new (double @var{eps_abs}, double @var{eps_rel}, double @var{a_y}, double @var{a_dydt}, const double @var{scale_abs}[], size_t @var{dim}) +This function creates a new control object which uses the same algorithm +as @code{gsl_odeiv2_control_standard_new} but with an absolute error +which is scaled for each component by the array @var{scale_abs}. +The formula for @math{D_i} for this control object is, +@tex +\beforedisplay +$$ +D_i = \epsilon_{abs} s_i + \epsilon_{rel} * (a_{y} |y_i| + a_{dydt} h |y\prime_i|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +D_i = eps_abs * s_i + eps_rel * (a_y |y_i| + a_dydt h |y\prime_i|) +@end example + +@end ifinfo +@noindent +where @math{s_i} is the @math{i}-th component of the array @var{scale_abs}. +The same error control heuristic is used by the Matlab @sc{ode} suite. +@end deftypefun + +@deftypefun {gsl_odeiv2_control *} gsl_odeiv2_control_alloc (const gsl_odeiv2_control_type * @var{T}) +This function returns a pointer to a newly allocated instance of a +control function of type @var{T}. This function is only needed for +defining new types of control functions. For most purposes the standard +control functions described above should be sufficient. +@end deftypefun + +@deftypefun int gsl_odeiv2_control_init (gsl_odeiv2_control * @var{c}, double @var{eps_abs}, double @var{eps_rel}, double @var{a_y}, double @var{a_dydt}) +This function initializes the control function @var{c} with the +parameters @var{eps_abs} (absolute error), @var{eps_rel} (relative +error), @var{a_y} (scaling factor for y) and @var{a_dydt} (scaling +factor for derivatives). +@end deftypefun + +@deftypefun void gsl_odeiv2_control_free (gsl_odeiv2_control * @var{c}) +This function frees all the memory associated with the control function +@var{c}. +@end deftypefun + +@deftypefun int gsl_odeiv2_control_hadjust (gsl_odeiv2_control * @var{c}, gsl_odeiv2_step * @var{s}, const double @var{y}[], const double @var{yerr}[], const double @var{dydt}[], double * @var{h}) +This function adjusts the step-size @var{h} using the control function +@var{c}, and the current values of @var{y}, @var{yerr} and @var{dydt}. +The stepping function @var{step} is also needed to determine the order +of the method. If the error in the y-values @var{yerr} is found to be +too large then the step-size @var{h} is reduced and the function returns +@code{GSL_ODEIV_HADJ_DEC}. If the error is sufficiently small then +@var{h} may be increased and @code{GSL_ODEIV_HADJ_INC} is returned. The +function returns @code{GSL_ODEIV_HADJ_NIL} if the step-size is +unchanged. The goal of the function is to estimate the largest +step-size which satisfies the user-specified accuracy requirements for +the current point. +@end deftypefun + +@deftypefun {const char *} gsl_odeiv2_control_name (const gsl_odeiv2_control * @var{c}) +This function returns a pointer to the name of the control function. +For example, + +@example +printf ("control method is '%s'\n", + gsl_odeiv2_control_name (c)); +@end example + +@noindent +would print something like @code{control method is 'standard'} +@end deftypefun + +@deftypefun int gsl_odeiv2_control_errlevel (gsl_odeiv2_control * @var{c}, const double @var{y}, const double @var{dydt}, const double @var{h}, const size_t @var{ind}, double * @var{errlev}) +This function calculates the desired error level of the @var{ind}th component to @var{errlev}. It requires the value (@var{y}) and value of the derivative (@var{dydt}) of the component, and the current step size @var{h}. +@end deftypefun + +@deftypefun int gsl_odeiv2_control_set_driver (gsl_odeiv2_control * @var{c}, const gsl_odeiv2_driver * @var{d}) +This function sets a pointer of the driver object @var{d} for control +object @var{c}. +@end deftypefun + +@node Evolution +@section Evolution + +The evolution function combines the results of a stepping function and +control function to reliably advance the solution forward one step +using an acceptable step-size. + +@deftypefun {gsl_odeiv2_evolve *} gsl_odeiv2_evolve_alloc (size_t @var{dim}) +@tpindex gsl_odeiv2_evolve +This function returns a pointer to a newly allocated instance of an +evolution function for a system of @var{dim} dimensions. +@end deftypefun + +@deftypefun int gsl_odeiv2_evolve_apply (gsl_odeiv2_evolve * @var{e}, gsl_odeiv2_control * @var{con}, gsl_odeiv2_step * @var{step}, const gsl_odeiv2_system * @var{sys}, double * @var{t}, double @var{t1}, double * @var{h}, double @var{y}[]) +This function advances the system (@var{e}, @var{sys}) from time +@var{t} and position @var{y} using the stepping function @var{step}. +The new time and position are stored in @var{t} and @var{y} on output. + +The initial step-size is taken as @var{h}. The control function +@var{con} is applied to check whether the local error estimated by the +stepping function @var{step} using step-size @var{h} exceeds the +required error tolerance. If the error is too high, the step is +retried by calling @var{step} with a decreased step-size. This process +is continued until an acceptable step-size is found. An estimate of +the local error for the step can be obtained from the components of +the array @code{@var{e}->yerr[]}. + +If the user-supplied functions defined in the system @var{sys} returns +@code{GSL_EBADFUNC}, the function returns immediately with the same +return code. In this case the user must call +@code{gsl_odeiv2_step_reset} and +@code{gsl_odeiv2_evolve_reset} before calling this function again. + +Otherwise, if the user-supplied functions defined in the system +@var{sys} or the stepping function @var{step} return a status other +than @code{GSL_SUCCESS}, the step is retried with a decreased +step-size. If the step-size decreases below machine precision, a +status of @code{GSL_FAILURE} is returned if the user functions +returned @code{GSL_SUCCESS}. Otherwise the value returned by user +function is returned. If no acceptable step can be made, @var{t} and +@var{y} will be restored to their pre-step values and @var{h} contains +the final attempted step-size. + +If the step is successful the function returns a suggested step-size +for the next step in @var{h}. The maximum time @var{t1} is guaranteed +not to be exceeded by the time-step. On the final time-step the value +of @var{t} will be set to @var{t1} exactly. +@end deftypefun + +@deftypefun int gsl_odeiv2_evolve_apply_fixed_step (gsl_odeiv2_evolve * @var{e}, gsl_odeiv2_control * @var{con}, gsl_odeiv2_step * @var{step}, const gsl_odeiv2_system * @var{sys}, double * @var{t}, const double @var{h}, double @var{y}[]) +This function advances the ODE-system (@var{e}, @var{sys}, @var{con}) +from time @var{t} and position @var{y} using the stepping function +@var{step} by a specified step size @var{h}. If the local error +estimated by the stepping function exceeds the desired error level, +the step is not taken and the function returns +@code{GSL_FAILURE}. Otherwise the value returned by user function is +returned. +@end deftypefun + +@deftypefun int gsl_odeiv2_evolve_reset (gsl_odeiv2_evolve * @var{e}) +This function resets the evolution function @var{e}. It should be used +whenever the next use of @var{e} will not be a continuation of a +previous step. +@end deftypefun + +@deftypefun void gsl_odeiv2_evolve_free (gsl_odeiv2_evolve * @var{e}) +This function frees all the memory associated with the evolution function +@var{e}. +@end deftypefun + +@deftypefun int gsl_odeiv2_evolve_set_driver (gsl_odeiv2_evolve * @var{e}, const gsl_odeiv2_driver * @var{d}) +This function sets a pointer of the driver object @var{d} for evolve +object @var{e}. +@end deftypefun + + +@cindex discontinuities, in ODE systems +If a system has discontinuous changes in the derivatives at known +points, it is advisable to evolve the system between each discontinuity +in sequence. For example, if a step-change in an external driving +force occurs at times @math{t_a, t_b} and @math{t_c} then evolution +should be carried out over the ranges @math{(t_0,t_a)}, +@math{(t_a,t_b)}, @math{(t_b,t_c)}, and @math{(t_c,t_1)} separately +and not directly over the range @math{(t_0,t_1)}. + +@node Driver +@section Driver + +The driver object is a high level wrapper that combines the evolution, +control and stepper objects for easy use. + +@deftypefun {gsl_odeiv2_driver *} gsl_odeiv2_driver_alloc_y_new (const gsl_odeiv2_system * @var{sys}, const gsl_odeiv2_step_type * @var{T}, const double @var{hstart}, const double @var{epsabs}, const double @var{epsrel}) +@deftypefunx {gsl_odeiv2_driver *} gsl_odeiv2_driver_alloc_yp_new (const gsl_odeiv2_system * @var{sys}, const gsl_odeiv2_step_type * @var{T}, const double @var{hstart}, const double @var{epsabs}, const double @var{epsrel}) +@deftypefunx {gsl_odeiv2_driver *} gsl_odeiv2_driver_alloc_standard_new (const gsl_odeiv2_system * @var{sys}, const gsl_odeiv2_step_type * @var{T}, const double @var{hstart}, const double @var{epsabs}, const double @var{epsrel}, const double @var{a_y}, const double @var{a_dydt}) +@deftypefunx {gsl_odeiv2_driver *} gsl_odeiv2_driver_alloc_scaled_new (const gsl_odeiv2_system * @var{sys}, const gsl_odeiv2_step_type * @var{T}, const double @var{hstart}, const double @var{epsabs}, const double @var{epsrel}, const double @var{a_y}, const double @var{a_dydt}, const double @var{scale_abs}[]) +These functions return a pointer to a newly allocated instance of a +driver object. The functions automatically allocate and initialise the +evolve, control and stepper objects for ODE system @var{sys} using +stepper type @var{T}. The initial step size is given in +@var{hstart}. The rest of the arguments follow the syntax and +semantics of the control functions with same name +(@code{gsl_odeiv2_control_*_new}). +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver * d, const double hmin) +The function sets a minimum for allowed step size @var{hmin} for +driver @var{d}. Default value is 0. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver * d, const double hmax) +The function sets a maximum for allowed step size @var{hmax} for +driver @var{d}. Default value is @code{GSL_DBL_MAX}. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver * d, const unsigned long int nmax) +The function sets a maximum for allowed number of steps @var{nmax} for +driver @var{d}. Default value of 0 sets no limit for steps. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_apply (gsl_odeiv2_driver * @var{d}, double * @var{t}, const double @var{t1}, double @var{y}[]) +This function evolves the driver system @var{d} from @var{t} to +@var{t1}. Initially vector @var{y} should contain the values of +dependent variables at point @var{t}. If the function is unable to +complete the calculation, an error code from +@code{gsl_odeiv2_evolve_apply} is returned, and @var{t} and @var{y} +contain the values from last successful step. + +If maximum number of steps is reached, a value of @code{GSL_EMAXITER} +is returned. If the step size drops below minimum value, the function +returns with @code{GSL_ENOPROG}. If the user-supplied functions +defined in the system @var{sys} returns @code{GSL_EBADFUNC}, the +function returns immediately with the same return code. In this case +the user must call @code{gsl_odeiv2_driver_reset} before calling this +function again. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_apply_fixed_step (gsl_odeiv2_driver * @var{d}, double * @var{t}, const double @var{h}, const unsigned long int @var{n}, double @var{y}[]) +This function evolves the driver system @var{d} from @var{t} with +@var{n} steps of size @var{h}. If the function is unable to complete +the calculation, an error code from +@code{gsl_odeiv2_evolve_apply_fixed_step} is returned, and @var{t} and +@var{y} contain the values from last successful step. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_reset (gsl_odeiv2_driver * d) +This function resets the evolution and stepper objects. +@end deftypefun + +@deftypefun {int} gsl_odeiv2_driver_free (gsl_odeiv2_driver * d) +This function frees the driver object, and the related evolution, +stepper and control objects. +@end deftypefun + +@node ODE Example programs +@section Examples +@cindex Van der Pol oscillator, example +The following program solves the second-order nonlinear Van der Pol +oscillator equation, +@tex +\beforedisplay +$$ +x\prime\prime(t) + \mu x\prime(t) (x(t)^2 - 1) + x(t) = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x\prime\prime(t) + \mu x\prime(t) (x(t)^2 - 1) + x(t) = 0 +@end example + +@end ifinfo +@noindent +This can be converted into a first order system suitable for use with +the routines described in this chapter by introducing a separate +variable for the velocity, @math{y = x'(t)}, +@tex +\beforedisplay +$$ +\eqalign{ +x\prime &= y\cr +y\prime &= -x + \mu y (1-x^2) +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x\prime = y +y\prime = -x + \mu y (1-x^2) +@end example + +@end ifinfo +@noindent +The program begins by defining functions for these derivatives and +their Jacobian. The main function uses driver level functions to solve +the problem. The program evolves the solution from @math{(y, y\prime) = (1, +0)} at @math{t=0} to @math{t=100}. The step-size @math{h} is +automatically adjusted by the controller to maintain an absolute +accuracy of @c{$10^{-6}$} +@math{10^@{-6@}} in the function values +@var{y}. The loop in the example prints the solution at the points +@math{t_i = 1, 2, \dots, 100}. + +@example +@verbatiminclude examples/ode-initval.c +@end example + +@noindent +The user can work with the lower level functions directly, as in +the following example. In this case an intermediate result is printed +after each successful step instead of equidistant time points. + +@example +@verbatiminclude examples/ode-initval-low-level.c +@end example + +@noindent +For functions with multiple parameters, the appropriate information +can be passed in through the @var{params} argument in +@code{gsl_odeiv2_system} definition (@var{mu} in this example) by using +a pointer to a struct. + +@iftex +@sp 1 +@center @image{vdp,3.4in} +@center Numerical solution of the Van der Pol oscillator equation +@center using Prince-Dormand 8th order Runge-Kutta. +@end iftex + +@noindent +It is also possible to work with a non-adaptive integrator, using only +the stepping function itself, +@code{gsl_odeiv2_driver_apply_fixed_step} or +@code{gsl_odeiv2_evolve_apply_fixed_step}. The following program uses +the driver level function, with fourth-order +Runge-Kutta stepping function with a fixed stepsize of +0.001. + +@example +@verbatiminclude examples/odefixed.c +@end example + +@node ODE References and Further Reading +@section References and Further Reading + +@itemize @w{} +@item +Ascher, U.M., Petzold, L.R., @cite{Computer Methods for Ordinary +Differential and Differential-Algebraic Equations}, SIAM, +Philadelphia, 1998. +@end itemize + +@itemize @w{} +@item +Hairer, E., Norsett, S. P., Wanner, G., @cite{Solving Ordinary Differential +Equations I: Nonstiff Problems}, Springer, Berlin, 1993. +@end itemize + +@itemize @w{} +@item +Hairer, E., Wanner, G., @cite{Solving Ordinary Differential +Equations II: Stiff and Differential-Algebraic Problems}, +Springer, Berlin, 1996. +@end itemize + +Many of the basic Runge-Kutta formulas can be found in the Handbook of +Mathematical Functions, + +@itemize @w{} +@item +Abramowitz & Stegun (eds.), @cite{Handbook of Mathematical Functions}, +Section 25.5. +@end itemize + +@noindent +The implicit Bulirsch-Stoer algorithm @code{bsimp} is described in the +following paper, + +@itemize @w{} +@item +G. Bader and P. Deuflhard, ``A Semi-Implicit Mid-Point Rule for Stiff +Systems of Ordinary Differential Equations.'', Numer.@: Math.@: 41, 373--398, +1983. +@end itemize + +@noindent +The Adams and BDF multistep methods @code{msadams} and @code{msbdf} +are based on the following articles, + +@itemize @w{} +@item +G. D. Byrne and A. C. Hindmarsh, ``A Polyalgorithm for the +Numerical Solution of Ordinary Differential Equations.'', +ACM Trans. Math. Software, 1, 71--96, 1975. + +@item +P. N. Brown, G. D. Byrne and A. C. Hindmarsh, ``VODE: A +Variable-coefficient ODE Solver.'', SIAM J. Sci. Stat. Comput. 10, +1038--1051, 1989. + +@item +A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, +D. E. Shumaker and C. S. Woodward, ``SUNDIALS: Suite of +Nonlinear and Differential/Algebraic Equation Solvers.'', ACM +Trans. Math. Software 31, 363--396, 2005. +@end itemize + diff --git a/software/gsl-1.15/doc/permutation.texi b/software/gsl-1.15/doc/permutation.texi new file mode 100644 index 000000000..e72466dd3 --- /dev/null +++ b/software/gsl-1.15/doc/permutation.texi @@ -0,0 +1,382 @@ +@cindex permutations + +This chapter describes functions for creating and manipulating +permutations. A permutation @math{p} is represented by an array of +@math{n} integers in the range 0 to @math{n-1}, where each value +@math{p_i} occurs once and only once. The application of a permutation +@math{p} to a vector @math{v} yields a new vector @math{v'} where +@c{$v'_i = v_{p_i}$} +@math{v'_i = v_@{p_i@}}. +For example, the array @math{(0,1,3,2)} represents a permutation +which exchanges the last two elements of a four element vector. +The corresponding identity permutation is @math{(0,1,2,3)}. + +Note that the permutations produced by the linear algebra routines +correspond to the exchange of matrix columns, and so should be considered +as applying to row-vectors in the form @math{v' = v P} rather than +column-vectors, when permuting the elements of a vector. + +The functions described in this chapter are defined in the header file +@file{gsl_permutation.h}. + +@menu +* The Permutation struct:: +* Permutation allocation:: +* Accessing permutation elements:: +* Permutation properties:: +* Permutation functions:: +* Applying Permutations:: +* Reading and writing permutations:: +* Permutations in cyclic form:: +* Permutation Examples:: +* Permutation References and Further Reading:: +@end menu + +@node The Permutation struct +@section The Permutation struct +@tpindex gsl_permutation +A permutation is defined by a structure containing two components, the size +of the permutation and a pointer to the permutation array. The elements +of the permutation array are all of type @code{size_t}. The +@code{gsl_permutation} structure looks like this, + +@example +typedef struct +@{ + size_t size; + size_t * data; +@} gsl_permutation; +@end example +@comment + +@noindent + +@node Permutation allocation +@section Permutation allocation + +@deftypefun {gsl_permutation *} gsl_permutation_alloc (size_t @var{n}) +This function allocates memory for a new permutation of size @var{n}. +The permutation is not initialized and its elements are undefined. Use +the function @code{gsl_permutation_calloc} if you want to create a +permutation which is initialized to the identity. A null pointer is +returned if insufficient memory is available to create the permutation. +@end deftypefun + +@deftypefun {gsl_permutation *} gsl_permutation_calloc (size_t @var{n}) +This function allocates memory for a new permutation of size @var{n} and +initializes it to the identity. A null pointer is returned if +insufficient memory is available to create the permutation. +@end deftypefun + +@deftypefun void gsl_permutation_init (gsl_permutation * @var{p}) +@cindex identity permutation +This function initializes the permutation @var{p} to the identity, i.e. +@math{(0,1,2,@dots{},n-1)}. +@end deftypefun + +@deftypefun void gsl_permutation_free (gsl_permutation * @var{p}) +This function frees all the memory used by the permutation @var{p}. +@end deftypefun + +@deftypefun int gsl_permutation_memcpy (gsl_permutation * @var{dest}, const gsl_permutation * @var{src}) +This function copies the elements of the permutation @var{src} into the +permutation @var{dest}. The two permutations must have the same size. +@end deftypefun + +@node Accessing permutation elements +@section Accessing permutation elements + +The following functions can be used to access and manipulate +permutations. + +@deftypefun size_t gsl_permutation_get (const gsl_permutation * @var{p}, const size_t @var{i}) +This function returns the value of the @var{i}-th element of the +permutation @var{p}. If @var{i} lies outside the allowed range of 0 to +@math{@var{n}-1} then the error handler is invoked and 0 is returned. @inlinefn{} +@end deftypefun + +@deftypefun int gsl_permutation_swap (gsl_permutation * @var{p}, const size_t @var{i}, const size_t @var{j}) +@cindex exchanging permutation elements +@cindex swapping permutation elements +This function exchanges the @var{i}-th and @var{j}-th elements of the +permutation @var{p}. +@end deftypefun + +@node Permutation properties +@section Permutation properties + +@deftypefun size_t gsl_permutation_size (const gsl_permutation * @var{p}) +This function returns the size of the permutation @var{p}. +@end deftypefun + +@deftypefun {size_t *} gsl_permutation_data (const gsl_permutation * @var{p}) +This function returns a pointer to the array of elements in the +permutation @var{p}. +@end deftypefun + +@deftypefun int gsl_permutation_valid (const gsl_permutation * @var{p}) +@cindex checking permutation for validity +@cindex testing permutation for validity +This function checks that the permutation @var{p} is valid. The @var{n} +elements should contain each of the numbers 0 to @math{@var{n}-1} once and only +once. +@end deftypefun + +@node Permutation functions +@section Permutation functions + +@deftypefun void gsl_permutation_reverse (gsl_permutation * @var{p}) +@cindex reversing a permutation +This function reverses the elements of the permutation @var{p}. +@end deftypefun + +@deftypefun int gsl_permutation_inverse (gsl_permutation * @var{inv}, const gsl_permutation * @var{p}) +@cindex inverting a permutation +This function computes the inverse of the permutation @var{p}, storing +the result in @var{inv}. +@end deftypefun + +@deftypefun int gsl_permutation_next (gsl_permutation * @var{p}) +@cindex iterating through permutations +This function advances the permutation @var{p} to the next permutation +in lexicographic order and returns @code{GSL_SUCCESS}. If no further +permutations are available it returns @code{GSL_FAILURE} and leaves +@var{p} unmodified. Starting with the identity permutation and +repeatedly applying this function will iterate through all possible +permutations of a given order. +@end deftypefun + +@deftypefun int gsl_permutation_prev (gsl_permutation * @var{p}) +This function steps backwards from the permutation @var{p} to the +previous permutation in lexicographic order, returning +@code{GSL_SUCCESS}. If no previous permutation is available it returns +@code{GSL_FAILURE} and leaves @var{p} unmodified. +@end deftypefun + +@node Applying Permutations +@section Applying Permutations + +@deftypefun int gsl_permute (const size_t * @var{p}, double * @var{data}, size_t @var{stride}, size_t @var{n}) +This function applies the permutation @var{p} to the array @var{data} of +size @var{n} with stride @var{stride}. +@end deftypefun + +@deftypefun int gsl_permute_inverse (const size_t * @var{p}, double * @var{data}, size_t @var{stride}, size_t @var{n}) +This function applies the inverse of the permutation @var{p} to the +array @var{data} of size @var{n} with stride @var{stride}. +@end deftypefun + +@deftypefun int gsl_permute_vector (const gsl_permutation * @var{p}, gsl_vector * @var{v}) +This function applies the permutation @var{p} to the elements of the +vector @var{v}, considered as a row-vector acted on by a permutation +matrix from the right, @math{v' = v P}. The @math{j}-th column of the +permutation matrix @math{P} is given by the @math{@var{p}_j}-th column of the +identity matrix. The permutation @var{p} and the vector @var{v} must +have the same length. +@end deftypefun + +@deftypefun int gsl_permute_vector_inverse (const gsl_permutation * @var{p}, gsl_vector * @var{v}) +This function applies the inverse of the permutation @var{p} to the +elements of the vector @var{v}, considered as a row-vector acted on by +an inverse permutation matrix from the right, @math{v' = v P^T}. Note +that for permutation matrices the inverse is the same as the transpose. +The @math{j}-th column of the permutation matrix @math{P} is given by +the @math{@var{p}_j}-th column of the identity matrix. The permutation @var{p} +and the vector @var{v} must have the same length. +@end deftypefun + +@deftypefun int gsl_permutation_mul (gsl_permutation * @var{p}, const gsl_permutation * @var{pa}, const gsl_permutation * @var{pb}) +This function combines the two permutations @var{pa} and @var{pb} into a +single permutation @var{p}, where @c{$@var{p} = @var{pa} \ast @var{pb}$} +@math{@var{p} = @var{pa} * @var{pb}}. +The permutation @var{p} is equivalent to applying @var{pb} first and +then @var{pa}. +@end deftypefun + +@node Reading and writing permutations +@section Reading and writing permutations + +The library provides functions for reading and writing permutations to a +file as binary data or formatted text. + +@deftypefun int gsl_permutation_fwrite (FILE * @var{stream}, const gsl_permutation * @var{p}) +This function writes the elements of the permutation @var{p} to the +stream @var{stream} in binary format. The function returns +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_permutation_fread (FILE * @var{stream}, gsl_permutation * @var{p}) +This function reads into the permutation @var{p} from the open stream +@var{stream} in binary format. The permutation @var{p} must be +preallocated with the correct length since the function uses the size of +@var{p} to determine how many bytes to read. The function returns +@code{GSL_EFAILED} if there was a problem reading from the file. The +data is assumed to have been written in the native binary format on the +same architecture. +@end deftypefun + +@deftypefun int gsl_permutation_fprintf (FILE * @var{stream}, const gsl_permutation * @var{p}, const char * @var{format}) +This function writes the elements of the permutation @var{p} +line-by-line to the stream @var{stream} using the format specifier +@var{format}, which should be suitable for a type of @var{size_t}. +In ISO C99 the type modifier @code{z} represents @code{size_t}, so +@code{"%zu\n"} is a suitable format.@footnote{In versions of the +GNU C library prior to the ISO C99 standard, +the type modifier @code{Z} was used instead.} +The function returns @code{GSL_EFAILED} if there was a problem writing +to the file. +@end deftypefun + +@deftypefun int gsl_permutation_fscanf (FILE * @var{stream}, gsl_permutation * @var{p}) +This function reads formatted data from the stream @var{stream} into the +permutation @var{p}. The permutation @var{p} must be preallocated with +the correct length since the function uses the size of @var{p} to +determine how many numbers to read. The function returns +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun + +@node Permutations in cyclic form +@section Permutations in cyclic form + +A permutation can be represented in both @dfn{linear} and @dfn{cyclic} +notations. The functions described in this section convert between the +two forms. The linear notation is an index mapping, and has already +been described above. The cyclic notation expresses a permutation as a +series of circular rearrangements of groups of elements, or +@dfn{cycles}. + +For example, under the cycle (1 2 3), 1 is replaced by 2, 2 is replaced +by 3 and 3 is replaced by 1 in a circular fashion. Cycles of different +sets of elements can be combined independently, for example (1 2 3) (4 +5) combines the cycle (1 2 3) with the cycle (4 5), which is an exchange +of elements 4 and 5. A cycle of length one represents an element which +is unchanged by the permutation and is referred to as a @dfn{singleton}. + +It can be shown that every permutation can be decomposed into +combinations of cycles. The decomposition is not unique, but can always +be rearranged into a standard @dfn{canonical form} by a reordering of +elements. The library uses the canonical form defined in Knuth's +@cite{Art of Computer Programming} (Vol 1, 3rd Ed, 1997) Section 1.3.3, +p.178. + +The procedure for obtaining the canonical form given by Knuth is, + +@enumerate +@item Write all singleton cycles explicitly +@item Within each cycle, put the smallest number first +@item Order the cycles in decreasing order of the first number in the cycle. +@end enumerate + +@noindent +For example, the linear representation (2 4 3 0 1) is represented as (1 +4) (0 2 3) in canonical form. The permutation corresponds to an +exchange of elements 1 and 4, and rotation of elements 0, 2 and 3. + +The important property of the canonical form is that it can be +reconstructed from the contents of each cycle without the brackets. In +addition, by removing the brackets it can be considered as a linear +representation of a different permutation. In the example given above +the permutation (2 4 3 0 1) would become (1 4 0 2 3). This mapping has +many applications in the theory of permutations. + +@deftypefun int gsl_permutation_linear_to_canonical (gsl_permutation * @var{q}, const gsl_permutation * @var{p}) +This function computes the canonical form of the permutation @var{p} and +stores it in the output argument @var{q}. +@end deftypefun + +@deftypefun int gsl_permutation_canonical_to_linear (gsl_permutation * @var{p}, const gsl_permutation * @var{q}) +This function converts a permutation @var{q} in canonical form back into +linear form storing it in the output argument @var{p}. +@end deftypefun + +@deftypefun size_t gsl_permutation_inversions (const gsl_permutation * @var{p}) +This function counts the number of inversions in the permutation +@var{p}. An inversion is any pair of elements that are not in order. +For example, the permutation 2031 has three inversions, corresponding to +the pairs (2,0) (2,1) and (3,1). The identity permutation has no +inversions. +@end deftypefun + +@deftypefun size_t gsl_permutation_linear_cycles (const gsl_permutation * @var{p}) +This function counts the number of cycles in the permutation @var{p}, given in linear form. +@end deftypefun + +@deftypefun size_t gsl_permutation_canonical_cycles (const gsl_permutation * @var{q}) +This function counts the number of cycles in the permutation @var{q}, given in canonical form. +@end deftypefun + + +@node Permutation Examples +@section Examples +The example program below creates a random permutation (by shuffling the +elements of the identity) and finds its inverse. + +@example +@verbatiminclude examples/permshuffle.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out +initial permutation: 0 1 2 3 4 5 6 7 8 9 + random permutation: 1 3 5 2 7 6 0 4 9 8 +inverse permutation: 6 0 3 1 7 2 5 4 9 8 +@end example + +@noindent +The random permutation @code{p[i]} and its inverse @code{q[i]} are +related through the identity @code{p[q[i]] = i}, which can be verified +from the output. + +The next example program steps forwards through all possible third order +permutations, starting from the identity, + +@example +@verbatiminclude examples/permseq.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out + 0 1 2 + 0 2 1 + 1 0 2 + 1 2 0 + 2 0 1 + 2 1 0 +@end example + +@noindent +The permutations are generated in lexicographic order. To reverse the +sequence, begin with the final permutation (which is the reverse of the +identity) and replace @code{gsl_permutation_next} with +@code{gsl_permutation_prev}. + +@node Permutation References and Further Reading +@section References and Further Reading + +The subject of permutations is covered extensively in Knuth's +@cite{Sorting and Searching}, + +@itemize @w{} +@item +Donald E. Knuth, @cite{The Art of Computer Programming: Sorting and +Searching} (Vol 3, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. +@end itemize + +@noindent +For the definition of the @dfn{canonical form} see, + +@itemize @w{} +@item +Donald E. Knuth, @cite{The Art of Computer Programming: Fundamental +Algorithms} (Vol 1, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. +Section 1.3.3, @cite{An Unusual Correspondence}, p.178--179. +@end itemize + diff --git a/software/gsl-1.15/doc/poly.texi b/software/gsl-1.15/doc/poly.texi new file mode 100644 index 000000000..2b9bea397 --- /dev/null +++ b/software/gsl-1.15/doc/poly.texi @@ -0,0 +1,322 @@ +@cindex polynomials, roots of + +This chapter describes functions for evaluating and solving polynomials. +There are routines for finding real and complex roots of quadratic and +cubic equations using analytic methods. An iterative polynomial solver +is also available for finding the roots of general polynomials with real +coefficients (of any order). The functions are declared in the header +file @file{gsl_poly.h}. + +@menu +* Polynomial Evaluation:: +* Divided Difference Representation of Polynomials:: +* Quadratic Equations:: +* Cubic Equations:: +* General Polynomial Equations:: +* Roots of Polynomials Examples:: +* Roots of Polynomials References and Further Reading:: +@end menu + +@node Polynomial Evaluation +@section Polynomial Evaluation +@cindex polynomial evaluation +@cindex evaluation of polynomials + +The functions described here evaluate the polynomial +@c{$P(x) = c[0] + c[1] x + c[2] x^2 + \dots + c[len-1] x^{len-1}$} +@math{P(x) = c[0] + c[1] x + c[2] x^2 + \dots + c[len-1] x^@{len-1@}} using +Horner's method for stability. @inlinefns{} + +@deftypefun double gsl_poly_eval (const double @var{c}[], const int @var{len}, const double @var{x}) +This function evaluates a polynomial with real coefficients for the real variable @var{x}. +@end deftypefun + +@deftypefun gsl_complex gsl_poly_complex_eval (const double @var{c}[], const int @var{len}, const gsl_complex @var{z}) +This function evaluates a polynomial with real coefficients for the complex variable @var{z}. +@end deftypefun + +@deftypefun gsl_complex gsl_complex_poly_complex_eval (const gsl_complex @var{c}[], const int @var{len}, const gsl_complex @var{z}) +This function evaluates a polynomial with complex coefficients for the complex variable @var{z}. +@end deftypefun + +@deftypefun int gsl_poly_eval_derivs (const double @var{c}[], const size_t @var{lenc}, const double @var{x}, double @var{res}[], const size_t @var{lenres}) +This function evaluates a polynomial and its derivatives storing the +results in the array @var{res} of size @var{lenres}. The output array +contains the values of @math{d^k P/d x^k} for the specified value of +@var{x} starting with @math{k = 0}. +@end deftypefun + +@node Divided Difference Representation of Polynomials +@section Divided Difference Representation of Polynomials +@cindex divided differences, polynomials +@cindex evaluation of polynomials, in divided difference form + +The functions described here manipulate polynomials stored in Newton's +divided-difference representation. The use of divided-differences is +described in Abramowitz & Stegun sections 25.1.4 and 25.2.26. + +@deftypefun int gsl_poly_dd_init (double @var{dd}[], const double @var{xa}[], const double @var{ya}[], size_t @var{size}) +This function computes a divided-difference representation of the +interpolating polynomial for the points (@var{xa}, @var{ya}) stored in +the arrays @var{xa} and @var{ya} of length @var{size}. On output the +divided-differences of (@var{xa},@var{ya}) are stored in the array +@var{dd}, also of length @var{size}. +@end deftypefun + +@deftypefun double gsl_poly_dd_eval (const double @var{dd}[], const double @var{xa}[], const size_t @var{size}, const double @var{x}) +This function evaluates the polynomial stored in divided-difference form +in the arrays @var{dd} and @var{xa} of length @var{size} at the point +@var{x}. @inlinefn{} +@end deftypefun + +@deftypefun int gsl_poly_dd_taylor (double @var{c}[], double @var{xp}, const double @var{dd}[], const double @var{xa}[], size_t @var{size}, double @var{w}[]) +This function converts the divided-difference representation of a +polynomial to a Taylor expansion. The divided-difference representation +is supplied in the arrays @var{dd} and @var{xa} of length @var{size}. +On output the Taylor coefficients of the polynomial expanded about the +point @var{xp} are stored in the array @var{c} also of length +@var{size}. A workspace of length @var{size} must be provided in the +array @var{w}. +@end deftypefun + +@node Quadratic Equations +@section Quadratic Equations +@cindex quadratic equation, solving + +@deftypefun int gsl_poly_solve_quadratic (double @var{a}, double @var{b}, double @var{c}, double * @var{x0}, double * @var{x1}) +This function finds the real roots of the quadratic equation, +@tex +\beforedisplay +$$ +a x^2 + b x + c = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +a x^2 + b x + c = 0 +@end example + +@end ifinfo +@noindent +The number of real roots (either zero, one or two) is returned, and +their locations are stored in @var{x0} and @var{x1}. If no real roots +are found then @var{x0} and @var{x1} are not modified. If one real root +is found (i.e. if @math{a=0}) then it is stored in @var{x0}. When two +real roots are found they are stored in @var{x0} and @var{x1} in +ascending order. The case of coincident roots is not considered +special. For example @math{(x-1)^2=0} will have two roots, which happen +to have exactly equal values. + +The number of roots found depends on the sign of the discriminant +@math{b^2 - 4 a c}. This will be subject to rounding and cancellation +errors when computed in double precision, and will also be subject to +errors if the coefficients of the polynomial are inexact. These errors +may cause a discrete change in the number of roots. However, for +polynomials with small integer coefficients the discriminant can always +be computed exactly. + +@end deftypefun + +@deftypefun int gsl_poly_complex_solve_quadratic (double @var{a}, double @var{b}, double @var{c}, gsl_complex * @var{z0}, gsl_complex * @var{z1}) + +This function finds the complex roots of the quadratic equation, +@tex +\beforedisplay +$$ +a z^2 + b z + c = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +a z^2 + b z + c = 0 +@end example + +@end ifinfo +@noindent +The number of complex roots is returned (either one or two) and the +locations of the roots are stored in @var{z0} and @var{z1}. The roots +are returned in ascending order, sorted first by their real components +and then by their imaginary components. If only one real root is found +(i.e. if @math{a=0}) then it is stored in @var{z0}. + +@end deftypefun + + +@node Cubic Equations +@section Cubic Equations +@cindex cubic equation, solving + +@deftypefun int gsl_poly_solve_cubic (double @var{a}, double @var{b}, double @var{c}, double * @var{x0}, double * @var{x1}, double * @var{x2}) + +This function finds the real roots of the cubic equation, +@tex +\beforedisplay +$$ +x^3 + a x^2 + b x + c = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x^3 + a x^2 + b x + c = 0 +@end example + +@end ifinfo +@noindent +with a leading coefficient of unity. The number of real roots (either +one or three) is returned, and their locations are stored in @var{x0}, +@var{x1} and @var{x2}. If one real root is found then only @var{x0} +is modified. When three real roots are found they are stored in +@var{x0}, @var{x1} and @var{x2} in ascending order. The case of +coincident roots is not considered special. For example, the equation +@math{(x-1)^3=0} will have three roots with exactly equal values. As +in the quadratic case, finite precision may cause equal or +closely-spaced real roots to move off the real axis into the complex +plane, leading to a discrete change in the number of real roots. +@end deftypefun + +@deftypefun int gsl_poly_complex_solve_cubic (double @var{a}, double @var{b}, double @var{c}, gsl_complex * @var{z0}, gsl_complex * @var{z1}, gsl_complex * @var{z2}) + +This function finds the complex roots of the cubic equation, +@tex +\beforedisplay +$$ +z^3 + a z^2 + b z + c = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z^3 + a z^2 + b z + c = 0 +@end example + +@end ifinfo +@noindent +The number of complex roots is returned (always three) and the locations +of the roots are stored in @var{z0}, @var{z1} and @var{z2}. The roots +are returned in ascending order, sorted first by their real components +and then by their imaginary components. + +@end deftypefun + + +@node General Polynomial Equations +@section General Polynomial Equations +@cindex general polynomial equations, solving + +The roots of polynomial equations cannot be found analytically beyond +the special cases of the quadratic, cubic and quartic equation. The +algorithm described in this section uses an iterative method to find the +approximate locations of roots of higher order polynomials. + +@deftypefun {gsl_poly_complex_workspace *} gsl_poly_complex_workspace_alloc (size_t @var{n}) +@tpindex gsl_poly_complex_workspace +This function allocates space for a @code{gsl_poly_complex_workspace} +struct and a workspace suitable for solving a polynomial with @var{n} +coefficients using the routine @code{gsl_poly_complex_solve}. + +The function returns a pointer to the newly allocated +@code{gsl_poly_complex_workspace} if no errors were detected, and a null +pointer in the case of error. +@end deftypefun + +@deftypefun void gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * @var{w}) +This function frees all the memory associated with the workspace +@var{w}. +@end deftypefun + +@deftypefun int gsl_poly_complex_solve (const double * @var{a}, size_t @var{n}, gsl_poly_complex_workspace * @var{w}, gsl_complex_packed_ptr @var{z}) +This function computes the roots of the general polynomial +@c{$P(x) = a_0 + a_1 x + a_2 x^2 + ... + a_{n-1} x^{n-1}$} +@math{P(x) = a_0 + a_1 x + a_2 x^2 + ... + a_@{n-1@} x^@{n-1@}} using +balanced-QR reduction of the companion matrix. The parameter @var{n} +specifies the length of the coefficient array. The coefficient of the +highest order term must be non-zero. The function requires a workspace +@var{w} of the appropriate size. The @math{n-1} roots are returned in +the packed complex array @var{z} of length @math{2(n-1)}, alternating +real and imaginary parts. + +The function returns @code{GSL_SUCCESS} if all the roots are found. If +the QR reduction does not converge, the error handler is invoked with +an error code of @code{GSL_EFAILED}. Note that due to finite precision, +roots of higher multiplicity are returned as a cluster of simple roots +with reduced accuracy. The solution of polynomials with higher-order +roots requires specialized algorithms that take the multiplicity +structure into account (see e.g. Z. Zeng, Algorithm 835, ACM +Transactions on Mathematical Software, Volume 30, Issue 2 (2004), pp +218--236). +@end deftypefun + +@node Roots of Polynomials Examples +@section Examples + +To demonstrate the use of the general polynomial solver we will take the +polynomial @math{P(x) = x^5 - 1} which has the following roots, +@tex +\beforedisplay +$$ +1, e^{2\pi i /5}, e^{4\pi i /5}, e^{6\pi i /5}, e^{8\pi i /5} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +1, e^@{2\pi i /5@}, e^@{4\pi i /5@}, e^@{6\pi i /5@}, e^@{8\pi i /5@} +@end example + +@end ifinfo +@noindent +The following program will find these roots. + +@example +@verbatiminclude examples/polyroots.c +@end example + +@noindent +The output of the program is, + +@example +$ ./a.out +@verbatiminclude examples/polyroots.out +@end example + +@noindent +which agrees with the analytic result, @math{z_n = \exp(2 \pi n i/5)}. + +@node Roots of Polynomials References and Further Reading +@section References and Further Reading + +The balanced-QR method and its error analysis are described in the +following papers, + +@itemize @w{} +@item +R.S. Martin, G. Peters and J.H. Wilkinson, ``The QR Algorithm for Real +Hessenberg Matrices'', @cite{Numerische Mathematik}, 14 (1970), 219--231. + +@item +B.N. Parlett and C. Reinsch, ``Balancing a Matrix for Calculation of +Eigenvalues and Eigenvectors'', @cite{Numerische Mathematik}, 13 (1969), +293--304. + +@item +A. Edelman and H. Murakami, ``Polynomial roots from companion matrix +eigenvalues'', @cite{Mathematics of Computation}, Vol.@: 64, No.@: 210 +(1995), 763--776. +@end itemize + +@noindent +The formulas for divided differences are given in Abramowitz and Stegun, + +@itemize @w{} +@item +Abramowitz and Stegun, @cite{Handbook of Mathematical Functions}, +Sections 25.1.4 and 25.2.26. +@end itemize diff --git a/software/gsl-1.15/doc/qrng.eps b/software/gsl-1.15/doc/qrng.eps new file mode 100644 index 000000000..2fa00f1e2 --- /dev/null +++ b/software/gsl-1.15/doc/qrng.eps @@ -0,0 +1,1420 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tmp.ps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Tue Apr 17 17:18:33 2001 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 302 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +420 280 M +63 0 V +4529 0 R +-63 0 V +336 280 M +(0) Rshow +420 739 M +63 0 V +4529 0 R +-63 0 V +336 739 M +(0.1) Rshow +420 1198 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.2) Rshow +420 1658 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.3) Rshow +420 2117 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.4) Rshow +420 2576 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.5) Rshow +420 3035 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.6) Rshow +420 3494 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.7) Rshow +420 3954 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.8) Rshow +420 4413 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(0.9) Rshow +420 4872 M +63 0 V +4529 0 R +-63 0 V +-4613 0 R +(1) Rshow +420 280 M +0 63 V +0 4529 R +0 -63 V +420 140 M +(0) Cshow +879 280 M +0 63 V +0 4529 R +0 -63 V +879 140 M +(0.1) Cshow +1338 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.2) Cshow +1798 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.3) Cshow +2257 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.4) Cshow +2716 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.5) Cshow +3175 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.6) Cshow +3634 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.7) Cshow +4094 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.8) Cshow +4553 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(0.9) Cshow +5012 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(1) Cshow +1.000 UL +LTb +420 280 M +4592 0 V +0 4592 V +-4592 0 V +420 280 L +1.000 UP +1.000 UL +LT0 +2716 2576 Pls +3864 1428 Pls +1568 3724 Pls +2142 2002 Pls +4438 4298 Pls +3290 854 Pls +994 3150 Pls +1281 1715 Pls +3577 4011 Pls +4725 567 Pls +2429 2863 Pls +1855 1141 Pls +4151 3437 Pls +3003 2289 Pls +707 4585 Pls +851 2433 Pls +3147 4729 Pls +4295 1285 Pls +1999 3581 Pls +2573 711 Pls +4869 3007 Pls +3721 1859 Pls +1425 4155 Pls +1138 998 Pls +3434 3294 Pls +4582 2146 Pls +2286 4442 Pls +1712 1572 Pls +4008 3868 Pls +2860 424 Pls +564 2720 Pls +635 1500 Pls +2931 3796 Pls +4079 352 Pls +1783 2648 Pls +2357 926 Pls +4653 3222 Pls +3505 2074 Pls +1209 4370 Pls +1496 639 Pls +3792 2935 Pls +4940 1787 Pls +2644 4083 Pls +2070 2361 Pls +4366 4657 Pls +3218 1213 Pls +922 3509 Pls +779 1356 Pls +3075 3652 Pls +4223 2504 Pls +1927 4800 Pls +2501 1930 Pls +4797 4226 Pls +3649 782 Pls +1353 3078 Pls +1066 2217 Pls +3362 4513 Pls +4510 1069 Pls +2214 3365 Pls +1640 495 Pls +3936 2791 Pls +2788 1643 Pls +492 3939 Pls +528 2110 Pls +2824 4406 Pls +3972 962 Pls +1676 3258 Pls +2250 388 Pls +4546 2684 Pls +3398 1536 Pls +1102 3832 Pls +1389 1249 Pls +3685 3545 Pls +4833 2397 Pls +2537 4693 Pls +1963 1823 Pls +4259 4119 Pls +3111 675 Pls +815 2971 Pls +958 818 Pls +3254 3114 Pls +4402 1966 Pls +2106 4262 Pls +2680 2540 Pls +4976 4836 Pls +3828 1392 Pls +1532 3688 Pls +1245 1679 Pls +3541 3975 Pls +4689 531 Pls +2393 2827 Pls +1819 1105 Pls +4115 3401 Pls +2967 2253 Pls +671 4549 Pls +599 890 Pls +2895 3186 Pls +4043 2038 Pls +1747 4334 Pls +2321 1464 Pls +4617 3760 Pls +3469 316 Pls +1173 2612 Pls +1460 2325 Pls +3756 4621 Pls +4904 1177 Pls +2608 3473 Pls +2034 603 Pls +4330 2899 Pls +3182 1751 Pls +886 4047 Pls +743 1894 Pls +3039 4190 Pls +4187 746 Pls +1891 3042 Pls +2465 1320 Pls +4761 3616 Pls +3613 2468 Pls +1317 4764 Pls +1030 459 Pls +3326 2755 Pls +4474 1607 Pls +2178 3903 Pls +1604 2181 Pls +3900 4477 Pls +2752 1033 Pls +456 3329 Pls +474 1805 Pls +2770 4101 Pls +3918 657 Pls +1622 2953 Pls +2196 1231 Pls +4492 3527 Pls +3344 2379 Pls +1048 4675 Pls +1335 370 Pls +3631 2666 Pls +4779 1518 Pls +2483 3814 Pls +1909 2092 Pls +4205 4388 Pls +3057 944 Pls +761 3240 Pls +904 1087 Pls +3200 3383 Pls +4348 2235 Pls +2052 4531 Pls +2626 1661 Pls +4922 3957 Pls +3774 513 Pls +1478 2809 Pls +1191 2522 Pls +3487 4818 Pls +4635 1374 Pls +2339 3670 Pls +1765 800 Pls +4061 3096 Pls +2913 1948 Pls +617 4244 Pls +689 585 Pls +2985 2881 Pls +4133 1733 Pls +1837 4029 Pls +2411 2307 Pls +4707 4603 Pls +3559 1159 Pls +1263 3455 Pls +1550 1446 Pls +3846 3742 Pls +4994 298 Pls +2698 2594 Pls +2124 872 Pls +4420 3168 Pls +3272 2020 Pls +976 4316 Pls +833 2163 Pls +3129 4459 Pls +4277 1015 Pls +1981 3311 Pls +2555 441 Pls +4851 2737 Pls +3703 1589 Pls +1407 3885 Pls +1120 1302 Pls +3416 3598 Pls +4564 2450 Pls +2268 4746 Pls +1694 1876 Pls +3990 4172 Pls +2842 728 Pls +546 3024 Pls +510 1195 Pls +2806 3491 Pls +3954 2343 Pls +1658 4639 Pls +2232 1769 Pls +4528 4065 Pls +3380 621 Pls +1084 2917 Pls +1371 2056 Pls +3667 4352 Pls +4815 908 Pls +2519 3204 Pls +1945 334 Pls +4241 2630 Pls +3093 1482 Pls +797 3778 Pls +940 1625 Pls +3236 3921 Pls +4384 477 Pls +2088 2773 Pls +2662 1051 Pls +4958 3347 Pls +3810 2199 Pls +1514 4495 Pls +1227 764 Pls +3523 3060 Pls +4671 1912 Pls +2375 4208 Pls +1801 2486 Pls +4097 4782 Pls +2949 1338 Pls +653 3634 Pls +581 2415 Pls +2877 4711 Pls +4025 1267 Pls +1729 3563 Pls +2303 693 Pls +4599 2989 Pls +3451 1841 Pls +1155 4137 Pls +1442 980 Pls +3738 3276 Pls +4886 2128 Pls +2590 4424 Pls +2016 1554 Pls +4312 3850 Pls +3164 406 Pls +868 2702 Pls +725 549 Pls +3021 2845 Pls +4169 1697 Pls +1873 3993 Pls +2447 2271 Pls +4743 4567 Pls +3595 1123 Pls +1299 3419 Pls +1012 1984 Pls +3308 4280 Pls +4456 836 Pls +2160 3132 Pls +1586 1410 Pls +3882 3706 Pls +2734 2558 Pls +438 4854 Pls +447 2567 Pls +2743 4863 Pls +3891 1419 Pls +1595 3715 Pls +2169 845 Pls +4465 3141 Pls +3317 1993 Pls +1021 4289 Pls +1308 1132 Pls +3604 3428 Pls +4752 2280 Pls +2456 4576 Pls +1882 1706 Pls +4178 4002 Pls +3030 558 Pls +734 2854 Pls +877 415 Pls +3173 2711 Pls +4321 1563 Pls +2025 3859 Pls +2599 2137 Pls +4895 4433 Pls +3747 989 Pls +1451 3285 Pls +1164 1850 Pls +3460 4146 Pls +4608 702 Pls +2312 2998 Pls +1738 1276 Pls +4034 3572 Pls +2886 2424 Pls +590 4720 Pls +662 1347 Pls +2958 3643 Pls +4106 2495 Pls +1810 4791 Pls +2384 1921 Pls +4680 4217 Pls +3532 773 Pls +1236 3069 Pls +1523 2208 Pls +3819 4504 Pls +4967 1060 Pls +2671 3356 Pls +2097 486 Pls +4393 2782 Pls +3245 1634 Pls +949 3930 Pls +806 1491 Pls +3102 3787 Pls +4250 343 Pls +1954 2639 Pls +2528 917 Pls +4824 3213 Pls +3676 2065 Pls +1380 4361 Pls +1093 630 Pls +3389 2926 Pls +4537 1778 Pls +2241 4074 Pls +1667 2352 Pls +3963 4648 Pls +2815 1204 Pls +519 3500 Pls +555 737 Pls +2851 3033 Pls +3999 1885 Pls +1703 4181 Pls +2277 2459 Pls +4573 4755 Pls +3425 1311 Pls +1129 3607 Pls +1416 1598 Pls +3712 3894 Pls +4860 450 Pls +2564 2746 Pls +1990 1024 Pls +4286 3320 Pls +3138 2172 Pls +842 4468 Pls +985 2029 Pls +3281 4325 Pls +4429 881 Pls +2133 3177 Pls +2707 307 Pls +5003 2603 Pls +3855 1455 Pls +1559 3751 Pls +1272 1168 Pls +3568 3464 Pls +4716 2316 Pls +2420 4612 Pls +1846 1742 Pls +4142 4038 Pls +2994 594 Pls +698 2890 Pls +626 1957 Pls +2922 4253 Pls +4070 809 Pls +1774 3105 Pls +2348 1383 Pls +4644 3679 Pls +3496 2531 Pls +1200 4827 Pls +1487 522 Pls +3783 2818 Pls +4931 1670 Pls +2635 3966 Pls +2061 2244 Pls +4357 4540 Pls +3209 1096 Pls +913 3392 Pls +770 953 Pls +3066 3249 Pls +4214 2101 Pls +1918 4397 Pls +2492 1527 Pls +4788 3823 Pls +3640 379 Pls +1344 2675 Pls +1057 2388 Pls +3353 4684 Pls +4501 1240 Pls +2205 3536 Pls +1631 666 Pls +3927 2962 Pls +2779 1814 Pls +483 4110 Pls +465 1042 Pls +2761 3338 Pls +3909 2190 Pls +1613 4486 Pls +2187 1616 Pls +4483 3912 Pls +3335 468 Pls +1039 2764 Pls +1326 2477 Pls +3622 4773 Pls +4770 1329 Pls +2474 3625 Pls +1900 755 Pls +4196 3051 Pls +3048 1903 Pls +752 4199 Pls +895 1760 Pls +3191 4056 Pls +4339 612 Pls +2043 2908 Pls +2617 1186 Pls +4913 3482 Pls +3765 2334 Pls +1469 4630 Pls +1182 325 Pls +3478 2621 Pls +4626 1473 Pls +2330 3769 Pls +1756 2047 Pls +4052 4343 Pls +2904 899 Pls +608 3195 Pls +680 2262 Pls +2976 4558 Pls +4124 1114 Pls +1828 3410 Pls +2402 540 Pls +4698 2836 Pls +3550 1688 Pls +1254 3984 Pls +1541 1401 Pls +3837 3697 Pls +4985 2549 Pls +2689 4845 Pls +2115 1975 Pls +4411 4271 Pls +3263 827 Pls +967 3123 Pls +824 684 Pls +3120 2980 Pls +4268 1832 Pls +1972 4128 Pls +2546 2406 Pls +4842 4702 Pls +3694 1258 Pls +1398 3554 Pls +1111 1545 Pls +3407 3841 Pls +4555 397 Pls +2259 2693 Pls +1685 971 Pls +3981 3267 Pls +2833 2119 Pls +537 4415 Pls +501 1652 Pls +2797 3948 Pls +3945 504 Pls +1649 2800 Pls +2223 1078 Pls +4519 3374 Pls +3371 2226 Pls +1075 4522 Pls +1362 791 Pls +3658 3087 Pls +4806 1939 Pls +2510 4235 Pls +1936 2513 Pls +4232 4809 Pls +3084 1365 Pls +788 3661 Pls +931 1222 Pls +3227 3518 Pls +4375 2370 Pls +2079 4666 Pls +2653 1796 Pls +4949 4092 Pls +3801 648 Pls +1505 2944 Pls +1218 2083 Pls +3514 4379 Pls +4662 935 Pls +2366 3231 Pls +1792 361 Pls +4088 2657 Pls +2940 1509 Pls +644 3805 Pls +572 432 Pls +2868 2728 Pls +4016 1580 Pls +1720 3876 Pls +2294 2154 Pls +4590 4450 Pls +3442 1006 Pls +1146 3302 Pls +1433 1867 Pls +3729 4163 Pls +4877 719 Pls +2581 3015 Pls +2007 1293 Pls +4303 3589 Pls +3155 2441 Pls +859 4737 Pls +716 2298 Pls +3012 4594 Pls +4160 1150 Pls +1864 3446 Pls +2438 576 Pls +4734 2872 Pls +3586 1724 Pls +1290 4020 Pls +1003 863 Pls +3299 3159 Pls +4447 2011 Pls +2151 4307 Pls +1577 1437 Pls +3873 3733 Pls +2725 289 Pls +429 2585 Pls +433 1433 Pls +2729 3729 Pls +3877 285 Pls +1581 2581 Pls +2155 859 Pls +4451 3155 Pls +3303 2007 Pls +1007 4303 Pls +1294 572 Pls +3590 2868 Pls +4738 1720 Pls +2442 4016 Pls +1868 2294 Pls +4164 4590 Pls +3016 1146 Pls +720 3442 Pls +864 1289 Pls +3160 3585 Pls +4308 2437 Pls +2012 4733 Pls +2586 1863 Pls +4882 4159 Pls +3734 715 Pls +1438 3011 Pls +1151 2150 Pls +3447 4446 Pls +4595 1002 Pls +2299 3298 Pls +1725 428 Pls +4021 2724 Pls +2873 1576 Pls +577 3872 Pls +649 356 Pls +2945 2652 Pls +4093 1504 Pls +1797 3800 Pls +2371 2078 Pls +4667 4374 Pls +3519 930 Pls +1223 3226 Pls +1510 1791 Pls +3806 4087 Pls +4954 643 Pls +2658 2939 Pls +2084 1217 Pls +4380 3513 Pls +3232 2365 Pls +936 4661 Pls +792 2509 Pls +3088 4805 Pls +4236 1361 Pls +1940 3657 Pls +2514 787 Pls +4810 3083 Pls +3662 1935 Pls +1366 4231 Pls +1079 1074 Pls +3375 3370 Pls +4523 2222 Pls +2227 4518 Pls +1653 1648 Pls +3949 3944 Pls +2801 500 Pls +505 2796 Pls +541 966 Pls +2837 3262 Pls +3985 2114 Pls +1689 4410 Pls +2263 1540 Pls +4559 3836 Pls +3411 392 Pls +1115 2688 Pls +1402 2401 Pls +3698 4697 Pls +4846 1253 Pls +2550 3549 Pls +1976 679 Pls +4272 2975 Pls +3124 1827 Pls +828 4123 Pls +972 1971 Pls +3268 4267 Pls +4416 823 Pls +2120 3119 Pls +2694 1397 Pls +4990 3693 Pls +3842 2545 Pls +1546 4841 Pls +1259 536 Pls +3555 2832 Pls +4703 1684 Pls +2407 3980 Pls +1833 2258 Pls +4129 4554 Pls +2981 1110 Pls +685 3406 Pls +613 2042 Pls +2909 4338 Pls +4057 894 Pls +1761 3190 Pls +2335 320 Pls +4631 2616 Pls +3483 1468 Pls +1187 3764 Pls +1474 1181 Pls +3770 3477 Pls +4918 2329 Pls +2622 4625 Pls +2048 1755 Pls +4344 4051 Pls +3196 607 Pls +900 2903 Pls +756 751 Pls +3052 3047 Pls +4200 1899 Pls +1904 4195 Pls +2478 2473 Pls +4774 4769 Pls +3626 1325 Pls +1330 3621 Pls +1043 1612 Pls +3339 3908 Pls +4487 464 Pls +2191 2760 Pls +1617 1038 Pls +3913 3334 Pls +2765 2186 Pls +469 4482 Pls +487 661 Pls +2783 2957 Pls +3931 1809 Pls +1635 4105 Pls +2209 2383 Pls +4505 4679 Pls +3357 1235 Pls +1061 3531 Pls +1348 1522 Pls +3644 3818 Pls +4792 374 Pls +2496 2670 Pls +1922 948 Pls +4218 3244 Pls +3070 2096 Pls +774 4392 Pls +918 2240 Pls +3214 4536 Pls +4362 1092 Pls +2066 3388 Pls +2640 518 Pls +4936 2814 Pls +3788 1666 Pls +1492 3962 Pls +1205 1379 Pls +3501 3675 Pls +4649 2527 Pls +2353 4823 Pls +1779 1953 Pls +4075 4249 Pls +2927 805 Pls +631 3101 Pls +702 1737 Pls +2998 4033 Pls +4146 589 Pls +1850 2885 Pls +2424 1163 Pls +4720 3459 Pls +3572 2311 Pls +1276 4607 Pls +1563 302 Pls +3859 2598 Pls +5007 1450 Pls +2711 3746 Pls +2137 2024 Pls +4433 4320 Pls +3285 876 Pls +989 3172 Pls +846 1020 Pls +3142 3316 Pls +4290 2168 Pls +1994 4464 Pls +2568 1594 Pls +4864 3890 Pls +3716 446 Pls +1420 2742 Pls +1133 2455 Pls +3429 4751 Pls +4577 1307 Pls +2281 3603 Pls +1707 733 Pls +4003 3029 Pls +2855 1881 Pls +559 4177 Pls +523 2347 Pls +2819 4643 Pls +3967 1199 Pls +1671 3495 Pls +2245 625 Pls +4541 2921 Pls +3393 1773 Pls +1097 4069 Pls +1384 912 Pls +3680 3208 Pls +4828 2060 Pls +2532 4356 Pls +1958 1486 Pls +4254 3782 Pls +3106 338 Pls +810 2634 Pls +954 482 Pls +3250 2778 Pls +4398 1630 Pls +2102 3926 Pls +2676 2204 Pls +4972 4500 Pls +3824 1056 Pls +1528 3352 Pls +1241 1917 Pls +3537 4213 Pls +4685 769 Pls +2389 3065 Pls +1815 1343 Pls +4111 3639 Pls +2963 2491 Pls +667 4787 Pls +595 1271 Pls +2891 3567 Pls +4039 2419 Pls +1743 4715 Pls +2317 1845 Pls +4613 4141 Pls +3465 697 Pls +1169 2993 Pls +1456 2132 Pls +3752 4428 Pls +4900 984 Pls +2604 3280 Pls +2030 410 Pls +4326 2706 Pls +3178 1558 Pls +882 3854 Pls +738 1702 Pls +3034 3998 Pls +4182 554 Pls +1886 2850 Pls +2460 1128 Pls +4756 3424 Pls +3608 2276 Pls +1312 4572 Pls +1025 841 Pls +3321 3137 Pls +4469 1989 Pls +2173 4285 Pls +1599 2563 Pls +3895 4859 Pls +2747 1415 Pls +451 3711 Pls +442 1423 Pls +2738 3719 Pls +3886 2571 Pls +1590 4867 Pls +2164 1997 Pls +4460 4293 Pls +3312 849 Pls +1016 3145 Pls +1303 2284 Pls +3599 4580 Pls +4747 1136 Pls +2451 3432 Pls +1877 562 Pls +4173 2858 Pls +3025 1710 Pls +729 4006 Pls +873 1567 Pls +3169 3863 Pls +4317 419 Pls +2021 2715 Pls +2595 993 Pls +4891 3289 Pls +3743 2141 Pls +1447 4437 Pls +1160 706 Pls +3456 3002 Pls +4604 1854 Pls +2308 4150 Pls +1734 2428 Pls +4030 4724 Pls +2882 1280 Pls +586 3576 Pls +658 2500 Pls +2954 4796 Pls +4102 1352 Pls +1806 3648 Pls +2380 778 Pls +4676 3074 Pls +3528 1926 Pls +1232 4222 Pls +1519 1065 Pls +3815 3361 Pls +4963 2213 Pls +2667 4509 Pls +2093 1639 Pls +4389 3935 Pls +3241 491 Pls +945 2787 Pls +801 347 Pls +3097 2643 Pls +4245 1495 Pls +1949 3791 Pls +2523 2069 Pls +4819 4365 Pls +3671 921 Pls +1375 3217 Pls +1088 1782 Pls +3384 4078 Pls +4532 634 Pls +2236 2930 Pls +1662 1208 Pls +3958 3504 Pls +2810 2356 Pls +514 4652 Pls +550 1890 Pls +2846 4186 Pls +3994 742 Pls +1698 3038 Pls +2272 1316 Pls +4568 3612 Pls +3420 2464 Pls +1124 4760 Pls +1411 455 Pls +3707 2751 Pls +4855 1603 Pls +2559 3899 Pls +1985 2177 Pls +4281 4473 Pls +3133 1029 Pls +837 3325 Pls +981 885 Pls +3277 3181 Pls +4425 2033 Pls +2129 4329 Pls +2703 1459 Pls +4999 3755 Pls +3851 311 Pls +1555 2607 Pls +1268 2320 Pls +3564 4616 Pls +4712 1172 Pls +2416 3468 Pls +1842 598 Pls +4138 2894 Pls +2990 1746 Pls +694 4042 Pls +622 814 Pls +2918 3110 Pls +4066 1962 Pls +1770 4258 Pls +2344 2536 Pls +4640 4832 Pls +3492 1388 Pls +1196 3684 Pls +1483 1675 Pls +3779 3971 Pls +4927 527 Pls +2631 2823 Pls +2057 1101 Pls +4353 3397 Pls +3205 2249 Pls +909 4545 Pls +765 2105 Pls +3061 4401 Pls +4209 957 Pls +1913 3253 Pls +2487 383 Pls +4783 2679 Pls +3635 1531 Pls +1339 3827 Pls +1052 1244 Pls +3348 3540 Pls +4496 2392 Pls +2200 4688 Pls +1626 1818 Pls +3922 4114 Pls +2774 670 Pls +478 2966 Pls +460 2195 Pls +2756 4491 Pls +3904 1047 Pls +1608 3343 Pls +2182 473 Pls +4478 2769 Pls +3330 1621 Pls +1034 3917 Pls +1321 1334 Pls +3617 3630 Pls +4765 2482 Pls +2469 4778 Pls +1895 1908 Pls +4191 4204 Pls +3043 760 Pls +747 3056 Pls +891 616 Pls +3187 2912 Pls +4335 1764 Pls +2039 4060 Pls +2613 2338 Pls +4909 4634 Pls +3761 1190 Pls +1465 3486 Pls +1178 1477 Pls +3474 3773 Pls +4622 329 Pls +2326 2625 Pls +1752 903 Pls +4048 3199 Pls +2900 2051 Pls +604 4347 Pls +676 1119 Pls +2972 3415 Pls +4120 2267 Pls +1824 4563 Pls +2398 1693 Pls +4694 3989 Pls +3546 545 Pls +1250 2841 Pls +1537 2554 Pls +3833 4850 Pls +4981 1406 Pls +2685 3702 Pls +2111 832 Pls +4407 3128 Pls +3259 1980 Pls +963 4276 Pls +819 1836 Pls +3115 4132 Pls +4263 688 Pls +1967 2984 Pls +2541 1262 Pls +4837 3558 Pls +3689 2410 Pls +1393 4706 Pls +1106 401 Pls +3402 2697 Pls +4550 1549 Pls +2254 3845 Pls +1680 2123 Pls +3976 4419 Pls +2828 975 Pls +532 3271 Pls +496 509 Pls +2792 2805 Pls +3940 1657 Pls +1644 3953 Pls +2218 2231 Pls +4514 4527 Pls +3366 1083 Pls +1070 3379 Pls +1357 1944 Pls +3653 4240 Pls +4801 796 Pls +2505 3092 Pls +1931 1370 Pls +4227 3666 Pls +3079 2518 Pls +783 4814 Pls +927 2374 Pls +3223 4670 Pls +4371 1226 Pls +2075 3522 Pls +2649 652 Pls +4945 2948 Pls +3797 1800 Pls +1501 4096 Pls +1214 939 Pls +3510 3235 Pls +4658 2087 Pls +2362 4383 Pls +1788 1513 Pls +4084 3809 Pls +2936 365 Pls +640 2661 Pls +568 1585 Pls +2864 3881 Pls +4012 437 Pls +1716 2733 Pls +2290 1011 Pls +4586 3307 Pls +3438 2159 Pls +1142 4455 Pls +1429 724 Pls +3725 3020 Pls +4873 1872 Pls +2577 4168 Pls +2003 2446 Pls +4299 4742 Pls +3151 1298 Pls +855 3594 Pls +712 1154 Pls +3008 3450 Pls +4156 2302 Pls +1860 4598 Pls +2434 1728 Pls +4730 4024 Pls +3582 580 Pls +1286 2876 Pls +999 2015 Pls +3295 4311 Pls +4443 867 Pls +2147 3163 Pls +1573 293 Pls +3869 2589 Pls +2721 1441 Pls +425 3737 Pls +427 2009 Pls +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/qrng.texi b/software/gsl-1.15/doc/qrng.texi new file mode 100644 index 000000000..add5a8d98 --- /dev/null +++ b/software/gsl-1.15/doc/qrng.texi @@ -0,0 +1,174 @@ +@cindex quasi-random sequences +@cindex low discrepancy sequences +@cindex Sobol sequence +@cindex Niederreiter sequence +This chapter describes functions for generating quasi-random sequences +in arbitrary dimensions. A quasi-random sequence progressively covers a +@math{d}-dimensional space with a set of points that are uniformly +distributed. Quasi-random sequences are also known as low-discrepancy +sequences. The quasi-random sequence generators use an interface that +is similar to the interface for random number generators, except that +seeding is not required---each generator produces a single sequence. + +The functions described in this section are declared in the header file +@file{gsl_qrng.h}. + +@menu +* Quasi-random number generator initialization:: +* Sampling from a quasi-random number generator:: +* Auxiliary quasi-random number generator functions:: +* Saving and resorting quasi-random number generator state:: +* Quasi-random number generator algorithms:: +* Quasi-random number generator examples:: +* Quasi-random number references:: +@end menu + +@node Quasi-random number generator initialization +@section Quasi-random number generator initialization + +@deftypefun {gsl_qrng *} gsl_qrng_alloc (const gsl_qrng_type * @var{T}, unsigned int @var{d}) +@tpindex gsl_qrng +@tpindex gsl_qrng_type +This function returns a pointer to a newly-created instance of a +quasi-random sequence generator of type @var{T} and dimension @var{d}. +If there is insufficient memory to create the generator then the +function returns a null pointer and the error handler is invoked with an +error code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun void gsl_qrng_free (gsl_qrng * @var{q}) +This function frees all the memory associated with the generator +@var{q}. +@end deftypefun + +@deftypefun void gsl_qrng_init (gsl_qrng * @var{q}) +This function reinitializes the generator @var{q} to its starting point. +Note that quasi-random sequences do not use a seed and always produce +the same set of values. +@end deftypefun + +@node Sampling from a quasi-random number generator +@section Sampling from a quasi-random number generator + +@deftypefun int gsl_qrng_get (const gsl_qrng * @var{q}, double @var{x}[]) +This function stores the next point from the sequence generator @var{q} +in the array @var{x}. The space available for @var{x} must match the +dimension of the generator. The point @var{x} will lie in the range +@math{0 < x_i < 1} for each @math{x_i}. @inlinefn{} +@end deftypefun + +@node Auxiliary quasi-random number generator functions +@section Auxiliary quasi-random number generator functions + +@deftypefun {const char *} gsl_qrng_name (const gsl_qrng * @var{q}) +This function returns a pointer to the name of the generator. +@end deftypefun + +@deftypefun size_t gsl_qrng_size (const gsl_qrng * @var{q}) +@deftypefunx {void *} gsl_qrng_state (const gsl_qrng * @var{q}) +These functions return a pointer to the state of generator @var{r} and +its size. You can use this information to access the state directly. For +example, the following code will write the state of a generator to a +stream, + +@example +void * state = gsl_qrng_state (q); +size_t n = gsl_qrng_size (q); +fwrite (state, n, 1, stream); +@end example +@end deftypefun + + +@node Saving and resorting quasi-random number generator state +@section Saving and resorting quasi-random number generator state + +@deftypefun int gsl_qrng_memcpy (gsl_qrng * @var{dest}, const gsl_qrng * @var{src}) +This function copies the quasi-random sequence generator @var{src} into the +pre-existing generator @var{dest}, making @var{dest} into an exact copy +of @var{src}. The two generators must be of the same type. +@end deftypefun + +@deftypefun {gsl_qrng *} gsl_qrng_clone (const gsl_qrng * @var{q}) +This function returns a pointer to a newly created generator which is an +exact copy of the generator @var{q}. +@end deftypefun + +@node Quasi-random number generator algorithms +@section Quasi-random number generator algorithms + +The following quasi-random sequence algorithms are available, + +@deffn {Generator} gsl_qrng_niederreiter_2 +This generator uses the algorithm described in Bratley, Fox, +Niederreiter, @cite{ACM Trans. Model. Comp. Sim.} 2, 195 (1992). It is +valid up to 12 dimensions. +@end deffn + +@deffn {Generator} gsl_qrng_sobol +This generator uses the Sobol sequence described in Antonov, Saleev, +@cite{USSR Comput. Maths. Math. Phys.} 19, 252 (1980). It is valid up to +40 dimensions. +@end deffn + +@deffn {Generator} gsl_qrng_halton +@deffnx {Generator} gsl_qrng_reversehalton +These generators use the Halton and reverse Halton sequences described +in J.H. Halton, @cite{Numerische Mathematik} 2, 84-90 (1960) and +B. Vandewoestyne and R. Cools @cite{Computational and Applied +Mathematics} 189, 1&2, 341-361 (2006). They are valid up to 1229 +dimensions. +@end deffn + +@node Quasi-random number generator examples +@section Examples + +The following program prints the first 1024 points of the 2-dimensional +Sobol sequence. + +@example +@verbatiminclude examples/qrng.c +@end example + +@noindent +Here is the output from the program, + +@example +$ ./a.out +0.50000 0.50000 +0.75000 0.25000 +0.25000 0.75000 +0.37500 0.37500 +0.87500 0.87500 +0.62500 0.12500 +0.12500 0.62500 +.... +@end example + +@noindent +It can be seen that successive points progressively fill-in the spaces +between previous points. + +@iftex +@need 4000 +The following plot shows the distribution in the x-y plane of the first +1024 points from the Sobol sequence, +@sp 1 +@center @image{qrng,3.4in} +@sp 1 +@center Distribution of the first 1024 points +@center from the quasi-random Sobol sequence +@end iftex + +@node Quasi-random number references +@section References + +The implementations of the quasi-random sequence routines are based on +the algorithms described in the following paper, + +@itemize @w{} +P. Bratley and B.L. Fox and H. Niederreiter, ``Algorithm 738: Programs +to Generate Niederreiter's Low-discrepancy Sequences'', @cite{ACM +Transactions on Mathematical Software}, Vol.@: 20, No.@: 4, December, 1994, +p.@: 494--495. +@end itemize + diff --git a/software/gsl-1.15/doc/rand-bernoulli.tex b/software/gsl-1.15/doc/rand-bernoulli.tex new file mode 100644 index 000000000..c58377bf4 --- /dev/null +++ b/software/gsl-1.15/doc/rand-bernoulli.tex @@ -0,0 +1,824 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-bernoulli.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-bernoulli.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -63 V +1452 63 R +0 -31 V +1453 31 R +0 -63 V +1452 63 R +0 -31 V +1452 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 1925 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +3052 1925 L +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 1725 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +5073 3650 L +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.7$}}% + \put(3955,5244){\cjust{\strut{}Bernoulli Trial}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(5408,400){\cjust{\strut{}1}}% + \put(2503,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-beta.tex b/software/gsl-1.15/doc/rand-beta.tex new file mode 100644 index 000000000..dbc9bc771 --- /dev/null +++ b/software/gsl-1.15/doc/rand-beta.tex @@ -0,0 +1,1446 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-beta.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-beta.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +811 631 M +-31 0 V +31 1078 R +-31 0 V +31 1079 R +-31 0 V +31 1078 R +-31 0 V +31 1078 R +-31 0 V +811 631 M +0 -31 V +1512 31 R +0 -31 V +1513 31 R +0 -31 V +1512 31 R +0 -31 V +1512 31 R +0 -31 V +811 4944 M +811 631 L +6049 0 V +0 4313 V +-6049 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +811 631 M +20 22 V +20 21 V +21 21 V +20 21 V +20 21 V +20 21 V +21 21 V +20 20 V +20 21 V +20 20 V +21 20 V +20 20 V +20 20 V +20 20 V +20 19 V +21 20 V +20 19 V +20 19 V +20 19 V +21 19 V +20 18 V +20 19 V +20 18 V +21 19 V +20 18 V +20 18 V +20 17 V +20 18 V +21 18 V +20 17 V +20 17 V +20 17 V +21 17 V +20 17 V +20 17 V +20 16 V +21 17 V +20 16 V +20 16 V +20 16 V +20 15 V +21 16 V +20 16 V +20 15 V +20 15 V +21 15 V +20 15 V +20 15 V +20 14 V +21 15 V +20 14 V +20 14 V +20 14 V +20 14 V +21 14 V +20 14 V +20 13 V +20 14 V +21 13 V +20 13 V +20 13 V +20 12 V +21 13 V +20 12 V +20 13 V +20 12 V +20 12 V +21 12 V +20 11 V +20 12 V +20 11 V +21 12 V +20 11 V +20 11 V +20 11 V +21 10 V +20 11 V +20 10 V +20 11 V +20 10 V +21 10 V +20 10 V +20 9 V +20 10 V +21 9 V +20 10 V +20 9 V +20 9 V +21 9 V +20 8 V +20 9 V +20 8 V +20 8 V +21 8 V +20 8 V +20 8 V +20 8 V +21 7 V +20 8 V +20 7 V +20 7 V +21 7 V +2895 2092 L +20 7 V +20 6 V +20 6 V +21 7 V +20 6 V +20 6 V +20 5 V +21 6 V +20 6 V +20 5 V +20 5 V +21 5 V +20 5 V +20 5 V +20 5 V +20 4 V +21 4 V +20 5 V +20 4 V +20 4 V +21 3 V +20 4 V +20 3 V +20 4 V +21 3 V +20 3 V +20 3 V +20 3 V +20 2 V +21 3 V +20 2 V +20 2 V +20 2 V +21 2 V +20 2 V +20 1 V +20 2 V +21 1 V +20 1 V +20 1 V +20 1 V +20 1 V +21 0 V +20 1 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 -1 V +21 0 V +20 -1 V +20 -1 V +20 -1 V +20 -1 V +21 -1 V +20 -2 V +20 -1 V +20 -2 V +21 -2 V +20 -2 V +20 -2 V +20 -2 V +21 -3 V +20 -2 V +20 -3 V +20 -3 V +20 -3 V +21 -3 V +20 -4 V +20 -3 V +20 -4 V +21 -3 V +20 -4 V +20 -4 V +20 -5 V +21 -4 V +20 -4 V +20 -5 V +20 -5 V +20 -5 V +21 -5 V +20 -5 V +20 -5 V +20 -6 V +21 -6 V +20 -5 V +20 -6 V +20 -6 V +21 -7 V +20 -6 V +20 -6 V +20 -7 V +20 -7 V +21 -7 V +20 -7 V +20 -7 V +20 -8 V +21 -7 V +20 -8 V +20 -8 V +20 -8 V +21 -8 V +20 -8 V +5019 2001 L +20 -9 V +20 -8 V +21 -9 V +20 -9 V +20 -9 V +20 -10 V +21 -9 V +20 -10 V +20 -9 V +20 -10 V +21 -10 V +20 -10 V +20 -11 V +20 -10 V +20 -11 V +21 -10 V +20 -11 V +20 -11 V +20 -11 V +21 -12 V +20 -11 V +20 -12 V +20 -11 V +21 -12 V +20 -12 V +20 -12 V +20 -13 V +20 -12 V +21 -13 V +20 -12 V +20 -13 V +20 -13 V +21 -13 V +20 -14 V +20 -13 V +20 -14 V +21 -14 V +20 -14 V +20 -14 V +20 -14 V +20 -14 V +21 -15 V +20 -14 V +20 -15 V +20 -15 V +21 -15 V +20 -15 V +20 -15 V +20 -16 V +21 -16 V +20 -15 V +20 -16 V +20 -16 V +20 -16 V +21 -17 V +20 -16 V +20 -17 V +20 -17 V +21 -17 V +20 -17 V +20 -17 V +20 -17 V +21 -18 V +20 -18 V +20 -17 V +20 -18 V +20 -18 V +21 -19 V +20 -18 V +20 -19 V +20 -18 V +21 -19 V +20 -19 V +20 -19 V +20 -19 V +21 -20 V +20 -19 V +20 -20 V +20 -20 V +20 -20 V +21 -20 V +20 -20 V +20 -21 V +20 -20 V +21 -21 V +20 -21 V +20 -21 V +20 -21 V +21 -21 V +20 -21 V +20 -22 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +811 631 M +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +20 1 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 1 V +20 0 V +21 0 V +20 1 V +20 0 V +20 0 V +20 1 V +21 0 V +20 0 V +20 1 V +20 0 V +21 1 V +20 0 V +20 1 V +20 1 V +21 0 V +20 1 V +20 1 V +20 0 V +20 1 V +21 1 V +20 1 V +20 1 V +20 1 V +21 1 V +20 1 V +20 1 V +20 1 V +21 1 V +20 1 V +20 2 V +20 1 V +20 1 V +21 2 V +20 1 V +20 2 V +20 1 V +21 2 V +20 2 V +20 2 V +20 1 V +21 2 V +20 2 V +20 2 V +20 2 V +20 3 V +21 2 V +20 2 V +20 2 V +20 3 V +21 2 V +20 3 V +20 2 V +20 3 V +21 3 V +20 3 V +20 3 V +20 3 V +20 3 V +21 3 V +20 3 V +20 3 V +20 4 V +21 3 V +20 4 V +20 3 V +20 4 V +21 4 V +20 4 V +20 4 V +20 4 V +20 4 V +21 4 V +20 4 V +20 5 V +20 4 V +21 5 V +20 5 V +20 4 V +20 5 V +21 5 V +2895 807 L +20 5 V +20 6 V +20 5 V +21 6 V +20 5 V +20 6 V +20 6 V +21 6 V +20 6 V +20 6 V +20 6 V +21 6 V +20 7 V +20 6 V +20 7 V +20 7 V +21 7 V +20 7 V +20 7 V +20 7 V +21 8 V +20 7 V +20 8 V +20 8 V +21 7 V +20 8 V +20 8 V +20 9 V +20 8 V +21 9 V +20 8 V +20 9 V +20 9 V +21 9 V +20 9 V +20 9 V +20 10 V +21 9 V +20 10 V +20 10 V +20 10 V +20 10 V +21 10 V +20 11 V +20 10 V +20 11 V +21 11 V +20 11 V +20 11 V +20 11 V +21 11 V +20 12 V +20 12 V +20 11 V +20 12 V +21 13 V +20 12 V +20 12 V +20 13 V +21 13 V +20 13 V +20 13 V +20 13 V +21 13 V +20 14 V +20 14 V +20 14 V +20 14 V +21 14 V +20 14 V +20 15 V +20 15 V +21 15 V +20 15 V +20 15 V +20 15 V +21 16 V +20 16 V +20 16 V +20 16 V +20 16 V +21 17 V +20 16 V +20 17 V +20 17 V +21 17 V +20 18 V +20 17 V +20 18 V +21 18 V +20 18 V +20 18 V +20 19 V +20 19 V +21 18 V +20 20 V +20 19 V +20 19 V +21 20 V +20 20 V +20 20 V +20 20 V +21 20 V +20 21 V +5019 2083 L +20 21 V +20 21 V +21 22 V +20 21 V +20 22 V +20 22 V +21 23 V +20 22 V +20 23 V +20 23 V +21 23 V +20 23 V +20 24 V +20 23 V +20 24 V +21 24 V +20 25 V +20 24 V +20 25 V +21 25 V +20 26 V +20 25 V +20 26 V +21 26 V +20 26 V +20 26 V +20 27 V +20 27 V +21 27 V +20 27 V +20 28 V +20 27 V +21 28 V +20 29 V +20 28 V +20 29 V +21 29 V +20 29 V +20 29 V +20 30 V +20 30 V +21 30 V +20 30 V +20 31 V +20 31 V +21 31 V +20 31 V +20 32 V +20 32 V +21 32 V +20 32 V +20 33 V +20 33 V +20 33 V +21 33 V +20 34 V +20 34 V +20 34 V +21 34 V +20 35 V +20 35 V +20 35 V +21 35 V +20 36 V +20 36 V +20 36 V +20 37 V +21 36 V +20 37 V +20 38 V +20 37 V +21 38 V +20 38 V +20 38 V +20 39 V +21 39 V +20 39 V +20 40 V +20 39 V +20 40 V +21 41 V +20 40 V +20 41 V +20 41 V +21 42 V +20 41 V +20 42 V +20 42 V +21 43 V +20 43 V +20 43 V +stroke +LT2 +LTb +LT2 +6077 4381 M +543 0 V +811 4944 M +20 -43 V +20 -43 V +21 -43 V +20 -42 V +20 -42 V +20 -41 V +21 -42 V +20 -41 V +20 -41 V +20 -40 V +21 -41 V +20 -40 V +20 -39 V +20 -40 V +20 -39 V +21 -39 V +20 -39 V +20 -38 V +20 -38 V +21 -38 V +20 -37 V +20 -38 V +20 -37 V +21 -36 V +20 -37 V +20 -36 V +20 -36 V +20 -36 V +21 -35 V +20 -35 V +20 -35 V +20 -35 V +21 -34 V +20 -34 V +20 -34 V +20 -34 V +21 -33 V +20 -33 V +20 -33 V +20 -33 V +20 -32 V +21 -32 V +20 -32 V +20 -32 V +20 -31 V +21 -31 V +20 -31 V +20 -31 V +20 -30 V +21 -30 V +20 -30 V +20 -30 V +20 -29 V +20 -29 V +21 -29 V +20 -29 V +20 -28 V +20 -29 V +21 -28 V +20 -27 V +20 -28 V +20 -27 V +21 -27 V +20 -27 V +20 -27 V +20 -26 V +20 -26 V +21 -26 V +20 -26 V +20 -25 V +20 -26 V +21 -25 V +20 -25 V +20 -24 V +20 -25 V +21 -24 V +20 -24 V +20 -23 V +20 -24 V +20 -23 V +21 -23 V +20 -23 V +20 -23 V +20 -22 V +21 -23 V +20 -22 V +20 -22 V +20 -21 V +21 -22 V +20 -21 V +20 -21 V +20 -21 V +20 -21 V +21 -20 V +20 -20 V +20 -20 V +20 -20 V +21 -20 V +20 -19 V +20 -19 V +20 -20 V +21 -18 V +2895 1846 L +20 -19 V +20 -18 V +20 -18 V +21 -18 V +20 -18 V +20 -17 V +20 -18 V +21 -17 V +20 -17 V +20 -17 V +20 -16 V +21 -17 V +20 -16 V +20 -16 V +20 -16 V +20 -16 V +21 -16 V +20 -15 V +20 -15 V +20 -15 V +21 -15 V +20 -15 V +20 -15 V +20 -14 V +21 -14 V +20 -14 V +20 -14 V +20 -14 V +20 -14 V +21 -13 V +20 -13 V +20 -13 V +20 -13 V +21 -13 V +20 -13 V +20 -12 V +20 -12 V +21 -13 V +20 -12 V +20 -11 V +20 -12 V +20 -12 V +21 -11 V +20 -11 V +20 -11 V +20 -11 V +21 -11 V +20 -11 V +20 -10 V +20 -11 V +21 -10 V +20 -10 V +20 -10 V +20 -10 V +20 -10 V +21 -9 V +20 -10 V +20 -9 V +20 -9 V +21 -9 V +20 -9 V +20 -9 V +20 -8 V +21 -9 V +20 -8 V +20 -9 V +20 -8 V +20 -8 V +21 -7 V +20 -8 V +20 -8 V +20 -7 V +21 -8 V +20 -7 V +20 -7 V +20 -7 V +21 -7 V +20 -7 V +20 -7 V +20 -6 V +20 -7 V +21 -6 V +20 -6 V +20 -6 V +20 -6 V +21 -6 V +20 -6 V +20 -6 V +20 -5 V +21 -6 V +20 -5 V +20 -6 V +20 -5 V +20 -5 V +21 -5 V +20 -5 V +20 -4 V +20 -5 V +21 -5 V +20 -4 V +20 -5 V +20 -4 V +21 -4 V +20 -4 V +5019 753 L +20 -4 V +20 -4 V +21 -4 V +20 -4 V +20 -3 V +20 -4 V +21 -3 V +20 -4 V +20 -3 V +20 -3 V +21 -3 V +20 -3 V +20 -3 V +20 -3 V +20 -3 V +21 -3 V +20 -3 V +20 -2 V +20 -3 V +21 -2 V +20 -3 V +20 -2 V +20 -2 V +21 -2 V +20 -3 V +20 -2 V +20 -2 V +20 -2 V +21 -2 V +20 -1 V +20 -2 V +20 -2 V +21 -2 V +20 -1 V +20 -2 V +20 -1 V +21 -2 V +20 -1 V +20 -1 V +20 -2 V +20 -1 V +21 -1 V +20 -1 V +20 -1 V +20 -1 V +21 -1 V +20 -1 V +20 -1 V +20 -1 V +21 -1 V +20 -1 V +20 0 V +20 -1 V +20 -1 V +21 0 V +20 -1 V +20 -1 V +20 0 V +21 -1 V +20 0 V +20 -1 V +20 0 V +21 0 V +20 -1 V +20 0 V +20 0 V +20 -1 V +21 0 V +20 0 V +20 -1 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 -1 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +20 0 V +21 0 V +20 0 V +20 0 V +stroke +0.500 UL +LTb +811 4944 M +811 631 L +6049 0 V +0 4313 V +-6049 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4381){\rjust{\strut{}$a=1,b=4$}}% + \put(5957,4581){\rjust{\strut{}$a=4,b=1$}}% + \put(5957,4781){\rjust{\strut{}$a=2,b=2$}}% + \put(3835,5244){\cjust{\strut{}Beta Distribution}}% + \put(3835,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}1}}% + \put(5348,400){\cjust{\strut{}0.75}}% + \put(3836,400){\cjust{\strut{}0.5}}% + \put(2323,400){\cjust{\strut{}0.25}}% + \put(811,400){\cjust{\strut{}0}}% + \put(660,4944){\rjust{\strut{} 4}}% + \put(660,3866){\rjust{\strut{} 3}}% + \put(660,2788){\rjust{\strut{} 2}}% + \put(660,1709){\rjust{\strut{} 1}}% + \put(660,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-binomial.tex b/software/gsl-1.15/doc/rand-binomial.tex new file mode 100644 index 000000000..8dd8337df --- /dev/null +++ b/software/gsl-1.15/doc/rand-binomial.tex @@ -0,0 +1,882 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-binomial.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-binomial.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 645 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 127 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 491 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 1053 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +2994 2316 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 1263 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 590 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -590 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -1263 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +4956 2316 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -1053 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -491 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 -127 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -14 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.5,n=9$}}% + \put(3955,5244){\cjust{\strut{}Binomial Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.3}}% + \put(900,3506){\rjust{\strut{} 0.2}}% + \put(900,2069){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-bivariate-gaussian.tex b/software/gsl-1.15/doc/rand-bivariate-gaussian.tex new file mode 100644 index 000000000..e10d48114 --- /dev/null +++ b/software/gsl-1.15/doc/rand-bivariate-gaussian.tex @@ -0,0 +1,1374 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(5760,5760) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-bivariate-gaussian.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 288 288 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-bivariate-gaussian.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +0.500 UL +LTb +1521 1521 M +0 2718 V +2718 0 R +-2718 0 V +0 -2718 R +0 -31 V +680 31 R +0 -31 V +679 31 R +0 -31 V +679 31 R +0 -31 V +680 31 R +0 -31 V +0 31 R +31 0 V +-31 680 R +31 0 V +-31 679 R +31 0 V +-31 679 R +31 0 V +-31 680 R +31 0 V +1521 1521 M +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +31 0 R +-31 0 V +1.000 UP +stroke +1.000 UL +LT0 +LTb +1.000 UL +LT0 +4794 4896 M +543 0 V +2893 2926 M +9 4 V +9 2 V +9 2 V +9 0 V +10 -1 V +9 -4 V +2 -3 V +-2 -1 V +-9 -4 V +-10 -3 V +-9 -3 V +-9 -1 V +-9 1 V +-9 11 V +-81 -95 R +-2 3 V +2 1 V +9 4 V +10 3 V +9 3 V +9 1 V +9 -1 V +9 -11 V +-9 -4 V +-9 -2 V +-9 -2 V +-9 0 V +-10 1 V +-9 4 V +2312 2266 M +-9 1 V +-9 3 V +845 601 R +-10 -10 V +-9 -10 V +-9 -11 V +-5 -6 V +-4 -4 V +-9 -9 V +-9 -10 V +-9 -9 V +-9 -9 V +-9 -10 V +-9 -9 V +-9 -9 V +-10 -10 V +-9 -9 V +-5 -6 V +-4 -4 V +-9 -9 V +-9 -8 V +-9 -9 V +-9 -9 V +-9 -8 V +-9 -9 V +-9 -9 V +-9 -8 V +-10 -9 V +-9 -9 V +-2 -3 V +-7 -6 V +-9 -8 V +-9 -8 V +-9 -8 V +-8 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-10 -8 V +-8 -8 V +-1 0 V +-9 -8 V +-9 -7 V +-9 -8 V +-9 -7 V +-9 -8 V +-9 -7 V +-9 -7 V +-9 -7 V +-9 -7 V +-10 -8 V +-9 -7 V +-9 -7 V +-6 -5 V +-3 -3 V +-9 -6 V +-9 -7 V +-9 -7 V +-9 -6 V +-9 -6 V +-9 -7 V +-9 -6 V +-10 -6 V +-9 -6 V +-9 -7 V +-9 -6 V +-9 -6 V +-9 -7 V +-9 -6 V +-3 -2 V +2558 2361 L +-9 -6 V +-9 -5 V +-9 -5 V +-10 -5 V +-9 -5 V +-9 -5 V +-9 -5 V +-9 -4 V +-9 -5 V +-9 -4 V +-9 -5 V +-9 -4 V +-9 -4 V +-9 -4 V +-10 -5 V +-9 -4 V +-9 -3 V +-9 -4 V +-9 -4 V +-9 -3 V +-1 -1 V +-8 -2 V +-9 -1 V +-9 -2 V +-9 -1 V +-9 0 V +-10 0 V +-9 1 V +727 1016 R +9 7 V +9 7 V +6 5 V +3 3 V +9 6 V +9 7 V +9 7 V +9 6 V +9 6 V +9 7 V +9 6 V +10 6 V +9 6 V +9 7 V +9 6 V +9 6 V +9 7 V +9 6 V +3 2 V +6 4 V +9 6 V +9 5 V +9 5 V +10 5 V +9 5 V +9 5 V +9 5 V +9 4 V +9 5 V +9 4 V +9 5 V +9 4 V +9 4 V +9 4 V +10 5 V +9 4 V +9 3 V +9 4 V +9 4 V +9 3 V +1 1 V +8 2 V +9 1 V +9 2 V +9 1 V +9 0 V +10 0 V +9 -1 V +9 -1 V +9 -3 V +5 -1 V +4 -7 V +9 -28 V +7 -59 V +-7 -15 V +-9 -20 V +-9 -24 V +-9 -30 V +-2 -5 V +-7 -12 V +-9 -14 V +-10 -15 V +-9 -16 V +-9 -18 V +-8 -18 V +-1 -1 V +-9 -12 V +-9 -13 V +-9 -12 V +-9 -14 V +-9 -13 V +-9 -15 V +-9 -14 V +0 -1 V +-10 -11 V +3320 3090 L +-9 -11 V +-9 -12 V +-9 -12 V +-9 -12 V +-9 -13 V +-7 -10 V +-2 -2 V +-9 -11 V +-9 -11 V +-9 -10 V +-10 -11 V +-9 -11 V +-9 -11 V +-9 -11 V +-9 -12 V +-3 -4 V +-6 -6 V +-9 -10 V +-9 -10 V +-9 -10 V +-9 -10 V +-9 -9 V +2294 2270 M +-5 1 V +-4 7 V +-9 28 V +-7 59 V +7 15 V +9 20 V +9 24 V +9 30 V +2 5 V +7 12 V +9 14 V +10 15 V +9 16 V +9 18 V +8 18 V +1 1 V +9 12 V +9 13 V +9 12 V +9 14 V +9 13 V +9 15 V +9 14 V +0 1 V +10 11 V +9 12 V +9 11 V +9 12 V +9 12 V +9 12 V +9 13 V +7 10 V +2 2 V +9 11 V +9 11 V +9 10 V +10 11 V +9 11 V +9 11 V +9 11 V +9 12 V +3 4 V +6 6 V +9 10 V +9 10 V +9 10 V +9 10 V +9 9 V +10 10 V +9 10 V +9 11 V +5 6 V +4 4 V +9 9 V +9 10 V +9 9 V +9 9 V +9 10 V +9 9 V +9 9 V +10 10 V +9 9 V +5 6 V +4 4 V +9 9 V +9 8 V +9 9 V +9 9 V +9 8 V +9 9 V +9 9 V +9 8 V +10 9 V +9 9 V +2 3 V +7 6 V +9 8 V +9 8 V +9 8 V +8 8 V +9 8 V +2902 3168 L +9 8 V +9 8 V +9 8 V +10 8 V +8 8 V +1 0 V +9 8 V +9 7 V +9 8 V +9 7 V +9 8 V +9 7 V +9 7 V +9 7 V +9 7 V +10 8 V +2731 2307 M +-10 -7 V +-9 -7 V +-9 -7 V +-9 -7 V +-9 -7 V +-1 -1 V +-8 -7 V +-9 -8 V +-9 -8 V +-9 -7 V +-9 -8 V +-9 -7 V +-10 -7 V +-9 -7 V +-9 -7 V +-9 -6 V +-9 -7 V +-9 -6 V +-9 -7 V +-3 -1 V +-6 -6 V +-9 -7 V +-9 -8 V +-9 -7 V +-10 -7 V +-9 -6 V +-9 -7 V +-9 -6 V +-9 -7 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -6 V +-6 -3 V +-3 -3 V +-10 -7 V +-9 -7 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -6 V +-9 -5 V +-9 -6 V +-9 -5 V +-10 -5 V +-9 -6 V +-9 -5 V +-9 -5 V +-7 -4 V +-2 -1 V +-9 -6 V +-9 -5 V +-9 -6 V +-9 -5 V +-9 -5 V +-9 -5 V +-10 -4 V +-9 -5 V +-9 -5 V +-9 -4 V +-9 -4 V +-9 -5 V +-9 -4 V +-9 -4 V +-9 -4 V +-9 -4 V +-9 -3 V +-10 -4 V +-9 -4 V +-9 -3 V +-8 -4 V +-1 0 V +-9 -3 V +-9 -3 V +-9 -3 V +-9 -2 V +-9 -3 V +-9 -2 V +-9 -2 V +-10 -2 V +-9 -1 V +-9 -1 V +-9 -1 V +-9 -1 V +1976 1872 L +-9 0 V +-9 1 V +-9 1 V +-9 2 V +-9 2 V +-10 4 V +-9 4 V +-9 5 V +3539 3138 M +-10 -11 V +-9 -11 V +-1 -2 V +-8 -10 V +-9 -12 V +-9 -12 V +-9 -11 V +-9 -11 V +-9 -10 V +-9 -11 V +-9 -11 V +-6 -6 V +-3 -5 V +-10 -11 V +-9 -11 V +-9 -11 V +-9 -11 V +-9 -10 V +-9 -10 V +-9 -10 V +-9 -10 V +-4 -5 V +-5 -6 V +-9 -11 V +-9 -11 V +-10 -10 V +-9 -9 V +-9 -10 V +-9 -10 V +-9 -9 V +-9 -10 V +-7 -6 V +-2 -3 V +-9 -11 V +-9 -11 V +-9 -10 V +-9 -10 V +-10 -9 V +-9 -9 V +-9 -10 V +-9 -8 V +-9 -9 V +-4 -4 V +-5 -6 V +-9 -10 V +-9 -10 V +-9 -10 V +-9 -10 V +-9 -9 V +-10 -9 V +-9 -8 V +-9 -9 V +-9 -8 V +-5 -5 V +-4 -4 V +-9 -10 V +-9 -10 V +-9 -9 V +-9 -9 V +-9 -9 V +-9 -9 V +-10 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-1 -2 V +-8 -8 V +-9 -9 V +-9 -10 V +-9 -9 V +-9 -8 V +-9 -9 V +-9 -8 V +-10 -8 V +-9 -7 V +-9 -8 V +-9 -8 V +-2 -1 V +-7 -8 V +-9 -9 V +-8 -9 V +-9 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-9 -8 V +-10 -7 V +-9 -8 V +-9 -7 V +-8 -6 V +-1 -1 V +-9 -9 V +-9 -9 V +-9 -8 V +-9 -8 V +2749 2322 L +-9 -7 V +-9 -8 V +708 1443 R +9 6 V +9 5 V +9 5 V +7 4 V +2 1 V +9 6 V +9 5 V +9 6 V +9 5 V +9 5 V +9 5 V +10 4 V +9 5 V +9 5 V +9 4 V +9 4 V +9 5 V +9 4 V +9 4 V +9 4 V +9 4 V +9 3 V +10 4 V +9 4 V +9 3 V +8 4 V +1 0 V +9 3 V +9 3 V +9 3 V +9 2 V +9 3 V +9 2 V +9 2 V +10 2 V +9 1 V +9 1 V +9 1 V +9 1 V +9 0 V +9 0 V +9 -1 V +9 -1 V +9 -2 V +9 -2 V +10 -4 V +9 -4 V +9 -5 V +8 -5 V +1 -2 V +9 -23 V +9 -37 V +5 -32 V +-5 -18 V +-9 -37 V +-8 -39 V +-1 -3 V +-9 -20 V +-9 -21 V +-9 -22 V +-10 -25 V +0 -3 V +-9 -14 V +-9 -17 V +-9 -17 V +-9 -17 V +-9 -18 V +-5 -10 V +-4 -7 V +-9 -15 V +-9 -15 V +-9 -14 V +-9 -15 V +-10 -16 V +-7 -12 V +-2 -3 V +-9 -14 V +-9 -13 V +-9 -14 V +-9 -13 V +-9 -13 V +-9 -14 V +-7 -10 V +-2 -4 V +-9 -12 V +-9 -13 V +-10 -13 V +-9 -12 V +-9 -13 V +-9 -12 V +-9 -12 V +-2 -2 V +-7 -11 V +-9 -12 V +-9 -12 V +-9 -12 V +-9 -11 V +-9 -12 V +-927 -72 R +9 9 V +10 9 V +2640 3092 L +9 9 V +9 8 V +5 5 V +4 4 V +9 10 V +9 10 V +9 9 V +9 9 V +9 9 V +9 9 V +10 8 V +9 8 V +9 8 V +9 8 V +1 2 V +8 8 V +9 9 V +9 10 V +9 9 V +9 8 V +9 9 V +9 8 V +10 8 V +9 7 V +9 8 V +9 8 V +2 1 V +7 8 V +9 9 V +8 9 V +9 8 V +9 8 V +9 8 V +9 8 V +9 8 V +10 7 V +9 8 V +9 7 V +8 6 V +1 1 V +9 9 V +9 9 V +9 8 V +9 8 V +9 8 V +9 7 V +9 8 V +10 7 V +9 7 V +9 7 V +9 7 V +9 7 V +1 1 V +8 7 V +9 8 V +9 8 V +9 7 V +9 8 V +9 7 V +10 7 V +9 7 V +9 7 V +9 6 V +9 7 V +9 6 V +9 7 V +3 1 V +6 6 V +9 7 V +9 8 V +9 7 V +10 7 V +9 6 V +9 7 V +9 6 V +9 7 V +9 6 V +9 6 V +9 6 V +9 6 V +9 6 V +6 3 V +3 3 V +10 7 V +9 7 V +9 6 V +9 6 V +9 6 V +9 6 V +9 6 V +9 6 V +9 5 V +9 6 V +9 5 V +10 5 V +1903 1891 M +-8 5 V +-1 2 V +-9 23 V +-9 37 V +-5 32 V +5 18 V +9 37 V +8 39 V +1894 2087 L +9 20 V +9 21 V +9 22 V +10 25 V +0 3 V +9 14 V +9 17 V +9 17 V +9 17 V +9 18 V +5 10 V +4 7 V +9 15 V +9 15 V +9 14 V +9 15 V +10 16 V +7 12 V +2 3 V +9 14 V +9 13 V +9 14 V +9 13 V +9 13 V +9 14 V +7 10 V +2 4 V +9 12 V +9 13 V +10 13 V +9 12 V +9 13 V +9 12 V +9 12 V +2 2 V +7 11 V +9 12 V +9 12 V +9 12 V +9 11 V +9 12 V +10 11 V +9 11 V +1 2 V +8 10 V +9 12 V +9 12 V +9 11 V +9 11 V +9 10 V +9 11 V +9 11 V +6 6 V +3 5 V +10 11 V +9 11 V +9 11 V +9 11 V +9 10 V +9 10 V +9 10 V +9 10 V +4 5 V +5 6 V +9 11 V +9 11 V +10 10 V +9 9 V +9 10 V +9 10 V +9 9 V +9 10 V +7 6 V +2 3 V +9 11 V +9 11 V +9 10 V +9 10 V +10 9 V +9 9 V +9 10 V +9 8 V +9 9 V +4 4 V +5 6 V +9 10 V +9 10 V +9 10 V +9 10 V +stroke +0.500 UL +LTb +4239 4239 M +0 -2718 V +-2718 0 R +2718 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +stroke +grestore +end +showpage + }}% + \put(4950,2880){\cjust{\strut{}$y$}}% + \put(2880,810){\cjust{\strut{}$x$}}% + \put(4674,4896){\rjust{\strut{}$\sigma_x=1, \sigma_y=1, \rho=0.9$}}% + \put(2880,5379){\cjust{\strut{}Bivariate Gaussian Distribution}}% + \put(1363,1521){\rjust{\strut{} 0.7}}% + \put(1363,1521){\rjust{\strut{} 0.6}}% + \put(1363,1521){\rjust{\strut{} 0.5}}% + \put(1363,1521){\rjust{\strut{} 0.4}}% + \put(1363,1521){\rjust{\strut{} 0.3}}% + \put(1363,1521){\rjust{\strut{} 0.2}}% + \put(1363,1521){\rjust{\strut{} 0.1}}% + \put(1363,1521){\rjust{\strut{} 0}}% + \put(4390,4239){\ljust{\strut{} 2}}% + \put(4390,3559){\ljust{\strut{} 1}}% + \put(4390,2880){\ljust{\strut{} 0}}% + \put(4390,2201){\ljust{\strut{}-1}}% + \put(4390,1521){\ljust{\strut{}-2}}% + \put(4239,1290){\cjust{\strut{}2}}% + \put(3559,1290){\cjust{\strut{}1}}% + \put(2880,1290){\cjust{\strut{}0}}% + \put(2201,1290){\cjust{\strut{}-1}}% + \put(1521,1290){\cjust{\strut{}-2}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-cauchy.tex b/software/gsl-1.15/doc/rand-cauchy.tex new file mode 100644 index 000000000..a6eb5004a --- /dev/null +++ b/software/gsl-1.15/doc/rand-cauchy.tex @@ -0,0 +1,1157 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-cauchy.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-cauchy.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1078 R +-31 0 V +31 1079 R +-31 0 V +31 1078 R +-31 0 V +31 1078 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 763 M +19 2 V +20 1 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +19 3 V +20 2 V +19 2 V +20 3 V +19 2 V +20 3 V +19 2 V +19 3 V +20 3 V +19 2 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 3 V +20 4 V +19 3 V +19 4 V +20 3 V +19 4 V +20 4 V +19 4 V +20 4 V +19 4 V +19 5 V +20 4 V +19 5 V +20 4 V +19 5 V +20 5 V +19 5 V +19 5 V +20 6 V +19 5 V +20 6 V +19 5 V +20 6 V +19 6 V +19 7 V +20 6 V +19 7 V +20 7 V +19 7 V +20 7 V +19 7 V +19 8 V +20 8 V +19 8 V +20 8 V +19 9 V +20 9 V +19 9 V +19 10 V +20 10 V +19 10 V +20 10 V +19 11 V +20 11 V +19 12 V +19 12 V +20 12 V +19 13 V +20 13 V +19 14 V +20 14 V +19 15 V +19 15 V +20 16 V +19 16 V +20 17 V +19 18 V +20 18 V +19 19 V +19 20 V +20 20 V +19 21 V +20 22 V +19 23 V +20 24 V +19 24 V +19 26 V +20 27 V +19 27 V +20 29 V +3052 1635 L +20 31 V +19 33 V +19 33 V +20 35 V +19 37 V +20 38 V +19 39 V +20 41 V +19 43 V +19 44 V +20 46 V +19 48 V +20 50 V +19 51 V +20 54 V +19 55 V +19 57 V +20 59 V +19 61 V +20 63 V +19 65 V +20 66 V +19 69 V +19 69 V +20 71 V +19 73 V +20 73 V +19 74 V +20 74 V +19 75 V +19 74 V +20 74 V +19 72 V +20 71 V +19 68 V +20 65 V +19 62 V +19 59 V +20 53 V +19 48 V +20 43 V +19 36 V +20 30 V +19 22 V +19 16 V +20 7 V +19 0 V +20 -7 V +19 -16 V +19 -22 V +20 -30 V +19 -36 V +20 -43 V +19 -48 V +20 -53 V +19 -59 V +19 -62 V +20 -65 V +19 -68 V +20 -71 V +19 -72 V +20 -74 V +19 -74 V +19 -75 V +20 -74 V +19 -74 V +20 -73 V +19 -73 V +20 -71 V +19 -69 V +19 -69 V +20 -66 V +19 -65 V +20 -63 V +19 -61 V +20 -59 V +19 -57 V +19 -55 V +20 -54 V +19 -51 V +20 -50 V +19 -48 V +20 -46 V +19 -44 V +19 -43 V +20 -41 V +19 -39 V +20 -38 V +19 -37 V +20 -35 V +19 -33 V +19 -33 V +20 -31 V +19 -30 V +20 -29 V +19 -27 V +20 -27 V +19 -26 V +19 -24 V +20 -24 V +19 -23 V +20 -22 V +19 -21 V +20 -20 V +5092 1342 L +19 -19 V +20 -18 V +19 -18 V +20 -17 V +19 -16 V +20 -16 V +19 -15 V +19 -15 V +20 -14 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -12 V +20 -11 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 868 M +19 2 V +20 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 3 V +20 3 V +19 4 V +19 3 V +20 4 V +19 3 V +20 4 V +19 4 V +20 4 V +19 3 V +19 4 V +20 4 V +19 5 V +20 4 V +19 4 V +20 4 V +19 5 V +19 4 V +20 5 V +19 4 V +20 5 V +19 5 V +20 5 V +19 5 V +19 5 V +20 5 V +19 5 V +20 6 V +19 5 V +20 6 V +19 6 V +19 5 V +20 6 V +19 6 V +20 6 V +19 7 V +20 6 V +19 7 V +19 6 V +20 7 V +19 7 V +20 7 V +19 7 V +20 8 V +19 7 V +19 8 V +20 8 V +19 8 V +20 8 V +19 8 V +20 8 V +19 9 V +19 9 V +20 9 V +19 9 V +20 9 V +19 10 V +20 9 V +19 10 V +19 10 V +20 10 V +19 11 V +20 11 V +19 10 V +20 12 V +19 11 V +19 11 V +20 12 V +19 12 V +20 12 V +19 13 V +20 12 V +19 13 V +19 13 V +20 14 V +19 13 V +20 14 V +19 14 V +20 14 V +19 15 V +19 15 V +20 15 V +19 15 V +20 15 V +19 16 V +20 16 V +19 16 V +19 17 V +20 16 V +19 17 V +20 17 V +3052 1700 L +20 18 V +19 17 V +19 18 V +20 18 V +19 18 V +20 18 V +19 19 V +20 18 V +19 19 V +19 18 V +20 19 V +19 19 V +20 18 V +19 19 V +20 18 V +19 19 V +19 18 V +20 18 V +19 19 V +20 17 V +19 18 V +20 17 V +19 18 V +19 16 V +20 17 V +19 16 V +20 15 V +19 15 V +20 15 V +19 14 V +19 13 V +20 13 V +19 12 V +20 11 V +19 11 V +20 10 V +19 9 V +19 8 V +20 8 V +19 6 V +20 6 V +19 4 V +20 4 V +19 3 V +19 2 V +20 1 V +19 0 V +20 -1 V +19 -2 V +19 -3 V +20 -4 V +19 -4 V +20 -6 V +19 -6 V +20 -8 V +19 -8 V +19 -9 V +20 -10 V +19 -11 V +20 -11 V +19 -12 V +20 -13 V +19 -13 V +19 -14 V +20 -15 V +19 -15 V +20 -15 V +19 -16 V +20 -17 V +19 -16 V +19 -18 V +20 -17 V +19 -18 V +20 -17 V +19 -19 V +20 -18 V +19 -18 V +19 -19 V +20 -18 V +19 -19 V +20 -18 V +19 -19 V +20 -19 V +19 -18 V +19 -19 V +20 -18 V +19 -19 V +20 -18 V +19 -18 V +20 -18 V +19 -18 V +19 -17 V +20 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -17 V +19 -16 V +20 -16 V +19 -16 V +20 -15 V +19 -15 V +20 -15 V +5092 1508 L +19 -15 V +20 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +20 -12 V +19 -11 V +19 -11 V +20 -12 V +19 -10 V +20 -11 V +19 -11 V +20 -10 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1$}}% + \put(3955,5244){\cjust{\strut{}Cauchy Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4944){\rjust{\strut{} 0.4}}% + \put(900,3866){\rjust{\strut{} 0.3}}% + \put(900,2788){\rjust{\strut{} 0.2}}% + \put(900,1709){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-chisq.tex b/software/gsl-1.15/doc/rand-chisq.tex new file mode 100644 index 000000000..7b28aea4b --- /dev/null +++ b/software/gsl-1.15/doc/rand-chisq.tex @@ -0,0 +1,1424 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-chisq.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-chisq.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +1936 31 R +0 -31 V +1937 31 R +0 -31 V +1936 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1319 4944 M +4 -33 V +19 -166 V +20 -151 V +19 -137 V +20 -127 V +19 -116 V +20 -109 V +19 -100 V +19 -94 V +20 -89 V +19 -82 V +20 -78 V +19 -74 V +20 -70 V +19 -66 V +19 -63 V +20 -60 V +19 -57 V +20 -55 V +19 -52 V +20 -50 V +19 -48 V +19 -46 V +20 -44 V +19 -43 V +20 -41 V +19 -40 V +20 -38 V +19 -37 V +19 -36 V +20 -34 V +19 -34 V +20 -32 V +19 -32 V +20 -30 V +19 -30 V +19 -29 V +20 -28 V +19 -27 V +20 -26 V +19 -26 V +20 -25 V +19 -25 V +19 -24 V +20 -23 V +19 -23 V +20 -22 V +19 -21 V +20 -22 V +19 -20 V +19 -20 V +20 -20 V +19 -20 V +20 -18 V +19 -19 V +20 -18 V +19 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -16 V +19 -15 V +20 -15 V +19 -14 V +20 -15 V +19 -14 V +20 -14 V +19 -13 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -10 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +19 -8 V +20 -9 V +19 -8 V +3305 1522 L +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +5345 1012 L +19 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 2788 M +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -11 V +19 -10 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +3052 1917 L +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +5092 1391 L +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +stroke +LT2 +LTb +LT2 +6077 4381 M +543 0 V +1051 631 M +19 171 V +20 70 V +19 53 V +20 44 V +19 38 V +20 34 V +19 30 V +19 28 V +20 26 V +19 24 V +20 23 V +19 21 V +20 20 V +19 19 V +19 18 V +20 17 V +19 17 V +20 15 V +19 15 V +20 14 V +19 14 V +19 13 V +20 12 V +19 13 V +20 11 V +19 11 V +20 11 V +19 10 V +19 10 V +20 10 V +19 9 V +20 9 V +19 9 V +20 8 V +19 8 V +19 8 V +20 8 V +19 7 V +20 7 V +19 7 V +20 6 V +19 7 V +19 6 V +20 6 V +19 6 V +20 5 V +19 5 V +20 6 V +19 5 V +19 4 V +20 5 V +19 4 V +20 5 V +19 4 V +20 4 V +19 4 V +19 4 V +20 3 V +19 4 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 2 V +19 2 V +20 3 V +19 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 1 V +19 2 V +19 1 V +20 2 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 0 V +20 1 V +19 1 V +19 0 V +20 0 V +19 1 V +20 0 V +19 0 V +20 0 V +19 1 V +19 0 V +20 0 V +19 0 V +20 -1 V +3052 1674 L +20 0 V +19 0 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +5092 1507 L +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4381){\rjust{\strut{}$\nu=3$}}% + \put(5957,4581){\rjust{\strut{}$\nu=2$}}% + \put(5957,4781){\rjust{\strut{}$\nu=1$}}% + \put(3955,5244){\cjust{\strut{}Chi-squared Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}3}}% + \put(4924,400){\cjust{\strut{}2}}% + \put(2987,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-erlang.tex b/software/gsl-1.15/doc/rand-erlang.tex new file mode 100644 index 000000000..8a5a53cdf --- /dev/null +++ b/software/gsl-1.15/doc/rand-erlang.tex @@ -0,0 +1,1443 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-erlang.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-erlang.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 4944 M +19 -72 V +20 -70 V +19 -69 V +20 -68 V +19 -67 V +20 -66 V +19 -64 V +19 -64 V +20 -63 V +19 -61 V +20 -61 V +19 -59 V +20 -59 V +19 -57 V +19 -57 V +20 -55 V +19 -55 V +20 -54 V +19 -53 V +20 -52 V +19 -51 V +19 -51 V +20 -49 V +19 -49 V +20 -48 V +19 -47 V +20 -46 V +19 -46 V +19 -44 V +20 -44 V +19 -44 V +20 -42 V +19 -42 V +20 -41 V +19 -41 V +19 -40 V +20 -39 V +19 -38 V +20 -38 V +19 -38 V +20 -36 V +19 -36 V +19 -36 V +20 -35 V +19 -34 V +20 -33 V +19 -34 V +20 -32 V +19 -32 V +19 -32 V +20 -31 V +19 -30 V +20 -30 V +19 -30 V +20 -29 V +19 -28 V +19 -28 V +20 -28 V +19 -27 V +20 -27 V +19 -26 V +20 -26 V +19 -25 V +19 -25 V +20 -24 V +19 -25 V +20 -23 V +19 -24 V +20 -23 V +19 -22 V +19 -22 V +20 -22 V +19 -22 V +20 -21 V +19 -20 V +20 -21 V +19 -20 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -18 V +20 -19 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -16 V +20 -16 V +19 -16 V +19 -16 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -14 V +19 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -14 V +3052 1401 L +20 -12 V +19 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -9 V +20 -8 V +19 -7 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +5092 764 L +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 71 V +20 69 V +19 66 V +20 64 V +19 62 V +20 59 V +19 58 V +19 56 V +20 53 V +19 52 V +20 50 V +19 48 V +20 46 V +19 45 V +19 43 V +20 41 V +19 40 V +20 38 V +19 36 V +20 35 V +19 34 V +19 32 V +20 31 V +19 30 V +20 28 V +19 27 V +20 26 V +19 24 V +19 24 V +20 22 V +19 21 V +20 21 V +19 19 V +20 18 V +19 17 V +19 16 V +20 15 V +19 15 V +20 13 V +19 13 V +20 12 V +19 11 V +19 10 V +20 9 V +19 9 V +20 8 V +19 8 V +20 6 V +19 6 V +19 6 V +20 5 V +19 4 V +20 4 V +19 3 V +20 2 V +19 2 V +19 2 V +20 1 V +19 1 V +20 0 V +19 -1 V +20 0 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +20 -8 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -10 V +3052 1958 L +20 -9 V +19 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -10 V +19 -9 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +5092 1094 L +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +stroke +LT2 +LTb +LT2 +6077 4381 M +543 0 V +1051 631 M +19 1 V +20 1 V +19 3 V +20 4 V +19 5 V +20 6 V +19 6 V +19 8 V +20 8 V +19 9 V +20 10 V +19 10 V +20 11 V +19 12 V +19 12 V +20 12 V +19 13 V +20 14 V +19 13 V +20 15 V +19 14 V +19 15 V +20 15 V +19 16 V +20 15 V +19 16 V +20 16 V +19 16 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +19 17 V +20 17 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +19 16 V +20 16 V +19 16 V +20 16 V +19 16 V +20 16 V +19 15 V +19 15 V +20 16 V +19 14 V +20 15 V +19 15 V +20 14 V +19 14 V +19 14 V +20 14 V +19 14 V +20 13 V +19 13 V +20 13 V +19 13 V +19 12 V +20 12 V +19 12 V +20 12 V +19 11 V +20 12 V +19 11 V +19 10 V +20 11 V +19 10 V +20 10 V +19 10 V +20 9 V +19 10 V +19 9 V +20 8 V +19 9 V +20 8 V +19 8 V +20 8 V +19 7 V +19 8 V +20 7 V +19 6 V +20 7 V +19 6 V +20 6 V +19 6 V +19 6 V +20 5 V +19 5 V +20 5 V +19 5 V +20 5 V +19 4 V +19 4 V +20 4 V +19 3 V +20 4 V +3052 1774 L +20 3 V +19 3 V +19 2 V +20 3 V +19 2 V +20 2 V +19 1 V +20 2 V +19 1 V +19 2 V +20 1 V +19 1 V +20 0 V +19 1 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +5092 1436 L +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4381){\rjust{\strut{}$n=3$}}% + \put(5957,4581){\rjust{\strut{}$n=2$}}% + \put(5957,4781){\rjust{\strut{}$n=1$}}% + \put(3955,5244){\cjust{\strut{}Erlang Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-exponential.tex b/software/gsl-1.15/doc/rand-exponential.tex new file mode 100644 index 000000000..f02d92608 --- /dev/null +++ b/software/gsl-1.15/doc/rand-exponential.tex @@ -0,0 +1,1130 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-exponential.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-exponential.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +1936 31 R +0 -31 V +1937 31 R +0 -31 V +1936 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 4944 M +19 -43 V +20 -43 V +19 -42 V +20 -42 V +19 -41 V +20 -41 V +19 -41 V +19 -40 V +20 -39 V +19 -40 V +20 -39 V +19 -38 V +20 -38 V +19 -38 V +19 -38 V +20 -37 V +19 -36 V +20 -37 V +19 -36 V +20 -35 V +19 -35 V +19 -35 V +20 -35 V +19 -34 V +20 -34 V +19 -33 V +20 -34 V +19 -32 V +19 -33 V +20 -32 V +19 -32 V +20 -31 V +19 -32 V +20 -31 V +19 -30 V +19 -31 V +20 -30 V +19 -29 V +20 -30 V +19 -29 V +20 -29 V +19 -28 V +19 -28 V +20 -28 V +19 -28 V +20 -27 V +19 -28 V +20 -26 V +19 -27 V +19 -26 V +20 -26 V +19 -26 V +20 -26 V +19 -25 V +20 -25 V +19 -25 V +19 -25 V +20 -24 V +19 -24 V +20 -24 V +19 -23 V +20 -24 V +19 -23 V +19 -23 V +20 -22 V +19 -23 V +20 -22 V +19 -22 V +20 -22 V +19 -21 V +19 -22 V +20 -21 V +19 -21 V +20 -20 V +19 -21 V +20 -20 V +19 -20 V +19 -20 V +20 -20 V +19 -19 V +20 -20 V +19 -19 V +20 -19 V +19 -18 V +19 -19 V +20 -18 V +19 -18 V +20 -18 V +19 -18 V +20 -18 V +19 -17 V +19 -17 V +20 -18 V +19 -17 V +20 -16 V +19 -17 V +20 -16 V +19 -17 V +19 -16 V +20 -16 V +19 -15 V +20 -16 V +3052 2165 L +20 -15 V +19 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -14 V +19 -15 V +20 -14 V +19 -14 V +19 -14 V +20 -14 V +19 -14 V +20 -13 V +19 -14 V +20 -13 V +19 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -12 V +20 -12 V +19 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +5092 1166 L +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 2788 M +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -11 V +19 -10 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +3052 1917 L +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +5092 1391 L +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\mu=2$}}% + \put(5957,4781){\rjust{\strut{}$\mu=1$}}% + \put(3955,5244){\cjust{\strut{}Exponential Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}3}}% + \put(4924,400){\cjust{\strut{}2}}% + \put(2987,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-exppow.tex b/software/gsl-1.15/doc/rand-exppow.tex new file mode 100644 index 000000000..847167f50 --- /dev/null +++ b/software/gsl-1.15/doc/rand-exppow.tex @@ -0,0 +1,1157 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-exppow.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-exppow.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1078 R +-31 0 V +31 1079 R +-31 0 V +31 1078 R +-31 0 V +31 1078 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 1 V +19 0 V +20 0 V +19 0 V +20 1 V +19 0 V +19 1 V +20 1 V +19 1 V +20 2 V +19 2 V +20 2 V +19 3 V +19 4 V +20 4 V +19 6 V +20 6 V +19 8 V +20 9 V +19 11 V +19 13 V +20 14 V +19 17 V +20 20 V +3052 780 L +20 26 V +19 29 V +19 33 V +20 36 V +19 41 V +20 45 V +19 50 V +20 54 V +19 59 V +19 64 V +20 68 V +19 73 V +20 78 V +19 81 V +20 86 V +19 90 V +19 93 V +20 96 V +19 99 V +20 100 V +19 102 V +20 102 V +19 103 V +19 102 V +20 101 V +19 99 V +20 96 V +19 93 V +20 90 V +19 85 V +19 81 V +20 75 V +19 70 V +20 64 V +19 59 V +20 52 V +19 46 V +19 40 V +20 34 V +19 28 V +20 22 V +19 18 V +20 12 V +19 8 V +19 4 V +20 2 V +19 0 V +20 -2 V +19 -4 V +19 -8 V +20 -12 V +19 -18 V +20 -22 V +19 -28 V +20 -34 V +19 -40 V +19 -46 V +20 -52 V +19 -59 V +20 -64 V +19 -70 V +20 -75 V +19 -81 V +19 -85 V +20 -90 V +19 -93 V +20 -96 V +19 -99 V +20 -101 V +19 -102 V +19 -103 V +20 -102 V +19 -102 V +20 -100 V +19 -99 V +20 -96 V +19 -93 V +19 -90 V +20 -86 V +19 -81 V +20 -78 V +19 -73 V +20 -68 V +19 -64 V +19 -59 V +20 -54 V +19 -50 V +20 -45 V +19 -41 V +20 -36 V +19 -33 V +19 -29 V +20 -26 V +19 -23 V +20 -20 V +19 -17 V +20 -14 V +19 -13 V +19 -11 V +20 -9 V +19 -8 V +20 -6 V +19 -6 V +20 -4 V +5092 645 L +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 775 M +19 1 V +20 1 V +19 1 V +20 1 V +19 2 V +20 1 V +19 1 V +19 1 V +20 1 V +19 1 V +20 2 V +19 1 V +20 1 V +19 1 V +19 2 V +20 1 V +19 1 V +20 2 V +19 1 V +20 1 V +19 2 V +19 1 V +20 1 V +19 2 V +20 1 V +19 2 V +20 1 V +19 2 V +19 1 V +20 2 V +19 1 V +20 2 V +19 1 V +20 2 V +19 1 V +19 2 V +20 2 V +19 1 V +20 2 V +19 2 V +20 2 V +19 1 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 1 V +19 2 V +20 2 V +19 3 V +20 2 V +19 2 V +20 2 V +19 2 V +19 2 V +20 2 V +19 3 V +20 2 V +19 2 V +20 3 V +19 2 V +19 2 V +20 3 V +19 2 V +20 3 V +19 3 V +20 2 V +19 3 V +19 3 V +20 2 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 3 V +20 3 V +19 4 V +19 3 V +20 4 V +19 3 V +20 4 V +19 4 V +20 4 V +19 4 V +19 4 V +20 4 V +19 4 V +20 4 V +19 5 V +20 4 V +19 5 V +19 4 V +20 5 V +19 5 V +20 5 V +3052 1018 L +20 6 V +19 5 V +19 5 V +20 6 V +19 6 V +20 6 V +19 6 V +20 6 V +19 7 V +19 6 V +20 7 V +19 7 V +20 8 V +19 7 V +20 8 V +19 8 V +19 8 V +20 9 V +19 9 V +20 9 V +19 9 V +20 10 V +19 10 V +19 11 V +20 11 V +19 12 V +20 12 V +19 13 V +20 13 V +19 14 V +19 15 V +20 16 V +19 16 V +20 18 V +19 19 V +20 20 V +19 22 V +19 24 V +20 26 V +19 29 V +20 32 V +19 36 V +20 43 V +19 52 V +19 68 V +20 107 V +19 0 V +20 -107 V +19 -68 V +19 -52 V +20 -43 V +19 -36 V +20 -32 V +19 -29 V +20 -26 V +19 -24 V +19 -22 V +20 -20 V +19 -19 V +20 -18 V +19 -16 V +20 -16 V +19 -15 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +20 -11 V +19 -11 V +19 -10 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +5092 964 L +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=1, b=0.5$}}% + \put(5957,4781){\rjust{\strut{}$a=1, b=2.5$}}% + \put(3955,5244){\cjust{\strut{}Exponential Power Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4944){\rjust{\strut{} 0.8}}% + \put(900,3866){\rjust{\strut{} 0.6}}% + \put(900,2788){\rjust{\strut{} 0.4}}% + \put(900,1709){\rjust{\strut{} 0.2}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-fdist.tex b/software/gsl-1.15/doc/rand-fdist.tex new file mode 100644 index 000000000..8960cf32a --- /dev/null +++ b/software/gsl-1.15/doc/rand-fdist.tex @@ -0,0 +1,1115 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-fdist.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-fdist.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +2905 31 R +0 -31 V +2904 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1301 4944 M +3 -30 V +19 -181 V +19 -163 V +20 -148 V +19 -135 V +20 -125 V +19 -114 V +20 -106 V +19 -99 V +19 -92 V +20 -87 V +19 -81 V +20 -76 V +19 -72 V +20 -68 V +19 -64 V +19 -61 V +20 -58 V +19 -56 V +20 -53 V +19 -50 V +20 -49 V +19 -46 V +19 -44 V +20 -43 V +19 -41 V +20 -39 V +19 -38 V +20 -37 V +19 -35 V +19 -34 V +20 -33 V +19 -32 V +20 -30 V +19 -30 V +20 -29 V +19 -28 V +19 -27 V +20 -26 V +19 -26 V +20 -25 V +19 -24 V +20 -23 V +19 -23 V +19 -22 V +20 -22 V +19 -21 V +20 -21 V +19 -20 V +20 -19 V +19 -19 V +19 -19 V +20 -18 V +19 -18 V +20 -17 V +19 -17 V +20 -16 V +19 -17 V +19 -15 V +20 -16 V +19 -15 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +19 -14 V +20 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +19 -8 V +20 -7 V +3285 1516 L +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +5325 1089 L +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 1121 V +20 404 V +19 273 V +20 202 V +19 155 V +20 122 V +19 97 V +19 76 V +20 62 V +19 48 V +20 37 V +19 28 V +20 21 V +19 15 V +19 9 V +20 4 V +19 1 V +20 -3 V +19 -6 V +20 -9 V +19 -10 V +19 -13 V +20 -14 V +19 -16 V +20 -17 V +19 -18 V +20 -18 V +19 -20 V +19 -20 V +20 -21 V +19 -21 V +20 -21 V +19 -22 V +20 -22 V +19 -22 V +19 -22 V +20 -22 V +19 -23 V +20 -22 V +19 -22 V +20 -22 V +19 -22 V +19 -22 V +20 -22 V +19 -22 V +20 -21 V +19 -21 V +20 -21 V +19 -21 V +19 -21 V +20 -21 V +19 -20 V +20 -20 V +19 -20 V +20 -20 V +19 -19 V +19 -19 V +20 -19 V +19 -19 V +20 -18 V +19 -19 V +20 -18 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -17 V +19 -16 V +20 -15 V +19 -16 V +20 -15 V +19 -16 V +20 -15 V +19 -14 V +19 -15 V +20 -14 V +19 -14 V +20 -14 V +19 -14 V +20 -14 V +19 -13 V +19 -13 V +20 -14 V +19 -12 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +3052 1890 L +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +5092 1260 L +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\nu_1=3, \nu_2=2$}}% + \put(5957,4781){\rjust{\strut{}$\nu_1=1, \nu_2=1$}}% + \put(3955,5244){\cjust{\strut{}F-Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}2}}% + \put(3956,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-flat.tex b/software/gsl-1.15/doc/rand-flat.tex new file mode 100644 index 000000000..402e25753 --- /dev/null +++ b/software/gsl-1.15/doc/rand-flat.tex @@ -0,0 +1,1140 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-flat.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-flat.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 2157 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +3033 2788 L +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -2157 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +5053 631 L +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 1198 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +3033 1829 L +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +5073 1829 L +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -1198 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=1.2,b=4.8$}}% + \put(5957,4781){\rjust{\strut{}$a=0.5,b=2.5$}}% + \put(3955,5244){\cjust{\strut{}Flat Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-gamma.tex b/software/gsl-1.15/doc/rand-gamma.tex new file mode 100644 index 000000000..55e5aaad1 --- /dev/null +++ b/software/gsl-1.15/doc/rand-gamma.tex @@ -0,0 +1,1443 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gamma.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-gamma.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 4944 M +19 -72 V +20 -70 V +19 -69 V +20 -68 V +19 -67 V +20 -66 V +19 -64 V +19 -64 V +20 -63 V +19 -61 V +20 -61 V +19 -59 V +20 -59 V +19 -57 V +19 -57 V +20 -55 V +19 -55 V +20 -54 V +19 -53 V +20 -52 V +19 -51 V +19 -51 V +20 -49 V +19 -49 V +20 -48 V +19 -47 V +20 -46 V +19 -46 V +19 -44 V +20 -44 V +19 -44 V +20 -42 V +19 -42 V +20 -41 V +19 -41 V +19 -40 V +20 -39 V +19 -38 V +20 -38 V +19 -38 V +20 -36 V +19 -36 V +19 -36 V +20 -35 V +19 -34 V +20 -33 V +19 -34 V +20 -32 V +19 -32 V +19 -32 V +20 -31 V +19 -30 V +20 -30 V +19 -30 V +20 -29 V +19 -28 V +19 -28 V +20 -28 V +19 -27 V +20 -27 V +19 -26 V +20 -26 V +19 -25 V +19 -25 V +20 -24 V +19 -25 V +20 -23 V +19 -24 V +20 -23 V +19 -22 V +19 -22 V +20 -22 V +19 -22 V +20 -21 V +19 -20 V +20 -21 V +19 -20 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -18 V +20 -19 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -16 V +20 -16 V +19 -16 V +19 -16 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -14 V +19 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -14 V +3052 1401 L +20 -12 V +19 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -9 V +20 -8 V +19 -7 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +5092 764 L +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 71 V +20 69 V +19 66 V +20 64 V +19 62 V +20 59 V +19 58 V +19 56 V +20 53 V +19 52 V +20 50 V +19 48 V +20 46 V +19 45 V +19 43 V +20 41 V +19 40 V +20 38 V +19 36 V +20 35 V +19 34 V +19 32 V +20 31 V +19 30 V +20 28 V +19 27 V +20 26 V +19 24 V +19 24 V +20 22 V +19 21 V +20 21 V +19 19 V +20 18 V +19 17 V +19 16 V +20 15 V +19 15 V +20 13 V +19 13 V +20 12 V +19 11 V +19 10 V +20 9 V +19 9 V +20 8 V +19 8 V +20 6 V +19 6 V +19 6 V +20 5 V +19 4 V +20 4 V +19 3 V +20 2 V +19 2 V +19 2 V +20 1 V +19 1 V +20 0 V +19 -1 V +20 0 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +20 -8 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -10 V +3052 1958 L +20 -9 V +19 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -10 V +19 -9 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +5092 1094 L +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +stroke +LT2 +LTb +LT2 +6077 4381 M +543 0 V +1051 631 M +19 1 V +20 1 V +19 3 V +20 4 V +19 5 V +20 6 V +19 6 V +19 8 V +20 8 V +19 9 V +20 10 V +19 10 V +20 11 V +19 12 V +19 12 V +20 12 V +19 13 V +20 14 V +19 13 V +20 15 V +19 14 V +19 15 V +20 15 V +19 16 V +20 15 V +19 16 V +20 16 V +19 16 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +19 17 V +20 17 V +19 16 V +20 17 V +19 16 V +20 17 V +19 16 V +19 16 V +20 16 V +19 16 V +20 16 V +19 16 V +20 16 V +19 15 V +19 15 V +20 16 V +19 14 V +20 15 V +19 15 V +20 14 V +19 14 V +19 14 V +20 14 V +19 14 V +20 13 V +19 13 V +20 13 V +19 13 V +19 12 V +20 12 V +19 12 V +20 12 V +19 11 V +20 12 V +19 11 V +19 10 V +20 11 V +19 10 V +20 10 V +19 10 V +20 9 V +19 10 V +19 9 V +20 8 V +19 9 V +20 8 V +19 8 V +20 8 V +19 7 V +19 8 V +20 7 V +19 6 V +20 7 V +19 6 V +20 6 V +19 6 V +19 6 V +20 5 V +19 5 V +20 5 V +19 5 V +20 5 V +19 4 V +19 4 V +20 4 V +19 3 V +20 4 V +3052 1774 L +20 3 V +19 3 V +19 2 V +20 3 V +19 2 V +20 2 V +19 1 V +20 2 V +19 1 V +19 2 V +20 1 V +19 1 V +20 0 V +19 1 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +5092 1436 L +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4381){\rjust{\strut{}$a=3$}}% + \put(5957,4581){\rjust{\strut{}$a=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1$}}% + \put(3955,5244){\cjust{\strut{}Gamma Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1}}% + \put(900,2788){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-gaussian-tail.tex b/software/gsl-1.15/doc/rand-gaussian-tail.tex new file mode 100644 index 000000000..9446b7a20 --- /dev/null +++ b/software/gsl-1.15/doc/rand-gaussian-tail.tex @@ -0,0 +1,835 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gaussian-tail.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-gaussian-tail.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1078 R +-31 0 V +31 1079 R +-31 0 V +31 1078 R +-31 0 V +31 1078 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 4149 V +19 -103 V +19 -103 V +20 -100 V +19 -99 V +20 -98 V +19 -96 V +20 -95 V +19 -93 V +19 -91 V +20 -90 V +19 -88 V +20 -86 V +3052 3553 L +20 -84 V +19 -81 V +19 -81 V +20 -78 V +19 -77 V +20 -75 V +19 -74 V +20 -72 V +19 -71 V +19 -69 V +20 -67 V +19 -66 V +20 -65 V +19 -63 V +20 -61 V +19 -60 V +19 -58 V +20 -57 V +19 -56 V +20 -54 V +19 -53 V +20 -51 V +19 -50 V +19 -49 V +20 -47 V +19 -46 V +20 -45 V +19 -43 V +20 -42 V +19 -41 V +19 -40 V +20 -39 V +19 -37 V +20 -36 V +19 -36 V +20 -34 V +19 -33 V +19 -32 V +20 -31 V +19 -30 V +20 -29 V +19 -28 V +20 -27 V +19 -26 V +19 -26 V +20 -24 V +19 -24 V +20 -23 V +19 -22 V +19 -21 V +20 -21 V +19 -19 V +20 -19 V +19 -19 V +20 -17 V +19 -17 V +19 -17 V +20 -16 V +19 -15 V +20 -14 V +19 -14 V +20 -14 V +19 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +5092 661 L +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 -1 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 -1 V +19 0 V +20 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$\sigma=1,a=1.5$}}% + \put(3955,5244){\cjust{\strut{}Gaussian Tail Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 2}}% + \put(900,3866){\rjust{\strut{} 1.5}}% + \put(900,2788){\rjust{\strut{} 1}}% + \put(900,1709){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-gaussian.tex b/software/gsl-1.15/doc/rand-gaussian.tex new file mode 100644 index 000000000..35315c01f --- /dev/null +++ b/software/gsl-1.15/doc/rand-gaussian.tex @@ -0,0 +1,1160 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gaussian.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-gaussian.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 1 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 1 V +19 0 V +20 0 V +19 0 V +19 1 V +20 0 V +19 0 V +20 1 V +19 0 V +20 1 V +19 0 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 2 V +20 1 V +19 2 V +20 2 V +19 2 V +20 2 V +19 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 4 V +20 5 V +19 4 V +19 6 V +20 5 V +19 7 V +20 6 V +19 8 V +20 8 V +19 8 V +19 10 V +20 10 V +19 10 V +20 12 V +19 12 V +20 14 V +19 14 V +19 15 V +20 17 V +19 17 V +20 18 V +19 20 V +20 21 V +19 22 V +19 24 V +20 25 V +19 26 V +20 28 V +19 29 V +20 31 V +19 33 V +19 34 V +20 35 V +19 38 V +20 39 V +19 40 V +20 43 V +19 44 V +19 46 V +20 47 V +19 49 V +20 51 V +3052 1658 L +20 54 V +19 56 V +19 57 V +20 59 V +19 60 V +20 62 V +19 63 V +20 64 V +19 65 V +19 67 V +20 67 V +19 68 V +20 68 V +19 69 V +20 70 V +19 69 V +19 70 V +20 70 V +19 69 V +20 70 V +19 68 V +20 68 V +19 67 V +19 66 V +20 64 V +19 63 V +20 62 V +19 60 V +20 58 V +19 55 V +19 54 V +20 51 V +19 48 V +20 45 V +19 43 V +20 39 V +19 37 V +19 33 V +20 30 V +19 26 V +20 23 V +19 19 V +20 15 V +19 11 V +19 8 V +20 4 V +19 0 V +20 -4 V +19 -8 V +19 -11 V +20 -15 V +19 -19 V +20 -23 V +19 -26 V +20 -30 V +19 -33 V +19 -37 V +20 -39 V +19 -43 V +20 -45 V +19 -48 V +20 -51 V +19 -54 V +19 -55 V +20 -58 V +19 -60 V +20 -62 V +19 -63 V +20 -64 V +19 -66 V +19 -67 V +20 -68 V +19 -68 V +20 -70 V +19 -69 V +20 -70 V +19 -70 V +19 -69 V +20 -70 V +19 -69 V +20 -68 V +19 -68 V +20 -67 V +19 -67 V +19 -65 V +20 -64 V +19 -63 V +20 -62 V +19 -60 V +20 -59 V +19 -57 V +19 -56 V +20 -54 V +19 -53 V +20 -51 V +19 -49 V +20 -47 V +19 -46 V +19 -44 V +20 -43 V +19 -40 V +20 -39 V +19 -38 V +20 -35 V +5092 1139 L +19 -33 V +20 -31 V +19 -29 V +20 -28 V +19 -26 V +20 -25 V +19 -24 V +19 -22 V +20 -21 V +19 -20 V +20 -18 V +19 -17 V +20 -17 V +19 -15 V +19 -14 V +20 -14 V +19 -12 V +20 -12 V +19 -10 V +20 -10 V +19 -10 V +19 -8 V +20 -8 V +19 -8 V +20 -6 V +19 -7 V +20 -5 V +19 -6 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 -1 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 707 M +19 3 V +20 3 V +19 4 V +20 3 V +19 4 V +20 4 V +19 4 V +19 4 V +20 4 V +19 4 V +20 5 V +19 4 V +20 5 V +19 5 V +19 5 V +20 5 V +19 6 V +20 5 V +19 6 V +20 6 V +19 6 V +19 6 V +20 7 V +19 6 V +20 7 V +19 7 V +20 7 V +19 7 V +19 8 V +20 8 V +19 8 V +20 8 V +19 8 V +20 8 V +19 9 V +19 9 V +20 9 V +19 10 V +20 9 V +19 10 V +20 10 V +19 10 V +19 10 V +20 11 V +19 11 V +20 11 V +19 11 V +20 11 V +19 12 V +19 12 V +20 12 V +19 12 V +20 13 V +19 13 V +20 13 V +19 13 V +19 13 V +20 14 V +19 13 V +20 14 V +19 15 V +20 14 V +19 14 V +19 15 V +20 15 V +19 15 V +20 15 V +19 16 V +20 15 V +19 16 V +19 16 V +20 16 V +19 16 V +20 16 V +19 17 V +20 16 V +19 17 V +19 17 V +20 17 V +19 17 V +20 17 V +19 17 V +20 17 V +19 17 V +19 18 V +20 17 V +19 18 V +20 17 V +19 17 V +20 18 V +19 17 V +19 18 V +20 17 V +19 18 V +20 17 V +19 17 V +20 17 V +19 18 V +19 17 V +20 17 V +19 16 V +20 17 V +3052 1903 L +20 16 V +19 16 V +19 17 V +20 16 V +19 15 V +20 16 V +19 15 V +20 16 V +19 15 V +19 14 V +20 15 V +19 14 V +20 14 V +19 13 V +20 14 V +19 13 V +19 13 V +20 12 V +19 12 V +20 12 V +19 11 V +20 11 V +19 11 V +19 10 V +20 10 V +19 9 V +20 10 V +19 8 V +20 9 V +19 7 V +19 8 V +20 7 V +19 6 V +20 6 V +19 6 V +20 5 V +19 5 V +19 4 V +20 4 V +19 4 V +20 2 V +19 3 V +20 2 V +19 1 V +19 1 V +20 1 V +19 0 V +20 -1 V +19 -1 V +19 -1 V +20 -2 V +19 -3 V +20 -2 V +19 -4 V +20 -4 V +19 -4 V +19 -5 V +20 -5 V +19 -6 V +20 -6 V +19 -6 V +20 -7 V +19 -8 V +19 -7 V +20 -9 V +19 -8 V +20 -10 V +19 -9 V +20 -10 V +19 -10 V +19 -11 V +20 -11 V +19 -11 V +20 -12 V +19 -12 V +20 -12 V +19 -13 V +19 -13 V +20 -14 V +19 -13 V +20 -14 V +19 -14 V +20 -15 V +19 -14 V +19 -15 V +20 -16 V +19 -15 V +20 -16 V +19 -15 V +20 -16 V +19 -17 V +19 -16 V +20 -16 V +19 -17 V +20 -17 V +19 -16 V +20 -17 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -18 V +20 -17 V +5092 1697 L +19 -17 V +20 -18 V +19 -17 V +20 -17 V +19 -18 V +20 -17 V +19 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +19 -17 V +20 -16 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -16 V +19 -16 V +20 -15 V +19 -16 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +19 -14 V +20 -14 V +19 -15 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -12 V +20 -12 V +19 -12 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\sigma=2$}}% + \put(5957,4781){\rjust{\strut{}$\sigma=1$}}% + \put(3955,5244){\cjust{\strut{}Gaussian Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4944){\rjust{\strut{} 0.5}}% + \put(900,4081){\rjust{\strut{} 0.4}}% + \put(900,3219){\rjust{\strut{} 0.3}}% + \put(900,2356){\rjust{\strut{} 0.2}}% + \put(900,1494){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-geometric.tex b/software/gsl-1.15/doc/rand-geometric.tex new file mode 100644 index 000000000..b21a74b11 --- /dev/null +++ b/software/gsl-1.15/doc/rand-geometric.tex @@ -0,0 +1,864 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-geometric.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-geometric.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1051 631 M +0 -63 V +484 63 R +0 -31 V +484 31 R +0 -63 V +484 63 R +0 -31 V +484 31 R +0 -63 V +484 63 R +0 -31 V +484 31 R +0 -63 V +485 63 R +0 -31 V +484 31 R +0 -63 V +484 63 R +0 -31 V +484 31 R +0 -63 V +484 63 R +0 -31 V +484 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 3081 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -1541 V +3013 2171 L +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -770 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -385 V +19 0 V +19 0 V +20 0 V +5014 1016 L +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -192 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -97 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.5$}}% + \put(3955,5244){\cjust{\strut{}Geometric Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6376,400){\cjust{\strut{}5}}% + \put(5408,400){\cjust{\strut{}4}}% + \put(4440,400){\cjust{\strut{}3}}% + \put(3471,400){\cjust{\strut{}2}}% + \put(2503,400){\cjust{\strut{}1}}% + \put(1535,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.7}}% + \put(900,4328){\rjust{\strut{} 0.6}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,3096){\rjust{\strut{} 0.4}}% + \put(900,2479){\rjust{\strut{} 0.3}}% + \put(900,1863){\rjust{\strut{} 0.2}}% + \put(900,1247){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-gumbel.tex b/software/gsl-1.15/doc/rand-gumbel.tex new file mode 100644 index 000000000..0cf6108a2 --- /dev/null +++ b/software/gsl-1.15/doc/rand-gumbel.tex @@ -0,0 +1,966 @@ +% GNUPLOT: plain TeX with Postscript +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \begingroup + % Inner version of \newdimen from btxmac.tex + \edef\innernewdimen{\expandafter\noexpand\csname newdimen\endcsname}% + \innernewdimen\GNUPLOTunit + \endgroup + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.1bp +\special{! +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gumbel.tex +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 340 +%%CreationDate: Wed Sep 16 16:35:38 1998 +%%DocumentFonts: +%%BoundingBox: 0 0 360 237 +%%Orientation: Landscape +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -33 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 0 1 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def +/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +} +\GNUPLOTpicture(3600,2376) +\special{" +gnudict begin +gsave +0 0 translate +0.100 0.100 scale +0 setgray +newpath +LTb +450 400 M +63 0 V +3037 0 R +-63 0 V +450 647 M +63 0 V +3037 0 R +-63 0 V +450 893 M +63 0 V +3037 0 R +-63 0 V +450 1140 M +63 0 V +3037 0 R +-63 0 V +450 1386 M +63 0 V +3037 0 R +-63 0 V +450 1633 M +63 0 V +3037 0 R +-63 0 V +450 1879 M +63 0 V +3037 0 R +-63 0 V +450 2126 M +63 0 V +3037 0 R +-63 0 V +450 400 M +0 63 V +0 1663 R +0 -63 V +838 400 M +0 63 V +0 1663 R +0 -63 V +1225 400 M +0 63 V +0 1663 R +0 -63 V +1613 400 M +0 63 V +0 1663 R +0 -63 V +2000 400 M +0 63 V +0 1663 R +0 -63 V +2388 400 M +0 63 V +0 1663 R +0 -63 V +2775 400 M +0 63 V +0 1663 R +0 -63 V +3163 400 M +0 63 V +0 1663 R +0 -63 V +3550 400 M +0 63 V +0 1663 R +0 -63 V +LTb +450 400 M +3100 0 V +0 1726 V +-3100 0 V +450 400 L +1.000 UL +LT0 +3187 2013 M +263 0 V +450 411 M +10 1 V +11 1 V +10 1 V +10 2 V +11 1 V +10 1 V +11 2 V +10 1 V +10 2 V +11 2 V +10 2 V +10 2 V +11 2 V +10 2 V +11 2 V +10 3 V +10 2 V +11 3 V +10 3 V +10 3 V +11 3 V +10 3 V +10 4 V +11 3 V +10 4 V +11 4 V +10 4 V +10 4 V +11 4 V +10 5 V +10 4 V +11 5 V +10 5 V +11 5 V +10 6 V +10 5 V +11 6 V +10 6 V +10 6 V +11 6 V +10 6 V +10 7 V +11 6 V +10 7 V +11 7 V +10 8 V +10 7 V +11 7 V +10 8 V +10 8 V +11 8 V +10 8 V +10 8 V +11 9 V +10 8 V +11 9 V +10 9 V +10 9 V +11 9 V +10 9 V +10 9 V +11 9 V +10 10 V +11 9 V +10 10 V +10 10 V +11 10 V +10 9 V +10 10 V +11 10 V +10 10 V +10 10 V +11 11 V +10 10 V +11 10 V +10 10 V +10 10 V +11 10 V +10 11 V +10 10 V +11 10 V +10 10 V +11 10 V +10 10 V +10 10 V +11 10 V +10 10 V +10 10 V +11 10 V +10 10 V +10 9 V +11 10 V +10 9 V +11 10 V +10 9 V +10 9 V +11 9 V +10 9 V +10 9 V +11 9 V +10 8 V +11 9 V +10 8 V +10 8 V +11 8 V +10 8 V +10 8 V +11 7 V +10 8 V +10 7 V +11 7 V +10 7 V +11 7 V +10 6 V +10 7 V +11 6 V +10 6 V +10 6 V +11 5 V +10 6 V +11 5 V +10 5 V +10 5 V +11 5 V +10 4 V +10 5 V +11 4 V +10 4 V +10 3 V +11 4 V +10 3 V +11 4 V +10 3 V +10 2 V +11 3 V +10 2 V +10 3 V +11 2 V +10 2 V +11 1 V +10 2 V +10 1 V +11 2 V +10 1 V +10 0 V +11 1 V +10 1 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 -1 V +11 -1 V +10 0 V +10 -1 V +11 -1 V +10 -2 V +10 -1 V +11 -1 V +10 -2 V +11 -2 V +10 -2 V +10 -2 V +11 -2 V +10 -2 V +10 -3 V +11 -2 V +10 -3 V +11 -3 V +10 -2 V +10 -3 V +11 -4 V +10 -3 V +10 -3 V +11 -3 V +10 -4 V +10 -3 V +11 -4 V +10 -4 V +11 -4 V +10 -3 V +10 -4 V +11 -5 V +10 -4 V +10 -4 V +11 -4 V +10 -4 V +11 -5 V +10 -4 V +10 -5 V +11 -4 V +10 -5 V +10 -5 V +11 -4 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +11 -5 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +11 -5 V +10 -6 V +10 -5 V +11 -5 V +10 -5 V +10 -5 V +11 -6 V +10 -5 V +10 -5 V +11 -6 V +10 -5 V +11 -5 V +10 -6 V +10 -5 V +11 -5 V +10 -5 V +10 -6 V +11 -5 V +10 -5 V +11 -6 V +10 -5 V +10 -5 V +11 -6 V +10 -5 V +10 -5 V +11 -5 V +10 -6 V +10 -5 V +11 -5 V +10 -5 V +11 -5 V +10 -5 V +10 -6 V +11 -5 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +11 -5 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +10 -5 V +11 -4 V +10 -5 V +10 -5 V +11 -5 V +10 -5 V +11 -4 V +10 -5 V +10 -5 V +11 -4 V +10 -5 V +10 -5 V +11 -4 V +10 -5 V +10 -4 V +11 -5 V +10 -4 V +11 -4 V +10 -5 V +10 -4 V +11 -4 V +10 -5 V +10 -4 V +11 -4 V +10 -4 V +11 -4 V +10 -5 V +10 -4 V +11 -4 V +10 -4 V +10 -4 V +11 -4 V +10 -3 V +10 -4 V +11 -4 V +10 -4 V +11 -4 V +10 -4 V +10 -3 V +11 -4 V +10 -4 V +10 -3 V +11 -4 V +10 -3 V +11 -4 V +10 -3 V +10 -4 V +11 -3 V +10 -4 V +1.000 UL +LT1 +3187 1913 M +263 0 V +450 400 M +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 0 V +11 0 V +10 0 V +10 0 V +11 0 V +10 1 V +10 2 V +11 8 V +10 18 V +10 29 V +11 43 V +10 56 V +11 66 V +10 75 V +10 80 V +11 83 V +10 84 V +10 83 V +11 80 V +10 76 V +11 71 V +10 66 V +10 61 V +11 55 V +10 49 V +10 44 V +11 39 V +10 33 V +10 29 V +11 25 V +10 21 V +11 17 V +10 14 V +10 10 V +11 8 V +10 5 V +10 3 V +11 1 V +10 -1 V +11 -3 V +10 -5 V +10 -5 V +11 -7 V +10 -8 V +10 -9 V +11 -10 V +10 -10 V +10 -11 V +11 -12 V +10 -12 V +11 -12 V +10 -13 V +10 -13 V +11 -14 V +10 -13 V +10 -14 V +11 -14 V +10 -13 V +11 -14 V +10 -14 V +10 -14 V +11 -14 V +10 -13 V +10 -14 V +11 -14 V +10 -13 V +10 -14 V +11 -13 V +10 -13 V +11 -13 V +10 -13 V +10 -13 V +11 -12 V +10 -13 V +10 -12 V +11 -12 V +10 -12 V +11 -12 V +10 -11 V +10 -12 V +11 -11 V +10 -11 V +10 -11 V +11 -11 V +10 -10 V +10 -11 V +11 -10 V +10 -10 V +11 -10 V +10 -10 V +10 -10 V +11 -9 V +10 -9 V +10 -10 V +11 -9 V +10 -8 V +11 -9 V +10 -9 V +10 -8 V +11 -8 V +10 -9 V +10 -8 V +11 -8 V +10 -7 V +10 -8 V +11 -8 V +10 -7 V +11 -7 V +10 -7 V +10 -7 V +11 -7 V +10 -7 V +10 -7 V +11 -6 V +10 -7 V +10 -6 V +11 -7 V +10 -6 V +11 -6 V +10 -6 V +10 -6 V +11 -6 V +10 -5 V +10 -6 V +11 -5 V +10 -6 V +11 -5 V +10 -5 V +10 -6 V +11 -5 V +10 -5 V +10 -5 V +11 -5 V +10 -4 V +10 -5 V +11 -5 V +10 -4 V +11 -5 V +10 -4 V +10 -5 V +11 -4 V +10 -4 V +10 -4 V +11 -5 V +10 -4 V +11 -4 V +10 -4 V +10 -4 V +11 -3 V +10 -4 V +stroke +grestore +end +showpage +} +\put(3137,1913){\rjust{Type 2, $a=1,b=1$}} +\put(3137,2013){\rjust{Type 1, $a=1,b=1$}} +\put(2000,2276){\cjust{Gumbel Distributions}} +\put(2000,150){\cjust{$x$}} +\put(100,1263){% +\special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% +\cstack{$p(x)$}% +\special{ps: currentpoint grestore moveto}% +} +\put(3550,300){\cjust{2}} +\put(3163,300){\cjust{1.5}} +\put(2775,300){\cjust{1}} +\put(2388,300){\cjust{0.5}} +\put(2000,300){\cjust{0}} +\put(1613,300){\cjust{-0.5}} +\put(1225,300){\cjust{-1}} +\put(838,300){\cjust{-1.5}} +\put(450,300){\cjust{-2}} +\put(400,2126){\rjust{0.7}} +\put(400,1879){\rjust{0.6}} +\put(400,1633){\rjust{0.5}} +\put(400,1386){\rjust{0.4}} +\put(400,1140){\rjust{0.3}} +\put(400,893){\rjust{0.2}} +\put(400,647){\rjust{0.1}} +\put(400,400){\rjust{0}} +\endGNUPLOTpicture diff --git a/software/gsl-1.15/doc/rand-gumbel1.tex b/software/gsl-1.15/doc/rand-gumbel1.tex new file mode 100644 index 000000000..feab39dfc --- /dev/null +++ b/software/gsl-1.15/doc/rand-gumbel1.tex @@ -0,0 +1,844 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gumbel1.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-gumbel1.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +1051 631 M +0 -31 V +830 31 R +0 -31 V +830 31 R +0 -31 V +830 31 R +0 -31 V +829 31 R +0 -31 V +830 31 R +0 -31 V +830 31 R +0 -31 V +830 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 670 M +19 7 V +20 7 V +19 8 V +20 8 V +19 10 V +20 11 V +19 12 V +19 13 V +20 15 V +19 16 V +20 17 V +19 19 V +20 20 V +19 22 V +19 23 V +20 25 V +19 27 V +20 29 V +19 30 V +20 33 V +19 34 V +19 36 V +20 37 V +19 40 V +20 41 V +19 44 V +20 44 V +19 47 V +19 48 V +20 50 V +19 51 V +20 53 V +19 54 V +20 56 V +19 56 V +19 58 V +20 59 V +19 59 V +20 61 V +19 60 V +20 62 V +19 62 V +19 62 V +20 62 V +19 63 V +20 62 V +19 62 V +20 62 V +19 61 V +19 61 V +20 60 V +19 59 V +20 59 V +19 57 V +20 56 V +19 56 V +19 53 V +20 53 V +19 51 V +20 49 V +19 48 V +20 46 V +19 44 V +19 43 V +20 41 V +19 38 V +20 37 V +19 35 V +20 33 V +19 31 V +19 29 V +20 27 V +19 25 V +20 23 V +19 21 V +20 19 V +19 17 V +19 15 V +20 13 V +19 11 V +20 9 V +19 7 V +20 5 V +19 4 V +19 1 V +20 0 V +19 -2 V +20 -3 V +19 -5 V +20 -7 V +19 -8 V +19 -10 V +20 -11 V +19 -13 V +20 -14 V +19 -15 V +20 -17 V +19 -17 V +19 -19 V +20 -20 V +19 -21 V +20 -22 V +3052 3578 L +20 -24 V +19 -25 V +19 -25 V +20 -26 V +19 -27 V +20 -27 V +19 -28 V +20 -29 V +19 -29 V +19 -29 V +20 -31 V +19 -30 V +20 -31 V +19 -31 V +20 -31 V +19 -32 V +19 -32 V +20 -32 V +19 -32 V +20 -32 V +19 -33 V +20 -32 V +19 -33 V +19 -32 V +20 -33 V +19 -32 V +20 -33 V +19 -32 V +20 -32 V +19 -32 V +19 -32 V +20 -32 V +19 -32 V +20 -31 V +19 -32 V +20 -31 V +19 -31 V +19 -30 V +20 -31 V +19 -30 V +20 -29 V +19 -30 V +20 -29 V +19 -29 V +19 -29 V +20 -28 V +19 -28 V +20 -28 V +19 -27 V +19 -27 V +20 -27 V +19 -26 V +20 -26 V +19 -26 V +20 -25 V +19 -25 V +19 -25 V +20 -24 V +19 -24 V +20 -23 V +19 -24 V +20 -23 V +19 -22 V +19 -22 V +20 -22 V +19 -21 V +20 -22 V +19 -20 V +20 -21 V +19 -20 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -18 V +20 -18 V +19 -18 V +19 -18 V +20 -17 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -16 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -14 V +20 -14 V +19 -13 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +5092 1093 L +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}Type 1, $a=1,b=1$}}% + \put(3955,5244){\cjust{\strut{}Type 1 Gumbel Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6030,400){\cjust{\strut{}4}}% + \put(5200,400){\cjust{\strut{}3}}% + \put(4370,400){\cjust{\strut{}2}}% + \put(3541,400){\cjust{\strut{}1}}% + \put(2711,400){\cjust{\strut{}0}}% + \put(1881,400){\cjust{\strut{}-1}}% + \put(1051,400){\cjust{\strut{}-2}}% + \put(900,4944){\rjust{\strut{} 0.5}}% + \put(900,4081){\rjust{\strut{} 0.4}}% + \put(900,3219){\rjust{\strut{} 0.3}}% + \put(900,2356){\rjust{\strut{} 0.2}}% + \put(900,1494){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-gumbel2.tex b/software/gsl-1.15/doc/rand-gumbel2.tex new file mode 100644 index 000000000..39e7447d8 --- /dev/null +++ b/software/gsl-1.15/doc/rand-gumbel2.tex @@ -0,0 +1,841 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-gumbel2.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-gumbel2.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1051 631 M +0 -31 V +1452 31 R +0 -31 V +1453 31 R +0 -31 V +1452 31 R +0 -31 V +1452 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 1 V +19 3 V +20 4 V +19 8 V +19 13 V +20 18 V +19 25 V +20 33 V +19 41 V +20 49 V +19 58 V +19 65 V +20 73 V +19 80 V +20 86 V +19 91 V +20 96 V +19 99 V +19 102 V +20 103 V +19 105 V +20 105 V +19 105 V +20 104 V +19 103 V +19 100 V +20 99 V +19 96 V +20 94 V +19 91 V +20 87 V +19 84 V +19 81 V +20 77 V +19 74 V +20 70 V +19 67 V +20 64 V +19 60 V +19 56 V +20 53 V +19 50 V +20 47 V +19 44 V +20 40 V +19 38 V +19 35 V +20 32 V +19 30 V +20 27 V +19 25 V +20 22 V +19 21 V +19 18 V +20 16 V +19 14 V +20 12 V +19 11 V +20 9 V +19 7 V +19 5 V +20 5 V +19 3 V +20 1 V +19 0 V +20 0 V +19 -2 V +19 -4 V +20 -4 V +19 -5 V +20 -5 V +19 -7 V +20 -8 V +19 -8 V +19 -9 V +20 -10 V +19 -10 V +20 -11 V +19 -11 V +20 -12 V +19 -12 V +19 -13 V +20 -14 V +19 -13 V +20 -14 V +19 -15 V +20 -14 V +19 -15 V +19 -15 V +20 -16 V +19 -16 V +20 -16 V +3052 3671 L +20 -16 V +19 -16 V +19 -17 V +20 -17 V +19 -16 V +20 -17 V +19 -17 V +20 -17 V +19 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -18 V +20 -17 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -18 V +20 -17 V +19 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -17 V +19 -17 V +20 -16 V +19 -17 V +20 -16 V +19 -17 V +20 -16 V +19 -16 V +19 -16 V +20 -16 V +19 -16 V +20 -15 V +19 -16 V +20 -16 V +19 -15 V +19 -15 V +20 -16 V +19 -15 V +20 -15 V +19 -15 V +19 -15 V +20 -15 V +19 -14 V +20 -15 V +19 -14 V +20 -14 V +19 -15 V +19 -14 V +20 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +19 -14 V +20 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -13 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +20 -13 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -12 V +19 -12 V +20 -11 V +19 -12 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +5092 2182 L +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}Type 2, $a=1,b=1$}}% + \put(3955,5244){\cjust{\strut{}Type 2 Gumbel Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}2}}% + \put(5408,400){\cjust{\strut{}1.5}}% + \put(3956,400){\cjust{\strut{}1}}% + \put(2503,400){\cjust{\strut{}0.5}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.7}}% + \put(900,4328){\rjust{\strut{} 0.6}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,3096){\rjust{\strut{} 0.4}}% + \put(900,2479){\rjust{\strut{} 0.3}}% + \put(900,1863){\rjust{\strut{} 0.2}}% + \put(900,1247){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-hypergeometric.tex b/software/gsl-1.15/doc/rand-hypergeometric.tex new file mode 100644 index 000000000..80aa00e65 --- /dev/null +++ b/software/gsl-1.15/doc/rand-hypergeometric.tex @@ -0,0 +1,695 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-hypergeometric.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-hypergeometric.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 3685 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -509 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -2009 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -509 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +2994 658 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$n1=5, n2=20, t=3$}}% + \put(3955,5244){\cjust{\strut{}Hypergeometric Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.7}}% + \put(900,4328){\rjust{\strut{} 0.6}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,3096){\rjust{\strut{} 0.4}}% + \put(900,2479){\rjust{\strut{} 0.3}}% + \put(900,1863){\rjust{\strut{} 0.2}}% + \put(900,1247){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-landau.tex b/software/gsl-1.15/doc/rand-landau.tex new file mode 100644 index 000000000..5c4d8ad8c --- /dev/null +++ b/software/gsl-1.15/doc/rand-landau.tex @@ -0,0 +1,705 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-landau.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-landau.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 2157 R +-31 0 V +31 2156 R +-31 0 V +1051 631 M +0 -31 V +387 31 R +0 -31 V +388 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +388 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +388 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +387 31 R +0 -31 V +388 31 R +0 -31 V +387 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +1051 631 M +39 0 V +38 0 V +39 0 V +39 0 V +39 0 V +38 0 V +39 0 V +39 0 V +39 0 V +38 0 V +39 0 V +39 0 V +38 0 V +39 0 V +39 0 V +39 0 V +38 1 V +39 2 V +39 4 V +39 8 V +38 13 V +39 22 V +39 35 V +38 51 V +39 72 V +39 95 V +39 121 V +38 149 V +39 175 V +39 201 V +39 221 V +38 238 V +39 250 V +39 255 V +38 255 V +39 249 V +39 238 V +39 223 V +38 204 V +39 183 V +39 159 V +39 136 V +38 112 V +39 87 V +39 65 V +38 43 V +39 24 V +39 4 V +39 -11 V +38 -27 V +39 -40 V +39 -50 V +39 -61 V +38 -68 V +39 -75 V +39 -80 V +38 -84 V +39 -87 V +39 -90 V +39 -91 V +38 -91 V +39 -91 V +39 -91 V +39 -90 V +38 -89 V +39 -87 V +39 -86 V +38 -83 V +39 -81 V +39 -80 V +39 -76 V +38 -75 V +39 -72 V +39 -69 V +38 -67 V +39 -65 V +39 -63 V +39 -60 V +38 -58 V +39 -56 V +39 -54 V +39 -51 V +38 -50 V +39 -48 V +39 -45 V +38 -45 V +39 -42 V +39 -41 V +39 -39 V +38 -37 V +39 -36 V +39 -35 V +39 -33 V +38 -32 V +39 -31 V +39 -30 V +38 -28 V +39 -28 V +39 -26 V +39 -25 V +38 -25 V +39 -23 V +39 -23 V +39 -22 V +5117 1362 L +39 -20 V +39 -19 V +38 -19 V +39 -18 V +39 -18 V +39 -16 V +38 -17 V +39 -15 V +39 -15 V +39 -15 V +38 -14 V +39 -14 V +39 -13 V +38 -13 V +39 -12 V +39 -12 V +39 -11 V +38 -11 V +39 -11 V +39 -11 V +39 -10 V +38 -9 V +39 -10 V +39 -9 V +38 -9 V +39 -8 V +39 -9 V +39 -8 V +38 -8 V +39 -7 V +39 -8 V +39 -7 V +38 -7 V +39 -7 V +39 -6 V +38 -7 V +39 -6 V +39 -6 V +39 -6 V +38 -5 V +39 -6 V +39 -5 V +39 -6 V +38 -5 V +39 -5 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(3955,5244){\cjust{\strut{}Landau Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}10}}% + \put(6473,400){\cjust{\strut{}9}}% + \put(6085,400){\cjust{\strut{}8}}% + \put(5698,400){\cjust{\strut{}7}}% + \put(5311,400){\cjust{\strut{}6}}% + \put(4924,400){\cjust{\strut{}5}}% + \put(4536,400){\cjust{\strut{}4}}% + \put(4149,400){\cjust{\strut{}3}}% + \put(3762,400){\cjust{\strut{}2}}% + \put(3375,400){\cjust{\strut{}1}}% + \put(2987,400){\cjust{\strut{}0}}% + \put(2600,400){\cjust{\strut{}-1}}% + \put(2213,400){\cjust{\strut{}-2}}% + \put(1826,400){\cjust{\strut{}-3}}% + \put(1438,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4944){\rjust{\strut{} 0.2}}% + \put(900,2788){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-laplace.tex b/software/gsl-1.15/doc/rand-laplace.tex new file mode 100644 index 000000000..c4ac8102b --- /dev/null +++ b/software/gsl-1.15/doc/rand-laplace.tex @@ -0,0 +1,1160 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-laplace.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-laplace.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 784 R +-31 0 V +31 784 R +-31 0 V +31 785 R +-31 0 V +31 784 R +-31 0 V +31 784 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 657 M +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 2 V +20 1 V +19 1 V +20 1 V +19 1 V +20 2 V +19 1 V +19 2 V +20 1 V +19 2 V +20 1 V +19 2 V +20 2 V +19 1 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +19 3 V +20 2 V +19 3 V +20 2 V +19 3 V +20 2 V +19 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 4 V +20 3 V +19 4 V +19 3 V +20 4 V +19 4 V +20 4 V +19 4 V +20 5 V +19 4 V +19 5 V +20 4 V +19 5 V +20 6 V +19 5 V +20 5 V +19 6 V +19 6 V +20 6 V +19 6 V +20 7 V +19 6 V +20 7 V +19 7 V +19 8 V +20 7 V +19 8 V +20 8 V +19 9 V +20 9 V +19 9 V +19 9 V +20 10 V +19 10 V +20 10 V +19 11 V +20 11 V +19 11 V +19 12 V +20 12 V +19 13 V +20 13 V +19 13 V +20 14 V +19 15 V +19 14 V +20 16 V +19 16 V +20 16 V +19 17 V +20 18 V +19 18 V +19 19 V +20 20 V +19 20 V +20 21 V +19 21 V +20 22 V +19 23 V +19 24 V +20 25 V +19 25 V +20 27 V +3052 1459 L +20 28 V +19 29 V +19 30 V +20 31 V +19 33 V +20 33 V +19 34 V +20 36 V +19 37 V +19 38 V +20 39 V +19 41 V +20 42 V +19 43 V +20 45 V +19 47 V +19 48 V +20 50 V +19 51 V +20 53 V +19 55 V +20 57 V +19 59 V +19 60 V +20 63 V +19 65 V +20 67 V +19 70 V +20 72 V +19 74 V +19 77 V +20 79 V +19 82 V +20 85 V +19 88 V +20 91 V +19 94 V +19 97 V +20 100 V +19 104 V +20 107 V +19 111 V +20 115 V +19 118 V +19 123 V +20 127 V +19 0 V +20 -127 V +19 -123 V +19 -118 V +20 -115 V +19 -111 V +20 -107 V +19 -104 V +20 -100 V +19 -97 V +19 -94 V +20 -91 V +19 -88 V +20 -85 V +19 -82 V +20 -79 V +19 -77 V +19 -74 V +20 -72 V +19 -70 V +20 -67 V +19 -65 V +20 -63 V +19 -60 V +19 -59 V +20 -57 V +19 -55 V +20 -53 V +19 -51 V +20 -50 V +19 -48 V +19 -47 V +20 -45 V +19 -43 V +20 -42 V +19 -41 V +20 -39 V +19 -38 V +19 -37 V +20 -36 V +19 -34 V +20 -33 V +19 -33 V +20 -31 V +19 -30 V +19 -29 V +20 -28 V +19 -27 V +20 -27 V +19 -25 V +20 -25 V +19 -24 V +19 -23 V +20 -22 V +19 -21 V +20 -21 V +19 -20 V +20 -20 V +5092 1185 L +19 -18 V +20 -18 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -14 V +19 -15 V +20 -14 V +19 -13 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 792 M +19 3 V +20 2 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 4 V +20 3 V +19 3 V +19 4 V +20 3 V +19 4 V +20 3 V +19 4 V +20 4 V +19 4 V +19 3 V +20 4 V +19 4 V +20 4 V +19 5 V +20 4 V +19 4 V +19 4 V +20 5 V +19 4 V +20 5 V +19 4 V +20 5 V +19 5 V +19 5 V +20 5 V +19 5 V +20 5 V +19 5 V +20 5 V +19 6 V +19 5 V +20 6 V +19 6 V +20 5 V +19 6 V +20 6 V +19 6 V +19 6 V +20 7 V +19 6 V +20 6 V +19 7 V +20 7 V +19 7 V +19 6 V +20 7 V +19 8 V +20 7 V +19 7 V +20 8 V +19 7 V +19 8 V +20 8 V +19 8 V +20 8 V +19 9 V +20 8 V +19 9 V +19 9 V +20 8 V +19 9 V +20 10 V +19 9 V +20 10 V +19 9 V +19 10 V +20 10 V +19 10 V +20 11 V +19 10 V +20 11 V +19 11 V +19 11 V +20 11 V +19 11 V +20 12 V +19 12 V +20 12 V +19 12 V +19 12 V +20 13 V +19 13 V +20 13 V +19 13 V +20 14 V +19 14 V +19 14 V +20 14 V +19 14 V +20 15 V +3052 1532 L +20 15 V +19 15 V +19 16 V +20 16 V +19 16 V +20 17 V +19 17 V +20 17 V +19 17 V +19 18 V +20 18 V +19 18 V +20 19 V +19 18 V +20 20 V +19 19 V +19 20 V +20 20 V +19 21 V +20 21 V +19 21 V +20 21 V +19 22 V +19 23 V +20 22 V +19 23 V +20 24 V +19 24 V +20 24 V +19 25 V +19 25 V +20 25 V +19 26 V +20 27 V +19 26 V +20 28 V +19 27 V +19 29 V +20 28 V +19 30 V +20 29 V +19 30 V +20 31 V +19 31 V +19 32 V +20 32 V +19 0 V +20 -32 V +19 -32 V +19 -31 V +20 -31 V +19 -30 V +20 -29 V +19 -30 V +20 -28 V +19 -29 V +19 -27 V +20 -28 V +19 -26 V +20 -27 V +19 -26 V +20 -25 V +19 -25 V +19 -25 V +20 -24 V +19 -24 V +20 -24 V +19 -23 V +20 -22 V +19 -23 V +19 -22 V +20 -21 V +19 -21 V +20 -21 V +19 -21 V +20 -20 V +19 -20 V +19 -19 V +20 -20 V +19 -18 V +20 -19 V +19 -18 V +20 -18 V +19 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -16 V +20 -16 V +19 -16 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +5092 1368 L +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -8 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -6 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1$}}% + \put(3955,5244){\cjust{\strut{}Laplace Distribution (Two-sided Exponential)}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4552){\rjust{\strut{} 0.5}}% + \put(900,3768){\rjust{\strut{} 0.4}}% + \put(900,2984){\rjust{\strut{} 0.3}}% + \put(900,2199){\rjust{\strut{} 0.2}}% + \put(900,1415){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-levy.tex b/software/gsl-1.15/doc/rand-levy.tex new file mode 100644 index 000000000..e8bdf23b8 --- /dev/null +++ b/software/gsl-1.15/doc/rand-levy.tex @@ -0,0 +1,1157 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-levy.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-levy.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 958 R +-31 0 V +31 959 R +-31 0 V +31 958 R +-31 0 V +31 959 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 748 M +19 2 V +20 1 V +19 2 V +20 2 V +19 1 V +20 2 V +19 2 V +19 1 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 3 V +19 2 V +20 2 V +19 3 V +20 2 V +19 3 V +20 3 V +19 2 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 4 V +20 3 V +19 4 V +20 3 V +19 4 V +19 4 V +20 4 V +19 4 V +20 4 V +19 4 V +20 5 V +19 4 V +19 5 V +20 4 V +19 5 V +20 5 V +19 5 V +20 6 V +19 5 V +19 6 V +20 5 V +19 6 V +20 6 V +19 7 V +20 6 V +19 7 V +19 6 V +20 7 V +19 8 V +20 7 V +19 8 V +20 8 V +19 8 V +19 9 V +20 8 V +19 9 V +20 10 V +19 9 V +20 10 V +19 10 V +19 11 V +20 11 V +19 11 V +20 12 V +19 12 V +20 13 V +19 13 V +19 14 V +20 14 V +19 14 V +20 15 V +19 16 V +20 16 V +19 17 V +19 17 V +20 18 V +19 19 V +20 20 V +19 20 V +20 21 V +19 22 V +19 23 V +20 24 V +19 24 V +20 26 V +3052 1523 L +20 28 V +19 29 V +19 30 V +20 31 V +19 33 V +20 33 V +19 35 V +20 37 V +19 38 V +19 39 V +20 41 V +19 43 V +20 44 V +19 46 V +20 47 V +19 49 V +19 51 V +20 53 V +19 54 V +20 56 V +19 57 V +20 59 V +19 61 V +19 62 V +20 63 V +19 64 V +20 65 V +19 66 V +20 66 V +19 67 V +19 66 V +20 65 V +19 64 V +20 63 V +19 61 V +20 58 V +19 55 V +19 52 V +20 47 V +19 43 V +20 38 V +19 32 V +20 27 V +19 20 V +19 13 V +20 7 V +19 0 V +20 -7 V +19 -13 V +19 -20 V +20 -27 V +19 -32 V +20 -38 V +19 -43 V +20 -47 V +19 -52 V +19 -55 V +20 -58 V +19 -61 V +20 -63 V +19 -64 V +20 -65 V +19 -66 V +19 -67 V +20 -66 V +19 -66 V +20 -65 V +19 -64 V +20 -63 V +19 -62 V +19 -61 V +20 -59 V +19 -57 V +20 -56 V +19 -54 V +20 -53 V +19 -51 V +19 -49 V +20 -47 V +19 -46 V +20 -44 V +19 -43 V +20 -41 V +19 -39 V +19 -38 V +20 -37 V +19 -35 V +20 -33 V +19 -33 V +20 -31 V +19 -30 V +19 -29 V +20 -28 V +19 -26 V +20 -26 V +19 -24 V +20 -24 V +19 -23 V +19 -22 V +20 -21 V +19 -20 V +20 -20 V +19 -19 V +20 -18 V +5092 1263 L +19 -17 V +20 -16 V +19 -16 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +19 -13 V +20 -13 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -8 V +19 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -6 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 636 M +19 1 V +20 0 V +19 1 V +20 0 V +19 1 V +20 1 V +19 0 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 1 V +20 2 V +19 1 V +20 1 V +19 2 V +20 2 V +19 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 4 V +20 4 V +19 4 V +19 5 V +20 5 V +19 5 V +20 5 V +19 6 V +20 6 V +19 6 V +19 6 V +20 7 V +19 8 V +20 7 V +19 8 V +20 9 V +19 8 V +19 10 V +20 9 V +19 10 V +20 11 V +19 11 V +20 12 V +19 12 V +19 12 V +20 13 V +19 14 V +20 14 V +19 15 V +20 15 V +19 16 V +19 16 V +20 17 V +19 18 V +20 18 V +19 19 V +20 20 V +19 20 V +19 21 V +20 21 V +19 22 V +20 23 V +19 24 V +20 24 V +19 25 V +19 25 V +20 27 V +19 26 V +20 28 V +19 28 V +20 29 V +19 30 V +19 30 V +20 31 V +19 31 V +20 32 V +19 32 V +20 34 V +19 33 V +19 35 V +20 34 V +19 36 V +20 35 V +19 36 V +20 37 V +19 37 V +19 37 V +20 38 V +19 38 V +20 38 V +3052 2108 L +20 38 V +19 39 V +19 39 V +20 39 V +19 38 V +20 39 V +19 39 V +20 38 V +19 39 V +19 38 V +20 38 V +19 37 V +20 37 V +19 37 V +20 37 V +19 35 V +19 36 V +20 34 V +19 34 V +20 34 V +19 32 V +20 32 V +19 31 V +19 30 V +20 29 V +19 28 V +20 27 V +19 26 V +20 25 V +19 24 V +19 22 V +20 21 V +19 20 V +20 19 V +19 18 V +20 16 V +19 14 V +19 14 V +20 12 V +19 10 V +20 9 V +19 7 V +20 6 V +19 5 V +19 3 V +20 2 V +19 0 V +20 -2 V +19 -3 V +19 -5 V +20 -6 V +19 -7 V +20 -9 V +19 -10 V +20 -12 V +19 -14 V +19 -14 V +20 -16 V +19 -18 V +20 -19 V +19 -20 V +20 -21 V +19 -22 V +19 -24 V +20 -25 V +19 -26 V +20 -27 V +19 -28 V +20 -29 V +19 -30 V +19 -31 V +20 -32 V +19 -32 V +20 -34 V +19 -34 V +20 -34 V +19 -36 V +19 -35 V +20 -37 V +19 -37 V +20 -37 V +19 -37 V +20 -38 V +19 -38 V +19 -39 V +20 -38 V +19 -39 V +20 -39 V +19 -38 V +20 -39 V +19 -39 V +19 -39 V +20 -38 V +19 -38 V +20 -38 V +19 -38 V +20 -38 V +19 -37 V +19 -37 V +20 -37 V +19 -36 V +20 -35 V +19 -36 V +20 -34 V +5092 1669 L +19 -33 V +20 -34 V +19 -32 V +20 -32 V +19 -31 V +20 -31 V +19 -30 V +19 -30 V +20 -29 V +19 -28 V +20 -28 V +19 -26 V +20 -27 V +19 -25 V +19 -25 V +20 -24 V +19 -24 V +20 -23 V +19 -22 V +20 -21 V +19 -21 V +19 -20 V +20 -20 V +19 -19 V +20 -18 V +19 -18 V +20 -17 V +19 -16 V +19 -16 V +20 -15 V +19 -15 V +20 -14 V +19 -14 V +20 -13 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -10 V +20 -9 V +19 -10 V +19 -8 V +20 -9 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$c=1, \alpha=2.0$}}% + \put(5957,4781){\rjust{\strut{}$c=1, \alpha=1.0$}}% + \put(3955,5244){\cjust{\strut{}Levy Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4465){\rjust{\strut{} 0.4}}% + \put(900,3506){\rjust{\strut{} 0.3}}% + \put(900,2548){\rjust{\strut{} 0.2}}% + \put(900,1589){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-levyskew.tex b/software/gsl-1.15/doc/rand-levyskew.tex new file mode 100644 index 000000000..3c87752bd --- /dev/null +++ b/software/gsl-1.15/doc/rand-levyskew.tex @@ -0,0 +1,859 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-levyskew.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-levyskew.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1171 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1171 631 M +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +568 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +569 31 R +0 -31 V +1171 4944 M +0 -4313 V +5689 0 V +0 4313 V +-5689 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1171 631 M +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +20 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +20 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 0 V +19 1 V +19 0 V +19 0 V +19 1 V +19 0 V +19 1 V +19 1 V +19 2 V +19 2 V +19 3 V +19 3 V +19 4 V +19 5 V +19 7 V +19 8 V +19 10 V +19 11 V +19 14 V +19 17 V +19 19 V +19 23 V +19 25 V +19 30 V +19 34 V +20 38 V +19 43 V +19 48 V +19 52 V +19 58 V +19 63 V +19 68 V +19 73 V +19 78 V +3131 1457 L +19 87 V +19 93 V +19 96 V +19 100 V +19 103 V +19 106 V +19 108 V +19 110 V +19 111 V +19 111 V +19 111 V +19 110 V +19 109 V +19 107 V +19 105 V +19 101 V +19 98 V +19 95 V +19 90 V +19 85 V +19 80 V +19 75 V +19 69 V +19 64 V +19 58 V +19 52 V +19 47 V +20 40 V +19 35 V +19 28 V +19 23 V +19 18 V +19 12 V +19 7 V +19 2 V +19 -2 V +19 -7 V +19 -12 V +19 -15 V +19 -19 V +19 -23 V +19 -26 V +19 -28 V +19 -32 V +19 -34 V +19 -36 V +19 -38 V +19 -40 V +19 -41 V +19 -43 V +19 -44 V +19 -45 V +19 -46 V +19 -46 V +19 -47 V +19 -47 V +19 -47 V +19 -47 V +19 -47 V +19 -47 V +19 -47 V +19 -47 V +19 -46 V +19 -46 V +19 -45 V +20 -44 V +19 -44 V +19 -43 V +19 -43 V +19 -41 V +19 -41 V +19 -41 V +19 -39 V +19 -38 V +19 -38 V +19 -37 V +19 -36 V +19 -35 V +19 -35 V +19 -33 V +19 -33 V +19 -32 V +19 -31 V +19 -30 V +19 -30 V +19 -29 V +19 -28 V +19 -27 V +19 -26 V +19 -26 V +19 -25 V +19 -25 V +19 -24 V +19 -23 V +19 -22 V +19 -22 V +19 -22 V +19 -21 V +19 -20 V +19 -20 V +19 -19 V +19 -19 V +20 -18 V +19 -18 V +5129 1818 L +19 -17 V +19 -16 V +19 -16 V +19 -16 V +19 -15 V +19 -15 V +19 -15 V +19 -14 V +19 -14 V +19 -14 V +19 -13 V +19 -14 V +19 -12 V +19 -13 V +19 -12 V +19 -13 V +19 -11 V +19 -12 V +19 -12 V +19 -11 V +19 -11 V +19 -11 V +19 -11 V +19 -10 V +19 -11 V +19 -10 V +19 -11 V +19 -10 V +19 -10 V +19 -9 V +19 -10 V +19 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +19 -10 V +19 -9 V +19 -9 V +19 -9 V +19 -9 V +19 -9 V +19 -9 V +19 -8 V +19 -9 V +19 -9 V +19 -8 V +19 -9 V +19 -8 V +19 -9 V +19 -8 V +19 -9 V +19 -8 V +19 -8 V +19 -8 V +19 -9 V +19 -8 V +19 -8 V +19 -8 V +19 -8 V +19 -8 V +19 -8 V +19 -7 V +19 -8 V +19 -8 V +19 -8 V +19 -7 V +19 -8 V +19 -7 V +19 -8 V +19 -7 V +19 -7 V +20 -8 V +19 -7 V +19 -7 V +19 -7 V +19 -7 V +19 -7 V +19 -7 V +19 -6 V +19 -7 V +19 -7 V +19 -6 V +19 -7 V +19 -6 V +19 -6 V +19 -6 V +19 -6 V +19 -6 V +19 -6 V +19 -6 V +stroke +0.500 UL +LTb +1171 4944 M +0 -4313 V +5689 0 V +0 4313 V +-5689 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$c=1, \alpha=1.0, \beta=1.0$}}% + \put(4015,5244){\cjust{\strut{}Levy Skew Distribution}}% + \put(4015,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6291,400){\cjust{\strut{}4}}% + \put(5722,400){\cjust{\strut{}3}}% + \put(5153,400){\cjust{\strut{}2}}% + \put(4584,400){\cjust{\strut{}1}}% + \put(4015,400){\cjust{\strut{}0}}% + \put(3447,400){\cjust{\strut{}-1}}% + \put(2878,400){\cjust{\strut{}-2}}% + \put(2309,400){\cjust{\strut{}-3}}% + \put(1740,400){\cjust{\strut{}-4}}% + \put(1171,400){\cjust{\strut{}-5}}% + \put(1020,4944){\rjust{\strut{} 0.35}}% + \put(1020,4328){\rjust{\strut{} 0.3}}% + \put(1020,3712){\rjust{\strut{} 0.25}}% + \put(1020,3096){\rjust{\strut{} 0.2}}% + \put(1020,2479){\rjust{\strut{} 0.15}}% + \put(1020,1863){\rjust{\strut{} 0.1}}% + \put(1020,1247){\rjust{\strut{} 0.05}}% + \put(1020,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-logarithmic.tex b/software/gsl-1.15/doc/rand-logarithmic.tex new file mode 100644 index 000000000..437b7a9f6 --- /dev/null +++ b/software/gsl-1.15/doc/rand-logarithmic.tex @@ -0,0 +1,894 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-logarithmic.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-logarithmic.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 3582 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -2328 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -669 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +2994 1216 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -278 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -135 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -72 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -40 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +4956 691 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -23 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -14 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 -9 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -5 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.7$}}% + \put(3955,5244){\cjust{\strut{}Logarithmic Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.7}}% + \put(900,4328){\rjust{\strut{} 0.6}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,3096){\rjust{\strut{} 0.4}}% + \put(900,2479){\rjust{\strut{} 0.3}}% + \put(900,1863){\rjust{\strut{} 0.2}}% + \put(900,1247){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-logistic.tex b/software/gsl-1.15/doc/rand-logistic.tex new file mode 100644 index 000000000..b4f29e654 --- /dev/null +++ b/software/gsl-1.15/doc/rand-logistic.tex @@ -0,0 +1,1154 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-logistic.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-logistic.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +580 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +581 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 727 M +19 3 V +20 3 V +19 4 V +20 3 V +19 4 V +20 3 V +19 4 V +19 4 V +20 5 V +19 4 V +20 4 V +19 5 V +20 5 V +19 4 V +19 5 V +20 6 V +19 5 V +20 6 V +19 5 V +20 6 V +19 6 V +19 7 V +20 6 V +19 7 V +20 7 V +19 7 V +20 7 V +19 8 V +19 8 V +20 8 V +19 8 V +20 9 V +19 9 V +20 9 V +19 9 V +19 10 V +20 10 V +19 10 V +20 11 V +19 11 V +20 11 V +19 12 V +19 12 V +20 12 V +19 13 V +20 13 V +19 14 V +20 14 V +19 14 V +19 15 V +20 15 V +19 15 V +20 17 V +19 16 V +20 17 V +19 18 V +19 17 V +20 19 V +19 19 V +20 19 V +19 20 V +20 21 V +19 21 V +19 22 V +20 22 V +19 23 V +20 23 V +19 24 V +20 25 V +19 25 V +19 26 V +20 27 V +19 27 V +20 28 V +19 28 V +20 29 V +19 30 V +19 30 V +20 31 V +19 32 V +20 32 V +19 34 V +20 33 V +19 35 V +19 35 V +20 36 V +19 36 V +20 37 V +19 38 V +20 38 V +19 39 V +19 40 V +20 40 V +19 40 V +20 42 V +19 42 V +20 42 V +19 43 V +19 43 V +20 44 V +19 44 V +20 45 V +3052 2700 L +20 46 V +19 45 V +19 46 V +20 46 V +19 46 V +20 46 V +19 46 V +20 47 V +19 46 V +19 46 V +20 46 V +19 46 V +20 45 V +19 45 V +20 45 V +19 44 V +19 44 V +20 43 V +19 43 V +20 41 V +19 41 V +20 40 V +19 40 V +19 38 V +20 37 V +19 36 V +20 35 V +19 33 V +20 32 V +19 31 V +19 29 V +20 28 V +19 26 V +20 25 V +19 22 V +20 22 V +19 19 V +19 18 V +20 15 V +19 14 V +20 12 V +19 10 V +20 8 V +19 6 V +19 4 V +20 2 V +19 0 V +20 -2 V +19 -4 V +19 -6 V +20 -8 V +19 -10 V +20 -12 V +19 -14 V +20 -15 V +19 -18 V +19 -19 V +20 -22 V +19 -22 V +20 -25 V +19 -26 V +20 -28 V +19 -29 V +19 -31 V +20 -32 V +19 -33 V +20 -35 V +19 -36 V +20 -37 V +19 -38 V +19 -40 V +20 -40 V +19 -41 V +20 -41 V +19 -43 V +20 -43 V +19 -44 V +19 -44 V +20 -45 V +19 -45 V +20 -45 V +19 -46 V +20 -46 V +19 -46 V +19 -46 V +20 -47 V +19 -46 V +20 -46 V +19 -46 V +20 -46 V +19 -46 V +19 -45 V +20 -46 V +19 -44 V +20 -45 V +19 -44 V +20 -44 V +19 -43 V +19 -43 V +20 -42 V +19 -42 V +20 -42 V +19 -40 V +20 -40 V +5092 2191 L +19 -39 V +20 -38 V +19 -38 V +20 -37 V +19 -36 V +20 -36 V +19 -35 V +19 -35 V +20 -33 V +19 -34 V +20 -32 V +19 -32 V +20 -31 V +19 -30 V +19 -30 V +20 -29 V +19 -28 V +20 -28 V +19 -27 V +20 -27 V +19 -26 V +19 -25 V +20 -25 V +19 -24 V +20 -23 V +19 -23 V +20 -22 V +19 -22 V +19 -21 V +20 -21 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -17 V +19 -18 V +20 -17 V +19 -16 V +20 -17 V +19 -15 V +20 -15 V +19 -15 V +19 -14 V +20 -14 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +19 -4 V +20 -5 V +19 -5 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 1135 M +19 7 V +20 7 V +19 8 V +20 7 V +19 8 V +20 7 V +19 8 V +19 8 V +20 8 V +19 8 V +20 8 V +19 8 V +20 8 V +19 8 V +19 8 V +20 9 V +19 8 V +20 9 V +19 9 V +20 8 V +19 9 V +19 9 V +20 9 V +19 9 V +20 10 V +19 9 V +20 9 V +19 10 V +19 9 V +20 10 V +19 9 V +20 10 V +19 10 V +20 10 V +19 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 11 V +20 10 V +19 10 V +19 11 V +20 11 V +19 10 V +20 11 V +19 11 V +20 11 V +19 10 V +19 11 V +20 11 V +19 11 V +20 12 V +19 11 V +20 11 V +19 11 V +19 11 V +20 12 V +19 11 V +20 11 V +19 12 V +20 11 V +19 12 V +19 11 V +20 12 V +19 11 V +20 12 V +19 11 V +20 12 V +19 11 V +19 12 V +20 12 V +19 11 V +20 12 V +19 11 V +20 12 V +19 11 V +19 12 V +20 11 V +19 12 V +20 11 V +19 11 V +20 12 V +19 11 V +19 11 V +20 11 V +19 12 V +20 11 V +19 11 V +20 11 V +19 10 V +19 11 V +20 11 V +19 11 V +20 10 V +19 11 V +20 10 V +19 10 V +19 10 V +20 10 V +19 10 V +20 10 V +3052 2182 L +20 9 V +19 10 V +19 9 V +20 9 V +19 9 V +20 9 V +19 8 V +20 9 V +19 8 V +19 9 V +20 8 V +19 7 V +20 8 V +19 8 V +20 7 V +19 7 V +19 7 V +20 7 V +19 6 V +20 7 V +19 6 V +20 6 V +19 5 V +19 6 V +20 5 V +19 5 V +20 5 V +19 5 V +20 4 V +19 4 V +19 4 V +20 4 V +19 3 V +20 4 V +19 3 V +20 2 V +19 3 V +19 2 V +20 2 V +19 2 V +20 1 V +19 2 V +20 1 V +19 0 V +19 1 V +20 0 V +19 0 V +20 0 V +19 -1 V +19 0 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -9 V +19 -8 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -11 V +20 -10 V +19 -11 V +20 -11 V +5092 2058 L +19 -10 V +20 -11 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +19 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +19 -12 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +20 -12 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -10 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -11 V +19 -11 V +19 -10 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1$}}% + \put(3955,5244){\cjust{\strut{}Logistic Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(6279,400){\cjust{\strut{}4}}% + \put(5698,400){\cjust{\strut{}3}}% + \put(5117,400){\cjust{\strut{}2}}% + \put(4536,400){\cjust{\strut{}1}}% + \put(3955,400){\cjust{\strut{}0}}% + \put(3375,400){\cjust{\strut{}-1}}% + \put(2794,400){\cjust{\strut{}-2}}% + \put(2213,400){\cjust{\strut{}-3}}% + \put(1632,400){\cjust{\strut{}-4}}% + \put(1051,400){\cjust{\strut{}-5}}% + \put(900,4944){\rjust{\strut{} 0.3}}% + \put(900,3506){\rjust{\strut{} 0.2}}% + \put(900,2069){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-lognormal.tex b/software/gsl-1.15/doc/rand-lognormal.tex new file mode 100644 index 000000000..accb84fb6 --- /dev/null +++ b/software/gsl-1.15/doc/rand-lognormal.tex @@ -0,0 +1,1125 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-lognormal.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-lognormal.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 3081 R +-31 0 V +1051 631 M +0 -31 V +1936 31 R +0 -31 V +1937 31 R +0 -31 V +1936 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1070 637 M +20 53 V +19 118 V +20 171 V +19 209 V +20 231 V +19 241 V +19 243 V +20 239 V +19 232 V +20 220 V +19 209 V +20 195 V +19 183 V +19 168 V +20 156 V +19 142 V +20 130 V +19 119 V +20 108 V +19 97 V +19 87 V +20 78 V +19 70 V +20 61 V +19 54 V +20 47 V +19 41 V +19 35 V +20 29 V +19 24 V +20 19 V +19 15 V +20 11 V +19 7 V +19 4 V +20 0 V +19 -2 V +20 -5 V +19 -8 V +20 -10 V +19 -12 V +19 -13 V +20 -16 V +19 -17 V +20 -19 V +19 -20 V +20 -22 V +19 -22 V +19 -24 V +20 -24 V +19 -25 V +20 -26 V +19 -27 V +20 -27 V +19 -28 V +19 -28 V +20 -29 V +19 -29 V +20 -29 V +19 -30 V +20 -30 V +19 -30 V +19 -30 V +20 -30 V +19 -30 V +20 -31 V +19 -30 V +20 -31 V +19 -30 V +19 -30 V +20 -31 V +19 -30 V +20 -30 V +19 -30 V +20 -30 V +19 -30 V +19 -29 V +20 -30 V +19 -29 V +20 -29 V +19 -29 V +20 -28 V +19 -29 V +19 -28 V +20 -28 V +19 -28 V +20 -28 V +19 -27 V +20 -27 V +19 -27 V +19 -27 V +20 -26 V +19 -26 V +20 -26 V +19 -26 V +20 -25 V +19 -25 V +19 -25 V +20 -25 V +19 -25 V +20 -24 V +19 -24 V +3072 2985 L +19 -24 V +19 -23 V +20 -23 V +19 -23 V +20 -22 V +19 -23 V +20 -22 V +19 -21 V +19 -22 V +20 -21 V +19 -21 V +20 -21 V +19 -21 V +20 -20 V +19 -20 V +19 -20 V +20 -20 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -18 V +19 -19 V +20 -18 V +19 -18 V +20 -18 V +19 -17 V +20 -18 V +19 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -16 V +19 -16 V +20 -16 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +19 -14 V +20 -14 V +19 -15 V +20 -14 V +19 -14 V +19 -13 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +20 -13 V +19 -12 V +19 -13 V +20 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -12 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +19 -10 V +20 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +19 -9 V +20 -9 V +19 -8 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +5111 1522 L +20 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1070 631 M +20 1 V +19 2 V +20 5 V +19 9 V +20 12 V +19 15 V +19 18 V +20 21 V +19 23 V +20 25 V +19 28 V +20 28 V +19 30 V +19 31 V +20 32 V +19 32 V +20 33 V +19 33 V +20 32 V +19 33 V +19 33 V +20 33 V +19 32 V +20 32 V +19 31 V +20 31 V +19 31 V +19 30 V +20 29 V +19 29 V +20 28 V +19 27 V +20 27 V +19 26 V +19 26 V +20 24 V +19 25 V +20 23 V +19 23 V +20 22 V +19 21 V +19 21 V +20 20 V +19 20 V +20 19 V +19 18 V +20 18 V +19 17 V +19 16 V +20 16 V +19 16 V +20 14 V +19 15 V +20 13 V +19 14 V +19 12 V +20 13 V +19 11 V +20 12 V +19 11 V +20 10 V +19 10 V +19 10 V +20 9 V +19 8 V +20 9 V +19 8 V +20 7 V +19 8 V +19 7 V +20 6 V +19 6 V +20 6 V +19 6 V +20 5 V +19 5 V +19 5 V +20 4 V +19 4 V +20 4 V +19 4 V +20 3 V +19 3 V +19 3 V +20 3 V +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +20 0 V +19 1 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +3072 2121 L +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +5111 1764 L +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\zeta=1, \sigma=1$}}% + \put(5957,4781){\rjust{\strut{}$\zeta=0, \sigma=1$}}% + \put(3955,5244){\cjust{\strut{}Lognormal Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}3}}% + \put(4924,400){\cjust{\strut{}2}}% + \put(2987,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-nbinomial.tex b/software/gsl-1.15/doc/rand-nbinomial.tex new file mode 100644 index 000000000..891207017 --- /dev/null +++ b/software/gsl-1.15/doc/rand-nbinomial.tex @@ -0,0 +1,882 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-nbinomial.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-nbinomial.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 1902 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 953 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 278 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -209 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +2994 2924 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -430 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -465 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -408 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -318 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +4956 1303 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -231 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -159 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 -106 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -68 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.5,n=3.5$}}% + \put(3955,5244){\cjust{\strut{}Negative Binomial Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.3}}% + \put(900,3506){\rjust{\strut{} 0.2}}% + \put(900,2069){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-pareto.tex b/software/gsl-1.15/doc/rand-pareto.tex new file mode 100644 index 000000000..8500f6e30 --- /dev/null +++ b/software/gsl-1.15/doc/rand-pareto.tex @@ -0,0 +1,1142 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-pareto.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-pareto.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1078 R +-31 0 V +31 1079 R +-31 0 V +31 1078 R +-31 0 V +31 1078 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 2142 V +19 -70 V +20 -66 V +19 -63 V +19 -60 V +20 -58 V +19 -55 V +20 -52 V +19 -50 V +20 -48 V +19 -46 V +19 -44 V +20 -42 V +19 -41 V +20 -39 V +19 -37 V +20 -36 V +19 -34 V +19 -33 V +20 -32 V +19 -31 V +20 -30 V +19 -28 V +20 -28 V +19 -26 V +19 -26 V +20 -24 V +19 -24 V +20 -23 V +19 -22 V +20 -22 V +19 -21 V +19 -20 V +20 -19 V +19 -19 V +20 -19 V +19 -17 V +20 -17 V +19 -17 V +19 -16 V +20 -16 V +19 -15 V +20 -15 V +3052 1358 L +20 -14 V +19 -14 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +5092 809 L +19 -1 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 0 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +19 -1 V +20 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +3052 631 L +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 3192 V +20 -104 V +19 -100 V +20 -96 V +19 -93 V +20 -88 V +19 -85 V +19 -82 V +20 -78 V +19 -76 V +20 -73 V +19 -70 V +20 -67 V +19 -65 V +19 -62 V +20 -60 V +19 -58 V +20 -56 V +19 -54 V +20 -52 V +19 -50 V +19 -48 V +20 -47 V +19 -45 V +20 -44 V +19 -42 V +20 -40 V +19 -40 V +19 -38 V +20 -36 V +19 -36 V +20 -34 V +19 -33 V +19 -32 V +20 -31 V +19 -30 V +20 -29 V +19 -29 V +20 -27 V +19 -26 V +19 -26 V +20 -25 V +19 -24 V +20 -23 V +19 -23 V +20 -22 V +19 -21 V +19 -21 V +20 -20 V +19 -20 V +20 -19 V +19 -18 V +20 -18 V +19 -17 V +19 -17 V +20 -16 V +19 -16 V +20 -16 V +19 -15 V +20 -14 V +19 -15 V +19 -13 V +20 -14 V +19 -13 V +20 -13 V +19 -12 V +20 -12 V +19 -12 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -10 V +19 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -9 V +19 -7 V +20 -8 V +19 -8 V +20 -7 V +19 -7 V +20 -8 V +5092 985 L +19 -7 V +20 -7 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +19 -4 V +20 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=3, b=2 $}}% + \put(5957,4781){\rjust{\strut{}$a=1, b=1$}}% + \put(3955,5244){\cjust{\strut{}Pareto Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 2}}% + \put(900,3866){\rjust{\strut{} 1.5}}% + \put(900,2788){\rjust{\strut{} 1}}% + \put(900,1709){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-pascal.tex b/software/gsl-1.15/doc/rand-pascal.tex new file mode 100644 index 000000000..7fc7145f3 --- /dev/null +++ b/software/gsl-1.15/doc/rand-pascal.tex @@ -0,0 +1,881 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-pascal.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-pascal.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 2428 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 899 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -450 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +3013 2877 L +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -561 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -506 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -393 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -280 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +4975 1137 L +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -190 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -123 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 -77 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -47 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$p=0.5,n=3$}}% + \put(3955,5244){\cjust{\strut{}Pascal Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.3}}% + \put(900,3506){\rjust{\strut{} 0.2}}% + \put(900,2069){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-poisson.tex b/software/gsl-1.15/doc/rand-poisson.tex new file mode 100644 index 000000000..52dd04d52 --- /dev/null +++ b/software/gsl-1.15/doc/rand-poisson.tex @@ -0,0 +1,882 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-poisson.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-poisson.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +265 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +264 63 R +0 -31 V +264 31 R +0 -63 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 1811 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 1770 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 738 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -615 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +2994 3704 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -1152 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -961 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -560 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +0 -257 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +4956 774 L +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +0 -98 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +0 -33 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +0 -9 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +0 -2 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4781){\rjust{\strut{}$\mu=2.5$}}% + \put(3955,5244){\cjust{\strut{}Poisson Distribution}}% + \put(3955,100){\cjust{\strut{}$k$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(k)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6596,400){\cjust{\strut{}10}}% + \put(6068,400){\cjust{\strut{}9}}% + \put(5540,400){\cjust{\strut{}8}}% + \put(5012,400){\cjust{\strut{}7}}% + \put(4484,400){\cjust{\strut{}6}}% + \put(3956,400){\cjust{\strut{}5}}% + \put(3427,400){\cjust{\strut{}4}}% + \put(2899,400){\cjust{\strut{}3}}% + \put(2371,400){\cjust{\strut{}2}}% + \put(1843,400){\cjust{\strut{}1}}% + \put(1315,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.3}}% + \put(900,3506){\rjust{\strut{} 0.2}}% + \put(900,2069){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-rayleigh-tail.tex b/software/gsl-1.15/doc/rand-rayleigh-tail.tex new file mode 100644 index 000000000..ec24bd3d4 --- /dev/null +++ b/software/gsl-1.15/doc/rand-rayleigh-tail.tex @@ -0,0 +1,1136 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-rayleigh-tail.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-rayleigh-tail.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1978 R +-31 0 V +31 1979 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 3957 V +19 -2 V +20 -3 V +19 -6 V +19 -8 V +20 -10 V +19 -12 V +20 -14 V +19 -16 V +20 -17 V +19 -20 V +19 -21 V +20 -23 V +19 -25 V +20 -26 V +19 -28 V +20 -29 V +19 -30 V +19 -32 V +20 -34 V +19 -34 V +20 -36 V +19 -37 V +20 -38 V +19 -39 V +19 -40 V +20 -41 V +19 -42 V +20 -43 V +19 -43 V +20 -44 V +19 -45 V +19 -46 V +20 -45 V +19 -47 V +20 -47 V +19 -47 V +20 -48 V +19 -47 V +19 -49 V +20 -48 V +19 -48 V +20 -49 V +3052 3180 L +20 -48 V +19 -49 V +19 -49 V +20 -48 V +19 -49 V +20 -48 V +19 -48 V +20 -48 V +19 -47 V +19 -47 V +20 -47 V +19 -47 V +20 -46 V +19 -45 V +20 -46 V +19 -45 V +19 -44 V +20 -44 V +19 -43 V +20 -43 V +19 -42 V +20 -42 V +19 -41 V +19 -40 V +20 -40 V +19 -39 V +20 -39 V +19 -38 V +20 -37 V +19 -37 V +19 -36 V +20 -35 V +19 -35 V +20 -34 V +19 -33 V +20 -32 V +19 -32 V +19 -31 V +20 -31 V +19 -30 V +20 -29 V +19 -28 V +20 -28 V +19 -27 V +19 -27 V +20 -26 V +19 -25 V +20 -24 V +19 -24 V +19 -24 V +20 -22 V +19 -22 V +20 -22 V +19 -20 V +20 -21 V +19 -19 V +19 -19 V +20 -19 V +19 -17 V +20 -18 V +19 -17 V +20 -16 V +19 -16 V +19 -15 V +20 -15 V +19 -14 V +20 -14 V +19 -13 V +20 -13 V +19 -13 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +19 -8 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -4 V +5092 685 L +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -1 V +20 -2 V +19 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -1 V +19 -2 V +20 -1 V +19 -1 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 0 V +19 -1 V +20 -1 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 0 V +19 -1 V +20 0 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 -1 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 0 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 -1 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 496 V +19 16 V +20 15 V +19 15 V +20 15 V +19 15 V +19 15 V +20 15 V +19 15 V +20 14 V +19 15 V +20 14 V +19 14 V +19 14 V +20 14 V +19 14 V +20 13 V +19 14 V +20 13 V +19 13 V +19 13 V +20 13 V +19 12 V +20 13 V +19 12 V +20 13 V +19 12 V +19 11 V +20 12 V +19 12 V +20 11 V +19 11 V +20 11 V +19 11 V +19 11 V +20 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +19 9 V +20 9 V +19 9 V +20 9 V +19 9 V +20 8 V +19 8 V +19 8 V +20 8 V +19 8 V +20 7 V +19 7 V +20 7 V +19 7 V +19 7 V +20 6 V +19 7 V +20 6 V +19 6 V +20 5 V +19 6 V +19 5 V +20 5 V +19 5 V +20 5 V +19 4 V +20 5 V +19 4 V +19 4 V +20 3 V +19 4 V +20 3 V +3052 1844 L +20 3 V +19 3 V +19 3 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 0 V +20 1 V +19 0 V +19 0 V +20 0 V +19 0 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +19 -2 V +20 -1 V +19 -1 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +5092 1413 L +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -8 V +19 -7 V +19 -7 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -5 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -6 V +19 -5 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$a=0.5,\sigma=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1,\sigma=1$}}% + \put(3955,5244){\cjust{\strut{}Rayleigh Tail Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4588){\rjust{\strut{} 1}}% + \put(900,2609){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-rayleigh.tex b/software/gsl-1.15/doc/rand-rayleigh.tex new file mode 100644 index 000000000..6e6cb2a51 --- /dev/null +++ b/software/gsl-1.15/doc/rand-rayleigh.tex @@ -0,0 +1,1151 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-rayleigh.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-rayleigh.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 617 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +31 616 R +-31 0 V +1051 631 M +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1161 31 R +0 -31 V +1162 31 R +0 -31 V +1162 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 631 M +19 103 V +20 103 V +19 103 V +20 102 V +19 102 V +20 102 V +19 101 V +19 101 V +20 100 V +19 99 V +20 98 V +19 98 V +20 96 V +19 95 V +19 95 V +20 93 V +19 91 V +20 90 V +19 89 V +20 88 V +19 85 V +19 84 V +20 83 V +19 80 V +20 79 V +19 77 V +20 75 V +19 73 V +19 72 V +20 69 V +19 66 V +20 65 V +19 63 V +20 60 V +19 59 V +19 55 V +20 54 V +19 51 V +20 50 V +19 46 V +20 45 V +19 42 V +19 39 V +20 37 V +19 35 V +20 33 V +19 30 V +20 28 V +19 25 V +19 23 V +20 21 V +19 18 V +20 16 V +19 14 V +20 11 V +19 10 V +19 7 V +20 5 V +19 2 V +20 1 V +19 -1 V +20 -4 V +19 -5 V +19 -8 V +20 -9 V +19 -12 V +20 -13 V +19 -15 V +20 -16 V +19 -19 V +19 -20 V +20 -21 V +19 -24 V +20 -24 V +19 -27 V +20 -27 V +19 -29 V +19 -30 V +20 -32 V +19 -32 V +20 -34 V +19 -35 V +20 -36 V +19 -37 V +19 -38 V +20 -39 V +19 -39 V +20 -40 V +19 -41 V +20 -42 V +19 -42 V +19 -43 V +20 -44 V +19 -43 V +20 -45 V +19 -44 V +20 -45 V +19 -46 V +19 -45 V +20 -46 V +19 -45 V +20 -46 V +3052 3039 L +20 -46 V +19 -46 V +19 -46 V +20 -46 V +19 -46 V +20 -45 V +19 -45 V +20 -46 V +19 -44 V +19 -45 V +20 -44 V +19 -44 V +20 -44 V +19 -43 V +20 -43 V +19 -42 V +19 -42 V +20 -41 V +19 -41 V +20 -41 V +19 -40 V +20 -39 V +19 -39 V +19 -38 V +20 -38 V +19 -37 V +20 -36 V +19 -36 V +20 -35 V +19 -35 V +19 -34 V +20 -33 V +19 -33 V +20 -32 V +19 -31 V +20 -31 V +19 -30 V +19 -29 V +20 -29 V +19 -29 V +20 -27 V +19 -27 V +20 -26 V +19 -26 V +19 -25 V +20 -24 V +19 -24 V +20 -23 V +19 -23 V +19 -22 V +20 -21 V +19 -21 V +20 -20 V +19 -20 V +20 -19 V +19 -18 V +19 -18 V +20 -18 V +19 -17 V +20 -16 V +19 -16 V +20 -15 V +19 -15 V +19 -15 V +20 -13 V +19 -14 V +20 -13 V +19 -13 V +20 -12 V +19 -12 V +19 -11 V +20 -11 V +19 -10 V +20 -11 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +20 -3 V +5092 682 L +19 -3 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -1 V +19 -2 V +19 -1 V +20 -1 V +19 -1 V +20 -2 V +19 -1 V +20 -1 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 0 V +19 -1 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 0 V +19 -1 V +20 0 V +19 -1 V +20 0 V +19 0 V +20 -1 V +19 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 -1 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +20 0 V +19 0 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 26 V +20 26 V +19 25 V +20 26 V +19 26 V +20 25 V +19 26 V +19 26 V +20 25 V +19 26 V +20 25 V +19 26 V +20 25 V +19 25 V +19 25 V +20 25 V +19 25 V +20 25 V +19 25 V +20 25 V +19 25 V +19 24 V +20 25 V +19 24 V +20 24 V +19 24 V +20 24 V +19 24 V +19 23 V +20 24 V +19 23 V +20 23 V +19 23 V +20 23 V +19 23 V +19 22 V +20 23 V +19 22 V +20 22 V +19 21 V +20 22 V +19 21 V +19 21 V +20 21 V +19 21 V +20 20 V +19 21 V +20 20 V +19 20 V +19 19 V +20 20 V +19 19 V +20 19 V +19 18 V +20 19 V +19 18 V +19 18 V +20 17 V +19 18 V +20 17 V +19 17 V +20 16 V +19 17 V +19 16 V +20 15 V +19 16 V +20 15 V +19 15 V +20 15 V +19 14 V +19 14 V +20 14 V +19 14 V +20 13 V +19 13 V +20 13 V +19 12 V +19 12 V +20 12 V +19 12 V +20 11 V +19 11 V +20 10 V +19 11 V +19 10 V +20 10 V +19 9 V +20 9 V +19 9 V +20 9 V +19 8 V +19 8 V +20 8 V +19 7 V +20 7 V +19 7 V +20 6 V +19 6 V +19 6 V +20 6 V +19 5 V +20 5 V +3052 2462 L +20 5 V +19 4 V +19 4 V +20 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 2 V +19 2 V +20 1 V +19 2 V +20 1 V +19 1 V +20 0 V +19 1 V +19 0 V +20 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 -2 V +19 -1 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -11 V +19 -10 V +19 -11 V +20 -10 V +19 -11 V +20 -11 V +19 -10 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +19 -11 V +20 -12 V +5092 1812 L +19 -12 V +20 -11 V +19 -12 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +19 -12 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +20 -12 V +19 -11 V +19 -11 V +20 -11 V +19 -11 V +20 -12 V +19 -11 V +20 -11 V +19 -11 V +19 -11 V +20 -11 V +19 -10 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +19 -11 V +20 -11 V +19 -10 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +19 -9 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +19 -8 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +20 -8 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\sigma=2$}}% + \put(5957,4781){\rjust{\strut{}$\sigma=1$}}% + \put(3955,5244){\cjust{\strut{}Rayleigh Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}5}}% + \put(5698,400){\cjust{\strut{}4}}% + \put(4536,400){\cjust{\strut{}3}}% + \put(3375,400){\cjust{\strut{}2}}% + \put(2213,400){\cjust{\strut{}1}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 0.7}}% + \put(900,4328){\rjust{\strut{} 0.6}}% + \put(900,3712){\rjust{\strut{} 0.5}}% + \put(900,3096){\rjust{\strut{} 0.4}}% + \put(900,2479){\rjust{\strut{} 0.3}}% + \put(900,1863){\rjust{\strut{} 0.2}}% + \put(900,1247){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-tdist.tex b/software/gsl-1.15/doc/rand-tdist.tex new file mode 100644 index 000000000..077bfe19b --- /dev/null +++ b/software/gsl-1.15/doc/rand-tdist.tex @@ -0,0 +1,1154 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-tdist.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-tdist.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +31 862 R +-31 0 V +31 863 R +-31 0 V +1051 631 M +0 -31 V +726 31 R +0 -31 V +726 31 R +0 -31 V +726 31 R +0 -31 V +727 31 R +0 -31 V +726 31 R +0 -31 V +726 31 R +0 -31 V +726 31 R +0 -31 V +726 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 793 M +19 2 V +20 2 V +19 2 V +20 2 V +19 2 V +20 2 V +19 3 V +19 2 V +20 2 V +19 3 V +20 2 V +19 3 V +20 2 V +19 3 V +19 3 V +20 3 V +19 2 V +20 3 V +19 3 V +20 3 V +19 3 V +19 3 V +20 3 V +19 4 V +20 3 V +19 3 V +20 4 V +19 3 V +19 4 V +20 4 V +19 3 V +20 4 V +19 4 V +20 4 V +19 4 V +19 5 V +20 4 V +19 4 V +20 5 V +19 5 V +20 4 V +19 5 V +19 5 V +20 5 V +19 5 V +20 6 V +19 5 V +20 6 V +19 6 V +19 6 V +20 6 V +19 6 V +20 6 V +19 7 V +20 6 V +19 7 V +19 7 V +20 8 V +19 7 V +20 8 V +19 8 V +20 8 V +19 8 V +19 9 V +20 8 V +19 9 V +20 10 V +19 9 V +20 10 V +19 10 V +19 10 V +20 11 V +19 11 V +20 11 V +19 12 V +20 12 V +19 12 V +19 13 V +20 13 V +19 14 V +20 14 V +19 14 V +20 15 V +19 15 V +19 16 V +20 16 V +19 17 V +20 18 V +19 17 V +20 19 V +19 19 V +19 20 V +20 20 V +19 21 V +20 21 V +19 23 V +20 23 V +19 23 V +19 25 V +20 25 V +19 26 V +20 27 V +3052 1709 L +20 28 V +19 30 V +19 30 V +20 31 V +19 33 V +20 33 V +19 34 V +20 35 V +19 36 V +19 37 V +20 38 V +19 40 V +20 40 V +19 41 V +20 41 V +19 43 V +19 44 V +20 44 V +19 45 V +20 46 V +19 47 V +20 46 V +19 48 V +19 47 V +20 48 V +19 48 V +20 47 V +19 47 V +20 47 V +19 46 V +19 45 V +20 44 V +19 42 V +20 41 V +19 38 V +20 37 V +19 34 V +19 32 V +20 28 V +19 26 V +20 23 V +19 19 V +20 15 V +19 12 V +19 7 V +20 4 V +19 0 V +20 -4 V +19 -7 V +19 -12 V +20 -15 V +19 -19 V +20 -23 V +19 -26 V +20 -28 V +19 -32 V +19 -34 V +20 -37 V +19 -38 V +20 -41 V +19 -42 V +20 -44 V +19 -45 V +19 -46 V +20 -47 V +19 -47 V +20 -47 V +19 -48 V +20 -48 V +19 -47 V +19 -48 V +20 -46 V +19 -47 V +20 -46 V +19 -45 V +20 -44 V +19 -44 V +19 -43 V +20 -41 V +19 -41 V +20 -40 V +19 -40 V +20 -38 V +19 -37 V +19 -36 V +20 -35 V +19 -34 V +20 -33 V +19 -33 V +20 -31 V +19 -30 V +19 -30 V +20 -28 V +19 -28 V +20 -27 V +19 -26 V +20 -25 V +19 -25 V +19 -23 V +20 -23 V +19 -23 V +20 -21 V +19 -21 V +20 -20 V +5092 1427 L +19 -19 V +20 -19 V +19 -17 V +20 -18 V +19 -17 V +20 -16 V +19 -16 V +19 -15 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +20 -13 V +19 -13 V +19 -12 V +20 -12 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -8 V +19 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +19 -7 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 675 M +19 2 V +20 1 V +19 1 V +20 2 V +19 2 V +20 1 V +19 2 V +19 2 V +20 1 V +19 2 V +20 2 V +19 2 V +20 2 V +19 3 V +19 2 V +20 2 V +19 2 V +20 3 V +19 3 V +20 2 V +19 3 V +19 3 V +20 3 V +19 3 V +20 3 V +19 3 V +20 4 V +19 3 V +19 4 V +20 4 V +19 4 V +20 4 V +19 4 V +20 5 V +19 4 V +19 5 V +20 5 V +19 5 V +20 6 V +19 5 V +20 6 V +19 6 V +19 6 V +20 7 V +19 6 V +20 7 V +19 8 V +20 7 V +19 8 V +19 8 V +20 8 V +19 9 V +20 9 V +19 9 V +20 10 V +19 10 V +19 10 V +20 11 V +19 11 V +20 12 V +19 12 V +20 13 V +19 12 V +19 14 V +20 14 V +19 14 V +20 15 V +19 16 V +20 16 V +19 17 V +19 17 V +20 18 V +19 18 V +20 20 V +19 19 V +20 21 V +19 21 V +19 22 V +20 23 V +19 24 V +20 24 V +19 25 V +20 26 V +19 26 V +19 28 V +20 28 V +19 30 V +20 30 V +19 31 V +20 32 V +19 33 V +19 34 V +20 35 V +19 35 V +20 37 V +19 38 V +20 38 V +19 40 V +19 40 V +20 41 V +19 43 V +20 43 V +3052 2089 L +20 45 V +19 46 V +19 46 V +20 47 V +19 48 V +20 49 V +19 49 V +20 50 V +19 51 V +19 50 V +20 52 V +19 51 V +20 52 V +19 52 V +20 52 V +19 52 V +19 52 V +20 52 V +19 51 V +20 52 V +19 50 V +20 50 V +19 49 V +19 48 V +20 48 V +19 46 V +20 45 V +19 44 V +20 42 V +19 41 V +19 39 V +20 37 V +19 35 V +20 33 V +19 31 V +20 29 V +19 27 V +19 24 V +20 22 V +19 19 V +20 16 V +19 14 V +20 11 V +19 9 V +19 5 V +20 3 V +19 0 V +20 -3 V +19 -5 V +19 -9 V +20 -11 V +19 -14 V +20 -16 V +19 -19 V +20 -22 V +19 -24 V +19 -27 V +20 -29 V +19 -31 V +20 -33 V +19 -35 V +20 -37 V +19 -39 V +19 -41 V +20 -42 V +19 -44 V +20 -45 V +19 -46 V +20 -48 V +19 -48 V +19 -49 V +20 -50 V +19 -50 V +20 -52 V +19 -51 V +20 -52 V +19 -52 V +19 -52 V +20 -52 V +19 -52 V +20 -52 V +19 -51 V +20 -52 V +19 -50 V +19 -51 V +20 -50 V +19 -49 V +20 -49 V +19 -48 V +20 -47 V +19 -46 V +19 -46 V +20 -45 V +19 -44 V +20 -43 V +19 -43 V +20 -41 V +19 -40 V +19 -40 V +20 -38 V +19 -38 V +20 -37 V +19 -35 V +20 -35 V +5092 1621 L +19 -33 V +20 -32 V +19 -31 V +20 -30 V +19 -30 V +20 -28 V +19 -28 V +19 -26 V +20 -26 V +19 -25 V +20 -24 V +19 -24 V +20 -23 V +19 -22 V +19 -21 V +20 -21 V +19 -19 V +20 -20 V +19 -18 V +20 -18 V +19 -17 V +19 -17 V +20 -16 V +19 -16 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +19 -12 V +20 -13 V +19 -12 V +20 -12 V +19 -11 V +20 -11 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +19 -6 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -5 V +19 -4 V +20 -5 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -2 V +19 -2 V +20 -2 V +19 -2 V +20 -1 V +19 -2 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -1 V +20 -1 V +19 -2 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4581){\rjust{\strut{}$\nu_1=5$}}% + \put(5957,4781){\rjust{\strut{}$\nu_1=1$}}% + \put(3955,5244){\cjust{\strut{}Student's t distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}4}}% + \put(6134,400){\cjust{\strut{}3}}% + \put(5408,400){\cjust{\strut{}2}}% + \put(4682,400){\cjust{\strut{}1}}% + \put(3956,400){\cjust{\strut{}0}}% + \put(3229,400){\cjust{\strut{}-1}}% + \put(2503,400){\cjust{\strut{}-2}}% + \put(1777,400){\cjust{\strut{}-3}}% + \put(1051,400){\cjust{\strut{}-4}}% + \put(900,4944){\rjust{\strut{} 0.5}}% + \put(900,4081){\rjust{\strut{} 0.4}}% + \put(900,3219){\rjust{\strut{} 0.3}}% + \put(900,2356){\rjust{\strut{} 0.2}}% + \put(900,1494){\rjust{\strut{} 0.1}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/rand-weibull.tex b/software/gsl-1.15/doc/rand-weibull.tex new file mode 100644 index 000000000..a02c5ee6b --- /dev/null +++ b/software/gsl-1.15/doc/rand-weibull.tex @@ -0,0 +1,1443 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(7200,5544) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rand-weibull.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Feb 5 16:32:53 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 360 277 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (rand-weibull.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Feb 5 16:32:53 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +1051 631 M +-31 0 V +31 1438 R +-31 0 V +31 1437 R +-31 0 V +31 1438 R +-31 0 V +1051 631 M +0 -31 V +1452 31 R +0 -31 V +1453 31 R +0 -31 V +1452 31 R +0 -31 V +1452 31 R +0 -31 V +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +stroke +LCb setrgbcolor +LTb +LCb setrgbcolor +LTb +1.000 UP +0.500 UL +LTb +1.000 UL +LT0 +LTb +LT0 +6077 4781 M +543 0 V +1051 3506 M +19 -19 V +20 -19 V +19 -19 V +20 -19 V +19 -18 V +20 -19 V +19 -18 V +19 -18 V +20 -19 V +19 -18 V +20 -18 V +19 -17 V +20 -18 V +19 -18 V +19 -17 V +20 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -16 V +19 -17 V +20 -17 V +19 -16 V +20 -16 V +19 -17 V +20 -16 V +19 -16 V +19 -16 V +20 -15 V +19 -16 V +20 -16 V +19 -15 V +20 -16 V +19 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -14 V +19 -15 V +19 -14 V +20 -15 V +19 -14 V +20 -14 V +19 -14 V +20 -14 V +19 -14 V +19 -14 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +20 -14 V +19 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -12 V +19 -13 V +20 -12 V +19 -13 V +20 -12 V +19 -12 V +20 -13 V +19 -12 V +19 -12 V +20 -12 V +19 -11 V +20 -12 V +19 -12 V +20 -12 V +19 -11 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -11 V +19 -11 V +20 -10 V +19 -11 V +19 -10 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -10 V +20 -10 V +3052 2075 L +20 -10 V +19 -9 V +19 -10 V +20 -9 V +19 -10 V +20 -9 V +19 -9 V +20 -10 V +19 -9 V +19 -9 V +20 -9 V +19 -9 V +20 -9 V +19 -8 V +20 -9 V +19 -9 V +19 -8 V +20 -9 V +19 -9 V +20 -8 V +19 -8 V +20 -9 V +19 -8 V +19 -8 V +20 -9 V +19 -8 V +20 -8 V +19 -8 V +20 -8 V +19 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -8 V +19 -7 V +20 -7 V +19 -7 V +19 -8 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -7 V +20 -7 V +19 -6 V +19 -7 V +20 -7 V +19 -6 V +20 -7 V +19 -6 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -7 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -6 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -6 V +19 -5 V +20 -5 V +19 -6 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +5092 1346 L +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -5 V +19 -4 V +19 -5 V +20 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -5 V +19 -4 V +20 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -5 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +19 -4 V +20 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -3 V +19 -4 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +19 -3 V +20 -3 V +19 -4 V +20 -3 V +19 -4 V +20 -3 V +19 -3 V +19 -3 V +20 -4 V +19 -3 V +20 -3 V +19 -3 V +20 -4 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -3 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +19 -3 V +20 -3 V +19 -2 V +20 -3 V +19 -3 V +20 -2 V +19 -3 V +stroke +LT1 +LTb +LT1 +6077 4581 M +543 0 V +1051 631 M +19 38 V +20 39 V +19 38 V +20 39 V +19 38 V +20 38 V +19 39 V +19 38 V +20 38 V +19 38 V +20 38 V +19 38 V +20 37 V +19 38 V +19 37 V +20 37 V +19 38 V +20 36 V +19 37 V +20 37 V +19 36 V +19 36 V +20 36 V +19 36 V +20 35 V +19 35 V +20 35 V +19 35 V +19 34 V +20 34 V +19 34 V +20 34 V +19 33 V +20 33 V +19 33 V +19 32 V +20 32 V +19 31 V +20 31 V +19 31 V +20 31 V +19 30 V +19 30 V +20 29 V +19 29 V +20 29 V +19 28 V +20 28 V +19 27 V +19 27 V +20 26 V +19 26 V +20 26 V +19 25 V +20 25 V +19 24 V +19 24 V +20 23 V +19 23 V +20 23 V +19 22 V +20 21 V +19 21 V +19 21 V +20 20 V +19 19 V +20 19 V +19 19 V +20 18 V +19 18 V +19 17 V +20 16 V +19 16 V +20 16 V +19 15 V +20 15 V +19 14 V +19 13 V +20 13 V +19 13 V +20 12 V +19 12 V +20 11 V +19 10 V +19 10 V +20 10 V +19 9 V +20 9 V +19 8 V +20 7 V +19 8 V +19 6 V +20 6 V +19 6 V +20 5 V +19 5 V +20 4 V +19 4 V +19 3 V +20 3 V +19 2 V +20 2 V +3052 3096 L +20 1 V +19 0 V +19 0 V +20 0 V +19 -1 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +19 -3 V +20 -3 V +19 -4 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +19 -5 V +20 -6 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -8 V +19 -8 V +20 -8 V +19 -9 V +20 -9 V +19 -10 V +20 -9 V +19 -10 V +19 -11 V +20 -10 V +19 -11 V +20 -11 V +19 -12 V +20 -12 V +19 -11 V +19 -13 V +20 -12 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -14 V +19 -13 V +20 -14 V +19 -15 V +20 -14 V +19 -14 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -15 V +20 -16 V +19 -16 V +19 -15 V +20 -16 V +19 -16 V +20 -16 V +19 -16 V +20 -17 V +19 -16 V +19 -17 V +20 -16 V +19 -17 V +20 -16 V +19 -17 V +20 -17 V +19 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +19 -17 V +20 -18 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +19 -18 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +20 -17 V +19 -17 V +19 -17 V +20 -16 V +19 -17 V +20 -17 V +19 -17 V +20 -16 V +19 -17 V +19 -16 V +20 -17 V +19 -16 V +20 -16 V +19 -16 V +20 -16 V +5092 1786 L +19 -16 V +20 -16 V +19 -16 V +20 -15 V +19 -16 V +20 -15 V +19 -16 V +19 -15 V +20 -15 V +19 -15 V +20 -15 V +19 -14 V +20 -15 V +19 -15 V +19 -14 V +20 -14 V +19 -14 V +20 -14 V +19 -14 V +20 -14 V +19 -14 V +19 -13 V +20 -14 V +19 -13 V +20 -13 V +19 -13 V +20 -13 V +19 -13 V +19 -12 V +20 -13 V +19 -12 V +20 -12 V +19 -13 V +20 -11 V +19 -12 V +19 -12 V +20 -11 V +19 -12 V +20 -11 V +19 -11 V +20 -11 V +19 -11 V +19 -11 V +20 -10 V +19 -11 V +20 -10 V +19 -10 V +20 -10 V +19 -10 V +19 -10 V +20 -10 V +19 -9 V +20 -10 V +19 -9 V +20 -9 V +19 -9 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -9 V +20 -8 V +19 -8 V +19 -8 V +20 -8 V +19 -8 V +20 -7 V +19 -8 V +20 -7 V +19 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -7 V +19 -7 V +20 -6 V +19 -7 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -6 V +20 -6 V +19 -5 V +19 -6 V +20 -5 V +19 -6 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +stroke +LT2 +LTb +LT2 +6077 4381 M +543 0 V +1051 631 M +19 0 V +20 0 V +19 0 V +20 1 V +19 0 V +20 1 V +19 0 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 2 V +20 1 V +19 2 V +20 2 V +19 1 V +20 2 V +19 2 V +19 2 V +20 3 V +19 2 V +20 2 V +19 3 V +20 2 V +19 3 V +19 3 V +20 2 V +19 3 V +20 3 V +19 3 V +20 4 V +19 3 V +19 3 V +20 4 V +19 4 V +20 3 V +19 4 V +20 4 V +19 4 V +19 4 V +20 4 V +19 4 V +20 5 V +19 4 V +20 5 V +19 4 V +19 5 V +20 5 V +19 5 V +20 5 V +19 5 V +20 5 V +19 5 V +19 6 V +20 5 V +19 6 V +20 5 V +19 6 V +20 6 V +19 6 V +19 6 V +20 6 V +19 6 V +20 6 V +19 6 V +20 7 V +19 6 V +19 7 V +20 7 V +19 6 V +20 7 V +19 7 V +20 7 V +19 7 V +19 7 V +20 8 V +19 7 V +20 7 V +19 8 V +20 7 V +19 8 V +19 8 V +20 7 V +19 8 V +20 8 V +19 8 V +20 8 V +19 8 V +19 9 V +20 8 V +19 8 V +20 9 V +19 8 V +20 9 V +19 8 V +19 9 V +20 9 V +19 9 V +20 8 V +3052 1122 L +20 9 V +19 9 V +19 9 V +20 10 V +19 9 V +20 9 V +19 9 V +20 10 V +19 9 V +19 10 V +20 9 V +19 10 V +20 9 V +19 10 V +20 10 V +19 9 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +19 11 V +20 10 V +19 10 V +20 10 V +19 11 V +20 10 V +19 10 V +19 11 V +20 10 V +19 10 V +20 11 V +19 10 V +20 10 V +19 11 V +19 10 V +20 10 V +19 11 V +20 10 V +19 10 V +19 11 V +20 10 V +19 10 V +20 11 V +19 10 V +20 10 V +19 10 V +19 11 V +20 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +20 10 V +19 10 V +19 9 V +20 10 V +19 10 V +20 9 V +19 10 V +20 9 V +19 10 V +19 9 V +20 9 V +19 10 V +20 9 V +19 9 V +20 9 V +19 9 V +19 9 V +20 9 V +19 8 V +20 9 V +19 9 V +20 8 V +19 9 V +19 8 V +20 8 V +19 9 V +20 8 V +19 8 V +20 8 V +19 7 V +19 8 V +20 8 V +19 7 V +20 8 V +19 7 V +20 7 V +5092 2122 L +19 7 V +20 7 V +19 6 V +20 7 V +19 7 V +20 6 V +19 7 V +19 6 V +20 6 V +19 6 V +20 6 V +19 6 V +20 5 V +19 6 V +19 5 V +20 6 V +19 5 V +20 5 V +19 5 V +20 5 V +19 4 V +19 5 V +20 4 V +19 5 V +20 4 V +19 4 V +20 4 V +19 3 V +19 4 V +20 3 V +19 4 V +20 3 V +19 3 V +20 3 V +19 2 V +19 3 V +20 2 V +19 3 V +20 2 V +19 2 V +20 2 V +19 2 V +19 1 V +20 2 V +19 1 V +20 1 V +19 1 V +20 1 V +19 1 V +19 0 V +20 1 V +19 0 V +20 0 V +19 0 V +20 0 V +19 -1 V +19 0 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +20 -1 V +19 -1 V +19 -2 V +20 -1 V +19 -2 V +20 -2 V +19 -2 V +20 -3 V +19 -2 V +19 -3 V +20 -2 V +19 -3 V +20 -3 V +19 -3 V +20 -3 V +19 -4 V +19 -3 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +20 -4 V +19 -4 V +19 -5 V +20 -4 V +19 -5 V +20 -5 V +19 -5 V +20 -5 V +19 -5 V +stroke +0.500 UL +LTb +1051 4944 M +0 -4313 V +5809 0 V +0 4313 V +-5809 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(5957,4381){\rjust{\strut{}$a=2,b=3$}}% + \put(5957,4581){\rjust{\strut{}$a=1,b=2$}}% + \put(5957,4781){\rjust{\strut{}$a=1,b=1$}}% + \put(3955,5244){\cjust{\strut{}Weibull Distribution}}% + \put(3955,100){\cjust{\strut{}$x$}}% + \put(200,2787){% + \special{ps: gsave currentpoint currentpoint translate +270 rotate neg exch neg exch translate}% + \cjust{\strut{}$p(x)$}% + \special{ps: currentpoint grestore moveto}% + }% + \put(6860,400){\cjust{\strut{}2}}% + \put(5408,400){\cjust{\strut{}1.5}}% + \put(3956,400){\cjust{\strut{}1}}% + \put(2503,400){\cjust{\strut{}0.5}}% + \put(1051,400){\cjust{\strut{}0}}% + \put(900,4944){\rjust{\strut{} 1.5}}% + \put(900,3506){\rjust{\strut{} 1}}% + \put(900,2069){\rjust{\strut{} 0.5}}% + \put(900,631){\rjust{\strut{} 0}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/randist.texi b/software/gsl-1.15/doc/randist.texi new file mode 100644 index 000000000..c4731abe4 --- /dev/null +++ b/software/gsl-1.15/doc/randist.texi @@ -0,0 +1,2299 @@ +@cindex random number distributions +@cindex cumulative distribution functions (CDFs) +@cindex CDFs, cumulative distribution functions +@cindex inverse cumulative distribution functions +@cindex quantile functions +This chapter describes functions for generating random variates and +computing their probability distributions. Samples from the +distributions described in this chapter can be obtained using any of the +random number generators in the library as an underlying source of +randomness. + +In the simplest cases a non-uniform distribution can be obtained +analytically from the uniform distribution of a random number generator +by applying an appropriate transformation. This method uses one call to +the random number generator. More complicated distributions are created +by the @dfn{acceptance-rejection} method, which compares the desired +distribution against a distribution which is similar and known +analytically. This usually requires several samples from the generator. + +The library also provides cumulative distribution functions and inverse +cumulative distribution functions, sometimes referred to as quantile +functions. The cumulative distribution functions and their inverses are +computed separately for the upper and lower tails of the distribution, +allowing full accuracy to be retained for small results. + +The functions for random variates and probability density functions +described in this section are declared in @file{gsl_randist.h}. The +corresponding cumulative distribution functions are declared in +@file{gsl_cdf.h}. + +Note that the discrete random variate functions always +return a value of type @code{unsigned int}, and on most platforms this +has a maximum value of @c{$2^{32}-1 \approx 4.29\times10^9$} +@math{2^32-1 ~=~ 4.29e9}. They should only be called with +a safe range of parameters (where there is a negligible probability of +a variate exceeding this limit) to prevent incorrect results due to +overflow. + +@menu +* Random Number Distribution Introduction:: +* The Gaussian Distribution:: +* The Gaussian Tail Distribution:: +* The Bivariate Gaussian Distribution:: +* The Exponential Distribution:: +* The Laplace Distribution:: +* The Exponential Power Distribution:: +* The Cauchy Distribution:: +* The Rayleigh Distribution:: +* The Rayleigh Tail Distribution:: +* The Landau Distribution:: +* The Levy alpha-Stable Distributions:: +* The Levy skew alpha-Stable Distribution:: +* The Gamma Distribution:: +* The Flat (Uniform) Distribution:: +* The Lognormal Distribution:: +* The Chi-squared Distribution:: +* The F-distribution:: +* The t-distribution:: +* The Beta Distribution:: +* The Logistic Distribution:: +* The Pareto Distribution:: +* Spherical Vector Distributions:: +* The Weibull Distribution:: +* The Type-1 Gumbel Distribution:: +* The Type-2 Gumbel Distribution:: +* The Dirichlet Distribution:: +* General Discrete Distributions:: +* The Poisson Distribution:: +* The Bernoulli Distribution:: +* The Binomial Distribution:: +* The Multinomial Distribution:: +* The Negative Binomial Distribution:: +* The Pascal Distribution:: +* The Geometric Distribution:: +* The Hypergeometric Distribution:: +* The Logarithmic Distribution:: +* Shuffling and Sampling:: +* Random Number Distribution Examples:: +* Random Number Distribution References and Further Reading:: +@end menu + +@node Random Number Distribution Introduction +@section Introduction + +Continuous random number distributions are defined by a probability +density function, @math{p(x)}, such that the probability of @math{x} +occurring in the infinitesimal range @math{x} to @math{x+dx} is @c{$p\,dx$} +@math{p dx}. + +The cumulative distribution function for the lower tail @math{P(x)} is +defined by the integral, +@tex +\beforedisplay +$$ +P(x) = \int_{-\infty}^{x} dx' p(x') +$$ +\afterdisplay +@end tex +@ifinfo + +@example +P(x) = \int_@{-\infty@}^@{x@} dx' p(x') +@end example + +@end ifinfo +@noindent +and gives the probability of a variate taking a value less than @math{x}. + +The cumulative distribution function for the upper tail @math{Q(x)} is +defined by the integral, +@tex +\beforedisplay +$$ +Q(x) = \int_{x}^{+\infty} dx' p(x') +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Q(x) = \int_@{x@}^@{+\infty@} dx' p(x') +@end example + +@end ifinfo +@noindent +and gives the probability of a variate taking a value greater than @math{x}. + +The upper and lower cumulative distribution functions are related by +@math{P(x) + Q(x) = 1} and satisfy @c{$0 \le P(x) \le 1$} +@math{0 <= P(x) <= 1}, @c{$0 \le Q(x) \le 1$} +@math{0 <= Q(x) <= 1}. + +The inverse cumulative distributions, @c{$x=P^{-1}(P)$} +@math{x=P^@{-1@}(P)} and @c{$x=Q^{-1}(Q)$} +@math{x=Q^@{-1@}(Q)} give the values of @math{x} +which correspond to a specific value of @math{P} or @math{Q}. +They can be used to find confidence limits from probability values. + +For discrete distributions the probability of sampling the integer +value @math{k} is given by @math{p(k)}, where @math{\sum_k p(k) = 1}. +The cumulative distribution for the lower tail @math{P(k)} of a +discrete distribution is defined as, +@tex +\beforedisplay +$$ +P(k) = \sum_{i \le k} p(i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +P(k) = \sum_@{i <= k@} p(i) +@end example + +@end ifinfo +@noindent +where the sum is over the allowed range of the distribution less than +or equal to @math{k}. + +The cumulative distribution for the upper tail of a discrete +distribution @math{Q(k)} is defined as +@tex +\beforedisplay +$$ +Q(k) = \sum_{i > k} p(i) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Q(k) = \sum_@{i > k@} p(i) +@end example + +@end ifinfo +@noindent +giving the sum of probabilities for all values greater than @math{k}. +These two definitions satisfy the identity @math{P(k)+Q(k)=1}. + +If the range of the distribution is 1 to @math{n} inclusive then +@math{P(n)=1}, @math{Q(n)=0} while @math{P(1) = p(1)}, +@math{Q(1)=1-p(1)}. + +@page +@node The Gaussian Distribution +@section The Gaussian Distribution +@deftypefun double gsl_ran_gaussian (const gsl_rng * @var{r}, double @var{sigma}) +@cindex Gaussian distribution +This function returns a Gaussian random variate, with mean zero and +standard deviation @var{sigma}. The probability distribution for +Gaussian random variates is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over \sqrt{2 \pi \sigma^2}} \exp (-x^2 / 2\sigma^2) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over \sqrt@{2 \pi \sigma^2@}@} \exp (-x^2 / 2\sigma^2) dx +@end example + +@end ifinfo +@noindent +for @math{x} in the range @math{-\infty} to @math{+\infty}. Use the +transformation @math{z = \mu + x} on the numbers returned by +@code{gsl_ran_gaussian} to obtain a Gaussian distribution with mean +@math{\mu}. This function uses the Box-Muller algorithm which requires two +calls to the random number generator @var{r}. +@end deftypefun + +@deftypefun double gsl_ran_gaussian_pdf (double @var{x}, double @var{sigma}) +This function computes the probability density @math{p(x)} at @var{x} +for a Gaussian distribution with standard deviation @var{sigma}, using +the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-gaussian.tex} +@end tex + +@deftypefun double gsl_ran_gaussian_ziggurat (const gsl_rng * @var{r}, double @var{sigma}) +@deftypefunx double gsl_ran_gaussian_ratio_method (const gsl_rng * @var{r}, double @var{sigma}) +@cindex Ziggurat method +This function computes a Gaussian random variate using the alternative +Marsaglia-Tsang ziggurat and Kinderman-Monahan-Leva ratio methods. The +Ziggurat algorithm is the fastest available algorithm in most cases. +@end deftypefun + +@deftypefun double gsl_ran_ugaussian (const gsl_rng * @var{r}) +@deftypefunx double gsl_ran_ugaussian_pdf (double @var{x}) +@deftypefunx double gsl_ran_ugaussian_ratio_method (const gsl_rng * @var{r}) +These functions compute results for the unit Gaussian distribution. They +are equivalent to the functions above with a standard deviation of one, +@var{sigma} = 1. +@end deftypefun + +@deftypefun double gsl_cdf_gaussian_P (double @var{x}, double @var{sigma}) +@deftypefunx double gsl_cdf_gaussian_Q (double @var{x}, double @var{sigma}) +@deftypefunx double gsl_cdf_gaussian_Pinv (double @var{P}, double @var{sigma}) +@deftypefunx double gsl_cdf_gaussian_Qinv (double @var{Q}, double @var{sigma}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Gaussian +distribution with standard deviation @var{sigma}. +@end deftypefun + +@deftypefun double gsl_cdf_ugaussian_P (double @var{x}) +@deftypefunx double gsl_cdf_ugaussian_Q (double @var{x}) +@deftypefunx double gsl_cdf_ugaussian_Pinv (double @var{P}) +@deftypefunx double gsl_cdf_ugaussian_Qinv (double @var{Q}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the unit Gaussian +distribution. +@end deftypefun + +@page +@node The Gaussian Tail Distribution +@section The Gaussian Tail Distribution +@deftypefun double gsl_ran_gaussian_tail (const gsl_rng * @var{r}, double @var{a}, double @var{sigma}) +@cindex Gaussian Tail distribution +This function provides random variates from the upper tail of a Gaussian +distribution with standard deviation @var{sigma}. The values returned +are larger than the lower limit @var{a}, which must be positive. The +method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann. +Math. Stat. 32, 894--899 (1961)), with this aspect explained in Knuth, v2, +3rd ed, p139,586 (exercise 11). + +The probability distribution for Gaussian tail random variates is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over N(a;\sigma) \sqrt{2 \pi \sigma^2}} \exp (- x^2 / 2\sigma^2) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over N(a;\sigma) \sqrt@{2 \pi \sigma^2@}@} \exp (- x^2/(2 \sigma^2)) dx +@end example + +@end ifinfo +@noindent +for @math{x > a} where @math{N(a;\sigma)} is the normalization constant, +@tex +\beforedisplay +$$ +N(a;\sigma) = {1 \over 2} \hbox{erfc}\left({a \over \sqrt{2 \sigma^2}}\right). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +N(a;\sigma) = (1/2) erfc(a / sqrt(2 sigma^2)). +@end example +@end ifinfo + +@end deftypefun + +@deftypefun double gsl_ran_gaussian_tail_pdf (double @var{x}, double @var{a}, double @var{sigma}) +This function computes the probability density @math{p(x)} at @var{x} +for a Gaussian tail distribution with standard deviation @var{sigma} and +lower limit @var{a}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-gaussian-tail.tex} +@end tex + +@deftypefun double gsl_ran_ugaussian_tail (const gsl_rng * @var{r}, double @var{a}) +@deftypefunx double gsl_ran_ugaussian_tail_pdf (double @var{x}, double @var{a}) +These functions compute results for the tail of a unit Gaussian +distribution. They are equivalent to the functions above with a standard +deviation of one, @var{sigma} = 1. +@end deftypefun + + +@page +@node The Bivariate Gaussian Distribution +@section The Bivariate Gaussian Distribution + +@deftypefun void gsl_ran_bivariate_gaussian (const gsl_rng * @var{r}, double @var{sigma_x}, double @var{sigma_y}, double @var{rho}, double * @var{x}, double * @var{y}) +@cindex Bivariate Gaussian distribution +@cindex two dimensional Gaussian distribution +@cindex Gaussian distribution, bivariate +This function generates a pair of correlated Gaussian variates, with +mean zero, correlation coefficient @var{rho} and standard deviations +@var{sigma_x} and @var{sigma_y} in the @math{x} and @math{y} directions. +The probability distribution for bivariate Gaussian random variates is, +@tex +\beforedisplay +$$ +p(x,y) dx dy = {1 \over 2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}} \exp \left(-{(x^2/\sigma_x^2 + y^2/\sigma_y^2 - 2 \rho x y/(\sigma_x\sigma_y)) \over 2(1-\rho^2)}\right) dx dy +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x,y) dx dy = @{1 \over 2 \pi \sigma_x \sigma_y \sqrt@{1-\rho^2@}@} \exp (-(x^2/\sigma_x^2 + y^2/\sigma_y^2 - 2 \rho x y/(\sigma_x\sigma_y))/2(1-\rho^2)) dx dy +@end example + +@end ifinfo +@noindent +for @math{x,y} in the range @math{-\infty} to @math{+\infty}. The +correlation coefficient @var{rho} should lie between @math{1} and +@math{-1}. +@end deftypefun + +@deftypefun double gsl_ran_bivariate_gaussian_pdf (double @var{x}, double @var{y}, double @var{sigma_x}, double @var{sigma_y}, double @var{rho}) +This function computes the probability density @math{p(x,y)} at +(@var{x},@var{y}) for a bivariate Gaussian distribution with standard +deviations @var{sigma_x}, @var{sigma_y} and correlation coefficient +@var{rho}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-bivariate-gaussian.tex} +@end tex + +@page +@node The Exponential Distribution +@section The Exponential Distribution +@deftypefun double gsl_ran_exponential (const gsl_rng * @var{r}, double @var{mu}) +@cindex Exponential distribution +This function returns a random variate from the exponential distribution +with mean @var{mu}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over \mu} \exp(-x/\mu) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over \mu@} \exp(-x/\mu) dx +@end example + +@end ifinfo +@noindent +for @c{$x \ge 0$} +@math{x >= 0}. +@end deftypefun + +@deftypefun double gsl_ran_exponential_pdf (double @var{x}, double @var{mu}) +This function computes the probability density @math{p(x)} at @var{x} +for an exponential distribution with mean @var{mu}, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-exponential.tex} +@end tex + +@deftypefun double gsl_cdf_exponential_P (double @var{x}, double @var{mu}) +@deftypefunx double gsl_cdf_exponential_Q (double @var{x}, double @var{mu}) +@deftypefunx double gsl_cdf_exponential_Pinv (double @var{P}, double @var{mu}) +@deftypefunx double gsl_cdf_exponential_Qinv (double @var{Q}, double @var{mu}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the exponential +distribution with mean @var{mu}. +@end deftypefun + +@page +@node The Laplace Distribution +@section The Laplace Distribution +@deftypefun double gsl_ran_laplace (const gsl_rng * @var{r}, double @var{a}) +@cindex two-sided exponential distribution +@cindex Laplace distribution +This function returns a random variate from the Laplace distribution +with width @var{a}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over 2 a} \exp(-|x/a|) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over 2 a@} \exp(-|x/a|) dx +@end example + +@end ifinfo +@noindent +for @math{-\infty < x < \infty}. +@end deftypefun + +@deftypefun double gsl_ran_laplace_pdf (double @var{x}, double @var{a}) +This function computes the probability density @math{p(x)} at @var{x} +for a Laplace distribution with width @var{a}, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-laplace.tex} +@end tex + +@deftypefun double gsl_cdf_laplace_P (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_laplace_Q (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_laplace_Pinv (double @var{P}, double @var{a}) +@deftypefunx double gsl_cdf_laplace_Qinv (double @var{Q}, double @var{a}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Laplace +distribution with width @var{a}. +@end deftypefun + + +@page +@node The Exponential Power Distribution +@section The Exponential Power Distribution +@deftypefun double gsl_ran_exppow (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Exponential power distribution +This function returns a random variate from the exponential power distribution +with scale parameter @var{a} and exponent @var{b}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over 2 a \Gamma(1+1/b)} \exp(-|x/a|^b) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over 2 a \Gamma(1+1/b)@} \exp(-|x/a|^b) dx +@end example + +@end ifinfo +@noindent +for @c{$x \ge 0$} +@math{x >= 0}. For @math{b = 1} this reduces to the Laplace +distribution. For @math{b = 2} it has the same form as a Gaussian +distribution, but with @c{$a = \sqrt{2} \sigma$} +@math{a = \sqrt@{2@} \sigma}. +@end deftypefun + +@deftypefun double gsl_ran_exppow_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for an exponential power distribution with scale parameter @var{a} +and exponent @var{b}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-exppow.tex} +@end tex + +@deftypefun double gsl_cdf_exppow_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_exppow_Q (double @var{x}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} for the exponential power distribution with +parameters @var{a} and @var{b}. +@end deftypefun + + +@page +@node The Cauchy Distribution +@section The Cauchy Distribution +@deftypefun double gsl_ran_cauchy (const gsl_rng * @var{r}, double @var{a}) +@cindex Cauchy distribution +This function returns a random variate from the Cauchy distribution with +scale parameter @var{a}. The probability distribution for Cauchy +random variates is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over a\pi (1 + (x/a)^2) } dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over a\pi (1 + (x/a)^2) @} dx +@end example + +@end ifinfo +@noindent +for @math{x} in the range @math{-\infty} to @math{+\infty}. The Cauchy +distribution is also known as the Lorentz distribution. +@end deftypefun + +@deftypefun double gsl_ran_cauchy_pdf (double @var{x}, double @var{a}) +This function computes the probability density @math{p(x)} at @var{x} +for a Cauchy distribution with scale parameter @var{a}, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-cauchy.tex} +@end tex + +@deftypefun double gsl_cdf_cauchy_P (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_cauchy_Q (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_cauchy_Pinv (double @var{P}, double @var{a}) +@deftypefunx double gsl_cdf_cauchy_Qinv (double @var{Q}, double @var{a}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Cauchy +distribution with scale parameter @var{a}. +@end deftypefun + + +@page +@node The Rayleigh Distribution +@section The Rayleigh Distribution +@deftypefun double gsl_ran_rayleigh (const gsl_rng * @var{r}, double @var{sigma}) +@cindex Rayleigh distribution +This function returns a random variate from the Rayleigh distribution with +scale parameter @var{sigma}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {x \over \sigma^2} \exp(- x^2/(2 \sigma^2)) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{x \over \sigma^2@} \exp(- x^2/(2 \sigma^2)) dx +@end example + +@end ifinfo +@noindent +for @math{x > 0}. +@end deftypefun + +@deftypefun double gsl_ran_rayleigh_pdf (double @var{x}, double @var{sigma}) +This function computes the probability density @math{p(x)} at @var{x} +for a Rayleigh distribution with scale parameter @var{sigma}, using the +formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-rayleigh.tex} +@end tex + +@deftypefun double gsl_cdf_rayleigh_P (double @var{x}, double @var{sigma}) +@deftypefunx double gsl_cdf_rayleigh_Q (double @var{x}, double @var{sigma}) +@deftypefunx double gsl_cdf_rayleigh_Pinv (double @var{P}, double @var{sigma}) +@deftypefunx double gsl_cdf_rayleigh_Qinv (double @var{Q}, double @var{sigma}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Rayleigh +distribution with scale parameter @var{sigma}. +@end deftypefun + + +@page +@node The Rayleigh Tail Distribution +@section The Rayleigh Tail Distribution +@deftypefun double gsl_ran_rayleigh_tail (const gsl_rng * @var{r}, double @var{a}, double @var{sigma}) +@cindex Rayleigh Tail distribution +This function returns a random variate from the tail of the Rayleigh +distribution with scale parameter @var{sigma} and a lower limit of +@var{a}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {x \over \sigma^2} \exp ((a^2 - x^2) /(2 \sigma^2)) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{x \over \sigma^2@} \exp ((a^2 - x^2) /(2 \sigma^2)) dx +@end example + +@end ifinfo +@noindent +for @math{x > a}. +@end deftypefun + +@deftypefun double gsl_ran_rayleigh_tail_pdf (double @var{x}, double @var{a}, double @var{sigma}) +This function computes the probability density @math{p(x)} at @var{x} +for a Rayleigh tail distribution with scale parameter @var{sigma} and +lower limit @var{a}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-rayleigh-tail.tex} +@end tex + +@page +@node The Landau Distribution +@section The Landau Distribution +@deftypefun double gsl_ran_landau (const gsl_rng * @var{r}) +@cindex Landau distribution +This function returns a random variate from the Landau distribution. The +probability distribution for Landau random variates is defined +analytically by the complex integral, +@tex +\beforedisplay +$$ +p(x) = +{1 \over {2 \pi i}} \int_{c-i\infty}^{c+i\infty} ds\, \exp(s \log(s) + x s) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) = (1/(2 \pi i)) \int_@{c-i\infty@}^@{c+i\infty@} ds exp(s log(s) + x s) +@end example +@end ifinfo +For numerical purposes it is more convenient to use the following +equivalent form of the integral, +@tex +\beforedisplay +$$ +p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t). +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_ran_landau_pdf (double @var{x}) +This function computes the probability density @math{p(x)} at @var{x} +for the Landau distribution using an approximation to the formula given +above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-landau.tex} +@end tex + +@page +@node The Levy alpha-Stable Distributions +@section The Levy alpha-Stable Distributions +@deftypefun double gsl_ran_levy (const gsl_rng * @var{r}, double @var{c}, double @var{alpha}) +@cindex Levy distribution +This function returns a random variate from the Levy symmetric stable +distribution with scale @var{c} and exponent @var{alpha}. The symmetric +stable probability distribution is defined by a Fourier transform, +@tex +\beforedisplay +$$ +p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^\alpha) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) = @{1 \over 2 \pi@} \int_@{-\infty@}^@{+\infty@} dt \exp(-it x - |c t|^alpha) +@end example + +@end ifinfo +@noindent +There is no explicit solution for the form of @math{p(x)} and the +library does not define a corresponding @code{pdf} function. For +@math{\alpha = 1} the distribution reduces to the Cauchy distribution. For +@math{\alpha = 2} it is a Gaussian distribution with @c{$\sigma = \sqrt{2} c$} +@math{\sigma = \sqrt@{2@} c}. For @math{\alpha < 1} the tails of the +distribution become extremely wide. + +The algorithm only works for @c{$0 < \alpha \le 2$} +@math{0 < alpha <= 2}. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-levy.tex} +@end tex + +@page +@node The Levy skew alpha-Stable Distribution +@section The Levy skew alpha-Stable Distribution + +@deftypefun double gsl_ran_levy_skew (const gsl_rng * @var{r}, double @var{c}, double @var{alpha}, double @var{beta}) +@cindex Levy distribution, skew +@cindex Skew Levy distribution +This function returns a random variate from the Levy skew stable +distribution with scale @var{c}, exponent @var{alpha} and skewness +parameter @var{beta}. The skewness parameter must lie in the range +@math{[-1,1]}. The Levy skew stable probability distribution is defined +by a Fourier transform, +@tex +\beforedisplay +$$ +p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^\alpha (1-i \beta \sign(t) \tan(\pi\alpha/2))) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) = @{1 \over 2 \pi@} \int_@{-\infty@}^@{+\infty@} dt \exp(-it x - |c t|^alpha (1-i beta sign(t) tan(pi alpha/2))) +@end example + +@end ifinfo +@noindent +When @math{\alpha = 1} the term @math{\tan(\pi \alpha/2)} is replaced by +@math{-(2/\pi)\log|t|}. There is no explicit solution for the form of +@math{p(x)} and the library does not define a corresponding @code{pdf} +function. For @math{\alpha = 2} the distribution reduces to a Gaussian +distribution with @c{$\sigma = \sqrt{2} c$} +@math{\sigma = \sqrt@{2@} c} and the skewness parameter has no effect. +For @math{\alpha < 1} the tails of the distribution become extremely +wide. The symmetric distribution corresponds to @math{\beta = +0}. + +The algorithm only works for @c{$0 < \alpha \le 2$} +@math{0 < alpha <= 2}. +@end deftypefun + +The Levy alpha-stable distributions have the property that if @math{N} +alpha-stable variates are drawn from the distribution @math{p(c, \alpha, +\beta)} then the sum @math{Y = X_1 + X_2 + \dots + X_N} will also be +distributed as an alpha-stable variate, +@c{$p(N^{1/\alpha} c, \alpha, \beta)$} +@math{p(N^(1/\alpha) c, \alpha, \beta)}. + +@comment PDF not available because there is no analytic expression for it +@comment +@comment @deftypefun double gsl_ran_levy_pdf (double @var{x}, double @var{mu}) +@comment This function computes the probability density @math{p(x)} at @var{x} +@comment for a symmetric Levy distribution with scale parameter @var{mu} and +@comment exponent @var{a}, using the formula given above. +@comment @end deftypefun + +@sp 1 +@tex +\centerline{\input rand-levyskew.tex} +@end tex + +@page +@node The Gamma Distribution +@section The Gamma Distribution +@deftypefun double gsl_ran_gamma (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Gamma distribution +This function returns a random variate from the gamma +distribution. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over \Gamma(a) b^a} x^{a-1} e^{-x/b} dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over \Gamma(a) b^a@} x^@{a-1@} e^@{-x/b@} dx +@end example + +@end ifinfo +@noindent +for @math{x > 0}. +@comment If @xmath{X} and @xmath{Y} are independent gamma-distributed random +@comment variables of order @xmath{a} and @xmath{b}, then @xmath{X+Y} has a gamma +@comment distribution of order @xmath{a+b}. + +@cindex Erlang distribution +The gamma distribution with an integer parameter @var{a} is known as the Erlang distribution. + +The variates are computed using the Marsaglia-Tsang fast gamma method. +This function for this method was previously called +@code{gsl_ran_gamma_mt} and can still be accessed using this name. +@end deftypefun + +@deftypefun double gsl_ran_gamma_knuth (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +This function returns a gamma variate using the algorithms from Knuth (vol 2). +@end deftypefun + +@deftypefun double gsl_ran_gamma_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a gamma distribution with parameters @var{a} and @var{b}, using the +formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-gamma.tex} +@end tex + +@deftypefun double gsl_cdf_gamma_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gamma_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gamma_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gamma_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the gamma +distribution with parameters @var{a} and @var{b}. +@end deftypefun + +@page +@node The Flat (Uniform) Distribution +@section The Flat (Uniform) Distribution +@deftypefun double gsl_ran_flat (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex flat distribution +@cindex uniform distribution +This function returns a random variate from the flat (uniform) +distribution from @var{a} to @var{b}. The distribution is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over (b-a)} dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over (b-a)@} dx +@end example + +@end ifinfo +@noindent +if @c{$a \le x < b$} +@math{a <= x < b} and 0 otherwise. +@end deftypefun + +@deftypefun double gsl_ran_flat_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a uniform distribution from @var{a} to @var{b}, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-flat.tex} +@end tex + +@deftypefun double gsl_cdf_flat_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_flat_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_flat_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_flat_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for a uniform distribution +from @var{a} to @var{b}. +@end deftypefun + + +@page +@node The Lognormal Distribution +@section The Lognormal Distribution +@deftypefun double gsl_ran_lognormal (const gsl_rng * @var{r}, double @var{zeta}, double @var{sigma}) +@cindex Lognormal distribution +This function returns a random variate from the lognormal +distribution. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over x \sqrt{2 \pi \sigma^2}} \exp(-(\ln(x) - \zeta)^2/2 \sigma^2) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over x \sqrt@{2 \pi \sigma^2@} @} \exp(-(\ln(x) - \zeta)^2/2 \sigma^2) dx +@end example + +@end ifinfo +@noindent +for @math{x > 0}. +@end deftypefun + +@deftypefun double gsl_ran_lognormal_pdf (double @var{x}, double @var{zeta}, double @var{sigma}) +This function computes the probability density @math{p(x)} at @var{x} +for a lognormal distribution with parameters @var{zeta} and @var{sigma}, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-lognormal.tex} +@end tex + +@deftypefun double gsl_cdf_lognormal_P (double @var{x}, double @var{zeta}, double @var{sigma}) +@deftypefunx double gsl_cdf_lognormal_Q (double @var{x}, double @var{zeta}, double @var{sigma}) +@deftypefunx double gsl_cdf_lognormal_Pinv (double @var{P}, double @var{zeta}, double @var{sigma}) +@deftypefunx double gsl_cdf_lognormal_Qinv (double @var{Q}, double @var{zeta}, double @var{sigma}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the lognormal +distribution with parameters @var{zeta} and @var{sigma}. +@end deftypefun + + +@page +@node The Chi-squared Distribution +@section The Chi-squared Distribution +The chi-squared distribution arises in statistics. If @math{Y_i} are +@math{n} independent Gaussian random variates with unit variance then the +sum-of-squares, +@tex +\beforedisplay +$$ +X_i = \sum_i Y_i^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X_i = \sum_i Y_i^2 +@end example + +@end ifinfo +@noindent +has a chi-squared distribution with @math{n} degrees of freedom. + +@deftypefun double gsl_ran_chisq (const gsl_rng * @var{r}, double @var{nu}) +@cindex Chi-squared distribution +This function returns a random variate from the chi-squared distribution +with @var{nu} degrees of freedom. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {1 \over 2 \Gamma(\nu/2) } (x/2)^{\nu/2 - 1} \exp(-x/2) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{1 \over 2 \Gamma(\nu/2) @} (x/2)^@{\nu/2 - 1@} \exp(-x/2) dx +@end example + +@end ifinfo +@noindent +for @c{$x \ge 0$} +@math{x >= 0}. +@end deftypefun + +@deftypefun double gsl_ran_chisq_pdf (double @var{x}, double @var{nu}) +This function computes the probability density @math{p(x)} at @var{x} +for a chi-squared distribution with @var{nu} degrees of freedom, using +the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-chisq.tex} +@end tex + +@deftypefun double gsl_cdf_chisq_P (double @var{x}, double @var{nu}) +@deftypefunx double gsl_cdf_chisq_Q (double @var{x}, double @var{nu}) +@deftypefunx double gsl_cdf_chisq_Pinv (double @var{P}, double @var{nu}) +@deftypefunx double gsl_cdf_chisq_Qinv (double @var{Q}, double @var{nu}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the chi-squared +distribution with @var{nu} degrees of freedom. +@end deftypefun + + + +@page +@node The F-distribution +@section The F-distribution +The F-distribution arises in statistics. If @math{Y_1} and @math{Y_2} +are chi-squared deviates with @math{\nu_1} and @math{\nu_2} degrees of +freedom then the ratio, +@tex +\beforedisplay +$$ +X = { (Y_1 / \nu_1) \over (Y_2 / \nu_2) } +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X = @{ (Y_1 / \nu_1) \over (Y_2 / \nu_2) @} +@end example + +@end ifinfo +@noindent +has an F-distribution @math{F(x;\nu_1,\nu_2)}. + +@deftypefun double gsl_ran_fdist (const gsl_rng * @var{r}, double @var{nu1}, double @var{nu2}) +@cindex F-distribution +This function returns a random variate from the F-distribution with degrees of freedom @var{nu1} and @var{nu2}. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = + { \Gamma((\nu_1 + \nu_2)/2) + \over \Gamma(\nu_1/2) \Gamma(\nu_2/2) } + \nu_1^{\nu_1/2} \nu_2^{\nu_2/2} + x^{\nu_1/2 - 1} (\nu_2 + \nu_1 x)^{-\nu_1/2 -\nu_2/2} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = + @{ \Gamma((\nu_1 + \nu_2)/2) + \over \Gamma(\nu_1/2) \Gamma(\nu_2/2) @} + \nu_1^@{\nu_1/2@} \nu_2^@{\nu_2/2@} + x^@{\nu_1/2 - 1@} (\nu_2 + \nu_1 x)^@{-\nu_1/2 -\nu_2/2@} +@end example + +@end ifinfo +@noindent +for @c{$x \ge 0$} +@math{x >= 0}. +@end deftypefun + +@deftypefun double gsl_ran_fdist_pdf (double @var{x}, double @var{nu1}, double @var{nu2}) +This function computes the probability density @math{p(x)} at @var{x} +for an F-distribution with @var{nu1} and @var{nu2} degrees of freedom, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-fdist.tex} +@end tex + +@deftypefun double gsl_cdf_fdist_P (double @var{x}, double @var{nu1}, double @var{nu2}) +@deftypefunx double gsl_cdf_fdist_Q (double @var{x}, double @var{nu1}, double @var{nu2}) +@deftypefunx double gsl_cdf_fdist_Pinv (double @var{P}, double @var{nu1}, double @var{nu2}) +@deftypefunx double gsl_cdf_fdist_Qinv (double @var{Q}, double @var{nu1}, double @var{nu2}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the F-distribution +with @var{nu1} and @var{nu2} degrees of freedom. +@end deftypefun + +@page +@node The t-distribution +@section The t-distribution +The t-distribution arises in statistics. If @math{Y_1} has a normal +distribution and @math{Y_2} has a chi-squared distribution with +@math{\nu} degrees of freedom then the ratio, +@tex +\beforedisplay +$$ +X = { Y_1 \over \sqrt{Y_2 / \nu} } +$$ +\afterdisplay +@end tex +@ifinfo + +@example +X = @{ Y_1 \over \sqrt@{Y_2 / \nu@} @} +@end example + +@end ifinfo +@noindent +has a t-distribution @math{t(x;\nu)} with @math{\nu} degrees of freedom. + +@deftypefun double gsl_ran_tdist (const gsl_rng * @var{r}, double @var{nu}) +@cindex t-distribution +@cindex Student t-distribution +This function returns a random variate from the t-distribution. The +distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {\Gamma((\nu + 1)/2) \over \sqrt{\pi \nu} \Gamma(\nu/2)} + (1 + x^2/\nu)^{-(\nu + 1)/2} dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{\Gamma((\nu + 1)/2) \over \sqrt@{\pi \nu@} \Gamma(\nu/2)@} + (1 + x^2/\nu)^@{-(\nu + 1)/2@} dx +@end example + +@end ifinfo +@noindent +for @math{-\infty < x < +\infty}. +@end deftypefun + +@deftypefun double gsl_ran_tdist_pdf (double @var{x}, double @var{nu}) +This function computes the probability density @math{p(x)} at @var{x} +for a t-distribution with @var{nu} degrees of freedom, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-tdist.tex} +@end tex + +@deftypefun double gsl_cdf_tdist_P (double @var{x}, double @var{nu}) +@deftypefunx double gsl_cdf_tdist_Q (double @var{x}, double @var{nu}) +@deftypefunx double gsl_cdf_tdist_Pinv (double @var{P}, double @var{nu}) +@deftypefunx double gsl_cdf_tdist_Qinv (double @var{Q}, double @var{nu}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the t-distribution +with @var{nu} degrees of freedom. +@end deftypefun + +@page +@node The Beta Distribution +@section The Beta Distribution +@deftypefun double gsl_ran_beta (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Beta distribution +This function returns a random variate from the beta +distribution. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{\Gamma(a+b) \over \Gamma(a) \Gamma(b)@} x^@{a-1@} (1-x)^@{b-1@} dx +@end example + +@end ifinfo +@noindent +for @c{$0 \le x \le 1$} +@math{0 <= x <= 1}. +@end deftypefun + +@deftypefun double gsl_ran_beta_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a beta distribution with parameters @var{a} and @var{b}, using the +formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-beta.tex} +@end tex + +@deftypefun double gsl_cdf_beta_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_beta_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_beta_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_beta_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the beta +distribution with parameters @var{a} and @var{b}. +@end deftypefun + +@page +@node The Logistic Distribution +@section The Logistic Distribution + +@deftypefun double gsl_ran_logistic (const gsl_rng * @var{r}, double @var{a}) +@cindex Logistic distribution +This function returns a random variate from the logistic +distribution. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = { \exp(-x/a) \over a (1 + \exp(-x/a))^2 } dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{ \exp(-x/a) \over a (1 + \exp(-x/a))^2 @} dx +@end example + +@end ifinfo +@noindent +for @math{-\infty < x < +\infty}. +@end deftypefun + +@deftypefun double gsl_ran_logistic_pdf (double @var{x}, double @var{a}) +This function computes the probability density @math{p(x)} at @var{x} +for a logistic distribution with scale parameter @var{a}, using the +formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-logistic.tex} +@end tex + +@deftypefun double gsl_cdf_logistic_P (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_logistic_Q (double @var{x}, double @var{a}) +@deftypefunx double gsl_cdf_logistic_Pinv (double @var{P}, double @var{a}) +@deftypefunx double gsl_cdf_logistic_Qinv (double @var{Q}, double @var{a}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the logistic +distribution with scale parameter @var{a}. +@end deftypefun + +@page +@node The Pareto Distribution +@section The Pareto Distribution +@deftypefun double gsl_ran_pareto (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Pareto distribution +This function returns a random variate from the Pareto distribution of +order @var{a}. The distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = (a/b) / (x/b)^{a+1} dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = (a/b) / (x/b)^@{a+1@} dx +@end example + +@end ifinfo +@noindent +for @c{$x \ge b$} +@math{x >= b}. +@end deftypefun + +@deftypefun double gsl_ran_pareto_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a Pareto distribution with exponent @var{a} and scale @var{b}, using +the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-pareto.tex} +@end tex + +@deftypefun double gsl_cdf_pareto_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_pareto_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_pareto_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_pareto_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Pareto +distribution with exponent @var{a} and scale @var{b}. +@end deftypefun + +@page +@node Spherical Vector Distributions +@section Spherical Vector Distributions + +The spherical distributions generate random vectors, located on a +spherical surface. They can be used as random directions, for example in +the steps of a random walk. + +@deftypefun void gsl_ran_dir_2d (const gsl_rng * @var{r}, double * @var{x}, double * @var{y}) +@deftypefunx void gsl_ran_dir_2d_trig_method (const gsl_rng * @var{r}, double * @var{x}, double * @var{y}) +@cindex 2D random direction vector +@cindex direction vector, random 2D +@cindex spherical random variates, 2D +This function returns a random direction vector @math{v} = +(@var{x},@var{y}) in two dimensions. The vector is normalized such that +@math{|v|^2 = x^2 + y^2 = 1}. The obvious way to do this is to take a +uniform random number between 0 and @math{2\pi} and let @var{x} and +@var{y} be the sine and cosine respectively. Two trig functions would +have been expensive in the old days, but with modern hardware +implementations, this is sometimes the fastest way to go. This is the +case for the Pentium (but not the case for the Sun Sparcstation). +One can avoid the trig evaluations by choosing @var{x} and +@var{y} in the interior of a unit circle (choose them at random from the +interior of the enclosing square, and then reject those that are outside +the unit circle), and then dividing by @c{$\sqrt{x^2 + y^2}$} +@math{\sqrt@{x^2 + y^2@}}. +A much cleverer approach, attributed to von Neumann (See Knuth, v2, 3rd +ed, p140, exercise 23), requires neither trig nor a square root. In +this approach, @var{u} and @var{v} are chosen at random from the +interior of a unit circle, and then @math{x=(u^2-v^2)/(u^2+v^2)} and +@math{y=2uv/(u^2+v^2)}. +@end deftypefun + +@deftypefun void gsl_ran_dir_3d (const gsl_rng * @var{r}, double * @var{x}, double * @var{y}, double * @var{z}) +@cindex 3D random direction vector +@cindex direction vector, random 3D +@cindex spherical random variates, 3D +This function returns a random direction vector @math{v} = +(@var{x},@var{y},@var{z}) in three dimensions. The vector is normalized +such that @math{|v|^2 = x^2 + y^2 + z^2 = 1}. The method employed is +due to Robert E. Knop (CACM 13, 326 (1970)), and explained in Knuth, v2, +3rd ed, p136. It uses the surprising fact that the distribution +projected along any axis is actually uniform (this is only true for 3 +dimensions). +@end deftypefun + +@deftypefun void gsl_ran_dir_nd (const gsl_rng * @var{r}, size_t @var{n}, double * @var{x}) +@cindex N-dimensional random direction vector +@cindex direction vector, random N-dimensional +@cindex spherical random variates, N-dimensional + +This function returns a random direction vector +@c{$v = (x_1,x_2,\ldots,x_n)$} +@math{v = (x_1,x_2,...,x_n)} in @var{n} dimensions. The vector is normalized +such that +@c{$|v|^2 = x_1^2 + x_2^2 + \cdots + x_n^2 = 1$} +@math{|v|^2 = x_1^2 + x_2^2 + ... + x_n^2 = 1}. The method +uses the fact that a multivariate Gaussian distribution is spherically +symmetric. Each component is generated to have a Gaussian distribution, +and then the components are normalized. The method is described by +Knuth, v2, 3rd ed, p135--136, and attributed to G. W. Brown, Modern +Mathematics for the Engineer (1956). +@end deftypefun + +@page +@node The Weibull Distribution +@section The Weibull Distribution +@deftypefun double gsl_ran_weibull (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Weibull distribution +This function returns a random variate from the Weibull distribution. The +distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = {b \over a^b} x^{b-1} \exp(-(x/a)^b) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = @{b \over a^b@} x^@{b-1@} \exp(-(x/a)^b) dx +@end example + +@end ifinfo +@noindent +for @c{$x \ge 0$} +@math{x >= 0}. +@end deftypefun + +@deftypefun double gsl_ran_weibull_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a Weibull distribution with scale @var{a} and exponent @var{b}, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-weibull.tex} +@end tex + +@deftypefun double gsl_cdf_weibull_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_weibull_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_weibull_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_weibull_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Weibull +distribution with scale @var{a} and exponent @var{b}. +@end deftypefun + + +@page +@node The Type-1 Gumbel Distribution +@section The Type-1 Gumbel Distribution +@deftypefun double gsl_ran_gumbel1 (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Gumbel distribution (Type 1) +@cindex Type 1 Gumbel distribution, random variates +This function returns a random variate from the Type-1 Gumbel +distribution. The Type-1 Gumbel distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx +@end example + +@end ifinfo +@noindent +for @math{-\infty < x < \infty}. +@end deftypefun + +@deftypefun double gsl_ran_gumbel1_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a Type-1 Gumbel distribution with parameters @var{a} and @var{b}, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-gumbel1.tex} +@end tex + +@deftypefun double gsl_cdf_gumbel1_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel1_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel1_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel1_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Type-1 Gumbel +distribution with parameters @var{a} and @var{b}. +@end deftypefun + + +@page +@node The Type-2 Gumbel Distribution +@section The Type-2 Gumbel Distribution +@deftypefun double gsl_ran_gumbel2 (const gsl_rng * @var{r}, double @var{a}, double @var{b}) +@cindex Gumbel distribution (Type 2) +@cindex Type 2 Gumbel distribution +This function returns a random variate from the Type-2 Gumbel +distribution. The Type-2 Gumbel distribution function is, +@tex +\beforedisplay +$$ +p(x) dx = a b x^{-a-1} \exp(-b x^{-a}) dx +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(x) dx = a b x^@{-a-1@} \exp(-b x^@{-a@}) dx +@end example + +@end ifinfo +@noindent +for @math{0 < x < \infty}. +@end deftypefun + +@deftypefun double gsl_ran_gumbel2_pdf (double @var{x}, double @var{a}, double @var{b}) +This function computes the probability density @math{p(x)} at @var{x} +for a Type-2 Gumbel distribution with parameters @var{a} and @var{b}, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-gumbel2.tex} +@end tex + +@deftypefun double gsl_cdf_gumbel2_P (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel2_Q (double @var{x}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel2_Pinv (double @var{P}, double @var{a}, double @var{b}) +@deftypefunx double gsl_cdf_gumbel2_Qinv (double @var{Q}, double @var{a}, double @var{b}) +These functions compute the cumulative distribution functions +@math{P(x)}, @math{Q(x)} and their inverses for the Type-2 Gumbel +distribution with parameters @var{a} and @var{b}. +@end deftypefun + + +@page +@node The Dirichlet Distribution +@section The Dirichlet Distribution +@deftypefun void gsl_ran_dirichlet (const gsl_rng * @var{r}, size_t @var{K}, const double @var{alpha}[], double @var{theta}[]) +@cindex Dirichlet distribution +This function returns an array of @var{K} random variates from a Dirichlet +distribution of order @var{K}-1. The distribution function is +@tex +\beforedisplay +$$ +p(\theta_1,\ldots,\theta_K) \, d\theta_1 \cdots d\theta_K = + {1 \over Z} \prod_{i=1}^{K} \theta_i^{\alpha_i - 1} + \; \delta(1 -\sum_{i=1}^K \theta_i) d\theta_1 \cdots d\theta_K +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(\theta_1, ..., \theta_K) d\theta_1 ... d\theta_K = + (1/Z) \prod_@{i=1@}^K \theta_i^@{\alpha_i - 1@} \delta(1 -\sum_@{i=1@}^K \theta_i) d\theta_1 ... d\theta_K +@end example + +@end ifinfo +@noindent +for @c{$\theta_i \ge 0$} +@math{theta_i >= 0} +and @c{$\alpha_i > 0$} +@math{alpha_i > 0}. The delta function ensures that @math{\sum \theta_i = 1}. +The normalization factor @math{Z} is +@tex +\beforedisplay +$$ +Z = {\prod_{i=1}^K \Gamma(\alpha_i) \over \Gamma( \sum_{i=1}^K \alpha_i)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Z = @{\prod_@{i=1@}^K \Gamma(\alpha_i)@} / @{\Gamma( \sum_@{i=1@}^K \alpha_i)@} +@end example +@end ifinfo + +The random variates are generated by sampling @var{K} values +from gamma distributions with parameters +@c{$a=\alpha_i$, $b=1$} +@math{a=alpha_i, b=1}, +and renormalizing. +See A.M. Law, W.D. Kelton, @cite{Simulation Modeling and Analysis} (1991). +@end deftypefun + +@deftypefun double gsl_ran_dirichlet_pdf (size_t @var{K}, const double @var{alpha}[], const double @var{theta}[]) +This function computes the probability density +@c{$p(\theta_1, \ldots , \theta_K)$} +@math{p(\theta_1, ... , \theta_K)} +at @var{theta}[@var{K}] for a Dirichlet distribution with parameters +@var{alpha}[@var{K}], using the formula given above. +@end deftypefun + +@deftypefun double gsl_ran_dirichlet_lnpdf (size_t @var{K}, const double @var{alpha}[], const double @var{theta}[]) +This function computes the logarithm of the probability density +@c{$p(\theta_1, \ldots , \theta_K)$} +@math{p(\theta_1, ... , \theta_K)} +for a Dirichlet distribution with parameters +@var{alpha}[@var{K}]. +@end deftypefun + +@page +@node General Discrete Distributions +@section General Discrete Distributions + +Given @math{K} discrete events with different probabilities @math{P[k]}, +produce a random value @math{k} consistent with its probability. + +The obvious way to do this is to preprocess the probability list by +generating a cumulative probability array with @math{K+1} elements: +@tex +\beforedisplay +$$ +\eqalign{ +C[0] & = 0 \cr +C[k+1] &= C[k]+P[k]. +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example + C[0] = 0 +C[k+1] = C[k]+P[k]. +@end example + +@end ifinfo +@noindent +Note that this construction produces @math{C[K]=1}. Now choose a +uniform deviate @math{u} between 0 and 1, and find the value of @math{k} +such that @c{$C[k] \le u < C[k+1]$} +@math{C[k] <= u < C[k+1]}. +Although this in principle requires of order @math{\log K} steps per +random number generation, they are fast steps, and if you use something +like @math{\lfloor uK \rfloor} as a starting point, you can often do +pretty well. + +But faster methods have been devised. Again, the idea is to preprocess +the probability list, and save the result in some form of lookup table; +then the individual calls for a random discrete event can go rapidly. +An approach invented by G. Marsaglia (Generating discrete random variables +in a computer, Comm ACM 6, 37--38 (1963)) is very clever, and readers +interested in examples of good algorithm design are directed to this +short and well-written paper. Unfortunately, for large @math{K}, +Marsaglia's lookup table can be quite large. + +A much better approach is due to Alastair J. Walker (An efficient method +for generating discrete random variables with general distributions, ACM +Trans on Mathematical Software 3, 253--256 (1977); see also Knuth, v2, +3rd ed, p120--121,139). This requires two lookup tables, one floating +point and one integer, but both only of size @math{K}. After +preprocessing, the random numbers are generated in O(1) time, even for +large @math{K}. The preprocessing suggested by Walker requires +@math{O(K^2)} effort, but that is not actually necessary, and the +implementation provided here only takes @math{O(K)} effort. In general, +more preprocessing leads to faster generation of the individual random +numbers, but a diminishing return is reached pretty early. Knuth points +out that the optimal preprocessing is combinatorially difficult for +large @math{K}. + +This method can be used to speed up some of the discrete random number +generators below, such as the binomial distribution. To use it for +something like the Poisson Distribution, a modification would have to +be made, since it only takes a finite set of @math{K} outcomes. + +@deftypefun {gsl_ran_discrete_t *} gsl_ran_discrete_preproc (size_t @var{K}, const double * @var{P}) +@tpindex gsl_ran_discrete_t +@cindex Discrete random numbers +@cindex Discrete random numbers, preprocessing +This function returns a pointer to a structure that contains the lookup +table for the discrete random number generator. The array @var{P}[] contains +the probabilities of the discrete events; these array elements must all be +positive, but they needn't add up to one (so you can think of them more +generally as ``weights'')---the preprocessor will normalize appropriately. +This return value is used +as an argument for the @code{gsl_ran_discrete} function below. +@end deftypefun + +@deftypefun {size_t} gsl_ran_discrete (const gsl_rng * @var{r}, const gsl_ran_discrete_t * @var{g}) +@cindex Discrete random numbers +After the preprocessor, above, has been called, you use this function to +get the discrete random numbers. +@end deftypefun + +@deftypefun {double} gsl_ran_discrete_pdf (size_t @var{k}, const gsl_ran_discrete_t * @var{g}) +@cindex Discrete random numbers +Returns the probability @math{P[k]} of observing the variable @var{k}. +Since @math{P[k]} is not stored as part of the lookup table, it must be +recomputed; this computation takes @math{O(K)}, so if @var{K} is large +and you care about the original array @math{P[k]} used to create the +lookup table, then you should just keep this original array @math{P[k]} +around. +@end deftypefun + +@deftypefun {void} gsl_ran_discrete_free (gsl_ran_discrete_t * @var{g}) +@cindex Discrete random numbers +De-allocates the lookup table pointed to by @var{g}. +@end deftypefun + +@page +@node The Poisson Distribution +@section The Poisson Distribution +@deftypefun {unsigned int} gsl_ran_poisson (const gsl_rng * @var{r}, double @var{mu}) +@cindex Poisson random numbers +This function returns a random integer from the Poisson distribution +with mean @var{mu}. The probability distribution for Poisson variates is, +@tex +\beforedisplay +$$ +p(k) = {\mu^k \over k!} \exp(-\mu) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = @{\mu^k \over k!@} \exp(-\mu) +@end example + +@end ifinfo +@noindent +for @c{$k \ge 0$} +@math{k >= 0}. +@end deftypefun + +@deftypefun double gsl_ran_poisson_pdf (unsigned int @var{k}, double @var{mu}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a Poisson distribution with mean @var{mu}, using the formula +given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-poisson.tex} +@end tex + +@deftypefun double gsl_cdf_poisson_P (unsigned int @var{k}, double @var{mu}) +@deftypefunx double gsl_cdf_poisson_Q (unsigned int @var{k}, double @var{mu}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the Poisson distribution with parameter +@var{mu}. +@end deftypefun + + +@page +@node The Bernoulli Distribution +@section The Bernoulli Distribution +@deftypefun {unsigned int} gsl_ran_bernoulli (const gsl_rng * @var{r}, double @var{p}) +@cindex Bernoulli trial, random variates +This function returns either 0 or 1, the result of a Bernoulli trial +with probability @var{p}. The probability distribution for a Bernoulli +trial is, +@tex +\beforedisplay +$$ +\eqalign{ +p(0) & = 1 - p \cr +p(1) & = p +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(0) = 1 - p +p(1) = p +@end example +@end ifinfo + +@end deftypefun + +@deftypefun double gsl_ran_bernoulli_pdf (unsigned int @var{k}, double @var{p}) +This function computes the probability @math{p(k)} of obtaining +@var{k} from a Bernoulli distribution with probability parameter +@var{p}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-bernoulli.tex} +@end tex + +@page +@node The Binomial Distribution +@section The Binomial Distribution +@deftypefun {unsigned int} gsl_ran_binomial (const gsl_rng * @var{r}, double @var{p}, unsigned int @var{n}) +@cindex Binomial random variates +This function returns a random integer from the binomial distribution, +the number of successes in @var{n} independent trials with probability +@var{p}. The probability distribution for binomial variates is, +@tex +\beforedisplay +$$ +p(k) = {n! \over k! (n-k)!} p^k (1-p)^{n-k} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = @{n! \over k! (n-k)! @} p^k (1-p)^@{n-k@} +@end example + +@end ifinfo +@noindent +for @c{$0 \le k \le n$} +@math{0 <= k <= n}. +@end deftypefun + +@deftypefun double gsl_ran_binomial_pdf (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a binomial distribution with parameters @var{p} and @var{n}, using +the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-binomial.tex} +@end tex + +@deftypefun double gsl_cdf_binomial_P (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +@deftypefunx double gsl_cdf_binomial_Q (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the binomial +distribution with parameters @var{p} and @var{n}. +@end deftypefun + + +@page +@node The Multinomial Distribution +@section The Multinomial Distribution +@deftypefun void gsl_ran_multinomial (const gsl_rng * @var{r}, size_t @var{K}, unsigned int @var{N}, const double @var{p}[], unsigned int @var{n}[]) +@cindex Multinomial distribution + +This function computes a random sample @var{n}[] from the multinomial +distribution formed by @var{N} trials from an underlying distribution +@var{p}[@var{K}]. The distribution function for @var{n}[] is, +@tex +\beforedisplay +$$ +P(n_1, n_2,\cdots, n_K) = {{ N!}\over{n_1 ! n_2 ! \cdots n_K !}} \, + p_1^{n_1} p_2^{n_2} \cdots p_K^{n_K} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +P(n_1, n_2, ..., n_K) = + (N!/(n_1! n_2! ... n_K!)) p_1^n_1 p_2^n_2 ... p_K^n_K +@end example + +@end ifinfo +@noindent +where @c{($n_1$, $n_2$, $\ldots$, $n_K$)} +@math{(n_1, n_2, ..., n_K)} +are nonnegative integers with +@c{$\sum_{k=1}^{K} n_k =N$} +@math{sum_@{k=1@}^K n_k = N}, +and +@c{$(p_1, p_2, \ldots, p_K)$} +@math{(p_1, p_2, ..., p_K)} +is a probability distribution with @math{\sum p_i = 1}. +If the array @var{p}[@var{K}] is not normalized then its entries will be +treated as weights and normalized appropriately. The arrays @var{n}[] +and @var{p}[] must both be of length @var{K}. + +Random variates are generated using the conditional binomial method (see +C.S. Davis, @cite{The computer generation of multinomial random +variates}, Comp. Stat. Data Anal. 16 (1993) 205--217 for details). +@end deftypefun + +@deftypefun double gsl_ran_multinomial_pdf (size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[]) +This function computes the probability +@c{$P(n_1, n_2, \ldots, n_K)$} +@math{P(n_1, n_2, ..., n_K)} +of sampling @var{n}[@var{K}] from a multinomial distribution +with parameters @var{p}[@var{K}], using the formula given above. +@end deftypefun + +@deftypefun double gsl_ran_multinomial_lnpdf (size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[]) +This function returns the logarithm of the probability for the +multinomial distribution @c{$P(n_1, n_2, \ldots, n_K)$} +@math{P(n_1, n_2, ..., n_K)} with parameters @var{p}[@var{K}]. +@end deftypefun + +@page +@node The Negative Binomial Distribution +@section The Negative Binomial Distribution +@deftypefun {unsigned int} gsl_ran_negative_binomial (const gsl_rng * @var{r}, double @var{p}, double @var{n}) +@cindex Negative Binomial distribution, random variates +This function returns a random integer from the negative binomial +distribution, the number of failures occurring before @var{n} successes +in independent trials with probability @var{p} of success. The +probability distribution for negative binomial variates is, +@tex +\beforedisplay +$$ +p(k) = {\Gamma(n + k) \over \Gamma(k+1) \Gamma(n) } p^n (1-p)^k +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = @{\Gamma(n + k) \over \Gamma(k+1) \Gamma(n) @} p^n (1-p)^k +@end example + +@end ifinfo +@noindent +Note that @math{n} is not required to be an integer. +@end deftypefun + +@deftypefun double gsl_ran_negative_binomial_pdf (unsigned int @var{k}, double @var{p}, double @var{n}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a negative binomial distribution with parameters @var{p} and +@var{n}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-nbinomial.tex} +@end tex + +@deftypefun double gsl_cdf_negative_binomial_P (unsigned int @var{k}, double @var{p}, double @var{n}) +@deftypefunx double gsl_cdf_negative_binomial_Q (unsigned int @var{k}, double @var{p}, double @var{n}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the negative binomial distribution with +parameters @var{p} and @var{n}. +@end deftypefun + +@page +@node The Pascal Distribution +@section The Pascal Distribution + +@deftypefun {unsigned int} gsl_ran_pascal (const gsl_rng * @var{r}, double @var{p}, unsigned int @var{n}) +This function returns a random integer from the Pascal distribution. The +Pascal distribution is simply a negative binomial distribution with an +integer value of @math{n}. +@tex +\beforedisplay +$$ +p(k) = {(n + k - 1)! \over k! (n - 1)! } p^n (1-p)^k +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = @{(n + k - 1)! \over k! (n - 1)! @} p^n (1-p)^k +@end example + +@end ifinfo +@noindent +for @c{$k \ge 0$} +@math{k >= 0} +@end deftypefun + +@deftypefun double gsl_ran_pascal_pdf (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a Pascal distribution with parameters @var{p} and +@var{n}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-pascal.tex} +@end tex + +@deftypefun double gsl_cdf_pascal_P (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +@deftypefunx double gsl_cdf_pascal_Q (unsigned int @var{k}, double @var{p}, unsigned int @var{n}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the Pascal distribution with +parameters @var{p} and @var{n}. +@end deftypefun + +@page +@node The Geometric Distribution +@section The Geometric Distribution +@deftypefun {unsigned int} gsl_ran_geometric (const gsl_rng * @var{r}, double @var{p}) +@cindex Geometric random variates +This function returns a random integer from the geometric distribution, +the number of independent trials with probability @var{p} until the +first success. The probability distribution for geometric variates +is, +@tex +\beforedisplay +$$ +p(k) = p (1-p)^{k-1} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = p (1-p)^(k-1) +@end example + +@end ifinfo +@noindent +for @c{$k \ge 1$} +@math{k >= 1}. Note that the distribution begins with @math{k=1} with this +definition. There is another convention in which the exponent @math{k-1} +is replaced by @math{k}. +@end deftypefun + +@deftypefun double gsl_ran_geometric_pdf (unsigned int @var{k}, double @var{p}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a geometric distribution with probability parameter @var{p}, using +the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-geometric.tex} +@end tex + +@deftypefun double gsl_cdf_geometric_P (unsigned int @var{k}, double @var{p}) +@deftypefunx double gsl_cdf_geometric_Q (unsigned int @var{k}, double @var{p}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the geometric distribution with parameter +@var{p}. +@end deftypefun + + +@page +@node The Hypergeometric Distribution +@section The Hypergeometric Distribution +@cindex hypergeometric random variates +@deftypefun {unsigned int} gsl_ran_hypergeometric (const gsl_rng * @var{r}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t}) +@cindex Geometric random variates +This function returns a random integer from the hypergeometric +distribution. The probability distribution for hypergeometric +random variates is, +@tex +\beforedisplay +$$ +p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t) +@end example + +@end ifinfo +@noindent +where @math{C(a,b) = a!/(b!(a-b)!)} and +@c{$t \leq n_1 + n_2$} +@math{t <= n_1 + n_2}. The domain of @math{k} is +@c{$\hbox{max}(0,t-n_2), \ldots, \hbox{min}(t,n_1)$} +@math{max(0,t-n_2), ..., min(t,n_1)}. + +If a population contains @math{n_1} elements of ``type 1'' and +@math{n_2} elements of ``type 2'' then the hypergeometric +distribution gives the probability of obtaining @math{k} elements of +``type 1'' in @math{t} samples from the population without +replacement. +@end deftypefun + +@deftypefun double gsl_ran_hypergeometric_pdf (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a hypergeometric distribution with parameters @var{n1}, @var{n2}, +@var{t}, using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-hypergeometric.tex} +@end tex + +@deftypefun double gsl_cdf_hypergeometric_P (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t}) +@deftypefunx double gsl_cdf_hypergeometric_Q (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t}) +These functions compute the cumulative distribution functions +@math{P(k)}, @math{Q(k)} for the hypergeometric distribution with +parameters @var{n1}, @var{n2} and @var{t}. +@end deftypefun + + +@page +@node The Logarithmic Distribution +@section The Logarithmic Distribution +@deftypefun {unsigned int} gsl_ran_logarithmic (const gsl_rng * @var{r}, double @var{p}) +@cindex Logarithmic random variates +This function returns a random integer from the logarithmic +distribution. The probability distribution for logarithmic random variates +is, +@tex +\beforedisplay +$$ +p(k) = {-1 \over \log(1-p)} {\left( p^k \over k \right)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p(k) = @{-1 \over \log(1-p)@} @{(p^k \over k)@} +@end example + +@end ifinfo +@noindent +for @c{$k \ge 1$} +@math{k >= 1}. +@end deftypefun + +@deftypefun double gsl_ran_logarithmic_pdf (unsigned int @var{k}, double @var{p}) +This function computes the probability @math{p(k)} of obtaining @var{k} +from a logarithmic distribution with probability parameter @var{p}, +using the formula given above. +@end deftypefun + +@sp 1 +@tex +\centerline{\input rand-logarithmic.tex} +@end tex + +@page +@node Shuffling and Sampling +@section Shuffling and Sampling + +The following functions allow the shuffling and sampling of a set of +objects. The algorithms rely on a random number generator as a source of +randomness and a poor quality generator can lead to correlations in the +output. In particular it is important to avoid generators with a short +period. For more information see Knuth, v2, 3rd ed, Section 3.4.2, +``Random Sampling and Shuffling''. + +@deftypefun void gsl_ran_shuffle (const gsl_rng * @var{r}, void * @var{base}, size_t @var{n}, size_t @var{size}) + +This function randomly shuffles the order of @var{n} objects, each of +size @var{size}, stored in the array @var{base}[0..@var{n}-1]. The +output of the random number generator @var{r} is used to produce the +permutation. The algorithm generates all possible @math{n!} +permutations with equal probability, assuming a perfect source of random +numbers. + +The following code shows how to shuffle the numbers from 0 to 51, + +@example +int a[52]; + +for (i = 0; i < 52; i++) + @{ + a[i] = i; + @} + +gsl_ran_shuffle (r, a, 52, sizeof (int)); +@end example + +@end deftypefun + +@deftypefun int gsl_ran_choose (const gsl_rng * @var{r}, void * @var{dest}, size_t @var{k}, void * @var{src}, size_t @var{n}, size_t @var{size}) +This function fills the array @var{dest}[k] with @var{k} objects taken +randomly from the @var{n} elements of the array +@var{src}[0..@var{n}-1]. The objects are each of size @var{size}. The +output of the random number generator @var{r} is used to make the +selection. The algorithm ensures all possible samples are equally +likely, assuming a perfect source of randomness. + +The objects are sampled @emph{without} replacement, thus each object can +only appear once in @var{dest}[k]. It is required that @var{k} be less +than or equal to @code{n}. The objects in @var{dest} will be in the +same relative order as those in @var{src}. You will need to call +@code{gsl_ran_shuffle(r, dest, n, size)} if you want to randomize the +order. + +The following code shows how to select a random sample of three unique +numbers from the set 0 to 99, + +@example +double a[3], b[100]; + +for (i = 0; i < 100; i++) + @{ + b[i] = (double) i; + @} + +gsl_ran_choose (r, a, 3, b, 100, sizeof (double)); +@end example + +@end deftypefun + +@deftypefun void gsl_ran_sample (const gsl_rng * @var{r}, void * @var{dest}, size_t @var{k}, void * @var{src}, size_t @var{n}, size_t @var{size}) +This function is like @code{gsl_ran_choose} but samples @var{k} items +from the original array of @var{n} items @var{src} with replacement, so +the same object can appear more than once in the output sequence +@var{dest}. There is no requirement that @var{k} be less than @var{n} +in this case. +@end deftypefun + + +@node Random Number Distribution Examples +@section Examples + +The following program demonstrates the use of a random number generator +to produce variates from a distribution. It prints 10 samples from the +Poisson distribution with a mean of 3. + +@example +@verbatiminclude examples/randpoisson.c +@end example + +@noindent +If the library and header files are installed under @file{/usr/local} +(the default location) then the program can be compiled with these +options, + +@example +$ gcc -Wall demo.c -lgsl -lgslcblas -lm +@end example + +@noindent +Here is the output of the program, + +@example +$ ./a.out +@verbatiminclude examples/randpoisson.out +@end example + +@noindent +The variates depend on the seed used by the generator. The seed for the +default generator type @code{gsl_rng_default} can be changed with the +@code{GSL_RNG_SEED} environment variable to produce a different stream +of variates, + +@example +$ GSL_RNG_SEED=123 ./a.out +@verbatiminclude examples/randpoisson.2.out +@end example + +@noindent +The following program generates a random walk in two dimensions. + +@example +@verbatiminclude examples/randwalk.c +@end example + +@noindent +Here is some output from the program, four 10-step random walks from the origin, + +@tex +\centerline{\input random-walk.tex} +@end tex + +The following program computes the upper and lower cumulative +distribution functions for the standard normal distribution at +@math{x=2}. + +@example +@verbatiminclude examples/cdf.c +@end example + +@noindent +Here is the output of the program, + +@example +@verbatiminclude examples/cdf.out +@end example + +@node Random Number Distribution References and Further Reading +@section References and Further Reading + +For an encyclopaedic coverage of the subject readers are advised to +consult the book @cite{Non-Uniform Random Variate Generation} by Luc +Devroye. It covers every imaginable distribution and provides hundreds +of algorithms. + +@itemize @w{} +@item +Luc Devroye, @cite{Non-Uniform Random Variate Generation}, +Springer-Verlag, ISBN 0-387-96305-7. Available online at +@uref{http://cg.scs.carleton.ca/~luc/rnbookindex.html}. +@end itemize + +@noindent +The subject of random variate generation is also reviewed by Knuth, who +describes algorithms for all the major distributions. + +@itemize @w{} +@item +Donald E. Knuth, @cite{The Art of Computer Programming: Seminumerical +Algorithms} (Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842. +@end itemize + +@noindent +The Particle Data Group provides a short review of techniques for +generating distributions of random numbers in the ``Monte Carlo'' +section of its Annual Review of Particle Physics. + +@itemize @w{} +@item +@cite{Review of Particle Properties} +R.M. Barnett et al., Physical Review D54, 1 (1996) +@uref{http://pdg.lbl.gov/}. +@end itemize + +@noindent +The Review of Particle Physics is available online in postscript and pdf +format. + +@noindent +An overview of methods used to compute cumulative distribution functions +can be found in @cite{Statistical Computing} by W.J. Kennedy and +J.E. Gentle. Another general reference is @cite{Elements of Statistical +Computing} by R.A. Thisted. + +@itemize @w{} +@item +William E. Kennedy and James E. Gentle, @cite{Statistical Computing} (1980), +Marcel Dekker, ISBN 0-8247-6898-1. +@end itemize + +@itemize @w{} +@item +Ronald A. Thisted, @cite{Elements of Statistical Computing} (1988), +Chapman & Hall, ISBN 0-412-01371-1. +@end itemize + +@noindent +The cumulative distribution functions for the Gaussian distribution +are based on the following papers, + +@itemize @w{} +@item +@cite{Rational Chebyshev Approximations Using Linear Equations}, +W.J. Cody, W. Fraser, J.F. Hart. Numerische Mathematik 12, 242--251 (1968). +@end itemize + +@itemize @w{} +@item +@cite{Rational Chebyshev Approximations for the Error Function}, +W.J. Cody. Mathematics of Computation 23, n107, 631--637 (July 1969). +@end itemize diff --git a/software/gsl-1.15/doc/random-walk.tex b/software/gsl-1.15/doc/random-walk.tex new file mode 100644 index 000000000..8b5580873 --- /dev/null +++ b/software/gsl-1.15/doc/random-walk.tex @@ -0,0 +1,658 @@ +% GNUPLOT: plain TeX with Postscript +\begingroup +\catcode`\@=11\relax +\def\GNUPLOTspecial{% + \def\do##1{\catcode`##1=12\relax}\dospecials + \catcode`\{=1\catcode`\}=2\catcode\%=14\relax\special}% +% +\expandafter\ifx\csname GNUPLOTpicture\endcsname\relax + \csname newdimen\endcsname\GNUPLOTunit + \gdef\GNUPLOTpicture(#1,#2){\vbox to#2\GNUPLOTunit\bgroup + \def\put(##1,##2)##3{\unskip\raise##2\GNUPLOTunit + \hbox to0pt{\kern##1\GNUPLOTunit ##3\hss}\ignorespaces}% + \def\ljust##1{\vbox to0pt{\vss\hbox to0pt{##1\hss}\vss}}% + \def\cjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1\hss}\vss}}% + \def\rjust##1{\vbox to0pt{\vss\hbox to0pt{\hss ##1}\vss}}% + \def\stack##1{\let\\=\cr\tabskip=0pt\halign{\hfil ####\hfil\cr ##1\crcr}}% + \def\lstack##1{\hbox to0pt{\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\cstack##1{\hbox to0pt{\hss\vbox to0pt{\vss\stack{##1}}\hss}}% + \def\rstack##1{\hbox to0pt{\vbox to0pt{\stack{##1}\vss}\hss}}% + \vss\hbox to#1\GNUPLOTunit\bgroup\ignorespaces}% + \gdef\endGNUPLOTpicture{\hss\egroup\egroup}% +\fi +\GNUPLOTunit=0.0500bp +\GNUPLOTpicture(5760,5760) + {\GNUPLOTspecial{" +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: random-walk.tex +%%Creator: gnuplot 4.2 patchlevel 2 +%%CreationDate: Thu Jun 4 20:50:11 2009 +%%DocumentFonts: +%%BoundingBox: 0 0 288 288 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following 6 true/false flags may be edited by hand if required +% The unit line width may also be changed +% +/Color false def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Rounded false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +% +/vshift -66 def +/dl1 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +Level1 {} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (random-walk.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 4.2 patchlevel 2 ) + /Author (Brian Gough) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Thu Jun 4 20:50:11 2009) + /DOCINFO pdfmark +end +} ifelse +% +% Gnuplot Prolog Version 4.2 (August 2006) +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +% Default Line colors +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default Line Types +/LTw {PL [] 1 setgray} def +/LTb {BL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto gsave fill grestore} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + gsave 1 setgray fill grestore clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +gnudict begin +gsave +0 0 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +682 463 M +-63 0 V +63 470 R +-63 0 V +63 470 R +-63 0 V +63 469 R +-63 0 V +63 470 R +-63 0 V +63 470 R +-63 0 V +63 470 R +-63 0 V +63 470 R +-63 0 V +63 469 R +-63 0 V +63 470 R +-63 0 V +63 470 R +-63 0 V +682 463 M +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +234 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +234 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +235 63 R +235 0 R +0 -63 V +stroke +1.000 UL +LTa +682 2812 M +4698 0 V +3031 463 M +0 4698 V +stroke +0.500 UL +LTb +682 5161 M +682 463 L +4698 0 V +0 4698 V +-4698 0 V +1.000 UP +1.000 UP +stroke +1.000 UL +LT0 +3031 2812 M +-276 380 V +133 451 V +413 223 V +363 298 V +-44 -468 V +3200 3486 L +-458 104 V +-321 342 V +453 122 V +437 174 V +3031 2812 M +-433 183 V +-458 103 V +420 210 V +-315 349 V +-287 371 V +177 -435 V +1749 3325 L +465 69 V +240 -404 V +-351 312 V +928 -490 R +2574 2702 L +-213 419 V +-251 397 V +-447 144 V +446 -147 V +70 465 V +1789 3718 L +-39 468 V +1483 3800 L +185 432 V +3031 2812 M +2580 2679 L +278 379 V +286 373 V +-108 458 V +2822 3470 L +2535 3098 L +419 -212 V +350 -313 V +428 193 V +382 274 V +3031 2812 Pls +2755 3192 Pls +2888 3643 Pls +3301 3866 Pls +3664 4164 Pls +3620 3696 Pls +3200 3486 Pls +2742 3590 Pls +2421 3932 Pls +2874 4054 Pls +3311 4228 Pls +3031 2812 Pls +2598 2995 Pls +2140 3098 Pls +2560 3308 Pls +2245 3657 Pls +1958 4028 Pls +2135 3593 Pls +1749 3325 Pls +2214 3394 Pls +2454 2990 Pls +2103 3302 Pls +3031 2812 Pls +2574 2702 Pls +2361 3121 Pls +2110 3518 Pls +1663 3662 Pls +2109 3515 Pls +2179 3980 Pls +1789 3718 Pls +1750 4186 Pls +1483 3800 Pls +1668 4232 Pls +3031 2812 Pls +2580 2679 Pls +2858 3058 Pls +3144 3431 Pls +3036 3889 Pls +2822 3470 Pls +2535 3098 Pls +2954 2886 Pls +3304 2573 Pls +3732 2766 Pls +4114 3040 Pls +0.500 UL +LTb +682 5161 M +682 463 L +4698 0 V +0 4698 V +-4698 0 V +1.000 UP +stroke +grestore +end +showpage + }}% + \put(3031,5461){\cjust{\strut{}Random walks}}% + \put(5380,200){\cjust{\strut{}5}}% + \put(4910,200){\cjust{\strut{}4}}% + \put(4440,200){\cjust{\strut{}3}}% + \put(3971,200){\cjust{\strut{}2}}% + \put(3501,200){\cjust{\strut{}1}}% + \put(3031,200){\cjust{\strut{}0}}% + \put(2561,200){\cjust{\strut{}-1}}% + \put(2091,200){\cjust{\strut{}-2}}% + \put(1622,200){\cjust{\strut{}-3}}% + \put(1152,200){\cjust{\strut{}-4}}% + \put(682,200){\cjust{\strut{}-5}}% + \put(499,5161){\rjust{\strut{} 5}}% + \put(499,4691){\rjust{\strut{} 4}}% + \put(499,4221){\rjust{\strut{} 3}}% + \put(499,3752){\rjust{\strut{} 2}}% + \put(499,3282){\rjust{\strut{} 1}}% + \put(499,2812){\rjust{\strut{} 0}}% + \put(499,2342){\rjust{\strut{}-1}}% + \put(499,1872){\rjust{\strut{}-2}}% + \put(499,1403){\rjust{\strut{}-3}}% + \put(499,933){\rjust{\strut{}-4}}% + \put(499,463){\rjust{\strut{}-5}}% +\endGNUPLOTpicture +\endgroup +\endinput diff --git a/software/gsl-1.15/doc/randplots.gnp b/software/gsl-1.15/doc/randplots.gnp new file mode 100644 index 000000000..a09323505 --- /dev/null +++ b/software/gsl-1.15/doc/randplots.gnp @@ -0,0 +1,376 @@ +#set term postscript eps enhanced +set term pstex monochrome +set samples 300 +#set size 0.8,0.88 # paperback 6x9 #CHANGE THESE LATER IN FILE ALSO +set size 1,1.1 # us letter #IF MODIFIED +set border 31 lw 0.5 +set tics out +set ticscale 0.5 0.25 +set xtics border nomirror norotate +set ytics border nomirror norotate +set format x "%g" + +# Continuous distributions + +set xlabel "$x$" +set ylabel "$p(x)$" + +set xrange [-5:5] +set yrange [0:0.5] +set ytics 0.1 +set xtics 1 +set output "rand-gaussian.tex" +set title "Gaussian Distribution" +p(x)=1/sqrt(2*pi*sigma**2)*exp(-x**2/(2*sigma**2)) +plot sigma=1.0, p(x) title "$\\sigma=1$", \ + sigma=2.0, p(x) title "$\\sigma=2$" + +set xrange [0:5] +set yrange [0:2] +set ytics 0.5 +set xtics 1 +set output "rand-gaussian-tail.tex" +set title "Gaussian Tail Distribution" +p(x)= x > a ? 1/(0.5*erfc(a/sqrt(2*sigma**2))*sqrt(2*pi*sigma**2))*exp(-x**2/(2*sigma**2)) : 0 +plot a=1.5, sigma=1.0, p(x) title "$\\sigma=1,a=1.5$" + +set xrange [0:5] +set yrange [0:1.09] +set ytics 0.5 +set xtics 1 +set output "rand-rayleigh-tail.tex" +set title "Rayleigh Tail Distribution" +p(x)= x > a ? (x/sigma**2)*exp((a**2 - x**2)/(2*sigma**2)) : 0 +plot a=1.0, sigma=1.0, p(x) title "$a=1,\\sigma=1$", \ + a=0.5, sigma=2.0, p(x) title "$a=0.5,\\sigma=2$" + +set size ratio -1 0.8,1.143 +set xlabel "$x$" +set ylabel "$y$" +set xrange [-2:2] +set yrange [-2:2] +set ytics 1 +set xtics 1 +set output "rand-bivariate-gaussian.tex" +set title "Bivariate Gaussian Distribution" +set isosamples 30 +p(x,y)=1/sqrt(2*pi*sqrt(1-rho**2))*exp(-(x**2 + y**2 - 2*rho*x*y)/(2*(1-rho**2))) +#set cntrparam cspline +set noclabel +set contour +set view 0,0 +set nosurface +splot rho=0.9, p(x,y) title "$\\sigma_x=1, \\sigma_y=1, \\rho=0.9$" +set size noratio 1,1.1 # us letter + +set xlabel "$x$" +set ylabel "$p(x)$" +set ytics 0.1 +set xrange [-5:5] +set yrange [0:0.4] +set output "rand-cauchy.tex" +set title "Cauchy Distribution" +p(x)=1/(pi*a*(1+(x/a)**2)) +plot a=1.0, p(x) title "$a=1$", \ + a=2.0, p(x) title "$a=2$" + +set ytics 0.5 +set yrange [0:1] +set xrange [0:3] +set output "rand-exponential.tex" +set title "Exponential Distribution" +p(x)=exp(-x/mu)/mu +plot mu=1.0, p(x) title "$\\mu=1$", \ + mu=2.0, p(x) title "$\\mu=2$" + +set yrange [0:1] +set xrange [0:3] +set output "rand-chisq.tex" +set title "Chi-squared Distribution" +p(x)=(x/2)**(nu/2.0-1.0) *exp(-x/2)/ (2*gamma(nu/2.0)) +plot nu=1.0, p(x) title "$\\nu=1$", \ + nu=2.0, p(x) title "$\\nu=2$", \ + nu=3.0, p(x) title "$\\nu=3$" + +set yrange [0:1] +set xrange [0:5] +set output "rand-erlang.tex" +set title "Erlang Distribution" +p(x)=x**(n-1) *exp(-x/a)/ (gamma(n)*a**n) +plot n=1.0, a=1, p(x) title "$n=1$", \ + n=2.0, a=1.0, p(x) title "$n=2$", \ + n=3.0, a=1.0, p(x) title "$n=3$" + +set xrange [0:2] +set xtics 1 +set output "rand-fdist.tex" +set title "F-Distribution" +p(x)=gamma((v1+v2)/2.0)*v1**(v1/2.0)*v2**(v2/2.0)\ + /gamma(v1/2.0)/gamma(v2/2.0) * \ + x**(v1/2.0-1)*(v2+v1*x)**-(v1/2.0+v2/2.0) +plot v1=1.0, v2=1.0, p(x) title "$\\nu_1=1, \\nu_2=1$", \ + v1=3.0, v2=1.0, p(x) title "$\\nu_1=3, \\nu_2=2$" + +set xrange [0:5] +set output "rand-flat.tex" +set title "Flat Distribution" +p(x)= (xa) ? 1/(b-a) : 0 +plot a=0.5, b=2.5, p(x) title "$a=0.5,b=2.5$" with step, \ + a=1.2, b=4.8, p(x) title "$a=1.2,b=4.8$" with step + +set xrange [0:5] +set yrange [0:1] +set ytics 0.5 +set output "rand-gamma.tex" +set title "Gamma Distribution" +p(x)= x**(a-1)* exp(-x) / gamma(a) +plot a=1.0, p(x) title "$a=1$", \ + a=2.0, p(x) title "$a=2$", \ + a=3.0, p(x) title "$a=3$" + +set xrange [0:1] +set yrange [0:4] +set xtics 0.25 +set ytics 1 +set output "rand-beta.tex" +set title "Beta Distribution" +p(x)= gamma(a+b)/(gamma(a)*gamma(b))*x**(a-1)*(1-x)**(b-1) +plot a=2.0, b=2.0, p(x) title "$a=2,b=2$", \ + a=4.0, b=1.0, p(x) title "$a=4,b=1$", \ + a=1.0, b=4.0, p(x) title "$a=1,b=4$" + + +set xrange [-5:5] +set yrange [0:0.3] +set ytics 0.1 +set xtics 1 +set output "rand-logistic.tex" +set title "Logistic Distribution" +p(x)= exp(-x/a)/a/(1+exp(-x/a))**2 +plot a=1.0, p(x) title "$a=1$", \ + a=2.0, p(x) title "$a=2$" + +set xrange [0:3] +set yrange [0:0.7] +set xtics 1 +set ytics 0.5 +set output "rand-lognormal.tex" +set title "Lognormal Distribution" +p(x)= exp(-(log(x)-zeta)**2/2/sigma**2)/sqrt(2*pi*sigma**2)/x +plot zeta=0.0, sigma=1.0, p(x) title "$\\zeta=0, \\sigma=1$", \ + zeta=1.0, sigma=1.0, p(x) title "$\\zeta=1, \\sigma=1$" + +set xrange [0:5] +set yrange [0:2] +set ytics 0.5 +set xtics 1 +set output "rand-pareto.tex" +set title "Pareto Distribution" +p(x)= x>b ? a*b**a/x**(a+1) : 0 +plot a=1.0, b=1, p(x) title "$a=1, b=1$", \ + a=3.0, b=2, p(x) title "$a=3, b=2 $" + +set xrange [0:5] +set yrange [0:0.7] +set ytics 0.1 +set xtics 1 +set output "rand-rayleigh.tex" +set title "Rayleigh Distribution" +p(x)= (x/sigma**2)*exp(-x**2/(2*sigma**2)) +plot sigma=1.0, p(x) title "$\\sigma=1$", \ + sigma=2.0, p(x) title "$\\sigma=2$" + +set xrange [0:5] +set yrange [0:1.09] +set ytics 0.5 +set xtics 1 +set output "rand-rayleigh-tail.tex" +set title "Rayleigh Tail Distribution" +p(x)= x > a ? (x/sigma**2)*exp((a**2 - x**2)/(2*sigma**2)) : 0 +plot a=1.0, sigma=1.0, p(x) title "$a=1,\\sigma=1$", \ + a=0.5, sigma=2.0, p(x) title "$a=0.5,\\sigma=2$" + +set xrange [-4:4] +set yrange [0:0.5] +set ytics 0.1 +set output "rand-tdist.tex" +set title "Student's t distribution" +p(x)=gamma((v+1.0)/2)/sqrt(pi*v)/gamma(v/2)*(1+(x**2)/v)**-((v+1.0)/2) +plot v=1.0, p(x) title "$\\nu_1=1$", \ + v=5.0, p(x) title "$\\nu_1=5$" + +set xrange [-5:5] +set yrange [0:0.55] +set ytics 0.1 +set output "rand-laplace.tex" +set title "Laplace Distribution (Two-sided Exponential)" +p(x)=exp(-abs(x)/a)/2/a +plot a=1.0, p(x) title "$a=1$", \ + a=2.0, p(x) title "$a=2$" + +set xrange [-5:5] +set yrange [0:0.8] +set ytics 0.2 +set output "rand-exppow.tex" +set title "Exponential Power Distribution" +p(x)=exp(-(abs(x/a))**b)/2/a/gamma(1.0+1.0/b) +plot a=1.0, b=2.5, p(x) title "$a=1, b=2.5$", \ + a=1.0, b=0.5, p(x) title "$a=1, b=0.5$" + +set xrange [-5:10] +set yrange [0:0.2] +set ytics 0.1 +set output "rand-landau.tex" +set title "Landau Distribution" +plot 'landau.dat' notitle w lines + +set xrange [-5:5] +set yrange [0:0.45] +set ytics 0.1 +set output "rand-levy.tex" +set title "Levy Distribution" +p1(x)=1/(pi*mu*(1+(x/mu)**2)) +p2(x)=1/sqrt(2*pi*2*mu**2)*exp(-x**2/(4*mu**2)) +plot mu=1.0, a=1, p1(x) title "$c=1, \\alpha=1.0$", \ + mu=1.0, a=2, p2(x) title "$c=1, \\alpha=2.0$" + +set xrange [-5:5] +set yrange [0:0.35] +set ytics 0.05 +set output "rand-levyskew.tex" +set title "Levy Skew Distribution" +logp(x)= -1.34229+x*(-0.354314+x*(-0.322538+x*(0.205603+x*(-0.0518879+x*(0.00569502+x*-0.000224843))))) +p1(x)=exp(logp(x)) +plot mu=1.0, a=1, p1(x) title "$c=1, \\alpha=1.0, \\beta=1.0$" + + +set xrange [0:2] +set yrange [0:1.5] +set ytics 0.5 +set xtics 0.5 +set output "rand-weibull.tex" +set title "Weibull Distribution" +p(x)=(b/a) * (x/a)**(b-1) * exp(-(x/a)**b) +plot a=1.0, b=1.0, p(x) title "$a=1,b=1$", \ + a=1.0, b=2.0, p(x) title "$a=1,b=2$", \ + a=2.0, b=3.0, p(x) title "$a=2,b=3$" + +set xrange [-2:5] +set yrange [0:0.5] +set ytics 0.1 +set xtics 1.0 +set output "rand-gumbel1.tex" +set title "Type 1 Gumbel Distribution" +p1(x)=a*b*exp(-(b*exp(-a*x)+a*x)) +plot a=1.0, b=1.0, p1(x) title "Type 1, $a=1,b=1$" + +set xrange [0:2] +set yrange [0:0.7] +set ytics 0.1 +set xtics 0.5 +set output "rand-gumbel2.tex" +set title "Type 2 Gumbel Distribution" +p2(x)=x > 0 ? a*b*x**(-a-1)*exp(-b*x**-a) : 0 +plot a=1.0, b=1.0, p2(x) title "Type 2, $a=1,b=1$" + +# Discrete distributions + +set xlabel "$k$" +set ylabel "$p(k)$" +set ticscale 0.5 1 +set mxtics 2 + +set xrange [-0.5:10.5] +set yrange [0:0.3] +set ytics 0.1 +set xtics 1 +set function style step +set output "rand-poisson.tex" +set title "Poisson Distribution" +p(x)=mu**int(x)/(int(x)!) * exp(-mu) +plot mu=2.5, p(x+0.5) title "$\\mu=2.5$" + +set xrange [:1.5] +set yrange [0:1] +set ytics 0.5 +set xtics 1 +set function style step +set output "rand-bernoulli.tex" +set title "Bernoulli Trial" +p(x)= (int(x) == 0) ? 1-p : p +plot p = 0.7, p(x+0.5) title "$p=0.7$" + +set xrange [:10.5] +set yrange [0:0.3] +set xtics 1 +set ytics 0.1 +set output "rand-binomial.tex" +set title "Binomial Distribution" +p(x)= P**int(x)*(1-P)**(n-int(x))*gamma(n+1.0)/gamma(int(x)+1.0)/gamma(n-int(x)+1.0) + 1e-5 +plot P=0.5,n=9.99999999, p(x+0.5) title "$p=0.5,n=9$" + +set xrange [:5.5] +set yrange [0:0.7] +set ytics 0.1 +set xtics 1 +set output "rand-geometric.tex" +set title "Geometric Distribution" +p(x)=int(x) ? P*(1-P)**int(x-1) : 0 +plot P=0.5, p(x+0.5) title "$p=0.5$" + +set xrange [:10.5] +set yrange [0:0.7] +set ytics 0.1 +set xtics 1 +set output "rand-logarithmic.tex" +set title "Logarithmic Distribution" +p(x)=int(x) ? (-1/log(1-P))*(P**int(x))/int(x) : 0 +plot P=0.7, p(x+0.5) title "$p=0.7$" + +set xrange [:10.5] +set yrange [0:0.7] +set ytics 0.1 +set xtics 1 +set output "rand-hypergeometric.tex" +set title "Hypergeometric Distribution" +choose(a,b)=gamma(a+1)/(gamma(b+1)*gamma(a-b+1)) +p(x)=choose(n1,int(x))*choose(n2,t-int(x))/choose(n1+n2,t) +plot n1=5, n2=20, t=3, p(x+0.5) title "$n1=5, n2=20, t=3$" + +set xrange [:10.5] +set yrange [0:0.3] +set xtics 1 +set ytics 0.1 +set output "rand-nbinomial.tex" +set title "Negative Binomial Distribution" +p(x)= (P**n)*((1-P)**(int(x)))*gamma(n+int(x))/gamma(n)/gamma(int(x)+1.0) + 1e-5 +plot P=0.5,n=3.5, p(x+0.5) title "$p=0.5,n=3.5$" + +set xrange [:10.5] +set yrange [0:0.3] +set xtics 1 +set ytics 0.1 +set output "rand-pascal.tex" +set title "Pascal Distribution" +p(x)= (P**n)*((1-P)**(int(x)))*gamma(n+int(x))/gamma(n)/gamma(int(x)+1.0) + 1e-5 +plot P=0.5,n=3, p(x+0.5) title "$p=0.5,n=3$" + +###################################################################### + +set ticscale 1 0 +set xrange [-5:5] +set yrange [-5:5] +set xtics 1 +set ytics 1 +set size 0.8,1.143 +set size square +set output "random-walk.tex" +set title "Random walks" +set xzeroaxis +set yzeroaxis +set nokey +set noxlabel +set noylabel +plot "rand-walk.dat" using 1:2 with linesp + + diff --git a/software/gsl-1.15/doc/rng.texi b/software/gsl-1.15/doc/rng.texi new file mode 100644 index 000000000..bb5889add --- /dev/null +++ b/software/gsl-1.15/doc/rng.texi @@ -0,0 +1,1473 @@ +@cindex random number generators + +The library provides a large collection of random number generators +which can be accessed through a uniform interface. Environment +variables allow you to select different generators and seeds at runtime, +so that you can easily switch between generators without needing to +recompile your program. Each instance of a generator keeps track of its +own state, allowing the generators to be used in multi-threaded +programs. Additional functions are available for transforming uniform +random numbers into samples from continuous or discrete probability +distributions such as the Gaussian, log-normal or Poisson distributions. + +These functions are declared in the header file @file{gsl_rng.h}. + +@comment Need to explain the difference between SERIAL and PARALLEL random +@comment number generators here + +@menu +* General comments on random numbers:: +* The Random Number Generator Interface:: +* Random number generator initialization:: +* Sampling from a random number generator:: +* Auxiliary random number generator functions:: +* Random number environment variables:: +* Copying random number generator state:: +* Reading and writing random number generator state:: +* Random number generator algorithms:: +* Unix random number generators:: +* Other random number generators:: +* Random Number Generator Performance:: +* Random Number Generator Examples:: +* Random Number References and Further Reading:: +* Random Number Acknowledgements:: +@end menu + +@node General comments on random numbers +@section General comments on random numbers + +In 1988, Park and Miller wrote a paper entitled ``Random number +generators: good ones are hard to find.'' [Commun.@: ACM, 31, 1192--1201]. +Fortunately, some excellent random number generators are available, +though poor ones are still in common use. You may be happy with the +system-supplied random number generator on your computer, but you should +be aware that as computers get faster, requirements on random number +generators increase. Nowadays, a simulation that calls a random number +generator millions of times can often finish before you can make it down +the hall to the coffee machine and back. + +A very nice review of random number generators was written by Pierre +L'Ecuyer, as Chapter 4 of the book: Handbook on Simulation, Jerry Banks, +ed. (Wiley, 1997). The chapter is available in postscript from +L'Ecuyer's ftp site (see references). Knuth's volume on Seminumerical +Algorithms (originally published in 1968) devotes 170 pages to random +number generators, and has recently been updated in its 3rd edition +(1997). +@comment is only now starting to show its age. +@comment Nonetheless, +It is brilliant, a classic. If you don't own it, you should stop reading +right now, run to the nearest bookstore, and buy it. + +A good random number generator will satisfy both theoretical and +statistical properties. Theoretical properties are often hard to obtain +(they require real math!), but one prefers a random number generator +with a long period, low serial correlation, and a tendency @emph{not} to +``fall mainly on the planes.'' Statistical tests are performed with +numerical simulations. Generally, a random number generator is used to +estimate some quantity for which the theory of probability provides an +exact answer. Comparison to this exact answer provides a measure of +``randomness''. + +@node The Random Number Generator Interface +@section The Random Number Generator Interface + +It is important to remember that a random number generator is not a +``real'' function like sine or cosine. Unlike real functions, successive +calls to a random number generator yield different return values. Of +course that is just what you want for a random number generator, but to +achieve this effect, the generator must keep track of some kind of +``state'' variable. Sometimes this state is just an integer (sometimes +just the value of the previously generated random number), but often it +is more complicated than that and may involve a whole array of numbers, +possibly with some indices thrown in. To use the random number +generators, you do not need to know the details of what comprises the +state, and besides that varies from algorithm to algorithm. + +@tpindex gsl_rng_type +The random number generator library uses two special structs, +@code{gsl_rng_type} which holds static information about each type of +generator and @code{gsl_rng} which describes an instance of a generator +created from a given @code{gsl_rng_type}. + +The functions described in this section are declared in the header file +@file{gsl_rng.h}. + +@node Random number generator initialization +@section Random number generator initialization + +@deftypefun {gsl_rng *} gsl_rng_alloc (const gsl_rng_type * @var{T}) +@tpindex gsl_rng +This function returns a pointer to a newly-created +instance of a random number generator of type @var{T}. +For example, the following code creates an instance of the Tausworthe +generator, + +@example +gsl_rng * r = gsl_rng_alloc (gsl_rng_taus); +@end example + +If there is insufficient memory to create the generator then the +function returns a null pointer and the error handler is invoked with an +error code of @code{GSL_ENOMEM}. + +@vrindex gsl_rng_default_seed +@vrindex @env{GSL_RNG_SEED} +@cindex @code{GSL_RNG_SEED} +The generator is automatically initialized with the default seed, +@code{gsl_rng_default_seed}. This is zero by default but can be changed +either directly or by using the environment variable @code{GSL_RNG_SEED} +(@pxref{Random number environment variables}). + +The details of the available generator types are +described later in this chapter. +@end deftypefun + +@deftypefun void gsl_rng_set (const gsl_rng * @var{r}, unsigned long int @var{s}) +This function initializes (or `seeds') the random number generator. If +the generator is seeded with the same value of @var{s} on two different +runs, the same stream of random numbers will be generated by successive +calls to the routines below. If different values of @c{$@var{s} \geq 1$} +@math{@var{s} >= 1} are supplied, then the generated streams of random +numbers should be completely different. If the seed @var{s} is zero +then the standard seed from the original implementation is used +instead. For example, the original Fortran source code for the +@code{ranlux} generator used a seed of 314159265, and so choosing +@var{s} equal to zero reproduces this when using +@code{gsl_rng_ranlux}. + +When using multiple seeds with the same generator, choose seed values +greater than zero to avoid collisions with the default setting. + +Note that the most generators only accept 32-bit seeds, with higher +values being reduced modulo @c{$2^{32}$} +@math{2^32}. For generators +with smaller ranges the maximum seed value will typically be lower. +@end deftypefun + +@deftypefun void gsl_rng_free (gsl_rng * @var{r}) +This function frees all the memory associated with the generator +@var{r}. +@end deftypefun + +@node Sampling from a random number generator +@section Sampling from a random number generator + +The following functions return uniformly distributed random numbers, +either as integers or double precision floating point numbers. @inlinefns{} +To obtain non-uniform distributions @pxref{Random Number Distributions}. + +@deftypefun {unsigned long int} gsl_rng_get (const gsl_rng * @var{r}) +This function returns a random integer from the generator @var{r}. The +minimum and maximum values depend on the algorithm used, but all +integers in the range [@var{min},@var{max}] are equally likely. The +values of @var{min} and @var{max} can determined using the auxiliary +functions @code{gsl_rng_max (r)} and @code{gsl_rng_min (r)}. +@end deftypefun + +@deftypefun double gsl_rng_uniform (const gsl_rng * @var{r}) +This function returns a double precision floating point number uniformly +distributed in the range [0,1). The range includes 0.0 but excludes 1.0. +The value is typically obtained by dividing the result of +@code{gsl_rng_get(r)} by @code{gsl_rng_max(r) + 1.0} in double +precision. Some generators compute this ratio internally so that they +can provide floating point numbers with more than 32 bits of randomness +(the maximum number of bits that can be portably represented in a single +@code{unsigned long int}). +@end deftypefun + +@deftypefun double gsl_rng_uniform_pos (const gsl_rng * @var{r}) +This function returns a positive double precision floating point number +uniformly distributed in the range (0,1), excluding both 0.0 and 1.0. +The number is obtained by sampling the generator with the algorithm of +@code{gsl_rng_uniform} until a non-zero value is obtained. You can use +this function if you need to avoid a singularity at 0.0. +@end deftypefun + +@deftypefun {unsigned long int} gsl_rng_uniform_int (const gsl_rng * @var{r}, unsigned long int @var{n}) +This function returns a random integer from 0 to @math{n-1} inclusive +by scaling down and/or discarding samples from the generator @var{r}. +All integers in the range @math{[0,n-1]} are produced with equal +probability. For generators with a non-zero minimum value an offset +is applied so that zero is returned with the correct probability. + +Note that this function is designed for sampling from ranges smaller +than the range of the underlying generator. The parameter @var{n} +must be less than or equal to the range of the generator @var{r}. +If @var{n} is larger than the range of the generator then the function +calls the error handler with an error code of @code{GSL_EINVAL} and +returns zero. + +In particular, this function is not intended for generating the full range of +unsigned integer values @c{$[0,2^{32}-1]$} +@math{[0,2^32-1]}. Instead +choose a generator with the maximal integer range and zero minimum +value, such as @code{gsl_rng_ranlxd1}, @code{gsl_rng_mt19937} or +@code{gsl_rng_taus}, and sample it directly using +@code{gsl_rng_get}. The range of each generator can be found using +the auxiliary functions described in the next section. +@end deftypefun + +@node Auxiliary random number generator functions +@section Auxiliary random number generator functions +The following functions provide information about an existing +generator. You should use them in preference to hard-coding the generator +parameters into your own code. + +@deftypefun {const char *} gsl_rng_name (const gsl_rng * @var{r}) +This function returns a pointer to the name of the generator. +For example, + +@example +printf ("r is a '%s' generator\n", + gsl_rng_name (r)); +@end example + +@noindent +would print something like @code{r is a 'taus' generator}. +@end deftypefun + +@deftypefun {unsigned long int} gsl_rng_max (const gsl_rng * @var{r}) +@code{gsl_rng_max} returns the largest value that @code{gsl_rng_get} +can return. +@end deftypefun + +@deftypefun {unsigned long int} gsl_rng_min (const gsl_rng * @var{r}) +@code{gsl_rng_min} returns the smallest value that @code{gsl_rng_get} +can return. Usually this value is zero. There are some generators with +algorithms that cannot return zero, and for these generators the minimum +value is 1. +@end deftypefun + +@deftypefun {void *} gsl_rng_state (const gsl_rng * @var{r}) +@deftypefunx size_t gsl_rng_size (const gsl_rng * @var{r}) +These functions return a pointer to the state of generator @var{r} and +its size. You can use this information to access the state directly. For +example, the following code will write the state of a generator to a +stream, + +@example +void * state = gsl_rng_state (r); +size_t n = gsl_rng_size (r); +fwrite (state, n, 1, stream); +@end example +@end deftypefun + +@deftypefun {const gsl_rng_type **} gsl_rng_types_setup (void) +This function returns a pointer to an array of all the available +generator types, terminated by a null pointer. The function should be +called once at the start of the program, if needed. The following code +fragment shows how to iterate over the array of generator types to print +the names of the available algorithms, + +@example +const gsl_rng_type **t, **t0; + +t0 = gsl_rng_types_setup (); + +printf ("Available generators:\n"); + +for (t = t0; *t != 0; t++) + @{ + printf ("%s\n", (*t)->name); + @} +@end example +@end deftypefun + +@node Random number environment variables +@section Random number environment variables + +The library allows you to choose a default generator and seed from the +environment variables @code{GSL_RNG_TYPE} and @code{GSL_RNG_SEED} and +the function @code{gsl_rng_env_setup}. This makes it easy try out +different generators and seeds without having to recompile your program. + +@deftypefun {const gsl_rng_type *} gsl_rng_env_setup (void) +@vrindex @env{GSL_RNG_TYPE} +@vrindex @env{GSL_RNG_SEED} +@vrindex gsl_rng_default +@vrindex gsl_rng_default_seed +This function reads the environment variables @code{GSL_RNG_TYPE} and +@code{GSL_RNG_SEED} and uses their values to set the corresponding +library variables @code{gsl_rng_default} and +@code{gsl_rng_default_seed}. These global variables are defined as +follows, + +@example +extern const gsl_rng_type *gsl_rng_default +extern unsigned long int gsl_rng_default_seed +@end example + +The environment variable @code{GSL_RNG_TYPE} should be the name of a +generator, such as @code{taus} or @code{mt19937}. The environment +variable @code{GSL_RNG_SEED} should contain the desired seed value. It +is converted to an @code{unsigned long int} using the C library function +@code{strtoul}. + +If you don't specify a generator for @code{GSL_RNG_TYPE} then +@code{gsl_rng_mt19937} is used as the default. The initial value of +@code{gsl_rng_default_seed} is zero. + +@end deftypefun + +@noindent +@need 2000 +Here is a short program which shows how to create a global +generator using the environment variables @code{GSL_RNG_TYPE} and +@code{GSL_RNG_SEED}, + +@example +@verbatiminclude examples/rng.c +@end example + +@noindent +Running the program without any environment variables uses the initial +defaults, an @code{mt19937} generator with a seed of 0, + +@example +$ ./a.out +@verbatiminclude examples/rng.out +@end example + +@noindent +By setting the two variables on the command line we can +change the default generator and the seed, + +@example +$ GSL_RNG_TYPE="taus" GSL_RNG_SEED=123 ./a.out +GSL_RNG_TYPE=taus +GSL_RNG_SEED=123 +generator type: taus +seed = 123 +first value = 2720986350 +@end example + +@node Copying random number generator state +@section Copying random number generator state + +The above methods do not expose the random number `state' which changes +from call to call. It is often useful to be able to save and restore +the state. To permit these practices, a few somewhat more advanced +functions are supplied. These include: + +@deftypefun int gsl_rng_memcpy (gsl_rng * @var{dest}, const gsl_rng * @var{src}) +This function copies the random number generator @var{src} into the +pre-existing generator @var{dest}, making @var{dest} into an exact copy +of @var{src}. The two generators must be of the same type. +@end deftypefun + +@deftypefun {gsl_rng *} gsl_rng_clone (const gsl_rng * @var{r}) +This function returns a pointer to a newly created generator which is an +exact copy of the generator @var{r}. +@end deftypefun + +@node Reading and writing random number generator state +@section Reading and writing random number generator state + +The library provides functions for reading and writing the random +number state to a file as binary data. + +@deftypefun int gsl_rng_fwrite (FILE * @var{stream}, const gsl_rng * @var{r}) +This function writes the random number state of the random number +generator @var{r} to the stream @var{stream} in binary format. The +return value is 0 for success and @code{GSL_EFAILED} if there was a +problem writing to the file. Since the data is written in the native +binary format it may not be portable between different architectures. +@end deftypefun + +@deftypefun int gsl_rng_fread (FILE * @var{stream}, gsl_rng * @var{r}) +This function reads the random number state into the random number +generator @var{r} from the open stream @var{stream} in binary format. +The random number generator @var{r} must be preinitialized with the +correct random number generator type since type information is not +saved. The return value is 0 for success and @code{GSL_EFAILED} if +there was a problem reading from the file. The data is assumed to +have been written in the native binary format on the same +architecture. +@end deftypefun + +@node Random number generator algorithms +@section Random number generator algorithms + +The functions described above make no reference to the actual algorithm +used. This is deliberate so that you can switch algorithms without +having to change any of your application source code. The library +provides a large number of generators of different types, including +simulation quality generators, generators provided for compatibility +with other libraries and historical generators from the past. + +The following generators are recommended for use in simulation. They +have extremely long periods, low correlation and pass most statistical +tests. For the most reliable source of uncorrelated numbers, the +second-generation @sc{ranlux} generators have the strongest proof of +randomness. + +@deffn {Generator} gsl_rng_mt19937 +@cindex MT19937 random number generator +The MT19937 generator of Makoto Matsumoto and Takuji Nishimura is a +variant of the twisted generalized feedback shift-register algorithm, +and is known as the ``Mersenne Twister'' generator. It has a Mersenne +prime period of +@comment +@c{$2^{19937} - 1$} +@math{2^19937 - 1} (about +@c{$10^{6000}$} +@math{10^6000}) and is +equi-distributed in 623 dimensions. It has passed the @sc{diehard} +statistical tests. It uses 624 words of state per generator and is +comparable in speed to the other generators. The original generator used +a default seed of 4357 and choosing @var{s} equal to zero in +@code{gsl_rng_set} reproduces this. Later versions switched to 5489 +as the default seed, you can choose this explicitly via @code{gsl_rng_set} +instead if you require it. + +For more information see, +@itemize @w{} +@item +Makoto Matsumoto and Takuji Nishimura, ``Mersenne Twister: A +623-dimensionally equidistributed uniform pseudorandom number +generator''. @cite{ACM Transactions on Modeling and Computer +Simulation}, Vol.@: 8, No.@: 1 (Jan. 1998), Pages 3--30 +@end itemize + +@noindent +The generator @code{gsl_rng_mt19937} uses the second revision of the +seeding procedure published by the two authors above in 2002. The +original seeding procedures could cause spurious artifacts for some seed +values. They are still available through the alternative generators +@code{gsl_rng_mt19937_1999} and @code{gsl_rng_mt19937_1998}. +@end deffn + +@deffn {Generator} gsl_rng_ranlxs0 +@deffnx {Generator} gsl_rng_ranlxs1 +@deffnx {Generator} gsl_rng_ranlxs2 +@cindex RANLXS random number generator + +The generator @code{ranlxs0} is a second-generation version of the +@sc{ranlux} algorithm of L@"uscher, which produces ``luxury random +numbers''. This generator provides single precision output (24 bits) at +three luxury levels @code{ranlxs0}, @code{ranlxs1} and @code{ranlxs2}, +in increasing order of strength. +It uses double-precision floating point arithmetic internally and can be +significantly faster than the integer version of @code{ranlux}, +particularly on 64-bit architectures. The period of the generator is +about @c{$10^{171}$} +@math{10^171}. The algorithm has mathematically proven properties and +can provide truly decorrelated numbers at a known level of randomness. +The higher luxury levels provide increased decorrelation between samples +as an additional safety margin. + +Note that the range of allowed seeds for this generator is @c{$[0,2^{31}-1]$} +@math{[0,2^31-1]}. Higher seed values are wrapped modulo @c{$2^{31}$} +@math{2^31}. +@end deffn + +@deffn {Generator} gsl_rng_ranlxd1 +@deffnx {Generator} gsl_rng_ranlxd2 +@cindex RANLXD random number generator + +These generators produce double precision output (48 bits) from the +@sc{ranlxs} generator. The library provides two luxury levels +@code{ranlxd1} and @code{ranlxd2}, in increasing order of strength. +@end deffn + + +@deffn {Generator} gsl_rng_ranlux +@deffnx {Generator} gsl_rng_ranlux389 + +@cindex RANLUX random number generator +The @code{ranlux} generator is an implementation of the original +algorithm developed by L@"uscher. It uses a +lagged-fibonacci-with-skipping algorithm to produce ``luxury random +numbers''. It is a 24-bit generator, originally designed for +single-precision IEEE floating point numbers. This implementation is +based on integer arithmetic, while the second-generation versions +@sc{ranlxs} and @sc{ranlxd} described above provide floating-point +implementations which will be faster on many platforms. +The period of the generator is about @c{$10^{171}$} +@math{10^171}. The algorithm has mathematically proven properties and +it can provide truly decorrelated numbers at a known level of +randomness. The default level of decorrelation recommended by L@"uscher +is provided by @code{gsl_rng_ranlux}, while @code{gsl_rng_ranlux389} +gives the highest level of randomness, with all 24 bits decorrelated. +Both types of generator use 24 words of state per generator. + +For more information see, +@itemize @w{} +@item +M. L@"uscher, ``A portable high-quality random number generator for +lattice field theory calculations'', @cite{Computer Physics +Communications}, 79 (1994) 100--110. +@item +F. James, ``RANLUX: A Fortran implementation of the high-quality +pseudo-random number generator of L@"uscher'', @cite{Computer Physics +Communications}, 79 (1994) 111--114 +@end itemize +@end deffn + + +@deffn {Generator} gsl_rng_cmrg +@cindex CMRG, combined multiple recursive random number generator +This is a combined multiple recursive generator by L'Ecuyer. +Its sequence is, +@tex +\beforedisplay +$$ +z_n = (x_n - y_n) \,\hbox{mod}\, m_1 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z_n = (x_n - y_n) mod m_1 +@end example + +@end ifinfo +@noindent +where the two underlying generators @math{x_n} and @math{y_n} are, +@tex +\beforedisplay +$$ +\eqalign{ +x_n & = (a_1 x_{n-1} + a_2 x_{n-2} + a_3 x_{n-3}) \,\hbox{mod}\, m_1 \cr +y_n & = (b_1 y_{n-1} + b_2 y_{n-2} + b_3 y_{n-3}) \,\hbox{mod}\, m_2 +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_n = (a_1 x_@{n-1@} + a_2 x_@{n-2@} + a_3 x_@{n-3@}) mod m_1 +y_n = (b_1 y_@{n-1@} + b_2 y_@{n-2@} + b_3 y_@{n-3@}) mod m_2 +@end example + +@end ifinfo +@noindent +with coefficients +@math{a_1 = 0}, +@math{a_2 = 63308}, +@math{a_3 = -183326}, +@math{b_1 = 86098}, +@math{b_2 = 0}, +@math{b_3 = -539608}, +and moduli +@c{$m_1 = 2^{31} - 1 = 2147483647$} +@math{m_1 = 2^31 - 1 = 2147483647} +and +@c{$m_2 = 2145483479$} +@math{m_2 = 2145483479}. + +The period of this generator is +@c{$\hbox{lcm}(m_1^3-1, m_2^3-1)$} +@math{lcm(m_1^3-1, m_2^3-1)}, +which is approximately +@c{$2^{185}$} +@math{2^185} +(about +@c{$10^{56}$} +@math{10^56}). It uses +6 words of state per generator. For more information see, + +@itemize @w{} +@item +P. L'Ecuyer, ``Combined Multiple Recursive Random Number +Generators'', @cite{Operations Research}, 44, 5 (1996), 816--822. +@end itemize +@end deffn + +@deffn {Generator} gsl_rng_mrg +@cindex MRG, multiple recursive random number generator +This is a fifth-order multiple recursive generator by L'Ecuyer, Blouin +and Coutre. Its sequence is, +@tex +\beforedisplay +$$ +x_n = (a_1 x_{n-1} + a_5 x_{n-5}) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_n = (a_1 x_@{n-1@} + a_5 x_@{n-5@}) mod m +@end example + +@end ifinfo +@noindent +with +@math{a_1 = 107374182}, +@math{a_2 = a_3 = a_4 = 0}, +@math{a_5 = 104480} +and +@c{$m = 2^{31}-1$} +@math{m = 2^31 - 1}. + +The period of this generator is about +@c{$10^{46}$} +@math{10^46}. It uses 5 words +of state per generator. More information can be found in the following +paper, +@itemize @w{} +@item +P. L'Ecuyer, F. Blouin, and R. Coutre, ``A search for good multiple +recursive random number generators'', @cite{ACM Transactions on Modeling and +Computer Simulation} 3, 87--98 (1993). +@end itemize +@end deffn + +@deffn {Generator} gsl_rng_taus +@deffnx {Generator} gsl_rng_taus2 +@cindex Tausworthe random number generator +This is a maximally equidistributed combined Tausworthe generator by +L'Ecuyer. The sequence is, +@tex +\beforedisplay +$$ +x_n = (s^1_n \oplus s^2_n \oplus s^3_n) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_n = (s1_n ^^ s2_n ^^ s3_n) +@end example + +@end ifinfo +@noindent +where, +@tex +\beforedisplay +$$ +\eqalign{ +s^1_{n+1} &= (((s^1_n \& 4294967294)\ll 12) \oplus (((s^1_n\ll 13) \oplus s^1_n)\gg 19)) \cr +s^2_{n+1} &= (((s^2_n \& 4294967288)\ll 4) \oplus (((s^2_n\ll 2) \oplus s^2_n)\gg 25)) \cr +s^3_{n+1} &= (((s^3_n \& 4294967280)\ll 17) \oplus (((s^3_n\ll 3) \oplus s^3_n)\gg 11)) +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +s1_@{n+1@} = (((s1_n&4294967294)<<12)^^(((s1_n<<13)^^s1_n)>>19)) +s2_@{n+1@} = (((s2_n&4294967288)<< 4)^^(((s2_n<< 2)^^s2_n)>>25)) +s3_@{n+1@} = (((s3_n&4294967280)<<17)^^(((s3_n<< 3)^^s3_n)>>11)) +@end example + +@end ifinfo +@noindent +computed modulo +@c{$2^{32}$} +@math{2^32}. In the formulas above +@c{$\oplus$} +@math{^^} +denotes ``exclusive-or''. Note that the algorithm relies on the properties +of 32-bit unsigned integers and has been implemented using a bitmask +of @code{0xFFFFFFFF} to make it work on 64 bit machines. + +The period of this generator is @c{$2^{88}$} +@math{2^88} (about +@c{$10^{26}$} +@math{10^26}). It uses 3 words of state per generator. For more +information see, + +@itemize @w{} +@item +P. L'Ecuyer, ``Maximally Equidistributed Combined Tausworthe +Generators'', @cite{Mathematics of Computation}, 65, 213 (1996), 203--213. +@end itemize + +@noindent +The generator @code{gsl_rng_taus2} uses the same algorithm as +@code{gsl_rng_taus} but with an improved seeding procedure described in +the paper, + +@itemize @w{} +@item +P. L'Ecuyer, ``Tables of Maximally Equidistributed Combined LFSR +Generators'', @cite{Mathematics of Computation}, 68, 225 (1999), 261--269 +@end itemize + +@noindent +The generator @code{gsl_rng_taus2} should now be used in preference to +@code{gsl_rng_taus}. +@end deffn + +@deffn {Generator} gsl_rng_gfsr4 +@cindex Four-tap Generalized Feedback Shift Register +The @code{gfsr4} generator is like a lagged-fibonacci generator, and +produces each number as an @code{xor}'d sum of four previous values. +@tex +\beforedisplay +$$ +r_n = r_{n-A} \oplus r_{n-B} \oplus r_{n-C} \oplus r_{n-D} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +r_n = r_@{n-A@} ^^ r_@{n-B@} ^^ r_@{n-C@} ^^ r_@{n-D@} +@end example +@end ifinfo + +Ziff (ref below) notes that ``it is now widely known'' that two-tap +registers (such as R250, which is described below) +have serious flaws, the most obvious one being the three-point +correlation that comes from the definition of the generator. Nice +mathematical properties can be derived for GFSR's, and numerics bears +out the claim that 4-tap GFSR's with appropriately chosen offsets are as +random as can be measured, using the author's test. + +This implementation uses the values suggested the example on p392 of +Ziff's article: @math{A=471}, @math{B=1586}, @math{C=6988}, @math{D=9689}. + + +If the offsets are appropriately chosen (such as the one ones in this +implementation), then the sequence is said to be maximal; that means +that the period is @math{2^D - 1}, where @math{D} is the longest lag. +(It is one less than @math{2^D} because it is not permitted to have all +zeros in the @code{ra[]} array.) For this implementation with +@math{D=9689} that works out to about @c{$10^{2917}$} +@math{10^2917}. + +Note that the implementation of this generator using a 32-bit +integer amounts to 32 parallel implementations of one-bit +generators. One consequence of this is that the period of this +32-bit generator is the same as for the one-bit generator. +Moreover, this independence means that all 32-bit patterns are +equally likely, and in particular that 0 is an allowed random +value. (We are grateful to Heiko Bauke for clarifying for us these +properties of GFSR random number generators.) + +For more information see, +@itemize @w{} +@item +Robert M. Ziff, ``Four-tap shift-register-sequence random-number +generators'', @cite{Computers in Physics}, 12(4), Jul/Aug +1998, pp 385--392. +@end itemize +@end deffn + +@node Unix random number generators +@section Unix random number generators + +The standard Unix random number generators @code{rand}, @code{random} +and @code{rand48} are provided as part of GSL. Although these +generators are widely available individually often they aren't all +available on the same platform. This makes it difficult to write +portable code using them and so we have included the complete set of +Unix generators in GSL for convenience. Note that these generators +don't produce high-quality randomness and aren't suitable for work +requiring accurate statistics. However, if you won't be measuring +statistical quantities and just want to introduce some variation into +your program then these generators are quite acceptable. + +@cindex rand, BSD random number generator +@cindex Unix random number generators, rand +@cindex Unix random number generators, rand48 + +@deffn {Generator} gsl_rng_rand +@cindex BSD random number generator +This is the BSD @code{rand} generator. Its sequence is +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n + c) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n + c) mod m +@end example + +@end ifinfo +@noindent +with +@math{a = 1103515245}, +@math{c = 12345} and +@c{$m = 2^{31}$} +@math{m = 2^31}. +The seed specifies the initial value, +@math{x_1}. The period of this +generator is +@c{$2^{31}$} +@math{2^31}, and it uses 1 word of storage per +generator. +@end deffn + +@deffn {Generator} gsl_rng_random_bsd +@deffnx {Generator} gsl_rng_random_libc5 +@deffnx {Generator} gsl_rng_random_glibc2 +These generators implement the @code{random} family of functions, a +set of linear feedback shift register generators originally used in BSD +Unix. There are several versions of @code{random} in use today: the +original BSD version (e.g. on SunOS4), a libc5 version (found on +older GNU/Linux systems) and a glibc2 version. Each version uses a +different seeding procedure, and thus produces different sequences. + +The original BSD routines accepted a variable length buffer for the +generator state, with longer buffers providing higher-quality +randomness. The @code{random} function implemented algorithms for +buffer lengths of 8, 32, 64, 128 and 256 bytes, and the algorithm with +the largest length that would fit into the user-supplied buffer was +used. To support these algorithms additional generators are available +with the following names, + +@example +gsl_rng_random8_bsd +gsl_rng_random32_bsd +gsl_rng_random64_bsd +gsl_rng_random128_bsd +gsl_rng_random256_bsd +@end example + +@noindent +where the numeric suffix indicates the buffer length. The original BSD +@code{random} function used a 128-byte default buffer and so +@code{gsl_rng_random_bsd} has been made equivalent to +@code{gsl_rng_random128_bsd}. Corresponding versions of the @code{libc5} +and @code{glibc2} generators are also available, with the names +@code{gsl_rng_random8_libc5}, @code{gsl_rng_random8_glibc2}, etc. +@end deffn + +@deffn {Generator} gsl_rng_rand48 +@cindex rand48 random number generator +This is the Unix @code{rand48} generator. Its sequence is +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n + c) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n + c) mod m +@end example + +@end ifinfo +@noindent +defined on 48-bit unsigned integers with +@math{a = 25214903917}, +@math{c = 11} and +@c{$m = 2^{48}$} +@math{m = 2^48}. +The seed specifies the upper 32 bits of the initial value, @math{x_1}, +with the lower 16 bits set to @code{0x330E}. The function +@code{gsl_rng_get} returns the upper 32 bits from each term of the +sequence. This does not have a direct parallel in the original +@code{rand48} functions, but forcing the result to type @code{long int} +reproduces the output of @code{mrand48}. The function +@code{gsl_rng_uniform} uses the full 48 bits of internal state to return +the double precision number @math{x_n/m}, which is equivalent to the +function @code{drand48}. Note that some versions of the GNU C Library +contained a bug in @code{mrand48} function which caused it to produce +different results (only the lower 16-bits of the return value were set). +@end deffn + +@node Other random number generators +@section Other random number generators + +The generators in this section are provided for compatibility with +existing libraries. If you are converting an existing program to use GSL +then you can select these generators to check your new implementation +against the original one, using the same random number generator. After +verifying that your new program reproduces the original results you can +then switch to a higher-quality generator. + +Note that most of the generators in this section are based on single +linear congruence relations, which are the least sophisticated type of +generator. In particular, linear congruences have poor properties when +used with a non-prime modulus, as several of these routines do (e.g. +with a power of two modulus, +@c{$2^{31}$} +@math{2^31} or +@c{$2^{32}$} +@math{2^32}). This +leads to periodicity in the least significant bits of each number, +with only the higher bits having any randomness. Thus if you want to +produce a random bitstream it is best to avoid using the least +significant bits. + +@deffn {Generator} gsl_rng_ranf +@cindex RANF random number generator +@cindex CRAY random number generator, RANF +This is the CRAY random number generator @code{RANF}. Its sequence is +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n) mod m +@end example + +@end ifinfo +@noindent +defined on 48-bit unsigned integers with @math{a = 44485709377909} and +@c{$m = 2^{48}$} +@math{m = 2^48}. The seed specifies the lower +32 bits of the initial value, +@math{x_1}, with the lowest bit set to +prevent the seed taking an even value. The upper 16 bits of +@math{x_1} +are set to 0. A consequence of this procedure is that the pairs of seeds +2 and 3, 4 and 5, etc.@: produce the same sequences. + +The generator compatible with the CRAY MATHLIB routine RANF. It +produces double precision floating point numbers which should be +identical to those from the original RANF. + +There is a subtlety in the implementation of the seeding. The initial +state is reversed through one step, by multiplying by the modular +inverse of @math{a} mod @math{m}. This is done for compatibility with +the original CRAY implementation. + +Note that you can only seed the generator with integers up to +@c{$2^{32}$} +@math{2^32}, while the original CRAY implementation uses +non-portable wide integers which can cover all +@c{$2^{48}$} +@math{2^48} states of the generator. + +The function @code{gsl_rng_get} returns the upper 32 bits from each term +of the sequence. The function @code{gsl_rng_uniform} uses the full 48 +bits to return the double precision number @math{x_n/m}. + +The period of this generator is @c{$2^{46}$} +@math{2^46}. +@end deffn + +@deffn {Generator} gsl_rng_ranmar +@cindex RANMAR random number generator +This is the RANMAR lagged-fibonacci generator of Marsaglia, Zaman and +Tsang. It is a 24-bit generator, originally designed for +single-precision IEEE floating point numbers. It was included in the +CERNLIB high-energy physics library. +@end deffn + +@deffn {Generator} gsl_rng_r250 +@cindex shift-register random number generator +@cindex R250 shift-register random number generator +This is the shift-register generator of Kirkpatrick and Stoll. The +sequence is based on the recurrence +@tex +\beforedisplay +$$ +x_n = x_{n-103} \oplus x_{n-250} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_n = x_@{n-103@} ^^ x_@{n-250@} +@end example + +@end ifinfo +@noindent +where +@c{$\oplus$} +@math{^^} denotes ``exclusive-or'', defined on +32-bit words. The period of this generator is about @c{$2^{250}$} +@math{2^250} and it +uses 250 words of state per generator. + +For more information see, +@itemize @w{} +@item +S. Kirkpatrick and E. Stoll, ``A very fast shift-register sequence random +number generator'', @cite{Journal of Computational Physics}, 40, 517--526 +(1981) +@end itemize +@end deffn + +@deffn {Generator} gsl_rng_tt800 +@cindex TT800 random number generator +This is an earlier version of the twisted generalized feedback +shift-register generator, and has been superseded by the development of +MT19937. However, it is still an acceptable generator in its own +right. It has a period of +@c{$2^{800}$} +@math{2^800} and uses 33 words of storage +per generator. + +For more information see, +@itemize @w{} +@item +Makoto Matsumoto and Yoshiharu Kurita, ``Twisted GFSR Generators +II'', @cite{ACM Transactions on Modelling and Computer Simulation}, +Vol.@: 4, No.@: 3, 1994, pages 254--266. +@end itemize +@end deffn + +@comment The following generators are included only for historical reasons, so +@comment that you can reproduce results from old programs which might have used +@comment them. These generators should not be used for real simulations since +@comment they have poor statistical properties by modern standards. + +@deffn {Generator} gsl_rng_vax +@cindex VAX random number generator +This is the VAX generator @code{MTH$RANDOM}. Its sequence is, +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n + c) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n + c) mod m +@end example + +@end ifinfo +@noindent +with +@math{a = 69069}, @math{c = 1} and +@c{$m = 2^{32}$} +@math{m = 2^32}. The seed specifies the initial value, +@math{x_1}. The +period of this generator is +@c{$2^{32}$} +@math{2^32} and it uses 1 word of storage per +generator. +@end deffn + +@deffn {Generator} gsl_rng_transputer +This is the random number generator from the INMOS Transputer +Development system. Its sequence is, +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n) mod m +@end example + +@end ifinfo +@noindent +with @math{a = 1664525} and +@c{$m = 2^{32}$} +@math{m = 2^32}. +The seed specifies the initial value, +@c{$x_1$} +@math{x_1}. +@end deffn + +@deffn {Generator} gsl_rng_randu +@cindex RANDU random number generator +This is the IBM @code{RANDU} generator. Its sequence is +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n) mod m +@end example + +@end ifinfo +@noindent +with @math{a = 65539} and +@c{$m = 2^{31}$} +@math{m = 2^31}. The +seed specifies the initial value, +@math{x_1}. The period of this +generator was only +@c{$2^{29}$} +@math{2^29}. It has become a textbook example of a +poor generator. +@end deffn + +@deffn {Generator} gsl_rng_minstd +@cindex RANMAR random number generator +This is Park and Miller's ``minimal standard'' @sc{minstd} generator, a +simple linear congruence which takes care to avoid the major pitfalls of +such algorithms. Its sequence is, +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n) mod m +@end example + +@end ifinfo +@noindent +with @math{a = 16807} and +@c{$m = 2^{31} - 1 = 2147483647$} +@math{m = 2^31 - 1 = 2147483647}. +The seed specifies the initial value, +@c{$x_1$} +@math{x_1}. The period of this +generator is about +@c{$2^{31}$} +@math{2^31}. + +This generator is used in the IMSL Library (subroutine RNUN) and in +MATLAB (the RAND function). It is also sometimes known by the acronym +``GGL'' (I'm not sure what that stands for). + +For more information see, +@itemize @w{} +@item +Park and Miller, ``Random Number Generators: Good ones are hard to find'', +@cite{Communications of the ACM}, October 1988, Volume 31, No 10, pages +1192--1201. +@end itemize +@end deffn + +@deffn {Generator} gsl_rng_uni +@deffnx {Generator} gsl_rng_uni32 +This is a reimplementation of the 16-bit SLATEC random number generator +RUNIF. A generalization of the generator to 32 bits is provided by +@code{gsl_rng_uni32}. The original source code is available from NETLIB. +@end deffn + +@deffn {Generator} gsl_rng_slatec +This is the SLATEC random number generator RAND. It is ancient. The +original source code is available from NETLIB. +@end deffn + + +@deffn {Generator} gsl_rng_zuf +This is the ZUFALL lagged Fibonacci series generator of Peterson. Its +sequence is, +@tex +\beforedisplay +$$ +\eqalign{ +t &= u_{n-273} + u_{n-607} \cr +u_n &= t - \hbox{floor}(t) +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +t = u_@{n-273@} + u_@{n-607@} +u_n = t - floor(t) +@end example +@end ifinfo + +The original source code is available from NETLIB. For more information +see, +@itemize @w{} +@item +W. Petersen, ``Lagged Fibonacci Random Number Generators for the NEC +SX-3'', @cite{International Journal of High Speed Computing} (1994). +@end itemize +@end deffn + +@deffn {Generator} gsl_rng_knuthran2 +This is a second-order multiple recursive generator described by Knuth +in @cite{Seminumerical Algorithms}, 3rd Ed., page 108. Its sequence is, +@tex +\beforedisplay +$$ +x_n = (a_1 x_{n-1} + a_2 x_{n-2}) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_n = (a_1 x_@{n-1@} + a_2 x_@{n-2@}) mod m +@end example + +@end ifinfo +@noindent +with +@math{a_1 = 271828183}, +@math{a_2 = 314159269}, +and +@c{$m = 2^{31}-1$} +@math{m = 2^31 - 1}. +@end deffn + +@deffn {Generator} gsl_rng_knuthran2002 +@deffnx {Generator} gsl_rng_knuthran +This is a second-order multiple recursive generator described by Knuth +in @cite{Seminumerical Algorithms}, 3rd Ed., Section 3.6. Knuth +provides its C code. The updated routine @code{gsl_rng_knuthran2002} +is from the revised 9th printing and corrects some weaknesses in the +earlier version, which is implemented as @code{gsl_rng_knuthran}. +@end deffn + +@deffn {Generator} gsl_rng_borosh13 +@deffnx {Generator} gsl_rng_fishman18 +@deffnx {Generator} gsl_rng_fishman20 +@deffnx {Generator} gsl_rng_lecuyer21 +@deffnx {Generator} gsl_rng_waterman14 +These multiplicative generators are taken from Knuth's +@cite{Seminumerical Algorithms}, 3rd Ed., pages 106--108. Their sequence +is, +@tex +\beforedisplay +$$ +x_{n+1} = (a x_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (a x_n) mod m +@end example + +@end ifinfo +@noindent +where the seed specifies the initial value, @c{$x_1$} +@math{x_1}. +The parameters @math{a} and @math{m} are as follows, +Borosh-Niederreiter: +@math{a = 1812433253}, @c{$m = 2^{32}$} +@math{m = 2^32}, +Fishman18: +@math{a = 62089911}, +@c{$m = 2^{31}-1$} +@math{m = 2^31 - 1}, +Fishman20: +@math{a = 48271}, +@c{$m = 2^{31}-1$} +@math{m = 2^31 - 1}, +L'Ecuyer: +@math{a = 40692}, +@c{$m = 2^{31}-249$} +@math{m = 2^31 - 249}, +Waterman: +@math{a = 1566083941}, +@c{$m = 2^{32}$} +@math{m = 2^32}. +@end deffn + +@deffn {Generator} gsl_rng_fishman2x +This is the L'Ecuyer--Fishman random number generator. It is taken from +Knuth's @cite{Seminumerical Algorithms}, 3rd Ed., page 108. Its sequence +is, +@tex +\beforedisplay +$$ +z_{n+1} = (x_n - y_n) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +z_@{n+1@} = (x_n - y_n) mod m +@end example + +@end ifinfo +@noindent +with @c{$m = 2^{31}-1$} +@math{m = 2^31 - 1}. +@math{x_n} and @math{y_n} are given by the @code{fishman20} +and @code{lecuyer21} algorithms. +The seed specifies the initial value, +@c{$x_1$} +@math{x_1}. + +@end deffn + + +@deffn {Generator} gsl_rng_coveyou +This is the Coveyou random number generator. It is taken from Knuth's +@cite{Seminumerical Algorithms}, 3rd Ed., Section 3.2.2. Its sequence +is, +@tex +\beforedisplay +$$ +x_{n+1} = (x_n (x_n + 1)) \,\hbox{mod}\, m +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{n+1@} = (x_n (x_n + 1)) mod m +@end example + +@end ifinfo +@noindent +with @c{$m = 2^{32}$} +@math{m = 2^32}. +The seed specifies the initial value, +@c{$x_1$} +@math{x_1}. +@end deffn + + + + + +@node Random Number Generator Performance +@section Performance + +@comment +@comment I made the original plot like this +@comment ./benchmark > tmp; cat tmp | perl -n -e '($n,$s) = split(" ",$_); printf("%17s ",$n); print "-" x ($s/1e5), "\n";' +@comment + +The following table shows the relative performance of a selection the +available random number generators. The fastest simulation quality +generators are @code{taus}, @code{gfsr4} and @code{mt19937}. The +generators which offer the best mathematically-proven quality are those +based on the @sc{ranlux} algorithm. + +@comment The large number of generators based on single linear congruences are +@comment represented by the @code{random} generator below. These generators are +@comment fast but have the lowest statistical quality. + +@example +1754 k ints/sec, 870 k doubles/sec, taus +1613 k ints/sec, 855 k doubles/sec, gfsr4 +1370 k ints/sec, 769 k doubles/sec, mt19937 + 565 k ints/sec, 571 k doubles/sec, ranlxs0 + 400 k ints/sec, 405 k doubles/sec, ranlxs1 + 490 k ints/sec, 389 k doubles/sec, mrg + 407 k ints/sec, 297 k doubles/sec, ranlux + 243 k ints/sec, 254 k doubles/sec, ranlxd1 + 251 k ints/sec, 253 k doubles/sec, ranlxs2 + 238 k ints/sec, 215 k doubles/sec, cmrg + 247 k ints/sec, 198 k doubles/sec, ranlux389 + 141 k ints/sec, 140 k doubles/sec, ranlxd2 +@end example + +@node Random Number Generator Examples +@section Examples + +The following program demonstrates the use of a random number generator +to produce uniform random numbers in the range [0.0, 1.0), + +@example +@verbatiminclude examples/rngunif.c +@end example + +@noindent +Here is the output of the program, + +@example +$ ./a.out +@verbatiminclude examples/rngunif.out +@end example + +@noindent +The numbers depend on the seed used by the generator. The default seed +can be changed with the @code{GSL_RNG_SEED} environment variable to +produce a different stream of numbers. The generator itself can be +changed using the environment variable @code{GSL_RNG_TYPE}. Here is the +output of the program using a seed value of 123 and the +multiple-recursive generator @code{mrg}, + +@example +$ GSL_RNG_SEED=123 GSL_RNG_TYPE=mrg ./a.out +@verbatiminclude examples/rngunif.2.out +@end example + +@node Random Number References and Further Reading +@section References and Further Reading + +The subject of random number generation and testing is reviewed +extensively in Knuth's @cite{Seminumerical Algorithms}. + +@itemize @w{} +@item +Donald E. Knuth, @cite{The Art of Computer Programming: Seminumerical +Algorithms} (Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842. +@end itemize + +@noindent +Further information is available in the review paper written by Pierre +L'Ecuyer, + +@itemize @w{} +P. L'Ecuyer, ``Random Number Generation'', Chapter 4 of the +Handbook on Simulation, Jerry Banks Ed., Wiley, 1998, 93--137. + +@uref{http://www.iro.umontreal.ca/~lecuyer/papers.html} +in the file @file{handsim.ps}. +@end itemize + +@noindent +The source code for the @sc{diehard} random number generator tests is also +available online, + +@itemize @w{} +@item +@cite{DIEHARD source code} G. Marsaglia, +@item +@uref{http://stat.fsu.edu/pub/diehard/} +@end itemize + +@noindent +A comprehensive set of random number generator tests is available from +@sc{nist}, + +@itemize @w{} +@item +NIST Special Publication 800-22, ``A Statistical Test Suite for the +Validation of Random Number Generators and Pseudo Random Number +Generators for Cryptographic Applications''. +@item +@uref{http://csrc.nist.gov/rng/} +@end itemize + +@node Random Number Acknowledgements +@section Acknowledgements + +Thanks to Makoto Matsumoto, Takuji Nishimura and Yoshiharu Kurita for +making the source code to their generators (MT19937, MM&TN; TT800, +MM&YK) available under the GNU General Public License. Thanks to Martin +L@"uscher for providing notes and source code for the @sc{ranlxs} and +@sc{ranlxd} generators. + +@comment lcg +@comment [ LCG(n) := n * 69069 mod (2^32) ] +@comment First 6: [69069, 475559465, 2801775573, 1790562961, 3104832285, 4238970681] +@comment %2^31-1 69069, 475559465, 654291926, 1790562961, 957348638, 2091487034 +@comment mrg +@comment [q([x1, x2, x3, x4, x5]) := [107374182 mod 2147483647 * x1 + 104480 mod 2147483647 * x5, x1, x2, x3, x4]] +@comment +@comment cmrg +@comment [q1([x1,x2,x3]) := [63308 mod 2147483647 * x2 -183326 mod 2147483647 * x3, x1, x2], +@comment q2([x1,x2,x3]) := [86098 mod 2145483479 * x1 -539608 mod 2145483479 * x3, x1, x2] ] +@comment initial for q1 is [69069, 475559465, 654291926] +@comment initial for q2 is [1790562961, 959348806, 2093487202] + +@comment tausworthe +@comment [ b1(x) := rsh(xor(lsh(x, 13), x), 19), +@comment q1(x) := xor(lsh(and(x, 4294967294), 12), b1(x)), +@comment b2(x) := rsh(xor(lsh(x, 2), x), 25), +@comment q2(x) := xor(lsh(and(x, 4294967288), 4), b2(x)), +@comment b3(x) := rsh(xor(lsh(x, 3), x), 11), +@comment q3(x) := xor(lsh(and(x, 4294967280), 17), b3(x)) ] +@comment [s1, s2, s3] = [600098857, 1131373026, 1223067536] +@comment [2948905028, 441213979, 394017882] diff --git a/software/gsl-1.15/doc/roots-bisection.eps b/software/gsl-1.15/doc/roots-bisection.eps new file mode 100644 index 000000000..9f8cc7b83 --- /dev/null +++ b/software/gsl-1.15/doc/roots-bisection.eps @@ -0,0 +1,1784 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Mathematica-PSRender +%%BoundingBox: 0 82 432 350 +%%Pages: (atend) +%%EndComments +%%BeginProlog +/setrgbcolor dup where +{ pop pop } +{ { .114 mul exch .587 mul add exch .299 mul add setgray } bind def } +ifelse +/C /curveto load def +/f /fill load def +/F { closepath fill } bind def +/L /lineto load def +/S /stroke load def +/s { closepath stroke } bind def +/d /setdash load def +/g /setgray load def +/m /moveto load def +/r /setrgbcolor load def +/w /setlinewidth load def +/b { gsave gsave F grestore 0 g S grestore newpath } bind def +/dot { newpath 0 360 arc fill } bind def +%%EndProlog +%%Page: 1 1 +gsave +0 82.5055 m +432. 82.5055 L +432. 349.495 L +0 349.495 L +0 82.5055 L +closepath clip newpath +0 g +0.25 w +[ ] 0 d +51.0828 105.864 m +51.0828 106.865 L +S +48.0828 92.8629 m +/F0 /Times-Roman findfont def +F0 10. scalefont setfont +(1) show +87.3821 105.864 m +87.3821 106.865 L +S +84.3821 92.8629 m +(2) show +123.683 105.864 m +123.683 106.865 L +S +120.683 92.8629 m +(3) show +159.984 105.864 m +159.984 106.865 L +S +156.984 92.8629 m +(4) show +196.283 105.864 m +196.283 106.865 L +S +193.283 92.8629 m +(5) show +0.125 w +58.3427 105.864 m +58.3427 106.464 L +S +65.6025 105.864 m +65.6025 106.464 L +S +72.8624 105.864 m +72.8624 106.464 L +S +80.1222 105.864 m +80.1222 106.464 L +S +94.6419 105.864 m +94.6419 106.464 L +S +101.903 105.864 m +101.903 106.464 L +S +109.163 105.864 m +109.163 106.464 L +S +116.423 105.864 m +116.423 106.464 L +S +130.943 105.864 m +130.943 106.464 L +S +138.203 105.864 m +138.203 106.464 L +S +145.462 105.864 m +145.462 106.464 L +S +152.724 105.864 m +152.724 106.464 L +S +167.244 105.864 m +167.244 106.464 L +S +174.503 105.864 m +174.503 106.464 L +S +181.763 105.864 m +181.763 106.464 L +S +189.023 105.864 m +189.023 106.464 L +S +43.8214 105.864 m +43.8214 106.464 L +S +203.544 105.864 m +203.544 106.464 L +S +0.25 w +43.6405 105.864 m +203.725 105.864 L +S +43.6405 108.22 m +44.641 108.22 L +S +26.6394 104.72 m +/F1 /Times-Roman findfont def +F1 10. scalefont setfont +(-) show +33.2644 104.72 m +F0 10. scalefont setfont +(1) show +43.6405 131.777 m +44.641 131.777 L +S +14.6395 128.277 m +F1 10. scalefont setfont +(-) show +21.2645 128.277 m +F0 10. scalefont setfont +(0.5) show +43.6405 155.333 m +44.641 155.333 L +S +33.6395 151.833 m +(0) show +43.6405 178.89 m +44.641 178.89 L +S +21.6395 175.39 m +(0.5) show +43.6405 202.446 m +44.641 202.446 L +S +33.6395 198.946 m +(1) show +0.125 w +43.6405 112.932 m +44.2408 112.932 L +S +43.6405 117.643 m +44.2408 117.643 L +S +43.6405 122.354 m +44.2408 122.354 L +S +43.6405 127.066 m +44.2408 127.066 L +S +43.6405 136.488 m +44.2408 136.488 L +S +43.6405 141.2 m +44.2408 141.2 L +S +43.6405 145.911 m +44.2408 145.911 L +S +43.6405 150.622 m +44.2408 150.622 L +S +43.6405 160.045 m +44.2408 160.045 L +S +43.6405 164.756 m +44.2408 164.756 L +S +43.6405 169.467 m +44.2408 169.467 L +S +43.6405 174.179 m +44.2408 174.179 L +S +43.6405 183.601 m +44.2408 183.601 L +S +43.6405 188.312 m +44.2408 188.312 L +S +43.6405 193.024 m +44.2408 193.024 L +S +43.6405 197.735 m +44.2408 197.735 L +S +0.25 w +43.6405 105.864 m +43.6405 204.801 L +S +51.0828 203.801 m +51.0828 204.801 L +S +87.3821 203.801 m +87.3821 204.801 L +S +123.683 203.801 m +123.683 204.801 L +S +159.984 203.801 m +159.984 204.801 L +S +196.283 203.801 m +196.283 204.801 L +S +0.125 w +58.3427 204.201 m +58.3427 204.801 L +S +65.6025 204.201 m +65.6025 204.801 L +S +72.8624 204.201 m +72.8624 204.801 L +S +80.1222 204.201 m +80.1222 204.801 L +S +94.6419 204.201 m +94.6419 204.801 L +S +101.903 204.201 m +101.903 204.801 L +S +109.163 204.201 m +109.163 204.801 L +S +116.423 204.201 m +116.423 204.801 L +S +130.943 204.201 m +130.943 204.801 L +S +138.203 204.201 m +138.203 204.801 L +S +145.462 204.201 m +145.462 204.801 L +S +152.724 204.201 m +152.724 204.801 L +S +167.244 204.201 m +167.244 204.801 L +S +174.503 204.201 m +174.503 204.801 L +S +181.763 204.201 m +181.763 204.801 L +S +189.023 204.201 m +189.023 204.801 L +S +43.8214 204.201 m +43.8214 204.801 L +S +203.544 204.201 m +203.544 204.801 L +S +0.25 w +43.6405 204.801 m +203.725 204.801 L +S +202.725 108.22 m +203.725 108.22 L +S +202.725 131.777 m +203.725 131.777 L +S +202.725 155.333 m +203.725 155.333 L +S +202.725 178.89 m +203.725 178.89 L +S +202.725 202.446 m +203.725 202.446 L +S +0.125 w +203.125 112.932 m +203.725 112.932 L +S +203.125 117.643 m +203.725 117.643 L +S +203.125 122.354 m +203.725 122.354 L +S +203.125 127.066 m +203.725 127.066 L +S +203.125 136.488 m +203.725 136.488 L +S +203.125 141.2 m +203.725 141.2 L +S +203.125 145.911 m +203.725 145.911 L +S +203.125 150.622 m +203.725 150.622 L +S +203.125 160.045 m +203.725 160.045 L +S +203.125 164.756 m +203.725 164.756 L +S +203.125 169.467 m +203.725 169.467 L +S +203.125 174.179 m +203.725 174.179 L +S +203.125 183.601 m +203.725 183.601 L +S +203.125 188.312 m +203.725 188.312 L +S +203.125 193.024 m +203.725 193.024 L +S +203.125 197.735 m +203.725 197.735 L +S +0.25 w +203.725 105.864 m +203.725 204.801 L +S +43.6405 155.333 m +203.725 155.333 L +S +gsave +43.6405 105.864 m +203.725 105.864 L +203.725 204.801 L +43.6405 204.801 L +43.6405 105.864 L +closepath clip newpath +1.5 w +47.4521 192.238 m +53.6362 196.669 L +56.8555 198.508 L +60.3822 200.133 L +61.967 200.727 L +63.6623 201.267 L +65.2503 201.681 L +66.7167 201.985 L +68.3528 202.233 L +69.214 202.326 L +69.6543 202.363 L +70.1281 202.397 L +70.5411 202.418 L +70.9205 202.432 L +71.1014 202.437 L +71.2999 202.442 L +71.4872 202.445 L +71.6617 202.446 L +71.7674 202.446 L +71.8827 202.446 L +72.0908 202.445 L +72.2941 202.442 L +72.4798 202.438 L +72.6815 202.432 L +72.904 202.424 L +73.3522 202.403 L +73.754 202.378 L +74.1911 202.344 L +74.9851 202.265 L +76.4755 202.056 L +78.214 201.713 L +79.8229 201.3 L +82.8116 200.296 L +86.1094 198.835 L +92.5448 194.961 L +98.7385 190.061 L +105.324 183.745 L +111.667 176.778 L +117.768 169.459 L +124.261 161.237 L +130.512 153.142 L +137.154 144.614 L +143.556 136.733 L +149.713 129.693 L +156.263 123.014 L +162.571 117.574 L +168.636 113.414 L +172.011 111.598 L +175.094 110.27 L +176.62 109.732 L +S +176.62 109.732 m +178.283 109.239 L +179.842 108.862 L +181.31 108.587 L +182.106 108.469 L +182.965 108.368 L +183.346 108.331 L +183.747 108.299 L +184.123 108.273 L +184.465 108.254 L +184.866 108.236 L +185.087 108.23 L +185.295 108.225 L +185.487 108.222 L +185.664 108.22 L +185.86 108.22 L +186.068 108.22 L +186.276 108.224 L +186.393 108.225 L +186.499 108.227 L +186.695 108.233 L +186.904 108.24 L +187.344 108.26 L +187.824 108.289 L +188.674 108.363 L +189.474 108.456 L +190.97 108.69 L +192.582 109.029 L +194.327 109.5 L +197.042 110.444 L +199.914 111.715 L +S +0.5 g +0.5 w +123.683 155.333 m +123.683 161.982 L +S +159.984 155.333 m +159.984 119.678 L +S +141.833 155.333 m +141.833 138.806 L +S +0 g +123.683 161.982 2. dot +159.984 119.678 2. dot +126.683 163.482 m +(a) show +132.683 161.982 m +F0 7.125 scalefont setfont +(2) show +162.984 121.178 m +F0 10. scalefont setfont +(b) show +168.984 119.678 m +F0 7.125 scalefont setfont +(2) show +grestore +0 g +0.25 w +[ ] 0 d +266.593 105.864 m +266.593 106.865 L +S +263.593 92.8629 m +F0 10. scalefont setfont +(1) show +302.892 105.864 m +302.892 106.865 L +S +299.892 92.8629 m +(2) show +339.193 105.864 m +339.193 106.865 L +S +336.193 92.8629 m +(3) show +375.494 105.864 m +375.494 106.865 L +S +372.494 92.8629 m +(4) show +411.793 105.864 m +411.793 106.865 L +S +408.793 92.8629 m +(5) show +0.125 w +273.853 105.864 m +273.853 106.464 L +S +281.113 105.864 m +281.113 106.464 L +S +288.373 105.864 m +288.373 106.464 L +S +295.632 105.864 m +295.632 106.464 L +S +310.152 105.864 m +310.152 106.464 L +S +317.414 105.864 m +317.414 106.464 L +S +324.673 105.864 m +324.673 106.464 L +S +331.933 105.864 m +331.933 106.464 L +S +346.453 105.864 m +346.453 106.464 L +S +353.713 105.864 m +353.713 106.464 L +S +360.973 105.864 m +360.973 106.464 L +S +368.234 105.864 m +368.234 106.464 L +S +382.754 105.864 m +382.754 106.464 L +S +390.014 105.864 m +390.014 106.464 L +S +397.273 105.864 m +397.273 106.464 L +S +404.533 105.864 m +404.533 106.464 L +S +259.332 105.864 m +259.332 106.464 L +S +419.055 105.864 m +419.055 106.464 L +S +0.25 w +259.151 105.864 m +419.235 105.864 L +S +259.151 108.22 m +260.151 108.22 L +S +242.15 104.72 m +F1 10. scalefont setfont +(-) show +248.775 104.72 m +F0 10. scalefont setfont +(1) show +259.151 131.777 m +260.151 131.777 L +S +230.15 128.277 m +F1 10. scalefont setfont +(-) show +236.775 128.277 m +F0 10. scalefont setfont +(0.5) show +259.151 155.333 m +260.151 155.333 L +S +249.15 151.833 m +(0) show +259.151 178.89 m +260.151 178.89 L +S +237.15 175.39 m +(0.5) show +259.151 202.446 m +260.151 202.446 L +S +249.15 198.946 m +(1) show +0.125 w +259.151 112.932 m +259.751 112.932 L +S +259.151 117.643 m +259.751 117.643 L +S +259.151 122.354 m +259.751 122.354 L +S +259.151 127.066 m +259.751 127.066 L +S +259.151 136.488 m +259.751 136.488 L +S +259.151 141.2 m +259.751 141.2 L +S +259.151 145.911 m +259.751 145.911 L +S +259.151 150.622 m +259.751 150.622 L +S +259.151 160.045 m +259.751 160.045 L +S +259.151 164.756 m +259.751 164.756 L +S +259.151 169.467 m +259.751 169.467 L +S +259.151 174.179 m +259.751 174.179 L +S +259.151 183.601 m +259.751 183.601 L +S +259.151 188.312 m +259.751 188.312 L +S +259.151 193.024 m +259.751 193.024 L +S +259.151 197.735 m +259.751 197.735 L +S +0.25 w +259.151 105.864 m +259.151 204.801 L +S +266.593 203.801 m +266.593 204.801 L +S +302.892 203.801 m +302.892 204.801 L +S +339.193 203.801 m +339.193 204.801 L +S +375.494 203.801 m +375.494 204.801 L +S +411.793 203.801 m +411.793 204.801 L +S +0.125 w +273.853 204.201 m +273.853 204.801 L +S +281.113 204.201 m +281.113 204.801 L +S +288.373 204.201 m +288.373 204.801 L +S +295.632 204.201 m +295.632 204.801 L +S +310.152 204.201 m +310.152 204.801 L +S +317.414 204.201 m +317.414 204.801 L +S +324.673 204.201 m +324.673 204.801 L +S +331.933 204.201 m +331.933 204.801 L +S +346.453 204.201 m +346.453 204.801 L +S +353.713 204.201 m +353.713 204.801 L +S +360.973 204.201 m +360.973 204.801 L +S +368.234 204.201 m +368.234 204.801 L +S +382.754 204.201 m +382.754 204.801 L +S +390.014 204.201 m +390.014 204.801 L +S +397.273 204.201 m +397.273 204.801 L +S +404.533 204.201 m +404.533 204.801 L +S +259.332 204.201 m +259.332 204.801 L +S +419.055 204.201 m +419.055 204.801 L +S +0.25 w +259.151 204.801 m +419.235 204.801 L +S +418.235 108.22 m +419.235 108.22 L +S +418.235 131.777 m +419.235 131.777 L +S +418.235 155.333 m +419.235 155.333 L +S +418.235 178.89 m +419.235 178.89 L +S +418.235 202.446 m +419.235 202.446 L +S +0.125 w +418.635 112.932 m +419.235 112.932 L +S +418.635 117.643 m +419.235 117.643 L +S +418.635 122.354 m +419.235 122.354 L +S +418.635 127.066 m +419.235 127.066 L +S +418.635 136.488 m +419.235 136.488 L +S +418.635 141.2 m +419.235 141.2 L +S +418.635 145.911 m +419.235 145.911 L +S +418.635 150.622 m +419.235 150.622 L +S +418.635 160.045 m +419.235 160.045 L +S +418.635 164.756 m +419.235 164.756 L +S +418.635 169.467 m +419.235 169.467 L +S +418.635 174.179 m +419.235 174.179 L +S +418.635 183.601 m +419.235 183.601 L +S +418.635 188.312 m +419.235 188.312 L +S +418.635 193.024 m +419.235 193.024 L +S +418.635 197.735 m +419.235 197.735 L +S +0.25 w +419.235 105.864 m +419.235 204.801 L +S +259.151 155.333 m +419.235 155.333 L +S +gsave +259.151 105.864 m +419.235 105.864 L +419.235 204.801 L +259.151 204.801 L +259.151 105.864 L +closepath clip newpath +1.5 w +262.962 192.238 m +269.146 196.669 L +272.366 198.508 L +275.892 200.133 L +277.477 200.727 L +279.172 201.267 L +280.761 201.681 L +282.227 201.985 L +283.863 202.233 L +284.724 202.326 L +285.164 202.363 L +285.638 202.397 L +286.051 202.418 L +286.431 202.432 L +286.612 202.437 L +286.81 202.442 L +286.997 202.445 L +287.172 202.446 L +287.278 202.446 L +287.393 202.446 L +287.601 202.445 L +287.804 202.442 L +287.99 202.438 L +288.192 202.432 L +288.414 202.424 L +288.862 202.403 L +289.264 202.378 L +289.701 202.344 L +290.495 202.265 L +291.986 202.056 L +293.724 201.713 L +295.333 201.3 L +298.322 200.296 L +301.62 198.835 L +308.055 194.961 L +314.249 190.061 L +320.835 183.745 L +327.177 176.778 L +333.278 169.459 L +339.771 161.237 L +346.022 153.142 L +352.664 144.614 L +359.066 136.733 L +365.223 129.693 L +371.773 123.014 L +378.081 117.574 L +384.146 113.414 L +387.521 111.598 L +390.604 110.27 L +392.13 109.732 L +S +392.13 109.732 m +393.793 109.239 L +395.352 108.862 L +396.82 108.587 L +397.616 108.469 L +398.476 108.368 L +398.857 108.331 L +399.257 108.299 L +399.633 108.273 L +399.976 108.254 L +400.376 108.236 L +400.597 108.23 L +400.805 108.225 L +400.997 108.222 L +401.175 108.22 L +401.37 108.22 L +401.578 108.22 L +401.786 108.224 L +401.903 108.225 L +402.009 108.227 L +402.206 108.233 L +402.414 108.24 L +402.854 108.26 L +403.334 108.289 L +404.184 108.363 L +404.985 108.456 L +406.48 108.69 L +408.092 109.029 L +409.837 109.5 L +412.552 110.444 L +415.424 111.715 L +S +0.5 g +0.5 w +339.193 155.333 m +339.193 161.982 L +S +357.343 155.333 m +357.343 138.806 L +S +348.268 155.333 m +348.268 150.236 L +S +0 g +339.193 161.982 2. dot +357.343 138.806 2. dot +342.193 163.482 m +(a) show +348.193 161.982 m +F0 7.125 scalefont setfont +(3) show +360.343 140.306 m +F0 10. scalefont setfont +(b) show +366.343 138.806 m +F0 7.125 scalefont setfont +(3) show +grestore +0 g +0.25 w +[ ] 0 d +51.0828 239.056 m +51.0828 240.057 L +S +48.0828 226.055 m +F0 10. scalefont setfont +(1) show +87.382 239.056 m +87.382 240.057 L +S +84.382 226.055 m +(2) show +123.683 239.056 m +123.683 240.057 L +S +120.683 226.055 m +(3) show +159.984 239.056 m +159.984 240.057 L +S +156.984 226.055 m +(4) show +196.283 239.056 m +196.283 240.057 L +S +193.283 226.055 m +(5) show +0.125 w +58.3426 239.056 m +58.3426 239.657 L +S +65.6025 239.056 m +65.6025 239.657 L +S +72.8623 239.056 m +72.8623 239.657 L +S +80.1222 239.056 m +80.1222 239.657 L +S +94.6419 239.056 m +94.6419 239.657 L +S +101.903 239.056 m +101.903 239.657 L +S +109.163 239.056 m +109.163 239.657 L +S +116.423 239.056 m +116.423 239.657 L +S +130.943 239.056 m +130.943 239.657 L +S +138.203 239.056 m +138.203 239.657 L +S +145.462 239.056 m +145.462 239.657 L +S +152.724 239.056 m +152.724 239.657 L +S +167.244 239.056 m +167.244 239.657 L +S +174.503 239.056 m +174.503 239.657 L +S +181.763 239.056 m +181.763 239.657 L +S +189.023 239.056 m +189.023 239.657 L +S +43.8213 239.056 m +43.8213 239.657 L +S +203.544 239.056 m +203.544 239.657 L +S +0.25 w +43.6404 239.056 m +203.725 239.056 L +S +43.6404 241.413 m +44.641 241.413 L +S +26.6394 237.913 m +F1 10. scalefont setfont +(-) show +33.2644 237.913 m +F0 10. scalefont setfont +(1) show +43.6404 264.969 m +44.641 264.969 L +S +14.6394 261.469 m +F1 10. scalefont setfont +(-) show +21.2644 261.469 m +F0 10. scalefont setfont +(0.5) show +43.6404 288.526 m +44.641 288.526 L +S +33.6394 285.026 m +(0) show +43.6404 312.082 m +44.641 312.082 L +S +21.6394 308.582 m +(0.5) show +43.6404 335.639 m +44.641 335.639 L +S +33.6394 332.139 m +(1) show +0.125 w +43.6404 246.124 m +44.2408 246.124 L +S +43.6404 250.835 m +44.2408 250.835 L +S +43.6404 255.547 m +44.2408 255.547 L +S +43.6404 260.258 m +44.2408 260.258 L +S +43.6404 269.681 m +44.2408 269.681 L +S +43.6404 274.392 m +44.2408 274.392 L +S +43.6404 279.103 m +44.2408 279.103 L +S +43.6404 283.815 m +44.2408 283.815 L +S +43.6404 293.237 m +44.2408 293.237 L +S +43.6404 297.948 m +44.2408 297.948 L +S +43.6404 302.66 m +44.2408 302.66 L +S +43.6404 307.371 m +44.2408 307.371 L +S +43.6404 316.794 m +44.2408 316.794 L +S +43.6404 321.505 m +44.2408 321.505 L +S +43.6404 326.216 m +44.2408 326.216 L +S +43.6404 330.928 m +44.2408 330.928 L +S +0.25 w +43.6404 239.056 m +43.6404 337.994 L +S +51.0828 336.993 m +51.0828 337.994 L +S +87.382 336.993 m +87.382 337.994 L +S +123.683 336.993 m +123.683 337.994 L +S +159.984 336.993 m +159.984 337.994 L +S +196.283 336.993 m +196.283 337.994 L +S +0.125 w +58.3426 337.393 m +58.3426 337.994 L +S +65.6025 337.393 m +65.6025 337.994 L +S +72.8623 337.393 m +72.8623 337.994 L +S +80.1222 337.393 m +80.1222 337.994 L +S +94.6419 337.393 m +94.6419 337.994 L +S +101.903 337.393 m +101.903 337.994 L +S +109.163 337.393 m +109.163 337.994 L +S +116.423 337.393 m +116.423 337.994 L +S +130.943 337.393 m +130.943 337.994 L +S +138.203 337.393 m +138.203 337.994 L +S +145.462 337.393 m +145.462 337.994 L +S +152.724 337.393 m +152.724 337.994 L +S +167.244 337.393 m +167.244 337.994 L +S +174.503 337.393 m +174.503 337.994 L +S +181.763 337.393 m +181.763 337.994 L +S +189.023 337.393 m +189.023 337.994 L +S +43.8213 337.393 m +43.8213 337.994 L +S +203.544 337.393 m +203.544 337.994 L +S +0.25 w +43.6404 337.994 m +203.725 337.994 L +S +202.725 241.413 m +203.725 241.413 L +S +202.725 264.969 m +203.725 264.969 L +S +202.725 288.526 m +203.725 288.526 L +S +202.725 312.082 m +203.725 312.082 L +S +202.725 335.639 m +203.725 335.639 L +S +0.125 w +203.125 246.124 m +203.725 246.124 L +S +203.125 250.835 m +203.725 250.835 L +S +203.125 255.547 m +203.725 255.547 L +S +203.125 260.258 m +203.725 260.258 L +S +203.125 269.681 m +203.725 269.681 L +S +203.125 274.392 m +203.725 274.392 L +S +203.125 279.103 m +203.725 279.103 L +S +203.125 283.815 m +203.725 283.815 L +S +203.125 293.237 m +203.725 293.237 L +S +203.125 297.948 m +203.725 297.948 L +S +203.125 302.66 m +203.725 302.66 L +S +203.125 307.371 m +203.725 307.371 L +S +203.125 316.794 m +203.725 316.794 L +S +203.125 321.505 m +203.725 321.505 L +S +203.125 326.216 m +203.725 326.216 L +S +203.125 330.928 m +203.725 330.928 L +S +0.25 w +203.725 239.056 m +203.725 337.994 L +S +43.6404 288.526 m +203.725 288.526 L +S +gsave +43.6404 239.056 m +203.725 239.056 L +203.725 337.994 L +43.6404 337.994 L +43.6404 239.056 L +closepath clip newpath +1.5 w +47.4521 325.43 m +53.6361 329.861 L +56.8555 331.701 L +60.3821 333.326 L +61.967 333.92 L +63.6623 334.459 L +65.2503 334.874 L +66.7167 335.178 L +68.3527 335.426 L +69.214 335.519 L +69.6542 335.556 L +70.1281 335.589 L +70.5411 335.61 L +70.9205 335.624 L +71.1014 335.629 L +71.2999 335.634 L +71.4872 335.637 L +71.6617 335.639 L +71.7674 335.639 L +71.8826 335.639 L +72.0907 335.637 L +72.294 335.634 L +72.4797 335.631 L +72.6814 335.624 L +72.904 335.616 L +73.3522 335.596 L +73.754 335.57 L +74.191 335.536 L +74.9851 335.458 L +76.4754 335.248 L +78.214 334.906 L +79.8228 334.493 L +82.8116 333.489 L +86.1094 332.027 L +92.5448 328.153 L +98.7384 323.253 L +105.324 316.938 L +111.667 309.971 L +117.768 302.652 L +124.261 294.43 L +130.512 286.334 L +137.154 277.807 L +143.556 269.926 L +149.713 262.885 L +156.263 256.206 L +162.571 250.767 L +168.636 246.606 L +172.011 244.791 L +175.094 243.462 L +176.62 242.924 L +S +176.62 242.924 m +178.283 242.431 L +179.842 242.055 L +181.31 241.779 L +182.106 241.661 L +182.965 241.56 L +183.346 241.523 L +183.747 241.491 L +184.123 241.466 L +184.465 241.447 L +184.866 241.429 L +185.087 241.423 L +185.295 241.418 L +185.487 241.415 L +185.665 241.413 L +185.86 241.413 L +186.068 241.413 L +186.276 241.416 L +186.393 241.418 L +186.499 241.419 L +186.695 241.426 L +186.904 241.432 L +187.344 241.453 L +187.824 241.482 L +188.674 241.555 L +189.475 241.648 L +190.97 241.882 L +192.582 242.221 L +194.327 242.692 L +197.042 243.636 L +199.914 244.908 L +S +0.5 g +0.5 w +51.0828 288.526 m +51.0828 328.169 L +S +196.283 288.526 m +196.283 243.347 L +S +123.683 288.526 m +123.683 295.174 L +S +0 g +196.283 243.347 2. dot +51.0828 328.169 2. dot +53.0828 319.669 m +(a) show +59.0828 318.169 m +F0 7.125 scalefont setfont +(0) show +184.283 245.847 m +F0 10. scalefont setfont +(b) show +190.283 244.347 m +F0 7.125 scalefont setfont +(0) show +grestore +0 g +0.25 w +[ ] 0 d +266.593 239.056 m +266.593 240.057 L +S +263.593 226.055 m +F0 10. scalefont setfont +(1) show +302.892 239.056 m +302.892 240.057 L +S +299.892 226.055 m +(2) show +339.193 239.056 m +339.193 240.057 L +S +336.193 226.055 m +(3) show +375.494 239.056 m +375.494 240.057 L +S +372.494 226.055 m +(4) show +411.793 239.056 m +411.793 240.057 L +S +408.793 226.055 m +(5) show +0.125 w +273.853 239.056 m +273.853 239.657 L +S +281.113 239.056 m +281.113 239.657 L +S +288.373 239.056 m +288.373 239.657 L +S +295.632 239.056 m +295.632 239.657 L +S +310.152 239.056 m +310.152 239.657 L +S +317.414 239.056 m +317.414 239.657 L +S +324.673 239.056 m +324.673 239.657 L +S +331.933 239.056 m +331.933 239.657 L +S +346.453 239.056 m +346.453 239.657 L +S +353.713 239.056 m +353.713 239.657 L +S +360.973 239.056 m +360.973 239.657 L +S +368.234 239.056 m +368.234 239.657 L +S +382.754 239.056 m +382.754 239.657 L +S +390.014 239.056 m +390.014 239.657 L +S +397.273 239.056 m +397.273 239.657 L +S +404.533 239.056 m +404.533 239.657 L +S +259.332 239.056 m +259.332 239.657 L +S +419.055 239.056 m +419.055 239.657 L +S +0.25 w +259.151 239.056 m +419.236 239.056 L +S +259.151 241.413 m +260.151 241.413 L +S +242.15 237.913 m +F1 10. scalefont setfont +(-) show +248.775 237.913 m +F0 10. scalefont setfont +(1) show +259.151 264.969 m +260.151 264.969 L +S +230.15 261.469 m +F1 10. scalefont setfont +(-) show +236.775 261.469 m +F0 10. scalefont setfont +(0.5) show +259.151 288.526 m +260.151 288.526 L +S +249.15 285.026 m +(0) show +259.151 312.082 m +260.151 312.082 L +S +237.15 308.582 m +(0.5) show +259.151 335.639 m +260.151 335.639 L +S +249.15 332.139 m +(1) show +0.125 w +259.151 246.124 m +259.751 246.124 L +S +259.151 250.835 m +259.751 250.835 L +S +259.151 255.547 m +259.751 255.547 L +S +259.151 260.258 m +259.751 260.258 L +S +259.151 269.681 m +259.751 269.681 L +S +259.151 274.392 m +259.751 274.392 L +S +259.151 279.103 m +259.751 279.103 L +S +259.151 283.815 m +259.751 283.815 L +S +259.151 293.237 m +259.751 293.237 L +S +259.151 297.948 m +259.751 297.948 L +S +259.151 302.66 m +259.751 302.66 L +S +259.151 307.371 m +259.751 307.371 L +S +259.151 316.794 m +259.751 316.794 L +S +259.151 321.505 m +259.751 321.505 L +S +259.151 326.216 m +259.751 326.216 L +S +259.151 330.928 m +259.751 330.928 L +S +0.25 w +259.151 239.056 m +259.151 337.994 L +S +266.593 336.993 m +266.593 337.994 L +S +302.892 336.993 m +302.892 337.994 L +S +339.193 336.993 m +339.193 337.994 L +S +375.494 336.993 m +375.494 337.994 L +S +411.793 336.993 m +411.793 337.994 L +S +0.125 w +273.853 337.393 m +273.853 337.994 L +S +281.113 337.393 m +281.113 337.994 L +S +288.373 337.393 m +288.373 337.994 L +S +295.632 337.393 m +295.632 337.994 L +S +310.152 337.393 m +310.152 337.994 L +S +317.414 337.393 m +317.414 337.994 L +S +324.673 337.393 m +324.673 337.994 L +S +331.933 337.393 m +331.933 337.994 L +S +346.453 337.393 m +346.453 337.994 L +S +353.713 337.393 m +353.713 337.994 L +S +360.973 337.393 m +360.973 337.994 L +S +368.234 337.393 m +368.234 337.994 L +S +382.754 337.393 m +382.754 337.994 L +S +390.014 337.393 m +390.014 337.994 L +S +397.273 337.393 m +397.273 337.994 L +S +404.533 337.393 m +404.533 337.994 L +S +259.332 337.393 m +259.332 337.994 L +S +419.055 337.393 m +419.055 337.994 L +S +0.25 w +259.151 337.994 m +419.236 337.994 L +S +418.235 241.413 m +419.236 241.413 L +S +418.235 264.969 m +419.236 264.969 L +S +418.235 288.526 m +419.236 288.526 L +S +418.235 312.082 m +419.236 312.082 L +S +418.235 335.639 m +419.236 335.639 L +S +0.125 w +418.635 246.124 m +419.236 246.124 L +S +418.635 250.835 m +419.236 250.835 L +S +418.635 255.547 m +419.236 255.547 L +S +418.635 260.258 m +419.236 260.258 L +S +418.635 269.681 m +419.236 269.681 L +S +418.635 274.392 m +419.236 274.392 L +S +418.635 279.103 m +419.236 279.103 L +S +418.635 283.815 m +419.236 283.815 L +S +418.635 293.237 m +419.236 293.237 L +S +418.635 297.948 m +419.236 297.948 L +S +418.635 302.66 m +419.236 302.66 L +S +418.635 307.371 m +419.236 307.371 L +S +418.635 316.794 m +419.236 316.794 L +S +418.635 321.505 m +419.236 321.505 L +S +418.635 326.216 m +419.236 326.216 L +S +418.635 330.928 m +419.236 330.928 L +S +0.25 w +419.236 239.056 m +419.236 337.994 L +S +259.151 288.526 m +419.236 288.526 L +S +gsave +259.151 239.056 m +419.236 239.056 L +419.236 337.994 L +259.151 337.994 L +259.151 239.056 L +closepath clip newpath +1.5 w +262.962 325.43 m +269.146 329.861 L +272.366 331.701 L +275.892 333.326 L +277.477 333.92 L +279.172 334.459 L +280.761 334.874 L +282.227 335.178 L +283.863 335.426 L +284.724 335.519 L +285.164 335.556 L +285.638 335.589 L +286.051 335.61 L +286.431 335.624 L +286.612 335.629 L +286.81 335.634 L +286.997 335.637 L +287.172 335.639 L +287.278 335.639 L +287.393 335.639 L +287.601 335.637 L +287.804 335.634 L +287.99 335.631 L +288.192 335.624 L +288.414 335.616 L +288.862 335.596 L +289.264 335.57 L +289.701 335.536 L +290.495 335.458 L +291.986 335.248 L +293.724 334.906 L +295.333 334.493 L +298.322 333.489 L +301.62 332.027 L +308.055 328.153 L +314.249 323.253 L +320.835 316.938 L +327.177 309.971 L +333.278 302.652 L +339.771 294.43 L +346.022 286.334 L +352.664 277.807 L +359.066 269.926 L +365.223 262.885 L +371.774 256.206 L +378.081 250.767 L +384.147 246.606 L +387.521 244.791 L +390.604 243.462 L +392.13 242.924 L +S +392.13 242.924 m +393.793 242.431 L +395.352 242.055 L +396.82 241.779 L +397.616 241.661 L +398.476 241.56 L +398.857 241.523 L +399.257 241.491 L +399.633 241.466 L +399.976 241.447 L +400.376 241.429 L +400.597 241.423 L +400.805 241.418 L +400.997 241.415 L +401.175 241.413 L +401.37 241.413 L +401.578 241.413 L +401.786 241.416 L +401.903 241.418 L +402.009 241.419 L +402.206 241.426 L +402.414 241.432 L +402.854 241.453 L +403.334 241.482 L +404.184 241.555 L +404.985 241.648 L +406.48 241.882 L +408.092 242.221 L +409.837 242.692 L +412.552 243.636 L +415.424 244.908 L +S +0.5 g +0.5 w +411.793 288.526 m +411.793 243.347 L +S +339.193 288.526 m +339.193 295.174 L +S +375.494 288.526 m +375.494 252.87 L +S +0 g +339.193 295.174 2. dot +411.793 243.347 2. dot +342.193 296.674 m +(a) show +348.193 295.174 m +F0 7.125 scalefont setfont +(1) show +399.793 245.847 m +F0 10. scalefont setfont +(b) show +405.793 244.347 m +F0 7.125 scalefont setfont +(1) show +grestore +grestore +showpage +%%PageTrailer +%%Trailer +%%Pages: 1 +%%EOF diff --git a/software/gsl-1.15/doc/roots-false-position.eps b/software/gsl-1.15/doc/roots-false-position.eps new file mode 100644 index 000000000..4f6b47a5c --- /dev/null +++ b/software/gsl-1.15/doc/roots-false-position.eps @@ -0,0 +1,633 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Mathematica-PSRender +%%BoundingBox: 0 79 432 353 +%%Pages: (atend) +%%EndComments +%%BeginProlog +/setrgbcolor dup where +{ pop pop } +{ { .114 mul exch .587 mul add exch .299 mul add setgray } bind def } +ifelse +/C /curveto load def +/f /fill load def +/F { closepath fill } bind def +/L /lineto load def +/S /stroke load def +/s { closepath stroke } bind def +/d /setdash load def +/g /setgray load def +/m /moveto load def +/r /setrgbcolor load def +/w /setlinewidth load def +/b { gsave gsave F grestore 0 g S grestore newpath } bind def +/dot { newpath 0 360 arc fill } bind def +%%EndProlog +%%Page: 1 1 +0 g +0.25 w +[ ] 0 d +31.8389 99.7849 m +31.8389 102.339 L +S +25.3389 83.6772 m +/F1 /Times-Roman findfont def +F1 10. scalefont setfont +(-) show +31.9639 83.6772 m +/F0 /Times-Roman findfont def +F0 10. scalefont setfont +(2) show +87.4313 99.7849 m +87.4313 102.339 L +S +74.9313 83.6772 m +F1 10. scalefont setfont +(-) show +81.5563 83.6772 m +F0 10. scalefont setfont +(1.5) show +143.028 99.7849 m +143.028 102.339 L +S +136.528 83.6772 m +F1 10. scalefont setfont +(-) show +143.153 83.6772 m +F0 10. scalefont setfont +(1) show +198.62 99.7849 m +198.62 102.339 L +S +186.12 83.6772 m +F1 10. scalefont setfont +(-) show +192.745 83.6772 m +F0 10. scalefont setfont +(0.5) show +254.217 99.7849 m +254.217 102.339 L +S +251.217 83.6772 m +(0) show +309.809 99.7849 m +309.809 102.339 L +S +300.809 83.6772 m +(0.5) show +365.406 99.7849 m +365.406 102.339 L +S +362.406 83.6772 m +(1) show +420.998 99.7849 m +420.998 102.339 L +S +411.998 83.6772 m +(1.5) show +0.125 w +42.9574 99.7849 m +42.9574 101.317 L +S +54.0759 99.7849 m +54.0759 101.317 L +S +65.1944 99.7849 m +65.1944 101.317 L +S +76.3128 99.7849 m +76.3128 101.317 L +S +98.5498 99.7849 m +98.5498 101.317 L +S +109.672 99.7849 m +109.672 101.317 L +S +120.791 99.7849 m +120.791 101.317 L +S +131.909 99.7849 m +131.909 101.317 L +S +154.146 99.7849 m +154.146 101.317 L +S +165.265 99.7849 m +165.265 101.317 L +S +176.383 99.7849 m +176.383 101.317 L +S +187.502 99.7849 m +187.502 101.317 L +S +209.739 99.7849 m +209.739 101.317 L +S +220.857 99.7849 m +220.857 101.317 L +S +231.98 99.7849 m +231.98 101.317 L +S +243.098 99.7849 m +243.098 101.317 L +S +265.335 99.7849 m +265.335 101.317 L +S +276.454 99.7849 m +276.454 101.317 L +S +287.572 99.7849 m +287.572 101.317 L +S +298.691 99.7849 m +298.691 101.317 L +S +320.928 99.7849 m +320.928 101.317 L +S +332.046 99.7849 m +332.046 101.317 L +S +343.165 99.7849 m +343.165 101.317 L +S +354.287 99.7849 m +354.287 101.317 L +S +376.524 99.7849 m +376.524 101.317 L +S +387.643 99.7849 m +387.643 101.317 L +S +398.761 99.7849 m +398.761 101.317 L +S +409.879 99.7849 m +409.879 101.317 L +S +0.25 w +22.1097 99.7849 m +430.727 99.7849 L +S +22.1097 141.039 m +24.6636 141.039 L +S +2.00202 137.539 m +F1 10. scalefont setfont +(-) show +8.62702 137.539 m +F0 10. scalefont setfont +(4) show +22.1097 183.327 m +24.6636 183.327 L +S +2.00202 179.827 m +F1 10. scalefont setfont +(-) show +8.62702 179.827 m +F0 10. scalefont setfont +(2) show +22.1097 225.615 m +24.6636 225.615 L +S +9.00202 222.115 m +(0) show +22.1097 267.902 m +24.6636 267.902 L +S +9.00202 264.402 m +(2) show +22.1097 310.19 m +24.6636 310.19 L +S +9.00202 306.69 m +(4) show +0.125 w +22.1097 109.322 m +23.6421 109.322 L +S +22.1097 119.893 m +23.6421 119.893 L +S +22.1097 130.464 m +23.6421 130.464 L +S +22.1097 151.61 m +23.6421 151.61 L +S +22.1097 162.181 m +23.6421 162.181 L +S +22.1097 172.756 m +23.6421 172.756 L +S +22.1097 193.898 m +23.6421 193.898 L +S +22.1097 204.469 m +23.6421 204.469 L +S +22.1097 215.044 m +23.6421 215.044 L +S +22.1097 236.186 m +23.6421 236.186 L +S +22.1097 246.756 m +23.6421 246.756 L +S +22.1097 257.331 m +23.6421 257.331 L +S +22.1097 278.473 m +23.6421 278.473 L +S +22.1097 289.048 m +23.6421 289.048 L +S +22.1097 299.619 m +23.6421 299.619 L +S +22.1097 320.761 m +23.6421 320.761 L +S +22.1097 331.336 m +23.6421 331.336 L +S +22.1097 341.907 m +23.6421 341.907 L +S +0.25 w +22.1097 99.7849 m +22.1097 352.323 L +S +31.8389 349.769 m +31.8389 352.323 L +S +87.4313 349.769 m +87.4313 352.323 L +S +143.028 349.769 m +143.028 352.323 L +S +198.62 349.769 m +198.62 352.323 L +S +254.217 349.769 m +254.217 352.323 L +S +309.809 349.769 m +309.809 352.323 L +S +365.406 349.769 m +365.406 352.323 L +S +420.998 349.769 m +420.998 352.323 L +S +0.125 w +42.9574 350.79 m +42.9574 352.323 L +S +54.0759 350.79 m +54.0759 352.323 L +S +65.1944 350.79 m +65.1944 352.323 L +S +76.3128 350.79 m +76.3128 352.323 L +S +98.5498 350.79 m +98.5498 352.323 L +S +109.672 350.79 m +109.672 352.323 L +S +120.791 350.79 m +120.791 352.323 L +S +131.909 350.79 m +131.909 352.323 L +S +154.146 350.79 m +154.146 352.323 L +S +165.265 350.79 m +165.265 352.323 L +S +176.383 350.79 m +176.383 352.323 L +S +187.502 350.79 m +187.502 352.323 L +S +209.739 350.79 m +209.739 352.323 L +S +220.857 350.79 m +220.857 352.323 L +S +231.98 350.79 m +231.98 352.323 L +S +243.098 350.79 m +243.098 352.323 L +S +265.335 350.79 m +265.335 352.323 L +S +276.454 350.79 m +276.454 352.323 L +S +287.572 350.79 m +287.572 352.323 L +S +298.691 350.79 m +298.691 352.323 L +S +320.928 350.79 m +320.928 352.323 L +S +332.046 350.79 m +332.046 352.323 L +S +343.165 350.79 m +343.165 352.323 L +S +354.287 350.79 m +354.287 352.323 L +S +376.524 350.79 m +376.524 352.323 L +S +387.643 350.79 m +387.643 352.323 L +S +398.761 350.79 m +398.761 352.323 L +S +409.879 350.79 m +409.879 352.323 L +S +0.25 w +22.1097 352.323 m +430.727 352.323 L +S +428.173 141.039 m +430.727 141.039 L +S +428.173 183.327 m +430.727 183.327 L +S +428.173 225.615 m +430.727 225.615 L +S +428.173 267.902 m +430.727 267.902 L +S +428.173 310.19 m +430.727 310.19 L +S +0.125 w +429.195 109.322 m +430.727 109.322 L +S +429.195 119.893 m +430.727 119.893 L +S +429.195 130.464 m +430.727 130.464 L +S +429.195 151.61 m +430.727 151.61 L +S +429.195 162.181 m +430.727 162.181 L +S +429.195 172.756 m +430.727 172.756 L +S +429.195 193.898 m +430.727 193.898 L +S +429.195 204.469 m +430.727 204.469 L +S +429.195 215.044 m +430.727 215.044 L +S +429.195 236.186 m +430.727 236.186 L +S +429.195 246.756 m +430.727 246.756 L +S +429.195 257.331 m +430.727 257.331 L +S +429.195 278.473 m +430.727 278.473 L +S +429.195 289.048 m +430.727 289.048 L +S +429.195 299.619 m +430.727 299.619 L +S +429.195 320.761 m +430.727 320.761 L +S +429.195 331.336 m +430.727 331.336 L +S +429.195 341.907 m +430.727 341.907 L +S +0.25 w +430.727 99.7849 m +430.727 352.323 L +S +22.1097 225.615 m +430.727 225.615 L +S +1.5 w +31.8389 105.8 m +47.6238 139.327 L +64.8429 170.488 L +81.0119 195.025 L +96.5639 214.68 L +113.117 231.74 L +129.049 244.787 L +145.986 255.448 L +162.302 263.007 L +177.997 268.139 L +186.104 270.089 L +194.697 271.707 L +202.678 272.847 L +210.155 273.635 L +214.397 273.979 L +218.43 274.244 L +222.398 274.457 L +225.998 274.604 L +229.916 274.73 L +231.923 274.779 L +234.092 274.824 L +236.107 274.857 L +237.962 274.886 L +239.866 274.906 L +241.607 274.918 L +243.523 274.931 L +244.581 274.935 L +245.583 274.939 L +246.445 274.943 L +247.36 274.947 L +248.365 274.947 L +249.297 274.947 L +249.816 274.951 L +250.294 274.951 L +250.817 274.951 L +251.083 274.951 L +251.369 274.951 L +251.847 274.951 L +252.296 274.951 L +252.827 274.951 L +253.31 274.951 L +253.587 274.951 L +253.878 274.951 L +254.405 274.951 L +254.695 274.951 L +254.969 274.951 L +255.267 274.951 L +255.59 274.951 L +255.863 274.951 L +256.166 274.951 L +S +256.166 274.951 m +256.448 274.951 L +256.713 274.951 L +257.212 274.951 L +257.739 274.951 L +258.25 274.951 L +258.81 274.951 L +259.394 274.951 L +259.937 274.955 L +260.91 274.955 L +261.952 274.959 L +263.178 274.963 L +264.338 274.967 L +266.508 274.98 L +268.559 274.996 L +270.459 275.016 L +272.543 275.045 L +274.754 275.082 L +278.591 275.172 L +282.726 275.307 L +286.628 275.474 L +290.2 275.666 L +297.947 276.238 L +302.335 276.663 L +306.414 277.137 L +314.786 278.367 L +322.386 279.822 L +330.906 281.889 L +338.747 284.243 L +354.487 290.458 L +370.607 299.203 L +386.11 310.243 L +402.614 325.219 L +418.501 343.153 L +420.998 346.312 L +S +0.5 g +0.5 w +42.9574 129.925 m +409.879 332.971 L +S +215.88 225.615 m +215.88 274.085 L +S +42.9574 129.925 m +215.88 274.085 L +S +157.738 225.615 m +157.738 261.14 L +S +42.9574 129.925 m +157.738 261.14 L +S +126.663 225.615 m +126.663 243.03 L +S +42.9574 129.925 m +126.663 243.03 L +S +113.775 225.615 m +113.775 232.345 L +S +0 g +42.9574 129.925 2. dot +409.879 332.971 2. dot +215.88 274.085 2. dot +215.88 274.085 2. dot +157.738 261.14 2. dot +113.775 232.345 2. dot +126.663 243.03 2. dot +44.4574 121.425 m +(a) show +50.4574 119.925 m +F0 7.125 scalefont setfont +(0) show +54.7074 119.925 m +F1 7.125 scalefont setfont +(-) show +58.9574 119.925 m +F0 7.125 scalefont setfont +(4) show +397.879 336.471 m +F0 10. scalefont setfont +(b) show +403.879 334.971 m +F0 7.125 scalefont setfont +(0) show +209.88 279.585 m +F0 10. scalefont setfont +(b) show +215.88 278.085 m +F0 7.125 scalefont setfont +(1) show +147.738 266.64 m +F0 10. scalefont setfont +(b) show +153.738 265.14 m +F0 7.125 scalefont setfont +(2) show +116.663 247.53 m +F0 10. scalefont setfont +(b) show +122.663 246.03 m +F0 7.125 scalefont setfont +(3) show +99.7749 232.845 m +F0 10. scalefont setfont +(b) show +105.775 231.345 m +F0 7.125 scalefont setfont +(4) show +gsave +22.1097 99.7849 m +430.727 99.7849 L +430.727 352.323 L +22.1097 352.323 L +22.1097 99.7849 L +closepath clip newpath +grestore +showpage +%%PageTrailer +%%Trailer +%%Pages: 1 +%%EOF diff --git a/software/gsl-1.15/doc/roots-newtons-method.eps b/software/gsl-1.15/doc/roots-newtons-method.eps new file mode 100644 index 000000000..1effb85a9 --- /dev/null +++ b/software/gsl-1.15/doc/roots-newtons-method.eps @@ -0,0 +1,567 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Mathematica-PSRender +%%BoundingBox: 0 79 432 353 +%%Pages: (atend) +%%EndComments +%%BeginProlog +/setrgbcolor dup where +{ pop pop } +{ { .114 mul exch .587 mul add exch .299 mul add setgray } bind def } +ifelse +/C /curveto load def +/f /fill load def +/F { closepath fill } bind def +/L /lineto load def +/S /stroke load def +/s { closepath stroke } bind def +/d /setdash load def +/g /setgray load def +/m /moveto load def +/r /setrgbcolor load def +/w /setlinewidth load def +/b { gsave gsave F grestore 0 g S grestore newpath } bind def +/dot { newpath 0 360 arc fill } bind def +%%EndProlog +%%Page: 1 1 +0 g +0.25 w +[ ] 0 d +64.3977 99.4424 m +64.3977 102.003 L +S +57.8977 83.3205 m +/F1 /Times-Roman findfont def +F1 10. scalefont setfont +(-) show +64.5227 83.3205 m +/F0 /Times-Roman findfont def +F0 10. scalefont setfont +(3) show +118.599 99.4424 m +118.599 102.003 L +S +112.099 83.3205 m +F1 10. scalefont setfont +(-) show +118.724 83.3205 m +F0 10. scalefont setfont +(2) show +172.797 99.4424 m +172.797 102.003 L +S +166.297 83.3205 m +F1 10. scalefont setfont +(-) show +172.922 83.3205 m +F0 10. scalefont setfont +(1) show +226.998 99.4424 m +226.998 102.003 L +S +223.998 83.3205 m +(0) show +281.2 99.4424 m +281.2 102.003 L +S +278.2 83.3205 m +(1) show +335.398 99.4424 m +335.398 102.003 L +S +332.398 83.3205 m +(2) show +389.599 99.4424 m +389.599 102.003 L +S +386.599 83.3205 m +(3) show +0.125 w +75.2397 99.4424 m +75.2397 100.979 L +S +86.0776 99.4424 m +86.0776 100.979 L +S +96.9195 99.4424 m +96.9195 100.979 L +S +107.757 99.4424 m +107.757 100.979 L +S +129.437 99.4424 m +129.437 100.979 L +S +140.279 99.4424 m +140.279 100.979 L +S +151.117 99.4424 m +151.117 100.979 L +S +161.959 99.4424 m +161.959 100.979 L +S +183.639 99.4424 m +183.639 100.979 L +S +194.477 99.4424 m +194.477 100.979 L +S +205.319 99.4424 m +205.319 100.979 L +S +216.156 99.4424 m +216.156 100.979 L +S +237.84 99.4424 m +237.84 100.979 L +S +248.678 99.4424 m +248.678 100.979 L +S +259.52 99.4424 m +259.52 100.979 L +S +270.358 99.4424 m +270.358 100.979 L +S +292.038 99.4424 m +292.038 100.979 L +S +302.88 99.4424 m +302.88 100.979 L +S +313.718 99.4424 m +313.718 100.979 L +S +324.56 99.4424 m +324.56 100.979 L +S +346.24 99.4424 m +346.24 100.979 L +S +357.077 99.4424 m +357.077 100.979 L +S +367.919 99.4424 m +367.919 100.979 L +S +378.757 99.4424 m +378.757 100.979 L +S +53.5599 99.4424 m +53.5599 100.979 L +S +42.7179 99.4424 m +42.7179 100.979 L +S +31.8801 99.4424 m +31.8801 100.979 L +S +400.437 99.4424 m +400.437 100.979 L +S +411.279 99.4424 m +411.279 100.979 L +S +422.117 99.4424 m +422.117 100.979 L +S +0.25 w +22.1239 99.4424 m +431.873 99.4424 L +S +22.1239 121.122 m +24.6849 121.122 L +S +2.00207 117.622 m +F1 10. scalefont setfont +(-) show +8.62707 117.622 m +F0 10. scalefont setfont +(4) show +22.1239 163.097 m +24.6849 163.097 L +S +2.00207 159.597 m +F1 10. scalefont setfont +(-) show +8.62707 159.597 m +F0 10. scalefont setfont +(2) show +22.1239 205.072 m +24.6849 205.072 L +S +9.00207 201.572 m +(0) show +22.1239 247.05 m +24.6849 247.05 L +S +9.00207 243.55 m +(2) show +22.1239 289.025 m +24.6849 289.025 L +S +9.00207 285.525 m +(4) show +22.1239 331.004 m +24.6849 331.004 L +S +9.00207 327.504 m +(6) show +0.125 w +22.1239 131.616 m +23.6605 131.616 L +S +22.1239 142.11 m +23.6605 142.11 L +S +22.1239 152.603 m +23.6605 152.603 L +S +22.1239 173.591 m +23.6605 173.591 L +S +22.1239 184.084 m +23.6605 184.084 L +S +22.1239 194.578 m +23.6605 194.578 L +S +22.1239 215.569 m +23.6605 215.569 L +S +22.1239 226.063 m +23.6605 226.063 L +S +22.1239 236.557 m +23.6605 236.557 L +S +22.1239 257.544 m +23.6605 257.544 L +S +22.1239 268.038 m +23.6605 268.038 L +S +22.1239 278.531 m +23.6605 278.531 L +S +22.1239 299.519 m +23.6605 299.519 L +S +22.1239 310.016 m +23.6605 310.016 L +S +22.1239 320.51 m +23.6605 320.51 L +S +22.1239 110.629 m +23.6605 110.629 L +S +22.1239 100.131 m +23.6605 100.131 L +S +22.1239 341.497 m +23.6605 341.497 L +S +22.1239 351.991 m +23.6605 351.991 L +S +0.25 w +22.1239 99.4424 m +22.1239 352.68 L +S +64.3977 350.119 m +64.3977 352.68 L +S +118.599 350.119 m +118.599 352.68 L +S +172.797 350.119 m +172.797 352.68 L +S +226.998 350.119 m +226.998 352.68 L +S +281.2 350.119 m +281.2 352.68 L +S +335.398 350.119 m +335.398 352.68 L +S +389.599 350.119 m +389.599 352.68 L +S +0.125 w +75.2397 351.143 m +75.2397 352.68 L +S +86.0776 351.143 m +86.0776 352.68 L +S +96.9195 351.143 m +96.9195 352.68 L +S +107.757 351.143 m +107.757 352.68 L +S +129.437 351.143 m +129.437 352.68 L +S +140.279 351.143 m +140.279 352.68 L +S +151.117 351.143 m +151.117 352.68 L +S +161.959 351.143 m +161.959 352.68 L +S +183.639 351.143 m +183.639 352.68 L +S +194.477 351.143 m +194.477 352.68 L +S +205.319 351.143 m +205.319 352.68 L +S +216.156 351.143 m +216.156 352.68 L +S +237.84 351.143 m +237.84 352.68 L +S +248.678 351.143 m +248.678 352.68 L +S +259.52 351.143 m +259.52 352.68 L +S +270.358 351.143 m +270.358 352.68 L +S +292.038 351.143 m +292.038 352.68 L +S +302.88 351.143 m +302.88 352.68 L +S +313.718 351.143 m +313.718 352.68 L +S +324.56 351.143 m +324.56 352.68 L +S +346.24 351.143 m +346.24 352.68 L +S +357.077 351.143 m +357.077 352.68 L +S +367.919 351.143 m +367.919 352.68 L +S +378.757 351.143 m +378.757 352.68 L +S +53.5599 351.143 m +53.5599 352.68 L +S +42.7179 351.143 m +42.7179 352.68 L +S +31.8801 351.143 m +31.8801 352.68 L +S +400.437 351.143 m +400.437 352.68 L +S +411.279 351.143 m +411.279 352.68 L +S +422.117 351.143 m +422.117 352.68 L +S +0.25 w +22.1239 352.68 m +431.873 352.68 L +S +429.312 121.122 m +431.873 121.122 L +S +429.312 163.097 m +431.873 163.097 L +S +429.312 205.072 m +431.873 205.072 L +S +429.312 247.05 m +431.873 247.05 L +S +429.312 289.025 m +431.873 289.025 L +S +429.312 331.004 m +431.873 331.004 L +S +0.125 w +430.336 131.616 m +431.873 131.616 L +S +430.336 142.11 m +431.873 142.11 L +S +430.336 152.603 m +431.873 152.603 L +S +430.336 173.591 m +431.873 173.591 L +S +430.336 184.084 m +431.873 184.084 L +S +430.336 194.578 m +431.873 194.578 L +S +430.336 215.569 m +431.873 215.569 L +S +430.336 226.063 m +431.873 226.063 L +S +430.336 236.557 m +431.873 236.557 L +S +430.336 257.544 m +431.873 257.544 L +S +430.336 268.038 m +431.873 268.038 L +S +430.336 278.531 m +431.873 278.531 L +S +430.336 299.519 m +431.873 299.519 L +S +430.336 310.016 m +431.873 310.016 L +S +430.336 320.51 m +431.873 320.51 L +S +430.336 110.629 m +431.873 110.629 L +S +430.336 100.131 m +431.873 100.131 L +S +430.336 341.497 m +431.873 341.497 L +S +430.336 351.991 m +431.873 351.991 L +S +0.25 w +431.873 99.4424 m +431.873 352.68 L +S +22.1239 205.072 m +431.873 205.072 L +S +gsave +22.1239 99.4424 m +431.873 99.4424 L +431.873 352.68 L +22.1239 352.68 L +22.1239 99.4424 L +closepath clip newpath +1.5 w +31.8801 105.474 m +47.7087 129.264 L +64.9755 151.169 L +81.1892 168.26 L +96.7843 181.831 L +113.383 193.529 L +129.359 202.449 L +146.343 209.775 L +162.705 215.09 L +178.443 218.913 L +195.19 221.941 L +211.313 224.19 L +226.814 226.038 L +243.323 228.017 L +259.209 230.242 L +276.103 233.328 L +292.37 237.339 L +308.022 242.486 L +324.674 249.693 L +340.708 258.654 L +357.745 270.717 L +374.164 285.173 L +389.96 302.043 L +406.759 323.522 L +422.117 346.652 L +S +0.5 g +0.5 w +389.599 301.621 m +306.49 205.072 L +306.49 241.92 L +205.843 205.072 L +205.843 223.477 L +68.3559 205.072 L +68.3559 155. L +113.408 205.072 L +113.408 193.545 L +131.81 205.072 L +131.81 203.633 L +S +0 g +389.599 301.621 2. dot +379.599 306.121 m +(g) show +385.599 304.621 m +F0 7.125 scalefont setfont +(0) show +306.49 241.92 2. dot +298.49 247.42 m +F0 10. scalefont setfont +(g) show +304.49 245.92 m +F0 7.125 scalefont setfont +(1) show +205.843 223.477 2. dot +198.843 228.977 m +F0 10. scalefont setfont +(g) show +204.843 227.477 m +F0 7.125 scalefont setfont +(2) show +68.3559 155. 2. dot +68.3559 146.5 m +F0 10. scalefont setfont +(g) show +74.3559 145. m +F0 7.125 scalefont setfont +(3) show +113.408 193.545 2. dot +112.408 185.045 m +F0 10. scalefont setfont +(g) show +118.408 183.545 m +F0 7.125 scalefont setfont +(4) show +131.81 203.633 2. dot +130.81 195.133 m +F0 10. scalefont setfont +(g) show +136.81 193.633 m +F0 7.125 scalefont setfont +(5) show +grestore +showpage +%%PageTrailer +%%Trailer +%%Pages: 1 +%%EOF diff --git a/software/gsl-1.15/doc/roots-secant-method.eps b/software/gsl-1.15/doc/roots-secant-method.eps new file mode 100644 index 000000000..79460d221 --- /dev/null +++ b/software/gsl-1.15/doc/roots-secant-method.eps @@ -0,0 +1,510 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Mathematica-PSRender +%%BoundingBox: 0 82 432 350 +%%Pages: (atend) +%%EndComments +%%BeginProlog +/setrgbcolor dup where +{ pop pop } +{ { .114 mul exch .587 mul add exch .299 mul add setgray } bind def } +ifelse +/C /curveto load def +/f /fill load def +/F { closepath fill } bind def +/L /lineto load def +/S /stroke load def +/s { closepath stroke } bind def +/d /setdash load def +/g /setgray load def +/m /moveto load def +/r /setrgbcolor load def +/w /setlinewidth load def +/b { gsave gsave F grestore 0 g S grestore newpath } bind def +/dot { newpath 0 360 arc fill } bind def +%%EndProlog +%%Page: 1 1 +0 g +0.25 w +[ ] 0 d +32.8442 96.7414 m +32.8442 99.2961 L +S +29.9067 85.6943 m +/F0 /Times-Roman findfont def +F0 10. scalefont setfont +(0) show +88.4562 96.7414 m +88.4562 99.2961 L +S +79.5187 85.6943 m +(0.2) show +144.072 96.7414 m +144.072 99.2961 L +S +135.322 85.6943 m +(0.4) show +199.684 96.7414 m +199.684 99.2961 L +S +190.747 85.6943 m +(0.6) show +255.3 96.7414 m +255.3 99.2961 L +S +246.363 85.6943 m +(0.8) show +310.912 96.7414 m +310.912 99.2961 L +S +307.537 85.6943 m +(1) show +366.528 96.7414 m +366.528 99.2961 L +S +357.372 85.6943 m +(1.2) show +422.14 96.7414 m +422.14 99.2961 L +S +413.172 85.6943 m +(1.4) show +0.125 w +46.7462 96.7414 m +46.7462 98.2742 L +S +60.6522 96.7414 m +60.6522 98.2742 L +S +74.5542 96.7414 m +74.5542 98.2742 L +S +102.362 96.7414 m +102.362 98.2742 L +S +116.264 96.7414 m +116.264 98.2742 L +S +130.166 96.7414 m +130.166 98.2742 L +S +157.974 96.7414 m +157.974 98.2742 L +S +171.88 96.7414 m +171.88 98.2742 L +S +185.782 96.7414 m +185.782 98.2742 L +S +213.59 96.7414 m +213.59 98.2742 L +S +227.492 96.7414 m +227.492 98.2742 L +S +241.394 96.7414 m +241.394 98.2742 L +S +269.202 96.7414 m +269.202 98.2742 L +S +283.104 96.7414 m +283.104 98.2742 L +S +297.01 96.7414 m +297.01 98.2742 L +S +324.818 96.7414 m +324.818 98.2742 L +S +338.72 96.7414 m +338.72 98.2742 L +S +352.622 96.7414 m +352.622 98.2742 L +S +380.43 96.7414 m +380.43 98.2742 L +S +394.332 96.7414 m +394.332 98.2742 L +S +408.238 96.7414 m +408.238 98.2742 L +S +0.25 w +23.1116 96.7414 m +431.873 96.7414 L +S +23.1116 137.389 m +25.6663 137.389 L +S +1.18957 134.389 m +(-10) show +23.1116 188.88 m +25.6663 188.88 L +S +13.1896 185.88 m +(0) show +23.1116 240.376 m +25.6663 240.376 L +S +7.18957 237.376 m +(10) show +23.1116 291.868 m +25.6663 291.868 L +S +7.18957 288.868 m +(20) show +23.1116 343.359 m +25.6663 343.359 L +S +7.18957 340.359 m +(30) show +0.125 w +23.1116 147.689 m +24.6444 147.689 L +S +23.1116 157.986 m +24.6444 157.986 L +S +23.1116 168.287 m +24.6444 168.287 L +S +23.1116 178.584 m +24.6444 178.584 L +S +23.1116 199.181 m +24.6444 199.181 L +S +23.1116 209.478 m +24.6444 209.478 L +S +23.1116 219.779 m +24.6444 219.779 L +S +23.1116 230.075 m +24.6444 230.075 L +S +23.1116 250.673 m +24.6444 250.673 L +S +23.1116 260.974 m +24.6444 260.974 L +S +23.1116 271.27 m +24.6444 271.27 L +S +23.1116 281.571 m +24.6444 281.571 L +S +23.1116 302.168 m +24.6444 302.168 L +S +23.1116 312.465 m +24.6444 312.465 L +S +23.1116 322.766 m +24.6444 322.766 L +S +23.1116 333.063 m +24.6444 333.063 L +S +23.1116 127.092 m +24.6444 127.092 L +S +23.1116 116.791 m +24.6444 116.791 L +S +23.1116 106.494 m +24.6444 106.494 L +S +0.25 w +23.1116 96.7414 m +23.1116 349.368 L +S +32.8442 346.813 m +32.8442 349.368 L +S +88.4562 346.813 m +88.4562 349.368 L +S +144.072 346.813 m +144.072 349.368 L +S +199.684 346.813 m +199.684 349.368 L +S +255.3 346.813 m +255.3 349.368 L +S +310.912 346.813 m +310.912 349.368 L +S +366.528 346.813 m +366.528 349.368 L +S +422.14 346.813 m +422.14 349.368 L +S +0.125 w +46.7462 347.835 m +46.7462 349.368 L +S +60.6522 347.835 m +60.6522 349.368 L +S +74.5542 347.835 m +74.5542 349.368 L +S +102.362 347.835 m +102.362 349.368 L +S +116.264 347.835 m +116.264 349.368 L +S +130.166 347.835 m +130.166 349.368 L +S +157.974 347.835 m +157.974 349.368 L +S +171.88 347.835 m +171.88 349.368 L +S +185.782 347.835 m +185.782 349.368 L +S +213.59 347.835 m +213.59 349.368 L +S +227.492 347.835 m +227.492 349.368 L +S +241.394 347.835 m +241.394 349.368 L +S +269.202 347.835 m +269.202 349.368 L +S +283.104 347.835 m +283.104 349.368 L +S +297.01 347.835 m +297.01 349.368 L +S +324.818 347.835 m +324.818 349.368 L +S +338.72 347.835 m +338.72 349.368 L +S +352.622 347.835 m +352.622 349.368 L +S +380.43 347.835 m +380.43 349.368 L +S +394.332 347.835 m +394.332 349.368 L +S +408.238 347.835 m +408.238 349.368 L +S +0.25 w +23.1116 349.368 m +431.873 349.368 L +S +429.318 137.389 m +431.873 137.389 L +S +429.318 188.88 m +431.873 188.88 L +S +429.318 240.376 m +431.873 240.376 L +S +429.318 291.868 m +431.873 291.868 L +S +429.318 343.359 m +431.873 343.359 L +S +0.125 w +430.34 147.689 m +431.873 147.689 L +S +430.34 157.986 m +431.873 157.986 L +S +430.34 168.287 m +431.873 168.287 L +S +430.34 178.584 m +431.873 178.584 L +S +430.34 199.181 m +431.873 199.181 L +S +430.34 209.478 m +431.873 209.478 L +S +430.34 219.779 m +431.873 219.779 L +S +430.34 230.075 m +431.873 230.075 L +S +430.34 250.673 m +431.873 250.673 L +S +430.34 260.974 m +431.873 260.974 L +S +430.34 271.27 m +431.873 271.27 L +S +430.34 281.571 m +431.873 281.571 L +S +430.34 302.168 m +431.873 302.168 L +S +430.34 312.465 m +431.873 312.465 L +S +430.34 322.766 m +431.873 322.766 L +S +430.34 333.063 m +431.873 333.063 L +S +430.34 127.092 m +431.873 127.092 L +S +430.34 116.791 m +431.873 116.791 L +S +430.34 106.494 m +431.873 106.494 L +S +0.25 w +431.873 96.7414 m +431.873 349.368 L +S +23.1116 188.88 m +431.873 188.88 L +S +gsave +23.1116 96.7414 m +431.873 96.7414 L +431.873 349.368 L +23.1116 349.368 L +23.1116 96.7414 L +closepath clip newpath +1.5 w +46.7462 343.355 m +48.5774 331.362 L +50.286 322.459 L +52.3135 313.896 L +54.1611 307.523 L +57.938 297.398 L +61.9766 289.468 L +66.0683 283.382 L +70.5116 278.26 L +78.5846 271.45 L +86.4042 266.741 L +94.6939 262.96 L +109.605 257.945 L +125.486 253.926 L +140.769 250.632 L +157.018 247.321 L +172.669 244.067 L +187.724 240.723 L +203.743 236.799 L +219.166 232.569 L +235.557 227.488 L +251.352 221.945 L +266.545 215.932 L +282.708 208.746 L +298.273 200.984 L +313.238 192.686 L +329.172 182.888 L +344.508 172.468 L +360.81 160.255 L +376.518 147.33 L +391.626 133.759 L +407.699 118.046 L +422.14 102.758 L +S +0.5 g +0.5 w +60.6522 291.819 m +170.286 188.88 L +170.286 244.574 L +S +88.4562 265.711 m +385.916 188.88 L +385.916 139.02 L +S +170.286 244.574 m +385.916 139.02 L +S +284.057 188.88 m +284.057 208.108 L +S +385.916 139.02 m +284.057 208.108 L +S +312.4 188.88 m +312.4 193.172 L +S +0 g +60.6522 291.819 2. dot +62.6522 293.319 m +F0 10. scalefont setfont +(g) show +68.6522 291.819 m +F0 7.125 scalefont setfont +(0) show +88.4562 265.711 2. dot +87.4562 270.211 m +F0 10. scalefont setfont +(g) show +93.4562 268.711 m +F0 7.125 scalefont setfont +(1) show +170.286 244.574 2. dot +167.286 249.074 m +F0 10. scalefont setfont +(g) show +173.286 247.574 m +F0 7.125 scalefont setfont +(2) show +385.916 139.02 2. dot +376.916 131.52 m +F0 10. scalefont setfont +(g) show +382.916 130.02 m +F0 7.125 scalefont setfont +(3) show +284.057 208.108 2. dot +283.057 212.608 m +F0 10. scalefont setfont +(g) show +289.057 211.108 m +F0 7.125 scalefont setfont +(4) show +312.4 193.172 2. dot +312.4 197.672 m +F0 10. scalefont setfont +(g) show +318.4 196.172 m +F0 7.125 scalefont setfont +(5) show +grestore +showpage +%%PageTrailer +%%Trailer +%%Pages: 1 +%%EOF diff --git a/software/gsl-1.15/doc/roots.texi b/software/gsl-1.15/doc/roots.texi new file mode 100644 index 000000000..c80435336 --- /dev/null +++ b/software/gsl-1.15/doc/roots.texi @@ -0,0 +1,911 @@ +@cindex root finding +@cindex zero finding +@cindex finding roots +@cindex finding zeros +@cindex roots +@cindex solving a nonlinear equation +@cindex nonlinear equation, solutions of + +This chapter describes routines for finding roots of arbitrary +one-dimensional functions. The library provides low level components +for a variety of iterative solvers and convergence tests. These can be +combined by the user to achieve the desired solution, with full access +to the intermediate steps of the iteration. Each class of methods uses +the same framework, so that you can switch between solvers at runtime +without needing to recompile your program. Each instance of a solver +keeps track of its own state, allowing the solvers to be used in +multi-threaded programs. + +The header file @file{gsl_roots.h} contains prototypes for the root +finding functions and related declarations. + +@menu +* Root Finding Overview:: +* Root Finding Caveats:: +* Initializing the Solver:: +* Providing the function to solve:: +* Search Bounds and Guesses:: +* Root Finding Iteration:: +* Search Stopping Parameters:: +* Root Bracketing Algorithms:: +* Root Finding Algorithms using Derivatives:: +* Root Finding Examples:: +* Root Finding References and Further Reading:: +@end menu + +@node Root Finding Overview +@section Overview +@cindex root finding, overview + +One-dimensional root finding algorithms can be divided into two classes, +@dfn{root bracketing} and @dfn{root polishing}. Algorithms which proceed +by bracketing a root are guaranteed to converge. Bracketing algorithms +begin with a bounded region known to contain a root. The size of this +bounded region is reduced, iteratively, until it encloses the root to a +desired tolerance. This provides a rigorous error estimate for the +location of the root. + +The technique of @dfn{root polishing} attempts to improve an initial +guess to the root. These algorithms converge only if started ``close +enough'' to a root, and sacrifice a rigorous error bound for speed. By +approximating the behavior of a function in the vicinity of a root they +attempt to find a higher order improvement of an initial guess. When the +behavior of the function is compatible with the algorithm and a good +initial guess is available a polishing algorithm can provide rapid +convergence. + +In GSL both types of algorithm are available in similar frameworks. The +user provides a high-level driver for the algorithms, and the library +provides the individual functions necessary for each of the steps. +There are three main phases of the iteration. The steps are, + +@itemize @bullet +@item +initialize solver state, @var{s}, for algorithm @var{T} + +@item +update @var{s} using the iteration @var{T} + +@item +test @var{s} for convergence, and repeat iteration if necessary +@end itemize + +@noindent +The state for bracketing solvers is held in a @code{gsl_root_fsolver} +struct. The updating procedure uses only function evaluations (not +derivatives). The state for root polishing solvers is held in a +@code{gsl_root_fdfsolver} struct. The updates require both the function +and its derivative (hence the name @code{fdf}) to be supplied by the +user. + +@node Root Finding Caveats +@section Caveats +@cindex root finding, caveats + +Note that root finding functions can only search for one root at a time. +When there are several roots in the search area, the first root to be +found will be returned; however it is difficult to predict which of the +roots this will be. @emph{In most cases, no error will be reported if +you try to find a root in an area where there is more than one.} + +Care must be taken when a function may have a multiple root (such as +@c{$f(x) = (x-x_0)^2$} +@math{f(x) = (x-x_0)^2} or +@c{$f(x) = (x-x_0)^3$} +@math{f(x) = (x-x_0)^3}). +It is not possible to use root-bracketing algorithms on +even-multiplicity roots. For these algorithms the initial interval must +contain a zero-crossing, where the function is negative at one end of +the interval and positive at the other end. Roots with even-multiplicity +do not cross zero, but only touch it instantaneously. Algorithms based +on root bracketing will still work for odd-multiplicity roots +(e.g. cubic, quintic, @dots{}). +Root polishing algorithms generally work with higher multiplicity roots, +but at a reduced rate of convergence. In these cases the @dfn{Steffenson +algorithm} can be used to accelerate the convergence of multiple roots. + +While it is not absolutely required that @math{f} have a root within the +search region, numerical root finding functions should not be used +haphazardly to check for the @emph{existence} of roots. There are better +ways to do this. Because it is easy to create situations where numerical +root finders can fail, it is a bad idea to throw a root finder at a +function you do not know much about. In general it is best to examine +the function visually by plotting before searching for a root. + +@node Initializing the Solver +@section Initializing the Solver + +@deftypefun {gsl_root_fsolver *} gsl_root_fsolver_alloc (const gsl_root_fsolver_type * @var{T}) +@tpindex gsl_root_fsolver +@tpindex gsl_root_fsolver_type +This function returns a pointer to a newly allocated instance of a +solver of type @var{T}. For example, the following code creates an +instance of a bisection solver, + +@example +const gsl_root_fsolver_type * T + = gsl_root_fsolver_bisection; +gsl_root_fsolver * s + = gsl_root_fsolver_alloc (T); +@end example + +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + +@deftypefun {gsl_root_fdfsolver *} gsl_root_fdfsolver_alloc (const gsl_root_fdfsolver_type * @var{T}) +@tpindex gsl_root_fdfsolver +@tpindex gsl_root_fdfsolver_type +This function returns a pointer to a newly allocated instance of a +derivative-based solver of type @var{T}. For example, the following +code creates an instance of a Newton-Raphson solver, + +@example +const gsl_root_fdfsolver_type * T + = gsl_root_fdfsolver_newton; +gsl_root_fdfsolver * s + = gsl_root_fdfsolver_alloc (T); +@end example + +If there is insufficient memory to create the solver then the function +returns a null pointer and the error handler is invoked with an error +code of @code{GSL_ENOMEM}. +@end deftypefun + + +@deftypefun int gsl_root_fsolver_set (gsl_root_fsolver * @var{s}, gsl_function * @var{f}, double @var{x_lower}, double @var{x_upper}) +This function initializes, or reinitializes, an existing solver @var{s} +to use the function @var{f} and the initial search interval +[@var{x_lower}, @var{x_upper}]. +@end deftypefun + +@deftypefun int gsl_root_fdfsolver_set (gsl_root_fdfsolver * @var{s}, gsl_function_fdf * @var{fdf}, double @var{root}) +This function initializes, or reinitializes, an existing solver @var{s} +to use the function and derivative @var{fdf} and the initial guess +@var{root}. +@end deftypefun + +@deftypefun void gsl_root_fsolver_free (gsl_root_fsolver * @var{s}) +@deftypefunx void gsl_root_fdfsolver_free (gsl_root_fdfsolver * @var{s}) +These functions free all the memory associated with the solver @var{s}. +@end deftypefun + +@deftypefun {const char *} gsl_root_fsolver_name (const gsl_root_fsolver * @var{s}) +@deftypefunx {const char *} gsl_root_fdfsolver_name (const gsl_root_fdfsolver * @var{s}) +These functions return a pointer to the name of the solver. For example, + +@example +printf ("s is a '%s' solver\n", + gsl_root_fsolver_name (s)); +@end example + +@noindent +would print something like @code{s is a 'bisection' solver}. +@end deftypefun + +@node Providing the function to solve +@section Providing the function to solve +@cindex root finding, providing a function to solve + +You must provide a continuous function of one variable for the root +finders to operate on, and, sometimes, its first derivative. In order +to allow for general parameters the functions are defined by the +following data types: + +@deftp {Data Type} gsl_function +This data type defines a general function with parameters. + +@table @code +@item double (* function) (double @var{x}, void * @var{params}) +this function should return the value +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} for argument @var{x} and parameters @var{params} + +@item void * params +a pointer to the parameters of the function +@end table +@end deftp + +Here is an example for the general quadratic function, +@tex +\beforedisplay +$$ +f(x) = a x^2 + b x + c +$$ +\afterdisplay +@end tex +@ifinfo + +@example +f(x) = a x^2 + b x + c +@end example + +@end ifinfo +@noindent +with @math{a = 3}, @math{b = 2}, @math{c = 1}. The following code +defines a @code{gsl_function} @code{F} which you could pass to a root +finder as a function pointer: + +@example +struct my_f_params @{ double a; double b; double c; @}; + +double +my_f (double x, void * p) @{ + struct my_f_params * params + = (struct my_f_params *)p; + double a = (params->a); + double b = (params->b); + double c = (params->c); + + return (a * x + b) * x + c; +@} + +gsl_function F; +struct my_f_params params = @{ 3.0, 2.0, 1.0 @}; + +F.function = &my_f; +F.params = ¶ms; +@end example + +@noindent +The function @math{f(x)} can be evaluated using the macro +@code{GSL_FN_EVAL(&F,x)} defined in @file{gsl_math.h}. + +@deftp {Data Type} gsl_function_fdf +This data type defines a general function with parameters and its first +derivative. + +@table @code +@item double (* f) (double @var{x}, void * @var{params}) +this function should return the value of +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} for argument @var{x} and parameters @var{params} + +@item double (* df) (double @var{x}, void * @var{params}) +this function should return the value of the derivative of @var{f} with +respect to @var{x}, +@c{$f'(x,\hbox{\it params})$} +@math{f'(x,params)}, for argument @var{x} and parameters @var{params} + +@item void (* fdf) (double @var{x}, void * @var{params}, double * @var{f}, double * @var{df}) +this function should set the values of the function @var{f} to +@c{$f(x,\hbox{\it params})$} +@math{f(x,params)} +and its derivative @var{df} to +@c{$f'(x,\hbox{\it params})$} +@math{f'(x,params)} +for argument @var{x} and parameters @var{params}. This function +provides an optimization of the separate functions for @math{f(x)} and +@math{f'(x)}---it is always faster to compute the function and its +derivative at the same time. + +@item void * params +a pointer to the parameters of the function +@end table +@end deftp + +Here is an example where +@c{$f(x) = \exp(2x)$} +@math{f(x) = 2\exp(2x)}: + +@example +double +my_f (double x, void * params) +@{ + return exp (2 * x); +@} + +double +my_df (double x, void * params) +@{ + return 2 * exp (2 * x); +@} + +void +my_fdf (double x, void * params, + double * f, double * df) +@{ + double t = exp (2 * x); + + *f = t; + *df = 2 * t; /* uses existing value */ +@} + +gsl_function_fdf FDF; + +FDF.f = &my_f; +FDF.df = &my_df; +FDF.fdf = &my_fdf; +FDF.params = 0; +@end example + +@noindent +The function @math{f(x)} can be evaluated using the macro +@code{GSL_FN_FDF_EVAL_F(&FDF,x)} and the derivative @math{f'(x)} can +be evaluated using the macro @code{GSL_FN_FDF_EVAL_DF(&FDF,x)}. Both +the function @math{y = f(x)} and its derivative @math{dy = f'(x)} can +be evaluated at the same time using the macro +@code{GSL_FN_FDF_EVAL_F_DF(&FDF,x,y,dy)}. The macro stores +@math{f(x)} in its @var{y} argument and @math{f'(x)} in its @var{dy} +argument---both of these should be pointers to @code{double}. + +@node Search Bounds and Guesses +@section Search Bounds and Guesses +@cindex root finding, search bounds +@cindex root finding, initial guess + +You provide either search bounds or an initial guess; this section +explains how search bounds and guesses work and how function arguments +control them. + +A guess is simply an @math{x} value which is iterated until it is within +the desired precision of a root. It takes the form of a @code{double}. + +Search bounds are the endpoints of an interval which is iterated until +the length of the interval is smaller than the requested precision. The +interval is defined by two values, the lower limit and the upper limit. +Whether the endpoints are intended to be included in the interval or not +depends on the context in which the interval is used. + +@node Root Finding Iteration +@section Iteration + +The following functions drive the iteration of each algorithm. Each +function performs one iteration to update the state of any solver of the +corresponding type. The same functions work for all solvers so that +different methods can be substituted at runtime without modifications to +the code. + +@deftypefun int gsl_root_fsolver_iterate (gsl_root_fsolver * @var{s}) +@deftypefunx int gsl_root_fdfsolver_iterate (gsl_root_fdfsolver * @var{s}) +These functions perform a single iteration of the solver @var{s}. If the +iteration encounters an unexpected problem then an error code will be +returned, + +@table @code +@item GSL_EBADFUNC +the iteration encountered a singular point where the function or its +derivative evaluated to @code{Inf} or @code{NaN}. + +@item GSL_EZERODIV +the derivative of the function vanished at the iteration point, +preventing the algorithm from continuing without a division by zero. +@end table +@end deftypefun + +The solver maintains a current best estimate of the root at all +times. The bracketing solvers also keep track of the current best +interval bounding the root. This information can be accessed with the +following auxiliary functions, + +@deftypefun double gsl_root_fsolver_root (const gsl_root_fsolver * @var{s}) +@deftypefunx double gsl_root_fdfsolver_root (const gsl_root_fdfsolver * @var{s}) +These functions return the current estimate of the root for the solver @var{s}. +@end deftypefun + +@deftypefun double gsl_root_fsolver_x_lower (const gsl_root_fsolver * @var{s}) +@deftypefunx double gsl_root_fsolver_x_upper (const gsl_root_fsolver * @var{s}) +These functions return the current bracketing interval for the solver @var{s}. +@end deftypefun + +@node Search Stopping Parameters +@section Search Stopping Parameters +@cindex root finding, stopping parameters + +A root finding procedure should stop when one of the following conditions is +true: + +@itemize @bullet +@item +A root has been found to within the user-specified precision. + +@item +A user-specified maximum number of iterations has been reached. + +@item +An error has occurred. +@end itemize + +@noindent +The handling of these conditions is under user control. The functions +below allow the user to test the precision of the current result in +several standard ways. + +@deftypefun int gsl_root_test_interval (double @var{x_lower}, double @var{x_upper}, double @var{epsabs}, double @var{epsrel}) +This function tests for the convergence of the interval [@var{x_lower}, +@var{x_upper}] with absolute error @var{epsabs} and relative error +@var{epsrel}. The test returns @code{GSL_SUCCESS} if the following +condition is achieved, +@tex +\beforedisplay +$$ +|a - b| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, \min(|a|,|b|) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|a - b| < epsabs + epsrel min(|a|,|b|) +@end example + +@end ifinfo +@noindent +when the interval @math{x = [a,b]} does not include the origin. If the +interval includes the origin then @math{\min(|a|,|b|)} is replaced by +zero (which is the minimum value of @math{|x|} over the interval). This +ensures that the relative error is accurately estimated for roots close +to the origin. + +This condition on the interval also implies that any estimate of the +root @math{r} in the interval satisfies the same condition with respect +to the true root @math{r^*}, +@tex +\beforedisplay +$$ +|r - r^*| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, r^* +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|r - r^*| < epsabs + epsrel r^* +@end example + +@end ifinfo +@noindent +assuming that the true root @math{r^*} is contained within the interval. +@end deftypefun + +@deftypefun int gsl_root_test_delta (double @var{x1}, double @var{x0}, double @var{epsabs}, double @var{epsrel}) + +This function tests for the convergence of the sequence @dots{}, @var{x0}, +@var{x1} with absolute error @var{epsabs} and relative error +@var{epsrel}. The test returns @code{GSL_SUCCESS} if the following +condition is achieved, +@tex +\beforedisplay +$$ +|x_1 - x_0| < \hbox{\it epsabs} + \hbox{\it epsrel\/}\, |x_1| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|x_1 - x_0| < epsabs + epsrel |x_1| +@end example + +@end ifinfo +@noindent +and returns @code{GSL_CONTINUE} otherwise. +@end deftypefun + + +@deftypefun int gsl_root_test_residual (double @var{f}, double @var{epsabs}) +This function tests the residual value @var{f} against the absolute +error bound @var{epsabs}. The test returns @code{GSL_SUCCESS} if the +following condition is achieved, +@tex +\beforedisplay +$$ +|f| < \hbox{\it epsabs} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +|f| < epsabs +@end example + +@end ifinfo +@noindent +and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable +for situations where the precise location of the root, @math{x}, is +unimportant provided a value can be found where the residual, +@math{|f(x)|}, is small enough. +@end deftypefun + +@comment ============================================================ + +@node Root Bracketing Algorithms +@section Root Bracketing Algorithms + +The root bracketing algorithms described in this section require an +initial interval which is guaranteed to contain a root---if @math{a} +and @math{b} are the endpoints of the interval then @math{f(a)} must +differ in sign from @math{f(b)}. This ensures that the function crosses +zero at least once in the interval. If a valid initial interval is used +then these algorithm cannot fail, provided the function is well-behaved. + +Note that a bracketing algorithm cannot find roots of even degree, since +these do not cross the @math{x}-axis. + +@deffn {Solver} gsl_root_fsolver_bisection + +@cindex bisection algorithm for finding roots +@cindex root finding, bisection algorithm + +The @dfn{bisection algorithm} is the simplest method of bracketing the +roots of a function. It is the slowest algorithm provided by +the library, with linear convergence. + +On each iteration, the interval is bisected and the value of the +function at the midpoint is calculated. The sign of this value is used +to determine which half of the interval does not contain a root. That +half is discarded to give a new, smaller interval containing the +root. This procedure can be continued indefinitely until the interval is +sufficiently small. + +At any time the current estimate of the root is taken as the midpoint of +the interval. + +@comment eps file "roots-bisection.eps" +@comment @iftex +@comment @sp 1 +@comment @center @image{roots-bisection,3.4in} + +@comment @quotation +@comment Four iterations of bisection, where @math{a_n} is @math{n}th position of +@comment the beginning of the interval and @math{b_n} is the @math{n}th position +@comment of the end. The midpoint of each interval is also indicated. +@comment @end quotation +@comment @end iftex +@end deffn + +@comment ============================================================ + +@deffn {Solver} gsl_root_fsolver_falsepos +@cindex false position algorithm for finding roots +@cindex root finding, false position algorithm + +The @dfn{false position algorithm} is a method of finding roots based on +linear interpolation. Its convergence is linear, but it is usually +faster than bisection. + +On each iteration a line is drawn between the endpoints @math{(a,f(a))} +and @math{(b,f(b))} and the point where this line crosses the +@math{x}-axis taken as a ``midpoint''. The value of the function at +this point is calculated and its sign is used to determine which side of +the interval does not contain a root. That side is discarded to give a +new, smaller interval containing the root. This procedure can be +continued indefinitely until the interval is sufficiently small. + +The best estimate of the root is taken from the linear interpolation of +the interval on the current iteration. + +@comment eps file "roots-false-position.eps" +@comment @iftex +@comment @image{roots-false-position,4in} +@comment @quotation +@comment Several iterations of false position, where @math{a_n} is @math{n}th +@comment position of the beginning of the interval and @math{b_n} is the +@comment @math{n}th position of the end. +@comment @end quotation +@comment @end iftex +@end deffn + +@comment ============================================================ + +@deffn {Solver} gsl_root_fsolver_brent +@cindex Brent's method for finding roots +@cindex root finding, Brent's method + +The @dfn{Brent-Dekker method} (referred to here as @dfn{Brent's method}) +combines an interpolation strategy with the bisection algorithm. This +produces a fast algorithm which is still robust. + +On each iteration Brent's method approximates the function using an +interpolating curve. On the first iteration this is a linear +interpolation of the two endpoints. For subsequent iterations the +algorithm uses an inverse quadratic fit to the last three points, for +higher accuracy. The intercept of the interpolating curve with the +@math{x}-axis is taken as a guess for the root. If it lies within the +bounds of the current interval then the interpolating point is accepted, +and used to generate a smaller interval. If the interpolating point is +not accepted then the algorithm falls back to an ordinary bisection +step. + +The best estimate of the root is taken from the most recent +interpolation or bisection. +@end deffn + +@comment ============================================================ + +@node Root Finding Algorithms using Derivatives +@section Root Finding Algorithms using Derivatives + +The root polishing algorithms described in this section require an +initial guess for the location of the root. There is no absolute +guarantee of convergence---the function must be suitable for this +technique and the initial guess must be sufficiently close to the root +for it to work. When these conditions are satisfied then convergence is +quadratic. + +These algorithms make use of both the function and its derivative. + +@deffn {Derivative Solver} gsl_root_fdfsolver_newton +@cindex Newton's method for finding roots +@cindex root finding, Newton's method + +Newton's Method is the standard root-polishing algorithm. The algorithm +begins with an initial guess for the location of the root. On each +iteration, a line tangent to the function @math{f} is drawn at that +position. The point where this line crosses the @math{x}-axis becomes +the new guess. The iteration is defined by the following sequence, +@tex +\beforedisplay +$$ +x_{i+1} = x_i - {f(x_i) \over f'(x_i)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{i+1@} = x_i - f(x_i)/f'(x_i) +@end example + +@end ifinfo +@noindent +Newton's method converges quadratically for single roots, and linearly +for multiple roots. + +@comment eps file "roots-newtons-method.eps" +@comment @iftex +@comment @sp 1 +@comment @center @image{roots-newtons-method,3.4in} + +@comment @quotation +@comment Several iterations of Newton's Method, where @math{g_n} is the +@comment @math{n}th guess. +@comment @end quotation +@comment @end iftex +@end deffn + +@comment ============================================================ + +@deffn {Derivative Solver} gsl_root_fdfsolver_secant +@cindex secant method for finding roots +@cindex root finding, secant method + +The @dfn{secant method} is a simplified version of Newton's method which does +not require the computation of the derivative on every step. + +On its first iteration the algorithm begins with Newton's method, using +the derivative to compute a first step, +@tex +\beforedisplay +$$ +x_1 = x_0 - {f(x_0) \over f'(x_0)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_1 = x_0 - f(x_0)/f'(x_0) +@end example + +@end ifinfo +@noindent +Subsequent iterations avoid the evaluation of the derivative by +replacing it with a numerical estimate, the slope of the line through +the previous two points, +@tex +\beforedisplay +$$ +x_{i+1} = x_i - {f(x_i) \over f'_{est}} + ~\hbox{where}~ + f'_{est} = {f(x_{i}) - f(x_{i-1}) \over x_i - x_{i-1}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x_@{i+1@} = x_i f(x_i) / f'_@{est@} where + f'_@{est@} = (f(x_i) - f(x_@{i-1@})/(x_i - x_@{i-1@}) +@end example + +@end ifinfo +@noindent +When the derivative does not change significantly in the vicinity of the +root the secant method gives a useful saving. Asymptotically the secant +method is faster than Newton's method whenever the cost of evaluating +the derivative is more than 0.44 times the cost of evaluating the +function itself. As with all methods of computing a numerical +derivative the estimate can suffer from cancellation errors if the +separation of the points becomes too small. + +On single roots, the method has a convergence of order @math{(1 + \sqrt +5)/2} (approximately @math{1.62}). It converges linearly for multiple +roots. + +@comment eps file "roots-secant-method.eps" +@comment @iftex +@comment @tex +@comment \input epsf +@comment \medskip +@comment \centerline{\epsfxsize=5in\epsfbox{roots-secant-method.eps}} +@comment @end tex +@comment @quotation +@comment Several iterations of Secant Method, where @math{g_n} is the @math{n}th +@comment guess. +@comment @end quotation +@comment @end iftex +@end deffn + +@comment ============================================================ + +@deffn {Derivative Solver} gsl_root_fdfsolver_steffenson +@cindex Steffenson's method for finding roots +@cindex root finding, Steffenson's method + +The @dfn{Steffenson Method}@footnote{J.F. Steffensen (1873--1961). The +spelling used in the name of the function is slightly incorrect, but +has been preserved to avoid incompatibility.} provides the fastest +convergence of all the routines. It combines the basic Newton +algorithm with an Aitken ``delta-squared'' acceleration. If the +Newton iterates are @math{x_i} then the acceleration procedure +generates a new sequence @math{R_i}, +@tex +\beforedisplay +$$ +R_i = x_i - {(x_{i+1} - x_i)^2 \over (x_{i+2} - 2 x_{i+1} + x_i)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +R_i = x_i - (x_@{i+1@} - x_i)^2 / (x_@{i+2@} - 2 x_@{i+1@} + x_@{i@}) +@end example + +@end ifinfo +@noindent +which converges faster than the original sequence under reasonable +conditions. The new sequence requires three terms before it can produce +its first value so the method returns accelerated values on the second +and subsequent iterations. On the first iteration it returns the +ordinary Newton estimate. The Newton iterate is also returned if the +denominator of the acceleration term ever becomes zero. + +As with all acceleration procedures this method can become unstable if +the function is not well-behaved. +@end deffn + +@node Root Finding Examples +@section Examples + +For any root finding algorithm we need to prepare the function to be +solved. For this example we will use the general quadratic equation +described earlier. We first need a header file (@file{demo_fn.h}) to +define the function parameters, + +@example +@verbatiminclude examples/demo_fn.h +@end example + +@noindent +We place the function definitions in a separate file (@file{demo_fn.c}), + +@example +@verbatiminclude examples/demo_fn.c +@end example + +@noindent +The first program uses the function solver @code{gsl_root_fsolver_brent} +for Brent's method and the general quadratic defined above to solve the +following equation, +@tex +\beforedisplay +$$ +x^2 - 5 = 0 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +x^2 - 5 = 0 +@end example + +@end ifinfo +@noindent +with solution @math{x = \sqrt 5 = 2.236068...} + +@example +@verbatiminclude examples/roots.c +@end example + +@noindent +Here are the results of the iterations, + +@smallexample +$ ./a.out +using brent method + iter [ lower, upper] root err err(est) + 1 [1.0000000, 5.0000000] 1.0000000 -1.2360680 4.0000000 + 2 [1.0000000, 3.0000000] 3.0000000 +0.7639320 2.0000000 + 3 [2.0000000, 3.0000000] 2.0000000 -0.2360680 1.0000000 + 4 [2.2000000, 3.0000000] 2.2000000 -0.0360680 0.8000000 + 5 [2.2000000, 2.2366300] 2.2366300 +0.0005621 0.0366300 +Converged: + 6 [2.2360634, 2.2366300] 2.2360634 -0.0000046 0.0005666 +@end smallexample + +@noindent +If the program is modified to use the bisection solver instead of +Brent's method, by changing @code{gsl_root_fsolver_brent} to +@code{gsl_root_fsolver_bisection} the slower convergence of the +Bisection method can be observed, + +@smallexample +$ ./a.out +using bisection method + iter [ lower, upper] root err err(est) + 1 [0.0000000, 2.5000000] 1.2500000 -0.9860680 2.5000000 + 2 [1.2500000, 2.5000000] 1.8750000 -0.3610680 1.2500000 + 3 [1.8750000, 2.5000000] 2.1875000 -0.0485680 0.6250000 + 4 [2.1875000, 2.5000000] 2.3437500 +0.1076820 0.3125000 + 5 [2.1875000, 2.3437500] 2.2656250 +0.0295570 0.1562500 + 6 [2.1875000, 2.2656250] 2.2265625 -0.0095055 0.0781250 + 7 [2.2265625, 2.2656250] 2.2460938 +0.0100258 0.0390625 + 8 [2.2265625, 2.2460938] 2.2363281 +0.0002601 0.0195312 + 9 [2.2265625, 2.2363281] 2.2314453 -0.0046227 0.0097656 + 10 [2.2314453, 2.2363281] 2.2338867 -0.0021813 0.0048828 + 11 [2.2338867, 2.2363281] 2.2351074 -0.0009606 0.0024414 +Converged: + 12 [2.2351074, 2.2363281] 2.2357178 -0.0003502 0.0012207 +@end smallexample + +The next program solves the same function using a derivative solver +instead. + +@example +@verbatiminclude examples/rootnewt.c +@end example + +@noindent +Here are the results for Newton's method, + +@example +$ ./a.out +using newton method +iter root err err(est) + 1 3.0000000 +0.7639320 -2.0000000 + 2 2.3333333 +0.0972654 -0.6666667 + 3 2.2380952 +0.0020273 -0.0952381 +Converged: + 4 2.2360689 +0.0000009 -0.0020263 +@end example + +@noindent +Note that the error can be estimated more accurately by taking the +difference between the current iterate and next iterate rather than the +previous iterate. The other derivative solvers can be investigated by +changing @code{gsl_root_fdfsolver_newton} to +@code{gsl_root_fdfsolver_secant} or +@code{gsl_root_fdfsolver_steffenson}. + +@node Root Finding References and Further Reading +@section References and Further Reading + +For information on the Brent-Dekker algorithm see the following two +papers, + +@itemize @w{} +@item +R. P. Brent, ``An algorithm with guaranteed convergence for finding a +zero of a function'', @cite{Computer Journal}, 14 (1971) 422--425 + +@item +J. C. P. Bus and T. J. Dekker, ``Two Efficient Algorithms with Guaranteed +Convergence for Finding a Zero of a Function'', @cite{ACM Transactions of +Mathematical Software}, Vol.@: 1 No.@: 4 (1975) 330--345 +@end itemize + diff --git a/software/gsl-1.15/doc/siman-energy.eps b/software/gsl-1.15/doc/siman-energy.eps new file mode 100644 index 000000000..82a339244 --- /dev/null +++ b/software/gsl-1.15/doc/siman-energy.eps @@ -0,0 +1,11782 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Wed Dec 20 22:05:31 2006 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 49 177 500 576 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 49 177 500 576 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2315 2151 +2348 2140 +2370 2107 +2381 2052 +2381 2019 +2370 1964 +2348 1931 +2315 1920 +2293 1920 +2260 1931 +2238 1964 +2227 2019 +2227 2052 +2238 2107 +2260 2140 +2293 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2293 2151 +2271 2140 +2260 2129 +2249 2107 +2238 2052 +2238 2019 +2249 1964 +2260 1942 +2271 1931 +2293 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2315 1920 +2337 1931 +2348 1942 +2359 1964 +2370 2019 +2370 2052 +2359 2107 +2348 2129 +2337 2140 +2315 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3181 2151 +3159 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +3159 2041 +3181 2063 +3214 2074 +3247 2074 +3280 2063 +3302 2041 +3313 2008 +3313 1986 +3302 1953 +3280 1931 +3247 1920 +3214 1920 +3181 1931 +3170 1942 +3159 1964 +3159 1975 +3170 1986 +3181 1975 +3170 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3247 2074 +3269 2063 +3291 2041 +3302 2008 +3302 1986 +3291 1953 +3269 1931 +3247 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3181 2151 +3291 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +3181 2140 +3236 2140 +3291 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3467 2151 +3500 2140 +3522 2107 +3533 2052 +3533 2019 +3522 1964 +3500 1931 +3467 1920 +3445 1920 +3412 1931 +3390 1964 +3379 2019 +3379 2052 +3390 2107 +3412 2140 +3445 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3445 2151 +3423 2140 +3412 2129 +3401 2107 +3390 2052 +3390 2019 +3401 1964 +3412 1942 +3423 1931 +3445 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3467 1920 +3489 1931 +3500 1942 +3511 1964 +3522 2019 +3522 2052 +3511 2107 +3500 2129 +3489 2140 +3467 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3687 2151 +3720 2140 +3742 2107 +3753 2052 +3753 2019 +3742 1964 +3720 1931 +3687 1920 +3665 1920 +3632 1931 +3610 1964 +3599 2019 +3599 2052 +3610 2107 +3632 2140 +3665 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3665 2151 +3643 2140 +3632 2129 +3621 2107 +3610 2052 +3610 2019 +3621 1964 +3632 1942 +3643 1931 +3665 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3687 1920 +3709 1931 +3720 1942 +3731 1964 +3742 2019 +3742 2052 +3731 2107 +3720 2129 +3709 2140 +3687 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 9216 +3456 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 2304 +3456 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4234 2107 +4256 2118 +4289 2151 +4289 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4278 2140 +4278 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4234 1920 +4333 1920 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4509 2151 +4542 2140 +4564 2107 +4575 2052 +4575 2019 +4564 1964 +4542 1931 +4509 1920 +4487 1920 +4454 1931 +4432 1964 +4421 2019 +4421 2052 +4432 2107 +4454 2140 +4487 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4487 2151 +4465 2140 +4454 2129 +4443 2107 +4432 2052 +4432 2019 +4443 1964 +4454 1942 +4465 1931 +4487 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4509 1920 +4531 1931 +4542 1942 +4553 1964 +4564 2019 +4564 2052 +4553 2107 +4542 2129 +4531 2140 +4509 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4729 2151 +4762 2140 +4784 2107 +4795 2052 +4795 2019 +4784 1964 +4762 1931 +4729 1920 +4707 1920 +4674 1931 +4652 1964 +4641 2019 +4641 2052 +4652 2107 +4674 2140 +4707 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4707 2151 +4685 2140 +4674 2129 +4663 2107 +4652 2052 +4652 2019 +4663 1964 +4674 1942 +4685 1931 +4707 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4729 1920 +4751 1931 +4762 1942 +4773 1964 +4784 2019 +4784 2052 +4773 2107 +4762 2129 +4751 2140 +4729 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4949 2151 +4982 2140 +5004 2107 +5015 2052 +5015 2019 +5004 1964 +4982 1931 +4949 1920 +4927 1920 +4894 1931 +4872 1964 +4861 2019 +4861 2052 +4872 2107 +4894 2140 +4927 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4927 2151 +4905 2140 +4894 2129 +4883 2107 +4872 2052 +4872 2019 +4883 1964 +4894 1942 +4905 1931 +4927 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4949 1920 +4971 1931 +4982 1942 +4993 1964 +5004 2019 +5004 2052 +4993 2107 +4982 2129 +4971 2140 +4949 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5386 2107 +5408 2118 +5441 2151 +5441 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5430 2140 +5430 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5386 1920 +5485 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5595 2151 +5573 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +5573 2041 +5595 2063 +5628 2074 +5661 2074 +5694 2063 +5716 2041 +5727 2008 +5727 1986 +5716 1953 +5694 1931 +5661 1920 +5628 1920 +5595 1931 +5584 1942 +5573 1964 +5573 1975 +5584 1986 +5595 1975 +5584 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5661 2074 +5683 2063 +5705 2041 +5716 2008 +5716 1986 +5705 1953 +5683 1931 +5661 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5595 2151 +5705 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5595 2140 +5650 2140 +5705 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5881 2151 +5914 2140 +5936 2107 +5947 2052 +5947 2019 +5936 1964 +5914 1931 +5881 1920 +5859 1920 +5826 1931 +5804 1964 +5793 2019 +5793 2052 +5804 2107 +5826 2140 +5859 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5859 2151 +5837 2140 +5826 2129 +5815 2107 +5804 2052 +5804 2019 +5815 1964 +5826 1942 +5837 1931 +5859 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5881 1920 +5903 1931 +5914 1942 +5925 1964 +5936 2019 +5936 2052 +5925 2107 +5914 2129 +5903 2140 +5881 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6101 2151 +6134 2140 +6156 2107 +6167 2052 +6167 2019 +6156 1964 +6134 1931 +6101 1920 +6079 1920 +6046 1931 +6024 1964 +6013 2019 +6013 2052 +6024 2107 +6046 2140 +6079 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6079 2151 +6057 2140 +6046 2129 +6035 2107 +6024 2052 +6024 2019 +6035 1964 +6046 1942 +6057 1931 +6079 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6101 1920 +6123 1931 +6134 1942 +6145 1964 +6156 2019 +6156 2052 +6145 2107 +6134 2129 +6123 2140 +6101 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +6516 2107 +6527 2096 +6516 2085 +6505 2096 +6505 2107 +6516 2129 +6527 2140 +6560 2151 +6604 2151 +6637 2140 +6648 2129 +6659 2107 +6659 2085 +6648 2063 +6615 2041 +6560 2019 +6538 2008 +6516 1986 +6505 1953 +6505 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6604 2151 +6626 2140 +6637 2129 +6648 2107 +6648 2085 +6637 2063 +6604 2041 +6560 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6505 1942 +6516 1953 +6538 1953 +6593 1931 +6626 1931 +6648 1942 +6659 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6538 1953 +6593 1920 +6637 1920 +6648 1931 +6659 1953 +6659 1975 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6813 2151 +6846 2140 +6868 2107 +6879 2052 +6879 2019 +6868 1964 +6846 1931 +6813 1920 +6791 1920 +6758 1931 +6736 1964 +6725 2019 +6725 2052 +6736 2107 +6758 2140 +6791 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6791 2151 +6769 2140 +6758 2129 +6747 2107 +6736 2052 +6736 2019 +6747 1964 +6758 1942 +6769 1931 +6791 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6813 1920 +6835 1931 +6846 1942 +6857 1964 +6868 2019 +6868 2052 +6857 2107 +6846 2129 +6835 2140 +6813 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7033 2151 +7066 2140 +7088 2107 +7099 2052 +7099 2019 +7088 1964 +7066 1931 +7033 1920 +7011 1920 +6978 1931 +6956 1964 +6945 2019 +6945 2052 +6956 2107 +6978 2140 +7011 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7011 2151 +6989 2140 +6978 2129 +6967 2107 +6956 2052 +6956 2019 +6967 1964 +6978 1942 +6989 1931 +7011 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7033 1920 +7055 1931 +7066 1942 +7077 1964 +7088 2019 +7088 2052 +7077 2107 +7066 2129 +7055 2140 +7033 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7253 2151 +7286 2140 +7308 2107 +7319 2052 +7319 2019 +7308 1964 +7286 1931 +7253 1920 +7231 1920 +7198 1931 +7176 1964 +7165 2019 +7165 2052 +7176 2107 +7198 2140 +7231 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7231 2151 +7209 2140 +7198 2129 +7187 2107 +7176 2052 +7176 2019 +7187 1964 +7198 1942 +7209 1931 +7231 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7253 1920 +7275 1931 +7286 1942 +7297 1964 +7308 2019 +7308 2052 +7297 2107 +7286 2129 +7275 2140 +7253 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +7668 2107 +7679 2096 +7668 2085 +7657 2096 +7657 2107 +7668 2129 +7679 2140 +7712 2151 +7756 2151 +7789 2140 +7800 2129 +7811 2107 +7811 2085 +7800 2063 +7767 2041 +7712 2019 +7690 2008 +7668 1986 +7657 1953 +7657 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7756 2151 +7778 2140 +7789 2129 +7800 2107 +7800 2085 +7789 2063 +7756 2041 +7712 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7657 1942 +7668 1953 +7690 1953 +7745 1931 +7778 1931 +7800 1942 +7811 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +7690 1953 +7745 1920 +7789 1920 +7800 1931 +7811 1953 +7811 1975 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7899 2151 +7877 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +7877 2041 +7899 2063 +7932 2074 +7965 2074 +7998 2063 +8020 2041 +8031 2008 +8031 1986 +8020 1953 +7998 1931 +7965 1920 +7932 1920 +7899 1931 +7888 1942 +7877 1964 +7877 1975 +7888 1986 +7899 1975 +7888 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7965 2074 +7987 2063 +8009 2041 +8020 2008 +8020 1986 +8009 1953 +7987 1931 +7965 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7899 2151 +8009 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +7899 2140 +7954 2140 +8009 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8185 2151 +8218 2140 +8240 2107 +8251 2052 +8251 2019 +8240 1964 +8218 1931 +8185 1920 +8163 1920 +8130 1931 +8108 1964 +8097 2019 +8097 2052 +8108 2107 +8130 2140 +8163 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8163 2151 +8141 2140 +8130 2129 +8119 2107 +8108 2052 +8108 2019 +8119 1964 +8130 1942 +8141 1931 +8163 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8185 1920 +8207 1931 +8218 1942 +8229 1964 +8240 2019 +8240 2052 +8229 2107 +8218 2129 +8207 2140 +8185 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8405 2151 +8438 2140 +8460 2107 +8471 2052 +8471 2019 +8460 1964 +8438 1931 +8405 1920 +8383 1920 +8350 1931 +8328 1964 +8317 2019 +8317 2052 +8328 2107 +8350 2140 +8383 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8383 2151 +8361 2140 +8350 2129 +8339 2107 +8328 2052 +8328 2019 +8339 1964 +8350 1942 +8361 1931 +8383 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8405 1920 +8427 1931 +8438 1942 +8449 1964 +8460 2019 +8460 2052 +8449 2107 +8438 2129 +8427 2140 +8405 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 9216 +8064 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 2304 +8064 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +8820 2107 +8831 2096 +8820 2085 +8809 2096 +8809 2107 +8820 2129 +8831 2140 +8864 2151 +8908 2151 +8941 2140 +8952 2118 +8952 2085 +8941 2063 +8908 2052 +8875 2052 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8908 2151 +8930 2140 +8941 2118 +8941 2085 +8930 2063 +8908 2052 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8908 2052 +8930 2041 +8952 2019 +8963 1997 +8963 1964 +8952 1942 +8941 1931 +8908 1920 +8864 1920 +8831 1931 +8820 1942 +8809 1964 +8809 1975 +8820 1986 +8831 1975 +8820 1964 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8941 2030 +8952 1997 +8952 1964 +8941 1942 +8930 1931 +8908 1920 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9117 2151 +9150 2140 +9172 2107 +9183 2052 +9183 2019 +9172 1964 +9150 1931 +9117 1920 +9095 1920 +9062 1931 +9040 1964 +9029 2019 +9029 2052 +9040 2107 +9062 2140 +9095 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9095 2151 +9073 2140 +9062 2129 +9051 2107 +9040 2052 +9040 2019 +9051 1964 +9062 1942 +9073 1931 +9095 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9117 1920 +9139 1931 +9150 1942 +9161 1964 +9172 2019 +9172 2052 +9161 2107 +9150 2129 +9139 2140 +9117 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9337 2151 +9370 2140 +9392 2107 +9403 2052 +9403 2019 +9392 1964 +9370 1931 +9337 1920 +9315 1920 +9282 1931 +9260 1964 +9249 2019 +9249 2052 +9260 2107 +9282 2140 +9315 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9315 2151 +9293 2140 +9282 2129 +9271 2107 +9260 2052 +9260 2019 +9271 1964 +9282 1942 +9293 1931 +9315 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9337 1920 +9359 1931 +9370 1942 +9381 1964 +9392 2019 +9392 2052 +9381 2107 +9370 2129 +9359 2140 +9337 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9557 2151 +9590 2140 +9612 2107 +9623 2052 +9623 2019 +9612 1964 +9590 1931 +9557 1920 +9535 1920 +9502 1931 +9480 1964 +9469 2019 +9469 2052 +9480 2107 +9502 2140 +9535 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9535 2151 +9513 2140 +9502 2129 +9491 2107 +9480 2052 +9480 2019 +9491 1964 +9502 1942 +9513 1931 +9535 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9557 1920 +9579 1931 +9590 1942 +9601 1964 +9612 2019 +9612 2052 +9601 2107 +9590 2129 +9579 2140 +9557 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 2304 +1387 2304 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 2436 +1585 2425 +1607 2392 +1618 2337 +1618 2304 +1607 2249 +1585 2216 +1552 2205 +1530 2205 +1497 2216 +1475 2249 +1464 2304 +1464 2337 +1475 2392 +1497 2425 +1530 2436 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 2436 +1508 2425 +1497 2414 +1486 2392 +1475 2337 +1475 2304 +1486 2249 +1497 2227 +1508 2216 +1530 2205 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 2205 +1574 2216 +1585 2227 +1596 2249 +1607 2304 +1607 2337 +1596 2392 +1585 2414 +1574 2425 +1552 2436 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 2216 +1705 2205 +1694 2216 +1705 2227 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 2436 +1925 2425 +1936 2403 +1936 2370 +1925 2348 +1892 2337 +1848 2337 +1815 2348 +1804 2370 +1804 2403 +1815 2425 +1848 2436 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 2436 +1826 2425 +1815 2403 +1815 2370 +1826 2348 +1848 2337 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 2337 +1914 2348 +1925 2370 +1925 2403 +1914 2425 +1892 2436 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 2337 +1815 2326 +1804 2315 +1793 2293 +1793 2249 +1804 2227 +1815 2216 +1848 2205 +1892 2205 +1925 2216 +1936 2227 +1947 2249 +1947 2293 +1936 2315 +1925 2326 +1892 2337 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 2337 +1826 2326 +1815 2315 +1804 2293 +1804 2249 +1815 2227 +1826 2216 +1848 2205 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 2205 +1914 2216 +1925 2227 +1936 2249 +1936 2293 +1925 2315 +1914 2326 +1892 2337 +8 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +2112 2436 +2145 2425 +2156 2403 +2156 2370 +2145 2348 +2112 2337 +2068 2337 +2035 2348 +2024 2370 +2024 2403 +2035 2425 +2068 2436 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2068 2436 +2046 2425 +2035 2403 +2035 2370 +2046 2348 +2068 2337 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2112 2337 +2134 2348 +2145 2370 +2145 2403 +2134 2425 +2112 2436 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2068 2337 +2035 2326 +2024 2315 +2013 2293 +2013 2249 +2024 2227 +2035 2216 +2068 2205 +2112 2205 +2145 2216 +2156 2227 +2167 2249 +2167 2293 +2156 2315 +2145 2326 +2112 2337 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2068 2337 +2046 2326 +2035 2315 +2024 2293 +2024 2249 +2035 2227 +2046 2216 +2068 2205 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2112 2205 +2134 2216 +2145 2227 +2156 2249 +2156 2293 +2145 2315 +2134 2326 +2112 2337 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 3686 +1387 3686 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 3818 +1585 3807 +1607 3774 +1618 3719 +1618 3686 +1607 3631 +1585 3598 +1552 3587 +1530 3587 +1497 3598 +1475 3631 +1464 3686 +1464 3719 +1475 3774 +1497 3807 +1530 3818 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 3818 +1508 3807 +1497 3796 +1486 3774 +1475 3719 +1475 3686 +1486 3631 +1497 3609 +1508 3598 +1530 3587 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 3587 +1574 3598 +1585 3609 +1596 3631 +1607 3686 +1607 3719 +1596 3774 +1585 3796 +1574 3807 +1552 3818 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 3598 +1705 3587 +1694 3598 +1705 3609 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 3818 +1925 3807 +1936 3785 +1936 3752 +1925 3730 +1892 3719 +1848 3719 +1815 3730 +1804 3752 +1804 3785 +1815 3807 +1848 3818 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 3818 +1826 3807 +1815 3785 +1815 3752 +1826 3730 +1848 3719 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 3719 +1914 3730 +1925 3752 +1925 3785 +1914 3807 +1892 3818 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 3719 +1815 3708 +1804 3697 +1793 3675 +1793 3631 +1804 3609 +1815 3598 +1848 3587 +1892 3587 +1925 3598 +1936 3609 +1947 3631 +1947 3675 +1936 3697 +1925 3708 +1892 3719 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 3719 +1826 3708 +1815 3697 +1804 3675 +1804 3631 +1815 3609 +1826 3598 +1848 3587 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 3587 +1914 3598 +1925 3609 +1936 3631 +1936 3675 +1925 3697 +1914 3708 +1892 3719 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2013 3818 +2013 3752 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2013 3774 +2024 3796 +2046 3818 +2068 3818 +2123 3785 +2145 3785 +2156 3796 +2167 3818 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2024 3796 +2046 3807 +2068 3807 +2123 3785 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2167 3818 +2167 3785 +2156 3752 +2112 3697 +2101 3675 +2090 3642 +2090 3587 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +2156 3752 +2101 3697 +2090 3675 +2079 3642 +2079 3587 +5 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3686 +9078 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2442 3686 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 5069 +1387 5069 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 5201 +1585 5190 +1607 5157 +1618 5102 +1618 5069 +1607 5014 +1585 4981 +1552 4970 +1530 4970 +1497 4981 +1475 5014 +1464 5069 +1464 5102 +1475 5157 +1497 5190 +1530 5201 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 5201 +1508 5190 +1497 5179 +1486 5157 +1475 5102 +1475 5069 +1486 5014 +1497 4992 +1508 4981 +1530 4970 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 4970 +1574 4981 +1585 4992 +1596 5014 +1607 5069 +1607 5102 +1596 5157 +1585 5179 +1574 5190 +1552 5201 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 4981 +1705 4970 +1694 4981 +1705 4992 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 5201 +1925 5190 +1936 5168 +1936 5135 +1925 5113 +1892 5102 +1848 5102 +1815 5113 +1804 5135 +1804 5168 +1815 5190 +1848 5201 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 5201 +1826 5190 +1815 5168 +1815 5135 +1826 5113 +1848 5102 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 5102 +1914 5113 +1925 5135 +1925 5168 +1914 5190 +1892 5201 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 5102 +1815 5091 +1804 5080 +1793 5058 +1793 5014 +1804 4992 +1815 4981 +1848 4970 +1892 4970 +1925 4981 +1936 4992 +1947 5014 +1947 5058 +1936 5080 +1925 5091 +1892 5102 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 5102 +1826 5091 +1815 5080 +1804 5058 +1804 5014 +1815 4992 +1826 4981 +1848 4970 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 4970 +1914 4981 +1925 4992 +1936 5014 +1936 5058 +1925 5080 +1914 5091 +1892 5102 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2145 5168 +2134 5157 +2145 5146 +2156 5157 +2156 5168 +2145 5190 +2123 5201 +2090 5201 +2057 5190 +2035 5168 +2024 5146 +2013 5102 +2013 5036 +2024 5003 +2046 4981 +2079 4970 +2101 4970 +2134 4981 +2156 5003 +2167 5036 +2167 5047 +2156 5080 +2134 5102 +2101 5113 +2090 5113 +2057 5102 +2035 5080 +2024 5047 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2090 5201 +2068 5190 +2046 5168 +2035 5146 +2024 5102 +2024 5036 +2035 5003 +2057 4981 +2079 4970 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 4970 +2123 4981 +2145 5003 +2156 5036 +2156 5047 +2145 5080 +2123 5102 +2101 5113 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5069 +9078 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2442 5069 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 6451 +1387 6451 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 6583 +1585 6572 +1607 6539 +1618 6484 +1618 6451 +1607 6396 +1585 6363 +1552 6352 +1530 6352 +1497 6363 +1475 6396 +1464 6451 +1464 6484 +1475 6539 +1497 6572 +1530 6583 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 6583 +1508 6572 +1497 6561 +1486 6539 +1475 6484 +1475 6451 +1486 6396 +1497 6374 +1508 6363 +1530 6352 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 6352 +1574 6363 +1585 6374 +1596 6396 +1607 6451 +1607 6484 +1596 6539 +1585 6561 +1574 6572 +1552 6583 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 6363 +1705 6352 +1694 6363 +1705 6374 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 6583 +1925 6572 +1936 6550 +1936 6517 +1925 6495 +1892 6484 +1848 6484 +1815 6495 +1804 6517 +1804 6550 +1815 6572 +1848 6583 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 6583 +1826 6572 +1815 6550 +1815 6517 +1826 6495 +1848 6484 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 6484 +1914 6495 +1925 6517 +1925 6550 +1914 6572 +1892 6583 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 6484 +1815 6473 +1804 6462 +1793 6440 +1793 6396 +1804 6374 +1815 6363 +1848 6352 +1892 6352 +1925 6363 +1936 6374 +1947 6396 +1947 6440 +1936 6462 +1925 6473 +1892 6484 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 6484 +1826 6473 +1815 6462 +1804 6440 +1804 6396 +1815 6374 +1826 6363 +1848 6352 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 6352 +1914 6363 +1925 6374 +1936 6396 +1936 6440 +1925 6462 +1914 6473 +1892 6484 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 6583 +2013 6473 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2013 6473 +2035 6495 +2068 6506 +2101 6506 +2134 6495 +2156 6473 +2167 6440 +2167 6418 +2156 6385 +2134 6363 +2101 6352 +2068 6352 +2035 6363 +2024 6374 +2013 6396 +2013 6407 +2024 6418 +2035 6407 +2024 6396 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 6506 +2123 6495 +2145 6473 +2156 6440 +2156 6418 +2145 6385 +2123 6363 +2101 6352 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 6583 +2145 6583 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2035 6572 +2090 6572 +2145 6583 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6451 +9078 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2442 6451 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 7834 +1387 7834 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 7966 +1585 7955 +1607 7922 +1618 7867 +1618 7834 +1607 7779 +1585 7746 +1552 7735 +1530 7735 +1497 7746 +1475 7779 +1464 7834 +1464 7867 +1475 7922 +1497 7955 +1530 7966 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 7966 +1508 7955 +1497 7944 +1486 7922 +1475 7867 +1475 7834 +1486 7779 +1497 7757 +1508 7746 +1530 7735 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 7735 +1574 7746 +1585 7757 +1596 7779 +1607 7834 +1607 7867 +1596 7922 +1585 7944 +1574 7955 +1552 7966 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 7746 +1705 7735 +1694 7746 +1705 7757 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 7966 +1925 7955 +1936 7933 +1936 7900 +1925 7878 +1892 7867 +1848 7867 +1815 7878 +1804 7900 +1804 7933 +1815 7955 +1848 7966 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 7966 +1826 7955 +1815 7933 +1815 7900 +1826 7878 +1848 7867 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 7867 +1914 7878 +1925 7900 +1925 7933 +1914 7955 +1892 7966 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 7867 +1815 7856 +1804 7845 +1793 7823 +1793 7779 +1804 7757 +1815 7746 +1848 7735 +1892 7735 +1925 7746 +1936 7757 +1947 7779 +1947 7823 +1936 7845 +1925 7856 +1892 7867 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 7867 +1826 7856 +1815 7845 +1804 7823 +1804 7779 +1815 7757 +1826 7746 +1848 7735 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 7735 +1914 7746 +1925 7757 +1936 7779 +1936 7823 +1925 7845 +1914 7856 +1892 7867 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2112 7944 +2112 7735 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2123 7966 +2123 7735 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2123 7966 +2002 7801 +2178 7801 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2079 7735 +2156 7735 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7834 +9078 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2442 7834 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1189 9216 +1387 9216 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1552 9348 +1585 9337 +1607 9304 +1618 9249 +1618 9216 +1607 9161 +1585 9128 +1552 9117 +1530 9117 +1497 9128 +1475 9161 +1464 9216 +1464 9249 +1475 9304 +1497 9337 +1530 9348 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1530 9348 +1508 9337 +1497 9326 +1486 9304 +1475 9249 +1475 9216 +1486 9161 +1497 9139 +1508 9128 +1530 9117 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +1552 9117 +1574 9128 +1585 9139 +1596 9161 +1607 9216 +1607 9249 +1596 9304 +1585 9326 +1574 9337 +1552 9348 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 9128 +1705 9117 +1694 9128 +1705 9139 +4 Poly +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +1892 9348 +1925 9337 +1936 9315 +1936 9282 +1925 9260 +1892 9249 +1848 9249 +1815 9260 +1804 9282 +1804 9315 +1815 9337 +1848 9348 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1848 9348 +1826 9337 +1815 9315 +1815 9282 +1826 9260 +1848 9249 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 9249 +1914 9260 +1925 9282 +1925 9315 +1914 9337 +1892 9348 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1848 9249 +1815 9238 +1804 9227 +1793 9205 +1793 9161 +1804 9139 +1815 9128 +1848 9117 +1892 9117 +1925 9128 +1936 9139 +1947 9161 +1947 9205 +1936 9227 +1925 9238 +1892 9249 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1848 9249 +1826 9238 +1815 9227 +1804 9205 +1804 9161 +1815 9139 +1826 9128 +1848 9117 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1892 9117 +1914 9128 +1925 9139 +1936 9161 +1936 9205 +1925 9227 +1914 9238 +1892 9249 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +2024 9304 +2035 9293 +2024 9282 +2013 9293 +2013 9304 +2024 9326 +2035 9337 +2068 9348 +2112 9348 +2145 9337 +2156 9315 +2156 9282 +2145 9260 +2112 9249 +2079 9249 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2112 9348 +2134 9337 +2145 9315 +2145 9282 +2134 9260 +2112 9249 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2112 9249 +2134 9238 +2156 9216 +2167 9194 +2167 9161 +2156 9139 +2145 9128 +2112 9117 +2068 9117 +2035 9128 +2024 9139 +2013 9161 +2013 9172 +2024 9183 +2035 9172 +2024 9161 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2145 9227 +2156 9194 +2156 9161 +2145 9139 +2134 9128 +2112 9117 +6 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2580 +9161 2580 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2580 +2359 2580 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2857 +9161 2857 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2857 +2359 2857 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3133 +9161 3133 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3133 +2359 3133 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3410 +9161 3410 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3410 +2359 3410 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3686 +9161 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3686 +2359 3686 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3963 +9161 3963 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3963 +2359 3963 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4239 +9161 4239 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4239 +2359 4239 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4516 +9161 4516 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4516 +2359 4516 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4792 +9161 4792 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4792 +2359 4792 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5069 +9161 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5069 +2359 5069 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5345 +9161 5345 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5345 +2359 5345 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5622 +9161 5622 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5622 +2359 5622 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5898 +9161 5898 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5898 +2359 5898 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6175 +9161 6175 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6175 +2359 6175 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6451 +9161 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6451 +2359 6451 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6728 +9161 6728 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6728 +2359 6728 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7004 +9161 7004 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7004 +2359 7004 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7281 +9161 7281 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7281 +2359 7281 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7557 +9161 7557 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7557 +2359 7557 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7834 +9161 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7834 +2359 7834 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8110 +9161 8110 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8110 +2359 8110 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8387 +9161 8387 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8387 +2359 8387 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8663 +9161 8663 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8663 +2359 8663 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8940 +9161 8940 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8940 +2359 8940 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4858 1621 +4880 1610 +4891 1599 +4902 1577 +4902 1555 +4891 1533 +4880 1522 +4858 1511 +4836 1511 +4814 1522 +4803 1533 +4792 1555 +4792 1577 +4803 1599 +4814 1610 +4836 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4814 1610 +4803 1588 +4803 1544 +4814 1522 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4880 1522 +4891 1544 +4891 1588 +4880 1610 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +4891 1599 +4902 1610 +4924 1621 +4924 1610 +4902 1610 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4803 1533 +4792 1522 +4781 1500 +4781 1489 +4792 1467 +4825 1456 +4880 1456 +4913 1445 +4924 1434 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +4781 1489 +4792 1478 +4825 1467 +4880 1467 +4913 1456 +4924 1434 +4924 1423 +4913 1401 +4880 1390 +4814 1390 +4781 1401 +4770 1423 +4770 1434 +4781 1456 +4814 1467 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5001 1555 +5133 1555 +5133 1577 +5122 1599 +5111 1610 +5089 1621 +5056 1621 +5023 1610 +5001 1588 +4990 1555 +4990 1533 +5001 1500 +5023 1478 +5056 1467 +5078 1467 +5111 1478 +5133 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5122 1555 +5122 1588 +5111 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5056 1621 +5034 1610 +5012 1588 +5001 1555 +5001 1533 +5012 1500 +5034 1478 +5056 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5221 1621 +5221 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5232 1621 +5232 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5232 1588 +5254 1610 +5287 1621 +5309 1621 +5342 1610 +5353 1588 +5353 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5309 1621 +5331 1610 +5342 1588 +5342 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1621 +5232 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1467 +5265 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5309 1467 +5386 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5452 1555 +5584 1555 +5584 1577 +5573 1599 +5562 1610 +5540 1621 +5507 1621 +5474 1610 +5452 1588 +5441 1555 +5441 1533 +5452 1500 +5474 1478 +5507 1467 +5529 1467 +5562 1478 +5584 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5573 1555 +5573 1588 +5562 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5507 1621 +5485 1610 +5463 1588 +5452 1555 +5452 1533 +5463 1500 +5485 1478 +5507 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5672 1621 +5672 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5683 1621 +5683 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5683 1555 +5694 1588 +5716 1610 +5738 1621 +5771 1621 +5782 1610 +5782 1599 +5771 1588 +5760 1599 +5771 1610 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1621 +5683 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1467 +5716 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +5859 1599 +5859 1588 +5848 1588 +5848 1599 +5859 1610 +5881 1621 +5925 1621 +5947 1610 +5958 1599 +5969 1577 +5969 1500 +5980 1478 +5991 1467 +13 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +5958 1599 +5958 1500 +5969 1478 +5991 1467 +6002 1467 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +5958 1577 +5947 1566 +5881 1555 +5848 1544 +5837 1522 +5837 1500 +5848 1478 +5881 1467 +5914 1467 +5936 1478 +5958 1500 +11 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5881 1555 +5859 1544 +5848 1522 +5848 1500 +5859 1478 +5881 1467 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6079 1698 +6079 1511 +6090 1478 +6112 1467 +6134 1467 +6156 1478 +6167 1500 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6090 1698 +6090 1511 +6101 1478 +6112 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6046 1621 +6134 1621 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6255 1687 +6244 1676 +6233 1687 +6244 1698 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6244 1621 +6244 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6255 1621 +6255 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1621 +6255 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1467 +6288 1467 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6431 1621 +6464 1610 +6486 1588 +6497 1555 +6497 1533 +6486 1500 +6464 1478 +6431 1467 +6409 1467 +6376 1478 +6354 1500 +6343 1533 +6343 1555 +6354 1588 +6376 1610 +6409 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6409 1621 +6387 1610 +6365 1588 +6354 1555 +6354 1533 +6365 1500 +6387 1478 +6409 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6431 1467 +6453 1478 +6475 1500 +6486 1533 +6486 1555 +6475 1588 +6453 1610 +6431 1621 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6585 1621 +6585 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6596 1621 +6596 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6596 1588 +6618 1610 +6651 1621 +6673 1621 +6706 1610 +6717 1588 +6717 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6673 1621 +6695 1610 +6706 1588 +6706 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1621 +6596 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1467 +6629 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6673 1467 +6750 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +711 5172 +711 5304 +689 5304 +667 5293 +656 5282 +645 5260 +645 5227 +656 5194 +678 5172 +711 5161 +733 5161 +766 5172 +788 5194 +799 5227 +799 5249 +788 5282 +766 5304 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +711 5293 +678 5293 +656 5282 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +645 5227 +656 5205 +678 5183 +711 5172 +733 5172 +766 5183 +788 5205 +799 5227 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5392 +799 5392 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5403 +799 5403 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +678 5403 +656 5425 +645 5458 +645 5480 +656 5513 +678 5524 +799 5524 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +645 5480 +656 5502 +678 5513 +799 5513 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5359 +645 5403 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +799 5359 +799 5436 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +799 5480 +799 5557 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +711 5623 +711 5755 +689 5755 +667 5744 +656 5733 +645 5711 +645 5678 +656 5645 +678 5623 +711 5612 +733 5612 +766 5623 +788 5645 +799 5678 +799 5700 +788 5733 +766 5755 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +711 5744 +678 5744 +656 5733 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +645 5678 +656 5656 +678 5634 +711 5623 +733 5623 +766 5634 +788 5656 +799 5678 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5842 +799 5842 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5853 +799 5853 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +711 5853 +678 5864 +656 5886 +645 5908 +645 5941 +656 5952 +667 5952 +678 5941 +667 5930 +656 5941 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 5809 +645 5853 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +799 5809 +799 5886 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +645 6084 +656 6106 +667 6117 +689 6128 +711 6128 +733 6117 +744 6106 +755 6084 +755 6062 +744 6040 +733 6029 +711 6018 +689 6018 +667 6029 +656 6040 +645 6062 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +656 6040 +678 6029 +722 6029 +744 6040 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +744 6106 +722 6117 +678 6117 +656 6106 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +667 6117 +656 6128 +645 6150 +656 6150 +656 6128 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +733 6029 +744 6018 +766 6007 +777 6007 +799 6018 +810 6051 +810 6106 +821 6139 +832 6150 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +777 6007 +788 6018 +799 6051 +799 6106 +810 6139 +832 6150 +843 6150 +865 6139 +876 6106 +876 6040 +865 6007 +843 5996 +832 5996 +810 6007 +799 6040 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 6227 +799 6293 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 6238 +777 6293 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +645 6359 +799 6293 +843 6271 +865 6249 +876 6227 +876 6216 +865 6205 +854 6216 +865 6227 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 6205 +645 6271 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +645 6315 +645 6381 +2 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +2304 3913 +2306 3524 +2309 4474 +2311 3291 +2313 7013 +2316 9033 +2318 3717 +2320 3291 +2322 3448 +2325 5091 +2327 4710 +2329 6599 +2332 4035 +2334 3719 +2336 4855 +2339 4639 +2341 3552 +2343 3315 +2345 6618 +2348 4236 +2350 3461 +2352 3315 +2355 4468 +2357 3291 +2359 3290 +2362 7133 +2364 3407 +2366 3696 +2369 3303 +2371 3420 +2373 3547 +2375 4392 +2378 3882 +2380 4522 +2382 4110 +2385 3401 +2387 3305 +2389 4302 +2392 3348 +2394 3333 +2396 3612 +2398 6772 +2401 3641 +2403 3382 +2405 3291 +2408 3372 +2410 6432 +2412 4985 +2415 3597 +2417 3296 +2419 3333 +2422 4535 +2424 3727 +2426 3582 +2428 4334 +2431 4537 +2433 3596 +2435 3694 +2438 3670 +2440 3314 +2442 3422 +2445 3583 +2447 4524 +2449 6042 +2451 3508 +2454 5608 +2456 3589 +2458 4100 +2461 3564 +2463 3542 +2465 3358 +2468 3352 +2470 4227 +2472 3507 +2474 4068 +2477 3803 +2479 7461 +2481 3617 +2484 3290 +2486 3300 +2488 8524 +2491 4820 +2493 3837 +2495 3707 +2498 3437 +2500 3327 +2502 3611 +2504 3408 +2507 3612 +2509 3358 +2511 4195 +2514 4363 +2516 3475 +2518 4405 +2521 3567 +2523 4881 +2525 4280 +2527 3471 +2530 4632 +2532 3657 +2534 5213 +2537 3456 +2539 3871 +2541 3333 +2544 4181 +2546 3292 +2548 3431 +2551 3679 +2553 3438 +2555 3380 +2557 3949 +2560 4532 +2562 3297 +2564 3299 +2567 3928 +2569 3977 +2571 3713 +2574 3439 +2576 3399 +2578 3574 +2580 3476 +2583 3335 +2585 4452 +2587 4551 +2590 3425 +2592 4218 +2594 3802 +2597 5543 +2599 3419 +2601 3527 +2604 3591 +2606 4652 +2608 3292 +2610 3889 +2613 3290 +2615 3311 +2617 3466 +2620 3290 +2622 4131 +2624 3424 +2627 3579 +2629 3370 +2631 4303 +2633 3345 +2636 4516 +2638 3298 +2640 3295 +2643 3704 +2645 3527 +2647 3319 +2650 3422 +2652 3371 +2654 4250 +2657 3487 +2659 3350 +2661 3291 +2663 5719 +2666 3356 +2668 3791 +2670 3543 +2673 4164 +2675 3830 +2677 3444 +2680 3766 +2682 3478 +2684 3361 +2686 3699 +2689 6142 +2691 3290 +2693 4189 +2696 3300 +2698 4503 +2700 3360 +2703 4097 +2705 3483 +2707 4962 +2710 3476 +2712 4439 +2714 4188 +2716 5653 +2719 4309 +2721 3664 +2723 3400 +2726 4114 +2728 3937 +2730 3452 +2733 3402 +2735 4150 +2737 5020 +2739 3536 +2742 3608 +2744 3434 +2746 3295 +2749 3344 +2751 3983 +2753 3290 +2756 3329 +2758 3310 +2760 3415 +2762 3302 +2765 3848 +2767 3622 +2769 3606 +2772 3388 +2774 3577 +2776 3636 +2779 3513 +2781 3391 +2783 3715 +2786 3329 +2788 3290 +2790 4134 +2792 3314 +2795 3297 +2797 3290 +2799 3302 +2802 6602 +2804 3312 +2806 3412 +2809 3783 +2811 3685 +2813 6632 +2815 3365 +2818 3336 +2820 5241 +2822 3433 +2825 3311 +2827 3415 +2829 3297 +2832 4080 +2834 3578 +2836 3465 +2839 3290 +2841 4441 +2843 3290 +2845 3996 +2848 3377 +2850 3294 +2852 3465 +2855 3291 +2857 3408 +2859 3291 +2862 3319 +2864 3895 +2866 3833 +2868 3293 +2871 3323 +2873 3461 +2875 3294 +2878 3325 +2880 3295 +2882 3307 +2885 3317 +2887 3368 +2889 3378 +2892 3295 +2894 4232 +2896 3367 +2898 3290 +2901 3596 +2903 4308 +2905 3376 +2908 3510 +2910 3910 +2912 3295 +2915 3295 +2917 3335 +2919 3355 +2921 3365 +2924 3294 +2926 3405 +2928 3290 +2931 3308 +2933 3435 +2935 3355 +2938 3300 +2940 3404 +2942 3310 +2945 3294 +2947 3302 +2949 3291 +2951 4978 +2954 3340 +2956 3596 +2958 5354 +2961 3298 +2963 3772 +2965 3323 +2968 3370 +2970 3307 +2972 4018 +2974 3358 +2977 3868 +2979 3298 +2981 3297 +2984 3319 +2986 3293 +2988 3619 +2991 3410 +2993 3317 +2995 3414 +2998 3299 +3000 3347 +3002 3334 +3004 3313 +3007 3348 +3009 4841 +3011 3572 +3014 3489 +3016 3474 +3018 3386 +3021 4339 +3023 4032 +3025 3332 +3027 3309 +3030 3291 +3032 3290 +3034 3468 +3037 4515 +3039 3582 +3041 3292 +3044 3305 +3046 3649 +3048 3539 +3050 3689 +3053 3418 +3055 5165 +3057 3354 +3060 3372 +3062 3339 +3064 3438 +3067 3389 +3069 3505 +3071 3290 +3074 3363 +3076 3672 +3078 3394 +3080 3439 +3083 3311 +3085 3800 +3087 3378 +3090 3803 +3092 3518 +3094 3309 +3097 3290 +3099 4032 +3101 3295 +3103 3314 +3106 4187 +3108 3360 +3110 3539 +3113 3377 +3115 3460 +3117 3390 +3120 3290 +3122 3424 +3124 3417 +3127 3379 +3129 3355 +3131 3419 +3133 3618 +3136 3683 +3138 3338 +3140 3290 +3143 3825 +3145 3319 +3147 3369 +3150 3356 +3152 3760 +3154 3315 +3156 3290 +3159 3427 +3161 3373 +3163 3551 +3166 3394 +3168 3382 +3170 3567 +3173 3294 +3175 3290 +3177 3656 +3180 3349 +3182 3645 +3184 3290 +3186 3290 +3189 3313 +3191 3393 +3193 3290 +3196 3324 +3198 3330 +3200 3387 +3203 3435 +3205 3307 +3207 3475 +3209 3314 +3212 3589 +3214 3350 +3216 3309 +3219 3333 +3221 3304 +3223 3452 +3226 3291 +3228 3297 +3230 3290 +3233 3345 +3235 3375 +3237 3329 +3239 3461 +3242 3341 +3244 3477 +3246 3311 +3249 3580 +3251 3304 +3253 3334 +3256 3344 +3258 3342 +3260 3386 +3262 3449 +3265 3320 +3267 3300 +3269 3620 +3272 3420 +3274 3291 +3276 3430 +3279 3290 +3281 5045 +3283 3290 +3286 3364 +3288 3744 +3290 3315 +3292 3306 +3295 3330 +3297 3420 +3299 3292 +3302 3453 +3304 3437 +3306 3300 +3309 3361 +3311 3290 +3313 3906 +3315 3521 +3318 3426 +3320 3309 +3322 3450 +3325 3490 +3327 3693 +3329 3290 +3332 3435 +3334 4694 +3336 3654 +3338 3301 +3341 3770 +3343 3294 +3345 3317 +3348 3335 +3350 3451 +3352 3481 +3355 3303 +3357 3546 +3359 3430 +3362 3303 +3364 3466 +3366 3846 +3368 3461 +3371 3298 +3373 3304 +3375 3399 +3378 3350 +3380 3401 +3382 3291 +3385 3331 +3387 3706 +3389 3336 +3391 3450 +3394 3350 +3396 3539 +3398 3361 +3401 3695 +3403 3295 +3405 3565 +3408 3613 +3410 3325 +3412 3314 +3415 3575 +3417 3421 +3419 3330 +3421 3541 +3424 3477 +3426 3445 +3428 3294 +3431 3461 +3433 3332 +3435 3377 +3438 3429 +3440 3476 +3442 3311 +3444 3315 +3447 3372 +3449 3296 +3451 3383 +3454 3380 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +3454 3380 +3456 3576 +3458 3292 +3461 3706 +3463 3489 +3465 3316 +3468 3292 +3470 3366 +3472 3365 +3474 3312 +3477 3534 +3479 3372 +3481 3304 +3484 3903 +3486 3300 +3488 3296 +3491 3533 +3493 3295 +3495 3352 +3497 3494 +3500 3291 +3502 3303 +3504 3484 +3507 3298 +3509 3293 +3511 3296 +3514 3421 +3516 3378 +3518 3939 +3521 3295 +3523 3304 +3525 3296 +3527 3633 +3530 3325 +3532 3495 +3534 3307 +3537 3307 +3539 3558 +3541 3297 +3544 3307 +3546 3844 +3548 3924 +3550 3301 +3553 3296 +3555 3352 +3557 3320 +3560 3380 +3562 3295 +3564 3317 +3567 3290 +3569 3553 +3571 3325 +3574 3397 +3576 3377 +3578 3506 +3580 3309 +3583 3299 +3585 3417 +3587 3310 +3590 3354 +3592 3299 +3594 3637 +3597 3329 +3599 3308 +3601 3290 +3603 3582 +3606 3290 +3608 3305 +3610 3309 +3613 3294 +3615 3320 +3617 3290 +3620 3298 +3622 3529 +3624 3293 +3626 3292 +3629 3291 +3631 3308 +3633 3291 +3636 3313 +3638 3299 +3640 3291 +3643 3306 +3645 3296 +3647 3563 +3650 3740 +3652 3290 +3654 3291 +3656 3493 +3659 3338 +3661 3362 +3663 3386 +3666 3377 +3668 3324 +3670 3304 +3673 3380 +3675 3291 +3677 3544 +3679 3291 +3682 3773 +3684 3357 +3686 3309 +3689 3693 +3691 3330 +3693 3448 +3696 3631 +3698 3587 +3700 3391 +3703 3391 +3705 3293 +3707 3290 +3709 3359 +3712 3304 +3714 3290 +3716 3355 +3719 3290 +3721 3519 +3723 3290 +3726 3290 +3728 3439 +3730 3465 +3732 3294 +3735 3371 +3737 3553 +3739 3290 +3742 3321 +3744 3309 +3746 3336 +3749 3298 +3751 3298 +3753 3320 +3756 3388 +3758 3527 +3760 3616 +3762 3346 +3765 3348 +3767 3363 +3769 3479 +3772 3369 +3774 3419 +3776 3364 +3779 3343 +3781 3404 +3783 3302 +3785 3360 +3788 3637 +3790 3295 +3792 3369 +3795 3312 +3797 3297 +3799 3352 +3802 3393 +3804 3290 +3806 3462 +3809 3296 +3811 3335 +3813 3293 +3815 3298 +3818 3290 +3820 3391 +3822 3423 +3825 3330 +3827 3292 +3829 3290 +3832 3348 +3834 3302 +3836 3319 +3838 3394 +3841 3291 +3843 3291 +3845 3298 +3848 3310 +3850 3343 +3852 3355 +3855 3314 +3857 3637 +3859 3291 +3862 3387 +3864 3290 +3866 3358 +3868 3293 +3871 3318 +3873 3314 +3875 3297 +3878 3331 +3880 3347 +3882 3291 +3885 3394 +3887 3415 +3889 3293 +3891 3292 +3894 3298 +3896 3534 +3898 3309 +3901 3299 +3903 3293 +3905 3388 +3908 3290 +3910 3296 +3912 3291 +3914 3301 +3917 3551 +3919 3307 +3921 3353 +3924 3304 +3926 3290 +3928 3307 +3931 3290 +3933 3660 +3935 3305 +3938 3291 +3940 3533 +3942 3476 +3944 3326 +3947 3314 +3949 3306 +3951 3537 +3954 3290 +3956 3420 +3958 3328 +3961 3298 +3963 3442 +3965 3325 +3967 3368 +3970 3291 +3972 3375 +3974 3432 +3977 3345 +3979 3696 +3981 3515 +3984 3333 +3986 3362 +3988 3293 +3991 3300 +3993 3383 +3995 3405 +3997 3317 +4000 3385 +4002 3390 +4004 3290 +4007 3398 +4009 3353 +4011 3343 +4014 3384 +4016 3290 +4018 3294 +4020 3300 +4023 3502 +4025 3296 +4027 3297 +4030 3307 +4032 3290 +4034 3291 +4037 3298 +4039 3300 +4041 3396 +4044 3307 +4046 3398 +4048 3290 +4050 3290 +4053 3301 +4055 3611 +4057 3329 +4060 3370 +4062 3402 +4064 3333 +4067 3302 +4069 3401 +4071 3339 +4073 3301 +4076 3291 +4078 3319 +4080 3300 +4083 3297 +4085 3291 +4087 3434 +4090 3508 +4092 3313 +4094 3295 +4097 3316 +4099 3299 +4101 3434 +4103 3354 +4106 3517 +4108 3290 +4110 3610 +4113 3290 +4115 3290 +4117 3328 +4120 3321 +4122 3290 +4124 3430 +4126 3376 +4129 3303 +4131 3355 +4133 3290 +4136 3448 +4138 3419 +4140 3372 +4143 3339 +4145 3434 +4147 3351 +4150 3311 +4152 3320 +4154 3356 +4156 3290 +4159 3323 +4161 3375 +4163 3290 +4166 3300 +4168 3294 +4170 3290 +4173 3290 +4175 3301 +4177 3335 +4179 3298 +4182 3307 +4184 3435 +4186 3290 +4189 3291 +4191 3368 +4193 3290 +4196 3341 +4198 3374 +4200 3329 +4202 3365 +4205 3333 +4207 3328 +4209 3294 +4212 3318 +4214 3461 +4216 3354 +4219 3331 +4221 3290 +4223 3360 +4226 3290 +4228 3290 +4230 3344 +4232 3324 +4235 3293 +4237 3291 +4239 3318 +4242 3367 +4244 3331 +4246 3290 +4249 3316 +4251 3418 +4253 3428 +4255 3291 +4258 3485 +4260 3368 +4262 3300 +4265 3303 +4267 3322 +4269 3434 +4272 3319 +4274 3387 +4276 3308 +4279 3556 +4281 3291 +4283 3418 +4285 3301 +4288 3340 +4290 3340 +4292 3294 +4295 3294 +4297 3342 +4299 3347 +4302 3291 +4304 3290 +4306 3311 +4308 3295 +4311 3314 +4313 3322 +4315 3486 +4318 3291 +4320 3309 +4322 3316 +4325 3329 +4327 3290 +4329 3338 +4332 3350 +4334 3290 +4336 3298 +4338 3290 +4341 3297 +4343 3363 +4345 3439 +4348 3304 +4350 3295 +4352 3307 +4355 3454 +4357 3290 +4359 3291 +4361 3301 +4364 3327 +4366 3295 +4368 3301 +4371 3296 +4373 3485 +4375 3380 +4378 3291 +4380 3290 +4382 3294 +4385 3371 +4387 3333 +4389 3295 +4391 3290 +4394 3399 +4396 3327 +4398 3407 +4401 3359 +4403 3290 +4405 3293 +4408 3305 +4410 3296 +4412 3319 +4414 3338 +4417 3290 +4419 3303 +4421 3290 +4424 3290 +4426 3381 +4428 3296 +4431 3290 +4433 3293 +4435 3293 +4438 3293 +4440 3376 +4442 3290 +4444 3291 +4447 3290 +4449 3351 +4451 3302 +4454 3304 +4456 3321 +4458 3320 +4461 3290 +4463 3291 +4465 3290 +4467 3321 +4470 3433 +4472 3290 +4474 3303 +4477 3347 +4479 3345 +4481 3346 +4484 3290 +4486 3301 +4488 3295 +4490 3311 +4493 3341 +4495 3295 +4497 3294 +4500 3303 +4502 3322 +4504 3302 +4507 3295 +4509 3290 +4511 3299 +4514 3337 +4516 3396 +4518 3290 +4520 3294 +4523 3294 +4525 3319 +4527 3359 +4530 3570 +4532 3309 +4534 3309 +4537 3290 +4539 3321 +4541 3290 +4543 3294 +4546 3291 +4548 3290 +4550 3426 +4553 3290 +4555 3290 +4557 3290 +4560 3305 +4562 3304 +4564 3299 +4567 3291 +4569 3347 +4571 3293 +4573 3303 +4576 3295 +4578 3324 +4580 3321 +4583 3330 +4585 3291 +4587 3294 +4590 3319 +4592 3331 +4594 3380 +4596 3291 +4599 3290 +4601 3290 +4603 3391 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +4603 3391 +4606 3290 +4608 3326 +4610 3365 +4613 3359 +4615 3319 +4617 3290 +4620 3293 +4622 3295 +4624 3290 +4626 3292 +4629 3311 +4631 3292 +4633 3385 +4636 3309 +4638 3318 +4640 3290 +4643 3305 +4645 3309 +4647 3332 +4649 3294 +4652 3297 +4654 3331 +4656 3320 +4659 3294 +4661 3299 +4663 3352 +4666 3334 +4668 3290 +4670 3291 +4673 3307 +4675 3306 +4677 3326 +4679 3291 +4682 3312 +4684 3316 +4686 3322 +4689 3337 +4691 3307 +4693 3292 +4696 3376 +4698 3373 +4700 3291 +4702 3395 +4705 3290 +4707 3417 +4709 3306 +4712 3367 +4714 3300 +4716 3297 +4719 3299 +4721 3295 +4723 3304 +4726 3292 +4728 3305 +4730 3294 +4732 3293 +4735 3290 +4737 3294 +4739 3305 +4742 3290 +4744 3290 +4746 3290 +4749 3292 +4751 3307 +4753 3304 +4755 3290 +4758 3290 +4760 3290 +4762 3290 +4765 3290 +4767 3290 +4769 3290 +4772 3312 +4774 3296 +4776 3292 +4778 3350 +4781 3310 +4783 3301 +4785 3304 +4788 3338 +4790 3305 +4792 3306 +4795 3332 +4797 3290 +4799 3322 +4802 3295 +4804 3293 +4806 3291 +4808 3304 +4811 3290 +4813 3291 +4815 3302 +4818 3318 +4820 3310 +4822 3458 +4825 3317 +4827 3290 +4829 3290 +4831 3316 +4834 3305 +4836 3311 +4838 3290 +4841 3294 +4843 3294 +4845 3294 +4848 3292 +4850 3290 +4852 3290 +4855 3290 +4857 3293 +4859 3340 +4861 3295 +4864 3295 +4866 3296 +4868 3306 +4871 3344 +4873 3301 +4875 3292 +4878 3326 +4880 3290 +4882 3337 +4884 3301 +4887 3339 +4889 3295 +4891 3311 +4894 3300 +4896 3290 +4898 3290 +4901 3290 +4903 3311 +4905 3293 +4908 3316 +4910 3295 +4912 3302 +4914 3291 +4917 3301 +4919 3314 +4921 3306 +4924 3291 +4926 3292 +4928 3290 +4931 3293 +4933 3309 +4935 3290 +4937 3322 +4940 3316 +4942 3295 +4944 3290 +4947 3294 +4949 3403 +4951 3290 +4954 3322 +4956 3291 +4958 3307 +4961 3290 +4963 3295 +4965 3314 +4967 3367 +4970 3291 +4972 3294 +4974 3290 +4977 3290 +4979 3290 +4981 3294 +4984 3294 +4986 3314 +4988 3300 +4990 3294 +4993 3305 +4995 3299 +4997 3295 +5000 3342 +5002 3309 +5004 3328 +5007 3293 +5009 3295 +5011 3310 +5014 3310 +5016 3290 +5018 3290 +5020 3325 +5023 3292 +5025 3290 +5027 3291 +5030 3294 +5032 3312 +5034 3291 +5037 3293 +5039 3317 +5041 3290 +5043 3290 +5046 3294 +5048 3304 +5050 3290 +5053 3290 +5055 3290 +5057 3290 +5060 3290 +5062 3388 +5064 3308 +5066 3305 +5069 3290 +5071 3290 +5073 3292 +5076 3292 +5078 3290 +5080 3290 +5083 3297 +5085 3292 +5087 3406 +5090 3307 +5092 3317 +5094 3309 +5096 3313 +5099 3290 +5101 3290 +5103 3320 +5106 3292 +5108 3290 +5110 3304 +5113 3327 +5115 3290 +5117 3345 +5119 3291 +5122 3291 +5124 3290 +5126 3300 +5129 3292 +5131 3298 +5133 3298 +5136 3291 +5138 3310 +5140 3295 +5143 3297 +5145 3310 +5147 3353 +5149 3290 +5152 3307 +5154 3291 +5156 3297 +5159 3291 +5161 3295 +5163 3306 +5166 3291 +5168 3291 +5170 3290 +5172 3290 +5175 3303 +5177 3290 +5179 3291 +5182 3296 +5184 3317 +5186 3309 +5189 3306 +5191 3332 +5193 3320 +5196 3293 +5198 3292 +5200 3292 +5202 3296 +5205 3296 +5207 3309 +5209 3326 +5212 3299 +5214 3328 +5216 3303 +5219 3296 +5221 3314 +5223 3290 +5225 3292 +5228 3302 +5230 3307 +5232 3296 +5235 3318 +5237 3323 +5239 3313 +5242 3321 +5244 3292 +5246 3295 +5249 3290 +5251 3301 +5253 3301 +5255 3295 +5258 3292 +5260 3311 +5262 3290 +5265 3295 +5267 3290 +5269 3290 +5272 3291 +5274 3295 +5276 3306 +5278 3299 +5281 3290 +5283 3296 +5285 3302 +5288 3303 +5290 3328 +5292 3323 +5295 3300 +5297 3297 +5299 3290 +5302 3290 +5304 3290 +5306 3290 +5308 3290 +5311 3318 +5313 3292 +5315 3296 +5318 3324 +5320 3318 +5322 3299 +5325 3291 +5327 3291 +5329 3296 +5331 3296 +5334 3290 +5336 3312 +5338 3312 +5341 3310 +5343 3306 +5345 3290 +5348 3301 +5350 3294 +5352 3290 +5354 3311 +5357 3306 +5359 3312 +5361 3290 +5364 3295 +5366 3290 +5368 3290 +5371 3290 +5373 3319 +5375 3292 +5378 3297 +5380 3295 +5382 3295 +5384 3308 +5387 3292 +5389 3335 +5391 3290 +5394 3290 +5396 3290 +5398 3290 +5401 3290 +5403 3316 +5405 3294 +5407 3290 +5410 3290 +5412 3294 +5414 3320 +5417 3299 +5419 3307 +5421 3290 +5424 3290 +5426 3290 +5428 3294 +5431 3301 +5433 3290 +5435 3290 +5437 3290 +5440 3298 +5442 3296 +5444 3291 +5447 3306 +5449 3303 +5451 3303 +5454 3312 +5456 3312 +5458 3333 +5460 3318 +5463 3295 +5465 3308 +5467 3292 +5470 3293 +5472 3293 +5474 3292 +5477 3367 +5479 3306 +5481 3290 +5484 3290 +5486 3292 +5488 3295 +5490 3291 +5493 3291 +5495 3293 +5497 3290 +5500 3295 +5502 3290 +5504 3292 +5507 3290 +5509 3294 +5511 3344 +5513 3301 +5516 3290 +5518 3290 +5520 3297 +5523 3295 +5525 3290 +5527 3290 +5530 3294 +5532 3332 +5534 3290 +5537 3292 +5539 3342 +5541 3303 +5543 3290 +5546 3295 +5548 3292 +5550 3290 +5553 3290 +5555 3290 +5557 3290 +5560 3299 +5562 3332 +5564 3301 +5566 3301 +5569 3304 +5571 3300 +5573 3290 +5576 3290 +5578 3307 +5580 3302 +5583 3299 +5585 3299 +5587 3299 +5590 3290 +5592 3290 +5594 3290 +5596 3296 +5599 3296 +5601 3292 +5603 3290 +5606 3310 +5608 3290 +5610 3293 +5613 3292 +5615 3306 +5617 3297 +5619 3290 +5622 3296 +5624 3295 +5626 3292 +5629 3291 +5631 3305 +5633 3290 +5636 3293 +5638 3291 +5640 3295 +5642 3292 +5645 3295 +5647 3294 +5649 3298 +5652 3344 +5654 3298 +5656 3290 +5659 3290 +5661 3290 +5663 3290 +5666 3298 +5668 3291 +5670 3298 +5672 3292 +5675 3298 +5677 3294 +5679 3290 +5682 3294 +5684 3294 +5686 3294 +5689 3291 +5691 3291 +5693 3291 +5695 3290 +5698 3299 +5700 3298 +5702 3298 +5705 3292 +5707 3293 +5709 3290 +5712 3297 +5714 3295 +5716 3291 +5719 3290 +5721 3305 +5723 3300 +5725 3290 +5728 3290 +5730 3292 +5732 3291 +5735 3304 +5737 3311 +5739 3309 +5742 3291 +5744 3290 +5746 3290 +5748 3292 +5751 3294 +5753 3294 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +5753 3294 +5755 3296 +5758 3346 +5760 3290 +5762 3292 +5765 3292 +5767 3291 +5769 3291 +5772 3290 +5774 3290 +5776 3290 +5778 3290 +5781 3291 +5783 3290 +5785 3293 +5788 3298 +5790 3312 +5792 3302 +5795 3296 +5797 3290 +5799 3291 +5801 3290 +5804 3293 +5806 3291 +5808 3290 +5811 3296 +5813 3296 +5815 3292 +5818 3296 +5820 3291 +5822 3290 +5825 3291 +5827 3301 +5829 3292 +5831 3312 +5834 3296 +5836 3290 +5838 3290 +5841 3290 +5843 3290 +5845 3294 +5848 3290 +5850 3290 +5852 3291 +5854 3294 +5857 3296 +5859 3290 +5861 3303 +5864 3293 +5866 3302 +5868 3290 +5871 3309 +5873 3305 +5875 3300 +5878 3303 +5880 3300 +5882 3295 +5884 3291 +5887 3291 +5889 3290 +5891 3290 +5894 3310 +5896 3314 +5898 3291 +5901 3291 +5903 3298 +5905 3293 +5907 3290 +5910 3294 +5912 3296 +5914 3290 +5917 3292 +5919 3291 +5921 3290 +5924 3290 +5926 3292 +5928 3295 +5930 3290 +5933 3298 +5935 3298 +5937 3291 +5940 3290 +5942 3290 +5944 3290 +5947 3305 +5949 3305 +5951 3305 +5954 3294 +5956 3290 +5958 3294 +5960 3298 +5963 3293 +5965 3305 +5967 3292 +5970 3292 +5972 3306 +5974 3293 +5977 3292 +5979 3295 +5981 3290 +5983 3290 +5986 3290 +5988 3305 +5990 3293 +5993 3298 +5995 3298 +5997 3290 +6000 3290 +6002 3296 +6004 3290 +6007 3307 +6009 3300 +6011 3300 +6013 3290 +6016 3300 +6018 3299 +6020 3294 +6023 3297 +6025 3292 +6027 3297 +6030 3290 +6032 3290 +6034 3301 +6036 3305 +6039 3295 +6041 3297 +6043 3297 +6046 3297 +6048 3290 +6050 3293 +6053 3293 +6055 3290 +6057 3292 +6060 3291 +6062 3314 +6064 3304 +6066 3290 +6069 3290 +6071 3302 +6073 3291 +6076 3291 +6078 3303 +6080 3303 +6083 3290 +6085 3292 +6087 3292 +6089 3290 +6092 3290 +6094 3291 +6096 3291 +6099 3290 +6101 3290 +6103 3290 +6106 3290 +6108 3290 +6110 3290 +6113 3292 +6115 3292 +6117 3291 +6119 3291 +6122 3296 +6124 3298 +6126 3307 +6129 3307 +6131 3291 +6133 3290 +6136 3294 +6138 3294 +6140 3290 +6142 3297 +6145 3293 +6147 3296 +6149 3290 +6152 3290 +6154 3292 +6156 3290 +6159 3290 +6161 3290 +6163 3299 +6166 3290 +6168 3290 +6170 3292 +6172 3290 +6175 3308 +6177 3290 +6179 3290 +6182 3290 +6184 3290 +6186 3290 +6189 3290 +6191 3290 +6193 3316 +6195 3293 +6198 3290 +6200 3295 +6202 3295 +6205 3297 +6207 3298 +6209 3294 +6212 3294 +6214 3294 +6216 3294 +6218 3294 +6221 3291 +6223 3290 +6225 3291 +6228 3299 +6230 3295 +6232 3290 +6235 3291 +6237 3290 +6239 3290 +6242 3291 +6244 3291 +6246 3292 +6248 3290 +6251 3290 +6253 3290 +6255 3290 +6258 3290 +6260 3290 +6262 3306 +6265 3295 +6267 3290 +6269 3298 +6271 3291 +6274 3290 +6276 3290 +6278 3290 +6281 3290 +6283 3291 +6285 3290 +6288 3290 +6290 3290 +6292 3290 +6295 3290 +6297 3291 +6299 3291 +6301 3301 +6304 3290 +6306 3296 +6308 3290 +6311 3290 +6313 3293 +6315 3293 +6318 3293 +6320 3294 +6322 3290 +6324 3290 +6327 3290 +6329 3290 +6331 3290 +6334 3290 +6336 3290 +6338 3290 +6341 3290 +6343 3290 +6345 3290 +6348 3294 +6350 3290 +6352 3290 +6354 3290 +6357 3292 +6359 3290 +6361 3290 +6364 3290 +6366 3290 +6368 3290 +6371 3298 +6373 3294 +6375 3293 +6377 3293 +6380 3295 +6382 3295 +6384 3290 +6387 3290 +6389 3291 +6391 3293 +6394 3290 +6396 3290 +6398 3308 +6401 3290 +6403 3292 +6405 3292 +6407 3292 +6410 3290 +6412 3292 +6414 3292 +6417 3292 +6419 3292 +6421 3293 +6424 3290 +6426 3290 +6428 3293 +6430 3293 +6433 3290 +6435 3290 +6437 3290 +6440 3290 +6442 3290 +6444 3290 +6447 3297 +6449 3290 +6451 3290 +6454 3294 +6456 3291 +6458 3290 +6460 3293 +6463 3294 +6465 3290 +6467 3290 +6470 3291 +6472 3291 +6474 3291 +6477 3294 +6479 3290 +6481 3291 +6483 3290 +6486 3291 +6488 3291 +6490 3291 +6493 3297 +6495 3291 +6497 3292 +6500 3292 +6502 3290 +6504 3290 +6506 3291 +6509 3290 +6511 3292 +6513 3292 +6516 3290 +6518 3290 +6520 3290 +6523 3290 +6525 3292 +6527 3290 +6530 3290 +6532 3291 +6534 3290 +6536 3290 +6539 3293 +6541 3290 +6543 3298 +6546 3294 +6548 3293 +6550 3294 +6553 3291 +6555 3290 +6557 3290 +6559 3290 +6562 3296 +6564 3296 +6566 3290 +6569 3290 +6571 3290 +6573 3290 +6576 3290 +6578 3291 +6580 3290 +6583 3295 +6585 3290 +6587 3290 +6589 3290 +6592 3290 +6594 3291 +6596 3290 +6599 3290 +6601 3290 +6603 3290 +6606 3301 +6608 3300 +6610 3300 +6612 3290 +6615 3290 +6617 3290 +6619 3290 +6622 3290 +6624 3292 +6626 3290 +6629 3298 +6631 3290 +6633 3293 +6636 3293 +6638 3293 +6640 3293 +6642 3290 +6645 3290 +6647 3290 +6649 3291 +6652 3291 +6654 3290 +6656 3290 +6659 3290 +6661 3290 +6663 3290 +6665 3290 +6668 3290 +6670 3290 +6672 3290 +6675 3297 +6677 3292 +6679 3292 +6682 3292 +6684 3290 +6686 3290 +6689 3291 +6691 3291 +6693 3295 +6695 3295 +6698 3290 +6700 3290 +6702 3290 +6705 3290 +6707 3290 +6709 3290 +6712 3298 +6714 3291 +6716 3290 +6718 3290 +6721 3290 +6723 3290 +6725 3290 +6728 3290 +6730 3291 +6732 3291 +6735 3291 +6737 3291 +6739 3290 +6742 3290 +6744 3290 +6746 3290 +6748 3290 +6751 3290 +6753 3290 +6755 3290 +6758 3290 +6760 3290 +6762 3291 +6765 3290 +6767 3290 +6769 3290 +6771 3290 +6774 3290 +6776 3290 +6778 3290 +6781 3290 +6783 3290 +6785 3293 +6788 3293 +6790 3294 +6792 3297 +6794 3297 +6797 3290 +6799 3290 +6801 3290 +6804 3290 +6806 3290 +6808 3292 +6811 3291 +6813 3291 +6815 3291 +6818 3291 +6820 3290 +6822 3290 +6824 3290 +6827 3291 +6829 3291 +6831 3290 +6834 3290 +6836 3290 +6838 3290 +6841 3290 +6843 3290 +6845 3295 +6847 3290 +6850 3290 +6852 3290 +6854 3290 +6857 3290 +6859 3291 +6861 3290 +6864 3290 +6866 3290 +6868 3290 +6871 3290 +6873 3290 +6875 3290 +6877 3291 +6880 3291 +6882 3291 +6884 3291 +6887 3291 +6889 3292 +6891 3290 +6894 3292 +6896 3290 +6898 3290 +6900 3290 +6903 3290 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +6903 3290 +6905 3290 +6907 3293 +6910 3290 +6912 3290 +6914 3290 +6917 3290 +6919 3290 +6921 3290 +6924 3291 +6926 3290 +6928 3290 +6930 3290 +6933 3290 +6935 3290 +6937 3290 +6940 3290 +6942 3290 +6944 3290 +6947 3290 +6949 3292 +6951 3292 +6953 3290 +6956 3290 +6958 3290 +6960 3290 +6963 3290 +6965 3290 +6967 3295 +6970 3290 +6972 3292 +6974 3291 +6977 3293 +6979 3291 +6981 3290 +6983 3290 +6986 3291 +6988 3292 +6990 3292 +6993 3291 +6995 3291 +6997 3290 +7000 3290 +7002 3290 +7004 3290 +7006 3290 +7009 3290 +7011 3290 +7013 3290 +7016 3291 +7018 3291 +7020 3291 +7023 3291 +7025 3292 +7027 3291 +7030 3290 +7032 3290 +7034 3290 +7036 3290 +7039 3290 +7041 3290 +7043 3290 +7046 3290 +7048 3290 +7050 3290 +7053 3290 +7055 3290 +7057 3291 +7059 3292 +7062 3290 +7064 3290 +7066 3290 +7069 3290 +7071 3291 +7073 3290 +7076 3293 +7078 3290 +7080 3291 +7082 3290 +7085 3290 +7087 3290 +7089 3290 +7092 3294 +7094 3294 +7096 3291 +7099 3291 +7101 3291 +7103 3291 +7106 3291 +7108 3291 +7110 3290 +7112 3292 +7115 3292 +7117 3290 +7119 3290 +7122 3290 +7124 3290 +7126 3290 +7129 3290 +7131 3290 +7133 3290 +7135 3290 +7138 3291 +7140 3290 +7142 3290 +7145 3290 +7147 3290 +7149 3290 +7152 3290 +7154 3290 +7156 3290 +7159 3290 +7161 3290 +7163 3290 +7165 3290 +7168 3290 +7170 3292 +7172 3290 +7175 3290 +7177 3290 +7179 3290 +7182 3290 +7184 3291 +7186 3292 +7188 3292 +7191 3292 +7193 3292 +7195 3290 +7198 3290 +7200 3290 +7202 3292 +7205 3291 +7207 3290 +7209 3290 +7212 3290 +7214 3291 +7216 3291 +7218 3291 +7221 3291 +7223 3291 +7225 3290 +7228 3290 +7230 3290 +7232 3290 +7235 3292 +7237 3292 +7239 3290 +7241 3290 +7244 3290 +7246 3290 +7248 3290 +7251 3290 +7253 3290 +7255 3290 +7258 3290 +7260 3290 +7262 3290 +7265 3290 +7267 3290 +7269 3290 +7271 3290 +7274 3290 +7276 3292 +7278 3292 +7281 3291 +7283 3296 +7285 3292 +7288 3292 +7290 3292 +7292 3292 +7294 3290 +7297 3290 +7299 3290 +7301 3290 +7304 3290 +7306 3290 +7308 3290 +7311 3290 +7313 3292 +7315 3290 +7318 3290 +7320 3290 +7322 3290 +7324 3290 +7327 3290 +7329 3290 +7331 3290 +7334 3290 +7336 3290 +7338 3291 +7341 3291 +7343 3292 +7345 3290 +7347 3290 +7350 3290 +7352 3290 +7354 3290 +7357 3290 +7359 3290 +7361 3290 +7364 3290 +7366 3290 +7368 3290 +7370 3290 +7373 3290 +7375 3290 +7377 3290 +7380 3290 +7382 3290 +7384 3290 +7387 3290 +7389 3293 +7391 3294 +7394 3290 +7396 3290 +7398 3290 +7400 3290 +7403 3290 +7405 3290 +7407 3290 +7410 3290 +7412 3290 +7414 3291 +7417 3291 +7419 3291 +7421 3290 +7423 3290 +7426 3290 +7428 3291 +7430 3291 +7433 3291 +7435 3293 +7437 3291 +7440 3291 +7442 3291 +7444 3291 +7447 3291 +7449 3290 +7451 3290 +7453 3290 +7456 3290 +7458 3290 +7460 3290 +7463 3290 +7465 3290 +7467 3290 +7470 3290 +7472 3290 +7474 3290 +7476 3290 +7479 3290 +7481 3290 +7483 3290 +7486 3290 +7488 3290 +7490 3290 +7493 3290 +7495 3290 +7497 3292 +7500 3295 +7502 3292 +7504 3292 +7506 3292 +7509 3291 +7511 3291 +7513 3291 +7516 3290 +7518 3290 +7520 3290 +7523 3290 +7525 3290 +7527 3290 +7529 3290 +7532 3290 +7534 3290 +7536 3291 +7539 3291 +7541 3291 +7543 3290 +7546 3290 +7548 3290 +7550 3290 +7553 3291 +7555 3290 +7557 3290 +7559 3290 +7562 3290 +7564 3290 +7566 3290 +7569 3290 +7571 3290 +7573 3291 +7576 3291 +7578 3291 +7580 3291 +7582 3290 +7585 3290 +7587 3290 +7589 3291 +7592 3290 +7594 3290 +7596 3290 +7599 3290 +7601 3290 +7603 3290 +7606 3290 +7608 3290 +7610 3290 +7612 3290 +7615 3290 +7617 3290 +7619 3290 +7622 3290 +7624 3290 +7626 3290 +7629 3290 +7631 3290 +7633 3290 +7635 3290 +7638 3290 +7640 3290 +7642 3290 +7645 3290 +7647 3290 +7649 3290 +7652 3290 +7654 3290 +7656 3290 +7658 3290 +7661 3290 +7663 3290 +7665 3290 +7668 3290 +7670 3290 +7672 3290 +7675 3291 +7677 3291 +7679 3291 +7682 3290 +7684 3290 +7686 3290 +7688 3292 +7691 3294 +7693 3294 +7695 3290 +7698 3290 +7700 3290 +7702 3290 +7705 3290 +7707 3290 +7709 3290 +7711 3291 +7714 3290 +7716 3290 +7718 3290 +7721 3290 +7723 3290 +7725 3290 +7728 3290 +7730 3290 +7732 3290 +7735 3290 +7737 3290 +7739 3290 +7741 3290 +7744 3290 +7746 3290 +7748 3290 +7751 3290 +7753 3290 +7755 3290 +7758 3290 +7760 3290 +7762 3290 +7764 3290 +7767 3290 +7769 3290 +7771 3290 +7774 3290 +7776 3290 +7778 3290 +7781 3290 +7783 3290 +7785 3290 +7788 3290 +7790 3290 +7792 3290 +7794 3290 +7797 3290 +7799 3290 +7801 3290 +7804 3291 +7806 3291 +7808 3290 +7811 3290 +7813 3290 +7815 3290 +7817 3290 +7820 3290 +7822 3290 +7824 3290 +7827 3290 +7829 3290 +7831 3290 +7834 3290 +7836 3290 +7838 3290 +7841 3290 +7843 3290 +7845 3290 +7847 3290 +7850 3290 +7852 3290 +7854 3290 +7857 3290 +7859 3290 +7861 3290 +7864 3290 +7866 3290 +7868 3290 +7870 3290 +7873 3290 +7875 3290 +7877 3290 +7880 3291 +7882 3291 +7884 3291 +7887 3290 +7889 3290 +7891 3290 +7894 3290 +7896 3291 +7898 3290 +7900 3290 +7903 3290 +7905 3290 +7907 3290 +7910 3290 +7912 3291 +7914 3290 +7917 3290 +7919 3290 +7921 3291 +7923 3291 +7926 3291 +7928 3290 +7930 3290 +7933 3290 +7935 3290 +7937 3290 +7940 3290 +7942 3290 +7944 3290 +7946 3290 +7949 3290 +7951 3290 +7953 3290 +7956 3290 +7958 3290 +7960 3290 +7963 3290 +7965 3290 +7967 3290 +7970 3290 +7972 3290 +7974 3290 +7976 3290 +7979 3290 +7981 3290 +7983 3290 +7986 3290 +7988 3290 +7990 3290 +7993 3290 +7995 3290 +7997 3290 +7999 3290 +8002 3290 +8004 3290 +8006 3290 +8009 3290 +8011 3290 +8013 3290 +8016 3290 +8018 3290 +8020 3290 +8023 3290 +8025 3290 +8027 3290 +8029 3290 +8032 3290 +8034 3290 +8036 3290 +8039 3290 +8041 3290 +8043 3290 +8046 3290 +8048 3290 +8050 3290 +8052 3290 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 274 +8052 3290 +8055 3290 +8057 3290 +8059 3290 +8062 3290 +8064 3290 +8066 3290 +8069 3290 +8071 3290 +8073 3290 +8076 3290 +8078 3290 +8080 3290 +8082 3290 +8085 3290 +8087 3290 +8089 3290 +8092 3290 +8094 3290 +8096 3290 +8099 3290 +8101 3290 +8103 3290 +8105 3290 +8108 3290 +8110 3290 +8112 3290 +8115 3290 +8117 3290 +8119 3290 +8122 3290 +8124 3290 +8126 3290 +8129 3290 +8131 3290 +8133 3290 +8135 3290 +8138 3290 +8140 3290 +8142 3290 +8145 3290 +8147 3290 +8149 3290 +8152 3290 +8154 3290 +8156 3290 +8158 3290 +8161 3290 +8163 3290 +8165 3290 +8168 3290 +8170 3290 +8172 3290 +8175 3290 +8177 3290 +8179 3290 +8182 3290 +8184 3290 +8186 3290 +8188 3290 +8191 3290 +8193 3290 +8195 3290 +8198 3290 +8200 3290 +8202 3290 +8205 3290 +8207 3290 +8209 3290 +8211 3290 +8214 3290 +8216 3290 +8218 3290 +8221 3290 +8223 3290 +8225 3290 +8228 3290 +8230 3290 +8232 3290 +8234 3290 +8237 3290 +8239 3290 +8241 3290 +8244 3290 +8246 3290 +8248 3290 +8251 3290 +8253 3290 +8255 3290 +8258 3290 +8260 3290 +8262 3290 +8264 3290 +8267 3290 +8269 3290 +8271 3290 +8274 3290 +8276 3290 +8278 3290 +8281 3290 +8283 3290 +8285 3290 +8287 3290 +8290 3290 +8292 3290 +8294 3290 +8297 3290 +8299 3290 +8301 3290 +8304 3290 +8306 3290 +8308 3290 +8311 3290 +8313 3290 +8315 3290 +8317 3290 +8320 3290 +8322 3290 +8324 3290 +8327 3290 +8329 3290 +8331 3290 +8334 3290 +8336 3290 +8338 3290 +8340 3290 +8343 3290 +8345 3290 +8347 3290 +8350 3290 +8352 3290 +8354 3290 +8357 3290 +8359 3290 +8361 3290 +8364 3290 +8366 3290 +8368 3290 +8370 3290 +8373 3290 +8375 3290 +8377 3290 +8380 3290 +8382 3290 +8384 3290 +8387 3290 +8389 3290 +8391 3290 +8393 3290 +8396 3290 +8398 3290 +8400 3290 +8403 3290 +8405 3290 +8407 3290 +8410 3290 +8412 3290 +8414 3290 +8417 3290 +8419 3290 +8421 3290 +8423 3290 +8426 3290 +8428 3290 +8430 3290 +8433 3290 +8435 3290 +8437 3290 +8440 3290 +8442 3290 +8444 3290 +8446 3290 +8449 3290 +8451 3290 +8453 3290 +8456 3290 +8458 3290 +8460 3290 +8463 3290 +8465 3290 +8467 3290 +8470 3290 +8472 3290 +8474 3290 +8476 3290 +8479 3290 +8481 3290 +8483 3290 +8486 3290 +8488 3290 +8490 3290 +8493 3290 +8495 3290 +8497 3290 +8499 3290 +8502 3290 +8504 3290 +8506 3290 +8509 3290 +8511 3290 +8513 3290 +8516 3290 +8518 3290 +8520 3290 +8522 3290 +8525 3290 +8527 3290 +8529 3290 +8532 3290 +8534 3290 +8536 3290 +8539 3290 +8541 3290 +8543 3290 +8546 3290 +8548 3290 +8550 3290 +8552 3290 +8555 3290 +8557 3290 +8559 3290 +8562 3290 +8564 3290 +8566 3290 +8569 3290 +8571 3290 +8573 3290 +8575 3290 +8578 3290 +8580 3290 +8582 3290 +8585 3290 +8587 3290 +8589 3290 +8592 3290 +8594 3290 +8596 3290 +8599 3290 +8601 3290 +8603 3290 +8605 3290 +8608 3290 +8610 3290 +8612 3290 +8615 3290 +8617 3290 +8619 3290 +8622 3290 +8624 3290 +8626 3290 +8628 3290 +8631 3290 +8633 3290 +8635 3290 +8638 3290 +8640 3290 +8642 3290 +8645 3290 +8647 3290 +8649 3290 +8652 3290 +8654 3290 +8656 3290 +8658 3290 +8661 3290 +8663 3290 +8665 3290 +8668 3290 +8670 3290 +8672 3290 +8675 3290 +8677 3290 +8679 3290 +8681 3290 +274 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/siman-test.eps b/software/gsl-1.15/doc/siman-test.eps new file mode 100644 index 000000000..0b12a31bb --- /dev/null +++ b/software/gsl-1.15/doc/siman-test.eps @@ -0,0 +1,11278 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GNU libplot drawing library 4.1 +%%Title: PostScript plot +%%CreationDate: Wed Dec 20 22:05:02 2006 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%BoundingBox: 62 177 500 576 +%%DocumentNeededResources: +%%DocumentSuppliedResources: procset GNU_libplot 1.0 0 +%%EndComments + +%%BeginDefaults +%%PageResources: +%%EndDefaults + +%%BeginProlog +%%EndProlog + +%%BeginSetup +/DrawDict 50 dict def +DrawDict begin +%%BeginResource procset GNU_libplot 1.0 0 +/none null def +/numGraphicParameters 17 def +/stringLimit 65535 def +/arrowHeight 8 def +/eoFillRule true def + +/Begin { save numGraphicParameters dict begin } def +/End { end restore } def + +/SetB { +dup type /nulltype eq { +pop +false /brushRightArrow idef +false /brushLeftArrow idef +true /brushNone idef +} { +/brushDashOffset idef +/brushDashArray idef +0 ne /brushRightArrow idef +0 ne /brushLeftArrow idef +/brushWidth idef +false /brushNone idef +} ifelse +} def + +/SetCFg { +/fgblue idef +/fggreen idef +/fgred idef +} def + +/SetCBg { +/bgblue idef +/bggreen idef +/bgred idef +} def + +/SetF { +/printSize idef +/printFont idef +} def + +/SetP { +dup type /nulltype eq { +pop true /patternNone idef +} { +/patternGrayLevel idef +patternGrayLevel -1 eq { +/patternString idef +} if +false /patternNone idef +} ifelse +} def + +/BSpl { +0 begin +storexyn +newpath +n 1 gt { +0 0 0 0 0 0 1 1 true subspline +n 2 gt { +0 0 0 0 1 1 2 2 false subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline +} if +n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Circ { +newpath +0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/CBSpl { +0 begin +dup 2 gt { +storexyn +newpath +n 1 sub dup 0 0 1 1 2 2 true subspline +1 1 n 3 sub { +/i exch def +i 1 sub dup i dup i 1 add dup i 2 add dup false subspline +} for +n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline +n 2 sub dup n 1 sub dup 0 0 1 1 false subspline +patternNone not { ifill } if +brushNone not { istroke } if +} { +Poly +} ifelse +end +} dup 0 4 dict put def + +/Elli { +0 begin +newpath +4 2 roll +translate +scale +0 0 1 0 360 arc +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 1 dict put def + +/Line { +0 begin +2 storexyn +newpath +x 0 get y 0 get moveto +x 1 get y 1 get lineto +brushNone not { istroke } if +0 0 1 1 leftarrow +0 0 1 1 rightarrow +end +} dup 0 4 dict put def + +/MLine { +0 begin +storexyn +newpath +n 1 gt { +x 0 get y 0 get moveto +1 1 n 1 sub { +/i exch def +x i get y i get lineto +} for +patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if +brushNone not { istroke } if +0 0 1 1 leftarrow +n 2 sub dup n 1 sub dup rightarrow +} if +end +} dup 0 4 dict put def + +/Poly { +3 1 roll +newpath +moveto +-1 add +{ lineto } repeat +closepath +patternNone not { ifill } if +brushNone not { istroke } if +} def + +/Rect { +0 begin +/t exch def +/r exch def +/b exch def +/l exch def +newpath +l b moveto +l t lineto +r t lineto +r b lineto +closepath +patternNone not { ifill } if +brushNone not { istroke } if +end +} dup 0 4 dict put def + +/Text { +ishow +} def + +/idef { +dup where { pop pop pop } { exch def } ifelse +} def + +/ifill { +0 begin +gsave +patternGrayLevel -1 ne { +fgred bgred fgred sub patternGrayLevel mul add +fggreen bggreen fggreen sub patternGrayLevel mul add +fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor +eoFillRule { eofill } { fill } ifelse +} { +eoFillRule { eoclip } { clip } ifelse +originalCTM setmatrix +pathbbox /t exch def /r exch def /b exch def /l exch def +/w r l sub ceiling cvi def +/h t b sub ceiling cvi def +/imageByteWidth w 8 div ceiling cvi def +/imageHeight h def +bgred bggreen bgblue setrgbcolor +eoFillRule { eofill } { fill } ifelse +fgred fggreen fgblue setrgbcolor +w 0 gt h 0 gt and { +l b translate w h scale +w h true [w 0 0 h neg 0 h] { patternproc } imagemask +} if +} ifelse +grestore +end +} dup 0 8 dict put def + +/istroke { +gsave +brushDashOffset -1 eq { +[] 0 setdash +1 setgray +} { +brushDashArray brushDashOffset setdash +fgred fggreen fgblue setrgbcolor +} ifelse +brushWidth setlinewidth +originalCTM setmatrix +stroke +grestore +} def + +/ishow { +0 begin +gsave +fgred fggreen fgblue setrgbcolor +/fontDict printFont findfont printSize scalefont dup setfont def +/descender fontDict begin 0 /FontBBox load 1 get FontMatrix end +transform exch pop def +/vertoffset 1 printSize sub descender sub def { +0 vertoffset moveto show +/vertoffset vertoffset printSize sub def +} forall +grestore +end +} dup 0 3 dict put def + +/patternproc { +0 begin +/patternByteLength patternString length def +/patternHeight patternByteLength 8 mul sqrt cvi def +/patternWidth patternHeight def +/patternByteWidth patternWidth 8 idiv def +/imageByteMaxLength imageByteWidth imageHeight mul +stringLimit patternByteWidth sub min def +/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv +patternHeight mul patternHeight max def +/imageHeight imageHeight imageMaxHeight sub store +/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def +0 1 imageMaxHeight 1 sub { +/y exch def +/patternRow y patternByteWidth mul patternByteLength mod def +/patternRowString patternString patternRow patternByteWidth getinterval def +/imageRow y imageByteWidth mul def +0 patternByteWidth imageByteWidth 1 sub { +/x exch def +imageString imageRow x add patternRowString putinterval +} for +} for +imageString +end +} dup 0 12 dict put def + +/min { +dup 3 2 roll dup 4 3 roll lt { exch } if pop +} def + +/max { +dup 3 2 roll dup 4 3 roll gt { exch } if pop +} def + +/midpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 x1 add 2 div +y0 y1 add 2 div +end +} dup 0 4 dict put def + +/thirdpoint { +0 begin +/y1 exch def +/x1 exch def +/y0 exch def +/x0 exch def +x0 2 mul x1 add 3 div +y0 2 mul y1 add 3 div +end +} dup 0 4 dict put def + +/subspline { +0 begin +/movetoNeeded exch def +y exch get /y3 exch def +x exch get /x3 exch def +y exch get /y2 exch def +x exch get /x2 exch def +y exch get /y1 exch def +x exch get /x1 exch def +y exch get /y0 exch def +x exch get /x0 exch def +x1 y1 x2 y2 thirdpoint +/p1y exch def +/p1x exch def +x2 y2 x1 y1 thirdpoint +/p2y exch def +/p2x exch def +x1 y1 x0 y0 thirdpoint +p1x p1y midpoint +/p0y exch def +/p0x exch def +x2 y2 x3 y3 thirdpoint +p2x p2y midpoint +/p3y exch def +/p3x exch def +movetoNeeded { p0x p0y moveto } if +p1x p1y p2x p2y p3x p3y curveto +end +} dup 0 17 dict put def + +/storexyn { +/n exch def +/y n array def +/x n array def +n 1 sub -1 0 { +/i exch def +y i 3 2 roll put +x i 3 2 roll put +} for +} def + +/arrowhead { +0 begin +transform originalCTM itransform +/taily exch def +/tailx exch def +transform originalCTM itransform +/tipy exch def +/tipx exch def +/dy tipy taily sub def +/dx tipx tailx sub def +/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def +gsave +originalCTM setmatrix +tipx tipy translate +angle rotate +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +patternNone not { +originalCTM setmatrix +/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul +arrowWidth div def +/padtail brushWidth 2 div def +tipx tipy translate +angle rotate +padtip 0 translate +arrowHeight padtip add padtail add arrowHeight div dup scale +arrowheadpath +ifill +} if +brushNone not { +originalCTM setmatrix +tipx tipy translate +angle rotate +arrowheadpath +istroke +} if +grestore +end +} dup 0 9 dict put def + +/arrowheadpath { +newpath +arrowHeight neg arrowWidth 2 div moveto +0 0 lineto +arrowHeight neg arrowWidth 2 div neg lineto +} def + +/leftarrow { +0 begin +y exch get /taily exch def +x exch get /tailx exch def +y exch get /tipy exch def +x exch get /tipx exch def +brushLeftArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def + +/rightarrow { +0 begin +y exch get /tipy exch def +x exch get /tipx exch def +y exch get /taily exch def +x exch get /tailx exch def +brushRightArrow { tipx tipy tailx taily arrowhead } if +end +} dup 0 4 dict put def +%%EndResource +%%EndSetup + +%%Page: 1 1 +%%PageResources: +%%PageBoundingBox: 62 177 500 576 +%%BeginPageSetup +%I Idraw 8 + +Begin +%I b u +%I cfg u +%I cbg u +%I f u +%I p u +%I t +[ 1 0 0 1 0 0 ] concat +/originalCTM matrix currentmatrix def +/trueoriginalCTM matrix currentmatrix def +%%EndPageSetup + +Begin %I Rect +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I +2304 2304 9216 9216 Rect +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2315 2151 +2348 2140 +2370 2107 +2381 2052 +2381 2019 +2370 1964 +2348 1931 +2315 1920 +2293 1920 +2260 1931 +2238 1964 +2227 2019 +2227 2052 +2238 2107 +2260 2140 +2293 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2293 2151 +2271 2140 +2260 2129 +2249 2107 +2238 2052 +2238 2019 +2249 1964 +2260 1942 +2271 1931 +2293 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2315 1920 +2337 1931 +2348 1942 +2359 1964 +2370 2019 +2370 2052 +2359 2107 +2348 2129 +2337 2140 +2315 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2304 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2304 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3181 2151 +3159 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +3159 2041 +3181 2063 +3214 2074 +3247 2074 +3280 2063 +3302 2041 +3313 2008 +3313 1986 +3302 1953 +3280 1931 +3247 1920 +3214 1920 +3181 1931 +3170 1942 +3159 1964 +3159 1975 +3170 1986 +3181 1975 +3170 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +3247 2074 +3269 2063 +3291 2041 +3302 2008 +3302 1986 +3291 1953 +3269 1931 +3247 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3181 2151 +3291 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +3181 2140 +3236 2140 +3291 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3467 2151 +3500 2140 +3522 2107 +3533 2052 +3533 2019 +3522 1964 +3500 1931 +3467 1920 +3445 1920 +3412 1931 +3390 1964 +3379 2019 +3379 2052 +3390 2107 +3412 2140 +3445 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3445 2151 +3423 2140 +3412 2129 +3401 2107 +3390 2052 +3390 2019 +3401 1964 +3412 1942 +3423 1931 +3445 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3467 1920 +3489 1931 +3500 1942 +3511 1964 +3522 2019 +3522 2052 +3511 2107 +3500 2129 +3489 2140 +3467 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +3687 2151 +3720 2140 +3742 2107 +3753 2052 +3753 2019 +3742 1964 +3720 1931 +3687 1920 +3665 1920 +3632 1931 +3610 1964 +3599 2019 +3599 2052 +3610 2107 +3632 2140 +3665 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3665 2151 +3643 2140 +3632 2129 +3621 2107 +3610 2052 +3610 2019 +3621 1964 +3632 1942 +3643 1931 +3665 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +3687 1920 +3709 1931 +3720 1942 +3731 1964 +3742 2019 +3742 2052 +3731 2107 +3720 2129 +3709 2140 +3687 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 9216 +3456 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +3456 2304 +3456 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4234 2107 +4256 2118 +4289 2151 +4289 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4278 2140 +4278 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4234 1920 +4333 1920 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4509 2151 +4542 2140 +4564 2107 +4575 2052 +4575 2019 +4564 1964 +4542 1931 +4509 1920 +4487 1920 +4454 1931 +4432 1964 +4421 2019 +4421 2052 +4432 2107 +4454 2140 +4487 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4487 2151 +4465 2140 +4454 2129 +4443 2107 +4432 2052 +4432 2019 +4443 1964 +4454 1942 +4465 1931 +4487 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4509 1920 +4531 1931 +4542 1942 +4553 1964 +4564 2019 +4564 2052 +4553 2107 +4542 2129 +4531 2140 +4509 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4729 2151 +4762 2140 +4784 2107 +4795 2052 +4795 2019 +4784 1964 +4762 1931 +4729 1920 +4707 1920 +4674 1931 +4652 1964 +4641 2019 +4641 2052 +4652 2107 +4674 2140 +4707 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4707 2151 +4685 2140 +4674 2129 +4663 2107 +4652 2052 +4652 2019 +4663 1964 +4674 1942 +4685 1931 +4707 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4729 1920 +4751 1931 +4762 1942 +4773 1964 +4784 2019 +4784 2052 +4773 2107 +4762 2129 +4751 2140 +4729 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4949 2151 +4982 2140 +5004 2107 +5015 2052 +5015 2019 +5004 1964 +4982 1931 +4949 1920 +4927 1920 +4894 1931 +4872 1964 +4861 2019 +4861 2052 +4872 2107 +4894 2140 +4927 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4927 2151 +4905 2140 +4894 2129 +4883 2107 +4872 2052 +4872 2019 +4883 1964 +4894 1942 +4905 1931 +4927 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +4949 1920 +4971 1931 +4982 1942 +4993 1964 +5004 2019 +5004 2052 +4993 2107 +4982 2129 +4971 2140 +4949 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 9216 +4608 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +4608 2304 +4608 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5386 2107 +5408 2118 +5441 2151 +5441 1920 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5430 2140 +5430 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5386 1920 +5485 1920 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5595 2151 +5573 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +5573 2041 +5595 2063 +5628 2074 +5661 2074 +5694 2063 +5716 2041 +5727 2008 +5727 1986 +5716 1953 +5694 1931 +5661 1920 +5628 1920 +5595 1931 +5584 1942 +5573 1964 +5573 1975 +5584 1986 +5595 1975 +5584 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5661 2074 +5683 2063 +5705 2041 +5716 2008 +5716 1986 +5705 1953 +5683 1931 +5661 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5595 2151 +5705 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5595 2140 +5650 2140 +5705 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +5881 2151 +5914 2140 +5936 2107 +5947 2052 +5947 2019 +5936 1964 +5914 1931 +5881 1920 +5859 1920 +5826 1931 +5804 1964 +5793 2019 +5793 2052 +5804 2107 +5826 2140 +5859 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5859 2151 +5837 2140 +5826 2129 +5815 2107 +5804 2052 +5804 2019 +5815 1964 +5826 1942 +5837 1931 +5859 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5881 1920 +5903 1931 +5914 1942 +5925 1964 +5936 2019 +5936 2052 +5925 2107 +5914 2129 +5903 2140 +5881 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6101 2151 +6134 2140 +6156 2107 +6167 2052 +6167 2019 +6156 1964 +6134 1931 +6101 1920 +6079 1920 +6046 1931 +6024 1964 +6013 2019 +6013 2052 +6024 2107 +6046 2140 +6079 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6079 2151 +6057 2140 +6046 2129 +6035 2107 +6024 2052 +6024 2019 +6035 1964 +6046 1942 +6057 1931 +6079 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6101 1920 +6123 1931 +6134 1942 +6145 1964 +6156 2019 +6156 2052 +6145 2107 +6134 2129 +6123 2140 +6101 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 9216 +5760 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5760 2304 +5760 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +6516 2107 +6527 2096 +6516 2085 +6505 2096 +6505 2107 +6516 2129 +6527 2140 +6560 2151 +6604 2151 +6637 2140 +6648 2129 +6659 2107 +6659 2085 +6648 2063 +6615 2041 +6560 2019 +6538 2008 +6516 1986 +6505 1953 +6505 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6604 2151 +6626 2140 +6637 2129 +6648 2107 +6648 2085 +6637 2063 +6604 2041 +6560 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6505 1942 +6516 1953 +6538 1953 +6593 1931 +6626 1931 +6648 1942 +6659 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +6538 1953 +6593 1920 +6637 1920 +6648 1931 +6659 1953 +6659 1975 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6813 2151 +6846 2140 +6868 2107 +6879 2052 +6879 2019 +6868 1964 +6846 1931 +6813 1920 +6791 1920 +6758 1931 +6736 1964 +6725 2019 +6725 2052 +6736 2107 +6758 2140 +6791 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6791 2151 +6769 2140 +6758 2129 +6747 2107 +6736 2052 +6736 2019 +6747 1964 +6758 1942 +6769 1931 +6791 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +6813 1920 +6835 1931 +6846 1942 +6857 1964 +6868 2019 +6868 2052 +6857 2107 +6846 2129 +6835 2140 +6813 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7033 2151 +7066 2140 +7088 2107 +7099 2052 +7099 2019 +7088 1964 +7066 1931 +7033 1920 +7011 1920 +6978 1931 +6956 1964 +6945 2019 +6945 2052 +6956 2107 +6978 2140 +7011 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7011 2151 +6989 2140 +6978 2129 +6967 2107 +6956 2052 +6956 2019 +6967 1964 +6978 1942 +6989 1931 +7011 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7033 1920 +7055 1931 +7066 1942 +7077 1964 +7088 2019 +7088 2052 +7077 2107 +7066 2129 +7055 2140 +7033 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +7253 2151 +7286 2140 +7308 2107 +7319 2052 +7319 2019 +7308 1964 +7286 1931 +7253 1920 +7231 1920 +7198 1931 +7176 1964 +7165 2019 +7165 2052 +7176 2107 +7198 2140 +7231 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7231 2151 +7209 2140 +7198 2129 +7187 2107 +7176 2052 +7176 2019 +7187 1964 +7198 1942 +7209 1931 +7231 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +7253 1920 +7275 1931 +7286 1942 +7297 1964 +7308 2019 +7308 2052 +7297 2107 +7286 2129 +7275 2140 +7253 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 9216 +6912 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6912 2304 +6912 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 20 +7668 2107 +7679 2096 +7668 2085 +7657 2096 +7657 2107 +7668 2129 +7679 2140 +7712 2151 +7756 2151 +7789 2140 +7800 2129 +7811 2107 +7811 2085 +7800 2063 +7767 2041 +7712 2019 +7690 2008 +7668 1986 +7657 1953 +7657 1920 +20 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7756 2151 +7778 2140 +7789 2129 +7800 2107 +7800 2085 +7789 2063 +7756 2041 +7712 2019 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +7657 1942 +7668 1953 +7690 1953 +7745 1931 +7778 1931 +7800 1942 +7811 1953 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +7690 1953 +7745 1920 +7789 1920 +7800 1931 +7811 1953 +7811 1975 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7899 2151 +7877 2041 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +7877 2041 +7899 2063 +7932 2074 +7965 2074 +7998 2063 +8020 2041 +8031 2008 +8031 1986 +8020 1953 +7998 1931 +7965 1920 +7932 1920 +7899 1931 +7888 1942 +7877 1964 +7877 1975 +7888 1986 +7899 1975 +7888 1964 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +7965 2074 +7987 2063 +8009 2041 +8020 2008 +8020 1986 +8009 1953 +7987 1931 +7965 1920 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +7899 2151 +8009 2151 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +7899 2140 +7954 2140 +8009 2151 +3 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8185 2151 +8218 2140 +8240 2107 +8251 2052 +8251 2019 +8240 1964 +8218 1931 +8185 1920 +8163 1920 +8130 1931 +8108 1964 +8097 2019 +8097 2052 +8108 2107 +8130 2140 +8163 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8163 2151 +8141 2140 +8130 2129 +8119 2107 +8108 2052 +8108 2019 +8119 1964 +8130 1942 +8141 1931 +8163 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8185 1920 +8207 1931 +8218 1942 +8229 1964 +8240 2019 +8240 2052 +8229 2107 +8218 2129 +8207 2140 +8185 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8405 2151 +8438 2140 +8460 2107 +8471 2052 +8471 2019 +8460 1964 +8438 1931 +8405 1920 +8383 1920 +8350 1931 +8328 1964 +8317 2019 +8317 2052 +8328 2107 +8350 2140 +8383 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8383 2151 +8361 2140 +8350 2129 +8339 2107 +8328 2052 +8328 2019 +8339 1964 +8350 1942 +8361 1931 +8383 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +8405 1920 +8427 1931 +8438 1942 +8449 1964 +8460 2019 +8460 2052 +8449 2107 +8438 2129 +8427 2140 +8405 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 9216 +8064 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +8064 2304 +8064 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +8820 2107 +8831 2096 +8820 2085 +8809 2096 +8809 2107 +8820 2129 +8831 2140 +8864 2151 +8908 2151 +8941 2140 +8952 2118 +8952 2085 +8941 2063 +8908 2052 +8875 2052 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8908 2151 +8930 2140 +8941 2118 +8941 2085 +8930 2063 +8908 2052 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +8908 2052 +8930 2041 +8952 2019 +8963 1997 +8963 1964 +8952 1942 +8941 1931 +8908 1920 +8864 1920 +8831 1931 +8820 1942 +8809 1964 +8809 1975 +8820 1986 +8831 1975 +8820 1964 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +8941 2030 +8952 1997 +8952 1964 +8941 1942 +8930 1931 +8908 1920 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9117 2151 +9150 2140 +9172 2107 +9183 2052 +9183 2019 +9172 1964 +9150 1931 +9117 1920 +9095 1920 +9062 1931 +9040 1964 +9029 2019 +9029 2052 +9040 2107 +9062 2140 +9095 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9095 2151 +9073 2140 +9062 2129 +9051 2107 +9040 2052 +9040 2019 +9051 1964 +9062 1942 +9073 1931 +9095 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9117 1920 +9139 1931 +9150 1942 +9161 1964 +9172 2019 +9172 2052 +9161 2107 +9150 2129 +9139 2140 +9117 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9337 2151 +9370 2140 +9392 2107 +9403 2052 +9403 2019 +9392 1964 +9370 1931 +9337 1920 +9315 1920 +9282 1931 +9260 1964 +9249 2019 +9249 2052 +9260 2107 +9282 2140 +9315 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9315 2151 +9293 2140 +9282 2129 +9271 2107 +9260 2052 +9260 2019 +9271 1964 +9282 1942 +9293 1931 +9315 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9337 1920 +9359 1931 +9370 1942 +9381 1964 +9392 2019 +9392 2052 +9381 2107 +9370 2129 +9359 2140 +9337 2151 +10 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +9557 2151 +9590 2140 +9612 2107 +9623 2052 +9623 2019 +9612 1964 +9590 1931 +9557 1920 +9535 1920 +9502 1931 +9480 1964 +9469 2019 +9469 2052 +9480 2107 +9502 2140 +9535 2151 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9535 2151 +9513 2140 +9502 2129 +9491 2107 +9480 2052 +9480 2019 +9491 1964 +9502 1942 +9513 1931 +9535 1920 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +9557 1920 +9579 1931 +9590 1942 +9601 1964 +9612 2019 +9612 2052 +9601 2107 +9590 2129 +9579 2140 +9557 2151 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9216 9078 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9216 2442 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 2392 +1519 2403 +1552 2436 +1552 2205 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 2425 +1541 2205 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 2205 +1596 2205 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 2216 +1705 2205 +1694 2216 +1705 2227 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 2392 +1815 2381 +1804 2370 +1793 2381 +1793 2392 +1804 2414 +1815 2425 +1848 2436 +1892 2436 +1925 2425 +1936 2403 +1936 2370 +1925 2348 +1892 2337 +1859 2337 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 2436 +1914 2425 +1925 2403 +1925 2370 +1914 2348 +1892 2337 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 2337 +1914 2326 +1936 2304 +1947 2282 +1947 2249 +1936 2227 +1925 2216 +1892 2205 +1848 2205 +1815 2216 +1804 2227 +1793 2249 +1793 2260 +1804 2271 +1815 2260 +1804 2249 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 2315 +1936 2282 +1936 2249 +1925 2227 +1914 2216 +1892 2205 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2112 2414 +2112 2205 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2123 2436 +2123 2205 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2123 2436 +2002 2271 +2178 2271 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2079 2205 +2156 2205 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9078 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2442 2304 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 3544 +1519 3555 +1552 3588 +1552 3357 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 3577 +1541 3357 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 3357 +1596 3357 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 3368 +1705 3357 +1694 3368 +1705 3379 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 3544 +1815 3533 +1804 3522 +1793 3533 +1793 3544 +1804 3566 +1815 3577 +1848 3588 +1892 3588 +1925 3577 +1936 3555 +1936 3522 +1925 3500 +1892 3489 +1859 3489 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 3588 +1914 3577 +1925 3555 +1925 3522 +1914 3500 +1892 3489 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 3489 +1914 3478 +1936 3456 +1947 3434 +1947 3401 +1936 3379 +1925 3368 +1892 3357 +1848 3357 +1815 3368 +1804 3379 +1793 3401 +1793 3412 +1804 3423 +1815 3412 +1804 3401 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 3467 +1936 3434 +1936 3401 +1925 3379 +1914 3368 +1892 3357 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 3588 +2013 3478 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 19 +2013 3478 +2035 3500 +2068 3511 +2101 3511 +2134 3500 +2156 3478 +2167 3445 +2167 3423 +2156 3390 +2134 3368 +2101 3357 +2068 3357 +2035 3368 +2024 3379 +2013 3401 +2013 3412 +2024 3423 +2035 3412 +2024 3401 +19 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 3511 +2123 3500 +2145 3478 +2156 3445 +2156 3423 +2145 3390 +2123 3368 +2101 3357 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2035 3588 +2145 3588 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +2035 3577 +2090 3577 +2145 3588 +3 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9078 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2442 3456 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 4696 +1519 4707 +1552 4740 +1552 4509 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 4729 +1541 4509 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 4509 +1596 4509 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 4520 +1705 4509 +1694 4520 +1705 4531 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 4696 +1815 4685 +1804 4674 +1793 4685 +1793 4696 +1804 4718 +1815 4729 +1848 4740 +1892 4740 +1925 4729 +1936 4707 +1936 4674 +1925 4652 +1892 4641 +1859 4641 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 4740 +1914 4729 +1925 4707 +1925 4674 +1914 4652 +1892 4641 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 4641 +1914 4630 +1936 4608 +1947 4586 +1947 4553 +1936 4531 +1925 4520 +1892 4509 +1848 4509 +1815 4520 +1804 4531 +1793 4553 +1793 4564 +1804 4575 +1815 4564 +1804 4553 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 4619 +1936 4586 +1936 4553 +1925 4531 +1914 4520 +1892 4509 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2145 4707 +2134 4696 +2145 4685 +2156 4696 +2156 4707 +2145 4729 +2123 4740 +2090 4740 +2057 4729 +2035 4707 +2024 4685 +2013 4641 +2013 4575 +2024 4542 +2046 4520 +2079 4509 +2101 4509 +2134 4520 +2156 4542 +2167 4575 +2167 4586 +2156 4619 +2134 4641 +2101 4652 +2090 4652 +2057 4641 +2035 4619 +2024 4586 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2090 4740 +2068 4729 +2046 4707 +2035 4685 +2024 4641 +2024 4575 +2035 4542 +2057 4520 +2079 4509 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2101 4509 +2123 4520 +2145 4542 +2156 4575 +2156 4586 +2145 4619 +2123 4641 +2101 4652 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9078 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2442 4608 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 5848 +1519 5859 +1552 5892 +1552 5661 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 5881 +1541 5661 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 5661 +1596 5661 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 5672 +1705 5661 +1694 5672 +1705 5683 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 5848 +1815 5837 +1804 5826 +1793 5837 +1793 5848 +1804 5870 +1815 5881 +1848 5892 +1892 5892 +1925 5881 +1936 5859 +1936 5826 +1925 5804 +1892 5793 +1859 5793 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 5892 +1914 5881 +1925 5859 +1925 5826 +1914 5804 +1892 5793 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 5793 +1914 5782 +1936 5760 +1947 5738 +1947 5705 +1936 5683 +1925 5672 +1892 5661 +1848 5661 +1815 5672 +1804 5683 +1793 5705 +1793 5716 +1804 5727 +1815 5716 +1804 5705 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 5771 +1936 5738 +1936 5705 +1925 5683 +1914 5672 +1892 5661 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2013 5892 +2013 5826 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2013 5848 +2024 5870 +2046 5892 +2068 5892 +2123 5859 +2145 5859 +2156 5870 +2167 5892 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +2024 5870 +2046 5881 +2068 5881 +2123 5859 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2167 5892 +2167 5859 +2156 5826 +2112 5771 +2101 5749 +2090 5716 +2090 5661 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +2156 5826 +2101 5771 +2090 5749 +2079 5716 +2079 5661 +5 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9078 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2442 5760 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 7000 +1519 7011 +1552 7044 +1552 6813 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 7033 +1541 6813 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 6813 +1596 6813 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 6824 +1705 6813 +1694 6824 +1705 6835 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 7000 +1815 6989 +1804 6978 +1793 6989 +1793 7000 +1804 7022 +1815 7033 +1848 7044 +1892 7044 +1925 7033 +1936 7011 +1936 6978 +1925 6956 +1892 6945 +1859 6945 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 7044 +1914 7033 +1925 7011 +1925 6978 +1914 6956 +1892 6945 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 6945 +1914 6934 +1936 6912 +1947 6890 +1947 6857 +1936 6835 +1925 6824 +1892 6813 +1848 6813 +1815 6824 +1804 6835 +1793 6857 +1793 6868 +1804 6879 +1815 6868 +1804 6857 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 6923 +1936 6890 +1936 6857 +1925 6835 +1914 6824 +1892 6813 +6 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +2112 7044 +2145 7033 +2156 7011 +2156 6978 +2145 6956 +2112 6945 +2068 6945 +2035 6956 +2024 6978 +2024 7011 +2035 7033 +2068 7044 +12 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2068 7044 +2046 7033 +2035 7011 +2035 6978 +2046 6956 +2068 6945 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2112 6945 +2134 6956 +2145 6978 +2145 7011 +2134 7033 +2112 7044 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2068 6945 +2035 6934 +2024 6923 +2013 6901 +2013 6857 +2024 6835 +2035 6824 +2068 6813 +2112 6813 +2145 6824 +2156 6835 +2167 6857 +2167 6901 +2156 6923 +2145 6934 +2112 6945 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2068 6945 +2046 6934 +2035 6923 +2024 6901 +2024 6857 +2035 6835 +2046 6824 +2068 6813 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2112 6813 +2134 6824 +2145 6835 +2156 6857 +2156 6901 +2145 6923 +2134 6934 +2112 6945 +8 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9078 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2442 6912 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 8152 +1519 8163 +1552 8196 +1552 7965 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 8185 +1541 7965 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 7965 +1596 7965 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 7976 +1705 7965 +1694 7976 +1705 7987 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1804 8152 +1815 8141 +1804 8130 +1793 8141 +1793 8152 +1804 8174 +1815 8185 +1848 8196 +1892 8196 +1925 8185 +1936 8163 +1936 8130 +1925 8108 +1892 8097 +1859 8097 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1892 8196 +1914 8185 +1925 8163 +1925 8130 +1914 8108 +1892 8097 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +1892 8097 +1914 8086 +1936 8064 +1947 8042 +1947 8009 +1936 7987 +1925 7976 +1892 7965 +1848 7965 +1815 7976 +1804 7987 +1793 8009 +1793 8020 +1804 8031 +1815 8020 +1804 8009 +16 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +1925 8075 +1936 8042 +1936 8009 +1925 7987 +1914 7976 +1892 7965 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 28 +2156 8119 +2145 8086 +2123 8064 +2090 8053 +2079 8053 +2046 8064 +2024 8086 +2013 8119 +2013 8130 +2024 8163 +2046 8185 +2079 8196 +2101 8196 +2134 8185 +2156 8163 +2167 8130 +2167 8064 +2156 8020 +2145 7998 +2123 7976 +2090 7965 +2057 7965 +2035 7976 +2024 7998 +2024 8009 +2035 8020 +2046 8009 +2035 7998 +28 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2079 8053 +2057 8064 +2035 8086 +2024 8119 +2024 8130 +2035 8163 +2057 8185 +2079 8196 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +2101 8196 +2123 8185 +2145 8163 +2156 8130 +2156 8064 +2145 8020 +2134 7998 +2112 7976 +2090 7965 +9 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9078 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2442 8064 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1497 9304 +1519 9315 +1552 9348 +1552 9117 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1541 9337 +1541 9117 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1497 9117 +1596 9117 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +1716 9128 +1705 9117 +1694 9128 +1705 9139 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1892 9326 +1892 9117 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1903 9348 +1903 9117 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +1903 9348 +1782 9183 +1958 9183 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1859 9117 +1936 9117 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +2101 9348 +2134 9337 +2156 9304 +2167 9249 +2167 9216 +2156 9161 +2134 9128 +2101 9117 +2079 9117 +2046 9128 +2024 9161 +2013 9216 +2013 9249 +2024 9304 +2046 9337 +2079 9348 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2079 9348 +2057 9337 +2046 9326 +2035 9304 +2024 9249 +2024 9216 +2035 9161 +2046 9139 +2057 9128 +2079 9117 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +2101 9117 +2123 9128 +2134 9139 +2145 9161 +2156 9216 +2156 9249 +2145 9304 +2134 9326 +2123 9337 +2101 9348 +10 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9078 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2442 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2304 +9161 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2304 +2359 2304 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 2880 +9161 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 2880 +2359 2880 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 3456 +9161 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 3456 +2359 3456 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4032 +9161 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4032 +2359 4032 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 4608 +9161 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 4608 +2359 4608 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5184 +9161 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5184 +2359 5184 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 5760 +9161 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 5760 +2359 5760 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6336 +9161 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6336 +2359 6336 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 6912 +9161 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 6912 +2359 6912 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 7488 +9161 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 7488 +2359 7488 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8064 +9161 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8064 +2359 8064 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 8640 +9161 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 8640 +2359 8640 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +9216 9216 +9161 9216 +2 MLine +End + +Begin %I MLine +[0.6776471 0 0 0.6776471 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +2304 9216 +2359 9216 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +4858 1621 +4880 1610 +4891 1599 +4902 1577 +4902 1555 +4891 1533 +4880 1522 +4858 1511 +4836 1511 +4814 1522 +4803 1533 +4792 1555 +4792 1577 +4803 1599 +4814 1610 +4836 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4814 1610 +4803 1588 +4803 1544 +4814 1522 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +4880 1522 +4891 1544 +4891 1588 +4880 1610 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +4891 1599 +4902 1610 +4924 1621 +4924 1610 +4902 1610 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 9 +4803 1533 +4792 1522 +4781 1500 +4781 1489 +4792 1467 +4825 1456 +4880 1456 +4913 1445 +4924 1434 +9 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +4781 1489 +4792 1478 +4825 1467 +4880 1467 +4913 1456 +4924 1434 +4924 1423 +4913 1401 +4880 1390 +4814 1390 +4781 1401 +4770 1423 +4770 1434 +4781 1456 +4814 1467 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5001 1555 +5133 1555 +5133 1577 +5122 1599 +5111 1610 +5089 1621 +5056 1621 +5023 1610 +5001 1588 +4990 1555 +4990 1533 +5001 1500 +5023 1478 +5056 1467 +5078 1467 +5111 1478 +5133 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5122 1555 +5122 1588 +5111 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5056 1621 +5034 1610 +5012 1588 +5001 1555 +5001 1533 +5012 1500 +5034 1478 +5056 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5221 1621 +5221 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5232 1621 +5232 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +5232 1588 +5254 1610 +5287 1621 +5309 1621 +5342 1610 +5353 1588 +5353 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +5309 1621 +5331 1610 +5342 1588 +5342 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1621 +5232 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5188 1467 +5265 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5309 1467 +5386 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +5452 1555 +5584 1555 +5584 1577 +5573 1599 +5562 1610 +5540 1621 +5507 1621 +5474 1610 +5452 1588 +5441 1555 +5441 1533 +5452 1500 +5474 1478 +5507 1467 +5529 1467 +5562 1478 +5584 1500 +17 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 3 +5573 1555 +5573 1588 +5562 1610 +3 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +5507 1621 +5485 1610 +5463 1588 +5452 1555 +5452 1533 +5463 1500 +5485 1478 +5507 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5672 1621 +5672 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5683 1621 +5683 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 10 +5683 1555 +5694 1588 +5716 1610 +5738 1621 +5771 1621 +5782 1610 +5782 1599 +5771 1588 +5760 1599 +5771 1610 +10 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1621 +5683 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +5639 1467 +5716 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 13 +5859 1599 +5859 1588 +5848 1588 +5848 1599 +5859 1610 +5881 1621 +5925 1621 +5947 1610 +5958 1599 +5969 1577 +5969 1500 +5980 1478 +5991 1467 +13 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +5958 1599 +5958 1500 +5969 1478 +5991 1467 +6002 1467 +5 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 11 +5958 1577 +5947 1566 +5881 1555 +5848 1544 +5837 1522 +5837 1500 +5848 1478 +5881 1467 +5914 1467 +5936 1478 +5958 1500 +11 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +5881 1555 +5859 1544 +5848 1522 +5848 1500 +5859 1478 +5881 1467 +6 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6079 1698 +6079 1511 +6090 1478 +6112 1467 +6134 1467 +6156 1478 +6167 1500 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6090 1698 +6090 1511 +6101 1478 +6112 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6046 1621 +6134 1621 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6255 1687 +6244 1676 +6233 1687 +6244 1698 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6244 1621 +6244 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6255 1621 +6255 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1621 +6255 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6211 1467 +6288 1467 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +6431 1621 +6464 1610 +6486 1588 +6497 1555 +6497 1533 +6486 1500 +6464 1478 +6431 1467 +6409 1467 +6376 1478 +6354 1500 +6343 1533 +6343 1555 +6354 1588 +6376 1610 +6409 1621 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6409 1621 +6387 1610 +6365 1588 +6354 1555 +6354 1533 +6365 1500 +6387 1478 +6409 1467 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +6431 1467 +6453 1478 +6475 1500 +6486 1533 +6486 1555 +6475 1588 +6453 1610 +6431 1621 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6585 1621 +6585 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6596 1621 +6596 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +6596 1588 +6618 1610 +6651 1621 +6673 1621 +6706 1610 +6717 1588 +6717 1467 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +6673 1621 +6695 1610 +6706 1588 +6706 1467 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1621 +6596 1621 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6552 1467 +6629 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +6673 1467 +6750 1467 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5062 +1205 5062 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5073 +1205 5073 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +1007 5073 +985 5095 +974 5117 +974 5139 +985 5172 +1007 5194 +1040 5205 +1062 5205 +1095 5194 +1117 5172 +1128 5139 +1128 5117 +1117 5095 +1095 5073 +14 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +974 5139 +985 5161 +1007 5183 +1040 5194 +1062 5194 +1095 5183 +1117 5161 +1128 5139 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5029 +974 5073 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1205 5029 +1205 5106 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +974 5359 +985 5392 +1007 5414 +1040 5425 +1062 5425 +1095 5414 +1117 5392 +1128 5359 +1128 5337 +1117 5304 +1095 5282 +1062 5271 +1040 5271 +1007 5282 +985 5304 +974 5337 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +974 5337 +985 5315 +1007 5293 +1040 5282 +1062 5282 +1095 5293 +1117 5315 +1128 5337 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1128 5359 +1117 5381 +1095 5403 +1062 5414 +1040 5414 +1007 5403 +985 5381 +974 5359 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +996 5601 +974 5612 +1018 5612 +996 5601 +985 5590 +974 5568 +974 5524 +985 5502 +996 5491 +1018 5491 +1029 5502 +1040 5524 +1062 5579 +1073 5601 +1084 5612 +15 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 15 +1007 5491 +1018 5502 +1029 5524 +1051 5579 +1062 5601 +1073 5612 +1106 5612 +1117 5601 +1128 5579 +1128 5535 +1117 5513 +1106 5502 +1084 5491 +1128 5491 +1106 5502 +15 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +908 5711 +919 5700 +908 5689 +897 5700 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5700 +1128 5700 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5711 +1128 5711 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5667 +974 5711 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1128 5667 +1128 5744 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +897 5820 +1084 5820 +1117 5831 +1128 5853 +1128 5875 +1117 5897 +1095 5908 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +897 5831 +1084 5831 +1117 5842 +1128 5853 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5787 +974 5875 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +908 5996 +919 5985 +908 5974 +897 5985 +4 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5985 +1128 5985 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5996 +1128 5996 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 5952 +974 5996 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1128 5952 +1128 6029 +2 MLine +End + +Begin %I Poly +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 16 +974 6172 +985 6205 +1007 6227 +1040 6238 +1062 6238 +1095 6227 +1117 6205 +1128 6172 +1128 6150 +1117 6117 +1095 6095 +1062 6084 +1040 6084 +1007 6095 +985 6117 +974 6150 +16 Poly +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +974 6150 +985 6128 +1007 6106 +1040 6095 +1062 6095 +1095 6106 +1117 6128 +1128 6150 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +1128 6172 +1117 6194 +1095 6216 +1062 6227 +1040 6227 +1007 6216 +985 6194 +974 6172 +8 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 6326 +1128 6326 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 6337 +1128 6337 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +1007 6337 +985 6359 +974 6392 +974 6414 +985 6447 +1007 6458 +1128 6458 +7 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 4 +974 6414 +985 6436 +1007 6447 +1128 6447 +4 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +974 6293 +974 6337 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1128 6293 +1128 6370 +2 MLine +End + +Begin %I MLine +[0.7807418 0 0 0.7807418 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +1 setlinecap 1 setlinejoin +/eoFillRule true def +%I b 65535 +1 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 2 +1128 6414 +1128 6491 +2 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 5 +2304 3537 +2306 5851 +2309 6957 +2311 5040 +2311 2304 +5 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 7 +2316 9216 +2318 3782 +2320 5046 +2322 5694 +2325 7425 +2327 2809 +2327 2304 +7 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2332 2304 +2332 6545 +2334 3779 +2336 2701 +2339 2863 +2341 4038 +2343 4677 +2343 2304 +8 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 8 +2348 2304 +2348 6745 +2350 5723 +2352 4676 +2355 3001 +2357 5031 +2359 4958 +2359 2304 +8 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 17 +2364 2304 +2364 5593 +2366 6131 +2369 5183 +2371 4312 +2373 4047 +2375 6887 +2378 3572 +2380 2957 +2382 6623 +2385 5578 +2387 5196 +2389 3144 +2392 5409 +2394 5349 +2396 3938 +2396 2304 +17 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 23 +2401 2304 +2401 3893 +2403 5522 +2405 4905 +2408 5492 +2410 8222 +2412 7351 +2415 5980 +2417 5113 +2419 5349 +2422 2946 +2424 3768 +2426 3987 +2428 3116 +2431 2943 +2433 3963 +2435 6127 +2438 6093 +2440 5254 +2442 5632 +2445 5956 +2447 7000 +2449 2304 +23 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 14 +2449 2304 +2451 5820 +2454 7758 +2456 5967 +2458 3336 +2461 4018 +2463 5883 +2465 5444 +2468 5422 +2470 3213 +2472 5818 +2474 6579 +2477 3669 +2477 2304 +14 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 52 +2481 2304 +2481 3929 +2484 5008 +2486 5156 +2488 9181 +2491 7231 +2493 6319 +2495 3796 +2498 4272 +2500 5322 +2502 6001 +2504 4344 +2507 3939 +2509 4495 +2511 6707 +2514 6862 +2516 4186 +2518 6898 +2521 5929 +2523 2683 +2525 6786 +2527 5745 +2530 7087 +2532 6073 +2534 7508 +2537 5712 +2539 3585 +2541 4588 +2544 3257 +2546 5062 +2548 4287 +2551 6107 +2553 4268 +2555 5516 +2557 3495 +2560 7006 +2562 5126 +2564 4795 +2567 6427 +2569 6482 +2571 6155 +2574 5672 +2576 5571 +2578 5941 +2580 4184 +2583 4580 +2585 6938 +2587 7021 +2590 5638 +2592 6728 +2594 6274 +2597 2304 +52 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 30 +2597 2304 +2599 5625 +2601 4085 +2604 3972 +2606 7103 +2608 4874 +2610 3563 +2613 5008 +2615 5237 +2617 4205 +2620 5002 +2622 6644 +2624 4303 +2627 3993 +2629 5486 +2631 3143 +2633 5398 +2636 2961 +2638 5134 +2640 4828 +2643 3800 +2645 5856 +2647 4655 +2650 5632 +2652 4448 +2654 6759 +2657 4162 +2659 5417 +2661 5031 +2663 2304 +30 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 12 +2664 2304 +2666 5439 +2668 6260 +2670 5887 +2673 6677 +2675 3635 +2677 5685 +2680 6228 +2682 5760 +2684 5455 +2686 6136 +2689 2304 +12 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 50 +2689 2304 +2691 5024 +2693 6701 +2696 5156 +2698 2972 +2700 5454 +2703 3338 +2705 4169 +2707 7335 +2710 5755 +2712 3025 +2714 3250 +2716 7785 +2719 3138 +2721 3858 +2723 5572 +2726 6626 +2728 3509 +2730 5704 +2733 4358 +2735 6663 +2737 2585 +2739 4067 +2742 5996 +2744 4279 +2746 4831 +2749 5393 +2751 3457 +2753 4996 +2756 5329 +2758 4711 +2760 5613 +2762 4766 +2765 6331 +2767 6019 +2769 3948 +2772 5539 +2774 3994 +2776 6042 +2779 5830 +2781 4390 +2783 3784 +2786 4605 +2788 4911 +2790 6647 +2792 4684 +2795 5122 +2797 4924 +2799 4768 +2799 2304 +50 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 6 +2804 2304 +2804 5242 +2806 4333 +2809 3694 +2811 6115 +2811 2304 +6 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +2815 2304 +2815 4467 +2818 4577 +2820 2438 +2822 5659 +2825 4704 +2827 4326 +2829 5129 +2832 3356 +2834 5948 +2836 5731 +2839 5003 +2841 6929 +2843 5010 +2845 6503 +2848 5508 +2850 4844 +2852 4207 +2855 4908 +2857 5596 +2859 5035 +2862 4658 +2864 3556 +2866 3631 +2868 5071 +2871 5299 +2873 5722 +2875 4846 +2878 5313 +2880 5105 +2882 4724 +2885 4666 +2887 5480 +2889 4429 +2892 5102 +2894 3208 +2896 5477 +2898 4912 +2901 5978 +2903 6812 +2905 4435 +2908 4117 +2910 3539 +2912 5100 +2915 5103 +2917 4579 +2919 4502 +2921 5469 +2924 4849 +2926 5587 +2928 5009 +2931 4724 +2933 5662 +2935 5433 +2938 5155 +2940 5584 +2942 4712 +2945 4849 +2947 5169 +2949 4890 +2951 2614 +2954 5378 +2956 3964 +2958 2365 +2961 4798 +2963 6236 +2965 5300 +2968 4452 +2970 4730 +2972 6526 +2974 4494 +2977 3588 +2979 5140 +2981 4810 +2984 4655 +2986 5072 +2988 3927 +2991 5600 +2993 4667 +2995 5611 +2998 4792 +3000 5403 +3002 5353 +3004 5246 +3007 4527 +3009 7247 +3011 5939 +3014 4158 +3016 4188 +3018 5535 +3021 6841 +3023 3405 +3025 5342 +3027 4717 +3030 4895 +3032 5026 +3034 4201 +3037 2962 +3039 3987 +3041 5061 +3044 4744 +3046 3880 +3048 5879 +3050 6122 +3053 5621 +3055 2487 +3057 5431 +3060 5492 +3062 4565 +3064 5669 +3067 4395 +3069 4125 +3071 4975 +3074 4476 +3076 6096 +3078 5557 +3080 5672 +3083 4699 +3085 3673 +3087 4429 +3090 3668 +3092 5839 +3094 5223 +3097 4999 +3099 3406 +3101 5109 +3103 5254 +3106 3251 +3108 4486 +3110 5880 +3113 4431 +3115 5721 +3117 4393 +3120 4941 +3122 4302 +3124 4320 +3127 4424 +3129 4504 +3131 5623 +3133 3928 +3136 6113 +3138 5371 +3140 5003 +3143 6304 +3145 4655 +3147 5484 +3150 4500 +3152 3724 +3154 4679 +3156 4937 +3159 4296 +3161 4444 +3163 5901 +3166 4381 +3168 5522 +3170 5929 +3173 4851 +3175 4986 +3177 3870 +3180 5414 +3182 3886 +3184 4957 +3186 4988 +3189 5250 +3191 5554 +3193 4910 +3196 4632 +3198 5334 +3200 4401 +3203 5663 +3205 5207 +3207 4188 +3209 5253 +3212 5965 +3214 5414 +3216 5223 +3219 5346 +3221 5186 +3223 5702 +3226 4887 +3228 4813 +3230 4958 +3233 5399 +3235 4439 +3237 4607 +3239 5723 +3242 4556 +3244 5758 +3246 5238 +3249 3989 +3251 5187 +3253 5354 +3256 5395 +3258 5384 +3260 4405 +3262 5695 +3265 5284 +3267 4783 +3269 6017 +3272 4313 +3274 5041 +3276 4289 +3279 4922 +3281 2568 +3283 5001 +3286 4472 +3288 6198 +3290 4679 +3292 4732 +3295 4601 +3297 5628 +3299 4872 +3302 4235 +3304 4272 +3306 5159 +3309 5456 +3311 4979 +3313 3544 +3315 5845 +3318 4297 +3320 4715 +3322 4241 +3325 4155 +3327 6127 +3329 4949 +3332 5663 +3334 7135 +3336 6070 +3338 4776 +3341 3711 +3343 4841 +3345 4666 +3348 4580 +3350 5700 +3352 4175 +3355 4755 +3357 5891 +3359 4288 +3362 4761 +3364 4206 +3366 6330 +3368 5722 +3371 5133 +3373 5191 +3375 4366 +3378 4523 +3380 5576 +3382 4902 +3385 4596 +3387 6145 +3389 4578 +3391 4242 +3394 5414 +3396 4061 +3398 5454 +3401 3813 +3403 4829 +3405 4015 +3408 3936 +3410 4625 +3412 4686 +3415 5942 +3417 5630 +3419 4603 +3421 5883 +3424 5757 +3426 5687 +3428 5088 +3431 5724 +3433 5345 +3435 4432 +3438 4290 +3440 5754 +3442 5237 +3444 4678 +3447 5493 +3449 5110 +3451 5526 +3454 4421 +3456 3996 +3458 4873 +3461 6145 +3463 4156 +3465 4670 +3468 4872 +3470 4465 +3472 4470 +3474 4697 +3477 4071 +3479 5492 +3481 5191 +3484 6397 +3486 4783 +3488 5121 +3491 5867 +3493 4828 +3495 4516 +3497 5792 +3500 5033 +3502 4759 +3504 5772 +3507 4804 +3509 5069 +3511 4818 +3514 4310 +3516 5510 +3518 6439 +3521 4828 +3523 5190 +3525 4826 +3527 6038 +3530 4626 +3532 4145 +3534 4726 +3537 4729 +3539 5912 +3541 4813 +3544 4724 +3546 3617 +3548 3524 +3550 4776 +3553 5115 +3555 5425 +3557 5289 +3560 4423 +3562 5103 +3564 4669 +3567 5011 +3569 4038 +3571 5312 +3574 4374 +3576 4433 +3578 5816 +3580 5225 +3583 4792 +3585 4320 +3587 5230 +3590 5429 +3592 5146 +3594 6043 +3597 4608 +3599 4724 +3601 4995 +3603 5955 +3606 4970 +3608 5198 +3610 5223 +3613 5098 +3615 5289 +3617 5018 +3620 4799 +3622 5859 +3624 5077 +3626 4886 +3629 5030 +3631 4722 +3633 4902 +3636 5249 +3638 5146 +3640 4894 +3643 5205 +3645 5113 +3647 4019 +3650 6192 +3652 4959 +3654 4908 +3656 4151 +3659 5368 +3661 5460 +3663 5533 +3666 4432 +3668 5306 +3670 4747 +3673 5517 +3675 4903 +3677 5888 +3679 5045 +3682 3707 +3684 4496 +3686 5224 +3689 3817 +3691 5335 +3693 4246 +3696 3908 +3698 3978 +3700 4389 +3703 5548 +3705 4863 +3707 4990 +3709 5449 +3712 4750 +3714 4948 +3716 4503 +3719 5024 +3721 5842 +3723 4975 +3726 4969 +3728 5672 +3730 4207 +3732 5094 +3735 5487 +3737 5905 +3739 4975 +3742 5292 +3744 4716 +3746 4578 +3749 4806 +3751 5140 +3753 4651 +3756 4398 +3758 4084 +3760 3932 +3762 4535 +3765 4530 +3767 5463 +3769 4177 +3772 5480 +3774 5624 +3776 4472 +3779 4549 +3781 5584 +3783 5168 +3785 5452 +3788 3898 +3790 5100 +3792 5481 +3795 4696 +3797 5129 +3799 4514 +3802 5556 +3804 5008 +3806 5725 +3809 4827 +3811 5357 +3813 4856 +3815 5141 +3818 4934 +3820 4390 +3822 5634 +3825 4602 +3827 4882 +3829 4937 +3832 5407 +3834 4768 +3836 4654 +3838 4381 +3841 5030 +3843 5045 +3845 4798 +3848 4707 +3850 5390 +3852 4503 +3855 5255 +3857 6042 +3859 4896 +3862 4401 +3864 5028 +3866 4492 +3868 4866 +3871 4663 +3873 5255 +3875 5130 +3878 4599 +3880 5406 +3882 4901 +3885 5557 +3887 4326 +3889 5076 +3891 5056 +3894 5139 +3896 4070 +3898 5221 +3901 4788 +3903 5081 +3905 4399 +3908 4964 +3910 5117 +3912 4909 +3914 4777 +3917 4040 +3919 4724 +3921 5427 +3924 5186 +3926 4993 +3928 5212 +3931 4986 +3933 3864 +3935 4739 +3938 5034 +3940 4072 +3942 5754 +3944 5316 +3947 5252 +3949 5204 +3951 5875 +3954 4977 +3956 4313 +3958 4613 +3961 5136 +3963 5681 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +3963 5681 +3965 4624 +3967 4461 +3970 5042 +3972 4438 +3974 5657 +3977 5399 +3979 3812 +3981 5833 +3984 5350 +3986 5458 +3988 4868 +3991 4783 +3993 5525 +3995 5588 +3997 5269 +4000 4408 +4002 4393 +4004 4922 +4007 5568 +4009 4510 +4011 4548 +4014 4411 +4016 4941 +4018 4841 +4020 4787 +4023 5808 +4025 4826 +4027 5128 +4030 4730 +4032 5017 +4034 5048 +4037 4799 +4039 4785 +4041 4375 +4044 5213 +4046 5568 +4048 4951 +4050 4989 +4053 4776 +4055 3940 +4057 4609 +4060 4454 +4062 4359 +4064 4590 +4067 4768 +4069 5576 +4071 5372 +4073 5167 +4076 5030 +4078 5282 +4080 5159 +4083 5125 +4085 4896 +4087 4279 +4090 4118 +4092 5246 +4094 4829 +4097 4675 +4099 4790 +4101 4279 +4103 4508 +4106 5837 +4108 5020 +4110 6001 +4113 5002 +4115 5008 +4117 4610 +4120 4644 +4122 4988 +4124 4288 +4126 5505 +4129 4759 +4131 4503 +4133 5020 +4136 5694 +4138 4314 +4140 5493 +4143 4564 +4145 5661 +4147 5420 +4150 5234 +4152 5288 +4154 4500 +4156 5004 +4159 5302 +4161 5500 +4163 4977 +4166 5156 +4168 5086 +4170 4999 +4173 4981 +4175 4772 +4177 4580 +4179 5139 +4182 5207 +4184 4276 +4186 4922 +4189 4906 +4191 5479 +4193 4975 +4196 5382 +4198 5500 +4200 5328 +4202 4469 +4205 4588 +4207 5326 +4209 4851 +4212 4663 +4214 5724 +4216 5431 +4219 4599 +4221 4955 +4223 5454 +4226 5015 +4228 4924 +4230 5393 +4232 5306 +4235 4856 +4237 4893 +4239 4664 +4242 5474 +4244 4599 +4246 5019 +4249 4673 +4251 4318 +4253 5647 +4255 5041 +4258 5775 +4260 5480 +4262 4783 +4265 4759 +4267 4643 +4269 4279 +4272 5278 +4274 5538 +4276 4722 +4279 5910 +4281 4905 +4283 4317 +4285 4774 +4288 4561 +4290 4561 +4292 4850 +4295 5098 +4297 4554 +4299 4532 +4302 5041 +4304 4924 +4306 4701 +4308 5099 +4311 5253 +4313 5298 +4315 5776 +4318 5030 +4320 4716 +4322 5266 +4325 4609 +4327 4966 +4329 4568 +4332 5418 +4334 4973 +4336 5141 +4338 4958 +4341 5121 +4343 5460 +4345 5672 +4348 4749 +4350 5100 +4352 4724 +4355 4232 +4357 5027 +4359 5046 +4361 5168 +4364 5320 +4366 5105 +4368 4777 +4371 5116 +4373 5775 +4375 4421 +4378 5031 +4380 4978 +4382 4845 +4385 5488 +4387 4590 +4389 4833 +4391 4965 +4394 4366 +4396 5320 +4398 4346 +4401 5449 +4403 4965 +4405 4866 +4408 5194 +4410 5116 +4412 5283 +4414 5371 +4417 5008 +4419 4760 +4421 4975 +4424 4994 +4426 5518 +4428 5115 +4431 4922 +4433 5072 +4435 5072 +4438 5072 +4440 5504 +4442 4922 +4444 4890 +4447 4962 +4449 4517 +4451 4768 +4454 5186 +4456 4646 +4458 5284 +4461 4966 +4463 5038 +4465 4969 +4467 4645 +4470 5660 +4472 4947 +4474 5178 +4477 5404 +4479 5398 +4481 5401 +4484 4963 +4486 5163 +4488 4833 +4490 5232 +4493 5383 +4495 5109 +4497 5093 +4500 4753 +4502 4643 +4504 4767 +4507 5108 +4509 4911 +4511 5149 +4514 4571 +4516 4375 +4518 4975 +4520 5094 +4523 4842 +4525 4658 +4527 5448 +4530 5934 +4532 5224 +4534 5224 +4537 4954 +4539 5292 +4541 4966 +4543 5091 +4546 4905 +4548 4974 +4550 4297 +4553 4940 +4555 4925 +4557 4921 +4560 4742 +4562 4752 +4564 5144 +4567 4895 +4569 5405 +4571 4855 +4573 4757 +4576 5108 +4578 5306 +4580 4644 +4583 5336 +4585 4894 +4587 4848 +4590 4655 +4592 5337 +4594 5515 +4596 4901 +4599 5022 +4601 5022 +4603 5548 +4606 4988 +4608 4623 +4610 4469 +4613 4490 +4615 4659 +4617 4980 +4620 5075 +4622 5099 +4624 4922 +4626 5054 +4629 5236 +4631 5052 +4633 5531 +4636 5225 +4638 5275 +4640 4977 +4643 4743 +4645 4717 +4647 5345 +4649 5088 +4652 4813 +4654 5338 +4656 5287 +4659 5098 +4661 4788 +4663 5424 +4666 4585 +4668 4910 +4670 5043 +4673 5206 +4675 5201 +4677 4620 +4679 5045 +4682 4696 +4684 4673 +4686 5296 +4689 4573 +4691 5206 +4693 5055 +4696 4435 +4698 4443 +4700 4889 +4702 5561 +4705 4966 +4707 4320 +4709 4736 +4712 4464 +4714 5158 +4716 4813 +4719 5148 +4721 5102 +4723 5191 +4726 5054 +4728 5194 +4730 4852 +4732 5080 +4735 5019 +4737 4851 +4739 4744 +4742 4957 +4744 4917 +4746 4926 +4749 5063 +4751 4728 +4753 4751 +4755 4911 +4758 4911 +4760 5027 +4762 5015 +4765 5015 +4767 5004 +4769 5004 +4772 4696 +4774 4820 +4776 4875 +4778 4522 +4781 5230 +4783 4775 +4785 5186 +4788 5368 +4790 5194 +4792 5205 +4795 4593 +4797 4913 +4799 5297 +4802 4835 +4804 4865 +4806 5045 +4808 4749 +4811 4941 +4813 4895 +4815 5172 +4818 4664 +4820 5231 +4822 4223 +4825 5269 +4827 4988 +4829 4988 +4831 5265 +4834 5192 +4836 4702 +4838 4962 +4841 5098 +4843 5098 +4845 5093 +4848 4871 +4850 4969 +4852 4969 +4855 4978 +4857 4868 +4859 5379 +4861 5102 +4864 5102 +4866 4823 +4868 5200 +4871 5394 +4873 5161 +4875 4883 +4878 5314 +4880 4925 +4882 4571 +4884 4774 +4887 5374 +4889 4838 +4891 4704 +4894 4783 +4896 5002 +4898 5002 +4901 4956 +4903 5232 +4905 4857 +4908 4670 +4910 4833 +4912 4762 +4914 5050 +4917 5168 +4919 4682 +4921 5204 +4924 4893 +4926 5064 +4928 4985 +4931 5071 +4933 4713 +4935 4922 +4937 5297 +4940 5261 +4942 4830 +4944 4959 +4947 4852 +4949 5581 +4951 4954 +4954 5296 +4956 4887 +4958 5213 +4961 4970 +4963 4837 +4965 5252 +4967 4464 +4970 5034 +4972 4849 +4974 5002 +4977 4985 +4979 4985 +4981 5084 +4984 5084 +4986 4684 +4988 4783 +4990 5093 +4993 4739 +4995 4795 +4997 5103 +5000 5384 +5002 5222 +5004 4611 +5007 5069 +5009 4831 +5011 4709 +5014 4707 +5016 4958 +5018 4943 +5020 4629 +5023 4886 +5025 5015 +5027 5035 +5030 4843 +5032 4694 +5034 5041 +5037 5073 +5039 5269 +5041 5017 +5043 4911 +5046 4843 +5048 4751 +5050 5015 +5053 4939 +5055 4967 +5057 4967 +5060 4985 +5062 4398 +5064 4722 +5066 4740 +5069 4921 +5071 5025 +5073 4880 +5076 4880 +5078 4927 +5080 5003 +5083 4812 +5085 5053 +5087 4348 +5090 4729 +5092 4669 +5094 5221 +5096 4690 +5099 4910 +5101 4959 +5103 4653 +5106 5057 +5108 4969 +5110 5184 +5113 4616 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +5113 4616 +5115 4936 +5117 4540 +5119 4891 +5122 5043 +5124 4992 +5126 4778 +5129 5068 +5131 5131 +5133 5131 +5136 5045 +5138 5231 +5140 4833 +5143 5131 +5145 4709 +5147 5427 +5149 4974 +5152 4730 +5154 4888 +5156 5125 +5159 5035 +5161 5109 +5163 4732 +5166 5046 +5168 5046 +5170 4913 +5172 4913 +5175 4757 +5177 4984 +5179 4897 +5182 4825 +5184 5268 +5186 5224 +5189 5204 +5191 4592 +5193 5284 +5196 5072 +5198 5063 +5200 5062 +5202 5110 +5205 4821 +5207 5222 +5209 4620 +5212 4789 +5214 5325 +5216 4757 +5219 5111 +5221 5252 +5223 4927 +5225 5057 +5228 5170 +5230 5213 +5232 5114 +5235 4661 +5237 5304 +5239 4687 +5242 5291 +5244 4886 +5246 5107 +5249 4927 +5251 4770 +5253 4770 +5255 4834 +5258 5052 +5260 5234 +5262 4922 +5265 5106 +5267 4969 +5269 4969 +5272 5047 +5274 5101 +5276 4732 +5278 4789 +5281 4984 +5283 4820 +5285 4762 +5288 4758 +5290 5325 +5292 5300 +5295 5152 +5297 5128 +5299 4924 +5302 4948 +5304 4948 +5306 4948 +5308 4993 +5311 4662 +5313 5063 +5315 5118 +5318 4630 +5320 5277 +5322 4788 +5325 5040 +5327 4895 +5329 4819 +5331 4819 +5334 4972 +5336 5243 +5338 4697 +5341 4708 +5343 4735 +5345 4944 +5348 5163 +5350 5094 +5352 4961 +5354 4702 +5357 4737 +5359 5242 +5361 4990 +5364 4830 +5366 5019 +5368 4972 +5371 4972 +5373 5282 +5375 5063 +5378 5126 +5380 5103 +5382 5103 +5384 4722 +5387 5052 +5389 5354 +5391 4988 +5394 4971 +5396 4941 +5398 4941 +5401 4961 +5403 4670 +5405 4846 +5407 4982 +5410 4975 +5412 5088 +5414 4652 +5417 5151 +5419 5213 +5421 4920 +5424 5019 +5426 5019 +5428 4846 +5431 5164 +5433 4990 +5435 4942 +5437 4957 +5440 5141 +5442 5118 +5444 4895 +5447 5205 +5449 5178 +5451 5178 +5454 4697 +5456 4697 +5458 4591 +5460 5278 +5463 5107 +5465 4720 +5467 4883 +5470 5075 +5472 5075 +5474 5060 +5477 5473 +5479 4735 +5481 4941 +5484 5004 +5486 5054 +5488 4836 +5490 5050 +5493 5047 +5495 4856 +5497 5001 +5500 4828 +5502 4963 +5504 5065 +5507 4942 +5509 4840 +5511 5395 +5513 4773 +5516 4962 +5518 4972 +5520 5125 +5523 5100 +5525 5015 +5527 5017 +5530 4844 +5532 5343 +5534 5009 +5537 5065 +5539 5384 +5541 5182 +5543 5004 +5546 5109 +5548 4874 +5550 4995 +5553 4971 +5555 5002 +5557 5002 +5560 4792 +5562 4593 +5564 4773 +5566 4773 +5569 5186 +5571 5155 +5573 4967 +5576 4978 +5578 4731 +5580 5171 +5583 4789 +5585 4789 +5587 4789 +5590 4996 +5592 4996 +5594 5008 +5596 4823 +5599 4823 +5601 4875 +5603 5014 +5606 5230 +5608 4985 +5610 4865 +5613 4880 +5615 5204 +5617 5122 +5619 4957 +5622 4826 +5624 4835 +5626 4881 +5629 5042 +5631 5197 +5633 5026 +5636 4863 +5638 5049 +5640 4837 +5642 4870 +5645 5100 +5647 5098 +5649 5138 +5652 4545 +5654 4803 +5656 4999 +5659 4950 +5661 4913 +5663 4995 +5666 5133 +5668 4899 +5670 4799 +5672 4887 +5675 4798 +5677 5091 +5679 4990 +5682 4853 +5684 5096 +5686 5096 +5689 5032 +5691 5032 +5693 5032 +5695 4999 +5698 4791 +5700 4800 +5702 4800 +5705 4874 +5707 4856 +5709 4943 +5712 4808 +5714 5105 +5716 5032 +5719 4985 +5721 4745 +5723 4780 +5725 5016 +5728 5016 +5730 5063 +5732 4903 +5735 5186 +5737 4701 +5739 5222 +5742 5039 +5744 5016 +5746 5016 +5748 4882 +5751 5087 +5753 5087 +5755 5115 +5758 5402 +5760 4911 +5762 5054 +5765 5054 +5767 4908 +5769 4908 +5772 4973 +5774 4989 +5776 4989 +5778 5011 +5781 4889 +5783 5015 +5785 5077 +5788 5139 +5790 5245 +5792 4767 +5795 5118 +5797 4922 +5799 5041 +5801 5007 +5804 5073 +5806 5039 +5808 4969 +5811 5111 +5813 5111 +5815 4875 +5818 5111 +5820 4901 +5822 4912 +5825 5042 +5827 4773 +5829 4886 +5831 5244 +5834 4826 +5836 4982 +5838 4996 +5841 4996 +5843 4996 +5845 5085 +5848 5017 +5850 5017 +5852 5037 +5854 4850 +5857 5118 +5859 4948 +5861 4755 +5864 5069 +5866 5172 +5868 4966 +5871 4717 +5873 5193 +5875 5160 +5878 4758 +5880 4785 +5882 5106 +5884 4889 +5887 4898 +5889 4921 +5891 4921 +5894 4709 +5896 5255 +5898 4906 +5901 4906 +5903 4799 +5905 4860 +5907 4912 +5910 5085 +5912 4821 +5914 5015 +5917 4876 +5919 4908 +5921 4996 +5924 4996 +5926 4870 +5928 5102 +5930 4948 +5933 4804 +5935 4804 +5937 4899 +5940 4973 +5942 4973 +5944 4973 +5947 5193 +5949 5193 +5951 5197 +5954 5084 +5956 4980 +5958 4844 +5960 5138 +5963 5081 +5965 4743 +5967 5055 +5970 5055 +5972 4734 +5974 4863 +5977 5062 +5979 5103 +5981 4989 +5983 4952 +5986 5019 +5988 4744 +5990 4856 +5993 5131 +5995 5131 +5997 4985 +6000 4926 +6002 5111 +6004 5012 +6007 5207 +6009 5159 +6011 5159 +6013 5026 +6016 5159 +6018 4791 +6020 5094 +6023 5122 +6025 4870 +6027 5126 +6030 5008 +6032 4911 +6034 4772 +6036 5192 +6039 4828 +6041 4813 +6043 4813 +6046 4811 +6048 4961 +6050 5075 +6053 5075 +6055 4982 +6057 4882 +6060 5048 +6062 4684 +6064 5190 +6066 4956 +6069 4956 +6071 5168 +6073 4899 +6076 4891 +6078 4754 +6080 4754 +6083 4910 +6085 5053 +6087 5057 +6089 4921 +6092 4921 +6094 4899 +6096 4899 +6099 5004 +6101 5009 +6103 5009 +6106 4985 +6108 4934 +6110 4934 +6113 5063 +6115 5063 +6117 5040 +6119 5040 +6122 4826 +6124 4802 +6126 4729 +6129 4729 +6131 4903 +6133 4951 +6136 5091 +6138 5091 +6140 5009 +6142 4810 +6145 5070 +6147 4822 +6149 5028 +6152 5028 +6154 4874 +6156 4985 +6159 4952 +6161 4918 +6163 4790 +6166 4972 +6168 4944 +6170 4873 +6172 4924 +6175 4723 +6177 4942 +6179 4994 +6182 4958 +6184 4958 +6186 4958 +6189 4975 +6191 5000 +6193 5267 +6195 5080 +6198 4910 +6200 4838 +6202 4838 +6205 5128 +6207 5136 +6209 4845 +6212 4840 +6214 4840 +6216 4840 +6218 4840 +6221 4897 +6223 5000 +6225 4893 +6228 5148 +6230 4831 +6232 4994 +6235 4908 +6237 5023 +6239 5014 +6242 5032 +6244 5032 +6246 5060 +6248 4918 +6251 4918 +6253 4999 +6255 4919 +6258 4925 +6260 4957 +6262 5204 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +6262 5204 +6265 4829 +6267 4977 +6269 4803 +6271 5030 +6274 5015 +6276 4984 +6278 4984 +6281 4919 +6283 4890 +6285 4928 +6288 4928 +6290 4928 +6292 4928 +6295 4966 +6297 5039 +6299 5039 +6301 5163 +6304 4981 +6306 4823 +6308 4979 +6311 4943 +6313 4856 +6315 4856 +6318 4856 +6320 4849 +6322 4961 +6324 4948 +6327 4948 +6329 4973 +6331 4926 +6334 4926 +6336 4967 +6338 4952 +6341 5017 +6343 5017 +6345 4924 +6348 4851 +6350 4971 +6352 4965 +6354 4965 +6357 5061 +6359 4912 +6361 4949 +6364 4949 +6366 4949 +6368 5015 +6371 4796 +6373 4853 +6375 4857 +6377 4863 +6380 4835 +6382 4835 +6384 4929 +6387 4929 +6389 5048 +6391 4861 +6394 4954 +6396 4954 +6398 4721 +6401 4981 +6403 4883 +6405 4883 +6407 4883 +6410 5004 +6412 5062 +6414 5053 +6417 5053 +6419 5053 +6421 4855 +6424 4965 +6426 4965 +6428 4867 +6430 4867 +6433 5011 +6435 4928 +6437 5022 +6440 5022 +6442 5022 +6444 4956 +6447 4811 +6449 4995 +6451 4969 +6454 4850 +6456 5041 +6458 5007 +6460 5079 +6463 4849 +6465 4990 +6467 4990 +6470 5034 +6472 4899 +6474 4899 +6477 4840 +6479 4936 +6481 5032 +6483 5005 +6486 4909 +6488 5033 +6490 5033 +6493 5121 +6495 5043 +6497 5062 +6500 5062 +6502 5008 +6504 4966 +6506 4891 +6509 4914 +6511 4884 +6513 4884 +6516 4990 +6518 4990 +6520 4990 +6523 4990 +6525 5066 +6527 5022 +6530 4993 +6532 4889 +6534 5020 +6536 5020 +6539 5076 +6541 4916 +6543 5141 +6546 5098 +6548 5081 +6550 4851 +6553 5033 +6555 4977 +6557 4977 +6559 5003 +6562 4821 +6564 5113 +6566 4972 +6569 5022 +6571 4912 +6573 5009 +6576 5009 +6578 5034 +6580 4985 +6583 5099 +6585 4979 +6587 4942 +6589 4942 +6592 4978 +6594 4898 +6596 4999 +6599 4999 +6601 4999 +6603 4999 +6606 4773 +6608 5153 +6610 5153 +6612 4942 +6615 4932 +6617 4969 +6619 5016 +6622 5016 +6624 5057 +6626 4999 +6629 4802 +6631 4967 +6633 5076 +6636 4861 +6638 4861 +6640 4861 +6642 4911 +6645 5018 +6647 5018 +6649 5050 +6652 5050 +6654 5007 +6656 5007 +6659 4989 +6661 4989 +6663 4989 +6665 4919 +6668 5017 +6670 5017 +6672 4934 +6675 4808 +6677 4878 +6679 4878 +6682 4873 +6684 4952 +6686 4911 +6689 4901 +6691 4901 +6693 4831 +6695 4831 +6698 5011 +6700 4972 +6702 4972 +6705 4972 +6707 4972 +6709 4954 +6712 5140 +6714 5034 +6716 4957 +6718 4952 +6721 4952 +6723 4952 +6725 4989 +6728 4992 +6730 5035 +6732 5042 +6735 5042 +6737 5042 +6739 4941 +6742 4941 +6744 4941 +6746 5009 +6748 5009 +6751 4980 +6753 5004 +6755 4971 +6758 5020 +6760 5020 +6762 4901 +6765 4952 +6767 4994 +6769 4924 +6771 4924 +6774 4924 +6776 4924 +6778 4924 +6781 4939 +6783 5005 +6785 4866 +6788 4866 +6790 5088 +6792 4807 +6794 4807 +6797 5005 +6799 4937 +6801 4937 +6804 4937 +6806 4937 +6808 5052 +6811 4903 +6813 4903 +6815 4903 +6818 4903 +6820 5019 +6822 4933 +6824 4933 +6827 5038 +6829 5048 +6831 4959 +6834 5007 +6836 4936 +6838 4973 +6841 4943 +6843 4963 +6845 4835 +6847 4980 +6850 4980 +6852 4981 +6854 4980 +6857 4980 +6859 5043 +6861 4970 +6864 4985 +6866 4965 +6868 4965 +6871 4993 +6873 4993 +6875 4993 +6877 4905 +6880 4905 +6882 4905 +6884 4905 +6887 5031 +6889 4873 +6891 4963 +6894 4878 +6896 4921 +6898 4921 +6900 4921 +6903 4921 +6905 4921 +6907 4868 +6910 4971 +6912 4971 +6914 4971 +6917 5008 +6919 4925 +6921 4925 +6924 4902 +6926 4926 +6928 4926 +6930 4990 +6933 4990 +6935 4990 +6937 5024 +6940 5024 +6942 5024 +6944 4917 +6947 4917 +6949 5052 +6951 5052 +6953 5008 +6956 4971 +6958 4971 +6960 4971 +6963 4925 +6965 4936 +6967 4829 +6970 4920 +6972 4884 +6974 4901 +6977 4861 +6979 4890 +6981 5026 +6983 5008 +6986 4901 +6988 4881 +6990 4881 +6993 4894 +6995 4904 +6997 5007 +7000 5007 +7002 5007 +7004 5007 +7006 5007 +7009 5007 +7011 4993 +7013 4993 +7016 5034 +7018 5034 +7020 5034 +7023 5034 +7025 4883 +7027 5040 +7030 4933 +7032 4933 +7034 4933 +7036 4933 +7039 4933 +7041 4933 +7043 4933 +7046 4933 +7048 4933 +7050 4933 +7053 4933 +7055 4964 +7057 4893 +7059 4876 +7062 4919 +7064 4919 +7066 4919 +7069 4919 +7071 4896 +7073 5002 +7076 4855 +7078 4955 +7080 5032 +7082 4996 +7085 4996 +7087 4996 +7089 4973 +7092 5095 +7094 4850 +7096 4901 +7099 4904 +7101 4904 +7103 4904 +7106 4904 +7108 4904 +7110 4996 +7112 4886 +7115 4886 +7117 4919 +7119 4919 +7122 4919 +7124 5023 +7126 4913 +7129 4913 +7131 4913 +7133 4913 +7135 4913 +7138 5032 +7140 4971 +7142 4971 +7145 4971 +7147 4971 +7149 4971 +7152 4971 +7154 4971 +7156 4971 +7159 4971 +7161 4926 +7163 5022 +7165 5005 +7168 5005 +7170 4882 +7172 4922 +7175 4924 +7177 4924 +7179 4924 +7182 4924 +7184 5028 +7186 4879 +7188 4879 +7191 4879 +7193 4879 +7195 4965 +7198 4965 +7200 4939 +7202 4875 +7205 4909 +7207 4973 +7209 4973 +7212 4987 +7214 4903 +7216 4903 +7218 4903 +7221 4903 +7223 4903 +7225 4965 +7228 4965 +7230 4944 +7232 4989 +7235 4883 +7237 4883 +7239 4973 +7241 4952 +7244 4952 +7246 4994 +7248 4994 +7251 4993 +7253 4957 +7255 4996 +7258 4924 +7260 4985 +7262 4985 +7265 4943 +7267 4943 +7269 4943 +7271 4943 +7274 4943 +7276 4880 +7278 4875 +7281 4899 +7283 4822 +7285 4883 +7288 4883 +7290 4883 +7292 4883 +7294 4922 +7297 4922 +7299 5007 +7301 5007 +7304 5001 +7306 5001 +7308 5001 +7311 4969 +7313 4882 +7315 4956 +7318 4956 +7320 4920 +7322 4920 +7324 4920 +7327 4911 +7329 4911 +7331 4944 +7334 4924 +7336 4924 +7338 5050 +7341 5050 +7343 5063 +7345 4922 +7347 4922 +7350 4922 +7352 4922 +7354 4979 +7357 4979 +7359 4932 +7361 4970 +7364 5004 +7366 4972 +7368 4972 +7370 4972 +7373 4972 +7375 4972 +7377 4939 +7380 4939 +7382 4939 +7384 4939 +7387 4939 +7389 4859 +7391 4842 +7394 4999 +7396 4999 +7398 4999 +7400 4929 +7403 4929 +7405 4929 +7407 4958 +7410 4996 +7412 4996 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 500 +7412 4996 +7414 5039 +7417 5039 +7419 5035 +7421 4922 +7423 4952 +7426 5009 +7428 4898 +7430 4898 +7433 4898 +7435 4868 +7437 5033 +7440 5033 +7442 5033 +7444 5033 +7447 5033 +7449 4988 +7451 4988 +7453 4941 +7456 5012 +7458 4980 +7460 4980 +7463 4980 +7465 5018 +7467 4935 +7470 4935 +7472 4962 +7474 4962 +7476 4962 +7479 4996 +7481 4996 +7483 4959 +7486 4959 +7488 4973 +7490 4973 +7493 4973 +7495 4999 +7497 5052 +7500 5102 +7502 5066 +7504 5066 +7506 5066 +7509 4905 +7511 4905 +7513 4905 +7516 4965 +7518 4961 +7520 4961 +7523 4961 +7525 4961 +7527 4994 +7529 4994 +7532 5001 +7534 4928 +7536 5045 +7539 5045 +7541 5045 +7543 5023 +7546 4995 +7548 4974 +7550 4974 +7553 5037 +7555 4990 +7557 4990 +7559 4990 +7562 4990 +7564 4990 +7566 4990 +7569 4990 +7571 4990 +7573 4905 +7576 4905 +7578 4905 +7580 4905 +7582 5017 +7585 5017 +7587 4984 +7589 5049 +7592 4999 +7594 4999 +7596 4999 +7599 4931 +7601 4981 +7603 4981 +7606 4981 +7608 5007 +7610 5007 +7612 5007 +7615 5007 +7617 4948 +7619 4950 +7622 4950 +7624 4979 +7626 4935 +7629 4935 +7631 4935 +7633 4936 +7635 4956 +7638 4956 +7640 5011 +7642 5011 +7645 5011 +7647 5011 +7649 5011 +7652 5011 +7654 4984 +7656 5012 +7658 5012 +7661 4975 +7663 4975 +7665 4975 +7668 4975 +7670 4916 +7672 4916 +7675 4903 +7677 4903 +7679 4903 +7682 4979 +7684 4979 +7686 4949 +7688 4871 +7691 4852 +7693 4852 +7695 5010 +7698 5010 +7700 5010 +7702 5010 +7705 4982 +7707 4911 +7709 5007 +7711 4901 +7714 4924 +7716 4954 +7718 4954 +7721 4954 +7723 4956 +7725 4967 +7728 4967 +7730 4967 +7732 4947 +7735 4947 +7737 4948 +7739 4948 +7741 4948 +7744 4948 +7746 4948 +7748 4948 +7751 4919 +7753 5012 +7755 4956 +7758 4956 +7760 4956 +7762 4956 +7764 4956 +7767 4961 +7769 4961 +7771 4980 +7774 4980 +7776 4980 +7778 4980 +7781 4980 +7783 4980 +7785 4980 +7788 4959 +7790 4959 +7792 4959 +7794 4959 +7797 4959 +7799 4959 +7801 4959 +7804 5049 +7806 5049 +7808 4919 +7811 5015 +7813 5015 +7815 5015 +7817 5015 +7820 5015 +7822 5010 +7824 4959 +7827 4959 +7829 4959 +7831 4980 +7834 4980 +7836 4980 +7838 4966 +7841 4966 +7843 4966 +7845 4966 +7847 4974 +7850 4974 +7852 5012 +7854 4913 +7857 4913 +7859 4952 +7861 4952 +7864 4952 +7866 4952 +7868 4952 +7870 4986 +7873 4942 +7875 4942 +7877 4919 +7880 5031 +7882 5031 +7884 5031 +7887 4927 +7889 4927 +7891 4966 +7894 4966 +7896 5030 +7898 4948 +7900 4948 +7903 4948 +7905 4975 +7907 4975 +7910 4967 +7912 4888 +7914 4917 +7917 4987 +7919 4944 +7921 4909 +7923 4909 +7926 4909 +7928 4975 +7930 4975 +7933 4975 +7935 4916 +7937 4921 +7940 4950 +7942 4950 +7944 4979 +7946 4979 +7949 4979 +7951 4979 +7953 4979 +7956 4972 +7958 4947 +7960 4980 +7963 4946 +7965 4946 +7967 4940 +7970 4940 +7972 4940 +7974 4940 +7976 4975 +7979 4989 +7981 4989 +7983 4989 +7986 4936 +7988 5001 +7990 5001 +7993 5001 +7995 4965 +7997 4933 +7999 4933 +8002 4948 +8004 4971 +8006 4971 +8009 4971 +8011 4971 +8013 4971 +8016 4979 +8018 4979 +8020 4979 +8023 4969 +8025 5017 +8027 5017 +8029 5017 +8032 4928 +8034 4966 +8036 4940 +8039 4940 +8041 4940 +8043 4940 +8046 4940 +8048 4940 +8050 5024 +8052 5024 +8055 5024 +8057 4995 +8059 4996 +8062 4996 +8064 4996 +8066 4996 +8069 4996 +8071 4996 +8073 4996 +8076 4996 +8078 4996 +8080 4996 +8082 4940 +8085 4940 +8087 4940 +8089 4940 +8092 4980 +8094 4980 +8096 4980 +8099 4996 +8101 4996 +8103 4979 +8105 4990 +8108 4990 +8110 5019 +8112 5019 +8115 5019 +8117 5019 +8119 4944 +8122 4966 +8124 5002 +8126 5002 +8129 5002 +8131 5002 +8133 5002 +8135 5002 +8138 5009 +8140 4946 +8142 4946 +8145 4946 +8147 4946 +8149 5002 +8152 5002 +8154 5002 +8156 5002 +8158 5002 +8161 5002 +8163 5002 +8165 5012 +8168 5012 +8170 5012 +8172 5012 +8175 5012 +8177 4919 +8179 4919 +8182 4980 +8184 4985 +8186 4985 +8188 4985 +8191 4985 +8193 4985 +8195 4985 +8198 4979 +8200 4979 +8202 4937 +8205 4937 +8207 4937 +8209 4937 +8211 4937 +8214 4937 +8216 4937 +8218 4937 +8221 4937 +8223 4937 +8225 4937 +8228 4937 +8230 4937 +8232 4937 +8234 4961 +8237 4966 +8239 4966 +8241 4966 +8244 4966 +8246 4966 +8248 4966 +8251 4966 +8253 4966 +8255 4966 +8258 5002 +8260 5002 +8262 5002 +8264 4995 +8267 4965 +8269 4965 +8271 4965 +8274 4965 +8276 4965 +8278 4933 +8281 4933 +8283 4933 +8285 4933 +8287 4933 +8290 4933 +8292 4933 +8294 4996 +8297 4996 +8299 4996 +8301 4996 +8304 4996 +8306 4996 +8308 4996 +8311 4996 +8313 4996 +8315 4996 +8317 4929 +8320 4988 +8322 4988 +8324 4988 +8327 4939 +8329 4979 +8331 4964 +8334 4964 +8336 4964 +8338 4964 +8340 4964 +8343 4964 +8345 4964 +8347 4964 +8350 4964 +8352 4964 +8354 4964 +8357 4964 +8359 4964 +8361 4964 +8364 4964 +8366 4964 +8368 4964 +8370 4964 +8373 4964 +8375 4964 +8377 4964 +8380 4964 +8382 4964 +8384 4966 +8387 4966 +8389 4966 +8391 4952 +8393 4952 +8396 4952 +8398 4952 +8400 4952 +8403 4986 +8405 4986 +8407 4986 +8410 5018 +8412 5018 +8414 5018 +8417 5018 +8419 5005 +8421 5005 +8423 5005 +8426 5005 +8428 5005 +8430 4949 +8433 4949 +8435 4941 +8437 4941 +8440 4941 +8442 4941 +8444 4941 +8446 4961 +8449 4954 +8451 4957 +8453 4957 +8456 4971 +8458 4971 +8460 4970 +8463 4970 +8465 4946 +8467 5009 +8470 5009 +8472 4959 +8474 4959 +8476 4959 +8479 4959 +8481 4984 +8483 5020 +8486 5020 +8488 4914 +8490 4914 +8493 4914 +8495 4973 +8497 4973 +8499 4973 +8502 4973 +8504 4973 +8506 4973 +8509 4973 +8511 4973 +8513 4973 +8516 4973 +8518 4947 +8520 4979 +8522 4979 +8525 4979 +8527 4979 +8529 4979 +8532 4979 +8534 4979 +8536 4955 +8539 4955 +8541 4955 +8543 4955 +8546 4986 +8548 4951 +8550 4951 +8552 4951 +8555 4951 +8557 4951 +8559 4951 +8562 4951 +500 MLine +End + +Begin %I MLine +[1 0 0 1 0 0 ] trueoriginalCTM originalCTM +concatmatrix pop +0 setlinecap 0 setlinejoin 10.43 setmiterlimit +/eoFillRule true def +%I b 65535 +0 0 0 [ ] 0 SetB +%I cfg Black +0 0 0 SetCFg +%I cbg White +1 1 1 SetCBg +%I p +none SetP +%I t +[0.05 0 0 0.05 18 108 ] concat +%I 53 +8562 4951 +8564 4943 +8566 4963 +8569 4985 +8571 4985 +8573 4985 +8575 4995 +8578 4996 +8580 4964 +8582 4964 +8585 4981 +8587 4981 +8589 4917 +8592 4959 +8594 4959 +8596 4959 +8599 4959 +8601 4959 +8603 4959 +8605 4959 +8608 4980 +8610 4980 +8612 4980 +8615 4947 +8617 4947 +8619 4947 +8622 4947 +8624 4942 +8626 4929 +8628 4929 +8631 4932 +8633 4932 +8635 4932 +8638 4932 +8640 4932 +8642 4932 +8645 4937 +8647 4937 +8649 4937 +8652 4964 +8654 4964 +8656 4997 +8658 5004 +8661 4973 +8663 4973 +8665 4984 +8668 4984 +8670 4973 +8672 4973 +8675 4973 +8677 4986 +8679 4980 +8681 4980 +53 MLine +End + +%%PageTrailer +End %I eop +showpage + +%%Trailer +end +%%EOF diff --git a/software/gsl-1.15/doc/siman.texi b/software/gsl-1.15/doc/siman.texi new file mode 100644 index 000000000..e22d84be4 --- /dev/null +++ b/software/gsl-1.15/doc/siman.texi @@ -0,0 +1,371 @@ +@cindex simulated annealing +@cindex combinatorial optimization +@cindex optimization, combinatorial +@cindex energy function +@cindex cost function +Stochastic search techniques are used when the structure of a space is +not well understood or is not smooth, so that techniques like Newton's +method (which requires calculating Jacobian derivative matrices) cannot +be used. In particular, these techniques are frequently used to solve +combinatorial optimization problems, such as the traveling salesman +problem. + +The goal is to find a point in the space at which a real valued +@dfn{energy function} (or @dfn{cost function}) is minimized. Simulated +annealing is a minimization technique which has given good results in +avoiding local minima; it is based on the idea of taking a random walk +through the space at successively lower temperatures, where the +probability of taking a step is given by a Boltzmann distribution. + +The functions described in this chapter are declared in the header file +@file{gsl_siman.h}. + +@menu +* Simulated Annealing algorithm:: +* Simulated Annealing functions:: +* Examples with Simulated Annealing:: +* Simulated Annealing References and Further Reading:: +@end menu + +@node Simulated Annealing algorithm +@section Simulated Annealing algorithm + +The simulated annealing algorithm takes random walks through the problem +space, looking for points with low energies; in these random walks, the +probability of taking a step is determined by the Boltzmann distribution, +@tex +\beforedisplay +$$ +p = e^{-(E_{i+1} - E_i)/(kT)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +p = e^@{-(E_@{i+1@} - E_i)/(kT)@} +@end example + +@end ifinfo +@noindent +if +@c{$E_{i+1} > E_i$} +@math{E_@{i+1@} > E_i}, and +@math{p = 1} when +@c{$E_{i+1} \le E_i$} +@math{E_@{i+1@} <= E_i}. + +In other words, a step will occur if the new energy is lower. If +the new energy is higher, the transition can still occur, and its +likelihood is proportional to the temperature @math{T} and inversely +proportional to the energy difference +@c{$E_{i+1} - E_i$} +@math{E_@{i+1@} - E_i}. + +The temperature @math{T} is initially set to a high value, and a random +walk is carried out at that temperature. Then the temperature is +lowered very slightly according to a @dfn{cooling schedule}, for +example: @c{$T \rightarrow T/\mu_T$} +@math{T -> T/mu_T} +where @math{\mu_T} is slightly greater than 1. +@cindex cooling schedule +@cindex schedule, cooling + +The slight probability of taking a step that gives higher energy is what +allows simulated annealing to frequently get out of local minima. + +@node Simulated Annealing functions +@section Simulated Annealing functions + +@deftypefun void gsl_siman_solve (const gsl_rng * @var{r}, void * @var{x0_p}, gsl_siman_Efunc_t @var{Ef}, gsl_siman_step_t @var{take_step}, gsl_siman_metric_t @var{distance}, gsl_siman_print_t @var{print_position}, gsl_siman_copy_t @var{copyfunc}, gsl_siman_copy_construct_t @var{copy_constructor}, gsl_siman_destroy_t @var{destructor}, size_t @var{element_size}, gsl_siman_params_t @var{params}) + +This function performs a simulated annealing search through a given +space. The space is specified by providing the functions @var{Ef} and +@var{distance}. The simulated annealing steps are generated using the +random number generator @var{r} and the function @var{take_step}. + +The starting configuration of the system should be given by @var{x0_p}. +The routine offers two modes for updating configurations, a fixed-size +mode and a variable-size mode. In the fixed-size mode the configuration +is stored as a single block of memory of size @var{element_size}. +Copies of this configuration are created, copied and destroyed +internally using the standard library functions @code{malloc}, +@code{memcpy} and @code{free}. The function pointers @var{copyfunc}, +@var{copy_constructor} and @var{destructor} should be null pointers in +fixed-size mode. In the variable-size mode the functions +@var{copyfunc}, @var{copy_constructor} and @var{destructor} are used to +create, copy and destroy configurations internally. The variable +@var{element_size} should be zero in the variable-size mode. + +The @var{params} structure (described below) controls the run by +providing the temperature schedule and other tunable parameters to the +algorithm. + +On exit the best result achieved during the search is placed in +@code{*@var{x0_p}}. If the annealing process has been successful this +should be a good approximation to the optimal point in the space. + +If the function pointer @var{print_position} is not null, a debugging +log will be printed to @code{stdout} with the following columns: + +@example +#-iter #-evals temperature position energy best_energy +@end example + +and the output of the function @var{print_position} itself. If +@var{print_position} is null then no information is printed. +@end deftypefun + +@noindent +The simulated annealing routines require several user-specified +functions to define the configuration space and energy function. The +prototypes for these functions are given below. + +@deftp {Data Type} gsl_siman_Efunc_t +This function type should return the energy of a configuration @var{xp}. + +@example +double (*gsl_siman_Efunc_t) (void *xp) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_step_t +This function type should modify the configuration @var{xp} using a random step +taken from the generator @var{r}, up to a maximum distance of +@var{step_size}. + +@example +void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, + double step_size) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_metric_t +This function type should return the distance between two configurations +@var{xp} and @var{yp}. + +@example +double (*gsl_siman_metric_t) (void *xp, void *yp) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_print_t +This function type should print the contents of the configuration @var{xp}. + +@example +void (*gsl_siman_print_t) (void *xp) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_copy_t +This function type should copy the configuration @var{source} into @var{dest}. + +@example +void (*gsl_siman_copy_t) (void *source, void *dest) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_copy_construct_t +This function type should create a new copy of the configuration @var{xp}. + +@example +void * (*gsl_siman_copy_construct_t) (void *xp) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_destroy_t +This function type should destroy the configuration @var{xp}, freeing its +memory. + +@example +void (*gsl_siman_destroy_t) (void *xp) +@end example +@end deftp + +@deftp {Data Type} gsl_siman_params_t +These are the parameters that control a run of @code{gsl_siman_solve}. +This structure contains all the information needed to control the +search, beyond the energy function, the step function and the initial +guess. + +@table @code +@item int n_tries +The number of points to try for each step. + +@item int iters_fixed_T +The number of iterations at each temperature. + +@item double step_size +The maximum step size in the random walk. + +@item double k, t_initial, mu_t, t_min +The parameters of the Boltzmann distribution and cooling schedule. +@end table +@end deftp + + +@node Examples with Simulated Annealing +@section Examples + +The simulated annealing package is clumsy, and it has to be because it +is written in C, for C callers, and tries to be polymorphic at the same +time. But here we provide some examples which can be pasted into your +application with little change and should make things easier. + +@menu +* Trivial example:: +* Traveling Salesman Problem:: +@end menu + +@node Trivial example +@subsection Trivial example + +The first example, in one dimensional Cartesian space, sets up an energy +function which is a damped sine wave; this has many local minima, but +only one global minimum, somewhere between 1.0 and 1.5. The initial +guess given is 15.5, which is several local minima away from the global +minimum. + +@smallexample +@verbatiminclude examples/siman.c +@end smallexample + +@need 2000 +Here are a couple of plots that are generated by running +@code{siman_test} in the following way: + +@example +$ ./siman_test | awk '!/^#/ @{print $1, $4@}' + | graph -y 1.34 1.4 -W0 -X generation -Y position + | plot -Tps > siman-test.eps +$ ./siman_test | awk '!/^#/ @{print $1, $5@}' + | graph -y -0.88 -0.83 -W0 -X generation -Y energy + | plot -Tps > siman-energy.eps +@end example + +@iftex +@sp 1 +@center @image{siman-test,2.8in} +@center @image{siman-energy,2.8in} + +@quotation +Example of a simulated annealing run: at higher temperatures (early in +the plot) you see that the solution can fluctuate, but at lower +temperatures it converges. +@end quotation +@end iftex + +@node Traveling Salesman Problem +@subsection Traveling Salesman Problem +@cindex TSP +@cindex traveling salesman problem + +The TSP (@dfn{Traveling Salesman Problem}) is the classic combinatorial +optimization problem. I have provided a very simple version of it, +based on the coordinates of twelve cities in the southwestern United +States. This should maybe be called the @dfn{Flying Salesman Problem}, +since I am using the great-circle distance between cities, rather than +the driving distance. Also: I assume the earth is a sphere, so I don't +use geoid distances. + +The @code{gsl_siman_solve} routine finds a route which is 3490.62 +Kilometers long; this is confirmed by an exhaustive search of all +possible routes with the same initial city. + +The full code can be found in @file{siman/siman_tsp.c}, but I include +here some plots generated in the following way: + +@smallexample +$ ./siman_tsp > tsp.output +$ grep -v "^#" tsp.output + | awk '@{print $1, $NF@}' + | graph -y 3300 6500 -W0 -X generation -Y distance + -L "TSP - 12 southwest cities" + | plot -Tps > 12-cities.eps +$ grep initial_city_coord tsp.output + | awk '@{print $2, $3@}' + | graph -X "longitude (- means west)" -Y "latitude" + -L "TSP - initial-order" -f 0.03 -S 1 0.1 + | plot -Tps > initial-route.eps +$ grep final_city_coord tsp.output + | awk '@{print $2, $3@}' + | graph -X "longitude (- means west)" -Y "latitude" + -L "TSP - final-order" -f 0.03 -S 1 0.1 + | plot -Tps > final-route.eps +@end smallexample + +@noindent +This is the output showing the initial order of the cities; longitude is +negative, since it is west and I want the plot to look like a map. + +@smallexample +# initial coordinates of cities (longitude and latitude) +###initial_city_coord: -105.95 35.68 Santa Fe +###initial_city_coord: -112.07 33.54 Phoenix +###initial_city_coord: -106.62 35.12 Albuquerque +###initial_city_coord: -103.2 34.41 Clovis +###initial_city_coord: -107.87 37.29 Durango +###initial_city_coord: -96.77 32.79 Dallas +###initial_city_coord: -105.92 35.77 Tesuque +###initial_city_coord: -107.84 35.15 Grants +###initial_city_coord: -106.28 35.89 Los Alamos +###initial_city_coord: -106.76 32.34 Las Cruces +###initial_city_coord: -108.58 37.35 Cortez +###initial_city_coord: -108.74 35.52 Gallup +###initial_city_coord: -105.95 35.68 Santa Fe +@end smallexample + +The optimal route turns out to be: + +@smallexample +# final coordinates of cities (longitude and latitude) +###final_city_coord: -105.95 35.68 Santa Fe +###final_city_coord: -103.2 34.41 Clovis +###final_city_coord: -96.77 32.79 Dallas +###final_city_coord: -106.76 32.34 Las Cruces +###final_city_coord: -112.07 33.54 Phoenix +###final_city_coord: -108.74 35.52 Gallup +###final_city_coord: -108.58 37.35 Cortez +###final_city_coord: -107.87 37.29 Durango +###final_city_coord: -107.84 35.15 Grants +###final_city_coord: -106.62 35.12 Albuquerque +###final_city_coord: -106.28 35.89 Los Alamos +###final_city_coord: -105.92 35.77 Tesuque +###final_city_coord: -105.95 35.68 Santa Fe +@end smallexample + +@iftex +@sp 1 +@center @image{initial-route,2.2in} +@center @image{final-route,2.2in} + +@quotation +Initial and final (optimal) route for the 12 southwestern cities Flying +Salesman Problem. +@end quotation +@end iftex + +@noindent +Here's a plot of the cost function (energy) versus generation (point in +the calculation at which a new temperature is set) for this problem: + +@iftex +@sp 1 +@center @image{12-cities,2.8in} + +@quotation +Example of a simulated annealing run for the 12 southwestern cities +Flying Salesman Problem. +@end quotation +@end iftex + +@node Simulated Annealing References and Further Reading +@section References and Further Reading + +Further information is available in the following book, + +@itemize @w{} +@item +@cite{Modern Heuristic Techniques for Combinatorial Problems}, Colin R. Reeves +(ed.), McGraw-Hill, 1995 (ISBN 0-07-709239-2). +@end itemize diff --git a/software/gsl-1.15/doc/sort.texi b/software/gsl-1.15/doc/sort.texi new file mode 100644 index 000000000..f006d90d8 --- /dev/null +++ b/software/gsl-1.15/doc/sort.texi @@ -0,0 +1,315 @@ +@cindex sorting +@cindex heapsort +This chapter describes functions for sorting data, both directly and +indirectly (using an index). All the functions use the @dfn{heapsort} +algorithm. Heapsort is an @math{O(N \log N)} algorithm which operates +in-place and does not require any additional storage. It also provides +consistent performance, the running time for its worst-case (ordered +data) being not significantly longer than the average and best cases. +Note that the heapsort algorithm does not preserve the relative ordering +of equal elements---it is an @dfn{unstable} sort. However the resulting +order of equal elements will be consistent across different platforms +when using these functions. + +@menu +* Sorting objects:: +* Sorting vectors:: +* Selecting the k smallest or largest elements:: +* Computing the rank:: +* Sorting Examples:: +* Sorting References and Further Reading:: +@end menu + +@node Sorting objects +@section Sorting objects + +The following function provides a simple alternative to the standard +library function @code{qsort}. It is intended for systems lacking +@code{qsort}, not as a replacement for it. The function @code{qsort} +should be used whenever possible, as it will be faster and can provide +stable ordering of equal elements. Documentation for @code{qsort} is +available in the @cite{GNU C Library Reference Manual}. + +The functions described in this section are defined in the header file +@file{gsl_heapsort.h}. + +@cindex comparison functions, definition +@deftypefun void gsl_heapsort (void * @var{array}, size_t @var{count}, size_t @var{size}, gsl_comparison_fn_t @var{compare}) + +This function sorts the @var{count} elements of the array @var{array}, +each of size @var{size}, into ascending order using the comparison +function @var{compare}. The type of the comparison function is defined by, + +@example +int (*gsl_comparison_fn_t) (const void * a, + const void * b) +@end example + +@noindent +A comparison function should return a negative integer if the first +argument is less than the second argument, @code{0} if the two arguments +are equal and a positive integer if the first argument is greater than +the second argument. + +For example, the following function can be used to sort doubles into +ascending numerical order. + +@example +int +compare_doubles (const double * a, + const double * b) +@{ + if (*a > *b) + return 1; + else if (*a < *b) + return -1; + else + return 0; +@} +@end example + +@noindent +The appropriate function call to perform the sort is, + +@example +gsl_heapsort (array, count, sizeof(double), + compare_doubles); +@end example + +Note that unlike @code{qsort} the heapsort algorithm cannot be made into +a stable sort by pointer arithmetic. The trick of comparing pointers for +equal elements in the comparison function does not work for the heapsort +algorithm. The heapsort algorithm performs an internal rearrangement of +the data which destroys its initial ordering. +@end deftypefun + +@cindex indirect sorting +@deftypefun int gsl_heapsort_index (size_t * @var{p}, const void * @var{array}, size_t @var{count}, size_t @var{size}, gsl_comparison_fn_t @var{compare}) + +This function indirectly sorts the @var{count} elements of the array +@var{array}, each of size @var{size}, into ascending order using the +comparison function @var{compare}. The resulting permutation is stored +in @var{p}, an array of length @var{n}. The elements of @var{p} give the +index of the array element which would have been stored in that position +if the array had been sorted in place. The first element of @var{p} +gives the index of the least element in @var{array}, and the last +element of @var{p} gives the index of the greatest element in +@var{array}. The array itself is not changed. +@end deftypefun + +@node Sorting vectors +@section Sorting vectors + +The following functions will sort the elements of an array or vector, +either directly or indirectly. They are defined for all real and integer +types using the normal suffix rules. For example, the @code{float} +versions of the array functions are @code{gsl_sort_float} and +@code{gsl_sort_float_index}. The corresponding vector functions are +@code{gsl_sort_vector_float} and @code{gsl_sort_vector_float_index}. The +prototypes are available in the header files @file{gsl_sort_float.h} +@file{gsl_sort_vector_float.h}. The complete set of prototypes can be +included using the header files @file{gsl_sort.h} and +@file{gsl_sort_vector.h}. + +There are no functions for sorting complex arrays or vectors, since the +ordering of complex numbers is not uniquely defined. To sort a complex +vector by magnitude compute a real vector containing the magnitudes +of the complex elements, and sort this vector indirectly. The resulting +index gives the appropriate ordering of the original complex vector. + +@cindex sorting vector elements +@cindex vector, sorting elements of +@deftypefun void gsl_sort (double * @var{data}, size_t @var{stride}, size_t @var{n}) +This function sorts the @var{n} elements of the array @var{data} with +stride @var{stride} into ascending numerical order. +@end deftypefun + +@deftypefun void gsl_sort_vector (gsl_vector * @var{v}) +This function sorts the elements of the vector @var{v} into ascending +numerical order. +@end deftypefun + +@cindex indirect sorting, of vector elements +@deftypefun void gsl_sort_index (size_t * @var{p}, const double * @var{data}, size_t @var{stride}, size_t @var{n}) +This function indirectly sorts the @var{n} elements of the array +@var{data} with stride @var{stride} into ascending order, storing the +resulting permutation in @var{p}. The array @var{p} must be allocated with +a sufficient length to store the @var{n} elements of the permutation. +The elements of @var{p} give the index of the array element which would +have been stored in that position if the array had been sorted in place. +The array @var{data} is not changed. +@end deftypefun + +@deftypefun int gsl_sort_vector_index (gsl_permutation * @var{p}, const gsl_vector * @var{v}) +This function indirectly sorts the elements of the vector @var{v} into +ascending order, storing the resulting permutation in @var{p}. The +elements of @var{p} give the index of the vector element which would +have been stored in that position if the vector had been sorted in +place. The first element of @var{p} gives the index of the least element +in @var{v}, and the last element of @var{p} gives the index of the +greatest element in @var{v}. The vector @var{v} is not changed. +@end deftypefun + +@node Selecting the k smallest or largest elements +@section Selecting the k smallest or largest elements + +The functions described in this section select the @math{k} smallest +or largest elements of a data set of size @math{N}. The routines use an +@math{O(kN)} direct insertion algorithm which is suited to subsets that +are small compared with the total size of the dataset. For example, the +routines are useful for selecting the 10 largest values from one million +data points, but not for selecting the largest 100,000 values. If the +subset is a significant part of the total dataset it may be faster +to sort all the elements of the dataset directly with an @math{O(N \log +N)} algorithm and obtain the smallest or largest values that way. + +@deftypefun int gsl_sort_smallest (double * @var{dest}, size_t @var{k}, const double * @var{src}, size_t @var{stride}, size_t @var{n}) +This function copies the @var{k} smallest elements of the array +@var{src}, of size @var{n} and stride @var{stride}, in ascending +numerical order into the array @var{dest}. The size @var{k} of the subset must be +less than or equal to @var{n}. The data @var{src} is not modified by +this operation. +@end deftypefun + +@deftypefun int gsl_sort_largest (double * @var{dest}, size_t @var{k}, const double * @var{src}, size_t @var{stride}, size_t @var{n}) +This function copies the @var{k} largest elements of the array +@var{src}, of size @var{n} and stride @var{stride}, in descending +numerical order into the array @var{dest}. @var{k} must be +less than or equal to @var{n}. The data @var{src} is not modified by +this operation. +@end deftypefun + +@deftypefun int gsl_sort_vector_smallest (double * @var{dest}, size_t @var{k}, const gsl_vector * @var{v}) +@deftypefunx int gsl_sort_vector_largest (double * @var{dest}, size_t @var{k}, const gsl_vector * @var{v}) +These functions copy the @var{k} smallest or largest elements of the +vector @var{v} into the array @var{dest}. @var{k} +must be less than or equal to the length of the vector @var{v}. +@end deftypefun + +The following functions find the indices of the @math{k} smallest or +largest elements of a dataset, + +@deftypefun int gsl_sort_smallest_index (size_t * @var{p}, size_t @var{k}, const double * @var{src}, size_t @var{stride}, size_t @var{n}) +This function stores the indices of the @var{k} smallest elements of +the array @var{src}, of size @var{n} and stride @var{stride}, in the +array @var{p}. The indices are chosen so that the corresponding data is +in ascending numerical order. @var{k} must be +less than or equal to @var{n}. The data @var{src} is not modified by +this operation. +@end deftypefun + +@deftypefun int gsl_sort_largest_index (size_t * @var{p}, size_t @var{k}, const double * @var{src}, size_t @var{stride}, size_t @var{n}) +This function stores the indices of the @var{k} largest elements of +the array @var{src}, of size @var{n} and stride @var{stride}, in the +array @var{p}. The indices are chosen so that the corresponding data is +in descending numerical order. @var{k} must be +less than or equal to @var{n}. The data @var{src} is not modified by +this operation. +@end deftypefun + +@deftypefun int gsl_sort_vector_smallest_index (size_t * @var{p}, size_t @var{k}, const gsl_vector * @var{v}) +@deftypefunx int gsl_sort_vector_largest_index (size_t * @var{p}, size_t @var{k}, const gsl_vector * @var{v}) +These functions store the indices of the @var{k} smallest or largest +elements of the vector @var{v} in the array @var{p}. @var{k} must be less than or equal to the length of the vector +@var{v}. +@end deftypefun + + +@node Computing the rank +@section Computing the rank + +The @dfn{rank} of an element is its order in the sorted data. The rank +is the inverse of the index permutation, @var{p}. It can be computed +using the following algorithm, + +@example +for (i = 0; i < p->size; i++) +@{ + size_t pi = p->data[i]; + rank->data[pi] = i; +@} +@end example + +@noindent +This can be computed directly from the function +@code{gsl_permutation_inverse(rank,p)}. + +The following function will print the rank of each element of the vector +@var{v}, + +@example +void +print_rank (gsl_vector * v) +@{ + size_t i; + size_t n = v->size; + gsl_permutation * perm = gsl_permutation_alloc(n); + gsl_permutation * rank = gsl_permutation_alloc(n); + + gsl_sort_vector_index (perm, v); + gsl_permutation_inverse (rank, perm); + + for (i = 0; i < n; i++) + @{ + double vi = gsl_vector_get(v, i); + printf ("element = %d, value = %g, rank = %d\n", + i, vi, rank->data[i]); + @} + + gsl_permutation_free (perm); + gsl_permutation_free (rank); +@} +@end example + +@node Sorting Examples +@section Examples + +The following example shows how to use the permutation @var{p} to print +the elements of the vector @var{v} in ascending order, + +@example +gsl_sort_vector_index (p, v); + +for (i = 0; i < v->size; i++) +@{ + double vpi = gsl_vector_get (v, p->data[i]); + printf ("order = %d, value = %g\n", i, vpi); +@} +@end example + +@noindent +The next example uses the function @code{gsl_sort_smallest} to select +the 5 smallest numbers from 100000 uniform random variates stored in an +array, + +@example +@verbatiminclude examples/sortsmall.c +@end example +The output lists the 5 smallest values, in ascending order, + +@example +$ ./a.out +@verbatiminclude examples/sortsmall.out +@end example + +@node Sorting References and Further Reading +@section References and Further Reading + +The subject of sorting is covered extensively in Knuth's +@cite{Sorting and Searching}, + +@itemize @w{} +@item +Donald E. Knuth, @cite{The Art of Computer Programming: Sorting and +Searching} (Vol 3, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896850. +@end itemize + +@noindent +The Heapsort algorithm is described in the following book, + +@itemize @w{} +@item Robert Sedgewick, @cite{Algorithms in C}, Addison-Wesley, +ISBN 0201514257. +@end itemize + + diff --git a/software/gsl-1.15/doc/specfunc-airy.texi b/software/gsl-1.15/doc/specfunc-airy.texi new file mode 100644 index 000000000..1a6249eca --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-airy.texi @@ -0,0 +1,130 @@ +@cindex Airy functions +@cindex Ai(x) +@cindex Bi(x) + +The Airy functions @math{Ai(x)} and @math{Bi(x)} are defined by the +integral representations, +@tex +\beforedisplay +$$ +\eqalign{ +Ai(x) & = {1\over\pi} \int_0^\infty \cos(t^3/3 + xt ) \,dt, \cr +Bi(x) & = {1\over\pi} \int_0^\infty (e^{-t^3/3 + xt} + \sin(t^3/3 + xt)) \,dt. +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Ai(x) = (1/\pi) \int_0^\infty \cos((1/3) t^3 + xt) dt +Bi(x) = (1/\pi) \int_0^\infty (e^(-(1/3) t^3 + xt) + \sin((1/3) t^3 + xt)) dt +@end example + +@end ifinfo +@noindent +For further information see Abramowitz & Stegun, Section 10.4. The Airy +functions are defined in the header file @file{gsl_sf_airy.h}. + +@menu +* Airy Functions:: +* Derivatives of Airy Functions:: +* Zeros of Airy Functions:: +* Zeros of Derivatives of Airy Functions:: +@end menu + +@node Airy Functions +@subsection Airy Functions + +@deftypefun double gsl_sf_airy_Ai (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Ai_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the Airy function @math{Ai(x)} with an accuracy +specified by @var{mode}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Bi (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Bi_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the Airy function @math{Bi(x)} with an accuracy +specified by @var{mode}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Ai_scaled (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Ai_scaled_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute a scaled version of the Airy function +@math{S_A(x) Ai(x)}. For @math{x>0} the scaling factor @math{S_A(x)} is @c{$\exp(+(2/3) x^{3/2})$} +@math{\exp(+(2/3) x^(3/2))}, +and is 1 +for @math{x<0}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Bi_scaled (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Bi_scaled_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute a scaled version of the Airy function +@math{S_B(x) Bi(x)}. For @math{x>0} the scaling factor @math{S_B(x)} is @c{$\exp(-(2/3) x^{3/2})$} +@math{exp(-(2/3) x^(3/2))}, and is 1 for @math{x<0}. +@end deftypefun + + +@node Derivatives of Airy Functions +@subsection Derivatives of Airy Functions + +@deftypefun double gsl_sf_airy_Ai_deriv (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Ai_deriv_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the Airy function derivative @math{Ai'(x)} with +an accuracy specified by @var{mode}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Bi_deriv (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Bi_deriv_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the Airy function derivative @math{Bi'(x)} with +an accuracy specified by @var{mode}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Ai_deriv_scaled (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Ai_deriv_scaled_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the scaled Airy function derivative +@math{S_A(x) Ai'(x)}. +For @math{x>0} the scaling factor @math{S_A(x)} is @c{$\exp(+(2/3) x^{3/2})$} +@math{\exp(+(2/3) x^(3/2))}, and is 1 for @math{x<0}. +@end deftypefun + +@deftypefun double gsl_sf_airy_Bi_deriv_scaled (double @var{x}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_airy_Bi_deriv_scaled_e (double @var{x}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the scaled Airy function derivative +@math{S_B(x) Bi'(x)}. +For @math{x>0} the scaling factor @math{S_B(x)} is @c{$\exp(-(2/3) x^{3/2})$} +@math{exp(-(2/3) x^(3/2))}, and is 1 for @math{x<0}. +@end deftypefun + + +@node Zeros of Airy Functions +@subsection Zeros of Airy Functions + +@deftypefun double gsl_sf_airy_zero_Ai (unsigned int @var{s}) +@deftypefunx int gsl_sf_airy_zero_Ai_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th zero of the Airy +function @math{Ai(x)}. +@end deftypefun + +@deftypefun double gsl_sf_airy_zero_Bi (unsigned int @var{s}) +@deftypefunx int gsl_sf_airy_zero_Bi_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th zero of the Airy +function @math{Bi(x)}. +@end deftypefun + + +@node Zeros of Derivatives of Airy Functions +@subsection Zeros of Derivatives of Airy Functions + +@deftypefun double gsl_sf_airy_zero_Ai_deriv (unsigned int @var{s}) +@deftypefunx int gsl_sf_airy_zero_Ai_deriv_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th zero of the Airy +function derivative @math{Ai'(x)}. +@end deftypefun + +@deftypefun double gsl_sf_airy_zero_Bi_deriv (unsigned int @var{s}) +@deftypefunx int gsl_sf_airy_zero_Bi_deriv_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th zero of the Airy +function derivative @math{Bi'(x)}. +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-bessel.texi b/software/gsl-1.15/doc/specfunc-bessel.texi new file mode 100644 index 000000000..181acbb79 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-bessel.texi @@ -0,0 +1,592 @@ +@cindex Bessel functions +The routines described in this section compute the Cylindrical Bessel +functions @math{J_n(x)}, @math{Y_n(x)}, Modified cylindrical Bessel +functions @math{I_n(x)}, @math{K_n(x)}, Spherical Bessel functions +@math{j_l(x)}, @math{y_l(x)}, and Modified Spherical Bessel functions +@math{i_l(x)}, @math{k_l(x)}. For more information see Abramowitz & Stegun, +Chapters 9 and 10. The Bessel functions are defined in the header file +@file{gsl_sf_bessel.h}. + +@menu +* Regular Cylindrical Bessel Functions:: +* Irregular Cylindrical Bessel Functions:: +* Regular Modified Cylindrical Bessel Functions:: +* Irregular Modified Cylindrical Bessel Functions:: +* Regular Spherical Bessel Functions:: +* Irregular Spherical Bessel Functions:: +* Regular Modified Spherical Bessel Functions:: +* Irregular Modified Spherical Bessel Functions:: +* Regular Bessel Function - Fractional Order:: +* Irregular Bessel Functions - Fractional Order:: +* Regular Modified Bessel Functions - Fractional Order:: +* Irregular Modified Bessel Functions - Fractional Order:: +* Zeros of Regular Bessel Functions:: +@end menu + +@node Regular Cylindrical Bessel Functions +@subsection Regular Cylindrical Bessel Functions +@cindex Cylindrical Bessel Functions +@cindex Regular Cylindrical Bessel Functions +@cindex J(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_J0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_J0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular cylindrical Bessel function of zeroth +order, @math{J_0(x)}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_bessel_J1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_J1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular cylindrical Bessel function of first +order, @math{J_1(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Jn (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Jn_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular cylindrical Bessel function of +order @var{n}, @math{J_n(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_Jn_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the regular cylindrical Bessel +functions @math{J_n(x)} for @math{n} from @var{nmin} to @var{nmax} +inclusive, storing the results in the array @var{result_array}. The +values are computed using recurrence relations for efficiency, and +therefore may differ slightly from the exact values. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@node Irregular Cylindrical Bessel Functions +@subsection Irregular Cylindrical Bessel Functions +@cindex Irregular Cylindrical Bessel Functions +@cindex Y(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_Y0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_Y0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular cylindrical Bessel function of zeroth +order, @math{Y_0(x)}, for @math{x>0}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Y1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_Y1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular cylindrical Bessel function of first +order, @math{Y_1(x)}, for @math{x>0}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Yn (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Yn_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular cylindrical Bessel function of +order @var{n}, @math{Y_n(x)}, for @math{x>0}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_Yn_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the irregular cylindrical Bessel +functions @math{Y_n(x)} for @math{n} from @var{nmin} to @var{nmax} +inclusive, storing the results in the array @var{result_array}. The +domain of the function is @math{x>0}. The values are computed using +recurrence relations for efficiency, and therefore may differ slightly +from the exact values. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@node Regular Modified Cylindrical Bessel Functions +@subsection Regular Modified Cylindrical Bessel Functions +@cindex Modified Cylindrical Bessel Functions +@cindex Regular Modified Cylindrical Bessel Functions +@cindex I(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_I0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_I0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular modified cylindrical Bessel function +of zeroth order, @math{I_0(x)}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_I1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_I1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular modified cylindrical Bessel function +of first order, @math{I_1(x)}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_In (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_In_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular modified cylindrical Bessel function +of order @var{n}, @math{I_n(x)}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_In_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the regular modified cylindrical +Bessel functions @math{I_n(x)} for @math{n} from @var{nmin} to +@var{nmax} inclusive, storing the results in the array +@var{result_array}. The start of the range @var{nmin} must be positive +or zero. The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: nmin >=0, nmax >= nmin +@comment Conditions: n=nmin,...,nmax, nmin >=0, nmax >= nmin +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_I0_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_I0_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified cylindrical Bessel +function of zeroth order @math{\exp(-|x|) I_0(x)}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_bessel_I1_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_I1_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified cylindrical Bessel +function of first order @math{\exp(-|x|) I_1(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_In_scaled (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_In_scaled_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified cylindrical Bessel +function of order @var{n}, @math{\exp(-|x|) I_n(x)} +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_In_scaled_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the scaled regular cylindrical +Bessel functions @math{\exp(-|x|) I_n(x)} for @math{n} from +@var{nmin} to @var{nmax} inclusive, storing the results in the array +@var{result_array}. The start of the range @var{nmin} must be positive +or zero. The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: nmin >=0, nmax >= nmin +@comment Conditions: n=nmin,...,nmax +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + + +@node Irregular Modified Cylindrical Bessel Functions +@subsection Irregular Modified Cylindrical Bessel Functions +@cindex Irregular Modified Cylindrical Bessel Functions +@cindex K(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_K0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_K0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular modified cylindrical Bessel +function of zeroth order, @math{K_0(x)}, for @math{x > 0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_K1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_K1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular modified cylindrical Bessel +function of first order, @math{K_1(x)}, for @math{x > 0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Kn (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Kn_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular modified cylindrical Bessel +function of order @var{n}, @math{K_n(x)}, for @math{x > 0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_Kn_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the irregular modified cylindrical +Bessel functions @math{K_n(x)} for @math{n} from @var{nmin} to +@var{nmax} inclusive, storing the results in the array +@var{result_array}. The start of the range @var{nmin} must be positive +or zero. The domain of the function is @math{x>0}. The values are +computed using recurrence relations for efficiency, and therefore +may differ slightly from the exact values. +@comment Conditions: n=nmin,...,nmax +@comment Domain: x > 0.0, nmin>=0, nmax >= nmin +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_K0_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_K0_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified cylindrical Bessel +function of zeroth order @math{\exp(x) K_0(x)} for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_bessel_K1_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_K1_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified cylindrical Bessel +function of first order @math{\exp(x) K_1(x)} for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Kn_scaled (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Kn_scaled_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified cylindrical Bessel +function of order @var{n}, @math{\exp(x) K_n(x)}, for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_Kn_scaled_array (int @var{nmin}, int @var{nmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the scaled irregular cylindrical +Bessel functions @math{\exp(x) K_n(x)} for @math{n} from @var{nmin} to +@var{nmax} inclusive, storing the results in the array +@var{result_array}. The start of the range @var{nmin} must be positive +or zero. The domain of the function is @math{x>0}. The values are +computed using recurrence relations for efficiency, and therefore +may differ slightly from the exact values. +@comment Domain: x > 0.0, nmin >=0, nmax >= nmin +@comment Conditions: n=nmin,...,nmax +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@node Regular Spherical Bessel Functions +@subsection Regular Spherical Bessel Functions +@cindex Spherical Bessel Functions +@cindex Regular Spherical Bessel Functions +@cindex j(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_j0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_j0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular spherical Bessel function of zeroth +order, @math{j_0(x) = \sin(x)/x}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_bessel_j1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_j1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular spherical Bessel function of first +order, @math{j_1(x) = (\sin(x)/x - \cos(x))/x}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_j2 (double @var{x}) +@deftypefunx int gsl_sf_bessel_j2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular spherical Bessel function of second +order, @math{j_2(x) = ((3/x^2 - 1)\sin(x) - 3\cos(x)/x)/x}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_jl (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_bessel_jl_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular spherical Bessel function of +order @var{l}, @math{j_l(x)}, for @c{$l \geq 0$} +@math{l >= 0} and @c{$x \geq 0$} +@math{x >= 0}. +@comment Domain: l >= 0, x >= 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_jl_array (int @var{lmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the regular spherical Bessel +functions @math{j_l(x)} for @math{l} from 0 to @var{lmax} +inclusive for @c{$lmax \geq 0$} +@math{lmax >= 0} and @c{$x \geq 0$} +@math{x >= 0}, storing the results in the array @var{result_array}. +The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: lmax >= 0 +@comment Conditions: l=0,1,...,lmax +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_jl_steed_array (int @var{lmax}, double @var{x}, double * @var{result_array}) +This routine uses Steed's method to compute the values of the regular +spherical Bessel functions @math{j_l(x)} for @math{l} from 0 to +@var{lmax} inclusive for @c{$lmax \geq 0$} +@math{lmax >= 0} and @c{$x \geq 0$} +@math{x >= 0}, storing the results in the array +@var{result_array}. +The Steed/Barnett algorithm is described in @cite{Comp. Phys. Comm.} 21, +297 (1981). Steed's method is more stable than the +recurrence used in the other functions but is also slower. +@comment Domain: lmax >= 0 +@comment Conditions: l=0,1,...,lmax +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@node Irregular Spherical Bessel Functions +@subsection Irregular Spherical Bessel Functions +@cindex Irregular Spherical Bessel Functions +@cindex y(x), Bessel Functions + +@deftypefun double gsl_sf_bessel_y0 (double @var{x}) +@deftypefunx int gsl_sf_bessel_y0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular spherical Bessel function of zeroth +order, @math{y_0(x) = -\cos(x)/x}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_bessel_y1 (double @var{x}) +@deftypefunx int gsl_sf_bessel_y1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular spherical Bessel function of first +order, @math{y_1(x) = -(\cos(x)/x + \sin(x))/x}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_y2 (double @var{x}) +@deftypefunx int gsl_sf_bessel_y2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular spherical Bessel function of second +order, @math{y_2(x) = (-3/x^3 + 1/x)\cos(x) - (3/x^2)\sin(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_yl (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_bessel_yl_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular spherical Bessel function of +order @var{l}, @math{y_l(x)}, for @c{$l \geq 0$} +@math{l >= 0}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_yl_array (int @var{lmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the irregular spherical Bessel +functions @math{y_l(x)} for @math{l} from 0 to @var{lmax} +inclusive for @c{$lmax \geq 0$} +@math{lmax >= 0}, storing the results in the array @var{result_array}. +The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: lmax >= 0 +@comment Conditions: l=0,1,...,lmax +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + + +@node Regular Modified Spherical Bessel Functions +@subsection Regular Modified Spherical Bessel Functions +@cindex Modified Spherical Bessel Functions +@cindex Regular Modified Spherical Bessel Functions +@cindex i(x), Bessel Functions + +The regular modified spherical Bessel functions @math{i_l(x)} +are related to the modified Bessel functions of fractional order, +@c{$i_l(x) = \sqrt{\pi/(2x)} I_{l+1/2}(x)$} +@math{i_l(x) = \sqrt@{\pi/(2x)@} I_@{l+1/2@}(x)} + +@deftypefun double gsl_sf_bessel_i0_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_i0_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified spherical Bessel +function of zeroth order, @math{\exp(-|x|) i_0(x)}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_bessel_i1_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_i1_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified spherical Bessel +function of first order, @math{\exp(-|x|) i_1(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_i2_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_i2_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified spherical Bessel +function of second order, @math{ \exp(-|x|) i_2(x) } +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_il_scaled (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_bessel_il_scaled_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified spherical Bessel +function of order @var{l}, @math{ \exp(-|x|) i_l(x) } +@comment Domain: l >= 0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_il_scaled_array (int @var{lmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the scaled regular modified +cylindrical Bessel functions @math{\exp(-|x|) i_l(x)} for @math{l} from +0 to @var{lmax} inclusive for @c{$lmax \geq 0$} +@math{lmax >= 0}, storing the results in +the array @var{result_array}. +The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: lmax >= 0 +@comment Conditions: l=0,1,...,lmax +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + + +@node Irregular Modified Spherical Bessel Functions +@subsection Irregular Modified Spherical Bessel Functions +@cindex Irregular Modified Spherical Bessel Functions +@cindex k(x), Bessel Functions + +The irregular modified spherical Bessel functions @math{k_l(x)} +are related to the irregular modified Bessel functions of fractional order, +@c{$k_l(x) = \sqrt{\pi/(2x)} K_{l+1/2}(x)$} +@math{k_l(x) = \sqrt@{\pi/(2x)@} K_@{l+1/2@}(x)}. + +@deftypefun double gsl_sf_bessel_k0_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_k0_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified spherical Bessel +function of zeroth order, @math{\exp(x) k_0(x)}, for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_k1_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_k1_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified spherical Bessel +function of first order, @math{\exp(x) k_1(x)}, for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_k2_scaled (double @var{x}) +@deftypefunx int gsl_sf_bessel_k2_scaled_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified spherical Bessel +function of second order, @math{\exp(x) k_2(x)}, for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_kl_scaled (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_bessel_kl_scaled_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified spherical Bessel +function of order @var{l}, @math{\exp(x) k_l(x)}, for @math{x>0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_kl_scaled_array (int @var{lmax}, double @var{x}, double @var{result_array}[]) +This routine computes the values of the scaled irregular modified +spherical Bessel functions @math{\exp(x) k_l(x)} for @math{l} from +0 to @var{lmax} inclusive for @c{$lmax \geq 0$} +@math{lmax >= 0} and @math{x>0}, storing the results in +the array @var{result_array}. +The values are computed using recurrence relations for +efficiency, and therefore may differ slightly from the exact values. +@comment Domain: lmax >= 0 +@comment Conditions: l=0,1,...,lmax +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@node Regular Bessel Function - Fractional Order +@subsection Regular Bessel Function---Fractional Order +@cindex Fractional Order Bessel Functions +@cindex Bessel Functions, Fractional Order +@cindex Regular Bessel Functions, Fractional Order + +@deftypefun double gsl_sf_bessel_Jnu (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Jnu_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular cylindrical Bessel function of +fractional order @math{\nu}, @math{J_\nu(x)}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_bessel_sequence_Jnu_e (double @var{nu}, gsl_mode_t @var{mode}, size_t @var{size}, double @var{v}[]) +This function computes the regular cylindrical Bessel function of +fractional order @math{\nu}, @math{J_\nu(x)}, evaluated at a series of +@math{x} values. The array @var{v} of length @var{size} contains the +@math{x} values. They are assumed to be strictly ordered and positive. +The array is over-written with the values of @math{J_\nu(x_i)}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EINVAL +@end deftypefun + + +@node Irregular Bessel Functions - Fractional Order +@subsection Irregular Bessel Functions---Fractional Order + +@deftypefun double gsl_sf_bessel_Ynu (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Ynu_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular cylindrical Bessel function of +fractional order @math{\nu}, @math{Y_\nu(x)}. +@comment Exceptional Return Values: +@end deftypefun + + +@node Regular Modified Bessel Functions - Fractional Order +@subsection Regular Modified Bessel Functions---Fractional Order +@cindex Modified Bessel Functions, Fractional Order +@cindex Regular Modified Bessel Functions, Fractional Order + +@deftypefun double gsl_sf_bessel_Inu (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Inu_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular modified Bessel function of +fractional order @math{\nu}, @math{I_\nu(x)} for @math{x>0}, +@math{\nu>0}. +@comment Domain: x >= 0, nu >= 0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_Inu_scaled (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Inu_scaled_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled regular modified Bessel function of +fractional order @math{\nu}, @math{\exp(-|x|)I_\nu(x)} for @math{x>0}, +@math{\nu>0}. +@comment @math{ \exp(-|x|) I_@{\nu@}(x) } +@comment Domain: x >= 0, nu >= 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@node Irregular Modified Bessel Functions - Fractional Order +@subsection Irregular Modified Bessel Functions---Fractional Order +@cindex Irregular Modified Bessel Functions, Fractional Order + +@deftypefun double gsl_sf_bessel_Knu (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Knu_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular modified Bessel function of +fractional order @math{\nu}, @math{K_\nu(x)} for @math{x>0}, +@math{\nu>0}. +@comment Domain: x > 0, nu >= 0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_bessel_lnKnu (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_lnKnu_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the logarithm of the irregular modified Bessel +function of fractional order @math{\nu}, @math{\ln(K_\nu(x))} for +@math{x>0}, @math{\nu>0}. +@comment Domain: x > 0, nu >= 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_bessel_Knu_scaled (double @var{nu}, double @var{x}) +@deftypefunx int gsl_sf_bessel_Knu_scaled_e (double @var{nu}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the scaled irregular modified Bessel function of +fractional order @math{\nu}, @math{\exp(+|x|) K_\nu(x)} for @math{x>0}, +@math{\nu>0}. +@comment Domain: x > 0, nu >= 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@node Zeros of Regular Bessel Functions +@subsection Zeros of Regular Bessel Functions +@cindex Zeros of Regular Bessel Functions +@cindex Regular Bessel Functions, Zeros of + +@deftypefun double gsl_sf_bessel_zero_J0 (unsigned int @var{s}) +@deftypefunx int gsl_sf_bessel_zero_J0_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th positive zero of +the Bessel function @math{J_0(x)}. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun double gsl_sf_bessel_zero_J1 (unsigned int @var{s}) +@deftypefunx int gsl_sf_bessel_zero_J1_e (unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th positive zero of +the Bessel function @math{J_1(x)}. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun double gsl_sf_bessel_zero_Jnu (double @var{nu}, unsigned int @var{s}) +@deftypefunx int gsl_sf_bessel_zero_Jnu_e (double @var{nu}, unsigned int @var{s}, gsl_sf_result * @var{result}) +These routines compute the location of the @var{s}-th positive zero of +the Bessel function @math{J_\nu(x)}. The current implementation does not +support negative values of @var{nu}. +@comment Exceptional Return Values: +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-clausen.texi b/software/gsl-1.15/doc/specfunc-clausen.texi new file mode 100644 index 000000000..b0987c2da --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-clausen.texi @@ -0,0 +1,28 @@ +@cindex Clausen functions + +The Clausen function is defined by the following integral, +@tex +\beforedisplay +$$ +Cl_2(x) = - \int_0^x dt \log(2 \sin(t/2)) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Cl_2(x) = - \int_0^x dt \log(2 \sin(t/2)) +@end example + +@end ifinfo +@noindent +It is related to the dilogarithm by +@c{$Cl_2(\theta) = \Im(Li_2(e^{i\theta}))$} +@math{Cl_2(\theta) = \Im Li_2(\exp(i\theta))}. +The Clausen functions are declared in the header file +@file{gsl_sf_clausen.h}. + +@deftypefun double gsl_sf_clausen (double @var{x}) +@deftypefunx int gsl_sf_clausen_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Clausen integral @math{Cl_2(x)}. +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-coulomb.texi b/software/gsl-1.15/doc/specfunc-coulomb.texi new file mode 100644 index 000000000..7114620db --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-coulomb.texi @@ -0,0 +1,151 @@ +@cindex Coulomb wave functions +@cindex hydrogen atom + +The prototypes of the Coulomb functions are declared in the header file +@file{gsl_sf_coulomb.h}. Both bound state and scattering solutions are +available. + +@menu +* Normalized Hydrogenic Bound States:: +* Coulomb Wave Functions:: +* Coulomb Wave Function Normalization Constant:: +@end menu + +@node Normalized Hydrogenic Bound States +@subsection Normalized Hydrogenic Bound States + +@deftypefun double gsl_sf_hydrogenicR_1 (double @var{Z}, double @var{r}) +@deftypefunx int gsl_sf_hydrogenicR_1_e (double @var{Z}, double @var{r}, gsl_sf_result * @var{result}) +These routines compute the lowest-order normalized hydrogenic bound +state radial wavefunction @c{$R_1 := 2Z \sqrt{Z} \exp(-Z r)$} +@math{R_1 := 2Z \sqrt@{Z@} \exp(-Z r)}. +@end deftypefun + +@deftypefun double gsl_sf_hydrogenicR (int @var{n}, int @var{l}, double @var{Z}, double @var{r}) +@deftypefunx int gsl_sf_hydrogenicR_e (int @var{n}, int @var{l}, double @var{Z}, double @var{r}, gsl_sf_result * @var{result}) +These routines compute the @var{n}-th normalized hydrogenic bound state +radial wavefunction, +@comment +@tex +\beforedisplay +$$ +R_n := {2 Z^{3/2} \over n^2} \left({2Z r \over n}\right)^l \sqrt{(n-l-1)! \over (n+l)!} \exp(-Z r/n) L^{2l+1}_{n-l-1}(2Z r / n). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +R_n := 2 (Z^@{3/2@}/n^2) \sqrt@{(n-l-1)!/(n+l)!@} \exp(-Z r/n) (2Zr/n)^l + L^@{2l+1@}_@{n-l-1@}(2Zr/n). +@end example + +@end ifinfo +@noindent +where @math{L^a_b(x)} is the generalized Laguerre polynomial (@pxref{Laguerre Functions}). +The normalization is chosen such that the wavefunction @math{\psi} is +given by +@c{$\psi(n,l,r) = R_n Y_{lm}$} +@math{\psi(n,l,r) = R_n Y_@{lm@}}. +@end deftypefun + +@node Coulomb Wave Functions +@subsection Coulomb Wave Functions + +The Coulomb wave functions @math{F_L(\eta,x)}, @math{G_L(\eta,x)} are +described in Abramowitz & Stegun, Chapter 14. Because there can be a +large dynamic range of values for these functions, overflows are handled +gracefully. If an overflow occurs, @code{GSL_EOVRFLW} is signalled and +exponent(s) are returned through the modifiable parameters @var{exp_F}, +@var{exp_G}. The full solution can be reconstructed from the following +relations, +@tex +\beforedisplay +$$ +\eqalign{ + F_L(\eta,x) &= fc[k_L] * \exp(exp_F)\cr + G_L(\eta,x) &= gc[k_L] * \exp(exp_G)\cr +\cr + F_L'(\eta,x) &= fcp[k_L] * \exp(exp_F)\cr + G_L'(\eta,x) &= gcp[k_L] * \exp(exp_G) +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +F_L(eta,x) = fc[k_L] * exp(exp_F) +G_L(eta,x) = gc[k_L] * exp(exp_G) + +F_L'(eta,x) = fcp[k_L] * exp(exp_F) +G_L'(eta,x) = gcp[k_L] * exp(exp_G) +@end example + +@end ifinfo +@noindent + +@deftypefun int gsl_sf_coulomb_wave_FG_e (double @var{eta}, double @var{x}, double @var{L_F}, int @var{k}, gsl_sf_result * @var{F}, gsl_sf_result * @var{Fp}, gsl_sf_result * @var{G}, gsl_sf_result * @var{Gp}, double * @var{exp_F}, double * @var{exp_G}) +This function computes the Coulomb wave functions @math{F_L(\eta,x)}, +@c{$G_{L-k}(\eta,x)$} +@math{G_@{L-k@}(\eta,x)} and their derivatives +@math{F'_L(\eta,x)}, +@c{$G'_{L-k}(\eta,x)$} +@math{G'_@{L-k@}(\eta,x)} +with respect to @math{x}. The parameters are restricted to @math{L, +L-k > -1/2}, @math{x > 0} and integer @math{k}. Note that @math{L} +itself is not restricted to being an integer. The results are stored in +the parameters @var{F}, @var{G} for the function values and @var{Fp}, +@var{Gp} for the derivative values. If an overflow occurs, +@code{GSL_EOVRFLW} is returned and scaling exponents are stored in +the modifiable parameters @var{exp_F}, @var{exp_G}. +@end deftypefun + +@deftypefun int gsl_sf_coulomb_wave_F_array (double @var{L_min}, int @var{kmax}, double @var{eta}, double @var{x}, double @var{fc_array}[], double * @var{F_exponent}) +This function computes the Coulomb wave function @math{F_L(\eta,x)} for +@math{L = Lmin \dots Lmin + kmax}, storing the results in @var{fc_array}. +In the case of overflow the exponent is stored in @var{F_exponent}. +@end deftypefun + +@deftypefun int gsl_sf_coulomb_wave_FG_array (double @var{L_min}, int @var{kmax}, double @var{eta}, double @var{x}, double @var{fc_array}[], double @var{gc_array}[], double * @var{F_exponent}, double * @var{G_exponent}) +This function computes the functions @math{F_L(\eta,x)}, +@math{G_L(\eta,x)} for @math{L = Lmin \dots Lmin + kmax} storing the +results in @var{fc_array} and @var{gc_array}. In the case of overflow the +exponents are stored in @var{F_exponent} and @var{G_exponent}. +@end deftypefun + +@deftypefun int gsl_sf_coulomb_wave_FGp_array (double @var{L_min}, int @var{kmax}, double @var{eta}, double @var{x}, double @var{fc_array}[], double @var{fcp_array}[], double @var{gc_array}[], double @var{gcp_array}[], double * @var{F_exponent}, double * @var{G_exponent}) +This function computes the functions @math{F_L(\eta,x)}, +@math{G_L(\eta,x)} and their derivatives @math{F'_L(\eta,x)}, +@math{G'_L(\eta,x)} for @math{L = Lmin \dots Lmin + kmax} storing the +results in @var{fc_array}, @var{gc_array}, @var{fcp_array} and @var{gcp_array}. +In the case of overflow the exponents are stored in @var{F_exponent} +and @var{G_exponent}. +@end deftypefun + +@deftypefun int gsl_sf_coulomb_wave_sphF_array (double @var{L_min}, int @var{kmax}, double @var{eta}, double @var{x}, double @var{fc_array}[], double @var{F_exponent}[]) +This function computes the Coulomb wave function divided by the argument +@math{F_L(\eta, x)/x} for @math{L = Lmin \dots Lmin + kmax}, storing the +results in @var{fc_array}. In the case of overflow the exponent is +stored in @var{F_exponent}. This function reduces to spherical Bessel +functions in the limit @math{\eta \to 0}. +@end deftypefun + +@node Coulomb Wave Function Normalization Constant +@subsection Coulomb Wave Function Normalization Constant + +The Coulomb wave function normalization constant is defined in +Abramowitz 14.1.7. + +@deftypefun int gsl_sf_coulomb_CL_e (double @var{L}, double @var{eta}, gsl_sf_result * @var{result}) +This function computes the Coulomb wave function normalization constant +@math{C_L(\eta)} for @math{L > -1}. +@end deftypefun + +@deftypefun int gsl_sf_coulomb_CL_array (double @var{Lmin}, int @var{kmax}, double @var{eta}, double @var{cl}[]) +This function computes the Coulomb wave function normalization constant +@math{C_L(\eta)} for @math{L = Lmin \dots Lmin + kmax}, @math{Lmin > -1}. +@end deftypefun + + + diff --git a/software/gsl-1.15/doc/specfunc-coupling.texi b/software/gsl-1.15/doc/specfunc-coupling.texi new file mode 100644 index 000000000..3efd9fe0b --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-coupling.texi @@ -0,0 +1,109 @@ +@cindex coupling coefficients +@cindex 3-j symbols +@cindex 6-j symbols +@cindex 9-j symbols +@cindex Wigner coefficients +@cindex Racah coefficients + +The Wigner 3-j, 6-j and 9-j symbols give the coupling coefficients for +combined angular momentum vectors. Since the arguments of the standard +coupling coefficient functions are integer or half-integer, the +arguments of the following functions are, by convention, integers equal +to twice the actual spin value. For information on the 3-j coefficients +see Abramowitz & Stegun, Section 27.9. The functions described in this +section are declared in the header file @file{gsl_sf_coupling.h}. + +@menu +* 3-j Symbols:: +* 6-j Symbols:: +* 9-j Symbols:: +@end menu + +@node 3-j Symbols +@subsection 3-j Symbols + +@deftypefun double gsl_sf_coupling_3j (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_ma}, int @var{two_mb}, int @var{two_mc}) +@deftypefunx int gsl_sf_coupling_3j_e (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_ma}, int @var{two_mb}, int @var{two_mc}, gsl_sf_result * @var{result}) +These routines compute the Wigner 3-j coefficient, +@tex +\beforedisplay +$$ +\pmatrix{ja & jb & jc\cr + ma & mb & mc\cr} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +(ja jb jc + ma mb mc) +@end example + +@end ifinfo +@noindent +where the arguments are given in half-integer units, @math{ja} = +@var{two_ja}/2, @math{ma} = @var{two_ma}/2, etc. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@node 6-j Symbols +@subsection 6-j Symbols + +@deftypefun double gsl_sf_coupling_6j (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_jd}, int @var{two_je}, int @var{two_jf}) +@deftypefunx int gsl_sf_coupling_6j_e (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_jd}, int @var{two_je}, int @var{two_jf}, gsl_sf_result * @var{result}) +These routines compute the Wigner 6-j coefficient, +@tex +\beforedisplay +$$ +\left\{\matrix{ja & jb & jc\cr + jd & je & jf\cr}\right\} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +@{ja jb jc + jd je jf@} +@end example + +@end ifinfo +@noindent +where the arguments are given in half-integer units, @math{ja} = +@var{two_ja}/2, @math{ma} = @var{two_ma}/2, etc. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@node 9-j Symbols +@subsection 9-j Symbols + +@deftypefun double gsl_sf_coupling_9j (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_jd}, int @var{two_je}, int @var{two_jf}, int @var{two_jg}, int @var{two_jh}, int @var{two_ji}) +@deftypefunx int gsl_sf_coupling_9j_e (int @var{two_ja}, int @var{two_jb}, int @var{two_jc}, int @var{two_jd}, int @var{two_je}, int @var{two_jf}, int @var{two_jg}, int @var{two_jh}, int @var{two_ji}, gsl_sf_result * @var{result}) +These routines compute the Wigner 9-j coefficient, +@tex +\beforedisplay +$$ +\left\{\matrix{ja & jb & jc\cr + jd & je & jf\cr + jg & jh & ji\cr}\right\} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +@{ja jb jc + jd je jf + jg jh ji@} +@end example + +@end ifinfo +@noindent +where the arguments are given in half-integer units, @math{ja} = +@var{two_ja}/2, @math{ma} = @var{two_ma}/2, etc. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-dawson.texi b/software/gsl-1.15/doc/specfunc-dawson.texi new file mode 100644 index 000000000..451ccf064 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-dawson.texi @@ -0,0 +1,12 @@ +@cindex Dawson function + +The Dawson integral is defined by @math{\exp(-x^2) \int_0^x dt +\exp(t^2)}. A table of Dawson's integral can be found in Abramowitz & +Stegun, Table 7.5. The Dawson functions are declared in the header file +@file{gsl_sf_dawson.h}. + +@deftypefun double gsl_sf_dawson (double @var{x}) +@deftypefunx int gsl_sf_dawson_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the value of Dawson's integral for @var{x}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-debye.texi b/software/gsl-1.15/doc/specfunc-debye.texi new file mode 100644 index 000000000..400dde259 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-debye.texi @@ -0,0 +1,63 @@ +@cindex Debye functions + +The Debye functions @math{D_n(x)} are defined by the following integral, +@tex +\beforedisplay +$$ +D_n(x) = {n \over x^n} \int_0^x dt {t^n \over e^t - 1} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)) +@end example + +@end ifinfo +@noindent +For further information see Abramowitz & +Stegun, Section 27.1. The Debye functions are declared in the header +file @file{gsl_sf_debye.h}. + +@deftypefun double gsl_sf_debye_1 (double @var{x}) +@deftypefunx int gsl_sf_debye_1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the first-order Debye function +@math{D_1(x) = (1/x) \int_0^x dt (t/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_debye_2 (double @var{x}) +@deftypefunx int gsl_sf_debye_2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the second-order Debye function +@math{D_2(x) = (2/x^2) \int_0^x dt (t^2/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_debye_3 (double @var{x}) +@deftypefunx int gsl_sf_debye_3_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the third-order Debye function +@math{D_3(x) = (3/x^3) \int_0^x dt (t^3/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_debye_4 (double @var{x}) +@deftypefunx int gsl_sf_debye_4_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the fourth-order Debye function +@math{D_4(x) = (4/x^4) \int_0^x dt (t^4/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_debye_5 (double @var{x}) +@deftypefunx int gsl_sf_debye_5_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the fifth-order Debye function +@math{D_5(x) = (5/x^5) \int_0^x dt (t^5/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_debye_6 (double @var{x}) +@deftypefunx int gsl_sf_debye_6_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the sixth-order Debye function +@math{D_6(x) = (6/x^6) \int_0^x dt (t^6/(e^t - 1))}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-dilog.texi b/software/gsl-1.15/doc/specfunc-dilog.texi new file mode 100644 index 000000000..89616bc76 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-dilog.texi @@ -0,0 +1,35 @@ +@cindex dilogarithm + +The functions described in this section are declared in the header file +@file{gsl_sf_dilog.h}. + +@menu +* Real Argument:: +* Complex Argument:: +@end menu + +@node Real Argument +@subsection Real Argument + +@deftypefun double gsl_sf_dilog (double @var{x}) +@deftypefunx int gsl_sf_dilog_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the dilogarithm for a real argument. In Lewin's +notation this is @math{Li_2(x)}, the real part of the dilogarithm of a +real @math{x}. It is defined by the integral representation +@math{Li_2(x) = - \Re \int_0^x ds \log(1-s) / s}. +Note that @math{\Im(Li_2(x)) = 0} for @c{$x \le 1$} +@math{x <= 1}, and @math{-\pi\log(x)} for @math{x > 1}. + +Note that Abramowitz & Stegun refer to the Spence integral +@math{S(x)=Li_2(1-x)} as the dilogarithm rather than @math{Li_2(x)}. +@end deftypefun + +@node Complex Argument +@subsection Complex Argument + + +@deftypefun int gsl_sf_complex_dilog_e (double @var{r}, double @var{theta}, gsl_sf_result * @var{result_re}, gsl_sf_result * @var{result_im}) +This function computes the full complex-valued dilogarithm for the +complex argument @math{z = r \exp(i \theta)}. The real and imaginary +parts of the result are returned in @var{result_re}, @var{result_im}. +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-elementary.texi b/software/gsl-1.15/doc/specfunc-elementary.texi new file mode 100644 index 000000000..6d6f92a12 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-elementary.texi @@ -0,0 +1,23 @@ +@cindex elementary operations +@cindex multiplication + +The following functions allow for the propagation of errors when +combining quantities by multiplication. The functions are declared in +the header file @file{gsl_sf_elementary.h}. + +@comment @deftypefun double gsl_sf_multiply (double @var{x}, double @var{y}) +@deftypefun int gsl_sf_multiply_e (double @var{x}, double @var{y}, gsl_sf_result * @var{result}) +This function multiplies @var{x} and @var{y} storing the product and its +associated error in @var{result}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@deftypefun int gsl_sf_multiply_err_e (double @var{x}, double @var{dx}, double @var{y}, double @var{dy}, gsl_sf_result * @var{result}) +This function multiplies @var{x} and @var{y} with associated absolute +errors @var{dx} and @var{dy}. The product +@c{$xy \pm xy \sqrt{(dx/x)^2 +(dy/y)^2}$} +@math{xy +/- xy \sqrt((dx/x)^2 +(dy/y)^2)} +is stored in @var{result}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-ellint.texi b/software/gsl-1.15/doc/specfunc-ellint.texi new file mode 100644 index 000000000..601f9defb --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-ellint.texi @@ -0,0 +1,198 @@ +@cindex elliptic integrals + +The functions described in this section are declared in the header +file @file{gsl_sf_ellint.h}. Further information about the elliptic +integrals can be found in Abramowitz & Stegun, Chapter 17. + +@menu +* Definition of Legendre Forms:: +* Definition of Carlson Forms:: +* Legendre Form of Complete Elliptic Integrals:: +* Legendre Form of Incomplete Elliptic Integrals:: +* Carlson Forms:: +@end menu + +@node Definition of Legendre Forms +@subsection Definition of Legendre Forms +@cindex Legendre forms of elliptic integrals +The Legendre forms of elliptic integrals @math{F(\phi,k)}, +@math{E(\phi,k)} and @math{\Pi(\phi,k,n)} are defined by, +@tex +\beforedisplay +$$ +\eqalign{ +F(\phi,k) &= \int_0^\phi dt {1 \over \sqrt{(1 - k^2 \sin^2(t))}}\cr +E(\phi,k) &= \int_0^\phi dt \sqrt{(1 - k^2 \sin^2(t))}\cr +\Pi(\phi,k,n) &= \int_0^\phi dt {1 \over (1 + n \sin^2(t)) \sqrt{1 - k^2 \sin^2(t)}} +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example + F(\phi,k) = \int_0^\phi dt 1/\sqrt((1 - k^2 \sin^2(t))) + + E(\phi,k) = \int_0^\phi dt \sqrt((1 - k^2 \sin^2(t))) + +Pi(\phi,k,n) = \int_0^\phi dt 1/((1 + n \sin^2(t))\sqrt(1 - k^2 \sin^2(t))) +@end example + +@end ifinfo +@noindent +The complete Legendre forms are denoted by @math{K(k) = F(\pi/2, k)} and +@math{E(k) = E(\pi/2, k)}. + +The notation used here is based on Carlson, @cite{Numerische +Mathematik} 33 (1979) 1 and differs slightly from that used by +Abramowitz & Stegun, where the functions are given in terms of the +parameter @math{m = k^2} and @math{n} is replaced by @math{-n}. + +@node Definition of Carlson Forms +@subsection Definition of Carlson Forms +@cindex Carlson forms of Elliptic integrals +The Carlson symmetric forms of elliptical integrals @math{RC(x,y)}, +@math{RD(x,y,z)}, @math{RF(x,y,z)} and @math{RJ(x,y,z,p)} are defined +by, +@tex +\beforedisplay +$$ +\eqalign{ +RC(x,y) &= 1/2 \int_0^\infty dt (t+x)^{-1/2} (t+y)^{-1}\cr +RD(x,y,z) &= 3/2 \int_0^\infty dt (t+x)^{-1/2} (t+y)^{-1/2} (t+z)^{-3/2}\cr +RF(x,y,z) &= 1/2 \int_0^\infty dt (t+x)^{-1/2} (t+y)^{-1/2} (t+z)^{-1/2}\cr +RJ(x,y,z,p) &= 3/2 \int_0^\infty dt (t+x)^{-1/2} (t+y)^{-1/2} (t+z)^{-1/2} (t+p)^{-1} +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example + RC(x,y) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1) + + RD(x,y,z) = 3/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-3/2) + + RF(x,y,z) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) + +RJ(x,y,z,p) = 3/2 \int_0^\infty dt + (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) (t+p)^(-1) +@end example +@end ifinfo + +@node Legendre Form of Complete Elliptic Integrals +@subsection Legendre Form of Complete Elliptic Integrals + +@deftypefun double gsl_sf_ellint_Kcomp (double @var{k}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_Kcomp_e (double @var{k}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the complete elliptic integral @math{K(k)} to +the accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameter @math{m = k^2}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_Ecomp (double @var{k}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_Ecomp_e (double @var{k}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the complete elliptic integral @math{E(k)} to the +accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameter @math{m = k^2}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_Pcomp (double @var{k}, double @var{n}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_Pcomp_e (double @var{k}, double @var{n}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the complete elliptic integral @math{\Pi(k,n)} to the +accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameters @math{m = k^2} and @math{\sin^2(\alpha) = k^2}, with the +change of sign @math{n \to -n}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@node Legendre Form of Incomplete Elliptic Integrals +@subsection Legendre Form of Incomplete Elliptic Integrals + +@deftypefun double gsl_sf_ellint_F (double @var{phi}, double @var{k}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_F_e (double @var{phi}, double @var{k}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{F(\phi,k)} +to the accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameter @math{m = k^2}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_E (double @var{phi}, double @var{k}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_E_e (double @var{phi}, double @var{k}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{E(\phi,k)} +to the accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameter @math{m = k^2}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_P (double @var{phi}, double @var{k}, double @var{n}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_P_e (double @var{phi}, double @var{k}, double @var{n}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{\Pi(\phi,k,n)} +to the accuracy specified by the mode variable @var{mode}. +Note that Abramowitz & Stegun define this function in terms of the +parameters @math{m = k^2} and @math{\sin^2(\alpha) = k^2}, with the +change of sign @math{n \to -n}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_D (double @var{phi}, double @var{k}, double @var{n}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_D_e (double @var{phi}, double @var{k}, double @var{n}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These functions compute the incomplete elliptic integral +@math{D(\phi,k)} which is defined through the Carlson form @math{RD(x,y,z)} +by the following relation, +@tex +\beforedisplay +$$ +D(\phi,k,n) = {1 \over 3} (\sin \phi)^3 RD (1-\sin^2(\phi), 1-k^2 \sin^2(\phi), 1). +$$ +\afterdisplay +@end tex +@ifinfo + +@example +D(\phi,k,n) = (1/3)(\sin(\phi))^3 RD (1-\sin^2(\phi), 1-k^2 \sin^2(\phi), 1). +@end example +@end ifinfo +The argument @var{n} is not used and will be removed in a future release. + +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@node Carlson Forms +@subsection Carlson Forms + +@deftypefun double gsl_sf_ellint_RC (double @var{x}, double @var{y}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_RC_e (double @var{x}, double @var{y}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{RC(x,y)} +to the accuracy specified by the mode variable @var{mode}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_RD (double @var{x}, double @var{y}, double @var{z}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_RD_e (double @var{x}, double @var{y}, double @var{z}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{RD(x,y,z)} +to the accuracy specified by the mode variable @var{mode}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_RF (double @var{x}, double @var{y}, double @var{z}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_RF_e (double @var{x}, double @var{y}, double @var{z}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{RF(x,y,z)} +to the accuracy specified by the mode variable @var{mode}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_ellint_RJ (double @var{x}, double @var{y}, double @var{z}, double @var{p}, gsl_mode_t @var{mode}) +@deftypefunx int gsl_sf_ellint_RJ_e (double @var{x}, double @var{y}, double @var{z}, double @var{p}, gsl_mode_t @var{mode}, gsl_sf_result * @var{result}) +These routines compute the incomplete elliptic integral @math{RJ(x,y,z,p)} +to the accuracy specified by the mode variable @var{mode}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-elljac.texi b/software/gsl-1.15/doc/specfunc-elljac.texi new file mode 100644 index 000000000..dead60f95 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-elljac.texi @@ -0,0 +1,13 @@ +@cindex Jacobi elliptic functions +@cindex elliptic functions (Jacobi) + +The Jacobian Elliptic functions are defined in Abramowitz & Stegun, +Chapter 16. The functions are declared in the header file +@file{gsl_sf_elljac.h}. + +@deftypefun int gsl_sf_elljac_e (double @var{u}, double @var{m}, double * @var{sn}, double * @var{cn}, double * @var{dn}) +This function computes the Jacobian elliptic functions @math{sn(u|m)}, +@math{cn(u|m)}, @math{dn(u|m)} by descending Landen +transformations. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-erf.texi b/software/gsl-1.15/doc/specfunc-erf.texi new file mode 100644 index 000000000..e3c90d6ac --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-erf.texi @@ -0,0 +1,99 @@ +@cindex error function +@cindex erf(x) +@cindex erfc(x) + +The error function is described in Abramowitz & Stegun, Chapter 7. The +functions in this section are declared in the header file +@file{gsl_sf_erf.h}. + +@menu +* Error Function:: +* Complementary Error Function:: +* Log Complementary Error Function:: +* Probability functions:: +@end menu + +@node Error Function +@subsection Error Function + +@deftypefun double gsl_sf_erf (double @var{x}) +@deftypefunx int gsl_sf_erf_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the error function @c{$\erf(x)$} +@math{erf(x)}, where +@c{$\erf(x) = (2/\sqrt{\pi}) \int_0^x dt \exp(-t^2)$} +@math{erf(x) = (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2)}. +@comment Exceptional Return Values: none +@end deftypefun + +@node Complementary Error Function +@subsection Complementary Error Function + +@deftypefun double gsl_sf_erfc (double @var{x}) +@deftypefunx int gsl_sf_erfc_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complementary error function +@c{$\erfc(x) = 1 - \erf(x) = (2/\sqrt{\pi}) \int_x^\infty \exp(-t^2)$} +@math{erfc(x) = 1 - erf(x) = (2/\sqrt(\pi)) \int_x^\infty \exp(-t^2)}. +@comment Exceptional Return Values: none +@end deftypefun + + +@node Log Complementary Error Function +@subsection Log Complementary Error Function + +@deftypefun double gsl_sf_log_erfc (double @var{x}) +@deftypefunx int gsl_sf_log_erfc_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the logarithm of the complementary error function +@math{\log(\erfc(x))}. +@comment Exceptional Return Values: none +@end deftypefun + + +@node Probability functions +@subsection Probability functions + +The probability functions for the Normal or Gaussian distribution are +described in Abramowitz & Stegun, Section 26.2. + +@deftypefun double gsl_sf_erf_Z (double @var{x}) +@deftypefunx int gsl_sf_erf_Z_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Gaussian probability density function +@c{$Z(x) = (1/\sqrt{2\pi}) \exp(-x^2/2)$} +@math{Z(x) = (1/\sqrt@{2\pi@}) \exp(-x^2/2)}. +@end deftypefun + +@deftypefun double gsl_sf_erf_Q (double @var{x}) +@deftypefunx int gsl_sf_erf_Q_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the upper tail of the Gaussian probability +function +@c{$Q(x) = (1/\sqrt{2\pi}) \int_x^\infty dt \exp(-t^2/2)$} +@math{Q(x) = (1/\sqrt@{2\pi@}) \int_x^\infty dt \exp(-t^2/2)}. +@comment Exceptional Return Values: none +@end deftypefun + +@cindex hazard function, normal distribution +@cindex Mills' ratio, inverse +The @dfn{hazard function} for the normal distribution, +also known as the inverse Mills' ratio, is defined as, +@tex +\beforedisplay +$$ +h(x) = {Z(x)\over Q(x)} = \sqrt{2 \over \pi} {\exp(-x^2 / 2) \over \erfc(x/\sqrt 2)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +h(x) = Z(x)/Q(x) = \sqrt@{2/\pi@} \exp(-x^2 / 2) / \erfc(x/\sqrt 2) +@end example + +@end ifinfo +@noindent +It decreases rapidly as @math{x} approaches @math{-\infty} and asymptotes +to @math{h(x) \sim x} as @math{x} approaches @math{+\infty}. + +@deftypefun double gsl_sf_hazard (double @var{x}) +@deftypefunx int gsl_sf_hazard_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the hazard function for the normal distribution. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-exp.texi b/software/gsl-1.15/doc/specfunc-exp.texi new file mode 100644 index 000000000..50197d3f0 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-exp.texi @@ -0,0 +1,135 @@ +@cindex exponential function +@cindex exp + +The functions described in this section are declared in the header file +@file{gsl_sf_exp.h}. + +@menu +* Exponential Function:: +* Relative Exponential Functions:: +* Exponentiation With Error Estimate:: +@end menu + +@node Exponential Function +@subsection Exponential Function + +@deftypefun double gsl_sf_exp (double @var{x}) +@deftypefunx int gsl_sf_exp_e (double @var{x}, gsl_sf_result * @var{result}) +These routines provide an exponential function @math{\exp(x)} using GSL +semantics and error checking. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_exp_e10_e (double @var{x}, gsl_sf_result_e10 * @var{result}) +This function computes the exponential @math{\exp(x)} using the +@code{gsl_sf_result_e10} type to return a result with extended range. +This function may be useful if the value of @math{\exp(x)} would +overflow the numeric range of @code{double}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_exp_mult (double @var{x}, double @var{y}) +@deftypefunx int gsl_sf_exp_mult_e (double @var{x}, double @var{y}, gsl_sf_result * @var{result}) +These routines exponentiate @var{x} and multiply by the factor @var{y} +to return the product @math{y \exp(x)}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun int gsl_sf_exp_mult_e10_e (const double @var{x}, const double @var{y}, gsl_sf_result_e10 * @var{result}) +This function computes the product @math{y \exp(x)} using the +@code{gsl_sf_result_e10} type to return a result with extended numeric +range. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + + +@node Relative Exponential Functions +@subsection Relative Exponential Functions + +@deftypefun double gsl_sf_expm1 (double @var{x}) +@deftypefunx int gsl_sf_expm1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the quantity @math{\exp(x)-1} using an algorithm +that is accurate for small @math{x}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_exprel (double @var{x}) +@deftypefunx int gsl_sf_exprel_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the quantity @math{(\exp(x)-1)/x} using an +algorithm that is accurate for small @math{x}. For small @math{x} the +algorithm is based on the expansion @math{(\exp(x)-1)/x = 1 + x/2 + +x^2/(2*3) + x^3/(2*3*4) + \dots}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_exprel_2 (double @var{x}) +@deftypefunx int gsl_sf_exprel_2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the quantity @math{2(\exp(x)-1-x)/x^2} using an +algorithm that is accurate for small @math{x}. For small @math{x} the +algorithm is based on the expansion @math{2(\exp(x)-1-x)/x^2 = +1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + \dots}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_exprel_n (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_exprel_n_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the @math{N}-relative exponential, which is the +@var{n}-th generalization of the functions @code{gsl_sf_exprel} and +@code{gsl_sf_exprel_2}. The @math{N}-relative exponential is given by, +@tex +\beforedisplay +$$ +\eqalign{ +\hbox{exprel}_N(x) + &= N!/x^N \left(\exp(x) - \sum_{k=0}^{N-1} x^k/k!\right)\cr + &= 1 + x/(N+1) + x^2/((N+1)(N+2)) + \dots\cr + &= {}_1F_1(1,1+N,x)\cr +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +exprel_N(x) = N!/x^N (\exp(x) - \sum_@{k=0@}^@{N-1@} x^k/k!) + = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... + = 1F1 (1,1+N,x) +@end example +@end ifinfo +@comment Exceptional Return Values: +@end deftypefun + + + +@node Exponentiation With Error Estimate +@subsection Exponentiation With Error Estimate + + +@deftypefun int gsl_sf_exp_err_e (double @var{x}, double @var{dx}, gsl_sf_result * @var{result}) +This function exponentiates @var{x} with an associated absolute error +@var{dx}. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun int gsl_sf_exp_err_e10_e (double @var{x}, double @var{dx}, gsl_sf_result_e10 * @var{result}) +This function exponentiates a quantity @var{x} with an associated absolute +error @var{dx} using the @code{gsl_sf_result_e10} type to return a result with +extended range. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun int gsl_sf_exp_mult_err_e (double @var{x}, double @var{dx}, double @var{y}, double @var{dy}, gsl_sf_result * @var{result}) +This routine computes the product @math{y \exp(x)} for the quantities +@var{x}, @var{y} with associated absolute errors @var{dx}, @var{dy}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@deftypefun int gsl_sf_exp_mult_err_e10_e (double @var{x}, double @var{dx}, double @var{y}, double @var{dy}, gsl_sf_result_e10 * @var{result}) +This routine computes the product @math{y \exp(x)} for the quantities +@var{x}, @var{y} with associated absolute errors @var{dx}, @var{dy} using the +@code{gsl_sf_result_e10} type to return a result with extended range. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-expint.texi b/software/gsl-1.15/doc/specfunc-expint.texi new file mode 100644 index 000000000..e0d38d427 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-expint.texi @@ -0,0 +1,183 @@ +@cindex exponential integrals +@cindex integrals, exponential + +Information on the exponential integrals can be found in Abramowitz & +Stegun, Chapter 5. These functions are declared in the header file +@file{gsl_sf_expint.h}. + +@menu +* Exponential Integral:: +* Ei(x):: +* Hyperbolic Integrals:: +* Ei_3(x):: +* Trigonometric Integrals:: +* Arctangent Integral:: +@end menu + +@node Exponential Integral +@subsection Exponential Integral +@cindex E1(x), E2(x), Ei(x) + +@deftypefun double gsl_sf_expint_E1 (double @var{x}) +@deftypefunx int gsl_sf_expint_E1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the exponential integral @math{E_1(x)}, +@tex +\beforedisplay +$$ +E_1(x) := \Re \int_1^\infty dt \exp(-xt)/t. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +E_1(x) := \Re \int_1^\infty dt \exp(-xt)/t. +@end example + +@end ifinfo +@noindent +@comment Domain: x != 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_expint_E2 (double @var{x}) +@deftypefunx int gsl_sf_expint_E2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the second-order exponential integral @math{E_2(x)}, +@tex +\beforedisplay +$$ +E_2(x) := \Re \int_1^\infty dt \exp(-xt)/t^2. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +E_2(x) := \Re \int_1^\infty dt \exp(-xt)/t^2. +@end example + +@end ifinfo +@noindent +@comment Domain: x != 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_expint_En (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_expint_En_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the exponential integral @math{E_n(x)} of order @math{n}, +@tex +\beforedisplay +$$ +E_n(x) := \Re \int_1^\infty dt \exp(-xt)/t^n. +$$ +\afterdisplay +@end tex +@ifinfo + +@example +E_n(x) := \Re \int_1^\infty dt \exp(-xt)/t^n. +@end example + +@end ifinfo +@noindent +@comment Domain: x != 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@node Ei(x) +@subsection Ei(x) + +@deftypefun double gsl_sf_expint_Ei (double @var{x}) +@deftypefunx int gsl_sf_expint_Ei_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the exponential integral @c{$\hbox{Ei}(x)$} +@math{Ei(x)}, +@tex +\beforedisplay +$$ +\hbox{Ei}(x) := - PV\left(\int_{-x}^\infty dt \exp(-t)/t\right) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +Ei(x) := - PV(\int_@{-x@}^\infty dt \exp(-t)/t) +@end example + +@end ifinfo +@noindent +where @math{PV} denotes the principal value of the integral. +@comment Domain: x != 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@node Hyperbolic Integrals +@subsection Hyperbolic Integrals +@cindex hyperbolic integrals +@cindex Shi(x) +@cindex Chi(x) + +@deftypefun double gsl_sf_Shi (double @var{x}) +@deftypefunx int gsl_sf_Shi_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the integral @c{$\hbox{Shi}(x) = \int_0^x dt \sinh(t)/t$} +@math{Shi(x) = \int_0^x dt \sinh(t)/t}. +@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@deftypefun double gsl_sf_Chi (double @var{x}) +@deftypefunx int gsl_sf_Chi_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the integral @c{$\hbox{Chi}(x) := \Re[ \gamma_E + \log(x) + \int_0^x dt (\cosh(t)-1)/t]$} +@math{ Chi(x) := \Re[ \gamma_E + \log(x) + \int_0^x dt (\cosh(t)-1)/t] }, +where @math{\gamma_E} is the Euler constant (available as the macro @code{M_EULER}). +@comment Domain: x != 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + + +@node Ei_3(x) +@subsection Ei_3(x) + +@deftypefun double gsl_sf_expint_3 (double @var{x}) +@deftypefunx int gsl_sf_expint_3_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the third-order exponential integral @c{${\rm Ei}_3(x) = \int_0^xdt \exp(-t^3)$} +@math{Ei_3(x) = \int_0^xdt \exp(-t^3)} for @c{$x \ge 0$} +@math{x >= 0}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@node Trigonometric Integrals +@subsection Trigonometric Integrals +@cindex trigonometric integrals +@cindex Si(x) +@cindex Ci(x) +@deftypefun double gsl_sf_Si (const double @var{x}) +@deftypefunx int gsl_sf_Si_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Sine integral @c{$\hbox{Si}(x) = \int_0^x dt \sin(t)/t$} +@math{Si(x) = \int_0^x dt \sin(t)/t}. +@comment Exceptional Return Values: none +@end deftypefun + + +@deftypefun double gsl_sf_Ci (const double @var{x}) +@deftypefunx int gsl_sf_Ci_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Cosine integral @c{$\hbox{Ci}(x) = -\int_x^\infty dt \cos(t)/t$} +@math{Ci(x) = -\int_x^\infty dt \cos(t)/t} for @math{x > 0}. +@comment Domain: x > 0.0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@node Arctangent Integral +@subsection Arctangent Integral +@cindex arctangent integral +@deftypefun double gsl_sf_atanint (double @var{x}) +@deftypefunx int gsl_sf_atanint_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Arctangent integral, which is defined as @c{$\hbox{AtanInt}(x) = \int_0^x dt \arctan(t)/t$} +@math{AtanInt(x) = \int_0^x dt \arctan(t)/t}. +@comment Domain: +@comment Exceptional Return Values: +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-fermi-dirac.texi b/software/gsl-1.15/doc/specfunc-fermi-dirac.texi new file mode 100644 index 000000000..43d854cf4 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-fermi-dirac.texi @@ -0,0 +1,125 @@ +@cindex Fermi-Dirac function + +The functions described in this section are declared in the header file +@file{gsl_sf_fermi_dirac.h}. + +@menu +* Complete Fermi-Dirac Integrals:: +* Incomplete Fermi-Dirac Integrals:: +@end menu + +@node Complete Fermi-Dirac Integrals +@subsection Complete Fermi-Dirac Integrals +@cindex complete Fermi-Dirac integrals +@cindex Fj(x), Fermi-Dirac integral +The complete Fermi-Dirac integral @math{F_j(x)} is given by, +@tex +\beforedisplay +$$ +F_j(x) := {1\over\Gamma(j+1)} \int_0^\infty dt {t^j \over (\exp(t-x) + 1)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +F_j(x) := (1/\Gamma(j+1)) \int_0^\infty dt (t^j / (\exp(t-x) + 1)) +@end example +@end ifinfo +@noindent +Note that the Fermi-Dirac integral is sometimes defined without the +normalisation factor in other texts. + +@deftypefun double gsl_sf_fermi_dirac_m1 (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_m1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral with an index of @math{-1}. +This integral is given by +@c{$F_{-1}(x) = e^x / (1 + e^x)$} +@math{F_@{-1@}(x) = e^x / (1 + e^x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_0 (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral with an index of @math{0}. +This integral is given by @math{F_0(x) = \ln(1 + e^x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_1 (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral with an index of @math{1}, +@math{F_1(x) = \int_0^\infty dt (t /(\exp(t-x)+1))}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_2 (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral with an index +of @math{2}, +@math{F_2(x) = (1/2) \int_0^\infty dt (t^2 /(\exp(t-x)+1))}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_int (int @var{j}, double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_int_e (int @var{j}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral with an integer +index of @math{j}, +@math{F_j(x) = (1/\Gamma(j+1)) \int_0^\infty dt (t^j /(\exp(t-x)+1))}. +@comment Complete integral F_j(x) for integer j +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_mhalf (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_mhalf_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral +@c{$F_{-1/2}(x)$} +@math{F_@{-1/2@}(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_half (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_half_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral +@c{$F_{1/2}(x)$} +@math{F_@{1/2@}(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_fermi_dirac_3half (double @var{x}) +@deftypefunx int gsl_sf_fermi_dirac_3half_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the complete Fermi-Dirac integral +@c{$F_{3/2}(x)$} +@math{F_@{3/2@}(x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + + +@node Incomplete Fermi-Dirac Integrals +@subsection Incomplete Fermi-Dirac Integrals +@cindex incomplete Fermi-Dirac integral +@cindex Fj(x,b), incomplete Fermi-Dirac integral +The incomplete Fermi-Dirac integral @math{F_j(x,b)} is given by, +@tex +\beforedisplay +$$ +F_j(x,b) := {1\over\Gamma(j+1)} \int_b^\infty dt {t^j \over (\exp(t-x) + 1)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +F_j(x,b) := (1/\Gamma(j+1)) \int_b^\infty dt (t^j / (\Exp(t-x) + 1)) +@end example +@end ifinfo + +@deftypefun double gsl_sf_fermi_dirac_inc_0 (double @var{x}, double @var{b}) +@deftypefunx int gsl_sf_fermi_dirac_inc_0_e (double @var{x}, double @var{b}, gsl_sf_result * @var{result}) +These routines compute the incomplete Fermi-Dirac integral with an index +of zero, +@c{$F_0(x,b) = \ln(1 + e^{b-x}) - (b-x)$} +@math{F_0(x,b) = \ln(1 + e^@{b-x@}) - (b-x)}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EDOM +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-gamma.texi b/software/gsl-1.15/doc/specfunc-gamma.texi new file mode 100644 index 000000000..104854d37 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-gamma.texi @@ -0,0 +1,316 @@ +This following routines compute the gamma and beta functions in their +full and incomplete forms, as well as various kinds of factorials. +The functions described in this section are declared in the header +file @file{gsl_sf_gamma.h}. + +@menu +* Gamma Functions:: +* Factorials:: +* Pochhammer Symbol:: +* Incomplete Gamma Functions:: +* Beta Functions:: +* Incomplete Beta Function:: +@end menu + +@node Gamma Functions +@subsection Gamma Functions +@cindex gamma functions + +The Gamma function is defined by the following integral, +@tex +\beforedisplay +$$ +\Gamma(x) = \int_0^{\infty} dt \, t^{x-1} \exp(-t) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Gamma(x) = \int_0^\infty dt t^@{x-1@} \exp(-t) +@end example + +@end ifinfo +@noindent +It is related to the factorial function by @math{\Gamma(n)=(n-1)!} +for positive integer @math{n}. Further information on the Gamma function +can be found in Abramowitz & Stegun, Chapter 6. + +@deftypefun double gsl_sf_gamma (double @var{x}) +@deftypefunx int gsl_sf_gamma_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Gamma function @math{\Gamma(x)}, subject to @math{x} +not being a negative integer or zero. The function is computed using the real +Lanczos method. The maximum value of @math{x} such that @math{\Gamma(x)} is not +considered an overflow is given by the macro @code{GSL_SF_GAMMA_XMAX} +and is 171.0. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EROUND +@end deftypefun + +@deftypefun double gsl_sf_lngamma (double @var{x}) +@deftypefunx int gsl_sf_lngamma_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex logarithm of Gamma function +These routines compute the logarithm of the Gamma function, +@math{\log(\Gamma(x))}, subject to @math{x} not being a negative +integer or zero. For @math{x<0} the real part of @math{\log(\Gamma(x))} is +returned, which is equivalent to @math{\log(|\Gamma(x)|)}. The function +is computed using the real Lanczos method. +@comment exceptions: GSL_EDOM, GSL_EROUND +@end deftypefun + +@deftypefun int gsl_sf_lngamma_sgn_e (double @var{x}, gsl_sf_result * @var{result_lg}, double * @var{sgn}) +This routine computes the sign of the gamma function and the logarithm of +its magnitude, subject to @math{x} not being a negative integer or zero. The +function is computed using the real Lanczos method. The value of the +gamma function and its error can be reconstructed using the relation +@math{\Gamma(x) = sgn * \exp(result\_lg)}, taking into account the two +components of @var{result_lg}. +@comment exceptions: GSL_EDOM, GSL_EROUND +@end deftypefun + +@deftypefun double gsl_sf_gammastar (double @var{x}) +@deftypefunx int gsl_sf_gammastar_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex Regulated Gamma function +These routines compute the regulated Gamma Function @math{\Gamma^*(x)} +for @math{x > 0}. The regulated gamma function is given by, +@tex +\beforedisplay +$$ +\eqalign{ +\Gamma^*(x) &= \Gamma(x)/(\sqrt{2\pi} x^{(x-1/2)} \exp(-x))\cr + &= \left(1 + {1 \over 12x} + ...\right) \quad\hbox{for~} x\to \infty\cr +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Gamma^*(x) = \Gamma(x)/(\sqrt@{2\pi@} x^@{(x-1/2)@} \exp(-x)) + = (1 + (1/12x) + ...) for x \to \infty +@end example +@end ifinfo +and is a useful suggestion of Temme. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_gammainv (double @var{x}) +@deftypefunx int gsl_sf_gammainv_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex Reciprocal Gamma function +These routines compute the reciprocal of the gamma function, +@math{1/\Gamma(x)} using the real Lanczos method. +@comment exceptions: GSL_EUNDRFLW, GSL_EROUND +@end deftypefun + +@deftypefun int gsl_sf_lngamma_complex_e (double @var{zr}, double @var{zi}, gsl_sf_result * @var{lnr}, gsl_sf_result * @var{arg}) +@cindex Complex Gamma function +This routine computes @math{\log(\Gamma(z))} for complex @math{z=z_r+i +z_i} and @math{z} not a negative integer or zero, using the complex Lanczos +method. The returned parameters are @math{lnr = \log|\Gamma(z)|} and +@math{arg = \arg(\Gamma(z))} in @math{(-\pi,\pi]}. Note that the phase +part (@var{arg}) is not well-determined when @math{|z|} is very large, +due to inevitable roundoff in restricting to @math{(-\pi,\pi]}. This +will result in a @code{GSL_ELOSS} error when it occurs. The absolute +value part (@var{lnr}), however, never suffers from loss of precision. +@comment exceptions: GSL_EDOM, GSL_ELOSS +@end deftypefun + +@node Factorials +@subsection Factorials +@cindex factorial + +Although factorials can be computed from the Gamma function, using +the relation @math{n! = \Gamma(n+1)} for non-negative integer @math{n}, +it is usually more efficient to call the functions in this section, +particularly for small values of @math{n}, whose factorial values are +maintained in hardcoded tables. + +@deftypefun double gsl_sf_fact (unsigned int @var{n}) +@deftypefunx int gsl_sf_fact_e (unsigned int @var{n}, gsl_sf_result * @var{result}) +@cindex factorial +These routines compute the factorial @math{n!}. The factorial is +related to the Gamma function by @math{n! = \Gamma(n+1)}. +The maximum value of @math{n} such that @math{n!} is not +considered an overflow is given by the macro @code{GSL_SF_FACT_NMAX} +and is 170. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_doublefact (unsigned int @var{n}) +@deftypefunx int gsl_sf_doublefact_e (unsigned int @var{n}, gsl_sf_result * @var{result}) +@cindex double factorial +These routines compute the double factorial @math{n!! = n(n-2)(n-4) \dots}. +The maximum value of @math{n} such that @math{n!!} is not +considered an overflow is given by the macro @code{GSL_SF_DOUBLEFACT_NMAX} +and is 297. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_lnfact (unsigned int @var{n}) +@deftypefunx int gsl_sf_lnfact_e (unsigned int @var{n}, gsl_sf_result * @var{result}) +@cindex logarithm of factorial +These routines compute the logarithm of the factorial of @var{n}, +@math{\log(n!)}. The algorithm is faster than computing +@math{\ln(\Gamma(n+1))} via @code{gsl_sf_lngamma} for @math{n < 170}, +but defers for larger @var{n}. +@comment exceptions: none +@end deftypefun + +@deftypefun double gsl_sf_lndoublefact (unsigned int @var{n}) +@deftypefunx int gsl_sf_lndoublefact_e (unsigned int @var{n}, gsl_sf_result * @var{result}) +@cindex logarithm of double factorial +These routines compute the logarithm of the double factorial of @var{n}, +@math{\log(n!!)}. +@comment exceptions: none +@end deftypefun + +@deftypefun double gsl_sf_choose (unsigned int @var{n}, unsigned int @var{m}) +@deftypefunx int gsl_sf_choose_e (unsigned int @var{n}, unsigned int @var{m}, gsl_sf_result * @var{result}) +@cindex combinatorial factor C(m,n) +These routines compute the combinatorial factor @code{n choose m} +@math{= n!/(m!(n-m)!)} +@comment exceptions: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@deftypefun double gsl_sf_lnchoose (unsigned int @var{n}, unsigned int @var{m}) +@deftypefunx int gsl_sf_lnchoose_e (unsigned int @var{n}, unsigned int @var{m}, gsl_sf_result * @var{result}) +@cindex logarithm of combinatorial factor C(m,n) +These routines compute the logarithm of @code{n choose m}. This is +equivalent to the sum @math{\log(n!) - \log(m!) - \log((n-m)!)}. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_taylorcoeff (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_taylorcoeff_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +@cindex Taylor coefficients, computation of +These routines compute the Taylor coefficient @math{x^n / n!} for +@c{$x \ge 0$} +@math{x >= 0}, +@c{$n \ge 0$} +@math{n >= 0}. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@node Pochhammer Symbol +@subsection Pochhammer Symbol + +@deftypefun double gsl_sf_poch (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_poch_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex Pochhammer symbol +@cindex Apell symbol, see Pochhammer symbol +These routines compute the Pochhammer symbol @math{(a)_x = \Gamma(a + +x)/\Gamma(a)}. The Pochhammer symbol is also known as the Apell symbol and +sometimes written as @math{(a,x)}. When @math{a} and @math{a+x} +are negative integers or zero, the limiting value of the ratio is returned. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_lnpoch (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_lnpoch_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex logarithm of Pochhammer symbol +These routines compute the logarithm of the Pochhammer symbol, +@math{\log((a)_x) = \log(\Gamma(a + x)/\Gamma(a))}. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun int gsl_sf_lnpoch_sgn_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}, double * @var{sgn}) +These routines compute the sign of the Pochhammer symbol and the +logarithm of its magnitude. The computed parameters are @math{result = +\log(|(a)_x|)} with a corresponding error term, +and @math{sgn = \sgn((a)_x)} where @math{(a)_x = +\Gamma(a + x)/\Gamma(a)}. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_pochrel (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_pochrel_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex relative Pochhammer symbol +These routines compute the relative Pochhammer symbol @math{((a)_x - +1)/x} where @math{(a)_x = \Gamma(a + x)/\Gamma(a)}. +@comment exceptions: GSL_EDOM +@end deftypefun + + +@node Incomplete Gamma Functions +@subsection Incomplete Gamma Functions + +@deftypefun double gsl_sf_gamma_inc (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_gamma_inc_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex non-normalized incomplete Gamma function +@cindex unnormalized incomplete Gamma function +These functions compute the unnormalized incomplete Gamma Function +@c{$\Gamma(a,x) = \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} +@math{\Gamma(a,x) = \int_x^\infty dt t^@{a-1@} \exp(-t)} +for @math{a} real and @c{$x \ge 0$} +@math{x >= 0}. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_gamma_inc_Q (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_gamma_inc_Q_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex incomplete Gamma function +These routines compute the normalized incomplete Gamma Function +@c{$Q(a,x) = 1/\Gamma(a) \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} +@math{Q(a,x) = 1/\Gamma(a) \int_x^\infty dt t^@{a-1@} \exp(-t)} +for @math{a > 0}, @c{$x \ge 0$} +@math{x >= 0}. +@comment exceptions: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_gamma_inc_P (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_gamma_inc_P_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@cindex complementary incomplete Gamma function +These routines compute the complementary normalized incomplete Gamma Function +@c{$P(a,x) = 1 - Q(a,x) = 1/\Gamma(a) \int_0^x dt\, t^{(a-1)} \exp(-t)$} +@math{P(a,x) = 1 - Q(a,x) = 1/\Gamma(a) \int_0^x dt t^@{a-1@} \exp(-t)} +for @math{a > 0}, @c{$x \ge 0$} +@math{x >= 0}. + +Note that Abramowitz & Stegun call @math{P(a,x)} the incomplete gamma +function (section 6.5). +@comment exceptions: GSL_EDOM +@end deftypefun + +@node Beta Functions +@subsection Beta Functions + +@deftypefun double gsl_sf_beta (double @var{a}, double @var{b}) +@deftypefunx int gsl_sf_beta_e (double @var{a}, double @var{b}, gsl_sf_result * @var{result}) +@cindex Beta function +These routines compute the Beta Function, @math{B(a,b) = +\Gamma(a)\Gamma(b)/\Gamma(a+b)} subject to @math{a} and @math{b} not +being negative integers. +@comment exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_lnbeta (double @var{a}, double @var{b}) +@deftypefunx int gsl_sf_lnbeta_e (double @var{a}, double @var{b}, gsl_sf_result * @var{result}) +@cindex logarithm of Beta function +These routines compute the logarithm of the Beta Function, @math{\log(B(a,b))} +subject to @math{a} and @math{b} not +being negative integers. +@comment exceptions: GSL_EDOM +@end deftypefun + +@node Incomplete Beta Function +@subsection Incomplete Beta Function + +@deftypefun double gsl_sf_beta_inc (double @var{a}, double @var{b}, double @var{x}) +@deftypefunx int gsl_sf_beta_inc_e (double @var{a}, double @var{b}, double @var{x}, gsl_sf_result * @var{result}) +@cindex incomplete Beta function, normalized +@cindex normalized incomplete Beta function +@cindex Beta function, incomplete normalized +These routines compute the normalized incomplete Beta function +@math{I_x(a,b)=B_x(a,b)/B(a,b)} where @c{$B_x(a,b) = \int_0^x t^{a-1} (1-t)^{b-1} dt$} +@math{B_x(a,b) = \int_0^x t^@{a-1@} (1-t)^@{b-1@} dt} +for @c{$0 \le x \le 1$} +@math{0 <= x <= 1}. For @math{a > 0}, @math{b > 0} the value is computed using +a continued fraction expansion. For all other values it is computed using +the relation @c{$I_x(a,b,x) = (1/a) x^a {}_2F_1(a,1-b,a+1,x)/B(a,b)$} +@math{I_x(a,b,x) = (1/a) x^a 2F1(a,1-b,a+1,x)/B(a,b)}. +@end deftypefun + + + + + diff --git a/software/gsl-1.15/doc/specfunc-gegenbauer.texi b/software/gsl-1.15/doc/specfunc-gegenbauer.texi new file mode 100644 index 000000000..949c3dd38 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-gegenbauer.texi @@ -0,0 +1,42 @@ +@cindex Gegenbauer functions + +The Gegenbauer polynomials are defined in Abramowitz & Stegun, Chapter +22, where they are known as Ultraspherical polynomials. The functions +described in this section are declared in the header file +@file{gsl_sf_gegenbauer.h}. + +@deftypefun double gsl_sf_gegenpoly_1 (double @var{lambda}, double @var{x}) +@deftypefunx double gsl_sf_gegenpoly_2 (double @var{lambda}, double @var{x}) +@deftypefunx double gsl_sf_gegenpoly_3 (double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_gegenpoly_1_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_gegenpoly_2_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_gegenpoly_3_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These functions evaluate the Gegenbauer polynomials +@c{$C^{(\lambda)}_n(x)$} +@math{C^@{(\lambda)@}_n(x)} using explicit +representations for @math{n =1, 2, 3}. +@comment Exceptional Return Values: none +@end deftypefun + + +@deftypefun double gsl_sf_gegenpoly_n (int @var{n}, double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_gegenpoly_n_e (int @var{n}, double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These functions evaluate the Gegenbauer polynomial @c{$C^{(\lambda)}_n(x)$} +@math{C^@{(\lambda)@}_n(x)} for a specific value of @var{n}, +@var{lambda}, @var{x} subject to @math{\lambda > -1/2}, @c{$n \ge 0$} +@math{n >= 0}. +@comment Domain: lambda > -1/2, n >= 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun int gsl_sf_gegenpoly_array (int @var{nmax}, double @var{lambda}, double @var{x}, double @var{result_array}[]) +This function computes an array of Gegenbauer polynomials +@c{$C^{(\lambda)}_n(x)$} +@math{C^@{(\lambda)@}_n(x)} for @math{n = 0, 1, 2, \dots, nmax}, subject +to @math{\lambda > -1/2}, @c{$nmax \ge 0$} +@math{nmax >= 0}. +@comment Conditions: n = 0, 1, 2, ... nmax +@comment Domain: lambda > -1/2, nmax >= 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-hyperg.texi b/software/gsl-1.15/doc/specfunc-hyperg.texi new file mode 100644 index 000000000..0ca0500f8 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-hyperg.texi @@ -0,0 +1,107 @@ +@cindex hypergeometric functions +@cindex confluent hypergeometric functions + +Hypergeometric functions are described in Abramowitz & Stegun, Chapters +13 and 15. These functions are declared in the header file +@file{gsl_sf_hyperg.h}. + +@deftypefun double gsl_sf_hyperg_0F1 (double @var{c}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_0F1_e (double @var{c}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the hypergeometric function @c{${}_0F_1(c,x)$} +@math{0F1(c,x)}. +@comment It is related to Bessel functions +@comment 0F1[c,x] = +@comment Gamma[c] x^(1/2(1-c)) I_(c-1)(2 Sqrt[x]) +@comment Gamma[c] (-x)^(1/2(1-c)) J_(c-1)(2 Sqrt[-x]) +@comment exceptions: GSL_EOVRFLW, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_hyperg_1F1_int (int @var{m}, int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_1F1_int_e (int @var{m}, int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the confluent hypergeometric function +@c{${}_1F_1(m,n,x) = M(m,n,x)$} +@math{1F1(m,n,x) = M(m,n,x)} for integer parameters @var{m}, @var{n}. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_1F1 (double @var{a}, double @var{b}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_1F1_e (double @var{a}, double @var{b}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the confluent hypergeometric function +@c{${}_1F_1(a,b,x) = M(a,b,x)$} +@math{1F1(a,b,x) = M(a,b,x)} for general parameters @var{a}, @var{b}. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_U_int (int @var{m}, int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_U_int_e (int @var{m}, int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the confluent hypergeometric function +@math{U(m,n,x)} for integer parameters @var{m}, @var{n}. +@comment exceptions: +@end deftypefun + +@deftypefun int gsl_sf_hyperg_U_int_e10_e (int @var{m}, int @var{n}, double @var{x}, gsl_sf_result_e10 * @var{result}) +This routine computes the confluent hypergeometric function +@math{U(m,n,x)} for integer parameters @var{m}, @var{n} using the +@code{gsl_sf_result_e10} type to return a result with extended range. +@end deftypefun + +@deftypefun double gsl_sf_hyperg_U (double @var{a}, double @var{b}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_U_e (double @var{a}, double @var{b}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the confluent hypergeometric function @math{U(a,b,x)}. +@comment exceptions: +@end deftypefun + +@deftypefun int gsl_sf_hyperg_U_e10_e (double @var{a}, double @var{b}, double @var{x}, gsl_sf_result_e10 * @var{result}) +This routine computes the confluent hypergeometric function +@math{U(a,b,x)} using the @code{gsl_sf_result_e10} type to return a +result with extended range. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_2F1 (double @var{a}, double @var{b}, double @var{c}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_2F1_e (double @var{a}, double @var{b}, double @var{c}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Gauss hypergeometric function +@c{${}_2F_1(a,b,c,x) = F(a,b,c,x)$} +@math{2F1(a,b,c,x) = F(a,b,c,x)} for @math{|x| < 1}. + +If the arguments @math{(a,b,c,x)} are too close to a singularity then +the function can return the error code @code{GSL_EMAXITER} when the +series approximation converges too slowly. This occurs in the region of +@math{x=1}, @math{c - a - b = m} for integer m. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_2F1_conj (double @var{aR}, double @var{aI}, double @var{c}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_2F1_conj_e (double @var{aR}, double @var{aI}, double @var{c}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Gauss hypergeometric function +@c{${}_2F_1(a_R + i a_I, aR - i aI, c, x)$} +@math{2F1(a_R + i a_I, a_R - i a_I, c, x)} with complex parameters +for @math{|x| < 1}. +@end deftypefun + +@deftypefun double gsl_sf_hyperg_2F1_renorm (double @var{a}, double @var{b}, double @var{c}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_2F1_renorm_e (double @var{a}, double @var{b}, double @var{c}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the renormalized Gauss hypergeometric function +@c{${}_2F_1(a,b,c,x) / \Gamma(c)$} +@math{2F1(a,b,c,x) / \Gamma(c)} for @math{|x| < 1}. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_2F1_conj_renorm (double @var{aR}, double @var{aI}, double @var{c}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_2F1_conj_renorm_e (double @var{aR}, double @var{aI}, double @var{c}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the renormalized Gauss hypergeometric function +@c{${}_2F_1(a_R + i a_I, a_R - i a_I, c, x) / \Gamma(c)$} +@math{2F1(a_R + i a_I, a_R - i a_I, c, x) / \Gamma(c)} for @math{|x| < 1}. +@comment exceptions: +@end deftypefun + +@deftypefun double gsl_sf_hyperg_2F0 (double @var{a}, double @var{b}, double @var{x}) +@deftypefunx int gsl_sf_hyperg_2F0_e (double @var{a}, double @var{b}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the hypergeometric function @c{${}_2F_0(a,b,x)$} +@math{2F0(a,b,x)}. The series representation +is a divergent hypergeometric series. However, for @math{x < 0} we +have +@c{${}_2F_0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x)$} +@math{2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x)} +@comment exceptions: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-laguerre.texi b/software/gsl-1.15/doc/specfunc-laguerre.texi new file mode 100644 index 000000000..8672d5993 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-laguerre.texi @@ -0,0 +1,40 @@ +@cindex Laguerre functions +@cindex confluent hypergeometric function + +The generalized Laguerre polynomials are defined in terms of confluent +hypergeometric functions as +@c{$L^a_n(x) = ((a+1)_n / n!) {}_1F_1(-n,a+1,x)$} +@math{L^a_n(x) = ((a+1)_n / n!) 1F1(-n,a+1,x)}, and are sometimes referred to as the +associated Laguerre polynomials. They are related to the plain +Laguerre polynomials @math{L_n(x)} by @math{L^0_n(x) = L_n(x)} and +@c{$L^k_n(x) = (-1)^k (d^k/dx^k) L_{(n+k)}(x)$} +@math{L^k_n(x) = (-1)^k (d^k/dx^k) L_(n+k)(x)}. For +more information see Abramowitz & Stegun, Chapter 22. + +The functions described in this section are +declared in the header file @file{gsl_sf_laguerre.h}. + +@deftypefun double gsl_sf_laguerre_1 (double @var{a}, double @var{x}) +@deftypefunx double gsl_sf_laguerre_2 (double @var{a}, double @var{x}) +@deftypefunx double gsl_sf_laguerre_3 (double @var{a}, double @var{x}) +@deftypefunx int gsl_sf_laguerre_1_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_laguerre_2_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_laguerre_3_e (double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +These routines evaluate the generalized Laguerre polynomials +@math{L^a_1(x)}, @math{L^a_2(x)}, @math{L^a_3(x)} using explicit +representations. +@comment Exceptional Return Values: none +@end deftypefun + + +@deftypefun double gsl_sf_laguerre_n (const int @var{n}, const double @var{a}, const double @var{x}) +@deftypefunx int gsl_sf_laguerre_n_e (int @var{n}, double @var{a}, double @var{x}, gsl_sf_result * @var{result}) +These routines evaluate the generalized Laguerre polynomials +@math{L^a_n(x)} for @math{a > -1}, +@c{$n \ge 0$} +@math{n >= 0}. + +@comment Domain: a > -1.0, n >= 0 +@comment Evaluate generalized Laguerre polynomials. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-lambert.texi b/software/gsl-1.15/doc/specfunc-lambert.texi new file mode 100644 index 000000000..c05d23dc2 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-lambert.texi @@ -0,0 +1,28 @@ +@cindex W function +@cindex Lambert function + +Lambert's W functions, @math{W(x)}, are defined to be solutions +of the equation @math{W(x) \exp(W(x)) = x}. This function has +multiple branches for @math{x < 0}; however, it has only +two real-valued branches. We define @math{W_0(x)} to be the +principal branch, where @math{W > -1} for @math{x < 0}, and +@c{$W_{-1}(x)$} +@math{W_@{-1@}(x)} to be the other real branch, where +@math{W < -1} for @math{x < 0}. The Lambert functions are +declared in the header file @file{gsl_sf_lambert.h}. + + +@deftypefun double gsl_sf_lambert_W0 (double @var{x}) +@deftypefunx int gsl_sf_lambert_W0_e (double @var{x}, gsl_sf_result * @var{result}) +These compute the principal branch of the Lambert W function, @math{W_0(x)}. +@comment exceptions: GSL_EDOM, GSL_EMAXITER +@end deftypefun + +@deftypefun double gsl_sf_lambert_Wm1 (double @var{x}) +@deftypefunx int gsl_sf_lambert_Wm1_e (double @var{x}, gsl_sf_result * @var{result}) +These compute the secondary real-valued branch of the Lambert W function, +@c{$W_{-1}(x)$} +@math{W_@{-1@}(x)}. +@comment exceptions: GSL_EDOM, GSL_EMAXITER +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-legendre.texi b/software/gsl-1.15/doc/specfunc-legendre.texi new file mode 100644 index 000000000..119e16ed5 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-legendre.texi @@ -0,0 +1,273 @@ +@cindex Legendre polynomials +@cindex Legendre functions +@cindex spherical harmonics +@cindex conical functions +@cindex hyperbolic space + +The Legendre Functions and Legendre Polynomials are described in +Abramowitz & Stegun, Chapter 8. These functions are declared in +the header file @file{gsl_sf_legendre.h}. + +@menu +* Legendre Polynomials:: +* Associated Legendre Polynomials and Spherical Harmonics:: +* Conical Functions:: +* Radial Functions for Hyperbolic Space:: +@end menu + +@node Legendre Polynomials +@subsection Legendre Polynomials + +@deftypefun double gsl_sf_legendre_P1 (double @var{x}) +@deftypefunx double gsl_sf_legendre_P2 (double @var{x}) +@deftypefunx double gsl_sf_legendre_P3 (double @var{x}) +@deftypefunx int gsl_sf_legendre_P1_e (double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_legendre_P2_e (double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_legendre_P3_e (double @var{x}, gsl_sf_result * @var{result}) +These functions evaluate the Legendre polynomials +@c{$P_l(x)$} +@math{P_l(x)} using explicit +representations for @math{l=1, 2, 3}. +@comment Exceptional Return Values: none +@end deftypefun + +@deftypefun double gsl_sf_legendre_Pl (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_legendre_Pl_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These functions evaluate the Legendre polynomial @c{$P_l(x)$} +@math{P_l(x)} for a specific value of @var{l}, +@var{x} subject to @c{$l \ge 0$} +@math{l >= 0}, +@c{$|x| \le 1$} +@math{|x| <= 1} +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun int gsl_sf_legendre_Pl_array (int @var{lmax}, double @var{x}, double @var{result_array}[]) +@deftypefunx int gsl_sf_legendre_Pl_deriv_array (int @var{lmax}, double @var{x}, double @var{result_array}[], double @var{result_deriv_array}[]) + +These functions compute arrays of Legendre polynomials +@math{P_l(x)} and derivatives @math{dP_l(x)/dx}, +for @math{l = 0, \dots, lmax}, +@c{$|x| \le 1$} +@math{|x| <= 1} +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_legendre_Q0 (double @var{x}) +@deftypefunx int gsl_sf_legendre_Q0_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Legendre function @math{Q_0(x)} for @math{x > +-1}, @c{$x \ne 1$} +@math{x != 1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_legendre_Q1 (double @var{x}) +@deftypefunx int gsl_sf_legendre_Q1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Legendre function @math{Q_1(x)} for @math{x > +-1}, @c{$x \ne 1$} +@math{x != 1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_legendre_Ql (int @var{l}, double @var{x}) +@deftypefunx int gsl_sf_legendre_Ql_e (int @var{l}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Legendre function @math{Q_l(x)} for @math{x > +-1}, @c{$x \ne 1$} +@math{x != 1} and @c{$l \ge 0$} +@math{l >= 0}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@node Associated Legendre Polynomials and Spherical Harmonics +@subsection Associated Legendre Polynomials and Spherical Harmonics + +The following functions compute the associated Legendre Polynomials +@math{P_l^m(x)}. Note that this function grows combinatorially with +@math{l} and can overflow for @math{l} larger than about 150. There is +no trouble for small @math{m}, but overflow occurs when @math{m} and +@math{l} are both large. Rather than allow overflows, these functions +refuse to calculate @math{P_l^m(x)} and return @code{GSL_EOVRFLW} when +they can sense that @math{l} and @math{m} are too big. + +If you want to calculate a spherical harmonic, then @emph{do not} use +these functions. Instead use @code{gsl_sf_legendre_sphPlm} below, +which uses a similar recursion, but with the normalized functions. + +@deftypefun double gsl_sf_legendre_Plm (int @var{l}, int @var{m}, double @var{x}) +@deftypefunx int gsl_sf_legendre_Plm_e (int @var{l}, int @var{m}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the associated Legendre polynomial +@math{P_l^m(x)} for @c{$m \ge 0$} +@math{m >= 0}, @c{$l \ge m$} +@math{l >= m}, @c{$|x| \le 1$} +@math{|x| <= 1}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun int gsl_sf_legendre_Plm_array (int @var{lmax}, int @var{m}, double @var{x}, double @var{result_array}[]) +@deftypefunx int gsl_sf_legendre_Plm_deriv_array (int @var{lmax}, int @var{m}, double @var{x}, double @var{result_array}[], double @var{result_deriv_array}[]) +These functions compute arrays of Legendre polynomials +@math{P_l^m(x)} and derivatives @math{dP_l^m(x)/dx}, +for @c{$m \ge 0$} +@math{m >= 0}, @c{$l = |m|, \dots, lmax$} +@math{l = |m|, ..., lmax}, @c{$|x| \le 1$} +@math{|x| <= 1}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@deftypefun double gsl_sf_legendre_sphPlm (int @var{l}, int @var{m}, double @var{x}) +@deftypefunx int gsl_sf_legendre_sphPlm_e (int @var{l}, int @var{m}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the normalized associated Legendre polynomial +@c{$\sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x)$} +@math{\sqrt@{(2l+1)/(4\pi)@} \sqrt@{(l-m)!/(l+m)!@} P_l^m(x)} suitable +for use in spherical harmonics. The parameters must satisfy @c{$m \ge 0$} +@math{m >= 0}, @c{$l \ge m$} +@math{l >= m}, @c{$|x| \le 1$} +@math{|x| <= 1}. Theses routines avoid the overflows +that occur for the standard normalization of @math{P_l^m(x)}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun int gsl_sf_legendre_sphPlm_array (int @var{lmax}, int @var{m}, double @var{x}, double @var{result_array}[]) +@deftypefunx int gsl_sf_legendre_sphPlm_deriv_array (int @var{lmax}, int @var{m}, double @var{x}, double @var{result_array}[], double @var{result_deriv_array}[]) +These functions compute arrays of normalized associated Legendre functions +@c{$\sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x)$} +@math{\sqrt@{(2l+1)/(4\pi)@} \sqrt@{(l-m)!/(l+m)!@} P_l^m(x)}, +and derivatives, +for @c{$m \ge 0$} +@math{m >= 0}, @c{$l = |m|, \dots, lmax$} +@math{l = |m|, ..., lmax}, @c{$|x| \le 1$} +@math{|x| <= 1.0} +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun int gsl_sf_legendre_array_size (const int @var{lmax}, const int @var{m}) +This function returns the size of @var{result_array}[] needed for the array +versions of @math{P_l^m(x)}, @math{@var{lmax} - @var{m} + 1}. @inlinefn{} +@comment Exceptional Return Values: none +@end deftypefun + +@node Conical Functions +@subsection Conical Functions + +The Conical Functions @c{$P^\mu_{-(1/2)+i\lambda}(x)$} +@math{P^\mu_@{-(1/2)+i\lambda@}(x)} and @c{$Q^\mu_{-(1/2)+i\lambda}$} +@math{Q^\mu_@{-(1/2)+i\lambda@}} +are described in Abramowitz & Stegun, Section 8.12. + +@deftypefun double gsl_sf_conicalP_half (double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_half_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the irregular Spherical Conical Function +@c{$P^{1/2}_{-1/2 + i \lambda}(x)$} +@math{P^@{1/2@}_@{-1/2 + i \lambda@}(x)} for @math{x > -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_conicalP_mhalf (double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_mhalf_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the regular Spherical Conical Function +@c{$P^{-1/2}_{-1/2 + i \lambda}(x)$} +@math{P^@{-1/2@}_@{-1/2 + i \lambda@}(x)} for @math{x > -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_conicalP_0 (double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_0_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the conical function +@c{$P^0_{-1/2 + i \lambda}(x)$} +@math{P^0_@{-1/2 + i \lambda@}(x)} +for @math{x > -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_conicalP_1 (double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_1_e (double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the conical function +@c{$P^1_{-1/2 + i \lambda}(x)$} +@math{P^1_@{-1/2 + i \lambda@}(x)} for @math{x > -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_conicalP_sph_reg (int @var{l}, double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_sph_reg_e (int @var{l}, double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Regular Spherical Conical Function +@c{$P^{-1/2-l}_{-1/2 + i \lambda}(x)$} +@math{P^@{-1/2-l@}_@{-1/2 + i \lambda@}(x)} for @math{x > -1}, @c{$l \ge -1$} +@math{l >= -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_conicalP_cyl_reg (int @var{m}, double @var{lambda}, double @var{x}) +@deftypefunx int gsl_sf_conicalP_cyl_reg_e (int @var{m}, double @var{lambda}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Regular Cylindrical Conical Function +@c{$P^{-m}_{-1/2 + i \lambda}(x)$} +@math{P^@{-m@}_@{-1/2 + i \lambda@}(x)} for @math{x > -1}, @c{$m \ge -1$} +@math{m >= -1}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + + +@node Radial Functions for Hyperbolic Space +@subsection Radial Functions for Hyperbolic Space + +The following spherical functions are specializations of Legendre +functions which give the regular eigenfunctions of the Laplacian on a +3-dimensional hyperbolic space @math{H3d}. Of particular interest is +the flat limit, @math{\lambda \to \infty}, @math{\eta \to 0}, +@math{\lambda\eta} fixed. + +@deftypefun double gsl_sf_legendre_H3d_0 (double @var{lambda}, double @var{eta}) +@deftypefunx int gsl_sf_legendre_H3d_0_e (double @var{lambda}, double @var{eta}, gsl_sf_result * @var{result}) +These routines compute the zeroth radial eigenfunction of the Laplacian on the +3-dimensional hyperbolic space, +@c{$$L^{H3d}_0(\lambda,\eta) := {\sin(\lambda\eta) \over \lambda\sinh(\eta)}$$} +@math{L^@{H3d@}_0(\lambda,\eta) := \sin(\lambda\eta)/(\lambda\sinh(\eta))} +for @c{$\eta \ge 0$} +@math{\eta >= 0}. +In the flat limit this takes the form +@c{$L^{H3d}_0(\lambda,\eta) = j_0(\lambda\eta)$} +@math{L^@{H3d@}_0(\lambda,\eta) = j_0(\lambda\eta)}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_legendre_H3d_1 (double @var{lambda}, double @var{eta}) +@deftypefunx int gsl_sf_legendre_H3d_1_e (double @var{lambda}, double @var{eta}, gsl_sf_result * @var{result}) +These routines compute the first radial eigenfunction of the Laplacian on +the 3-dimensional hyperbolic space, +@c{$$L^{H3d}_1(\lambda,\eta) := {1\over\sqrt{\lambda^2 + 1}} {\left(\sin(\lambda \eta)\over \lambda \sinh(\eta)\right)} \left(\coth(\eta) - \lambda \cot(\lambda\eta)\right)$$} +@math{L^@{H3d@}_1(\lambda,\eta) := 1/\sqrt@{\lambda^2 + 1@} \sin(\lambda \eta)/(\lambda \sinh(\eta)) (\coth(\eta) - \lambda \cot(\lambda\eta))} +for @c{$\eta \ge 0$} +@math{\eta >= 0}. +In the flat limit this takes the form +@c{$L^{H3d}_1(\lambda,\eta) = j_1(\lambda\eta)$} +@math{L^@{H3d@}_1(\lambda,\eta) = j_1(\lambda\eta)}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_legendre_H3d (int @var{l}, double @var{lambda}, double @var{eta}) +@deftypefunx int gsl_sf_legendre_H3d_e (int @var{l}, double @var{lambda}, double @var{eta}, gsl_sf_result * @var{result}) +These routines compute the @var{l}-th radial eigenfunction of the +Laplacian on the 3-dimensional hyperbolic space @c{$\eta \ge 0$} +@math{\eta >= 0}, @c{$l \ge 0$} +@math{l >= 0}. In the flat limit this takes the form +@c{$L^{H3d}_l(\lambda,\eta) = j_l(\lambda\eta)$} +@math{L^@{H3d@}_l(\lambda,\eta) = j_l(\lambda\eta)}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun int gsl_sf_legendre_H3d_array (int @var{lmax}, double @var{lambda}, double @var{eta}, double @var{result_array}[]) +This function computes an array of radial eigenfunctions +@c{$L^{H3d}_l( \lambda, \eta)$} +@math{L^@{H3d@}_l(\lambda, \eta)} +for @c{$0 \le l \le lmax$} +@math{0 <= l <= lmax}. +@comment Exceptional Return Values: +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-log.texi b/software/gsl-1.15/doc/specfunc-log.texi new file mode 100644 index 000000000..75279e84f --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-log.texi @@ -0,0 +1,47 @@ +@cindex logarithm and related functions + +Information on the properties of the Logarithm function can be found in +Abramowitz & Stegun, Chapter 4. The functions described in this section +are declared in the header file @file{gsl_sf_log.h}. + +@deftypefun double gsl_sf_log (double @var{x}) +@deftypefunx int gsl_sf_log_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the logarithm of @var{x}, @math{\log(x)}, for +@math{x > 0}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_log_abs (double @var{x}) +@deftypefunx int gsl_sf_log_abs_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the logarithm of the magnitude of @var{x}, +@math{\log(|x|)}, for @math{x \ne 0}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun int gsl_sf_complex_log_e (double @var{zr}, double @var{zi}, gsl_sf_result * @var{lnr}, gsl_sf_result * @var{theta}) +This routine computes the complex logarithm of @math{z = z_r + i +z_i}. The results are returned as @var{lnr}, @var{theta} such that +@math{\exp(lnr + i \theta) = z_r + i z_i}, where @math{\theta} lies in +the range @math{[-\pi,\pi]}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_log_1plusx (double @var{x}) +@deftypefunx int gsl_sf_log_1plusx_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute @math{\log(1 + x)} for @math{x > -1} using an +algorithm that is accurate for small @math{x}. +@comment Domain: x > -1.0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_log_1plusx_mx (double @var{x}) +@deftypefunx int gsl_sf_log_1plusx_mx_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute @math{\log(1 + x) - x} for @math{x > -1} using an +algorithm that is accurate for small @math{x}. +@comment Domain: x > -1.0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-mathieu.texi b/software/gsl-1.15/doc/specfunc-mathieu.texi new file mode 100644 index 000000000..ff54d8a6d --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-mathieu.texi @@ -0,0 +1,258 @@ +@cindex Mathieu functions + +The routines described in this section compute the angular and radial +Mathieu functions, and their characteristic values. Mathieu +functions are the solutions of the following two differential +equations: +@tex +\beforedisplay +$$ +\eqalign{ +{{d^2 y}\over{d v^2}}& + (a - 2q\cos 2v)y = 0, \cr +{{d^2 f}\over{d u^2}}& - (a - 2q\cosh 2u)f = 0. +} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +d^2y/dv^2 + (a - 2q\cos 2v)y = 0 +d^2f/du^2 - (a - 2q\cosh 2u)f = 0 +@end example + +@end ifinfo +@noindent +The angular Mathieu functions @math{ce_r(x,q)}, @math{se_r(x,q)} are +the even and odd periodic solutions of the first equation, which is known as Mathieu's equation. These exist +only for the discrete sequence of characteristic values @math{a=a_r(q)} +(even-periodic) and @math{a=b_r(q)} (odd-periodic). + +The radial Mathieu functions @c{$Mc^{(j)}_{r}(z,q)$} +@math{Mc^@{(j)@}_@{r@}(z,q)}, @c{$Ms^{(j)}_{r}(z,q)$} +@math{Ms^@{(j)@}_@{r@}(z,q)} are the solutions of the second equation, +which is referred to as Mathieu's modified equation. The +radial Mathieu functions of the first, second, third and fourth kind +are denoted by the parameter @math{j}, which takes the value 1, 2, 3 +or 4. + +@comment The angular Mathieu functions can be divided into four types as +@comment @tex +@comment \beforedisplay +@comment $$ +@comment \eqalign{ +@comment x & = \sum_{m=0}^\infty A_{2m+p} \cos(2m+p)\phi, \quad p = 0, 1, \cr +@comment x & = \sum_{m=0}^\infty B_{2m+p} \sin(2m+p)\phi, \quad p = 0, 1. +@comment } +@comment $$ +@comment \afterdisplay +@comment @end tex +@comment @ifinfo + +@comment @example +@comment x = \sum_(m=0)^\infty A_(2m+p) \cos(2m+p)\phi, p = 0, 1, +@comment x = \sum_(m=0)^\infty B_(2m+p) \sin(2m+p)\phi, p = 0, 1. +@comment @end example + +@comment @end ifinfo +@comment @noindent +@comment The nomenclature used for the angular Mathieu functions is @math{ce_n} +@comment for the first solution and @math{se_n} for the second. + +@comment Similar solutions exist for the radial Mathieu functions by replacing +@comment the trigonometric functions with their corresponding hyperbolic +@comment functions as shown below. +@comment @tex +@comment \beforedisplay +@comment $$ +@comment \eqalign{ +@comment x & = \sum_{m=0}^\infty A_{2m+p} \cosh(2m+p)u, \quad p = 0, 1, \cr +@comment x & = \sum_{m=0}^\infty B_{2m+p} \sinh(2m+p)u, \quad p = 0, 1. +@comment } +@comment $$ +@comment \afterdisplay +@comment @end tex +@comment @ifinfo + +@comment @example +@comment x = \sum_(m=0)^\infty A_(2m+p) \cosh(2m+p)u, p = 0, 1, +@comment x = \sum_(m=0)^\infty B_(2m+p) \sinh(2m+p)u, p = 0, 1. +@comment @end example + +@comment @end ifinfo +@comment @noindent +@comment The nomenclature used for the radial Mathieu functions is @math{Mc_n} +@comment for the first solution and @math{Ms_n} for the second. The hyperbolic +@comment series do not always converge at an acceptable rate. Therefore most +@comment texts on the subject suggest using the following equivalent equations +@comment that are expanded in series of Bessel and Hankel functions. +@comment @tex +@comment \beforedisplay +@comment $$ +@comment \eqalign{ +@comment Mc_{2n}^{(j)}(x,q) & = \sum_{m=0}^\infty (-1)^{r+k} +@comment A_{2m}^{2n}(q)\left[J_m(u_1)Z_m^{(j)}(u_2) + +@comment J_m(u_1)Z_m^{(j)}(u_2)\right]/A_2^{2n} \cr +@comment Mc_{2n+1}^{(j)}(x,q) & = \sum_{m=0}^\infty (-1)^{r+k} +@comment A_{2m+1}^{2n+1}(q)\left[J_m(u_1)Z_{m+1}^{(j)}(u_2) + +@comment J_{m+1}(u_1)Z_m^{(j)}(u_2)\right]/A_1^{2n+1} \cr +@comment Ms_{2n}^{(j)}(x,q) & = \sum_{m=1}^\infty (-1)^{r+k} +@comment B_{2m}^{2n}(q)\left[J_{m-1}(u_1)Z_{m+1}^{(j)}(u_2) + +@comment J_{m+1}(u_1)Z_{m-1}^{(j)}(u_2)\right]/B_2^{2n} \cr +@comment Ms_{2n+1}^{(j)}(x,q) & = \sum_{m=0}^\infty (-1)^{r+k} +@comment B_{2m+1}^{2n+1}(q)\left[J_m(u_1)Z_{m+1}^{(j)}(u_2) + +@comment J_{m+1}(u_1)Z_m^{(j)}(u_2)\right]/B_1^{2n+1} +@comment } +@comment $$ +@comment \afterdisplay +@comment @end tex +@comment @ifinfo + +@comment @example +@comment Mc_(2n)^(j)(x,q) = \sum_(m=0)^\infty (-1)^(r+k) A_(2m)^(2n)(q) +@comment [J_m(u_1)Z_m^(j)(u_2) + J_m(u_1)Z_m^(j)(u_2)]/A_2^(2n) +@comment Mc_(2n+1)^(j)(x,q) = \sum_(m=0)^\infty (-1)^(r+k) A_(2m+1)^(2n+1)(q) +@comment [J_m(u_1)Z_(m+1)^(j)(u_2) + J_(m+1)(u_1)Z_m^(j)(u_2)]/A_1^(2n+1) +@comment Ms_(2n)^(j)(x,q) = \sum_(m=1)^\infty (-1)^(r+k) B_(2m)^(2n)(q) +@comment [J_(m-1)(u_1)Z_(m+1)^(j)(u_2) + J_(m+1)(u_1)Z_(m-1)^(j)(u_2)]/B_2^(2n) +@comment Ms_(2n+1)^(j)(x,q) = \sum_(m=0)^\infty (-1)^(r+k) B_(2m+1)^(2n+1)(q) +@comment [J_m(u_1)Z_(m+1)^(j)(u_2) + J_(m+1)(u_1)Z_m^(j)(u_2)]/B_1^(2n+1) +@comment @end example + +@comment @end ifinfo +@comment @noindent +@comment where @c{$u_1 = \sqrt{q} \exp(-x)$} +@comment @math{u_1 = \sqrt@{q@} \exp(-x)} and @c{$u_2 = \sqrt@{q@} \exp(x)$} +@comment @math{u_2 = \sqrt@{q@} \exp(x)} and +@comment @tex +@comment \beforedisplay +@comment $$ +@comment \eqalign{ +@comment Z_m^{(1)}(u) & = J_m(u) \cr +@comment Z_m^{(2)}(u) & = Y_m(u) \cr +@comment Z_m^{(3)}(u) & = H_m^{(1)}(u) \cr +@comment Z_m^{(4)}(u) & = H_m^{(2)}(u) +@comment } +@comment $$ +@comment \afterdisplay +@comment @end tex +@comment @ifinfo + +@comment @example +@comment Z_m^(1)(u) = J_m(u) +@comment Z_m^(2)(u) = Y_m(u) +@comment Z_m^(3)(u) = H_m^(1)(u) +@comment Z_m^(4)(u) = H_m^(2)(u) +@comment @end example + +@comment @end ifinfo +@comment @noindent +@comment where @math{J_m(u)}, @math{Y_m(u)}, @math{H_m^{(1)}(u)}, and +@comment @math{H_m^{(2)}(u)} are the regular and irregular Bessel functions and +@comment the Hankel functions, respectively. + +For more information on the Mathieu functions, see Abramowitz and +Stegun, Chapter 20. These functions are defined in the header file +@file{gsl_sf_mathieu.h}. + +@menu +* Mathieu Function Workspace:: +* Mathieu Function Characteristic Values:: +* Angular Mathieu Functions:: +* Radial Mathieu Functions:: +@end menu + +@node Mathieu Function Workspace +@subsection Mathieu Function Workspace + +The Mathieu functions can be computed for a single order or +for multiple orders, using array-based routines. The array-based +routines require a preallocated workspace. + +@deftypefun {gsl_sf_mathieu_workspace *} gsl_sf_mathieu_alloc (size_t @var{n}, double @var{qmax}) +@tpindex gsl_sf_mathieu_workspace +This function returns a workspace for the array versions of the +Mathieu routines. The arguments @var{n} and @var{qmax} specify the +maximum order and @math{q}-value of Mathieu functions which can be +computed with this workspace. + +@comment This is required in order to properly +@comment terminate the infinite eigenvalue matrix for high precision solutions. +@comment The characteristic values for all orders @math{0 \to n} are stored in +@comment the work structure array element @kbd{work->char_value}. +@end deftypefun + +@deftypefun void gsl_sf_mathieu_free (gsl_sf_mathieu_workspace * @var{work}) +This function frees the workspace @var{work}. +@end deftypefun + +@node Mathieu Function Characteristic Values +@subsection Mathieu Function Characteristic Values +@cindex Mathieu Function Characteristic Values + +@deftypefun int gsl_sf_mathieu_a (int @var{n}, double @var{q}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_mathieu_b (int @var{n}, double @var{q}, gsl_sf_result * @var{result}) +These routines compute the characteristic values @math{a_n(q)}, +@math{b_n(q)} of the Mathieu functions @math{ce_n(q,x)} and +@math{se_n(q,x)}, respectively. +@end deftypefun + +@deftypefun int gsl_sf_mathieu_a_array (int @var{order_min}, int @var{order_max}, double @var{q}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +@deftypefunx int gsl_sf_mathieu_b_array (int @var{order_min}, int @var{order_max}, double @var{q}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +These routines compute a series of Mathieu characteristic values +@math{a_n(q)}, @math{b_n(q)} for @math{n} from @var{order_min} to +@var{order_max} inclusive, storing the results in the array @var{result_array}. +@end deftypefun + +@node Angular Mathieu Functions +@subsection Angular Mathieu Functions +@cindex Angular Mathieu Functions +@cindex @math{ce(q,x)}, Mathieu function +@cindex @math{se(q,x)}, Mathieu function + +@deftypefun int gsl_sf_mathieu_ce (int @var{n}, double @var{q}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_mathieu_se (int @var{n}, double @var{q}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the angular Mathieu functions @math{ce_n(q,x)} +and @math{se_n(q,x)}, respectively. +@end deftypefun + +@deftypefun int gsl_sf_mathieu_ce_array (int @var{nmin}, int @var{nmax}, double @var{q}, double @var{x}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +@deftypefunx int gsl_sf_mathieu_se_array (int @var{nmin}, int @var{nmax}, double @var{q}, double @var{x}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +These routines compute a series of the angular Mathieu functions +@math{ce_n(q,x)} and @math{se_n(q,x)} of order @math{n} from +@var{nmin} to @var{nmax} inclusive, storing the results in the array +@var{result_array}. +@end deftypefun + +@node Radial Mathieu Functions +@subsection Radial Mathieu Functions +@cindex Radial Mathieu Functions + +@deftypefun int gsl_sf_mathieu_Mc (int @var{j}, int @var{n}, double @var{q}, double @var{x}, gsl_sf_result * @var{result}) +@deftypefunx int gsl_sf_mathieu_Ms (int @var{j}, int @var{n}, double @var{q}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the radial @var{j}-th kind Mathieu functions +@c{$Mc_n^{(j)}(q,x)$} +@math{Mc_n^@{(j)@}(q,x)} and +@c{$Ms_n^{(j)}(q,x)$} +@math{Ms_n^@{(j)@}(q,x)} of order @var{n}. + +The allowed values of @var{j} are 1 and 2. +The functions for @math{j = 3,4} can be computed as +@c{$M_n^{(3)} = M_n^{(1)} + iM_n^{(2)}$} +@math{M_n^@{(3)@} = M_n^@{(1)@} + iM_n^@{(2)@}} and +@c{$M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}$} +@math{M_n^@{(4)@} = M_n^@{(1)@} - iM_n^@{(2)@}}, +where +@c{$M_n^{(j)} = Mc_n^{(j)}$} +@math{M_n^@{(j)@} = Mc_n^@{(j)@}} or +@c{$Ms_n^{(j)}$} +@math{Ms_n^@{(j)@}}. +@end deftypefun + +@deftypefun int gsl_sf_mathieu_Mc_array (int @var{j}, int @var{nmin}, int @var{nmax}, double @var{q}, double @var{x}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +@deftypefunx int gsl_sf_mathieu_Ms_array (int @var{j}, int @var{nmin}, int @var{nmax}, double @var{q}, double @var{x}, gsl_sf_mathieu_workspace * @var{work}, double @var{result_array}[]) +These routines compute a series of the radial Mathieu functions of +kind @var{j}, with order from @var{nmin} to @var{nmax} inclusive, storing the +results in the array @var{result_array}. +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-pow-int.texi b/software/gsl-1.15/doc/specfunc-pow-int.texi new file mode 100644 index 000000000..f05469a5c --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-pow-int.texi @@ -0,0 +1,22 @@ +@cindex power function +@cindex integer powers + +The following functions are equivalent to the function @code{gsl_pow_int} +(@pxref{Small integer powers}) with an error estimate. These functions are +declared in the header file @file{gsl_sf_pow_int.h}. + +@deftypefun double gsl_sf_pow_int (double @var{x}, int @var{n}) +@deftypefunx int gsl_sf_pow_int_e (double @var{x}, int @var{n}, gsl_sf_result * @var{result}) +These routines compute the power @math{x^n} for integer @var{n}. The +power is computed using the minimum number of multiplications. For +example, @math{x^8} is computed as @math{((x^2)^2)^2}, requiring only 3 +multiplications. For reasons of efficiency, these functions do not +check for overflow or underflow conditions. +@end deftypefun + +@example +#include +/* compute 3.0**12 */ +double y = gsl_sf_pow_int(3.0, 12); +@end example + diff --git a/software/gsl-1.15/doc/specfunc-psi.texi b/software/gsl-1.15/doc/specfunc-psi.texi new file mode 100644 index 000000000..8bbef3b2b --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-psi.texi @@ -0,0 +1,90 @@ +@cindex psi function +@cindex digamma function +@cindex polygamma functions + +The polygamma functions of order @math{n} are defined by +@tex +\beforedisplay +$$ +\psi^{(n)}(x) = \left(d \over dx\right)^n \psi(x) = \left(d \over dx\right)^{n+1} \log(\Gamma(x)) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\psi^@{(n)@}(x) = (d/dx)^n \psi(x) = (d/dx)^@{n+1@} \log(\Gamma(x)) +@end example + +@end ifinfo +@noindent +where @math{\psi(x) = \Gamma'(x)/\Gamma(x)} is known as the digamma function. +These functions are declared in the header file @file{gsl_sf_psi.h}. + +@menu +* Digamma Function:: +* Trigamma Function:: +* Polygamma Function:: +@end menu + +@node Digamma Function +@subsection Digamma Function + +@deftypefun double gsl_sf_psi_int (int @var{n}) +@deftypefunx int gsl_sf_psi_int_e (int @var{n}, gsl_sf_result * @var{result}) +These routines compute the digamma function @math{\psi(n)} for positive +integer @var{n}. The digamma function is also called the Psi function. +@comment Domain: n integer, n > 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_psi (double @var{x}) +@deftypefunx int gsl_sf_psi_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the digamma function @math{\psi(x)} for general +@math{x}, @math{x \ne 0}. +@comment Domain: x != 0.0, -1.0, -2.0, ... +@comment Exceptional Return Values: GSL_EDOM, GSL_ELOSS +@end deftypefun + + +@deftypefun double gsl_sf_psi_1piy (double @var{y}) +@deftypefunx int gsl_sf_psi_1piy_e (double @var{y}, gsl_sf_result * @var{result}) +These routines compute the real part of the digamma function on the line +@math{1+i y}, @math{\Re[\psi(1 + i y)]}. +@comment exceptions: none +@comment Exceptional Return Values: none +@end deftypefun + + +@node Trigamma Function +@subsection Trigamma Function + +@deftypefun double gsl_sf_psi_1_int (int @var{n}) +@deftypefunx int gsl_sf_psi_1_int_e (int @var{n}, gsl_sf_result * @var{result}) +These routines compute the Trigamma function @math{\psi'(n)} for +positive integer @math{n}. +@comment Domain: n integer, n > 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_psi_1 (double @var{x}) +@deftypefunx int gsl_sf_psi_1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the Trigamma function @math{\psi'(x)} for +general @math{x}. +@comment Domain: x != 0.0, -1.0, -2.0, ... +@comment Exceptional Return Values: GSL_EDOM, GSL_ELOSS +@end deftypefun + +@node Polygamma Function +@subsection Polygamma Function + +@deftypefun double gsl_sf_psi_n (int @var{n}, double @var{x}) +@deftypefunx int gsl_sf_psi_n_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result}) +These routines compute the polygamma function @c{$\psi^{(n)}(x)$} +@math{\psi^@{(n)@}(x)} for +@c{$n \ge 0$} +@math{n >= 0}, @math{x > 0}. +@comment Domain: n >= 0, x > 0.0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-synchrotron.texi b/software/gsl-1.15/doc/specfunc-synchrotron.texi new file mode 100644 index 000000000..d02d4e32c --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-synchrotron.texi @@ -0,0 +1,24 @@ +@cindex synchrotron functions + +The functions described in this section are declared in the header file +@file{gsl_sf_synchrotron.h}. + +@deftypefun double gsl_sf_synchrotron_1 (double @var{x}) +@deftypefunx int gsl_sf_synchrotron_1_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the first synchrotron function +@c{$x \int_x^\infty dt K_{5/3}(t)$} +@math{x \int_x^\infty dt K_@{5/3@}(t)} for @c{$x \ge 0$} +@math{x >= 0}. +@comment Domain: x >= 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + +@deftypefun double gsl_sf_synchrotron_2 (double @var{x}) +@deftypefunx int gsl_sf_synchrotron_2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the second synchrotron function +@c{$x K_{2/3}(x)$} +@math{x K_@{2/3@}(x)} for @c{$x \ge 0$} +@math{x >= 0}. +@comment Domain: x >= 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-transport.texi b/software/gsl-1.15/doc/specfunc-transport.texi new file mode 100644 index 000000000..7337d5cc0 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-transport.texi @@ -0,0 +1,34 @@ +@cindex transport functions + +The transport functions @math{J(n,x)} are defined by the integral +representations +@c{$J(n,x) := \int_0^x dt \, t^n e^t /(e^t - 1)^2$} +@math{J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2}. +They are declared in the header file @file{gsl_sf_transport.h}. + +@deftypefun double gsl_sf_transport_2 (double @var{x}) +@deftypefunx int gsl_sf_transport_2_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the transport function @math{J(2,x)}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + + +@deftypefun double gsl_sf_transport_3 (double @var{x}) +@deftypefunx int gsl_sf_transport_3_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the transport function @math{J(3,x)}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@deftypefun double gsl_sf_transport_4 (double @var{x}) +@deftypefunx int gsl_sf_transport_4_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the transport function @math{J(4,x)}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun + + +@deftypefun double gsl_sf_transport_5 (double @var{x}) +@deftypefunx int gsl_sf_transport_5_e (double @var{x}, gsl_sf_result * @var{result}) +These routines compute the transport function @math{J(5,x)}. +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW +@end deftypefun diff --git a/software/gsl-1.15/doc/specfunc-trig.texi b/software/gsl-1.15/doc/specfunc-trig.texi new file mode 100644 index 000000000..a8bf046b9 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-trig.texi @@ -0,0 +1,160 @@ +@cindex trigonometric functions + +The library includes its own trigonometric functions in order to provide +consistency across platforms and reliable error estimates. These +functions are declared in the header file @file{gsl_sf_trig.h}. + +@menu +* Circular Trigonometric Functions:: +* Trigonometric Functions for Complex Arguments:: +* Hyperbolic Trigonometric Functions:: +* Conversion Functions:: +* Restriction Functions:: +* Trigonometric Functions With Error Estimates:: +@end menu + +@node Circular Trigonometric Functions +@subsection Circular Trigonometric Functions + +@deftypefun double gsl_sf_sin (double @var{x}) +@deftypefunx int gsl_sf_sin_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex sine function, special functions +These routines compute the sine function @math{\sin(x)}. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun double gsl_sf_cos (double @var{x}) +@deftypefunx int gsl_sf_cos_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex cosine function, special functions +These routines compute the cosine function @math{\cos(x)}. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun double gsl_sf_hypot (double @var{x}, double @var{y}) +@deftypefunx int gsl_sf_hypot_e (double @var{x}, double @var{y}, gsl_sf_result * @var{result}) +@cindex hypot function, special functions +These routines compute the hypotenuse function @c{$\sqrt{x^2 + y^2}$} +@math{\sqrt@{x^2 + y^2@}} avoiding overflow and underflow. +@comment Exceptional Return Values: +@end deftypefun + +@deftypefun double gsl_sf_sinc (double @var{x}) +@deftypefunx int gsl_sf_sinc_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex complex sinc function, special functions +These routines compute @math{\sinc(x) = \sin(\pi x) / (\pi x)} for any +value of @var{x}. +@comment Exceptional Return Values: none +@end deftypefun + +@node Trigonometric Functions for Complex Arguments +@subsection Trigonometric Functions for Complex Arguments + +@deftypefun int gsl_sf_complex_sin_e (double @var{zr}, double @var{zi}, gsl_sf_result * @var{szr}, gsl_sf_result * @var{szi}) +@cindex complex sine function, special functions +This function computes the complex sine, @math{\sin(z_r + i z_i)} storing +the real and imaginary parts in @var{szr}, @var{szi}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun int gsl_sf_complex_cos_e (double @var{zr}, double @var{zi}, gsl_sf_result * @var{czr}, gsl_sf_result * @var{czi}) +@cindex complex cosine function, special functions +This function computes the complex cosine, @math{\cos(z_r + i z_i)} storing +the real and imaginary parts in @var{czr}, @var{czi}. +@comment Exceptional Return Values: GSL_EOVRFLW +@end deftypefun + +@deftypefun int gsl_sf_complex_logsin_e (double @var{zr}, double @var{zi}, gsl_sf_result * @var{lszr}, gsl_sf_result * @var{lszi}) +@cindex complex log sine function, special functions +This function computes the logarithm of the complex sine, +@math{\log(\sin(z_r + i z_i))} storing the real and imaginary parts in +@var{lszr}, @var{lszi}. +@comment Exceptional Return Values: GSL_EDOM, GSL_ELOSS +@end deftypefun + +@node Hyperbolic Trigonometric Functions +@subsection Hyperbolic Trigonometric Functions + +@deftypefun double gsl_sf_lnsinh (double @var{x}) +@deftypefunx int gsl_sf_lnsinh_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex logarithm of sinh function, special functions +These routines compute @math{\log(\sinh(x))} for @math{x > 0}. +@comment Domain: x > 0 +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@deftypefun double gsl_sf_lncosh (double @var{x}) +@deftypefunx int gsl_sf_lncosh_e (double @var{x}, gsl_sf_result * @var{result}) +@cindex logarithm of cosh function, special functions +These routines compute @math{\log(\cosh(x))} for any @var{x}. +@comment Exceptional Return Values: none +@end deftypefun + + +@node Conversion Functions +@subsection Conversion Functions +@cindex polar to rectangular conversion +@cindex rectangular to polar conversion + +@deftypefun int gsl_sf_polar_to_rect (double @var{r}, double @var{theta}, gsl_sf_result * @var{x}, gsl_sf_result * @var{y}); +This function converts the polar coordinates (@var{r},@var{theta}) to +rectilinear coordinates (@var{x},@var{y}), @math{x = r\cos(\theta)}, +@math{y = r\sin(\theta)}. +@comment Exceptional Return Values: GSL_ELOSS +@end deftypefun + +@deftypefun int gsl_sf_rect_to_polar (double @var{x}, double @var{y}, gsl_sf_result * @var{r}, gsl_sf_result * @var{theta}) +This function converts the rectilinear coordinates (@var{x},@var{y}) to +polar coordinates (@var{r},@var{theta}), such that @math{x = +r\cos(\theta)}, @math{y = r\sin(\theta)}. The argument @var{theta} +lies in the range @math{[-\pi, \pi]}. +@comment Exceptional Return Values: GSL_EDOM +@end deftypefun + +@node Restriction Functions +@subsection Restriction Functions +@cindex angular reduction +@cindex reduction of angular variables + +@deftypefun double gsl_sf_angle_restrict_symm (double @var{theta}) +@deftypefunx int gsl_sf_angle_restrict_symm_e (double * @var{theta}) +These routines force the angle @var{theta} to lie in the range +@math{(-\pi,\pi]}. + +Note that the mathematical value of @math{\pi} is slightly greater +than @code{M_PI}, so the machine numbers @code{M_PI} and @code{-M_PI} +are included in the range. +@comment Exceptional Return Values: GSL_ELOSS +@end deftypefun + +@deftypefun double gsl_sf_angle_restrict_pos (double @var{theta}) +@deftypefunx int gsl_sf_angle_restrict_pos_e (double * @var{theta}) +These routines force the angle @var{theta} to lie in the range @math{[0, +2\pi)}. + +Note that the mathematical value of @math{2\pi} is slightly greater +than @code{2*M_PI}, so the machine number @code{2*M_PI} is included in +the range. + +@comment Exceptional Return Values: GSL_ELOSS +@end deftypefun + + +@node Trigonometric Functions With Error Estimates +@subsection Trigonometric Functions With Error Estimates + +@deftypefun int gsl_sf_sin_err_e (double @var{x}, double @var{dx}, gsl_sf_result * @var{result}) +This routine computes the sine of an angle @var{x} with an associated +absolute error @var{dx}, +@c{$\sin(x \pm dx)$} +@math{\sin(x \pm dx)}. Note that this function is provided in the error-handling form only since +its purpose is to compute the propagated error. +@end deftypefun + +@deftypefun int gsl_sf_cos_err_e (double @var{x}, double @var{dx}, gsl_sf_result * @var{result}) +This routine computes the cosine of an angle @var{x} with an associated +absolute error @var{dx}, +@c{$\cos(x \pm dx)$} +@math{\cos(x \pm dx)}. Note that this function is provided in the error-handling form only since +its purpose is to compute the propagated error. +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc-zeta.texi b/software/gsl-1.15/doc/specfunc-zeta.texi new file mode 100644 index 000000000..3bd460d26 --- /dev/null +++ b/software/gsl-1.15/doc/specfunc-zeta.texi @@ -0,0 +1,101 @@ +@cindex Zeta functions + +The Riemann zeta function is defined in Abramowitz & Stegun, Section +23.2. The functions described in this section are declared in the +header file @file{gsl_sf_zeta.h}. + +@menu +* Riemann Zeta Function:: +* Riemann Zeta Function Minus One:: +* Hurwitz Zeta Function:: +* Eta Function:: +@end menu + +@node Riemann Zeta Function +@subsection Riemann Zeta Function +@cindex Riemann Zeta Function + +The Riemann zeta function is defined by the infinite sum +@c{$\zeta(s) = \sum_{k=1}^\infty k^{-s}$} +@math{\zeta(s) = \sum_@{k=1@}^\infty k^@{-s@}}. + +@deftypefun double gsl_sf_zeta_int (int @var{n}) +@deftypefunx int gsl_sf_zeta_int_e (int @var{n}, gsl_sf_result * @var{result}) +These routines compute the Riemann zeta function @math{\zeta(n)} +for integer @var{n}, +@math{n \ne 1}. +@comment Domain: n integer, n != 1 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_zeta (double @var{s}) +@deftypefunx int gsl_sf_zeta_e (double @var{s}, gsl_sf_result * @var{result}) +These routines compute the Riemann zeta function @math{\zeta(s)} +for arbitrary @var{s}, +@math{s \ne 1}. +@comment Domain: s != 1.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@node Riemann Zeta Function Minus One +@subsection Riemann Zeta Function Minus One + +For large positive argument, the Riemann zeta function approaches one. +In this region the fractional part is interesting, and therefore we +need a function to evaluate it explicitly. + +@deftypefun double gsl_sf_zetam1_int (int @var{n}) +@deftypefunx int gsl_sf_zetam1_int_e (int @var{n}, gsl_sf_result * @var{result}) +These routines compute @math{\zeta(n) - 1} for integer @var{n}, +@math{n \ne 1}. +@comment Domain: n integer, n != 1 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_zetam1 (double @var{s}) +@deftypefunx int gsl_sf_zetam1_e (double @var{s}, gsl_sf_result * @var{result}) +These routines compute @math{\zeta(s) - 1} for arbitrary @var{s}, +@math{s \ne 1}. +@comment Domain: s != 1.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EOVRFLW +@end deftypefun + + +@node Hurwitz Zeta Function +@subsection Hurwitz Zeta Function +@cindex Hurwitz Zeta Function + +The Hurwitz zeta function is defined by +@c{$\zeta(s,q) = \sum_0^\infty (k+q)^{-s}$} +@math{\zeta(s,q) = \sum_0^\infty (k+q)^@{-s@}}. + +@deftypefun double gsl_sf_hzeta (double @var{s}, double @var{q}) +@deftypefunx int gsl_sf_hzeta_e (double @var{s}, double @var{q}, gsl_sf_result * @var{result}) +These routines compute the Hurwitz zeta function @math{\zeta(s,q)} for +@math{s > 1}, @math{q > 0}. +@comment Domain: s > 1.0, q > 0.0 +@comment Exceptional Return Values: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + + +@node Eta Function +@subsection Eta Function +@cindex Eta Function + +The eta function is defined by +@c{$\eta(s) = (1-2^{1-s}) \zeta(s)$} +@math{\eta(s) = (1-2^@{1-s@}) \zeta(s)}. + +@deftypefun double gsl_sf_eta_int (int @var{n}) +@deftypefunx int gsl_sf_eta_int_e (int @var{n}, gsl_sf_result * @var{result}) +These routines compute the eta function @math{\eta(n)} for integer @var{n}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + +@deftypefun double gsl_sf_eta (double @var{s}) +@deftypefunx int gsl_sf_eta_e (double @var{s}, gsl_sf_result * @var{result}) +These routines compute the eta function @math{\eta(s)} for arbitrary @var{s}. +@comment Exceptional Return Values: GSL_EUNDRFLW, GSL_EOVRFLW +@end deftypefun + diff --git a/software/gsl-1.15/doc/specfunc.texi b/software/gsl-1.15/doc/specfunc.texi new file mode 100644 index 000000000..3bb31e3db --- /dev/null +++ b/software/gsl-1.15/doc/specfunc.texi @@ -0,0 +1,359 @@ +@cindex special functions + +This chapter describes the GSL special function library. The library +includes routines for calculating the values of Airy functions, Bessel +functions, Clausen functions, Coulomb wave functions, Coupling +coefficients, the Dawson function, Debye functions, Dilogarithms, +Elliptic integrals, Jacobi elliptic functions, Error functions, +Exponential integrals, Fermi-Dirac functions, Gamma functions, +Gegenbauer functions, Hypergeometric functions, Laguerre functions, +Legendre functions and Spherical Harmonics, the Psi (Digamma) Function, +Synchrotron functions, Transport functions, Trigonometric functions and +Zeta functions. Each routine also computes an estimate of the numerical +error in the calculated value of the function. + +The functions in this chapter are declared in individual header files, +such as @file{gsl_sf_airy.h}, @file{gsl_sf_bessel.h}, etc. The complete +set of header files can be included using the file @file{gsl_sf.h}. + +@menu +* Special Function Usage:: +* The gsl_sf_result struct:: +* Special Function Modes:: +* Airy Functions and Derivatives:: +* Bessel Functions:: +* Clausen Functions:: +* Coulomb Functions:: +* Coupling Coefficients:: +* Dawson Function:: +* Debye Functions:: +* Dilogarithm:: +* Elementary Operations:: +* Elliptic Integrals:: +* Elliptic Functions (Jacobi):: +* Error Functions:: +* Exponential Functions:: +* Exponential Integrals:: +* Fermi-Dirac Function:: +* Gamma and Beta Functions:: +* Gegenbauer Functions:: +* Hypergeometric Functions:: +* Laguerre Functions:: +* Lambert W Functions:: +* Legendre Functions and Spherical Harmonics:: +* Logarithm and Related Functions:: +* Mathieu Functions:: +* Power Function:: +* Psi (Digamma) Function:: +* Synchrotron Functions:: +* Transport Functions:: +* Trigonometric Functions:: +* Zeta Functions:: +* Special Functions Examples:: +* Special Functions References and Further Reading:: +@end menu + +@node Special Function Usage +@section Usage + +The special functions are available in two calling conventions, a +@dfn{natural form} which returns the numerical value of the function and +an @dfn{error-handling form} which returns an error code. The two types +of function provide alternative ways of accessing the same underlying +code. + +The @dfn{natural form} returns only the value of the function and can be +used directly in mathematical expressions. For example, the following +function call will compute the value of the Bessel function +@math{J_0(x)}, + +@example +double y = gsl_sf_bessel_J0 (x); +@end example + +@noindent +There is no way to access an error code or to estimate the error using +this method. To allow access to this information the alternative +error-handling form stores the value and error in a modifiable argument, + +@example +gsl_sf_result result; +int status = gsl_sf_bessel_J0_e (x, &result); +@end example + +@noindent +The error-handling functions have the suffix @code{_e}. The returned +status value indicates error conditions such as overflow, underflow or +loss of precision. If there are no errors the error-handling functions +return @code{GSL_SUCCESS}. + +@node The gsl_sf_result struct +@section The gsl_sf_result struct +@cindex gsl_sf_result +@cindex gsl_sf_result_e10 +@tpindex gsl_sf_result +@tpindex gsl_sf_result_e10 + +The error handling form of the special functions always calculate an +error estimate along with the value of the result. Therefore, +structures are provided for amalgamating a value and error estimate. +These structures are declared in the header file @file{gsl_sf_result.h}. + +The @code{gsl_sf_result} struct contains value and error fields. + +@example +typedef struct +@{ + double val; + double err; +@} gsl_sf_result; +@end example + +@noindent +The field @var{val} contains the value and the field @var{err} contains +an estimate of the absolute error in the value. + +In some cases, an overflow or underflow can be detected and handled by a +function. In this case, it may be possible to return a scaling exponent +as well as an error/value pair in order to save the result from +exceeding the dynamic range of the built-in types. The +@code{gsl_sf_result_e10} struct contains value and error fields as well +as an exponent field such that the actual result is obtained as +@code{result * 10^(e10)}. + +@example +typedef struct +@{ + double val; + double err; + int e10; +@} gsl_sf_result_e10; +@end example + +@node Special Function Modes +@section Modes + +The goal of the library is to achieve double precision accuracy wherever +possible. However the cost of evaluating some special functions to +double precision can be significant, particularly where very high order +terms are required. In these cases a @code{mode} argument allows the +accuracy of the function to be reduced in order to improve performance. +The following precision levels are available for the mode argument, + +@table @code +@item GSL_PREC_DOUBLE +Double-precision, a relative accuracy of approximately @c{$2 \times 10^{-16}$} +@math{2 * 10^-16}. +@item GSL_PREC_SINGLE +Single-precision, a relative accuracy of approximately @c{$1 \times 10^{-7}$} +@math{10^-7}. +@item GSL_PREC_APPROX +Approximate values, a relative accuracy of approximately @c{$5 \times 10^{-4}$} +@math{5 * 10^-4}. +@end table + +@noindent +The approximate mode provides the fastest evaluation at the lowest +accuracy. + +@node Airy Functions and Derivatives +@section Airy Functions and Derivatives +@include specfunc-airy.texi + +@node Bessel Functions +@section Bessel Functions +@include specfunc-bessel.texi + +@node Clausen Functions +@section Clausen Functions +@include specfunc-clausen.texi + +@node Coulomb Functions +@section Coulomb Functions +@include specfunc-coulomb.texi + +@node Coupling Coefficients +@section Coupling Coefficients +@include specfunc-coupling.texi + +@node Dawson Function +@section Dawson Function +@include specfunc-dawson.texi + +@node Debye Functions +@section Debye Functions +@include specfunc-debye.texi + +@node Dilogarithm +@section Dilogarithm +@include specfunc-dilog.texi + +@node Elementary Operations +@section Elementary Operations +@include specfunc-elementary.texi + +@node Elliptic Integrals +@section Elliptic Integrals +@include specfunc-ellint.texi + +@node Elliptic Functions (Jacobi) +@section Elliptic Functions (Jacobi) +@include specfunc-elljac.texi + +@node Error Functions +@section Error Functions +@include specfunc-erf.texi + +@node Exponential Functions +@section Exponential Functions +@include specfunc-exp.texi + +@node Exponential Integrals +@section Exponential Integrals +@include specfunc-expint.texi + +@node Fermi-Dirac Function +@section Fermi-Dirac Function +@include specfunc-fermi-dirac.texi + +@node Gamma and Beta Functions +@section Gamma and Beta Functions +@include specfunc-gamma.texi + +@node Gegenbauer Functions +@section Gegenbauer Functions +@include specfunc-gegenbauer.texi + +@node Hypergeometric Functions +@section Hypergeometric Functions +@include specfunc-hyperg.texi + +@node Laguerre Functions +@section Laguerre Functions +@include specfunc-laguerre.texi + +@node Lambert W Functions +@section Lambert W Functions +@include specfunc-lambert.texi + +@node Legendre Functions and Spherical Harmonics +@section Legendre Functions and Spherical Harmonics +@include specfunc-legendre.texi + +@node Logarithm and Related Functions +@section Logarithm and Related Functions +@include specfunc-log.texi + +@node Mathieu Functions +@section Mathieu Functions +@include specfunc-mathieu.texi + +@node Power Function +@section Power Function +@include specfunc-pow-int.texi + +@node Psi (Digamma) Function +@section Psi (Digamma) Function +@include specfunc-psi.texi + +@node Synchrotron Functions +@section Synchrotron Functions +@include specfunc-synchrotron.texi + +@node Transport Functions +@section Transport Functions +@include specfunc-transport.texi + +@node Trigonometric Functions +@section Trigonometric Functions +@include specfunc-trig.texi + +@node Zeta Functions +@section Zeta Functions +@include specfunc-zeta.texi + +@node Special Functions Examples +@section Examples + +The following example demonstrates the use of the error handling form of +the special functions, in this case to compute the Bessel function +@math{J_0(5.0)}, + +@example +@verbatiminclude examples/specfun_e.c +@end example + +@noindent +Here are the results of running the program, + +@example +$ ./a.out +@verbatiminclude examples/specfun_e.out +@end example + +@noindent +The next program computes the same quantity using the natural form of +the function. In this case the error term @var{result.err} and return +status are not accessible. + +@example +@verbatiminclude examples/specfun.c +@end example + +@noindent +The results of the function are the same, + +@example +$ ./a.out +@verbatiminclude examples/specfun.out +@end example + + + +@node Special Functions References and Further Reading +@section References and Further Reading + +The library follows the conventions of @cite{Abramowitz & Stegun} where +possible, +@itemize @w{} +@item +Abramowitz & Stegun (eds.), @cite{Handbook of Mathematical Functions} +@end itemize + +@noindent +The following papers contain information on the algorithms used +to compute the special functions, +@cindex MISCFUN +@itemize @w{} +@item +Allan J. MacLeod, MISCFUN: A software package to compute uncommon +special functions. @cite{ACM Trans.@: Math.@: Soft.}, vol.@: 22, +1996, 288--301 + +@item +G.N. Watson, A Treatise on the Theory of Bessel Functions, +2nd Edition (Cambridge University Press, 1944). + +@item +G. Nemeth, Mathematical Approximations of Special Functions, +Nova Science Publishers, ISBN 1-56072-052-2 + +@item +B.C. Carlson, Special Functions of Applied Mathematics (1977) + +@item +N. M. Temme, Special Functions: An Introduction to the Classical +Functions of Mathematical Physics (1996), ISBN 978-0471113133. + +@item +W.J. Thompson, Atlas for Computing Mathematical Functions, John Wiley & Sons, +New York (1997). + +@item +Y.Y. Luke, Algorithms for the Computation of Mathematical Functions, Academic +Press, New York (1977). + +@comment @item +@comment Fermi-Dirac functions of orders @math{-1/2}, @math{1/2}, @math{3/2}, and +@comment @math{5/2}. @cite{ACM Trans. Math. Soft.}, vol. 24, 1998, 1-12. +@end itemize diff --git a/software/gsl-1.15/doc/stamp-vti b/software/gsl-1.15/doc/stamp-vti new file mode 100644 index 000000000..7aa2d3365 --- /dev/null +++ b/software/gsl-1.15/doc/stamp-vti @@ -0,0 +1,4 @@ +@set UPDATED 29 April 2011 +@set UPDATED-MONTH April 2011 +@set EDITION 1.15 +@set VERSION 1.15 diff --git a/software/gsl-1.15/doc/statistics.texi b/software/gsl-1.15/doc/statistics.texi new file mode 100644 index 000000000..ac8b108c6 --- /dev/null +++ b/software/gsl-1.15/doc/statistics.texi @@ -0,0 +1,817 @@ +@cindex statistics +@cindex mean +@cindex standard deviation +@cindex variance +@cindex estimated standard deviation +@cindex estimated variance +@cindex t-test +@cindex range +@cindex min +@cindex max + +This chapter describes the statistical functions in the library. The +basic statistical functions include routines to compute the mean, +variance and standard deviation. More advanced functions allow you to +calculate absolute deviations, skewness, and kurtosis as well as the +median and arbitrary percentiles. The algorithms use recurrence +relations to compute average quantities in a stable way, without large +intermediate values that might overflow. + +The functions are available in versions for datasets in the standard +floating-point and integer types. The versions for double precision +floating-point data have the prefix @code{gsl_stats} and are declared in +the header file @file{gsl_statistics_double.h}. The versions for integer +data have the prefix @code{gsl_stats_int} and are declared in the header +file @file{gsl_statistics_int.h}. All the functions operate on C +arrays with a @var{stride} parameter specifying the spacing between +elements. + +@menu +* Mean and standard deviation and variance:: +* Absolute deviation:: +* Higher moments (skewness and kurtosis):: +* Autocorrelation:: +* Covariance:: +* Correlation:: +* Weighted Samples:: +* Maximum and Minimum values:: +* Median and Percentiles:: +* Example statistical programs:: +* Statistics References and Further Reading:: +@end menu + +@node Mean and standard deviation and variance +@section Mean, Standard Deviation and Variance + +@deftypefun double gsl_stats_mean (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the arithmetic mean of @var{data}, a dataset of +length @var{n} with stride @var{stride}. The arithmetic mean, or +@dfn{sample mean}, is denoted by @math{\Hat\mu} and defined as, +@tex +\beforedisplay +$$ +{\Hat\mu} = {1 \over N} \sum x_i +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\mu = (1/N) \sum x_i +@end example + +@end ifinfo +@noindent +where @math{x_i} are the elements of the dataset @var{data}. For +samples drawn from a gaussian distribution the variance of +@math{\Hat\mu} is @math{\sigma^2 / N}. +@end deftypefun + +@deftypefun double gsl_stats_variance (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the estimated, or @dfn{sample}, variance of +@var{data}, a dataset of length @var{n} with stride @var{stride}. The +estimated variance is denoted by @math{\Hat\sigma^2} and is defined by, +@tex +\beforedisplay +$$ +{\Hat\sigma}^2 = {1 \over (N-1)} \sum (x_i - {\Hat\mu})^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\sigma^2 = (1/(N-1)) \sum (x_i - \Hat\mu)^2 +@end example + +@end ifinfo +@noindent +where @math{x_i} are the elements of the dataset @var{data}. Note that +the normalization factor of @math{1/(N-1)} results from the derivation +of @math{\Hat\sigma^2} as an unbiased estimator of the population +variance @math{\sigma^2}. For samples drawn from a Gaussian distribution +the variance of @math{\Hat\sigma^2} itself is @math{2 \sigma^4 / N}. + +This function computes the mean via a call to @code{gsl_stats_mean}. If +you have already computed the mean then you can pass it directly to +@code{gsl_stats_variance_m}. +@end deftypefun + +@deftypefun double gsl_stats_variance_m (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +This function returns the sample variance of @var{data} relative to the +given value of @var{mean}. The function is computed with @math{\Hat\mu} +replaced by the value of @var{mean} that you supply, +@tex +\beforedisplay +$$ +{\Hat\sigma}^2 = {1 \over (N-1)} \sum (x_i - mean)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\sigma^2 = (1/(N-1)) \sum (x_i - mean)^2 +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_sd (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +@deftypefunx double gsl_stats_sd_m (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +The standard deviation is defined as the square root of the variance. +These functions return the square root of the corresponding variance +functions above. +@end deftypefun + +@deftypefun double gsl_stats_tss (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +@deftypefunx double gsl_stats_tss_m (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +These functions return the total sum of squares (TSS) of @var{data} about +the mean. For @code{gsl_stats_tss_m} the user-supplied value of +@var{mean} is used, and for @code{gsl_stats_tss} it is computed using +@code{gsl_stats_mean}. +@tex +\beforedisplay +$$ +{\rm TSS} = \sum (x_i - mean)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +TSS = \sum (x_i - mean)^2 +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_variance_with_fixed_mean (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +This function computes an unbiased estimate of the variance of +@var{data} when the population mean @var{mean} of the underlying +distribution is known @emph{a priori}. In this case the estimator for +the variance uses the factor @math{1/N} and the sample mean +@math{\Hat\mu} is replaced by the known population mean @math{\mu}, +@tex +\beforedisplay +$$ +{\Hat\sigma}^2 = {1 \over N} \sum (x_i - \mu)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\sigma^2 = (1/N) \sum (x_i - \mu)^2 +@end example +@end ifinfo +@end deftypefun + + +@deftypefun double gsl_stats_sd_with_fixed_mean (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +This function calculates the standard deviation of @var{data} for a +fixed population mean @var{mean}. The result is the square root of the +corresponding variance function. +@end deftypefun + +@node Absolute deviation +@section Absolute deviation + +@deftypefun double gsl_stats_absdev (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the absolute deviation from the mean of +@var{data}, a dataset of length @var{n} with stride @var{stride}. The +absolute deviation from the mean is defined as, +@tex +\beforedisplay +$$ +absdev = {1 \over N} \sum |x_i - {\Hat\mu}| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +absdev = (1/N) \sum |x_i - \Hat\mu| +@end example + +@end ifinfo +@noindent +where @math{x_i} are the elements of the dataset @var{data}. The +absolute deviation from the mean provides a more robust measure of the +width of a distribution than the variance. This function computes the +mean of @var{data} via a call to @code{gsl_stats_mean}. +@end deftypefun + +@deftypefun double gsl_stats_absdev_m (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) +This function computes the absolute deviation of the dataset @var{data} +relative to the given value of @var{mean}, +@tex +\beforedisplay +$$ +absdev = {1 \over N} \sum |x_i - mean| +$$ +\afterdisplay +@end tex +@ifinfo + +@example +absdev = (1/N) \sum |x_i - mean| +@end example + +@end ifinfo +@noindent +This function is useful if you have already computed the mean of +@var{data} (and want to avoid recomputing it), or wish to calculate the +absolute deviation relative to another value (such as zero, or the +median). +@end deftypefun + +@node Higher moments (skewness and kurtosis) +@section Higher moments (skewness and kurtosis) +@cindex skewness +@cindex kurtosis + +@deftypefun double gsl_stats_skew (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the skewness of @var{data}, a dataset of length +@var{n} with stride @var{stride}. The skewness is defined as, +@tex +\beforedisplay +$$ +skew = {1 \over N} \sum + {\left( x_i - {\Hat\mu} \over {\Hat\sigma} \right)}^3 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +skew = (1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^3 +@end example + +@end ifinfo +@noindent +where @math{x_i} are the elements of the dataset @var{data}. The skewness +measures the asymmetry of the tails of a distribution. + +The function computes the mean and estimated standard deviation of +@var{data} via calls to @code{gsl_stats_mean} and @code{gsl_stats_sd}. +@end deftypefun + +@deftypefun double gsl_stats_skew_m_sd (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}, double @var{sd}) +This function computes the skewness of the dataset @var{data} using the +given values of the mean @var{mean} and standard deviation @var{sd}, +@tex +\beforedisplay +$$ +skew = {1 \over N} + \sum {\left( x_i - mean \over sd \right)}^3 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +skew = (1/N) \sum ((x_i - mean)/sd)^3 +@end example + +@end ifinfo +@noindent +These functions are useful if you have already computed the mean and +standard deviation of @var{data} and want to avoid recomputing them. +@end deftypefun + +@deftypefun double gsl_stats_kurtosis (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the kurtosis of @var{data}, a dataset of length +@var{n} with stride @var{stride}. The kurtosis is defined as, +@tex +\beforedisplay +$$ +kurtosis = \left( {1 \over N} \sum + {\left(x_i - {\Hat\mu} \over {\Hat\sigma} \right)}^4 + \right) + - 3 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +kurtosis = ((1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^4) - 3 +@end example + +@end ifinfo +@noindent +The kurtosis measures how sharply peaked a distribution is, relative to +its width. The kurtosis is normalized to zero for a Gaussian +distribution. +@end deftypefun + +@deftypefun double gsl_stats_kurtosis_m_sd (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}, double @var{sd}) +This function computes the kurtosis of the dataset @var{data} using the +given values of the mean @var{mean} and standard deviation @var{sd}, +@tex +\beforedisplay +$$ +kurtosis = {1 \over N} + \left( \sum {\left(x_i - mean \over sd \right)}^4 \right) + - 3 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +kurtosis = ((1/N) \sum ((x_i - mean)/sd)^4) - 3 +@end example + +@end ifinfo +@noindent +This function is useful if you have already computed the mean and +standard deviation of @var{data} and want to avoid recomputing them. +@end deftypefun + +@node Autocorrelation +@section Autocorrelation + +@deftypefun double gsl_stats_lag1_autocorrelation (const double @var{data}[], const size_t @var{stride}, const size_t @var{n}) +This function computes the lag-1 autocorrelation of the dataset @var{data}. +@tex +\beforedisplay +$$ +a_1 = {\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i-1} - \Hat\mu) +\over +\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i} - \Hat\mu)} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +a_1 = @{\sum_@{i = 1@}^@{n@} (x_@{i@} - \Hat\mu) (x_@{i-1@} - \Hat\mu) + \over + \sum_@{i = 1@}^@{n@} (x_@{i@} - \Hat\mu) (x_@{i@} - \Hat\mu)@} +@end example +@end ifinfo +@end deftypefun + + +@deftypefun double gsl_stats_lag1_autocorrelation_m (const double @var{data}[], const size_t @var{stride}, const size_t @var{n}, const double @var{mean}) +This function computes the lag-1 autocorrelation of the dataset +@var{data} using the given value of the mean @var{mean}. + +@end deftypefun + +@node Covariance +@section Covariance +@cindex covariance, of two datasets + +@deftypefun double gsl_stats_covariance (const double @var{data1}[], const size_t @var{stride1}, const double @var{data2}[], const size_t @var{stride2}, const size_t @var{n}) +This function computes the covariance of the datasets @var{data1} and +@var{data2} which must both be of the same length @var{n}. +@tex +\beforedisplay +$$ +covar = {1 \over (n - 1)} \sum_{i = 1}^{n} (x_{i} - \Hat x) (y_{i} - \Hat y) +$$ +\afterdisplay +@end tex +@ifinfo + +@example +covar = (1/(n - 1)) \sum_@{i = 1@}^@{n@} (x_i - \Hat x) (y_i - \Hat y) +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_covariance_m (const double @var{data1}[], const size_t @var{stride1}, const double @var{data2}[], const size_t @var{stride2}, const size_t @var{n}, const double @var{mean1}, const double @var{mean2}) +This function computes the covariance of the datasets @var{data1} and +@var{data2} using the given values of the means, @var{mean1} and +@var{mean2}. This is useful if you have already computed the means of +@var{data1} and @var{data2} and want to avoid recomputing them. +@end deftypefun + +@node Correlation +@section Correlation +@cindex correlation, of two datasets + +@deftypefun double gsl_stats_correlation (const double @var{data1}[], const size_t @var{stride1}, const double @var{data2}[], const size_t @var{stride2}, const size_t @var{n}) +This function efficiently computes the Pearson correlation coefficient +between the datasets @var{data1} and @var{data2} which must both be of +the same length @var{n}. +@tex +\beforedisplay +$$ +r = {cov(x, y) \over \Hat\sigma_x \Hat\sigma_y} = +{{1 \over n-1} \sum (x_i - \Hat x) (y_i - \Hat y) +\over +\sqrt{{1 \over n-1} \sum (x_i - {\Hat x})^2} +\sqrt{{1 \over n-1} \sum (y_i - {\Hat y})^2} +} +$$ +\afterdisplay +@end tex +@ifinfo +@example +r = cov(x, y) / (\Hat\sigma_x \Hat\sigma_y) + = @{1/(n-1) \sum (x_i - \Hat x) (y_i - \Hat y) + \over + \sqrt@{1/(n-1) \sum (x_i - \Hat x)^2@} \sqrt@{1/(n-1) \sum (y_i - \Hat y)^2@} + @} +@end example +@end ifinfo +@end deftypefun + +@node Weighted Samples +@section Weighted Samples + +The functions described in this section allow the computation of +statistics for weighted samples. The functions accept an array of +samples, @math{x_i}, with associated weights, @math{w_i}. Each sample +@math{x_i} is considered as having been drawn from a Gaussian +distribution with variance @math{\sigma_i^2}. The sample weight +@math{w_i} is defined as the reciprocal of this variance, @math{w_i = +1/\sigma_i^2}. Setting a weight to zero corresponds to removing a +sample from a dataset. + +@deftypefun double gsl_stats_wmean (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the weighted mean of the dataset @var{data} with +stride @var{stride} and length @var{n}, using the set of weights @var{w} +with stride @var{wstride} and length @var{n}. The weighted mean is defined as, +@tex +\beforedisplay +$$ +{\Hat\mu} = {{\sum w_i x_i} \over {\sum w_i}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\mu = (\sum w_i x_i) / (\sum w_i) +@end example +@end ifinfo +@end deftypefun + + +@deftypefun double gsl_stats_wvariance (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the estimated variance of the dataset @var{data} +with stride @var{stride} and length @var{n}, using the set of weights +@var{w} with stride @var{wstride} and length @var{n}. The estimated +variance of a weighted dataset is calculated as, +@tex +\beforedisplay +$$ +\Hat\sigma^2 = {{\sum w_i} \over {(\sum w_i)^2 - \sum (w_i^2)}} + \sum w_i (x_i - \Hat\mu)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\sigma^2 = ((\sum w_i)/((\sum w_i)^2 - \sum (w_i^2))) + \sum w_i (x_i - \Hat\mu)^2 +@end example + +@end ifinfo +@noindent +Note that this expression reduces to an unweighted variance with the +familiar @math{1/(N-1)} factor when there are @math{N} equal non-zero +weights. +@end deftypefun + +@deftypefun double gsl_stats_wvariance_m (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}) +This function returns the estimated variance of the weighted dataset +@var{data} using the given weighted mean @var{wmean}. +@end deftypefun + +@deftypefun double gsl_stats_wsd (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +The standard deviation is defined as the square root of the variance. +This function returns the square root of the corresponding variance +function @code{gsl_stats_wvariance} above. +@end deftypefun + +@deftypefun double gsl_stats_wsd_m (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}) +This function returns the square root of the corresponding variance +function @code{gsl_stats_wvariance_m} above. +@end deftypefun + +@deftypefun double gsl_stats_wvariance_with_fixed_mean (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, const double @var{mean}) +This function computes an unbiased estimate of the variance of the weighted +dataset @var{data} when the population mean @var{mean} of the underlying +distribution is known @emph{a priori}. In this case the estimator for +the variance replaces the sample mean @math{\Hat\mu} by the known +population mean @math{\mu}, +@tex +\beforedisplay +$$ +\Hat\sigma^2 = {{\sum w_i (x_i - \mu)^2} \over {\sum w_i}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\Hat\sigma^2 = (\sum w_i (x_i - \mu)^2) / (\sum w_i) +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_wsd_with_fixed_mean (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, const double @var{mean}) +The standard deviation is defined as the square root of the variance. +This function returns the square root of the corresponding variance +function above. +@end deftypefun + +@deftypefun double gsl_stats_wtss (const double @var{w}[], const size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +@deftypefunx double gsl_stats_wtss_m (const double @var{w}[], const size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}) +These functions return the weighted total sum of squares (TSS) of +@var{data} about the weighted mean. For @code{gsl_stats_wtss_m} the +user-supplied value of @var{wmean} is used, and for @code{gsl_stats_wtss} +it is computed using @code{gsl_stats_wmean}. +@tex +\beforedisplay +$$ +{\rm TSS} = \sum w_i (x_i - wmean)^2 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +TSS = \sum w_i (x_i - wmean)^2 +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_wabsdev (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the weighted absolute deviation from the weighted +mean of @var{data}. The absolute deviation from the mean is defined as, +@tex +\beforedisplay +$$ +absdev = {{\sum w_i |x_i - \Hat\mu|} \over {\sum w_i}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +absdev = (\sum w_i |x_i - \Hat\mu|) / (\sum w_i) +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_wabsdev_m (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}) +This function computes the absolute deviation of the weighted dataset +@var{data} about the given weighted mean @var{wmean}. +@end deftypefun + +@deftypefun double gsl_stats_wskew (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the weighted skewness of the dataset @var{data}. +@tex +\beforedisplay +$$ +skew = {{\sum w_i ((x_i - {\Hat x})/{\Hat \sigma})^3} \over {\sum w_i}} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +skew = (\sum w_i ((x_i - \Hat x)/\Hat \sigma)^3) / (\sum w_i) +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_wskew_m_sd (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}, double @var{wsd}) +This function computes the weighted skewness of the dataset @var{data} +using the given values of the weighted mean and weighted standard +deviation, @var{wmean} and @var{wsd}. +@end deftypefun + +@deftypefun double gsl_stats_wkurtosis (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function computes the weighted kurtosis of the dataset @var{data}. +@tex +\beforedisplay +$$ +kurtosis = {{\sum w_i ((x_i - {\Hat x})/{\Hat \sigma})^4} \over {\sum w_i}} - 3 +$$ +\afterdisplay +@end tex +@ifinfo + +@example +kurtosis = ((\sum w_i ((x_i - \Hat x)/\Hat \sigma)^4) / (\sum w_i)) - 3 +@end example +@end ifinfo +@end deftypefun + +@deftypefun double gsl_stats_wkurtosis_m_sd (const double @var{w}[], size_t @var{wstride}, const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{wmean}, double @var{wsd}) +This function computes the weighted kurtosis of the dataset @var{data} +using the given values of the weighted mean and weighted standard +deviation, @var{wmean} and @var{wsd}. +@end deftypefun + +@node Maximum and Minimum values +@section Maximum and Minimum values + +The following functions find the maximum and minimum values of a +dataset (or their indices). If the data contains @code{NaN}s then a +@code{NaN} will be returned, since the maximum or minimum value is +undefined. For functions which return an index, the location of the +first @code{NaN} in the array is returned. + +@deftypefun double gsl_stats_max (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the maximum value in @var{data}, a dataset of +length @var{n} with stride @var{stride}. The maximum value is defined +as the value of the element @math{x_i} which satisfies @c{$x_i \ge x_j$} +@math{x_i >= x_j} for all @math{j}. + +If you want instead to find the element with the largest absolute +magnitude you will need to apply @code{fabs} or @code{abs} to your data +before calling this function. +@end deftypefun + +@deftypefun double gsl_stats_min (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the minimum value in @var{data}, a dataset of +length @var{n} with stride @var{stride}. The minimum value is defined +as the value of the element @math{x_i} which satisfies @c{$x_i \le x_j$} +@math{x_i <= x_j} for all @math{j}. + +If you want instead to find the element with the smallest absolute +magnitude you will need to apply @code{fabs} or @code{abs} to your data +before calling this function. +@end deftypefun + +@deftypefun void gsl_stats_minmax (double * @var{min}, double * @var{max}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function finds both the minimum and maximum values @var{min}, +@var{max} in @var{data} in a single pass. +@end deftypefun + +@deftypefun size_t gsl_stats_max_index (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the index of the maximum value in @var{data}, a +dataset of length @var{n} with stride @var{stride}. The maximum value is +defined as the value of the element @math{x_i} which satisfies +@c{$x_i \ge x_j$} +@math{x_i >= x_j} for all @math{j}. When there are several equal maximum +elements then the first one is chosen. +@end deftypefun + +@deftypefun size_t gsl_stats_min_index (const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the index of the minimum value in @var{data}, a +dataset of length @var{n} with stride @var{stride}. The minimum value +is defined as the value of the element @math{x_i} which satisfies +@c{$x_i \ge x_j$} +@math{x_i >= x_j} for all @math{j}. When there are several equal +minimum elements then the first one is chosen. +@end deftypefun + +@deftypefun void gsl_stats_minmax_index (size_t * @var{min_index}, size_t * @var{max_index}, const double @var{data}[], size_t @var{stride}, size_t @var{n}) +This function returns the indexes @var{min_index}, @var{max_index} of +the minimum and maximum values in @var{data} in a single pass. +@end deftypefun + +@node Median and Percentiles +@section Median and Percentiles + +The median and percentile functions described in this section operate on +sorted data. For convenience we use @dfn{quantiles}, measured on a scale +of 0 to 1, instead of percentiles (which use a scale of 0 to 100). + +@deftypefun double gsl_stats_median_from_sorted_data (const double @var{sorted_data}[], size_t @var{stride}, size_t @var{n}) +This function returns the median value of @var{sorted_data}, a dataset +of length @var{n} with stride @var{stride}. The elements of the array +must be in ascending numerical order. There are no checks to see +whether the data are sorted, so the function @code{gsl_sort} should +always be used first. + +When the dataset has an odd number of elements the median is the value +of element @math{(n-1)/2}. When the dataset has an even number of +elements the median is the mean of the two nearest middle values, +elements @math{(n-1)/2} and @math{n/2}. Since the algorithm for +computing the median involves interpolation this function always returns +a floating-point number, even for integer data types. +@end deftypefun + +@deftypefun double gsl_stats_quantile_from_sorted_data (const double @var{sorted_data}[], size_t @var{stride}, size_t @var{n}, double @var{f}) +This function returns a quantile value of @var{sorted_data}, a +double-precision array of length @var{n} with stride @var{stride}. The +elements of the array must be in ascending numerical order. The +quantile is determined by the @var{f}, a fraction between 0 and 1. For +example, to compute the value of the 75th percentile @var{f} should have +the value 0.75. + +There are no checks to see whether the data are sorted, so the function +@code{gsl_sort} should always be used first. + +The quantile is found by interpolation, using the formula +@tex +\beforedisplay +$$ +\hbox{quantile} = (1 - \delta) x_i + \delta x_{i+1} +$$ +\afterdisplay +@end tex +@ifinfo + +@example +quantile = (1 - \delta) x_i + \delta x_@{i+1@} +@end example + +@end ifinfo +@noindent +where @math{i} is @code{floor}(@math{(n - 1)f}) and @math{\delta} is +@math{(n-1)f - i}. + +Thus the minimum value of the array (@code{data[0*stride]}) is given by +@var{f} equal to zero, the maximum value (@code{data[(n-1)*stride]}) is +given by @var{f} equal to one and the median value is given by @var{f} +equal to 0.5. Since the algorithm for computing quantiles involves +interpolation this function always returns a floating-point number, even +for integer data types. +@end deftypefun + + +@comment @node Statistical tests +@comment @section Statistical tests + +@comment FIXME, do more work on the statistical tests + +@comment -@deftypefun double gsl_stats_ttest (const double @var{data1}[], double @var{data2}[], size_t @var{n1}, size_t @var{n2}) +@comment -@deftypefunx Statistics double gsl_stats_int_ttest (const double @var{data1}[], double @var{data2}[], size_t @var{n1}, size_t @var{n2}) + +@comment The function @code{gsl_stats_ttest} computes the t-test statistic for +@comment the two arrays @var{data1}[] and @var{data2}[], of lengths @var{n1} and +@comment -@var{n2} respectively. + +@comment The t-test statistic measures the difference between the means of two +@comment datasets. + +@node Example statistical programs +@section Examples +Here is a basic example of how to use the statistical functions: + +@example +@verbatiminclude examples/stat.c +@end example + +The program should produce the following output, + +@example +@verbatiminclude examples/stat.out +@end example + + +Here is an example using sorted data, + +@example +@verbatiminclude examples/statsort.c +@end example + +This program should produce the following output, + +@example +@verbatiminclude examples/statsort.out +@end example + +@node Statistics References and Further Reading +@section References and Further Reading + +The standard reference for almost any topic in statistics is the +multi-volume @cite{Advanced Theory of Statistics} by Kendall and Stuart. + +@itemize @w{} +@item +Maurice Kendall, Alan Stuart, and J. Keith Ord. +@cite{The Advanced Theory of Statistics} (multiple volumes) +reprinted as @cite{Kendall's Advanced Theory of Statistics}. +Wiley, ISBN 047023380X. +@end itemize + +@noindent +Many statistical concepts can be more easily understood by a Bayesian +approach. The following book by Gelman, Carlin, Stern and Rubin gives a +comprehensive coverage of the subject. + +@itemize @w{} +@item +Andrew Gelman, John B. Carlin, Hal S. Stern, Donald B. Rubin. +@cite{Bayesian Data Analysis}. +Chapman & Hall, ISBN 0412039915. +@end itemize + +@noindent +For physicists the Particle Data Group provides useful reviews of +Probability and Statistics in the ``Mathematical Tools'' section of its +Annual Review of Particle Physics. + +@itemize @w{} +@item +@cite{Review of Particle Properties} +R.M. Barnett et al., Physical Review D54, 1 (1996) +@end itemize + +@noindent +The Review of Particle Physics is available online at +the website @uref{http://pdg.lbl.gov/}. + + diff --git a/software/gsl-1.15/doc/statnotes.tex b/software/gsl-1.15/doc/statnotes.tex new file mode 100644 index 000000000..017ee5771 --- /dev/null +++ b/software/gsl-1.15/doc/statnotes.tex @@ -0,0 +1,93 @@ +\documentclass[fleqn,12pt]{article} +\newcommand{\expectation}[1]{\langle #1 \rangle} +\begin{document} +\title{Statistical Function Notes} +\author{Brian Gough} +\date{November 2008} +\maketitle + +\section{Weighted mean and variance} +We have $N$ samples $x_i$ drawn from a Gaussian distribution +$G(\mu,\sigma)$ (or any distribution with finite first and second +moments). Each sample has a weight $w_i$ which represents the +relative value we place on it. Given the estimate of the mean +% +\begin{eqnarray} +\bar{x} &=& {1 \over W} \sum_i w_i x_i \\ +W &=& \sum_i w_i +\end{eqnarray} +% +\noindent +we want an unbiased estimator of the variance of the underlying +distribution $\sigma^2$. + +We start with the standard definition of the sample variance $V$ and +compute the bias correction factor. +% +\begin{eqnarray} +V &=& {1\over W} \sum_i w_i (x_i - \bar{x})^2 \\ + &=& {1\over W} \sum_i w_i \left(x_i - {1\over W}\sum_j w_j x_j\right)^2 \\ + &=& {1\over W} \sum_i w_i \left(x_i^2 - {2 \over W} x_i \sum_j w_j x_j + + {1 \over W^2} (\sum_j w_j x_j)^2\right) \\ + &=& {1\over W} \left( \sum_i w_i x_i^2 + - {2 \over W} \sum_i w_i x_i \sum_j w_j x_j + + {1 \over W} (\sum_j w_j x_j)^2\right)\\ + &=& {1\over W} \left( \sum_i w_i x_i^2 + - {1 \over W} \sum_i w_i x_i \sum_j w_j x_j\right)\\ + &=& {1\over W} \left( \sum_i w_i x_i^2 + - {1 \over W} \sum_{ij} w_i w_j x_i x_j\right) +\end{eqnarray} +% +We find the expectation value $\expectation{V}$ using the Gaussian +formulas $\expectation{x_i} = \mu$, $\expectation{x_i x_j} = \mu^2 + +\delta_{ij} \sigma^2$. We assume that any random contribution +dependent on the weights themselves is zero or can be +neglected in comparison to $\sigma$. + +% +\begin{eqnarray} +\expectation{V} &=& {1\over W} \left( \sum_i w_i \expectation{x_i^2} + - {1 \over W} \sum_{ij} w_i w_j \expectation{x_i x_j}\right)\\ + &=& {1\over W} \left( \sum_i w_i (\mu^2 + \sigma^2) + - {1 \over W} \sum_{ij} w_i w_j (\mu^2 + \delta_{ij} \sigma^2)\right)\\ + &=& {1\over W} \left( W (\mu^2 + \sigma^2) + - {1 \over W} ( W^2 \mu^2 +( \sum_i w_i^2) \sigma^2)\right)\\ + &=& {1\over W} \left(W \sigma^2 - {1 \over W} ( \sum_i w_i^2)\sigma^2\right)\\ + &=& \left({{W^2 - \sum_i w_i^2} \over W^2}\right) \sigma^2 +\end{eqnarray} +% +Therefore an unbiased estimator $U$ of $\sigma^2$ is +% +\begin{eqnarray} +U &=& {W^2 \over {(W^2 - \sum_i w_i^2)}} \expectation{V}\\ + &=& {W^2 \over {(W^2 - \sum_i w_i^2)}} {1\over W} \sum_i w_i (x_i - \bar{x})^2 \\ + &=& {W \over {(W^2 - \sum_i w_i^2)}} \sum_i w_i (x_i - \bar{x})^2 +\end{eqnarray} +% +And this is the formula used in GSL. +\subsection{Notes} +Note the following properties: + +\begin{itemize} +\item +The formula is invariant under rescaling of the weights. + +\item +For equal weights $w_i = w$ the factor reduces to $N/(N^2-N) = +1/(N-1)$, which is the familiar factor of the unbiased estimator of +the variance for data without weights. + +\item +When $\sum_i (w_i/W)^2 \ll 1$ the commonly-used weighted variance +formula $V = (1/W)\sum_i w_i (x_i - \bar{x})^2$ is a good +approximation. +\end{itemize} + +If we assume that the ``experimental errors'' arising from the weights +contribute, the underlying variance $\sigma^2$ is overestimated by +this formula (e.g. consider the case $\sigma = 0$---all the variation +will come from the Gaussian fluctuations represented by the +$w_i$). The appropriate expectation in this case is $\expectation{x_i + x_j} = \mu^2 + \delta_{ij} (\sigma^2 + 1/w_i)$ +\end{document} + diff --git a/software/gsl-1.15/doc/sum.texi b/software/gsl-1.15/doc/sum.texi new file mode 100644 index 000000000..77336a198 --- /dev/null +++ b/software/gsl-1.15/doc/sum.texi @@ -0,0 +1,188 @@ +@cindex acceleration of series +@cindex summation, acceleration +@cindex series, acceleration +@cindex u-transform for series +@cindex Levin u-transform +@cindex convergence, accelerating a series + +The functions described in this chapter accelerate the convergence of a +series using the Levin @math{u}-transform. This method takes a small number of +terms from the start of a series and uses a systematic approximation to +compute an extrapolated value and an estimate of its error. The +@math{u}-transform works for both convergent and divergent series, including +asymptotic series. + +These functions are declared in the header file @file{gsl_sum.h}. + +@menu +* Acceleration functions:: +* Acceleration functions without error estimation:: +* Example of accelerating a series:: +* Series Acceleration References:: +@end menu + +@node Acceleration functions +@section Acceleration functions + +The following functions compute the full Levin @math{u}-transform of a series +with its error estimate. The error estimate is computed by propagating +rounding errors from each term through to the final extrapolation. + +These functions are intended for summing analytic series where each term +is known to high accuracy, and the rounding errors are assumed to +originate from finite precision. They are taken to be relative errors of +order @code{GSL_DBL_EPSILON} for each term. + +The calculation of the error in the extrapolated value is an +@math{O(N^2)} process, which is expensive in time and memory. A faster +but less reliable method which estimates the error from the convergence +of the extrapolated value is described in the next section. For the +method described here a full table of intermediate values and +derivatives through to @math{O(N)} must be computed and stored, but this +does give a reliable error estimate. + +@deftypefun {gsl_sum_levin_u_workspace *} gsl_sum_levin_u_alloc (size_t @var{n}) +@tpindex gsl_sum_levin_u_workspace +This function allocates a workspace for a Levin @math{u}-transform of @var{n} +terms. The size of the workspace is @math{O(2n^2 + 3n)}. +@end deftypefun + +@deftypefun void gsl_sum_levin_u_free (gsl_sum_levin_u_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_sum_levin_u_accel (const double * @var{array}, size_t @var{array_size}, gsl_sum_levin_u_workspace * @var{w}, double * @var{sum_accel}, double * @var{abserr}) +This function takes the terms of a series in @var{array} of size +@var{array_size} and computes the extrapolated limit of the series using +a Levin @math{u}-transform. Additional working space must be provided in +@var{w}. The extrapolated sum is stored in @var{sum_accel}, with an +estimate of the absolute error stored in @var{abserr}. The actual +term-by-term sum is returned in @code{w->sum_plain}. The algorithm +calculates the truncation error (the difference between two successive +extrapolations) and round-off error (propagated from the individual +terms) to choose an optimal number of terms for the extrapolation. +All the terms of the series passed in through @var{array} should be non-zero. +@end deftypefun + + +@node Acceleration functions without error estimation +@section Acceleration functions without error estimation + +The functions described in this section compute the Levin @math{u}-transform of +series and attempt to estimate the error from the ``truncation error'' in +the extrapolation, the difference between the final two approximations. +Using this method avoids the need to compute an intermediate table of +derivatives because the error is estimated from the behavior of the +extrapolated value itself. Consequently this algorithm is an @math{O(N)} +process and only requires @math{O(N)} terms of storage. If the series +converges sufficiently fast then this procedure can be acceptable. It +is appropriate to use this method when there is a need to compute many +extrapolations of series with similar convergence properties at high-speed. +For example, when numerically integrating a function defined by a +parameterized series where the parameter varies only slightly. A +reliable error estimate should be computed first using the full +algorithm described above in order to verify the consistency of the +results. + +@deftypefun {gsl_sum_levin_utrunc_workspace *} gsl_sum_levin_utrunc_alloc (size_t @var{n}) +@tpindex gsl_sum_levin_utrunc_workspace +This function allocates a workspace for a Levin @math{u}-transform of @var{n} +terms, without error estimation. The size of the workspace is +@math{O(3n)}. +@end deftypefun + +@deftypefun void gsl_sum_levin_utrunc_free (gsl_sum_levin_utrunc_workspace * @var{w}) +This function frees the memory associated with the workspace @var{w}. +@end deftypefun + +@deftypefun int gsl_sum_levin_utrunc_accel (const double * @var{array}, size_t @var{array_size}, gsl_sum_levin_utrunc_workspace * @var{w}, double * @var{sum_accel}, double * @var{abserr_trunc}) +This function takes the terms of a series in @var{array} of size +@var{array_size} and computes the extrapolated limit of the series using +a Levin @math{u}-transform. Additional working space must be provided in +@var{w}. The extrapolated sum is stored in @var{sum_accel}. The actual +term-by-term sum is returned in @code{w->sum_plain}. The algorithm +terminates when the difference between two successive extrapolations +reaches a minimum or is sufficiently small. The difference between these +two values is used as estimate of the error and is stored in +@var{abserr_trunc}. To improve the reliability of the algorithm the +extrapolated values are replaced by moving averages when calculating the +truncation error, smoothing out any fluctuations. +@end deftypefun + + +@node Example of accelerating a series +@section Examples + +The following code calculates an estimate of @math{\zeta(2) = \pi^2 / 6} +using the series, +@tex +\beforedisplay +$$ +\zeta(2) = 1 + 1/2^2 + 1/3^2 + 1/4^2 + \dots +$$ +\afterdisplay +@end tex +@ifinfo + +@example +\zeta(2) = 1 + 1/2^2 + 1/3^2 + 1/4^2 + ... +@end example + +@end ifinfo +@noindent +After @var{N} terms the error in the sum is @math{O(1/N)}, making direct +summation of the series converge slowly. + +@example +@verbatiminclude examples/sum.c +@end example + +@noindent +The output below shows that the Levin @math{u}-transform is able to obtain an +estimate of the sum to 1 part in +@c{$10^{10}$} +@math{10^10} using the first eleven terms of the series. The +error estimate returned by the function is also accurate, giving +the correct number of significant digits. + +@example +$ ./a.out +@verbatiminclude examples/sum.out +@end example + +@noindent +Note that a direct summation of this series would require +@c{$10^{10}$} +@math{10^10} terms to achieve the same precision as the accelerated +sum does in 13 terms. + +@node Series Acceleration References +@section References and Further Reading + +The algorithms used by these functions are described in the following papers, + +@itemize @w{} +@item +T. Fessler, W.F. Ford, D.A. Smith, +@sc{hurry}: An acceleration algorithm for scalar sequences and series +@cite{ACM Transactions on Mathematical Software}, 9(3):346--354, 1983. +and Algorithm 602 9(3):355--357, 1983. +@end itemize + +@noindent +The theory of the @math{u}-transform was presented by Levin, + +@itemize @w{} +@item +D. Levin, +Development of Non-Linear Transformations for Improving Convergence of +Sequences, @cite{Intern.@: J.@: Computer Math.} B3:371--388, 1973. +@end itemize + +@noindent +A review paper on the Levin Transform is available online, +@itemize @w{} +@item +Herbert H. H. Homeier, Scalar Levin-Type Sequence Transformations, +@uref{http://arxiv.org/abs/math/0005209}. +@end itemize diff --git a/software/gsl-1.15/doc/texinfo.tex b/software/gsl-1.15/doc/texinfo.tex new file mode 100644 index 000000000..bac072602 --- /dev/null +++ b/software/gsl-1.15/doc/texinfo.tex @@ -0,0 +1,8997 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2008-04-18.10} +% +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008 Free Software Foundation, Inc. +% +% This texinfo.tex file is free software: you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. +% +% This texinfo.tex file is distributed in the hope that it will be +% useful, but WITHOUT ANY WARRANTY; without even the implied warranty +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see . +% +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. (This has been our intent since Texinfo was invented.) +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or +% ftp://tug.org/tex/texinfo.tex +% (and all CTAN mirrors, see http://www.ctan.org). +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexstar=\* +\let\ptext=\t +\let\ptextop=\top + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\undefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% For @cropmarks command. +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Main output routine. +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. Note that \pagecontents +% does insertions, but you have to call it yourself. +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + % + {% + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +\dimen@=\dp#1\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +% +% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% favourite TeX trick. --kasal, 16nov03 + +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Environment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + out of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +%% Simple single-character @ commands + +% @@ prints an @ +% Kludge this until the fonts are right (grr). +\def\@{{\tt\char64}} + +% This is turned off because it was never documented +% and you can use @w{...} around a quote to suppress ligatures. +%% Define @` and @' to be the same as ` and ' +%% but suppressing ligatures. +%\def\`{{`}} +%\def\'{{'}} + +% Used to generate quoted braces. +\def\mylbrace {{\tt\char123}} +\def\myrbrace {{\tt\char125}} +\let\{=\mylbrace +\let\}=\myrbrace +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \c +\let\dotaccent = \. +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \t +\let\ubaraccent = \b +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% + \kern-.15em + \TeX +} + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox + \prevdepth = \dimen1 + \checkinserts +} +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +% Old definition--didn't work. +%\parseargdef\need{\par % +%% This method tries to make TeX break the page naturally +%% if the depth of the box does not fit. +%{\baselineskip=0pt% +%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak +%\prevdepth=-1000pt +%}} + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} + +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\next\centerH + \else + \let\next\centerV + \fi + \next{\hfil \ignorespaces#1\unskip \hfil}% +} +\def\centerH#1{% + {% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break + }% +} +\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} + +% @sp n outputs n lines of vertical space + +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment + +\def\comment{\begingroup \catcode`\^^M=\other% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\commentxxx} +{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} + +\let\c=\comment + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent + \indent + }% + \gdef\noindent{% + \restorefirstparagraphindent + \noindent + }% + \global\everypar = {% + \kern -\parindent + \restorefirstparagraphindent + }% +} + +\gdef\restorefirstparagraphindent{% + \global \let \indent = \ptexindent + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} + + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a \ character. +% FYI, plain.tex uses \\ as a temporary control sequence (why?), but +% this is not advertised and we don't care. Texinfo does not +% otherwise define @\. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + } +} + +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @comma{} is so commas can be inserted into text without messing up +% Texinfo's parsing. +% +\let\comma = , + +% @refill is a no-op. +\let\refill=\relax + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate (before @setfilename). +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% @setfilename is done at the beginning of every texinfo file. +% So open here the files we need to have open while reading the input. +% This makes it possible to make a .fmt file for texinfo. +\def\setfilename{% + \fixbackslash % Turn off hack to swallow `\input texinfo'. + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi % \openindices needs to do some work in any case. + \openindices + \let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + \openin 1 texinfo.cnf + \ifeof 1 \else \input texinfo.cnf \fi + \closein 1 + % + \comment % Ignore the actual filename. +} + +% Called from \setfilename. +% +\def\openindices{% + \newindex{cp}% + \newcodeindex{fn}% + \newcodeindex{vr}% + \newcodeindex{tp}% + \newcodeindex{ky}% + \newcodeindex{pg}% +} + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as \undefined, +% borrowed from ifpdf.sty. +\ifx\pdfoutput\undefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html +% (and related messages, the final outcome is that it is up to the TeX +% user to double the backslashes and otherwise make the string valid, so +% that's what we do). + +% double active backslashes. +% +{\catcode`\@=0 \catcode`\\=\active + @gdef@activebackslashdouble{% + @catcode`@\=@active + @let\=@doublebackslash} +} + +% To handle parens, we must adopt a different approach, since parens are +% not active characters. hyperref.dtx (which has the same problem as +% us) handles it with this amazing macro to replace tokens, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. +% +% #1 is the tokens to replace. +% #2 is the replacement. +% #3 is the control sequence with the string. +% +\def\HyPsdSubst#1#2#3{% + \def\HyPsdReplace##1#1##2\END{% + ##1% + \ifx\\##2\\% + \else + #2% + \HyReturnAfterFi{% + \HyPsdReplace##2\END + }% + \fi + }% + \xdef#3{\expandafter\HyPsdReplace#3#1\END}% +} +\long\def\HyReturnAfterFi#1\fi{\fi#1} + +% #1 is a control sequence in which to do the replacements. +\def\backslashparens#1{% + \xdef#1{#1}% redefine it as its expansion; the definition is simply + % \lastnode when called from \setref -> \pdfmkdest. + \HyPsdSubst{(}{\realbackslash(}{#1}% + \HyPsdSubst{)}{\realbackslash)}{#1}% +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros based on pdfcolor.tex. + \def\cmykDarkRed{0.28 1 1 0.35} + \def\cmykBlack{0 0 0 1} + % + \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\cmykBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \imagewidth \fi + \ifdim \wd2 >0pt height \imageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \activebackslashdouble + \makevalueexpandable + \def\pdfdestname{#1}% + \backslashparens\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\cmykDarkRed} + \def\linkcolor{\cmykDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \def\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + % Doubled backslashes in the name. + {\activebackslashdouble \xdef\pdfoutlinedest{#3}% + \backslashparens\pdfoutlinedest}% + \fi + % + % Also double the backslashes in the display string. + {\activebackslashdouble \xdef\pdfoutlinetext{#1}% + \backslashparens\pdfoutlinetext}% + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Thanh's hack / proper braces in bookmarks + \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace + \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace + % + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % xx to do this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Right + % now, I guess we'll just let the pdf reader have its way. + \indexnofonts + \setupdatafile + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \ifx\p\space\else\addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \fi + \nextsp} + \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + + +\message{fonts,} + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} +\let\li = \sf % Sometimes we call it \li, not \sf. + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% Default leading. +\newdimen\textleading \textleading = 13.2pt + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\undefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named #2, adding on the +% specified font prefix (normally `cm'). +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% emacs-page end of cmaps + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\undefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} %where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +% reset the current fonts +\textfonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +% reduce space between paragraphs +\divide\parskip by 2 + +% reset the current fonts +\textfonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xword{10} +\def\xiword{11} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + \wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. Since +% texinfo doesn't allow for producing subscripts and superscripts except +% in the main text, we don't bother to reset \scriptfont and +% \scriptscriptfont (which would also require loading a lot more fonts). +% +\def\resetmathfonts{% + \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy + \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf + \textfont\ttfam=\tentt \textfont\sffam=\tensf +} + +% The font-changing commands redefine the meanings of \tenSTYLE, instead +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used in +% the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% +\def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% + \resetmathfonts \setleading{\textleading}} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{25pt}} +\def\titlefont#1{{\titlefonts\rm #1}} +\def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} +\def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{16pt}} +\def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallerfonts{% + \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl + \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc + \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy + \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% +% I wish the USA used A4 paper. +% --karl, 24jan03. + + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + +% Define these so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +%% Add scribe-like font environments, plus @l for inline lisp (usually sans +%% serif) and @ii for TeX italic + +% \smartitalic{ARG} outputs arg in italics, followed by an italic correction +% unless the following character is such as not to need one. +\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else + \ptexslash\fi\fi\fi} +\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} +\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} + +% like \smartslanted except unconditionally uses \ttsl. +% @var is set to this for defun arguments. +\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} + +% like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\var=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% @b, explicit bold. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} +\def\samp#1{`\tclose{#1}'\null} +\setfont\keyrm\rmshape{8}{1000}{OT1} +\font\keysy=cmsy9 +\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% + \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% + \vbox{\hrule\kern-0.4pt + \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% + \kern-0.4pt\hrule}% + \kern-.06em\raise0.4pt\hbox{\angleright}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} +% The old definition, with no lozenge: +%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @file, @option are the same as @samp. +\let\file=\samp +\let\option=\samp + +% @code is a modification of @t, +% which makes spaces the same size as normal in the surrounding text. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. + +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. +% -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + % + \global\def\code{\begingroup + \catcode\rquoteChar=\active \catcode\lquoteChar=\active + \let'\codequoteright \let`\codequoteleft + % + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\realdash + \let_\realunder + \fi + \codex + } +} + +\def\realdash{-} +\def\codedash{-\discretionary{}{}{}} +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} +\def\codex #1{\tclose{#1}\endgroup} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \fi\fi +} + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle option `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct.' +\kbdinputstyle distinct + +\def\xkey{\key} +\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% +\ifx\one\xkey\ifx\threex\three \key{#2}% +\else{\tclose{\kbdfont\look}}\fi +\else{\tclose{\kbdfont\look}}\fi} + +% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. +\let\indicateurl=\code +\let\env=\code +\let\command=\code + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + +% @uref (abbreviation for `urlref') takes an optional (comma-separated) +% second argument specifying the text to display and an optional third +% arg as text to display instead of (rather than in addition to) the url +% itself. First (mandatory) arg is the url. Perhaps eventually put in +% a hypertex \special here. +% +\def\uref#1{\douref #1,,,\finish} +\def\douref#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \code{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} + +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Hacks for glyphs from the EC fonts similar to \euro. We don't +% use \let for the aliases, because sometimes we redefine the original +% macro, and the alias should reflect the redefinition. +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +\def\ecfont{% + % We can't distinguish serif/sanserif and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\undefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +%%% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines + \let\tt=\authortt} + +\parseargdef\title{% + \checkenv\titlepage + \leftline{\titlefonts\rm #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\authorfont \leftline{#1}}% + \fi +} + + +%%% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\def\headings #1 {\csname HEADINGS#1\endcsname} + +\def\HEADINGSoff{% +\global\evenheadline={\hfil} \global\evenfootline={\hfil} +\global\oddheadline={\hfil} \global\oddfootline={\hfil}} +\HEADINGSoff +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\undefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + \def\itemcontents{#1}% + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a . + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group +% of an alignment entry. Note that \everycr resets \everytab. +\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we encounter the problem it was intended to solve again. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% + \global\colcount=0 % Reset the column counter. + % Check for saved footnotes, etc. + \checkinserts + % Keeps underfull box messages off when table breaks over pages. + %\filbreak + % Maybe so, but it also creates really weird page breaks when the + % table breaks over pages. Wouldn't \vfil be better? Wait until the + % problem manifests itself, so it can be fixed for real --karl. + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +%% Test to see if parskip is larger than space between lines of +%% table. If not, do nothing. +%% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller + %% than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller + %% than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\- = \active \catcode`\_ = \active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\realdash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get special treatment of `@end ifset,' call \makeond and the redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named foo. +% It automatically defines \fooindex such that +% \fooindex ...rest of line... puts an entry in the index foo. +% It also defines \fooindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is foo. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 % Open the file + \fi + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. + \expandafter \ifx\csname donesynindex#2\endcsname \undefined + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname + \expandafter\let\csname\donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all \fooindex macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it is "foo", the name of the index. + +% \doindex just uses \parsearg; it calls \doind for the actual work. +% This is because \doind is more useful to call from other macros. + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} +\def\singleindexer #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} +\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} + +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % + % Need these in case \tex is in effect and \{ is a \delimiter again. + % But can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. + \let\{ = \mylbrace + \let\} = \myrbrace + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control% words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\L + \definedummyword\OE + \definedummyword\O + \definedummyword\aa + \definedummyword\ae + \definedummyword\l + \definedummyword\oe + \definedummyword\o + \definedummyword\ss + \definedummyword\exclamdown + \definedummyword\questiondown + \definedummyword\ordf + \definedummyword\ordm + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\expansion + \definedummyword\minus + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable +} + +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sc + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\acronym + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % Hopefully, all control words can become @asis. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + % how to handle braces? + \def\_{\normalunderscore}% + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\aa{aa}% + \def\ae{ae}% + \def\l{l}% + \def\oe{oe}% + \def\o{o}% + \def\ss{ss}% + \def\exclamdown{!}% + \def\questiondown{?}% + \def\ordf{a}% + \def\ordm{o}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\registeredsymbol{R}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\expansion{==>}% + \def\minus{-}% + \def\pounds{pounds}% + \def\point{.}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\result{=>}% + \def\textdegree{degrees}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist +} + +\let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% Workhorse for all \fooindexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Write the entry in \toks0 to the index file: +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{% +\ifhmode + #1% +\else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi +} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 + \openin 1 \jobname.#1s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \else + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \temp + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\backslashcurfont}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns + \input \jobname.#1s + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +\def\initial#1{{% + % Some minor font changes for the special characters. + \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt + % + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + \nobreak + \vskip 0pt plus 3\baselineskip + \penalty 0 + \vskip 0pt plus -3\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip +}} + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +% A straightforward implementation would start like this: +% \def\entry#1#2{... +% But this freezes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % Do not fill out the last line with white space. + \parfillskip = 0in + % + % No extra space above this paragraph. + \parskip = 0in + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % \hangindent is only relevant when the entry text and page number + % don't both fit on one line. In that case, bob suggests starting the + % dots pretty far over on the line. Unfortunately, a large + % indentation looks wrong when the entry text itself is broken across + % lines. So we use a small indentation and put up with long leaders. + % + % \hangafter is reset to 1 (which is the value we want) at the start + % of each paragraph, so we need not do anything with that. + \hangindent = 2em + % + % When the entry text needs to be broken, just fill out the first line + % with blank space. + \rightskip = 0pt plus1fil + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus1pt + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. +} +\def\finishentry#1{% + % #1 is the page number. + % + % The following is kludged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % + \else + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ifpdf + \pdfgettoks#1.% + \ \the\toksA + \else + \ #1% + \fi + \fi + \par + \endgroup +} + +% Like plain.tex's \dotfill, except uses up at least 1 em. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + #2 + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 + +\newbox\partialpage +\newdimen\doublecolumnhsize + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + }% + \eject % run that output routine to set \partialpage + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) + \vsize = 2\vsize +} + +% The double-column output routine for all double-column pages except +% the last. +% +\def\doublecolumnout{% + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% +} +% +% All done with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). + \pagegoal = \vsize +} +% +% Called at the end of the double column material. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 % target to split to + %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht3>\dimen@ + \global\advance\dimen@ by 1pt + \repeat + }% + %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + % + \pagesofar +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achive this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unmlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unmlevel + \chardef\unmlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unmlevel + \def\headtype{U}% + \else + \chardef\unmlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + \message{\putwordChapter\space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + \def\appendixnum{\putwordAppendix\space \appendixletter}% + \message{\appendixnum}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + % Well, we could do the following in a group, but that would break + % an assumption that \chapmacro is called at the outermost level. + % Thus we are safer this way: --kasal, 24feb04 + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +% NOTE on use of \vbox for chapter headings, section headings, and such: +% 1) We use \vbox rather than the earlier \line to permit +% overlong headings to fold. +% 2) \hyphenpenalty is set to 10000 because hyphenation in a +% heading is obnoxious; this forbids it. +% 3) Likewise, headings look best if no \parindent is used, and +% if justification is not attempted. Hence \raggedright. + + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +%%% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +%%% Define plain chapter starts, and page on/off switching for it +% Parameter controlling skip before chapter headings (if needed) + +\newskip\chapheadingskip + +\def\chapbreak{\dobreak \chapheadingskip {-4000}} +\def\chappager{\par\vfill\supereject} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% + \hbox to 0pt{}% + \chappager + \endgroup + \fi +} + +\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yomitfromtockeyword{Yomitfromtoc} +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rm + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% +\def\unnchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\nobreak +} +\def\chfopen #1#2{\chapoddpage {\chapfonts +\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% +\par\penalty 5000 % +} +\def\centerchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt + \hfill {\rm #1}\hfill}}\bigskip \par\nobreak +} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rm + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) + \vskip-\parskip + % + % This is purely so the last item on the list is a known \penalty > + % 10000. This is so \startdefun can avoid allowing breakpoints after + % section headings. Otherwise, it would insert a valid breakpoint between: + % + % @section sec-whatever + % @deffn def-whatever + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} +% +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @tex ... @end tex escapes into raw Tex temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain tex @ character. + +\envdef\tex{% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \escapechar=`\\ + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\*=\ptexstar + \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % outer + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +\let\afterenvbreak = \aboveenvbreak + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing = t% + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of \def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\def\nonfillstart{% + \aboveenvbreak + \hfuzz = 12pt % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + \parindent = 0pt + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it by one command: +\def\makedispenv #1#2{ + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two synonyms: +\def\maketwodispenvs #1#2#3{ + \makedispenv{#1}{#3} + \makedispenv{#2}{#3} +} + +% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvs {lisp}{example}{% + \nonfillstart + \tt\quoteexpand + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenv {display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenv{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\envdef\quotation{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \advance\rightskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\undefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + + +% LaTeX-like @verbatim...@end verbatim and @verb{...} +% If we want to allow any as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% [Knuth] pp. 380,381,391 +% Disable Spanish ligatures ?` and !` of \tt font +\begingroup + \catcode`\`=\active\gdef`{\relax\lq} +\endgroup +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \catcode`\`=\active + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +\def\starttabbox{\setbox0=\hbox\bgroup} + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else \char'22 \fi + \else \char'22 \fi +} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen0=\wd0 % the width so far, or since the previous tab + \divide\dimen0 by\tabw + \multiply\dimen0 by\tabw % compute previous multiple of \tabw + \advance\dimen0 by\tabw % advance to next multiple of \tabw + \wd0=\dimen0 \box0 \starttabbox + }% + } + \catcode`\'=\active + \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% + % + \catcode`\`=\active + \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% + % + \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + % Easiest (and conventionally used) font for verbatim + \tt + \def\par{\leavevmode\egroup\box0\endgraf}% + \catcode`\`=\active + \tabexpand + \quoteexpand + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is very desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a minor refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remaining is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +%%% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +%%% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +%%% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +%%% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +%%% Type: +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % How we'll format the type name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % (plain.tex says that \dimen1 should be used only as global.) + \parshape 2 0in \dimen0 \defargsindent \dimen2 + % + % Put the type name to the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% return value type + \ifx\temp\empty\else \tclose{\temp} \fi + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. + \let\var=\ttslanted + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\undefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +\def\scanmacro#1{% + \begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % ... and \example + \spaceisspace + % + % Append \endinput to make sure that TeX does not see the ending newline. + % I've verified that it is necessary both for e-TeX and for ordinary TeX + % --kasal, 29nov03 + \scantokens{#1\endinput}% + \endgroup +} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% + \temp +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \. + +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. + +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. + +\def\scanctxt{% + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\@=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% + \scanctxt + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% + \scanctxt + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +\def\macroargctxt{% + \scanctxt + \catcode`\\=\other +} + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. + +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0% + \else + \expandafter\parsemargdef \argl;% + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\definedummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\definedummyword \noexpand#1% + \fi +} + +% This makes use of the obscure feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} + +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.blah for each blah +% in the params list, to be ##N where N is the position in that list. +% That gets used by \mbodybackslash (above). + +% We need to get `macro parameter char #' into several definitions. +% The technique used is stolen from LaTeX: let \hash be something +% unexpandable, insert that wherever you need a #, and then redefine +% it to # just before using the token list produced. +% +% The same technique is used to protect \eatspaces till just before +% the macro is used. + +\def\parsemargdef#1;{\paramno=0\def\paramlist{}% + \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1% + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +% These two commands read recursive and nonrecursive macro bodies. +% (They're different since rec and nonrec macros end differently.) + +\long\def\parsemacbody#1@end macro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\long\def\parsermacbody#1@end rmacro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% + +% This defines the macro itself. There are six cases: recursive and +% nonrecursive macros of zero, one, and many arguments. +% Much magic with \expandafter here. +% \xdef is used so that macro definitions will survive the file +% they're defined in; @include reads the file inside a group. +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\temp}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \fi + \else + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \fi + \fi} + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + +% \braceorline decides whether the next nonwhitespace character is a +% {. If so it reads up to the closing }, if not, it reads the whole +% line. Whatever was read is then fed to the next control sequence +% as an argument (by \parsebrace or \parsearg) +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Just make them active and then expand them all to nothing. +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + }% + \fi +} + +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} +\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} +\def\ref#1{\xrefX[#1,,,,,,,]} +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + \def\printedmanual{\ignorespaces #5}% + \def\printedrefname{\ignorespaces #3}% + \setbox1=\hbox{\printedmanual\unskip}% + \setbox0=\hbox{\printedrefname\unskip}% + \ifdim \wd0 = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax + % Use the node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Use the actual chapter/section title appear inside + % the square brackets. Use the real section title if we have it. + \ifdim \wd1 > 0pt + % It is in another manual, so we don't have it. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + {\indexnofonts + \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. + \getfilename{#4}% + % + % See comments at \activebackslashdouble. + {\activebackslashdouble \xdef\pdfxrefdest{#1}% + \backslashparens\pdfxrefdest}% + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% + \setcolor{\linkcolor}% + \fi + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd0 = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % if the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd1 > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not + % insert empty discretionaries after hyphens, which means that it will + % not find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, this + % is a loss. Therefore, we give the text of the node name again, so it + % is as if TeX is seeing it for the first time. + \ifdim \wd1 > 0pt + \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + \else + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via a macro so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi + \fi + \endlink +\endgroup} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% +\def\refx#1#2{% + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + \message{\linenumber Undefined cross reference `#1'.}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. +% +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. + {% + \count1=128 + \def\loop{% + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi + }% + }% + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. + +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\undefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing this stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \fi + % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. On the other hand, if + % it's at the top level, we don't want the normal paragraph indentation. + \noindent + % + % Output the image. + \ifpdf + \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \fi + % + \ifimagevmode \medskip \fi % space after the standalone image +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% @documentlanguage is usually given very early, just after +% @setfilename. If done too late, it may not override everything +% properly. Single argument is the language (de) or locale (de_DE) +% abbreviation. It would be nice if we could set up a hyphenation file. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else + \input txi-#1.tex + \fi + \closein 1 + \endgroup +\endgroup} +} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\def\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \input txi-#1.tex + \fi + \closein 1 +} +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? In the current directory +should work if nowhere else does.} + +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{~} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} + \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} + \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be so finicky about underfull hboxes, either. +\hbadness = 2000 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other +\catcode`\~=\other +\catcode`\^=\other +\catcode`\_=\other +\catcode`\|=\other +\catcode`\<=\other +\catcode`\>=\other +\catcode`\+=\other +\catcode`\$=\other +\def\normaldoublequote{"} +\def\normaltilde{~} +\def\normalcaret{^} +\def\normalunderscore{_} +\def\normalverticalbar{|} +\def\normalless{<} +\def\normalgreater{>} +\def\normalplus{+} +\def\normaldollar{$}%$ font-lock fix + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Turn off all special characters except @ +% (and those which the user can use as if they were ordinary). +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. + +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active +\def~{{\tt\char126}} +\chardef\hat=`\^ +\catcode`\^=\active +\def^{{\tt \hat}} + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ +% Subroutine for the previous macro. +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + +\catcode`\|=\active +\def|{{\tt\char124}} +\chardef \less=`\< +\catcode`\<=\active +\def<{{\tt \less}} +\chardef \gtr=`\> +\catcode`\>=\active +\def>{{\tt \gtr}} +\catcode`\+=\active +\def+{{\tt \char 43}} +\catcode`\$=\active +\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have \everyjob (or @setfilename) turn them on. +% \otherifyactive is called near the end of this file. +\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active +@def@normalbackslash{{@tt@backslashcurfont}} +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +@def@normalturnoffactive{% + @let\=@normalbackslash + @let"=@normaldoublequote + @let~=@normaltilde + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let<=@normalless + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix + @unsepspaces +} + +% Make _ and + \other characters, temporarily. +% This is canceled by @fixbackslash. +@otherifyactive + +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% +@gdef@eatinput input texinfo{@fixbackslash} +@global@let\ = @eatinput + +% On the other hand, perhaps the file did not have a `\input texinfo'. Then +% the first `\' in the file would cause an error. This macro tries to fix +% that, assuming it is called before the first `\' could plausibly occur. +% Also turn back on active characters that might appear in the input +% file name, in case not using a pre-dumped format. +% +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active + @catcode`@_=@active +} + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These look ok in all fonts, so just make them not special. +@catcode`@& = @other +@catcode`@# = @other +@catcode`@% = @other + + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/software/gsl-1.15/doc/usage.texi b/software/gsl-1.15/doc/usage.texi new file mode 100644 index 000000000..6fa498367 --- /dev/null +++ b/software/gsl-1.15/doc/usage.texi @@ -0,0 +1,525 @@ +@cindex standards conformance, ANSI C +@cindex ANSI C, use of +@cindex C extensions, compatible use of +@cindex compatibility +This chapter describes how to compile programs that use GSL, and +introduces its conventions. + +@menu +* An Example Program:: +* Compiling and Linking:: +* Shared Libraries:: +* ANSI C Compliance:: +* Inline functions:: +* Long double:: +* Portability functions:: +* Alternative optimized functions:: +* Support for different numeric types:: +* Compatibility with C++:: +* Aliasing of arrays:: +* Thread-safety:: +* Deprecated Functions:: +* Code Reuse:: +@end menu + +@node An Example Program +@section An Example Program + +The following short program demonstrates the use of the library by +computing the value of the Bessel function @math{J_0(x)} for @math{x=5}, + +@example +@verbatiminclude examples/intro.c +@end example + +@noindent +The output is shown below, and should be correct to double-precision +accuracy,@footnote{The last few digits may vary slightly depending on +the compiler and platform used---this is normal.} + +@example +@verbatiminclude examples/intro.out +@end example + +@noindent +The steps needed to compile this program are described +in the following sections. + +@node Compiling and Linking +@section Compiling and Linking +@cindex compiling programs, include paths +@cindex including GSL header files +@cindex header files, including +The library header files are installed in their own @file{gsl} +directory. You should write any preprocessor include statements with a +@file{gsl/} directory prefix thus, + +@example +#include +@end example + +@noindent +If the directory is not installed on the standard search path of your +compiler you will also need to provide its location to the preprocessor +as a command line flag. The default location of the @file{gsl} +directory is @file{/usr/local/include/gsl}. A typical compilation +command for a source file @file{example.c} with the GNU C compiler +@code{gcc} is, + +@example +$ gcc -Wall -I/usr/local/include -c example.c +@end example + +@noindent +This results in an object file @file{example.o}. The default +include path for @code{gcc} searches @file{/usr/local/include} automatically so +the @code{-I} option can actually be omitted when GSL is installed +in its default location. + +@menu +* Linking programs with the library:: +* Linking with an alternative BLAS library:: +@end menu + +@node Linking programs with the library +@subsection Linking programs with the library +@cindex compiling programs, library paths +@cindex linking with GSL libraries +@cindex libraries, linking with +The library is installed as a single file, @file{libgsl.a}. A shared +version of the library @file{libgsl.so} is also installed on systems +that support shared libraries. The default location of these files is +@file{/usr/local/lib}. If this directory is not on the standard search +path of your linker you will also need to provide its location as a +command line flag. + +To link against the library you need to specify +both the main library and a supporting @sc{cblas} library, which +provides standard basic linear algebra subroutines. A suitable +@sc{cblas} implementation is provided in the library +@file{libgslcblas.a} if your system does not provide one. The following +example shows how to link an application with the library, + +@example +$ gcc -L/usr/local/lib example.o -lgsl -lgslcblas -lm +@end example + +@noindent +The default library path for @code{gcc} searches @file{/usr/local/lib} +automatically so the @code{-L} option can be omitted when GSL is +installed in its default location. + +The option @code{-lm} links with the system math library. On some +systems it is not needed.@footnote{It is not needed on MacOS X.} + +For a tutorial introduction to the GNU C Compiler and related programs, +see @url{http://www.network-theory.co.uk/gcc/intro/,@cite{An Introduction +to GCC},@cite{An Introduction to GCC}} (ISBN 0954161793).@footnote{@url{http://www.network-theory.co.uk/gcc/intro/}} + +@node Linking with an alternative BLAS library +@subsection Linking with an alternative BLAS library + +The following command line shows how you would link the same application +with an alternative @sc{cblas} library @file{libcblas.a}, + +@example +$ gcc example.o -lgsl -lcblas -lm +@end example + +@noindent +For the best performance an optimized platform-specific @sc{cblas} +library should be used for @code{-lcblas}. The library must conform to +the @sc{cblas} standard. The @sc{atlas} package provides a portable +high-performance @sc{blas} library with a @sc{cblas} interface. It is +free software and should be installed for any work requiring fast vector +and matrix operations. The following command line will link with the +@sc{atlas} library and its @sc{cblas} interface, + +@example +$ gcc example.o -lgsl -lcblas -latlas -lm +@end example + +@noindent +If the @sc{atlas} library is installed in a non-standard directory use +the @code{-L} option to add it to the search path, as described above. + +For more information about @sc{blas} functions see @ref{BLAS Support}. + +@comment The program @code{gsl-config} provides information on the local version +@comment of the library. For example, the following command shows that the +@comment library has been installed under the directory @file{/usr/local}, + +@comment @example +@comment $ gsl-config --prefix +@comment /usr/local +@comment @end example +@comment @noindent +@comment Further information is available using the command @code{gsl-config --help}. + +@node Shared Libraries +@section Shared Libraries +@cindex shared libraries +@cindex libraries, shared +@cindex LD_LIBRARY_PATH +To run a program linked with the shared version of the library the +operating system must be able to locate the corresponding @file{.so} +file at runtime. If the library cannot be found, the following error +will occur: + +@example +$ ./a.out +./a.out: error while loading shared libraries: +libgsl.so.0: cannot open shared object file: No such +file or directory +@end example + +@noindent +To avoid this error, either modify the system dynamic linker +configuration@footnote{@file{/etc/ld.so.conf} on GNU/Linux systems.} or +define the shell variable @code{LD_LIBRARY_PATH} to include the +directory where the library is installed. + +For example, in the Bourne shell (@code{/bin/sh} or @code{/bin/bash}), +the library search path can be set with the following commands: + +@example +$ LD_LIBRARY_PATH=/usr/local/lib +$ export LD_LIBRARY_PATH +$ ./example +@end example + +@noindent +In the C-shell (@code{/bin/csh} or @code{/bin/tcsh}) the equivalent +command is, + +@example +% setenv LD_LIBRARY_PATH /usr/local/lib +@end example + +@noindent +The standard prompt for the C-shell in the example above is the percent +character @samp{%}, and should not be typed as part of the command. + +To save retyping these commands each session they can be placed in an +individual or system-wide login file. + +To compile a statically linked version of the program, use the +@code{-static} flag in @code{gcc}, + +@example +$ gcc -static example.o -lgsl -lgslcblas -lm +@end example + +@node ANSI C Compliance +@section ANSI C Compliance + +The library is written in ANSI C and is intended to conform to the ANSI +C standard (C89). It should be portable to any system with a working +ANSI C compiler. + +The library does not rely on any non-ANSI extensions in the interface it +exports to the user. Programs you write using GSL can be ANSI +compliant. Extensions which can be used in a way compatible with pure +ANSI C are supported, however, via conditional compilation. This allows +the library to take advantage of compiler extensions on those platforms +which support them. + +When an ANSI C feature is known to be broken on a particular system the +library will exclude any related functions at compile-time. This should +make it impossible to link a program that would use these functions and +give incorrect results. + +To avoid namespace conflicts all exported function names and variables +have the prefix @code{gsl_}, while exported macros have the prefix +@code{GSL_}. + +@node Inline functions +@section Inline functions +@vrindex @code{HAVE_INLINE} +@vrindex @code{GSL_C99_INLINE} +@cindex inline functions +@cindex HAVE_INLINE +@cindex GSL_C99_INLINE +@cindex C99, inline keyword +@cindex @code{extern inline} +The @code{inline} keyword is not part of the original ANSI C standard +(C89) so the library does not export any inline function definitions +by default. Inline functions were introduced officially in the newer +C99 standard but most C89 compilers have also included @code{inline} as +an extension for a long time. + +To allow the use of inline functions, the library provides optional +inline versions of performance-critical routines by conditional +compilation in the exported header files. The inline versions of these +functions can be included by defining the macro @code{HAVE_INLINE} +when compiling an application, + +@example +$ gcc -Wall -c -DHAVE_INLINE example.c +@end example + +@noindent +If you use @code{autoconf} this macro can be defined automatically. If +you do not define the macro @code{HAVE_INLINE} then the slower +non-inlined versions of the functions will be used instead. + +By default, the actual form of the inline keyword is @code{extern +inline}, which is a @code{gcc} extension that eliminates unnecessary +function definitions. If the form @code{extern inline} causes +problems with other compilers a stricter autoconf test can be used, +see @ref{Autoconf Macros}. + +When compiling with @code{gcc} in C99 mode (@code{gcc -std=c99}) the +header files automatically switch to C99-compatible inline function +declarations instead of @code{extern inline}. With other C99 +compilers, define the macro @code{GSL_C99_INLINE} to use these +declarations. + +@node Long double +@section Long double +@cindex long double +In general, the algorithms in the library are written for double +precision only. The @code{long double} type is not supported for +actual computation. + +One reason for this choice is that the precision of @code{long double} +is platform dependent. The IEEE standard only specifies the minimum +precision of extended precision numbers, while the precision of +@code{double} is the same on all platforms. + +However, it is sometimes necessary to interact with external data in +long-double format, so the vector and matrix datatypes include +long-double versions. + +It should be noted that in some system libraries the @code{stdio.h} +formatted input/output functions @code{printf} and @code{scanf} are +not implemented correctly for @code{long double}. Undefined or +incorrect results are avoided by testing these functions during the +@code{configure} stage of library compilation and eliminating certain +GSL functions which depend on them if necessary. The corresponding +line in the @code{configure} output looks like this, + +@example +checking whether printf works with long double... no +@end example + +@noindent +Consequently when @code{long double} formatted input/output does not +work on a given system it should be impossible to link a program which +uses GSL functions dependent on this. + +If it is necessary to work on a system which does not support formatted +@code{long double} input/output then the options are to use binary +formats or to convert @code{long double} results into @code{double} for +reading and writing. + +@node Portability functions +@section Portability functions + +To help in writing portable applications GSL provides some +implementations of functions that are found in other libraries, such as +the BSD math library. You can write your application to use the native +versions of these functions, and substitute the GSL versions via a +preprocessor macro if they are unavailable on another platform. + +For example, after determining whether the BSD function @code{hypot} is +available you can include the following macro definitions in a file +@file{config.h} with your application, + +@example +/* Substitute gsl_hypot for missing system hypot */ + +#ifndef HAVE_HYPOT +#define hypot gsl_hypot +#endif +@end example + +@noindent +The application source files can then use the include command +@code{#include } to replace each occurrence of @code{hypot} by +@code{gsl_hypot} when @code{hypot} is not available. This substitution +can be made automatically if you use @code{autoconf}, see @ref{Autoconf +Macros}. + +In most circumstances the best strategy is to use the native versions of +these functions when available, and fall back to GSL versions otherwise, +since this allows your application to take advantage of any +platform-specific optimizations in the system library. This is the +strategy used within GSL itself. + +@node Alternative optimized functions +@section Alternative optimized functions + +@cindex alternative optimized functions +@cindex optimized functions, alternatives +The main implementation of some functions in the library will not be +optimal on all architectures. For example, there are several ways to +compute a Gaussian random variate and their relative speeds are +platform-dependent. In cases like this the library provides alternative +implementations of these functions with the same interface. If you +write your application using calls to the standard implementation you +can select an alternative version later via a preprocessor definition. +It is also possible to introduce your own optimized functions this way +while retaining portability. The following lines demonstrate the use of +a platform-dependent choice of methods for sampling from the Gaussian +distribution, + +@example +#ifdef SPARC +#define gsl_ran_gaussian gsl_ran_gaussian_ratio_method +#endif +#ifdef INTEL +#define gsl_ran_gaussian my_gaussian +#endif +@end example + +@noindent +These lines would be placed in the configuration header file +@file{config.h} of the application, which should then be included by all +the source files. Note that the alternative implementations will not +produce bit-for-bit identical results, and in the case of random number +distributions will produce an entirely different stream of random +variates. + +@node Support for different numeric types +@section Support for different numeric types + +Many functions in the library are defined for different numeric types. +This feature is implemented by varying the name of the function with a +type-related modifier---a primitive form of C++ templates. The +modifier is inserted into the function name after the initial module +prefix. The following table shows the function names defined for all +the numeric types of an imaginary module @code{gsl_foo} with function +@code{fn}, + +@example +gsl_foo_fn double +gsl_foo_long_double_fn long double +gsl_foo_float_fn float +gsl_foo_long_fn long +gsl_foo_ulong_fn unsigned long +gsl_foo_int_fn int +gsl_foo_uint_fn unsigned int +gsl_foo_short_fn short +gsl_foo_ushort_fn unsigned short +gsl_foo_char_fn char +gsl_foo_uchar_fn unsigned char +@end example + +@noindent +The normal numeric precision @code{double} is considered the default and +does not require a suffix. For example, the function +@code{gsl_stats_mean} computes the mean of double precision numbers, +while the function @code{gsl_stats_int_mean} computes the mean of +integers. + +A corresponding scheme is used for library defined types, such as +@code{gsl_vector} and @code{gsl_matrix}. In this case the modifier is +appended to the type name. For example, if a module defines a new +type-dependent struct or typedef @code{gsl_foo} it is modified for other +types in the following way, + +@example +gsl_foo double +gsl_foo_long_double long double +gsl_foo_float float +gsl_foo_long long +gsl_foo_ulong unsigned long +gsl_foo_int int +gsl_foo_uint unsigned int +gsl_foo_short short +gsl_foo_ushort unsigned short +gsl_foo_char char +gsl_foo_uchar unsigned char +@end example + +@noindent +When a module contains type-dependent definitions the library provides +individual header files for each type. The filenames are modified as +shown in the below. For convenience the default header includes the +definitions for all the types. To include only the double precision +header file, or any other specific type, use its individual filename. + +@example +#include All types +#include double +#include long double +#include float +#include long +#include unsigned long +#include int +#include unsigned int +#include short +#include unsigned short +#include char +#include unsigned char +@end example + +@node Compatibility with C++ +@section Compatibility with C++ +@cindex C++, compatibility +@cindex exceptions, C++ +The library header files automatically define functions to have +@code{extern "C"} linkage when included in C++ programs. This allows +the functions to be called directly from C++. + +To use C++ exception handling within user-defined functions passed to +the library as parameters, the library must be built with the +additional @code{CFLAGS} compilation option @option{-fexceptions}. + +@node Aliasing of arrays +@section Aliasing of arrays +@cindex aliasing of arrays +The library assumes that arrays, vectors and matrices passed as +modifiable arguments are not aliased and do not overlap with each other. +This removes the need for the library to handle overlapping memory +regions as a special case, and allows additional optimizations to be +used. If overlapping memory regions are passed as modifiable arguments +then the results of such functions will be undefined. If the arguments +will not be modified (for example, if a function prototype declares them +as @code{const} arguments) then overlapping or aliased memory regions +can be safely used. + +@node Thread-safety +@section Thread-safety + +The library can be used in multi-threaded programs. All the functions +are thread-safe, in the sense that they do not use static variables. +Memory is always associated with objects and not with functions. For +functions which use @dfn{workspace} objects as temporary storage the +workspaces should be allocated on a per-thread basis. For functions +which use @dfn{table} objects as read-only memory the tables can be used +by multiple threads simultaneously. Table arguments are always declared +@code{const} in function prototypes, to indicate that they may be +safely accessed by different threads. + +There are a small number of static global variables which are used to +control the overall behavior of the library (e.g. whether to use +range-checking, the function to call on fatal error, etc). These +variables are set directly by the user, so they should be initialized +once at program startup and not modified by different threads. + +@node Deprecated Functions +@section Deprecated Functions +@cindex deprecated functions + +From time to time, it may be necessary for the definitions of some +functions to be altered or removed from the library. In these +circumstances the functions will first be declared @dfn{deprecated} and +then removed from subsequent versions of the library. Functions that +are deprecated can be disabled in the current release by setting the +preprocessor definition @code{GSL_DISABLE_DEPRECATED}. This allows +existing code to be tested for forwards compatibility. + +@node Code Reuse +@section Code Reuse +@cindex code reuse in applications +@cindex source code, reuse in applications +Where possible the routines in the library have been written to avoid +dependencies between modules and files. This should make it possible to +extract individual functions for use in your own applications, without +needing to have the whole library installed. You may need to define +certain macros such as @code{GSL_ERROR} and remove some @code{#include} +statements in order to compile the files as standalone units. Reuse of +the library code in this way is encouraged, subject to the terms of the +GNU General Public License. diff --git a/software/gsl-1.15/doc/vdp.eps b/software/gsl-1.15/doc/vdp.eps new file mode 100644 index 000000000..2e7924636 --- /dev/null +++ b/software/gsl-1.15/doc/vdp.eps @@ -0,0 +1,1082 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: vdp.eps +%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347 +%%CreationDate: Mon Jun 11 17:56:56 2001 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 410 302 +%%Orientation: Portrait +%%EndComments +/gnudict 120 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke gnulinewidth 2 mul setlinewidth } def +/AL { stroke gnulinewidth 2 div setlinewidth } def +/UL { gnulinewidth mul /userlinewidth exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +end +%%EndProlog +gnudict begin +gsave +50 50 translate +0.050 0.050 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +336 739 M +63 0 V +6633 0 R +-63 0 V +252 739 M +(-4) Rshow +336 1658 M +63 0 V +6633 0 R +-63 0 V +-6717 0 R +(-2) Rshow +336 2576 M +63 0 V +6633 0 R +-63 0 V +-6717 0 R +(0) Rshow +336 3494 M +63 0 V +6633 0 R +-63 0 V +-6717 0 R +(2) Rshow +336 4413 M +63 0 V +6633 0 R +-63 0 V +-6717 0 R +(4) Rshow +336 280 M +0 63 V +0 4529 R +0 -63 V +336 140 M +(0) Cshow +1006 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(10) Cshow +1675 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(20) Cshow +2345 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(30) Cshow +3014 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(40) Cshow +3684 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(50) Cshow +4354 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(60) Cshow +5023 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(70) Cshow +5693 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(80) Cshow +6362 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(90) Cshow +7032 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +(100) Cshow +1.000 UL +LTb +336 280 M +6696 0 V +0 4592 V +-6696 0 V +336 280 L +1.000 UP +1.000 UL +LT0 +336 3035 Pls +336 3035 Pls +336 3035 Pls +336 3035 Pls +336 3035 Pls +336 3035 Pls +337 3035 Pls +343 3033 Pls +361 3002 Pls +371 2964 Pls +379 2914 Pls +385 2845 Pls +390 2743 Pls +393 2642 Pls +396 2508 Pls +399 2310 Pls +400 2140 Pls +402 1961 Pls +404 1832 Pls +406 1746 Pls +407 1698 Pls +409 1672 Pls +411 1660 Pls +413 1655 Pls +415 1654 Pls +418 1654 Pls +420 1655 Pls +424 1656 Pls +427 1658 Pls +432 1660 Pls +437 1662 Pls +444 1665 Pls +452 1669 Pls +463 1674 Pls +473 1679 Pls +483 1684 Pls +494 1689 Pls +504 1694 Pls +515 1699 Pls +525 1705 Pls +536 1710 Pls +546 1715 Pls +557 1721 Pls +568 1726 Pls +578 1732 Pls +589 1738 Pls +600 1744 Pls +611 1750 Pls +623 1756 Pls +634 1762 Pls +645 1769 Pls +657 1775 Pls +668 1782 Pls +680 1789 Pls +692 1796 Pls +704 1804 Pls +716 1811 Pls +728 1819 Pls +740 1827 Pls +753 1836 Pls +766 1845 Pls +779 1854 Pls +792 1864 Pls +805 1874 Pls +819 1885 Pls +833 1896 Pls +847 1908 Pls +862 1922 Pls +877 1936 Pls +892 1952 Pls +908 1969 Pls +925 1990 Pls +943 2015 Pls +962 2047 Pls +984 2095 Pls +998 2143 Pls +1007 2191 Pls +1014 2250 Pls +1020 2333 Pls +1024 2429 Pls +1027 2541 Pls +1029 2691 Pls +1032 2903 Pls +1034 3077 Pls +1036 3242 Pls +1037 3365 Pls +1039 3431 Pls +1041 3468 Pls +1042 3488 Pls +1044 3497 Pls +1046 3500 Pls +1049 3501 Pls +1051 3500 Pls +1054 3499 Pls +1057 3498 Pls +1061 3496 Pls +1066 3494 Pls +1072 3492 Pls +1079 3488 Pls +1089 3484 Pls +1099 3479 Pls +1109 3474 Pls +1119 3469 Pls +1130 3464 Pls +1140 3459 Pls +1150 3454 Pls +1161 3449 Pls +1171 3444 Pls +1182 3438 Pls +1193 3433 Pls +1203 3427 Pls +1214 3422 Pls +1225 3416 Pls +1236 3410 Pls +1247 3404 Pls +1258 3398 Pls +1269 3392 Pls +1281 3385 Pls +1292 3379 Pls +1304 3372 Pls +1315 3365 Pls +1327 3358 Pls +1339 3350 Pls +1351 3343 Pls +1363 3335 Pls +1376 3327 Pls +1388 3318 Pls +1401 3310 Pls +1414 3301 Pls +1427 3291 Pls +1440 3281 Pls +1454 3270 Pls +1468 3259 Pls +1482 3247 Pls +1496 3234 Pls +1511 3220 Pls +1526 3205 Pls +1542 3188 Pls +1559 3168 Pls +1576 3145 Pls +1595 3115 Pls +1616 3073 Pls +1634 3020 Pls +1643 2974 Pls +1651 2919 Pls +1657 2845 Pls +1662 2744 Pls +1665 2639 Pls +1667 2501 Pls +1670 2301 Pls +1672 2129 Pls +1674 1952 Pls +1675 1825 Pls +1677 1741 Pls +1679 1694 Pls +1681 1669 Pls +1682 1657 Pls +1684 1653 Pls +1687 1651 Pls +1689 1651 Pls +1692 1652 Pls +1695 1654 Pls +1699 1655 Pls +1703 1657 Pls +1708 1660 Pls +1715 1663 Pls +1724 1667 Pls +1734 1671 Pls +1744 1676 Pls +1755 1681 Pls +1765 1686 Pls +1775 1691 Pls +1786 1696 Pls +1796 1701 Pls +1807 1707 Pls +1817 1712 Pls +1828 1717 Pls +1838 1723 Pls +1849 1728 Pls +1860 1734 Pls +1871 1740 Pls +1882 1746 Pls +1893 1752 Pls +1904 1758 Pls +1916 1765 Pls +1927 1771 Pls +1938 1778 Pls +1950 1785 Pls +1962 1792 Pls +1974 1799 Pls +1986 1807 Pls +1998 1814 Pls +2010 1822 Pls +2023 1831 Pls +2035 1839 Pls +2048 1848 Pls +2061 1858 Pls +2074 1868 Pls +2088 1878 Pls +2101 1889 Pls +2116 1901 Pls +2130 1913 Pls +2145 1927 Pls +2160 1942 Pls +2176 1958 Pls +2192 1977 Pls +2209 1999 Pls +2227 2026 Pls +2247 2062 Pls +2270 2122 Pls +2279 2164 Pls +2288 2216 Pls +2294 2283 Pls +2301 2415 Pls +2304 2516 Pls +2306 2656 Pls +2309 2858 Pls +2311 3029 Pls +2313 3205 Pls +2314 3331 Pls +2316 3414 Pls +2318 3460 Pls +2319 3484 Pls +2321 3495 Pls +2323 3500 Pls +2325 3501 Pls +2328 3501 Pls +2331 3500 Pls +2334 3498 Pls +2338 3497 Pls +2342 3495 Pls +2347 3492 Pls +2354 3489 Pls +2363 3485 Pls +2373 3480 Pls +2383 3476 Pls +2394 3471 Pls +2404 3466 Pls +2414 3461 Pls +2425 3456 Pls +2435 3451 Pls +2446 3445 Pls +2456 3440 Pls +2467 3435 Pls +2477 3429 Pls +2488 3423 Pls +2499 3418 Pls +2510 3412 Pls +2521 3406 Pls +2532 3400 Pls +2543 3394 Pls +2555 3387 Pls +2566 3381 Pls +2577 3374 Pls +2589 3367 Pls +2601 3360 Pls +2613 3353 Pls +2625 3345 Pls +2637 3337 Pls +2649 3329 Pls +2662 3321 Pls +2674 3312 Pls +2687 3303 Pls +2700 3294 Pls +2713 3284 Pls +2727 3274 Pls +2741 3263 Pls +2755 3251 Pls +2769 3238 Pls +2784 3225 Pls +2799 3210 Pls +2815 3194 Pls +2831 3175 Pls +2848 3153 Pls +2867 3126 Pls +2887 3089 Pls +2909 3027 Pls +2919 2987 Pls +2927 2934 Pls +2933 2866 Pls +2940 2732 Pls +2942 2630 Pls +2945 2488 Pls +2948 2283 Pls +2950 2111 Pls +2951 1938 Pls +2953 1801 Pls +2955 1730 Pls +2957 1689 Pls +2958 1666 Pls +2960 1656 Pls +2962 1652 Pls +2965 1651 Pls +2967 1651 Pls +2970 1652 Pls +2973 1654 Pls +2977 1656 Pls +2982 1658 Pls +2987 1660 Pls +2994 1663 Pls +3004 1668 Pls +3014 1672 Pls +3024 1677 Pls +3034 1682 Pls +3044 1687 Pls +3055 1692 Pls +3065 1697 Pls +3075 1702 Pls +3086 1708 Pls +3096 1713 Pls +3107 1718 Pls +3118 1724 Pls +3129 1729 Pls +3139 1735 Pls +3150 1741 Pls +3161 1747 Pls +3173 1753 Pls +3184 1759 Pls +3195 1766 Pls +3206 1772 Pls +3218 1779 Pls +3230 1786 Pls +3241 1793 Pls +3253 1800 Pls +3265 1808 Pls +3277 1816 Pls +3290 1824 Pls +3302 1832 Pls +3315 1841 Pls +3328 1850 Pls +3341 1859 Pls +3354 1869 Pls +3368 1880 Pls +3381 1891 Pls +3396 1903 Pls +3410 1916 Pls +3425 1929 Pls +3440 1944 Pls +3456 1961 Pls +3472 1980 Pls +3490 2003 Pls +3508 2031 Pls +3529 2070 Pls +3548 2125 Pls +3558 2169 Pls +3566 2222 Pls +3572 2292 Pls +3578 2406 Pls +3581 2506 Pls +3583 2642 Pls +3586 2840 Pls +3588 3011 Pls +3590 3191 Pls +3592 3320 Pls +3593 3407 Pls +3595 3456 Pls +3597 3482 Pls +3599 3494 Pls +3600 3499 Pls +3603 3501 Pls +3605 3501 Pls +3608 3500 Pls +3611 3499 Pls +3615 3497 Pls +3619 3495 Pls +3624 3493 Pls +3630 3490 Pls +3639 3486 Pls +3649 3481 Pls +3660 3476 Pls +3670 3471 Pls +3681 3466 Pls +3691 3461 Pls +3702 3456 Pls +3712 3451 Pls +3723 3445 Pls +3733 3440 Pls +3744 3435 Pls +3755 3429 Pls +3765 3424 Pls +3776 3418 Pls +3787 3412 Pls +3798 3406 Pls +3809 3400 Pls +3821 3394 Pls +3832 3387 Pls +3843 3381 Pls +3855 3374 Pls +3866 3367 Pls +3878 3360 Pls +3890 3353 Pls +3902 3345 Pls +3914 3338 Pls +3926 3330 Pls +3939 3321 Pls +3951 3313 Pls +3964 3304 Pls +3977 3294 Pls +3991 3284 Pls +4004 3274 Pls +4018 3263 Pls +4032 3251 Pls +4046 3239 Pls +4061 3225 Pls +4076 3210 Pls +4092 3194 Pls +4108 3175 Pls +4125 3153 Pls +4144 3126 Pls +4164 3090 Pls +4186 3029 Pls +4196 2988 Pls +4204 2936 Pls +4210 2869 Pls +4217 2736 Pls +4220 2635 Pls +4222 2495 Pls +4225 2292 Pls +4227 2121 Pls +4229 1945 Pls +4231 1820 Pls +4232 1738 Pls +4234 1692 Pls +4236 1667 Pls +4238 1657 Pls +4240 1652 Pls +4242 1651 Pls +4244 1651 Pls +4247 1652 Pls +4250 1654 Pls +4254 1655 Pls +4258 1657 Pls +4264 1660 Pls +4270 1663 Pls +4279 1667 Pls +4290 1672 Pls +4300 1677 Pls +4310 1681 Pls +4320 1686 Pls +4331 1691 Pls +4341 1696 Pls +4351 1702 Pls +4362 1707 Pls +4373 1712 Pls +4383 1718 Pls +4394 1723 Pls +4405 1729 Pls +4415 1734 Pls +4426 1740 Pls +4437 1746 Pls +4448 1752 Pls +4460 1758 Pls +4471 1765 Pls +4482 1771 Pls +4494 1778 Pls +4506 1785 Pls +4517 1792 Pls +4529 1799 Pls +4541 1807 Pls +4553 1815 Pls +4566 1823 Pls +4578 1831 Pls +4591 1840 Pls +4604 1849 Pls +4617 1858 Pls +4630 1868 Pls +4643 1878 Pls +4657 1889 Pls +4671 1901 Pls +4685 1914 Pls +4700 1927 Pls +4715 1942 Pls +4731 1959 Pls +4748 1978 Pls +4765 2000 Pls +4783 2027 Pls +4803 2064 Pls +4826 2126 Pls +4835 2166 Pls +4843 2220 Pls +4849 2288 Pls +4856 2423 Pls +4859 2526 Pls +4861 2669 Pls +4864 2875 Pls +4866 3048 Pls +4868 3219 Pls +4870 3351 Pls +4871 3422 Pls +4873 3463 Pls +4875 3487 Pls +4877 3496 Pls +4879 3500 Pls +4881 3501 Pls +4883 3501 Pls +4886 3500 Pls +4890 3498 Pls +4893 3496 Pls +4898 3494 Pls +4903 3492 Pls +4910 3489 Pls +4920 3484 Pls +4930 3479 Pls +4940 3475 Pls +4950 3470 Pls +4961 3465 Pls +4971 3460 Pls +4981 3455 Pls +4992 3450 Pls +5002 3444 Pls +5013 3439 Pls +5024 3434 Pls +5034 3428 Pls +5045 3423 Pls +5056 3417 Pls +5067 3411 Pls +5078 3405 Pls +5089 3399 Pls +5100 3393 Pls +5111 3386 Pls +5123 3380 Pls +5134 3373 Pls +5146 3366 Pls +5158 3359 Pls +5170 3352 Pls +5182 3344 Pls +5194 3336 Pls +5206 3328 Pls +5219 3320 Pls +5231 3311 Pls +5244 3302 Pls +5257 3292 Pls +5271 3282 Pls +5284 3272 Pls +5298 3261 Pls +5312 3249 Pls +5326 3236 Pls +5341 3223 Pls +5357 3207 Pls +5372 3191 Pls +5389 3171 Pls +5406 3149 Pls +5425 3120 Pls +5445 3081 Pls +5464 3027 Pls +5474 2982 Pls +5482 2929 Pls +5488 2859 Pls +5494 2747 Pls +5497 2647 Pls +5500 2511 Pls +5502 2313 Pls +5504 2142 Pls +5506 1962 Pls +5508 1833 Pls +5509 1746 Pls +5511 1697 Pls +5513 1670 Pls +5515 1658 Pls +5517 1653 Pls +5519 1651 Pls +5521 1651 Pls +5524 1652 Pls +5527 1653 Pls +5531 1655 Pls +5535 1657 Pls +5540 1659 Pls +5547 1662 Pls +5555 1666 Pls +5566 1671 Pls +5576 1676 Pls +5587 1681 Pls +5597 1686 Pls +5608 1691 Pls +5618 1696 Pls +5629 1701 Pls +5639 1707 Pls +5650 1712 Pls +5660 1717 Pls +5671 1723 Pls +5682 1728 Pls +5693 1734 Pls +5704 1740 Pls +5715 1746 Pls +5726 1752 Pls +5737 1758 Pls +5748 1765 Pls +5760 1771 Pls +5771 1778 Pls +5783 1785 Pls +5794 1792 Pls +5806 1799 Pls +5818 1807 Pls +5830 1814 Pls +5843 1822 Pls +5855 1831 Pls +5868 1839 Pls +5881 1848 Pls +5894 1858 Pls +5907 1868 Pls +5920 1878 Pls +5934 1889 Pls +5948 1901 Pls +5963 1913 Pls +5977 1927 Pls +5993 1942 Pls +6008 1958 Pls +6025 1977 Pls +6042 1999 Pls +6060 2026 Pls +6080 2063 Pls +6103 2124 Pls +6112 2164 Pls +6120 2217 Pls +6127 2284 Pls +6133 2418 Pls +6136 2519 Pls +6139 2660 Pls +6141 2863 Pls +6143 3035 Pls +6145 3210 Pls +6147 3335 Pls +6148 3416 Pls +6150 3461 Pls +6152 3485 Pls +6154 3496 Pls +6156 3500 Pls +6158 3501 Pls +6161 3501 Pls +6163 3500 Pls +6167 3498 Pls +6170 3497 Pls +6175 3495 Pls +6180 3492 Pls +6187 3489 Pls +6196 3485 Pls +6206 3480 Pls +6217 3475 Pls +6227 3470 Pls +6237 3465 Pls +6247 3460 Pls +6258 3455 Pls +6268 3450 Pls +6279 3445 Pls +6289 3440 Pls +6300 3434 Pls +6310 3429 Pls +6321 3423 Pls +6332 3417 Pls +6343 3412 Pls +6354 3406 Pls +6365 3400 Pls +6376 3393 Pls +6388 3387 Pls +6399 3380 Pls +6411 3374 Pls +6422 3367 Pls +6434 3360 Pls +6446 3352 Pls +6458 3345 Pls +6470 3337 Pls +6482 3329 Pls +6495 3321 Pls +6507 3312 Pls +6520 3303 Pls +6533 3294 Pls +6547 3284 Pls +6560 3273 Pls +6574 3262 Pls +6588 3250 Pls +6602 3238 Pls +6617 3224 Pls +6632 3209 Pls +6648 3193 Pls +6664 3174 Pls +6682 3152 Pls +6700 3124 Pls +6720 3086 Pls +6743 3023 Pls +6752 2983 Pls +6760 2928 Pls +6766 2859 Pls +6772 2747 Pls +6775 2647 Pls +6777 2511 Pls +6780 2313 Pls +6782 2142 Pls +6784 1962 Pls +6785 1833 Pls +6787 1746 Pls +6789 1697 Pls +6790 1670 Pls +6792 1658 Pls +6794 1653 Pls +6796 1651 Pls +6799 1651 Pls +6801 1652 Pls +6805 1653 Pls +6808 1655 Pls +6812 1657 Pls +6818 1659 Pls +6824 1662 Pls +6833 1666 Pls +6843 1671 Pls +6854 1676 Pls +6864 1681 Pls +6875 1686 Pls +6885 1691 Pls +6896 1696 Pls +6906 1701 Pls +6917 1707 Pls +6927 1712 Pls +6938 1717 Pls +6949 1723 Pls +6959 1728 Pls +6970 1734 Pls +6981 1740 Pls +6992 1746 Pls +7003 1752 Pls +7014 1758 Pls +7026 1765 Pls +7032 1768 Pls +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica diff --git a/software/gsl-1.15/doc/vectors.texi b/software/gsl-1.15/doc/vectors.texi new file mode 100644 index 000000000..d2384f631 --- /dev/null +++ b/software/gsl-1.15/doc/vectors.texi @@ -0,0 +1,1701 @@ +@cindex blocks +@cindex vectors +@cindex matrices + +The functions described in this chapter provide a simple vector and +matrix interface to ordinary C arrays. The memory management of these +arrays is implemented using a single underlying type, known as a +block. By writing your functions in terms of vectors and matrices you +can pass a single structure containing both data and dimensions as an +argument without needing additional function parameters. The structures +are compatible with the vector and matrix formats used by @sc{blas} +routines. + +@menu +* Data types:: +* Blocks:: +* Vectors:: +* Matrices:: +* Vector and Matrix References and Further Reading:: +@end menu + +@node Data types +@section Data types + +All the functions are available for each of the standard data-types. +The versions for @code{double} have the prefix @code{gsl_block}, +@code{gsl_vector} and @code{gsl_matrix}. Similarly the versions for +single-precision @code{float} arrays have the prefix +@code{gsl_block_float}, @code{gsl_vector_float} and +@code{gsl_matrix_float}. The full list of available types is given +below, + +@example +gsl_block double +gsl_block_float float +gsl_block_long_double long double +gsl_block_int int +gsl_block_uint unsigned int +gsl_block_long long +gsl_block_ulong unsigned long +gsl_block_short short +gsl_block_ushort unsigned short +gsl_block_char char +gsl_block_uchar unsigned char +gsl_block_complex complex double +gsl_block_complex_float complex float +gsl_block_complex_long_double complex long double +@end example + +@noindent +Corresponding types exist for the @code{gsl_vector} and +@code{gsl_matrix} functions. + + + +@node Blocks +@section Blocks +@tpindex gsl_block +For consistency all memory is allocated through a @code{gsl_block} +structure. The structure contains two components, the size of an area of +memory and a pointer to the memory. The @code{gsl_block} structure looks +like this, + +@example +typedef struct +@{ + size_t size; + double * data; +@} gsl_block; +@end example +@comment + +@noindent +Vectors and matrices are made by @dfn{slicing} an underlying block. A +slice is a set of elements formed from an initial offset and a +combination of indices and step-sizes. In the case of a matrix the +step-size for the column index represents the row-length. The step-size +for a vector is known as the @dfn{stride}. + +The functions for allocating and deallocating blocks are defined in +@file{gsl_block.h} + +@menu +* Block allocation:: +* Reading and writing blocks:: +* Example programs for blocks:: +@end menu + +@node Block allocation +@subsection Block allocation + +The functions for allocating memory to a block follow the style of +@code{malloc} and @code{free}. In addition they also perform their own +error checking. If there is insufficient memory available to allocate a +block then the functions call the GSL error handler (with an error +number of @code{GSL_ENOMEM}) in addition to returning a null +pointer. Thus if you use the library error handler to abort your program +then it isn't necessary to check every @code{alloc}. + +@deftypefun {gsl_block *} gsl_block_alloc (size_t @var{n}) +This function allocates memory for a block of @var{n} double-precision +elements, returning a pointer to the block struct. The block is not +initialized and so the values of its elements are undefined. Use the +function @code{gsl_block_calloc} if you want to ensure that all the +elements are initialized to zero. + +A null pointer is returned if insufficient memory is available to create +the block. +@end deftypefun + +@deftypefun {gsl_block *} gsl_block_calloc (size_t @var{n}) +This function allocates memory for a block and initializes all the +elements of the block to zero. +@end deftypefun + +@deftypefun void gsl_block_free (gsl_block * @var{b}) +This function frees the memory used by a block @var{b} previously +allocated with @code{gsl_block_alloc} or @code{gsl_block_calloc}. The +block @var{b} must be a valid block object (a null pointer is not +allowed). +@end deftypefun + +@node Reading and writing blocks +@subsection Reading and writing blocks + +The library provides functions for reading and writing blocks to a file +as binary data or formatted text. + +@deftypefun int gsl_block_fwrite (FILE * @var{stream}, const gsl_block * @var{b}) +This function writes the elements of the block @var{b} to the stream +@var{stream} in binary format. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_block_fread (FILE * @var{stream}, gsl_block * @var{b}) +This function reads into the block @var{b} from the open stream +@var{stream} in binary format. The block @var{b} must be preallocated +with the correct length since the function uses the size of @var{b} to +determine how many bytes to read. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. The +data is assumed to have been written in the native binary format on the +same architecture. +@end deftypefun + +@deftypefun int gsl_block_fprintf (FILE * @var{stream}, const gsl_block * @var{b}, const char * @var{format}) +This function writes the elements of the block @var{b} line-by-line to +the stream @var{stream} using the format specifier @var{format}, which +should be one of the @code{%g}, @code{%e} or @code{%f} formats for +floating point numbers and @code{%d} for integers. The function returns +0 for success and @code{GSL_EFAILED} if there was a problem writing to +the file. +@end deftypefun + +@deftypefun int gsl_block_fscanf (FILE * @var{stream}, gsl_block * @var{b}) +This function reads formatted data from the stream @var{stream} into the +block @var{b}. The block @var{b} must be preallocated with the correct +length since the function uses the size of @var{b} to determine how many +numbers to read. The function returns 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun +@comment + +@node Example programs for blocks +@subsection Example programs for blocks + +The following program shows how to allocate a block, + +@example +@verbatiminclude examples/block.c +@end example +@comment + +@noindent +Here is the output from the program, + +@example +@verbatiminclude examples/block.out +@end example +@comment + +@node Vectors +@section Vectors +@cindex vectors +@cindex stride, of vector index + +Vectors are defined by a @code{gsl_vector} structure which describes a +slice of a block. Different vectors can be created which point to the +same block. A vector slice is a set of equally-spaced elements of an +area of memory. + +@tpindex gsl_vector +The @code{gsl_vector} structure contains five components, the +@dfn{size}, the @dfn{stride}, a pointer to the memory where the elements +are stored, @var{data}, a pointer to the block owned by the vector, +@var{block}, if any, and an ownership flag, @var{owner}. The structure +is very simple and looks like this, + +@example +typedef struct +@{ + size_t size; + size_t stride; + double * data; + gsl_block * block; + int owner; +@} gsl_vector; +@end example +@comment + +@noindent +The @var{size} is simply the number of vector elements. The range of +valid indices runs from 0 to @code{size-1}. The @var{stride} is the +step-size from one element to the next in physical memory, measured in +units of the appropriate datatype. The pointer @var{data} gives the +location of the first element of the vector in memory. The pointer +@var{block} stores the location of the memory block in which the vector +elements are located (if any). If the vector owns this block then the +@var{owner} field is set to one and the block will be deallocated when the +vector is freed. If the vector points to a block owned by another +object then the @var{owner} field is zero and any underlying block will not be +deallocated with the vector. + +The functions for allocating and accessing vectors are defined in +@file{gsl_vector.h} + +@menu +* Vector allocation:: +* Accessing vector elements:: +* Initializing vector elements:: +* Reading and writing vectors:: +* Vector views:: +* Copying vectors:: +* Exchanging elements:: +* Vector operations:: +* Finding maximum and minimum elements of vectors:: +* Vector properties:: +* Example programs for vectors:: +@end menu + +@node Vector allocation +@subsection Vector allocation + +The functions for allocating memory to a vector follow the style of +@code{malloc} and @code{free}. In addition they also perform their own +error checking. If there is insufficient memory available to allocate a +vector then the functions call the GSL error handler (with an error +number of @code{GSL_ENOMEM}) in addition to returning a null +pointer. Thus if you use the library error handler to abort your program +then it isn't necessary to check every @code{alloc}. + +@deftypefun {gsl_vector *} gsl_vector_alloc (size_t @var{n}) +This function creates a vector of length @var{n}, returning a pointer to +a newly initialized vector struct. A new block is allocated for the +elements of the vector, and stored in the @var{block} component of the +vector struct. The block is ``owned'' by the vector, and will be +deallocated when the vector is deallocated. +@end deftypefun + +@deftypefun {gsl_vector *} gsl_vector_calloc (size_t @var{n}) +This function allocates memory for a vector of length @var{n} and +initializes all the elements of the vector to zero. +@end deftypefun + +@deftypefun void gsl_vector_free (gsl_vector * @var{v}) +This function frees a previously allocated vector @var{v}. If the +vector was created using @code{gsl_vector_alloc} then the block +underlying the vector will also be deallocated. If the vector has +been created from another object then the memory is still owned by +that object and will not be deallocated. The vector @var{v} must be a +valid vector object (a null pointer is not allowed). +@end deftypefun + +@node Accessing vector elements +@subsection Accessing vector elements +@cindex vectors, range-checking +@cindex range-checking for vectors +@cindex bounds checking, extension to GCC +@cindex gcc extensions, range-checking +@cindex Fortran range checking, equivalent in gcc + +Unlike @sc{fortran} compilers, C compilers do not usually provide +support for range checking of vectors and matrices.@footnote{Range +checking is available in the GNU C Compiler bounds-checking extension, +but it is not part of the default installation of GCC. Memory accesses +can also be checked with Valgrind or the @code{gcc -fmudflap} +memory protection option.} The functions @code{gsl_vector_get} and +@code{gsl_vector_set} can perform portable range checking for you and +report an error if you attempt to access elements outside the allowed +range. + +The functions for accessing the elements of a vector or matrix are +defined in @file{gsl_vector.h} and declared @code{extern inline} to +eliminate function-call overhead. You must compile your program with +the preprocessor macro @code{HAVE_INLINE} defined to use these +functions. + +@vrindex @code{GSL_RANGE_CHECK_OFF} +If necessary you can turn off range checking completely without +modifying any source files by recompiling your program with the +preprocessor definition @code{GSL_RANGE_CHECK_OFF}. Provided your +compiler supports inline functions the effect of turning off range +checking is to replace calls to @code{gsl_vector_get(v,i)} by +@code{v->data[i*v->stride]} and calls to @code{gsl_vector_set(v,i,x)} by +@code{v->data[i*v->stride]=x}. Thus there should be no performance +penalty for using the range checking functions when range checking is +turned off. + +@vrindex @code{GSL_C99_INLINE} +If you use a C99 compiler which requires inline functions in header +files to be declared @code{inline} instead of @code{extern inline}, +define the macro @code{GSL_C99_INLINE} (@pxref{Inline functions}). +With GCC this is selected automatically when compiling in C99 mode +(@code{-std=c99}). + +@vrindex gsl_check_range +If inline functions are not used, calls to the functions +@code{gsl_vector_get} and @code{gsl_vector_set} will link to the +compiled versions of these functions in the library itself. The range +checking in these functions is controlled by the global integer +variable @code{gsl_check_range}. It is enabled by default---to +disable it, set @code{gsl_check_range} to zero. Due to function-call +overhead, there is less benefit in disabling range checking here than +for inline functions. + +@deftypefun double gsl_vector_get (const gsl_vector * @var{v}, size_t @var{i}) +This function returns the @var{i}-th element of a vector @var{v}. If +@var{i} lies outside the allowed range of 0 to @math{@var{n}-1} then the error +handler is invoked and 0 is returned. @inlinefn{} +@end deftypefun + +@deftypefun void gsl_vector_set (gsl_vector * @var{v}, size_t @var{i}, double @var{x}) +This function sets the value of the @var{i}-th element of a vector +@var{v} to @var{x}. If @var{i} lies outside the allowed range of 0 to +@math{@var{n}-1} then the error handler is invoked. @inlinefn{} +@end deftypefun + +@deftypefun {double *} gsl_vector_ptr (gsl_vector * @var{v}, size_t @var{i}) +@deftypefunx {const double *} gsl_vector_const_ptr (const gsl_vector * @var{v}, size_t @var{i}) +These functions return a pointer to the @var{i}-th element of a vector +@var{v}. If @var{i} lies outside the allowed range of 0 to @math{@var{n}-1} +then the error handler is invoked and a null pointer is returned. @inlinefns{} +@end deftypefun + +@node Initializing vector elements +@subsection Initializing vector elements +@cindex vectors, initializing +@cindex initializing vectors + +@deftypefun void gsl_vector_set_all (gsl_vector * @var{v}, double @var{x}) +This function sets all the elements of the vector @var{v} to the value +@var{x}. +@end deftypefun + +@deftypefun void gsl_vector_set_zero (gsl_vector * @var{v}) +This function sets all the elements of the vector @var{v} to zero. +@end deftypefun + +@deftypefun int gsl_vector_set_basis (gsl_vector * @var{v}, size_t @var{i}) +This function makes a basis vector by setting all the elements of the +vector @var{v} to zero except for the @var{i}-th element which is set to +one. +@end deftypefun + +@node Reading and writing vectors +@subsection Reading and writing vectors + +The library provides functions for reading and writing vectors to a file +as binary data or formatted text. + +@deftypefun int gsl_vector_fwrite (FILE * @var{stream}, const gsl_vector * @var{v}) +This function writes the elements of the vector @var{v} to the stream +@var{stream} in binary format. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_vector_fread (FILE * @var{stream}, gsl_vector * @var{v}) +This function reads into the vector @var{v} from the open stream +@var{stream} in binary format. The vector @var{v} must be preallocated +with the correct length since the function uses the size of @var{v} to +determine how many bytes to read. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. The +data is assumed to have been written in the native binary format on the +same architecture. +@end deftypefun + +@deftypefun int gsl_vector_fprintf (FILE * @var{stream}, const gsl_vector * @var{v}, const char * @var{format}) +This function writes the elements of the vector @var{v} line-by-line to +the stream @var{stream} using the format specifier @var{format}, which +should be one of the @code{%g}, @code{%e} or @code{%f} formats for +floating point numbers and @code{%d} for integers. The function returns +0 for success and @code{GSL_EFAILED} if there was a problem writing to +the file. +@end deftypefun + +@deftypefun int gsl_vector_fscanf (FILE * @var{stream}, gsl_vector * @var{v}) +This function reads formatted data from the stream @var{stream} into the +vector @var{v}. The vector @var{v} must be preallocated with the correct +length since the function uses the size of @var{v} to determine how many +numbers to read. The function returns 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun + +@node Vector views +@subsection Vector views + +In addition to creating vectors from slices of blocks it is also +possible to slice vectors and create vector views. For example, a +subvector of another vector can be described with a view, or two views +can be made which provide access to the even and odd elements of a +vector. + +@tpindex gsl_vector_view +@tpindex gsl_vector_const_view +A vector view is a temporary object, stored on the stack, which can be +used to operate on a subset of vector elements. Vector views can be +defined for both constant and non-constant vectors, using separate types +that preserve constness. A vector view has the type +@code{gsl_vector_view} and a constant vector view has the type +@code{gsl_vector_const_view}. In both cases the elements of the view +can be accessed as a @code{gsl_vector} using the @code{vector} component +of the view object. A pointer to a vector of type @code{gsl_vector *} +or @code{const gsl_vector *} can be obtained by taking the address of +this component with the @code{&} operator. + +When using this pointer it is important to ensure that the view itself +remains in scope---the simplest way to do so is by always writing the +pointer as @code{&}@var{view}@code{.vector}, and never storing this value +in another variable. + +@deftypefun gsl_vector_view gsl_vector_subvector (gsl_vector * @var{v}, size_t @var{offset}, size_t @var{n}) +@deftypefunx {gsl_vector_const_view} gsl_vector_const_subvector (const gsl_vector * @var{v}, size_t @var{offset}, size_t @var{n}) +These functions return a vector view of a subvector of another vector +@var{v}. The start of the new vector is offset by @var{offset} elements +from the start of the original vector. The new vector has @var{n} +elements. Mathematically, the @var{i}-th element of the new vector +@var{v'} is given by, + +@example +v'(i) = v->data[(offset + i)*v->stride] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n-1}. + +The @code{data} pointer of the returned vector struct is set to null if +the combined parameters (@var{offset},@var{n}) overrun the end of the +original vector. + +The new vector is only a view of the block underlying the original +vector, @var{v}. The block containing the elements of @var{v} is not +owned by the new vector. When the view goes out of scope the original +vector @var{v} and its block will continue to exist. The original +memory can only be deallocated by freeing the original vector. Of +course, the original vector should not be deallocated while the view is +still in use. + +The function @code{gsl_vector_const_subvector} is equivalent to +@code{gsl_vector_subvector} but can be used for vectors which are +declared @code{const}. +@end deftypefun + + +@deftypefun gsl_vector_view gsl_vector_subvector_with_stride (gsl_vector * @var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) +@deftypefunx {gsl_vector_const_view} gsl_vector_const_subvector_with_stride (const gsl_vector * @var{v}, size_t @var{offset}, size_t @var{stride}, size_t @var{n}) +These functions return a vector view of a subvector of another vector +@var{v} with an additional stride argument. The subvector is formed in +the same way as for @code{gsl_vector_subvector} but the new vector has +@var{n} elements with a step-size of @var{stride} from one element to +the next in the original vector. Mathematically, the @var{i}-th element +of the new vector @var{v'} is given by, + +@example +v'(i) = v->data[(offset + i*stride)*v->stride] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n-1}. + +Note that subvector views give direct access to the underlying elements +of the original vector. For example, the following code will zero the +even elements of the vector @code{v} of length @code{n}, while leaving the +odd elements untouched, + +@example +gsl_vector_view v_even + = gsl_vector_subvector_with_stride (v, 0, 2, n/2); +gsl_vector_set_zero (&v_even.vector); +@end example + +@noindent +A vector view can be passed to any subroutine which takes a vector +argument just as a directly allocated vector would be, using +@code{&}@var{view}@code{.vector}. For example, the following code +computes the norm of the odd elements of @code{v} using the @sc{blas} +routine @sc{dnrm2}, + +@example +gsl_vector_view v_odd + = gsl_vector_subvector_with_stride (v, 1, 2, n/2); +double r = gsl_blas_dnrm2 (&v_odd.vector); +@end example + +The function @code{gsl_vector_const_subvector_with_stride} is equivalent +to @code{gsl_vector_subvector_with_stride} but can be used for vectors +which are declared @code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_vector_complex_real (gsl_vector_complex * @var{v}) +@deftypefunx {gsl_vector_const_view} gsl_vector_complex_const_real (const gsl_vector_complex * @var{v}) +These functions return a vector view of the real parts of the complex +vector @var{v}. + +The function @code{gsl_vector_complex_const_real} is equivalent to +@code{gsl_vector_complex_real} but can be used for vectors which are +declared @code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_vector_complex_imag (gsl_vector_complex * @var{v}) +@deftypefunx {gsl_vector_const_view} gsl_vector_complex_const_imag (const gsl_vector_complex * @var{v}) +These functions return a vector view of the imaginary parts of the +complex vector @var{v}. + +The function @code{gsl_vector_complex_const_imag} is equivalent to +@code{gsl_vector_complex_imag} but can be used for vectors which are +declared @code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_vector_view_array (double * @var{base}, size_t @var{n}) +@deftypefunx {gsl_vector_const_view} gsl_vector_const_view_array (const double * @var{base}, size_t @var{n}) +These functions return a vector view of an array. The start of the new +vector is given by @var{base} and has @var{n} elements. Mathematically, +the @var{i}-th element of the new vector @var{v'} is given by, + +@example +v'(i) = base[i] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n-1}. + +The array containing the elements of @var{v} is not owned by the new +vector view. When the view goes out of scope the original array will +continue to exist. The original memory can only be deallocated by +freeing the original pointer @var{base}. Of course, the original array +should not be deallocated while the view is still in use. + +The function @code{gsl_vector_const_view_array} is equivalent to +@code{gsl_vector_view_array} but can be used for arrays which are +declared @code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_vector_view_array_with_stride (double * @var{base}, size_t @var{stride}, size_t @var{n}) +@deftypefunx gsl_vector_const_view gsl_vector_const_view_array_with_stride (const double * @var{base}, size_t @var{stride}, size_t @var{n}) +These functions return a vector view of an array @var{base} with an +additional stride argument. The subvector is formed in the same way as +for @code{gsl_vector_view_array} but the new vector has @var{n} elements +with a step-size of @var{stride} from one element to the next in the +original array. Mathematically, the @var{i}-th element of the new +vector @var{v'} is given by, + +@example +v'(i) = base[i*stride] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n-1}. + +Note that the view gives direct access to the underlying elements of the +original array. A vector view can be passed to any subroutine which +takes a vector argument just as a directly allocated vector would be, +using @code{&}@var{view}@code{.vector}. + +The function @code{gsl_vector_const_view_array_with_stride} is +equivalent to @code{gsl_vector_view_array_with_stride} but can be used +for arrays which are declared @code{const}. +@end deftypefun + + +@comment @node Modifying subvector views +@comment @subsection Modifying subvector views +@comment +@comment @deftypefun int gsl_vector_view_from_vector (gsl_vector * @var{v}, gsl_vector * @var{base}, size_t @var{offset}, size_t @var{n}, size_t @var{stride}) +@comment This function modifies and existing vector view @var{v} to form a new +@comment view of a vector @var{base}, starting from element @var{offset}. The +@comment vector has @var{n} elements separated by stride @var{stride}. Any +@comment existing view in @var{v} will be lost as a result of this function. +@comment @end deftypefun +@comment +@comment @deftypefun int gsl_vector_view_from_array (gsl_vector * @var{v}, double * @var{base}, size_t @var{offset}, size_t @var{n}, size_t @var{stride}) +@comment This function modifies and existing vector view @var{v} to form a new +@comment view of an array @var{base}, starting from element @var{offset}. The +@comment vector has @var{n} elements separated by stride @var{stride}. Any +@comment existing view in @var{v} will be lost as a result of this function. +@comment @end deftypefun + +@comment @deftypefun {gsl_vector *} gsl_vector_alloc_from_block (gsl_block * @var{b}, size_t @var{offset}, size_t @var{n}, size_t @var{stride}) +@comment This function creates a vector as a slice of an existing block @var{b}, +@comment returning a pointer to a newly initialized vector struct. The start of +@comment the vector is offset by @var{offset} elements from the start of the +@comment block. The vector has @var{n} elements, with a step-size of @var{stride} +@comment from one element to the next. Mathematically, the @var{i}-th element of +@comment the vector is given by, +@comment +@comment @example +@comment v(i) = b->data[offset + i*stride] +@comment @end example +@comment @noindent +@comment where the index @var{i} runs from 0 to @code{n-1}. +@comment +@comment A null pointer is returned if the combined parameters +@comment (@var{offset},@var{n},@var{stride}) overrun the end of the block or if +@comment insufficient memory is available to store the vector. +@comment +@comment The vector is only a view of the block @var{b}, and the block is not +@comment owned by the vector. When the vector is deallocated the block @var{b} +@comment will continue to exist. This memory can only be deallocated by freeing +@comment the block itself. Of course, this block should not be deallocated while +@comment the vector is still in use. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_vector *} gsl_vector_alloc_from_vector (gsl_vector * @var{v}, size_t @var{offset}, size_t @var{n}, size_t @var{stride}) +@comment This function creates a vector as a slice of another vector @var{v}, +@comment returning a pointer to a newly initialized vector struct. The start of +@comment the new vector is offset by @var{offset} elements from the start of the +@comment original vector. The new vector has @var{n} elements, with a step-size +@comment of @var{stride} from one element to the next in the original vector. +@comment Mathematically, the @var{i}-th element of the new vector @var{v'} is +@comment given by, +@comment +@comment @example +@comment v'(i) = v->data[(offset + i*stride)*v->stride] +@comment @end example +@comment @noindent +@comment where the index @var{i} runs from 0 to @code{n-1}. +@comment +@comment A null pointer is returned if the combined parameters +@comment (@var{offset},@var{n},@var{stride}) overrun the end of the original +@comment vector or if insufficient memory is available store the new vector. +@comment +@comment The new vector is only a view of the block underlying the original +@comment vector, @var{v}. The block is not owned by the new vector. When the new +@comment vector is deallocated the original vector @var{v} and its block will +@comment continue to exist. The original memory can only be deallocated by +@comment freeing the original vector. Of course, the original vector should not +@comment be deallocated while the new vector is still in use. +@comment @end deftypefun + +@node Copying vectors +@subsection Copying vectors + +Common operations on vectors such as addition and multiplication are +available in the @sc{blas} part of the library (@pxref{BLAS +Support}). However, it is useful to have a small number of utility +functions which do not require the full @sc{blas} code. The following +functions fall into this category. + +@deftypefun int gsl_vector_memcpy (gsl_vector * @var{dest}, const gsl_vector * @var{src}) +This function copies the elements of the vector @var{src} into the +vector @var{dest}. The two vectors must have the same length. +@end deftypefun + +@deftypefun int gsl_vector_swap (gsl_vector * @var{v}, gsl_vector * @var{w}) +This function exchanges the elements of the vectors @var{v} and @var{w} +by copying. The two vectors must have the same length. +@end deftypefun + + +@node Exchanging elements +@subsection Exchanging elements + +The following function can be used to exchange, or permute, the elements +of a vector. + +@deftypefun int gsl_vector_swap_elements (gsl_vector * @var{v}, size_t @var{i}, size_t @var{j}) +This function exchanges the @var{i}-th and @var{j}-th elements of the +vector @var{v} in-place. +@end deftypefun + +@deftypefun int gsl_vector_reverse (gsl_vector * @var{v}) +This function reverses the order of the elements of the vector @var{v}. +@end deftypefun + + +@node Vector operations +@subsection Vector operations + +@deftypefun int gsl_vector_add (gsl_vector * @var{a}, const gsl_vector * @var{b}) +This function adds the elements of vector @var{b} to the elements of +vector @var{a}. The result @math{a_i \leftarrow a_i + b_i} is stored +in @var{a} and @var{b} remains unchanged. The two vectors must have +the same length. +@end deftypefun + +@deftypefun int gsl_vector_sub (gsl_vector * @var{a}, const gsl_vector * @var{b}) +This function subtracts the elements of vector @var{b} from the elements of +vector @var{a}. The result @math{a_i \leftarrow a_i - b_i} is stored +in @var{a} and @var{b} remains unchanged. The two vectors must have the +same length. +@end deftypefun + +@deftypefun int gsl_vector_mul (gsl_vector * @var{a}, const gsl_vector * @var{b}) +This function multiplies the elements of vector @var{a} by the +elements of vector @var{b}. The result @math{a_i \leftarrow a_i * +b_i} is stored in @var{a} and @var{b} remains unchanged. The two +vectors must have the same length. +@end deftypefun + +@deftypefun int gsl_vector_div (gsl_vector * @var{a}, const gsl_vector * @var{b}) +This function divides the elements of vector @var{a} by the elements +of vector @var{b}. The result @math{a_i \leftarrow a_i / b_i} is +stored in @var{a} and @var{b} remains unchanged. The two vectors must +have the same length. +@end deftypefun + +@deftypefun int gsl_vector_scale (gsl_vector * @var{a}, const double @var{x}) +This function multiplies the elements of vector @var{a} by the +constant factor @var{x}. The result @math{a_i \leftarrow x a_i} is +stored in @var{a}. +@end deftypefun + +@deftypefun int gsl_vector_add_constant (gsl_vector * @var{a}, const double @var{x}) +This function adds the constant value @var{x} to the elements of the +vector @var{a}. The result @math{a_i \leftarrow a_i + x} is stored in +@var{a}. +@end deftypefun + +@node Finding maximum and minimum elements of vectors +@subsection Finding maximum and minimum elements of vectors + +The following operations are only defined for real vectors. + +@deftypefun double gsl_vector_max (const gsl_vector * @var{v}) +This function returns the maximum value in the vector @var{v}. +@end deftypefun + +@deftypefun double gsl_vector_min (const gsl_vector * @var{v}) +This function returns the minimum value in the vector @var{v}. +@end deftypefun + +@deftypefun void gsl_vector_minmax (const gsl_vector * @var{v}, double * @var{min_out}, double * @var{max_out}) +This function returns the minimum and maximum values in the vector +@var{v}, storing them in @var{min_out} and @var{max_out}. +@end deftypefun + +@deftypefun size_t gsl_vector_max_index (const gsl_vector * @var{v}) +This function returns the index of the maximum value in the vector @var{v}. +When there are several equal maximum elements then the lowest index is +returned. +@end deftypefun + +@deftypefun size_t gsl_vector_min_index (const gsl_vector * @var{v}) +This function returns the index of the minimum value in the vector @var{v}. +When there are several equal minimum elements then the lowest index is +returned. +@end deftypefun + +@deftypefun void gsl_vector_minmax_index (const gsl_vector * @var{v}, size_t * @var{imin}, size_t * @var{imax}) +This function returns the indices of the minimum and maximum values in +the vector @var{v}, storing them in @var{imin} and @var{imax}. When +there are several equal minimum or maximum elements then the lowest +indices are returned. +@end deftypefun + +@node Vector properties +@subsection Vector properties + +The following functions are defined for real and complex vectors. For +complex vectors both the real and imaginary parts must satisfy the +conditions. + +@deftypefun int gsl_vector_isnull (const gsl_vector * @var{v}) +@deftypefunx int gsl_vector_ispos (const gsl_vector * @var{v}) +@deftypefunx int gsl_vector_isneg (const gsl_vector * @var{v}) +@deftypefunx int gsl_vector_isnonneg (const gsl_vector * @var{v}) +These functions return 1 if all the elements of the vector @var{v} are +zero, strictly positive, strictly negative, or non-negative +respectively, and 0 otherwise. +@end deftypefun + +@deftypefun int gsl_vector_equal (const gsl_vector * @var{u}, const gsl_vector * @var{v}) +This function returns 1 if the vectors @var{u} and @var{v} are equal +(by comparison of element values) and 0 otherwise. +@end deftypefun + + +@node Example programs for vectors +@subsection Example programs for vectors + +This program shows how to allocate, initialize and read from a vector +using the functions @code{gsl_vector_alloc}, @code{gsl_vector_set} and +@code{gsl_vector_get}. + +@example +@verbatiminclude examples/vector.c +@end example +@comment + +@noindent +Here is the output from the program. The final loop attempts to read +outside the range of the vector @code{v}, and the error is trapped by +the range-checking code in @code{gsl_vector_get}. + +@example +$ ./a.out +v_0 = 1.23 +v_1 = 2.23 +v_2 = 3.23 +gsl: vector_source.c:12: ERROR: index out of range +Default GSL error handler invoked. +Aborted (core dumped) +@end example +@comment + +@noindent +The next program shows how to write a vector to a file. + +@example +@verbatiminclude examples/vectorw.c +@end example +@comment + +@noindent +After running this program the file @file{test.dat} should contain the +elements of @code{v}, written using the format specifier +@code{%.5g}. The vector could then be read back in using the function +@code{gsl_vector_fscanf (f, v)} as follows: + +@example +@verbatiminclude examples/vectorr.c +@end example + + +@node Matrices +@section Matrices +@cindex matrices +@cindex physical dimension, matrices +@cindex trailing dimension, matrices +@cindex leading dimension, matrices +@cindex ordering, matrix elements + +Matrices are defined by a @code{gsl_matrix} structure which describes a +generalized slice of a block. Like a vector it represents a set of +elements in an area of memory, but uses two indices instead of one. + +@tpindex gsl_matrix +The @code{gsl_matrix} structure contains six components, the two +dimensions of the matrix, a physical dimension, a pointer to the memory +where the elements of the matrix are stored, @var{data}, a pointer to +the block owned by the matrix @var{block}, if any, and an ownership +flag, @var{owner}. The physical dimension determines the memory layout +and can differ from the matrix dimension to allow the use of +submatrices. The @code{gsl_matrix} structure is very simple and looks +like this, + +@example +typedef struct +@{ + size_t size1; + size_t size2; + size_t tda; + double * data; + gsl_block * block; + int owner; +@} gsl_matrix; +@end example +@comment + +@noindent +Matrices are stored in row-major order, meaning that each row of +elements forms a contiguous block in memory. This is the standard +``C-language ordering'' of two-dimensional arrays. Note that @sc{fortran} +stores arrays in column-major order. The number of rows is @var{size1}. +The range of valid row indices runs from 0 to @code{size1-1}. Similarly +@var{size2} is the number of columns. The range of valid column indices +runs from 0 to @code{size2-1}. The physical row dimension @var{tda}, or +@dfn{trailing dimension}, specifies the size of a row of the matrix as +laid out in memory. + +For example, in the following matrix @var{size1} is 3, @var{size2} is 4, +and @var{tda} is 8. The physical memory layout of the matrix begins in +the top left hand-corner and proceeds from left to right along each row +in turn. + +@example +@group +00 01 02 03 XX XX XX XX +10 11 12 13 XX XX XX XX +20 21 22 23 XX XX XX XX +@end group +@end example + +@noindent +Each unused memory location is represented by ``@code{XX}''. The +pointer @var{data} gives the location of the first element of the matrix +in memory. The pointer @var{block} stores the location of the memory +block in which the elements of the matrix are located (if any). If the +matrix owns this block then the @var{owner} field is set to one and the +block will be deallocated when the matrix is freed. If the matrix is +only a slice of a block owned by another object then the @var{owner} field is +zero and any underlying block will not be freed. + +The functions for allocating and accessing matrices are defined in +@file{gsl_matrix.h} + +@menu +* Matrix allocation:: +* Accessing matrix elements:: +* Initializing matrix elements:: +* Reading and writing matrices:: +* Matrix views:: +* Creating row and column views:: +* Copying matrices:: +* Copying rows and columns:: +* Exchanging rows and columns:: +* Matrix operations:: +* Finding maximum and minimum elements of matrices:: +* Matrix properties:: +* Example programs for matrices:: +@end menu + +@node Matrix allocation +@subsection Matrix allocation + +The functions for allocating memory to a matrix follow the style of +@code{malloc} and @code{free}. They also perform their own error +checking. If there is insufficient memory available to allocate a matrix +then the functions call the GSL error handler (with an error number of +@code{GSL_ENOMEM}) in addition to returning a null pointer. Thus if you +use the library error handler to abort your program then it isn't +necessary to check every @code{alloc}. + +@deftypefun {gsl_matrix *} gsl_matrix_alloc (size_t @var{n1}, size_t @var{n2}) +This function creates a matrix of size @var{n1} rows by @var{n2} +columns, returning a pointer to a newly initialized matrix struct. A new +block is allocated for the elements of the matrix, and stored in the +@var{block} component of the matrix struct. The block is ``owned'' by the +matrix, and will be deallocated when the matrix is deallocated. +@end deftypefun + +@deftypefun {gsl_matrix *} gsl_matrix_calloc (size_t @var{n1}, size_t @var{n2}) +This function allocates memory for a matrix of size @var{n1} rows by +@var{n2} columns and initializes all the elements of the matrix to zero. +@end deftypefun + +@deftypefun void gsl_matrix_free (gsl_matrix * @var{m}) +This function frees a previously allocated matrix @var{m}. If the +matrix was created using @code{gsl_matrix_alloc} then the block +underlying the matrix will also be deallocated. If the matrix has +been created from another object then the memory is still owned by +that object and will not be deallocated. The matrix @var{m} must be a +valid matrix object (a null pointer is not allowed). +@end deftypefun + +@node Accessing matrix elements +@subsection Accessing matrix elements +@cindex matrices, range-checking +@cindex range-checking for matrices + +The functions for accessing the elements of a matrix use the same range +checking system as vectors. You can turn off range checking by recompiling +your program with the preprocessor definition +@code{GSL_RANGE_CHECK_OFF}. + +The elements of the matrix are stored in ``C-order'', where the second +index moves continuously through memory. More precisely, the element +accessed by the function @code{gsl_matrix_get(m,i,j)} and +@code{gsl_matrix_set(m,i,j,x)} is + +@example +m->data[i * m->tda + j] +@end example +@comment + +@noindent +where @var{tda} is the physical row-length of the matrix. + +@deftypefun double gsl_matrix_get (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +This function returns the @math{(i,j)}-th element of a matrix +@var{m}. If @var{i} or @var{j} lie outside the allowed range of 0 to +@math{@var{n1}-1} and 0 to @math{@var{n2}-1} then the error handler is invoked and 0 +is returned. @inlinefn{} +@end deftypefun + +@deftypefun void gsl_matrix_set (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}, double @var{x}) +This function sets the value of the @math{(i,j)}-th element of a +matrix @var{m} to @var{x}. If @var{i} or @var{j} lies outside the +allowed range of 0 to @math{@var{n1}-1} and 0 to @math{@var{n2}-1} then the error +handler is invoked. @inlinefn{} +@end deftypefun + +@deftypefun {double *} gsl_matrix_ptr (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +@deftypefunx {const double *} gsl_matrix_const_ptr (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +These functions return a pointer to the @math{(i,j)}-th element of a +matrix @var{m}. If @var{i} or @var{j} lie outside the allowed range of +0 to @math{@var{n1}-1} and 0 to @math{@var{n2}-1} then the error handler is invoked +and a null pointer is returned. @inlinefns{} +@end deftypefun + +@node Initializing matrix elements +@subsection Initializing matrix elements +@cindex matrices, initializing +@cindex initializing matrices +@cindex identity matrix +@cindex matrix, identity +@cindex zero matrix +@cindex matrix, zero +@cindex constant matrix +@cindex matrix, constant + +@deftypefun void gsl_matrix_set_all (gsl_matrix * @var{m}, double @var{x}) +This function sets all the elements of the matrix @var{m} to the value +@var{x}. +@end deftypefun + +@deftypefun void gsl_matrix_set_zero (gsl_matrix * @var{m}) +This function sets all the elements of the matrix @var{m} to zero. +@end deftypefun + +@deftypefun void gsl_matrix_set_identity (gsl_matrix * @var{m}) +This function sets the elements of the matrix @var{m} to the +corresponding elements of the identity matrix, @math{m(i,j) = +\delta(i,j)}, i.e. a unit diagonal with all off-diagonal elements zero. +This applies to both square and rectangular matrices. +@end deftypefun + +@node Reading and writing matrices +@subsection Reading and writing matrices + +The library provides functions for reading and writing matrices to a file +as binary data or formatted text. + +@deftypefun int gsl_matrix_fwrite (FILE * @var{stream}, const gsl_matrix * @var{m}) +This function writes the elements of the matrix @var{m} to the stream +@var{stream} in binary format. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem writing to the file. Since the +data is written in the native binary format it may not be portable +between different architectures. +@end deftypefun + +@deftypefun int gsl_matrix_fread (FILE * @var{stream}, gsl_matrix * @var{m}) +This function reads into the matrix @var{m} from the open stream +@var{stream} in binary format. The matrix @var{m} must be preallocated +with the correct dimensions since the function uses the size of @var{m} to +determine how many bytes to read. The return value is 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. The +data is assumed to have been written in the native binary format on the +same architecture. +@end deftypefun + +@deftypefun int gsl_matrix_fprintf (FILE * @var{stream}, const gsl_matrix * @var{m}, const char * @var{format}) +This function writes the elements of the matrix @var{m} line-by-line to +the stream @var{stream} using the format specifier @var{format}, which +should be one of the @code{%g}, @code{%e} or @code{%f} formats for +floating point numbers and @code{%d} for integers. The function returns +0 for success and @code{GSL_EFAILED} if there was a problem writing to +the file. +@end deftypefun + +@deftypefun int gsl_matrix_fscanf (FILE * @var{stream}, gsl_matrix * @var{m}) +This function reads formatted data from the stream @var{stream} into the +matrix @var{m}. The matrix @var{m} must be preallocated with the correct +dimensions since the function uses the size of @var{m} to determine how many +numbers to read. The function returns 0 for success and +@code{GSL_EFAILED} if there was a problem reading from the file. +@end deftypefun + +@node Matrix views +@subsection Matrix views +@tpindex gsl_matrix_view +@tpindex gsl_matrix_const_view + +A matrix view is a temporary object, stored on the stack, which can be +used to operate on a subset of matrix elements. Matrix views can be +defined for both constant and non-constant matrices using separate types +that preserve constness. A matrix view has the type +@code{gsl_matrix_view} and a constant matrix view has the type +@code{gsl_matrix_const_view}. In both cases the elements of the view +can by accessed using the @code{matrix} component of the view object. A +pointer @code{gsl_matrix *} or @code{const gsl_matrix *} can be obtained +by taking the address of the @code{matrix} component with the @code{&} +operator. In addition to matrix views it is also possible to create +vector views of a matrix, such as row or column views. + +@deftypefun gsl_matrix_view gsl_matrix_submatrix (gsl_matrix * @var{m}, size_t @var{k1}, size_t @var{k2}, size_t @var{n1}, size_t @var{n2}) +@deftypefunx gsl_matrix_const_view gsl_matrix_const_submatrix (const gsl_matrix * @var{m}, size_t @var{k1}, size_t @var{k2}, size_t @var{n1}, size_t @var{n2}) +These functions return a matrix view of a submatrix of the matrix +@var{m}. The upper-left element of the submatrix is the element +(@var{k1},@var{k2}) of the original matrix. The submatrix has @var{n1} +rows and @var{n2} columns. The physical number of columns in memory +given by @var{tda} is unchanged. Mathematically, the +@math{(i,j)}-th element of the new matrix is given by, + +@example +m'(i,j) = m->data[(k1*m->tda + k2) + i*m->tda + j] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +runs from 0 to @code{n2-1}. + +The @code{data} pointer of the returned matrix struct is set to null if +the combined parameters (@var{i},@var{j},@var{n1},@var{n2},@var{tda}) +overrun the ends of the original matrix. + +The new matrix view is only a view of the block underlying the existing +matrix, @var{m}. The block containing the elements of @var{m} is not +owned by the new matrix view. When the view goes out of scope the +original matrix @var{m} and its block will continue to exist. The +original memory can only be deallocated by freeing the original matrix. +Of course, the original matrix should not be deallocated while the view +is still in use. + +The function @code{gsl_matrix_const_submatrix} is equivalent to +@code{gsl_matrix_submatrix} but can be used for matrices which are +declared @code{const}. +@end deftypefun + + +@deftypefun gsl_matrix_view gsl_matrix_view_array (double * @var{base}, size_t @var{n1}, size_t @var{n2}) +@deftypefunx gsl_matrix_const_view gsl_matrix_const_view_array (const double * @var{base}, size_t @var{n1}, size_t @var{n2}) +These functions return a matrix view of the array @var{base}. The +matrix has @var{n1} rows and @var{n2} columns. The physical number of +columns in memory is also given by @var{n2}. Mathematically, the +@math{(i,j)}-th element of the new matrix is given by, + +@example +m'(i,j) = base[i*n2 + j] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +runs from 0 to @code{n2-1}. + +The new matrix is only a view of the array @var{base}. When the view +goes out of scope the original array @var{base} will continue to exist. +The original memory can only be deallocated by freeing the original +array. Of course, the original array should not be deallocated while +the view is still in use. + +The function @code{gsl_matrix_const_view_array} is equivalent to +@code{gsl_matrix_view_array} but can be used for matrices which are +declared @code{const}. +@end deftypefun + + +@deftypefun gsl_matrix_view gsl_matrix_view_array_with_tda (double * @var{base}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) +@deftypefunx gsl_matrix_const_view gsl_matrix_const_view_array_with_tda (const double * @var{base}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) +These functions return a matrix view of the array @var{base} with a +physical number of columns @var{tda} which may differ from the corresponding +dimension of the matrix. The matrix has @var{n1} rows and @var{n2} +columns, and the physical number of columns in memory is given by +@var{tda}. Mathematically, the @math{(i,j)}-th element of the new +matrix is given by, + +@example +m'(i,j) = base[i*tda + j] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +runs from 0 to @code{n2-1}. + +The new matrix is only a view of the array @var{base}. When the view +goes out of scope the original array @var{base} will continue to exist. +The original memory can only be deallocated by freeing the original +array. Of course, the original array should not be deallocated while +the view is still in use. + +The function @code{gsl_matrix_const_view_array_with_tda} is equivalent +to @code{gsl_matrix_view_array_with_tda} but can be used for matrices +which are declared @code{const}. +@end deftypefun + +@deftypefun gsl_matrix_view gsl_matrix_view_vector (gsl_vector * @var{v}, size_t @var{n1}, size_t @var{n2}) +@deftypefunx gsl_matrix_const_view gsl_matrix_const_view_vector (const gsl_vector * @var{v}, size_t @var{n1}, size_t @var{n2}) +These functions return a matrix view of the vector @var{v}. The matrix +has @var{n1} rows and @var{n2} columns. The vector must have unit +stride. The physical number of columns in memory is also given by +@var{n2}. Mathematically, the @math{(i,j)}-th element of the new +matrix is given by, + +@example +m'(i,j) = v->data[i*n2 + j] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +runs from 0 to @code{n2-1}. + +The new matrix is only a view of the vector @var{v}. When the view +goes out of scope the original vector @var{v} will continue to exist. +The original memory can only be deallocated by freeing the original +vector. Of course, the original vector should not be deallocated while +the view is still in use. + +The function @code{gsl_matrix_const_view_vector} is equivalent to +@code{gsl_matrix_view_vector} but can be used for matrices which are +declared @code{const}. +@end deftypefun + + +@deftypefun gsl_matrix_view gsl_matrix_view_vector_with_tda (gsl_vector * @var{v}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) +@deftypefunx gsl_matrix_const_view gsl_matrix_const_view_vector_with_tda (const gsl_vector * @var{v}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) +These functions return a matrix view of the vector @var{v} with a +physical number of columns @var{tda} which may differ from the +corresponding matrix dimension. The vector must have unit stride. The +matrix has @var{n1} rows and @var{n2} columns, and the physical number +of columns in memory is given by @var{tda}. Mathematically, the +@math{(i,j)}-th element of the new matrix is given by, + +@example +m'(i,j) = v->data[i*tda + j] +@end example + +@noindent +where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +runs from 0 to @code{n2-1}. + +The new matrix is only a view of the vector @var{v}. When the view +goes out of scope the original vector @var{v} will continue to exist. +The original memory can only be deallocated by freeing the original +vector. Of course, the original vector should not be deallocated while +the view is still in use. + +The function @code{gsl_matrix_const_view_vector_with_tda} is equivalent +to @code{gsl_matrix_view_vector_with_tda} but can be used for matrices +which are declared @code{const}. +@end deftypefun + + +@comment @node Modifying matrix views +@comment @subsection Modifying matrix views +@comment +@comment @deftypefun int gsl_matrix_view_from_matrix (gsl_matrix * @var{m}, gsl_matrix * @var{mm}, const size_t @var{k1}, const size_t @var{k2}, const size_t @var{n1}, const size_t @var{n2}) +@comment This function modifies and existing matrix view @var{m} to form a new +@comment view of a matrix @var{mm}, starting from element (@var{k1},@var{k2}). +@comment The matrix view has @var{n1} rows and @var{n2} columns. Any existing +@comment view in @var{m} will be lost as a result of this function. +@comment @end deftypefun +@comment +@comment @deftypefun int gsl_matrix_view_from_vector (gsl_matrix * @var{m}, gsl_vector * @var{v}, const size_t @var{offset}, const size_t @var{n1}, const size_t @var{n2}) +@comment This function modifies and existing matrix view @var{m} to form a new +@comment view of a vector @var{v}, starting from element @var{offset}. The +@comment vector has @var{n1} rows and @var{n2} columns. Any +@comment existing view in @var{m} will be lost as a result of this function. +@comment @end deftypefun +@comment +@comment @deftypefun int gsl_matrix_view_from_array (gsl_matrix * @var{m}, double * @var{base}, const size_t @var{offset}, const size_t @var{n1}, const size_t @var{n2}) +@comment This function modifies and existing matrix view @var{m} to form a new +@comment view of an array @var{base}, starting from element @var{offset}. The +@comment matrix has @var{n1} rows and @var{n2} columns. Any +@comment existing view in @var{m} will be lost as a result of this function. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_matrix *} gsl_matrix_alloc_from_block (gsl_block * @var{b}, size_t @var{offset}, size_t @var{n1}, size_t @var{n2}, size_t @var{tda}) +@comment This function creates a matrix as a slice of the block @var{b}, +@comment returning a pointer to a newly initialized matrix struct. The start of +@comment the matrix is offset by @var{offset} elements from the start of the +@comment block. The matrix has @var{n1} rows and @var{n2} columns, with the +@comment physical number of columns in memory given by @var{tda}. +@comment Mathematically, the (@var{i},@var{j})-th element of the matrix is given by, +@comment +@comment @example +@comment m(i,j) = b->data[offset + i*tda + j] +@comment @end example +@comment @noindent +@comment where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +@comment runs from 0 to @code{n2-1}. +@comment +@comment A null pointer is returned if the combined parameters +@comment (@var{offset},@var{n1},@var{n2},@var{tda}) overrun the end of the block +@comment or if insufficient memory is available to store the matrix. +@comment +@comment The matrix is only a view of the block @var{b}, and the block is not +@comment owned by the matrix. When the matrix is deallocated the block @var{b} +@comment will continue to exist. This memory can only be deallocated by freeing +@comment the block itself. Of course, this block should not be deallocated while +@comment the matrix is still in use. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_matrix *} gsl_matrix_alloc_from_matrix (gsl_matrix * @var{m}, size_t @var{k1}, size_t @var{k2}, size_t @var{n1}, size_t @var{n2}) +@comment +@comment This function creates a matrix as a submatrix of the matrix @var{m}, +@comment returning a pointer to a newly initialized matrix struct. The upper-left +@comment element of the submatrix is the element (@var{k1},@var{k2}) of the +@comment original matrix. The submatrix has @var{n1} rows and @var{n2} columns. +@comment The physical number of columns in memory given by @var{tda} is +@comment unchanged. Mathematically, the (@var{i},@var{j})-th element of the +@comment new matrix is given by, +@comment +@comment @example +@comment m'(i,j) = m->data[(k1*m->tda + k2) + i*m->tda + j] +@comment @end example +@comment @noindent +@comment where the index @var{i} runs from 0 to @code{n1-1} and the index @var{j} +@comment runs from 0 to @code{n2-1}. +@comment +@comment A null pointer is returned if the combined parameters +@comment (@var{k1},@var{k2},@var{n1},@var{n2},@var{tda}) overrun the end of the +@comment original matrix or if insufficient memory is available to store the matrix. +@comment +@comment The new matrix is only a view of the block underlying the existing +@comment matrix, @var{m}. The block is not owned by the new matrix. When the new +@comment matrix is deallocated the original matrix @var{m} and its block will +@comment continue to exist. The original memory can only be deallocated by +@comment freeing the original matrix. Of course, the original matrix should not +@comment be deallocated while the new matrix is still in use. +@comment @end deftypefun + +@node Creating row and column views +@subsection Creating row and column views + +In general there are two ways to access an object, by reference or by +copying. The functions described in this section create vector views +which allow access to a row or column of a matrix by reference. +Modifying elements of the view is equivalent to modifying the matrix, +since both the vector view and the matrix point to the same memory +block. + +@deftypefun gsl_vector_view gsl_matrix_row (gsl_matrix * @var{m}, size_t @var{i}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_row (const gsl_matrix * @var{m}, size_t @var{i}) +These functions return a vector view of the @var{i}-th row of the matrix +@var{m}. The @code{data} pointer of the new vector is set to null if +@var{i} is out of range. + +The function @code{gsl_vector_const_row} is equivalent to +@code{gsl_matrix_row} but can be used for matrices which are declared +@code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_matrix_column (gsl_matrix * @var{m}, size_t @var{j}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_column (const gsl_matrix * @var{m}, size_t @var{j}) +These functions return a vector view of the @var{j}-th column of the +matrix @var{m}. The @code{data} pointer of the new vector is set to +null if @var{j} is out of range. + +The function @code{gsl_vector_const_column} is equivalent to +@code{gsl_matrix_column} but can be used for matrices which are declared +@code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_matrix_subrow (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{offset}, size_t @var{n}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_subrow (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{offset}, size_t @var{n}) +These functions return a vector view of the @var{i}-th row of the matrix +@var{m} beginning at @var{offset} elements past the first column and +containing @var{n} elements. The @code{data} pointer of the new vector +is set to null if @var{i}, @var{offset}, or @var{n} are out of range. + +The function @code{gsl_vector_const_subrow} is equivalent to +@code{gsl_matrix_subrow} but can be used for matrices which are declared +@code{const}. +@end deftypefun + +@deftypefun gsl_vector_view gsl_matrix_subcolumn (gsl_matrix * @var{m}, size_t @var{j}, size_t @var{offset}, size_t @var{n}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_subcolumn (const gsl_matrix * @var{m}, size_t @var{j}, size_t @var{offset}, size_t @var{n}) +These functions return a vector view of the @var{j}-th column of the matrix +@var{m} beginning at @var{offset} elements past the first row and +containing @var{n} elements. The @code{data} pointer of the new vector +is set to null if @var{j}, @var{offset}, or @var{n} are out of range. + +The function @code{gsl_vector_const_subcolumn} is equivalent to +@code{gsl_matrix_subcolumn} but can be used for matrices which are declared +@code{const}. +@end deftypefun + +@cindex matrix diagonal +@cindex diagonal, of a matrix +@deftypefun gsl_vector_view gsl_matrix_diagonal (gsl_matrix * @var{m}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_diagonal (const gsl_matrix * @var{m}) +These functions return a vector view of the diagonal of the matrix +@var{m}. The matrix @var{m} is not required to be square. For a +rectangular matrix the length of the diagonal is the same as the smaller +dimension of the matrix. + +The function @code{gsl_matrix_const_diagonal} is equivalent to +@code{gsl_matrix_diagonal} but can be used for matrices which are +declared @code{const}. +@end deftypefun + +@cindex matrix subdiagonal +@cindex subdiagonal, of a matrix +@deftypefun gsl_vector_view gsl_matrix_subdiagonal (gsl_matrix * @var{m}, size_t @var{k}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_subdiagonal (const gsl_matrix * @var{m}, size_t @var{k}) +These functions return a vector view of the @var{k}-th subdiagonal of +the matrix @var{m}. The matrix @var{m} is not required to be square. +The diagonal of the matrix corresponds to @math{k = 0}. + +The function @code{gsl_matrix_const_subdiagonal} is equivalent to +@code{gsl_matrix_subdiagonal} but can be used for matrices which are +declared @code{const}. +@end deftypefun + +@cindex matrix superdiagonal +@cindex superdiagonal, matrix +@deftypefun gsl_vector_view gsl_matrix_superdiagonal (gsl_matrix * @var{m}, size_t @var{k}) +@deftypefunx {gsl_vector_const_view} gsl_matrix_const_superdiagonal (const gsl_matrix * @var{m}, size_t @var{k}) +These functions return a vector view of the @var{k}-th superdiagonal of +the matrix @var{m}. The matrix @var{m} is not required to be square. The +diagonal of the matrix corresponds to @math{k = 0}. + +The function @code{gsl_matrix_const_superdiagonal} is equivalent to +@code{gsl_matrix_superdiagonal} but can be used for matrices which are +declared @code{const}. +@end deftypefun + +@comment @deftypefun {gsl_vector *} gsl_vector_alloc_row_from_matrix (gsl_matrix * @var{m}, size_t @var{i}) +@comment This function allocates a new @code{gsl_vector} struct which points to +@comment the @var{i}-th row of the matrix @var{m}. +@comment @end deftypefun +@comment +@comment @deftypefun {gsl_vector *} gsl_vector_alloc_col_from_matrix (gsl_matrix * @var{m}, size_t @var{j}) +@comment This function allocates a new @code{gsl_vector} struct which points to +@comment the @var{j}-th column of the matrix @var{m}. +@comment @end deftypefun + +@node Copying matrices +@subsection Copying matrices + +@deftypefun int gsl_matrix_memcpy (gsl_matrix * @var{dest}, const gsl_matrix * @var{src}) +This function copies the elements of the matrix @var{src} into the +matrix @var{dest}. The two matrices must have the same size. +@end deftypefun + +@deftypefun int gsl_matrix_swap (gsl_matrix * @var{m1}, gsl_matrix * @var{m2}) +This function exchanges the elements of the matrices @var{m1} and +@var{m2} by copying. The two matrices must have the same size. +@end deftypefun + +@node Copying rows and columns +@subsection Copying rows and columns + +The functions described in this section copy a row or column of a matrix +into a vector. This allows the elements of the vector and the matrix to +be modified independently. Note that if the matrix and the vector point +to overlapping regions of memory then the result will be undefined. The +same effect can be achieved with more generality using +@code{gsl_vector_memcpy} with vector views of rows and columns. + +@deftypefun int gsl_matrix_get_row (gsl_vector * @var{v}, const gsl_matrix * @var{m}, size_t @var{i}) +This function copies the elements of the @var{i}-th row of the matrix +@var{m} into the vector @var{v}. The length of the vector must be the +same as the length of the row. +@end deftypefun + +@deftypefun int gsl_matrix_get_col (gsl_vector * @var{v}, const gsl_matrix * @var{m}, size_t @var{j}) +This function copies the elements of the @var{j}-th column of the matrix +@var{m} into the vector @var{v}. The length of the vector must be the +same as the length of the column. +@end deftypefun + +@deftypefun int gsl_matrix_set_row (gsl_matrix * @var{m}, size_t @var{i}, const gsl_vector * @var{v}) +This function copies the elements of the vector @var{v} into the +@var{i}-th row of the matrix @var{m}. The length of the vector must be +the same as the length of the row. +@end deftypefun + +@deftypefun int gsl_matrix_set_col (gsl_matrix * @var{m}, size_t @var{j}, const gsl_vector * @var{v}) +This function copies the elements of the vector @var{v} into the +@var{j}-th column of the matrix @var{m}. The length of the vector must be +the same as the length of the column. +@end deftypefun + +@node Exchanging rows and columns +@subsection Exchanging rows and columns + +The following functions can be used to exchange the rows and columns of +a matrix. + +@deftypefun int gsl_matrix_swap_rows (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +This function exchanges the @var{i}-th and @var{j}-th rows of the matrix +@var{m} in-place. +@end deftypefun + +@deftypefun int gsl_matrix_swap_columns (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +This function exchanges the @var{i}-th and @var{j}-th columns of the +matrix @var{m} in-place. +@end deftypefun + +@deftypefun int gsl_matrix_swap_rowcol (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}) +This function exchanges the @var{i}-th row and @var{j}-th column of the +matrix @var{m} in-place. The matrix must be square for this operation to +be possible. +@end deftypefun + +@deftypefun int gsl_matrix_transpose_memcpy (gsl_matrix * @var{dest}, const gsl_matrix * @var{src}) +This function makes the matrix @var{dest} the transpose of the matrix +@var{src} by copying the elements of @var{src} into @var{dest}. This +function works for all matrices provided that the dimensions of the matrix +@var{dest} match the transposed dimensions of the matrix @var{src}. +@end deftypefun + +@deftypefun int gsl_matrix_transpose (gsl_matrix * @var{m}) +This function replaces the matrix @var{m} by its transpose by copying +the elements of the matrix in-place. The matrix must be square for this +operation to be possible. +@end deftypefun + +@node Matrix operations +@subsection Matrix operations + +The following operations are defined for real and complex matrices. + +@deftypefun int gsl_matrix_add (gsl_matrix * @var{a}, const gsl_matrix * @var{b}) +This function adds the elements of matrix @var{b} to the elements of +matrix @var{a}. The result @math{a(i,j) \leftarrow a(i,j) + b(i,j)} +is stored in @var{a} and @var{b} remains unchanged. The two matrices +must have the same dimensions. +@end deftypefun + +@deftypefun int gsl_matrix_sub (gsl_matrix * @var{a}, const gsl_matrix * @var{b}) +This function subtracts the elements of matrix @var{b} from the +elements of matrix @var{a}. The result @math{a(i,j) \leftarrow a(i,j) +- b(i,j)} is stored in @var{a} and @var{b} remains unchanged. The two +matrices must have the same dimensions. +@end deftypefun + +@deftypefun int gsl_matrix_mul_elements (gsl_matrix * @var{a}, const gsl_matrix * @var{b}) +This function multiplies the elements of matrix @var{a} by the +elements of matrix @var{b}. The result @math{a(i,j) \leftarrow a(i,j) +* b(i,j)} is stored in @var{a} and @var{b} remains unchanged. The two +matrices must have the same dimensions. +@end deftypefun + +@deftypefun int gsl_matrix_div_elements (gsl_matrix * @var{a}, const gsl_matrix * @var{b}) +This function divides the elements of matrix @var{a} by the elements +of matrix @var{b}. The result @math{a(i,j) \leftarrow a(i,j) / +b(i,j)} is stored in @var{a} and @var{b} remains unchanged. The two +matrices must have the same dimensions. +@end deftypefun + +@deftypefun int gsl_matrix_scale (gsl_matrix * @var{a}, const double @var{x}) +This function multiplies the elements of matrix @var{a} by the +constant factor @var{x}. The result @math{a(i,j) \leftarrow x a(i,j)} +is stored in @var{a}. +@end deftypefun + +@deftypefun int gsl_matrix_add_constant (gsl_matrix * @var{a}, const double @var{x}) +This function adds the constant value @var{x} to the elements of the +matrix @var{a}. The result @math{a(i,j) \leftarrow a(i,j) + x} is +stored in @var{a}. +@end deftypefun + +@node Finding maximum and minimum elements of matrices +@subsection Finding maximum and minimum elements of matrices + +The following operations are only defined for real matrices. + +@deftypefun double gsl_matrix_max (const gsl_matrix * @var{m}) +This function returns the maximum value in the matrix @var{m}. +@end deftypefun + +@deftypefun double gsl_matrix_min (const gsl_matrix * @var{m}) +This function returns the minimum value in the matrix @var{m}. +@end deftypefun + +@deftypefun void gsl_matrix_minmax (const gsl_matrix * @var{m}, double * @var{min_out}, double * @var{max_out}) +This function returns the minimum and maximum values in the matrix +@var{m}, storing them in @var{min_out} and @var{max_out}. +@end deftypefun + +@deftypefun void gsl_matrix_max_index (const gsl_matrix * @var{m}, size_t * @var{imax}, size_t * @var{jmax}) +This function returns the indices of the maximum value in the matrix +@var{m}, storing them in @var{imax} and @var{jmax}. When there are +several equal maximum elements then the first element found is returned, +searching in row-major order. +@end deftypefun + +@deftypefun void gsl_matrix_min_index (const gsl_matrix * @var{m}, size_t * @var{imin}, size_t * @var{jmin}) +This function returns the indices of the minimum value in the matrix +@var{m}, storing them in @var{imin} and @var{jmin}. When there are +several equal minimum elements then the first element found is returned, +searching in row-major order. +@end deftypefun + +@deftypefun void gsl_matrix_minmax_index (const gsl_matrix * @var{m}, size_t * @var{imin}, size_t * @var{jmin}, size_t * @var{imax}, size_t * @var{jmax}) +This function returns the indices of the minimum and maximum values in +the matrix @var{m}, storing them in (@var{imin},@var{jmin}) and +(@var{imax},@var{jmax}). When there are several equal minimum or maximum +elements then the first elements found are returned, searching in +row-major order. +@end deftypefun + +@node Matrix properties +@subsection Matrix properties + +The following functions are defined for real and complex matrices. +For complex matrices both the real and imaginary parts must satisfy +the conditions. + +@deftypefun int gsl_matrix_isnull (const gsl_matrix * @var{m}) +@deftypefunx int gsl_matrix_ispos (const gsl_matrix * @var{m}) +@deftypefunx int gsl_matrix_isneg (const gsl_matrix * @var{m}) +@deftypefunx int gsl_matrix_isnonneg (const gsl_matrix * @var{m}) +These functions return 1 if all the elements of the matrix @var{m} are +zero, strictly positive, strictly negative, or non-negative +respectively, and 0 otherwise. To test whether a matrix is +positive-definite, use the Cholesky decomposition (@pxref{Cholesky +Decomposition}). +@end deftypefun + +@deftypefun int gsl_matrix_equal (const gsl_matrix * @var{a}, const gsl_matrix * @var{b}) +This function returns 1 if the matrices @var{a} and @var{b} are equal +(by comparison of element values) and 0 otherwise. +@end deftypefun + + +@node Example programs for matrices +@subsection Example programs for matrices + +The program below shows how to allocate, initialize and read from a matrix +using the functions @code{gsl_matrix_alloc}, @code{gsl_matrix_set} and +@code{gsl_matrix_get}. + +@example +@verbatiminclude examples/matrix.c +@end example +@comment + +@noindent +Here is the output from the program. The final loop attempts to read +outside the range of the matrix @code{m}, and the error is trapped by +the range-checking code in @code{gsl_matrix_get}. + +@example +$ ./a.out +m(0,0) = 0.23 +m(0,1) = 1.23 +m(0,2) = 2.23 +m(1,0) = 100.23 +m(1,1) = 101.23 +m(1,2) = 102.23 +... +m(9,2) = 902.23 +gsl: matrix_source.c:13: ERROR: first index out of range +Default GSL error handler invoked. +Aborted (core dumped) +@end example +@comment + +@noindent +The next program shows how to write a matrix to a file. + +@example +@verbatiminclude examples/matrixw.c +@end example +@comment + +@noindent +After running this program the file @file{test.dat} should contain the +elements of @code{m}, written in binary format. The matrix which is read +back in using the function @code{gsl_matrix_fread} should be exactly +equal to the original matrix. + +The following program demonstrates the use of vector views. The program +computes the column norms of a matrix. + +@example +@verbatiminclude examples/vectorview.c +@end example + +@noindent +Here is the output of the program, + +@example +$ ./a.out +@verbatiminclude examples/vectorview.out +@end example + +@noindent +The results can be confirmed using @sc{gnu octave}, + +@example +$ octave +GNU Octave, version 2.0.16.92 +octave> m = sin(0:9)' * ones(1,10) + + ones(10,1) * cos(0:9); +octave> sqrt(sum(m.^2)) +ans = + 4.3146 3.1205 2.1932 3.2611 2.5342 2.5728 + 4.2047 3.6520 2.0852 3.0731 +@end example + + +@node Vector and Matrix References and Further Reading +@section References and Further Reading + +The block, vector and matrix objects in GSL follow the @code{valarray} +model of C++. A description of this model can be found in the following +reference, + +@itemize @w{} +@item +B. Stroustrup, +@cite{The C++ Programming Language} (3rd Ed), +Section 22.4 Vector Arithmetic. +Addison-Wesley 1997, ISBN 0-201-88954-4. +@end itemize diff --git a/software/gsl-1.15/doc/version.texi b/software/gsl-1.15/doc/version.texi new file mode 100644 index 000000000..7aa2d3365 --- /dev/null +++ b/software/gsl-1.15/doc/version.texi @@ -0,0 +1,4 @@ +@set UPDATED 29 April 2011 +@set UPDATED-MONTH April 2011 +@set EDITION 1.15 +@set VERSION 1.15 diff --git a/software/gsl-1.15/eigen/.deps/francis.Plo b/software/gsl-1.15/eigen/.deps/francis.Plo new file mode 100644 index 000000000..4723c97f1 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/francis.Plo @@ -0,0 +1,268 @@ +francis.lo: francis.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_complex_math.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/eigen/.deps/gen.Plo b/software/gsl-1.15/eigen/.deps/gen.Plo new file mode 100644 index 000000000..61a471dba --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/gen.Plo @@ -0,0 +1,265 @@ +gen.lo: gen.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../config.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/genherm.Plo b/software/gsl-1.15/eigen/.deps/genherm.Plo new file mode 100644 index 000000000..da2fd5dc7 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/genherm.Plo @@ -0,0 +1,268 @@ +genherm.lo: genherm.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h ../config.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_complex_math.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/eigen/.deps/genhermv.Plo b/software/gsl-1.15/eigen/.deps/genhermv.Plo new file mode 100644 index 000000000..bfe3094d1 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/genhermv.Plo @@ -0,0 +1,268 @@ +genhermv.lo: genhermv.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h ../config.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_complex_math.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/eigen/.deps/gensymm.Plo b/software/gsl-1.15/eigen/.deps/gensymm.Plo new file mode 100644 index 000000000..e3bca1fa1 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/gensymm.Plo @@ -0,0 +1,266 @@ +gensymm.lo: gensymm.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h ../config.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/gensymmv.Plo b/software/gsl-1.15/eigen/.deps/gensymmv.Plo new file mode 100644 index 000000000..7c3105af1 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/gensymmv.Plo @@ -0,0 +1,266 @@ +gensymmv.lo: gensymmv.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h ../config.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/genv.Plo b/software/gsl-1.15/eigen/.deps/genv.Plo new file mode 100644 index 000000000..e9d2bc97e --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/genv.Plo @@ -0,0 +1,265 @@ +genv.lo: genv.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../config.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/herm.Plo b/software/gsl-1.15/eigen/.deps/herm.Plo new file mode 100644 index 000000000..594cf5a35 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/herm.Plo @@ -0,0 +1,258 @@ +herm.lo: herm.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_eigen.h qrstep.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_eigen.h: + +qrstep.c: diff --git a/software/gsl-1.15/eigen/.deps/hermv.Plo b/software/gsl-1.15/eigen/.deps/hermv.Plo new file mode 100644 index 000000000..4f738b7e1 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/hermv.Plo @@ -0,0 +1,260 @@ +hermv.lo: hermv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_complex_math.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h ../gsl/gsl_eigen.h qrstep.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_eigen.h: + +qrstep.c: diff --git a/software/gsl-1.15/eigen/.deps/jacobi.Plo b/software/gsl-1.15/eigen/.deps/jacobi.Plo new file mode 100644 index 000000000..6301a41d4 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/jacobi.Plo @@ -0,0 +1,249 @@ +jacobi.lo: jacobi.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_eigen.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_eigen.h: diff --git a/software/gsl-1.15/eigen/.deps/nonsymm.Plo b/software/gsl-1.15/eigen/.deps/nonsymm.Plo new file mode 100644 index 000000000..87b67609f --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/nonsymm.Plo @@ -0,0 +1,265 @@ +nonsymm.lo: nonsymm.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/nonsymmv.Plo b/software/gsl-1.15/eigen/.deps/nonsymmv.Plo new file mode 100644 index 000000000..b64d2526c --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/nonsymmv.Plo @@ -0,0 +1,267 @@ +nonsymmv.lo: nonsymmv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_complex.h ../gsl/gsl_complex_math.h \ + ../gsl/gsl_inline.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/eigen/.deps/schur.Plo b/software/gsl-1.15/eigen/.deps/schur.Plo new file mode 100644 index 000000000..9b6babc74 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/schur.Plo @@ -0,0 +1,260 @@ +schur.lo: schur.c ../config.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_complex_math.h + +../config.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/eigen/.deps/sort.Plo b/software/gsl-1.15/eigen/.deps/sort.Plo new file mode 100644 index 000000000..54327e3ed --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/sort.Plo @@ -0,0 +1,251 @@ +sort.lo: sort.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_complex_math.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_complex_math.h: diff --git a/software/gsl-1.15/eigen/.deps/symm.Plo b/software/gsl-1.15/eigen/.deps/symm.Plo new file mode 100644 index 000000000..c21e9d293 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/symm.Plo @@ -0,0 +1,258 @@ +symm.lo: symm.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_eigen.h qrstep.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_eigen.h: + +qrstep.c: diff --git a/software/gsl-1.15/eigen/.deps/symmv.Plo b/software/gsl-1.15/eigen/.deps/symmv.Plo new file mode 100644 index 000000000..4960f3455 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/symmv.Plo @@ -0,0 +1,258 @@ +symmv.lo: symmv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_eigen.h qrstep.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_eigen.h: + +qrstep.c: diff --git a/software/gsl-1.15/eigen/.deps/test.Po b/software/gsl-1.15/eigen/.deps/test.Po new file mode 100644 index 000000000..d0b4ccfc2 --- /dev/null +++ b/software/gsl-1.15/eigen/.deps/test.Po @@ -0,0 +1,335 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_test.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_ieee_utils.h \ + ../gsl/gsl_complex_math.h ../gsl/gsl_eigen.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h ../gsl/gsl_rng.h \ + ../gsl/gsl_randist.h ../gsl/gsl_sort.h ../gsl/gsl_sort_long_double.h \ + ../gsl/gsl_sort_double.h ../gsl/gsl_sort_float.h \ + ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h ../gsl/gsl_sort_uint.h \ + ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h ../gsl/gsl_sort_short.h \ + ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_sort_vector_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_test.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_sort_vector_char.h: diff --git a/software/gsl-1.15/eigen/ChangeLog b/software/gsl-1.15/eigen/ChangeLog new file mode 100644 index 000000000..22b4c06d6 --- /dev/null +++ b/software/gsl-1.15/eigen/ChangeLog @@ -0,0 +1,146 @@ +2011-03-27 Brian Gough + + * jacobi.c (norm): compute norm of off-diagonal elements only as + per algorithm 8.4.3 in Golub and van Loan + +2009-11-26 Brian Gough + + * qrstep.c (qrstep): handle the case where |mu| >> |d0| + |sd0| to + prevent infinite loop + +2009-07-09 Brian Gough + + * symmv.c (gsl_eigen_symmv_free): handle NULL argument in free + + * symm.c (gsl_eigen_symm_free): handle NULL argument in free + + * nonsymmv.c (gsl_eigen_nonsymmv_free): handle NULL argument in free + + * nonsymm.c (gsl_eigen_nonsymm_free): handle NULL argument in free + + * hermv.c (gsl_eigen_hermv_free): handle NULL argument in free + + * herm.c (gsl_eigen_herm_free): handle NULL argument in free + + * genv.c (gsl_eigen_genv_free): handle NULL argument in free + + * gensymmv.c (gsl_eigen_gensymmv_free): handle NULL argument in free + + * gensymm.c (gsl_eigen_gensymm_free): handle NULL argument in free + + * genhermv.c (gsl_eigen_genhermv_free): handle NULL argument in free + + * genherm.c (gsl_eigen_genherm_free): handle NULL argument in free + + * gen.c (gsl_eigen_gen_free): handle NULL argument in free + + * francis.c (gsl_eigen_francis_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-08-30 Brian Gough + + * test.c (test_eigen_symm): added new test case for underflow + + * qrstep.c (trailing_eigenvalue): handle underflow for small tab, + also handle dt==0 directly. + +2007-07-30 Brian Gough + + * testgen.c (main): use gsl_finite instead of finite + +2006-09-14 Brian Gough + + * test.c (test_eigen_symm): fix duplicate VAL_DESC to ABS_DESC + (test_eigen_herm): fix duplicate VAL_DESC to ABS_DESC + +2006-08-14 Brian Gough + + * unsymm.c (gsl_eigen_unsymm): support for unsymmetric matrices + (P.Alken) + +2006-04-18 Brian Gough + + * test.c (test_eigenvalues): increase error bound + +2006-03-26 Brian Gough + + * jacobi.c (gsl_eigen_invert_jacobi): use unsigned int for nrot + consistently + +2005-08-22 Brian Gough + + * test.c (test_eigenvalues): increased test tolerance + +2004-12-03 Brian Gough + + * jacobi.c (gsl_eigen_jacobi): use algorithm from Golub and Van + Loan + (gsl_eigen_invert_jacobi): new code + +2003-01-02 Brian Gough + + * symmv.c (gsl_eigen_symmv): change gsl_isnan to isnan + + * symm.c (gsl_eigen_symm): change gsl_isnan to isnan + + * hermv.c (gsl_eigen_hermv): change gsl_isnan to isnan + + * herm.c (gsl_eigen_herm): change gsl_isnan to isnan + +2002-11-16 Brian Gough + + * symm.c (gsl_eigen_symm): prevent infinite loop for NaNs + + * herm.c (gsl_eigen_herm): prevent infinite loop for NaNs + + * symmv.c (gsl_eigen_symmv): prevent infinite loop for NaNs + + * hermv.c (gsl_eigen_hermv): prevent infinite loop for NaNs + +Fri Oct 18 17:58:35 2002 Brian Gough + + * test.c (main): added test cases to catch division by zero + (beta_r=0) in householdercomplex.c + +Wed Aug 28 19:05:54 2002 Brian Gough + + * Makefile.am (test_LDADD): fix link order to have libgslsys near + end + +Thu Aug 2 18:17:58 2001 Brian Gough + + * hermv.c (gsl_eigen_hermv): fixed index bug in accumulation of evec. + + * symmv.c (gsl_eigen_symmv): fixed index bug in accumulation of evec. + + * test.c (main): added two new test cases + + * qrstep.c (trailing_eigenvalue): chose better value of mu when + dt=0, prevents infinite loop. + +Sun Jul 1 22:43:45 2001 Brian Gough + + * modified to use new-style vector views + +Wed Jun 20 12:30:38 2001 Brian Gough + + * hermv.c (gsl_eigen_hermv): additional workspace argument no + longer required + +Mon Apr 23 10:31:01 2001 Brian Gough + + * unified error handling conventions to _e for error handling + functions and no suffix for plain functions, so _impl functions + are no longer needed. + + * removed tests for EFAULT, since EFAULT should only apply to + invalid non-null pointers. + +Fri Apr 13 20:33:18 2001 Brian Gough + + * eigen/test.c (test_invert_jacobi): removed matmult and replaced + by gsl_blas_dgemm + diff --git a/software/gsl-1.15/eigen/Makefile.am b/software/gsl-1.15/eigen/Makefile.am new file mode 100644 index 000000000..993ec5fdf --- /dev/null +++ b/software/gsl-1.15/eigen/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libgsleigen.la + +check_PROGRAMS = test + +pkginclude_HEADERS = gsl_eigen.h +libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c + +INCLUDES = -I$(top_srcdir) + +noinst_HEADERS = qrstep.c + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la + +test_SOURCES = test.c + + diff --git a/software/gsl-1.15/eigen/Makefile.in b/software/gsl-1.15/eigen/Makefile.in new file mode 100644 index 000000000..0686410fd --- /dev/null +++ b/software/gsl-1.15/eigen/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = eigen +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgsleigen_la_LIBADD = +am_libgsleigen_la_OBJECTS = jacobi.lo symm.lo symmv.lo nonsymm.lo \ + nonsymmv.lo herm.lo hermv.lo gensymm.lo gensymmv.lo genherm.lo \ + genhermv.lo gen.lo genv.lo sort.lo francis.lo schur.lo +libgsleigen_la_OBJECTS = $(am_libgsleigen_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgsleigen.la ../test/libgsltest.la \ + ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la \ + ../blas/libgslblas.la ../cblas/libgslcblas.la \ + ../matrix/libgslmatrix.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../complex/libgslcomplex.la \ + ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la \ + ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la \ + ../sort/libgslsort.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsleigen_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgsleigen_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgsleigen.la +pkginclude_HEADERS = gsl_eigen.h +libgsleigen_la_SOURCES = jacobi.c symm.c symmv.c nonsymm.c nonsymmv.c herm.c hermv.c gensymm.c gensymmv.c genherm.c genhermv.c gen.c genv.c sort.c francis.c schur.c +INCLUDES = -I$(top_srcdir) +noinst_HEADERS = qrstep.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu eigen/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu eigen/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsleigen.la: $(libgsleigen_la_OBJECTS) $(libgsleigen_la_DEPENDENCIES) + $(LINK) $(libgsleigen_la_OBJECTS) $(libgsleigen_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/francis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genherm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genhermv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gensymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gensymmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/herm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hermv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jacobi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonsymm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonsymmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/eigen/TODO b/software/gsl-1.15/eigen/TODO new file mode 100644 index 000000000..7ceeb4c1e --- /dev/null +++ b/software/gsl-1.15/eigen/TODO @@ -0,0 +1,22 @@ +# -*- org -*- +#+CATEGORY: eigen + +* Merge improvements from SVD qrstep to eigen - these should be + combined somehow as we only need one version of them. + +* dlae2.f has better handling of 2x2 eigenvalues than our qrstep.c + +* Document Jacobi eigen function, in particular that it only works for +symmetric matrices. + +* add support for nonsymmv left eigenvectors?: + + gsl_eigen_nonsymmv_params(const int lr) + + to specify whether we should compute left/right eigenvectors (or both). + + If they want both, we'll need a new function: + + gsl_eigen_nonsymmv_lr(..., evec_r, evec_l, ...) + and + gsl_eigen_nonsymmv_lr_Z(...) diff --git a/software/gsl-1.15/eigen/francis.c b/software/gsl-1.15/eigen/francis.c new file mode 100644 index 000000000..96f9180e9 --- /dev/null +++ b/software/gsl-1.15/eigen/francis.c @@ -0,0 +1,1047 @@ +/* eigen/francis.c + * + * Copyright (C) 2006, 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues of a real upper hessenberg + * matrix, using the classical double shift Francis QR algorithm. + * It will also optionally compute the full Schur form and matrix of + * Schur vectors. + * + * See Golub & Van Loan, "Matrix Computations" (3rd ed), + * algorithm 7.5.2 + */ + +/* exceptional shift coefficients - these values are from LAPACK DLAHQR */ +#define GSL_FRANCIS_COEFF1 (0.75) +#define GSL_FRANCIS_COEFF2 (-0.4375) + +static inline void francis_schur_decomp(gsl_matrix * H, + gsl_vector_complex * eval, + gsl_eigen_francis_workspace * w); +static inline size_t francis_search_subdiag_small_elements(gsl_matrix * A); +static inline int francis_qrstep(gsl_matrix * H, + gsl_eigen_francis_workspace * w); +static inline void francis_schur_standardize(gsl_matrix *A, + gsl_complex *eval1, + gsl_complex *eval2, + gsl_eigen_francis_workspace *w); +static inline size_t francis_get_submatrix(gsl_matrix *A, gsl_matrix *B); +static void francis_standard_form(gsl_matrix *A, double *cs, double *sn); + +/* +gsl_eigen_francis_alloc() + +Allocate a workspace for solving the nonsymmetric eigenvalue problem. +The size of this workspace is O(1) + +Inputs: none + +Return: pointer to workspace +*/ + +gsl_eigen_francis_workspace * +gsl_eigen_francis_alloc(void) +{ + gsl_eigen_francis_workspace *w; + + w = (gsl_eigen_francis_workspace *) + calloc (1, sizeof (gsl_eigen_francis_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + /* these are filled in later */ + + w->size = 0; + w->max_iterations = 0; + w->n_iter = 0; + w->n_evals = 0; + + w->compute_t = 0; + w->Z = NULL; + w->H = NULL; + + return (w); +} /* gsl_eigen_francis_alloc() */ + +/* +gsl_eigen_francis_free() + Free francis workspace w +*/ + +void +gsl_eigen_francis_free (gsl_eigen_francis_workspace *w) +{ + RETURN_IF_NULL (w); + free(w); +} /* gsl_eigen_francis_free() */ + +/* +gsl_eigen_francis_T() + Called when we want to compute the Schur form T, or no longer +compute the Schur form T + +Inputs: compute_t - 1 to compute T, 0 to not compute T + w - francis workspace +*/ + +void +gsl_eigen_francis_T (const int compute_t, gsl_eigen_francis_workspace *w) +{ + w->compute_t = compute_t; +} + +/* +gsl_eigen_francis() + +Solve the nonsymmetric eigenvalue problem + +H x = \lambda x + +for the eigenvalues \lambda using algorithm 7.5.2 of +Golub & Van Loan, "Matrix Computations" (3rd ed) + +Inputs: H - upper hessenberg matrix + eval - where to store eigenvalues + w - workspace + +Return: success or error - if error code is returned, + then the QR procedure did not converge in the + allowed number of iterations. In the event of non- + convergence, the number of eigenvalues found will + still be stored in the beginning of eval, + +Notes: On output, the diagonal of H contains 1-by-1 or 2-by-2 + blocks containing the eigenvalues. If T is desired, + H will contain the full Schur form on output. +*/ + +int +gsl_eigen_francis (gsl_matrix * H, gsl_vector_complex * eval, + gsl_eigen_francis_workspace * w) +{ + /* check matrix and vector sizes */ + + if (H->size1 != H->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != H->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = H->size1; + int j; + + /* + * Set internal parameters which depend on matrix size. + * The Francis solver can be called with any size matrix + * since the workspace does not depend on N. + * Furthermore, multishift solvers which call the Francis + * solver may need to call it with different sized matrices + */ + w->size = N; + w->max_iterations = 30 * N; + + /* + * save a pointer to original matrix since francis_schur_decomp + * is recursive + */ + w->H = H; + + w->n_iter = 0; + w->n_evals = 0; + + /* + * zero out the first two subdiagonals (below the main subdiagonal) + * needed as scratch space by the QR sweep routine + */ + for (j = 0; j < (int) N - 3; ++j) + { + gsl_matrix_set(H, (size_t) j + 2, (size_t) j, 0.0); + gsl_matrix_set(H, (size_t) j + 3, (size_t) j, 0.0); + } + + if (N > 2) + gsl_matrix_set(H, N - 1, N - 3, 0.0); + + /* + * compute Schur decomposition of H and store eigenvalues + * into eval + */ + francis_schur_decomp(H, eval, w); + + if (w->n_evals != N) + return GSL_EMAXITER; + + return GSL_SUCCESS; + } +} /* gsl_eigen_francis() */ + +/* +gsl_eigen_francis_Z() + +Solve the nonsymmetric eigenvalue problem for a Hessenberg +matrix + +H x = \lambda x + +for the eigenvalues \lambda using the Francis double-shift +method. + +Here we compute the real Schur form + +T = Q^t H Q + +with the diagonal blocks of T giving us the eigenvalues. +Q is the matrix of Schur vectors. + +Originally, H was obtained from a general nonsymmetric matrix +A via a transformation + +H = U^t A U + +so that + +T = (UQ)^t A (UQ) = Z^t A Z + +Z is the matrix of Schur vectors computed by this algorithm + +Inputs: H - upper hessenberg matrix + eval - where to store eigenvalues + Z - where to store Schur vectors + w - workspace + +Notes: 1) If T is computed, it is stored in H on output. Otherwise, + the diagonal of H will contain 1-by-1 and 2-by-2 blocks + containing the eigenvalues. + + 2) The matrix Z must be initialized to the Hessenberg + similarity matrix U. Or if you want the eigenvalues + of H, initialize Z to the identity matrix. +*/ + +int +gsl_eigen_francis_Z (gsl_matrix * H, gsl_vector_complex * eval, + gsl_matrix * Z, gsl_eigen_francis_workspace * w) +{ + int s; + + /* set internal Z pointer so we know to accumulate transformations */ + w->Z = Z; + + s = gsl_eigen_francis(H, eval, w); + + w->Z = NULL; + + return s; +} /* gsl_eigen_francis_Z() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +francis_schur_decomp() + Compute the Schur decomposition of the matrix H + +Inputs: H - hessenberg matrix + eval - where to store eigenvalues + w - workspace + +Return: none +*/ + +static inline void +francis_schur_decomp(gsl_matrix * H, gsl_vector_complex * eval, + gsl_eigen_francis_workspace * w) +{ + gsl_matrix_view m; /* active matrix we are working on */ + size_t N; /* size of matrix */ + size_t q; /* index of small subdiagonal element */ + gsl_complex lambda1, /* eigenvalues */ + lambda2; + + N = H->size1; + m = gsl_matrix_submatrix(H, 0, 0, N, N); + + while ((N > 2) && ((w->n_iter)++ < w->max_iterations)) + { + q = francis_search_subdiag_small_elements(&m.matrix); + + if (q == 0) + { + /* + * no small subdiagonal element found - perform a QR + * sweep on the active reduced hessenberg matrix + */ + francis_qrstep(&m.matrix, w); + continue; + } + + /* + * a small subdiagonal element was found - one or two eigenvalues + * have converged or the matrix has split into two smaller matrices + */ + + if (q == (N - 1)) + { + /* + * the last subdiagonal element of the matrix is 0 - + * m_{NN} is a real eigenvalue + */ + GSL_SET_COMPLEX(&lambda1, + gsl_matrix_get(&m.matrix, q, q), 0.0); + gsl_vector_complex_set(eval, w->n_evals, lambda1); + w->n_evals += 1; + w->n_iter = 0; + + --N; + m = gsl_matrix_submatrix(&m.matrix, 0, 0, N, N); + } + else if (q == (N - 2)) + { + gsl_matrix_view v; + + /* + * The bottom right 2-by-2 block of m is an eigenvalue + * system + */ + + v = gsl_matrix_submatrix(&m.matrix, q, q, 2, 2); + francis_schur_standardize(&v.matrix, &lambda1, &lambda2, w); + + gsl_vector_complex_set(eval, w->n_evals, lambda1); + gsl_vector_complex_set(eval, w->n_evals + 1, lambda2); + w->n_evals += 2; + w->n_iter = 0; + + N -= 2; + m = gsl_matrix_submatrix(&m.matrix, 0, 0, N, N); + } + else if (q == 1) + { + /* the first matrix element is an eigenvalue */ + GSL_SET_COMPLEX(&lambda1, + gsl_matrix_get(&m.matrix, 0, 0), 0.0); + gsl_vector_complex_set(eval, w->n_evals, lambda1); + w->n_evals += 1; + w->n_iter = 0; + + --N; + m = gsl_matrix_submatrix(&m.matrix, 1, 1, N, N); + } + else if (q == 2) + { + gsl_matrix_view v; + + /* the upper left 2-by-2 block is an eigenvalue system */ + + v = gsl_matrix_submatrix(&m.matrix, 0, 0, 2, 2); + francis_schur_standardize(&v.matrix, &lambda1, &lambda2, w); + + gsl_vector_complex_set(eval, w->n_evals, lambda1); + gsl_vector_complex_set(eval, w->n_evals + 1, lambda2); + w->n_evals += 2; + w->n_iter = 0; + + N -= 2; + m = gsl_matrix_submatrix(&m.matrix, 2, 2, N, N); + } + else + { + gsl_matrix_view v; + + /* + * There is a zero element on the subdiagonal somewhere + * in the middle of the matrix - we can now operate + * separately on the two submatrices split by this + * element. q is the row index of the zero element. + */ + + /* operate on lower right (N - q)-by-(N - q) block first */ + v = gsl_matrix_submatrix(&m.matrix, q, q, N - q, N - q); + francis_schur_decomp(&v.matrix, eval, w); + + /* operate on upper left q-by-q block */ + v = gsl_matrix_submatrix(&m.matrix, 0, 0, q, q); + francis_schur_decomp(&v.matrix, eval, w); + + N = 0; + } + } + + /* handle special cases of N = 1 or 2 */ + + if (N == 1) + { + GSL_SET_COMPLEX(&lambda1, gsl_matrix_get(&m.matrix, 0, 0), 0.0); + gsl_vector_complex_set(eval, w->n_evals, lambda1); + w->n_evals += 1; + w->n_iter = 0; + } + else if (N == 2) + { + francis_schur_standardize(&m.matrix, &lambda1, &lambda2, w); + gsl_vector_complex_set(eval, w->n_evals, lambda1); + gsl_vector_complex_set(eval, w->n_evals + 1, lambda2); + w->n_evals += 2; + w->n_iter = 0; + } +} /* francis_schur_decomp() */ + +/* +francis_qrstep() + Perform a Francis QR step. + +See Golub & Van Loan, "Matrix Computations" (3rd ed), +algorithm 7.5.1 + +Inputs: H - upper Hessenberg matrix + w - workspace + +Notes: The matrix H must be "reduced", ie: have no tiny subdiagonal + elements. When computing the first householder reflection, + we divide by H_{21} so it is necessary that this element + is not zero. When a subdiagonal element becomes negligible, + the calling function should call this routine with the + submatrices split by that element, so that we don't divide + by zeros. +*/ + +static inline int +francis_qrstep(gsl_matrix * H, gsl_eigen_francis_workspace * w) +{ + const size_t N = H->size1; + size_t i; /* looping */ + gsl_matrix_view m; + double tau_i; /* householder coefficient */ + double dat[3]; /* householder vector */ + double scale; /* scale factor to avoid overflow */ + gsl_vector_view v2, v3; + size_t q, r; + size_t top = 0; /* location of H in original matrix */ + double s, + disc; + double h_nn, /* H(n,n) */ + h_nm1nm1, /* H(n-1,n-1) */ + h_cross, /* H(n,n-1) * H(n-1,n) */ + h_tmp1, + h_tmp2; + + v2 = gsl_vector_view_array(dat, 2); + v3 = gsl_vector_view_array(dat, 3); + + if ((w->n_iter % 10) == 0) + { + /* + * exceptional shifts: we have gone 10 iterations + * without finding a new eigenvalue, try a new choice of shifts. + * See LAPACK routine DLAHQR + */ + s = fabs(gsl_matrix_get(H, N - 1, N - 2)) + + fabs(gsl_matrix_get(H, N - 2, N - 3)); + h_nn = gsl_matrix_get(H, N - 1, N - 1) + GSL_FRANCIS_COEFF1 * s; + h_nm1nm1 = h_nn; + h_cross = GSL_FRANCIS_COEFF2 * s * s; + } + else + { + /* + * normal shifts - compute Rayleigh quotient and use + * Wilkinson shift if possible + */ + + h_nn = gsl_matrix_get(H, N - 1, N - 1); + h_nm1nm1 = gsl_matrix_get(H, N - 2, N - 2); + h_cross = gsl_matrix_get(H, N - 1, N - 2) * + gsl_matrix_get(H, N - 2, N - 1); + + disc = 0.5 * (h_nm1nm1 - h_nn); + disc = disc * disc + h_cross; + if (disc > 0.0) + { + double ave; + + /* real roots - use Wilkinson's shift twice */ + disc = sqrt(disc); + ave = 0.5 * (h_nm1nm1 + h_nn); + if (fabs(h_nm1nm1) - fabs(h_nn) > 0.0) + { + h_nm1nm1 = h_nm1nm1 * h_nn - h_cross; + h_nn = h_nm1nm1 / (disc * GSL_SIGN(ave) + ave); + } + else + { + h_nn = disc * GSL_SIGN(ave) + ave; + } + + h_nm1nm1 = h_nn; + h_cross = 0.0; + } + } + + h_tmp1 = h_nm1nm1 - gsl_matrix_get(H, 0, 0); + h_tmp2 = h_nn - gsl_matrix_get(H, 0, 0); + + /* + * These formulas are equivalent to those in Golub & Van Loan + * for the normal shift case - the terms have been rearranged + * to reduce possible roundoff error when subdiagonal elements + * are small + */ + + dat[0] = (h_tmp1*h_tmp2 - h_cross) / gsl_matrix_get(H, 1, 0) + + gsl_matrix_get(H, 0, 1); + dat[1] = gsl_matrix_get(H, 1, 1) - gsl_matrix_get(H, 0, 0) - h_tmp1 - + h_tmp2; + dat[2] = gsl_matrix_get(H, 2, 1); + + scale = fabs(dat[0]) + fabs(dat[1]) + fabs(dat[2]); + if (scale != 0.0) + { + /* scale to prevent overflow or underflow */ + dat[0] /= scale; + dat[1] /= scale; + dat[2] /= scale; + } + + if (w->Z || w->compute_t) + { + /* + * get absolute indices of this (sub)matrix relative to the + * original Hessenberg matrix + */ + top = francis_get_submatrix(w->H, H); + } + + for (i = 0; i < N - 2; ++i) + { + tau_i = gsl_linalg_householder_transform(&v3.vector); + + if (tau_i != 0.0) + { + /* q = max(1, i - 1) */ + q = (1 > ((int)i - 1)) ? 0 : (i - 1); + + /* r = min(i + 3, N - 1) */ + r = ((i + 3) < (N - 1)) ? (i + 3) : (N - 1); + + if (w->compute_t) + { + /* + * We are computing the Schur form T, so we + * need to transform the whole matrix H + * + * H -> P_k^t H P_k + * + * where P_k is the current Householder matrix + */ + + /* apply left householder matrix (I - tau_i v v') to H */ + m = gsl_matrix_submatrix(w->H, + top + i, + top + q, + 3, + w->size - top - q); + gsl_linalg_householder_hm(tau_i, &v3.vector, &m.matrix); + + /* apply right householder matrix (I - tau_i v v') to H */ + m = gsl_matrix_submatrix(w->H, + 0, + top + i, + top + r + 1, + 3); + gsl_linalg_householder_mh(tau_i, &v3.vector, &m.matrix); + } + else + { + /* + * We are not computing the Schur form T, so we + * only need to transform the active block + */ + + /* apply left householder matrix (I - tau_i v v') to H */ + m = gsl_matrix_submatrix(H, i, q, 3, N - q); + gsl_linalg_householder_hm(tau_i, &v3.vector, &m.matrix); + + /* apply right householder matrix (I - tau_i v v') to H */ + m = gsl_matrix_submatrix(H, 0, i, r + 1, 3); + gsl_linalg_householder_mh(tau_i, &v3.vector, &m.matrix); + } + + if (w->Z) + { + /* accumulate the similarity transformation into Z */ + m = gsl_matrix_submatrix(w->Z, 0, top + i, w->size, 3); + gsl_linalg_householder_mh(tau_i, &v3.vector, &m.matrix); + } + } /* if (tau_i != 0.0) */ + + dat[0] = gsl_matrix_get(H, i + 1, i); + dat[1] = gsl_matrix_get(H, i + 2, i); + if (i < (N - 3)) + { + dat[2] = gsl_matrix_get(H, i + 3, i); + } + + scale = fabs(dat[0]) + fabs(dat[1]) + fabs(dat[2]); + if (scale != 0.0) + { + /* scale to prevent overflow or underflow */ + dat[0] /= scale; + dat[1] /= scale; + dat[2] /= scale; + } + } /* for (i = 0; i < N - 2; ++i) */ + + scale = fabs(dat[0]) + fabs(dat[1]); + if (scale != 0.0) + { + /* scale to prevent overflow or underflow */ + dat[0] /= scale; + dat[1] /= scale; + } + + tau_i = gsl_linalg_householder_transform(&v2.vector); + + if (w->compute_t) + { + m = gsl_matrix_submatrix(w->H, + top + N - 2, + top + N - 3, + 2, + w->size - top - N + 3); + gsl_linalg_householder_hm(tau_i, &v2.vector, &m.matrix); + + m = gsl_matrix_submatrix(w->H, + 0, + top + N - 2, + top + N, + 2); + gsl_linalg_householder_mh(tau_i, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(H, N - 2, N - 3, 2, 3); + gsl_linalg_householder_hm(tau_i, &v2.vector, &m.matrix); + + m = gsl_matrix_submatrix(H, 0, N - 2, N, 2); + gsl_linalg_householder_mh(tau_i, &v2.vector, &m.matrix); + } + + if (w->Z) + { + /* accumulate transformation into Z */ + m = gsl_matrix_submatrix(w->Z, 0, top + N - 2, w->size, 2); + gsl_linalg_householder_mh(tau_i, &v2.vector, &m.matrix); + } + + return GSL_SUCCESS; +} /* francis_qrstep() */ + +/* +francis_search_subdiag_small_elements() + Search for a small subdiagonal element starting from the bottom +of a matrix A. A small element is one that satisfies: + +|A_{i,i-1}| <= eps * (|A_{i,i}| + |A_{i-1,i-1}|) + +Inputs: A - matrix (must be at least 3-by-3) + +Return: row index of small subdiagonal element or 0 if not found + +Notes: the first small element that is found (starting from bottom) + is set to zero +*/ + +static inline size_t +francis_search_subdiag_small_elements(gsl_matrix * A) +{ + const size_t N = A->size1; + size_t i; + double dpel = gsl_matrix_get(A, N - 2, N - 2); + + for (i = N - 1; i > 0; --i) + { + double sel = gsl_matrix_get(A, i, i - 1); + double del = gsl_matrix_get(A, i, i); + + if ((sel == 0.0) || + (fabs(sel) < GSL_DBL_EPSILON * (fabs(del) + fabs(dpel)))) + { + gsl_matrix_set(A, i, i - 1, 0.0); + return (i); + } + + dpel = del; + } + + return (0); +} /* francis_search_subdiag_small_elements() */ + +/* +francis_schur_standardize() + Convert a 2-by-2 diagonal block in the Schur form to standard form +and update the rest of T and Z matrices if required. + +Inputs: A - 2-by-2 matrix + eval1 - where to store eigenvalue 1 + eval2 - where to store eigenvalue 2 + w - francis workspace +*/ + +static inline void +francis_schur_standardize(gsl_matrix *A, gsl_complex *eval1, + gsl_complex *eval2, + gsl_eigen_francis_workspace *w) +{ + const size_t N = w->size; + double cs, sn; + size_t top; + + /* + * figure out where the submatrix A resides in the + * original matrix H + */ + top = francis_get_submatrix(w->H, A); + + /* convert 2-by-2 block to standard form */ + francis_standard_form(A, &cs, &sn); + + /* set eigenvalues */ + + GSL_SET_REAL(eval1, gsl_matrix_get(A, 0, 0)); + GSL_SET_REAL(eval2, gsl_matrix_get(A, 1, 1)); + if (gsl_matrix_get(A, 1, 0) == 0.0) + { + GSL_SET_IMAG(eval1, 0.0); + GSL_SET_IMAG(eval2, 0.0); + } + else + { + double tmp = sqrt(fabs(gsl_matrix_get(A, 0, 1)) * + fabs(gsl_matrix_get(A, 1, 0))); + GSL_SET_IMAG(eval1, tmp); + GSL_SET_IMAG(eval2, -tmp); + } + + if (w->compute_t) + { + gsl_vector_view xv, yv; + + /* + * The above call to francis_standard_form transformed a 2-by-2 block + * of T into upper triangular form via the transformation + * + * U = [ CS -SN ] + * [ SN CS ] + * + * The original matrix T was + * + * T = [ T_{11} | T_{12} | T_{13} ] + * [ 0* | A | T_{23} ] + * [ 0 | 0* | T_{33} ] + * + * where 0* indicates all zeros except for possibly + * one subdiagonal element next to A. + * + * After francis_standard_form, T looks like this: + * + * T = [ T_{11} | T_{12} | T_{13} ] + * [ 0* | U^t A U | T_{23} ] + * [ 0 | 0* | T_{33} ] + * + * since only the 2-by-2 block of A was changed. However, + * in order to be able to back transform T at the end, + * we need to apply the U transformation to the rest + * of the matrix T since there is no way to apply a + * similarity transformation to T and change only the + * middle 2-by-2 block. In other words, let + * + * M = [ I 0 0 ] + * [ 0 U 0 ] + * [ 0 0 I ] + * + * and compute + * + * M^t T M = [ T_{11} | T_{12} U | T_{13} ] + * [ U^t 0* | U^t A U | U^t T_{23} ] + * [ 0 | 0* U | T_{33} ] + * + * So basically we need to apply the transformation U + * to the i x 2 matrix T_{12} and the 2 x (n - i + 2) + * matrix T_{23}, where i is the index of the top of A + * in T. + * + * The BLAS routine drot() is suited for this. + */ + + if (top < (N - 2)) + { + /* transform the 2 rows of T_{23} */ + + xv = gsl_matrix_subrow(w->H, top, top + 2, N - top - 2); + yv = gsl_matrix_subrow(w->H, top + 1, top + 2, N - top - 2); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + + if (top > 0) + { + /* transform the 2 columns of T_{12} */ + + xv = gsl_matrix_subcolumn(w->H, top, 0, top); + yv = gsl_matrix_subcolumn(w->H, top + 1, 0, top); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + } /* if (w->compute_t) */ + + if (w->Z) + { + gsl_vector_view xv, yv; + + /* + * Accumulate the transformation in Z. Here, Z -> Z * M + * + * So: + * + * Z -> [ Z_{11} | Z_{12} U | Z_{13} ] + * [ Z_{21} | Z_{22} U | Z_{23} ] + * [ Z_{31} | Z_{32} U | Z_{33} ] + * + * So we just need to apply drot() to the 2 columns + * starting at index 'top' + */ + + xv = gsl_matrix_column(w->Z, top); + yv = gsl_matrix_column(w->Z, top + 1); + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } /* if (w->Z) */ +} /* francis_schur_standardize() */ + +/* +francis_get_submatrix() + B is a submatrix of A. The goal of this function is to +compute the indices in A of where the matrix B resides +*/ + +static inline size_t +francis_get_submatrix(gsl_matrix *A, gsl_matrix *B) +{ + size_t diff; + double ratio; + size_t top; + + diff = (size_t) (B->data - A->data); + + ratio = (double)diff / ((double) (A->tda + 1)); + + top = (size_t) floor(ratio); + + return top; +} /* francis_get_submatrix() */ + +/* +francis_standard_form() + Compute the Schur factorization of a real 2-by-2 matrix in +standard form: + +[ A B ] = [ CS -SN ] [ T11 T12 ] [ CS SN ] +[ C D ] [ SN CS ] [ T21 T22 ] [-SN CS ] + +where either: +1) T21 = 0 so that T11 and T22 are real eigenvalues of the matrix, or +2) T11 = T22 and T21*T12 < 0, so that T11 +/- sqrt(|T21*T12|) are + complex conjugate eigenvalues + +Inputs: A - 2-by-2 matrix + cs - where to store cosine parameter of rotation matrix + sn - where to store sine parameter of rotation matrix + +Notes: 1) based on LAPACK routine DLANV2 + 2) On output, A is modified to contain the matrix in standard form +*/ + +static void +francis_standard_form(gsl_matrix *A, double *cs, double *sn) +{ + double a, b, c, d; /* input matrix values */ + double tmp; + double p, z; + double bcmax, bcmis, scale; + double tau, sigma; + double cs1, sn1; + double aa, bb, cc, dd; + double sab, sac; + + a = gsl_matrix_get(A, 0, 0); + b = gsl_matrix_get(A, 0, 1); + c = gsl_matrix_get(A, 1, 0); + d = gsl_matrix_get(A, 1, 1); + + if (c == 0.0) + { + /* + * matrix is already upper triangular - set rotation matrix + * to the identity + */ + *cs = 1.0; + *sn = 0.0; + } + else if (b == 0.0) + { + /* swap rows and columns to make it upper triangular */ + + *cs = 0.0; + *sn = 1.0; + + tmp = d; + d = a; + a = tmp; + b = -c; + c = 0.0; + } + else if (((a - d) == 0.0) && (GSL_SIGN(b) != GSL_SIGN(c))) + { + /* the matrix has complex eigenvalues with a == d */ + *cs = 1.0; + *sn = 0.0; + } + else + { + tmp = a - d; + p = 0.5 * tmp; + bcmax = GSL_MAX(fabs(b), fabs(c)); + bcmis = GSL_MIN(fabs(b), fabs(c)) * GSL_SIGN(b) * GSL_SIGN(c); + scale = GSL_MAX(fabs(p), bcmax); + z = (p / scale) * p + (bcmax / scale) * bcmis; + + if (z >= 4.0 * GSL_DBL_EPSILON) + { + /* real eigenvalues, compute a and d */ + + z = p + GSL_SIGN(p) * fabs(sqrt(scale) * sqrt(z)); + a = d + z; + d -= (bcmax / z) * bcmis; + + /* compute b and the rotation matrix */ + + tau = gsl_hypot(c, z); + *cs = z / tau; + *sn = c / tau; + b -= c; + c = 0.0; + } + else + { + /* + * complex eigenvalues, or real (almost) equal eigenvalues - + * make diagonal elements equal + */ + + sigma = b + c; + tau = gsl_hypot(sigma, tmp); + *cs = sqrt(0.5 * (1.0 + fabs(sigma) / tau)); + *sn = -(p / (tau * (*cs))) * GSL_SIGN(sigma); + + /* + * Compute [ AA BB ] = [ A B ] [ CS -SN ] + * [ CC DD ] [ C D ] [ SN CS ] + */ + aa = a * (*cs) + b * (*sn); + bb = -a * (*sn) + b * (*cs); + cc = c * (*cs) + d * (*sn); + dd = -c * (*sn) + d * (*cs); + + /* + * Compute [ A B ] = [ CS SN ] [ AA BB ] + * [ C D ] [-SN CS ] [ CC DD ] + */ + a = aa * (*cs) + cc * (*sn); + b = bb * (*cs) + dd * (*sn); + c = -aa * (*sn) + cc * (*cs); + d = -bb * (*sn) + dd * (*cs); + + tmp = 0.5 * (a + d); + a = d = tmp; + + if (c != 0.0) + { + if (b != 0.0) + { + if (GSL_SIGN(b) == GSL_SIGN(c)) + { + /* + * real eigenvalues: reduce to upper triangular + * form + */ + sab = sqrt(fabs(b)); + sac = sqrt(fabs(c)); + p = GSL_SIGN(c) * fabs(sab * sac); + tau = 1.0 / sqrt(fabs(b + c)); + a = tmp + p; + d = tmp - p; + b -= c; + c = 0.0; + + cs1 = sab * tau; + sn1 = sac * tau; + tmp = (*cs) * cs1 - (*sn) * sn1; + *sn = (*cs) * sn1 + (*sn) * cs1; + *cs = tmp; + } + } + else + { + b = -c; + c = 0.0; + tmp = *cs; + *cs = -(*sn); + *sn = tmp; + } + } + } + } + + /* set new matrix elements */ + + gsl_matrix_set(A, 0, 0, a); + gsl_matrix_set(A, 0, 1, b); + gsl_matrix_set(A, 1, 0, c); + gsl_matrix_set(A, 1, 1, d); +} /* francis_standard_form() */ diff --git a/software/gsl-1.15/eigen/gen.c b/software/gsl-1.15/eigen/gen.c new file mode 100644 index 000000000..0a033573e --- /dev/null +++ b/software/gsl-1.15/eigen/gen.c @@ -0,0 +1,2116 @@ +/* eigen/gen.c + * + * Copyright (C) 2006, 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues of a real generalized + * eigensystem A x = \lambda B x. Left and right Schur vectors + * are optionally computed as well. + * + * Based on the algorithm from Moler and Stewart + * [1] C. Moler, G. Stewart, "An Algorithm for Generalized Matrix + * Eigenvalue Problems", SIAM J. Numer. Anal., Vol 10, No 2, 1973. + * + * This algorithm is also described in the book + * [2] Golub & Van Loan, "Matrix Computations" (3rd ed), algorithm 7.7.3 + * + * This file contains routines based on original code from LAPACK + * which is distributed under the modified BSD license. + */ + +#define GEN_ESHIFT_COEFF (1.736) + +static void gen_schur_decomp(gsl_matrix *H, gsl_matrix *R, + gsl_vector_complex *alpha, gsl_vector *beta, + gsl_eigen_gen_workspace *w); +static inline int gen_qzstep(gsl_matrix *H, gsl_matrix *R, + gsl_eigen_gen_workspace *w); +static inline void gen_qzstep_d(gsl_matrix *H, gsl_matrix *R, + gsl_eigen_gen_workspace *w); +static void gen_tri_split_top(gsl_matrix *H, gsl_matrix *R, + gsl_eigen_gen_workspace *w); +static inline void gen_tri_chase_zero(gsl_matrix *H, gsl_matrix *R, + size_t q, + gsl_eigen_gen_workspace *w); +static inline void gen_tri_zero_H(gsl_matrix *H, gsl_matrix *R, + gsl_eigen_gen_workspace *w); +static inline size_t gen_search_small_elements(gsl_matrix *H, + gsl_matrix *R, + int *flag, + gsl_eigen_gen_workspace *w); +static int gen_schur_standardize1(gsl_matrix *A, gsl_matrix *B, + double *alphar, double *beta, + gsl_eigen_gen_workspace *w); +static int gen_schur_standardize2(gsl_matrix *A, gsl_matrix *B, + gsl_complex *alpha1, + gsl_complex *alpha2, + double *beta1, double *beta2, + gsl_eigen_gen_workspace *w); +static int gen_compute_eigenvals(gsl_matrix *A, gsl_matrix *B, + gsl_complex *alpha1, + gsl_complex *alpha2, double *beta1, + double *beta2); +static void gen_store_eigval1(const gsl_matrix *H, const double a, + const double b, gsl_vector_complex *alpha, + gsl_vector *beta, + gsl_eigen_gen_workspace *w); +static void gen_store_eigval2(const gsl_matrix *H, + const gsl_complex *alpha1, + const double beta1, + const gsl_complex *alpha2, + const double beta2, + gsl_vector_complex *alpha, + gsl_vector *beta, + gsl_eigen_gen_workspace *w); +static inline size_t gen_get_submatrix(const gsl_matrix *A, + const gsl_matrix *B); + +/*FIX**/ +inline static double normF (gsl_matrix * A); +inline static void create_givens (const double a, const double b, double *c, double *s); + +/* +gsl_eigen_gen_alloc() + +Allocate a workspace for solving the generalized eigenvalue problem. +The size of this workspace is O(n) + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_gen_workspace * +gsl_eigen_gen_alloc(const size_t n) +{ + gsl_eigen_gen_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_gen_workspace *) calloc (1, sizeof (gsl_eigen_gen_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + w->max_iterations = 30 * n; + w->n_evals = 0; + w->n_iter = 0; + w->needtop = 0; + w->atol = 0.0; + w->btol = 0.0; + w->ascale = 0.0; + w->bscale = 0.0; + w->eshift = 0.0; + w->H = NULL; + w->R = NULL; + w->compute_s = 0; + w->compute_t = 0; + w->Q = NULL; + w->Z = NULL; + + w->work = gsl_vector_alloc(n); + + if (w->work == 0) + { + gsl_eigen_gen_free(w); + GSL_ERROR_NULL ("failed to allocate space for additional workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_gen_alloc() */ + +/* +gsl_eigen_gen_free() + Free workspace w +*/ + +void +gsl_eigen_gen_free (gsl_eigen_gen_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->work) + gsl_vector_free(w->work); + + free(w); +} /* gsl_eigen_gen_free() */ + +/* +gsl_eigen_gen_params() + Set parameters which define how we solve the eigenvalue problem + +Inputs: compute_s - 1 if we want to compute S, 0 if not + compute_t - 1 if we want to compute T, 0 if not + balance - 1 if we want to balance matrices, 0 if not + w - gen workspace + +Return: none +*/ + +void +gsl_eigen_gen_params (const int compute_s, const int compute_t, + const int balance, gsl_eigen_gen_workspace *w) +{ + w->compute_s = compute_s; + w->compute_t = compute_t; +} /* gsl_eigen_gen_params() */ + +/* +gsl_eigen_gen() + +Solve the generalized eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda. + +Inputs: A - general real matrix + B - general real matrix + alpha - where to store eigenvalue numerators + beta - where to store eigenvalue denominators + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_gen (gsl_matrix * A, gsl_matrix * B, gsl_vector_complex * alpha, + gsl_vector * beta, gsl_eigen_gen_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (alpha->size != N || beta->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else + { + double anorm, bnorm; + + /* compute the Hessenberg-Triangular reduction of (A, B) */ + gsl_linalg_hesstri_decomp(A, B, w->Q, w->Z, w->work); + + /* save pointers to original matrices */ + w->H = A; + w->R = B; + + w->n_evals = 0; + w->n_iter = 0; + w->eshift = 0.0; + + /* determine if we need to compute top indices in QZ step */ + w->needtop = w->Q != 0 || w->Z != 0 || w->compute_t || w->compute_s; + + /* compute matrix norms */ + anorm = normF(A); + bnorm = normF(B); + + /* compute tolerances and scaling factors */ + w->atol = GSL_MAX(GSL_DBL_MIN, GSL_DBL_EPSILON * anorm); + w->btol = GSL_MAX(GSL_DBL_MIN, GSL_DBL_EPSILON * bnorm); + w->ascale = 1.0 / GSL_MAX(GSL_DBL_MIN, anorm); + w->bscale = 1.0 / GSL_MAX(GSL_DBL_MIN, bnorm); + + /* compute the generalized Schur decomposition and eigenvalues */ + gen_schur_decomp(A, B, alpha, beta, w); + + if (w->n_evals != N) + return GSL_EMAXITER; + + return GSL_SUCCESS; + } +} /* gsl_eigen_gen() */ + +/* +gsl_eigen_gen_QZ() + +Solve the generalized eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda. Optionally compute left and/or right +Schur vectors Q and Z which satisfy: + +A = Q S Z^t +B = Q T Z^t + +where (S, T) is the generalized Schur form of (A, B) + +Inputs: A - general real matrix + B - general real matrix + alpha - where to store eigenvalue numerators + beta - where to store eigenvalue denominators + Q - if non-null, where to store left Schur vectors + Z - if non-null, where to store right Schur vectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_gen_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix * Q, gsl_matrix * Z, + gsl_eigen_gen_workspace * w) +{ + if (Q && (A->size1 != Q->size1 || A->size1 != Q->size2)) + { + GSL_ERROR("Q matrix has wrong dimensions", GSL_EBADLEN); + } + else if (Z && (A->size1 != Z->size1 || A->size1 != Z->size2)) + { + GSL_ERROR("Z matrix has wrong dimensions", GSL_EBADLEN); + } + else + { + int s; + + w->Q = Q; + w->Z = Z; + + s = gsl_eigen_gen(A, B, alpha, beta, w); + + w->Q = NULL; + w->Z = NULL; + + return s; + } +} /* gsl_eigen_gen_QZ() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +gen_schur_decomp() + Compute the generalized Schur decomposition of the matrix pencil +(H, R) which is in Hessenberg-Triangular form + +Inputs: H - upper hessenberg matrix + R - upper triangular matrix + alpha - (output) where to store eigenvalue numerators + beta - (output) where to store eigenvalue denominators + w - workspace + +Return: none + +Notes: 1) w->n_evals is updated to keep track of how many eigenvalues + are found +*/ + +static void +gen_schur_decomp(gsl_matrix *H, gsl_matrix *R, gsl_vector_complex *alpha, + gsl_vector *beta, gsl_eigen_gen_workspace *w) +{ + size_t N; + gsl_matrix_view h, r; + gsl_matrix_view vh, vr; + size_t q; /* index of small subdiagonal element */ + gsl_complex z1, z2; /* complex values */ + double a, b; + int s; + int flag; + + N = H->size1; + + h = gsl_matrix_submatrix(H, 0, 0, N, N); + r = gsl_matrix_submatrix(R, 0, 0, N, N); + + while ((N > 1) && (w->n_iter)++ < w->max_iterations) + { + q = gen_search_small_elements(&h.matrix, &r.matrix, &flag, w); + + if (flag == 0) + { + /* no small elements found - do a QZ sweep */ + s = gen_qzstep(&h.matrix, &r.matrix, w); + + if (s == GSL_CONTINUE) + { + /* + * (h, r) is a 2-by-2 block with complex eigenvalues - + * standardize and read off eigenvalues + */ + s = gen_schur_standardize2(&h.matrix, + &r.matrix, + &z1, + &z2, + &a, + &b, + w); + if (s != GSL_SUCCESS) + { + /* + * if we get here, then the standardization process + * perturbed the eigenvalues onto the real line - + * continue QZ iteration to break them into 1-by-1 + * blocks + */ + continue; + } + + gen_store_eigval2(&h.matrix, &z1, a, &z2, b, alpha, beta, w); + N = 0; + } /* if (s) */ + + continue; + } /* if (flag == 0) */ + else if (flag == 2) + { + if (q == 0) + { + /* + * the leading element of R is zero, split off a block + * at the top + */ + gen_tri_split_top(&h.matrix, &r.matrix, w); + } + else + { + /* + * we found a small element on the diagonal of R - chase the + * zero to the bottom of the active block and then zero + * H(n, n - 1) to split off a 1-by-1 block + */ + + if (q != N - 1) + gen_tri_chase_zero(&h.matrix, &r.matrix, q, w); + + /* now zero H(n, n - 1) */ + gen_tri_zero_H(&h.matrix, &r.matrix, w); + } + + /* continue so the next iteration detects the zero in H */ + continue; + } + + /* + * a small subdiagonal element of H was found - one or two + * eigenvalues have converged or the matrix has split into + * two smaller matrices + */ + + if (q == (N - 1)) + { + /* + * the last subdiagonal element of the hessenberg matrix is 0 - + * H_{NN} / R_{NN} is a real eigenvalue - standardize so + * R_{NN} > 0 + */ + + vh = gsl_matrix_submatrix(&h.matrix, q, q, 1, 1); + vr = gsl_matrix_submatrix(&r.matrix, q, q, 1, 1); + gen_schur_standardize1(&vh.matrix, &vr.matrix, &a, &b, w); + + gen_store_eigval1(&vh.matrix, a, b, alpha, beta, w); + + --N; + h = gsl_matrix_submatrix(&h.matrix, 0, 0, N, N); + r = gsl_matrix_submatrix(&r.matrix, 0, 0, N, N); + } + else if (q == (N - 2)) + { + /* bottom right 2-by-2 block may have converged */ + + vh = gsl_matrix_submatrix(&h.matrix, q, q, 2, 2); + vr = gsl_matrix_submatrix(&r.matrix, q, q, 2, 2); + s = gen_schur_standardize2(&vh.matrix, + &vr.matrix, + &z1, + &z2, + &a, + &b, + w); + if (s != GSL_SUCCESS) + { + /* + * this 2-by-2 block contains real eigenvalues that + * have not yet separated into 1-by-1 blocks - + * recursively call gen_schur_decomp() to finish off + * this block + */ + gen_schur_decomp(&vh.matrix, &vr.matrix, alpha, beta, w); + } + else + { + /* we got 2 complex eigenvalues */ + + gen_store_eigval2(&vh.matrix, &z1, a, &z2, b, alpha, beta, w); + } + + N -= 2; + h = gsl_matrix_submatrix(&h.matrix, 0, 0, N, N); + r = gsl_matrix_submatrix(&r.matrix, 0, 0, N, N); + } + else if (q == 1) + { + /* H_{11} / R_{11} is an eigenvalue */ + + vh = gsl_matrix_submatrix(&h.matrix, 0, 0, 1, 1); + vr = gsl_matrix_submatrix(&r.matrix, 0, 0, 1, 1); + gen_schur_standardize1(&vh.matrix, &vr.matrix, &a, &b, w); + + gen_store_eigval1(&vh.matrix, a, b, alpha, beta, w); + + --N; + h = gsl_matrix_submatrix(&h.matrix, 1, 1, N, N); + r = gsl_matrix_submatrix(&r.matrix, 1, 1, N, N); + } + else if (q == 2) + { + /* upper left 2-by-2 block may have converged */ + + vh = gsl_matrix_submatrix(&h.matrix, 0, 0, 2, 2); + vr = gsl_matrix_submatrix(&r.matrix, 0, 0, 2, 2); + s = gen_schur_standardize2(&vh.matrix, + &vr.matrix, + &z1, + &z2, + &a, + &b, + w); + if (s != GSL_SUCCESS) + { + /* + * this 2-by-2 block contains real eigenvalues that + * have not yet separated into 1-by-1 blocks - + * recursively call gen_schur_decomp() to finish off + * this block + */ + gen_schur_decomp(&vh.matrix, &vr.matrix, alpha, beta, w); + } + else + { + /* we got 2 complex eigenvalues */ + gen_store_eigval2(&vh.matrix, &z1, a, &z2, b, alpha, beta, w); + } + + N -= 2; + h = gsl_matrix_submatrix(&h.matrix, 2, 2, N, N); + r = gsl_matrix_submatrix(&r.matrix, 2, 2, N, N); + } + else + { + /* + * There is a zero element on the subdiagonal somewhere + * in the middle of the matrix - we can now operate + * separately on the two submatrices split by this + * element. q is the row index of the zero element. + */ + + /* operate on lower right (N - q)-by-(N - q) block first */ + vh = gsl_matrix_submatrix(&h.matrix, q, q, N - q, N - q); + vr = gsl_matrix_submatrix(&r.matrix, q, q, N - q, N - q); + gen_schur_decomp(&vh.matrix, &vr.matrix, alpha, beta, w); + + /* operate on upper left q-by-q block */ + vh = gsl_matrix_submatrix(&h.matrix, 0, 0, q, q); + vr = gsl_matrix_submatrix(&r.matrix, 0, 0, q, q); + gen_schur_decomp(&vh.matrix, &vr.matrix, alpha, beta, w); + + N = 0; + } + } /* while ((N > 1) && (w->n_iter)++ < w->max_iterations) */ + + /* handle special case of N = 1 */ + + if (N == 1) + { + gen_schur_standardize1(&h.matrix, &r.matrix, &a, &b, w); + gen_store_eigval1(&h.matrix, a, b, alpha, beta, w); + } +} /* gen_schur_decomp() */ + +/* +gen_qzstep() + This routine determines what type of QZ step to perform on +the generalized matrix pair (H, R). If the pair is 3-by-3 or bigger, +we look at the bottom right 2-by-2 block. If this block has complex +eigenvalues, we perform a Francis double shift QZ sweep. If it +has real eigenvalues, we perform an implicit single shift QZ sweep. + +If the pair is 2-by-2 with real eigenvalues, we perform a single +shift sweep. If it has complex eigenvalues, we return GSL_CONTINUE +to notify the calling function that a 2-by-2 block with complex +eigenvalues has converged, so that it may then call +gen_schur_standardize2(). In the real eigenvalue case, we want to +continue doing QZ sweeps to break it up into two 1-by-1 blocks. + +See LAPACK routine DHGEQZ and [1] for more information. + +Inputs: H - upper Hessenberg matrix (at least 2-by-2) + R - upper triangular matrix (at least 2-by-2) + w - workspace + +Return: GSL_SUCCESS on normal completion + GSL_CONTINUE if we detect a 2-by-2 block with complex eigenvalues +*/ + +static inline int +gen_qzstep(gsl_matrix *H, gsl_matrix *R, gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + gsl_matrix_view vh, vr; /* views of bottom right 2-by-2 block */ + double wr1, wr2, wi; + double scale1, scale2, scale; + double cs, sn; /* givens rotation */ + double temp, /* temporary variables */ + temp2; + size_t j; /* looping */ + gsl_vector_view xv, yv; /* temporary views */ + size_t top; + size_t rows; + + if (w->n_iter % 10 == 0) + { + /* + * Exceptional shift - we have gone 10 iterations without finding + * a new eigenvalue, do a single shift sweep with an + * exceptional shift + */ + + if ((GSL_DBL_MIN * w->max_iterations) * + fabs(gsl_matrix_get(H, N - 2, N - 1)) < + fabs(gsl_matrix_get(R, N - 2, N - 2))) + { + w->eshift += gsl_matrix_get(H, N - 2, N - 1) / + gsl_matrix_get(R, N - 2, N - 2); + } + else + w->eshift += 1.0 / (GSL_DBL_MIN * w->max_iterations); + + if ((w->eshift < GSL_DBL_EPSILON) && + (GSL_DBL_MIN * w->max_iterations) * + fabs(gsl_matrix_get(H, N - 1, N - 2)) < + fabs(gsl_matrix_get(R, N - 2, N - 2))) + { + w->eshift = GEN_ESHIFT_COEFF * + (w->ascale * gsl_matrix_get(H, N - 1, N - 2)) / + (w->bscale * gsl_matrix_get(R, N - 2, N - 2)); + } + + scale1 = 1.0; + wr1 = w->eshift; + } + else + { + /* + * Compute generalized eigenvalues of bottom right 2-by-2 block + * to be used as shifts - wr1 is the Wilkinson shift + */ + + vh = gsl_matrix_submatrix(H, N - 2, N - 2, 2, 2); + vr = gsl_matrix_submatrix(R, N - 2, N - 2, 2, 2); + gsl_schur_gen_eigvals(&vh.matrix, + &vr.matrix, + &wr1, + &wr2, + &wi, + &scale1, + &scale2); + + if (wi != 0.0) + { + /* complex eigenvalues */ + + if (N == 2) + { + /* + * its a 2-by-2 block with complex eigenvalues - notify + * the calling function to deflate + */ + return (GSL_CONTINUE); + } + else + { + /* do a francis double shift sweep */ + gen_qzstep_d(H, R, w); + } + + return GSL_SUCCESS; + } + } + + /* real eigenvalues - perform single shift QZ step */ + + temp = GSL_MIN(w->ascale, 1.0) * (0.5 / GSL_DBL_MIN); + if (scale1 > temp) + scale = temp / scale1; + else + scale = 1.0; + + temp = GSL_MIN(w->bscale, 1.0) * (0.5 / GSL_DBL_MIN); + if (fabs(wr1) > temp) + scale = GSL_MIN(scale, temp / fabs(wr1)); + + scale1 *= scale; + wr1 *= scale; + + if (w->needtop) + { + /* get absolute index of this matrix relative to original matrix */ + top = gen_get_submatrix(w->H, H); + } + + temp = scale1*gsl_matrix_get(H, 0, 0) - wr1*gsl_matrix_get(R, 0, 0); + temp2 = scale1*gsl_matrix_get(H, 1, 0); + + create_givens(temp, temp2, &cs, &sn); + sn = -sn; + + for (j = 0; j < N - 1; ++j) + { + if (j > 0) + { + temp = gsl_matrix_get(H, j, j - 1); + temp2 = gsl_matrix_get(H, j + 1, j - 1); + create_givens(temp, temp2, &cs, &sn); + sn = -sn; + + /* apply to column (j - 1) */ + temp = cs * gsl_matrix_get(H, j, j - 1) + + sn * gsl_matrix_get(H, j + 1, j - 1); + gsl_matrix_set(H, j, j - 1, temp); + gsl_matrix_set(H, j + 1, j - 1, 0.0); + } + + /* apply G to H(j:j+1,:) and T(j:j+1,:) */ + + if (w->compute_s) + { + xv = gsl_matrix_subrow(w->H, top + j, top + j, w->size - top - j); + yv = gsl_matrix_subrow(w->H, top + j + 1, top + j, w->size - top - j); + } + else + { + xv = gsl_matrix_subrow(H, j, j, N - j); + yv = gsl_matrix_subrow(H, j + 1, j, N - j); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->compute_t) + { + xv = gsl_matrix_subrow(w->R, top + j, top + j, w->size - top - j); + yv = gsl_matrix_subrow(w->R, top + j + 1, top + j, w->size - top - j); + } + else + { + xv = gsl_matrix_subrow(R, j, j, N - j); + yv = gsl_matrix_subrow(R, j + 1, j, N - j); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Q) + { + /* accumulate Q: Q -> QG */ + xv = gsl_matrix_column(w->Q, top + j); + yv = gsl_matrix_column(w->Q, top + j + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + + temp = gsl_matrix_get(R, j + 1, j + 1); + temp2 = gsl_matrix_get(R, j + 1, j); + create_givens(temp, temp2, &cs, &sn); + + rows = GSL_MIN(j + 3, N); + + if (w->compute_s) + { + xv = gsl_matrix_subcolumn(w->H, top + j, 0, top + rows); + yv = gsl_matrix_subcolumn(w->H, top + j + 1, 0, top + rows); + } + else + { + xv = gsl_matrix_subcolumn(H, j, 0, rows); + yv = gsl_matrix_subcolumn(H, j + 1, 0, rows); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + rows = GSL_MIN(j + 2, N); + + if (w->compute_t) + { + xv = gsl_matrix_subcolumn(w->R, top + j, 0, top + rows); + yv = gsl_matrix_subcolumn(w->R, top + j + 1, 0, top + rows); + } + else + { + xv = gsl_matrix_subcolumn(R, j, 0, rows); + yv = gsl_matrix_subcolumn(R, j + 1, 0, rows); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Z) + { + /* accumulate Z: Z -> ZG */ + xv = gsl_matrix_column(w->Z, top + j); + yv = gsl_matrix_column(w->Z, top + j + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + } /* for (j = 0; j < N - 1; ++j) */ + + return GSL_SUCCESS; +} /* gen_qzstep() */ + +/* +gen_qzstep_d() + Perform an implicit double shift QZ step. + +See Golub & Van Loan, "Matrix Computations" (3rd ed), algorithm 7.7.2 + +Inputs: H - upper Hessenberg matrix (at least 3-by-3) + R - upper triangular matrix (at least 3-by-3) + w - workspace +*/ + +static inline void +gen_qzstep_d(gsl_matrix *H, gsl_matrix *R, gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + size_t j; /* looping */ + double dat[3]; /* householder vector */ + double tau; /* householder coefficient */ + gsl_vector_view v2, v3; /* views into 'dat' */ + gsl_matrix_view m; /* temporary view */ + double tmp; + size_t q, r; + size_t top; /* location of H in original matrix */ + double scale; + double AB11, /* various matrix element ratios */ + AB22, + ABNN, + ABMM, + AMNBNN, + ANMBMM, + A21B11, + A12B22, + A32B22, + B12B22, + BMNBNN; + + v2 = gsl_vector_view_array(dat, 2); + v3 = gsl_vector_view_array(dat, 3); + + if (w->needtop) + { + /* get absolute index of this matrix relative to original matrix */ + top = gen_get_submatrix(w->H, H); + } + + /* + * Similar to the QR method, we take the shifts to be the two + * zeros of the problem + * + * det[H(n-1:n,n-1:n) - s*R(n-1:n,n-1:n)] = 0 + * + * The initial householder vector elements are then given by + * Eq. 4.1 of [1], which are designed to reduce errors when + * off diagonal elements are small. + */ + + ABMM = (w->ascale * gsl_matrix_get(H, N - 2, N - 2)) / + (w->bscale * gsl_matrix_get(R, N - 2, N - 2)); + ABNN = (w->ascale * gsl_matrix_get(H, N - 1, N - 1)) / + (w->bscale * gsl_matrix_get(R, N - 1, N - 1)); + AB11 = (w->ascale * gsl_matrix_get(H, 0, 0)) / + (w->bscale * gsl_matrix_get(R, 0, 0)); + AB22 = (w->ascale * gsl_matrix_get(H, 1, 1)) / + (w->bscale * gsl_matrix_get(R, 1, 1)); + AMNBNN = (w->ascale * gsl_matrix_get(H, N - 2, N - 1)) / + (w->bscale * gsl_matrix_get(R, N - 1, N - 1)); + ANMBMM = (w->ascale * gsl_matrix_get(H, N - 1, N - 2)) / + (w->bscale * gsl_matrix_get(R, N - 2, N - 2)); + BMNBNN = gsl_matrix_get(R, N - 2, N - 1) / + gsl_matrix_get(R, N - 1, N - 1); + A21B11 = (w->ascale * gsl_matrix_get(H, 1, 0)) / + (w->bscale * gsl_matrix_get(R, 0, 0)); + A12B22 = (w->ascale * gsl_matrix_get(H, 0, 1)) / + (w->bscale * gsl_matrix_get(R, 1, 1)); + A32B22 = (w->ascale * gsl_matrix_get(H, 2, 1)) / + (w->bscale * gsl_matrix_get(R, 1, 1)); + B12B22 = gsl_matrix_get(R, 0, 1) / gsl_matrix_get(R, 1, 1); + + /* + * These are the Eqs (4.1) of [1], just multiplied by the factor + * (A_{21} / B_{11}) + */ + dat[0] = (ABMM - AB11) * (ABNN - AB11) - (AMNBNN * ANMBMM) + + (ANMBMM * BMNBNN * AB11) + (A12B22 - (AB11 * B12B22)) * A21B11; + dat[1] = ((AB22 - AB11) - (A21B11 * B12B22) - (ABMM - AB11) - + (ABNN - AB11) + (ANMBMM * BMNBNN)) * A21B11; + dat[2] = A32B22 * A21B11; + + scale = fabs(dat[0]) + fabs(dat[1]) + fabs(dat[2]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + dat[2] /= scale; + } + + for (j = 0; j < N - 2; ++j) + { + r = GSL_MIN(j + 4, N); + + /* + * Find householder Q so that + * + * Q [x y z]^t = [ * 0 0 ]^t + */ + + tau = gsl_linalg_householder_transform(&v3.vector); + + if (tau != 0.0) + { + /* + * q is the initial column to start applying the householder + * transformation. The GSL_MAX() simply ensures we don't + * try to apply it to column (-1), since we are zeroing out + * column (j - 1) except for the first iteration which + * introduces the bulge. + */ + q = (size_t) GSL_MAX(0, (int)j - 1); + + /* H -> QH, R -> QR */ + + if (w->compute_s) + { + /* + * We are computing the Schur form S, so we need to + * transform the whole matrix H + */ + m = gsl_matrix_submatrix(w->H, + top + j, + top + q, + 3, + w->size - top - q); + gsl_linalg_householder_hm(tau, &v3.vector, &m.matrix); + } + else + { + /* just transform the active block */ + m = gsl_matrix_submatrix(H, j, q, 3, N - q); + gsl_linalg_householder_hm(tau, &v3.vector, &m.matrix); + } + + if (w->compute_t) + { + /* + * We are computing the Schur form T, so we need to + * transform the whole matrix R + */ + m = gsl_matrix_submatrix(w->R, + top + j, + top + j, + 3, + w->size - top - j); + gsl_linalg_householder_hm(tau, &v3.vector, &m.matrix); + } + else + { + /* just transform the active block */ + m = gsl_matrix_submatrix(R, j, j, 3, N - j); + gsl_linalg_householder_hm(tau, &v3.vector, &m.matrix); + } + + if (w->Q) + { + /* accumulate the transformation into Q */ + m = gsl_matrix_submatrix(w->Q, 0, top + j, w->size, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + } /* if (tau != 0.0) */ + + /* + * Find householder Z so that + * + * [ r_{j+2,j} r_{j+2, j+1}, r_{j+2, j+2} ] Z = [ 0 0 * ] + * + * This isn't exactly what gsl_linalg_householder_transform + * does, so we need to rotate the input vector so it preserves + * the last element, and then rotate it back afterwards. + * + * So instead of transforming [x y z], we transform [z x y], + * and the resulting HH vector [1 v2 v3] -> [v2 v3 1] but + * then needs to be scaled to have the first element = 1, so + * it becomes [1 v3/v2 1/v2] (tau must also be scaled accordingly). + */ + + dat[0] = gsl_matrix_get(R, j + 2, j + 2); + dat[1] = gsl_matrix_get(R, j + 2, j); + dat[2] = gsl_matrix_get(R, j + 2, j + 1); + scale = fabs(dat[0]) + fabs(dat[1]) + fabs(dat[2]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + dat[2] /= scale; + } + + tau = gsl_linalg_householder_transform(&v3.vector); + + if (tau != 0.0) + { + /* rotate back */ + tmp = gsl_vector_get(&v3.vector, 1); + gsl_vector_set(&v3.vector, 1, gsl_vector_get(&v3.vector, 2)/tmp); + gsl_vector_set(&v3.vector, 2, 1.0 / tmp); + tau *= tmp * tmp; + + /* H -> HZ, R -> RZ */ + + if (w->compute_s) + { + m = gsl_matrix_submatrix(w->H, 0, top + j, top + r, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(H, 0, j, r, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + + if (w->compute_t) + { + m = gsl_matrix_submatrix(w->R, 0, top + j, top + j + 3, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(R, 0, j, j + 3, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + + if (w->Z) + { + /* accumulate transformation into Z */ + m = gsl_matrix_submatrix(w->Z, 0, top + j, w->size, 3); + gsl_linalg_householder_mh(tau, &v3.vector, &m.matrix); + } + } /* if (tau != 0.0) */ + + /* + * Find householder Z so that + * + * [ r_{j+1,j} r_{j+1, j+1} ] Z = [ 0 * ] + */ + + dat[0] = gsl_matrix_get(R, j + 1, j + 1); + dat[1] = gsl_matrix_get(R, j + 1, j); + scale = fabs(dat[0]) + fabs(dat[1]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + } + + tau = gsl_linalg_householder_transform(&v2.vector); + + if (tau != 0.0) + { + /* rotate back */ + tmp = gsl_vector_get(&v2.vector, 1); + gsl_vector_set(&v2.vector, 1, 1.0 / tmp); + tau *= tmp * tmp; + + /* H -> HZ, R -> RZ */ + + if (w->compute_s) + { + m = gsl_matrix_submatrix(w->H, 0, top + j, top + r, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(H, 0, j, r, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + + if (w->compute_t) + { + m = gsl_matrix_submatrix(w->R, 0, top + j, top + j + 3, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(R, 0, j, j + 3, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + + if (w->Z) + { + /* accumulate transformation into Z */ + m = gsl_matrix_submatrix(w->Z, 0, top + j, w->size, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + } /* if (tau != 0.0) */ + + dat[0] = gsl_matrix_get(H, j + 1, j); + dat[1] = gsl_matrix_get(H, j + 2, j); + if (j < N - 3) + dat[2] = gsl_matrix_get(H, j + 3, j); + + scale = fabs(dat[0]) + fabs(dat[1]) + fabs(dat[2]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + dat[2] /= scale; + } + } /* for (j = 0; j < N - 2; ++j) */ + + /* + * Find Householder Q so that + * + * Q [ x y ]^t = [ * 0 ]^t + */ + + scale = fabs(dat[0]) + fabs(dat[1]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + } + + tau = gsl_linalg_householder_transform(&v2.vector); + + if (w->compute_s) + { + m = gsl_matrix_submatrix(w->H, + top + N - 2, + top + N - 3, + 2, + w->size - top - N + 3); + gsl_linalg_householder_hm(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(H, N - 2, N - 3, 2, 3); + gsl_linalg_householder_hm(tau, &v2.vector, &m.matrix); + } + + if (w->compute_t) + { + m = gsl_matrix_submatrix(w->R, + top + N - 2, + top + N - 2, + 2, + w->size - top - N + 2); + gsl_linalg_householder_hm(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(R, N - 2, N - 2, 2, 2); + gsl_linalg_householder_hm(tau, &v2.vector, &m.matrix); + } + + if (w->Q) + { + /* accumulate the transformation into Q */ + m = gsl_matrix_submatrix(w->Q, 0, top + N - 2, w->size, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + + /* + * Find Householder Z so that + * + * [ b_{n,n-1} b_{nn} ] Z = [ 0 * ] + */ + + dat[0] = gsl_matrix_get(R, N - 1, N - 1); + dat[1] = gsl_matrix_get(R, N - 1, N - 2); + scale = fabs(dat[0]) + fabs(dat[1]); + if (scale != 0.0) + { + dat[0] /= scale; + dat[1] /= scale; + } + + tau = gsl_linalg_householder_transform(&v2.vector); + + /* rotate back */ + tmp = gsl_vector_get(&v2.vector, 1); + gsl_vector_set(&v2.vector, 1, 1.0 / tmp); + tau *= tmp * tmp; + + if (w->compute_s) + { + m = gsl_matrix_submatrix(w->H, 0, top + N - 2, top + N, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(H, 0, N - 2, N, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + + if (w->compute_t) + { + m = gsl_matrix_submatrix(w->R, 0, top + N - 2, top + N, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + else + { + m = gsl_matrix_submatrix(R, 0, N - 2, N, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } + + if (w->Z) + { + /* accumulate the transformation into Z */ + m = gsl_matrix_submatrix(w->Z, 0, top + N - 2, w->size, 2); + gsl_linalg_householder_mh(tau, &v2.vector, &m.matrix); + } +} /* gen_qzstep_d() */ + +/* +gen_tri_split_top() + This routine is called when the leading element on the diagonal of R +has become negligible. Split off a 1-by-1 block at the top. + +Inputs: H - upper hessenberg matrix + R - upper triangular matrix + w - workspace +*/ + +static void +gen_tri_split_top(gsl_matrix *H, gsl_matrix *R, gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + size_t j, top; + double cs, sn; + gsl_vector_view xv, yv; + + if (w->needtop) + top = gen_get_submatrix(w->H, H); + + j = 0; + + create_givens(gsl_matrix_get(H, j, j), + gsl_matrix_get(H, j + 1, j), + &cs, + &sn); + sn = -sn; + + if (w->compute_s) + { + xv = gsl_matrix_subrow(w->H, top + j, top, w->size - top); + yv = gsl_matrix_subrow(w->H, top + j + 1, top, w->size - top); + } + else + { + xv = gsl_matrix_row(H, j); + yv = gsl_matrix_row(H, j + 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + gsl_matrix_set(H, j + 1, j, 0.0); + + if (w->compute_t) + { + xv = gsl_matrix_subrow(w->R, top + j, top + 1, w->size - top - 1); + yv = gsl_matrix_subrow(w->R, top + j + 1, top + 1, w->size - top - 1); + } + else + { + xv = gsl_matrix_subrow(R, j, 1, N - 1); + yv = gsl_matrix_subrow(R, j + 1, 1, N - 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Q) + { + xv = gsl_matrix_column(w->Q, top + j); + yv = gsl_matrix_column(w->Q, top + j + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } +} /* gen_tri_split_top() */ + +/* +gen_tri_chase_zero() + This routine is called when an element on the diagonal of R +has become negligible. Chase the zero to the bottom of the active +block so we can split off a 1-by-1 block. + +Inputs: H - upper hessenberg matrix + R - upper triangular matrix + q - index such that R(q,q) = 0 (q must be > 0) + w - workspace +*/ + +static inline void +gen_tri_chase_zero(gsl_matrix *H, gsl_matrix *R, size_t q, + gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + size_t j, top; + double cs, sn; + gsl_vector_view xv, yv; + + if (w->needtop) + top = gen_get_submatrix(w->H, H); + + for (j = q; j < N - 1; ++j) + { + create_givens(gsl_matrix_get(R, j, j + 1), + gsl_matrix_get(R, j + 1, j + 1), + &cs, + &sn); + sn = -sn; + + if (w->compute_t) + { + xv = gsl_matrix_subrow(w->R, top + j, top + j + 1, w->size - top - j - 1); + yv = gsl_matrix_subrow(w->R, top + j + 1, top + j + 1, w->size - top - j - 1); + } + else + { + xv = gsl_matrix_subrow(R, j, j + 1, N - j - 1); + yv = gsl_matrix_subrow(R, j + 1, j + 1, N - j - 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + gsl_matrix_set(R, j + 1, j + 1, 0.0); + + if (w->compute_s) + { + xv = gsl_matrix_subrow(w->H, top + j, top + j - 1, w->size - top - j + 1); + yv = gsl_matrix_subrow(w->H, top + j + 1, top + j - 1, w->size - top - j + 1); + } + else + { + xv = gsl_matrix_subrow(H, j, j - 1, N - j + 1); + yv = gsl_matrix_subrow(H, j + 1, j - 1, N - j + 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Q) + { + /* accumulate Q */ + xv = gsl_matrix_column(w->Q, top + j); + yv = gsl_matrix_column(w->Q, top + j + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + + create_givens(gsl_matrix_get(H, j + 1, j), + gsl_matrix_get(H, j + 1, j - 1), + &cs, + &sn); + sn = -sn; + + if (w->compute_s) + { + xv = gsl_matrix_subcolumn(w->H, top + j, 0, top + j + 2); + yv = gsl_matrix_subcolumn(w->H, top + j - 1, 0, top + j + 2); + } + else + { + xv = gsl_matrix_subcolumn(H, j, 0, j + 2); + yv = gsl_matrix_subcolumn(H, j - 1, 0, j + 2); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + gsl_matrix_set(H, j + 1, j - 1, 0.0); + + if (w->compute_t) + { + xv = gsl_matrix_subcolumn(w->R, top + j, 0, top + j + 1); + yv = gsl_matrix_subcolumn(w->R, top + j - 1, 0, top + j + 1); + } + else + { + xv = gsl_matrix_subcolumn(R, j, 0, j + 1); + yv = gsl_matrix_subcolumn(R, j - 1, 0, j + 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Z) + { + /* accumulate Z */ + xv = gsl_matrix_column(w->Z, top + j); + yv = gsl_matrix_column(w->Z, top + j - 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + } +} /* gen_tri_chase_zero() */ + +/* +gen_tri_zero_H() + Companion function to get_tri_chase_zero(). After the zero on +the diagonal of R has been chased to the bottom, we zero the element +H(n, n - 1) in order to split off a 1-by-1 block. +*/ + +static inline void +gen_tri_zero_H(gsl_matrix *H, gsl_matrix *R, gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + size_t top; + double cs, sn; + gsl_vector_view xv, yv; + + if (w->needtop) + top = gen_get_submatrix(w->H, H); + + create_givens(gsl_matrix_get(H, N - 1, N - 1), + gsl_matrix_get(H, N - 1, N - 2), + &cs, + &sn); + sn = -sn; + + if (w->compute_s) + { + xv = gsl_matrix_subcolumn(w->H, top + N - 1, 0, top + N); + yv = gsl_matrix_subcolumn(w->H, top + N - 2, 0, top + N); + } + else + { + xv = gsl_matrix_column(H, N - 1); + yv = gsl_matrix_column(H, N - 2); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + gsl_matrix_set(H, N - 1, N - 2, 0.0); + + if (w->compute_t) + { + xv = gsl_matrix_subcolumn(w->R, top + N - 1, 0, top + N - 1); + yv = gsl_matrix_subcolumn(w->R, top + N - 2, 0, top + N - 1); + } + else + { + xv = gsl_matrix_subcolumn(R, N - 1, 0, N - 1); + yv = gsl_matrix_subcolumn(R, N - 2, 0, N - 1); + } + + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (w->Z) + { + /* accumulate Z */ + xv = gsl_matrix_column(w->Z, top + N - 1); + yv = gsl_matrix_column(w->Z, top + N - 2); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } +} /* gen_tri_zero_H() */ + +/* +gen_search_small_elements() + This routine searches for small elements in the matrix pencil +(H, R) to determine if any eigenvalues have converged. + +Tests: + +1. Test if the Hessenberg matrix has a small subdiagonal element: + H(i, i - 1) < tolerance + +2. Test if the Triangular matrix has a small diagonal element: + R(i, i) < tolerance + +Possible outcomes: + +(A) Neither test passed: in this case 'flag' is set to 0 and the + function returns 0 + +(B) Test 1 passes and 2 does not: in this case 'flag' is set to 1 + and we return the row index i such that H(i, i - 1) < tol + +(C) Test 2 passes and 1 does not: in this case 'flag' is set to 2 + and we return the index i such that R(i, i) < tol + +(D) Tests 1 and 2 both pass: in this case 'flag' is set to 3 and + we return the index i such that H(i, i - 1) < tol and R(i, i) < tol + +Inputs: H - upper Hessenberg matrix + R - upper Triangular matrix + flag - (output) flag set on output (see above) + w - workspace + +Return: see above +*/ + +static inline size_t +gen_search_small_elements(gsl_matrix *H, gsl_matrix *R, + int *flag, gsl_eigen_gen_workspace *w) +{ + const size_t N = H->size1; + int k; + size_t i; + int pass1 = 0; + int pass2 = 0; + + for (k = (int) N - 1; k >= 0; --k) + { + i = (size_t) k; + + if (i != 0 && fabs(gsl_matrix_get(H, i, i - 1)) <= w->atol) + { + gsl_matrix_set(H, i, i - 1, 0.0); + pass1 = 1; + } + + if (fabs(gsl_matrix_get(R, i, i)) < w->btol) + { + gsl_matrix_set(R, i, i, 0.0); + pass2 = 1; + } + + if (pass1 && !pass2) /* case B */ + { + *flag = 1; + return (i); + } + else if (!pass1 && pass2) /* case C */ + { + *flag = 2; + return (i); + } + else if (pass1 && pass2) /* case D */ + { + *flag = 3; + return (i); + } + } + + /* neither test passed: case A */ + + *flag = 0; + return (0); +} /* gen_search_subdiag_small_elements() */ + +/* +gen_schur_standardize1() + This function is called when a 1-by-1 block has converged - +convert the block to standard form and update the Schur forms and +vectors if required. Standard form here means that the diagonal +element of B is positive. + +Inputs: A - 1-by-1 matrix in Schur form S + B - 1-by-1 matrix in Schur form T + alphar - where to store real part of eigenvalue numerator + beta - where to store eigenvalue denominator + w - workspace + +Return: success +*/ + +static int +gen_schur_standardize1(gsl_matrix *A, gsl_matrix *B, double *alphar, + double *beta, gsl_eigen_gen_workspace *w) +{ + size_t i; + size_t top; + + /* + * it is a 1-by-1 block - the only requirement is that + * B_{00} is > 0, so if it isn't apply a -I transformation + */ + if (gsl_matrix_get(B, 0, 0) < 0.0) + { + if (w->needtop) + top = gen_get_submatrix(w->H, A); + + if (w->compute_t) + { + for (i = 0; i <= top; ++i) + gsl_matrix_set(w->R, i, top, -gsl_matrix_get(w->R, i, top)); + } + else + gsl_matrix_set(B, 0, 0, -gsl_matrix_get(B, 0, 0)); + + if (w->compute_s) + { + for (i = 0; i <= top; ++i) + gsl_matrix_set(w->H, i, top, -gsl_matrix_get(w->H, i, top)); + } + else + gsl_matrix_set(A, 0, 0, -gsl_matrix_get(A, 0, 0)); + + if (w->Z) + { + for (i = 0; i < w->size; ++i) + gsl_matrix_set(w->Z, i, top, -gsl_matrix_get(w->Z, i, top)); + } + } + + *alphar = gsl_matrix_get(A, 0, 0); + *beta = gsl_matrix_get(B, 0, 0); + + return GSL_SUCCESS; +} /* gen_schur_standardize1() */ + +/* +gen_schur_standardize2() + This function is called when a 2-by-2 generalized block has +converged. Convert the block to standard form, which means B +is rotated so that + +B = [ B11 0 ] with B11, B22 non-negative + [ 0 B22 ] + +If the resulting block (A, B) has complex eigenvalues, they are +computed. Otherwise, the function will return GSL_CONTINUE to +notify caller that we need to do more single shift sweeps to +convert the 2-by-2 block into two 1-by-1 blocks. + +Inputs: A - 2-by-2 submatrix of schur form S + B - 2-by-2 submatrix of schur form T + alpha1 - (output) where to store eigenvalue 1 numerator + alpha2 - (output) where to store eigenvalue 2 numerator + beta1 - (output) where to store eigenvalue 1 denominator + beta2 - (output) where to store eigenvalue 2 denominator + w - workspace + +Return: GSL_SUCCESS if block has complex eigenvalues (they are computed) + GSL_CONTINUE if block has real eigenvalues (they are not computed) +*/ + +static int +gen_schur_standardize2(gsl_matrix *A, gsl_matrix *B, gsl_complex *alpha1, + gsl_complex *alpha2, double *beta1, double *beta2, + gsl_eigen_gen_workspace *w) +{ + double datB[4], + datV[4], + datS[2], + work[2]; + gsl_matrix_view uv = gsl_matrix_view_array(datB, 2, 2); + gsl_matrix_view vv = gsl_matrix_view_array(datV, 2, 2); + gsl_vector_view sv = gsl_vector_view_array(datS, 2); + gsl_vector_view wv = gsl_vector_view_array(work, 2); + double B11, B22; + size_t top; + double det; + double cr, sr, cl, sl; + gsl_vector_view xv, yv; + int s; + + if (w->needtop) + top = gen_get_submatrix(w->H, A); + + /* + * Rotate B so that + * + * B = [ B11 0 ] + * [ 0 B22 ] + * + * with B11 non-negative + */ + + gsl_matrix_memcpy(&uv.matrix, B); + gsl_linalg_SV_decomp(&uv.matrix, &vv.matrix, &sv.vector, &wv.vector); + + /* + * Right now, B = U S V^t, where S = diag(s) + * + * The SVD routine may have computed reflection matrices U and V, + * but it would be much nicer to have rotations since we won't have + * to use BLAS mat-mat multiplications to update our matrices, + * and can instead use drot. So convert them to rotations if + * necessary + */ + + det = gsl_matrix_get(&vv.matrix, 0, 0) * gsl_matrix_get(&vv.matrix, 1, 1) - + gsl_matrix_get(&vv.matrix, 0, 1) * gsl_matrix_get(&vv.matrix, 1, 0); + if (det < 0.0) + { + /* V is a reflection, convert it to a rotation by inserting + * F = [1 0; 0 -1] so that: + * + * B = U S [1 0] [1 0] V^t + * [0 -1] [0 -1] + * + * so S -> S F and V -> V F where F is the reflection matrix + * We just need to invert S22 since the first column of V + * will remain unchanged and we can just read off the CS and SN + * parameters. + */ + datS[1] = -datS[1]; + } + + cr = gsl_matrix_get(&vv.matrix, 0, 0); + sr = gsl_matrix_get(&vv.matrix, 1, 0); + + /* same for U */ + det = gsl_matrix_get(&uv.matrix, 0, 0) * gsl_matrix_get(&uv.matrix, 1, 1) - + gsl_matrix_get(&uv.matrix, 0, 1) * gsl_matrix_get(&uv.matrix, 1, 0); + if (det < 0.0) + datS[1] = -datS[1]; + + cl = gsl_matrix_get(&uv.matrix, 0, 0); + sl = gsl_matrix_get(&uv.matrix, 1, 0); + + B11 = gsl_vector_get(&sv.vector, 0); + B22 = gsl_vector_get(&sv.vector, 1); + + /* make sure B11 is positive */ + if (B11 < 0.0) + { + B11 = -B11; + B22 = -B22; + cr = -cr; + sr = -sr; + } + + /* + * At this point, + * + * [ S11 0 ] = [ CSL SNL ] B [ CSR -SNR ] + * [ 0 S22 ] [-SNL CSL ] [ SNR CSR ] + * + * apply rotations to H and rest of R + */ + + if (w->compute_s) + { + xv = gsl_matrix_subrow(w->H, top, top, w->size - top); + yv = gsl_matrix_subrow(w->H, top + 1, top, w->size - top); + gsl_blas_drot(&xv.vector, &yv.vector, cl, sl); + + xv = gsl_matrix_subcolumn(w->H, top, 0, top + 2); + yv = gsl_matrix_subcolumn(w->H, top + 1, 0, top + 2); + gsl_blas_drot(&xv.vector, &yv.vector, cr, sr); + } + else + { + xv = gsl_matrix_row(A, 0); + yv = gsl_matrix_row(A, 1); + gsl_blas_drot(&xv.vector, &yv.vector, cl, sl); + + xv = gsl_matrix_column(A, 0); + yv = gsl_matrix_column(A, 1); + gsl_blas_drot(&xv.vector, &yv.vector, cr, sr); + } + + if (w->compute_t) + { + if (top != (w->size - 2)) + { + xv = gsl_matrix_subrow(w->R, top, top + 2, w->size - top - 2); + yv = gsl_matrix_subrow(w->R, top + 1, top + 2, w->size - top - 2); + gsl_blas_drot(&xv.vector, &yv.vector, cl, sl); + } + + if (top != 0) + { + xv = gsl_matrix_subcolumn(w->R, top, 0, top); + yv = gsl_matrix_subcolumn(w->R, top + 1, 0, top); + gsl_blas_drot(&xv.vector, &yv.vector, cr, sr); + } + } + + if (w->Q) + { + xv = gsl_matrix_column(w->Q, top); + yv = gsl_matrix_column(w->Q, top + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cl, sl); + } + + if (w->Z) + { + xv = gsl_matrix_column(w->Z, top); + yv = gsl_matrix_column(w->Z, top + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cr, sr); + } + + gsl_matrix_set(B, 0, 0, B11); + gsl_matrix_set(B, 0, 1, 0.0); + gsl_matrix_set(B, 1, 0, 0.0); + gsl_matrix_set(B, 1, 1, B22); + + /* if B22 is < 0, make it positive by negating its column */ + if (B22 < 0.0) + { + size_t i; + + if (w->compute_s) + { + for (i = 0; i < top + 2; ++i) + gsl_matrix_set(w->H, i, top + 1, -gsl_matrix_get(w->H, i, top + 1)); + } + else + { + gsl_matrix_set(A, 0, 1, -gsl_matrix_get(A, 0, 1)); + gsl_matrix_set(A, 1, 1, -gsl_matrix_get(A, 1, 1)); + } + + if (w->compute_t) + { + for (i = 0; i < top + 2; ++i) + gsl_matrix_set(w->R, i, top + 1, -gsl_matrix_get(w->R, i, top + 1)); + } + else + { + gsl_matrix_set(B, 0, 1, -gsl_matrix_get(B, 0, 1)); + gsl_matrix_set(B, 1, 1, -gsl_matrix_get(B, 1, 1)); + } + + if (w->Z) + { + xv = gsl_matrix_column(w->Z, top + 1); + gsl_vector_scale(&xv.vector, -1.0); + } + } + + /* our block is now in standard form - compute eigenvalues */ + + s = gen_compute_eigenvals(A, B, alpha1, alpha2, beta1, beta2); + + return s; +} /* gen_schur_standardize2() */ + +/* +gen_compute_eigenvals() + Compute the complex eigenvalues of a 2-by-2 block + +Return: GSL_CONTINUE if block contains real eigenvalues (they are not + computed) + GSL_SUCCESS on normal completion +*/ + +static int +gen_compute_eigenvals(gsl_matrix *A, gsl_matrix *B, gsl_complex *alpha1, + gsl_complex *alpha2, double *beta1, double *beta2) +{ + double wr1, wr2, wi, scale1, scale2; + double s1inv; + double A11, A12, A21, A22; + double B11, B22; + double c11r, c11i, c12, c21, c22r, c22i; + double cz, cq; + double szr, szi, sqr, sqi; + double a1r, a1i, a2r, a2i, b1r, b1i, b1a, b2r, b2i, b2a; + double alphar, alphai; + double t1, an, bn, tempr, tempi, wabs; + + /* + * This function is called from gen_schur_standardize2() and + * its possible the standardization has perturbed the eigenvalues + * onto the real line - so check for this before computing them + */ + + gsl_schur_gen_eigvals(A, B, &wr1, &wr2, &wi, &scale1, &scale2); + if (wi == 0.0) + return GSL_CONTINUE; /* real eigenvalues - continue QZ iteration */ + + /* complex eigenvalues - compute alpha and beta */ + + s1inv = 1.0 / scale1; + + A11 = gsl_matrix_get(A, 0, 0); + A12 = gsl_matrix_get(A, 0, 1); + A21 = gsl_matrix_get(A, 1, 0); + A22 = gsl_matrix_get(A, 1, 1); + + B11 = gsl_matrix_get(B, 0, 0); + B22 = gsl_matrix_get(B, 1, 1); + + c11r = scale1 * A11 - wr1 * B11; + c11i = -wi * B11; + c12 = scale1 * A12; + c21 = scale1 * A21; + c22r = scale1 * A22 - wr1 * B22; + c22i = -wi * B22; + + if (fabs(c11r) + fabs(c11i) + fabs(c12) > + fabs(c21) + fabs(c22r) + fabs(c22i)) + { + t1 = gsl_hypot3(c12, c11r, c11i); + if (t1 != 0.0) + { + cz = c12 / t1; + szr = -c11r / t1; + szi = -c11i / t1; + } + else + { + cz = 0.0; + szr = 1.0; + szi = 0.0; + } + } + else + { + cz = hypot(c22r, c22i); + if (cz <= GSL_DBL_MIN) + { + cz = 0.0; + szr = 1.0; + szi = 0.0; + } + else + { + tempr = c22r / cz; + tempi = c22i / cz; + t1 = hypot(cz, c21); + cz /= t1; + szr = -c21*tempr / t1; + szi = c21*tempi / t1; + } + } + + an = fabs(A11) + fabs(A12) + fabs(A21) + fabs(A22); + bn = fabs(B11) + fabs(B22); + wabs = fabs(wr1) + fabs(wi); + if (scale1*an > wabs*bn) + { + cq = cz * B11; + if (cq <= GSL_DBL_MIN) + { + cq = 0.0; + sqr = 1.0; + sqi = 0.0; + } + else + { + sqr = szr * B22; + sqi = -szi * B22; + } + } + else + { + a1r = cz * A11 + szr * A12; + a1i = szi * A12; + a2r = cz * A21 + szr * A22; + a2i = szi * A22; + cq = hypot(a1r, a1i); + if (cq <= GSL_DBL_MIN) + { + cq = 0.0; + sqr = 1.0; + sqi = 0.0; + } + else + { + tempr = a1r / cq; + tempi = a1i / cq; + sqr = tempr * a2r + tempi * a2i; + sqi = tempi * a2r - tempr * a2i; + } + } + + t1 = gsl_hypot3(cq, sqr, sqi); + cq /= t1; + sqr /= t1; + sqi /= t1; + + tempr = sqr*szr - sqi*szi; + tempi = sqr*szi + sqi*szr; + b1r = cq*cz*B11 + tempr*B22; + b1i = tempi*B22; + b1a = hypot(b1r, b1i); + b2r = cq*cz*B22 + tempr*B11; + b2i = -tempi*B11; + b2a = hypot(b2r, b2i); + + *beta1 = b1a; + *beta2 = b2a; + + alphar = (wr1 * b1a) * s1inv; + alphai = (wi * b1a) * s1inv; + GSL_SET_COMPLEX(alpha1, alphar, alphai); + + alphar = (wr1 * b2a) * s1inv; + alphai = -(wi * b2a) * s1inv; + GSL_SET_COMPLEX(alpha2, alphar, alphai); + + return GSL_SUCCESS; +} /* gen_compute_eigenvals() */ + +/* +gen_store_eigval1() + Store eigenvalue of a 1-by-1 block into the alpha and beta +output vectors. This routine ensures that eigenvalues are stored +in the same order as they appear in the Schur form and updates +various internal workspace quantities. +*/ + +static void +gen_store_eigval1(const gsl_matrix *H, const double a, const double b, + gsl_vector_complex *alpha, + gsl_vector *beta, gsl_eigen_gen_workspace *w) +{ + size_t top = gen_get_submatrix(w->H, H); + gsl_complex z; + + GSL_SET_COMPLEX(&z, a, 0.0); + + gsl_vector_complex_set(alpha, top, z); + gsl_vector_set(beta, top, b); + + w->n_evals += 1; + w->n_iter = 0; + w->eshift = 0.0; +} /* gen_store_eigval1() */ + +/* +gen_store_eigval2() + Store eigenvalues of a 2-by-2 block into the alpha and beta +output vectors. This routine ensures that eigenvalues are stored +in the same order as they appear in the Schur form and updates +various internal workspace quantities. +*/ + +static void +gen_store_eigval2(const gsl_matrix *H, const gsl_complex *alpha1, + const double beta1, const gsl_complex *alpha2, + const double beta2, gsl_vector_complex *alpha, + gsl_vector *beta, gsl_eigen_gen_workspace *w) +{ + size_t top = gen_get_submatrix(w->H, H); + + gsl_vector_complex_set(alpha, top, *alpha1); + gsl_vector_set(beta, top, beta1); + + gsl_vector_complex_set(alpha, top + 1, *alpha2); + gsl_vector_set(beta, top + 1, beta2); + + w->n_evals += 2; + w->n_iter = 0; + w->eshift = 0.0; +} /* gen_store_eigval2() */ + +/* +gen_get_submatrix() + B is a submatrix of A. The goal of this function is to +compute the indices in A of where the matrix B resides +*/ + +static inline size_t +gen_get_submatrix(const gsl_matrix *A, const gsl_matrix *B) +{ + size_t diff; + double ratio; + size_t top; + + diff = (size_t) (B->data - A->data); + + /* B is on the diagonal of A, so measure distance in units of + tda+1 */ + + ratio = (double)diff / ((double) (A->tda + 1)); + + top = (size_t) floor(ratio); + + return top; +} /* gen_get_submatrix() */ + +/* Frobenius norm */ +inline static double +normF (gsl_matrix * A) +{ + size_t i, j, M = A->size1, N = A->size2; + double sum = 0.0, scale = 0.0, ssq = 1.0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + double Aij = gsl_matrix_get (A, i, j); + + if (Aij != 0.0) + { + double ax = fabs (Aij); + + if (scale < ax) + { + ssq = 1.0 + ssq * (scale / ax) * (scale / ax); + scale = ax; + } + else + { + ssq += (ax / scale) * (ax / scale); + } + } + + } + } + + sum = scale * sqrt (ssq); + + return sum; +} + +/* Generate a Givens rotation (cos,sin) which takes v=(x,y) to (|v|,0) + + From Golub and Van Loan, "Matrix Computations", Section 5.1.8 */ + +inline static void +create_givens (const double a, const double b, double *c, double *s) +{ + if (b == 0) + { + *c = 1; + *s = 0; + } + else if (fabs (b) > fabs (a)) + { + double t = -a / b; + double s1 = 1.0 / sqrt (1 + t * t); + *s = s1; + *c = s1 * t; + } + else + { + double t = -b / a; + double c1 = 1.0 / sqrt (1 + t * t); + *c = c1; + *s = c1 * t; + } +} diff --git a/software/gsl-1.15/eigen/genherm.c b/software/gsl-1.15/eigen/genherm.c new file mode 100644 index 000000000..7a6074a47 --- /dev/null +++ b/software/gsl-1.15/eigen/genherm.c @@ -0,0 +1,227 @@ +/* eigen/genherm.c + * + * Copyright (C) 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues of a complex generalized + * hermitian-definite eigensystem A x = \lambda B x, where A and + * B are hermitian, and B is positive-definite. + */ + +/* +gsl_eigen_genherm_alloc() + +Allocate a workspace for solving the generalized hermitian-definite +eigenvalue problem. The size of this workspace is O(3n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_genherm_workspace * +gsl_eigen_genherm_alloc(const size_t n) +{ + gsl_eigen_genherm_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_genherm_workspace *) calloc (1, sizeof (gsl_eigen_genherm_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + + w->herm_workspace_p = gsl_eigen_herm_alloc(n); + if (!w->herm_workspace_p) + { + gsl_eigen_genherm_free(w); + GSL_ERROR_NULL("failed to allocate space for herm workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_genherm_alloc() */ + +/* +gsl_eigen_genherm_free() + Free workspace w +*/ + +void +gsl_eigen_genherm_free (gsl_eigen_genherm_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->herm_workspace_p) + gsl_eigen_herm_free(w->herm_workspace_p); + + free(w); +} /* gsl_eigen_genherm_free() */ + +/* +gsl_eigen_genherm() + +Solve the generalized hermitian-definite eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda. + +Inputs: A - complex hermitian matrix + B - complex hermitian and positive definite matrix + eval - where to store eigenvalues + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_genherm (gsl_matrix_complex * A, gsl_matrix_complex * B, + gsl_vector * eval, gsl_eigen_genherm_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else + { + int s; + + /* compute Cholesky factorization of B */ + s = gsl_linalg_complex_cholesky_decomp(B); + if (s != GSL_SUCCESS) + return s; /* B is not positive definite */ + + /* transform to standard hermitian eigenvalue problem */ + gsl_eigen_genherm_standardize(A, B); + + s = gsl_eigen_herm(A, eval, w->herm_workspace_p); + + return s; + } +} /* gsl_eigen_genherm() */ + +/* +gsl_eigen_genherm_standardize() + Reduce the generalized hermitian-definite eigenproblem to +the standard hermitian eigenproblem by computing + +C = L^{-1} A L^{-H} + +where L L^H is the Cholesky decomposition of B + +Inputs: A - (input/output) complex hermitian matrix + B - complex hermitian, positive definite matrix in Cholesky form + +Return: success + +Notes: A is overwritten by L^{-1} A L^{-H} +*/ + +int +gsl_eigen_genherm_standardize(gsl_matrix_complex *A, + const gsl_matrix_complex *B) +{ + const size_t N = A->size1; + size_t i; + double a, b; + gsl_complex y, z; + + GSL_SET_IMAG(&z, 0.0); + + for (i = 0; i < N; ++i) + { + /* update lower triangle of A(i:n, i:n) */ + + y = gsl_matrix_complex_get(A, i, i); + a = GSL_REAL(y); + y = gsl_matrix_complex_get(B, i, i); + b = GSL_REAL(y); + a /= b * b; + GSL_SET_REAL(&z, a); + gsl_matrix_complex_set(A, i, i, z); + + if (i < N - 1) + { + gsl_vector_complex_view ai = + gsl_matrix_complex_subcolumn(A, i, i + 1, N - i - 1); + gsl_matrix_complex_view ma = + gsl_matrix_complex_submatrix(A, i + 1, i + 1, N - i - 1, N - i - 1); + gsl_vector_complex_const_view bi = + gsl_matrix_complex_const_subcolumn(B, i, i + 1, N - i - 1); + gsl_matrix_complex_const_view mb = + gsl_matrix_complex_const_submatrix(B, i + 1, i + 1, N - i - 1, N - i - 1); + + gsl_blas_zdscal(1.0 / b, &ai.vector); + + GSL_SET_REAL(&z, -0.5 * a); + gsl_blas_zaxpy(z, &bi.vector, &ai.vector); + + gsl_blas_zher2(CblasLower, + GSL_COMPLEX_NEGONE, + &ai.vector, + &bi.vector, + &ma.matrix); + + gsl_blas_zaxpy(z, &bi.vector, &ai.vector); + + gsl_blas_ztrsv(CblasLower, + CblasNoTrans, + CblasNonUnit, + &mb.matrix, + &ai.vector); + } + } + + return GSL_SUCCESS; +} /* gsl_eigen_genherm_standardize() */ diff --git a/software/gsl-1.15/eigen/genhermv.c b/software/gsl-1.15/eigen/genhermv.c new file mode 100644 index 000000000..1c3cc5be8 --- /dev/null +++ b/software/gsl-1.15/eigen/genhermv.c @@ -0,0 +1,205 @@ +/* eigen/genhermv.c + * + * Copyright (C) 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues and eigenvectors of a complex + * generalized hermitian-definite eigensystem A x = \lambda B x, where + * A and B are hermitian, and B is positive-definite. + */ + +static void genhermv_normalize_eigenvectors(gsl_matrix_complex *evec); + +/* +gsl_eigen_genhermv_alloc() + +Allocate a workspace for solving the generalized hermitian-definite +eigenvalue problem. The size of this workspace is O(5n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_genhermv_workspace * +gsl_eigen_genhermv_alloc(const size_t n) +{ + gsl_eigen_genhermv_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_genhermv_workspace *) calloc (1, sizeof (gsl_eigen_genhermv_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + + w->hermv_workspace_p = gsl_eigen_hermv_alloc(n); + if (!w->hermv_workspace_p) + { + gsl_eigen_genhermv_free(w); + GSL_ERROR_NULL("failed to allocate space for hermv workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_genhermv_alloc() */ + +/* +gsl_eigen_genhermv_free() + Free workspace w +*/ + +void +gsl_eigen_genhermv_free (gsl_eigen_genhermv_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->hermv_workspace_p) + gsl_eigen_hermv_free(w->hermv_workspace_p); + + free(w); +} /* gsl_eigen_genhermv_free() */ + +/* +gsl_eigen_genhermv() + +Solve the generalized hermitian-definite eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda and eigenvectors x. + +Inputs: A - complex hermitian matrix + B - complex hermitian and positive definite matrix + eval - where to store eigenvalues + evec - where to store eigenvectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_genhermv (gsl_matrix_complex * A, gsl_matrix_complex * B, + gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_genhermv_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (evec->size1 != N) + { + GSL_ERROR ("eigenvector matrix has wrong size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else + { + int s; + + /* compute Cholesky factorization of B */ + s = gsl_linalg_complex_cholesky_decomp(B); + if (s != GSL_SUCCESS) + return s; /* B is not positive definite */ + + /* transform to standard hermitian eigenvalue problem */ + gsl_eigen_genherm_standardize(A, B); + + /* compute eigenvalues and eigenvectors */ + s = gsl_eigen_hermv(A, eval, evec, w->hermv_workspace_p); + if (s != GSL_SUCCESS) + return s; + + /* backtransform eigenvectors: evec -> L^{-H} evec */ + gsl_blas_ztrsm(CblasLeft, + CblasLower, + CblasConjTrans, + CblasNonUnit, + GSL_COMPLEX_ONE, + B, + evec); + + /* the blas call destroyed the normalization - renormalize */ + genhermv_normalize_eigenvectors(evec); + + return GSL_SUCCESS; + } +} /* gsl_eigen_genhermv() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +genhermv_normalize_eigenvectors() + Normalize eigenvectors so that their Euclidean norm is 1 + +Inputs: evec - eigenvectors +*/ + +static void +genhermv_normalize_eigenvectors(gsl_matrix_complex *evec) +{ + const size_t N = evec->size1; + size_t i; /* looping */ + + for (i = 0; i < N; ++i) + { + gsl_vector_complex_view vi = gsl_matrix_complex_column(evec, i); + double scale = 1.0 / gsl_blas_dznrm2(&vi.vector); + + gsl_blas_zdscal(scale, &vi.vector); + } +} /* genhermv_normalize_eigenvectors() */ diff --git a/software/gsl-1.15/eigen/gensymm.c b/software/gsl-1.15/eigen/gensymm.c new file mode 100644 index 000000000..112dd1f7e --- /dev/null +++ b/software/gsl-1.15/eigen/gensymm.c @@ -0,0 +1,213 @@ +/* eigen/gensymm.c + * + * Copyright (C) 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues of a real generalized + * symmetric-definite eigensystem A x = \lambda B x, where A and + * B are symmetric, and B is positive-definite. + */ + +/* +gsl_eigen_gensymm_alloc() + +Allocate a workspace for solving the generalized symmetric-definite +eigenvalue problem. The size of this workspace is O(2n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_gensymm_workspace * +gsl_eigen_gensymm_alloc(const size_t n) +{ + gsl_eigen_gensymm_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_gensymm_workspace *) calloc (1, sizeof (gsl_eigen_gensymm_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + + w->symm_workspace_p = gsl_eigen_symm_alloc(n); + if (!w->symm_workspace_p) + { + gsl_eigen_gensymm_free(w); + GSL_ERROR_NULL("failed to allocate space for symm workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_gensymm_alloc() */ + +/* +gsl_eigen_gensymm_free() + Free workspace w +*/ + +void +gsl_eigen_gensymm_free (gsl_eigen_gensymm_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->symm_workspace_p) + gsl_eigen_symm_free(w->symm_workspace_p); + + free(w); +} /* gsl_eigen_gensymm_free() */ + +/* +gsl_eigen_gensymm() + +Solve the generalized symmetric-definite eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda. + +Inputs: A - real symmetric matrix + B - real symmetric and positive definite matrix + eval - where to store eigenvalues + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_gensymm (gsl_matrix * A, gsl_matrix * B, gsl_vector * eval, + gsl_eigen_gensymm_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else + { + int s; + + /* compute Cholesky factorization of B */ + s = gsl_linalg_cholesky_decomp(B); + if (s != GSL_SUCCESS) + return s; /* B is not positive definite */ + + /* transform to standard symmetric eigenvalue problem */ + gsl_eigen_gensymm_standardize(A, B); + + s = gsl_eigen_symm(A, eval, w->symm_workspace_p); + + return s; + } +} /* gsl_eigen_gensymm() */ + +/* +gsl_eigen_gensymm_standardize() + Reduce the generalized symmetric-definite eigenproblem to +the standard symmetric eigenproblem by computing + +C = L^{-1} A L^{-t} + +where L L^t is the Cholesky decomposition of B + +Inputs: A - (input/output) real symmetric matrix + B - real symmetric, positive definite matrix in Cholesky form + +Return: success + +Notes: A is overwritten by L^{-1} A L^{-t} +*/ + +int +gsl_eigen_gensymm_standardize(gsl_matrix *A, const gsl_matrix *B) +{ + const size_t N = A->size1; + size_t i; + double a, b, c; + + for (i = 0; i < N; ++i) + { + /* update lower triangle of A(i:n, i:n) */ + + a = gsl_matrix_get(A, i, i); + b = gsl_matrix_get(B, i, i); + a /= b * b; + gsl_matrix_set(A, i, i, a); + + if (i < N - 1) + { + gsl_vector_view ai = gsl_matrix_subcolumn(A, i, i + 1, N - i - 1); + gsl_matrix_view ma = + gsl_matrix_submatrix(A, i + 1, i + 1, N - i - 1, N - i - 1); + gsl_vector_const_view bi = + gsl_matrix_const_subcolumn(B, i, i + 1, N - i - 1); + gsl_matrix_const_view mb = + gsl_matrix_const_submatrix(B, i + 1, i + 1, N - i - 1, N - i - 1); + + gsl_blas_dscal(1.0 / b, &ai.vector); + + c = -0.5 * a; + gsl_blas_daxpy(c, &bi.vector, &ai.vector); + + gsl_blas_dsyr2(CblasLower, -1.0, &ai.vector, &bi.vector, &ma.matrix); + + gsl_blas_daxpy(c, &bi.vector, &ai.vector); + + gsl_blas_dtrsv(CblasLower, + CblasNoTrans, + CblasNonUnit, + &mb.matrix, + &ai.vector); + } + } + + return GSL_SUCCESS; +} /* gsl_eigen_gensymm_standardize() */ diff --git a/software/gsl-1.15/eigen/gensymmv.c b/software/gsl-1.15/eigen/gensymmv.c new file mode 100644 index 000000000..b8d575de8 --- /dev/null +++ b/software/gsl-1.15/eigen/gensymmv.c @@ -0,0 +1,202 @@ +/* eigen/gensymmv.c + * + * Copyright (C) 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues and eigenvectors of a real + * generalized symmetric-definite eigensystem A x = \lambda B x, where + * A and B are symmetric, and B is positive-definite. + */ + +static void gensymmv_normalize_eigenvectors(gsl_matrix *evec); + +/* +gsl_eigen_gensymmv_alloc() + +Allocate a workspace for solving the generalized symmetric-definite +eigenvalue problem. The size of this workspace is O(4n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_gensymmv_workspace * +gsl_eigen_gensymmv_alloc(const size_t n) +{ + gsl_eigen_gensymmv_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_gensymmv_workspace *) calloc (1, sizeof (gsl_eigen_gensymmv_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + + w->symmv_workspace_p = gsl_eigen_symmv_alloc(n); + if (!w->symmv_workspace_p) + { + gsl_eigen_gensymmv_free(w); + GSL_ERROR_NULL("failed to allocate space for symmv workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_gensymmv_alloc() */ + +/* +gsl_eigen_gensymmv_free() + Free workspace w +*/ + +void +gsl_eigen_gensymmv_free (gsl_eigen_gensymmv_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->symmv_workspace_p) + gsl_eigen_symmv_free(w->symmv_workspace_p); + + free(w); +} /* gsl_eigen_gensymmv_free() */ + +/* +gsl_eigen_gensymmv() + +Solve the generalized symmetric-definite eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda and eigenvectors x. + +Inputs: A - real symmetric matrix + B - real symmetric and positive definite matrix + eval - where to store eigenvalues + evec - where to store eigenvectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_gensymmv (gsl_matrix * A, gsl_matrix * B, gsl_vector * eval, + gsl_matrix * evec, gsl_eigen_gensymmv_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (evec->size1 != N) + { + GSL_ERROR ("eigenvector matrix has wrong size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else + { + int s; + + /* compute Cholesky factorization of B */ + s = gsl_linalg_cholesky_decomp(B); + if (s != GSL_SUCCESS) + return s; /* B is not positive definite */ + + /* transform to standard symmetric eigenvalue problem */ + gsl_eigen_gensymm_standardize(A, B); + + /* compute eigenvalues and eigenvectors */ + s = gsl_eigen_symmv(A, eval, evec, w->symmv_workspace_p); + if (s != GSL_SUCCESS) + return s; + + /* backtransform eigenvectors: evec -> L^{-T} evec */ + gsl_blas_dtrsm(CblasLeft, + CblasLower, + CblasTrans, + CblasNonUnit, + 1.0, + B, + evec); + + /* the blas call destroyed the normalization - renormalize */ + gensymmv_normalize_eigenvectors(evec); + + return GSL_SUCCESS; + } +} /* gsl_eigen_gensymmv() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +gensymmv_normalize_eigenvectors() + Normalize eigenvectors so that their Euclidean norm is 1 + +Inputs: evec - eigenvectors +*/ + +static void +gensymmv_normalize_eigenvectors(gsl_matrix *evec) +{ + const size_t N = evec->size1; + size_t i; /* looping */ + + for (i = 0; i < N; ++i) + { + gsl_vector_view vi = gsl_matrix_column(evec, i); + double scale = 1.0 / gsl_blas_dnrm2(&vi.vector); + + gsl_blas_dscal(scale, &vi.vector); + } +} /* gensymmv_normalize_eigenvectors() */ diff --git a/software/gsl-1.15/eigen/genv.c b/software/gsl-1.15/eigen/genv.c new file mode 100644 index 000000000..a309e41e5 --- /dev/null +++ b/software/gsl-1.15/eigen/genv.c @@ -0,0 +1,925 @@ +/* eigen/genv.c + * + * Copyright (C) 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues and eigenvectors of a + * real generalized eigensystem A x = \lambda B x. Left and right + * Schur vectors are optionally computed as well. + * + * This file contains routines based on original code from LAPACK + * which is distributed under the modified BSD license. + */ + +static int genv_get_right_eigenvectors(const gsl_matrix *S, + const gsl_matrix *T, + gsl_matrix *Z, + gsl_matrix_complex *evec, + gsl_eigen_genv_workspace *w); +static void genv_normalize_eigenvectors(gsl_vector_complex *alpha, + gsl_matrix_complex *evec); + +/* +gsl_eigen_genv_alloc() + Allocate a workspace for solving the generalized eigenvalue problem. +The size of this workspace is O(7n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_genv_workspace * +gsl_eigen_genv_alloc(const size_t n) +{ + gsl_eigen_genv_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_genv_workspace *) calloc (1, sizeof (gsl_eigen_genv_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + w->Q = NULL; + w->Z = NULL; + + w->gen_workspace_p = gsl_eigen_gen_alloc(n); + + if (w->gen_workspace_p == 0) + { + gsl_eigen_genv_free(w); + GSL_ERROR_NULL ("failed to allocate space for gen workspace", GSL_ENOMEM); + } + + /* compute the full Schur forms */ + gsl_eigen_gen_params(1, 1, 1, w->gen_workspace_p); + + w->work1 = gsl_vector_alloc(n); + w->work2 = gsl_vector_alloc(n); + w->work3 = gsl_vector_alloc(n); + w->work4 = gsl_vector_alloc(n); + w->work5 = gsl_vector_alloc(n); + w->work6 = gsl_vector_alloc(n); + + if (w->work1 == 0 || w->work2 == 0 || w->work3 == 0 || + w->work4 == 0 || w->work5 == 0 || w->work6 == 0) + { + gsl_eigen_genv_free(w); + GSL_ERROR_NULL ("failed to allocate space for additional workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_genv_alloc() */ + +/* +gsl_eigen_genv_free() + Free workspace w +*/ + +void +gsl_eigen_genv_free(gsl_eigen_genv_workspace *w) +{ + RETURN_IF_NULL (w); + + if (w->gen_workspace_p) + gsl_eigen_gen_free(w->gen_workspace_p); + + if (w->work1) + gsl_vector_free(w->work1); + + if (w->work2) + gsl_vector_free(w->work2); + + if (w->work3) + gsl_vector_free(w->work3); + + if (w->work4) + gsl_vector_free(w->work4); + + if (w->work5) + gsl_vector_free(w->work5); + + if (w->work6) + gsl_vector_free(w->work6); + + free(w); +} /* gsl_eigen_genv_free() */ + +/* +gsl_eigen_genv() + +Solve the generalized eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda and right eigenvectors x. + +Inputs: A - general real matrix + B - general real matrix + alpha - (output) where to store eigenvalue numerators + beta - (output) where to store eigenvalue denominators + evec - (output) where to store eigenvectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_genv (gsl_matrix * A, gsl_matrix * B, gsl_vector_complex * alpha, + gsl_vector * beta, gsl_matrix_complex *evec, + gsl_eigen_genv_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if ((N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("B matrix dimensions must match A", GSL_EBADLEN); + } + else if (alpha->size != N || beta->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (w->size != N) + { + GSL_ERROR ("matrix size does not match workspace", GSL_EBADLEN); + } + else if (evec->size1 != N) + { + GSL_ERROR ("eigenvector matrix has wrong size", GSL_EBADLEN); + } + else + { + int s; + gsl_matrix Z; + + /* + * We need a place to store the right Schur vectors, so we will + * treat evec as a real matrix and store them in the left + * half - the factor of 2 in the tda corresponds to the + * complex multiplicity + */ + Z.size1 = N; + Z.size2 = N; + Z.tda = 2 * N; + Z.data = evec->data; + Z.block = 0; + Z.owner = 0; + + s = gsl_eigen_gen_QZ(A, B, alpha, beta, w->Q, &Z, w->gen_workspace_p); + + if (w->Z) + { + /* save right Schur vectors */ + gsl_matrix_memcpy(w->Z, &Z); + } + + /* only compute eigenvectors if we found all eigenvalues */ + if (s == GSL_SUCCESS) + { + /* compute eigenvectors */ + s = genv_get_right_eigenvectors(A, B, &Z, evec, w); + + if (s == GSL_SUCCESS) + genv_normalize_eigenvectors(alpha, evec); + } + + return s; + } +} /* gsl_eigen_genv() */ + +/* +gsl_eigen_genv_QZ() + +Solve the generalized eigenvalue problem + +A x = \lambda B x + +for the eigenvalues \lambda and right eigenvectors x. Optionally +compute left and/or right Schur vectors Q and Z which satisfy: + +A = Q S Z^t +B = Q T Z^t + +where (S, T) is the generalized Schur form of (A, B) + +Inputs: A - general real matrix + B - general real matrix + alpha - (output) where to store eigenvalue numerators + beta - (output) where to store eigenvalue denominators + evec - (output) where to store eigenvectors + Q - (output) if non-null, where to store left Schur vectors + Z - (output) if non-null, where to store right Schur vectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_genv_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix_complex * evec, + gsl_matrix * Q, gsl_matrix * Z, + gsl_eigen_genv_workspace * w) +{ + if (Q && (A->size1 != Q->size1 || A->size1 != Q->size2)) + { + GSL_ERROR("Q matrix has wrong dimensions", GSL_EBADLEN); + } + else if (Z && (A->size1 != Z->size1 || A->size1 != Z->size2)) + { + GSL_ERROR("Z matrix has wrong dimensions", GSL_EBADLEN); + } + else + { + int s; + + w->Q = Q; + w->Z = Z; + + s = gsl_eigen_genv(A, B, alpha, beta, evec, w); + + w->Q = NULL; + w->Z = NULL; + + return s; + } +} /* gsl_eigen_genv_QZ() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +genv_get_right_eigenvectors() + Compute right eigenvectors of the Schur form (S, T) and then +backtransform them using the right Schur vectors to get right +eigenvectors of the original system. + +Inputs: S - upper quasi-triangular Schur form of A + T - upper triangular Schur form of B + Z - right Schur vectors + evec - (output) where to store eigenvectors + w - workspace + +Return: success or error + +Notes: 1) based on LAPACK routine DTGEVC + 2) eigenvectors are stored in the order that their + eigenvalues appear in the Schur form +*/ + +static int +genv_get_right_eigenvectors(const gsl_matrix *S, const gsl_matrix *T, + gsl_matrix *Z, + gsl_matrix_complex *evec, + gsl_eigen_genv_workspace *w) +{ + const size_t N = w->size; + const double small = GSL_DBL_MIN * N / GSL_DBL_EPSILON; + const double big = 1.0 / small; + const double bignum = 1.0 / (GSL_DBL_MIN * N); + size_t i, j, k, end; + int is; + double anorm, bnorm; + double temp, temp2, temp2r, temp2i; + double ascale, bscale; + double salfar, sbeta; + double acoef, bcoefr, bcoefi, acoefa, bcoefa; + double creala, cimaga, crealb, cimagb, cre2a, cim2a, cre2b, cim2b; + double dmin, xmax; + double scale; + size_t nw, na; + int lsa, lsb; + int complex_pair; + gsl_complex z_zero, z_one; + double bdiag[2] = { 0.0, 0.0 }; + double sum[4]; + int il2by2; + size_t jr, jc, ja; + double xscale; + gsl_vector_complex_view ecol; + gsl_vector_view re, im, re2, im2; + + GSL_SET_COMPLEX(&z_zero, 0.0, 0.0); + GSL_SET_COMPLEX(&z_one, 1.0, 0.0); + + /* + * Compute the 1-norm of each column of (S, T) excluding elements + * belonging to the diagonal blocks to check for possible overflow + * in the triangular solver + */ + + anorm = fabs(gsl_matrix_get(S, 0, 0)); + if (N > 1) + anorm += fabs(gsl_matrix_get(S, 1, 0)); + bnorm = fabs(gsl_matrix_get(T, 0, 0)); + + gsl_vector_set(w->work1, 0, 0.0); + gsl_vector_set(w->work2, 0, 0.0); + + for (j = 1; j < N; ++j) + { + temp = temp2 = 0.0; + if (gsl_matrix_get(S, j, j - 1) == 0.0) + end = j; + else + end = j - 1; + + for (i = 0; i < end; ++i) + { + temp += fabs(gsl_matrix_get(S, i, j)); + temp2 += fabs(gsl_matrix_get(T, i, j)); + } + + gsl_vector_set(w->work1, j, temp); + gsl_vector_set(w->work2, j, temp2); + + for (i = end; i < GSL_MIN(j + 2, N); ++i) + { + temp += fabs(gsl_matrix_get(S, i, j)); + temp2 += fabs(gsl_matrix_get(T, i, j)); + } + + anorm = GSL_MAX(anorm, temp); + bnorm = GSL_MAX(bnorm, temp2); + } + + ascale = 1.0 / GSL_MAX(anorm, GSL_DBL_MIN); + bscale = 1.0 / GSL_MAX(bnorm, GSL_DBL_MIN); + + complex_pair = 0; + for (k = 0; k < N; ++k) + { + size_t je = N - 1 - k; + + if (complex_pair) + { + complex_pair = 0; + continue; + } + + nw = 1; + if (je > 0) + { + if (gsl_matrix_get(S, je, je - 1) != 0.0) + { + complex_pair = 1; + nw = 2; + } + } + + if (!complex_pair) + { + if (fabs(gsl_matrix_get(S, je, je)) <= GSL_DBL_MIN && + fabs(gsl_matrix_get(T, je, je)) <= GSL_DBL_MIN) + { + /* singular matrix pencil - unit eigenvector */ + for (i = 0; i < N; ++i) + gsl_matrix_complex_set(evec, i, je, z_zero); + + gsl_matrix_complex_set(evec, je, je, z_one); + + continue; + } + + /* clear vector */ + for (i = 0; i < N; ++i) + gsl_vector_set(w->work3, i, 0.0); + } + else + { + /* clear vectors */ + for (i = 0; i < N; ++i) + { + gsl_vector_set(w->work3, i, 0.0); + gsl_vector_set(w->work4, i, 0.0); + } + } + + if (!complex_pair) + { + /* real eigenvalue */ + + temp = 1.0 / GSL_MAX(GSL_DBL_MIN, + GSL_MAX(fabs(gsl_matrix_get(S, je, je)) * ascale, + fabs(gsl_matrix_get(T, je, je)) * bscale)); + salfar = (temp * gsl_matrix_get(S, je, je)) * ascale; + sbeta = (temp * gsl_matrix_get(T, je, je)) * bscale; + acoef = sbeta * ascale; + bcoefr = salfar * bscale; + bcoefi = 0.0; + + /* scale to avoid underflow */ + scale = 1.0; + lsa = fabs(sbeta) >= GSL_DBL_MIN && fabs(acoef) < small; + lsb = fabs(salfar) >= GSL_DBL_MIN && fabs(bcoefr) < small; + if (lsa) + scale = (small / fabs(sbeta)) * GSL_MIN(anorm, big); + if (lsb) + scale = GSL_MAX(scale, (small / fabs(salfar)) * GSL_MIN(bnorm, big)); + + if (lsa || lsb) + { + scale = GSL_MIN(scale, + 1.0 / (GSL_DBL_MIN * + GSL_MAX(1.0, + GSL_MAX(fabs(acoef), fabs(bcoefr))))); + if (lsa) + acoef = ascale * (scale * sbeta); + else + acoef *= scale; + + if (lsb) + bcoefr = bscale * (scale * salfar); + else + bcoefr *= scale; + } + + acoefa = fabs(acoef); + bcoefa = fabs(bcoefr); + + /* first component is 1 */ + gsl_vector_set(w->work3, je, 1.0); + xmax = 1.0; + + /* compute contribution from column je of A and B to sum */ + + for (i = 0; i < je; ++i) + { + gsl_vector_set(w->work3, i, + bcoefr*gsl_matrix_get(T, i, je) - + acoef * gsl_matrix_get(S, i, je)); + } + } + else + { + gsl_matrix_const_view vs = + gsl_matrix_const_submatrix(S, je - 1, je - 1, 2, 2); + gsl_matrix_const_view vt = + gsl_matrix_const_submatrix(T, je - 1, je - 1, 2, 2); + + /* complex eigenvalue */ + + gsl_schur_gen_eigvals(&vs.matrix, + &vt.matrix, + &bcoefr, + &temp2, + &bcoefi, + &acoef, + &temp); + if (bcoefi == 0.0) + { + GSL_ERROR("gsl_schur_gen_eigvals failed on complex block", GSL_FAILURE); + } + + /* scale to avoid over/underflow */ + acoefa = fabs(acoef); + bcoefa = fabs(bcoefr) + fabs(bcoefi); + scale = 1.0; + + if (acoefa*GSL_DBL_EPSILON < GSL_DBL_MIN && acoefa >= GSL_DBL_MIN) + scale = (GSL_DBL_MIN / GSL_DBL_EPSILON) / acoefa; + if (bcoefa*GSL_DBL_EPSILON < GSL_DBL_MIN && bcoefa >= GSL_DBL_MIN) + scale = GSL_MAX(scale, (GSL_DBL_MIN/GSL_DBL_EPSILON) / bcoefa); + if (GSL_DBL_MIN*acoefa > ascale) + scale = ascale / (GSL_DBL_MIN * acoefa); + if (GSL_DBL_MIN*bcoefa > bscale) + scale = GSL_MIN(scale, bscale / (GSL_DBL_MIN*bcoefa)); + if (scale != 1.0) + { + acoef *= scale; + acoefa = fabs(acoef); + bcoefr *= scale; + bcoefi *= scale; + bcoefa = fabs(bcoefr) + fabs(bcoefi); + } + + /* compute first two components of eigenvector */ + + temp = acoef * gsl_matrix_get(S, je, je - 1); + temp2r = acoef * gsl_matrix_get(S, je, je) - + bcoefr * gsl_matrix_get(T, je, je); + temp2i = -bcoefi * gsl_matrix_get(T, je, je); + + if (fabs(temp) >= fabs(temp2r) + fabs(temp2i)) + { + gsl_vector_set(w->work3, je, 1.0); + gsl_vector_set(w->work4, je, 0.0); + gsl_vector_set(w->work3, je - 1, -temp2r / temp); + gsl_vector_set(w->work4, je - 1, -temp2i / temp); + } + else + { + gsl_vector_set(w->work3, je - 1, 1.0); + gsl_vector_set(w->work4, je - 1, 0.0); + temp = acoef * gsl_matrix_get(S, je - 1, je); + gsl_vector_set(w->work3, je, + (bcoefr*gsl_matrix_get(T, je - 1, je - 1) - + acoef*gsl_matrix_get(S, je - 1, je - 1)) / temp); + gsl_vector_set(w->work4, je, + bcoefi*gsl_matrix_get(T, je - 1, je - 1) / temp); + } + + xmax = GSL_MAX(fabs(gsl_vector_get(w->work3, je)) + + fabs(gsl_vector_get(w->work4, je)), + fabs(gsl_vector_get(w->work3, je - 1)) + + fabs(gsl_vector_get(w->work4, je - 1))); + + /* compute contribution from column je and je - 1 */ + + creala = acoef * gsl_vector_get(w->work3, je - 1); + cimaga = acoef * gsl_vector_get(w->work4, je - 1); + crealb = bcoefr * gsl_vector_get(w->work3, je - 1) - + bcoefi * gsl_vector_get(w->work4, je - 1); + cimagb = bcoefi * gsl_vector_get(w->work3, je - 1) + + bcoefr * gsl_vector_get(w->work4, je - 1); + cre2a = acoef * gsl_vector_get(w->work3, je); + cim2a = acoef * gsl_vector_get(w->work4, je); + cre2b = bcoefr * gsl_vector_get(w->work3, je) - + bcoefi * gsl_vector_get(w->work4, je); + cim2b = bcoefi * gsl_vector_get(w->work3, je) + + bcoefr * gsl_vector_get(w->work4, je); + + for (i = 0; i < je - 1; ++i) + { + gsl_vector_set(w->work3, i, + -creala * gsl_matrix_get(S, i, je - 1) + + crealb * gsl_matrix_get(T, i, je - 1) - + cre2a * gsl_matrix_get(S, i, je) + + cre2b * gsl_matrix_get(T, i, je)); + gsl_vector_set(w->work4, i, + -cimaga * gsl_matrix_get(S, i, je - 1) + + cimagb * gsl_matrix_get(T, i, je - 1) - + cim2a * gsl_matrix_get(S, i, je) + + cim2b * gsl_matrix_get(T, i, je)); + } + } + + dmin = GSL_MAX(GSL_DBL_MIN, + GSL_MAX(GSL_DBL_EPSILON*acoefa*anorm, + GSL_DBL_EPSILON*bcoefa*bnorm)); + + /* triangular solve of (a A - b B) x = 0 */ + + il2by2 = 0; + for (is = (int) je - (int) nw; is >= 0; --is) + { + j = (size_t) is; + + if (!il2by2 && j > 0) + { + if (gsl_matrix_get(S, j, j - 1) != 0.0) + { + il2by2 = 1; + continue; + } + } + + bdiag[0] = gsl_matrix_get(T, j, j); + if (il2by2) + { + na = 2; + bdiag[1] = gsl_matrix_get(T, j + 1, j + 1); + } + else + na = 1; + + + if (nw == 1) + { + gsl_matrix_const_view sv = + gsl_matrix_const_submatrix(S, j, j, na, na); + gsl_vector_view xv, bv; + + bv = gsl_vector_subvector(w->work3, j, na); + + /* + * the loop below expects the solution in the first column + * of sum, so set stride to 2 + */ + xv = gsl_vector_view_array_with_stride(sum, 2, na); + + gsl_schur_solve_equation(acoef, + &sv.matrix, + bcoefr, + bdiag[0], + bdiag[1], + &bv.vector, + &xv.vector, + &scale, + &temp, + dmin); + } + else + { + double bdat[4]; + gsl_matrix_const_view sv = + gsl_matrix_const_submatrix(S, j, j, na, na); + gsl_vector_complex_view xv = + gsl_vector_complex_view_array(sum, na); + gsl_vector_complex_view bv = + gsl_vector_complex_view_array(bdat, na); + gsl_complex z; + + bdat[0] = gsl_vector_get(w->work3, j); + bdat[1] = gsl_vector_get(w->work4, j); + if (na == 2) + { + bdat[2] = gsl_vector_get(w->work3, j + 1); + bdat[3] = gsl_vector_get(w->work4, j + 1); + } + + GSL_SET_COMPLEX(&z, bcoefr, bcoefi); + + gsl_schur_solve_equation_z(acoef, + &sv.matrix, + &z, + bdiag[0], + bdiag[1], + &bv.vector, + &xv.vector, + &scale, + &temp, + dmin); + } + + if (scale < 1.0) + { + for (jr = 0; jr <= je; ++jr) + { + gsl_vector_set(w->work3, jr, + scale * gsl_vector_get(w->work3, jr)); + if (nw == 2) + { + gsl_vector_set(w->work4, jr, + scale * gsl_vector_get(w->work4, jr)); + } + } + } + + xmax = GSL_MAX(scale * xmax, temp); + + for (jr = 0; jr < na; ++jr) + { + gsl_vector_set(w->work3, j + jr, sum[jr*na]); + if (nw == 2) + gsl_vector_set(w->work4, j + jr, sum[jr*na + 1]); + } + + if (j > 0) + { + xscale = 1.0 / GSL_MAX(1.0, xmax); + temp = acoefa * gsl_vector_get(w->work1, j) + + bcoefa * gsl_vector_get(w->work2, j); + if (il2by2) + { + temp = GSL_MAX(temp, + acoefa * gsl_vector_get(w->work1, j + 1) + + bcoefa * gsl_vector_get(w->work2, j + 1)); + } + + temp = GSL_MAX(temp, GSL_MAX(acoefa, bcoefa)); + if (temp > bignum * xscale) + { + for (jr = 0; jr <= je; ++jr) + { + gsl_vector_set(w->work3, jr, + xscale * gsl_vector_get(w->work3, jr)); + if (nw == 2) + { + gsl_vector_set(w->work4, jr, + xscale * gsl_vector_get(w->work4, jr)); + } + } + xmax *= xscale; + } + + for (ja = 0; ja < na; ++ja) + { + if (complex_pair) + { + creala = acoef * gsl_vector_get(w->work3, j + ja); + cimaga = acoef * gsl_vector_get(w->work4, j + ja); + crealb = bcoefr * gsl_vector_get(w->work3, j + ja) - + bcoefi * gsl_vector_get(w->work4, j + ja); + cimagb = bcoefi * gsl_vector_get(w->work3, j + ja) + + bcoefr * gsl_vector_get(w->work4, j + ja); + for (jr = 0; jr <= j - 1; ++jr) + { + gsl_vector_set(w->work3, jr, + gsl_vector_get(w->work3, jr) - + creala * gsl_matrix_get(S, jr, j + ja) + + crealb * gsl_matrix_get(T, jr, j + ja)); + gsl_vector_set(w->work4, jr, + gsl_vector_get(w->work4, jr) - + cimaga * gsl_matrix_get(S, jr, j + ja) + + cimagb * gsl_matrix_get(T, jr, j + ja)); + } + } + else + { + creala = acoef * gsl_vector_get(w->work3, j + ja); + crealb = bcoefr * gsl_vector_get(w->work3, j + ja); + for (jr = 0; jr <= j - 1; ++jr) + { + gsl_vector_set(w->work3, jr, + gsl_vector_get(w->work3, jr) - + creala * gsl_matrix_get(S, jr, j + ja) + + crealb * gsl_matrix_get(T, jr, j + ja)); + } + } /* if (!complex_pair) */ + } /* for (ja = 0; ja < na; ++ja) */ + } /* if (j > 0) */ + + il2by2 = 0; + } /* for (i = 0; i < je - nw; ++i) */ + + for (jr = 0; jr < N; ++jr) + { + gsl_vector_set(w->work5, jr, + gsl_vector_get(w->work3, 0) * gsl_matrix_get(Z, jr, 0)); + if (nw == 2) + { + gsl_vector_set(w->work6, jr, + gsl_vector_get(w->work4, 0) * gsl_matrix_get(Z, jr, 0)); + } + } + + for (jc = 1; jc <= je; ++jc) + { + for (jr = 0; jr < N; ++jr) + { + gsl_vector_set(w->work5, jr, + gsl_vector_get(w->work5, jr) + + gsl_vector_get(w->work3, jc) * gsl_matrix_get(Z, jr, jc)); + if (nw == 2) + { + gsl_vector_set(w->work6, jr, + gsl_vector_get(w->work6, jr) + + gsl_vector_get(w->work4, jc) * gsl_matrix_get(Z, jr, jc)); + } + } + } + + /* store the eigenvector */ + + if (complex_pair) + { + ecol = gsl_matrix_complex_column(evec, je - 1); + re = gsl_vector_complex_real(&ecol.vector); + im = gsl_vector_complex_imag(&ecol.vector); + + ecol = gsl_matrix_complex_column(evec, je); + re2 = gsl_vector_complex_real(&ecol.vector); + im2 = gsl_vector_complex_imag(&ecol.vector); + } + else + { + ecol = gsl_matrix_complex_column(evec, je); + re = gsl_vector_complex_real(&ecol.vector); + im = gsl_vector_complex_imag(&ecol.vector); + } + + for (jr = 0; jr < N; ++jr) + { + gsl_vector_set(&re.vector, jr, gsl_vector_get(w->work5, jr)); + if (complex_pair) + { + gsl_vector_set(&im.vector, jr, gsl_vector_get(w->work6, jr)); + gsl_vector_set(&re2.vector, jr, gsl_vector_get(w->work5, jr)); + gsl_vector_set(&im2.vector, jr, -gsl_vector_get(w->work6, jr)); + } + else + { + gsl_vector_set(&im.vector, jr, 0.0); + } + } + + /* scale eigenvector */ + xmax = 0.0; + if (complex_pair) + { + for (j = 0; j < N; ++j) + { + xmax = GSL_MAX(xmax, + fabs(gsl_vector_get(&re.vector, j)) + + fabs(gsl_vector_get(&im.vector, j))); + } + } + else + { + for (j = 0; j < N; ++j) + { + xmax = GSL_MAX(xmax, fabs(gsl_vector_get(&re.vector, j))); + } + } + + if (xmax > GSL_DBL_MIN) + { + xscale = 1.0 / xmax; + for (j = 0; j < N; ++j) + { + gsl_vector_set(&re.vector, j, + gsl_vector_get(&re.vector, j) * xscale); + if (complex_pair) + { + gsl_vector_set(&im.vector, j, + gsl_vector_get(&im.vector, j) * xscale); + gsl_vector_set(&re2.vector, j, + gsl_vector_get(&re2.vector, j) * xscale); + gsl_vector_set(&im2.vector, j, + gsl_vector_get(&im2.vector, j) * xscale); + } + } + } + } /* for (k = 0; k < N; ++k) */ + + return GSL_SUCCESS; +} /* genv_get_right_eigenvectors() */ + +/* +genv_normalize_eigenvectors() + Normalize eigenvectors so that their Euclidean norm is 1 + +Inputs: alpha - eigenvalue numerators + evec - eigenvectors +*/ + +static void +genv_normalize_eigenvectors(gsl_vector_complex *alpha, + gsl_matrix_complex *evec) +{ + const size_t N = evec->size1; + size_t i; /* looping */ + gsl_complex ai; + gsl_vector_complex_view vi; + gsl_vector_view re, im; + double scale; /* scaling factor */ + + for (i = 0; i < N; ++i) + { + ai = gsl_vector_complex_get(alpha, i); + vi = gsl_matrix_complex_column(evec, i); + + re = gsl_vector_complex_real(&vi.vector); + + if (GSL_IMAG(ai) == 0.0) + { + scale = 1.0 / gsl_blas_dnrm2(&re.vector); + gsl_blas_dscal(scale, &re.vector); + } + else if (GSL_IMAG(ai) > 0.0) + { + im = gsl_vector_complex_imag(&vi.vector); + + scale = 1.0 / gsl_hypot(gsl_blas_dnrm2(&re.vector), + gsl_blas_dnrm2(&im.vector)); + gsl_blas_zdscal(scale, &vi.vector); + + vi = gsl_matrix_complex_column(evec, i + 1); + gsl_blas_zdscal(scale, &vi.vector); + } + } +} /* genv_normalize_eigenvectors() */ diff --git a/software/gsl-1.15/eigen/gsl_eigen.h b/software/gsl-1.15/eigen/gsl_eigen.h new file mode 100644 index 000000000..6de8dba11 --- /dev/null +++ b/software/gsl-1.15/eigen/gsl_eigen.h @@ -0,0 +1,347 @@ +/* eigen/gsl_eigen.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 Gerard Jungman, Brian Gough, Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_EIGEN_H__ +#define __GSL_EIGEN_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + size_t size; + double * d; + double * sd; +} gsl_eigen_symm_workspace; + +gsl_eigen_symm_workspace * gsl_eigen_symm_alloc (const size_t n); +void gsl_eigen_symm_free (gsl_eigen_symm_workspace * w); +int gsl_eigen_symm (gsl_matrix * A, gsl_vector * eval, gsl_eigen_symm_workspace * w); + +typedef struct { + size_t size; + double * d; + double * sd; + double * gc; + double * gs; +} gsl_eigen_symmv_workspace; + +gsl_eigen_symmv_workspace * gsl_eigen_symmv_alloc (const size_t n); +void gsl_eigen_symmv_free (gsl_eigen_symmv_workspace * w); +int gsl_eigen_symmv (gsl_matrix * A, gsl_vector * eval, gsl_matrix * evec, gsl_eigen_symmv_workspace * w); + +typedef struct { + size_t size; + double * d; + double * sd; + double * tau; +} gsl_eigen_herm_workspace; + +gsl_eigen_herm_workspace * gsl_eigen_herm_alloc (const size_t n); +void gsl_eigen_herm_free (gsl_eigen_herm_workspace * w); +int gsl_eigen_herm (gsl_matrix_complex * A, gsl_vector * eval, + gsl_eigen_herm_workspace * w); + +typedef struct { + size_t size; + double * d; + double * sd; + double * tau; + double * gc; + double * gs; +} gsl_eigen_hermv_workspace; + +gsl_eigen_hermv_workspace * gsl_eigen_hermv_alloc (const size_t n); +void gsl_eigen_hermv_free (gsl_eigen_hermv_workspace * w); +int gsl_eigen_hermv (gsl_matrix_complex * A, gsl_vector * eval, + gsl_matrix_complex * evec, + gsl_eigen_hermv_workspace * w); + +typedef struct { + size_t size; /* matrix size */ + size_t max_iterations; /* max iterations since last eigenvalue found */ + size_t n_iter; /* number of iterations since last eigenvalue found */ + size_t n_evals; /* number of eigenvalues found so far */ + + int compute_t; /* compute Schur form T = Z^t A Z */ + + gsl_matrix *H; /* pointer to Hessenberg matrix */ + gsl_matrix *Z; /* pointer to Schur vector matrix */ +} gsl_eigen_francis_workspace; + +gsl_eigen_francis_workspace * gsl_eigen_francis_alloc (void); +void gsl_eigen_francis_free (gsl_eigen_francis_workspace * w); +void gsl_eigen_francis_T (const int compute_t, + gsl_eigen_francis_workspace * w); +int gsl_eigen_francis (gsl_matrix * H, gsl_vector_complex * eval, + gsl_eigen_francis_workspace * w); +int gsl_eigen_francis_Z (gsl_matrix * H, gsl_vector_complex * eval, + gsl_matrix * Z, + gsl_eigen_francis_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + gsl_vector *diag; /* diagonal matrix elements from balancing */ + gsl_vector *tau; /* Householder coefficients */ + gsl_matrix *Z; /* pointer to Z matrix */ + int do_balance; /* perform balancing transformation? */ + size_t n_evals; /* number of eigenvalues found */ + + gsl_eigen_francis_workspace *francis_workspace_p; +} gsl_eigen_nonsymm_workspace; + +gsl_eigen_nonsymm_workspace * gsl_eigen_nonsymm_alloc (const size_t n); +void gsl_eigen_nonsymm_free (gsl_eigen_nonsymm_workspace * w); +void gsl_eigen_nonsymm_params (const int compute_t, const int balance, + gsl_eigen_nonsymm_workspace *w); +int gsl_eigen_nonsymm (gsl_matrix * A, gsl_vector_complex * eval, + gsl_eigen_nonsymm_workspace * w); +int gsl_eigen_nonsymm_Z (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix * Z, gsl_eigen_nonsymm_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + gsl_vector *work; /* scratch workspace */ + gsl_vector *work2; /* scratch workspace */ + gsl_vector *work3; /* scratch workspace */ + + gsl_matrix *Z; /* pointer to Schur vectors */ + + gsl_eigen_nonsymm_workspace *nonsymm_workspace_p; +} gsl_eigen_nonsymmv_workspace; + +gsl_eigen_nonsymmv_workspace * gsl_eigen_nonsymmv_alloc (const size_t n); +void gsl_eigen_nonsymmv_free (gsl_eigen_nonsymmv_workspace * w); +void gsl_eigen_nonsymmv_params (const int balance, + gsl_eigen_nonsymmv_workspace *w); +int gsl_eigen_nonsymmv (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix_complex * evec, + gsl_eigen_nonsymmv_workspace * w); +int gsl_eigen_nonsymmv_Z (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix_complex * evec, gsl_matrix * Z, + gsl_eigen_nonsymmv_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + gsl_eigen_symm_workspace *symm_workspace_p; +} gsl_eigen_gensymm_workspace; + +gsl_eigen_gensymm_workspace * gsl_eigen_gensymm_alloc (const size_t n); +void gsl_eigen_gensymm_free (gsl_eigen_gensymm_workspace * w); +int gsl_eigen_gensymm (gsl_matrix * A, gsl_matrix * B, + gsl_vector * eval, gsl_eigen_gensymm_workspace * w); +int gsl_eigen_gensymm_standardize (gsl_matrix * A, const gsl_matrix * B); + +typedef struct { + size_t size; /* size of matrices */ + gsl_eigen_symmv_workspace *symmv_workspace_p; +} gsl_eigen_gensymmv_workspace; + +gsl_eigen_gensymmv_workspace * gsl_eigen_gensymmv_alloc (const size_t n); +void gsl_eigen_gensymmv_free (gsl_eigen_gensymmv_workspace * w); +int gsl_eigen_gensymmv (gsl_matrix * A, gsl_matrix * B, + gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_gensymmv_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + gsl_eigen_herm_workspace *herm_workspace_p; +} gsl_eigen_genherm_workspace; + +gsl_eigen_genherm_workspace * gsl_eigen_genherm_alloc (const size_t n); +void gsl_eigen_genherm_free (gsl_eigen_genherm_workspace * w); +int gsl_eigen_genherm (gsl_matrix_complex * A, gsl_matrix_complex * B, + gsl_vector * eval, gsl_eigen_genherm_workspace * w); +int gsl_eigen_genherm_standardize (gsl_matrix_complex * A, + const gsl_matrix_complex * B); + +typedef struct { + size_t size; /* size of matrices */ + gsl_eigen_hermv_workspace *hermv_workspace_p; +} gsl_eigen_genhermv_workspace; + +gsl_eigen_genhermv_workspace * gsl_eigen_genhermv_alloc (const size_t n); +void gsl_eigen_genhermv_free (gsl_eigen_genhermv_workspace * w); +int gsl_eigen_genhermv (gsl_matrix_complex * A, gsl_matrix_complex * B, + gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_genhermv_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + gsl_vector *work; /* scratch workspace */ + + size_t n_evals; /* number of eigenvalues found */ + size_t max_iterations; /* maximum QZ iterations allowed */ + size_t n_iter; /* number of iterations since last eigenvalue found */ + double eshift; /* exceptional shift counter */ + + int needtop; /* need to compute top index? */ + + double atol; /* tolerance for splitting A matrix */ + double btol; /* tolerance for splitting B matrix */ + + double ascale; /* scaling factor for shifts */ + double bscale; /* scaling factor for shifts */ + + gsl_matrix *H; /* pointer to hessenberg matrix */ + gsl_matrix *R; /* pointer to upper triangular matrix */ + + int compute_s; /* compute generalized Schur form S */ + int compute_t; /* compute generalized Schur form T */ + + gsl_matrix *Q; /* pointer to left Schur vectors */ + gsl_matrix *Z; /* pointer to right Schur vectors */ +} gsl_eigen_gen_workspace; + +gsl_eigen_gen_workspace * gsl_eigen_gen_alloc (const size_t n); +void gsl_eigen_gen_free (gsl_eigen_gen_workspace * w); +void gsl_eigen_gen_params (const int compute_s, const int compute_t, + const int balance, gsl_eigen_gen_workspace * w); +int gsl_eigen_gen (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_eigen_gen_workspace * w); +int gsl_eigen_gen_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix * Q, gsl_matrix * Z, + gsl_eigen_gen_workspace * w); + +typedef struct { + size_t size; /* size of matrices */ + + gsl_vector *work1; /* 1-norm of columns of A */ + gsl_vector *work2; /* 1-norm of columns of B */ + gsl_vector *work3; /* real part of eigenvector */ + gsl_vector *work4; /* imag part of eigenvector */ + gsl_vector *work5; /* real part of back-transformed eigenvector */ + gsl_vector *work6; /* imag part of back-transformed eigenvector */ + + gsl_matrix *Q; /* pointer to left Schur vectors */ + gsl_matrix *Z; /* pointer to right Schur vectors */ + + gsl_eigen_gen_workspace *gen_workspace_p; +} gsl_eigen_genv_workspace; + +gsl_eigen_genv_workspace * gsl_eigen_genv_alloc (const size_t n); +void gsl_eigen_genv_free (gsl_eigen_genv_workspace * w); +int gsl_eigen_genv (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix_complex * evec, + gsl_eigen_genv_workspace * w); +int gsl_eigen_genv_QZ (gsl_matrix * A, gsl_matrix * B, + gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix_complex * evec, + gsl_matrix * Q, gsl_matrix * Z, + gsl_eigen_genv_workspace * w); + + + +typedef enum { + GSL_EIGEN_SORT_VAL_ASC, + GSL_EIGEN_SORT_VAL_DESC, + GSL_EIGEN_SORT_ABS_ASC, + GSL_EIGEN_SORT_ABS_DESC +} +gsl_eigen_sort_t; + +/* Sort eigensystem results based on eigenvalues. + * Sorts in order of increasing value or increasing + * absolute value. + * + * exceptions: GSL_EBADLEN + */ + +int gsl_eigen_symmv_sort(gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_sort_t sort_type); + +int gsl_eigen_hermv_sort(gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type); + +int gsl_eigen_nonsymmv_sort(gsl_vector_complex * eval, + gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type); + +int gsl_eigen_gensymmv_sort (gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_sort_t sort_type); + +int gsl_eigen_genhermv_sort (gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type); + +int gsl_eigen_genv_sort (gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type); + +/* Prototypes for the schur module */ + +int gsl_schur_gen_eigvals(const gsl_matrix *A, const gsl_matrix *B, + double *wr1, double *wr2, double *wi, + double *scale1, double *scale2); + +int gsl_schur_solve_equation(double ca, const gsl_matrix *A, double z, + double d1, double d2, const gsl_vector *b, + gsl_vector *x, double *s, double *xnorm, + double smin); + +int gsl_schur_solve_equation_z(double ca, const gsl_matrix *A, + gsl_complex *z, double d1, double d2, + const gsl_vector_complex *b, + gsl_vector_complex *x, double *s, + double *xnorm, double smin); + + +/* The following functions are obsolete: */ + +/* Eigensolve by Jacobi Method + * + * The data in the matrix input is destroyed. + * + * exceptions: + */ +int +gsl_eigen_jacobi(gsl_matrix * matrix, + gsl_vector * eval, + gsl_matrix * evec, + unsigned int max_rot, + unsigned int * nrot); + + +/* Invert by Jacobi Method + * + * exceptions: + */ +int +gsl_eigen_invert_jacobi(const gsl_matrix * matrix, + gsl_matrix * ainv, + unsigned int max_rot); + + + +__END_DECLS + +#endif /* __GSL_EIGEN_H__ */ diff --git a/software/gsl-1.15/eigen/herm.c b/software/gsl-1.15/eigen/herm.c new file mode 100644 index 000000000..f8193d5e7 --- /dev/null +++ b/software/gsl-1.15/eigen/herm.c @@ -0,0 +1,182 @@ +/* eigen/herm.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* Compute eigenvalues of complex hermitian matrix using reduction to + real symmetric tridiagonal form, followed by QR iteration with + implicit shifts. + + See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 */ + +#include "qrstep.c" + +gsl_eigen_herm_workspace * +gsl_eigen_herm_alloc (const size_t n) +{ + gsl_eigen_herm_workspace * w ; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", GSL_EINVAL); + } + + w = (gsl_eigen_herm_workspace *) malloc (sizeof(gsl_eigen_herm_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->d = (double *) malloc (n * sizeof (double)); + + if (w->d == 0) + { + GSL_ERROR_NULL ("failed to allocate space for diagonal", GSL_ENOMEM); + } + + w->sd = (double *) malloc (n * sizeof (double)); + + if (w->sd == 0) + { + GSL_ERROR_NULL ("failed to allocate space for subdiagonal", GSL_ENOMEM); + } + + w->tau = (double *) malloc (2 * n * sizeof (double)); + + if (w->tau == 0) + { + GSL_ERROR_NULL ("failed to allocate space for tau", GSL_ENOMEM); + } + + w->size = n; + + return w; +} + +void +gsl_eigen_herm_free (gsl_eigen_herm_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->tau); + free (w->sd); + free (w->d); + free(w); +} + +int +gsl_eigen_herm (gsl_matrix_complex * A, gsl_vector * eval, + gsl_eigen_herm_workspace * w) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + double *const d = w->d; + double *const sd = w->sd; + + size_t a, b; + + /* handle special case */ + + if (N == 1) + { + gsl_complex A00 = gsl_matrix_complex_get (A, 0, 0); + gsl_vector_set (eval, 0, GSL_REAL(A00)); + return GSL_SUCCESS; + } + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_view sd_vec = gsl_vector_view_array (sd, N - 1); + gsl_vector_complex_view tau_vec = gsl_vector_complex_view_array (w->tau, N-1); + gsl_linalg_hermtd_decomp (A, &tau_vec.vector); + gsl_linalg_hermtd_unpack_T (A, &d_vec.vector, &sd_vec.vector); + } + + /* Make an initial pass through the tridiagonal decomposition + to remove off-diagonal elements which are effectively zero */ + + chop_small_elements (N, d, sd); + + /* Progressively reduce the matrix until it is diagonal */ + + b = N - 1; + + while (b > 0) + { + if (sd[b - 1] == 0.0 || isnan(sd[b - 1])) + { + b--; + continue; + } + + /* Find the largest unreduced block (a,b) starting from b + and working backwards */ + + a = b - 1; + + while (a > 0) + { + if (sd[a - 1] == 0.0) + { + break; + } + a--; + } + + { + const size_t n_block = b - a + 1; + double *d_block = d + a; + double *sd_block = sd + a; + + /* apply QR reduction with implicit deflation to the + unreduced block */ + + qrstep (n_block, d_block, sd_block, NULL, NULL); + + /* remove any small off-diagonal elements */ + + chop_small_elements (n_block, d_block, sd_block); + } + } + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_memcpy (eval, &d_vec.vector); + } + + return GSL_SUCCESS; + } +} + + diff --git a/software/gsl-1.15/eigen/hermv.c b/software/gsl-1.15/eigen/hermv.c new file mode 100644 index 000000000..998929141 --- /dev/null +++ b/software/gsl-1.15/eigen/hermv.c @@ -0,0 +1,250 @@ +/* eigen/hermv.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* Compute eigenvalues/eigenvectors of complex hermitian matrix using + reduction to real symmetric tridiagonal form, followed by QR + iteration with implicit shifts. + + See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 */ + +#include "qrstep.c" + +gsl_eigen_hermv_workspace * +gsl_eigen_hermv_alloc (const size_t n) +{ + gsl_eigen_hermv_workspace * w ; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", GSL_EINVAL); + } + + w = (gsl_eigen_hermv_workspace *) malloc (sizeof(gsl_eigen_hermv_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->d = (double *) malloc (n * sizeof (double)); + + if (w->d == 0) + { + free (w); + GSL_ERROR_NULL ("failed to allocate space for diagonal", GSL_ENOMEM); + } + + w->sd = (double *) malloc (n * sizeof (double)); + + if (w->sd == 0) + { + free (w->d); + free (w); + GSL_ERROR_NULL ("failed to allocate space for subdiagonal", GSL_ENOMEM); + } + + w->tau = (double *) malloc (2 * n * sizeof (double)); + + if (w->tau == 0) + { + free (w->sd); + free (w->d); + free (w); + GSL_ERROR_NULL ("failed to allocate space for tau", GSL_ENOMEM); + } + + w->gc = (double *) malloc (n * sizeof (double)); + + if (w->gc == 0) + { + free (w->tau); + free (w->sd); + free (w->d); + free (w); + GSL_ERROR_NULL ("failed to allocate space for cosines", GSL_ENOMEM); + } + + w->gs = (double *) malloc (n * sizeof (double)); + + if (w->gs == 0) + { + free (w->gc); + free (w->tau); + free (w->sd); + free (w->d); + free (w); + GSL_ERROR_NULL ("failed to allocate space for sines", GSL_ENOMEM); + } + + w->size = n; + + return w; +} + +void +gsl_eigen_hermv_free (gsl_eigen_hermv_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->gs); + free (w->gc); + free (w->tau); + free (w->sd); + free (w->d); + free (w); +} + +int +gsl_eigen_hermv (gsl_matrix_complex * A, gsl_vector * eval, + gsl_matrix_complex * evec, + gsl_eigen_hermv_workspace * w) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != A->size1 || evec->size2 != A->size1) + { + GSL_ERROR ("eigenvector matrix must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + double *const d = w->d; + double *const sd = w->sd; + + size_t a, b; + + /* handle special case */ + + if (N == 1) + { + gsl_complex A00 = gsl_matrix_complex_get (A, 0, 0); + gsl_vector_set (eval, 0, GSL_REAL(A00)); + gsl_matrix_complex_set (evec, 0, 0, GSL_COMPLEX_ONE); + return GSL_SUCCESS; + } + + /* Transform the matrix into a symmetric tridiagonal form */ + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_view sd_vec = gsl_vector_view_array (sd, N - 1); + gsl_vector_complex_view tau_vec = gsl_vector_complex_view_array (w->tau, N-1); + gsl_linalg_hermtd_decomp (A, &tau_vec.vector); + gsl_linalg_hermtd_unpack (A, &tau_vec.vector, evec, &d_vec.vector, &sd_vec.vector); + } + + /* Make an initial pass through the tridiagonal decomposition + to remove off-diagonal elements which are effectively zero */ + + chop_small_elements (N, d, sd); + + /* Progressively reduce the matrix until it is diagonal */ + + b = N - 1; + + while (b > 0) + { + if (sd[b - 1] == 0.0 || isnan(sd[b - 1])) + { + b--; + continue; + } + + /* Find the largest unreduced block (a,b) starting from b + and working backwards */ + + a = b - 1; + + while (a > 0) + { + if (sd[a - 1] == 0.0) + { + break; + } + a--; + } + + { + size_t i; + const size_t n_block = b - a + 1; + double *d_block = d + a; + double *sd_block = sd + a; + double * const gc = w->gc; + double * const gs = w->gs; + + /* apply QR reduction with implicit deflation to the + unreduced block */ + + qrstep (n_block, d_block, sd_block, gc, gs); + + /* Apply Givens rotation Gij(c,s) to matrix Q, Q <- Q G */ + + for (i = 0; i < n_block - 1; i++) + { + const double c = gc[i], s = gs[i]; + size_t k; + + for (k = 0; k < N; k++) + { + gsl_complex qki = gsl_matrix_complex_get (evec, k, a + i); + gsl_complex qkj = gsl_matrix_complex_get (evec, k, a + i + 1); + /* qki <= qki * c - qkj * s */ + /* qkj <= qki * s + qkj * c */ + gsl_complex x1 = gsl_complex_mul_real(qki, c); + gsl_complex y1 = gsl_complex_mul_real(qkj, -s); + + gsl_complex x2 = gsl_complex_mul_real(qki, s); + gsl_complex y2 = gsl_complex_mul_real(qkj, c); + + gsl_complex qqki = gsl_complex_add(x1, y1); + gsl_complex qqkj = gsl_complex_add(x2, y2); + + gsl_matrix_complex_set (evec, k, a + i, qqki); + gsl_matrix_complex_set (evec, k, a + i + 1, qqkj); + } + } + + /* remove any small off-diagonal elements */ + + chop_small_elements (n_block, d_block, sd_block); + } + } + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_memcpy (eval, &d_vec.vector); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/eigen/jacobi.c b/software/gsl-1.15/eigen/jacobi.c new file mode 100644 index 000000000..aee863f64 --- /dev/null +++ b/software/gsl-1.15/eigen/jacobi.c @@ -0,0 +1,263 @@ +/* eigen/jacobi.c + * + * Copyright (C) 2004, 2007 Brian Gough, Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* Algorithm 8.4.3 - Cyclic Jacobi. Golub & Van Loan, Matrix Computations */ + +static inline double +symschur2 (gsl_matrix * A, size_t p, size_t q, double *c, double *s) +{ + double Apq = gsl_matrix_get (A, p, q); + + if (Apq != 0.0) + { + double App = gsl_matrix_get (A, p, p); + double Aqq = gsl_matrix_get (A, q, q); + double tau = (Aqq - App) / (2.0 * Apq); + double t, c1; + + if (tau >= 0.0) + { + t = 1.0 / (tau + hypot (1.0, tau)); + } + else + { + t = -1.0 / (-tau + hypot (1.0, tau)); + } + + c1 = 1.0 / hypot (1.0, t); + + *c = c1; + *s = t * c1; + } + else + { + *c = 1.0; + *s = 0.0; + } + + /* reduction in off(A) is 2*(A_pq)^2 */ + + return fabs (Apq); +} + +inline static void +apply_jacobi_L (gsl_matrix * A, size_t p, size_t q, double c, double s) +{ + size_t j; + const size_t N = A->size2; + + /* Apply rotation to matrix A, A' = J^T A */ + + for (j = 0; j < N; j++) + { + double Apj = gsl_matrix_get (A, p, j); + double Aqj = gsl_matrix_get (A, q, j); + gsl_matrix_set (A, p, j, Apj * c - Aqj * s); + gsl_matrix_set (A, q, j, Apj * s + Aqj * c); + } +} + +inline static void +apply_jacobi_R (gsl_matrix * A, size_t p, size_t q, double c, double s) +{ + size_t i; + const size_t M = A->size1; + + /* Apply rotation to matrix A, A' = A J */ + + for (i = 0; i < M; i++) + { + double Aip = gsl_matrix_get (A, i, p); + double Aiq = gsl_matrix_get (A, i, q); + gsl_matrix_set (A, i, p, Aip * c - Aiq * s); + gsl_matrix_set (A, i, q, Aip * s + Aiq * c); + } +} + +inline static double +norm (gsl_matrix * A) +{ + size_t i, j, M = A->size1, N = A->size2; + double sum = 0.0, scale = 0.0, ssq = 1.0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + double Aij = gsl_matrix_get (A, i, j); + + /* compute norm of off-diagonal elements as per algorithm + 8.4.3 and definition at start of section 8.4.1 */ + if (i == j) continue; + + if (Aij != 0.0) + { + double ax = fabs (Aij); + + if (scale < ax) + { + ssq = 1.0 + ssq * (scale / ax) * (scale / ax); + scale = ax; + } + else + { + ssq += (ax / scale) * (ax / scale); + } + } + + } + } + + sum = scale * sqrt (ssq); + + return sum; +} + +int +gsl_eigen_jacobi (gsl_matrix * a, + gsl_vector * eval, + gsl_matrix * evec, unsigned int max_rot, unsigned int *nrot) +{ + size_t i, p, q; + const size_t M = a->size1, N = a->size2; + double red, redsum = 0.0; + + if (M != N) + { + GSL_ERROR ("eigenproblem requires square matrix", GSL_ENOTSQR); + } + else if (M != evec->size1 || M != evec->size2) + { + GSL_ERROR ("eigenvector matrix must match input matrix", GSL_EBADLEN); + } + else if (M != eval->size) + { + GSL_ERROR ("eigenvalue vector must match input matrix", GSL_EBADLEN); + } + + gsl_vector_set_zero (eval); + gsl_matrix_set_identity (evec); + + for (i = 0; i < max_rot; i++) + { + double nrm = norm (a); + + if (nrm == 0.0) + break; + + for (p = 0; p < N; p++) + { + for (q = p + 1; q < N; q++) + { + double c, s; + + red = symschur2 (a, p, q, &c, &s); + redsum += red; + + /* Compute A <- J^T A J */ + apply_jacobi_L (a, p, q, c, s); + apply_jacobi_R (a, p, q, c, s); + + /* Compute V <- V J */ + apply_jacobi_R (evec, p, q, c, s); + } + } + } + + *nrot = i; + + for (p = 0; p < N; p++) + { + double ep = gsl_matrix_get (a, p, p); + gsl_vector_set (eval, p, ep); + } + + if (i == max_rot) + { + return GSL_EMAXITER; + } + + return GSL_SUCCESS; +} + +int +gsl_eigen_invert_jacobi (const gsl_matrix * a, + gsl_matrix * ainv, unsigned int max_rot) +{ + if (a->size1 != a->size2 || ainv->size1 != ainv->size2) + { + GSL_ERROR("jacobi method requires square matrix", GSL_ENOTSQR); + } + else if (a->size1 != ainv->size2) + { + GSL_ERROR ("inverse matrix must match input matrix", GSL_EBADLEN); + } + + { + const size_t n = a->size2; + size_t i,j,k; + unsigned int nrot = 0; + int status; + + gsl_vector * eval = gsl_vector_alloc(n); + gsl_matrix * evec = gsl_matrix_alloc(n, n); + gsl_matrix * tmp = gsl_matrix_alloc(n, n); + + gsl_matrix_memcpy (tmp, a); + + status = gsl_eigen_jacobi(tmp, eval, evec, max_rot, &nrot); + + for(i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues of a real nonsymmetric + * matrix, using the double shift Francis method. + * + * See the references in francis.c. + * + * This module gets the matrix ready by balancing it and + * reducing it to Hessenberg form before passing it to the + * francis module. + */ + +/* +gsl_eigen_nonsymm_alloc() + +Allocate a workspace for solving the nonsymmetric eigenvalue problem. +The size of this workspace is O(2n) + +Inputs: n - size of matrix + +Return: pointer to workspace +*/ + +gsl_eigen_nonsymm_workspace * +gsl_eigen_nonsymm_alloc(const size_t n) +{ + gsl_eigen_nonsymm_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_nonsymm_workspace *) + calloc (1, sizeof (gsl_eigen_nonsymm_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + w->Z = NULL; + w->do_balance = 0; + + w->diag = gsl_vector_alloc(n); + + if (w->diag == 0) + { + gsl_eigen_nonsymm_free(w); + GSL_ERROR_NULL ("failed to allocate space for balancing vector", GSL_ENOMEM); + } + + w->tau = gsl_vector_alloc(n); + + if (w->tau == 0) + { + gsl_eigen_nonsymm_free(w); + GSL_ERROR_NULL ("failed to allocate space for hessenberg coefficients", GSL_ENOMEM); + } + + w->francis_workspace_p = gsl_eigen_francis_alloc(); + + if (w->francis_workspace_p == 0) + { + gsl_eigen_nonsymm_free(w); + GSL_ERROR_NULL ("failed to allocate space for francis workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_nonsymm_alloc() */ + +/* +gsl_eigen_nonsymm_free() + Free workspace w +*/ + +void +gsl_eigen_nonsymm_free (gsl_eigen_nonsymm_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->tau) + gsl_vector_free(w->tau); + + if (w->diag) + gsl_vector_free(w->diag); + + if (w->francis_workspace_p) + gsl_eigen_francis_free(w->francis_workspace_p); + + free(w); +} /* gsl_eigen_nonsymm_free() */ + +/* +gsl_eigen_nonsymm_params() + Set some parameters which define how we solve the eigenvalue +problem. + +Inputs: compute_t - 1 if we want to compute T, 0 if not + balance - 1 if we want to balance the matrix, 0 if not + w - nonsymm workspace +*/ + +void +gsl_eigen_nonsymm_params (const int compute_t, const int balance, + gsl_eigen_nonsymm_workspace *w) +{ + gsl_eigen_francis_T(compute_t, w->francis_workspace_p); + w->do_balance = balance; +} /* gsl_eigen_nonsymm_params() */ + +/* +gsl_eigen_nonsymm() + +Solve the nonsymmetric eigenvalue problem + +A x = \lambda x + +for the eigenvalues \lambda using the Francis method. + +Here we compute the real Schur form + +T = Z^t A Z + +with the diagonal blocks of T giving us the eigenvalues. +Z is a matrix of Schur vectors which is not computed by +this algorithm. See gsl_eigen_nonsymm_Z(). + +Inputs: A - general real matrix + eval - where to store eigenvalues + w - workspace + +Return: success or error + +Notes: If T is computed, it is stored in A on output. Otherwise + the diagonal of A contains the 1-by-1 and 2-by-2 eigenvalue + blocks. +*/ + +int +gsl_eigen_nonsymm (gsl_matrix * A, gsl_vector_complex * eval, + gsl_eigen_nonsymm_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else + { + int s; + + if (w->do_balance) + { + /* balance the matrix */ + gsl_linalg_balance_matrix(A, w->diag); + } + + /* compute the Hessenberg reduction of A */ + gsl_linalg_hessenberg_decomp(A, w->tau); + + if (w->Z) + { + /* + * initialize the matrix Z to U, which is the matrix used + * to construct the Hessenberg reduction. + */ + + /* compute U and store it in Z */ + gsl_linalg_hessenberg_unpack(A, w->tau, w->Z); + + /* find the eigenvalues and Schur vectors */ + s = gsl_eigen_francis_Z(A, eval, w->Z, w->francis_workspace_p); + + if (w->do_balance) + { + /* + * The Schur vectors in Z are the vectors for the balanced + * matrix. We now must undo the balancing to get the + * vectors for the original matrix A. + */ + gsl_linalg_balance_accum(w->Z, w->diag); + } + } + else + { + /* find the eigenvalues only */ + s = gsl_eigen_francis(A, eval, w->francis_workspace_p); + } + + w->n_evals = w->francis_workspace_p->n_evals; + + return s; + } +} /* gsl_eigen_nonsymm() */ + +/* +gsl_eigen_nonsymm_Z() + +Solve the nonsymmetric eigenvalue problem + +A x = \lambda x + +for the eigenvalues \lambda. + +Here we compute the real Schur form + +T = Z^t A Z + +with the diagonal blocks of T giving us the eigenvalues. +Z is the matrix of Schur vectors. + +Inputs: A - general real matrix + eval - where to store eigenvalues + Z - where to store Schur vectors + w - workspace + +Return: success or error + +Notes: If T is computed, it is stored in A on output. Otherwise + the diagonal of A contains the 1-by-1 and 2-by-2 eigenvalue + blocks. +*/ + +int +gsl_eigen_nonsymm_Z (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix * Z, gsl_eigen_nonsymm_workspace * w) +{ + /* check matrix and vector sizes */ + + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if ((Z->size1 != Z->size2) || (Z->size1 != A->size1)) + { + GSL_ERROR ("Z matrix has wrong dimensions", GSL_EBADLEN); + } + else + { + int s; + + w->Z = Z; + + s = gsl_eigen_nonsymm(A, eval, w); + + w->Z = NULL; + + return s; + } +} /* gsl_eigen_nonsymm_Z() */ diff --git a/software/gsl-1.15/eigen/nonsymmv.c b/software/gsl-1.15/eigen/nonsymmv.c new file mode 100644 index 000000000..06801cf9e --- /dev/null +++ b/software/gsl-1.15/eigen/nonsymmv.c @@ -0,0 +1,987 @@ +/* eigen/nonsymmv.c + * + * Copyright (C) 2006 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module computes the eigenvalues and eigenvectors of a real + * nonsymmetric matrix. + * + * This file contains routines based on original code from LAPACK + * which is distributed under the modified BSD license. The LAPACK + * routines used are DTREVC and DLALN2. + */ + +#define GSL_NONSYMMV_SMLNUM (2.0 * GSL_DBL_MIN) +#define GSL_NONSYMMV_BIGNUM ((1.0 - GSL_DBL_EPSILON) / GSL_NONSYMMV_SMLNUM) + +static void nonsymmv_get_right_eigenvectors(gsl_matrix *T, gsl_matrix *Z, + gsl_vector_complex *eval, + gsl_matrix_complex *evec, + gsl_eigen_nonsymmv_workspace *w); +static void nonsymmv_normalize_eigenvectors(gsl_vector_complex *eval, + gsl_matrix_complex *evec); + +/* +gsl_eigen_nonsymmv_alloc() + +Allocate a workspace for solving the nonsymmetric eigenvalue problem. +The size of this workspace is O(5n). + +Inputs: n - size of matrices + +Return: pointer to workspace +*/ + +gsl_eigen_nonsymmv_workspace * +gsl_eigen_nonsymmv_alloc(const size_t n) +{ + gsl_eigen_nonsymmv_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = (gsl_eigen_nonsymmv_workspace *) + calloc (1, sizeof (gsl_eigen_nonsymmv_workspace)); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->size = n; + w->Z = NULL; + w->nonsymm_workspace_p = gsl_eigen_nonsymm_alloc(n); + + if (w->nonsymm_workspace_p == 0) + { + gsl_eigen_nonsymmv_free(w); + GSL_ERROR_NULL ("failed to allocate space for nonsymm workspace", GSL_ENOMEM); + } + + /* + * set parameters to compute the full Schur form T and balance + * the matrices + */ + gsl_eigen_nonsymm_params(1, 0, w->nonsymm_workspace_p); + + w->work = gsl_vector_alloc(n); + w->work2 = gsl_vector_alloc(n); + w->work3 = gsl_vector_alloc(n); + if (w->work == 0 || w->work2 == 0 || w->work3 == 0) + { + gsl_eigen_nonsymmv_free(w); + GSL_ERROR_NULL ("failed to allocate space for nonsymmv additional workspace", GSL_ENOMEM); + } + + return (w); +} /* gsl_eigen_nonsymmv_alloc() */ + +/* +gsl_eigen_nonsymmv_free() + Free workspace w +*/ + +void +gsl_eigen_nonsymmv_free (gsl_eigen_nonsymmv_workspace * w) +{ + RETURN_IF_NULL (w); + + if (w->nonsymm_workspace_p) + gsl_eigen_nonsymm_free(w->nonsymm_workspace_p); + + if (w->work) + gsl_vector_free(w->work); + + if (w->work2) + gsl_vector_free(w->work2); + + if (w->work3) + gsl_vector_free(w->work3); + + free(w); +} /* gsl_eigen_nonsymmv_free() */ + +/* +gsl_eigen_nonsymmv_params() + Set some parameters which define how we solve the eigenvalue +problem. + +Inputs: balance - 1 if we want to balance the matrix, 0 if not + w - nonsymmv workspace +*/ + +void +gsl_eigen_nonsymmv_params (const int balance, + gsl_eigen_nonsymmv_workspace *w) +{ + gsl_eigen_nonsymm_params(1, balance, w->nonsymm_workspace_p); +} /* gsl_eigen_nonsymm_params() */ + +/* +gsl_eigen_nonsymmv() + +Solve the nonsymmetric eigensystem problem + +A x = \lambda x + +for the eigenvalues \lambda and right eigenvectors x + +Inputs: A - general real matrix + eval - where to store eigenvalues + evec - where to store eigenvectors + w - workspace + +Return: success or error +*/ + +int +gsl_eigen_nonsymmv (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix_complex * evec, + gsl_eigen_nonsymmv_workspace * w) +{ + const size_t N = A->size1; + + /* check matrix and vector sizes */ + + if (N != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != N) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (evec->size1 != N) + { + GSL_ERROR ("eigenvector matrix has wrong size", GSL_EBADLEN); + } + else + { + int s; + gsl_matrix Z; + + /* + * We need a place to store the Schur vectors, so we will + * treat evec as a real matrix and store them in the left + * half - the factor of 2 in the tda corresponds to the + * complex multiplicity + */ + Z.size1 = N; + Z.size2 = N; + Z.tda = 2 * N; + Z.data = evec->data; + Z.block = 0; + Z.owner = 0; + + /* compute eigenvalues, Schur form, and Schur vectors */ + s = gsl_eigen_nonsymm_Z(A, eval, &Z, w->nonsymm_workspace_p); + + if (w->Z) + { + /* + * save the Schur vectors in user supplied matrix, since + * they will be destroyed when computing eigenvectors + */ + gsl_matrix_memcpy(w->Z, &Z); + } + + /* only compute eigenvectors if we found all eigenvalues */ + if (s == GSL_SUCCESS) + { + /* compute eigenvectors */ + nonsymmv_get_right_eigenvectors(A, &Z, eval, evec, w); + + /* normalize so that Euclidean norm is 1 */ + nonsymmv_normalize_eigenvectors(eval, evec); + } + + return s; + } +} /* gsl_eigen_nonsymmv() */ + +/* +gsl_eigen_nonsymmv_Z() + Compute eigenvalues and eigenvectors of a real nonsymmetric matrix +and also save the Schur vectors. See comments in gsl_eigen_nonsymm_Z +for more information. + +Inputs: A - real nonsymmetric matrix + eval - where to store eigenvalues + evec - where to store eigenvectors + Z - where to store Schur vectors + w - nonsymmv workspace + +Return: success or error +*/ + +int +gsl_eigen_nonsymmv_Z (gsl_matrix * A, gsl_vector_complex * eval, + gsl_matrix_complex * evec, gsl_matrix * Z, + gsl_eigen_nonsymmv_workspace * w) +{ + /* check matrix and vector sizes */ + + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues/eigenvectors", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (evec->size1 != A->size1) + { + GSL_ERROR ("eigenvector matrix has wrong size", GSL_EBADLEN); + } + else if ((Z->size1 != Z->size2) || (Z->size1 != A->size1)) + { + GSL_ERROR ("Z matrix has wrong dimensions", GSL_EBADLEN); + } + else + { + int s; + + w->Z = Z; + + s = gsl_eigen_nonsymmv(A, eval, evec, w); + + w->Z = NULL; + + return s; + } +} /* gsl_eigen_nonsymmv_Z() */ + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +/* +nonsymmv_get_right_eigenvectors() + Compute the right eigenvectors of the Schur form T and then +backtransform them using the Schur vectors to get right eigenvectors of +the original matrix. + +Inputs: T - Schur form + Z - Schur vectors + eval - where to store eigenvalues (to ensure that the + correct eigenvalue is stored in the same position + as the eigenvectors) + evec - where to store eigenvectors + w - nonsymmv workspace + +Return: none + +Notes: 1) based on LAPACK routine DTREVC - the algorithm used is + backsubstitution on the upper quasi triangular system T + followed by backtransformation by Z to get vectors of the + original matrix. + + 2) The Schur vectors in Z are destroyed and replaced with + eigenvectors stored with the same storage scheme as DTREVC. + The eigenvectors are also stored in 'evec' + + 3) The matrix T is unchanged on output + + 4) Each eigenvector is normalized so that the element of + largest magnitude has magnitude 1; here the magnitude of + a complex number (x,y) is taken to be |x| + |y| +*/ + +static void +nonsymmv_get_right_eigenvectors(gsl_matrix *T, gsl_matrix *Z, + gsl_vector_complex *eval, + gsl_matrix_complex *evec, + gsl_eigen_nonsymmv_workspace *w) +{ + const size_t N = T->size1; + const double smlnum = GSL_DBL_MIN * N / GSL_DBL_EPSILON; + const double bignum = (1.0 - GSL_DBL_EPSILON) / smlnum; + int i; /* looping */ + size_t iu, /* looping */ + ju, + ii; + gsl_complex lambda; /* current eigenvalue */ + double lambda_re, /* Re(lambda) */ + lambda_im; /* Im(lambda) */ + gsl_matrix_view Tv, /* temporary views */ + Zv; + gsl_vector_view y, /* temporary views */ + y2, + ev, + ev2; + double dat[4], /* scratch arrays */ + dat_X[4]; + double scale; /* scale factor */ + double xnorm; /* |X| */ + gsl_vector_complex_view ecol, /* column of evec */ + ecol2; + int complex_pair; /* complex eigenvalue pair? */ + double smin; + + /* + * Compute 1-norm of each column of upper triangular part of T + * to control overflow in triangular solver + */ + + gsl_vector_set(w->work3, 0, 0.0); + for (ju = 1; ju < N; ++ju) + { + gsl_vector_set(w->work3, ju, 0.0); + for (iu = 0; iu < ju; ++iu) + { + gsl_vector_set(w->work3, ju, + gsl_vector_get(w->work3, ju) + + fabs(gsl_matrix_get(T, iu, ju))); + } + } + + for (i = (int) N - 1; i >= 0; --i) + { + iu = (size_t) i; + + /* get current eigenvalue and store it in lambda */ + lambda_re = gsl_matrix_get(T, iu, iu); + + if (iu != 0 && gsl_matrix_get(T, iu, iu - 1) != 0.0) + { + lambda_im = sqrt(fabs(gsl_matrix_get(T, iu, iu - 1))) * + sqrt(fabs(gsl_matrix_get(T, iu - 1, iu))); + } + else + { + lambda_im = 0.0; + } + + GSL_SET_COMPLEX(&lambda, lambda_re, lambda_im); + + smin = GSL_MAX(GSL_DBL_EPSILON * (fabs(lambda_re) + fabs(lambda_im)), + smlnum); + smin = GSL_MAX(smin, GSL_NONSYMMV_SMLNUM); + + if (lambda_im == 0.0) + { + int k, l; + gsl_vector_view bv, xv; + + /* real eigenvector */ + + /* + * The ordering of eigenvalues in 'eval' is arbitrary and + * does not necessarily follow the Schur form T, so store + * lambda in the right slot in eval to ensure it corresponds + * to the eigenvector we are about to compute + */ + gsl_vector_complex_set(eval, iu, lambda); + + /* + * We need to solve the system: + * + * (T(1:iu-1, 1:iu-1) - lambda*I)*X = -T(1:iu-1,iu) + */ + + /* construct right hand side */ + for (k = 0; k < i; ++k) + { + gsl_vector_set(w->work, + (size_t) k, + -gsl_matrix_get(T, (size_t) k, iu)); + } + + gsl_vector_set(w->work, iu, 1.0); + + for (l = i - 1; l >= 0; --l) + { + size_t lu = (size_t) l; + + if (lu == 0) + complex_pair = 0; + else + complex_pair = gsl_matrix_get(T, lu, lu - 1) != 0.0; + + if (!complex_pair) + { + double x; + + /* + * 1-by-1 diagonal block - solve the system: + * + * (T_{ll} - lambda)*x = -T_{l(iu)} + */ + + Tv = gsl_matrix_submatrix(T, lu, lu, 1, 1); + bv = gsl_vector_view_array(dat, 1); + gsl_vector_set(&bv.vector, 0, + gsl_vector_get(w->work, lu)); + xv = gsl_vector_view_array(dat_X, 1); + + gsl_schur_solve_equation(1.0, + &Tv.matrix, + lambda_re, + 1.0, + 1.0, + &bv.vector, + &xv.vector, + &scale, + &xnorm, + smin); + + /* scale x to avoid overflow */ + x = gsl_vector_get(&xv.vector, 0); + if (xnorm > 1.0) + { + if (gsl_vector_get(w->work3, lu) > bignum / xnorm) + { + x /= xnorm; + scale /= xnorm; + } + } + + if (scale != 1.0) + { + gsl_vector_view wv; + + wv = gsl_vector_subvector(w->work, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + } + + gsl_vector_set(w->work, lu, x); + + if (lu > 0) + { + gsl_vector_view v1, v2; + + /* update right hand side */ + + v1 = gsl_matrix_subcolumn(T, lu, 0, lu); + v2 = gsl_vector_subvector(w->work, 0, lu); + gsl_blas_daxpy(-x, &v1.vector, &v2.vector); + } /* if (l > 0) */ + } /* if (!complex_pair) */ + else + { + double x11, x21; + + /* + * 2-by-2 diagonal block + */ + + Tv = gsl_matrix_submatrix(T, lu - 1, lu - 1, 2, 2); + bv = gsl_vector_view_array(dat, 2); + gsl_vector_set(&bv.vector, 0, + gsl_vector_get(w->work, lu - 1)); + gsl_vector_set(&bv.vector, 1, + gsl_vector_get(w->work, lu)); + xv = gsl_vector_view_array(dat_X, 2); + + gsl_schur_solve_equation(1.0, + &Tv.matrix, + lambda_re, + 1.0, + 1.0, + &bv.vector, + &xv.vector, + &scale, + &xnorm, + smin); + + /* scale X(1,1) and X(2,1) to avoid overflow */ + x11 = gsl_vector_get(&xv.vector, 0); + x21 = gsl_vector_get(&xv.vector, 1); + + if (xnorm > 1.0) + { + double beta; + + beta = GSL_MAX(gsl_vector_get(w->work3, lu - 1), + gsl_vector_get(w->work3, lu)); + if (beta > bignum / xnorm) + { + x11 /= xnorm; + x21 /= xnorm; + scale /= xnorm; + } + } + + /* scale if necessary */ + if (scale != 1.0) + { + gsl_vector_view wv; + + wv = gsl_vector_subvector(w->work, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + } + + gsl_vector_set(w->work, lu - 1, x11); + gsl_vector_set(w->work, lu, x21); + + /* update right hand side */ + if (lu > 1) + { + gsl_vector_view v1, v2; + + v1 = gsl_matrix_subcolumn(T, lu - 1, 0, lu - 1); + v2 = gsl_vector_subvector(w->work, 0, lu - 1); + gsl_blas_daxpy(-x11, &v1.vector, &v2.vector); + + v1 = gsl_matrix_subcolumn(T, lu, 0, lu - 1); + gsl_blas_daxpy(-x21, &v1.vector, &v2.vector); + } + + --l; + } /* if (complex_pair) */ + } /* for (l = i - 1; l >= 0; --l) */ + + /* + * At this point, w->work is an eigenvector of the + * Schur form T. To get an eigenvector of the original + * matrix, we multiply on the left by Z, the matrix of + * Schur vectors + */ + + ecol = gsl_matrix_complex_column(evec, iu); + y = gsl_matrix_column(Z, iu); + + if (iu > 0) + { + gsl_vector_view x; + + Zv = gsl_matrix_submatrix(Z, 0, 0, N, iu); + + x = gsl_vector_subvector(w->work, 0, iu); + + /* compute Z * w->work and store it in Z(:,iu) */ + gsl_blas_dgemv(CblasNoTrans, + 1.0, + &Zv.matrix, + &x.vector, + gsl_vector_get(w->work, iu), + &y.vector); + } /* if (iu > 0) */ + + /* store eigenvector into evec */ + + ev = gsl_vector_complex_real(&ecol.vector); + ev2 = gsl_vector_complex_imag(&ecol.vector); + + scale = 0.0; + for (ii = 0; ii < N; ++ii) + { + double a = gsl_vector_get(&y.vector, ii); + + /* store real part of eigenvector */ + gsl_vector_set(&ev.vector, ii, a); + + /* set imaginary part to 0 */ + gsl_vector_set(&ev2.vector, ii, 0.0); + + if (fabs(a) > scale) + scale = fabs(a); + } + + if (scale != 0.0) + scale = 1.0 / scale; + + /* scale by magnitude of largest element */ + gsl_blas_dscal(scale, &ev.vector); + } /* if (GSL_IMAG(lambda) == 0.0) */ + else + { + gsl_vector_complex_view bv, xv; + size_t k; + int l; + gsl_complex lambda2; + + /* complex eigenvector */ + + /* + * Store the complex conjugate eigenvalues in the right + * slots in eval + */ + GSL_SET_REAL(&lambda2, GSL_REAL(lambda)); + GSL_SET_IMAG(&lambda2, -GSL_IMAG(lambda)); + gsl_vector_complex_set(eval, iu - 1, lambda); + gsl_vector_complex_set(eval, iu, lambda2); + + /* + * First solve: + * + * [ T(i:i+1,i:i+1) - lambda*I ] * X = 0 + */ + + if (fabs(gsl_matrix_get(T, iu - 1, iu)) >= + fabs(gsl_matrix_get(T, iu, iu - 1))) + { + gsl_vector_set(w->work, iu - 1, 1.0); + gsl_vector_set(w->work2, iu, + lambda_im / gsl_matrix_get(T, iu - 1, iu)); + } + else + { + gsl_vector_set(w->work, iu - 1, + -lambda_im / gsl_matrix_get(T, iu, iu - 1)); + gsl_vector_set(w->work2, iu, 1.0); + } + gsl_vector_set(w->work, iu, 0.0); + gsl_vector_set(w->work2, iu - 1, 0.0); + + /* construct right hand side */ + for (k = 0; k < iu - 1; ++k) + { + gsl_vector_set(w->work, k, + -gsl_vector_get(w->work, iu - 1) * + gsl_matrix_get(T, k, iu - 1)); + gsl_vector_set(w->work2, k, + -gsl_vector_get(w->work2, iu) * + gsl_matrix_get(T, k, iu)); + } + + /* + * We must solve the upper quasi-triangular system: + * + * [ T(1:i-2,1:i-2) - lambda*I ] * X = s*(work + i*work2) + */ + + for (l = i - 2; l >= 0; --l) + { + size_t lu = (size_t) l; + + if (lu == 0) + complex_pair = 0; + else + complex_pair = gsl_matrix_get(T, lu, lu - 1) != 0.0; + + if (!complex_pair) + { + gsl_complex bval; + gsl_complex x; + + /* + * 1-by-1 diagonal block - solve the system: + * + * (T_{ll} - lambda)*x = work + i*work2 + */ + + Tv = gsl_matrix_submatrix(T, lu, lu, 1, 1); + bv = gsl_vector_complex_view_array(dat, 1); + xv = gsl_vector_complex_view_array(dat_X, 1); + + GSL_SET_COMPLEX(&bval, + gsl_vector_get(w->work, lu), + gsl_vector_get(w->work2, lu)); + gsl_vector_complex_set(&bv.vector, 0, bval); + + gsl_schur_solve_equation_z(1.0, + &Tv.matrix, + &lambda, + 1.0, + 1.0, + &bv.vector, + &xv.vector, + &scale, + &xnorm, + smin); + + if (xnorm > 1.0) + { + if (gsl_vector_get(w->work3, lu) > bignum / xnorm) + { + gsl_blas_zdscal(1.0/xnorm, &xv.vector); + scale /= xnorm; + } + } + + /* scale if necessary */ + if (scale != 1.0) + { + gsl_vector_view wv; + + wv = gsl_vector_subvector(w->work, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + wv = gsl_vector_subvector(w->work2, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + } + + x = gsl_vector_complex_get(&xv.vector, 0); + gsl_vector_set(w->work, lu, GSL_REAL(x)); + gsl_vector_set(w->work2, lu, GSL_IMAG(x)); + + /* update the right hand side */ + if (lu > 0) + { + gsl_vector_view v1, v2; + + v1 = gsl_matrix_subcolumn(T, lu, 0, lu); + v2 = gsl_vector_subvector(w->work, 0, lu); + gsl_blas_daxpy(-GSL_REAL(x), &v1.vector, &v2.vector); + + v2 = gsl_vector_subvector(w->work2, 0, lu); + gsl_blas_daxpy(-GSL_IMAG(x), &v1.vector, &v2.vector); + } /* if (lu > 0) */ + } /* if (!complex_pair) */ + else + { + gsl_complex b1, b2, x1, x2; + + /* + * 2-by-2 diagonal block - solve the system + */ + + Tv = gsl_matrix_submatrix(T, lu - 1, lu - 1, 2, 2); + bv = gsl_vector_complex_view_array(dat, 2); + xv = gsl_vector_complex_view_array(dat_X, 2); + + GSL_SET_COMPLEX(&b1, + gsl_vector_get(w->work, lu - 1), + gsl_vector_get(w->work2, lu - 1)); + GSL_SET_COMPLEX(&b2, + gsl_vector_get(w->work, lu), + gsl_vector_get(w->work2, lu)); + gsl_vector_complex_set(&bv.vector, 0, b1); + gsl_vector_complex_set(&bv.vector, 1, b2); + + gsl_schur_solve_equation_z(1.0, + &Tv.matrix, + &lambda, + 1.0, + 1.0, + &bv.vector, + &xv.vector, + &scale, + &xnorm, + smin); + + x1 = gsl_vector_complex_get(&xv.vector, 0); + x2 = gsl_vector_complex_get(&xv.vector, 1); + + if (xnorm > 1.0) + { + double beta; + + beta = GSL_MAX(gsl_vector_get(w->work3, lu - 1), + gsl_vector_get(w->work3, lu)); + if (beta > bignum / xnorm) + { + gsl_blas_zdscal(1.0/xnorm, &xv.vector); + scale /= xnorm; + } + } + + /* scale if necessary */ + if (scale != 1.0) + { + gsl_vector_view wv; + + wv = gsl_vector_subvector(w->work, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + wv = gsl_vector_subvector(w->work2, 0, iu + 1); + gsl_blas_dscal(scale, &wv.vector); + } + gsl_vector_set(w->work, lu - 1, GSL_REAL(x1)); + gsl_vector_set(w->work, lu, GSL_REAL(x2)); + gsl_vector_set(w->work2, lu - 1, GSL_IMAG(x1)); + gsl_vector_set(w->work2, lu, GSL_IMAG(x2)); + + /* update right hand side */ + if (lu > 1) + { + gsl_vector_view v1, v2, v3, v4; + + v1 = gsl_matrix_subcolumn(T, lu - 1, 0, lu - 1); + v4 = gsl_matrix_subcolumn(T, lu, 0, lu - 1); + v2 = gsl_vector_subvector(w->work, 0, lu - 1); + v3 = gsl_vector_subvector(w->work2, 0, lu - 1); + + gsl_blas_daxpy(-GSL_REAL(x1), &v1.vector, &v2.vector); + gsl_blas_daxpy(-GSL_REAL(x2), &v4.vector, &v2.vector); + gsl_blas_daxpy(-GSL_IMAG(x1), &v1.vector, &v3.vector); + gsl_blas_daxpy(-GSL_IMAG(x2), &v4.vector, &v3.vector); + } /* if (lu > 1) */ + + --l; + } /* if (complex_pair) */ + } /* for (l = i - 2; l >= 0; --l) */ + + /* + * At this point, work + i*work2 is an eigenvector + * of T - backtransform to get an eigenvector of the + * original matrix + */ + + y = gsl_matrix_column(Z, iu - 1); + y2 = gsl_matrix_column(Z, iu); + + if (iu > 1) + { + gsl_vector_view x; + + /* compute real part of eigenvectors */ + + Zv = gsl_matrix_submatrix(Z, 0, 0, N, iu - 1); + x = gsl_vector_subvector(w->work, 0, iu - 1); + + gsl_blas_dgemv(CblasNoTrans, + 1.0, + &Zv.matrix, + &x.vector, + gsl_vector_get(w->work, iu - 1), + &y.vector); + + + /* now compute the imaginary part */ + x = gsl_vector_subvector(w->work2, 0, iu - 1); + + gsl_blas_dgemv(CblasNoTrans, + 1.0, + &Zv.matrix, + &x.vector, + gsl_vector_get(w->work2, iu), + &y2.vector); + } + else + { + gsl_blas_dscal(gsl_vector_get(w->work, iu - 1), &y.vector); + gsl_blas_dscal(gsl_vector_get(w->work2, iu), &y2.vector); + } + + /* + * Now store the eigenvectors into evec - the real parts + * are Z(:,iu - 1) and the imaginary parts are + * +/- Z(:,iu) + */ + + /* get views of the two eigenvector slots */ + ecol = gsl_matrix_complex_column(evec, iu - 1); + ecol2 = gsl_matrix_complex_column(evec, iu); + + /* + * save imaginary part first as it may get overwritten + * when copying the real part due to our storage scheme + * in Z/evec + */ + ev = gsl_vector_complex_imag(&ecol.vector); + ev2 = gsl_vector_complex_imag(&ecol2.vector); + scale = 0.0; + for (ii = 0; ii < N; ++ii) + { + double a = gsl_vector_get(&y2.vector, ii); + + scale = GSL_MAX(scale, + fabs(a) + fabs(gsl_vector_get(&y.vector, ii))); + + gsl_vector_set(&ev.vector, ii, a); + gsl_vector_set(&ev2.vector, ii, -a); + } + + /* now save the real part */ + ev = gsl_vector_complex_real(&ecol.vector); + ev2 = gsl_vector_complex_real(&ecol2.vector); + for (ii = 0; ii < N; ++ii) + { + double a = gsl_vector_get(&y.vector, ii); + + gsl_vector_set(&ev.vector, ii, a); + gsl_vector_set(&ev2.vector, ii, a); + } + + if (scale != 0.0) + scale = 1.0 / scale; + + /* scale by largest element magnitude */ + + gsl_blas_zdscal(scale, &ecol.vector); + gsl_blas_zdscal(scale, &ecol2.vector); + + /* + * decrement i since we took care of two eigenvalues at + * the same time + */ + --i; + } /* if (GSL_IMAG(lambda) != 0.0) */ + } /* for (i = (int) N - 1; i >= 0; --i) */ +} /* nonsymmv_get_right_eigenvectors() */ + +/* +nonsymmv_normalize_eigenvectors() + Normalize eigenvectors so that their Euclidean norm is 1 + +Inputs: eval - eigenvalues + evec - eigenvectors +*/ + +static void +nonsymmv_normalize_eigenvectors(gsl_vector_complex *eval, + gsl_matrix_complex *evec) +{ + const size_t N = evec->size1; + size_t i; /* looping */ + gsl_complex ei; + gsl_vector_complex_view vi; + gsl_vector_view re, im; + double scale; /* scaling factor */ + + for (i = 0; i < N; ++i) + { + ei = gsl_vector_complex_get(eval, i); + vi = gsl_matrix_complex_column(evec, i); + + re = gsl_vector_complex_real(&vi.vector); + + if (GSL_IMAG(ei) == 0.0) + { + scale = 1.0 / gsl_blas_dnrm2(&re.vector); + gsl_blas_dscal(scale, &re.vector); + } + else if (GSL_IMAG(ei) > 0.0) + { + im = gsl_vector_complex_imag(&vi.vector); + + scale = 1.0 / gsl_hypot(gsl_blas_dnrm2(&re.vector), + gsl_blas_dnrm2(&im.vector)); + gsl_blas_zdscal(scale, &vi.vector); + + vi = gsl_matrix_complex_column(evec, i + 1); + gsl_blas_zdscal(scale, &vi.vector); + } + } +} /* nonsymmv_normalize_eigenvectors() */ diff --git a/software/gsl-1.15/eigen/qrstep.c b/software/gsl-1.15/eigen/qrstep.c new file mode 100644 index 000000000..cab628929 --- /dev/null +++ b/software/gsl-1.15/eigen/qrstep.c @@ -0,0 +1,211 @@ +/* eigen/qrstep.c + * + * Copyright (C) 2007, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* remove off-diagonal elements which are neglegible compared with the + neighboring diagonal elements */ + +static void +chop_small_elements (const size_t N, const double d[], double sd[]) +{ + double d_i = d[0]; + + size_t i; + + for (i = 0; i < N - 1; i++) + { + double sd_i = sd[i]; + double d_ip1 = d[i + 1]; + + if (fabs (sd_i) < GSL_DBL_EPSILON * (fabs (d_i) + fabs (d_ip1))) + { + sd[i] = 0.0; + } + d_i = d_ip1; + } +} + +/* Generate a Givens rotation (cos,sin) which takes v=(x,y) to (|v|,0) + + From Golub and Van Loan, "Matrix Computations", Section 5.1.8 */ + +inline static void +create_givens (const double a, const double b, double *c, double *s) +{ + if (b == 0) + { + *c = 1; + *s = 0; + } + else if (fabs (b) > fabs (a)) + { + double t = -a / b; + double s1 = 1.0 / sqrt (1 + t * t); + *s = s1; + *c = s1 * t; + } + else + { + double t = -b / a; + double c1 = 1.0 / sqrt (1 + t * t); + *c = c1; + *s = c1 * t; + } +} + +inline static double +trailing_eigenvalue (const size_t n, const double d[], const double sd[]) +{ + double ta = d[n - 2]; + double tb = d[n - 1]; + double tab = sd[n - 2]; + + double dt = (ta - tb) / 2.0; + + double mu; + + if (dt > 0) + { + mu = tb - tab * (tab / (dt + hypot (dt, tab))); + } + else if (dt == 0) + { + mu = tb - fabs(tab); + } + else + { + mu = tb + tab * (tab / ((-dt) + hypot (dt, tab))); + } + + return mu; +} + +static void +qrstep (const size_t n, double d[], double sd[], double gc[], double gs[]) +{ + double x, z; + double ak, bk, zk, ap, bp, aq, bq; + size_t k; + + double mu = trailing_eigenvalue (n, d, sd); + + /* If mu is large relative to d_0 and sd_0 then the Givens rotation + will have no effect, leading to an infinite loop. + + We set mu to zero in this case, which at least diagonalises the + submatrix [d_0, sd_0 ; sd_0, d_0] and allows further progress. */ + + if (GSL_DBL_EPSILON * fabs(mu) > (fabs(d[0]) + fabs(sd[0]))) { + mu = 0; + } + + x = d[0] - mu; + z = sd[0]; + + ak = 0; + bk = 0; + zk = 0; + + ap = d[0]; + bp = sd[0]; + + aq = d[1]; + + if (n == 2) + { + double c, s; + create_givens (x, z, &c, &s); + + if (gc != NULL) + gc[0] = c; + if (gs != NULL) + gs[0] = s; + + { + double ap1 = c * (c * ap - s * bp) + s * (s * aq - c * bp); + double bp1 = c * (s * ap + c * bp) - s * (s * bp + c * aq); + + double aq1 = s * (s * ap + c * bp) + c * (s * bp + c * aq); + + ak = ap1; + bk = bp1; + + ap = aq1; + } + + d[0] = ak; + sd[0] = bk; + d[1] = ap; + + return; + } + + bq = sd[1]; + + for (k = 0; k < n - 1; k++) + { + double c, s; + create_givens (x, z, &c, &s); + + /* store Givens rotation */ + if (gc != NULL) + gc[k] = c; + if (gs != NULL) + gs[k] = s; + + /* compute G' T G */ + + { + double bk1 = c * bk - s * zk; + + double ap1 = c * (c * ap - s * bp) + s * (s * aq - c * bp); + double bp1 = c * (s * ap + c * bp) - s * (s * bp + c * aq); + double zp1 = -s * bq; + + double aq1 = s * (s * ap + c * bp) + c * (s * bp + c * aq); + double bq1 = c * bq; + + ak = ap1; + bk = bp1; + zk = zp1; + + ap = aq1; + bp = bq1; + + if (k < n - 2) + aq = d[k + 2]; + if (k < n - 3) + bq = sd[k + 2]; + + d[k] = ak; + + if (k > 0) + sd[k - 1] = bk1; + + if (k < n - 2) + sd[k + 1] = bp; + + x = bk; + z = zk; + } + } + + /* k = n - 1 */ + d[k] = ap; + sd[k - 1] = bk; +} diff --git a/software/gsl-1.15/eigen/schur.c b/software/gsl-1.15/eigen/schur.c new file mode 100644 index 000000000..977b8a8a4 --- /dev/null +++ b/software/gsl-1.15/eigen/schur.c @@ -0,0 +1,798 @@ +/* eigen/schur.c + * + * Copyright (C) 2006, 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module contains some routines related to manipulating the + * Schur form of a matrix which are needed by the eigenvalue solvers + * + * This file contains routines based on original code from LAPACK + * which is distributed under the modified BSD license. + */ + +#define GSL_SCHUR_SMLNUM (2.0 * GSL_DBL_MIN) +#define GSL_SCHUR_BIGNUM ((1.0 - GSL_DBL_EPSILON) / GSL_SCHUR_SMLNUM) + +/* +gsl_schur_gen_eigvals() + Compute the eigenvalues of a 2-by-2 generalized block. + +Inputs: A - 2-by-2 matrix + B - 2-by-2 upper triangular matrix + wr1 - (output) see notes + wr2 - (output) see notes + wi - (output) see notes + scale1 - (output) see notes + scale2 - (output) see notes + +Return: success + +Notes: + +1) + +If the block contains real eigenvalues, then wi is set to 0, +and wr1, wr2, scale1, and scale2 are set such that: + +eval1 = wr1 * scale1 +eval2 = wr2 * scale2 + +If the block contains complex eigenvalues, then wr1, wr2, scale1, +scale2, and wi are set such that: + +wr1 = wr2 = scale1 * Re(eval) +wi = scale1 * Im(eval) + +wi is always non-negative + +2) This routine is based on LAPACK DLAG2 +*/ + +int +gsl_schur_gen_eigvals(const gsl_matrix *A, const gsl_matrix *B, double *wr1, + double *wr2, double *wi, double *scale1, + double *scale2) +{ + const double safemin = GSL_DBL_MIN * 1.0e2; + const double safemax = 1.0 / safemin; + const double rtmin = sqrt(safemin); + const double rtmax = 1.0 / rtmin; + double anorm, bnorm; + double ascale, bscale, bsize; + double s1, s2; + double A11, A12, A21, A22; + double B11, B12, B22; + double binv11, binv22; + double bmin; + double as11, as12, as22, abi22; + double pp, qq, shift, ss, discr, r; + + /* scale A */ + anorm = GSL_MAX(GSL_MAX(fabs(gsl_matrix_get(A, 0, 0)) + + fabs(gsl_matrix_get(A, 1, 0)), + fabs(gsl_matrix_get(A, 0, 1)) + + fabs(gsl_matrix_get(A, 1, 1))), + safemin); + ascale = 1.0 / anorm; + A11 = ascale * gsl_matrix_get(A, 0, 0); + A12 = ascale * gsl_matrix_get(A, 0, 1); + A21 = ascale * gsl_matrix_get(A, 1, 0); + A22 = ascale * gsl_matrix_get(A, 1, 1); + + /* perturb B if necessary to ensure non-singularity */ + B11 = gsl_matrix_get(B, 0, 0); + B12 = gsl_matrix_get(B, 0, 1); + B22 = gsl_matrix_get(B, 1, 1); + bmin = rtmin * GSL_MAX(fabs(B11), + GSL_MAX(fabs(B12), GSL_MAX(fabs(B22), rtmin))); + if (fabs(B11) < bmin) + B11 = GSL_SIGN(B11) * bmin; + if (fabs(B22) < bmin) + B22 = GSL_SIGN(B22) * bmin; + + /* scale B */ + bnorm = GSL_MAX(fabs(B11), GSL_MAX(fabs(B12) + fabs(B22), safemin)); + bsize = GSL_MAX(fabs(B11), fabs(B22)); + bscale = 1.0 / bsize; + B11 *= bscale; + B12 *= bscale; + B22 *= bscale; + + /* compute larger eigenvalue */ + + binv11 = 1.0 / B11; + binv22 = 1.0 / B22; + s1 = A11 * binv11; + s2 = A22 * binv22; + if (fabs(s1) <= fabs(s2)) + { + as12 = A12 - s1 * B12; + as22 = A22 - s1 * B22; + ss = A21 * (binv11 * binv22); + abi22 = as22 * binv22 - ss * B12; + pp = 0.5 * abi22; + shift = s1; + } + else + { + as12 = A12 - s2 * B12; + as11 = A11 - s2 * B11; + ss = A21 * (binv11 * binv22); + abi22 = -ss * B12; + pp = 0.5 * (as11 * binv11 + abi22); + shift = s2; + } + + qq = ss * as12; + if (fabs(pp * rtmin) >= 1.0) + { + discr = (rtmin * pp) * (rtmin * pp) + qq * safemin; + r = sqrt(fabs(discr)) * rtmax; + } + else if (pp * pp + fabs(qq) <= safemin) + { + discr = (rtmax * pp) * (rtmax * pp) + qq * safemax; + r = sqrt(fabs(discr)) * rtmin; + } + else + { + discr = pp * pp + qq; + r = sqrt(fabs(discr)); + } + + if (discr >= 0.0 || r == 0.0) + { + double sum = pp + GSL_SIGN(pp) * r; + double diff = pp - GSL_SIGN(pp) * r; + double wbig = shift + sum; + double wsmall = shift + diff; + + /* compute smaller eigenvalue */ + + if (0.5 * fabs(wbig) > GSL_MAX(fabs(wsmall), safemin)) + { + double wdet = (A11*A22 - A12*A21) * (binv11 * binv22); + wsmall = wdet / wbig; + } + + /* choose (real) eigenvalue closest to 2,2 element of AB^{-1} for wr1 */ + if (pp > abi22) + { + *wr1 = GSL_MIN(wbig, wsmall); + *wr2 = GSL_MAX(wbig, wsmall); + } + else + { + *wr1 = GSL_MAX(wbig, wsmall); + *wr2 = GSL_MIN(wbig, wsmall); + } + *wi = 0.0; + } + else + { + /* complex eigenvalues */ + *wr1 = shift + pp; + *wr2 = *wr1; + *wi = r; + } + + /* compute scaling */ + { + const double fuzzy1 = 1.0 + 1.0e-5; + double c1, c2, c3, c4, c5; + double wabs, wsize, wscale; + + c1 = bsize * (safemin * GSL_MAX(1.0, ascale)); + c2 = safemin * GSL_MAX(1.0, bnorm); + c3 = bsize * safemin; + if (ascale <= 1.0 && bsize <= 1.0) + c4 = GSL_MIN(1.0, (ascale / safemin) * bsize); + else + c4 = 1.0; + + if (ascale <= 1.0 || bsize <= 1.0) + c5 = GSL_MIN(1.0, ascale * bsize); + else + c5 = 1.0; + + /* scale first eigenvalue */ + wabs = fabs(*wr1) + fabs(*wi); + wsize = GSL_MAX(safemin, + GSL_MAX(c1, + GSL_MAX(fuzzy1 * (wabs*c2 + c3), + GSL_MIN(c4, 0.5 * GSL_MAX(wabs, c5))))); + if (wsize != 1.0) + { + wscale = 1.0 / wsize; + if (wsize > 1.0) + { + *scale1 = (GSL_MAX(ascale, bsize) * wscale) * + GSL_MIN(ascale, bsize); + } + else + { + *scale1 = (GSL_MIN(ascale, bsize) * wscale) * + GSL_MAX(ascale, bsize); + } + + *wr1 *= wscale; + if (*wi != 0.0) + { + *wi *= wscale; + *wr2 = *wr1; + *scale2 = *scale1; + } + } + else + { + *scale1 = ascale * bsize; + *scale2 = *scale1; + } + + /* scale second eigenvalue if real */ + if (*wi == 0.0) + { + wsize = GSL_MAX(safemin, + GSL_MAX(c1, + GSL_MAX(fuzzy1 * (fabs(*wr2) * c2 + c3), + GSL_MIN(c4, 0.5 * GSL_MAX(fabs(*wr2), c5))))); + if (wsize != 1.0) + { + wscale = 1.0 / wsize; + if (wsize > 1.0) + { + *scale2 = (GSL_MAX(ascale, bsize) * wscale) * + GSL_MIN(ascale, bsize); + } + else + { + *scale2 = (GSL_MIN(ascale, bsize) * wscale) * + GSL_MAX(ascale, bsize); + } + + *wr2 *= wscale; + } + else + { + *scale2 = ascale * bsize; + } + } + } + + return GSL_SUCCESS; +} /* gsl_schur_gen_eigvals() */ + +/* +gsl_schur_solve_equation() + + Solve the equation which comes up in the back substitution +when computing eigenvectors corresponding to real eigenvalues. +The equation that is solved is: + +(ca*A - z*D)*x = s*b + +where + +A is n-by-n with n = 1 or 2 +D is a n-by-n diagonal matrix +b and x are n-by-1 real vectors +s is a scaling factor set by this function to prevent overflow in x + +Inputs: ca - coefficient multiplying A + A - square matrix (n-by-n) + z - real scalar (eigenvalue) + d1 - (1,1) element in diagonal matrix D + d2 - (2,2) element in diagonal matrix D + b - right hand side vector + x - (output) where to store solution + s - (output) scale factor + xnorm - (output) infinity norm of X + smin - lower bound on singular values of A - if ca*A - z*D + is less than this value, we'll use smin*I instead. + This value should be a safe distance above underflow. + +Return: success + +Notes: 1) A and b are not changed on output + 2) Based on lapack routine DLALN2 +*/ + +int +gsl_schur_solve_equation(double ca, const gsl_matrix *A, double z, + double d1, double d2, const gsl_vector *b, + gsl_vector *x, double *s, double *xnorm, + double smin) +{ + size_t N = A->size1; + double bnorm; + double scale = 1.0; + + if (N == 1) + { + double c, /* denominator */ + cnorm; /* |c| */ + + /* we have a 1-by-1 (real) scalar system to solve */ + + c = ca * gsl_matrix_get(A, 0, 0) - z * d1; + cnorm = fabs(c); + + if (cnorm < smin) + { + /* set c = smin*I */ + c = smin; + cnorm = smin; + } + + /* check scaling for x = b / c */ + bnorm = fabs(gsl_vector_get(b, 0)); + if (cnorm < 1.0 && bnorm > 1.0) + { + if (bnorm > GSL_SCHUR_BIGNUM*cnorm) + scale = 1.0 / bnorm; + } + + /* compute x */ + gsl_vector_set(x, 0, gsl_vector_get(b, 0) * scale / c); + *xnorm = fabs(gsl_vector_get(x, 0)); + } /* if (N == 1) */ + else + { + double cr[2][2]; + double *crv; + double cmax; + size_t icmax, j; + double bval1, bval2; + double ur11, ur12, ur22, ur11r; + double cr21, cr22; + double lr21; + double b1, b2, bbnd; + double x1, x2; + double temp; + size_t ipivot[4][4] = { { 0, 1, 2, 3 }, + { 1, 0, 3, 2 }, + { 2, 3, 0, 1 }, + { 3, 2, 1, 0 } }; + int rswap[4] = { 0, 1, 0, 1 }; + int zswap[4] = { 0, 0, 1, 1 }; + + /* + * we have a 2-by-2 real system to solve: + * + * ( ca * [ A11 A12 ] - z * [ D1 0 ] ) [ x1 ] = [ b1 ] + * ( [ A21 A22 ] [ 0 D2 ] ) [ x2 ] [ b2 ] + * + * (z real) + */ + + crv = (double *) cr; + + /* + * compute the real part of C = ca*A - z*D - use column ordering + * here since porting from lapack + */ + cr[0][0] = ca * gsl_matrix_get(A, 0, 0) - z * d1; + cr[1][1] = ca * gsl_matrix_get(A, 1, 1) - z * d2; + cr[0][1] = ca * gsl_matrix_get(A, 1, 0); + cr[1][0] = ca * gsl_matrix_get(A, 0, 1); + + /* find the largest element in C */ + cmax = 0.0; + icmax = 0; + for (j = 0; j < 4; ++j) + { + if (fabs(crv[j]) > cmax) + { + cmax = fabs(crv[j]); + icmax = j; + } + } + + bval1 = gsl_vector_get(b, 0); + bval2 = gsl_vector_get(b, 1); + + /* if norm(C) < smin, use smin*I */ + + if (cmax < smin) + { + bnorm = GSL_MAX(fabs(bval1), fabs(bval2)); + if (smin < 1.0 && bnorm > 1.0) + { + if (bnorm > GSL_SCHUR_BIGNUM*smin) + scale = 1.0 / bnorm; + } + temp = scale / smin; + gsl_vector_set(x, 0, temp * bval1); + gsl_vector_set(x, 1, temp * bval2); + *xnorm = temp * bnorm; + *s = scale; + return GSL_SUCCESS; + } + + /* gaussian elimination with complete pivoting */ + ur11 = crv[icmax]; + cr21 = crv[ipivot[1][icmax]]; + ur12 = crv[ipivot[2][icmax]]; + cr22 = crv[ipivot[3][icmax]]; + ur11r = 1.0 / ur11; + lr21 = ur11r * cr21; + ur22 = cr22 - ur12 * lr21; + + /* if smaller pivot < smin, use smin */ + if (fabs(ur22) < smin) + ur22 = smin; + + if (rswap[icmax]) + { + b1 = bval2; + b2 = bval1; + } + else + { + b1 = bval1; + b2 = bval2; + } + + b2 -= lr21 * b1; + bbnd = GSL_MAX(fabs(b1 * (ur22 * ur11r)), fabs(b2)); + if (bbnd > 1.0 && fabs(ur22) < 1.0) + { + if (bbnd >= GSL_SCHUR_BIGNUM * fabs(ur22)) + scale = 1.0 / bbnd; + } + + x2 = (b2 * scale) / ur22; + x1 = (scale * b1) * ur11r - x2 * (ur11r * ur12); + if (zswap[icmax]) + { + gsl_vector_set(x, 0, x2); + gsl_vector_set(x, 1, x1); + } + else + { + gsl_vector_set(x, 0, x1); + gsl_vector_set(x, 1, x2); + } + + *xnorm = GSL_MAX(fabs(x1), fabs(x2)); + + /* further scaling if norm(A) norm(X) > overflow */ + if (*xnorm > 1.0 && cmax > 1.0) + { + if (*xnorm > GSL_SCHUR_BIGNUM / cmax) + { + temp = cmax / GSL_SCHUR_BIGNUM; + gsl_blas_dscal(temp, x); + *xnorm *= temp; + scale *= temp; + } + } + } /* if (N == 2) */ + + *s = scale; + return GSL_SUCCESS; +} /* gsl_schur_solve_equation() */ + +/* +gsl_schur_solve_equation_z() + + Solve the equation which comes up in the back substitution +when computing eigenvectors corresponding to complex eigenvalues. +The equation that is solved is: + +(ca*A - z*D)*x = s*b + +where + +A is n-by-n with n = 1 or 2 +D is a n-by-n diagonal matrix +b and x are n-by-1 complex vectors +s is a scaling factor set by this function to prevent overflow in x + +Inputs: ca - coefficient multiplying A + A - square matrix (n-by-n) + z - complex scalar (eigenvalue) + d1 - (1,1) element in diagonal matrix D + d2 - (2,2) element in diagonal matrix D + b - right hand side vector + x - (output) where to store solution + s - (output) scale factor + xnorm - (output) infinity norm of X + smin - lower bound on singular values of A - if ca*A - z*D + is less than this value, we'll use smin*I instead. + This value should be a safe distance above underflow. + +Notes: 1) A and b are not changed on output + 2) Based on lapack routine DLALN2 +*/ + +int +gsl_schur_solve_equation_z(double ca, const gsl_matrix *A, gsl_complex *z, + double d1, double d2, + const gsl_vector_complex *b, + gsl_vector_complex *x, double *s, double *xnorm, + double smin) +{ + size_t N = A->size1; + double scale = 1.0; + double bnorm; + + if (N == 1) + { + double cr, /* denominator */ + ci, + cnorm; /* |c| */ + gsl_complex bval, c, xval, tmp; + + /* we have a 1-by-1 (complex) scalar system to solve */ + + /* c = ca*a - z*d1 */ + cr = ca * gsl_matrix_get(A, 0, 0) - GSL_REAL(*z) * d1; + ci = -GSL_IMAG(*z) * d1; + cnorm = fabs(cr) + fabs(ci); + + if (cnorm < smin) + { + /* set c = smin*I */ + cr = smin; + ci = 0.0; + cnorm = smin; + } + + /* check scaling for x = b / c */ + bval = gsl_vector_complex_get(b, 0); + bnorm = fabs(GSL_REAL(bval)) + fabs(GSL_IMAG(bval)); + if (cnorm < 1.0 && bnorm > 1.0) + { + if (bnorm > GSL_SCHUR_BIGNUM*cnorm) + scale = 1.0 / bnorm; + } + + /* compute x */ + GSL_SET_COMPLEX(&tmp, scale*GSL_REAL(bval), scale*GSL_IMAG(bval)); + GSL_SET_COMPLEX(&c, cr, ci); + xval = gsl_complex_div(tmp, c); + + gsl_vector_complex_set(x, 0, xval); + + *xnorm = fabs(GSL_REAL(xval)) + fabs(GSL_IMAG(xval)); + } /* if (N == 1) */ + else + { + double cr[2][2], ci[2][2]; + double *civ, *crv; + double cmax; + gsl_complex bval1, bval2; + gsl_complex xval1, xval2; + double xr1, xi1; + size_t icmax; + size_t j; + double temp; + double ur11, ur12, ur22, ui11, ui12, ui22, ur11r, ui11r; + double ur12s, ui12s; + double u22abs; + double lr21, li21; + double cr21, cr22, ci21, ci22; + double br1, bi1, br2, bi2, bbnd; + gsl_complex b1, b2; + size_t ipivot[4][4] = { { 0, 1, 2, 3 }, + { 1, 0, 3, 2 }, + { 2, 3, 0, 1 }, + { 3, 2, 1, 0 } }; + int rswap[4] = { 0, 1, 0, 1 }; + int zswap[4] = { 0, 0, 1, 1 }; + + /* + * complex 2-by-2 system: + * + * ( ca * [ A11 A12 ] - z * [ D1 0 ] ) [ X1 ] = [ B1 ] + * ( [ A21 A22 ] [ 0 D2] ) [ X2 ] [ B2 ] + * + * (z complex) + * + * where the X and B values are complex. + */ + + civ = (double *) ci; + crv = (double *) cr; + + /* + * compute the real part of C = ca*A - z*D - use column ordering + * here since porting from lapack + */ + cr[0][0] = ca*gsl_matrix_get(A, 0, 0) - GSL_REAL(*z)*d1; + cr[1][1] = ca*gsl_matrix_get(A, 1, 1) - GSL_REAL(*z)*d2; + cr[0][1] = ca*gsl_matrix_get(A, 1, 0); + cr[1][0] = ca*gsl_matrix_get(A, 0, 1); + + /* compute the imaginary part */ + ci[0][0] = -GSL_IMAG(*z) * d1; + ci[0][1] = 0.0; + ci[1][0] = 0.0; + ci[1][1] = -GSL_IMAG(*z) * d2; + + cmax = 0.0; + icmax = 0; + + for (j = 0; j < 4; ++j) + { + if (fabs(crv[j]) + fabs(civ[j]) > cmax) + { + cmax = fabs(crv[j]) + fabs(civ[j]); + icmax = j; + } + } + + bval1 = gsl_vector_complex_get(b, 0); + bval2 = gsl_vector_complex_get(b, 1); + + /* if norm(C) < smin, use smin*I */ + if (cmax < smin) + { + bnorm = GSL_MAX(fabs(GSL_REAL(bval1)) + fabs(GSL_IMAG(bval1)), + fabs(GSL_REAL(bval2)) + fabs(GSL_IMAG(bval2))); + if (smin < 1.0 && bnorm > 1.0) + { + if (bnorm > GSL_SCHUR_BIGNUM*smin) + scale = 1.0 / bnorm; + } + + temp = scale / smin; + xval1 = gsl_complex_mul_real(bval1, temp); + xval2 = gsl_complex_mul_real(bval2, temp); + gsl_vector_complex_set(x, 0, xval1); + gsl_vector_complex_set(x, 1, xval2); + *xnorm = temp * bnorm; + *s = scale; + return GSL_SUCCESS; + } + + /* gaussian elimination with complete pivoting */ + ur11 = crv[icmax]; + ui11 = civ[icmax]; + cr21 = crv[ipivot[1][icmax]]; + ci21 = civ[ipivot[1][icmax]]; + ur12 = crv[ipivot[2][icmax]]; + ui12 = civ[ipivot[2][icmax]]; + cr22 = crv[ipivot[3][icmax]]; + ci22 = civ[ipivot[3][icmax]]; + + if (icmax == 0 || icmax == 3) + { + /* off diagonals of pivoted C are real */ + if (fabs(ur11) > fabs(ui11)) + { + temp = ui11 / ur11; + ur11r = 1.0 / (ur11 * (1.0 + temp*temp)); + ui11r = -temp * ur11r; + } + else + { + temp = ur11 / ui11; + ui11r = -1.0 / (ui11 * (1.0 + temp*temp)); + ur11r = -temp*ui11r; + } + lr21 = cr21 * ur11r; + li21 = cr21 * ui11r; + ur12s = ur12 * ur11r; + ui12s = ur12 * ui11r; + ur22 = cr22 - ur12 * lr21; + ui22 = ci22 - ur12 * li21; + } + else + { + /* diagonals of pivoted C are real */ + ur11r = 1.0 / ur11; + ui11r = 0.0; + lr21 = cr21 * ur11r; + li21 = ci21 * ur11r; + ur12s = ur12 * ur11r; + ui12s = ui12 * ur11r; + ur22 = cr22 - ur12 * lr21 + ui12 * li21; + ui22 = -ur12 * li21 - ui12 * lr21; + } + + u22abs = fabs(ur22) + fabs(ui22); + + /* if smaller pivot < smin, use smin */ + if (u22abs < smin) + { + ur22 = smin; + ui22 = 0.0; + } + + if (rswap[icmax]) + { + br2 = GSL_REAL(bval1); + bi2 = GSL_IMAG(bval1); + br1 = GSL_REAL(bval2); + bi1 = GSL_IMAG(bval2); + } + else + { + br1 = GSL_REAL(bval1); + bi1 = GSL_IMAG(bval1); + br2 = GSL_REAL(bval2); + bi2 = GSL_IMAG(bval2); + } + + br2 += li21*bi1 - lr21*br1; + bi2 -= li21*br1 + lr21*bi1; + bbnd = GSL_MAX((fabs(br1) + fabs(bi1)) * + (u22abs * (fabs(ur11r) + fabs(ui11r))), + fabs(br2) + fabs(bi2)); + if (bbnd > 1.0 && u22abs < 1.0) + { + if (bbnd >= GSL_SCHUR_BIGNUM*u22abs) + { + scale = 1.0 / bbnd; + br1 *= scale; + bi1 *= scale; + br2 *= scale; + bi2 *= scale; + } + } + + GSL_SET_COMPLEX(&b1, br2, bi2); + GSL_SET_COMPLEX(&b2, ur22, ui22); + xval2 = gsl_complex_div(b1, b2); + + xr1 = ur11r*br1 - ui11r*bi1 - ur12s*GSL_REAL(xval2) + ui12s*GSL_IMAG(xval2); + xi1 = ui11r*br1 + ur11r*bi1 - ui12s*GSL_REAL(xval2) - ur12s*GSL_IMAG(xval2); + GSL_SET_COMPLEX(&xval1, xr1, xi1); + + if (zswap[icmax]) + { + gsl_vector_complex_set(x, 0, xval2); + gsl_vector_complex_set(x, 1, xval1); + } + else + { + gsl_vector_complex_set(x, 0, xval1); + gsl_vector_complex_set(x, 1, xval2); + } + + *xnorm = GSL_MAX(fabs(GSL_REAL(xval1)) + fabs(GSL_IMAG(xval1)), + fabs(GSL_REAL(xval2)) + fabs(GSL_IMAG(xval2))); + + /* further scaling if norm(A) norm(X) > overflow */ + if (*xnorm > 1.0 && cmax > 1.0) + { + if (*xnorm > GSL_SCHUR_BIGNUM / cmax) + { + temp = cmax / GSL_SCHUR_BIGNUM; + gsl_blas_zdscal(temp, x); + *xnorm *= temp; + scale *= temp; + } + } + } /* if (N == 2) */ + + *s = scale; + return GSL_SUCCESS; +} /* gsl_schur_solve_equation_z() */ diff --git a/software/gsl-1.15/eigen/sort.c b/software/gsl-1.15/eigen/sort.c new file mode 100644 index 000000000..54d1316f1 --- /dev/null +++ b/software/gsl-1.15/eigen/sort.c @@ -0,0 +1,346 @@ +/* eigen/sort.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 Gerard Jungman, Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman, Modified: B. Gough. */ + +#include +#include +#include +#include +#include +#include + +/* The eigen_sort below is not very good, but it is simple and + * self-contained. We can always implement an improved sort later. */ + +int +gsl_eigen_symmv_sort (gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_sort_t sort_type) +{ + if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (eval->size != evec->size1) + { + GSL_ERROR ("eigenvalues must match eigenvector matrix", GSL_EBADLEN); + } + else + { + const size_t N = eval->size; + size_t i; + + for (i = 0; i < N - 1; i++) + { + size_t j; + size_t k = i; + + double ek = gsl_vector_get (eval, i); + + /* search for something to swap */ + for (j = i + 1; j < N; j++) + { + int test; + const double ej = gsl_vector_get (eval, j); + + switch (sort_type) + { + case GSL_EIGEN_SORT_VAL_ASC: + test = (ej < ek); + break; + case GSL_EIGEN_SORT_VAL_DESC: + test = (ej > ek); + break; + case GSL_EIGEN_SORT_ABS_ASC: + test = (fabs (ej) < fabs (ek)); + break; + case GSL_EIGEN_SORT_ABS_DESC: + test = (fabs (ej) > fabs (ek)); + break; + default: + GSL_ERROR ("unrecognized sort type", GSL_EINVAL); + } + + if (test) + { + k = j; + ek = ej; + } + } + + if (k != i) + { + /* swap eigenvalues */ + gsl_vector_swap_elements (eval, i, k); + + /* swap eigenvectors */ + gsl_matrix_swap_columns (evec, i, k); + } + } + + return GSL_SUCCESS; + } +} + + +int +gsl_eigen_hermv_sort (gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type) +{ + if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (eval->size != evec->size1) + { + GSL_ERROR ("eigenvalues must match eigenvector matrix", GSL_EBADLEN); + } + else + { + const size_t N = eval->size; + size_t i; + + for (i = 0; i < N - 1; i++) + { + size_t j; + size_t k = i; + + double ek = gsl_vector_get (eval, i); + + /* search for something to swap */ + for (j = i + 1; j < N; j++) + { + int test; + const double ej = gsl_vector_get (eval, j); + + switch (sort_type) + { + case GSL_EIGEN_SORT_VAL_ASC: + test = (ej < ek); + break; + case GSL_EIGEN_SORT_VAL_DESC: + test = (ej > ek); + break; + case GSL_EIGEN_SORT_ABS_ASC: + test = (fabs (ej) < fabs (ek)); + break; + case GSL_EIGEN_SORT_ABS_DESC: + test = (fabs (ej) > fabs (ek)); + break; + default: + GSL_ERROR ("unrecognized sort type", GSL_EINVAL); + } + + if (test) + { + k = j; + ek = ej; + } + } + + if (k != i) + { + /* swap eigenvalues */ + gsl_vector_swap_elements (eval, i, k); + + /* swap eigenvectors */ + gsl_matrix_complex_swap_columns (evec, i, k); + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_eigen_nonsymmv_sort (gsl_vector_complex * eval, + gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type) +{ + if (evec && (evec->size1 != evec->size2)) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (evec && (eval->size != evec->size1)) + { + GSL_ERROR ("eigenvalues must match eigenvector matrix", GSL_EBADLEN); + } + else + { + const size_t N = eval->size; + size_t i; + + for (i = 0; i < N - 1; i++) + { + size_t j; + size_t k = i; + + gsl_complex ek = gsl_vector_complex_get (eval, i); + + /* search for something to swap */ + for (j = i + 1; j < N; j++) + { + int test; + const gsl_complex ej = gsl_vector_complex_get (eval, j); + + switch (sort_type) + { + case GSL_EIGEN_SORT_ABS_ASC: + test = (gsl_complex_abs (ej) < gsl_complex_abs (ek)); + break; + case GSL_EIGEN_SORT_ABS_DESC: + test = (gsl_complex_abs (ej) > gsl_complex_abs (ek)); + break; + case GSL_EIGEN_SORT_VAL_ASC: + case GSL_EIGEN_SORT_VAL_DESC: + default: + GSL_ERROR ("invalid sort type", GSL_EINVAL); + } + + if (test) + { + k = j; + ek = ej; + } + } + + if (k != i) + { + /* swap eigenvalues */ + gsl_vector_complex_swap_elements (eval, i, k); + + /* swap eigenvectors */ + if (evec) + gsl_matrix_complex_swap_columns (evec, i, k); + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_eigen_gensymmv_sort (gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_sort_t sort_type) +{ + int s; + + s = gsl_eigen_symmv_sort(eval, evec, sort_type); + + return s; +} + +int +gsl_eigen_genhermv_sort (gsl_vector * eval, gsl_matrix_complex * evec, + gsl_eigen_sort_t sort_type) +{ + int s; + + s = gsl_eigen_hermv_sort(eval, evec, sort_type); + + return s; +} + +int +gsl_eigen_genv_sort (gsl_vector_complex * alpha, gsl_vector * beta, + gsl_matrix_complex * evec, gsl_eigen_sort_t sort_type) +{ + if (evec->size1 != evec->size2) + { + GSL_ERROR ("eigenvector matrix must be square", GSL_ENOTSQR); + } + else if (alpha->size != evec->size1 || beta->size != evec->size1) + { + GSL_ERROR ("eigenvalues must match eigenvector matrix", GSL_EBADLEN); + } + else + { + const size_t N = alpha->size; + size_t i; + + for (i = 0; i < N - 1; i++) + { + size_t j; + size_t k = i; + + gsl_complex ak = gsl_vector_complex_get (alpha, i); + double bk = gsl_vector_get(beta, i); + gsl_complex ek; + + if (bk < GSL_DBL_EPSILON) + { + GSL_SET_COMPLEX(&ek, + GSL_SIGN(GSL_REAL(ak)) ? GSL_POSINF : GSL_NEGINF, + GSL_SIGN(GSL_IMAG(ak)) ? GSL_POSINF : GSL_NEGINF); + } + else + ek = gsl_complex_div_real(ak, bk); + + /* search for something to swap */ + for (j = i + 1; j < N; j++) + { + int test; + const gsl_complex aj = gsl_vector_complex_get (alpha, j); + double bj = gsl_vector_get(beta, j); + gsl_complex ej; + + if (bj < GSL_DBL_EPSILON) + { + GSL_SET_COMPLEX(&ej, + GSL_SIGN(GSL_REAL(aj)) ? GSL_POSINF : GSL_NEGINF, + GSL_SIGN(GSL_IMAG(aj)) ? GSL_POSINF : GSL_NEGINF); + } + else + ej = gsl_complex_div_real(aj, bj); + + switch (sort_type) + { + case GSL_EIGEN_SORT_ABS_ASC: + test = (gsl_complex_abs (ej) < gsl_complex_abs (ek)); + break; + case GSL_EIGEN_SORT_ABS_DESC: + test = (gsl_complex_abs (ej) > gsl_complex_abs (ek)); + break; + case GSL_EIGEN_SORT_VAL_ASC: + case GSL_EIGEN_SORT_VAL_DESC: + default: + GSL_ERROR ("invalid sort type", GSL_EINVAL); + } + + if (test) + { + k = j; + ek = ej; + } + } + + if (k != i) + { + /* swap eigenvalues */ + gsl_vector_complex_swap_elements (alpha, i, k); + gsl_vector_swap_elements (beta, i, k); + + /* swap eigenvectors */ + gsl_matrix_complex_swap_columns (evec, i, k); + } + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/eigen/symm.c b/software/gsl-1.15/eigen/symm.c new file mode 100644 index 000000000..122716593 --- /dev/null +++ b/software/gsl-1.15/eigen/symm.c @@ -0,0 +1,180 @@ +/* eigen/symm.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* Compute eigenvalues/eigenvectors of real symmetric matrix using + reduction to tridiagonal form, followed by QR iteration with + implicit shifts. + + See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 + */ + +#include "qrstep.c" + +gsl_eigen_symm_workspace * +gsl_eigen_symm_alloc (const size_t n) +{ + gsl_eigen_symm_workspace *w; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", + GSL_EINVAL); + } + + w = ((gsl_eigen_symm_workspace *) + malloc (sizeof (gsl_eigen_symm_workspace))); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->d = (double *) malloc (n * sizeof (double)); + + if (w->d == 0) + { + GSL_ERROR_NULL ("failed to allocate space for diagonal", GSL_ENOMEM); + } + + w->sd = (double *) malloc (n * sizeof (double)); + + if (w->sd == 0) + { + GSL_ERROR_NULL ("failed to allocate space for subdiagonal", GSL_ENOMEM); + } + + w->size = n; + + return w; +} + +void +gsl_eigen_symm_free (gsl_eigen_symm_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->sd); + free (w->d); + free (w); +} + + +int +gsl_eigen_symm (gsl_matrix * A, gsl_vector * eval, + gsl_eigen_symm_workspace * w) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + double *const d = w->d; + double *const sd = w->sd; + + size_t a, b; + + /* handle special case */ + + if (N == 1) + { + double A00 = gsl_matrix_get (A, 0, 0); + gsl_vector_set (eval, 0, A00); + return GSL_SUCCESS; + } + + /* use sd as the temporary workspace for the decomposition, + since we can discard the tau result immediately if we are not + computing eigenvectors */ + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_view sd_vec = gsl_vector_view_array (sd, N - 1); + gsl_vector_view tau = gsl_vector_view_array (sd, N - 1); + gsl_linalg_symmtd_decomp (A, &tau.vector); + gsl_linalg_symmtd_unpack_T (A, &d_vec.vector, &sd_vec.vector); + } + + /* Make an initial pass through the tridiagonal decomposition + to remove off-diagonal elements which are effectively zero */ + + chop_small_elements (N, d, sd); + + /* Progressively reduce the matrix until it is diagonal */ + + b = N - 1; + + while (b > 0) + { + if (sd[b - 1] == 0.0 || isnan(sd[b - 1])) + { + b--; + continue; + } + + /* Find the largest unreduced block (a,b) starting from b + and working backwards */ + + a = b - 1; + + while (a > 0) + { + if (sd[a - 1] == 0.0) + { + break; + } + a--; + } + + { + const size_t n_block = b - a + 1; + double *d_block = d + a; + double *sd_block = sd + a; + + /* apply QR reduction with implicit deflation to the + unreduced block */ + + qrstep (n_block, d_block, sd_block, NULL, NULL); + + /* remove any small off-diagonal elements */ + + chop_small_elements (n_block, d_block, sd_block); + } + } + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_memcpy (eval, &d_vec.vector); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/eigen/symmv.c b/software/gsl-1.15/eigen/symmv.c new file mode 100644 index 000000000..f220a654e --- /dev/null +++ b/software/gsl-1.15/eigen/symmv.c @@ -0,0 +1,216 @@ +/* eigen/symmv.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* Compute eigenvalues/eigenvectors of real symmetric matrix using + reduction to tridiagonal form, followed by QR iteration with + implicit shifts. + + See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 + */ + +#include "qrstep.c" + +gsl_eigen_symmv_workspace * +gsl_eigen_symmv_alloc (const size_t n) +{ + gsl_eigen_symmv_workspace * w ; + + if (n == 0) + { + GSL_ERROR_NULL ("matrix dimension must be positive integer", GSL_EINVAL); + } + + w= ((gsl_eigen_symmv_workspace *) malloc (sizeof(gsl_eigen_symmv_workspace))); + + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->d = (double *) malloc (n * sizeof (double)); + + if (w->d == 0) + { + GSL_ERROR_NULL ("failed to allocate space for diagonal", GSL_ENOMEM); + } + + w->sd = (double *) malloc (n * sizeof (double)); + + if (w->sd == 0) + { + GSL_ERROR_NULL ("failed to allocate space for subdiagonal", GSL_ENOMEM); + } + + w->gc = (double *) malloc (n * sizeof (double)); + + if (w->gc == 0) + { + GSL_ERROR_NULL ("failed to allocate space for cosines", GSL_ENOMEM); + } + + w->gs = (double *) malloc (n * sizeof (double)); + + if (w->gs == 0) + { + GSL_ERROR_NULL ("failed to allocate space for sines", GSL_ENOMEM); + } + + w->size = n; + + return w; +} + +void +gsl_eigen_symmv_free (gsl_eigen_symmv_workspace * w) +{ + RETURN_IF_NULL (w); + free(w->gs); + free(w->gc); + free(w->sd); + free(w->d); + free(w); +} + + +int +gsl_eigen_symmv (gsl_matrix * A, gsl_vector * eval, gsl_matrix * evec, + gsl_eigen_symmv_workspace * w) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix must be square to compute eigenvalues", GSL_ENOTSQR); + } + else if (eval->size != A->size1) + { + GSL_ERROR ("eigenvalue vector must match matrix size", GSL_EBADLEN); + } + else if (evec->size1 != A->size1 || evec->size2 != A->size1) + { + GSL_ERROR ("eigenvector matrix must match matrix size", GSL_EBADLEN); + } + else + { + double *const d = w->d; + double *const sd = w->sd; + const size_t N = A->size1; + size_t a, b; + + /* handle special case */ + + if (N == 1) + { + double A00 = gsl_matrix_get (A, 0, 0); + gsl_vector_set (eval, 0, A00); + gsl_matrix_set (evec, 0, 0, 1.0); + return GSL_SUCCESS; + } + + /* use sd as the temporary workspace for the decomposition when + computing eigenvectors */ + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_view sd_vec = gsl_vector_view_array (sd, N - 1); + gsl_vector_view tau = gsl_vector_view_array (sd, N - 1); + gsl_linalg_symmtd_decomp (A, &tau.vector); + gsl_linalg_symmtd_unpack (A, &tau.vector, evec, &d_vec.vector, &sd_vec.vector); + } + + /* Make an initial pass through the tridiagonal decomposition + to remove off-diagonal elements which are effectively zero */ + + chop_small_elements (N, d, sd); + + /* Progressively reduce the matrix until it is diagonal */ + + b = N - 1; + + while (b > 0) + { + if (sd[b - 1] == 0.0 || isnan(sd[b - 1])) + { + b--; + continue; + } + + /* Find the largest unreduced block (a,b) starting from b + and working backwards */ + + a = b - 1; + + while (a > 0) + { + if (sd[a - 1] == 0.0) + { + break; + } + a--; + } + + { + size_t i; + const size_t n_block = b - a + 1; + double *d_block = d + a; + double *sd_block = sd + a; + double * const gc = w->gc; + double * const gs = w->gs; + + /* apply QR reduction with implicit deflation to the + unreduced block */ + + qrstep (n_block, d_block, sd_block, gc, gs); + + /* Apply Givens rotation Gij(c,s) to matrix Q, Q <- Q G */ + + for (i = 0; i < n_block - 1; i++) + { + const double c = gc[i], s = gs[i]; + size_t k; + + for (k = 0; k < N; k++) + { + double qki = gsl_matrix_get (evec, k, a + i); + double qkj = gsl_matrix_get (evec, k, a + i + 1); + gsl_matrix_set (evec, k, a + i, qki * c - qkj * s); + gsl_matrix_set (evec, k, a + i + 1, qki * s + qkj * c); + } + } + + /* remove any small off-diagonal elements */ + + chop_small_elements (N, d, sd); + } + } + + { + gsl_vector_view d_vec = gsl_vector_view_array (d, N); + gsl_vector_memcpy (eval, &d_vec.vector); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/eigen/test.c b/software/gsl-1.15/eigen/test.c new file mode 100644 index 000000000..20b9f8a1a --- /dev/null +++ b/software/gsl-1.15/eigen/test.c @@ -0,0 +1,1342 @@ +/* eigen/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 Gerard Jungman, Patrick Alken, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/****************************************** + * common test code * + ******************************************/ + +double +chop_subnormals (double x) +{ + /* Chop any subnormal values */ + return fabs(x) < GSL_DBL_MIN ? 0 : x; +} + +void +create_random_symm_matrix(gsl_matrix *m, gsl_rng *r, int lower, int upper) +{ + size_t i, j; + + for (i = 0; i < m->size1; ++i) + { + for (j = i; j < m->size2; ++j) + { + double x = gsl_rng_uniform(r) * (upper - lower) + lower; + gsl_matrix_set(m, i, j, x); + gsl_matrix_set(m, j, i, x); + } + } +} /* create_random_symm_matrix() */ + +void +create_random_herm_matrix(gsl_matrix_complex *m, gsl_rng *r, int lower, + int upper) +{ + size_t i, j; + + for (i = 0; i < m->size1; ++i) + { + for (j = i; j < m->size2; ++j) + { + gsl_complex z; + + GSL_REAL(z) = gsl_rng_uniform(r) * (upper - lower) + lower; + + if (i == j) + GSL_IMAG(z) = 0.0; + else + GSL_IMAG(z) = gsl_rng_uniform(r) * (upper - lower) + lower; + + gsl_matrix_complex_set(m, i, j, z); + gsl_matrix_complex_set(m, j, i, gsl_complex_conjugate(z)); + } + } +} /* create_random_herm_matrix() */ + +/* with r \in (0,1) if m_{ij} = r^{|i - j|} then m is positive definite */ +void +create_random_posdef_matrix(gsl_matrix *m, gsl_rng *r) +{ + size_t i, j; + double x = gsl_rng_uniform(r); + + for (i = 0; i < m->size1; ++i) + { + for (j = i; j < m->size2; ++j) + { + double a = pow(x, (double) (j - i)); + + gsl_matrix_set(m, i, j, a); + gsl_matrix_set(m, j, i, a); + } + } +} /* create_random_posdef_matrix() */ + +void +create_random_complex_posdef_matrix(gsl_matrix_complex *m, gsl_rng *r, + gsl_vector_complex *work) +{ + const size_t N = m->size1; + size_t i, j; + double x, y; + gsl_complex z; + gsl_complex tau; + + GSL_SET_IMAG(&z, 0.0); + + /* make a positive diagonal matrix */ + gsl_matrix_complex_set_zero(m); + for (i = 0; i < N; ++i) + { + x = gsl_rng_uniform(r); + GSL_SET_REAL(&z, x); + gsl_matrix_complex_set(m, i, i, z); + } + + /* now generate random householder reflections and form P D P^H */ + for (i = 0; i < N; ++i) + { + /* form complex vector */ + for (j = 0; j < N; ++j) + { + x = 2.0 * gsl_rng_uniform(r) - 1.0; + y = 2.0 * gsl_rng_uniform(r) - 1.0; + GSL_SET_COMPLEX(&z, x, y); + gsl_vector_complex_set(work, j, z); + } + + tau = gsl_linalg_complex_householder_transform(work); + gsl_linalg_complex_householder_hm(tau, work, m); + gsl_linalg_complex_householder_mh(gsl_complex_conjugate(tau), work, m); + } +} /* create_random_complex_posdef_matrix() */ + +void +create_random_nonsymm_matrix(gsl_matrix *m, gsl_rng *r, int lower, + int upper) +{ + size_t i, j; + + for (i = 0; i < m->size1; ++i) + { + for (j = 0; j < m->size2; ++j) + { + gsl_matrix_set(m, + i, + j, + gsl_rng_uniform(r) * (upper - lower) + lower); + } + } +} /* create_random_nonsymm_matrix() */ + +/* test if A Z = Q S */ +void +test_eigen_schur(const gsl_matrix * A, const gsl_matrix * S, + const gsl_matrix * Q, const gsl_matrix * Z, + size_t count, const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + + gsl_matrix * T1 = gsl_matrix_alloc(N, N); + gsl_matrix * T2 = gsl_matrix_alloc(N, N); + + /* compute T1 = A Z */ + gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, A, Z, 0.0, T1); + + /* compute T2 = Q S */ + gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, Q, S, 0.0, T2); + + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + double x = gsl_matrix_get(T1, i, j); + double y = gsl_matrix_get(T2, i, j); + + gsl_test_abs(x, y, 1.0e8 * GSL_DBL_EPSILON, + "%s(N=%u,cnt=%u), %s, schur(%d,%d)", desc, N, count, desc2, i, j); + } + } + + gsl_matrix_free (T1); + gsl_matrix_free (T2); +} /* test_eigen_schur() */ + +/* test if A is orthogonal */ +int +test_eigen_orthog(gsl_matrix *A, size_t count, const char *desc, + const char *desc2) +{ + size_t N = A->size1; + gsl_matrix *M = gsl_matrix_alloc(A->size1, A->size2); + size_t i, j; + + gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0, A, A, 0.0, M); + + for (i = 0; i < A->size1; ++i) + { + for (j = 0; j < A->size2; ++j) + { + double val; + double mij = gsl_matrix_get(M, i, j); + + if (i == j) + val = 1.0; + else + val = 0.0; + + gsl_test_abs(mij, val, 1.0e8 * GSL_DBL_EPSILON, + "%s(N=%u,cnt=%u), %s, orthog(%d,%d)", desc, N, count, desc2, i, j); + } + } + + gsl_matrix_free(M); + + return 1; +} /* test_eigen_orthog() */ + +void +test_eigenvalues_real (const gsl_vector *eval, const gsl_vector * eval2, + const char * desc, const char * desc2) +{ + const size_t N = eval->size; + size_t i; + + double emax = 0; + + /* check eigenvalues */ + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + if (fabs(ei) > emax) emax = fabs(ei); + } + + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + double e2i = gsl_vector_get (eval2, i); + e2i = chop_subnormals(e2i); + gsl_test_abs(ei, e2i, emax * 1e8 * GSL_DBL_EPSILON, + "%s, direct eigenvalue(%d), %s", + desc, i, desc2); + } +} + +void +test_eigenvalues_complex (const gsl_vector_complex * eval, + const gsl_vector_complex * eval2, + const char * desc, const char * desc2) +{ + const size_t N = eval->size; + size_t i; + + for (i = 0; i < N; i++) + { + gsl_complex ei = gsl_vector_complex_get (eval, i); + gsl_complex e2i = gsl_vector_complex_get (eval2, i); + gsl_test_rel(GSL_REAL(ei), GSL_REAL(e2i), 10*N*GSL_DBL_EPSILON, + "%s, direct eigenvalue(%d) real, %s", + desc, i, desc2); + gsl_test_rel(GSL_IMAG(ei), GSL_IMAG(e2i), 10*N*GSL_DBL_EPSILON, + "%s, direct eigenvalue(%d) imag, %s", + desc, i, desc2); + } +} + +/****************************************** + * symm test code * + ******************************************/ + +void +test_eigen_symm_results (const gsl_matrix * A, + const gsl_vector * eval, + const gsl_matrix * evec, + size_t count, + const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + double emax = 0; + + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * y = gsl_vector_alloc(N); + + /* check eigenvalues */ + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + if (fabs(ei) > emax) emax = fabs(ei); + } + + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + gsl_vector_const_view vi = gsl_matrix_const_column(evec, i); + gsl_vector_memcpy(x, &vi.vector); + /* compute y = A x (should = lambda v) */ + gsl_blas_dgemv (CblasNoTrans, 1.0, A, x, 0.0, y); + for (j = 0; j < N; j++) + { + double xj = gsl_vector_get (x, j); + double yj = gsl_vector_get (y, j); + double eixj = chop_subnormals(ei * xj); + gsl_test_abs(yj, eixj, emax * 1e8 * GSL_DBL_EPSILON, + "%s, eigenvalue(%d,%d), %s", desc, i, j, desc2); + } + } + + /* check eigenvectors are orthonormal */ + + for (i = 0; i < N; i++) + { + gsl_vector_const_view vi = gsl_matrix_const_column(evec, i); + double nrm_v = gsl_blas_dnrm2(&vi.vector); + gsl_test_rel (nrm_v, 1.0, N * GSL_DBL_EPSILON, "%s, normalized(%d), %s", + desc, i, desc2); + } + + for (i = 0; i < N; i++) + { + gsl_vector_const_view vi = gsl_matrix_const_column(evec, i); + for (j = i + 1; j < N; j++) + { + gsl_vector_const_view vj = gsl_matrix_const_column(evec, j); + double vivj; + gsl_blas_ddot (&vi.vector, &vj.vector, &vivj); + gsl_test_abs (vivj, 0.0, N * GSL_DBL_EPSILON, + "%s, orthogonal(%d,%d), %s", desc, i, j, desc2); + } + } + + gsl_vector_free(x); + gsl_vector_free(y); +} + +void +test_eigen_symm_matrix(const gsl_matrix * m, size_t count, + const char * desc) +{ + const size_t N = m->size1; + gsl_matrix * A = gsl_matrix_alloc(N, N); + gsl_vector * eval = gsl_vector_alloc(N); + gsl_vector * evalv = gsl_vector_alloc(N); + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * y = gsl_vector_alloc(N); + gsl_matrix * evec = gsl_matrix_alloc(N, N); + gsl_eigen_symm_workspace * w = gsl_eigen_symm_alloc(N); + gsl_eigen_symmv_workspace * wv = gsl_eigen_symmv_alloc(N); + + gsl_matrix_memcpy(A, m); + + gsl_eigen_symmv(A, evalv, evec, wv); + test_eigen_symm_results(m, evalv, evec, count, desc, "unsorted"); + + gsl_matrix_memcpy(A, m); + + gsl_eigen_symm(A, eval, w); + + /* sort eval and evalv */ + gsl_vector_memcpy(x, eval); + gsl_vector_memcpy(y, evalv); + gsl_sort_vector(x); + gsl_sort_vector(y); + test_eigenvalues_real(y, x, desc, "unsorted"); + + gsl_eigen_symmv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_ASC); + test_eigen_symm_results(m, evalv, evec, count, desc, "val/asc"); + + gsl_eigen_symmv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_DESC); + test_eigen_symm_results(m, evalv, evec, count, desc, "val/desc"); + + gsl_eigen_symmv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_symm_results(m, evalv, evec, count, desc, "abs/asc"); + + gsl_eigen_symmv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_symm_results(m, evalv, evec, count, desc, "abs/desc"); + + gsl_matrix_free(A); + gsl_vector_free(eval); + gsl_vector_free(evalv); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_matrix_free(evec); + gsl_eigen_symm_free(w); + gsl_eigen_symmv_free(wv); +} /* test_eigen_symm_matrix() */ + +void +test_eigen_symm(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix * A = gsl_matrix_alloc(n, n); + + for (i = 0; i < 5; ++i) + { + create_random_symm_matrix(A, r, -10, 10); + test_eigen_symm_matrix(A, i, "symm random"); + } + + gsl_matrix_free(A); + } + + gsl_rng_free(r); + + { + double dat1[] = { 0, 0, -1, 0, + 0, 1, 0, 1, + -1, 0, 0, 0, + 0, 1, 0, 0 }; + double dat2[] = { 1, 0, 0, 0, + 0, 2, 0, 0, + 0, 0, 3, 0, + 0, 0, 0, 4 }; + gsl_matrix_view m; + + m = gsl_matrix_view_array (dat1, 4, 4); + test_eigen_symm_matrix(&m.matrix, 0, "symm(4)"); + + m = gsl_matrix_view_array (dat2, 4, 4); + test_eigen_symm_matrix(&m.matrix, 0, "symm(4) diag"); + } + + { + double dat[27*27] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1, + 0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0, + 0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }; + + gsl_matrix_view m; + m = gsl_matrix_view_array (dat, 27, 27); + test_eigen_symm_matrix(&m.matrix, 0, "symm(27)"); + }; + +} /* test_eigen_symm() */ + +/****************************************** + * herm test code * + ******************************************/ + +void +test_eigen_herm_results (const gsl_matrix_complex * A, + const gsl_vector * eval, + const gsl_matrix_complex * evec, + size_t count, + const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + + gsl_vector_complex * x = gsl_vector_complex_alloc(N); + gsl_vector_complex * y = gsl_vector_complex_alloc(N); + + /* check eigenvalues */ + + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + gsl_vector_complex_const_view vi = + gsl_matrix_complex_const_column(evec, i); + gsl_vector_complex_memcpy(x, &vi.vector); + /* compute y = m x (should = lambda v) */ + gsl_blas_zgemv (CblasNoTrans, GSL_COMPLEX_ONE, A, x, + GSL_COMPLEX_ZERO, y); + for (j = 0; j < N; j++) + { + gsl_complex xj = gsl_vector_complex_get (x, j); + gsl_complex yj = gsl_vector_complex_get (y, j); + gsl_test_rel(GSL_REAL(yj), ei * GSL_REAL(xj), 1e8*GSL_DBL_EPSILON, + "%s, eigenvalue(%d,%d), real, %s", desc, i, j, desc2); + gsl_test_rel(GSL_IMAG(yj), ei * GSL_IMAG(xj), 1e8*GSL_DBL_EPSILON, + "%s, eigenvalue(%d,%d), imag, %s", desc, i, j, desc2); + } + } + + /* check eigenvectors are orthonormal */ + + for (i = 0; i < N; i++) + { + gsl_vector_complex_const_view vi = gsl_matrix_complex_const_column(evec, i); + double nrm_v = gsl_blas_dznrm2(&vi.vector); + gsl_test_rel (nrm_v, 1.0, N * GSL_DBL_EPSILON, "%s, normalized(%d), %s", + desc, i, desc2); + } + + for (i = 0; i < N; i++) + { + gsl_vector_complex_const_view vi = gsl_matrix_complex_const_column(evec, i); + for (j = i + 1; j < N; j++) + { + gsl_vector_complex_const_view vj + = gsl_matrix_complex_const_column(evec, j); + gsl_complex vivj; + gsl_blas_zdotc (&vi.vector, &vj.vector, &vivj); + gsl_test_abs (gsl_complex_abs(vivj), 0.0, 10.0 * N * GSL_DBL_EPSILON, + "%s, orthogonal(%d,%d), %s", desc, i, j, desc2); + } + } + + gsl_vector_complex_free(x); + gsl_vector_complex_free(y); +} /* test_eigen_herm_results() */ + +void +test_eigen_herm_matrix(const gsl_matrix_complex * m, size_t count, + const char * desc) +{ + const size_t N = m->size1; + gsl_matrix_complex * A = gsl_matrix_complex_alloc(N, N); + gsl_vector * eval = gsl_vector_alloc(N); + gsl_vector * evalv = gsl_vector_alloc(N); + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * y = gsl_vector_alloc(N); + gsl_matrix_complex * evec = gsl_matrix_complex_alloc(N, N); + gsl_eigen_herm_workspace * w = gsl_eigen_herm_alloc(N); + gsl_eigen_hermv_workspace * wv = gsl_eigen_hermv_alloc(N); + + gsl_matrix_complex_memcpy(A, m); + + gsl_eigen_hermv(A, evalv, evec, wv); + test_eigen_herm_results(m, evalv, evec, count, desc, "unsorted"); + + gsl_matrix_complex_memcpy(A, m); + + gsl_eigen_herm(A, eval, w); + + /* sort eval and evalv */ + gsl_vector_memcpy(x, eval); + gsl_vector_memcpy(y, evalv); + gsl_sort_vector(x); + gsl_sort_vector(y); + test_eigenvalues_real(y, x, desc, "unsorted"); + + gsl_eigen_hermv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_ASC); + test_eigen_herm_results(m, evalv, evec, count, desc, "val/asc"); + + gsl_eigen_hermv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_DESC); + test_eigen_herm_results(m, evalv, evec, count, desc, "val/desc"); + + gsl_eigen_hermv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_herm_results(m, evalv, evec, count, desc, "abs/asc"); + + gsl_eigen_hermv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_herm_results(m, evalv, evec, count, desc, "abs/desc"); + + gsl_matrix_complex_free(A); + gsl_vector_free(eval); + gsl_vector_free(evalv); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_matrix_complex_free(evec); + gsl_eigen_herm_free(w); + gsl_eigen_hermv_free(wv); +} /* test_eigen_herm_matrix() */ + +void +test_eigen_herm(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix_complex * A = gsl_matrix_complex_alloc(n, n); + + for (i = 0; i < 5; ++i) + { + create_random_herm_matrix(A, r, -10, 10); + test_eigen_herm_matrix(A, i, "herm random"); + } + + gsl_matrix_complex_free(A); + } + + gsl_rng_free(r); + + { + double dat1[] = { 0,0, 0,0, -1,0, 0,0, + 0,0, 1,0, 0,0, 1,0, + -1,0, 0,0, 0,0, 0,0, + 0,0, 1,0, 0,0, 0,0 }; + double dat2[] = { 1,0, 0,0, 0,0, 0,0, + 0,0, 2,0, 0,0, 0,0, + 0,0, 0,0, 3,0, 0,0, + 0,0, 0,0, 0,0, 4,0 }; + gsl_matrix_complex_view m; + + m = gsl_matrix_complex_view_array (dat1, 4, 4); + test_eigen_herm_matrix(&m.matrix, 0, "herm(4)"); + + m = gsl_matrix_complex_view_array (dat2, 4, 4); + test_eigen_herm_matrix(&m.matrix, 1, "herm(4) diag"); + } +} /* test_eigen_herm() */ + +/****************************************** + * nonsymm test code * + ******************************************/ + +void +test_eigen_nonsymm_results (const gsl_matrix * m, + const gsl_vector_complex * eval, + const gsl_matrix_complex * evec, + size_t count, + const char * desc, + const char * desc2) +{ + size_t i,j; + size_t N = m->size1; + + gsl_vector_complex * x = gsl_vector_complex_alloc(N); + gsl_vector_complex * y = gsl_vector_complex_alloc(N); + gsl_matrix_complex * A = gsl_matrix_complex_alloc(N, N); + + /* we need a complex matrix for the blas routines, so copy m into A */ + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + gsl_complex z; + GSL_SET_COMPLEX(&z, gsl_matrix_get(m, i, j), 0.0); + gsl_matrix_complex_set(A, i, j, z); + } + } + + for (i = 0; i < N; i++) + { + gsl_complex ei = gsl_vector_complex_get (eval, i); + gsl_vector_complex_const_view vi = gsl_matrix_complex_const_column(evec, i); + double norm = gsl_blas_dznrm2(&vi.vector); + + /* check that eigenvector is normalized */ + gsl_test_rel(norm, 1.0, N * GSL_DBL_EPSILON, + "nonsymm(N=%u,cnt=%u), %s, normalized(%d), %s", N, count, desc, i, desc2); + + gsl_vector_complex_memcpy(x, &vi.vector); + + /* compute y = m x (should = lambda v) */ + gsl_blas_zgemv (CblasNoTrans, GSL_COMPLEX_ONE, A, x, + GSL_COMPLEX_ZERO, y); + + /* compute x = lambda v */ + gsl_blas_zscal(ei, x); + + /* now test if y = x */ + for (j = 0; j < N; j++) + { + gsl_complex xj = gsl_vector_complex_get (x, j); + gsl_complex yj = gsl_vector_complex_get (y, j); + + /* use abs here in case the values are close to 0 */ + gsl_test_abs(GSL_REAL(yj), GSL_REAL(xj), 1e8*GSL_DBL_EPSILON, + "nonsymm(N=%u,cnt=%u), %s, eigenvalue(%d,%d), real, %s", N, count, desc, i, j, desc2); + gsl_test_abs(GSL_IMAG(yj), GSL_IMAG(xj), 1e8*GSL_DBL_EPSILON, + "nonsymm(N=%u,cnt=%u), %s, eigenvalue(%d,%d), imag, %s", N, count, desc, i, j, desc2); + } + } + + gsl_matrix_complex_free(A); + gsl_vector_complex_free(x); + gsl_vector_complex_free(y); +} + +void +test_eigen_nonsymm_matrix(const gsl_matrix * m, size_t count, + const char * desc, + gsl_eigen_nonsymmv_workspace *w) +{ + const size_t N = m->size1; + gsl_matrix * A = gsl_matrix_alloc(N, N); + gsl_matrix * Z = gsl_matrix_alloc(N, N); + gsl_matrix_complex * evec = gsl_matrix_complex_alloc(N, N); + gsl_vector_complex * eval = gsl_vector_complex_alloc(N); + + /* + * calculate eigenvalues and eigenvectors - it is sufficient to + * test gsl_eigen_nonsymmv() since that function calls + * gsl_eigen_nonsymm() for the eigenvalues + */ + gsl_matrix_memcpy(A, m); + gsl_eigen_nonsymmv(A, eval, evec, w); + test_eigen_nonsymm_results (m, eval, evec, count, desc, "unsorted"); + + /* test sort routines */ + gsl_eigen_nonsymmv_sort (eval, evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_nonsymm_results (m, eval, evec, count, desc, "abs/asc"); + + gsl_eigen_nonsymmv_sort (eval, evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_nonsymm_results (m, eval, evec, count, desc, "abs/desc"); + + /* test Schur vectors */ + gsl_matrix_memcpy(A, m); + gsl_eigen_nonsymmv_Z(A, eval, evec, Z, w); + gsl_linalg_hessenberg_set_zero(A); + test_eigen_schur(m, A, Z, Z, count, "nonsymm", desc); + + /* test if Z is an orthogonal matrix */ + if (w->nonsymm_workspace_p->do_balance == 0) + test_eigen_orthog(Z, count, "nonsymm", desc); + + gsl_matrix_free(A); + gsl_matrix_free(Z); + gsl_matrix_complex_free(evec); + gsl_vector_complex_free(eval); +} + +void +test_eigen_nonsymm(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix * m = gsl_matrix_alloc(n, n); + gsl_eigen_nonsymmv_workspace * w = gsl_eigen_nonsymmv_alloc(n); + + for (i = 0; i < 5; ++i) + { + create_random_nonsymm_matrix(m, r, -10, 10); + + gsl_eigen_nonsymmv_params(0, w); + test_eigen_nonsymm_matrix(m, i, "random, unbalanced", w); + + gsl_eigen_nonsymmv_params(1, w); + test_eigen_nonsymm_matrix(m, i, "random, balanced", w); + } + + gsl_matrix_free(m); + gsl_eigen_nonsymmv_free(w); + } + + gsl_rng_free(r); + + { + double dat1[] = { 0, 1, 1, 1, + 1, 1, 1, 1, + 0, 0, 0, 0, + 0, 0, 0, 0 }; + double dat2[] = { 1, 1, 0, 1, + 1, 1, 1, 1, + 1, 1, 1, 1, + 0, 1, 0, 0 }; + gsl_matrix_view v; + gsl_eigen_nonsymmv_workspace * w = gsl_eigen_nonsymmv_alloc(4); + + v = gsl_matrix_view_array (dat1, 4, 4); + test_eigen_nonsymm_matrix(&v.matrix, 0, "integer", w); + + v = gsl_matrix_view_array (dat2, 4, 4); + test_eigen_nonsymm_matrix(&v.matrix, 1, "integer", w); + + gsl_eigen_nonsymmv_free(w); + } +} /* test_eigen_nonsymm() */ + +/****************************************** + * gensymm test code * + ******************************************/ + +void +test_eigen_gensymm_results (const gsl_matrix * A, + const gsl_matrix * B, + const gsl_vector * eval, + const gsl_matrix * evec, + size_t count, + const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * y = gsl_vector_alloc(N); + gsl_vector * z = gsl_vector_alloc(N); + + /* check A v = lambda B v */ + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + gsl_vector_const_view vi = gsl_matrix_const_column(evec, i); + double norm = gsl_blas_dnrm2(&vi.vector); + + /* check that eigenvector is normalized */ + gsl_test_rel(norm, 1.0, N * GSL_DBL_EPSILON, + "gensymm(N=%u,cnt=%u), %s, normalized(%d), %s", N, count, + desc, i, desc2); + + gsl_vector_memcpy(z, &vi.vector); + + /* compute y = A z */ + gsl_blas_dgemv (CblasNoTrans, 1.0, A, z, 0.0, y); + + /* compute x = B z */ + gsl_blas_dgemv (CblasNoTrans, 1.0, B, z, 0.0, x); + + /* compute x = lambda B z */ + gsl_blas_dscal(ei, x); + + /* now test if y = x */ + for (j = 0; j < N; j++) + { + double xj = gsl_vector_get (x, j); + double yj = gsl_vector_get (y, j); + + gsl_test_rel(yj, xj, 1e9 * GSL_DBL_EPSILON, + "gensymm(N=%u,cnt=%u), %s, eigenvalue(%d,%d), real, %s", N, count, desc, i, j, desc2); + } + } + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +void +test_eigen_gensymm(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix * A = gsl_matrix_alloc(n, n); + gsl_matrix * B = gsl_matrix_alloc(n, n); + gsl_matrix * ma = gsl_matrix_alloc(n, n); + gsl_matrix * mb = gsl_matrix_alloc(n, n); + gsl_vector * eval = gsl_vector_alloc(n); + gsl_vector * evalv = gsl_vector_alloc(n); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_matrix * evec = gsl_matrix_alloc(n, n); + gsl_eigen_gensymm_workspace * w = gsl_eigen_gensymm_alloc(n); + gsl_eigen_gensymmv_workspace * wv = gsl_eigen_gensymmv_alloc(n); + + for (i = 0; i < 5; ++i) + { + create_random_symm_matrix(A, r, -10, 10); + create_random_posdef_matrix(B, r); + + gsl_matrix_memcpy(ma, A); + gsl_matrix_memcpy(mb, B); + + gsl_eigen_gensymmv(ma, mb, evalv, evec, wv); + test_eigen_gensymm_results(A, B, evalv, evec, i, "random", "unsorted"); + + gsl_matrix_memcpy(ma, A); + gsl_matrix_memcpy(mb, B); + + gsl_eigen_gensymm(ma, mb, eval, w); + + /* eval and evalv have to be sorted? not sure why */ + gsl_vector_memcpy(x, eval); + gsl_vector_memcpy(y, evalv); + gsl_sort_vector(x); + gsl_sort_vector(y); + test_eigenvalues_real(y, x, "gensymm, random", "unsorted"); + + gsl_eigen_gensymmv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_ASC); + test_eigen_gensymm_results(A, B, evalv, evec, i, "random", "val/asc"); + + gsl_eigen_gensymmv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_DESC); + test_eigen_gensymm_results(A, B, evalv, evec, i, "random", "val/desc"); + + gsl_eigen_gensymmv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_gensymm_results(A, B, evalv, evec, i, "random", "abs/asc"); + gsl_eigen_gensymmv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_gensymm_results(A, B, evalv, evec, i, "random", "abs/desc"); + } + + gsl_matrix_free(A); + gsl_matrix_free(B); + gsl_matrix_free(ma); + gsl_matrix_free(mb); + gsl_vector_free(eval); + gsl_vector_free(evalv); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_matrix_free(evec); + gsl_eigen_gensymm_free(w); + gsl_eigen_gensymmv_free(wv); + } + + gsl_rng_free(r); +} /* test_eigen_gensymm() */ + +/****************************************** + * genherm test code * + ******************************************/ + +void +test_eigen_genherm_results (const gsl_matrix_complex * A, + const gsl_matrix_complex * B, + const gsl_vector * eval, + const gsl_matrix_complex * evec, + size_t count, + const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + + gsl_vector_complex * x = gsl_vector_complex_alloc(N); + gsl_vector_complex * y = gsl_vector_complex_alloc(N); + + /* check A v = lambda B v */ + for (i = 0; i < N; i++) + { + double ei = gsl_vector_get (eval, i); + gsl_vector_complex_const_view vi = + gsl_matrix_complex_const_column(evec, i); + double norm = gsl_blas_dznrm2(&vi.vector); + + /* check that eigenvector is normalized */ + gsl_test_rel(norm, 1.0, N * GSL_DBL_EPSILON, + "genherm(N=%u,cnt=%u), %s, normalized(%d), %s", N, count, + desc, i, desc2); + + /* compute y = A z */ + gsl_blas_zgemv (CblasNoTrans, GSL_COMPLEX_ONE, A, &vi.vector, GSL_COMPLEX_ZERO, y); + + /* compute x = B z */ + gsl_blas_zgemv (CblasNoTrans, GSL_COMPLEX_ONE, B, &vi.vector, GSL_COMPLEX_ZERO, x); + + /* compute x = lambda B z */ + gsl_blas_zdscal(ei, x); + + /* now test if y = x */ + for (j = 0; j < N; j++) + { + gsl_complex xj = gsl_vector_complex_get (x, j); + gsl_complex yj = gsl_vector_complex_get (y, j); + + gsl_test_rel(GSL_REAL(yj), GSL_REAL(xj), 1e9 * GSL_DBL_EPSILON, + "genherm(N=%u,cnt=%u), %s, eigenvalue(%d,%d), real, %s", N, count, desc, i, j, desc2); + gsl_test_abs(GSL_IMAG(yj), GSL_IMAG(xj), 1e9 * GSL_DBL_EPSILON, + "genherm(N=%u,cnt=%u), %s, eigenvalue(%d,%d), imag, %s", N, count, desc, i, j, desc2); + } + } + + gsl_vector_complex_free(x); + gsl_vector_complex_free(y); +} + +void +test_eigen_genherm(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix_complex * A = gsl_matrix_complex_alloc(n, n); + gsl_matrix_complex * B = gsl_matrix_complex_alloc(n, n); + gsl_matrix_complex * ma = gsl_matrix_complex_alloc(n, n); + gsl_matrix_complex * mb = gsl_matrix_complex_alloc(n, n); + gsl_vector * eval = gsl_vector_alloc(n); + gsl_vector * evalv = gsl_vector_alloc(n); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector_complex * work = gsl_vector_complex_alloc(n); + gsl_matrix_complex * evec = gsl_matrix_complex_alloc(n, n); + gsl_eigen_genherm_workspace * w = gsl_eigen_genherm_alloc(n); + gsl_eigen_genhermv_workspace * wv = gsl_eigen_genhermv_alloc(n); + + for (i = 0; i < 5; ++i) + { + create_random_herm_matrix(A, r, -10, 10); + create_random_complex_posdef_matrix(B, r, work); + + gsl_matrix_complex_memcpy(ma, A); + gsl_matrix_complex_memcpy(mb, B); + + gsl_eigen_genhermv(ma, mb, evalv, evec, wv); + test_eigen_genherm_results(A, B, evalv, evec, i, "random", "unsorted"); + + gsl_matrix_complex_memcpy(ma, A); + gsl_matrix_complex_memcpy(mb, B); + + gsl_eigen_genherm(ma, mb, eval, w); + + /* eval and evalv have to be sorted? not sure why */ + gsl_vector_memcpy(x, eval); + gsl_vector_memcpy(y, evalv); + gsl_sort_vector(x); + gsl_sort_vector(y); + test_eigenvalues_real(y, x, "genherm, random", "unsorted"); + + gsl_eigen_genhermv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_ASC); + test_eigen_genherm_results(A, B, evalv, evec, i, "random", "val/asc"); + + gsl_eigen_genhermv_sort(evalv, evec, GSL_EIGEN_SORT_VAL_DESC); + test_eigen_genherm_results(A, B, evalv, evec, i, "random", "val/desc"); + + gsl_eigen_genhermv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_genherm_results(A, B, evalv, evec, i, "random", "abs/asc"); + gsl_eigen_genhermv_sort(evalv, evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_genherm_results(A, B, evalv, evec, i, "random", "abs/desc"); + } + + gsl_matrix_complex_free(A); + gsl_matrix_complex_free(B); + gsl_matrix_complex_free(ma); + gsl_matrix_complex_free(mb); + gsl_vector_free(eval); + gsl_vector_free(evalv); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_complex_free(work); + gsl_matrix_complex_free(evec); + gsl_eigen_genherm_free(w); + gsl_eigen_genhermv_free(wv); + } + + gsl_rng_free(r); +} /* test_eigen_genherm() */ + +/****************************************** + * gen test code * + ******************************************/ + +typedef struct +{ + gsl_matrix *A; + gsl_matrix *B; + gsl_vector_complex *alpha; + gsl_vector *beta; + gsl_vector_complex *alphav; + gsl_vector *betav; + gsl_vector_complex *eval; + gsl_vector_complex *evalv; + gsl_vector *x; + gsl_vector *y; + gsl_matrix *Q; + gsl_matrix *Z; + gsl_matrix_complex *evec; + gsl_eigen_gen_workspace *gen_p; + gsl_eigen_genv_workspace *genv_p; +} test_eigen_gen_workspace; + +test_eigen_gen_workspace * +test_eigen_gen_alloc(const size_t n) +{ + test_eigen_gen_workspace *w; + + w = (test_eigen_gen_workspace *) calloc(1, sizeof(test_eigen_gen_workspace)); + + w->A = gsl_matrix_alloc(n, n); + w->B = gsl_matrix_alloc(n, n); + w->alpha = gsl_vector_complex_alloc(n); + w->beta = gsl_vector_alloc(n); + w->alphav = gsl_vector_complex_alloc(n); + w->betav = gsl_vector_alloc(n); + w->eval = gsl_vector_complex_alloc(n); + w->evalv = gsl_vector_complex_alloc(n); + w->x = gsl_vector_alloc(n); + w->y = gsl_vector_alloc(n); + w->Q = gsl_matrix_alloc(n, n); + w->Z = gsl_matrix_alloc(n, n); + w->evec = gsl_matrix_complex_alloc(n, n); + w->gen_p = gsl_eigen_gen_alloc(n); + w->genv_p = gsl_eigen_genv_alloc(n); + + return (w); +} /* test_eigen_gen_alloc() */ + +void +test_eigen_gen_free(test_eigen_gen_workspace *w) +{ + gsl_matrix_free(w->A); + gsl_matrix_free(w->B); + gsl_vector_complex_free(w->alpha); + gsl_vector_free(w->beta); + gsl_vector_complex_free(w->alphav); + gsl_vector_free(w->betav); + gsl_vector_complex_free(w->eval); + gsl_vector_complex_free(w->evalv); + gsl_vector_free(w->x); + gsl_vector_free(w->y); + gsl_matrix_free(w->Q); + gsl_matrix_free(w->Z); + gsl_matrix_complex_free(w->evec); + gsl_eigen_gen_free(w->gen_p); + gsl_eigen_genv_free(w->genv_p); + free(w); +} /* test_eigen_gen_free() */ + +void +test_eigen_gen_results (const gsl_matrix * A, const gsl_matrix * B, + const gsl_vector_complex * alpha, + const gsl_vector * beta, + const gsl_matrix_complex * evec, + size_t count, const char * desc, + const char * desc2) +{ + const size_t N = A->size1; + size_t i, j; + gsl_matrix_complex *ma, *mb; + gsl_vector_complex *x, *y; + gsl_complex z_one, z_zero; + + ma = gsl_matrix_complex_alloc(N, N); + mb = gsl_matrix_complex_alloc(N, N); + y = gsl_vector_complex_alloc(N); + x = gsl_vector_complex_alloc(N); + + /* ma <- A, mb <- B */ + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + gsl_complex z; + + GSL_SET_COMPLEX(&z, gsl_matrix_get(A, i, j), 0.0); + gsl_matrix_complex_set(ma, i, j, z); + + GSL_SET_COMPLEX(&z, gsl_matrix_get(B, i, j), 0.0); + gsl_matrix_complex_set(mb, i, j, z); + } + } + + GSL_SET_COMPLEX(&z_one, 1.0, 0.0); + GSL_SET_COMPLEX(&z_zero, 0.0, 0.0); + + /* check eigenvalues */ + for (i = 0; i < N; ++i) + { + gsl_vector_complex_const_view vi = + gsl_matrix_complex_const_column(evec, i); + gsl_complex ai = gsl_vector_complex_get(alpha, i); + double bi = gsl_vector_get(beta, i); + + /* compute x = alpha * B * v */ + gsl_blas_zgemv(CblasNoTrans, z_one, mb, &vi.vector, z_zero, x); + gsl_blas_zscal(ai, x); + + /* compute y = beta * A v */ + gsl_blas_zgemv(CblasNoTrans, z_one, ma, &vi.vector, z_zero, y); + gsl_blas_zdscal(bi, y); + + /* now test if y = x */ + for (j = 0; j < N; ++j) + { + gsl_complex xj = gsl_vector_complex_get(x, j); + gsl_complex yj = gsl_vector_complex_get(y, j); + + gsl_test_abs(GSL_REAL(yj), GSL_REAL(xj), 1e8*GSL_DBL_EPSILON, + "gen(N=%u,cnt=%u), %s, eigenvalue(%d,%d), real, %s", + N, count, desc, i, j, desc2); + gsl_test_abs(GSL_IMAG(yj), GSL_IMAG(xj), 1e8*GSL_DBL_EPSILON, + "gen(N=%u,cnt=%u), %s, eigenvalue(%d,%d), real, %s", + N, count, desc, i, j, desc2); + } + } + + gsl_matrix_complex_free(ma); + gsl_matrix_complex_free(mb); + gsl_vector_complex_free(y); + gsl_vector_complex_free(x); +} /* test_eigen_gen_results() */ + +void +test_eigen_gen_pencil(const gsl_matrix * A, const gsl_matrix * B, + size_t count, const char * desc, int test_schur, + test_eigen_gen_workspace *w) +{ + const size_t N = A->size1; + size_t i; + + gsl_matrix_memcpy(w->A, A); + gsl_matrix_memcpy(w->B, B); + + if (test_schur) + { + gsl_eigen_genv_QZ(w->A, w->B, w->alphav, w->betav, w->evec, w->Q, w->Z, w->genv_p); + test_eigen_schur(A, w->A, w->Q, w->Z, count, "genv/A", desc); + test_eigen_schur(B, w->B, w->Q, w->Z, count, "genv/B", desc); + } + else + gsl_eigen_genv(w->A, w->B, w->alphav, w->betav, w->evec, w->genv_p); + + test_eigen_gen_results(A, B, w->alphav, w->betav, w->evec, count, desc, "unsorted"); + + gsl_matrix_memcpy(w->A, A); + gsl_matrix_memcpy(w->B, B); + + if (test_schur) + { + gsl_eigen_gen_params(1, 1, 0, w->gen_p); + gsl_eigen_gen_QZ(w->A, w->B, w->alpha, w->beta, w->Q, w->Z, w->gen_p); + test_eigen_schur(A, w->A, w->Q, w->Z, count, "gen/A", desc); + test_eigen_schur(B, w->B, w->Q, w->Z, count, "gen/B", desc); + } + else + { + gsl_eigen_gen_params(0, 0, 0, w->gen_p); + gsl_eigen_gen(w->A, w->B, w->alpha, w->beta, w->gen_p); + } + + /* compute eval = alpha / beta values */ + for (i = 0; i < N; ++i) + { + gsl_complex z, ai; + double bi; + + ai = gsl_vector_complex_get(w->alpha, i); + bi = gsl_vector_get(w->beta, i); + GSL_SET_COMPLEX(&z, GSL_REAL(ai) / bi, GSL_IMAG(ai) / bi); + gsl_vector_complex_set(w->eval, i, z); + + ai = gsl_vector_complex_get(w->alphav, i); + bi = gsl_vector_get(w->betav, i); + GSL_SET_COMPLEX(&z, GSL_REAL(ai) / bi, GSL_IMAG(ai) / bi); + gsl_vector_complex_set(w->evalv, i, z); + } + + /* sort eval and evalv and test them */ + gsl_eigen_nonsymmv_sort(w->eval, NULL, GSL_EIGEN_SORT_ABS_ASC); + gsl_eigen_nonsymmv_sort(w->evalv, NULL, GSL_EIGEN_SORT_ABS_ASC); + test_eigenvalues_complex(w->evalv, w->eval, "gen", desc); + + gsl_eigen_genv_sort(w->alphav, w->betav, w->evec, GSL_EIGEN_SORT_ABS_ASC); + test_eigen_gen_results(A, B, w->alphav, w->betav, w->evec, count, desc, "abs/asc"); + gsl_eigen_genv_sort(w->alphav, w->betav, w->evec, GSL_EIGEN_SORT_ABS_DESC); + test_eigen_gen_results(A, B, w->alphav, w->betav, w->evec, count, desc, "abs/desc"); +} /* test_eigen_gen_pencil() */ + +void +test_eigen_gen(void) +{ + size_t N_max = 20; + size_t n, i; + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + for (n = 1; n <= N_max; ++n) + { + gsl_matrix * A = gsl_matrix_alloc(n, n); + gsl_matrix * B = gsl_matrix_alloc(n, n); + test_eigen_gen_workspace * w = test_eigen_gen_alloc(n); + + for (i = 0; i < 5; ++i) + { + create_random_nonsymm_matrix(A, r, -10, 10); + create_random_nonsymm_matrix(B, r, -10, 10); + + test_eigen_gen_pencil(A, B, i, "random", 0, w); + test_eigen_gen_pencil(A, B, i, "random", 1, w); + } + + gsl_matrix_free(A); + gsl_matrix_free(B); + test_eigen_gen_free(w); + } + + gsl_rng_free(r); + + /* this system will test the exceptional shift code */ + { + double datA[] = { 1, 1, 0, + 0, 0, -1, + 1, 0, 0 }; + double datB[] = { -1, 0, -1, + 0, -1, 0, + 0, 0, -1 }; + gsl_matrix_view va = gsl_matrix_view_array (datA, 3, 3); + gsl_matrix_view vb = gsl_matrix_view_array (datB, 3, 3); + test_eigen_gen_workspace * w = test_eigen_gen_alloc(3); + + test_eigen_gen_pencil(&va.matrix, &vb.matrix, 0, "integer", 0, w); + test_eigen_gen_pencil(&va.matrix, &vb.matrix, 0, "integer", 1, w); + + test_eigen_gen_free(w); + } +} /* test_eigen_gen() */ + +int +main() +{ + gsl_ieee_env_setup (); + gsl_rng_env_setup (); + + test_eigen_symm(); + test_eigen_herm(); + test_eigen_nonsymm(); + test_eigen_gensymm(); + test_eigen_genherm(); + test_eigen_gen(); + + exit (gsl_test_summary()); +} diff --git a/software/gsl-1.15/err/.deps/error.Plo b/software/gsl-1.15/err/.deps/error.Plo new file mode 100644 index 000000000..9a3c18bb4 --- /dev/null +++ b/software/gsl-1.15/err/.deps/error.Plo @@ -0,0 +1,95 @@ +error.lo: error.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_message.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_message.h: diff --git a/software/gsl-1.15/err/.deps/message.Plo b/software/gsl-1.15/err/.deps/message.Plo new file mode 100644 index 000000000..e5b9784a6 --- /dev/null +++ b/software/gsl-1.15/err/.deps/message.Plo @@ -0,0 +1,95 @@ +message.lo: message.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_message.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_message.h: diff --git a/software/gsl-1.15/err/.deps/stream.Plo b/software/gsl-1.15/err/.deps/stream.Plo new file mode 100644 index 000000000..210b34556 --- /dev/null +++ b/software/gsl-1.15/err/.deps/stream.Plo @@ -0,0 +1,95 @@ +stream.lo: stream.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_message.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_message.h: diff --git a/software/gsl-1.15/err/.deps/strerror.Plo b/software/gsl-1.15/err/.deps/strerror.Plo new file mode 100644 index 000000000..e30028ff7 --- /dev/null +++ b/software/gsl-1.15/err/.deps/strerror.Plo @@ -0,0 +1,43 @@ +strerror.lo: strerror.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: diff --git a/software/gsl-1.15/err/.deps/test.Po b/software/gsl-1.15/err/.deps/test.Po new file mode 100644 index 000000000..8215c8a43 --- /dev/null +++ b/software/gsl-1.15/err/.deps/test.Po @@ -0,0 +1,92 @@ +test.o: test.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../gsl/gsl_test.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_test.h: diff --git a/software/gsl-1.15/err/ChangeLog b/software/gsl-1.15/err/ChangeLog new file mode 100644 index 000000000..c5916fd2e --- /dev/null +++ b/software/gsl-1.15/err/ChangeLog @@ -0,0 +1,161 @@ +2004-07-10 Brian Gough + + * error.c (gsl_error): flush stdout/stderr before aborting (needed + to get a useful error message on some platforms) + +2003-06-17 Brian Gough + + * warn.c: removed, the functions are not used + +Sat Apr 27 21:27:32 2002 Brian Gough + + * error.c (gsl_error): added an explanatory message in the default + error handler before aborting + +Tue Jun 12 11:52:23 2001 Brian Gough + + * gsl_errno.h (GSL_STATUS_UPDATE): added macro for updating + status value multiple times + +Fri Apr 27 18:18:59 2001 Brian Gough + + * gsl_errno.h (GSL_ERROR_NULL): added macro which returns NULL, + for out of memory conditions + +Mon Jan 22 16:01:55 2001 Brian Gough + + * gsl_errno.h: added EOF for end of file + +Sat Aug 26 19:26:59 2000 Brian Gough + + * gsl_errno.h: added error codes ETOLF, ETOLX, ETOLG for + unattainable tolerances in (F,X,G) in multimin MINPACK LM + algorithm. + +Fri May 5 11:20:10 2000 Brian Gough + + * split gsl_test code out into separate test/ directory + +Sun Nov 28 17:17:03 1999 Brian Gough + + * gsl_errno.h: added GSL_ENOPROG and GSL_ENOPROGJ to handle error + conditions from minpack hybrid algorithms (INFO=5,4 in the + original code) + +Thu Oct 28 14:41:31 1999 Brian Gough + + * gsl_test.h: changed variable name in prototype for clarity + +Thu Oct 7 11:46:53 1999 Brian Gough + + * test_results.c (gsl_test_str): changed #if __STDC__ to #ifdef + __STDC__ so the code will compile with compilers that define + __STDC__ to 0 meaning STDC+extensions. + +Sun Jul 11 21:48:25 1999 Brian Gough + + * test_errnos.c (main): added GSL_ECACHE to handle internal cache + structures which grow and can hit a limit + +Sun Mar 7 17:00:08 1999 Brian Gough + + * gsl_errno.h, test_errnos.c, strerror.c: added GSL_EDIVERGE for + divergent integrals and series + +Sat Feb 20 12:14:47 1999 Brian Gough + + * test_errnos.c (main): added the new error codes to the tests + + * gsl_errno.h: moved all the error codes into a single enum + instead of having a separate enum for GSL_SUCCESS and GSL_FAILURE + +Fri Feb 19 15:56:15 1999 Brian Gough + + * gsl_errno.h, strerror.c: added GSL_CONTINUE as an error code + indicating that an iteration process has not converged and should + be continued for more iterations. + +Tue Nov 17 17:11:31 1998 Brian Gough + + * gsl_test.h: removed #include which should not be + present in installed header files + +Tue Nov 10 15:55:56 1998 Brian Gough + + * test_results.c (gsl_test_abs), gsl_test.h: added gsl_test_abs + for absolute errors, like gsl_test_rel for relative errors + +Fri Oct 23 12:51:01 1998 Brian Gough + + * test_results.c (gsl_test_rel): print a shorter "observed vs + expected" message if the description is 45 characters or longer + +Mon Jun 1 11:02:04 1998 Brian Gough + + * gsl_errno.h: added GSL_EUNSUP for errors caused by a hardware + feature which is not supported on a particular platform + + * renamed test.c to test_results.c to avoid confusion when debugging + other test programs called test.c + +Sat May 30 16:11:34 1998 Brian Gough + + * gsl_errno.h: add GSL_ESING for errors caused by singularities + or other bad function behavior + +Fri May 29 14:41:19 1998 Brian Gough + + * gsl_errno.h: added GSL_EBADLEN to signify bad lengths of + matrices or vectors (e.g. non-conformant sizes in a matrix or + vector multiplication) + +Wed May 27 18:15:34 1998 Brian Gough + + * test.c (gsl_test_str): changed things so that the strings aren't + printed unless the string equality test fails (usually they were + too long) + +Mon May 18 17:58:20 1998 Brian Gough + + * test.c (gsl_test_rel): added a test for numerical quantities, + given a result, an expected result and an allowable relative + error. + (gsl_test_int): added a test for comparing integers + +Sun May 10 16:03:12 1998 Brian Gough + + * gsl_errno.h: added GSL_EROUND for roundoff errors + +Fri May 8 18:50:13 1998 Brian Gough + + * gsl_errno.h: changed GSL_ETIMEOUT to GSL_EMAXITER to describe + the error that occurs when a specified number of iterations is + exceeded. + +Sun Apr 19 19:14:05 1998 Brian Gough + + * strerror.c (gsl_strerror): added an strerror function for making + readable descriptions of the error number + +Wed Apr 15 21:59:57 1998 Brian Gough + + * added a stream handler, for the error stream + + * completely reorganized the files, but the functions are + relatively unchanged + +Wed Apr 8 13:55:48 1998 Brian Gough + + * gsl_errno.h (GSL_ERROR_RETURN_NOTHING): added an error macro + suitable for void functions + +Mon Apr 6 14:10:48 1998 Brian Gough + + * gsl_errno.h: use enum instead of #define for symbolic constants, + so that they can be seen in the debugger + +Sun Apr 5 19:49:17 1998 Brian Gough + + * err/errno.c (gsl_error): now takes gsl_errno as an argument + (this is useful for doing conditional breakpoints) + diff --git a/software/gsl-1.15/err/Makefile.am b/software/gsl-1.15/err/Makefile.am new file mode 100644 index 000000000..9f4175f75 --- /dev/null +++ b/software/gsl-1.15/err/Makefile.am @@ -0,0 +1,12 @@ +noinst_LTLIBRARIES = libgslerr.la + +pkginclude_HEADERS = gsl_errno.h gsl_message.h + +libgslerr_la_SOURCES = error.c stream.c message.c strerror.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c +test_LDADD = libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/err/Makefile.in b/software/gsl-1.15/err/Makefile.in new file mode 100644 index 000000000..a8858dee0 --- /dev/null +++ b/software/gsl-1.15/err/Makefile.in @@ -0,0 +1,662 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = err +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslerr_la_LIBADD = +am_libgslerr_la_OBJECTS = error.lo stream.lo message.lo strerror.lo +libgslerr_la_OBJECTS = $(am_libgslerr_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslerr.la ../test/libgsltest.la \ + ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslerr_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslerr_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslerr.la +pkginclude_HEADERS = gsl_errno.h gsl_message.h +libgslerr_la_SOURCES = error.c stream.c message.c strerror.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu err/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu err/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslerr.la: $(libgslerr_la_OBJECTS) $(libgslerr_la_DEPENDENCIES) + $(LINK) $(libgslerr_la_OBJECTS) $(libgslerr_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/err/TODO b/software/gsl-1.15/err/TODO new file mode 100644 index 000000000..029f5e530 --- /dev/null +++ b/software/gsl-1.15/err/TODO @@ -0,0 +1,6 @@ +# -*- org -*- +#+CATEGORY: err + +* Add a GSL_ERROR_MODE environment variable for choosing error +behavior at runtime (???). + diff --git a/software/gsl-1.15/err/error.c b/software/gsl-1.15/err/error.c new file mode 100644 index 000000000..51556619a --- /dev/null +++ b/software/gsl-1.15/err/error.c @@ -0,0 +1,78 @@ +/* err/error.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include + +gsl_error_handler_t * gsl_error_handler = NULL; + +static void no_error_handler (const char *reason, const char *file, int line, int gsl_errno); + +void +gsl_error (const char * reason, const char * file, int line, int gsl_errno) +{ + if (gsl_error_handler) + { + (*gsl_error_handler) (reason, file, line, gsl_errno); + return ; + } + + gsl_stream_printf ("ERROR", file, line, reason); + + fflush (stdout); + fprintf (stderr, "Default GSL error handler invoked.\n"); + fflush (stderr); + + abort (); +} + +gsl_error_handler_t * +gsl_set_error_handler (gsl_error_handler_t * new_handler) +{ + gsl_error_handler_t * previous_handler = gsl_error_handler; + gsl_error_handler = new_handler; + return previous_handler; +} + + +gsl_error_handler_t * +gsl_set_error_handler_off (void) +{ + gsl_error_handler_t * previous_handler = gsl_error_handler; + gsl_error_handler = no_error_handler; + return previous_handler; +} + +static void +no_error_handler (const char *reason, const char *file, int line, int gsl_errno) +{ + /* do nothing */ + reason = 0; + file = 0; + line = 0; + gsl_errno = 0; + return; +} + + diff --git a/software/gsl-1.15/err/gsl_errno.h b/software/gsl-1.15/err/gsl_errno.h new file mode 100644 index 000000000..b8e99b433 --- /dev/null +++ b/software/gsl-1.15/err/gsl_errno.h @@ -0,0 +1,154 @@ +/* err/gsl_errno.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_ERRNO_H__ +#define __GSL_ERRNO_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +enum { + GSL_SUCCESS = 0, + GSL_FAILURE = -1, + GSL_CONTINUE = -2, /* iteration has not converged */ + GSL_EDOM = 1, /* input domain error, e.g sqrt(-1) */ + GSL_ERANGE = 2, /* output range error, e.g. exp(1e100) */ + GSL_EFAULT = 3, /* invalid pointer */ + GSL_EINVAL = 4, /* invalid argument supplied by user */ + GSL_EFAILED = 5, /* generic failure */ + GSL_EFACTOR = 6, /* factorization failed */ + GSL_ESANITY = 7, /* sanity check failed - shouldn't happen */ + GSL_ENOMEM = 8, /* malloc failed */ + GSL_EBADFUNC = 9, /* problem with user-supplied function */ + GSL_ERUNAWAY = 10, /* iterative process is out of control */ + GSL_EMAXITER = 11, /* exceeded max number of iterations */ + GSL_EZERODIV = 12, /* tried to divide by zero */ + GSL_EBADTOL = 13, /* user specified an invalid tolerance */ + GSL_ETOL = 14, /* failed to reach the specified tolerance */ + GSL_EUNDRFLW = 15, /* underflow */ + GSL_EOVRFLW = 16, /* overflow */ + GSL_ELOSS = 17, /* loss of accuracy */ + GSL_EROUND = 18, /* failed because of roundoff error */ + GSL_EBADLEN = 19, /* matrix, vector lengths are not conformant */ + GSL_ENOTSQR = 20, /* matrix not square */ + GSL_ESING = 21, /* apparent singularity detected */ + GSL_EDIVERGE = 22, /* integral or series is divergent */ + GSL_EUNSUP = 23, /* requested feature is not supported by the hardware */ + GSL_EUNIMPL = 24, /* requested feature not (yet) implemented */ + GSL_ECACHE = 25, /* cache limit exceeded */ + GSL_ETABLE = 26, /* table limit exceeded */ + GSL_ENOPROG = 27, /* iteration is not making progress towards solution */ + GSL_ENOPROGJ = 28, /* jacobian evaluations are not improving the solution */ + GSL_ETOLF = 29, /* cannot reach the specified tolerance in F */ + GSL_ETOLX = 30, /* cannot reach the specified tolerance in X */ + GSL_ETOLG = 31, /* cannot reach the specified tolerance in gradient */ + GSL_EOF = 32 /* end of file */ +} ; + +void gsl_error (const char * reason, const char * file, int line, + int gsl_errno); + +void gsl_stream_printf (const char *label, const char *file, + int line, const char *reason); + +const char * gsl_strerror (const int gsl_errno); + +typedef void gsl_error_handler_t (const char * reason, const char * file, + int line, int gsl_errno); + +typedef void gsl_stream_handler_t (const char * label, const char * file, + int line, const char * reason); + +gsl_error_handler_t * +gsl_set_error_handler (gsl_error_handler_t * new_handler); + +gsl_error_handler_t * +gsl_set_error_handler_off (void); + +gsl_stream_handler_t * +gsl_set_stream_handler (gsl_stream_handler_t * new_handler); + +FILE * gsl_set_stream (FILE * new_stream); + +/* GSL_ERROR: call the error handler, and return the error code */ + +#define GSL_ERROR(reason, gsl_errno) \ + do { \ + gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ + return gsl_errno ; \ + } while (0) + +/* GSL_ERROR_VAL: call the error handler, and return the given value */ + +#define GSL_ERROR_VAL(reason, gsl_errno, value) \ + do { \ + gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ + return value ; \ + } while (0) + +/* GSL_ERROR_VOID: call the error handler, and then return + (for void functions which still need to generate an error) */ + +#define GSL_ERROR_VOID(reason, gsl_errno) \ + do { \ + gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ + return ; \ + } while (0) + +/* GSL_ERROR_NULL suitable for out-of-memory conditions */ + +#define GSL_ERROR_NULL(reason, gsl_errno) GSL_ERROR_VAL(reason, gsl_errno, 0) + +/* Sometimes you have several status results returned from + * function calls and you want to combine them in some sensible + * way. You cannot produce a "total" status condition, but you can + * pick one from a set of conditions based on an implied hierarchy. + * + * In other words: + * you have: status_a, status_b, ... + * you want: status = (status_a if it is bad, or status_b if it is bad,...) + * + * In this example you consider status_a to be more important and + * it is checked first, followed by the others in the order specified. + * + * Here are some dumb macros to do this. + */ +#define GSL_ERROR_SELECT_2(a,b) ((a) != GSL_SUCCESS ? (a) : ((b) != GSL_SUCCESS ? (b) : GSL_SUCCESS)) +#define GSL_ERROR_SELECT_3(a,b,c) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_2(b,c)) +#define GSL_ERROR_SELECT_4(a,b,c,d) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_3(b,c,d)) +#define GSL_ERROR_SELECT_5(a,b,c,d,e) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_4(b,c,d,e)) + +#define GSL_STATUS_UPDATE(sp, s) do { if ((s) != GSL_SUCCESS) *(sp) = (s);} while(0) + +__END_DECLS + +#endif /* __GSL_ERRNO_H__ */ diff --git a/software/gsl-1.15/err/gsl_message.h b/software/gsl-1.15/err/gsl_message.h new file mode 100644 index 000000000..166ff9ddf --- /dev/null +++ b/software/gsl-1.15/err/gsl_message.h @@ -0,0 +1,80 @@ +/* err/gsl_message.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MESSAGE_H__ +#define __GSL_MESSAGE_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Provide a general messaging service for client use. Messages can + * be selectively turned off at compile time by defining an + * appropriate message mask. Client code which uses the GSL_MESSAGE() + * macro must provide a mask which is or'ed with the GSL_MESSAGE_MASK. + * + * The messaging service can be completely turned off + * by defining GSL_MESSAGING_OFF. */ + +void gsl_message(const char * message, const char * file, int line, + unsigned int mask); + +#ifndef GSL_MESSAGE_MASK +#define GSL_MESSAGE_MASK 0xffffffffu /* default all messages allowed */ +#endif + +GSL_VAR unsigned int gsl_message_mask ; + +/* Provide some symolic masks for client ease of use. */ + +enum { + GSL_MESSAGE_MASK_A = 1, + GSL_MESSAGE_MASK_B = 2, + GSL_MESSAGE_MASK_C = 4, + GSL_MESSAGE_MASK_D = 8, + GSL_MESSAGE_MASK_E = 16, + GSL_MESSAGE_MASK_F = 32, + GSL_MESSAGE_MASK_G = 64, + GSL_MESSAGE_MASK_H = 128 +} ; + +#ifdef GSL_MESSAGING_OFF /* throw away messages */ +#define GSL_MESSAGE(message, mask) do { } while(0) +#else /* output all messages */ +#define GSL_MESSAGE(message, mask) \ + do { \ + if (mask & GSL_MESSAGE_MASK) \ + gsl_message (message, __FILE__, __LINE__, mask) ; \ + } while (0) +#endif + +__END_DECLS + +#endif /* __GSL_MESSAGE_H__ */ + + diff --git a/software/gsl-1.15/err/message.c b/software/gsl-1.15/err/message.c new file mode 100644 index 000000000..9f0f76f38 --- /dev/null +++ b/software/gsl-1.15/err/message.c @@ -0,0 +1,38 @@ +/* err/message.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include + +unsigned int gsl_message_mask = GSL_MESSAGE_MASK; + +void +gsl_message (const char * reason, const char * file, int line, + unsigned int mask) +{ + if (mask & gsl_message_mask) + { + gsl_stream_printf ("MESSAGE", file, line, reason); + } +} diff --git a/software/gsl-1.15/err/stream.c b/software/gsl-1.15/err/stream.c new file mode 100644 index 000000000..cbb2ffaaf --- /dev/null +++ b/software/gsl-1.15/err/stream.c @@ -0,0 +1,66 @@ +/* err/stream.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include + +FILE * gsl_stream = NULL ; +gsl_stream_handler_t * gsl_stream_handler = NULL; + +void +gsl_stream_printf (const char *label, const char *file, int line, + const char *reason) +{ + if (gsl_stream == NULL) + { + gsl_stream = stderr; + } + if (gsl_stream_handler) + { + (*gsl_stream_handler) (label, file, line, reason); + return; + } + fprintf (gsl_stream, "gsl: %s:%d: %s: %s\n", file, line, label, reason); + +} + +gsl_stream_handler_t * +gsl_set_stream_handler (gsl_stream_handler_t * new_handler) +{ + gsl_stream_handler_t * previous_handler = gsl_stream_handler; + gsl_stream_handler = new_handler; + return previous_handler; +} + +FILE * +gsl_set_stream (FILE * new_stream) +{ + FILE * previous_stream; + if (gsl_stream == NULL) { + gsl_stream = stderr; + } + previous_stream = gsl_stream; + gsl_stream = new_stream; + return previous_stream; +} diff --git a/software/gsl-1.15/err/strerror.c b/software/gsl-1.15/err/strerror.c new file mode 100644 index 000000000..eb9137746 --- /dev/null +++ b/software/gsl-1.15/err/strerror.c @@ -0,0 +1,101 @@ +/* err/strerror.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +const char * +gsl_strerror (const int gsl_errno) +{ + switch (gsl_errno) + { + case GSL_SUCCESS: + return "success" ; + case GSL_FAILURE: + return "failure" ; + case GSL_CONTINUE: + return "the iteration has not converged yet"; + case GSL_EDOM: + return "input domain error" ; + case GSL_ERANGE: + return "output range error" ; + case GSL_EFAULT: + return "invalid pointer" ; + case GSL_EINVAL: + return "invalid argument supplied by user" ; + case GSL_EFAILED: + return "generic failure" ; + case GSL_EFACTOR: + return "factorization failed" ; + case GSL_ESANITY: + return "sanity check failed - shouldn't happen" ; + case GSL_ENOMEM: + return "malloc failed" ; + case GSL_EBADFUNC: + return "problem with user-supplied function"; + case GSL_ERUNAWAY: + return "iterative process is out of control"; + case GSL_EMAXITER: + return "exceeded max number of iterations" ; + case GSL_EZERODIV: + return "tried to divide by zero" ; + case GSL_EBADTOL: + return "specified tolerance is invalid or theoretically unattainable" ; + case GSL_ETOL: + return "failed to reach the specified tolerance" ; + case GSL_EUNDRFLW: + return "underflow" ; + case GSL_EOVRFLW: + return "overflow" ; + case GSL_ELOSS: + return "loss of accuracy" ; + case GSL_EROUND: + return "roundoff error" ; + case GSL_EBADLEN: + return "matrix/vector sizes are not conformant" ; + case GSL_ENOTSQR: + return "matrix not square" ; + case GSL_ESING: + return "singularity or extremely bad function behavior detected" ; + case GSL_EDIVERGE: + return "integral or series is divergent" ; + case GSL_EUNSUP: + return "the required feature is not supported by this hardware platform"; + case GSL_EUNIMPL: + return "the requested feature is not (yet) implemented"; + case GSL_ECACHE: + return "cache limit exceeded"; + case GSL_ETABLE: + return "table limit exceeded"; + case GSL_ENOPROG: + return "iteration is not making progress towards solution"; + case GSL_ENOPROGJ: + return "jacobian evaluations are not improving the solution"; + case GSL_ETOLF: + return "cannot reach the specified tolerance in F"; + case GSL_ETOLX: + return "cannot reach the specified tolerance in X"; + case GSL_ETOLG: + return "cannot reach the specified tolerance in gradient"; + case GSL_EOF: + return "end of file"; + default: + return "unknown error code" ; + } +} diff --git a/software/gsl-1.15/err/test.c b/software/gsl-1.15/err/test.c new file mode 100644 index 000000000..c2fb08128 --- /dev/null +++ b/software/gsl-1.15/err/test.c @@ -0,0 +1,116 @@ +/* err/test_errnos.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include + +#include +#include + +#define CHECK(x) errors[n].number = x ; errors[n].name = #x ; n++ ; +#define MAX_ERRS 64 + +int verbose = 0 ; + +int +main (void) +{ + int i, j, n = 0 ; + + struct { + int number; + const char * name; + } errors[MAX_ERRS] ; + + CHECK(GSL_SUCCESS); + CHECK(GSL_FAILURE); + CHECK(GSL_CONTINUE); + CHECK(GSL_EDOM); + CHECK(GSL_ERANGE); + CHECK(GSL_EFAULT); + CHECK(GSL_EINVAL); + CHECK(GSL_EFAILED); + CHECK(GSL_EFACTOR); + CHECK(GSL_ESANITY); + CHECK(GSL_ENOMEM); + CHECK(GSL_EBADFUNC); + CHECK(GSL_ERUNAWAY); + CHECK(GSL_EMAXITER); + CHECK(GSL_EZERODIV); + CHECK(GSL_EBADTOL); + CHECK(GSL_ETOL); + CHECK(GSL_EUNDRFLW); + CHECK(GSL_EOVRFLW); + CHECK(GSL_ELOSS); + CHECK(GSL_EROUND); + CHECK(GSL_EBADLEN); + CHECK(GSL_ENOTSQR); + CHECK(GSL_ESING); + CHECK(GSL_EDIVERGE); + CHECK(GSL_EUNSUP); + CHECK(GSL_EUNIMPL); + CHECK(GSL_ECACHE); + CHECK(GSL_ETABLE); + CHECK(GSL_ENOPROG); + CHECK(GSL_ENOPROGJ); + CHECK(GSL_ETOLF); + CHECK(GSL_ETOLX); + CHECK(GSL_ETOLG); + CHECK(GSL_EOF); + + for (i = 0 ; i < n ; i++) + { + if (verbose) printf ("%s = %d\n", errors[i].name, errors[i].number) ; + } + + for (i = 0; i < n; i++) + { + int status = 0; + for (j = 0; j < n; j++) + { + if (j != i) + status |= (errors[i].number == errors[j].number); + } + + gsl_test (status, "%s is distinct from other error values", + errors[i].name); + } + + for (i = 0; i < n; i++) + { + int status = 0; + int e1 = errors[i].number ; + for (j = 0; j < n; j++) + { + if (j != i) + { + int e2 = errors[j].number; + status |= (gsl_strerror(e1) == gsl_strerror(e2)) ; + } + } + gsl_test (status, "%s has a distinct error message", + errors[i].name); + } + + + exit (gsl_test_summary ()); +} + diff --git a/software/gsl-1.15/fft/.deps/dft.Plo b/software/gsl-1.15/fft/.deps/dft.Plo new file mode 100644 index 000000000..24142f89c --- /dev/null +++ b/software/gsl-1.15/fft/.deps/dft.Plo @@ -0,0 +1,150 @@ +dft.lo: dft.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_dft_complex.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_fft.h ../gsl/gsl_dft_complex_float.h complex_internal.h \ + ../templates_on.h dft_source.c ../templates_off.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_dft_complex.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_fft.h: + +../gsl/gsl_dft_complex_float.h: + +complex_internal.h: + +../templates_on.h: + +dft_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/fft/.deps/fft.Plo b/software/gsl-1.15/fft/.deps/fft.Plo new file mode 100644 index 000000000..1910975b0 --- /dev/null +++ b/software/gsl-1.15/fft/.deps/fft.Plo @@ -0,0 +1,242 @@ +fft.lo: fft.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_complex.h \ + ../gsl/gsl_fft_complex.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_fft.h ../gsl/gsl_fft_complex_float.h ../templates_on.h \ + bitreverse.c complex_internal.h bitreverse.h ../templates_off.h \ + factorize.c factorize.h c_init.c c_main.c c_pass.h c_pass_2.c \ + c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c \ + c_radix2.c ../gsl/gsl_fft_halfcomplex.h ../gsl/gsl_fft_real.h \ + ../gsl/gsl_fft_halfcomplex_float.h ../gsl/gsl_fft_real_float.h \ + hc_init.c hc_main.c hc_pass.h hc_pass_2.c hc_pass_3.c hc_pass_4.c \ + hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real_init.c \ + real_main.c real_pass.h real_pass_2.c real_pass_3.c real_pass_4.c \ + real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_fft_complex.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_fft.h: + +../gsl/gsl_fft_complex_float.h: + +../templates_on.h: + +bitreverse.c: + +complex_internal.h: + +bitreverse.h: + +../templates_off.h: + +factorize.c: + +factorize.h: + +c_init.c: + +c_main.c: + +c_pass.h: + +c_pass_2.c: + +c_pass_3.c: + +c_pass_4.c: + +c_pass_5.c: + +c_pass_6.c: + +c_pass_7.c: + +c_pass_n.c: + +c_radix2.c: + +../gsl/gsl_fft_halfcomplex.h: + +../gsl/gsl_fft_real.h: + +../gsl/gsl_fft_halfcomplex_float.h: + +../gsl/gsl_fft_real_float.h: + +hc_init.c: + +hc_main.c: + +hc_pass.h: + +hc_pass_2.c: + +hc_pass_3.c: + +hc_pass_4.c: + +hc_pass_5.c: + +hc_pass_n.c: + +hc_radix2.c: + +hc_unpack.c: + +real_init.c: + +real_main.c: + +real_pass.h: + +real_pass_2.c: + +real_pass_3.c: + +real_pass_4.c: + +real_pass_5.c: + +real_pass_n.c: + +real_radix2.c: + +real_unpack.c: diff --git a/software/gsl-1.15/fft/.deps/signals.Po b/software/gsl-1.15/fft/.deps/signals.Po new file mode 100644 index 000000000..9b77a97cc --- /dev/null +++ b/software/gsl-1.15/fft/.deps/signals.Po @@ -0,0 +1,154 @@ +signals.o: signals.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_complex.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_dft_complex.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_fft.h \ + ../gsl/gsl_dft_complex_float.h complex_internal.h urand.c \ + ../templates_on.h signals_source.c signals.h ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_dft_complex.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_fft.h: + +../gsl/gsl_dft_complex_float.h: + +complex_internal.h: + +urand.c: + +../templates_on.h: + +signals_source.c: + +signals.h: + +../templates_off.h: diff --git a/software/gsl-1.15/fft/.deps/test.Po b/software/gsl-1.15/fft/.deps/test.Po new file mode 100644 index 000000000..54182c7d3 --- /dev/null +++ b/software/gsl-1.15/fft/.deps/test.Po @@ -0,0 +1,190 @@ +test.o: test.c ../config.h /usr/include/string.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_complex.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../gsl/gsl_dft_complex.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_fft.h ../gsl/gsl_fft_complex.h \ + ../gsl/gsl_fft_complex_float.h ../gsl/gsl_fft_real.h \ + ../gsl/gsl_fft_real_float.h ../gsl/gsl_fft_halfcomplex.h \ + ../gsl/gsl_fft_halfcomplex_float.h ../gsl/gsl_ieee_utils.h \ + ../gsl/gsl_test.h complex_internal.h ../templates_on.h \ + compare_source.c compare.h bitreverse.c bitreverse.h \ + test_complex_source.c signals.h test_real_source.c test_trap_source.c \ + ../templates_off.h + +../config.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_dft_complex.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_fft.h: + +../gsl/gsl_fft_complex.h: + +../gsl/gsl_fft_complex_float.h: + +../gsl/gsl_fft_real.h: + +../gsl/gsl_fft_real_float.h: + +../gsl/gsl_fft_halfcomplex.h: + +../gsl/gsl_fft_halfcomplex_float.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_test.h: + +complex_internal.h: + +../templates_on.h: + +compare_source.c: + +compare.h: + +bitreverse.c: + +bitreverse.h: + +test_complex_source.c: + +signals.h: + +test_real_source.c: + +test_trap_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/fft/ChangeLog b/software/gsl-1.15/fft/ChangeLog new file mode 100644 index 000000000..fb74e844f --- /dev/null +++ b/software/gsl-1.15/fft/ChangeLog @@ -0,0 +1,140 @@ +2009-07-09 Brian Gough + + * real_init.c (FUNCTION): handle NULL argument in free + + * hc_init.c (FUNCTION): handle NULL argument in free + + * c_init.c (FUNCTION): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2006-03-16 Brian Gough + + * changed to gsl_fft_forward and gsl_fft_backward enums throughout + internally instead of forward and backward. + +2005-05-19 Brian Gough + + * Makefile.am (noinst_HEADERS): removed unused real.c + +Tue Jul 24 15:16:50 2001 Brian Gough + + * single precision fft now uses float throughout, rather than + mixing float and double. + +Mon Jul 16 12:38:29 2001 Brian Gough + + * reorganized function names and split work + +Tue May 1 14:35:52 2001 Brian Gough + + * Makefile.am (libgslfft_la_SOURCES): removed spurious headers + from SOURCES line + +2000-10-19 Brian Gough + + * hc_init.c (FUNCTION): scratch space changed to n elements + instead of 2*n (apparently the routine previously allocated too + much space) + +Wed Feb 16 14:43:42 2000 Brian Gough + + * Makefile.am (pkginclude_HEADERS): added missing + pkginclude_HEADERS for float functions. + +Mon Feb 14 15:11:55 2000 Brian Gough + + * made all internal functions static (required a slight + reorganization) + +Fri Aug 6 11:20:25 1999 Brian Gough + + * removed dependence on rand() and RAND_MAX + +Sun Feb 14 17:31:21 1999 Brian Gough + + * started converting header files to use gsl_complex_packed_array + more consistently + +Mon Dec 14 22:55:00 1998 Brian Gough + + * real_init.c: fixed a possible malloc(0) bug found by Electric Fence. + +Mon Nov 23 15:47:13 1998 Brian Gough + + * gsl_fft_complex.h, gsl_fft_complex_float.h: removed data[][] + type arguments from prototypes since this seems to be non-ANSI. + Use **data instead. + +1998-11-09 + + * compare_source.c: fix up int/unsigned format types to prevent + warnings + +Wed Oct 28 15:07:22 1998 Brian Gough + + * c.c: added #include for memcpy + + * c_float.c: added #include for memcpy + +Thu Sep 10 12:05:07 1998 Brian Gough + + * removed wavetable from function names to make them shorter and + avoid confusion, e.g. gsl_fft_complex_wavetable_alloc -> + gsl_fft_complex_alloc + +Sat Sep 5 22:32:19 1998 Brian Gough + + * major work done on templatizing everything so that you can do an + fft of a float or a double vector. + +Tue Sep 1 16:44:06 1998 Brian Gough + + * c_main.c: renamed c.c to c_main.c + +Tue Jul 28 11:30:43 1998 Brian Gough + + * renamed gsl_fft_signals.h to fft_signals.h (not exported) + + * fft.h: a place to keep some local macros + + * c.c: renamed complex.c to c.c + +Mon Jul 27 12:46:25 1998 Brian Gough + + * bitreverse.c: removed gsl_ftt_ prefix from non-exported functions + +Wed Jun 10 17:36:01 1998 Brian Gough + + * test.c: Eliminated the need for getopt + + * test_radix2.c: Eliminated the need for getopt + + * test_trap.c: Eliminated the need for getopt + +Mon Apr 27 18:48:58 1998 Brian Gough + + * fft_alloc functions now return a pointer to a newly allocated + wavetable struct (or a null pointer if there isn't enough memory) + +Fri Apr 10 15:12:37 1998 Brian Gough + + * renamed complex_*.c and halfcomplex_*.c to c_*.c and hc_*.c to + avoid linker complaints about long filenames on some platforms + +Sun Mar 29 15:56:34 1998 Brian Gough + + * To be compatible with other architectures use size_t everywhere + instead of unsigned int + +Sat Mar 21 17:28:26 1998 Brian Gough + + * factorize.c (gsl_fft_factorize): Stopped returning the sum of + factors in the status variable. The user can compute it if + necessary. + +1998-01-27 Mark Galassi + + * Makefile.am: fixed a typo: removed trailing \ at the end of this file. diff --git a/software/gsl-1.15/fft/Makefile.am b/software/gsl-1.15/fft/Makefile.am new file mode 100644 index 000000000..f9ff41101 --- /dev/null +++ b/software/gsl-1.15/fft/Makefile.am @@ -0,0 +1,21 @@ +noinst_LTLIBRARIES = libgslfft.la + +pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h + +INCLUDES = -I$(top_srcdir) + +libgslfft_la_SOURCES = dft.c fft.c + +noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c signals.c + +test_LDADD = libgslfft.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#errs_LDADD = libgslfft.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +#benchmark_LDADD = libgslfft.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + diff --git a/software/gsl-1.15/fft/Makefile.in b/software/gsl-1.15/fft/Makefile.in new file mode 100644 index 000000000..449d1c829 --- /dev/null +++ b/software/gsl-1.15/fft/Makefile.in @@ -0,0 +1,667 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = fft +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslfft_la_LIBADD = +am_libgslfft_la_OBJECTS = dft.lo fft.lo +libgslfft_la_OBJECTS = $(am_libgslfft_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) signals.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslfft.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslfft_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslfft_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslfft.la +pkginclude_HEADERS = gsl_fft.h gsl_fft_complex.h gsl_fft_halfcomplex.h gsl_fft_real.h gsl_dft_complex.h gsl_dft_complex_float.h gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h gsl_fft_real_float.h +INCLUDES = -I$(top_srcdir) +libgslfft_la_SOURCES = dft.c fft.c +noinst_HEADERS = c_pass.h hc_pass.h real_pass.h signals.h signals_source.c c_main.c c_init.c c_pass_2.c c_pass_3.c c_pass_4.c c_pass_5.c c_pass_6.c c_pass_7.c c_pass_n.c c_radix2.c bitreverse.c bitreverse.h factorize.c factorize.h hc_init.c hc_pass_2.c hc_pass_3.c hc_pass_4.c hc_pass_5.c hc_pass_n.c hc_radix2.c hc_unpack.c real_init.c real_pass_2.c real_pass_3.c real_pass_4.c real_pass_5.c real_pass_n.c real_radix2.c real_unpack.c compare.h compare_source.c dft_source.c hc_main.c real_main.c test_complex_source.c test_real_source.c test_trap_source.c urand.c complex_internal.h +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c signals.c +test_LDADD = libgslfft.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fft/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu fft/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslfft.la: $(libgslfft_la_OBJECTS) $(libgslfft_la_DEPENDENCIES) + $(LINK) $(libgslfft_la_OBJECTS) $(libgslfft_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dft.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#errs_LDADD = libgslfft.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +#benchmark_LDADD = libgslfft.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/fft/TODO b/software/gsl-1.15/fft/TODO new file mode 100644 index 000000000..3f6f3588b --- /dev/null +++ b/software/gsl-1.15/fft/TODO @@ -0,0 +1,17 @@ +# -*- org -*- +#+CATEGORY: fft + +* Sine and Cosine Transforms from FFTPACK. + +* A simple multidimensional fft. + +* Convolutions. This will need different interfaces corresponding to +the type of underlying FFT (radix-2, mixed-radix, radix-2 real, +mixed-radix real). The convolution function should be fft'ed before +being passed, so that the function can be used in a loop. The main +point of the function being to do the index manipulation for the +multiplication F*G. Theoretically someone might want to convolve real +and complex data together which could be done but would double the +number of interfaces. It would be reasonable to restrict the +convolutions to real-real and complex-complex. + diff --git a/software/gsl-1.15/fft/bitreverse.c b/software/gsl-1.15/fft/bitreverse.c new file mode 100644 index 000000000..f781dfe53 --- /dev/null +++ b/software/gsl-1.15/fft/bitreverse.c @@ -0,0 +1,101 @@ +/* fft/bitreverse.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include "complex_internal.h" +#include "bitreverse.h" + +static int +FUNCTION(fft_complex,bitreverse_order) (BASE data[], + const size_t stride, + const size_t n, + size_t logn) +{ + /* This is the Goldrader bit-reversal algorithm */ + + size_t i; + size_t j = 0; + + logn = 0 ; /* not needed for this algorithm */ + + for (i = 0; i < n - 1; i++) + { + size_t k = n / 2 ; + + if (i < j) + { + const BASE tmp_real = REAL(data,stride,i); + const BASE tmp_imag = IMAG(data,stride,i); + REAL(data,stride,i) = REAL(data,stride,j); + IMAG(data,stride,i) = IMAG(data,stride,j); + REAL(data,stride,j) = tmp_real; + IMAG(data,stride,j) = tmp_imag; + } + + while (k <= j) + { + j = j - k ; + k = k / 2 ; + } + + j += k ; + } + + return 0; +} + + +static int +FUNCTION(fft_real,bitreverse_order) (BASE data[], + const size_t stride, + const size_t n, + size_t logn) +{ + /* This is the Goldrader bit-reversal algorithm */ + + size_t i; + size_t j = 0; + + logn = 0 ; /* not needed for this algorithm */ + + for (i = 0; i < n - 1; i++) + { + size_t k = n / 2 ; + + if (i < j) + { + const BASE tmp = VECTOR(data,stride,i); + VECTOR(data,stride,i) = VECTOR(data,stride,j); + VECTOR(data,stride,j) = tmp; + } + + while (k <= j) + { + j = j - k ; + k = k / 2 ; + } + + j += k ; + } + + return 0; +} + diff --git a/software/gsl-1.15/fft/bitreverse.h b/software/gsl-1.15/fft/bitreverse.h new file mode 100644 index 000000000..d36e72acd --- /dev/null +++ b/software/gsl-1.15/fft/bitreverse.h @@ -0,0 +1,33 @@ +/* fft/bitreverse.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +static int FUNCTION(fft_complex,bitreverse_order) (BASE data[], + const size_t stride, + const size_t n, + size_t logn) ; + +static int FUNCTION(fft_real,bitreverse_order) (BASE data[], + const size_t stride, + const size_t n, + size_t logn) ; + + + + diff --git a/software/gsl-1.15/fft/c_init.c b/software/gsl-1.15/fft/c_init.c new file mode 100644 index 000000000..7d88014a7 --- /dev/null +++ b/software/gsl-1.15/fft/c_init.c @@ -0,0 +1,195 @@ +/* fft/c_init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE(gsl_fft_complex_wavetable) * +FUNCTION(gsl_fft_complex_wavetable,alloc) (size_t n) +{ + int status ; + size_t i; + size_t n_factors; + size_t t, product, product_1, q; + double d_theta; + + TYPE(gsl_fft_complex_wavetable) * wavetable ; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + wavetable = (TYPE(gsl_fft_complex_wavetable) *) + malloc(sizeof(TYPE(gsl_fft_complex_wavetable))); + + if (wavetable == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + wavetable->trig = (TYPE(gsl_complex) *) malloc (n * sizeof (TYPE(gsl_complex))); + + if (wavetable->trig == NULL) + { + free(wavetable) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate trigonometric lookup table", + GSL_ENOMEM, 0); + } + + wavetable->n = n ; + + status = fft_complex_factorize (n, &n_factors, wavetable->factor); + + if (status) + { + /* exception in constructor, avoid memory leak */ + + free (wavetable->trig); + free (wavetable); + + GSL_ERROR_VAL ("factorization failed", GSL_EFACTOR, 0); + }; + + wavetable->nf = n_factors; + + d_theta = -2.0 * M_PI / ((double) n); + + t = 0; + product = 1; + for (i = 0; i < n_factors; i++) + { + size_t j; + const size_t factor = wavetable->factor[i]; + wavetable->twiddle[i] = wavetable->trig + t; + product_1 = product; /* product_1 = p_(i-1) */ + product *= factor; + q = n / product; + + for (j = 1; j < factor; j++) + { + size_t k; + size_t m = 0; + for (k = 1; k <= q; k++) + { + double theta; + m = m + j * product_1; + m = m % n; + theta = d_theta * m; /* d_theta*j*k*p_(i-1) */ + GSL_REAL(wavetable->trig[t]) = cos (theta); + GSL_IMAG(wavetable->trig[t]) = sin (theta); + + t++; + } + } + } + + if (t > n) + { + /* exception in constructor, avoid memory leak */ + + free (wavetable->trig); + free (wavetable); + + GSL_ERROR_VAL ("overflowed trigonometric lookup table", + GSL_ESANITY, 0); + } + + return wavetable; +} + + +TYPE(gsl_fft_complex_workspace) * +FUNCTION(gsl_fft_complex_workspace,alloc) (size_t n) +{ + TYPE(gsl_fft_complex_workspace) * workspace ; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + workspace = (TYPE(gsl_fft_complex_workspace) *) + malloc(sizeof(TYPE(gsl_fft_complex_workspace))); + + if (workspace == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + workspace->n = n ; + + workspace->scratch = (BASE *) malloc (2 * n * sizeof (BASE)); + + if (workspace->scratch == NULL) + { + free(workspace) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate scratch space", GSL_ENOMEM, 0); + } + + return workspace; +} + + +void +FUNCTION(gsl_fft_complex_wavetable,free) (TYPE(gsl_fft_complex_wavetable) * wavetable) +{ + RETURN_IF_NULL (wavetable); + /* release trigonometric lookup tables */ + + free (wavetable->trig); + wavetable->trig = NULL; + + free (wavetable) ; +} + +void +FUNCTION(gsl_fft_complex_workspace,free) (TYPE(gsl_fft_complex_workspace) * workspace) +{ + RETURN_IF_NULL (workspace); + /* release scratch space */ + + free (workspace->scratch); + workspace->scratch = NULL; + free (workspace) ; +} + + +int +FUNCTION(gsl_fft_complex,memcpy) (TYPE(gsl_fft_complex_wavetable) * dest, + TYPE(gsl_fft_complex_wavetable) * src) +{ + int i, n, nf ; + + if (dest->n != src->n) + { + GSL_ERROR ("length of src and dest do not match", GSL_EINVAL); + } + + n = dest->n ; + nf = dest->nf ; + + memcpy(dest->trig, src->trig, n * sizeof (double)) ; + + for (i = 0 ; i < nf ; i++) + { + dest->twiddle[i] = dest->trig + (src->twiddle[i] - src->trig) ; + } + + return 0 ; +} diff --git a/software/gsl-1.15/fft/c_main.c b/software/gsl-1.15/fft/c_main.c new file mode 100644 index 000000000..3034be0d1 --- /dev/null +++ b/software/gsl-1.15/fft/c_main.c @@ -0,0 +1,223 @@ +/* fft/c_main.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "c_pass.h" + +int +FUNCTION(gsl_fft_complex,forward) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n, + const TYPE(gsl_fft_complex_wavetable) * wavetable, + TYPE(gsl_fft_complex_workspace) * work) +{ + gsl_fft_direction sign = gsl_fft_forward; + int status = FUNCTION(gsl_fft_complex,transform) (data, stride, n, + wavetable, work, sign); + return status; +} + +int +FUNCTION(gsl_fft_complex,backward) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n, + const TYPE(gsl_fft_complex_wavetable) * wavetable, + TYPE(gsl_fft_complex_workspace) * work) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_fft_complex,transform) (data, stride, n, + wavetable, work, sign); + return status; +} + +int +FUNCTION(gsl_fft_complex,inverse) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n, + const TYPE(gsl_fft_complex_wavetable) * wavetable, + TYPE(gsl_fft_complex_workspace) * work) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_fft_complex,transform) (data, stride, n, + wavetable, work, sign); + + if (status) + { + return status; + } + + /* normalize inverse fft with 1/n */ + + { + const ATOMIC norm = ONE / (ATOMIC)n; + size_t i; + for (i = 0; i < n; i++) + { + REAL(data,stride,i) *= norm; + IMAG(data,stride,i) *= norm; + } + } + return status; +} + +int +FUNCTION(gsl_fft_complex,transform) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n, + const TYPE(gsl_fft_complex_wavetable) * wavetable, + TYPE(gsl_fft_complex_workspace) * work, + const gsl_fft_direction sign) +{ + const size_t nf = wavetable->nf; + + size_t i; + + size_t q, product = 1; + + TYPE(gsl_complex) *twiddle1, *twiddle2, *twiddle3, *twiddle4, + *twiddle5, *twiddle6; + + size_t state = 0; + + BASE * const scratch = work->scratch; + + BASE * in = data; + size_t istride = stride; + + BASE * out = scratch; + size_t ostride = 1; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + if (n == 1) + { /* FFT of 1 data point is the identity */ + return 0; + } + + if (n != wavetable->n) + { + GSL_ERROR ("wavetable does not match length of data", GSL_EINVAL); + } + + if (n != work->n) + { + GSL_ERROR ("workspace does not match length of data", GSL_EINVAL); + } + + for (i = 0; i < nf; i++) + { + const size_t factor = wavetable->factor[i]; + product *= factor; + q = n / product; + + if (state == 0) + { + in = data; + istride = stride; + out = scratch; + ostride = 1; + state = 1; + } + else + { + in = scratch; + istride = 1; + out = data; + ostride = stride; + state = 0; + } + + if (factor == 2) + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_complex,pass_2) (in, istride, out, ostride, sign, + product, n, twiddle1); + } + else if (factor == 3) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + q; + FUNCTION(fft_complex,pass_3) (in, istride, out, ostride, sign, + product, n, twiddle1, twiddle2); + } + else if (factor == 4) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + q; + twiddle3 = twiddle2 + q; + FUNCTION(fft_complex,pass_4) (in, istride, out, ostride, sign, + product, n, twiddle1, twiddle2, + twiddle3); + } + else if (factor == 5) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + q; + twiddle3 = twiddle2 + q; + twiddle4 = twiddle3 + q; + FUNCTION(fft_complex,pass_5) (in, istride, out, ostride, sign, + product, n, twiddle1, twiddle2, + twiddle3, twiddle4); + } + else if (factor == 6) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + q; + twiddle3 = twiddle2 + q; + twiddle4 = twiddle3 + q; + twiddle5 = twiddle4 + q; + FUNCTION(fft_complex,pass_6) (in, istride, out, ostride, sign, + product, n, twiddle1, twiddle2, + twiddle3, twiddle4, twiddle5); + } + else if (factor == 7) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + q; + twiddle3 = twiddle2 + q; + twiddle4 = twiddle3 + q; + twiddle5 = twiddle4 + q; + twiddle6 = twiddle5 + q; + FUNCTION(fft_complex,pass_7) (in, istride, out, ostride, sign, + product, n, twiddle1, twiddle2, + twiddle3, twiddle4, twiddle5, + twiddle6); + } + else + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_complex,pass_n) (in, istride, out, ostride, sign, + factor, product, n, twiddle1); + } + } + + if (state == 1) /* copy results back from scratch to data */ + { + for (i = 0; i < n; i++) + { + REAL(data,stride,i) = REAL(scratch,1,i) ; + IMAG(data,stride,i) = IMAG(scratch,1,i) ; + } + } + + return 0; + +} diff --git a/software/gsl-1.15/fft/c_pass.h b/software/gsl-1.15/fft/c_pass.h new file mode 100644 index 000000000..3ed79439b --- /dev/null +++ b/software/gsl-1.15/fft/c_pass.h @@ -0,0 +1,106 @@ +/* fft/c_pass.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); + +static int +FUNCTION(fft_complex,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[]); + +static int +FUNCTION(fft_complex,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]); + +static int +FUNCTION(fft_complex,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]); + +static int +FUNCTION(fft_complex,pass_6) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[], + const TYPE(gsl_complex) twiddle5[]); + +static int +FUNCTION(fft_complex,pass_7) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[], + const TYPE(gsl_complex) twiddle5[], + const TYPE(gsl_complex) twiddle6[]); + + +static int +FUNCTION(fft_complex,pass_n) (BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); + diff --git a/software/gsl-1.15/fft/c_pass_2.c b/software/gsl-1.15/fft/c_pass_2.c new file mode 100644 index 000000000..c5d91d90a --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_2.c @@ -0,0 +1,98 @@ +/* fft/c_pass_2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 2; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + const size_t jump = (factor - 1) * product_1; + + for (k = 0; k < q; k++) + { + ATOMIC w_real, w_imag; + + if (k == 0) + { + w_real = 1.0; + w_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w_real = GSL_REAL(twiddle[k - 1]); + w_imag = GSL_IMAG(twiddle[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w_real = GSL_REAL(twiddle[k - 1]); + w_imag = -GSL_IMAG(twiddle[k - 1]); + } + } + + for (k1 = 0; k1 < product_1; k1++) + { + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + + const ATOMIC z1_real = REAL(in,istride,i+m); + const ATOMIC z1_imag = IMAG(in,istride,i+m); + + /* compute x = W(2) z */ + + /* x0 = z0 + z1 */ + const ATOMIC x0_real = z0_real + z1_real; + const ATOMIC x0_imag = z0_imag + z1_imag; + + /* x1 = z0 - z1 */ + const ATOMIC x1_real = z0_real - z1_real; + const ATOMIC x1_imag = z0_imag - z1_imag; + + /* apply twiddle factors */ + + /* out0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* out1 = w * x1 */ + REAL(out,ostride,j+product_1) = w_real * x1_real - w_imag * x1_imag; + IMAG(out,ostride,j+product_1) = w_real * x1_imag + w_imag * x1_real; + + i++; + j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_3.c b/software/gsl-1.15/fft/c_pass_3.c new file mode 100644 index 000000000..a45a38f8b --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_3.c @@ -0,0 +1,127 @@ +/* fft/c_pass_3.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) * twiddle1, + const TYPE(gsl_complex) * twiddle2) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 3; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + const size_t jump = (factor - 1) * product_1; + + const ATOMIC tau = sqrt (3.0) / 2.0; + + for (k = 0; k < q; k++) + { + ATOMIC w1_real, w1_imag, w2_real, w2_imag; + + if (k == 0) + { + w1_real = 1.0; + w1_imag = 0.0; + w2_real = 1.0; + w2_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = GSL_IMAG(twiddle2[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + } + } + + for (k1 = 0; k1 < product_1; k1++) + { + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + const ATOMIC z1_real = REAL(in,istride,i+m); + const ATOMIC z1_imag = IMAG(in,istride,i+m); + const ATOMIC z2_real = REAL(in,istride,i+2*m); + const ATOMIC z2_imag = IMAG(in,istride,i+2*m); + + /* compute x = W(3) z */ + + /* t1 = z1 + z2 */ + const ATOMIC t1_real = z1_real + z2_real; + const ATOMIC t1_imag = z1_imag + z2_imag; + + /* t2 = z0 - t1/2 */ + const ATOMIC t2_real = z0_real - t1_real / 2.0; + const ATOMIC t2_imag = z0_imag - t1_imag / 2.0; + + /* t3 = (+/-) sin(pi/3)*(z1 - z2) */ + const ATOMIC t3_real = ((int) sign) * tau * (z1_real - z2_real); + const ATOMIC t3_imag = ((int) sign) * tau * (z1_imag - z2_imag); + + /* x0 = z0 + t1 */ + const ATOMIC x0_real = z0_real + t1_real; + const ATOMIC x0_imag = z0_imag + t1_imag; + + /* x1 = t2 + i t3 */ + const ATOMIC x1_real = t2_real - t3_imag; + const ATOMIC x1_imag = t2_imag + t3_real; + + /* x2 = t2 - i t3 */ + const ATOMIC x2_real = t2_real + t3_imag; + const ATOMIC x2_imag = t2_imag - t3_real; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* to1 = w1 * x1 */ + REAL(out,ostride,j+product_1) = w1_real * x1_real - w1_imag * x1_imag; + IMAG(out,ostride,j+product_1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + REAL(out,ostride,j+2*product_1) = w2_real * x2_real - w2_imag * x2_imag; + IMAG(out,ostride,j+2*product_1) = w2_real * x2_imag + w2_imag * x2_real; + + i++; j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_4.c b/software/gsl-1.15/fft/c_pass_4.c new file mode 100644 index 000000000..34cb1f3c0 --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_4.c @@ -0,0 +1,147 @@ +/* fft/c_pass_4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 4; + const size_t m = n / factor; + const size_t q = n / product; + const size_t p_1 = product / factor; + const size_t jump = (factor - 1) * p_1; + + for (k = 0; k < q; k++) + { + ATOMIC w1_real, w1_imag, w2_real, w2_imag, w3_real, w3_imag; + + if (k == 0) + { + w1_real = 1.0; + w1_imag = 0.0; + w2_real = 1.0; + w2_imag = 0.0; + w3_real = 1.0; + w3_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = GSL_IMAG(twiddle3[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = -GSL_IMAG(twiddle3[k - 1]); + } + } + + for (k1 = 0; k1 < p_1; k1++) + { + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + const ATOMIC z1_real = REAL(in,istride,i+m); + const ATOMIC z1_imag = IMAG(in,istride,i+m); + const ATOMIC z2_real = REAL(in,istride,i+2*m); + const ATOMIC z2_imag = IMAG(in,istride,i+2*m); + const ATOMIC z3_real = REAL(in,istride,i+3*m); + const ATOMIC z3_imag = IMAG(in,istride,i+3*m); + + /* compute x = W(4) z */ + + /* t1 = z0 + z2 */ + const ATOMIC t1_real = z0_real + z2_real; + const ATOMIC t1_imag = z0_imag + z2_imag; + + /* t2 = z1 + z3 */ + const ATOMIC t2_real = z1_real + z3_real; + const ATOMIC t2_imag = z1_imag + z3_imag; + + /* t3 = z0 - z2 */ + const ATOMIC t3_real = z0_real - z2_real; + const ATOMIC t3_imag = z0_imag - z2_imag; + + /* t4 = (+/-) (z1 - z3) */ + const ATOMIC t4_real = ((int) sign) * (z1_real - z3_real); + const ATOMIC t4_imag = ((int) sign) * (z1_imag - z3_imag); + + /* x0 = t1 + t2 */ + const ATOMIC x0_real = t1_real + t2_real; + const ATOMIC x0_imag = t1_imag + t2_imag; + + /* x1 = t3 + i t4 */ + const ATOMIC x1_real = t3_real - t4_imag; + const ATOMIC x1_imag = t3_imag + t4_real; + + /* x2 = t1 - t2 */ + const ATOMIC x2_real = t1_real - t2_real; + const ATOMIC x2_imag = t1_imag - t2_imag; + + /* x3 = t3 - i t4 */ + const ATOMIC x3_real = t3_real + t4_imag; + const ATOMIC x3_imag = t3_imag - t4_real; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* to1 = w1 * x1 */ + REAL(out, ostride, j + p_1) = w1_real * x1_real - w1_imag * x1_imag; + IMAG(out, ostride, j + p_1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + REAL(out, ostride, j + 2 * p_1) = w2_real * x2_real - w2_imag * x2_imag; + IMAG(out, ostride, j + 2 * p_1) = w2_real * x2_imag + w2_imag * x2_real; + + /* to3 = w3 * x3 */ + REAL(out, ostride, j + 3 * p_1) = w3_real * x3_real - w3_imag * x3_imag; + IMAG(out, ostride, j + 3 * p_1) = w3_real * x3_imag + w3_imag * x3_real; + + i++; + j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_5.c b/software/gsl-1.15/fft/c_pass_5.c new file mode 100644 index 000000000..7c0f8603e --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_5.c @@ -0,0 +1,205 @@ +/* fft/c_pass_5.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 5; + const size_t m = n / factor; + const size_t q = n / product; + const size_t p_1 = product / factor; + const size_t jump = (factor - 1) * p_1; + + const ATOMIC sin_2pi_by_5 = sin (2.0 * M_PI / 5.0); + const ATOMIC sin_2pi_by_10 = sin (2.0 * M_PI / 10.0); + + for (k = 0; k < q; k++) + { + + ATOMIC w1_real, w1_imag, w2_real, w2_imag, w3_real, w3_imag, w4_real, + w4_imag; + + if (k == 0) + { + w1_real = 1.0; + w1_imag = 0.0; + w2_real = 1.0; + w2_imag = 0.0; + w3_real = 1.0; + w3_imag = 0.0; + w4_real = 1.0; + w4_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = GSL_IMAG(twiddle4[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = -GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = -GSL_IMAG(twiddle4[k - 1]); + } + } + + for (k1 = 0; k1 < p_1; k1++) + { + + ATOMIC x0_real, x0_imag, x1_real, x1_imag, x2_real, x2_imag, + x3_real, x3_imag, x4_real, x4_imag; + + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + const ATOMIC z1_real = REAL(in,istride,i + m); + const ATOMIC z1_imag = IMAG(in,istride,i + m); + const ATOMIC z2_real = REAL(in,istride,i + 2*m); + const ATOMIC z2_imag = IMAG(in,istride,i + 2*m); + const ATOMIC z3_real = REAL(in,istride,i + 3*m); + const ATOMIC z3_imag = IMAG(in,istride,i + 3*m); + const ATOMIC z4_real = REAL(in,istride,i + 4*m); + const ATOMIC z4_imag = IMAG(in,istride,i + 4*m); + + /* compute x = W(5) z */ + + /* t1 = z1 + z4 */ + const ATOMIC t1_real = z1_real + z4_real; + const ATOMIC t1_imag = z1_imag + z4_imag; + + /* t2 = z2 + z3 */ + const ATOMIC t2_real = z2_real + z3_real; + const ATOMIC t2_imag = z2_imag + z3_imag; + + /* t3 = z1 - z4 */ + const ATOMIC t3_real = z1_real - z4_real; + const ATOMIC t3_imag = z1_imag - z4_imag; + + /* t4 = z2 - z3 */ + const ATOMIC t4_real = z2_real - z3_real; + const ATOMIC t4_imag = z2_imag - z3_imag; + + /* t5 = t1 + t2 */ + const ATOMIC t5_real = t1_real + t2_real; + const ATOMIC t5_imag = t1_imag + t2_imag; + + /* t6 = (sqrt(5)/4)(t1 - t2) */ + const ATOMIC t6_real = (sqrt (5.0) / 4.0) * (t1_real - t2_real); + const ATOMIC t6_imag = (sqrt (5.0) / 4.0) * (t1_imag - t2_imag); + + /* t7 = z0 - ((t5)/4) */ + const ATOMIC t7_real = z0_real - t5_real / 4.0; + const ATOMIC t7_imag = z0_imag - t5_imag / 4.0; + + /* t8 = t7 + t6 */ + const ATOMIC t8_real = t7_real + t6_real; + const ATOMIC t8_imag = t7_imag + t6_imag; + + /* t9 = t7 - t6 */ + const ATOMIC t9_real = t7_real - t6_real; + const ATOMIC t9_imag = t7_imag - t6_imag; + + /* t10 = sin(2 pi/5) t3 + sin(2 pi/10) t4 */ + const ATOMIC t10_real = ((int) sign) * (sin_2pi_by_5 * t3_real + + sin_2pi_by_10 * t4_real); + const ATOMIC t10_imag = ((int) sign) * (sin_2pi_by_5 * t3_imag + + sin_2pi_by_10 * t4_imag); + + /* t11 = sin(2 pi/10) t3 - sin(2 pi/5) t4 */ + const ATOMIC t11_real = ((int) sign) * (sin_2pi_by_10 * t3_real - + sin_2pi_by_5 * t4_real); + const ATOMIC t11_imag = ((int) sign) * (sin_2pi_by_10 * t3_imag - + sin_2pi_by_5 * t4_imag); + + /* x0 = z0 + t5 */ + x0_real = z0_real + t5_real; + x0_imag = z0_imag + t5_imag; + + /* x1 = t8 + i t10 */ + x1_real = t8_real - t10_imag; + x1_imag = t8_imag + t10_real; + + /* x2 = t9 + i t11 */ + x2_real = t9_real - t11_imag; + x2_imag = t9_imag + t11_real; + + /* x3 = t9 - i t11 */ + x3_real = t9_real + t11_imag; + x3_imag = t9_imag - t11_real; + + /* x4 = t8 - i t10 */ + x4_real = t8_real + t10_imag; + x4_imag = t8_imag - t10_real; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* to1 = w1 * x1 */ + REAL(out,ostride,j + p_1) = w1_real * x1_real - w1_imag * x1_imag; + IMAG(out,ostride,j + p_1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + REAL(out,ostride,j + 2*p_1) = w2_real * x2_real - w2_imag * x2_imag; + IMAG(out,ostride,j+2*p_1) = w2_real * x2_imag + w2_imag * x2_real; + + /* to3 = w3 * x3 */ + REAL(out,ostride,j+3*p_1) = w3_real * x3_real - w3_imag * x3_imag; + IMAG(out,ostride,j+3*p_1) = w3_real * x3_imag + w3_imag * x3_real; + + /* to4 = w4 * x4 */ + REAL(out,ostride,j+4*p_1) = w4_real * x4_real - w4_imag * x4_imag; + IMAG(out,ostride,j+4*p_1) = w4_real * x4_imag + w4_imag * x4_real; + + i++; + j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_6.c b/software/gsl-1.15/fft/c_pass_6.c new file mode 100644 index 000000000..7d4bbd9f9 --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_6.c @@ -0,0 +1,220 @@ +/* fft/c_pass_6.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_6) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[], + const TYPE(gsl_complex) twiddle5[]) +{ + + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 6; + const size_t m = n / factor; + const size_t q = n / product; + const size_t p_1 = product / factor; + const size_t jump = (factor - 1) * p_1; + + const ATOMIC tau = sqrt (3.0) / 2.0; + + for (k = 0; k < q; k++) + { + ATOMIC w1_real, w1_imag, w2_real, w2_imag, w3_real, w3_imag, w4_real, + w4_imag, w5_real, w5_imag; + + if (k == 0) + { + w1_real = 1.0; + w1_imag = 0.0; + w2_real = 1.0; + w2_imag = 0.0; + w3_real = 1.0; + w3_imag = 0.0; + w4_real = 1.0; + w4_imag = 0.0; + w5_real = 1.0; + w5_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = GSL_IMAG(twiddle4[k - 1]); + w5_real = GSL_REAL(twiddle5[k - 1]); + w5_imag = GSL_IMAG(twiddle5[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = -GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = -GSL_IMAG(twiddle4[k - 1]); + w5_real = GSL_REAL(twiddle5[k - 1]); + w5_imag = -GSL_IMAG(twiddle5[k - 1]); + } + } + + for (k1 = 0; k1 < p_1; k1++) + { + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + const ATOMIC z1_real = REAL(in,istride,i+m); + const ATOMIC z1_imag = IMAG(in,istride,i+m); + const ATOMIC z2_real = REAL(in,istride,i+2*m); + const ATOMIC z2_imag = IMAG(in,istride,i+2*m); + const ATOMIC z3_real = REAL(in,istride,i+3*m); + const ATOMIC z3_imag = IMAG(in,istride,i+3*m); + const ATOMIC z4_real = REAL(in,istride,i+4*m); + const ATOMIC z4_imag = IMAG(in,istride,i+4*m); + const ATOMIC z5_real = REAL(in,istride,i+5*m); + const ATOMIC z5_imag = IMAG(in,istride,i+5*m); + + /* compute x = W(6) z */ + + /* W(6) is a combination of sums and differences of W(3) acting + on the even and odd elements of z */ + + /* ta1 = z2 + z4 */ + const ATOMIC ta1_real = z2_real + z4_real; + const ATOMIC ta1_imag = z2_imag + z4_imag; + + /* ta2 = z0 - ta1/2 */ + const ATOMIC ta2_real = z0_real - ta1_real / 2; + const ATOMIC ta2_imag = z0_imag - ta1_imag / 2; + + /* ta3 = (+/-) sin(pi/3)*(z2 - z4) */ + const ATOMIC ta3_real = ((int) sign) * tau * (z2_real - z4_real); + const ATOMIC ta3_imag = ((int) sign) * tau * (z2_imag - z4_imag); + + /* a0 = z0 + ta1 */ + const ATOMIC a0_real = z0_real + ta1_real; + const ATOMIC a0_imag = z0_imag + ta1_imag; + + /* a1 = ta2 + i ta3 */ + const ATOMIC a1_real = ta2_real - ta3_imag; + const ATOMIC a1_imag = ta2_imag + ta3_real; + + /* a2 = ta2 - i ta3 */ + const ATOMIC a2_real = ta2_real + ta3_imag; + const ATOMIC a2_imag = ta2_imag - ta3_real; + + /* tb1 = z5 + z1 */ + const ATOMIC tb1_real = z5_real + z1_real; + const ATOMIC tb1_imag = z5_imag + z1_imag; + + /* tb2 = z3 - tb1/2 */ + const ATOMIC tb2_real = z3_real - tb1_real / 2; + const ATOMIC tb2_imag = z3_imag - tb1_imag / 2; + + /* tb3 = (+/-) sin(pi/3)*(z5 - z1) */ + const ATOMIC tb3_real = ((int) sign) * tau * (z5_real - z1_real); + const ATOMIC tb3_imag = ((int) sign) * tau * (z5_imag - z1_imag); + + /* b0 = z3 + tb1 */ + const ATOMIC b0_real = z3_real + tb1_real; + const ATOMIC b0_imag = z3_imag + tb1_imag; + + /* b1 = tb2 + i tb3 */ + const ATOMIC b1_real = tb2_real - tb3_imag; + const ATOMIC b1_imag = tb2_imag + tb3_real; + + /* b2 = tb2 - i tb3 */ + const ATOMIC b2_real = tb2_real + tb3_imag; + const ATOMIC b2_imag = tb2_imag - tb3_real; + + /* x0 = a0 + b0 */ + const ATOMIC x0_real = a0_real + b0_real; + const ATOMIC x0_imag = a0_imag + b0_imag; + + /* x4 = a1 + b1 */ + const ATOMIC x4_real = a1_real + b1_real; + const ATOMIC x4_imag = a1_imag + b1_imag; + + /* x2 = a2 + b2 */ + const ATOMIC x2_real = a2_real + b2_real; + const ATOMIC x2_imag = a2_imag + b2_imag; + + /* x3 = a0 - b0 */ + const ATOMIC x3_real = a0_real - b0_real; + const ATOMIC x3_imag = a0_imag - b0_imag; + + /* x1 = a1 - b1 */ + const ATOMIC x1_real = a1_real - b1_real; + const ATOMIC x1_imag = a1_imag - b1_imag; + + /* x5 = a2 - b2 */ + const ATOMIC x5_real = a2_real - b2_real; + const ATOMIC x5_imag = a2_imag - b2_imag; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* to1 = w1 * x1 */ + REAL(out,ostride,j+p_1) = w1_real * x1_real - w1_imag * x1_imag; + IMAG(out,ostride,j+p_1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + REAL(out,ostride,j+2*p_1) = w2_real * x2_real - w2_imag * x2_imag; + IMAG(out,ostride,j+2*p_1) = w2_real * x2_imag + w2_imag * x2_real; + + /* to3 = w3 * x3 */ + REAL(out,ostride,j+3*p_1) = w3_real * x3_real - w3_imag * x3_imag; + IMAG(out,ostride,j+3*p_1) = w3_real * x3_imag + w3_imag * x3_real; + + /* to4 = w4 * x4 */ + REAL(out,ostride,j+4*p_1) = w4_real * x4_real - w4_imag * x4_imag; + IMAG(out,ostride,j+4*p_1) = w4_real * x4_imag + w4_imag * x4_real; + + /* to5 = w5 * x5 */ + REAL(out,ostride,j+5*p_1) = w5_real * x5_real - w5_imag * x5_imag; + IMAG(out,ostride,j+5*p_1) = w5_real * x5_imag + w5_imag * x5_real; + + i++; + j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_7.c b/software/gsl-1.15/fft/c_pass_7.c new file mode 100644 index 000000000..7d7a39fd8 --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_7.c @@ -0,0 +1,312 @@ +/* fft/c_pass_7.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_7) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[], + const TYPE(gsl_complex) twiddle5[], + const TYPE(gsl_complex) twiddle6[]) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t factor = 7; + const size_t m = n / factor; + const size_t q = n / product; + const size_t p_1 = product / factor; + const size_t jump = (factor - 1) * p_1; + + const ATOMIC c1 = cos(1.0 * 2.0 * M_PI / 7.0) ; + const ATOMIC c2 = cos(2.0 * 2.0 * M_PI / 7.0) ; + const ATOMIC c3 = cos(3.0 * 2.0 * M_PI / 7.0) ; + + const ATOMIC s1 = sin(1.0 * 2.0 * M_PI / 7.0) ; + const ATOMIC s2 = sin(2.0 * 2.0 * M_PI / 7.0) ; + const ATOMIC s3 = sin(3.0 * 2.0 * M_PI / 7.0) ; + + for (k = 0; k < q; k++) + { + ATOMIC w1_real, w1_imag, w2_real, w2_imag, w3_real, w3_imag, w4_real, + w4_imag, w5_real, w5_imag, w6_real, w6_imag; + + if (k == 0) + { + w1_real = 1.0; + w1_imag = 0.0; + w2_real = 1.0; + w2_imag = 0.0; + w3_real = 1.0; + w3_imag = 0.0; + w4_real = 1.0; + w4_imag = 0.0; + w5_real = 1.0; + w5_imag = 0.0; + w6_real = 1.0; + w6_imag = 0.0; + } + else + { + if (sign == gsl_fft_forward) + { + /* forward tranform */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = GSL_IMAG(twiddle4[k - 1]); + w5_real = GSL_REAL(twiddle5[k - 1]); + w5_imag = GSL_IMAG(twiddle5[k - 1]); + w6_real = GSL_REAL(twiddle6[k - 1]); + w6_imag = GSL_IMAG(twiddle6[k - 1]); + } + else + { + /* backward tranform: w -> conjugate(w) */ + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = -GSL_IMAG(twiddle3[k - 1]); + w4_real = GSL_REAL(twiddle4[k - 1]); + w4_imag = -GSL_IMAG(twiddle4[k - 1]); + w5_real = GSL_REAL(twiddle5[k - 1]); + w5_imag = -GSL_IMAG(twiddle5[k - 1]); + w6_real = GSL_REAL(twiddle6[k - 1]); + w6_imag = -GSL_IMAG(twiddle6[k - 1]); + } + } + + for (k1 = 0; k1 < p_1; k1++) + { + const ATOMIC z0_real = REAL(in,istride,i); + const ATOMIC z0_imag = IMAG(in,istride,i); + const ATOMIC z1_real = REAL(in,istride,i+m); + const ATOMIC z1_imag = IMAG(in,istride,i+m); + const ATOMIC z2_real = REAL(in,istride,i+2*m); + const ATOMIC z2_imag = IMAG(in,istride,i+2*m); + const ATOMIC z3_real = REAL(in,istride,i+3*m); + const ATOMIC z3_imag = IMAG(in,istride,i+3*m); + const ATOMIC z4_real = REAL(in,istride,i+4*m); + const ATOMIC z4_imag = IMAG(in,istride,i+4*m); + const ATOMIC z5_real = REAL(in,istride,i+5*m); + const ATOMIC z5_imag = IMAG(in,istride,i+5*m); + const ATOMIC z6_real = REAL(in,istride,i+6*m); + const ATOMIC z6_imag = IMAG(in,istride,i+6*m); + + /* compute x = W(7) z */ + + /* t0 = z1 + z6 */ + const ATOMIC t0_real = z1_real + z6_real ; + const ATOMIC t0_imag = z1_imag + z6_imag ; + + /* t1 = z1 - z6 */ + const ATOMIC t1_real = z1_real - z6_real ; + const ATOMIC t1_imag = z1_imag - z6_imag ; + + /* t2 = z2 + z5 */ + const ATOMIC t2_real = z2_real + z5_real ; + const ATOMIC t2_imag = z2_imag + z5_imag ; + + /* t3 = z2 - z5 */ + const ATOMIC t3_real = z2_real - z5_real ; + const ATOMIC t3_imag = z2_imag - z5_imag ; + + /* t4 = z4 + z3 */ + const ATOMIC t4_real = z4_real + z3_real ; + const ATOMIC t4_imag = z4_imag + z3_imag ; + + /* t5 = z4 - z3 */ + const ATOMIC t5_real = z4_real - z3_real ; + const ATOMIC t5_imag = z4_imag - z3_imag ; + + /* t6 = t2 + t0 */ + const ATOMIC t6_real = t2_real + t0_real ; + const ATOMIC t6_imag = t2_imag + t0_imag ; + + /* t7 = t5 + t3 */ + const ATOMIC t7_real = t5_real + t3_real ; + const ATOMIC t7_imag = t5_imag + t3_imag ; + + /* b0 = z0 + t6 + t4 */ + const ATOMIC b0_real = z0_real + t6_real + t4_real ; + const ATOMIC b0_imag = z0_imag + t6_imag + t4_imag ; + + /* b1 = ((cos(2pi/7) + cos(4pi/7) + cos(6pi/7))/3-1) (t6 + t4) */ + const ATOMIC b1_real = (((c1 + c2 + c3)/3.0 - 1.0) * (t6_real + t4_real)); + const ATOMIC b1_imag = (((c1 + c2 + c3)/3.0 - 1.0) * (t6_imag + t4_imag)); + + /* b2 = ((2*cos(2pi/7) - cos(4pi/7) - cos(6pi/7))/3) (t0 - t4) */ + const ATOMIC b2_real = (((2.0 * c1 - c2 - c3)/3.0) * (t0_real - t4_real)); + const ATOMIC b2_imag = (((2.0 * c1 - c2 - c3)/3.0) * (t0_imag - t4_imag)); + + /* b3 = ((cos(2pi/7) - 2*cos(4pi/7) + cos(6pi/7))/3) (t4 - t2) */ + const ATOMIC b3_real = (((c1 - 2.0*c2 + c3)/3.0) * (t4_real - t2_real)); + const ATOMIC b3_imag = (((c1 - 2.0*c2 + c3)/3.0) * (t4_imag - t2_imag)); + + /* b4 = ((cos(2pi/7) + cos(4pi/7) - 2*cos(6pi/7))/3) (t2 - t0) */ + const ATOMIC b4_real = (((c1 + c2 - 2.0 * c3)/3.0) * (t2_real - t0_real)); + const ATOMIC b4_imag = (((c1 + c2 - 2.0 * c3)/3.0) * (t2_imag - t0_imag)); + + /* b5 = sign * ((sin(2pi/7) + sin(4pi/7) - sin(6pi/7))/3) (t7 + t1) */ + const ATOMIC b5_real = (-(int)sign) * ((s1 + s2 - s3)/3.0) * (t7_real + t1_real) ; + const ATOMIC b5_imag = (-(int)sign) * ((s1 + s2 - s3)/3.0) * (t7_imag + t1_imag) ; + + /* b6 = sign * ((2sin(2pi/7) - sin(4pi/7) + sin(6pi/7))/3) (t1 - t5) */ + const ATOMIC b6_real = (-(int)sign) * ((2.0 * s1 - s2 + s3)/3.0) * (t1_real - t5_real) ; + const ATOMIC b6_imag = (-(int)sign) * ((2.0 * s1 - s2 + s3)/3.0) * (t1_imag - t5_imag) ; + + /* b7 = sign * ((sin(2pi/7) - 2sin(4pi/7) - sin(6pi/7))/3) (t5 - t3) */ + const ATOMIC b7_real = (-(int)sign) * ((s1 - 2.0 * s2 - s3)/3.0) * (t5_real - t3_real) ; + const ATOMIC b7_imag = (-(int)sign) * ((s1 - 2.0 * s2 - s3)/3.0) * (t5_imag - t3_imag) ; + + /* b8 = sign * ((sin(2pi/7) + sin(4pi/7) + 2sin(6pi/7))/3) (t3 - t1) */ + const ATOMIC b8_real = (-(int)sign) * ((s1 + s2 + 2.0 * s3)/3.0) * (t3_real - t1_real) ; + const ATOMIC b8_imag = (-(int)sign) * ((s1 + s2 + 2.0 * s3)/3.0) * (t3_imag - t1_imag) ; + + + /* T0 = b0 + b1 */ + const ATOMIC T0_real = b0_real + b1_real ; + const ATOMIC T0_imag = b0_imag + b1_imag ; + + /* T1 = b2 + b3 */ + const ATOMIC T1_real = b2_real + b3_real ; + const ATOMIC T1_imag = b2_imag + b3_imag ; + + /* T2 = b4 - b3 */ + const ATOMIC T2_real = b4_real - b3_real ; + const ATOMIC T2_imag = b4_imag - b3_imag ; + + /* T3 = -b2 - b4 */ + const ATOMIC T3_real = -b2_real - b4_real ; + const ATOMIC T3_imag = -b2_imag - b4_imag ; + + /* T4 = b6 + b7 */ + const ATOMIC T4_real = b6_real + b7_real ; + const ATOMIC T4_imag = b6_imag + b7_imag ; + + /* T5 = b8 - b7 */ + const ATOMIC T5_real = b8_real - b7_real ; + const ATOMIC T5_imag = b8_imag - b7_imag ; + + /* T6 = -b8 - b6 */ + const ATOMIC T6_real = -b8_real - b6_real ; + const ATOMIC T6_imag = -b8_imag - b6_imag ; + + /* T7 = T0 + T1 */ + const ATOMIC T7_real = T0_real + T1_real ; + const ATOMIC T7_imag = T0_imag + T1_imag ; + + /* T8 = T0 + T2 */ + const ATOMIC T8_real = T0_real + T2_real ; + const ATOMIC T8_imag = T0_imag + T2_imag ; + + /* T9 = T0 + T3 */ + const ATOMIC T9_real = T0_real + T3_real ; + const ATOMIC T9_imag = T0_imag + T3_imag ; + + /* T10 = T4 + b5 */ + const ATOMIC T10_real = T4_real + b5_real ; + const ATOMIC T10_imag = T4_imag + b5_imag ; + + /* T11 = T5 + b5 */ + const ATOMIC T11_real = T5_real + b5_real ; + const ATOMIC T11_imag = T5_imag + b5_imag ; + + /* T12 = T6 + b5 */ + const ATOMIC T12_real = T6_real + b5_real ; + const ATOMIC T12_imag = T6_imag + b5_imag ; + + + /* x0 = b0 */ + const ATOMIC x0_real = b0_real ; + const ATOMIC x0_imag = b0_imag ; + + /* x1 = T7 - i T10 */ + const ATOMIC x1_real = T7_real + T10_imag ; + const ATOMIC x1_imag = T7_imag - T10_real ; + + /* x2 = T9 - i T12 */ + const ATOMIC x2_real = T9_real + T12_imag ; + const ATOMIC x2_imag = T9_imag - T12_real ; + + /* x3 = T8 + i T11 */ + const ATOMIC x3_real = T8_real - T11_imag ; + const ATOMIC x3_imag = T8_imag + T11_real ; + + /* x4 = T8 - i T11 */ + const ATOMIC x4_real = T8_real + T11_imag ; + const ATOMIC x4_imag = T8_imag - T11_real ; + + /* x5 = T9 + i T12 */ + const ATOMIC x5_real = T9_real - T12_imag ; + const ATOMIC x5_imag = T9_imag + T12_real ; + + /* x6 = T7 + i T10 */ + const ATOMIC x6_real = T7_real - T10_imag ; + const ATOMIC x6_imag = T7_imag + T10_real ; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + REAL(out,ostride,j) = x0_real; + IMAG(out,ostride,j) = x0_imag; + + /* to1 = w1 * x1 */ + REAL(out,ostride,j+p_1) = w1_real * x1_real - w1_imag * x1_imag; + IMAG(out,ostride,j+p_1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + REAL(out,ostride,j+2*p_1) = w2_real * x2_real - w2_imag * x2_imag; + IMAG(out,ostride,j+2*p_1) = w2_real * x2_imag + w2_imag * x2_real; + + /* to3 = w3 * x3 */ + REAL(out,ostride,j+3*p_1) = w3_real * x3_real - w3_imag * x3_imag; + IMAG(out,ostride,j+3*p_1) = w3_real * x3_imag + w3_imag * x3_real; + + /* to4 = w4 * x4 */ + REAL(out,ostride,j+4*p_1) = w4_real * x4_real - w4_imag * x4_imag; + IMAG(out,ostride,j+4*p_1) = w4_real * x4_imag + w4_imag * x4_real; + + /* to5 = w5 * x5 */ + REAL(out,ostride,j+5*p_1) = w5_real * x5_real - w5_imag * x5_imag; + IMAG(out,ostride,j+5*p_1) = w5_real * x5_imag + w5_imag * x5_real; + + /* to6 = w6 * x6 */ + REAL(out,ostride,j+6*p_1) = w6_real * x6_real - w6_imag * x6_imag; + IMAG(out,ostride,j+6*p_1) = w6_real * x6_imag + w6_imag * x6_real; + + i++; j++; + } + j += jump; + } + return 0; +} diff --git a/software/gsl-1.15/fft/c_pass_n.c b/software/gsl-1.15/fft/c_pass_n.c new file mode 100644 index 000000000..65f4b7570 --- /dev/null +++ b/software/gsl-1.15/fft/c_pass_n.c @@ -0,0 +1,204 @@ +/* fft/c_pass_n.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +FUNCTION(fft_complex,pass_n) (BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const gsl_fft_direction sign, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + size_t i = 0, j = 0; + size_t k, k1; + + const size_t m = n / factor; + const size_t q = n / product; + const size_t p_1 = product / factor; + const size_t jump = (factor - 1) * p_1; + + size_t e, e1; + + for (i = 0; i < m; i++) + { + REAL(out,ostride,i) = REAL(in,istride,i); + IMAG(out,ostride,i) = IMAG(in,istride,i); + } + + for (e = 1; e < (factor - 1) / 2 + 1; e++) + { + for (i = 0; i < m; i++) + { + const size_t idx = i + e * m; + const size_t idxc = i + (factor - e) * m; + REAL(out,ostride,idx) = REAL(in,istride,idx) + REAL(in,istride,idxc); + IMAG(out,ostride,idx) = IMAG(in,istride,idx) + IMAG(in,istride,idxc); + REAL(out,ostride,idxc) = REAL(in,istride,idx) - REAL(in,istride,idxc); + IMAG(out,ostride,idxc) = IMAG(in,istride,idx) - IMAG(in,istride,idxc); + } + } + + /* e = 0 */ + + for (i=0 ; i exp(i theta) w */ + + { + const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; + const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; + w_real = tmp_real; + w_imag = tmp_imag; + } + + for (b = 0; b < n; b += 2 * dual) + { + const size_t i = b + a; + const size_t j = b + a + dual; + + const ATOMIC z1_real = REAL(data,stride,j) ; + const ATOMIC z1_imag = IMAG(data,stride,j) ; + + const ATOMIC wd_real = w_real * z1_real - w_imag * z1_imag; + const ATOMIC wd_imag = w_real * z1_imag + w_imag * z1_real; + + REAL(data,stride,j) = REAL(data,stride,i) - wd_real; + IMAG(data,stride,j) = IMAG(data,stride,i) - wd_imag; + REAL(data,stride,i) += wd_real; + IMAG(data,stride,i) += wd_imag; + } + } + dual *= 2; + } + + return 0; + +} + + +int +FUNCTION(gsl_fft_complex,radix2_dif_forward) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n) +{ + gsl_fft_direction sign = gsl_fft_forward; + int status = FUNCTION(gsl_fft_complex,radix2_dif_transform) (data, stride, n, sign); + return status; +} + +int +FUNCTION(gsl_fft_complex,radix2_dif_backward) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_fft_complex,radix2_dif_transform) (data, stride, n, sign); + return status; +} + +int +FUNCTION(gsl_fft_complex,radix2_dif_inverse) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_fft_complex,radix2_dif_transform) (data, stride, n, sign); + + if (status) + { + return status; + } + + /* normalize inverse fft with 1/n */ + + { + const ATOMIC norm = 1.0 / n; + size_t i; + for (i = 0; i < n; i++) + { + REAL(data,stride,i) *= norm; + IMAG(data,stride,i) *= norm; + } + } + + return status; +} + +int +FUNCTION(gsl_fft_complex,radix2_dif_transform) (TYPE(gsl_complex_packed_array) data, + const size_t stride, + const size_t n, + const gsl_fft_direction sign) +{ + int result ; + size_t dual; + size_t bit; + size_t logn = 0; + int status; + + if (n == 1) /* identity operation */ + { + return 0 ; + } + + /* make sure that n is a power of 2 */ + + result = fft_binary_logn(n) ; + + if (result == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + else + { + logn = result ; + } + + /* apply fft recursion */ + + dual = n / 2; + + for (bit = 0; bit < logn; bit++) + { + ATOMIC w_real = 1.0; + ATOMIC w_imag = 0.0; + + const double theta = 2.0 * ((int) sign) * M_PI / ((double) (2 * dual)); + + const ATOMIC s = sin (theta); + const ATOMIC t = sin (theta / 2.0); + const ATOMIC s2 = 2.0 * t * t; + + size_t a, b; + + for (b = 0; b < dual; b++) + { + for (a = 0; a < n; a+= 2 * dual) + { + const size_t i = b + a; + const size_t j = b + a + dual; + + const ATOMIC t1_real = REAL(data,stride,i) + REAL(data,stride,j); + const ATOMIC t1_imag = IMAG(data,stride,i) + IMAG(data,stride,j); + const ATOMIC t2_real = REAL(data,stride,i) - REAL(data,stride,j); + const ATOMIC t2_imag = IMAG(data,stride,i) - IMAG(data,stride,j); + + REAL(data,stride,i) = t1_real; + IMAG(data,stride,i) = t1_imag; + REAL(data,stride,j) = w_real*t2_real - w_imag * t2_imag; + IMAG(data,stride,j) = w_real*t2_imag + w_imag * t2_real; + } + + /* trignometric recurrence for w-> exp(i theta) w */ + + { + const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; + const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; + w_real = tmp_real; + w_imag = tmp_imag; + } + } + dual /= 2; + } + + /* bit reverse the ordering of output data for decimation in + frequency algorithm */ + + status = FUNCTION(fft_complex,bitreverse_order)(data, stride, n, logn) ; + + return 0; + +} + + + + + + + + diff --git a/software/gsl-1.15/fft/compare.h b/software/gsl-1.15/fft/compare.h new file mode 100644 index 000000000..aab16393d --- /dev/null +++ b/software/gsl-1.15/fft/compare.h @@ -0,0 +1,30 @@ +/* fft/compare.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(compare_complex,results) (const char *name_a, const BASE a[], + const char *name_b, const BASE b[], + size_t stride, size_t n, + const double allowed_ticks); + +int +FUNCTION(compare_real,results) (const char *name_a, const BASE a[], + const char *name_b, const BASE b[], + size_t stride, size_t n, + const double allowed_ticks); diff --git a/software/gsl-1.15/fft/compare_source.c b/software/gsl-1.15/fft/compare_source.c new file mode 100644 index 000000000..d504bbff9 --- /dev/null +++ b/software/gsl-1.15/fft/compare_source.c @@ -0,0 +1,125 @@ +/* fft/compare_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "compare.h" + +int +FUNCTION(compare_complex,results) (const char *name_a, const BASE a[], + const char *name_b, const BASE b[], + size_t stride, size_t n, + const double allowed_ticks) +{ + size_t i; + double ticks, max_ticks = 0; + double dr, di; + const char *flag; + + for (i = 0; i < n; i++) + { + dr = b[2*stride*i] - a[2*stride*i]; + di = b[2*stride*i+1] - a[2*stride*i+1]; + ticks = (fabs (dr) + fabs (di)) / BASE_EPSILON; + if (ticks > max_ticks) + { + max_ticks = ticks; + } + } + + if (max_ticks < allowed_ticks) + { + return 0; + } + + printf ("\n%s vs %s : max_ticks = %f\n", name_a, name_b, max_ticks); + + for (i = 0; i < n; i++) + { + dr = b[2*stride*i] - a[2*stride*i]; + di = b[2*stride*i+1] - a[2*stride*i+1]; + ticks = (fabs (dr) + fabs (di)) / BASE_EPSILON; + + if (ticks > 1000) + { + flag = "***"; + } + else + { + flag = ""; + } + + printf ("%15s: %d %.16f %.16f %s\n", name_a, (int)i, + a[2*stride*i], a[2*stride*i+1], flag); + printf ("%15s: %d %.16f %.16f %e %s\n", name_b, (int)i, + b[2*stride*i], b[2*stride*i+1], ticks, flag); + } + + return -1; +} + + +int +FUNCTION(compare_real,results) (const char *name_a, const BASE a[], + const char *name_b, const BASE b[], + size_t stride, size_t n, + const double allowed_ticks) +{ + size_t i; + double ticks, max_ticks = 0; + double dr; + const char *flag; + + for (i = 0; i < n; i++) + { + dr = b[stride*i] - a[stride*i]; + ticks = fabs (dr) / BASE_EPSILON; + if (ticks > max_ticks) + { + max_ticks = ticks; + } + } + + if (max_ticks < allowed_ticks) + { + return 0; + } + + printf ("\n%s vs %s : max_ticks = %f\n", name_a, name_b, max_ticks); + + for (i = 0; i < n; i++) + { + dr = b[stride*i] - a[stride*i]; + ticks = fabs (dr) / BASE_EPSILON; + + if (ticks > 1000) + { + flag = "***"; + } + else + { + flag = ""; + } + + printf ("%15s: %d %.16f %s\n", name_a, (int)i, + a[stride*i], flag); + printf ("%15s: %d %.16f %e %s\n", name_b, (int)i, + b[stride*i], ticks, flag); + } + + return -1; +} diff --git a/software/gsl-1.15/fft/complex_internal.h b/software/gsl-1.15/fft/complex_internal.h new file mode 100644 index 000000000..1c9c366a0 --- /dev/null +++ b/software/gsl-1.15/fft/complex_internal.h @@ -0,0 +1,14 @@ +/* Handling of packed complex types... not meant for client consumption. + */ +#ifndef COMPLEX_INTERNAL_H_ +#define COMPLEX_INTERNAL_H_ + +#define VECTOR(a,stride,i) ((a)[(stride)*(i)]) +#define REAL(a,stride,i) ((a)[2*(stride)*(i)]) +#define IMAG(a,stride,i) ((a)[2*(stride)*(i)+1]) + +#define REAL0(a) ((a)[0]) +#define IMAG0(a) ((a)[1]) + + +#endif /* !COMPLEX_INTERNAL_H_ */ diff --git a/software/gsl-1.15/fft/dft.c b/software/gsl-1.15/fft/dft.c new file mode 100644 index 000000000..26d32a5ae --- /dev/null +++ b/software/gsl-1.15/fft/dft.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "complex_internal.h" + +#define BASE_DOUBLE +#include "templates_on.h" +#include "dft_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "dft_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + diff --git a/software/gsl-1.15/fft/dft_source.c b/software/gsl-1.15/fft/dft_source.c new file mode 100644 index 000000000..666419ce0 --- /dev/null +++ b/software/gsl-1.15/fft/dft_source.c @@ -0,0 +1,104 @@ +/* fft/dft_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_dft_complex,forward) (const BASE data[], + const size_t stride, const size_t n, + BASE result[]) +{ + gsl_fft_direction sign = gsl_fft_forward; + int status = FUNCTION(gsl_dft_complex,transform) (data, stride, n, result, sign); + return status; +} + +int +FUNCTION(gsl_dft_complex,backward) (const BASE data[], + const size_t stride, const size_t n, + BASE result[]) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_dft_complex,transform) (data, stride, n, result, sign); + return status; +} + + +int +FUNCTION(gsl_dft_complex,inverse) (const BASE data[], + const size_t stride, const size_t n, + BASE result[]) +{ + gsl_fft_direction sign = gsl_fft_backward; + int status = FUNCTION(gsl_dft_complex,transform) (data, stride, n, result, sign); + + /* normalize inverse fft with 1/n */ + + { + const ATOMIC norm = ONE / (ATOMIC)n; + size_t i; + for (i = 0; i < n; i++) + { + REAL(result,stride,i) *= norm; + IMAG(result,stride,i) *= norm; + } + } + return status; +} + +int +FUNCTION(gsl_dft_complex,transform) (const BASE data[], + const size_t stride, const size_t n, + BASE result[], + const gsl_fft_direction sign) +{ + + size_t i, j, exponent; + + const double d_theta = 2.0 * ((int) sign) * M_PI / (double) n; + + /* FIXME: check that input length == output length and give error */ + + for (i = 0; i < n; i++) + { + ATOMIC sum_real = 0; + ATOMIC sum_imag = 0; + + exponent = 0; + + for (j = 0; j < n; j++) + { + double theta = d_theta * (double) exponent; + /* sum = exp(i theta) * data[j] */ + + ATOMIC w_real = (ATOMIC) cos (theta); + ATOMIC w_imag = (ATOMIC) sin (theta); + + ATOMIC data_real = REAL(data,stride,j); + ATOMIC data_imag = IMAG(data,stride,j); + + sum_real += w_real * data_real - w_imag * data_imag; + sum_imag += w_real * data_imag + w_imag * data_real; + + exponent = (exponent + i) % n; + } + REAL(result,stride,i) = sum_real; + IMAG(result,stride,i) = sum_imag; + } + + return 0; +} diff --git a/software/gsl-1.15/fft/factorize.c b/software/gsl-1.15/fft/factorize.c new file mode 100644 index 000000000..79fd3b967 --- /dev/null +++ b/software/gsl-1.15/fft/factorize.c @@ -0,0 +1,176 @@ +/* fft/factorize.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "factorize.h" + +static int +fft_complex_factorize (const size_t n, + size_t *nf, + size_t factors[]) +{ + const size_t complex_subtransforms[] = + {7, 6, 5, 4, 3, 2, 0}; + + /* other factors can be added here if their transform modules are + implemented. The end of the list is marked by 0. */ + + int status = fft_factorize (n, complex_subtransforms, nf, factors); + return status; +} + +static int +fft_halfcomplex_factorize (const size_t n, + size_t *nf, + size_t factors[]) +{ + const size_t halfcomplex_subtransforms[] = + {5, 4, 3, 2, 0}; + + int status = fft_factorize (n, halfcomplex_subtransforms, nf, factors); + return status; +} + +static int +fft_real_factorize (const size_t n, + size_t *nf, + size_t factors[]) +{ + const size_t real_subtransforms[] = + {5, 4, 3, 2, 0}; + + int status = fft_factorize (n, real_subtransforms, nf, factors); + return status; +} + + +static int +fft_factorize (const size_t n, + const size_t implemented_subtransforms[], + size_t *n_factors, + size_t factors[]) + +{ + size_t nf = 0; + size_t ntest = n; + size_t factor; + size_t i = 0; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + if (n == 1) + { + factors[0] = 1; + *n_factors = 1; + return 0; + } + + /* deal with the implemented factors first */ + + while (implemented_subtransforms[i] && ntest != 1) + { + factor = implemented_subtransforms[i]; + while ((ntest % factor) == 0) + { + ntest = ntest / factor; + factors[nf] = factor; + nf++; + } + i++; + } + + /* deal with any other even prime factors (there is only one) */ + + factor = 2; + + while ((ntest % factor) == 0 && (ntest != 1)) + { + ntest = ntest / factor; + factors[nf] = factor; + nf++; + } + + /* deal with any other odd prime factors */ + + factor = 3; + + while (ntest != 1) + { + while ((ntest % factor) != 0) + { + factor += 2; + } + ntest = ntest / factor; + factors[nf] = factor; + nf++; + } + + /* check that the factorization is correct */ + { + size_t product = 1; + + for (i = 0; i < nf; i++) + { + product *= factors[i]; + } + + if (product != n) + { + GSL_ERROR ("factorization failed", GSL_ESANITY); + } + } + + *n_factors = nf; + + return 0; +} + + +static int +fft_binary_logn (const size_t n) +{ + size_t ntest ; + size_t binary_logn = 0 ; + size_t k = 1; + + while (k < n) + { + k *= 2; + binary_logn++; + } + + ntest = (1 << binary_logn) ; + + if (n != ntest ) + { + return -1 ; /* n is not a power of 2 */ + } + + return binary_logn; +} + + + + diff --git a/software/gsl-1.15/fft/factorize.h b/software/gsl-1.15/fft/factorize.h new file mode 100644 index 000000000..86fa350d5 --- /dev/null +++ b/software/gsl-1.15/fft/factorize.h @@ -0,0 +1,29 @@ +/* fft/factorize.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int fft_complex_factorize (const size_t n, size_t *nf, size_t factors[]); + +static int fft_halfcomplex_factorize (const size_t n, size_t *nf, size_t factors[]); + +static int fft_real_factorize (const size_t n, size_t *nf, size_t factors[]); + +static int fft_factorize (const size_t n, const size_t implemented_subtransforms[], size_t *n_factors, size_t factors[]); + +static int fft_binary_logn (const size_t n) ; + diff --git a/software/gsl-1.15/fft/fft.c b/software/gsl-1.15/fft/fft.c new file mode 100644 index 000000000..9aa0da77b --- /dev/null +++ b/software/gsl-1.15/fft/fft.c @@ -0,0 +1,117 @@ +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define BASE_DOUBLE +#include "templates_on.h" +#include "bitreverse.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "bitreverse.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#include "factorize.c" + +#define BASE_DOUBLE +#include "templates_on.h" +#include "c_init.c" +#include "c_main.c" +#include "c_pass_2.c" +#include "c_pass_3.c" +#include "c_pass_4.c" +#include "c_pass_5.c" +#include "c_pass_6.c" +#include "c_pass_7.c" +#include "c_pass_n.c" +#include "c_radix2.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "c_init.c" +#include "c_main.c" +#include "c_pass_2.c" +#include "c_pass_3.c" +#include "c_pass_4.c" +#include "c_pass_5.c" +#include "c_pass_6.c" +#include "c_pass_7.c" +#include "c_pass_n.c" +#include "c_radix2.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#include +#include + +#define BASE_DOUBLE +#include "templates_on.h" +#include "hc_init.c" +#include "hc_main.c" +#include "hc_pass_2.c" +#include "hc_pass_3.c" +#include "hc_pass_4.c" +#include "hc_pass_5.c" +#include "hc_pass_n.c" +#include "hc_radix2.c" +#include "hc_unpack.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "hc_init.c" +#include "hc_main.c" +#include "hc_pass_2.c" +#include "hc_pass_3.c" +#include "hc_pass_4.c" +#include "hc_pass_5.c" +#include "hc_pass_n.c" +#include "hc_radix2.c" +#include "hc_unpack.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#include +#include + +#define BASE_DOUBLE +#include "templates_on.h" +#include "real_init.c" +#include "real_main.c" +#include "real_pass_2.c" +#include "real_pass_3.c" +#include "real_pass_4.c" +#include "real_pass_5.c" +#include "real_pass_n.c" +#include "real_radix2.c" +#include "real_unpack.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "real_init.c" +#include "real_main.c" +#include "real_pass_2.c" +#include "real_pass_3.c" +#include "real_pass_4.c" +#include "real_pass_5.c" +#include "real_pass_n.c" +#include "real_radix2.c" +#include "real_unpack.c" +#include "templates_off.h" +#undef BASE_FLOAT diff --git a/software/gsl-1.15/fft/gsl_dft_complex.h b/software/gsl-1.15/fft/gsl_dft_complex.h new file mode 100644 index 000000000..cb4d08804 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_dft_complex.h @@ -0,0 +1,55 @@ +/* fft/gsl_dft_complex.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_DFT_COMPLEX_H__ +#define __GSL_DFT_COMPLEX_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_dft_complex_forward (const double data[], const size_t stride, const size_t n, + double result[]); + +int gsl_dft_complex_backward (const double data[], const size_t stride, const size_t n, + double result[]); + +int gsl_dft_complex_inverse (const double data[], const size_t stride, const size_t n, + double result[]); + +int gsl_dft_complex_transform (const double data[], const size_t stride, const size_t n, + double result[], const gsl_fft_direction sign); + +__END_DECLS + +#endif /* __GSL_DFT_COMPLEX_H__ */ diff --git a/software/gsl-1.15/fft/gsl_dft_complex_float.h b/software/gsl-1.15/fft/gsl_dft_complex_float.h new file mode 100644 index 000000000..c511ac09f --- /dev/null +++ b/software/gsl-1.15/fft/gsl_dft_complex_float.h @@ -0,0 +1,55 @@ +/* fft/gsl_dft_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_DFT_COMPLEX_FLOAT_H__ +#define __GSL_DFT_COMPLEX_FLOAT_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_dft_complex_float_forward (const float data[], const size_t stride, const size_t n, + float result[]); + +int gsl_dft_complex_float_backward (const float data[], const size_t stride, const size_t n, + float result[]); + +int gsl_dft_complex_float_inverse (const float data[], const size_t stride, const size_t n, + float result[]); + +int gsl_dft_complex_float_transform (const float data[], const size_t stride, const size_t n, + float result[], const gsl_fft_direction sign); + +__END_DECLS + +#endif /* __GSL_DFT_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft.h b/software/gsl-1.15/fft/gsl_fft.h new file mode 100644 index 000000000..357887016 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft.h @@ -0,0 +1,60 @@ +/* fft/gsl_fft.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_H__ +#define __GSL_FFT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +#ifndef GSL_DISABLE_DEPRECATED +typedef enum + { + forward = -1, backward = +1, + gsl_fft_forward = -1, gsl_fft_backward = +1 + } +gsl_fft_direction; +#else +typedef enum + { + gsl_fft_forward = -1, gsl_fft_backward = +1 + } +gsl_fft_direction; +#endif + +/* this gives the sign in the formula + + h(f) = \sum x(t) exp(+/- 2 pi i f t) + + where - is the forward transform direction and + the inverse direction */ + +__END_DECLS + +#endif /* __GSL_FFT_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft_complex.h b/software/gsl-1.15/fft/gsl_fft_complex.h new file mode 100644 index 000000000..c13f7ea50 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_complex.h @@ -0,0 +1,136 @@ +/* fft/gsl_fft_complex.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_COMPLEX_H__ +#define __GSL_FFT_COMPLEX_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Power of 2 routines */ + + +int gsl_fft_complex_radix2_forward (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_backward (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_inverse (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_transform (gsl_complex_packed_array data, + const size_t stride, + const size_t n, + const gsl_fft_direction sign); + +int gsl_fft_complex_radix2_dif_forward (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_dif_backward (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_dif_inverse (gsl_complex_packed_array data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_radix2_dif_transform (gsl_complex_packed_array data, + const size_t stride, + const size_t n, + const gsl_fft_direction sign); + +/* Mixed Radix general-N routines */ + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex *twiddle[64]; + gsl_complex *trig; + } +gsl_fft_complex_wavetable; + +typedef struct +{ + size_t n; + double *scratch; +} +gsl_fft_complex_workspace; + + +gsl_fft_complex_wavetable *gsl_fft_complex_wavetable_alloc (size_t n); + +void gsl_fft_complex_wavetable_free (gsl_fft_complex_wavetable * wavetable); + +gsl_fft_complex_workspace *gsl_fft_complex_workspace_alloc (size_t n); + +void gsl_fft_complex_workspace_free (gsl_fft_complex_workspace * workspace); + +int gsl_fft_complex_memcpy (gsl_fft_complex_wavetable * dest, + gsl_fft_complex_wavetable * src); + + +int gsl_fft_complex_forward (gsl_complex_packed_array data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable * wavetable, + gsl_fft_complex_workspace * work); + +int gsl_fft_complex_backward (gsl_complex_packed_array data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable * wavetable, + gsl_fft_complex_workspace * work); + +int gsl_fft_complex_inverse (gsl_complex_packed_array data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable * wavetable, + gsl_fft_complex_workspace * work); + +int gsl_fft_complex_transform (gsl_complex_packed_array data, + const size_t stride, const size_t n, + const gsl_fft_complex_wavetable * wavetable, + gsl_fft_complex_workspace * work, + const gsl_fft_direction sign); + +__END_DECLS + +#endif /* __GSL_FFT_COMPLEX_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft_complex_float.h b/software/gsl-1.15/fft/gsl_fft_complex_float.h new file mode 100644 index 000000000..d3ff395f9 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_complex_float.h @@ -0,0 +1,139 @@ +/* fft/gsl_fft_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_COMPLEX_FLOAT_H__ +#define __GSL_FFT_COMPLEX_FLOAT_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Power of 2 routines */ + + +int gsl_fft_complex_float_radix2_forward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_backward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_inverse (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_transform (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n, + const gsl_fft_direction sign); + +int gsl_fft_complex_float_radix2_dif_forward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_dif_backward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_dif_inverse (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n); + +int gsl_fft_complex_float_radix2_dif_transform (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n, + const gsl_fft_direction sign); + +/* Mixed Radix general-N routines */ + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex_float *twiddle[64]; + gsl_complex_float *trig; + } +gsl_fft_complex_wavetable_float; + +typedef struct +{ + size_t n; + float *scratch; +} +gsl_fft_complex_workspace_float; + + +gsl_fft_complex_wavetable_float *gsl_fft_complex_wavetable_float_alloc (size_t n); + +void gsl_fft_complex_wavetable_float_free (gsl_fft_complex_wavetable_float * wavetable); + +gsl_fft_complex_workspace_float *gsl_fft_complex_workspace_float_alloc (size_t n); + +void gsl_fft_complex_workspace_float_free (gsl_fft_complex_workspace_float * workspace); + + +int gsl_fft_complex_float_memcpy (gsl_fft_complex_wavetable_float * dest, + gsl_fft_complex_wavetable_float * src); + + +int gsl_fft_complex_float_forward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable_float * wavetable, + gsl_fft_complex_workspace_float * work); + +int gsl_fft_complex_float_backward (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable_float * wavetable, + gsl_fft_complex_workspace_float * work); + +int gsl_fft_complex_float_inverse (gsl_complex_packed_array_float data, + const size_t stride, + const size_t n, + const gsl_fft_complex_wavetable_float * wavetable, + gsl_fft_complex_workspace_float * work); + +int gsl_fft_complex_float_transform (gsl_complex_packed_array_float data, + const size_t stride, const size_t n, + const gsl_fft_complex_wavetable_float * wavetable, + gsl_fft_complex_workspace_float * work, + const gsl_fft_direction sign); + +__END_DECLS + +#endif /* __GSL_FFT_COMPLEX_FLOAT_H__ */ + + diff --git a/software/gsl-1.15/fft/gsl_fft_halfcomplex.h b/software/gsl-1.15/fft/gsl_fft_halfcomplex.h new file mode 100644 index 000000000..6751e4762 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_halfcomplex.h @@ -0,0 +1,86 @@ +/* fft/gsl_fft_halfcomplex.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_HALFCOMPLEX_H__ +#define __GSL_FFT_HALFCOMPLEX_H__ + +#include + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_fft_halfcomplex_radix2_backward (double data[], const size_t stride, const size_t n); +int gsl_fft_halfcomplex_radix2_inverse (double data[], const size_t stride, const size_t n); +int gsl_fft_halfcomplex_radix2_transform (double data[], const size_t stride, const size_t n); + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex *twiddle[64]; + gsl_complex *trig; + } +gsl_fft_halfcomplex_wavetable; + +gsl_fft_halfcomplex_wavetable * gsl_fft_halfcomplex_wavetable_alloc (size_t n); + +void +gsl_fft_halfcomplex_wavetable_free (gsl_fft_halfcomplex_wavetable * wavetable); + + +int gsl_fft_halfcomplex_backward (double data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable * wavetable, + gsl_fft_real_workspace * work); + +int gsl_fft_halfcomplex_inverse (double data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable * wavetable, + gsl_fft_real_workspace * work); + +int gsl_fft_halfcomplex_transform (double data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable * wavetable, + gsl_fft_real_workspace * work); + +int +gsl_fft_halfcomplex_unpack (const double halfcomplex_coefficient[], + double complex_coefficient[], + const size_t stride, const size_t n); + +int +gsl_fft_halfcomplex_radix2_unpack (const double halfcomplex_coefficient[], + double complex_coefficient[], + const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_FFT_HALFCOMPLEX_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft_halfcomplex_float.h b/software/gsl-1.15/fft/gsl_fft_halfcomplex_float.h new file mode 100644 index 000000000..e31836753 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_halfcomplex_float.h @@ -0,0 +1,86 @@ +/* fft/gsl_fft_halfcomplex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_HALFCOMPLEX_FLOAT_H__ +#define __GSL_FFT_HALFCOMPLEX_FLOAT_H__ + +#include + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_fft_halfcomplex_float_radix2_backward (float data[], const size_t stride, const size_t n); +int gsl_fft_halfcomplex_float_radix2_inverse (float data[], const size_t stride, const size_t n); +int gsl_fft_halfcomplex_float_radix2_transform (float data[], const size_t stride, const size_t n); + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex_float *twiddle[64]; + gsl_complex_float *trig; + } +gsl_fft_halfcomplex_wavetable_float; + + +gsl_fft_halfcomplex_wavetable_float * gsl_fft_halfcomplex_wavetable_float_alloc (size_t n); + +void +gsl_fft_halfcomplex_wavetable_float_free (gsl_fft_halfcomplex_wavetable_float * wavetable); + +int gsl_fft_halfcomplex_float_backward (float data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable_float * wavetable, + gsl_fft_real_workspace_float * work); + +int gsl_fft_halfcomplex_float_inverse (float data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable_float * wavetable, + gsl_fft_real_workspace_float * work); + +int gsl_fft_halfcomplex_float_transform (float data[], const size_t stride, const size_t n, + const gsl_fft_halfcomplex_wavetable_float * wavetable, + gsl_fft_real_workspace_float * work); + +int +gsl_fft_halfcomplex_float_unpack (const float halfcomplex_coefficient[], + float complex_coefficient[], + const size_t stride, const size_t n); + +int +gsl_fft_halfcomplex_float_radix2_unpack (const float halfcomplex_coefficient[], + float complex_coefficient[], + const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_FFT_HALFCOMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft_real.h b/software/gsl-1.15/fft/gsl_fft_real.h new file mode 100644 index 000000000..e07a60420 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_real.h @@ -0,0 +1,80 @@ +/* fft/gsl_fft_real.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_REAL_H__ +#define __GSL_FFT_REAL_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_fft_real_radix2_transform (double data[], const size_t stride, const size_t n) ; + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex *twiddle[64]; + gsl_complex *trig; + } +gsl_fft_real_wavetable; + +typedef struct + { + size_t n; + double *scratch; + } +gsl_fft_real_workspace; + +gsl_fft_real_wavetable * gsl_fft_real_wavetable_alloc (size_t n); + +void gsl_fft_real_wavetable_free (gsl_fft_real_wavetable * wavetable); + +gsl_fft_real_workspace * gsl_fft_real_workspace_alloc (size_t n); + +void gsl_fft_real_workspace_free (gsl_fft_real_workspace * workspace); + + +int gsl_fft_real_transform (double data[], const size_t stride, const size_t n, + const gsl_fft_real_wavetable * wavetable, + gsl_fft_real_workspace * work); + + +int gsl_fft_real_unpack (const double real_coefficient[], + double complex_coefficient[], + const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_FFT_REAL_H__ */ diff --git a/software/gsl-1.15/fft/gsl_fft_real_float.h b/software/gsl-1.15/fft/gsl_fft_real_float.h new file mode 100644 index 000000000..7a7732f22 --- /dev/null +++ b/software/gsl-1.15/fft/gsl_fft_real_float.h @@ -0,0 +1,79 @@ +/* fft/gsl_fft_real_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FFT_REAL_FLOAT_H__ +#define __GSL_FFT_REAL_FLOAT_H__ + +#include + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_fft_real_float_radix2_transform (float data[], const size_t stride, const size_t n) ; + +typedef struct + { + size_t n; + size_t nf; + size_t factor[64]; + gsl_complex_float *twiddle[64]; + gsl_complex_float *trig; + } +gsl_fft_real_wavetable_float; + +typedef struct + { + size_t n; + float *scratch; + } +gsl_fft_real_workspace_float; + +gsl_fft_real_wavetable_float * gsl_fft_real_wavetable_float_alloc (size_t n); + +void gsl_fft_real_wavetable_float_free (gsl_fft_real_wavetable_float * wavetable); + +gsl_fft_real_workspace_float * gsl_fft_real_workspace_float_alloc (size_t n); + +void gsl_fft_real_workspace_float_free (gsl_fft_real_workspace_float * workspace); + +int gsl_fft_real_float_transform (float data[], const size_t stride, const size_t n, + const gsl_fft_real_wavetable_float * wavetable, + gsl_fft_real_workspace_float * work); + + +int gsl_fft_real_float_unpack (const float real_float_coefficient[], + float complex_coefficient[], + const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_FFT_REAL_FLOAT_H__ */ diff --git a/software/gsl-1.15/fft/hc_init.c b/software/gsl-1.15/fft/hc_init.c new file mode 100644 index 000000000..59283a153 --- /dev/null +++ b/software/gsl-1.15/fft/hc_init.c @@ -0,0 +1,128 @@ +/* fft/hc_init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE(gsl_fft_halfcomplex_wavetable) * +FUNCTION(gsl_fft_halfcomplex_wavetable,alloc) (size_t n) +{ + int status; + size_t i; + size_t n_factors; + size_t t, product, product_1, q; + double d_theta; + + TYPE(gsl_fft_halfcomplex_wavetable) * wavetable ; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + wavetable = (TYPE(gsl_fft_halfcomplex_wavetable) *) + malloc(sizeof(TYPE(gsl_fft_halfcomplex_wavetable))); + + if (wavetable == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + wavetable->trig = (TYPE(gsl_complex) *) malloc (n * sizeof (TYPE(gsl_complex))); + + if (wavetable->trig == NULL) + { + /* error in constructor, prevent memory leak */ + + free(wavetable) ; + + GSL_ERROR_VAL ("failed to allocate trigonometric lookup table", + GSL_ENOMEM, 0); + } + + wavetable->n = n ; + + status = fft_halfcomplex_factorize (n, &n_factors, wavetable->factor); + + if (status) + { + /* error in constructor, prevent memory leak */ + + free(wavetable->trig) ; + free(wavetable) ; + + GSL_ERROR_VAL ("factorization failed", GSL_EFACTOR, 0); + } + + wavetable->nf = n_factors; + + d_theta = 2.0 * M_PI / ((double) n); + + t = 0; + product = 1; + for (i = 0; i < n_factors; i++) + { + size_t j; + const size_t factor = wavetable->factor[i]; + wavetable->twiddle[i] = wavetable->trig + t; + product_1 = product; /* product_1 = p_(i-1) */ + product *= factor; + q = n / product; + + for (j = 1; j < factor; j++) + { + size_t k; + size_t m = 0; + for (k = 1; k < (q + 1) / 2; k++) + { + double theta; + m = m + j * product_1; + m = m % n; + theta = d_theta * m; /* d_theta*j*k*product_1 */ + GSL_REAL(wavetable->trig[t]) = cos (theta); + GSL_IMAG(wavetable->trig[t]) = sin (theta); + + t++; + } + } + } + + if (t > (n / 2)) + { + /* error in constructor, prevent memory leak */ + + free(wavetable->trig) ; + free(wavetable) ; + + GSL_ERROR_VAL ("overflowed trigonometric lookup table", GSL_ESANITY, 0); + } + + return wavetable; +} + + +void +FUNCTION(gsl_fft_halfcomplex_wavetable,free) (TYPE(gsl_fft_halfcomplex_wavetable) * wavetable) +{ + RETURN_IF_NULL (wavetable); + /* release trigonometric lookup tables */ + + free (wavetable->trig); + wavetable->trig = NULL; + + free (wavetable); +} + diff --git a/software/gsl-1.15/fft/hc_main.c b/software/gsl-1.15/fft/hc_main.c new file mode 100644 index 000000000..b34aa2db7 --- /dev/null +++ b/software/gsl-1.15/fft/hc_main.c @@ -0,0 +1,188 @@ +/* fft/hc_main.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include +#include +#include + +#include "hc_pass.h" + +int +FUNCTION(gsl_fft_halfcomplex,backward) (BASE data[], const size_t stride, + const size_t n, + const TYPE(gsl_fft_halfcomplex_wavetable) * wavetable, + TYPE(gsl_fft_real_workspace) * work) +{ + int status = FUNCTION(gsl_fft_halfcomplex,transform) (data, stride, n, wavetable, work) ; + return status ; +} + +int +FUNCTION(gsl_fft_halfcomplex,inverse) (BASE data[], const size_t stride, + const size_t n, + const TYPE(gsl_fft_halfcomplex_wavetable) * wavetable, + TYPE(gsl_fft_real_workspace) * work) +{ + int status = FUNCTION(gsl_fft_halfcomplex,transform) (data, stride, n, wavetable, work); + + if (status) + { + return status; + } + + /* normalize inverse fft with 1/n */ + + { + const double norm = 1.0 / n; + size_t i; + for (i = 0; i < n; i++) + { + data[stride*i] *= norm; + } + } + return status; +} + +int +FUNCTION(gsl_fft_halfcomplex,transform) (BASE data[], const size_t stride, const size_t n, + const TYPE(gsl_fft_halfcomplex_wavetable) * wavetable, + TYPE(gsl_fft_real_workspace) * work) +{ + BASE * const scratch = work->scratch; + + BASE * in; + BASE * out; + size_t istride, ostride ; + + + size_t factor, product, q; + size_t i; + size_t nf; + int state; + int product_1; + int tskip; + TYPE(gsl_complex) *twiddle1, *twiddle2, *twiddle3, *twiddle4; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + if (n == 1) + { /* FFT of one data point is the identity */ + return 0; + } + + if (n != wavetable->n) + { + GSL_ERROR ("wavetable does not match length of data", GSL_EINVAL); + } + + if (n != work->n) + { + GSL_ERROR ("workspace does not match length of data", GSL_EINVAL); + } + + nf = wavetable->nf; + product = 1; + state = 0; + + for (i = 0; i < nf; i++) + { + factor = wavetable->factor[i]; + product_1 = product; + product *= factor; + q = n / product; + + tskip = (q + 1) / 2 - 1; + + if (state == 0) + { + in = data; + istride = stride; + out = scratch; + ostride = 1; + state = 1; + } + else + { + in = scratch; + istride = 1; + out = data; + ostride = stride; + state = 0; + } + + if (factor == 2) + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_halfcomplex,pass_2) (in, istride, out, ostride, + product, n, twiddle1); + } + else if (factor == 3) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + FUNCTION(fft_halfcomplex,pass_3) (in, istride, out, ostride, + product, n, twiddle1, twiddle2); + } + else if (factor == 4) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + twiddle3 = twiddle2 + tskip; + FUNCTION(fft_halfcomplex,pass_4) (in, istride, out, ostride, + product, n, twiddle1, twiddle2, + twiddle3); + } + else if (factor == 5) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + twiddle3 = twiddle2 + tskip; + twiddle4 = twiddle3 + tskip; + FUNCTION(fft_halfcomplex,pass_5) (in, istride, out, ostride, + product, n, twiddle1, twiddle2, + twiddle3, twiddle4); + } + else + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_halfcomplex,pass_n) (in, istride, out, ostride, + factor, product, n, twiddle1); + } + } + + if (state == 1) /* copy results back from scratch to data */ + { + for (i = 0; i < n; i++) + { + data[stride*i] = scratch[i] ; + } + } + + return 0; + +} + + diff --git a/software/gsl-1.15/fft/hc_pass.h b/software/gsl-1.15/fft/hc_pass.h new file mode 100644 index 000000000..245e6ee4f --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass.h @@ -0,0 +1,76 @@ +/* fft/hc_pass.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "complex_internal.h" + +static void +FUNCTION(fft_halfcomplex,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); + +static void +FUNCTION(fft_halfcomplex,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[]); + +static void +FUNCTION(fft_halfcomplex,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]); + +static void +FUNCTION(fft_halfcomplex,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]); + +static void +FUNCTION(fft_halfcomplex,pass_n) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); + + + + diff --git a/software/gsl-1.15/fft/hc_pass_2.c b/software/gsl-1.15/fft/hc_pass_2.c new file mode 100644 index 000000000..a65e7e067 --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass_2.c @@ -0,0 +1,106 @@ +/* fft/hc_pass_2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_halfcomplex,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + size_t i, j, k, k1, jump; + size_t factor, q, m, product_1; + i = 0; + j = 0; + + factor = 2; + m = n / factor; + q = n / product; + product_1 = product / factor; + jump = (factor - 1) * q; + + for (k1 = 0; k1 < product_1; k1++) + { + const ATOMIC r0 = VECTOR(in,istride,2 * k1 * q); + const ATOMIC r1 = VECTOR(in,istride,2 * k1 * q + 2 * q - 1); + + const ATOMIC s0 = r0 + r1; + const ATOMIC s1 = r0 - r1; + + VECTOR(out,ostride,q * k1) = s0; + VECTOR(out,ostride,q * k1 + m) = s1; + } + + if (q == 1) + return; + + for (k = 1; k < (q + 1) / 2; k++) + { + const ATOMIC w_real = GSL_REAL(twiddle[k - 1]); + const ATOMIC w_imag = GSL_IMAG(twiddle[k - 1]); + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 2 * k1 * q + 2 * k - 1; + const size_t from1 = 2 * k1 * q - 2 * k + 2 * q - 1; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + /* compute x = W(2) z */ + + /* x0 = z0 + z1 */ + const ATOMIC x0_real = z0_real + z1_real; + const ATOMIC x0_imag = z0_imag - z1_imag; + + /* x1 = z0 - z1 */ + const ATOMIC x1_real = z0_real - z1_real; + const ATOMIC x1_imag = z0_imag + z1_imag; + + const size_t to0 = k1 * q + 2 * k - 1; + const size_t to1 = to0 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + VECTOR(out,ostride,to1) = w_real * x1_real - w_imag * x1_imag; + VECTOR(out,ostride,to1 + 1) = w_imag * x1_real + w_real * x1_imag; + + } + } + + if (q % 2 == 1) + return; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 2 * k1 * q + q - 1; + const size_t to0 = k1 * q + q - 1; + const size_t to1 = to0 + m; + + VECTOR(out,ostride,to0) = 2 * VECTOR(in,istride,from0); + VECTOR(out,ostride,to1) = -2 * VECTOR(in,istride,from0 + 1); + } + return; +} diff --git a/software/gsl-1.15/fft/hc_pass_3.c b/software/gsl-1.15/fft/hc_pass_3.c new file mode 100644 index 000000000..54f238db3 --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass_3.c @@ -0,0 +1,162 @@ +/* fft/hc_pass_3.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_halfcomplex,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[]) +{ + size_t i, j, k, k1, jump; + size_t factor, q, m, product_1; + + ATOMIC tau = sqrt (3.0) / 2.0; + + i = 0; + j = 0; + + factor = 3; + m = n / factor; + q = n / product; + product_1 = product / factor; + jump = (factor - 1) * q; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 3 * k1 * q; + const size_t from1 = from0 + 2 * q - 1; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC t1_real = 2 * z1_real; + const ATOMIC t2_real = z0_real - z1_real; + const ATOMIC t3_imag = 2 * tau * z1_imag; + + const size_t to0 = q * k1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + + VECTOR(out,ostride,to0) = z0_real + t1_real; + VECTOR(out,ostride,to1) = t2_real - t3_imag; + VECTOR(out,ostride,to2) = t2_real + t3_imag; + + } + + if (q == 1) + return; + + for (k = 1; k < (q + 1) / 2; k++) + { + const ATOMIC w1_real = GSL_REAL(twiddle1[k - 1]); + const ATOMIC w1_imag = GSL_IMAG(twiddle1[k - 1]); + const ATOMIC w2_real = GSL_REAL(twiddle2[k - 1]); + const ATOMIC w2_imag = GSL_IMAG(twiddle2[k - 1]); + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 3 * k1 * q + 2 * k - 1; + const size_t from1 = from0 + 2 * q; + const size_t from2 = 3 * k1 * q - 2 * k + 2 * q - 1; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z2_imag = -VECTOR(in,istride,from2 + 1); + + /* compute x = W(3) z */ + + /* t1 = z1 + z2 */ + const ATOMIC t1_real = z1_real + z2_real; + const ATOMIC t1_imag = z1_imag + z2_imag; + + /* t2 = z0 - t1/2 */ + const ATOMIC t2_real = z0_real - t1_real / 2.0; + const ATOMIC t2_imag = z0_imag - t1_imag / 2.0; + + /* t3 = sin(pi/3)*(z1 - z2) */ + const ATOMIC t3_real = tau * (z1_real - z2_real); + const ATOMIC t3_imag = tau * (z1_imag - z2_imag); + + /* x0 = z0 + t1 */ + const ATOMIC x0_real = z0_real + t1_real; + const ATOMIC x0_imag = z0_imag + t1_imag; + + /* x1 = t2 + i t3 */ + const ATOMIC x1_real = t2_real - t3_imag; + const ATOMIC x1_imag = t2_imag + t3_real; + + /* x2 = t2 - i t3 */ + const ATOMIC x2_real = t2_real + t3_imag; + const ATOMIC x2_imag = t2_imag - t3_real; + + const size_t to0 = k1 * q + 2 * k - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + VECTOR(out,ostride,to1) = w1_real * x1_real - w1_imag * x1_imag; + VECTOR(out,ostride,to1 + 1) = w1_imag * x1_real + w1_real * x1_imag; + + VECTOR(out,ostride,to2) = w2_real * x2_real - w2_imag * x2_imag; + VECTOR(out,ostride,to2 + 1) = w2_imag * x2_real + w2_real * x2_imag; + + } + } + + if (q % 2 == 1) + return; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 3 * k1 * q + q - 1; + const size_t from1 = from0 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + const ATOMIC z1_real = VECTOR(in,istride,from1); + + const ATOMIC t1_real = z0_real - z1_real; + const ATOMIC t2_real = 2 * tau * z0_imag; + + const ATOMIC x0_real = 2 * z0_real + z1_real; + const ATOMIC x1_real = t1_real - t2_real; + const ATOMIC x2_real = -t1_real - t2_real; + + const size_t to0 = k1 * q + q - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to2) = x2_real; + } + return; +} diff --git a/software/gsl-1.15/fft/hc_pass_4.c b/software/gsl-1.15/fft/hc_pass_4.c new file mode 100644 index 000000000..5e0da6c63 --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass_4.c @@ -0,0 +1,189 @@ +/* fft/hc_pass_4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_halfcomplex,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]) +{ + size_t i, j, k, k1, jump; + size_t factor, q, m, product_1; + + i = 0; + j = 0; + + factor = 4; + m = n / factor; + q = n / product; + product_1 = product / factor; + jump = (factor - 1) * q; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 4 * k1 * q; + const size_t from1 = from0 + 2 * q - 1; + const size_t from2 = from1 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + + const ATOMIC t1_real = z0_real + z2_real; + const ATOMIC t2_real = 2 * z1_real; + const ATOMIC t3_real = z0_real - z2_real; + const ATOMIC t4_imag = 2 * z1_imag; + + const size_t to0 = q * k1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + + VECTOR(out,ostride,to0) = t1_real + t2_real; + VECTOR(out,ostride,to1) = t3_real - t4_imag; + VECTOR(out,ostride,to2) = t1_real - t2_real; + VECTOR(out,ostride,to3) = t3_real + t4_imag; + } + + if (q == 1) + return; + + for (k = 1; k < (q + 1) / 2; k++) + { + const ATOMIC w1_real = GSL_REAL(twiddle1[k - 1]); + const ATOMIC w1_imag = GSL_IMAG(twiddle1[k - 1]); + const ATOMIC w2_real = GSL_REAL(twiddle2[k - 1]); + const ATOMIC w2_imag = GSL_IMAG(twiddle2[k - 1]); + const ATOMIC w3_real = GSL_REAL(twiddle3[k - 1]); + const ATOMIC w3_imag = GSL_IMAG(twiddle3[k - 1]); + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 4 * k1 * q + 2 * k - 1; + const size_t from1 = from0 + 2 * q; + const size_t from2 = 4 * k1 * q - 2 * k + 2 * q - 1; + const size_t from3 = from2 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC z2_real = VECTOR(in,istride,from3); + const ATOMIC z2_imag = -VECTOR(in,istride,from3 + 1); + + const ATOMIC z3_real = VECTOR(in,istride,from2); + const ATOMIC z3_imag = -VECTOR(in,istride,from2 + 1); + + /* compute x = W(4) z */ + + /* t1 = z0 + z2 */ + const ATOMIC t1_real = z0_real + z2_real; + const ATOMIC t1_imag = z0_imag + z2_imag; + + /* t2 = z1 + z3 */ + const ATOMIC t2_real = z1_real + z3_real; + const ATOMIC t2_imag = z1_imag + z3_imag; + + /* t3 = z0 - z2 */ + const ATOMIC t3_real = z0_real - z2_real; + const ATOMIC t3_imag = z0_imag - z2_imag; + + /* t4 = (z1 - z3) */ + const ATOMIC t4_real = (z1_real - z3_real); + const ATOMIC t4_imag = (z1_imag - z3_imag); + + /* x0 = t1 + t2 */ + const ATOMIC x0_real = t1_real + t2_real; + const ATOMIC x0_imag = t1_imag + t2_imag; + + /* x1 = t3 + i t4 */ + const ATOMIC x1_real = t3_real - t4_imag; + const ATOMIC x1_imag = t3_imag + t4_real; + + /* x2 = t1 - t2 */ + const ATOMIC x2_real = t1_real - t2_real; + const ATOMIC x2_imag = t1_imag - t2_imag; + + /* x3 = t3 - i t4 */ + const ATOMIC x3_real = t3_real + t4_imag; + const ATOMIC x3_imag = t3_imag - t4_real; + + const size_t to0 = k1 * q + 2 * k - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + VECTOR(out,ostride,to1) = w1_real * x1_real - w1_imag * x1_imag; + VECTOR(out,ostride,to1 + 1) = w1_imag * x1_real + w1_real * x1_imag; + + VECTOR(out,ostride,to2) = w2_real * x2_real - w2_imag * x2_imag; + VECTOR(out,ostride,to2 + 1) = w2_imag * x2_real + w2_real * x2_imag; + + /* to3 = w3 * x3 */ + VECTOR(out,ostride,to3) = w3_real * x3_real - w3_imag * x3_imag; + VECTOR(out,ostride,to3 + 1) = w3_real * x3_imag + w3_imag * x3_real; + + } + } + + if (q % 2 == 1) + return; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 4 * k1 * q + q - 1; + const size_t from1 = from0 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC t1_real = sqrt (2.0) * (z0_imag + z1_imag); + const ATOMIC t2_real = sqrt (2.0) * (z0_real - z1_real); + + const ATOMIC x0_real = 2 * (z0_real + z1_real); + const ATOMIC x1_real = t2_real - t1_real; + const ATOMIC x2_real = 2 * (z1_imag - z0_imag); + const ATOMIC x3_real = -(t2_real + t1_real); + + const size_t to0 = k1 * q + q - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to3) = x3_real; + } + return; +} diff --git a/software/gsl-1.15/fft/hc_pass_5.c b/software/gsl-1.15/fft/hc_pass_5.c new file mode 100644 index 000000000..e08eb3910 --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass_5.c @@ -0,0 +1,264 @@ +/* fft/hc_pass_5.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_halfcomplex,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]) +{ + + size_t i, j, k, k1, jump; + size_t factor, q, m, product_1; + + const ATOMIC sina = sin (2.0 * M_PI / 5.0); + const ATOMIC sinb = sin (2.0 * M_PI / 10.0); + + i = 0; + j = 0; + + factor = 5; + m = n / factor; + q = n / product; + product_1 = product / factor; + jump = (factor - 1) * q; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 5 * k1 * q; + const size_t from1 = from0 + 2 * q - 1; + const size_t from2 = from1 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z2_imag = VECTOR(in,istride,from2 + 1); + + const ATOMIC t1_real = 2 * (z1_real + z2_real); + const ATOMIC t2_real = 2 * (sqrt (5.0) / 4.0) * (z1_real - z2_real); + const ATOMIC t3_real = z0_real - t1_real / 4.0; + const ATOMIC t4_real = t2_real + t3_real; + const ATOMIC t5_real = -t2_real + t3_real; + const ATOMIC t6_imag = 2 * (sina * z1_imag + sinb * z2_imag); + const ATOMIC t7_imag = 2 * (sinb * z1_imag - sina * z2_imag); + + const ATOMIC x0_real = z0_real + t1_real; + const ATOMIC x1_real = t4_real - t6_imag; + const ATOMIC x2_real = t5_real - t7_imag; + const ATOMIC x3_real = t5_real + t7_imag; + const ATOMIC x4_real = t4_real + t6_imag; + + const size_t to0 = q * k1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + const size_t to4 = to3 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to3) = x3_real; + VECTOR(out,ostride,to4) = x4_real; + } + + if (q == 1) + return; + + for (k = 1; k < (q + 1) / 2; k++) + { + const ATOMIC w1_real = GSL_REAL(twiddle1[k - 1]); + const ATOMIC w1_imag = GSL_IMAG(twiddle1[k - 1]); + const ATOMIC w2_real = GSL_REAL(twiddle2[k - 1]); + const ATOMIC w2_imag = GSL_IMAG(twiddle2[k - 1]); + const ATOMIC w3_real = GSL_REAL(twiddle3[k - 1]); + const ATOMIC w3_imag = GSL_IMAG(twiddle3[k - 1]); + const ATOMIC w4_real = GSL_REAL(twiddle4[k - 1]); + const ATOMIC w4_imag = GSL_IMAG(twiddle4[k - 1]); + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 5 * k1 * q + 2 * k - 1; + const size_t from1 = from0 + 2 * q; + const size_t from2 = from1 + 2 * q; + const size_t from3 = 5 * k1 * q - 2 * k + 2 * q - 1; + const size_t from4 = from3 + 2 * q; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z2_imag = VECTOR(in,istride,from2 + 1); + + const ATOMIC z3_real = VECTOR(in,istride,from4); + const ATOMIC z3_imag = -VECTOR(in,istride,from4 + 1); + + const ATOMIC z4_real = VECTOR(in,istride,from3); + const ATOMIC z4_imag = -VECTOR(in,istride,from3 + 1); + + /* compute x = W(5) z */ + + /* t1 = z1 + z4 */ + const ATOMIC t1_real = z1_real + z4_real; + const ATOMIC t1_imag = z1_imag + z4_imag; + + /* t2 = z2 + z3 */ + const ATOMIC t2_real = z2_real + z3_real; + const ATOMIC t2_imag = z2_imag + z3_imag; + + /* t3 = z1 - z4 */ + const ATOMIC t3_real = z1_real - z4_real; + const ATOMIC t3_imag = z1_imag - z4_imag; + + /* t4 = z2 - z3 */ + const ATOMIC t4_real = z2_real - z3_real; + const ATOMIC t4_imag = z2_imag - z3_imag; + + /* t5 = t1 + t2 */ + const ATOMIC t5_real = t1_real + t2_real; + const ATOMIC t5_imag = t1_imag + t2_imag; + + /* t6 = (sqrt(5)/4)(t1 - t2) */ + const ATOMIC t6_real = (sqrt (5.0) / 4.0) * (t1_real - t2_real); + const ATOMIC t6_imag = (sqrt (5.0) / 4.0) * (t1_imag - t2_imag); + + /* t7 = z0 - ((t5)/4) */ + const ATOMIC t7_real = z0_real - t5_real / 4.0; + const ATOMIC t7_imag = z0_imag - t5_imag / 4.0; + + /* t8 = t7 + t6 */ + const ATOMIC t8_real = t7_real + t6_real; + const ATOMIC t8_imag = t7_imag + t6_imag; + + /* t9 = t7 - t6 */ + const ATOMIC t9_real = t7_real - t6_real; + const ATOMIC t9_imag = t7_imag - t6_imag; + + /* t10 = sin(2 pi/5) t3 + sin(2 pi/10) t4 */ + const ATOMIC t10_real = sina * t3_real + sinb * t4_real; + const ATOMIC t10_imag = sina * t3_imag + sinb * t4_imag; + + /* t11 = sin(2 pi/10) t3 - sin(2 pi/5) t4 */ + const ATOMIC t11_real = sinb * t3_real - sina * t4_real; + const ATOMIC t11_imag = sinb * t3_imag - sina * t4_imag; + + /* x0 = z0 + t5 */ + const ATOMIC x0_real = z0_real + t5_real; + const ATOMIC x0_imag = z0_imag + t5_imag; + + /* x1 = t8 + i t10 */ + const ATOMIC x1_real = t8_real - t10_imag; + const ATOMIC x1_imag = t8_imag + t10_real; + + /* x2 = t9 + i t11 */ + const ATOMIC x2_real = t9_real - t11_imag; + const ATOMIC x2_imag = t9_imag + t11_real; + + /* x3 = t9 - i t11 */ + const ATOMIC x3_real = t9_real + t11_imag; + const ATOMIC x3_imag = t9_imag - t11_real; + + /* x4 = t8 - i t10 */ + const ATOMIC x4_real = t8_real + t10_imag; + const ATOMIC x4_imag = t8_imag - t10_real; + + const size_t to0 = k1 * q + 2 * k - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + const size_t to4 = to3 + m; + + /* apply twiddle factors */ + + /* to0 = 1 * x0 */ + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + /* to1 = w1 * x1 */ + VECTOR(out,ostride,to1) = w1_real * x1_real - w1_imag * x1_imag; + VECTOR(out,ostride,to1 + 1) = w1_real * x1_imag + w1_imag * x1_real; + + /* to2 = w2 * x2 */ + VECTOR(out,ostride,to2) = w2_real * x2_real - w2_imag * x2_imag; + VECTOR(out,ostride,to2 + 1) = w2_real * x2_imag + w2_imag * x2_real; + + /* to3 = w3 * x3 */ + VECTOR(out,ostride,to3) = w3_real * x3_real - w3_imag * x3_imag; + VECTOR(out,ostride,to3 + 1) = w3_real * x3_imag + w3_imag * x3_real; + + /* to4 = w4 * x4 */ + VECTOR(out,ostride,to4) = w4_real * x4_real - w4_imag * x4_imag; + VECTOR(out,ostride,to4 + 1) = w4_real * x4_imag + w4_imag * x4_real; + } + } + + if (q % 2 == 1) + return; + + for (k1 = 0; k1 < product_1; k1++) + { + const size_t from0 = 5 * k1 * q + q - 1; + const size_t from1 = from0 + 2 * q; + const size_t from2 = from1 + 2 * q; + + const ATOMIC z0_real = 2 * VECTOR(in,istride,from0); + const ATOMIC z0_imag = 2 * VECTOR(in,istride,from0 + 1); + + const ATOMIC z1_real = 2 * VECTOR(in,istride,from1); + const ATOMIC z1_imag = 2 * VECTOR(in,istride,from1 + 1); + + const ATOMIC z2_real = VECTOR(in,istride,from2); + + const ATOMIC t1_real = z0_real + z1_real; + const ATOMIC t2_real = (t1_real / 4.0) - z2_real; + const ATOMIC t3_real = (sqrt (5.0) / 4.0) * (z0_real - z1_real); + const ATOMIC t4_real = sinb * z0_imag + sina * z1_imag; + const ATOMIC t5_real = sina * z0_imag - sinb * z1_imag; + const ATOMIC t6_real = t3_real + t2_real; + const ATOMIC t7_real = t3_real - t2_real; + + const ATOMIC x0_real = t1_real + z2_real; + const ATOMIC x1_real = t6_real - t4_real; + const ATOMIC x2_real = t7_real - t5_real; + const ATOMIC x3_real = -t7_real - t5_real; + const ATOMIC x4_real = -t6_real - t4_real; + + const size_t to0 = k1 * q + q - 1; + const size_t to1 = to0 + m; + const size_t to2 = to1 + m; + const size_t to3 = to2 + m; + const size_t to4 = to3 + m; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to3) = x3_real; + VECTOR(out,ostride,to4) = x4_real; + } + return; +} diff --git a/software/gsl-1.15/fft/hc_pass_n.c b/software/gsl-1.15/fft/hc_pass_n.c new file mode 100644 index 000000000..28fad88fd --- /dev/null +++ b/software/gsl-1.15/fft/hc_pass_n.c @@ -0,0 +1,257 @@ +/* fft/hc_pass_n.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_halfcomplex,pass_n) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + + size_t k, k1; + + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + size_t e1, e2; + + const double d_theta = 2.0 * M_PI / ((double) factor); + const ATOMIC cos_d_theta = cos (d_theta); + const ATOMIC sin_d_theta = sin (d_theta); + + for (k1 = 0; k1 < product_1; k1++) + { + /* compute z = W(factor) x, for x halfcomplex */ + + ATOMIC dw_real = 1.0, dw_imag = 0.0; + + for (e1 = 0; e1 < factor; e1++) + { + ATOMIC sum_real = 0.0; + ATOMIC w_real = 1.0, w_imag = 0.0; + + if (e1 > 0) + { + ATOMIC tmp_real = dw_real * cos_d_theta - dw_imag * sin_d_theta; + ATOMIC tmp_imag = dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = tmp_real; + dw_imag = tmp_imag; + } + + for (e2 = 0; e2 <= factor - e2; e2++) + { + ATOMIC z_real, z_imag; + + if (e2 > 0) + { + ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + if (e2 == 0) + { + size_t from_idx = factor * k1 * q; + z_real = VECTOR(in,istride,from_idx); + z_imag = 0.0; + sum_real += w_real * z_real - w_imag * z_imag; + } + else if (e2 == factor - e2) + { + size_t from_idx = factor * q * k1 + 2 * e2 * q - 1; + z_real = VECTOR(in,istride,from_idx); + z_imag = 0.0; + sum_real += w_real * z_real; + } + else + { + size_t from_idx = factor * q * k1 + 2 * e2 * q - 1; + z_real = VECTOR(in,istride,from_idx); + z_imag = VECTOR(in,istride,from_idx + 1); + sum_real += 2 * (w_real * z_real - w_imag * z_imag); + } + + } + + { + const size_t to_idx = q * k1 + e1 * m; + VECTOR(out,ostride,to_idx) = sum_real; + } + } + } + + if (q == 1) + return; + + for (k = 1; k < (q + 1) / 2; k++) + { + for (k1 = 0; k1 < product_1; k1++) + { + + ATOMIC dw_real = 1.0, dw_imag = 0.0; + + for (e1 = 0; e1 < factor; e1++) + { + ATOMIC z_real, z_imag; + ATOMIC sum_real = 0.0; + ATOMIC sum_imag = 0.0; + ATOMIC w_real = 1.0, w_imag = 0.0; + + if (e1 > 0) + { + ATOMIC t_real = dw_real * cos_d_theta - dw_imag * sin_d_theta; + ATOMIC t_imag = dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = t_real; + dw_imag = t_imag; + } + + for (e2 = 0; e2 < factor; e2++) + { + + if (e2 > 0) + { + ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + if (e2 < factor - e2) + { + const size_t from0 = factor * k1 * q + 2 * k + 2 * e2 * q - 1; + z_real = VECTOR(in,istride,from0); + z_imag = VECTOR(in,istride,from0 + 1); + } + else + { + const size_t from0 = factor * k1 * q - 2 * k + 2 * (factor - e2) * q - 1; + z_real = VECTOR(in,istride,from0); + z_imag = -VECTOR(in,istride,from0 + 1); + } + + sum_real += w_real * z_real - w_imag * z_imag; + sum_imag += w_real * z_imag + w_imag * z_real; + } + + if (k == 0 || e1 == 0) + { + w_real = 1.0; + w_imag = 0.0; + } + else + { + size_t tskip = (q + 1) / 2 - 1; + w_real = GSL_REAL(twiddle[k - 1 + tskip * (e1 - 1)]); + w_imag = GSL_IMAG(twiddle[k - 1 + tskip * (e1 - 1)]); + } + + { + const size_t to0 = k1 * q + 2 * k + e1 * m - 1; + VECTOR(out,ostride,to0) = w_real * sum_real - w_imag * sum_imag; + VECTOR(out,ostride,to0 + 1) = w_real * sum_imag + w_imag * sum_real; + } + + } + } + } + + + if (q % 2 == 1) + return; + + { + double tw_arg = M_PI / ((double) factor); + ATOMIC cos_tw_arg = cos (tw_arg); + ATOMIC sin_tw_arg = sin (tw_arg); + + for (k1 = 0; k1 < product_1; k1++) + { + + ATOMIC dw_real = 1.0, dw_imag = 0.0; + ATOMIC tw_real = 1.0, tw_imag = 0.0; + + for (e1 = 0; e1 < factor; e1++) + { + ATOMIC w_real, w_imag, z_real, z_imag; + + ATOMIC sum_real = 0.0; + + if (e1 > 0) + { + ATOMIC tmp_real = tw_real * cos_tw_arg - tw_imag * sin_tw_arg; + ATOMIC tmp_imag = tw_real * sin_tw_arg + tw_imag * cos_tw_arg; + tw_real = tmp_real; + tw_imag = tmp_imag; + } + + w_real = tw_real; + w_imag = tw_imag; + + if (e1 > 0) + { + ATOMIC t_real = dw_real * cos_d_theta - dw_imag * sin_d_theta; + ATOMIC t_imag = dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = t_real; + dw_imag = t_imag; + } + + for (e2 = 0; e2 <= factor - e2 - 1; e2++) + { + + if (e2 > 0) + { + ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + + if (e2 == factor - e2 - 1) + { + const size_t from0 = factor * k1 * q + q + 2 * e2 * q - 1; + z_real = VECTOR(in,istride,from0); + z_imag = 0.0; + sum_real += w_real * z_real - w_imag * z_imag; + } + else + { + const size_t from0 = factor * k1 * q + q + 2 * e2 * q - 1; + z_real = VECTOR(in,istride,from0); + z_imag = VECTOR(in,istride,from0 + 1); + sum_real += 2 * (w_real * z_real - w_imag * z_imag); + } + + } + + { + const size_t to0 = k1 * q + q + e1 * m - 1; + VECTOR(out,ostride,to0) = sum_real; + } + } + } + } + return; +} diff --git a/software/gsl-1.15/fft/hc_radix2.c b/software/gsl-1.15/fft/hc_radix2.c new file mode 100644 index 000000000..692fb546e --- /dev/null +++ b/software/gsl-1.15/fft/hc_radix2.c @@ -0,0 +1,173 @@ +/* fft/hc_radix2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_fft_halfcomplex,radix2_backward) (BASE data[], + const size_t stride, + const size_t n) +{ + int status = FUNCTION(gsl_fft_halfcomplex,radix2_transform) (data, stride, n) ; + return status ; +} + +int +FUNCTION(gsl_fft_halfcomplex,radix2_inverse) (BASE data[], + const size_t stride, + const size_t n) +{ + int status = FUNCTION(gsl_fft_halfcomplex,radix2_transform) (data, stride, n); + + if (status) + { + return status; + } + + /* normalize inverse fft with 1/n */ + + { + const ATOMIC norm = 1.0 / n; + size_t i; + for (i = 0; i < n; i++) + { + data[stride*i] *= norm; + } + } + return status; +} + +int +FUNCTION(gsl_fft_halfcomplex,radix2_transform) (BASE data[], + const size_t stride, + const size_t n) +{ + int result ; + size_t p, p_1, q; + size_t i; + size_t logn = 0; + int status; + + if (n == 1) /* identity operation */ + { + return 0 ; + } + + /* make sure that n is a power of 2 */ + + result = fft_binary_logn(n) ; + + if (result == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + else + { + logn = result ; + } + + /* apply fft recursion */ + + p = n; q = 1 ; p_1 = n/2 ; + + for (i = 1; i <= logn; i++) + { + size_t a, b; + + /* a = 0 */ + + for (b = 0; b < q; b++) + { + const ATOMIC z0 = VECTOR(data,stride,b*p); + const ATOMIC z1 = VECTOR(data,stride,b*p + p_1); + + const ATOMIC t0_real = z0 + z1 ; + const ATOMIC t1_real = z0 - z1 ; + + VECTOR(data,stride,b*p) = t0_real; + VECTOR(data,stride,b*p + p_1) = t1_real ; + } + + /* a = 1 ... p_{i-1}/2 - 1 */ + + { + ATOMIC w_real = 1.0; + ATOMIC w_imag = 0.0; + + const ATOMIC theta = 2.0 * M_PI / p; + + const ATOMIC s = sin (theta); + const ATOMIC t = sin (theta / 2.0); + const ATOMIC s2 = 2.0 * t * t; + + for (a = 1; a < (p_1)/2; a++) + { + /* trignometric recurrence for w-> exp(i theta) w */ + + { + const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; + const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; + w_real = tmp_real; + w_imag = tmp_imag; + } + + for (b = 0; b < q; b++) + { + ATOMIC z0_real = VECTOR(data,stride,b*p + a) ; + ATOMIC z0_imag = VECTOR(data,stride,b*p + p - a) ; + ATOMIC z1_real = VECTOR(data,stride,b*p + p_1 - a) ; + ATOMIC z1_imag = -VECTOR(data,stride,b*p + p_1 + a) ; + + /* t0 = z0 + z1 */ + + ATOMIC t0_real = z0_real + z1_real; + ATOMIC t0_imag = z0_imag + z1_imag; + + /* t1 = (z0 - z1) */ + + ATOMIC t1_real = z0_real - z1_real; + ATOMIC t1_imag = z0_imag - z1_imag; + + VECTOR(data,stride,b*p + a) = t0_real ; + VECTOR(data,stride,b*p + p_1 - a) = t0_imag ; + + VECTOR(data,stride,b*p + p_1 + a) = (w_real * t1_real - w_imag * t1_imag) ; + VECTOR(data,stride,b*p + p - a) = (w_real * t1_imag + w_imag * t1_real) ; + } + } + } + + if (p_1 > 1) { + for (b = 0; b < q; b++) { + VECTOR(data,stride,b*p + p_1/2) *= 2 ; + VECTOR(data,stride,b*p + p_1 + p_1/2) *= -2 ; + } + } + + p_1 = p_1 / 2 ; + p = p / 2 ; + q = q * 2 ; + } + + /* bit reverse the ordering of output data for decimation in + frequency algorithm */ + + status = FUNCTION(fft_real,bitreverse_order)(data, stride, n, logn) ; + + return 0; + +} diff --git a/software/gsl-1.15/fft/hc_unpack.c b/software/gsl-1.15/fft/hc_unpack.c new file mode 100644 index 000000000..3f0af6014 --- /dev/null +++ b/software/gsl-1.15/fft/hc_unpack.c @@ -0,0 +1,90 @@ +/* fft/hc_unpack.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_fft_halfcomplex,unpack) (const BASE halfcomplex_coefficient[], + BASE complex_coefficient[], + const size_t stride, const size_t n) +{ + size_t i; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + REAL(complex_coefficient,stride,0) = halfcomplex_coefficient[0]; + IMAG(complex_coefficient,stride,0) = 0.0; + + for (i = 1; i < n - i; i++) + { + const ATOMIC hc_real = halfcomplex_coefficient[(2 * i - 1) * stride]; + const ATOMIC hc_imag = halfcomplex_coefficient[2 * i * stride]; + + REAL(complex_coefficient,stride,i) = hc_real; + IMAG(complex_coefficient,stride,i) = hc_imag; + REAL(complex_coefficient,stride,n - i) = hc_real; + IMAG(complex_coefficient,stride,n - i) = -hc_imag; + } + + if (i == n - i) + { + REAL(complex_coefficient,stride,i) = halfcomplex_coefficient[(n - 1) * stride]; + IMAG(complex_coefficient,stride,i) = 0.0; + } + + return 0; +} + + +int +FUNCTION(gsl_fft_halfcomplex,radix2_unpack) (const BASE halfcomplex_coefficient[], + BASE complex_coefficient[], + const size_t stride, const size_t n) +{ + size_t i; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + REAL(complex_coefficient,stride,0) = halfcomplex_coefficient[0]; + IMAG(complex_coefficient,stride,0) = 0.0; + + for (i = 1; i < n - i; i++) + { + const ATOMIC hc_real = halfcomplex_coefficient[i * stride]; + const ATOMIC hc_imag = halfcomplex_coefficient[(n - i) * stride]; + + REAL(complex_coefficient,stride,i) = hc_real; + IMAG(complex_coefficient,stride,i) = hc_imag; + REAL(complex_coefficient,stride,n - i) = hc_real; + IMAG(complex_coefficient,stride,n - i) = -hc_imag; + } + + if (i == n - i) + { + REAL(complex_coefficient,stride,i) = halfcomplex_coefficient[i * stride]; + IMAG(complex_coefficient,stride,i) = 0.0; + } + + return 0; +} + diff --git a/software/gsl-1.15/fft/real_init.c b/software/gsl-1.15/fft/real_init.c new file mode 100644 index 000000000..0900d653a --- /dev/null +++ b/software/gsl-1.15/fft/real_init.c @@ -0,0 +1,183 @@ +/* fft/real_init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE(gsl_fft_real_wavetable) * +FUNCTION(gsl_fft_real_wavetable,alloc) (size_t n) +{ + int status; + size_t i; + size_t n_factors; + size_t t, product, product_1, q; + double d_theta; + + TYPE(gsl_fft_real_wavetable) * wavetable; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + wavetable = (TYPE(gsl_fft_real_wavetable) *) + malloc(sizeof(TYPE(gsl_fft_real_wavetable))); + + if (wavetable == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + if (n == 1) + { + wavetable->trig = 0; + } + else + { + wavetable->trig = (TYPE(gsl_complex) *) + malloc ((n / 2) * sizeof (TYPE(gsl_complex))); + + if (wavetable->trig == NULL) + { + /* error in constructor, prevent memory leak */ + + free(wavetable) ; + + GSL_ERROR_VAL ("failed to allocate trigonometric lookup table", + GSL_ENOMEM, 0); + } + } + + wavetable->n = n; + + status = fft_real_factorize (n, &n_factors, wavetable->factor); + + if (status) + { + /* error in constructor, prevent memory leak */ + + free(wavetable->trig); + free(wavetable) ; + + GSL_ERROR_VAL ("factorization failed", GSL_EFACTOR, 0); + } + + wavetable->nf = n_factors; + + d_theta = 2.0 * M_PI / ((double) n); + + t = 0; + product = 1; + for (i = 0; i < wavetable->nf; i++) + { + size_t j; + const size_t factor = wavetable->factor[i]; + wavetable->twiddle[i] = wavetable->trig + t; + product_1 = product; /* product_1 = p_(i-1) */ + product *= factor; + q = n / product; + + for (j = 1; j < factor; j++) + { + size_t k; + size_t m = 0; + for (k = 1; k < (product_1 + 1) / 2; k++) + { + double theta; + m = m + j * q; + m = m % n; + theta = d_theta * m; /* d_theta*j*k*q */ + GSL_REAL(wavetable->trig[t]) = cos (theta); + GSL_IMAG(wavetable->trig[t]) = sin (theta); + + t++; + } + } + } + + if (t > (n / 2)) + { + /* error in constructor, prevent memory leak */ + + free(wavetable->trig); + free(wavetable) ; + + GSL_ERROR_VAL ("overflowed trigonometric lookup table", + GSL_ESANITY, 0); + } + + return wavetable; +} + +TYPE(gsl_fft_real_workspace) * +FUNCTION(gsl_fft_real_workspace,alloc) (size_t n) +{ + TYPE(gsl_fft_real_workspace) * workspace; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + workspace = (TYPE(gsl_fft_real_workspace) *) + malloc(sizeof(TYPE(gsl_fft_real_workspace))); + + if (workspace == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + workspace->n = n; + + workspace->scratch = (BASE *) malloc (n * sizeof (BASE)); + + if (workspace->scratch == NULL) + { + /* error in constructor, prevent memory leak */ + + free(workspace) ; + + GSL_ERROR_VAL ("failed to allocate scratch space", GSL_ENOMEM, 0); + } + + return workspace; +} + + + +void +FUNCTION(gsl_fft_real_wavetable,free) (TYPE(gsl_fft_real_wavetable) * wavetable) +{ + RETURN_IF_NULL (wavetable); + /* release trigonometric lookup tables */ + + free (wavetable->trig); + wavetable->trig = NULL; + + free (wavetable) ; +} + +void +FUNCTION(gsl_fft_real_workspace,free) (TYPE(gsl_fft_real_workspace) * workspace) +{ + RETURN_IF_NULL (workspace); + /* release scratch space */ + + free (workspace->scratch); + workspace->scratch = NULL; + + free (workspace) ; +} diff --git a/software/gsl-1.15/fft/real_main.c b/software/gsl-1.15/fft/real_main.c new file mode 100644 index 000000000..e2c2efc0b --- /dev/null +++ b/software/gsl-1.15/fft/real_main.c @@ -0,0 +1,145 @@ +/* fft/real_main.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include +#include +#include + +#include "real_pass.h" + +int +FUNCTION(gsl_fft_real,transform) (BASE data[], const size_t stride, const size_t n, + const TYPE(gsl_fft_real_wavetable) * wavetable, + TYPE(gsl_fft_real_workspace) * work) +{ + const size_t nf = wavetable->nf; + + size_t i; + + size_t q, product = 1; + size_t tskip; + size_t product_1; + + BASE *const scratch = work->scratch; + TYPE(gsl_complex) *twiddle1, *twiddle2, *twiddle3, *twiddle4; + + size_t state = 0; + BASE *in = data; + size_t istride = stride ; + BASE *out = scratch; + size_t ostride = 1 ; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + if (n == 1) + { /* FFT of one data point is the identity */ + return 0; + } + + if (n != wavetable->n) + { + GSL_ERROR ("wavetable does not match length of data", GSL_EINVAL); + } + + if (n != work->n) + { + GSL_ERROR ("workspace does not match length of data", GSL_EINVAL); + } + + for (i = 0; i < nf; i++) + { + const size_t factor = wavetable->factor[i]; + product_1 = product; + product *= factor; + q = n / product; + + tskip = (product_1 + 1) / 2 - 1; + + if (state == 0) + { + in = data; + istride = stride; + out = scratch; + ostride = 1; + state = 1; + } + else + { + in = scratch; + istride = 1; + out = data; + ostride = stride; + state = 0; + } + + if (factor == 2) + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_real,pass_2) (in, istride, out, ostride, product, n, twiddle1); + } + else if (factor == 3) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + FUNCTION(fft_real,pass_3) (in, istride, out, ostride, product, n, twiddle1, + twiddle2); + } + else if (factor == 4) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + twiddle3 = twiddle2 + tskip; + FUNCTION(fft_real,pass_4) (in, istride, out, ostride, product, n, twiddle1, + twiddle2, twiddle3); + } + else if (factor == 5) + { + twiddle1 = wavetable->twiddle[i]; + twiddle2 = twiddle1 + tskip; + twiddle3 = twiddle2 + tskip; + twiddle4 = twiddle3 + tskip; + FUNCTION(fft_real,pass_5) (in, istride, out, ostride, product, n, twiddle1, + twiddle2, twiddle3, twiddle4); + } + else + { + twiddle1 = wavetable->twiddle[i]; + FUNCTION(fft_real,pass_n) (in, istride, out, ostride, factor, product, n, + twiddle1); + } + } + + if (state == 1) /* copy results back from scratch to data */ + { + for (i = 0; i < n; i++) + { + data[stride*i] = scratch[i] ; + } + } + + return 0; + +} diff --git a/software/gsl-1.15/fft/real_pass.h b/software/gsl-1.15/fft/real_pass.h new file mode 100644 index 000000000..ff791f352 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass.h @@ -0,0 +1,65 @@ +/* fft/real_pass.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void FUNCTION(fft_real,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); + +static void FUNCTION(fft_real,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[]); + +static void FUNCTION(fft_real,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]); + +static void FUNCTION(fft_real,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]); + +static void FUNCTION(fft_real,pass_n) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]); diff --git a/software/gsl-1.15/fft/real_pass_2.c b/software/gsl-1.15/fft/real_pass_2.c new file mode 100644 index 000000000..508658238 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass_2.c @@ -0,0 +1,116 @@ +/* fft/real_pass_2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_real,pass_2) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + size_t k, k1; + + const size_t factor = 2; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1; + const size_t from1 = from0 + m; + + const ATOMIC r0 = VECTOR(in,istride,from0); + const ATOMIC r1 = VECTOR(in,istride,from1); + + const ATOMIC s0 = r0 + r1; + const ATOMIC s1 = r0 - r1; + + const size_t to0 = product * k1; + const size_t to1 = to0 + product - 1; + + VECTOR(out,ostride,to0) = s0; + VECTOR(out,ostride,to1) = s1; + } + + if (product_1 == 1) + return; + + for (k = 1; k < (product_1 + 1) / 2; k++) + { + + /* forward real transform: w -> conjugate(w) */ + const ATOMIC w_real = GSL_REAL(twiddle[k - 1]); + const ATOMIC w_imag = -GSL_IMAG(twiddle[k - 1]); + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + 2 * k - 1; + const size_t from1 = from0 + m; + + const ATOMIC f0_real = VECTOR(in,istride,from0); + const ATOMIC f0_imag = VECTOR(in,istride,from0 + 1); + + const ATOMIC f1_real = VECTOR(in,istride,from1); + const ATOMIC f1_imag = VECTOR(in,istride,from1 + 1); + + const ATOMIC z0_real = f0_real; + const ATOMIC z0_imag = f0_imag; + + const ATOMIC z1_real = w_real * f1_real - w_imag * f1_imag; + const ATOMIC z1_imag = w_real * f1_imag + w_imag * f1_real; + + /* compute x = W(2) z */ + + /* x0 = z0 + z1 */ + const ATOMIC x0_real = z0_real + z1_real; + const ATOMIC x0_imag = z0_imag + z1_imag; + + /* x1 = z0 - z1 */ + const ATOMIC x1_real = z0_real - z1_real; + const ATOMIC x1_imag = z0_imag - z1_imag; + + const size_t to0 = k1 * product + 2 * k - 1; + const size_t to1 = k1 * product + product - 2 * k - 1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + /* stored in conjugate location */ + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = -x1_imag; + } + } + + if (product_1 % 2 == 1) + return; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + product_1 - 1; + const size_t from1 = from0 + m; + const size_t to0 = k1 * product + product_1 - 1; + + VECTOR(out,ostride,to0) = VECTOR(in,istride,from0); + VECTOR(out,ostride,to0 + 1) = -VECTOR(in,istride,from1); + } + return; +} diff --git a/software/gsl-1.15/fft/real_pass_3.c b/software/gsl-1.15/fft/real_pass_3.c new file mode 100644 index 000000000..68e7d92b5 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass_3.c @@ -0,0 +1,166 @@ +/* fft/real_pass_3.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_real,pass_3) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[]) +{ + size_t k, k1; + + const size_t factor = 3; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + const ATOMIC tau = sqrt (3.0) / 2.0; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + + const ATOMIC t1 = z1_real + z2_real; + + const ATOMIC x0_real = z0_real + t1; + const ATOMIC x1_real = z0_real - t1 / 2.0; + const ATOMIC x1_imag = -tau * (z1_real - z2_real); + + const size_t to0 = product * k1; + const size_t to1 = to0 + 2 * product_1 - 1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + } + + if (product_1 == 1) + return; + + for (k = 1; k < (product_1 + 1) / 2; k++) + { + const ATOMIC w1_real = GSL_REAL(twiddle1[k - 1]); + const ATOMIC w1_imag = -GSL_IMAG(twiddle1[k - 1]); + const ATOMIC w2_real = GSL_REAL(twiddle2[k - 1]); + const ATOMIC w2_imag = -GSL_IMAG(twiddle2[k - 1]); + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + 2 * k - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + + const ATOMIC f0_real = VECTOR(in,istride,from0); + const ATOMIC f0_imag = VECTOR(in,istride,from0 + 1); + const ATOMIC f1_real = VECTOR(in,istride,from1); + const ATOMIC f1_imag = VECTOR(in,istride,from1 + 1); + const ATOMIC f2_real = VECTOR(in,istride,from2); + const ATOMIC f2_imag = VECTOR(in,istride,from2 + 1); + + const ATOMIC z0_real = f0_real; + const ATOMIC z0_imag = f0_imag; + const ATOMIC z1_real = w1_real * f1_real - w1_imag * f1_imag; + const ATOMIC z1_imag = w1_real * f1_imag + w1_imag * f1_real; + const ATOMIC z2_real = w2_real * f2_real - w2_imag * f2_imag; + const ATOMIC z2_imag = w2_real * f2_imag + w2_imag * f2_real; + + /* compute x = W(3) z */ + + /* t1 = z1 + z2 */ + const ATOMIC t1_real = z1_real + z2_real; + const ATOMIC t1_imag = z1_imag + z2_imag; + + /* t2 = z0 - t1/2 */ + const ATOMIC t2_real = z0_real - t1_real / 2; + const ATOMIC t2_imag = z0_imag - t1_imag / 2; + + /* t3 = (+/-) sin(pi/3)*(z1 - z2) */ + const ATOMIC t3_real = -tau * (z1_real - z2_real); + const ATOMIC t3_imag = -tau * (z1_imag - z2_imag); + + /* x0 = z0 + t1 */ + const ATOMIC x0_real = z0_real + t1_real; + const ATOMIC x0_imag = z0_imag + t1_imag; + + /* x1 = t2 + i t3 */ + const ATOMIC x1_real = t2_real - t3_imag; + const ATOMIC x1_imag = t2_imag + t3_real; + + /* x2 = t2 - i t3 */ + const ATOMIC x2_real = t2_real + t3_imag; + const ATOMIC x2_imag = t2_imag - t3_real; + + /* apply twiddle factors */ + + const size_t to0 = k1 * product + 2 * k - 1; + const size_t to1 = to0 + 2 * product_1; + const size_t to2 = 2 * product_1 - 2 * k + k1 * product - 1; + + /* to0 = 1 * x0 */ + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + /* to1 = 1 * x1 */ + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + + /* to2 = 1 * x2 */ + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to2 + 1) = -x2_imag; + } + } + + if (product_1 % 2 == 1) + return; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + product_1 - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + + const ATOMIC t1 = z1_real - z2_real; + const ATOMIC x0_real = z0_real + t1 / 2.0; + const ATOMIC x0_imag = -tau * (z1_real + z2_real); + const ATOMIC x1_real = z0_real - t1; + + const size_t to0 = k1 * product + product_1 - 1; + const size_t to1 = to0 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + VECTOR(out,ostride,to1) = x1_real; + } + + return; +} diff --git a/software/gsl-1.15/fft/real_pass_4.c b/software/gsl-1.15/fft/real_pass_4.c new file mode 100644 index 000000000..7821f50b9 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass_4.c @@ -0,0 +1,203 @@ +/* fft/real_pass_4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_real,pass_4) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[]) +{ + size_t k, k1; + + const size_t factor = 4; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z3_real = VECTOR(in,istride,from3); + + /* compute x = W(4) z */ + + /* t1 = z0 + z2 */ + const ATOMIC t1_real = z0_real + z2_real; + + /* t2 = z1 + z3 */ + const ATOMIC t2_real = z1_real + z3_real; + + /* t3 = z0 - z2 */ + const ATOMIC t3_real = z0_real - z2_real; + + /* t4 = - (z1 - z3) */ + const ATOMIC t4_real = -(z1_real - z3_real); + + /* x0 = t1 + t2 */ + const ATOMIC x0_real = t1_real + t2_real; + + /* x1 = t3 + i t4 */ + const ATOMIC x1_real = t3_real; + const ATOMIC x1_imag = t4_real; + + /* x2 = t1 - t2 */ + const ATOMIC x2_real = t1_real - t2_real; + + const size_t to0 = product * k1; + const size_t to1 = to0 + 2 * product_1 - 1; + const size_t to2 = to1 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + VECTOR(out,ostride,to2) = x2_real; + } + + if (product_1 == 1) + return; + + for (k = 1; k < (product_1 + 1) / 2; k++) + { + ATOMIC w1_real, w1_imag, w2_real, w2_imag, w3_real, w3_imag; + w1_real = GSL_REAL(twiddle1[k - 1]); + w1_imag = -GSL_IMAG(twiddle1[k - 1]); + w2_real = GSL_REAL(twiddle2[k - 1]); + w2_imag = -GSL_IMAG(twiddle2[k - 1]); + w3_real = GSL_REAL(twiddle3[k - 1]); + w3_imag = -GSL_IMAG(twiddle3[k - 1]); + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + 2 * k - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + + const ATOMIC f0_real = VECTOR(in,istride,from0); + const ATOMIC f0_imag = VECTOR(in,istride,from0 + 1); + const ATOMIC f1_real = VECTOR(in,istride,from1); + const ATOMIC f1_imag = VECTOR(in,istride,from1 + 1); + const ATOMIC f2_real = VECTOR(in,istride,from2); + const ATOMIC f2_imag = VECTOR(in,istride,from2 + 1); + const ATOMIC f3_real = VECTOR(in,istride,from3); + const ATOMIC f3_imag = VECTOR(in,istride,from3 + 1); + + const ATOMIC z0_real = f0_real; + const ATOMIC z0_imag = f0_imag; + const ATOMIC z1_real = w1_real * f1_real - w1_imag * f1_imag; + const ATOMIC z1_imag = w1_real * f1_imag + w1_imag * f1_real; + const ATOMIC z2_real = w2_real * f2_real - w2_imag * f2_imag; + const ATOMIC z2_imag = w2_real * f2_imag + w2_imag * f2_real; + const ATOMIC z3_real = w3_real * f3_real - w3_imag * f3_imag; + const ATOMIC z3_imag = w3_real * f3_imag + w3_imag * f3_real; + + /* compute x = W(4) z */ + + /* t1 = z0 + z2 */ + const ATOMIC t1_real = z0_real + z2_real; + const ATOMIC t1_imag = z0_imag + z2_imag; + + /* t2 = z1 + z3 */ + const ATOMIC t2_real = z1_real + z3_real; + const ATOMIC t2_imag = z1_imag + z3_imag; + + /* t3 = z0 - z2 */ + const ATOMIC t3_real = z0_real - z2_real; + const ATOMIC t3_imag = z0_imag - z2_imag; + + /* t4 = - (z1 - z3) */ + const ATOMIC t4_real = -(z1_real - z3_real); + const ATOMIC t4_imag = -(z1_imag - z3_imag); + + /* x0 = t1 + t2 */ + const ATOMIC x0_real = t1_real + t2_real; + const ATOMIC x0_imag = t1_imag + t2_imag; + + /* x1 = t3 + i t4 */ + const ATOMIC x1_real = t3_real - t4_imag; + const ATOMIC x1_imag = t3_imag + t4_real; + + /* x2 = t1 - t2 */ + const ATOMIC x2_real = t1_real - t2_real; + const ATOMIC x2_imag = t1_imag - t2_imag; + + /* x3 = t3 - i t4 */ + const ATOMIC x3_real = t3_real + t4_imag; + const ATOMIC x3_imag = t3_imag - t4_real; + + const size_t to0 = k1 * product + 2 * k - 1; + const size_t to1 = to0 + 2 * product_1; + const size_t to2 = 2 * product_1 - 2 * k + k1 * product - 1; + const size_t to3 = to2 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + + VECTOR(out,ostride,to3) = x2_real; + VECTOR(out,ostride,to3 + 1) = -x2_imag; + + VECTOR(out,ostride,to2) = x3_real; + VECTOR(out,ostride,to2 + 1) = -x3_imag; + } + } + + if (product_1 % 2 == 1) + return; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + product_1 - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + + const ATOMIC x0 = VECTOR(in,istride,from0); + const ATOMIC x1 = VECTOR(in,istride,from1); + const ATOMIC x2 = VECTOR(in,istride,from2); + const ATOMIC x3 = VECTOR(in,istride,from3); + + const ATOMIC t1 = (1.0 / sqrt (2.0)) * (x1 - x3); + const ATOMIC t2 = (1.0 / sqrt (2.0)) * (x1 + x3); + + const size_t to0 = k1 * product + 2 * k - 1; + const size_t to1 = to0 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0 + t1; + VECTOR(out,ostride,to0 + 1) = -x2 - t2; + + VECTOR(out,ostride,to1) = x0 - t1; + VECTOR(out,ostride,to1 + 1) = x2 - t2; + } + return; +} diff --git a/software/gsl-1.15/fft/real_pass_5.c b/software/gsl-1.15/fft/real_pass_5.c new file mode 100644 index 000000000..66a7b8ec3 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass_5.c @@ -0,0 +1,283 @@ +/* fft/real_pass_5.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_real,pass_5) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle1[], + const TYPE(gsl_complex) twiddle2[], + const TYPE(gsl_complex) twiddle3[], + const TYPE(gsl_complex) twiddle4[]) +{ + size_t k, k1; + + const size_t factor = 5; + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + const ATOMIC sina = sin (2.0 * M_PI / 5.0); + const ATOMIC sinb = sin (2.0 * M_PI / 10.0); + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + const size_t from4 = from3 + m; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z3_real = VECTOR(in,istride,from3); + const ATOMIC z4_real = VECTOR(in,istride,from4); + + /* t1 = z1 + z4 */ + const ATOMIC t1_real = z1_real + z4_real; + + /* t2 = z2 + z3 */ + const ATOMIC t2_real = z2_real + z3_real; + + /* t3 = z1 - z4 */ + const ATOMIC t3_real = z1_real - z4_real; + + /* t4 = z2 - z3 */ + const ATOMIC t4_real = z2_real - z3_real; + + /* t5 = t1 + t2 */ + const ATOMIC t5_real = t1_real + t2_real; + + /* t6 = (sqrt(5)/4)(t1 - t2) */ + const ATOMIC t6_real = (sqrt (5.0) / 4.0) * (t1_real - t2_real); + + /* t7 = z0 - ((t5)/4) */ + const ATOMIC t7_real = z0_real - t5_real / 4.0; + + /* t8 = t7 + t6 */ + const ATOMIC t8_real = t7_real + t6_real; + + /* t9 = t7 - t6 */ + const ATOMIC t9_real = t7_real - t6_real; + + /* t10 = -(sin(2 pi/5) t3 + sin(2 pi/10) t4 ) */ + const ATOMIC t10_real = -sina * t3_real - sinb * t4_real; + + /* t11 = -(sin(2 pi/10) t3 - sin(2 pi/5) t4) */ + const ATOMIC t11_real = -sinb * t3_real + sina * t4_real; + + /* x0 = z0 + t5 */ + const ATOMIC x0_real = z0_real + t5_real; + + /* x1 = t8 + i t10 */ + const ATOMIC x1_real = t8_real; + const ATOMIC x1_imag = t10_real; + + /* x2 = t9 + i t11 */ + const ATOMIC x2_real = t9_real; + const ATOMIC x2_imag = t11_real; + + const size_t to0 = product * k1; + const size_t to1 = to0 + 2 * product_1 - 1; + const size_t to2 = to1 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to2 + 1) = x2_imag; + } + + if (product_1 == 1) + return; + + for (k = 1; k < (product_1 + 1) / 2; k++) + { + const ATOMIC w1_real = GSL_REAL(twiddle1[k - 1]); + const ATOMIC w1_imag = -GSL_IMAG(twiddle1[k - 1]); + const ATOMIC w2_real = GSL_REAL(twiddle2[k - 1]); + const ATOMIC w2_imag = -GSL_IMAG(twiddle2[k - 1]); + const ATOMIC w3_real = GSL_REAL(twiddle3[k - 1]); + const ATOMIC w3_imag = -GSL_IMAG(twiddle3[k - 1]); + const ATOMIC w4_real = GSL_REAL(twiddle4[k - 1]); + const ATOMIC w4_imag = -GSL_IMAG(twiddle4[k - 1]); + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + 2 * k - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + const size_t from4 = from3 + m; + + const ATOMIC f0_real = VECTOR(in,istride,from0); + const ATOMIC f0_imag = VECTOR(in,istride,from0 + 1); + const ATOMIC f1_real = VECTOR(in,istride,from1); + const ATOMIC f1_imag = VECTOR(in,istride,from1 + 1); + const ATOMIC f2_real = VECTOR(in,istride,from2); + const ATOMIC f2_imag = VECTOR(in,istride,from2 + 1); + const ATOMIC f3_real = VECTOR(in,istride,from3); + const ATOMIC f3_imag = VECTOR(in,istride,from3 + 1); + const ATOMIC f4_real = VECTOR(in,istride,from4); + const ATOMIC f4_imag = VECTOR(in,istride,from4 + 1); + + const ATOMIC z0_real = f0_real; + const ATOMIC z0_imag = f0_imag; + const ATOMIC z1_real = w1_real * f1_real - w1_imag * f1_imag; + const ATOMIC z1_imag = w1_real * f1_imag + w1_imag * f1_real; + const ATOMIC z2_real = w2_real * f2_real - w2_imag * f2_imag; + const ATOMIC z2_imag = w2_real * f2_imag + w2_imag * f2_real; + const ATOMIC z3_real = w3_real * f3_real - w3_imag * f3_imag; + const ATOMIC z3_imag = w3_real * f3_imag + w3_imag * f3_real; + const ATOMIC z4_real = w4_real * f4_real - w4_imag * f4_imag; + const ATOMIC z4_imag = w4_real * f4_imag + w4_imag * f4_real; + + /* compute x = W(5) z */ + + /* t1 = z1 + z4 */ + const ATOMIC t1_real = z1_real + z4_real; + const ATOMIC t1_imag = z1_imag + z4_imag; + + /* t2 = z2 + z3 */ + const ATOMIC t2_real = z2_real + z3_real; + const ATOMIC t2_imag = z2_imag + z3_imag; + + /* t3 = z1 - z4 */ + const ATOMIC t3_real = z1_real - z4_real; + const ATOMIC t3_imag = z1_imag - z4_imag; + + /* t4 = z2 - z3 */ + const ATOMIC t4_real = z2_real - z3_real; + const ATOMIC t4_imag = z2_imag - z3_imag; + + /* t5 = t1 + t2 */ + const ATOMIC t5_real = t1_real + t2_real; + const ATOMIC t5_imag = t1_imag + t2_imag; + + /* t6 = (sqrt(5)/4)(t1 - t2) */ + const ATOMIC t6_real = (sqrt (5.0) / 4.0) * (t1_real - t2_real); + const ATOMIC t6_imag = (sqrt (5.0) / 4.0) * (t1_imag - t2_imag); + + /* t7 = z0 - ((t5)/4) */ + const ATOMIC t7_real = z0_real - t5_real / 4.0; + const ATOMIC t7_imag = z0_imag - t5_imag / 4.0; + + /* t8 = t7 + t6 */ + const ATOMIC t8_real = t7_real + t6_real; + const ATOMIC t8_imag = t7_imag + t6_imag; + + /* t9 = t7 - t6 */ + const ATOMIC t9_real = t7_real - t6_real; + const ATOMIC t9_imag = t7_imag - t6_imag; + + /* t10 = - (sin(2 pi/5) t3 + sin(2 pi/10) t4) */ + const ATOMIC t10_real = -sina * t3_real - sinb * t4_real; + const ATOMIC t10_imag = -sina * t3_imag - sinb * t4_imag; + + /* t11 = -(sin(2 pi/10) t3 - sin(2 pi/5) t4) */ + const ATOMIC t11_real = -sinb * t3_real + sina * t4_real; + const ATOMIC t11_imag = -sinb * t3_imag + sina * t4_imag; + + /* x0 = z0 + t5 */ + const ATOMIC x0_real = z0_real + t5_real; + const ATOMIC x0_imag = z0_imag + t5_imag; + + /* x1 = t8 + i t10 */ + const ATOMIC x1_real = t8_real - t10_imag; + const ATOMIC x1_imag = t8_imag + t10_real; + + /* x2 = t9 + i t11 */ + const ATOMIC x2_real = t9_real - t11_imag; + const ATOMIC x2_imag = t9_imag + t11_real; + + /* x3 = t9 - i t11 */ + const ATOMIC x3_real = t9_real + t11_imag; + const ATOMIC x3_imag = t9_imag - t11_real; + + /* x4 = t8 - i t10 */ + const ATOMIC x4_real = t8_real + t10_imag; + const ATOMIC x4_imag = t8_imag - t10_real; + + const size_t to0 = k1 * product + 2 * k - 1; + const size_t to1 = to0 + 2 * product_1; + const size_t to2 = to1 + 2 * product_1; + const size_t to3 = 2 * product_1 - 2 * k + k1 * product - 1; + const size_t to4 = to3 + 2 * product_1; + + VECTOR(out,ostride,to0) = x0_real; + VECTOR(out,ostride,to0 + 1) = x0_imag; + + VECTOR(out,ostride,to1) = x1_real; + VECTOR(out,ostride,to1 + 1) = x1_imag; + + VECTOR(out,ostride,to2) = x2_real; + VECTOR(out,ostride,to2 + 1) = x2_imag; + + VECTOR(out,ostride,to3) = x4_real; + VECTOR(out,ostride,to3 + 1) = -x4_imag; + + VECTOR(out,ostride,to4) = x3_real; + VECTOR(out,ostride,to4 + 1) = -x3_imag; + } + } + + if (product_1 % 2 == 1) + return; + + for (k1 = 0; k1 < q; k1++) + { + const size_t from0 = k1 * product_1 + product_1 - 1; + const size_t from1 = from0 + m; + const size_t from2 = from1 + m; + const size_t from3 = from2 + m; + const size_t from4 = from3 + m; + + const ATOMIC z0_real = VECTOR(in,istride,from0); + const ATOMIC z1_real = VECTOR(in,istride,from1); + const ATOMIC z2_real = VECTOR(in,istride,from2); + const ATOMIC z3_real = VECTOR(in,istride,from3); + const ATOMIC z4_real = VECTOR(in,istride,from4); + + const ATOMIC t1 = z1_real - z4_real; + const ATOMIC t2 = z1_real + z4_real; + const ATOMIC t3 = z2_real - z3_real; + const ATOMIC t4 = z2_real + z3_real; + const ATOMIC t5 = t1 - t3; + const ATOMIC t6 = z0_real + t5 / 4.0; + const ATOMIC t7 = (sqrt (5.0) / 4.0) * (t1 + t3); + + const size_t to0 = k1 * product + product_1 - 1; + const size_t to1 = to0 + 2 * product_1; + const size_t to2 = to1 + 2 * product_1; + + VECTOR(out,ostride,to0) = t6 + t7; + VECTOR(out,ostride,to0 + 1) = -sinb * t2 - sina * t4; + + VECTOR(out,ostride,to1) = t6 - t7; + VECTOR(out,ostride,to1 + 1) = -sina * t2 + sinb * t4; + + VECTOR(out,ostride,to2) = z0_real - t5; + } + + return; +} diff --git a/software/gsl-1.15/fft/real_pass_n.c b/software/gsl-1.15/fft/real_pass_n.c new file mode 100644 index 000000000..2576b00e0 --- /dev/null +++ b/software/gsl-1.15/fft/real_pass_n.c @@ -0,0 +1,264 @@ +/* fft/real_pass_n.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +FUNCTION(fft_real,pass_n) (const BASE in[], + const size_t istride, + BASE out[], + const size_t ostride, + const size_t factor, + const size_t product, + const size_t n, + const TYPE(gsl_complex) twiddle[]) +{ + size_t k, k1; + + const size_t m = n / factor; + const size_t q = n / product; + const size_t product_1 = product / factor; + + size_t e1, e2; + + const double d_theta = 2.0 * M_PI / ((double) factor); + const ATOMIC cos_d_theta = cos (d_theta); + const ATOMIC sin_d_theta = sin (d_theta); + + for (k1 = 0; k1 < q; k1++) + { + /* compute x = W(factor) z, for z real */ + + ATOMIC dw_real = 1.0, dw_imag = 0.0; + + for (e1 = 0; e1 <= factor - e1; e1++) + { + ATOMIC sum_real = 0.0; + ATOMIC sum_imag = 0.0; + + ATOMIC w_real = 1.0, w_imag = 0.0; + + if (e1 > 0) + { + ATOMIC tmp_real = dw_real * cos_d_theta + dw_imag * sin_d_theta; + ATOMIC tmp_imag = -dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = tmp_real; + dw_imag = tmp_imag; + } + + for (e2 = 0; e2 < factor; e2++) + { + ATOMIC z_real = VECTOR(in,istride,k1 * product_1 + e2 * m); + + if (e2 > 0) + { + ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + sum_real += w_real * z_real; + sum_imag += w_imag * z_real; + + } + if (e1 == 0) + { + const size_t to0 = product * k1; + VECTOR(out,ostride,to0) = sum_real; + } + else if (e1 < factor - e1) + { + const size_t to0 = k1 * product + 2 * e1 * product_1 - 1; + VECTOR(out,ostride,to0) = sum_real; + VECTOR(out,ostride,to0 + 1) = sum_imag; + } + else if (e1 == factor - e1) + { + const size_t to0 = k1 * product + 2 * e1 * product_1 - 1; + VECTOR(out,ostride,to0) = sum_real; + } + + } + } + + if (product_1 == 1) + return; + + for (k = 1; k < (product_1 + 1) / 2; k++) + { + for (k1 = 0; k1 < q; k1++) + { + + ATOMIC dw_real = 1.0, dw_imag = 0.0; + + for (e1 = 0; e1 < factor; e1++) + { + ATOMIC sum_real = 0.0, sum_imag = 0.0; + + ATOMIC w_real = 1.0, w_imag = 0.0; + + if (e1 > 0) + { + const ATOMIC tmp_real = dw_real * cos_d_theta + dw_imag * sin_d_theta; + const ATOMIC tmp_imag = -dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = tmp_real; + dw_imag = tmp_imag; + } + + for (e2 = 0; e2 < factor; e2++) + { + + int tskip = (product_1 + 1) / 2 - 1; + const size_t from0 = k1 * product_1 + 2 * k + e2 * m - 1; + ATOMIC tw_real, tw_imag; + ATOMIC z_real, z_imag; + + if (e2 == 0) + { + tw_real = 1.0; + tw_imag = 0.0; + } + else + { + const size_t t_index = (k - 1) + (e2 - 1) * tskip; + tw_real = GSL_REAL(twiddle[t_index]); + tw_imag = -GSL_IMAG(twiddle[t_index]); + } + + { + const ATOMIC f0_real = VECTOR(in,istride,from0); + const ATOMIC f0_imag = VECTOR(in,istride,from0 + 1); + + z_real = tw_real * f0_real - tw_imag * f0_imag; + z_imag = tw_real * f0_imag + tw_imag * f0_real; + } + + if (e2 > 0) + { + const ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + const ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + sum_real += w_real * z_real - w_imag * z_imag; + sum_imag += w_real * z_imag + w_imag * z_real; + } + + if (e1 < factor - e1) + { + const size_t to0 = k1 * product - 1 + 2 * e1 * product_1 + 2 * k; + VECTOR(out,ostride,to0) = sum_real; + VECTOR(out,ostride,to0 + 1) = sum_imag; + } + else + { + const size_t to0 = k1 * product - 1 + 2 * (factor - e1) * product_1 - 2 * k; + VECTOR(out,ostride,to0) = sum_real; + VECTOR(out,ostride,to0 + 1) = -sum_imag; + } + + } + } + } + + + if (product_1 % 2 == 1) + return; + + { + double tw_arg = M_PI / ((double) factor); + ATOMIC cos_tw_arg = cos (tw_arg); + ATOMIC sin_tw_arg = -sin (tw_arg); + + for (k1 = 0; k1 < q; k1++) + { + ATOMIC dw_real = 1.0, dw_imag = 0.0; + + for (e1 = 0; e1 < factor; e1++) + { + ATOMIC z_real, z_imag; + + ATOMIC sum_real = 0.0; + ATOMIC sum_imag = 0.0; + + ATOMIC w_real = 1.0, w_imag = 0.0; + ATOMIC tw_real = 1.0, tw_imag = 0.0; + + if (e1 > 0) + { + ATOMIC t_real = dw_real * cos_d_theta + dw_imag * sin_d_theta; + ATOMIC t_imag = -dw_real * sin_d_theta + dw_imag * cos_d_theta; + dw_real = t_real; + dw_imag = t_imag; + } + + for (e2 = 0; e2 < factor; e2++) + { + + if (e2 > 0) + { + ATOMIC tmp_real = tw_real * cos_tw_arg - tw_imag * sin_tw_arg; + ATOMIC tmp_imag = tw_real * sin_tw_arg + tw_imag * cos_tw_arg; + tw_real = tmp_real; + tw_imag = tmp_imag; + } + + if (e2 > 0) + { + ATOMIC tmp_real = dw_real * w_real - dw_imag * w_imag; + ATOMIC tmp_imag = dw_real * w_imag + dw_imag * w_real; + w_real = tmp_real; + w_imag = tmp_imag; + } + + + { + const size_t from0 = k1 * product_1 + 2 * k + e2 * m - 1; + const ATOMIC f0_real = VECTOR(in,istride,from0); + z_real = tw_real * f0_real; + z_imag = tw_imag * f0_real; + } + + sum_real += w_real * z_real - w_imag * z_imag; + sum_imag += w_real * z_imag + w_imag * z_real; + } + + if (e1 + 1 < factor - e1) + { + const size_t to0 = k1 * product - 1 + 2 * e1 * product_1 + 2 * k; + VECTOR(out,ostride,to0) = sum_real; + VECTOR(out,ostride,to0 + 1) = sum_imag; + } + else if (e1 + 1 == factor - e1) + { + const size_t to0 = k1 * product - 1 + 2 * e1 * product_1 + 2 * k; + VECTOR(out,ostride,to0) = sum_real; + } + else + { + const size_t to0 = k1 * product - 1 + 2 * (factor - e1) * product_1 - 2 * k; + VECTOR(out,ostride,to0) = sum_real; + VECTOR(out,ostride,to0 + 1) = -sum_imag; + } + + } + } + } + return; +} diff --git a/software/gsl-1.15/fft/real_radix2.c b/software/gsl-1.15/fft/real_radix2.c new file mode 100644 index 000000000..f03fc8335 --- /dev/null +++ b/software/gsl-1.15/fft/real_radix2.c @@ -0,0 +1,134 @@ +/* fft/real_radix2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_fft_real,radix2_transform) (BASE data[], const size_t stride, const size_t n) +{ + int result ; + size_t p, p_1, q; + size_t i; + size_t logn = 0; + int status; + + if (n == 1) /* identity operation */ + { + return 0 ; + } + + /* make sure that n is a power of 2 */ + + result = fft_binary_logn(n) ; + + if (result == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + else + { + logn = result ; + } + + /* bit reverse the ordering of input data for decimation in time algorithm */ + + status = FUNCTION(fft_real,bitreverse_order)(data, stride, n, logn) ; + + /* apply fft recursion */ + + p = 1; q = n ; + + for (i = 1; i <= logn; i++) + { + size_t a, b; + + p_1 = p ; + p = 2 * p ; + q = q / 2 ; + + /* a = 0 */ + + for (b = 0; b < q; b++) + { + ATOMIC t0_real = VECTOR(data,stride,b*p) + VECTOR(data,stride,b*p + p_1) ; + ATOMIC t1_real = VECTOR(data,stride,b*p) - VECTOR(data,stride,b*p + p_1) ; + + VECTOR(data,stride,b*p) = t0_real ; + VECTOR(data,stride,b*p + p_1) = t1_real ; + } + + /* a = 1 ... p_{i-1}/2 - 1 */ + + { + ATOMIC w_real = 1.0; + ATOMIC w_imag = 0.0; + + const double theta = - 2.0 * M_PI / p; + + const ATOMIC s = sin (theta); + const ATOMIC t = sin (theta / 2.0); + const ATOMIC s2 = 2.0 * t * t; + + for (a = 1; a < (p_1)/2; a++) + { + /* trignometric recurrence for w-> exp(i theta) w */ + + { + const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; + const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; + w_real = tmp_real; + w_imag = tmp_imag; + } + + for (b = 0; b < q; b++) + { + ATOMIC z0_real = VECTOR(data,stride,b*p + a) ; + ATOMIC z0_imag = VECTOR(data,stride,b*p + p_1 - a) ; + ATOMIC z1_real = VECTOR(data,stride,b*p + p_1 + a) ; + ATOMIC z1_imag = VECTOR(data,stride,b*p + p - a) ; + + /* t0 = z0 + w * z1 */ + + ATOMIC t0_real = z0_real + w_real * z1_real - w_imag * z1_imag; + ATOMIC t0_imag = z0_imag + w_real * z1_imag + w_imag * z1_real; + + /* t1 = z0 - w * z1 */ + + ATOMIC t1_real = z0_real - w_real * z1_real + w_imag * z1_imag; + ATOMIC t1_imag = z0_imag - w_real * z1_imag - w_imag * z1_real; + + VECTOR(data,stride,b*p + a) = t0_real ; + VECTOR(data,stride,b*p + p - a) = t0_imag ; + + VECTOR(data,stride,b*p + p_1 - a) = t1_real ; + VECTOR(data,stride,b*p + p_1 + a) = -t1_imag ; + } + } + } + + if (p_1 > 1) + { + for (b = 0; b < q; b++) + { + /* a = p_{i-1}/2 */ + + VECTOR(data,stride,b*p + p - p_1/2) *= -1 ; + } + } + } + return 0; +} diff --git a/software/gsl-1.15/fft/real_unpack.c b/software/gsl-1.15/fft/real_unpack.c new file mode 100644 index 000000000..87c0252ca --- /dev/null +++ b/software/gsl-1.15/fft/real_unpack.c @@ -0,0 +1,42 @@ +/* fft/real_unpack.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "complex_internal.h" + +int +FUNCTION(gsl_fft_real,unpack) (const BASE real_coefficient[], + BASE complex_coefficient[], + const size_t stride, const size_t n) +{ + size_t i; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + for (i = 0; i < n; i++) + { + REAL(complex_coefficient,stride,i) = real_coefficient[i * stride]; + IMAG(complex_coefficient,stride,i) = 0.0; + } + + return 0; + +} diff --git a/software/gsl-1.15/fft/signals.c b/software/gsl-1.15/fft/signals.c new file mode 100644 index 000000000..9869abe16 --- /dev/null +++ b/software/gsl-1.15/fft/signals.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "complex_internal.h" + +#include "urand.c" + +#define BASE_DOUBLE +#include "templates_on.h" +#include "signals_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "signals_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + diff --git a/software/gsl-1.15/fft/signals.h b/software/gsl-1.15/fft/signals.h new file mode 100644 index 000000000..c9bb775f0 --- /dev/null +++ b/software/gsl-1.15/fft/signals.h @@ -0,0 +1,64 @@ +/* fft/signals.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int FUNCTION(fft_signal,complex_pulse) (const size_t k, + const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]); + +int FUNCTION(fft_signal,complex_constant) (const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]); + +int FUNCTION(fft_signal,complex_exp) (const int k, + const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]); + + +int FUNCTION(fft_signal,complex_exppair) (const int k1, + const int k2, + const size_t n, + const size_t stride, + const BASE z1_real, + const BASE z1_imag, + const BASE z2_real, + const BASE z2_imag, + BASE data[], + BASE fft[]); + +int FUNCTION(fft_signal,complex_noise) (const size_t n, + const size_t stride, + BASE data[], + BASE fft[]); + +int FUNCTION(fft_signal,real_noise) (const size_t n, + const size_t stride, + BASE data[], + BASE fft[]); + diff --git a/software/gsl-1.15/fft/signals_source.c b/software/gsl-1.15/fft/signals_source.c new file mode 100644 index 000000000..a7f873f1e --- /dev/null +++ b/software/gsl-1.15/fft/signals_source.c @@ -0,0 +1,288 @@ +/* fft/signals_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "signals.h" + +int +FUNCTION(fft_signal,complex_pulse) (const size_t k, + const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]) +{ + size_t j; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + /* gsl_complex pulse at position k, data[j] = z * delta_{jk} */ + + for (j = 0; j < n; j++) + { + REAL(data,stride,j) = 0.0; + IMAG(data,stride,j) = 0.0; + } + + REAL(data,stride,k % n) = z_real; + IMAG(data,stride,k % n) = z_imag; + + /* fourier transform, fft[j] = z * exp(-2 pi i j k / n) */ + + for (j = 0; j < n; j++) + { + const double arg = -2 * M_PI * ((double) ((j * k) % n)) / ((double) n); + const BASE w_real = (BASE)cos (arg); + const BASE w_imag = (BASE)sin (arg); + REAL(fft,stride,j) = w_real * z_real - w_imag * z_imag; + IMAG(fft,stride,j) = w_real * z_imag + w_imag * z_real; + } + + return 0; + +} + + +int +FUNCTION(fft_signal,complex_constant) (const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]) +{ + size_t j; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + /* constant, data[j] = z */ + + for (j = 0; j < n; j++) + { + REAL(data,stride,j) = z_real; + IMAG(data,stride,j) = z_imag; + } + + /* fourier transform, fft[j] = n z delta_{j0} */ + + for (j = 0; j < n; j++) + { + REAL(fft,stride,j) = 0.0; + IMAG(fft,stride,j) = 0.0; + } + + REAL(fft,stride,0) = ((BASE) n) * z_real; + IMAG(fft,stride,0) = ((BASE) n) * z_imag; + + return 0; + +} + + +int +FUNCTION(fft_signal,complex_exp) (const int k, + const size_t n, + const size_t stride, + const BASE z_real, + const BASE z_imag, + BASE data[], + BASE fft[]) +{ + size_t j; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + /* exponential, data[j] = z * exp(2 pi i j k) */ + + for (j = 0; j < n; j++) + { + const double arg = 2 * M_PI * ((double) ((j * k) % n)) / ((double) n); + const BASE w_real = (BASE)cos (arg); + const BASE w_imag = (BASE)sin (arg); + REAL(data,stride,j) = w_real * z_real - w_imag * z_imag; + IMAG(data,stride,j) = w_real * z_imag + w_imag * z_real; + } + + /* fourier transform, fft[j] = z * delta{(j - k),0} */ + + for (j = 0; j < n; j++) + { + REAL(fft,stride,j) = 0.0; + IMAG(fft,stride,j) = 0.0; + } + + { + int freq; + + if (k <= 0) + { + freq = (n-k) % n ; + } + else + { + freq = (k % n); + }; + + REAL(fft,stride,freq) = ((BASE) n) * z_real; + IMAG(fft,stride,freq) = ((BASE) n) * z_imag; + } + + return 0; + +} + + +int +FUNCTION(fft_signal,complex_exppair) (const int k1, + const int k2, + const size_t n, + const size_t stride, + const BASE z1_real, + const BASE z1_imag, + const BASE z2_real, + const BASE z2_imag, + BASE data[], + BASE fft[]) +{ + size_t j; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + /* exponential, data[j] = z1 * exp(2 pi i j k1) + z2 * exp(2 pi i j k2) */ + + for (j = 0; j < n; j++) + { + const double arg1 = 2 * M_PI * ((double) ((j * k1) % n)) / ((double) n); + const BASE w1_real = (BASE)cos (arg1); + const BASE w1_imag = (BASE)sin (arg1); + const double arg2 = 2 * M_PI * ((double) ((j * k2) % n)) / ((double) n); + const BASE w2_real = (BASE)cos (arg2); + const BASE w2_imag = (BASE)sin (arg2); + REAL(data,stride,j) = w1_real * z1_real - w1_imag * z1_imag; + IMAG(data,stride,j) = w1_real * z1_imag + w1_imag * z1_real; + REAL(data,stride,j) += w2_real * z2_real - w2_imag * z2_imag; + IMAG(data,stride,j) += w2_real * z2_imag + w2_imag * z2_real; + } + + /* fourier transform, fft[j] = z1 * delta{(j - k1),0} + z2 * + delta{(j - k2,0)} */ + + for (j = 0; j < n; j++) + { + REAL(fft,stride,j) = 0.0; + IMAG(fft,stride,j) = 0.0; + } + + { + int freq1, freq2; + + if (k1 <= 0) + { + freq1 = (n - k1) % n; + } + else + { + freq1 = (k1 % n); + }; + + if (k2 <= 0) + { + freq2 = (n - k2) % n; + } + else + { + freq2 = (k2 % n); + }; + + REAL(fft,stride,freq1) += ((BASE) n) * z1_real; + IMAG(fft,stride,freq1) += ((BASE) n) * z1_imag; + REAL(fft,stride,freq2) += ((BASE) n) * z2_real; + IMAG(fft,stride,freq2) += ((BASE) n) * z2_imag; + } + + return 0; + +} + + +int +FUNCTION(fft_signal,complex_noise) (const size_t n, + const size_t stride, + BASE data[], + BASE fft[]) +{ + size_t i; + int status; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + for (i = 0; i < n; i++) + { + REAL(data,stride,i) = (BASE)urand(); + IMAG(data,stride,i) = (BASE)urand(); + } + + /* compute the dft */ + status = FUNCTION(gsl_dft_complex,forward) (data, stride, n, fft); + + return status; +} + + +int +FUNCTION(fft_signal,real_noise) (const size_t n, + const size_t stride, + BASE data[], + BASE fft[]) +{ + size_t i; + int status; + + if (n == 0) + { + GSL_ERROR ("length n must be positive integer", GSL_EDOM); + } + + for (i = 0; i < n; i++) + { + REAL(data,stride,i) = (BASE)urand(); + IMAG(data,stride,i) = 0.0; + } + + /* compute the dft */ + status = FUNCTION(gsl_dft_complex,forward) (data, stride, n, fft); + + return status; +} + diff --git a/software/gsl-1.15/fft/test.c b/software/gsl-1.15/fft/test.c new file mode 100644 index 000000000..b244db51e --- /dev/null +++ b/software/gsl-1.15/fft/test.c @@ -0,0 +1,126 @@ +/* fft/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +#include "complex_internal.h" + +/* Usage: test [n] + Exercise the fft routines for length n. By default n runs from 1 to 100. + The exit status indicates success or failure. */ + +#define BASE_DOUBLE +#include "templates_on.h" +#include "compare_source.c" +#include "bitreverse.c" +#include "test_complex_source.c" +#include "test_real_source.c" +#include "test_trap_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "compare_source.c" +#include "bitreverse.c" +#include "test_complex_source.c" +#include "test_real_source.c" +#include "test_trap_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +int +main (int argc, char *argv[]) +{ + size_t i; + size_t start = 1, end = 99; + size_t stride ; + size_t n = 0; + + gsl_ieee_env_setup (); + + if (argc == 2) + n = strtol (argv[1], NULL, 0); + + if (n) + { + start = n ; + end = n ; + } + + + for (i = 1 ; i <= end ; i *= 2) + { + if (i >= start) + { + for (stride = 1 ; stride < 4 ; stride++) + { + test_complex_bitreverse_order (stride, i) ; + test_complex_radix2 (stride, i) ; + test_real_bitreverse_order (stride, i) ; + test_real_radix2 (stride, i) ; + } + } + } + + for (i = start ; i <= end ; i++) + { + for (stride = 1 ; stride < 4 ; stride++) + { + test_complex_func (stride, i) ; + test_complex_float_func (stride, i) ; + test_real_func (stride, i) ; + test_real_float_func (stride, i) ; + } + } + + gsl_set_error_handler (&my_error_handler); + test_trap () ; + test_float_trap () ; + + exit (gsl_test_summary ()); +} + + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err) ; +} diff --git a/software/gsl-1.15/fft/test_complex_source.c b/software/gsl-1.15/fft/test_complex_source.c new file mode 100644 index 000000000..7b427885b --- /dev/null +++ b/software/gsl-1.15/fft/test_complex_source.c @@ -0,0 +1,448 @@ +/* fft/test_complex.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "bitreverse.h" +#include "signals.h" +#include "compare.h" + +void FUNCTION(test_complex,func) (size_t stride, size_t n); +int FUNCTION(test,offset) (const BASE data[], size_t stride, + size_t n, size_t offset); +void FUNCTION(test_complex,bitreverse_order) (size_t stride, size_t n) ; +void FUNCTION(test_complex,radix2) (size_t stride, size_t n); + +int FUNCTION(test,offset) (const BASE data[], size_t stride, + size_t n, size_t offset) +{ + int status = 0 ; + size_t i, j, k = 0 ; + + for (i = 0; i < n; i++) + { + k += 2 ; + + for (j = 1; j < stride; j++) + { + status |= data[k] != k + offset ; + k++ ; + status |= data[k] != k + offset ; + k++ ; + } + } + return status ; +} + + +void FUNCTION(test_complex,func) (size_t stride, size_t n) +{ + size_t i ; + int status ; + + TYPE(gsl_fft_complex_wavetable) * cw ; + TYPE(gsl_fft_complex_workspace) * cwork ; + + BASE * complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + + for (i = 0 ; i < 2 * n * stride ; i++) + { + complex_data[i] = (BASE)i ; + complex_tmp[i] = (BASE)(i + 1000.0) ; + fft_complex_data[i] = (BASE)(i + 2000.0) ; + fft_complex_tmp[i] = (BASE)(i + 3000.0) ; + } + + gsl_set_error_handler (NULL); /* abort on any errors */ + + /* Test allocation */ + + { + cw = FUNCTION(gsl_fft_complex_wavetable,alloc) (n); + gsl_test (cw == 0, NAME(gsl_fft_complex_wavetable) + "_alloc, n = %d, stride = %d", n, stride); + } + + { + cwork = FUNCTION(gsl_fft_complex_workspace,alloc) (n); + gsl_test (cwork == 0, NAME(gsl_fft_complex_workspace) + "_alloc, n = %d", n); + } + + + /* Test mixed radix fft with noise */ + + { + FUNCTION(fft_signal,complex_noise) (n, stride, complex_data, fft_complex_data); + for (i = 0 ; i < n ; i++) + { + REAL(complex_tmp,stride,i) = REAL(complex_data,stride,i) ; + IMAG(complex_tmp,stride,i) = IMAG(complex_data,stride,i) ; + } + + FUNCTION(gsl_fft_complex,forward) (complex_data, stride, n, cw, cwork); + + for (i = 0 ; i < n ; i++) + { + REAL(fft_complex_tmp,stride,i) = REAL(complex_data,stride,i) ; + IMAG(fft_complex_tmp,stride,i) = IMAG(complex_data,stride,i) ; + } + + status = FUNCTION(compare_complex,results) ("dft", fft_complex_data, + "fft of noise", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_forward with signal_noise, n = %d, stride = %d", n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (complex_data, stride, n, 0) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_forward avoids unstrided data, n = %d, stride = %d", + n, stride); + } + } + + /* Test the inverse fft */ + + { + status = FUNCTION(gsl_fft_complex,inverse) (complex_data, stride, n, cw, cwork); + status = FUNCTION(compare_complex,results) ("orig", complex_tmp, + "fft inverse", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_inverse with signal_noise, n = %d, stride = %d", n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (complex_data, stride, n, 0) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_inverse other data untouched, n = %d, stride = %d", + n, stride); + } + + } + + /* Test the backward fft */ + + { + status = FUNCTION(gsl_fft_complex,backward) (fft_complex_tmp, stride, n, cw, cwork); + + for (i = 0; i < n; i++) + { + REAL(complex_tmp,stride,i) *= n; + IMAG(complex_tmp,stride,i) *= n; + } + status = FUNCTION(compare_complex,results) ("orig", + complex_tmp, + "fft backward", + fft_complex_tmp, + stride, n, 1e6); + + gsl_test (status, NAME(gsl_fft_complex) + "_backward with signal_noise, n = %d, stride = %d", n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (fft_complex_tmp, stride, n, 3000) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_backward avoids unstrided data, n = %d, stride = %d", + n, stride); + } + + } + + /* Test a pulse signal */ + + { + FUNCTION(fft_signal,complex_pulse) (1, n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,forward) (complex_data, stride, n, cw, cwork); + status = FUNCTION(compare_complex,results) ("analytic", fft_complex_data, + "fft of pulse", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_forward with signal_pulse, n = %d, stride = %d", n, stride); + + } + + + /* Test a constant signal */ + + { + FUNCTION(fft_signal,complex_constant) (n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,forward) (complex_data, stride, n, cw, cwork); + status = FUNCTION(compare_complex,results) ("analytic", fft_complex_data, + "fft of constant", + complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_forward with signal_constant, n = %d, stride = %d", n, stride); + } + + /* Test an exponential (cos/sin) signal */ + + { + status = 0; + for (i = 0; i < n; i++) + { + FUNCTION(fft_signal,complex_exp) ((int)i, n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,forward) (complex_data, stride, n, cw, cwork); + status |= FUNCTION(compare_complex,results) ("analytic", + fft_complex_data, + "fft of exp", + complex_data, + stride, n, 1e6); + } + gsl_test (status, NAME(gsl_fft_complex) + "_forward with signal_exp, n = %d, stride = %d", n, stride); + } + + FUNCTION(gsl_fft_complex_wavetable,free) (cw); + FUNCTION(gsl_fft_complex_workspace,free) (cwork); + + free (complex_data); + free (complex_tmp); + free (fft_complex_data); + free (fft_complex_tmp); +} + + +void +FUNCTION(test_complex,bitreverse_order) (size_t stride, size_t n) +{ + int status ; + size_t logn, i ; + + BASE * tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * reversed_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + + for (i = 0; i < 2 * stride * n; i++) + { + data[i] = (BASE)i ; + } + + memcpy (tmp, data, 2 * n * stride * sizeof(BASE)) ; + + logn = 0 ; while (n > (1U<>= 1; + } + + reversed_data[2*j*stride] = data[2*i*stride] ; + reversed_data[2*j*stride+1] = data[2*i*stride+1] ; + } + + FUNCTION(fft_complex,bitreverse_order) (data, stride, n, logn); + + status = FUNCTION(compare_complex,results) ("naive bit reverse", + reversed_data, + "fft_complex_bitreverse_order", + data, + stride, n, 1e6); + + gsl_test (status, "fft_complex_bitreverse_order, n = %d", n); + + free (reversed_data) ; + free (data) ; + free (tmp) ; +} + +void FUNCTION(test_complex,radix2) (size_t stride, size_t n) +{ + size_t i ; + int status ; + + BASE * complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + + for (i = 0 ; i < 2 * n * stride ; i++) + { + complex_data[i] = (BASE)i ; + complex_tmp[i] = (BASE)(i + 1000.0) ; + fft_complex_data[i] = (BASE)(i + 2000.0) ; + fft_complex_tmp[i] = (BASE)(i + 3000.0) ; + } + + gsl_set_error_handler (NULL); /* abort on any errors */ + + /* Test radix-2 fft with noise */ + + { + FUNCTION(fft_signal,complex_noise) (n, stride, complex_data, + fft_complex_data); + for (i = 0 ; i < n ; i++) + { + REAL(complex_tmp,stride,i) = REAL(complex_data,stride,i) ; + IMAG(complex_tmp,stride,i) = IMAG(complex_data,stride,i) ; + } + + FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, stride, n); + + for (i = 0 ; i < n ; i++) + { + REAL(fft_complex_tmp,stride,i) = REAL(complex_data,stride,i) ; + IMAG(fft_complex_tmp,stride,i) = IMAG(complex_data,stride,i) ; + } + + status = FUNCTION(compare_complex,results) ("dft", fft_complex_data, + "fft of noise", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_forward with signal_noise, n = %d, stride = %d", + n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (complex_data, stride, n, 0) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_forward avoids unstrided data, n = %d, stride = %d", + n, stride); + } + } + + /* Test the inverse fft */ + + { + status = FUNCTION(gsl_fft_complex,radix2_inverse) (complex_data, stride, n); + status = FUNCTION(compare_complex,results) ("orig", complex_tmp, + "fft inverse", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_inverse with signal_noise, n = %d, stride = %d", n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (complex_data, stride, n, 0) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_inverse other data untouched, n = %d, stride = %d", + n, stride); + } + + } + + /* Test the backward fft */ + + { + status = FUNCTION(gsl_fft_complex,radix2_backward) (fft_complex_tmp, stride, n); + + for (i = 0; i < n; i++) + { + REAL(complex_tmp,stride,i) *= n; + IMAG(complex_tmp,stride,i) *= n; + } + status = FUNCTION(compare_complex,results) ("orig", + complex_tmp, + "fft backward", + fft_complex_tmp, + stride, n, 1e6); + + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_backward with signal_noise, n = %d, stride = %d", n, stride); + + if (stride > 1) + { + status = FUNCTION(test, offset) (fft_complex_tmp, stride, n, 3000) ; + + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_backward avoids unstrided data, n = %d, stride = %d", + n, stride); + } + + } + + /* Test a pulse signal */ + + { + FUNCTION(fft_signal,complex_pulse) (1, n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, stride, n); + status = FUNCTION(compare_complex,results) ("analytic", fft_complex_data, + "fft of pulse", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_forward with signal_pulse, n = %d, stride = %d", n, stride); + + } + + + /* Test a constant signal */ + + { + FUNCTION(fft_signal,complex_constant) (n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, stride, n); + status = FUNCTION(compare_complex,results) ("analytic", fft_complex_data, + "fft of constant", + complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_forward with signal_constant, n = %d, stride = %d", + n, stride); + } + + /* Test an exponential (cos/sin) signal */ + + { + status = 0; + for (i = 0; i < n; i++) + { + FUNCTION(fft_signal,complex_exp) ((int)i, n, stride, 1.0, 0.0, complex_data, + fft_complex_data); + FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, stride, n); + status |= FUNCTION(compare_complex,results) ("analytic", + fft_complex_data, + "fft of exp", + complex_data, + stride, n, 1e6); + } + gsl_test (status, NAME(gsl_fft_complex) + "_radix2_forward with signal_exp, n = %d, stride = %d", n, stride); + } + + + free (complex_data); + free (complex_tmp); + free (fft_complex_data); + free (fft_complex_tmp); +} + diff --git a/software/gsl-1.15/fft/test_real_source.c b/software/gsl-1.15/fft/test_real_source.c new file mode 100644 index 000000000..40b9e8716 --- /dev/null +++ b/software/gsl-1.15/fft/test_real_source.c @@ -0,0 +1,235 @@ +/* fft/test_real.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "bitreverse.h" +#include "signals.h" +#include "compare.h" + +void FUNCTION(test_real,func) (size_t stride, size_t n); +void FUNCTION(test_real,bitreverse_order) (size_t stride, size_t n); +void FUNCTION(test_real,radix2) (size_t stride, size_t n); + +void FUNCTION(test_real,func) (size_t stride, size_t n) +{ + size_t i ; + int status ; + + TYPE(gsl_fft_real_wavetable) * rw ; + TYPE(gsl_fft_halfcomplex_wavetable) * hcw ; + TYPE(gsl_fft_real_workspace) * rwork ; + + BASE * real_data = (BASE *) malloc (n * stride * sizeof (BASE)); + BASE * complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + + for (i = 0 ; i < n * stride ; i++) + { + real_data[i] = (BASE)i ; + } + + for (i = 0 ; i < 2 * n * stride ; i++) + { + complex_data[i] = (BASE)(i + 1000.0) ; + complex_tmp[i] = (BASE)(i + 2000.0) ; + fft_complex_data[i] = (BASE)(i + 3000.0) ; + } + + gsl_set_error_handler (NULL); /* abort on any errors */ + + /* mixed radix real fft */ + + rw = FUNCTION(gsl_fft_real_wavetable,alloc) (n); + gsl_test (rw == 0, NAME(gsl_fft_real_wavetable) + "_alloc, n = %d, stride = %d", n, stride); + + rwork = FUNCTION(gsl_fft_real_workspace,alloc) (n); + gsl_test (rwork == 0, NAME(gsl_fft_real_workspace) + "_alloc, n = %d", n); + + FUNCTION(fft_signal,real_noise) (n, stride, complex_data, fft_complex_data); + memcpy (complex_tmp, complex_data, 2 * n * stride * sizeof (BASE)); + + for (i = 0; i < n; i++) + { + real_data[i*stride] = REAL(complex_data,stride,i); + } + + FUNCTION(gsl_fft_real,transform) (real_data, stride, n, rw, rwork); + FUNCTION(gsl_fft_halfcomplex,unpack) (real_data, complex_data, stride, n); + + status = FUNCTION(compare_complex,results) ("dft", fft_complex_data, + "fft of noise", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_real) + " with signal_real_noise, n = %d, stride = %d", n, stride); + + /* compute the inverse fft */ + + hcw = FUNCTION(gsl_fft_halfcomplex_wavetable,alloc) (n); + gsl_test (hcw == 0, NAME(gsl_fft_halfcomplex_wavetable) + "_alloc, n = %d, stride = %d", n, stride); + + status = FUNCTION(gsl_fft_halfcomplex,transform) (real_data, stride, n, hcw, rwork); + + for (i = 0; i < n; i++) + { + real_data[i*stride] /= n; + } + + FUNCTION(gsl_fft_real,unpack) (real_data, complex_data, stride, n); + + status = FUNCTION(compare_complex,results) ("orig", complex_tmp, + "fft inverse", complex_data, + stride, n, 1e6); + + gsl_test (status, NAME(gsl_fft_halfcomplex) + " with data from signal_noise, n = %d, stride = %d", n, stride); + + FUNCTION(gsl_fft_real_workspace,free) (rwork); + FUNCTION(gsl_fft_real_wavetable,free) (rw); + FUNCTION(gsl_fft_halfcomplex_wavetable,free) (hcw); + + free(real_data) ; + free(complex_data) ; + free(complex_tmp) ; + free(fft_complex_data) ; +} + + +void +FUNCTION(test_real,bitreverse_order) (size_t stride, size_t n) +{ + int status ; + size_t logn, i ; + + BASE * tmp = (BASE *) malloc (n * stride * sizeof (BASE)); + BASE * data = (BASE *) malloc (n * stride * sizeof (BASE)); + BASE * reversed_data = (BASE *) malloc (n * stride * sizeof (BASE)); + + for (i = 0; i < stride * n; i++) + { + data[i] = (BASE)i ; + } + + memcpy (tmp, data, n * stride * sizeof(BASE)) ; + + logn = 0 ; while (n > (1U <>= 1; + } + + reversed_data[j*stride] = data[i*stride] ; + } + + FUNCTION(fft_real,bitreverse_order) (data, stride, n, logn); + + status = FUNCTION(compare_real,results) ("naive bit reverse", + reversed_data, + "fft_complex_bitreverse_order", + data, + stride, n, 1e6); + + gsl_test (status, NAME(fft_real) "_bitreverse_order, n = %d", n); + + free (reversed_data) ; + free (data) ; + free (tmp) ; +} + + +void FUNCTION(test_real,radix2) (size_t stride, size_t n) +{ + size_t i ; + int status ; + + BASE * real_data = (BASE *) malloc (n * stride * sizeof (BASE)); + BASE * complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * complex_tmp = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + BASE * fft_complex_data = (BASE *) malloc (2 * n * stride * sizeof (BASE)); + + for (i = 0 ; i < n * stride ; i++) + { + real_data[i] = (BASE)i ; + } + + for (i = 0 ; i < 2 * n * stride ; i++) + { + complex_data[i] = (BASE)(i + 1000.0) ; + complex_tmp[i] = (BASE)(i + 2000.0) ; + fft_complex_data[i] = (BASE)(i + 3000.0) ; + } + + gsl_set_error_handler (NULL); /* abort on any errors */ + + /* radix-2 real fft */ + + FUNCTION(fft_signal,real_noise) (n, stride, complex_data, fft_complex_data); + memcpy (complex_tmp, complex_data, 2 * n * stride * sizeof (BASE)); + + for (i = 0; i < n; i++) + { + real_data[i*stride] = REAL(complex_data,stride,i); + } + + FUNCTION(gsl_fft_real,radix2_transform) (real_data, stride, n); + FUNCTION(gsl_fft_halfcomplex,radix2_unpack) (real_data, complex_data, stride, n); + + status = FUNCTION(compare_complex,results) ("dft", fft_complex_data, + "fft of noise", complex_data, + stride, n, 1e6); + gsl_test (status, NAME(gsl_fft_real) + "_radix2 with signal_real_noise, n = %d, stride = %d", n, stride); + + /* compute the inverse fft */ + + status = FUNCTION(gsl_fft_halfcomplex,radix2_transform) (real_data, stride, n); + + for (i = 0; i < n; i++) + { + real_data[i*stride] /= n; + } + + FUNCTION(gsl_fft_real,unpack) (real_data, complex_data, stride, n); + + status = FUNCTION(compare_complex,results) ("orig", complex_tmp, + "fft inverse", complex_data, + stride, n, 1e6); + + gsl_test (status, NAME(gsl_fft_halfcomplex) + "_radix2 with data from signal_noise, n = %d, stride = %d", n, stride); + + + free(real_data) ; + free(complex_data) ; + free(complex_tmp) ; + free(fft_complex_data) ; +} diff --git a/software/gsl-1.15/fft/test_trap_source.c b/software/gsl-1.15/fft/test_trap_source.c new file mode 100644 index 000000000..a581f6fb6 --- /dev/null +++ b/software/gsl-1.15/fft/test_trap_source.c @@ -0,0 +1,138 @@ +/* fft/test_trap.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION(test,trap) (void); + +void +FUNCTION(test,trap) (void) +{ + int status ; + + BASE real_x ; + BASE complex_x ; + + BASE * real_data = &real_x ; + BASE * complex_data = &complex_x ; + + TYPE(gsl_fft_complex_wavetable) * cw; + TYPE(gsl_fft_real_wavetable) * rw; + TYPE(gsl_fft_halfcomplex_wavetable) * hcw; + + TYPE(gsl_fft_complex_workspace) * cwork; + TYPE(gsl_fft_real_workspace) * rwork; + + /* n = 0 in alloc */ + + cw = FUNCTION(gsl_fft_complex_wavetable,alloc) (0); + gsl_test (cw != 0, "trap for n = 0 in " NAME(gsl_fft_complex_wavetable) "_alloc"); + + rw = FUNCTION(gsl_fft_real_wavetable,alloc) (0); + gsl_test (rw != 0, "trap for n = 0 in " NAME(gsl_fft_real_wavetable) "_alloc" ); + + hcw = FUNCTION(gsl_fft_halfcomplex_wavetable,alloc) (0); + gsl_test (hcw != 0, "trap for n = 0 in " NAME(gsl_fft_halfcomplex_wavetable) "_alloc"); + + cwork = FUNCTION(gsl_fft_complex_workspace,alloc) (0); + gsl_test (cw != 0, "trap for n = 0 in " NAME(gsl_fft_complex_workspace) "_alloc"); + + rwork = FUNCTION(gsl_fft_real_workspace,alloc) (0); + gsl_test (rw != 0, "trap for n = 0 in " NAME(gsl_fft_real_workspace) "_alloc" ); + + cw = FUNCTION(gsl_fft_complex_wavetable,alloc) (10); + hcw = FUNCTION(gsl_fft_halfcomplex_wavetable,alloc) (10); + rw = FUNCTION(gsl_fft_real_wavetable,alloc) (10); + + cwork = FUNCTION(gsl_fft_complex_workspace,alloc) (10); + rwork = FUNCTION(gsl_fft_real_workspace,alloc) (10); + + /* n = 0 in fft forward */ + + status = FUNCTION(gsl_fft_complex,forward) (complex_data, 1, 0, cw, cwork); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_forward"); + + status = FUNCTION(gsl_fft_real,transform) (real_data, 1, 0, rw, rwork); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_real) "_transform"); + + status = FUNCTION(gsl_fft_halfcomplex,transform) (real_data, 1, 0, hcw, rwork); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_halfcomplex) "_transform"); + + status = FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, 1, 0); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_radix2_forward"); + + /* n = 0 in fft backward */ + + status = FUNCTION(gsl_fft_complex,backward) (complex_data, 1, 0, cw, cwork); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_backward"); + + status = FUNCTION(gsl_fft_complex,radix2_backward) (complex_data, 1, 0); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_radix2_backward"); + + /* n = 0 in fft inverse */ + + status = FUNCTION(gsl_fft_complex,inverse) (complex_data, 1, 0, cw, cwork); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_inverse"); + + status = FUNCTION(gsl_fft_complex,radix2_inverse) (complex_data, 1, 0); + gsl_test (!status, "trap for n = 0 in " NAME(gsl_fft_complex) "_radix2_inverse"); + + /* n != 2^k in power of 2 routines */ + + status = FUNCTION(gsl_fft_complex,radix2_forward) (complex_data, 1, 17); + gsl_test (!status, "trap for n != 2^k in " NAME(gsl_fft_complex) "_radix2_forward"); + + status = FUNCTION(gsl_fft_complex,radix2_backward) (complex_data, 1, 17); + gsl_test (!status, "trap for n != 2^k in " NAME(gsl_fft_complex) "_radix2_backward"); + + status = FUNCTION(gsl_fft_complex,radix2_inverse) (complex_data, 1, 17); + gsl_test (!status, "trap for n != 2^k in " NAME(gsl_fft_complex) "_radix2_inverse"); + + /* n != wavetable.n in mixed radix routines */ + + cw->n = 3; + status = FUNCTION(gsl_fft_complex,forward) (complex_data, 1, 4, cw, cwork); + gsl_test (!status, "trap for n != nw in " NAME(gsl_fft_complex) "_forward"); + + cw->n = 3; + status = FUNCTION(gsl_fft_complex,backward) (complex_data, 1, 4, cw, cwork); + gsl_test (!status, "trap for n != nw in " NAME(gsl_fft_complex) "_backward"); + + cw->n = 3; + status = FUNCTION(gsl_fft_complex,inverse) (complex_data, 1, 4, cw, cwork); + gsl_test (!status, "trap for n != nw in " NAME(gsl_fft_complex) "_inverse"); + + rw->n = 3; + status = FUNCTION(gsl_fft_real,transform) (real_data, 1, 4, rw, rwork); + gsl_test (!status, "trap for n != nw in " NAME(gsl_fft_real) "_transform"); + + hcw->n = 3; + status = FUNCTION(gsl_fft_halfcomplex,transform) (real_data, 1, 4, hcw, rwork); + gsl_test (!status, "trap for n != nw in " NAME(gsl_fft_halfcomplex) "_transform"); + + FUNCTION (gsl_fft_halfcomplex_wavetable,free) (hcw) ; + FUNCTION (gsl_fft_real_wavetable,free) (rw) ; + FUNCTION (gsl_fft_complex_wavetable,free) (cw) ; + + FUNCTION (gsl_fft_real_workspace,free) (rwork) ; + FUNCTION (gsl_fft_complex_workspace,free) (cwork) ; + +} + + + + diff --git a/software/gsl-1.15/fft/urand.c b/software/gsl-1.15/fft/urand.c new file mode 100644 index 000000000..abde12f32 --- /dev/null +++ b/software/gsl-1.15/fft/urand.c @@ -0,0 +1,26 @@ +/* fft/urand.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double urand (void); + +double urand (void) { + static unsigned long int x = 1; + x = (1103515245 * x + 12345) & 0x7fffffffUL ; + return x / 2147483648.0 ; +} diff --git a/software/gsl-1.15/fit/.deps/linear.Plo b/software/gsl-1.15/fit/.deps/linear.Plo new file mode 100644 index 000000000..1dd5ee14d --- /dev/null +++ b/software/gsl-1.15/fit/.deps/linear.Plo @@ -0,0 +1,131 @@ +linear.lo: linear.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_fit.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_fit.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/fit/.deps/test.Po b/software/gsl-1.15/fit/.deps/test.Po new file mode 100644 index 000000000..ba33698e9 --- /dev/null +++ b/software/gsl-1.15/fit/.deps/test.Po @@ -0,0 +1,129 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_fit.h \ + ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_fit.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: diff --git a/software/gsl-1.15/fit/ChangeLog b/software/gsl-1.15/fit/ChangeLog new file mode 100644 index 000000000..5e5e2077e --- /dev/null +++ b/software/gsl-1.15/fit/ChangeLog @@ -0,0 +1,18 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-05-23 Brian Gough + + * gsl_fit.h linear.c (gsl_fit_mul_est, gsl_fit_linear_est): made + parameters in prototypes for _est functions consistent, + c00->cov00, c01->cov01, c11 -> cov11 + +2004-12-23 Brian Gough + + * gsl_fit.h: remove unused declarations + +Tue Sep 19 19:09:46 2000 Brian Gough + + * fit/test.c (main): removed unused variables + diff --git a/software/gsl-1.15/fit/Makefile.am b/software/gsl-1.15/fit/Makefile.am new file mode 100644 index 000000000..38bf9e619 --- /dev/null +++ b/software/gsl-1.15/fit/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libgslfit.la + +pkginclude_HEADERS = gsl_fit.h + +INCLUDES = -I$(top_srcdir) + +libgslfit_la_SOURCES = linear.c + +check_PROGRAMS = test #demo + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c +test_LDADD = libgslfit.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslfit.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + diff --git a/software/gsl-1.15/fit/Makefile.in b/software/gsl-1.15/fit/Makefile.in new file mode 100644 index 000000000..b98654d75 --- /dev/null +++ b/software/gsl-1.15/fit/Makefile.in @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = fit +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslfit_la_LIBADD = +am_libgslfit_la_OBJECTS = linear.lo +libgslfit_la_OBJECTS = $(am_libgslfit_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslfit.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la \ + ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslfit_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslfit_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslfit.la +pkginclude_HEADERS = gsl_fit.h +INCLUDES = -I$(top_srcdir) +libgslfit_la_SOURCES = linear.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslfit.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fit/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu fit/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslfit.la: $(libgslfit_la_OBJECTS) $(libgslfit_la_DEPENDENCIES) + $(LINK) $(libgslfit_la_OBJECTS) $(libgslfit_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES = demo.c +#demo_LDADD = libgslfit.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/fit/gsl_fit.h b/software/gsl-1.15/fit/gsl_fit.h new file mode 100644 index 000000000..de83a41d0 --- /dev/null +++ b/software/gsl-1.15/fit/gsl_fit.h @@ -0,0 +1,85 @@ +/* fit/gsl_fit.h + * + * Copyright (C) 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_FIT_H__ +#define __GSL_FIT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_fit_linear (const double * x, const size_t xstride, + const double * y, const size_t ystride, + const size_t n, + double * c0, double * c1, + double * cov00, double * cov01, double * cov11, + double * sumsq); + + +int gsl_fit_wlinear (const double * x, const size_t xstride, + const double * w, const size_t wstride, + const double * y, const size_t ystride, + const size_t n, + double * c0, double * c1, + double * cov00, double * cov01, double * cov11, + double * chisq); + +int +gsl_fit_linear_est (const double x, + const double c0, const double c1, + const double cov00, const double cov01, const double cov11, + double *y, double *y_err); + + +int gsl_fit_mul (const double * x, const size_t xstride, + const double * y, const size_t ystride, + const size_t n, + double * c1, + double * cov11, + double * sumsq); + +int gsl_fit_wmul (const double * x, const size_t xstride, + const double * w, const size_t wstride, + const double * y, const size_t ystride, + const size_t n, + double * c1, + double * cov11, + double * sumsq); + + +int +gsl_fit_mul_est (const double x, + const double c1, + const double cov11, + double *y, double *y_err); + +__END_DECLS + +#endif /* __GSL_FIT_H__ */ diff --git a/software/gsl-1.15/fit/linear.c b/software/gsl-1.15/fit/linear.c new file mode 100644 index 000000000..7ee17230f --- /dev/null +++ b/software/gsl-1.15/fit/linear.c @@ -0,0 +1,346 @@ +/* fit/linear.c + * + * Copyright (C) 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* Fit the data (x_i, y_i) to the linear relationship + + Y = c0 + c1 x + + returning, + + c0, c1 -- coefficients + cov00, cov01, cov11 -- variance-covariance matrix of c0 and c1, + sumsq -- sum of squares of residuals + + This fit can be used in the case where the errors for the data are + uknown, but assumed equal for all points. The resulting + variance-covariance matrix estimates the error in the coefficients + from the observed variance of the points around the best fit line. +*/ + +int +gsl_fit_linear (const double *x, const size_t xstride, + const double *y, const size_t ystride, + const size_t n, + double *c0, double *c1, + double *cov_00, double *cov_01, double *cov_11, double *sumsq) +{ + double m_x = 0, m_y = 0, m_dx2 = 0, m_dxdy = 0; + + size_t i; + + for (i = 0; i < n; i++) + { + m_x += (x[i * xstride] - m_x) / (i + 1.0); + m_y += (y[i * ystride] - m_y) / (i + 1.0); + } + + for (i = 0; i < n; i++) + { + const double dx = x[i * xstride] - m_x; + const double dy = y[i * ystride] - m_y; + + m_dx2 += (dx * dx - m_dx2) / (i + 1.0); + m_dxdy += (dx * dy - m_dxdy) / (i + 1.0); + } + + /* In terms of y = a + b x */ + + { + double s2 = 0, d2 = 0; + double b = m_dxdy / m_dx2; + double a = m_y - m_x * b; + + *c0 = a; + *c1 = b; + + /* Compute chi^2 = \sum (y_i - (a + b * x_i))^2 */ + + for (i = 0; i < n; i++) + { + const double dx = x[i * xstride] - m_x; + const double dy = y[i * ystride] - m_y; + const double d = dy - b * dx; + d2 += d * d; + } + + s2 = d2 / (n - 2.0); /* chisq per degree of freedom */ + + *cov_00 = s2 * (1.0 / n) * (1 + m_x * m_x / m_dx2); + *cov_11 = s2 * 1.0 / (n * m_dx2); + + *cov_01 = s2 * (-m_x) / (n * m_dx2); + + *sumsq = d2; + } + + return GSL_SUCCESS; +} + + +/* Fit the weighted data (x_i, w_i, y_i) to the linear relationship + + Y = c0 + c1 x + + returning, + + c0, c1 -- coefficients + s0, s1 -- the standard deviations of c0 and c1, + r -- the correlation coefficient between c0 and c1, + chisq -- weighted sum of squares of residuals */ + +int +gsl_fit_wlinear (const double *x, const size_t xstride, + const double *w, const size_t wstride, + const double *y, const size_t ystride, + const size_t n, + double *c0, double *c1, + double *cov_00, double *cov_01, double *cov_11, + double *chisq) +{ + + /* compute the weighted means and weighted deviations from the means */ + + /* wm denotes a "weighted mean", wm(f) = (sum_i w_i f_i) / (sum_i w_i) */ + + double W = 0, wm_x = 0, wm_y = 0, wm_dx2 = 0, wm_dxdy = 0; + + size_t i; + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + W += wi; + wm_x += (x[i * xstride] - wm_x) * (wi / W); + wm_y += (y[i * ystride] - wm_y) * (wi / W); + } + } + + W = 0; /* reset the total weight */ + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + const double dx = x[i * xstride] - wm_x; + const double dy = y[i * ystride] - wm_y; + + W += wi; + wm_dx2 += (dx * dx - wm_dx2) * (wi / W); + wm_dxdy += (dx * dy - wm_dxdy) * (wi / W); + } + } + + /* In terms of y = a + b x */ + + { + double d2 = 0; + double b = wm_dxdy / wm_dx2; + double a = wm_y - wm_x * b; + + *c0 = a; + *c1 = b; + + *cov_00 = (1 / W) * (1 + wm_x * wm_x / wm_dx2); + *cov_11 = 1 / (W * wm_dx2); + + *cov_01 = -wm_x / (W * wm_dx2); + + /* Compute chi^2 = \sum w_i (y_i - (a + b * x_i))^2 */ + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + const double dx = x[i * xstride] - wm_x; + const double dy = y[i * ystride] - wm_y; + const double d = dy - b * dx; + d2 += wi * d * d; + } + } + + *chisq = d2; + } + + return GSL_SUCCESS; +} + + + +int +gsl_fit_linear_est (const double x, + const double c0, const double c1, + const double cov00, const double cov01, const double cov11, + double *y, double *y_err) +{ + *y = c0 + c1 * x; + *y_err = sqrt (cov00 + x * (2 * cov01 + cov11 * x)); + return GSL_SUCCESS; +} + + +int +gsl_fit_mul (const double *x, const size_t xstride, + const double *y, const size_t ystride, + const size_t n, + double *c1, double *cov_11, double *sumsq) +{ + double m_x = 0, m_y = 0, m_dx2 = 0, m_dxdy = 0; + + size_t i; + + for (i = 0; i < n; i++) + { + m_x += (x[i * xstride] - m_x) / (i + 1.0); + m_y += (y[i * ystride] - m_y) / (i + 1.0); + } + + for (i = 0; i < n; i++) + { + const double dx = x[i * xstride] - m_x; + const double dy = y[i * ystride] - m_y; + + m_dx2 += (dx * dx - m_dx2) / (i + 1.0); + m_dxdy += (dx * dy - m_dxdy) / (i + 1.0); + } + + /* In terms of y = b x */ + + { + double s2 = 0, d2 = 0; + double b = (m_x * m_y + m_dxdy) / (m_x * m_x + m_dx2); + + *c1 = b; + + /* Compute chi^2 = \sum (y_i - b * x_i)^2 */ + + for (i = 0; i < n; i++) + { + const double dx = x[i * xstride] - m_x; + const double dy = y[i * ystride] - m_y; + const double d = (m_y - b * m_x) + dy - b * dx; + d2 += d * d; + } + + s2 = d2 / (n - 1.0); /* chisq per degree of freedom */ + + *cov_11 = s2 * 1.0 / (n * (m_x * m_x + m_dx2)); + + *sumsq = d2; + } + + return GSL_SUCCESS; +} + + +int +gsl_fit_wmul (const double *x, const size_t xstride, + const double *w, const size_t wstride, + const double *y, const size_t ystride, + const size_t n, + double *c1, double *cov_11, double *chisq) +{ + + /* compute the weighted means and weighted deviations from the means */ + + /* wm denotes a "weighted mean", wm(f) = (sum_i w_i f_i) / (sum_i w_i) */ + + double W = 0, wm_x = 0, wm_y = 0, wm_dx2 = 0, wm_dxdy = 0; + + size_t i; + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + W += wi; + wm_x += (x[i * xstride] - wm_x) * (wi / W); + wm_y += (y[i * ystride] - wm_y) * (wi / W); + } + } + + W = 0; /* reset the total weight */ + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + const double dx = x[i * xstride] - wm_x; + const double dy = y[i * ystride] - wm_y; + + W += wi; + wm_dx2 += (dx * dx - wm_dx2) * (wi / W); + wm_dxdy += (dx * dy - wm_dxdy) * (wi / W); + } + } + + /* In terms of y = b x */ + + { + double d2 = 0; + double b = (wm_x * wm_y + wm_dxdy) / (wm_x * wm_x + wm_dx2); + + *c1 = b; + + *cov_11 = 1 / (W * (wm_x * wm_x + wm_dx2)); + + /* Compute chi^2 = \sum w_i (y_i - b * x_i)^2 */ + + for (i = 0; i < n; i++) + { + const double wi = w[i * wstride]; + + if (wi > 0) + { + const double dx = x[i * xstride] - wm_x; + const double dy = y[i * ystride] - wm_y; + const double d = (wm_y - b * wm_x) + (dy - b * dx); + d2 += wi * d * d; + } + } + + *chisq = d2; + } + + return GSL_SUCCESS; +} + +int +gsl_fit_mul_est (const double x, + const double c1, const double cov11, + double *y, double *y_err) +{ + *y = c1 * x; + *y_err = sqrt (cov11) * fabs (x); + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/fit/test.c b/software/gsl-1.15/fit/test.c new file mode 100644 index 000000000..255552201 --- /dev/null +++ b/software/gsl-1.15/fit/test.c @@ -0,0 +1,173 @@ +/* These tests are based on the NIST Statistical Reference Datasets + See http://www.nist.gov/itl/div898/strd/index.html for more + information. */ + +#include +#include +#include +#include +#include + +#include + +size_t norris_n = 36; + +double norris_x[] = { 0.2, 337.4, 118.2, 884.6, 10.1, 226.5, 666.3, 996.3, + 448.6, 777.0, 558.2, 0.4, 0.6, 775.5, 666.9, 338.0, + 447.5, 11.6, 556.0, 228.1, 995.8, 887.6, 120.2, 0.3, + 0.3, 556.8, 339.1, 887.2, 999.0, 779.0, 11.1, 118.3, + 229.2, 669.1, 448.9, 0.5 } ; + +double norris_y[] = { 0.1, 338.8, 118.1, 888.0, 9.2, 228.1, 668.5, 998.5, + 449.1, 778.9, 559.2, 0.3, 0.1, 778.1, 668.8, 339.3, + 448.9, 10.8, 557.7, 228.3, 998.0, 888.8, 119.6, 0.3, + 0.6, 557.6, 339.3, 888.0, 998.5, 778.9, 10.2, 117.6, + 228.9, 668.4, 449.2, 0.2}; + +size_t noint1_n = 11; +double noint1_x[] = { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70 }; +double noint1_y[] = { 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140}; + +size_t noint2_n = 3; +double noint2_x[] = { 4, 5, 6 } ; +double noint2_y[] = { 3, 4, 4 } ; + +int +main (void) +{ + + + double x[1000], y[1000], w[1000]; + + size_t xstride = 2, wstride = 3, ystride = 5; + size_t i; + + for (i = 0; i < norris_n; i++) + { + x[i*xstride] = norris_x[i]; + w[i*wstride] = 1.0; + y[i*ystride] = norris_y[i]; + } + + gsl_ieee_env_setup(); + + { + double c0, c1, cov00, cov01, cov11, sumsq; + + double expected_c0 = -0.262323073774029; + double expected_c1 = 1.00211681802045; + double expected_cov00 = pow(0.232818234301152, 2.0); + double expected_cov01 = -7.74327536339570e-05; /* computed from octave */ + double expected_cov11 = pow(0.429796848199937E-03, 2.0); + double expected_sumsq = 26.6173985294224; + + gsl_fit_linear (x, xstride, y, ystride, norris_n, + &c0, &c1, &cov00, &cov01, &cov11, &sumsq); + + /* gsl_fit_wlinear (x, xstride, w, wstride, y, ystride, norris_n, + &c0, &c1, &cov00, &cov01, &cov11, &sumsq); */ + + gsl_test_rel (c0, expected_c0, 1e-10, "norris gsl_fit_linear c0") ; + gsl_test_rel (c1, expected_c1, 1e-10, "norris gsl_fit_linear c1") ; + gsl_test_rel (cov00, expected_cov00, 1e-10, "norris gsl_fit_linear cov00") ; + gsl_test_rel (cov01, expected_cov01, 1e-10, "norris gsl_fit_linear cov01") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "norris gsl_fit_linear cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "norris gsl_fit_linear sumsq") ; + } + + { + double c0, c1, cov00, cov01, cov11, sumsq; + + double expected_c0 = -0.262323073774029; + double expected_c1 = 1.00211681802045; + double expected_cov00 = 6.92384428759429e-02; /* computed from octave */ + double expected_cov01 = -9.89095016390515e-05; /* computed from octave */ + double expected_cov11 = 2.35960747164148e-07; /* computed from octave */ + double expected_sumsq = 26.6173985294224; + + gsl_fit_wlinear (x, xstride, w, wstride, y, ystride, norris_n, + &c0, &c1, &cov00, &cov01, &cov11, &sumsq); + + gsl_test_rel (c0, expected_c0, 1e-10, "norris gsl_fit_wlinear c0") ; + gsl_test_rel (c1, expected_c1, 1e-10, "norris gsl_fit_wlinear c1") ; + gsl_test_rel (cov00, expected_cov00, 1e-10, "norris gsl_fit_wlinear cov00") ; + gsl_test_rel (cov01, expected_cov01, 1e-10, "norris gsl_fit_wlinear cov01") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "norris gsl_fit_wlinear cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "norris gsl_fit_wlinear sumsq") ; + } + + for (i = 0; i < noint1_n; i++) + { + x[i*xstride] = noint1_x[i]; + w[i*wstride] = 1.0; + y[i*ystride] = noint1_y[i]; + } + + { + double c1, cov11, sumsq; + + double expected_c1 = 2.07438016528926; + double expected_cov11 = pow(0.165289256198347E-01, 2.0); + double expected_sumsq = 127.272727272727; + + gsl_fit_mul (x, xstride, y, ystride, noint1_n, &c1, &cov11, &sumsq); + + gsl_test_rel (c1, expected_c1, 1e-10, "noint1 gsl_fit_mul c1") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "noint1 gsl_fit_mul cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "noint1 gsl_fit_mul sumsq") ; + } + + { + double c1, cov11, sumsq; + + double expected_c1 = 2.07438016528926; + double expected_cov11 = 2.14661371686165e-05; /* computed from octave */ + double expected_sumsq = 127.272727272727; + + gsl_fit_wmul (x, xstride, w, wstride, y, ystride, noint1_n, &c1, &cov11, &sumsq); + + gsl_test_rel (c1, expected_c1, 1e-10, "noint1 gsl_fit_wmul c1") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "noint1 gsl_fit_wmul cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "noint1 gsl_fit_wmul sumsq") ; + } + + + for (i = 0; i < noint2_n; i++) + { + x[i*xstride] = noint2_x[i]; + w[i*wstride] = 1.0; + y[i*ystride] = noint2_y[i]; + } + + { + double c1, cov11, sumsq; + + double expected_c1 = 0.727272727272727; + double expected_cov11 = pow(0.420827318078432E-01, 2.0); + double expected_sumsq = 0.272727272727273; + + gsl_fit_mul (x, xstride, y, ystride, noint2_n, &c1, &cov11, &sumsq); + + gsl_test_rel (c1, expected_c1, 1e-10, "noint2 gsl_fit_mul c1") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "noint2 gsl_fit_mul cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "noint2 gsl_fit_mul sumsq") ; + } + + { + double c1, cov11, sumsq; + + double expected_c1 = 0.727272727272727; + double expected_cov11 = 1.29870129870130e-02 ; /* computed from octave */ + double expected_sumsq = 0.272727272727273; + + gsl_fit_wmul (x, xstride, w, wstride, y, ystride, noint2_n, &c1, &cov11, &sumsq); + + gsl_test_rel (c1, expected_c1, 1e-10, "noint2 gsl_fit_wmul c1") ; + gsl_test_rel (cov11, expected_cov11, 1e-10, "noint2 gsl_fit_wmul cov11") ; + gsl_test_rel (sumsq, expected_sumsq, 1e-10, "noint2 gsl_fit_wmul sumsq") ; + } + + /* now summarize the results */ + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/gsl-config.in b/software/gsl-1.15/gsl-config.in new file mode 100755 index 000000000..3f3fa6164 --- /dev/null +++ b/software/gsl-1.15/gsl-config.in @@ -0,0 +1,80 @@ +#! /bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ + +usage() +{ + cat < +#include +#include +#include + +int +main (int argc, char **argv) +{ + double a = 0.0, b = 1.0; + size_t n = 10; + + if (argc != 3 && argc !=4) + { + printf ("Usage: gsl-histogram xmin xmax [n]\n"); + printf ( +"Computes a histogram of the data on stdin using n bins from xmin to xmax.\n" +"If n is unspecified then bins of integer width are used.\n"); + exit (0); + } + + a = atof (argv[1]); + b = atof (argv[2]); + + if (argc == 4) + { + n = atoi (argv[3]); + } + else + { + n = (int)(b - a) ; + } + + { + double x; + gsl_histogram *h = gsl_histogram_alloc (n); + + gsl_histogram_set_ranges_uniform (h, a, b); + + while (fscanf(stdin, "%lg", &x) == 1) + { + gsl_histogram_increment(h, x); + } + +#ifdef DISPLAY_STATS + { + double mean = gsl_histogram_mean (h); + double sigma = gsl_histogram_sigma (h); + fprintf (stdout, "# mean = %g\n", mean); + fprintf (stdout, "# sigma = %g\n", sigma); + } +#endif + + gsl_histogram_fprintf (stdout, h, "%g", "%g"); + + gsl_histogram_free (h); + } + + return 0; +} diff --git a/software/gsl-1.15/gsl-randist.c b/software/gsl-1.15/gsl-randist.c new file mode 100644 index 000000000..aec5e7d0a --- /dev/null +++ b/software/gsl-1.15/gsl-randist.c @@ -0,0 +1,394 @@ +/* randist/gsl-randist.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +void error (const char * s); + + +int +main (int argc, char *argv[]) +{ + size_t i,j; + size_t n = 0; + double mu = 0, nu = 0, nu1 = 0, nu2 = 0, sigma = 0, a = 0, b = 0, c = 0; + double zeta = 0, sigmax = 0, sigmay = 0, rho = 0; + double p = 0; + double x = 0, y =0, z=0 ; + unsigned int N = 0, t = 0, n1 = 0, n2 = 0 ; + unsigned long int seed = 0 ; + const char * name ; + gsl_rng * r ; + + if (argc < 4) + { + printf ( +"Usage: gsl-randist seed n DIST param1 param2 ...\n" +"Generates n samples from the distribution DIST with parameters param1,\n" +"param2, etc. Valid distributions are,\n\n"); + + printf( +" beta\n" +" binomial\n" +" bivariate-gaussian\n" +" cauchy\n" +" chisq\n" +" dir-2d\n" +" dir-3d\n" +" dir-nd\n" +" erlang\n" +" exponential\n" +" exppow\n" +" fdist\n" +" flat\n" +" gamma\n" +" gaussian-tail\n" +" gaussian\n" +" geometric\n" +" gumbel1\n" +" gumbel2\n" +" hypergeometric\n" +" laplace\n" +" landau\n" +" levy\n" +" levy-skew\n" +" logarithmic\n" +" logistic\n" +" lognormal\n" +" negative-binomial\n" +" pareto\n" +" pascal\n" +" poisson\n" +" rayleigh-tail\n" +" rayleigh\n" +" tdist\n" +" ugaussian-tail\n" +" ugaussian\n" +" weibull\n") ; + exit (0); + } + + argv++ ; seed = atol (argv[0]); argc-- ; + argv++ ; n = atol (argv[0]); argc-- ; + argv++ ; name = argv[0] ; argc-- ; argc-- ; + + gsl_rng_env_setup() ; + + if (gsl_rng_default_seed != 0) { + fprintf(stderr, + "overriding GSL_RNG_SEED with command line value, seed = %ld\n", + seed) ; + } + + gsl_rng_default_seed = seed ; + + r = gsl_rng_alloc(gsl_rng_default) ; + + +#define NAME(x) !strcmp(name,(x)) +#define OUTPUT(x) for (i = 0; i < n; i++) { printf("%g\n", (x)) ; } +#define OUTPUT1(a,x) for(i = 0; i < n; i++) { a ; printf("%g\n", x) ; } +#define OUTPUT2(a,x,y) for(i = 0; i < n; i++) { a ; printf("%g %g\n", x, y) ; } +#define OUTPUT3(a,x,y,z) for(i = 0; i < n; i++) { a ; printf("%g %g %g\n", x, y, z) ; } +#define INT_OUTPUT(x) for (i = 0; i < n; i++) { printf("%d\n", (x)) ; } +#define ARGS(x,y) if (argc != x) error(y) ; +#define DBL_ARG(x) if (argc) { x=atof((++argv)[0]);argc--;} else {error( #x);}; +#define INT_ARG(x) if (argc) { x=atoi((++argv)[0]);argc--;} else {error( #x);}; + + if (NAME("bernoulli")) + { + ARGS(1, "p = probability of success"); + DBL_ARG(p) + INT_OUTPUT(gsl_ran_bernoulli (r, p)); + } + else if (NAME("beta")) + { + ARGS(2, "a,b = shape parameters"); + DBL_ARG(a) + DBL_ARG(b) + OUTPUT(gsl_ran_beta (r, a, b)); + } + else if (NAME("binomial")) + { + ARGS(2, "p = probability, N = number of trials"); + DBL_ARG(p) + INT_ARG(N) + INT_OUTPUT(gsl_ran_binomial (r, p, N)); + } + else if (NAME("cauchy")) + { + ARGS(1, "a = scale parameter"); + DBL_ARG(a) + OUTPUT(gsl_ran_cauchy (r, a)); + } + else if (NAME("chisq")) + { + ARGS(1, "nu = degrees of freedom"); + DBL_ARG(nu) + OUTPUT(gsl_ran_chisq (r, nu)); + } + else if (NAME("erlang")) + { + ARGS(2, "a = scale parameter, b = order"); + DBL_ARG(a) + DBL_ARG(b) + OUTPUT(gsl_ran_erlang (r, a, b)); + } + else if (NAME("exponential")) + { + ARGS(1, "mu = mean value"); + DBL_ARG(mu) ; + OUTPUT(gsl_ran_exponential (r, mu)); + } + else if (NAME("exppow")) + { + ARGS(2, "a = scale parameter, b = power (1=exponential, 2=gaussian)"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_exppow (r, a, b)); + } + else if (NAME("fdist")) + { + ARGS(2, "nu1, nu2 = degrees of freedom parameters"); + DBL_ARG(nu1) ; + DBL_ARG(nu2) ; + OUTPUT(gsl_ran_fdist (r, nu1, nu2)); + } + else if (NAME("flat")) + { + ARGS(2, "a = lower limit, b = upper limit"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_flat (r, a, b)); + } + else if (NAME("gamma")) + { + ARGS(2, "a = order, b = scale"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_gamma (r, a, b)); + } + else if (NAME("gaussian")) + { + ARGS(1, "sigma = standard deviation"); + DBL_ARG(sigma) ; + OUTPUT(gsl_ran_gaussian (r, sigma)); + } + else if (NAME("gaussian-tail")) + { + ARGS(2, "a = lower limit, sigma = standard deviation"); + DBL_ARG(a) ; + DBL_ARG(sigma) ; + OUTPUT(gsl_ran_gaussian_tail (r, a, sigma)); + } + else if (NAME("ugaussian")) + { + ARGS(0, "unit gaussian, no parameters required"); + OUTPUT(gsl_ran_ugaussian (r)); + } + else if (NAME("ugaussian-tail")) + { + ARGS(1, "a = lower limit"); + DBL_ARG(a) ; + OUTPUT(gsl_ran_ugaussian_tail (r, a)); + } + else if (NAME("bivariate-gaussian")) + { + ARGS(3, "sigmax = x std.dev., sigmay = y std.dev., rho = correlation"); + DBL_ARG(sigmax) ; + DBL_ARG(sigmay) ; + DBL_ARG(rho) ; + OUTPUT2(gsl_ran_bivariate_gaussian (r, sigmax, sigmay, rho, &x, &y), + x, y); + } + else if (NAME("dir-2d")) + { + OUTPUT2(gsl_ran_dir_2d (r, &x, &y), x, y); + } + else if (NAME("dir-3d")) + { + OUTPUT3(gsl_ran_dir_3d (r, &x, &y, &z), x, y, z); + } + else if (NAME("dir-nd")) + { + double *xarr; + ARGS(1, "n1 = number of dimensions of hypersphere"); + INT_ARG(n1) ; + xarr = (double *)malloc(n1*sizeof(double)); + + for(i = 0; i < n; i++) { + gsl_ran_dir_nd (r, n1, xarr) ; + for (j = 0; j < n1; j++) { + if (j) putchar(' '); + printf("%g", xarr[j]) ; + } + putchar('\n'); + } ; + + free(xarr); + } + else if (NAME("geometric")) + { + ARGS(1, "p = bernoulli trial probability of success"); + DBL_ARG(p) ; + INT_OUTPUT(gsl_ran_geometric (r, p)); + } + else if (NAME("gumbel1")) + { + ARGS(2, "a = order, b = scale parameter"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_gumbel1 (r, a, b)); + } + else if (NAME("gumbel2")) + { + ARGS(2, "a = order, b = scale parameter"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_gumbel2 (r, a, b)); + } + else if (NAME("hypergeometric")) + { + ARGS(3, "n1 = tagged population, n2 = untagged population, t = number of trials"); + INT_ARG(n1) ; + INT_ARG(n2) ; + INT_ARG(t) ; + INT_OUTPUT(gsl_ran_hypergeometric (r, n1, n2, t)); + } + else if (NAME("laplace")) + { + ARGS(1, "a = scale parameter"); + DBL_ARG(a) ; + OUTPUT(gsl_ran_laplace (r, a)); + } + else if (NAME("landau")) + { + ARGS(0, "no arguments required"); + OUTPUT(gsl_ran_landau (r)); + } + else if (NAME("levy")) + { + ARGS(2, "c = scale, a = power (1=cauchy, 2=gaussian)"); + DBL_ARG(c) ; + DBL_ARG(a) ; + OUTPUT(gsl_ran_levy (r, c, a)); + } + else if (NAME("levy-skew")) + { + ARGS(3, "c = scale, a = power (1=cauchy, 2=gaussian), b = skew"); + DBL_ARG(c) ; + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_levy_skew (r, c, a, b)); + } + else if (NAME("logarithmic")) + { + ARGS(1, "p = probability"); + DBL_ARG(p) ; + INT_OUTPUT(gsl_ran_logarithmic (r, p)); + } + else if (NAME("logistic")) + { + ARGS(1, "a = scale parameter"); + DBL_ARG(a) ; + OUTPUT(gsl_ran_logistic (r, a)); + } + else if (NAME("lognormal")) + { + ARGS(2, "zeta = location parameter, sigma = scale parameter"); + DBL_ARG(zeta) ; + DBL_ARG(sigma) ; + OUTPUT(gsl_ran_lognormal (r, zeta, sigma)); + } + else if (NAME("negative-binomial")) + { + ARGS(2, "p = probability, a = order"); + DBL_ARG(p) ; + DBL_ARG(a) ; + INT_OUTPUT(gsl_ran_negative_binomial (r, p, a)); + } + else if (NAME("pareto")) + { + ARGS(2, "a = power, b = scale parameter"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_pareto (r, a, b)); + } + else if (NAME("pascal")) + { + ARGS(2, "p = probability, n = order (integer)"); + DBL_ARG(p) ; + INT_ARG(N) ; + INT_OUTPUT(gsl_ran_pascal (r, p, N)); + } + else if (NAME("poisson")) + { + ARGS(1, "mu = scale parameter"); + DBL_ARG(mu) ; + INT_OUTPUT(gsl_ran_poisson (r, mu)); + } + else if (NAME("rayleigh")) + { + ARGS(1, "sigma = scale parameter"); + DBL_ARG(sigma) ; + OUTPUT(gsl_ran_rayleigh (r, sigma)); + } + else if (NAME("rayleigh-tail")) + { + ARGS(2, "a = lower limit, sigma = scale parameter"); + DBL_ARG(a) ; + DBL_ARG(sigma) ; + OUTPUT(gsl_ran_rayleigh_tail (r, a, sigma)); + } + else if (NAME("tdist")) + { + ARGS(1, "nu = degrees of freedom"); + DBL_ARG(nu) ; + OUTPUT(gsl_ran_tdist (r, nu)); + } + else if (NAME("weibull")) + { + ARGS(2, "a = scale parameter, b = exponent"); + DBL_ARG(a) ; + DBL_ARG(b) ; + OUTPUT(gsl_ran_weibull (r, a, b)); + } + else + { + fprintf(stderr,"Error: unrecognized distribution: %s\n", name) ; + } + + return 0 ; +} + + +void +error (const char * s) +{ + fprintf(stderr, "Error: arguments should be %s\n",s) ; + exit (EXIT_FAILURE) ; +} diff --git a/software/gsl-1.15/gsl.m4 b/software/gsl-1.15/gsl.m4 new file mode 100644 index 000000000..fc7fb4429 --- /dev/null +++ b/software/gsl-1.15/gsl.m4 @@ -0,0 +1,162 @@ +# Configure path for the GNU Scientific Library +# Christopher R. Gabriel , April 2000 + + +AC_DEFUN([AX_PATH_GSL], +[ +AC_ARG_WITH(gsl-prefix,[ --with-gsl-prefix=PFX Prefix where GSL is installed (optional)], + gsl_prefix="$withval", gsl_prefix="") +AC_ARG_WITH(gsl-exec-prefix,[ --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)], + gsl_exec_prefix="$withval", gsl_exec_prefix="") +AC_ARG_ENABLE(gsltest, [ --disable-gsltest Do not try to compile and run a test GSL program], + , enable_gsltest=yes) + + if test "x${GSL_CONFIG+set}" != xset ; then + if test "x$gsl_prefix" != x ; then + GSL_CONFIG="$gsl_prefix/bin/gsl-config" + fi + if test "x$gsl_exec_prefix" != x ; then + GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config" + fi + fi + + AC_PATH_PROG(GSL_CONFIG, gsl-config, no) + min_gsl_version=ifelse([$1], ,0.2.5,$1) + AC_MSG_CHECKING(for GSL - version >= $min_gsl_version) + no_gsl="" + if test "$GSL_CONFIG" = "no" ; then + no_gsl=yes + else + GSL_CFLAGS=`$GSL_CONFIG --cflags` + GSL_LIBS=`$GSL_CONFIG --libs` + + gsl_major_version=`$GSL_CONFIG --version | \ + sed 's/^\([[0-9]]*\).*/\1/'` + if test "x${gsl_major_version}" = "x" ; then + gsl_major_version=0 + fi + + gsl_minor_version=`$GSL_CONFIG --version | \ + sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\2/'` + if test "x${gsl_minor_version}" = "x" ; then + gsl_minor_version=0 + fi + + gsl_micro_version=`$GSL_CONFIG --version | \ + sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\3/'` + if test "x${gsl_micro_version}" = "x" ; then + gsl_micro_version=0 + fi + + if test "x$enable_gsltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GSL_CFLAGS" + LIBS="$LIBS $GSL_LIBS" + + rm -f conf.gsltest + AC_TRY_RUN([ +#include +#include +#include + +char* my_strdup (const char *str); + +char* +my_strdup (const char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (void) +{ + int major = 0, minor = 0, micro = 0; + int n; + char *tmp_version; + + system ("touch conf.gsltest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_gsl_version"); + + n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ; + + if (n != 2 && n != 3) { + printf("%s, bad version string\n", "$min_gsl_version"); + exit(1); + } + + if (($gsl_major_version > major) || + (($gsl_major_version == major) && ($gsl_minor_version > minor)) || + (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro))) + { + exit(0); + } + else + { + exit(1); + } +} + +],, no_gsl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gsl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GSL_CONFIG" = "no" ; then + echo "*** The gsl-config script installed by GSL could not be found" + echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GSL_CONFIG environment variable to the" + echo "*** full path to gsl-config." + else + if test -f conf.gsltest ; then + : + else + echo "*** Could not run GSL test program, checking why..." + CFLAGS="$CFLAGS $GSL_CFLAGS" + LIBS="$LIBS $GSL_LIBS" + AC_TRY_LINK([ +#include +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GSL or finding the wrong" + echo "*** version of GSL. If it is not finding GSL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GSL was incorrectly installed" + echo "*** or that you have moved GSL since it was installed. In the latter case, you" + echo "*** may want to edit the gsl-config script: $GSL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi +# GSL_CFLAGS="" +# GSL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GSL_CFLAGS) + AC_SUBST(GSL_LIBS) + rm -f conf.gsltest +]) + +AU_ALIAS([AM_PATH_GSL], [AX_PATH_GSL]) diff --git a/software/gsl-1.15/gsl.pc.in b/software/gsl-1.15/gsl.pc.in new file mode 100644 index 000000000..5e9ef2184 --- /dev/null +++ b/software/gsl-1.15/gsl.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +GSL_CBLAS_LIB=-lgslcblas + +Name: GSL +Description: GNU Scientific Library +Version: @VERSION@ +Libs: @GSL_LIBS@ ${GSL_CBLAS_LIB} @GSL_LIBM@ @LIBS@ +Cflags: @GSL_CFLAGS@ diff --git a/software/gsl-1.15/gsl.spec b/software/gsl-1.15/gsl.spec new file mode 100644 index 000000000..710543a94 --- /dev/null +++ b/software/gsl-1.15/gsl.spec @@ -0,0 +1,80 @@ +Name: gsl +Summary: GNU Scientific Library (GSL) +Packager: jungman@lanl.gov, rosalia@lanl.gov +%define version 1.15 +%define release 0 +Version: %{version} +Release: %{release} +License: GPL +Vendor: The GSL Team +Distribution: research software +Source: gsl-%{version}.tar.gz +Group: Libraries/Research +%define mybuildroot /var/tmp/%{name}-build +BuildRoot: %{mybuildroot} + +%description + The GNU Scientific Library (GSL) is a numerical library for C and +C++ programmers. It contains over 1000 mathematical routines written +in ANSI C. The library follows modern coding conventions, and lends +itself to being used in very high level languages (VHLLs). + +The library covers the following subject areas: + + Complex Numbers Roots of Polynomials Special Functions + Vectors and Matrices Permutations Sorting + BLAS Support Linear Algebra Eigensystems + Fast Fourier Transforms Quadrature Random Numbers + Quasi-Random Sequences Random Distributions Statistics + Histograms N-Tuples Monte Carlo Integration + Simulated Annealing Differential Equations Interpolation + Numerical Differentiation Chebyshev Approximation Series Acceleration + Discrete Hankel Transforms Root-Finding Minimization + Least-Squares Fitting Physical Constants IEEE Floating-Point + +Further information can be found in the GSL Reference Manual. +Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +2006, 2007 The GSL Team. + +Install the gsl package if you need a library for high-level +scientific numerical analysis. + +%prep +%setup -q -n gsl-%{version} + +%build +CFLAGS="$RPM_OPT_FLAGS" +./configure --prefix=%{_prefix} \ + --bindir=%{_bindir} --mandir=%{_mandir} \ + --localstatedir=%{_localstatedir} --libdir=%{_libdir} \ + --datadir=%{_datadir} --includedir=%{_includedir} \ + --sysconfdir=%{_sysconfdir} +make + +%install +rm -rf $RPM_BUILD_ROOT + +make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ + mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \ + localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \ + datadir=$RPM_BUILD_ROOT%{_datadir} \ + includedir=$RPM_BUILD_ROOT%{_includedir} \ + sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc {NEWS,ChangeLog,INSTALL,README,AUTHORS,THANKS,SUPPORT,BUGS} +%doc /usr/info/* +/usr/bin/gsl-config +/usr/bin/gsl-histogram +/usr/bin/gsl-randist +/usr/lib +/usr/include/gsl +/usr/share/aclocal/gsl.m4 +/usr/share/man diff --git a/software/gsl-1.15/gsl.spec.in b/software/gsl-1.15/gsl.spec.in new file mode 100644 index 000000000..b89658fe9 --- /dev/null +++ b/software/gsl-1.15/gsl.spec.in @@ -0,0 +1,80 @@ +Name: gsl +Summary: GNU Scientific Library (GSL) +Packager: jungman@lanl.gov, rosalia@lanl.gov +%define version @VERSION@ +%define release 0 +Version: %{version} +Release: %{release} +License: GPL +Vendor: The GSL Team +Distribution: research software +Source: gsl-%{version}.tar.gz +Group: Libraries/Research +%define mybuildroot /var/tmp/%{name}-build +BuildRoot: %{mybuildroot} + +%description + The GNU Scientific Library (GSL) is a numerical library for C and +C++ programmers. It contains over 1000 mathematical routines written +in ANSI C. The library follows modern coding conventions, and lends +itself to being used in very high level languages (VHLLs). + +The library covers the following subject areas: + + Complex Numbers Roots of Polynomials Special Functions + Vectors and Matrices Permutations Sorting + BLAS Support Linear Algebra Eigensystems + Fast Fourier Transforms Quadrature Random Numbers + Quasi-Random Sequences Random Distributions Statistics + Histograms N-Tuples Monte Carlo Integration + Simulated Annealing Differential Equations Interpolation + Numerical Differentiation Chebyshev Approximation Series Acceleration + Discrete Hankel Transforms Root-Finding Minimization + Least-Squares Fitting Physical Constants IEEE Floating-Point + +Further information can be found in the GSL Reference Manual. +Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +2006, 2007 The GSL Team. + +Install the gsl package if you need a library for high-level +scientific numerical analysis. + +%prep +%setup -q -n gsl-%{version} + +%build +CFLAGS="$RPM_OPT_FLAGS" +./configure --prefix=%{_prefix} \ + --bindir=%{_bindir} --mandir=%{_mandir} \ + --localstatedir=%{_localstatedir} --libdir=%{_libdir} \ + --datadir=%{_datadir} --includedir=%{_includedir} \ + --sysconfdir=%{_sysconfdir} +make + +%install +rm -rf $RPM_BUILD_ROOT + +make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ + mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \ + localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \ + datadir=$RPM_BUILD_ROOT%{_datadir} \ + includedir=$RPM_BUILD_ROOT%{_includedir} \ + sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc {NEWS,ChangeLog,INSTALL,README,AUTHORS,THANKS,SUPPORT,BUGS} +%doc /usr/info/* +/usr/bin/gsl-config +/usr/bin/gsl-histogram +/usr/bin/gsl-randist +/usr/lib +/usr/include/gsl +/usr/share/aclocal/gsl.m4 +/usr/share/man diff --git a/software/gsl-1.15/gsl/Makefile.am b/software/gsl-1.15/gsl/Makefile.am new file mode 100644 index 000000000..4df31e8ff --- /dev/null +++ b/software/gsl-1.15/gsl/Makefile.am @@ -0,0 +1,17 @@ + +header-links: remove-links + HEADERLIST="$(top_srcdir)/gsl*.h $(top_srcdir)/*/gsl*.h"; \ + for h in $$HEADERLIST; do \ + BASENAME=`basename $$h`; \ + test -r $$BASENAME || $(LN_S) $$h $$BASENAME; \ + done + +remove-links: + rm -f gsl*.h + + +all: all-am header-links + +clean: clean-am remove-links +distclean: distclean-am remove-links + -rm -f Makefile diff --git a/software/gsl-1.15/gsl/Makefile.in b/software/gsl-1.15/gsl/Makefile.in new file mode 100644 index 000000000..c83bebc8c --- /dev/null +++ b/software/gsl-1.15/gsl/Makefile.in @@ -0,0 +1,387 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = gsl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gsl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gsl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +header-links: remove-links + HEADERLIST="$(top_srcdir)/gsl*.h $(top_srcdir)/*/gsl*.h"; \ + for h in $$HEADERLIST; do \ + BASENAME=`basename $$h`; \ + test -r $$BASENAME || $(LN_S) $$h $$BASENAME; \ + done + +remove-links: + rm -f gsl*.h + +all: all-am header-links + +clean: clean-am remove-links +distclean: distclean-am remove-links + -rm -f Makefile + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/gsl_inline.h b/software/gsl-1.15/gsl_inline.h new file mode 100644 index 000000000..2172201af --- /dev/null +++ b/software/gsl-1.15/gsl_inline.h @@ -0,0 +1,67 @@ +/* gsl_inline.h + * + * Copyright (C) 2008, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_INLINE_H__ +#define __GSL_INLINE_H__ + +/* In recent versiions of GCC, the inline keyword has two different + forms: GNU and C99. + + In GNU mode we can use 'extern inline' to make inline functions + work like macros. The function is only inlined--it is never output + as a definition in an object file. + + In the new C99 mode 'extern inline' has a different meaning--it + causes the definition of the function to be output in each object + file where it is used. This will result in multiple-definition + errors on linking. The 'inline' keyword on its own (without + extern) has the same behavior as the original GNU 'extern inline'. + + The C99 style is the default with -std=c99 in GCC 4.3. + + This header file allows either form of inline to be used by + redefining the macros INLINE_DECL and INLINE_FUN. These are used + in the public header files as + + INLINE_DECL double gsl_foo (double x); + #ifdef HAVE_INLINE + INLINE_FUN double gsl_foo (double x) { return x+1.0; } ; + #endif + +*/ + +#ifdef HAVE_INLINE +# if defined(__GNUC_STDC_INLINE__) || defined(GSL_C99_INLINE) || defined(HAVE_C99_INLINE) +# define INLINE_DECL inline /* use C99 inline */ +# define INLINE_FUN inline +# else +# define INLINE_DECL /* use GNU extern inline */ +# define INLINE_FUN extern inline +# endif +#else +# define INLINE_DECL /* */ +#endif + +/* Range checking conditions in headers do not require any run-time + tests of the global variable gsl_check_range. They are enabled or + disabled in user code at compile time with GSL_RANGE_CHECK macro. + See also build.h. */ +#define GSL_RANGE_COND(x) (x) + +#endif /* __GSL_INLINE_H__ */ diff --git a/software/gsl-1.15/gsl_machine.h b/software/gsl-1.15/gsl_machine.h new file mode 100644 index 000000000..c44ffc2a4 --- /dev/null +++ b/software/gsl-1.15/gsl_machine.h @@ -0,0 +1,104 @@ +/* Author: B. Gough and G. Jungman */ +#ifndef __GSL_MACHINE_H__ +#define __GSL_MACHINE_H__ + +#include +#include + +/* magic constants; mostly for the benefit of the implementation */ + +/* -*-MACHINE CONSTANTS-*- + * + * PLATFORM: Whiz-O-Matic 9000 + * FP_PLATFORM: IEEE-Virtual + * HOSTNAME: nnn.lanl.gov + * DATE: Fri Nov 20 17:53:26 MST 1998 + */ +#define GSL_DBL_EPSILON 2.2204460492503131e-16 +#define GSL_SQRT_DBL_EPSILON 1.4901161193847656e-08 +#define GSL_ROOT3_DBL_EPSILON 6.0554544523933429e-06 +#define GSL_ROOT4_DBL_EPSILON 1.2207031250000000e-04 +#define GSL_ROOT5_DBL_EPSILON 7.4009597974140505e-04 +#define GSL_ROOT6_DBL_EPSILON 2.4607833005759251e-03 +#define GSL_LOG_DBL_EPSILON (-3.6043653389117154e+01) + +#define GSL_DBL_MIN 2.2250738585072014e-308 +#define GSL_SQRT_DBL_MIN 1.4916681462400413e-154 +#define GSL_ROOT3_DBL_MIN 2.8126442852362996e-103 +#define GSL_ROOT4_DBL_MIN 1.2213386697554620e-77 +#define GSL_ROOT5_DBL_MIN 2.9476022969691763e-62 +#define GSL_ROOT6_DBL_MIN 5.3034368905798218e-52 +#define GSL_LOG_DBL_MIN (-7.0839641853226408e+02) + +#define GSL_DBL_MAX 1.7976931348623157e+308 +#define GSL_SQRT_DBL_MAX 1.3407807929942596e+154 +#define GSL_ROOT3_DBL_MAX 5.6438030941222897e+102 +#define GSL_ROOT4_DBL_MAX 1.1579208923731620e+77 +#define GSL_ROOT5_DBL_MAX 4.4765466227572707e+61 +#define GSL_ROOT6_DBL_MAX 2.3756689782295612e+51 +#define GSL_LOG_DBL_MAX 7.0978271289338397e+02 + +#define GSL_FLT_EPSILON 1.1920928955078125e-07 +#define GSL_SQRT_FLT_EPSILON 3.4526698300124393e-04 +#define GSL_ROOT3_FLT_EPSILON 4.9215666011518501e-03 +#define GSL_ROOT4_FLT_EPSILON 1.8581361171917516e-02 +#define GSL_ROOT5_FLT_EPSILON 4.1234622211652937e-02 +#define GSL_ROOT6_FLT_EPSILON 7.0153878019335827e-02 +#define GSL_LOG_FLT_EPSILON (-1.5942385152878742e+01) + +#define GSL_FLT_MIN 1.1754943508222875e-38 +#define GSL_SQRT_FLT_MIN 1.0842021724855044e-19 +#define GSL_ROOT3_FLT_MIN 2.2737367544323241e-13 +#define GSL_ROOT4_FLT_MIN 3.2927225399135965e-10 +#define GSL_ROOT5_FLT_MIN 2.5944428542140822e-08 +#define GSL_ROOT6_FLT_MIN 4.7683715820312542e-07 +#define GSL_LOG_FLT_MIN (-8.7336544750553102e+01) + +#define GSL_FLT_MAX 3.4028234663852886e+38 +#define GSL_SQRT_FLT_MAX 1.8446743523953730e+19 +#define GSL_ROOT3_FLT_MAX 6.9814635196223242e+12 +#define GSL_ROOT4_FLT_MAX 4.2949672319999986e+09 +#define GSL_ROOT5_FLT_MAX 5.0859007855960041e+07 +#define GSL_ROOT6_FLT_MAX 2.6422459233807749e+06 +#define GSL_LOG_FLT_MAX 8.8722839052068352e+01 + +#define GSL_SFLT_EPSILON 4.8828125000000000e-04 +#define GSL_SQRT_SFLT_EPSILON 2.2097086912079612e-02 +#define GSL_ROOT3_SFLT_EPSILON 7.8745065618429588e-02 +#define GSL_ROOT4_SFLT_EPSILON 1.4865088937534013e-01 +#define GSL_ROOT5_SFLT_EPSILON 2.1763764082403100e-01 +#define GSL_ROOT6_SFLT_EPSILON 2.8061551207734325e-01 +#define GSL_LOG_SFLT_EPSILON (-7.6246189861593985e+00) + +/* !MACHINE CONSTANTS! */ + + +/* a little internal backwards compatibility */ +#define GSL_MACH_EPS GSL_DBL_EPSILON + + + +/* Here are the constants related to or derived from + * machine constants. These are not to be confused with + * the constants that define various precision levels + * for the precision/error system. + * + * This information is determined at configure time + * and is platform dependent. Edit at your own risk. + * + * PLATFORM: WHIZ-O-MATIC + * CONFIG-DATE: Thu Nov 19 19:27:18 MST 1998 + * CONFIG-HOST: nnn.lanl.gov + */ + +/* machine precision constants */ +/* #define GSL_MACH_EPS 1.0e-15 */ +#define GSL_SQRT_MACH_EPS 3.2e-08 +#define GSL_ROOT3_MACH_EPS 1.0e-05 +#define GSL_ROOT4_MACH_EPS 0.000178 +#define GSL_ROOT5_MACH_EPS 0.00100 +#define GSL_ROOT6_MACH_EPS 0.00316 +#define GSL_LOG_MACH_EPS (-34.54) + + +#endif /* __GSL_MACHINE_H__ */ diff --git a/software/gsl-1.15/gsl_math.h b/software/gsl-1.15/gsl_math.h new file mode 100644 index 000000000..2d09df173 --- /dev/null +++ b/software/gsl-1.15/gsl_math.h @@ -0,0 +1,164 @@ +/* gsl_math.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATH_H__ +#define __GSL_MATH_H__ +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef M_E +#define M_E 2.71828182845904523536028747135 /* e */ +#endif + +#ifndef M_LOG2E +#define M_LOG2E 1.44269504088896340735992468100 /* log_2 (e) */ +#endif + +#ifndef M_LOG10E +#define M_LOG10E 0.43429448190325182765112891892 /* log_10 (e) */ +#endif + +#ifndef M_SQRT2 +#define M_SQRT2 1.41421356237309504880168872421 /* sqrt(2) */ +#endif + +#ifndef M_SQRT1_2 +#define M_SQRT1_2 0.70710678118654752440084436210 /* sqrt(1/2) */ +#endif + + +#ifndef M_SQRT3 +#define M_SQRT3 1.73205080756887729352744634151 /* sqrt(3) */ +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846264338328 /* pi */ +#endif + +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923132169164 /* pi/2 */ +#endif + +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830961566084582 /* pi/4 */ +#endif + +#ifndef M_SQRTPI +#define M_SQRTPI 1.77245385090551602729816748334 /* sqrt(pi) */ +#endif + +#ifndef M_2_SQRTPI +#define M_2_SQRTPI 1.12837916709551257389615890312 /* 2/sqrt(pi) */ +#endif + +#ifndef M_1_PI +#define M_1_PI 0.31830988618379067153776752675 /* 1/pi */ +#endif + +#ifndef M_2_PI +#define M_2_PI 0.63661977236758134307553505349 /* 2/pi */ +#endif + +#ifndef M_LN10 +#define M_LN10 2.30258509299404568401799145468 /* ln(10) */ +#endif + +#ifndef M_LN2 +#define M_LN2 0.69314718055994530941723212146 /* ln(2) */ +#endif + +#ifndef M_LNPI +#define M_LNPI 1.14472988584940017414342735135 /* ln(pi) */ +#endif + +#ifndef M_EULER +#define M_EULER 0.57721566490153286060651209008 /* Euler constant */ +#endif + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* other needlessly compulsive abstractions */ + +#define GSL_IS_ODD(n) ((n) & 1) +#define GSL_IS_EVEN(n) (!(GSL_IS_ODD(n))) +#define GSL_SIGN(x) ((x) >= 0.0 ? 1 : -1) + +/* Return nonzero if x is a real number, i.e. non NaN or infinite. */ +#define GSL_IS_REAL(x) (gsl_finite(x)) + +/* Definition of an arbitrary function with parameters */ + +struct gsl_function_struct +{ + double (* function) (double x, void * params); + void * params; +}; + +typedef struct gsl_function_struct gsl_function ; + +#define GSL_FN_EVAL(F,x) (*((F)->function))(x,(F)->params) + +/* Definition of an arbitrary function returning two values, r1, r2 */ + +struct gsl_function_fdf_struct +{ + double (* f) (double x, void * params); + double (* df) (double x, void * params); + void (* fdf) (double x, void * params, double * f, double * df); + void * params; +}; + +typedef struct gsl_function_fdf_struct gsl_function_fdf ; + +#define GSL_FN_FDF_EVAL_F(FDF,x) (*((FDF)->f))(x,(FDF)->params) +#define GSL_FN_FDF_EVAL_DF(FDF,x) (*((FDF)->df))(x,(FDF)->params) +#define GSL_FN_FDF_EVAL_F_DF(FDF,x,y,dy) (*((FDF)->fdf))(x,(FDF)->params,(y),(dy)) + + +/* Definition of an arbitrary vector-valued function with parameters */ + +struct gsl_function_vec_struct +{ + int (* function) (double x, double y[], void * params); + void * params; +}; + +typedef struct gsl_function_vec_struct gsl_function_vec ; + +#define GSL_FN_VEC_EVAL(F,x,y) (*((F)->function))(x,y,(F)->params) + +__END_DECLS + +#endif /* __GSL_MATH_H__ */ diff --git a/software/gsl-1.15/gsl_minmax.h b/software/gsl-1.15/gsl_minmax.h new file mode 100644 index 000000000..0d9a8360d --- /dev/null +++ b/software/gsl-1.15/gsl_minmax.h @@ -0,0 +1,102 @@ +/* gsl_minmax.h + * + * Copyright (C) 2008 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MINMAX_H__ +#define __GSL_MINMAX_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Define MAX and MIN macros/functions if they don't exist. */ + +/* plain old macros for general use */ +#define GSL_MAX(a,b) ((a) > (b) ? (a) : (b)) +#define GSL_MIN(a,b) ((a) < (b) ? (a) : (b)) + +/* function versions of the above, in case they are needed */ +double gsl_max (double a, double b); +double gsl_min (double a, double b); + +/* inline-friendly strongly typed versions */ +#ifdef HAVE_INLINE + +INLINE_FUN int GSL_MAX_INT (int a, int b); +INLINE_FUN int GSL_MIN_INT (int a, int b); +INLINE_FUN double GSL_MAX_DBL (double a, double b); +INLINE_FUN double GSL_MIN_DBL (double a, double b); +INLINE_FUN long double GSL_MAX_LDBL (long double a, long double b); +INLINE_FUN long double GSL_MIN_LDBL (long double a, long double b); + +INLINE_FUN int +GSL_MAX_INT (int a, int b) +{ + return GSL_MAX (a, b); +} + +INLINE_FUN int +GSL_MIN_INT (int a, int b) +{ + return GSL_MIN (a, b); +} + +INLINE_FUN double +GSL_MAX_DBL (double a, double b) +{ + return GSL_MAX (a, b); +} + +INLINE_FUN double +GSL_MIN_DBL (double a, double b) +{ + return GSL_MIN (a, b); +} + +INLINE_FUN long double +GSL_MAX_LDBL (long double a, long double b) +{ + return GSL_MAX (a, b); +} + +INLINE_FUN long double +GSL_MIN_LDBL (long double a, long double b) +{ + return GSL_MIN (a, b); +} +#else +#define GSL_MAX_INT(a,b) GSL_MAX(a,b) +#define GSL_MIN_INT(a,b) GSL_MIN(a,b) +#define GSL_MAX_DBL(a,b) GSL_MAX(a,b) +#define GSL_MIN_DBL(a,b) GSL_MIN(a,b) +#define GSL_MAX_LDBL(a,b) GSL_MAX(a,b) +#define GSL_MIN_LDBL(a,b) GSL_MIN(a,b) +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_POW_INT_H__ */ diff --git a/software/gsl-1.15/gsl_mode.h b/software/gsl-1.15/gsl_mode.h new file mode 100644 index 000000000..c8e5d55d6 --- /dev/null +++ b/software/gsl-1.15/gsl_mode.h @@ -0,0 +1,88 @@ +/* gsl_mode.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: B. Gough and G. Jungman */ + +#ifndef __GSL_MODE_H__ +#define __GSL_MODE_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Some functions can take a mode argument. This + * is a rough method to do things like control + * the precision of the algorithm. This mainly + * occurs in special functions, but we figured + * it was ok to have a general facility. + * + * The mode type is 32-bit field. Most of + * the fields are currently unused. Users + * '|' various predefined constants to get + * a desired mode. + */ +typedef unsigned int gsl_mode_t; + + +/* Here are the predefined constants. + * Note that the precision constants + * are special because they are used + * to index arrays, so do not change + * them. The precision information is + * in the low order 3 bits of gsl_mode_t + * (the third bit is currently unused). + */ + +/* Note that "0" is double precision, + * so that you get that by default if + * you forget a flag. + */ +#define GSL_PREC_DOUBLE 0 +#define GSL_PREC_SINGLE 1 +#define GSL_PREC_APPROX 2 + +#ifdef HAVE_INLINE +INLINE_FUN unsigned int GSL_MODE_PREC(gsl_mode_t mt); + +INLINE_FUN unsigned int +GSL_MODE_PREC(gsl_mode_t mt) +{ return (mt & (unsigned int)7); } +#else /* HAVE_INLINE */ +#define GSL_MODE_PREC(mt) ((mt) & (unsigned int)7) +#endif /* HAVE_INLINE */ + + +/* Here are some predefined generic modes. + */ +#define GSL_MODE_DEFAULT 0 + + +__END_DECLS + +#endif /* __GSL_MODE_H__ */ diff --git a/software/gsl-1.15/gsl_nan.h b/software/gsl-1.15/gsl_nan.h new file mode 100644 index 000000000..5cb52efc9 --- /dev/null +++ b/software/gsl-1.15/gsl_nan.h @@ -0,0 +1,45 @@ +/* gsl_nan.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_NAN_H__ +#define __GSL_NAN_H__ + +#ifdef INFINITY +# define GSL_POSINF INFINITY +# define GSL_NEGINF (-INFINITY) +#elif defined(HUGE_VAL) +# define GSL_POSINF HUGE_VAL +# define GSL_NEGINF (-HUGE_VAL) +#else +# define GSL_POSINF (gsl_posinf()) +# define GSL_NEGINF (gsl_neginf()) +#endif + +#ifdef NAN +# define GSL_NAN NAN +#elif defined(INFINITY) +# define GSL_NAN (INFINITY/INFINITY) +#else +# define GSL_NAN (gsl_nan()) +#endif + +#define GSL_POSZERO (+0.0) +#define GSL_NEGZERO (-0.0) + +#endif /* __GSL_NAN_H__ */ diff --git a/software/gsl-1.15/gsl_pow_int.h b/software/gsl-1.15/gsl_pow_int.h new file mode 100644 index 000000000..6aa01fbcf --- /dev/null +++ b/software/gsl-1.15/gsl_pow_int.h @@ -0,0 +1,61 @@ +/* gsl_pow_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_POW_INT_H__ +#define __GSL_POW_INT_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +INLINE_DECL double gsl_pow_2(const double x); +INLINE_DECL double gsl_pow_3(const double x); +INLINE_DECL double gsl_pow_4(const double x); +INLINE_DECL double gsl_pow_5(const double x); +INLINE_DECL double gsl_pow_6(const double x); +INLINE_DECL double gsl_pow_7(const double x); +INLINE_DECL double gsl_pow_8(const double x); +INLINE_DECL double gsl_pow_9(const double x); + +#ifdef HAVE_INLINE +INLINE_FUN double gsl_pow_2(const double x) { return x*x; } +INLINE_FUN double gsl_pow_3(const double x) { return x*x*x; } +INLINE_FUN double gsl_pow_4(const double x) { double x2 = x*x; return x2*x2; } +INLINE_FUN double gsl_pow_5(const double x) { double x2 = x*x; return x2*x2*x; } +INLINE_FUN double gsl_pow_6(const double x) { double x2 = x*x; return x2*x2*x2; } +INLINE_FUN double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x; } +INLINE_FUN double gsl_pow_8(const double x) { double x2 = x*x; double x4 = x2*x2; return x4*x4; } +INLINE_FUN double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; } +#endif + +double gsl_pow_int(double x, int n); +double gsl_pow_uint(double x, unsigned int n); + +__END_DECLS + +#endif /* __GSL_POW_INT_H__ */ diff --git a/software/gsl-1.15/gsl_precision.h b/software/gsl-1.15/gsl_precision.h new file mode 100644 index 000000000..97a204ead --- /dev/null +++ b/software/gsl-1.15/gsl_precision.h @@ -0,0 +1,66 @@ +/* gsl_precision.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: B. Gough and G. Jungman */ + +#ifndef __GSL_PRECISION_H__ +#define __GSL_PRECISION_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* A type for the precision indicator. + * This is mainly for pedagogy. + */ +typedef unsigned int gsl_prec_t; + + +/* The number of precision types. + * Remember that precision-mode + * can index an array. + */ +#define _GSL_PREC_T_NUM 3 + + +/* Arrays containing derived + * precision constants for the + * different precision levels. + */ +GSL_VAR const double gsl_prec_eps[]; +GSL_VAR const double gsl_prec_sqrt_eps[]; +GSL_VAR const double gsl_prec_root3_eps[]; +GSL_VAR const double gsl_prec_root4_eps[]; +GSL_VAR const double gsl_prec_root5_eps[]; +GSL_VAR const double gsl_prec_root6_eps[]; + + +__END_DECLS + +#endif /* __GSL_PRECISION_H__ */ diff --git a/software/gsl-1.15/gsl_types.h b/software/gsl-1.15/gsl_types.h new file mode 100644 index 000000000..0330f551f --- /dev/null +++ b/software/gsl-1.15/gsl_types.h @@ -0,0 +1,41 @@ +/* gsl_types.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_TYPES_H__ +#define __GSL_TYPES_H__ + +#ifndef GSL_VAR + +#ifdef WIN32 +# ifdef GSL_DLL +# ifdef DLL_EXPORT +# define GSL_VAR extern __declspec(dllexport) +# else +# define GSL_VAR extern __declspec(dllimport) +# endif +# else +# define GSL_VAR extern +# endif +#else +# define GSL_VAR extern +#endif + +#endif + +#endif /* __GSL_TYPES_H__ */ diff --git a/software/gsl-1.15/gsl_version.h b/software/gsl-1.15/gsl_version.h new file mode 100644 index 000000000..132af3161 --- /dev/null +++ b/software/gsl-1.15/gsl_version.h @@ -0,0 +1,26 @@ +#ifndef __GSL_VERSION_H__ +#define __GSL_VERSION_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif +__BEGIN_DECLS + + +#define GSL_VERSION "1.15" +#define GSL_MAJOR_VERSION 1 +#define GSL_MINOR_VERSION 15 + +GSL_VAR const char * gsl_version; + +__END_DECLS + +#endif /* __GSL_VERSION_H__ */ diff --git a/software/gsl-1.15/gsl_version.h.in b/software/gsl-1.15/gsl_version.h.in new file mode 100644 index 000000000..0b4882669 --- /dev/null +++ b/software/gsl-1.15/gsl_version.h.in @@ -0,0 +1,26 @@ +#ifndef __GSL_VERSION_H__ +#define __GSL_VERSION_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif +__BEGIN_DECLS + + +#define GSL_VERSION "@VERSION@" +#define GSL_MAJOR_VERSION @GSL_MAJOR_VERSION@ +#define GSL_MINOR_VERSION @GSL_MINOR_VERSION@ + +GSL_VAR const char * gsl_version; + +__END_DECLS + +#endif /* __GSL_VERSION_H__ */ diff --git a/software/gsl-1.15/histogram/.deps/add.Plo b/software/gsl-1.15/histogram/.deps/add.Plo new file mode 100644 index 000000000..4c99275ca --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/add.Plo @@ -0,0 +1,94 @@ +add.lo: add.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h find.c + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/add2d.Plo b/software/gsl-1.15/histogram/.deps/add2d.Plo new file mode 100644 index 000000000..c7b1dbfac --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/add2d.Plo @@ -0,0 +1,99 @@ +add2d.lo: add2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + ../gsl/gsl_histogram2d.h find2d.c find.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_histogram2d.h: + +find2d.c: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/calloc_range.Plo b/software/gsl-1.15/histogram/.deps/calloc_range.Plo new file mode 100644 index 000000000..be085ad59 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/calloc_range.Plo @@ -0,0 +1,92 @@ +calloc_range.lo: calloc_range.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/calloc_range2d.Plo b/software/gsl-1.15/histogram/.deps/calloc_range2d.Plo new file mode 100644 index 000000000..4a25f1f0d --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/calloc_range2d.Plo @@ -0,0 +1,92 @@ +calloc_range2d.lo: calloc_range2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: diff --git a/software/gsl-1.15/histogram/.deps/copy.Plo b/software/gsl-1.15/histogram/.deps/copy.Plo new file mode 100644 index 000000000..005edb1a6 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/copy.Plo @@ -0,0 +1,92 @@ +copy.lo: copy.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/copy2d.Plo b/software/gsl-1.15/histogram/.deps/copy2d.Plo new file mode 100644 index 000000000..da8a33b9b --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/copy2d.Plo @@ -0,0 +1,92 @@ +copy2d.lo: copy2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: diff --git a/software/gsl-1.15/histogram/.deps/file.Plo b/software/gsl-1.15/histogram/.deps/file.Plo new file mode 100644 index 000000000..9e4cd1201 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/file.Plo @@ -0,0 +1,129 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h \ + ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/file2d.Plo b/software/gsl-1.15/histogram/.deps/file2d.Plo new file mode 100644 index 000000000..4d90d0f92 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/file2d.Plo @@ -0,0 +1,129 @@ +file2d.lo: file2d.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h \ + ../gsl/gsl_histogram2d.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_histogram2d.h: diff --git a/software/gsl-1.15/histogram/.deps/get.Plo b/software/gsl-1.15/histogram/.deps/get.Plo new file mode 100644 index 000000000..df1252b85 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/get.Plo @@ -0,0 +1,94 @@ +get.lo: get.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h find.c + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/get2d.Plo b/software/gsl-1.15/histogram/.deps/get2d.Plo new file mode 100644 index 000000000..c1120d20b --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/get2d.Plo @@ -0,0 +1,94 @@ +get2d.lo: get2d.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h find.c + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/init.Plo b/software/gsl-1.15/histogram/.deps/init.Plo new file mode 100644 index 000000000..60f21d444 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/init.Plo @@ -0,0 +1,92 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/init2d.Plo b/software/gsl-1.15/histogram/.deps/init2d.Plo new file mode 100644 index 000000000..a83ef7818 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/init2d.Plo @@ -0,0 +1,95 @@ +init2d.lo: init2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_histogram2d.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: diff --git a/software/gsl-1.15/histogram/.deps/maxval.Plo b/software/gsl-1.15/histogram/.deps/maxval.Plo new file mode 100644 index 000000000..9c6831b87 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/maxval.Plo @@ -0,0 +1,92 @@ +maxval.lo: maxval.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/maxval2d.Plo b/software/gsl-1.15/histogram/.deps/maxval2d.Plo new file mode 100644 index 000000000..ef1edfc99 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/maxval2d.Plo @@ -0,0 +1,93 @@ +maxval2d.lo: maxval2d.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/oper.Plo b/software/gsl-1.15/histogram/.deps/oper.Plo new file mode 100644 index 000000000..9d7bbab86 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/oper.Plo @@ -0,0 +1,92 @@ +oper.lo: oper.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/oper2d.Plo b/software/gsl-1.15/histogram/.deps/oper2d.Plo new file mode 100644 index 000000000..691b17744 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/oper2d.Plo @@ -0,0 +1,92 @@ +oper2d.lo: oper2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: diff --git a/software/gsl-1.15/histogram/.deps/params.Plo b/software/gsl-1.15/histogram/.deps/params.Plo new file mode 100644 index 000000000..d7b53cd83 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/params.Plo @@ -0,0 +1,92 @@ +params.lo: params.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/params2d.Plo b/software/gsl-1.15/histogram/.deps/params2d.Plo new file mode 100644 index 000000000..cbf52a744 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/params2d.Plo @@ -0,0 +1,93 @@ +params2d.lo: params2d.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/pdf.Plo b/software/gsl-1.15/histogram/.deps/pdf.Plo new file mode 100644 index 000000000..2e1e21b8a --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/pdf.Plo @@ -0,0 +1,95 @@ +pdf.lo: pdf.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + find.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/pdf2d.Plo b/software/gsl-1.15/histogram/.deps/pdf2d.Plo new file mode 100644 index 000000000..27800a19c --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/pdf2d.Plo @@ -0,0 +1,97 @@ +pdf2d.lo: pdf2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + ../gsl/gsl_histogram2d.h find.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_histogram2d.h: + +find.c: diff --git a/software/gsl-1.15/histogram/.deps/reset.Plo b/software/gsl-1.15/histogram/.deps/reset.Plo new file mode 100644 index 000000000..0f3f299e5 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/reset.Plo @@ -0,0 +1,92 @@ +reset.lo: reset.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/reset2d.Plo b/software/gsl-1.15/histogram/.deps/reset2d.Plo new file mode 100644 index 000000000..8b4927e32 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/reset2d.Plo @@ -0,0 +1,92 @@ +reset2d.lo: reset2d.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram2d.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/stat.Plo b/software/gsl-1.15/histogram/.deps/stat.Plo new file mode 100644 index 000000000..232a38383 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/stat.Plo @@ -0,0 +1,95 @@ +stat.lo: stat.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/histogram/.deps/stat2d.Plo b/software/gsl-1.15/histogram/.deps/stat2d.Plo new file mode 100644 index 000000000..3fd0892e8 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/stat2d.Plo @@ -0,0 +1,94 @@ +stat2d.lo: stat2d.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_histogram2d.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/histogram/.deps/test.Po b/software/gsl-1.15/histogram/.deps/test.Po new file mode 100644 index 000000000..2f6938bfe --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test.Po @@ -0,0 +1,88 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_histogram.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/histogram/.deps/test1d.Po b/software/gsl-1.15/histogram/.deps/test1d.Po new file mode 100644 index 000000000..5eff543f3 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test1d.Po @@ -0,0 +1,88 @@ +test1d.o: test1d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_histogram.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/histogram/.deps/test1d_resample.Po b/software/gsl-1.15/histogram/.deps/test1d_resample.Po new file mode 100644 index 000000000..1cd5f1e19 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test1d_resample.Po @@ -0,0 +1,92 @@ +test1d_resample.o: test1d_resample.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_histogram.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h urand.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_histogram.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +urand.c: diff --git a/software/gsl-1.15/histogram/.deps/test1d_trap.Po b/software/gsl-1.15/histogram/.deps/test1d_trap.Po new file mode 100644 index 000000000..5c3773010 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test1d_trap.Po @@ -0,0 +1,97 @@ +test1d_trap.o: test1d_trap.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_histogram.h ../gsl/gsl_test.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/histogram/.deps/test2d.Po b/software/gsl-1.15/histogram/.deps/test2d.Po new file mode 100644 index 000000000..3e8f489b8 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test2d.Po @@ -0,0 +1,136 @@ +test2d.o: test2d.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_histogram2d.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_histogram2d.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/histogram/.deps/test2d_resample.Po b/software/gsl-1.15/histogram/.deps/test2d_resample.Po new file mode 100644 index 000000000..128a6127a --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test2d_resample.Po @@ -0,0 +1,92 @@ +test2d_resample.o: test2d_resample.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_histogram2d.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h urand.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_histogram2d.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +urand.c: diff --git a/software/gsl-1.15/histogram/.deps/test2d_trap.Po b/software/gsl-1.15/histogram/.deps/test2d_trap.Po new file mode 100644 index 000000000..dec1f7ec0 --- /dev/null +++ b/software/gsl-1.15/histogram/.deps/test2d_trap.Po @@ -0,0 +1,97 @@ +test2d_trap.o: test2d_trap.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_histogram2d.h \ + ../gsl/gsl_test.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_histogram2d.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/histogram/ChangeLog b/software/gsl-1.15/histogram/ChangeLog new file mode 100644 index 000000000..bb230bc71 --- /dev/null +++ b/software/gsl-1.15/histogram/ChangeLog @@ -0,0 +1,170 @@ +2009-07-09 Brian Gough + + * pdf2d.c (gsl_histogram2d_pdf_free): handle NULL argument in free + + * pdf.c (gsl_histogram_pdf_free): handle NULL argument in free + + * init2d.c (gsl_histogram2d_free): handle NULL argument in free + + * init.c (gsl_histogram_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2004-11-28 Brian Gough + + * init2d.c (make_uniform): compute uniform range without + cancellation error. + + * init.c (make_uniform): compute uniform range without + cancellation error. + +Tue Aug 27 19:36:43 2002 Brian Gough + + * test2d.c (main): changed test output format from %g to %e for + portability + + * test.c (main): changed test output format from %g to %e for + portability + +Wed Mar 6 22:03:35 2002 Brian Gough + + * test2d.c (main): cleaned up the tests a bit + + * stat2d.c: added checks for wi>0 (Achim Gaedke) + +Sat Jan 26 17:09:10 2002 Brian Gough + + * stat2d.c: added include for sqrt + +Fri Jan 18 21:45:35 2002 Brian Gough + + * stat2d.c: functions to compute statistics of 2d histograms + (Achim Gaedke) + +Mon Jan 14 19:34:31 2002 Brian Gough + + * stat.c (gsl_histogram_sum): new function to sum bins (Achim + Gaedke) + + * maxval2d.c (gsl_histogram2d_sum): new function to sum bins + (Achim Gaedke) + +Thu Oct 18 14:48:07 2001 Brian Gough + + * pdf2d.c (gsl_histogram2d_pdf_alloc): changed the definition of + the pdf alloc function to be consistent with the rest of the + library + + * pdf.c (gsl_histogram_pdf_alloc): changed the definition of the + pdf alloc function to be consistent with the rest of the library + + * init2d.c (gsl_histogram2d_alloc): added an alloc function for + consistency + + * init.c (gsl_histogram_alloc): added an alloc function for + consistency + +Wed Sep 12 13:38:40 2001 Brian Gough + + * stat.c (gsl_histogram_mean): fixed calculation of mean/sigma and + made it part of the library + +Sun Aug 19 13:31:35 2001 Brian Gough + + * test_gsl_histogram.sh: moved to top-level directory + +Sat Aug 18 22:21:26 2001 Brian Gough + + * gsl-histogram.c: moved to top-level directory + +Mon Jun 25 17:41:42 2001 Brian Gough + + * init2d.c (gsl_histogram2d_set_ranges_uniform): added range + initialization functions suggested by Achim Gaedke + + * init.c (gsl_histogram_set_ranges_uniform): added range + initialization functions suggested by Achim Gaedke + +Tue Apr 17 22:13:05 2001 Brian Gough + + * get2d.c: include "find.c" + +Mon Apr 16 20:13:45 2001 Brian Gough + + * get2d.c (gsl_histogram2d_get): removed unnecessary reference to + find2d + +Mon Jan 22 13:55:13 2001 Brian Gough + + * find.c (find): optimize for the linear case, include own binary + search for speed + + * add.c (gsl_histogram_accumulate): fix check of array bound for + index + +Sun May 28 12:23:46 2000 Brian Gough + + * test2d.c (main): use binary mode "b" when reading and writing + binary files + + * test.c (main): use binary mode "b" when reading and writing + binary files + +Wed Apr 26 15:09:22 2000 Brian Gough + + * oper2d.c (gsl_histogram2d_shift): added function for shifting + histogram by a constant offset + + * oper.c (gsl_histogram_shift): added function for shifting + histogram by a constant offset + +Wed Apr 19 17:27:44 2000 Brian Gough + + * added numerous extensions from Simone Piccardi + +2000-04-01 Mark Galassi + + * *.c: changed 0 -> GSL_SUCCESS where appropriate; THANKS to Dave + Morrison. + +Fri Nov 19 15:31:51 1999 Brian Gough + + * gsl-histogram.c (main): free memory before exit, eliminates + warning from checkergcc + + * test_gsl_histogram.sh: added a test for the gsl-histogram + program + +Fri Oct 1 15:47:01 1999 Brian Gough + + * file.c file2d.c: converted to use new block i/o functions + +Wed Aug 18 11:41:40 1999 Brian Gough + + * eliminated obvious memory leaks from the tests, so that we can + check that the _free functions work correctly + + * gsl-histogram.c (main): removed unused variable + +Fri Aug 6 11:19:37 1999 Brian Gough + + * removed dependence on rand() and RAND_MAX + +1999-08-05 Mark Galassi + + * gsl-histogram.c (main): fixed a simple logic bug. Thanks to + Barak Pearlmutter (bap@cs.unm.edu) for the patch. + +1998-11-06 + + * used a cast of (int) when attempting to print size_t variables + with %d + +Wed Sep 16 15:08:59 1998 Brian Gough + + * gsl-histogram.c (main): made the number of bins + optional. If you don't specify it then it uses bins of width 1. + + diff --git a/software/gsl-1.15/histogram/Makefile.am b/software/gsl-1.15/histogram/Makefile.am new file mode 100644 index 000000000..13c414cdc --- /dev/null +++ b/software/gsl-1.15/histogram/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libgslhistogram.la + +pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h + +INCLUDES = -I$(top_srcdir) + +libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c + +noinst_HEADERS = urand.c find.c find2d.c + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) + +EXTRA_DIST = urand.c + +test_SOURCES = test.c test1d.c test2d.c test1d_resample.c test2d_resample.c test1d_trap.c test2d_trap.c +test_LDADD = libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + +CLEANFILES = test.txt test.dat + diff --git a/software/gsl-1.15/histogram/Makefile.in b/software/gsl-1.15/histogram/Makefile.in new file mode 100644 index 000000000..3468769ad --- /dev/null +++ b/software/gsl-1.15/histogram/Makefile.in @@ -0,0 +1,700 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = histogram +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslhistogram_la_LIBADD = +am_libgslhistogram_la_OBJECTS = add.lo get.lo init.lo params.lo \ + reset.lo file.lo pdf.lo add2d.lo get2d.lo init2d.lo \ + params2d.lo reset2d.lo file2d.lo pdf2d.lo calloc_range.lo \ + calloc_range2d.lo copy.lo copy2d.lo maxval.lo maxval2d.lo \ + oper.lo oper2d.lo stat.lo stat2d.lo +libgslhistogram_la_OBJECTS = $(am_libgslhistogram_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test1d.$(OBJEXT) test2d.$(OBJEXT) \ + test1d_resample.$(OBJEXT) test2d_resample.$(OBJEXT) \ + test1d_trap.$(OBJEXT) test2d_trap.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslhistogram.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslhistogram_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslhistogram_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslhistogram.la +pkginclude_HEADERS = gsl_histogram.h gsl_histogram2d.h +INCLUDES = -I$(top_srcdir) +libgslhistogram_la_SOURCES = add.c get.c init.c params.c reset.c file.c pdf.c gsl_histogram.h add2d.c get2d.c init2d.c params2d.c reset2d.c file2d.c pdf2d.c gsl_histogram2d.h calloc_range.c calloc_range2d.c copy.c copy2d.c maxval.c maxval2d.c oper.c oper2d.c stat.c stat2d.c +noinst_HEADERS = urand.c find.c find2d.c +TESTS = $(check_PROGRAMS) +EXTRA_DIST = urand.c +test_SOURCES = test.c test1d.c test2d.c test1d_resample.c test2d_resample.c test1d_trap.c test2d_trap.c +test_LDADD = libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +CLEANFILES = test.txt test.dat +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu histogram/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu histogram/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslhistogram.la: $(libgslhistogram_la_OBJECTS) $(libgslhistogram_la_DEPENDENCIES) + $(LINK) $(libgslhistogram_la_OBJECTS) $(libgslhistogram_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calloc_range.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calloc_range2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxval2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oper2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/params.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/params2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdf2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reset2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test1d.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test1d_resample.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test1d_trap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2d.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2d_resample.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2d_trap.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/histogram/TODO b/software/gsl-1.15/histogram/TODO new file mode 100644 index 000000000..0b16e1970 --- /dev/null +++ b/software/gsl-1.15/histogram/TODO @@ -0,0 +1,6 @@ +# -*- org -*- +#+CATEGORY: histogram + +* Implement N-d histograms (Simone Piccardi is +working on something here). + diff --git a/software/gsl-1.15/histogram/add.c b/software/gsl-1.15/histogram/add.c new file mode 100644 index 000000000..634c7186a --- /dev/null +++ b/software/gsl-1.15/histogram/add.c @@ -0,0 +1,55 @@ +/* histogram/add.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "find.c" + +int +gsl_histogram_increment (gsl_histogram * h, double x) +{ + int status = gsl_histogram_accumulate (h, x, 1.0); + return status; +} + +int +gsl_histogram_accumulate (gsl_histogram * h, double x, double weight) +{ + const size_t n = h->n; + size_t index = 0; + + int status = find (h->n, h->range, x, &index); + + if (status) + { + return GSL_EDOM; + } + + if (index >= n) + { + GSL_ERROR ("index lies outside valid range of 0 .. n - 1", + GSL_ESANITY); + } + + h->bin[index] += weight; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/add2d.c b/software/gsl-1.15/histogram/add2d.c new file mode 100644 index 000000000..3d77c5c4e --- /dev/null +++ b/software/gsl-1.15/histogram/add2d.c @@ -0,0 +1,66 @@ +/* histogram/add2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "find2d.c" + +int +gsl_histogram2d_increment (gsl_histogram2d * h, double x, double y) +{ + int status = gsl_histogram2d_accumulate (h, x, y, 1.0); + return status; +} + +int +gsl_histogram2d_accumulate (gsl_histogram2d * h, + double x, double y, double weight) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + + size_t i = 0, j = 0; + + int status = find2d (h->nx, h->xrange, h->ny, h->yrange, x, y, &i, &j); + + if (status) + { + return GSL_EDOM; + } + + if (i >= nx) + { + GSL_ERROR ("index lies outside valid range of 0 .. nx - 1", + GSL_ESANITY); + } + + if (j >= ny) + { + GSL_ERROR ("index lies outside valid range of 0 .. ny - 1", + GSL_ESANITY); + } + + h->bin[i * ny + j] += weight; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/calloc_range.c b/software/gsl-1.15/histogram/calloc_range.c new file mode 100644 index 000000000..ba470c209 --- /dev/null +++ b/software/gsl-1.15/histogram/calloc_range.c @@ -0,0 +1,108 @@ +/* gsl_histogram_calloc_range.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram_calloc_range.c: + * Routine to create a variable binning histogram providing + * an input range vector. Need GSL library and header. + * Do range check and allocate the histogram data. + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include + +gsl_histogram * +gsl_histogram_calloc_range (size_t n, double *range) +{ + size_t i; + gsl_histogram *h; + + /* check arguments */ + + if (n == 0) + { + GSL_ERROR_VAL ("histogram length n must be positive integer", + GSL_EDOM, 0); + } + + /* check ranges */ + + for (i = 0; i < n; i++) + { + if (range[i] >= range[i + 1]) + { + GSL_ERROR_VAL ("histogram bin extremes must be " + "in increasing order", GSL_EDOM, 0); + } + } + + /* Allocate histogram */ + + h = (gsl_histogram *) malloc (sizeof (gsl_histogram)); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram struct", + GSL_ENOMEM, 0); + } + + h->range = (double *) malloc ((n + 1) * sizeof (double)); + + if (h->range == 0) + { + /* exception in constructor, avoid memory leak */ + free (h); + GSL_ERROR_VAL ("failed to allocate space for histogram ranges", + GSL_ENOMEM, 0); + } + + h->bin = (double *) malloc (n * sizeof (double)); + + if (h->bin == 0) + { + /* exception in constructor, avoid memory leak */ + free (h->range); + free (h); + GSL_ERROR_VAL ("failed to allocate space for histogram bins", + GSL_ENOMEM, 0); + } + + /* initialize ranges */ + + for (i = 0; i <= n; i++) + { + h->range[i] = range[i]; + } + + /* clear contents */ + + for (i = 0; i < n; i++) + { + h->bin[i] = 0; + } + + h->n = n; + + return h; +} diff --git a/software/gsl-1.15/histogram/calloc_range2d.c b/software/gsl-1.15/histogram/calloc_range2d.c new file mode 100644 index 000000000..0f7014fcc --- /dev/null +++ b/software/gsl-1.15/histogram/calloc_range2d.c @@ -0,0 +1,153 @@ +/* gsl_histogram2d_calloc_range.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram2d_calloc_range.c: + * Routine to create a variable binning 2D histogram providing + * the input range vectors. Need GSL library and header. + * Do range check and allocate the histogram data. + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include +/* + * Routine that create a 2D histogram using the given + * values for X and Y ranges + */ +gsl_histogram2d * +gsl_histogram2d_calloc_range (size_t nx, size_t ny, + double *xrange, + double *yrange) +{ + size_t i, j; + gsl_histogram2d *h; + + /* check arguments */ + + if (nx == 0) + { + GSL_ERROR_VAL ("histogram length nx must be positive integer", + GSL_EDOM, 0); + } + + if (ny == 0) + { + GSL_ERROR_VAL ("histogram length ny must be positive integer", + GSL_EDOM, 0); + } + + /* init ranges */ + + for (i = 0; i < nx; i++) + { + if (xrange[i] >= xrange[i + 1]) + { + GSL_ERROR_VAL ("histogram xrange not in increasing order", + GSL_EDOM, 0); + } + } + + for (j = 0; j < ny; j++) + { + if (yrange[j] >= yrange[j + 1]) + { + GSL_ERROR_VAL ("histogram yrange not in increasing order" + ,GSL_EDOM, 0); + } + } + + /* Allocate histogram */ + + h = (gsl_histogram2d *) malloc (sizeof (gsl_histogram2d)); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram struct", + GSL_ENOMEM, 0); + } + + h->xrange = (double *) malloc ((nx + 1) * sizeof (double)); + + if (h->xrange == 0) + { + /* exception in constructor, avoid memory leak */ + free (h); + + GSL_ERROR_VAL ("failed to allocate space for histogram xrange", + GSL_ENOMEM, 0); + } + + h->yrange = (double *) malloc ((ny + 1) * sizeof (double)); + + if (h->yrange == 0) + { + /* exception in constructor, avoid memory leak */ + free (h); + + GSL_ERROR_VAL ("failed to allocate space for histogram yrange", + GSL_ENOMEM, 0); + } + + h->bin = (double *) malloc (nx * ny * sizeof (double)); + + if (h->bin == 0) + { + /* exception in constructor, avoid memory leak */ + free (h->xrange); + free (h->yrange); + free (h); + + GSL_ERROR_VAL ("failed to allocate space for histogram bins", + GSL_ENOMEM, 0); + } + + /* init histogram */ + + /* init ranges */ + + for (i = 0; i <= nx; i++) + { + h->xrange[i] = xrange[i]; + } + + for (j = 0; j <= ny; j++) + { + h->yrange[j] = yrange[j]; + } + + /* clear contents */ + + for (i = 0; i < nx; i++) + { + for (j = 0; j < ny; j++) + { + h->bin[i * ny + j] = 0; + } + } + + h->nx = nx; + h->ny = ny; + + return h; +} diff --git a/software/gsl-1.15/histogram/copy.c b/software/gsl-1.15/histogram/copy.c new file mode 100644 index 000000000..41e476c61 --- /dev/null +++ b/software/gsl-1.15/histogram/copy.c @@ -0,0 +1,91 @@ +/* gsl_histogram_copy.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram_copy.c: + * Routine to copy an histogram. + * Need GSL library and headers. + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include + +/* + * gsl_histogram_copy: + * copy the contents of an histogram into another + */ + +int +gsl_histogram_memcpy (gsl_histogram * dest, const gsl_histogram * src) +{ + size_t n = src->n; + size_t i; + + if (dest->n != src->n) + { + GSL_ERROR ("histograms have different sizes, cannot copy", + GSL_EINVAL); + } + + for (i = 0; i <= n; i++) + { + dest->range[i] = src->range[i]; + } + + for (i = 0; i < n; i++) + { + dest->bin[i] = src->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram_duplicate: + * duplicate an histogram creating + * an identical new one + */ + +gsl_histogram * +gsl_histogram_clone (const gsl_histogram * src) +{ + size_t n = src->n; + size_t i; + gsl_histogram *h; + + h = gsl_histogram_calloc_range (n, src->range); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram struct", + GSL_ENOMEM, 0); + } + + for (i = 0; i < n; i++) + { + h->bin[i] = src->bin[i]; + } + + return h; +} diff --git a/software/gsl-1.15/histogram/copy2d.c b/software/gsl-1.15/histogram/copy2d.c new file mode 100644 index 000000000..830c7a1be --- /dev/null +++ b/software/gsl-1.15/histogram/copy2d.c @@ -0,0 +1,96 @@ +/* gsl_histogram2d_copy.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram2d_copy.c: + * Routine to copy a 2D histogram. + * Need GSL library and header. + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include + +/* + * gsl_histogram2d_copy: + * copy the contents of an histogram into another + */ +int +gsl_histogram2d_memcpy (gsl_histogram2d * dest, const gsl_histogram2d * src) +{ + size_t nx = src->nx; + size_t ny = src->ny; + size_t i; + if (dest->nx != src->nx || dest->ny != src->ny) + { + GSL_ERROR ("histograms have different sizes, cannot copy", + GSL_EINVAL); + } + + for (i = 0; i <= nx; i++) + { + dest->xrange[i] = src->xrange[i]; + } + + for (i = 0; i <= ny; i++) + { + dest->yrange[i] = src->yrange[i]; + } + + for (i = 0; i < nx * ny; i++) + { + dest->bin[i] = src->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_duplicate: + * duplicate an histogram creating + * an identical new one + */ + +gsl_histogram2d * +gsl_histogram2d_clone (const gsl_histogram2d * src) +{ + size_t nx = src->nx; + size_t ny = src->ny; + size_t i; + gsl_histogram2d *h; + + h = gsl_histogram2d_calloc_range (nx, ny, src->xrange, src->yrange); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram struct", + GSL_ENOMEM, 0); + } + + for (i = 0; i < nx * ny; i++) + { + h->bin[i] = src->bin[i]; + } + + return h; +} diff --git a/software/gsl-1.15/histogram/file.c b/software/gsl-1.15/histogram/file.c new file mode 100644 index 000000000..7caa23800 --- /dev/null +++ b/software/gsl-1.15/histogram/file.c @@ -0,0 +1,127 @@ +/* histogram/file.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_histogram_fread (FILE * stream, gsl_histogram * h) +{ + int status = gsl_block_raw_fread (stream, h->range, h->n + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fread (stream, h->bin, h->n, 1); + return status; +} + +int +gsl_histogram_fwrite (FILE * stream, const gsl_histogram * h) +{ + int status = gsl_block_raw_fwrite (stream, h->range, h->n + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fwrite (stream, h->bin, h->n, 1); + return status; +} + +int +gsl_histogram_fprintf (FILE * stream, const gsl_histogram * h, + const char *range_format, const char *bin_format) +{ + size_t i; + const size_t n = h->n; + + for (i = 0; i < n; i++) + { + int status = fprintf (stream, range_format, h->range[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, range_format, h->range[i + 1]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, bin_format, h->bin[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc ('\n', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +int +gsl_histogram_fscanf (FILE * stream, gsl_histogram * h) +{ + size_t i; + const size_t n = h->n; + double upper; + + for (i = 0; i < n; i++) + { + int status = fscanf (stream, + "%lg %lg %lg", h->range + i, &upper, + h->bin + i); + + if (status != 3) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + } + + h->range[n] = upper; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/file2d.c b/software/gsl-1.15/histogram/file2d.c new file mode 100644 index 000000000..26877840a --- /dev/null +++ b/software/gsl-1.15/histogram/file2d.c @@ -0,0 +1,184 @@ +/* histogram/file2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_histogram2d_fread (FILE * stream, gsl_histogram2d * h) +{ + int status = gsl_block_raw_fread (stream, h->xrange, h->nx + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fread (stream, h->yrange, h->ny + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fread (stream, h->bin, h->nx * h->ny, 1); + + return status; +} + +int +gsl_histogram2d_fwrite (FILE * stream, const gsl_histogram2d * h) +{ + int status = gsl_block_raw_fwrite (stream, h->xrange, h->nx + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fwrite (stream, h->yrange, h->ny + 1, 1); + + if (status) + return status; + + status = gsl_block_raw_fwrite (stream, h->bin, h->nx * h->ny, 1); + return status; +} + +int +gsl_histogram2d_fprintf (FILE * stream, const gsl_histogram2d * h, + const char *range_format, const char *bin_format) +{ + size_t i, j; + const size_t nx = h->nx; + const size_t ny = h->ny; + int status; + + for (i = 0; i < nx; i++) + { + for (j = 0; j < ny; j++) + { + status = fprintf (stream, range_format, h->xrange[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, range_format, h->xrange[i + 1]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, range_format, h->yrange[j]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, range_format, h->yrange[j + 1]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc (' ', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + + status = fprintf (stream, bin_format, h->bin[i * ny + j]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + + status = putc ('\n', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + status = putc ('\n', stream); + + if (status == EOF) + { + GSL_ERROR ("putc failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +int +gsl_histogram2d_fscanf (FILE * stream, gsl_histogram2d * h) +{ + size_t i, j; + const size_t nx = h->nx; + const size_t ny = h->ny; + double xupper, yupper; + + for (i = 0; i < nx; i++) + { + for (j = 0; j < ny; j++) + { + int status = fscanf (stream, + "%lg %lg %lg %lg %lg", + h->xrange + i, &xupper, + h->yrange + j, &yupper, + h->bin + i * ny + j); + + if (status != 5) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + } + h->yrange[ny] = yupper; + } + + h->xrange[nx] = xupper; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/find.c b/software/gsl-1.15/histogram/find.c new file mode 100644 index 000000000..d2de2e733 --- /dev/null +++ b/software/gsl-1.15/histogram/find.c @@ -0,0 +1,86 @@ +/* histogram/find.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* determines whether to optimize for linear ranges */ +#define LINEAR_OPT 1 + +static int find (const size_t n, const double range[], + const double x, size_t * i); + +static int +find (const size_t n, const double range[], const double x, size_t * i) +{ + size_t i_linear, lower, upper, mid; + + if (x < range[0]) + { + return -1; + } + + if (x >= range[n]) + { + return +1; + } + + /* optimize for linear case */ + +#ifdef LINEAR_OPT + { + double u = (x - range[0]) / (range[n] - range[0]); + i_linear = (size_t) (u * n); + } + + if (x >= range[i_linear] && x < range[i_linear + 1]) + { + *i = i_linear; + return 0; + } +#endif + + /* perform binary search */ + + upper = n ; + lower = 0 ; + + while (upper - lower > 1) + { + mid = (upper + lower) / 2 ; + + if (x >= range[mid]) + { + lower = mid ; + } + else + { + upper = mid ; + } + } + + *i = lower ; + + /* sanity check the result */ + + if (x < range[lower] || x >= range[lower + 1]) + { + GSL_ERROR ("x not found in range", GSL_ESANITY); + } + + return 0; +} + diff --git a/software/gsl-1.15/histogram/find2d.c b/software/gsl-1.15/histogram/find2d.c new file mode 100644 index 000000000..c24557907 --- /dev/null +++ b/software/gsl-1.15/histogram/find2d.c @@ -0,0 +1,50 @@ +/* histogram/find2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "find.c" + +static int +find2d (const size_t nx, const double xrange[], + const size_t ny, const double yrange[], + const double x, const double y, + size_t * i, size_t * j); + + +static int +find2d (const size_t nx, const double xrange[], + const size_t ny, const double yrange[], + const double x, const double y, + size_t * i, size_t * j) +{ + int status = find (nx, xrange, x, i); + + if (status) + { + return status; + } + + status = find (ny, yrange, y, j); + + if (status) + { + return status; + } + + return 0; +} diff --git a/software/gsl-1.15/histogram/get.c b/software/gsl-1.15/histogram/get.c new file mode 100644 index 000000000..d5bdea6a8 --- /dev/null +++ b/software/gsl-1.15/histogram/get.c @@ -0,0 +1,69 @@ +/* histogram/get.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "find.c" + +double +gsl_histogram_get (const gsl_histogram * h, size_t i) +{ + const size_t n = h->n; + + if (i >= n) + { + GSL_ERROR_VAL ("index lies outside valid range of 0 .. n - 1", + GSL_EDOM, 0); + } + + return h->bin[i]; +} + +int +gsl_histogram_get_range (const gsl_histogram * h, size_t i, + double *lower, double *upper) +{ + const size_t n = h->n; + + if (i >= n) + { + GSL_ERROR ("index lies outside valid range of 0 .. n - 1", GSL_EDOM); + } + + *lower = h->range[i]; + *upper = h->range[i + 1]; + + return GSL_SUCCESS; +} + +int +gsl_histogram_find (const gsl_histogram * h, + const double x, size_t * i) +{ + int status = find (h->n, h->range, x, i); + + if (status) + { + GSL_ERROR ("x not found in range of h", GSL_EDOM); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/get2d.c b/software/gsl-1.15/histogram/get2d.c new file mode 100644 index 000000000..24582464c --- /dev/null +++ b/software/gsl-1.15/histogram/get2d.c @@ -0,0 +1,101 @@ +/* histogram/get2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "find.c" + +double +gsl_histogram2d_get (const gsl_histogram2d * h, const size_t i, const size_t j) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + + if (i >= nx) + { + GSL_ERROR_VAL ("index i lies outside valid range of 0 .. nx - 1", + GSL_EDOM, 0); + } + + if (j >= ny) + { + GSL_ERROR_VAL ("index j lies outside valid range of 0 .. ny - 1", + GSL_EDOM, 0); + } + + return h->bin[i * ny + j]; +} + +int +gsl_histogram2d_get_xrange (const gsl_histogram2d * h, const size_t i, + double *xlower, double *xupper) +{ + const size_t nx = h->nx; + + if (i >= nx) + { + GSL_ERROR ("index i lies outside valid range of 0 .. nx - 1", GSL_EDOM); + } + + *xlower = h->xrange[i]; + *xupper = h->xrange[i + 1]; + + return GSL_SUCCESS; +} + +int +gsl_histogram2d_get_yrange (const gsl_histogram2d * h, const size_t j, + double *ylower, double *yupper) +{ + const size_t ny = h->ny; + + if (j >= ny) + { + GSL_ERROR ("index j lies outside valid range of 0 .. ny - 1", GSL_EDOM); + } + + *ylower = h->yrange[j]; + *yupper = h->yrange[j + 1]; + + return GSL_SUCCESS; +} + +int +gsl_histogram2d_find (const gsl_histogram2d * h, + const double x, const double y, + size_t * i, size_t * j) +{ + int status = find (h->nx, h->xrange, x, i); + + if (status) + { + GSL_ERROR ("x not found in range of h", GSL_EDOM); + } + + status = find (h->ny, h->yrange, y, j); + + if (status) + { + GSL_ERROR ("y not found in range of h", GSL_EDOM); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/gsl_histogram.h b/software/gsl-1.15/histogram/gsl_histogram.h new file mode 100644 index 000000000..e8375c64e --- /dev/null +++ b/software/gsl-1.15/histogram/gsl_histogram.h @@ -0,0 +1,134 @@ +/* histogram/gsl_histogram.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_HISTOGRAM_H__ +#define __GSL_HISTOGRAM_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + size_t n ; + double * range ; + double * bin ; +} gsl_histogram ; + +typedef struct { + size_t n ; + double * range ; + double * sum ; +} gsl_histogram_pdf ; + +gsl_histogram * gsl_histogram_alloc (size_t n); + +gsl_histogram * gsl_histogram_calloc (size_t n); +gsl_histogram * gsl_histogram_calloc_uniform (const size_t n, const double xmin, const double xmax); +void gsl_histogram_free (gsl_histogram * h); +int gsl_histogram_increment (gsl_histogram * h, double x); +int gsl_histogram_accumulate (gsl_histogram * h, double x, double weight); +int gsl_histogram_find (const gsl_histogram * h, + const double x, size_t * i); + +double gsl_histogram_get (const gsl_histogram * h, size_t i); +int gsl_histogram_get_range (const gsl_histogram * h, size_t i, + double * lower, double * upper); + +double gsl_histogram_max (const gsl_histogram * h); +double gsl_histogram_min (const gsl_histogram * h); +size_t gsl_histogram_bins (const gsl_histogram * h); + +void gsl_histogram_reset (gsl_histogram * h); + +gsl_histogram * gsl_histogram_calloc_range(size_t n, double * range); + +int +gsl_histogram_set_ranges (gsl_histogram * h, const double range[], size_t size); +int +gsl_histogram_set_ranges_uniform (gsl_histogram * h, double xmin, double xmax); + + + +int +gsl_histogram_memcpy(gsl_histogram * dest, const gsl_histogram * source); + +gsl_histogram * +gsl_histogram_clone(const gsl_histogram * source); + +double gsl_histogram_max_val (const gsl_histogram * h); + +size_t gsl_histogram_max_bin (const gsl_histogram * h); + +double gsl_histogram_min_val (const gsl_histogram * h); + +size_t gsl_histogram_min_bin (const gsl_histogram * h); + +int +gsl_histogram_equal_bins_p(const gsl_histogram *h1, const gsl_histogram *h2); + +int +gsl_histogram_add(gsl_histogram *h1, const gsl_histogram *h2); + +int +gsl_histogram_sub(gsl_histogram *h1, const gsl_histogram *h2); + +int +gsl_histogram_mul(gsl_histogram *h1, const gsl_histogram *h2); + +int +gsl_histogram_div(gsl_histogram *h1, const gsl_histogram *h2); + +int +gsl_histogram_scale(gsl_histogram *h, double scale); + +int +gsl_histogram_shift (gsl_histogram * h, double shift); + + +double gsl_histogram_sigma (const gsl_histogram * h); + +double gsl_histogram_mean (const gsl_histogram * h); + +double gsl_histogram_sum (const gsl_histogram * h); + +int gsl_histogram_fwrite (FILE * stream, const gsl_histogram * h) ; +int gsl_histogram_fread (FILE * stream, gsl_histogram * h); +int gsl_histogram_fprintf (FILE * stream, const gsl_histogram * h, + const char * range_format, const char * bin_format); +int gsl_histogram_fscanf (FILE * stream, gsl_histogram * h); + +gsl_histogram_pdf * gsl_histogram_pdf_alloc (const size_t n); +int gsl_histogram_pdf_init (gsl_histogram_pdf * p, const gsl_histogram * h); +void gsl_histogram_pdf_free (gsl_histogram_pdf * p); +double gsl_histogram_pdf_sample (const gsl_histogram_pdf * p, double r); + +__END_DECLS + +#endif /* __GSL_HISTOGRAM_H__ */ diff --git a/software/gsl-1.15/histogram/gsl_histogram2d.h b/software/gsl-1.15/histogram/gsl_histogram2d.h new file mode 100644 index 000000000..90065ac0c --- /dev/null +++ b/software/gsl-1.15/histogram/gsl_histogram2d.h @@ -0,0 +1,172 @@ +/* histogram/gsl_histogram2d.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_HISTOGRAM2D_H__ +#define __GSL_HISTOGRAM2D_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + size_t nx, ny ; + double * xrange ; + double * yrange ; + double * bin ; +} gsl_histogram2d ; + +typedef struct { + size_t nx, ny ; + double * xrange ; + double * yrange ; + double * sum ; +} gsl_histogram2d_pdf ; + +gsl_histogram2d * gsl_histogram2d_alloc (const size_t nx, const size_t ny); +gsl_histogram2d * gsl_histogram2d_calloc (const size_t nx, const size_t ny); +gsl_histogram2d * gsl_histogram2d_calloc_uniform (const size_t nx, const size_t ny, + const double xmin, const double xmax, + const double ymin, const double ymax); + +void gsl_histogram2d_free (gsl_histogram2d * h); + +int gsl_histogram2d_increment (gsl_histogram2d * h, double x, double y); +int gsl_histogram2d_accumulate (gsl_histogram2d * h, + double x, double y, double weight); +int gsl_histogram2d_find (const gsl_histogram2d * h, + const double x, const double y, size_t * i, size_t * j); + +double gsl_histogram2d_get (const gsl_histogram2d * h, const size_t i, const size_t j); +int gsl_histogram2d_get_xrange (const gsl_histogram2d * h, const size_t i, + double * xlower, double * xupper); +int gsl_histogram2d_get_yrange (const gsl_histogram2d * h, const size_t j, + double * ylower, double * yupper); + + +double gsl_histogram2d_xmax (const gsl_histogram2d * h); +double gsl_histogram2d_xmin (const gsl_histogram2d * h); +size_t gsl_histogram2d_nx (const gsl_histogram2d * h); + +double gsl_histogram2d_ymax (const gsl_histogram2d * h); +double gsl_histogram2d_ymin (const gsl_histogram2d * h); +size_t gsl_histogram2d_ny (const gsl_histogram2d * h); + +void gsl_histogram2d_reset (gsl_histogram2d * h); + +gsl_histogram2d * +gsl_histogram2d_calloc_range(size_t nx, size_t ny, + double *xrange, double *yrange); + +int +gsl_histogram2d_set_ranges_uniform (gsl_histogram2d * h, + double xmin, double xmax, + double ymin, double ymax); + +int +gsl_histogram2d_set_ranges (gsl_histogram2d * h, + const double xrange[], size_t xsize, + const double yrange[], size_t ysize); + +int +gsl_histogram2d_memcpy(gsl_histogram2d *dest, const gsl_histogram2d *source); + +gsl_histogram2d * +gsl_histogram2d_clone(const gsl_histogram2d * source); + +double +gsl_histogram2d_max_val(const gsl_histogram2d *h); + +void +gsl_histogram2d_max_bin (const gsl_histogram2d *h, size_t *i, size_t *j); + +double +gsl_histogram2d_min_val(const gsl_histogram2d *h); + +void +gsl_histogram2d_min_bin (const gsl_histogram2d *h, size_t *i, size_t *j); + +double +gsl_histogram2d_xmean (const gsl_histogram2d * h); + +double +gsl_histogram2d_ymean (const gsl_histogram2d * h); + +double +gsl_histogram2d_xsigma (const gsl_histogram2d * h); + +double +gsl_histogram2d_ysigma (const gsl_histogram2d * h); + +double +gsl_histogram2d_cov (const gsl_histogram2d * h); + +double +gsl_histogram2d_sum (const gsl_histogram2d *h); + +int +gsl_histogram2d_equal_bins_p(const gsl_histogram2d *h1, + const gsl_histogram2d *h2) ; + +int +gsl_histogram2d_add(gsl_histogram2d *h1, const gsl_histogram2d *h2); + +int +gsl_histogram2d_sub(gsl_histogram2d *h1, const gsl_histogram2d *h2); + +int +gsl_histogram2d_mul(gsl_histogram2d *h1, const gsl_histogram2d *h2); + +int +gsl_histogram2d_div(gsl_histogram2d *h1, const gsl_histogram2d *h2); + +int +gsl_histogram2d_scale(gsl_histogram2d *h, double scale); + +int +gsl_histogram2d_shift(gsl_histogram2d *h, double shift); + +int gsl_histogram2d_fwrite (FILE * stream, const gsl_histogram2d * h) ; +int gsl_histogram2d_fread (FILE * stream, gsl_histogram2d * h); +int gsl_histogram2d_fprintf (FILE * stream, const gsl_histogram2d * h, + const char * range_format, + const char * bin_format); +int gsl_histogram2d_fscanf (FILE * stream, gsl_histogram2d * h); + +gsl_histogram2d_pdf * gsl_histogram2d_pdf_alloc (const size_t nx, const size_t ny); +int gsl_histogram2d_pdf_init (gsl_histogram2d_pdf * p, const gsl_histogram2d * h); +void gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * p); +int gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf * p, + double r1, double r2, + double * x, double * y); + +__END_DECLS + +#endif /* __GSL_HISTOGRAM2D_H__ */ + diff --git a/software/gsl-1.15/histogram/init.c b/software/gsl-1.15/histogram/init.c new file mode 100644 index 000000000..6c2fdf740 --- /dev/null +++ b/software/gsl-1.15/histogram/init.c @@ -0,0 +1,199 @@ +/* histogram/init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_histogram * +gsl_histogram_alloc (size_t n) +{ + gsl_histogram *h; + + if (n == 0) + { + GSL_ERROR_VAL ("histogram length n must be positive integer", + GSL_EDOM, 0); + } + + h = (gsl_histogram *) malloc (sizeof (gsl_histogram)); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram struct", + GSL_ENOMEM, 0); + } + + h->range = (double *) malloc ((n + 1) * sizeof (double)); + + if (h->range == 0) + { + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram ranges", + GSL_ENOMEM, 0); + } + + h->bin = (double *) malloc (n * sizeof (double)); + + if (h->bin == 0) + { + free (h->range); + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram bins", + GSL_ENOMEM, 0); + } + + h->n = n; + + return h; +} + +static void +make_uniform (double range[], size_t n, double xmin, double xmax) +{ + size_t i; + + for (i = 0; i <= n; i++) + { + double f1 = ((double) (n-i) / (double) n); + double f2 = ((double) i / (double) n); + range[i] = f1 * xmin + f2 * xmax; + } +} + +gsl_histogram * +gsl_histogram_calloc_uniform (const size_t n, const double xmin, + const double xmax) +{ + gsl_histogram *h; + + if (xmin >= xmax) + { + GSL_ERROR_VAL ("xmin must be less than xmax", GSL_EINVAL, 0); + } + + h = gsl_histogram_calloc (n); + + if (h == 0) + { + return h; + } + + make_uniform (h->range, n, xmin, xmax); + + return h; +} + +gsl_histogram * +gsl_histogram_calloc (size_t n) +{ + gsl_histogram * h = gsl_histogram_alloc (n); + + if (h == 0) + { + return h; + } + + { + size_t i; + + for (i = 0; i < n + 1; i++) + { + h->range[i] = i; + } + + for (i = 0; i < n; i++) + { + h->bin[i] = 0; + } + } + + h->n = n; + + return h; +} + + +void +gsl_histogram_free (gsl_histogram * h) +{ + RETURN_IF_NULL (h); + free (h->range); + free (h->bin); + free (h); +} + +/* These initialization functions suggested by Achim Gaedke */ + +int +gsl_histogram_set_ranges_uniform (gsl_histogram * h, double xmin, double xmax) +{ + size_t i; + const size_t n = h->n; + + if (xmin >= xmax) + { + GSL_ERROR ("xmin must be less than xmax", GSL_EINVAL); + } + + /* initialize ranges */ + + make_uniform (h->range, n, xmin, xmax); + + /* clear contents */ + + for (i = 0; i < n; i++) + { + h->bin[i] = 0; + } + + return GSL_SUCCESS; +} + +int +gsl_histogram_set_ranges (gsl_histogram * h, const double range[], size_t size) +{ + size_t i; + const size_t n = h->n; + + if (size != (n+1)) + { + GSL_ERROR ("size of range must match size of histogram", GSL_EINVAL); + } + + /* initialize ranges */ + + for (i = 0; i <= n; i++) + { + h->range[i] = range[i]; + } + + /* clear contents */ + + for (i = 0; i < n; i++) + { + h->bin[i] = 0; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/histogram/init2d.c b/software/gsl-1.15/histogram/init2d.c new file mode 100644 index 000000000..a394c9079 --- /dev/null +++ b/software/gsl-1.15/histogram/init2d.c @@ -0,0 +1,301 @@ +/* histogram/init2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_histogram2d * +gsl_histogram2d_alloc (const size_t nx, const size_t ny) +{ + gsl_histogram2d *h; + + if (nx == 0) + { + GSL_ERROR_VAL ("histogram2d length nx must be positive integer", + GSL_EDOM, 0); + } + + if (ny == 0) + { + GSL_ERROR_VAL ("histogram2d length ny must be positive integer", + GSL_EDOM, 0); + } + + h = (gsl_histogram2d *) malloc (sizeof (gsl_histogram2d)); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram2d struct", + GSL_ENOMEM, 0); + } + + h->xrange = (double *) malloc ((nx + 1) * sizeof (double)); + + if (h->xrange == 0) + { + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d x ranges", + GSL_ENOMEM, 0); + } + + h->yrange = (double *) malloc ((ny + 1) * sizeof (double)); + + if (h->yrange == 0) + { + free (h->xrange); + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d y ranges", + GSL_ENOMEM, 0); + } + + h->bin = (double *) malloc (nx * ny * sizeof (double)); + + if (h->bin == 0) + { + free (h->xrange); + free (h->yrange); + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram bins", + GSL_ENOMEM, 0); + } + + h->nx = nx; + h->ny = ny; + + return h; +} + +static void +make_uniform (double range[], size_t n, double xmin, double xmax) +{ + size_t i; + + for (i = 0; i <= n; i++) + { + double f1 = ((double) (n-i) / (double) n); + double f2 = ((double) i / (double) n); + range[i] = f1 * xmin + f2 * xmax; + } +} + +gsl_histogram2d * +gsl_histogram2d_calloc_uniform (const size_t nx, const size_t ny, + const double xmin, const double xmax, + const double ymin, const double ymax) +{ + gsl_histogram2d *h; + + if (xmin >= xmax) + { + GSL_ERROR_VAL ("xmin must be less than xmax", GSL_EINVAL, 0); + } + + if (ymin >= ymax) + { + GSL_ERROR_VAL ("ymin must be less than ymax", GSL_EINVAL, 0); + } + + h = gsl_histogram2d_calloc (nx, ny); + + if (h == 0) + { + return h; + } + + make_uniform (h->xrange, nx, xmin, xmax); + make_uniform (h->yrange, ny, ymin, ymax); + + return h; +} + +gsl_histogram2d * +gsl_histogram2d_calloc (const size_t nx, const size_t ny) +{ + gsl_histogram2d *h; + + if (nx == 0) + { + GSL_ERROR_VAL ("histogram2d length nx must be positive integer", + GSL_EDOM, 0); + } + + if (ny == 0) + { + GSL_ERROR_VAL ("histogram2d length ny must be positive integer", + GSL_EDOM, 0); + } + + h = (gsl_histogram2d *) malloc (sizeof (gsl_histogram2d)); + + if (h == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram2d struct", + GSL_ENOMEM, 0); + } + + h->xrange = (double *) malloc ((nx + 1) * sizeof (double)); + + if (h->xrange == 0) + { + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d x ranges", + GSL_ENOMEM, 0); + } + + h->yrange = (double *) malloc ((ny + 1) * sizeof (double)); + + if (h->yrange == 0) + { + free (h->xrange); + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d y ranges", + GSL_ENOMEM, 0); + } + + h->bin = (double *) malloc (nx * ny * sizeof (double)); + + if (h->bin == 0) + { + free (h->xrange); + free (h->yrange); + free (h); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram bins", + GSL_ENOMEM, 0); + } + + { + size_t i; + + for (i = 0; i < nx + 1; i++) + { + h->xrange[i] = i; + } + + for (i = 0; i < ny + 1; i++) + { + h->yrange[i] = i; + } + + for (i = 0; i < nx * ny; i++) + { + h->bin[i] = 0; + } + } + + h->nx = nx; + h->ny = ny; + + return h; +} + + +void +gsl_histogram2d_free (gsl_histogram2d * h) +{ + RETURN_IF_NULL (h); + free (h->xrange); + free (h->yrange); + free (h->bin); + free (h); +} + + +int +gsl_histogram2d_set_ranges_uniform (gsl_histogram2d * h, + double xmin, double xmax, + double ymin, double ymax) +{ + size_t i; + const size_t nx = h->nx, ny = h->ny; + + if (xmin >= xmax) + { + GSL_ERROR_VAL ("xmin must be less than xmax", GSL_EINVAL, 0); + } + + if (ymin >= ymax) + { + GSL_ERROR_VAL ("ymin must be less than ymax", GSL_EINVAL, 0); + } + + /* initialize ranges */ + + make_uniform (h->xrange, nx, xmin, xmax); + make_uniform (h->yrange, ny, ymin, ymax); + + /* clear contents */ + + for (i = 0; i < nx * ny; i++) + { + h->bin[i] = 0; + } + + return GSL_SUCCESS; +} + +int +gsl_histogram2d_set_ranges (gsl_histogram2d * h, + const double xrange[], size_t xsize, + const double yrange[], size_t ysize) +{ + size_t i; + const size_t nx = h->nx, ny = h->ny; + + if (xsize != (nx + 1)) + { + GSL_ERROR_VAL ("size of xrange must match size of histogram", + GSL_EINVAL, 0); + } + + if (ysize != (ny + 1)) + { + GSL_ERROR_VAL ("size of yrange must match size of histogram", + GSL_EINVAL, 0); + } + + /* initialize ranges */ + + for (i = 0; i <= nx; i++) + { + h->xrange[i] = xrange[i]; + } + + for (i = 0; i <= ny; i++) + { + h->yrange[i] = yrange[i]; + } + + /* clear contents */ + + for (i = 0; i < nx * ny; i++) + { + h->bin[i] = 0; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/maxval.c b/software/gsl-1.15/histogram/maxval.c new file mode 100644 index 000000000..6a2731e61 --- /dev/null +++ b/software/gsl-1.15/histogram/maxval.c @@ -0,0 +1,101 @@ +/* gsl_histogram_maxval.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram_maxval.c: + * Routine to find maximum and minumum content of a hisogram. + * Need GSL library and header. + * Contains the routines: + * gsl_histogram_max_val find max content values + * gsl_histogram_min_val find min content values + * gsl_histogram_bin_max find coordinates of max contents bin + * gsl_histogram_bin_min find coordinates of min contents bin + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include + +double +gsl_histogram_max_val (const gsl_histogram * h) +{ + const size_t n = h->n; + size_t i; + double max = h->bin[0]; + for (i = 0; i < n; i++) + { + if (h->bin[i] > max) + { + max = h->bin[i]; + } + } + return max; +} + +size_t +gsl_histogram_max_bin (const gsl_histogram * h) +{ + size_t i; + size_t imax = 0; + double max = h->bin[0]; + for (i = 0; i < h->n; i++) + { + if (h->bin[i] > max) + { + max = h->bin[i]; + imax = i; + } + } + return imax; +} + +double +gsl_histogram_min_val (const gsl_histogram * h) +{ + size_t i; + double min = h->bin[0]; + for (i = 0; i < h->n; i++) + { + if (h->bin[i] < min) + { + min = h->bin[i]; + } + } + return min; +} + +size_t +gsl_histogram_min_bin (const gsl_histogram * h) +{ + size_t i; + size_t imin = 0; + double min = h->bin[0]; + for (i = 0; i < h->n; i++) + { + if (h->bin[i] < min) + { + min = h->bin[i]; + imin = i; + } + } + return imin; +} diff --git a/software/gsl-1.15/histogram/maxval2d.c b/software/gsl-1.15/histogram/maxval2d.c new file mode 100644 index 000000000..4cbb20305 --- /dev/null +++ b/software/gsl-1.15/histogram/maxval2d.c @@ -0,0 +1,140 @@ +/* gsl_histogram2d_maxval.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram2d_maxval.c: + * Routine to find maximum and minumum content of a 2D hisogram. + * Need GSL library and header. + * Contains the routines: + * gsl_histogram2d_max_val find max content values + * gsl_histogram2d_min_val find min content values + * gsl_histogram2d_bin_max find coordinates of max contents bin + * gsl_histogram2d_bin_min find coordinates of min contents bin + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +/* + * Return the maximum contents value of a 2D histogram + */ +double +gsl_histogram2d_max_val (const gsl_histogram2d * h) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + double max = h->bin[0 * ny + 0]; + + for (i = 0; i < nx * ny; i++) + { + if (h->bin[i] > max) + { + max = h->bin[i]; + } + } + return max; +} + +/* + * Find the bin index for maximum value of a 2D histogram + */ + +void +gsl_histogram2d_max_bin (const gsl_histogram2d * h, size_t * imax_out, size_t * jmax_out) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t imax = 0, jmax = 0, i, j; + double max = h->bin[0 * ny + 0]; + + for (i = 0; i < nx; i++) + { + for (j = 0; j < ny; j++) + { + double x = h->bin[i * ny + j]; + + if (x > max) + { + max = x; + imax = i; + jmax = j; + } + } + } + + *imax_out = imax; + *jmax_out = jmax; +} + +/* + * Return the minimum contents value of a 2D histogram + */ + +double +gsl_histogram2d_min_val (const gsl_histogram2d * h) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + double min = h->bin[0 * ny + 0]; + + for (i = 0; i < nx * ny; i++) + { + if (h->bin[i] < min) + { + min = h->bin[i]; + } + } + + return min; +} +/* + * Find the bin index for minimum value of a 2D histogram + */ +void +gsl_histogram2d_min_bin (const gsl_histogram2d * h, size_t * imin_out, size_t * jmin_out) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t imin = 0, jmin = 0, i, j; + double min = h->bin[0 * ny + 0]; + + for (i = 0; i < nx; i++) + { + for (j = 0; j < ny; j++) + { + double x = h->bin[i * ny + j]; + + if (x < min) + { + min = x; + imin = i; + jmin = j; + } + } + } + + *imin_out = imin; + *jmin_out = jmin; +} + diff --git a/software/gsl-1.15/histogram/oper.c b/software/gsl-1.15/histogram/oper.c new file mode 100644 index 000000000..84fc149ab --- /dev/null +++ b/software/gsl-1.15/histogram/oper.c @@ -0,0 +1,195 @@ +/* gsl_histogram_oper.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram_oper.c: + * Routine to make operation on histograms. + * Need GSL library and header. + * Contains the routines: + * gsl_histogram_same_binning check if two histograms have the same binning + * gsl_histogram_add add two histograms + * gsl_histogram_sub subctract two histograms + * gsl_histogram_mult multiply two histograms + * gsl_histogram_div divide two histograms + * gsl_histogram_scale scale histogram contents + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include + +/* + * gsl_histogram_same_binning: + * control if two histograms have the + * same binning + */ + +int +gsl_histogram_equal_bins_p (const gsl_histogram * h1, const gsl_histogram * h2) +{ + if (h1->n != h2->n) + { + return 0; + } + + { + size_t i; + /* init ranges */ + + for (i = 0; i <= h1->n; i++) + { + if (h1->range[i] != h2->range[i]) + { + return 0; + } + } + } + + return 1; +} + +/* + * gsl_histogram_add: + * add two histograms + */ +int +gsl_histogram_add (gsl_histogram * h1, const gsl_histogram * h2) +{ + size_t i; + + if (!gsl_histogram_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < h1->n; i++) + { + h1->bin[i] += h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram_sub: + * subtract two histograms + */ + +int +gsl_histogram_sub (gsl_histogram * h1, const gsl_histogram * h2) +{ + size_t i; + + if (!gsl_histogram_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < h1->n; i++) + { + h1->bin[i] -= h2->bin[i]; + } + + return GSL_SUCCESS; + +} + +/* + * gsl_histogram_mult: + * multiply two histograms + */ + +int +gsl_histogram_mul (gsl_histogram * h1, const gsl_histogram * h2) +{ + size_t i; + + if (!gsl_histogram_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < h1->n; i++) + { + h1->bin[i] *= h2->bin[i]; + } + + return GSL_SUCCESS; +} +/* + * gsl_histogram_div: + * divide two histograms + */ +int +gsl_histogram_div (gsl_histogram * h1, const gsl_histogram * h2) +{ + size_t i; + + if (!gsl_histogram_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < h1->n; i++) + { + h1->bin[i] /= h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram_scale: + * scale a histogram by a numeric factor + */ + +int +gsl_histogram_scale (gsl_histogram * h, double scale) +{ + size_t i; + + for (i = 0; i < h->n; i++) + { + h->bin[i] *= scale; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram_shift: + * shift a histogram by a numeric offset + */ + +int +gsl_histogram_shift (gsl_histogram * h, double shift) +{ + size_t i; + + for (i = 0; i < h->n; i++) + { + h->bin[i] += shift; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/histogram/oper2d.c b/software/gsl-1.15/histogram/oper2d.c new file mode 100644 index 000000000..bd6b72e8c --- /dev/null +++ b/software/gsl-1.15/histogram/oper2d.c @@ -0,0 +1,203 @@ +/* gsl_histogram2d_oper.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram2d_oper.c: + * Routine to make operation on 2D histograms. + * Need GSL library and header. + * Contains the routines: + * gsl_histogram2d_same_binning check if two histograms have the same binning + * gsl_histogram2d_add add two histogram + * gsl_histogram2d_sub subctract two histogram + * gsl_histogram2d_mult multiply two histogram + * gsl_histogram2d_div divide two histogram + * gsl_histogram2d_scale scale histogram contents + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include + +/* + * gsl_histogram2d_same_binning: + * control if two histogram have the + * same binning + */ +int +gsl_histogram2d_equal_bins_p (const gsl_histogram2d * h1, + const gsl_histogram2d * h2) +{ + + if ((h1->nx != h2->nx) || (h1->ny != h2->ny)) + { + return 0; + } + { + size_t i; + /* init ranges */ + for (i = 0; i <= (h1->nx); i++) + { + if (h1->xrange[i] != h2->xrange[i]) + { + return 0; + } + } + for (i = 0; i <= (h1->ny); i++) + { + if (h1->yrange[i] != h2->yrange[i]) + { + return 0; + } + } + } + return 1; +} + +/* + * gsl_histogram2d_add: + * add two histogram + */ + +int +gsl_histogram2d_add (gsl_histogram2d * h1, const gsl_histogram2d * h2) +{ + size_t i; + + if (!gsl_histogram2d_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < (h1->nx) * (h1->ny); i++) + { + h1->bin[i] += h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_sub: + * subtract two histogram + */ + +int +gsl_histogram2d_sub (gsl_histogram2d * h1, const gsl_histogram2d * h2) +{ + size_t i; + + if (!gsl_histogram2d_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < (h1->nx) * (h1->ny); i++) + { + h1->bin[i] -= h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_mult: + * multiply two histogram + */ + +int +gsl_histogram2d_mul (gsl_histogram2d * h1, const gsl_histogram2d * h2) +{ + size_t i; + + if (!gsl_histogram2d_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < (h1->nx) * (h1->ny); i++) + { + h1->bin[i] *= h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_div: + * divide two histogram + */ + +int +gsl_histogram2d_div (gsl_histogram2d * h1, const gsl_histogram2d * h2) +{ + size_t i; + + if (!gsl_histogram2d_equal_bins_p (h1, h2)) + { + GSL_ERROR ("histograms have different binning", GSL_EINVAL); + } + + for (i = 0; i < (h1->nx) * (h1->ny); i++) + { + h1->bin[i] /= h2->bin[i]; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_scale: + * scale a histogram by a numeric factor + */ + +int +gsl_histogram2d_scale (gsl_histogram2d * h, double scale) +{ + size_t i; + + for (i = 0; i < (h->nx) * (h->ny); i++) + { + h->bin[i] *= scale; + } + + return GSL_SUCCESS; +} + +/* + * gsl_histogram2d_shift: + * shift a histogram by a numeric offset + */ + +int +gsl_histogram2d_shift (gsl_histogram2d * h, double shift) +{ + size_t i; + + for (i = 0; i < (h->nx) * (h->ny); i++) + { + h->bin[i] += shift; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/histogram/params.c b/software/gsl-1.15/histogram/params.c new file mode 100644 index 000000000..ee162b267 --- /dev/null +++ b/software/gsl-1.15/histogram/params.c @@ -0,0 +1,42 @@ +/* histogram/params.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double +gsl_histogram_max (const gsl_histogram * h) +{ + const int n = h->n; + + return h->range[n]; +} + +double +gsl_histogram_min (const gsl_histogram * h) +{ + return h->range[0]; +} + +size_t +gsl_histogram_bins (const gsl_histogram * h) +{ + return h->n; +} diff --git a/software/gsl-1.15/histogram/params2d.c b/software/gsl-1.15/histogram/params2d.c new file mode 100644 index 000000000..28ff43b38 --- /dev/null +++ b/software/gsl-1.15/histogram/params2d.c @@ -0,0 +1,60 @@ +/* histogram/params2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double +gsl_histogram2d_xmax (const gsl_histogram2d * h) +{ + const int nx = h->nx; + return h->xrange[nx]; +} + +double +gsl_histogram2d_xmin (const gsl_histogram2d * h) +{ + return h->xrange[0]; +} + +double +gsl_histogram2d_ymax (const gsl_histogram2d * h) +{ + const int ny = h->ny; + return h->yrange[ny]; +} + +double +gsl_histogram2d_ymin (const gsl_histogram2d * h) +{ + return h->yrange[0]; +} + +size_t +gsl_histogram2d_nx (const gsl_histogram2d * h) +{ + return h->nx; +} + +size_t +gsl_histogram2d_ny (const gsl_histogram2d * h) +{ + return h->ny; +} diff --git a/software/gsl-1.15/histogram/pdf.c b/software/gsl-1.15/histogram/pdf.c new file mode 100644 index 000000000..529863bbf --- /dev/null +++ b/software/gsl-1.15/histogram/pdf.c @@ -0,0 +1,154 @@ +/* histogram/pdf.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include "find.c" + +double +gsl_histogram_pdf_sample (const gsl_histogram_pdf * p, double r) +{ + size_t i; + int status; + +/* Wrap the exclusive top of the bin down to the inclusive bottom of + the bin. Since this is a single point it should not affect the + distribution. */ + + if (r == 1.0) + { + r = 0.0; + } + + status = find (p->n, p->sum, r, &i); + + if (status) + { + GSL_ERROR_VAL ("cannot find r in cumulative pdf", GSL_EDOM, 0); + } + else + { + double delta = (r - p->sum[i]) / (p->sum[i + 1] - p->sum[i]); + double x = p->range[i] + delta * (p->range[i + 1] - p->range[i]); + return x; + } +} + +gsl_histogram_pdf * +gsl_histogram_pdf_alloc (const size_t n) +{ + gsl_histogram_pdf *p; + + if (n == 0) + { + GSL_ERROR_VAL ("histogram pdf length n must be positive integer", + GSL_EDOM, 0); + } + + p = (gsl_histogram_pdf *) malloc (sizeof (gsl_histogram_pdf)); + + if (p == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram pdf struct", + GSL_ENOMEM, 0); + } + + p->range = (double *) malloc ((n + 1) * sizeof (double)); + + if (p->range == 0) + { + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram pdf ranges", + GSL_ENOMEM, 0); + } + + p->sum = (double *) malloc ((n + 1) * sizeof (double)); + + if (p->sum == 0) + { + free (p->range); + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram pdf sums", + GSL_ENOMEM, 0); + } + + p->n = n; + + return p; +} + +int +gsl_histogram_pdf_init (gsl_histogram_pdf * p, const gsl_histogram * h) +{ + size_t i; + size_t n = p->n; + + if (n != h->n) + { + GSL_ERROR ("histogram length must match pdf length", GSL_EINVAL); + } + + for (i = 0; i < n; i++) + { + if (h->bin[i] < 0) + { + GSL_ERROR ("histogram bins must be non-negative to compute" + "a probability distribution", GSL_EDOM); + } + } + + for (i = 0; i < n + 1; i++) + { + p->range[i] = h->range[i]; + } + + { + double mean = 0, sum = 0; + + for (i = 0; i < n; i++) + { + mean += (h->bin[i] - mean) / ((double) (i + 1)); + } + + p->sum[0] = 0; + + for (i = 0; i < n; i++) + { + sum += (h->bin[i] / mean) / n; + p->sum[i + 1] = sum; + } + } + + return GSL_SUCCESS; +} + + +void +gsl_histogram_pdf_free (gsl_histogram_pdf * p) +{ + RETURN_IF_NULL (p); + free (p->range); + free (p->sum); + free (p); +} diff --git a/software/gsl-1.15/histogram/pdf2d.c b/software/gsl-1.15/histogram/pdf2d.c new file mode 100644 index 000000000..07cc24d61 --- /dev/null +++ b/software/gsl-1.15/histogram/pdf2d.c @@ -0,0 +1,187 @@ +/* histogram/pdf2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "find.c" + +int +gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf * p, + double r1, double r2, + double *x, double *y) +{ + size_t k; + int status; + +/* Wrap the exclusive top of the bin down to the inclusive bottom of + the bin. Since this is a single point it should not affect the + distribution. */ + + if (r2 == 1.0) + { + r2 = 0.0; + } + if (r1 == 1.0) + { + r1 = 0.0; + } + + status = find (p->nx * p->ny, p->sum, r1, &k); + + if (status) + { + GSL_ERROR ("cannot find r1 in cumulative pdf", GSL_EDOM); + } + else + { + size_t i = k / p->ny; + size_t j = k - (i * p->ny); + double delta = (r1 - p->sum[k]) / (p->sum[k + 1] - p->sum[k]); + *x = p->xrange[i] + delta * (p->xrange[i + 1] - p->xrange[i]); + *y = p->yrange[j] + r2 * (p->yrange[j + 1] - p->yrange[j]); + return GSL_SUCCESS; + } +} + +gsl_histogram2d_pdf * +gsl_histogram2d_pdf_alloc (const size_t nx, const size_t ny) +{ + const size_t n = nx * ny; + + gsl_histogram2d_pdf *p; + + if (n == 0) + { + GSL_ERROR_VAL ("histogram2d pdf length n must be positive integer", + GSL_EDOM, 0); + } + + p = (gsl_histogram2d_pdf *) malloc (sizeof (gsl_histogram2d_pdf)); + + if (p == 0) + { + GSL_ERROR_VAL ("failed to allocate space for histogram2d pdf struct", + GSL_ENOMEM, 0); + } + + p->xrange = (double *) malloc ((nx + 1) * sizeof (double)); + + if (p->xrange == 0) + { + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d pdf xranges", + GSL_ENOMEM, 0); + } + + p->yrange = (double *) malloc ((ny + 1) * sizeof (double)); + + if (p->yrange == 0) + { + free (p->xrange); + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d pdf yranges", + GSL_ENOMEM, 0); + } + + p->sum = (double *) malloc ((n + 1) * sizeof (double)); + + if (p->sum == 0) + { + free (p->yrange); + free (p->xrange); + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for histogram2d pdf sums", + GSL_ENOMEM, 0); + } + + p->nx = nx; + p->ny = ny; + + return p; +} + +int +gsl_histogram2d_pdf_init (gsl_histogram2d_pdf * p, const gsl_histogram2d * h) +{ + size_t i; + const size_t nx = p->nx; + const size_t ny = p->ny; + const size_t n = nx * ny; + + if (nx != h->nx || ny != h->ny) + { + GSL_ERROR ("histogram2d size must match pdf size", GSL_EDOM); + } + + for (i = 0; i < n; i++) + { + if (h->bin[i] < 0) + { + GSL_ERROR ("histogram bins must be non-negative to compute" + "a probability distribution", GSL_EDOM); + } + } + + for (i = 0; i < nx + 1; i++) + { + p->xrange[i] = h->xrange[i]; + } + + for (i = 0; i < ny + 1; i++) + { + p->yrange[i] = h->yrange[i]; + } + + { + double mean = 0, sum = 0; + + for (i = 0; i < n; i++) + { + mean += (h->bin[i] - mean) / ((double) (i + 1)); + } + + p->sum[0] = 0; + + for (i = 0; i < n; i++) + { + sum += (h->bin[i] / mean) / n; + p->sum[i + 1] = sum; + } + } + + return GSL_SUCCESS; +} + + +void +gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * p) +{ + RETURN_IF_NULL (p); + free (p->xrange); + free (p->yrange); + free (p->sum); + free (p); +} diff --git a/software/gsl-1.15/histogram/reset.c b/software/gsl-1.15/histogram/reset.c new file mode 100644 index 000000000..18c01c03e --- /dev/null +++ b/software/gsl-1.15/histogram/reset.c @@ -0,0 +1,34 @@ +/* histogram/reset.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +void +gsl_histogram_reset (gsl_histogram * h) +{ + size_t i; + const size_t n = h->n; + + for (i = 0; i < n; i++) + { + h->bin[i] = 0; + } +} diff --git a/software/gsl-1.15/histogram/reset2d.c b/software/gsl-1.15/histogram/reset2d.c new file mode 100644 index 000000000..090ad7ed3 --- /dev/null +++ b/software/gsl-1.15/histogram/reset2d.c @@ -0,0 +1,35 @@ +/* histogram/reset2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +void +gsl_histogram2d_reset (gsl_histogram2d * h) +{ + size_t i; + const size_t nx = h->nx; + const size_t ny = h->ny; + + for (i = 0; i < nx * ny; i++) + { + h->bin[i] = 0; + } +} diff --git a/software/gsl-1.15/histogram/stat.c b/software/gsl-1.15/histogram/stat.c new file mode 100644 index 000000000..99cefa540 --- /dev/null +++ b/software/gsl-1.15/histogram/stat.c @@ -0,0 +1,141 @@ +/* gsl_histogram_stat.c + * Copyright (C) 2000 Simone Piccardi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/*************************************************************** + * + * File gsl_histogram_stat.c: + * Routines for statisticalcomputations on histograms. + * Need GSL library and header. + * Contains the routines: + * gsl_histogram_mean compute histogram mean + * gsl_histogram_sigma compute histogram sigma + * + * Author: S. Piccardi + * Jan. 2000 + * + ***************************************************************/ +#include +#include +#include +#include +#include + +/* FIXME: We skip negative values in the histogram h->bin[i] < 0, + since those correspond to negative weights (BJG) */ + +double +gsl_histogram_mean (const gsl_histogram * h) +{ + const size_t n = h->n; + size_t i; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wmean = 0; + long double W = 0; + + for (i = 0; i < n; i++) + { + double xi = (h->range[i + 1] + h->range[i]) / 2; + double wi = h->bin[i]; + + if (wi > 0) + { + W += wi; + wmean += (xi - wmean) * (wi / W); + } + } + + return wmean; +} + +double +gsl_histogram_sigma (const gsl_histogram * h) +{ + const size_t n = h->n; + size_t i; + + long double wvariance = 0 ; + long double wmean = 0; + long double W = 0; + + /* Use a two-pass algorithm for stability. Could also use a single + pass formula, as given in N.J.Higham 'Accuracy and Stability of + Numerical Methods', p.12 */ + + /* Compute the mean */ + + for (i = 0; i < n; i++) + { + double xi = (h->range[i + 1] + h->range[i]) / 2; + double wi = h->bin[i]; + + if (wi > 0) + { + W += wi; + wmean += (xi - wmean) * (wi / W); + } + } + + /* Compute the variance */ + + W = 0.0; + + for (i = 0; i < n; i++) + { + double xi = ((h->range[i + 1]) + (h->range[i])) / 2; + double wi = h->bin[i]; + + if (wi > 0) { + const long double delta = (xi - wmean); + W += wi ; + wvariance += (delta * delta - wvariance) * (wi / W); + } + } + + { + double sigma = sqrt (wvariance) ; + return sigma; + } +} + + +/* + sum up all bins of histogram + */ + +double +gsl_histogram_sum(const gsl_histogram * h) +{ + double sum=0; + size_t i=0; + size_t n; + n=h->n; + + while(i < n) + sum += h->bin[i++]; + + return sum; +} + diff --git a/software/gsl-1.15/histogram/stat2d.c b/software/gsl-1.15/histogram/stat2d.c new file mode 100644 index 000000000..f376d91c1 --- /dev/null +++ b/software/gsl-1.15/histogram/stat2d.c @@ -0,0 +1,266 @@ +/* histogram/stat2d.c + * Copyright (C) 2002 Achim Gaedke + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/*************************************************************** + * + * File histogram/stat2d.c: + * Routine to return statistical values of the content of a 2D hisogram. + * + * Contains the routines: + * gsl_histogram2d_sum sum up all bin values + * gsl_histogram2d_xmean determine mean of x values + * gsl_histogram2d_ymean determine mean of y values + * + * Author: Achim Gaedke Achim.Gaedke@zpr.uni-koeln.de + * Jan. 2002 + * + ***************************************************************/ + +#include +#include +#include +#include + +/* + sum up all bins of histogram2d + */ + +double +gsl_histogram2d_sum (const gsl_histogram2d * h) +{ + const size_t n = h->nx * h->ny; + double sum = 0; + size_t i = 0; + + while (i < n) + sum += h->bin[i++]; + + return sum; +} + +double +gsl_histogram2d_xmean (const gsl_histogram2d * h) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + size_t j; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wmean = 0; + long double W = 0; + + for (i = 0; i < nx; i++) + { + double xi = (h->xrange[i + 1] + h->xrange[i]) / 2.0; + double wi = 0; + + for (j = 0; j < ny; j++) + { + double wij = h->bin[i * ny + j]; + if (wij > 0) + wi += wij; + } + if (wi > 0) + { + W += wi; + wmean += (xi - wmean) * (wi / W); + } + } + + return wmean; +} + +double +gsl_histogram2d_ymean (const gsl_histogram2d * h) +{ + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + size_t j; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wmean = 0; + long double W = 0; + + for (j = 0; j < ny; j++) + { + double yj = (h->yrange[j + 1] + h->yrange[j]) / 2.0; + double wj = 0; + + for (i = 0; i < nx; i++) + { + double wij = h->bin[i * ny + j]; + if (wij > 0) + wj += wij; + } + + if (wj > 0) + { + W += wj; + wmean += (yj - wmean) * (wj / W); + } + } + + return wmean; +} + +double +gsl_histogram2d_xsigma (const gsl_histogram2d * h) +{ + const double xmean = gsl_histogram2d_xmean (h); + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + size_t j; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wvariance = 0; + long double W = 0; + + for (i = 0; i < nx; i++) + { + double xi = (h->xrange[i + 1] + h->xrange[i]) / 2 - xmean; + double wi = 0; + + for (j = 0; j < ny; j++) + { + double wij = h->bin[i * ny + j]; + if (wij > 0) + wi += wij; + } + + if (wi > 0) + { + W += wi; + wvariance += ((xi * xi) - wvariance) * (wi / W); + } + } + + { + double xsigma = sqrt (wvariance); + return xsigma; + } +} + +double +gsl_histogram2d_ysigma (const gsl_histogram2d * h) +{ + const double ymean = gsl_histogram2d_ymean (h); + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + size_t j; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wvariance = 0; + long double W = 0; + + for (j = 0; j < ny; j++) + { + double yj = (h->yrange[j + 1] + h->yrange[j]) / 2.0 - ymean; + double wj = 0; + + for (i = 0; i < nx; i++) + { + double wij = h->bin[i * ny + j]; + if (wij > 0) + wj += wij; + } + if (wj > 0) + { + W += wj; + wvariance += ((yj * yj) - wvariance) * (wj / W); + } + } + + { + double ysigma = sqrt (wvariance); + return ysigma; + } +} + +double +gsl_histogram2d_cov (const gsl_histogram2d * h) +{ + const double xmean = gsl_histogram2d_xmean (h); + const double ymean = gsl_histogram2d_ymean (h); + const size_t nx = h->nx; + const size_t ny = h->ny; + size_t i; + size_t j; + + /* Compute the bin-weighted arithmetic mean M of a histogram using the + recurrence relation + + M(n) = M(n-1) + (x[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wcovariance = 0; + long double W = 0; + + for (j = 0; j < ny; j++) + { + for (i = 0; i < nx; i++) + { + double xi = (h->xrange[i + 1] + h->xrange[i]) / 2.0 - xmean; + double yj = (h->yrange[j + 1] + h->yrange[j]) / 2.0 - ymean; + double wij = h->bin[i * ny + j]; + + if (wij > 0) + { + W += wij; + wcovariance += ((xi * yj) - wcovariance) * (wij / W); + } + } + } + + return wcovariance; + +} diff --git a/software/gsl-1.15/histogram/test.c b/software/gsl-1.15/histogram/test.c new file mode 100644 index 000000000..011d7fbcd --- /dev/null +++ b/software/gsl-1.15/histogram/test.c @@ -0,0 +1,45 @@ +/* histogram/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +void test1d (void); +void test2d (void); +void test1d_resample (void); +void test2d_resample (void); +void test1d_trap (void); +void test2d_trap (void); + +int +main (void) +{ + test1d(); + test2d(); + test1d_resample(); + test2d_resample(); + test1d_trap(); + test2d_trap(); + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/histogram/test1d.c b/software/gsl-1.15/histogram/test1d.c new file mode 100644 index 000000000..b7f3dee86 --- /dev/null +++ b/software/gsl-1.15/histogram/test1d.c @@ -0,0 +1,483 @@ +/* histogram/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#define N 397 +#define NR 10 + +void +test1d (void) +{ + double xr[NR + 1] = + {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + + gsl_histogram *h, *h1, *hr, *g; + size_t i, j; + + gsl_ieee_env_setup (); + + h = gsl_histogram_calloc (N); + h1 = gsl_histogram_calloc (N); + g = gsl_histogram_calloc (N); + + gsl_test (h->range == 0, "gsl_histogram_alloc returns valid range pointer"); + gsl_test (h->bin == 0, "gsl_histogram_alloc returns valid bin pointer"); + gsl_test (h->n != N, "gsl_histogram_alloc returns valid size"); + + + hr = gsl_histogram_calloc_range (NR, xr); + + gsl_test (hr->range == 0, "gsl_histogram_calloc_range returns valid range pointer"); + gsl_test (hr->bin == 0, "gsl_histogram_calloc_range returns valid bin pointer"); + gsl_test (hr->n != NR, "gsl_histogram_calloc_range returns valid size"); + + { + int status = 0; + for (i = 0; i <= NR; i++) + { + if (hr->range[i] != xr[i]) + { + status = 1; + } + }; + + gsl_test (status, "gsl_histogram_calloc_range creates range"); + } + + for (i = 0; i <= NR; i++) + { + hr->range[i] = 0.0; + } + + { + int status = gsl_histogram_set_ranges (hr, xr, NR+1); + + for (i = 0; i <= NR; i++) + { + if (hr->range[i] != xr[i]) + { + status = 1; + } + }; + + gsl_test (status, "gsl_histogram_set_range sets range"); + } + + + for (i = 0; i < N; i++) + { + gsl_histogram_accumulate (h, (double) i, (double) i); + }; + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (h->bin[i] != (double) i) + { + status = 1; + } + }; + + gsl_test (status, "gsl_histogram_accumulate writes into array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (gsl_histogram_get (h, i) != i) + status = 1; + }; + gsl_test (status, "gsl_histogram_get reads from array"); + } + + for (i = 0; i <= N; i++) + { + h1->range[i] = 100.0 + i; + } + + gsl_histogram_memcpy (h1, h); + + { + int status = 0; + for (i = 0; i <= N; i++) + { + if (h1->range[i] != h->range[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram_memcpy copies bin ranges"); + } + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (gsl_histogram_get (h1, i) != gsl_histogram_get (h, i)) + status = 1; + }; + gsl_test (status, "gsl_histogram_memcpy copies bin values"); + } + + gsl_histogram_free (h1); + + h1 = gsl_histogram_clone (h); + + { + int status = 0; + for (i = 0; i <= N; i++) + { + if (h1->range[i] != h->range[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram_clone copies bin ranges"); + } + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (gsl_histogram_get (h1, i) != gsl_histogram_get (h, i)) + status = 1; + }; + gsl_test (status, "gsl_histogram_clone copies bin values"); + } + + gsl_histogram_reset (h); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (h->bin[i] != 0) + status = 1; + } + gsl_test (status, "gsl_histogram_reset zeros array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + gsl_histogram_increment (h, (double) i); + + for (j = 0; j <= i; j++) + { + if (h->bin[j] != 1) + { + status = 1; + } + } + + for (j = i + 1; j < N; j++) + { + if (h->bin[j] != 0) + { + status = 1; + } + } + } + + gsl_test (status, "gsl_histogram_increment increases bin value"); + } + + { + int status = 0; + for (i = 0; i < N; i++) + { + double x0 = 0, x1 = 0; + + gsl_histogram_get_range (h, i, &x0, &x1); + + if (x0 != i || x1 != i + 1) + { + status = 1; + } + } + gsl_test (status, "gsl_histogram_getbinrange returns bin range"); + } + + { + int status = 0; + if (gsl_histogram_max (h) != N) + status = 1; + gsl_test (status, "gsl_histogram_max returns maximum"); + } + + { + int status = 0; + if (gsl_histogram_min (h) != 0) + status = 1; + gsl_test (status, "gsl_histogram_min returns minimum"); + } + + { + int status = 0; + if (gsl_histogram_bins (h) != N) + status = 1; + gsl_test (status, "gsl_histogram_bins returns number of bins"); + } + + h->bin[2] = 123456.0; + h->bin[4] = -654321; + + { + double max = gsl_histogram_max_val (h); + gsl_test (max != 123456.0, "gsl_histogram_max_val finds maximum value"); + } + + { + double min = gsl_histogram_min_val (h); + gsl_test (min != -654321.0, "gsl_histogram_min_val finds minimum value"); + } + + { + size_t imax = gsl_histogram_max_bin (h); + gsl_test (imax != 2, "gsl_histogram_max_bin finds maximum value bin"); + } + + { + size_t imin = gsl_histogram_min_bin (h); + gsl_test (imin != 4, "gsl_histogram_min_bin find minimum value bin"); + } + + for (i = 0; i < N; i++) + { + h->bin[i] = i + 27; + g->bin[i] = (i + 27) * (i + 1); + } + + { + double sum=gsl_histogram_sum (h); + gsl_test(sum != N*27+((N-1)*N)/2, "gsl_histogram_sum sums all bin values"); + } + + gsl_histogram_memcpy (h1, g); + gsl_histogram_add (h1, h); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != g->bin[i] + h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_add histogram addition"); + } + + gsl_histogram_memcpy (h1, g); + gsl_histogram_sub (h1, h); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != g->bin[i] - h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_sub histogram subtraction"); + } + + + gsl_histogram_memcpy (h1, g); + gsl_histogram_mul (h1, h); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != g->bin[i] * h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_mul histogram multiplication"); + } + + + gsl_histogram_memcpy (h1, g); + gsl_histogram_div (h1, h); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != g->bin[i] / h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_div histogram division"); + } + + gsl_histogram_memcpy (h1, g); + gsl_histogram_scale (h1, 0.5); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != 0.5 * g->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_scale histogram scaling"); + } + + gsl_histogram_memcpy (h1, g); + gsl_histogram_shift (h1, 0.25); + + { + int status = 0; + for (i = 0; i < N; i++) + { + if (h1->bin[i] != 0.25 + g->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram_shift histogram shift"); + } + + + gsl_histogram_free (h); /* free whatever is in h */ + + h = gsl_histogram_calloc_uniform (N, 0.0, 1.0); + + gsl_test (h->range == 0, + "gsl_histogram_calloc_uniform returns valid range pointer"); + gsl_test (h->bin == 0, + "gsl_histogram_calloc_uniform returns valid bin pointer"); + gsl_test (h->n != N, + "gsl_histogram_calloc_uniform returns valid size"); + + gsl_histogram_accumulate (h, 0.0, 1.0); + gsl_histogram_accumulate (h, 0.1, 2.0); + gsl_histogram_accumulate (h, 0.2, 3.0); + gsl_histogram_accumulate (h, 0.3, 4.0); + + { + size_t i1, i2, i3, i4; + double expected; + int status = gsl_histogram_find (h, 0.0, &i1); + status = gsl_histogram_find (h, 0.1, &i2); + status = gsl_histogram_find (h, 0.2, &i3); + status = gsl_histogram_find (h, 0.3, &i4); + + for (i = 0; i < N; i++) + { + if (i == i1) + { + expected = 1.0; + } + else if (i == i2) + { + expected = 2.0; + } + else if (i == i3) + { + expected = 3.0; + } + else if (i == i4) + { + expected = 4.0; + } + else + { + expected = 0.0; + } + + if (h->bin[i] != expected) + { + status = 1; + } + + } + gsl_test (status, "gsl_histogram_find returns index"); + } + + + { + FILE *f = fopen ("test.txt", "w"); + gsl_histogram_fprintf (f, h, "%.19e", "%.19e"); + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + gsl_histogram *hh = gsl_histogram_calloc (N); + int status = 0; + + gsl_histogram_fscanf (f, hh); + + for (i = 0; i < N; i++) + { + if (h->range[i] != hh->range[i]) + status = 1; + if (h->bin[i] != hh->bin[i]) + status = 1; + } + if (h->range[N] != hh->range[N]) + status = 1; + + gsl_test (status, "gsl_histogram_fprintf and fscanf"); + + gsl_histogram_free (hh); + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "wb"); + gsl_histogram_fwrite (f, h); + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + gsl_histogram *hh = gsl_histogram_calloc (N); + int status = 0; + + gsl_histogram_fread (f, hh); + + for (i = 0; i < N; i++) + { + if (h->range[i] != hh->range[i]) + status = 1; + if (h->bin[i] != hh->bin[i]) + status = 1; + } + if (h->range[N] != hh->range[N]) + status = 1; + + gsl_test (status, "gsl_histogram_fwrite and fread"); + + gsl_histogram_free (hh); + fclose (f); + } + + gsl_histogram_free (h); + gsl_histogram_free (g); + gsl_histogram_free (h1); + gsl_histogram_free (hr); +} diff --git a/software/gsl-1.15/histogram/test1d_resample.c b/software/gsl-1.15/histogram/test1d_resample.c new file mode 100644 index 000000000..cc0ee4951 --- /dev/null +++ b/software/gsl-1.15/histogram/test1d_resample.c @@ -0,0 +1,99 @@ +/* histogram/test1d_resample.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "urand.c" + +void +test1d_resample (void) +{ + size_t i; + int status = 0; + + gsl_histogram *h; + + gsl_ieee_env_setup (); + + h = gsl_histogram_calloc_uniform (10, 0.0, 1.0); + + gsl_histogram_increment (h, 0.1); + gsl_histogram_increment (h, 0.2); + gsl_histogram_increment (h, 0.2); + gsl_histogram_increment (h, 0.3); + + { + gsl_histogram_pdf *p = gsl_histogram_pdf_alloc (10); + + gsl_histogram *hh = gsl_histogram_calloc_uniform (100, 0.0, 1.0); + + gsl_histogram_pdf_init (p, h); + + for (i = 0; i < 100000; i++) + { + double u = urand(); + double x = gsl_histogram_pdf_sample (p, u); + gsl_histogram_increment (hh, x); + } + + for (i = 0; i < 100; i++) + { + double y = gsl_histogram_get (hh, i) / 2500; + double x, xmax; + size_t k; + double ya; + + gsl_histogram_get_range (hh, i, &x, &xmax); + + gsl_histogram_find (h, x, &k); + ya = gsl_histogram_get (h, k); + + if (ya == 0) + { + if (y != 0) + { + printf ("%d: %g vs %g\n", (int) i, y, ya); + status = 1; + } + } + else + { + double err = 1 / sqrt (gsl_histogram_get (hh, i)); + double sigma = fabs ((y - ya) / (ya * err)); + if (sigma > 3) + { + status = 1; + printf ("%g vs %g err=%g sigma=%g\n", y, ya, err, sigma); + } + } + } + + gsl_histogram_pdf_free (p) ; + gsl_histogram_free (hh); + + gsl_test (status, "gsl_histogram_pdf_sample within statistical errors"); + } + + gsl_histogram_free (h); +} diff --git a/software/gsl-1.15/histogram/test1d_trap.c b/software/gsl-1.15/histogram/test1d_trap.c new file mode 100644 index 000000000..5a6e3a28c --- /dev/null +++ b/software/gsl-1.15/histogram/test1d_trap.c @@ -0,0 +1,130 @@ +/* histogram/test_trap.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define N 397 + +static void my_error_handler (const char *reason, const char *file, + int line, int err); +static int status = 0; + +void +test1d_trap (void) +{ + gsl_histogram *h; + double result, lower, upper; + size_t i; + + gsl_set_error_handler (&my_error_handler); + + gsl_ieee_env_setup (); + + status = 0; + h = gsl_histogram_calloc (0); + gsl_test (!status, "gsl_histogram_calloc traps zero-length histogram"); + gsl_test (h != 0, + "gsl_histogram_calloc returns NULL for zero-length histogram"); + + status = 0; + h = gsl_histogram_calloc_uniform (0, 0.0, 1.0); + gsl_test (!status, + "gsl_histogram_calloc_uniform traps zero-length histogram"); + gsl_test (h != 0, + "gsl_histogram_calloc_uniform returns NULL for zero-length histogram"); + + status = 0; + h = gsl_histogram_calloc_uniform (10, 1.0, 1.0); + gsl_test (!status, + "gsl_histogram_calloc_uniform traps equal endpoints"); + gsl_test (h != 0, + "gsl_histogram_calloc_uniform returns NULL for equal endpoints"); + + status = 0; + h = gsl_histogram_calloc_uniform (10, 2.0, 1.0); + gsl_test (!status, + "gsl_histogram_calloc_uniform traps invalid range"); + gsl_test (h != 0, + "gsl_histogram_calloc_uniform returns NULL for invalid range"); + + h = gsl_histogram_calloc_uniform (N, 0.0, 1.0); + + status = gsl_histogram_accumulate (h, 1.0, 10.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_accumulate traps x at xmax"); + + status = gsl_histogram_accumulate (h, 2.0, 100.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_accumulate traps x above xmax"); + + status = gsl_histogram_accumulate (h, -1.0, 1000.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_accumulate traps x below xmin"); + + status = gsl_histogram_increment (h, 1.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_increment traps x at xmax"); + + status = gsl_histogram_increment (h, 2.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_increment traps x above xmax"); + + status = gsl_histogram_increment (h, -1.0); + gsl_test (status != GSL_EDOM, "gsl_histogram_increment traps x below xmin"); + + + result = gsl_histogram_get (h, N); + gsl_test (result != 0, "gsl_histogram_get traps index at n"); + + result = gsl_histogram_get (h, N + 1); + gsl_test (result != 0, "gsl_histogram_get traps index above n"); + + status = gsl_histogram_get_range (h, N, &lower, &upper); + gsl_test (status != GSL_EDOM, + "gsl_histogram_get_range traps index at n"); + + status = gsl_histogram_get_range (h, N + 1, &lower, &upper); + gsl_test (status != GSL_EDOM, + "gsl_histogram_get_range traps index above n"); + + + status = 0; + gsl_histogram_find (h, -0.01, &i); + gsl_test (status != GSL_EDOM, "gsl_histogram_find traps x below xmin"); + + status = 0; + gsl_histogram_find (h, 1.0, &i); + gsl_test (status != GSL_EDOM, "gsl_histogram_find traps x at xmax"); + + status = 0; + gsl_histogram_find (h, 1.1, &i); + gsl_test (status != GSL_EDOM, "gsl_histogram_find traps x above xmax"); + + gsl_histogram_free (h); +} + + +static void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); + status = 1; +} diff --git a/software/gsl-1.15/histogram/test2d.c b/software/gsl-1.15/histogram/test2d.c new file mode 100644 index 000000000..36daf6a6d --- /dev/null +++ b/software/gsl-1.15/histogram/test2d.c @@ -0,0 +1,753 @@ +/* histogram/test2d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define M 107 +#define N 239 +#define M1 17 +#define N1 23 +#define MR 10 +#define NR 5 + +void +test2d (void) +{ + double xr[MR + 1] = + { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 }; + + double yr[NR + 1] = { 90.0, 91.0, 92.0, 93.0, 94.0, 95.0 }; + + gsl_histogram2d *h, *h1, *g, *hr; + size_t i, j, k; + + gsl_ieee_env_setup (); + + h = gsl_histogram2d_calloc (M, N); + h1 = gsl_histogram2d_calloc (M, N); + g = gsl_histogram2d_calloc (M, N); + + gsl_test (h->xrange == 0, + "gsl_histogram2d_calloc returns valid xrange pointer"); + gsl_test (h->yrange == 0, + "gsl_histogram2d_calloc returns valid yrange pointer"); + gsl_test (h->bin == 0, "gsl_histogram2d_calloc returns valid bin pointer"); + + gsl_test (h->nx != M, "gsl_histogram2d_calloc returns valid nx"); + gsl_test (h->ny != N, "gsl_histogram2d_calloc returns valid ny"); + + hr = gsl_histogram2d_calloc_range (MR, NR, xr, yr); + + gsl_test (hr->xrange == 0, + "gsl_histogram2d_calloc_range returns valid xrange pointer"); + gsl_test (hr->yrange == 0, + "gsl_histogram2d_calloc_range returns valid yrange pointer"); + gsl_test (hr->bin == 0, + "gsl_histogram2d_calloc_range returns valid bin pointer"); + + gsl_test (hr->nx != MR, "gsl_histogram2d_calloc_range returns valid nx"); + gsl_test (hr->ny != NR, "gsl_histogram2d_calloc_range returns valid ny"); + + { + int status = 0; + for (i = 0; i <= MR; i++) + { + if (hr->xrange[i] != xr[i]) + { + status = 1; + } + }; + + gsl_test (status, + "gsl_histogram2d_calloc_range creates xrange"); + } + + { + int status = 0; + for (i = 0; i <= NR; i++) + { + if (hr->yrange[i] != yr[i]) + { + status = 1; + } + }; + + gsl_test (status, + "gsl_histogram2d_calloc_range creates yrange"); + } + + for (i = 0; i <= MR; i++) + { + hr->xrange[i] = 0.0; + } + + for (i = 0; i <= NR; i++) + { + hr->yrange[i] = 0.0; + } + + { + int status = gsl_histogram2d_set_ranges (hr, xr, MR + 1, yr, NR + 1); + + for (i = 0; i <= MR; i++) + { + if (hr->xrange[i] != xr[i]) + { + status = 1; + } + }; + + gsl_test (status, "gsl_histogram2d_set_ranges sets xrange"); + } + + { + int status = 0; + for (i = 0; i <= NR; i++) + { + if (hr->yrange[i] != yr[i]) + { + status = 1; + } + }; + + gsl_test (status, "gsl_histogram2d_set_ranges sets yrange"); + } + + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + gsl_histogram2d_accumulate (h, (double) i, (double) j, (double) k); + }; + } + + { + int status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (h->bin[i * N + j] != (double) k) + { + status = 1; + } + } + } + gsl_test (status, + "gsl_histogram2d_accumulate writes into array"); + } + + { + int status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (gsl_histogram2d_get (h, i, j) != (double) k) + status = 1; + }; + } + gsl_test (status, "gsl_histogram2d_get reads from array"); + } + + for (i = 0; i <= M; i++) + { + h1->xrange[i] = 100.0 + i; + } + + for (i = 0; i <= N; i++) + { + h1->yrange[i] = 900.0 + i * i; + } + + gsl_histogram2d_memcpy (h1, h); + + { + int status = 0; + for (i = 0; i <= M; i++) + { + if (h1->xrange[i] != h->xrange[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram2d_memcpy copies bin xranges"); + } + + { + int status = 0; + for (i = 0; i <= N; i++) + { + if (h1->yrange[i] != h->yrange[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram2d_memcpy copies bin yranges"); + } + + { + int status = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + if (gsl_histogram2d_get (h1, i, j) != + gsl_histogram2d_get (h, i, j)) + status = 1; + } + } + gsl_test (status, "gsl_histogram2d_memcpy copies bin values"); + } + + gsl_histogram2d_free (h1); + + h1 = gsl_histogram2d_clone (h); + + { + int status = 0; + for (i = 0; i <= M; i++) + { + if (h1->xrange[i] != h->xrange[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram2d_clone copies bin xranges"); + } + + { + int status = 0; + for (i = 0; i <= N; i++) + { + if (h1->yrange[i] != h->yrange[i]) + status = 1; + }; + gsl_test (status, "gsl_histogram2d_clone copies bin yranges"); + } + + { + int status = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + if (gsl_histogram2d_get (h1, i, j) != + gsl_histogram2d_get (h, i, j)) + status = 1; + } + } + gsl_test (status, "gsl_histogram2d_clone copies bin values"); + } + + + gsl_histogram2d_reset (h); + + { + int status = 0; + + for (i = 0; i < M * N; i++) + { + if (h->bin[i] != 0) + status = 1; + } + gsl_test (status, "gsl_histogram2d_reset zeros array"); + } + + gsl_histogram2d_free (h); + h = gsl_histogram2d_calloc (M1, N1); + + { + + int status = 0; + + for (i = 0; i < M1; i++) + { + for (j = 0; j < N1; j++) + { + gsl_histogram2d_increment (h, (double) i, (double) j); + + for (k = 0; k <= i * N1 + j; k++) + { + if (h->bin[k] != 1) + { + status = 1; + } + } + + for (k = i * N1 + j + 1; k < M1 * N1; k++) + { + if (h->bin[k] != 0) + { + status = 1; + } + } + } + } + gsl_test (status, "gsl_histogram2d_increment increases bin value"); + } + + gsl_histogram2d_free (h); + h = gsl_histogram2d_calloc (M, N); + + { + int status = 0; + for (i = 0; i < M; i++) + { + double x0 = 0, x1 = 0; + gsl_histogram2d_get_xrange (h, i, &x0, &x1); + + if (x0 != i || x1 != i + 1) + { + status = 1; + } + } + gsl_test (status, + "gsl_histogram2d_get_xlowerlimit and xupperlimit"); + } + + + { + int status = 0; + for (i = 0; i < N; i++) + { + double y0 = 0, y1 = 0; + gsl_histogram2d_get_yrange (h, i, &y0, &y1); + + if (y0 != i || y1 != i + 1) + { + status = 1; + } + } + gsl_test (status, + "gsl_histogram2d_get_ylowerlimit and yupperlimit"); + } + + + { + int status = 0; + if (gsl_histogram2d_xmax (h) != M) + status = 1; + gsl_test (status, "gsl_histogram2d_xmax"); + } + + { + int status = 0; + if (gsl_histogram2d_xmin (h) != 0) + status = 1; + gsl_test (status, "gsl_histogram2d_xmin"); + } + + { + int status = 0; + if (gsl_histogram2d_nx (h) != M) + status = 1; + gsl_test (status, "gsl_histogram2d_nx"); + } + + { + int status = 0; + if (gsl_histogram2d_ymax (h) != N) + status = 1; + gsl_test (status, "gsl_histogram2d_ymax"); + } + + { + int status = 0; + if (gsl_histogram2d_ymin (h) != 0) + status = 1; + gsl_test (status, "gsl_histogram2d_ymin"); + } + + { + int status = 0; + if (gsl_histogram2d_ny (h) != N) + status = 1; + gsl_test (status, "gsl_histogram2d_ny"); + } + + h->bin[3 * N + 2] = 123456.0; + h->bin[4 * N + 3] = -654321; + + { + double max = gsl_histogram2d_max_val (h); + gsl_test (max != 123456.0, "gsl_histogram2d_max_val finds maximum value"); + } + + { + double min = gsl_histogram2d_min_val (h); + gsl_test (min != -654321.0, + "gsl_histogram2d_min_val finds minimum value"); + } + + { + size_t imax, jmax; + gsl_histogram2d_max_bin (h, &imax, &jmax); + gsl_test (imax != 3 + || jmax != 2, + "gsl_histogram2d_max_bin finds maximum value bin"); + } + + { + size_t imin, jmin; + gsl_histogram2d_min_bin (h, &imin, &jmin); + gsl_test (imin != 4 + || jmin != 3, "gsl_histogram2d_min_bin find minimum value bin"); + } + + for (i = 0; i < M * N; i++) + { + h->bin[i] = i + 27; + g->bin[i] = (i + 27) * (i + 1); + } + + { + double sum = gsl_histogram2d_sum (h); + gsl_test (sum != N * M * 27 + ((N * M - 1) * N * M) / 2, + "gsl_histogram2d_sum sums all bin values"); + } + + { + /* first test... */ + const double xpos = 0.6; + const double ypos = 0.85; + double xmean; + double ymean; + size_t xbin; + size_t ybin; + gsl_histogram2d *h3 = gsl_histogram2d_alloc (M, N); + gsl_histogram2d_set_ranges_uniform (h3, 0, 1, 0, 1); + gsl_histogram2d_increment (h3, xpos, ypos); + gsl_histogram2d_find (h3, xpos, ypos, &xbin, &ybin); + xmean = gsl_histogram2d_xmean (h3); + ymean = gsl_histogram2d_ymean (h3); + + { + double expected_xmean = (h3->xrange[xbin] + h3->xrange[xbin + 1]) / 2.0; + double expected_ymean = (h3->yrange[ybin] + h3->yrange[ybin + 1]) / 2.0; + gsl_test_abs (xmean, expected_xmean, 100.0 * GSL_DBL_EPSILON, + "gsl_histogram2d_xmean"); + gsl_test_abs (ymean, expected_ymean, 100.0 * GSL_DBL_EPSILON, + "gsl_histogram2d_ymean"); + }; + gsl_histogram2d_free (h3); + } + + { + /* test it with bivariate normal distribution */ + const double xmean = 0.7; + const double ymean = 0.7; + const double xsigma = 0.1; + const double ysigma = 0.1; + const double correl = 0.5; + const double norm = + 10.0 / M_PI / xsigma / ysigma / sqrt (1.0 - correl * correl); + size_t xbin; + size_t ybin; + gsl_histogram2d *h3 = gsl_histogram2d_alloc (M, N); + gsl_histogram2d_set_ranges_uniform (h3, 0, 1, 0, 1); + /* initialize with 2d gauss pdf in two directions */ + for (xbin = 0; xbin < M; xbin++) + { + double xi = + ((h3->xrange[xbin] + h3->xrange[xbin + 1]) / 2.0 - xmean) / xsigma; + for (ybin = 0; ybin < N; ybin++) + { + double yi = + ((h3->yrange[ybin] + h3->yrange[ybin + 1]) / 2.0 - + ymean) / ysigma; + double prob = + norm * exp (-(xi * xi - 2.0 * correl * xi * yi + yi * yi) / + 2.0 / (1 - correl * correl)); + h3->bin[xbin * N + ybin] = prob; + } + } + { + double xs = gsl_histogram2d_xsigma (h3); + double ys = gsl_histogram2d_ysigma (h3); + /* evaluate results and compare with parameters */ + + gsl_test_abs (gsl_histogram2d_xmean (h3), xmean, 2.0/M, + "gsl_histogram2d_xmean histogram mean(x)"); + gsl_test_abs (gsl_histogram2d_ymean (h3), ymean, 2.0/N, + "gsl_histogram2d_ymean histogram mean(y)"); + gsl_test_abs (xs, xsigma, 2.0/M, + "gsl_histogram2d_xsigma histogram stdev(x)"); + gsl_test_abs (ys, ysigma, 2.0/N, + "gsl_histogram2d_ysigma histogram stdev(y)"); + gsl_test_abs (gsl_histogram2d_cov (h3) / xs / ys, correl, + 2.0/((M < N) ? M : N), + "gsl_histogram2d_cov histogram covariance"); + } + gsl_histogram2d_free (h3); + } + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_add (h1, h); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != g->bin[i] + h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_add histogram addition"); + } + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_sub (h1, h); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != g->bin[i] - h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_sub histogram subtraction"); + } + + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_mul (h1, h); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != g->bin[i] * h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_mul histogram multiplication"); + } + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_div (h1, h); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != g->bin[i] / h->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_div histogram division"); + } + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_scale (h1, 0.5); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != 0.5 * g->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_scale histogram scaling"); + } + + gsl_histogram2d_memcpy (h1, g); + gsl_histogram2d_shift (h1, 0.25); + + { + int status = 0; + for (i = 0; i < M * N; i++) + { + if (h1->bin[i] != 0.25 + g->bin[i]) + status = 1; + } + gsl_test (status, "gsl_histogram2d_shift histogram shift"); + } + + gsl_histogram2d_free (h); /* free whatever is in h */ + + h = gsl_histogram2d_calloc_uniform (M1, N1, 0.0, 5.0, 0.0, 5.0); + + gsl_test (h->xrange == 0, + "gsl_histogram2d_calloc_uniform returns valid range pointer"); + gsl_test (h->yrange == 0, + "gsl_histogram2d_calloc_uniform returns valid range pointer"); + gsl_test (h->bin == 0, + "gsl_histogram2d_calloc_uniform returns valid bin pointer"); + gsl_test (h->nx != M1, "gsl_histogram2d_calloc_uniform returns valid nx"); + gsl_test (h->ny != N1, "gsl_histogram2d_calloc_uniform returns valid ny"); + + gsl_histogram2d_accumulate (h, 0.0, 3.01, 1.0); + gsl_histogram2d_accumulate (h, 0.1, 2.01, 2.0); + gsl_histogram2d_accumulate (h, 0.2, 1.01, 3.0); + gsl_histogram2d_accumulate (h, 0.3, 0.01, 4.0); + + { + size_t i1, i2, i3, i4; + size_t j1, j2, j3, j4; + double expected; + int status; + status = gsl_histogram2d_find (h, 0.0, 3.01, &i1, &j1); + status = gsl_histogram2d_find (h, 0.1, 2.01, &i2, &j2); + status = gsl_histogram2d_find (h, 0.2, 1.01, &i3, &j3); + status = gsl_histogram2d_find (h, 0.3, 0.01, &i4, &j4); + + for (i = 0; i < M1; i++) + { + for (j = 0; j < N1; j++) + { + if (i == i1 && j == j1) + { + expected = 1.0; + } + else if (i == i2 && j == j2) + { + expected = 2.0; + } + else if (i == i3 && j == j3) + { + expected = 3.0; + } + else if (i == i4 && j == j4) + { + expected = 4.0; + } + else + { + expected = 0.0; + } + + if (h->bin[i * N1 + j] != expected) + { + status = 1; + } + } + } + gsl_test (status, "gsl_histogram2d_find returns index"); + } + + { + FILE *f = fopen ("test.txt", "w"); + gsl_histogram2d_fprintf (f, h, "%.19e", "%.19e"); + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + gsl_histogram2d *hh = gsl_histogram2d_calloc (M1, N1); + int status = 0; + + gsl_histogram2d_fscanf (f, hh); + + for (i = 0; i <= M1; i++) + { + if (h->xrange[i] != hh->xrange[i]) + { + printf ("xrange[%d] : %g orig vs %g\n", + (int) i, h->xrange[i], hh->xrange[i]); + status = 1; + } + } + + for (j = 0; j <= N1; j++) + { + if (h->yrange[j] != hh->yrange[j]) + { + printf ("yrange[%d] : %g orig vs %g\n", + (int) j, h->yrange[j], hh->yrange[j]); + status = 1; + } + } + + for (i = 0; i < M1 * N1; i++) + { + if (h->bin[i] != hh->bin[i]) + { + printf ("bin[%d] : %g orig vs %g\n", + (int) i, h->bin[i], hh->bin[i]); + status = 1; + } + } + + gsl_test (status, "gsl_histogram2d_fprintf and fscanf"); + + gsl_histogram2d_free (hh); + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "wb"); + gsl_histogram2d_fwrite (f, h); + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + gsl_histogram2d *hh = gsl_histogram2d_calloc (M1, N1); + int status = 0; + + gsl_histogram2d_fread (f, hh); + + for (i = 0; i <= M1; i++) + { + if (h->xrange[i] != hh->xrange[i]) + { + printf ("xrange[%d] : %g orig vs %g\n", + (int) i, h->xrange[i], hh->xrange[i]); + status = 1; + } + } + + for (j = 0; j <= N1; j++) + { + if (h->yrange[j] != hh->yrange[j]) + { + printf ("yrange[%d] : %g orig vs %g\n", + (int) j, h->yrange[j], hh->yrange[j]); + status = 1; + } + } + + for (i = 0; i < M1 * N1; i++) + { + if (h->bin[i] != hh->bin[i]) + { + printf ("bin[%d] : %g orig vs %g\n", + (int) i, h->bin[i], hh->bin[i]); + status = 1; + } + } + + gsl_test (status, "gsl_histogram2d_fwrite and fread"); + + gsl_histogram2d_free (hh); + fclose (f); + } + + gsl_histogram2d_free (h); + gsl_histogram2d_free (h1); + gsl_histogram2d_free (g); + gsl_histogram2d_free (hr); +} diff --git a/software/gsl-1.15/histogram/test2d_resample.c b/software/gsl-1.15/histogram/test2d_resample.c new file mode 100644 index 000000000..095ac6566 --- /dev/null +++ b/software/gsl-1.15/histogram/test2d_resample.c @@ -0,0 +1,115 @@ +/* histogram/test2d_resample.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "urand.c" + +void +test2d_resample (void) +{ + size_t i, j; + int status = 0; + double total = 0; + size_t N = 200000; + + gsl_histogram2d *h; + + gsl_ieee_env_setup (); + + h = gsl_histogram2d_calloc_uniform (10, 10, 0.0, 1.0, 0.0, 1.0); + + for (i = 0; i < 10; i++) + { + for (j = 0; j < 10; j++) + { + double w = 10.0 * i + j; + total += w; + gsl_histogram2d_accumulate (h, 0.1 * i, 0.1 * i, w); + } + } + + { + gsl_histogram2d_pdf *p = gsl_histogram2d_pdf_alloc (10,10); + + gsl_histogram2d *hh = gsl_histogram2d_calloc_uniform (20, 20, + 0.0, 1.0, + 0.0, 1.0); + + gsl_histogram2d_pdf_init (p, h); + + for (i = 0; i < N; i++) + { + double u = urand(); + double v = urand(); + double x, y; + status = gsl_histogram2d_pdf_sample (p, u, v, &x, &y); + status = gsl_histogram2d_increment (hh, x, y); + } + + status = 0; + for (i = 0; i < 20; i++) + { + for (j = 0; j < 20; j++) + { + double z = 4 * total * gsl_histogram2d_get (hh, i, j) / (double) N; + size_t k1, k2; + double ya; + double x, xmax, y, ymax; + + gsl_histogram2d_get_xrange (hh, i, &x, &xmax); + gsl_histogram2d_get_yrange (hh, j, &y, &ymax); + + gsl_histogram2d_find (h, x, y, &k1, &k2); + ya = gsl_histogram2d_get (h, k1, k2); + + if (ya == 0) + { + if (z != 0) + { + status = 1; + printf ("(%d,%d): %g vs %g\n", (int)i, (int)j, z, ya); + } + } + else + { + double err = 1 / sqrt (gsl_histogram2d_get (hh, i, j)); + double sigma = fabs ((z - ya) / (ya * err)); + if (sigma > 3) + { + status = 1; + printf ("%g vs %g err=%g sigma=%g\n", z, ya, err, sigma); + } + } + } + } + + gsl_histogram2d_pdf_free (p) ; + gsl_histogram2d_free (hh) ; + + gsl_test (status, "gsl_histogram2d_pdf_sample within statistical errors"); + } + + gsl_histogram2d_free (h) ; +} diff --git a/software/gsl-1.15/histogram/test2d_trap.c b/software/gsl-1.15/histogram/test2d_trap.c new file mode 100644 index 000000000..0e2929c17 --- /dev/null +++ b/software/gsl-1.15/histogram/test2d_trap.c @@ -0,0 +1,203 @@ +/* histogram/test2d_trap.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define N 107 +#define M 239 + +static void my_error_handler (const char *reason, const char *file, + int line, int err); +static int status = 0; + +void +test2d_trap (void) +{ + gsl_histogram2d *h; + double result, lower, upper; + size_t i, j; + + gsl_set_error_handler (&my_error_handler); + + gsl_ieee_env_setup (); + + status = 0; + h = gsl_histogram2d_calloc (0, 10); + gsl_test (!status, "gsl_histogram_calloc traps zero-width histogram"); + gsl_test (h != 0, + "gsl_histogram2d_calloc returns NULL for zero-width histogram"); + + + status = 0; + h = gsl_histogram2d_calloc (10, 0); + gsl_test (!status, "gsl_histogram_calloc traps zero-length histogram"); + gsl_test (h != 0, + "gsl_histogram2d_calloc returns NULL for zero-length histogram"); + + + status = 0; + h = gsl_histogram2d_calloc_uniform (0, 10, 0.0, 1.0, 0.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps zero-width histogram"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for zero-width histogram"); + + status = 0; + h = gsl_histogram2d_calloc_uniform (10, 0, 0.0, 1.0, 0.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps zero-length histogram"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for zero-length histogram"); + + status = 0; + h = gsl_histogram2d_calloc_uniform (10, 10, 0.0, 1.0, 1.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps equal endpoints"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for equal endpoints"); + + status = 0; + h = gsl_histogram2d_calloc_uniform (10, 10, 1.0, 1.0, 0.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps equal endpoints"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for equal endpoints"); + + status = 0; + h = gsl_histogram2d_calloc_uniform (10, 10, 0.0, 1.0, 2.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps invalid range"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for invalid range"); + + status = 0; + h = gsl_histogram2d_calloc_uniform (10, 10, 2.0, 1.0, 0.0, 1.0); + gsl_test (!status, + "gsl_histogram2d_calloc_uniform traps invalid range"); + gsl_test (h != 0, + "gsl_histogram2d_calloc_uniform returns NULL for invalid range"); + + h = gsl_histogram2d_calloc_uniform (N, M, 0.0, 1.0, 0.0, 1.0); + + status = gsl_histogram2d_accumulate (h, 1.0, 0.0, 10.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps x at xmax"); + + status = gsl_histogram2d_accumulate (h, 2.0, 0.0, 100.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps x above xmax"); + + status = gsl_histogram2d_accumulate (h, -1.0, 0.0, 1000.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps x below xmin"); + + status = gsl_histogram2d_accumulate (h, 0.0, 1.0, 10.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps y at ymax"); + + status = gsl_histogram2d_accumulate (h, 0.0, 2.0, 100.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps y above ymax"); + + status = gsl_histogram2d_accumulate (h, 0.0, -1.0, 1000.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_accumulate traps y below ymin"); + + + status = gsl_histogram2d_increment (h, 1.0, 0.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps x at xmax"); + + status = gsl_histogram2d_increment (h, 2.0, 0.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps x above xmax"); + + status = gsl_histogram2d_increment (h, -1.0, 0.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps x below xmin"); + + + status = gsl_histogram2d_increment (h, 0.0, 1.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps y at ymax"); + + status = gsl_histogram2d_increment (h, 0.0, 2.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps y above ymax"); + + status = gsl_histogram2d_increment (h, 0.0, -1.0); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_increment traps y below ymin"); + + + result = gsl_histogram2d_get (h, N, 0); + gsl_test (result != 0, "gsl_histogram2d_get traps x index at nx"); + + result = gsl_histogram2d_get (h, N + 1, 0); + gsl_test (result != 0, "gsl_histogram2d_get traps x index above nx"); + + result = gsl_histogram2d_get (h, 0, M); + gsl_test (result != 0, "gsl_histogram2d_get traps y index at ny"); + + result = gsl_histogram2d_get (h, 0, M + 1); + gsl_test (result != 0, "gsl_histogram2d_get traps y index above ny"); + + + status = gsl_histogram2d_get_xrange (h, N, &lower, &upper); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_get_xrange traps index at nx"); + + status = gsl_histogram2d_get_xrange (h, N + 1, &lower, &upper); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_get_xrange traps index above nx"); + + status = gsl_histogram2d_get_yrange (h, M, &lower, &upper); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_get_yrange traps index at ny"); + + status = gsl_histogram2d_get_yrange (h, M + 1, &lower, &upper); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_get_yrange traps index above ny"); + + status = 0; + gsl_histogram2d_find (h, -0.01, 0.0, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps x below xmin"); + + status = 0; + gsl_histogram2d_find (h, 1.0, 0.0, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps x at xmax"); + + status = 0; + gsl_histogram2d_find (h, 1.1, 0.0, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps x above xmax"); + + + status = 0; + gsl_histogram2d_find (h, 0.0, -0.01, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps y below ymin"); + + status = 0; + gsl_histogram2d_find (h, 0.0, 1.0, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps y at ymax"); + + status = 0; + gsl_histogram2d_find (h, 0.0, 1.1, &i, &j); + gsl_test (status != GSL_EDOM, "gsl_histogram2d_find traps y above ymax"); + + gsl_histogram2d_free (h); +} + + +static void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); + status = 1; +} diff --git a/software/gsl-1.15/histogram/urand.c b/software/gsl-1.15/histogram/urand.c new file mode 100644 index 000000000..bd2730097 --- /dev/null +++ b/software/gsl-1.15/histogram/urand.c @@ -0,0 +1,26 @@ +/* histogram/urand.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static double urand (void); + +static double urand (void) { + static unsigned long int x = 1; + x = (1103515245 * x + 12345) & 0x7fffffffUL ; + return x / 2147483648.0 ; +} diff --git a/software/gsl-1.15/ieee-utils/.deps/env.Plo b/software/gsl-1.15/ieee-utils/.deps/env.Plo new file mode 100644 index 000000000..d2cb19aca --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/env.Plo @@ -0,0 +1,93 @@ +env.lo: env.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: diff --git a/software/gsl-1.15/ieee-utils/.deps/fp.Plo b/software/gsl-1.15/ieee-utils/.deps/fp.Plo new file mode 100644 index 000000000..428c5bf1b --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/fp.Plo @@ -0,0 +1,47 @@ +fp.lo: fp.c ../config.h fp-unknown.c ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h + +../config.h: + +fp-unknown.c: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: diff --git a/software/gsl-1.15/ieee-utils/.deps/make_rep.Plo b/software/gsl-1.15/ieee-utils/.deps/make_rep.Plo new file mode 100644 index 000000000..97737525b --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/make_rep.Plo @@ -0,0 +1,87 @@ +make_rep.lo: make_rep.c ../config.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h endian.c /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h standardize.c + +../config.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +endian.c: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +standardize.c: diff --git a/software/gsl-1.15/ieee-utils/.deps/print.Plo b/software/gsl-1.15/ieee-utils/.deps/print.Plo new file mode 100644 index 000000000..4e1048eaf --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/print.Plo @@ -0,0 +1,38 @@ +print.lo: print.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/ieee-utils/.deps/read.Plo b/software/gsl-1.15/ieee-utils/.deps/read.Plo new file mode 100644 index 000000000..51d994a5e --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/read.Plo @@ -0,0 +1,100 @@ +read.lo: read.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/ieee-utils/.deps/test.Po b/software/gsl-1.15/ieee-utils/.deps/test.Po new file mode 100644 index 000000000..899576742 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/.deps/test.Po @@ -0,0 +1,98 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h /usr/bin/../lib/clang/4.1/include/float.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h ../gsl/gsl_test.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +../gsl/gsl_test.h: diff --git a/software/gsl-1.15/ieee-utils/ChangeLog b/software/gsl-1.15/ieee-utils/ChangeLog new file mode 100644 index 000000000..5ce2be378 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/ChangeLog @@ -0,0 +1,229 @@ +2010-11-06 Brian Gough + + * fp-aix.c: added workaround for AIX problems (D. Kirby) + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-06-21 Brian Gough + + * fp.c: allow universal binaries by checking __ppc__ and __i386__ + preprocessor definitions on Darwin + +2007-04-23 Brian Gough + + * fp-gnux86.c (gsl_ieee_set_mode): added support for MXCSR register + +2005-02-11 Brian Gough + + * fp-gnuc99.c (gsl_ieee_set_mode): added an #ifdef for the default + round to nearest mode + +2003-12-20 Brian Gough + + * fp-gnuc99.c (_GNU_SOURCE): define _GNU_SOURCE when including + fenv.h + +2003-07-21 Brian Gough + + * read.c (gsl_ieee_read_mode_string): added missing + mask-division-by-zero to error message + +2003-06-14 Brian Gough + + * fp-m68klinux.c fp-ppclinux.c fp-sparclinux.c fp-x86linux.c: + renamed to fp-gnum68k.c fp-gnuppc.c fp-gnusparc.c fp-gnux86.c + since they are dependent on the GNU C Library interface rather + than the kernel interface + + * fp-gnuc99.c: added a fallback to the C99 exception functions for + cases where the operating system is not recognized + +Mon Aug 26 20:57:29 2002 Brian Gough + + * test.c: use system values for FLT_MIN, FLT_MAX, DBL_MIN, DBL_MAX + +Sat May 11 22:30:43 2002 Brian Gough + + * test.c (TEST_DENORMAL): test denormals only when available, as + tested in configure script + +Mon Sep 10 14:23:52 2001 Brian Gough + + * fp-netbsd.c fp-openbsd.c (gsl_ieee_set_mode): tried to correct + the logic for the denormalized exception. + +Tue Jul 10 13:10:12 2001 Brian Gough + + * env.c (gsl_ieee_env_setup): send GSL_IEEE_MODE output to stderr + +Tue Jun 26 10:44:13 2001 Brian Gough + + * fp-netbsd.c (gsl_ieee_set_mode): simplified, patch from Jason Beegan + + * fp-openbsd.c (gsl_ieee_set_mode): simplified + +Mon Jun 25 20:47:33 2001 Brian Gough + + * fp-openbsd.c (gsl_ieee_set_mode): added support for openbsd + +Tue May 8 10:49:58 2001 Brian Gough + + * fp-aix.c: changed macros from TRAP_ to TRP_.. + +Fri Apr 13 15:07:10 2001 Brian Gough + + * fp-darwin.c: added darwin support from Rodney Sparapani + +Wed Mar 28 13:12:20 2001 Brian Gough + + * fp-netbsd.c: added netbsd support from Jason Beegan + + +Thu Mar 15 14:11:29 2001 Brian Gough + + * fp-hpux11.c: added support for HPUX11 + +Fri Mar 2 16:58:36 2001 Brian Gough + + * fp-os2emx.c: add ieee support for OS/2 from Henry Sobotka + + +Thu Jul 20 19:41:56 2000 Brian Gough + + * fp-freebsd.c (gsl_ieee_set_mode): added fp-freebsd.c from + Vladimir Kushnir + +Mon Jun 12 19:23:53 2000 Brian Gough + + * Makefile.am (noinst_HEADERS): added aix and irix to makefile + + * fp-x86linux.c (gsl_ieee_set_mode): Handle libc5, where + _FPU_SETCW is not available, by defining the macro. Suggested by + OKUJI Yoshinori + +Wed Jun 7 19:18:15 2000 Brian Gough + + * fp-ppclinux.c: added support for ppc linux + +Tue Jun 6 19:59:50 2000 Brian Gough + + * fp-x86linux.c: renamed from fp-linux.c + +Thu May 18 11:53:13 2000 Brian Gough + + * test.c: turned off tests for denormals on irix, since they are + supported + + * fp.c: added IRIX and AIX to the top-level fp.c file -- somehow + they had been forgotten! + +2000-05-14 Steve Robbins + + * fp-tru64.c: include `/usr/include/float.h', if necessary for + picking up FP_RND_RN and friends. + +Sun Apr 2 14:25:52 2000 Brian Gough + + * fp-m68klinux.c: added file for m68k support (not complete, some + macros need to be checked) + +Thu Mar 16 15:34:08 2000 Brian Gough + + * read.c (gsl_ieee_read_mode_string): changed token separator to , + instead of ; + +Thu Feb 24 19:20:50 2000 Brian Gough + + * fp-tru64.c (gsl_ieee_set_mode): added an #ifdef for + IEEE_TRAP_ENABLE_DNO, which may or may not be defined depending on + the version of Digital Unix. + +Mon Feb 14 14:03:22 2000 Brian Gough + + * made internal functions static and removed redundant functions + +Fri Nov 5 15:01:55 1999 Brian Gough + + * fp-sparclinux.c: added support for sparclinux + +Thu Oct 7 13:03:00 1999 Brian Gough + + * make_rep.c: more careful conversion from unsigned to signed integer + for sign attribute to prevent warnings + +Sat Aug 21 01:05:01 1999 Tim Mooney + + * fp-aix.c: added, based on fp-solaris. + +Fri Aug 20 12:17:53 1999 Brian Gough + + * fp-tru64.c (gsl_ieee_set_mode): note that INEXACT is not easily + supported on Tru64, and give an error if anyone tries to use it + +Wed Aug 18 21:36:01 1999 Tim Mooney + + * fp-irix.c: added, based on fp-solaris. IRIX 6 has a rounding and + exception interface that is identical to Solaris, right down to the enums. + +Tue Aug 17 18:36:01 1999 Tim Mooney + + * fp-tru64.c: added, based on solaris and HP-UX fp-* files. + Rounding mode and trap control requires that the compiler be + passed special options, see the comments in fp-tru64.c. + +Fri Jul 23 19:00:51 1999 Brian Gough + + * print.c: added fprintf versions of the printf functions + +Sat May 8 20:39:28 1999 Brian Gough + + * fp-linux.c (gsl_ieee_set_mode): changed from using the function + __fput_setcw() to the macro _FPU_SETCW() since Khimenko Victor + reports that __setfpucw() is not in the shared + lib version of glibc-2.1.1 + +Fri Apr 2 20:52:59 1999 Brian Gough + + * endian.c (setup_dynamic_endianness): removed useless test, + u.c[i]<0 for unsigned + +Fri Aug 21 15:36:22 1998 Brian Gough + + * fp-unknown.c (gsl_ieee_set_mode): made return type int, as it + should be + +Mon Jun 15 22:02:00 1998 Brian Gough + + * renamed read-mode-string.c to read.c and print-ieee.c to print.c + +Tue Jun 2 19:29:34 1998 Brian Gough + + * gsl_ieee_utils.h: renamed GSL_IEEE_CATCH_INEXACT to + GSL_IEEE_TRAP_INEXACT, which is a better name + +Mon Jun 1 15:27:08 1998 Brian Gough + + * fp-sunos4.c: support for sunos4 IEEE interface + + * fp-solaris.c: support for solaris IEEE interface + + * renamed fp-mode-string.c to fp-env.c, in order to avoid short + filename problems + + * added support for setting the IEEE mode from the environment + variable GSL_IEEE_MODE (only works for the Linux kernel so far) + +Mon May 18 16:20:17 1998 Brian Gough + + * The determination of endianness is now done on each call instead + of at configure time (autoconf complains about what would happen + to the test if it were cross compiling). Ok, so it's a bit slower + but this isn't a performance critical routine. + +Sat May 16 23:10:09 1998 Brian Gough + + * This directory contains some routines for examining IEEE format + numbers at the bit level + diff --git a/software/gsl-1.15/ieee-utils/Makefile.am b/software/gsl-1.15/ieee-utils/Makefile.am new file mode 100644 index 000000000..9f9a9875c --- /dev/null +++ b/software/gsl-1.15/ieee-utils/Makefile.am @@ -0,0 +1,14 @@ +noinst_LTLIBRARIES = libgslieeeutils.la + +pkginclude_HEADERS = gsl_ieee_utils.h + +libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c + +noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test +test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c diff --git a/software/gsl-1.15/ieee-utils/Makefile.in b/software/gsl-1.15/ieee-utils/Makefile.in new file mode 100644 index 000000000..98b79334e --- /dev/null +++ b/software/gsl-1.15/ieee-utils/Makefile.in @@ -0,0 +1,666 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = ieee-utils +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslieeeutils_la_LIBADD = +am_libgslieeeutils_la_OBJECTS = print.lo make_rep.lo env.lo fp.lo \ + read.lo +libgslieeeutils_la_OBJECTS = $(am_libgslieeeutils_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslieeeutils_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslieeeutils_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslieeeutils.la +pkginclude_HEADERS = gsl_ieee_utils.h +libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c +noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ieee-utils/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ieee-utils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslieeeutils.la: $(libgslieeeutils_la_OBJECTS) $(libgslieeeutils_la_DEPENDENCIES) + $(LINK) $(libgslieeeutils_la_OBJECTS) $(libgslieeeutils_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_rep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/ieee-utils/TODO b/software/gsl-1.15/ieee-utils/TODO new file mode 100644 index 000000000..3797aaa41 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/TODO @@ -0,0 +1,5 @@ +# -*- org -*- +#+CATEGORY: ieee-utils + +* Fix up ieee-utils/fp-m68klinux.c for correct behavior and actually +test it. diff --git a/software/gsl-1.15/ieee-utils/endian.c b/software/gsl-1.15/ieee-utils/endian.c new file mode 100644 index 000000000..b264a1f50 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/endian.c @@ -0,0 +1,37 @@ +/* ieee-utils/endian.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +static int little_endian_p (void) ; + +static int +little_endian_p (void) { + /* Are we little or big endian? From Harbison & Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + return (u.c[sizeof (long) - 1] == 1); +} + diff --git a/software/gsl-1.15/ieee-utils/env.c b/software/gsl-1.15/ieee-utils/env.c new file mode 100644 index 000000000..fa7e55989 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/env.c @@ -0,0 +1,114 @@ +/* ieee-utils/env.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +void +gsl_ieee_env_setup (void) +{ + const char * p = getenv("GSL_IEEE_MODE") ; + + int precision = 0, rounding = 0, exception_mask = 0 ; + + int comma = 0 ; + + if (p == 0) /* GSL_IEEE_MODE environment variable is not set */ + return ; + + if (*p == '\0') /* GSL_IEEE_MODE environment variable is empty */ + return ; + + gsl_ieee_read_mode_string (p, &precision, &rounding, &exception_mask) ; + + gsl_ieee_set_mode (precision, rounding, exception_mask) ; + + fprintf(stderr, "GSL_IEEE_MODE=\"") ; + + /* Print string with a preceeding comma if the list has already begun */ + +#define PRINTC(x) do {if(comma) fprintf(stderr,","); fprintf(stderr,x); comma++ ;} while(0) + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + PRINTC("single-precision") ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + PRINTC("double-precision") ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + PRINTC("extended-precision") ; + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + PRINTC("round-to-nearest") ; + break ; + case GSL_IEEE_ROUND_DOWN: + PRINTC("round-down") ; + break ; + case GSL_IEEE_ROUND_UP: + PRINTC("round-up") ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + PRINTC("round-to-zero") ; + break ; + } + + if ((exception_mask & GSL_IEEE_MASK_ALL) == GSL_IEEE_MASK_ALL) + { + PRINTC("mask-all") ; + } + else if ((exception_mask & GSL_IEEE_MASK_ALL) == 0) + { + PRINTC("trap-common") ; + } + else + { + if (exception_mask & GSL_IEEE_MASK_INVALID) + PRINTC("mask-invalid") ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + PRINTC("mask-denormalized") ; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + PRINTC("mask-division-by-zero") ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + PRINTC("mask-overflow") ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + PRINTC("mask-underflow") ; + } + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + PRINTC("trap-inexact") ; + + fprintf(stderr,"\"\n") ; +} + + + + + diff --git a/software/gsl-1.15/ieee-utils/fp-aix.c b/software/gsl-1.15/ieee-utils/fp-aix.c new file mode 100644 index 000000000..a40ad19e4 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-aix.c @@ -0,0 +1,155 @@ +/* ieee-utils/fp-aix.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Tim Mooney + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* GCC uses a common float.h for all platforms, and ignores all vendor +specific code in float.h. That causes problems with fprnd_t, +FP_RND_RZ, FP_RND_RN and FP_RND_RP on AIX. + +Personally I consider that a bug, and was advised by a GCC developer +to report this as a bug, which I did. + +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46155 + +However, there is not universal agreement whether this is a gcc bug, so +the issue needs to be worked around on AIX. + +David Kirkby, 26th October 2010. */ + +#if !HAVE_DECL_FPRND_T +typedef unsigned short fprnd_t; +#endif + +#ifndef FP_RND_RZ +#define FP_RND_RZ 0 +#endif + +#ifndef FP_RND_RN +#define FP_RND_RN 1 +#endif + + +#ifndef FP_RND_RP +#define FP_RND_RP 2 +#endif + +#ifndef FP_RND_RM +#define FP_RND_RM 3 +#endif + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fptrap_t mode = 0 ; + fprnd_t rnd = 0 ; + + switch (precision) + { + + /* I'm not positive about AIX only supporting default precision rounding, + * but this is the best assumption until it's proven otherwise. */ + + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("AIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("AIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("AIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RND_RN ; + fp_swap_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RND_RM ; + fp_swap_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RND_RP ; + fp_swap_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RND_RZ ; + fp_swap_rnd (rnd) ; + break ; + default: + rnd = FP_RND_RN ; + fp_swap_rnd (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = TRP_INVALID | TRP_DIV_BY_ZERO | TRP_OVERFLOW | TRP_UNDERFLOW ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ TRP_INVALID ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("AIX does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ TRP_DIV_BY_ZERO ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ TRP_OVERFLOW ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ TRP_UNDERFLOW ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= TRP_INEXACT ; + } + else + { + mode &= ~ TRP_INEXACT ; + } + + /* AIX appears to require two steps -- first enable floating point traps + * in general... */ + fp_trap(FP_TRAP_SYNC); + + /* next, enable the traps we're interested in */ + fp_enable(mode); + + return GSL_SUCCESS ; + +} diff --git a/software/gsl-1.15/ieee-utils/fp-darwin.c b/software/gsl-1.15/ieee-utils/fp-darwin.c new file mode 100644 index 000000000..733ae67b2 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-darwin.c @@ -0,0 +1,95 @@ +/* ieee-utils/fp-darwin.c + * + * Copyright (C) 2001 Rodney Sparapani + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + ppc_fp_scr_t fp_scr = get_fp_scr() ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + fp_scr.rn = RN_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + fp_scr.rn = RN_TOWARD_MINUS ; + break ; + case GSL_IEEE_ROUND_UP: + fp_scr.rn = RN_TOWARD_PLUS ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + fp_scr.rn = RN_TOWARD_ZERO ; + break ; + default: + fp_scr.rn = RN_NEAREST ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + fp_scr.ve = 0 ; //ve bit: invalid op exception enable + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("powerpc does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + fp_scr.ze = 0 ; //ze bit: zero divide exception enable + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + fp_scr.oe = 0 ; //oe bit: overflow exception enable + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + fp_scr.ue = 0 ; //ue bit: underflow exception enable + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + fp_scr.xe = 1 ; //xe bit: inexact exception enable + } + else + { + fp_scr.xe = 01 ; + } + + set_fp_scr(fp_scr); + + return GSL_SUCCESS ; + +} diff --git a/software/gsl-1.15/ieee-utils/fp-darwin86.c b/software/gsl-1.15/ieee-utils/fp-darwin86.c new file mode 100644 index 000000000..ddd4dbec0 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-darwin86.c @@ -0,0 +1,204 @@ +/* ieee-utils/fp-darwin86.c + * + * Copyright (C) 2006 Erik Schnetter + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* Here is the dirty part. Set up your 387 through the control word + * (cw) register. + * + * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 + * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM + * + * IM: Invalid operation mask + * DM: Denormalized operand mask + * ZM: Zero-divide mask + * OM: Overflow mask + * UM: Underflow mask + * PM: Precision (inexact result) mask + * + * Mask bit is 1 means no interrupt. + * + * PC: Precision control + * 11 - round to extended precision + * 10 - round to double precision + * 00 - round to single precision + * + * RC: Rounding control + * 00 - rounding to nearest + * 01 - rounding down (toward - infinity) + * 10 - rounding up (toward + infinity) + * 11 - rounding toward zero + * + * IC: Infinity control + * That is for 8087 and 80287 only. + * + * The hardware default is 0x037f which we use. + */ + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x01 +#define _FPU_MASK_DM 0x02 +#define _FPU_MASK_ZM 0x04 +#define _FPU_MASK_OM 0x08 +#define _FPU_MASK_UM 0x10 +#define _FPU_MASK_PM 0x20 + +/* precision control */ +#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */ +#define _FPU_DOUBLE 0x200 +#define _FPU_SINGLE 0x0 + +/* rounding control */ +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ +#define _FPU_RC_DOWN 0x400 +#define _FPU_RC_UP 0x800 +#define _FPU_RC_ZERO 0xC00 + +#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ + +#define _FPU_DEFAULT 0x037f + +/* IEEE: same as above. */ +#define _FPU_IEEE 0x037f + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); + +/* Macros for accessing the hardware control word. + + Note that the use of these macros is no sufficient anymore with + recent hardware. Some floating point operations are executed in + the SSE/SSE2 engines which have their own control and status register. */ +#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) +#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + + + +#define _FPU_GETMXCSR(cw_sse) asm volatile ("stmxcsr %0" : "=m" (cw_sse)) +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (cw_sse)) + + + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fpu_control_t mode, mode_sse; + + _FPU_GETCW (mode) ; + mode &= _FPU_RESERVED ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + mode |= _FPU_SINGLE ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + mode |= _FPU_DOUBLE ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + mode |= _FPU_EXTENDED ; + break ; + default: + mode |= _FPU_EXTENDED ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + mode |= _FPU_RC_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + mode |= _FPU_RC_DOWN ; + break ; + case GSL_IEEE_ROUND_UP: + mode |= _FPU_RC_UP ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + mode |= _FPU_RC_ZERO ; + break ; + default: + mode |= _FPU_RC_NEAREST ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode |= _FPU_MASK_IM ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + mode |= _FPU_MASK_DM ; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode |= _FPU_MASK_ZM ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode |= _FPU_MASK_OM ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode |= _FPU_MASK_UM ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode &= ~ _FPU_MASK_PM ; + } + else + { + mode |= _FPU_MASK_PM ; + } + + _FPU_SETCW (mode) ; + + _FPU_GETMXCSR (mode_sse) ; + mode_sse &= 0xFFFF0000 ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode_sse |= _FPU_MASK_IM << 7 ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + mode_sse |= _FPU_MASK_DM << 7 ; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode_sse |= _FPU_MASK_ZM << 7 ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode_sse |= _FPU_MASK_OM << 7 ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode_sse |= _FPU_MASK_UM << 7 ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode_sse &= ~ _FPU_MASK_PM << 7 ; + } + else + { + mode_sse |= _FPU_MASK_PM << 7 ; + } + + _FPU_SETMXCSR (mode_sse) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-freebsd.c b/software/gsl-1.15/ieee-utils/fp-freebsd.c new file mode 100644 index 000000000..7dd270262 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-freebsd.c @@ -0,0 +1,102 @@ +/* ieee-utils/fp-freebsd.c + * + * Copyright (C) 2000 Vladimir Kushnir + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_prec_t prec = 0 ; + fp_except_t mode = 0 ; + fp_rnd_t rnd = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + prec = FP_PS; + fpsetprec(prec); + break ; + case GSL_IEEE_DOUBLE_PRECISION: + prec = FP_PD; + fpsetprec(prec); + break ; + case GSL_IEEE_EXTENDED_PRECISION: + prec = FP_PE; + fpsetprec(prec); + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ ; + fpsetround (rnd) ; + break ; + default: + rnd = FP_RN ; + fpsetround (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = FP_X_INV | FP_X_DNML | FP_X_DZ | FP_X_OFL | FP_X_UFL ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + mode &= ~ FP_X_DNML ; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP ; + } + else + { + mode &= ~ FP_X_IMP ; + } + + fpsetmask (mode) ; + + return GSL_SUCCESS ; + +} diff --git a/software/gsl-1.15/ieee-utils/fp-gnuc99.c b/software/gsl-1.15/ieee-utils/fp-gnuc99.c new file mode 100644 index 000000000..70dcbefd9 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-gnuc99.c @@ -0,0 +1,182 @@ +/* ieee-utils/fp-gnuc99.c + * + * Copyright (C) 2003, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define _GNU_SOURCE 1 + +#include +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + int mode; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("single precision rounding is not supported by ", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("double precision rounding is not supported by ", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("extended precision rounding is not supported by ", + GSL_EUNSUP) ; + break ; + } + + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: +#ifdef FE_TONEAREST + fesetround (FE_TONEAREST) ; +#else + GSL_ERROR ("round-to-nearest is not supported by ", GSL_EUNSUP) ; +#endif + break ; + case GSL_IEEE_ROUND_DOWN: +#ifdef FE_DOWNWARD + fesetround (FE_DOWNWARD) ; +#else + GSL_ERROR ("round-down is not supported by ", GSL_EUNSUP) ; +#endif + break ; + case GSL_IEEE_ROUND_UP: +#ifdef FE_UPWARD + fesetround (FE_UPWARD) ; +#else + GSL_ERROR ("round-up is not supported by ", GSL_EUNSUP) ; +#endif + break ; + case GSL_IEEE_ROUND_TO_ZERO: +#ifdef FE_TOWARDZERO + fesetround (FE_TOWARDZERO) ; +#else + GSL_ERROR ("round-toward-zero is not supported by ", GSL_EUNSUP) ; +#endif + break ; + default: +#ifdef FE_TONEAREST + fesetround (FE_TONEAREST) ; +#else + GSL_ERROR ("default round-to-nearest mode is not supported by ", GSL_EUNSUP) ; +#endif + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = 0; + +#ifdef FE_INVALID + mode |= FE_INVALID; +#endif + +#ifdef FE_DIVBYZERO + mode |= FE_DIVBYZERO; +#endif + +#ifdef FE_OVERFLOW + mode |= FE_OVERFLOW ; +#endif + +#ifdef FE_UNDERFLOW + mode |= FE_UNDERFLOW ; +#endif + + if (exception_mask & GSL_IEEE_MASK_INVALID) + { +#ifdef FE_INVALID + mode &= ~ FE_INVALID ; +#else + GSL_ERROR ("invalid operation exception not supported by ", + GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("denormalized operand exception not supported by . " + "Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + { +#ifdef FE_DIVBYZERO + mode &= ~ FE_DIVBYZERO ; +#else + GSL_ERROR ("division by zero exception not supported by ", + GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + { +#ifdef FE_OVERFLOW + mode &= ~ FE_OVERFLOW ; +#else + GSL_ERROR ("overflow exception not supported by ", GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + { +#ifdef FE_UNDERFLOW + mode &= ~ FE_UNDERFLOW ; +#else + GSL_ERROR ("underflow exception not supported by ", GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { +#ifdef FE_INEXACT + mode |= FE_INEXACT ; +#else + GSL_ERROR ("inexact exception not supported by ", GSL_EUNSUP); +#endif + } + else + { +#ifdef FE_INEXACT + mode &= ~ FE_INEXACT ; +#else + /* do nothing */ +#endif + } + +#if HAVE_DECL_FEENABLEEXCEPT + feenableexcept (mode) ; +#elif HAVE_DECL_FESETTRAPENABLE + fesettrapenable (mode); +#else + GSL_ERROR ("unknown exception trap method", GSL_EUNSUP) +#endif + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-gnum68k.c b/software/gsl-1.15/ieee-utils/fp-gnum68k.c new file mode 100644 index 000000000..20d505783 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-gnum68k.c @@ -0,0 +1,101 @@ +/* ieee-utils/fp-gnum68k.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned short mode = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + mode |= _FPU_SINGLE ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + mode |= _FPU_DOUBLE ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + mode |= _FPU_EXTENDED ; + break ; + default: + mode |= _FPU_EXTENDED ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + mode |= _FPU_RC_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + mode |= _FPU_RC_DOWN ; + break ; + case GSL_IEEE_ROUND_UP: + mode |= _FPU_RC_UP ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + mode |= _FPU_RC_ZERO ; + break ; + default: + mode |= _FPU_RC_NEAREST ; + } + + /* FIXME: I don't have documentation for the M68K so I'm not sure + about the mapping of the exceptions below. Maybe someone who does + know could correct this. */ + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode |= _FPU_MASK_OPERR ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("the denormalized operand exception has not been implemented for m68k yet. Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; + /*mode |= _FPU_MASK_DM ; ???? */ + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode |= _FPU_MASK_DZ ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode |= _FPU_MASK_OVFL ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode |= _FPU_MASK_UNFL ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode &= ~ (_FPU_MASK_INEX1 | _FPU_MASK_INEX2) ; + } + else + { + mode |= (_FPU_MASK_INEX1 | _FPU_MASK_INEX2) ; + } + + _FPU_SETCW(mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-gnuppc.c b/software/gsl-1.15/ieee-utils/fp-gnuppc.c new file mode 100644 index 000000000..6a4441ab8 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-gnuppc.c @@ -0,0 +1,98 @@ +/* ieee-utils/fp-gnuppc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough, John Fisher + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + + +/* + * Identical to fp-gnux86.c, except with references to + * _FPU_SINGLE, _FPU_DOUBLE, _FPU_EXTENDED, _FPU_MASK_DM + * and _FPU_MASK_PM converted to errors. + */ + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned short mode = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + mode |= _FPU_RC_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + mode |= _FPU_RC_DOWN ; + break ; + case GSL_IEEE_ROUND_UP: + mode |= _FPU_RC_UP ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + mode |= _FPU_RC_ZERO ; + break ; + default: + mode |= _FPU_RC_NEAREST ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode |= _FPU_MASK_IM ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("powerpc does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode |= _FPU_MASK_ZM ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode |= _FPU_MASK_OM ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode |= _FPU_MASK_UM ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + GSL_ERROR ("powerpc does not support traps for inexact operations", GSL_EUNSUP) ; + } + + _FPU_SETCW(mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-gnusparc.c b/software/gsl-1.15/ieee-utils/fp-gnusparc.c new file mode 100644 index 000000000..ebffdae7a --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-gnusparc.c @@ -0,0 +1,97 @@ +/* ieee-utils/fp-gnusparc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned short mode = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + mode |= _FPU_SINGLE ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + mode |= _FPU_DOUBLE ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + mode |= _FPU_EXTENDED ; + break ; + default: + mode |= _FPU_EXTENDED ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + mode |= _FPU_RC_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + mode |= _FPU_RC_DOWN ; + break ; + case GSL_IEEE_ROUND_UP: + mode |= _FPU_RC_UP ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + mode |= _FPU_RC_ZERO ; + break ; + default: + mode |= _FPU_RC_NEAREST ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode |= _FPU_MASK_IM ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("sparc does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode |= _FPU_MASK_ZM ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode |= _FPU_MASK_OM ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode |= _FPU_MASK_UM ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode &= ~ _FPU_MASK_PM ; + } + else + { + mode |= _FPU_MASK_PM ; + } + + _FPU_SETCW(mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-gnux86.c b/software/gsl-1.15/ieee-utils/fp-gnux86.c new file mode 100644 index 000000000..348625b75 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-gnux86.c @@ -0,0 +1,111 @@ +/* ieee-utils/fp-gnux86.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + + /* Handle libc5, where _FPU_SETCW is not available, suggested by + OKUJI Yoshinori and Evgeny Stambulchik + */ + +#ifndef _FPU_SETCW +#include +#define _FPU_SETCW(cw) __setfpucw(cw) +#endif + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned short mode = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + mode |= _FPU_SINGLE ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + mode |= _FPU_DOUBLE ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + mode |= _FPU_EXTENDED ; + break ; + default: + mode |= _FPU_EXTENDED ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + mode |= _FPU_RC_NEAREST ; + break ; + case GSL_IEEE_ROUND_DOWN: + mode |= _FPU_RC_DOWN ; + break ; + case GSL_IEEE_ROUND_UP: + mode |= _FPU_RC_UP ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + mode |= _FPU_RC_ZERO ; + break ; + default: + mode |= _FPU_RC_NEAREST ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode |= _FPU_MASK_IM ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + mode |= _FPU_MASK_DM ; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode |= _FPU_MASK_ZM ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode |= _FPU_MASK_OM ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode |= _FPU_MASK_UM ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode &= ~ _FPU_MASK_PM ; + } + else + { + mode |= _FPU_MASK_PM ; + } + + _FPU_SETCW(mode) ; + +#if HAVE_FPU_X86_SSE +#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) + { + unsigned int mode_sse = 0; + + mode_sse |= (mode & 0x3f)<<7; /* exception masks */ + mode_sse |= (mode & 0xc00)<<3; /* rounding control */ + + _FPU_SETMXCSR(mode_sse); + } +#endif + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-hpux.c b/software/gsl-1.15/ieee-utils/fp-hpux.c new file mode 100644 index 000000000..4bd00459f --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-hpux.c @@ -0,0 +1,110 @@ +/* ieee-utils/fp-hpux.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_except mode = 0 ; + fp_rnd rnd = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ ; + fpsetround (rnd) ; + break ; + default: + rnd = FP_RN ; + fpsetround (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("HP-UX does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP ; + } + else + { + mode &= ~ FP_X_IMP ; + } + + fpsetmask (mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-hpux11.c b/software/gsl-1.15/ieee-utils/fp-hpux11.c new file mode 100644 index 000000000..df0c34acf --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-hpux11.c @@ -0,0 +1,105 @@ +/* ieee-utils/fp-hpux11.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + int mode; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("HPUX PA-RISC only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + fesetround (FE_TONEAREST) ; + break ; + case GSL_IEEE_ROUND_DOWN: + fesetround (FE_DOWNWARD) ; + break ; + case GSL_IEEE_ROUND_UP: + fesetround (FE_UPWARD) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + fesetround (FE_TOWARDZERO) ; + break ; + default: + fesetround (FE_TONEAREST) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FE_INVALID ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("HP-UX does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FE_DIVBYZERO ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FE_OVERFLOW ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FE_UNDERFLOW ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FE_INEXACT ; + } + else + { + mode &= ~ FE_INEXACT ; + } + + fesettrapenable (mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-irix.c b/software/gsl-1.15/ieee-utils/fp-irix.c new file mode 100644 index 000000000..de6c1f7e8 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-irix.c @@ -0,0 +1,110 @@ +/* ieee-utils/fp-irix.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Tim Mooney + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_except mode = 0 ; + fp_rnd rnd = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("IRIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("IRIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("IRIX only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ ; + fpsetround (rnd) ; + break ; + default: + rnd = FP_RN ; + fpsetround (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("IRIX does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP ; + } + else + { + mode &= ~ FP_X_IMP ; + } + + fpsetmask (mode) ; + + return GSL_SUCCESS ; + +} diff --git a/software/gsl-1.15/ieee-utils/fp-netbsd.c b/software/gsl-1.15/ieee-utils/fp-netbsd.c new file mode 100644 index 000000000..c195fd20b --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-netbsd.c @@ -0,0 +1,118 @@ +/* fp-netbsd.c + * + * Copyright (C) 2001 Jason Beegan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_except mode = 0; + fp_rnd rnd = 0; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("NetBSD only supports default precision rounding", + GSL_EUNSUP); + break; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("NetBSD only supports default precision rounding", + GSL_EUNSUP); + break; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("NetBSD only supports default precision rounding", + GSL_EUNSUP); + break; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ; + fpsetround (rnd); + break; + default: + rnd = FP_RN; + fpsetround (rnd); + } + +/* Turn on all available exceptions apart from 'inexact'. + Denormalized operand exception not available on all platforms. */ + + mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL; +#ifdef FP_X_DNML + mode = mode | FP_X_DNML; +#endif + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { +#ifdef FP_X_DNML + mode &= ~ FP_X_DNML; +#endif + } + else + { +#ifndef FP_X_DNML + GSL_ERROR ("NetBSD does not support the denormalized operand exception on this platform. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP; + } + else + { + mode &= ~ FP_X_IMP; + } + + fpsetmask (mode); + + return GSL_SUCCESS; + +} + diff --git a/software/gsl-1.15/ieee-utils/fp-openbsd.c b/software/gsl-1.15/ieee-utils/fp-openbsd.c new file mode 100644 index 000000000..f417e47ca --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-openbsd.c @@ -0,0 +1,121 @@ +/* fp-openbsd.c + * + * Copyright (C) 2001 Jason Beegan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a copy of fp-netbsd.c, modified for openbsd by Toby White + --- Brian Gough */ + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_except mode = 0; + fp_rnd rnd = 0; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("OpenBSD only supports default precision rounding", + GSL_EUNSUP); + break; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("OpenBSD only supports default precision rounding", + GSL_EUNSUP); + break; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("OpenBSD only supports default precision rounding", + GSL_EUNSUP); + break; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP; + fpsetround (rnd); + break; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ; + fpsetround (rnd); + break; + default: + rnd = FP_RN; + fpsetround (rnd); + } + +/* Turn on all available exceptions apart from 'inexact'. + Denormalized operand exception not available on all platforms. */ + + mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL; +#ifdef FP_X_DNML + mode = mode | FP_X_DNML; +#endif + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { +#ifdef FP_X_DNML + mode &= ~ FP_X_DNML; +#endif + } + else + { +#ifndef FP_X_DNML + GSL_ERROR ("OpenBSD does not support the denormalized operand exception on this platform. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP); +#endif + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP; + } + else + { + mode &= ~ FP_X_IMP; + } + + fpsetmask (mode); + + return GSL_SUCCESS; + +} + diff --git a/software/gsl-1.15/ieee-utils/fp-os2emx.c b/software/gsl-1.15/ieee-utils/fp-os2emx.c new file mode 100644 index 000000000..8c41a50af --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-os2emx.c @@ -0,0 +1,91 @@ +/* ieee-utils/fp-os2.c + * + * Copyright (C) 2001 Henry Sobotka + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned mode = 0; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + _control87(PC_24, MCW_PC); + break ; + case GSL_IEEE_DOUBLE_PRECISION: + _control87(PC_53, MCW_PC); + break ; + case GSL_IEEE_EXTENDED_PRECISION: + _control87(PC_64, MCW_PC); + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + _control87(RC_NEAR, MCW_RC); + break ; + case GSL_IEEE_ROUND_DOWN: + _control87(RC_DOWN, MCW_RC); + break ; + case GSL_IEEE_ROUND_UP: + _control87(RC_UP, MCW_RC); + break ; + case GSL_IEEE_ROUND_TO_ZERO: + _control87(RC_CHOP, MCW_RC); + break ; + default: + _control87(RC_NEAR, MCW_RC); + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = EM_INVALID | EM_DENORMAL | EM_ZERODIVIDE | EM_OVERFLOW | EM_UNDERFLOW; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ EM_INVALID; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + mode &= ~ EM_DENORMAL; + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ EM_ZERODIVIDE; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ EM_OVERFLOW; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ EM_UNDERFLOW; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= EM_INEXACT; + } + else + { + mode &= ~ EM_INEXACT; + } + + _control87(mode, MCW_EM); + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-solaris.c b/software/gsl-1.15/ieee-utils/fp-solaris.c new file mode 100644 index 000000000..2c3db01e1 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-solaris.c @@ -0,0 +1,110 @@ +/* ieee-utils/fp-solaris.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + fp_except mode = 0 ; + fp_rnd rnd = 0 ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("solaris only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("solaris only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("solaris only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RN ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RM ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RP ; + fpsetround (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RZ ; + fpsetround (rnd) ; + break ; + default: + rnd = FP_RN ; + fpsetround (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ FP_X_INV ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + /* do nothing */ + } + else + { + GSL_ERROR ("solaris does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ FP_X_DZ ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ FP_X_OFL ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ FP_X_UFL ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + mode |= FP_X_IMP ; + } + else + { + mode &= ~ FP_X_IMP ; + } + + fpsetmask (mode) ; + + return GSL_SUCCESS ; + +} diff --git a/software/gsl-1.15/ieee-utils/fp-sunos4.c b/software/gsl-1.15/ieee-utils/fp-sunos4.c new file mode 100644 index 000000000..69dba4feb --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-sunos4.c @@ -0,0 +1,122 @@ +/* ieee-utils/fp-sunos4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + char * out ; + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + ieee_flags ("set", "precision", "single", out) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + ieee_flags ("set", "precision", "double", out) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + ieee_flags ("set", "precision", "extended", out) ; + break ; + default: + ieee_flags ("set", "precision", "extended", out) ; + } + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + ieee_flags ("set", "direction", "nearest", out) ; + break ; + case GSL_IEEE_ROUND_DOWN: + ieee_flags ("set", "direction", "negative", out) ; + break ; + case GSL_IEEE_ROUND_UP: + ieee_flags ("set", "direction", "positive", out) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + ieee_flags ("set", "direction", "tozero", out) ; + break ; + default: + ieee_flags ("set", "direction", "nearest", out) ; + } + + if (exception_mask & GSL_IEEE_MASK_INVALID) + { + ieee_handler ("set", "invalid", SIGFPE_IGNORE) ; + } + else + { + ieee_handler ("set", "invalid", SIGFPE_ABORT) ; + } + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { + ieee_handler ("set", "denormalized", SIGFPE_IGNORE) ; + } + else + { + GSL_ERROR ("sunos4 does not support the denormalized operand exception. " + "Use 'mask-denormalized' to work around this.", + GSL_EUNSUP) ; + } + + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + { + ieee_handler ("set", "division", SIGFPE_IGNORE) ; + } + else + { + ieee_handler ("set", "division", SIGFPE_ABORT) ; + } + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + { + ieee_handler ("set", "overflow", SIGFPE_IGNORE) ; + } + else + { + ieee_handler ("set", "overflow", SIGFPE_ABORT) ; + } + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + { + ieee_handler ("set", "underflow", SIGFPE_IGNORE) ; + } + else + { + ieee_handler ("set", "underflow", SIGFPE_ABORT) ; + } + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + ieee_handler ("set", "inexact", SIGFPE_ABORT) ; + } + else + { + ieee_handler ("set", "inexact", SIGFPE_IGNORE) ; + } + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-tru64.c b/software/gsl-1.15/ieee-utils/fp-tru64.c new file mode 100644 index 000000000..7feccd9ae --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-tru64.c @@ -0,0 +1,176 @@ +/* ieee-utils/fp-tru64.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Tim Mooney + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +/* + * Under Compaq's Unix with the silly name, read the man pages for read_rnd, + * write_rnd, and ieee(3) for more information on the functions used here. + * + * Note that enabling control of dynamic rounding mode (via write_rnd) requires + * that you pass a special flag to your C compiler. For Compaq's C compiler + * the flag is `-fprm d', for gcc it's `-mfp-rounding-mode=d'. + * + * Enabling the trap control (via ieee_set_fp_control) also requires a + * flag be passed to the C compiler. The flag for Compaq's C compiler + * is `-ieee' and for gcc it's `-mieee'. + + * We have not implemented the `inexact' case, since it is rarely used + * and requires the library being built with an additional compiler + * flag that can degrade performance for everything else. If you need + * to add support for `inexact' the relevant flag for Compaq's + * compiler is `-ieee_with_inexact', and the flag for gcc is + * `-mieee-with-inexact'. + * + * Problem have been reported with the "fixed" float.h installed with + * gcc-2.95 lacking some of the definitions in the system float.h (the + * symptoms are errors like: `FP_RND_RN' undeclared). To work around + * this we can include the system float.h before the gcc version, e.g. + * + * #include "/usr/include/float.h" + * #include + */ + +#include + +#ifndef FP_RND_RN +# undef _FLOAT_H_ +# include "/usr/include/float.h" +# undef _FLOAT_H_ +# include +#endif + +#include +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + unsigned long int mode = 0 ; + unsigned int rnd = 0 ; + +/* I'm actually not completely sure that the alpha only supports default + * precisions rounding, but I couldn't find any information regarding this, so + * it seems safe to assume this for now until it's proven otherwise. + */ + + switch (precision) + { + case GSL_IEEE_SINGLE_PRECISION: + GSL_ERROR ("Tru64 Unix on the alpha only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_DOUBLE_PRECISION: + GSL_ERROR ("Tru64 Unix on the alpha only supports default precision rounding", + GSL_EUNSUP) ; + break ; + case GSL_IEEE_EXTENDED_PRECISION: + GSL_ERROR ("Tru64 Unix on the alpha only supports default precision rounding", + GSL_EUNSUP) ; + break ; + } + + + switch (rounding) + { + case GSL_IEEE_ROUND_TO_NEAREST: + rnd = FP_RND_RN ; + write_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_DOWN: + rnd = FP_RND_RM ; + write_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_UP: + rnd = FP_RND_RP ; + write_rnd (rnd) ; + break ; + case GSL_IEEE_ROUND_TO_ZERO: + rnd = FP_RND_RZ ; + write_rnd (rnd) ; + break ; + default: + rnd = FP_RND_RN ; + write_rnd (rnd) ; + } + + /* Turn on all the exceptions apart from 'inexact' */ + + /* from the ieee(3) man page: + * IEEE_TRAP_ENABLE_INV -> Invalid operation + * IEEE_TRAP_ENABLE_DZE -> Divide by 0 + * IEEE_TRAP_ENABLE_OVF -> Overflow + * IEEE_TRAP_ENABLE_UNF -> Underflow + * IEEE_TRAP_ENABLE_INE -> Inexact (requires special option to C compiler) + * IEEE_TRAP_ENABLE_DNO -> denormal operand + * Note: IEEE_TRAP_ENABLE_DNO is not supported on OSF 3.x or Digital Unix + * 4.0 - 4.0d(?). + * IEEE_TRAP_ENABLE_MASK -> mask of all the trap enables + * IEEE_MAP_DMZ -> map denormal inputs to zero + * IEEE_MAP_UMZ -> map underflow results to zero + */ + + mode = IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF + | IEEE_TRAP_ENABLE_UNF ; + + if (exception_mask & GSL_IEEE_MASK_INVALID) + mode &= ~ IEEE_TRAP_ENABLE_INV ; + + if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) + { +#ifdef IEEE_TRAP_ENABLE_DNO + mode &= ~ IEEE_TRAP_ENABLE_DNO ; +#else + GSL_ERROR ("Sorry, this version of Digital Unix does not support denormalized operands", GSL_EUNSUP) ; +#endif + } + + if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) + mode &= ~ IEEE_TRAP_ENABLE_DZE ; + + if (exception_mask & GSL_IEEE_MASK_OVERFLOW) + mode &= ~ IEEE_TRAP_ENABLE_OVF ; + + if (exception_mask & GSL_IEEE_MASK_UNDERFLOW) + mode &= ~ IEEE_TRAP_ENABLE_UNF ; + + if (exception_mask & GSL_IEEE_TRAP_INEXACT) + { + /* To implement this would require a special flag to the C + compiler which can cause degraded performance */ + + GSL_ERROR ("Sorry, GSL does not implement trap-inexact for Tru64 Unix on the alpha - see fp-tru64.c for details", GSL_EUNSUP) ; + + /* In case you need to add it, the appropriate line would be + * + * mode |= IEEE_TRAP_ENABLE_INE ; + * + */ + + } + else + { + mode &= ~ IEEE_TRAP_ENABLE_INE ; + } + + ieee_set_fp_control (mode) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/ieee-utils/fp-unknown.c b/software/gsl-1.15/ieee-utils/fp-unknown.c new file mode 100644 index 000000000..f52e27f7f --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp-unknown.c @@ -0,0 +1,30 @@ +/* ieee-utils/fp-unknown.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_ieee_set_mode (int precision, int rounding, int exception_mask) +{ + GSL_ERROR ( +"the IEEE interface for this platform is unsupported or could not be " +"determined at configure time\n", GSL_EUNSUP) ; +} diff --git a/software/gsl-1.15/ieee-utils/fp.c b/software/gsl-1.15/ieee-utils/fp.c new file mode 100644 index 000000000..445a14f68 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/fp.c @@ -0,0 +1,50 @@ +#include + +#if HAVE_GNUSPARC_IEEE_INTERFACE +#include "fp-gnusparc.c" +#elif HAVE_GNUM68K_IEEE_INTERFACE +#include "fp-gnum68k.c" +#elif HAVE_GNUPPC_IEEE_INTERFACE +#include "fp-gnuppc.c" +#elif HAVE_GNUX86_IEEE_INTERFACE +#include "fp-gnux86.c" +#elif HAVE_HPUX11_IEEE_INTERFACE +#include "fp-hpux11.c" +#elif HAVE_HPUX_IEEE_INTERFACE +#include "fp-hpux.c" +#elif HAVE_SUNOS4_IEEE_INTERFACE +#include "fp-sunos4.c" +#elif HAVE_SOLARIS_IEEE_INTERFACE +#include "fp-solaris.c" +#elif HAVE_IRIX_IEEE_INTERFACE +#include "fp-irix.c" +#elif HAVE_AIX_IEEE_INTERFACE +#include "fp-aix.c" +#elif HAVE_TRU64_IEEE_INTERFACE +#include "fp-tru64.c" +#elif HAVE_FREEBSD_IEEE_INTERFACE +#include "fp-freebsd.c" +#elif HAVE_OS2EMX_IEEE_INTERFACE +#include "fp-os2emx.c" +#elif HAVE_NETBSD_IEEE_INTERFACE +#include "fp-netbsd.c" +#elif HAVE_OPENBSD_IEEE_INTERFACE +#include "fp-openbsd.c" +/* Try to handle universal binaries */ +#elif HAVE_DARWIN_IEEE_INTERFACE +# if defined(__i386__) +# include "fp-darwin86.c" +#else +# include "fp-darwin.c" +# endif +#elif HAVE_DARWIN86_IEEE_INTERFACE +# if defined(__ppc__) +# include "fp-darwin.c" +# else +# include "fp-darwin86.c" +#endif +#elif HAVE_DECL_FEENABLEEXCEPT || HAVE_DECL_FESETTRAPENABLE +#include "fp-gnuc99.c" +#else +#include "fp-unknown.c" +#endif diff --git a/software/gsl-1.15/ieee-utils/gsl_ieee_utils.h b/software/gsl-1.15/ieee-utils/gsl_ieee_utils.h new file mode 100644 index 000000000..a96122076 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/gsl_ieee_utils.h @@ -0,0 +1,99 @@ +/* ieee-utils/gsl_ieee_utils.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_IEEE_UTILS_H__ +#define __GSL_IEEE_UTILS_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +enum { + GSL_IEEE_TYPE_NAN = 1, + GSL_IEEE_TYPE_INF = 2, + GSL_IEEE_TYPE_NORMAL = 3, + GSL_IEEE_TYPE_DENORMAL = 4, + GSL_IEEE_TYPE_ZERO = 5 +} ; + +typedef struct { + int sign ; + char mantissa[24] ; /* Actual bits are 0..22, element 23 is \0 */ + int exponent ; + int type ; +} gsl_ieee_float_rep ; + +typedef struct { + int sign ; + char mantissa[53] ; /* Actual bits are 0..51, element 52 is \0 */ + int exponent ; + int type ; +} gsl_ieee_double_rep ; + + +void gsl_ieee_printf_float (const float * x) ; +void gsl_ieee_printf_double (const double * x) ; + +void gsl_ieee_fprintf_float (FILE * stream, const float * x) ; +void gsl_ieee_fprintf_double (FILE * stream, const double * x) ; + +void gsl_ieee_float_to_rep (const float * x, gsl_ieee_float_rep * r) ; +void gsl_ieee_double_to_rep (const double * x, gsl_ieee_double_rep * r) ; + +enum { + GSL_IEEE_SINGLE_PRECISION = 1, + GSL_IEEE_DOUBLE_PRECISION = 2, + GSL_IEEE_EXTENDED_PRECISION = 3 +} ; + +enum { + GSL_IEEE_ROUND_TO_NEAREST = 1, + GSL_IEEE_ROUND_DOWN = 2, + GSL_IEEE_ROUND_UP = 3, + GSL_IEEE_ROUND_TO_ZERO = 4 +} ; + +enum { + GSL_IEEE_MASK_INVALID = 1, + GSL_IEEE_MASK_DENORMALIZED = 2, + GSL_IEEE_MASK_DIVISION_BY_ZERO = 4, + GSL_IEEE_MASK_OVERFLOW = 8, + GSL_IEEE_MASK_UNDERFLOW = 16, + GSL_IEEE_MASK_ALL = 31, + GSL_IEEE_TRAP_INEXACT = 32 +} ; + +void gsl_ieee_env_setup (void) ; +int gsl_ieee_read_mode_string (const char * description, int * precision, + int * rounding, int * exception_mask) ; +int gsl_ieee_set_mode (int precision, int rounding, int exception_mask) ; + +__END_DECLS + +#endif /* __GSL_IEEE_UTILS_H__ */ + diff --git a/software/gsl-1.15/ieee-utils/make_rep.c b/software/gsl-1.15/ieee-utils/make_rep.c new file mode 100644 index 000000000..cc230821d --- /dev/null +++ b/software/gsl-1.15/ieee-utils/make_rep.c @@ -0,0 +1,197 @@ +/* ieee-utils/make_rep.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include "endian.c" +#include "standardize.c" + +static void sprint_nybble(int i, char *s) ; +static void sprint_byte(int i, char *s) ; +static int determine_ieee_type (int non_zero, int exponent, int max_exponent); + + +/* For the IEEE float format the bits are found from the following + masks, + + sign = 0x80000000 + exponent = 0x7f800000 + mantisssa = 0x007fffff + + For the IEEE double format the masks are, + + sign = 0x8000000000000000 + exponent = 0x7ff0000000000000 + mantissa = 0x000fffffffffffff + + */ + +void +gsl_ieee_float_to_rep (const float * x, gsl_ieee_float_rep * r) +{ + int e, non_zero; + + union { + float f; + struct { + unsigned char byte[4] ; + } ieee ; + } u; + + u.f = *x ; + + if (little_endian_p()) + make_float_bigendian(&(u.f)) ; + + /* note that r->sign is signed, u.ieee.byte is unsigned */ + + if (u.ieee.byte[3]>>7) + { + r->sign = 1 ; + } + else + { + r->sign = 0 ; + } + + e = (u.ieee.byte[3] & 0x7f) << 1 | (u.ieee.byte[2] & 0x80)>>7 ; + + r->exponent = e - 127 ; + + sprint_byte((u.ieee.byte[2] & 0x7f) << 1,r->mantissa) ; + sprint_byte(u.ieee.byte[1],r->mantissa + 7) ; + sprint_byte(u.ieee.byte[0],r->mantissa + 15) ; + + r->mantissa[23] = '\0' ; + + non_zero = u.ieee.byte[0] || u.ieee.byte[1] || (u.ieee.byte[2] & 0x7f); + + r->type = determine_ieee_type (non_zero, e, 255) ; +} + +void +gsl_ieee_double_to_rep (const double * x, gsl_ieee_double_rep * r) +{ + + int e, non_zero; + + union + { + double d; + struct { + unsigned char byte[8]; + } ieee ; + } u; + + u.d= *x ; + + if (little_endian_p()) + make_double_bigendian(&(u.d)) ; + + /* note that r->sign is signed, u.ieee.byte is unsigned */ + + if (u.ieee.byte[7]>>7) + { + r->sign = 1 ; + } + else + { + r->sign = 0 ; + } + + + e =(u.ieee.byte[7] & 0x7f)<<4 ^ (u.ieee.byte[6] & 0xf0)>>4 ; + + r->exponent = e - 1023 ; + + sprint_nybble(u.ieee.byte[6],r->mantissa) ; + sprint_byte(u.ieee.byte[5],r->mantissa + 4) ; + sprint_byte(u.ieee.byte[4],r->mantissa + 12) ; + sprint_byte(u.ieee.byte[3],r->mantissa + 20) ; + sprint_byte(u.ieee.byte[2],r->mantissa + 28) ; + sprint_byte(u.ieee.byte[1],r->mantissa + 36) ; + sprint_byte(u.ieee.byte[0],r->mantissa + 44) ; + + r->mantissa[52] = '\0' ; + + non_zero = (u.ieee.byte[0] || u.ieee.byte[1] || u.ieee.byte[2] + || u.ieee.byte[3] || u.ieee.byte[4] || u.ieee.byte[5] + || (u.ieee.byte[6] & 0x0f)) ; + + r->type = determine_ieee_type (non_zero, e, 2047) ; +} + +/* A table of character representations of nybbles */ + +static char nybble[16][5]={ /* include space for the \0 */ + "0000", "0001", "0010", "0011", + "0100", "0101", "0110", "0111", + "1000", "1001", "1010", "1011", + "1100", "1101", "1110", "1111" +} ; + +static void +sprint_nybble(int i, char *s) +{ + char *c ; + c=nybble[i & 0x0f ]; + *s=c[0] ; *(s+1)=c[1] ; *(s+2)=c[2] ; *(s+3)=c[3] ; +} + +static void +sprint_byte(int i, char *s) +{ + char *c ; + c=nybble[(i & 0xf0)>>4]; + *s=c[0] ; *(s+1)=c[1] ; *(s+2)=c[2] ; *(s+3)=c[3] ; + c=nybble[i & 0x0f]; + *(s+4)=c[0] ; *(s+5)=c[1] ; *(s+6)=c[2] ; *(s+7)=c[3] ; +} + +static int +determine_ieee_type (int non_zero, int exponent, int max_exponent) +{ + if (exponent == max_exponent) + { + if (non_zero) + { + return GSL_IEEE_TYPE_NAN ; + } + else + { + return GSL_IEEE_TYPE_INF ; + } + } + else if (exponent == 0) + { + if (non_zero) + { + return GSL_IEEE_TYPE_DENORMAL ; + } + else + { + return GSL_IEEE_TYPE_ZERO ; + } + } + else + { + return GSL_IEEE_TYPE_NORMAL ; + } +} diff --git a/software/gsl-1.15/ieee-utils/print.c b/software/gsl-1.15/ieee-utils/print.c new file mode 100644 index 000000000..eb788dddb --- /dev/null +++ b/software/gsl-1.15/ieee-utils/print.c @@ -0,0 +1,99 @@ +/* ieee-utils/print.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* A table of sign characters, 0=positive, 1=negative. We print a space + instead of a unary + sign for compatibility with bc */ + +static char signs[2]={' ','-'} ; + +void +gsl_ieee_fprintf_float (FILE * stream, const float * x) { + gsl_ieee_float_rep r ; + gsl_ieee_float_to_rep(x, &r) ; + + switch (r.type) + { + case GSL_IEEE_TYPE_NAN: + fprintf(stream, "NaN") ; + break ; + case GSL_IEEE_TYPE_INF: + fprintf(stream, "%cInf", signs[r.sign]) ; + break ; + case GSL_IEEE_TYPE_NORMAL: + fprintf(stream, "%c1.%s*2^%d", signs[r.sign], r.mantissa, r.exponent) ; + break ; + case GSL_IEEE_TYPE_DENORMAL: + fprintf(stream, "%c0.%s*2^%d", signs[r.sign], r.mantissa, r.exponent + 1) ; + break ; + case GSL_IEEE_TYPE_ZERO: + fprintf(stream, "%c0", signs[r.sign]) ; + break ; + default: + fprintf(stream, "[non-standard IEEE float]") ; + } +} + +void +gsl_ieee_printf_float (const float * x) +{ + gsl_ieee_fprintf_float (stdout,x); +} + +void +gsl_ieee_fprintf_double (FILE * stream, const double * x) { + gsl_ieee_double_rep r ; + gsl_ieee_double_to_rep (x, &r) ; + + switch (r.type) + { + case GSL_IEEE_TYPE_NAN: + fprintf(stream, "NaN") ; + break ; + case GSL_IEEE_TYPE_INF: + fprintf(stream, "%cInf", signs[r.sign]) ; + break ; + case GSL_IEEE_TYPE_NORMAL: + fprintf(stream, "%c1.%s*2^%d", signs[r.sign], r.mantissa, r.exponent) ; + break ; + case GSL_IEEE_TYPE_DENORMAL: + fprintf(stream, "%c0.%s*2^%d", signs[r.sign], r.mantissa, r.exponent + 1) ; + break ; + case GSL_IEEE_TYPE_ZERO: + fprintf(stream, "%c0", signs[r.sign]) ; + break ; + default: + fprintf(stream, "[non-standard IEEE double]") ; + } +} + +void +gsl_ieee_printf_double (const double * x) +{ + gsl_ieee_fprintf_double (stdout,x); +} + + + + + diff --git a/software/gsl-1.15/ieee-utils/read.c b/software/gsl-1.15/ieee-utils/read.c new file mode 100644 index 000000000..1de26e84a --- /dev/null +++ b/software/gsl-1.15/ieee-utils/read.c @@ -0,0 +1,194 @@ +/* ieee-utils/read.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +static int +lookup_string (const char * p, int * precision, int * rounding, + int * exception_mask) ; + +int +gsl_ieee_read_mode_string (const char * description, + int * precision, + int * rounding, + int * exception_mask) +{ + char * start ; + char * end; + char * p; + + int precision_count = 0 ; + int rounding_count = 0 ; + int exception_count = 0 ; + + start = (char *) malloc(strlen(description) + 1) ; + + if (start == 0) + { + GSL_ERROR ("no memory to parse mode string", GSL_ENOMEM) ; + } + + strcpy (start, description) ; + + p = start ; + + *precision = 0 ; + *rounding = 0 ; + *exception_mask = 0 ; + + do { + int status ; + int new_precision, new_rounding, new_exception ; + + end = strchr (p,',') ; + + if (end) + { + *end = '\0' ; + do + { + end++ ; /* skip over trailing whitespace */ + } + while (*end == ' ' || *end == ',') ; + } + + new_precision = 0 ; + new_rounding = 0 ; + new_exception = 0 ; + + status = lookup_string (p, &new_precision, &new_rounding, &new_exception) ; + + if (status) + GSL_ERROR ("unrecognized GSL_IEEE_MODE string.\nValid settings are:\n\n" + " single-precision double-precision extended-precision\n" + " round-to-nearest round-down round-up round-to-zero\n" + " mask-invalid mask-denormalized mask-division-by-zero\n" + " mask-overflow mask-underflow mask-all\n" + " trap-common trap-inexact\n" + "\n" + "separated by commas. " + "(e.g. GSL_IEEE_MODE=\"round-down,mask-underflow\")", + GSL_EINVAL) ; + + if (new_precision) + { + *precision = new_precision ; + precision_count ++ ; + if (precision_count > 1) + GSL_ERROR ("attempted to set IEEE precision twice", GSL_EINVAL) ; + } + + if (new_rounding) + { + *rounding = new_rounding ; + rounding_count ++ ; + if (rounding_count > 1) + GSL_ERROR ("attempted to set IEEE rounding mode twice", GSL_EINVAL) ; + } + + if (new_exception) + { + *exception_mask |= new_exception ; + exception_count ++ ; + } + + p = end ; + + } while (end && *p != '\0') ; + + free(start) ; + + return GSL_SUCCESS ; +} + +static int +lookup_string (const char * p, int * precision, int * rounding, + int * exception_mask) +{ + if (strcmp(p,"single-precision") == 0) + { + *precision = GSL_IEEE_SINGLE_PRECISION ; + } + else if (strcmp(p,"double-precision") == 0) + { + *precision = GSL_IEEE_DOUBLE_PRECISION ; + } + else if (strcmp(p,"extended-precision") == 0) + { + *precision = GSL_IEEE_EXTENDED_PRECISION ; + } + else if (strcmp(p,"round-to-nearest") == 0) + { + *rounding = GSL_IEEE_ROUND_TO_NEAREST ; + } + else if (strcmp(p,"round-down") == 0) + { + *rounding = GSL_IEEE_ROUND_DOWN ; + } + else if (strcmp(p,"round-up") == 0) + { + *rounding = GSL_IEEE_ROUND_UP ; + } + else if (strcmp(p,"round-to-zero") == 0) + { + *rounding = GSL_IEEE_ROUND_TO_ZERO ; + } + else if (strcmp(p,"mask-all") == 0) + { + *exception_mask = GSL_IEEE_MASK_ALL ; + } + else if (strcmp(p,"mask-invalid") == 0) + { + *exception_mask = GSL_IEEE_MASK_INVALID ; + } + else if (strcmp(p,"mask-denormalized") == 0) + { + *exception_mask = GSL_IEEE_MASK_DENORMALIZED ; + } + else if (strcmp(p,"mask-division-by-zero") == 0) + { + *exception_mask = GSL_IEEE_MASK_DIVISION_BY_ZERO ; + } + else if (strcmp(p,"mask-overflow") == 0) + { + *exception_mask = GSL_IEEE_MASK_OVERFLOW ; + } + else if (strcmp(p,"mask-underflow") == 0) + { + *exception_mask = GSL_IEEE_MASK_UNDERFLOW ; + } + else if (strcmp(p,"trap-inexact") == 0) + { + *exception_mask = GSL_IEEE_TRAP_INEXACT ; + } + else if (strcmp(p,"trap-common") == 0) + { + return 0 ; + } + else + { + return 1 ; + } + + return 0 ; +} diff --git a/software/gsl-1.15/ieee-utils/standardize.c b/software/gsl-1.15/ieee-utils/standardize.c new file mode 100644 index 000000000..543ee1e85 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/standardize.c @@ -0,0 +1,61 @@ +/* ieee-utils/standardize.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void make_float_bigendian (float * x); +static void make_double_bigendian (double * x); + +static void +make_float_bigendian (float * x) +{ + union { + float f; + unsigned char b[4]; + } u,v; + + u.f = *x ; + + v.b[0]=u.b[3] ; + v.b[1]=u.b[2] ; + v.b[2]=u.b[1] ; + v.b[3]=u.b[0] ; + + *x=v.f ; +} + +static void +make_double_bigendian (double * x) +{ + union { + double d; + unsigned char b[8]; + } u,v; + + u.d = *x ; + + v.b[0]=u.b[7] ; + v.b[1]=u.b[6] ; + v.b[2]=u.b[5] ; + v.b[3]=u.b[4] ; + v.b[4]=u.b[3] ; + v.b[5]=u.b[2] ; + v.b[6]=u.b[1] ; + v.b[7]=u.b[0] ; + + *x=v.d ; +} diff --git a/software/gsl-1.15/ieee-utils/test.c b/software/gsl-1.15/ieee-utils/test.c new file mode 100644 index 000000000..dd8675b67 --- /dev/null +++ b/software/gsl-1.15/ieee-utils/test.c @@ -0,0 +1,482 @@ +/* ieee-utils/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#if HAVE_IRIX_IEEE_INTERFACE +/* don't test denormals on IRIX */ +#else +#if HAVE_IEEE_DENORMALS +#define TEST_DENORMAL 1 +#endif +#endif + +#ifndef FLT_MIN +#define FLT_MIN 1.17549435e-38f +#endif + +#ifndef FLT_MAX +#define FLT_MAX 3.40282347e+38f +#endif + +#ifndef DBL_MIN +#define DBL_MIN 2.2250738585072014e-308 +#endif + +#ifndef DBL_MAX +#define DBL_MAX 1.7976931348623157e+308 +#endif + +int +main (void) +{ + float zerof = 0.0f, minus_onef = -1.0f ; + double zero = 0.0, minus_one = -1.0 ; + + /* Check for +ZERO (float) */ + + { + float f = 0.0f; + const char mantissa[] = "00000000000000000000000"; + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = 0, sign is +"); + gsl_test_int (r.exponent, -127, "float x = 0, exponent is -127"); + gsl_test_str (r.mantissa, mantissa, "float x = 0, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_ZERO, "float x = 0, type is ZERO"); + } + + /* Check for -ZERO (float) */ + + { + float f = minus_onef; + const char mantissa[] = "00000000000000000000000"; + gsl_ieee_float_rep r; + + while (f < 0) { + f *= 0.1f; + } + + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 1, "float x = -1*0, sign is -"); + gsl_test_int (r.exponent, -127, "float x = -1*0, exponent is -127"); + gsl_test_str (r.mantissa, mantissa, "float x = -1*0, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_ZERO, "float x = -1*0, type is ZERO"); + } + + /* Check for a positive NORMAL number (e.g. 2.1) (float) */ + + { + float f = 2.1f; + const char mantissa[] = "00001100110011001100110"; + + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = 2.1, sign is +"); + gsl_test_int (r.exponent, 1, "float x = 2.1, exponent is 1"); + gsl_test_str (r.mantissa, mantissa, "float x = 2.1, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, "float x = 2.1, type is NORMAL"); + } + + + /* Check for a negative NORMAL number (e.g. -1.3304...) (float) */ + + { + float f = -1.3303577090924210f ; + const char mantissa[] = "01010100100100100101001"; + + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 1, "float x = -1.3304..., sign is -"); + gsl_test_int (r.exponent, 0, "float x = -1.3304..., exponent is 0"); + gsl_test_str (r.mantissa, mantissa, "float x = -1.3304..., mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "float x = -1.3304..., type is NORMAL"); + } + + /* Check for a large positive NORMAL number (e.g. 3.37e31) (float) */ + + { + float f = 3.37e31f; + const char mantissa[] = "10101001010110101001001"; + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = 3.37e31, sign is +"); + gsl_test_int (r.exponent, 104, "float x = 3.37e31, exponent is 104"); + gsl_test_str (r.mantissa, mantissa, "float x = 3.37e31, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, "float x = 3.37e31, type is NORMAL"); + } + + /* Check for a small positive NORMAL number (e.g. 3.37e-31) (float) */ + + { + float f = 3.37e-31f; + const char mantissa[] = "10110101011100110111011"; + + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = 3.37e-31, sign is +"); + gsl_test_int (r.exponent, -102, "float x = 3.37e-31, exponent is -102"); + gsl_test_str (r.mantissa, mantissa, "float x = 3.37e-31, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "float x = 3.37e-31, type is NORMAL"); + } + + /* Check for FLT_MIN (smallest possible number that is not denormal) */ + + { + float f = FLT_MIN; + const char mantissa[] = "00000000000000000000000"; + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = FLT_MIN, sign is +"); + gsl_test_int (r.exponent, -126, "float x = FLT_MIN, exponent is -126"); + gsl_test_str (r.mantissa, mantissa, "float x = FLT_MIN, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, "float x = FLT_MIN, type is NORMAL"); + } + + /* Check for FLT_MAX (largest possible number that is not Inf) */ + + { + float f = FLT_MAX; + const char mantissa[] = "11111111111111111111111"; + + gsl_ieee_float_rep r; + gsl_ieee_float_to_rep (&f, &r); + + gsl_test_int (r.sign, 0, "float x = FLT_MAX, sign is +"); + gsl_test_int (r.exponent, 127, "float x = FLT_MAX, exponent is 127"); + gsl_test_str (r.mantissa, mantissa, "float x = FLT_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, "float x = FLT_MAX, type is NORMAL"); + } + + + /* Check for DENORMAL numbers (e.g. FLT_MIN/2^n) */ + +#ifdef TEST_DENORMAL + { + float f = FLT_MIN; + char mantissa[] = "10000000000000000000000"; + + int i; + gsl_ieee_float_rep r; + + for (i = 0; i < 23; i++) + { + float x = f / (float)pow (2.0, 1 + (float) i); + mantissa[i] = '1'; + gsl_ieee_float_to_rep (&x, &r); + + gsl_test_int (r.sign, 0, "float x = FLT_MIN/2^%d, sign is +", i + 1); + gsl_test_int (r.exponent, -127, + "float x = FLT_MIN/2^%d, exponent is -127", i + 1); + gsl_test_str (r.mantissa, mantissa, + "float x = FLT_MIN/2^%d, mantissa", i + 1); + gsl_test_int (r.type, GSL_IEEE_TYPE_DENORMAL, + "float x = FLT_MIN/2^%d, type is DENORMAL", i + 1); + mantissa[i] = '0'; + } + } +#endif + + /* Check for positive INFINITY (e.g. 2*FLT_MAX) */ + + { + float f = FLT_MAX; + const char mantissa[] = "00000000000000000000000"; + + gsl_ieee_float_rep r; + + float x; + x = 2 * f; + gsl_ieee_float_to_rep (&x, &r); + + gsl_test_int (r.sign, 0, "float x = 2*FLT_MAX, sign is +"); + gsl_test_int (r.exponent, 128, "float x = 2*FLT_MAX, exponent is 128"); + gsl_test_str (r.mantissa, mantissa, "float x = 2*FLT_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_INF, "float x = -2*FLT_MAX, type is INF"); + } + + /* Check for negative INFINITY (e.g. -2*FLT_MAX) */ + + { + float f = FLT_MAX; + const char mantissa[] = "00000000000000000000000"; + + gsl_ieee_float_rep r; + + float x; + x = -2 * f; + gsl_ieee_float_to_rep (&x, &r); + + gsl_test_int (r.sign, 1, "float x = -2*FLT_MAX, sign is -"); + gsl_test_int (r.exponent, 128, "float x = -2*FLT_MAX, exponent is 128"); + gsl_test_str (r.mantissa, mantissa, "float x = -2*FLT_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_INF, "float x = -2*FLT_MAX, type is INF"); + } + + /* Check for NAN (e.g. Inf - Inf) (float) */ + + { + gsl_ieee_float_rep r; + float x = 1.0f, y = 2.0f, z = zerof; + + x = x / z; + y = y / z; + z = y - x; + + gsl_ieee_float_to_rep (&z, &r); + + /* We don't check the sign and we don't check the mantissa because + they could be anything for a NaN */ + + gsl_test_int (r.exponent, 128, "float x = NaN, exponent is 128"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NAN, "float x = NaN, type is NAN"); + } + + + /* Check for +ZERO */ + + { + double d = 0.0; + const char mantissa[] + = "0000000000000000000000000000000000000000000000000000"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = 0, sign is +"); + gsl_test_int (r.exponent, -1023, "double x = 0, exponent is -1023"); + gsl_test_str (r.mantissa, mantissa, "double x = 0, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_ZERO, "double x = 0, type is ZERO"); + } + + /* Check for -ZERO */ + + { + double d = minus_one; + const char mantissa[] + = "0000000000000000000000000000000000000000000000000000"; + gsl_ieee_double_rep r; + + while (d < 0) { + d *= 0.1; + } + + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 1, "double x = -1*0, sign is -"); + gsl_test_int (r.exponent, -1023, "double x = -1*0, exponent is -1023"); + gsl_test_str (r.mantissa, mantissa, "double x = -1*0, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_ZERO, "double x = -1*0, type is ZERO"); + } + + /* Check for a positive NORMAL number (e.g. 2.1) */ + + { + double d = 2.1; + const char mantissa[] + = "0000110011001100110011001100110011001100110011001101"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = 2.1, sign is +"); + gsl_test_int (r.exponent, 1, "double x = 2.1, exponent is 1"); + gsl_test_str (r.mantissa, mantissa, "double x = 2.1, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, "double x = 2.1, type is NORMAL"); + } + + + /* Check for a negative NORMAL number (e.g. -1.3304...) */ + + { + double d = -1.3303577090924210146738460025517269968986511230468750; + const char mantissa[] + = "0101010010010010010100101010010010001000100011101110"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 1, "double x = -1.3304..., sign is -"); + gsl_test_int (r.exponent, 0, "double x = -1.3304..., exponent is 0"); + gsl_test_str (r.mantissa, mantissa, "double x = -1.3304..., mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "double x = -1.3304..., type is NORMAL"); + } + + /* Check for a large positive NORMAL number (e.g. 3.37e297) */ + + { + double d = 3.37e297; + const char mantissa[] + = "0100100111001001100101111001100000100110011101000100"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = 3.37e297, sign is +"); + gsl_test_int (r.exponent, 988, "double x = 3.37e297, exponent is 998"); + gsl_test_str (r.mantissa, mantissa, "double x = 3.37e297, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "double x = 3.37e297, type is NORMAL"); + } + + /* Check for a small positive NORMAL number (e.g. 3.37e-297) */ + + { + double d = 3.37e-297; + const char mantissa[] + = "0001101000011011101011100001110010100001001100110111"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = 3.37e-297, sign is +"); + gsl_test_int (r.exponent, -985, "double x = 3.37e-297, exponent is -985"); + gsl_test_str (r.mantissa, mantissa, "double x = 3.37e-297, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "double x = 3.37e-297, type is NORMAL"); + } + + /* Check for DBL_MIN (smallest possible number that is not denormal) */ + + { + double d = DBL_MIN; + const char mantissa[] + = "0000000000000000000000000000000000000000000000000000"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = DBL_MIN, sign is +"); + gsl_test_int (r.exponent, -1022, "double x = DBL_MIN, exponent is -1022"); + gsl_test_str (r.mantissa, mantissa, "double x = DBL_MIN, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "double x = DBL_MIN, type is NORMAL"); + } + + /* Check for DBL_MAX (largest possible number that is not Inf) */ + + { + double d = DBL_MAX; + const char mantissa[] + = "1111111111111111111111111111111111111111111111111111"; + gsl_ieee_double_rep r; + gsl_ieee_double_to_rep (&d, &r); + + gsl_test_int (r.sign, 0, "double x = DBL_MAX, sign is +"); + gsl_test_int (r.exponent, 1023, "double x = DBL_MAX, exponent is 1023"); + gsl_test_str (r.mantissa, mantissa, "double x = DBL_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NORMAL, + "double x = DBL_MAX, type is NORMAL"); + } + + /* Check for DENORMAL numbers (e.g. DBL_MIN/2^n) */ + +#ifdef TEST_DENORMAL + { + double d = DBL_MIN; + char mantissa[] + = "1000000000000000000000000000000000000000000000000000"; + int i; + gsl_ieee_double_rep r; + + for (i = 0; i < 52; i++) + { + double x = d / pow (2.0, 1 + (double) i); + mantissa[i] = '1'; + gsl_ieee_double_to_rep (&x, &r); + + gsl_test_int (r.sign, 0, "double x = DBL_MIN/2^%d, sign is +", i + 1); + gsl_test_int (r.exponent, -1023, + "double x = DBL_MIN/2^%d, exponent", i + 1); + gsl_test_str (r.mantissa, mantissa, + "double x = DBL_MIN/2^%d, mantissa", i + 1); + gsl_test_int (r.type, GSL_IEEE_TYPE_DENORMAL, + "double x = DBL_MIN/2^%d, type is DENORMAL", i + 1); + mantissa[i] = '0'; + } + } +#endif + + /* Check for positive INFINITY (e.g. 2*DBL_MAX) */ + + { + double d = DBL_MAX; + const char mantissa[] + = "0000000000000000000000000000000000000000000000000000"; + gsl_ieee_double_rep r; + + double x; + x = 2.0 * d; + gsl_ieee_double_to_rep (&x, &r); + + gsl_test_int (r.sign, 0, "double x = 2*DBL_MAX, sign is +"); + gsl_test_int (r.exponent, 1024, "double x = 2*DBL_MAX, exponent is 1024"); + gsl_test_str (r.mantissa, mantissa, "double x = 2*DBL_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_INF, "double x = 2*DBL_MAX, type is INF"); + } + + /* Check for negative INFINITY (e.g. -2*DBL_MAX) */ + + { + double d = DBL_MAX; + const char mantissa[] + = "0000000000000000000000000000000000000000000000000000"; + gsl_ieee_double_rep r; + + double x; + x = -2.0 * d; + gsl_ieee_double_to_rep (&x, &r); + + gsl_test_int (r.sign, 1, "double x = -2*DBL_MAX, sign is -"); + gsl_test_int (r.exponent, 1024, "double x = -2*DBL_MAX, exponent is 1024"); + gsl_test_str (r.mantissa, mantissa, "double x = -2*DBL_MAX, mantissa"); + gsl_test_int (r.type, GSL_IEEE_TYPE_INF,"double x = -2*DBL_MAX, type is INF"); + } + + /* Check for NAN (e.g. Inf - Inf) */ + + { + gsl_ieee_double_rep r; + double x = 1.0, y = 2.0, z = zero; + + x = x / z; + y = y / z; + z = y - x; + + gsl_ieee_double_to_rep (&z, &r); + + /* We don't check the sign and we don't check the mantissa because + they could be anything for a NaN */ + + gsl_test_int (r.exponent, 1024, "double x = NaN, exponent is 1024"); + gsl_test_int (r.type, GSL_IEEE_TYPE_NAN, "double x = NaN, type is NAN"); + } + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/install-sh b/software/gsl-1.15/install-sh new file mode 100755 index 000000000..6781b987b --- /dev/null +++ b/software/gsl-1.15/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/software/gsl-1.15/integration/.deps/cquad.Plo b/software/gsl-1.15/integration/.deps/cquad.Plo new file mode 100644 index 000000000..28d2470a1 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/cquad.Plo @@ -0,0 +1,133 @@ +cquad.lo: cquad.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_integration.h cquad_const.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_integration.h: + +cquad_const.c: diff --git a/software/gsl-1.15/integration/.deps/glfixed.Plo b/software/gsl-1.15/integration/.deps/glfixed.Plo new file mode 100644 index 000000000..02dfca7f6 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/glfixed.Plo @@ -0,0 +1,131 @@ +glfixed.lo: glfixed.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/integration/.deps/qag.Plo b/software/gsl-1.15/integration/.deps/qag.Plo new file mode 100644 index 000000000..9cf786489 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qag.Plo @@ -0,0 +1,140 @@ +qag.lo: qag.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + initialise.c set_initial.c qpsrt.c util.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +initialise.c: + +set_initial.c: + +qpsrt.c: + +util.c: diff --git a/software/gsl-1.15/integration/.deps/qagp.Plo b/software/gsl-1.15/integration/.deps/qagp.Plo new file mode 100644 index 000000000..9f2bea29f --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qagp.Plo @@ -0,0 +1,150 @@ +qagp.lo: qagp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_integration.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h initialise.c \ + qpsrt.c util.c append.c reset.c qelg.c qpsrt2.c ptsort.c positivity.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +initialise.c: + +qpsrt.c: + +util.c: + +append.c: + +reset.c: + +qelg.c: + +qpsrt2.c: + +ptsort.c: + +positivity.c: diff --git a/software/gsl-1.15/integration/.deps/qags.Plo b/software/gsl-1.15/integration/.deps/qags.Plo new file mode 100644 index 000000000..ecebd4fc1 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qags.Plo @@ -0,0 +1,148 @@ +qags.lo: qags.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_integration.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h initialise.c \ + set_initial.c qpsrt.c util.c reset.c qpsrt2.c qelg.c positivity.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +initialise.c: + +set_initial.c: + +qpsrt.c: + +util.c: + +reset.c: + +qpsrt2.c: + +qelg.c: + +positivity.c: diff --git a/software/gsl-1.15/integration/.deps/qawc.Plo b/software/gsl-1.15/integration/.deps/qawc.Plo new file mode 100644 index 000000000..734adeff2 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qawc.Plo @@ -0,0 +1,142 @@ +qawc.lo: qawc.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h initialise.c \ + set_initial.c qpsrt.c util.c qc25c.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +initialise.c: + +set_initial.c: + +qpsrt.c: + +util.c: + +qc25c.c: diff --git a/software/gsl-1.15/integration/.deps/qawf.Plo b/software/gsl-1.15/integration/.deps/qawf.Plo new file mode 100644 index 000000000..f0423f906 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qawf.Plo @@ -0,0 +1,138 @@ +qawf.lo: qawf.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h initialise.c \ + append.c qelg.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +initialise.c: + +append.c: + +qelg.c: diff --git a/software/gsl-1.15/integration/.deps/qawo.Plo b/software/gsl-1.15/integration/.deps/qawo.Plo new file mode 100644 index 000000000..d5653799b --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qawo.Plo @@ -0,0 +1,151 @@ +qawo.lo: qawo.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h initialise.c \ + set_initial.c reset.c qpsrt.c util.c qpsrt2.c qelg.c positivity.c \ + qc25f.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +initialise.c: + +set_initial.c: + +reset.c: + +qpsrt.c: + +util.c: + +qpsrt2.c: + +qelg.c: + +positivity.c: + +qc25f.c: diff --git a/software/gsl-1.15/integration/.deps/qaws.Plo b/software/gsl-1.15/integration/.deps/qaws.Plo new file mode 100644 index 000000000..5e7ba45d8 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qaws.Plo @@ -0,0 +1,142 @@ +qaws.lo: qaws.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h initialise.c \ + append.c qpsrt.c util.c qc25s.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +initialise.c: + +append.c: + +qpsrt.c: + +util.c: + +qc25s.c: diff --git a/software/gsl-1.15/integration/.deps/qcheb.Plo b/software/gsl-1.15/integration/.deps/qcheb.Plo new file mode 100644 index 000000000..2317f9bcb --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qcheb.Plo @@ -0,0 +1,117 @@ +qcheb.lo: qcheb.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_integration.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_integration.h: diff --git a/software/gsl-1.15/integration/.deps/qk.Plo b/software/gsl-1.15/integration/.deps/qk.Plo new file mode 100644 index 000000000..434fcecb3 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk.Plo @@ -0,0 +1,118 @@ +qk.lo: qk.c ../config.h /usr/bin/../lib/clang/4.1/include/float.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h ../gsl/gsl_precision.h ../gsl/gsl_types.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h err.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +err.c: diff --git a/software/gsl-1.15/integration/.deps/qk15.Plo b/software/gsl-1.15/integration/.deps/qk15.Plo new file mode 100644 index 000000000..26cf98da4 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk15.Plo @@ -0,0 +1,118 @@ +qk15.lo: qk15.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qk21.Plo b/software/gsl-1.15/integration/.deps/qk21.Plo new file mode 100644 index 000000000..0d0e94ba9 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk21.Plo @@ -0,0 +1,118 @@ +qk21.lo: qk21.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qk31.Plo b/software/gsl-1.15/integration/.deps/qk31.Plo new file mode 100644 index 000000000..0cc493e95 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk31.Plo @@ -0,0 +1,118 @@ +qk31.lo: qk31.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qk41.Plo b/software/gsl-1.15/integration/.deps/qk41.Plo new file mode 100644 index 000000000..be4787889 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk41.Plo @@ -0,0 +1,118 @@ +qk41.lo: qk41.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qk51.Plo b/software/gsl-1.15/integration/.deps/qk51.Plo new file mode 100644 index 000000000..11101c211 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk51.Plo @@ -0,0 +1,118 @@ +qk51.lo: qk51.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qk61.Plo b/software/gsl-1.15/integration/.deps/qk61.Plo new file mode 100644 index 000000000..7b7087c86 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qk61.Plo @@ -0,0 +1,118 @@ +qk61.lo: qk61.c ../config.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/integration/.deps/qmomo.Plo b/software/gsl-1.15/integration/.deps/qmomo.Plo new file mode 100644 index 000000000..3bd554273 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qmomo.Plo @@ -0,0 +1,131 @@ +qmomo.lo: qmomo.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_integration.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: diff --git a/software/gsl-1.15/integration/.deps/qmomof.Plo b/software/gsl-1.15/integration/.deps/qmomof.Plo new file mode 100644 index 000000000..31b9e6161 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qmomof.Plo @@ -0,0 +1,131 @@ +qmomof.lo: qmomof.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_integration.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: diff --git a/software/gsl-1.15/integration/.deps/qng.Plo b/software/gsl-1.15/integration/.deps/qng.Plo new file mode 100644 index 000000000..06ffecf11 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/qng.Plo @@ -0,0 +1,135 @@ +qng.lo: qng.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_integration.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h err.c qng.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_integration.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +err.c: + +qng.h: diff --git a/software/gsl-1.15/integration/.deps/test.Po b/software/gsl-1.15/integration/.deps/test.Po new file mode 100644 index 000000000..5d2d09e7e --- /dev/null +++ b/software/gsl-1.15/integration/.deps/test.Po @@ -0,0 +1,138 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_integration.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h tests.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +tests.h: diff --git a/software/gsl-1.15/integration/.deps/tests.Po b/software/gsl-1.15/integration/.deps/tests.Po new file mode 100644 index 000000000..5c36a9cf6 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/tests.Po @@ -0,0 +1,59 @@ +tests.o: tests.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h tests.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +tests.h: diff --git a/software/gsl-1.15/integration/.deps/workspace.Plo b/software/gsl-1.15/integration/.deps/workspace.Plo new file mode 100644 index 000000000..1ef4047f0 --- /dev/null +++ b/software/gsl-1.15/integration/.deps/workspace.Plo @@ -0,0 +1,131 @@ +workspace.lo: workspace.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_integration.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_integration.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: diff --git a/software/gsl-1.15/integration/ChangeLog b/software/gsl-1.15/integration/ChangeLog new file mode 100644 index 000000000..9c1387c9d --- /dev/null +++ b/software/gsl-1.15/integration/ChangeLog @@ -0,0 +1,164 @@ +2011-05-02 Brian Gough + + * cquad.c (gsl_integration_cquad): use finite instead of isfinite + +2010-04-24 Brian Gough + + * cquad.c (gsl_integration_cquad): added CQUAD algorithm + +2010-03-09 Brian Gough + + * glfixed.c (gauss_legendre_tbl): made this function static + +2009-08-23 Brian Gough + + * test.c (main): increase tolerance for qawc(f459) elist test + +2009-07-09 Brian Gough + + * workspace.c (gsl_integration_workspace_free): handle NULL + argument in free + + * qmomof.c (gsl_integration_qawo_table_free): handle NULL argument + in free + + * qmomo.c (gsl_integration_qaws_table_free): handle NULL argument + in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2003-01-12 Brian Gough + + * qawc.c (gsl_integration_qawc): fixed bisection condition to + prevent singularity falling on interval boundary + +Mon Apr 29 20:05:56 2002 Brian Gough + + * qcheb.c (gsl_integration_qcheb): avoid loss of precision by + replacing endpoints center+half_length by b and center-half_length + by a + +Mon Jul 30 17:46:42 2001 Brian Gough + + * test.c (main): reduced tolerance on qagiu(f455) smooth elist + test slightly + +Mon Jul 2 15:42:41 2001 Brian Gough + + * util.c: split out some static functions into separate files + +Tue Apr 17 22:11:28 2001 Brian Gough + + * qc25f.c (qc25f): need GSL_ERROR_VOID because function does not + return value + +Mon Apr 16 20:09:09 2001 Brian Gough + + * qc25f.c (qc25f): removed unnecessary variables, replaced use of + abort by GSL_ERROR + + * qmomof.c (gsl_integration_qawo_table_set_length): removed + unnecessary duplicate variable declaration for i + +Mon Jan 22 12:35:05 2001 Brian Gough + + * qmomof.c: moments are now precomputed in a read-only table + instead of being computed on the fly (cached) + +Fri Dec 8 19:45:52 2000 Brian Gough + + * reorganized, made internal functions static + +Thu Nov 16 19:45:19 2000 Brian Gough + + * qag_impl.c (gsl_integration_qag_impl): replace use of volatile + with the macro GSL_COERCE_DBL + +Wed May 31 19:35:57 2000 Brian Gough + + * test.c (main): increased tolerances on some results to allow + tests to pass with other compilers + +Mon May 15 14:21:00 2000 Brian Gough + + * test.c (main): increased one test limit slightly to allow for + rounding errors + +Wed Feb 23 14:35:31 2000 Brian Gough + + * qpsrt.c (qpsrt): changed ordering of while conditions to avoid + segmentation faults due to accessing values before testing end of + loop condition. Thanks to Brett Viren + for pointing this out. + + * qelg.c (qelg): changed update of nres from the original quadpack + so that uninitialized elements of the res3la array are never + accessed. + + * test.c (main): eliminate small memory leak from test + +Mon Feb 14 13:45:04 2000 Brian Gough + + * qk.c: renamed function qk to gsl_integration_qk since it is + exported + + * err.c: made internal function rescale_err static, only used in + qk.c and qng.c + +Mon Jul 12 11:37:55 1999 Brian Gough + + * qawc_impl.c (gsl_integration_qawc_impl): removed, no longer + necessary since everything goes into qawc.c + +Fri Apr 2 20:57:09 1999 Brian Gough + + * qelg.c (qelg): removed debugging code + + * qpsrt.c (qpsrt): removed debugging code + +Thu Mar 11 15:15:46 1999 Brian Gough + + * qags_impl.c (gsl_integration_qags_impl): removed dependency in + quadrature function calls by introducing dummy variables resabs1 + and resabs2 + +Wed Mar 10 19:05:41 1999 Brian Gough + + * added integrators QAGI, QAGIU, QAGIL for infinite and + semi-infinite ranges + +1999-01-01 Mark Galassi + + * integration.c: replaced strings.h with string.h, which is the + ISO library way. + +Sat Nov 21 12:43:03 1998 Brian Gough + + * Makefile.am (libgslintegration_a_SOURCES): eliminated local + max.h in favor of global GSL_MAX + + * added missing gsl_math.h headers for new GSL_DBL_EPSILON macros + +Tue Nov 17 17:16:51 1998 Brian Gough + + * added #include to all top-level source files + +Fri Jun 12 22:30:21 1998 Brian Gough + + * qage_impl.c: started using volatile (selectively) to enforce + strict IEEE behavior for the branches where it matters. I was + going to use gcc's -ffloat-store option but it didn't work for me. + Using volatile is not really a complete solution but is probably + close enough for all practical purposes (also it doesn't degrade + the performance as much as -ffloat-store would). + +Sat May 30 15:40:51 1998 Brian Gough + + * test.c (main): basic tests of qage are now complete + + * qage_impl.c (gsl_integration_qage_impl): fixed serious bug for + index i, which was incremented at the end of the do loop and + give an extra undefined entry in the result list! + diff --git a/software/gsl-1.15/integration/Makefile.am b/software/gsl-1.15/integration/Makefile.am new file mode 100644 index 000000000..d8725c93b --- /dev/null +++ b/software/gsl-1.15/integration/Makefile.am @@ -0,0 +1,14 @@ +noinst_LTLIBRARIES = libgslintegration.la + +INCLUDES = -I$(top_srcdir) + +libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c + +pkginclude_HEADERS = gsl_integration.h +noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c cquad_const.c + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test + +test_SOURCES = test.c tests.c tests.h +test_LDADD = libgslintegration.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/integration/Makefile.in b/software/gsl-1.15/integration/Makefile.in new file mode 100644 index 000000000..13fc812aa --- /dev/null +++ b/software/gsl-1.15/integration/Makefile.in @@ -0,0 +1,686 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = integration +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslintegration_la_LIBADD = +am_libgslintegration_la_OBJECTS = qk15.lo qk21.lo qk31.lo qk41.lo \ + qk51.lo qk61.lo qk.lo qng.lo qag.lo qags.lo qagp.lo \ + workspace.lo qcheb.lo qawc.lo qmomo.lo qaws.lo qmomof.lo \ + qawo.lo qawf.lo glfixed.lo cquad.lo +libgslintegration_la_OBJECTS = $(am_libgslintegration_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) tests.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslintegration.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslintegration_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslintegration_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslintegration.la +INCLUDES = -I$(top_srcdir) +libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c +pkginclude_HEADERS = gsl_integration.h +noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c cquad_const.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c tests.c tests.h +test_LDADD = libgslintegration.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu integration/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu integration/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslintegration.la: $(libgslintegration_la_OBJECTS) $(libgslintegration_la_DEPENDENCIES) + $(LINK) $(libgslintegration_la_OBJECTS) $(libgslintegration_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cquad.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glfixed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qagp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qawc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qawf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qawo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qaws.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qcheb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk15.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk21.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk31.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk41.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk51.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qk61.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmomo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmomof.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/workspace.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/integration/TODO b/software/gsl-1.15/integration/TODO new file mode 100644 index 000000000..b14179cc0 --- /dev/null +++ b/software/gsl-1.15/integration/TODO @@ -0,0 +1,24 @@ +# -*- org -*- +#+CATEGORY: integration + +* BUG#14 -- qagil + +The extrapolation used in qags gives negative results when integrating +the small tails of probability distributions using qagil, even though +each individual term in the sequence is positive and increasing (!). +This is a feature of the original quadpack and appears to be due to +the extrapolation algorithm, which should probably be tweaked to avoid +this undesirable behavior. + + +* Someone to volunteer to do Cubature, e.g as provided by Cubpack. + +* ACM Transactions on Mathematical Software (TOMS) archive + Volume 33 , Issue 3 (August 2007) + + Algorithm 867: QUADLOG---a package of routines for generating + gauss-related quadrature for two classes of logarithmic weight functions + Nelson H. F. Beebe, James S. Ball + Article No. 20 + Full text available: pdfPdf (209 KB) + Additional Information: _full citation, abstract, references, index terms diff --git a/software/gsl-1.15/integration/append.c b/software/gsl-1.15/integration/append.c new file mode 100644 index 000000000..75ad53fd2 --- /dev/null +++ b/software/gsl-1.15/integration/append.c @@ -0,0 +1,35 @@ +/* integration/append.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static inline +void append_interval (gsl_integration_workspace * workspace, + double a1, double b1, double area1, double error1) +{ + const size_t i_new = workspace->size ; + + workspace->alist[i_new] = a1; + workspace->blist[i_new] = b1; + workspace->rlist[i_new] = area1; + workspace->elist[i_new] = error1; + workspace->order[i_new] = i_new; + workspace->level[i_new] = 0; + + workspace->size++; +} + diff --git a/software/gsl-1.15/integration/cquad.c b/software/gsl-1.15/integration/cquad.c new file mode 100644 index 000000000..b54fad225 --- /dev/null +++ b/software/gsl-1.15/integration/cquad.c @@ -0,0 +1,683 @@ +/* integration/cquad.c + * + * Copyright (C) 2010 Pedro Gonnet + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "cquad_const.c" + + +/* Allocates a workspace for the given maximum number of intervals. + Note that if the workspace gets filled, the intervals with the + lowest error estimates are dropped. The maximum number of + intervals is therefore not the maximum number of intervals + that will be computed, but merely the size of the buffer. + */ + +gsl_integration_cquad_workspace * +gsl_integration_cquad_workspace_alloc (const size_t n) +{ + + gsl_integration_cquad_workspace *w; + + /* Check inputs */ + if (n < 3) + GSL_ERROR_VAL ("workspace size n must be at least 3", GSL_EDOM, 0); + + /* Allocate first the workspace struct */ + if ((w = + (gsl_integration_cquad_workspace *) + malloc (sizeof (gsl_integration_cquad_workspace))) == NULL) + GSL_ERROR_VAL ("failed to allocate space for workspace struct", + GSL_ENOMEM, 0); + + /* Allocate the intervals */ + if ((w->ivals = + (gsl_integration_cquad_ival *) + malloc (sizeof (gsl_integration_cquad_ival) * n)) == NULL) + { + free (w); + GSL_ERROR_VAL ("failed to allocate space for the intervals", GSL_ENOMEM, + 0); + } + + /* Allocate the max-heap indices */ + if ((w->heap = (size_t *) malloc (sizeof (size_t) * n)) == NULL) + { + free (w->ivals); + free (w); + GSL_ERROR_VAL ("failed to allocate space for the heap", GSL_ENOMEM, 0); + } + + /* Remember the size of the workspace */ + w->size = n; + + /* Return the result */ + return w; + +} + + +/* Liberates the workspace memory. + */ + +void +gsl_integration_cquad_workspace_free (gsl_integration_cquad_workspace * w) +{ + + /* Nothing to be done? */ + if (w == NULL) + return; + + /* Free the intervals first */ + if (w->ivals != NULL) + free (w->ivals); + + /* Free the heap */ + if (w->heap != NULL) + free (w->heap); + + /* Free the structure */ + free (w); + +} + + +/* Compute the product of the fx with one of the inverse + Vandermonde-like matrices. */ + +static void +Vinvfx (const double *fx, double *c, const int d) +{ + + int i, j; + + switch (d) + { + case 0: + for (i = 0; i <= 4; i++) + { + c[i] = 0.0; + for (j = 0; j <= 4; j++) + c[i] += V1inv[i * 5 + j] * fx[j * 8]; + } + break; + case 1: + for (i = 0; i <= 8; i++) + { + c[i] = 0.0; + for (j = 0; j <= 8; j++) + c[i] += V2inv[i * 9 + j] * fx[j * 4]; + } + break; + case 2: + for (i = 0; i <= 16; i++) + { + c[i] = 0.0; + for (j = 0; j <= 16; j++) + c[i] += V3inv[i * 17 + j] * fx[j * 2]; + } + break; + case 3: + for (i = 0; i <= 32; i++) + { + c[i] = 0.0; + for (j = 0; j <= 32; j++) + c[i] += V4inv[i * 33 + j] * fx[j]; + } + break; + } + +} + + +/* Downdate the interpolation given by the n coefficients c + by removing the nodes with indices in nans. */ + +static void +downdate (double *c, int n, int d, int *nans, int nnans) +{ + + static const int bidx[4] = { 0, 6, 16, 34 }; + double b_new[34], alpha; + int i, j; + + for (i = 0; i <= n + 1; i++) + b_new[i] = bee[bidx[d] + i]; + for (i = 0; i < nnans; i++) + { + b_new[n + 1] = b_new[n + 1] / Lalpha[n]; + b_new[n] = (b_new[n] + xi[nans[i]] * b_new[n + 1]) / Lalpha[n - 1]; + for (j = n - 1; j > 0; j--) + b_new[j] = + (b_new[j] + xi[nans[i]] * b_new[j + 1] - + Lgamma[j + 1] * b_new[j + 2]) / Lalpha[j - 1]; + for (j = 0; j <= n; j++) + b_new[j] = b_new[j + 1]; + alpha = c[n] / b_new[n]; + for (j = 0; j < n; j++) + c[j] -= alpha * b_new[j]; + c[n] = 0; + n--; + } + +} + + +/* The actual integration routine. + */ + +int +gsl_integration_cquad (const gsl_function * f, double a, double b, + double epsabs, double epsrel, + gsl_integration_cquad_workspace * ws, + double *result, double *abserr, size_t * nevals) +{ + + /* Some constants that we will need. */ + static const int n[4] = { 4, 8, 16, 32 }; + static const int skip[4] = { 8, 4, 2, 1 }; + static const int idx[4] = { 0, 5, 14, 31 }; + static const double w = M_SQRT2 / 2; + static const int ndiv_max = 20; + + /* Actual variables (as opposed to constants above). */ + double m, h, temp; + double igral, err, igral_final, err_final, err_excess; + int nivals, neval = 0; + int i, j, d, split, t; + int nnans, nans[32]; + gsl_integration_cquad_ival *iv, *ivl, *ivr; + double nc, ncdiff; + + /* Check the input arguments. */ + if (f == NULL) + GSL_ERROR ("function pointer shouldn't be NULL", GSL_EINVAL); + if (result == NULL) + GSL_ERROR ("result pointer shouldn't be NULL", GSL_EINVAL); + if (ws == NULL) + GSL_ERROR ("workspace pointer shouldn't be NULL", GSL_EINVAL); + + + /* Check for unreasonable accuracy demands */ + if (epsabs < 0.0 || epsrel < 0.0) + GSL_ERROR ("tolerances may not be negative", GSL_EBADTOL); + if (epsabs <= 0 && epsrel < GSL_DBL_EPSILON) + GSL_ERROR ("unreasonable accuracy requirement", GSL_EBADTOL); + + + /* Create the first interval. */ + iv = &(ws->ivals[0]); + m = (a + b) / 2; + h = (b - a) / 2; + nnans = 0; + for (i = 0; i <= n[3]; i++) + { + iv->fx[i] = GSL_FN_EVAL (f, m + xi[i] * h); + neval++; + if (!finite (iv->fx[i])) + { + nans[nnans++] = i; + iv->fx[i] = 0.0; + } + } + Vinvfx (iv->fx, &(iv->c[idx[0]]), 0); + Vinvfx (iv->fx, &(iv->c[idx[3]]), 3); + Vinvfx (iv->fx, &(iv->c[idx[2]]), 2); + for (i = 0; i < nnans; i++) + iv->fx[i] = GSL_NAN; + iv->a = a; + iv->b = b; + iv->depth = 3; + iv->rdepth = 1; + iv->ndiv = 0; + iv->igral = 2 * h * iv->c[idx[3]] * w; + nc = 0.0; + for (i = n[2] + 1; i <= n[3]; i++) + { + temp = iv->c[idx[3] + i]; + nc += temp * temp; + } + ncdiff = nc; + for (i = 0; i <= n[2]; i++) + { + temp = iv->c[idx[2] + i] - iv->c[idx[3] + i]; + ncdiff += temp * temp; + nc += iv->c[idx[3] + i] * iv->c[idx[3] + i]; + } + ncdiff = sqrt (ncdiff); + nc = sqrt (nc); + iv->err = ncdiff * 2 * h; + if (ncdiff / nc > 0.1 && iv->err < 2 * h * nc) + iv->err = 2 * h * nc; + + + /* Initialize the heaps. */ + for (i = 0; i < ws->size; i++) + ws->heap[i] = i; + + + /* Initialize some global values. */ + igral = iv->igral; + err = iv->err; + nivals = 1; + igral_final = 0.0; + err_final = 0.0; + err_excess = 0.0; + + + /* Main loop. */ + while (nivals > 0 && err > 0.0 && + !(err <= fabs (igral) * epsrel || err <= epsabs) + && !(err_final > fabs (igral) * epsrel + && err - err_final < fabs (igral) * epsrel) + && !(err_final > epsabs && err - err_final < epsabs)) + { + + /* Put our finger on the interval with the largest error. */ + iv = &(ws->ivals[ws->heap[0]]); + m = (iv->a + iv->b) / 2; + h = (iv->b - iv->a) / 2; + +/* printf + ("cquad: processing ival %i (of %i) with [%e,%e] int=%e, err=%e, depth=%i\n", + ws->heap[0], nivals, iv->a, iv->b, iv->igral, iv->err, iv->depth); +*/ + /* Should we try to increase the degree? */ + if (iv->depth < 3) + { + + /* Keep tabs on some variables. */ + d = ++iv->depth; + + /* Get the new (missing) function values */ + for (i = skip[d]; i <= 32; i += 2 * skip[d]) + { + iv->fx[i] = GSL_FN_EVAL (f, m + xi[i] * h); + neval++; + } + nnans = 0; + for (i = 0; i <= 32; i += skip[d]) + { + if (!finite (iv->fx[i])) + { + nans[nnans++] = i; + iv->fx[i] = 0.0; + } + } + + /* Compute the new coefficients. */ + Vinvfx (iv->fx, &(iv->c[idx[d]]), d); + + /* Downdate any NaNs. */ + if (nnans > 0) + { + downdate (&(iv->c[idx[d]]), n[d], d, nans, nnans); + for (i = 0; i < nnans; i++) + iv->fx[i] = GSL_NAN; + } + + /* Compute the error estimate. */ + nc = 0.0; + for (i = n[d - 1] + 1; i <= n[d]; i++) + { + temp = iv->c[idx[d] + i]; + nc += temp * temp; + } + ncdiff = nc; + for (i = 0; i <= n[d - 1]; i++) + { + temp = iv->c[idx[d - 1] + i] - iv->c[idx[d] + i]; + ncdiff += temp * temp; + nc += iv->c[idx[d] + i] * iv->c[idx[d] + i]; + } + ncdiff = sqrt (ncdiff); + nc = sqrt (nc); + iv->err = ncdiff * 2 * h; + + /* Compute the local integral. */ + iv->igral = 2 * h * w * iv->c[idx[d]]; + + /* Split the interval prematurely? */ + split = (nc > 0 && ncdiff / nc > 0.1); + + } + + /* Maximum degree reached, just split. */ + else + { + split = 1; + } + + + /* Should we drop this interval? */ + if ((m + h * xi[0]) >= (m + h * xi[1]) + || (m + h * xi[31]) >= (m + h * xi[32]) + || iv->err < fabs (iv->igral) * GSL_DBL_EPSILON * 10) + { + +/* printf + ("cquad: dumping ival %i (of %i) with [%e,%e] int=%e, err=%e, depth=%i\n", + ws->heap[0], nivals, iv->a, iv->b, iv->igral, iv->err, + iv->depth); +*/ + /* Keep this interval's contribution */ + err_final += iv->err; + igral_final += iv->igral; + + /* Swap with the last element on the heap */ + t = ws->heap[nivals - 1]; + ws->heap[nivals - 1] = ws->heap[0]; + ws->heap[0] = t; + nivals--; + + /* Fix up the heap */ + i = 0; + while (2 * i + 1 < nivals) + { + + /* Get the kids */ + j = 2 * i + 1; + + /* If the j+1st entry exists and is larger than the jth, + use it instead. */ + if (j + 1 < nivals + && ws->ivals[ws->heap[j + 1]].err >= + ws->ivals[ws->heap[j]].err) + j++; + + /* Do we need to move the ith entry up? */ + if (ws->ivals[ws->heap[j]].err <= ws->ivals[ws->heap[i]].err) + break; + else + { + t = ws->heap[j]; + ws->heap[j] = ws->heap[i]; + ws->heap[i] = t; + i = j; + } + } + + } + + /* Do we need to split this interval? */ + else if (split) + { + + /* Some values we will need often... */ + d = iv->depth; + + /* Generate the interval on the left */ + ivl = &(ws->ivals[ws->heap[nivals++]]); + ivl->a = iv->a; + ivl->b = m; + ivl->depth = 0; + ivl->rdepth = iv->rdepth + 1; + ivl->fx[0] = iv->fx[0]; + ivl->fx[32] = iv->fx[16]; + for (i = skip[0]; i < 32; i += skip[0]) + { + ivl->fx[i] = + GSL_FN_EVAL (f, (ivl->a + ivl->b) / 2 + xi[i] * h / 2); + neval++; + } + nnans = 0; + for (i = 0; i <= 32; i += skip[0]) + { + if (!finite (ivl->fx[i])) + { + nans[nnans++] = i; + ivl->fx[i] = 0.0; + } + } + Vinvfx (ivl->fx, ivl->c, 0); + if (nnans > 0) + { + downdate (ivl->c, n[0], 0, nans, nnans); + for (i = 0; i < nnans; i++) + ivl->fx[i] = GSL_NAN; + } + for (i = 0; i <= n[d]; i++) + { + ivl->c[idx[d] + i] = 0.0; + for (j = i; j <= n[d]; j++) + ivl->c[idx[d] + i] += Tleft[i * 33 + j] * iv->c[idx[d] + j]; + } + ncdiff = 0.0; + for (i = 0; i <= n[0]; i++) + { + temp = ivl->c[i] - ivl->c[idx[d] + i]; + ncdiff += temp * temp; + } + for (i = n[0] + 1; i <= n[d]; i++) + { + temp = ivl->c[idx[d] + i]; + ncdiff += temp * temp; + } + ncdiff = sqrt (ncdiff); + ivl->err = ncdiff * h; + + /* Check for divergence. */ + ivl->ndiv = iv->ndiv + (fabs (iv->c[0]) > 0 + && ivl->c[0] / iv->c[0] > 2); + if (ivl->ndiv > ndiv_max && 2 * ivl->ndiv > ivl->rdepth) + { + /* need copysign(INFINITY, igral) */ + *result = (igral >= 0) ? GSL_POSINF : GSL_NEGINF; + if (nevals != NULL) + *nevals = neval; + return GSL_EDIVERGE; + } + + /* Compute the local integral. */ + ivl->igral = h * w * ivl->c[0]; + + + /* Generate the interval on the right */ + ivr = &(ws->ivals[ws->heap[nivals++]]); + ivr->a = m; + ivr->b = iv->b; + ivr->depth = 0; + ivr->rdepth = iv->rdepth + 1; + ivr->fx[0] = iv->fx[16]; + ivr->fx[32] = iv->fx[32]; + for (i = skip[0]; i < 32; i += skip[0]) + { + ivr->fx[i] = + GSL_FN_EVAL (f, (ivr->a + ivr->b) / 2 + xi[i] * h / 2); + neval++; + } + nnans = 0; + for (i = 0; i <= 32; i += skip[0]) + { + if (!finite (ivr->fx[i])) + { + nans[nnans++] = i; + ivr->fx[i] = 0.0; + } + } + Vinvfx (ivr->fx, ivr->c, 0); + if (nnans > 0) + { + downdate (ivr->c, n[0], 0, nans, nnans); + for (i = 0; i < nnans; i++) + ivr->fx[i] = GSL_NAN; + } + for (i = 0; i <= n[d]; i++) + { + ivr->c[idx[d] + i] = 0.0; + for (j = i; j <= n[d]; j++) + ivr->c[idx[d] + i] += Tright[i * 33 + j] * iv->c[idx[d] + j]; + } + ncdiff = 0.0; + for (i = 0; i <= n[0]; i++) + { + temp = ivr->c[i] - ivr->c[idx[d] + i]; + ncdiff += temp * temp; + } + for (i = n[0] + 1; i <= n[d]; i++) + { + temp = ivr->c[idx[d] + i]; + ncdiff += temp * temp; + } + ncdiff = sqrt (ncdiff); + ivr->err = ncdiff * h; + + /* Check for divergence. */ + ivr->ndiv = iv->ndiv + (fabs (iv->c[0]) > 0 + && ivr->c[0] / iv->c[0] > 2); + if (ivr->ndiv > ndiv_max && 2 * ivr->ndiv > ivr->rdepth) + { + /* need copysign(INFINITY, igral) */ + *result = (igral >= 0) ? GSL_POSINF : GSL_NEGINF; + if (nevals != NULL) + *nevals = neval; + return GSL_EDIVERGE; + } + + /* Compute the local integral. */ + ivr->igral = h * w * ivr->c[0]; + + + /* Fix-up the heap: we now have one interval on top + that we don't need any more and two new, unsorted + ones at the bottom. */ + + /* Flip the last interval to the top of the heap and + sift down. */ + t = ws->heap[nivals - 1]; + ws->heap[nivals - 1] = ws->heap[0]; + ws->heap[0] = t; + nivals--; + + /* Sift this interval back down the heap. */ + i = 0; + while (2 * i + 1 < nivals - 1) + { + j = 2 * i + 1; + if (j + 1 < nivals - 1 + && ws->ivals[ws->heap[j + 1]].err >= + ws->ivals[ws->heap[j]].err) + j++; + if (ws->ivals[ws->heap[j]].err <= ws->ivals[ws->heap[i]].err) + break; + else + { + t = ws->heap[j]; + ws->heap[j] = ws->heap[i]; + ws->heap[i] = t; + i = j; + } + } + + /* Now grab the last interval and sift it up the heap. */ + i = nivals - 1; + while (i > 0) + { + j = (i - 1) / 2; + if (ws->ivals[ws->heap[j]].err < ws->ivals[ws->heap[i]].err) + { + t = ws->heap[j]; + ws->heap[j] = ws->heap[i]; + ws->heap[i] = t; + i = j; + } + else + break; + } + + + } + + /* Otherwise, just fix-up the heap. */ + else + { + i = 0; + while (2 * i + 1 < nivals) + { + j = 2 * i + 1; + if (j + 1 < nivals + && ws->ivals[ws->heap[j + 1]].err >= + ws->ivals[ws->heap[j]].err) + j++; + if (ws->ivals[ws->heap[j]].err <= ws->ivals[ws->heap[i]].err) + break; + else + { + t = ws->heap[j]; + ws->heap[j] = ws->heap[i]; + ws->heap[i] = t; + i = j; + } + } + + } + + /* If the heap is about to overflow, remove the last two + intervals. */ + while (nivals > ws->size - 2) + { + iv = &(ws->ivals[ws->heap[nivals - 1]]); + +/* printf + ("cquad: dumping ival %i (of %i) with [%e,%e] int=%e, err=%e, depth=%i\n", + ws->heap[0], nivals, iv->a, iv->b, iv->igral, iv->err, + iv->depth); +*/ + err_final += iv->err; + igral_final += iv->igral; + nivals--; + } + + /* Collect the value of the integral and error. */ + igral = igral_final; + err = err_final; + for (i = 0; i < nivals; i++) + { + igral += ws->ivals[ws->heap[i]].igral; + err += ws->ivals[ws->heap[i]].err; + } + + } + + /* Dump the contents of the heap. */ +/* for (i = 0; i < nivals; i++) + { + iv = &(ws->ivals[ws->heap[i]]); + printf + ("cquad: ival %i (%i) with [%e,%e], int=%e, err=%e, depth=%i, rdepth=%i\n", + i, ws->heap[i], iv->a, iv->b, iv->igral, iv->err, iv->depth, + iv->rdepth); + } +*/ + /* Clean up and present the results. */ + *result = igral; + if (abserr != NULL) + *abserr = err; + if (nevals != NULL) + *nevals = neval; + + /* All is well that ends well. */ + return GSL_SUCCESS; + +} diff --git a/software/gsl-1.15/integration/cquad_const.c b/software/gsl-1.15/integration/cquad_const.c new file mode 100644 index 000000000..624204b00 --- /dev/null +++ b/software/gsl-1.15/integration/cquad_const.c @@ -0,0 +1,1334 @@ +/* Some constants and matrices that we'll need. + */ + +static const double xi[33] = { + -1., -0.99518472667219688624, -0.98078528040323044912, + -0.95694033573220886493, -0.92387953251128675612, + -0.88192126434835502970, -0.83146961230254523708, + -0.77301045336273696082, -0.70710678118654752440, + -0.63439328416364549822, -0.55557023301960222475, + -0.47139673682599764857, -0.38268343236508977173, + -0.29028467725446236764, -0.19509032201612826785, + -0.098017140329560601995, 0., 0.098017140329560601995, + 0.19509032201612826785, 0.29028467725446236764, 0.38268343236508977173, + 0.47139673682599764857, 0.55557023301960222475, 0.63439328416364549822, + 0.70710678118654752440, 0.77301045336273696082, 0.83146961230254523708, + 0.88192126434835502970, 0.92387953251128675612, 0.95694033573220886493, + 0.98078528040323044912, 0.99518472667219688624, 1. +}; + +static const double bee[68] = { + 0.00000000000000e+00, 2.28868854108532e-01, 0.00000000000000e+00, + -8.15740215243451e-01, 0.00000000000000e+00, 5.31212715259731e-01, + 0.00000000000000e+00, 1.38538036812454e-02, 0.00000000000000e+00, + 3.74405228908818e-02, 0.00000000000000e+00, 2.12224115039342e-01, + 0.00000000000000e+00, -8.16362644507898e-01, 0.00000000000000e+00, + 5.35648426691481e-01, 0.00000000000000e+00, 1.52417902753662e-03, + 0.00000000000000e+00, 2.63058840550873e-03, 0.00000000000000e+00, + 4.15292106318904e-03, 0.00000000000000e+00, 6.97106011119775e-03, + 0.00000000000000e+00, 1.35535708431058e-02, 0.00000000000000e+00, + 3.52132898424856e-02, 0.00000000000000e+00, 2.06946714741884e-01, + 0.00000000000000e+00, -8.15674251283876e-01, 0.00000000000000e+00, + 5.38841175520580e-01, 0.00000000000000e+00, 1.84909689577590e-04, + 0.00000000000000e+00, 2.90936325007499e-04, 0.00000000000000e+00, + 3.84877750950089e-04, 0.00000000000000e+00, 4.86436656735046e-04, + 0.00000000000000e+00, 6.08688640346879e-04, 0.00000000000000e+00, + 7.66732830740331e-04, 0.00000000000000e+00, 9.82753336104205e-04, + 0.00000000000000e+00, 1.29359957505615e-03, 0.00000000000000e+00, + 1.76616363801885e-03, 0.00000000000000e+00, 2.53323433039089e-03, + 0.00000000000000e+00, 3.88872172121956e-03, 0.00000000000000e+00, + 6.58635106468291e-03, 0.00000000000000e+00, 1.30326736343254e-02, + 0.00000000000000e+00, 3.44353850696714e-02, 0.00000000000000e+00, + 2.05025409531915e-01, 0.00000000000000e+00, -8.14985893995401e-01, + 0.00000000000000e+00, 5.40679930965238e-01 +}; + +static const double Lalpha[33] = { + 5.77350269189626e-01, 5.16397779494322e-01, 5.07092552837110e-01, + 5.03952630678970e-01, 5.02518907629606e-01, 5.01745206004255e-01, + 5.01280411827603e-01, 5.00979432868120e-01, 5.00773395667191e-01, + 5.00626174321759e-01, 5.00517330712619e-01, 5.00434593736979e-01, + 5.00370233297676e-01, 5.00319182924304e-01, 5.00278009473803e-01, + 5.00244319584578e-01, 5.00216403386025e-01, 5.00193012939056e-01, + 5.00173220168024e-01, 5.00156323280355e-01, 5.00141783641018e-01, + 5.00129182278347e-01, 5.00118189340972e-01, 5.00108542278496e-01, + 5.00100030010004e-01, 5.00092481273333e-01, 5.00085755939229e-01, + 5.00079738458365e-01, 5.00074332862969e-01, 5.00069458915387e-01, + 5.00065049112355e-01, 5.00061046334395e-01, 5.00057401986298e-01 +}; + +static const double Lgamma[33] = { + 0.0, 0.0, 5.16397779494322e-01, 5.07092552837110e-01, 5.03952630678970e-01, + 5.02518907629606e-01, 5.01745206004255e-01, 5.01280411827603e-01, + 5.00979432868120e-01, 5.00773395667191e-01, 5.00626174321759e-01, + 5.00517330712619e-01, 5.00434593736979e-01, 5.00370233297676e-01, + 5.00319182924304e-01, 5.00278009473803e-01, 5.00244319584578e-01, + 5.00216403386025e-01, 5.00193012939056e-01, 5.00173220168024e-01, + 5.00156323280355e-01, 5.00141783641018e-01, 5.00129182278347e-01, + 5.00118189340972e-01, 5.00108542278496e-01, 5.00100030010003e-01, + 5.00092481273333e-01, 5.00085755939229e-01, 5.00079738458365e-01, + 5.00074332862969e-01, 5.00069458915387e-01, 5.00065049112355e-01, + 5.00061046334395e-01 +}; + +static const double V1inv[5 * 5] = { + .47140452079103168293e-1, .37712361663282534635, .56568542494923801952, + .37712361663282534635, .47140452079103168293e-1, + -.81649658092772603273e-1, -.46188021535170061160, 0, + .46188021535170061160, .81649658092772603273e-1, .15058465048420853962, + .12046772038736683169, -.54210474174315074262, .12046772038736683169, + .15058465048420853962, -.21380899352993950775, .30237157840738178177, -0., + -.30237157840738178177, .21380899352993950775, .10774960475223581324, + -.21549920950447162648, .21549920950447162648, -.21549920950447162648, + .10774960475223581324 +}; + +static const double V2inv[9 * 9] = { + .11223917161691230546e-1, .10339219839658349826, .19754094204576565761, + .25577315077753587922, .27835314560994251755, .25577315077753587922, + .19754094204576565761, .10339219839658349826, .11223917161691230546e-1, + -.19440394783993476970e-1, -.16544884625069155470, -.24193725566041460608, + -.16953338808305493604, 0.0, .16953338808305493604, .24193725566041460608, + .16544884625069155470, .19440394783993476970e-1, .26466393115406349388e-1, + .17766815796285469394, .11316664642449611462, -.16306601003711325980, + -.30847037493128779631, -.16306601003711325980, .11316664642449611462, + .17766815796285469394, .26466393115406349388e-1, + -.32395302049990834508e-1, -.15521142532414866547, + .88573492664788602740e-1, .29570405784974857322, 0.0, + -.29570405784974857322, -.88573492664788602740e-1, .15521142532414866547, + .32395302049990834508e-1, .41442155673936851246e-1, + .98186757907405608245e-1, -.23056908429499411784, + -.68047008326360625520e-1, .31797435808002456774, + -.68047008326360625520e-1, -.23056908429499411784, + .98186757907405608245e-1, .41442155673936851246e-1, + -.49981120317798783134e-1, -.24861810572835756217e-1, + .23561326072010832539, -.24472785656448415351, 0.0, .24472785656448415351, + -.23561326072010832539, .24861810572835756217e-1, + .49981120317798783134e-1, .79691635865674781228e-1, + -.95725617891693941833e-1, -.57957553356854386344e-1, + .21164072460540271452, -.27529837844505833514, .21164072460540271452, + -.57957553356854386344e-1, -.95725617891693941833e-1, + .79691635865674781228e-1, + -.10894869830716590913, .20131094491947531782, -.15407672674888869038, + .83385723639789791384e-1, 0.0, -.83385723639789791384e-1, + .15407672674888869038, -.20131094491947531782, .10894869830716590913, + .54581057089643838221e-1, -.10916211417928767644, .10916211417928767644, + -.10916211417928767644, .10916211417928767644, -.10916211417928767644, + .10916211417928767644, -.10916211417928767644, .54581057089643838221e-1 +}; + +static const double V3inv[17 * 17] = { + .27729677693590098996e-2, .26423663180333065153e-1, + .53374068493933898312e-1, .77007854739523195947e-1, + .98257061072911596869e-1, .11538049741786835604, .12832134344120884559, + .13612785914022865001, .13888293186236181317, .13612785914022865001, + .12832134344120884559, .11538049741786835604, .98257061072911596869e-1, + .77007854739523195947e-1, .53374068493933898312e-1, + .26423663180333065153e-1, .27729677693590098996e-2, + -.48029210642807413690e-2, -.44887724635478800254e-1, + -.85409520147301089416e-1, -.11090267822061423050, -.12033983162705862441, + -.11102786862182788886, -.85054870109799336515e-1, + -.45998467987742225160e-1, 0.0, .45998467987742225160e-1, + .85054870109799336515e-1, .11102786862182788886, .12033983162705862441, + .11090267822061423050, .85409520147301089416e-1, .44887724635478800254e-1, + .48029210642807413690e-2, .62758546879582030087e-2, + .55561297093529155869e-1, + .93281491021051539742e-1, .92320151237493695139e-1, + .55077987469605684531e-1, + -.96998141716497488255e-2, -.80285961895427405567e-1, + -.13496839655913850224, + -.15512521776684524331, -.13496839655913850224, -.80285961895427405567e-1, + -.96998141716497488255e-2, .55077987469605684531e-1, + .92320151237493695139e-1, .93281491021051539742e-1, + .55561297093529155869e-1, .62758546879582030087e-2, + -.74850969394858555939e-2, -.61751608943839234096e-1, + -.82974150437304275958e-1, -.38437763431942633378e-1, + .45745502025779701366e-1, .12369235652734542162, .14720439712852868239, + .98768034347019704401e-1, 0.0, + -.98768034347019704401e-1, -.14720439712852868239, -.12369235652734542162, + -.45745502025779701366e-1, .38437763431942633378e-1, + .82974150437304275958e-1, .61751608943839234096e-1, + .74850969394858555939e-2, .86710099994384056338e-2, + .64006230103659573344e-1, .58517426396091675690e-1, + -.29743410528985802680e-1, + -.11934127779157114754, -.12686773515361299409, -.30729137153877447035e-1, + .97307836256600731568e-1, .15635811574451401023, .97307836256600731568e-1, + -.30729137153877447035e-1, -.12686773515361299409, -.11934127779157114754, + -.29743410528985802680e-1, .58517426396091675690e-1, + .64006230103659573344e-1, .86710099994384056338e-2, + -.97486395666294840165e-2, -.62995604908060224672e-1, + -.24373234450275529219e-1, .87760984413626872730e-1, + .12205204576993351394, + .16216004196864002088e-1, -.12422320942156845775, -.13682714580929614678, + 0.0, .13682714580929614678, .12422320942156845775, + -.16216004196864002088e-1, -.12205204576993351394, + -.87760984413626872730e-1, .24373234450275529219e-1, + .62995604908060224672e-1, .97486395666294840165e-2, + .10956271233750488468e-1, .58613204255294358939e-1, + -.13306063940736618859e-1, -.11606666444978454399, + -.52059598001115805639e-1, .10868540217796151849, .12594452879014618005, + -.44678658254872910434e-1, -.15617684362128533405, + -.44678658254872910434e-1, .12594452879014618005, .10868540217796151849, + -.52059598001115805639e-1, -.11606666444978454399, + -.13306063940736618859e-1, .58613204255294358939e-1, + .10956271233750488468e-1, -.12098893000863087230e-1, + -.51626244709126208453e-1, .48919433304746979330e-1, + .10467644465949427090, + -.48729879523084673782e-1, -.13668732103524749234, .28190838706814496438e-1, + .15434223333238741600, 0.0, -.15434223333238741600, + -.28190838706814496438e-1, .13668732103524749234, + .48729879523084673782e-1, -.10467644465949427090, + -.48919433304746979330e-1, .51626244709126208453e-1, + .12098893000863087230e-1, .13542668300437944822e-1, + .41712033418258689308e-1, + -.76190463272803434388e-1, -.58303943170068132010e-1, .12158068748245606853, + .42121099930651007882e-1, -.14684425840766337756, + -.16108203535058647043e-1, .15698075850757976092, + -.16108203535058647043e-1, -.14684425840766337756, + .42121099930651007882e-1, .12158068748245606853, + -.58303943170068132010e-1, -.76190463272803434388e-1, + .41712033418258689308e-1, .13542668300437944822e-1, + -.14939634995117694417e-1, -.30047246373341564039e-1, + .91624635082546425678e-1, -.79133374319110026377e-2, + -.12292558212072233355, .90013382617762643524e-1, + .84013717196539593395e-1, -.14813033309980695856, 0.0, + .14813033309980695856, -.84013717196539593395e-1, + -.90013382617762643524e-1, + .12292558212072233355, .79133374319110026377e-2, -.91624635082546425678e-1, + .30047246373341564039e-1, .14939634995117694417e-1, + .16986031342807474208e-1, + .15760203882617033601e-1, -.91494054040950941996e-1, + .70082459207876130806e-1, + .53390713710144539104e-1, -.14340746778352039430, .84048122493418898508e-1, + .72456667788091316868e-1, -.15564535320096811360, + .72456667788091316868e-1, .84048122493418898508e-1, + -.14340746778352039430, .53390713710144539104e-1, + .70082459207876130806e-1, -.91494054040950941996e-1, + .15760203882617033601e-1, + .16986031342807474208e-1, -.18994065631858742028e-1, + -.82901821370405592927e-3, .77239669773015192888e-1, + -.10850735431039424680, .47524484622086496464e-1, + .69148184871588737021e-1, -.14829314646228194928, .11992057742398672066, + 0.0, -.11992057742398672066, .14829314646228194928, + -.69148184871588737021e-1, -.47524484622086496464e-1, + .10850735431039424680, -.77239669773015192888e-1, + .82901821370405592927e-3, .18994065631858742028e-1, + .22761703826371535132e-1, -.17728848711449643358e-1, + -.47496371572480503788e-1, .10659958402328690063, -.11696013966166296514, + .63073750910894244526e-1, .32928881123602721303e-1, + -.12280950532497593683, .15926189077282729505, -.12280950532497593683, + .32928881123602721303e-1, .63073750910894244526e-1, + -.11696013966166296514, .10659958402328690063, -.47496371572480503788e-1, + -.17728848711449643358e-1, .22761703826371535132e-1, + -.26493215276042203434e-1, .35579780856128386192e-1, + .10447309718398935122e-1, -.68616154085314996709e-1, + .11775363082763954214, -.13918901977011837274, .12312819418827395690, + -.72053565748259077905e-1, 0.0, .72053565748259077905e-1, + -.12312819418827395690, .13918901977011837274, -.11775363082763954214, + .68616154085314996709e-1, -.10447309718398935122e-1, + -.35579780856128386192e-1, + .26493215276042203434e-1, .40742523354399706918e-1, + -.73124912999529117195e-1, .49317266444153837821e-1, + -.13686605413876015320e-1, -.28342624942191100464e-1, + .70371855298258216249e-1, -.10600251632853603875, .12981016288391131812, + -.13817029659318161476, .12981016288391131812, -.10600251632853603875, + .70371855298258216249e-1, -.28342624942191100464e-1, + -.13686605413876015320e-1, + .49317266444153837821e-1, -.73124912999529117195e-1, + .40742523354399706918e-1, -.54944368958699908688e-1, + .10777725663147408190, -.10152395581538265428, .91369146312596428468e-1, + -.77703071757424700773e-1, .61050911730999815031e-1, + -.42052599404498348871e-1, .21438229266251454773e-1, 0.0, + -.21438229266251454773e-1, .42052599404498348871e-1, + -.61050911730999815031e-1, .77703071757424700773e-1, + -.91369146312596428468e-1, + .10152395581538265428, -.10777725663147408190, .54944368958699908688e-1, + .27485608464748840573e-1, -.54971216929497681146e-1, + .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .54971216929497681146e-1, + -.54971216929497681146e-1, .27485608464748840573e-1 +}; + +static const double V4inv[33 * 33] = { + .69120897476690862600e-3, .66419939766331555194e-2, + .13600665164323186111e-1, .20122785860913684493e-1, + .26583214101668429944e-1, .32712713318999268739e-1, + .38576221976287138036e-1, .44033030938268925133e-1, + .49092709529622799673e-1, .53657949874312515646e-1, + .57724533144734311859e-1, .61219564530655179096e-1, + .64138907503837875026e-1, .66427905189318792009e-1, + .68088956652280022887e-1, .69083051391555695878e-1, + .69422738116739271449e-1, .69083051391555695878e-1, + .68088956652280022887e-1, .66427905189318792009e-1, + .64138907503837875026e-1, .61219564530655179096e-1, + .57724533144734311859e-1, .53657949874312515646e-1, + .49092709529622799673e-1, .44033030938268925133e-1, + .38576221976287138036e-1, .32712713318999268739e-1, + .26583214101668429944e-1, .20122785860913684493e-1, + .13600665164323186111e-1, .66419939766331555194e-2, + .69120897476690862600e-3, -.11972090629438798134e-2, + -.11448874821643225573e-1, -.23104401104002905904e-1, + -.33352899418646530133e-1, -.42538626424075425908e-1, + -.49969730733911825941e-1, -.55555454015360728353e-1, + -.58955533624852604918e-1, -.60126044219122513907e-1, + -.58959430451175833624e-1, -.55546925396227130606e-1, + -.49984739749347973762e-1, -.42513009141170294365e-1, + -.33399140950669746346e-1, -.23007690803851790829e-1, + -.11728275717520066169e-1, 0.0, .11728275717520066169e-1, + .23007690803851790829e-1, .33399140950669746346e-1, + .42513009141170294365e-1, .49984739749347973762e-1, + .55546925396227130606e-1, .58959430451175833624e-1, + .60126044219122513907e-1, .58955533624852604918e-1, + .55555454015360728353e-1, .49969730733911825941e-1, + .42538626424075425908e-1, .33352899418646530133e-1, + .23104401104002905904e-1, .11448874821643225573e-1, + .11972090629438798134e-2, .15501585012936019146e-2, + .14628781502199620482e-1, .28684915921474815271e-1, + .39299396074628048026e-1, .46393418975496284204e-1, + .48756902531094699526e-1, .46331333488337494692e-1, + .39012645376980228775e-1, .27452795421085791153e-1, + .12430953621169863781e-1, -.47682978056024928800e-2, + -.22825828045428973853e-1, + -.40195512090720278312e-1, -.55503004262826221955e-1, + -.67424537752827046308e-1, -.75020199300113606452e-1, + -.77607844312483656131e-1, -.75020199300113606452e-1, + -.67424537752827046308e-1, -.55503004262826221955e-1, + -.40195512090720278312e-1, -.22825828045428973853e-1, + -.47682978056024928800e-2, .12430953621169863781e-1, + .27452795421085791153e-1, .39012645376980228775e-1, + .46331333488337494692e-1, .48756902531094699526e-1, + .46393418975496284204e-1, .39299396074628048026e-1, + .28684915921474815271e-1, .14628781502199620482e-1, + .15501585012936019146e-2, -.18377757558949194214e-2, + -.17050470050949761565e-1, -.31952119564923250836e-1, + -.40197423449026348155e-1, + -.41205649520281371624e-1, -.33909965817492272248e-1, + -.19393664422115332144e-1, .56661049630886784692e-3, + .22948272173686561721e-1, .44489719570904738207e-1, + .61790363672287920596e-1, .72121014727028013894e-1, + .73627151185287858579e-1, .65784665375961398923e-1, + .49369676372333667559e-1, .26444326317059715065e-1, 0.0, + -.26444326317059715065e-1, -.49369676372333667559e-1, + -.65784665375961398923e-1, -.73627151185287858579e-1, + -.72121014727028013894e-1, -.61790363672287920596e-1, + -.44489719570904738207e-1, -.22948272173686561721e-1, + -.56661049630886784692e-3, .19393664422115332144e-1, + .33909965817492272248e-1, .41205649520281371624e-1, + .40197423449026348155e-1, .31952119564923250836e-1, + .17050470050949761565e-1, .18377757558949194214e-2, + .20942714740729767769e-2, .18935902405146518232e-1, + .33335840852491735126e-1, .36770680999102286065e-1, + .28873194534132768509e-1, .10267303017729535513e-1, + -.14607738306201572890e-1, -.40139568545572305818e-1, + -.59808326733858291561e-1, -.68528358823372627506e-1, + -.63306535387619244879e-1, -.44508601817574921056e-1, + -.15449116105605395357e-1, .17941083795006546367e-1, + .48747356011657242123e-1, .70329553984201665523e-1, + .78106117292526169663e-1, .70329553984201665523e-1, + .48747356011657242123e-1, .17941083795006546367e-1, + -.15449116105605395357e-1, -.44508601817574921056e-1, + -.63306535387619244879e-1, -.68528358823372627506e-1, + -.59808326733858291561e-1, + -.40139568545572305818e-1, -.14607738306201572890e-1, + .10267303017729535513e-1, .28873194534132768509e-1, + .36770680999102286065e-1, .33335840852491735126e-1, + .18935902405146518232e-1, .20942714740729767769e-2, + -.23245285491878278419e-2, -.20401404737639389919e-1, + -.33019548231022514097e-1, -.29709828426463720091e-1, + -.11760070922697422156e-1, .15987584743850393793e-1, + .43619012891472813485e-1, .61177322409671487721e-1, + .61144030218486655594e-1, + .41895377620089086167e-1, .80232011820644308033e-2, + -.30574701186675900915e-1, + -.62072243008844865848e-1, -.76336186183574765586e-1, + -.68435466095345537115e-1, -.40237669208466966207e-1, 0.0, + .40237669208466966207e-1, .68435466095345537115e-1, + .76336186183574765586e-1, .62072243008844865848e-1, + .30574701186675900915e-1, -.80232011820644308033e-2, + -.41895377620089086167e-1, -.61144030218486655594e-1, + -.61177322409671487721e-1, -.43619012891472813485e-1, + -.15987584743850393793e-1, .11760070922697422156e-1, + .29709828426463720091e-1, .33019548231022514097e-1, + .20401404737639389919e-1, .23245285491878278419e-2, + .25451717261579269307e-2, .21480418595666878775e-1, + .31177212469293007998e-1, .19816333607013379373e-1, + -.72439496274458793681e-2, -.38404203906598342397e-1, + -.57633632255322221046e-1, -.54070547403585392952e-1, + -.26249823354368866005e-1, .15643058212336881516e-1, + .54539832735118677194e-1, .73283028002473989724e-1, + .62835303524135936213e-1, .26175977027801048141e-1, + -.22193636309998606610e-1, -.62597049956093311234e-1, + -.78206986173170212505e-1, -.62597049956093311234e-1, + -.22193636309998606610e-1, .26175977027801048141e-1, + .62835303524135936213e-1, + .73283028002473989724e-1, .54539832735118677194e-1, + .15643058212336881516e-1, + -.26249823354368866005e-1, -.54070547403585392952e-1, + -.57633632255322221046e-1, -.38404203906598342397e-1, + -.72439496274458793681e-2, .19816333607013379373e-1, + .31177212469293007998e-1, .21480418595666878775e-1, + .25451717261579269307e-2, -.27506573922483820005e-2, + -.22224442095099251870e-1, -.27949927254215773020e-1, + -.80918481053370034987e-2, .25121859354449306916e-1, + .51563535009373061074e-1, .51936965107145960512e-1, + .22146626648171527753e-1, + -.24172689882103382748e-1, -.61731229104853568296e-1, + -.68477262429344201201e-1, -.38311232728303704742e-1, + .14160578713659552679e-1, .61248813427564184033e-1, + .77136328841293031805e-1, .52514801765183697988e-1, 0.0, + -.52514801765183697988e-1, -.77136328841293031805e-1, + -.61248813427564184033e-1, -.14160578713659552679e-1, + .38311232728303704742e-1, + .68477262429344201201e-1, .61731229104853568296e-1, + .24172689882103382748e-1, + -.22146626648171527753e-1, -.51936965107145960512e-1, + -.51563535009373061074e-1, -.25121859354449306916e-1, + .80918481053370034987e-2, .27949927254215773020e-1, + .22224442095099251870e-1, .27506573922483820005e-2, + .29562461131654311467e-2, .22630271480554450613e-1, + .23547399831373800971e-1, -.43964593440902476642e-2, + -.39055315767504970597e-1, -.52369643937940066804e-1, + -.28506131614971613422e-1, .19906048093338832322e-1, + .60408880866392420279e-1, .62493397473656883090e-1, + .21391278377641297859e-1, -.37302864786623254746e-1, + -.73665127933539496872e-1, -.61706142476854010202e-1, + -.78065168882546327888e-2, .52335307373945544428e-1, + .78278746279419264777e-1, .52335307373945544428e-1, + -.78065168882546327888e-2, -.61706142476854010202e-1, + -.73665127933539496872e-1, -.37302864786623254746e-1, + .21391278377641297859e-1, .62493397473656883090e-1, + .60408880866392420279e-1, .19906048093338832322e-1, + -.28506131614971613422e-1, -.52369643937940066804e-1, + -.39055315767504970597e-1, -.43964593440902476642e-2, + .23547399831373800971e-1, .22630271480554450613e-1, + .29562461131654311467e-2, -.31515718415504761303e-2, + -.22739451096655080673e-1, -.18157123602272119779e-1, + .16496480897167303621e-1, .46921166788569301124e-1, + .40644395739978416354e-1, -.46275803430732216900e-2, + -.52883375891308909486e-1, -.61116483226324111734e-1, + -.17411698764545629853e-1, .44773430013166822765e-1, + .73441577962383869198e-1, .42127368371995472815e-1, + -.25504645957196772465e-1, -.74126818045972742488e-1, + -.62780077864719287317e-1, 0.0, .62780077864719287317e-1, + .74126818045972742488e-1, .25504645957196772465e-1, + -.42127368371995472815e-1, -.73441577962383869198e-1, + -.44773430013166822765e-1, .17411698764545629853e-1, + .61116483226324111734e-1, .52883375891308909486e-1, + .46275803430732216900e-2, -.40644395739978416354e-1, + -.46921166788569301124e-1, -.16496480897167303621e-1, + .18157123602272119779e-1, .22739451096655080673e-1, + .31515718415504761303e-2, .33536559294882188208e-2, + .22535348942792006185e-1, + .12048629300953560767e-1, -.27166076791299493403e-1, + -.47492745604230978367e-1, -.19246623430993153174e-1, + .36231297307556299322e-1, .61713617181636122004e-1, + .25928029734266134490e-1, -.40478700752883602818e-1, + -.71053889866326412049e-1, -.31870824482961751482e-1, + .41515251100219081281e-1, .76481960760098381651e-1, + .36726509155999912440e-1, -.40090067032627055969e-1, + -.78270742903374539397e-1, -.40090067032627055969e-1, + .36726509155999912440e-1, .76481960760098381651e-1, + .41515251100219081281e-1, -.31870824482961751482e-1, + -.71053889866326412049e-1, -.40478700752883602818e-1, + .25928029734266134490e-1, .61713617181636122004e-1, + .36231297307556299322e-1, -.19246623430993153174e-1, + -.47492745604230978367e-1, -.27166076791299493403e-1, + .12048629300953560767e-1, .22535348942792006185e-1, + .33536559294882188208e-2, + -.35481220456925318865e-2, -.22062913693073191150e-1, + -.54487362861834144999e-2, .35438821865804087489e-1, + .40733077820527411302e-1, -.67403098138950720914e-2, + -.55559584405239171054e-1, -.42417050790865158745e-1, + .24499901971884704925e-1, .68721232891705409302e-1, + .34086082787461126592e-1, -.43441000373118474002e-1, + -.73878085292669148950e-1, -.18846995664706657127e-1, + .59827776178286834498e-1, .70644634584085901794e-1, 0.0, + -.70644634584085901794e-1, -.59827776178286834498e-1, + .18846995664706657127e-1, .73878085292669148950e-1, + .43441000373118474002e-1, -.34086082787461126592e-1, + -.68721232891705409302e-1, -.24499901971884704925e-1, + .42417050790865158745e-1, .55559584405239171054e-1, + .67403098138950720914e-2, -.40733077820527411302e-1, + -.35438821865804087489e-1, .54487362861834144999e-2, + .22062913693073191150e-1, .35481220456925318865e-2, + .37554176816665075631e-2, .21297045781589919482e-1, + -.13327293083183431816e-2, + -.40635299172764596484e-1, -.27659860508374175359e-1, + .31089232744083445986e-1, .56113781541334176109e-1, + .37577840643257763400e-2, -.60511227350664590865e-1, + -.46670556446129053853e-1, .33263195878575888247e-1, + .72757324720645228775e-1, .15011712351692283635e-1, + -.65601212994924119078e-1, -.60016855838843789772e-1, + .26220858553188665966e-1, .78322776605833552980e-1, + .26220858553188665966e-1, -.60016855838843789772e-1, + -.65601212994924119078e-1, + .15011712351692283635e-1, .72757324720645228775e-1, + .33263195878575888247e-1, + -.46670556446129053853e-1, -.60511227350664590865e-1, + .37577840643257763400e-2, .56113781541334176109e-1, + .31089232744083445986e-1, -.27659860508374175359e-1, + -.40635299172764596484e-1, -.13327293083183431816e-2, + .21297045781589919482e-1, .37554176816665075631e-2, + -.39566995305720591229e-2, -.20291873414438919995e-1, + .80617453830770930551e-2, .42270189157016547906e-1, + .10332624526759093004e-1, -.48054759547616142024e-1, + -.37678032941171643972e-1, + .36617192625732482394e-1, .61009425973424865714e-1, + -.95589113168026591466e-2, + -.71023202645076922361e-1, -.25097788086808784456e-1, + .62406621963267050244e-1, .56907293171100693511e-1, + -.36435383083882206257e-1, -.75790105119208756348e-1, 0.0, + .75790105119208756348e-1, .36435383083882206257e-1, + -.56907293171100693511e-1, -.62406621963267050244e-1, + .25097788086808784456e-1, .71023202645076922361e-1, + .95589113168026591466e-2, + -.61009425973424865714e-1, -.36617192625732482394e-1, + .37678032941171643972e-1, .48054759547616142024e-1, + -.10332624526759093004e-1, -.42270189157016547906e-1, + -.80617453830770930551e-2, .20291873414438919995e-1, + .39566995305720591229e-2, .41776092289182138591e-2, + .19013221163904414395e-1, -.14420609729849899876e-1, + -.40259160586844441220e-1, .86327811113710831649e-2, + .53564430703021034399e-1, .65469185402150431933e-2, + -.60383116311280629856e-1, + -.25657793784058876939e-1, .58745680576829226900e-1, + .45649937869034420296e-1, + -.49167932056844167772e-1, -.62696614328552187977e-1, + .32540234556426699997e-1, .74280410383464269758e-1, + -.11425672633410999870e-1, -.78280649404686404903e-1, + -.11425672633410999870e-1, .74280410383464269758e-1, + .32540234556426699997e-1, -.62696614328552187977e-1, + -.49167932056844167772e-1, .45649937869034420296e-1, + .58745680576829226900e-1, -.25657793784058876939e-1, + -.60383116311280629856e-1, .65469185402150431933e-2, + .53564430703021034399e-1, + .86327811113710831649e-2, -.40259160586844441220e-1, + -.14420609729849899876e-1, .19013221163904414395e-1, + .41776092289182138591e-2, -.43935502082478059199e-2, + -.17528761237509401631e-1, .20208915249153872535e-1, + .34734743119040669109e-1, -.26275910172353637955e-1, + -.46368003346018878786e-1, + .26800056330709381025e-1, .56681476464606609921e-1, + -.24749011438127255898e-1, + -.64934612189056658992e-1, .20333742247679279535e-1, + .71429299070059318651e-1, + -.14452513210428671266e-1, -.75793341281736586582e-1, + .74717094137184935270e-2, .78034921554757317374e-1, 0.0, + -.78034921554757317374e-1, -.74717094137184935270e-2, + .75793341281736586582e-1, .14452513210428671266e-1, + -.71429299070059318651e-1, -.20333742247679279535e-1, + .64934612189056658992e-1, .24749011438127255898e-1, + -.56681476464606609921e-1, + -.26800056330709381025e-1, .46368003346018878786e-1, + .26275910172353637955e-1, + -.34734743119040669109e-1, -.20208915249153872535e-1, + .17528761237509401631e-1, .43935502082478059199e-2, + .46379089482818671473e-2, .15791188144791287229e-1, + -.25134290048737455284e-1, -.26249795071946841205e-1, + .39960457575789924651e-1, .28111892450146525404e-1, + -.51026476400767918226e-1, + -.27266747278681831364e-1, .60708796647861610865e-1, + .23532306960642115854e-1, + -.68169639871532441111e-1, -.18204924701958312032e-1, + .73822890510656128485e-1, .11373392486424717019e-1, + -.77133324017644609416e-1, -.39295877480342619961e-2, + .78351902829418987960e-1, -.39295877480342619961e-2, + -.77133324017644609416e-1, .11373392486424717019e-1, + .73822890510656128485e-1, -.18204924701958312032e-1, + -.68169639871532441111e-1, .23532306960642115854e-1, + .60708796647861610865e-1, -.27266747278681831364e-1, + -.51026476400767918226e-1, .28111892450146525404e-1, + .39960457575789924651e-1, -.26249795071946841205e-1, + -.25134290048737455284e-1, .15791188144791287229e-1, + .46379089482818671473e-2, -.48780095920069827068e-2, + -.13886961667516983541e-1, .29071311049368895844e-1, + .15480559452075811600e-1, -.47527977686242313065e-1, + -.31929089844361042178e-2, .58015667638415922967e-1, + -.14547915466597622925e-1, -.61067668299848923244e-1, + .35093678009090186851e-1, .55378399159800654657e-1, + -.54277226474891610385e-1, -.42023830782434076509e-1, + .69197384645944912066e-1, .22610783557709586445e-1, + -.77269275900637030185e-1, 0.0, .77269275900637030185e-1, + -.22610783557709586445e-1, + -.69197384645944912066e-1, .42023830782434076509e-1, + .54277226474891610385e-1, + -.55378399159800654657e-1, -.35093678009090186851e-1, + .61067668299848923244e-1, .14547915466597622925e-1, + -.58015667638415922967e-1, .31929089844361042178e-2, + .47527977686242313065e-1, -.15480559452075811600e-1, + -.29071311049368895844e-1, .13886961667516983541e-1, + .48780095920069827068e-2, .51591759101720291381e-2, + .11747497650231330965e-1, -.31777863364694653331e-1, + -.34555825499804605557e-2, .47914131921157015198e-1, + -.22573685920142225247e-1, -.45320344390022666738e-1, + .49660630547172186418e-1, .25707858143963615736e-1, + -.68132707341917233933e-1, .67534860185243140399e-2, + .69268150370037450063e-1, -.41585011920451477177e-1, + -.51622397460510041271e-1, .68408139576363036148e-1, + .18981259024768933323e-1, -.78265472429342305554e-1, + .18981259024768933323e-1, .68408139576363036148e-1, + -.51622397460510041271e-1, + -.41585011920451477177e-1, .69268150370037450063e-1, + .67534860185243140399e-2, + -.68132707341917233933e-1, .25707858143963615736e-1, + .49660630547172186418e-1, + -.45320344390022666738e-1, -.22573685920142225247e-1, + .47914131921157015198e-1, -.34555825499804605557e-2, + -.31777863364694653331e-1, .11747497650231330965e-1, + .51591759101720291381e-2, -.54365757412741340377e-2, + -.94862516619529080191e-2, .33240472093448190877e-1, + -.88698898099681552229e-2, + -.40973252097216337576e-1, .42995673349795657065e-1, + .17320914507876958783e-1, + -.62201292691914856803e-1, .24726274174637346693e-1, + .51320859246515407288e-1, + -.62882063373810501763e-1, -.11003569131725622672e-1, + .73842261324108943465e-1, -.39240120294802923208e-1, + -.49293966443941122807e-1, .73552644778818223475e-1, 0.0, + -.73552644778818223475e-1, .49293966443941122807e-1, + .39240120294802923208e-1, -.73842261324108943465e-1, + .11003569131725622672e-1, .62882063373810501763e-1, + -.51320859246515407288e-1, + -.24726274174637346693e-1, .62201292691914856803e-1, + -.17320914507876958783e-1, -.42995673349795657065e-1, + .40973252097216337576e-1, .88698898099681552229e-2, + -.33240472093448190877e-1, .94862516619529080191e-2, + .54365757412741340377e-2, .57750194549356126240e-2, + .69981166020044116791e-2, -.33274982140403110792e-1, + .20297071020698356116e-1, .27898517839646066582e-1, + -.53368678853282030262e-1, .16656482990394548343e-1, + .46342901447260614255e-1, + -.60536796508149003365e-1, .29109107483842596340e-2, + .63224486124385124504e-1, + -.59028872851312033411e-1, -.14783105962696191734e-1, + .74269399241069253865e-1, -.49053677339382384625e-1, + -.33525466624811186739e-1, .78397349622515386647e-1, + -.33525466624811186739e-1, -.49053677339382384625e-1, + .74269399241069253865e-1, -.14783105962696191734e-1, + -.59028872851312033411e-1, + .63224486124385124504e-1, .29109107483842596340e-2, + -.60536796508149003365e-1, + .46342901447260614255e-1, .16656482990394548343e-1, + -.53368678853282030262e-1, + .27898517839646066582e-1, .20297071020698356116e-1, + -.33274982140403110792e-1, + .69981166020044116791e-2, .57750194549356126240e-2, + -.61100308370519200637e-2, -.44383614355738148616e-2, + .32011283412619094811e-1, -.29965011866372897633e-1, + -.10560682331349193348e-1, .51110336443392506342e-1, + -.45012284729681775492e-1, -.94236825555873320102e-2, + .60860695783141264746e-1, + -.55014628647083368926e-1, -.73474782382499482121e-2, + .66640148475243034781e-1, -.62533116045749887988e-1, + -.38650525912400102585e-2, .68429769005837003777e-1, + -.66984505412544901945e-1, 0.0, .66984505412544901945e-1, + -.68429769005837003777e-1, .38650525912400102585e-2, + .62533116045749887988e-1, -.66640148475243034781e-1, + .73474782382499482121e-2, + .55014628647083368926e-1, -.60860695783141264746e-1, + .94236825555873320102e-2, + .45012284729681775492e-1, -.51110336443392506342e-1, + .10560682331349193348e-1, + .29965011866372897633e-1, -.32011283412619094811e-1, + .44383614355738148616e-2, + .61100308370519200637e-2, .65409373892036191538e-2, + .16350101107071157065e-2, -.29301957285983144319e-1, + .36838667173388832579e-1, -.81922703976491586393e-2, + -.36955670021050133434e-1, .58374851095540469865e-1, + -.31977016246946181856e-1, -.25311073698658094646e-1, + .66674413950106952577e-1, + -.54865713324521039571e-1, -.39797027891537985440e-2, + .62830285264808449064e-1, -.72226313251296100676e-1, + .22560232697133353980e-1, .46455784709904033738e-1, + -.78200930751070349956e-1, .46455784709904033738e-1, + .22560232697133353980e-1, -.72226313251296100676e-1, + .62830285264808449064e-1, -.39797027891537985440e-2, + -.54865713324521039571e-1, .66674413950106952577e-1, + -.25311073698658094646e-1, -.31977016246946181856e-1, + .58374851095540469865e-1, -.36955670021050133434e-1, + -.81922703976491586393e-2, .36838667173388832579e-1, + -.29301957285983144319e-1, .16350101107071157065e-2, + .65409373892036191538e-2, -.69686180931868703196e-2, + .11849538727632789870e-2, .25452286414610537766e-1, + -.40522480651713943230e-1, .25694679053362813183e-1, + .14057118113748390637e-1, -.52037614725803488893e-1, + .58849342223684035589e-1, + -.25075229077361409271e-1, -.29559771094034181083e-1, + .68296746944165720199e-1, -.62890462146423984955e-1, + .14457636466274596445e-1, .45787612031322361496e-1, + -.77231759014655809742e-1, .57881203613910543657e-1, 0.0, + -.57881203613910543657e-1, .77231759014655809742e-1, + -.45787612031322361496e-1, -.14457636466274596445e-1, + .62890462146423984955e-1, + -.68296746944165720199e-1, .29559771094034181083e-1, + .25075229077361409271e-1, + -.58849342223684035589e-1, .52037614725803488893e-1, + -.14057118113748390637e-1, -.25694679053362813183e-1, + .40522480651713943230e-1, -.25452286414610537766e-1, + -.11849538727632789870e-2, .69686180931868703196e-2, + .75611653617520254845e-2, -.43290610418608409141e-2, + -.20277062025115566914e-1, + .40362947027704828926e-1, -.38938808024132120254e-1, + .11831186195916702262e-1, + .28476667401744525357e-1, -.59320969056617684621e-1, + .61101629747436200186e-1, + -.29514834848355389223e-1, -.20668001885001084821e-1, + .62923592802445122793e-1, -.73558456263588833115e-1, + .45314556330160999776e-1, .79031645918426015574e-2, + -.58136953576334689357e-1, .78538474524006405758e-1, + -.58136953576334689357e-1, .79031645918426015574e-2, + .45314556330160999776e-1, -.73558456263588833115e-1, + .62923592802445122793e-1, -.20668001885001084821e-1, + -.29514834848355389223e-1, .61101629747436200186e-1, + -.59320969056617684621e-1, .28476667401744525357e-1, + .11831186195916702262e-1, -.38938808024132120254e-1, + .40362947027704828926e-1, -.20277062025115566914e-1, + -.43290610418608409141e-2, .75611653617520254845e-2, + -.81505692478987769484e-2, .74297333588288568430e-2, + .14314212513540223314e-1, -.36711242251332751607e-1, + .46240027755503814626e-1, -.34921532671769023773e-1, + .46930051972353714773e-2, + .32842770336385381562e-1, -.61317813706529588466e-1, + .67000809902468893103e-1, + -.45337449655535622885e-1, .35794459576271920867e-2, + .41830061526027213385e-1, + -.72091371931944711708e-1, .74150028530317793195e-1, + -.46487632538609942002e-1, 0.0, .46487632538609942002e-1, + -.74150028530317793195e-1, .72091371931944711708e-1, + -.41830061526027213385e-1, -.35794459576271920867e-2, + .45337449655535622885e-1, -.67000809902468893103e-1, + .61317813706529588466e-1, -.32842770336385381562e-1, + -.46930051972353714773e-2, .34921532671769023773e-1, + -.46240027755503814626e-1, .36711242251332751607e-1, + -.14314212513540223314e-1, -.74297333588288568430e-2, + .81505692478987769484e-2, .90693182942442189743e-2, + -.11121000903959576737e-1, -.71308296141317458546e-2, + .29219439765986671645e-1, -.45820286629778129593e-1, + .49088381175879124421e-1, -.35614888785023038938e-1, + .78906970900092777895e-2, + .26262843038404929480e-1, -.56143674270125757857e-1, + .71700220472378350694e-1, + -.66963544500697307945e-1, .42215091779892228883e-1, + -.41338867413966866997e-2, -.36164891772995367321e-1, + .66584367783847858225e-1, -.77874712365070098328e-1, + .66584367783847858225e-1, -.36164891772995367321e-1, + -.41338867413966866997e-2, .42215091779892228883e-1, + -.66963544500697307945e-1, + .71700220472378350694e-1, -.56143674270125757857e-1, + .26262843038404929480e-1, + .78906970900092777895e-2, -.35614888785023038938e-1, + .49088381175879124421e-1, + -.45820286629778129593e-1, .29219439765986671645e-1, + -.71308296141317458546e-2, -.11121000903959576737e-1, + .90693182942442189743e-2, -.99848472706332791043e-2, + .14701271465939718856e-1, -.32917820356048383366e-3, + -.19201195309873585230e-1, .38409681836626963278e-1, + -.51647324405878909521e-1, .54522171113149311354e-1, + -.45040302741689006270e-1, .24183738595685990149e-1, + .42204134165479735097e-2, -.34317295181348742251e-1, + .59542472465494579941e-1, -.74135115907618101263e-1, + .74491937840566532596e-1, -.60042604725161994304e-1, + .33437677409000083169e-1, 0.0, + -.33437677409000083169e-1, .60042604725161994304e-1, + -.74491937840566532596e-1, .74135115907618101263e-1, + -.59542472465494579941e-1, .34317295181348742251e-1, + -.42204134165479735097e-2, -.24183738595685990149e-1, + .45040302741689006270e-1, -.54522171113149311354e-1, + .51647324405878909521e-1, -.38409681836626963278e-1, + .19201195309873585230e-1, .32917820356048383366e-3, + -.14701271465939718856e-1, .99848472706332791043e-2, + .11775579274769383373e-1, -.19892153937316935880e-1, + .95335114477449041055e-2, .57661528440359081617e-2, + -.23382690532380910781e-1, .40237257037170725321e-1, + -.53280289903551636474e-1, .59974361806023689068e-1, + -.58701684061992853224e-1, .49033407111597129616e-1, + -.31818835267847249219e-1, .90800541261162098886e-2, + .16272906819312603838e-1, -.40863896581186229487e-1, + .61346046297517367703e-1, + -.74896047554167268919e-1, .79632642148310325817e-1, + -.74896047554167268919e-1, .61346046297517367703e-1, + -.40863896581186229487e-1, .16272906819312603838e-1, + .90800541261162098886e-2, -.31818835267847249219e-1, + .49033407111597129616e-1, -.58701684061992853224e-1, + .59974361806023689068e-1, -.53280289903551636474e-1, + .40237257037170725321e-1, -.23382690532380910781e-1, + .57661528440359081617e-2, .95335114477449041055e-2, + -.19892153937316935880e-1, + .11775579274769383373e-1, -.13562702617218467450e-1, + .24885419969649845849e-1, -.18368693901908875583e-1, + .81673147806084084638e-2, .47890591326129587131e-2, + -.19313752945227974024e-1, .34065953398362954708e-1, + -.47667045133463415672e-1, .58820377816690514309e-1, + -.66424139824618415970e-1, + .69667606260856092515e-1, -.68102459384364543253e-1, + .61683024923302547971e-1, + -.50771943476441639136e-1, .36110771847327189215e-1, + -.18758028464284563358e-1, 0.0, .18758028464284563358e-1, + -.36110771847327189215e-1, .50771943476441639136e-1, + -.61683024923302547971e-1, .68102459384364543253e-1, + -.69667606260856092515e-1, .66424139824618415970e-1, + -.58820377816690514309e-1, .47667045133463415672e-1, + -.34065953398362954708e-1, .19313752945227974024e-1, + -.47890591326129587131e-2, -.81673147806084084638e-2, + .18368693901908875583e-1, -.24885419969649845849e-1, + .13562702617218467450e-1, .20576545037980523979e-1, + -.40093155172981004337e-1, .36954083167944054826e-1, + -.31856506837591907746e-1, .24996323181546255126e-1, + -.16637165210473614136e-1, .71002706773325085237e-2, + .32478629093205201133e-2, + -.14009562579050569518e-1, .24771262248780618922e-1, + -.35119395835433647559e-1, .44656290368574753171e-1, + -.53015448339647394161e-1, .59875631995693046782e-1, + -.64973208326045193862e-1, .68112280331082143373e-1, + -.69172215234062186994e-1, .68112280331082143373e-1, + -.64973208326045193862e-1, .59875631995693046782e-1, + -.53015448339647394161e-1, .44656290368574753171e-1, + -.35119395835433647559e-1, .24771262248780618922e-1, + -.14009562579050569518e-1, .32478629093205201133e-2, + .71002706773325085237e-2, -.16637165210473614136e-1, + .24996323181546255126e-1, -.31856506837591907746e-1, + .36954083167944054826e-1, -.40093155172981004337e-1, + .20576545037980523979e-1, -.27584914609096156163e-1, + .54904171411058497973e-1, -.54109756419563083153e-1, + .52794234894345577483e-1, -.50970276026831042415e-1, + .48655445537990983379e-1, + -.45872036510847994332e-1, .42646854695899611372e-1, + -.39010960357087507670e-1, .34999369144476467749e-1, + -.30650714874402762189e-1, .26006877464703437057e-1, + -.21112579608213651273e-1, .16014956068786763273e-1, + -.10763099747751940252e-1, .54075888924374485533e-2, 0.0, + -.54075888924374485533e-2, .10763099747751940252e-1, + -.16014956068786763273e-1, + .21112579608213651273e-1, -.26006877464703437057e-1, + .30650714874402762189e-1, + -.34999369144476467749e-1, .39010960357087507670e-1, + -.42646854695899611372e-1, .45872036510847994332e-1, + -.48655445537990983379e-1, .50970276026831042415e-1, + -.52794234894345577483e-1, .54109756419563083153e-1, + -.54904171411058497973e-1, .27584914609096156163e-1, + .13794141262469565740e-1, -.27588282524939131481e-1, + .27588282524939131481e-1, -.27588282524939131481e-1, + .27588282524939131481e-1, -.27588282524939131481e-1, + .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .27588282524939131481e-1, + -.27588282524939131481e-1, .13794141262469565740e-1 +}; + +static const double Tleft[33 * 33] = { + 1., -.86602540378443864678, 0., .33071891388307382381, 0., + -.20728904939721249057, 0., .15128841196122722208, 0., + -.11918864298744029244, 0., .98352013661686631224e-1, 0., + -.83727065404940845733e-1, 0., .72893399403505841203e-1, 0., + -.64544632643375022436e-1, 0., .57913170372415565639e-1, 0., + -.52518242575729562263e-1, 0., .48043311993977520457e-1, 0., + -.44271433659733990243e-1, 0., .41048928022856771981e-1, 0., + -.38263878662008271459e-1, 0., .35832844026365304501e-1, 0., 0., + .50000000000000000000, -.96824583655185422130, .57282196186948000082, + .21650635094610966169, -.35903516540862679125, -.97578093724974971969e-1, + .26203921611325660506, .55792409597991015609e-1, -.20644078533943456204, + -.36172381205961199479e-1, .17035068468874958194, + .25371838001497225980e-1, -.14501953125000000000, + -.18786835250972344757e-1, .12625507130328301066, + .14473795929590520582e-1, -.11179458309419422675, + -.11494434254897626155e-1, .10030855351241635862, + .93498556820544479096e-2, -.90964264465390582629e-1, + -.77546391824364392762e-2, .83213457337452292745e-1, + .65358085945588638605e-2, -.76680372422574234569e-1, + -.55835321940047427169e-2, .71098828931825789428e-1, + .48253327982967591019e-2, -.66274981937248958553e-1, + -.42118078245337801387e-2, .62064306433355646267e-1, + .37083386598903548973e-2, 0., 0., .25000000000000000000, + -.73950997288745200531, .83852549156242113615, -.23175620272173946716, + -.37791833195149451496, .25710129174850522325, .21608307321780204633, + -.22844049245646009157, -.14009503000335388415, .19897685605518413847, + .98264706042471226893e-1, -.17445445004279014046, + -.72761100054958328401e-1, .15463589893742108388, + .56056770591708784481e-1, -.13855313872640495158, + -.44517752443294564781e-1, .12534277657695128850, + .36211835346039665762e-1, -.11434398255136139683, + -.30033588409423828125e-1, .10506705408753910481, + .25313077840725783008e-1, -.97149327637744872155e-1, + -.21624927200393328444e-1, .90319582367202122625e-1, + .18688433567711780666e-1, -.84372291635345108584e-1, + -.16312261561845420752e-1, .79149526894804751586e-1, + .14362333871852474757e-1, 0., 0., 0., .12500000000000000000, + -.49607837082461073572, .82265291131801144317, -.59621200088559103072, + -.80054302859059362371e-1, .42612156697795759420, + -.90098145270865592887e-1, -.29769623255090078484, .13630307904779758221, + .21638835185708931831, -.14600247270306082052, -.16348801804014290453, + .14340708728599057249, .12755243353979286190, -.13661523715071346961, + -.10215585947881057394, .12864248070157166547, .83592528025348693602e-1, + -.12066728689302565222, -.69633728678718053052e-1, .11314245177331919532, + .58882939251410088028e-1, -.10621835858758221487, + -.50432266865187597572e-1, .99916834723527771581e-1, + .43672094283057258509e-1, -.94206380251950852413e-1, + -.38181356812697746418e-1, .89035739656537771225e-1, + .33661934598216332678e-1, 0., 0., 0., 0., .62500000000000000000e-1, + -.31093357409581873586, .67604086414949799246, -.75644205980613611039, + .28990586430124175741, .30648508196770360914, -.35801372616842500052, + -.91326869828709014708e-1, .31127929687500000000, + -.90915752838698393094e-2, -.25637381283965534330, + .57601077850322797594e-1, .21019685709225757945, + -.81244992138514014256e-1, -.17375078516720988858, + .92289437277967051125e-1, .14527351914265391374, + -.96675340792832019889e-1, -.12289485697108543415, + .97448175340011084006e-1, .10511755943298339844, + -.96242247086378239657e-1, -.90822942272780513537e-1, + .93966350452322132384e-1, .79189411876493712558e-1, + -.91139307067989309325e-1, -.69613039934383197265e-1, + .88062491671135767870e-1, .61646331729340817494e-1, 0., 0., 0., 0., 0., + .31250000000000000000e-1, -.18684782411095934408, .50176689760410660236, + -.74784031498626095398, .56472001151566251186, .14842464993721351203e-1, + -.41162920273003120936, .20243071230196532282, .23772054897172750436, + -.24963810923972235950, -.12116179938394678936, .24330535483519110663, + .47903849781124471359e-1, -.22133299683101224293, + -.20542915138527200983e-2, .19653465717678146728, + -.26818172626509178444e-1, -.17319122357631210944, + .45065391411065545445e-1, .15253391395444065941, + -.56543897711725408302e-1, -.13469154928743585367, + .63632471400208840155e-1, .11941684923913523817, + -.67828850207933293098e-1, -.10636309084510652670, + .70095786922999181504e-1, .95187373095150709082e-1, 0., 0., 0., 0., 0., + 0., .15625000000000000000e-1, -.10909562534194485289, + .34842348626527747318, -.64461114561628111443, .69382480527334683659, + -.29551102358528827763, -.25527584713978439819, .38878771718544715394, + -.82956185835347407489e-2, -.31183177761966943912, .12831420840372374767, + .22067618205599434368, -.17569196937129496961, -.14598057000132284135, + .18864406621763419484, .89921002550386645767e-1, -.18571835020187122114, + -.48967672227195481777e-1, .17584685670380332798, + .19267984545067426324e-1, -.16335437520503462738, + .22598055455032407594e-2, .15032800884170631129, + -.17883358353754640871e-1, -.13774837869432209951, + .29227555960587143675e-1, .12604194747513151053, 0., 0., 0., 0., 0., 0., + 0., .78125000000000000000e-2, -.62377810244809812496e-1, + .23080781467370883845, -.50841310636012325368, .69834547012574056043, + -.52572723156526459672, .11464215704954976471e-1, .38698869011491210342, + -.26125646622255207507, -.16951698812361607510, .29773875898928782269, + .20130501202570367491e-1, -.26332493149159310198, + .67734613690401207009e-1, .21207315477103762715, -.11541543390889415193, + -.16249634759782417533, .13885887405041735068, .11996491328010275427, + -.14810432001630926895, -.85177658352556243411e-1, .14918860659904380587, + .57317789510444151564e-1, -.14569827645586660151, + -.35213090145965327390e-1, .13975998126844578198, 0., 0., 0., 0., 0., 0., + 0., 0., .39062500000000000000e-2, -.35101954600803571207e-1, + .14761284084133737720, -.37655033076080192966, .62410290231517322776, + -.64335622317683389875, .28188168266139524244, .22488495672137010675, + -.39393811089283576186, .75184777995770096714e-1, .28472023119398293003, + -.20410910833705899572, -.15590046962908511750, .23814567544617953125, + .54442805556829031204e-1, -.22855930338589720954, + .16303223615756629897e-1, .20172722433875559213, + -.62723406421217419404e-1, -.17012230831020922010, + .91754642766136561612e-1, .13927644821381121197, -.10886600968068418181, + -.11139075654373395292, .11797455976331702879, 0., 0., 0., 0., 0., 0., 0., + 0., 0., .19531250000000000000e-2, -.19506820659607596598e-1, + .91865676095362231937e-1, -.26604607809696493849, .51425874205091288223, + -.66047561132505329292, .48660109511591303851, -.17575661168678285615e-1, + -.36594333408055703366, .29088854695378694533, .11318677346656537927, + -.31110645235730182168, .60733219161008787341e-1, .24333848233620420826, + -.15254312332655419708, -.15995968483455388613, .19010344455215289289, + .86040636766440260000e-1, -.19652589954665259945, + -.27633388517205837713e-1, .18660848552712880387, + -.15942583868416775867e-1, -.16902042462382064786, + .47278526495327740646e-1, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .97656250000000000000e-3, -.10731084460857378207e-1, + .55939644713816406331e-1, -.18118487371914493668, .39914857299829864263, + -.60812322949933902435, .60011887183061967583, -.26002695805835928795, + -.20883922404786010096, .38988130966114638081, -.11797833550782589082, + -.25231824756239520077, .24817859972953934712, .90516417677868996417e-1, + -.26079073291293066798, .30259468817169480161e-1, .22178195264114178432, + -.10569877864302048175, -.16679648389266977455, .14637718550245050850, + .11219272032739559870, -.16359363640525750353, -.64358194509092101393e-1, + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .48828125000000000000e-3, + -.58542865274813470967e-2, .33461741635290096452e-1, + -.11979993155896201271, .29580223766987206958, -.51874761979436016742, + .62861483498014306968, -.44868895761051453296, .12567502628371529386e-1, + .35040366183235474275, -.30466868455569500886, -.70903913601490112666e-1, + .30822791893032512740, -.11969443264190207736, -.20764760317621313946, + .20629838355452128532, .95269702915334718507e-1, -.22432624768705133300, + -.33103381593477797101e-2, .20570036048155716333, + -.62208282720094518964e-1, -.17095309330441436348, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., .24414062500000000000e-3, + -.31714797501871532475e-2, .19721062526127334100e-1, + -.77311181185536498246e-1, .21124871792841566575, -.41777980401893650886, + .59401977834943551650, -.56132417807488349048, .23433675061367565951, + .20222775295220942126, -.38280372496506190127, .14443804214023095767, + .22268950939178466797, -.27211314150777981984, -.34184876506180717313e-1, + .26006498895669734842, -.97650425186005090107e-1, -.19024527660129101293, + .16789164198044635671, .10875811641651905252, -.19276785058805921298, 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .12207031250000000000e-3, + -.17078941137247586143e-2, .11477733754843910060e-1, + -.48887017020924625462e-1, .14634927241421789683, -.32156282683019547854, + .52165811920227223937, -.60001958466396926460, .41208501541480733755, + -.11366945503190350975e-2, -.33968093962672089159, .30955190935923386766, + .40657421856578262210e-1, -.29873400409871531764, .16094481791768257440, + .16876122436206497694, -.23650217045022161255, -.33070260090574765012e-1, + .22985258456375907796, -.68645651043827097771e-1, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .61035156250000000000e-4, + -.91501857608428649078e-3, .66085179496951987952e-2, + -.30383171695850355404e-1, .98840838845366876117e-1, + -.23855447246420318989, .43322017468145613917, -.58049033744876107191, + .52533893203742699346, -.20681056202371946180, -.20180000924562504384, + .37503922291962681797, -.15988102869837429062, -.19823558102762374094, + .28393023878803799622, -.11188133439357510403e-1, -.24730368377168229255, + .14731529061377942839, .14878558042884266021, 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .30517578125000000000e-4, + -.48804277318479845551e-3, .37696080990601968396e-2, + -.18603912108994738255e-1, .65325006755649582964e-1, + -.17162960707938819795, .34411527956476971322, -.52289350347082497959, + .57319653625674910592, -.37662253421045430413, -.14099055105384663902e-1, + .33265570610216904208, -.30921265572647566661, -.19911390594166455281e-1, + .28738590811031797718, -.18912130469738472647, -.13235936203215819193, + .25076406142356675279, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., .15258789062500000000e-4, -.25928719280954633249e-3, + .21327398937568540428e-2, -.11244626133630732010e-1, + .42375605740664331966e-1, -.12031130345907846211, .26352562258934426830, + -.44590628258512682078, .56682835613700749379, -.49116715128261660395, + .17845943097110339078, .20541650677432497477, -.36739803642257458221, + .16776034069210108273, .17920950989905112908, -.28867732805385066532, + .46473465543376206337e-1, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., .76293945312500000000e-5, -.13727610943181290891e-3, + .11979683091449349286e-2, -.67195313034570709806e-2, + .27044920779931968175e-1, -.82472196498517457862e-1, + .19570475044896150093, -.36391620788543817693, .52241392782736588032, + -.54727504974907879912, .34211551468813581183, .31580472732719957762e-1, + -.32830006549176759667, .30563797665254420769, .64905014620683140120e-2, + -.27642986248995073032, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., .38146972656250000000e-5, + -.72454147007837596854e-4, .66859847582761390285e-3, + -.39751311980366118437e-2, .17015198650201528366e-1, + -.55443621868993855715e-1, .14157060481641692131, -.28641242619559616836, + .45610665490966615415, -.55262786406029265394, .45818352706035500108, + -.14984403004611673047, -.21163807462970713245, .36007252928843413718, + -.17030961385712954159, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., .19073486328125000000e-5, + -.38135049864067468562e-4, .37101393638555730015e-3, + -.23305339886279723213e-2, .10569913448297127219e-1, + -.36640175162216897547e-1, .10010476414320235508, -.21860074212675559892, + .38124757096345313719, -.52020999209879669177, .52172632730659212045, + -.30841620620308814614, -.50322546186721500184e-1, .32577618885114899053, + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .95367431640625000000e-6, -.20021483206955925244e-4, + .20481807322420625431e-3, -.13553476938058909882e-2, + .64919676350791905019e-2, -.23848725425069251903e-1, + .69384632678886421292e-1, -.16249711393618776934, .30736618106830314788, + -.46399909601971539157, .53765031034002467225, -.42598991476520183929, + .12130445348350215652, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .47683715820312500000e-6, + -.10487707828484902486e-4, .11254146162337528943e-3, + -.78248929534271987118e-3, .39468337145306794566e-2, + -.15313546659475671763e-1, .47249070825218564146e-1, + -.11804374107101480543, .24031796927792491122, -.39629215049166341285, + .51629108968402548545, -.49622372075429782915, 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .23841857910156250000e-6, -.54823314130625337326e-5, + .61575377321535518154e-4, -.44877834366497538134e-3, + .23774612048621955857e-2, -.97136347645161687796e-2, + .31671599547606636717e-1, -.84028665767000747480e-1, + .18298487576742964949, -.32647878537696945218, .46970971486488895077, 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., .11920928955078125000e-6, -.28604020001177375838e-5, + .33559227978295551013e-4, -.25583821662860610560e-3, + .14201552747787302339e-2, -.60938046986874414969e-2, + .20930869247951926793e-1, -.58745021125678072911e-1, + .13613725780285953720, -.26083988356030237586, 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .59604644775390625000e-7, -.14898180663526043291e-5, + .18224991282807693921e-4, -.14504433444608833821e-3, + .84184722720281809548e-3, -.37846965430000478789e-2, + .13656355548211376864e-1, -.40409541997718853934e-1, + .99226988101858325902e-1, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .29802322387695312500e-7, -.77471708843445529468e-6, + .98649879372606876995e-5, -.81814934772838523887e-4, + .49554483992403011328e-3, -.23290922072351413938e-2, + .88068134250844034186e-2, -.27393666952485719070e-1, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., .14901161193847656250e-7, -.40226235946098233685e-6, + .53236418690561306700e-5, -.45933829691164002269e-4, + .28982005232838857913e-3, -.14212974043211018374e-2, + .56192363087488842264e-2, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .74505805969238281250e-8, -.20858299254133430408e-6, + .28648457300134381744e-5, -.25677535898258910850e-4, + .16849420429491355445e-3, -.86062824010315834002e-3, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., .37252902984619140625e-8, -.10801736017613096861e-6, + .15376606719887104015e-5, -.14296523739727437959e-4, + .97419023656050887203e-4, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .18626451492309570312e-8, -.55871592916438890146e-7, + .82331193828137454068e-6, -.79302250528382787666e-5, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., .93132257461547851562e-9, + -.28867244235852488244e-7, .43982811713864556957e-6, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .46566128730773925781e-9, + -.14899342093408253335e-7, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .23283064365386962891e-9 +}; + +static const double Tright[33 * 33] = { + 1., .86602540378443864678, 0., -.33071891388307382381, 0., + .20728904939721249057, 0., -.15128841196122722208, 0., + .11918864298744029244, 0., -.98352013661686631224e-1, 0., + .83727065404940845733e-1, 0., -.72893399403505841203e-1, 0., + .64544632643375022436e-1, 0., -.57913170372415565639e-1, 0., + .52518242575729562263e-1, 0., -.48043311993977520457e-1, 0., + .44271433659733990243e-1, 0., -.41048928022856771981e-1, 0., + .38263878662008271459e-1, 0., -.35832844026365304501e-1, 0., 0., + .50000000000000000000, .96824583655185422130, .57282196186948000082, + -.21650635094610966169, -.35903516540862679125, .97578093724974971969e-1, + .26203921611325660506, -.55792409597991015609e-1, -.20644078533943456204, + .36172381205961199479e-1, .17035068468874958194, + -.25371838001497225980e-1, -.14501953125000000000, + .18786835250972344757e-1, .12625507130328301066, + -.14473795929590520582e-1, -.11179458309419422675, + .11494434254897626155e-1, .10030855351241635862, + -.93498556820544479096e-2, -.90964264465390582629e-1, + .77546391824364392762e-2, .83213457337452292745e-1, + -.65358085945588638605e-2, -.76680372422574234569e-1, + .55835321940047427169e-2, .71098828931825789428e-1, + -.48253327982967591019e-2, -.66274981937248958553e-1, + .42118078245337801387e-2, .62064306433355646267e-1, + -.37083386598903548973e-2, 0., 0., .25000000000000000000, + .73950997288745200531, .83852549156242113615, .23175620272173946716, + -.37791833195149451496, -.25710129174850522325, .21608307321780204633, + .22844049245646009157, -.14009503000335388415, -.19897685605518413847, + .98264706042471226893e-1, .17445445004279014046, + -.72761100054958328401e-1, -.15463589893742108388, + .56056770591708784481e-1, .13855313872640495158, + -.44517752443294564781e-1, -.12534277657695128850, + .36211835346039665762e-1, .11434398255136139683, + -.30033588409423828125e-1, -.10506705408753910481, + .25313077840725783008e-1, .97149327637744872155e-1, + -.21624927200393328444e-1, -.90319582367202122625e-1, + .18688433567711780666e-1, .84372291635345108584e-1, + -.16312261561845420752e-1, -.79149526894804751586e-1, + .14362333871852474757e-1, 0., 0., 0., .12500000000000000000, + .49607837082461073572, .82265291131801144317, .59621200088559103072, + -.80054302859059362371e-1, -.42612156697795759420, + -.90098145270865592887e-1, .29769623255090078484, .13630307904779758221, + -.21638835185708931831, -.14600247270306082052, .16348801804014290453, + .14340708728599057249, -.12755243353979286190, -.13661523715071346961, + .10215585947881057394, .12864248070157166547, -.83592528025348693602e-1, + -.12066728689302565222, .69633728678718053052e-1, .11314245177331919532, + -.58882939251410088028e-1, -.10621835858758221487, + .50432266865187597572e-1, .99916834723527771581e-1, + -.43672094283057258509e-1, -.94206380251950852413e-1, + .38181356812697746418e-1, .89035739656537771225e-1, + -.33661934598216332678e-1, 0., 0., 0., 0., .62500000000000000000e-1, + .31093357409581873586, .67604086414949799246, .75644205980613611039, + .28990586430124175741, -.30648508196770360914, -.35801372616842500052, + .91326869828709014708e-1, .31127929687500000000, .90915752838698393094e-2, + -.25637381283965534330, -.57601077850322797594e-1, .21019685709225757945, + .81244992138514014256e-1, -.17375078516720988858, + -.92289437277967051125e-1, .14527351914265391374, + .96675340792832019889e-1, -.12289485697108543415, + -.97448175340011084006e-1, .10511755943298339844, + .96242247086378239657e-1, -.90822942272780513537e-1, + -.93966350452322132384e-1, .79189411876493712558e-1, + .91139307067989309325e-1, -.69613039934383197265e-1, + -.88062491671135767870e-1, .61646331729340817494e-1, 0., 0., 0., 0., 0., + .31250000000000000000e-1, .18684782411095934408, .50176689760410660236, + .74784031498626095398, .56472001151566251186, -.14842464993721351203e-1, + -.41162920273003120936, -.20243071230196532282, .23772054897172750436, + .24963810923972235950, -.12116179938394678936, -.24330535483519110663, + .47903849781124471359e-1, .22133299683101224293, + -.20542915138527200983e-2, -.19653465717678146728, + -.26818172626509178444e-1, .17319122357631210944, + .45065391411065545445e-1, -.15253391395444065941, + -.56543897711725408302e-1, .13469154928743585367, + .63632471400208840155e-1, -.11941684923913523817, + -.67828850207933293098e-1, .10636309084510652670, + .70095786922999181504e-1, -.95187373095150709082e-1, 0., 0., 0., 0., 0., + 0., .15625000000000000000e-1, .10909562534194485289, + .34842348626527747318, .64461114561628111443, .69382480527334683659, + .29551102358528827763, -.25527584713978439819, -.38878771718544715394, + -.82956185835347407489e-2, .31183177761966943912, .12831420840372374767, + -.22067618205599434368, -.17569196937129496961, .14598057000132284135, + .18864406621763419484, -.89921002550386645767e-1, -.18571835020187122114, + .48967672227195481777e-1, .17584685670380332798, + -.19267984545067426324e-1, -.16335437520503462738, + -.22598055455032407594e-2, .15032800884170631129, + .17883358353754640871e-1, -.13774837869432209951, + -.29227555960587143675e-1, .12604194747513151053, 0., 0., 0., 0., 0., 0., + 0., .78125000000000000000e-2, .62377810244809812496e-1, + .23080781467370883845, .50841310636012325368, .69834547012574056043, + .52572723156526459672, .11464215704954976471e-1, -.38698869011491210342, + -.26125646622255207507, .16951698812361607510, .29773875898928782269, + -.20130501202570367491e-1, -.26332493149159310198, + -.67734613690401207009e-1, .21207315477103762715, .11541543390889415193, + -.16249634759782417533, -.13885887405041735068, .11996491328010275427, + .14810432001630926895, -.85177658352556243411e-1, -.14918860659904380587, + .57317789510444151564e-1, .14569827645586660151, + -.35213090145965327390e-1, -.13975998126844578198, 0., 0., 0., 0., 0., 0., + 0., 0., .39062500000000000000e-2, .35101954600803571207e-1, + .14761284084133737720, .37655033076080192966, .62410290231517322776, + .64335622317683389875, .28188168266139524244, -.22488495672137010675, + -.39393811089283576186, -.75184777995770096714e-1, .28472023119398293003, + .20410910833705899572, -.15590046962908511750, -.23814567544617953125, + .54442805556829031204e-1, .22855930338589720954, .16303223615756629897e-1, + -.20172722433875559213, -.62723406421217419404e-1, .17012230831020922010, + .91754642766136561612e-1, -.13927644821381121197, -.10886600968068418181, + .11139075654373395292, .11797455976331702879, 0., 0., 0., 0., 0., 0., 0., + 0., 0., .19531250000000000000e-2, .19506820659607596598e-1, + .91865676095362231937e-1, .26604607809696493849, .51425874205091288223, + .66047561132505329292, .48660109511591303851, .17575661168678285615e-1, + -.36594333408055703366, -.29088854695378694533, .11318677346656537927, + .31110645235730182168, .60733219161008787341e-1, -.24333848233620420826, + -.15254312332655419708, .15995968483455388613, .19010344455215289289, + -.86040636766440260000e-1, -.19652589954665259945, + .27633388517205837713e-1, .18660848552712880387, .15942583868416775867e-1, + -.16902042462382064786, -.47278526495327740646e-1, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., .97656250000000000000e-3, .10731084460857378207e-1, + .55939644713816406331e-1, .18118487371914493668, .39914857299829864263, + .60812322949933902435, .60011887183061967583, .26002695805835928795, + -.20883922404786010096, -.38988130966114638081, -.11797833550782589082, + .25231824756239520077, .24817859972953934712, -.90516417677868996417e-1, + -.26079073291293066798, -.30259468817169480161e-1, .22178195264114178432, + .10569877864302048175, -.16679648389266977455, -.14637718550245050850, + .11219272032739559870, .16359363640525750353, -.64358194509092101393e-1, + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .48828125000000000000e-3, + .58542865274813470967e-2, .33461741635290096452e-1, .11979993155896201271, + .29580223766987206958, .51874761979436016742, .62861483498014306968, + .44868895761051453296, .12567502628371529386e-1, -.35040366183235474275, + -.30466868455569500886, .70903913601490112666e-1, .30822791893032512740, + .11969443264190207736, -.20764760317621313946, -.20629838355452128532, + .95269702915334718507e-1, .22432624768705133300, + -.33103381593477797101e-2, -.20570036048155716333, + -.62208282720094518964e-1, .17095309330441436348, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., .24414062500000000000e-3, + .31714797501871532475e-2, .19721062526127334100e-1, + .77311181185536498246e-1, .21124871792841566575, .41777980401893650886, + .59401977834943551650, .56132417807488349048, .23433675061367565951, + -.20222775295220942126, -.38280372496506190127, -.14443804214023095767, + .22268950939178466797, .27211314150777981984, -.34184876506180717313e-1, + -.26006498895669734842, -.97650425186005090107e-1, .19024527660129101293, + .16789164198044635671, -.10875811641651905252, -.19276785058805921298, 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .12207031250000000000e-3, + .17078941137247586143e-2, .11477733754843910060e-1, + .48887017020924625462e-1, .14634927241421789683, .32156282683019547854, + .52165811920227223937, .60001958466396926460, .41208501541480733755, + .11366945503190350975e-2, -.33968093962672089159, -.30955190935923386766, + .40657421856578262210e-1, .29873400409871531764, .16094481791768257440, + -.16876122436206497694, -.23650217045022161255, .33070260090574765012e-1, + .22985258456375907796, .68645651043827097771e-1, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .61035156250000000000e-4, + .91501857608428649078e-3, .66085179496951987952e-2, + .30383171695850355404e-1, .98840838845366876117e-1, .23855447246420318989, + .43322017468145613917, .58049033744876107191, .52533893203742699346, + .20681056202371946180, -.20180000924562504384, -.37503922291962681797, + -.15988102869837429062, .19823558102762374094, .28393023878803799622, + .11188133439357510403e-1, -.24730368377168229255, -.14731529061377942839, + .14878558042884266021, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .30517578125000000000e-4, .48804277318479845551e-3, + .37696080990601968396e-2, .18603912108994738255e-1, + .65325006755649582964e-1, .17162960707938819795, .34411527956476971322, + .52289350347082497959, .57319653625674910592, .37662253421045430413, + -.14099055105384663902e-1, -.33265570610216904208, -.30921265572647566661, + .19911390594166455281e-1, .28738590811031797718, .18912130469738472647, + -.13235936203215819193, -.25076406142356675279, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .15258789062500000000e-4, + .25928719280954633249e-3, .21327398937568540428e-2, + .11244626133630732010e-1, .42375605740664331966e-1, .12031130345907846211, + .26352562258934426830, .44590628258512682078, .56682835613700749379, + .49116715128261660395, .17845943097110339078, -.20541650677432497477, + -.36739803642257458221, -.16776034069210108273, .17920950989905112908, + .28867732805385066532, .46473465543376206337e-1, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .76293945312500000000e-5, + .13727610943181290891e-3, .11979683091449349286e-2, + .67195313034570709806e-2, .27044920779931968175e-1, + .82472196498517457862e-1, .19570475044896150093, .36391620788543817693, + .52241392782736588032, .54727504974907879912, .34211551468813581183, + -.31580472732719957762e-1, -.32830006549176759667, -.30563797665254420769, + .64905014620683140120e-2, .27642986248995073032, 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .38146972656250000000e-5, + .72454147007837596854e-4, .66859847582761390285e-3, + .39751311980366118437e-2, .17015198650201528366e-1, + .55443621868993855715e-1, .14157060481641692131, .28641242619559616836, + .45610665490966615415, .55262786406029265394, .45818352706035500108, + .14984403004611673047, -.21163807462970713245, -.36007252928843413718, + -.17030961385712954159, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., .19073486328125000000e-5, + .38135049864067468562e-4, .37101393638555730015e-3, + .23305339886279723213e-2, .10569913448297127219e-1, + .36640175162216897547e-1, .10010476414320235508, .21860074212675559892, + .38124757096345313719, .52020999209879669177, .52172632730659212045, + .30841620620308814614, -.50322546186721500184e-1, -.32577618885114899053, + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .95367431640625000000e-6, .20021483206955925244e-4, + .20481807322420625431e-3, .13553476938058909882e-2, + .64919676350791905019e-2, .23848725425069251903e-1, + .69384632678886421292e-1, .16249711393618776934, .30736618106830314788, + .46399909601971539157, .53765031034002467225, .42598991476520183929, + .12130445348350215652, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .47683715820312500000e-6, + .10487707828484902486e-4, .11254146162337528943e-3, + .78248929534271987118e-3, .39468337145306794566e-2, + .15313546659475671763e-1, .47249070825218564146e-1, .11804374107101480543, + .24031796927792491122, .39629215049166341285, .51629108968402548545, + .49622372075429782915, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., .23841857910156250000e-6, + .54823314130625337326e-5, .61575377321535518154e-4, + .44877834366497538134e-3, .23774612048621955857e-2, + .97136347645161687796e-2, .31671599547606636717e-1, + .84028665767000747480e-1, .18298487576742964949, .32647878537696945218, + .46970971486488895077, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., .11920928955078125000e-6, + .28604020001177375838e-5, .33559227978295551013e-4, + .25583821662860610560e-3, .14201552747787302339e-2, + .60938046986874414969e-2, .20930869247951926793e-1, + .58745021125678072911e-1, .13613725780285953720, .26083988356030237586, + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., .59604644775390625000e-7, + .14898180663526043291e-5, .18224991282807693921e-4, + .14504433444608833821e-3, .84184722720281809548e-3, + .37846965430000478789e-2, .13656355548211376864e-1, + .40409541997718853934e-1, .99226988101858325902e-1, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .29802322387695312500e-7, .77471708843445529468e-6, + .98649879372606876995e-5, .81814934772838523887e-4, + .49554483992403011328e-3, .23290922072351413938e-2, + .88068134250844034186e-2, .27393666952485719070e-1, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., .14901161193847656250e-7, .40226235946098233685e-6, + .53236418690561306700e-5, .45933829691164002269e-4, + .28982005232838857913e-3, .14212974043211018374e-2, + .56192363087488842264e-2, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .74505805969238281250e-8, .20858299254133430408e-6, + .28648457300134381744e-5, .25677535898258910850e-4, + .16849420429491355445e-3, .86062824010315834002e-3, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., .37252902984619140625e-8, .10801736017613096861e-6, + .15376606719887104015e-5, .14296523739727437959e-4, + .97419023656050887203e-4, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + .18626451492309570312e-8, .55871592916438890146e-7, + .82331193828137454068e-6, .79302250528382787666e-5, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., .93132257461547851562e-9, + .28867244235852488244e-7, .43982811713864556957e-6, 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., .46566128730773925781e-9, + .14899342093408253335e-7, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., .23283064365386962891e-9 +}; diff --git a/software/gsl-1.15/integration/err.c b/software/gsl-1.15/integration/err.c new file mode 100644 index 000000000..d897eb7fa --- /dev/null +++ b/software/gsl-1.15/integration/err.c @@ -0,0 +1,58 @@ +/* integration/err.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +static double rescale_error (double err, const double result_abs, const double result_asc) ; + +static double +rescale_error (double err, const double result_abs, const double result_asc) +{ + err = fabs(err) ; + + if (result_asc != 0 && err != 0) + { + double scale = pow((200 * err / result_asc), 1.5) ; + + if (scale < 1) + { + err = result_asc * scale ; + } + else + { + err = result_asc ; + } + } + if (result_abs > GSL_DBL_MIN / (50 * GSL_DBL_EPSILON)) + { + double min_err = 50 * GSL_DBL_EPSILON * result_abs ; + + if (min_err > err) + { + err = min_err ; + } + } + + return err ; +} + diff --git a/software/gsl-1.15/integration/glfixed.c b/software/gsl-1.15/integration/glfixed.c new file mode 100644 index 000000000..7566cda94 --- /dev/null +++ b/software/gsl-1.15/integration/glfixed.c @@ -0,0 +1,484 @@ +/* + * Numerical Integration by Gauss-Legendre Quadrature Formulas of high orders. + * High-precision abscissas and weights are used. + * + * Original project homepage: http://www.holoborodko.com/pavel/?page_id=679 + * Original contact e-mail: pavel@holoborodko.com + * + * Copyright (c)2007-2008 Pavel Holoborodko + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * Konstantin Holoborodko - Optimization of Legendre polynomial computing. + * Rhys Ulerich - Inclusion within GNU Scientific Library. + * + */ + +#include +#include +#include +#include +#include +#include + +static void gauss_legendre_tbl(int n, double* x, double* w, double eps); + +/* n = 2 */ +static double x2[1] = {0.5773502691896257645091488}; +static double w2[1] = {1.0000000000000000000000000}; + +/* n = 4 */ +static double x4[2] = {0.3399810435848562648026658, 0.8611363115940525752239465}; +static double w4[2] = {0.6521451548625461426269361, 0.3478548451374538573730639}; + +/* n = 6 */ +static double x6[3] = {0.2386191860831969086305017, 0.6612093864662645136613996, 0.9324695142031520278123016}; +static double w6[3] = {0.4679139345726910473898703, 0.3607615730481386075698335, 0.1713244923791703450402961}; + +/* n = 8 */ +static double x8[4] = {0.1834346424956498049394761, 0.5255324099163289858177390, 0.7966664774136267395915539, 0.9602898564975362316835609}; +static double w8[4] = {0.3626837833783619829651504, 0.3137066458778872873379622, 0.2223810344533744705443560, 0.1012285362903762591525314}; + +/* n = 10 */ +static double x10[5] = {0.1488743389816312108848260, 0.4333953941292471907992659, 0.6794095682990244062343274, 0.8650633666889845107320967, 0.9739065285171717200779640}; +static double w10[5] = {0.2955242247147528701738930, 0.2692667193099963550912269, 0.2190863625159820439955349, 0.1494513491505805931457763, 0.0666713443086881375935688}; + +/* n = 12 */ +static double x12[6] = {0.1252334085114689154724414, 0.3678314989981801937526915, 0.5873179542866174472967024, 0.7699026741943046870368938, 0.9041172563704748566784659, 0.9815606342467192506905491}; +static double w12[6] = {0.2491470458134027850005624, 0.2334925365383548087608499, 0.2031674267230659217490645, 0.1600783285433462263346525, 0.1069393259953184309602547, 0.0471753363865118271946160}; + +/* n = 14 */ +static double x14[7] = {0.1080549487073436620662447, 0.3191123689278897604356718, 0.5152486363581540919652907, 0.6872929048116854701480198, 0.8272013150697649931897947, 0.9284348836635735173363911, 0.9862838086968123388415973}; +static double w14[7] = {0.2152638534631577901958764, 0.2051984637212956039659241, 0.1855383974779378137417166, 0.1572031671581935345696019, 0.1215185706879031846894148, 0.0801580871597602098056333, 0.0351194603317518630318329}; + +/* n = 16 */ +static double x16[8] = {0.0950125098376374401853193, 0.2816035507792589132304605, 0.4580167776572273863424194, 0.6178762444026437484466718, 0.7554044083550030338951012, 0.8656312023878317438804679, 0.9445750230732325760779884, 0.9894009349916499325961542}; +static double w16[8] = {0.1894506104550684962853967, 0.1826034150449235888667637, 0.1691565193950025381893121, 0.1495959888165767320815017, 0.1246289712555338720524763, 0.0951585116824927848099251, 0.0622535239386478928628438, 0.0271524594117540948517806}; + +/* n = 18 */ +static double x18[9] = {0.0847750130417353012422619, 0.2518862256915055095889729, 0.4117511614628426460359318, 0.5597708310739475346078715, 0.6916870430603532078748911, 0.8037049589725231156824175, 0.8926024664975557392060606, 0.9558239495713977551811959, 0.9915651684209309467300160}; +static double w18[9] = {0.1691423829631435918406565, 0.1642764837458327229860538, 0.1546846751262652449254180, 0.1406429146706506512047313, 0.1225552067114784601845191, 0.1009420441062871655628140, 0.0764257302548890565291297, 0.0497145488949697964533349, 0.0216160135264833103133427}; + +/* n = 20 */ +static double x20[10] = {0.0765265211334973337546404, 0.2277858511416450780804962, 0.3737060887154195606725482, 0.5108670019508270980043641, 0.6360536807265150254528367, 0.7463319064601507926143051, 0.8391169718222188233945291, 0.9122344282513259058677524, 0.9639719272779137912676661, 0.9931285991850949247861224}; +static double w20[10] = {0.1527533871307258506980843, 0.1491729864726037467878287, 0.1420961093183820513292983, 0.1316886384491766268984945, 0.1181945319615184173123774, 0.1019301198172404350367501, 0.0832767415767047487247581, 0.0626720483341090635695065, 0.0406014298003869413310400, 0.0176140071391521183118620}; + +/* n = 32 */ +static double x32[16] = {0.0483076656877383162348126, 0.1444719615827964934851864, 0.2392873622521370745446032, 0.3318686022821276497799168, 0.4213512761306353453641194, 0.5068999089322293900237475, 0.5877157572407623290407455, 0.6630442669302152009751152, 0.7321821187402896803874267, 0.7944837959679424069630973, 0.8493676137325699701336930, 0.8963211557660521239653072, 0.9349060759377396891709191, 0.9647622555875064307738119, 0.9856115115452683354001750, 0.9972638618494815635449811}; +static double w32[16] = {0.0965400885147278005667648, 0.0956387200792748594190820, 0.0938443990808045656391802, 0.0911738786957638847128686, 0.0876520930044038111427715, 0.0833119242269467552221991, 0.0781938957870703064717409, 0.0723457941088485062253994, 0.0658222227763618468376501, 0.0586840934785355471452836, 0.0509980592623761761961632, 0.0428358980222266806568786, 0.0342738629130214331026877, 0.0253920653092620594557526, 0.0162743947309056706051706, 0.0070186100094700966004071}; + +/* n = 64 */ +static double x64[32] = {0.0243502926634244325089558, 0.0729931217877990394495429, 0.1214628192961205544703765, 0.1696444204239928180373136, 0.2174236437400070841496487, 0.2646871622087674163739642, 0.3113228719902109561575127, 0.3572201583376681159504426, 0.4022701579639916036957668, 0.4463660172534640879849477, 0.4894031457070529574785263, 0.5312794640198945456580139, 0.5718956462026340342838781, 0.6111553551723932502488530, 0.6489654712546573398577612, 0.6852363130542332425635584, 0.7198818501716108268489402, 0.7528199072605318966118638, 0.7839723589433414076102205, 0.8132653151227975597419233, 0.8406292962525803627516915, 0.8659993981540928197607834, 0.8893154459951141058534040, 0.9105221370785028057563807, 0.9295691721319395758214902, 0.9464113748584028160624815, 0.9610087996520537189186141, 0.9733268277899109637418535, 0.9833362538846259569312993, 0.9910133714767443207393824, 0.9963401167719552793469245, 0.9993050417357721394569056}; +static double w64[32] = {0.0486909570091397203833654, 0.0485754674415034269347991, 0.0483447622348029571697695, 0.0479993885964583077281262, 0.0475401657148303086622822, 0.0469681828162100173253263, 0.0462847965813144172959532, 0.0454916279274181444797710, 0.0445905581637565630601347, 0.0435837245293234533768279, 0.0424735151236535890073398, 0.0412625632426235286101563, 0.0399537411327203413866569, 0.0385501531786156291289625, 0.0370551285402400460404151, 0.0354722132568823838106931, 0.0338051618371416093915655, 0.0320579283548515535854675, 0.0302346570724024788679741, 0.0283396726142594832275113, 0.0263774697150546586716918, 0.0243527025687108733381776, 0.0222701738083832541592983, 0.0201348231535302093723403, 0.0179517157756973430850453, 0.0157260304760247193219660, 0.0134630478967186425980608, 0.0111681394601311288185905, 0.0088467598263639477230309, 0.0065044579689783628561174, 0.0041470332605624676352875, 0.0017832807216964329472961}; + +/* n = 96 */ +static double x96[48] = {0.0162767448496029695791346, 0.0488129851360497311119582, 0.0812974954644255589944713, 0.1136958501106659209112081, 0.1459737146548969419891073, 0.1780968823676186027594026, 0.2100313104605672036028472, 0.2417431561638400123279319, 0.2731988125910491414872722, 0.3043649443544963530239298, 0.3352085228926254226163256, 0.3656968614723136350308956, 0.3957976498289086032850002, 0.4254789884073005453648192, 0.4547094221677430086356761, 0.4834579739205963597684056, 0.5116941771546676735855097, 0.5393881083243574362268026, 0.5665104185613971684042502, 0.5930323647775720806835558, 0.6189258401254685703863693, 0.6441634037849671067984124, 0.6687183100439161539525572, 0.6925645366421715613442458, 0.7156768123489676262251441, 0.7380306437444001328511657, 0.7596023411766474987029704, 0.7803690438674332176036045, 0.8003087441391408172287961, 0.8194003107379316755389996, 0.8376235112281871214943028, 0.8549590334346014554627870, 0.8713885059092965028737748, 0.8868945174024204160568774, 0.9014606353158523413192327, 0.9150714231208980742058845, 0.9277124567223086909646905, 0.9393703397527552169318574, 0.9500327177844376357560989, 0.9596882914487425393000680, 0.9683268284632642121736594, 0.9759391745851364664526010, 0.9825172635630146774470458, 0.9880541263296237994807628, 0.9925439003237626245718923, 0.9959818429872092906503991, 0.9983643758631816777241494, 0.9996895038832307668276901}; +static double w96[48] = {0.0325506144923631662419614, 0.0325161187138688359872055, 0.0324471637140642693640128, 0.0323438225685759284287748, 0.0322062047940302506686671, 0.0320344562319926632181390, 0.0318287588944110065347537, 0.0315893307707271685580207, 0.0313164255968613558127843, 0.0310103325863138374232498, 0.0306713761236691490142288, 0.0302999154208275937940888, 0.0298963441363283859843881, 0.0294610899581679059704363, 0.0289946141505552365426788, 0.0284974110650853856455995, 0.0279700076168483344398186, 0.0274129627260292428234211, 0.0268268667255917621980567, 0.0262123407356724139134580, 0.0255700360053493614987972, 0.0249006332224836102883822, 0.0242048417923646912822673, 0.0234833990859262198422359, 0.0227370696583293740013478, 0.0219666444387443491947564, 0.0211729398921912989876739, 0.0203567971543333245952452, 0.0195190811401450224100852, 0.0186606796274114673851568, 0.0177825023160452608376142, 0.0168854798642451724504775, 0.0159705629025622913806165, 0.0150387210269949380058763, 0.0140909417723148609158616, 0.0131282295669615726370637, 0.0121516046710883196351814, 0.0111621020998384985912133, 0.0101607705350084157575876, 0.0091486712307833866325846, 0.0081268769256987592173824, 0.0070964707911538652691442, 0.0060585455042359616833167, 0.0050142027429275176924702, 0.0039645543384446866737334, 0.0029107318179349464084106, 0.0018539607889469217323359, 0.0007967920655520124294381}; + +/* n = 100 */ +static double x100[50] = {0.0156289844215430828722167, 0.0468716824215916316149239, 0.0780685828134366366948174, 0.1091892035800611150034260, 0.1402031372361139732075146, 0.1710800805386032748875324, 0.2017898640957359972360489, 0.2323024818449739696495100, 0.2625881203715034791689293, 0.2926171880384719647375559, 0.3223603439005291517224766, 0.3517885263724217209723438, 0.3808729816246299567633625, 0.4095852916783015425288684, 0.4378974021720315131089780, 0.4657816497733580422492166, 0.4932107892081909335693088, 0.5201580198817630566468157, 0.5465970120650941674679943, 0.5725019326213811913168704, 0.5978474702471787212648065, 0.6226088602037077716041908, 0.6467619085141292798326303, 0.6702830156031410158025870, 0.6931491993558019659486479, 0.7153381175730564464599671, 0.7368280898020207055124277, 0.7575981185197071760356680, 0.7776279096494954756275514, 0.7968978923903144763895729, 0.8153892383391762543939888, 0.8330838798884008235429158, 0.8499645278795912842933626, 0.8660146884971646234107400, 0.8812186793850184155733168, 0.8955616449707269866985210, 0.9090295709825296904671263, 0.9216092981453339526669513, 0.9332885350430795459243337, 0.9440558701362559779627747, 0.9539007829254917428493369, 0.9628136542558155272936593, 0.9707857757637063319308979, 0.9778093584869182885537811, 0.9838775407060570154961002, 0.9889843952429917480044187, 0.9931249370374434596520099, 0.9962951347331251491861317, 0.9984919506395958184001634, 0.9997137267734412336782285}; +static double w100[50] = {0.0312554234538633569476425, 0.0312248842548493577323765, 0.0311638356962099067838183, 0.0310723374275665165878102, 0.0309504788504909882340635, 0.0307983790311525904277139, 0.0306161865839804484964594, 0.0304040795264548200165079, 0.0301622651051691449190687, 0.0298909795933328309168368, 0.0295904880599126425117545, 0.0292610841106382766201190, 0.0289030896011252031348762, 0.0285168543223950979909368, 0.0281027556591011733176483, 0.0276611982207923882942042, 0.0271926134465768801364916, 0.0266974591835709626603847, 0.0261762192395456763423087, 0.0256294029102081160756420, 0.0250575444815795897037642, 0.0244612027079570527199750, 0.0238409602659682059625604, 0.0231974231852541216224889, 0.0225312202563362727017970, 0.0218430024162473863139537, 0.0211334421125276415426723, 0.0204032326462094327668389, 0.0196530874944353058653815, 0.0188837396133749045529412, 0.0180959407221281166643908, 0.0172904605683235824393442, 0.0164680861761452126431050, 0.0156296210775460027239369, 0.0147758845274413017688800, 0.0139077107037187726879541, 0.0130259478929715422855586, 0.0121314576629794974077448, 0.0112251140231859771172216, 0.0103078025748689695857821, 0.0093804196536944579514182, 0.0084438714696689714026208, 0.0074990732554647115788287, 0.0065469484508453227641521, 0.0055884280038655151572119, 0.0046244500634221193510958, 0.0036559612013263751823425, 0.0026839253715534824194396, 0.0017093926535181052395294, 0.0007346344905056717304063}; + +/* n = 128 */ +static double x128[64] = {0.0122236989606157641980521, 0.0366637909687334933302153, 0.0610819696041395681037870, 0.0854636405045154986364980, 0.1097942311276437466729747, 0.1340591994611877851175753, 0.1582440427142249339974755, 0.1823343059853371824103826, 0.2063155909020792171540580, 0.2301735642266599864109866, 0.2538939664226943208556180, 0.2774626201779044028062316, 0.3008654388776772026671541, 0.3240884350244133751832523, 0.3471177285976355084261628, 0.3699395553498590266165917, 0.3925402750332674427356482, 0.4149063795522750154922739, 0.4370245010371041629370429, 0.4588814198335521954490891, 0.4804640724041720258582757, 0.5017595591361444642896063, 0.5227551520511754784539479, 0.5434383024128103634441936, 0.5637966482266180839144308, 0.5838180216287630895500389, 0.6034904561585486242035732, 0.6228021939105849107615396, 0.6417416925623075571535249, 0.6602976322726460521059468, 0.6784589224477192593677557, 0.6962147083695143323850866, 0.7135543776835874133438599, 0.7304675667419088064717369, 0.7469441667970619811698824, 0.7629743300440947227797691, 0.7785484755064119668504941, 0.7936572947621932902433329, 0.8082917575079136601196422, 0.8224431169556438424645942, 0.8361029150609068471168753, 0.8492629875779689691636001, 0.8619154689395484605906323, 0.8740527969580317986954180, 0.8856677173453972174082924, 0.8967532880491581843864474, 0.9073028834017568139214859, 0.9173101980809605370364836, 0.9267692508789478433346245, 0.9356743882779163757831268, 0.9440202878302201821211114, 0.9518019613412643862177963, 0.9590147578536999280989185, 0.9656543664319652686458290, 0.9717168187471365809043384, 0.9771984914639073871653744, 0.9820961084357185360247656, 0.9864067427245862088712355, 0.9901278184917343833379303, 0.9932571129002129353034372, 0.9957927585349811868641612, 0.9977332486255140198821574, 0.9990774599773758950119878, 0.9998248879471319144736081}; +static double w128[64] = {0.0244461801962625182113259, 0.0244315690978500450548486, 0.0244023556338495820932980, 0.0243585572646906258532685, 0.0243002001679718653234426, 0.0242273192228152481200933, 0.0241399579890192849977167, 0.0240381686810240526375873, 0.0239220121367034556724504, 0.0237915577810034006387807, 0.0236468835844476151436514, 0.0234880760165359131530253, 0.0233152299940627601224157, 0.0231284488243870278792979, 0.0229278441436868469204110, 0.0227135358502364613097126, 0.0224856520327449668718246, 0.0222443288937997651046291, 0.0219897106684604914341221, 0.0217219495380520753752610, 0.0214412055392084601371119, 0.0211476464682213485370195, 0.0208414477807511491135839, 0.0205227924869600694322850, 0.0201918710421300411806732, 0.0198488812328308622199444, 0.0194940280587066028230219, 0.0191275236099509454865185, 0.0187495869405447086509195, 0.0183604439373313432212893, 0.0179603271850086859401969, 0.0175494758271177046487069, 0.0171281354231113768306810, 0.0166965578015892045890915, 0.0162550009097851870516575, 0.0158037286593993468589656, 0.0153430107688651440859909, 0.0148731226021473142523855, 0.0143943450041668461768239, 0.0139069641329519852442880, 0.0134112712886163323144890, 0.0129075627392673472204428, 0.0123961395439509229688217, 0.0118773073727402795758911, 0.0113513763240804166932817, 0.0108186607395030762476596, 0.0102794790158321571332153, 0.0097341534150068058635483, 0.0091830098716608743344787, 0.0086263777986167497049788, 0.0080645898904860579729286, 0.0074979819256347286876720, 0.0069268925668988135634267, 0.0063516631617071887872143, 0.0057726375428656985893346, 0.0051901618326763302050708, 0.0046045842567029551182905, 0.0040162549837386423131943, 0.0034255260409102157743378, 0.0028327514714579910952857, 0.0022382884309626187436221, 0.0016425030186690295387909, 0.0010458126793403487793129, 0.0004493809602920903763943}; + +/* n = 256 */ +static double x256[128] = {0.0061239123751895295011702, 0.0183708184788136651179263, 0.0306149687799790293662786, 0.0428545265363790983812423, 0.0550876556946339841045614, 0.0673125211657164002422903, 0.0795272891002329659032271, 0.0917301271635195520311456, 0.1039192048105094036391969, 0.1160926935603328049407349, 0.1282487672706070947420496, 0.1403856024113758859130249, 0.1525013783386563953746068, 0.1645942775675538498292845, 0.1766624860449019974037218, 0.1887041934213888264615036, 0.2007175933231266700680007, 0.2127008836226259579370402, 0.2246522667091319671478783, 0.2365699497582840184775084, 0.2484521450010566668332427, 0.2602970699919425419785609, 0.2721029478763366095052447, 0.2838680076570817417997658, 0.2955904844601356145637868, 0.3072686197993190762586103, 0.3189006618401062756316834, 0.3304848656624169762291870, 0.3420194935223716364807297, 0.3535028151129699895377902, 0.3649331078236540185334649, 0.3763086569987163902830557, 0.3876277561945155836379846, 0.3988887074354591277134632, 0.4100898214687165500064336, 0.4212294180176238249768124, 0.4323058260337413099534411, 0.4433173839475273572169258, 0.4542624399175899987744552, 0.4651393520784793136455705, 0.4759464887869833063907375, 0.4866822288668903501036214, 0.4973449618521814771195124, 0.5079330882286160362319249, 0.5184450196736744762216617, 0.5288791792948222619514764, 0.5392340018660591811279362, 0.5495079340627185570424269, 0.5596994346944811451369074, 0.5698069749365687590576675, 0.5798290385590829449218317, 0.5897641221544543007857861, 0.5996107353629683217303882, 0.6093674010963339395223108, 0.6190326557592612194309676, 0.6286050494690149754322099, 0.6380831462729113686686886, 0.6474655243637248626170162, 0.6567507762929732218875002, 0.6659375091820485599064084, 0.6750243449311627638559187, 0.6840099204260759531248771, 0.6928928877425769601053416, 0.7016719143486851594060835, 0.7103456833045433133945663, 0.7189128934599714483726399, 0.7273722596496521265868944, 0.7357225128859178346203729, 0.7439624005491115684556831, 0.7520906865754920595875297, 0.7601061516426554549419068, 0.7680075933524456359758906, 0.7757938264113257391320526, 0.7834636828081838207506702, 0.7910160119895459945467075, 0.7984496810321707587825429, 0.8057635748129986232573891, 0.8129565961764315431364104, 0.8200276660989170674034781, 0.8269757238508125142890929, 0.8337997271555048943484439, 0.8404986523457627138950680, 0.8470714945172962071870724, 0.8535172676795029650730355, 0.8598350049033763506961731, 0.8660237584665545192975154, 0.8720825999954882891300459, 0.8780106206047065439864349, 0.8838069310331582848598262, 0.8894706617776108888286766, 0.8950009632230845774412228, 0.9003970057703035447716200, 0.9056579799601446470826819, 0.9107830965950650118909072, 0.9157715868574903845266696, 0.9206227024251464955050471, 0.9253357155833162028727303, 0.9299099193340056411802456, 0.9343446275020030942924765, 0.9386391748378148049819261, 0.9427929171174624431830761, 0.9468052312391274813720517, 0.9506755153166282763638521, 0.9544031887697162417644479, 0.9579876924111781293657904, 0.9614284885307321440064075, 0.9647250609757064309326123, 0.9678769152284894549090038, 0.9708835784807430293209233, 0.9737445997043704052660786, 0.9764595497192341556210107, 0.9790280212576220388242380, 0.9814496290254644057693031, 0.9837240097603154961666861, 0.9858508222861259564792451, 0.9878297475648606089164877, 0.9896604887450652183192437, 0.9913427712075830869221885, 0.9928763426088221171435338, 0.9942609729224096649628775, 0.9954964544810963565926471, 0.9965826020233815404305044, 0.9975192527567208275634088, 0.9983062664730064440555005, 0.9989435258434088565550263, 0.9994309374662614082408542, 0.9997684374092631861048786, 0.9999560500189922307348012}; +static double w256[128] = {0.0122476716402897559040703, 0.0122458343697479201424639, 0.0122421601042728007697281, 0.0122366493950401581092426, 0.0122293030687102789041463, 0.0122201222273039691917087, 0.0122091082480372404075141, 0.0121962627831147135181810, 0.0121815877594817721740476, 0.0121650853785355020613073, 0.0121467581157944598155598, 0.0121266087205273210347185, 0.0121046402153404630977578, 0.0120808558957245446559752, 0.0120552593295601498143471, 0.0120278543565825711612675, 0.0119986450878058119345367, 0.0119676359049058937290073, 0.0119348314595635622558732, 0.0119002366727664897542872, 0.0118638567340710787319046, 0.0118256971008239777711607, 0.0117857634973434261816901, 0.0117440619140605503053767, 0.0117005986066207402881898, 0.0116553800949452421212989, 0.0116084131622531057220847, 0.0115597048540436357726687, 0.0115092624770394979585864, 0.0114570935980906391523344, 0.0114032060430391859648471, 0.0113476078955454919416257, 0.0112903074958755095083676, 0.0112313134396496685726568, 0.0111706345765534494627109, 0.0111082800090098436304608, 0.0110442590908139012635176, 0.0109785814257295706379882, 0.0109112568660490397007968, 0.0108422955111147959952935, 0.0107717077058046266366536, 0.0106995040389797856030482, 0.0106256953418965611339617, 0.0105502926865814815175336, 0.0104733073841704030035696, 0.0103947509832117289971017, 0.0103146352679340150682607, 0.0102329722564782196569549, 0.0101497741990948656546341, 0.0100650535763063833094610, 0.0099788230970349101247339, 0.0098910956966958286026307, 0.0098018845352573278254988, 0.0097112029952662799642497, 0.0096190646798407278571622, 0.0095254834106292848118297, 0.0094304732257377527473528, 0.0093340483776232697124660, 0.0092362233309563026873787, 0.0091370127604508064020005, 0.0090364315486628736802278, 0.0089344947837582075484084, 0.0088312177572487500253183, 0.0087266159616988071403366, 0.0086207050884010143053688, 0.0085135010250224906938384, 0.0084050198532215357561803, 0.0082952778462352254251714, 0.0081842914664382699356198, 0.0080720773628734995009470, 0.0079586523687543483536132, 0.0078440334989397118668103, 0.0077282379473815556311102, 0.0076112830845456594616187, 0.0074931864548058833585998, 0.0073739657738123464375724, 0.0072536389258339137838291, 0.0071322239610753900716724, 0.0070097390929698226212344, 0.0068862026954463203467133, 0.0067616333001737987809279, 0.0066360495937810650445900, 0.0065094704150536602678099, 0.0063819147521078805703752, 0.0062534017395424012720636, 0.0061239506555679325423891, 0.0059935809191153382211277, 0.0058623120869226530606616, 0.0057301638506014371773844, 0.0055971560336829100775514, 0.0054633085886443102775705, 0.0053286415939159303170811, 0.0051931752508692809303288, 0.0050569298807868423875578, 0.0049199259218138656695588, 0.0047821839258926913729317, 0.0046437245556800603139791, 0.0045045685814478970686418, 0.0043647368779680566815684, 0.0042242504213815362723565, 0.0040831302860526684085998, 0.0039413976414088336277290, 0.0037990737487662579981170, 0.0036561799581425021693892, 0.0035127377050563073309711, 0.0033687685073155510120191, 0.0032242939617941981570107, 0.0030793357411993375832054, 0.0029339155908297166460123, 0.0027880553253277068805748, 0.0026417768254274905641208, 0.0024951020347037068508395, 0.0023480529563273120170065, 0.0022006516498399104996849, 0.0020529202279661431745488, 0.0019048808534997184044191, 0.0017565557363307299936069, 0.0016079671307493272424499, 0.0014591373333107332010884, 0.0013100886819025044578317, 0.0011608435575677247239706, 0.0010114243932084404526058, 0.0008618537014200890378141, 0.0007121541634733206669090, 0.0005623489540314098028152, 0.0004124632544261763284322, 0.0002625349442964459062875, 0.0001127890178222721755125}; + +/* n = 512 */ +static double x512[256] = {0.0030649621851593961529232, 0.0091947713864329108047442, 0.0153242350848981855249677, 0.0214531229597748745137841, 0.0275812047119197840615246, 0.0337082500724805951232271, 0.0398340288115484476830396, 0.0459583107468090617788760, 0.0520808657521920701127271, 0.0582014637665182372392330, 0.0643198748021442404045319, 0.0704358689536046871990309, 0.0765492164062510452915674, 0.0826596874448871596284651, 0.0887670524624010326092165, 0.0948710819683925428909483, 0.1009715465977967786264323, 0.1070682171195026611052004, 0.1131608644449665349442888, 0.1192492596368204011642726, 0.1253331739174744696875513, 0.1314123786777137080093018, 0.1374866454852880630171099, 0.1435557460934960331730353, 0.1496194524497612685217272, 0.1556775367042018762501969, 0.1617297712181921097989489, 0.1677759285729161198103670, 0.1738157815779134454985394, 0.1798491032796159253350647, 0.1858756669698757062678115, 0.1918952461944840310240859, 0.1979076147616804833961808, 0.2039125467506523717658375, 0.2099098165200239314947094, 0.2158991987163350271904893, 0.2218804682825090362529109, 0.2278534004663095955103621, 0.2338177708287858931763260, 0.2397733552527061887852891, 0.2457199299509792442100997, 0.2516572714750633493170137, 0.2575851567233626262808095, 0.2635033629496102970603704, 0.2694116677712385990250046, 0.2753098491777350342234845, 0.2811976855389846383013106, 0.2870749556135979555970354, 0.2929414385572244074855835, 0.2987969139308507415853707, 0.3046411617090842500066247, 0.3104739622884204453906292, 0.3162950964954948840736281, 0.3221043455953188263048133, 0.3279014912994984240551598, 0.3336863157744371275728377, 0.3394586016495210024715049, 0.3452181320252866497799379, 0.3509646904815714220351686, 0.3566980610856456291665404, 0.3624180284003264285948478, 0.3681243774920730946589582, 0.3738168939390633631820054, 0.3794953638392505477003659, 0.3851595738184011246011504, 0.3908093110381124851478484, 0.3964443632038105531190080, 0.4020645185727269675414064, 0.4076695659618555307670286, 0.4132592947558876229222955, 0.4188334949151262845483445, 0.4243919569833786700527309, 0.4299344720958265754056529, 0.4354608319868747443376920, 0.4409708289979766581310498, 0.4464642560854375149423431, 0.4519409068281941054521446, 0.4574005754355712925046003, 0.4628430567550148032795831, 0.4682681462798000434299255, 0.4736756401567166435172692, 0.4790653351937284489919577, 0.4844370288676086658851277, 0.4897905193315498753147078, 0.4951256054227486308513615, 0.5004420866699643537454866, 0.5057397633010522419821678, 0.5110184362504699101074361, 0.5162779071667574777562819, 0.5215179784199908258105606, 0.5267384531092077401231844, 0.5319391350698066637637706, 0.5371198288809177797701793, 0.5422803398727461474300859, 0.5474204741338866161668468, 0.5525400385186102421644070, 0.5576388406541219339368088, 0.5627166889477890541289656, 0.5677733925943407059267120, 0.5728087615830374335557009, 0.5778226067048110674604360, 0.5828147395593744458765762, 0.5877849725623007456415722, 0.5927331189520721562306608, 0.5976589927970976321572046, 0.6025624090026994600382737, 0.6074431833180683777981926, 0.6123011323431869846644595, 0.6171360735357211818019505, 0.6219478252178793846326095, 0.6267362065832392490988318, 0.6315010377035416553494506, 0.6362421395354516935575740, 0.6409593339272863978194482, 0.6456524436257089753330001, 0.6503212922823892793136899, 0.6549657044606302753737317, 0.6595855056419602523685720, 0.6641805222326905300017078, 0.6687505815704384167754210, 0.6732955119306151731807642, 0.6778151425328787363350998, 0.6823093035475509635996236, 0.6867778261019991540425409, 0.6912205422869816079558685, 0.6956372851629569859851427, 0.7000278887663572307915895, 0.7043921881158238155354902, 0.7087300192184070848475163, 0.7130412190757284553416507, 0.7173256256901052441189100, 0.7215830780706378951153816, 0.7258134162392593745610389, 0.7300164812367465082373380, 0.7341921151286930346516885, 0.7383401610114441496854630, 0.7424604630179923197192207, 0.7465528663238341416942072, 0.7506172171527880300329109, 0.7546533627827725118134392, 0.7586611515515449130726824, 0.7626404328624002206015913, 0.7665910571898299050923647, 0.7705128760851404930018538, 0.7744057421820316760079998, 0.7782695092021337484565606, 0.7821040319605041647237048, 0.7859091663710830099561901, 0.7896847694521071791947507, 0.7934306993314830614379285, 0.7971468152521175267628422, 0.8008329775772070161862372, 0.8044890477954845355235412, 0.8081148885264243560855026, 0.8117103635254042266412553, 0.8152753376888249026732770, 0.8188096770591868005536242, 0.8223132488301235858819787, 0.8257859213513925068443721, 0.8292275641338212850768968, 0.8326380478542113781512150, 0.8360172443601974294381733, 0.8393650266750627227522641, 0.8426812690025104608329811, 0.8459658467313906883792422, 0.8492186364403826820199251, 0.8524395159026326312771384, 0.8556283640903464362590494, 0.8587850611793374495058711, 0.8619094885535289911058997, 0.8650015288094114678982387, 0.8680610657604539292849800, 0.8710879844414698938880857, 0.8740821711129372830049576, 0.8770435132652722985416439, 0.8799718996230570848337538, 0.8828672201492210155023745, 0.8857293660491754482355527, 0.8885582297749017921351663, 0.8913537050289927340242104, 0.8941156867686464718706125, 0.8968440712096138052506156, 0.8995387558300979345474886, 0.9021996393746068223597927, 0.9048266218577579723776075, 0.9074196045680354827749729, 0.9099784900714992329623006, 0.9125031822154460643436214, 0.9149935861320228175302595, 0.9174496082417910902748409, 0.9198711562572435822074657, 0.9222581391862718942794141, 0.9246104673355856526489486, 0.9269280523140828285786768, 0.9292108070361711277546193, 0.9314586457250403242837002, 0.9336714839158854164789745, 0.9358492384590804834007204, 0.9379918275233031229867813, 0.9400991705986093544775539, 0.9421711884994588697201555, 0.9442078033676905198230562, 0.9462089386754479255274304, 0.9481745192280551015654245, 0.9501044711668419871894147, 0.9519987219719197769813274, 0.9538572004649059479887372, 0.9556798368115988811866200, 0.9574665625246019772327448, 0.9592173104658971684737507, 0.9609320148493677311718534, 0.9626106112432703039637754, 0.9642530365726560206402068, 0.9658592291217406674540047, 0.9674291285362237773389233, 0.9689626758255565756615864, 0.9704598133651586944555050, 0.9719204848985835745206522, 0.9733446355396324773464471, 0.9747322117744170315712560, 0.9760831614633702416830300, 0.9773974338432058899681861, 0.9786749795288262664309572, 0.9799157505151781656726285, 0.9811197001790570947322311, 0.9822867832808596419166429, 0.9834169559662839640681455, 0.9845101757679783590716126, 0.9855664016071379024692622, 0.9865855937950491429603684, 0.9875677140345828729848910, 0.9885127254216350200148487, 0.9894205924465157453777048, 0.9902912809952868962106899, 0.9911247583510480415528399, 0.9919209931951714500244370, 0.9926799556084865573546763, 0.9934016170724147657859271, 0.9940859504700558793702825, 0.9947329300872282225027936, 0.9953425316134657151476031, 0.9959147321429772566997088, 0.9964495101755774022837600, 0.9969468456176038804367370, 0.9974067197828498321611183, 0.9978291153935628466036470, 0.9982140165816127953876923, 0.9985614088900397275573677, 0.9988712792754494246541769, 0.9991436161123782382453400, 0.9993784092025992514480161, 0.9995756497983108555936109, 0.9997353306710426625827368, 0.9998574463699794385446275, 0.9999419946068456536361287, 0.9999889909843818679872841}; +static double w512[256] = {0.0061299051754057857591564, 0.0061296748380364986664278, 0.0061292141719530834395471, 0.0061285231944655327693402, 0.0061276019315380226384508, 0.0061264504177879366912426, 0.0061250686964845654506976, 0.0061234568195474804311878, 0.0061216148475445832082156, 0.0061195428496898295184288, 0.0061172409038406284754329, 0.0061147090964949169991245, 0.0061119475227879095684795, 0.0061089562864885234199252, 0.0061057354999954793256260, 0.0061022852843330780981965, 0.0060986057691466529805468, 0.0060946970926976980917399, 0.0060905594018586731119147, 0.0060861928521074844014940, 0.0060815976075216427620556, 0.0060767738407720980583934, 0.0060717217331167509334394, 0.0060664414743936418598512, 0.0060609332630138177841916, 0.0060551973059538766317450, 0.0060492338187481899521175, 0.0060430430254808039978627, 0.0060366251587770195404584, 0.0060299804597946507400317, 0.0060231091782149633972884, 0.0060160115722332929281516, 0.0060086879085493424136484, 0.0060011384623571610896056, 0.0059933635173348036527221, 0.0059853633656336707715812, 0.0059771383078675312031423, 0.0059686886531012259272183, 0.0059600147188390547233923, 0.0059511168310128456267588, 0.0059419953239697077107922, 0.0059326505404594676575446, 0.0059230828316217905872556, 0.0059132925569729856313229, 0.0059032800843924967444267, 0.0058930457901090792634301, 0.0058825900586866627324847, 0.0058719132830099005255609, 0.0058610158642694068093892, 0.0058498982119466814015496, 0.0058385607437987230901727, 0.0058270038858423319934219, 0.0058152280723381015486124, 0.0058032337457741007324836, 0.0057910213568492471257818, 0.0057785913644563714469284, 0.0057659442356649741911390, 0.0057530804457036750229319, 0.0057400004779423555815070, 0.0057267048238739963699973, 0.0057131939830962084110906, 0.0056994684632924603629882, 0.0056855287802130018011102, 0.0056713754576554833823756, 0.0056570090274452746202723, 0.0056424300294154800102991, 0.0056276390113866542566918, 0.0056126365291462173626557, 0.0055974231464275703576030, 0.0055819994348889124461425, 0.0055663659740917603747899, 0.0055505233514791708235538, 0.0055344721623536666407146, 0.0055182130098548677502395, 0.0055017465049368275723757, 0.0054850732663450758090285, 0.0054681939205933684565648, 0.0054511091019401459196852, 0.0054338194523647001109732, 0.0054163256215430514316688, 0.0053986282668235365401123, 0.0053807280532021078251738, 0.0053626256532973455128155, 0.0053443217473251833447318, 0.0053258170230733487787774, 0.0053071121758755186716175, 0.0052882079085851914147269, 0.0052691049315492765055207, 0.0052498039625814025460136, 0.0052303057269349446719890, 0.0052106109572757724261988, 0.0051907203936547190996206, 0.0051706347834797735752665, 0.0051503548814879957194620, 0.0051298814497171563759039, 0.0051092152574771030281542, 0.0050883570813208522065339, 0.0050673077050154097256505, 0.0050460679195123198490183, 0.0050246385229179444874178, 0.0050030203204634735477834, 0.0049812141244746675595135, 0.0049592207543413337151533, 0.0049370410364865364724225, 0.0049146758043355438745290, 0.0048921258982845107556462, 0.0048693921656689000083132, 0.0048464754607316430993636, 0.0048233766445910410307843, 0.0048000965852084069516609, 0.0047766361573554516370718, 0.0047529962425814130594576, 0.0047291777291799312876071, 0.0047051815121556699579709, 0.0046810084931906855725376, 0.0046566595806105458869828, 0.0046321356893501986622283, 0.0046074377409195920619320, 0.0045825666633690479877601, 0.0045575233912543896535753, 0.0045323088656018247089130, 0.0045069240338725852313010, 0.0044813698499273259161146, 0.0044556472739902818017469, 0.0044297572726131868769073, 0.0044037008186389549258496, 0.0043774788911651239762643, 0.0043510924755070657234522, 0.0043245425631609613132305, 0.0042978301517665448748000, 0.0042709562450696162035304, 0.0042439218528843240022977, 0.0042167279910552210986262, 0.0041893756814190930634598, 0.0041618659517665616659011, 0.0041341998358034646067195, 0.0041063783731120129818357, 0.0040784026091117279353449, 0.0040502735950201579699371, 0.0040219923878133783908191, 0.0039935600501862743674273, 0.0039649776505126091053562, 0.0039362462628048786290012, 0.0039073669666739546834366, 0.0038783408472885172720108, 0.0038491689953342783540510, 0.0038198525069729982349166, 0.0037903924838012961884344, 0.0037607900328092568594835, 0.0037310462663388340021755, 0.0037011623020420531166926, 0.0036711392628390145554094, 0.0036409782768756986764252, 0.0036106804774815746300758, 0.0035802470031270143713799, 0.0035496789973805134987000, 0.0035189776088657205261605, 0.0034881439912182762045767, 0.0034571793030424645127888, 0.0034260847078676769483860, 0.0033948613741046917538288, 0.0033635104750017697209450, 0.0033320331886005682236783, 0.0033004306976918751358177, 0.0032687041897711642972145, 0.0032368548569939741987234, 0.0032048838961311115627642, 0.0031727925085236815030060, 0.0031405819000379459532169, 0.0031082532810200120618074, 0.0030758078662503522550163, 0.0030432468748981576780527, 0.0030105715304755267298129, 0.0029777830607914904130339, 0.0029448826979058762279357, 0.0029118716780830123435331, 0.0028787512417452737868732, 0.0028455226334264723964728, 0.0028121871017250922921949, 0.0027787458992573726197173, 0.0027452002826102393336092, 0.0027115515122940877888456, 0.0026778008526954179163600, 0.0026439495720293237639656, 0.0026099989422918391896635, 0.0025759502392121415000167, 0.0025418047422046148318992, 0.0025075637343207750815413, 0.0024732285022010581903898, 0.0024388003360264736029032, 0.0024042805294701247170072, 0.0023696703796485981535706, 0.0023349711870732236769383, 0.0023001842556012066042973, 0.0022653108923866345474810, 0.0022303524078313603367724, 0.0021953101155357629823745, 0.0021601853322493885355395, 0.0021249793778214727179358, 0.0020896935751513471947536, 0.0020543292501387313744068, 0.0020188877316339116255770, 0.0019833703513878098109153, 0.0019477784440019430461334, 0.0019121133468782766036998, 0.0018763764001689718921795, 0.0018405689467260314557679, 0.0018046923320508429542037, 0.0017687479042436241015783, 0.0017327370139527705642995, 0.0016966610143241088445575, 0.0016605212609500562072903, 0.0016243191118186897474239, 0.0015880559272627267421479, 0.0015517330699084184928942, 0.0015153519046243599371387, 0.0014789137984702174059640, 0.0014424201206453770259886, 0.0014058722424375164225552, 0.0013692715371711025869345, 0.0013326193801558190401403, 0.0012959171486349257824991, 0.0012591662217335559930561, 0.0012223679804069540808915, 0.0011855238073886605549070, 0.0011486350871386503607080, 0.0011117032057914329649653, 0.0010747295511041247428251, 0.0010377155124045074300544, 0.0010006624805390909706032, 0.0009635718478212056798501, 0.0009264450079791582697455, 0.0008892833561045005372012, 0.0008520882886004809402792, 0.0008148612031307819965602, 0.0007776034985686972438014, 0.0007403165749469818962867, 0.0007030018334087411433900, 0.0006656606761599343409382, 0.0006282945064244358390880, 0.0005909047284032230162400, 0.0005534927472403894647847, 0.0005160599690007674370993, 0.0004786078006679509066920, 0.0004411376501795405636493, 0.0004036509265333198797447, 0.0003661490400356268530141, 0.0003286334028523334162522, 0.0002911054302514885125319, 0.0002535665435705865135866, 0.0002160181779769908583388, 0.0001784618055459532946077, 0.0001408990173881984930124, 0.0001033319034969132362968, 0.0000657657316592401958310, 0.0000282526373739346920387}; + +/* n = 1024 */ +static double x1024[512] = {0.0015332313560626384065387, 0.0045996796509132604743248, 0.0076660846940754867627839, 0.0107324176515422803327458, 0.0137986496899844401539048, 0.0168647519770217265449962, 0.0199306956814939776907024, 0.0229964519737322146859283, 0.0260619920258297325581921, 0.0291272870119131747190088, 0.0321923081084135882953009, 0.0352570264943374577920498, 0.0383214133515377145376052, 0.0413854398649847193632977, 0.0444490772230372159692514, 0.0475122966177132524285687, 0.0505750692449610682823599, 0.0536373663049299446784129, 0.0566991590022410150066456, 0.0597604185462580334848567, 0.0628211161513580991486838, 0.0658812230372023327000985, 0.0689407104290065036692117, 0.0719995495578116053446277, 0.0750577116607543749280791, 0.0781151679813377563695878, 0.0811718897697013033399379, 0.0842278482828915197978074, 0.0872830147851321356094940, 0.0903373605480943146797811, 0.0933908568511667930531222, 0.0964434749817259444449839, 0.0994951862354057706638682, 0.1025459619163678143852404, 0.1055957733375709917393206, 0.1086445918210413421754502, 0.1116923886981416930665228, 0.1147391353098412365177689, 0.1177848030069850158450139, 0.1208293631505633191883714, 0.1238727871119809777282145, 0.1269150462733265659711591, 0.1299561120276415015747167, 0.1329959557791890421802183, 0.1360345489437231767245806, 0.1390718629487574087024745, 0.1421078692338334288514767, 0.1451425392507896747338214, 0.1481758444640297746894331, 0.1512077563507908736360111, 0.1542382464014118381930443, 0.1572672861196013386077717, 0.1602948470227058049622614, 0.1633209006419772551419632, 0.1663454185228409920472972, 0.1693683722251631675310675, 0.1723897333235182105457458, 0.1754094734074561169859457, 0.1784275640817695987127083, 0.1814439769667610892475458, 0.1844586836985096036255346, 0.1874716559291374498981239, 0.1904828653270767897777182, 0.1934922835773360459175133, 0.1964998823817661533215037, 0.1995056334593266523810493, 0.2025095085463516210358758, 0.2055114793968154435588961, 0.2085115177825984134657778, 0.2115095954937521680517391, 0.2145056843387649520596422, 0.2174997561448267079850562, 0.2204917827580939905255947, 0.2234817360439547026834844, 0.2264695878872926510320010, 0.2294553101927519176581055, 0.2324388748850010462953415, 0.2354202539089970401627982, 0.2383994192302491690277166, 0.2413763428350825830111093, 0.2443509967309017306575811, 0.2473233529464535787923793, 0.2502933835320906316905658, 0.2532610605600337470850902, 0.2562263561246347465424530, 0.2591892423426388177365829, 0.2621496913534467061535080, 0.2651076753193766937613805, 0.2680631664259263621824189, 0.2710161368820341379053566, 0.2739665589203406170790369, 0.2769144047974496674298651, 0.2798596467941893048479266, 0.2828022572158723421886958, 0.2857422083925568078394062, 0.2886794726793061316013119, 0.2916140224564490954412652, 0.2945458301298395466682397, 0.2974748681311158710926665, 0.3004011089179602237287060, 0.3033245249743575146018584, 0.3062450888108541472266190, 0.3091627729648165073212094, 0.3120775500006891993287636, 0.3149893925102530283167230, 0.3178982731128827248285835, 0.3208041644558044102645582, 0.3237070392143528003701590, 0.3266068700922281444141618, 0.3295036298217528976399056, 0.3323972911641281245763845, 0.3352878269096896307981228, 0.3381752098781638207253743, 0.3410594129189232790587667, 0.3439404089112420734451077, 0.3468181707645507759736923, 0.3496926714186912011050938, 0.3525638838441708576370887, 0.3554317810424171123150528, 0.3582963360460310626968790, 0.3611575219190411168852009, 0.3640153117571562777424605, 0.3668696786880191292071420, 0.3697205958714585223322883, 0.3725680364997419586702471, 0.3754119737978276686304337, 0.3782523810236163824397703, 0.3810892314682027913383487, 0.3839224984561266966457784, 0.3867521553456238443366159, 0.3895781755288764427662286, 0.3924005324322633611914264, 0.3952191995166100067331951, 0.3980341502774378774318886, 0.4008453582452137890482864, 0.4036527969855987732669841, 0.4064564400996966449616823, 0.4092562612243022361850445, 0.4120522340321492945489319, 0.4148443322321580436639788, 0.4176325295696824033106488, 0.4204167998267568670171117, 0.4231971168223430347225035, 0.4259734544125757982073747, 0.4287457864910091769763965, 0.4315140869888618022816824, 0.4342783298752620469783905, 0.4370384891574927989076034, 0.4397945388812358755048319, 0.4425464531308160773358662, 0.4452942060294448782650898, 0.4480377717394637499647905, 0.4507771244625871184774399, 0.4535122384401449505463744, 0.4562430879533249674337895, 0.4589696473234144839484647, 0.4616918909120418704091584, 0.4644097931214176352731591, 0.4671233283945751261630457, 0.4698324712156108470282980, 0.4725371961099243891820077, 0.4752374776444579739565725, 0.4779332904279356047259052, 0.4806246091111018260453658, 0.4833114083869600876643171, 0.4859936629910107111699206, 0.4886713477014884570245255, 0.4913444373395996897627612, 0.4940129067697591391182235, 0.4966767308998262548534419, 0.4993358846813411530706387, 0.5019903431097601517846292, 0.5046400812246908935430768, 0.5072850741101270528831987, 0.5099252968946826264179220, 0.5125607247518258033484145, 0.5151913329001124142038603, 0.5178170966034189556133159, 0.5204379911711751889184691, 0.5230539919585963104401304, 0.5256650743669146912153147, 0.5282712138436111840258187, 0.5308723858826459955432696, 0.5334685660246891214197081, 0.5360597298573503421568799, 0.5386458530154087775915395, 0.5412269111810419978382210, 0.5438028800840546885350993, 0.5463737355021068682427603, 0.5489394532609416558499039, 0.5515000092346125858442412, 0.5540553793457104693110943, 0.5566055395655897985264809, 0.5591504659145946930157566, 0.5616901344622843849532002, 0.5642245213276582417822586, 0.5667536026793803239405196, 0.5692773547360034755778519, 0.5717957537661929461605442, 0.5743087760889495408586850, 0.5768163980738322976184566, 0.5793185961411806888254667, 0.5818153467623363454697137, 0.5843066264598643017272666, 0.5867924118077737578782574, 0.5892726794317383594853053, 0.5917474060093159907610475, 0.5942165682701680800580147, 0.5966801429962784154186793, 0.5991381070221714681281111, 0.6015904372351302222163013, 0.6040371105754135078618616, 0.6064781040364728366534687, 0.6089133946651687366701116, 0.6113429595619865853458987, 0.6137667758812519380899084, 0.6161848208313453506363029, 0.6185970716749166931046915, 0.6210035057290989537555048, 0.6234041003657215304299416, 0.6257988330115230076688675, 0.6281876811483634175098794, 0.6305706223134359819666081, 0.6329476340994783351992008, 0.6353186941549832233898213, 0.6376837801844086803419153, 0.6400428699483876768269192, 0.6423959412639372417070377, 0.6447429720046670528676835, 0.6470839401009874959981582, 0.6494188235403171892641570, 0.6517476003672899719207013, 0.6540702486839613549191454, 0.6563867466500144315669620, 0.6586970724829652463040876, 0.6610012044583676196647058, 0.6632991209100174274984589, 0.6655908002301563325302097, 0.6678762208696749663426270, 0.6701553613383155598710345, 0.6724282002048740205051479, 0.6746947160974014538975312, 0.6769548877034051285838219, 0.6792086937700488815250166, 0.6814561131043529626873631, 0.6836971245733933167806834, 0.6859317071045003002812397, 0.6881598396854568318705713, 0.6903815013646959744270519, 0.6925966712514979467122689, 0.6948053285161865628996815, 0.6970074523903250980984011, 0.6992030221669115780303307, 0.7013920172005734910243170, 0.7035744169077619204963997, 0.7057502007669450960906928, 0.7079193483188013616608982, 0.7100818391664115582779368, 0.7122376529754508204546805, 0.7143867694743797837842896, 0.7165291684546352021941915, 0.7186648297708199730232898, 0.7207937333408925681355609, 0.7229158591463558692887801, 0.7250311872324454059827217, 0.7271396977083169940167956, 0.7292413707472337729927181, 0.7313361865867526410034676, 0.7334241255289100847554419, 0.7355051679404074033764222, 0.7375792942527953241676460, 0.7396464849626580085640129, 0.7417067206317964465721772, 0.7437599818874112379620360, 0.7458062494222847584928838, 0.7478455039949627094612890, 0.7498777264299350488635483, 0.7519028976178163024713854, 0.7539209985155252531253957, 0.7559320101464640065565832, 0.7579359136006964320521972, 0.7599326900351259762879594, 0.7619223206736728486546595, 0.7639047868074505764130149, 0.7658800697949419280166093, 0.7678481510621742029486694, 0.7698090121028938864243967, 0.7717626344787406673165402, 0.7737089998194208176678866, 0.7756480898228799321603470, 0.7775798862554750259163361, 0.7795043709521459890141759, 0.7814215258165863961053031, 0.7833313328214136695271245, 0.7852337740083385943114429, 0.7871288314883341834944720, 0.7890164874418038921405657, 0.7908967241187491784979139, 0.7927695238389364107105941, 0.7946348689920631175175217, 0.7964927420379235813750136, 0.7983431255065737724458586, 0.8001860019984956219039900, 0.8020213541847606330100649, 0.8038491648071928284194859, 0.8056694166785310321906380, 0.8074820926825904849673728, 0.8092871757744237908160400, 0.8110846489804811942036542, 0.8128744953987701856100790, 0.8146566981990144342734272, 0.8164312406228120465742028, 0.8181981059837931485700490, 0.8199572776677767911993239, 0.8217087391329271766780945, 0.8234524739099092046215225, 0.8251884656020433364270094, 0.8269166978854597764628854, 0.8286371545092519686128428, 0.8303498192956294067327593, 0.8320546761400697575830038, 0.8337517090114702948057846, 0.8354409019522986425235764, 0.8371222390787428271411563, 0.8387957045808606359402829, 0.8404612827227282810625704, 0.8421189578425883674826439, 0.8437687143529971635802028, 0.8454105367409711729261812, 0.8470444095681330059047621, 0.8486703174708565497995875, 0.8502882451604114359791023, 0.8518981774231068028225812, 0.8535000991204343530350070, 0.8550939951892107040056078, 0.8566798506417190298715048, 0.8582576505658499939545848, 0.8598273801252419702463831, 0.8613890245594205526224495, 0.8629425691839373504743648, 0.8644879993905080694542896, 0.8660253006471498760336444, 0.8675544584983180445842596, 0.8690754585650418856970762, 0.8705882865450599544602407, 0.8720929282129545374252050, 0.8735893694202854169962281, 0.8750775960957229119854680, 0.8765575942451801930826613, 0.8780293499519448719952049, 0.8794928493768098630212838, 0.8809480787582035158255322, 0.8823950244123190181935674, 0.8838336727332430675485994, 0.8852640101930838100201983, 0.8866860233420980458621863, 0.8880996988088177000235219, 0.8895050233001755566829532, 0.8909019836016302565651375, 0.8922905665772905558628607, 0.8936707591700388455969280, 0.8950425484016539302522575, 0.8964059213729330645356690, 0.8977608652638132471078410, 0.8991073673334917701488930, 0.9004454149205460236240486, 0.9017749954430525531228459, 0.9030960963987053701523781, 0.9044087053649335137720782, 0.9057128099990178624646022, 0.9070083980382071951444166, 0.9082954572998335002127549, 0.9095739756814265315746820, 0.9108439411608276105410847, 0.9121053417963026725455006, 0.9133581657266545576127977, 0.9146024011713345435238301, 0.9158380364305531206273175, 0.9170650598853900072573273, 0.9182834599979034047218800, 0.9194932253112384908353520, 0.9206943444497351509745089, 0.9218868061190349456451742, 0.9230705991061873135537215, 0.9242457122797550091847637, 0.9254121345899187738936182, 0.9265698550685812395293315, 0.9277188628294700636112689, 0.9288591470682402950895005, 0.9299906970625759697264543, 0.9311135021722909341445515, 0.9322275518394288975917975, 0.9333328355883627104845635, 0.9344293430258928687940732, 0.9355170638413452433503852, 0.9365959878066680331449597, 0.9376661047765279417201973, 0.9387274046884055757416456, 0.9397798775626900648558921, 0.9408235135027729019444869, 0.9418583026951410028915762, 0.9428842354094689849902736, 0.9439013019987106631201510, 0.9449094928991897628355911, 0.9459087986306898495121205, 0.9468992097965434727052183, 0.9478807170837205248834878, 0.9488533112629158137054760, 0.9498169831886358470168335, 0.9507717237992848297519245, 0.9517175241172498719314184, 0.9526543752489854069548347, 0.9535822683850968193944507, 0.9545011948004232815044368, 0.9554111458541197976665483, 0.9563121129897384560011695, 0.9572040877353088863799924, 0.9580870617034179240840996, 0.9589610265912884783587268, 0.9598259741808576051234879, 0.9606818963388537831043733, 0.9615287850168733926613630, 0.9623666322514563965930439, 0.9631954301641612222071790, 0.9640151709616388439537466, 0.9648258469357060659245549, 0.9656274504634180035311332, 0.9664199740071397636802195, 0.9672034101146173227737943, 0.9679777514190476018682591, 0.9687429906391477383350273, 0.9694991205792235533724866, 0.9702461341292372147270016, 0.9709840242648740939883669, 0.9717127840476088178328839, 0.9724324066247705125950353, 0.9731428852296072415565604, 0.9738442131813496343496072, 0.9745363838852737078785517, 0.9752193908327628781730396, 0.9758932276013691625928266, 0.9765578878548735718130775, 0.9772133653433456910269459, 0.9778596539032024498104955, 0.9784967474572660801033674, 0.9791246400148212617670490, 0.9797433256716714551911835, 0.9803527986101944204270933, 0.9809530530993969223366037, 0.9815440834949686212533729, 0.9821258842393351486632952, 0.9826984498617103674201996, 0.9832617749781478160230522, 0.9838158542915913364912672, 0.9843606825919248853856025, 0.9848962547560215275335618, 0.9854225657477916120303537, 0.9859396106182301300994116, 0.9864473845054632544104222, 0.9869458826347940594679517, 0.9874351003187474227003598, 0.9879150329571141058970610, 0.9883856760369940166627304, 0.9888470251328386495802522, 0.9892990759064927068006818, 0.9897418241072348978090276, 0.9901752655718179181502248, 0.9905993962245076069415402, 0.9910142120771212830473891, 0.9914197092290652598522332, 0.9918158838673715386394944, 0.9922027322667336806727008, 0.9925802507895418581838653, 0.9929484358859170846092543, 0.9933072840937446245820355, 0.9936567920387065844051246, 0.9939969564343136839997662, 0.9943277740819362116746914, 0.9946492418708341635125525, 0.9949613567781865697596566, 0.9952641158691200113800912, 0.9955575162967363309635588, 0.9958415553021395435525955, 0.9961162302144619548145649, 0.9963815384508894965215124, 0.9966374775166862927999356, 0.9968840450052184754903082, 0.9971212385979772738362093, 0.9973490560646014135491635, 0.9975674952628988745188845, 0.9977765541388680773265018, 0.9979762307267185998745420, 0.9981665231488915727109186, 0.9983474296160799746514418, 0.9985189484272491654281575, 0.9986810779696581776171579, 0.9988338167188825964389443, 0.9989771632388403756649803, 0.9991111161818228462260355, 0.9992356742885348165163858, 0.9993508363881507486653971, 0.9994566013984000492749057, 0.9995529683257070064969677, 0.9996399362654382464576482, 0.9997175044023747284307007, 0.9997856720116889628341744, 0.9998444384611711916084367, 0.9998938032169419878731474, 0.9999337658606177711221103, 0.9999643261538894550943330, 0.9999854843850284447675914, 0.9999972450545584403516182}; +static double w1024[512] = {0.0030664603092439082115513, 0.0030664314747171934849726, 0.0030663738059349007324470, 0.0030662873034393008056861, 0.0030661719680437936084028, 0.0030660278008329004477528, 0.0030658548031622538363679, 0.0030656529766585847450783, 0.0030654223232197073064431, 0.0030651628450145009692318, 0.0030648745444828901040266, 0.0030645574243358210601357, 0.0030642114875552366740338, 0.0030638367373940482295700, 0.0030634331773761048702058, 0.0030630008112961604635720, 0.0030625396432198379186545, 0.0030620496774835909559465, 0.0030615309186946633309249, 0.0030609833717310455112352, 0.0030604070417414288079918, 0.0030598019341451569616257, 0.0030591680546321751827342, 0.0030585054091629766484119, 0.0030578140039685464545661, 0.0030570938455503030247440, 0.0030563449406800369760227, 0.0030555672963998474425352, 0.0030547609200220758572342, 0.0030539258191292371925135, 0.0030530620015739486603347, 0.0030521694754788558725307, 0.0030512482492365564619779, 0.0030502983315095211653578, 0.0030493197312300123682482, 0.0030483124576000001133114, 0.0030472765200910755723677, 0.0030462119284443619831693, 0.0030451186926704230517109, 0.0030439968230491688209395, 0.0030428463301297590067471, 0.0030416672247305038021562, 0.0030404595179387621506312, 0.0030392232211108374894710, 0.0030379583458718709642643, 0.0030366649041157321154111, 0.0030353429080049070377385, 0.0030339923699703840142628, 0.0030326133027115366251721, 0.0030312057191960043331307, 0.0030297696326595705460252, 0.0030283050566060381583022, 0.0030268120048071025720655, 0.0030252904913022221991274, 0.0030237405303984864452325, 0.0030221621366704811776946, 0.0030205553249601516777118, 0.0030189201103766630786495, 0.0030172565082962582916016, 0.0030155645343621134195681, 0.0030138442044841906616068, 0.0030120955348390887083441, 0.0030103185418698906302495, 0.0030085132422860092601062, 0.0030066796530630300711306, 0.0030048177914425515522176, 0.0030029276749320230818149, 0.0030010093213045803019478, 0.0029990627485988779939449, 0.0029970879751189204574353, 0.0029950850194338893942123, 0.0029930539003779692985814, 0.0029909946370501703558363, 0.0029889072488141488505262, 0.0029867917552980250862041, 0.0029846481763941988183689, 0.0029824765322591622023349, 0.0029802768433133102577897, 0.0029780491302407488518214, 0.0029757934139891002022209, 0.0029735097157693059028890, 0.0029711980570554274731990, 0.0029688584595844444331918, 0.0029664909453560499065010, 0.0029640955366324437529314, 0.0029616722559381232326340, 0.0029592211260596712038487, 0.0029567421700455418562030, 0.0029542354112058439815854, 0.0029517008731121217846274, 0.0029491385795971332348581, 0.0029465485547546259626151, 0.0029439308229391107008170, 0.0029412854087656322747309, 0.0029386123371095381418860, 0.0029359116331062444843108, 0.0029331833221509998552933, 0.0029304274298986463828860, 0.0029276439822633785324025, 0.0029248330054184994301727, 0.0029219945257961747508486, 0.0029191285700871841705750, 0.0029162351652406703883623, 0.0029133143384638857180205, 0.0029103661172219362530391, 0.0029073905292375236068160, 0.0029043876024906842306667, 0.0029013573652185263120627, 0.0028982998459149642555740, 0.0028952150733304507490135, 0.0028921030764717064173001, 0.0028889638846014470665859, 0.0028857975272381085212091, 0.0028826040341555690560623, 0.0028793834353828694269858, 0.0028761357612039305018167, 0.0028728610421572684947521, 0.0028695593090357078067012, 0.0028662305928860914743281, 0.0028628749250089892305081, 0.0028594923369584031789413, 0.0028560828605414710856927, 0.0028526465278181672904478, 0.0028491833711010012402964, 0.0028456934229547136488796, 0.0028421767161959702837564, 0.0028386332838930533848701, 0.0028350631593655507170153, 0.0028314663761840422592303, 0.0028278429681697845340603, 0.0028241929693943925796601, 0.0028205164141795195677262, 0.0028168133370965340702726, 0.0028130837729661949782821, 0.0028093277568583240752928, 0.0028055453240914762689974, 0.0028017365102326074839556, 0.0027979013510967402185435, 0.0027940398827466267692845, 0.0027901521414924101257281, 0.0027862381638912825390663, 0.0027822979867471417676962, 0.0027783316471102450029635, 0.0027743391822768604783394, 0.0027703206297889167653083, 0.0027662760274336497592617, 0.0027622054132432473587211, 0.0027581088254944918412282, 0.0027539863027083999392661, 0.0027498378836498606195970, 0.0027456636073272705694208, 0.0027414635129921673927833, 0.0027372376401388605206822, 0.0027329860285040598383428, 0.0027287087180665020331547, 0.0027244057490465746667821, 0.0027200771619059379749851, 0.0027157229973471443987056, 0.0027113432963132558499974, 0.0027069380999874587163979, 0.0027025074497926766073634, 0.0026980513873911808464073, 0.0026935699546841987126055, 0.0026890631938115194351518, 0.0026845311471510979446691, 0.0026799738573186563850015, 0.0026753913671672833892344, 0.0026707837197870311237119, 0.0026661509585045101038391, 0.0026614931268824817854798, 0.0026568102687194489357814, 0.0026521024280492437872770, 0.0026473696491406139791397, 0.0026426119764968062894804, 0.0026378294548551481626046, 0.0026330221291866270351630, 0.0026281900446954674651512, 0.0026233332468187060677353, 0.0026184517812257642618999, 0.0026135456938180188319369, 0.0026086150307283703078113, 0.0026036598383208091684657, 0.0025986801631899798721388, 0.0025936760521607427178014, 0.0025886475522877335418257, 0.0025835947108549212540321, 0.0025785175753751632172710, 0.0025734161935897584747222, 0.0025682906134679988291122, 0.0025631408832067177780710, 0.0025579670512298373098703, 0.0025527691661879125638030, 0.0025475472769576743594882, 0.0025423014326415695994010, 0.0025370316825672995489502, 0.0025317380762873559984451, 0.0025264206635785553113127, 0.0025210794944415703629476, 0.0025157146191004603745948, 0.0025103260880021986466869, 0.0025049139518161981960773, 0.0024994782614338353016280, 0.0024940190679679709626349, 0.0024885364227524702745874, 0.0024830303773417197267843, 0.0024775009835101424263432, 0.0024719482932517112531633, 0.0024663723587794599504176, 0.0024607732325249921551741, 0.0024551509671379883737605, 0.0024495056154857109065099, 0.0024438372306525067265426, 0.0024381458659393083172574, 0.0024324315748631324732279, 0.0024266944111565770692147, 0.0024209344287673158020275, 0.0024151516818575909099866, 0.0024093462248037038747545, 0.0024035181121955041103265, 0.0023976673988358756439882, 0.0023917941397402217940673, 0.0023858983901359478493246, 0.0023799802054619417548485, 0.0023740396413680528093376, 0.0023680767537145683786720, 0.0023620915985716886306938, 0.0023560842322189992961374, 0.0023500547111449424606655, 0.0023440030920462853929883, 0.0023379294318275874140606, 0.0023318337876006648123684, 0.0023257162166840538103394, 0.0023195767766024715869239, 0.0023134155250862753614165, 0.0023072325200709195436049, 0.0023010278196964109553481, 0.0022948014823067621287099, 0.0022885535664494426857857, 0.0022822841308748288053830, 0.0022759932345356507817318, 0.0022696809365864386804193, 0.0022633472963829660967620, 0.0022569923734816920218464, 0.0022506162276392008214839, 0.0022442189188116403333494, 0.0022378005071541580875846, 0.0022313610530203356561684, 0.0022249006169616211363732, 0.0022184192597267597736437, 0.0022119170422612227292520, 0.0022053940257066339981005, 0.0021988502714001954820607, 0.0021922858408741102242558, 0.0021857007958550038097087, 0.0021790951982633439377969, 0.0021724691102128581719720, 0.0021658225940099498722195, 0.0021591557121531123157498, 0.0021524685273323410114303, 0.0021457611024285442134846, 0.0021390335005129516400021, 0.0021322857848465214018174, 0.0021255180188793451473363, 0.0021187302662500514289029, 0.0021119225907852072963166, 0.0021050950564987181231273, 0.0020982477275912256713511, 0.0020913806684495044002679, 0.0020844939436458560249764, 0.0020775876179375023304007, 0.0020706617562659762464561, 0.0020637164237565111901030, 0.0020567516857174286800274, 0.0020497676076395242297101, 0.0020427642551954515246552, 0.0020357416942391048895728, 0.0020286999908050000513193, 0.0020216392111076532034194, 0.0020145594215409583780096, 0.0020074606886775631310555, 0.0020003430792682425467160, 0.0019932066602412715667394, 0.0019860514987017956507927, 0.0019788776619311997736447, 0.0019716852173864757651327, 0.0019644742326995879988655, 0.0019572447756768374356240, 0.0019499969142982240274419, 0.0019427307167168074883601, 0.0019354462512580664378677, 0.0019281435864192559230531, 0.0019208227908687633255086, 0.0019134839334454626590447, 0.0019061270831580672642844, 0.0018987523091844809062265, 0.0018913596808711472808775, 0.0018839492677323979370705, 0.0018765211394497986196010, 0.0018690753658714940398285, 0.0018616120170115510799024, 0.0018541311630493004367905, 0.0018466328743286767122991, 0.0018391172213575569552912, 0.0018315842748070976623218, 0.0018240341055110702429247, 0.0018164667844651949558009, 0.0018088823828264733221690, 0.0018012809719125190225581, 0.0017936626232008872833327, 0.0017860274083284027592567, 0.0017783753990904859184165, 0.0017707066674404779358362, 0.0017630212854889641021349, 0.0017553193255030957535871, 0.0017476008599059107299616, 0.0017398659612756523665312, 0.0017321147023450870266539, 0.0017243471560008201813452, 0.0017165633952826110422716, 0.0017087634933826857546100, 0.0017009475236450491562317, 0.0016931155595647951096823, 0.0016852676747874154134422, 0.0016774039431081072989678, 0.0016695244384710795200224, 0.0016616292349688570408253, 0.0016537184068415843295541, 0.0016457920284763272637533, 0.0016378501744063736542136, 0.0016298929193105323938983, 0.0016219203380124312385075, 0.0016139325054798132252838, 0.0016059294968238317366751, 0.0015979113872983442154825, 0.0015898782522992045381361, 0.0015818301673635540527516, 0.0015737672081691112886347, 0.0015656894505334603439125, 0.0015575969704133379579831, 0.0015494898439039192754876, 0.0015413681472381023085203, 0.0015332319567857911038062, 0.0015250813490531776215856, 0.0015169164006820223329593, 0.0015087371884489335424584, 0.0015005437892646454426166, 0.0014923362801732949073323, 0.0014841147383516970308228, 0.0014758792411086194189814, 0.0014676298658840552399621, 0.0014593666902484950408286, 0.0014510897919021973371136, 0.0014427992486744579821480, 0.0014344951385228783230315, 0.0014261775395326321501237, 0.0014178465299157314469528, 0.0014095021880102909474427, 0.0014011445922797915073771, 0.0013927738213123422970256, 0.0013843899538199418218713, 0.0013759930686377377783877, 0.0013675832447232857518263, 0.0013591605611558067629844, 0.0013507250971354436709363, 0.0013422769319825164387192, 0.0013338161451367762689788, 0.0013253428161566586165863, 0.0013168570247185350852537, 0.0013083588506159642151809, 0.0012998483737589411687807, 0.0012913256741731463215379, 0.0012827908319991927650686, 0.0012742439274918727294554, 0.0012656850410194029319476, 0.0012571142530626688591208, 0.0012485316442144679896043, 0.0012399372951787519644928, 0.0012313312867698677125706, 0.0012227136999117975374834, 0.0012140846156373981740056, 0.0012054441150876388205601, 0.0011967922795108381551550, 0.0011881291902619003419159, 0.0011794549288015500353964, 0.0011707695766955663898644, 0.0011620732156140160807669, 0.0011533659273304853455891, 0.0011446477937213110513287, 0.0011359188967648107958214, 0.0011271793185405120501566, 0.0011184291412283803494364, 0.0011096684471080465391373, 0.0011008973185580330843445, 0.0010921158380549794491381, 0.0010833240881728665534171, 0.0010745221515822403144596, 0.0010657101110494342805238, 0.0010568880494357913638046, 0.0010480560496968846800697, 0.0010392141948817375023057, 0.0010303625681320423357186, 0.0010215012526813791214350, 0.0010126303318544325762649, 0.0010037498890662086758941, 0.0009948600078212502888805, 0.0009859607717128519688418, 0.0009770522644222739122264, 0.0009681345697179550890732, 0.0009592077714547255541688, 0.0009502719535730179460261, 0.0009413272000980781811114, 0.0009323735951391753507612, 0.0009234112228888108282347, 0.0009144401676219265933610, 0.0009054605136951127822476, 0.0008964723455458144695262, 0.0008874757476915376906225, 0.0008784708047290547115472, 0.0008694576013336085537138, 0.0008604362222581167813022, 0.0008514067523323745586954, 0.0008423692764622569855308, 0.0008333238796289207169173, 0.0008242706468880048763834, 0.0008152096633688312691343, 0.0008061410142736039032099, 0.0007970647848766078261514, 0.0007879810605234072847989, 0.0007788899266300432158601, 0.0007697914686822300749096, 0.0007606857722345520114971, 0.0007515729229096583980656, 0.0007424530063974587204051, 0.0007333261084543168373926, 0.0007241923149022446178008, 0.0007150517116280949619884, 0.0007059043845827542163241, 0.0006967504197803339882351, 0.0006875899032973623698204, 0.0006784229212719745780188, 0.0006692495599031030193850, 0.0006600699054496667875923, 0.0006508840442297606018626, 0.0006416920626198431946113, 0.0006324940470539251567018, 0.0006232900840227562488244, 0.0006140802600730121876541, 0.0006048646618064809156059, 0.0005956433758792483631993, 0.0005864164890008837132649, 0.0005771840879336241764943, 0.0005679462594915592881427, 0.0005587030905398147360662, 0.0005494546679937357307118, 0.0005402010788180699282026, 0.0005309424100261499182844, 0.0005216787486790752896494, 0.0005124101818848942860548, 0.0005031367967977850677401, 0.0004938586806172365939677, 0.0004845759205872291441124, 0.0004752886039954144966810, 0.0004659968181722957880391, 0.0004567006504904070755681, 0.0004474001883634926336095, 0.0004380955192456860150653, 0.0004287867306306889171352, 0.0004194739100509498966958, 0.0004101571450768429896514, 0.0004008365233158462997325, 0.0003915121324117206363681, 0.0003821840600436882993131, 0.0003728523939256121308821, 0.0003635172218051749865499, 0.0003541786314630598135175, 0.0003448367107121305776064, 0.0003354915473966143456333, 0.0003261432293912849189248, 0.0003167918446006485317858, 0.0003074374809581322877037, 0.0002980802264252762217455, 0.0002887201689909301727620, 0.0002793573966704570567274, 0.0002699919975049447012834, 0.0002606240595604292032823, 0.0002512536709271339139118, 0.0002418809197187298044384, 0.0002325058940716253739001, 0.0002231286821442978268308, 0.0002137493721166826096154, 0.0002043680521896465790359, 0.0001949848105845827899210, 0.0001855997355431850062940, 0.0001762129153274925249194, 0.0001668244382203495280013, 0.0001574343925265138930609, 0.0001480428665748079976500, 0.0001386499487219861751244, 0.0001292557273595155266326, 0.0001198602909254695827354, 0.0001104637279257437565603, 0.0001010661269730276014588, 0.0000916675768613669107254, 0.0000822681667164572752810, 0.0000728679863190274661367, 0.0000634671268598044229933, 0.0000540656828939400071988, 0.0000446637581285753393838, 0.0000352614859871986975067, 0.0000258591246764618586716, 0.0000164577275798968681068, 0.0000070700764101825898713}; + +/* n = 3 */ +static double x3[2] = {0.0000000000000000000000000, 0.7745966692414833770358531}; +static double w3[2] = {0.8888888888888888888888889, 0.5555555555555555555555556}; + +/* n = 5 */ +static double x5[3] = {0.0000000000000000000000000, 0.5384693101056830910363144, 0.9061798459386639927976269}; +static double w5[3] = {0.5688888888888888888888889, 0.4786286704993664680412915, 0.2369268850561890875142640}; + +/* n = 7 */ +static double x7[4] = {0.0000000000000000000000000, 0.4058451513773971669066064, 0.7415311855993944398638648, 0.9491079123427585245261897}; +static double w7[4] = {0.4179591836734693877551020, 0.3818300505051189449503698, 0.2797053914892766679014678, 0.1294849661688696932706114}; + +/* n = 9 */ +static double x9[5] = {0.0000000000000000000000000, 0.3242534234038089290385380, 0.6133714327005903973087020, 0.8360311073266357942994298, 0.9681602395076260898355762}; +static double w9[5] = {0.3302393550012597631645251, 0.3123470770400028400686304, 0.2606106964029354623187429, 0.1806481606948574040584720, 0.0812743883615744119718922}; + +/* n = 11 */ +static double x11[6] = {0.0000000000000000000000000, 0.2695431559523449723315320, 0.5190961292068118159257257, 0.7301520055740493240934163, 0.8870625997680952990751578, 0.9782286581460569928039380}; +static double w11[6] = {0.2729250867779006307144835, 0.2628045445102466621806889, 0.2331937645919904799185237, 0.1862902109277342514260976, 0.1255803694649046246346943, 0.0556685671161736664827537}; + +/* n = 13 */ +static double x13[7] = {0.0000000000000000000000000, 0.2304583159551347940655281, 0.4484927510364468528779129, 0.6423493394403402206439846, 0.8015780907333099127942065, 0.9175983992229779652065478, 0.9841830547185881494728294}; +static double w13[7] = {0.2325515532308739101945895, 0.2262831802628972384120902, 0.2078160475368885023125232, 0.1781459807619457382800467, 0.1388735102197872384636018, 0.0921214998377284479144218, 0.0404840047653158795200216}; + +/* n = 15 */ +static double x15[8] = {0.0000000000000000000000000, 0.2011940939974345223006283, 0.3941513470775633698972074, 0.5709721726085388475372267, 0.7244177313601700474161861, 0.8482065834104272162006483, 0.9372733924007059043077589, 0.9879925180204854284895657}; +static double w15[8] = {0.2025782419255612728806202, 0.1984314853271115764561183, 0.1861610000155622110268006, 0.1662692058169939335532009, 0.1395706779261543144478048, 0.1071592204671719350118695, 0.0703660474881081247092674, 0.0307532419961172683546284}; + +/* n = 17 */ +static double x17[9] = {0.0000000000000000000000000, 0.1784841814958478558506775, 0.3512317634538763152971855, 0.5126905370864769678862466, 0.6576711592166907658503022, 0.7815140038968014069252301, 0.8802391537269859021229557, 0.9506755217687677612227170, 0.9905754753144173356754340}; +static double w17[9] = {0.1794464703562065254582656, 0.1765627053669926463252710, 0.1680041021564500445099707, 0.1540457610768102880814316, 0.1351363684685254732863200, 0.1118838471934039710947884, 0.0850361483171791808835354, 0.0554595293739872011294402, 0.0241483028685479319601100}; + +/* n = 19 */ +static double x19[10] = {0.0000000000000000000000000, 0.1603586456402253758680961, 0.3165640999636298319901173, 0.4645707413759609457172671, 0.6005453046616810234696382, 0.7209661773352293786170959, 0.8227146565371428249789225, 0.9031559036148179016426609, 0.9602081521348300308527788, 0.9924068438435844031890177}; +static double w19[10] = {0.1610544498487836959791636, 0.1589688433939543476499564, 0.1527660420658596667788554, 0.1426067021736066117757461, 0.1287539625393362276755158, 0.1115666455473339947160239, 0.0914900216224499994644621, 0.0690445427376412265807083, 0.0448142267656996003328382, 0.0194617882297264770363120}; + +/* Merge all together */ +static gsl_integration_glfixed_table glaw[] = +{ + { 2, x2, w2, 1 /* precomputed */ }, + { 3, x3, w3, 1 }, + { 4, x4, w4, 1 }, + { 5, x5, w5, 1 }, + { 6, x6, w6, 1 }, + { 7, x7, w7, 1 }, + { 8, x8, w8, 1 }, + { 9, x9, w9, 1 }, + { 10, x10, w10, 1 }, + { 11, x11, w11, 1 }, + { 12, x12, w12, 1 }, + { 13, x13, w13, 1 }, + { 14, x14, w14, 1 }, + { 15, x15, w15, 1 }, + { 16, x16, w16, 1 }, + { 17, x17, w17, 1 }, + { 18, x18, w18, 1 }, + { 19, x19, w19, 1 }, + { 20, x20, w20, 1 }, + { 32, x32, w32, 1 }, + { 64, x64, w64, 1 }, + { 96, x96, w96, 1 }, + { 100, x100, w100, 1 }, + { 128, x128, w128, 1 }, + { 256, x256, w256, 1 }, + { 512, x512, w512, 1 }, + { 1024, x1024, w1024, 1 } +}; +static const size_t GLAWSIZE = sizeof(glaw)/sizeof(glaw[0]); + + +gsl_integration_glfixed_table * + gsl_integration_glfixed_table_alloc (size_t n) +{ + int i; + double *x = 0; + double *w = 0; + gsl_integration_glfixed_table * retval = 0; + + /* Kludgy error check: indices in the original algorithm use ints but GSL + * conventions are to take a size_t parameter for n */ + if (n > INT_MAX) + { + GSL_ERROR_NULL ("Requested n is too large", GSL_EINVAL); + } + + /* Use a predefined table of size n if possible */ + for (i = 0; i < GLAWSIZE;i++) + { + if (n == glaw[i].n) + { + retval = &glaw[i]; + break; + } + } + + /* No predefined table is available. Generate one on the fly. */ + if (retval == 0) + { + const int m = (n + 1) >> 1; + + x = (double *) malloc(m * sizeof(double)); + if (x == 0) + { + GSL_ERROR_NULL ("failed to allocate space for abscissae", + GSL_ENOMEM); + } + + w = (double *) malloc(m * sizeof(double)); + if (w == 0) + { + free(x); + GSL_ERROR_NULL ("failed to allocate space for weights", + GSL_ENOMEM); + } + + retval = (gsl_integration_glfixed_table *) + malloc(sizeof(gsl_integration_glfixed_table)); + if (retval == 0) + { + free(x); + free(w); + GSL_ERROR_NULL ("failed to allocate space for table struct", + GSL_ENOMEM); + } + + gauss_legendre_tbl(n, x, w, 1e-10 /* precision magic number */); + + retval->n = n; + retval->x = x; + retval->w = w; + retval->precomputed = 0; + } + + return retval; +} + +void + gsl_integration_glfixed_table_free (gsl_integration_glfixed_table * t) +{ + /* We only free the table memory if we allocated it */ + /* Leave precomputed, static tables alone */ + if (! t->precomputed) + { + free(t->x); + free(t->w); + free(t); + } +} + +/* +Gauss-Legendre n-points quadrature, exact for polynomial of degree <=2n-1 + +1. n - even: + +int(f(t),t=a..b) = A*sum(w[i]*f(A*x[i]+B),i=0..n-1) + = A*sum(w[k]*[f(B+A*x[k])+f(B-A*x[k])],k=0..n/2-1) + A = (b-a)/2, + B = (a+b)/2 + + +2. n - odd: + +int(f(t),t=a..b) = A*sum(w[i]*f(A*x[i]+B),i=0..n-1) + = A*w[0]*f(B)+A*sum(w[k]*[f(B+A*x[k])+f(B-A*x[k])],k=1..(n-1)/2) + A = (b-a)/2, + B = (a+b)/2 +*/ + +double + gsl_integration_glfixed (const gsl_function *f, + double a, + double b, + const gsl_integration_glfixed_table * t) +{ + const double * const x = t->x; + const double * const w = t->w; + const int n = t->n; + double A, B, Ax, s; + int i, m; + + m = (n + 1) >> 1; + A = 0.5 * (b - a); + B = 0.5 * (b + a); + + if (n&1) /* n - odd */ + { + s = w[0] * GSL_FN_EVAL(f,B); + + for (i = 1;i < m;i++) + { + Ax = A * x[i]; + s += w[i] * (GSL_FN_EVAL(f,B+Ax) + GSL_FN_EVAL(f,B-Ax)); + } + + } + else /* n - even */ + { + + s = 0.0; + + for (i = 0;i < m;i++) + { + Ax = A * x[i]; + s += w[i] * (GSL_FN_EVAL(f,B+Ax) + GSL_FN_EVAL(f,B-Ax)); + } + } + + return A*s; +} + +/* Routine to retrieve the i-th Gauss-Legendre point and weight from t. + Useful when the caller wishes to access the information stored in + the high-precision gsl_integration_glfixed_table struct. Points + are indexed and presented in increasing order to the caller. +*/ +int + gsl_integration_glfixed_point (double a, + double b, + size_t i, + double *xi, + double *wi, + const gsl_integration_glfixed_table * t) +{ + const double A = (b - a) / 2; /* Length of [a,b] */ + const double B = (a + b) / 2; /* Midpoint of [a,b] */ + + if (i >= t->n) + { + GSL_ERROR ("i must be less than t->n", GSL_EINVAL); + } + + /* See comments above gsl_integration_glfixed for struct's x, w layout. */ + /* Simply unpack that layout into a sorted set of points, weights. */ + if (GSL_IS_ODD(t->n)) + { + const int k = ((int) i) - ((int) t->n) / 2; + const int s = k < 0 ? -1 : 1; + + *xi = B + s*A*t->x[s*k]; + *wi = A*t->w[s*k]; + } + else if (/* GSL_IS_EVEN(t->n) && */ i < t->n / 2) + { + i = (t->n / 2) - 1 - i; + *xi = B - A*t->x[i]; + *wi = A*t->w[i]; + } + else /* GSL_IS_EVEN(t->n) && i >= n / 2 */ + { + i -= t->n / 2; + *xi = B + A*t->x[i]; + *wi = A*t->w[i]; + } + + return GSL_SUCCESS; +} + +/* Computing of abscissas and weights for Gauss-Legendre quadrature for any(reasonable) order n + [in] n - order of quadrature + [in] eps - required precision (must be eps>=macheps(double), usually eps = 1e-10 is ok) + [out]x - abscisass, size = (n+1)>>1 + [out]w - weights, size = (n+1)>>1 +*/ + +/* Look up table for fast calculation of Legendre polynomial for n<1024 */ +/* ltbl[k] = 1.0 - 1.0/(double)k; */ +static double ltbl[1024] = {0.00000000000000000000, 0.00000000000000000000, 0.50000000000000000000, 0.66666666666666674000, 0.75000000000000000000, 0.80000000000000004000, 0.83333333333333337000, 0.85714285714285721000, 0.87500000000000000000, 0.88888888888888884000, 0.90000000000000002000, 0.90909090909090906000, 0.91666666666666663000, 0.92307692307692313000, 0.92857142857142860000, 0.93333333333333335000, 0.93750000000000000000, 0.94117647058823528000, 0.94444444444444442000, 0.94736842105263164000, 0.94999999999999996000, 0.95238095238095233000, 0.95454545454545459000, 0.95652173913043481000, 0.95833333333333337000, 0.95999999999999996000, 0.96153846153846156000, 0.96296296296296302000, 0.96428571428571430000, 0.96551724137931039000, 0.96666666666666667000, 0.96774193548387100000, 0.96875000000000000000, 0.96969696969696972000, 0.97058823529411764000, 0.97142857142857142000, 0.97222222222222221000, 0.97297297297297303000, 0.97368421052631582000, 0.97435897435897434000, 0.97499999999999998000, 0.97560975609756095000, 0.97619047619047616000, 0.97674418604651159000, 0.97727272727272729000, 0.97777777777777775000, 0.97826086956521741000, 0.97872340425531912000, 0.97916666666666663000, 0.97959183673469385000, 0.97999999999999998000, 0.98039215686274506000, 0.98076923076923073000, 0.98113207547169812000, 0.98148148148148151000, 0.98181818181818181000, 0.98214285714285710000, 0.98245614035087714000, 0.98275862068965514000, 0.98305084745762716000, 0.98333333333333328000, 0.98360655737704916000, 0.98387096774193550000, 0.98412698412698418000, 0.98437500000000000000, 0.98461538461538467000, 0.98484848484848486000, 0.98507462686567160000, 0.98529411764705888000, 0.98550724637681164000, 0.98571428571428577000, 0.98591549295774650000, 0.98611111111111116000, 0.98630136986301364000, 0.98648648648648651000, 0.98666666666666669000, 0.98684210526315785000, 0.98701298701298701000, 0.98717948717948723000, 0.98734177215189878000, 0.98750000000000004000, 0.98765432098765427000, 0.98780487804878048000, 0.98795180722891562000, 0.98809523809523814000, 0.98823529411764710000, 0.98837209302325579000, 0.98850574712643680000, 0.98863636363636365000, 0.98876404494382020000, 0.98888888888888893000, 0.98901098901098905000, 0.98913043478260865000, 0.98924731182795700000, 0.98936170212765961000, 0.98947368421052628000, 0.98958333333333337000, 0.98969072164948457000, 0.98979591836734693000, 0.98989898989898994000, 0.98999999999999999000, 0.99009900990099009000, 0.99019607843137258000, 0.99029126213592233000, 0.99038461538461542000, 0.99047619047619051000, 0.99056603773584906000, 0.99065420560747663000, 0.99074074074074070000, 0.99082568807339455000, 0.99090909090909096000, 0.99099099099099097000, 0.99107142857142860000, 0.99115044247787609000, 0.99122807017543857000, 0.99130434782608701000, 0.99137931034482762000, 0.99145299145299148000, 0.99152542372881358000, 0.99159663865546221000, 0.99166666666666670000, 0.99173553719008267000, 0.99180327868852458000, 0.99186991869918695000, 0.99193548387096775000, 0.99199999999999999000, 0.99206349206349209000, 0.99212598425196852000, 0.99218750000000000000, 0.99224806201550386000, 0.99230769230769234000, 0.99236641221374045000, 0.99242424242424243000, 0.99248120300751874000, 0.99253731343283580000, 0.99259259259259258000, 0.99264705882352944000, 0.99270072992700731000, 0.99275362318840576000, 0.99280575539568350000, 0.99285714285714288000, 0.99290780141843971000, 0.99295774647887325000, 0.99300699300699302000, 0.99305555555555558000, 0.99310344827586206000, 0.99315068493150682000, 0.99319727891156462000, 0.99324324324324320000, 0.99328859060402686000, 0.99333333333333329000, 0.99337748344370858000, 0.99342105263157898000, 0.99346405228758172000, 0.99350649350649356000, 0.99354838709677418000, 0.99358974358974361000, 0.99363057324840764000, 0.99367088607594933000, 0.99371069182389937000, 0.99375000000000002000, 0.99378881987577639000, 0.99382716049382713000, 0.99386503067484666000, 0.99390243902439024000, 0.99393939393939390000, 0.99397590361445787000, 0.99401197604790414000, 0.99404761904761907000, 0.99408284023668636000, 0.99411764705882355000, 0.99415204678362579000, 0.99418604651162790000, 0.99421965317919070000, 0.99425287356321834000, 0.99428571428571433000, 0.99431818181818177000, 0.99435028248587576000, 0.99438202247191010000, 0.99441340782122900000, 0.99444444444444446000, 0.99447513812154698000, 0.99450549450549453000, 0.99453551912568305000, 0.99456521739130432000, 0.99459459459459465000, 0.99462365591397850000, 0.99465240641711228000, 0.99468085106382975000, 0.99470899470899465000, 0.99473684210526314000, 0.99476439790575921000, 0.99479166666666663000, 0.99481865284974091000, 0.99484536082474229000, 0.99487179487179489000, 0.99489795918367352000, 0.99492385786802029000, 0.99494949494949492000, 0.99497487437185927000, 0.99500000000000000000, 0.99502487562189057000, 0.99504950495049505000, 0.99507389162561577000, 0.99509803921568629000, 0.99512195121951219000, 0.99514563106796117000, 0.99516908212560384000, 0.99519230769230771000, 0.99521531100478466000, 0.99523809523809526000, 0.99526066350710896000, 0.99528301886792447000, 0.99530516431924887000, 0.99532710280373837000, 0.99534883720930234000, 0.99537037037037035000, 0.99539170506912444000, 0.99541284403669728000, 0.99543378995433796000, 0.99545454545454548000, 0.99547511312217196000, 0.99549549549549554000, 0.99551569506726456000, 0.99553571428571430000, 0.99555555555555553000, 0.99557522123893805000, 0.99559471365638763000, 0.99561403508771928000, 0.99563318777292575000, 0.99565217391304350000, 0.99567099567099571000, 0.99568965517241381000, 0.99570815450643779000, 0.99572649572649574000, 0.99574468085106382000, 0.99576271186440679000, 0.99578059071729963000, 0.99579831932773111000, 0.99581589958159000000, 0.99583333333333335000, 0.99585062240663902000, 0.99586776859504134000, 0.99588477366255146000, 0.99590163934426235000, 0.99591836734693873000, 0.99593495934959353000, 0.99595141700404854000, 0.99596774193548387000, 0.99598393574297184000, 0.99600000000000000000, 0.99601593625498008000, 0.99603174603174605000, 0.99604743083003955000, 0.99606299212598426000, 0.99607843137254903000, 0.99609375000000000000, 0.99610894941634243000, 0.99612403100775193000, 0.99613899613899615000, 0.99615384615384617000, 0.99616858237547889000, 0.99618320610687028000, 0.99619771863117867000, 0.99621212121212122000, 0.99622641509433962000, 0.99624060150375937000, 0.99625468164794007000, 0.99626865671641796000, 0.99628252788104088000, 0.99629629629629635000, 0.99630996309963105000, 0.99632352941176472000, 0.99633699633699635000, 0.99635036496350360000, 0.99636363636363634000, 0.99637681159420288000, 0.99638989169675085000, 0.99640287769784175000, 0.99641577060931896000, 0.99642857142857144000, 0.99644128113879005000, 0.99645390070921991000, 0.99646643109540634000, 0.99647887323943662000, 0.99649122807017543000, 0.99650349650349646000, 0.99651567944250874000, 0.99652777777777779000, 0.99653979238754320000, 0.99655172413793103000, 0.99656357388316152000, 0.99657534246575341000, 0.99658703071672350000, 0.99659863945578231000, 0.99661016949152548000, 0.99662162162162160000, 0.99663299663299665000, 0.99664429530201337000, 0.99665551839464883000, 0.99666666666666670000, 0.99667774086378735000, 0.99668874172185429000, 0.99669966996699666000, 0.99671052631578949000, 0.99672131147540988000, 0.99673202614379086000, 0.99674267100977199000, 0.99675324675324672000, 0.99676375404530748000, 0.99677419354838714000, 0.99678456591639875000, 0.99679487179487181000, 0.99680511182108622000, 0.99681528662420382000, 0.99682539682539684000, 0.99683544303797467000, 0.99684542586750791000, 0.99685534591194969000, 0.99686520376175547000, 0.99687499999999996000, 0.99688473520249221000, 0.99689440993788825000, 0.99690402476780182000, 0.99691358024691357000, 0.99692307692307691000, 0.99693251533742333000, 0.99694189602446481000, 0.99695121951219512000, 0.99696048632218848000, 0.99696969696969695000, 0.99697885196374625000, 0.99698795180722888000, 0.99699699699699695000, 0.99700598802395213000, 0.99701492537313430000, 0.99702380952380953000, 0.99703264094955490000, 0.99704142011834318000, 0.99705014749262533000, 0.99705882352941178000, 0.99706744868035191000, 0.99707602339181289000, 0.99708454810495628000, 0.99709302325581395000, 0.99710144927536237000, 0.99710982658959535000, 0.99711815561959649000, 0.99712643678160917000, 0.99713467048710602000, 0.99714285714285711000, 0.99715099715099720000, 0.99715909090909094000, 0.99716713881019825000, 0.99717514124293782000, 0.99718309859154930000, 0.99719101123595510000, 0.99719887955182074000, 0.99720670391061450000, 0.99721448467966578000, 0.99722222222222223000, 0.99722991689750695000, 0.99723756906077343000, 0.99724517906336085000, 0.99725274725274726000, 0.99726027397260275000, 0.99726775956284153000, 0.99727520435967298000, 0.99728260869565222000, 0.99728997289972898000, 0.99729729729729732000, 0.99730458221024254000, 0.99731182795698925000, 0.99731903485254692000, 0.99732620320855614000, 0.99733333333333329000, 0.99734042553191493000, 0.99734748010610075000, 0.99735449735449733000, 0.99736147757255933000, 0.99736842105263157000, 0.99737532808398954000, 0.99738219895287961000, 0.99738903394255873000, 0.99739583333333337000, 0.99740259740259740000, 0.99740932642487046000, 0.99741602067183466000, 0.99742268041237114000, 0.99742930591259638000, 0.99743589743589745000, 0.99744245524296671000, 0.99744897959183676000, 0.99745547073791352000, 0.99746192893401020000, 0.99746835443037973000, 0.99747474747474751000, 0.99748110831234260000, 0.99748743718592969000, 0.99749373433583965000, 0.99750000000000005000, 0.99750623441396513000, 0.99751243781094523000, 0.99751861042183620000, 0.99752475247524752000, 0.99753086419753090000, 0.99753694581280783000, 0.99754299754299758000, 0.99754901960784315000, 0.99755501222493892000, 0.99756097560975610000, 0.99756690997566910000, 0.99757281553398058000, 0.99757869249394671000, 0.99758454106280192000, 0.99759036144578317000, 0.99759615384615385000, 0.99760191846522783000, 0.99760765550239239000, 0.99761336515513122000, 0.99761904761904763000, 0.99762470308788598000, 0.99763033175355453000, 0.99763593380614657000, 0.99764150943396224000, 0.99764705882352944000, 0.99765258215962438000, 0.99765807962529274000, 0.99766355140186913000, 0.99766899766899764000, 0.99767441860465111000, 0.99767981438515085000, 0.99768518518518523000, 0.99769053117782913000, 0.99769585253456217000, 0.99770114942528731000, 0.99770642201834858000, 0.99771167048054921000, 0.99771689497716898000, 0.99772209567198178000, 0.99772727272727268000, 0.99773242630385484000, 0.99773755656108598000, 0.99774266365688491000, 0.99774774774774777000, 0.99775280898876406000, 0.99775784753363228000, 0.99776286353467558000, 0.99776785714285710000, 0.99777282850779514000, 0.99777777777777776000, 0.99778270509977829000, 0.99778761061946908000, 0.99779249448123619000, 0.99779735682819382000, 0.99780219780219781000, 0.99780701754385970000, 0.99781181619256021000, 0.99781659388646293000, 0.99782135076252720000, 0.99782608695652175000, 0.99783080260303691000, 0.99783549783549785000, 0.99784017278617709000, 0.99784482758620685000, 0.99784946236559136000, 0.99785407725321884000, 0.99785867237687365000, 0.99786324786324787000, 0.99786780383795304000, 0.99787234042553197000, 0.99787685774946921000, 0.99788135593220340000, 0.99788583509513740000, 0.99789029535864981000, 0.99789473684210528000, 0.99789915966386555000, 0.99790356394129975000, 0.99790794979079500000, 0.99791231732776620000, 0.99791666666666667000, 0.99792099792099798000, 0.99792531120331951000, 0.99792960662525876000, 0.99793388429752061000, 0.99793814432989691000, 0.99794238683127567000, 0.99794661190965095000, 0.99795081967213117000, 0.99795501022494892000, 0.99795918367346936000, 0.99796334012219956000, 0.99796747967479671000, 0.99797160243407712000, 0.99797570850202433000, 0.99797979797979797000, 0.99798387096774188000, 0.99798792756539234000, 0.99799196787148592000, 0.99799599198396793000, 0.99800000000000000000, 0.99800399201596801000, 0.99800796812749004000, 0.99801192842942343000, 0.99801587301587302000, 0.99801980198019802000, 0.99802371541501977000, 0.99802761341222879000, 0.99803149606299213000, 0.99803536345776034000, 0.99803921568627452000, 0.99804305283757344000, 0.99804687500000000000, 0.99805068226120852000, 0.99805447470817121000, 0.99805825242718449000, 0.99806201550387597000, 0.99806576402321079000, 0.99806949806949807000, 0.99807321772639690000, 0.99807692307692308000, 0.99808061420345484000, 0.99808429118773945000, 0.99808795411089868000, 0.99809160305343514000, 0.99809523809523815000, 0.99809885931558939000, 0.99810246679316883000, 0.99810606060606055000, 0.99810964083175802000, 0.99811320754716981000, 0.99811676082862522000, 0.99812030075187974000, 0.99812382739212002000, 0.99812734082397003000, 0.99813084112149530000, 0.99813432835820892000, 0.99813780260707630000, 0.99814126394052050000, 0.99814471243042668000, 0.99814814814814812000, 0.99815157116451014000, 0.99815498154981552000, 0.99815837937384899000, 0.99816176470588236000, 0.99816513761467895000, 0.99816849816849818000, 0.99817184643510060000, 0.99817518248175185000, 0.99817850637522765000, 0.99818181818181817000, 0.99818511796733211000, 0.99818840579710144000, 0.99819168173598549000, 0.99819494584837543000, 0.99819819819819822000, 0.99820143884892087000, 0.99820466786355477000, 0.99820788530465954000, 0.99821109123434704000, 0.99821428571428572000, 0.99821746880570406000, 0.99822064056939497000, 0.99822380106571940000, 0.99822695035460995000, 0.99823008849557526000, 0.99823321554770317000, 0.99823633156966496000, 0.99823943661971826000, 0.99824253075571179000, 0.99824561403508771000, 0.99824868651488619000, 0.99825174825174823000, 0.99825479930191974000, 0.99825783972125437000, 0.99826086956521742000, 0.99826388888888884000, 0.99826689774696709000, 0.99826989619377160000, 0.99827288428324701000, 0.99827586206896557000, 0.99827882960413084000, 0.99828178694158076000, 0.99828473413379071000, 0.99828767123287676000, 0.99829059829059830000, 0.99829351535836175000, 0.99829642248722317000, 0.99829931972789121000, 0.99830220713073003000, 0.99830508474576274000, 0.99830795262267347000, 0.99831081081081086000, 0.99831365935919059000, 0.99831649831649827000, 0.99831932773109244000, 0.99832214765100669000, 0.99832495812395305000, 0.99832775919732442000, 0.99833055091819700000, 0.99833333333333329000, 0.99833610648918469000, 0.99833887043189373000, 0.99834162520729686000, 0.99834437086092720000, 0.99834710743801658000, 0.99834983498349839000, 0.99835255354200991000, 0.99835526315789469000, 0.99835796387520526000, 0.99836065573770494000, 0.99836333878887074000, 0.99836601307189543000, 0.99836867862969003000, 0.99837133550488599000, 0.99837398373983743000, 0.99837662337662336000, 0.99837925445705022000, 0.99838187702265369000, 0.99838449111470118000, 0.99838709677419357000, 0.99838969404186795000, 0.99839228295819937000, 0.99839486356340290000, 0.99839743589743590000, 0.99839999999999995000, 0.99840255591054317000, 0.99840510366826152000, 0.99840764331210186000, 0.99841017488076311000, 0.99841269841269842000, 0.99841521394611732000, 0.99841772151898733000, 0.99842022116903628000, 0.99842271293375395000, 0.99842519685039366000, 0.99842767295597479000, 0.99843014128728413000, 0.99843260188087779000, 0.99843505477308292000, 0.99843749999999998000, 0.99843993759750393000, 0.99844236760124616000, 0.99844479004665632000, 0.99844720496894412000, 0.99844961240310082000, 0.99845201238390091000, 0.99845440494590421000, 0.99845679012345678000, 0.99845916795069334000, 0.99846153846153851000, 0.99846390168970811000, 0.99846625766871167000, 0.99846860643185298000, 0.99847094801223246000, 0.99847328244274813000, 0.99847560975609762000, 0.99847792998477924000, 0.99848024316109418000, 0.99848254931714719000, 0.99848484848484853000, 0.99848714069591527000, 0.99848942598187307000, 0.99849170437405732000, 0.99849397590361444000, 0.99849624060150377000, 0.99849849849849848000, 0.99850074962518742000, 0.99850299401197606000, 0.99850523168908822000, 0.99850746268656720000, 0.99850968703427723000, 0.99851190476190477000, 0.99851411589895989000, 0.99851632047477745000, 0.99851851851851847000, 0.99852071005917165000, 0.99852289512555392000, 0.99852507374631272000, 0.99852724594992637000, 0.99852941176470589000, 0.99853157121879588000, 0.99853372434017595000, 0.99853587115666176000, 0.99853801169590639000, 0.99854014598540142000, 0.99854227405247808000, 0.99854439592430855000, 0.99854651162790697000, 0.99854862119013066000, 0.99855072463768113000, 0.99855282199710560000, 0.99855491329479773000, 0.99855699855699853000, 0.99855907780979825000, 0.99856115107913668000, 0.99856321839080464000, 0.99856527977044474000, 0.99856733524355301000, 0.99856938483547930000, 0.99857142857142855000, 0.99857346647646217000, 0.99857549857549854000, 0.99857752489331442000, 0.99857954545454541000, 0.99858156028368794000, 0.99858356940509918000, 0.99858557284299854000, 0.99858757062146897000, 0.99858956276445698000, 0.99859154929577465000, 0.99859353023909991000, 0.99859550561797750000, 0.99859747545582045000, 0.99859943977591037000, 0.99860139860139863000, 0.99860335195530725000, 0.99860529986053004000, 0.99860724233983289000, 0.99860917941585536000, 0.99861111111111112000, 0.99861303744798890000, 0.99861495844875348000, 0.99861687413554634000, 0.99861878453038677000, 0.99862068965517237000, 0.99862258953168048000, 0.99862448418156813000, 0.99862637362637363000, 0.99862825788751719000, 0.99863013698630132000, 0.99863201094391241000, 0.99863387978142082000, 0.99863574351978168000, 0.99863760217983655000, 0.99863945578231295000, 0.99864130434782605000, 0.99864314789687925000, 0.99864498644986455000, 0.99864682002706362000, 0.99864864864864866000, 0.99865047233468285000, 0.99865229110512133000, 0.99865410497981155000, 0.99865591397849462000, 0.99865771812080539000, 0.99865951742627346000, 0.99866131191432395000, 0.99866310160427807000, 0.99866488651535379000, 0.99866666666666670000, 0.99866844207723038000, 0.99867021276595747000, 0.99867197875166003000, 0.99867374005305043000, 0.99867549668874167000, 0.99867724867724872000, 0.99867899603698806000, 0.99868073878627972000, 0.99868247694334655000, 0.99868421052631584000, 0.99868593955321949000, 0.99868766404199472000, 0.99868938401048490000, 0.99869109947643975000, 0.99869281045751634000, 0.99869451697127942000, 0.99869621903520212000, 0.99869791666666663000, 0.99869960988296491000, 0.99870129870129876000, 0.99870298313878081000, 0.99870466321243523000, 0.99870633893919791000, 0.99870801033591727000, 0.99870967741935479000, 0.99871134020618557000, 0.99871299871299868000, 0.99871465295629824000, 0.99871630295250324000, 0.99871794871794872000, 0.99871959026888601000, 0.99872122762148341000, 0.99872286079182626000, 0.99872448979591832000, 0.99872611464968153000, 0.99872773536895676000, 0.99872935196950441000, 0.99873096446700504000, 0.99873257287705952000, 0.99873417721518987000, 0.99873577749683939000, 0.99873737373737370000, 0.99873896595208067000, 0.99874055415617125000, 0.99874213836477987000, 0.99874371859296485000, 0.99874529485570895000, 0.99874686716791983000, 0.99874843554443049000, 0.99875000000000003000, 0.99875156054931336000, 0.99875311720698257000, 0.99875466998754669000, 0.99875621890547261000, 0.99875776397515525000, 0.99875930521091816000, 0.99876084262701359000, 0.99876237623762376000, 0.99876390605686027000, 0.99876543209876545000, 0.99876695437731200000, 0.99876847290640391000, 0.99876998769987702000, 0.99877149877149873000, 0.99877300613496933000, 0.99877450980392157000, 0.99877600979192172000, 0.99877750611246940000, 0.99877899877899878000, 0.99878048780487805000, 0.99878197320341044000, 0.99878345498783450000, 0.99878493317132444000, 0.99878640776699024000, 0.99878787878787878000, 0.99878934624697335000, 0.99879081015719473000, 0.99879227053140096000, 0.99879372738238847000, 0.99879518072289153000, 0.99879663056558365000, 0.99879807692307687000, 0.99879951980792314000, 0.99880095923261392000, 0.99880239520958081000, 0.99880382775119614000, 0.99880525686977295000, 0.99880668257756566000, 0.99880810488676997000, 0.99880952380952381000, 0.99881093935790721000, 0.99881235154394299000, 0.99881376037959668000, 0.99881516587677721000, 0.99881656804733732000, 0.99881796690307334000, 0.99881936245572611000, 0.99882075471698117000, 0.99882214369846878000, 0.99882352941176467000, 0.99882491186839018000, 0.99882629107981225000, 0.99882766705744430000, 0.99882903981264637000, 0.99883040935672518000, 0.99883177570093462000, 0.99883313885647607000, 0.99883449883449882000, 0.99883585564610011000, 0.99883720930232556000, 0.99883855981416958000, 0.99883990719257543000, 0.99884125144843572000, 0.99884259259259256000, 0.99884393063583810000, 0.99884526558891451000, 0.99884659746251436000, 0.99884792626728114000, 0.99884925201380903000, 0.99885057471264371000, 0.99885189437428246000, 0.99885321100917435000, 0.99885452462772051000, 0.99885583524027455000, 0.99885714285714289000, 0.99885844748858443000, 0.99885974914481190000, 0.99886104783599083000, 0.99886234357224113000, 0.99886363636363640000, 0.99886492622020429000, 0.99886621315192747000, 0.99886749716874290000, 0.99886877828054299000, 0.99887005649717520000, 0.99887133182844245000, 0.99887260428410374000, 0.99887387387387383000, 0.99887514060742411000, 0.99887640449438198000, 0.99887766554433222000, 0.99887892376681620000, 0.99888017917133254000, 0.99888143176733779000, 0.99888268156424576000, 0.99888392857142860000, 0.99888517279821631000, 0.99888641425389757000, 0.99888765294771964000, 0.99888888888888894000, 0.99889012208657046000, 0.99889135254988914000, 0.99889258028792915000, 0.99889380530973448000, 0.99889502762430937000, 0.99889624724061810000, 0.99889746416758540000, 0.99889867841409696000, 0.99889988998899892000, 0.99890109890109891000, 0.99890230515916578000, 0.99890350877192979000, 0.99890470974808321000, 0.99890590809628010000, 0.99890710382513659000, 0.99890829694323147000, 0.99890948745910579000, 0.99891067538126366000, 0.99891186071817195000, 0.99891304347826082000, 0.99891422366992400000, 0.99891540130151846000, 0.99891657638136511000, 0.99891774891774887000, 0.99891891891891893000, 0.99892008639308860000, 0.99892125134843579000, 0.99892241379310343000, 0.99892357373519913000, 0.99892473118279568000, 0.99892588614393130000, 0.99892703862660948000, 0.99892818863879962000, 0.99892933618843682000, 0.99893048128342243000, 0.99893162393162394000, 0.99893276414087517000, 0.99893390191897657000, 0.99893503727369537000, 0.99893617021276593000, 0.99893730074388953000, 0.99893842887473461000, 0.99893955461293749000, 0.99894067796610164000, 0.99894179894179891000, 0.99894291754756870000, 0.99894403379091867000, 0.99894514767932485000, 0.99894625922023184000, 0.99894736842105258000, 0.99894847528916930000, 0.99894957983193278000, 0.99895068205666315000, 0.99895178197064993000, 0.99895287958115186000, 0.99895397489539750000, 0.99895506792058519000, 0.99895615866388310000, 0.99895724713242962000, 0.99895833333333328000, 0.99895941727367321000, 0.99896049896049899000, 0.99896157840083077000, 0.99896265560165975000, 0.99896373056994814000, 0.99896480331262938000, 0.99896587383660806000, 0.99896694214876036000, 0.99896800825593390000, 0.99896907216494846000, 0.99897013388259526000, 0.99897119341563789000, 0.99897225077081198000, 0.99897330595482547000, 0.99897435897435893000, 0.99897540983606559000, 0.99897645854657113000, 0.99897750511247441000, 0.99897854954034726000, 0.99897959183673468000, 0.99898063200815490000, 0.99898167006109984000, 0.99898270600203454000, 0.99898373983739841000, 0.99898477157360410000, 0.99898580121703850000, 0.99898682877406286000, 0.99898785425101211000, 0.99898887765419619000, 0.99898989898989898000, 0.99899091826437947000, 0.99899193548387100000, 0.99899295065458205000, 0.99899396378269623000, 0.99899497487437183000, 0.99899598393574296000, 0.99899699097291872000, 0.99899799599198402000, 0.99899899899899902000, 0.99900000000000000000, 0.99900099900099903000, 0.99900199600798401000, 0.99900299102691925000, 0.99900398406374502000, 0.99900497512437814000, 0.99900596421471177000, 0.99900695134061568000, 0.99900793650793651000, 0.99900891972249750000, 0.99900990099009901000, 0.99901088031651830000, 0.99901185770750989000, 0.99901283316880551000, 0.99901380670611439000, 0.99901477832512320000, 0.99901574803149606000, 0.99901671583087515000, 0.99901768172888017000, 0.99901864573110888000, 0.99901960784313726000, 0.99902056807051909000, 0.99902152641878672000, 0.99902248289345064000}; + +static void +gauss_legendre_tbl(int n, double* x, double* w, double eps) +{ + double x0, x1, dx; /* Abscissas */ + double w0, w1, dw; /* Weights */ + double P0, P_1, P_2; /* Legendre polynomial values */ + double dpdx; /* Legendre polynomial derivative */ + int i, j, k, m; /* Iterators */ + double t0, t1, t2, t3; + + m = (n + 1) >> 1; + + t0 = (1.0 - (1.0 - 1.0 / (double)n) / (8.0 * (double)n * (double)n)); + t1 = 1.0 / (4.0 * (double)n + 2.0); + + for (i = 1; i <= m; i++) + { + /* Find i-th root of Legendre polynomial */ + + /* Initial guess */ + const double pi_to_many_places + = 3.1415926535897932384626433832795028841971693993751; + x0 = cos(pi_to_many_places * (double)((i << 2) - 1) * t1) * t0; + + /* Newton iterations, at least one */ + j = 0; + dx = dw = DBL_MAX; + + do + { + /* Compute Legendre polynomial value at x0 */ + P_1 = 1.0; + P0 = x0; + + /* Optimized version using lookup tables */ + + if (n < 1024) + { + /* Use fast algorithm for small n*/ + for (k = 2; k <= n; k++) + { + P_2 = P_1; + P_1 = P0; + t2 = x0 * P_1; + + P0 = t2 + ltbl[k] * (t2 - P_2); + + } + + } + else + { + + /* Use general algorithm for other n */ + for (k = 2; k < 1024; k++) + { + P_2 = P_1; + P_1 = P0; + t2 = x0 * P_1; + + P0 = t2 + ltbl[k] * (t2 - P_2); + } + + for (k = 1024; k <= n; k++) + { + P_2 = P_1; + P_1 = P0; + t2 = x0 * P_1; + t3 = (double)(k - 1) / (double)k; + + P0 = t2 + t3 * (t2 - P_2); + } + } + + /* Compute Legendre polynomial derivative at x0 */ + dpdx = ((x0 * P0 - P_1) * (double)n) / (x0 * x0 - 1.0); + + /* Newton step */ + x1 = x0 - P0 / dpdx; + + /* Weight computing */ + w1 = 2.0 / ((1.0 - x1 * x1) * dpdx * dpdx); + + /* Compute weight w0 on first iteration, needed for dw */ + if (j == 0) w0 = 2.0 / ((1.0 - x0 * x0) * dpdx * dpdx); + + dx = x0 - x1; + + dw = w0 - w1; + + x0 = x1; + + w0 = w1; + + j++; + } + while ((fabs(dx) > eps || fabs(dw) > eps) && j < 100); + + x[(m-1)-(i-1)] = x1; + + w[(m-1)-(i-1)] = w1; + } + + return; +} + diff --git a/software/gsl-1.15/integration/gsl_integration.h b/software/gsl-1.15/integration/gsl_integration.h new file mode 100644 index 000000000..5972f49e0 --- /dev/null +++ b/software/gsl-1.15/integration/gsl_integration.h @@ -0,0 +1,323 @@ +/* integration/gsl_integration.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_INTEGRATION_H__ +#define __GSL_INTEGRATION_H__ +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Workspace for adaptive integrators */ + +typedef struct + { + size_t limit; + size_t size; + size_t nrmax; + size_t i; + size_t maximum_level; + double *alist; + double *blist; + double *rlist; + double *elist; + size_t *order; + size_t *level; + } +gsl_integration_workspace; + +gsl_integration_workspace * + gsl_integration_workspace_alloc (const size_t n); + +void + gsl_integration_workspace_free (gsl_integration_workspace * w); + + +/* Workspace for QAWS integrator */ + +typedef struct +{ + double alpha; + double beta; + int mu; + int nu; + double ri[25]; + double rj[25]; + double rg[25]; + double rh[25]; +} +gsl_integration_qaws_table; + +gsl_integration_qaws_table * +gsl_integration_qaws_table_alloc (double alpha, double beta, int mu, int nu); + +int +gsl_integration_qaws_table_set (gsl_integration_qaws_table * t, + double alpha, double beta, int mu, int nu); + +void +gsl_integration_qaws_table_free (gsl_integration_qaws_table * t); + +/* Workspace for QAWO integrator */ + +enum gsl_integration_qawo_enum { GSL_INTEG_COSINE, GSL_INTEG_SINE }; + +typedef struct +{ + size_t n; + double omega; + double L; + double par; + enum gsl_integration_qawo_enum sine; + double *chebmo; +} +gsl_integration_qawo_table; + +gsl_integration_qawo_table * +gsl_integration_qawo_table_alloc (double omega, double L, + enum gsl_integration_qawo_enum sine, + size_t n); + +int +gsl_integration_qawo_table_set (gsl_integration_qawo_table * t, + double omega, double L, + enum gsl_integration_qawo_enum sine); + +int +gsl_integration_qawo_table_set_length (gsl_integration_qawo_table * t, + double L); + +void +gsl_integration_qawo_table_free (gsl_integration_qawo_table * t); + + +/* Definition of an integration rule */ + +typedef void gsl_integration_rule (const gsl_function * f, + double a, double b, + double *result, double *abserr, + double *defabs, double *resabs); + +void gsl_integration_qk15 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qk21 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qk31 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qk41 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qk51 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qk61 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc); + +void gsl_integration_qcheb (gsl_function * f, double a, double b, + double *cheb12, double *cheb24); + +/* The low-level integration rules in QUADPACK are identified by small + integers (1-6). We'll use symbolic constants to refer to them. */ + +enum + { + GSL_INTEG_GAUSS15 = 1, /* 15 point Gauss-Kronrod rule */ + GSL_INTEG_GAUSS21 = 2, /* 21 point Gauss-Kronrod rule */ + GSL_INTEG_GAUSS31 = 3, /* 31 point Gauss-Kronrod rule */ + GSL_INTEG_GAUSS41 = 4, /* 41 point Gauss-Kronrod rule */ + GSL_INTEG_GAUSS51 = 5, /* 51 point Gauss-Kronrod rule */ + GSL_INTEG_GAUSS61 = 6 /* 61 point Gauss-Kronrod rule */ + }; + +void +gsl_integration_qk (const int n, const double xgk[], + const double wg[], const double wgk[], + double fv1[], double fv2[], + const gsl_function *f, double a, double b, + double * result, double * abserr, + double * resabs, double * resasc); + + +int gsl_integration_qng (const gsl_function * f, + double a, double b, + double epsabs, double epsrel, + double *result, double *abserr, + size_t * neval); + +int gsl_integration_qag (const gsl_function * f, + double a, double b, + double epsabs, double epsrel, size_t limit, + int key, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qagi (gsl_function * f, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qagiu (gsl_function * f, + double a, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qagil (gsl_function * f, + double b, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + + +int gsl_integration_qags (const gsl_function * f, + double a, double b, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qagp (const gsl_function * f, + double *pts, size_t npts, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qawc (gsl_function *f, + const double a, const double b, const double c, + const double epsabs, const double epsrel, const size_t limit, + gsl_integration_workspace * workspace, + double * result, double * abserr); + +int gsl_integration_qaws (gsl_function * f, + const double a, const double b, + gsl_integration_qaws_table * t, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr); + +int gsl_integration_qawo (gsl_function * f, + const double a, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + gsl_integration_qawo_table * wf, + double *result, double *abserr); + +int gsl_integration_qawf (gsl_function * f, + const double a, + const double epsabs, + const size_t limit, + gsl_integration_workspace * workspace, + gsl_integration_workspace * cycle_workspace, + gsl_integration_qawo_table * wf, + double *result, double *abserr); + +/* Workspace for fixed-order Gauss-Legendre integration */ + +typedef struct + { + size_t n; /* number of points */ + double *x; /* Gauss abscissae/points */ + double *w; /* Gauss weights for each abscissae */ + int precomputed; /* high precision abscissae/weights precomputed? */ + } +gsl_integration_glfixed_table; + + +gsl_integration_glfixed_table * + gsl_integration_glfixed_table_alloc (size_t n); + +void + gsl_integration_glfixed_table_free (gsl_integration_glfixed_table * t); + +/* Routine for fixed-order Gauss-Legendre integration */ + +double + gsl_integration_glfixed (const gsl_function *f, + double a, + double b, + const gsl_integration_glfixed_table * t); + +/* Routine to retrieve the i-th Gauss-Legendre point and weight from t */ + +int + gsl_integration_glfixed_point (double a, + double b, + size_t i, + double *xi, + double *wi, + const gsl_integration_glfixed_table * t); + + +/* Cquad integration - Pedro Gonnet */ + +/* Data of a single interval */ +typedef struct +{ + double a, b; + double c[64]; + double fx[33]; + double igral, err; + int depth, rdepth, ndiv; +} gsl_integration_cquad_ival; + + +/* The workspace is just a collection of intervals */ +typedef struct +{ + size_t size; + gsl_integration_cquad_ival *ivals; + size_t *heap; +} gsl_integration_cquad_workspace; + +gsl_integration_cquad_workspace * +gsl_integration_cquad_workspace_alloc (const size_t n); + +void +gsl_integration_cquad_workspace_free (gsl_integration_cquad_workspace * w); + +int +gsl_integration_cquad (const gsl_function * f, double a, double b, + double epsabs, double epsrel, + gsl_integration_cquad_workspace * ws, + double *result, double *abserr, size_t * nevals); + + +__END_DECLS + +#endif /* __GSL_INTEGRATION_H__ */ diff --git a/software/gsl-1.15/integration/initialise.c b/software/gsl-1.15/integration/initialise.c new file mode 100644 index 000000000..45e25190f --- /dev/null +++ b/software/gsl-1.15/integration/initialise.c @@ -0,0 +1,37 @@ +/* integration/initialise.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static inline +void initialise (gsl_integration_workspace * workspace, double a, double b); + +static inline +void initialise (gsl_integration_workspace * workspace, double a, double b) +{ + workspace->size = 0; + workspace->nrmax = 0; + workspace->i = 0; + workspace->alist[0] = a; + workspace->blist[0] = b; + workspace->rlist[0] = 0.0; + workspace->elist[0] = 0.0; + workspace->order[0] = 0; + workspace->level[0] = 0; + + workspace->maximum_level = 0; +} diff --git a/software/gsl-1.15/integration/positivity.c b/software/gsl-1.15/integration/positivity.c new file mode 100644 index 000000000..cfa89f151 --- /dev/null +++ b/software/gsl-1.15/integration/positivity.c @@ -0,0 +1,13 @@ +/* Compare the integral of f(x) with the integral of |f(x)| + to determine if f(x) covers both positive and negative values */ + +static inline int +test_positivity (double result, double resabs); + +static inline int +test_positivity (double result, double resabs) +{ + int status = (fabs (result) >= (1 - 50 * GSL_DBL_EPSILON) * resabs); + + return status; +} diff --git a/software/gsl-1.15/integration/ptsort.c b/software/gsl-1.15/integration/ptsort.c new file mode 100644 index 000000000..a52d521fd --- /dev/null +++ b/software/gsl-1.15/integration/ptsort.c @@ -0,0 +1,62 @@ +/* integration/ptsort.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +sort_results (gsl_integration_workspace * workspace); + +static void +sort_results (gsl_integration_workspace * workspace) +{ + size_t i; + + double * elist = workspace->elist ; + size_t * order = workspace->order ; + + size_t nint = workspace->size; + + for (i = 0; i < nint; i++) + { + size_t i1 = order[i]; + double e1 = elist[i1]; + size_t i_max = i1; + size_t j; + + for (j = i + 1; j < nint; j++) + { + size_t i2 = order[j]; + double e2 = elist[i2]; + + if (e2 >= e1) + { + i_max = i2; + e1 = e2; + } + } + + if (i_max != i1) + { + order[i] = order[i_max]; + order[i_max] = i1; + } + } + + workspace->i = order[0] ; +} + + diff --git a/software/gsl-1.15/integration/qag.c b/software/gsl-1.15/integration/qag.c new file mode 100644 index 000000000..214494bc5 --- /dev/null +++ b/software/gsl-1.15/integration/qag.c @@ -0,0 +1,265 @@ +/* integration/qag.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "initialise.c" +#include "set_initial.c" +#include "qpsrt.c" +#include "util.c" + +static int +qag (const gsl_function *f, + const double a, const double b, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double * result, double * abserr, + gsl_integration_rule * q) ; + +int +gsl_integration_qag (const gsl_function *f, + double a, double b, + double epsabs, double epsrel, size_t limit, + int key, + gsl_integration_workspace * workspace, + double * result, double * abserr) +{ + int status ; + gsl_integration_rule * integration_rule = gsl_integration_qk15 ; + + if (key < GSL_INTEG_GAUSS15) + { + key = GSL_INTEG_GAUSS15 ; + } + else if (key > GSL_INTEG_GAUSS61) + { + key = GSL_INTEG_GAUSS61 ; + } + + switch (key) + { + case GSL_INTEG_GAUSS15: + integration_rule = gsl_integration_qk15 ; + break ; + case GSL_INTEG_GAUSS21: + integration_rule = gsl_integration_qk21 ; + break ; + case GSL_INTEG_GAUSS31: + integration_rule = gsl_integration_qk31 ; + break ; + case GSL_INTEG_GAUSS41: + integration_rule = gsl_integration_qk41 ; + break ; + case GSL_INTEG_GAUSS51: + integration_rule = gsl_integration_qk51 ; + break ; + case GSL_INTEG_GAUSS61: + integration_rule = gsl_integration_qk61 ; + break ; + default: + GSL_ERROR("value of key does specify a known integration rule", + GSL_EINVAL) ; + } + + status = qag (f, a, b, epsabs, epsrel, limit, + workspace, + result, abserr, + integration_rule) ; + + return status ; +} + +static int +qag (const gsl_function * f, + const double a, const double b, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr, + gsl_integration_rule * q) +{ + double area, errsum; + double result0, abserr0, resabs0, resasc0; + double tolerance; + size_t iteration = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, error_type = 0; + + double round_off; + + /* Initialize results */ + + initialise (workspace, a, b); + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + /* perform the first integration */ + + q (f, a, b, &result0, &abserr0, &resabs0, &resasc0); + + set_initial_result (workspace, result0, abserr0); + + /* Test on accuracy */ + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + /* need IEEE rounding here to match original quadpack behavior */ + + round_off = GSL_COERCE_DBL (50 * GSL_DBL_EPSILON * resabs0); + + if (abserr0 <= round_off && abserr0 > tolerance) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("cannot reach tolerance because of roundoff error " + "on first attempt", GSL_EROUND); + } + else if ((abserr0 <= tolerance && abserr0 != resasc0) || abserr0 == 0.0) + { + *result = result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + area = result0; + errsum = abserr0; + + iteration = 1; + + do + { + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + double resasc1, resasc2; + double resabs1, resabs2; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + q (f, a1, b1, &area1, &error1, &resabs1, &resasc1); + q (f, a2, b2, &area2, &error2, &resabs2, &resasc2); + + area12 = area1 + area2; + error12 = error1 + error2; + + errsum += (error12 - e_i); + area += area12 - r_i; + + if (resasc1 != error1 && resasc2 != error2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + roundoff_type1++; + } + if (iteration >= 10 && error12 > e_i) + { + roundoff_type2++; + } + } + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (errsum > tolerance) + { + if (roundoff_type1 >= 6 || roundoff_type2 >= 20) + { + error_type = 2; /* round off error */ + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 3; + } + } + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + iteration++; + + } + while (iteration < limit && !error_type && errsum > tolerance); + + *result = sum_results (workspace); + *abserr = errsum; + + if (errsum <= tolerance) + { + return GSL_SUCCESS; + } + else if (error_type == 2) + { + GSL_ERROR ("roundoff error prevents tolerance from being achieved", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (iteration == limit) + { + GSL_ERROR ("maximum number of subdivisions reached", GSL_EMAXITER); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } +} + + diff --git a/software/gsl-1.15/integration/qagp.c b/software/gsl-1.15/integration/qagp.c new file mode 100644 index 000000000..f80f4fa3f --- /dev/null +++ b/software/gsl-1.15/integration/qagp.c @@ -0,0 +1,510 @@ +/* integration/qagp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +static int +qagp (const gsl_function *f, + const double *pts, const size_t npts, + const double epsabs, const double epsrel, const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr, + gsl_integration_rule * q); + +#include "initialise.c" +#include "qpsrt.c" +#include "util.c" +#include "append.c" +#include "reset.c" +#include "qelg.c" +#include "qpsrt2.c" +#include "ptsort.c" +#include "positivity.c" + +int +gsl_integration_qagp (const gsl_function *f, + double * pts, size_t npts, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double * result, double * abserr) +{ + int status = qagp (f, pts, npts, + epsabs, epsrel, limit, + workspace, + result, abserr, + &gsl_integration_qk21) ; + + return status ; +} + + +static int +qagp (const gsl_function * f, + const double *pts, const size_t npts, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr, + gsl_integration_rule * q) +{ + double area, errsum; + double res_ext, err_ext; + double result0, abserr0, resabs0; + double tolerance; + + double ertest = 0; + double error_over_large_intervals = 0; + double reseps = 0, abseps = 0, correc = 0; + size_t ktmin = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, roundoff_type3 = 0; + int error_type = 0, error_type2 = 0; + + size_t iteration = 0; + + int positive_integrand = 0; + int extrapolate = 0; + int disallow_extrapolation = 0; + + struct extrapolation_table table; + + const size_t nint = npts - 1; /* number of intervals */ + + size_t *ndin = workspace->level; /* temporarily alias ndin to level */ + + size_t i; + + /* Initialize results */ + + *result = 0; + *abserr = 0; + + /* Test on validity of parameters */ + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + if (npts > workspace->limit) + { + GSL_ERROR ("npts exceeds size of workspace", GSL_EINVAL); + } + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + /* Check that the integration range and break points are an + ascending sequence */ + + for (i = 0; i < nint; i++) + { + if (pts[i + 1] < pts[i]) + { + GSL_ERROR ("points are not in an ascending sequence", GSL_EINVAL); + } + } + + /* Perform the first integration */ + + result0 = 0; + abserr0 = 0; + resabs0 = 0; + + initialise (workspace, 0.0, 0.0) ; + + for (i = 0; i < nint; i++) + { + double area1, error1, resabs1, resasc1; + const double a1 = pts[i]; + const double b1 = pts[i + 1]; + + q (f, a1, b1, &area1, &error1, &resabs1, &resasc1); + + result0 = result0 + area1; + abserr0 = abserr0 + error1; + resabs0 = resabs0 + resabs1; + + append_interval (workspace, a1, b1, area1, error1); + + if (error1 == resasc1 && error1 != 0.0) + { + ndin[i] = 1; + } + else + { + ndin[i] = 0; + } + } + + /* Compute the initial error estimate */ + + errsum = 0.0; + + for (i = 0; i < nint; i++) + { + if (ndin[i]) + { + workspace->elist[i] = abserr0; + } + + errsum = errsum + workspace->elist[i]; + + } + + for (i = 0; i < nint; i++) + { + workspace->level[i] = 0; + } + + /* Sort results into order of decreasing error via the indirection + array order[] */ + + sort_results (workspace); + + /* Test on accuracy */ + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + if (abserr0 <= 100 * GSL_DBL_EPSILON * resabs0 && abserr0 > tolerance) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("cannot reach tolerance because of roundoff error" + "on first attempt", GSL_EROUND); + } + else if (abserr0 <= tolerance) + { + *result = result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + /* Initialization */ + + initialise_table (&table); + append_table (&table, result0); + + area = result0; + + res_ext = result0; + err_ext = GSL_DBL_MAX; + + error_over_large_intervals = errsum; + ertest = tolerance; + + positive_integrand = test_positivity (result0, resabs0); + + iteration = nint - 1; + + do + { + size_t current_level; + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + double resasc1, resasc2; + double resabs1, resabs2; + double last_e_i; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + current_level = workspace->level[workspace->i] + 1; + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + iteration++; + + q (f, a1, b1, &area1, &error1, &resabs1, &resasc1); + q (f, a2, b2, &area2, &error2, &resabs2, &resasc2); + + area12 = area1 + area2; + error12 = error1 + error2; + last_e_i = e_i; + + /* Improve previous approximations to the integral and test for + accuracy. + + We write these expressions in the same way as the original + QUADPACK code so that the rounding errors are the same, which + makes testing easier. */ + + errsum = errsum + error12 - e_i; + area = area + area12 - r_i; + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (resasc1 != error1 && resasc2 != error2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + if (!extrapolate) + { + roundoff_type1++; + } + else + { + roundoff_type2++; + } + } + + if (i > 10 && error12 > e_i) + { + roundoff_type3++; + } + } + + /* Test for roundoff and eventually set error flag */ + + if (roundoff_type1 + roundoff_type2 >= 10 || roundoff_type3 >= 20) + { + error_type = 2; /* round off error */ + } + + if (roundoff_type2 >= 5) + { + error_type2 = 1; + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 4; + } + + /* append the newly-created intervals to the list */ + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + if (errsum <= tolerance) + { + goto compute_result; + } + + if (error_type) + { + break; + } + + if (iteration >= limit - 1) + { + error_type = 1; + break; + } + + if (disallow_extrapolation) + { + continue; + } + + error_over_large_intervals += -last_e_i; + + if (current_level < workspace->maximum_level) + { + error_over_large_intervals += error12; + } + + if (!extrapolate) + { + /* test whether the interval to be bisected next is the + smallest interval. */ + if (large_interval (workspace)) + continue; + + extrapolate = 1; + workspace->nrmax = 1; + } + + /* The smallest interval has the largest error. Before + bisecting decrease the sum of the errors over the larger + intervals (error_over_large_intervals) and perform + extrapolation. */ + + if (!error_type2 && error_over_large_intervals > ertest) + { + if (increase_nrmax (workspace)) + continue; + } + + /* Perform extrapolation */ + + append_table (&table, area); + + if (table.n < 3) + { + goto skip_extrapolation; + } + + qelg (&table, &reseps, &abseps); + + ktmin++; + + if (ktmin > 5 && err_ext < 0.001 * errsum) + { + error_type = 5; + } + + if (abseps < err_ext) + { + ktmin = 0; + err_ext = abseps; + res_ext = reseps; + correc = error_over_large_intervals; + ertest = GSL_MAX_DBL (epsabs, epsrel * fabs (reseps)); + if (err_ext <= ertest) + break; + } + + /* Prepare bisection of the smallest interval. */ + + if (table.n == 1) + { + disallow_extrapolation = 1; + } + + if (error_type == 5) + { + break; + } + + skip_extrapolation: + + reset_nrmax (workspace); + extrapolate = 0; + error_over_large_intervals = errsum; + + } + while (iteration < limit); + + *result = res_ext; + *abserr = err_ext; + + if (err_ext == GSL_DBL_MAX) + goto compute_result; + + if (error_type || error_type2) + { + if (error_type2) + { + err_ext += correc; + } + + if (error_type == 0) + error_type = 3; + + if (result != 0 && area != 0) + { + if (err_ext / fabs (res_ext) > errsum / fabs (area)) + goto compute_result; + } + else if (err_ext > errsum) + { + goto compute_result; + } + else if (area == 0.0) + { + goto return_error; + } + } + + /* Test on divergence. */ + + { + double max_area = GSL_MAX_DBL (fabs (res_ext), fabs (area)); + + if (!positive_integrand && max_area < 0.01 * resabs0) + goto return_error; + } + + { + double ratio = res_ext / area; + + if (ratio < 0.01 || ratio > 100 || errsum > fabs (area)) + error_type = 6; + } + + goto return_error; + +compute_result: + + *result = sum_results (workspace); + *abserr = errsum; + +return_error: + + if (error_type > 2) + error_type--; + + if (error_type == 0) + { + return GSL_SUCCESS; + } + else if (error_type == 1) + { + GSL_ERROR ("number of iterations was insufficient", GSL_EMAXITER); + } + else if (error_type == 2) + { + GSL_ERROR ("cannot reach tolerance because of roundoff error", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (error_type == 4) + { + GSL_ERROR ("roundoff error detected in the extrapolation table", + GSL_EROUND); + } + else if (error_type == 5) + { + GSL_ERROR ("integral is divergent, or slowly convergent", + GSL_EDIVERGE); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } +} diff --git a/software/gsl-1.15/integration/qags.c b/software/gsl-1.15/integration/qags.c new file mode 100644 index 000000000..39233604e --- /dev/null +++ b/software/gsl-1.15/integration/qags.c @@ -0,0 +1,570 @@ +/* integration/qags.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include "initialise.c" +#include "set_initial.c" +#include "qpsrt.c" +#include "util.c" +#include "reset.c" +#include "qpsrt2.c" +#include "qelg.c" +#include "positivity.c" + +static int qags (const gsl_function * f, const double a, const double + b, const double epsabs, const double epsrel, const size_t limit, + gsl_integration_workspace * workspace, double *result, double *abserr, + gsl_integration_rule * q); + +int +gsl_integration_qags (const gsl_function *f, + double a, double b, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double * result, double * abserr) +{ + int status = qags (f, a, b, epsabs, epsrel, limit, + workspace, + result, abserr, + &gsl_integration_qk21) ; + return status ; +} + +/* QAGI: evaluate an integral over an infinite range using the + transformation + + integrate(f(x),-Inf,Inf) = integrate((f((1-t)/t) + f(-(1-t)/t))/t^2,0,1) + + */ + +static double i_transform (double t, void *params); + +int +gsl_integration_qagi (gsl_function * f, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr) +{ + int status; + + gsl_function f_transform; + + f_transform.function = &i_transform; + f_transform.params = f; + + status = qags (&f_transform, 0.0, 1.0, + epsabs, epsrel, limit, + workspace, + result, abserr, + &gsl_integration_qk15); + + return status; +} + +static double +i_transform (double t, void *params) +{ + gsl_function *f = (gsl_function *) params; + double x = (1 - t) / t; + double y = GSL_FN_EVAL (f, x) + GSL_FN_EVAL (f, -x); + return (y / t) / t; +} + + +/* QAGIL: Evaluate an integral over an infinite range using the + transformation, + + integrate(f(x),-Inf,b) = integrate(f(b-(1-t)/t)/t^2,0,1) + + */ + +struct il_params { double b ; gsl_function * f ; } ; + +static double il_transform (double t, void *params); + +int +gsl_integration_qagil (gsl_function * f, + double b, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr) +{ + int status; + + gsl_function f_transform; + struct il_params transform_params ; + + transform_params.b = b ; + transform_params.f = f ; + + f_transform.function = &il_transform; + f_transform.params = &transform_params; + + status = qags (&f_transform, 0.0, 1.0, + epsabs, epsrel, limit, + workspace, + result, abserr, + &gsl_integration_qk15); + + return status; +} + +static double +il_transform (double t, void *params) +{ + struct il_params *p = (struct il_params *) params; + double b = p->b; + gsl_function * f = p->f; + double x = b - (1 - t) / t; + double y = GSL_FN_EVAL (f, x); + return (y / t) / t; +} + +/* QAGIU: Evaluate an integral over an infinite range using the + transformation + + integrate(f(x),a,Inf) = integrate(f(a+(1-t)/t)/t^2,0,1) + + */ + +struct iu_params { double a ; gsl_function * f ; } ; + +static double iu_transform (double t, void *params); + +int +gsl_integration_qagiu (gsl_function * f, + double a, + double epsabs, double epsrel, size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr) +{ + int status; + + gsl_function f_transform; + struct iu_params transform_params ; + + transform_params.a = a ; + transform_params.f = f ; + + f_transform.function = &iu_transform; + f_transform.params = &transform_params; + + status = qags (&f_transform, 0.0, 1.0, + epsabs, epsrel, limit, + workspace, + result, abserr, + &gsl_integration_qk15); + + return status; +} + +static double +iu_transform (double t, void *params) +{ + struct iu_params *p = (struct iu_params *) params; + double a = p->a; + gsl_function * f = p->f; + double x = a + (1 - t) / t; + double y = GSL_FN_EVAL (f, x); + return (y / t) / t; +} + +/* Main integration function */ + +static int +qags (const gsl_function * f, + const double a, const double b, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr, + gsl_integration_rule * q) +{ + double area, errsum; + double res_ext, err_ext; + double result0, abserr0, resabs0, resasc0; + double tolerance; + + double ertest = 0; + double error_over_large_intervals = 0; + double reseps = 0, abseps = 0, correc = 0; + size_t ktmin = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, roundoff_type3 = 0; + int error_type = 0, error_type2 = 0; + + size_t iteration = 0; + + int positive_integrand = 0; + int extrapolate = 0; + int disallow_extrapolation = 0; + + struct extrapolation_table table; + + /* Initialize results */ + + initialise (workspace, a, b); + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + /* Test on accuracy */ + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + /* Perform the first integration */ + + q (f, a, b, &result0, &abserr0, &resabs0, &resasc0); + + set_initial_result (workspace, result0, abserr0); + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + if (abserr0 <= 100 * GSL_DBL_EPSILON * resabs0 && abserr0 > tolerance) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("cannot reach tolerance because of roundoff error" + "on first attempt", GSL_EROUND); + } + else if ((abserr0 <= tolerance && abserr0 != resasc0) || abserr0 == 0.0) + { + *result = result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + /* Initialization */ + + initialise_table (&table); + append_table (&table, result0); + + area = result0; + errsum = abserr0; + + res_ext = result0; + err_ext = GSL_DBL_MAX; + + positive_integrand = test_positivity (result0, resabs0); + + iteration = 1; + + do + { + size_t current_level; + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + double resasc1, resasc2; + double resabs1, resabs2; + double last_e_i; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + current_level = workspace->level[workspace->i] + 1; + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + iteration++; + + q (f, a1, b1, &area1, &error1, &resabs1, &resasc1); + q (f, a2, b2, &area2, &error2, &resabs2, &resasc2); + + area12 = area1 + area2; + error12 = error1 + error2; + last_e_i = e_i; + + /* Improve previous approximations to the integral and test for + accuracy. + + We write these expressions in the same way as the original + QUADPACK code so that the rounding errors are the same, which + makes testing easier. */ + + errsum = errsum + error12 - e_i; + area = area + area12 - r_i; + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (resasc1 != error1 && resasc2 != error2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + if (!extrapolate) + { + roundoff_type1++; + } + else + { + roundoff_type2++; + } + } + if (iteration > 10 && error12 > e_i) + { + roundoff_type3++; + } + } + + /* Test for roundoff and eventually set error flag */ + + if (roundoff_type1 + roundoff_type2 >= 10 || roundoff_type3 >= 20) + { + error_type = 2; /* round off error */ + } + + if (roundoff_type2 >= 5) + { + error_type2 = 1; + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 4; + } + + /* append the newly-created intervals to the list */ + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + if (errsum <= tolerance) + { + goto compute_result; + } + + if (error_type) + { + break; + } + + if (iteration >= limit - 1) + { + error_type = 1; + break; + } + + if (iteration == 2) /* set up variables on first iteration */ + { + error_over_large_intervals = errsum; + ertest = tolerance; + append_table (&table, area); + continue; + } + + if (disallow_extrapolation) + { + continue; + } + + error_over_large_intervals += -last_e_i; + + if (current_level < workspace->maximum_level) + { + error_over_large_intervals += error12; + } + + if (!extrapolate) + { + /* test whether the interval to be bisected next is the + smallest interval. */ + + if (large_interval (workspace)) + continue; + + extrapolate = 1; + workspace->nrmax = 1; + } + + if (!error_type2 && error_over_large_intervals > ertest) + { + if (increase_nrmax (workspace)) + continue; + } + + /* Perform extrapolation */ + + append_table (&table, area); + + qelg (&table, &reseps, &abseps); + + ktmin++; + + if (ktmin > 5 && err_ext < 0.001 * errsum) + { + error_type = 5; + } + + if (abseps < err_ext) + { + ktmin = 0; + err_ext = abseps; + res_ext = reseps; + correc = error_over_large_intervals; + ertest = GSL_MAX_DBL (epsabs, epsrel * fabs (reseps)); + if (err_ext <= ertest) + break; + } + + /* Prepare bisection of the smallest interval. */ + + if (table.n == 1) + { + disallow_extrapolation = 1; + } + + if (error_type == 5) + { + break; + } + + /* work on interval with largest error */ + + reset_nrmax (workspace); + extrapolate = 0; + error_over_large_intervals = errsum; + + } + while (iteration < limit); + + *result = res_ext; + *abserr = err_ext; + + if (err_ext == GSL_DBL_MAX) + goto compute_result; + + if (error_type || error_type2) + { + if (error_type2) + { + err_ext += correc; + } + + if (error_type == 0) + error_type = 3; + + if (res_ext != 0.0 && area != 0.0) + { + if (err_ext / fabs (res_ext) > errsum / fabs (area)) + goto compute_result; + } + else if (err_ext > errsum) + { + goto compute_result; + } + else if (area == 0.0) + { + goto return_error; + } + } + + /* Test on divergence. */ + + { + double max_area = GSL_MAX_DBL (fabs (res_ext), fabs (area)); + + if (!positive_integrand && max_area < 0.01 * resabs0) + goto return_error; + } + + { + double ratio = res_ext / area; + + if (ratio < 0.01 || ratio > 100.0 || errsum > fabs (area)) + error_type = 6; + } + + goto return_error; + +compute_result: + + *result = sum_results (workspace); + *abserr = errsum; + +return_error: + + if (error_type > 2) + error_type--; + + + + if (error_type == 0) + { + return GSL_SUCCESS; + } + else if (error_type == 1) + { + GSL_ERROR ("number of iterations was insufficient", GSL_EMAXITER); + } + else if (error_type == 2) + { + GSL_ERROR ("cannot reach tolerance because of roundoff error", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (error_type == 4) + { + GSL_ERROR ("roundoff error detected in the extrapolation table", + GSL_EROUND); + } + else if (error_type == 5) + { + GSL_ERROR ("integral is divergent, or slowly convergent", + GSL_EDIVERGE); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } + +} diff --git a/software/gsl-1.15/integration/qawc.c b/software/gsl-1.15/integration/qawc.c new file mode 100644 index 000000000..a6b14a75f --- /dev/null +++ b/software/gsl-1.15/integration/qawc.c @@ -0,0 +1,220 @@ +/* integration/qawc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "initialise.c" +#include "set_initial.c" +#include "qpsrt.c" +#include "util.c" +#include "qc25c.c" + +int +gsl_integration_qawc (gsl_function * f, + const double a, const double b, const double c, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr) +{ + double area, errsum; + double result0, abserr0; + double tolerance; + size_t iteration = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, error_type = 0; + int err_reliable; + int sign = 1; + double lower, higher; + + /* Initialize results */ + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + if (b < a) + { + lower = b ; + higher = a ; + sign = -1 ; + } + else + { + lower = a; + higher = b; + } + + initialise (workspace, lower, higher); + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + if (c == a || c == b) + { + GSL_ERROR ("cannot integrate with singularity on endpoint", GSL_EINVAL); + } + + /* perform the first integration */ + + qc25c (f, lower, higher, c, &result0, &abserr0, &err_reliable); + + set_initial_result (workspace, result0, abserr0); + + /* Test on accuracy, use 0.01 relative error as an extra safety + margin on the first iteration (ignored for subsequent iterations) */ + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + if (abserr0 < tolerance && abserr0 < 0.01 * fabs(result0)) + { + *result = sign * result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = sign * result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + area = result0; + errsum = abserr0; + + iteration = 1; + + do + { + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + int err_reliable1, err_reliable2; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + if (c > a1 && c <= b1) + { + b1 = 0.5 * (c + b2) ; + a2 = b1; + } + else if (c > b1 && c < b2) + { + b1 = 0.5 * (a1 + c) ; + a2 = b1; + } + + qc25c (f, a1, b1, c, &area1, &error1, &err_reliable1); + qc25c (f, a2, b2, c, &area2, &error2, &err_reliable2); + + area12 = area1 + area2; + error12 = error1 + error2; + + errsum += (error12 - e_i); + area += area12 - r_i; + + if (err_reliable1 && err_reliable2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + roundoff_type1++; + } + if (iteration >= 10 && error12 > e_i) + { + roundoff_type2++; + } + } + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (errsum > tolerance) + { + if (roundoff_type1 >= 6 || roundoff_type2 >= 20) + { + error_type = 2; /* round off error */ + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 3; + } + } + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + iteration++; + + } + while (iteration < limit && !error_type && errsum > tolerance); + + *result = sign * sum_results (workspace); + *abserr = errsum; + + if (errsum <= tolerance) + { + return GSL_SUCCESS; + } + else if (error_type == 2) + { + GSL_ERROR ("roundoff error prevents tolerance from being achieved", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (iteration == limit) + { + GSL_ERROR ("maximum number of subdivisions reached", GSL_EMAXITER); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } + +} diff --git a/software/gsl-1.15/integration/qawf.c b/software/gsl-1.15/integration/qawf.c new file mode 100644 index 000000000..2f44c2f63 --- /dev/null +++ b/software/gsl-1.15/integration/qawf.c @@ -0,0 +1,281 @@ +/* integration/qawf.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "initialise.c" +#include "append.c" +#include "qelg.c" + +int +gsl_integration_qawf (gsl_function * f, + const double a, + const double epsabs, + const size_t limit, + gsl_integration_workspace * workspace, + gsl_integration_workspace * cycle_workspace, + gsl_integration_qawo_table * wf, + double *result, double *abserr) +{ + double area, errsum; + double res_ext, err_ext; + double correc, total_error = 0.0, truncation_error; + + size_t ktmin = 0; + size_t iteration = 0; + + struct extrapolation_table table; + + double cycle; + double omega = wf->omega; + + const double p = 0.9; + double factor = 1; + double initial_eps, eps; + int error_type = 0; + + /* Initialize results */ + + initialise (workspace, a, a); + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + /* Test on accuracy */ + + if (epsabs <= 0) + { + GSL_ERROR ("absolute tolerance epsabs must be positive", GSL_EBADTOL) ; + } + + if (omega == 0.0) + { + if (wf->sine == GSL_INTEG_SINE) + { + /* The function sin(w x) f(x) is always zero for w = 0 */ + + *result = 0; + *abserr = 0; + + return GSL_SUCCESS; + } + else + { + /* The function cos(w x) f(x) is always f(x) for w = 0 */ + + int status = gsl_integration_qagiu (f, a, epsabs, 0.0, + cycle_workspace->limit, + cycle_workspace, + result, abserr); + return status; + } + } + + if (epsabs > GSL_DBL_MIN / (1 - p)) + { + eps = epsabs * (1 - p); + } + else + { + eps = epsabs; + } + + initial_eps = eps; + + area = 0; + errsum = 0; + + res_ext = 0; + err_ext = GSL_DBL_MAX; + correc = 0; + + cycle = (2 * floor (fabs (omega)) + 1) * M_PI / fabs (omega); + + gsl_integration_qawo_table_set_length (wf, cycle); + + initialise_table (&table); + + for (iteration = 0; iteration < limit; iteration++) + { + double area1, error1, reseps, erreps; + + double a1 = a + iteration * cycle; + double b1 = a1 + cycle; + + double epsabs1 = eps * factor; + + int status = gsl_integration_qawo (f, a1, epsabs1, 0.0, limit, + cycle_workspace, wf, + &area1, &error1); + + append_interval (workspace, a1, b1, area1, error1); + + factor *= p; + + area = area + area1; + errsum = errsum + error1; + + /* estimate the truncation error as 50 times the final term */ + + truncation_error = 50 * fabs (area1); + + total_error = errsum + truncation_error; + + if (total_error < epsabs && iteration > 4) + { + goto compute_result; + } + + if (error1 > correc) + { + correc = error1; + } + + if (status) + { + eps = GSL_MAX_DBL (initial_eps, correc * (1.0 - p)); + } + + if (status && total_error < 10 * correc && iteration > 3) + { + goto compute_result; + } + + append_table (&table, area); + + if (table.n < 2) + { + continue; + } + + qelg (&table, &reseps, &erreps); + + ktmin++; + + if (ktmin >= 15 && err_ext < 0.001 * total_error) + { + error_type = 4; + } + + if (erreps < err_ext) + { + ktmin = 0; + err_ext = erreps; + res_ext = reseps; + + if (err_ext + 10 * correc <= epsabs) + break; + if (err_ext <= epsabs && 10 * correc >= epsabs) + break; + } + + } + + if (iteration == limit) + error_type = 1; + + if (err_ext == GSL_DBL_MAX) + goto compute_result; + + err_ext = err_ext + 10 * correc; + + *result = res_ext; + *abserr = err_ext; + + if (error_type == 0) + { + return GSL_SUCCESS ; + } + + if (res_ext != 0.0 && area != 0.0) + { + if (err_ext / fabs (res_ext) > errsum / fabs (area)) + goto compute_result; + } + else if (err_ext > errsum) + { + goto compute_result; + } + else if (area == 0.0) + { + goto return_error; + } + + if (error_type == 4) + { + err_ext = err_ext + truncation_error; + } + + goto return_error; + +compute_result: + + *result = area; + *abserr = total_error; + +return_error: + + if (error_type > 2) + error_type--; + + if (error_type == 0) + { + return GSL_SUCCESS; + } + else if (error_type == 1) + { + GSL_ERROR ("number of iterations was insufficient", GSL_EMAXITER); + } + else if (error_type == 2) + { + GSL_ERROR ("cannot reach tolerance because of roundoff error", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (error_type == 4) + { + GSL_ERROR ("roundoff error detected in the extrapolation table", + GSL_EROUND); + } + else if (error_type == 5) + { + GSL_ERROR ("integral is divergent, or slowly convergent", + GSL_EDIVERGE); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } + +} + diff --git a/software/gsl-1.15/integration/qawo.c b/software/gsl-1.15/integration/qawo.c new file mode 100644 index 000000000..8de72af6f --- /dev/null +++ b/software/gsl-1.15/integration/qawo.c @@ -0,0 +1,460 @@ +/* integration/qawo.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "initialise.c" +#include "set_initial.c" +#include "reset.c" +#include "qpsrt.c" +#include "util.c" +#include "qpsrt2.c" +#include "qelg.c" +#include "positivity.c" + +#include "qc25f.c" + +int +gsl_integration_qawo (gsl_function * f, + const double a, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + gsl_integration_qawo_table * wf, + double *result, double *abserr) +{ + double area, errsum; + double res_ext, err_ext; + double result0, abserr0, resabs0, resasc0; + double tolerance; + + double ertest = 0; + double error_over_large_intervals = 0; + double reseps = 0, abseps = 0, correc = 0; + size_t ktmin = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, roundoff_type3 = 0; + int error_type = 0, error_type2 = 0; + + size_t iteration = 0; + + int positive_integrand = 0; + int extrapolate = 0; + int extall = 0; + int disallow_extrapolation = 0; + + struct extrapolation_table table; + + double b = a + wf->L ; + double abs_omega = fabs (wf->omega) ; + + /* Initialize results */ + + initialise (workspace, a, b); + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + /* Test on accuracy */ + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + /* Perform the first integration */ + + qc25f (f, a, b, wf, 0, &result0, &abserr0, &resabs0, &resasc0); + + set_initial_result (workspace, result0, abserr0); + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + if (abserr0 <= 100 * GSL_DBL_EPSILON * resabs0 && abserr0 > tolerance) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("cannot reach tolerance because of roundoff error" + "on first attempt", GSL_EROUND); + } + else if ((abserr0 <= tolerance && abserr0 != resasc0) || abserr0 == 0.0) + { + *result = result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + /* Initialization */ + + initialise_table (&table); + + if (0.5 * abs_omega * fabs(b - a) <= 2) + { + append_table (&table, result0); + extall = 1; + } + + area = result0; + errsum = abserr0; + + res_ext = result0; + err_ext = GSL_DBL_MAX; + + positive_integrand = test_positivity (result0, resabs0); + + iteration = 1; + + do + { + size_t current_level; + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + double resasc1, resasc2; + double resabs1, resabs2; + double last_e_i; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + current_level = workspace->level[workspace->i] + 1; + + if (current_level >= wf->n) + { + error_type = -1 ; /* exceeded limit of table */ + break ; + } + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + iteration++; + + qc25f (f, a1, b1, wf, current_level, &area1, &error1, &resabs1, &resasc1); + qc25f (f, a2, b2, wf, current_level, &area2, &error2, &resabs2, &resasc2); + + area12 = area1 + area2; + error12 = error1 + error2; + last_e_i = e_i; + + /* Improve previous approximations to the integral and test for + accuracy. + + We write these expressions in the same way as the original + QUADPACK code so that the rounding errors are the same, which + makes testing easier. */ + + errsum = errsum + error12 - e_i; + area = area + area12 - r_i; + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (resasc1 != error1 && resasc2 != error2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + if (!extrapolate) + { + roundoff_type1++; + } + else + { + roundoff_type2++; + } + } + if (iteration > 10 && error12 > e_i) + { + roundoff_type3++; + } + } + + /* Test for roundoff and eventually set error flag */ + + if (roundoff_type1 + roundoff_type2 >= 10 || roundoff_type3 >= 20) + { + error_type = 2; /* round off error */ + } + + if (roundoff_type2 >= 5) + { + error_type2 = 1; + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 4; + } + + /* append the newly-created intervals to the list */ + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + if (errsum <= tolerance) + { + goto compute_result; + } + + if (error_type) + { + break; + } + + if (iteration >= limit - 1) + { + error_type = 1; + break; + } + + /* set up variables on first iteration */ + + if (iteration == 2 && extall) + { + error_over_large_intervals = errsum; + ertest = tolerance; + append_table (&table, area); + continue; + } + + if (disallow_extrapolation) + { + continue; + } + + if (extall) + { + error_over_large_intervals += -last_e_i; + + if (current_level < workspace->maximum_level) + { + error_over_large_intervals += error12; + } + + if (extrapolate) + goto label70; + } + + if (large_interval(workspace)) + { + continue; + } + + if (extall) + { + extrapolate = 1; + workspace->nrmax = 1; + } + else + { + /* test whether the interval to be bisected next is the + smallest interval. */ + size_t i = workspace->i; + double width = workspace->blist[i] - workspace->alist[i]; + + if (0.25 * fabs(width) * abs_omega > 2) + continue; + + extall = 1; + error_over_large_intervals = errsum; + ertest = tolerance; + continue; + } + + label70: + if (!error_type2 && error_over_large_intervals > ertest) + { + if (increase_nrmax (workspace)) + continue; + } + + /* Perform extrapolation */ + + append_table (&table, area); + + if (table.n < 3) + { + reset_nrmax(workspace); + extrapolate = 0; + error_over_large_intervals = errsum; + continue; + } + + qelg (&table, &reseps, &abseps); + + ktmin++; + + if (ktmin > 5 && err_ext < 0.001 * errsum) + { + error_type = 5; + } + + if (abseps < err_ext) + { + ktmin = 0; + err_ext = abseps; + res_ext = reseps; + correc = error_over_large_intervals; + ertest = GSL_MAX_DBL (epsabs, epsrel * fabs (reseps)); + if (err_ext <= ertest) + break; + } + + /* Prepare bisection of the smallest interval. */ + + if (table.n == 1) + { + disallow_extrapolation = 1; + } + + if (error_type == 5) + { + break; + } + + /* work on interval with largest error */ + + reset_nrmax (workspace); + extrapolate = 0; + error_over_large_intervals = errsum; + + } + while (iteration < limit); + + *result = res_ext; + *abserr = err_ext; + + if (err_ext == GSL_DBL_MAX) + goto compute_result; + + if (error_type || error_type2) + { + if (error_type2) + { + err_ext += correc; + } + + if (error_type == 0) + error_type = 3; + + if (result != 0 && area != 0) + { + if (err_ext / fabs (res_ext) > errsum / fabs (area)) + goto compute_result; + } + else if (err_ext > errsum) + { + goto compute_result; + } + else if (area == 0.0) + { + goto return_error; + } + } + + /* Test on divergence. */ + + { + double max_area = GSL_MAX_DBL (fabs (res_ext), fabs (area)); + + if (!positive_integrand && max_area < 0.01 * resabs0) + goto return_error; + } + + { + double ratio = res_ext / area; + + if (ratio < 0.01 || ratio > 100 || errsum > fabs (area)) + error_type = 6; + } + + goto return_error; + +compute_result: + + *result = sum_results (workspace); + *abserr = errsum; + +return_error: + + if (error_type > 2) + error_type--; + + if (error_type == 0) + { + return GSL_SUCCESS; + } + else if (error_type == 1) + { + GSL_ERROR ("number of iterations was insufficient", GSL_EMAXITER); + } + else if (error_type == 2) + { + GSL_ERROR ("cannot reach tolerance because of roundoff error", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (error_type == 4) + { + GSL_ERROR ("roundoff error detected in extrapolation table", GSL_EROUND); + } + else if (error_type == 5) + { + GSL_ERROR ("integral is divergent, or slowly convergent", GSL_EDIVERGE); + } + else if (error_type == -1) + { + GSL_ERROR ("exceeded limit of trigonometric table", GSL_ETABLE); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } + +} diff --git a/software/gsl-1.15/integration/qaws.c b/software/gsl-1.15/integration/qaws.c new file mode 100644 index 000000000..a358a580c --- /dev/null +++ b/software/gsl-1.15/integration/qaws.c @@ -0,0 +1,220 @@ +/* integration/qaws.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "initialise.c" +#include "append.c" +#include "qpsrt.c" +#include "util.c" +#include "qc25s.c" + +int +gsl_integration_qaws (gsl_function * f, + const double a, const double b, + gsl_integration_qaws_table * t, + const double epsabs, const double epsrel, + const size_t limit, + gsl_integration_workspace * workspace, + double *result, double *abserr) +{ + double area, errsum; + double result0, abserr0; + double tolerance; + size_t iteration = 0; + int roundoff_type1 = 0, roundoff_type2 = 0, error_type = 0; + + /* Initialize results */ + + initialise (workspace, a, b); + + *result = 0; + *abserr = 0; + + if (limit > workspace->limit) + { + GSL_ERROR ("iteration limit exceeds available workspace", GSL_EINVAL) ; + } + + if (b <= a) + { + GSL_ERROR ("limits must form an ascending sequence, a < b", GSL_EINVAL) ; + } + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + } + + /* perform the first integration */ + + { + double area1, area2; + double error1, error2; + int err_reliable1, err_reliable2; + double a1 = a; + double b1 = 0.5 * (a + b); + double a2 = b1; + double b2 = b; + + qc25s (f, a, b, a1, b1, t, &area1, &error1, &err_reliable1); + qc25s (f, a, b, a2, b2, t, &area2, &error2, &err_reliable2); + + if (error1 > error2) + { + append_interval (workspace, a1, b1, area1, error1); + append_interval (workspace, a2, b2, area2, error2); + } + else + { + append_interval (workspace, a2, b2, area2, error2); + append_interval (workspace, a1, b1, area1, error1); + } + + result0 = area1 + area2; + abserr0 = error1 + error2; + } + + /* Test on accuracy */ + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (result0)); + + /* Test on accuracy, use 0.01 relative error as an extra safety + margin on the first iteration (ignored for subsequent iterations) */ + + if (abserr0 < tolerance && abserr0 < 0.01 * fabs(result0)) + { + *result = result0; + *abserr = abserr0; + + return GSL_SUCCESS; + } + else if (limit == 1) + { + *result = result0; + *abserr = abserr0; + + GSL_ERROR ("a maximum of one iteration was insufficient", GSL_EMAXITER); + } + + area = result0; + errsum = abserr0; + + iteration = 2; + + do + { + double a1, b1, a2, b2; + double a_i, b_i, r_i, e_i; + double area1 = 0, area2 = 0, area12 = 0; + double error1 = 0, error2 = 0, error12 = 0; + int err_reliable1, err_reliable2; + + /* Bisect the subinterval with the largest error estimate */ + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + a1 = a_i; + b1 = 0.5 * (a_i + b_i); + a2 = b1; + b2 = b_i; + + qc25s (f, a, b, a1, b1, t, &area1, &error1, &err_reliable1); + qc25s (f, a, b, a2, b2, t, &area2, &error2, &err_reliable2); + + area12 = area1 + area2; + error12 = error1 + error2; + + errsum += (error12 - e_i); + area += area12 - r_i; + + if (err_reliable1 && err_reliable2) + { + double delta = r_i - area12; + + if (fabs (delta) <= 1.0e-5 * fabs (area12) && error12 >= 0.99 * e_i) + { + roundoff_type1++; + } + if (iteration >= 10 && error12 > e_i) + { + roundoff_type2++; + } + } + + tolerance = GSL_MAX_DBL (epsabs, epsrel * fabs (area)); + + if (errsum > tolerance) + { + if (roundoff_type1 >= 6 || roundoff_type2 >= 20) + { + error_type = 2; /* round off error */ + } + + /* set error flag in the case of bad integrand behaviour at + a point of the integration range */ + + if (subinterval_too_small (a1, a2, b2)) + { + error_type = 3; + } + } + + update (workspace, a1, b1, area1, error1, a2, b2, area2, error2); + + retrieve (workspace, &a_i, &b_i, &r_i, &e_i); + + iteration++; + + } + while (iteration < limit && !error_type && errsum > tolerance); + + *result = sum_results (workspace); + *abserr = errsum; + + if (errsum <= tolerance) + { + return GSL_SUCCESS; + } + else if (error_type == 2) + { + GSL_ERROR ("roundoff error prevents tolerance from being achieved", + GSL_EROUND); + } + else if (error_type == 3) + { + GSL_ERROR ("bad integrand behavior found in the integration interval", + GSL_ESING); + } + else if (iteration == limit) + { + GSL_ERROR ("maximum number of subdivisions reached", GSL_EMAXITER); + } + else + { + GSL_ERROR ("could not integrate function", GSL_EFAILED); + } + +} diff --git a/software/gsl-1.15/integration/qc25c.c b/software/gsl-1.15/integration/qc25c.c new file mode 100644 index 000000000..77823671e --- /dev/null +++ b/software/gsl-1.15/integration/qc25c.c @@ -0,0 +1,132 @@ +/* integration/qc25c.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +struct fn_cauchy_params +{ + gsl_function *function; + double singularity; +}; + +static double fn_cauchy (double t, void *params); + +static void compute_moments (double cc, double *moment); + +static void +qc25c (gsl_function * f, double a, double b, double c, + double *result, double *abserr, int *err_reliable); + +static void +qc25c (gsl_function * f, double a, double b, double c, + double *result, double *abserr, int *err_reliable) +{ + double cc = (2 * c - b - a) / (b - a); + + if (fabs (cc) > 1.1) + { + double resabs, resasc; + + gsl_function weighted_function; + struct fn_cauchy_params fn_params; + + fn_params.function = f; + fn_params.singularity = c; + + weighted_function.function = &fn_cauchy; + weighted_function.params = &fn_params; + + gsl_integration_qk15 (&weighted_function, a, b, result, abserr, + &resabs, &resasc); + + if (*abserr == resasc) + { + *err_reliable = 0; + } + else + { + *err_reliable = 1; + } + + return; + } + else + { + double cheb12[13], cheb24[25], moment[25]; + double res12 = 0, res24 = 0; + size_t i; + gsl_integration_qcheb (f, a, b, cheb12, cheb24); + compute_moments (cc, moment); + + for (i = 0; i < 13; i++) + { + res12 += cheb12[i] * moment[i]; + } + + for (i = 0; i < 25; i++) + { + res24 += cheb24[i] * moment[i]; + } + + *result = res24; + *abserr = fabs(res24 - res12) ; + *err_reliable = 0; + + return; + } +} + +static double +fn_cauchy (double x, void *params) +{ + struct fn_cauchy_params *p = (struct fn_cauchy_params *) params; + gsl_function *f = p->function; + double c = p->singularity; + return GSL_FN_EVAL (f, x) / (x - c); +} + +static void +compute_moments (double cc, double *moment) +{ + size_t k; + + double a0 = log (fabs ((1.0 - cc) / (1.0 + cc))); + double a1 = 2 + a0 * cc; + + moment[0] = a0; + moment[1] = a1; + + for (k = 2; k < 25; k++) + { + double a2; + + if ((k % 2) == 0) + { + a2 = 2.0 * cc * a1 - a0; + } + else + { + const double km1 = k - 1.0; + a2 = 2.0 * cc * a1 - a0 - 4.0 / (km1 * km1 - 1.0); + } + + moment[k] = a2; + + a0 = a1; + a1 = a2; + } +} diff --git a/software/gsl-1.15/integration/qc25f.c b/software/gsl-1.15/integration/qc25f.c new file mode 100644 index 000000000..ffb473276 --- /dev/null +++ b/software/gsl-1.15/integration/qc25f.c @@ -0,0 +1,158 @@ +/* integration/qc25f.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +struct fn_fourier_params +{ + gsl_function *function; + double omega; +}; + +static double fn_sin (double t, void *params); +static double fn_cos (double t, void *params); + +static void +qc25f (gsl_function * f, double a, double b, + gsl_integration_qawo_table * wf, size_t level, + double *result, double *abserr, double *resabs, double *resasc); + +static void +qc25f (gsl_function * f, double a, double b, + gsl_integration_qawo_table * wf, size_t level, + double *result, double *abserr, double *resabs, double *resasc) +{ + const double center = 0.5 * (a + b); + const double half_length = 0.5 * (b - a); + const double omega = wf->omega ; + + const double par = omega * half_length; + + if (fabs (par) < 2) + { + gsl_function weighted_function; + struct fn_fourier_params fn_params; + + fn_params.function = f; + fn_params.omega = omega; + + if (wf->sine == GSL_INTEG_SINE) + { + weighted_function.function = &fn_sin; + } + else + { + weighted_function.function = &fn_cos; + } + + weighted_function.params = &fn_params; + + gsl_integration_qk15 (&weighted_function, a, b, result, abserr, + resabs, resasc); + + return; + } + else + { + double *moment; + double cheb12[13], cheb24[25]; + double result_abs, res12_cos, res12_sin, res24_cos, res24_sin; + double est_cos, est_sin; + double c, s; + size_t i; + + gsl_integration_qcheb (f, a, b, cheb12, cheb24); + + if (level >= wf->n) + { + /* table overflow should not happen, check before calling */ + GSL_ERROR_VOID("table overflow in internal function", GSL_ESANITY); + } + + /* obtain moments from the table */ + + moment = wf->chebmo + 25 * level; + + res12_cos = cheb12[12] * moment[12]; + res12_sin = 0 ; + + for (i = 0; i < 6; i++) + { + size_t k = 10 - 2 * i; + res12_cos += cheb12[k] * moment[k]; + res12_sin += cheb12[k + 1] * moment[k + 1]; + } + + res24_cos = cheb24[24] * moment[24]; + res24_sin = 0 ; + + result_abs = fabs(cheb24[24]) ; + + for (i = 0; i < 12; i++) + { + size_t k = 22 - 2 * i; + res24_cos += cheb24[k] * moment[k]; + res24_sin += cheb24[k + 1] * moment[k + 1]; + result_abs += fabs(cheb24[k]) + fabs(cheb24[k+1]); + } + + est_cos = fabs(res24_cos - res12_cos); + est_sin = fabs(res24_sin - res12_sin); + + c = half_length * cos(center * omega); + s = half_length * sin(center * omega); + + if (wf->sine == GSL_INTEG_SINE) + { + *result = c * res24_sin + s * res24_cos; + *abserr = fabs(c * est_sin) + fabs(s * est_cos); + } + else + { + *result = c * res24_cos - s * res24_sin; + *abserr = fabs(c * est_cos) + fabs(s * est_sin); + } + + *resabs = result_abs * half_length; + *resasc = GSL_DBL_MAX; + + return; + } +} + +static double +fn_sin (double x, void *params) +{ + struct fn_fourier_params *p = (struct fn_fourier_params *) params; + gsl_function *f = p->function; + double w = p->omega; + double wx = w * x; + double sinwx = sin(wx) ; + return GSL_FN_EVAL (f, x) * sinwx; +} + +static double +fn_cos (double x, void *params) +{ + struct fn_fourier_params *p = (struct fn_fourier_params *) params; + gsl_function *f = p->function; + double w = p->omega; + double wx = w * x; + double coswx = cos(wx) ; + return GSL_FN_EVAL (f, x) * coswx ; +} + diff --git a/software/gsl-1.15/integration/qc25s.c b/software/gsl-1.15/integration/qc25s.c new file mode 100644 index 000000000..075088cce --- /dev/null +++ b/software/gsl-1.15/integration/qc25s.c @@ -0,0 +1,238 @@ +/* integration/qc25s.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +struct fn_qaws_params +{ + gsl_function *function; + double a; + double b; + gsl_integration_qaws_table *table; +}; + +static double fn_qaws (double t, void *params); +static double fn_qaws_L (double x, void *params); +static double fn_qaws_R (double x, void *params); + +static void +compute_result (const double * r, const double * cheb12, const double * cheb24, + double * result12, double * result24); + + +static void +qc25s (gsl_function * f, double a, double b, double a1, double b1, + gsl_integration_qaws_table * t, + double *result, double *abserr, int *err_reliable); + +static void +qc25s (gsl_function * f, double a, double b, double a1, double b1, + gsl_integration_qaws_table * t, + double *result, double *abserr, int *err_reliable) +{ + gsl_function weighted_function; + struct fn_qaws_params fn_params; + + fn_params.function = f; + fn_params.a = a; + fn_params.b = b; + fn_params.table = t; + + weighted_function.params = &fn_params; + + if (a1 == a && (t->alpha != 0.0 || t->mu != 0)) + { + double cheb12[13], cheb24[25]; + + double factor = pow(0.5 * (b1 - a1), t->alpha + 1.0); + + weighted_function.function = &fn_qaws_R; + + gsl_integration_qcheb (&weighted_function, a1, b1, cheb12, cheb24); + + if (t->mu == 0) + { + double res12 = 0, res24 = 0; + double u = factor; + + compute_result (t->ri, cheb12, cheb24, &res12, &res24); + + *result = u * res24; + *abserr = fabs(u * (res24 - res12)); + } + else + { + double res12a = 0, res24a = 0; + double res12b = 0, res24b = 0; + + double u = factor * log(b1 - a1); + double v = factor; + + compute_result (t->ri, cheb12, cheb24, &res12a, &res24a); + compute_result (t->rg, cheb12, cheb24, &res12b, &res24b); + + *result = u * res24a + v * res24b; + *abserr = fabs(u * (res24a - res12a)) + fabs(v * (res24b - res12b)); + } + + *err_reliable = 0; + + return; + } + else if (b1 == b && (t->beta != 0.0 || t->nu != 0)) + { + double cheb12[13], cheb24[25]; + double factor = pow(0.5 * (b1 - a1), t->beta + 1.0); + + weighted_function.function = &fn_qaws_L; + + gsl_integration_qcheb (&weighted_function, a1, b1, cheb12, cheb24); + + if (t->nu == 0) + { + double res12 = 0, res24 = 0; + double u = factor; + + compute_result (t->rj, cheb12, cheb24, &res12, &res24); + + *result = u * res24; + *abserr = fabs(u * (res24 - res12)); + } + else + { + double res12a = 0, res24a = 0; + double res12b = 0, res24b = 0; + + double u = factor * log(b1 - a1); + double v = factor; + + compute_result (t->rj, cheb12, cheb24, &res12a, &res24a); + compute_result (t->rh, cheb12, cheb24, &res12b, &res24b); + + *result = u * res24a + v * res24b; + *abserr = fabs(u * (res24a - res12a)) + fabs(v * (res24b - res12b)); + } + + *err_reliable = 0; + + return; + } + else + { + double resabs, resasc; + + weighted_function.function = &fn_qaws; + + gsl_integration_qk15 (&weighted_function, a1, b1, result, abserr, + &resabs, &resasc); + + if (*abserr == resasc) + { + *err_reliable = 0; + } + else + { + *err_reliable = 1; + } + + return; + } + +} + +static double +fn_qaws (double x, void *params) +{ + struct fn_qaws_params *p = (struct fn_qaws_params *) params; + gsl_function *f = p->function; + gsl_integration_qaws_table *t = p->table; + + double factor = 1.0; + + if (t->alpha != 0.0) + factor *= pow(x - p->a, t->alpha); + + if (t->beta != 0.0) + factor *= pow(p->b - x, t->beta); + + if (t->mu == 1) + factor *= log(x - p->a); + + if (t->nu == 1) + factor *= log(p->b - x); + + return factor * GSL_FN_EVAL (f, x); +} + +static double +fn_qaws_L (double x, void *params) +{ + struct fn_qaws_params *p = (struct fn_qaws_params *) params; + gsl_function *f = p->function; + gsl_integration_qaws_table *t = p->table; + + double factor = 1.0; + + if (t->alpha != 0.0) + factor *= pow(x - p->a, t->alpha); + + if (t->mu == 1) + factor *= log(x - p->a); + + return factor * GSL_FN_EVAL (f, x); +} + +static double +fn_qaws_R (double x, void *params) +{ + struct fn_qaws_params *p = (struct fn_qaws_params *) params; + gsl_function *f = p->function; + gsl_integration_qaws_table *t = p->table; + + double factor = 1.0; + + if (t->beta != 0.0) + factor *= pow(p->b - x, t->beta); + + if (t->nu == 1) + factor *= log(p->b - x); + + return factor * GSL_FN_EVAL (f, x); +} + + +static void +compute_result (const double * r, const double * cheb12, const double * cheb24, + double * result12, double * result24) +{ + size_t i; + double res12 = 0; + double res24 = 0; + + for (i = 0; i < 13; i++) + { + res12 += r[i] * cheb12[i]; + } + + for (i = 0; i < 25; i++) + { + res24 += r[i] * cheb24[i]; + } + + *result12 = res12; + *result24 = res24; +} diff --git a/software/gsl-1.15/integration/qcheb.c b/software/gsl-1.15/integration/qcheb.c new file mode 100644 index 000000000..f0ede1448 --- /dev/null +++ b/software/gsl-1.15/integration/qcheb.c @@ -0,0 +1,229 @@ +/* integration/qcheb.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + + +/* This function computes the 12-th order and 24-th order Chebyshev + approximations to f(x) on [a,b] */ + +void +gsl_integration_qcheb (gsl_function * f, double a, double b, double *cheb12, double *cheb24) +{ + size_t i; + double fval[25], v[12]; + + /* These are the values of cos(pi*k/24) for k=1..11 needed for the + Chebyshev expansion of f(x) */ + + const double x[11] = { 0.9914448613738104, + 0.9659258262890683, + 0.9238795325112868, + 0.8660254037844386, + 0.7933533402912352, + 0.7071067811865475, + 0.6087614290087206, + 0.5000000000000000, + 0.3826834323650898, + 0.2588190451025208, + 0.1305261922200516 }; + + const double center = 0.5 * (b + a); + const double half_length = 0.5 * (b - a); + + fval[0] = 0.5 * GSL_FN_EVAL (f, b); + fval[12] = GSL_FN_EVAL (f, center); + fval[24] = 0.5 * GSL_FN_EVAL (f, a); + + for (i = 1; i < 12; i++) + { + const size_t j = 24 - i; + const double u = half_length * x[i-1]; + fval[i] = GSL_FN_EVAL(f, center + u); + fval[j] = GSL_FN_EVAL(f, center - u); + } + + for (i = 0; i < 12; i++) + { + const size_t j = 24 - i; + v[i] = fval[i] - fval[j]; + fval[i] = fval[i] + fval[j]; + } + + { + const double alam1 = v[0] - v[8]; + const double alam2 = x[5] * (v[2] - v[6] - v[10]); + + cheb12[3] = alam1 + alam2; + cheb12[9] = alam1 - alam2; + } + + { + const double alam1 = v[1] - v[7] - v[9]; + const double alam2 = v[3] - v[5] - v[11]; + { + const double alam = x[2] * alam1 + x[8] * alam2; + + cheb24[3] = cheb12[3] + alam; + cheb24[21] = cheb12[3] - alam; + } + + { + const double alam = x[8] * alam1 - x[2] * alam2; + cheb24[9] = cheb12[9] + alam; + cheb24[15] = cheb12[9] - alam; + } + } + + { + const double part1 = x[3] * v[4]; + const double part2 = x[7] * v[8]; + const double part3 = x[5] * v[6]; + + { + const double alam1 = v[0] + part1 + part2; + const double alam2 = x[1] * v[2] + part3 + x[9] * v[10]; + + cheb12[1] = alam1 + alam2; + cheb12[11] = alam1 - alam2; + } + + { + const double alam1 = v[0] - part1 + part2; + const double alam2 = x[9] * v[2] - part3 + x[1] * v[10]; + cheb12[5] = alam1 + alam2; + cheb12[7] = alam1 - alam2; + } + } + + { + const double alam = (x[0] * v[1] + x[2] * v[3] + x[4] * v[5] + + x[6] * v[7] + x[8] * v[9] + x[10] * v[11]); + cheb24[1] = cheb12[1] + alam; + cheb24[23] = cheb12[1] - alam; + } + + { + const double alam = (x[10] * v[1] - x[8] * v[3] + x[6] * v[5] + - x[4] * v[7] + x[2] * v[9] - x[0] * v[11]); + cheb24[11] = cheb12[11] + alam; + cheb24[13] = cheb12[11] - alam; + } + + { + const double alam = (x[4] * v[1] - x[8] * v[3] - x[0] * v[5] + - x[10] * v[7] + x[2] * v[9] + x[6] * v[11]); + cheb24[5] = cheb12[5] + alam; + cheb24[19] = cheb12[5] - alam; + } + + { + const double alam = (x[6] * v[1] - x[2] * v[3] - x[10] * v[5] + + x[0] * v[7] - x[8] * v[9] - x[4] * v[11]); + cheb24[7] = cheb12[7] + alam; + cheb24[17] = cheb12[7] - alam; + } + + for (i = 0; i < 6; i++) + { + const size_t j = 12 - i; + v[i] = fval[i] - fval[j]; + fval[i] = fval[i] + fval[j]; + } + + { + const double alam1 = v[0] + x[7] * v[4]; + const double alam2 = x[3] * v[2]; + + cheb12[2] = alam1 + alam2; + cheb12[10] = alam1 - alam2; + } + + cheb12[6] = v[0] - v[4]; + + { + const double alam = x[1] * v[1] + x[5] * v[3] + x[9] * v[5]; + cheb24[2] = cheb12[2] + alam; + cheb24[22] = cheb12[2] - alam; + } + + { + const double alam = x[5] * (v[1] - v[3] - v[5]); + cheb24[6] = cheb12[6] + alam; + cheb24[18] = cheb12[6] - alam; + } + + { + const double alam = x[9] * v[1] - x[5] * v[3] + x[1] * v[5]; + cheb24[10] = cheb12[10] + alam; + cheb24[14] = cheb12[10] - alam; + } + + for (i = 0; i < 3; i++) + { + const size_t j = 6 - i; + v[i] = fval[i] - fval[j]; + fval[i] = fval[i] + fval[j]; + } + + cheb12[4] = v[0] + x[7] * v[2]; + cheb12[8] = fval[0] - x[7] * fval[2]; + + { + const double alam = x[3] * v[1]; + cheb24[4] = cheb12[4] + alam; + cheb24[20] = cheb12[4] - alam; + } + + { + const double alam = x[7] * fval[1] - fval[3]; + cheb24[8] = cheb12[8] + alam; + cheb24[16] = cheb12[8] - alam; + } + + cheb12[0] = fval[0] + fval[2]; + + { + const double alam = fval[1] + fval[3]; + cheb24[0] = cheb12[0] + alam; + cheb24[24] = cheb12[0] - alam; + } + + cheb12[12] = v[0] - v[2]; + cheb24[12] = cheb12[12]; + + for (i = 1; i < 12; i++) + { + cheb12[i] *= 1.0 / 6.0; + } + + cheb12[0] *= 1.0 / 12.0; + cheb12[12] *= 1.0 / 12.0; + + for (i = 1; i < 24; i++) + { + cheb24[i] *= 1.0 / 12.0; + } + + cheb24[0] *= 1.0 / 24.0; + cheb24[24] *= 1.0 / 24.0; +} diff --git a/software/gsl-1.15/integration/qelg.c b/software/gsl-1.15/integration/qelg.c new file mode 100644 index 000000000..d9e216972 --- /dev/null +++ b/software/gsl-1.15/integration/qelg.c @@ -0,0 +1,233 @@ +/* integration/qelg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +struct extrapolation_table + { + size_t n; + double rlist2[52]; + size_t nres; + double res3la[3]; + }; + +static void + initialise_table (struct extrapolation_table *table); + +static void + append_table (struct extrapolation_table *table, double y); + +static void +initialise_table (struct extrapolation_table *table) +{ + table->n = 0; + table->nres = 0; +} +#ifdef JUNK +static void +initialise_table (struct extrapolation_table *table, double y) +{ + table->n = 0; + table->rlist2[0] = y; + table->nres = 0; +} +#endif +static void +append_table (struct extrapolation_table *table, double y) +{ + size_t n; + n = table->n; + table->rlist2[n] = y; + table->n++; +} + +/* static inline void + qelg (size_t * n, double epstab[], + double * result, double * abserr, + double res3la[], size_t * nres); */ + +static inline void + qelg (struct extrapolation_table *table, double *result, double *abserr); + +static inline void +qelg (struct extrapolation_table *table, double *result, double *abserr) +{ + double *epstab = table->rlist2; + double *res3la = table->res3la; + const size_t n = table->n - 1; + + const double current = epstab[n]; + + double absolute = GSL_DBL_MAX; + double relative = 5 * GSL_DBL_EPSILON * fabs (current); + + const size_t newelm = n / 2; + const size_t n_orig = n; + size_t n_final = n; + size_t i; + + const size_t nres_orig = table->nres; + + *result = current; + *abserr = GSL_DBL_MAX; + + if (n < 2) + { + *result = current; + *abserr = GSL_MAX_DBL (absolute, relative); + return; + } + + epstab[n + 2] = epstab[n]; + epstab[n] = GSL_DBL_MAX; + + for (i = 0; i < newelm; i++) + { + double res = epstab[n - 2 * i + 2]; + double e0 = epstab[n - 2 * i - 2]; + double e1 = epstab[n - 2 * i - 1]; + double e2 = res; + + double e1abs = fabs (e1); + double delta2 = e2 - e1; + double err2 = fabs (delta2); + double tol2 = GSL_MAX_DBL (fabs (e2), e1abs) * GSL_DBL_EPSILON; + double delta3 = e1 - e0; + double err3 = fabs (delta3); + double tol3 = GSL_MAX_DBL (e1abs, fabs (e0)) * GSL_DBL_EPSILON; + + double e3, delta1, err1, tol1, ss; + + if (err2 <= tol2 && err3 <= tol3) + { + /* If e0, e1 and e2 are equal to within machine accuracy, + convergence is assumed. */ + + *result = res; + absolute = err2 + err3; + relative = 5 * GSL_DBL_EPSILON * fabs (res); + *abserr = GSL_MAX_DBL (absolute, relative); + return; + } + + e3 = epstab[n - 2 * i]; + epstab[n - 2 * i] = e1; + delta1 = e1 - e3; + err1 = fabs (delta1); + tol1 = GSL_MAX_DBL (e1abs, fabs (e3)) * GSL_DBL_EPSILON; + + /* If two elements are very close to each other, omit a part of + the table by adjusting the value of n */ + + if (err1 <= tol1 || err2 <= tol2 || err3 <= tol3) + { + n_final = 2 * i; + break; + } + + ss = (1 / delta1 + 1 / delta2) - 1 / delta3; + + /* Test to detect irregular behaviour in the table, and + eventually omit a part of the table by adjusting the value of + n. */ + + if (fabs (ss * e1) <= 0.0001) + { + n_final = 2 * i; + break; + } + + /* Compute a new element and eventually adjust the value of + result. */ + + res = e1 + 1 / ss; + epstab[n - 2 * i] = res; + + { + const double error = err2 + fabs (res - e2) + err3; + + if (error <= *abserr) + { + *abserr = error; + *result = res; + } + } + } + + /* Shift the table */ + + { + const size_t limexp = 50 - 1; + + if (n_final == limexp) + { + n_final = 2 * (limexp / 2); + } + } + + if (n_orig % 2 == 1) + { + for (i = 0; i <= newelm; i++) + { + epstab[1 + i * 2] = epstab[i * 2 + 3]; + } + } + else + { + for (i = 0; i <= newelm; i++) + { + epstab[i * 2] = epstab[i * 2 + 2]; + } + } + + if (n_orig != n_final) + { + for (i = 0; i <= n_final; i++) + { + epstab[i] = epstab[n_orig - n_final + i]; + } + } + + table->n = n_final + 1; + + if (nres_orig < 3) + { + res3la[nres_orig] = *result; + *abserr = GSL_DBL_MAX; + } + else + { /* Compute error estimate */ + *abserr = (fabs (*result - res3la[2]) + fabs (*result - res3la[1]) + + fabs (*result - res3la[0])); + + res3la[0] = res3la[1]; + res3la[1] = res3la[2]; + res3la[2] = *result; + } + + /* In QUADPACK the variable table->nres is incremented at the top of + qelg, so it increases on every call. This leads to the array + res3la being accessed when its elements are still undefined, so I + have moved the update to this point so that its value more + useful. */ + + table->nres = nres_orig + 1; + + *abserr = GSL_MAX_DBL (*abserr, 5 * GSL_DBL_EPSILON * fabs (*result)); + + return; +} diff --git a/software/gsl-1.15/integration/qk.c b/software/gsl-1.15/integration/qk.c new file mode 100644 index 000000000..2bbda8141 --- /dev/null +++ b/software/gsl-1.15/integration/qk.c @@ -0,0 +1,102 @@ +/* integration/qk.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include "err.c" + +void +gsl_integration_qk (const int n, + const double xgk[], const double wg[], const double wgk[], + double fv1[], double fv2[], + const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + + const double center = 0.5 * (a + b); + const double half_length = 0.5 * (b - a); + const double abs_half_length = fabs (half_length); + const double f_center = GSL_FN_EVAL (f, center); + + double result_gauss = 0; + double result_kronrod = f_center * wgk[n - 1]; + + double result_abs = fabs (result_kronrod); + double result_asc = 0; + double mean = 0, err = 0; + + int j; + + if (n % 2 == 0) + { + result_gauss = f_center * wg[n / 2 - 1]; + } + + for (j = 0; j < (n - 1) / 2; j++) + { + const int jtw = j * 2 + 1; /* in original fortran j=1,2,3 jtw=2,4,6 */ + const double abscissa = half_length * xgk[jtw]; + const double fval1 = GSL_FN_EVAL (f, center - abscissa); + const double fval2 = GSL_FN_EVAL (f, center + abscissa); + const double fsum = fval1 + fval2; + fv1[jtw] = fval1; + fv2[jtw] = fval2; + result_gauss += wg[j] * fsum; + result_kronrod += wgk[jtw] * fsum; + result_abs += wgk[jtw] * (fabs (fval1) + fabs (fval2)); + } + + for (j = 0; j < n / 2; j++) + { + int jtwm1 = j * 2; + const double abscissa = half_length * xgk[jtwm1]; + const double fval1 = GSL_FN_EVAL (f, center - abscissa); + const double fval2 = GSL_FN_EVAL (f, center + abscissa); + fv1[jtwm1] = fval1; + fv2[jtwm1] = fval2; + result_kronrod += wgk[jtwm1] * (fval1 + fval2); + result_abs += wgk[jtwm1] * (fabs (fval1) + fabs (fval2)); + }; + + mean = result_kronrod * 0.5; + + result_asc = wgk[n - 1] * fabs (f_center - mean); + + for (j = 0; j < n - 1; j++) + { + result_asc += wgk[j] * (fabs (fv1[j] - mean) + fabs (fv2[j] - mean)); + } + + /* scale by the width of the integration region */ + + err = (result_kronrod - result_gauss) * half_length; + + result_kronrod *= half_length; + result_abs *= abs_half_length; + result_asc *= abs_half_length; + + *result = result_kronrod; + *resabs = result_abs; + *resasc = result_asc; + *abserr = rescale_error (err, result_abs, result_asc); + +} diff --git a/software/gsl-1.15/integration/qk15.c b/software/gsl-1.15/integration/qk15.c new file mode 100644 index 000000000..bfba51762 --- /dev/null +++ b/software/gsl-1.15/integration/qk15.c @@ -0,0 +1,70 @@ +/* integration/qk15.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[8] = /* abscissae of the 15-point kronrod rule */ +{ + 0.991455371120812639206854697526329, + 0.949107912342758524526189684047851, + 0.864864423359769072789712788640926, + 0.741531185599394439863864773280788, + 0.586087235467691130294144838258730, + 0.405845151377397166906606412076961, + 0.207784955007898467600689403773245, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 7-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 7-point gauss rule */ + +static const double wg[4] = /* weights of the 7-point gauss rule */ +{ + 0.129484966168869693270611432679082, + 0.279705391489276667901467771423780, + 0.381830050505118944950369775488975, + 0.417959183673469387755102040816327 +}; + +static const double wgk[8] = /* weights of the 15-point kronrod rule */ +{ + 0.022935322010529224963732008058970, + 0.063092092629978553290700663189204, + 0.104790010322250183839876322541518, + 0.140653259715525918745189590510238, + 0.169004726639267902826583426598550, + 0.190350578064785409913256402421014, + 0.204432940075298892414161999234649, + 0.209482141084727828012999174891714 +}; + +void +gsl_integration_qk15 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[8], fv2[8]; + gsl_integration_qk (8, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} + diff --git a/software/gsl-1.15/integration/qk21.c b/software/gsl-1.15/integration/qk21.c new file mode 100644 index 000000000..1e263ed7b --- /dev/null +++ b/software/gsl-1.15/integration/qk21.c @@ -0,0 +1,77 @@ +/* integration/qk21.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[11] = /* abscissae of the 21-point kronrod rule */ +{ + 0.995657163025808080735527280689003, + 0.973906528517171720077964012084452, + 0.930157491355708226001207180059508, + 0.865063366688984510732096688423493, + 0.780817726586416897063717578345042, + 0.679409568299024406234327365114874, + 0.562757134668604683339000099272694, + 0.433395394129247190799265943165784, + 0.294392862701460198131126603103866, + 0.148874338981631210884826001129720, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 10-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 10-point gauss rule */ + +static const double wg[5] = /* weights of the 10-point gauss rule */ +{ + 0.066671344308688137593568809893332, + 0.149451349150580593145776339657697, + 0.219086362515982043995534934228163, + 0.269266719309996355091226921569469, + 0.295524224714752870173892994651338 +}; + +static const double wgk[11] = /* weights of the 21-point kronrod rule */ +{ + 0.011694638867371874278064396062192, + 0.032558162307964727478818972459390, + 0.054755896574351996031381300244580, + 0.075039674810919952767043140916190, + 0.093125454583697605535065465083366, + 0.109387158802297641899210590325805, + 0.123491976262065851077958109831074, + 0.134709217311473325928054001771707, + 0.142775938577060080797094273138717, + 0.147739104901338491374841515972068, + 0.149445554002916905664936468389821 +}; + + +void +gsl_integration_qk21 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[11], fv2[11]; + gsl_integration_qk (11, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} diff --git a/software/gsl-1.15/integration/qk31.c b/software/gsl-1.15/integration/qk31.c new file mode 100644 index 000000000..3f695d13e --- /dev/null +++ b/software/gsl-1.15/integration/qk31.c @@ -0,0 +1,89 @@ +/* integration/qk31.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[16] = /* abscissae of the 31-point kronrod rule */ +{ + 0.998002298693397060285172840152271, + 0.987992518020485428489565718586613, + 0.967739075679139134257347978784337, + 0.937273392400705904307758947710209, + 0.897264532344081900882509656454496, + 0.848206583410427216200648320774217, + 0.790418501442465932967649294817947, + 0.724417731360170047416186054613938, + 0.650996741297416970533735895313275, + 0.570972172608538847537226737253911, + 0.485081863640239680693655740232351, + 0.394151347077563369897207370981045, + 0.299180007153168812166780024266389, + 0.201194093997434522300628303394596, + 0.101142066918717499027074231447392, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 15-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 15-point gauss rule */ + +static const double wg[8] = /* weights of the 15-point gauss rule */ +{ + 0.030753241996117268354628393577204, + 0.070366047488108124709267416450667, + 0.107159220467171935011869546685869, + 0.139570677926154314447804794511028, + 0.166269205816993933553200860481209, + 0.186161000015562211026800561866423, + 0.198431485327111576456118326443839, + 0.202578241925561272880620199967519 +}; + +static const double wgk[16] = /* weights of the 31-point kronrod rule */ +{ + 0.005377479872923348987792051430128, + 0.015007947329316122538374763075807, + 0.025460847326715320186874001019653, + 0.035346360791375846222037948478360, + 0.044589751324764876608227299373280, + 0.053481524690928087265343147239430, + 0.062009567800670640285139230960803, + 0.069854121318728258709520077099147, + 0.076849680757720378894432777482659, + 0.083080502823133021038289247286104, + 0.088564443056211770647275443693774, + 0.093126598170825321225486872747346, + 0.096642726983623678505179907627589, + 0.099173598721791959332393173484603, + 0.100769845523875595044946662617570, + 0.101330007014791549017374792767493 +}; + +void +gsl_integration_qk31 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[16], fv2[16]; + gsl_integration_qk (16, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} diff --git a/software/gsl-1.15/integration/qk41.c b/software/gsl-1.15/integration/qk41.c new file mode 100644 index 000000000..4b78b3e0a --- /dev/null +++ b/software/gsl-1.15/integration/qk41.c @@ -0,0 +1,102 @@ +/* integration/qk41.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[21] = /* abscissae of the 41-point kronrod rule */ +{ + 0.998859031588277663838315576545863, + 0.993128599185094924786122388471320, + 0.981507877450250259193342994720217, + 0.963971927277913791267666131197277, + 0.940822633831754753519982722212443, + 0.912234428251325905867752441203298, + 0.878276811252281976077442995113078, + 0.839116971822218823394529061701521, + 0.795041428837551198350638833272788, + 0.746331906460150792614305070355642, + 0.693237656334751384805490711845932, + 0.636053680726515025452836696226286, + 0.575140446819710315342946036586425, + 0.510867001950827098004364050955251, + 0.443593175238725103199992213492640, + 0.373706088715419560672548177024927, + 0.301627868114913004320555356858592, + 0.227785851141645078080496195368575, + 0.152605465240922675505220241022678, + 0.076526521133497333754640409398838, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 20-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 20-point gauss rule */ + +static const double wg[11] = /* weights of the 20-point gauss rule */ +{ + 0.017614007139152118311861962351853, + 0.040601429800386941331039952274932, + 0.062672048334109063569506535187042, + 0.083276741576704748724758143222046, + 0.101930119817240435036750135480350, + 0.118194531961518417312377377711382, + 0.131688638449176626898494499748163, + 0.142096109318382051329298325067165, + 0.149172986472603746787828737001969, + 0.152753387130725850698084331955098 +}; + +static const double wgk[21] = /* weights of the 41-point kronrod rule */ +{ + 0.003073583718520531501218293246031, + 0.008600269855642942198661787950102, + 0.014626169256971252983787960308868, + 0.020388373461266523598010231432755, + 0.025882133604951158834505067096153, + 0.031287306777032798958543119323801, + 0.036600169758200798030557240707211, + 0.041668873327973686263788305936895, + 0.046434821867497674720231880926108, + 0.050944573923728691932707670050345, + 0.055195105348285994744832372419777, + 0.059111400880639572374967220648594, + 0.062653237554781168025870122174255, + 0.065834597133618422111563556969398, + 0.068648672928521619345623411885368, + 0.071054423553444068305790361723210, + 0.073030690332786667495189417658913, + 0.074582875400499188986581418362488, + 0.075704497684556674659542775376617, + 0.076377867672080736705502835038061, + 0.076600711917999656445049901530102 +}; + +void +gsl_integration_qk41 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[21], fv2[21]; + gsl_integration_qk (21, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} + diff --git a/software/gsl-1.15/integration/qk51.c b/software/gsl-1.15/integration/qk51.c new file mode 100644 index 000000000..b49abafa2 --- /dev/null +++ b/software/gsl-1.15/integration/qk51.c @@ -0,0 +1,117 @@ +/* integration/qk51.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[26] = /* abscissae of the 51-point kronrod rule */ +{ + 0.999262104992609834193457486540341, + 0.995556969790498097908784946893902, + 0.988035794534077247637331014577406, + 0.976663921459517511498315386479594, + 0.961614986425842512418130033660167, + 0.942974571228974339414011169658471, + 0.920747115281701561746346084546331, + 0.894991997878275368851042006782805, + 0.865847065293275595448996969588340, + 0.833442628760834001421021108693570, + 0.797873797998500059410410904994307, + 0.759259263037357630577282865204361, + 0.717766406813084388186654079773298, + 0.673566368473468364485120633247622, + 0.626810099010317412788122681624518, + 0.577662930241222967723689841612654, + 0.526325284334719182599623778158010, + 0.473002731445714960522182115009192, + 0.417885382193037748851814394594572, + 0.361172305809387837735821730127641, + 0.303089538931107830167478909980339, + 0.243866883720988432045190362797452, + 0.183718939421048892015969888759528, + 0.122864692610710396387359818808037, + 0.061544483005685078886546392366797, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 25-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 25-point gauss rule */ + +static const double wg[13] = /* weights of the 25-point gauss rule */ +{ + 0.011393798501026287947902964113235, + 0.026354986615032137261901815295299, + 0.040939156701306312655623487711646, + 0.054904695975835191925936891540473, + 0.068038333812356917207187185656708, + 0.080140700335001018013234959669111, + 0.091028261982963649811497220702892, + 0.100535949067050644202206890392686, + 0.108519624474263653116093957050117, + 0.114858259145711648339325545869556, + 0.119455763535784772228178126512901, + 0.122242442990310041688959518945852, + 0.123176053726715451203902873079050 +}; + +static const double wgk[26] = /* weights of the 51-point kronrod rule */ +{ + 0.001987383892330315926507851882843, + 0.005561932135356713758040236901066, + 0.009473973386174151607207710523655, + 0.013236229195571674813656405846976, + 0.016847817709128298231516667536336, + 0.020435371145882835456568292235939, + 0.024009945606953216220092489164881, + 0.027475317587851737802948455517811, + 0.030792300167387488891109020215229, + 0.034002130274329337836748795229551, + 0.037116271483415543560330625367620, + 0.040083825504032382074839284467076, + 0.042872845020170049476895792439495, + 0.045502913049921788909870584752660, + 0.047982537138836713906392255756915, + 0.050277679080715671963325259433440, + 0.052362885806407475864366712137873, + 0.054251129888545490144543370459876, + 0.055950811220412317308240686382747, + 0.057437116361567832853582693939506, + 0.058689680022394207961974175856788, + 0.059720340324174059979099291932562, + 0.060539455376045862945360267517565, + 0.061128509717053048305859030416293, + 0.061471189871425316661544131965264, + 0.061580818067832935078759824240066 +}; + +/* wgk[25] was calculated from the values of wgk[0..24] */ + +void +gsl_integration_qk51 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[26], fv2[26]; + gsl_integration_qk (26, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} + diff --git a/software/gsl-1.15/integration/qk61.c b/software/gsl-1.15/integration/qk61.c new file mode 100644 index 000000000..b7001fc33 --- /dev/null +++ b/software/gsl-1.15/integration/qk61.c @@ -0,0 +1,126 @@ +/* integration/qk61.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Gauss quadrature weights and kronrod quadrature abscissae and + weights as evaluated with 80 decimal digit arithmetic by + L. W. Fullerton, Bell Labs, Nov. 1981. */ + +static const double xgk[31] = /* abscissae of the 61-point kronrod rule */ +{ + 0.999484410050490637571325895705811, + 0.996893484074649540271630050918695, + 0.991630996870404594858628366109486, + 0.983668123279747209970032581605663, + 0.973116322501126268374693868423707, + 0.960021864968307512216871025581798, + 0.944374444748559979415831324037439, + 0.926200047429274325879324277080474, + 0.905573307699907798546522558925958, + 0.882560535792052681543116462530226, + 0.857205233546061098958658510658944, + 0.829565762382768397442898119732502, + 0.799727835821839083013668942322683, + 0.767777432104826194917977340974503, + 0.733790062453226804726171131369528, + 0.697850494793315796932292388026640, + 0.660061064126626961370053668149271, + 0.620526182989242861140477556431189, + 0.579345235826361691756024932172540, + 0.536624148142019899264169793311073, + 0.492480467861778574993693061207709, + 0.447033769538089176780609900322854, + 0.400401254830394392535476211542661, + 0.352704725530878113471037207089374, + 0.304073202273625077372677107199257, + 0.254636926167889846439805129817805, + 0.204525116682309891438957671002025, + 0.153869913608583546963794672743256, + 0.102806937966737030147096751318001, + 0.051471842555317695833025213166723, + 0.000000000000000000000000000000000 +}; + +/* xgk[1], xgk[3], ... abscissae of the 30-point gauss rule. + xgk[0], xgk[2], ... abscissae to optimally extend the 30-point gauss rule */ + +static const double wg[15] = /* weights of the 30-point gauss rule */ +{ + 0.007968192496166605615465883474674, + 0.018466468311090959142302131912047, + 0.028784707883323369349719179611292, + 0.038799192569627049596801936446348, + 0.048402672830594052902938140422808, + 0.057493156217619066481721689402056, + 0.065974229882180495128128515115962, + 0.073755974737705206268243850022191, + 0.080755895229420215354694938460530, + 0.086899787201082979802387530715126, + 0.092122522237786128717632707087619, + 0.096368737174644259639468626351810, + 0.099593420586795267062780282103569, + 0.101762389748405504596428952168554, + 0.102852652893558840341285636705415 +}; + +static const double wgk[31] = /* weights of the 61-point kronrod rule */ +{ + 0.001389013698677007624551591226760, + 0.003890461127099884051267201844516, + 0.006630703915931292173319826369750, + 0.009273279659517763428441146892024, + 0.011823015253496341742232898853251, + 0.014369729507045804812451432443580, + 0.016920889189053272627572289420322, + 0.019414141193942381173408951050128, + 0.021828035821609192297167485738339, + 0.024191162078080601365686370725232, + 0.026509954882333101610601709335075, + 0.028754048765041292843978785354334, + 0.030907257562387762472884252943092, + 0.032981447057483726031814191016854, + 0.034979338028060024137499670731468, + 0.036882364651821229223911065617136, + 0.038678945624727592950348651532281, + 0.040374538951535959111995279752468, + 0.041969810215164246147147541285970, + 0.043452539701356069316831728117073, + 0.044814800133162663192355551616723, + 0.046059238271006988116271735559374, + 0.047185546569299153945261478181099, + 0.048185861757087129140779492298305, + 0.049055434555029778887528165367238, + 0.049795683427074206357811569379942, + 0.050405921402782346840893085653585, + 0.050881795898749606492297473049805, + 0.051221547849258772170656282604944, + 0.051426128537459025933862879215781, + 0.051494729429451567558340433647099 +}; + +void +gsl_integration_qk61 (const gsl_function * f, double a, double b, + double *result, double *abserr, + double *resabs, double *resasc) +{ + double fv1[31], fv2[31]; + gsl_integration_qk (31, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc); +} diff --git a/software/gsl-1.15/integration/qmomo.c b/software/gsl-1.15/integration/qmomo.c new file mode 100644 index 000000000..f2573cdb1 --- /dev/null +++ b/software/gsl-1.15/integration/qmomo.c @@ -0,0 +1,194 @@ +/* integration/qmomo.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +static void +initialise (double * ri, double * rj, double * rg, double * rh, + double alpha, double beta); + +gsl_integration_qaws_table * +gsl_integration_qaws_table_alloc (double alpha, double beta, int mu, int nu) +{ + gsl_integration_qaws_table * t; + + if (alpha < -1.0) + { + GSL_ERROR_VAL ("alpha must be greater than -1.0", GSL_EINVAL, 0); + } + + if (beta < -1.0) + { + GSL_ERROR_VAL ("beta must be greater than -1.0", GSL_EINVAL, 0); + } + + if (mu != 0 && mu != 1) + { + GSL_ERROR_VAL ("mu must be 0 or 1", GSL_EINVAL, 0); + } + + if (nu != 0 && nu != 1) + { + GSL_ERROR_VAL ("nu must be 0 or 1", GSL_EINVAL, 0); + } + + t = (gsl_integration_qaws_table *) + malloc(sizeof(gsl_integration_qaws_table)); + + if (t == 0) + { + GSL_ERROR_VAL ("failed to allocate space for qaws_table struct", + GSL_ENOMEM, 0); + } + + t->alpha = alpha; + t->beta = beta; + t->mu = mu; + t->nu = nu; + + initialise (t->ri, t->rj, t->rg, t->rh, alpha, beta); + + return t; +} + + +int +gsl_integration_qaws_table_set (gsl_integration_qaws_table * t, + double alpha, double beta, int mu, int nu) +{ + if (alpha < -1.0) + { + GSL_ERROR ("alpha must be greater than -1.0", GSL_EINVAL); + } + + if (beta < -1.0) + { + GSL_ERROR ("beta must be greater than -1.0", GSL_EINVAL); + } + + if (mu != 0 && mu != 1) + { + GSL_ERROR ("mu must be 0 or 1", GSL_EINVAL); + } + + if (nu != 0 && nu != 1) + { + GSL_ERROR ("nu must be 0 or 1", GSL_EINVAL); + } + + t->alpha = alpha; + t->beta = beta; + t->mu = mu; + t->nu = nu; + + initialise (t->ri, t->rj, t->rg, t->rh, alpha, beta); + + return GSL_SUCCESS; +} + + +void +gsl_integration_qaws_table_free (gsl_integration_qaws_table * t) +{ + RETURN_IF_NULL (t); + free (t); +} + +static void +initialise (double * ri, double * rj, double * rg, double * rh, + double alpha, double beta) +{ + const double alpha_p1 = alpha + 1.0; + const double beta_p1 = beta + 1.0; + + const double alpha_p2 = alpha + 2.0; + const double beta_p2 = beta + 2.0; + + const double r_alpha = pow (2.0, alpha_p1); + const double r_beta = pow (2.0, beta_p1); + + size_t i; + + double an, anm1; + + ri[0] = r_alpha / alpha_p1; + ri[1] = ri[0] * alpha / alpha_p2; + + an = 2.0; + anm1 = 1.0; + + for (i = 2; i < 25; i++) + { + ri[i] = -(r_alpha + an * (an - alpha_p2) * ri[i - 1]) + / (anm1 * (an + alpha_p1)); + anm1 = an; + an = an + 1.0; + } + + rj[0] = r_beta / beta_p1; + rj[1] = rj[0] * beta / beta_p2; + + an = 2.0; + anm1 = 1.0; + + for (i = 2; i < 25; i++) + { + rj[i] = -(r_beta + an * (an - beta_p2) * rj[i - 1]) + / (anm1 * (an + beta_p1)); + anm1 = an; + an = an + 1.0; + } + + rg[0] = -ri[0] / alpha_p1; + rg[1] = -rg[0] - 2.0 * r_alpha / (alpha_p2 * alpha_p2); + + an = 2.0; + anm1 = 1.0; + + for (i = 2; i < 25; i++) + { + rg[i] = -(an * (an - alpha_p2) * rg[i - 1] - an * ri[i - 1] + + anm1 * ri[i]) / (anm1 * (an + alpha_p1)); + anm1 = an; + an = an + 1.0; + } + + rh[0] = -rj[0] / beta_p1; + rh[1] = -rh[0] - 2.0 * r_beta / (beta_p2 * beta_p2); + + an = 2.0; + anm1 = 1.0; + + for (i = 2; i < 25; i++) + { + rh[i] = -(an * (an - beta_p2) * rh[i - 1] - an * rj[i - 1] + + anm1 * rj[i]) / (anm1 * (an + beta_p1)); + anm1 = an; + an = an + 1.0; + } + + for (i = 1; i < 25; i += 2) + { + rj[i] *= -1; + rh[i] *= -1; + } +} diff --git a/software/gsl-1.15/integration/qmomof.c b/software/gsl-1.15/integration/qmomof.c new file mode 100644 index 000000000..802eaddff --- /dev/null +++ b/software/gsl-1.15/integration/qmomof.c @@ -0,0 +1,390 @@ +/* integration/qmomof.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +static void +compute_moments (double par, double * cheb); + +static int +dgtsl (size_t n, double *c, double *d, double *e, double *b); + +gsl_integration_qawo_table * +gsl_integration_qawo_table_alloc (double omega, double L, + enum gsl_integration_qawo_enum sine, + size_t n) +{ + gsl_integration_qawo_table *t; + double * chebmo; + + if (n == 0) + { + GSL_ERROR_VAL ("table length n must be positive integer", + GSL_EDOM, 0); + } + + t = (gsl_integration_qawo_table *) + malloc (sizeof (gsl_integration_qawo_table)); + + if (t == 0) + { + GSL_ERROR_VAL ("failed to allocate space for qawo_table struct", + GSL_ENOMEM, 0); + } + + chebmo = (double *) malloc (25 * n * sizeof (double)); + + if (chebmo == 0) + { + free (t); + GSL_ERROR_VAL ("failed to allocate space for chebmo block", + GSL_ENOMEM, 0); + } + + t->n = n; + t->sine = sine; + t->omega = omega; + t->L = L; + t->par = 0.5 * omega * L; + t->chebmo = chebmo; + + /* precompute the moments */ + + { + size_t i; + double scale = 1.0; + + for (i = 0 ; i < t->n; i++) + { + compute_moments (t->par * scale, t->chebmo + 25*i); + scale *= 0.5; + } + } + + return t; +} + +int +gsl_integration_qawo_table_set (gsl_integration_qawo_table * t, + double omega, double L, + enum gsl_integration_qawo_enum sine) +{ + t->omega = omega; + t->sine = sine; + t->L = L; + t->par = 0.5 * omega * L; + + /* recompute the moments */ + + { + size_t i; + double scale = 1.0; + + for (i = 0 ; i < t->n; i++) + { + compute_moments (t->par * scale, t->chebmo + 25*i); + scale *= 0.5; + } + } + + return GSL_SUCCESS; +} + + +int +gsl_integration_qawo_table_set_length (gsl_integration_qawo_table * t, + double L) +{ + /* return immediately if the length is the same as the old length */ + + if (L == t->L) + return GSL_SUCCESS; + + /* otherwise reset the table and compute the new parameters */ + + t->L = L; + t->par = 0.5 * t->omega * L; + + /* recompute the moments */ + + { + size_t i; + double scale = 1.0; + + for (i = 0 ; i < t->n; i++) + { + compute_moments (t->par * scale, t->chebmo + 25*i); + scale *= 0.5; + } + } + + return GSL_SUCCESS; +} + + +void +gsl_integration_qawo_table_free (gsl_integration_qawo_table * t) +{ + RETURN_IF_NULL (t); + free (t->chebmo); + free (t); +} + +static void +compute_moments (double par, double *chebmo) +{ + double v[28], d[25], d1[25], d2[25]; + + const size_t noeq = 25; + + const double par2 = par * par; + const double par4 = par2 * par2; + const double par22 = par2 + 2.0; + + const double sinpar = sin (par); + const double cospar = cos (par); + + size_t i; + + /* compute the chebyschev moments with respect to cosine */ + + double ac = 8 * cospar; + double as = 24 * par * sinpar; + + v[0] = 2 * sinpar / par; + v[1] = (8 * cospar + (2 * par2 - 8) * sinpar / par) / par2; + v[2] = (32 * (par2 - 12) * cospar + + (2 * ((par2 - 80) * par2 + 192) * sinpar) / par) / par4; + + if (fabs (par) <= 24) + { + /* compute the moments as the solution of a boundary value + problem using the asyptotic expansion as an endpoint */ + + double an2, ass, asap; + double an = 6; + size_t k; + + for (k = 0; k < noeq - 1; k++) + { + an2 = an * an; + d[k] = -2 * (an2 - 4) * (par22 - 2 * an2); + d2[k] = (an - 1) * (an - 2) * par2; + d1[k + 1] = (an + 3) * (an + 4) * par2; + v[k + 3] = as - (an2 - 4) * ac; + an = an + 2.0; + } + + an2 = an * an; + + d[noeq - 1] = -2 * (an2 - 4) * (par22 - 2 * an2); + v[noeq + 2] = as - (an2 - 4) * ac; + v[3] = v[3] - 56 * par2 * v[2]; + + ass = par * sinpar; + asap = (((((210 * par2 - 1) * cospar - (105 * par2 - 63) * ass) / an2 + - (1 - 15 * par2) * cospar + 15 * ass) / an2 + - cospar + 3 * ass) / an2 + - cospar) / an2; + v[noeq + 2] = v[noeq + 2] - 2 * asap * par2 * (an - 1) * (an - 2); + + dgtsl (noeq, d1, d, d2, v + 3); + + } + else + { + /* compute the moments by forward recursion */ + size_t k; + double an = 4; + + for (k = 3; k < 13; k++) + { + double an2 = an * an; + v[k] = ((an2 - 4) * (2 * (par22 - 2 * an2) * v[k - 1] - ac) + + as - par2 * (an + 1) * (an + 2) * v[k - 2]) + / (par2 * (an - 1) * (an - 2)); + an = an + 2.0; + } + } + + + for (i = 0; i < 13; i++) + { + chebmo[2 * i] = v[i]; + } + + /* compute the chebyschev moments with respect to sine */ + + v[0] = 2 * (sinpar - par * cospar) / par2; + v[1] = (18 - 48 / par2) * sinpar / par2 + (-2 + 48 / par2) * cospar / par; + + ac = -24 * par * cospar; + as = -8 * sinpar; + + if (fabs (par) <= 24) + { + /* compute the moments as the solution of a boundary value + problem using the asyptotic expansion as an endpoint */ + + size_t k; + double an2, ass, asap; + double an = 5; + + for (k = 0; k < noeq - 1; k++) + { + an2 = an * an; + d[k] = -2 * (an2 - 4) * (par22 - 2 * an2); + d2[k] = (an - 1) * (an - 2) * par2; + d1[k + 1] = (an + 3) * (an + 4) * par2; + v[k + 2] = ac + (an2 - 4) * as; + an = an + 2.0; + } + + an2 = an * an; + + d[noeq - 1] = -2 * (an2 - 4) * (par22 - 2 * an2); + v[noeq + 1] = ac + (an2 - 4) * as; + v[2] = v[2] - 42 * par2 * v[1]; + + ass = par * cospar; + asap = (((((105 * par2 - 63) * ass - (210 * par2 - 1) * sinpar) / an2 + + (15 * par2 - 1) * sinpar + - 15 * ass) / an2 - sinpar - 3 * ass) / an2 - sinpar) / an2; + v[noeq + 1] = v[noeq + 1] - 2 * asap * par2 * (an - 1) * (an - 2); + + dgtsl (noeq, d1, d, d2, v + 2); + + } + else + { + /* compute the moments by forward recursion */ + size_t k; + double an = 3; + for (k = 2; k < 12; k++) + { + double an2 = an * an; + v[k] = ((an2 - 4) * (2 * (par22 - 2 * an2) * v[k - 1] + as) + + ac - par2 * (an + 1) * (an + 2) * v[k - 2]) + / (par2 * (an - 1) * (an - 2)); + an = an + 2.0; + } + } + + for (i = 0; i < 12; i++) + { + chebmo[2 * i + 1] = v[i]; + } + +} + +static int +dgtsl (size_t n, double *c, double *d, double *e, double *b) +{ + /* solves a tridiagonal matrix A x = b + + c[1 .. n - 1] subdiagonal of the matrix A + d[0 .. n - 1] diagonal of the matrix A + e[0 .. n - 2] superdiagonal of the matrix A + + b[0 .. n - 1] right hand side, replaced by the solution vector x */ + + size_t k; + + c[0] = d[0]; + + if (n == 0) + { + return GSL_SUCCESS; + } + + if (n == 1) + { + b[0] = b[0] / d[0] ; + return GSL_SUCCESS; + } + + d[0] = e[0]; + e[0] = 0; + e[n - 1] = 0; + + for (k = 0; k < n - 1; k++) + { + size_t k1 = k + 1; + + if (fabs (c[k1]) >= fabs (c[k])) + { + { + double t = c[k1]; + c[k1] = c[k]; + c[k] = t; + }; + { + double t = d[k1]; + d[k1] = d[k]; + d[k] = t; + }; + { + double t = e[k1]; + e[k1] = e[k]; + e[k] = t; + }; + { + double t = b[k1]; + b[k1] = b[k]; + b[k] = t; + }; + } + + if (c[k] == 0) + { + return GSL_FAILURE ; + } + + { + double t = -c[k1] / c[k]; + + c[k1] = d[k1] + t * d[k]; + d[k1] = e[k1] + t * e[k]; + e[k1] = 0; + b[k1] = b[k1] + t * b[k]; + } + + } + + if (c[n - 1] == 0) + { + return GSL_FAILURE; + } + + + b[n - 1] = b[n - 1] / c[n - 1]; + + b[n - 2] = (b[n - 2] - d[n - 2] * b[n - 1]) / c[n - 2]; + + for (k = n ; k > 2; k--) + { + size_t kb = k - 3; + b[kb] = (b[kb] - d[kb] * b[kb + 1] - e[kb] * b[kb + 2]) / c[kb]; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/integration/qng.c b/software/gsl-1.15/integration/qng.c new file mode 100644 index 000000000..e4b2aca1c --- /dev/null +++ b/software/gsl-1.15/integration/qng.c @@ -0,0 +1,190 @@ +/* integration/qng.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "err.c" +#include "qng.h" + +int +gsl_integration_qng (const gsl_function *f, + double a, double b, + double epsabs, double epsrel, + double * result, double * abserr, size_t * neval) +{ + double fv1[5], fv2[5], fv3[5], fv4[5]; + double savfun[21]; /* array of function values which have been computed */ + double res10, res21, res43, res87; /* 10, 21, 43 and 87 point results */ + double result_kronrod, err ; + double resabs; /* approximation to the integral of abs(f) */ + double resasc; /* approximation to the integral of abs(f-i/(b-a)) */ + + const double half_length = 0.5 * (b - a); + const double abs_half_length = fabs (half_length); + const double center = 0.5 * (b + a); + const double f_center = GSL_FN_EVAL(f, center); + + int k ; + + if (epsabs <= 0 && (epsrel < 50 * GSL_DBL_EPSILON || epsrel < 0.5e-28)) + { + * result = 0; + * abserr = 0; + * neval = 0; + GSL_ERROR ("tolerance cannot be acheived with given epsabs and epsrel", + GSL_EBADTOL); + }; + + /* Compute the integral using the 10- and 21-point formula. */ + + res10 = 0; + res21 = w21b[5] * f_center; + resabs = w21b[5] * fabs (f_center); + + for (k = 0; k < 5; k++) + { + const double abscissa = half_length * x1[k]; + const double fval1 = GSL_FN_EVAL(f, center + abscissa); + const double fval2 = GSL_FN_EVAL(f, center - abscissa); + const double fval = fval1 + fval2; + res10 += w10[k] * fval; + res21 += w21a[k] * fval; + resabs += w21a[k] * (fabs (fval1) + fabs (fval2)); + savfun[k] = fval; + fv1[k] = fval1; + fv2[k] = fval2; + } + + for (k = 0; k < 5; k++) + { + const double abscissa = half_length * x2[k]; + const double fval1 = GSL_FN_EVAL(f, center + abscissa); + const double fval2 = GSL_FN_EVAL(f, center - abscissa); + const double fval = fval1 + fval2; + res21 += w21b[k] * fval; + resabs += w21b[k] * (fabs (fval1) + fabs (fval2)); + savfun[k + 5] = fval; + fv3[k] = fval1; + fv4[k] = fval2; + } + + resabs *= abs_half_length ; + + { + const double mean = 0.5 * res21; + + resasc = w21b[5] * fabs (f_center - mean); + + for (k = 0; k < 5; k++) + { + resasc += + (w21a[k] * (fabs (fv1[k] - mean) + fabs (fv2[k] - mean)) + + w21b[k] * (fabs (fv3[k] - mean) + fabs (fv4[k] - mean))); + } + resasc *= abs_half_length ; + } + + result_kronrod = res21 * half_length; + + err = rescale_error ((res21 - res10) * half_length, resabs, resasc) ; + + /* test for convergence. */ + + if (err < epsabs || err < epsrel * fabs (result_kronrod)) + { + * result = result_kronrod ; + * abserr = err ; + * neval = 21; + return GSL_SUCCESS; + } + + /* compute the integral using the 43-point formula. */ + + res43 = w43b[11] * f_center; + + for (k = 0; k < 10; k++) + { + res43 += savfun[k] * w43a[k]; + } + + for (k = 0; k < 11; k++) + { + const double abscissa = half_length * x3[k]; + const double fval = (GSL_FN_EVAL(f, center + abscissa) + + GSL_FN_EVAL(f, center - abscissa)); + res43 += fval * w43b[k]; + savfun[k + 10] = fval; + } + + /* test for convergence */ + + result_kronrod = res43 * half_length; + err = rescale_error ((res43 - res21) * half_length, resabs, resasc); + + if (err < epsabs || err < epsrel * fabs (result_kronrod)) + { + * result = result_kronrod ; + * abserr = err ; + * neval = 43; + return GSL_SUCCESS; + } + + /* compute the integral using the 87-point formula. */ + + res87 = w87b[22] * f_center; + + for (k = 0; k < 21; k++) + { + res87 += savfun[k] * w87a[k]; + } + + for (k = 0; k < 22; k++) + { + const double abscissa = half_length * x4[k]; + res87 += w87b[k] * (GSL_FN_EVAL(f, center + abscissa) + + GSL_FN_EVAL(f, center - abscissa)); + } + + /* test for convergence */ + + result_kronrod = res87 * half_length ; + + err = rescale_error ((res87 - res43) * half_length, resabs, resasc); + + if (err < epsabs || err < epsrel * fabs (result_kronrod)) + { + * result = result_kronrod ; + * abserr = err ; + * neval = 87; + return GSL_SUCCESS; + } + + /* failed to converge */ + + * result = result_kronrod ; + * abserr = err ; + * neval = 87; + + GSL_ERROR("failed to reach tolerance with highest-order rule", GSL_ETOL) ; +} diff --git a/software/gsl-1.15/integration/qng.h b/software/gsl-1.15/integration/qng.h new file mode 100644 index 000000000..cfa7ef53d --- /dev/null +++ b/software/gsl-1.15/integration/qng.h @@ -0,0 +1,193 @@ +/* integration/qng.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Gauss-Kronrod-Patterson quadrature coefficients for use in + quadpack routine qng. These coefficients were calculated with + 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov + 1981. */ + +/* x1, abscissae common to the 10-, 21-, 43- and 87-point rule */ +static const double x1[5] = { + 0.973906528517171720077964012084452, + 0.865063366688984510732096688423493, + 0.679409568299024406234327365114874, + 0.433395394129247190799265943165784, + 0.148874338981631210884826001129720 +} ; + +/* w10, weights of the 10-point formula */ +static const double w10[5] = { + 0.066671344308688137593568809893332, + 0.149451349150580593145776339657697, + 0.219086362515982043995534934228163, + 0.269266719309996355091226921569469, + 0.295524224714752870173892994651338 +} ; + +/* x2, abscissae common to the 21-, 43- and 87-point rule */ +static const double x2[5] = { + 0.995657163025808080735527280689003, + 0.930157491355708226001207180059508, + 0.780817726586416897063717578345042, + 0.562757134668604683339000099272694, + 0.294392862701460198131126603103866 +} ; + +/* w21a, weights of the 21-point formula for abscissae x1 */ +static const double w21a[5] = { + 0.032558162307964727478818972459390, + 0.075039674810919952767043140916190, + 0.109387158802297641899210590325805, + 0.134709217311473325928054001771707, + 0.147739104901338491374841515972068 +} ; + +/* w21b, weights of the 21-point formula for abscissae x2 */ +static const double w21b[6] = { + 0.011694638867371874278064396062192, + 0.054755896574351996031381300244580, + 0.093125454583697605535065465083366, + 0.123491976262065851077958109831074, + 0.142775938577060080797094273138717, + 0.149445554002916905664936468389821 +} ; + +/* x3, abscissae common to the 43- and 87-point rule */ +static const double x3[11] = { + 0.999333360901932081394099323919911, + 0.987433402908088869795961478381209, + 0.954807934814266299257919200290473, + 0.900148695748328293625099494069092, + 0.825198314983114150847066732588520, + 0.732148388989304982612354848755461, + 0.622847970537725238641159120344323, + 0.499479574071056499952214885499755, + 0.364901661346580768043989548502644, + 0.222254919776601296498260928066212, + 0.074650617461383322043914435796506 +} ; + +/* w43a, weights of the 43-point formula for abscissae x1, x3 */ +static const double w43a[10] = { + 0.016296734289666564924281974617663, + 0.037522876120869501461613795898115, + 0.054694902058255442147212685465005, + 0.067355414609478086075553166302174, + 0.073870199632393953432140695251367, + 0.005768556059769796184184327908655, + 0.027371890593248842081276069289151, + 0.046560826910428830743339154433824, + 0.061744995201442564496240336030883, + 0.071387267268693397768559114425516 +} ; + +/* w43b, weights of the 43-point formula for abscissae x3 */ +static const double w43b[12] = { + 0.001844477640212414100389106552965, + 0.010798689585891651740465406741293, + 0.021895363867795428102523123075149, + 0.032597463975345689443882222526137, + 0.042163137935191811847627924327955, + 0.050741939600184577780189020092084, + 0.058379395542619248375475369330206, + 0.064746404951445885544689259517511, + 0.069566197912356484528633315038405, + 0.072824441471833208150939535192842, + 0.074507751014175118273571813842889, + 0.074722147517403005594425168280423 +} ; + +/* x4, abscissae of the 87-point rule */ +static const double x4[22] = { + 0.999902977262729234490529830591582, + 0.997989895986678745427496322365960, + 0.992175497860687222808523352251425, + 0.981358163572712773571916941623894, + 0.965057623858384619128284110607926, + 0.943167613133670596816416634507426, + 0.915806414685507209591826430720050, + 0.883221657771316501372117548744163, + 0.845710748462415666605902011504855, + 0.803557658035230982788739474980964, + 0.757005730685495558328942793432020, + 0.706273209787321819824094274740840, + 0.651589466501177922534422205016736, + 0.593223374057961088875273770349144, + 0.531493605970831932285268948562671, + 0.466763623042022844871966781659270, + 0.399424847859218804732101665817923, + 0.329874877106188288265053371824597, + 0.258503559202161551802280975429025, + 0.185695396568346652015917141167606, + 0.111842213179907468172398359241362, + 0.037352123394619870814998165437704 +} ; + +/* w87a, weights of the 87-point formula for abscissae x1, x2, x3 */ +static const double w87a[21] = { + 0.008148377384149172900002878448190, + 0.018761438201562822243935059003794, + 0.027347451050052286161582829741283, + 0.033677707311637930046581056957588, + 0.036935099820427907614589586742499, + 0.002884872430211530501334156248695, + 0.013685946022712701888950035273128, + 0.023280413502888311123409291030404, + 0.030872497611713358675466394126442, + 0.035693633639418770719351355457044, + 0.000915283345202241360843392549948, + 0.005399280219300471367738743391053, + 0.010947679601118931134327826856808, + 0.016298731696787335262665703223280, + 0.021081568889203835112433060188190, + 0.025370969769253827243467999831710, + 0.029189697756475752501446154084920, + 0.032373202467202789685788194889595, + 0.034783098950365142750781997949596, + 0.036412220731351787562801163687577, + 0.037253875503047708539592001191226 +} ; + +/* w87b, weights of the 87-point formula for abscissae x4 */ +static const double w87b[23] = { + 0.000274145563762072350016527092881, + 0.001807124155057942948341311753254, + 0.004096869282759164864458070683480, + 0.006758290051847378699816577897424, + 0.009549957672201646536053581325377, + 0.012329447652244853694626639963780, + 0.015010447346388952376697286041943, + 0.017548967986243191099665352925900, + 0.019938037786440888202278192730714, + 0.022194935961012286796332102959499, + 0.024339147126000805470360647041454, + 0.026374505414839207241503786552615, + 0.028286910788771200659968002987960, + 0.030052581128092695322521110347341, + 0.031646751371439929404586051078883, + 0.033050413419978503290785944862689, + 0.034255099704226061787082821046821, + 0.035262412660156681033782717998428, + 0.036076989622888701185500318003895, + 0.036698604498456094498018047441094, + 0.037120549269832576114119958413599, + 0.037334228751935040321235449094698, + 0.037361073762679023410321241766599 +} ; + diff --git a/software/gsl-1.15/integration/qpsrt.c b/software/gsl-1.15/integration/qpsrt.c new file mode 100644 index 000000000..13718267b --- /dev/null +++ b/software/gsl-1.15/integration/qpsrt.c @@ -0,0 +1,113 @@ +/* integration/qpsrt.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static inline void +qpsrt (gsl_integration_workspace * workspace); + +static inline +void qpsrt (gsl_integration_workspace * workspace) +{ + const size_t last = workspace->size - 1; + const size_t limit = workspace->limit; + + double * elist = workspace->elist; + size_t * order = workspace->order; + + double errmax ; + double errmin ; + int i, k, top; + + size_t i_nrmax = workspace->nrmax; + size_t i_maxerr = order[i_nrmax] ; + + /* Check whether the list contains more than two error estimates */ + + if (last < 2) + { + order[0] = 0 ; + order[1] = 1 ; + workspace->i = i_maxerr ; + return ; + } + + errmax = elist[i_maxerr] ; + + /* This part of the routine is only executed if, due to a difficult + integrand, subdivision increased the error estimate. In the normal + case the insert procedure should start after the nrmax-th largest + error estimate. */ + + while (i_nrmax > 0 && errmax > elist[order[i_nrmax - 1]]) + { + order[i_nrmax] = order[i_nrmax - 1] ; + i_nrmax-- ; + } + + /* Compute the number of elements in the list to be maintained in + descending order. This number depends on the number of + subdivisions still allowed. */ + + if(last < (limit/2 + 2)) + { + top = last ; + } + else + { + top = limit - last + 1; + } + + /* Insert errmax by traversing the list top-down, starting + comparison from the element elist(order(i_nrmax+1)). */ + + i = i_nrmax + 1 ; + + /* The order of the tests in the following line is important to + prevent a segmentation fault */ + + while (i < top && errmax < elist[order[i]]) + { + order[i-1] = order[i] ; + i++ ; + } + + order[i-1] = i_maxerr ; + + /* Insert errmin by traversing the list bottom-up */ + + errmin = elist[last] ; + + k = top - 1 ; + + while (k > i - 2 && errmin >= elist[order[k]]) + { + order[k+1] = order[k] ; + k-- ; + } + + order[k+1] = last ; + + /* Set i_max and e_max */ + + i_maxerr = order[i_nrmax] ; + + workspace->i = i_maxerr ; + workspace->nrmax = i_nrmax ; +} + + diff --git a/software/gsl-1.15/integration/qpsrt2.c b/software/gsl-1.15/integration/qpsrt2.c new file mode 100644 index 000000000..d8335f841 --- /dev/null +++ b/software/gsl-1.15/integration/qpsrt2.c @@ -0,0 +1,81 @@ +/* integration/qpsrt2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* The smallest interval has the largest error. Before bisecting + decrease the sum of the errors over the larger intervals + (error_over_large_intervals) and perform extrapolation. */ + +static int +increase_nrmax (gsl_integration_workspace * workspace); + +static int +increase_nrmax (gsl_integration_workspace * workspace) +{ + int k; + int id = workspace->nrmax; + int jupbnd; + + const size_t * level = workspace->level; + const size_t * order = workspace->order; + + size_t limit = workspace->limit ; + size_t last = workspace->size - 1 ; + + if (last > (1 + limit / 2)) + { + jupbnd = limit + 1 - last; + } + else + { + jupbnd = last; + } + + for (k = id; k <= jupbnd; k++) + { + size_t i_max = order[workspace->nrmax]; + + workspace->i = i_max ; + + if (level[i_max] < workspace->maximum_level) + { + return 1; + } + + workspace->nrmax++; + + } + return 0; +} + +static int +large_interval (gsl_integration_workspace * workspace) +{ + size_t i = workspace->i ; + const size_t * level = workspace->level; + + if (level[i] < workspace->maximum_level) + { + return 1 ; + } + else + { + return 0 ; + } +} + diff --git a/software/gsl-1.15/integration/reset.c b/software/gsl-1.15/integration/reset.c new file mode 100644 index 000000000..424b83731 --- /dev/null +++ b/software/gsl-1.15/integration/reset.c @@ -0,0 +1,9 @@ +static inline void +reset_nrmax (gsl_integration_workspace * workspace); + +static inline void +reset_nrmax (gsl_integration_workspace * workspace) +{ + workspace->nrmax = 0; + workspace->i = workspace->order[0] ; +} diff --git a/software/gsl-1.15/integration/set_initial.c b/software/gsl-1.15/integration/set_initial.c new file mode 100644 index 000000000..410a2135e --- /dev/null +++ b/software/gsl-1.15/integration/set_initial.c @@ -0,0 +1,12 @@ +static inline +void set_initial_result (gsl_integration_workspace * workspace, + double result, double error); + +static inline +void set_initial_result (gsl_integration_workspace * workspace, + double result, double error) +{ + workspace->size = 1; + workspace->rlist[0] = result; + workspace->elist[0] = error; +} diff --git a/software/gsl-1.15/integration/test.c b/software/gsl-1.15/integration/test.c new file mode 100644 index 000000000..6f92ea0bd --- /dev/null +++ b/software/gsl-1.15/integration/test.c @@ -0,0 +1,2386 @@ +/* integration/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tests.h" + +gsl_function make_function (double (* f) (double, void *), double * p); + +gsl_function make_function (double (* f) (double, void *), double * p) +{ + gsl_function f_new; + + f_new.function = f ; + f_new.params = p ; + + return f_new; +} + +struct counter_params { + gsl_function * f; + int neval; +} ; + +double counter (double x, void * params); +gsl_function make_counter (gsl_function * f, struct counter_params * p); + +double +counter (double x, void * params) +{ + struct counter_params * p = (struct counter_params *) params; + p->neval++ ; /* increment counter */ + return GSL_FN_EVAL(p->f, x); +} + +gsl_function make_counter (gsl_function * f, struct counter_params * p) +{ + gsl_function f_new; + + p->f = f; + p->neval = 0 ; + + f_new.function = &counter ; + f_new.params = p ; + + return f_new; +} + +void my_error_handler (const char *reason, const char *file, + int line, int err); + + +int main (void) +{ + gsl_ieee_env_setup (); + gsl_set_error_handler (&my_error_handler); + + /* Test the basic Gauss-Kronrod rules with a smooth positive function. */ + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049357767090777E-02; + double exp_abserr = 2.990224871000550874E-06; + double exp_resabs = 7.716049357767090777E-02; + double exp_resasc = 4.434273814139995384E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha) ; + + gsl_integration_qk15 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk15(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f1) smooth resasc") ; + + gsl_integration_qk15 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + + gsl_test_rel(result,-exp_result,1e-15,"qk15(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049379303084599E-02; + double exp_abserr = 9.424302194248481445E-08; + double exp_resabs = 7.716049379303084599E-02; + double exp_resasc = 4.434311425038358484E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk21 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk21(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk21(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f1) smooth resasc") ; + + gsl_integration_qk21 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk21(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk21(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049382494900855E-02; + double exp_abserr = 1.713503193600029893E-09; + double exp_resabs = 7.716049382494900855E-02; + double exp_resasc = 4.427995051868838933E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk31 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk31(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f1) smooth resasc") ; + + gsl_integration_qk31 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk31(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049382681375302E-02; + double exp_abserr = 9.576386660975511224E-11; + double exp_resabs = 7.716049382681375302E-02; + double exp_resasc = 4.421521169637691873E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk41 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk41(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f1) smooth resasc") ; + + gsl_integration_qk41 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk41(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049382708510540E-02; + double exp_abserr = 1.002079980317363772E-11; + double exp_resabs = 7.716049382708510540E-02; + double exp_resasc = 4.416474291216854892E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk51 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk51(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk51(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f1) smooth resasc") ; + + gsl_integration_qk51 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk51(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk51(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 7.716049382713800753E-02; + double exp_abserr = 1.566060362296155616E-12; + double exp_resabs = 7.716049382713800753E-02; + double exp_resasc = 4.419287685934316506E-02; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk61 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk61(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk61(f1) smooth abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f1) smooth resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f1) smooth resasc") ; + + gsl_integration_qk61 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk61(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk61(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f1) reverse resasc") ; + } + + /* Now test the basic rules with a positive function that has a + singularity. This should give large values of abserr which would + find discrepancies in the abserr calculation. */ + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 1.555688196612745777E+01; + double exp_abserr = 2.350164577239293706E+01; + double exp_resabs = 1.555688196612745777E+01; + double exp_resasc = 2.350164577239293706E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk15 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk15(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f1) singular resasc") ; + + gsl_integration_qk15 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk15(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 1.799045317938126232E+01; + double exp_abserr = 2.782360287710622515E+01; + double exp_resabs = 1.799045317938126232E+01; + double exp_resasc = 2.782360287710622515E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk21 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk21(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk21(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f1) singular resasc") ; + + gsl_integration_qk21 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk21(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk21(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 2.081873305159121657E+01; + double exp_abserr = 3.296500137482590276E+01; + double exp_resabs = 2.081873305159121301E+01; + double exp_resasc = 3.296500137482590276E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk31 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk31(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f1) singular resasc") ; + + gsl_integration_qk31 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk31(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 2.288677623903126701E+01; + double exp_abserr = 3.671538820274916048E+01; + double exp_resabs = 2.288677623903126701E+01; + double exp_resasc = 3.671538820274916048E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk41 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk41(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f1) singular resasc") ; + + gsl_integration_qk41 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk41(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 2.449953612016972215E+01; + double exp_abserr = 3.967771249391228849E+01; + double exp_resabs = 2.449953612016972215E+01; + double exp_resasc = 3.967771249391228849E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk51 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk51(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk51(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f1) singular resasc") ; + + gsl_integration_qk51 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk51(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk51(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f1) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result = 2.583030240976628988E+01; + double exp_abserr = 4.213750493076978643E+01; + double exp_resabs = 2.583030240976628988E+01; + double exp_resasc = 4.213750493076978643E+01; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_integration_qk61 (&f, 0.0, 1.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk61(f1) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk61(f1) singular abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f1) singular resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f1) singular resasc") ; + + gsl_integration_qk61 (&f, 1.0, 0.0, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk61(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk61(f1) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f1) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f1) reverse resasc") ; + } + + /* Test the basic Gauss-Kronrod rules with a smooth oscillating + function, over an unsymmetric range. This should find any + discrepancies in the abscissae. */ + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575483799046E-01; + double exp_abserr = 8.760080200939757174E-06; + double exp_resabs = 1.165564172429140788E+00; + double exp_resasc = 9.334560307787327371E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk15 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk15(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f3) oscill resasc") ; + + gsl_integration_qk15 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk15(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk15(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk15(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk15(f3) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575482959717E-01; + double exp_abserr = 7.999213141433641888E-11; + double exp_resabs = 1.150829032708484023E+00; + double exp_resasc = 9.297591249133687619E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk21 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk21(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk21(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f3) oscill resasc") ; + + gsl_integration_qk21 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk21(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qk21(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk21(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk21(f3) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575482959717E-01; + double exp_abserr = 1.285805464427459261E-14; + double exp_resabs = 1.158150602093290571E+00; + double exp_resasc = 9.277828092501518853E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk31 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk31(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f3) oscill resasc") ; + + gsl_integration_qk31 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk31(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk31(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk31(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk31(f3) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575482959717E-01; + double exp_abserr = 1.286535726271015626E-14; + double exp_resabs = 1.158808363486595328E+00; + double exp_resasc = 9.264382258645686985E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk41 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk41(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f3) oscill resasc") ; + + gsl_integration_qk41 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk41(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk41(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk41(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk41(f3) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575482961938E-01; + double exp_abserr = 1.285290995039385778E-14; + double exp_resabs = 1.157687209264406381E+00; + double exp_resasc = 9.264666884071264263E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk51 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk51(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk51(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f3) oscill resasc") ; + + gsl_integration_qk51 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk51(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk51(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk51(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk51(f3) reverse resasc") ; + } + + { + double result = 0, abserr = 0, resabs = 0, resasc = 0 ; + double exp_result =-7.238969575482959717E-01; + double exp_abserr = 1.286438572027470736E-14; + double exp_resabs = 1.158720854723590099E+00; + double exp_resasc = 9.270469641771273972E-01; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_integration_qk61 (&f, 0.3, 2.71, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,exp_result,1e-15,"qk61(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk61(f3) oscill abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f3) oscill resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f3) oscill resasc") ; + + gsl_integration_qk61 (&f, 2.71, 0.3, + &result, &abserr, &resabs, &resasc) ; + gsl_test_rel(result,-exp_result,1e-15,"qk61(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qk61(f3) reverse abserr") ; + gsl_test_rel(resabs,exp_resabs,1e-15,"qk61(f3) reverse resabs") ; + gsl_test_rel(resasc,exp_resasc,1e-15,"qk61(f3) reverse resasc") ; + } + + /* Test the non-adaptive gaussian integrator QNG */ + + { + int status = 0; size_t neval = 0 ; + double result = 0, abserr = 0 ; + double exp_result = 7.716049379303083211E-02; + double exp_abserr = 9.424302199601294244E-08; + int exp_neval = 21; + int exp_ier = 0; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + status = gsl_integration_qng (&f, 0.0, 1.0, 1e-1, 0.0, + &result, &abserr, &neval) ; + gsl_test_rel(result,exp_result,1e-15,"qng(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) smooth abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) smooth neval") ; + gsl_test_int(status,exp_ier,"qng(f1) smooth status") ; + + status = gsl_integration_qng (&f, 1.0, 0.0, 1e-1, 0.0, + &result, &abserr, &neval) ; + gsl_test_rel(result,-exp_result,1e-15,"qng(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) reverse abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) reverse neval") ; + gsl_test_int(status,exp_ier,"qng(f1) reverse status") ; + } + + { + int status = 0; size_t neval = 0 ; + double result = 0, abserr = 0 ; + + double exp_result = 7.716049382706505200E-02; + double exp_abserr = 2.666893044866214501E-12; + int exp_neval = 43; + int exp_ier = 0; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + status = gsl_integration_qng (&f, 0.0, 1.0, 0.0, 1e-9, + &result, &abserr, &neval) ; + gsl_test_rel(result,exp_result,1e-15,"qng(f1) smooth 43pt result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qng(f1) smooth 43pt abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) smooth 43pt neval") ; + gsl_test_int(status,exp_ier,"qng(f1) smooth 43pt status") ; + + status = gsl_integration_qng (&f, 1.0, 0.0, 0.0, 1e-9, + &result, &abserr, &neval) ; + gsl_test_rel(result,-exp_result,1e-15,"qng(f1) reverse 43pt result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qng(f1) reverse 43pt abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) reverse 43pt neval") ; + gsl_test_int(status,exp_ier,"qng(f1) reverse 43pt status") ; + } + + { + int status; size_t neval = 0 ; + double result = 0, abserr = 0 ; + double exp_result =-7.238969575482961938E-01; + double exp_abserr = 1.277676889520056369E-14; + int exp_neval = 43; + int exp_ier = 0; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + status = gsl_integration_qng (&f, 0.3, 2.71, 0.0, 1e-12, + &result, &abserr, &neval) ; + gsl_test_rel(result,exp_result,1e-15,"qnq(f3) oscill result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f3) oscill abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f3) oscill neval") ; + gsl_test_int(status,exp_ier,"qng(f3) oscill status") ; + + status = gsl_integration_qng (&f, 2.71, 0.3, 0.0, 1e-12, + &result, &abserr, &neval) ; + gsl_test_rel(result,-exp_result,1e-15,"qnq(f3) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f3) reverse abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f3) reverse neval") ; + gsl_test_int(status,exp_ier,"qng(f3) reverse status") ; + } + + { + int status = 0; size_t neval = 0 ; + double result = 0, abserr = 0 ; + + double exp_result = 7.716049382716029525E-02; + double exp_abserr = 8.566535680046930668E-16; + int exp_neval = 87; + int exp_ier = 0; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + status = gsl_integration_qng (&f, 0.0, 1.0, 0.0, 1e-13, + &result, &abserr, &neval) ; + gsl_test_rel(result,exp_result,1e-15,"qng(f1) 87pt smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) 87pt smooth abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) 87pt smooth neval") ; + gsl_test_int(status,exp_ier,"qng(f1) 87pt smooth status") ; + + status = gsl_integration_qng (&f, 1.0, 0.0, 0.0, 1e-13, + &result, &abserr, &neval) ; + gsl_test_rel(result,-exp_result,1e-15,"qng(f1) 87pt reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) 87pt reverse abserr") ; + gsl_test_int((int)neval,exp_neval,"qng(f1) 87pt reverse neval") ; + gsl_test_int(status,exp_ier,"qng(f1) 87pt reverse status") ; + } + + { + int status = 0; size_t neval = 0 ; + double result = 0, abserr = 0 ; + + double exp_result = 3.222948711817264211E+01; + double exp_abserr = 2.782360287710622870E+01; + int exp_neval = 87; + int exp_ier = GSL_ETOL; + + double alpha = -0.9 ; + gsl_function f = make_function(&f1, &alpha); + + status = gsl_integration_qng (&f, 0.0, 1.0, 0.0, 1e-3, + &result, &abserr, &neval) ; + gsl_test_rel(result,exp_result,1e-15,"qng(f1) sing beyond 87pt result"); + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) sing beyond 87pt abserr"); + gsl_test_int((int)neval,exp_neval,"qng(f1) sing beyond 87pt neval") ; + gsl_test_int(status,exp_ier,"qng(f1) sing beyond 87pt status") ; + + status = gsl_integration_qng (&f, 1.0, 0.0, 0.0, 1e-3, + &result, &abserr, &neval) ; + gsl_test_rel(result,-exp_result,1e-15,"qng(f1) reverse beyond 87pt result"); + gsl_test_rel(abserr,exp_abserr,1e-7,"qng(f1) rev beyond 87pt abserr"); + gsl_test_int((int)neval,exp_neval,"qng(f1) rev beyond 87pt neval") ; + gsl_test_int(status,exp_ier,"qng(f1) rev beyond 87pt status") ; + } + + /* Test the adaptive integrator QAG */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + double exp_result = 7.716049382715854665E-02 ; + double exp_abserr = 6.679384885865053037E-12 ; + int exp_neval = 165; + int exp_ier = 0; + int exp_last = 6; + + double a[6] = { 0, 0.5, 0.25, 0.125, 0.0625, 0.03125 } ; + double b[6] = { 0.03125, 1, 0.5, 0.25, 0.125, 0.0625 } ; + double r[6] = { 3.966769831709074375E-06, 5.491842501998222409E-02, + 1.909827770934243926E-02, 2.776531175604360531E-03, + 3.280661030752063693E-04, 3.522704932261797744E-05 } ; + double e[6] = { 6.678528276336181873E-12, 6.097169993333454062E-16, + 2.120334764359736934E-16, 3.082568839745514608E-17, + 3.642265412331439511E-18, 3.910988124757650942E-19 } ; + int order[6] = { 1, 2, 3, 4, 5, 6 } ; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha) ; + + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qag (&fc, 0.0, 1.0, 0.0, 1e-10, w->limit, + GSL_INTEG_GAUSS15, w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qag(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f1) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f1) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f1) smooth last") ; + gsl_test_int(status,exp_ier,"qag(f1) smooth status") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qag(f1) smooth alist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qag(f1) smooth blist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qag(f1) smooth rlist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-6,"qag(f1) smooth elist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qag(f1) smooth order") ; + + p.neval = 0; + + status = gsl_integration_qag (&fc, 1.0, 0.0, 0.0, 1e-10, w->limit, + GSL_INTEG_GAUSS15, w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qag(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f1) reverse abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f1) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f1) reverse last") ; + gsl_test_int(status,exp_ier,"qag(f1) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Test the same function using an absolute error bound and the + 21-point rule */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + double exp_result = 7.716049382716050342E-02 ; + double exp_abserr = 2.227969521869139532E-15 ; + int exp_neval = 315; + int exp_ier = 0; + int exp_last = 8; + + double a[8] = { 0, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, + 0.0078125 } ; + double b[8] = { 0.0078125, 1, 0.5, 0.25, 0.125, 0.0625, 0.03125, + 0.015625 } ; + double r[8] = { 3.696942726831556522E-08, 5.491842501998223103E-02, + 1.909827770934243579E-02, 2.776531175604360097E-03, + 3.280661030752062609E-04, 3.522704932261797744E-05, + 3.579060884684503576E-06, 3.507395216921808047E-07 } ; + double e[8] = { 1.371316364034059572E-15, 6.097169993333454062E-16, + 2.120334764359736441E-16, 3.082568839745514608E-17, + 3.642265412331439511E-18, 3.910988124757650460E-19, + 3.973555800712018091E-20, 3.893990926286736620E-21 } ; + int order[8] = { 1, 2, 3, 4, 5, 6, 7, 8 } ; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qag (&fc, 0.0, 1.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS21, w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qag(f1,21pt) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f1,21pt) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f1,21pt) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f1,21pt) smooth last") ; + gsl_test_int(status,exp_ier,"qag(f1,21pt) smooth status") ; + + for (i = 0; i < 8 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qag(f1,21pt) smooth alist") ; + + for (i = 0; i < 8 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qag(f1,21pt) smooth blist") ; + + for (i = 0; i < 8 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qag(f1,21pt) smooth rlist") ; + + for (i = 0; i < 8 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-6,"qag(f1,21pt) smooth elist") ; + + for (i = 0; i < 8 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qag(f1,21pt) smooth order"); + + + p.neval = 0; + status = gsl_integration_qag (&fc, 1.0, 0.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS21, w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qag(f1,21pt) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f1,21pt) reverse abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f1,21pt) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f1,21pt) reverse last") ; + gsl_test_int(status,exp_ier,"qag(f1,21pt) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Adaptive integration of an oscillatory function which terminates because + of roundoff error, uses the 31-pt rule */ + + { + int status = 0; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + double exp_result = -7.238969575482959717E-01; + double exp_abserr = 1.285805464427459261E-14; + int exp_neval = 31; + int exp_ier = GSL_EROUND; + int exp_last = 1; + + double alpha = 1.3 ; + gsl_function f = make_function(&f3, &alpha); + + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qag (&fc, 0.3, 2.71, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS31, w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qag(f3,31pt) oscill result"); + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f3,31pt) oscill abserr"); + gsl_test_int((int)(p.neval),exp_neval,"qag(f3,31pt) oscill neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f3,31pt) oscill last") ; + gsl_test_int(status,exp_ier,"qag(f3,31pt) oscill status") ; + + p.neval = 0; + status = gsl_integration_qag (&fc, 2.71, 0.3, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS31, w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qag(f3,31pt) reverse result"); + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f3,31pt) reverse abserr"); + gsl_test_int((int)(p.neval),exp_neval,"qag(f3,31pt) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f3,31pt) reverse last") ; + gsl_test_int(status,exp_ier,"qag(f3,31pt) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Check the singularity detection (singularity at x=-0.1 in this example) */ + + { + int status = 0; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + int exp_neval = 5151; + int exp_ier = GSL_ESING; + int exp_last = 51; + + double alpha = 2.0 ; + gsl_function f = make_function(&f16, &alpha); + + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qag (&fc, -1.0, 1.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS51, w, + &result, &abserr) ; + + gsl_test_int((int)(p.neval),exp_neval,"qag(f16,51pt) sing neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f16,51pt) sing last") ; + gsl_test_int(status,exp_ier,"qag(f16,51pt) sing status") ; + + p.neval = 0; + status = gsl_integration_qag (&fc, 1.0, -1.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS51, w, + &result, &abserr) ; + + gsl_test_int((int)(p.neval),exp_neval,"qag(f16,51pt) rev neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f16,51pt) rev last") ; + gsl_test_int(status,exp_ier,"qag(f16,51pt) rev status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Check for hitting the iteration limit */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (3) ; + + double exp_result = 9.565151449233894709 ; + double exp_abserr = 1.570369823891028460E+01; + int exp_neval = 305; + int exp_ier = GSL_EMAXITER; + int exp_last = 3; + + double a[3] = { -5.000000000000000000E-01, + 0.000000000000000000, + -1.000000000000000000 } ; + + double b[3] = { 0.000000000000000000, + 1.000000000000000000, + -5.000000000000000000E-01 } ; + + double r[3] = { 9.460353469435913709, + 9.090909090909091161E-02, + 1.388888888888888812E-02 } ; + + double e[3] = { 1.570369823891028460E+01, + 1.009293658750142399E-15, + 1.541976423090495140E-16 } ; + + int order[3] = { 1, 2, 3 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&f16, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qag (&fc, -1.0, 1.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS61, w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qag(f16,61pt) limit result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f16,61pt) limit abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f16,61pt) limit neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f16,61pt) limit last") ; + gsl_test_int(status,exp_ier,"qag(f16,61pt) limit status") ; + + for (i = 0; i < 3 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qag(f16,61pt) limit alist") ; + + for (i = 0; i < 3 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qag(f16,61pt) limit blist") ; + + for (i = 0; i < 3 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qag(f16,61pt) limit rlist") ; + + for (i = 0; i < 3 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-6,"qag(f16,61pt) limit elist") ; + + for (i = 0; i < 3 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qag(f16,61pt) limit order"); + + p.neval = 0; + status = gsl_integration_qag (&fc, 1.0, -1.0, 1e-14, 0.0, w->limit, + GSL_INTEG_GAUSS61, w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qag(f16,61pt) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qag(f16,61pt) reverse abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qag(f16,61pt) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qag(f16,61pt) reverse last") ; + gsl_test_int(status,exp_ier,"qag(f16,61pt) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Test the adaptive integrator with extrapolation QAGS */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + double exp_result = 7.716049382715789440E-02 ; + double exp_abserr = 2.216394961010438404E-12 ; + int exp_neval = 189; + int exp_ier = 0; + int exp_last = 5; + + double a[5] = { 0, 0.5, 0.25, 0.125, 0.0625 } ; + double b[5] = { 0.0625, 1, 0.5, 0.25, 0.125 } ; + double r[5] = { 3.919381915366914693E-05, + 5.491842501998223103E-02, + 1.909827770934243579E-02, + 2.776531175604360097E-03, + 3.280661030752062609E-04 } ; + double e[5] = { 2.215538742580964735E-12, + 6.097169993333454062E-16, + 2.120334764359736441E-16, + 3.082568839745514608E-17, + 3.642265412331439511E-18 } ; + int order[5] = { 1, 2, 3, 4, 5 } ; + + double alpha = 2.6 ; + gsl_function f = make_function(&f1, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qags (&fc, 0.0, 1.0, 0.0, 1e-10, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qags(f1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qags(f1) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qags(f1) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qags(f1) smooth last") ; + gsl_test_int(status,exp_ier,"qags(f1) smooth status") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qags(f1) smooth alist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qags(f1) smooth blist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qags(f1) smooth rlist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-6,"qags(f1) smooth elist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qags(f1) smooth order") ; + + p.neval = 0; + status = gsl_integration_qags (&fc, 1.0, 0.0, 0.0, 1e-10, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qags(f1) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qags(f1) reverse abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qags(f1) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qags(f1) reverse last") ; + gsl_test_int(status,exp_ier,"qags(f1) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Test f11 using an absolute error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = -5.908755278982136588E+03 ; + double exp_abserr = 1.299646281053874554E-10 ; + int exp_neval = 357; + int exp_ier = 0; + int exp_last = 9; + + double a[9] = { 1.000000000000000000E+00, + 5.005000000000000000E+02, + 2.507500000000000000E+02, + 1.258750000000000000E+02, + 6.343750000000000000E+01, + 3.221875000000000000E+01, + 1.660937500000000000E+01, + 8.804687500000000000E+00, + 4.902343750000000000E+00 } ; + double b[9] = { 4.902343750000000000E+00, + 1.000000000000000000E+03, + 5.005000000000000000E+02, + 2.507500000000000000E+02, + 1.258750000000000000E+02, + 6.343750000000000000E+01, + 3.221875000000000000E+01, + 1.660937500000000000E+01, + 8.804687500000000000E+00 } ; + double r[9] = { -3.890977835520834649E+00, + -3.297343675805121620E+03, + -1.475904154146372775E+03, + -6.517404019686431411E+02, + -2.829354222635842007E+02, + -1.201692001973227519E+02, + -4.959999906099650246E+01, + -1.971441499411640308E+01, + -7.457032710459004399E+00 } ; + double e[9] = { 6.448276035006137169E-11, + 3.660786868980994028E-11, + 1.638582774073219226E-11, + 7.235772003440423011E-12, + 3.141214202790722909E-12, + 1.334146129098576244E-12, + 5.506706097890446534E-13, + 2.188739744348345039E-13, + 8.278969410534525339E-14 } ; + int order[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } ; + + double alpha = 2.0 ; + gsl_function f = make_function(&f11, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qags (&fc, 1.0, 1000.0, 1e-7, 0.0, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-15,"qags(f11) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-3,"qags(f11) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qags(f11) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qags(f11) smooth last") ; + gsl_test_int(status,exp_ier,"qags(f11) smooth status") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qags(f11) smooth alist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qags(f11) smooth blist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qags(f11) smooth rlist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-5,"qags(f11) smooth elist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qags(f11) smooth order"); + + p.neval = 0; + status = gsl_integration_qags (&fc, 1000.0, 1.0, 1e-7, 0.0, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-15,"qags(f11) reverse result") ; + gsl_test_rel(abserr,exp_abserr,1e-3,"qags(f11) reverse abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qags(f11) reverse neval") ; + gsl_test_int((int)(w->size),exp_last,"qags(f11) reverse last") ; + gsl_test_int(status,exp_ier,"qags(f11) reverse status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Test infinite range integral f455 using a relative error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = -3.616892186127022568E-01 ; + double exp_abserr = 3.016716913328831851E-06; + int exp_neval = 285; + int exp_ier = 0; + int exp_last = 10; + + double a[10] = { 9.687500000000000000E-01, + 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 7.500000000000000000E-01, + 1.250000000000000000E-01, + 8.750000000000000000E-01, + 6.250000000000000000E-02, + 9.375000000000000000E-01, + 3.125000000000000000E-02 } ; + double b[10] = { 1.000000000000000000E+00, + 3.125000000000000000E-02, + 7.500000000000000000E-01, + 5.000000000000000000E-01, + 8.750000000000000000E-01, + 2.500000000000000000E-01, + 9.375000000000000000E-01, + 1.250000000000000000E-01, + 9.687500000000000000E-01, + 6.250000000000000000E-02 } ; + double r[10] = { -1.390003415539725340E-01, + 1.429785306003466313E-03, + -1.229943369113085765E-02, + 2.995321156568048898E-03, + -4.980050133751051655E-02, + 2.785385934678596704E-03, + -8.653752279614615461E-02, + 1.736218164975512294E-03, + -8.398745675010892142E-02, + 1.041689192004495576E-03 } ; + double e[10] = { 2.395037249893453013E-02, + 2.161214992172538524E-04, + 5.720644840858777846E-14, + 3.325474514168701167E-17, + 3.147380432198176412E-14, + 3.092399597147240624E-17, + 9.607595030230581153E-16, + 1.927589382528252344E-17, + 9.324480826368044019E-16, + 1.156507325466566521E-17 } ; + int order[10] = { 1, 2, 3, 5, 7, 9, 4, 6, 8, 10 } ; + + gsl_function f = make_function(&f455, 0); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qagiu (&fc, 0.0, 0.0, 1.0e-3, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagiu(f455) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagiu(f455) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagiu(f455) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qagiu(f455) smooth last") ; + gsl_test_int(status,exp_ier,"qagiu(f455) smooth status") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagiu(f455) smooth alist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagiu(f455) smooth blist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qagiu(f455) smooth rlist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagiu(f455) smooth elist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagiu(f455) smooth order"); + + gsl_integration_workspace_free (w) ; + + } + + /* Test infinite range integral f15 using a relative error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 6.553600000000024738E+04; + double exp_abserr = 7.121667111456009280E-04; + int exp_neval = 285; + int exp_ier = 0; + int exp_last = 10; + + double a[10] = { 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02, + 7.812500000000000000E-03, + 3.906250000000000000E-03, + 1.953125000000000000E-03 } ; + double b[10] = { 1.953125000000000000E-03, + 1.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02, + 7.812500000000000000E-03, + 3.906250000000000000E-03 } ; + double r[10] = { 1.099297665754340292E+00, + 3.256176475185617591E-01, + 8.064694554185326325E+00, + 8.873128656118993263E+01, + 6.977679035845269482E+02, + 4.096981198511257389E+03, + 1.574317583220441520E+04, + 2.899418134793237914E+04, + 1.498314766425578091E+04, + 9.225251570832365360E+02 } ; + double e[10] = { 7.101865971621337814E-04, + 1.912660677170175771E-08, + 9.167763417119923333E-08, + 3.769501719163865578E-07, + 6.973493131275552509E-07, + 1.205653952340679711E-07, + 1.380003928453846583E-07, + 1.934652413547325474E-07, + 3.408933028357320364E-07, + 2.132473175465897029E-09 } ; + int order[10] = { 1, 5, 4, 9, 8, 7, 6, 3, 2, 10 } ; + + double alpha = 5.0; + + gsl_function f = make_function(&f15, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qagiu (&fc, 0.0, 0.0, 1.0e-7, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagiu(f15) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagiu(f15) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagiu(f15) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qagiu(f15) smooth last") ; + gsl_test_int(status,exp_ier,"qagiu(f15) smooth status") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagiu(f15) smooth alist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagiu(f15) smooth blist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qagiu(f15) smooth rlist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagiu(f15) smooth elist") ; + + for (i = 0; i < 10 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagiu(f15) smooth order"); + + gsl_integration_workspace_free (w) ; + + } + + /* Test infinite range integral f16 using an absolute error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 1.000000000006713292E-04; + double exp_abserr = 3.084062020905636316E-09; + int exp_neval = 165; + int exp_ier = 0; + int exp_last = 6; + + double a[6] = { 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02 } ; + double b[6] = { 3.125000000000000000E-02, + 1.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02 } ; + double r[6] = { 7.633587786326674618E-05, + 9.900990099009899620E-07, + 1.922522349322310737E-06, + 3.629434715543053753E-06, + 6.501422186103209199E-06, + 1.062064387653501389E-05 } ; + double e[6] = { 3.084061858351569051E-09, + 3.112064814755089674E-17, + 4.543453652226561245E-17, + 4.908618166361344548E-17, + 3.014338672269481784E-17, + 6.795996738013555461E-18 } ; + int order[6] = { 1, 4, 3, 2, 5, 6 } ; + + double alpha = 1.0; + + gsl_function f = make_function(&f16, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qagiu (&fc, 99.9, 1.0e-7, 0.0, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagiu(f16) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagiu(f16) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagiu(f16) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qagiu(f16) smooth last") ; + gsl_test_int(status,exp_ier,"qagiu(f16) smooth status") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagiu(f16) smooth alist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagiu(f16) smooth blist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-15,"qagiu(f16) smooth rlist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagiu(f16) smooth elist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagiu(f16) smooth order"); + + gsl_integration_workspace_free (w) ; + + } + + /* Test infinite range integral myfn1 using an absolute error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 2.275875794468747770E+00; + double exp_abserr = 7.436490118267390744E-09; + int exp_neval = 270; + int exp_ier = 0; + int exp_last = 5; + + double a[5] = { 1.250000000000000000E-01, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 0.000000000000000000E+00, + 3.750000000000000000E-01 } ; + double b[5] = { 2.500000000000000000E-01, + 1.000000000000000000E+00, + 3.750000000000000000E-01, + 1.250000000000000000E-01, + 5.000000000000000000E-01 } ; + double r[5] = { 4.639317228058405717E-04, + 1.691664195356748834E+00, + 1.146307471900291086E-01, + 4.379392477350953574E-20, + 4.691169201991640669E-01 } ; + double e[5] = { 3.169263960393051137E-09, + 4.265988974874425043E-09, + 1.231954072964969637E-12, + 8.360902986775307673E-20, + 5.208244060463541433E-15 } ; + int order[5] = { 2, 1, 3, 5, 4 } ; + + gsl_function f = make_function(&myfn1, 0); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qagi (&fc, 1.0e-7, 0.0, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagiu(myfn1) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagiu(myfn1) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagiu(myfn1) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qagiu(myfn1) smooth last") ; + gsl_test_int(status,exp_ier,"qagiu(myfn1) smooth status") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagiu(myfn1) smooth alist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagiu(myfn1) smooth blist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qagiu(myfn1) smooth rlist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagiu(myfn1) smooth elist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagiu(myfn1) smooth order"); + + gsl_integration_workspace_free (w) ; + + } + + /* Test infinite range integral myfn1 using an absolute error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 2.718281828459044647E+00; + double exp_abserr = 1.588185109253204805E-10; + int exp_neval = 135; + int exp_ier = 0; + int exp_last = 5; + + double a[5] = { 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02 } ; + double b[5] = { 6.250000000000000000E-02, + 1.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01 } ; + double r[5] = { 8.315287189746029816E-07, + 1.718281828459045091E+00, + 8.646647167633871867E-01, + 1.328565310599463256E-01, + 2.477920647947255521E-03 } ; + double e[5] = { 1.533437090413525935E-10, + 4.117868247943567505E-12, + 7.802455785301941044E-13, + 5.395586026138397182E-13, + 3.713312434866150125E-14 } ; + int order[5] = { 1, 2, 3, 4, 5 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&myfn2, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qagil (&fc, 1.0, 1.0e-7, 0.0, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagiu(myfn2) smooth result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagiu(myfn2) smooth abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagiu(myfn2) smooth neval") ; + gsl_test_int((int)(w->size),exp_last,"qagiu(myfn2) smooth last") ; + gsl_test_int(status,exp_ier,"qagiu(myfn2) smooth status") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagiu(myfn2) smooth alist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagiu(myfn2) smooth blist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qagiu(myfn2) smooth rlist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagiu(myfn2) smooth elist") ; + + for (i = 0; i < 5 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagiu(myfn2) smooth order"); + + gsl_integration_workspace_free (w) ; + + } + + /* Test integral f454 with integrable singular points */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 5.274080611672716401E+01; + double exp_abserr = 1.755703848687062418E-04; + int exp_neval = 777; + int exp_ier = 0; + int exp_last = 20; + + double a[20] = { 9.687500000000000000E-01, + 1.401269388548935790E+00, + 1.414213562373095145E+00, + 1.000000000000000000E+00, + 0.000000000000000000E+00, + 2.207106781186547462E+00, + 1.810660171779821415E+00, + 1.207106781186547462E+00, + 5.000000000000000000E-01, + 1.103553390593273731E+00, + 1.612436867076458391E+00, + 1.310660171779821415E+00, + 7.500000000000000000E-01, + 1.051776695296636976E+00, + 1.513325214724776657E+00, + 1.362436867076458391E+00, + 8.750000000000000000E-01, + 1.463769388548935790E+00, + 1.388325214724776657E+00, + 9.375000000000000000E-01} ; + double b[20] = { 1.000000000000000000E+00, + 1.414213562373095145E+00, + 1.463769388548935790E+00, + 1.051776695296636976E+00, + 5.000000000000000000E-01, + 3.000000000000000000E+00, + 2.207106781186547462E+00, + 1.310660171779821415E+00, + 7.500000000000000000E-01, + 1.207106781186547462E+00, + 1.810660171779821415E+00, + 1.362436867076458391E+00, + 8.750000000000000000E-01, + 1.103553390593273731E+00, + 1.612436867076458391E+00, + 1.388325214724776657E+00, + 9.375000000000000000E-01, + 1.513325214724776657E+00, + 1.401269388548935790E+00, + 9.687500000000000000E-01} ; + double r[20] = { -1.125078814079027711E-01, + -1.565132123531515207E-01, + -4.225328513207429193E-01, + -1.830392049835374568E-01, + 6.575875041899758092E-03, + 4.873920540843067783E+01, + 6.032891565603589079E+00, + -2.991531901645863023E-01, + -7.326282608704996063E-03, + -2.431894410706912923E-01, + 5.911661670635662835E-01, + -2.236786562536174916E-01, + -5.647871991778510847E-02, + -1.305470403178642658E-01, + -1.721363984401322045E-01, + -1.589345454585119055E-01, + -7.406626263352669715E-02, + -2.208730668000830344E-01, + -1.048692749517999567E-01, + -6.302287584527696551E-02} ; + double e[20] = { 2.506431410088378817E-02, + 2.730454695485963826E-02, + 1.017446081816190118E-01, + 3.252808038935910834E-02, + 7.300687878575027348E-17, + 5.411138804637469780E-13, + 6.697855121200013106E-14, + 3.321267596107916554E-15, + 1.417509685426979386E-16, + 2.699945168224041491E-15, + 6.573952690524728748E-15, + 2.483331942899818875E-15, + 6.270397525408045936E-16, + 1.449363299575615261E-15, + 1.911097929242846383E-15, + 1.764527917763735212E-15, + 8.223007012367522077E-16, + 2.452183642810224359E-15, + 1.164282836272345215E-15, + 6.996944784151910810E-16} ; + int order[20] = { 3, 4, 2, 1, 6, 7, 11, 8, 10, 12, 18, + 15, 16, 14, 19, 17, 20, 13, 9, 5 } ; + + gsl_function f = make_function(&f454, 0); + gsl_function fc = make_counter(&f, &p) ; + + double pts[4] ; + + pts[0] = 0.0; + pts[1] = 1.0; + pts[2] = sqrt(2.0); + pts[3] = 3.0; + + status = gsl_integration_qagp (&fc, pts, 4, + 0.0, 1.0e-3, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qagp(f454) singular result") ; + gsl_test_rel(abserr,exp_abserr,1e-5,"qagp(f454) singular abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qagp(f454) singular neval") ; + gsl_test_int((int)(w->size),exp_last,"qagp(f454) singular last") ; + gsl_test_int(status,exp_ier,"qagp(f454) singular status") ; + + for (i = 0; i < 20 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qagp(f454) singular alist") ; + + for (i = 0; i < 20 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qagp(f454) singular blist") ; + + for (i = 0; i < 20 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qagp(f454) singular rlist") ; + + for (i = 0; i < 20 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qagp(f454) singular elist") ; + + for (i = 0; i < 20 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qagp(f454) singular order"); + + gsl_integration_workspace_free (w) ; + + } + + + /* Test cauchy integration using a relative error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = -8.994400695837000137E-02; + double exp_abserr = 1.185290176227023727E-06; + int exp_neval = 215; + int exp_ier = 0; + int exp_last = 6; + + double a[6] = { -1.000000000000000000E+00, + 2.500000000000000000E+00, + 1.250000000000000000E+00, + 6.250000000000000000E-01, + -5.000000000000000000E-01, + -7.500000000000000000E-01} ; + double b[6] = { -7.500000000000000000E-01, + 5.000000000000000000E+00, + 2.500000000000000000E+00, + 1.250000000000000000E+00, + 6.250000000000000000E-01, + -5.000000000000000000E-01} ; + double r[6] = { -1.234231128040012976E-01, + 3.579970394639702888E-03, + 2.249831615049339983E-02, + 7.214232992127905808E-02, + 2.079093855884046535E-02, + -8.553244917962132821E-02} ; + double e[6] = { 1.172832717970022565E-06, + 9.018232896137375412E-13, + 1.815172652101790755E-12, + 1.006998195150956048E-13, + 1.245463873006391609E-08, + 1.833082948207153514E-15 } ; + int order[6] = { 1, 5, 3, 2, 4, 6 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&f459, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qawc (&fc, -1.0, 5.0, 0.0, 0.0, 1.0e-3, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qawc(f459) result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qawc(f459) abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qawc(f459) neval") ; + gsl_test_int((int)(w->size),exp_last,"qawc(f459) last") ; + gsl_test_int(status,exp_ier,"qawc(f459) status") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qawc(f459) alist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qawc(f459) blist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qawc(f459) rlist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qawc(f459) elist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qawc(f459) order"); + + p.neval = 0; + status = gsl_integration_qawc (&fc, 5.0, -1.0, 0.0, 0.0, 1.0e-3, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-14,"qawc(f459) rev result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qawc(f459) rev abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qawc(f459) rev neval") ; + gsl_test_int((int)(w->size),exp_last,"qawc(f459) rev last") ; + gsl_test_int(status,exp_ier,"qawc(f459) rev status") ; + + gsl_integration_workspace_free (w) ; + + } + + /* Test QAWS singular integration using a relative error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_qaws_table * t + = gsl_integration_qaws_table_alloc (0.0, 0.0, 1, 0); + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = -1.892751853489401670E-01; + double exp_abserr = 1.129133712015747658E-08; + int exp_neval = 280; + int exp_ier = 0; + int exp_last = 8; + + double a[8] = { 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02, + 7.812500000000000000E-03} ; + double b[8] = { 7.812500000000000000E-03, + 1.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02} ; + double r[8] = { -4.126317299834445824E-05, + -1.076283950172247789E-01, + -6.240573216173390947E-02, + -1.456169844189576269E-02, + -3.408925115926728436E-03, + -8.914083918175634211E-04, + -2.574191402137795482E-04, + -8.034390712936630608E-05} ; + double e[8] = { 1.129099387465713953E-08, + 3.423394967694403596E-13, + 6.928428071454762659E-16, + 1.616673288784094320E-16, + 3.784667152924835070E-17, + 9.896621209399419425E-18, + 2.857926564445496100E-18, + 8.919965558336773736E-19} ; + int order[8] = { 1, 2, 3, 4, 5, 6, 7, 8 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&f458, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qaws (&fc, 0.0, 1.0, t, 0.0, 1.0e-7, w->limit, + w, + &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qaws(f458) ln(x-a) result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qaws(f458) ln(x-a) abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qaws(f458) ln(x-a) neval") ; + gsl_test_int((int)(w->size),exp_last,"qaws(f458) ln(x-a) last") ; + gsl_test_int(status,exp_ier,"qaws(f458) ln(x-a) status") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qaws(f458) ln(x-a) alist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qaws(f458) ln(x-a) blist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qaws(f458) ln(x-a) rlist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-4,"qaws(f458) ln(x-a) elist") ; + + for (i = 0; i < 6 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qaws(f458) ln(x-a) order"); + + /* Test without logs */ + + gsl_integration_qaws_table_set (t, -0.5, -0.3, 0, 0); + + status = gsl_integration_qaws (&fc, 0.0, 1.0, t, 0.0, 1.0e-7, w->limit, + w, &result, &abserr) ; + + exp_result = 9.896686656601706433E-01; + exp_abserr = 5.888032513201251628E-08; + + gsl_test_rel(result,exp_result,1e-14,"qaws(f458) AB result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qaws(f458) AB abserr") ; + + /* Test with ln(x - a) */ + + gsl_integration_qaws_table_set (t, -0.5, -0.3, 1, 0); + + status = gsl_integration_qaws (&fc, 0.0, 1.0, t, 0.0, 1.0e-7, w->limit, + w, &result, &abserr) ; + + exp_result = -3.636679470586539620E-01; + exp_abserr = 2.851348775257054093E-08; + + gsl_test_rel(result,exp_result,1e-14,"qaws(f458) AB ln(x-a) result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qaws(f458) AB ln(x-a) abserr") ; + + /* Test with ln(b - x) */ + + gsl_integration_qaws_table_set (t, -0.5, -0.3, 0, 1); + + status = gsl_integration_qaws (&fc, 0.0, 1.0, t, 0.0, 1.0e-7, w->limit, + w, &result, &abserr) ; + + exp_result = -1.911489253363409802E+00; + exp_abserr = 9.854016753016499034E-09; + + gsl_test_rel(result,exp_result,1e-14,"qaws(f458) AB ln(b-x) result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qaws(f458) AB ln(b-x) abserr") ; + + /* Test with ln(x - a) ln(b - x) */ + + gsl_integration_qaws_table_set (t, -0.5, -0.3, 1, 1); + + status = gsl_integration_qaws (&fc, 0.0, 1.0, t, 0.0, 1.0e-7, w->limit, + w, &result, &abserr) ; + + exp_result = 3.159922862811048172E-01; + exp_abserr = 2.336183482198144595E-08; + + gsl_test_rel(result,exp_result,1e-14,"qaws(f458) AB ln(x-a)ln(b-x) result") ; + gsl_test_rel(abserr,exp_abserr,1e-6,"qaws(f458) AB ln(x-a)ln(b-x) abserr") ; + + gsl_integration_workspace_free (w) ; + gsl_integration_qaws_table_free (t) ; + + } + + + /* Test oscillatory integration using a relative error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + gsl_integration_qawo_table * wo + = gsl_integration_qawo_table_alloc (10.0 * M_PI, 1.0, + GSL_INTEG_SINE, 1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = -1.281368483991674190E-01; + double exp_abserr = 6.875028324415666248E-12; + int exp_neval = 305; + int exp_ier = 0; + int exp_last = 9; + + double a[9] = { 0.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02, + 7.812500000000000000E-03, + 3.906250000000000000E-03 } ; + double b[9] = { 3.906250000000000000E-03, + 1.000000000000000000E+00, + 5.000000000000000000E-01, + 2.500000000000000000E-01, + 1.250000000000000000E-01, + 6.250000000000000000E-02, + 3.125000000000000000E-02, + 1.562500000000000000E-02, + 7.812500000000000000E-03 } ; + double r[9] = { -1.447193692377651136E-03, + 2.190541162282139478E-02, + -2.587726479625663753E-02, + 5.483209176363500886E-02, + -3.081695575172510582E-02, + -9.178321994387816929E-02, + -3.886716016498160953E-02, + -1.242306301902117854E-02, + -3.659495117871544145E-03} ; + double e[9] = { 8.326506625798146465E-07, + 1.302638552580516100E-13, + 7.259224351945759794E-15, + 1.249770395036711102E-14, + 7.832180081562836579E-16, + 1.018998440559284116E-15, + 4.315121611695628020E-16, + 1.379237060008662177E-16, + 4.062855738364339357E-17 } ; + int order[9] = { 1, 2, 4, 3, 6, 5, 7, 8, 9 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&f456, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qawo (&fc, 0.0, 0.0, 1e-7, w->limit, + w, wo, &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qawo(f456) result") ; + gsl_test_rel(abserr,exp_abserr,1e-3,"qawo(f456) abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qawo(f456) neval") ; + gsl_test_int((int)(w->size),exp_last,"qawo(f456) last") ; + gsl_test_int(status,exp_ier,"qawo(f456) status") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->alist[i],a[i],1e-15,"qawo(f456) alist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->blist[i],b[i],1e-15,"qawo(f456) blist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-14,"qawo(f456) rlist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->elist[i],e[i],1e-2,"qawo(f456) elist") ; + + for (i = 0; i < 9 ; i++) + gsl_test_int((int)w->order[i],order[i]-1,"qawo(f456) order"); + + + /* In reverse, flip limit and sign of length */ + + gsl_integration_qawo_table_set_length (wo, -1.0); + + p.neval = 0; + status = gsl_integration_qawo (&fc, 1.0, 0.0, 1e-7, w->limit, + w, wo, &result, &abserr) ; + + gsl_test_rel(result,-exp_result,1e-14,"qawo(f456) rev result") ; + gsl_test_rel(abserr,exp_abserr,1e-3,"qawo(f456) rev abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qawo(f456) rev neval") ; + gsl_test_int((int)(w->size),exp_last,"qawo(f456) rev last") ; + gsl_test_int(status,exp_ier,"qawo(f456) rev status") ; + + + gsl_integration_qawo_table_free (wo) ; + gsl_integration_workspace_free (w) ; + + } + + /* Test fourier integration using an absolute error bound */ + + { + int status = 0, i; struct counter_params p; + double result = 0, abserr=0; + + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000) ; + gsl_integration_workspace * wc = gsl_integration_workspace_alloc (1000) ; + gsl_integration_qawo_table * wo + = gsl_integration_qawo_table_alloc (M_PI / 2.0, 1.0, + GSL_INTEG_COSINE, 1000) ; + + /* All results are for GSL_IEEE_MODE=double-precision */ + + double exp_result = 9.999999999279802765E-01; + double exp_abserr = 1.556289974669056164E-08; + int exp_neval = 590; + int exp_ier = 0; + int exp_last = 12; + + double r[12] = { 1.013283128125232802E+00, + -1.810857954748607349E-02, + 7.466754034900931897E-03, + -4.360312526786496237E-03, + 2.950184068216192904E-03, + -2.168238443073697373E-03, + 1.680910783140869081E-03, + -1.352797860944863345E-03, + 1.119354921991485901E-03, + -9.462367583691360827E-04, + 8.136341270731781887E-04, + -7.093931338504278145E-04 } ; + double e[12] = { 1.224798040766472695E-12, + 1.396565155187268456E-13, + 1.053844511655910310E-16, + 6.505213034913026604E-19, + 7.155734338404329264E-18, + 1.105886215935214523E-17, + 9.757819552369539906E-18, + 5.854691731421723944E-18, + 4.553649124439220312E-18, + 7.643625316022806260E-18, + 2.439454888092388058E-17, + 2.130457268934021451E-17 } ; + + double alpha = 1.0 ; + gsl_function f = make_function(&f457, &alpha); + gsl_function fc = make_counter(&f, &p) ; + + status = gsl_integration_qawf (&fc, 0.0, 1e-7, w->limit, + w, wc, wo, &result, &abserr) ; + + gsl_test_rel(result,exp_result,1e-14,"qawf(f457) result") ; + gsl_test_rel(abserr,exp_abserr,1e-3,"qawf(f457) abserr") ; + gsl_test_int((int)(p.neval),exp_neval,"qawf(f457) neval") ; + gsl_test_int((int)(w->size),exp_last,"qawf(f457) last") ; + gsl_test_int(status,exp_ier,"qawf(f457) status") ; + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->rlist[i],r[i],1e-12,"qawf(f457) rlist") ; + + /* We can only get within two orders of magnitude on the error + here, which is very sensitive to the floating point precision */ + + for (i = 0; i < 9 ; i++) + gsl_test_rel(w->elist[i],e[i],50.0,"qawf(f457) elist") ; + + + gsl_integration_qawo_table_free (wo) ; + gsl_integration_workspace_free (wc) ; + gsl_integration_workspace_free (w) ; + + } + + /* Sanity check monomial test function for fixed Gauss-Legendre rules */ + { + struct monomial_params params; + gsl_function f; + + f.function = &f_monomial; + f.params = ¶ms; + + params.degree = 2; + params.constant = 1.0; + gsl_test_abs(GSL_FN_EVAL(&f, 2.0), 4.0, 8*GSL_DBL_EPSILON, + "f_monomial sanity check 1"); + + params.degree = 1; + params.constant = 2.0; + gsl_test_abs(GSL_FN_EVAL(&f, 2.0), 4.0, 8*GSL_DBL_EPSILON, + "f_monomial sanity check 2"); + + params.degree = 2; + params.constant = 2.0; + gsl_test_abs(integ_f_monomial(1.0, 2.0, ¶ms), + (2.0/3.0)*(2.0*2.0*2.0 - 1.0*1.0*1.0), 8*GSL_DBL_EPSILON, + "integ_f_monomial sanity check"); + } + + /* Test the fixed-order Gauss-Legendre rules with a monomial. */ + { + int n; + struct monomial_params params; + gsl_function f; + const double a = 0.0, b = 1.2; + + f.function = &f_monomial; + f.params = ¶ms; + + params.constant = 1.0; + + for (n = 1; n < 1025; ++n) + { + double expected, result; + + gsl_integration_glfixed_table * tbl = + gsl_integration_glfixed_table_alloc(n); + + params.degree = 2*n-1; /* n point rule exact for 2n-1 degree poly */ + expected = integ_f_monomial(a, b, ¶ms); + result = gsl_integration_glfixed(&f, a, b, tbl); + + if (tbl->precomputed) + { + gsl_test_rel(result, expected, 1.0e-12, + "glfixed %d-point: Integrating (%g*x^%d) over [%g,%g]", + n, params.constant, params.degree, a, b); + } + else + { + gsl_test_rel(result, expected, 1.0e-7, + "glfixed %d-point: Integrating (%g*x^%d) over [%g,%g]", + n, params.constant, params.degree, a, b); + } + + gsl_integration_glfixed_table_free(tbl); + } + } + + /* Sanity check sin(x) test function for fixed Gauss-Legendre rules */ + { + gsl_function f = { f_sin, NULL }; + + gsl_test_abs(GSL_FN_EVAL(&f, 2.0), sin(2.0), 0.0, "f_sin sanity check 1"); + gsl_test_abs(GSL_FN_EVAL(&f, 7.0), sin(7.0), 0.0, "f_sin sanity check 2"); + gsl_test_abs(integ_f_sin(0.0, M_PI), 2.0, GSL_DBL_EPSILON, + "integ_f_sin sanity check"); + } + + /* Test the fixed-order Gauss-Legendre rules against sin(x) on [0, pi] */ + { + const int n_max = 1024; + const gsl_function f = { f_sin, NULL }; + const double a = 0.0, b = M_PI; + const double expected = integ_f_sin(a, b); + double result, abserr, prev_abserr = 0.0; + int n; + + for (n = 1; n <= n_max; ++n) + { + gsl_integration_glfixed_table * const tbl = + gsl_integration_glfixed_table_alloc(n); + + result = gsl_integration_glfixed(&f, a, b, tbl); + abserr = fabs(expected - result); + + if (n == 1) + { + gsl_test_abs(result, GSL_FN_EVAL(&f,(b+a)/2)*(b-a), 0.0, + "glfixed %d-point: behavior for n == 1", n); + } + else if (n < 9) + { + gsl_test(! (abserr < prev_abserr), + "glfixed %d-point: observed drop in absolute error versus %d-points", + n, n-1); + } + else if (tbl->precomputed) + { + gsl_test_abs(result, expected, 2.0 * n * GSL_DBL_EPSILON, + "glfixed %d-point: very low absolute error for high precision coefficients", + n); + } + else + { + gsl_test_abs(result, expected, 1.0e6 * GSL_DBL_EPSILON, + "glfixed %d-point: acceptable absolute error for on-the-fly coefficients", + n); + } + + prev_abserr = abserr; + gsl_integration_glfixed_table_free(tbl); + } + } + + /* Test some fixed-order Gauss-Legendre rule points and weights on [-1, 1] */ + /* This verifies the (point, weight) retrieval API behaves sanely */ + { + const double eps = GSL_DBL_EPSILON; + gsl_integration_glfixed_table *tbl; + int n, i; + double xi, wi; + + /* Analytical results for points and weights on [-1, 1] + Pulled from http://en.wikipedia.org/wiki/Gaussian_quadrature + Sorted in increasing order of Gauss points */ + const double e1[1][2] = { + {0, 2 } + }; + const double e2[2][2] = { + {-1/sqrt(3), 1}, + { 1/sqrt(3), 1} + }; + const double e3[3][2] = { + {-sqrt(15)/5, 5./9}, + { 0, 8./9}, + { sqrt(15)/5, 5./9} + }; + const double e4[4][2] = { + {-sqrt((3+2*sqrt(6./5))/7), (18-sqrt(30))/36}, + {-sqrt((3-2*sqrt(6./5))/7), (18+sqrt(30))/36}, + { sqrt((3-2*sqrt(6./5))/7), (18+sqrt(30))/36}, + { sqrt((3+2*sqrt(6./5))/7), (18-sqrt(30))/36} + }; + const double e5[5][2] = { + {-sqrt((5+2*sqrt(10./7)))/3, (322-13*sqrt(70))/900}, + {-sqrt((5-2*sqrt(10./7)))/3, (322+13*sqrt(70))/900}, + { 0, 128./225 }, + { sqrt((5-2*sqrt(10./7)))/3, (322+13*sqrt(70))/900}, + { sqrt((5+2*sqrt(10./7)))/3, (322-13*sqrt(70))/900} + }; + + n = 1; + tbl = gsl_integration_glfixed_table_alloc(n); + for (i = 0; i < n; ++i) + { + gsl_integration_glfixed_point(-1, 1, i, &xi, &wi, tbl); + gsl_test_abs(xi, e1[i][0], eps, "glfixed %d-point lookup: x(%d)", n, i); + gsl_test_abs(wi, e1[i][1], eps, "glfixed %d-point lookup: w(%d)", n, i); + } + gsl_integration_glfixed_table_free(tbl); + + n = 2; + tbl = gsl_integration_glfixed_table_alloc(n); + for (i = 0; i < n; ++i) + { + gsl_integration_glfixed_point(-1, 1, i, &xi, &wi, tbl); + gsl_test_abs(xi, e2[i][0], eps, "glfixed %d-point lookup: x(%d)", n, i); + gsl_test_abs(wi, e2[i][1], eps, "glfixed %d-point lookup: w(%d)", n, i); + } + gsl_integration_glfixed_table_free(tbl); + + n = 3; + tbl = gsl_integration_glfixed_table_alloc(n); + for (i = 0; i < n; ++i) + { + gsl_integration_glfixed_point(-1, 1, i, &xi, &wi, tbl); + gsl_test_abs(xi, e3[i][0], eps, "glfixed %d-point lookup: x(%d)", n, i); + gsl_test_abs(wi, e3[i][1], eps, "glfixed %d-point lookup: w(%d)", n, i); + } + gsl_integration_glfixed_table_free(tbl); + + n = 4; + tbl = gsl_integration_glfixed_table_alloc(n); + for (i = 0; i < n; ++i) + { + gsl_integration_glfixed_point(-1, 1, i, &xi, &wi, tbl); + gsl_test_abs(xi, e4[i][0], eps, "glfixed %d-point lookup: x(%d)", n, i); + gsl_test_abs(wi, e4[i][1], eps, "glfixed %d-point lookup: w(%d)", n, i); + } + gsl_integration_glfixed_table_free(tbl); + + n = 5; + tbl = gsl_integration_glfixed_table_alloc(n); + for (i = 0; i < n; ++i) + { + gsl_integration_glfixed_point(-1, 1, i, &xi, &wi, tbl); + gsl_test_abs(xi, e5[i][0], eps, "glfixed %d-point lookup: x(%d)", n, i); + gsl_test_abs(wi, e5[i][1], eps, "glfixed %d-point lookup: w(%d)", n, i); + } + gsl_integration_glfixed_table_free(tbl); + } + + /* Test some fixed-order Gauss-Legendre rule points and weights on [-2, 3] */ + /* This verifies the (point, weight) retrieval API is okay on non-[-1,1] */ + { + gsl_integration_glfixed_table *tbl; + double result, x, w; + int i; + + /* Odd n = 3, f(x) = x**5 + x**4 + x**3 + x**2 + x**1 + 1 */ + result = 0; + tbl = gsl_integration_glfixed_table_alloc(3); + for (i = 0; i < 3; ++i) + { + gsl_integration_glfixed_point(-2, 3, i, &x, &w, tbl); + result += w * (1 + x*(1 + x*(1 + x*(1 + x*(1 + x))))); + } + gsl_test_rel(result, 805./4, 1e-8, + "glfixed %d-point xi,wi eval", 3); + gsl_integration_glfixed_table_free(tbl); + + /* Even n = 4, f(x) = x**7 + x**6 + x**5 + x**4 + x**3 + x**2 + x**1 + 1 */ + result = 0; + tbl = gsl_integration_glfixed_table_alloc(4); + for (i = 0; i < 4; ++i) + { + gsl_integration_glfixed_point(-2, 3, i, &x, &w, tbl); + result += w * (1 + x*(1 + x*(1 + x*(1 + x*(1 + x*(1 + x*(1 + x))))))); + } + gsl_test_rel(result, 73925./56, 1e-8, + "glfixed %d-point xi,wi eval", 4); + gsl_integration_glfixed_table_free(tbl); + } + + { + typedef double (*fptr) ( double , void * ); + + const static fptr funs[25] = { &cqf1 , &cqf2 , &cqf3 , &cqf4 , &cqf5 , &cqf6 , &cqf7 , + &cqf8 , &cqf9 , &cqf10 , &cqf11 , &cqf12 , &cqf13 , &cqf14 , &cqf15 , &cqf16 , &cqf17 , + &cqf18 , &cqf19 , &cqf20 , &cqf21 , &cqf22 , &cqf23 , &cqf24 , &cqf25 }; + + const static double ranges[50] = { 0, 1 , 0, 1 , 0, 1 , -1, 1 , -1, 1 , 0, 1 , 0, 1 , 0, 1 , 0, 1 , + 0, 1 , 0, 1 , 0, 1 , 0, 1 , 0, 10 , 0, 10 , 0, 10 , 0, 1 , 0, M_PI , + 0, 1 , -1, 1 , 0, 1 , 0, 1 , 0, 1 , 0, 3 , 0, 5 }; + const static double f_exact[25] = { 1.7182818284590452354 , 0.7 , 2.0/3 , 0.4794282266888016674 , + 1.5822329637296729331 , 0.4 , 2 , 0.86697298733991103757 , + 1.1547005383792515290 , 0.69314718055994530942 , 0.3798854930417224753 , + 0.77750463411224827640 , 0.49898680869304550249 , + 0.5 , 1 , 0.13263071079267703209e+08 , 0.49898680869304550249 , + 0.83867634269442961454 , -1 , 1.5643964440690497731 , + 0.16349494301863722618 , -0.63466518254339257343 , + 0.013492485649467772692 , 17.664383539246514971 , 7.5 }; + + double result, abserr; + size_t neval; + int fid; + + /* Loop over the functions... */ + for ( fid = 0 ; fid < 25 ; fid++ ) { + gsl_integration_cquad_workspace *ws = gsl_integration_cquad_workspace_alloc ( 200 ); + gsl_function f = make_function(funs[fid], NULL); + double exact = f_exact[fid]; + + /* Call our quadrature routine. */ + int status = gsl_integration_cquad (&f, ranges[2*fid] , ranges[2*fid+1] , 0.0 , 1.0e-12 , ws , &result , &abserr , &neval); + + gsl_test_rel (result, exact, 1e-12, "cquad f%d", fid); + gsl_test (fabs(result - exact) > 5.0 * abserr, "cquad f%d error (%g actual vs %g estimated)", fid, fabs(result-exact), abserr); + gsl_test_int (status, GSL_SUCCESS, "cquad return code"); + + gsl_integration_cquad_workspace_free(ws); + } + } + + + exit (gsl_test_summary()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err) ; +} diff --git a/software/gsl-1.15/integration/tests.c b/software/gsl-1.15/integration/tests.c new file mode 100644 index 000000000..3cbb30b89 --- /dev/null +++ b/software/gsl-1.15/integration/tests.c @@ -0,0 +1,362 @@ +/* integration/tests.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "tests.h" + +/* These are the test functions from table 4.1 of the QUADPACK book */ + +/* f1(x) = x^alpha * log(1/x) */ +/* integ(f1,x,0,1) = 1/(alpha + 1)^2 */ + +double f1 (double x, void * params) { + double alpha = *(double *) params ; + return pow(x,alpha) * log(1/x) ; +} + +/* f2(x) = 4^-alpha / ((x-pi/4)^2 + 16^-alpha) */ +/* integ(f2,x,0,1) = arctan((4-pi)4^(alpha-1)) + arctan(pi 4^(alpha-1)) */ + +double f2 (double x, void * params) { + double alpha = *(double *) params ; + return pow(4.0,-alpha) / (pow((x-M_PI/4.0),2.0) + pow(16.0,-alpha)) ; +} + +/* f3(x) = cos(2^alpha * sin(x)) */ +/* integ(f3,x,0,pi) = pi J_0(2^alpha) */ + +double f3 (double x, void * params) { + double alpha = *(double *) params ; + return cos(pow(2.0,alpha) * sin(x)) ; +} + +/* Functions 4, 5 and 6 are duplicates of functions 1, 2 and 3 */ +/* .... */ + +/* f7(x) = |x - 1/3|^alpha */ +/* integ(f7,x,0,1) = ((2/3)^(alpha+1) + (1/3)^(alpha+1))/(alpha + 1) */ + +double f7 (double x, void * params) { + double alpha = *(double *) params ; + return pow(fabs(x - (1.0/3.0)),alpha) ; +} + +/* f8(x) = |x - pi/4|^alpha */ +/* integ(f8,x,0,1) = + ((1 - pi/4)^(alpha+1) + (pi/4)^(alpha+1))/(alpha + 1) */ + +double f8 (double x, void * params) { + double alpha = *(double *) params ; + return pow(fabs(x - (M_PI/4.0)),alpha) ; +} + +/* f9(x) = sqrt(1 - x^2) / (x + 1 + 2^-alpha) */ +/* integ(f9,x,-1,1) = pi/sqrt((1+2^-alpha)^2-1) */ + +double f9 (double x, void * params) { + double alpha = *(double *) params ; + return 1 / ((x + 1 + pow(2.0,-alpha)) * sqrt(1-x*x)) ; +} + +/* f10(x) = sin(x)^(alpha - 1) */ +/* integ(f10,x,0,pi/2) = 2^(alpha-2) ((Gamma(alpha/2))^2)/Gamma(alpha) */ + +double f10 (double x, void * params) { + double alpha = *(double *) params ; + return pow(sin(x), alpha-1) ; +} + +/* f11(x) = log(1/x)^(alpha - 1) */ +/* integ(f11,x,0,1) = Gamma(alpha) */ + +double f11 (double x, void * params) { + double alpha = *(double *) params ; + return pow(log(1/x), alpha-1) ; +} + +/* f12(x) = exp(20*(x-1)) * sin(2^alpha * x) */ +/* integ(f12,x,0,1) = + (20 sin(2^alpha) - 2^alpha cos(2^alpha) + 2^alpha exp(-20)) + /(400 + 4^alpha) */ + +double f12 (double x, void * params) { + double alpha = *(double *) params ; + return exp(20*(x-1)) * sin(pow(2.0,alpha) * x) ; +} + +/* f13(x) = cos(2^alpha * x)/sqrt(x(1 - x)) */ +/* integ(f13,x,0,1) = pi cos(2^(alpha-1)) J_0(2^(alpha-1)) */ + +double f13 (double x, void * params) { + double alpha = *(double *) params ; + return cos(pow(2.0,alpha)*x)/sqrt(x*(1-x)) ; +} + +double f14 (double x, void * params) { + double alpha = *(double *) params ; + return exp(-pow(2.0,-alpha)*x)*cos(x)/sqrt(x) ; +} + +double f15 (double x, void * params) { + double alpha = *(double *) params ; + return x*x * exp(-pow(2.0,-alpha)*x) ; +} + +double f16 (double x, void * params) { + double alpha = *(double *) params ; + if (x==0 && alpha == 1) return 1 ; /* make the function continuous in x */ + if (x==0 && alpha > 1) return 0 ; /* avoid problems with pow(0,1) */ + return pow(x,alpha-1)/pow((1+10*x),2.0) ; +} + +double f17 (double x, void * params) { + double alpha = *(double *) params ; + return pow(2.0,-alpha)/(((x-1)*(x-1)+pow(4.0,-alpha))*(x-2)) ; +} + +/* f454(x) = x^3 log|(x^2-1)(x^2-2)| */ +/* integ(f454,x,0,inf) = 61 log(2) + (77/4) log(7) - 27 */ + +double f454 (double x, void * params) { + double x2 = x * x; + double x3 = x * x2; + params = 0 ; + return x3 * log(fabs((x2 - 1.0) * (x2 - 2.0))) ; +} + +/* f455(x) = log(x)/(1+100*x^2) */ +/* integ(f455,x,0,inf) = -log(10)/20 */ + +double f455 (double x, void * params) { + params = 0 ; + return log(x) / (1.0 + 100.0 * x * x) ; +} + +/* f456(x) = log(x) */ +/* integ(f456*sin(10 pi x),x,0,1) = -(gamma + log(10pi) - Ci(10pi))/(10pi) */ + +double f456 (double x, void * params) { + params = 0 ; + if (x == 0.0) + { + return 0; + } + return log(x) ; +} + +/* f457(x) = 1/sqrt(x) */ +/* integ(f457*cos(pi x / 2),x,0,+inf) = 1 */ + +double f457 (double x, void * params) { + params = 0 ; + if (x == 0.0) + { + return 0; + } + return 1/sqrt(x) ; +} + +/* f458(x) = 1/(1 + log(x)^2)^2 */ +/* integ(log(x) f458(x),x,0,1) = (Ci(1) sin(1) + (pi/2 - Si(1)) cos(1))/pi + = -0.1892752 */ + +double f458 (double x, void * params) { + params = 0 ; + + if (x == 0.0) + { + return 0; + } + else + { + double u = log(x); + double v = 1 + u * u; + + return 1.0 / (v * v) ; + } +} + +/* f459(x) = 1/(5 x^3 + 6) */ +/* integ(f459/(x-0),x,-1,5) = log(125/631)/18 */ + +double f459 (double x, void * params) { + params = 0 ; + return 1.0 / (5.0 * x * x * x + 6.0) ; +} + +/* myfn1(x) = exp(-x - x^2) */ +/* integ(myfn1,x,-inf,inf) = sqrt(pi) exp(-1/4) */ + +double myfn1 (double x, void * params) { + params = 0; + return exp(-x - x*x) ; +} + +/* myfn2(x) = exp(alpha*x) */ +/* integ(myfn2,x,-inf,b) = exp(alpha*b)/alpha */ + +double myfn2 (double x, void * params) { + double alpha = *(double *) params ; + return exp(alpha*x) ; +} + + +/* f_monomial = constant * x^degree */ +double f_monomial(double x, void * params) +{ + struct monomial_params * p = (struct monomial_params *) params; + + return p->constant * gsl_pow_int(x, p->degree); +} + +/* integ(f_monomial,x,a b)=constant*(b^(degree+1)-a^(degree+1))/(degree+1) */ +double integ_f_monomial(double a, double b, struct monomial_params * p) +{ + const int degreep1 = p->degree + 1; + const double bnp1 = gsl_pow_int(b, degreep1); + const double anp1 = gsl_pow_int(a, degreep1); + return (p->constant / degreep1)*(bnp1 - anp1); +} + +/* f(x) = sin(x) */ +double f_sin(double x, void * params) +{ + return sin(x); +} + +/* integ(f_sin,x,a,b) */ +double integ_f_sin(double a, double b) +{ + return -cos(b) + cos(a); +} + + +/* The test functions. */ +double cqf1 ( double x , void *params ) { + return exp(x); +} + +double cqf2 ( double x , void *params ) { + return x >= 0.3; +} + +double cqf3 ( double x , void *params ) { + return sqrt(x); +} + + +double cqf4 ( double x , void *params ) { + return (23.0/25) * cosh(x) - cos(x); +} + +double cqf5 ( double x , void *params ) { + double x2 = x*x; + return 1.0 / ( x2 * (x2 + 1) + 0.9); +} + +double cqf6 ( double x , void *params ) { + return x * sqrt( x ); +} + +double cqf7 ( double x , void *params ) { + return 1.0 / sqrt(x); +} + +double cqf8 ( double x , void *params ) { + double x2 = x*x; + return 1.0 / (1 + x2*x2); +} + +double cqf9 ( double x , void *params ) { + return 2.0 / (2 + sin(10*M_PI*x)); +} + +double cqf10 ( double x , void *params ) { + return 1.0 / (1 + x); +} + +double cqf11 ( double x , void *params ) { + return 1.0 / (1 + exp(x)); +} + +double cqf12 ( double x , void *params ) { + return x / (exp(x) - 1.0); +} + +double cqf13 ( double x , void *params ) { + return sin(100 * M_PI * x) / (M_PI * x); +} + +double cqf14 ( double x , void *params ) { + return sqrt(50.0) * exp(-50*M_PI*x*x); +} + +double cqf15 ( double x , void *params ) { + return 25.0 * exp(-25*x); +} + +double cqf16 ( double x , void *params ) { + return 50 / M_PI * (2500 * x*x + 1); +} + +double cqf17 ( double x , void *params ) { + double t1 = 50 * M_PI * x ,t2; + t2 = sin(t1) / t1; + return 50 * t2 * t2; +} + +double cqf18 ( double x , void *params ) { + return cos( cos(x) + 3*sin(x) + 2*cos(2*x) + 3*sin(2*x) + 3*cos(3*x) ); +} + +double cqf19 ( double x , void *params ) { + return log(x); +} + +double cqf20 ( double x , void *params ) { + return 1 / (x*x + 1.005); +} + +double cqf21 ( double x , void *params ) { + return 1 / cosh( 10 * (x - 0.2) * 2 ) + + 1 / cosh( 100 * (x - 0.4) * 4 ) + + 1 / cosh( 1000 * (x - 0.6) * 8 ); +} + +double cqf22 ( double x , void *params ) { + return 4 * M_PI*M_PI * x * sin(20*M_PI*x) * cos(2*M_PI*x); +} + +double cqf23 ( double x , void *params ) { + double t = 230*x - 30; + return 1 / (1 + t*t); +} + +double cqf24 ( double x , void *params ) { + return floor(exp(x)); +} + +double cqf25 ( double x , void *params ) { + return (x < 1) * (x + 1) + + (1 <= x && x <= 3) * (3 - x) + + (x > 3) * 2; +} diff --git a/software/gsl-1.15/integration/tests.h b/software/gsl-1.15/integration/tests.h new file mode 100644 index 000000000..a303678d7 --- /dev/null +++ b/software/gsl-1.15/integration/tests.h @@ -0,0 +1,85 @@ +/* integration/tests.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double f1 (double x, void * params); +double f2 (double x, void * params); +double f3 (double x, void * params); +double f4 (double x, void * params); +double f5 (double x, void * params); + +double f6 (double x, void * params); +double f7 (double x, void * params); +double f8 (double x, void * params); +double f9 (double x, void * params); +double f10 (double x, void * params); + +double f11 (double x, void * params); +double f12 (double x, void * params); +double f13 (double x, void * params); +double f14 (double x, void * params); +double f15 (double x, void * params); + +double f16 (double x, void * params); +double f17 (double x, void * params); + +double f454 (double x, void * params); +double f455 (double x, void * params); +double f456 (double x, void * params); +double f457 (double x, void * params); +double f458 (double x, void * params); +double f459 (double x, void * params); + +double myfn1 (double x, void * params); +double myfn2 (double x, void * params); + +struct monomial_params { + int degree; + double constant; +} ; +double f_monomial(double x, void * params); +double integ_f_monomial(double a, double b, struct monomial_params * p); + +double f_sin(double x, void * params); +double integ_f_sin(double a, double b); + +double cqf1 ( double x , void *params ); +double cqf2 ( double x , void *params ); +double cqf3 ( double x , void *params ); +double cqf4 ( double x , void *params ); +double cqf5 ( double x , void *params ); +double cqf6 ( double x , void *params ); +double cqf7 ( double x , void *params ); +double cqf8 ( double x , void *params ); +double cqf9 ( double x , void *params ); +double cqf10 ( double x , void *params ); +double cqf11 ( double x , void *params ); +double cqf12 ( double x , void *params ); +double cqf13 ( double x , void *params ); +double cqf14 ( double x , void *params ); +double cqf15 ( double x , void *params ); +double cqf16 ( double x , void *params ); +double cqf17 ( double x , void *params ); +double cqf18 ( double x , void *params ); +double cqf19 ( double x , void *params ); +double cqf20 ( double x , void *params ); +double cqf21 ( double x , void *params ); +double cqf22 ( double x , void *params ); +double cqf23 ( double x , void *params ); +double cqf24 ( double x , void *params ); +double cqf25 ( double x , void *params ); diff --git a/software/gsl-1.15/integration/util.c b/software/gsl-1.15/integration/util.c new file mode 100644 index 000000000..43cae1eb3 --- /dev/null +++ b/software/gsl-1.15/integration/util.c @@ -0,0 +1,137 @@ +/* integration/util.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static inline +void update (gsl_integration_workspace * workspace, + double a1, double b1, double area1, double error1, + double a2, double b2, double area2, double error2); + +static inline void +retrieve (const gsl_integration_workspace * workspace, + double * a, double * b, double * r, double * e); + + + +static inline +void update (gsl_integration_workspace * workspace, + double a1, double b1, double area1, double error1, + double a2, double b2, double area2, double error2) +{ + double * alist = workspace->alist ; + double * blist = workspace->blist ; + double * rlist = workspace->rlist ; + double * elist = workspace->elist ; + size_t * level = workspace->level ; + + const size_t i_max = workspace->i ; + const size_t i_new = workspace->size ; + + const size_t new_level = workspace->level[i_max] + 1; + + /* append the newly-created intervals to the list */ + + if (error2 > error1) + { + alist[i_max] = a2; /* blist[maxerr] is already == b2 */ + rlist[i_max] = area2; + elist[i_max] = error2; + level[i_max] = new_level; + + alist[i_new] = a1; + blist[i_new] = b1; + rlist[i_new] = area1; + elist[i_new] = error1; + level[i_new] = new_level; + } + else + { + blist[i_max] = b1; /* alist[maxerr] is already == a1 */ + rlist[i_max] = area1; + elist[i_max] = error1; + level[i_max] = new_level; + + alist[i_new] = a2; + blist[i_new] = b2; + rlist[i_new] = area2; + elist[i_new] = error2; + level[i_new] = new_level; + } + + workspace->size++; + + if (new_level > workspace->maximum_level) + { + workspace->maximum_level = new_level; + } + + qpsrt (workspace) ; +} + +static inline void +retrieve (const gsl_integration_workspace * workspace, + double * a, double * b, double * r, double * e) +{ + const size_t i = workspace->i; + double * alist = workspace->alist; + double * blist = workspace->blist; + double * rlist = workspace->rlist; + double * elist = workspace->elist; + + *a = alist[i] ; + *b = blist[i] ; + *r = rlist[i] ; + *e = elist[i] ; +} + +static inline double +sum_results (const gsl_integration_workspace * workspace); + +static inline double +sum_results (const gsl_integration_workspace * workspace) +{ + const double * const rlist = workspace->rlist ; + const size_t n = workspace->size; + + size_t k; + double result_sum = 0; + + for (k = 0; k < n; k++) + { + result_sum += rlist[k]; + } + + return result_sum; +} + +static inline int +subinterval_too_small (double a1, double a2, double b2); + +static inline int +subinterval_too_small (double a1, double a2, double b2) +{ + const double e = GSL_DBL_EPSILON; + const double u = GSL_DBL_MIN; + + double tmp = (1 + 100 * e) * (fabs (a2) + 1000 * u); + + int status = fabs (a1) <= tmp && fabs (b2) <= tmp; + + return status; +} + diff --git a/software/gsl-1.15/integration/workspace.c b/software/gsl-1.15/integration/workspace.c new file mode 100644 index 000000000..4cb62af4e --- /dev/null +++ b/software/gsl-1.15/integration/workspace.c @@ -0,0 +1,154 @@ +/* integration/workspace.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_integration_workspace * +gsl_integration_workspace_alloc (const size_t n) +{ + gsl_integration_workspace * w ; + + if (n == 0) + { + GSL_ERROR_VAL ("workspace length n must be positive integer", + GSL_EDOM, 0); + } + + w = (gsl_integration_workspace *) + malloc (sizeof (gsl_integration_workspace)); + + if (w == 0) + { + GSL_ERROR_VAL ("failed to allocate space for workspace struct", + GSL_ENOMEM, 0); + } + + w->alist = (double *) malloc (n * sizeof (double)); + + if (w->alist == 0) + { + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for alist ranges", + GSL_ENOMEM, 0); + } + + w->blist = (double *) malloc (n * sizeof (double)); + + if (w->blist == 0) + { + free (w->alist); + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for blist ranges", + GSL_ENOMEM, 0); + } + + w->rlist = (double *) malloc (n * sizeof (double)); + + if (w->rlist == 0) + { + free (w->blist); + free (w->alist); + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for rlist ranges", + GSL_ENOMEM, 0); + } + + + w->elist = (double *) malloc (n * sizeof (double)); + + if (w->elist == 0) + { + free (w->rlist); + free (w->blist); + free (w->alist); + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for elist ranges", + GSL_ENOMEM, 0); + } + + w->order = (size_t *) malloc (n * sizeof (size_t)); + + if (w->order == 0) + { + free (w->elist); + free (w->rlist); + free (w->blist); + free (w->alist); + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for order ranges", + GSL_ENOMEM, 0); + } + + w->level = (size_t *) malloc (n * sizeof (size_t)); + + if (w->level == 0) + { + free (w->order); + free (w->elist); + free (w->rlist); + free (w->blist); + free (w->alist); + free (w); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for order ranges", + GSL_ENOMEM, 0); + } + + w->size = 0 ; + w->limit = n ; + w->maximum_level = 0 ; + + return w ; +} + +void +gsl_integration_workspace_free (gsl_integration_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->level) ; + free (w->order) ; + free (w->elist) ; + free (w->rlist) ; + free (w->blist) ; + free (w->alist) ; + free (w) ; +} + +/* +size_t +gsl_integration_workspace_limit (gsl_integration_workspace * w) +{ + return w->limit ; +} + + +size_t +gsl_integration_workspace_size (gsl_integration_workspace * w) +{ + return w->size ; +} +*/ diff --git a/software/gsl-1.15/interpolation/.deps/accel.Plo b/software/gsl-1.15/interpolation/.deps/accel.Plo new file mode 100644 index 000000000..ff12f67c6 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/accel.Plo @@ -0,0 +1,95 @@ +accel.lo: accel.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_interp.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_interp.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/interpolation/.deps/akima.Plo b/software/gsl-1.15/interpolation/.deps/akima.Plo new file mode 100644 index 000000000..3363ba400 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/akima.Plo @@ -0,0 +1,99 @@ +akima.lo: akima.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + integ_eval.h ../gsl/gsl_interp.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +integ_eval.h: + +../gsl/gsl_interp.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/interpolation/.deps/cspline.Plo b/software/gsl-1.15/interpolation/.deps/cspline.Plo new file mode 100644 index 000000000..e6b0900eb --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/cspline.Plo @@ -0,0 +1,221 @@ +cspline.lo: cspline.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h integ_eval.h ../gsl/gsl_interp.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +integ_eval.h: + +../gsl/gsl_interp.h: diff --git a/software/gsl-1.15/interpolation/.deps/inline.Plo b/software/gsl-1.15/interpolation/.deps/inline.Plo new file mode 100644 index 000000000..d851da870 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/inline.Plo @@ -0,0 +1,82 @@ +inline.lo: inline.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h ../build.h \ + ../gsl/gsl_interp.h ../gsl/gsl_inline.h ../gsl/gsl_types.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../build.h: + +../gsl/gsl_interp.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_types.h: diff --git a/software/gsl-1.15/interpolation/.deps/interp.Plo b/software/gsl-1.15/interpolation/.deps/interp.Plo new file mode 100644 index 000000000..72f0e6af2 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/interp.Plo @@ -0,0 +1,130 @@ +interp.lo: interp.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_interp.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_interp.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/interpolation/.deps/linear.Plo b/software/gsl-1.15/interpolation/.deps/linear.Plo new file mode 100644 index 000000000..7b0cbee95 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/linear.Plo @@ -0,0 +1,95 @@ +linear.lo: linear.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_interp.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_interp.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/interpolation/.deps/poly.Plo b/software/gsl-1.15/interpolation/.deps/poly.Plo new file mode 100644 index 000000000..bef4bbcb9 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/poly.Plo @@ -0,0 +1,101 @@ +poly.lo: poly.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_poly.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h ../gsl/gsl_interp.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_interp.h: diff --git a/software/gsl-1.15/interpolation/.deps/spline.Plo b/software/gsl-1.15/interpolation/.deps/spline.Plo new file mode 100644 index 000000000..35b2d8c05 --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/spline.Plo @@ -0,0 +1,104 @@ +spline.lo: spline.c ../config.h /usr/include/string.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_interp.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_spline.h + +../config.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_interp.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_spline.h: diff --git a/software/gsl-1.15/interpolation/.deps/test.Po b/software/gsl-1.15/interpolation/.deps/test.Po new file mode 100644 index 000000000..033a150fd --- /dev/null +++ b/software/gsl-1.15/interpolation/.deps/test.Po @@ -0,0 +1,105 @@ +test.o: test.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_test.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../gsl/gsl_interp.h ../gsl/gsl_inline.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_interp.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/interpolation/ChangeLog b/software/gsl-1.15/interpolation/ChangeLog new file mode 100644 index 000000000..01ae9aa2b --- /dev/null +++ b/software/gsl-1.15/interpolation/ChangeLog @@ -0,0 +1,146 @@ +2011-01-15 Brian Gough + + * interp.c (gsl_interp_type_min_size): added function to get + min_size from type instead of interp object + +2010-12-09 Brian Gough + + * cspline.c (cspline_eval, cspline_eval_deriv) + (cspline_eval_deriv2, cspline_eval_integ): return GSL_EINVAL for + out of range values instead of GSL_FAILURE + + * akima.c (akima_eval_integ): return GSL_EINVAL for out of range + values instead of GSL_FAILURE + + * interp.c (gsl_interp_eval_e, gsl_interp_eval) + (gsl_interp_eval_deriv_e, gsl_interp_eval_deriv) + (gsl_interp_eval_deriv2_e, gsl_interp_eval_deriv2) + (gsl_interp_eval_integ_e, gsl_interp_eval_integ): return NaN and + an error code of GSL_EDOM when x is out of range + +2009-07-09 Brian Gough + + * spline.c (gsl_spline_free): handle NULL argument in free + + * interp.c (gsl_interp_free): handle NULL argument in free + + * accel.c (gsl_interp_accel_free): handle NULL argument in free + +2008-09-05 Brian Gough + + * gsl_interp.h (gsl_interp_accel_find): corrected condition for + x>=xa. + +2008-07-03 Brian Gough + + * gsl_interp.h: added inline declarations + + * accel.c: moved gsl_interp_accel_find to inline.c + + * bsearch.h bsearch.c: removed, moved to inline.c + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-03-14 Brian Gough + + * interp.c (gsl_interp_init): added check for monotonically + increasing x + +2005-12-24 Brian Gough + + * cspline.c (cspline_init_periodic): fix invalid memory access of + xa[3] for sys_size=2 + +2005-12-22 Brian Gough + + * test.c (test_cspline2): added extra test of cspline + (test_cspline3): added extra test of cspline + +2004-11-28 Brian Gough + + * cspline.c (cspline_init): support case of degenerate x[i] values + (cspline_init_periodic): support case of degenerate x[i] values + + * integ_eval.h (integ_eval): improve numerical stability of + integration formula + +2004-03-15 Brian Gough + + * cspline.c (cspline_init): handle the case N=1 specially + +2003-07-24 Brian Gough + + * gsl_interp.h: removed duplicate declaration of + gsl_interp_accel_find + +Sat Apr 27 20:57:22 2002 Brian Gough + + * cspline.c (cspline_init_periodic): handle boundary effects + correctly + +Sun Dec 2 22:48:23 2001 Brian Gough + + * poly.c: added polynomial interpolation based on divided + differences from Dan, Ho-Jin. + +Tue Jul 3 12:10:53 2001 Brian Gough + + * interp.c (DISCARD_STATUS): discard error status values using a + macro for configurability + +Sun Jul 1 21:41:27 2001 Brian Gough + + * cspline.c: added const to state in appropriate places + +Tue Jun 26 11:57:55 2001 Brian Gough + + * spline.c: added missing #include for memcpy + +Mon Jun 25 19:58:45 2001 Brian Gough + + * standardized to gsl conventions, added high-level 'spline' + interface + +Mon Apr 30 13:29:34 2001 Brian Gough + + * renamed gsl_interp_obj to gsl_interp + +Mon Apr 23 10:29:51 2001 Brian Gough + + * unified error handling conventions to _e for error handling + functions and no suffix for plain functions, so _impl functions + are no longer needed. + + * removed tests for EFAULT, since EFAULT should only apply to + invalid non-null pointers. + + +Tue Apr 11 19:56:25 2000 Brian Gough + + * cspline.c (cspline_calc_periodic): changed occurrence of gsl_la + name to new gsl_linalg prefix, gsl_linalg_solve_symm_cyc_tridiag + (cspline_calc_natural): ditto + +Mon Aug 30 11:31:00 1999 Brian Gough + + * bsearch.c: made gsl_interp_bsearch (formerly interp_bsearch) an + exported function, since it is needed by the inline version of + gsl_interp_accel_find in gsl_interp.h + +Tue Nov 17 16:52:00 1998 Brian Gough + + * added #include to all top-level source files + + * renamed test_interp.c to test.c + + * test_interp.c: got rid of unused function alloc_xy_table + +Fri Nov 13 16:50:05 1998 Brian Gough + + * clean up for make strict, use size_t instead of unsigned int + +1998-11-06 + + * added const to several declarations where needed. + + diff --git a/software/gsl-1.15/interpolation/Makefile.am b/software/gsl-1.15/interpolation/Makefile.am new file mode 100644 index 000000000..95bd17e54 --- /dev/null +++ b/software/gsl-1.15/interpolation/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgslinterpolation.la + +check_PROGRAMS = test + +pkginclude_HEADERS = gsl_interp.h gsl_spline.h + +libgslinterpolation_la_SOURCES = accel.c akima.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c inline.c + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + diff --git a/software/gsl-1.15/interpolation/Makefile.in b/software/gsl-1.15/interpolation/Makefile.in new file mode 100644 index 000000000..b2fcfe6f7 --- /dev/null +++ b/software/gsl-1.15/interpolation/Makefile.in @@ -0,0 +1,673 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = interpolation +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslinterpolation_la_LIBADD = +am_libgslinterpolation_la_OBJECTS = accel.lo akima.lo cspline.lo \ + interp.lo linear.lo spline.lo poly.lo inline.lo +libgslinterpolation_la_OBJECTS = $(am_libgslinterpolation_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslinterpolation.la ../poly/libgslpoly.la \ + ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la \ + ../blas/libgslblas.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../cblas/libgslcblas.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslinterpolation_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslinterpolation_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslinterpolation.la +pkginclude_HEADERS = gsl_interp.h gsl_spline.h +libgslinterpolation_la_SOURCES = accel.c akima.c cspline.c interp.c linear.c integ_eval.h spline.c poly.c inline.c +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu interpolation/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu interpolation/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslinterpolation.la: $(libgslinterpolation_la_OBJECTS) $(libgslinterpolation_la_DEPENDENCIES) + $(LINK) $(libgslinterpolation_la_OBJECTS) $(libgslinterpolation_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/akima.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poly.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/interpolation/TODO b/software/gsl-1.15/interpolation/TODO new file mode 100644 index 000000000..fd0c1d0ee --- /dev/null +++ b/software/gsl-1.15/interpolation/TODO @@ -0,0 +1,13 @@ +# -*- org -*- +#+CATEGORY: interpolation + +1. need to add a test for the akima splines + +2. [DOCUMENTATION] From: Conrad Curry + + I would suggest adding more about cspline and Akima similiar to what + is given for 'polynomial', particularly under what conditions one + would be prefered over the other. + +3. add akima splines without the Wodicka modification, so that the spline +is a smooth curve without corners. diff --git a/software/gsl-1.15/interpolation/accel.c b/software/gsl-1.15/interpolation/accel.c new file mode 100644 index 000000000..00063fd8c --- /dev/null +++ b/software/gsl-1.15/interpolation/accel.c @@ -0,0 +1,58 @@ +/* interpolation/accel.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include + +gsl_interp_accel * +gsl_interp_accel_alloc (void) +{ + gsl_interp_accel *a = (gsl_interp_accel *) malloc (sizeof (gsl_interp_accel)); + if (a == 0) + { + GSL_ERROR_NULL("could not allocate space for gsl_interp_accel", GSL_ENOMEM); + } + + a->cache = 0; + a->hit_count = 0; + a->miss_count = 0; + + return a; +} + +int +gsl_interp_accel_reset (gsl_interp_accel * a) +{ + a->cache = 0; + a->hit_count = 0; + a->miss_count = 0; + + return GSL_SUCCESS; +} + +void +gsl_interp_accel_free (gsl_interp_accel * a) +{ + RETURN_IF_NULL (a); + free (a); +} diff --git a/software/gsl-1.15/interpolation/akima.c b/software/gsl-1.15/interpolation/akima.c new file mode 100644 index 000000000..4244e0f1a --- /dev/null +++ b/software/gsl-1.15/interpolation/akima.c @@ -0,0 +1,389 @@ +/* interpolation/akima.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include "integ_eval.h" +#include + +typedef struct +{ + double * b; + double * c; + double * d; + double * _m; +} akima_state_t; + + +/* common creation */ +static void * +akima_alloc (size_t size) +{ + akima_state_t *state = (akima_state_t *) malloc (sizeof (akima_state_t)); + + if (state == NULL) + { + GSL_ERROR_NULL("failed to allocate space for state", GSL_ENOMEM); + } + + state->b = (double *) malloc (size * sizeof (double)); + + if (state->b == NULL) + { + free (state); + GSL_ERROR_NULL("failed to allocate space for b", GSL_ENOMEM); + } + + state->c = (double *) malloc (size * sizeof (double)); + + if (state->c == NULL) + { + free (state->b); + free (state); + GSL_ERROR_NULL("failed to allocate space for c", GSL_ENOMEM); + } + + state->d = (double *) malloc (size * sizeof (double)); + + if (state->d == NULL) + { + free (state->c); + free (state->b); + free (state); + GSL_ERROR_NULL("failed to allocate space for d", GSL_ENOMEM); + } + + state->_m = (double *) malloc ((size + 4) * sizeof (double)); + + if (state->_m == NULL) + { + free (state->d); + free (state->c); + free (state->b); + free (state); + GSL_ERROR_NULL("failed to allocate space for _m", GSL_ENOMEM); + } + + return state; +} + + +/* common calculation */ +static void +akima_calc (const double x_array[], double b[], double c[], double d[], size_t size, double m[]) +{ + size_t i; + + for (i = 0; i < (size - 1); i++) + { + const double NE = fabs (m[i + 1] - m[i]) + fabs (m[i - 1] - m[i - 2]); + if (NE == 0.0) + { + b[i] = m[i]; + c[i] = 0.0; + d[i] = 0.0; + } + else + { + const double h_i = x_array[i + 1] - x_array[i]; + const double NE_next = fabs (m[i + 2] - m[i + 1]) + fabs (m[i] - m[i - 1]); + const double alpha_i = fabs (m[i - 1] - m[i - 2]) / NE; + double alpha_ip1; + double tL_ip1; + if (NE_next == 0.0) + { + tL_ip1 = m[i]; + } + else + { + alpha_ip1 = fabs (m[i] - m[i - 1]) / NE_next; + tL_ip1 = (1.0 - alpha_ip1) * m[i] + alpha_ip1 * m[i + 1]; + } + b[i] = (1.0 - alpha_i) * m[i - 1] + alpha_i * m[i]; + c[i] = (3.0 * m[i] - 2.0 * b[i] - tL_ip1) / h_i; + d[i] = (b[i] + tL_ip1 - 2.0 * m[i]) / (h_i * h_i); + } + } +} + + +static int +akima_init (void * vstate, const double x_array[], const double y_array[], + size_t size) +{ + akima_state_t *state = (akima_state_t *) vstate; + + double * m = state->_m + 2; /* offset so we can address the -1,-2 + components */ + + size_t i; + for (i = 0; i <= size - 2; i++) + { + m[i] = (y_array[i + 1] - y_array[i]) / (x_array[i + 1] - x_array[i]); + } + + /* non-periodic boundary conditions */ + m[-2] = 3.0 * m[0] - 2.0 * m[1]; + m[-1] = 2.0 * m[0] - m[1]; + m[size - 1] = 2.0 * m[size - 2] - m[size - 3]; + m[size] = 3.0 * m[size - 2] - 2.0 * m[size - 3]; + + akima_calc (x_array, state->b, state->c, state->d, size, m); + + return GSL_SUCCESS; +} + + +static int +akima_init_periodic (void * vstate, + const double x_array[], + const double y_array[], + size_t size) +{ + akima_state_t *state = (akima_state_t *) vstate; + + double * m = state->_m + 2; /* offset so we can address the -1,-2 + components */ + + size_t i; + for (i = 0; i <= size - 2; i++) + { + m[i] = (y_array[i + 1] - y_array[i]) / (x_array[i + 1] - x_array[i]); + } + + /* periodic boundary conditions */ + m[-2] = m[size - 1 - 2]; + m[-1] = m[size - 1 - 1]; + m[size - 1] = m[0]; + m[size] = m[1]; + + akima_calc (x_array, state->b, state->c, state->d, size, m); + + return GSL_SUCCESS; +} + +static void +akima_free (void * vstate) +{ + akima_state_t *state = (akima_state_t *) vstate; + + free (state->b); + free (state->c); + free (state->d); + free (state->_m); + free (state); +} + + +static +int +akima_eval (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *y) +{ + const akima_state_t *state = (const akima_state_t *) vstate; + + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + { + const double x_lo = x_array[index]; + const double delx = x - x_lo; + const double b = state->b[index]; + const double c = state->c[index]; + const double d = state->d[index]; + *y = y_array[index] + delx * (b + delx * (c + d * delx)); + return GSL_SUCCESS; + } +} + + +static int +akima_eval_deriv (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *dydx) +{ + const akima_state_t *state = (const akima_state_t *) vstate; + + size_t index; + + DISCARD_POINTER(y_array); /* prevent warning about unused parameter */ + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + { + double x_lo = x_array[index]; + double delx = x - x_lo; + double b = state->b[index]; + double c = state->c[index]; + double d = state->d[index]; + *dydx = b + delx * (2.0 * c + 3.0 * d * delx); + return GSL_SUCCESS; + } +} + + +static +int +akima_eval_deriv2 (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *y_pp) +{ + const akima_state_t *state = (const akima_state_t *) vstate; + + size_t index; + + DISCARD_POINTER(y_array); /* prevent warning about unused parameter */ + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + { + const double x_lo = x_array[index]; + const double delx = x - x_lo; + const double c = state->c[index]; + const double d = state->d[index]; + *y_pp = 2.0 * c + 6.0 * d * delx; + return GSL_SUCCESS; + } +} + + +static +int +akima_eval_integ (const void * vstate, + const double x_array[], const double y_array[], size_t size, + gsl_interp_accel * acc, + double a, double b, + double * result) +{ + const akima_state_t *state = (const akima_state_t *) vstate; + + size_t i, index_a, index_b; + + if (acc != 0) + { + index_a = gsl_interp_accel_find (acc, x_array, size, a); + index_b = gsl_interp_accel_find (acc, x_array, size, b); + } + else + { + index_a = gsl_interp_bsearch (x_array, a, 0, size - 1); + index_b = gsl_interp_bsearch (x_array, b, 0, size - 1); + } + + *result = 0.0; + + /* interior intervals */ + + for(i=index_a; i<=index_b; i++) { + const double x_hi = x_array[i + 1]; + const double x_lo = x_array[i]; + const double y_lo = y_array[i]; + const double dx = x_hi - x_lo; + if(dx != 0.0) { + + if (i == index_a || i == index_b) + { + double x1 = (i == index_a) ? a : x_lo; + double x2 = (i == index_b) ? b : x_hi; + *result += integ_eval (y_lo, state->b[i], state->c[i], state->d[i], + x_lo, x1, x2); + } + else + { + *result += dx * (y_lo + + dx*(0.5*state->b[i] + + dx*(state->c[i]/3.0 + + 0.25*state->d[i]*dx))); + } + } + else { + *result = 0.0; + return GSL_EINVAL; + } + } + + return GSL_SUCCESS; +} + + +static const gsl_interp_type akima_type = +{ + "akima", + 5, + &akima_alloc, + &akima_init, + &akima_eval, + &akima_eval_deriv, + &akima_eval_deriv2, + &akima_eval_integ, + &akima_free +}; + +const gsl_interp_type * gsl_interp_akima = &akima_type; + +static const gsl_interp_type akima_periodic_type = +{ + "akima-periodic", + 5, + &akima_alloc, + &akima_init_periodic, + &akima_eval, + &akima_eval_deriv, + &akima_eval_deriv2, + &akima_eval_integ, + &akima_free +}; + +const gsl_interp_type * gsl_interp_akima_periodic = &akima_periodic_type; diff --git a/software/gsl-1.15/interpolation/cspline.c b/software/gsl-1.15/interpolation/cspline.c new file mode 100644 index 000000000..37c73d4ae --- /dev/null +++ b/software/gsl-1.15/interpolation/cspline.c @@ -0,0 +1,475 @@ +/* interpolation/cspline.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include "integ_eval.h" +#include + +typedef struct +{ + double * c; + double * g; + double * diag; + double * offdiag; +} cspline_state_t; + + +/* common initialization */ +static void * +cspline_alloc (size_t size) +{ + cspline_state_t * state = (cspline_state_t *) malloc (sizeof (cspline_state_t)); + + if (state == NULL) + { + GSL_ERROR_NULL("failed to allocate space for state", GSL_ENOMEM); + } + + state->c = (double *) malloc (size * sizeof (double)); + + if (state->c == NULL) + { + free (state); + GSL_ERROR_NULL("failed to allocate space for c", GSL_ENOMEM); + } + + state->g = (double *) malloc (size * sizeof (double)); + + if (state->g == NULL) + { + free (state->c); + free (state); + GSL_ERROR_NULL("failed to allocate space for g", GSL_ENOMEM); + } + + state->diag = (double *) malloc (size * sizeof (double)); + + if (state->diag == NULL) + { + free (state->g); + free (state->c); + free (state); + GSL_ERROR_NULL("failed to allocate space for diag", GSL_ENOMEM); + } + + state->offdiag = (double *) malloc (size * sizeof (double)); + + if (state->offdiag == NULL) + { + free (state->diag); + free (state->g); + free (state->c); + free (state); + GSL_ERROR_NULL("failed to allocate space for offdiag", GSL_ENOMEM); + } + + return state; +} + + +/* natural spline calculation + * see [Engeln-Mullges + Uhlig, p. 254] + */ +static int +cspline_init (void * vstate, const double xa[], const double ya[], + size_t size) +{ + cspline_state_t *state = (cspline_state_t *) vstate; + + size_t i; + size_t num_points = size; + size_t max_index = num_points - 1; /* Engeln-Mullges + Uhlig "n" */ + size_t sys_size = max_index - 1; /* linear system is sys_size x sys_size */ + + state->c[0] = 0.0; + state->c[max_index] = 0.0; + + for (i = 0; i < sys_size; i++) + { + const double h_i = xa[i + 1] - xa[i]; + const double h_ip1 = xa[i + 2] - xa[i + 1]; + const double ydiff_i = ya[i + 1] - ya[i]; + const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; + state->offdiag[i] = h_ip1; + state->diag[i] = 2.0 * (h_ip1 + h_i); + state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); + } + + if (sys_size == 1) + { + state->c[1] = state->g[0] / state->diag[0]; + return GSL_SUCCESS; + } + else + { + gsl_vector_view g_vec = gsl_vector_view_array(state->g, sys_size); + gsl_vector_view diag_vec = gsl_vector_view_array(state->diag, sys_size); + gsl_vector_view offdiag_vec = gsl_vector_view_array(state->offdiag, sys_size - 1); + gsl_vector_view solution_vec = gsl_vector_view_array ((state->c) + 1, sys_size); + + int status = gsl_linalg_solve_symm_tridiag(&diag_vec.vector, + &offdiag_vec.vector, + &g_vec.vector, + &solution_vec.vector); + return status; + } +} + + +/* periodic spline calculation + * see [Engeln-Mullges + Uhlig, p. 256] + */ +static int +cspline_init_periodic (void * vstate, const double xa[], const double ya[], + size_t size) +{ + cspline_state_t *state = (cspline_state_t *) vstate; + + size_t i; + size_t num_points = size; + size_t max_index = num_points - 1; /* Engeln-Mullges + Uhlig "n" */ + size_t sys_size = max_index; /* linear system is sys_size x sys_size */ + + if (sys_size == 2) { + /* solve 2x2 system */ + + const double h0 = xa[1] - xa[0]; + const double h1 = xa[2] - xa[1]; + + const double A = 2.0*(h0 + h1); + const double B = h0 + h1; + double g[2]; + double det; + + g[0] = 3.0 * ((ya[2] - ya[1]) / h1 - (ya[1] - ya[0]) / h0); + g[1] = 3.0 * ((ya[1] - ya[2]) / h0 - (ya[2] - ya[1]) / h1); + + det = 3.0 * (h0 + h1) * (h0 + h1); + state->c[1] = ( A * g[0] - B * g[1])/det; + state->c[2] = (-B * g[0] + A * g[1])/det; + state->c[0] = state->c[2]; + + return GSL_SUCCESS; + } else { + + for (i = 0; i < sys_size-1; i++) { + const double h_i = xa[i + 1] - xa[i]; + const double h_ip1 = xa[i + 2] - xa[i + 1]; + const double ydiff_i = ya[i + 1] - ya[i]; + const double ydiff_ip1 = ya[i + 2] - ya[i + 1]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; + state->offdiag[i] = h_ip1; + state->diag[i] = 2.0 * (h_ip1 + h_i); + state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); + } + + i = sys_size - 1; + + { + const double h_i = xa[i + 1] - xa[i]; + const double h_ip1 = xa[1] - xa[0]; + const double ydiff_i = ya[i + 1] - ya[i]; + const double ydiff_ip1 = ya[1] - ya[0]; + const double g_i = (h_i != 0.0) ? 1.0 / h_i : 0.0; + const double g_ip1 = (h_ip1 != 0.0) ? 1.0 / h_ip1 : 0.0; + state->offdiag[i] = h_ip1; + state->diag[i] = 2.0 * (h_ip1 + h_i); + state->g[i] = 3.0 * (ydiff_ip1 * g_ip1 - ydiff_i * g_i); + } + + { + gsl_vector_view g_vec = gsl_vector_view_array(state->g, sys_size); + gsl_vector_view diag_vec = gsl_vector_view_array(state->diag, sys_size); + gsl_vector_view offdiag_vec = gsl_vector_view_array(state->offdiag, sys_size); + gsl_vector_view solution_vec = gsl_vector_view_array ((state->c) + 1, sys_size); + + int status = gsl_linalg_solve_symm_cyc_tridiag(&diag_vec.vector, + &offdiag_vec.vector, + &g_vec.vector, + &solution_vec.vector); + state->c[0] = state->c[max_index]; + + return status; + } + } +} + + +static +void +cspline_free (void * vstate) +{ + cspline_state_t *state = (cspline_state_t *) vstate; + + free (state->c); + free (state->g); + free (state->diag); + free (state->offdiag); + free (state); +} + +/* function for common coefficient determination + */ +static inline void +coeff_calc (const double c_array[], double dy, double dx, size_t index, + double * b, double * c, double * d) +{ + const double c_i = c_array[index]; + const double c_ip1 = c_array[index + 1]; + *b = (dy / dx) - dx * (c_ip1 + 2.0 * c_i) / 3.0; + *c = c_i; + *d = (c_ip1 - c_i) / (3.0 * dx); +} + + +static +int +cspline_eval (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *y) +{ + const cspline_state_t *state = (const cspline_state_t *) vstate; + + double x_lo, x_hi; + double dx; + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + x_hi = x_array[index + 1]; + x_lo = x_array[index]; + dx = x_hi - x_lo; + if (dx > 0.0) + { + const double y_lo = y_array[index]; + const double y_hi = y_array[index + 1]; + const double dy = y_hi - y_lo; + double delx = x - x_lo; + double b_i, c_i, d_i; + coeff_calc(state->c, dy, dx, index, &b_i, &c_i, &d_i); + *y = y_lo + delx * (b_i + delx * (c_i + delx * d_i)); + return GSL_SUCCESS; + } + else + { + *y = 0.0; + return GSL_EINVAL; + } +} + + +static +int +cspline_eval_deriv (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *dydx) +{ + const cspline_state_t *state = (const cspline_state_t *) vstate; + + double x_lo, x_hi; + double dx; + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + x_hi = x_array[index + 1]; + x_lo = x_array[index]; + dx = x_hi - x_lo; + if (dx > 0.0) + { + const double y_lo = y_array[index]; + const double y_hi = y_array[index + 1]; + const double dy = y_hi - y_lo; + double delx = x - x_lo; + double b_i, c_i, d_i; + coeff_calc(state->c, dy, dx, index, &b_i, &c_i, &d_i); + *dydx = b_i + delx * (2.0 * c_i + 3.0 * d_i * delx); + return GSL_SUCCESS; + } + else + { + *dydx = 0.0; + return GSL_EINVAL; + } +} + + +static +int +cspline_eval_deriv2 (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double * y_pp) +{ + const cspline_state_t *state = (const cspline_state_t *) vstate; + + double x_lo, x_hi; + double dx; + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + x_hi = x_array[index + 1]; + x_lo = x_array[index]; + dx = x_hi - x_lo; + if (dx > 0.0) + { + const double y_lo = y_array[index]; + const double y_hi = y_array[index + 1]; + const double dy = y_hi - y_lo; + double delx = x - x_lo; + double b_i, c_i, d_i; + coeff_calc(state->c, dy, dx, index, &b_i, &c_i, &d_i); + *y_pp = 2.0 * c_i + 6.0 * d_i * delx; + return GSL_SUCCESS; + } + else + { + *y_pp = 0.0; + return GSL_EINVAL; + } +} + + +static +int +cspline_eval_integ (const void * vstate, + const double x_array[], const double y_array[], size_t size, + gsl_interp_accel * acc, + double a, double b, + double * result) +{ + const cspline_state_t *state = (const cspline_state_t *) vstate; + + size_t i, index_a, index_b; + + if (acc != 0) + { + index_a = gsl_interp_accel_find (acc, x_array, size, a); + index_b = gsl_interp_accel_find (acc, x_array, size, b); + } + else + { + index_a = gsl_interp_bsearch (x_array, a, 0, size - 1); + index_b = gsl_interp_bsearch (x_array, b, 0, size - 1); + } + + *result = 0.0; + + /* interior intervals */ + for(i=index_a; i<=index_b; i++) { + const double x_hi = x_array[i + 1]; + const double x_lo = x_array[i]; + const double y_lo = y_array[i]; + const double y_hi = y_array[i + 1]; + const double dx = x_hi - x_lo; + const double dy = y_hi - y_lo; + if(dx != 0.0) { + double b_i, c_i, d_i; + coeff_calc(state->c, dy, dx, i, &b_i, &c_i, &d_i); + + if (i == index_a || i == index_b) + { + double x1 = (i == index_a) ? a : x_lo; + double x2 = (i == index_b) ? b : x_hi; + *result += integ_eval(y_lo, b_i, c_i, d_i, x_lo, x1, x2); + } + else + { + *result += dx * (y_lo + dx*(0.5*b_i + dx*(c_i/3.0 + 0.25*d_i*dx))); + } + } + else { + *result = 0.0; + return GSL_EINVAL; + } + } + + return GSL_SUCCESS; +} + +static const gsl_interp_type cspline_type = +{ + "cspline", + 3, + &cspline_alloc, + &cspline_init, + &cspline_eval, + &cspline_eval_deriv, + &cspline_eval_deriv2, + &cspline_eval_integ, + &cspline_free +}; + +const gsl_interp_type * gsl_interp_cspline = &cspline_type; + +static const gsl_interp_type cspline_periodic_type = +{ + "cspline-periodic", + 2, + &cspline_alloc, + &cspline_init_periodic, + &cspline_eval, + &cspline_eval_deriv, + &cspline_eval_deriv2, + &cspline_eval_integ, + &cspline_free +}; + +const gsl_interp_type * gsl_interp_cspline_periodic = &cspline_periodic_type; + + diff --git a/software/gsl-1.15/interpolation/gsl_interp.h b/software/gsl-1.15/interpolation/gsl_interp.h new file mode 100644 index 000000000..03dc973e9 --- /dev/null +++ b/software/gsl-1.15/interpolation/gsl_interp.h @@ -0,0 +1,224 @@ +/* interpolation/gsl_interp.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#ifndef __GSL_INTERP_H__ +#define __GSL_INTERP_H__ +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* evaluation accelerator */ +typedef struct { + size_t cache; /* cache of index */ + size_t miss_count; /* keep statistics */ + size_t hit_count; +} +gsl_interp_accel; + + +/* interpolation object type */ +typedef struct { + const char * name; + unsigned int min_size; + void * (*alloc) (size_t size); + int (*init) (void *, const double xa[], const double ya[], size_t size); + int (*eval) (const void *, const double xa[], const double ya[], size_t size, double x, gsl_interp_accel *, double * y); + int (*eval_deriv) (const void *, const double xa[], const double ya[], size_t size, double x, gsl_interp_accel *, double * y_p); + int (*eval_deriv2) (const void *, const double xa[], const double ya[], size_t size, double x, gsl_interp_accel *, double * y_pp); + int (*eval_integ) (const void *, const double xa[], const double ya[], size_t size, gsl_interp_accel *, double a, double b, double * result); + void (*free) (void *); + +} gsl_interp_type; + + +/* general interpolation object */ +typedef struct { + const gsl_interp_type * type; + double xmin; + double xmax; + size_t size; + void * state; +} gsl_interp; + + +/* available types */ +GSL_VAR const gsl_interp_type * gsl_interp_linear; +GSL_VAR const gsl_interp_type * gsl_interp_polynomial; +GSL_VAR const gsl_interp_type * gsl_interp_cspline; +GSL_VAR const gsl_interp_type * gsl_interp_cspline_periodic; +GSL_VAR const gsl_interp_type * gsl_interp_akima; +GSL_VAR const gsl_interp_type * gsl_interp_akima_periodic; + +gsl_interp_accel * +gsl_interp_accel_alloc(void); + +int +gsl_interp_accel_reset (gsl_interp_accel * a); + +void +gsl_interp_accel_free(gsl_interp_accel * a); + +gsl_interp * +gsl_interp_alloc(const gsl_interp_type * T, size_t n); + +int +gsl_interp_init(gsl_interp * obj, const double xa[], const double ya[], size_t size); + +const char * gsl_interp_name(const gsl_interp * interp); +unsigned int gsl_interp_min_size(const gsl_interp * interp); +unsigned int gsl_interp_type_min_size(const gsl_interp_type * T); + + +int +gsl_interp_eval_e(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, double * y); + +double +gsl_interp_eval(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a); + +int +gsl_interp_eval_deriv_e(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, + double * d); + +double +gsl_interp_eval_deriv(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a); + +int +gsl_interp_eval_deriv2_e(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, + double * d2); + +double +gsl_interp_eval_deriv2(const gsl_interp * obj, + const double xa[], const double ya[], double x, + gsl_interp_accel * a); + +int +gsl_interp_eval_integ_e(const gsl_interp * obj, + const double xa[], const double ya[], + double a, double b, + gsl_interp_accel * acc, + double * result); + +double +gsl_interp_eval_integ(const gsl_interp * obj, + const double xa[], const double ya[], + double a, double b, + gsl_interp_accel * acc); + +void +gsl_interp_free(gsl_interp * interp); + +INLINE_DECL size_t +gsl_interp_bsearch(const double x_array[], double x, + size_t index_lo, size_t index_hi); + +#ifdef HAVE_INLINE + +/* Perform a binary search of an array of values. + * + * The parameters index_lo and index_hi provide an initial bracket, + * and it is assumed that index_lo < index_hi. The resulting index + * is guaranteed to be strictly less than index_hi and greater than + * or equal to index_lo, so that the implicit bracket [index, index+1] + * always corresponds to a region within the implicit value range of + * the value array. + * + * Note that this means the relationship of 'x' to x_array[index] + * and x_array[index+1] depends on the result region, i.e. the + * behaviour at the boundaries may not correspond to what you + * expect. We have the following complete specification of the + * behaviour. + * Suppose the input is x_array[] = { x0, x1, ..., xN } + * if ( x == x0 ) then index == 0 + * if ( x > x0 && x <= x1 ) then index == 0, and sim. for other interior pts + * if ( x == xN ) then index == N-1 + * if ( x > xN ) then index == N-1 + * if ( x < x0 ) then index == 0 + */ + +INLINE_FUN size_t +gsl_interp_bsearch(const double x_array[], double x, + size_t index_lo, size_t index_hi) +{ + size_t ilo = index_lo; + size_t ihi = index_hi; + while(ihi > ilo + 1) { + size_t i = (ihi + ilo)/2; + if(x_array[i] > x) + ihi = i; + else + ilo = i; + } + + return ilo; +} +#endif + +INLINE_DECL size_t +gsl_interp_accel_find(gsl_interp_accel * a, const double x_array[], size_t size, double x); + +#ifdef HAVE_INLINE +INLINE_FUN size_t +gsl_interp_accel_find(gsl_interp_accel * a, const double xa[], size_t len, double x) +{ + size_t x_index = a->cache; + + if(x < xa[x_index]) { + a->miss_count++; + a->cache = gsl_interp_bsearch(xa, x, 0, x_index); + } + else if(x >= xa[x_index + 1]) { + a->miss_count++; + a->cache = gsl_interp_bsearch(xa, x, x_index, len-1); + } + else { + a->hit_count++; + } + + return a->cache; +} +#endif /* HAVE_INLINE */ + + +__END_DECLS + +#endif /* __GSL_INTERP_H__ */ diff --git a/software/gsl-1.15/interpolation/gsl_spline.h b/software/gsl-1.15/interpolation/gsl_spline.h new file mode 100644 index 000000000..08255ca88 --- /dev/null +++ b/software/gsl-1.15/interpolation/gsl_spline.h @@ -0,0 +1,101 @@ +/* interpolation/gsl_spline.h + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SPLINE_H__ +#define __GSL_SPLINE_H__ +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* general interpolation object */ +typedef struct { + gsl_interp * interp; + double * x; + double * y; + size_t size; +} gsl_spline; + +gsl_spline * +gsl_spline_alloc(const gsl_interp_type * T, size_t size); + +int +gsl_spline_init(gsl_spline * spline, const double xa[], const double ya[], size_t size); + +const char * gsl_spline_name(const gsl_spline * spline); +unsigned int gsl_spline_min_size(const gsl_spline * spline); + + +int +gsl_spline_eval_e(const gsl_spline * spline, double x, + gsl_interp_accel * a, double * y); + +double +gsl_spline_eval(const gsl_spline * spline, double x, gsl_interp_accel * a); + +int +gsl_spline_eval_deriv_e(const gsl_spline * spline, + double x, + gsl_interp_accel * a, + double * y); + +double +gsl_spline_eval_deriv(const gsl_spline * spline, + double x, + gsl_interp_accel * a); + +int +gsl_spline_eval_deriv2_e(const gsl_spline * spline, + double x, + gsl_interp_accel * a, + double * y); + +double +gsl_spline_eval_deriv2(const gsl_spline * spline, + double x, + gsl_interp_accel * a); + +int +gsl_spline_eval_integ_e(const gsl_spline * spline, + double a, double b, + gsl_interp_accel * acc, + double * y); + +double +gsl_spline_eval_integ(const gsl_spline * spline, + double a, double b, + gsl_interp_accel * acc); + +void +gsl_spline_free(gsl_spline * spline); + +__END_DECLS + +#endif /* __GSL_INTERP_H__ */ diff --git a/software/gsl-1.15/interpolation/inline.c b/software/gsl-1.15/interpolation/inline.c new file mode 100644 index 000000000..31110cfa0 --- /dev/null +++ b/software/gsl-1.15/interpolation/inline.c @@ -0,0 +1,30 @@ +/* interpolation/bsearch.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + diff --git a/software/gsl-1.15/interpolation/integ_eval.h b/software/gsl-1.15/interpolation/integ_eval.h new file mode 100644 index 000000000..c3260e935 --- /dev/null +++ b/software/gsl-1.15/interpolation/integ_eval.h @@ -0,0 +1,36 @@ +/* interpolation/integ_eval_macro.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* function for doing the spline integral evaluation + which is common to both the cspline and akima methods + */ + +static inline double +integ_eval (double ai, double bi, double ci, double di, double xi, double a, + double b) +{ + const double r1 = a - xi; + const double r2 = b - xi; + const double r12 = r1 + r2; + const double bterm = 0.5 * bi * r12; + const double cterm = (1.0 / 3.0) * ci * (r1 * r1 + r2 * r2 + r1 * r2); + const double dterm = 0.25 * di * r12 * (r1 * r1 + r2 * r2); + + return (b - a) * (ai + bterm + cterm + dterm); +} diff --git a/software/gsl-1.15/interpolation/interp.c b/software/gsl-1.15/interpolation/interp.c new file mode 100644 index 000000000..f4a6fe29b --- /dev/null +++ b/software/gsl-1.15/interpolation/interp.c @@ -0,0 +1,280 @@ +/* interpolation/interp.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include + +#define DISCARD_STATUS(s) if ((s) != GSL_SUCCESS) { GSL_ERROR_VAL("interpolation error", (s), GSL_NAN); } + +gsl_interp * +gsl_interp_alloc (const gsl_interp_type * T, size_t size) +{ + gsl_interp * interp; + + if (size < T->min_size) + { + GSL_ERROR_NULL ("insufficient number of points for interpolation type", + GSL_EINVAL); + } + + interp = (gsl_interp *) malloc (sizeof(gsl_interp)); + + if (interp == NULL) + { + GSL_ERROR_NULL ("failed to allocate space for interp struct", + GSL_ENOMEM); + } + + interp->type = T; + interp->size = size; + + if (interp->type->alloc == NULL) + { + interp->state = NULL; + return interp; + } + + interp->state = interp->type->alloc(size); + + if (interp->state == NULL) + { + free (interp); + GSL_ERROR_NULL ("failed to allocate space for interp state", GSL_ENOMEM); + }; + + return interp; +} + +int +gsl_interp_init (gsl_interp * interp, const double x_array[], const double y_array[], size_t size) +{ + size_t i; + + if (size != interp->size) + { + GSL_ERROR ("data must match size of interpolation object", GSL_EINVAL); + } + + for (i = 1; i < size; i++) + { + if (!(x_array[i-1] < x_array[i])) + { + GSL_ERROR ("x values must be monotonically increasing", GSL_EINVAL); + } + } + + interp->xmin = x_array[0]; + interp->xmax = x_array[size - 1]; + + { + int status = interp->type->init(interp->state, x_array, y_array, size); + return status; + } +} + +const char * +gsl_interp_name(const gsl_interp * interp) +{ + return interp->type->name; +} + +unsigned int +gsl_interp_min_size(const gsl_interp * interp) +{ + return interp->type->min_size; +} + +unsigned int +gsl_interp_type_min_size(const gsl_interp_type * T) +{ + return T->min_size; +} + +void +gsl_interp_free (gsl_interp * interp) +{ + RETURN_IF_NULL (interp); + + if (interp->type->free) + interp->type->free (interp->state); + free (interp); +} + + + +int +gsl_interp_eval_e (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, double *y) +{ + if (x < interp->xmin || x > interp->xmax) + { + *y = GSL_NAN; + return GSL_EDOM; + } + + return interp->type->eval (interp->state, xa, ya, interp->size, x, a, y); +} + +double +gsl_interp_eval (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a) +{ + double y; + int status; + + if (x < interp->xmin || x > interp->xmax) + { + GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN); + } + + status = interp->type->eval (interp->state, xa, ya, interp->size, x, a, &y); + + DISCARD_STATUS(status); + + return y; +} + + +int +gsl_interp_eval_deriv_e (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, + double *dydx) +{ + if (x < interp->xmin || x > interp->xmax) + { + *dydx = GSL_NAN; + return GSL_EDOM; + } + + return interp->type->eval_deriv (interp->state, xa, ya, interp->size, x, a, dydx); +} + +double +gsl_interp_eval_deriv (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a) +{ + double dydx; + int status; + + if (x < interp->xmin || x > interp->xmax) + { + GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN); + } + + status = interp->type->eval_deriv (interp->state, xa, ya, interp->size, x, a, &dydx); + + DISCARD_STATUS(status); + + return dydx; +} + + +int +gsl_interp_eval_deriv2_e (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a, + double * d2) +{ + if (x < interp->xmin || x > interp->xmax) + { + *d2 = GSL_NAN; + return GSL_EDOM; + } + + return interp->type->eval_deriv2 (interp->state, xa, ya, interp->size, x, a, d2); +} + +double +gsl_interp_eval_deriv2 (const gsl_interp * interp, + const double xa[], const double ya[], double x, + gsl_interp_accel * a) +{ + double d2; + int status; + + if (x < interp->xmin || x > interp->xmax) + { + GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN); + } + + status = interp->type->eval_deriv2 (interp->state, xa, ya, interp->size, x, a, &d2); + + DISCARD_STATUS(status); + + return d2; +} + + +int +gsl_interp_eval_integ_e (const gsl_interp * interp, + const double xa[], const double ya[], + double a, double b, + gsl_interp_accel * acc, + double * result) +{ + if (a > b || a < interp->xmin || b > interp->xmax) + { + *result = GSL_NAN; + return GSL_EDOM; + } + else if(a == b) + { + *result = 0.0; + return GSL_SUCCESS; + } + + return interp->type->eval_integ (interp->state, xa, ya, interp->size, acc, a, b, result); +} + + +double +gsl_interp_eval_integ (const gsl_interp * interp, + const double xa[], const double ya[], + double a, double b, + gsl_interp_accel * acc) +{ + double result; + int status; + + if (a > b || a < interp->xmin || b > interp->xmax) + { + GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN); + } + else if(a == b) + { + return 0.0; + } + + status = interp->type->eval_integ (interp->state, xa, ya, interp->size, acc, a, b, &result); + + DISCARD_STATUS(status); + + return result; +} + + diff --git a/software/gsl-1.15/interpolation/linear.c b/software/gsl-1.15/interpolation/linear.c new file mode 100644 index 000000000..65ca83ea5 --- /dev/null +++ b/software/gsl-1.15/interpolation/linear.c @@ -0,0 +1,198 @@ +/* interpolation/linear.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include + +static int +linear_init (void * vstate, + const double x_array[], + const double y_array[], + size_t size) +{ + return GSL_SUCCESS; +} + +static +int +linear_eval (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *y) +{ + double x_lo, x_hi; + double y_lo, y_hi; + double dx; + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + x_lo = x_array[index]; + x_hi = x_array[index + 1]; + y_lo = y_array[index]; + y_hi = y_array[index + 1]; + dx = x_hi - x_lo; + if (dx > 0.0) + { + *y = y_lo + (x - x_lo) / dx * (y_hi - y_lo); + return GSL_SUCCESS; + } + else + { + *y = 0.0; + return GSL_EINVAL; + } +} + + +static +int +linear_eval_deriv (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *dydx) +{ + double x_lo, x_hi; + double y_lo, y_hi; + double dx; + double dy; + size_t index; + + if (a != 0) + { + index = gsl_interp_accel_find (a, x_array, size, x); + } + else + { + index = gsl_interp_bsearch (x_array, x, 0, size - 1); + } + + /* evaluate */ + x_lo = x_array[index]; + x_hi = x_array[index + 1]; + y_lo = y_array[index]; + y_hi = y_array[index + 1]; + dx = x_hi - x_lo; + dy = y_hi - y_lo; + if (dx > 0.0) + { + *dydx = dy / dx;; + return GSL_SUCCESS; + } + else + { + *dydx = 0.0; + return GSL_EINVAL; + } +} + + +static +int +linear_eval_deriv2 (const void * vstate, + const double x_array[], const double y_array[], size_t size, + double x, + gsl_interp_accel * a, + double *y_pp) +{ + *y_pp = 0.0; + + return GSL_SUCCESS; +} + + +static +int +linear_eval_integ (const void * vstate, + const double x_array[], const double y_array[], size_t size, + gsl_interp_accel * acc, + double a, double b, + double * result) +{ + size_t i, index_a, index_b; + + if (acc != 0) + { + index_a = gsl_interp_accel_find (acc, x_array, size, a); + index_b = gsl_interp_accel_find (acc, x_array, size, b); + } + else + { + index_a = gsl_interp_bsearch (x_array, a, 0, size - 1); + index_b = gsl_interp_bsearch (x_array, b, 0, size - 1); + } + + /* endpoints span more than one interval */ + + *result = 0.0; + + /* interior intervals */ + for(i=index_a; i<=index_b; i++) { + const double x_hi = x_array[i + 1]; + const double x_lo = x_array[i]; + const double y_lo = y_array[i]; + const double y_hi = y_array[i + 1]; + const double dx = x_hi - x_lo; + + if(dx != 0.0) { + if (i == index_a || i == index_b) + { + double x1 = (i == index_a) ? a : x_lo; + double x2 = (i == index_b) ? b : x_hi; + const double D = (y_hi-y_lo)/dx; + *result += (x2-x1) * (y_lo + 0.5*D*((x2-x_lo)+(x1-x_lo))); + } + else + { + *result += 0.5 * dx * (y_lo + y_hi); + } + } + } + + return GSL_SUCCESS; +} + +static const gsl_interp_type linear_type = +{ + "linear", + 2, + NULL, /* alloc, not applicable */ + &linear_init, + &linear_eval, + &linear_eval_deriv, + &linear_eval_deriv2, + &linear_eval_integ, + NULL, /* free, not applicable */ +}; + +const gsl_interp_type * gsl_interp_linear = &linear_type; diff --git a/software/gsl-1.15/interpolation/poly.c b/software/gsl-1.15/interpolation/poly.c new file mode 100644 index 000000000..6d7853f39 --- /dev/null +++ b/software/gsl-1.15/interpolation/poly.c @@ -0,0 +1,173 @@ +/* interpolation/interp_poly.c + * + * Copyright (C) 2001 DAN, HO-JIN + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +typedef struct +{ + double *d; + double *coeff; + double *work; +} +polynomial_state_t; + +static void * +polynomial_alloc (size_t size) +{ + polynomial_state_t *state = + (polynomial_state_t *) malloc (sizeof (polynomial_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for polynomial state", + GSL_ENOMEM); + } + + state->d = (double *) malloc (sizeof (double) * size); + + if (state->d == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for d", GSL_ENOMEM); + } + + state->coeff = (double *) malloc (sizeof (double) * size); + + if (state->coeff == 0) + { + free (state->d); + free (state); + GSL_ERROR_NULL ("failed to allocate space for d", GSL_ENOMEM); + } + + state->work = (double *) malloc (sizeof (double) * size); + + if (state->work == 0) + { + free (state->coeff); + free (state->d); + free (state); + GSL_ERROR_NULL ("failed to allocate space for d", GSL_ENOMEM); + } + + return state; +} + +static int +polynomial_init (void *vstate, + const double xa[], const double ya[], size_t size) +{ + polynomial_state_t *state = (polynomial_state_t *) vstate; + + int status = gsl_poly_dd_init (state->d, xa, ya, size); + + return status; +} + +static int +polynomial_eval (const void *vstate, + const double xa[], const double ya[], size_t size, double x, + gsl_interp_accel * acc, double *y) +{ + const polynomial_state_t *state = (const polynomial_state_t *) vstate; + + *y = gsl_poly_dd_eval (state->d, xa, size, x); + + return GSL_SUCCESS; +} + + +static int +polynomial_deriv (const void *vstate, + const double xa[], const double ya[], size_t size, double x, + gsl_interp_accel * acc, double *y) +{ + const polynomial_state_t *state = (const polynomial_state_t *) vstate; + + gsl_poly_dd_taylor (state->coeff, x, state->d, xa, size, state->work); + + *y = state->coeff[1]; + + return GSL_SUCCESS; +} + +static int +polynomial_deriv2 (const void *vstate, + const double xa[], const double ya[], size_t size, + double x, gsl_interp_accel * acc, double *y) +{ + const polynomial_state_t *state = (const polynomial_state_t *) vstate; + + gsl_poly_dd_taylor (state->coeff, x, state->d, xa, size, state->work); + + *y = 2.0 * state->coeff[2]; + + return GSL_SUCCESS; +} + +static int +polynomial_integ (const void *vstate, const double xa[], const double ya[], + size_t size, gsl_interp_accel * acc, double a, double b, + double *result) +{ + const polynomial_state_t *state = (const polynomial_state_t *) vstate; + size_t i; + double sum; + + gsl_poly_dd_taylor (state->coeff, 0.0, state->d, xa, size, state->work); + + sum = state->coeff[0] * (b - a); + + for (i = 1; i < size; i++) + { + sum += state->coeff[i] * (pow (b, i + 1) - pow (a, i + 1)) / (i + 1.0); + } + + *result = sum; + + return GSL_SUCCESS; +} + +static void +polynomial_free (void *vstate) +{ + polynomial_state_t *state = (polynomial_state_t *) vstate; + free (state->d); + free (state->coeff); + free (state->work); + free (state); +} + +static const gsl_interp_type polynomial_type = { + "polynomial", + 3, + &polynomial_alloc, + &polynomial_init, + &polynomial_eval, + &polynomial_deriv, + &polynomial_deriv2, + &polynomial_integ, + &polynomial_free, +}; + +const gsl_interp_type *gsl_interp_polynomial = &polynomial_type; diff --git a/software/gsl-1.15/interpolation/spline.c b/software/gsl-1.15/interpolation/spline.c new file mode 100644 index 000000000..3d8605d89 --- /dev/null +++ b/software/gsl-1.15/interpolation/spline.c @@ -0,0 +1,194 @@ +/* interpolation/spline.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_spline * +gsl_spline_alloc (const gsl_interp_type * T, size_t size) +{ + gsl_spline * spline = (gsl_spline *) malloc (sizeof(gsl_spline)); + + if (spline == NULL) + { + GSL_ERROR_NULL ("failed to allocate space for spline struct", + GSL_ENOMEM); + } + + spline->interp = gsl_interp_alloc (T, size); + + if (spline->interp == NULL) + { + free (spline); + GSL_ERROR_NULL ("failed to allocate space for interp", GSL_ENOMEM); + }; + + spline->x = (double *) malloc (size * sizeof(double)); + + if (spline->x == NULL) + { + gsl_interp_free(spline->interp); + free(spline); + GSL_ERROR_NULL ("failed to allocate space for x", GSL_ENOMEM); + } + + spline->y = (double *) malloc (size * sizeof(double)); + + if (spline->y == NULL) + { + free(spline->x); + gsl_interp_free(spline->interp); + free(spline); + GSL_ERROR_NULL ("failed to allocate space for y", GSL_ENOMEM); + } + + spline->size = size; + + return spline; +} + +int +gsl_spline_init (gsl_spline * spline, const double x_array[], const double y_array[], size_t size) +{ + if (size != spline->size) + { + GSL_ERROR ("data must match size of spline object", GSL_EINVAL); + } + + memcpy (spline->x, x_array, size * sizeof(double)); + memcpy (spline->y, y_array, size * sizeof(double)); + + { + int status = gsl_interp_init (spline->interp, x_array, y_array, size); + return status; + } +} + +const char * +gsl_spline_name(const gsl_spline * spline) +{ + return gsl_interp_name(spline->interp); +} + +unsigned int +gsl_spline_min_size(const gsl_spline * spline) +{ + return gsl_interp_min_size(spline->interp); +} + +void +gsl_spline_free (gsl_spline * spline) +{ + RETURN_IF_NULL (spline); + gsl_interp_free (spline->interp); + free (spline->x); + free (spline->y); + free (spline); +} + +int +gsl_spline_eval_e (const gsl_spline * spline, + double x, + gsl_interp_accel * a, double *y) +{ + return gsl_interp_eval_e (spline->interp, + spline->x, spline->y, + x, a, y); +} + +double +gsl_spline_eval (const gsl_spline * spline, + double x, + gsl_interp_accel * a) +{ + return gsl_interp_eval (spline->interp, + spline->x, spline->y, + x, a); +} + + +int +gsl_spline_eval_deriv_e (const gsl_spline * spline, + double x, + gsl_interp_accel * a, + double *dydx) +{ + return gsl_interp_eval_deriv_e (spline->interp, + spline->x, spline->y, + x, a, dydx); +} + +double +gsl_spline_eval_deriv (const gsl_spline * spline, + double x, + gsl_interp_accel * a) +{ + return gsl_interp_eval_deriv (spline->interp, + spline->x, spline->y, + x, a); +} + + +int +gsl_spline_eval_deriv2_e (const gsl_spline * spline, + double x, + gsl_interp_accel * a, + double * d2) +{ + return gsl_interp_eval_deriv2_e (spline->interp, + spline->x, spline->y, + x, a, d2); +} + +double +gsl_spline_eval_deriv2 (const gsl_spline * spline, + double x, + gsl_interp_accel * a) +{ + return gsl_interp_eval_deriv2 (spline->interp, + spline->x, spline->y, + x, a); +} + + +int +gsl_spline_eval_integ_e (const gsl_spline * spline, + double a, double b, + gsl_interp_accel * acc, + double * result) +{ + return gsl_interp_eval_integ_e (spline->interp, + spline->x, spline->y, + a, b, acc, result); +} + + +double +gsl_spline_eval_integ (const gsl_spline * spline, + double a, double b, + gsl_interp_accel * acc) +{ + return gsl_interp_eval_integ (spline->interp, + spline->x, spline->y, + a, b, acc); +} + diff --git a/software/gsl-1.15/interpolation/test.c b/software/gsl-1.15/interpolation/test.c new file mode 100644 index 000000000..5a9e2359a --- /dev/null +++ b/software/gsl-1.15/interpolation/test.c @@ -0,0 +1,987 @@ +/* interpolation/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +test_bsearch(void) +{ + double x_array[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 }; + size_t index_result; + int status = 0; + int s; + + /* check an interior point */ + index_result = gsl_interp_bsearch(x_array, 1.5, 0, 4); + s = (index_result != 1); + status += s; + gsl_test (s, "simple bsearch"); + + /* check that we get the last interval if x == last value */ + index_result = gsl_interp_bsearch(x_array, 4.0, 0, 4); + s = (index_result != 3); + status += s; + gsl_test (s, "upper endpoint bsearch"); + + /* check that we get the first interval if x == first value */ + index_result = gsl_interp_bsearch(x_array, 0.0, 0, 4); + s = (index_result != 0); + status += s; + gsl_test (s, "lower endpoint bsearch"); + + /* check that we get correct interior boundary behaviour */ + index_result = gsl_interp_bsearch(x_array, 2.0, 0, 4); + s = (index_result != 2); + status += s; + gsl_test (s, "degenerate bsearch"); + + /* check out of bounds above */ + index_result = gsl_interp_bsearch(x_array, 10.0, 0, 4); + s = (index_result != 3); + status += s; + gsl_test (s, "out of bounds bsearch +"); + + /* check out of bounds below */ + index_result = gsl_interp_bsearch(x_array, -10.0, 0, 4); + s = (index_result != 0); + status += s; + gsl_test (s, "out of bounds bsearch -"); + + /* Test the accelerator */ + + { + size_t i, j, k1 = 0, k2 = 0; + int t = 0; + double x = 0; + double r[16] = { -0.2, 0.0, 0.1, 0.7, + 1.0, 1.3, 1.9, + 2.0, 2.2, 2.7, + 3.0, 3.1, 3.6, + 4.0, 4.1, 4.9 }; + + gsl_interp_accel *a = gsl_interp_accel_alloc (); + + /* Run through all the pairs of points */ + + while (k1 < 16 && k2 < 16) { + + x = r[t ? k1 : k2]; + t = !t; + + if (t == 0) { + k1 = (k1 + 1) % 16; + if (k1 == 0) k2++; + }; + + i = gsl_interp_accel_find(a, x_array, 5, x); + j = gsl_interp_bsearch(x_array, x, 0, 4); + gsl_test(i != j, "(%u,%u) accelerated lookup vs bsearch (x = %g)", i, j, x); + } + + gsl_interp_accel_free(a); + } + + return status; +} + + + +typedef double TEST_FUNC (double); +typedef struct _xy_table xy_table; + +struct _xy_table + { + double * x; + double * y; + size_t n; + }; + +xy_table make_xy_table (double x[], double y[], size_t n); + +xy_table +make_xy_table (double x[], double y[], size_t n) +{ + xy_table t; + t.x = x; + t.y = y; + t.n = n; + return t; +} + +static int +test_interp ( + const xy_table * data_table, + const gsl_interp_type * T, + xy_table * test_table, + xy_table * test_d_table, + xy_table * test_i_table + ) +{ + int status = 0, s1, s2, s3; + size_t i; + + gsl_interp_accel *a = gsl_interp_accel_alloc (); + gsl_interp *interp = gsl_interp_alloc (T, data_table->n); + + unsigned int min_size = gsl_interp_type_min_size(T); + + gsl_test_int (min_size, T->min_size, "gsl_interp_type_min_size on %s", gsl_interp_name(interp)); + + gsl_interp_init (interp, data_table->x, data_table->y, data_table->n); + + for (i = 0; i < test_table->n; i++) + { + double x = test_table->x[i]; + double y; + double deriv; + double integ; + double diff_y, diff_deriv, diff_integ; + s1 = gsl_interp_eval_e (interp, data_table->x, data_table->y, x, a, &y); + s2 = gsl_interp_eval_deriv_e (interp, data_table->x, data_table->y, x, a, &deriv); + s3 = gsl_interp_eval_integ_e (interp, data_table->x, data_table->y, test_table->x[0], x, a, &integ); + + gsl_test (s1, "gsl_interp_eval_e %s", gsl_interp_name(interp)); + gsl_test (s2, "gsl_interp_eval_deriv_e %s", gsl_interp_name(interp)); + gsl_test (s3, "gsl_interp_eval_integ_e %s", gsl_interp_name(interp)); + + gsl_test_abs (y, test_table->y[i], 1e-10, "%s %d", gsl_interp_name(interp), i); + gsl_test_abs (deriv, test_d_table->y[i], 1e-10, "%s deriv %d", gsl_interp_name(interp), i); + gsl_test_abs (integ, test_i_table->y[i], 1e-10, "%s integ %d", gsl_interp_name(interp), i); + + diff_y = y - test_table->y[i]; + diff_deriv = deriv - test_d_table->y[i]; + diff_integ = integ - test_i_table->y[i]; + if (fabs (diff_y) > 1.e-10 || fabs(diff_deriv) > 1.0e-10 || fabs(diff_integ) > 1.0e-10) { + status++; + } + } + + gsl_interp_accel_free (a); + gsl_interp_free (interp); + + return status; +} + +static int +test_linear (void) +{ + int s; + + double data_x[4] = { 0.0, 1.0, 2.0, 3.0 }; + double data_y[4] = { 0.0, 1.0, 2.0, 3.0 }; + double test_x[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 }; + double test_y[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 }; + double test_dy[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; + double test_iy[6] = { 0.0, 0.125, 0.5, 9.0/8.0, 25.0/8.0, 9.0/2.0 }; + + xy_table data_table = make_xy_table(data_x, data_y, 4); + xy_table test_table = make_xy_table(test_x, test_y, 6); + xy_table test_d_table = make_xy_table(test_x, test_dy, 6); + xy_table test_i_table = make_xy_table(test_x, test_iy, 6); + + s = test_interp (&data_table, gsl_interp_linear, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "linear interpolation"); + return s; +} + +static int +test_polynomial (void) +{ + int s; + + double data_x[4] = { 0.0, 1.0, 2.0, 3.0 }; + double data_y[4] = { 0.0, 1.0, 2.0, 3.0 }; + double test_x[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 }; + double test_y[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 }; + double test_dy[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; + double test_iy[6] = { 0.0, 0.125, 0.5, 9.0/8.0, 25.0/8.0, 9.0/2.0 }; + + xy_table data_table = make_xy_table(data_x, data_y, 4); + xy_table test_table = make_xy_table(test_x, test_y, 6); + xy_table test_d_table = make_xy_table(test_x, test_dy, 6); + xy_table test_i_table = make_xy_table(test_x, test_iy, 6); + + s = test_interp (&data_table, gsl_interp_polynomial, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "polynomial interpolation"); + return s; +} + + +static int +test_cspline (void) +{ + int s; + + double data_x[3] = { 0.0, 1.0, 2.0 }; + double data_y[3] = { 0.0, 1.0, 2.0 }; + double test_x[4] = { 0.0, 0.5, 1.0, 2.0 }; + double test_y[4] = { 0.0, 0.5, 1.0, 2.0 }; + double test_dy[4] = { 1.0, 1.0, 1.0, 1.0 }; + double test_iy[4] = { 0.0, 0.125, 0.5, 2.0 }; + + xy_table data_table = make_xy_table(data_x, data_y, 3); + xy_table test_table = make_xy_table(test_x, test_y, 4); + xy_table test_d_table = make_xy_table(test_x, test_dy, 4); + xy_table test_i_table = make_xy_table(test_x, test_iy, 4); + + s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "cspline interpolation"); + return s; +} + +static int +test_cspline2 (void) +{ + /* Test taken from Young & Gregory, A Survey of Numerical + Mathematics, Vol 1 Chapter 6.8 */ + + int s; + + double data_x[6] = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 }; + + double data_y[6] = { 1.0, + 0.961538461538461, 0.862068965517241, + 0.735294117647059, 0.609756097560976, + 0.500000000000000 } ; + + double test_x[50] = { + 0.00, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, + 0.20, 0.22, 0.24, 0.26, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, + 0.40, 0.42, 0.44, 0.46, 0.48, 0.50, 0.52, 0.54, 0.56, 0.58, + 0.60, 0.62, 0.64, 0.66, 0.68, 0.70, 0.72, 0.74, 0.76, 0.78, + 0.80, 0.82, 0.84, 0.86, 0.88, 0.90, 0.92, 0.94, 0.96, 0.98 }; + + double test_y[50] = { + 1.000000000000000, 0.997583282975581, 0.995079933416512, + 0.992403318788142, 0.989466806555819, 0.986183764184894, + 0.982467559140716, 0.978231558888635, 0.973389130893999, + 0.967853642622158, 0.961538461538461, 0.954382579685350, + 0.946427487413627, 0.937740299651188, 0.928388131325928, + 0.918438097365742, 0.907957312698524, 0.897012892252170, + 0.885671950954575, 0.874001603733634, 0.862068965517241, + 0.849933363488199, 0.837622973848936, 0.825158185056786, + 0.812559385569085, 0.799846963843167, 0.787041308336369, + 0.774162807506023, 0.761231849809467, 0.748268823704033, + 0.735294117647059, 0.722328486073082, 0.709394147325463, + 0.696513685724764, 0.683709685591549, 0.671004731246381, + 0.658421407009825, 0.645982297202442, 0.633709986144797, + 0.621627058157454, 0.609756097560976, 0.598112015427308, + 0.586679029833925, 0.575433685609685, 0.564352527583445, + 0.553412100584061, 0.542588949440392, 0.531859618981294, + 0.521200654035625, 0.510588599432241}; + + double test_dy[50] = { + -0.120113913432180, -0.122279726798445, -0.128777166897241, + -0.139606233728568, -0.154766927292426, -0.174259247588814, + -0.198083194617734, -0.226238768379184, -0.258725968873165, + -0.295544796099676, -0.336695250058719, -0.378333644186652, + -0.416616291919835, -0.451543193258270, -0.483114348201955, + -0.511329756750890, -0.536189418905076, -0.557693334664512, + -0.575841504029200, -0.590633926999137, -0.602070603574326, + -0.611319695518765, -0.619549364596455, -0.626759610807396, + -0.632950434151589, -0.638121834629033, -0.642273812239728, + -0.645406366983674, -0.647519498860871, -0.648613207871319, + -0.648687494015019, -0.647687460711257, -0.645558211379322, + -0.642299746019212, -0.637912064630930, -0.632395167214473, + -0.625749053769843, -0.617973724297039, -0.609069178796061, + -0.599035417266910, -0.587872439709585, -0.576731233416743, + -0.566762785681043, -0.557967096502484, -0.550344165881066, + -0.543893993816790, -0.538616580309654, -0.534511925359660, + -0.531580028966807, -0.529820891131095}; + + double test_iy[50] = { + 0.000000000000000, 0.019975905023535, 0.039902753768792, + 0.059777947259733, 0.079597153869625, 0.099354309321042, + 0.119041616685866, 0.138649546385285, 0.158166836189794, + 0.177580491219196, 0.196875783942601, 0.216036382301310, + 0.235045759060558, 0.253888601161251, 0.272550937842853, + 0.291020140643388, 0.309284923399436, 0.327335342246135, + 0.345162795617181, 0.362760024244829, 0.380121111159890, + 0.397241442753010, 0.414117280448683, 0.430745332379281, + 0.447122714446318, 0.463246950320456, 0.479115971441505, + 0.494728117018421, 0.510082134029305, 0.525177177221407, + 0.540012809111123, 0.554589001813881, 0.568906157172889, + 0.582965126887879, 0.596767214344995, 0.610314174616794, + 0.623608214462242, 0.636651992326715, 0.649448618342004, + 0.662001654326309, 0.674315113784241, 0.686393423540581, + 0.698241001711602, 0.709861835676399, 0.721259443710643, + 0.732436874986582, 0.743396709573044, 0.754141058435429, + 0.764671563435718, 0.774989397332469 }; + + xy_table data_table = make_xy_table(data_x, data_y, 6); + xy_table test_table = make_xy_table(test_x, test_y, 50); + xy_table test_d_table = make_xy_table(test_x, test_dy, 50); + xy_table test_i_table = make_xy_table(test_x, test_iy, 50); + + s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "cspline 1/(1+x^2) interpolation"); + return s; +} + +static int +test_cspline3 (void) +{ + /* This data has been chosen to be random (uneven spacing in x and y) + and the exact cubic spine solution computed using Octave */ + + int s; + + double data_x[7] = { + -1.2139767065644265, + -0.792590494453907, + -0.250954683125019, + 0.665867809951305, + 0.735655088722706, + 0.827622053027153, + 1.426592227816582 + }; + + double data_y[7] = { + -0.00453877449035645, + 0.49763182550668716, + 0.17805472016334534, + 0.40514493733644485, + -0.21595209836959839, + 0.47405586764216423, + 0.46561462432146072 + } ; + + double test_x[19] = { + -1.2139767065644265, + -1.0735146358609200, + -0.9330525651574135, + -0.7925904944539071, + -0.6120452240109444, + -0.4314999535679818, + -0.2509546831250191, + 0.0546528145670890, + 0.3602603122591972, + 0.6658678099513053, + 0.6891302362084388, + 0.7123926624655723, + 0.7356550887227058, + 0.7663107434908548, + 0.7969663982590039, + 0.8276220530271530, + 1.0272787779569625, + 1.2269355028867721, + 1.4265922278165817, + }; + + double test_y[19] = { + -0.00453877449035645, + 0.25816917628390590, + 0.44938881397673230, + 0.49763182550668716, + 0.31389980410075147, + 0.09948951681196887, + 0.17805472016334534, + 1.27633142487980233, + 2.04936553432792001, + 0.40514493733644485, + 0.13322324792901385, + -0.09656315924697809, + -0.21595209836959839, + -0.13551147728045118, + 0.13466779030061801, + 0.47405586764216423, + 1.68064089899304370, + 1.43594739539458649, + 0.46561462432146072 + }; + + double test_dy[19] = { + 1.955137555965937, + 1.700662049790549, + 0.937235531264386, + -0.335141999612553, + -1.401385073563169, + -0.674982149482761, + 1.844066772628670, + 4.202528085784793, + -0.284432022227558, + -11.616813551408383, + -11.272731243226174, + -7.994209291156876, + -1.781247695200491, + 6.373970868827501, + 10.597456848997197, + 10.889210245308570, + 1.803124267866902, + -3.648527318598099, + -5.465744514086432, + }; + + double test_iy[19] = { + 0.000000000000000, + 0.018231117234914, + 0.069178822023139, + 0.137781019634897, + 0.213936442847744, + 0.249280997744777, + 0.267492946016120, + 0.471372708120518, + 1.014473660088477, + 1.477731933018837, + 1.483978291717981, + 1.484256847945450, + 1.480341742628893, + 1.474315901028282, + 1.473972210647307, + 1.483279773396950, + 1.728562698140330, + 2.057796448999396, + 2.253662886537457, + }; + + xy_table data_table = make_xy_table(data_x, data_y, 7); + xy_table test_table = make_xy_table(test_x, test_y, 19); + xy_table test_d_table = make_xy_table(test_x, test_dy, 19); + xy_table test_i_table = make_xy_table(test_x, test_iy, 19); + + s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "cspline arbitrary data interpolation"); + return s; +} + +static int +test_csplinep (void) +{ + /* This data has been chosen to be random (uneven spacing in x and y) + and the exact cubic spine solution computed using Octave */ + + int s; + + double data_x[11] = { + 0.000000000000000, + 0.130153674349869, + 0.164545962312740, + 0.227375461261537, + 0.256465324353657, + 0.372545206874658, + 0.520820016781720, + 0.647654717733075, + 0.753429306654340, + 0.900873984827658, + 1.000000000000000, + }; + + double data_y[11] = { + 0.000000000000000, + 0.729629261832041, + 0.859286331568207, + 0.989913099419008, + 0.999175006262120, + 0.717928599519215, + -0.130443237213363, + -0.800267961158980, + -0.999767873040527, + -0.583333769240853, + -0.000000000000000, + } ; + + double test_x[31] = { + 0.000000000000000, + 0.043384558116623, + 0.086769116233246, + 0.130153674349869, + 0.141617770337492, + 0.153081866325116, + 0.164545962312740, + 0.185489128629005, + 0.206432294945271, + 0.227375461261537, + 0.237072082292243, + 0.246768703322951, + 0.256465324353657, + 0.295158618527324, + 0.333851912700991, + 0.372545206874658, + 0.421970143510346, + 0.471395080146033, + 0.520820016781720, + 0.563098250432172, + 0.605376484082623, + 0.647654717733075, + 0.682912914040164, + 0.718171110347252, + 0.753429306654340, + 0.802577532712113, + 0.851725758769885, + 0.900873984827658, + 0.933915989885105, + 0.966957994942553, + 1.000000000000000 + }; + + double test_y[31] = { + 0.000000000000000, + 0.268657574670719, + 0.517940878523929, + 0.729629261832041, + 0.777012551497867, + 0.820298314554859, + 0.859286331568207, + 0.918833991960315, + 0.962624749226346, + 0.989913099419008, + 0.996756196601349, + 0.999858105635752, + 0.999175006262120, + 0.959248551766306, + 0.863713527741856, + 0.717928599519215, + 0.470065187871106, + 0.177694938589523, + -0.130443237213363, + -0.385093922365765, + -0.613840011545983, + -0.800267961158980, + -0.912498361131651, + -0.980219217412290, + -0.999767873040528, + -0.943635958253643, + -0.800314354800596, + -0.583333769240853, + -0.403689914131666, + -0.206151346799382, + -0.000000000000000 + }; + + double test_dy[31] = { + 6.275761975917336, + 6.039181349093287, + 5.382620652895025, + 4.306079887322550, + 3.957389777282752, + 3.591234754612763, + 3.207614819312586, + 2.473048186927024, + 1.702885029353488, + 0.897125346591982, + 0.513561009477969, + 0.125477545550710, + -0.267125045189792, + -1.773533414873785, + -3.141450982859891, + -4.370877749148106, + -5.562104227060234, + -6.171864888961167, + -6.200159734850907, + -5.781556055213110, + -4.974725570010514, + -3.779668279243120, + -2.569220222282655, + -1.254891157670244, + 0.163318914594122, + 2.074985916277011, + 3.711348850147548, + 5.072407716205733, + 5.754438923510391, + 6.155557010080926, + 6.275761975917336 + }; + + double test_iy[31] = { + 0.000000000000000, + 0.005864903144198, + 0.023030998930796, + 0.050262495763030, + 0.058902457844100, + 0.068062330564832, + 0.077693991819461, + 0.096340576055474, + 0.116070578226521, + 0.136546192283223, + 0.146181187290769, + 0.155864434185569, + 0.165559443629720, + 0.203636318965633, + 0.239075190181586, + 0.269828050745236, + 0.299428805999600, + 0.315560685785616, + 0.316734151903742, + 0.305773798930857, + 0.284537037103156, + 0.254466034797342, + 0.224146112780097, + 0.190643050847000, + 0.155590744566140, + 0.107448508851745, + 0.064263083957312, + 0.029987183298960, + 0.013618510529526, + 0.003506827320794, + 0.000090064010007, + }; + + xy_table data_table = make_xy_table(data_x, data_y, 11); + xy_table test_table = make_xy_table(test_x, test_y, 31); + xy_table test_d_table = make_xy_table(test_x, test_dy, 31); + xy_table test_i_table = make_xy_table(test_x, test_iy, 31); + + s = test_interp (&data_table, gsl_interp_cspline_periodic, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "cspline periodic sine interpolation"); + return s; +} + +static int +test_csplinep2 (void) +{ + /* This data tests the periodic case n=3 */ + + int s; + + double data_x[3] = { + 0.123, + 0.423, + 1.123 + }; + + double data_y[3] = { + 0.456000000000000, + 1.407056516295154, + 0.456000000000000 + } ; + + double test_x[61] = { + 0.123000000000000, + 0.133000000000000, + 0.143000000000000, + 0.153000000000000, + 0.163000000000000, + 0.173000000000000, + 0.183000000000000, + 0.193000000000000, + 0.203000000000000, + 0.213000000000000, + 0.223000000000000, + 0.233000000000000, + 0.243000000000000, + 0.253000000000000, + 0.263000000000000, + 0.273000000000000, + 0.283000000000000, + 0.293000000000000, + 0.303000000000000, + 0.313000000000000, + 0.323000000000000, + 0.333000000000000, + 0.343000000000000, + 0.353000000000000, + 0.363000000000000, + 0.373000000000000, + 0.383000000000000, + 0.393000000000000, + 0.403000000000000, + 0.413000000000000, + 0.423000000000000, + 0.446333333333333, + 0.469666666666667, + 0.493000000000000, + 0.516333333333333, + 0.539666666666667, + 0.563000000000000, + 0.586333333333333, + 0.609666666666667, + 0.633000000000000, + 0.656333333333333, + 0.679666666666667, + 0.703000000000000, + 0.726333333333333, + 0.749666666666667, + 0.773000000000000, + 0.796333333333333, + 0.819666666666667, + 0.843000000000000, + 0.866333333333333, + 0.889666666666667, + 0.913000000000000, + 0.936333333333333, + 0.959666666666667, + 0.983000000000000, + 1.006333333333333, + 1.029666666666667, + 1.053000000000000, + 1.076333333333333, + 1.099666666666667, + 1.123000000000000 + }; + + double test_y[61] = { + 0.456000000000000, + 0.475443822110923, + 0.497423794931967, + 0.521758764840979, + 0.548267578215809, + 0.576769081434305, + 0.607082120874316, + 0.639025542913690, + 0.672418193930275, + 0.707078920301921, + 0.742826568406475, + 0.779479984621787, + 0.816858015325704, + 0.854779506896076, + 0.893063305710751, + 0.931528258147577, + 0.969993210584403, + 1.008277009399078, + 1.046198500969450, + 1.083576531673367, + 1.120229947888679, + 1.155977595993233, + 1.190638322364879, + 1.224030973381464, + 1.255974395420838, + 1.286287434860848, + 1.314788938079344, + 1.341297751454174, + 1.365632721363187, + 1.387612694184230, + 1.407056516295154, + 1.442092968697928, + 1.463321489456714, + 1.471728359403224, + 1.468299859369172, + 1.454022270186272, + 1.429881872686237, + 1.396864947700781, + 1.355957776061616, + 1.308146638600458, + 1.254417816149018, + 1.195757589539010, + 1.133152239602149, + 1.067588047170148, + 1.000051293074719, + 0.931528258147577, + 0.863005223220435, + 0.795468469125006, + 0.729904276693004, + 0.667298926756143, + 0.608638700146136, + 0.554909877694696, + 0.507098740233537, + 0.466191568594372, + 0.433174643608916, + 0.409034246108881, + 0.394756656925981, + 0.391328156891929, + 0.399735026838439, + 0.420963547597225, + 0.456000000000000 + }; + + double test_dy[61] = { + 1.8115362215145774, + 2.0742089736341924, + 2.3187663635386602, + 2.5452083912279826, + 2.7535350567021584, + 2.9437463599611897, + 3.1158423010050744, + 3.2698228798338147, + 3.4056880964474079, + 3.5234379508458549, + 3.6230724430291570, + 3.7045915729973125, + 3.7679953407503231, + 3.8132837462881874, + 3.8404567896109061, + 3.8495144707184790, + 3.8404567896109061, + 3.8132837462881874, + 3.7679953407503231, + 3.7045915729973125, + 3.6230724430291565, + 3.5234379508458549, + 3.4056880964474074, + 3.2698228798338147, + 3.1158423010050749, + 2.9437463599611897, + 2.7535350567021584, + 2.5452083912279830, + 2.3187663635386597, + 2.0742089736341924, + 1.8115362215145772, + 1.1986331332354823, + 0.6279992234583869, + 0.0996344921833026, + -0.3864610605897765, + -0.8302874348608467, + -1.2318446306299125, + -1.5911326478969707, + -1.9081514866620208, + -2.1829011469250670, + -2.4153816286861041, + -2.6055929319451341, + -2.7535350567021584, + -2.8592080029571765, + -2.9226117707101862, + -2.9437463599611893, + -2.9226117707101862, + -2.8592080029571760, + -2.7535350567021593, + -2.6055929319451354, + -2.4153816286861045, + -2.1829011469250656, + -1.9081514866620242, + -1.5911326478969716, + -1.2318446306299160, + -0.8302874348608498, + -0.3864610605897769, + 0.0996344921832995, + 0.6279992234583824, + 1.1986331332354769, + 1.8115362215145772 + }; + + double test_iy[61] = { + 0.000000000000000, + 0.004655030170954, + 0.009517330277919, + 0.014611356059886, + 0.019959751719625, + 0.025583349923681, + 0.031501171802382, + 0.037730426949832, + 0.044286513423914, + 0.051183017746288, + 0.058431714902395, + 0.066042568341453, + 0.074023729976459, + 0.082381540184189, + 0.091120527805195, + 0.100243410143811, + 0.109751092968147, + 0.119642670510092, + 0.129915425465314, + 0.140564828993259, + 0.151584540717153, + 0.162966408723997, + 0.174700469564574, + 0.186774948253444, + 0.199176258268946, + 0.211889001553197, + 0.224895968512091, + 0.238178138015305, + 0.251714677396289, + 0.265482942452275, + 0.279458477444273, + 0.312726362409309, + 0.346648754292945, + 0.380914974633193, + 0.415237358187469, + 0.449351252932597, + 0.483015020064806, + 0.516010033999735, + 0.548140682372425, + 0.579234366037328, + 0.609141499068300, + 0.637735508758604, + 0.664912835620912, + 0.690592933387298, + 0.714718269009247, + 0.737254322657649, + 0.758189587722801, + 0.777535570814405, + 0.795326791761572, + 0.811620783612819, + 0.826498092636068, + 0.840062278318649, + 0.852439913367300, + 0.863780583708163, + 0.874256888486789, + 0.884064440068133, + 0.893421864036559, + 0.902570799195836, + 0.911775897569142, + 0.921324824399059, + 0.931528258147577 + }; + + xy_table data_table = make_xy_table(data_x, data_y, 3); + xy_table test_table = make_xy_table(test_x, test_y, 61); + xy_table test_d_table = make_xy_table(test_x, test_dy, 61); + xy_table test_i_table = make_xy_table(test_x, test_iy, 61); + + s = test_interp (&data_table, gsl_interp_cspline_periodic, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "cspline periodic 3pt interpolation"); + return s; +} + + + +static int +test_akima (void) +{ + int s; + + double data_x[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 }; + double data_y[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 }; + double test_x[4] = { 0.0, 0.5, 1.0, 2.0 }; + double test_y[4] = { 0.0, 0.5, 1.0, 2.0 }; + double test_dy[4] = { 1.0, 1.0, 1.0, 1.0 }; + double test_iy[4] = { 0.0, 0.125, 0.5, 2.0 }; + + xy_table data_table = make_xy_table(data_x, data_y, 5); + xy_table test_table = make_xy_table(test_x, test_y, 4); + xy_table test_d_table = make_xy_table(test_x, test_dy, 4); + xy_table test_i_table = make_xy_table(test_x, test_iy, 4); + + s = test_interp (&data_table, gsl_interp_akima, &test_table, &test_d_table, &test_i_table); + gsl_test (s, "akima interpolation"); + return s; +} + + +int +main (int argc, char **argv) +{ + int status = 0; + + gsl_ieee_env_setup (); + + argc = 0; /* prevent warnings about unused parameters */ + argv = 0; + + status += test_bsearch(); + status += test_linear(); + status += test_polynomial(); + status += test_cspline(); + status += test_cspline2(); + status += test_cspline3(); + status += test_csplinep(); + status += test_csplinep2(); + status += test_akima(); + + exit (gsl_test_summary()); +} diff --git a/software/gsl-1.15/libtool b/software/gsl-1.15/libtool new file mode 100755 index 000000000..2e5a761ef --- /dev/null +++ b/software/gsl-1.15/libtool @@ -0,0 +1,10056 @@ +#! /bin/sh + +# libtool - Provide generalized library-building support services. +# Generated automatically by config.status (gsl) 1.15 +# Libtool was configured on host cosmos.phys.soton.ac.uk: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=2.4 +macro_revision=1.3293 + +# Whether or not to build shared libraries. +build_libtool_libs=no + +# Whether or not to build static libraries. +build_old_libs=yes + +# What type of objects to build. +pic_mode=default + +# Whether or not to optimize for fast installation. +fast_install=needless + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# An echo program that protects backslashes. +ECHO="printf %s\\n" + +# The host system. +host_alias= +host=x86_64-apple-darwin12.2.0 +host_os=darwin12.2.0 + +# The build system. +build_alias= +build=x86_64-apple-darwin12.2.0 +build_os=darwin12.2.0 + +# A sed program that does not truncate output. +SED="/usr/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP="/usr/bin/grep" + +# An ERE matcher. +EGREP="/usr/bin/grep -E" + +# A literal string matcher. +FGREP="/usr/bin/grep -F" + +# A BSD- or MS-compatible name lister. +NM="/opt/local/bin/nm" + +# Whether we need soft or hard links. +LN_S="ln -s" + +# What is the maximum length of a command? +max_cmd_len=196608 + +# Object file suffix (normally "o"). +objext=o + +# Executable file suffix (normally ""). +exeext= + +# whether the shell understands "unset". +lt_unset=unset + +# turn spaces into newlines. +SP2NL="tr \\040 \\012" + +# turn newlines into spaces. +NL2SP="tr \\015\\012 \\040\\040" + +# convert $build file names to $host format. +to_host_file_cmd=func_convert_file_noop + +# convert $build files to toolchain format. +to_tool_file_cmd=func_convert_file_noop + +# An object symbol dumper. +OBJDUMP="false" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd="\$MAGIC_CMD" + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob="" + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob="no" + +# DLL creation program. +DLLTOOL="false" + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd="printf %s\\n" + +# The archiver. +AR="ar" + +# Flags to create an archive. +AR_FLAGS="cru" + +# How to feed a file listing to the archiver. +archiver_list_spec="" + +# A symbol stripping program. +STRIP="strip" + +# Commands used to install an old-style archive. +RANLIB="ranlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=yes + +# A C compiler. +LTCC="cc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BCDEGRST][BCDEGRST]*\\)[ ][ ]*_\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 _\\2 \\2/p' | sed '/ __gnu_lto/d'" + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[BCDEGRST]* .* \\(.*\\)\$/extern char \\1;/p'" + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[BCDEGRST]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p'" + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[BCDEGRST]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[BCDEGRST]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'" + +# Specify filename containing input files for $NM. +nm_file_list_spec="" + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot= + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=file + +# Must we lock files when doing compilation? +need_locks="no" + +# Manifest tool. +MANIFEST_TOOL=":" + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL="dsymutil" + +# Tool to change global to local symbols on Mac OS X. +NMEDIT="nmedit" + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO="lipo" + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL="otool" + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=":" + +# Old archive suffix (normally "a"). +libext=a + +# Shared library suffix (normally ".so"). +shrext_cmds="\`test .\$module = .yes && echo .so || echo .dylib\`" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink="PATH DYLD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Do we need the "lib" prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Library versioning type. +version_type=darwin + +# Shared library runtime path variable. +runpath_var= + +# Shared library path variable. +shlibpath_var=DYLD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=yes + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec="\${libname}\${release}\${major}\$shared_ext \${libname}\$shared_ext" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${major}\$shared_ext" + +# Permission mode override for installation of shared libraries. +install_override_mode="" + +# Command to use after installation of a shared archive. +postinstall_cmds="" + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="" + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval="" + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=no + +# Compile-time system search path for libraries. +sys_lib_search_path_spec="/usr/lib/clang/4.1 /usr/local/lib" + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec="/usr/local/lib /lib /usr/lib" + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Commands to strip libraries. +old_striplib="strip -S" +striplib="strip -x" + + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LTCC \$LTCFLAGS -nostdlib \${wl}-r -o \$output\$reload_objs" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" + +# A language specific compiler. +CC="cc" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" + +# Additional compiler flags for building library objects. +pic_flag=" -fno-common -DPIC" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Compiler flag to prevent dynamic linking. +link_static_flag="" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\`for conv in \$convenience\\\"\\\"; do test -n \\\"\$conv\\\" && new_convenience=\\\"\$new_convenience \${wl}-force_load,\$conv\\\"; done; func_echo_all \\\"\$new_convenience\\\"\`" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring \$single_module" +archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring \$single_module \${wl}-exported_symbols_list,\$output_objdir/\${libname}-symbols.expsym" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags" +module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags \${wl}-exported_symbols_list,\$output_objdir/\${libname}-symbols.expsym" + +# Whether we are building with GNU ld or not. +with_gnu_ld="no" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="\${wl}-undefined \${wl}dynamic_lookup" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="" + +# If ld is used when linking, flag to hardcode $libdir into a binary +# during linking. This must work even if $libdir does not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting ${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=yes + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=yes + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Commands necessary for finishing linking programs. +postlink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# ### END LIBTOOL CONFIG + + +# libtool (GNU libtool) 2.4 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4 +TIMESTAMP="" +package_revision=1.3293 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${EGREP="grep -E"} +: ${FGREP="grep -F"} +: ${GREP="grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} # Extended-shell func_dirname implementation + + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} # Extended-shell func_basename implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} # Extended-shell func_dirname_and_basename implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} # Extended-shell func_stripname implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} +} # Extended-shell func_split_short_opt implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=} +} # Extended-shell func_split_long_opt implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ +eval "${1}+=\${2}" +} # Extended-shell func_append implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}+=\\ \$func_quote_for_eval_result" +} # Extended-shell func_append_quoted implementation + + +# func_arith arithmetic-term... +func_arith () +{ +func_arith_result=$(( $* )) +} # Extended-shell func_arith implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ +func_len_result=${#1} +} # Extended-shell func_len implementation + + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} # Extended-shell func_lo2o implementation + + +# func_xform libobj-or-source +func_xform () +{ +func_xform_result=${1%.*}.lo +} # Extended-shell func_xform implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +preserve_args+=" $opt" + ;; + --no-verbose) + opt_verbose=false +preserve_args+=" $opt" + ;; + --silent|--quiet) + opt_silent=: +preserve_args+=" $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +preserve_args+=" $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +preserve_args+=" $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || preserve_args+=" --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_to_host_path_result+="$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + pie_flag+=" $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + later+=" $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + base_compile+=" $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist+=" $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist+=" $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command+=" -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command+=" -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command+="$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir+="/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + libdirs+=" $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + libs+=" $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds+=" + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog+="$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + files+=" $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog+=" $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + install_shared_prog+=" $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + install_shared_prog+=" -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs+=" $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs+=" $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs+=" $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir+="$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs+=" $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags+=" $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + libtool_args+=" $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command+=" @OUTPUT@" + finalize_command+=" @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command+=" @SYMFILE@" + finalize_command+=" @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles+=" $arg" + else + dlprefiles+=" $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs+=" $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs+=" $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles+=" $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles+=" $pic_object" + prev= + fi + + # A PIC object. + libobjs+=" $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects+=" $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects+=" $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + libobjs+=" $pic_object" + non_pic_objects+=" $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath+=" $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath+=" $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs+=" $arg" + prev= + continue + ;; + xcclinker) + linker_flags+=" $qarg" + compiler_flags+=" $qarg" + prev= + compile_command+=" $qarg" + finalize_command+=" $qarg" + continue + ;; + xcompiler) + compiler_flags+=" $qarg" + prev= + compile_command+=" $qarg" + finalize_command+=" $qarg" + continue + ;; + xlinker) + linker_flags+=" $qarg" + compiler_flags+=" $wl$qarg" + prev= + compile_command+=" $wl$qarg" + finalize_command+=" $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + compile_command+=" $link_static_flag" + finalize_command+=" $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command+=" $arg" + finalize_command+=" $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) deplibs+=" $arg" ;; + *) deplibs+=" -L$dir" ;; + esac + lib_search_path+=" $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath+=":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath+=":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs+=" System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs+=" $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + compiler_flags+=" $arg" + compile_command+=" $arg" + finalize_command+=" $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags+=" $arg" + compile_command+=" $arg" + finalize_command+=" $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags+=" $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath+=" $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg+=" $func_quote_for_eval_result" + compiler_flags+=" $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg+=" $wl$func_quote_for_eval_result" + compiler_flags+=" $wl$func_quote_for_eval_result" + linker_flags+=" $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + compile_command+=" $arg" + finalize_command+=" $arg" + compiler_flags+=" $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs+=" $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles+=" $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles+=" $pic_object" + prev= + fi + + # A PIC object. + libobjs+=" $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects+=" $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects+=" $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + libobjs+=" $pic_object" + non_pic_objects+=" $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs+=" $arg" + old_deplibs+=" $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles+=" $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles+=" $func_resolve_sysroot_result" + prev= + else + deplibs+=" $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command+=" $arg" + finalize_command+=" $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command+=" $arg" + finalize_command+=" $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + libs+=" $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs+=" $pre_post_deps" ;; + esac + pre_post_deps+=" $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs+=" $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags+=" $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags+=" $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags+=" $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath+=" $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles+=" $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles+=" $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags+=" $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles+=" $dlopen" + test -n "$dlpreopen" && dlprefiles+=" $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience+=" $ladir/$objdir/$old_library" + old_convenience+=" $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + tmp_libs+=" $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles+=" $lib $dependency_libs" + else + newdlfiles+=" $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path+=" $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path+=" $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + newdlprefiles+=" $dir/$linklib" + else + newdlprefiles+=" $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs+=" $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles+=" $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs+=" $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles+=" $dir/$dlname" + else + newdlprefiles+=" $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path+=" $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + newlib_search_path+=" $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs+=" $deplib" ;; + esac + fi + tmp_libs+=" $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath+="$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath+=" $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs+=" $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs+=" $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath+=" $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir+=" -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath+="$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath+="$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath+="$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir+=" -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath+=" $temp_xrpath";; + esac;; + *) temp_deplibs+=" $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path+=" $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + specialdeplibs+=" $func_resolve_sysroot_result" ;; + esac + fi + tmp_libs+=" $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags+=" ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags+=" -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path+=" $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs+=" $deplib" ;; + esac + ;; + *) tmp_libs+=" $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs+=" $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs+="$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs+=" $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring+=":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs+=" $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist+=" $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs+=" $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + temp_xrpath+=" -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles+=" $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles+=" $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs+=" System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs+=" -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs+=" $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs+=" $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs+=" $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs+=" $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs+=" $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs+=" -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs+=" $deplib" ;; + esac + ;; + *) new_libs+=" $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_apped perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath+="$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames+=" $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles+=" $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + delfiles+=" $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles+=" $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs+=" $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $convenience + libobjs+=" $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags+=" $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + delfiles+=" $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + delfiles+=" $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + objlist+=" $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles+=" $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles+=" $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs+=" $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated+=" $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command+=" ${wl}-bind_at_load" + finalize_command+=" ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs+=" -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs+=" $deplib" ;; + esac + ;; + *) new_libs+=" $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command+=" $compile_deplibs" + finalize_command+=" $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath+=" $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath+=" $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath+=":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath+=":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs+="$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath+=" $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath+="$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath+="$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs+=" $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $addlibs + oldobjs+=" $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs+=" $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated+=" $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs+=" $gentop/$newobj" + ;; + *) oldobjs+=" $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + objlist+=" $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + newdependency_libs+=" -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + newdependency_libs+=" -R$func_replace_sysroot_result" + ;; + *) newdependency_libs+=" $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles+=" ${lt_sysroot:+=}$libdir/$name" + ;; + *) newdlfiles+=" $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles+=" ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles+=" $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles+=" $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM+=" $arg"; rmforce=yes ;; + -*) RM+=" $arg" ;; + *) files+=" $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) rmdirs+=" $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles+=" $odir/$n" + done + test -n "$old_library" && rmfiles+=" $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && rmfiles+=" $odir/$dlname" ;; + esac + test -n "$libdir" && rmfiles+=" $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles+=" $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles+=" $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles+=" $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles+=" $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles+=" $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles+=" $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles+=" $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/software/gsl-1.15/linalg/.deps/balance.Plo b/software/gsl-1.15/linalg/.deps/balance.Plo new file mode 100644 index 000000000..9c72bf40c --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/balance.Plo @@ -0,0 +1,263 @@ +balance.lo: balance.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/balancemat.Plo b/software/gsl-1.15/linalg/.deps/balancemat.Plo new file mode 100644 index 000000000..f7758c198 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/balancemat.Plo @@ -0,0 +1,263 @@ +balancemat.lo: balancemat.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/bidiag.Plo b/software/gsl-1.15/linalg/.deps/bidiag.Plo new file mode 100644 index 000000000..f1de00558 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/bidiag.Plo @@ -0,0 +1,263 @@ +bidiag.lo: bidiag.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/cholesky.Plo b/software/gsl-1.15/linalg/.deps/cholesky.Plo new file mode 100644 index 000000000..17a966185 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/cholesky.Plo @@ -0,0 +1,262 @@ +cholesky.lo: cholesky.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/choleskyc.Plo b/software/gsl-1.15/linalg/.deps/choleskyc.Plo new file mode 100644 index 000000000..083a5cdc6 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/choleskyc.Plo @@ -0,0 +1,265 @@ +choleskyc.lo: choleskyc.c ../config.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_complex_math.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/linalg/.deps/exponential.Plo b/software/gsl-1.15/linalg/.deps/exponential.Plo new file mode 100644 index 000000000..717586b30 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/exponential.Plo @@ -0,0 +1,264 @@ +exponential.lo: exponential.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_mode.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h gsl_linalg.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +gsl_linalg.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/hermtd.Plo b/software/gsl-1.15/linalg/.deps/hermtd.Plo new file mode 100644 index 000000000..9eac6ed64 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/hermtd.Plo @@ -0,0 +1,266 @@ +hermtd.lo: hermtd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_complex_math.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/hessenberg.Plo b/software/gsl-1.15/linalg/.deps/hessenberg.Plo new file mode 100644 index 000000000..ee74c6024 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/hessenberg.Plo @@ -0,0 +1,218 @@ +hessenberg.lo: hessenberg.c ../config.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_permutation.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/linalg/.deps/hesstri.Plo b/software/gsl-1.15/linalg/.deps/hesstri.Plo new file mode 100644 index 000000000..6099f8962 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/hesstri.Plo @@ -0,0 +1,230 @@ +hesstri.lo: hesstri.c /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../config.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h ../gsl/gsl_permutation.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h givens.c + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../config.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +givens.c: diff --git a/software/gsl-1.15/linalg/.deps/hh.Plo b/software/gsl-1.15/linalg/.deps/hh.Plo new file mode 100644 index 000000000..af0c1615c --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/hh.Plo @@ -0,0 +1,254 @@ +hh.lo: hh.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/householder.Plo b/software/gsl-1.15/linalg/.deps/householder.Plo new file mode 100644 index 000000000..2029286dc --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/householder.Plo @@ -0,0 +1,263 @@ +householder.lo: householder.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/householdercomplex.Plo b/software/gsl-1.15/linalg/.deps/householdercomplex.Plo new file mode 100644 index 000000000..6196dc125 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/householdercomplex.Plo @@ -0,0 +1,267 @@ +householdercomplex.lo: householdercomplex.c ../config.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_complex_math.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/lq.Plo b/software/gsl-1.15/linalg/.deps/lq.Plo new file mode 100644 index 000000000..a21d939c9 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/lq.Plo @@ -0,0 +1,275 @@ +lq.lo: lq.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h \ + givens.c apply_givens.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +givens.c: + +apply_givens.c: diff --git a/software/gsl-1.15/linalg/.deps/lu.Plo b/software/gsl-1.15/linalg/.deps/lu.Plo new file mode 100644 index 000000000..ae27bc2b0 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/lu.Plo @@ -0,0 +1,310 @@ +lu.lo: lu.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/linalg/.deps/luc.Plo b/software/gsl-1.15/linalg/.deps/luc.Plo new file mode 100644 index 000000000..e4e966f33 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/luc.Plo @@ -0,0 +1,313 @@ +luc.lo: luc.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_complex_math.h \ + ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/linalg/.deps/multiply.Plo b/software/gsl-1.15/linalg/.deps/multiply.Plo new file mode 100644 index 000000000..00e27cb7c --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/multiply.Plo @@ -0,0 +1,254 @@ +multiply.lo: multiply.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/linalg/.deps/ptlq.Plo b/software/gsl-1.15/linalg/.deps/ptlq.Plo new file mode 100644 index 000000000..315ec3ad4 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/ptlq.Plo @@ -0,0 +1,314 @@ +ptlq.lo: ptlq.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h givens.c apply_givens.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +givens.c: + +apply_givens.c: diff --git a/software/gsl-1.15/linalg/.deps/qr.Plo b/software/gsl-1.15/linalg/.deps/qr.Plo new file mode 100644 index 000000000..23061b994 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/qr.Plo @@ -0,0 +1,275 @@ +qr.lo: qr.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h \ + givens.c apply_givens.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +givens.c: + +apply_givens.c: diff --git a/software/gsl-1.15/linalg/.deps/qrpt.Plo b/software/gsl-1.15/linalg/.deps/qrpt.Plo new file mode 100644 index 000000000..d5eb8a8d9 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/qrpt.Plo @@ -0,0 +1,314 @@ +qrpt.lo: qrpt.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h givens.c apply_givens.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +givens.c: + +apply_givens.c: diff --git a/software/gsl-1.15/linalg/.deps/svd.Plo b/software/gsl-1.15/linalg/.deps/svd.Plo new file mode 100644 index 000000000..98b8e9faa --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/svd.Plo @@ -0,0 +1,275 @@ +svd.lo: svd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h \ + givens.c svdstep.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +givens.c: + +svdstep.c: diff --git a/software/gsl-1.15/linalg/.deps/symmtd.Plo b/software/gsl-1.15/linalg/.deps/symmtd.Plo new file mode 100644 index 000000000..6b464a41a --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/symmtd.Plo @@ -0,0 +1,263 @@ +symmtd.lo: symmtd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/linalg/.deps/test.Po b/software/gsl-1.15/linalg/.deps/test.Po new file mode 100644 index 000000000..16328bb60 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/test.Po @@ -0,0 +1,310 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_test.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_vector_ulong.h \ + ../gsl/gsl_block_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_vector_uint.h \ + ../gsl/gsl_block_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_blas.h \ + ../gsl/gsl_vector.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_complex_math.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_test.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: diff --git a/software/gsl-1.15/linalg/.deps/tridiag.Plo b/software/gsl-1.15/linalg/.deps/tridiag.Plo new file mode 100644 index 000000000..3904a5687 --- /dev/null +++ b/software/gsl-1.15/linalg/.deps/tridiag.Plo @@ -0,0 +1,221 @@ +tridiag.lo: tridiag.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + tridiag.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_inline.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +tridiag.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/linalg/ChangeLog b/software/gsl-1.15/linalg/ChangeLog new file mode 100644 index 000000000..e3ee74241 --- /dev/null +++ b/software/gsl-1.15/linalg/ChangeLog @@ -0,0 +1,453 @@ +2011-04-15 Brian Gough + + * choleskyc.c (gsl_linalg_complex_cholesky_invert): avoid mixing + declarations and code (C9X) + +2010-06-13 Brian Gough + + * choleskyc.c (gsl_linalg_complex_cholesky_invert): added new + routine for inversion (Huan Wu) + +2010-02-24 Brian Gough + + * svdstep.c (trailing_eigenvalue): compute the implicit shift + value mu robustly + + * svd.c (gsl_linalg_SV_decomp): scale the bidiagonal matrix before + the implicit QR step + + * householder.c (gsl_linalg_householder_transform): handle the + case where the scaling factor is subnormal + +2009-07-04 Brian Gough + + * luc.c (gsl_linalg_complex_LU_solve, gsl_linalg_complex_LU_svx, + gsl_linalg_complex_LU_refine, singular): added check + for singular matrix + +2009-06-28 Brian Gough + + * lu.c (gsl_linalg_LU_solve, gsl_linalg_LU_svx, + gsl_linalg_LU_refine, gsl_linalg_LU_invert, singular): added check + for singular matrix + +2009-06-04 Brian Gough + + * hermtd.c (gsl_linalg_hermtd_unpack): use U as matrix name + instead of Q + +2008-10-20 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): change use of + gsl_coerce_double to macro so it is not called unnecessarily + +2008-08-30 Brian Gough + + * tridiag.c (solve_cyc_tridiag_nonsym): use x_stride when storing + in x[] (fixes bug #24162) + +2008-08-26 Brian Gough + + * test.c (test_QRPT_update_dim): added tests for + gsl_linalg_QRPT_update + + * qrpt.c (gsl_linalg_QRPT_update): handle rectangular matrices + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-04-28 Brian Gough + + * bidiag.c (gsl_linalg_bidiag_unpack, gsl_linalg_bidiag_unpack2): + use new descending loop convention + + * hermtd.c (gsl_linalg_hermtd_unpack): use new descending loop + convention + + * hh.c (gsl_linalg_HH_svx): use new descending loop convention + + * lq.c (gsl_linalg_LQ_vecQ, gsl_linalg_LQ_unpack): use new + descending loop convention + + * qr.c (gsl_linalg_QR_Qvec, gsl_linalg_QR_unpack): use new + descending loop convention + + * svd.c (gsl_linalg_SV_decomp_mod): use new descending loop + convention + + * svdstep.c (chase_out_trailing_zero): use new descending loop + convention + + * symmtd.c (gsl_linalg_symmtd_unpack): use new descending loop + convention + +2008-04-03 Brian Gough + + * qr.c lq.c: removed unused definition of REAL + +2007-08-27 Brian Gough + + * tridiag.c: use GSL_ERROR for failed allocation, signal + GSL_EZERODIV if matrix is not positive definite + +2007-08-17 Brian Gough + + * svd.c (gsl_linalg_SV_decomp): bail out if number of iterations + exceeds 100*N + +2007-08-16 Brian Gough + + * test.c (main): add some svd tests with small values that will + cause underflow in intermediate steps of SVD iteration + +2006-08-14 Brian Gough + + * balancemat.c: balance a general matrix D^-1 A D for rows and + columns + +2006-04-24 Brian Gough + + * svdstep.c apply_givens.c householder.c: perform linear + operations with level-1 blas when compiled with USE_BLAS. + +2006-02-10 Brian Gough + + * cholesky.c (quiet_sqrt): added a quiet_sqrt to allow checking + for positive definiteness without a runtime error + +2005-08-22 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): reorganised convergence + tests to increase robustness in the presence of extended precision + registers. + +2005-06-22 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): increased number of sweeps + to MAX(5*N,12) and track numerical errors for better termination + +2005-02-02 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): changed M + + * qr.c (gsl_linalg_R_svx): added missing function + +2004-09-13 Brian Gough + + * test.c: added tests for LQ, P^TLQ solvers + + * ptlq.c: added support for PA = LQ decompositions + + * lq.c: added support for A = LQ decompositions + +2004-05-30 Brian Gough + + * test.c (test_LU_solve): increase test tolerance to accommodate + gcc-3.3.3 w/ bounds checking + +2004-05-26 Brian Gough + + * householder.c (gsl_linalg_householder_hm): + (gsl_linalg_householder_mh): + (gsl_linalg_householder_hm1): added blas code (but ifdef'd out) + + * test.c (test_SV_decomp_dim): skip NaNs in test + (test_SV_decomp_mod_dim): skip NaNs in test + +2004-04-26 Brian Gough + + * test.c (test_TDN_solve): increased tolerance for tests + (test_TDN_cyc_solve): increased tolerance for tests + +2004-03-15 Brian Gough + + * tridiag.c: (gsl_linalg_solve_symm_tridiag): + (gsl_linalg_solve_tridiag): + (gsl_linalg_solve_symm_cyc_tridiag): + (gsl_linalg_solve_cyc_tridiag): use GSL_ERROR macro to report + errors, make size restrictions tighter (no unused elements allowed + to be passed in). + +2004-03-06 Brian Gough + + * test.c (test_SV_decomp_mod_dim): added tests for SV_decomp_mod + + * svd.c (gsl_linalg_SV_decomp): handle the case N=1 (SVD of a + column vector) + (gsl_linalg_SV_decomp_mod): handle the case N=1 (SVD of a column + vector) + +2004-03-05 Brian Gough + + * test.c (test_SV_decomp): add tests with inf/nan + + * svd.c (gsl_linalg_SV_decomp): handle nans in block reduction + + * balance.c: handle infinity/nan when scaling input matrix + +2003-07-24 Brian Gough + + * tridiag.c (solve_cyc_tridiag_nonsym): fixed declarations of i so + they do not shadow each other + +2003-05-30 Brian Gough + + * householder.c (gsl_linalg_householder_hv): converted to use blas + routines + +2003-05-08 Brian Gough + + * test.c: added tests for QR_QRsolve and QRPT_QRsolve + + * qrpt.c (gsl_linalg_QRPT_QRsolve): fixed dgemv to use CblasTrans + when computing Q^T b + + * qr.c (gsl_linalg_QR_QRsolve): fixed dgemv to use CblasTrans when + computing Q^T b + +Fri Oct 18 17:46:30 2002 Brian Gough + + * householdercomplex.c (gsl_linalg_complex_householder_transform): + return tau = 0 to prevent division by zero for beta_r = 0 + +Mon Aug 12 20:12:55 2002 Brian Gough + + * bidiag.c (gsl_linalg_bidiag_unpack_B): fixed to copy + superdiagonal and not subdiagonal, as was incorrectly done + previously. + +Sun Jun 16 11:57:00 2002 Brian Gough + + * svd.c (gsl_linalg_SV_decomp): keep track of maximum value + correctly when sorting singular values + + * test.c (test_SV_decomp): add 3x3 of SVD + + * svdstep.c (chase_out_intermediate_zero): handle case of dk=0 + (chase_out_trailing_zero): handle case of dn=0 + +Wed Apr 17 20:04:11 2002 Brian Gough + + * tridiag.c (gsl_linalg_solve_tridiag): + (gsl_linalg_solve_cyc_tridiag): added tridiagonal solvers for + non-symmetric case (David Necas ) + +Mon Apr 15 19:55:40 2002 Brian Gough + + * tridiag.c (solve_cyc_tridiag): corrected typographical error in + Engeln-Mullges Algorithm 4.35, step 1.7 (f_(n-1) should be + alpha_(n-1)) + +Thu Sep 13 12:26:17 2001 Brian Gough + + * test.c (test_SV_decomp): added brute force testing of 2x2 svd + + * svdstep.c (svd2): fixed bug where singular values in 2x2 svd + were not ordered correctly. + +Mon Sep 10 22:35:24 2001 Brian Gough + + * test.c (test_LUc_solve): added a test for complex LU + +Tue Sep 4 17:22:58 2001 Brian Gough + + * luc.c: added LU decomposition for complex matrices + +Wed Aug 29 16:34:50 2001 Brian Gough + + * svd.c (gsl_linalg_SV_decomp_jacobi): make sure all singular + vectors are zero, not just first. + + * svdstep.c (svd2): added explicit calculation of 2x2 svd, fixes + bug that prevents convergence. + +Thu Aug 2 18:19:08 2001 Brian Gough + + * svdstep.c (trailing_eigenvalue): chose better value of mu when + dt=0. + +Sun Jul 8 18:03:05 2001 Brian Gough + + * qrpt.c (gsl_linalg_QRPT_decomp): fix bug where null column + caused division by zero in norm-update calculation + +Sun Jul 1 22:43:22 2001 Brian Gough + + * modified to use new-style vector views, affects most + functions + +Wed Jun 20 13:38:24 2001 Brian Gough + + * svd.c (gsl_linalg_SV_decomp): added error checking + +Tue Jun 19 23:19:49 2001 Brian Gough + + * svd.c (gsl_linalg_SV_decomp): Golub-Reinsch svd, has more + deterministic convergence + (gsl_linalg_SV_decomp_mod): Golub-Reinsch with + Preconditioning, much more efficient for M>>N + + * balance.c (gsl_linalg_balance_columns): balances (or + "equilibrates") the columns of a matrix + +Sun Jun 17 21:49:03 2001 Brian Gough + + * givens.c: split out apply_givens functions into separate file + apply_givens.c + +Wed Jun 13 23:41:34 2001 Brian Gough + + * qr.c (gsl_linalg_QR_decomp): simplified reverse loop + + * bidiag.c: bidiagonalisation of a matrix (needed for + Golub-Reinsch SVD) + +Wed Jun 6 12:36:58 2001 Brian Gough + + * householdercomplex.c: split out complex functions into a + separate file to reduce linking dependencies + + * qrpt.c (gsl_linalg_QRPT_decomp): provide workspace as an + argument, to avoid allocating it on each call + (gsl_linalg_QRPT_decomp2): provide workspace as an argument, to + avoid allocating it on each call + + * qr.c (gsl_linalg_QR_decomp): provide workspace as an argument, + to avoid allocating it on each call + +Thu May 17 17:01:45 2001 Brian Gough + + * qr.c (gsl_linalg_QR_lssolve): added least squares solver + +Sat Apr 28 00:39:53 2001 Brian Gough + + * qr.c (gsl_linalg_QR_update): fixed QR update to work correctly + with rectangular matrices where M > N + +Mon Apr 23 10:29:01 2001 Brian Gough + + * tridiag.c: removed EFAULT test since this should only apply to + non-null invalid pointers + +Fri Apr 13 20:43:38 2001 Brian Gough + + * test.c: replaced uses of matmult by dgemm + +Sun Oct 22 13:56:30 2000 Brian Gough + + * householder.c (gsl_linalg_householder_transform): changed calls + to gsl_hypot() to hypot() so that the system function is used in + preference (the configure script will define hypot to gsl_hypot if + hypot is unavailable) + + * svd.c (gsl_linalg_SV_decomp): changed calls to gsl_hypot() to + hypot() + +Sat Oct 21 15:54:56 2000 Brian Gough + + * tridiag.c (solve_tridiag): prevent out-of-bounds array access + for small N (attempt to access element[N-2] when N is 1). + +Tue Sep 19 21:42:13 2000 Brian Gough + + * qrpt.c (gsl_linalg_QRPT_decomp2): added convenience function to + compute q,r unpacked decomposition directly + +Wed Aug 16 19:50:35 2000 Brian Gough + + * svd.c (gsl_linalg_SV_decomp): take more care with singular + values, set the associated vectors to zero + +Sun Aug 13 16:39:40 2000 Brian Gough + + * qrpt.c (gsl_linalg_QRPT_decomp): fixed obvious bug in selection + of column with max norm + +Wed May 31 19:42:59 2000 Brian Gough + + * test.c (test_QR_update): increased tolerances on results to + allow tests to pass with other compilers + +Wed May 3 21:19:45 2000 Brian Gough + + * cholesky.c: added cholesky decomposition/solve from Thomas + Walter. Modified for GSL. + +Fri Apr 28 17:13:00 2000 Brian Gough + + * renamed all matrices to use upper case variable names, e.g. A + +Thu Apr 27 20:31:46 2000 Brian Gough + + * test.c: tightened up accuracy of the decomp test + + * test_la.c: renamed to test.c for consistency + (test_QR_decomp): added the "moler" matrix as a test for SVD + + * svd.c (gsl_linalg_SV_decomp): improved the convergence criterion + for rank deficient case. + +Wed Apr 26 19:37:46 2000 Brian Gough + + * renamed rhs -> b, and solution -> x throughout for consistency + +Mon Apr 24 17:04:52 2000 Brian Gough + + * test_la.c (main): added tests for MxN matrices + + * test_la.c (main): added tests for SV decomposition and solve. + + * svd.c (gsl_linalg_SV_decomp): made use of vector row/column + functions, tidied up the algorithm a bit. Use a standard tolerance + of 10*GSL_DBL_EPSILON. + (gsl_linalg_SV_solve): added a least squares solver + +Sun Apr 23 21:18:04 2000 Brian Gough + + * gsl_linalg.h, svd.c (gsl_linalg_SV_decomp): changed function + name to new naming convention + + * qr.c (gsl_linalg_QR_unpack): fixed index ranges for rectangular + case when unpacking R + +Sat Apr 22 15:05:21 2000 Brian Gough + + * matrix.c: removed, equivalent functions now in matrix directory + +Sat Mar 11 17:36:33 2000 Brian Gough + + * multiply.c: removed _impl from these functions since all the + errors they can return are fatal. + +Wed Feb 16 12:03:00 2000 Brian Gough + + * multiply.c (gsl_la_matmult_mod_impl): fixed error in transposed + matrix memory access, expressions should always be of the form + M->data[i*M->size2 + j] even when i,j are transposed. + + Safer to replace matrix access by gsl_matrix_set and + gsl_matrix_get, which is what I have done now. Shouldn't be any + cost in the production version of the library where we have + inlines and range checking off. + +Tue Feb 15 17:46:19 2000 Brian Gough + + * tridiag.h (solve_cyc_tridiag): fixed typo in header, was + solve_cyctridiag, missing _. + + * converted all functions to use gsl_permutation instead of + gsl_vector_int + +Fri Oct 1 15:51:02 1999 Brian Gough + + * temporary changes resulting from changes to block/vector/matrix + organization + +Fri Aug 6 14:42:23 1999 Brian Gough + + * linalg_simple.c: include to declare memcpy + diff --git a/software/gsl-1.15/linalg/Makefile.am b/software/gsl-1.15/linalg/Makefile.am new file mode 100644 index 000000000..5ff070ae6 --- /dev/null +++ b/software/gsl-1.15/linalg/Makefile.am @@ -0,0 +1,19 @@ +noinst_LTLIBRARIES = libgsllinalg.la + +pkginclude_HEADERS = gsl_linalg.h + +INCLUDES = -I$(top_srcdir) + +libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c lq.c ptlq.c svd.c householder.c householdercomplex.c hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c + +noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + + diff --git a/software/gsl-1.15/linalg/Makefile.in b/software/gsl-1.15/linalg/Makefile.in new file mode 100644 index 000000000..f640e7a77 --- /dev/null +++ b/software/gsl-1.15/linalg/Makefile.in @@ -0,0 +1,690 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = linalg +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgsllinalg_la_LIBADD = +am_libgsllinalg_la_OBJECTS = multiply.lo exponential.lo tridiag.lo \ + lu.lo luc.lo hh.lo qr.lo qrpt.lo lq.lo ptlq.lo svd.lo \ + householder.lo householdercomplex.lo hessenberg.lo hesstri.lo \ + cholesky.lo choleskyc.lo symmtd.lo hermtd.lo bidiag.lo \ + balance.lo balancemat.lo +libgsllinalg_la_OBJECTS = $(am_libgsllinalg_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgsllinalg.la ../blas/libgslblas.la \ + ../cblas/libgslcblas.la ../permutation/libgslpermutation.la \ + ../matrix/libgslmatrix.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../complex/libgslcomplex.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsllinalg_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgsllinalg_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgsllinalg.la +pkginclude_HEADERS = gsl_linalg.h +INCLUDES = -I$(top_srcdir) +libgsllinalg_la_SOURCES = multiply.c exponential.c tridiag.c tridiag.h lu.c luc.c hh.c qr.c qrpt.c lq.c ptlq.c svd.c householder.c householdercomplex.c hessenberg.c hesstri.c cholesky.c choleskyc.c symmtd.c hermtd.c bidiag.c balance.c balancemat.c +noinst_HEADERS = givens.c apply_givens.c svdstep.c tridiag.h +TESTS = $(check_PROGRAMS) +test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu linalg/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu linalg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsllinalg.la: $(libgsllinalg_la_OBJECTS) $(libgsllinalg_la_DEPENDENCIES) + $(LINK) $(libgsllinalg_la_OBJECTS) $(libgsllinalg_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/balance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/balancemat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bidiag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/choleskyc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exponential.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hermtd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hessenberg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hesstri.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/householder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/householdercomplex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/luc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptlq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmtd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tridiag.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/linalg/TODO b/software/gsl-1.15/linalg/TODO new file mode 100644 index 000000000..266bd67a2 --- /dev/null +++ b/software/gsl-1.15/linalg/TODO @@ -0,0 +1,15 @@ +# -*- org -*- +#+CATEGORY: linalg + +* Support M row) */ + +#if USE_BLAS + { + k = GSL_MIN(i,j); + gsl_matrix_view L0 = gsl_matrix_submatrix(L, k, 0, N-k, j+1); + gsl_vector_view Li = gsl_matrix_column(&L0.matrix,i); + gsl_vector_view Lj = gsl_matrix_column(&L0.matrix,j); + gsl_blas_drot(&Li.vector, &Lj.vector, c, -s); + } +#else + for (k = GSL_MIN (i, j); k < N; k++) + { + double lki = gsl_matrix_get (L, k, i); + double lkj = gsl_matrix_get (L, k, j); + gsl_matrix_set (L, k, i, c * lki - s * lkj); + gsl_matrix_set (L, k, j, s * lki + c * lkj); + } +#endif +} + +inline static void +apply_givens_vec (gsl_vector * v, size_t i, size_t j, double c, double s) +{ + /* Apply rotation to vector v' = G^T v */ + + double vi = gsl_vector_get (v, i); + double vj = gsl_vector_get (v, j); + gsl_vector_set (v, i, c * vi - s * vj); + gsl_vector_set (v, j, s * vi + c * vj); +} + diff --git a/software/gsl-1.15/linalg/balance.c b/software/gsl-1.15/linalg/balance.c new file mode 100644 index 000000000..25b76097c --- /dev/null +++ b/software/gsl-1.15/linalg/balance.c @@ -0,0 +1,86 @@ +/* linalg/balance.c + * + * Copyright (C) 2001, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Balance a general matrix by scaling the columns + * + * B = A D + * + * where D is a diagonal matrix + */ + +#include +#include +#include +#include +#include +#include + +#include + +int +gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * D) +{ + const size_t N = A->size2; + size_t j; + + if (D->size != A->size2) + { + GSL_ERROR("length of D must match second dimension of A", GSL_EINVAL); + } + + gsl_vector_set_all (D, 1.0); + + for (j = 0; j < N; j++) + { + gsl_vector_view A_j = gsl_matrix_column (A, j); + + double s = gsl_blas_dasum(&A_j.vector); + + double f = 1.0; + + if (s == 0.0 || !gsl_finite(s)) + { + gsl_vector_set (D, j, f); + continue; + } + + /* FIXME: we could use frexp() here */ + + while (s > 1.0) + { + s /= 2.0; + f *= 2.0; + } + + while (s < 0.5) + { + s *= 2.0; + f /= 2.0; + } + + gsl_vector_set (D, j, f); + + if (f != 1.0) + { + gsl_blas_dscal(1.0/f, &A_j.vector); + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/linalg/balancemat.c b/software/gsl-1.15/linalg/balancemat.c new file mode 100644 index 000000000..f07b1df37 --- /dev/null +++ b/software/gsl-1.15/linalg/balancemat.c @@ -0,0 +1,186 @@ +/* linalg/balance.c + * + * Copyright (C) 2006 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Balance a general matrix by scaling the rows and columns, so the + * new row and column norms are the same order of magnitude. + * + * B = D^-1 A D + * + * where D is a diagonal matrix + * + * This is necessary for the unsymmetric eigenvalue problem since the + * calculation can become numerically unstable for unbalanced + * matrices. + * + * See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 7.5.7 + * and Wilkinson & Reinsch, "Handbook for Automatic Computation", II/11 p320. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#define FLOAT_RADIX 2.0 +#define FLOAT_RADIX_SQ (FLOAT_RADIX * FLOAT_RADIX) + +int +gsl_linalg_balance_matrix(gsl_matrix * A, gsl_vector * D) +{ + const size_t N = A->size1; + + if (N != D->size) + { + GSL_ERROR ("vector must match matrix size", GSL_EBADLEN); + } + else + { + double row_norm, + col_norm; + int not_converged; + gsl_vector_view v; + + /* initialize D to the identity matrix */ + gsl_vector_set_all(D, 1.0); + + not_converged = 1; + + while (not_converged) + { + size_t i, j; + double g, f, s; + + not_converged = 0; + + for (i = 0; i < N; ++i) + { + row_norm = 0.0; + col_norm = 0.0; + + for (j = 0; j < N; ++j) + { + if (j != i) + { + col_norm += fabs(gsl_matrix_get(A, j, i)); + row_norm += fabs(gsl_matrix_get(A, i, j)); + } + } + + if ((col_norm == 0.0) || (row_norm == 0.0)) + { + continue; + } + + g = row_norm / FLOAT_RADIX; + f = 1.0; + s = col_norm + row_norm; + + /* + * find the integer power of the machine radix which + * comes closest to balancing the matrix + */ + while (col_norm < g) + { + f *= FLOAT_RADIX; + col_norm *= FLOAT_RADIX_SQ; + } + + g = row_norm * FLOAT_RADIX; + + while (col_norm > g) + { + f /= FLOAT_RADIX; + col_norm /= FLOAT_RADIX_SQ; + } + + if ((row_norm + col_norm) < 0.95 * s * f) + { + not_converged = 1; + + g = 1.0 / f; + + /* + * apply similarity transformation D, where + * D_{ij} = f_i * delta_{ij} + */ + + /* multiply by D^{-1} on the left */ + v = gsl_matrix_row(A, i); + gsl_blas_dscal(g, &v.vector); + + /* multiply by D on the right */ + v = gsl_matrix_column(A, i); + gsl_blas_dscal(f, &v.vector); + + /* keep track of transformation */ + gsl_vector_set(D, i, gsl_vector_get(D, i) * f); + } + } + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_balance_matrix() */ + +/* +gsl_linalg_balance_accum() + Accumulate a balancing transformation into a matrix. +This is used during the computation of Schur vectors since the +Schur vectors computed are the vectors for the balanced matrix. +We must at some point accumulate the balancing transformation into +the Schur vector matrix to get the vectors for the original matrix. + +A -> D A + +where D is the diagonal matrix + +Inputs: A - matrix to transform + D - vector containing diagonal elements of D +*/ + +int +gsl_linalg_balance_accum(gsl_matrix *A, gsl_vector *D) +{ + const size_t N = A->size1; + + if (N != D->size) + { + GSL_ERROR ("vector must match matrix size", GSL_EBADLEN); + } + else + { + size_t i; + double s; + gsl_vector_view r; + + for (i = 0; i < N; ++i) + { + s = gsl_vector_get(D, i); + r = gsl_matrix_row(A, i); + + gsl_blas_dscal(s, &r.vector); + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_balance_accum() */ diff --git a/software/gsl-1.15/linalg/bidiag.c b/software/gsl-1.15/linalg/bidiag.c new file mode 100644 index 000000000..0884fb910 --- /dev/null +++ b/software/gsl-1.15/linalg/bidiag.c @@ -0,0 +1,364 @@ +/* linalg/bidiag.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Factorise a matrix A into + * + * A = U B V^T + * + * where U and V are orthogonal and B is upper bidiagonal. + * + * On exit, B is stored in the diagonal and first superdiagonal of A. + * + * U is stored as a packed set of Householder transformations in the + * lower triangular part of the input matrix below the diagonal. + * + * V is stored as a packed set of Householder transformations in the + * upper triangular part of the input matrix above the first + * superdiagonal. + * + * The full matrix for U can be obtained as the product + * + * U = U_1 U_2 .. U_N + * + * where + * + * U_i = (I - tau_i * u_i * u_i') + * + * and where u_i is a Householder vector + * + * u_i = [0, .. , 0, 1, A(i+1,i), A(i+3,i), .. , A(M,i)] + * + * The full matrix for V can be obtained as the product + * + * V = V_1 V_2 .. V_(N-2) + * + * where + * + * V_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [0, .. , 0, 1, A(i,i+2), A(i,i+3), .. , A(i,N)] + * + * See Golub & Van Loan, "Matrix Computations" (3rd ed), Algorithm 5.4.2 + * + * Note: this description uses 1-based indices. The code below uses + * 0-based indices + */ + +#include +#include +#include +#include +#include +#include + +#include + +int +gsl_linalg_bidiag_decomp (gsl_matrix * A, gsl_vector * tau_U, gsl_vector * tau_V) +{ + if (A->size1 < A->size2) + { + GSL_ERROR ("bidiagonal decomposition requires M>=N", GSL_EBADLEN); + } + else if (tau_U->size != A->size2) + { + GSL_ERROR ("size of tau_U must be N", GSL_EBADLEN); + } + else if (tau_V->size + 1 != A->size2) + { + GSL_ERROR ("size of tau_V must be (N - 1)", GSL_EBADLEN); + } + else + { + const size_t M = A->size1; + const size_t N = A->size2; + size_t i; + + for (i = 0 ; i < N; i++) + { + /* Apply Householder transformation to current column */ + + { + gsl_vector_view c = gsl_matrix_column (A, i); + gsl_vector_view v = gsl_vector_subvector (&c.vector, i, M - i); + double tau_i = gsl_linalg_householder_transform (&v.vector); + + /* Apply the transformation to the remaining columns */ + + if (i + 1 < N) + { + gsl_matrix_view m = + gsl_matrix_submatrix (A, i, i + 1, M - i, N - (i + 1)); + gsl_linalg_householder_hm (tau_i, &v.vector, &m.matrix); + } + + gsl_vector_set (tau_U, i, tau_i); + + } + + /* Apply Householder transformation to current row */ + + if (i + 1 < N) + { + gsl_vector_view r = gsl_matrix_row (A, i); + gsl_vector_view v = gsl_vector_subvector (&r.vector, i + 1, N - (i + 1)); + double tau_i = gsl_linalg_householder_transform (&v.vector); + + /* Apply the transformation to the remaining rows */ + + if (i + 1 < M) + { + gsl_matrix_view m = + gsl_matrix_submatrix (A, i+1, i+1, M - (i+1), N - (i+1)); + gsl_linalg_householder_mh (tau_i, &v.vector, &m.matrix); + } + + gsl_vector_set (tau_V, i, tau_i); + } + } + } + + return GSL_SUCCESS; +} + +/* Form the orthogonal matrices U, V, diagonal d and superdiagonal sd + from the packed bidiagonal matrix A */ + +int +gsl_linalg_bidiag_unpack (const gsl_matrix * A, + const gsl_vector * tau_U, + gsl_matrix * U, + const gsl_vector * tau_V, + gsl_matrix * V, + gsl_vector * diag, + gsl_vector * superdiag) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + const size_t K = GSL_MIN(M, N); + + if (M < N) + { + GSL_ERROR ("matrix A must have M >= N", GSL_EBADLEN); + } + else if (tau_U->size != K) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (tau_V->size + 1 != K) + { + GSL_ERROR ("size of tau must be MIN(M,N) - 1", GSL_EBADLEN); + } + else if (U->size1 != M || U->size2 != N) + { + GSL_ERROR ("size of U must be M x N", GSL_EBADLEN); + } + else if (V->size1 != N || V->size2 != N) + { + GSL_ERROR ("size of V must be N x N", GSL_EBADLEN); + } + else if (diag->size != K) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (superdiag->size + 1 != K) + { + GSL_ERROR ("size of subdiagonal must be (diagonal size - 1)", GSL_EBADLEN); + } + else + { + size_t i, j; + + /* Copy diagonal into diag */ + + for (i = 0; i < N; i++) + { + double Aii = gsl_matrix_get (A, i, i); + gsl_vector_set (diag, i, Aii); + } + + /* Copy superdiagonal into superdiag */ + + for (i = 0; i < N - 1; i++) + { + double Aij = gsl_matrix_get (A, i, i+1); + gsl_vector_set (superdiag, i, Aij); + } + + /* Initialize V to the identity */ + + gsl_matrix_set_identity (V); + + for (i = N - 1; i-- > 0;) + { + /* Householder row transformation to accumulate V */ + gsl_vector_const_view r = gsl_matrix_const_row (A, i); + gsl_vector_const_view h = + gsl_vector_const_subvector (&r.vector, i + 1, N - (i+1)); + + double ti = gsl_vector_get (tau_V, i); + + gsl_matrix_view m = + gsl_matrix_submatrix (V, i + 1, i + 1, N-(i+1), N-(i+1)); + + gsl_linalg_householder_hm (ti, &h.vector, &m.matrix); + } + + /* Initialize U to the identity */ + + gsl_matrix_set_identity (U); + + for (j = N; j-- > 0;) + { + /* Householder column transformation to accumulate U */ + gsl_vector_const_view c = gsl_matrix_const_column (A, j); + gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, j, M - j); + double tj = gsl_vector_get (tau_U, j); + + gsl_matrix_view m = + gsl_matrix_submatrix (U, j, j, M-j, N-j); + + gsl_linalg_householder_hm (tj, &h.vector, &m.matrix); + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_bidiag_unpack2 (gsl_matrix * A, + gsl_vector * tau_U, + gsl_vector * tau_V, + gsl_matrix * V) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + const size_t K = GSL_MIN(M, N); + + if (M < N) + { + GSL_ERROR ("matrix A must have M >= N", GSL_EBADLEN); + } + else if (tau_U->size != K) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (tau_V->size + 1 != K) + { + GSL_ERROR ("size of tau must be MIN(M,N) - 1", GSL_EBADLEN); + } + else if (V->size1 != N || V->size2 != N) + { + GSL_ERROR ("size of V must be N x N", GSL_EBADLEN); + } + else + { + size_t i, j; + + /* Initialize V to the identity */ + + gsl_matrix_set_identity (V); + + for (i = N - 1; i-- > 0;) + { + /* Householder row transformation to accumulate V */ + gsl_vector_const_view r = gsl_matrix_const_row (A, i); + gsl_vector_const_view h = + gsl_vector_const_subvector (&r.vector, i + 1, N - (i+1)); + + double ti = gsl_vector_get (tau_V, i); + + gsl_matrix_view m = + gsl_matrix_submatrix (V, i + 1, i + 1, N-(i+1), N-(i+1)); + + gsl_linalg_householder_hm (ti, &h.vector, &m.matrix); + } + + /* Copy superdiagonal into tau_v */ + + for (i = 0; i < N - 1; i++) + { + double Aij = gsl_matrix_get (A, i, i+1); + gsl_vector_set (tau_V, i, Aij); + } + + /* Allow U to be unpacked into the same memory as A, copy + diagonal into tau_U */ + + for (j = N; j-- > 0;) + { + /* Householder column transformation to accumulate U */ + double tj = gsl_vector_get (tau_U, j); + double Ajj = gsl_matrix_get (A, j, j); + gsl_matrix_view m = gsl_matrix_submatrix (A, j, j, M-j, N-j); + + gsl_vector_set (tau_U, j, Ajj); + gsl_linalg_householder_hm1 (tj, &m.matrix); + } + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_bidiag_unpack_B (const gsl_matrix * A, + gsl_vector * diag, + gsl_vector * superdiag) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + const size_t K = GSL_MIN(M, N); + + if (diag->size != K) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (superdiag->size + 1 != K) + { + GSL_ERROR ("size of subdiagonal must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + size_t i; + + /* Copy diagonal into diag */ + + for (i = 0; i < K; i++) + { + double Aii = gsl_matrix_get (A, i, i); + gsl_vector_set (diag, i, Aii); + } + + /* Copy superdiagonal into superdiag */ + + for (i = 0; i < K - 1; i++) + { + double Aij = gsl_matrix_get (A, i, i+1); + gsl_vector_set (superdiag, i, Aij); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/cholesky.c b/software/gsl-1.15/linalg/cholesky.c new file mode 100644 index 000000000..8519fdce7 --- /dev/null +++ b/software/gsl-1.15/linalg/cholesky.c @@ -0,0 +1,358 @@ +/* Cholesky Decomposition + * + * Copyright (C) 2000 Thomas Walter + * + * 03 May 2000: Modified for GSL by Brian Gough + * 29 Jul 2005: Additions by Gerard Jungman + * Copyright (C) 2000,2001, 2002, 2003, 2005, 2007 Brian Gough, Gerard Jungman + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/* + * Cholesky decomposition of a symmetrix positive definite matrix. + * This is useful to solve the matrix arising in + * periodic cubic splines + * approximating splines + * + * This algorithm does: + * A = L * L' + * with + * L := lower left triangle matrix + * L' := the transposed form of L. + * + */ + +#include + +#include +#include +#include +#include +#include +#include + +static inline +double +quiet_sqrt (double x) + /* avoids runtime error, for checking matrix for positive definiteness */ +{ + return (x >= 0) ? sqrt(x) : GSL_NAN; +} + +int +gsl_linalg_cholesky_decomp (gsl_matrix * A) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (M != N) + { + GSL_ERROR("cholesky decomposition requires square matrix", GSL_ENOTSQR); + } + else + { + size_t i,j,k; + int status = 0; + + /* Do the first 2 rows explicitly. It is simple, and faster. And + * one can return if the matrix has only 1 or 2 rows. + */ + + double A_00 = gsl_matrix_get (A, 0, 0); + + double L_00 = quiet_sqrt(A_00); + + if (A_00 <= 0) + { + status = GSL_EDOM ; + } + + gsl_matrix_set (A, 0, 0, L_00); + + if (M > 1) + { + double A_10 = gsl_matrix_get (A, 1, 0); + double A_11 = gsl_matrix_get (A, 1, 1); + + double L_10 = A_10 / L_00; + double diag = A_11 - L_10 * L_10; + double L_11 = quiet_sqrt(diag); + + if (diag <= 0) + { + status = GSL_EDOM; + } + + gsl_matrix_set (A, 1, 0, L_10); + gsl_matrix_set (A, 1, 1, L_11); + } + + for (k = 2; k < M; k++) + { + double A_kk = gsl_matrix_get (A, k, k); + + for (i = 0; i < k; i++) + { + double sum = 0; + + double A_ki = gsl_matrix_get (A, k, i); + double A_ii = gsl_matrix_get (A, i, i); + + gsl_vector_view ci = gsl_matrix_row (A, i); + gsl_vector_view ck = gsl_matrix_row (A, k); + + if (i > 0) { + gsl_vector_view di = gsl_vector_subvector(&ci.vector, 0, i); + gsl_vector_view dk = gsl_vector_subvector(&ck.vector, 0, i); + + gsl_blas_ddot (&di.vector, &dk.vector, &sum); + } + + A_ki = (A_ki - sum) / A_ii; + gsl_matrix_set (A, k, i, A_ki); + } + + { + gsl_vector_view ck = gsl_matrix_row (A, k); + gsl_vector_view dk = gsl_vector_subvector (&ck.vector, 0, k); + + double sum = gsl_blas_dnrm2 (&dk.vector); + double diag = A_kk - sum * sum; + + double L_kk = quiet_sqrt(diag); + + if (diag <= 0) + { + status = GSL_EDOM; + } + + gsl_matrix_set (A, k, k, L_kk); + } + } + + /* Now copy the transposed lower triangle to the upper triangle, + * the diagonal is common. + */ + + for (i = 1; i < M; i++) + { + for (j = 0; j < i; j++) + { + double A_ij = gsl_matrix_get (A, i, j); + gsl_matrix_set (A, j, i, A_ij); + } + } + + if (status == GSL_EDOM) + { + GSL_ERROR ("matrix must be positive definite", GSL_EDOM); + } + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_cholesky_solve (const gsl_matrix * LLT, + const gsl_vector * b, + gsl_vector * x) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (LLT->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LLT->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve for c using forward-substitution, L c = b */ + + gsl_blas_dtrsv (CblasLower, CblasNoTrans, CblasNonUnit, LLT, x); + + /* Perform back-substitution, U x = c */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, LLT, x); + + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_cholesky_svx (const gsl_matrix * LLT, + gsl_vector * x) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (LLT->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Solve for c using forward-substitution, L c = b */ + + gsl_blas_dtrsv (CblasLower, CblasNoTrans, CblasNonUnit, LLT, x); + + /* Perform back-substitution, U x = c */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, LLT, x); + + return GSL_SUCCESS; + } +} + +/* +gsl_linalg_cholesky_invert() + Compute the inverse of a symmetric positive definite matrix in +Cholesky form. + +Inputs: LLT - matrix in cholesky form on input + A^{-1} = L^{-t} L^{-1} on output + +Return: success or error +*/ + +int +gsl_linalg_cholesky_invert(gsl_matrix * LLT) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else + { + size_t N = LLT->size1; + size_t i, j; + double sum; + gsl_vector_view v1, v2; + + /* invert the lower triangle of LLT */ + for (i = 0; i < N; ++i) + { + double ajj; + + j = N - i - 1; + + gsl_matrix_set(LLT, j, j, 1.0 / gsl_matrix_get(LLT, j, j)); + ajj = -gsl_matrix_get(LLT, j, j); + + if (j < N - 1) + { + gsl_matrix_view m; + + m = gsl_matrix_submatrix(LLT, j + 1, j + 1, + N - j - 1, N - j - 1); + v1 = gsl_matrix_subcolumn(LLT, j, j + 1, N - j - 1); + + gsl_blas_dtrmv(CblasLower, CblasNoTrans, CblasNonUnit, + &m.matrix, &v1.vector); + + gsl_blas_dscal(ajj, &v1.vector); + } + } /* for (i = 0; i < N; ++i) */ + + /* + * The lower triangle of LLT now contains L^{-1}. Now compute + * A^{-1} = L^{-t} L^{-1} + * + * The (ij) element of A^{-1} is column i of L^{-1} dotted into + * column j of L^{-1} + */ + + for (i = 0; i < N; ++i) + { + for (j = i + 1; j < N; ++j) + { + v1 = gsl_matrix_subcolumn(LLT, i, j, N - j); + v2 = gsl_matrix_subcolumn(LLT, j, j, N - j); + + /* compute Ainv_{ij} = sum_k Linv_{ki} Linv_{kj} */ + gsl_blas_ddot(&v1.vector, &v2.vector, &sum); + + /* store in upper triangle */ + gsl_matrix_set(LLT, i, j, sum); + } + + /* now compute the diagonal element */ + v1 = gsl_matrix_subcolumn(LLT, i, i, N - i); + gsl_blas_ddot(&v1.vector, &v1.vector, &sum); + gsl_matrix_set(LLT, i, i, sum); + } + + /* copy the transposed upper triangle to the lower triangle */ + + for (j = 1; j < N; j++) + { + for (i = 0; i < j; i++) + { + double A_ij = gsl_matrix_get (LLT, i, j); + gsl_matrix_set (LLT, j, i, A_ij); + } + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_cholesky_invert() */ + +int +gsl_linalg_cholesky_decomp_unit(gsl_matrix * A, gsl_vector * D) +{ + const size_t N = A->size1; + size_t i, j; + + /* initial Cholesky */ + int stat_chol = gsl_linalg_cholesky_decomp(A); + + if(stat_chol == GSL_SUCCESS) + { + /* calculate D from diagonal part of initial Cholesky */ + for(i = 0; i < N; ++i) + { + const double C_ii = gsl_matrix_get(A, i, i); + gsl_vector_set(D, i, C_ii*C_ii); + } + + /* multiply initial Cholesky by 1/sqrt(D) on the right */ + for(i = 0; i < N; ++i) + { + for(j = 0; j < N; ++j) + { + gsl_matrix_set(A, i, j, gsl_matrix_get(A, i, j) / sqrt(gsl_vector_get(D, j))); + } + } + + /* Because the initial Cholesky contained both L and transpose(L), + the result of the multiplication is not symmetric anymore; + but the lower triangle _is_ correct. Therefore we reflect + it to the upper triangle and declare victory. + */ + for(i = 0; i < N; ++i) + for(j = i + 1; j < N; ++j) + gsl_matrix_set(A, i, j, gsl_matrix_get(A, j, i)); + } + + return stat_chol; +} diff --git a/software/gsl-1.15/linalg/choleskyc.c b/software/gsl-1.15/linalg/choleskyc.c new file mode 100644 index 000000000..9cff18f5f --- /dev/null +++ b/software/gsl-1.15/linalg/choleskyc.c @@ -0,0 +1,322 @@ +/* linalg/choleskyc.c + * + * Copyright (C) 2007 Patrick Alken + * Copyright (C) 2010 Huan Wu (gsl_linalg_complex_cholesky_invert) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This module contains routines related to the Cholesky decomposition + * of a complex Hermitian positive definite matrix. + */ + +static void cholesky_complex_conj_vector(gsl_vector_complex *v); + +/* +gsl_linalg_complex_cholesky_decomp() + Perform the Cholesky decomposition on a Hermitian positive definite +matrix. See Golub & Van Loan, "Matrix Computations" (3rd ed), +algorithm 4.2.2. + +Inputs: A - (input/output) complex postive definite matrix + +Return: success or error + +The lower triangle of A is overwritten with the Cholesky decomposition +*/ + +int +gsl_linalg_complex_cholesky_decomp(gsl_matrix_complex *A) +{ + const size_t N = A->size1; + + if (N != A->size2) + { + GSL_ERROR("cholesky decomposition requires square matrix", GSL_ENOTSQR); + } + else + { + size_t i, j; + gsl_complex z; + double ajj; + + for (j = 0; j < N; ++j) + { + z = gsl_matrix_complex_get(A, j, j); + ajj = GSL_REAL(z); + + if (j > 0) + { + gsl_vector_complex_const_view aj = + gsl_matrix_complex_const_subrow(A, j, 0, j); + + gsl_blas_zdotc(&aj.vector, &aj.vector, &z); + ajj -= GSL_REAL(z); + } + + if (ajj <= 0.0) + { + GSL_ERROR("matrix is not positive definite", GSL_EDOM); + } + + ajj = sqrt(ajj); + GSL_SET_COMPLEX(&z, ajj, 0.0); + gsl_matrix_complex_set(A, j, j, z); + + if (j < N - 1) + { + gsl_vector_complex_view av = + gsl_matrix_complex_subcolumn(A, j, j + 1, N - j - 1); + + if (j > 0) + { + gsl_vector_complex_view aj = + gsl_matrix_complex_subrow(A, j, 0, j); + gsl_matrix_complex_view am = + gsl_matrix_complex_submatrix(A, j + 1, 0, N - j - 1, j); + + cholesky_complex_conj_vector(&aj.vector); + + gsl_blas_zgemv(CblasNoTrans, + GSL_COMPLEX_NEGONE, + &am.matrix, + &aj.vector, + GSL_COMPLEX_ONE, + &av.vector); + + cholesky_complex_conj_vector(&aj.vector); + } + + gsl_blas_zdscal(1.0 / ajj, &av.vector); + } + } + + /* Now store L^H in upper triangle */ + for (i = 1; i < N; ++i) + { + for (j = 0; j < i; ++j) + { + z = gsl_matrix_complex_get(A, i, j); + gsl_matrix_complex_set(A, j, i, gsl_complex_conjugate(z)); + } + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_complex_cholesky_decomp() */ + +/* +gsl_linalg_complex_cholesky_solve() + Solve A x = b where A is in cholesky form +*/ + +int +gsl_linalg_complex_cholesky_solve (const gsl_matrix_complex * cholesky, + const gsl_vector_complex * b, + gsl_vector_complex * x) +{ + if (cholesky->size1 != cholesky->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (cholesky->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (cholesky->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + gsl_vector_complex_memcpy (x, b); + + /* solve for y using forward-substitution, L y = b */ + + gsl_blas_ztrsv (CblasLower, CblasNoTrans, CblasNonUnit, cholesky, x); + + /* perform back-substitution, L^H x = y */ + + gsl_blas_ztrsv (CblasLower, CblasConjTrans, CblasNonUnit, cholesky, x); + + return GSL_SUCCESS; + } +} /* gsl_linalg_complex_cholesky_solve() */ + +/* +gsl_linalg_complex_cholesky_svx() + Solve A x = b in place where A is in cholesky form +*/ + +int +gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * cholesky, + gsl_vector_complex * x) +{ + if (cholesky->size1 != cholesky->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (cholesky->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* solve for y using forward-substitution, L y = b */ + + gsl_blas_ztrsv (CblasLower, CblasNoTrans, CblasNonUnit, cholesky, x); + + /* perform back-substitution, L^H x = y */ + + gsl_blas_ztrsv (CblasLower, CblasConjTrans, CblasNonUnit, cholesky, x); + + return GSL_SUCCESS; + } +} /* gsl_linalg_complex_cholesky_svx() */ + + +/****************************************************************************** + +gsl_linalg_complex_cholesky_invert() + Compute the inverse of an Hermitian positive definite matrix in + Cholesky form. + +Inputs: LLT - matrix in cholesky form on input + A^{-1} = L^{-H} L^{-1} on output + +Return: success or error +******************************************************************************/ + +int +gsl_linalg_complex_cholesky_invert(gsl_matrix_complex * LLT) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else + { + size_t N = LLT->size1; + size_t i, j; + gsl_vector_complex_view v1; + + /* invert the lower triangle of LLT */ + for (i = 0; i < N; ++i) + { + double ajj; + gsl_complex z; + + j = N - i - 1; + + { + gsl_complex z0 = gsl_matrix_complex_get(LLT, j, j); + ajj = 1.0 / GSL_REAL(z0); + } + + GSL_SET_COMPLEX(&z, ajj, 0.0); + gsl_matrix_complex_set(LLT, j, j, z); + + { + gsl_complex z1 = gsl_matrix_complex_get(LLT, j, j); + ajj = -GSL_REAL(z1); + } + + if (j < N - 1) + { + gsl_matrix_complex_view m; + + m = gsl_matrix_complex_submatrix(LLT, j + 1, j + 1, + N - j - 1, N - j - 1); + v1 = gsl_matrix_complex_subcolumn(LLT, j, j + 1, N - j - 1); + + gsl_blas_ztrmv(CblasLower, CblasNoTrans, CblasNonUnit, + &m.matrix, &v1.vector); + + gsl_blas_zdscal(ajj, &v1.vector); + } + } /* for (i = 0; i < N; ++i) */ + + /* + * The lower triangle of LLT now contains L^{-1}. Now compute + * A^{-1} = L^{-H} L^{-1} + * + * The (ij) element of A^{-1} is column i of conj(L^{-1}) dotted into + * column j of L^{-1} + */ + + for (i = 0; i < N; ++i) + { + gsl_complex sum; + for (j = i + 1; j < N; ++j) + { + gsl_vector_complex_view v2; + v1 = gsl_matrix_complex_subcolumn(LLT, i, j, N - j); + v2 = gsl_matrix_complex_subcolumn(LLT, j, j, N - j); + + /* compute Ainv[i,j] = sum_k{conj(Linv[k,i]) * Linv[k,j]} */ + gsl_blas_zdotc(&v1.vector, &v2.vector, &sum); + + /* store in upper triangle */ + gsl_matrix_complex_set(LLT, i, j, sum); + } + + /* now compute the diagonal element */ + v1 = gsl_matrix_complex_subcolumn(LLT, i, i, N - i); + gsl_blas_zdotc(&v1.vector, &v1.vector, &sum); + gsl_matrix_complex_set(LLT, i, i, sum); + } + + /* copy the Hermitian upper triangle to the lower triangle */ + + for (j = 1; j < N; j++) + { + for (i = 0; i < j; i++) + { + gsl_complex z = gsl_matrix_complex_get(LLT, i, j); + gsl_matrix_complex_set(LLT, j, i, gsl_complex_conjugate(z)); + } + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_complex_cholesky_invert() */ + + +/******************************************** + * INTERNAL ROUTINES * + ********************************************/ + +static void +cholesky_complex_conj_vector(gsl_vector_complex *v) +{ + size_t i; + + for (i = 0; i < v->size; ++i) + { + gsl_complex z = gsl_vector_complex_get(v, i); + gsl_vector_complex_set(v, i, gsl_complex_conjugate(z)); + } +} /* cholesky_complex_conj_vector() */ diff --git a/software/gsl-1.15/linalg/exponential.c b/software/gsl-1.15/linalg/exponential.c new file mode 100644 index 000000000..8df89415c --- /dev/null +++ b/software/gsl-1.15/linalg/exponential.c @@ -0,0 +1,187 @@ +/* linalg/exponential.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Calculate the matrix exponential, following + * Moler + Van Loan, SIAM Rev. 20, 801 (1978). + */ + +#include +#include +#include +#include +#include +#include + +#include "gsl_linalg.h" + + +/* store one of the suggested choices for the + * Taylor series / square method from Moler + VanLoan + */ +struct moler_vanloan_optimal_suggestion +{ + int k; + int j; +}; +typedef struct moler_vanloan_optimal_suggestion mvl_suggestion_t; + + +/* table from Moler and Van Loan + * mvl_tab[gsl_mode_t][matrix_norm_group] + */ +static mvl_suggestion_t mvl_tab[3][6] = +{ + /* double precision */ + { + { 5, 1 }, { 5, 4 }, { 7, 5 }, { 9, 7 }, { 10, 10 }, { 8, 14 } + }, + + /* single precision */ + { + { 2, 1 }, { 4, 0 }, { 7, 1 }, { 6, 5 }, { 5, 9 }, { 7, 11 } + }, + + /* approx precision */ + { + { 1, 0 }, { 3, 0 }, { 5, 1 }, { 4, 5 }, { 4, 8 }, { 2, 11 } + } +}; + + +inline +static double +sup_norm(const gsl_matrix * A) +{ + double min, max; + gsl_matrix_minmax(A, &min, &max); + return GSL_MAX_DBL(fabs(min), fabs(max)); +} + + +static +mvl_suggestion_t +obtain_suggestion(const gsl_matrix * A, gsl_mode_t mode) +{ + const unsigned int mode_prec = GSL_MODE_PREC(mode); + const double norm_A = sup_norm(A); + if(norm_A < 0.01) return mvl_tab[mode_prec][0]; + else if(norm_A < 0.1) return mvl_tab[mode_prec][1]; + else if(norm_A < 1.0) return mvl_tab[mode_prec][2]; + else if(norm_A < 10.0) return mvl_tab[mode_prec][3]; + else if(norm_A < 100.0) return mvl_tab[mode_prec][4]; + else if(norm_A < 1000.0) return mvl_tab[mode_prec][5]; + else + { + /* outside the table we simply increase the number + * of squarings, bringing the reduced matrix into + * the range of the table; this is obviously suboptimal, + * but that is the price paid for not having those extra + * table entries + */ + const double extra = log(1.01*norm_A/1000.0) / M_LN2; + const int extra_i = (unsigned int) ceil(extra); + mvl_suggestion_t s = mvl_tab[mode][5]; + s.j += extra_i; + return s; + } +} + + +/* use series representation to calculate matrix exponential; + * this is used for small matrices; we use the sup_norm + * to measure the size of the terms in the expansion + */ +static void +matrix_exp_series( + const gsl_matrix * B, + gsl_matrix * eB, + int number_of_terms + ) +{ + int count; + gsl_matrix * temp = gsl_matrix_calloc(B->size1, B->size2); + + /* init the Horner polynomial evaluation, + * eB = 1 + B/number_of_terms; we use + * eB to collect the partial results + */ + gsl_matrix_memcpy(eB, B); + gsl_matrix_scale(eB, 1.0/number_of_terms); + gsl_matrix_add_diagonal(eB, 1.0); + for(count = number_of_terms-1; count >= 1; --count) + { + /* mult_temp = 1 + B eB / count */ + gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, B, eB, 0.0, temp); + gsl_matrix_scale(temp, 1.0/count); + gsl_matrix_add_diagonal(temp, 1.0); + + /* transfer partial result out of temp */ + gsl_matrix_memcpy(eB, temp); + } + + /* now eB holds the full result; we're done */ + gsl_matrix_free(temp); +} + + +int +gsl_linalg_exponential_ss( + const gsl_matrix * A, + gsl_matrix * eA, + gsl_mode_t mode + ) +{ + if(A->size1 != A->size2) + { + GSL_ERROR("cannot exponentiate a non-square matrix", GSL_ENOTSQR); + } + else if(A->size1 != eA->size1 || A->size2 != eA->size2) + { + GSL_ERROR("exponential of matrix must have same dimension as matrix", GSL_EBADLEN); + } + else + { + int i; + const mvl_suggestion_t sugg = obtain_suggestion(A, mode); + const double divisor = exp(M_LN2 * sugg.j); + + gsl_matrix * reduced_A = gsl_matrix_alloc(A->size1, A->size2); + + /* decrease A by the calculated divisor */ + gsl_matrix_memcpy(reduced_A, A); + gsl_matrix_scale(reduced_A, 1.0/divisor); + + /* calculate exp of reduced matrix; store in eA as temp */ + matrix_exp_series(reduced_A, eA, sugg.k); + + /* square repeatedly; use reduced_A for scratch */ + for(i = 0; i < sugg.j; ++i) + { + gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, eA, eA, 0.0, reduced_A); + gsl_matrix_memcpy(eA, reduced_A); + } + + gsl_matrix_free(reduced_A); + + return GSL_SUCCESS; + } +} + diff --git a/software/gsl-1.15/linalg/givens.c b/software/gsl-1.15/linalg/givens.c new file mode 100644 index 000000000..0cf0f925a --- /dev/null +++ b/software/gsl-1.15/linalg/givens.c @@ -0,0 +1,46 @@ +/* linalg/givens.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Generate a Givens rotation (cos,sin) which takes v=(x,y) to (|v|,0) + + From Golub and Van Loan, "Matrix Computations", Section 5.1.8 */ + +inline static void +create_givens (const double a, const double b, double *c, double *s) +{ + if (b == 0) + { + *c = 1; + *s = 0; + } + else if (fabs (b) > fabs (a)) + { + double t = -a / b; + double s1 = 1.0 / sqrt (1 + t * t); + *s = s1; + *c = s1 * t; + } + else + { + double t = -b / a; + double c1 = 1.0 / sqrt (1 + t * t); + *c = c1; + *s = c1 * t; + } +} diff --git a/software/gsl-1.15/linalg/gsl_linalg.h b/software/gsl-1.15/linalg/gsl_linalg.h new file mode 100644 index 000000000..433cfca97 --- /dev/null +++ b/software/gsl-1.15/linalg/gsl_linalg.h @@ -0,0 +1,592 @@ +/* linalg/gsl_linalg.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 Gerard Jungman, Brian Gough, Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_LINALG_H__ +#define __GSL_LINALG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef enum + { + GSL_LINALG_MOD_NONE = 0, + GSL_LINALG_MOD_TRANSPOSE = 1, + GSL_LINALG_MOD_CONJUGATE = 2 + } +gsl_linalg_matrix_mod_t; + + +/* Note: You can now use the gsl_blas_dgemm function instead of matmult */ + +/* Simple implementation of matrix multiply. + * Calculates C = A.B + * + * exceptions: GSL_EBADLEN + */ +int gsl_linalg_matmult (const gsl_matrix * A, + const gsl_matrix * B, + gsl_matrix * C); + + +/* Simple implementation of matrix multiply. + * Allows transposition of either matrix, so it + * can compute A.B or Trans(A).B or A.Trans(B) or Trans(A).Trans(B) + * + * exceptions: GSL_EBADLEN + */ +int gsl_linalg_matmult_mod (const gsl_matrix * A, + gsl_linalg_matrix_mod_t modA, + const gsl_matrix * B, + gsl_linalg_matrix_mod_t modB, + gsl_matrix * C); + +/* Calculate the matrix exponential by the scaling and + * squaring method described in Moler + Van Loan, + * SIAM Rev 20, 801 (1978). The mode argument allows + * choosing an optimal strategy, from the table + * given in the paper, for a given precision. + * + * exceptions: GSL_ENOTSQR, GSL_EBADLEN + */ +int gsl_linalg_exponential_ss( + const gsl_matrix * A, + gsl_matrix * eA, + gsl_mode_t mode + ); + + +/* Householder Transformations */ + +double gsl_linalg_householder_transform (gsl_vector * v); +gsl_complex gsl_linalg_complex_householder_transform (gsl_vector_complex * v); + +int gsl_linalg_householder_hm (double tau, + const gsl_vector * v, + gsl_matrix * A); + +int gsl_linalg_householder_mh (double tau, + const gsl_vector * v, + gsl_matrix * A); + +int gsl_linalg_householder_hv (double tau, + const gsl_vector * v, + gsl_vector * w); + +int gsl_linalg_householder_hm1 (double tau, + gsl_matrix * A); + +int gsl_linalg_complex_householder_hm (gsl_complex tau, + const gsl_vector_complex * v, + gsl_matrix_complex * A); + +int gsl_linalg_complex_householder_mh (gsl_complex tau, + const gsl_vector_complex * v, + gsl_matrix_complex * A); + +int gsl_linalg_complex_householder_hv (gsl_complex tau, + const gsl_vector_complex * v, + gsl_vector_complex * w); + +/* Hessenberg reduction */ + +int gsl_linalg_hessenberg_decomp(gsl_matrix *A, gsl_vector *tau); +int gsl_linalg_hessenberg_unpack(gsl_matrix * H, gsl_vector * tau, + gsl_matrix * U); +int gsl_linalg_hessenberg_unpack_accum(gsl_matrix * H, gsl_vector * tau, + gsl_matrix * U); +int gsl_linalg_hessenberg_set_zero(gsl_matrix * H); +int gsl_linalg_hessenberg_submatrix(gsl_matrix *M, gsl_matrix *A, + size_t top, gsl_vector *tau); + +/* To support gsl-1.9 interface: DEPRECATED */ +int gsl_linalg_hessenberg(gsl_matrix *A, gsl_vector *tau); + + +/* Hessenberg-Triangular reduction */ + +int gsl_linalg_hesstri_decomp(gsl_matrix * A, gsl_matrix * B, + gsl_matrix * U, gsl_matrix * V, + gsl_vector * work); + +/* Singular Value Decomposition + + * exceptions: + */ + +int +gsl_linalg_SV_decomp (gsl_matrix * A, + gsl_matrix * V, + gsl_vector * S, + gsl_vector * work); + +int +gsl_linalg_SV_decomp_mod (gsl_matrix * A, + gsl_matrix * X, + gsl_matrix * V, + gsl_vector * S, + gsl_vector * work); + +int gsl_linalg_SV_decomp_jacobi (gsl_matrix * A, + gsl_matrix * Q, + gsl_vector * S); + +int +gsl_linalg_SV_solve (const gsl_matrix * U, + const gsl_matrix * Q, + const gsl_vector * S, + const gsl_vector * b, + gsl_vector * x); + + +/* LU Decomposition, Gaussian elimination with partial pivoting + */ + +int gsl_linalg_LU_decomp (gsl_matrix * A, gsl_permutation * p, int *signum); + +int gsl_linalg_LU_solve (const gsl_matrix * LU, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_LU_svx (const gsl_matrix * LU, + const gsl_permutation * p, + gsl_vector * x); + +int gsl_linalg_LU_refine (const gsl_matrix * A, + const gsl_matrix * LU, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x, + gsl_vector * residual); + +int gsl_linalg_LU_invert (const gsl_matrix * LU, + const gsl_permutation * p, + gsl_matrix * inverse); + +double gsl_linalg_LU_det (gsl_matrix * LU, int signum); +double gsl_linalg_LU_lndet (gsl_matrix * LU); +int gsl_linalg_LU_sgndet (gsl_matrix * lu, int signum); + +/* Complex LU Decomposition */ + +int gsl_linalg_complex_LU_decomp (gsl_matrix_complex * A, + gsl_permutation * p, + int *signum); + +int gsl_linalg_complex_LU_solve (const gsl_matrix_complex * LU, + const gsl_permutation * p, + const gsl_vector_complex * b, + gsl_vector_complex * x); + +int gsl_linalg_complex_LU_svx (const gsl_matrix_complex * LU, + const gsl_permutation * p, + gsl_vector_complex * x); + +int gsl_linalg_complex_LU_refine (const gsl_matrix_complex * A, + const gsl_matrix_complex * LU, + const gsl_permutation * p, + const gsl_vector_complex * b, + gsl_vector_complex * x, + gsl_vector_complex * residual); + +int gsl_linalg_complex_LU_invert (const gsl_matrix_complex * LU, + const gsl_permutation * p, + gsl_matrix_complex * inverse); + +gsl_complex gsl_linalg_complex_LU_det (gsl_matrix_complex * LU, + int signum); + +double gsl_linalg_complex_LU_lndet (gsl_matrix_complex * LU); + +gsl_complex gsl_linalg_complex_LU_sgndet (gsl_matrix_complex * LU, + int signum); + +/* QR decomposition */ + +int gsl_linalg_QR_decomp (gsl_matrix * A, + gsl_vector * tau); + +int gsl_linalg_QR_solve (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_QR_svx (const gsl_matrix * QR, + const gsl_vector * tau, + gsl_vector * x); + +int gsl_linalg_QR_lssolve (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_vector * b, + gsl_vector * x, + gsl_vector * residual); + + +int gsl_linalg_QR_QRsolve (gsl_matrix * Q, + gsl_matrix * R, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_QR_Rsolve (const gsl_matrix * QR, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_QR_Rsvx (const gsl_matrix * QR, + gsl_vector * x); + +int gsl_linalg_QR_update (gsl_matrix * Q, + gsl_matrix * R, + gsl_vector * w, + const gsl_vector * v); + +int gsl_linalg_QR_QTvec (const gsl_matrix * QR, + const gsl_vector * tau, + gsl_vector * v); + +int gsl_linalg_QR_Qvec (const gsl_matrix * QR, + const gsl_vector * tau, + gsl_vector * v); + +int gsl_linalg_QR_QTmat (const gsl_matrix * QR, + const gsl_vector * tau, + gsl_matrix * A); + +int gsl_linalg_QR_unpack (const gsl_matrix * QR, + const gsl_vector * tau, + gsl_matrix * Q, + gsl_matrix * R); + +int gsl_linalg_R_solve (const gsl_matrix * R, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_R_svx (const gsl_matrix * R, + gsl_vector * x); + + +/* Q R P^T decomposition */ + +int gsl_linalg_QRPT_decomp (gsl_matrix * A, + gsl_vector * tau, + gsl_permutation * p, + int *signum, + gsl_vector * norm); + +int gsl_linalg_QRPT_decomp2 (const gsl_matrix * A, + gsl_matrix * q, gsl_matrix * r, + gsl_vector * tau, + gsl_permutation * p, + int *signum, + gsl_vector * norm); + +int gsl_linalg_QRPT_solve (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + + +int gsl_linalg_QRPT_svx (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x); + +int gsl_linalg_QRPT_QRsolve (const gsl_matrix * Q, + const gsl_matrix * R, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_QRPT_Rsolve (const gsl_matrix * QR, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_QRPT_Rsvx (const gsl_matrix * QR, + const gsl_permutation * p, + gsl_vector * x); + +int gsl_linalg_QRPT_update (gsl_matrix * Q, + gsl_matrix * R, + const gsl_permutation * p, + gsl_vector * u, + const gsl_vector * v); + +/* LQ decomposition */ + +int gsl_linalg_LQ_decomp (gsl_matrix * A, gsl_vector * tau); + +int gsl_linalg_LQ_solve_T (const gsl_matrix * LQ, const gsl_vector * tau, + const gsl_vector * b, gsl_vector * x); + +int gsl_linalg_LQ_svx_T (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * x); + +int gsl_linalg_LQ_lssolve_T (const gsl_matrix * LQ, const gsl_vector * tau, + const gsl_vector * b, gsl_vector * x, + gsl_vector * residual); + +int gsl_linalg_LQ_Lsolve_T (const gsl_matrix * LQ, const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_LQ_Lsvx_T (const gsl_matrix * LQ, gsl_vector * x); + +int gsl_linalg_L_solve_T (const gsl_matrix * L, const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_LQ_vecQ (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * v); + +int gsl_linalg_LQ_vecQT (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_vector * v); + +int gsl_linalg_LQ_unpack (const gsl_matrix * LQ, const gsl_vector * tau, + gsl_matrix * Q, gsl_matrix * L); + +int gsl_linalg_LQ_update (gsl_matrix * Q, gsl_matrix * R, + const gsl_vector * v, gsl_vector * w); +int gsl_linalg_LQ_LQsolve (gsl_matrix * Q, gsl_matrix * L, + const gsl_vector * b, gsl_vector * x); + +/* P^T L Q decomposition */ + +int gsl_linalg_PTLQ_decomp (gsl_matrix * A, gsl_vector * tau, + gsl_permutation * p, int *signum, + gsl_vector * norm); + +int gsl_linalg_PTLQ_decomp2 (const gsl_matrix * A, gsl_matrix * q, + gsl_matrix * r, gsl_vector * tau, + gsl_permutation * p, int *signum, + gsl_vector * norm); + +int gsl_linalg_PTLQ_solve_T (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_PTLQ_svx_T (const gsl_matrix * LQ, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x); + +int gsl_linalg_PTLQ_LQsolve_T (const gsl_matrix * Q, const gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_PTLQ_Lsolve_T (const gsl_matrix * LQ, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_PTLQ_Lsvx_T (const gsl_matrix * LQ, + const gsl_permutation * p, + gsl_vector * x); + +int gsl_linalg_PTLQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * v, gsl_vector * w); + +/* Cholesky Decomposition */ + +int gsl_linalg_cholesky_decomp (gsl_matrix * A); + +int gsl_linalg_cholesky_solve (const gsl_matrix * cholesky, + const gsl_vector * b, + gsl_vector * x); + +int gsl_linalg_cholesky_svx (const gsl_matrix * cholesky, + gsl_vector * x); + +int gsl_linalg_cholesky_invert(gsl_matrix * cholesky); + +/* Cholesky decomposition with unit-diagonal triangular parts. + * A = L D L^T, where diag(L) = (1,1,...,1). + * Upon exit, A contains L and L^T as for Cholesky, and + * the diagonal of A is (1,1,...,1). The vector Dis set + * to the diagonal elements of the diagonal matrix D. + */ +int gsl_linalg_cholesky_decomp_unit(gsl_matrix * A, gsl_vector * D); + +/* Complex Cholesky Decomposition */ + +int gsl_linalg_complex_cholesky_decomp (gsl_matrix_complex * A); + +int gsl_linalg_complex_cholesky_solve (const gsl_matrix_complex * cholesky, + const gsl_vector_complex * b, + gsl_vector_complex * x); + +int gsl_linalg_complex_cholesky_svx (const gsl_matrix_complex * cholesky, + gsl_vector_complex * x); + +int gsl_linalg_complex_cholesky_invert(gsl_matrix_complex * cholesky); + + +/* Symmetric to symmetric tridiagonal decomposition */ + +int gsl_linalg_symmtd_decomp (gsl_matrix * A, + gsl_vector * tau); + +int gsl_linalg_symmtd_unpack (const gsl_matrix * A, + const gsl_vector * tau, + gsl_matrix * Q, + gsl_vector * diag, + gsl_vector * subdiag); + +int gsl_linalg_symmtd_unpack_T (const gsl_matrix * A, + gsl_vector * diag, + gsl_vector * subdiag); + +/* Hermitian to symmetric tridiagonal decomposition */ + +int gsl_linalg_hermtd_decomp (gsl_matrix_complex * A, + gsl_vector_complex * tau); + +int gsl_linalg_hermtd_unpack (const gsl_matrix_complex * A, + const gsl_vector_complex * tau, + gsl_matrix_complex * U, + gsl_vector * diag, + gsl_vector * sudiag); + +int gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex * A, + gsl_vector * diag, + gsl_vector * subdiag); + +/* Linear Solve Using Householder Transformations + + * exceptions: + */ + +int gsl_linalg_HH_solve (gsl_matrix * A, const gsl_vector * b, gsl_vector * x); +int gsl_linalg_HH_svx (gsl_matrix * A, gsl_vector * x); + +/* Linear solve for a symmetric tridiagonal system. + + * The input vectors represent the NxN matrix as follows: + * + * diag[0] offdiag[0] 0 ... + * offdiag[0] diag[1] offdiag[1] ... + * 0 offdiag[1] diag[2] ... + * 0 0 offdiag[2] ... + * ... ... ... ... + */ +int gsl_linalg_solve_symm_tridiag (const gsl_vector * diag, + const gsl_vector * offdiag, + const gsl_vector * b, + gsl_vector * x); + +/* Linear solve for a nonsymmetric tridiagonal system. + + * The input vectors represent the NxN matrix as follows: + * + * diag[0] abovediag[0] 0 ... + * belowdiag[0] diag[1] abovediag[1] ... + * 0 belowdiag[1] diag[2] ... + * 0 0 belowdiag[2] ... + * ... ... ... ... + */ +int gsl_linalg_solve_tridiag (const gsl_vector * diag, + const gsl_vector * abovediag, + const gsl_vector * belowdiag, + const gsl_vector * b, + gsl_vector * x); + + +/* Linear solve for a symmetric cyclic tridiagonal system. + + * The input vectors represent the NxN matrix as follows: + * + * diag[0] offdiag[0] 0 ..... offdiag[N-1] + * offdiag[0] diag[1] offdiag[1] ..... + * 0 offdiag[1] diag[2] ..... + * 0 0 offdiag[2] ..... + * ... ... + * offdiag[N-1] ... + */ +int gsl_linalg_solve_symm_cyc_tridiag (const gsl_vector * diag, + const gsl_vector * offdiag, + const gsl_vector * b, + gsl_vector * x); + +/* Linear solve for a nonsymmetric cyclic tridiagonal system. + + * The input vectors represent the NxN matrix as follows: + * + * diag[0] abovediag[0] 0 ..... belowdiag[N-1] + * belowdiag[0] diag[1] abovediag[1] ..... + * 0 belowdiag[1] diag[2] + * 0 0 belowdiag[2] ..... + * ... ... + * abovediag[N-1] ... + */ +int gsl_linalg_solve_cyc_tridiag (const gsl_vector * diag, + const gsl_vector * abovediag, + const gsl_vector * belowdiag, + const gsl_vector * b, + gsl_vector * x); + + +/* Bidiagonal decomposition */ + +int gsl_linalg_bidiag_decomp (gsl_matrix * A, + gsl_vector * tau_U, + gsl_vector * tau_V); + +int gsl_linalg_bidiag_unpack (const gsl_matrix * A, + const gsl_vector * tau_U, + gsl_matrix * U, + const gsl_vector * tau_V, + gsl_matrix * V, + gsl_vector * diag, + gsl_vector * superdiag); + +int gsl_linalg_bidiag_unpack2 (gsl_matrix * A, + gsl_vector * tau_U, + gsl_vector * tau_V, + gsl_matrix * V); + +int gsl_linalg_bidiag_unpack_B (const gsl_matrix * A, + gsl_vector * diag, + gsl_vector * superdiag); + +/* Balancing */ + +int gsl_linalg_balance_matrix (gsl_matrix * A, gsl_vector * D); +int gsl_linalg_balance_accum (gsl_matrix * A, gsl_vector * D); +int gsl_linalg_balance_columns (gsl_matrix * A, gsl_vector * D); + + +__END_DECLS + +#endif /* __GSL_LINALG_H__ */ diff --git a/software/gsl-1.15/linalg/hermtd.c b/software/gsl-1.15/linalg/hermtd.c new file mode 100644 index 000000000..3660e96a4 --- /dev/null +++ b/software/gsl-1.15/linalg/hermtd.c @@ -0,0 +1,240 @@ +/* linalg/hermtd.c + * + * Copyright (C) 2001, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Factorise a hermitian matrix A into + * + * A = U T U' + * + * where U is unitary and T is real symmetric tridiagonal. Only the + * diagonal and lower triangular part of A is referenced and modified. + * + * On exit, T is stored in the diagonal and first subdiagonal of + * A. Since T is symmetric the upper diagonal is not stored. + * + * U is stored as a packed set of Householder transformations in the + * lower triangular part of the input matrix below the first subdiagonal. + * + * The full matrix for U can be obtained as the product + * + * U = U_N ... U_2 U_1 + * + * where + * + * U_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [0, ..., 0, 1, A(i+2,i), A(i+3,i), ... , A(N,i)] + * + * This storage scheme is the same as in LAPACK. See LAPACK's + * chetd2.f for details. + * + * See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +int +gsl_linalg_hermtd_decomp (gsl_matrix_complex * A, gsl_vector_complex * tau) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("hermitian tridiagonal decomposition requires square matrix", + GSL_ENOTSQR); + } + else if (tau->size + 1 != A->size1) + { + GSL_ERROR ("size of tau must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + size_t i; + + const gsl_complex zero = gsl_complex_rect (0.0, 0.0); + const gsl_complex one = gsl_complex_rect (1.0, 0.0); + const gsl_complex neg_one = gsl_complex_rect (-1.0, 0.0); + + for (i = 0 ; i < N - 1; i++) + { + gsl_vector_complex_view c = gsl_matrix_complex_column (A, i); + gsl_vector_complex_view v = gsl_vector_complex_subvector (&c.vector, i + 1, N - (i + 1)); + gsl_complex tau_i = gsl_linalg_complex_householder_transform (&v.vector); + + /* Apply the transformation H^T A H to the remaining columns */ + + if ((i + 1) < (N - 1) + && !(GSL_REAL(tau_i) == 0.0 && GSL_IMAG(tau_i) == 0.0)) + { + gsl_matrix_complex_view m = + gsl_matrix_complex_submatrix (A, i + 1, i + 1, + N - (i+1), N - (i+1)); + gsl_complex ei = gsl_vector_complex_get(&v.vector, 0); + gsl_vector_complex_view x = gsl_vector_complex_subvector (tau, i, N-(i+1)); + gsl_vector_complex_set (&v.vector, 0, one); + + /* x = tau * A * v */ + gsl_blas_zhemv (CblasLower, tau_i, &m.matrix, &v.vector, zero, &x.vector); + + /* w = x - (1/2) tau * (x' * v) * v */ + { + gsl_complex xv, txv, alpha; + gsl_blas_zdotc(&x.vector, &v.vector, &xv); + txv = gsl_complex_mul(tau_i, xv); + alpha = gsl_complex_mul_real(txv, -0.5); + gsl_blas_zaxpy(alpha, &v.vector, &x.vector); + } + + /* apply the transformation A = A - v w' - w v' */ + gsl_blas_zher2(CblasLower, neg_one, &v.vector, &x.vector, &m.matrix); + + gsl_vector_complex_set (&v.vector, 0, ei); + } + + gsl_vector_complex_set (tau, i, tau_i); + } + + return GSL_SUCCESS; + } +} + + +/* Form the orthogonal matrix U from the packed QR matrix */ + +int +gsl_linalg_hermtd_unpack (const gsl_matrix_complex * A, + const gsl_vector_complex * tau, + gsl_matrix_complex * U, + gsl_vector * diag, + gsl_vector * sdiag) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix A must be sqaure", GSL_ENOTSQR); + } + else if (tau->size + 1 != A->size1) + { + GSL_ERROR ("size of tau must be (matrix size - 1)", GSL_EBADLEN); + } + else if (U->size1 != A->size1 || U->size2 != A->size1) + { + GSL_ERROR ("size of U must match size of A", GSL_EBADLEN); + } + else if (diag->size != A->size1) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (sdiag->size + 1 != A->size1) + { + GSL_ERROR ("size of subdiagonal must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + + size_t i; + + /* Initialize U to the identity */ + + gsl_matrix_complex_set_identity (U); + + for (i = N - 1; i-- > 0;) + { + gsl_complex ti = gsl_vector_complex_get (tau, i); + + gsl_vector_complex_const_view c = gsl_matrix_complex_const_column (A, i); + + gsl_vector_complex_const_view h = + gsl_vector_complex_const_subvector (&c.vector, i + 1, N - (i+1)); + + gsl_matrix_complex_view m = + gsl_matrix_complex_submatrix (U, i + 1, i + 1, N-(i+1), N-(i+1)); + + gsl_linalg_complex_householder_hm (ti, &h.vector, &m.matrix); + } + + /* Copy diagonal into diag */ + + for (i = 0; i < N; i++) + { + gsl_complex Aii = gsl_matrix_complex_get (A, i, i); + gsl_vector_set (diag, i, GSL_REAL(Aii)); + } + + /* Copy subdiagonal into sdiag */ + + for (i = 0; i < N - 1; i++) + { + gsl_complex Aji = gsl_matrix_complex_get (A, i+1, i); + gsl_vector_set (sdiag, i, GSL_REAL(Aji)); + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex * A, + gsl_vector * diag, + gsl_vector * sdiag) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix A must be sqaure", GSL_ENOTSQR); + } + else if (diag->size != A->size1) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (sdiag->size + 1 != A->size1) + { + GSL_ERROR ("size of subdiagonal must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + + size_t i; + + /* Copy diagonal into diag */ + + for (i = 0; i < N; i++) + { + gsl_complex Aii = gsl_matrix_complex_get (A, i, i); + gsl_vector_set (diag, i, GSL_REAL(Aii)); + } + + /* Copy subdiagonal into sd */ + + for (i = 0; i < N - 1; i++) + { + gsl_complex Aji = gsl_matrix_complex_get (A, i+1, i); + gsl_vector_set (sdiag, i, GSL_REAL(Aji)); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/hessenberg.c b/software/gsl-1.15/linalg/hessenberg.c new file mode 100644 index 000000000..cd559a53f --- /dev/null +++ b/software/gsl-1.15/linalg/hessenberg.c @@ -0,0 +1,440 @@ +/* linalg/hessenberg.c + * + * Copyright (C) 2006 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* +gsl_linalg_hessenberg_decomp() + Compute the Householder reduction to Hessenberg form of a +square N-by-N matrix A. + +H = U^t A U + +See Golub & Van Loan, "Matrix Computations" (3rd ed), algorithm +7.4.2 + +Inputs: A - matrix to reduce + tau - where to store scalar factors in Householder + matrices; this vector must be of length N, + where N is the order of A + +Return: GSL_SUCCESS unless error occurs + +Notes: on output, the upper triangular portion of A (including +the diagaonal and subdiagonal) contains the Hessenberg matrix. +The lower triangular portion (below the subdiagonal) contains +the Householder vectors which can be used to construct +the similarity transform matrix U. + +The matrix U is + +U = U(1) U(2) ... U(n - 2) + +where + +U(i) = I - tau(i) * v(i) * v(i)^t + +and the vector v(i) is stored in column i of the matrix A +underneath the subdiagonal. So the first element of v(i) +is stored in row i + 2, column i, the second element at +row i + 3, column i, and so on. + +Also note that for the purposes of computing U(i), +v(1:i) = 0, v(i + 1) = 1, and v(i+2:n) is what is stored in +column i of A beneath the subdiagonal. +*/ + +int +gsl_linalg_hessenberg_decomp(gsl_matrix *A, gsl_vector *tau) +{ + const size_t N = A->size1; + + if (N != A->size2) + { + GSL_ERROR ("Hessenberg reduction requires square matrix", + GSL_ENOTSQR); + } + else if (N != tau->size) + { + GSL_ERROR ("tau vector must match matrix size", GSL_EBADLEN); + } + else if (N < 3) + { + /* nothing to do */ + return GSL_SUCCESS; + } + else + { + size_t i; /* looping */ + gsl_vector_view c, /* matrix column */ + hv; /* householder vector */ + gsl_matrix_view m; + double tau_i; /* beta in algorithm 7.4.2 */ + + for (i = 0; i < N - 2; ++i) + { + /* + * make a copy of A(i + 1:n, i) and store it in the section + * of 'tau' that we haven't stored coefficients in yet + */ + + c = gsl_matrix_subcolumn(A, i, i + 1, N - i - 1); + + hv = gsl_vector_subvector(tau, i + 1, N - (i + 1)); + gsl_vector_memcpy(&hv.vector, &c.vector); + + /* compute householder transformation of A(i+1:n,i) */ + tau_i = gsl_linalg_householder_transform(&hv.vector); + + /* apply left householder matrix (I - tau_i v v') to A */ + m = gsl_matrix_submatrix(A, i + 1, i, N - (i + 1), N - i); + gsl_linalg_householder_hm(tau_i, &hv.vector, &m.matrix); + + /* apply right householder matrix (I - tau_i v v') to A */ + m = gsl_matrix_submatrix(A, 0, i + 1, N, N - (i + 1)); + gsl_linalg_householder_mh(tau_i, &hv.vector, &m.matrix); + + /* save Householder coefficient */ + gsl_vector_set(tau, i, tau_i); + + /* + * store Householder vector below the subdiagonal in column + * i of the matrix. hv(1) does not need to be stored since + * it is always 1. + */ + c = gsl_vector_subvector(&c.vector, 1, c.vector.size - 1); + hv = gsl_vector_subvector(&hv.vector, 1, hv.vector.size - 1); + gsl_vector_memcpy(&c.vector, &hv.vector); + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_hessenberg_decomp() */ + +/* +gsl_linalg_hessenberg_unpack() + Construct the matrix U which transforms a matrix A into +its upper Hessenberg form: + +H = U^t A U + +by unpacking the information stored in H from gsl_linalg_hessenberg(). + +U is a product of Householder matrices: + +U = U(1) U(2) ... U(n - 2) + +where + +U(i) = I - tau(i) * v(i) * v(i)^t + +The v(i) are stored in the lower triangular part of H by +gsl_linalg_hessenberg(). The tau(i) are stored in the vector tau. + +Inputs: H - Hessenberg matrix computed from + gsl_linalg_hessenberg() + tau - tau vector computed from gsl_linalg_hessenberg() + U - (output) where to store similarity matrix + +Return: success or error +*/ + +int +gsl_linalg_hessenberg_unpack(gsl_matrix * H, gsl_vector * tau, + gsl_matrix * U) +{ + int s; + + gsl_matrix_set_identity(U); + + s = gsl_linalg_hessenberg_unpack_accum(H, tau, U); + + return s; +} /* gsl_linalg_hessenberg_unpack() */ + +/* +gsl_linalg_hessenberg_unpack_accum() + This routine is the same as gsl_linalg_hessenberg_unpack(), except +instead of storing the similarity matrix in U, it accumulates it, +so that + +U -> U * [ U(1) U(2) ... U(n - 2) ] + +instead of: + +U -> U(1) U(2) ... U(n - 2) + +Inputs: H - Hessenberg matrix computed from + gsl_linalg_hessenberg() + tau - tau vector computed from gsl_linalg_hessenberg() + V - (input/output) where to accumulate similarity matrix + +Return: success or error + +Notes: 1) On input, V needs to be initialized. The Householder matrices + are accumulated into V, so on output, + + V_out = V_in * U(1) * U(2) * ... * U(n - 2) + + so if you just want the product of the Householder matrices, + initialize V to the identity matrix before calling this + function. + + 2) V does not have to be square, but must have the same + number of columns as the order of H +*/ + +int +gsl_linalg_hessenberg_unpack_accum(gsl_matrix * H, gsl_vector * tau, + gsl_matrix * V) +{ + const size_t N = H->size1; + + if (N != H->size2) + { + GSL_ERROR ("Hessenberg reduction requires square matrix", + GSL_ENOTSQR); + } + else if (N != tau->size) + { + GSL_ERROR ("tau vector must match matrix size", GSL_EBADLEN); + } + else if (N != V->size2) + { + GSL_ERROR ("V matrix has wrong dimension", GSL_EBADLEN); + } + else + { + size_t j; /* looping */ + double tau_j; /* householder coefficient */ + gsl_vector_view c, /* matrix column */ + hv; /* householder vector */ + gsl_matrix_view m; + + if (N < 3) + { + /* nothing to do */ + return GSL_SUCCESS; + } + + for (j = 0; j < (N - 2); ++j) + { + c = gsl_matrix_column(H, j); + + tau_j = gsl_vector_get(tau, j); + + /* + * get a view to the householder vector in column j, but + * make sure hv(2) starts at the element below the + * subdiagonal, since hv(1) was never stored and is always + * 1 + */ + hv = gsl_vector_subvector(&c.vector, j + 1, N - (j + 1)); + + /* + * Only operate on part of the matrix since the first + * j + 1 entries of the real householder vector are 0 + * + * V -> V * U(j) + * + * Note here that V->size1 is not necessarily equal to N + */ + m = gsl_matrix_submatrix(V, 0, j + 1, V->size1, N - (j + 1)); + + /* apply right Householder matrix to V */ + gsl_linalg_householder_mh(tau_j, &hv.vector, &m.matrix); + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_hessenberg_unpack_accum() */ + +/* +gsl_linalg_hessenberg_set_zero() + Zero out the lower triangular portion of the Hessenberg matrix H. +This is useful when Householder vectors may be stored in the lower +part of H, but eigenvalue solvers need some scratch space with zeros. +*/ + +int +gsl_linalg_hessenberg_set_zero(gsl_matrix * H) +{ + const size_t N = H->size1; + size_t i, j; + + if (N < 3) + return GSL_SUCCESS; + + for (j = 0; j < N - 2; ++j) + { + for (i = j + 2; i < N; ++i) + { + gsl_matrix_set(H, i, j, 0.0); + } + } + + return GSL_SUCCESS; +} /* gsl_linalg_hessenberg_set_zero() */ + +/* +gsl_linalg_hessenberg_submatrix() + + This routine does the same thing as gsl_linalg_hessenberg(), +except that it operates on a submatrix of a larger matrix, but +updates the larger matrix with the Householder transformations. + +For example, suppose + +M = [ M_{11} | M_{12} | M_{13} ] + [ 0 | A | M_{23} ] + [ 0 | 0 | M_{33} ] + +where M_{11} and M_{33} are already in Hessenberg form, and we +just want to reduce A to Hessenberg form. Applying the transformations +to A alone will cause the larger matrix M to lose its similarity +information. So this routine updates M_{12} and M_{23} as A gets +reduced. + +Inputs: M - total matrix + A - (sub)matrix to reduce + top - row index of top of A in M + tau - where to store scalar factors in Householder + matrices; this vector must be of length N, + where N is the order of A + +Return: GSL_SUCCESS unless error occurs + +Notes: on output, the upper triangular portion of A (including +the diagaonal and subdiagonal) contains the Hessenberg matrix. +The lower triangular portion (below the subdiagonal) contains +the Householder vectors which can be used to construct +the similarity transform matrix U. + +The matrix U is + +U = U(1) U(2) ... U(n - 2) + +where + +U(i) = I - tau(i) * v(i) * v(i)^t + +and the vector v(i) is stored in column i of the matrix A +underneath the subdiagonal. So the first element of v(i) +is stored in row i + 2, column i, the second element at +row i + 3, column i, and so on. + +Also note that for the purposes of computing U(i), +v(1:i) = 0, v(i + 1) = 1, and v(i+2:n) is what is stored in +column i of A beneath the subdiagonal. +*/ + +int +gsl_linalg_hessenberg_submatrix(gsl_matrix *M, gsl_matrix *A, size_t top, + gsl_vector *tau) +{ + const size_t N = A->size1; + const size_t N_M = M->size1; + + if (N != A->size2) + { + GSL_ERROR ("Hessenberg reduction requires square matrix", + GSL_ENOTSQR); + } + else if (N != tau->size) + { + GSL_ERROR ("tau vector must match matrix size", GSL_EBADLEN); + } + else if (N < 3) + { + /* nothing to do */ + return GSL_SUCCESS; + } + else + { + size_t i; /* looping */ + gsl_vector_view c, /* matrix column */ + hv; /* householder vector */ + gsl_matrix_view m; + double tau_i; /* beta in algorithm 7.4.2 */ + + for (i = 0; i < N - 2; ++i) + { + /* + * make a copy of A(i + 1:n, i) and store it in the section + * of 'tau' that we haven't stored coefficients in yet + */ + + c = gsl_matrix_subcolumn(A, i, i + 1, N - i - 1); + + hv = gsl_vector_subvector(tau, i + 1, N - (i + 1)); + gsl_vector_memcpy(&hv.vector, &c.vector); + + /* compute householder transformation of A(i+1:n,i) */ + tau_i = gsl_linalg_householder_transform(&hv.vector); + + /* + * apply left householder matrix (I - tau_i v v') to + * [ A | M_{23} ] + */ + m = gsl_matrix_submatrix(M, + top + i + 1, + top + i, + N - (i + 1), + N_M - top - i); + gsl_linalg_householder_hm(tau_i, &hv.vector, &m.matrix); + + /* + * apply right householder matrix (I - tau_i v v') to + * + * [ M_{12} ] + * [ A ] + */ + m = gsl_matrix_submatrix(M, + 0, + top + i + 1, + top + N, + N - (i + 1)); + gsl_linalg_householder_mh(tau_i, &hv.vector, &m.matrix); + + /* save Householder coefficient */ + gsl_vector_set(tau, i, tau_i); + + /* + * store Householder vector below the subdiagonal in column + * i of the matrix. hv(1) does not need to be stored since + * it is always 1. + */ + c = gsl_vector_subvector(&c.vector, 1, c.vector.size - 1); + hv = gsl_vector_subvector(&hv.vector, 1, hv.vector.size - 1); + gsl_vector_memcpy(&c.vector, &hv.vector); + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_hessenberg_submatrix() */ + +/* To support gsl-1.9 interface: DEPRECATED */ +int +gsl_linalg_hessenberg(gsl_matrix *A, gsl_vector *tau) +{ + return gsl_linalg_hessenberg_decomp(A, tau); +} diff --git a/software/gsl-1.15/linalg/hesstri.c b/software/gsl-1.15/linalg/hesstri.c new file mode 100644 index 000000000..59f78c920 --- /dev/null +++ b/software/gsl-1.15/linalg/hesstri.c @@ -0,0 +1,173 @@ +/* linalg/hesstri.c + * + * Copyright (C) 2006, 2007 Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "givens.c" + +/* + * This module contains routines related to the Hessenberg-Triangular + * reduction of two general real matrices + * + * See Golub & Van Loan, "Matrix Computations", 3rd ed, sec 7.7.4 + */ + +/* +gsl_linalg_hesstri_decomp() + Perform a reduction to generalized upper Hessenberg form. +Given A and B, this function overwrites A with an upper Hessenberg +matrix H = U^T A V and B with an upper triangular matrix R = U^T B V +with U and V orthogonal. + +See Golub & Van Loan, "Matrix Computations" (3rd ed) algorithm 7.7.1 + +Inputs: A - real square matrix + B - real square matrix + U - (output) if non-null, U is stored here on output + V - (output) if non-null, V is stored here on output + work - workspace (length n) + +Return: success or error +*/ + +int +gsl_linalg_hesstri_decomp(gsl_matrix * A, gsl_matrix * B, gsl_matrix * U, + gsl_matrix * V, gsl_vector * work) +{ + const size_t N = A->size1; + + if ((N != A->size2) || (N != B->size1) || (N != B->size2)) + { + GSL_ERROR ("Hessenberg-triangular reduction requires square matrices", + GSL_ENOTSQR); + } + else if (N != work->size) + { + GSL_ERROR ("length of workspace must match matrix dimension", + GSL_EBADLEN); + } + else + { + double cs, sn; /* rotation parameters */ + size_t i, j; /* looping */ + gsl_vector_view xv, yv; /* temporary views */ + + /* B -> Q^T B = R (upper triangular) */ + gsl_linalg_QR_decomp(B, work); + + /* A -> Q^T A */ + gsl_linalg_QR_QTmat(B, work, A); + + /* initialize U and V if desired */ + + if (U) + { + gsl_linalg_QR_unpack(B, work, U, B); + } + else + { + /* zero out lower triangle of B */ + for (j = 0; j < N - 1; ++j) + { + for (i = j + 1; i < N; ++i) + gsl_matrix_set(B, i, j, 0.0); + } + } + + if (V) + gsl_matrix_set_identity(V); + + if (N < 3) + return GSL_SUCCESS; /* nothing more to do */ + + /* reduce A and B */ + for (j = 0; j < N - 2; ++j) + { + for (i = N - 1; i >= (j + 2); --i) + { + /* step 1: rotate rows i - 1, i to kill A(i,j) */ + + /* + * compute G = [ CS SN ] so that G^t [ A(i-1,j) ] = [ * ] + * [-SN CS ] [ A(i, j) ] [ 0 ] + */ + create_givens(gsl_matrix_get(A, i - 1, j), + gsl_matrix_get(A, i, j), + &cs, + &sn); + /* invert so drot() works correctly (G -> G^t) */ + sn = -sn; + + /* compute G^t A(i-1:i, j:n) */ + xv = gsl_matrix_subrow(A, i - 1, j, N - j); + yv = gsl_matrix_subrow(A, i, j, N - j); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + /* compute G^t B(i-1:i, i-1:n) */ + xv = gsl_matrix_subrow(B, i - 1, i - 1, N - i + 1); + yv = gsl_matrix_subrow(B, i, i - 1, N - i + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (U) + { + /* accumulate U: U -> U G */ + xv = gsl_matrix_column(U, i - 1); + yv = gsl_matrix_column(U, i); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + + /* step 2: rotate columns i, i - 1 to kill B(i, i - 1) */ + + create_givens(-gsl_matrix_get(B, i, i), + gsl_matrix_get(B, i, i - 1), + &cs, + &sn); + /* invert so drot() works correctly (G -> G^t) */ + sn = -sn; + + /* compute B(1:i, i-1:i) G */ + xv = gsl_matrix_subcolumn(B, i - 1, 0, i + 1); + yv = gsl_matrix_subcolumn(B, i, 0, i + 1); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + /* apply to A(1:n, i-1:i) */ + xv = gsl_matrix_column(A, i - 1); + yv = gsl_matrix_column(A, i); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + + if (V) + { + /* accumulate V: V -> V G */ + xv = gsl_matrix_column(V, i - 1); + yv = gsl_matrix_column(V, i); + gsl_blas_drot(&xv.vector, &yv.vector, cs, sn); + } + } + } + + return GSL_SUCCESS; + } +} /* gsl_linalg_hesstri_decomp() */ diff --git a/software/gsl-1.15/linalg/hh.c b/software/gsl-1.15/linalg/hh.c new file mode 100644 index 000000000..3cee7ad74 --- /dev/null +++ b/software/gsl-1.15/linalg/hh.c @@ -0,0 +1,179 @@ +/* linalg/hh.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#define REAL double + +/* [Engeln-Mullges + Uhlig, Alg. 4.42] + */ + +int +gsl_linalg_HH_solve (gsl_matrix * A, const gsl_vector * b, gsl_vector * x) +{ + if (A->size1 > A->size2) + { + /* System is underdetermined. */ + + GSL_ERROR ("System is underdetermined", GSL_EINVAL); + } + else if (A->size2 != x->size) + { + GSL_ERROR ("matrix and vector sizes must be equal", GSL_EBADLEN); + } + else + { + int status ; + + gsl_vector_memcpy (x, b); + + status = gsl_linalg_HH_svx (A, x); + + return status ; + } +} + +int +gsl_linalg_HH_svx (gsl_matrix * A, gsl_vector * x) +{ + if (A->size1 > A->size2) + { + /* System is underdetermined. */ + + GSL_ERROR ("System is underdetermined", GSL_EINVAL); + } + else if (A->size2 != x->size) + { + GSL_ERROR ("matrix and vector sizes must be equal", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + const size_t M = A->size2; + size_t i, j, k; + REAL *d = (REAL *) malloc (N * sizeof (REAL)); + + if (d == 0) + { + GSL_ERROR ("could not allocate memory for workspace", GSL_ENOMEM); + } + + /* Perform Householder transformation. */ + + for (i = 0; i < N; i++) + { + const REAL aii = gsl_matrix_get (A, i, i); + REAL alpha; + REAL f; + REAL ak; + REAL max_norm = 0.0; + REAL r = 0.0; + + for (k = i; k < M; k++) + { + REAL aki = gsl_matrix_get (A, k, i); + r += aki * aki; + } + + if (r == 0.0) + { + /* Rank of matrix is less than size1. */ + free (d); + GSL_ERROR ("matrix is rank deficient", GSL_ESING); + } + + alpha = sqrt (r) * GSL_SIGN (aii); + + ak = 1.0 / (r + alpha * aii); + gsl_matrix_set (A, i, i, aii + alpha); + + d[i] = -alpha; + + for (k = i + 1; k < N; k++) + { + REAL norm = 0.0; + f = 0.0; + for (j = i; j < M; j++) + { + REAL ajk = gsl_matrix_get (A, j, k); + REAL aji = gsl_matrix_get (A, j, i); + norm += ajk * ajk; + f += ajk * aji; + } + max_norm = GSL_MAX (max_norm, norm); + + f *= ak; + + for (j = i; j < M; j++) + { + REAL ajk = gsl_matrix_get (A, j, k); + REAL aji = gsl_matrix_get (A, j, i); + gsl_matrix_set (A, j, k, ajk - f * aji); + } + } + + if (fabs (alpha) < 2.0 * GSL_DBL_EPSILON * sqrt (max_norm)) + { + /* Apparent singularity. */ + free (d); + GSL_ERROR("apparent singularity detected", GSL_ESING); + } + + /* Perform update of RHS. */ + + f = 0.0; + for (j = i; j < M; j++) + { + f += gsl_vector_get (x, j) * gsl_matrix_get (A, j, i); + } + f *= ak; + for (j = i; j < M; j++) + { + REAL xj = gsl_vector_get (x, j); + REAL aji = gsl_matrix_get (A, j, i); + gsl_vector_set (x, j, xj - f * aji); + } + } + + /* Perform back-substitution. */ + + for (i = N; i-- > 0;) + { + REAL xi = gsl_vector_get (x, i); + REAL sum = 0.0; + for (k = i + 1; k < N; k++) + { + sum += gsl_matrix_get (A, i, k) * gsl_vector_get (x, k); + } + + gsl_vector_set (x, i, (xi - sum) / d[i]); + } + + free (d); + return GSL_SUCCESS; + } +} + diff --git a/software/gsl-1.15/linalg/householder.c b/software/gsl-1.15/linalg/householder.c new file mode 100644 index 000000000..65a6385cc --- /dev/null +++ b/software/gsl-1.15/linalg/householder.c @@ -0,0 +1,339 @@ +/* linalg/householder.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007, 2010 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include + +double +gsl_linalg_householder_transform (gsl_vector * v) +{ + /* replace v[0:n-1] with a householder vector (v[0:n-1]) and + coefficient tau that annihilate v[1:n-1] */ + + const size_t n = v->size ; + + if (n == 1) + { + return 0.0; /* tau = 0 */ + } + else + { + double alpha, beta, tau ; + + gsl_vector_view x = gsl_vector_subvector (v, 1, n - 1) ; + + double xnorm = gsl_blas_dnrm2 (&x.vector); + + if (xnorm == 0) + { + return 0.0; /* tau = 0 */ + } + + alpha = gsl_vector_get (v, 0) ; + beta = - (alpha >= 0.0 ? +1.0 : -1.0) * hypot(alpha, xnorm) ; + tau = (beta - alpha) / beta ; + + { + double s = (alpha - beta); + + if (fabs(s) > GSL_DBL_MIN) + { + gsl_blas_dscal (1.0 / s, &x.vector); + gsl_vector_set (v, 0, beta) ; + } + else + { + gsl_blas_dscal (GSL_DBL_EPSILON / s, &x.vector); + gsl_blas_dscal (1.0 / GSL_DBL_EPSILON, &x.vector); + gsl_vector_set (v, 0, beta) ; + } + } + + return tau; + } +} + +int +gsl_linalg_householder_hm (double tau, const gsl_vector * v, gsl_matrix * A) +{ + /* applies a householder transformation v,tau to matrix m */ + + if (tau == 0.0) + { + return GSL_SUCCESS; + } + +#ifdef USE_BLAS + { + gsl_vector_const_view v1 = gsl_vector_const_subvector (v, 1, v->size - 1); + gsl_matrix_view A1 = gsl_matrix_submatrix (A, 1, 0, A->size1 - 1, A->size2); + size_t j; + + for (j = 0; j < A->size2; j++) + { + double wj = 0.0; + gsl_vector_view A1j = gsl_matrix_column(&A1.matrix, j); + gsl_blas_ddot (&A1j.vector, &v1.vector, &wj); + wj += gsl_matrix_get(A,0,j); + + { + double A0j = gsl_matrix_get (A, 0, j); + gsl_matrix_set (A, 0, j, A0j - tau * wj); + } + + gsl_blas_daxpy (-tau * wj, &v1.vector, &A1j.vector); + } + } +#else + { + size_t i, j; + + for (j = 0; j < A->size2; j++) + { + /* Compute wj = Akj vk */ + + double wj = gsl_matrix_get(A,0,j); + + for (i = 1; i < A->size1; i++) /* note, computed for v(0) = 1 above */ + { + wj += gsl_matrix_get(A,i,j) * gsl_vector_get(v,i); + } + + /* Aij = Aij - tau vi wj */ + + /* i = 0 */ + { + double A0j = gsl_matrix_get (A, 0, j); + gsl_matrix_set (A, 0, j, A0j - tau * wj); + } + + /* i = 1 .. M-1 */ + + for (i = 1; i < A->size1; i++) + { + double Aij = gsl_matrix_get (A, i, j); + double vi = gsl_vector_get (v, i); + gsl_matrix_set (A, i, j, Aij - tau * vi * wj); + } + } + } +#endif + + return GSL_SUCCESS; +} + +int +gsl_linalg_householder_mh (double tau, const gsl_vector * v, gsl_matrix * A) +{ + /* applies a householder transformation v,tau to matrix m from the + right hand side in order to zero out rows */ + + if (tau == 0) + return GSL_SUCCESS; + + /* A = A - tau w v' */ + +#ifdef USE_BLAS + { + gsl_vector_const_view v1 = gsl_vector_const_subvector (v, 1, v->size - 1); + gsl_matrix_view A1 = gsl_matrix_submatrix (A, 0, 1, A->size1, A->size2-1); + size_t i; + + for (i = 0; i < A->size1; i++) + { + double wi = 0.0; + gsl_vector_view A1i = gsl_matrix_row(&A1.matrix, i); + gsl_blas_ddot (&A1i.vector, &v1.vector, &wi); + wi += gsl_matrix_get(A,i,0); + + { + double Ai0 = gsl_matrix_get (A, i, 0); + gsl_matrix_set (A, i, 0, Ai0 - tau * wi); + } + + gsl_blas_daxpy(-tau * wi, &v1.vector, &A1i.vector); + } + } +#else + { + size_t i, j; + + for (i = 0; i < A->size1; i++) + { + double wi = gsl_matrix_get(A,i,0); + + for (j = 1; j < A->size2; j++) /* note, computed for v(0) = 1 above */ + { + wi += gsl_matrix_get(A,i,j) * gsl_vector_get(v,j); + } + + /* j = 0 */ + + { + double Ai0 = gsl_matrix_get (A, i, 0); + gsl_matrix_set (A, i, 0, Ai0 - tau * wi); + } + + /* j = 1 .. N-1 */ + + for (j = 1; j < A->size2; j++) + { + double vj = gsl_vector_get (v, j); + double Aij = gsl_matrix_get (A, i, j); + gsl_matrix_set (A, i, j, Aij - tau * wi * vj); + } + } + } +#endif + + return GSL_SUCCESS; +} + +int +gsl_linalg_householder_hv (double tau, const gsl_vector * v, gsl_vector * w) +{ + /* applies a householder transformation v to vector w */ + const size_t N = v->size; + + if (tau == 0) + return GSL_SUCCESS ; + + { + /* compute d = v'w */ + + double d0 = gsl_vector_get(w,0); + double d1, d; + + gsl_vector_const_view v1 = gsl_vector_const_subvector(v, 1, N-1); + gsl_vector_view w1 = gsl_vector_subvector(w, 1, N-1); + + gsl_blas_ddot (&v1.vector, &w1.vector, &d1); + + d = d0 + d1; + + /* compute w = w - tau (v) (v'w) */ + + { + double w0 = gsl_vector_get (w,0); + gsl_vector_set (w, 0, w0 - tau * d); + } + + gsl_blas_daxpy (-tau * d, &v1.vector, &w1.vector); + } + + return GSL_SUCCESS; +} + + +int +gsl_linalg_householder_hm1 (double tau, gsl_matrix * A) +{ + /* applies a householder transformation v,tau to a matrix being + build up from the identity matrix, using the first column of A as + a householder vector */ + + if (tau == 0) + { + size_t i,j; + + gsl_matrix_set (A, 0, 0, 1.0); + + for (j = 1; j < A->size2; j++) + { + gsl_matrix_set (A, 0, j, 0.0); + } + + for (i = 1; i < A->size1; i++) + { + gsl_matrix_set (A, i, 0, 0.0); + } + + return GSL_SUCCESS; + } + + /* w = A' v */ + +#ifdef USE_BLAS + { + gsl_matrix_view A1 = gsl_matrix_submatrix (A, 1, 0, A->size1 - 1, A->size2); + gsl_vector_view v1 = gsl_matrix_column (&A1.matrix, 0); + size_t j; + + for (j = 1; j < A->size2; j++) + { + double wj = 0.0; /* A0j * v0 */ + + gsl_vector_view A1j = gsl_matrix_column(&A1.matrix, j); + gsl_blas_ddot (&A1j.vector, &v1.vector, &wj); + + /* A = A - tau v w' */ + + gsl_matrix_set (A, 0, j, - tau * wj); + + gsl_blas_daxpy(-tau*wj, &v1.vector, &A1j.vector); + } + + gsl_blas_dscal(-tau, &v1.vector); + + gsl_matrix_set (A, 0, 0, 1.0 - tau); + } +#else + { + size_t i, j; + + for (j = 1; j < A->size2; j++) + { + double wj = 0.0; /* A0j * v0 */ + + for (i = 1; i < A->size1; i++) + { + double vi = gsl_matrix_get(A, i, 0); + wj += gsl_matrix_get(A,i,j) * vi; + } + + /* A = A - tau v w' */ + + gsl_matrix_set (A, 0, j, - tau * wj); + + for (i = 1; i < A->size1; i++) + { + double vi = gsl_matrix_get (A, i, 0); + double Aij = gsl_matrix_get (A, i, j); + gsl_matrix_set (A, i, j, Aij - tau * vi * wj); + } + } + + for (i = 1; i < A->size1; i++) + { + double vi = gsl_matrix_get(A, i, 0); + gsl_matrix_set(A, i, 0, -tau * vi); + } + + gsl_matrix_set (A, 0, 0, 1.0 - tau); + } +#endif + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/linalg/householdercomplex.c b/software/gsl-1.15/linalg/householdercomplex.c new file mode 100644 index 000000000..f82f2cc0f --- /dev/null +++ b/software/gsl-1.15/linalg/householdercomplex.c @@ -0,0 +1,260 @@ +/* linalg/householdercomplex.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Computes a householder transformation matrix H such that + * + * H' v = -/+ |v| e_1 + * + * where e_1 is the first unit vector. On exit the matrix H can be + * computed from the return values (tau, v) + * + * H = I - tau * w * w' + * + * where w = (1, v(2), ..., v(N)). The nonzero element of the result + * vector -/+|v| e_1 is stored in v(1). + * + * Note that the matrix H' in the householder transformation is the + * hermitian conjugate of H. To compute H'v, pass the conjugate of + * tau as the first argument to gsl_linalg_householder_hm() rather + * than tau itself. See the LAPACK function CLARFG for details of this + * convention. */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +gsl_complex +gsl_linalg_complex_householder_transform (gsl_vector_complex * v) +{ + /* replace v[0:n-1] with a householder vector (v[0:n-1]) and + coefficient tau that annihilate v[1:n-1] */ + + const size_t n = v->size ; + + if (n == 1) + { + gsl_complex alpha = gsl_vector_complex_get (v, 0) ; + double absa = gsl_complex_abs (alpha); + double beta_r = - (GSL_REAL(alpha) >= 0 ? +1 : -1) * absa ; + + gsl_complex tau; + + if (beta_r == 0.0) + { + GSL_REAL(tau) = 0.0; + GSL_IMAG(tau) = 0.0; + } + else + { + GSL_REAL(tau) = (beta_r - GSL_REAL(alpha)) / beta_r ; + GSL_IMAG(tau) = - GSL_IMAG(alpha) / beta_r ; + + { + gsl_complex beta = gsl_complex_rect (beta_r, 0.0); + gsl_vector_complex_set (v, 0, beta) ; + } + } + + return tau; + } + else + { + gsl_complex tau ; + double beta_r; + + gsl_vector_complex_view x = gsl_vector_complex_subvector (v, 1, n - 1) ; + gsl_complex alpha = gsl_vector_complex_get (v, 0) ; + double absa = gsl_complex_abs (alpha); + double xnorm = gsl_blas_dznrm2 (&x.vector); + + if (xnorm == 0 && GSL_IMAG(alpha) == 0) + { + gsl_complex zero = gsl_complex_rect(0.0, 0.0); + return zero; /* tau = 0 */ + } + + beta_r = - (GSL_REAL(alpha) >= 0 ? +1 : -1) * hypot(absa, xnorm) ; + + GSL_REAL(tau) = (beta_r - GSL_REAL(alpha)) / beta_r ; + GSL_IMAG(tau) = - GSL_IMAG(alpha) / beta_r ; + + { + gsl_complex amb = gsl_complex_sub_real(alpha, beta_r); + gsl_complex s = gsl_complex_inverse(amb); + gsl_blas_zscal (s, &x.vector); + } + + { + gsl_complex beta = gsl_complex_rect (beta_r, 0.0); + gsl_vector_complex_set (v, 0, beta) ; + } + + return tau; + } +} + +int +gsl_linalg_complex_householder_hm (gsl_complex tau, const gsl_vector_complex * v, gsl_matrix_complex * A) +{ + /* applies a householder transformation v,tau to matrix m */ + + size_t i, j; + + if (GSL_REAL(tau) == 0.0 && GSL_IMAG(tau) == 0.0) + { + return GSL_SUCCESS; + } + + /* w = (v' A)^T */ + + for (j = 0; j < A->size2; j++) + { + gsl_complex tauwj; + gsl_complex wj = gsl_matrix_complex_get(A,0,j); + + for (i = 1; i < A->size1; i++) /* note, computed for v(0) = 1 above */ + { + gsl_complex Aij = gsl_matrix_complex_get(A,i,j); + gsl_complex vi = gsl_vector_complex_get(v,i); + gsl_complex Av = gsl_complex_mul (Aij, gsl_complex_conjugate(vi)); + wj = gsl_complex_add (wj, Av); + } + + tauwj = gsl_complex_mul (tau, wj); + + /* A = A - v w^T */ + + { + gsl_complex A0j = gsl_matrix_complex_get (A, 0, j); + gsl_complex Atw = gsl_complex_sub (A0j, tauwj); + /* store A0j - tau * wj */ + gsl_matrix_complex_set (A, 0, j, Atw); + } + + for (i = 1; i < A->size1; i++) + { + gsl_complex vi = gsl_vector_complex_get (v, i); + gsl_complex tauvw = gsl_complex_mul(vi, tauwj); + gsl_complex Aij = gsl_matrix_complex_get (A, i, j); + gsl_complex Atwv = gsl_complex_sub (Aij, tauvw); + /* store Aij - tau * vi * wj */ + gsl_matrix_complex_set (A, i, j, Atwv); + } + } + + return GSL_SUCCESS; +} + +int +gsl_linalg_complex_householder_mh (gsl_complex tau, const gsl_vector_complex * v, gsl_matrix_complex * A) +{ + /* applies a householder transformation v,tau to matrix m on the right */ + + size_t i, j; + + if (GSL_REAL(tau) == 0.0 && GSL_IMAG(tau) == 0.0) + { + return GSL_SUCCESS; + } + + /* A -> A - A*tau*v*v^h */ + + for (i = 0; i < A->size1; i++) + { + gsl_complex tauwi; + gsl_complex Ai0 = gsl_matrix_complex_get (A, i, 0); + gsl_complex wi = Ai0; + + /* compute w = A v */ + for (j = 1; j < A->size2; j++) /* note, computed for v(0) = 1 above */ + { + gsl_complex Aij = gsl_matrix_complex_get(A, i, j); + gsl_complex vj = gsl_vector_complex_get(v, j); + gsl_complex Av = gsl_complex_mul (Aij, vj); + wi = gsl_complex_add (wi, Av); + } + + tauwi = gsl_complex_mul (tau, wi); + + /* A = A - w v^H */ + + { + gsl_complex Atw = gsl_complex_sub (Ai0, tauwi); + /* store Ai0 - tau * wi */ + gsl_matrix_complex_set (A, i, 0, Atw); + } + + for (j = 1; j < A->size2; j++) + { + gsl_complex vj = gsl_vector_complex_get (v, j); + gsl_complex tauwv = gsl_complex_mul(gsl_complex_conjugate(vj), tauwi); + gsl_complex Aij = gsl_matrix_complex_get (A, i, j); + gsl_complex Atwv = gsl_complex_sub (Aij, tauwv); + /* store Aij - tau * wi * conj(vj) */ + gsl_matrix_complex_set (A, i, j, Atwv); + } + } + + return GSL_SUCCESS; +} + +int +gsl_linalg_complex_householder_hv (gsl_complex tau, const gsl_vector_complex * v, gsl_vector_complex * w) +{ + const size_t N = v->size; + + if (GSL_REAL(tau) == 0.0 && GSL_IMAG(tau) == 0.0) + return GSL_SUCCESS; + + { + /* compute z = v'w */ + + gsl_complex z0 = gsl_vector_complex_get(w,0); + gsl_complex z1, z; + gsl_complex tz, ntz; + + gsl_vector_complex_const_view v1 = gsl_vector_complex_const_subvector(v, 1, N-1); + gsl_vector_complex_view w1 = gsl_vector_complex_subvector(w, 1, N-1); + + gsl_blas_zdotc(&v1.vector, &w1.vector, &z1); + + z = gsl_complex_add (z0, z1); + + tz = gsl_complex_mul(tau, z); + ntz = gsl_complex_negative (tz); + + /* compute w = w - tau * (v'w) * v */ + + { + gsl_complex w0 = gsl_vector_complex_get(w, 0); + gsl_complex w0ntz = gsl_complex_add (w0, ntz); + gsl_vector_complex_set (w, 0, w0ntz); + } + + gsl_blas_zaxpy(ntz, &v1.vector, &w1.vector); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/linalg/lq.c b/software/gsl-1.15/linalg/lq.c new file mode 100644 index 000000000..d513a32a8 --- /dev/null +++ b/software/gsl-1.15/linalg/lq.c @@ -0,0 +1,565 @@ +/* linalg/lq.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * Copyright (C) 2004 Joerg Wensch, modifications for LQ. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "givens.c" +#include "apply_givens.c" + +/* Note: The standard in numerical linear algebra is to solve A x = b + * resp. ||A x - b||_2 -> min by QR-decompositions where x, b are + * column vectors. + * + * When the matrix A has a large number of rows it is much more + * efficient to work with the transposed matrix A^T and to solve the + * system x^T A = b^T resp. ||x^T A - b^T||_2 -> min. This is caused + * by the row-oriented format in which GSL stores matrices. Therefore + * the QR-decomposition of A has to be replaced by a LQ decomposition + * of A^T + * + * The purpose of this package is to provide the algorithms to compute + * the LQ-decomposition and to solve the linear equations resp. least + * squares problems. The dimensions N, M of the matrix are switched + * because here A will probably be a transposed matrix. We write x^T, + * b^T,... for vectors the comments to emphasize that they are row + * vectors. + * + * It may even be useful to transpose your matrix explicitly (assumed + * that there are no memory restrictions) because this takes O(M x N) + * computing time where the decompostion takes O(M x N^2) computing + * time. */ + +/* Factorise a general N x M matrix A into + * + * A = L Q + * + * where Q is orthogonal (M x M) and L is lower triangular (N x M). + * + * Q is stored as a packed set of Householder transformations in the + * strict upper triangular part of the input matrix. + * + * R is stored in the diagonal and lower triangle of the input matrix. + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i+1,i), m(i+2,i), ... , m(M,i)] + * + * This storage scheme is the same as in LAPACK. */ + +int +gsl_linalg_LQ_decomp (gsl_matrix * A, gsl_vector * tau) +{ + const size_t N = A->size1; + const size_t M = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i; + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + gsl_vector_view c_full = gsl_matrix_row (A, i); + gsl_vector_view c = gsl_vector_subvector (&(c_full.vector), i, M-i); + + double tau_i = gsl_linalg_householder_transform (&(c.vector)); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns and + update the norms */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i + 1, i, N - (i + 1), M - i ); + gsl_linalg_householder_mh (tau_i, &(c.vector), &(m.matrix)); + } + } + + return GSL_SUCCESS; + } +} + +/* Solves the system x^T A = b^T using the LQ factorisation, + + * x^T L = b^T Q^T + * + * to obtain x. Based on SLATEC code. + */ + + +int +gsl_linalg_LQ_solve_T (const gsl_matrix * LQ, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve for x */ + + gsl_linalg_LQ_svx_T (LQ, tau, x); + + return GSL_SUCCESS; + } +} + +/* Solves the system x^T A = b^T in place using the LQ factorisation, + * + * x^T L = b^T Q^T + * + * to obtain x. Based on SLATEC code. + */ + +int +gsl_linalg_LQ_svx_T (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * x) +{ + + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match x/rhs size", GSL_EBADLEN); + } + else + { + /* compute rhs = Q^T b */ + + gsl_linalg_LQ_vecQT (LQ, tau, x); + + /* Solve R x = rhs, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } +} + + +/* Find the least squares solution to the overdetermined system + * + * x^T A = b^T + * + * for M >= N using the LQ factorization A = L Q. + */ + +int +gsl_linalg_LQ_lssolve_T (const gsl_matrix * LQ, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x, gsl_vector * residual) +{ + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (M < N) + { + GSL_ERROR ("LQ matrix must have M>=N", GSL_EBADLEN); + } + else if (M != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (N != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (M != residual->size) + { + GSL_ERROR ("matrix size must match residual size", GSL_EBADLEN); + } + else + { + gsl_matrix_const_view L = gsl_matrix_const_submatrix (LQ, 0, 0, N, N); + gsl_vector_view c = gsl_vector_subvector(residual, 0, N); + + gsl_vector_memcpy(residual, b); + + /* compute rhs = b^T Q^T */ + + gsl_linalg_LQ_vecQT (LQ, tau, residual); + + /* Solve x^T L = rhs */ + + gsl_vector_memcpy(x, &(c.vector)); + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, &(L.matrix), x); + + /* Compute residual = b^T - x^T A = (b^T Q^T - x^T L) Q */ + + gsl_vector_set_zero(&(c.vector)); + + gsl_linalg_LQ_vecQ(LQ, tau, residual); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_LQ_Lsolve_T (const gsl_matrix * LQ, const gsl_vector * b, gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_LQ_Lsvx_T (const gsl_matrix * LQ, gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match rhs size", GSL_EBADLEN); + } + else + { + /* Solve x^T L = b^T, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_L_solve_T (const gsl_matrix * L, const gsl_vector * b, gsl_vector * x) +{ + if (L->size1 != L->size2) + { + GSL_ERROR ("R matrix must be square", GSL_ENOTSQR); + } + else if (L->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (L->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x inplace in b */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + return GSL_SUCCESS; + } +} + + + + +int +gsl_linalg_LQ_vecQT (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * v) +{ + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be M", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute v Q^T */ + + for (i = 0; i < GSL_MIN (M, N); i++) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), + i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &(h.vector), &(w.vector)); + } + return GSL_SUCCESS; + } +} + +int +gsl_linalg_LQ_vecQ (const gsl_matrix * LQ, const gsl_vector * tau, gsl_vector * v) +{ + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be M", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute v Q^T */ + + for (i = GSL_MIN (M, N); i-- > 0;) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), + i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &(h.vector), &(w.vector)); + } + return GSL_SUCCESS; + } +} + + +/* Form the orthogonal matrix Q from the packed LQ matrix */ + +int +gsl_linalg_LQ_unpack (const gsl_matrix * LQ, const gsl_vector * tau, gsl_matrix * Q, gsl_matrix * L) +{ + const size_t N = LQ->size1; + const size_t M = LQ->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be M x M", GSL_ENOTSQR); + } + else if (L->size1 != N || L->size2 != M) + { + GSL_ERROR ("R matrix must be N x M", GSL_ENOTSQR); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i, j, l_border; + + /* Initialize Q to the identity */ + + gsl_matrix_set_identity (Q); + + for (i = GSL_MIN (M, N); i-- > 0;) + { + gsl_vector_const_view c = gsl_matrix_const_row (LQ, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, + i, M - i); + gsl_matrix_view m = gsl_matrix_submatrix (Q, i, i, M - i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_mh (ti, &h.vector, &m.matrix); + } + + /* Form the lower triangular matrix L from a packed LQ matrix */ + + for (i = 0; i < N; i++) + { + l_border=GSL_MIN(i,M-1); + for (j = 0; j <= l_border ; j++) + gsl_matrix_set (L, i, j, gsl_matrix_get (LQ, i, j)); + + for (j = l_border+1; j < M; j++) + gsl_matrix_set (L, i, j, 0.0); + } + + return GSL_SUCCESS; + } +} + + +/* Update a LQ factorisation for A= L Q , A' = A + v u^T, + + * L' Q' = LQ + v u^T + * = (L + v u^T Q^T) Q + * = (L + v w^T) Q + * + * where w = Q u. + * + * Algorithm from Golub and Van Loan, "Matrix Computations", Section + * 12.5 (Updating Matrix Factorizations, Rank-One Changes) + */ + +int +gsl_linalg_LQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_vector * v, gsl_vector * w) +{ + const size_t N = L->size1; + const size_t M = L->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be N x N if L is M x N", GSL_ENOTSQR); + } + else if (w->size != M) + { + GSL_ERROR ("w must be length N if L is M x N", GSL_EBADLEN); + } + else if (v->size != N) + { + GSL_ERROR ("v must be length M if L is M x N", GSL_EBADLEN); + } + else + { + size_t j, k; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to L, H = J_1^T ... J^T_(n-1) L + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) /* loop from k = M-1 to 1 */ + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in v w^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double lj0 = gsl_matrix_get (L, j, 0); + double vj = gsl_vector_get (v, j); + gsl_matrix_set (L, j, 0, lj0 + w0 * vj); + } + + /* Apply Givens transformations L' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < GSL_MIN(M,N+1); k++) + { + double c, s; + double diag = gsl_matrix_get (L, k - 1, k - 1); + double offdiag = gsl_matrix_get (L, k - 1 , k); + + create_givens (diag, offdiag, &c, &s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + + gsl_matrix_set (L, k - 1, k, 0.0); /* exact zero of G^T */ + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_LQ_LQsolve (gsl_matrix * Q, gsl_matrix * L, const gsl_vector * b, gsl_vector * x) +{ + const size_t N = L->size1; + const size_t M = L->size2; + + if (M != N) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != M || b->size != M || x->size != M) + { + return GSL_EBADLEN; + } + else + { + /* compute sol = b^T Q^T */ + + gsl_blas_dgemv (CblasNoTrans, 1.0, Q, b, 0.0, x); + + /* Solve x^T L = sol, storing x in-place */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/lu.c b/software/gsl-1.15/linalg/lu.c new file mode 100644 index 000000000..150320f94 --- /dev/null +++ b/software/gsl-1.15/linalg/lu.c @@ -0,0 +1,348 @@ +/* linalg/lu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define REAL double +static int singular (const gsl_matrix * LU); + +/* Factorise a general N x N matrix A into, + * + * P A = L U + * + * where P is a permutation matrix, L is unit lower triangular and U + * is upper triangular. + * + * L is stored in the strict lower triangular part of the input + * matrix. The diagonal elements of L are unity and are not stored. + * + * U is stored in the diagonal and upper triangular part of the + * input matrix. + * + * P is stored in the permutation p. Column j of P is column k of the + * identity matrix, where k = permutation->data[j] + * + * signum gives the sign of the permutation, (-1)^n, where n is the + * number of interchanges in the permutation. + * + * See Golub & Van Loan, Matrix Computations, Algorithm 3.4.1 (Gauss + * Elimination with Partial Pivoting). + */ + +int +gsl_linalg_LU_decomp (gsl_matrix * A, gsl_permutation * p, int *signum) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("LU decomposition requires square matrix", GSL_ENOTSQR); + } + else if (p->size != A->size1) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + size_t i, j, k; + + *signum = 1; + gsl_permutation_init (p); + + for (j = 0; j < N - 1; j++) + { + /* Find maximum in the j-th column */ + + REAL ajj, max = fabs (gsl_matrix_get (A, j, j)); + size_t i_pivot = j; + + for (i = j + 1; i < N; i++) + { + REAL aij = fabs (gsl_matrix_get (A, i, j)); + + if (aij > max) + { + max = aij; + i_pivot = i; + } + } + + if (i_pivot != j) + { + gsl_matrix_swap_rows (A, j, i_pivot); + gsl_permutation_swap (p, j, i_pivot); + *signum = -(*signum); + } + + ajj = gsl_matrix_get (A, j, j); + + if (ajj != 0.0) + { + for (i = j + 1; i < N; i++) + { + REAL aij = gsl_matrix_get (A, i, j) / ajj; + gsl_matrix_set (A, i, j, aij); + + for (k = j + 1; k < N; k++) + { + REAL aik = gsl_matrix_get (A, i, k); + REAL ajk = gsl_matrix_get (A, j, k); + gsl_matrix_set (A, i, k, aik - aij * ajk); + } + } + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_LU_solve (const gsl_matrix * LU, const gsl_permutation * p, const gsl_vector * b, gsl_vector * x) +{ + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LU->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + int status; + + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve for x */ + + status = gsl_linalg_LU_svx (LU, p, x); + + return status; + } +} + + +int +gsl_linalg_LU_svx (const gsl_matrix * LU, const gsl_permutation * p, gsl_vector * x) +{ + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution/rhs size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + /* Apply permutation to RHS */ + + gsl_permute_vector (p, x); + + /* Solve for c using forward-substitution, L c = P b */ + + gsl_blas_dtrsv (CblasLower, CblasNoTrans, CblasUnit, LU, x); + + /* Perform back-substitution, U x = c */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, LU, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_LU_refine (const gsl_matrix * A, const gsl_matrix * LU, const gsl_permutation * p, const gsl_vector * b, gsl_vector * x, gsl_vector * residual) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix a must be square", GSL_ENOTSQR); + } + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (A->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be decomposition of a", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LU->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + int status; + + /* Compute residual, residual = (A * x - b) */ + + gsl_vector_memcpy (residual, b); + gsl_blas_dgemv (CblasNoTrans, 1.0, A, x, -1.0, residual); + + /* Find correction, delta = - (A^-1) * residual, and apply it */ + + status = gsl_linalg_LU_svx (LU, p, residual); + gsl_blas_daxpy (-1.0, residual, x); + + return status; + } +} + +int +gsl_linalg_LU_invert (const gsl_matrix * LU, const gsl_permutation * p, gsl_matrix * inverse) +{ + size_t i, n = LU->size1; + + int status = GSL_SUCCESS; + + if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + + gsl_matrix_set_identity (inverse); + + for (i = 0; i < n; i++) + { + gsl_vector_view c = gsl_matrix_column (inverse, i); + int status_i = gsl_linalg_LU_svx (LU, p, &(c.vector)); + + if (status_i) + status = status_i; + } + + return status; +} + +double +gsl_linalg_LU_det (gsl_matrix * LU, int signum) +{ + size_t i, n = LU->size1; + + double det = (double) signum; + + for (i = 0; i < n; i++) + { + det *= gsl_matrix_get (LU, i, i); + } + + return det; +} + + +double +gsl_linalg_LU_lndet (gsl_matrix * LU) +{ + size_t i, n = LU->size1; + + double lndet = 0.0; + + for (i = 0; i < n; i++) + { + lndet += log (fabs (gsl_matrix_get (LU, i, i))); + } + + return lndet; +} + +int +gsl_linalg_LU_sgndet (gsl_matrix * LU, int signum) +{ + size_t i, n = LU->size1; + + int s = signum; + + for (i = 0; i < n; i++) + { + double u = gsl_matrix_get (LU, i, i); + + if (u < 0) + { + s *= -1; + } + else if (u == 0) + { + s = 0; + break; + } + } + + return s; +} + +static int +singular (const gsl_matrix * LU) +{ + size_t i, n = LU->size1; + + for (i = 0; i < n; i++) + { + double u = gsl_matrix_get (LU, i, i); + if (u == 0) return 1; + } + + return 0; +} + diff --git a/software/gsl-1.15/linalg/luc.c b/software/gsl-1.15/linalg/luc.c new file mode 100644 index 000000000..e169bb86a --- /dev/null +++ b/software/gsl-1.15/linalg/luc.c @@ -0,0 +1,366 @@ +/* linalg/luc.c + * + * Copyright (C) 2001, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static int singular (const gsl_matrix_complex * LU); + +/* Factorise a general N x N complex matrix A into, + * + * P A = L U + * + * where P is a permutation matrix, L is unit lower triangular and U + * is upper triangular. + * + * L is stored in the strict lower triangular part of the input + * matrix. The diagonal elements of L are unity and are not stored. + * + * U is stored in the diagonal and upper triangular part of the + * input matrix. + * + * P is stored in the permutation p. Column j of P is column k of the + * identity matrix, where k = permutation->data[j] + * + * signum gives the sign of the permutation, (-1)^n, where n is the + * number of interchanges in the permutation. + * + * See Golub & Van Loan, Matrix Computations, Algorithm 3.4.1 (Gauss + * Elimination with Partial Pivoting). + */ + +int +gsl_linalg_complex_LU_decomp (gsl_matrix_complex * A, gsl_permutation * p, int *signum) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("LU decomposition requires square matrix", GSL_ENOTSQR); + } + else if (p->size != A->size1) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + size_t i, j, k; + + *signum = 1; + gsl_permutation_init (p); + + for (j = 0; j < N - 1; j++) + { + /* Find maximum in the j-th column */ + + gsl_complex ajj = gsl_matrix_complex_get (A, j, j); + double max = gsl_complex_abs (ajj); + size_t i_pivot = j; + + for (i = j + 1; i < N; i++) + { + gsl_complex aij = gsl_matrix_complex_get (A, i, j); + double ai = gsl_complex_abs (aij); + + if (ai > max) + { + max = ai; + i_pivot = i; + } + } + + if (i_pivot != j) + { + gsl_matrix_complex_swap_rows (A, j, i_pivot); + gsl_permutation_swap (p, j, i_pivot); + *signum = -(*signum); + } + + ajj = gsl_matrix_complex_get (A, j, j); + + if (!(GSL_REAL(ajj) == 0.0 && GSL_IMAG(ajj) == 0.0)) + { + for (i = j + 1; i < N; i++) + { + gsl_complex aij_orig = gsl_matrix_complex_get (A, i, j); + gsl_complex aij = gsl_complex_div (aij_orig, ajj); + gsl_matrix_complex_set (A, i, j, aij); + + for (k = j + 1; k < N; k++) + { + gsl_complex aik = gsl_matrix_complex_get (A, i, k); + gsl_complex ajk = gsl_matrix_complex_get (A, j, k); + + /* aik = aik - aij * ajk */ + + gsl_complex aijajk = gsl_complex_mul (aij, ajk); + gsl_complex aik_new = gsl_complex_sub (aik, aijajk); + + gsl_matrix_complex_set (A, i, k, aik_new); + } + } + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_complex_LU_solve (const gsl_matrix_complex * LU, const gsl_permutation * p, const gsl_vector_complex * b, gsl_vector_complex * x) +{ + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LU->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + int status; + + /* Copy x <- b */ + + gsl_vector_complex_memcpy (x, b); + + /* Solve for x */ + + status = gsl_linalg_complex_LU_svx (LU, p, x); + + return status; + } +} + + +int +gsl_linalg_complex_LU_svx (const gsl_matrix_complex * LU, const gsl_permutation * p, gsl_vector_complex * x) +{ + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution/rhs size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + /* Apply permutation to RHS */ + + gsl_permute_vector_complex (p, x); + + /* Solve for c using forward-substitution, L c = P b */ + + gsl_blas_ztrsv (CblasLower, CblasNoTrans, CblasUnit, LU, x); + + /* Perform back-substitution, U x = c */ + + gsl_blas_ztrsv (CblasUpper, CblasNoTrans, CblasNonUnit, LU, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_complex_LU_refine (const gsl_matrix_complex * A, const gsl_matrix_complex * LU, const gsl_permutation * p, const gsl_vector_complex * b, gsl_vector_complex * x, gsl_vector_complex * residual) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix a must be square", GSL_ENOTSQR); + } + if (LU->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be square", GSL_ENOTSQR); + } + else if (A->size1 != LU->size2) + { + GSL_ERROR ("LU matrix must be decomposition of a", GSL_ENOTSQR); + } + else if (LU->size1 != p->size) + { + GSL_ERROR ("permutation length must match matrix size", GSL_EBADLEN); + } + else if (LU->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LU->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (singular (LU)) + { + GSL_ERROR ("matrix is singular", GSL_EDOM); + } + else + { + int status; + + /* Compute residual, residual = (A * x - b) */ + + gsl_vector_complex_memcpy (residual, b); + + { + gsl_complex one = GSL_COMPLEX_ONE; + gsl_complex negone = GSL_COMPLEX_NEGONE; + gsl_blas_zgemv (CblasNoTrans, one, A, x, negone, residual); + } + + /* Find correction, delta = - (A^-1) * residual, and apply it */ + + status = gsl_linalg_complex_LU_svx (LU, p, residual); + + { + gsl_complex negone= GSL_COMPLEX_NEGONE; + gsl_blas_zaxpy (negone, residual, x); + } + + return status; + } +} + +int +gsl_linalg_complex_LU_invert (const gsl_matrix_complex * LU, const gsl_permutation * p, gsl_matrix_complex * inverse) +{ + size_t i, n = LU->size1; + + int status = GSL_SUCCESS; + + gsl_matrix_complex_set_identity (inverse); + + for (i = 0; i < n; i++) + { + gsl_vector_complex_view c = gsl_matrix_complex_column (inverse, i); + int status_i = gsl_linalg_complex_LU_svx (LU, p, &(c.vector)); + + if (status_i) + status = status_i; + } + + return status; +} + +gsl_complex +gsl_linalg_complex_LU_det (gsl_matrix_complex * LU, int signum) +{ + size_t i, n = LU->size1; + + gsl_complex det = gsl_complex_rect((double) signum, 0.0); + + for (i = 0; i < n; i++) + { + gsl_complex zi = gsl_matrix_complex_get (LU, i, i); + det = gsl_complex_mul (det, zi); + } + + return det; +} + + +double +gsl_linalg_complex_LU_lndet (gsl_matrix_complex * LU) +{ + size_t i, n = LU->size1; + + double lndet = 0.0; + + for (i = 0; i < n; i++) + { + gsl_complex z = gsl_matrix_complex_get (LU, i, i); + lndet += log (gsl_complex_abs (z)); + } + + return lndet; +} + + +gsl_complex +gsl_linalg_complex_LU_sgndet (gsl_matrix_complex * LU, int signum) +{ + size_t i, n = LU->size1; + + gsl_complex phase = gsl_complex_rect((double) signum, 0.0); + + for (i = 0; i < n; i++) + { + gsl_complex z = gsl_matrix_complex_get (LU, i, i); + + double r = gsl_complex_abs(z); + + if (r == 0) + { + phase = gsl_complex_rect(0.0, 0.0); + break; + } + else + { + z = gsl_complex_div_real(z, r); + phase = gsl_complex_mul(phase, z); + } + } + + return phase; +} + +static int +singular (const gsl_matrix_complex * LU) +{ + size_t i, n = LU->size1; + + for (i = 0; i < n; i++) + { + gsl_complex u = gsl_matrix_complex_get (LU, i, i); + if (GSL_REAL(u) == 0 && GSL_IMAG(u) == 0) return 1; + } + + return 0; +} diff --git a/software/gsl-1.15/linalg/multiply.c b/software/gsl-1.15/linalg/multiply.c new file mode 100644 index 000000000..f172312d1 --- /dev/null +++ b/software/gsl-1.15/linalg/multiply.c @@ -0,0 +1,137 @@ +/* linalg/multiply.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#define SWAP_SIZE_T(a, b) do { size_t swap_tmp = a; a = b; b = swap_tmp; } while(0) + +int +gsl_linalg_matmult (const gsl_matrix * A, const gsl_matrix * B, gsl_matrix * C) +{ + if (A->size2 != B->size1 || A->size1 != C->size1 || B->size2 != C->size2) + { + GSL_ERROR ("matrix sizes are not conformant", GSL_EBADLEN); + } + else + { + double a, b; + double temp; + size_t i, j, k; + + for (i = 0; i < C->size1; i++) + { + for (j = 0; j < C->size2; j++) + { + a = gsl_matrix_get (A, i, 0); + b = gsl_matrix_get (B, 0, j); + temp = a * b; + for (k = 1; k < A->size2; k++) + { + a = gsl_matrix_get (A, i, k); + b = gsl_matrix_get (B, k, j); + temp += a * b; + } + gsl_matrix_set (C, i, j, temp); + } + } + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_matmult_mod (const gsl_matrix * A, gsl_linalg_matrix_mod_t modA, + const gsl_matrix * B, gsl_linalg_matrix_mod_t modB, + gsl_matrix * C) +{ + if (modA == GSL_LINALG_MOD_NONE && modB == GSL_LINALG_MOD_NONE) + { + return gsl_linalg_matmult (A, B, C); + } + else + { + size_t dim1_A = A->size1; + size_t dim2_A = A->size2; + size_t dim1_B = B->size1; + size_t dim2_B = B->size2; + size_t dim1_C = C->size1; + size_t dim2_C = C->size2; + + if (modA & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (dim1_A, dim2_A); + if (modB & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (dim1_B, dim2_B); + + if (dim2_A != dim1_B || dim1_A != dim1_C || dim2_B != dim2_C) + { + GSL_ERROR ("matrix sizes are not conformant", GSL_EBADLEN); + } + else + { + double a, b; + double temp; + size_t i, j, k; + size_t a1, a2, b1, b2; + + for (i = 0; i < dim1_C; i++) + { + for (j = 0; j < dim2_C; j++) + { + a1 = i; + a2 = 0; + b1 = 0; + b2 = j; + if (modA & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (a1, a2); + if (modB & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (b1, b2); + + a = gsl_matrix_get (A, a1, a2); + b = gsl_matrix_get (B, b1, b2); + temp = a * b; + + for (k = 1; k < dim2_A; k++) + { + a1 = i; + a2 = k; + b1 = k; + b2 = j; + if (modA & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (a1, a2); + if (modB & GSL_LINALG_MOD_TRANSPOSE) + SWAP_SIZE_T (b1, b2); + a = gsl_matrix_get (A, a1, a2); + b = gsl_matrix_get (B, b1, b2); + temp += a * b; + } + + gsl_matrix_set (C, i, j, temp); + } + } + + return GSL_SUCCESS; + } + } +} diff --git a/software/gsl-1.15/linalg/ptlq.c b/software/gsl-1.15/linalg/ptlq.c new file mode 100644 index 000000000..010a092bb --- /dev/null +++ b/software/gsl-1.15/linalg/ptlq.c @@ -0,0 +1,493 @@ +/* linalg/ptlq.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * Copyright (C) 2004 Joerg Wensch, modifications for LQ. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "givens.c" +#include "apply_givens.c" + +/* The purpose of this package is to speed up QR-decomposition for + large matrices. Because QR-decomposition is column oriented, but + GSL uses a row-oriented matrix format, there can considerable + speedup obtained by computing the LQ-decomposition of the + transposed matrix instead. This package provides LQ-decomposition + and related algorithms. */ + +/* Factorise a general N x M matrix A into + * + * P A = L Q + * + * where Q is orthogonal (M x M) and L is lower triangular (N x M). + * When A is rank deficient, r = rank(A) < n, then the permutation is + * used to ensure that the lower n - r columns of L are zero and the first + * l rows of Q form an orthonormal basis for the rows of A. + * + * Q is stored as a packed set of Householder transformations in the + * strict upper triangular part of the input matrix. + * + * L is stored in the diagonal and lower triangle of the input matrix. + * + * P: column j of P is column k of the identity matrix, where k = + * permutation->data[j] + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i,i+1), m(i,i+2), ... , m(i,M)] + * + * This storage scheme is the same as in LAPACK. See LAPACK's + * dgeqpf.f for details. + * + */ + +int +gsl_linalg_PTLQ_decomp (gsl_matrix * A, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) +{ + const size_t N = A->size1; + const size_t M = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + else + { + size_t i; + + *signum = 1; + + gsl_permutation_init (p); /* set to identity */ + + /* Compute column norms and store in workspace */ + + for (i = 0; i < N; i++) + { + gsl_vector_view c = gsl_matrix_row (A, i); + double x = gsl_blas_dnrm2 (&c.vector); + gsl_vector_set (norm, i, x); + } + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Bring the column of largest norm into the pivot position */ + + double max_norm = gsl_vector_get(norm, i); + size_t j, kmax = i; + + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > max_norm) + { + max_norm = x; + kmax = j; + } + } + + if (kmax != i) + { + gsl_matrix_swap_rows (A, i, kmax); + gsl_permutation_swap (p, i, kmax); + gsl_vector_swap_elements(norm,i,kmax); + + (*signum) = -(*signum); + } + + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + { + gsl_vector_view c_full = gsl_matrix_row (A, i); + gsl_vector_view c = gsl_vector_subvector (&c_full.vector, + i, M - i); + double tau_i = gsl_linalg_householder_transform (&c.vector); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i +1, i, N - (i+1), M - i); + + gsl_linalg_householder_mh (tau_i, &c.vector, &m.matrix); + } + } + + /* Update the norms of the remaining columns too */ + + if (i + 1 < M) + { + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > 0.0) + { + double y = 0; + double temp= gsl_matrix_get (A, j, i) / x; + + if (fabs (temp) >= 1) + y = 0.0; + else + y = x * sqrt (1 - temp * temp); + + /* recompute norm to prevent loss of accuracy */ + + if (fabs (y / x) < sqrt (20.0) * GSL_SQRT_DBL_EPSILON) + { + gsl_vector_view c_full = gsl_matrix_row (A, j); + gsl_vector_view c = + gsl_vector_subvector(&c_full.vector, + i+1, M - (i+1)); + y = gsl_blas_dnrm2 (&c.vector); + } + + gsl_vector_set (norm, j, y); + } + } + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_PTLQ_decomp2 (const gsl_matrix * A, gsl_matrix * q, gsl_matrix * r, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) +{ + const size_t N = A->size1; + const size_t M = A->size2; + + if (q->size1 != M || q->size2 !=M) + { + GSL_ERROR ("q must be M x M", GSL_EBADLEN); + } + else if (r->size1 != N || r->size2 !=M) + { + GSL_ERROR ("r must be N x M", GSL_EBADLEN); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + + gsl_matrix_memcpy (r, A); + + gsl_linalg_PTLQ_decomp (r, tau, p, signum, norm); + + /* FIXME: aliased arguments depends on behavior of unpack routine! */ + + gsl_linalg_LQ_unpack (r, tau, q, r); + + return GSL_SUCCESS; +} + + +/* Solves the system x^T A = b^T using the P^T L Q factorisation, + + z^T L = b^T Q^T + + x = P z; + + to obtain x. Based on SLATEC code. */ + +int +gsl_linalg_PTLQ_solve_T (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size2 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (QR->size2 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + gsl_vector_memcpy (x, b); + + gsl_linalg_PTLQ_svx_T (QR, tau, p, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_PTLQ_svx_T (const gsl_matrix * LQ, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (LQ->size1 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* compute sol = b^T Q^T */ + + gsl_linalg_LQ_vecQT (LQ, tau, x); + + /* Solve L^T x = sol, storing x inplace in sol */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_PTLQ_LQsolve_T (const gsl_matrix * Q, const gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (Q->size1 != Q->size2 || L->size1 != L->size2) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != p->size || Q->size1 != L->size1 + || Q->size1 != b->size) + { + return GSL_EBADLEN; + } + else + { + /* compute b' = Q b */ + + gsl_blas_dgemv (CblasNoTrans, 1.0, Q, b, 0.0, x); + + /* Solve L^T x = b', storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, L, x); + + /* Apply permutation to solution in place */ + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_PTLQ_Lsolve_T (const gsl_matrix * LQ, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve L^T x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_PTLQ_Lsvx_T (const gsl_matrix * LQ, + const gsl_permutation * p, + gsl_vector * x) +{ + if (LQ->size1 != LQ->size2) + { + GSL_ERROR ("LQ matrix must be square", GSL_ENOTSQR); + } + else if (LQ->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Solve L^T x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasLower, CblasTrans, CblasNonUnit, LQ, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + + +/* Update a P^T L Q factorisation for P A= L Q , A' = A + v u^T, + PA' = PA + Pv u^T + + * P^T L' Q' = P^T LQ + v u^T + * = P^T (L + (P v) u^T Q^T) Q + * = P^T (L + (P v) w^T) Q + * + * where w = Q^T u. + * + * Algorithm from Golub and Van Loan, "Matrix Computations", Section + * 12.5 (Updating Matrix Factorizations, Rank-One Changes) + */ + +int +gsl_linalg_PTLQ_update (gsl_matrix * Q, gsl_matrix * L, + const gsl_permutation * p, + const gsl_vector * v, gsl_vector * w) +{ + if (Q->size1 != Q->size2 || L->size1 != L->size2) + { + return GSL_ENOTSQR; + } + else if (L->size1 != Q->size2 || v->size != Q->size2 || w->size != Q->size2) + { + return GSL_EBADLEN; + } + else + { + size_t j, k; + const size_t N = Q->size1; + const size_t M = Q->size2; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to L, H = J_1^T ... J^T_(n-1) L + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in v w^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double lj0 = gsl_matrix_get (L, j, 0); + size_t p_j = gsl_permutation_get (p, j); + double vj = gsl_vector_get (v, p_j); + gsl_matrix_set (L, j, 0, lj0 + w0 * vj); + } + + /* Apply Givens transformations L' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < N; k++) + { + double c, s; + double diag = gsl_matrix_get (L, k - 1, k - 1); + double offdiag = gsl_matrix_get (L, k - 1, k ); + + create_givens (diag, offdiag, &c, &s); + apply_givens_lq (M, N, Q, L, k - 1, k, c, s); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/qr.c b/software/gsl-1.15/linalg/qr.c new file mode 100644 index 000000000..126a38230 --- /dev/null +++ b/software/gsl-1.15/linalg/qr.c @@ -0,0 +1,598 @@ +/* linalg/qr.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "givens.c" +#include "apply_givens.c" + +/* Factorise a general M x N matrix A into + * + * A = Q R + * + * where Q is orthogonal (M x M) and R is upper triangular (M x N). + * + * Q is stored as a packed set of Householder transformations in the + * strict lower triangular part of the input matrix. + * + * R is stored in the diagonal and upper triangle of the input matrix. + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i+1,i), m(i+2,i), ... , m(M,i)] + * + * This storage scheme is the same as in LAPACK. */ + +int +gsl_linalg_QR_decomp (gsl_matrix * A, gsl_vector * tau) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i; + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + gsl_vector_view c_full = gsl_matrix_column (A, i); + gsl_vector_view c = gsl_vector_subvector (&(c_full.vector), i, M-i); + + double tau_i = gsl_linalg_householder_transform (&(c.vector)); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns and + update the norms */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i, i + 1, M - i, N - (i + 1)); + gsl_linalg_householder_hm (tau_i, &(c.vector), &(m.matrix)); + } + } + + return GSL_SUCCESS; + } +} + +/* Solves the system A x = b using the QR factorisation, + + * R x = Q^T b + * + * to obtain x. Based on SLATEC code. + */ + +int +gsl_linalg_QR_solve (const gsl_matrix * QR, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve for x */ + + gsl_linalg_QR_svx (QR, tau, x); + + return GSL_SUCCESS; + } +} + +/* Solves the system A x = b in place using the QR factorisation, + + * R x = Q^T b + * + * to obtain x. Based on SLATEC code. + */ + +int +gsl_linalg_QR_svx (const gsl_matrix * QR, const gsl_vector * tau, gsl_vector * x) +{ + + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != x->size) + { + GSL_ERROR ("matrix size must match x/rhs size", GSL_EBADLEN); + } + else + { + /* compute rhs = Q^T b */ + + gsl_linalg_QR_QTvec (QR, tau, x); + + /* Solve R x = rhs, storing x in-place */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + return GSL_SUCCESS; + } +} + + +/* Find the least squares solution to the overdetermined system + * + * A x = b + * + * for M >= N using the QR factorization A = Q R. + */ + +int +gsl_linalg_QR_lssolve (const gsl_matrix * QR, const gsl_vector * tau, const gsl_vector * b, gsl_vector * x, gsl_vector * residual) +{ + const size_t M = QR->size1; + const size_t N = QR->size2; + + if (M < N) + { + GSL_ERROR ("QR matrix must have M>=N", GSL_EBADLEN); + } + else if (M != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (N != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else if (M != residual->size) + { + GSL_ERROR ("matrix size must match residual size", GSL_EBADLEN); + } + else + { + gsl_matrix_const_view R = gsl_matrix_const_submatrix (QR, 0, 0, N, N); + gsl_vector_view c = gsl_vector_subvector(residual, 0, N); + + gsl_vector_memcpy(residual, b); + + /* compute rhs = Q^T b */ + + gsl_linalg_QR_QTvec (QR, tau, residual); + + /* Solve R x = rhs */ + + gsl_vector_memcpy(x, &(c.vector)); + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, &(R.matrix), x); + + /* Compute residual = b - A x = Q (Q^T b - R x) */ + + gsl_vector_set_zero(&(c.vector)); + + gsl_linalg_QR_Qvec(QR, tau, residual); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_QR_Rsolve (const gsl_matrix * QR, const gsl_vector * b, gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x in-place */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_QR_Rsvx (const gsl_matrix * QR, gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != x->size) + { + GSL_ERROR ("matrix size must match rhs size", GSL_EBADLEN); + } + else + { + /* Solve R x = b, storing x in-place */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_R_solve (const gsl_matrix * R, const gsl_vector * b, gsl_vector * x) +{ + if (R->size1 != R->size2) + { + GSL_ERROR ("R matrix must be square", GSL_ENOTSQR); + } + else if (R->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (R->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x inplace in b */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, R, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_R_svx (const gsl_matrix * R, gsl_vector * x) +{ + if (R->size1 != R->size2) + { + GSL_ERROR ("R matrix must be square", GSL_ENOTSQR); + } + else if (R->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* Solve R x = b, storing x inplace in b */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, R, x); + + return GSL_SUCCESS; + } +} + + + +/* Form the product Q^T v from a QR factorized matrix + */ + +int +gsl_linalg_QR_QTvec (const gsl_matrix * QR, const gsl_vector * tau, gsl_vector * v) +{ + const size_t M = QR->size1; + const size_t N = QR->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be N", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute Q^T v */ + + for (i = 0; i < GSL_MIN (M, N); i++) + { + gsl_vector_const_view c = gsl_matrix_const_column (QR, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &(h.vector), &(w.vector)); + } + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_QR_Qvec (const gsl_matrix * QR, const gsl_vector * tau, gsl_vector * v) +{ + const size_t M = QR->size1; + const size_t N = QR->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (v->size != M) + { + GSL_ERROR ("vector size must be N", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute Q^T v */ + + for (i = GSL_MIN (M, N); i-- > 0;) + { + gsl_vector_const_view c = gsl_matrix_const_column (QR, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), + i, M - i); + gsl_vector_view w = gsl_vector_subvector (v, i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hv (ti, &h.vector, &w.vector); + } + return GSL_SUCCESS; + } +} + +/* Form the product Q^T A from a QR factorized matrix */ + +int +gsl_linalg_QR_QTmat (const gsl_matrix * QR, const gsl_vector * tau, gsl_matrix * A) +{ + const size_t M = QR->size1; + const size_t N = QR->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (A->size1 != M) + { + GSL_ERROR ("matrix must have M rows", GSL_EBADLEN); + } + else + { + size_t i; + + /* compute Q^T A */ + + for (i = 0; i < GSL_MIN (M, N); i++) + { + gsl_vector_const_view c = gsl_matrix_const_column (QR, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&(c.vector), i, M - i); + gsl_matrix_view m = gsl_matrix_submatrix(A, i, 0, M - i, A->size2); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hm (ti, &(h.vector), &(m.matrix)); + } + return GSL_SUCCESS; + } +} + + +/* Form the orthogonal matrix Q from the packed QR matrix */ + +int +gsl_linalg_QR_unpack (const gsl_matrix * QR, const gsl_vector * tau, gsl_matrix * Q, gsl_matrix * R) +{ + const size_t M = QR->size1; + const size_t N = QR->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be M x M", GSL_ENOTSQR); + } + else if (R->size1 != M || R->size2 != N) + { + GSL_ERROR ("R matrix must be M x N", GSL_ENOTSQR); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else + { + size_t i, j; + + /* Initialize Q to the identity */ + + gsl_matrix_set_identity (Q); + + for (i = GSL_MIN (M, N); i-- > 0;) + { + gsl_vector_const_view c = gsl_matrix_const_column (QR, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, + i, M - i); + gsl_matrix_view m = gsl_matrix_submatrix (Q, i, i, M - i, M - i); + double ti = gsl_vector_get (tau, i); + gsl_linalg_householder_hm (ti, &h.vector, &m.matrix); + } + + /* Form the right triangular matrix R from a packed QR matrix */ + + for (i = 0; i < M; i++) + { + for (j = 0; j < i && j < N; j++) + gsl_matrix_set (R, i, j, 0.0); + + for (j = i; j < N; j++) + gsl_matrix_set (R, i, j, gsl_matrix_get (QR, i, j)); + } + + return GSL_SUCCESS; + } +} + + +/* Update a QR factorisation for A= Q R , A' = A + u v^T, + + * Q' R' = QR + u v^T + * = Q (R + Q^T u v^T) + * = Q (R + w v^T) + * + * where w = Q^T u. + * + * Algorithm from Golub and Van Loan, "Matrix Computations", Section + * 12.5 (Updating Matrix Factorizations, Rank-One Changes) + */ + +int +gsl_linalg_QR_update (gsl_matrix * Q, gsl_matrix * R, + gsl_vector * w, const gsl_vector * v) +{ + const size_t M = R->size1; + const size_t N = R->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be M x M if R is M x N", GSL_ENOTSQR); + } + else if (w->size != M) + { + GSL_ERROR ("w must be length M if R is M x N", GSL_EBADLEN); + } + else if (v->size != N) + { + GSL_ERROR ("v must be length N if R is M x N", GSL_EBADLEN); + } + else + { + size_t j, k; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to R, H = J_1^T ... J^T_(n-1) R + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) /* loop from k = M-1 to 1 */ + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_qr (M, N, Q, R, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in w v^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double r0j = gsl_matrix_get (R, 0, j); + double vj = gsl_vector_get (v, j); + gsl_matrix_set (R, 0, j, r0j + w0 * vj); + } + + /* Apply Givens transformations R' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < GSL_MIN(M,N+1); k++) + { + double c, s; + double diag = gsl_matrix_get (R, k - 1, k - 1); + double offdiag = gsl_matrix_get (R, k, k - 1); + + create_givens (diag, offdiag, &c, &s); + apply_givens_qr (M, N, Q, R, k - 1, k, c, s); + + gsl_matrix_set (R, k, k - 1, 0.0); /* exact zero of G^T */ + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_QR_QRsolve (gsl_matrix * Q, gsl_matrix * R, const gsl_vector * b, gsl_vector * x) +{ + const size_t M = R->size1; + const size_t N = R->size2; + + if (M != N) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != M || b->size != M || x->size != M) + { + return GSL_EBADLEN; + } + else + { + /* compute sol = Q^T b */ + + gsl_blas_dgemv (CblasTrans, 1.0, Q, b, 0.0, x); + + /* Solve R x = sol, storing x in-place */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, R, x); + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/qrpt.c b/software/gsl-1.15/linalg/qrpt.c new file mode 100644 index 000000000..ea27d30e4 --- /dev/null +++ b/software/gsl-1.15/linalg/qrpt.c @@ -0,0 +1,493 @@ +/* linalg/qrpt.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define REAL double + +#include "givens.c" +#include "apply_givens.c" + +/* Factorise a general M x N matrix A into + * + * A P = Q R + * + * where Q is orthogonal (M x M) and R is upper triangular (M x N). + * When A is rank deficient, r = rank(A) < n, then the permutation is + * used to ensure that the lower n - r rows of R are zero and the first + * r columns of Q form an orthonormal basis for A. + * + * Q is stored as a packed set of Householder transformations in the + * strict lower triangular part of the input matrix. + * + * R is stored in the diagonal and upper triangle of the input matrix. + * + * P: column j of P is column k of the identity matrix, where k = + * permutation->data[j] + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_k .. Q_2 Q_1 + * + * where k = MIN(M,N) and + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [1, m(i+1,i), m(i+2,i), ... , m(M,i)] + * + * This storage scheme is the same as in LAPACK. See LAPACK's + * dgeqpf.f for details. + * + */ + +int +gsl_linalg_QRPT_decomp (gsl_matrix * A, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + else + { + size_t i; + + *signum = 1; + + gsl_permutation_init (p); /* set to identity */ + + /* Compute column norms and store in workspace */ + + for (i = 0; i < N; i++) + { + gsl_vector_view c = gsl_matrix_column (A, i); + double x = gsl_blas_dnrm2 (&c.vector); + gsl_vector_set (norm, i, x); + } + + for (i = 0; i < GSL_MIN (M, N); i++) + { + /* Bring the column of largest norm into the pivot position */ + + double max_norm = gsl_vector_get(norm, i); + size_t j, kmax = i; + + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > max_norm) + { + max_norm = x; + kmax = j; + } + } + + if (kmax != i) + { + gsl_matrix_swap_columns (A, i, kmax); + gsl_permutation_swap (p, i, kmax); + gsl_vector_swap_elements(norm,i,kmax); + + (*signum) = -(*signum); + } + + /* Compute the Householder transformation to reduce the j-th + column of the matrix to a multiple of the j-th unit vector */ + + { + gsl_vector_view c_full = gsl_matrix_column (A, i); + gsl_vector_view c = gsl_vector_subvector (&c_full.vector, + i, M - i); + double tau_i = gsl_linalg_householder_transform (&c.vector); + + gsl_vector_set (tau, i, tau_i); + + /* Apply the transformation to the remaining columns */ + + if (i + 1 < N) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i, i + 1, M - i, N - (i+1)); + + gsl_linalg_householder_hm (tau_i, &c.vector, &m.matrix); + } + } + + /* Update the norms of the remaining columns too */ + + if (i + 1 < M) + { + for (j = i + 1; j < N; j++) + { + double x = gsl_vector_get (norm, j); + + if (x > 0.0) + { + double y = 0; + double temp= gsl_matrix_get (A, i, j) / x; + + if (fabs (temp) >= 1) + y = 0.0; + else + y = x * sqrt (1 - temp * temp); + + /* recompute norm to prevent loss of accuracy */ + + if (fabs (y / x) < sqrt (20.0) * GSL_SQRT_DBL_EPSILON) + { + gsl_vector_view c_full = gsl_matrix_column (A, j); + gsl_vector_view c = + gsl_vector_subvector(&c_full.vector, + i+1, M - (i+1)); + y = gsl_blas_dnrm2 (&c.vector); + } + + gsl_vector_set (norm, j, y); + } + } + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_QRPT_decomp2 (const gsl_matrix * A, gsl_matrix * q, gsl_matrix * r, gsl_vector * tau, gsl_permutation * p, int *signum, gsl_vector * norm) +{ + const size_t M = A->size1; + const size_t N = A->size2; + + if (q->size1 != M || q->size2 !=M) + { + GSL_ERROR ("q must be M x M", GSL_EBADLEN); + } + else if (r->size1 != M || r->size2 !=N) + { + GSL_ERROR ("r must be M x N", GSL_EBADLEN); + } + else if (tau->size != GSL_MIN (M, N)) + { + GSL_ERROR ("size of tau must be MIN(M,N)", GSL_EBADLEN); + } + else if (p->size != N) + { + GSL_ERROR ("permutation size must be N", GSL_EBADLEN); + } + else if (norm->size != N) + { + GSL_ERROR ("norm size must be N", GSL_EBADLEN); + } + + gsl_matrix_memcpy (r, A); + + gsl_linalg_QRPT_decomp (r, tau, p, signum, norm); + + /* FIXME: aliased arguments depends on behavior of unpack routine! */ + + gsl_linalg_QR_unpack (r, tau, q, r); + + return GSL_SUCCESS; +} + + +/* Solves the system A x = b using the Q R P^T factorisation, + + R z = Q^T b + + x = P z; + + to obtain x. Based on SLATEC code. */ + +int +gsl_linalg_QRPT_solve (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (QR->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + gsl_vector_memcpy (x, b); + + gsl_linalg_QRPT_svx (QR, tau, p, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_QRPT_svx (const gsl_matrix * QR, + const gsl_vector * tau, + const gsl_permutation * p, + gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != p->size) + { + GSL_ERROR ("matrix size must match permutation size", GSL_EBADLEN); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* compute sol = Q^T b */ + + gsl_linalg_QR_QTvec (QR, tau, x); + + /* Solve R x = sol, storing x inplace in sol */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_QRPT_QRsolve (const gsl_matrix * Q, const gsl_matrix * R, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (Q->size1 != Q->size2 || R->size1 != R->size2) + { + return GSL_ENOTSQR; + } + else if (Q->size1 != p->size || Q->size1 != R->size1 + || Q->size1 != b->size) + { + return GSL_EBADLEN; + } + else + { + /* compute b' = Q^T b */ + + gsl_blas_dgemv (CblasTrans, 1.0, Q, b, 0.0, x); + + /* Solve R x = b', storing x inplace */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, R, x); + + /* Apply permutation to solution in place */ + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_QRPT_Rsolve (const gsl_matrix * QR, + const gsl_permutation * p, + const gsl_vector * b, + gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size1 != b->size) + { + GSL_ERROR ("matrix size must match b size", GSL_EBADLEN); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Copy x <- b */ + + gsl_vector_memcpy (x, b); + + /* Solve R x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + +int +gsl_linalg_QRPT_Rsvx (const gsl_matrix * QR, + const gsl_permutation * p, + gsl_vector * x) +{ + if (QR->size1 != QR->size2) + { + GSL_ERROR ("QR matrix must be square", GSL_ENOTSQR); + } + else if (QR->size2 != x->size) + { + GSL_ERROR ("matrix size must match x size", GSL_EBADLEN); + } + else if (p->size != x->size) + { + GSL_ERROR ("permutation size must match x size", GSL_EBADLEN); + } + else + { + /* Solve R x = b, storing x inplace */ + + gsl_blas_dtrsv (CblasUpper, CblasNoTrans, CblasNonUnit, QR, x); + + gsl_permute_vector_inverse (p, x); + + return GSL_SUCCESS; + } +} + + + +/* Update a Q R P^T factorisation for A P= Q R , A' = A + u v^T, + + Q' R' P^-1 = QR P^-1 + u v^T + = Q (R + Q^T u v^T P ) P^-1 + = Q (R + w v^T P) P^-1 + + where w = Q^T u. + + Algorithm from Golub and Van Loan, "Matrix Computations", Section + 12.5 (Updating Matrix Factorizations, Rank-One Changes) */ + +int +gsl_linalg_QRPT_update (gsl_matrix * Q, gsl_matrix * R, + const gsl_permutation * p, + gsl_vector * w, const gsl_vector * v) +{ + const size_t M = R->size1; + const size_t N = R->size2; + + if (Q->size1 != M || Q->size2 != M) + { + GSL_ERROR ("Q matrix must be M x M if R is M x N", GSL_ENOTSQR); + } + else if (w->size != M) + { + GSL_ERROR ("w must be length M if R is M x N", GSL_EBADLEN); + } + else if (v->size != N) + { + GSL_ERROR ("v must be length N if R is M x N", GSL_EBADLEN); + } + else + { + size_t j, k; + double w0; + + /* Apply Given's rotations to reduce w to (|w|, 0, 0, ... , 0) + + J_1^T .... J_(n-1)^T w = +/- |w| e_1 + + simultaneously applied to R, H = J_1^T ... J^T_(n-1) R + so that H is upper Hessenberg. (12.5.2) */ + + for (k = M - 1; k > 0; k--) + { + double c, s; + double wk = gsl_vector_get (w, k); + double wkm1 = gsl_vector_get (w, k - 1); + + create_givens (wkm1, wk, &c, &s); + apply_givens_vec (w, k - 1, k, c, s); + apply_givens_qr (M, N, Q, R, k - 1, k, c, s); + } + + w0 = gsl_vector_get (w, 0); + + /* Add in w v^T (Equation 12.5.3) */ + + for (j = 0; j < N; j++) + { + double r0j = gsl_matrix_get (R, 0, j); + size_t p_j = gsl_permutation_get (p, j); + double vj = gsl_vector_get (v, p_j); + gsl_matrix_set (R, 0, j, r0j + w0 * vj); + } + + /* Apply Givens transformations R' = G_(n-1)^T ... G_1^T H + Equation 12.5.4 */ + + for (k = 1; k < GSL_MIN(M,N+1); k++) + { + double c, s; + double diag = gsl_matrix_get (R, k - 1, k - 1); + double offdiag = gsl_matrix_get (R, k, k - 1); + + create_givens (diag, offdiag, &c, &s); + apply_givens_qr (M, N, Q, R, k - 1, k, c, s); + + gsl_matrix_set (R, k, k - 1, 0.0); /* exact zero of G^T */ + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/svd.c b/software/gsl-1.15/linalg/svd.c new file mode 100644 index 000000000..f8bfbb489 --- /dev/null +++ b/software/gsl-1.15/linalg/svd.c @@ -0,0 +1,679 @@ +/* linalg/svd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007, 2010 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "givens.c" +#include "svdstep.c" + +/* Factorise a general M x N matrix A into, + * + * A = U D V^T + * + * where U is a column-orthogonal M x N matrix (U^T U = I), + * D is a diagonal N x N matrix, + * and V is an N x N orthogonal matrix (V^T V = V V^T = I) + * + * U is stored in the original matrix A, which has the same size + * + * V is stored as a separate matrix (not V^T). You must take the + * transpose to form the product above. + * + * The diagonal matrix D is stored in the vector S, D_ii = S_i + */ + +int +gsl_linalg_SV_decomp (gsl_matrix * A, gsl_matrix * V, gsl_vector * S, + gsl_vector * work) +{ + size_t a, b, i, j, iter; + + const size_t M = A->size1; + const size_t N = A->size2; + const size_t K = GSL_MIN (M, N); + + if (M < N) + { + GSL_ERROR ("svd of MxN matrix, Msize1 != N) + { + GSL_ERROR ("square matrix V must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (V->size1 != V->size2) + { + GSL_ERROR ("matrix V must be square", GSL_ENOTSQR); + } + else if (S->size != N) + { + GSL_ERROR ("length of vector S must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (work->size != N) + { + GSL_ERROR ("length of workspace must match second dimension of matrix A", + GSL_EBADLEN); + } + + /* Handle the case of N = 1 (SVD of a column vector) */ + + if (N == 1) + { + gsl_vector_view column = gsl_matrix_column (A, 0); + double norm = gsl_blas_dnrm2 (&column.vector); + + gsl_vector_set (S, 0, norm); + gsl_matrix_set (V, 0, 0, 1.0); + + if (norm != 0.0) + { + gsl_blas_dscal (1.0/norm, &column.vector); + } + + return GSL_SUCCESS; + } + + { + gsl_vector_view f = gsl_vector_subvector (work, 0, K - 1); + + /* bidiagonalize matrix A, unpack A into U S V */ + + gsl_linalg_bidiag_decomp (A, S, &f.vector); + gsl_linalg_bidiag_unpack2 (A, S, &f.vector, V); + + /* apply reduction steps to B=(S,Sd) */ + + chop_small_elements (S, &f.vector); + + /* Progressively reduce the matrix until it is diagonal */ + + b = N - 1; + iter = 0; + + while (b > 0) + { + double fbm1 = gsl_vector_get (&f.vector, b - 1); + + if (fbm1 == 0.0 || gsl_isnan (fbm1)) + { + b--; + continue; + } + + /* Find the largest unreduced block (a,b) starting from b + and working backwards */ + + a = b - 1; + + while (a > 0) + { + double fam1 = gsl_vector_get (&f.vector, a - 1); + + if (fam1 == 0.0 || gsl_isnan (fam1)) + { + break; + } + + a--; + } + + iter++; + + if (iter > 100 * N) + { + GSL_ERROR("SVD decomposition failed to converge", GSL_EMAXITER); + } + + + { + const size_t n_block = b - a + 1; + gsl_vector_view S_block = gsl_vector_subvector (S, a, n_block); + gsl_vector_view f_block = gsl_vector_subvector (&f.vector, a, n_block - 1); + + gsl_matrix_view U_block = + gsl_matrix_submatrix (A, 0, a, A->size1, n_block); + gsl_matrix_view V_block = + gsl_matrix_submatrix (V, 0, a, V->size1, n_block); + + int rescale = 0; + double scale = 1; + double norm = 0; + + /* Find the maximum absolute values of the diagonal and subdiagonal */ + + for (i = 0; i < n_block; i++) + { + double s_i = gsl_vector_get (&S_block.vector, i); + double a = fabs(s_i); + if (a > norm) norm = a; + } + + for (i = 0; i < n_block - 1; i++) + { + double f_i = gsl_vector_get (&f_block.vector, i); + double a = fabs(f_i); + if (a > norm) norm = a; + } + + /* Temporarily scale the submatrix if necessary */ + + if (norm > GSL_SQRT_DBL_MAX) + { + scale = (norm / GSL_SQRT_DBL_MAX); + rescale = 1; + } + else if (norm < GSL_SQRT_DBL_MIN && norm > 0) + { + scale = (norm / GSL_SQRT_DBL_MIN); + rescale = 1; + } + + if (rescale) + { + gsl_blas_dscal(1.0 / scale, &S_block.vector); + gsl_blas_dscal(1.0 / scale, &f_block.vector); + } + + /* Perform the implicit QR step */ + + qrstep (&S_block.vector, &f_block.vector, &U_block.matrix, &V_block.matrix); + /* remove any small off-diagonal elements */ + + chop_small_elements (&S_block.vector, &f_block.vector); + + /* Undo the scaling if needed */ + + if (rescale) + { + gsl_blas_dscal(scale, &S_block.vector); + gsl_blas_dscal(scale, &f_block.vector); + } + } + + } + } + + /* Make singular values positive by reflections if necessary */ + + for (j = 0; j < K; j++) + { + double Sj = gsl_vector_get (S, j); + + if (Sj < 0.0) + { + for (i = 0; i < N; i++) + { + double Vij = gsl_matrix_get (V, i, j); + gsl_matrix_set (V, i, j, -Vij); + } + + gsl_vector_set (S, j, -Sj); + } + } + + /* Sort singular values into decreasing order */ + + for (i = 0; i < K; i++) + { + double S_max = gsl_vector_get (S, i); + size_t i_max = i; + + for (j = i + 1; j < K; j++) + { + double Sj = gsl_vector_get (S, j); + + if (Sj > S_max) + { + S_max = Sj; + i_max = j; + } + } + + if (i_max != i) + { + /* swap eigenvalues */ + gsl_vector_swap_elements (S, i, i_max); + + /* swap eigenvectors */ + gsl_matrix_swap_columns (A, i, i_max); + gsl_matrix_swap_columns (V, i, i_max); + } + } + + return GSL_SUCCESS; +} + + +/* Modified algorithm which is better for M>>N */ + +int +gsl_linalg_SV_decomp_mod (gsl_matrix * A, + gsl_matrix * X, + gsl_matrix * V, gsl_vector * S, gsl_vector * work) +{ + size_t i, j; + + const size_t M = A->size1; + const size_t N = A->size2; + + if (M < N) + { + GSL_ERROR ("svd of MxN matrix, Msize1 != N) + { + GSL_ERROR ("square matrix V must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (V->size1 != V->size2) + { + GSL_ERROR ("matrix V must be square", GSL_ENOTSQR); + } + else if (X->size1 != N) + { + GSL_ERROR ("square matrix X must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (X->size1 != X->size2) + { + GSL_ERROR ("matrix X must be square", GSL_ENOTSQR); + } + else if (S->size != N) + { + GSL_ERROR ("length of vector S must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (work->size != N) + { + GSL_ERROR ("length of workspace must match second dimension of matrix A", + GSL_EBADLEN); + } + + if (N == 1) + { + gsl_vector_view column = gsl_matrix_column (A, 0); + double norm = gsl_blas_dnrm2 (&column.vector); + + gsl_vector_set (S, 0, norm); + gsl_matrix_set (V, 0, 0, 1.0); + + if (norm != 0.0) + { + gsl_blas_dscal (1.0/norm, &column.vector); + } + + return GSL_SUCCESS; + } + + /* Convert A into an upper triangular matrix R */ + + for (i = 0; i < N; i++) + { + gsl_vector_view c = gsl_matrix_column (A, i); + gsl_vector_view v = gsl_vector_subvector (&c.vector, i, M - i); + double tau_i = gsl_linalg_householder_transform (&v.vector); + + /* Apply the transformation to the remaining columns */ + + if (i + 1 < N) + { + gsl_matrix_view m = + gsl_matrix_submatrix (A, i, i + 1, M - i, N - (i + 1)); + gsl_linalg_householder_hm (tau_i, &v.vector, &m.matrix); + } + + gsl_vector_set (S, i, tau_i); + } + + /* Copy the upper triangular part of A into X */ + + for (i = 0; i < N; i++) + { + for (j = 0; j < i; j++) + { + gsl_matrix_set (X, i, j, 0.0); + } + + { + double Aii = gsl_matrix_get (A, i, i); + gsl_matrix_set (X, i, i, Aii); + } + + for (j = i + 1; j < N; j++) + { + double Aij = gsl_matrix_get (A, i, j); + gsl_matrix_set (X, i, j, Aij); + } + } + + /* Convert A into an orthogonal matrix L */ + + for (j = N; j-- > 0;) + { + /* Householder column transformation to accumulate L */ + double tj = gsl_vector_get (S, j); + gsl_matrix_view m = gsl_matrix_submatrix (A, j, j, M - j, N - j); + gsl_linalg_householder_hm1 (tj, &m.matrix); + } + + /* unpack R into X V S */ + + gsl_linalg_SV_decomp (X, V, S, work); + + /* Multiply L by X, to obtain U = L X, stored in U */ + + { + gsl_vector_view sum = gsl_vector_subvector (work, 0, N); + + for (i = 0; i < M; i++) + { + gsl_vector_view L_i = gsl_matrix_row (A, i); + gsl_vector_set_zero (&sum.vector); + + for (j = 0; j < N; j++) + { + double Lij = gsl_vector_get (&L_i.vector, j); + gsl_vector_view X_j = gsl_matrix_row (X, j); + gsl_blas_daxpy (Lij, &X_j.vector, &sum.vector); + } + + gsl_vector_memcpy (&L_i.vector, &sum.vector); + } + } + + return GSL_SUCCESS; +} + + +/* Solves the system A x = b using the SVD factorization + * + * A = U S V^T + * + * to obtain x. For M x N systems it finds the solution in the least + * squares sense. + */ + +int +gsl_linalg_SV_solve (const gsl_matrix * U, + const gsl_matrix * V, + const gsl_vector * S, + const gsl_vector * b, gsl_vector * x) +{ + if (U->size1 != b->size) + { + GSL_ERROR ("first dimension of matrix U must size of vector b", + GSL_EBADLEN); + } + else if (U->size2 != S->size) + { + GSL_ERROR ("length of vector S must match second dimension of matrix U", + GSL_EBADLEN); + } + else if (V->size1 != V->size2) + { + GSL_ERROR ("matrix V must be square", GSL_ENOTSQR); + } + else if (S->size != V->size1) + { + GSL_ERROR ("length of vector S must match size of matrix V", + GSL_EBADLEN); + } + else if (V->size2 != x->size) + { + GSL_ERROR ("size of matrix V must match size of vector x", GSL_EBADLEN); + } + else + { + const size_t N = U->size2; + size_t i; + + gsl_vector *w = gsl_vector_calloc (N); + + gsl_blas_dgemv (CblasTrans, 1.0, U, b, 0.0, w); + + for (i = 0; i < N; i++) + { + double wi = gsl_vector_get (w, i); + double alpha = gsl_vector_get (S, i); + if (alpha != 0) + alpha = 1.0 / alpha; + gsl_vector_set (w, i, alpha * wi); + } + + gsl_blas_dgemv (CblasNoTrans, 1.0, V, w, 0.0, x); + + gsl_vector_free (w); + + return GSL_SUCCESS; + } +} + +/* This is a the jacobi version */ +/* Author: G. Jungman */ + +/* + * Algorithm due to J.C. Nash, Compact Numerical Methods for + * Computers (New York: Wiley and Sons, 1979), chapter 3. + * See also Algorithm 4.1 in + * James Demmel, Kresimir Veselic, "Jacobi's Method is more + * accurate than QR", Lapack Working Note 15 (LAWN15), October 1989. + * Available from netlib. + * + * Based on code by Arthur Kosowsky, Rutgers University + * kosowsky@physics.rutgers.edu + * + * Another relevant paper is, P.P.M. De Rijk, "A One-Sided Jacobi + * Algorithm for computing the singular value decomposition on a + * vector computer", SIAM Journal of Scientific and Statistical + * Computing, Vol 10, No 2, pp 359-371, March 1989. + * + */ + +int +gsl_linalg_SV_decomp_jacobi (gsl_matrix * A, gsl_matrix * Q, gsl_vector * S) +{ + if (A->size1 < A->size2) + { + /* FIXME: only implemented M>=N case so far */ + + GSL_ERROR ("svd of MxN matrix, Msize1 != A->size2) + { + GSL_ERROR ("square matrix Q must match second dimension of matrix A", + GSL_EBADLEN); + } + else if (Q->size1 != Q->size2) + { + GSL_ERROR ("matrix Q must be square", GSL_ENOTSQR); + } + else if (S->size != A->size2) + { + GSL_ERROR ("length of vector S must match second dimension of matrix A", + GSL_EBADLEN); + } + else + { + const size_t M = A->size1; + const size_t N = A->size2; + size_t i, j, k; + + /* Initialize the rotation counter and the sweep counter. */ + int count = 1; + int sweep = 0; + int sweepmax = 5*N; + + double tolerance = 10 * M * GSL_DBL_EPSILON; + + /* Always do at least 12 sweeps. */ + sweepmax = GSL_MAX (sweepmax, 12); + + /* Set Q to the identity matrix. */ + gsl_matrix_set_identity (Q); + + /* Store the column error estimates in S, for use during the + orthogonalization */ + + for (j = 0; j < N; j++) + { + gsl_vector_view cj = gsl_matrix_column (A, j); + double sj = gsl_blas_dnrm2 (&cj.vector); + gsl_vector_set(S, j, GSL_DBL_EPSILON * sj); + } + + /* Orthogonalize A by plane rotations. */ + + while (count > 0 && sweep <= sweepmax) + { + /* Initialize rotation counter. */ + count = N * (N - 1) / 2; + + for (j = 0; j < N - 1; j++) + { + for (k = j + 1; k < N; k++) + { + double a = 0.0; + double b = 0.0; + double p = 0.0; + double q = 0.0; + double cosine, sine; + double v; + double abserr_a, abserr_b; + int sorted, orthog, noisya, noisyb; + + gsl_vector_view cj = gsl_matrix_column (A, j); + gsl_vector_view ck = gsl_matrix_column (A, k); + + gsl_blas_ddot (&cj.vector, &ck.vector, &p); + p *= 2.0 ; /* equation 9a: p = 2 x.y */ + + a = gsl_blas_dnrm2 (&cj.vector); + b = gsl_blas_dnrm2 (&ck.vector); + + q = a * a - b * b; + v = hypot(p, q); + + /* test for columns j,k orthogonal, or dominant errors */ + + abserr_a = gsl_vector_get(S,j); + abserr_b = gsl_vector_get(S,k); + + sorted = (GSL_COERCE_DBL(a) >= GSL_COERCE_DBL(b)); + orthog = (fabs (p) <= tolerance * GSL_COERCE_DBL(a * b)); + noisya = (a < abserr_a); + noisyb = (b < abserr_b); + + if (sorted && (orthog || noisya || noisyb)) + { + count--; + continue; + } + + /* calculate rotation angles */ + if (v == 0 || !sorted) + { + cosine = 0.0; + sine = 1.0; + } + else + { + cosine = sqrt((v + q) / (2.0 * v)); + sine = p / (2.0 * v * cosine); + } + + /* apply rotation to A */ + for (i = 0; i < M; i++) + { + const double Aik = gsl_matrix_get (A, i, k); + const double Aij = gsl_matrix_get (A, i, j); + gsl_matrix_set (A, i, j, Aij * cosine + Aik * sine); + gsl_matrix_set (A, i, k, -Aij * sine + Aik * cosine); + } + + gsl_vector_set(S, j, fabs(cosine) * abserr_a + fabs(sine) * abserr_b); + gsl_vector_set(S, k, fabs(sine) * abserr_a + fabs(cosine) * abserr_b); + + /* apply rotation to Q */ + for (i = 0; i < N; i++) + { + const double Qij = gsl_matrix_get (Q, i, j); + const double Qik = gsl_matrix_get (Q, i, k); + gsl_matrix_set (Q, i, j, Qij * cosine + Qik * sine); + gsl_matrix_set (Q, i, k, -Qij * sine + Qik * cosine); + } + } + } + + /* Sweep completed. */ + sweep++; + } + + /* + * Orthogonalization complete. Compute singular values. + */ + + { + double prev_norm = -1.0; + + for (j = 0; j < N; j++) + { + gsl_vector_view column = gsl_matrix_column (A, j); + double norm = gsl_blas_dnrm2 (&column.vector); + + /* Determine if singular value is zero, according to the + criteria used in the main loop above (i.e. comparison + with norm of previous column). */ + + if (norm == 0.0 || prev_norm == 0.0 + || (j > 0 && norm <= tolerance * prev_norm)) + { + gsl_vector_set (S, j, 0.0); /* singular */ + gsl_vector_set_zero (&column.vector); /* annihilate column */ + + prev_norm = 0.0; + } + else + { + gsl_vector_set (S, j, norm); /* non-singular */ + gsl_vector_scale (&column.vector, 1.0 / norm); /* normalize column */ + + prev_norm = norm; + } + } + } + + if (count > 0) + { + /* reached sweep limit */ + GSL_ERROR ("Jacobi iterations did not reach desired tolerance", + GSL_ETOL); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/svdstep.c b/software/gsl-1.15/linalg/svdstep.c new file mode 100644 index 000000000..681de06fd --- /dev/null +++ b/software/gsl-1.15/linalg/svdstep.c @@ -0,0 +1,607 @@ +/* linalg/svdstep.c + * + * Copyright (C) 2007, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +chop_small_elements (gsl_vector * d, gsl_vector * f) +{ + const size_t N = d->size; + double d_i = gsl_vector_get (d, 0); + + size_t i; + + for (i = 0; i < N - 1; i++) + { + double f_i = gsl_vector_get (f, i); + double d_ip1 = gsl_vector_get (d, i + 1); + + if (fabs (f_i) < GSL_DBL_EPSILON * (fabs (d_i) + fabs (d_ip1))) + { + gsl_vector_set (f, i, 0.0); + } + + d_i = d_ip1; + } + +} + +static double +trailing_eigenvalue (const gsl_vector * d, const gsl_vector * f) +{ + const size_t n = d->size; + + double da = gsl_vector_get (d, n - 2); + double db = gsl_vector_get (d, n - 1); + double fa = (n > 2) ? gsl_vector_get (f, n - 3) : 0.0; + double fb = gsl_vector_get (f, n - 2); + + double mu; + +#if GOLUB_VAN_LOAN_8_3_2 + + /* Golub and van Loan, Algorithm 8.3.2 + The full SVD algorithm is described in section 8.6.2 */ + + double ta = da * da + fa * fa; + double tb = db * db + fb * fb; + double tab = da * fb; + + double dt = (ta - tb) / 2.0; + + + if (dt >= 0) + { + mu = tb - (tab * tab) / (dt + hypot (dt, tab)); + } + else + { + mu = tb + (tab * tab) / ((-dt) + hypot (dt, tab)); + } + +#else + { + /* We can compute mu more accurately than using the formula above + since we know the roots cannot be negative. This also avoids + the possibility of NaNs in the formula above. + + The matrix is [ da^2 + fa^2, da fb ; + da fb , db^2 + fb^2 ] + and mu is the eigenvalue closest to the bottom right element. + */ + + double ta = da * da + fa * fa; + double tb = db * db + fb * fb; + double tab = da * fb; + + double dt = (ta - tb) / 2.0; + + double S = ta + tb; + double da2 = da * da, db2 = db * db; + double fa2 = fa * fa, fb2 = fb * fb; + double P = (da2 * db2) + (fa2 * db2) + (fa2 * fb2); + double D = hypot(dt, tab); + double r1 = S/2 + D; + + if (dt >= 0) + { + /* tb < ta, choose smaller root */ + mu = (r1 > 0) ? P / r1 : 0.0; + } + else + { + /* tb > ta, choose larger root */ + mu = r1; + } + } + +#endif + + return mu; +} + +static void +create_schur (double d0, double f0, double d1, double * c, double * s) +{ + double apq = 2.0 * d0 * f0; + + if (d0 == 0 || f0 == 0) + { + *c = 1.0; + *s = 0.0; + return; + } + + /* Check if we need to rescale to avoid underflow/overflow */ + if (fabs(d0) < GSL_SQRT_DBL_MIN || fabs(d0) > GSL_SQRT_DBL_MAX + || fabs(f0) < GSL_SQRT_DBL_MIN || fabs(f0) > GSL_SQRT_DBL_MAX + || fabs(d1) < GSL_SQRT_DBL_MIN || fabs(d1) > GSL_SQRT_DBL_MAX) + { + double scale; + int d0_exp, f0_exp; + frexp(d0, &d0_exp); + frexp(f0, &f0_exp); + /* Bring |d0*f0| into the range GSL_DBL_MIN to GSL_DBL_MAX */ + scale = ldexp(1.0, -(d0_exp + f0_exp)/4); + d0 *= scale; + f0 *= scale; + d1 *= scale; + apq = 2.0 * d0 * f0; + } + + if (apq != 0.0) + { + double t; + double tau = (f0*f0 + (d1 + d0)*(d1 - d0)) / apq; + + if (tau >= 0.0) + { + t = 1.0/(tau + hypot(1.0, tau)); + } + else + { + t = -1.0/(-tau + hypot(1.0, tau)); + } + + *c = 1.0 / hypot(1.0, t); + *s = t * (*c); + } + else + { + *c = 1.0; + *s = 0.0; + } +} + +static void +svd2 (gsl_vector * d, gsl_vector * f, gsl_matrix * U, gsl_matrix * V) +{ + size_t i; + double c, s, a11, a12, a21, a22; + + const size_t M = U->size1; + const size_t N = V->size1; + + double d0 = gsl_vector_get (d, 0); + double f0 = gsl_vector_get (f, 0); + + double d1 = gsl_vector_get (d, 1); + + if (d0 == 0.0) + { + /* Eliminate off-diagonal element in [0,f0;0,d1] to make [d,0;0,0] */ + + create_givens (f0, d1, &c, &s); + + /* compute B <= G^T B X, where X = [0,1;1,0] */ + + gsl_vector_set (d, 0, c * f0 - s * d1); + gsl_vector_set (f, 0, s * f0 + c * d1); + gsl_vector_set (d, 1, 0.0); + + /* Compute U <= U G */ + + for (i = 0; i < M; i++) + { + double Uip = gsl_matrix_get (U, i, 0); + double Uiq = gsl_matrix_get (U, i, 1); + gsl_matrix_set (U, i, 0, c * Uip - s * Uiq); + gsl_matrix_set (U, i, 1, s * Uip + c * Uiq); + } + + /* Compute V <= V X */ + + gsl_matrix_swap_columns (V, 0, 1); + + return; + } + else if (d1 == 0.0) + { + /* Eliminate off-diagonal element in [d0,f0;0,0] */ + + create_givens (d0, f0, &c, &s); + + /* compute B <= B G */ + + gsl_vector_set (d, 0, d0 * c - f0 * s); + gsl_vector_set (f, 0, 0.0); + + /* Compute V <= V G */ + + for (i = 0; i < N; i++) + { + double Vip = gsl_matrix_get (V, i, 0); + double Viq = gsl_matrix_get (V, i, 1); + gsl_matrix_set (V, i, 0, c * Vip - s * Viq); + gsl_matrix_set (V, i, 1, s * Vip + c * Viq); + } + + return; + } + else + { + /* Make columns orthogonal, A = [d0, f0; 0, d1] * G */ + + create_schur (d0, f0, d1, &c, &s); + + /* compute B <= B G */ + + a11 = c * d0 - s * f0; + a21 = - s * d1; + + a12 = s * d0 + c * f0; + a22 = c * d1; + + /* Compute V <= V G */ + + for (i = 0; i < N; i++) + { + double Vip = gsl_matrix_get (V, i, 0); + double Viq = gsl_matrix_get (V, i, 1); + gsl_matrix_set (V, i, 0, c * Vip - s * Viq); + gsl_matrix_set (V, i, 1, s * Vip + c * Viq); + } + + /* Eliminate off-diagonal elements, bring column with largest + norm to first column */ + + if (hypot(a11, a21) < hypot(a12,a22)) + { + double t1, t2; + + /* B <= B X */ + + t1 = a11; a11 = a12; a12 = t1; + t2 = a21; a21 = a22; a22 = t2; + + /* V <= V X */ + + gsl_matrix_swap_columns(V, 0, 1); + } + + create_givens (a11, a21, &c, &s); + + /* compute B <= G^T B */ + + gsl_vector_set (d, 0, c * a11 - s * a21); + gsl_vector_set (f, 0, c * a12 - s * a22); + gsl_vector_set (d, 1, s * a12 + c * a22); + + /* Compute U <= U G */ + + for (i = 0; i < M; i++) + { + double Uip = gsl_matrix_get (U, i, 0); + double Uiq = gsl_matrix_get (U, i, 1); + gsl_matrix_set (U, i, 0, c * Uip - s * Uiq); + gsl_matrix_set (U, i, 1, s * Uip + c * Uiq); + } + + return; + } +} + + +static void +chase_out_intermediate_zero (gsl_vector * d, gsl_vector * f, gsl_matrix * U, size_t k0) +{ +#if !USE_BLAS + const size_t M = U->size1; +#endif + const size_t n = d->size; + double c, s; + double x, y; + size_t k; + + x = gsl_vector_get (f, k0); + y = gsl_vector_get (d, k0+1); + + for (k = k0; k < n - 1; k++) + { + create_givens (y, -x, &c, &s); + + /* Compute U <= U G */ + +#ifdef USE_BLAS + { + gsl_vector_view Uk0 = gsl_matrix_column(U,k0); + gsl_vector_view Ukp1 = gsl_matrix_column(U,k+1); + gsl_blas_drot(&Uk0.vector, &Ukp1.vector, c, -s); + } +#else + { + size_t i; + + for (i = 0; i < M; i++) + { + double Uip = gsl_matrix_get (U, i, k0); + double Uiq = gsl_matrix_get (U, i, k + 1); + gsl_matrix_set (U, i, k0, c * Uip - s * Uiq); + gsl_matrix_set (U, i, k + 1, s * Uip + c * Uiq); + } + } +#endif + + /* compute B <= G^T B */ + + gsl_vector_set (d, k + 1, s * x + c * y); + + if (k == k0) + gsl_vector_set (f, k, c * x - s * y ); + + if (k < n - 2) + { + double z = gsl_vector_get (f, k + 1); + gsl_vector_set (f, k + 1, c * z); + + x = -s * z ; + y = gsl_vector_get (d, k + 2); + } + } +} + +static void +chase_out_trailing_zero (gsl_vector * d, gsl_vector * f, gsl_matrix * V) +{ +#if !USE_BLAS + const size_t N = V->size1; +#endif + const size_t n = d->size; + double c, s; + double x, y; + size_t k; + + x = gsl_vector_get (d, n - 2); + y = gsl_vector_get (f, n - 2); + + for (k = n - 1; k-- > 0;) + { + create_givens (x, y, &c, &s); + + /* Compute V <= V G where G = [c, s ; -s, c] */ + +#ifdef USE_BLAS + { + gsl_vector_view Vp = gsl_matrix_column(V,k); + gsl_vector_view Vq = gsl_matrix_column(V,n-1); + gsl_blas_drot(&Vp.vector, &Vq.vector, c, -s); + } +#else + { + size_t i; + + for (i = 0; i < N; i++) + { + double Vip = gsl_matrix_get (V, i, k); + double Viq = gsl_matrix_get (V, i, n - 1); + gsl_matrix_set (V, i, k, c * Vip - s * Viq); + gsl_matrix_set (V, i, n - 1, s * Vip + c * Viq); + } + } +#endif + + /* compute B <= B G */ + + gsl_vector_set (d, k, c * x - s * y); + + if (k == n - 2) + gsl_vector_set (f, k, s * x + c * y ); + + if (k > 0) + { + double z = gsl_vector_get (f, k - 1); + gsl_vector_set (f, k - 1, c * z); + + x = gsl_vector_get (d, k - 1); + y = s * z ; + } + } +} + +static void +qrstep (gsl_vector * d, gsl_vector * f, gsl_matrix * U, gsl_matrix * V) +{ +#if !USE_BLAS + const size_t M = U->size1; + const size_t N = V->size1; +#endif + const size_t n = d->size; + double y, z; + double ak, bk, zk, ap, bp, aq, bq; + size_t i, k; + + if (n == 1) + return; /* shouldn't happen */ + + /* Compute 2x2 svd directly */ + + if (n == 2) + { + svd2 (d, f, U, V); + return; + } + + /* Chase out any zeroes on the diagonal */ + + for (i = 0; i < n - 1; i++) + { + double d_i = gsl_vector_get (d, i); + + if (d_i == 0.0) + { + chase_out_intermediate_zero (d, f, U, i); + return; + } + } + + /* Chase out any zero at the end of the diagonal */ + + { + double d_nm1 = gsl_vector_get (d, n - 1); + + if (d_nm1 == 0.0) + { + chase_out_trailing_zero (d, f, V); + return; + } + } + + + /* Apply QR reduction steps to the diagonal and offdiagonal */ + + { + double d0 = gsl_vector_get (d, 0); + double f0 = gsl_vector_get (f, 0); + + double d1 = gsl_vector_get (d, 1); + double f1 = gsl_vector_get (f, 1); + + { + double mu = trailing_eigenvalue (d, f); + + y = d0 * d0 - mu; + z = d0 * f0; + } + + /* Set up the recurrence for Givens rotations on a bidiagonal matrix */ + + ak = 0; + bk = 0; + + ap = d0; + bp = f0; + + aq = d1; + bq = f1; + } + + for (k = 0; k < n - 1; k++) + { + double c, s; + create_givens (y, z, &c, &s); + + /* Compute V <= V G */ + +#ifdef USE_BLAS + { + gsl_vector_view Vk = gsl_matrix_column(V,k); + gsl_vector_view Vkp1 = gsl_matrix_column(V,k+1); + gsl_blas_drot(&Vk.vector, &Vkp1.vector, c, -s); + } +#else + for (i = 0; i < N; i++) + { + double Vip = gsl_matrix_get (V, i, k); + double Viq = gsl_matrix_get (V, i, k + 1); + gsl_matrix_set (V, i, k, c * Vip - s * Viq); + gsl_matrix_set (V, i, k + 1, s * Vip + c * Viq); + } +#endif + + /* compute B <= B G */ + + { + double bk1 = c * bk - s * z; + + double ap1 = c * ap - s * bp; + double bp1 = s * ap + c * bp; + double zp1 = -s * aq; + + double aq1 = c * aq; + + if (k > 0) + { + gsl_vector_set (f, k - 1, bk1); + } + + ak = ap1; + bk = bp1; + zk = zp1; + + ap = aq1; + + if (k < n - 2) + { + bp = gsl_vector_get (f, k + 1); + } + else + { + bp = 0.0; + } + + y = ak; + z = zk; + } + + create_givens (y, z, &c, &s); + + /* Compute U <= U G */ + +#ifdef USE_BLAS + { + gsl_vector_view Uk = gsl_matrix_column(U,k); + gsl_vector_view Ukp1 = gsl_matrix_column(U,k+1); + gsl_blas_drot(&Uk.vector, &Ukp1.vector, c, -s); + } +#else + for (i = 0; i < M; i++) + { + double Uip = gsl_matrix_get (U, i, k); + double Uiq = gsl_matrix_get (U, i, k + 1); + gsl_matrix_set (U, i, k, c * Uip - s * Uiq); + gsl_matrix_set (U, i, k + 1, s * Uip + c * Uiq); + } +#endif + + /* compute B <= G^T B */ + + { + double ak1 = c * ak - s * zk; + double bk1 = c * bk - s * ap; + double zk1 = -s * bp; + + double ap1 = s * bk + c * ap; + double bp1 = c * bp; + + gsl_vector_set (d, k, ak1); + + ak = ak1; + bk = bk1; + zk = zk1; + + ap = ap1; + bp = bp1; + + if (k < n - 2) + { + aq = gsl_vector_get (d, k + 2); + } + else + { + aq = 0.0; + } + + y = bk; + z = zk; + } + } + + gsl_vector_set (f, n - 2, bk); + gsl_vector_set (d, n - 1, ap); +} + + diff --git a/software/gsl-1.15/linalg/symmtd.c b/software/gsl-1.15/linalg/symmtd.c new file mode 100644 index 000000000..dd3d61605 --- /dev/null +++ b/software/gsl-1.15/linalg/symmtd.c @@ -0,0 +1,232 @@ +/* linalg/sytd.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Factorise a symmetric matrix A into + * + * A = Q T Q' + * + * where Q is orthogonal and T is symmetric tridiagonal. Only the + * diagonal and lower triangular part of A is referenced and modified. + * + * On exit, T is stored in the diagonal and first subdiagonal of + * A. Since T is symmetric the upper diagonal is not stored. + * + * Q is stored as a packed set of Householder transformations in the + * lower triangular part of the input matrix below the first subdiagonal. + * + * The full matrix for Q can be obtained as the product + * + * Q = Q_1 Q_2 ... Q_(N-2) + * + * where + * + * Q_i = (I - tau_i * v_i * v_i') + * + * and where v_i is a Householder vector + * + * v_i = [0, ... , 0, 1, A(i+1,i), A(i+2,i), ... , A(N,i)] + * + * This storage scheme is the same as in LAPACK. See LAPACK's + * ssytd2.f for details. + * + * See Golub & Van Loan, "Matrix Computations" (3rd ed), Section 8.3 + * + * Note: this description uses 1-based indices. The code below uses + * 0-based indices + */ + +#include +#include +#include +#include +#include +#include + +#include + +int +gsl_linalg_symmtd_decomp (gsl_matrix * A, gsl_vector * tau) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("symmetric tridiagonal decomposition requires square matrix", + GSL_ENOTSQR); + } + else if (tau->size + 1 != A->size1) + { + GSL_ERROR ("size of tau must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + size_t i; + + for (i = 0 ; i < N - 2; i++) + { + gsl_vector_view c = gsl_matrix_column (A, i); + gsl_vector_view v = gsl_vector_subvector (&c.vector, i + 1, N - (i + 1)); + double tau_i = gsl_linalg_householder_transform (&v.vector); + + /* Apply the transformation H^T A H to the remaining columns */ + + if (tau_i != 0.0) + { + gsl_matrix_view m = gsl_matrix_submatrix (A, i + 1, i + 1, + N - (i+1), N - (i+1)); + double ei = gsl_vector_get(&v.vector, 0); + gsl_vector_view x = gsl_vector_subvector (tau, i, N-(i+1)); + gsl_vector_set (&v.vector, 0, 1.0); + + /* x = tau * A * v */ + gsl_blas_dsymv (CblasLower, tau_i, &m.matrix, &v.vector, 0.0, &x.vector); + + /* w = x - (1/2) tau * (x' * v) * v */ + { + double xv, alpha; + gsl_blas_ddot(&x.vector, &v.vector, &xv); + alpha = - (tau_i / 2.0) * xv; + gsl_blas_daxpy(alpha, &v.vector, &x.vector); + } + + /* apply the transformation A = A - v w' - w v' */ + gsl_blas_dsyr2(CblasLower, -1.0, &v.vector, &x.vector, &m.matrix); + + gsl_vector_set (&v.vector, 0, ei); + } + + gsl_vector_set (tau, i, tau_i); + } + + return GSL_SUCCESS; + } +} + + +/* Form the orthogonal matrix Q from the packed QR matrix */ + +int +gsl_linalg_symmtd_unpack (const gsl_matrix * A, + const gsl_vector * tau, + gsl_matrix * Q, + gsl_vector * diag, + gsl_vector * sdiag) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + else if (tau->size + 1 != A->size1) + { + GSL_ERROR ("size of tau must be (matrix size - 1)", GSL_EBADLEN); + } + else if (Q->size1 != A->size1 || Q->size2 != A->size1) + { + GSL_ERROR ("size of Q must match size of A", GSL_EBADLEN); + } + else if (diag->size != A->size1) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (sdiag->size + 1 != A->size1) + { + GSL_ERROR ("size of subdiagonal must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + + size_t i; + + /* Initialize Q to the identity */ + + gsl_matrix_set_identity (Q); + + for (i = N - 2; i-- > 0;) + { + gsl_vector_const_view c = gsl_matrix_const_column (A, i); + gsl_vector_const_view h = gsl_vector_const_subvector (&c.vector, i + 1, N - (i+1)); + double ti = gsl_vector_get (tau, i); + + gsl_matrix_view m = gsl_matrix_submatrix (Q, i + 1, i + 1, N-(i+1), N-(i+1)); + + gsl_linalg_householder_hm (ti, &h.vector, &m.matrix); + } + + /* Copy diagonal into diag */ + + for (i = 0; i < N; i++) + { + double Aii = gsl_matrix_get (A, i, i); + gsl_vector_set (diag, i, Aii); + } + + /* Copy subdiagonal into sd */ + + for (i = 0; i < N - 1; i++) + { + double Aji = gsl_matrix_get (A, i+1, i); + gsl_vector_set (sdiag, i, Aji); + } + + return GSL_SUCCESS; + } +} + +int +gsl_linalg_symmtd_unpack_T (const gsl_matrix * A, + gsl_vector * diag, + gsl_vector * sdiag) +{ + if (A->size1 != A->size2) + { + GSL_ERROR ("matrix A must be square", GSL_ENOTSQR); + } + else if (diag->size != A->size1) + { + GSL_ERROR ("size of diagonal must match size of A", GSL_EBADLEN); + } + else if (sdiag->size + 1 != A->size1) + { + GSL_ERROR ("size of subdiagonal must be (matrix size - 1)", GSL_EBADLEN); + } + else + { + const size_t N = A->size1; + + size_t i; + + /* Copy diagonal into diag */ + + for (i = 0; i < N; i++) + { + double Aii = gsl_matrix_get (A, i, i); + gsl_vector_set (diag, i, Aii); + } + + /* Copy subdiagonal into sdiag */ + + for (i = 0; i < N - 1; i++) + { + double Aij = gsl_matrix_get (A, i+1, i); + gsl_vector_set (sdiag, i, Aij); + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/linalg/test.c b/software/gsl-1.15/linalg/test.c new file mode 100644 index 000000000..49d6c3f09 --- /dev/null +++ b/software/gsl-1.15/linalg/test.c @@ -0,0 +1,4390 @@ +/* linalg/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2007, 2010 Gerard Jungman, Brian Gough + * Copyright (C) Huan Wu (test_choleskyc_invert and test_choleskyc_invert_dim) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TEST_SVD_4X4 1 + +int check (double x, double actual, double eps); +gsl_matrix * create_hilbert_matrix(unsigned long size); +gsl_matrix * create_general_matrix(unsigned long size1, unsigned long size2); +gsl_matrix * create_vandermonde_matrix(unsigned long size); +gsl_matrix * create_moler_matrix(unsigned long size); +gsl_matrix * create_row_matrix(unsigned long size1, unsigned long size2); +gsl_matrix * create_2x2_matrix(double a11, double a12, double a21, double a22); +gsl_matrix * create_diagonal_matrix(double a[], unsigned long size); +gsl_matrix * create_sparse_matrix(unsigned long m, unsigned long n); + +int test_matmult(void); +int test_matmult_mod(void); +int test_LU_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_LU_solve(void); +int test_LUc_solve_dim(const gsl_matrix_complex * m, const double * actual, double eps); +int test_LUc_solve(void); +int test_QR_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_QR_solve(void); +int test_QR_QRsolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_QR_QRsolve(void); +int test_QR_lssolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_QR_lssolve(void); +int test_QR_decomp_dim(const gsl_matrix * m, double eps); +int test_QR_decomp(void); +int test_QRPT_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_QRPT_solve(void); +int test_QRPT_QRsolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_QRPT_QRsolve(void); +int test_QRPT_decomp_dim(const gsl_matrix * m, double eps); +int test_QRPT_decomp(void); +int test_QR_update_dim(const gsl_matrix * m, double eps); +int test_QR_update(void); +int test_QRPT_update_dim(const gsl_matrix * m, double eps); +int test_QRPT_update(void); + +int test_LQ_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_LQ_solve(void); +int test_LQ_LQsolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_LQ_LQsolve(void); +int test_LQ_lssolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_LQ_lssolve(void); +int test_LQ_decomp_dim(const gsl_matrix * m, double eps); +int test_LQ_decomp(void); +int test_PTLQ_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_PTLQ_solve(void); +int test_PTLQ_LQsolve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_PTLQ_LQsolve(void); +int test_PTLQ_decomp_dim(const gsl_matrix * m, double eps); +int test_PTLQ_decomp(void); +int test_LQ_update_dim(const gsl_matrix * m, double eps); +int test_LQ_update(void); + +int test_SV_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_SV_solve(void); +int test_SV_decomp_dim(const gsl_matrix * m, double eps); +int test_SV_decomp(void); +int test_SV_decomp_mod_dim(const gsl_matrix * m, double eps); +int test_SV_decomp_mod(void); +int test_SV_decomp_jacobi_dim(const gsl_matrix * m, double eps); +int test_SV_decomp_jacobi(void); +int test_cholesky_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_cholesky_solve(void); +int test_cholesky_decomp_dim(const gsl_matrix * m, double eps); +int test_cholesky_decomp(void); +int test_cholesky_invert_dim(const gsl_matrix * m, double eps); +int test_cholesky_invert(void); +int test_HH_solve_dim(const gsl_matrix * m, const double * actual, double eps); +int test_HH_solve(void); +int test_TDS_solve_dim(unsigned long dim, double d, double od, const double * actual, double eps); +int test_TDS_solve(void); +int test_TDN_solve_dim(unsigned long dim, double d, double a, double b, const double * actual, double eps); +int test_TDN_solve(void); +int test_TDS_cyc_solve_one(const unsigned long dim, const double * d, const double * od, const double * r, + const double * actual, double eps); +int test_TDS_cyc_solve(void); +int test_TDN_cyc_solve_dim(unsigned long dim, double d, double a, double b, const double * actual, double eps); +int test_TDN_cyc_solve(void); +int test_bidiag_decomp_dim(const gsl_matrix * m, double eps); +int test_bidiag_decomp(void); + +int +check (double x, double actual, double eps) +{ + if (x == actual) + { + return 0; + } + else if (actual == 0) + { + return fabs(x) > eps; + } + else + { + return (fabs(x - actual)/fabs(actual)) > eps; + } +} + + +gsl_vector * +vector_alloc (size_t n) +{ + size_t p[5] = {3, 5, 7, 11, 13}; + static size_t k = 0; + + size_t stride = p[k]; + k = (k + 1) % 5; + + { + gsl_block * b = gsl_block_alloc (n * stride); + gsl_vector * v = gsl_vector_alloc_from_block (b, 0, n, stride); + v->owner = 1; + return v; + } +} + +void +vector_free (gsl_vector * v) +{ + gsl_vector_free (v); +} + +gsl_matrix * +create_hilbert_matrix(unsigned long size) +{ + unsigned long i, j; + gsl_matrix * m = gsl_matrix_alloc(size, size); + for(i=0; i GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 65.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 30.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 30.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 65.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 42.0) > GSL_DBL_EPSILON ); + + gsl_matrix_free(A); + gsl_matrix_free(B); + gsl_matrix_free(C); + + return s; +} + + +int +test_matmult_mod(void) +{ + int s = 0; + + gsl_matrix * A = gsl_matrix_calloc(3, 3); + gsl_matrix * B = gsl_matrix_calloc(3, 3); + gsl_matrix * C = gsl_matrix_calloc(3, 3); + gsl_matrix * D = gsl_matrix_calloc(2, 3); + gsl_matrix * E = gsl_matrix_calloc(2, 3); + gsl_matrix * F = gsl_matrix_calloc(2, 2); + + gsl_matrix_set(A, 0, 0, 10.0); + gsl_matrix_set(A, 0, 1, 5.0); + gsl_matrix_set(A, 0, 2, 1.0); + gsl_matrix_set(A, 1, 0, 1.0); + gsl_matrix_set(A, 1, 1, 20.0); + gsl_matrix_set(A, 1, 2, 5.0); + gsl_matrix_set(A, 2, 0, 1.0); + gsl_matrix_set(A, 2, 1, 3.0); + gsl_matrix_set(A, 2, 2, 7.0); + + gsl_matrix_set(B, 0, 0, 10.0); + gsl_matrix_set(B, 0, 1, 5.0); + gsl_matrix_set(B, 0, 2, 2.0); + gsl_matrix_set(B, 1, 0, 1.0); + gsl_matrix_set(B, 1, 1, 3.0); + gsl_matrix_set(B, 1, 2, 2.0); + gsl_matrix_set(B, 2, 0, 1.0); + gsl_matrix_set(B, 2, 1, 3.0); + gsl_matrix_set(B, 2, 2, 2.0); + + gsl_matrix_set(D, 0, 0, 10.0); + gsl_matrix_set(D, 0, 1, 5.0); + gsl_matrix_set(D, 0, 2, 1.0); + gsl_matrix_set(D, 1, 0, 1.0); + gsl_matrix_set(D, 1, 1, 20.0); + gsl_matrix_set(D, 1, 2, 5.0); + + gsl_matrix_set(E, 0, 0, 10.0); + gsl_matrix_set(E, 0, 1, 5.0); + gsl_matrix_set(E, 0, 2, 2.0); + gsl_matrix_set(E, 1, 0, 1.0); + gsl_matrix_set(E, 1, 1, 3.0); + gsl_matrix_set(E, 1, 2, 2.0); + + gsl_linalg_matmult_mod(A, GSL_LINALG_MOD_NONE, B, GSL_LINALG_MOD_NONE, C); + s += ( fabs(gsl_matrix_get(C, 0, 0) - 106.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 68.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 32.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 35.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 80.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 52.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 0) - 20.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 1) - 35.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 2) - 22.0) > GSL_DBL_EPSILON ); + + gsl_linalg_matmult_mod(A, GSL_LINALG_MOD_TRANSPOSE, B, GSL_LINALG_MOD_NONE, C); + s += ( fabs(gsl_matrix_get(C, 0, 0) - 102.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 56.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 24.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 73.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 94.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 56.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 0) - 22.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 1) - 41.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 2) - 26.0) > GSL_DBL_EPSILON ); + + gsl_linalg_matmult_mod(A, GSL_LINALG_MOD_NONE, B, GSL_LINALG_MOD_TRANSPOSE, C); + s += ( fabs(gsl_matrix_get(C, 0, 0) - 127.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 27.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 27.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 120.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 71.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 71.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 0) - 39.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 1) - 24.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 2) - 24.0) > GSL_DBL_EPSILON ); + + gsl_linalg_matmult_mod(A, GSL_LINALG_MOD_TRANSPOSE, B, GSL_LINALG_MOD_TRANSPOSE, C); + s += ( fabs(gsl_matrix_get(C, 0, 0) - 107.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 15.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 15.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 156.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 71.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 71.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 0) - 49.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 1) - 30.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 2) - 30.0) > GSL_DBL_EPSILON ); + + /* now try for non-symmetric matrices */ + gsl_linalg_matmult_mod(D, GSL_LINALG_MOD_TRANSPOSE, E, GSL_LINALG_MOD_NONE, C); + s += ( fabs(gsl_matrix_get(C, 0, 0) - 101.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 1) - 53.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 0, 2) - 22.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 0) - 70.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 1) - 85.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 1, 2) - 50.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 0) - 15.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 1) - 20.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(C, 2, 2) - 12.0) > GSL_DBL_EPSILON ); + + + gsl_linalg_matmult_mod(D, GSL_LINALG_MOD_NONE, E, GSL_LINALG_MOD_TRANSPOSE, F); + s += ( fabs(gsl_matrix_get(F, 0, 0) - 127.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(F, 0, 1) - 27.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(F, 1, 0) - 120.0) > GSL_DBL_EPSILON ); + s += ( fabs(gsl_matrix_get(F, 1, 1) - 71.0) > GSL_DBL_EPSILON ); + + + gsl_matrix_free(A); + gsl_matrix_free(B); + gsl_matrix_free(C); + gsl_matrix_free(D); + gsl_matrix_free(E); + gsl_matrix_free(F); + + return s; +} +#endif + +int +test_LU_solve_dim(const gsl_matrix * m, const double * actual, double eps) +{ + int s = 0; + int signum; + unsigned long i, dim = m->size1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lu = gsl_matrix_alloc(dim,dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * residual = gsl_vector_alloc(dim); + gsl_matrix_memcpy(lu,m); + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector_complex * rhs = gsl_vector_complex_alloc(dim); + gsl_matrix_complex * lu = gsl_matrix_complex_alloc(dim,dim); + gsl_vector_complex * x = gsl_vector_complex_alloc(dim); + gsl_vector_complex * residual = gsl_vector_complex_alloc(dim); + gsl_matrix_complex_memcpy(lu,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * qr = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_memcpy(qr,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * qr = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * r = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_memcpy(qr,m); + for(i=0; isize1, N = m->size2; + + gsl_vector * rhs = gsl_vector_alloc(M); + gsl_matrix * qr = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * r = gsl_vector_alloc(M); + gsl_vector * res = gsl_vector_alloc(M); + + gsl_matrix_memcpy(qr,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * qr = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(M,M); + gsl_matrix * r = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + + gsl_matrix_memcpy(qr,m); + + s += gsl_linalg_QR_decomp(qr, d); + s += gsl_linalg_QR_unpack(qr, d, q, r); + + /* compute a = q r */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, q, r, 0.0, a); + + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * qr = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_memcpy(qr,m); + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * qr = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * r = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_memcpy(qr,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * qr = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(M,M); + gsl_matrix * r = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * norm = gsl_vector_alloc(N); + + gsl_permutation * perm = gsl_permutation_alloc(N); + + gsl_matrix_memcpy(qr,m); + + s += gsl_linalg_QRPT_decomp(qr, d, perm, &signum, norm); + s += gsl_linalg_QR_unpack(qr, d, q, r); + + /* compute a = q r */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, q, r, 0.0, a); + + + /* Compute QR P^T by permuting the elements of the rows of QR */ + + for (i = 0; i < M; i++) { + gsl_vector_view row = gsl_matrix_row (a, i); + gsl_permute_vector_inverse (perm, &row.vector); + } + + for(i=0; isize1, N = m->size2; + + gsl_matrix * qr1 = gsl_matrix_alloc(M,N); + gsl_matrix * qr2 = gsl_matrix_alloc(M,N); + gsl_matrix * q1 = gsl_matrix_alloc(M,M); + gsl_matrix * r1 = gsl_matrix_alloc(M,N); + gsl_matrix * q2 = gsl_matrix_alloc(M,M); + gsl_matrix * r2 = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * solution1 = gsl_vector_alloc(N); + gsl_vector * solution2 = gsl_vector_alloc(N); + gsl_vector * u = gsl_vector_alloc(M); + gsl_vector * v = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(M); + + gsl_matrix_memcpy(qr1,m); + gsl_matrix_memcpy(qr2,m); + + for(i=0; isize1, N = m->size2; + + gsl_matrix * qr1 = gsl_matrix_alloc(M,N); + gsl_matrix * qr2 = gsl_matrix_alloc(M,N); + gsl_matrix * q1 = gsl_matrix_alloc(M,M); + gsl_matrix * r1 = gsl_matrix_alloc(M,N); + gsl_matrix * q2 = gsl_matrix_alloc(M,M); + gsl_matrix * r2 = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * u = gsl_vector_alloc(M); + gsl_vector * v = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(M); + + gsl_vector * norm = gsl_vector_alloc(N); + gsl_permutation * perm = gsl_permutation_alloc(N); + + gsl_matrix_memcpy(qr1,m); + gsl_matrix_memcpy(qr2,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * l = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_vector * rhs = gsl_vector_alloc(M); + gsl_matrix * lq = gsl_matrix_alloc(N,M); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * x = gsl_vector_alloc(N); + gsl_vector * r = gsl_vector_alloc(M); + gsl_vector * res = gsl_vector_alloc(M); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(N,N); + gsl_matrix * l = gsl_matrix_alloc(M,N); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + + gsl_matrix_memcpy(lq,m); + + s += gsl_linalg_LQ_decomp(lq, d); + s += gsl_linalg_LQ_unpack(lq, d, q, l); + + /* compute a = q r */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, q, 0.0, a); + + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * lq = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_matrix * l = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_vector * norm = gsl_vector_alloc(dim); + + gsl_matrix_transpose_memcpy(lq,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq = gsl_matrix_alloc(N,M); + gsl_matrix * a = gsl_matrix_alloc(N,M); + gsl_matrix * q = gsl_matrix_alloc(M,M); + gsl_matrix * l = gsl_matrix_alloc(N,M); + gsl_vector * d = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * norm = gsl_vector_alloc(N); + + gsl_permutation * perm = gsl_permutation_alloc(N); + + gsl_matrix_transpose_memcpy(lq,m); + + s += gsl_linalg_PTLQ_decomp(lq, d, perm, &signum, norm); + s += gsl_linalg_LQ_unpack(lq, d, q, l); + + /* compute a = l q */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, q, 0.0, a); + + + /* Compute P LQ by permuting the rows of LQ */ + + for (i = 0; i < M; i++) { + gsl_vector_view col = gsl_matrix_column (a, i); + gsl_permute_vector_inverse (perm, &col.vector); + } + + for(i=0; isize1, N = m->size2; + + gsl_matrix * lq1 = gsl_matrix_alloc(N,M); + gsl_matrix * lq2 = gsl_matrix_alloc(N,M); + gsl_matrix * q1 = gsl_matrix_alloc(M,M); + gsl_matrix * l1 = gsl_matrix_alloc(N,M); + gsl_matrix * q2 = gsl_matrix_alloc(M,M); + gsl_matrix * l2 = gsl_matrix_alloc(N,M); + gsl_vector * d2 = gsl_vector_alloc(GSL_MIN(M,N)); + gsl_vector * u = gsl_vector_alloc(M); + gsl_vector * v = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(M); + + gsl_matrix_transpose_memcpy(lq1,m); + gsl_matrix_transpose_memcpy(lq2,m); + for(i=0; isize1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * u = gsl_matrix_alloc(dim,dim); + gsl_matrix * q = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_calloc(dim); + gsl_matrix_memcpy(u,m); + for(i=0; isize1, N = m->size2; + unsigned long input_nans = 0; + + gsl_matrix * v = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(N,N); + gsl_matrix * dqt = gsl_matrix_alloc(N,N); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(N); + + gsl_matrix_memcpy(v,m); + + /* Check for nans in the input */ + for (i = 0; i 0) + continue; /* skip NaNs if present in input */ + else + { + s++; + printf("bad singular value %lu = %22.18g\n", i, di); + } + } + + if (di < 0) { + s++; + printf("singular value %lu = %22.18g < 0\n", i, di); + } + + if(i > 0 && di > di1) { + s++; + printf("singular value %lu = %22.18g vs previous %22.18g\n", i, di, di1); + } + + di1 = di; + } + + /* Scale dqt = D Q^T */ + + for (i = 0; i < N ; i++) + { + double di = gsl_vector_get (d, i); + + for (j = 0; j < N; j++) + { + double qji = gsl_matrix_get(q, j, i); + gsl_matrix_set (dqt, i, j, qji * di); + } + } + + /* compute a = v dqt */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, v, dqt, 0.0, a); + + for(i=0; idata; + + for (i=0; i<9; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + f = test_SV_decomp_dim(A33, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp (3x3) A=[ %g, %g, %g; %g, %g, %g; %g, %g, %g]", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + + /* increment */ + carry=1.0; + for (i=9; carry > 0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } + +#ifdef TEST_SVD_4X4 + { + int i; + double carry = 0, lower = 0, upper = 1; + double *a = A44->data; + + for (i=0; i<16; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + f = test_SV_decomp_dim(A44, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp (4x4) A=[ %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g]", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], + a[10], a[11], a[12], a[13], a[14], a[15]); + + /* increment */ + carry=1.0; + for (i=16; carry > 0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } +#endif + + return s; +} + + +int +test_SV_decomp_mod_dim(const gsl_matrix * m, double eps) +{ + int s = 0; + double di1; + unsigned long i,j, M = m->size1, N = m->size2; + + gsl_matrix * v = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(N,N); + gsl_matrix * x = gsl_matrix_alloc(N,N); + gsl_matrix * dqt = gsl_matrix_alloc(N,N); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * w = gsl_vector_alloc(N); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_SV_decomp_mod(v, x, q, d, w); + + /* Check that singular values are non-negative and in non-decreasing + order */ + + di1 = 0.0; + + for (i = 0; i < N; i++) + { + double di = gsl_vector_get (d, i); + + if (gsl_isnan (di)) + { + continue; /* skip NaNs */ + } + + if (di < 0) { + s++; + printf("singular value %lu = %22.18g < 0\n", i, di); + } + + if(i > 0 && di > di1) { + s++; + printf("singular value %lu = %22.18g vs previous %22.18g\n", i, di, di1); + } + + di1 = di; + } + + /* Scale dqt = D Q^T */ + + for (i = 0; i < N ; i++) + { + double di = gsl_vector_get (d, i); + + for (j = 0; j < N; j++) + { + double qji = gsl_matrix_get(q, j, i); + gsl_matrix_set (dqt, i, j, qji * di); + } + } + + /* compute a = v dqt */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, v, dqt, 0.0, a); + + for(i=0; idata; + + for (i=0; i<9; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + f = test_SV_decomp_mod_dim(A33, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp_mod (3x3) A=[ %g, %g, %g; %g, %g, %g; %g, %g, %g]", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + + /* increment */ + carry=1.0; + for (i=9; carry > 0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } + +#ifdef TEST_SVD_4X4 + { + int i; + double carry = 0, lower = 0, upper = 1; + double *a = A44->data; + + for (i=0; i<16; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + f = test_SV_decomp_mod_dim(A44, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp_mod (4x4) A=[ %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g]", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], + a[10], a[11], a[12], a[13], a[14], a[15]); + + /* increment */ + carry=1.0; + for (i=16; carry>0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } +#endif + + return s; +} + + +int +test_SV_decomp_jacobi_dim(const gsl_matrix * m, double eps) +{ + int s = 0; + double di1; + unsigned long i,j, M = m->size1, N = m->size2; + + gsl_matrix * v = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * q = gsl_matrix_alloc(N,N); + gsl_matrix * dqt = gsl_matrix_alloc(N,N); + gsl_vector * d = gsl_vector_alloc(N); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_SV_decomp_jacobi(v, q, d); + if (s) + printf("call returned status = %d\n", s); + + /* Check that singular values are non-negative and in non-decreasing + order */ + + di1 = 0.0; + + for (i = 0; i < N; i++) + { + double di = gsl_vector_get (d, i); + + if (gsl_isnan (di)) + { + continue; /* skip NaNs */ + } + + if (di < 0) { + s++; + printf("singular value %lu = %22.18g < 0\n", i, di); + } + + if(i > 0 && di > di1) { + s++; + printf("singular value %lu = %22.18g vs previous %22.18g\n", i, di, di1); + } + + di1 = di; + } + + /* Scale dqt = D Q^T */ + + for (i = 0; i < N ; i++) + { + double di = gsl_vector_get (d, i); + + for (j = 0; j < N; j++) + { + double qji = gsl_matrix_get(q, j, i); + gsl_matrix_set (dqt, i, j, qji * di); + } + } + + /* compute a = v dqt */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, v, dqt, 0.0, a); + + for(i=0; idata; + + for (i=0; i<9; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + f = test_SV_decomp_jacobi_dim(A33, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp_jacobi (3x3) A=[ %g, %g, %g; %g, %g, %g; %g, %g, %g]", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + + /* increment */ + carry=1.0; + for (i=9; carry > 0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } + +#ifdef TEST_SVD_4X4 + { + int i; + unsigned long k = 0; + double carry = 0, lower = 0, upper = 1; + double *a = A44->data; + + for (i=0; i<16; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + k++; + f = test_SV_decomp_jacobi_dim(A44, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp_jacobi (4x4) A=[ %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g; %g, %g, %g, %g] %lu", + a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], + a[10], a[11], a[12], a[13], a[14], a[15], k); + /* increment */ + carry=1.0; + for (i=16; carry > 0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } +#endif + + { + int i; + unsigned long k = 0; + double carry = 0, lower = 0, upper = 1; + double *a = A55->data; + + for (i=0; i<25; i++) { + a[i] = lower; + } + + while (carry == 0.0) { + k++; + + if (k % 1001 == 0) + { + f = test_SV_decomp_jacobi_dim(A55, 64 * GSL_DBL_EPSILON); + gsl_test(f, " SV_decomp_jacobi (5x5) case=%lu",k); + } + + /* increment */ + carry=1.0; + for (i=25; carry >0.0 && i>0 && i--;) + { + double v=a[i]+carry; + carry = (v>upper) ? 1.0 : 0.0; + a[i] = (v>upper) ? lower : v; + } + } + } + + + return s; +} + + +int +test_cholesky_solve_dim(const gsl_matrix * m, const double * actual, double eps) +{ + int s = 0; + unsigned long i, dim = m->size1; + + gsl_vector * rhs = gsl_vector_alloc(dim); + gsl_matrix * u = gsl_matrix_alloc(dim,dim); + gsl_vector * x = gsl_vector_calloc(dim); + gsl_matrix_memcpy(u,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * v = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * l = gsl_matrix_alloc(M,N); + gsl_matrix * lt = gsl_matrix_alloc(N,N); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_cholesky_decomp(v); + + /* Compute L LT */ + + for (i = 0; i < N ; i++) + { + for (j = 0; j < N; j++) + { + double vij = gsl_matrix_get(v, i, j); + gsl_matrix_set (l, i, j, i>=j ? vij : 0); + gsl_matrix_set (lt, i, j, i<=j ? vij : 0); + } + } + + /* compute a = l lt */ + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, lt, 0.0, a); + + for(i=0; isize1; + + gsl_matrix * v = gsl_matrix_alloc(N, N); + gsl_matrix * c = gsl_matrix_alloc(N, N); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_cholesky_decomp(v); + s += gsl_linalg_cholesky_invert(v); + + gsl_blas_dsymm(CblasLeft, CblasUpper, 1.0, m, v, 0.0, c); + + /* c should be the identity matrix */ + + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + int foo; + double cij = gsl_matrix_get(c, i, j); + double expected; + + if (i == j) + expected = 1.0; + else + expected = 0.0; + + foo = check(cij, expected, eps); + + if (foo) + printf("(%3lu,%3lu)[%lu,%lu]: %22.18g %22.18g\n", N, N, i,j, cij, expected); + + s += foo; + } + } + + gsl_matrix_free(v); + gsl_matrix_free(c); + + return s; +} + +int +test_cholesky_invert(void) +{ + int f; + int s = 0; + + f = test_cholesky_invert_dim(hilb2, 2 * 8.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(2)"); + s += f; + + f = test_cholesky_invert_dim(hilb3, 2 * 64.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(3)"); + s += f; + + f = test_cholesky_invert_dim(hilb4, 2 * 1024.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_invert hilbert(4)"); + s += f; + + return s; +} + + +int +test_cholesky_decomp_unit_dim(const gsl_matrix * m, double eps) +{ + int s = 0; + const unsigned long M = m->size1; + const unsigned long N = m->size2; + unsigned long i,j; + + gsl_matrix * v = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * l = gsl_matrix_alloc(M,N); + gsl_matrix * lt = gsl_matrix_alloc(N,N); + gsl_matrix * dm = gsl_matrix_alloc(M,N); + gsl_vector * dv = gsl_vector_alloc(M); + + gsl_matrix_memcpy(v,m); + + s += gsl_linalg_cholesky_decomp_unit(v, dv); + + /* + for(i = 0; i < M; i++) + { + for(j = 0; j < N; j++) + { + printf("v[%lu,%lu]: %22.18e\n", i,j, gsl_matrix_get(v, i, j)); + } + } + + + for(i = 0; i < M; i++) + { + printf("d[%lu]: %22.18e\n", i, gsl_vector_get(dv, i)); + } + */ + + /* put L and transpose(L) into separate matrices */ + + for(i = 0; i < N ; i++) + { + for(j = 0; j < N; j++) + { + const double vij = gsl_matrix_get(v, i, j); + gsl_matrix_set (l, i, j, i>=j ? vij : 0); + gsl_matrix_set (lt, i, j, i<=j ? vij : 0); + } + } + + /* put D into its own matrix */ + + gsl_matrix_set_zero(dm); + for(i = 0; i < M; ++i) gsl_matrix_set(dm, i, i, gsl_vector_get(dv, i)); + + /* compute a = L * D * transpose(L); uses v for temp space */ + + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, dm, lt, 0.0, v); + gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, l, v, 0.0, a); + + for(i = 0; i < M; i++) + { + for(j = 0; j < N; j++) + { + const double aij = gsl_matrix_get(a, i, j); + const double mij = gsl_matrix_get(m, i, j); + int foo = check(aij, mij, eps); + if(foo) + { + printf("(%3lu,%3lu)[%lu,%lu]: %22.18g %22.18g\n", M, N, i,j, aij, mij); + } + s += foo; + } + } + + gsl_vector_free(dv); + gsl_matrix_free(dm); + gsl_matrix_free(lt); + gsl_matrix_free(l); + gsl_matrix_free(v); + gsl_matrix_free(a); + + return s; +} + +int test_cholesky_decomp_unit(void) +{ + int f; + int s = 0; + + f = test_cholesky_decomp_unit_dim(hilb2, 2 * 8.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_decomp_unit hilbert(2)"); + s += f; + + f = test_cholesky_decomp_unit_dim(hilb3, 2 * 64.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_decomp_unit hilbert(3)"); + s += f; + + f = test_cholesky_decomp_unit_dim(hilb4, 2 * 1024.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_decomp_unit hilbert(4)"); + s += f; + + f = test_cholesky_decomp_unit_dim(hilb12, 2 * 1024.0 * GSL_DBL_EPSILON); + gsl_test(f, " cholesky_decomp_unit hilbert(12)"); + s += f; + + return s; +} + +int +test_choleskyc_solve_dim(const gsl_matrix_complex * m, const gsl_vector_complex * actual, double eps) +{ + int s = 0; + unsigned long i, dim = m->size1; + gsl_complex z; + gsl_vector_complex * rhs = gsl_vector_complex_alloc(dim); + gsl_matrix_complex * u = gsl_matrix_complex_alloc(dim,dim); + gsl_vector_complex * x = gsl_vector_complex_calloc(dim); + GSL_SET_IMAG(&z, 0.0); + gsl_matrix_complex_memcpy(u,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix_complex * v = gsl_matrix_complex_alloc(M,N); + gsl_matrix_complex * a = gsl_matrix_complex_alloc(M,N); + gsl_matrix_complex * l = gsl_matrix_complex_alloc(M,N); + gsl_matrix_complex * lh = gsl_matrix_complex_alloc(N,N); + + gsl_matrix_complex_memcpy(v, m); + gsl_matrix_complex_set_zero(l); + gsl_matrix_complex_set_zero(lh); + + s += gsl_linalg_complex_cholesky_decomp(v); + + /* Compute L L^H */ + + for (i = 0; i < N ; i++) + { + for (j = 0; j <= i; j++) + { + gsl_complex vij = gsl_matrix_complex_get(v, i, j); + gsl_matrix_complex_set (l, i, j, vij); + gsl_matrix_complex_set (lh, j, i, gsl_complex_conjugate(vij)); + } + } + + /* compute a = l lh */ + gsl_blas_zgemm (CblasNoTrans, + CblasNoTrans, + GSL_COMPLEX_ONE, + l, + lh, + GSL_COMPLEX_ZERO, + a); + + for(i=0; isize1; + gsl_complex af, bt; + gsl_matrix_complex * v = gsl_matrix_complex_alloc(N, N); + gsl_matrix_complex * c = gsl_matrix_complex_alloc(N, N); + + gsl_matrix_complex_memcpy(v, m); + + s += gsl_linalg_complex_cholesky_decomp(v); + s += gsl_linalg_complex_cholesky_invert(v); + + GSL_SET_COMPLEX(&af, 1.0, 0.0); + GSL_SET_COMPLEX(&bt, 0.0, 0.0); + gsl_blas_zhemm(CblasLeft, CblasUpper, af, m, v, bt, c); + + /* c should be the identity matrix */ + + for (i = 0; i < N; ++i) + { + for (j = 0; j < N; ++j) + { + int foo; + gsl_complex cij = gsl_matrix_complex_get(c, i, j); + double expected, actual; + + /* check real part */ + if (i == j) + expected = 1.0; + else + expected = 0.0; + actual = GSL_REAL(cij); + foo = check(actual, expected, eps); + if (foo) + printf("REAL(%3lu,%3lu)[%lu,%lu]: %22.18g %22.18g\n", + N, N, i,j, actual, expected); + s += foo; + + /* check imaginary part */ + expected = 0.0; + actual = GSL_IMAG(cij); + foo = check(actual, expected, eps); + if (foo) + printf("IMAG(%3lu,%3lu)[%lu,%lu]: %22.18g %22.18g\n", + N, N, i,j, actual, expected); + s += foo; + + } + } + + gsl_matrix_complex_free(v); + gsl_matrix_complex_free(c); + + return s; +} + +int +test_choleskyc_invert(void) +{ + int f; + int s = 0; + + double dat2[] = { + 92.303, 0.000, 10.858, 1.798, + 10.858, -1.798, 89.027, 0.000 + }; + + double dat3[] = { + 59.75,0, 49.25,172.25, 66.75,-162.75, + 49.25,-172.25, 555.5,0, -429,-333.5, + 66.75,162.75, -429,333.5, 536.5,0 + }; + + double dat4[] = { + 102.108, 0.000, 14.721, 1.343, -17.480, 15.591, 3.308, -2.936, + 14.721, -1.343, 101.970, 0.000, 11.671, -6.776, -5.009, -2.665, + -17.480, -15.591, 11.671, 6.776, 105.071, 0.000, 3.396, 6.276, + 3.308, 2.936, -5.009, 2.665, 3.396, -6.276, 107.128, 0.000 + }; + + { + gsl_matrix_complex_view rv2 = gsl_matrix_complex_view_array(dat2, 2, 2); + f = test_choleskyc_invert_dim(&rv2.matrix, 2 * 8.0 * GSL_DBL_EPSILON); + gsl_test(f, " choleskyc_invert 2x2 Hermitian"); + s += f; + } + + { + gsl_matrix_complex_view rv3 = gsl_matrix_complex_view_array(dat3, 3, 3); + f = test_choleskyc_invert_dim(&rv3.matrix, 2 * 1024.0 * GSL_DBL_EPSILON); + gsl_test(f, " choleskyc_invert 3x3 Hermitian"); + s += f; + } + + { + gsl_matrix_complex_view rv4 = gsl_matrix_complex_view_array(dat4, 4, 4); + f = test_choleskyc_invert_dim(&rv4.matrix, 2 * 64.0 * GSL_DBL_EPSILON); + gsl_test(f, " choleskyc_invert 4x4 Hermitian"); + s += f; + } + + return s; +} + + + +int +test_HH_solve_dim(const gsl_matrix * m, const double * actual, double eps) +{ + int s = 0; + unsigned long i, dim = m->size1; + + gsl_permutation * perm = gsl_permutation_alloc(dim); + gsl_matrix * hh = gsl_matrix_alloc(dim,dim); + gsl_vector * d = gsl_vector_alloc(dim); + gsl_vector * x = gsl_vector_alloc(dim); + gsl_matrix_memcpy(hh,m); + for(i=0; isize1, N = m->size2; + + gsl_matrix * A = gsl_matrix_alloc(M,N); + gsl_matrix * a = gsl_matrix_alloc(M,N); + gsl_matrix * b = gsl_matrix_alloc(N,N); + + gsl_matrix * u = gsl_matrix_alloc(M,N); + gsl_matrix * v = gsl_matrix_alloc(N,N); + + gsl_vector * tau1 = gsl_vector_alloc(N); + gsl_vector * tau2 = gsl_vector_alloc(N-1); + gsl_vector * d = gsl_vector_alloc(N); + gsl_vector * sd = gsl_vector_alloc(N-1); + + gsl_matrix_memcpy(A,m); + + s += gsl_linalg_bidiag_decomp(A, tau1, tau2); + s += gsl_linalg_bidiag_unpack(A, tau1, u, tau2, v, d, sd); + + gsl_matrix_set_zero(b); + for (i = 0; i < N; i++) gsl_matrix_set(b, i,i, gsl_vector_get(d,i)); + for (i = 0; i < N-1; i++) gsl_matrix_set(b, i,i+1, gsl_vector_get(sd,i)); + + /* Compute A = U B V^T */ + + for (i = 0; i < M ; i++) + { + for (j = 0; j < N; j++) + { + double sum = 0; + + for (k = 0; k < N; k++) + { + for (r = 0; r < N; r++) + { + sum += gsl_matrix_get(u, i, k) * gsl_matrix_get (b, k, r) + * gsl_matrix_get(v, j, r); + } + } + gsl_matrix_set (a, i, j, sum); + } + } + + for(i=0; i +#include +#include +#include +#include "tridiag.h" +#include + +/* for description of method see [Engeln-Mullges + Uhlig, p. 92] + * + * diag[0] offdiag[0] 0 ..... + * offdiag[0] diag[1] offdiag[1] ..... + * 0 offdiag[1] diag[2] + * 0 0 offdiag[2] ..... + */ +static +int +solve_tridiag( + const double diag[], size_t d_stride, + const double offdiag[], size_t o_stride, + const double b[], size_t b_stride, + double x[], size_t x_stride, + size_t N) +{ + int status = GSL_SUCCESS; + double *gamma = (double *) malloc (N * sizeof (double)); + double *alpha = (double *) malloc (N * sizeof (double)); + double *c = (double *) malloc (N * sizeof (double)); + double *z = (double *) malloc (N * sizeof (double)); + + if (gamma == 0 || alpha == 0 || c == 0 || z == 0) + { + GSL_ERROR("failed to allocate working space", GSL_ENOMEM); + } + else + { + size_t i, j; + + /* Cholesky decomposition + A = L.D.L^t + lower_diag(L) = gamma + diag(D) = alpha + */ + alpha[0] = diag[0]; + gamma[0] = offdiag[0] / alpha[0]; + + if (alpha[0] == 0) { + status = GSL_EZERODIV; + } + + for (i = 1; i < N - 1; i++) + { + alpha[i] = diag[d_stride * i] - offdiag[o_stride*(i - 1)] * gamma[i - 1]; + gamma[i] = offdiag[o_stride * i] / alpha[i]; + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + + if (N > 1) + { + alpha[N - 1] = diag[d_stride * (N - 1)] - offdiag[o_stride*(N - 2)] * gamma[N - 2]; + } + + /* update RHS */ + z[0] = b[0]; + for (i = 1; i < N; i++) + { + z[i] = b[b_stride * i] - gamma[i - 1] * z[i - 1]; + } + for (i = 0; i < N; i++) + { + c[i] = z[i] / alpha[i]; + } + + /* backsubstitution */ + x[x_stride * (N - 1)] = c[N - 1]; + if (N >= 2) + { + for (i = N - 2, j = 0; j <= N - 2; j++, i--) + { + x[x_stride * i] = c[i] - gamma[i] * x[x_stride * (i + 1)]; + } + } + } + + if (z != 0) + free (z); + if (c != 0) + free (c); + if (alpha != 0) + free (alpha); + if (gamma != 0) + free (gamma); + + if (status == GSL_EZERODIV) { + GSL_ERROR ("matrix must be positive definite", status); + } + + return status; +} + +/* plain gauss elimination, only not bothering with the zeroes + * + * diag[0] abovediag[0] 0 ..... + * belowdiag[0] diag[1] abovediag[1] ..... + * 0 belowdiag[1] diag[2] + * 0 0 belowdiag[2] ..... + */ +static +int +solve_tridiag_nonsym( + const double diag[], size_t d_stride, + const double abovediag[], size_t a_stride, + const double belowdiag[], size_t b_stride, + const double rhs[], size_t r_stride, + double x[], size_t x_stride, + size_t N) +{ + int status = GSL_SUCCESS; + double *alpha = (double *) malloc (N * sizeof (double)); + double *z = (double *) malloc (N * sizeof (double)); + + if (alpha == 0 || z == 0) + { + GSL_ERROR("failed to allocate working space", GSL_ENOMEM); + } + else + { + size_t i, j; + + /* Bidiagonalization (eliminating belowdiag) + & rhs update + diag' = alpha + rhs' = z + */ + alpha[0] = diag[0]; + z[0] = rhs[0]; + + if (alpha[0] == 0) { + status = GSL_EZERODIV; + } + + for (i = 1; i < N; i++) + { + const double t = belowdiag[b_stride*(i - 1)]/alpha[i-1]; + alpha[i] = diag[d_stride*i] - t*abovediag[a_stride*(i - 1)]; + z[i] = rhs[r_stride*i] - t*z[i-1]; + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + + /* backsubstitution */ + x[x_stride * (N - 1)] = z[N - 1]/alpha[N - 1]; + if (N >= 2) + { + for (i = N - 2, j = 0; j <= N - 2; j++, i--) + { + x[x_stride * i] = (z[i] - abovediag[a_stride*i] * x[x_stride * (i + 1)])/alpha[i]; + } + } + } + + if (z != 0) + free (z); + if (alpha != 0) + free (alpha); + + if (status == GSL_EZERODIV) { + GSL_ERROR ("matrix must be positive definite", status); + } + + return status; +} + +/* for description of method see [Engeln-Mullges + Uhlig, p. 96] + * + * diag[0] offdiag[0] 0 ..... offdiag[N-1] + * offdiag[0] diag[1] offdiag[1] ..... + * 0 offdiag[1] diag[2] + * 0 0 offdiag[2] ..... + * ... ... + * offdiag[N-1] ... + * + */ +static +int +solve_cyc_tridiag( + const double diag[], size_t d_stride, + const double offdiag[], size_t o_stride, + const double b[], size_t b_stride, + double x[], size_t x_stride, + size_t N) +{ + int status = GSL_SUCCESS; + double * delta = (double *) malloc (N * sizeof (double)); + double * gamma = (double *) malloc (N * sizeof (double)); + double * alpha = (double *) malloc (N * sizeof (double)); + double * c = (double *) malloc (N * sizeof (double)); + double * z = (double *) malloc (N * sizeof (double)); + + if (delta == 0 || gamma == 0 || alpha == 0 || c == 0 || z == 0) + { + GSL_ERROR("failed to allocate working space", GSL_ENOMEM); + } + else + { + size_t i, j; + double sum = 0.0; + + /* factor */ + + if (N == 1) + { + x[0] = b[0] / diag[0]; + return GSL_SUCCESS; + } + + alpha[0] = diag[0]; + gamma[0] = offdiag[0] / alpha[0]; + delta[0] = offdiag[o_stride * (N-1)] / alpha[0]; + + if (alpha[0] == 0) { + status = GSL_EZERODIV; + } + + for (i = 1; i < N - 2; i++) + { + alpha[i] = diag[d_stride * i] - offdiag[o_stride * (i-1)] * gamma[i - 1]; + gamma[i] = offdiag[o_stride * i] / alpha[i]; + delta[i] = -delta[i - 1] * offdiag[o_stride * (i-1)] / alpha[i]; + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + + for (i = 0; i < N - 2; i++) + { + sum += alpha[i] * delta[i] * delta[i]; + } + + alpha[N - 2] = diag[d_stride * (N - 2)] - offdiag[o_stride * (N - 3)] * gamma[N - 3]; + + gamma[N - 2] = (offdiag[o_stride * (N - 2)] - offdiag[o_stride * (N - 3)] * delta[N - 3]) / alpha[N - 2]; + + alpha[N - 1] = diag[d_stride * (N - 1)] - sum - alpha[(N - 2)] * gamma[N - 2] * gamma[N - 2]; + + /* update */ + z[0] = b[0]; + for (i = 1; i < N - 1; i++) + { + z[i] = b[b_stride * i] - z[i - 1] * gamma[i - 1]; + } + sum = 0.0; + for (i = 0; i < N - 2; i++) + { + sum += delta[i] * z[i]; + } + z[N - 1] = b[b_stride * (N - 1)] - sum - gamma[N - 2] * z[N - 2]; + for (i = 0; i < N; i++) + { + c[i] = z[i] / alpha[i]; + } + + /* backsubstitution */ + x[x_stride * (N - 1)] = c[N - 1]; + x[x_stride * (N - 2)] = c[N - 2] - gamma[N - 2] * x[x_stride * (N - 1)]; + if (N >= 3) + { + for (i = N - 3, j = 0; j <= N - 3; j++, i--) + { + x[x_stride * i] = c[i] - gamma[i] * x[x_stride * (i + 1)] - delta[i] * x[x_stride * (N - 1)]; + } + } + } + + if (z != 0) + free (z); + if (c != 0) + free (c); + if (alpha != 0) + free (alpha); + if (gamma != 0) + free (gamma); + if (delta != 0) + free (delta); + + if (status == GSL_EZERODIV) { + GSL_ERROR ("matrix must be positive definite", status); + } + + return status; +} + +/* solve following system w/o the corner elements and then use + * Sherman-Morrison formula to compensate for them + * + * diag[0] abovediag[0] 0 ..... belowdiag[N-1] + * belowdiag[0] diag[1] abovediag[1] ..... + * 0 belowdiag[1] diag[2] + * 0 0 belowdiag[2] ..... + * ... ... + * abovediag[N-1] ... + */ +static +int solve_cyc_tridiag_nonsym( + const double diag[], size_t d_stride, + const double abovediag[], size_t a_stride, + const double belowdiag[], size_t b_stride, + const double rhs[], size_t r_stride, + double x[], size_t x_stride, + size_t N) +{ + int status = GSL_SUCCESS; + double *alpha = (double *) malloc (N * sizeof (double)); + double *zb = (double *) malloc (N * sizeof (double)); + double *zu = (double *) malloc (N * sizeof (double)); + double *w = (double *) malloc (N * sizeof (double)); + + if (alpha == 0 || zb == 0 || zu == 0 || w == 0) + { + GSL_ERROR("failed to allocate working space", GSL_ENOMEM); + } + else + { + double beta; + + /* Bidiagonalization (eliminating belowdiag) + & rhs update + diag' = alpha + rhs' = zb + rhs' for Aq=u is zu + */ + zb[0] = rhs[0]; + if (diag[0] != 0) beta = -diag[0]; else beta = 1; + { + const double q = 1 - abovediag[0]*belowdiag[0]/(diag[0]*diag[d_stride]); + if (fabs(q/beta) > 0.5 && fabs(q/beta) < 2) { + beta *= (fabs(q/beta) < 1) ? 0.5 : 2; + } + } + zu[0] = beta; + alpha[0] = diag[0] - beta; + + if (alpha[0] == 0) { + status = GSL_EZERODIV; + } + + { + size_t i; + for (i = 1; i+1 < N; i++) + { + const double t = belowdiag[b_stride*(i - 1)]/alpha[i-1]; + alpha[i] = diag[d_stride*i] - t*abovediag[a_stride*(i - 1)]; + zb[i] = rhs[r_stride*i] - t*zb[i-1]; + zu[i] = -t*zu[i-1]; + /* FIXME!!! */ + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + } + + { + const size_t i = N-1; + const double t = belowdiag[b_stride*(i - 1)]/alpha[i-1]; + alpha[i] = diag[d_stride*i] + - abovediag[a_stride*i]*belowdiag[b_stride*i]/beta + - t*abovediag[a_stride*(i - 1)]; + zb[i] = rhs[r_stride*i] - t*zb[i-1]; + zu[i] = abovediag[a_stride*i] - t*zu[i-1]; + /* FIXME!!! */ + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + + /* backsubstitution */ + { + size_t i, j; + w[N-1] = zu[N-1]/alpha[N-1]; + x[x_stride*(N-1)] = zb[N-1]/alpha[N-1]; + for (i = N - 2, j = 0; j <= N - 2; j++, i--) + { + w[i] = (zu[i] - abovediag[a_stride*i] * w[i+1])/alpha[i]; + x[i*x_stride] = (zb[i] - abovediag[a_stride*i] * x[x_stride*(i + 1)])/alpha[i]; + } + } + + /* Sherman-Morrison */ + { + const double vw = w[0] + belowdiag[b_stride*(N - 1)]/beta * w[N-1]; + const double vx = x[0] + belowdiag[b_stride*(N - 1)]/beta * x[x_stride*(N - 1)]; + /* FIXME!!! */ + if (vw + 1 == 0) { + status = GSL_EZERODIV; + } + + { + size_t i; + for (i = 0; i < N; i++) + x[i*x_stride] -= vx/(1 + vw)*w[i]; + } + } + } + + if (zb != 0) + free (zb); + if (zu != 0) + free (zu); + if (w != 0) + free (w); + if (alpha != 0) + free (alpha); + + if (status == GSL_EZERODIV) { + GSL_ERROR ("matrix must be positive definite", status); + } + + return status; +} + +int +gsl_linalg_solve_symm_tridiag( + const gsl_vector * diag, + const gsl_vector * offdiag, + const gsl_vector * rhs, + gsl_vector * solution) +{ + if(diag->size != rhs->size) + { + GSL_ERROR ("size of diag must match rhs", GSL_EBADLEN); + } + else if (offdiag->size != rhs->size-1) + { + GSL_ERROR ("size of offdiag must match rhs-1", GSL_EBADLEN); + } + else if (solution->size != rhs->size) + { + GSL_ERROR ("size of solution must match rhs", GSL_EBADLEN); + } + else + { + return solve_tridiag(diag->data, diag->stride, + offdiag->data, offdiag->stride, + rhs->data, rhs->stride, + solution->data, solution->stride, + diag->size); + + } +} + +int +gsl_linalg_solve_tridiag( + const gsl_vector * diag, + const gsl_vector * abovediag, + const gsl_vector * belowdiag, + const gsl_vector * rhs, + gsl_vector * solution) +{ + if(diag->size != rhs->size) + { + GSL_ERROR ("size of diag must match rhs", GSL_EBADLEN); + } + else if (abovediag->size != rhs->size-1) + { + GSL_ERROR ("size of abovediag must match rhs-1", GSL_EBADLEN); + } + else if (belowdiag->size != rhs->size-1) + { + GSL_ERROR ("size of belowdiag must match rhs-1", GSL_EBADLEN); + } + else if (solution->size != rhs->size) + { + GSL_ERROR ("size of solution must match rhs", GSL_EBADLEN); + } + else + { + return solve_tridiag_nonsym(diag->data, diag->stride, + abovediag->data, abovediag->stride, + belowdiag->data, belowdiag->stride, + rhs->data, rhs->stride, + solution->data, solution->stride, + diag->size); + } +} + + +int +gsl_linalg_solve_symm_cyc_tridiag( + const gsl_vector * diag, + const gsl_vector * offdiag, + const gsl_vector * rhs, + gsl_vector * solution) +{ + if(diag->size != rhs->size) + { + GSL_ERROR ("size of diag must match rhs", GSL_EBADLEN); + } + else if (offdiag->size != rhs->size) + { + GSL_ERROR ("size of offdiag must match rhs", GSL_EBADLEN); + } + else if (solution->size != rhs->size) + { + GSL_ERROR ("size of solution must match rhs", GSL_EBADLEN); + } + else if (diag->size < 3) + { + GSL_ERROR ("size of cyclic system must be 3 or more", GSL_EBADLEN); + } + else + { + return solve_cyc_tridiag(diag->data, diag->stride, + offdiag->data, offdiag->stride, + rhs->data, rhs->stride, + solution->data, solution->stride, + diag->size); + } +} + +int +gsl_linalg_solve_cyc_tridiag( + const gsl_vector * diag, + const gsl_vector * abovediag, + const gsl_vector * belowdiag, + const gsl_vector * rhs, + gsl_vector * solution) +{ + if(diag->size != rhs->size) + { + GSL_ERROR ("size of diag must match rhs", GSL_EBADLEN); + } + else if (abovediag->size != rhs->size) + { + GSL_ERROR ("size of abovediag must match rhs", GSL_EBADLEN); + } + else if (belowdiag->size != rhs->size) + { + GSL_ERROR ("size of belowdiag must match rhs", GSL_EBADLEN); + } + else if (solution->size != rhs->size) + { + GSL_ERROR ("size of solution must match rhs", GSL_EBADLEN); + } + else if (diag->size < 3) + { + GSL_ERROR ("size of cyclic system must be 3 or more", GSL_EBADLEN); + } + else + { + return solve_cyc_tridiag_nonsym(diag->data, diag->stride, + abovediag->data, abovediag->stride, + belowdiag->data, belowdiag->stride, + rhs->data, rhs->stride, + solution->data, solution->stride, + diag->size); + } +} diff --git a/software/gsl-1.15/linalg/tridiag.h b/software/gsl-1.15/linalg/tridiag.h new file mode 100644 index 000000000..306011c66 --- /dev/null +++ b/software/gsl-1.15/linalg/tridiag.h @@ -0,0 +1,67 @@ +/* linalg/tridiag.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Gerard Jungman, + * Brian Gough, David Necas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +/* Low level tridiagonal solvers. + * Used internally in other areas of GSL. + */ +#ifndef __GSL_TRIDIAG_H__ +#define __GSL_TRIDIAG_H__ + +#include + +static +int solve_tridiag_nonsym( + const double diag[], size_t d_stride, + const double abovediag[], size_t a_stride, + const double belowdiag[], size_t b_stride, + const double rhs[], size_t r_stride, + double x[], size_t x_stride, + size_t N + ); + +static +int solve_tridiag( + const double diag[], size_t d_stride, + const double offdiag[], size_t o_stride, + const double b[], size_t b_stride, + double x[], size_t x_stride, + size_t N); + +static +int solve_cyc_tridiag( + const double diag[], size_t d_stride, + const double offdiag[], size_t o_stride, + const double b[], size_t b_stride, + double x[], size_t x_stride, + size_t N + ); + +static +int solve_cyc_tridiag_nonsym( + const double diag[], size_t d_stride, + const double abovediag[], size_t a_stride, + const double belowdiag[], size_t b_stride, + const double rhs[], size_t r_stride, + double x[], size_t x_stride, + size_t N); + +#endif /* __GSL_TRIDIAG_H__ */ diff --git a/software/gsl-1.15/ltmain.sh b/software/gsl-1.15/ltmain.sh new file mode 100755 index 000000000..3061e3c5a --- /dev/null +++ b/software/gsl-1.15/ltmain.sh @@ -0,0 +1,9636 @@ + +# libtool (GNU libtool) 2.4 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4 +TIMESTAMP="" +package_revision=1.3293 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${EGREP="grep -E"} +: ${FGREP="grep -F"} +: ${GREP="grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_apped perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/software/gsl-1.15/matrix/.deps/copy.Plo b/software/gsl-1.15/matrix/.deps/copy.Plo new file mode 100644 index 000000000..1cc9c261c --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/copy.Plo @@ -0,0 +1,214 @@ +copy.lo: copy.c ../config.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + copy_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +copy_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/file.Plo b/software/gsl-1.15/matrix/.deps/file.Plo new file mode 100644 index 000000000..949a8f464 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/file.Plo @@ -0,0 +1,216 @@ +file.lo: file.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + ../templates_on.h file_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +../templates_on.h: + +file_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/getset.Plo b/software/gsl-1.15/matrix/.deps/getset.Plo new file mode 100644 index 000000000..1eddfea42 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/getset.Plo @@ -0,0 +1,216 @@ +getset.lo: getset.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + ../templates_on.h getset_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +../templates_on.h: + +getset_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/init.Plo b/software/gsl-1.15/matrix/.deps/init.Plo new file mode 100644 index 000000000..61c647955 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/init.Plo @@ -0,0 +1,214 @@ +init.lo: init.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + init_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +init_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/matrix.Plo b/software/gsl-1.15/matrix/.deps/matrix.Plo new file mode 100644 index 000000000..b40ec24ed --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/matrix.Plo @@ -0,0 +1,212 @@ +matrix.lo: matrix.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../build.h \ + ../gsl/gsl_matrix.h ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../build.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/matrix/.deps/minmax.Plo b/software/gsl-1.15/matrix/.deps/minmax.Plo new file mode 100644 index 000000000..8f9e267b9 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/minmax.Plo @@ -0,0 +1,251 @@ +minmax.lo: minmax.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + minmax_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +minmax_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/oper.Plo b/software/gsl-1.15/matrix/.deps/oper.Plo new file mode 100644 index 000000000..1d5195e58 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/oper.Plo @@ -0,0 +1,253 @@ +oper.lo: oper.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + oper_complex_source.c ../templates_off.h oper_source.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +oper_complex_source.c: + +../templates_off.h: + +oper_source.c: diff --git a/software/gsl-1.15/matrix/.deps/prop.Plo b/software/gsl-1.15/matrix/.deps/prop.Plo new file mode 100644 index 000000000..8798ccd9b --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/prop.Plo @@ -0,0 +1,214 @@ +prop.lo: prop.c ../config.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + prop_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +prop_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/rowcol.Plo b/software/gsl-1.15/matrix/.deps/rowcol.Plo new file mode 100644 index 000000000..e1f4301cd --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/rowcol.Plo @@ -0,0 +1,254 @@ +rowcol.lo: rowcol.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + view.h ../templates_on.h rowcol_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +view.h: + +../templates_on.h: + +rowcol_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/submatrix.Plo b/software/gsl-1.15/matrix/.deps/submatrix.Plo new file mode 100644 index 000000000..97c177eff --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/submatrix.Plo @@ -0,0 +1,255 @@ +submatrix.lo: submatrix.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + view.h ../templates_on.h submatrix_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +view.h: + +../templates_on.h: + +submatrix_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/swap.Plo b/software/gsl-1.15/matrix/.deps/swap.Plo new file mode 100644 index 000000000..0a9676ba4 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/swap.Plo @@ -0,0 +1,216 @@ +swap.lo: swap.c ../config.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + ../templates_on.h swap_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +../templates_on.h: + +swap_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/.deps/test.Po b/software/gsl-1.15/matrix/.deps/test.Po new file mode 100644 index 000000000..63188556e --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/test.Po @@ -0,0 +1,257 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../templates_on.h test_complex_source.c \ + ../templates_off.h test_source.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../templates_on.h: + +test_complex_source.c: + +../templates_off.h: + +test_source.c: diff --git a/software/gsl-1.15/matrix/.deps/test_static.Po b/software/gsl-1.15/matrix/.deps/test_static.Po new file mode 100644 index 000000000..c67815250 --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/test_static.Po @@ -0,0 +1,259 @@ +test_static.o: test_static.c test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../templates_on.h test_complex_source.c \ + ../templates_off.h test_source.c + +test.c: + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../templates_on.h: + +test_complex_source.c: + +../templates_off.h: + +test_source.c: diff --git a/software/gsl-1.15/matrix/.deps/view.Plo b/software/gsl-1.15/matrix/.deps/view.Plo new file mode 100644 index 000000000..b3f01584c --- /dev/null +++ b/software/gsl-1.15/matrix/.deps/view.Plo @@ -0,0 +1,216 @@ +view.lo: view.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h view.h \ + ../templates_on.h view_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +view.h: + +../templates_on.h: + +view_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/matrix/ChangeLog b/software/gsl-1.15/matrix/ChangeLog new file mode 100644 index 000000000..40532d457 --- /dev/null +++ b/software/gsl-1.15/matrix/ChangeLog @@ -0,0 +1,225 @@ +2010-04-07 Brian Gough + + * prop_source.c (FUNCTION): added a function to test if two + matrices are equal + +2009-07-09 Brian Gough + + * init_source.c (FUNCTION): handle NULL argument in free + +2008-07-03 Brian Gough + + * matrix.c: compile all the inline matrix functions from header + + * gsl_matrix.h and all related files: use new inline declarations + + * Makefile.am (INCLUDES): use top_srcdir, remove top_builddir + (noinst_HEADERS): remove matrix_source.c + +2007-08-21 Brian Gough + + * prop_source.c (FUNCTION): added gsl_matrix_isnonneg + +2007-02-17 Brian Gough + + * test_source.c (FUNCTION): avoid running negative value tests on + char, because it can be unsigned. + +2007-01-26 Brian Gough + + * minmax_source.c: added support for NaNs + +2006-10-31 Brian Gough + + * prop_source.c (FUNCTION): added functions gsl_matrix_ispos, + gsl_matrix_isneg + +2003-01-01 Brian Gough + + * gsl_matrix_complex_float.h (gsl_matrix_complex_float_get): + removed const from zero + + * matrix_source.c (FUNCTION): removed const from zero + +2002-11-24 Brian Gough + + * Makefile.am: added libgslsys.a to link, to provide gsl_hypot for + complex division + +Mon Jun 17 22:31:33 2002 Brian Gough + + * test_complex_source.c (FUNCTION): fixed non-constant initializer + +Wed May 1 21:33:44 2002 Brian Gough + + * gsl_matrix_complex_float.h (gsl_matrix_complex_float_get): moved + constant zero inside GSL_RANGE_CHECK_OFF + +Sun Mar 24 20:28:48 2002 Brian Gough + + * oper_complex_source.c: complex matrix operations (from Toby + White) + +Mon Feb 18 20:33:58 2002 Brian Gough + + * copy_source.c (gsl_matrix_swap): fixed prototype by removing + const from second arg. + +Sun Jan 27 22:29:37 2002 Brian Gough + + * test.c: ensure that range check is working when running the + tests + +Fri Sep 14 18:56:34 2001 Brian Gough + + * view_source.c: fixed cast for array type + + * view.c: added #includes for missing const qualified types + + * view_source.c: error for non-unit strides + +Fri Aug 3 14:11:23 2001 Brian Gough + + * added gsl_matrix_ptr and gsl_matrix_const_ptr functions + +Mon Jul 16 21:28:05 2001 Brian Gough + + * rowcol_source.c (FUNCTION): initialized view to NULL + +Fri Jul 13 21:29:27 2001 Brian Gough + + * changed views to be structs and used casts to initialize them + +Mon Jul 2 12:35:16 2001 Brian Gough + + * view.h: provide macros for initializing null + vectors and views + +Sun Jul 1 22:44:51 2001 Brian Gough + + * introduction of new-style vector/matrix views + +Fri Jun 1 17:04:52 2001 Brian Gough + + * getset_source.c: made these routines work with the current + matrix struct, previously they would give incorrect results + +Mon May 14 22:43:39 2001 Brian Gough + + * matrix_source.c (FUNCTION): removed unnecessary inline from + static function definition + +Tue May 1 23:09:25 2001 Brian Gough + + * gsl_matrix_float.h (struct ): MS VC++ requires that the + struct/typedef be made with a single definition + +Mon Mar 26 20:33:45 2001 Brian Gough + + * view_source.c: split view functions out into a separate file + +Sat Sep 9 16:47:16 2000 Brian Gough + + * added an owner field for indicating whether the underlying + memory is owned by the vector. Changed the meaning of the block + field to always be the address of the underlying block, even for + subviews (previously the block field was set to NULL in this + case). + +Thu Aug 17 19:46:22 2000 Brian Gough + + * swap_source.c (FUNCTION): added function + gsl_matrix_transpose_memcpy for transposing rectangular matrices + +Sun Jul 16 10:40:15 2000 Brian Gough + + * init_source.c (FUNCTION): added gsl_matrix_view function for + creating a matrix view of an ordinary C array + +Sat Jul 15 21:44:22 2000 Brian Gough + + * changed GSL_EDOM to GSL_EINVAL for invalid matrix size arguments + +Sat Jun 17 15:38:30 2000 Brian Gough + + * fixed up missing MULTIPLICITY factors in various functions + +Sun May 28 12:25:02 2000 Brian Gough + + * test_complex_source.c (FUNCTION): use binary mode "b" when + reading and writing binary files + + * test_source.c (FUNCTION): use binary mode "b" when reading and + writing binary files + +Thu May 4 20:58:59 2000 Brian Gough + + * oper.c: added simple arithmetic operations (+,-,*,/,scale,+const) + +Wed Apr 26 15:04:22 2000 Brian Gough + + * prop_source.c (FUNCTION): added function gsl_matrix_isnull + +Tue Apr 18 12:51:49 2000 Brian Gough + + * minmax_source.c (FUNCTION): fixed bug in minmax where + coordinates would be incorrect for min or max in the first element + + * test_source.c (FUNCTION): added tests for max/min functions + +Thu Apr 13 18:39:27 2000 Brian Gough + + * minmax.c: added matrix max/min functions + +Sat Mar 25 20:29:41 2000 Brian Gough + + * swap_source.c (FUNCTION): renamed swap_cols to swap_columns, and + renamed swap_rowcol to swap_row_column + +Tue Mar 21 21:15:22 2000 Brian Gough + + * matrix_source.c (FUNCTION): added set_all and set_zero functions + +Sat Mar 11 11:19:05 2000 Brian Gough + + * init_source.c (FUNCTION): added gsl_matrix_identity to set a + matrix to the identity, and gsl_matrix_zero for zeroing a matrix + + * gsl_matrix.h: renamed struct element dim2 to tda (trailing + dimension) following blas conventions for row-major matrices + +Thu Dec 2 21:17:16 1999 Brian Gough + + * rowcol_source.c (FUNCTION): added gsl_matrix_view_from_vector + (Thanks to Fabrice Rossi) + +Sun Oct 31 20:01:39 1999 Brian Gough + + * copy.c copy_source.c: added gsl_matrix_copy function + +Tue Oct 19 14:13:35 1999 Brian Gough + + * added gsl_matrix_swap_row/col to exchange rows and columns + +Fri Oct 1 15:48:07 1999 Brian Gough + + * the matrix struct now supports a separate 'trailing dimension' + to allow handling of submatrices + + * now uses separate block directory for memory management + +Mon Mar 1 20:05:52 1999 Brian Gough + + * rowcol_source.c: fix rowcol to use strides + +1998-11-09 + + * test_source.c, test_complex_source.c: use macros to determine if + we should run tests with long double printf/scanf, since these + aren't supported on all platforms + +Mon Apr 6 15:06:38 1998 Brian Gough + + * make range checking the default, you have to define + GSL_RANGE_CHECK_OFF to turn it off + diff --git a/software/gsl-1.15/matrix/Makefile.am b/software/gsl-1.15/matrix/Makefile.am new file mode 100644 index 000000000..559ae7bd2 --- /dev/null +++ b/software/gsl-1.15/matrix/Makefile.am @@ -0,0 +1,24 @@ +noinst_LTLIBRARIES = libgslmatrix.la + +check_PROGRAMS = test test_static + +pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + +test_static_SOURCES = test_static.c + +CLEANFILES = test.txt test.dat + +noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c + +libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h + + diff --git a/software/gsl-1.15/matrix/Makefile.in b/software/gsl-1.15/matrix/Makefile.in new file mode 100644 index 000000000..31cf9e600 --- /dev/null +++ b/software/gsl-1.15/matrix/Makefile.in @@ -0,0 +1,692 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) test_static$(EXEEXT) +subdir = matrix +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmatrix_la_LIBADD = +am_libgslmatrix_la_OBJECTS = init.lo matrix.lo file.lo rowcol.lo \ + swap.lo copy.lo minmax.lo prop.lo oper.lo getset.lo view.lo \ + submatrix.lo +libgslmatrix_la_OBJECTS = $(am_libgslmatrix_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +am_test_static_OBJECTS = test_static.$(OBJEXT) +test_static_OBJECTS = $(am_test_static_OBJECTS) +test_static_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmatrix_la_SOURCES) $(test_SOURCES) \ + $(test_static_SOURCES) +DIST_SOURCES = $(libgslmatrix_la_SOURCES) $(test_SOURCES) \ + $(test_static_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmatrix.la +pkginclude_HEADERS = gsl_matrix.h gsl_matrix_char.h gsl_matrix_complex_double.h gsl_matrix_complex_float.h gsl_matrix_complex_long_double.h gsl_matrix_double.h gsl_matrix_float.h gsl_matrix_int.h gsl_matrix_long.h gsl_matrix_long_double.h gsl_matrix_short.h gsl_matrix_uchar.h gsl_matrix_uint.h gsl_matrix_ulong.h gsl_matrix_ushort.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +test_static_SOURCES = test_static.c +CLEANFILES = test.txt test.dat +noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c +libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu matrix/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu matrix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmatrix.la: $(libgslmatrix_la_OBJECTS) $(libgslmatrix_la_DEPENDENCIES) + $(LINK) $(libgslmatrix_la_OBJECTS) $(libgslmatrix_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) +test_static$(EXEEXT): $(test_static_OBJECTS) $(test_static_DEPENDENCIES) + @rm -f test_static$(EXEEXT) + $(LINK) $(test_static_OBJECTS) $(test_static_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rowcol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submatrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_static.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/matrix/TODO b/software/gsl-1.15/matrix/TODO new file mode 100644 index 000000000..3f88cad08 --- /dev/null +++ b/software/gsl-1.15/matrix/TODO @@ -0,0 +1,14 @@ +# -*- org -*- +#+CATEGORY: matrix + +* Tests for subrowcol + +* Pretty print function + +* Clean up the tests. + +* Run tests where matrix tda != size2, note that tda is a physical +dimension and size2 is the number of columns in the matrix. This will +probably find a lot of bugs in the matrix logic. + +* Matrix norms that can be calculated analytically, e.g. Frobenius, etc diff --git a/software/gsl-1.15/matrix/copy.c b/software/gsl-1.15/matrix/copy.c new file mode 100644 index 000000000..ffe3a1227 --- /dev/null +++ b/software/gsl-1.15/matrix/copy.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/copy_source.c b/software/gsl-1.15/matrix/copy_source.c new file mode 100644 index 000000000..4a30a67b6 --- /dev/null +++ b/software/gsl-1.15/matrix/copy_source.c @@ -0,0 +1,88 @@ +/* matrix/copy_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_matrix, memcpy) (TYPE (gsl_matrix) * dest, + const TYPE (gsl_matrix) * src) +{ + const size_t src_size1 = src->size1; + const size_t src_size2 = src->size2; + const size_t dest_size1 = dest->size1; + const size_t dest_size2 = dest->size2; + + if (src_size1 != dest_size1 || src_size2 != dest_size2) + { + GSL_ERROR ("matrix sizes are different", GSL_EBADLEN); + } + + { + const size_t src_tda = src->tda ; + const size_t dest_tda = dest->tda ; + size_t i, j; + + for (i = 0; i < src_size1 ; i++) + { + for (j = 0; j < MULTIPLICITY * src_size2; j++) + { + dest->data[MULTIPLICITY * dest_tda * i + j] + = src->data[MULTIPLICITY * src_tda * i + j]; + } + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_matrix, swap) (TYPE (gsl_matrix) * dest, TYPE (gsl_matrix) * src) +{ + const size_t src_size1 = src->size1; + const size_t src_size2 = src->size2; + const size_t dest_size1 = dest->size1; + const size_t dest_size2 = dest->size2; + + if (src_size1 != dest_size1 || src_size2 != dest_size2) + { + GSL_ERROR ("matrix sizes are different", GSL_EBADLEN); + } + + { + const size_t src_tda = src->tda ; + const size_t dest_tda = dest->tda ; + size_t i, j; + + for (i = 0; i < src_size1 ; i++) + { + for (j = 0; j < MULTIPLICITY * src_size2; j++) + { + ATOMIC tmp = src->data[MULTIPLICITY * src_tda * i + j]; + src->data[MULTIPLICITY * src_tda * i + j] + = dest->data[MULTIPLICITY * dest_tda * i + j]; + dest->data[MULTIPLICITY * dest_tda * i + j] = tmp ; + } + } + } + + return GSL_SUCCESS; +} + + + + diff --git a/software/gsl-1.15/matrix/file.c b/software/gsl-1.15/matrix/file.c new file mode 100644 index 000000000..b7528164a --- /dev/null +++ b/software/gsl-1.15/matrix/file.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/file_source.c b/software/gsl-1.15/matrix/file_source.c new file mode 100644 index 000000000..bf8bace18 --- /dev/null +++ b/software/gsl-1.15/matrix/file_source.c @@ -0,0 +1,157 @@ +/* matrix/file_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_matrix, fread) (FILE * stream, TYPE (gsl_matrix) * m) +{ + int status = 0; + + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + const size_t tda = m->tda; + + if (tda == size2) /* the rows are contiguous */ + { + status = FUNCTION (gsl_block, raw_fread) (stream, + m->data, + size1 * size2, 1); + } + else + { + size_t i; + + for (i = 0 ; i < size1 ; i++) /* read each row separately */ + { + status = FUNCTION (gsl_block, raw_fread) (stream, + m->data + i * tda, + size2, 1); + if (status) + break; + } + } + + return status; +} + +int +FUNCTION (gsl_matrix, fwrite) (FILE * stream, const TYPE (gsl_matrix) * m) +{ + int status = 0; + + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + const size_t tda = m->tda; + + if (tda == size2) /* the rows are contiguous */ + { + status = FUNCTION (gsl_block, raw_fwrite) (stream, + m->data, + size1 * size2, 1); + } + else + { + size_t i; + + for (i = 0 ; i < size1 ; i++) /* write each row separately */ + { + status = FUNCTION (gsl_block, raw_fwrite) (stream, + m->data + i * tda, + size2, 1); + if (status) + break; + } + } + + return status; + +} + +#if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE) +int +FUNCTION (gsl_matrix, fprintf) (FILE * stream, const TYPE (gsl_matrix) * m, + const char *format) +{ + int status = 0; + + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + const size_t tda = m->tda; + + if (tda == size2) /* the rows are contiguous */ + { + status = FUNCTION (gsl_block, raw_fprintf) (stream, + m->data, + size1 * size2, 1, + format); + } + else + { + size_t i; + + for (i = 0 ; i < size1 ; i++) /* print each row separately */ + { + status = FUNCTION (gsl_block, raw_fprintf) (stream, + m->data + i * tda, + size2, 1, + format); + if (status) + break; + } + } + + return status; +} + +int +FUNCTION (gsl_matrix, fscanf) (FILE * stream, TYPE (gsl_matrix) * m) +{ + int status = 0; + + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + const size_t tda = m->tda; + + if (tda == size2) /* the rows are contiguous */ + { + status = FUNCTION (gsl_block, raw_fscanf) (stream, + m->data, + size1 * size2, 1); + } + else + { + size_t i; + + for (i = 0 ; i < size1 ; i++) /* scan each row separately */ + { + status = FUNCTION (gsl_block, raw_fscanf) (stream, + m->data + i * tda, + size2, 1); + if (status) + break; + } + } + + return status; +} +#endif + diff --git a/software/gsl-1.15/matrix/getset.c b/software/gsl-1.15/matrix/getset.c new file mode 100644 index 000000000..526144dce --- /dev/null +++ b/software/gsl-1.15/matrix/getset.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "getset_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/getset_source.c b/software/gsl-1.15/matrix/getset_source.c new file mode 100644 index 000000000..e55c05b35 --- /dev/null +++ b/software/gsl-1.15/matrix/getset_source.c @@ -0,0 +1,228 @@ +/**********************************************************************/ +/* The functions below are obsolete */ +/**********************************************************************/ + +int +FUNCTION (gsl_matrix, get_row) (TYPE (gsl_vector) * v, + const TYPE (gsl_matrix) * m, + const size_t i) +{ + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + if (i >= M) + { + GSL_ERROR ("row index is out of range", GSL_EINVAL); + } + + if (v->size != N) + { + GSL_ERROR ("matrix row size and vector length are not equal", + GSL_EBADLEN); + } + + { + ATOMIC *v_data = v->data; + const ATOMIC *row_data = m->data + MULTIPLICITY * i * tda; + const size_t stride = v->stride ; + size_t j; + + for (j = 0; j < N; j++) + { + unsigned int k; + + for (k = 0; k < MULTIPLICITY; k++) + { + v_data[MULTIPLICITY * stride * j + k] + = row_data[MULTIPLICITY * j + k]; + } + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_matrix, get_col) (TYPE (gsl_vector) * v, + const TYPE (gsl_matrix) * m, + const size_t j) +{ + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + if (j >= N) + { + GSL_ERROR ("column index is out of range", GSL_EINVAL); + } + + if (v->size != M) + { + GSL_ERROR ("matrix column size and vector length are not equal", + GSL_EBADLEN); + } + + + { + ATOMIC *v_data = v->data; + const ATOMIC *column_data = m->data + MULTIPLICITY * j; + const size_t stride = v->stride ; + size_t i; + + for (i = 0; i < M; i++) + { + unsigned int k; + + for (k = 0; k < MULTIPLICITY; k++) + { + v_data[stride * MULTIPLICITY * i + k] = + column_data[MULTIPLICITY * i * tda + k]; + } + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_matrix, set_row) (TYPE (gsl_matrix) * m, + const size_t i, + const TYPE (gsl_vector) * v) +{ + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + if (i >= M) + { + GSL_ERROR ("row index is out of range", GSL_EINVAL); + } + + if (v->size != N) + { + GSL_ERROR ("matrix row size and vector length are not equal", + GSL_EBADLEN); + } + + { + const ATOMIC *v_data = v->data; + ATOMIC *row_data = m->data + MULTIPLICITY * i * tda; + const size_t stride = v->stride ; + size_t j; + + for (j = 0; j < N; j++) + { + unsigned int k; + + for (k = 0; k < MULTIPLICITY; k++) + { + row_data[MULTIPLICITY*j + k] + = v_data[MULTIPLICITY * stride * j + k]; + } + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_matrix, set_col) (TYPE (gsl_matrix) * m, + const size_t j, + const TYPE (gsl_vector) * v) +{ + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + if (j >= N) + { + GSL_ERROR ("column index is out of range", GSL_EINVAL); + } + + if (v->size != M) + { + GSL_ERROR ("matrix column size and vector length are not equal", + GSL_EBADLEN); + } + + { + const ATOMIC *v_data = v->data; + ATOMIC *column_data = m->data + MULTIPLICITY * j; + const size_t stride = v->stride ; + size_t i; + + for (i = 0; i < M; i++) + { + unsigned int k; + + for (k = 0; k < MULTIPLICITY; k++) + { + column_data[MULTIPLICITY * i * tda + k] + = v_data[MULTIPLICITY * stride * i + k]; + } + } + } + + return GSL_SUCCESS; +} + + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, alloc_row_from_matrix) (TYPE(gsl_matrix) * m, + const size_t i) +{ + TYPE (gsl_vector) * v; + + const size_t M = m->size1; + + if (i >= M) + { + GSL_ERROR_VAL ("row index is out of range", GSL_EINVAL, 0); + } + + v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector))); + + if (v == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vector struct", + GSL_ENOMEM, 0); + } + + v->data = m->data + MULTIPLICITY * i * m->tda ; + v->size = m->size2; + v->stride = 1; + v->block = 0; + + return v; +} + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, alloc_col_from_matrix) (TYPE(gsl_matrix) * m, + const size_t j) +{ + TYPE (gsl_vector) * v; + + const size_t N = m->size2; + + if (j >= N) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, 0); + } + + v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector))); + + if (v == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vector struct", + GSL_ENOMEM, 0); + } + + v->data = m->data + MULTIPLICITY * j ; + v->size = m->size1; + v->stride = m->tda; + v->block = 0; + + return v; +} + diff --git a/software/gsl-1.15/matrix/gsl_matrix.h b/software/gsl-1.15/matrix/gsl_matrix.h new file mode 100644 index 000000000..9b7ed7655 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix.h @@ -0,0 +1,25 @@ +#ifndef __GSL_MATRIX_H__ +#define __GSL_MATRIX_H__ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + + +#endif /* __GSL_MATRIX_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_char.h b/software/gsl-1.15/matrix/gsl_matrix_char.h new file mode 100644 index 000000000..1e6234a19 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_char.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_CHAR_H__ +#define __GSL_MATRIX_CHAR_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + char * data; + gsl_block_char * block; + int owner; +} gsl_matrix_char; + +typedef struct +{ + gsl_matrix_char matrix; +} _gsl_matrix_char_view; + +typedef _gsl_matrix_char_view gsl_matrix_char_view; + +typedef struct +{ + gsl_matrix_char matrix; +} _gsl_matrix_char_const_view; + +typedef const _gsl_matrix_char_const_view gsl_matrix_char_const_view; + +/* Allocation */ + +gsl_matrix_char * +gsl_matrix_char_alloc (const size_t n1, const size_t n2); + +gsl_matrix_char * +gsl_matrix_char_calloc (const size_t n1, const size_t n2); + +gsl_matrix_char * +gsl_matrix_char_alloc_from_block (gsl_block_char * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_char * +gsl_matrix_char_alloc_from_matrix (gsl_matrix_char * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_char * +gsl_vector_char_alloc_row_from_matrix (gsl_matrix_char * m, + const size_t i); + +gsl_vector_char * +gsl_vector_char_alloc_col_from_matrix (gsl_matrix_char * m, + const size_t j); + +void gsl_matrix_char_free (gsl_matrix_char * m); + +/* Views */ + +_gsl_matrix_char_view +gsl_matrix_char_submatrix (gsl_matrix_char * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_char_view +gsl_matrix_char_row (gsl_matrix_char * m, const size_t i); + +_gsl_vector_char_view +gsl_matrix_char_column (gsl_matrix_char * m, const size_t j); + +_gsl_vector_char_view +gsl_matrix_char_diagonal (gsl_matrix_char * m); + +_gsl_vector_char_view +gsl_matrix_char_subdiagonal (gsl_matrix_char * m, const size_t k); + +_gsl_vector_char_view +gsl_matrix_char_superdiagonal (gsl_matrix_char * m, const size_t k); + +_gsl_vector_char_view +gsl_matrix_char_subrow (gsl_matrix_char * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_char_view +gsl_matrix_char_subcolumn (gsl_matrix_char * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_char_view +gsl_matrix_char_view_array (char * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_char_view +gsl_matrix_char_view_array_with_tda (char * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_char_view +gsl_matrix_char_view_vector (gsl_vector_char * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_char_view +gsl_matrix_char_view_vector_with_tda (gsl_vector_char * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_char_const_view +gsl_matrix_char_const_submatrix (const gsl_matrix_char * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_char_const_view +gsl_matrix_char_const_row (const gsl_matrix_char * m, + const size_t i); + +_gsl_vector_char_const_view +gsl_matrix_char_const_column (const gsl_matrix_char * m, + const size_t j); + +_gsl_vector_char_const_view +gsl_matrix_char_const_diagonal (const gsl_matrix_char * m); + +_gsl_vector_char_const_view +gsl_matrix_char_const_subdiagonal (const gsl_matrix_char * m, + const size_t k); + +_gsl_vector_char_const_view +gsl_matrix_char_const_superdiagonal (const gsl_matrix_char * m, + const size_t k); + +_gsl_vector_char_const_view +gsl_matrix_char_const_subrow (const gsl_matrix_char * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_char_const_view +gsl_matrix_char_const_subcolumn (const gsl_matrix_char * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_char_const_view +gsl_matrix_char_const_view_array (const char * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_char_const_view +gsl_matrix_char_const_view_array_with_tda (const char * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_char_const_view +gsl_matrix_char_const_view_vector (const gsl_vector_char * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_char_const_view +gsl_matrix_char_const_view_vector_with_tda (const gsl_vector_char * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_char_set_zero (gsl_matrix_char * m); +void gsl_matrix_char_set_identity (gsl_matrix_char * m); +void gsl_matrix_char_set_all (gsl_matrix_char * m, char x); + +int gsl_matrix_char_fread (FILE * stream, gsl_matrix_char * m) ; +int gsl_matrix_char_fwrite (FILE * stream, const gsl_matrix_char * m) ; +int gsl_matrix_char_fscanf (FILE * stream, gsl_matrix_char * m); +int gsl_matrix_char_fprintf (FILE * stream, const gsl_matrix_char * m, const char * format); + +int gsl_matrix_char_memcpy(gsl_matrix_char * dest, const gsl_matrix_char * src); +int gsl_matrix_char_swap(gsl_matrix_char * m1, gsl_matrix_char * m2); + +int gsl_matrix_char_swap_rows(gsl_matrix_char * m, const size_t i, const size_t j); +int gsl_matrix_char_swap_columns(gsl_matrix_char * m, const size_t i, const size_t j); +int gsl_matrix_char_swap_rowcol(gsl_matrix_char * m, const size_t i, const size_t j); +int gsl_matrix_char_transpose (gsl_matrix_char * m); +int gsl_matrix_char_transpose_memcpy (gsl_matrix_char * dest, const gsl_matrix_char * src); + +char gsl_matrix_char_max (const gsl_matrix_char * m); +char gsl_matrix_char_min (const gsl_matrix_char * m); +void gsl_matrix_char_minmax (const gsl_matrix_char * m, char * min_out, char * max_out); + +void gsl_matrix_char_max_index (const gsl_matrix_char * m, size_t * imax, size_t *jmax); +void gsl_matrix_char_min_index (const gsl_matrix_char * m, size_t * imin, size_t *jmin); +void gsl_matrix_char_minmax_index (const gsl_matrix_char * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_char_equal (const gsl_matrix_char * a, const gsl_matrix_char * b); + +int gsl_matrix_char_isnull (const gsl_matrix_char * m); +int gsl_matrix_char_ispos (const gsl_matrix_char * m); +int gsl_matrix_char_isneg (const gsl_matrix_char * m); +int gsl_matrix_char_isnonneg (const gsl_matrix_char * m); + +int gsl_matrix_char_add (gsl_matrix_char * a, const gsl_matrix_char * b); +int gsl_matrix_char_sub (gsl_matrix_char * a, const gsl_matrix_char * b); +int gsl_matrix_char_mul_elements (gsl_matrix_char * a, const gsl_matrix_char * b); +int gsl_matrix_char_div_elements (gsl_matrix_char * a, const gsl_matrix_char * b); +int gsl_matrix_char_scale (gsl_matrix_char * a, const double x); +int gsl_matrix_char_add_constant (gsl_matrix_char * a, const double x); +int gsl_matrix_char_add_diagonal (gsl_matrix_char * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_char_get_row(gsl_vector_char * v, const gsl_matrix_char * m, const size_t i); +int gsl_matrix_char_get_col(gsl_vector_char * v, const gsl_matrix_char * m, const size_t j); +int gsl_matrix_char_set_row(gsl_matrix_char * m, const size_t i, const gsl_vector_char * v); +int gsl_matrix_char_set_col(gsl_matrix_char * m, const size_t j, const gsl_vector_char * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL char gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x); +INLINE_DECL char * gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j); +INLINE_DECL const char * gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +char +gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_char_set(gsl_matrix_char * m, const size_t i, const size_t j, const char x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +char * +gsl_matrix_char_ptr(gsl_matrix_char * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (char *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const char * +gsl_matrix_char_const_ptr(const gsl_matrix_char * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const char *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_CHAR_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_complex_double.h b/software/gsl-1.15/matrix/gsl_matrix_complex_double.h new file mode 100644 index 000000000..1564f7cc2 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_complex_double.h @@ -0,0 +1,351 @@ +/* matrix/gsl_matrix_complex_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_COMPLEX_DOUBLE_H__ +#define __GSL_MATRIX_COMPLEX_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + double * data; + gsl_block_complex * block; + int owner; +} gsl_matrix_complex ; + +typedef struct +{ + gsl_matrix_complex matrix; +} _gsl_matrix_complex_view; + +typedef _gsl_matrix_complex_view gsl_matrix_complex_view; + +typedef struct +{ + gsl_matrix_complex matrix; +} _gsl_matrix_complex_const_view; + +typedef const _gsl_matrix_complex_const_view gsl_matrix_complex_const_view; + + +/* Allocation */ + +gsl_matrix_complex * +gsl_matrix_complex_alloc (const size_t n1, const size_t n2); + +gsl_matrix_complex * +gsl_matrix_complex_calloc (const size_t n1, const size_t n2); + +gsl_matrix_complex * +gsl_matrix_complex_alloc_from_block (gsl_block_complex * b, + const size_t offset, + const size_t n1, const size_t n2, const size_t d2); + +gsl_matrix_complex * +gsl_matrix_complex_alloc_from_matrix (gsl_matrix_complex * b, + const size_t k1, const size_t k2, + const size_t n1, const size_t n2); + +gsl_vector_complex * +gsl_vector_complex_alloc_row_from_matrix (gsl_matrix_complex * m, + const size_t i); + +gsl_vector_complex * +gsl_vector_complex_alloc_col_from_matrix (gsl_matrix_complex * m, + const size_t j); + +void gsl_matrix_complex_free (gsl_matrix_complex * m); + +/* Views */ + +_gsl_matrix_complex_view +gsl_matrix_complex_submatrix (gsl_matrix_complex * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_view +gsl_matrix_complex_row (gsl_matrix_complex * m, const size_t i); + +_gsl_vector_complex_view +gsl_matrix_complex_column (gsl_matrix_complex * m, const size_t j); + +_gsl_vector_complex_view +gsl_matrix_complex_diagonal (gsl_matrix_complex * m); + +_gsl_vector_complex_view +gsl_matrix_complex_subdiagonal (gsl_matrix_complex * m, const size_t k); + +_gsl_vector_complex_view +gsl_matrix_complex_superdiagonal (gsl_matrix_complex * m, const size_t k); + +_gsl_vector_complex_view +gsl_matrix_complex_subrow (gsl_matrix_complex * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_view +gsl_matrix_complex_subcolumn (gsl_matrix_complex * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_view +gsl_matrix_complex_view_array (double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_view +gsl_matrix_complex_view_array_with_tda (double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_view +gsl_matrix_complex_view_vector (gsl_vector_complex * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_view +gsl_matrix_complex_view_vector_with_tda (gsl_vector_complex * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_complex_const_view +gsl_matrix_complex_const_submatrix (const gsl_matrix_complex * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_row (const gsl_matrix_complex * m, + const size_t i); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_column (const gsl_matrix_complex * m, + const size_t j); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_diagonal (const gsl_matrix_complex * m); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_subdiagonal (const gsl_matrix_complex * m, + const size_t k); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_superdiagonal (const gsl_matrix_complex * m, + const size_t k); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_subrow (const gsl_matrix_complex * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_const_view +gsl_matrix_complex_const_subcolumn (const gsl_matrix_complex * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_const_view +gsl_matrix_complex_const_view_array (const double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_const_view +gsl_matrix_complex_const_view_array_with_tda (const double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_const_view +gsl_matrix_complex_const_view_vector (const gsl_vector_complex * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_const_view +gsl_matrix_complex_const_view_vector_with_tda (const gsl_vector_complex * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_complex_set_zero (gsl_matrix_complex * m); +void gsl_matrix_complex_set_identity (gsl_matrix_complex * m); +void gsl_matrix_complex_set_all (gsl_matrix_complex * m, gsl_complex x); + +int gsl_matrix_complex_fread (FILE * stream, gsl_matrix_complex * m) ; +int gsl_matrix_complex_fwrite (FILE * stream, const gsl_matrix_complex * m) ; +int gsl_matrix_complex_fscanf (FILE * stream, gsl_matrix_complex * m); +int gsl_matrix_complex_fprintf (FILE * stream, const gsl_matrix_complex * m, const char * format); + +int gsl_matrix_complex_memcpy(gsl_matrix_complex * dest, const gsl_matrix_complex * src); +int gsl_matrix_complex_swap(gsl_matrix_complex * m1, gsl_matrix_complex * m2); + +int gsl_matrix_complex_swap_rows(gsl_matrix_complex * m, const size_t i, const size_t j); +int gsl_matrix_complex_swap_columns(gsl_matrix_complex * m, const size_t i, const size_t j); +int gsl_matrix_complex_swap_rowcol(gsl_matrix_complex * m, const size_t i, const size_t j); + +int gsl_matrix_complex_transpose (gsl_matrix_complex * m); +int gsl_matrix_complex_transpose_memcpy (gsl_matrix_complex * dest, const gsl_matrix_complex * src); + +int gsl_matrix_complex_equal (const gsl_matrix_complex * a, const gsl_matrix_complex * b); + +int gsl_matrix_complex_isnull (const gsl_matrix_complex * m); +int gsl_matrix_complex_ispos (const gsl_matrix_complex * m); +int gsl_matrix_complex_isneg (const gsl_matrix_complex * m); +int gsl_matrix_complex_isnonneg (const gsl_matrix_complex * m); + +int gsl_matrix_complex_add (gsl_matrix_complex * a, const gsl_matrix_complex * b); +int gsl_matrix_complex_sub (gsl_matrix_complex * a, const gsl_matrix_complex * b); +int gsl_matrix_complex_mul_elements (gsl_matrix_complex * a, const gsl_matrix_complex * b); +int gsl_matrix_complex_div_elements (gsl_matrix_complex * a, const gsl_matrix_complex * b); +int gsl_matrix_complex_scale (gsl_matrix_complex * a, const gsl_complex x); +int gsl_matrix_complex_add_constant (gsl_matrix_complex * a, const gsl_complex x); +int gsl_matrix_complex_add_diagonal (gsl_matrix_complex * a, const gsl_complex x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_complex_get_row(gsl_vector_complex * v, const gsl_matrix_complex * m, const size_t i); +int gsl_matrix_complex_get_col(gsl_vector_complex * v, const gsl_matrix_complex * m, const size_t j); +int gsl_matrix_complex_set_row(gsl_matrix_complex * m, const size_t i, const gsl_vector_complex * v); +int gsl_matrix_complex_set_col(gsl_matrix_complex * m, const size_t j, const gsl_vector_complex * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL gsl_complex gsl_matrix_complex_get(const gsl_matrix_complex * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_complex_set(gsl_matrix_complex * m, const size_t i, const size_t j, const gsl_complex x); + +INLINE_DECL gsl_complex * gsl_matrix_complex_ptr(gsl_matrix_complex * m, const size_t i, const size_t j); +INLINE_DECL const gsl_complex * gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex +gsl_matrix_complex_get(const gsl_matrix_complex * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + gsl_complex zero = {{0,0}}; + + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; + } + } +#endif + return *(gsl_complex *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +void +gsl_matrix_complex_set(gsl_matrix_complex * m, + const size_t i, const size_t j, const gsl_complex x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + *(gsl_complex *)(m->data + 2*(i * m->tda + j)) = x ; +} + +INLINE_FUN +gsl_complex * +gsl_matrix_complex_ptr(gsl_matrix_complex * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (gsl_complex *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +const gsl_complex * +gsl_matrix_complex_const_ptr(const gsl_matrix_complex * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const gsl_complex *)(m->data + 2*(i * m->tda + j)) ; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_MATRIX_COMPLEX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_complex_float.h b/software/gsl-1.15/matrix/gsl_matrix_complex_float.h new file mode 100644 index 000000000..807ace410 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_complex_float.h @@ -0,0 +1,351 @@ +/* matrix/gsl_matrix_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_COMPLEX_FLOAT_H__ +#define __GSL_MATRIX_COMPLEX_FLOAT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + float * data; + gsl_block_complex_float * block; + int owner; +} gsl_matrix_complex_float ; + +typedef struct +{ + gsl_matrix_complex_float matrix; +} _gsl_matrix_complex_float_view; + +typedef _gsl_matrix_complex_float_view gsl_matrix_complex_float_view; + +typedef struct +{ + gsl_matrix_complex_float matrix; +} _gsl_matrix_complex_float_const_view; + +typedef const _gsl_matrix_complex_float_const_view gsl_matrix_complex_float_const_view; + + +/* Allocation */ + +gsl_matrix_complex_float * +gsl_matrix_complex_float_alloc (const size_t n1, const size_t n2); + +gsl_matrix_complex_float * +gsl_matrix_complex_float_calloc (const size_t n1, const size_t n2); + +gsl_matrix_complex_float * +gsl_matrix_complex_float_alloc_from_block (gsl_block_complex_float * b, + const size_t offset, + const size_t n1, const size_t n2, const size_t d2); + +gsl_matrix_complex_float * +gsl_matrix_complex_float_alloc_from_matrix (gsl_matrix_complex_float * b, + const size_t k1, const size_t k2, + const size_t n1, const size_t n2); + +gsl_vector_complex_float * +gsl_vector_complex_float_alloc_row_from_matrix (gsl_matrix_complex_float * m, + const size_t i); + +gsl_vector_complex_float * +gsl_vector_complex_float_alloc_col_from_matrix (gsl_matrix_complex_float * m, + const size_t j); + +void gsl_matrix_complex_float_free (gsl_matrix_complex_float * m); + +/* Views */ + +_gsl_matrix_complex_float_view +gsl_matrix_complex_float_submatrix (gsl_matrix_complex_float * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_row (gsl_matrix_complex_float * m, const size_t i); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_column (gsl_matrix_complex_float * m, const size_t j); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_diagonal (gsl_matrix_complex_float * m); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_subdiagonal (gsl_matrix_complex_float * m, const size_t k); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_superdiagonal (gsl_matrix_complex_float * m, const size_t k); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_subrow (gsl_matrix_complex_float * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_float_view +gsl_matrix_complex_float_subcolumn (gsl_matrix_complex_float * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_float_view +gsl_matrix_complex_float_view_array (float * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_float_view +gsl_matrix_complex_float_view_array_with_tda (float * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_float_view +gsl_matrix_complex_float_view_vector (gsl_vector_complex_float * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_float_view +gsl_matrix_complex_float_view_vector_with_tda (gsl_vector_complex_float * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_complex_float_const_view +gsl_matrix_complex_float_const_submatrix (const gsl_matrix_complex_float * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_row (const gsl_matrix_complex_float * m, + const size_t i); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_column (const gsl_matrix_complex_float * m, + const size_t j); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_diagonal (const gsl_matrix_complex_float * m); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_subdiagonal (const gsl_matrix_complex_float * m, + const size_t k); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_superdiagonal (const gsl_matrix_complex_float * m, + const size_t k); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_subrow (const gsl_matrix_complex_float * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_float_const_view +gsl_matrix_complex_float_const_subcolumn (const gsl_matrix_complex_float * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_float_const_view +gsl_matrix_complex_float_const_view_array (const float * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_float_const_view +gsl_matrix_complex_float_const_view_array_with_tda (const float * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_float_const_view +gsl_matrix_complex_float_const_view_vector (const gsl_vector_complex_float * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_float_const_view +gsl_matrix_complex_float_const_view_vector_with_tda (const gsl_vector_complex_float * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_complex_float_set_zero (gsl_matrix_complex_float * m); +void gsl_matrix_complex_float_set_identity (gsl_matrix_complex_float * m); +void gsl_matrix_complex_float_set_all (gsl_matrix_complex_float * m, gsl_complex_float x); + +int gsl_matrix_complex_float_fread (FILE * stream, gsl_matrix_complex_float * m) ; +int gsl_matrix_complex_float_fwrite (FILE * stream, const gsl_matrix_complex_float * m) ; +int gsl_matrix_complex_float_fscanf (FILE * stream, gsl_matrix_complex_float * m); +int gsl_matrix_complex_float_fprintf (FILE * stream, const gsl_matrix_complex_float * m, const char * format); + +int gsl_matrix_complex_float_memcpy(gsl_matrix_complex_float * dest, const gsl_matrix_complex_float * src); +int gsl_matrix_complex_float_swap(gsl_matrix_complex_float * m1, gsl_matrix_complex_float * m2); + +int gsl_matrix_complex_float_swap_rows(gsl_matrix_complex_float * m, const size_t i, const size_t j); +int gsl_matrix_complex_float_swap_columns(gsl_matrix_complex_float * m, const size_t i, const size_t j); +int gsl_matrix_complex_float_swap_rowcol(gsl_matrix_complex_float * m, const size_t i, const size_t j); + +int gsl_matrix_complex_float_transpose (gsl_matrix_complex_float * m); +int gsl_matrix_complex_float_transpose_memcpy (gsl_matrix_complex_float * dest, const gsl_matrix_complex_float * src); + +int gsl_matrix_complex_float_equal (const gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); + +int gsl_matrix_complex_float_isnull (const gsl_matrix_complex_float * m); +int gsl_matrix_complex_float_ispos (const gsl_matrix_complex_float * m); +int gsl_matrix_complex_float_isneg (const gsl_matrix_complex_float * m); +int gsl_matrix_complex_float_isnonneg (const gsl_matrix_complex_float * m); + +int gsl_matrix_complex_float_add (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); +int gsl_matrix_complex_float_sub (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); +int gsl_matrix_complex_float_mul_elements (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); +int gsl_matrix_complex_float_div_elements (gsl_matrix_complex_float * a, const gsl_matrix_complex_float * b); +int gsl_matrix_complex_float_scale (gsl_matrix_complex_float * a, const gsl_complex_float x); +int gsl_matrix_complex_float_add_constant (gsl_matrix_complex_float * a, const gsl_complex_float x); +int gsl_matrix_complex_float_add_diagonal (gsl_matrix_complex_float * a, const gsl_complex_float x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_complex_float_get_row(gsl_vector_complex_float * v, const gsl_matrix_complex_float * m, const size_t i); +int gsl_matrix_complex_float_get_col(gsl_vector_complex_float * v, const gsl_matrix_complex_float * m, const size_t j); +int gsl_matrix_complex_float_set_row(gsl_matrix_complex_float * m, const size_t i, const gsl_vector_complex_float * v); +int gsl_matrix_complex_float_set_col(gsl_matrix_complex_float * m, const size_t j, const gsl_vector_complex_float * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL gsl_complex_float gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x); + +INLINE_DECL gsl_complex_float * gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, const size_t i, const size_t j); +INLINE_DECL const gsl_complex_float * gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex_float +gsl_matrix_complex_float_get(const gsl_matrix_complex_float * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + gsl_complex_float zero = {{0,0}}; + + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; + } + } +#endif + return *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +void +gsl_matrix_complex_float_set(gsl_matrix_complex_float * m, + const size_t i, const size_t j, const gsl_complex_float x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + *(gsl_complex_float *)(m->data + 2*(i * m->tda + j)) = x ; +} + +INLINE_FUN +gsl_complex_float * +gsl_matrix_complex_float_ptr(gsl_matrix_complex_float * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +const gsl_complex_float * +gsl_matrix_complex_float_const_ptr(const gsl_matrix_complex_float * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const gsl_complex_float *)(m->data + 2*(i * m->tda + j)) ; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_MATRIX_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_complex_long_double.h b/software/gsl-1.15/matrix/gsl_matrix_complex_long_double.h new file mode 100644 index 000000000..b68ccb6b4 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_complex_long_double.h @@ -0,0 +1,351 @@ +/* matrix/gsl_matrix_complex_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_COMPLEX_LONG_DOUBLE_H__ +#define __GSL_MATRIX_COMPLEX_LONG_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + long double * data; + gsl_block_complex_long_double * block; + int owner; +} gsl_matrix_complex_long_double ; + +typedef struct +{ + gsl_matrix_complex_long_double matrix; +} _gsl_matrix_complex_long_double_view; + +typedef _gsl_matrix_complex_long_double_view gsl_matrix_complex_long_double_view; + +typedef struct +{ + gsl_matrix_complex_long_double matrix; +} _gsl_matrix_complex_long_double_const_view; + +typedef const _gsl_matrix_complex_long_double_const_view gsl_matrix_complex_long_double_const_view; + + +/* Allocation */ + +gsl_matrix_complex_long_double * +gsl_matrix_complex_long_double_alloc (const size_t n1, const size_t n2); + +gsl_matrix_complex_long_double * +gsl_matrix_complex_long_double_calloc (const size_t n1, const size_t n2); + +gsl_matrix_complex_long_double * +gsl_matrix_complex_long_double_alloc_from_block (gsl_block_complex_long_double * b, + const size_t offset, + const size_t n1, const size_t n2, const size_t d2); + +gsl_matrix_complex_long_double * +gsl_matrix_complex_long_double_alloc_from_matrix (gsl_matrix_complex_long_double * b, + const size_t k1, const size_t k2, + const size_t n1, const size_t n2); + +gsl_vector_complex_long_double * +gsl_vector_complex_long_double_alloc_row_from_matrix (gsl_matrix_complex_long_double * m, + const size_t i); + +gsl_vector_complex_long_double * +gsl_vector_complex_long_double_alloc_col_from_matrix (gsl_matrix_complex_long_double * m, + const size_t j); + +void gsl_matrix_complex_long_double_free (gsl_matrix_complex_long_double * m); + +/* Views */ + +_gsl_matrix_complex_long_double_view +gsl_matrix_complex_long_double_submatrix (gsl_matrix_complex_long_double * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_row (gsl_matrix_complex_long_double * m, const size_t i); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_column (gsl_matrix_complex_long_double * m, const size_t j); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_diagonal (gsl_matrix_complex_long_double * m); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_subdiagonal (gsl_matrix_complex_long_double * m, const size_t k); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_superdiagonal (gsl_matrix_complex_long_double * m, const size_t k); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_subrow (gsl_matrix_complex_long_double * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_long_double_view +gsl_matrix_complex_long_double_subcolumn (gsl_matrix_complex_long_double * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_long_double_view +gsl_matrix_complex_long_double_view_array (long double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_long_double_view +gsl_matrix_complex_long_double_view_array_with_tda (long double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_long_double_view +gsl_matrix_complex_long_double_view_vector (gsl_vector_complex_long_double * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_long_double_view +gsl_matrix_complex_long_double_view_vector_with_tda (gsl_vector_complex_long_double * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_complex_long_double_const_view +gsl_matrix_complex_long_double_const_submatrix (const gsl_matrix_complex_long_double * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_row (const gsl_matrix_complex_long_double * m, + const size_t i); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_column (const gsl_matrix_complex_long_double * m, + const size_t j); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_diagonal (const gsl_matrix_complex_long_double * m); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_subdiagonal (const gsl_matrix_complex_long_double * m, + const size_t k); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_superdiagonal (const gsl_matrix_complex_long_double * m, + const size_t k); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_subrow (const gsl_matrix_complex_long_double * m, + const size_t i, const size_t offset, + const size_t n); + +_gsl_vector_complex_long_double_const_view +gsl_matrix_complex_long_double_const_subcolumn (const gsl_matrix_complex_long_double * m, + const size_t j, const size_t offset, + const size_t n); + +_gsl_matrix_complex_long_double_const_view +gsl_matrix_complex_long_double_const_view_array (const long double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_long_double_const_view +gsl_matrix_complex_long_double_const_view_array_with_tda (const long double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_complex_long_double_const_view +gsl_matrix_complex_long_double_const_view_vector (const gsl_vector_complex_long_double * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_complex_long_double_const_view +gsl_matrix_complex_long_double_const_view_vector_with_tda (const gsl_vector_complex_long_double * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_complex_long_double_set_zero (gsl_matrix_complex_long_double * m); +void gsl_matrix_complex_long_double_set_identity (gsl_matrix_complex_long_double * m); +void gsl_matrix_complex_long_double_set_all (gsl_matrix_complex_long_double * m, gsl_complex_long_double x); + +int gsl_matrix_complex_long_double_fread (FILE * stream, gsl_matrix_complex_long_double * m) ; +int gsl_matrix_complex_long_double_fwrite (FILE * stream, const gsl_matrix_complex_long_double * m) ; +int gsl_matrix_complex_long_double_fscanf (FILE * stream, gsl_matrix_complex_long_double * m); +int gsl_matrix_complex_long_double_fprintf (FILE * stream, const gsl_matrix_complex_long_double * m, const char * format); + +int gsl_matrix_complex_long_double_memcpy(gsl_matrix_complex_long_double * dest, const gsl_matrix_complex_long_double * src); +int gsl_matrix_complex_long_double_swap(gsl_matrix_complex_long_double * m1, gsl_matrix_complex_long_double * m2); + +int gsl_matrix_complex_long_double_swap_rows(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); +int gsl_matrix_complex_long_double_swap_columns(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); +int gsl_matrix_complex_long_double_swap_rowcol(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); + +int gsl_matrix_complex_long_double_transpose (gsl_matrix_complex_long_double * m); +int gsl_matrix_complex_long_double_transpose_memcpy (gsl_matrix_complex_long_double * dest, const gsl_matrix_complex_long_double * src); + +int gsl_matrix_complex_long_double_equal (const gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); + +int gsl_matrix_complex_long_double_isnull (const gsl_matrix_complex_long_double * m); +int gsl_matrix_complex_long_double_ispos (const gsl_matrix_complex_long_double * m); +int gsl_matrix_complex_long_double_isneg (const gsl_matrix_complex_long_double * m); +int gsl_matrix_complex_long_double_isnonneg (const gsl_matrix_complex_long_double * m); + +int gsl_matrix_complex_long_double_add (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); +int gsl_matrix_complex_long_double_sub (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); +int gsl_matrix_complex_long_double_mul_elements (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); +int gsl_matrix_complex_long_double_div_elements (gsl_matrix_complex_long_double * a, const gsl_matrix_complex_long_double * b); +int gsl_matrix_complex_long_double_scale (gsl_matrix_complex_long_double * a, const gsl_complex_long_double x); +int gsl_matrix_complex_long_double_add_constant (gsl_matrix_complex_long_double * a, const gsl_complex_long_double x); +int gsl_matrix_complex_long_double_add_diagonal (gsl_matrix_complex_long_double * a, const gsl_complex_long_double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_complex_long_double_get_row(gsl_vector_complex_long_double * v, const gsl_matrix_complex_long_double * m, const size_t i); +int gsl_matrix_complex_long_double_get_col(gsl_vector_complex_long_double * v, const gsl_matrix_complex_long_double * m, const size_t j); +int gsl_matrix_complex_long_double_set_row(gsl_matrix_complex_long_double * m, const size_t i, const gsl_vector_complex_long_double * v); +int gsl_matrix_complex_long_double_set_col(gsl_matrix_complex_long_double * m, const size_t j, const gsl_vector_complex_long_double * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL gsl_complex_long_double gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, const size_t i, const size_t j, const gsl_complex_long_double x); + +INLINE_DECL gsl_complex_long_double * gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, const size_t i, const size_t j); +INLINE_DECL const gsl_complex_long_double * gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex_long_double +gsl_matrix_complex_long_double_get(const gsl_matrix_complex_long_double * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + gsl_complex_long_double zero = {{0,0}}; + + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, zero) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, zero) ; + } + } +#endif + return *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +void +gsl_matrix_complex_long_double_set(gsl_matrix_complex_long_double * m, + const size_t i, const size_t j, const gsl_complex_long_double x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + *(gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) = x ; +} + +INLINE_FUN +gsl_complex_long_double * +gsl_matrix_complex_long_double_ptr(gsl_matrix_complex_long_double * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; +} + +INLINE_FUN +const gsl_complex_long_double * +gsl_matrix_complex_long_double_const_ptr(const gsl_matrix_complex_long_double * m, + const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const gsl_complex_long_double *)(m->data + 2*(i * m->tda + j)) ; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_MATRIX_COMPLEX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_double.h b/software/gsl-1.15/matrix/gsl_matrix_double.h new file mode 100644 index 000000000..635669595 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_double.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_DOUBLE_H__ +#define __GSL_MATRIX_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + double * data; + gsl_block * block; + int owner; +} gsl_matrix; + +typedef struct +{ + gsl_matrix matrix; +} _gsl_matrix_view; + +typedef _gsl_matrix_view gsl_matrix_view; + +typedef struct +{ + gsl_matrix matrix; +} _gsl_matrix_const_view; + +typedef const _gsl_matrix_const_view gsl_matrix_const_view; + +/* Allocation */ + +gsl_matrix * +gsl_matrix_alloc (const size_t n1, const size_t n2); + +gsl_matrix * +gsl_matrix_calloc (const size_t n1, const size_t n2); + +gsl_matrix * +gsl_matrix_alloc_from_block (gsl_block * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix * +gsl_matrix_alloc_from_matrix (gsl_matrix * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector * +gsl_vector_alloc_row_from_matrix (gsl_matrix * m, + const size_t i); + +gsl_vector * +gsl_vector_alloc_col_from_matrix (gsl_matrix * m, + const size_t j); + +void gsl_matrix_free (gsl_matrix * m); + +/* Views */ + +_gsl_matrix_view +gsl_matrix_submatrix (gsl_matrix * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_view +gsl_matrix_row (gsl_matrix * m, const size_t i); + +_gsl_vector_view +gsl_matrix_column (gsl_matrix * m, const size_t j); + +_gsl_vector_view +gsl_matrix_diagonal (gsl_matrix * m); + +_gsl_vector_view +gsl_matrix_subdiagonal (gsl_matrix * m, const size_t k); + +_gsl_vector_view +gsl_matrix_superdiagonal (gsl_matrix * m, const size_t k); + +_gsl_vector_view +gsl_matrix_subrow (gsl_matrix * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_view +gsl_matrix_subcolumn (gsl_matrix * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_view +gsl_matrix_view_array (double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_view +gsl_matrix_view_array_with_tda (double * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_view +gsl_matrix_view_vector (gsl_vector * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_view +gsl_matrix_view_vector_with_tda (gsl_vector * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_const_view +gsl_matrix_const_submatrix (const gsl_matrix * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_const_view +gsl_matrix_const_row (const gsl_matrix * m, + const size_t i); + +_gsl_vector_const_view +gsl_matrix_const_column (const gsl_matrix * m, + const size_t j); + +_gsl_vector_const_view +gsl_matrix_const_diagonal (const gsl_matrix * m); + +_gsl_vector_const_view +gsl_matrix_const_subdiagonal (const gsl_matrix * m, + const size_t k); + +_gsl_vector_const_view +gsl_matrix_const_superdiagonal (const gsl_matrix * m, + const size_t k); + +_gsl_vector_const_view +gsl_matrix_const_subrow (const gsl_matrix * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_const_view +gsl_matrix_const_subcolumn (const gsl_matrix * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_const_view +gsl_matrix_const_view_array (const double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_const_view +gsl_matrix_const_view_array_with_tda (const double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_const_view +gsl_matrix_const_view_vector (const gsl_vector * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_const_view +gsl_matrix_const_view_vector_with_tda (const gsl_vector * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_set_zero (gsl_matrix * m); +void gsl_matrix_set_identity (gsl_matrix * m); +void gsl_matrix_set_all (gsl_matrix * m, double x); + +int gsl_matrix_fread (FILE * stream, gsl_matrix * m) ; +int gsl_matrix_fwrite (FILE * stream, const gsl_matrix * m) ; +int gsl_matrix_fscanf (FILE * stream, gsl_matrix * m); +int gsl_matrix_fprintf (FILE * stream, const gsl_matrix * m, const char * format); + +int gsl_matrix_memcpy(gsl_matrix * dest, const gsl_matrix * src); +int gsl_matrix_swap(gsl_matrix * m1, gsl_matrix * m2); + +int gsl_matrix_swap_rows(gsl_matrix * m, const size_t i, const size_t j); +int gsl_matrix_swap_columns(gsl_matrix * m, const size_t i, const size_t j); +int gsl_matrix_swap_rowcol(gsl_matrix * m, const size_t i, const size_t j); +int gsl_matrix_transpose (gsl_matrix * m); +int gsl_matrix_transpose_memcpy (gsl_matrix * dest, const gsl_matrix * src); + +double gsl_matrix_max (const gsl_matrix * m); +double gsl_matrix_min (const gsl_matrix * m); +void gsl_matrix_minmax (const gsl_matrix * m, double * min_out, double * max_out); + +void gsl_matrix_max_index (const gsl_matrix * m, size_t * imax, size_t *jmax); +void gsl_matrix_min_index (const gsl_matrix * m, size_t * imin, size_t *jmin); +void gsl_matrix_minmax_index (const gsl_matrix * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_equal (const gsl_matrix * a, const gsl_matrix * b); + +int gsl_matrix_isnull (const gsl_matrix * m); +int gsl_matrix_ispos (const gsl_matrix * m); +int gsl_matrix_isneg (const gsl_matrix * m); +int gsl_matrix_isnonneg (const gsl_matrix * m); + +int gsl_matrix_add (gsl_matrix * a, const gsl_matrix * b); +int gsl_matrix_sub (gsl_matrix * a, const gsl_matrix * b); +int gsl_matrix_mul_elements (gsl_matrix * a, const gsl_matrix * b); +int gsl_matrix_div_elements (gsl_matrix * a, const gsl_matrix * b); +int gsl_matrix_scale (gsl_matrix * a, const double x); +int gsl_matrix_add_constant (gsl_matrix * a, const double x); +int gsl_matrix_add_diagonal (gsl_matrix * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_get_row(gsl_vector * v, const gsl_matrix * m, const size_t i); +int gsl_matrix_get_col(gsl_vector * v, const gsl_matrix * m, const size_t j); +int gsl_matrix_set_row(gsl_matrix * m, const size_t i, const gsl_vector * v); +int gsl_matrix_set_col(gsl_matrix * m, const size_t j, const gsl_vector * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL double gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x); +INLINE_DECL double * gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j); +INLINE_DECL const double * gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +double +gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +double * +gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (double *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const double * +gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const double *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_float.h b/software/gsl-1.15/matrix/gsl_matrix_float.h new file mode 100644 index 000000000..a91114ca6 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_float.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_FLOAT_H__ +#define __GSL_MATRIX_FLOAT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + float * data; + gsl_block_float * block; + int owner; +} gsl_matrix_float; + +typedef struct +{ + gsl_matrix_float matrix; +} _gsl_matrix_float_view; + +typedef _gsl_matrix_float_view gsl_matrix_float_view; + +typedef struct +{ + gsl_matrix_float matrix; +} _gsl_matrix_float_const_view; + +typedef const _gsl_matrix_float_const_view gsl_matrix_float_const_view; + +/* Allocation */ + +gsl_matrix_float * +gsl_matrix_float_alloc (const size_t n1, const size_t n2); + +gsl_matrix_float * +gsl_matrix_float_calloc (const size_t n1, const size_t n2); + +gsl_matrix_float * +gsl_matrix_float_alloc_from_block (gsl_block_float * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_float * +gsl_matrix_float_alloc_from_matrix (gsl_matrix_float * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_float * +gsl_vector_float_alloc_row_from_matrix (gsl_matrix_float * m, + const size_t i); + +gsl_vector_float * +gsl_vector_float_alloc_col_from_matrix (gsl_matrix_float * m, + const size_t j); + +void gsl_matrix_float_free (gsl_matrix_float * m); + +/* Views */ + +_gsl_matrix_float_view +gsl_matrix_float_submatrix (gsl_matrix_float * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_float_view +gsl_matrix_float_row (gsl_matrix_float * m, const size_t i); + +_gsl_vector_float_view +gsl_matrix_float_column (gsl_matrix_float * m, const size_t j); + +_gsl_vector_float_view +gsl_matrix_float_diagonal (gsl_matrix_float * m); + +_gsl_vector_float_view +gsl_matrix_float_subdiagonal (gsl_matrix_float * m, const size_t k); + +_gsl_vector_float_view +gsl_matrix_float_superdiagonal (gsl_matrix_float * m, const size_t k); + +_gsl_vector_float_view +gsl_matrix_float_subrow (gsl_matrix_float * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_float_view +gsl_matrix_float_subcolumn (gsl_matrix_float * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_float_view +gsl_matrix_float_view_array (float * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_float_view +gsl_matrix_float_view_array_with_tda (float * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_float_view +gsl_matrix_float_view_vector (gsl_vector_float * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_float_view +gsl_matrix_float_view_vector_with_tda (gsl_vector_float * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_float_const_view +gsl_matrix_float_const_submatrix (const gsl_matrix_float * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_float_const_view +gsl_matrix_float_const_row (const gsl_matrix_float * m, + const size_t i); + +_gsl_vector_float_const_view +gsl_matrix_float_const_column (const gsl_matrix_float * m, + const size_t j); + +_gsl_vector_float_const_view +gsl_matrix_float_const_diagonal (const gsl_matrix_float * m); + +_gsl_vector_float_const_view +gsl_matrix_float_const_subdiagonal (const gsl_matrix_float * m, + const size_t k); + +_gsl_vector_float_const_view +gsl_matrix_float_const_superdiagonal (const gsl_matrix_float * m, + const size_t k); + +_gsl_vector_float_const_view +gsl_matrix_float_const_subrow (const gsl_matrix_float * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_float_const_view +gsl_matrix_float_const_subcolumn (const gsl_matrix_float * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_float_const_view +gsl_matrix_float_const_view_array (const float * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_float_const_view +gsl_matrix_float_const_view_array_with_tda (const float * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_float_const_view +gsl_matrix_float_const_view_vector (const gsl_vector_float * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_float_const_view +gsl_matrix_float_const_view_vector_with_tda (const gsl_vector_float * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_float_set_zero (gsl_matrix_float * m); +void gsl_matrix_float_set_identity (gsl_matrix_float * m); +void gsl_matrix_float_set_all (gsl_matrix_float * m, float x); + +int gsl_matrix_float_fread (FILE * stream, gsl_matrix_float * m) ; +int gsl_matrix_float_fwrite (FILE * stream, const gsl_matrix_float * m) ; +int gsl_matrix_float_fscanf (FILE * stream, gsl_matrix_float * m); +int gsl_matrix_float_fprintf (FILE * stream, const gsl_matrix_float * m, const char * format); + +int gsl_matrix_float_memcpy(gsl_matrix_float * dest, const gsl_matrix_float * src); +int gsl_matrix_float_swap(gsl_matrix_float * m1, gsl_matrix_float * m2); + +int gsl_matrix_float_swap_rows(gsl_matrix_float * m, const size_t i, const size_t j); +int gsl_matrix_float_swap_columns(gsl_matrix_float * m, const size_t i, const size_t j); +int gsl_matrix_float_swap_rowcol(gsl_matrix_float * m, const size_t i, const size_t j); +int gsl_matrix_float_transpose (gsl_matrix_float * m); +int gsl_matrix_float_transpose_memcpy (gsl_matrix_float * dest, const gsl_matrix_float * src); + +float gsl_matrix_float_max (const gsl_matrix_float * m); +float gsl_matrix_float_min (const gsl_matrix_float * m); +void gsl_matrix_float_minmax (const gsl_matrix_float * m, float * min_out, float * max_out); + +void gsl_matrix_float_max_index (const gsl_matrix_float * m, size_t * imax, size_t *jmax); +void gsl_matrix_float_min_index (const gsl_matrix_float * m, size_t * imin, size_t *jmin); +void gsl_matrix_float_minmax_index (const gsl_matrix_float * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_float_equal (const gsl_matrix_float * a, const gsl_matrix_float * b); + +int gsl_matrix_float_isnull (const gsl_matrix_float * m); +int gsl_matrix_float_ispos (const gsl_matrix_float * m); +int gsl_matrix_float_isneg (const gsl_matrix_float * m); +int gsl_matrix_float_isnonneg (const gsl_matrix_float * m); + +int gsl_matrix_float_add (gsl_matrix_float * a, const gsl_matrix_float * b); +int gsl_matrix_float_sub (gsl_matrix_float * a, const gsl_matrix_float * b); +int gsl_matrix_float_mul_elements (gsl_matrix_float * a, const gsl_matrix_float * b); +int gsl_matrix_float_div_elements (gsl_matrix_float * a, const gsl_matrix_float * b); +int gsl_matrix_float_scale (gsl_matrix_float * a, const double x); +int gsl_matrix_float_add_constant (gsl_matrix_float * a, const double x); +int gsl_matrix_float_add_diagonal (gsl_matrix_float * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_float_get_row(gsl_vector_float * v, const gsl_matrix_float * m, const size_t i); +int gsl_matrix_float_get_col(gsl_vector_float * v, const gsl_matrix_float * m, const size_t j); +int gsl_matrix_float_set_row(gsl_matrix_float * m, const size_t i, const gsl_vector_float * v); +int gsl_matrix_float_set_col(gsl_matrix_float * m, const size_t j, const gsl_vector_float * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL float gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x); +INLINE_DECL float * gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j); +INLINE_DECL const float * gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +float +gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const size_t j, const float x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +float * +gsl_matrix_float_ptr(gsl_matrix_float * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (float *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const float * +gsl_matrix_float_const_ptr(const gsl_matrix_float * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const float *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_FLOAT_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_int.h b/software/gsl-1.15/matrix/gsl_matrix_int.h new file mode 100644 index 000000000..a9b04c1b3 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_int.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_INT_H__ +#define __GSL_MATRIX_INT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + int * data; + gsl_block_int * block; + int owner; +} gsl_matrix_int; + +typedef struct +{ + gsl_matrix_int matrix; +} _gsl_matrix_int_view; + +typedef _gsl_matrix_int_view gsl_matrix_int_view; + +typedef struct +{ + gsl_matrix_int matrix; +} _gsl_matrix_int_const_view; + +typedef const _gsl_matrix_int_const_view gsl_matrix_int_const_view; + +/* Allocation */ + +gsl_matrix_int * +gsl_matrix_int_alloc (const size_t n1, const size_t n2); + +gsl_matrix_int * +gsl_matrix_int_calloc (const size_t n1, const size_t n2); + +gsl_matrix_int * +gsl_matrix_int_alloc_from_block (gsl_block_int * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_int * +gsl_matrix_int_alloc_from_matrix (gsl_matrix_int * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_int * +gsl_vector_int_alloc_row_from_matrix (gsl_matrix_int * m, + const size_t i); + +gsl_vector_int * +gsl_vector_int_alloc_col_from_matrix (gsl_matrix_int * m, + const size_t j); + +void gsl_matrix_int_free (gsl_matrix_int * m); + +/* Views */ + +_gsl_matrix_int_view +gsl_matrix_int_submatrix (gsl_matrix_int * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_int_view +gsl_matrix_int_row (gsl_matrix_int * m, const size_t i); + +_gsl_vector_int_view +gsl_matrix_int_column (gsl_matrix_int * m, const size_t j); + +_gsl_vector_int_view +gsl_matrix_int_diagonal (gsl_matrix_int * m); + +_gsl_vector_int_view +gsl_matrix_int_subdiagonal (gsl_matrix_int * m, const size_t k); + +_gsl_vector_int_view +gsl_matrix_int_superdiagonal (gsl_matrix_int * m, const size_t k); + +_gsl_vector_int_view +gsl_matrix_int_subrow (gsl_matrix_int * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_int_view +gsl_matrix_int_subcolumn (gsl_matrix_int * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_int_view +gsl_matrix_int_view_array (int * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_int_view +gsl_matrix_int_view_array_with_tda (int * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_int_view +gsl_matrix_int_view_vector (gsl_vector_int * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_int_view +gsl_matrix_int_view_vector_with_tda (gsl_vector_int * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_int_const_view +gsl_matrix_int_const_submatrix (const gsl_matrix_int * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_int_const_view +gsl_matrix_int_const_row (const gsl_matrix_int * m, + const size_t i); + +_gsl_vector_int_const_view +gsl_matrix_int_const_column (const gsl_matrix_int * m, + const size_t j); + +_gsl_vector_int_const_view +gsl_matrix_int_const_diagonal (const gsl_matrix_int * m); + +_gsl_vector_int_const_view +gsl_matrix_int_const_subdiagonal (const gsl_matrix_int * m, + const size_t k); + +_gsl_vector_int_const_view +gsl_matrix_int_const_superdiagonal (const gsl_matrix_int * m, + const size_t k); + +_gsl_vector_int_const_view +gsl_matrix_int_const_subrow (const gsl_matrix_int * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_int_const_view +gsl_matrix_int_const_subcolumn (const gsl_matrix_int * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_int_const_view +gsl_matrix_int_const_view_array (const int * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_int_const_view +gsl_matrix_int_const_view_array_with_tda (const int * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_int_const_view +gsl_matrix_int_const_view_vector (const gsl_vector_int * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_int_const_view +gsl_matrix_int_const_view_vector_with_tda (const gsl_vector_int * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_int_set_zero (gsl_matrix_int * m); +void gsl_matrix_int_set_identity (gsl_matrix_int * m); +void gsl_matrix_int_set_all (gsl_matrix_int * m, int x); + +int gsl_matrix_int_fread (FILE * stream, gsl_matrix_int * m) ; +int gsl_matrix_int_fwrite (FILE * stream, const gsl_matrix_int * m) ; +int gsl_matrix_int_fscanf (FILE * stream, gsl_matrix_int * m); +int gsl_matrix_int_fprintf (FILE * stream, const gsl_matrix_int * m, const char * format); + +int gsl_matrix_int_memcpy(gsl_matrix_int * dest, const gsl_matrix_int * src); +int gsl_matrix_int_swap(gsl_matrix_int * m1, gsl_matrix_int * m2); + +int gsl_matrix_int_swap_rows(gsl_matrix_int * m, const size_t i, const size_t j); +int gsl_matrix_int_swap_columns(gsl_matrix_int * m, const size_t i, const size_t j); +int gsl_matrix_int_swap_rowcol(gsl_matrix_int * m, const size_t i, const size_t j); +int gsl_matrix_int_transpose (gsl_matrix_int * m); +int gsl_matrix_int_transpose_memcpy (gsl_matrix_int * dest, const gsl_matrix_int * src); + +int gsl_matrix_int_max (const gsl_matrix_int * m); +int gsl_matrix_int_min (const gsl_matrix_int * m); +void gsl_matrix_int_minmax (const gsl_matrix_int * m, int * min_out, int * max_out); + +void gsl_matrix_int_max_index (const gsl_matrix_int * m, size_t * imax, size_t *jmax); +void gsl_matrix_int_min_index (const gsl_matrix_int * m, size_t * imin, size_t *jmin); +void gsl_matrix_int_minmax_index (const gsl_matrix_int * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_int_equal (const gsl_matrix_int * a, const gsl_matrix_int * b); + +int gsl_matrix_int_isnull (const gsl_matrix_int * m); +int gsl_matrix_int_ispos (const gsl_matrix_int * m); +int gsl_matrix_int_isneg (const gsl_matrix_int * m); +int gsl_matrix_int_isnonneg (const gsl_matrix_int * m); + +int gsl_matrix_int_add (gsl_matrix_int * a, const gsl_matrix_int * b); +int gsl_matrix_int_sub (gsl_matrix_int * a, const gsl_matrix_int * b); +int gsl_matrix_int_mul_elements (gsl_matrix_int * a, const gsl_matrix_int * b); +int gsl_matrix_int_div_elements (gsl_matrix_int * a, const gsl_matrix_int * b); +int gsl_matrix_int_scale (gsl_matrix_int * a, const double x); +int gsl_matrix_int_add_constant (gsl_matrix_int * a, const double x); +int gsl_matrix_int_add_diagonal (gsl_matrix_int * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_int_get_row(gsl_vector_int * v, const gsl_matrix_int * m, const size_t i); +int gsl_matrix_int_get_col(gsl_vector_int * v, const gsl_matrix_int * m, const size_t j); +int gsl_matrix_int_set_row(gsl_matrix_int * m, const size_t i, const gsl_vector_int * v); +int gsl_matrix_int_set_col(gsl_matrix_int * m, const size_t j, const gsl_vector_int * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL int gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x); +INLINE_DECL int * gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j); +INLINE_DECL const int * gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +int +gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_int_set(gsl_matrix_int * m, const size_t i, const size_t j, const int x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +int * +gsl_matrix_int_ptr(gsl_matrix_int * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (int *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const int * +gsl_matrix_int_const_ptr(const gsl_matrix_int * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const int *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_INT_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_long.h b/software/gsl-1.15/matrix/gsl_matrix_long.h new file mode 100644 index 000000000..ff85a18db --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_long.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_LONG_H__ +#define __GSL_MATRIX_LONG_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + long * data; + gsl_block_long * block; + int owner; +} gsl_matrix_long; + +typedef struct +{ + gsl_matrix_long matrix; +} _gsl_matrix_long_view; + +typedef _gsl_matrix_long_view gsl_matrix_long_view; + +typedef struct +{ + gsl_matrix_long matrix; +} _gsl_matrix_long_const_view; + +typedef const _gsl_matrix_long_const_view gsl_matrix_long_const_view; + +/* Allocation */ + +gsl_matrix_long * +gsl_matrix_long_alloc (const size_t n1, const size_t n2); + +gsl_matrix_long * +gsl_matrix_long_calloc (const size_t n1, const size_t n2); + +gsl_matrix_long * +gsl_matrix_long_alloc_from_block (gsl_block_long * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_long * +gsl_matrix_long_alloc_from_matrix (gsl_matrix_long * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_long * +gsl_vector_long_alloc_row_from_matrix (gsl_matrix_long * m, + const size_t i); + +gsl_vector_long * +gsl_vector_long_alloc_col_from_matrix (gsl_matrix_long * m, + const size_t j); + +void gsl_matrix_long_free (gsl_matrix_long * m); + +/* Views */ + +_gsl_matrix_long_view +gsl_matrix_long_submatrix (gsl_matrix_long * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_long_view +gsl_matrix_long_row (gsl_matrix_long * m, const size_t i); + +_gsl_vector_long_view +gsl_matrix_long_column (gsl_matrix_long * m, const size_t j); + +_gsl_vector_long_view +gsl_matrix_long_diagonal (gsl_matrix_long * m); + +_gsl_vector_long_view +gsl_matrix_long_subdiagonal (gsl_matrix_long * m, const size_t k); + +_gsl_vector_long_view +gsl_matrix_long_superdiagonal (gsl_matrix_long * m, const size_t k); + +_gsl_vector_long_view +gsl_matrix_long_subrow (gsl_matrix_long * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_long_view +gsl_matrix_long_subcolumn (gsl_matrix_long * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_long_view +gsl_matrix_long_view_array (long * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_view +gsl_matrix_long_view_array_with_tda (long * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_long_view +gsl_matrix_long_view_vector (gsl_vector_long * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_view +gsl_matrix_long_view_vector_with_tda (gsl_vector_long * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_long_const_view +gsl_matrix_long_const_submatrix (const gsl_matrix_long * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_long_const_view +gsl_matrix_long_const_row (const gsl_matrix_long * m, + const size_t i); + +_gsl_vector_long_const_view +gsl_matrix_long_const_column (const gsl_matrix_long * m, + const size_t j); + +_gsl_vector_long_const_view +gsl_matrix_long_const_diagonal (const gsl_matrix_long * m); + +_gsl_vector_long_const_view +gsl_matrix_long_const_subdiagonal (const gsl_matrix_long * m, + const size_t k); + +_gsl_vector_long_const_view +gsl_matrix_long_const_superdiagonal (const gsl_matrix_long * m, + const size_t k); + +_gsl_vector_long_const_view +gsl_matrix_long_const_subrow (const gsl_matrix_long * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_long_const_view +gsl_matrix_long_const_subcolumn (const gsl_matrix_long * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_long_const_view +gsl_matrix_long_const_view_array (const long * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_const_view +gsl_matrix_long_const_view_array_with_tda (const long * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_long_const_view +gsl_matrix_long_const_view_vector (const gsl_vector_long * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_const_view +gsl_matrix_long_const_view_vector_with_tda (const gsl_vector_long * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_long_set_zero (gsl_matrix_long * m); +void gsl_matrix_long_set_identity (gsl_matrix_long * m); +void gsl_matrix_long_set_all (gsl_matrix_long * m, long x); + +int gsl_matrix_long_fread (FILE * stream, gsl_matrix_long * m) ; +int gsl_matrix_long_fwrite (FILE * stream, const gsl_matrix_long * m) ; +int gsl_matrix_long_fscanf (FILE * stream, gsl_matrix_long * m); +int gsl_matrix_long_fprintf (FILE * stream, const gsl_matrix_long * m, const char * format); + +int gsl_matrix_long_memcpy(gsl_matrix_long * dest, const gsl_matrix_long * src); +int gsl_matrix_long_swap(gsl_matrix_long * m1, gsl_matrix_long * m2); + +int gsl_matrix_long_swap_rows(gsl_matrix_long * m, const size_t i, const size_t j); +int gsl_matrix_long_swap_columns(gsl_matrix_long * m, const size_t i, const size_t j); +int gsl_matrix_long_swap_rowcol(gsl_matrix_long * m, const size_t i, const size_t j); +int gsl_matrix_long_transpose (gsl_matrix_long * m); +int gsl_matrix_long_transpose_memcpy (gsl_matrix_long * dest, const gsl_matrix_long * src); + +long gsl_matrix_long_max (const gsl_matrix_long * m); +long gsl_matrix_long_min (const gsl_matrix_long * m); +void gsl_matrix_long_minmax (const gsl_matrix_long * m, long * min_out, long * max_out); + +void gsl_matrix_long_max_index (const gsl_matrix_long * m, size_t * imax, size_t *jmax); +void gsl_matrix_long_min_index (const gsl_matrix_long * m, size_t * imin, size_t *jmin); +void gsl_matrix_long_minmax_index (const gsl_matrix_long * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_long_equal (const gsl_matrix_long * a, const gsl_matrix_long * b); + +int gsl_matrix_long_isnull (const gsl_matrix_long * m); +int gsl_matrix_long_ispos (const gsl_matrix_long * m); +int gsl_matrix_long_isneg (const gsl_matrix_long * m); +int gsl_matrix_long_isnonneg (const gsl_matrix_long * m); + +int gsl_matrix_long_add (gsl_matrix_long * a, const gsl_matrix_long * b); +int gsl_matrix_long_sub (gsl_matrix_long * a, const gsl_matrix_long * b); +int gsl_matrix_long_mul_elements (gsl_matrix_long * a, const gsl_matrix_long * b); +int gsl_matrix_long_div_elements (gsl_matrix_long * a, const gsl_matrix_long * b); +int gsl_matrix_long_scale (gsl_matrix_long * a, const double x); +int gsl_matrix_long_add_constant (gsl_matrix_long * a, const double x); +int gsl_matrix_long_add_diagonal (gsl_matrix_long * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_long_get_row(gsl_vector_long * v, const gsl_matrix_long * m, const size_t i); +int gsl_matrix_long_get_col(gsl_vector_long * v, const gsl_matrix_long * m, const size_t j); +int gsl_matrix_long_set_row(gsl_matrix_long * m, const size_t i, const gsl_vector_long * v); +int gsl_matrix_long_set_col(gsl_matrix_long * m, const size_t j, const gsl_vector_long * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL long gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x); +INLINE_DECL long * gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j); +INLINE_DECL const long * gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +long +gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_long_set(gsl_matrix_long * m, const size_t i, const size_t j, const long x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +long * +gsl_matrix_long_ptr(gsl_matrix_long * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (long *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const long * +gsl_matrix_long_const_ptr(const gsl_matrix_long * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const long *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_LONG_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_long_double.h b/software/gsl-1.15/matrix/gsl_matrix_long_double.h new file mode 100644 index 000000000..910091f66 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_long_double.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_LONG_DOUBLE_H__ +#define __GSL_MATRIX_LONG_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + long double * data; + gsl_block_long_double * block; + int owner; +} gsl_matrix_long_double; + +typedef struct +{ + gsl_matrix_long_double matrix; +} _gsl_matrix_long_double_view; + +typedef _gsl_matrix_long_double_view gsl_matrix_long_double_view; + +typedef struct +{ + gsl_matrix_long_double matrix; +} _gsl_matrix_long_double_const_view; + +typedef const _gsl_matrix_long_double_const_view gsl_matrix_long_double_const_view; + +/* Allocation */ + +gsl_matrix_long_double * +gsl_matrix_long_double_alloc (const size_t n1, const size_t n2); + +gsl_matrix_long_double * +gsl_matrix_long_double_calloc (const size_t n1, const size_t n2); + +gsl_matrix_long_double * +gsl_matrix_long_double_alloc_from_block (gsl_block_long_double * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_long_double * +gsl_matrix_long_double_alloc_from_matrix (gsl_matrix_long_double * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_long_double * +gsl_vector_long_double_alloc_row_from_matrix (gsl_matrix_long_double * m, + const size_t i); + +gsl_vector_long_double * +gsl_vector_long_double_alloc_col_from_matrix (gsl_matrix_long_double * m, + const size_t j); + +void gsl_matrix_long_double_free (gsl_matrix_long_double * m); + +/* Views */ + +_gsl_matrix_long_double_view +gsl_matrix_long_double_submatrix (gsl_matrix_long_double * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_long_double_view +gsl_matrix_long_double_row (gsl_matrix_long_double * m, const size_t i); + +_gsl_vector_long_double_view +gsl_matrix_long_double_column (gsl_matrix_long_double * m, const size_t j); + +_gsl_vector_long_double_view +gsl_matrix_long_double_diagonal (gsl_matrix_long_double * m); + +_gsl_vector_long_double_view +gsl_matrix_long_double_subdiagonal (gsl_matrix_long_double * m, const size_t k); + +_gsl_vector_long_double_view +gsl_matrix_long_double_superdiagonal (gsl_matrix_long_double * m, const size_t k); + +_gsl_vector_long_double_view +gsl_matrix_long_double_subrow (gsl_matrix_long_double * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_long_double_view +gsl_matrix_long_double_subcolumn (gsl_matrix_long_double * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_long_double_view +gsl_matrix_long_double_view_array (long double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_double_view +gsl_matrix_long_double_view_array_with_tda (long double * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_long_double_view +gsl_matrix_long_double_view_vector (gsl_vector_long_double * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_double_view +gsl_matrix_long_double_view_vector_with_tda (gsl_vector_long_double * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_long_double_const_view +gsl_matrix_long_double_const_submatrix (const gsl_matrix_long_double * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_row (const gsl_matrix_long_double * m, + const size_t i); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_column (const gsl_matrix_long_double * m, + const size_t j); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_diagonal (const gsl_matrix_long_double * m); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_subdiagonal (const gsl_matrix_long_double * m, + const size_t k); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_superdiagonal (const gsl_matrix_long_double * m, + const size_t k); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_subrow (const gsl_matrix_long_double * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_long_double_const_view +gsl_matrix_long_double_const_subcolumn (const gsl_matrix_long_double * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_long_double_const_view +gsl_matrix_long_double_const_view_array (const long double * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_double_const_view +gsl_matrix_long_double_const_view_array_with_tda (const long double * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_long_double_const_view +gsl_matrix_long_double_const_view_vector (const gsl_vector_long_double * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_long_double_const_view +gsl_matrix_long_double_const_view_vector_with_tda (const gsl_vector_long_double * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_long_double_set_zero (gsl_matrix_long_double * m); +void gsl_matrix_long_double_set_identity (gsl_matrix_long_double * m); +void gsl_matrix_long_double_set_all (gsl_matrix_long_double * m, long double x); + +int gsl_matrix_long_double_fread (FILE * stream, gsl_matrix_long_double * m) ; +int gsl_matrix_long_double_fwrite (FILE * stream, const gsl_matrix_long_double * m) ; +int gsl_matrix_long_double_fscanf (FILE * stream, gsl_matrix_long_double * m); +int gsl_matrix_long_double_fprintf (FILE * stream, const gsl_matrix_long_double * m, const char * format); + +int gsl_matrix_long_double_memcpy(gsl_matrix_long_double * dest, const gsl_matrix_long_double * src); +int gsl_matrix_long_double_swap(gsl_matrix_long_double * m1, gsl_matrix_long_double * m2); + +int gsl_matrix_long_double_swap_rows(gsl_matrix_long_double * m, const size_t i, const size_t j); +int gsl_matrix_long_double_swap_columns(gsl_matrix_long_double * m, const size_t i, const size_t j); +int gsl_matrix_long_double_swap_rowcol(gsl_matrix_long_double * m, const size_t i, const size_t j); +int gsl_matrix_long_double_transpose (gsl_matrix_long_double * m); +int gsl_matrix_long_double_transpose_memcpy (gsl_matrix_long_double * dest, const gsl_matrix_long_double * src); + +long double gsl_matrix_long_double_max (const gsl_matrix_long_double * m); +long double gsl_matrix_long_double_min (const gsl_matrix_long_double * m); +void gsl_matrix_long_double_minmax (const gsl_matrix_long_double * m, long double * min_out, long double * max_out); + +void gsl_matrix_long_double_max_index (const gsl_matrix_long_double * m, size_t * imax, size_t *jmax); +void gsl_matrix_long_double_min_index (const gsl_matrix_long_double * m, size_t * imin, size_t *jmin); +void gsl_matrix_long_double_minmax_index (const gsl_matrix_long_double * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_long_double_equal (const gsl_matrix_long_double * a, const gsl_matrix_long_double * b); + +int gsl_matrix_long_double_isnull (const gsl_matrix_long_double * m); +int gsl_matrix_long_double_ispos (const gsl_matrix_long_double * m); +int gsl_matrix_long_double_isneg (const gsl_matrix_long_double * m); +int gsl_matrix_long_double_isnonneg (const gsl_matrix_long_double * m); + +int gsl_matrix_long_double_add (gsl_matrix_long_double * a, const gsl_matrix_long_double * b); +int gsl_matrix_long_double_sub (gsl_matrix_long_double * a, const gsl_matrix_long_double * b); +int gsl_matrix_long_double_mul_elements (gsl_matrix_long_double * a, const gsl_matrix_long_double * b); +int gsl_matrix_long_double_div_elements (gsl_matrix_long_double * a, const gsl_matrix_long_double * b); +int gsl_matrix_long_double_scale (gsl_matrix_long_double * a, const double x); +int gsl_matrix_long_double_add_constant (gsl_matrix_long_double * a, const double x); +int gsl_matrix_long_double_add_diagonal (gsl_matrix_long_double * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_long_double_get_row(gsl_vector_long_double * v, const gsl_matrix_long_double * m, const size_t i); +int gsl_matrix_long_double_get_col(gsl_vector_long_double * v, const gsl_matrix_long_double * m, const size_t j); +int gsl_matrix_long_double_set_row(gsl_matrix_long_double * m, const size_t i, const gsl_vector_long_double * v); +int gsl_matrix_long_double_set_col(gsl_matrix_long_double * m, const size_t j, const gsl_vector_long_double * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL long double gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x); +INLINE_DECL long double * gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j); +INLINE_DECL const long double * gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +long double +gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_long_double_set(gsl_matrix_long_double * m, const size_t i, const size_t j, const long double x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +long double * +gsl_matrix_long_double_ptr(gsl_matrix_long_double * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (long double *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const long double * +gsl_matrix_long_double_const_ptr(const gsl_matrix_long_double * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const long double *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_short.h b/software/gsl-1.15/matrix/gsl_matrix_short.h new file mode 100644 index 000000000..53e89e6f3 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_short.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_SHORT_H__ +#define __GSL_MATRIX_SHORT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + short * data; + gsl_block_short * block; + int owner; +} gsl_matrix_short; + +typedef struct +{ + gsl_matrix_short matrix; +} _gsl_matrix_short_view; + +typedef _gsl_matrix_short_view gsl_matrix_short_view; + +typedef struct +{ + gsl_matrix_short matrix; +} _gsl_matrix_short_const_view; + +typedef const _gsl_matrix_short_const_view gsl_matrix_short_const_view; + +/* Allocation */ + +gsl_matrix_short * +gsl_matrix_short_alloc (const size_t n1, const size_t n2); + +gsl_matrix_short * +gsl_matrix_short_calloc (const size_t n1, const size_t n2); + +gsl_matrix_short * +gsl_matrix_short_alloc_from_block (gsl_block_short * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_short * +gsl_matrix_short_alloc_from_matrix (gsl_matrix_short * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_short * +gsl_vector_short_alloc_row_from_matrix (gsl_matrix_short * m, + const size_t i); + +gsl_vector_short * +gsl_vector_short_alloc_col_from_matrix (gsl_matrix_short * m, + const size_t j); + +void gsl_matrix_short_free (gsl_matrix_short * m); + +/* Views */ + +_gsl_matrix_short_view +gsl_matrix_short_submatrix (gsl_matrix_short * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_short_view +gsl_matrix_short_row (gsl_matrix_short * m, const size_t i); + +_gsl_vector_short_view +gsl_matrix_short_column (gsl_matrix_short * m, const size_t j); + +_gsl_vector_short_view +gsl_matrix_short_diagonal (gsl_matrix_short * m); + +_gsl_vector_short_view +gsl_matrix_short_subdiagonal (gsl_matrix_short * m, const size_t k); + +_gsl_vector_short_view +gsl_matrix_short_superdiagonal (gsl_matrix_short * m, const size_t k); + +_gsl_vector_short_view +gsl_matrix_short_subrow (gsl_matrix_short * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_short_view +gsl_matrix_short_subcolumn (gsl_matrix_short * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_short_view +gsl_matrix_short_view_array (short * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_short_view +gsl_matrix_short_view_array_with_tda (short * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_short_view +gsl_matrix_short_view_vector (gsl_vector_short * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_short_view +gsl_matrix_short_view_vector_with_tda (gsl_vector_short * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_short_const_view +gsl_matrix_short_const_submatrix (const gsl_matrix_short * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_short_const_view +gsl_matrix_short_const_row (const gsl_matrix_short * m, + const size_t i); + +_gsl_vector_short_const_view +gsl_matrix_short_const_column (const gsl_matrix_short * m, + const size_t j); + +_gsl_vector_short_const_view +gsl_matrix_short_const_diagonal (const gsl_matrix_short * m); + +_gsl_vector_short_const_view +gsl_matrix_short_const_subdiagonal (const gsl_matrix_short * m, + const size_t k); + +_gsl_vector_short_const_view +gsl_matrix_short_const_superdiagonal (const gsl_matrix_short * m, + const size_t k); + +_gsl_vector_short_const_view +gsl_matrix_short_const_subrow (const gsl_matrix_short * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_short_const_view +gsl_matrix_short_const_subcolumn (const gsl_matrix_short * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_short_const_view +gsl_matrix_short_const_view_array (const short * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_short_const_view +gsl_matrix_short_const_view_array_with_tda (const short * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_short_const_view +gsl_matrix_short_const_view_vector (const gsl_vector_short * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_short_const_view +gsl_matrix_short_const_view_vector_with_tda (const gsl_vector_short * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_short_set_zero (gsl_matrix_short * m); +void gsl_matrix_short_set_identity (gsl_matrix_short * m); +void gsl_matrix_short_set_all (gsl_matrix_short * m, short x); + +int gsl_matrix_short_fread (FILE * stream, gsl_matrix_short * m) ; +int gsl_matrix_short_fwrite (FILE * stream, const gsl_matrix_short * m) ; +int gsl_matrix_short_fscanf (FILE * stream, gsl_matrix_short * m); +int gsl_matrix_short_fprintf (FILE * stream, const gsl_matrix_short * m, const char * format); + +int gsl_matrix_short_memcpy(gsl_matrix_short * dest, const gsl_matrix_short * src); +int gsl_matrix_short_swap(gsl_matrix_short * m1, gsl_matrix_short * m2); + +int gsl_matrix_short_swap_rows(gsl_matrix_short * m, const size_t i, const size_t j); +int gsl_matrix_short_swap_columns(gsl_matrix_short * m, const size_t i, const size_t j); +int gsl_matrix_short_swap_rowcol(gsl_matrix_short * m, const size_t i, const size_t j); +int gsl_matrix_short_transpose (gsl_matrix_short * m); +int gsl_matrix_short_transpose_memcpy (gsl_matrix_short * dest, const gsl_matrix_short * src); + +short gsl_matrix_short_max (const gsl_matrix_short * m); +short gsl_matrix_short_min (const gsl_matrix_short * m); +void gsl_matrix_short_minmax (const gsl_matrix_short * m, short * min_out, short * max_out); + +void gsl_matrix_short_max_index (const gsl_matrix_short * m, size_t * imax, size_t *jmax); +void gsl_matrix_short_min_index (const gsl_matrix_short * m, size_t * imin, size_t *jmin); +void gsl_matrix_short_minmax_index (const gsl_matrix_short * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_short_equal (const gsl_matrix_short * a, const gsl_matrix_short * b); + +int gsl_matrix_short_isnull (const gsl_matrix_short * m); +int gsl_matrix_short_ispos (const gsl_matrix_short * m); +int gsl_matrix_short_isneg (const gsl_matrix_short * m); +int gsl_matrix_short_isnonneg (const gsl_matrix_short * m); + +int gsl_matrix_short_add (gsl_matrix_short * a, const gsl_matrix_short * b); +int gsl_matrix_short_sub (gsl_matrix_short * a, const gsl_matrix_short * b); +int gsl_matrix_short_mul_elements (gsl_matrix_short * a, const gsl_matrix_short * b); +int gsl_matrix_short_div_elements (gsl_matrix_short * a, const gsl_matrix_short * b); +int gsl_matrix_short_scale (gsl_matrix_short * a, const double x); +int gsl_matrix_short_add_constant (gsl_matrix_short * a, const double x); +int gsl_matrix_short_add_diagonal (gsl_matrix_short * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_short_get_row(gsl_vector_short * v, const gsl_matrix_short * m, const size_t i); +int gsl_matrix_short_get_col(gsl_vector_short * v, const gsl_matrix_short * m, const size_t j); +int gsl_matrix_short_set_row(gsl_matrix_short * m, const size_t i, const gsl_vector_short * v); +int gsl_matrix_short_set_col(gsl_matrix_short * m, const size_t j, const gsl_vector_short * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL short gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x); +INLINE_DECL short * gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j); +INLINE_DECL const short * gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +short +gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_short_set(gsl_matrix_short * m, const size_t i, const size_t j, const short x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +short * +gsl_matrix_short_ptr(gsl_matrix_short * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (short *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const short * +gsl_matrix_short_const_ptr(const gsl_matrix_short * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const short *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_SHORT_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_uchar.h b/software/gsl-1.15/matrix/gsl_matrix_uchar.h new file mode 100644 index 000000000..0ab540ff7 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_uchar.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_UCHAR_H__ +#define __GSL_MATRIX_UCHAR_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + unsigned char * data; + gsl_block_uchar * block; + int owner; +} gsl_matrix_uchar; + +typedef struct +{ + gsl_matrix_uchar matrix; +} _gsl_matrix_uchar_view; + +typedef _gsl_matrix_uchar_view gsl_matrix_uchar_view; + +typedef struct +{ + gsl_matrix_uchar matrix; +} _gsl_matrix_uchar_const_view; + +typedef const _gsl_matrix_uchar_const_view gsl_matrix_uchar_const_view; + +/* Allocation */ + +gsl_matrix_uchar * +gsl_matrix_uchar_alloc (const size_t n1, const size_t n2); + +gsl_matrix_uchar * +gsl_matrix_uchar_calloc (const size_t n1, const size_t n2); + +gsl_matrix_uchar * +gsl_matrix_uchar_alloc_from_block (gsl_block_uchar * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_uchar * +gsl_matrix_uchar_alloc_from_matrix (gsl_matrix_uchar * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_uchar * +gsl_vector_uchar_alloc_row_from_matrix (gsl_matrix_uchar * m, + const size_t i); + +gsl_vector_uchar * +gsl_vector_uchar_alloc_col_from_matrix (gsl_matrix_uchar * m, + const size_t j); + +void gsl_matrix_uchar_free (gsl_matrix_uchar * m); + +/* Views */ + +_gsl_matrix_uchar_view +gsl_matrix_uchar_submatrix (gsl_matrix_uchar * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_uchar_view +gsl_matrix_uchar_row (gsl_matrix_uchar * m, const size_t i); + +_gsl_vector_uchar_view +gsl_matrix_uchar_column (gsl_matrix_uchar * m, const size_t j); + +_gsl_vector_uchar_view +gsl_matrix_uchar_diagonal (gsl_matrix_uchar * m); + +_gsl_vector_uchar_view +gsl_matrix_uchar_subdiagonal (gsl_matrix_uchar * m, const size_t k); + +_gsl_vector_uchar_view +gsl_matrix_uchar_superdiagonal (gsl_matrix_uchar * m, const size_t k); + +_gsl_vector_uchar_view +gsl_matrix_uchar_subrow (gsl_matrix_uchar * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_uchar_view +gsl_matrix_uchar_subcolumn (gsl_matrix_uchar * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_uchar_view +gsl_matrix_uchar_view_array (unsigned char * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_uchar_view +gsl_matrix_uchar_view_array_with_tda (unsigned char * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_uchar_view +gsl_matrix_uchar_view_vector (gsl_vector_uchar * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_uchar_view +gsl_matrix_uchar_view_vector_with_tda (gsl_vector_uchar * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_uchar_const_view +gsl_matrix_uchar_const_submatrix (const gsl_matrix_uchar * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_row (const gsl_matrix_uchar * m, + const size_t i); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_column (const gsl_matrix_uchar * m, + const size_t j); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_diagonal (const gsl_matrix_uchar * m); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_subdiagonal (const gsl_matrix_uchar * m, + const size_t k); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_superdiagonal (const gsl_matrix_uchar * m, + const size_t k); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_subrow (const gsl_matrix_uchar * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_uchar_const_view +gsl_matrix_uchar_const_subcolumn (const gsl_matrix_uchar * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_uchar_const_view +gsl_matrix_uchar_const_view_array (const unsigned char * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_uchar_const_view +gsl_matrix_uchar_const_view_array_with_tda (const unsigned char * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_uchar_const_view +gsl_matrix_uchar_const_view_vector (const gsl_vector_uchar * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_uchar_const_view +gsl_matrix_uchar_const_view_vector_with_tda (const gsl_vector_uchar * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_uchar_set_zero (gsl_matrix_uchar * m); +void gsl_matrix_uchar_set_identity (gsl_matrix_uchar * m); +void gsl_matrix_uchar_set_all (gsl_matrix_uchar * m, unsigned char x); + +int gsl_matrix_uchar_fread (FILE * stream, gsl_matrix_uchar * m) ; +int gsl_matrix_uchar_fwrite (FILE * stream, const gsl_matrix_uchar * m) ; +int gsl_matrix_uchar_fscanf (FILE * stream, gsl_matrix_uchar * m); +int gsl_matrix_uchar_fprintf (FILE * stream, const gsl_matrix_uchar * m, const char * format); + +int gsl_matrix_uchar_memcpy(gsl_matrix_uchar * dest, const gsl_matrix_uchar * src); +int gsl_matrix_uchar_swap(gsl_matrix_uchar * m1, gsl_matrix_uchar * m2); + +int gsl_matrix_uchar_swap_rows(gsl_matrix_uchar * m, const size_t i, const size_t j); +int gsl_matrix_uchar_swap_columns(gsl_matrix_uchar * m, const size_t i, const size_t j); +int gsl_matrix_uchar_swap_rowcol(gsl_matrix_uchar * m, const size_t i, const size_t j); +int gsl_matrix_uchar_transpose (gsl_matrix_uchar * m); +int gsl_matrix_uchar_transpose_memcpy (gsl_matrix_uchar * dest, const gsl_matrix_uchar * src); + +unsigned char gsl_matrix_uchar_max (const gsl_matrix_uchar * m); +unsigned char gsl_matrix_uchar_min (const gsl_matrix_uchar * m); +void gsl_matrix_uchar_minmax (const gsl_matrix_uchar * m, unsigned char * min_out, unsigned char * max_out); + +void gsl_matrix_uchar_max_index (const gsl_matrix_uchar * m, size_t * imax, size_t *jmax); +void gsl_matrix_uchar_min_index (const gsl_matrix_uchar * m, size_t * imin, size_t *jmin); +void gsl_matrix_uchar_minmax_index (const gsl_matrix_uchar * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_uchar_equal (const gsl_matrix_uchar * a, const gsl_matrix_uchar * b); + +int gsl_matrix_uchar_isnull (const gsl_matrix_uchar * m); +int gsl_matrix_uchar_ispos (const gsl_matrix_uchar * m); +int gsl_matrix_uchar_isneg (const gsl_matrix_uchar * m); +int gsl_matrix_uchar_isnonneg (const gsl_matrix_uchar * m); + +int gsl_matrix_uchar_add (gsl_matrix_uchar * a, const gsl_matrix_uchar * b); +int gsl_matrix_uchar_sub (gsl_matrix_uchar * a, const gsl_matrix_uchar * b); +int gsl_matrix_uchar_mul_elements (gsl_matrix_uchar * a, const gsl_matrix_uchar * b); +int gsl_matrix_uchar_div_elements (gsl_matrix_uchar * a, const gsl_matrix_uchar * b); +int gsl_matrix_uchar_scale (gsl_matrix_uchar * a, const double x); +int gsl_matrix_uchar_add_constant (gsl_matrix_uchar * a, const double x); +int gsl_matrix_uchar_add_diagonal (gsl_matrix_uchar * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_uchar_get_row(gsl_vector_uchar * v, const gsl_matrix_uchar * m, const size_t i); +int gsl_matrix_uchar_get_col(gsl_vector_uchar * v, const gsl_matrix_uchar * m, const size_t j); +int gsl_matrix_uchar_set_row(gsl_matrix_uchar * m, const size_t i, const gsl_vector_uchar * v); +int gsl_matrix_uchar_set_col(gsl_matrix_uchar * m, const size_t j, const gsl_vector_uchar * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL unsigned char gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x); +INLINE_DECL unsigned char * gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j); +INLINE_DECL const unsigned char * gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +unsigned char +gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_uchar_set(gsl_matrix_uchar * m, const size_t i, const size_t j, const unsigned char x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +unsigned char * +gsl_matrix_uchar_ptr(gsl_matrix_uchar * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (unsigned char *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const unsigned char * +gsl_matrix_uchar_const_ptr(const gsl_matrix_uchar * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const unsigned char *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_UCHAR_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_uint.h b/software/gsl-1.15/matrix/gsl_matrix_uint.h new file mode 100644 index 000000000..abb267022 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_uint.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_UINT_H__ +#define __GSL_MATRIX_UINT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + unsigned int * data; + gsl_block_uint * block; + int owner; +} gsl_matrix_uint; + +typedef struct +{ + gsl_matrix_uint matrix; +} _gsl_matrix_uint_view; + +typedef _gsl_matrix_uint_view gsl_matrix_uint_view; + +typedef struct +{ + gsl_matrix_uint matrix; +} _gsl_matrix_uint_const_view; + +typedef const _gsl_matrix_uint_const_view gsl_matrix_uint_const_view; + +/* Allocation */ + +gsl_matrix_uint * +gsl_matrix_uint_alloc (const size_t n1, const size_t n2); + +gsl_matrix_uint * +gsl_matrix_uint_calloc (const size_t n1, const size_t n2); + +gsl_matrix_uint * +gsl_matrix_uint_alloc_from_block (gsl_block_uint * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_uint * +gsl_matrix_uint_alloc_from_matrix (gsl_matrix_uint * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_uint * +gsl_vector_uint_alloc_row_from_matrix (gsl_matrix_uint * m, + const size_t i); + +gsl_vector_uint * +gsl_vector_uint_alloc_col_from_matrix (gsl_matrix_uint * m, + const size_t j); + +void gsl_matrix_uint_free (gsl_matrix_uint * m); + +/* Views */ + +_gsl_matrix_uint_view +gsl_matrix_uint_submatrix (gsl_matrix_uint * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_uint_view +gsl_matrix_uint_row (gsl_matrix_uint * m, const size_t i); + +_gsl_vector_uint_view +gsl_matrix_uint_column (gsl_matrix_uint * m, const size_t j); + +_gsl_vector_uint_view +gsl_matrix_uint_diagonal (gsl_matrix_uint * m); + +_gsl_vector_uint_view +gsl_matrix_uint_subdiagonal (gsl_matrix_uint * m, const size_t k); + +_gsl_vector_uint_view +gsl_matrix_uint_superdiagonal (gsl_matrix_uint * m, const size_t k); + +_gsl_vector_uint_view +gsl_matrix_uint_subrow (gsl_matrix_uint * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_uint_view +gsl_matrix_uint_subcolumn (gsl_matrix_uint * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_uint_view +gsl_matrix_uint_view_array (unsigned int * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_uint_view +gsl_matrix_uint_view_array_with_tda (unsigned int * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_uint_view +gsl_matrix_uint_view_vector (gsl_vector_uint * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_uint_view +gsl_matrix_uint_view_vector_with_tda (gsl_vector_uint * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_uint_const_view +gsl_matrix_uint_const_submatrix (const gsl_matrix_uint * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_row (const gsl_matrix_uint * m, + const size_t i); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_column (const gsl_matrix_uint * m, + const size_t j); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_diagonal (const gsl_matrix_uint * m); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_subdiagonal (const gsl_matrix_uint * m, + const size_t k); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_superdiagonal (const gsl_matrix_uint * m, + const size_t k); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_subrow (const gsl_matrix_uint * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_uint_const_view +gsl_matrix_uint_const_subcolumn (const gsl_matrix_uint * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_uint_const_view +gsl_matrix_uint_const_view_array (const unsigned int * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_uint_const_view +gsl_matrix_uint_const_view_array_with_tda (const unsigned int * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_uint_const_view +gsl_matrix_uint_const_view_vector (const gsl_vector_uint * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_uint_const_view +gsl_matrix_uint_const_view_vector_with_tda (const gsl_vector_uint * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_uint_set_zero (gsl_matrix_uint * m); +void gsl_matrix_uint_set_identity (gsl_matrix_uint * m); +void gsl_matrix_uint_set_all (gsl_matrix_uint * m, unsigned int x); + +int gsl_matrix_uint_fread (FILE * stream, gsl_matrix_uint * m) ; +int gsl_matrix_uint_fwrite (FILE * stream, const gsl_matrix_uint * m) ; +int gsl_matrix_uint_fscanf (FILE * stream, gsl_matrix_uint * m); +int gsl_matrix_uint_fprintf (FILE * stream, const gsl_matrix_uint * m, const char * format); + +int gsl_matrix_uint_memcpy(gsl_matrix_uint * dest, const gsl_matrix_uint * src); +int gsl_matrix_uint_swap(gsl_matrix_uint * m1, gsl_matrix_uint * m2); + +int gsl_matrix_uint_swap_rows(gsl_matrix_uint * m, const size_t i, const size_t j); +int gsl_matrix_uint_swap_columns(gsl_matrix_uint * m, const size_t i, const size_t j); +int gsl_matrix_uint_swap_rowcol(gsl_matrix_uint * m, const size_t i, const size_t j); +int gsl_matrix_uint_transpose (gsl_matrix_uint * m); +int gsl_matrix_uint_transpose_memcpy (gsl_matrix_uint * dest, const gsl_matrix_uint * src); + +unsigned int gsl_matrix_uint_max (const gsl_matrix_uint * m); +unsigned int gsl_matrix_uint_min (const gsl_matrix_uint * m); +void gsl_matrix_uint_minmax (const gsl_matrix_uint * m, unsigned int * min_out, unsigned int * max_out); + +void gsl_matrix_uint_max_index (const gsl_matrix_uint * m, size_t * imax, size_t *jmax); +void gsl_matrix_uint_min_index (const gsl_matrix_uint * m, size_t * imin, size_t *jmin); +void gsl_matrix_uint_minmax_index (const gsl_matrix_uint * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_uint_equal (const gsl_matrix_uint * a, const gsl_matrix_uint * b); + +int gsl_matrix_uint_isnull (const gsl_matrix_uint * m); +int gsl_matrix_uint_ispos (const gsl_matrix_uint * m); +int gsl_matrix_uint_isneg (const gsl_matrix_uint * m); +int gsl_matrix_uint_isnonneg (const gsl_matrix_uint * m); + +int gsl_matrix_uint_add (gsl_matrix_uint * a, const gsl_matrix_uint * b); +int gsl_matrix_uint_sub (gsl_matrix_uint * a, const gsl_matrix_uint * b); +int gsl_matrix_uint_mul_elements (gsl_matrix_uint * a, const gsl_matrix_uint * b); +int gsl_matrix_uint_div_elements (gsl_matrix_uint * a, const gsl_matrix_uint * b); +int gsl_matrix_uint_scale (gsl_matrix_uint * a, const double x); +int gsl_matrix_uint_add_constant (gsl_matrix_uint * a, const double x); +int gsl_matrix_uint_add_diagonal (gsl_matrix_uint * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_uint_get_row(gsl_vector_uint * v, const gsl_matrix_uint * m, const size_t i); +int gsl_matrix_uint_get_col(gsl_vector_uint * v, const gsl_matrix_uint * m, const size_t j); +int gsl_matrix_uint_set_row(gsl_matrix_uint * m, const size_t i, const gsl_vector_uint * v); +int gsl_matrix_uint_set_col(gsl_matrix_uint * m, const size_t j, const gsl_vector_uint * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL unsigned int gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x); +INLINE_DECL unsigned int * gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j); +INLINE_DECL const unsigned int * gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +unsigned int +gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_uint_set(gsl_matrix_uint * m, const size_t i, const size_t j, const unsigned int x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +unsigned int * +gsl_matrix_uint_ptr(gsl_matrix_uint * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (unsigned int *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const unsigned int * +gsl_matrix_uint_const_ptr(const gsl_matrix_uint * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const unsigned int *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_UINT_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_ulong.h b/software/gsl-1.15/matrix/gsl_matrix_ulong.h new file mode 100644 index 000000000..2424068f5 --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_ulong.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_ULONG_H__ +#define __GSL_MATRIX_ULONG_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + unsigned long * data; + gsl_block_ulong * block; + int owner; +} gsl_matrix_ulong; + +typedef struct +{ + gsl_matrix_ulong matrix; +} _gsl_matrix_ulong_view; + +typedef _gsl_matrix_ulong_view gsl_matrix_ulong_view; + +typedef struct +{ + gsl_matrix_ulong matrix; +} _gsl_matrix_ulong_const_view; + +typedef const _gsl_matrix_ulong_const_view gsl_matrix_ulong_const_view; + +/* Allocation */ + +gsl_matrix_ulong * +gsl_matrix_ulong_alloc (const size_t n1, const size_t n2); + +gsl_matrix_ulong * +gsl_matrix_ulong_calloc (const size_t n1, const size_t n2); + +gsl_matrix_ulong * +gsl_matrix_ulong_alloc_from_block (gsl_block_ulong * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_ulong * +gsl_matrix_ulong_alloc_from_matrix (gsl_matrix_ulong * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_ulong * +gsl_vector_ulong_alloc_row_from_matrix (gsl_matrix_ulong * m, + const size_t i); + +gsl_vector_ulong * +gsl_vector_ulong_alloc_col_from_matrix (gsl_matrix_ulong * m, + const size_t j); + +void gsl_matrix_ulong_free (gsl_matrix_ulong * m); + +/* Views */ + +_gsl_matrix_ulong_view +gsl_matrix_ulong_submatrix (gsl_matrix_ulong * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_ulong_view +gsl_matrix_ulong_row (gsl_matrix_ulong * m, const size_t i); + +_gsl_vector_ulong_view +gsl_matrix_ulong_column (gsl_matrix_ulong * m, const size_t j); + +_gsl_vector_ulong_view +gsl_matrix_ulong_diagonal (gsl_matrix_ulong * m); + +_gsl_vector_ulong_view +gsl_matrix_ulong_subdiagonal (gsl_matrix_ulong * m, const size_t k); + +_gsl_vector_ulong_view +gsl_matrix_ulong_superdiagonal (gsl_matrix_ulong * m, const size_t k); + +_gsl_vector_ulong_view +gsl_matrix_ulong_subrow (gsl_matrix_ulong * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_ulong_view +gsl_matrix_ulong_subcolumn (gsl_matrix_ulong * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_ulong_view +gsl_matrix_ulong_view_array (unsigned long * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_ulong_view +gsl_matrix_ulong_view_array_with_tda (unsigned long * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_ulong_view +gsl_matrix_ulong_view_vector (gsl_vector_ulong * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_ulong_view +gsl_matrix_ulong_view_vector_with_tda (gsl_vector_ulong * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_ulong_const_view +gsl_matrix_ulong_const_submatrix (const gsl_matrix_ulong * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_row (const gsl_matrix_ulong * m, + const size_t i); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_column (const gsl_matrix_ulong * m, + const size_t j); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_diagonal (const gsl_matrix_ulong * m); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_subdiagonal (const gsl_matrix_ulong * m, + const size_t k); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_superdiagonal (const gsl_matrix_ulong * m, + const size_t k); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_subrow (const gsl_matrix_ulong * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_ulong_const_view +gsl_matrix_ulong_const_subcolumn (const gsl_matrix_ulong * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_ulong_const_view +gsl_matrix_ulong_const_view_array (const unsigned long * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_ulong_const_view +gsl_matrix_ulong_const_view_array_with_tda (const unsigned long * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_ulong_const_view +gsl_matrix_ulong_const_view_vector (const gsl_vector_ulong * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_ulong_const_view +gsl_matrix_ulong_const_view_vector_with_tda (const gsl_vector_ulong * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_ulong_set_zero (gsl_matrix_ulong * m); +void gsl_matrix_ulong_set_identity (gsl_matrix_ulong * m); +void gsl_matrix_ulong_set_all (gsl_matrix_ulong * m, unsigned long x); + +int gsl_matrix_ulong_fread (FILE * stream, gsl_matrix_ulong * m) ; +int gsl_matrix_ulong_fwrite (FILE * stream, const gsl_matrix_ulong * m) ; +int gsl_matrix_ulong_fscanf (FILE * stream, gsl_matrix_ulong * m); +int gsl_matrix_ulong_fprintf (FILE * stream, const gsl_matrix_ulong * m, const char * format); + +int gsl_matrix_ulong_memcpy(gsl_matrix_ulong * dest, const gsl_matrix_ulong * src); +int gsl_matrix_ulong_swap(gsl_matrix_ulong * m1, gsl_matrix_ulong * m2); + +int gsl_matrix_ulong_swap_rows(gsl_matrix_ulong * m, const size_t i, const size_t j); +int gsl_matrix_ulong_swap_columns(gsl_matrix_ulong * m, const size_t i, const size_t j); +int gsl_matrix_ulong_swap_rowcol(gsl_matrix_ulong * m, const size_t i, const size_t j); +int gsl_matrix_ulong_transpose (gsl_matrix_ulong * m); +int gsl_matrix_ulong_transpose_memcpy (gsl_matrix_ulong * dest, const gsl_matrix_ulong * src); + +unsigned long gsl_matrix_ulong_max (const gsl_matrix_ulong * m); +unsigned long gsl_matrix_ulong_min (const gsl_matrix_ulong * m); +void gsl_matrix_ulong_minmax (const gsl_matrix_ulong * m, unsigned long * min_out, unsigned long * max_out); + +void gsl_matrix_ulong_max_index (const gsl_matrix_ulong * m, size_t * imax, size_t *jmax); +void gsl_matrix_ulong_min_index (const gsl_matrix_ulong * m, size_t * imin, size_t *jmin); +void gsl_matrix_ulong_minmax_index (const gsl_matrix_ulong * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_ulong_equal (const gsl_matrix_ulong * a, const gsl_matrix_ulong * b); + +int gsl_matrix_ulong_isnull (const gsl_matrix_ulong * m); +int gsl_matrix_ulong_ispos (const gsl_matrix_ulong * m); +int gsl_matrix_ulong_isneg (const gsl_matrix_ulong * m); +int gsl_matrix_ulong_isnonneg (const gsl_matrix_ulong * m); + +int gsl_matrix_ulong_add (gsl_matrix_ulong * a, const gsl_matrix_ulong * b); +int gsl_matrix_ulong_sub (gsl_matrix_ulong * a, const gsl_matrix_ulong * b); +int gsl_matrix_ulong_mul_elements (gsl_matrix_ulong * a, const gsl_matrix_ulong * b); +int gsl_matrix_ulong_div_elements (gsl_matrix_ulong * a, const gsl_matrix_ulong * b); +int gsl_matrix_ulong_scale (gsl_matrix_ulong * a, const double x); +int gsl_matrix_ulong_add_constant (gsl_matrix_ulong * a, const double x); +int gsl_matrix_ulong_add_diagonal (gsl_matrix_ulong * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_ulong_get_row(gsl_vector_ulong * v, const gsl_matrix_ulong * m, const size_t i); +int gsl_matrix_ulong_get_col(gsl_vector_ulong * v, const gsl_matrix_ulong * m, const size_t j); +int gsl_matrix_ulong_set_row(gsl_matrix_ulong * m, const size_t i, const gsl_vector_ulong * v); +int gsl_matrix_ulong_set_col(gsl_matrix_ulong * m, const size_t j, const gsl_vector_ulong * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x); +INLINE_DECL unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j); +INLINE_DECL const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +unsigned long +gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +unsigned long * +gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (unsigned long *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const unsigned long * +gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const unsigned long *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_ULONG_H__ */ diff --git a/software/gsl-1.15/matrix/gsl_matrix_ushort.h b/software/gsl-1.15/matrix/gsl_matrix_ushort.h new file mode 100644 index 000000000..422b3948b --- /dev/null +++ b/software/gsl-1.15/matrix/gsl_matrix_ushort.h @@ -0,0 +1,350 @@ +/* matrix/gsl_matrix_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MATRIX_USHORT_H__ +#define __GSL_MATRIX_USHORT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size1; + size_t size2; + size_t tda; + unsigned short * data; + gsl_block_ushort * block; + int owner; +} gsl_matrix_ushort; + +typedef struct +{ + gsl_matrix_ushort matrix; +} _gsl_matrix_ushort_view; + +typedef _gsl_matrix_ushort_view gsl_matrix_ushort_view; + +typedef struct +{ + gsl_matrix_ushort matrix; +} _gsl_matrix_ushort_const_view; + +typedef const _gsl_matrix_ushort_const_view gsl_matrix_ushort_const_view; + +/* Allocation */ + +gsl_matrix_ushort * +gsl_matrix_ushort_alloc (const size_t n1, const size_t n2); + +gsl_matrix_ushort * +gsl_matrix_ushort_calloc (const size_t n1, const size_t n2); + +gsl_matrix_ushort * +gsl_matrix_ushort_alloc_from_block (gsl_block_ushort * b, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2); + +gsl_matrix_ushort * +gsl_matrix_ushort_alloc_from_matrix (gsl_matrix_ushort * m, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2); + +gsl_vector_ushort * +gsl_vector_ushort_alloc_row_from_matrix (gsl_matrix_ushort * m, + const size_t i); + +gsl_vector_ushort * +gsl_vector_ushort_alloc_col_from_matrix (gsl_matrix_ushort * m, + const size_t j); + +void gsl_matrix_ushort_free (gsl_matrix_ushort * m); + +/* Views */ + +_gsl_matrix_ushort_view +gsl_matrix_ushort_submatrix (gsl_matrix_ushort * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_ushort_view +gsl_matrix_ushort_row (gsl_matrix_ushort * m, const size_t i); + +_gsl_vector_ushort_view +gsl_matrix_ushort_column (gsl_matrix_ushort * m, const size_t j); + +_gsl_vector_ushort_view +gsl_matrix_ushort_diagonal (gsl_matrix_ushort * m); + +_gsl_vector_ushort_view +gsl_matrix_ushort_subdiagonal (gsl_matrix_ushort * m, const size_t k); + +_gsl_vector_ushort_view +gsl_matrix_ushort_superdiagonal (gsl_matrix_ushort * m, const size_t k); + +_gsl_vector_ushort_view +gsl_matrix_ushort_subrow (gsl_matrix_ushort * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_ushort_view +gsl_matrix_ushort_subcolumn (gsl_matrix_ushort * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_ushort_view +gsl_matrix_ushort_view_array (unsigned short * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_ushort_view +gsl_matrix_ushort_view_array_with_tda (unsigned short * base, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_ushort_view +gsl_matrix_ushort_view_vector (gsl_vector_ushort * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_ushort_view +gsl_matrix_ushort_view_vector_with_tda (gsl_vector_ushort * v, + const size_t n1, + const size_t n2, + const size_t tda); + + +_gsl_matrix_ushort_const_view +gsl_matrix_ushort_const_submatrix (const gsl_matrix_ushort * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_row (const gsl_matrix_ushort * m, + const size_t i); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_column (const gsl_matrix_ushort * m, + const size_t j); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_diagonal (const gsl_matrix_ushort * m); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_subdiagonal (const gsl_matrix_ushort * m, + const size_t k); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_superdiagonal (const gsl_matrix_ushort * m, + const size_t k); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_subrow (const gsl_matrix_ushort * m, const size_t i, + const size_t offset, const size_t n); + +_gsl_vector_ushort_const_view +gsl_matrix_ushort_const_subcolumn (const gsl_matrix_ushort * m, const size_t j, + const size_t offset, const size_t n); + +_gsl_matrix_ushort_const_view +gsl_matrix_ushort_const_view_array (const unsigned short * base, + const size_t n1, + const size_t n2); + +_gsl_matrix_ushort_const_view +gsl_matrix_ushort_const_view_array_with_tda (const unsigned short * base, + const size_t n1, + const size_t n2, + const size_t tda); + +_gsl_matrix_ushort_const_view +gsl_matrix_ushort_const_view_vector (const gsl_vector_ushort * v, + const size_t n1, + const size_t n2); + +_gsl_matrix_ushort_const_view +gsl_matrix_ushort_const_view_vector_with_tda (const gsl_vector_ushort * v, + const size_t n1, + const size_t n2, + const size_t tda); + +/* Operations */ + +void gsl_matrix_ushort_set_zero (gsl_matrix_ushort * m); +void gsl_matrix_ushort_set_identity (gsl_matrix_ushort * m); +void gsl_matrix_ushort_set_all (gsl_matrix_ushort * m, unsigned short x); + +int gsl_matrix_ushort_fread (FILE * stream, gsl_matrix_ushort * m) ; +int gsl_matrix_ushort_fwrite (FILE * stream, const gsl_matrix_ushort * m) ; +int gsl_matrix_ushort_fscanf (FILE * stream, gsl_matrix_ushort * m); +int gsl_matrix_ushort_fprintf (FILE * stream, const gsl_matrix_ushort * m, const char * format); + +int gsl_matrix_ushort_memcpy(gsl_matrix_ushort * dest, const gsl_matrix_ushort * src); +int gsl_matrix_ushort_swap(gsl_matrix_ushort * m1, gsl_matrix_ushort * m2); + +int gsl_matrix_ushort_swap_rows(gsl_matrix_ushort * m, const size_t i, const size_t j); +int gsl_matrix_ushort_swap_columns(gsl_matrix_ushort * m, const size_t i, const size_t j); +int gsl_matrix_ushort_swap_rowcol(gsl_matrix_ushort * m, const size_t i, const size_t j); +int gsl_matrix_ushort_transpose (gsl_matrix_ushort * m); +int gsl_matrix_ushort_transpose_memcpy (gsl_matrix_ushort * dest, const gsl_matrix_ushort * src); + +unsigned short gsl_matrix_ushort_max (const gsl_matrix_ushort * m); +unsigned short gsl_matrix_ushort_min (const gsl_matrix_ushort * m); +void gsl_matrix_ushort_minmax (const gsl_matrix_ushort * m, unsigned short * min_out, unsigned short * max_out); + +void gsl_matrix_ushort_max_index (const gsl_matrix_ushort * m, size_t * imax, size_t *jmax); +void gsl_matrix_ushort_min_index (const gsl_matrix_ushort * m, size_t * imin, size_t *jmin); +void gsl_matrix_ushort_minmax_index (const gsl_matrix_ushort * m, size_t * imin, size_t * jmin, size_t * imax, size_t * jmax); + +int gsl_matrix_ushort_equal (const gsl_matrix_ushort * a, const gsl_matrix_ushort * b); + +int gsl_matrix_ushort_isnull (const gsl_matrix_ushort * m); +int gsl_matrix_ushort_ispos (const gsl_matrix_ushort * m); +int gsl_matrix_ushort_isneg (const gsl_matrix_ushort * m); +int gsl_matrix_ushort_isnonneg (const gsl_matrix_ushort * m); + +int gsl_matrix_ushort_add (gsl_matrix_ushort * a, const gsl_matrix_ushort * b); +int gsl_matrix_ushort_sub (gsl_matrix_ushort * a, const gsl_matrix_ushort * b); +int gsl_matrix_ushort_mul_elements (gsl_matrix_ushort * a, const gsl_matrix_ushort * b); +int gsl_matrix_ushort_div_elements (gsl_matrix_ushort * a, const gsl_matrix_ushort * b); +int gsl_matrix_ushort_scale (gsl_matrix_ushort * a, const double x); +int gsl_matrix_ushort_add_constant (gsl_matrix_ushort * a, const double x); +int gsl_matrix_ushort_add_diagonal (gsl_matrix_ushort * a, const double x); + +/***********************************************************************/ +/* The functions below are obsolete */ +/***********************************************************************/ +int gsl_matrix_ushort_get_row(gsl_vector_ushort * v, const gsl_matrix_ushort * m, const size_t i); +int gsl_matrix_ushort_get_col(gsl_vector_ushort * v, const gsl_matrix_ushort * m, const size_t j); +int gsl_matrix_ushort_set_row(gsl_matrix_ushort * m, const size_t i, const gsl_vector_ushort * v); +int gsl_matrix_ushort_set_col(gsl_matrix_ushort * m, const size_t j, const gsl_vector_ushort * v); +/***********************************************************************/ + +/* inline functions if you are using GCC */ + +INLINE_DECL unsigned short gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j); +INLINE_DECL void gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x); +INLINE_DECL unsigned short * gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j); +INLINE_DECL const unsigned short * gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j); + +#ifdef HAVE_INLINE +INLINE_FUN +unsigned short +gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ; + } + } +#endif + return m->data[i * m->tda + j] ; +} + +INLINE_FUN +void +gsl_matrix_ushort_set(gsl_matrix_ushort * m, const size_t i, const size_t j, const unsigned short x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ; + } + } +#endif + m->data[i * m->tda + j] = x ; +} + +INLINE_FUN +unsigned short * +gsl_matrix_ushort_ptr(gsl_matrix_ushort * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (unsigned short *) (m->data + (i * m->tda + j)) ; +} + +INLINE_FUN +const unsigned short * +gsl_matrix_ushort_const_ptr(const gsl_matrix_ushort * m, const size_t i, const size_t j) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(1)) + { + if (i >= m->size1) + { + GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ; + } + else if (j >= m->size2) + { + GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ; + } + } +#endif + return (const unsigned short *) (m->data + (i * m->tda + j)) ; +} + +#endif + +__END_DECLS + +#endif /* __GSL_MATRIX_USHORT_H__ */ diff --git a/software/gsl-1.15/matrix/init.c b/software/gsl-1.15/matrix/init.c new file mode 100644 index 000000000..1f137af03 --- /dev/null +++ b/software/gsl-1.15/matrix/init.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/init_source.c b/software/gsl-1.15/matrix/init_source.c new file mode 100644 index 000000000..bf782ba70 --- /dev/null +++ b/software/gsl-1.15/matrix/init_source.c @@ -0,0 +1,252 @@ +/* matrix/init_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE (gsl_matrix) * +FUNCTION (gsl_matrix, alloc) (const size_t n1, const size_t n2) +{ + TYPE (gsl_block) * block; + TYPE (gsl_matrix) * m; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, 0); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, 0); + } + + m = (TYPE (gsl_matrix) *) malloc (sizeof (TYPE (gsl_matrix))); + + if (m == 0) + { + GSL_ERROR_VAL ("failed to allocate space for matrix struct", + GSL_ENOMEM, 0); + } + + /* FIXME: n1*n2 could overflow for large dimensions */ + + block = FUNCTION(gsl_block, alloc) (n1 * n2) ; + + if (block == 0) + { + GSL_ERROR_VAL ("failed to allocate space for block", + GSL_ENOMEM, 0); + } + + m->data = block->data; + m->size1 = n1; + m->size2 = n2; + m->tda = n2; + m->block = block; + m->owner = 1; + + return m; +} + +TYPE (gsl_matrix) * +FUNCTION (gsl_matrix, calloc) (const size_t n1, const size_t n2) +{ + size_t i; + + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (n1, n2); + + if (m == 0) + return 0; + + /* initialize matrix to zero */ + + for (i = 0; i < MULTIPLICITY * n1 * n2; i++) + { + m->data[i] = 0; + } + + return m; +} + +TYPE (gsl_matrix) * +FUNCTION (gsl_matrix, alloc_from_block) (TYPE(gsl_block) * block, + const size_t offset, + const size_t n1, + const size_t n2, + const size_t d2) +{ + TYPE (gsl_matrix) * m; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, 0); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, 0); + } + else if (d2 < n2) + { + GSL_ERROR_VAL ("matrix dimension d2 must be greater than n2", + GSL_EINVAL, 0); + } + else if (block->size < offset + n1 * d2) + { + GSL_ERROR_VAL ("matrix size exceeds available block size", + GSL_EINVAL, 0); + } + + m = (TYPE (gsl_matrix) *) malloc (sizeof (TYPE (gsl_matrix))); + + if (m == 0) + { + GSL_ERROR_VAL ("failed to allocate space for matrix struct", + GSL_ENOMEM, 0); + } + + m->data = block->data + MULTIPLICITY * offset; + m->size1 = n1; + m->size2 = n2; + m->tda = d2; + m->block = block; + m->owner = 0; + + return m; +} + + +TYPE (gsl_matrix) * +FUNCTION (gsl_matrix, alloc_from_matrix) (TYPE(gsl_matrix) * mm, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2) +{ + TYPE (gsl_matrix) * m; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, 0); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, 0); + } + else if (k1 + n1 > mm->size1) + { + GSL_ERROR_VAL ("submatrix dimension 1 exceeds size of original", + GSL_EINVAL, 0); + } + else if (k2 + n2 > mm->size2) + { + GSL_ERROR_VAL ("submatrix dimension 2 exceeds size of original", + GSL_EINVAL, 0); + } + + m = (TYPE (gsl_matrix) *) malloc (sizeof (TYPE (gsl_matrix))); + + if (m == 0) + { + GSL_ERROR_VAL ("failed to allocate space for matrix struct", + GSL_ENOMEM, 0); + } + + m->data = mm->data + k1 * mm->tda + k2 ; + m->size1 = n1; + m->size2 = n2; + m->tda = mm->tda; + m->block = mm->block; + m->owner = 0; + + return m; +} + +void +FUNCTION (gsl_matrix, free) (TYPE (gsl_matrix) * m) +{ + RETURN_IF_NULL (m); + + if (m->owner) + { + FUNCTION(gsl_block, free) (m->block); + } + + free (m); +} +void +FUNCTION (gsl_matrix, set_identity) (TYPE (gsl_matrix) * m) +{ + size_t i, j; + ATOMIC * const data = m->data; + const size_t p = m->size1 ; + const size_t q = m->size2 ; + const size_t tda = m->tda ; + + const BASE zero = ZERO; + const BASE one = ONE; + + for (i = 0; i < p; i++) + { + for (j = 0; j < q; j++) + { + *(BASE *) (data + MULTIPLICITY * (i * tda + j)) = ((i == j) ? one : zero); + } + } +} + +void +FUNCTION (gsl_matrix, set_zero) (TYPE (gsl_matrix) * m) +{ + size_t i, j; + ATOMIC * const data = m->data; + const size_t p = m->size1 ; + const size_t q = m->size2 ; + const size_t tda = m->tda ; + + const BASE zero = ZERO; + + for (i = 0; i < p; i++) + { + for (j = 0; j < q; j++) + { + *(BASE *) (data + MULTIPLICITY * (i * tda + j)) = zero; + } + } +} + +void +FUNCTION (gsl_matrix, set_all) (TYPE (gsl_matrix) * m, BASE x) +{ + size_t i, j; + ATOMIC * const data = m->data; + const size_t p = m->size1 ; + const size_t q = m->size2 ; + const size_t tda = m->tda ; + + for (i = 0; i < p; i++) + { + for (j = 0; j < q; j++) + { + *(BASE *) (data + MULTIPLICITY * (i * tda + j)) = x; + } + } +} + diff --git a/software/gsl-1.15/matrix/matrix.c b/software/gsl-1.15/matrix/matrix.c new file mode 100644 index 000000000..fe595fa18 --- /dev/null +++ b/software/gsl-1.15/matrix/matrix.c @@ -0,0 +1,10 @@ +#include +#include +#include + +/* Compile all the inline matrix functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + diff --git a/software/gsl-1.15/matrix/minmax.c b/software/gsl-1.15/matrix/minmax.c new file mode 100644 index 000000000..2a092d4a3 --- /dev/null +++ b/software/gsl-1.15/matrix/minmax.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/matrix/minmax_source.c b/software/gsl-1.15/matrix/minmax_source.c new file mode 100644 index 000000000..5b2a2fd95 --- /dev/null +++ b/software/gsl-1.15/matrix/minmax_source.c @@ -0,0 +1,254 @@ +/* matrix/minmax_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +BASE +FUNCTION (gsl_matrix, max) (const TYPE (gsl_matrix) * m) +{ + /* finds the largest element of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + BASE max = m->data[0 * tda + 0]; + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x > max) + max = x; +#ifdef FP + if (isnan (x)) + return x; +#endif + } + } + + return max; +} + +BASE +FUNCTION (gsl_matrix, min) (const TYPE (gsl_matrix) * m) +{ + /* finds the smallest element of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + BASE min = m->data[0 * tda + 0]; + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x < min) + min = x; +#ifdef FP + if (isnan (x)) + return x; +#endif + } + } + + return min; +} + + +void +FUNCTION (gsl_matrix, minmax) (const TYPE (gsl_matrix) * m, + BASE * min_out, + BASE * max_out) +{ + /* finds the smallest and largest elements of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + BASE max = m->data[0 * tda + 0]; + BASE min = m->data[0 * tda + 0]; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x < min) + { + min = x; + } + if (x > max) + { + max = x; + } +#ifdef FP + if (isnan (x)) + { + *min_out = x; + *max_out = x; + return; + } +#endif + } + } + + *min_out = min; + *max_out = max; +} + +void +FUNCTION (gsl_matrix, max_index) (const TYPE (gsl_matrix) * m, size_t * imax_out, size_t *jmax_out) +{ + /* finds the largest element of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + BASE max = m->data[0 * tda + 0]; + size_t imax = 0, jmax = 0; + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x > max) + { + max = x; + imax = i; + jmax = j; + } +#ifdef FP + if (isnan (x)) + { + *imax_out = i; + *jmax_out = j; + return; + } +#endif + } + } + + *imax_out = imax; + *jmax_out = jmax; +} + +void +FUNCTION (gsl_matrix, min_index) (const TYPE (gsl_matrix) * m, size_t * imin_out, size_t *jmin_out) +{ + /* finds the largest element of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + BASE min = m->data[0 * tda + 0]; + size_t imin = 0, jmin = 0; + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x < min) + { + min = x; + imin = i; + jmin = j; + } +#ifdef FP + if (isnan (x)) + { + *imin_out = i; + *jmin_out = j; + return; + } +#endif + } + } + + *imin_out = imin; + *jmin_out = jmin; +} + +void +FUNCTION (gsl_matrix, minmax_index) (const TYPE (gsl_matrix) * m, + size_t * imin_out, + size_t * jmin_out, + size_t * imax_out, + size_t * jmax_out) +{ + /* finds the smallest and largest elements of a matrix */ + + const size_t M = m->size1; + const size_t N = m->size2; + const size_t tda = m->tda; + + size_t imin = 0, jmin = 0, imax = 0, jmax = 0; + BASE max = m->data[0 * tda + 0]; + BASE min = m->data[0 * tda + 0]; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = m->data[i * tda + j]; + if (x < min) + { + min = x; + imin = i; + jmin = j; + } + if (x > max) + { + max = x; + imax = i; + jmax = j; + } +#ifdef FP + if (isnan (x)) + { + *imin_out = i; + *jmin_out = j; + *imax_out = i; + *jmax_out = j; + return; + } +#endif + } + } + + *imin_out = imin; + *jmin_out = jmin; + *imax_out = imax; + *jmax_out = jmax; +} diff --git a/software/gsl-1.15/matrix/oper.c b/software/gsl-1.15/matrix/oper.c new file mode 100644 index 000000000..996efad82 --- /dev/null +++ b/software/gsl-1.15/matrix/oper.c @@ -0,0 +1,91 @@ +#include +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/matrix/oper_complex_source.c b/software/gsl-1.15/matrix/oper_complex_source.c new file mode 100644 index 000000000..5d2c5c519 --- /dev/null +++ b/software/gsl-1.15/matrix/oper_complex_source.c @@ -0,0 +1,236 @@ +/* matrix/oper_complex_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_matrix, add) (TYPE (gsl_matrix) * a, + const TYPE (gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + const size_t aij = 2 * (i * tda_a + j); + const size_t bij = 2 * (i * tda_b + j); + + a->data[aij] += b->data[bij]; + a->data[aij + 1] += b->data[bij + 1]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION (gsl_matrix, sub) (TYPE (gsl_matrix) * a, + const TYPE (gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + const size_t aij = 2 * (i * tda_a + j); + const size_t bij = 2 * (i * tda_b + j); + + a->data[aij] -= b->data[bij]; + a->data[aij + 1] -= b->data[bij + 1]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION (gsl_matrix, mul_elements) (TYPE (gsl_matrix) * a, + const TYPE (gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + const size_t aij = 2 * (i * tda_a + j); + const size_t bij = 2 * (i * tda_b + j); + + ATOMIC ar = a->data[aij]; + ATOMIC ai = a->data[aij + 1]; + + ATOMIC br = b->data[bij]; + ATOMIC bi = b->data[bij + 1]; + + a->data[aij] = ar * br - ai * bi; + a->data[aij + 1] = ar * bi + ai * br; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION (gsl_matrix, div_elements) (TYPE (gsl_matrix) * a, + const TYPE (gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + const size_t aij = 2 * (i * tda_a + j); + const size_t bij = 2 * (i * tda_b + j); + + ATOMIC ar = a->data[aij]; + ATOMIC ai = a->data[aij + 1]; + + ATOMIC br = b->data[bij]; + ATOMIC bi = b->data[bij + 1]; + + ATOMIC s = 1.0 / hypot(br, bi); + + ATOMIC sbr = s * br; + ATOMIC sbi = s * bi; + + a->data[aij] = (ar * sbr + ai * sbi) * s; + a->data[aij + 1] = (ai * sbr - ar * sbi) * s; + } + } + + return GSL_SUCCESS; + } +} + +int FUNCTION (gsl_matrix, scale) (TYPE (gsl_matrix) * a, const BASE x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + + size_t i, j; + + ATOMIC xr = GSL_REAL(x); + ATOMIC xi = GSL_IMAG(x); + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + const size_t aij = 2 * (i * tda + j); + + ATOMIC ar = a->data[aij]; + ATOMIC ai = a->data[aij + 1]; + + a->data[aij] = ar * xr - ai * xi; + a->data[aij + 1] = ar * xi + ai * xr; + } + } + + return GSL_SUCCESS; +} + +int FUNCTION (gsl_matrix, add_constant) (TYPE (gsl_matrix) * a, const BASE x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[2 * (i * tda + j)] += GSL_REAL (x); + a->data[2 * (i * tda + j) + 1] += GSL_IMAG (x); + } + } + + return GSL_SUCCESS; +} + + +int FUNCTION (gsl_matrix, add_diagonal) (TYPE (gsl_matrix) * a, const BASE x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + const size_t loop_lim = (M < N ? M : N); + size_t i; + for (i = 0; i < loop_lim; i++) + { + a->data[2 * (i * tda + i)] += GSL_REAL (x); + a->data[2 * (i * tda + i) + 1] += GSL_IMAG (x); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/matrix/oper_source.c b/software/gsl-1.15/matrix/oper_source.c new file mode 100644 index 000000000..3560c17ff --- /dev/null +++ b/software/gsl-1.15/matrix/oper_source.c @@ -0,0 +1,191 @@ +/* matrix/oper_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_matrix, add) (TYPE(gsl_matrix) * a, const TYPE(gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda_a + j] += b->data[i * tda_b + j]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_matrix, sub) (TYPE(gsl_matrix) * a, const TYPE(gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda_a + j] -= b->data[i * tda_b + j]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_matrix, mul_elements) (TYPE(gsl_matrix) * a, const TYPE(gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda_a + j] *= b->data[i * tda_b + j]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_matrix, div_elements) (TYPE(gsl_matrix) * a, const TYPE(gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR ("matrices must have same dimensions", GSL_EBADLEN); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda_a + j] /= b->data[i * tda_b + j]; + } + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_matrix, scale) (TYPE(gsl_matrix) * a, const double x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda + j] *= x; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION(gsl_matrix, add_constant) (TYPE(gsl_matrix) * a, const double x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + + size_t i, j; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + a->data[i * tda + j] += x; + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION(gsl_matrix, add_diagonal) (TYPE(gsl_matrix) * a, const double x) +{ + const size_t M = a->size1; + const size_t N = a->size2; + const size_t tda = a->tda; + const size_t loop_lim = ( M < N ? M : N ); + size_t i; + for (i = 0; i < loop_lim; i++) + { + a->data[i * tda + i] += x; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/matrix/prop.c b/software/gsl-1.15/matrix/prop.c new file mode 100644 index 000000000..b151e8de8 --- /dev/null +++ b/software/gsl-1.15/matrix/prop.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/prop_source.c b/software/gsl-1.15/matrix/prop_source.c new file mode 100644 index 000000000..eec2ecf0f --- /dev/null +++ b/software/gsl-1.15/matrix/prop_source.c @@ -0,0 +1,161 @@ +/* matrix/prop_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_matrix, equal) (const TYPE (gsl_matrix) * a, const TYPE (gsl_matrix) * b) +{ + const size_t M = a->size1; + const size_t N = a->size2; + + if (b->size1 != M || b->size2 != N) + { + GSL_ERROR_VAL ("matrices must have same dimensions", GSL_EBADLEN, 0); + } + else + { + const size_t tda_a = a->tda; + const size_t tda_b = b->tda; + + size_t i, j, k; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + if (a->data[(i * tda_a + j) * MULTIPLICITY + k] + != b->data[(i * tda_b + j) * MULTIPLICITY + k]) + { + return 0; + } + } + } + } + } + return 1; +} + + +int +FUNCTION (gsl_matrix, isnull) (const TYPE (gsl_matrix) * m) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + const size_t tda = m->tda ; + + size_t i, j, k; + + for (i = 0; i < size1 ; i++) + { + for (j = 0; j < size2; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + if (m->data[(i * tda + j) * MULTIPLICITY + k] != 0.0) + { + return 0; + } + } + } + } + + return 1; +} + + +int +FUNCTION (gsl_matrix, ispos) (const TYPE (gsl_matrix) * m) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + const size_t tda = m->tda ; + + size_t i, j, k; + + for (i = 0; i < size1 ; i++) + { + for (j = 0; j < size2; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + if (m->data[(i * tda + j) * MULTIPLICITY + k] <= 0.0) + { + return 0; + } + } + } + } + + return 1; +} + + +int +FUNCTION (gsl_matrix, isneg) (const TYPE (gsl_matrix) * m) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + const size_t tda = m->tda ; + + size_t i, j, k; + + for (i = 0; i < size1 ; i++) + { + for (j = 0; j < size2; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + if (m->data[(i * tda + j) * MULTIPLICITY + k] >= 0.0) + { + return 0; + } + } + } + } + + return 1; +} + + +int +FUNCTION (gsl_matrix, isnonneg) (const TYPE (gsl_matrix) * m) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + const size_t tda = m->tda ; + + size_t i, j, k; + + for (i = 0; i < size1 ; i++) + { + for (j = 0; j < size2; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + if (m->data[(i * tda + j) * MULTIPLICITY + k] < 0.0) + { + return 0; + } + } + } + } + + return 1; +} diff --git a/software/gsl-1.15/matrix/rowcol.c b/software/gsl-1.15/matrix/rowcol.c new file mode 100644 index 000000000..39a36f5a1 --- /dev/null +++ b/software/gsl-1.15/matrix/rowcol.c @@ -0,0 +1,178 @@ +#include +#include +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "rowcol_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/rowcol_source.c b/software/gsl-1.15/matrix/rowcol_source.c new file mode 100644 index 000000000..072e38393 --- /dev/null +++ b/software/gsl-1.15/matrix/rowcol_source.c @@ -0,0 +1,199 @@ +/* matrix/rowcol_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, row) (QUALIFIED_TYPE(gsl_matrix) * m, const size_t i) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (i >= m->size1) + { + GSL_ERROR_VAL ("row index is out of range", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + i * MULTIPLICITY * m->tda; + v.size = m->size2; + v.stride = 1; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, column) (QUALIFIED_TYPE(gsl_matrix) * m, const size_t j) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (j >= m->size2) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + j * MULTIPLICITY; + v.size = m->size1; + v.stride = m->tda; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, diagonal) (QUALIFIED_TYPE(gsl_matrix) * m) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + TYPE(gsl_vector) v = NULL_VECTOR; + v.data = m->data; + v.size = GSL_MIN(m->size1,m->size2); + v.stride = m->tda + 1; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, subdiagonal) (QUALIFIED_TYPE(gsl_matrix) * m, + const size_t k) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (k >= m->size1) + { + GSL_ERROR_VAL ("subdiagonal index is out of range", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + k * MULTIPLICITY * m->tda; + v.size = GSL_MIN(m->size1 - k, m->size2); + v.stride = m->tda + 1; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, superdiagonal) (QUALIFIED_TYPE(gsl_matrix) * m, + const size_t k) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + + if (k >= m->size2) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + k * MULTIPLICITY; + v.size = GSL_MIN(m->size1, m->size2 - k); + v.stride = m->tda + 1; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, subrow) (QUALIFIED_TYPE(gsl_matrix) * m, const size_t i, const size_t offset, const size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (i >= m->size1) + { + GSL_ERROR_VAL ("row index is out of range", GSL_EINVAL, view); + } + else if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + else if (offset + n > m->size2) + { + GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + MULTIPLICITY * (i * m->tda + offset); + v.size = n; + v.stride = 1; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION (gsl_matrix, subcolumn) (QUALIFIED_TYPE(gsl_matrix) * m, const size_t j, const size_t offset, const size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (j >= m->size2) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, view); + } + else if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + else if (offset + n > m->size1) + { + GSL_ERROR_VAL ("dimension n overflows matrix", GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = m->data + MULTIPLICITY * (offset * m->tda + j); + v.size = n; + v.stride = m->tda; + v.block = m->block; + v.owner = 0; + + view.vector = v; + return view; + } +} diff --git a/software/gsl-1.15/matrix/submatrix.c b/software/gsl-1.15/matrix/submatrix.c new file mode 100644 index 000000000..c94276291 --- /dev/null +++ b/software/gsl-1.15/matrix/submatrix.c @@ -0,0 +1,178 @@ +#include +#include +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "submatrix_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/submatrix_source.c b/software/gsl-1.15/matrix/submatrix_source.c new file mode 100644 index 000000000..778968f0d --- /dev/null +++ b/software/gsl-1.15/matrix/submatrix_source.c @@ -0,0 +1,66 @@ +/* matrix/submatrix_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_VIEW(_gsl_matrix,view) +FUNCTION (gsl_matrix, submatrix) (QUALIFIED_TYPE(gsl_matrix) * m, + const size_t i, const size_t j, + const size_t n1, const size_t n2) +{ + QUALIFIED_VIEW(_gsl_matrix,view) view = NULL_MATRIX_VIEW; + + if (i >= m->size1) + { + GSL_ERROR_VAL ("row index is out of range", GSL_EINVAL, view); + } + else if (j >= m->size2) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, view); + } + else if (n1 == 0) + { + GSL_ERROR_VAL ("first dimension must be non-zero", GSL_EINVAL, view); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("second dimension must be non-zero", GSL_EINVAL, view); + } + else if (i + n1 > m->size1) + { + GSL_ERROR_VAL ("first dimension overflows matrix", GSL_EINVAL, view); + } + else if (j + n2 > m->size2) + { + GSL_ERROR_VAL ("second dimension overflows matrix", GSL_EINVAL, view); + } + + { + TYPE(gsl_matrix) s = NULL_MATRIX; + + s.data = m->data + MULTIPLICITY * (i * m->tda + j); + s.size1 = n1; + s.size2 = n2; + s.tda = m->tda; + s.block = m->block; + s.owner = 0; + + view.matrix = s; + return view; + } +} + diff --git a/software/gsl-1.15/matrix/swap.c b/software/gsl-1.15/matrix/swap.c new file mode 100644 index 000000000..cf5b67c4e --- /dev/null +++ b/software/gsl-1.15/matrix/swap.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/swap_source.c b/software/gsl-1.15/matrix/swap_source.c new file mode 100644 index 000000000..5f7759709 --- /dev/null +++ b/software/gsl-1.15/matrix/swap_source.c @@ -0,0 +1,210 @@ +/* matrix/swap_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_matrix, swap_rows) (TYPE (gsl_matrix) * m, + const size_t i, const size_t j) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + if (i >= size1) + { + GSL_ERROR ("first row index is out of range", GSL_EINVAL); + } + + if (j >= size1) + { + GSL_ERROR ("second row index is out of range", GSL_EINVAL); + } + + if (i != j) + { + ATOMIC *row1 = m->data + MULTIPLICITY * i * m->tda; + ATOMIC *row2 = m->data + MULTIPLICITY * j * m->tda; + + size_t k; + + for (k = 0; k < MULTIPLICITY * size2; k++) + { + ATOMIC tmp = row1[k] ; + row1[k] = row2[k] ; + row2[k] = tmp ; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_matrix, swap_columns) (TYPE (gsl_matrix) * m, + const size_t i, const size_t j) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + if (i >= size2) + { + GSL_ERROR ("first column index is out of range", GSL_EINVAL); + } + + if (j >= size2) + { + GSL_ERROR ("second column index is out of range", GSL_EINVAL); + } + + if (i != j) + { + ATOMIC *col1 = m->data + MULTIPLICITY * i; + ATOMIC *col2 = m->data + MULTIPLICITY * j; + + size_t p; + + for (p = 0; p < size1; p++) + { + size_t k; + size_t n = p * MULTIPLICITY * m->tda; + + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC tmp = col1[n+k] ; + col1[n+k] = col2[n+k] ; + col2[n+k] = tmp ; + } + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_matrix, swap_rowcol) (TYPE (gsl_matrix) * m, + const size_t i, const size_t j) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + + if (size1 != size2) + { + GSL_ERROR ("matrix must be square to swap row and column", GSL_ENOTSQR); + } + + if (i >= size1) + { + GSL_ERROR ("row index is out of range", GSL_EINVAL); + } + + if (j >= size2) + { + GSL_ERROR ("column index is out of range", GSL_EINVAL); + } + + { + ATOMIC *row = m->data + MULTIPLICITY * i * m->tda; + ATOMIC *col = m->data + MULTIPLICITY * j; + + size_t p; + + for (p = 0; p < size1; p++) + { + size_t k; + + size_t r = p * MULTIPLICITY; + size_t c = p * MULTIPLICITY * m->tda; + + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC tmp = col[c+k] ; + col[c+k] = row[r+k] ; + row[r+k] = tmp ; + } + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_matrix, transpose) (TYPE (gsl_matrix) * m) +{ + const size_t size1 = m->size1; + const size_t size2 = m->size2; + size_t i, j, k; + + if (size1 != size2) + { + GSL_ERROR ("matrix must be square to take transpose", GSL_ENOTSQR); + } + + for (i = 0; i < size1; i++) + { + for (j = i + 1 ; j < size2 ; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + size_t e1 = (i * m->tda + j) * MULTIPLICITY + k ; + size_t e2 = (j * m->tda + i) * MULTIPLICITY + k ; + { + ATOMIC tmp = m->data[e1] ; + m->data[e1] = m->data[e2] ; + m->data[e2] = tmp ; + } + } + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_matrix, transpose_memcpy) (TYPE (gsl_matrix) * dest, + const TYPE (gsl_matrix) * src) +{ + const size_t src_size1 = src->size1; + const size_t src_size2 = src->size2; + + const size_t dest_size1 = dest->size1; + const size_t dest_size2 = dest->size2; + + size_t i, j, k; + + if (dest_size2 != src_size1 || dest_size1 != src_size2) + { + GSL_ERROR ("dimensions of dest matrix must be transpose of src matrix", + GSL_EBADLEN); + } + + for (i = 0; i < dest_size1; i++) + { + for (j = 0 ; j < dest_size2; j++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + size_t e1 = (i * dest->tda + j) * MULTIPLICITY + k ; + size_t e2 = (j * src->tda + i) * MULTIPLICITY + k ; + + dest->data[e1] = src->data[e2] ; + } + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/matrix/test.c b/software/gsl-1.15/matrix/test.c new file mode 100644 index 000000000..40ee18fb3 --- /dev/null +++ b/software/gsl-1.15/matrix/test.c @@ -0,0 +1,237 @@ +/* matrix/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#if (!GSL_RANGE_CHECK) && defined(HAVE_INLINE) +#undef GSL_RANGE_CHECK +#define GSL_RANGE_CHECK 1 +#endif + +#include +#include +#include +#include +#include +#include +#include + +int status = 0; + +#ifndef DESC +#define DESC "" +#endif + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +int +main (void) +{ + size_t M = 53; + size_t N = 107; + + gsl_ieee_env_setup (); + + test_func (M, N); + test_float_func (M, N); + test_long_double_func (M, N); + test_ulong_func (M, N); + test_long_func (M, N); + test_uint_func (M, N); + test_int_func (M, N); + test_ushort_func (M, N); + test_short_func (M, N); + test_uchar_func (M, N); + test_char_func (M, N); + test_complex_func (M, N); + test_complex_float_func (M, N); + test_complex_long_double_func (M, N); + + test_ops (M, N); + test_float_ops (M, N); + test_long_double_ops (M, N); + test_ulong_ops (M, N); + test_long_ops (M, N); + test_uint_ops (M, N); + test_int_ops (M, N); + test_ushort_ops (M, N); + test_short_ops (M, N); + test_uchar_ops (M, N); + test_char_ops (M, N); + + /* Must use smaller dimensions to prevent approximation of floats in + float_mul_elements test*/ + + { + const size_t P = 8; + const size_t Q = 12; + + test_complex_ops (P, Q); + test_complex_float_ops (P, Q); + test_complex_long_double_ops (P, Q); + } + + test_text (M, N); + test_float_text (M, N); +#if HAVE_PRINTF_LONGDOUBLE + test_long_double_text (M, N); +#endif + test_ulong_text (M, N); + test_long_text (M, N); + test_uint_text (M, N); + test_int_text (M, N); + test_ushort_text (M, N); + test_short_text (M, N); + test_uchar_text (M, N); + test_char_text (M, N); + test_complex_text (M, N); + test_complex_float_text (M, N); +#if HAVE_PRINTF_LONGDOUBLE + test_complex_long_double_text (M, N); +#endif + + test_binary (M, N); + test_float_binary (M, N); + test_long_double_binary (M, N); + test_ulong_binary (M, N); + test_long_binary (M, N); + test_uint_binary (M, N); + test_int_binary (M, N); + test_ushort_binary (M, N); + test_short_binary (M, N); + test_uchar_binary (M, N); + test_char_binary (M, N); + test_complex_binary (M, N); + test_complex_float_binary (M, N); + test_complex_long_double_binary (M, N); + +#if GSL_RANGE_CHECK + gsl_set_error_handler (&my_error_handler); + + test_trap (M, N); + test_float_trap (M, N); + test_long_double_trap (M, N); + test_ulong_trap (M, N); + test_long_trap (M, N); + test_uint_trap (M, N); + test_int_trap (M, N); + test_ushort_trap (M, N); + test_short_trap (M, N); + test_uchar_trap (M, N); + test_char_trap (M, N); + test_complex_trap (M, N); + test_complex_float_trap (M, N); + test_complex_long_double_trap (M, N); +#endif + + exit (gsl_test_summary ()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); + status = 1; +} diff --git a/software/gsl-1.15/matrix/test_complex_source.c b/software/gsl-1.15/matrix/test_complex_source.c new file mode 100644 index 000000000..d8563c850 --- /dev/null +++ b/software/gsl-1.15/matrix/test_complex_source.c @@ -0,0 +1,708 @@ +/* matrix/test_complex_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (const size_t M, const size_t N); +void FUNCTION (test, ops) (const size_t P, const size_t Q); +void FUNCTION (test, trap) (const size_t M, const size_t N); +void FUNCTION (test, text) (const size_t M, const size_t N); +void FUNCTION (test, binary) (const size_t M, const size_t N); + +#define TEST(expr,desc) gsl_test((expr), NAME(gsl_matrix) desc " M=%d, N=%d", M, N) + +void +FUNCTION (test, func) (const size_t M, const size_t N) +{ + + size_t i, j; + int k = 0; + + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + gsl_test (m->data == 0, NAME (gsl_matrix) "_alloc returns valid pointer"); + gsl_test (m->size1 != M, NAME (gsl_matrix) "_alloc returns valid size1"); + gsl_test (m->size2 != N, NAME (gsl_matrix) "_alloc returns valid size2"); + gsl_test (m->tda != N, NAME (gsl_matrix) "_alloc returns valid tda"); + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (m->data[2 * (i * N + j)] != k || + m->data[2 * (i * N + j) + 1] != k + 1000) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_set writes into array"); + + status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + k++; + if (GSL_REAL (z) != k || GSL_IMAG (z) != k + 1000) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_get reads from array"); + + FUNCTION (gsl_matrix, free) (m); /* free whatever is in m */ + + m = FUNCTION (gsl_matrix, calloc) (M, N); + + { + int status = (FUNCTION(gsl_matrix,isnull)(m) != 1); + TEST (status, "_isnull" DESC " on calloc matrix"); + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on calloc matrix"); + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on calloc matrix"); + } + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 1); + TEST (status, "_isnull" DESC " on null matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on null matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on null matrix") ; + } + + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) (k % 10); + GSL_IMAG (z) = (ATOMIC) ((k + 5) % 10); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on non-negative matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on non-negative matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on non-negative matrix") ; + } + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) ((k % 10) - 5); + GSL_IMAG (z) = (ATOMIC) (((k + 5) % 10) - 5); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on mixed matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on mixed matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on mixed matrix") ; + } + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = -(ATOMIC) (k % 10); + GSL_IMAG (z) = -(ATOMIC) ((k + 5) % 10); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on non-positive matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on non-positive matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on non-positive matrix") ; + } + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) (k % 10 + 1); + GSL_IMAG (z) = (ATOMIC) ((k + 5) % 10 + 1); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on positive matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 1); + TEST (status, "_ispos" DESC " on positive matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on positive matrix") ; + } + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = -(ATOMIC) (k % 10 + 1); + GSL_IMAG (z) = -(ATOMIC) ((k + 5) % 10 + 1); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on negative matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on negative matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 1); + TEST (status, "_isneg" DESC " on negative matrix") ; + } + + FUNCTION (gsl_matrix, free) (m); /* free whatever is in m */ +} + +#if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE) +void +FUNCTION (test, text) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + size_t i, j; + int k = 0; + + { + FILE *f = fopen ("test.txt", "w"); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); + + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); + status = 0; + + FUNCTION (gsl_matrix, fscanf) (f, mm); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (mm->data[2 * (i * N + j)] != k + || mm->data[2 * (i * N + j) + 1] != k + 1000) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); + + fclose (f); + FUNCTION (gsl_matrix, free) (mm); + } + + FUNCTION (gsl_matrix, free) (m); +} +#endif + +void +FUNCTION (test, binary) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + size_t i, j; + int k = 0; + + { + FILE *f = fopen ("test.dat", "wb"); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } + + FUNCTION (gsl_matrix, fwrite) (f, m); + + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); + status = 0; + + FUNCTION (gsl_matrix, fread) (f, mm); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (mm->data[2 * (i * N + j)] != k + || mm->data[2 * (i * N + j) + 1] != k + 1000) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_write and read"); + + fclose (f); + FUNCTION (gsl_matrix, free) (mm); + } + + FUNCTION (gsl_matrix, free) (m); +} + +void +FUNCTION (test, trap) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * mc = FUNCTION (gsl_matrix, alloc) (M, N); + size_t i = 0, j = 0; + + BASE z = { {(ATOMIC) 1.2, (ATOMIC) 3.4} }; + BASE z1; + + status = 0; + FUNCTION (gsl_matrix, set) (mc, i - 1, j, z); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 1st index below lower bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (mc, i, j - 1, z); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 2nd index below lower bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (mc, M + 1, 0, z); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 1st index above upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (mc, 0, N + 1, z); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 2nd index above upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (mc, M, 0, z); + gsl_test (!status, NAME (gsl_matrix) "_set traps 1st index at upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (mc, 0, N, z); + gsl_test (!status, NAME (gsl_matrix) "_set traps 2nd index at upper bound"); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, i - 1, 0); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 1st index below lower bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 1st index below l.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 1st index below l.b."); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, 0, j - 1); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 2nd index below lower bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 2nd index below l.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 2nd index below l.b."); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, M + 1, 0); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 1st index above upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 1st index above u.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 1st index above u.b."); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, 0, N + 1); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 2nd index above upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 2nd index above u.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 2nd index above u.b."); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, M, 0); + gsl_test (!status, NAME (gsl_matrix) "_get traps 1st index at upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 1st index at u.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 1st index at u.b."); + + status = 0; + z1 = FUNCTION (gsl_matrix, get) (mc, 0, N); + gsl_test (!status, NAME (gsl_matrix) "_get traps 2nd index at upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_matrix) "_get, zero real for 2nd index at u.b."); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_matrix) "_get, zero imag for 2nd index at u.b."); + + FUNCTION (gsl_matrix, free) (mc); +} + + +void +FUNCTION (test, ops) (const size_t P, const size_t Q) +{ + TYPE (gsl_matrix) * a = FUNCTION (gsl_matrix, alloc) (P, Q); + TYPE (gsl_matrix) * b = FUNCTION (gsl_matrix, alloc) (P, Q); + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (P, Q); + size_t i, j; + size_t k = 0; + + size_t status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + BASE z, z1; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 10); + GSL_REAL (z1) = (ATOMIC) (k + 5); + GSL_IMAG (z1) = (ATOMIC) (k + 20); + + FUNCTION (gsl_matrix, set) (a, i, j, z); + FUNCTION (gsl_matrix, set) (b, i, j, z1); + k++; + } + } + + { + { + int status = (FUNCTION(gsl_matrix,equal) (a,b) != 0); + gsl_test (status, NAME (gsl_matrix) "_equal matrix unequal"); + } + + FUNCTION (gsl_matrix, memcpy) (m, a); + + { + int status = (FUNCTION(gsl_matrix,equal) (a,m) != 1); + gsl_test (status, NAME (gsl_matrix) "_equal matrix equal"); + } + + FUNCTION (gsl_matrix, add) (m, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != (ATOMIC) (2 * k + 5) || + GSL_IMAG (z) != (ATOMIC) (2 * k + 30)) + status = 1; + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_add matrix addition"); + } + + { + FUNCTION (gsl_matrix, memcpy) (m, a); + + FUNCTION (gsl_matrix, sub) (m, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != (ATOMIC) (-5) + || GSL_IMAG (z) != (ATOMIC) (-10)) + status = 1; + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_sub matrix subtraction"); + } + + { + FUNCTION (gsl_matrix, memcpy) (m, a); + + FUNCTION (gsl_matrix, mul_elements) (m, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = -(ATOMIC) (25 * k + 200); + ATOMIC imag = (ATOMIC) (2 * k * k + 35 * k + 50); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (fabs (GSL_REAL (z) - real) > 100 * BASE_EPSILON || + fabs (GSL_IMAG (z) - imag) > 100 * BASE_EPSILON) + { + status = 1; +#ifdef DEBUG + printf ("%d\t%d\n", i, j); + printf (OUT_FORMAT "\n", + GSL_REAL (z) + (ATOMIC) (25 * (ATOMIC) k + 200)); + printf (OUT_FORMAT "\n", + GSL_IMAG (z) - (ATOMIC) (2 * k * k + 35 * k + 50)); + printf ("\n"); +#endif + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplication"); + } + + + { + FUNCTION (gsl_matrix, memcpy) (m, a); + + FUNCTION (gsl_matrix, div_elements) (m, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC denom = (2 * k * k + 50 * k + 425); + ATOMIC real = (ATOMIC) (2 * k * k + 35 * k + 200) / denom; + ATOMIC imag = ((ATOMIC) (50) - (ATOMIC) (5 * k)) / denom; + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (fabs (GSL_REAL (z) - real) > 100 * BASE_EPSILON || + fabs (GSL_IMAG (z) - imag) > 100 * BASE_EPSILON) + { +#ifdef DEBUG + printf (OUT_FORMAT "\t", + GSL_REAL (z) - (ATOMIC) (2 * k * k + 35 * k + + 200) / denom); + printf (OUT_FORMAT "\n", + GSL_IMAG (z) - ((ATOMIC) (50) - + (ATOMIC) (5 * k)) / denom); +#endif + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_div_elements division"); + } + + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, scale) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) (-(ATOMIC)k - 30); + ATOMIC imag = (ATOMIC) (5 * (ATOMIC)k + 20); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_scale"); + } + + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, add_constant) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) ((ATOMIC)k + 2); + ATOMIC imag = (ATOMIC) ((ATOMIC)k + 10 + 3); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_constant"); + } + + { + BASE s; + GSL_SET_COMPLEX(&s, 2.0, 3.0); + + FUNCTION (gsl_matrix, memcpy) (m, a); + FUNCTION (gsl_matrix, add_diagonal) (m, s); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + ATOMIC real = (ATOMIC) ((ATOMIC)k + ((i==j) ? 2 : 0)); + ATOMIC imag = (ATOMIC) ((ATOMIC)k + 10 +((i==j) ? 3 : 0)); + BASE z = FUNCTION (gsl_matrix, get) (m, i, j); + if (GSL_REAL (z) != real || GSL_IMAG (z) != imag) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_diagonal"); + } + + { + FUNCTION (gsl_matrix, swap) (a, b); + + k = 0; + status = 0; + + for (i = 0; i < P; i++) + { + for (j = 0; j < Q; j++) + { + BASE x = FUNCTION (gsl_matrix, get) (a, i, j); + BASE y = FUNCTION (gsl_matrix, get) (b, i, j); + if (GSL_REAL (x) != (ATOMIC) (k + 5) || GSL_IMAG (x) != (ATOMIC) (k + 20) || + GSL_REAL (y) != (ATOMIC) (k) || GSL_IMAG (y) != (ATOMIC) (k + 10)) + { + status = 1; + } + k++; + } + } + gsl_test (status, NAME (gsl_matrix) "_swap"); + } + + + + FUNCTION (gsl_matrix, free) (a); + FUNCTION (gsl_matrix, free) (b); + FUNCTION (gsl_matrix, free) (m); + +} diff --git a/software/gsl-1.15/matrix/test_source.c b/software/gsl-1.15/matrix/test_source.c new file mode 100644 index 000000000..0fde0d65e --- /dev/null +++ b/software/gsl-1.15/matrix/test_source.c @@ -0,0 +1,789 @@ +/* matrix/test_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (const size_t M, const size_t N); +void FUNCTION (test, ops) (const size_t M, const size_t N); +void FUNCTION (test, trap) (const size_t M, const size_t N); +void FUNCTION (test, text) (const size_t M, const size_t N); +void FUNCTION (test, binary) (const size_t M, const size_t N); + +#define TEST(expr,desc) gsl_test((expr), NAME(gsl_matrix) desc " M=%d, N=%d", M, N) + +void +FUNCTION (test, func) (const size_t M, const size_t N) +{ + TYPE (gsl_vector) * v; + size_t i, j; + size_t k = 0; + + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + gsl_test (m->data == 0, NAME (gsl_matrix) "_alloc returns valid pointer"); + gsl_test (m->size1 != M, NAME (gsl_matrix) "_alloc returns valid size1"); + gsl_test (m->size2 != N, NAME (gsl_matrix) "_alloc returns valid size2"); + gsl_test (m->tda != N, NAME (gsl_matrix) "_alloc returns valid tda"); + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } + + { + status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (m->data[i * N + j] != (BASE) k) + status = 1; + }; + }; + + gsl_test (status, NAME (gsl_matrix) "_set writes into array"); + } + + { + status = 0; + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (FUNCTION (gsl_matrix, get) (m, i, j) != (BASE) k) + status = 1; + }; + }; + gsl_test (status, NAME (gsl_matrix) "_get reads from array"); + } + + + FUNCTION (gsl_matrix, free) (m); /* free whatever is in m */ + + m = FUNCTION (gsl_matrix, calloc) (M, N); + v = FUNCTION (gsl_vector, calloc) (N); + + { + int status = (FUNCTION(gsl_matrix,isnull)(m) != 1); + TEST (status, "_isnull" DESC " on calloc matrix"); + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on calloc matrix"); + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on calloc matrix"); + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 1); + TEST (status, "_isnonneg" DESC " on calloc matrix"); + } + + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } + + + { + status = 0; + k = 0; + for (i = 0; i < M; i++) + { + FUNCTION (gsl_matrix, get_row) (v, m, i); + + for (j = 0; j < N; j++) + { + k++; + if (v->data[j] != (BASE) k) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_get_row extracts row"); + } + + { + BASE exp_max = FUNCTION(gsl_matrix, get) (m, 0, 0); + BASE exp_min = FUNCTION(gsl_matrix, get) (m, 0, 0); + size_t exp_imax = 0, exp_jmax = 0, exp_imin = 0, exp_jmin = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE k = FUNCTION(gsl_matrix, get) (m, i, j); + if (k > exp_max) { + exp_max = FUNCTION(gsl_matrix, get) (m, i, j); + exp_imax = i; + exp_jmax = j; + } + if (k < exp_min) { + exp_min = FUNCTION(gsl_matrix, get) (m, i, j); + exp_imin = i; + exp_jmin = j; + } + } + } + + { + BASE max = FUNCTION(gsl_matrix, max) (m) ; + + gsl_test (max != exp_max, NAME(gsl_matrix) "_max returns correct maximum value"); + } + + { + BASE min = FUNCTION(gsl_matrix, min) (m) ; + + gsl_test (min != exp_min, NAME(gsl_matrix) "_min returns correct minimum value"); + } + + { + BASE min, max; + FUNCTION(gsl_matrix, minmax) (m, &min, &max); + + gsl_test (max != exp_max, NAME(gsl_matrix) "_minmax returns correct maximum value"); + gsl_test (min != exp_min, NAME(gsl_matrix) "_minmax returns correct minimum value"); + } + + + { + size_t imax, jmax; + FUNCTION(gsl_matrix, max_index) (m, &imax, &jmax) ; + + gsl_test (imax != exp_imax, NAME(gsl_matrix) "_max_index returns correct maximum i"); + gsl_test (jmax != exp_jmax, NAME(gsl_matrix) "_max_index returns correct maximum j"); + } + + { + size_t imin, jmin; + FUNCTION(gsl_matrix, min_index) (m, &imin, &jmin) ; + + gsl_test (imin != exp_imin, NAME(gsl_matrix) "_min_index returns correct minimum i"); + gsl_test (jmin != exp_jmin, NAME(gsl_matrix) "_min_index returns correct minimum j"); + } + + { + size_t imin, jmin, imax, jmax; + + FUNCTION(gsl_matrix, minmax_index) (m, &imin, &jmin, &imax, &jmax); + + gsl_test (imax != exp_imax, NAME(gsl_matrix) "_minmax_index returns correct maximum i"); + gsl_test (jmax != exp_jmax, NAME(gsl_matrix) "_minmax_index returns correct maximum j"); + + gsl_test (imin != exp_imin, NAME(gsl_matrix) "_minmax_index returns correct minimum i"); + gsl_test (jmin != exp_jmin, NAME(gsl_matrix) "_minmax_index returns correct minimum j"); + } + +#if FP + FUNCTION(gsl_matrix,set)(m, 2, 3, GSL_NAN); + exp_min = GSL_NAN; exp_max = GSL_NAN; + exp_imin = 2; exp_jmin = 3; + exp_imax = 2; exp_jmax = 3; + + { + BASE max = FUNCTION(gsl_matrix, max) (m) ; + + gsl_test_abs (max,exp_max, 0, NAME(gsl_matrix) "_max returns correct maximum value for NaN"); + } + + { + BASE min = FUNCTION(gsl_matrix, min) (m) ; + + gsl_test_abs (min, exp_min, 0, NAME(gsl_matrix) "_min returns correct minimum value for NaN"); + } + + { + BASE min, max; + FUNCTION(gsl_matrix, minmax) (m, &min, &max); + + gsl_test_abs (max, exp_max, 0, NAME(gsl_matrix) "_minmax returns correct maximum value for NaN"); + gsl_test_abs (min, exp_min, 0, NAME(gsl_matrix) "_minmax returns correct minimum value for NaN"); + } + + + { + size_t imax, jmax; + FUNCTION(gsl_matrix, max_index) (m, &imax, &jmax) ; + + gsl_test (imax != exp_imax, NAME(gsl_matrix) "_max_index returns correct maximum i for NaN"); + gsl_test (jmax != exp_jmax, NAME(gsl_matrix) "_max_index returns correct maximum j for NaN"); + } + + { + size_t imin, jmin; + FUNCTION(gsl_matrix, min_index) (m, &imin, &jmin) ; + + gsl_test (imin != exp_imin, NAME(gsl_matrix) "_min_index returns correct minimum i for NaN"); + gsl_test (jmin != exp_jmin, NAME(gsl_matrix) "_min_index returns correct minimum j for NaN"); + } + + { + size_t imin, jmin, imax, jmax; + + FUNCTION(gsl_matrix, minmax_index) (m, &imin, &jmin, &imax, &jmax); + + gsl_test (imax != exp_imax, NAME(gsl_matrix) "_minmax_index returns correct maximum i for NaN"); + gsl_test (jmax != exp_jmax, NAME(gsl_matrix) "_minmax_index returns correct maximum j for NaN"); + + gsl_test (imin != exp_imin, NAME(gsl_matrix) "_minmax_index returns correct minimum i for NaN"); + gsl_test (jmin != exp_jmin, NAME(gsl_matrix) "_minmax_index returns correct minimum j for NaN"); + } +#endif + + + } + + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + FUNCTION (gsl_matrix, set) (m, i, j, (ATOMIC) 0); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 1); + TEST (status, "_isnull" DESC " on null matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on null matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on null matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 1); + TEST (status, "_isnonneg" DESC " on null matrix") ; + } + + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (ATOMIC) (k % 10)); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on non-negative matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on non-negative matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on non-negative matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 1); + TEST (status, "_isnonneg" DESC " on non-negative matrix") ; + } + +#ifndef UNSIGNED + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + ATOMIC mij = ((++k) % 10) - (ATOMIC) 5; + FUNCTION (gsl_matrix, set) (m, i, j, mij); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on mixed matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on mixed matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on mixed matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 0); + TEST (status, "_isnonneg" DESC " on mixed matrix") ; + } + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, -(ATOMIC) (k % 10)); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on non-positive matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on non-positive matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on non-positive matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 0); + TEST (status, "_isnonneg" DESC " on non-positive matrix") ; + } +#endif + + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (ATOMIC) (k % 10 + 1)); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on positive matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 1); + TEST (status, "_ispos" DESC " on positive matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 0); + TEST (status, "_isneg" DESC " on positive matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 1); + TEST (status, "_isnonneg" DESC " on positive matrix") ; + } + +#if (!defined(UNSIGNED) && !defined(BASE_CHAR)) + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, -(ATOMIC) (k % 10 + 1)); + } + } + + { + status = (FUNCTION(gsl_matrix,isnull)(m) != 0); + TEST (status, "_isnull" DESC " on negative matrix") ; + + status = (FUNCTION(gsl_matrix,ispos)(m) != 0); + TEST (status, "_ispos" DESC " on negative matrix") ; + + status = (FUNCTION(gsl_matrix,isneg)(m) != 1); + TEST (status, "_isneg" DESC " on negative matrix") ; + + status = (FUNCTION(gsl_matrix,isnonneg)(m) != 0); + TEST (status, "_isnonneg" DESC " on negative matrix") ; + } +#endif + + FUNCTION (gsl_matrix, free) (m); + FUNCTION (gsl_vector, free) (v); +} + + +void +FUNCTION (test, ops) (const size_t M, const size_t N) +{ + size_t i, j; + size_t k = 0; + + TYPE (gsl_matrix) * a = FUNCTION (gsl_matrix, calloc) (M, N); + TYPE (gsl_matrix) * b = FUNCTION (gsl_matrix, calloc) (M, N); + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + FUNCTION (gsl_matrix, set) (a, i, j, (BASE)(3 + i + 5 * j)); + FUNCTION (gsl_matrix, set) (b, i, j, (BASE)(3 + 2 * i + 4 * j)); + } + } + + { + int status = (FUNCTION(gsl_matrix,equal) (a,b) != 0); + gsl_test (status, NAME (gsl_matrix) "_equal matrix unequal"); + } + + FUNCTION (gsl_matrix, memcpy) (m, a); + + { + int status = (FUNCTION(gsl_matrix,equal) (a,m) != 1); + gsl_test (status, NAME (gsl_matrix) "_equal matrix equal"); + } + + FUNCTION (gsl_matrix, add) (m, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + BASE z = x + y; + if (r != z) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_add matrix addition"); + } + + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, sub) (m, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + BASE z = x - y; + if (r != z) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_sub matrix subtraction"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, mul_elements) (m, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + BASE z = x * y; + if (r != z) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplication"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, div_elements) (m, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + BASE z = x / y; + if (fabs(r - z) > 2 * GSL_FLT_EPSILON * fabs(z)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_div_elements division"); + } + + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, scale) (m, 2.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + if (r != (ATOMIC)(2*x)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_scale"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, add_constant) (m, 3.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = x + 3.0; + if (fabs(r - y) > 2 * GSL_FLT_EPSILON * fabs(y)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_constant"); + } + + FUNCTION(gsl_matrix, memcpy) (m, a); + FUNCTION(gsl_matrix, add_diagonal) (m, 5.0); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE r = FUNCTION(gsl_matrix,get) (m,i,j); + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = (i == j) ? (x + 5.0) : x; + if (fabs(r - y) > 2 * GSL_FLT_EPSILON * fabs(y)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_add_diagonal"); + } + + + FUNCTION(gsl_matrix, swap) (a, b); + + { + int status = 0; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE x = FUNCTION(gsl_matrix,get) (a,i,j); + BASE y = FUNCTION(gsl_matrix,get) (b,i,j); + if (y != (BASE)(3 + i + 5 * j) || x != (BASE)(3 + 2 * i + 4 * j)) + status = 1; + } + } + gsl_test (status, NAME (gsl_matrix) "_swap"); + } + + + FUNCTION(gsl_matrix, free) (a); + FUNCTION(gsl_matrix, free) (b); + FUNCTION(gsl_matrix, free) (m); +} + +#if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE) +void +FUNCTION (test, text) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + size_t i, j; + int k = 0; + + { + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } + + FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); + status = 0; + + FUNCTION (gsl_matrix, fscanf) (f, mm); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (mm->data[i * N + j] != (BASE) k) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); + + fclose (f); + FUNCTION (gsl_matrix, free) (mm); + } + + FUNCTION (gsl_matrix, free) (m); +} +#endif + +void +FUNCTION (test, binary) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, calloc) (M, N); + + size_t i, j; + size_t k = 0; + + { + FILE *f = fopen ("test.dat", "wb"); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } + + FUNCTION (gsl_matrix, fwrite) (f, m); + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); + status = 0; + + FUNCTION (gsl_matrix, fread) (f, mm); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + if (mm->data[i * N + j] != (BASE) k) + status = 1; + } + } + + gsl_test (status, NAME (gsl_matrix) "_write and read"); + + fclose (f); + FUNCTION (gsl_matrix, free) (mm); + } + + FUNCTION (gsl_matrix, free) (m); +} + +void +FUNCTION (test, trap) (const size_t M, const size_t N) +{ + TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); + + size_t i = 0, j = 0; + double x; + + status = 0; + FUNCTION (gsl_matrix, set) (m, M + 1, 0, (BASE) 1.2); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 1st index above upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (m, 0, N + 1, (BASE) 1.2); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 2nd index above upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (m, M, 0, (BASE) 1.2); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 1st index at upper bound"); + + status = 0; + FUNCTION (gsl_matrix, set) (m, 0, N, (BASE) 1.2); + gsl_test (!status, + NAME (gsl_matrix) "_set traps 2nd index at upper bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, i - 1, 0); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 1st index below lower bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 1st index below lower bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, 0, j - 1); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 2nd index below lower bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 2nd index below lower bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, M + 1, 0); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 1st index above upper bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 1st index above upper bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, 0, N + 1); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 2nd index above upper bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 2nd index above upper bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, M, 0); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 1st index at upper bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 1st index at upper bound"); + + status = 0; + x = FUNCTION (gsl_matrix, get) (m, 0, N); + gsl_test (!status, + NAME (gsl_matrix) "_get traps 2nd index at upper bound"); + gsl_test (x != 0, + NAME (gsl_matrix) "_get returns zero for 2nd index at upper bound"); + + FUNCTION (gsl_matrix, free) (m); +} diff --git a/software/gsl-1.15/matrix/test_static.c b/software/gsl-1.15/matrix/test_static.c new file mode 100644 index 000000000..2ce7098cd --- /dev/null +++ b/software/gsl-1.15/matrix/test_static.c @@ -0,0 +1,7 @@ + +#undef HAVE_INLINE +#ifndef NO_INLINE +#define NO_INLINE +#endif +#define DESC " (static)" +#include "test.c" diff --git a/software/gsl-1.15/matrix/view.c b/software/gsl-1.15/matrix/view.c new file mode 100644 index 000000000..2ad491157 --- /dev/null +++ b/software/gsl-1.15/matrix/view.c @@ -0,0 +1,176 @@ +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/matrix/view.h b/software/gsl-1.15/matrix/view.h new file mode 100644 index 000000000..01df9bdb1 --- /dev/null +++ b/software/gsl-1.15/matrix/view.h @@ -0,0 +1,5 @@ +#define NULL_VECTOR {0, 0, 0, 0, 0} +#define NULL_VECTOR_VIEW {{0, 0, 0, 0, 0}} + +#define NULL_MATRIX {0, 0, 0, 0, 0, 0} +#define NULL_MATRIX_VIEW {{0, 0, 0, 0, 0, 0}} diff --git a/software/gsl-1.15/matrix/view_source.c b/software/gsl-1.15/matrix/view_source.c new file mode 100644 index 000000000..729e2f748 --- /dev/null +++ b/software/gsl-1.15/matrix/view_source.c @@ -0,0 +1,273 @@ +/* matrix/view_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_VIEW (_gsl_matrix,view) +FUNCTION (gsl_matrix, view_array) (QUALIFIER ATOMIC * array, + const size_t n1, const size_t n2) +{ + QUALIFIED_VIEW (_gsl_matrix,view) view = NULL_MATRIX_VIEW; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, view); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, view); + } + + { + TYPE(gsl_matrix) m = NULL_MATRIX; + + m.data = (ATOMIC *)array; + m.size1 = n1; + m.size2 = n2; + m.tda = n2; + m.block = 0; + m.owner = 0; + + view.matrix = m; + return view; + } +} + +QUALIFIED_VIEW (_gsl_matrix,view) +FUNCTION(gsl_matrix, view_array_with_tda) (QUALIFIER ATOMIC * base, + const size_t n1, + const size_t n2, + const size_t tda) +{ + QUALIFIED_VIEW (_gsl_matrix,view) view = NULL_MATRIX_VIEW; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, view); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, view); + } + else if (n2 > tda) + { + GSL_ERROR_VAL ("matrix dimension n2 must not exceed tda", + GSL_EINVAL, view); + } + + + { + TYPE(gsl_matrix) m = NULL_MATRIX; + + m.data = (ATOMIC *)base; + m.size1 = n1; + m.size2 = n2; + m.tda = tda; + m.block = 0; + m.owner = 0; + + view.matrix = m; + return view; + } +} + +QUALIFIED_VIEW (_gsl_matrix,view) +FUNCTION(gsl_matrix, view_vector) (QUALIFIED_TYPE(gsl_vector) * v, + const size_t n1, + const size_t n2) +{ + QUALIFIED_VIEW (_gsl_matrix,view) view = NULL_MATRIX_VIEW; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, view); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, view); + } + else if (v->stride != 1) + { + GSL_ERROR_VAL ("vector must have unit stride", + GSL_EINVAL, view); + } + else if (n1 * n2 > v->size) + { + GSL_ERROR_VAL ("matrix size exceeds size of original", + GSL_EINVAL, view); + } + + { + TYPE(gsl_matrix) m = NULL_MATRIX; + + m.data = v->data; + m.size1 = n1; + m.size2 = n2; + m.tda = n2; + m.block = v->block; + m.owner = 0; + + view.matrix = m; + return view; + } +} + + +QUALIFIED_VIEW (_gsl_matrix,view) +FUNCTION(gsl_matrix, view_vector_with_tda) (QUALIFIED_TYPE(gsl_vector) * v, + const size_t n1, + const size_t n2, + const size_t tda) +{ + QUALIFIED_VIEW (_gsl_matrix,view) view = NULL_MATRIX_VIEW; + + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, view); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, view); + } + else if (v->stride != 1) + { + GSL_ERROR_VAL ("vector must have unit stride", + GSL_EINVAL, view); + } + else if (n2 > tda) + { + GSL_ERROR_VAL ("matrix dimension n2 must not exceed tda", + GSL_EINVAL, view); + } + else if (n1 * tda > v->size) + { + GSL_ERROR_VAL ("matrix size exceeds size of original", + GSL_EINVAL, view); + } + + { + TYPE(gsl_matrix) m = NULL_MATRIX; + + m.data = v->data; + m.size1 = n1; + m.size2 = n2; + m.tda = tda; + m.block = v->block; + m.owner = 0; + + view.matrix = m; + return view; + } +} + +#ifdef JUNK +int +FUNCTION (gsl_matrix, view_from_matrix) (TYPE(gsl_matrix) * m, + TYPE(gsl_matrix) * mm, + const size_t k1, + const size_t k2, + const size_t n1, + const size_t n2) +{ + if (n1 == 0) + { + GSL_ERROR_VAL ("matrix dimension n1 must be positive integer", + GSL_EINVAL, 0); + } + else if (n2 == 0) + { + GSL_ERROR_VAL ("matrix dimension n2 must be positive integer", + GSL_EINVAL, 0); + } + else if (k1 + n1 > mm->size1) + { + GSL_ERROR_VAL ("submatrix dimension 1 exceeds size of original", + GSL_EINVAL, 0); + } + else if (k2 + n2 > mm->size2) + { + GSL_ERROR_VAL ("submatrix dimension 2 exceeds size of original", + GSL_EINVAL, 0); + } + + m->data = mm->data + k1 * mm->tda + k2 ; + m->size1 = n1; + m->size2 = n2; + m->tda = mm->tda; + m->block = mm->block; + m->owner = 0; + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_vector, view_row_from_matrix) (TYPE(gsl_vector) * v, + TYPE(gsl_matrix) * m, + const size_t i) +{ + const size_t column_length = m->size1; + + if (i >= column_length) + { + GSL_ERROR ("row index is out of range", GSL_EINVAL); + } + + if (v->block != 0) + { + GSL_ERROR ("vector already has memory allocated to it", GSL_ENOMEM); + } + + v->data = m->data + MULTIPLICITY * i * m->tda ; + v->size = m->size2; + v->stride = 1; + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_vector, view_col_from_matrix) (TYPE(gsl_vector) * v, + TYPE(gsl_matrix) * m, + const size_t j) +{ + const size_t row_length = m->size2; + + if (j >= row_length) + { + GSL_ERROR_VAL ("column index is out of range", GSL_EINVAL, 0); + } + + if (v->block != 0) + { + GSL_ERROR ("vector already has memory allocated to it", GSL_ENOMEM); + } + + v->data = m->data + MULTIPLICITY * j ; + v->size = m->size1; + v->stride = m->tda; + + return GSL_SUCCESS; +} +#endif /* JUNK */ + diff --git a/software/gsl-1.15/mdate-sh b/software/gsl-1.15/mdate-sh new file mode 100644 index 000000000..0845b8bc8 --- /dev/null +++ b/software/gsl-1.15/mdate-sh @@ -0,0 +1,91 @@ +#!/bin/sh +# mdate-sh - get modification time of a file and pretty-print it +# Copyright (C) 1995 Software Foundation, Inc. +# Written by Ulrich Drepper , June 1995 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# Get the extended ls output of the file. +if ls -L /dev/null 1>/dev/null 2>&1; then + set - `ls -L -l $1` +else + set - `ls -l $1` +fi +# The month is at least the fourth argument. +# (3 shifts here, the next inside the loop) +shift +shift +shift + +# Find the month. Next argument is day, followed by the year or time. +month= +until test $month +do + shift + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +day=$2 + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year diff --git a/software/gsl-1.15/min/.deps/bracketing.Plo b/software/gsl-1.15/min/.deps/bracketing.Plo new file mode 100644 index 000000000..fdf472713 --- /dev/null +++ b/software/gsl-1.15/min/.deps/bracketing.Plo @@ -0,0 +1,134 @@ +bracketing.lo: bracketing.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_min.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h min.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_min.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/brent.Plo b/software/gsl-1.15/min/.deps/brent.Plo new file mode 100644 index 000000000..fd53159ad --- /dev/null +++ b/software/gsl-1.15/min/.deps/brent.Plo @@ -0,0 +1,136 @@ +brent.lo: brent.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_min.h min.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_min.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/convergence.Plo b/software/gsl-1.15/min/.deps/convergence.Plo new file mode 100644 index 000000000..264f500d0 --- /dev/null +++ b/software/gsl-1.15/min/.deps/convergence.Plo @@ -0,0 +1,132 @@ +convergence.lo: convergence.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_min.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_min.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/min/.deps/fsolver.Plo b/software/gsl-1.15/min/.deps/fsolver.Plo new file mode 100644 index 000000000..a9af6e66d --- /dev/null +++ b/software/gsl-1.15/min/.deps/fsolver.Plo @@ -0,0 +1,140 @@ +fsolver.lo: fsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_min.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h min.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_min.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/golden.Plo b/software/gsl-1.15/min/.deps/golden.Plo new file mode 100644 index 000000000..c87ba7028 --- /dev/null +++ b/software/gsl-1.15/min/.deps/golden.Plo @@ -0,0 +1,136 @@ +golden.lo: golden.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_min.h min.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_min.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/quad_golden.Plo b/software/gsl-1.15/min/.deps/quad_golden.Plo new file mode 100644 index 000000000..5940ae537 --- /dev/null +++ b/software/gsl-1.15/min/.deps/quad_golden.Plo @@ -0,0 +1,136 @@ +quad_golden.lo: quad_golden.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_min.h min.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_min.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/test.Po b/software/gsl-1.15/min/.deps/test.Po new file mode 100644 index 000000000..e78959d20 --- /dev/null +++ b/software/gsl-1.15/min/.deps/test.Po @@ -0,0 +1,141 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_min.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + test.h min.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_min.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +test.h: + +min.h: diff --git a/software/gsl-1.15/min/.deps/test_funcs.Po b/software/gsl-1.15/min/.deps/test_funcs.Po new file mode 100644 index 000000000..8040c81b3 --- /dev/null +++ b/software/gsl-1.15/min/.deps/test_funcs.Po @@ -0,0 +1,116 @@ +test_funcs.o: test_funcs.c ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_min.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h test.h + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_min.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +test.h: diff --git a/software/gsl-1.15/min/ChangeLog b/software/gsl-1.15/min/ChangeLog new file mode 100644 index 000000000..013fcf9a9 --- /dev/null +++ b/software/gsl-1.15/min/ChangeLog @@ -0,0 +1,98 @@ +2009-07-11 Brian Gough + + * quad_golden.c: added new safeguarded step-length algorithm from + James Howse + +2009-07-09 Brian Gough + + * fsolver.c (gsl_min_fminimizer_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-01-09 Brian Gough + + * brent.c (brent_iterate): remove spurious early return + +2007-07-30 Brian Gough + + * min.h (SAFE_FUNC_CALL): use gsl_finite instead of finite + +2005-09-09 Brian Gough + + * min.h: improved error message, function can be discontinuous + despite what error message said. + +2005-04-28 Brian Gough + + * brent.c (brent_iterate): fixed error in ordering of tests for + updates so that it agrees with Brent's book. + +2004-04-13 Brian Gough + + * brent.c (brent_iterate): corrected condition for setting to + +/-tolerance. + +Sun Apr 7 15:22:11 2002 Brian Gough + + * fsolver.c (gsl_min_fminimizer_x_minimum): new function, + obsoletes gsl_min_fminimizer_minimum. + (gsl_min_fminimizer_f_minimum): new function for accessing + function values + (gsl_min_fminimizer_f_lower): new function for accessing function + values + (gsl_min_fminimizer_f_upper): new function for accessing function + values + + * renamed minimum to x_minimum throughout + +Wed Oct 3 11:35:45 2001 Brian Gough + + * test.c (main): added an extra test + +Sun Jul 15 17:53:26 2001 Brian Gough + + * eliminated interval type, changed order of arguments to set + functions + +Tue Apr 17 22:13:58 2001 Brian Gough + + * fsolver.c (gsl_min_fminimizer_alloc): removed unnecessary status + variable + +Mon Apr 2 14:54:33 2001 Brian Gough + + * brent.c (brent_init): fixed incorrect value for golden ratio + (brent_iterate): fixed incorrect value for golden ratio + + * golden.c (goldensection_iterate): fixed incorrect value for + golden ratio + + * bracketing.c (gsl_min_find_bracket): fixed incorrect value for + golden ratio + +Sun Feb 18 11:43:04 2001 Brian Gough + + * fsolver.c: changed so that the solver _alloc function no longer + calls _set, the user must do that separately. + +Fri May 5 16:09:11 2000 Brian Gough + + * test.c (test_bracket): fixed warning about "control reaches end + of non-void function" by changing return type to void + +Tue Feb 15 16:32:55 2000 Brian Gough + + * bracketing.c (gsl_min_find_bracket): changed counter nb_eval + from type int to type size_t in order to avoid comparison between + signed and unsigned, (nb_eval < eval_max). + +Mon Feb 14 13:07:43 2000 Brian Gough + + * made all internal functions static + +Wed Oct 13 16:08:03 1999 Brian Gough + + * rewritten to allow initial values to be specified + diff --git a/software/gsl-1.15/min/Makefile.am b/software/gsl-1.15/min/Makefile.am new file mode 100644 index 000000000..5fd357ba6 --- /dev/null +++ b/software/gsl-1.15/min/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgslmin.la + +pkginclude_HEADERS = gsl_min.h + +noinst_HEADERS = min.h + +INCLUDES = -I$(top_srcdir) + +libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c quad_golden.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c test_funcs.c test.h +test_LDADD = libgslmin.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la diff --git a/software/gsl-1.15/min/Makefile.in b/software/gsl-1.15/min/Makefile.in new file mode 100644 index 000000000..115311ea0 --- /dev/null +++ b/software/gsl-1.15/min/Makefile.in @@ -0,0 +1,669 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = min +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmin_la_LIBADD = +am_libgslmin_la_OBJECTS = fsolver.lo golden.lo brent.lo convergence.lo \ + bracketing.lo quad_golden.lo +libgslmin_la_OBJECTS = $(am_libgslmin_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmin.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la \ + ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmin_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmin_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmin.la +pkginclude_HEADERS = gsl_min.h +noinst_HEADERS = min.h +INCLUDES = -I$(top_srcdir) +libgslmin_la_SOURCES = fsolver.c golden.c brent.c convergence.c bracketing.c quad_golden.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c test_funcs.c test.h +test_LDADD = libgslmin.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu min/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu min/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmin.la: $(libgslmin_la_OBJECTS) $(libgslmin_la_DEPENDENCIES) + $(LINK) $(libgslmin_la_OBJECTS) $(libgslmin_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bracketing.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/golden.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quad_golden.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_funcs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/min/bracketing.c b/software/gsl-1.15/min/bracketing.c new file mode 100644 index 000000000..bf38a2b6a --- /dev/null +++ b/software/gsl-1.15/min/bracketing.c @@ -0,0 +1,125 @@ +/* min/bracketing.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* bracketing.c -- find an initial bracketing interval for a function to minimize */ + +#include +#include +#include +#include +#include + +#include "min.h" + +int +gsl_min_find_bracket(gsl_function *f,double *x_minimum,double * f_minimum, + double * x_lower, double * f_lower, + double * x_upper, double * f_upper, + size_t eval_max) +{ + /* The three following variables must be declared volatile to avoid storage + in extended precision registers available on some architecture. The code + relies on the ability to compare double values. As the values will be + store in regular memory, the extended precision will then be lost and + values that are different in extended precision might have equal + representation in double precision. This behavior might break the + algorithm. + */ + volatile double f_left = *f_lower; + volatile double f_right = *f_upper; + volatile double f_center; + double x_left = *x_lower; + double x_right= *x_upper; + double x_center; + const double golden = 0.3819660; /* golden = (3 - sqrt(5))/2 */ + size_t nb_eval = 0; + + + if (f_right >= f_left) + { + x_center = (x_right - x_left) * golden + x_left; + nb_eval++; + SAFE_FUNC_CALL (f, x_center, &f_center); + } + else + { + x_center = x_right ; + f_center = f_right ; + x_right = (x_center - x_left) / golden + x_left; + nb_eval++; + SAFE_FUNC_CALL (f, x_right, &f_right); + } + + do + { + if (f_center < f_left ) + { + if (f_center < f_right) + { + *x_lower = x_left; + *x_upper = x_right; + *x_minimum = x_center; + *f_lower = f_left; + *f_upper = f_right; + *f_minimum = f_center; +/* gsl_ieee_printf_double (&f_left); + printf(" "); + gsl_ieee_printf_double (&f_center); + printf("\n");*/ + return GSL_SUCCESS; + } + else if (f_center > f_right) + { + x_left = x_center; + f_left = f_center; + x_center = x_right; + f_center = f_right; + x_right = (x_center - x_left) / golden + x_left; + nb_eval++; + SAFE_FUNC_CALL (f, x_right, &f_right); + } + else /* f_center == f_right */ + { + x_right = x_center; + f_right = f_center; + x_center = (x_right - x_left) * golden + x_left; + nb_eval++; + SAFE_FUNC_CALL (f, x_center, &f_center); + } + } + else /* f_center >= f_left */ + { + x_right = x_center; + f_right = f_center; + x_center = (x_right - x_left) * golden + x_left; + nb_eval++; + SAFE_FUNC_CALL (f, x_center, &f_center); + } + } + while (nb_eval < eval_max + && (x_right - x_left) > GSL_SQRT_DBL_EPSILON * ( (x_right + x_left) * 0.5 ) + GSL_SQRT_DBL_EPSILON); + *x_lower = x_left; + *x_upper = x_right; + *x_minimum = x_center; + *f_lower = f_left; + *f_upper = f_right; + *f_minimum = f_center; + return GSL_FAILURE; +} + diff --git a/software/gsl-1.15/min/brent.c b/software/gsl-1.15/min/brent.c new file mode 100644 index 000000000..4eebc5536 --- /dev/null +++ b/software/gsl-1.15/min/brent.c @@ -0,0 +1,221 @@ +/* min/brent.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* brent.c -- brent minimum finding algorithm */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "min.h" + +typedef struct + { + double d, e, v, w; + double f_v, f_w; + } +brent_state_t; + +static int brent_init (void *vstate, gsl_function * f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper); +static int brent_iterate (void *vstate, gsl_function * f, double *x_minimum, double * f_minimum, double * x_lower, double * f_lower, double * x_upper, double * f_upper); + +static int +brent_init (void *vstate, gsl_function * f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper) +{ + brent_state_t *state = (brent_state_t *) vstate; + + const double golden = 0.3819660; /* golden = (3 - sqrt(5))/2 */ + + double v = x_lower + golden * (x_upper - x_lower); + double w = v; + + double f_vw; + + x_minimum = 0 ; /* avoid warnings about unused varibles */ + f_minimum = 0 ; + f_lower = 0 ; + f_upper = 0 ; + + state->v = v; + state->w = w; + + state->d = 0; + state->e = 0; + + SAFE_FUNC_CALL (f, v, &f_vw); + + state->f_v = f_vw; + state->f_w = f_vw; + + return GSL_SUCCESS; +} + +static int +brent_iterate (void *vstate, gsl_function * f, double *x_minimum, double * f_minimum, double * x_lower, double * f_lower, double * x_upper, double * f_upper) +{ + brent_state_t *state = (brent_state_t *) vstate; + + const double x_left = *x_lower; + const double x_right = *x_upper; + + const double z = *x_minimum; + double d = state->e; + double e = state->d; + double u, f_u; + const double v = state->v; + const double w = state->w; + const double f_v = state->f_v; + const double f_w = state->f_w; + const double f_z = *f_minimum; + + const double golden = 0.3819660; /* golden = (3 - sqrt(5))/2 */ + + const double w_lower = (z - x_left); + const double w_upper = (x_right - z); + + const double tolerance = GSL_SQRT_DBL_EPSILON * fabs (z); + + double p = 0, q = 0, r = 0; + + const double midpoint = 0.5 * (x_left + x_right); + + if (fabs (e) > tolerance) + { + /* fit parabola */ + + r = (z - w) * (f_z - f_v); + q = (z - v) * (f_z - f_w); + p = (z - v) * q - (z - w) * r; + q = 2 * (q - r); + + if (q > 0) + { + p = -p; + } + else + { + q = -q; + } + + r = e; + e = d; + } + + if (fabs (p) < fabs (0.5 * q * r) && p < q * w_lower && p < q * w_upper) + { + double t2 = 2 * tolerance ; + + d = p / q; + u = z + d; + + if ((u - x_left) < t2 || (x_right - u) < t2) + { + d = (z < midpoint) ? tolerance : -tolerance ; + } + } + else + { + e = (z < midpoint) ? x_right - z : -(z - x_left) ; + d = golden * e; + } + + + if (fabs (d) >= tolerance) + { + u = z + d; + } + else + { + u = z + ((d > 0) ? tolerance : -tolerance) ; + } + + state->e = e; + state->d = d; + + SAFE_FUNC_CALL(f, u, &f_u); + + if (f_u <= f_z) + { + if (u < z) + { + *x_upper = z; + *f_upper = f_z; + } + else + { + *x_lower = z; + *f_lower = f_z; + } + + state->v = w; + state->f_v = f_w; + state->w = z; + state->f_w = f_z; + *x_minimum = u; + *f_minimum = f_u; + return GSL_SUCCESS; + } + else + { + if (u < z) + { + *x_lower = u; + *f_lower = f_u; + } + else + { + *x_upper = u; + *f_upper = f_u; + } + + if (f_u <= f_w || w == z) + { + state->v = w; + state->f_v = f_w; + state->w = u; + state->f_w = f_u; + return GSL_SUCCESS; + } + else if (f_u <= f_v || v == z || v == w) + { + state->v = u; + state->f_v = f_u; + return GSL_SUCCESS; + } + } + + return GSL_SUCCESS; +} + + +static const gsl_min_fminimizer_type brent_type = +{"brent", /* name */ + sizeof (brent_state_t), + &brent_init, + &brent_iterate}; + +const gsl_min_fminimizer_type *gsl_min_fminimizer_brent = &brent_type; diff --git a/software/gsl-1.15/min/convergence.c b/software/gsl-1.15/min/convergence.c new file mode 100644 index 000000000..f687aafd7 --- /dev/null +++ b/software/gsl-1.15/min/convergence.c @@ -0,0 +1,61 @@ +/* min/convergence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_min_test_interval (double x_lower, double x_upper, double epsabs, double epsrel) +{ + const double lower = x_lower; + const double upper = x_upper; + + const double abs_lower = fabs(lower) ; + const double abs_upper = fabs(upper) ; + + double min_abs, tolerance; + + if (epsrel < 0.0) + GSL_ERROR ("relative tolerance is negative", GSL_EBADTOL); + + if (epsabs < 0.0) + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + + if (lower > upper) + GSL_ERROR ("lower bound larger than upper_bound", GSL_EINVAL); + + if ((lower > 0 && upper > 0) || (lower < 0 && upper < 0)) + { + min_abs = GSL_MIN_DBL(abs_lower, abs_upper) ; + } + else + { + min_abs = 0; + } + + tolerance = epsabs + epsrel * min_abs ; + + if (fabs(upper - lower) < tolerance) + return GSL_SUCCESS; + + return GSL_CONTINUE ; +} + diff --git a/software/gsl-1.15/min/fsolver.c b/software/gsl-1.15/min/fsolver.c new file mode 100644 index 000000000..4cbda85f5 --- /dev/null +++ b/software/gsl-1.15/min/fsolver.c @@ -0,0 +1,201 @@ +/* min/fsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "min.h" + +static int +compute_f_values (gsl_function * f, double x_minimum, double * f_minimum, + double x_lower, double * f_lower, + double x_upper, double * f_upper); + + +static int +compute_f_values (gsl_function * f, double x_minimum, double * f_minimum, + double x_lower, double * f_lower, + double x_upper, double * f_upper) +{ + SAFE_FUNC_CALL(f, x_lower, f_lower); + SAFE_FUNC_CALL(f, x_upper, f_upper); + SAFE_FUNC_CALL(f, x_minimum, f_minimum); + + return GSL_SUCCESS; +} + +int +gsl_min_fminimizer_set (gsl_min_fminimizer * s, + gsl_function * f, + double x_minimum, double x_lower, double x_upper) +{ + int status ; + + double f_minimum, f_lower, f_upper; + + status = compute_f_values (f, x_minimum, &f_minimum, + x_lower, &f_lower, + x_upper, &f_upper); + + if (status != GSL_SUCCESS) + { + return status ; + } + + status = gsl_min_fminimizer_set_with_values (s, f, x_minimum, f_minimum, + x_lower, f_lower, + x_upper, f_upper); + return status; +} + +gsl_min_fminimizer * +gsl_min_fminimizer_alloc (const gsl_min_fminimizer_type * T) +{ + gsl_min_fminimizer * s = + (gsl_min_fminimizer *) malloc (sizeof (gsl_min_fminimizer)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for minimizer struct", + GSL_ENOMEM, 0); + }; + + s->state = malloc (T->size); + + if (s->state == 0) + { + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for minimizer state", + GSL_ENOMEM, 0); + }; + + s->type = T ; + s->function = NULL; + + return s; +} + +int +gsl_min_fminimizer_set_with_values (gsl_min_fminimizer * s, gsl_function * f, + double x_minimum, double f_minimum, + double x_lower, double f_lower, + double x_upper, double f_upper) +{ + s->function = f; + s->x_minimum = x_minimum; + s->x_lower = x_lower; + s->x_upper = x_upper; + + if (x_lower > x_upper) + { + GSL_ERROR ("invalid interval (lower > upper)", GSL_EINVAL); + } + + if (x_minimum >= x_upper || x_minimum <= x_lower) + { + GSL_ERROR ("x_minimum must lie inside interval (lower < x < upper)", + GSL_EINVAL); + } + + s->f_lower = f_lower; + s->f_upper = f_upper; + s->f_minimum = f_minimum; + + if (f_minimum >= f_lower || f_minimum >= f_upper) + { + GSL_ERROR ("endpoints do not enclose a minimum", GSL_EINVAL); + } + + return (s->type->set) (s->state, s->function, + x_minimum, f_minimum, + x_lower, f_lower, + x_upper, f_upper); +} + + +int +gsl_min_fminimizer_iterate (gsl_min_fminimizer * s) +{ + return (s->type->iterate) (s->state, s->function, + &(s->x_minimum), &(s->f_minimum), + &(s->x_lower), &(s->f_lower), + &(s->x_upper), &(s->f_upper)); +} + +void +gsl_min_fminimizer_free (gsl_min_fminimizer * s) +{ + RETURN_IF_NULL (s); + free (s->state); + free (s); +} + +const char * +gsl_min_fminimizer_name (const gsl_min_fminimizer * s) +{ + return s->type->name; +} + +/* Deprecated, use x_minimum instead */ +double +gsl_min_fminimizer_minimum (const gsl_min_fminimizer * s) +{ + return s->x_minimum; +} + +double +gsl_min_fminimizer_x_minimum (const gsl_min_fminimizer * s) +{ + return s->x_minimum; +} + +double +gsl_min_fminimizer_x_lower (const gsl_min_fminimizer * s) +{ + return s->x_lower; +} + +double +gsl_min_fminimizer_x_upper (const gsl_min_fminimizer * s) +{ + return s->x_upper; +} + +double +gsl_min_fminimizer_f_minimum (const gsl_min_fminimizer * s) +{ + return s->f_minimum; +} + +double +gsl_min_fminimizer_f_lower (const gsl_min_fminimizer * s) +{ + return s->f_lower; +} + +double +gsl_min_fminimizer_f_upper (const gsl_min_fminimizer * s) +{ + return s->f_upper; +} + diff --git a/software/gsl-1.15/min/golden.c b/software/gsl-1.15/min/golden.c new file mode 100644 index 000000000..f09fe0329 --- /dev/null +++ b/software/gsl-1.15/min/golden.c @@ -0,0 +1,120 @@ +/* min/golden.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +/* goldensection.c -- goldensection minimum finding algorithm */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "min.h" + +typedef struct + { + double dummy; + } +goldensection_state_t; + +static int goldensection_init (void * vstate, gsl_function * f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper); +static int goldensection_iterate (void * vstate, gsl_function * f, double * x_minimum, double * f_minimum, double * x_lower, double * f_lower, double * x_upper, double * f_upper); + +static int +goldensection_init (void * vstate, gsl_function * f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper) +{ + goldensection_state_t * state = (goldensection_state_t *) vstate; + + /* no initialization required, prevent warnings about unused variables */ + + state = 0; + f = 0; + x_minimum = 0; + f_minimum = 0; + x_lower = 0; + f_lower = 0; + x_upper = 0; + f_upper = 0; + + return GSL_SUCCESS; +} + +static int +goldensection_iterate (void * vstate, gsl_function * f, double * x_minimum, double * f_minimum, double * x_lower, double * f_lower, double * x_upper, double * f_upper) +{ + goldensection_state_t * state = (goldensection_state_t *) vstate; + + const double x_center = *x_minimum ; + const double x_left = *x_lower ; + const double x_right = *x_upper ; + + const double f_min = *f_minimum; + + const double golden = 0.3819660; /* golden = (3 - sqrt(5))/2 */ + + const double w_lower = (x_center - x_left); + const double w_upper = (x_right - x_center); + + double x_new, f_new; + + state = 0 ; /* avoid warning about unused parameters */ + + x_new = x_center + golden * ((w_upper > w_lower) ? w_upper : -w_lower) ; + + SAFE_FUNC_CALL (f, x_new, &f_new); + + if (f_new < f_min) + { + *x_minimum = x_new ; + *f_minimum = f_new ; + return GSL_SUCCESS; + } + else if (x_new < x_center && f_new > f_min) + { + *x_lower = x_new ; + *f_lower = f_new ; + return GSL_SUCCESS; + } + else if (x_new > x_center && f_new > f_min) + { + *x_upper = x_new ; + *f_upper = f_new ; + return GSL_SUCCESS; + } + else + { + return GSL_FAILURE; + } +} + + +static const gsl_min_fminimizer_type goldensection_type = +{"goldensection", /* name */ + sizeof (goldensection_state_t), + &goldensection_init, + &goldensection_iterate}; + +const gsl_min_fminimizer_type * gsl_min_fminimizer_goldensection = &goldensection_type; diff --git a/software/gsl-1.15/min/gsl_min.h b/software/gsl-1.15/min/gsl_min.h new file mode 100644 index 000000000..c179572a3 --- /dev/null +++ b/software/gsl-1.15/min/gsl_min.h @@ -0,0 +1,111 @@ +/* min/gsl_min.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MIN_H__ +#define __GSL_MIN_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct + { + const char *name; + size_t size; + int (*set) (void *state, gsl_function * f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper); + int (*iterate) (void *state, gsl_function * f, double * x_minimum, double * f_minimum, double * x_lower, double * f_lower, double * x_upper, double * f_upper); + } +gsl_min_fminimizer_type; + +typedef struct + { + const gsl_min_fminimizer_type * type; + gsl_function * function ; + double x_minimum ; + double x_lower ; + double x_upper ; + double f_minimum, f_lower, f_upper; + void *state; + } +gsl_min_fminimizer; + +gsl_min_fminimizer * +gsl_min_fminimizer_alloc (const gsl_min_fminimizer_type * T) ; + +void gsl_min_fminimizer_free (gsl_min_fminimizer * s); + +int gsl_min_fminimizer_set (gsl_min_fminimizer * s, + gsl_function * f, double x_minimum, + double x_lower, double x_upper); + +int gsl_min_fminimizer_set_with_values (gsl_min_fminimizer * s, + gsl_function * f, + double x_minimum, double f_minimum, + double x_lower, double f_lower, + double x_upper, double f_upper); + +int gsl_min_fminimizer_iterate (gsl_min_fminimizer * s); + +const char * gsl_min_fminimizer_name (const gsl_min_fminimizer * s); + +double gsl_min_fminimizer_x_minimum (const gsl_min_fminimizer * s); +double gsl_min_fminimizer_x_lower (const gsl_min_fminimizer * s); +double gsl_min_fminimizer_x_upper (const gsl_min_fminimizer * s); +double gsl_min_fminimizer_f_minimum (const gsl_min_fminimizer * s); +double gsl_min_fminimizer_f_lower (const gsl_min_fminimizer * s); +double gsl_min_fminimizer_f_upper (const gsl_min_fminimizer * s); + +/* Deprecated, use x_minimum instead */ +double gsl_min_fminimizer_minimum (const gsl_min_fminimizer * s); + +int +gsl_min_test_interval (double x_lower, double x_upper, double epsabs, double epsrel); + +GSL_VAR const gsl_min_fminimizer_type * gsl_min_fminimizer_goldensection; +GSL_VAR const gsl_min_fminimizer_type * gsl_min_fminimizer_brent; +GSL_VAR const gsl_min_fminimizer_type * gsl_min_fminimizer_quad_golden; + +typedef +int (*gsl_min_bracketing_function)(gsl_function *f, + double *x_minimum,double * f_minimum, + double *x_lower, double * f_lower, + double *x_upper, double * f_upper, + size_t eval_max); + +int +gsl_min_find_bracket(gsl_function *f,double *x_minimum,double * f_minimum, + double *x_lower, double * f_lower, + double *x_upper, double * f_upper, + size_t eval_max); + +__END_DECLS + +#endif /* __GSL_MIN_H__ */ diff --git a/software/gsl-1.15/min/min.h b/software/gsl-1.15/min/min.h new file mode 100644 index 000000000..f20050b11 --- /dev/null +++ b/software/gsl-1.15/min/min.h @@ -0,0 +1,25 @@ +/* min/min.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define SAFE_FUNC_CALL(f, x, yp) \ +do { \ + *yp = GSL_FN_EVAL(f,x); \ + if (!gsl_finite(*yp)) \ + GSL_ERROR("computed function value is infinite or NaN", GSL_EBADFUNC); \ +} while (0) diff --git a/software/gsl-1.15/min/quad_golden.c b/software/gsl-1.15/min/quad_golden.c new file mode 100644 index 000000000..c078bd66e --- /dev/null +++ b/software/gsl-1.15/min/quad_golden.c @@ -0,0 +1,343 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* quad_golden.c */ +/* */ +/* Copyright (C) 2007 James Howse */ +/* Copyright (C) 2009 Brian Gough */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of the GNU General Public License as published by */ +/* the Free Software Foundation; either version 3 of the License, or (at */ +/* your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ +/* General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU General Public License */ +/* along with this program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, Fifth Floor, */ +/* Boston, MA 02110-1301, USA. */ +/* */ +/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ +/* */ +/* This algorithm performs univariate minimization (i.e., line search). */ +/* It requires only objective function values g(x) to compute the minimum. */ +/* The algorithm maintains an interval of uncertainty [a,b] and a point x */ +/* in the interval [a,b] such that a < x < b, and g(a) > g(x) and */ +/* g(x) < g(b). The algorithm also maintains the three points with the */ +/* smallest objective values x, v and w such that g(x) < g(v) < g(w). The */ +/* algorithm terminates when max( x - a, b - x ) < 2(r |x| + t) where r */ +/* and t are small positive reals. At a given iteration, the algorithm */ +/* first fits a quadratic through the three points (x, g(x)), (v, g(v)) */ +/* and (w, g(w)) and computes the location of the minimum u of the */ +/* resulting quadratic. If u is in the interval [a,b] then g(u) is */ +/* computed. If u is not in the interval [a,b], and either v < x and */ +/* w < x, or v > x and w > x (i.e., the quadratic is extrapolating), then */ +/* a point u' is computed using a safeguarding procedure and g(u') is */ +/* computed. If u is not in the interval [a,b], and the quadratic is not */ +/* extrapolating, then a point u'' is computed using approximate golden */ +/* section and g(u'') is computed. After evaluating g() at the */ +/* appropriate new point, a, b, x, v, and w are updated and the next */ +/* iteration is performed. The algorithm is based on work presented in */ +/* the following references. */ +/* */ +/* Algorithms for Minimization without derivatives */ +/* Richard Brent */ +/* Prentice-Hall Inc., Englewood Cliffs, NJ, 1973 */ +/* */ +/* Safeguarded Steplength Algorithms for Optimization using Descent Methods */ +/* Philip E. Gill and Walter Murray */ +/* Division of Numerical Analysis and Computing */ +/* National Physical Laboratory, Teddington, United Kingdom */ +/* NPL Report NAC 37, August 1974 */ +/* */ +/*----------------------------------------------------------------------------*/ +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "min.h" + +#define REL_ERR_VAL 1.0e-06 +#define ABS_ERR_VAL 1.0e-10 +#define GOLDEN_MEAN 0.3819660112501052 /* (3 - sqrt(5))/2 */ +#define GOLDEN_RATIO 1.6180339887498950 /* (1 + sqrt(5))/2 */ + +#define DEBUG_PRINTF(x) /* do nothing */ + +typedef struct +{ + double step_size, stored_step, prev_stored_step; + double x_prev_small, f_prev_small, x_small, f_small; + unsigned int num_iter; +} +quad_golden_state_t; + +static int +quad_golden_init (void *vstate, gsl_function * f, double x_minimum, + double f_minimum, double x_lower, double f_lower, + double x_upper, double f_upper) +{ + quad_golden_state_t *state = (quad_golden_state_t *) vstate; + + /* For the original behavior, the first value for x_minimum_minimum + passed in by the user should be a golden section step but we + don't enforce this here. */ + + state->x_prev_small = x_minimum; + state->x_small = x_minimum; + + state->f_prev_small = f_minimum; + state->f_small = f_minimum; + + state->step_size = 0.0; + state->stored_step = 0.0; + state->prev_stored_step = 0.0; + state->num_iter = 0; + + x_lower = 0 ; /* avoid warnings about unused variables */ + x_upper = 0 ; + f_lower = 0 ; + f_upper = 0 ; + f = 0; + + return GSL_SUCCESS; +} + +static int +quad_golden_iterate (void *vstate, gsl_function * f, double *x_minimum, + double *f_minimum, double *x_lower, double *f_lower, + double *x_upper, double *f_upper) +{ + quad_golden_state_t *state = (quad_golden_state_t *) vstate; + + const double x_m = *x_minimum; + const double f_m = *f_minimum; + + const double x_l = *x_lower; + const double x_u = *x_upper; + + const double x_small = state->x_small; + const double f_small = state->f_small; + + const double x_prev_small = state->x_prev_small; + const double f_prev_small = state->f_prev_small; + + double stored_step = state->stored_step; /* update on exit */ + double prev_stored_step = state->prev_stored_step; /* update on exit */ + double step_size = state->step_size; /* update on exit */ + + double quad_step_size = prev_stored_step; + + double x_trial; + double x_eval, f_eval; + + double x_midpoint = 0.5 * (x_l + x_u); + double tol = REL_ERR_VAL * fabs (x_m) + ABS_ERR_VAL; /* total error tolerance */ + + if (fabs (stored_step) - tol > -2.0 * GSL_DBL_EPSILON) + { + /* Fit quadratic */ + double c3 = (x_m - x_small) * (f_m - f_prev_small); + double c2 = (x_m - x_prev_small) * (f_m - f_small); + double c1 = (x_m - x_prev_small) * c2 - (x_m - x_small) * c3; + + c2 = 2.0 * (c2 - c3); + + if (fabs (c2) > GSL_DBL_EPSILON) /* if( c2 != 0 ) */ + { + if (c2 > 0.0) + c1 = -c1; + + c2 = fabs (c2); + + quad_step_size = c1 / c2; + } + else + { + /* Handle case where c2 ~=~ 0 */ + /* Insure that the line search will NOT take a quadratic + interpolation step in this iteration */ + quad_step_size = stored_step; + } + + prev_stored_step = stored_step; + stored_step = step_size; + } + + x_trial = x_m + quad_step_size; + + if (fabs (quad_step_size) < fabs (0.5 * prev_stored_step) && x_trial > x_l && x_trial < x_u) + { + /* Take quadratic interpolation step */ + step_size = quad_step_size; + + /* Do not evaluate function too close to x_l or x_u */ + if ((x_trial - x_l) < 2.0 * tol || (x_u - x_trial) < 2.0 * tol) + { + step_size = (x_midpoint >= x_m ? +1.0 : -1.0) * fabs(tol); + } + + DEBUG_PRINTF(("quadratic step: %g\n", step_size)); + } + else if ((x_small != x_prev_small && x_small < x_m && x_prev_small < x_m) || + (x_small != x_prev_small && x_small > x_m && x_prev_small > x_m)) + { + /* Take safeguarded function comparison step */ + double outside_interval, inside_interval; + + if (x_small < x_m) + { + outside_interval = x_l - x_m; + inside_interval = x_u - x_m; + } + else + { + outside_interval = x_u - x_m; + inside_interval = x_l - x_m; + } + + if (fabs (inside_interval) <= tol) + { + /* Swap inside and outside intervals */ + double tmp = outside_interval; + outside_interval = inside_interval; + inside_interval = tmp; + } + + { + double step = inside_interval; + double scale_factor; + + if (fabs (outside_interval) < fabs (inside_interval)) + { + scale_factor = 0.5 * sqrt (-outside_interval / inside_interval); + } + else + { + scale_factor = (5.0 / 11.0) * (0.1 - inside_interval / outside_interval); + } + + state->stored_step = step; + step_size = scale_factor * step; + } + + DEBUG_PRINTF(("safeguard step: %g\n", step_size)); + } + else + { + /* Take golden section step */ + double step; + + if (x_m < x_midpoint) + { + step = x_u - x_m; + } + else + { + step = x_l - x_m; + } + + state->stored_step = step; + step_size = GOLDEN_MEAN * step; + + DEBUG_PRINTF(("golden step: %g\n", step_size)); + } + + /* Do not evaluate function too close to x_minimum */ + if (fabs (step_size) > tol) + { + x_eval = x_m + step_size; + } + else + { + x_eval = x_m + (step_size >= 0 ? +1.0 : -1.0) * fabs(tol); + } + + /* Evaluate function at the new point x_eval */ + SAFE_FUNC_CALL(f, x_eval, &f_eval); + + /* Update {x,f}_lower, {x,f}_upper, {x,f}_prev_small, {x,f}_small, and {x,f}_minimum */ + if (f_eval <= f_m) + { + if (x_eval < x_m) + { + *x_upper = x_m; + *f_upper = f_m; + } + else + { + *x_lower = x_m; + *f_upper = f_m; + } + + state->x_prev_small = x_small; + state->f_prev_small = f_small; + + state->x_small = x_m; + state->f_small = f_m; + + *x_minimum = x_eval; + *f_minimum = f_eval; + } + else + { + if (x_eval < x_m) + { + *x_lower = x_eval; + *f_lower = f_eval; + } + else + { + *x_upper = x_eval; + *f_upper = f_eval; + } + + if (f_eval <= f_small || fabs (x_small - x_m) < 2.0 * GSL_DBL_EPSILON) + { + state->x_prev_small = x_small; + state->f_prev_small = f_small; + + state->x_small = x_eval; + state->f_small = f_eval; + } + else if (f_eval <= f_prev_small || + fabs (x_prev_small - x_m) < 2.0 * GSL_DBL_EPSILON || + fabs (x_prev_small - x_small) < 2.0 * GSL_DBL_EPSILON) + { + state->x_prev_small = x_eval; + state->f_prev_small = f_eval; + } + } + + /* Update stored values for next iteration */ + + state->stored_step = stored_step; + state->prev_stored_step = prev_stored_step; + state->step_size = step_size; + state->num_iter++; + + DEBUG_PRINTF(("[%d] Final State: %g %g %g\n", state->num_iter, x_l, x_m, x_u)); + + return GSL_SUCCESS; +} + + +static const gsl_min_fminimizer_type quad_golden_type = { "quad-golden", /* name */ + sizeof (quad_golden_state_t), + &quad_golden_init, + &quad_golden_iterate +}; + +const gsl_min_fminimizer_type *gsl_min_fminimizer_quad_golden = + &quad_golden_type; diff --git a/software/gsl-1.15/min/test.c b/software/gsl-1.15/min/test.c new file mode 100644 index 000000000..d9b037d27 --- /dev/null +++ b/software/gsl-1.15/min/test.c @@ -0,0 +1,216 @@ +/* min/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#include +#include +#include +#include +#include +#include +#include + +#include "test.h" +#include "min.h" + +/* stopping parameters */ + +const double EPSABS = 0.001 ; +const double EPSREL = 0.001 ; + +const unsigned int MAX_ITERATIONS = 100; + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +#define WITHIN_TOL(a, b, epsrel, epsabs) \ + (fabs((a) - (b)) < (epsrel) * GSL_MIN(fabs(a), fabs(b)) + (epsabs)) + +int +main (void) +{ + gsl_function F_cos, F_func1, F_func2, F_func3, F_func4; + + const gsl_min_fminimizer_type * fminimizer[4] ; + const gsl_min_fminimizer_type ** T; + + gsl_ieee_env_setup (); + + fminimizer[0] = gsl_min_fminimizer_goldensection; + fminimizer[1] = gsl_min_fminimizer_brent; + fminimizer[2] = gsl_min_fminimizer_quad_golden; + fminimizer[3] = 0; + + F_cos = create_function (f_cos) ; + F_func1 = create_function (func1) ; + F_func2 = create_function (func2) ; + F_func3 = create_function (func3) ; + F_func4 = create_function (func4) ; + + gsl_set_error_handler (&my_error_handler); + + for (T = fminimizer ; *T != 0 ; T++) + { + test_f (*T, "cos(x) [0 (3) 6]", &F_cos, 0.0, 3.0, 6.0, M_PI); + test_f (*T, "x^4 - 1 [-3 (-1) 17]", &F_func1, -3.0, -1.0, 17.0, 0.0); + test_f (*T, "sqrt(|x|) [-2 (-1) 1.5]", &F_func2, -2.0, -1.0, 1.5, 0.0); + test_f (*T, "func3(x) [-2 (3) 4]", &F_func3, -2.0, 3.0, 4.0, 1.0); + test_f (*T, "func4(x) [0 (0.782) 1]", &F_func4, 0, 0.782, 1.0, 0.8); + + test_f_e (*T, "invalid range check [4, 0]", &F_cos, 4.0, 3.0, 0.0, M_PI); + test_f_e (*T, "invalid range check [1, 1]", &F_cos, 1.0, 1.0, 1.0, M_PI); + test_f_e (*T, "invalid range check [-1, 1]", &F_cos, -1.0, 0.0, 1.0, M_PI); + } + test_bracket("cos(x) [1,2]",&F_cos,1.0,2.0,15); + test_bracket("sqrt(|x|) [-1,0]",&F_func2,-1.0,0.0,15); + test_bracket("sqrt(|x|) [-1,-0.6]",&F_func2,-1.0,-0.6,15); + test_bracket("sqrt(|x|) [-1,1]",&F_func2,-1.0,1.0,15); + + exit (gsl_test_summary ()); +} + +void +test_f (const gsl_min_fminimizer_type * T, + const char * description, gsl_function *f, + double lower_bound, double middle, double upper_bound, + double correct_minimum) +{ + int status; + size_t iterations = 0; + double m, a, b; + double x_lower, x_upper; + gsl_min_fminimizer * s; + + x_lower = lower_bound; + x_upper = upper_bound; + + s = gsl_min_fminimizer_alloc (T) ; + gsl_min_fminimizer_set (s, f, middle, x_lower, x_upper) ; + + do + { + iterations++ ; + + status = gsl_min_fminimizer_iterate (s); + + m = gsl_min_fminimizer_x_minimum(s); + a = gsl_min_fminimizer_x_lower(s); + b = gsl_min_fminimizer_x_upper(s); + +#ifdef DEBUG + printf("%.12f %.18f %.12f %.18f %.12f %.18f status=%d\n", + a, GSL_FN_EVAL(f, a), m, GSL_FN_EVAL(f, m), b, GSL_FN_EVAL(f, b), status); +#endif + + if (a > b) + gsl_test (GSL_FAILURE, "interval is invalid (%g,%g)", a, b); + + if (m < a || m > b) + gsl_test (GSL_FAILURE, "m lies outside interval %g (%g,%g)", m, a, b); + + if (status) break ; + + status = gsl_min_test_interval (a, b, EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + gsl_test (status, "%s, %s (%g obs vs %g expected) ", + gsl_min_fminimizer_name(s), description, + gsl_min_fminimizer_x_minimum(s), correct_minimum); + + /* check the validity of the returned result */ + + if (!WITHIN_TOL (m, correct_minimum, EPSREL, EPSABS)) + { + gsl_test (GSL_FAILURE, "incorrect precision (%g obs vs %g expected)", + m, correct_minimum); + } + + gsl_min_fminimizer_free (s); + +} + +void +test_f_e (const gsl_min_fminimizer_type * T, + const char * description, gsl_function *f, + double lower_bound, double middle, double upper_bound, + double correct_minimum) +{ + int status; + size_t iterations = 0; + double x_lower, x_upper; + double a, b; + gsl_min_fminimizer * s; + + x_lower = lower_bound; + x_upper = upper_bound; + + s = gsl_min_fminimizer_alloc (T) ; + status = gsl_min_fminimizer_set (s, f, middle, x_lower, x_upper) ; + + if (status != GSL_SUCCESS) + { + gsl_min_fminimizer_free (s) ; + gsl_test (status == GSL_SUCCESS, "%s, %s", T->name, description); + return ; + } + + do + { + iterations++ ; + gsl_min_fminimizer_iterate (s); + a = gsl_min_fminimizer_x_lower(s); + b = gsl_min_fminimizer_x_upper(s); + + status = gsl_min_test_interval (a, b, EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + gsl_test (!status, "%s, %s", gsl_min_fminimizer_name(s), description, + gsl_min_fminimizer_x_minimum(s) - correct_minimum); + + gsl_min_fminimizer_free (s); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); +} + +int +test_bracket (const char * description,gsl_function *f,double lower_bound, + double upper_bound, unsigned int max) +{ + int status; + double x_lower, x_upper; + double f_upper,f_lower,f_minimum; + double x_minimum; + + x_lower=lower_bound; + x_upper=upper_bound; + SAFE_FUNC_CALL (f,x_lower,&f_lower); + SAFE_FUNC_CALL (f,x_upper,&f_upper); + status=gsl_min_find_bracket(f,&x_minimum,&f_minimum,&x_lower,&f_lower,&x_upper,&f_upper,max); + gsl_test (status,"%s, interval: [%g,%g], values: (%g,%g), minimum at: %g, value: %g", + description,x_lower,x_upper,f_lower,f_upper,x_minimum,f_minimum); + return status; +} + + + diff --git a/software/gsl-1.15/min/test.h b/software/gsl-1.15/min/test.h new file mode 100644 index 000000000..5cc3f191f --- /dev/null +++ b/software/gsl-1.15/min/test.h @@ -0,0 +1,42 @@ +/* min/test.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +gsl_function create_function (double (*f)(double, void *)); + +void +test_f_e (const gsl_min_fminimizer_type * T, + const char * description, gsl_function *f, + double lower_bound, double minimum, double upper_bound, + double correct_minimum); + +void +test_f (const gsl_min_fminimizer_type * T, + const char * description, gsl_function *f, + double lower_bound, double middle, double upper_bound, + double correct_minimum); + +int +test_bracket (const char * description,gsl_function *f,double lower_bound, + double upper_bound, unsigned int max); + +double f_cos (double x, void * p); +double func1 (double x, void * p); +double func2 (double x, void * p); +double func3 (double x, void * p); +double func4 (double x, void * p); diff --git a/software/gsl-1.15/min/test_funcs.c b/software/gsl-1.15/min/test_funcs.c new file mode 100644 index 000000000..50f4f525c --- /dev/null +++ b/software/gsl-1.15/min/test_funcs.c @@ -0,0 +1,85 @@ +/* min/test_funcs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include "test.h" + +gsl_function create_function (double (*f)(double, void *)) +{ + gsl_function F ; + F.function = f ; + F.params = 0 ; + return F ; +} + +double +f_cos (double x, void * p) +{ + p = 0; /* avoid warning about unused parameter */ + return cos(x); +} + +/* f(x) = x^4 - 1 */ +/* minimum at x = 0 */ + +double +func1 (double x, void * p) +{ + p = 0; /* avoid warning about unused parameter */ + return pow (x, 4.0) - 1; +} + +/* f(x) = sqrt(|x|) */ +/* minimum at x = 0 */ + +double +func2 (double x, void * p) +{ + p = 0; /* avoid warning about unused parameter */ + return sqrt(fabs(x)); +} + + +/* f(x) = 1 for x < 1 and -exp(-x) for x >= 1 */ +/* minimum at x = 1 */ + +double +func3 (double x, void * p) +{ + p = 0; /* avoid warning about unused parameter */ + + if (x < 1) + return 1 ; + else + return - exp(-x) ; +} + +/* f(x) = x - 30/(1+1e5*(x-0.8)**2) */ +/* minimum near x = 0.8 */ + +double +func4 (double x, void * p) +{ + p = 0; /* avoid warning about unused parameter */ + + return x - 30.0 / (1.0 + 1e5 * pow(x-0.8, 2.0)); +} + diff --git a/software/gsl-1.15/missing b/software/gsl-1.15/missing new file mode 100755 index 000000000..28055d2ae --- /dev/null +++ b/software/gsl-1.15/missing @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/software/gsl-1.15/mkinstalldirs b/software/gsl-1.15/mkinstalldirs new file mode 100755 index 000000000..4191a45db --- /dev/null +++ b/software/gsl-1.15/mkinstalldirs @@ -0,0 +1,162 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2009-04-28.21; # UTC + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/software/gsl-1.15/monte/.deps/miser.Plo b/software/gsl-1.15/monte/.deps/miser.Plo new file mode 100644 index 000000000..f6f84272e --- /dev/null +++ b/software/gsl-1.15/monte/.deps/miser.Plo @@ -0,0 +1,138 @@ +miser.lo: miser.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_rng.h ../gsl/gsl_monte.h \ + ../gsl/gsl_monte_miser.h ../gsl/gsl_monte_plain.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_monte.h: + +../gsl/gsl_monte_miser.h: + +../gsl/gsl_monte_plain.h: diff --git a/software/gsl-1.15/monte/.deps/plain.Plo b/software/gsl-1.15/monte/.deps/plain.Plo new file mode 100644 index 000000000..0c1b26fd3 --- /dev/null +++ b/software/gsl-1.15/monte/.deps/plain.Plo @@ -0,0 +1,135 @@ +plain.lo: plain.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_monte_plain.h ../gsl/gsl_monte.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_monte_plain.h: + +../gsl/gsl_monte.h: diff --git a/software/gsl-1.15/monte/.deps/test.Po b/software/gsl-1.15/monte/.deps/test.Po new file mode 100644 index 000000000..a89acd8ba --- /dev/null +++ b/software/gsl-1.15/monte/.deps/test.Po @@ -0,0 +1,147 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_rng.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_monte_plain.h ../gsl/gsl_monte.h \ + ../gsl/gsl_monte_miser.h ../gsl/gsl_monte_vegas.h test_main.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_monte_plain.h: + +../gsl/gsl_monte.h: + +../gsl/gsl_monte_miser.h: + +../gsl/gsl_monte_vegas.h: + +test_main.c: diff --git a/software/gsl-1.15/monte/.deps/vegas.Plo b/software/gsl-1.15/monte/.deps/vegas.Plo new file mode 100644 index 000000000..d0aca6bee --- /dev/null +++ b/software/gsl-1.15/monte/.deps/vegas.Plo @@ -0,0 +1,136 @@ +vegas.lo: vegas.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_monte_vegas.h ../gsl/gsl_monte.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_monte_vegas.h: + +../gsl/gsl_monte.h: diff --git a/software/gsl-1.15/monte/ChangeLog b/software/gsl-1.15/monte/ChangeLog new file mode 100644 index 000000000..1150fd480 --- /dev/null +++ b/software/gsl-1.15/monte/ChangeLog @@ -0,0 +1,220 @@ +2009-07-25 Brian Gough + + * vegas.c (gsl_monte_vegas_params_get) + (gsl_monte_vegas_params_set): added get/set functions for params + (gsl_monte_vegas_chisq): added chisq accessor + + * gsl_monte_vegas.h: added separate params struct + + * miser.c (gsl_monte_miser_params_set) + (gsl_monte_miser_params_get): added get/set functions for params + + * gsl_monte_miser.h: added separate params struct + +2009-07-09 Brian Gough + + * vegas.c (gsl_monte_vegas_free): handle NULL argument in free + + * plain.c (gsl_monte_plain_free): handle NULL argument in free + + * miser.c (gsl_monte_miser_free): handle NULL argument in free + +2009-02-10 Brian Gough + + * vegas.c (gsl_monte_vegas_integrate): use gsl_pow_int to compute + tot_boxes, avoids potentially inaccurate pow functions (MinGW). + +2008-11-20 Brian Gough + + * vegas.c (gsl_monte_vegas_integrate): improve the chisq + calculation to avoid cancellation errors in the original + formula (fixes bug #24510) + + * test.c (MONTE_ERROR_TEST): added test cases for negative chisq + in vegas + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-04-26 Brian Gough + + * vegas.c (gsl_monte_vegas_integrate): compute running totals as + volatile double to prevent problems with excess precision, use + meaningful variable names for sum of squares, variance and sigma. + + * test_main.c: compute the ensemble mean more accurately for the tests + + * test.c: added a test for warm-start vegas, as well as cold-start + + * miser.c (gsl_monte_miser_integrate): catch zero weights to avoid + division by zero + + * test.c (main): added test for step-type function + +2004-06-02 Brian Gough + + * test_main.c: handle the case where sd==0 && error[i] !=0 more + carefully + +Mon Apr 23 13:23:47 2001 Brian Gough + + * test_main.c: removed unused status variable + +Sat Jan 6 19:56:49 2001 Brian Gough + + * miser.c (gsl_monte_miser_free): fixed memory leak for s->hits_{r,l} + + * vegas.c (gsl_monte_vegas_free): fixed memory leak for s->x + +Fri Dec 22 21:43:04 2000 Brian Gough + + * miser.c: removed max-min estimation method for subvolumes. We + will use the standard variance method and try to use a sufficient + number of points to estimate the variance reliably. + +Wed Dec 20 21:32:40 2000 Brian Gough + + * vegas.c: tidied up the algorithm, deal with cases of sigma = 0 + explicitly. + +Sat Dec 9 14:19:53 2000 Brian Gough + + * reorganization and clean up + +Thu Nov 16 19:50:27 2000 Brian Gough + + * miser.c: rewrite to fix overflows and make calling conventions + consistent + + * plain.c: rewrite to fix overflows and make calling conventions + consistent + +Thu Oct 26 20:06:36 2000 Brian Gough + + * plain.c (gsl_monte_plain_integrate): integer factor + calls*(calls-1) used in numerical expression can easily overflow, + changed to calls*(calls-1.0). + +Sat Oct 21 20:36:06 2000 Brian Gough + + * miser.c (gsl_monte_miser_integrate): fixed bug where hits_l was + used in place of hits_r + +Tue Sep 19 19:16:37 2000 Brian Gough + + * plain.c (gsl_monte_plain_alloc): initialise check_done to avoid + warning about use of unitialised memory + + * vegas.c (gsl_monte_vegas_alloc): as above + + * miser.c (gsl_monte_miser_alloc): as above + + * plain.c miser.c: removed use of sprintf for error messages + +Wed May 31 19:50:19 2000 Brian Gough + + * miser_test.c (main): increased tolerances to allow tests to pass + with different compilers + +Mon May 15 15:26:22 2000 Brian Gough + + * vegas_test.c (main): added gsl_ieee_env_setup() to allow change + of precision in tests + + * miser_test.c (main): ditto + + * plain_test.c (main): ditto + +Fri Feb 26 14:49:56 1999 Brian Gough + + * Makefile.am: removed ..._LDFLAGS = -static since this is + specific to gcc + + + +Wed Nov 18 10:59:56 1998 Brian Gough + + * use standard headers templates_on.h and templates_off.h instead + of source.h + +Tue Nov 17 16:49:12 1998 Brian Gough + + * added #include to all top-level source files + + * plain.c (gsl_monte_plain_integrate): replaced myMAX by GSL_MAX + + * utils.c: move macros around to avoid double definition + +Fri Aug 14 10:12:06 1998 Brian Gough + + * Makefile.am: I needed to add utils.h to libgslmonte_a_SOURCES to + get it to work with my automake + +Thu Jul 30 17:31:29 1998 booth + + * gsl_monte_miser.h, miser.c: + Turn off the annoying warning in miser unless the user requests it. + +Wed Jul 29 20:24:54 1998 bjg + + * Makefile.am, Makefile.in: some fixes to pass make distcheck + + * Makefile.am, Makefile.in: + experimenting with new top level makefile.am + +Tue Jul 28 17:05:20 1998 booth + + * plain.c, vegas.c, miser.c: + make all the _free functions check their argument. Also, the init functions + now throw EFAULT if given a null pointer. + + * gsl_monte_vegas.h, vegas.c: + vegas1, vegas2 and vegas3 all go away. Get them by setting the "stage" + variabe appropriately. Also, make _free check its argument. + + * vegas.c, gsl_monte_vegas.h: minor cleanup prior to be change. + + * vegas.c: minor changes, commiting by accident. + +Mon Jul 27 22:52:49 1998 bjg + + * Makefile.in, Makefile.am: + fixed some of the include requirements for make dist + +Mon Jul 27 15:19:54 1998 booth + + * vegas_print.h, vegas_test.c, miser_test.c, vegas-print.c, vegas.c, Attic/gsl_vegas.h, Attic/gsl_vegas_print.h, gsl_monte_vegas.h, miser.c, Attic/gsl_miser.h, Makefile.am, Makefile.in, gsl_monte_miser.h: + Renamed public header files to follow convention correctly. + + * vegas.c, vegas_test.c, miser.c, miser_test.c, plain.c, plain_test.c, Attic/gsl_miser.h, Attic/gsl_vegas.h, gsl_monte_plain.h: + All the integration functions now end with _integrate (except for + vegas1, vegas2 and vegas3 which are going away RSN). + +Tue Jul 21 21:54:33 1998 booth + + * vegas.c, vegas-print.c, Attic/gsl_vegas_print.h, Attic/gsl_vegas.h: + trivial stuff: eliminate compiler warnings, eliminate some unneeded variables, + change some types to make consistent with plain and miser. + + * gsl_monte_plain.h, plain.c, plain_test.c: + Make "plain" conform to same style as miser and vegas. + +Fri Jul 17 02:23:40 1998 jungman + + * Makefile.in: we're gonna make it... + +Thu Jul 16 16:23:45 1998 booth + + * vegas-print.c, vegas.c, Attic/gsl_vegas_print.h: + Have now completely eliminated all static variables. + + * vegas_test.c, vegas.c, Attic/gsl_vegas.h, Attic/gsl_vegas_print.h, vegas-print.c: + Continuing to remove all static variables from vegas. + +Wed Jul 15 19:10:24 1998 booth + + * vegas.c, vegas_test.c, Attic/gsl_vegas.h: + Do the state-structure thing for vegas. Not finished, so far the only + real content is the rng structure. + diff --git a/software/gsl-1.15/monte/Makefile.am b/software/gsl-1.15/monte/Makefile.am new file mode 100644 index 000000000..7f9bd5e99 --- /dev/null +++ b/software/gsl-1.15/monte/Makefile.am @@ -0,0 +1,21 @@ +noinst_LTLIBRARIES = libgslmonte.la + +libgslmonte_la_SOURCES = miser.c plain.c gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h gsl_monte.h vegas.c + +pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test #demo + +test_SOURCES = test.c +test_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +noinst_HEADERS = test_main.c + +#demo_SOURCES= demo.c +#demo_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la + + diff --git a/software/gsl-1.15/monte/Makefile.in b/software/gsl-1.15/monte/Makefile.in new file mode 100644 index 000000000..413db5caa --- /dev/null +++ b/software/gsl-1.15/monte/Makefile.in @@ -0,0 +1,667 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = monte +DIST_COMMON = README $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmonte_la_LIBADD = +am_libgslmonte_la_OBJECTS = miser.lo plain.lo vegas.lo +libgslmonte_la_OBJECTS = $(am_libgslmonte_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmonte.la ../rng/libgslrng.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmonte_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmonte_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmonte.la +libgslmonte_la_SOURCES = miser.c plain.c gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h gsl_monte.h vegas.c +pkginclude_HEADERS = gsl_monte.h gsl_monte_vegas.h gsl_monte_miser.h gsl_monte_plain.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +noinst_HEADERS = test_main.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu monte/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu monte/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmonte.la: $(libgslmonte_la_OBJECTS) $(libgslmonte_la_DEPENDENCIES) + $(LINK) $(libgslmonte_la_OBJECTS) $(libgslmonte_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vegas.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES= demo.c +#demo_LDADD = libgslmonte.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/monte/README b/software/gsl-1.15/monte/README new file mode 100644 index 000000000..9658d7bb0 --- /dev/null +++ b/software/gsl-1.15/monte/README @@ -0,0 +1,37 @@ +G. P. Lepage, "VEGAS..." J. Comp. Phys. 27, 192(1978). +W.H. Press, G.R. Farrar, "Miser..." Computers in Physics, v4 (1990), pp190-195 + +References from PVEGAS by Richard Kreckel + +[1]: G.P. Lepage: A New Algorithm for Adaptive Multidimensional + Integration; Journal of Computational Physics 27, + 192-203, (1978) + +[2]: W. Press, S. Teukolsky, W. Vetterling, B. Flannery: Numerical + Recipes in C, (second edition) Cambridge University Press, + 1992. + +[3]: R.C. Tausworthe: Random numbers generated by linear + recurrence modulo two, Math. Comput. 19, 201-209, (1965) + +[4]: I. Deak: Uniform random number generators for parallel + computers; Parallel Computing, 15, 155-164, (1990) + +[5]: R. Kreckel: Parallelization of adaptive MC integrators, + MZ-TH/97-30, physics/9710028; Comp. Phys. Comm., 106, 258-266, + (1997) (A preliminary version of this article can be retrieved + via anonymous ftp from ftpthep.physik.uni-mainz.de in the directory + /pub/pvegas/.) + +[6]: S. Veseli: Multidimensional integration in a heterogeneous + network environment; FERMILAB-PUB-97/271-T; physics/9710017 + +[7]: R. Kreckel: Addendum: Parallelization of adaptive MC integrators, + (Available via anonymous ftp from ftpthep.physik.uni-mainz.de in + the directory /pub/pvegas/.) + +[8]: MPI-Forum: MPI: A Message-Passing Interface Standard, University + of Tennessee, Knoxville, Tennessee, (1995) + +[9]: T. Ohl: Vegas Revisited: Adaptive Monte Carlo Integration Beyond + Factorization; hep-ph/9806432 diff --git a/software/gsl-1.15/monte/TODO b/software/gsl-1.15/monte/TODO new file mode 100644 index 000000000..7b7a070ca --- /dev/null +++ b/software/gsl-1.15/monte/TODO @@ -0,0 +1,28 @@ +# -*- org -*- +#+CATEGORY: monte + +* Add Lattice Method and Quasi-random Method to monte carlo integration + +* Fix the "No-points in left/right half space" error in miser. Random +errors like that are discouraged in a library. The routine should +iterate over the dimensions choosing a point on each side of the +bisection to ensure that the error does not occur. + +* VEGAS could estimate its roundoff error, caused by dividing up into +many boxes and then summing (I know this is ridiculous for any +realistic case, but it shows up on the tests when integrating a +constant!). In particular, there are some failures reported for the +VEGAS constant tests on Windows. + +* VEGAS gives a negative chisq for some cases where there are wildly +inconsistent values. Calculation should be improved so that chisq>=0. + +Also, when there are inconsistent values it might make sense to scale +the error by chisq, as is often done experimentally -- at least that +way the error would be increased. + +* The original VEGAS allowed to user to calculate other weighted +quantities. The appropriate way to implement it in GSL would be to +provide a separate routine which returns sample points and weights so +that the user can caculate any quantity. + diff --git a/software/gsl-1.15/monte/gsl_monte.h b/software/gsl-1.15/monte/gsl_monte.h new file mode 100644 index 000000000..4d1d88e25 --- /dev/null +++ b/software/gsl-1.15/monte/gsl_monte.h @@ -0,0 +1,55 @@ +/* monte/gsl_monte.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Some things common to all the Monte-Carlo implementations */ +/* Author: MJB */ + +#ifndef __GSL_MONTE_H__ +#define __GSL_MONTE_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Hide the function type in a typedef so that we can use it in all our + integration functions, and make it easy to change things. +*/ + +struct gsl_monte_function_struct { + double (*f)(double * x_array, size_t dim, void * params); + size_t dim; + void * params; +}; + +typedef struct gsl_monte_function_struct gsl_monte_function; + +#define GSL_MONTE_FN_EVAL(F,x) (*((F)->f))(x,(F)->dim,(F)->params) + + +__END_DECLS + +#endif /* __GSL_MONTE_H__ */ diff --git a/software/gsl-1.15/monte/gsl_monte_miser.h b/software/gsl-1.15/monte/gsl_monte_miser.h new file mode 100644 index 000000000..5940396d1 --- /dev/null +++ b/software/gsl-1.15/monte/gsl_monte_miser.h @@ -0,0 +1,97 @@ +/* monte/gsl_monte_miser.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: MJB */ + +#ifndef __GSL_MONTE_MISER_H__ +#define __GSL_MONTE_MISER_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + size_t min_calls; + size_t min_calls_per_bisection; + double dither; + double estimate_frac; + double alpha; + size_t dim; + int estimate_style; + int depth; + int verbose; + double * x; + double * xmid; + double * sigma_l; + double * sigma_r; + double * fmax_l; + double * fmax_r; + double * fmin_l; + double * fmin_r; + double * fsum_l; + double * fsum_r; + double * fsum2_l; + double * fsum2_r; + size_t * hits_l; + size_t * hits_r; +} gsl_monte_miser_state; + +int gsl_monte_miser_integrate(gsl_monte_function * f, + const double xl[], const double xh[], + size_t dim, size_t calls, + gsl_rng *r, + gsl_monte_miser_state* state, + double *result, double *abserr); + +gsl_monte_miser_state* gsl_monte_miser_alloc(size_t dim); + +int gsl_monte_miser_init(gsl_monte_miser_state* state); + +void gsl_monte_miser_free(gsl_monte_miser_state* state); + +typedef struct { + double estimate_frac; + size_t min_calls; + size_t min_calls_per_bisection; + double alpha; + double dither; +} gsl_monte_miser_params; + +void gsl_monte_miser_params_get (const gsl_monte_miser_state * state, + gsl_monte_miser_params * params); + +void gsl_monte_miser_params_set (gsl_monte_miser_state * state, + const gsl_monte_miser_params * params); + +__END_DECLS + +#endif /* __GSL_MONTE_MISER_H__ */ diff --git a/software/gsl-1.15/monte/gsl_monte_plain.h b/software/gsl-1.15/monte/gsl_monte_plain.h new file mode 100644 index 000000000..c4745b97d --- /dev/null +++ b/software/gsl-1.15/monte/gsl_monte_plain.h @@ -0,0 +1,65 @@ +/* monte/gsl_monte_plain.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Plain Monte-Carlo. */ + +/* Author: MJB */ + +#ifndef __GSL_MONTE_PLAIN_H__ +#define __GSL_MONTE_PLAIN_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + size_t dim; + double *x; +} gsl_monte_plain_state; + +int +gsl_monte_plain_integrate (const gsl_monte_function * f, + const double xl[], const double xu[], + const size_t dim, + const size_t calls, + gsl_rng * r, + gsl_monte_plain_state * state, + double *result, double *abserr); + +gsl_monte_plain_state* gsl_monte_plain_alloc(size_t dim); + +int gsl_monte_plain_init(gsl_monte_plain_state* state); + +void gsl_monte_plain_free (gsl_monte_plain_state* state); + +__END_DECLS + +#endif /* __GSL_MONTE_PLAIN_H__ */ diff --git a/software/gsl-1.15/monte/gsl_monte_vegas.h b/software/gsl-1.15/monte/gsl_monte_vegas.h new file mode 100644 index 000000000..0942c04dc --- /dev/null +++ b/software/gsl-1.15/monte/gsl_monte_vegas.h @@ -0,0 +1,125 @@ +/* monte/gsl_monte_vegas.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* header for the gsl "vegas" routines. Mike Booth, May 1998 */ + +#ifndef __GSL_MONTE_VEGAS_H__ +#define __GSL_MONTE_VEGAS_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +enum {GSL_VEGAS_MODE_IMPORTANCE = 1, + GSL_VEGAS_MODE_IMPORTANCE_ONLY = 0, + GSL_VEGAS_MODE_STRATIFIED = -1}; + +typedef struct { + /* grid */ + size_t dim; + size_t bins_max; + unsigned int bins; + unsigned int boxes; /* these are both counted along the axes */ + double * xi; + double * xin; + double * delx; + double * weight; + double vol; + + double * x; + int * bin; + int * box; + + /* distribution */ + double * d; + + /* control variables */ + double alpha; + int mode; + int verbose; + unsigned int iterations; + int stage; + + /* scratch variables preserved between calls to vegas1/2/3 */ + double jac; + double wtd_int_sum; + double sum_wgts; + double chi_sum; + double chisq; + + double result; + double sigma; + + unsigned int it_start; + unsigned int it_num; + unsigned int samples; + unsigned int calls_per_box; + + FILE * ostream; + +} gsl_monte_vegas_state; + +int gsl_monte_vegas_integrate(gsl_monte_function * f, + double xl[], double xu[], + size_t dim, size_t calls, + gsl_rng * r, + gsl_monte_vegas_state *state, + double* result, double* abserr); + +gsl_monte_vegas_state* gsl_monte_vegas_alloc(size_t dim); + +int gsl_monte_vegas_init(gsl_monte_vegas_state* state); + +void gsl_monte_vegas_free (gsl_monte_vegas_state* state); + +double gsl_monte_vegas_chisq (const gsl_monte_vegas_state* state); +void gsl_monte_vegas_runval (const gsl_monte_vegas_state* state, double * result, double * sigma); + +typedef struct { + double alpha; + size_t iterations; + int stage; + int mode; + int verbose; + FILE * ostream; +} gsl_monte_vegas_params; + +void gsl_monte_vegas_params_get (const gsl_monte_vegas_state * state, + gsl_monte_vegas_params * params); + +void gsl_monte_vegas_params_set (gsl_monte_vegas_state * state, + const gsl_monte_vegas_params * params); + +__END_DECLS + +#endif /* __GSL_MONTE_VEGAS_H__ */ + diff --git a/software/gsl-1.15/monte/miser.c b/software/gsl-1.15/monte/miser.c new file mode 100644 index 000000000..bb2a88d39 --- /dev/null +++ b/software/gsl-1.15/monte/miser.c @@ -0,0 +1,709 @@ +/* monte/miser.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* MISER. Based on the algorithm described in the following article, + + W.H. Press, G.R. Farrar, "Recursive Stratified Sampling for + Multidimensional Monte Carlo Integration", Computers in Physics, + v4 (1990), pp190-195. + +*/ + +/* Author: MJB */ +/* Modified by Brian Gough 12/2000 */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +static int +estimate_corrmc (gsl_monte_function * f, + const double xl[], const double xu[], + size_t dim, size_t calls, + gsl_rng * r, + gsl_monte_miser_state * state, + double *result, double *abserr, + const double xmid[], double sigma_l[], double sigma_r[]); + + +int +gsl_monte_miser_integrate (gsl_monte_function * f, + const double xl[], const double xu[], + size_t dim, size_t calls, + gsl_rng * r, + gsl_monte_miser_state * state, + double *result, double *abserr) +{ + size_t n, estimate_calls, calls_l, calls_r; + const size_t min_calls = state->min_calls; + size_t i; + size_t i_bisect; + int found_best; + + double res_est = 0, err_est = 0; + double res_r = 0, err_r = 0, res_l = 0, err_l = 0; + double xbi_l, xbi_m, xbi_r, s; + + double vol; + double weight_l, weight_r; + + double *x = state->x; + double *xmid = state->xmid; + double *sigma_l = state->sigma_l, *sigma_r = state->sigma_r; + + if (dim != state->dim) + { + GSL_ERROR ("number of dimensions must match allocated size", GSL_EINVAL); + } + + for (i = 0; i < dim; i++) + { + if (xu[i] <= xl[i]) + { + GSL_ERROR ("xu must be greater than xl", GSL_EINVAL); + } + + if (xu[i] - xl[i] > GSL_DBL_MAX) + { + GSL_ERROR ("Range of integration is too large, please rescale", + GSL_EINVAL); + } + } + + if (state->alpha < 0) + { + GSL_ERROR ("alpha must be non-negative", GSL_EINVAL); + } + + /* Compute volume */ + + vol = 1; + + for (i = 0; i < dim; i++) + { + vol *= xu[i] - xl[i]; + } + + if (calls < state->min_calls_per_bisection) + { + double m = 0.0, q = 0.0; + + if (calls < 2) + { + GSL_ERROR ("insufficient calls for subvolume", GSL_EFAILED); + } + + for (n = 0; n < calls; n++) + { + /* Choose a random point in the integration region */ + + for (i = 0; i < dim; i++) + { + x[i] = xl[i] + gsl_rng_uniform_pos (r) * (xu[i] - xl[i]); + } + + { + double fval = GSL_MONTE_FN_EVAL (f, x); + + /* recurrence for mean and variance */ + + double d = fval - m; + m += d / (n + 1.0); + q += d * d * (n / (n + 1.0)); + } + } + + *result = vol * m; + + *abserr = vol * sqrt (q / (calls * (calls - 1.0))); + + return GSL_SUCCESS; + } + + estimate_calls = GSL_MAX (min_calls, calls * (state->estimate_frac)); + + if (estimate_calls < 4 * dim) + { + GSL_ERROR ("insufficient calls to sample all halfspaces", GSL_ESANITY); + } + + /* Flip coins to bisect the integration region with some fuzz */ + + for (i = 0; i < dim; i++) + { + s = (gsl_rng_uniform (r) - 0.5) >= 0.0 ? state->dither : -state->dither; + state->xmid[i] = (0.5 + s) * xl[i] + (0.5 - s) * xu[i]; + } + + /* The idea is to chose the direction to bisect based on which will + give the smallest total variance. We could (and may do so later) + use MC to compute these variances. But the NR guys simply estimate + the variances by finding the min and max function values + for each half-region for each bisection. */ + + estimate_corrmc (f, xl, xu, dim, estimate_calls, + r, state, &res_est, &err_est, xmid, sigma_l, sigma_r); + + /* We have now used up some calls for the estimation */ + + calls -= estimate_calls; + + /* Now find direction with the smallest total "variance" */ + + { + double best_var = GSL_DBL_MAX; + double beta = 2.0 / (1.0 + state->alpha); + found_best = 0; + i_bisect = 0; + weight_l = weight_r = 1.0; + + for (i = 0; i < dim; i++) + { + if (sigma_l[i] >= 0 && sigma_r[i] >= 0) + { + /* estimates are okay */ + double var = pow (sigma_l[i], beta) + pow (sigma_r[i], beta); + + if (var <= best_var) + { + found_best = 1; + best_var = var; + i_bisect = i; + weight_l = pow (sigma_l[i], beta); + weight_r = pow (sigma_r[i], beta); + + if (weight_l == 0 && weight_r == 0) + { + weight_l = 1; + weight_r = 1; + } + } + } + else + { + if (sigma_l[i] < 0) + { + GSL_ERROR ("no points in left-half space!", GSL_ESANITY); + } + if (sigma_r[i] < 0) + { + GSL_ERROR ("no points in right-half space!", GSL_ESANITY); + } + } + } + } + + if (!found_best) + { + /* All estimates were the same, so chose a direction at random */ + + i_bisect = gsl_rng_uniform_int (r, dim); + } + + xbi_l = xl[i_bisect]; + xbi_m = xmid[i_bisect]; + xbi_r = xu[i_bisect]; + + /* Get the actual fractional sizes of the two "halves", and + distribute the remaining calls among them */ + + { + double fraction_l = fabs ((xbi_m - xbi_l) / (xbi_r - xbi_l)); + double fraction_r = 1 - fraction_l; + + double a = fraction_l * weight_l; + double b = fraction_r * weight_r; + + calls_l = min_calls + (calls - 2 * min_calls) * a / (a + b); + calls_r = min_calls + (calls - 2 * min_calls) * b / (a + b); + } + + /* Compute the integral for the left hand side of the bisection */ + + /* Due to the recursive nature of the algorithm we must allocate + some new memory for each recursive call */ + + { + int status; + + double *xu_tmp = (double *) malloc (dim * sizeof (double)); + + if (xu_tmp == 0) + { + GSL_ERROR_VAL ("out of memory for left workspace", GSL_ENOMEM, 0); + } + + for (i = 0; i < dim; i++) + { + xu_tmp[i] = xu[i]; + } + + xu_tmp[i_bisect] = xbi_m; + + status = gsl_monte_miser_integrate (f, xl, xu_tmp, + dim, calls_l, r, state, + &res_l, &err_l); + free (xu_tmp); + + if (status != GSL_SUCCESS) + { + return status; + } + } + + /* Compute the integral for the right hand side of the bisection */ + + { + int status; + + double *xl_tmp = (double *) malloc (dim * sizeof (double)); + + if (xl_tmp == 0) + { + GSL_ERROR_VAL ("out of memory for right workspace", GSL_ENOMEM, 0); + } + + for (i = 0; i < dim; i++) + { + xl_tmp[i] = xl[i]; + } + + xl_tmp[i_bisect] = xbi_m; + + status = gsl_monte_miser_integrate (f, xl_tmp, xu, + dim, calls_r, r, state, + &res_r, &err_r); + free (xl_tmp); + + if (status != GSL_SUCCESS) + { + return status; + } + } + + *result = res_l + res_r; + *abserr = sqrt (err_l * err_l + err_r * err_r); + + return GSL_SUCCESS; +} + +gsl_monte_miser_state * +gsl_monte_miser_alloc (size_t dim) +{ + gsl_monte_miser_state *s = + (gsl_monte_miser_state *) malloc (sizeof (gsl_monte_miser_state)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for miser state struct", + GSL_ENOMEM, 0); + } + + s->x = (double *) malloc (dim * sizeof (double)); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->xmid = (double *) malloc (dim * sizeof (double)); + + if (s->xmid == 0) + { + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for xmid", GSL_ENOMEM, 0); + } + + s->sigma_l = (double *) malloc (dim * sizeof (double)); + + if (s->sigma_l == 0) + { + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for sigma_l", GSL_ENOMEM, 0); + } + + s->sigma_r = (double *) malloc (dim * sizeof (double)); + + if (s->sigma_r == 0) + { + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for sigma_r", GSL_ENOMEM, 0); + } + + s->fmax_l = (double *) malloc (dim * sizeof (double)); + + if (s->fmax_l == 0) + { + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fmax_l", GSL_ENOMEM, 0); + } + + s->fmax_r = (double *) malloc (dim * sizeof (double)); + + if (s->fmax_r == 0) + { + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fmax_r", GSL_ENOMEM, 0); + } + + s->fmin_l = (double *) malloc (dim * sizeof (double)); + + if (s->fmin_l == 0) + { + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fmin_l", GSL_ENOMEM, 0); + } + + s->fmin_r = (double *) malloc (dim * sizeof (double)); + + if (s->fmin_r == 0) + { + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fmin_r", GSL_ENOMEM, 0); + } + + s->fsum_l = (double *) malloc (dim * sizeof (double)); + + if (s->fsum_l == 0) + { + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum_l", GSL_ENOMEM, 0); + } + + s->fsum_r = (double *) malloc (dim * sizeof (double)); + + if (s->fsum_r == 0) + { + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum_r", GSL_ENOMEM, 0); + } + + s->fsum2_l = (double *) malloc (dim * sizeof (double)); + + if (s->fsum2_l == 0) + { + free (s->fsum_r); + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum2_l", GSL_ENOMEM, 0); + } + + s->fsum2_r = (double *) malloc (dim * sizeof (double)); + + if (s->fsum2_r == 0) + { + free (s->fsum2_l); + free (s->fsum_r); + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum2_r", GSL_ENOMEM, 0); + } + + + s->hits_r = (size_t *) malloc (dim * sizeof (size_t)); + + if (s->hits_r == 0) + { + free (s->fsum2_r); + free (s->fsum2_l); + free (s->fsum_r); + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum2_r", GSL_ENOMEM, 0); + } + + s->hits_l = (size_t *) malloc (dim * sizeof (size_t)); + + if (s->hits_l == 0) + { + free (s->hits_r); + free (s->fsum2_r); + free (s->fsum2_l); + free (s->fsum_r); + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for fsum2_r", GSL_ENOMEM, 0); + } + + s->dim = dim; + + gsl_monte_miser_init (s); + + return s; +} + +int +gsl_monte_miser_init (gsl_monte_miser_state * s) +{ + /* We use 8 points in each halfspace to estimate the variance. There are + 2*dim halfspaces. A variance estimate requires a minimum of 2 points. */ + s->min_calls = 16 * s->dim; + s->min_calls_per_bisection = 32 * s->min_calls; + s->estimate_frac = 0.1; + s->alpha = 2.0; + s->dither = 0.0; + + return GSL_SUCCESS; +} + +void +gsl_monte_miser_free (gsl_monte_miser_state * s) +{ + RETURN_IF_NULL (s); + free (s->hits_r); + free (s->hits_l); + free (s->fsum2_r); + free (s->fsum2_l); + free (s->fsum_r); + free (s->fsum_l); + free (s->fmin_r); + free (s->fmin_l); + free (s->fmax_r); + free (s->fmax_l); + free (s->sigma_r); + free (s->sigma_l); + free (s->xmid); + free (s->x); + free (s); +} + +void +gsl_monte_miser_params_get (const gsl_monte_miser_state * s, gsl_monte_miser_params * p) +{ + p->estimate_frac = s->estimate_frac; + p->min_calls = s->min_calls; + p->min_calls_per_bisection = s->min_calls_per_bisection; + p->alpha = s->alpha; + p->dither = s->dither; +} + +void +gsl_monte_miser_params_set (gsl_monte_miser_state * s, const gsl_monte_miser_params * p) +{ + s->estimate_frac = p->estimate_frac; + s->min_calls = p->min_calls; + s->min_calls_per_bisection = p->min_calls_per_bisection; + s->alpha = p->alpha; + s->dither = p->dither; +} + +static int +estimate_corrmc (gsl_monte_function * f, + const double xl[], const double xu[], + size_t dim, size_t calls, + gsl_rng * r, + gsl_monte_miser_state * state, + double *result, double *abserr, + const double xmid[], double sigma_l[], double sigma_r[]) +{ + size_t i, n; + + double *x = state->x; + double *fsum_l = state->fsum_l; + double *fsum_r = state->fsum_r; + double *fsum2_l = state->fsum2_l; + double *fsum2_r = state->fsum2_r; + size_t *hits_l = state->hits_l; + size_t *hits_r = state->hits_r; + + double m = 0.0, q = 0.0; + double vol = 1.0; + + for (i = 0; i < dim; i++) + { + vol *= xu[i] - xl[i]; + hits_l[i] = hits_r[i] = 0; + fsum_l[i] = fsum_r[i] = 0.0; + fsum2_l[i] = fsum2_r[i] = 0.0; + sigma_l[i] = sigma_r[i] = -1; + } + + for (n = 0; n < calls; n++) + { + double fval; + + unsigned int j = (n/2) % dim; + unsigned int side = (n % 2); + + for (i = 0; i < dim; i++) + { + double z = gsl_rng_uniform_pos (r) ; + + if (i != j) + { + x[i] = xl[i] + z * (xu[i] - xl[i]); + } + else + { + if (side == 0) + { + x[i] = xmid[i] + z * (xu[i] - xmid[i]); + } + else + { + x[i] = xl[i] + z * (xmid[i] - xl[i]); + } + } + } + + fval = GSL_MONTE_FN_EVAL (f, x); + + /* recurrence for mean and variance */ + { + double d = fval - m; + m += d / (n + 1.0); + q += d * d * (n / (n + 1.0)); + } + + /* compute the variances on each side of the bisection */ + for (i = 0; i < dim; i++) + { + if (x[i] <= xmid[i]) + { + fsum_l[i] += fval; + fsum2_l[i] += fval * fval; + hits_l[i]++; + } + else + { + fsum_r[i] += fval; + fsum2_r[i] += fval * fval; + hits_r[i]++; + } + } + } + + for (i = 0; i < dim; i++) + { + double fraction_l = (xmid[i] - xl[i]) / (xu[i] - xl[i]); + + if (hits_l[i] > 0) + { + fsum_l[i] /= hits_l[i]; + sigma_l[i] = sqrt (fsum2_l[i] - fsum_l[i] * fsum_l[i] / hits_l[i]); + sigma_l[i] *= fraction_l * vol / hits_l[i]; + } + + if (hits_r[i] > 0) + { + fsum_r[i] /= hits_r[i]; + sigma_r[i] = sqrt (fsum2_r[i] - fsum_r[i] * fsum_r[i] / hits_r[i]); + sigma_r[i] *= (1 - fraction_l) * vol / hits_r[i]; + } + } + + *result = vol * m; + + if (calls < 2) + { + *abserr = GSL_POSINF; + } + else + { + *abserr = vol * sqrt (q / (calls * (calls - 1.0))); + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/monte/plain.c b/software/gsl-1.15/monte/plain.c new file mode 100644 index 000000000..1aa3cf0fe --- /dev/null +++ b/software/gsl-1.15/monte/plain.c @@ -0,0 +1,152 @@ +/* monte/plain.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2009 Michael Booth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Plain Monte-Carlo. */ + +/* Author: MJB */ + +#include +#include +#include +#include +#include + +int +gsl_monte_plain_integrate (const gsl_monte_function * f, + const double xl[], const double xu[], + const size_t dim, + const size_t calls, + gsl_rng * r, + gsl_monte_plain_state * state, + double *result, double *abserr) +{ + double vol, m = 0, q = 0; + double *x = state->x; + size_t n, i; + + if (dim != state->dim) + { + GSL_ERROR ("number of dimensions must match allocated size", GSL_EINVAL); + } + + for (i = 0; i < dim; i++) + { + if (xu[i] <= xl[i]) + { + GSL_ERROR ("xu must be greater than xl", GSL_EINVAL); + } + + if (xu[i] - xl[i] > GSL_DBL_MAX) + { + GSL_ERROR ("Range of integration is too large, please rescale", + GSL_EINVAL); + } + } + + /* Compute the volume of the region */ + + vol = 1; + + for (i = 0; i < dim; i++) + { + vol *= xu[i] - xl[i]; + } + + for (n = 0; n < calls; n++) + { + /* Choose a random point in the integration region */ + + for (i = 0; i < dim; i++) + { + x[i] = xl[i] + gsl_rng_uniform_pos (r) * (xu[i] - xl[i]); + } + + { + double fval = GSL_MONTE_FN_EVAL (f, x); + + /* recurrence for mean and variance */ + + double d = fval - m; + m += d / (n + 1.0); + q += d * d * (n / (n + 1.0)); + } + } + + *result = vol * m; + + if (calls < 2) + { + *abserr = GSL_POSINF; + } + else + { + *abserr = vol * sqrt (q / (calls * (calls - 1.0))); + } + + return GSL_SUCCESS; +} + +gsl_monte_plain_state * +gsl_monte_plain_alloc (size_t dim) +{ + gsl_monte_plain_state *s = + (gsl_monte_plain_state *) malloc (sizeof (gsl_monte_plain_state)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for state struct", + GSL_ENOMEM, 0); + } + + s->x = (double *) malloc (dim * sizeof (double)); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for working vector", + GSL_ENOMEM, 0); + } + + s->dim = dim; + + return s; +} + +/* Set some default values and whatever */ + +int +gsl_monte_plain_init (gsl_monte_plain_state * s) +{ + size_t i; + + for (i = 0; i < s->dim; i++) + { + s->x[i] = 0.0; + } + + return GSL_SUCCESS; +} + +void +gsl_monte_plain_free (gsl_monte_plain_state * s) +{ + RETURN_IF_NULL (s); + free (s->x); + free (s); +} diff --git a/software/gsl-1.15/monte/test.c b/software/gsl-1.15/monte/test.c new file mode 100644 index 000000000..4426e22ab --- /dev/null +++ b/software/gsl-1.15/monte/test.c @@ -0,0 +1,480 @@ +/* monte/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * Copyright (C) 2009 Michael Booth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define CONSTANT +#define STEP +#define PRODUCT +#define GAUSSIAN +#define DBLGAUSSIAN +#define TSUDA + +#define PLAIN +#define MISER +#define VEGAS + +double xl[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +double xu[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; +double xu2[11] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; +double xu3[2] = { GSL_DBL_MAX, GSL_DBL_MAX }; + +double fconst (double x[], size_t d, void *params); +double fstep (double x[], size_t d, void *params); +double f0 (double x[], size_t d, void *params); +double f1 (double x[], size_t d, void *params); +double f2 (double x[], size_t d, void *params); +double f3 (double x[], size_t d, void *params); + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +struct problem { + gsl_monte_function * f; + double * xl; + double * xu; + size_t dim; + size_t calls; + double expected_result; + double expected_error; + char * description; +} ; + +gsl_monte_function +make_function (double (*f)(double *, size_t, void *), size_t d, void * p); + +gsl_monte_function +make_function (double (*f)(double *, size_t, void *), size_t d, void * p) +{ + gsl_monte_function f_new; + + f_new.f = f; + f_new.dim = d; + f_new.params = p; + + return f_new; +} + + +void +add (struct problem * problems, int * n, + gsl_monte_function * f, double xl[], double xu[], size_t dim, size_t calls, + double result, double err, char * description); + +void +add (struct problem * problems, int * n, + gsl_monte_function * f, double xl[], double xu[], size_t dim, size_t calls, + double result, double err, char * description) +{ + int i = *n; + problems[i].f = f; + problems[i].xl = xl; + problems[i].xu = xu; + problems[i].dim = dim; + problems[i].calls = calls; + problems[i].expected_result = result; + problems[i].expected_error = err; + problems[i].description = description; + (*n)++; +} + +#define TRIALS 10 + +int +main (void) +{ + double result[TRIALS], error[TRIALS]; + double a = 0.1; + double c = (1.0 + sqrt (10.0)) / 9.0; + + gsl_monte_function Fc = make_function(&fconst, 0, 0); + gsl_monte_function Fs = make_function(&fstep, 0, 0); + gsl_monte_function F0 = make_function(&f0, 0, &a); + gsl_monte_function F1 = make_function(&f1, 0, &a); + gsl_monte_function F2 = make_function(&f2, 0, &a); + gsl_monte_function F3 = make_function(&f3, 0, &c); + + /* The relationship between the variance of the function itself, the + error on the integral and the number of calls is, + + sigma = sqrt(variance/N) + + where the variance is the <(f - )^2> where <.> denotes the + volume average (integral over the integration region divided by + the volume) */ + + int n = 0; + struct problem * I; + struct problem problems[256]; + +#ifdef CONSTANT + /* variance(Fc) = 0 */ + + add(problems,&n, &Fc, xl, xu, 1, 1000, 1.0, 0.0, "constant, 1d"); + add(problems,&n, &Fc, xl, xu, 2, 1000, 1.0, 0.0, "constant, 2d"); + add(problems,&n, &Fc, xl, xu, 3, 1000, 1.0, 0.0, "constant, 3d"); + add(problems,&n, &Fc, xl, xu, 4, 1000, 1.0, 0.0, "constant, 4d"); + add(problems,&n, &Fc, xl, xu, 5, 1000, 1.0, 0.0, "constant, 5d"); + add(problems,&n, &Fc, xl, xu, 6, 1000, 1.0, 0.0, "constant, 6d"); + add(problems,&n, &Fc, xl, xu, 7, 1000, 1.0, 0.0, "constant, 7d"); + add(problems,&n, &Fc, xl, xu, 8, 1000, 1.0, 0.0, "constant, 8d"); + add(problems,&n, &Fc, xl, xu, 9, 1000, 1.0, 0.0, "constant, 9d"); + add(problems,&n, &Fc, xl, xu, 10, 1000, 1.0, 0.0, "constant, 10d"); +#endif + +#ifdef STEP + /* variance(Fs) = 0.4/sqrt(1000) */ + add(problems,&n, &Fs, xl, xu, 1, 100000, 0.8, 1.264e-3, "step, 1d"); + add(problems,&n, &Fs, xl, xu, 2, 100000, 0.8, 1.264e-3, "step, 2d"); + add(problems,&n, &Fs, xl, xu, 3, 100000, 0.8, 1.264e-3, "step, 3d"); + add(problems,&n, &Fs, xl, xu, 4, 100000, 0.8, 1.264e-3, "step, 4d"); + add(problems,&n, &Fs, xl, xu, 5, 100000, 0.8, 1.264e-3, "step, 5d"); + add(problems,&n, &Fs, xl, xu, 6, 100000, 0.8, 1.264e-3, "step, 6d"); + add(problems,&n, &Fs, xl, xu, 7, 100000, 0.8, 1.264e-3, "step, 7d"); + add(problems,&n, &Fs, xl, xu, 8, 100000, 0.8, 1.264e-3, "step, 8d"); + add(problems,&n, &Fs, xl, xu, 9, 100000, 0.8, 1.264e-3, "step, 9d"); + add(problems,&n, &Fs, xl, xu, 10, 100000, 0.8, 1.264e-3, "step, 10d"); +#endif + +#ifdef PRODUCT + /* variance(F0) = (4/3)^d - 1 */ + + add(problems,&n, &F0, xl, xu, 1, 3333, 1.0, 0.01, "product, 1d" ); + add(problems,&n, &F0, xl, xu, 2, 7777, 1.0, 0.01, "product, 2d" ); + add(problems,&n, &F0, xl, xu, 3, 13703, 1.0, 0.01, "product, 3d" ); + add(problems,&n, &F0, xl, xu, 4, 21604, 1.0, 0.01, "product, 4d" ); + add(problems,&n, &F0, xl, xu, 5, 32139, 1.0, 0.01, "product, 5d" ); + add(problems,&n, &F0, xl, xu, 6, 46186, 1.0, 0.01, "product, 6d" ); + add(problems,&n, &F0, xl, xu, 7, 64915, 1.0, 0.01, "product, 7d" ); + add(problems,&n, &F0, xl, xu, 8, 89887, 1.0, 0.01, "product, 8d" ); + add(problems,&n, &F0, xl, xu, 9, 123182, 1.0, 0.01, "product, 9d" ); + add(problems,&n, &F0, xl, xu, 10, 167577, 1.0, 0.01, "product, 10d" ); +#endif + +#ifdef GAUSSIAN + /* variance(F1) = (1/(a sqrt(2 pi)))^d - 1 */ + + add(problems,&n, &F1, xl, xu, 1, 298, 1.0, 0.1, "gaussian, 1d" ); + add(problems,&n, &F1, xl, xu, 2, 1492, 1.0, 0.1, "gaussian, 2d" ); + add(problems,&n, &F1, xl, xu, 3, 6249, 1.0, 0.1, "gaussian, 3d" ); + add(problems,&n, &F1, xl, xu, 4, 25230, 1.0, 0.1, "gaussian, 4d" ); + add(problems,&n, &F1, xl, xu, 5, 100953, 1.0, 0.1, "gaussian, 5d" ); + add(problems,&n, &F1, xl, xu, 6, 44782, 1.0, 0.3, "gaussian, 6d" ); + add(problems,&n, &F1, xl, xu, 7, 178690, 1.0, 0.3, "gaussian, 7d" ); + add(problems,&n, &F1, xl, xu, 8, 712904, 1.0, 0.3, "gaussian, 8d" ); + add(problems,&n, &F1, xl, xu, 9, 2844109, 1.0, 0.3, "gaussian, 9d" ); + add(problems,&n, &F1, xl, xu, 10, 11346390, 1.0, 0.3, "gaussian, 10d" ); +#endif + +#ifdef DBLGAUSSIAN + /* variance(F2) = 0.5 * (1/(a sqrt(2 pi)))^d - 1 */ + + add(problems,&n, &F2, xl, xu, 1, 9947, 1.0, 0.01, "double gaussian, 1d" ); + add(problems,&n, &F2, xl, xu, 2, 695, 1.0, 0.1, "double gaussian, 2d" ); + add(problems,&n, &F2, xl, xu, 3, 3074, 1.0, 0.1, "double gaussian, 3d" ); + add(problems,&n, &F2, xl, xu, 4, 12565, 1.0, 0.1, "double gaussian, 4d" ); + add(problems,&n, &F2, xl, xu, 5, 50426, 1.0, 0.1, "double gaussian, 5d" ); + add(problems,&n, &F2, xl, xu, 6, 201472, 1.0, 0.1, "double gaussian, 6d" ); + add(problems,&n, &F2, xl, xu, 7, 804056, 1.0, 0.1, "double gaussian, 7d" ); + add(problems,&n, &F2, xl, xu, 8, 356446, 1.0, 0.3, "double gaussian, 8d" ); + add(problems,&n, &F2, xl, xu, 9, 1422049, 1.0, 0.3, "double gaussian, 9d" ); + add(problems,&n, &F2, xl, xu, 10, 5673189, 1.0, 0.3, "double gaussian, 10d" ); +#endif + +#ifdef TSUDA + /* variance(F3) = ((c^2 + c + 1/3)/(c(c+1)))^d - 1 */ + + add(problems,&n, &F3, xl, xu, 1, 4928, 1.0, 0.01, "tsuda function, 1d" ); + add(problems,&n, &F3, xl, xu, 2, 12285, 1.0, 0.01, "tsuda function, 2d" ); + add(problems,&n, &F3, xl, xu, 3, 23268, 1.0, 0.01, "tsuda function, 3d" ); + add(problems,&n, &F3, xl, xu, 4, 39664, 1.0, 0.01, "tsuda function, 4d" ); + add(problems,&n, &F3, xl, xu, 5, 64141, 1.0, 0.01, "tsuda function, 5d" ); + add(problems,&n, &F3, xl, xu, 6, 100680, 1.0, 0.01, "tsuda function, 6d" ); + add(problems,&n, &F3, xl, xu, 7, 155227, 1.0, 0.01, "tsuda function, 7d" ); + add(problems,&n, &F3, xl, xu, 8, 236657, 1.0, 0.01, "tsuda function, 8d" ); + add(problems,&n, &F3, xl, xu, 9, 358219, 1.0, 0.01, "tsuda function, 9d" ); + add(problems,&n, &F3, xl, xu, 10, 539690, 1.0, 0.01, "tsuda function, 10d" ); +#endif + + add(problems,&n, 0, 0, 0, 0, 0, 0, 0, 0 ); + + + /* gsl_set_error_handler (&my_error_handler); */ + gsl_ieee_env_setup (); + gsl_rng_env_setup (); + +#ifdef A + printf ("testing allocation/input checks\n"); + + status = gsl_monte_plain_validate (s, xl, xu3, 1, 1); + gsl_test (status != 0, "error if limits too large"); + status = gsl_monte_plain_validate (s, xl, xu, 0, 10); + gsl_test (status != 0, "error if num_dim = 0"); + status = gsl_monte_plain_validate (s, xl, xu, 1, 0); + gsl_test (status != 0, "error if calls = 0"); + status = gsl_monte_plain_validate (s, xu, xl, 1, 10); + gsl_test (status != 0, "error if xu < xl"); +#endif + +#ifdef PLAIN +#define NAME "plain" +#define MONTE_STATE gsl_monte_plain_state +#define MONTE_ALLOC gsl_monte_plain_alloc +#define MONTE_INTEGRATE gsl_monte_plain_integrate +#define MONTE_FREE gsl_monte_plain_free +#define MONTE_SPEEDUP 1 +#define MONTE_ERROR_TEST(err,expected) gsl_test_factor(err,expected, 5.0, NAME ", %s, abserr[%d]", I->description, i) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + +#ifdef MISER +#define NAME "miser" +#define MONTE_STATE gsl_monte_miser_state +#define MONTE_ALLOC gsl_monte_miser_alloc +#define MONTE_INTEGRATE gsl_monte_miser_integrate +#define MONTE_FREE gsl_monte_miser_free +#define MONTE_SPEEDUP 2 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 5.0 * expected, NAME ", %s, abserr[%d] (obs %g vs plain %g)", I->description, i, err, expected) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + +#ifdef MISER +#define NAME "miser(params)" +#define MONTE_STATE gsl_monte_miser_state +#define MONTE_ALLOC gsl_monte_miser_alloc +#define MONTE_PARAMS gsl_monte_miser_params +#define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_miser_params_get(s, ¶ms) ; params.alpha = 1.5 ; gsl_monte_miser_params_set(s, ¶ms) ; gsl_monte_miser_integrate(f,xl,xu,dim,calls,r,s,res,err); } +#define MONTE_FREE gsl_monte_miser_free +#define MONTE_SPEEDUP 2 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 5.0 * expected, NAME ", %s, abserr[%d] (obs %g vs plain %g)", I->description, i, err, expected) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_PARAMS +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + +#ifdef MISER +#define NAME "miser(params)" +#define MONTE_STATE gsl_monte_miser_state +#define MONTE_ALLOC gsl_monte_miser_alloc +#define MONTE_PARAMS gsl_monte_miser_params +#define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_miser_params_get(s, ¶ms) ; params.alpha = 1.5 ; gsl_monte_miser_params_set(s, ¶ms) ; gsl_monte_miser_integrate(f,xl,xu,dim,calls,r,s,res,err); } +#define MONTE_FREE gsl_monte_miser_free +#define MONTE_SPEEDUP 2 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 5.0 * expected, NAME ", %s, abserr[%d] (obs %g vs plain %g)", I->description, i, err, expected) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_PARAMS +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + +#ifdef VEGAS +#define NAME "vegas" +#define MONTE_STATE gsl_monte_vegas_state +#define MONTE_ALLOC gsl_monte_vegas_alloc +#define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err) ; } +#define MONTE_FREE gsl_monte_vegas_free +#define MONTE_SPEEDUP 3 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected) ; gsl_test(gsl_monte_vegas_chisq(s) < 0, NAME " returns valid chisq (%g)", gsl_monte_vegas_chisq(s)) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + + +#ifdef VEGAS +#define NAME "vegas(warm)" +#define MONTE_STATE gsl_monte_vegas_state +#define MONTE_ALLOC gsl_monte_vegas_alloc +#define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err) ; gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err); } +#define MONTE_FREE gsl_monte_vegas_free +#define MONTE_SPEEDUP 3 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected); gsl_test(gsl_monte_vegas_chisq(s) < 0, NAME " returns valid chisq (%g)", gsl_monte_vegas_chisq(s)) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + + +#ifdef VEGAS +#define NAME "vegas(params)" +#define MONTE_STATE gsl_monte_vegas_state +#define MONTE_ALLOC gsl_monte_vegas_alloc +#define MONTE_PARAMS gsl_monte_vegas_params +#define MONTE_INTEGRATE(f,xl,xu,dim,calls,r,s,res,err) { gsl_monte_vegas_params_get(s, ¶ms) ; params.alpha = 2 ; params.iterations = 3 ; gsl_monte_vegas_params_set(s, ¶ms) ; gsl_monte_vegas_integrate(f,xl,xu,dim,calls,r,s,res,err); } +#define MONTE_FREE gsl_monte_vegas_free +#define MONTE_SPEEDUP 3 +#define MONTE_ERROR_TEST(err,expected) gsl_test(err > 3.0 * (expected == 0 ? 1.0/(I->calls/MONTE_SPEEDUP) : expected), NAME ", %s, abserr[%d] (obs %g vs exp %g)", I->description, i, err, expected); gsl_test(gsl_monte_vegas_chisq(s) < 0, NAME " returns valid chisq (%g)", gsl_monte_vegas_chisq(s)) +#include "test_main.c" +#undef NAME +#undef MONTE_STATE +#undef MONTE_ALLOC +#undef MONTE_PARAMS +#undef MONTE_INTEGRATE +#undef MONTE_FREE +#undef MONTE_ERROR_TEST +#undef MONTE_SPEEDUP +#endif + + + exit (gsl_test_summary ()); +} + +/* Simple constant function */ +double +fconst (double x[], size_t num_dim, void *params) +{ + return 1; +} + + +/* Step-type (pulse) function */ +double +fstep (double x[], size_t num_dim, void *params) +{ + return (x[0] > 0.1 && x[0] < 0.9) ? 1 : 0; +} + +/* Simple product function */ +double +f0 (double x[], size_t num_dim, void *params) +{ + double prod = 1.0; + unsigned int i; + + for (i = 0; i < num_dim; ++i) + { + prod *= 2.0 * x[i]; + } + + return prod; +} + +/* Gaussian centered at 1/2. */ + +double +f1 (double x[], size_t num_dim, void *params) +{ + double a = *(double *)params; + double sum = 0.; + + unsigned int i; + for (i = 0; i < num_dim; i++) + { + double dx = x[i] - 0.5; + sum += dx * dx; + } + return (pow (M_2_SQRTPI / (2. * a), (double) num_dim) * + exp (-sum / (a * a))); +} + +/* double gaussian */ +double +f2 (double x[], size_t num_dim, void *params) +{ + double a = *(double *)params; + double sum1 = 0.; + double sum2 = 0.; + + unsigned int i; + for (i = 0; i < num_dim; i++) + { + double dx1 = x[i] - 1. / 3.; + double dx2 = x[i] - 2. / 3.; + sum1 += dx1 * dx1; + sum2 += dx2 * dx2; + } + return 0.5 * pow (M_2_SQRTPI / (2. * a), num_dim) + * (exp (-sum1 / (a * a)) + exp (-sum2 / (a * a))); +} + +/* Tsuda's example */ +double +f3 (double x[], size_t num_dim, void *params) +{ + double c = *(double *)params; + + double prod = 1.; + + unsigned int i; + + for (i = 0; i < num_dim; i++) + { + prod *= c / (c + 1) * pow((c + 1) / (c + x[i]), 2.0); + } + + return prod; +} + + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); +} diff --git a/software/gsl-1.15/monte/test_main.c b/software/gsl-1.15/monte/test_main.c new file mode 100644 index 000000000..7cd71d18a --- /dev/null +++ b/software/gsl-1.15/monte/test_main.c @@ -0,0 +1,71 @@ +for (I = problems ; I->f != 0; I++) +{ + size_t i; + double res, err; + + gsl_rng * r; + + if (I->dim > 3) + { + continue ; + } + + r = gsl_rng_alloc (gsl_rng_default); + + for (i = 0; i < TRIALS ; i++) + { + MONTE_STATE *s = MONTE_ALLOC (I->dim); +#ifdef MONTE_PARAMS + MONTE_PARAMS params; +#endif + + I->f->dim = I->dim; + + MONTE_INTEGRATE (I->f, I->xl, I->xu, + I->dim, I->calls / MONTE_SPEEDUP, r, s, + &res, &err); + + gsl_test_abs (res, I->expected_result, + 5 * GSL_MAX(err, 1024*GSL_DBL_EPSILON), + NAME ", %s, result[%d]", I->description, i); + + MONTE_ERROR_TEST (err, I->expected_error); + + result[i] = res; + error[i] = err; + + MONTE_FREE (s); + } + + + /* Check the results for consistency as an ensemble */ + + { + double mean = 0, sumd2 = 0, sd; + + /* We need to compute the mean exactly when all terms are equal, + to get an exact zero for the standard deviation (this is a + common case when integrating a constant). */ + + for (i = 0; i < TRIALS; i++) + { + mean += (result[i] - mean) / (i + 1.0); + } + + for (i = 0; i < TRIALS; i++) + { + sumd2 += pow(result[i] - mean, 2.0); + } + + sd = sqrt(sumd2 / (TRIALS-1.0)) ; + + for (i = 0; i < TRIALS; i++) + { + gsl_test_factor (error[i], sd, 5.0, + NAME ", %s, abserr[%d] vs sd", I->description, i); + } + } + + gsl_rng_free (r); +} + diff --git a/software/gsl-1.15/monte/vegas.c b/software/gsl-1.15/monte/vegas.c new file mode 100644 index 000000000..87e2b8f94 --- /dev/null +++ b/software/gsl-1.15/monte/vegas.c @@ -0,0 +1,925 @@ +/* monte/vegas.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael Booth + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: MJB */ +/* Modified by: Brian Gough, 12/2000 */ + +/* This is an implementation of the adaptive Monte-Carlo algorithm + of G. P. Lepage, originally described in J. Comp. Phys. 27, 192(1978). + The current version of the algorithm was described in the Cornell + preprint CLNS-80/447 of March, 1980. + + This code follows most closely the c version by D.R.Yennie, coded + in 1984. + + The input coordinates are x[j], with upper and lower limits xu[j] + and xl[j]. The integration length in the j-th direction is + delx[j]. Each coordinate x[j] is rescaled to a variable y[j] in + the range 0 to 1. The range is divided into bins with boundaries + xi[i][j], where i=0 corresponds to y=0 and i=bins to y=1. The grid + is refined (ie, bins are adjusted) using d[i][j] which is some + variation on the squared sum. A third parameter used in defining + the real coordinate using random numbers is called z. It ranges + from 0 to bins. Its integer part gives the lower index of the bin + into which a call is to be placed, and the remainder gives the + location inside the bin. + + When stratified sampling is used the bins are grouped into boxes, + and the algorithm allocates an equal number of function calls to + each box. + + The variable alpha controls how "stiff" the rebinning algorithm is. + alpha = 0 means never change the grid. Alpha is typically set between + 1 and 2. + + */ + +/* configuration headers */ +#include + +/* standard headers */ +#include +#include + +/* gsl headers */ +#include +#include +#include +#include + +/* lib-specific headers */ +#define BINS_MAX 50 /* even integer, will be divided by two */ + +/* A separable grid with coordinates and values */ +#define COORD(s,i,j) ((s)->xi[(i)*(s)->dim + (j)]) +#define NEW_COORD(s,i) ((s)->xin[(i)]) +#define VALUE(s,i,j) ((s)->d[(i)*(s)->dim + (j)]) + +#define USE_ORIGINAL_CHISQ_FORMULA 0 + +/* predeclare functions */ + +typedef int coord; + +static void init_grid (gsl_monte_vegas_state * s, double xl[], double xu[], + size_t dim); +static void reset_grid_values (gsl_monte_vegas_state * s); +static void init_box_coord (gsl_monte_vegas_state * s, coord box[]); +static int change_box_coord (gsl_monte_vegas_state * s, coord box[]); +static void accumulate_distribution (gsl_monte_vegas_state * s, coord bin[], + double y); +static void random_point (double x[], coord bin[], double *bin_vol, + const coord box[], + const double xl[], const double xu[], + gsl_monte_vegas_state * s, gsl_rng * r); +static void resize_grid (gsl_monte_vegas_state * s, unsigned int bins); +static void refine_grid (gsl_monte_vegas_state * s); + +static void print_lim (gsl_monte_vegas_state * state, + double xl[], double xu[], unsigned long dim); +static void print_head (gsl_monte_vegas_state * state, + unsigned long num_dim, unsigned long calls, + unsigned int it_num, + unsigned int bins, unsigned int boxes); +static void print_res (gsl_monte_vegas_state * state, + unsigned int itr, double res, double err, + double cum_res, double cum_err, + double chi_sq); +static void print_dist (gsl_monte_vegas_state * state, unsigned long dim); +static void print_grid (gsl_monte_vegas_state * state, unsigned long dim); + +int +gsl_monte_vegas_integrate (gsl_monte_function * f, + double xl[], double xu[], + size_t dim, size_t calls, + gsl_rng * r, + gsl_monte_vegas_state * state, + double *result, double *abserr) +{ + double cum_int, cum_sig; + size_t i, k, it; + + if (dim != state->dim) + { + GSL_ERROR ("number of dimensions must match allocated size", GSL_EINVAL); + } + + for (i = 0; i < dim; i++) + { + if (xu[i] <= xl[i]) + { + GSL_ERROR ("xu must be greater than xl", GSL_EINVAL); + } + + if (xu[i] - xl[i] > GSL_DBL_MAX) + { + GSL_ERROR ("Range of integration is too large, please rescale", + GSL_EINVAL); + } + } + + if (state->stage == 0) + { + init_grid (state, xl, xu, dim); + + if (state->verbose >= 0) + { + print_lim (state, xl, xu, dim); + } + } + + if (state->stage <= 1) + { + state->wtd_int_sum = 0; + state->sum_wgts = 0; + state->chi_sum = 0; + state->it_num = 1; + state->samples = 0; + state->chisq = 0; + } + + if (state->stage <= 2) + { + unsigned int bins = state->bins_max; + unsigned int boxes = 1; + + if (state->mode != GSL_VEGAS_MODE_IMPORTANCE_ONLY) + { + /* shooting for 2 calls/box */ + + boxes = floor (pow (calls / 2.0, 1.0 / dim)); + state->mode = GSL_VEGAS_MODE_IMPORTANCE; + + if (2 * boxes >= state->bins_max) + { + /* if bins/box < 2 */ + int box_per_bin = GSL_MAX (boxes / state->bins_max, 1); + + bins = GSL_MIN(boxes / box_per_bin, state->bins_max); + boxes = box_per_bin * bins; + + state->mode = GSL_VEGAS_MODE_STRATIFIED; + } + } + + { + double tot_boxes = gsl_pow_int ((double) boxes, dim); + state->calls_per_box = GSL_MAX (calls / tot_boxes, 2); + calls = state->calls_per_box * tot_boxes; + } + + /* total volume of x-space/(avg num of calls/bin) */ + state->jac = state->vol * pow ((double) bins, (double) dim) / calls; + + state->boxes = boxes; + + /* If the number of bins changes from the previous invocation, bins + are expanded or contracted accordingly, while preserving bin + density */ + + if (bins != state->bins) + { + resize_grid (state, bins); + + if (state->verbose > 1) + { + print_grid (state, dim); + } + } + + if (state->verbose >= 0) + { + print_head (state, + dim, calls, state->it_num, state->bins, state->boxes); + } + } + + state->it_start = state->it_num; + + cum_int = 0.0; + cum_sig = 0.0; + + for (it = 0; it < state->iterations; it++) + { + double intgrl = 0.0, intgrl_sq = 0.0; + double tss = 0.0; + double wgt, var, sig; + size_t calls_per_box = state->calls_per_box; + double jacbin = state->jac; + double *x = state->x; + coord *bin = state->bin; + + state->it_num = state->it_start + it; + + reset_grid_values (state); + init_box_coord (state, state->box); + + do + { + volatile double m = 0, q = 0; + double f_sq_sum = 0.0; + + for (k = 0; k < calls_per_box; k++) + { + volatile double fval; + double bin_vol; + + random_point (x, bin, &bin_vol, state->box, xl, xu, state, r); + + fval = jacbin * bin_vol * GSL_MONTE_FN_EVAL (f, x); + + /* recurrence for mean and variance (sum of squares) */ + + { + double d = fval - m; + m += d / (k + 1.0); + q += d * d * (k / (k + 1.0)); + } + + if (state->mode != GSL_VEGAS_MODE_STRATIFIED) + { + double f_sq = fval * fval; + accumulate_distribution (state, bin, f_sq); + } + } + + intgrl += m * calls_per_box; + + f_sq_sum = q * calls_per_box; + + tss += f_sq_sum; + + if (state->mode == GSL_VEGAS_MODE_STRATIFIED) + { + accumulate_distribution (state, bin, f_sq_sum); + } + } + while (change_box_coord (state, state->box)); + + /* Compute final results for this iteration */ + + var = tss / (calls_per_box - 1.0) ; + + if (var > 0) + { + wgt = 1.0 / var; + } + else if (state->sum_wgts > 0) + { + wgt = state->sum_wgts / state->samples; + } + else + { + wgt = 0.0; + } + + intgrl_sq = intgrl * intgrl; + + sig = sqrt (var); + + state->result = intgrl; + state->sigma = sig; + + if (wgt > 0.0) + { + double sum_wgts = state->sum_wgts; + double wtd_int_sum = state->wtd_int_sum; + double m = (sum_wgts > 0) ? (wtd_int_sum / sum_wgts) : 0; + double q = intgrl - m; + + state->samples++ ; + state->sum_wgts += wgt; + state->wtd_int_sum += intgrl * wgt; + state->chi_sum += intgrl_sq * wgt; + + cum_int = state->wtd_int_sum / state->sum_wgts; + cum_sig = sqrt (1 / state->sum_wgts); + +#if USE_ORIGINAL_CHISQ_FORMULA +/* This is the chisq formula from the original Lepage paper. It + computes the variance from - ^2 and can suffer from + catastrophic cancellations, e.g. returning negative chisq. */ + if (state->samples > 1) + { + state->chisq = (state->chi_sum - state->wtd_int_sum * cum_int) / + (state->samples - 1.0); + } +#else +/* The new formula below computes exactly the same quantity as above + but using a stable recurrence */ + if (state->samples == 1) { + state->chisq = 0; + } else { + state->chisq *= (state->samples - 2.0); + state->chisq += (wgt / (1 + (wgt / sum_wgts))) * q * q; + state->chisq /= (state->samples - 1.0); + } +#endif + } + else + { + cum_int += (intgrl - cum_int) / (it + 1.0); + cum_sig = 0.0; + } + + + if (state->verbose >= 0) + { + print_res (state, + state->it_num, intgrl, sig, cum_int, cum_sig, + state->chisq); + if (it + 1 == state->iterations && state->verbose > 0) + { + print_grid (state, dim); + } + } + + if (state->verbose > 1) + { + print_dist (state, dim); + } + + refine_grid (state); + + if (state->verbose > 1) + { + print_grid (state, dim); + } + + } + + /* By setting stage to 1 further calls will generate independent + estimates based on the same grid, although it may be rebinned. */ + + state->stage = 1; + + *result = cum_int; + *abserr = cum_sig; + + return GSL_SUCCESS; +} + + + +gsl_monte_vegas_state * +gsl_monte_vegas_alloc (size_t dim) +{ + gsl_monte_vegas_state *s = + (gsl_monte_vegas_state *) malloc (sizeof (gsl_monte_vegas_state)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vegas state struct", + GSL_ENOMEM, 0); + } + + s->delx = (double *) malloc (dim * sizeof (double)); + + if (s->delx == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for delx", GSL_ENOMEM, 0); + } + + s->d = (double *) malloc (BINS_MAX * dim * sizeof (double)); + + if (s->d == 0) + { + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for d", GSL_ENOMEM, 0); + } + + s->xi = (double *) malloc ((BINS_MAX + 1) * dim * sizeof (double)); + + if (s->xi == 0) + { + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for xi", GSL_ENOMEM, 0); + } + + s->xin = (double *) malloc ((BINS_MAX + 1) * sizeof (double)); + + if (s->xin == 0) + { + free (s->xi); + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for xin", GSL_ENOMEM, 0); + } + + s->weight = (double *) malloc (BINS_MAX * sizeof (double)); + + if (s->weight == 0) + { + free (s->xin); + free (s->xi); + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for xin", GSL_ENOMEM, 0); + } + + s->box = (coord *) malloc (dim * sizeof (coord)); + + if (s->box == 0) + { + free (s->weight); + free (s->xin); + free (s->xi); + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for box", GSL_ENOMEM, 0); + } + + s->bin = (coord *) malloc (dim * sizeof (coord)); + + if (s->bin == 0) + { + free (s->box); + free (s->weight); + free (s->xin); + free (s->xi); + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for bin", GSL_ENOMEM, 0); + } + + s->x = (double *) malloc (dim * sizeof (double)); + + if (s->x == 0) + { + free (s->bin); + free (s->box); + free (s->weight); + free (s->xin); + free (s->xi); + free (s->d); + free (s->delx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->dim = dim; + s->bins_max = BINS_MAX; + + gsl_monte_vegas_init (s); + + return s; +} + +/* Set some default values and whatever */ +int +gsl_monte_vegas_init (gsl_monte_vegas_state * state) +{ + state->stage = 0; + state->alpha = 1.5; + state->verbose = -1; + state->iterations = 5; + state->mode = GSL_VEGAS_MODE_IMPORTANCE; + state->chisq = 0; + state->bins = state->bins_max; + state->ostream = stdout; + + return GSL_SUCCESS; +} + +void +gsl_monte_vegas_free (gsl_monte_vegas_state * s) +{ + RETURN_IF_NULL (s); + free (s->x); + free (s->delx); + free (s->d); + free (s->xi); + free (s->xin); + free (s->weight); + free (s->box); + free (s->bin); + free (s); +} + +double +gsl_monte_vegas_chisq (const gsl_monte_vegas_state * s) +{ + return s->chisq; +} + +void +gsl_monte_vegas_runval (const gsl_monte_vegas_state * s, double * result, double * sigma) +{ + *result = s->result; + *sigma = s->sigma; +} + +void +gsl_monte_vegas_params_get (const gsl_monte_vegas_state * s, gsl_monte_vegas_params * p) +{ + p->alpha = s->alpha; + p->iterations = s->iterations; + p->stage = s->stage; + p->mode = s->mode; + p->verbose = s->verbose; + p->ostream = s->ostream; +} + +void +gsl_monte_vegas_params_set (gsl_monte_vegas_state * s, const gsl_monte_vegas_params * p) +{ + s->alpha = p->alpha; + s->iterations = p->iterations; + s->stage = p->stage; + s->mode = p->mode; + s->verbose = p->verbose; + s->ostream = p->ostream; +} + +static void +init_box_coord (gsl_monte_vegas_state * s, coord box[]) +{ + size_t i; + + size_t dim = s->dim; + + for (i = 0; i < dim; i++) + { + box[i] = 0; + } +} + +/* change_box_coord steps through the box coord like + {0,0}, {0, 1}, {0, 2}, {0, 3}, {1, 0}, {1, 1}, {1, 2}, ... +*/ +static int +change_box_coord (gsl_monte_vegas_state * s, coord box[]) +{ + int j = s->dim - 1; + + int ng = s->boxes; + + while (j >= 0) + { + box[j] = (box[j] + 1) % ng; + + if (box[j] != 0) + { + return 1; + } + + j--; + } + + return 0; +} + +static void +init_grid (gsl_monte_vegas_state * s, double xl[], double xu[], size_t dim) +{ + size_t j; + + double vol = 1.0; + + s->bins = 1; + + for (j = 0; j < dim; j++) + { + double dx = xu[j] - xl[j]; + s->delx[j] = dx; + vol *= dx; + + COORD (s, 0, j) = 0.0; + COORD (s, 1, j) = 1.0; + } + + s->vol = vol; +} + + +static void +reset_grid_values (gsl_monte_vegas_state * s) +{ + size_t i, j; + + size_t dim = s->dim; + size_t bins = s->bins; + + for (i = 0; i < bins; i++) + { + for (j = 0; j < dim; j++) + { + VALUE (s, i, j) = 0.0; + } + } +} + +static void +accumulate_distribution (gsl_monte_vegas_state * s, coord bin[], double y) +{ + size_t j; + size_t dim = s->dim; + + for (j = 0; j < dim; j++) + { + int i = bin[j]; + VALUE (s, i, j) += y; + } +} + +static void +random_point (double x[], coord bin[], double *bin_vol, + const coord box[], const double xl[], const double xu[], + gsl_monte_vegas_state * s, gsl_rng * r) +{ + /* Use the random number generator r to return a random position x + in a given box. The value of bin gives the bin location of the + random position (there may be several bins within a given box) */ + + double vol = 1.0; + + size_t j; + + size_t dim = s->dim; + size_t bins = s->bins; + size_t boxes = s->boxes; + + DISCARD_POINTER(xu); /* prevent warning about unused parameter */ + + for (j = 0; j < dim; ++j) + { + /* box[j] + ran gives the position in the box units, while z + is the position in bin units. */ + + double z = ((box[j] + gsl_rng_uniform_pos (r)) / boxes) * bins; + + int k = z; + + double y, bin_width; + + bin[j] = k; + + if (k == 0) + { + bin_width = COORD (s, 1, j); + y = z * bin_width; + } + else + { + bin_width = COORD (s, k + 1, j) - COORD (s, k, j); + y = COORD (s, k, j) + (z - k) * bin_width; + } + + x[j] = xl[j] + y * s->delx[j]; + + vol *= bin_width; + } + + *bin_vol = vol; +} + + +static void +resize_grid (gsl_monte_vegas_state * s, unsigned int bins) +{ + size_t j, k; + size_t dim = s->dim; + + /* weight is ratio of bin sizes */ + + double pts_per_bin = (double) s->bins / (double) bins; + + for (j = 0; j < dim; j++) + { + double xold; + double xnew = 0; + double dw = 0; + int i = 1; + + for (k = 1; k <= s->bins; k++) + { + dw += 1.0; + xold = xnew; + xnew = COORD (s, k, j); + + for (; dw > pts_per_bin; i++) + { + dw -= pts_per_bin; + NEW_COORD (s, i) = xnew - (xnew - xold) * dw; + } + } + + for (k = 1 ; k < bins; k++) + { + COORD(s, k, j) = NEW_COORD(s, k); + } + + COORD (s, bins, j) = 1; + } + + s->bins = bins; +} + +static void +refine_grid (gsl_monte_vegas_state * s) +{ + size_t i, j, k; + size_t dim = s->dim; + size_t bins = s->bins; + + for (j = 0; j < dim; j++) + { + double grid_tot_j, tot_weight; + double * weight = s->weight; + + double oldg = VALUE (s, 0, j); + double newg = VALUE (s, 1, j); + + VALUE (s, 0, j) = (oldg + newg) / 2; + grid_tot_j = VALUE (s, 0, j); + + /* This implements gs[i][j] = (gs[i-1][j]+gs[i][j]+gs[i+1][j])/3 */ + + for (i = 1; i < bins - 1; i++) + { + double rc = oldg + newg; + oldg = newg; + newg = VALUE (s, i + 1, j); + VALUE (s, i, j) = (rc + newg) / 3; + grid_tot_j += VALUE (s, i, j); + } + VALUE (s, bins - 1, j) = (newg + oldg) / 2; + + grid_tot_j += VALUE (s, bins - 1, j); + + tot_weight = 0; + + for (i = 0; i < bins; i++) + { + weight[i] = 0; + + if (VALUE (s, i, j) > 0) + { + oldg = grid_tot_j / VALUE (s, i, j); + /* damped change */ + weight[i] = pow (((oldg - 1) / oldg / log (oldg)), s->alpha); + } + + tot_weight += weight[i]; + +#ifdef DEBUG + printf("weight[%d] = %g\n", i, weight[i]); +#endif + } + + { + double pts_per_bin = tot_weight / bins; + + double xold; + double xnew = 0; + double dw = 0; + i = 1; + + for (k = 0; k < bins; k++) + { + dw += weight[k]; + xold = xnew; + xnew = COORD (s, k + 1, j); + + for (; dw > pts_per_bin; i++) + { + dw -= pts_per_bin; + NEW_COORD (s, i) = xnew - (xnew - xold) * dw / weight[k]; + } + } + + for (k = 1 ; k < bins ; k++) + { + COORD(s, k, j) = NEW_COORD(s, k); + } + + COORD (s, bins, j) = 1; + } + } +} + + +static void +print_lim (gsl_monte_vegas_state * state, + double xl[], double xu[], unsigned long dim) +{ + unsigned long j; + + fprintf (state->ostream, "The limits of integration are:\n"); + for (j = 0; j < dim; ++j) + fprintf (state->ostream, "\nxl[%lu]=%f xu[%lu]=%f", j, xl[j], j, xu[j]); + fprintf (state->ostream, "\n"); + fflush (state->ostream); +} + +static void +print_head (gsl_monte_vegas_state * state, + unsigned long num_dim, unsigned long calls, + unsigned int it_num, unsigned int bins, unsigned int boxes) +{ + fprintf (state->ostream, + "\nnum_dim=%lu, calls=%lu, it_num=%d, max_it_num=%d ", + num_dim, calls, it_num, state->iterations); + fprintf (state->ostream, + "verb=%d, alph=%.2f,\nmode=%d, bins=%d, boxes=%d\n", + state->verbose, state->alpha, state->mode, bins, boxes); + fprintf (state->ostream, + "\n single.......iteration "); + fprintf (state->ostream, "accumulated......results \n"); + + fprintf (state->ostream, + "iteration integral sigma integral "); + fprintf (state->ostream, " sigma chi-sq/it\n\n"); + fflush (state->ostream); + +} + +static void +print_res (gsl_monte_vegas_state * state, + unsigned int itr, + double res, double err, + double cum_res, double cum_err, + double chi_sq) +{ + fprintf (state->ostream, + "%4d %6.4e %10.2e %6.4e %8.2e %10.2e\n", + itr, res, err, cum_res, cum_err, chi_sq); + fflush (state->ostream); +} + +static void +print_dist (gsl_monte_vegas_state * state, unsigned long dim) +{ + unsigned long i, j; + int p = state->verbose; + if (p < 1) + return; + + for (j = 0; j < dim; ++j) + { + fprintf (state->ostream, "\n axis %lu \n", j); + fprintf (state->ostream, " x g\n"); + for (i = 0; i < state->bins; i++) + { + fprintf (state->ostream, "weight [%11.2e , %11.2e] = ", + COORD (state, i, j), COORD(state,i+1,j)); + fprintf (state->ostream, " %11.2e\n", VALUE (state, i, j)); + + } + fprintf (state->ostream, "\n"); + } + fprintf (state->ostream, "\n"); + fflush (state->ostream); + +} + +static void +print_grid (gsl_monte_vegas_state * state, unsigned long dim) +{ + unsigned long i, j; + int p = state->verbose; + if (p < 1) + return; + + for (j = 0; j < dim; ++j) + { + fprintf (state->ostream, "\n axis %lu \n", j); + fprintf (state->ostream, " x \n"); + for (i = 0; i <= state->bins; i++) + { + fprintf (state->ostream, "%11.2e", COORD (state, i, j)); + if (i % 5 == 4) + fprintf (state->ostream, "\n"); + } + fprintf (state->ostream, "\n"); + } + fprintf (state->ostream, "\n"); + fflush (state->ostream); + +} + diff --git a/software/gsl-1.15/multifit/.deps/convergence.Plo b/software/gsl-1.15/multifit/.deps/convergence.Plo new file mode 100644 index 000000000..243662b52 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/convergence.Plo @@ -0,0 +1,250 @@ +convergence.lo: convergence.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_multifit_nlin.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multifit_nlin.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multifit/.deps/covar.Plo b/software/gsl-1.15/multifit/.deps/covar.Plo new file mode 100644 index 000000000..96ecf9dd6 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/covar.Plo @@ -0,0 +1,256 @@ +covar.lo: covar.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_permutation.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_multifit_nlin.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_multifit_nlin.h: diff --git a/software/gsl-1.15/multifit/.deps/fdfsolver.Plo b/software/gsl-1.15/multifit/.deps/fdfsolver.Plo new file mode 100644 index 000000000..9c3406416 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/fdfsolver.Plo @@ -0,0 +1,256 @@ +fdfsolver.lo: fdfsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_multifit_nlin.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multifit_nlin.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multifit/.deps/fsolver.Plo b/software/gsl-1.15/multifit/.deps/fsolver.Plo new file mode 100644 index 000000000..444375a82 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/fsolver.Plo @@ -0,0 +1,256 @@ +fsolver.lo: fsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_multifit_nlin.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multifit_nlin.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multifit/.deps/gradient.Plo b/software/gsl-1.15/multifit/.deps/gradient.Plo new file mode 100644 index 000000000..4447b98c9 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/gradient.Plo @@ -0,0 +1,258 @@ +gradient.lo: gradient.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_multifit_nlin.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multifit_nlin.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/multifit/.deps/lmder.Plo b/software/gsl-1.15/multifit/.deps/lmder.Plo new file mode 100644 index 000000000..d7122cea4 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/lmder.Plo @@ -0,0 +1,280 @@ +lmder.lo: lmder.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_multifit_nlin.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h lmutil.c lmpar.c \ + ../gsl/gsl_permute_vector_double.h qrsolv.c lmset.c lmiterate.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multifit_nlin.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +lmutil.c: + +lmpar.c: + +../gsl/gsl_permute_vector_double.h: + +qrsolv.c: + +lmset.c: + +lmiterate.c: diff --git a/software/gsl-1.15/multifit/.deps/multilinear.Plo b/software/gsl-1.15/multifit/.deps/multilinear.Plo new file mode 100644 index 000000000..d51bd97a7 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/multilinear.Plo @@ -0,0 +1,266 @@ +multilinear.lo: multilinear.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multifit.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_linalg.h ../gsl/gsl_mode.h ../gsl/gsl_permutation.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multifit.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/multifit/.deps/test.Po b/software/gsl-1.15/multifit/.deps/test.Po new file mode 100644 index 000000000..5ca3f4146 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/test.Po @@ -0,0 +1,287 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_multifit.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_multifit_nlin.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_ieee_utils.h \ + test_longley.c test_filip.c test_pontius.c test_brown.c test_enso.c \ + test_kirby2.c test_hahn1.c test_nelson.c test_fn.c test_estimator.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_multifit.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_multifit_nlin.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_ieee_utils.h: + +test_longley.c: + +test_filip.c: + +test_pontius.c: + +test_brown.c: + +test_enso.c: + +test_kirby2.c: + +test_hahn1.c: + +test_nelson.c: + +test_fn.c: + +test_estimator.c: diff --git a/software/gsl-1.15/multifit/.deps/work.Plo b/software/gsl-1.15/multifit/.deps/work.Plo new file mode 100644 index 000000000..efade22a9 --- /dev/null +++ b/software/gsl-1.15/multifit/.deps/work.Plo @@ -0,0 +1,249 @@ +work.lo: work.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multifit.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multifit.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multifit/ChangeLog b/software/gsl-1.15/multifit/ChangeLog new file mode 100644 index 000000000..5c2291047 --- /dev/null +++ b/software/gsl-1.15/multifit/ChangeLog @@ -0,0 +1,179 @@ +2010-02-25 Brian Gough + + * lmiterate.c (iterate): changed GSL_CONTINUE to GSL_ENOPROG for + the case where the routine has made 10 or more attempts to find a + suitable trial step without success. + +2009-11-25 Brian Gough + + * multilinear.c (gsl_multifit_linear_usvd) + (gsl_multifit_wlinear_usvd): provide an unscaled version of the + fits + +2009-07-09 Brian Gough + + * work.c (gsl_multifit_linear_free): handle NULL argument in free + + * fsolver.c (gsl_multifit_fsolver_free): handle NULL argument in + free + + * fdfsolver.c (gsl_multifit_fdfsolver_free): handle NULL argument + in free + +2009-06-24 Brian Gough + + * lmset.c (set): check the return code of fdf + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-07-29 Brian Gough + + * lmset.c (set): ensure internal state is zeroed after a set + +2007-01-26 Brian Gough + + * fsolver.c (gsl_multifit_fsolver_set): made vector argument x + const + +2006-03-30 Brian Gough + + * fsolver.c (gsl_multifit_fsolver_alloc): minpack algorithms + require n>=p, added check + + * fdfsolver.c (gsl_multifit_fdfsolver_alloc): minpack algorithms + require n>=p, added check + +2006-02-20 Brian Gough + + * multilinear.c (gsl_multifit_linear_est): added linear estimator + + * test_estimator.c (test_estimator): added test for gsl_multifit_linear_est + +2005-07-03 Brian Gough + + * multilinear.c (gsl_multifit_linear_svd): accept a user-specified + tolerance for the SVD cutoff and return effective rank + (gsl_multifit_wlinear_svd): same + +2004-12-23 Brian Gough + + * gsl_multifit_nlin.h: removed unused declaration of + gsl_multifit_fdjacobian + +2004-06-14 Brian Gough + + * lmiterate.c (iterate): handle case where fnorm = 0 to avoid + division by zero + + * covar.c (gsl_multifit_covar): change tolerance test to match + original code, and handle case where tolr = 0 + +2003-03-21 Brian Gough + + * lmset.c (set): removed reference to q, compute QR decomposition + in place + + * lmiterate.c (iterate): removed reference to q, compute QR + decomposition in-place for R + + * lmutil.c: removed compute_qtf + + * lmder.c (lmder_free): removed reference to q + (lmder_alloc): removed reference to q + +Tue Nov 12 22:18:14 2002 Brian Gough + + * lmder.c (lmder_alloc): use GSL_ERROR instead of GSL_ERROR_VAL + for internal alloc functions which return int + +Thu Feb 28 20:15:33 2002 Brian Gough + + * lmiterate.c (iterate): return immediately if evaluation raised + error (Hans E. Plesser) + + * lmpar.c (lmpar): avoid division by zero for w=0 in rank + deficient case + +Mon Oct 8 19:25:55 2001 Brian Gough + + * test.c (main): added extra nist tests + + * lmutil.c (compute_rptdx): fixed bug, permutation in rptdx vector + was incorrectly applied + + * lmpar.c (compute_newton_direction): fixed bug, permutation of + newton direction vector was incorrect (should have been inverse + permutation) + +Mon Jul 30 17:43:21 2001 Brian Gough + + * test_filip.c (test_filip): reduce tolerance on covariance test + slightly for MSVC with /O2 + +Sun Jul 1 22:42:34 2001 Brian Gough + + * multilinear.c: modified to use new-style vector views + + * test_pontius.c: modified to use new-style vector views + + * test_longley.c: modified to use new-style vector views + + * test_fn.c: modified to use new-style vector views + + * test_filip.c: modified to use new-style vector views + +Tue Jun 26 21:41:30 2001 Brian Gough + + * test_filip.c (test_filip): reduce tolerance on covariance test + slightly + +Wed Jun 20 13:11:26 2001 Brian Gough + + * removed unused variable work2 + +Tue Jun 19 23:18:01 2001 Brian Gough + + * multilinear.c: perform column scaling before doing fit to + improve accuracy + (gsl_multifit_linear): use modified Golub-Reinsch SVD for greater + speed + (gsl_multifit_wlinear): use modified Golub-Reinsch SVD for greater + speed + +Wed Jun 6 13:32:22 2001 Brian Gough + + * lmder.c covar.c lmiterate.c lmset.c: updated to use new QR + calling convention (now passes workspace) + +Sat Apr 28 11:46:59 2001 Brian Gough + + * qrsolv.c (qrsolv): removed local declaration of j to avoid + shadowing global j + +Mon Apr 23 13:40:04 2001 Brian Gough + + * qrsolv.c (qrsolv): made function static so it is not exported + +Wed Apr 18 13:39:33 2001 Brian Gough + + * lmpar.c (compute_newton_direction): moved final rescaling inside + loop, as in the original lmpar.f + +Thu Mar 8 15:29:32 2001 Brian Gough + + * lmpar.c (compute_newton_direction): corrected bug that produced + negative index + +Sun Feb 18 16:39:46 2001 Brian Gough + + * fdfsolver.c (gsl_multifit_fdfsolver_alloc): changed so that the + solver _alloc function no longer calls _set, the user must do that + separately. + +Fri Sep 29 19:19:24 2000 Brian Gough + + * Makefile.am multifit/demo.c: removed demo from Makefile since it + is was just a temporary test. + diff --git a/software/gsl-1.15/multifit/Makefile.am b/software/gsl-1.15/multifit/Makefile.am new file mode 100644 index 000000000..b79c853f0 --- /dev/null +++ b/software/gsl-1.15/multifit/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libgslmultifit.la + +pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h + +INCLUDES = -I$(top_srcdir) + +libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c + +noinst_HEADERS = lmutil.c lmpar.c lmset.c lmiterate.c qrsolv.c test_brown.c test_enso.c test_filip.c test_fn.c test_hahn1.c test_kirby2.c test_longley.c test_nelson.c test_pontius.c test_estimator.c + +check_PROGRAMS = test #demo + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c +test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + diff --git a/software/gsl-1.15/multifit/Makefile.in b/software/gsl-1.15/multifit/Makefile.in new file mode 100644 index 000000000..65582e6a0 --- /dev/null +++ b/software/gsl-1.15/multifit/Makefile.in @@ -0,0 +1,677 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = multifit +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmultifit_la_LIBADD = +am_libgslmultifit_la_OBJECTS = multilinear.lo work.lo lmder.lo \ + fsolver.lo fdfsolver.lo convergence.lo gradient.lo covar.lo +libgslmultifit_la_OBJECTS = $(am_libgslmultifit_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmultifit.la ../linalg/libgsllinalg.la \ + ../permutation/libgslpermutation.la ../blas/libgslblas.la \ + ../cblas/libgslcblas.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la \ + ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmultifit_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmultifit_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmultifit.la +pkginclude_HEADERS = gsl_multifit.h gsl_multifit_nlin.h +INCLUDES = -I$(top_srcdir) +libgslmultifit_la_SOURCES = multilinear.c work.c lmder.c fsolver.c fdfsolver.c convergence.c gradient.c covar.c +noinst_HEADERS = lmutil.c lmpar.c lmset.c lmiterate.c qrsolv.c test_brown.c test_enso.c test_filip.c test_fn.c test_hahn1.c test_kirby2.c test_longley.c test_nelson.c test_pontius.c test_estimator.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu multifit/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu multifit/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmultifit.la: $(libgslmultifit_la_OBJECTS) $(libgslmultifit_la_DEPENDENCIES) + $(LINK) $(libgslmultifit_la_OBJECTS) $(libgslmultifit_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/covar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdfsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multilinear.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/multifit/TODO b/software/gsl-1.15/multifit/TODO new file mode 100644 index 000000000..d31c469a9 --- /dev/null +++ b/software/gsl-1.15/multifit/TODO @@ -0,0 +1,10 @@ +# -*- org -*- +#+CATEGORY: multifit + +The following would also be nice additions to the multifit function suite +(see MS Excel regression output for example): + +1. Produce the correlation coefficient (r) and other statistics. +2. Allow fit variable weighting (not observation weighting). +3. Allow for principal factor computations. + diff --git a/software/gsl-1.15/multifit/convergence.c b/software/gsl-1.15/multifit/convergence.c new file mode 100644 index 000000000..760a46061 --- /dev/null +++ b/software/gsl-1.15/multifit/convergence.c @@ -0,0 +1,89 @@ +/* multifit/convergence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_multifit_test_delta (const gsl_vector * dx, const gsl_vector * x, + double epsabs, double epsrel) +{ + size_t i; + int ok = 1; + const size_t n = x->size ; + + if (epsrel < 0.0) + { + GSL_ERROR ("relative tolerance is negative", GSL_EBADTOL); + } + + for (i = 0 ; i < n ; i++) + { + double xi = gsl_vector_get(x,i); + double dxi = gsl_vector_get(dx,i); + double tolerance = epsabs + epsrel * fabs(xi) ; + + if (fabs(dxi) < tolerance) + { + ok = 1; + } + else + { + ok = 0; + break; + } + } + + if (ok) + return GSL_SUCCESS ; + + return GSL_CONTINUE; +} + +int +gsl_multifit_test_gradient (const gsl_vector * g, double epsabs) +{ + size_t i; + + double residual = 0; + + const size_t n = g->size; + + if (epsabs < 0.0) + { + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + } + + for (i = 0 ; i < n ; i++) + { + double gi = gsl_vector_get(g, i); + + residual += fabs(gi); + } + + + if (residual < epsabs) + { + return GSL_SUCCESS; + } + + return GSL_CONTINUE ; +} diff --git a/software/gsl-1.15/multifit/covar.c b/software/gsl-1.15/multifit/covar.c new file mode 100644 index 000000000..36591406a --- /dev/null +++ b/software/gsl-1.15/multifit/covar.c @@ -0,0 +1,192 @@ +/* multifit/covar.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* Compute the covariance matrix + + cov = inv (J^T J) + + by QRP^T decomposition of J +*/ + +int +gsl_multifit_covar (const gsl_matrix * J, double epsrel, gsl_matrix * covar) +{ + double tolr; + + size_t i, j, k; + size_t kmax = 0; + + gsl_matrix * r; + gsl_vector * tau; + gsl_vector * norm; + gsl_permutation * perm; + + size_t m = J->size1, n = J->size2 ; + + if (m < n) + { + GSL_ERROR ("Jacobian be rectangular M x N with M >= N", GSL_EBADLEN); + } + + if (covar->size1 != covar->size2 || covar->size1 != n) + { + GSL_ERROR ("covariance matrix must be square and match second dimension of jacobian", GSL_EBADLEN); + } + + r = gsl_matrix_alloc (m, n); + tau = gsl_vector_alloc (n); + perm = gsl_permutation_alloc (n) ; + norm = gsl_vector_alloc (n) ; + + { + int signum = 0; + gsl_matrix_memcpy (r, J); + gsl_linalg_QRPT_decomp (r, tau, perm, &signum, norm); + } + + + /* Form the inverse of R in the full upper triangle of R */ + + tolr = epsrel * fabs(gsl_matrix_get(r, 0, 0)); + + for (k = 0 ; k < n ; k++) + { + double rkk = gsl_matrix_get(r, k, k); + + if (fabs(rkk) <= tolr) + { + break; + } + + gsl_matrix_set(r, k, k, 1.0/rkk); + + for (j = 0; j < k ; j++) + { + double t = gsl_matrix_get(r, j, k) / rkk; + gsl_matrix_set (r, j, k, 0.0); + + for (i = 0; i <= j; i++) + { + double rik = gsl_matrix_get (r, i, k); + double rij = gsl_matrix_get (r, i, j); + + gsl_matrix_set (r, i, k, rik - t * rij); + } + } + kmax = k; + } + + /* Form the full upper triangle of the inverse of R^T R in the full + upper triangle of R */ + + for (k = 0; k <= kmax ; k++) + { + for (j = 0; j < k; j++) + { + double rjk = gsl_matrix_get (r, j, k); + + for (i = 0; i <= j ; i++) + { + double rij = gsl_matrix_get (r, i, j); + double rik = gsl_matrix_get (r, i, k); + + gsl_matrix_set (r, i, j, rij + rjk * rik); + } + } + + { + double t = gsl_matrix_get (r, k, k); + + for (i = 0; i <= k; i++) + { + double rik = gsl_matrix_get (r, i, k); + + gsl_matrix_set (r, i, k, t * rik); + }; + } + } + + /* Form the full lower triangle of the covariance matrix in the + strict lower triangle of R and in w */ + + for (j = 0 ; j < n ; j++) + { + size_t pj = gsl_permutation_get (perm, j); + + for (i = 0; i <= j; i++) + { + size_t pi = gsl_permutation_get (perm, i); + + double rij; + + if (j > kmax) + { + gsl_matrix_set (r, i, j, 0.0); + rij = 0.0 ; + } + else + { + rij = gsl_matrix_get (r, i, j); + } + + if (pi > pj) + { + gsl_matrix_set (r, pi, pj, rij); + } + else if (pi < pj) + { + gsl_matrix_set (r, pj, pi, rij); + } + + } + + { + double rjj = gsl_matrix_get (r, j, j); + gsl_matrix_set (covar, pj, pj, rjj); + } + } + + + /* symmetrize the covariance matrix */ + + for (j = 0 ; j < n ; j++) + { + for (i = 0; i < j ; i++) + { + double rji = gsl_matrix_get (r, j, i); + + gsl_matrix_set (covar, j, i, rji); + gsl_matrix_set (covar, i, j, rji); + } + } + + gsl_matrix_free (r); + gsl_permutation_free (perm); + gsl_vector_free (tau); + gsl_vector_free (norm); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multifit/fdfsolver.c b/software/gsl-1.15/multifit/fdfsolver.c new file mode 100644 index 000000000..c89457cef --- /dev/null +++ b/software/gsl-1.15/multifit/fdfsolver.c @@ -0,0 +1,171 @@ +/* multifit/fdfsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_multifit_fdfsolver * +gsl_multifit_fdfsolver_alloc (const gsl_multifit_fdfsolver_type * T, + size_t n, size_t p) +{ + int status; + + gsl_multifit_fdfsolver * s; + + if (n < p) + { + GSL_ERROR_VAL ("insufficient data points, n < p", GSL_EINVAL, 0); + } + + s = (gsl_multifit_fdfsolver *) malloc (sizeof (gsl_multifit_fdfsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multifit solver struct", + GSL_ENOMEM, 0); + } + + s->x = gsl_vector_calloc (p); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->f = gsl_vector_calloc (n); + + if (s->f == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for f", GSL_ENOMEM, 0); + } + + s->J = gsl_matrix_calloc (n,p); + + if (s->J == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for g", GSL_ENOMEM, 0); + } + + s->dx = gsl_vector_calloc (p); + + if (s->dx == 0) + { + gsl_matrix_free (s->J); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for dx", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for multifit solver state", + GSL_ENOMEM, 0); + } + + s->type = T ; + + status = (s->type->alloc)(s->state, n, p); + + if (status != GSL_SUCCESS) + { + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to set solver", status, 0); + } + + s->fdf = NULL; + + return s; +} + +int +gsl_multifit_fdfsolver_set (gsl_multifit_fdfsolver * s, + gsl_multifit_function_fdf * f, + const gsl_vector * x) +{ + if (s->f->size != f->n) + { + GSL_ERROR ("function size does not match solver", GSL_EBADLEN); + } + + if (s->x->size != x->size) + { + GSL_ERROR ("vector length does not match solver", GSL_EBADLEN); + } + + s->fdf = f; + gsl_vector_memcpy(s->x,x); + + return (s->type->set) (s->state, s->fdf, s->x, s->f, s->J, s->dx); +} + +int +gsl_multifit_fdfsolver_iterate (gsl_multifit_fdfsolver * s) +{ + return (s->type->iterate) (s->state, s->fdf, s->x, s->f, s->J, s->dx); +} + +void +gsl_multifit_fdfsolver_free (gsl_multifit_fdfsolver * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); +} + +const char * +gsl_multifit_fdfsolver_name (const gsl_multifit_fdfsolver * s) +{ + return s->type->name; +} + +gsl_vector * +gsl_multifit_fdfsolver_position (const gsl_multifit_fdfsolver * s) +{ + return s->x; +} + diff --git a/software/gsl-1.15/multifit/fsolver.c b/software/gsl-1.15/multifit/fsolver.c new file mode 100644 index 000000000..aab59c2f2 --- /dev/null +++ b/software/gsl-1.15/multifit/fsolver.c @@ -0,0 +1,157 @@ +/* multifit/fsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_multifit_fsolver * +gsl_multifit_fsolver_alloc (const gsl_multifit_fsolver_type * T, + size_t n, size_t p) +{ + int status; + + gsl_multifit_fsolver * s; + + if (n < p) + { + GSL_ERROR_VAL ("insufficient data points, n < p", GSL_EINVAL, 0); + } + + s = (gsl_multifit_fsolver *) malloc (sizeof (gsl_multifit_fsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multifit solver struct", + GSL_ENOMEM, 0); + } + + s->x = gsl_vector_calloc (p); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->f = gsl_vector_calloc (n); + + if (s->f == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for f", GSL_ENOMEM, 0); + } + + s->dx = gsl_vector_calloc (p); + + if (s->dx == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for dx", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for multifit solver state", + GSL_ENOMEM, 0); + } + + s->type = T ; + + status = (s->type->alloc)(s->state, n, p); + + if (status != GSL_SUCCESS) + { + (s->type->free)(s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to set solver", status, 0); + } + + s->function = NULL; + + return s; +} + +int +gsl_multifit_fsolver_set (gsl_multifit_fsolver * s, + gsl_multifit_function * f, + const gsl_vector * x) +{ + if (s->f->size != f->n) + { + GSL_ERROR ("function size does not match solver", GSL_EBADLEN); + } + + if (s->x->size != x->size) + { + GSL_ERROR ("vector length does not match solver", GSL_EBADLEN); + } + + s->function = f; + gsl_vector_memcpy(s->x,x); + + return (s->type->set) (s->state, s->function, s->x, s->f, s->dx); +} + +int +gsl_multifit_fsolver_iterate (gsl_multifit_fsolver * s) +{ + return (s->type->iterate) (s->state, s->function, s->x, s->f, s->dx); +} + +void +gsl_multifit_fsolver_free (gsl_multifit_fsolver * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); +} + +const char * +gsl_multifit_fsolver_name (const gsl_multifit_fsolver * s) +{ + return s->type->name; +} + +gsl_vector * +gsl_multifit_fsolver_position (const gsl_multifit_fsolver * s) +{ + return s->x; +} diff --git a/software/gsl-1.15/multifit/gradient.c b/software/gsl-1.15/multifit/gradient.c new file mode 100644 index 000000000..93d64a80a --- /dev/null +++ b/software/gsl-1.15/multifit/gradient.c @@ -0,0 +1,33 @@ +/* multifit/covar.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_multifit_gradient (const gsl_matrix * J, const gsl_vector * f, + gsl_vector * g) +{ + int status = gsl_blas_dgemv (CblasTrans, 1.0, J, f, 0.0, g); + return status; +} + diff --git a/software/gsl-1.15/multifit/gsl_multifit.h b/software/gsl-1.15/multifit/gsl_multifit.h new file mode 100644 index 000000000..a32d767f0 --- /dev/null +++ b/software/gsl-1.15/multifit/gsl_multifit.h @@ -0,0 +1,130 @@ +/* multifit/gsl_multifit.h + * + * Copyright (C) 2000, 2007, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MULTIFIT_H__ +#define __GSL_MULTIFIT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t n; /* number of observations */ + size_t p; /* number of parameters */ + gsl_matrix * A; + gsl_matrix * Q; + gsl_matrix * QSI; + gsl_vector * S; + gsl_vector * t; + gsl_vector * xt; + gsl_vector * D; +} +gsl_multifit_linear_workspace; + +gsl_multifit_linear_workspace * +gsl_multifit_linear_alloc (size_t n, size_t p); + +void +gsl_multifit_linear_free (gsl_multifit_linear_workspace * work); + +int +gsl_multifit_linear (const gsl_matrix * X, + const gsl_vector * y, + gsl_vector * c, + gsl_matrix * cov, + double * chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_linear_svd (const gsl_matrix * X, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_linear_usvd (const gsl_matrix * X, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_wlinear (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + gsl_vector * c, + gsl_matrix * cov, + double * chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_wlinear_svd (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_wlinear_usvd (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, + gsl_multifit_linear_workspace * work); + +int +gsl_multifit_linear_est (const gsl_vector * x, + const gsl_vector * c, + const gsl_matrix * cov, double *y, double *y_err); + +int +gsl_multifit_linear_residuals (const gsl_matrix *X, const gsl_vector *y, + const gsl_vector *c, gsl_vector *r); + +__END_DECLS + +#endif /* __GSL_MULTIFIT_H__ */ diff --git a/software/gsl-1.15/multifit/gsl_multifit_nlin.h b/software/gsl-1.15/multifit/gsl_multifit_nlin.h new file mode 100644 index 000000000..96bd01400 --- /dev/null +++ b/software/gsl-1.15/multifit/gsl_multifit_nlin.h @@ -0,0 +1,172 @@ +/* multifit_nlin/gsl_multifit_nlin.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MULTIFIT_NLIN_H__ +#define __GSL_MULTIFIT_NLIN_H__ + +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_multifit_gradient (const gsl_matrix * J, const gsl_vector * f, + gsl_vector * g); + +int gsl_multifit_covar (const gsl_matrix * J, double epsrel, gsl_matrix * covar); + + +/* Definition of vector-valued functions with parameters based on gsl_vector */ + +struct gsl_multifit_function_struct +{ + int (* f) (const gsl_vector * x, void * params, gsl_vector * f); + size_t n; /* number of functions */ + size_t p; /* number of independent variables */ + void * params; +}; + +typedef struct gsl_multifit_function_struct gsl_multifit_function ; + +#define GSL_MULTIFIT_FN_EVAL(F,x,y) (*((F)->f))(x,(F)->params,(y)) + +typedef struct + { + const char *name; + size_t size; + int (*alloc) (void *state, size_t n, size_t p); + int (*set) (void *state, gsl_multifit_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); + int (*iterate) (void *state, gsl_multifit_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); + void (*free) (void *state); + } +gsl_multifit_fsolver_type; + +typedef struct + { + const gsl_multifit_fsolver_type * type; + gsl_multifit_function * function ; + gsl_vector * x ; + gsl_vector * f ; + gsl_vector * dx ; + void *state; + } +gsl_multifit_fsolver; + +gsl_multifit_fsolver * +gsl_multifit_fsolver_alloc (const gsl_multifit_fsolver_type * T, + size_t n, size_t p); + +void gsl_multifit_fsolver_free (gsl_multifit_fsolver * s); + +int gsl_multifit_fsolver_set (gsl_multifit_fsolver * s, + gsl_multifit_function * f, + const gsl_vector * x); + +int gsl_multifit_fsolver_iterate (gsl_multifit_fsolver * s); + +const char * gsl_multifit_fsolver_name (const gsl_multifit_fsolver * s); +gsl_vector * gsl_multifit_fsolver_position (const gsl_multifit_fsolver * s); + +/* Definition of vector-valued functions and gradient with parameters + based on gsl_vector */ + +struct gsl_multifit_function_fdf_struct +{ + int (* f) (const gsl_vector * x, void * params, gsl_vector * f); + int (* df) (const gsl_vector * x, void * params, gsl_matrix * df); + int (* fdf) (const gsl_vector * x, void * params, gsl_vector * f, gsl_matrix *df); + size_t n; /* number of functions */ + size_t p; /* number of independent variables */ + void * params; +}; + +typedef struct gsl_multifit_function_fdf_struct gsl_multifit_function_fdf ; + +#define GSL_MULTIFIT_FN_EVAL_F(F,x,y) ((*((F)->f))(x,(F)->params,(y))) +#define GSL_MULTIFIT_FN_EVAL_DF(F,x,dy) ((*((F)->df))(x,(F)->params,(dy))) +#define GSL_MULTIFIT_FN_EVAL_F_DF(F,x,y,dy) ((*((F)->fdf))(x,(F)->params,(y),(dy))) + +typedef struct + { + const char *name; + size_t size; + int (*alloc) (void *state, size_t n, size_t p); + int (*set) (void *state, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); + int (*iterate) (void *state, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); + void (*free) (void *state); + } +gsl_multifit_fdfsolver_type; + +typedef struct + { + const gsl_multifit_fdfsolver_type * type; + gsl_multifit_function_fdf * fdf ; + gsl_vector * x; + gsl_vector * f; + gsl_matrix * J; + gsl_vector * dx; + void *state; + } +gsl_multifit_fdfsolver; + + +gsl_multifit_fdfsolver * +gsl_multifit_fdfsolver_alloc (const gsl_multifit_fdfsolver_type * T, + size_t n, size_t p); + +int +gsl_multifit_fdfsolver_set (gsl_multifit_fdfsolver * s, + gsl_multifit_function_fdf * fdf, + const gsl_vector * x); + +int +gsl_multifit_fdfsolver_iterate (gsl_multifit_fdfsolver * s); + +void +gsl_multifit_fdfsolver_free (gsl_multifit_fdfsolver * s); + +const char * gsl_multifit_fdfsolver_name (const gsl_multifit_fdfsolver * s); +gsl_vector * gsl_multifit_fdfsolver_position (const gsl_multifit_fdfsolver * s); + +int gsl_multifit_test_delta (const gsl_vector * dx, const gsl_vector * x, + double epsabs, double epsrel); + +int gsl_multifit_test_gradient (const gsl_vector * g, double epsabs); + +/* extern const gsl_multifit_fsolver_type * gsl_multifit_fsolver_gradient; */ + +GSL_VAR const gsl_multifit_fdfsolver_type * gsl_multifit_fdfsolver_lmder; +GSL_VAR const gsl_multifit_fdfsolver_type * gsl_multifit_fdfsolver_lmsder; + + +__END_DECLS + +#endif /* __GSL_MULTIFIT_NLIN_H__ */ diff --git a/software/gsl-1.15/multifit/lmder.c b/software/gsl-1.15/multifit/lmder.c new file mode 100644 index 000000000..166506a7c --- /dev/null +++ b/software/gsl-1.15/multifit/lmder.c @@ -0,0 +1,387 @@ +/* multfit/lmder.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +typedef struct + { + size_t iter; + double xnorm; + double fnorm; + double delta; + double par; + gsl_matrix *r; + gsl_vector *tau; + gsl_vector *diag; + gsl_vector *qtf; + gsl_vector *newton; + gsl_vector *gradient; + gsl_vector *x_trial; + gsl_vector *f_trial; + gsl_vector *df; + gsl_vector *sdiag; + gsl_vector *rptdx; + gsl_vector *w; + gsl_vector *work1; + gsl_permutation * perm; + } +lmder_state_t; + +static int lmder_alloc (void *vstate, size_t n, size_t p); +static int lmder_set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int lmsder_set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); +static int lmder_iterate (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static void lmder_free (void *vstate); +static int iterate (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); + +#include "lmutil.c" +#include "lmpar.c" +#include "lmset.c" +#include "lmiterate.c" + + +static int +lmder_alloc (void *vstate, size_t n, size_t p) +{ + lmder_state_t *state = (lmder_state_t *) vstate; + gsl_matrix *r; + gsl_vector *tau, *diag, *qtf, *newton, *gradient, *x_trial, *f_trial, + *df, *sdiag, *rptdx, *w, *work1; + gsl_permutation *perm; + + r = gsl_matrix_calloc (n, p); + + if (r == 0) + { + GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); + } + + state->r = r; + + tau = gsl_vector_calloc (GSL_MIN(n, p)); + + if (tau == 0) + { + gsl_matrix_free (r); + + GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); + } + + state->tau = tau; + + diag = gsl_vector_calloc (p); + + if (diag == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + + GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); + } + + state->diag = diag; + + qtf = gsl_vector_calloc (n); + + if (qtf == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + + GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); + } + + state->qtf = qtf; + + newton = gsl_vector_calloc (p); + + if (newton == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + + GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); + } + + state->newton = newton; + + gradient = gsl_vector_calloc (p); + + if (gradient == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + + GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); + } + + state->gradient = gradient; + + x_trial = gsl_vector_calloc (p); + + if (x_trial == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + + GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); + } + + state->x_trial = x_trial; + + f_trial = gsl_vector_calloc (n); + + if (f_trial == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + + GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); + } + + state->f_trial = f_trial; + + df = gsl_vector_calloc (n); + + if (df == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + + GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); + } + + state->df = df; + + sdiag = gsl_vector_calloc (p); + + if (sdiag == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + + GSL_ERROR ("failed to allocate space for sdiag", GSL_ENOMEM); + } + + state->sdiag = sdiag; + + + rptdx = gsl_vector_calloc (n); + + if (rptdx == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (sdiag); + + GSL_ERROR ("failed to allocate space for rptdx", GSL_ENOMEM); + } + + state->rptdx = rptdx; + + w = gsl_vector_calloc (n); + + if (w == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (sdiag); + gsl_vector_free (rptdx); + + GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); + } + + state->w = w; + + work1 = gsl_vector_calloc (p); + + if (work1 == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (sdiag); + gsl_vector_free (rptdx); + gsl_vector_free (w); + + GSL_ERROR ("failed to allocate space for work1", GSL_ENOMEM); + } + + state->work1 = work1; + + perm = gsl_permutation_calloc (p); + + if (perm == 0) + { + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (sdiag); + gsl_vector_free (rptdx); + gsl_vector_free (w); + gsl_vector_free (work1); + + GSL_ERROR ("failed to allocate space for perm", GSL_ENOMEM); + } + + state->perm = perm; + + return GSL_SUCCESS; +} + +static int +lmder_set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = set (vstate, fdf, x, f, J, dx, 0); + return status ; +} + +static int +lmsder_set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = set (vstate, fdf, x, f, J, dx, 1); + return status ; +} + +static int +lmder_iterate (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = iterate (vstate, fdf, x, f, J, dx, 0); + return status; +} + +static int +lmsder_iterate (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = iterate (vstate, fdf, x, f, J, dx, 1); + return status; +} + +static void +lmder_free (void *vstate) +{ + lmder_state_t *state = (lmder_state_t *) vstate; + + gsl_permutation_free (state->perm); + gsl_vector_free (state->work1); + gsl_vector_free (state->w); + gsl_vector_free (state->rptdx); + gsl_vector_free (state->sdiag); + gsl_vector_free (state->df); + gsl_vector_free (state->f_trial); + gsl_vector_free (state->x_trial); + gsl_vector_free (state->gradient); + gsl_vector_free (state->newton); + gsl_vector_free (state->qtf); + gsl_vector_free (state->diag); + gsl_vector_free (state->tau); + gsl_matrix_free (state->r); +} + +static const gsl_multifit_fdfsolver_type lmder_type = +{ + "lmder", /* name */ + sizeof (lmder_state_t), + &lmder_alloc, + &lmder_set, + &lmder_iterate, + &lmder_free +}; + +static const gsl_multifit_fdfsolver_type lmsder_type = +{ + "lmsder", /* name */ + sizeof (lmder_state_t), + &lmder_alloc, + &lmsder_set, + &lmsder_iterate, + &lmder_free +}; + +const gsl_multifit_fdfsolver_type *gsl_multifit_fdfsolver_lmder = &lmder_type; +const gsl_multifit_fdfsolver_type *gsl_multifit_fdfsolver_lmsder = &lmsder_type; diff --git a/software/gsl-1.15/multifit/lmiterate.c b/software/gsl-1.15/multifit/lmiterate.c new file mode 100644 index 000000000..aaaae320f --- /dev/null +++ b/software/gsl-1.15/multifit/lmiterate.c @@ -0,0 +1,229 @@ +static int +iterate (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) +{ + lmder_state_t *state = (lmder_state_t *) vstate; + + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + gsl_vector *qtf = state->qtf; + gsl_vector *x_trial = state->x_trial; + gsl_vector *f_trial = state->f_trial; + gsl_vector *rptdx = state->rptdx; + gsl_vector *newton = state->newton; + gsl_vector *gradient = state->gradient; + gsl_vector *sdiag = state->sdiag; + gsl_vector *w = state->w; + gsl_vector *work1 = state->work1; + gsl_permutation *perm = state->perm; + + double prered, actred; + double pnorm, fnorm1, fnorm1p, gnorm; + double ratio; + double dirder; + + int iter = 0; + + double p1 = 0.1, p25 = 0.25, p5 = 0.5, p75 = 0.75, p0001 = 0.0001; + + if (state->fnorm == 0.0) + { + return GSL_SUCCESS; + } + + /* Compute qtf = Q^T f */ + + gsl_vector_memcpy (qtf, f); + gsl_linalg_QR_QTvec (r, tau, qtf); + + /* Compute norm of scaled gradient */ + + compute_gradient_direction (r, perm, qtf, diag, gradient); + + { + size_t iamax = gsl_blas_idamax (gradient); + + gnorm = fabs(gsl_vector_get (gradient, iamax) / state->fnorm); + } + + /* Determine the Levenberg-Marquardt parameter */ + +lm_iteration: + + iter++ ; + + { + int status = lmpar (r, perm, qtf, diag, state->delta, &(state->par), newton, gradient, sdiag, dx, w); + if (status) + return status; + } + + /* Take a trial step */ + + gsl_vector_scale (dx, -1.0); /* reverse the step to go downhill */ + + compute_trial_step (x, dx, state->x_trial); + + pnorm = scaled_enorm (diag, dx); + + if (state->iter == 1) + { + if (pnorm < state->delta) + { +#ifdef DEBUG + printf("set delta = pnorm = %g\n" , pnorm); +#endif + state->delta = pnorm; + } + } + + /* Evaluate function at x + p */ + /* return immediately if evaluation raised error */ + { + int status = GSL_MULTIFIT_FN_EVAL_F (fdf, x_trial, f_trial); + if (status) + return status; + } + + fnorm1 = enorm (f_trial); + + /* Compute the scaled actual reduction */ + + actred = compute_actual_reduction (state->fnorm, fnorm1); + +#ifdef DEBUG + printf("lmiterate: fnorm = %g fnorm1 = %g actred = %g\n", state->fnorm, fnorm1, actred); + printf("r = "); gsl_matrix_fprintf(stdout, r, "%g"); + printf("perm = "); gsl_permutation_fprintf(stdout, perm, "%d"); + printf("dx = "); gsl_vector_fprintf(stdout, dx, "%g"); +#endif + + /* Compute rptdx = R P^T dx, noting that |J dx| = |R P^T dx| */ + + compute_rptdx (r, perm, dx, rptdx); + +#ifdef DEBUG + printf("rptdx = "); gsl_vector_fprintf(stdout, rptdx, "%g"); +#endif + + fnorm1p = enorm (rptdx); + + /* Compute the scaled predicted reduction = |J dx|^2 + 2 par |D dx|^2 */ + + { + double t1 = fnorm1p / state->fnorm; + double t2 = (sqrt(state->par) * pnorm) / state->fnorm; + + prered = t1 * t1 + t2 * t2 / p5; + dirder = -(t1 * t1 + t2 * t2); + } + + /* compute the ratio of the actual to predicted reduction */ + + if (prered > 0) + { + ratio = actred / prered; + } + else + { + ratio = 0; + } + +#ifdef DEBUG + printf("lmiterate: prered = %g dirder = %g ratio = %g\n", prered, dirder,ratio); +#endif + + + /* update the step bound */ + + if (ratio > p25) + { +#ifdef DEBUG + printf("ratio > p25\n"); +#endif + if (state->par == 0 || ratio >= p75) + { + state->delta = pnorm / p5; + state->par *= p5; +#ifdef DEBUG + printf("updated step bounds: delta = %g, par = %g\n", state->delta, state->par); +#endif + } + } + else + { + double temp = (actred >= 0) ? p5 : p5*dirder / (dirder + p5 * actred); + +#ifdef DEBUG + printf("ratio < p25\n"); +#endif + + if (p1 * fnorm1 >= state->fnorm || temp < p1 ) + { + temp = p1; + } + + state->delta = temp * GSL_MIN_DBL (state->delta, pnorm/p1); + + state->par /= temp; +#ifdef DEBUG + printf("updated step bounds: delta = %g, par = %g\n", state->delta, state->par); +#endif + } + + + /* test for successful iteration, termination and stringent tolerances */ + + if (ratio >= p0001) + { + gsl_vector_memcpy (x, x_trial); + gsl_vector_memcpy (f, f_trial); + + /* return immediately if evaluation raised error */ + { + int status = GSL_MULTIFIT_FN_EVAL_DF (fdf, x_trial, J); + if (status) + return status; + } + + /* wa2_j = diag_j * x_j */ + state->xnorm = scaled_enorm(diag, x); + state->fnorm = fnorm1; + state->iter++; + + /* Rescale if necessary */ + + if (scale) + { + update_diag (J, diag); + } + + { + int signum; + gsl_matrix_memcpy (r, J); + gsl_linalg_QRPT_decomp (r, tau, perm, &signum, work1); + } + + return GSL_SUCCESS; + } + else if (fabs(actred) <= GSL_DBL_EPSILON && prered <= GSL_DBL_EPSILON + && p5 * ratio <= 1.0) + { + return GSL_ETOLF ; + } + else if (state->delta <= GSL_DBL_EPSILON * state->xnorm) + { + return GSL_ETOLX; + } + else if (gnorm <= GSL_DBL_EPSILON) + { + return GSL_ETOLG; + } + else if (iter < 10) + { + /* Repeat inner loop if unsuccessful */ + goto lm_iteration; + } + + return GSL_ENOPROG; +} diff --git a/software/gsl-1.15/multifit/lmpar.c b/software/gsl-1.15/multifit/lmpar.c new file mode 100644 index 000000000..4c2bb5f63 --- /dev/null +++ b/software/gsl-1.15/multifit/lmpar.c @@ -0,0 +1,499 @@ +/* multifit/lmpar.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include "qrsolv.c" + +static size_t +count_nsing (const gsl_matrix * r) +{ + /* Count the number of nonsingular entries. Returns the index of the + first entry which is singular. */ + + size_t n = r->size2; + size_t i; + + for (i = 0; i < n; i++) + { + double rii = gsl_matrix_get (r, i, i); + + if (rii == 0) + { + break; + } + } + + return i; +} + + +static void +compute_newton_direction (const gsl_matrix * r, const gsl_permutation * perm, + const gsl_vector * qtf, gsl_vector * x) +{ + + /* Compute and store in x the Gauss-Newton direction. If the + Jacobian is rank-deficient then obtain a least squares + solution. */ + + const size_t n = r->size2; + size_t i, j, nsing; + + for (i = 0 ; i < n ; i++) + { + double qtfi = gsl_vector_get (qtf, i); + gsl_vector_set (x, i, qtfi); + } + + nsing = count_nsing (r); + +#ifdef DEBUG + printf("nsing = %d\n", nsing); + printf("r = "); gsl_matrix_fprintf(stdout, r, "%g"); printf("\n"); + printf("qtf = "); gsl_vector_fprintf(stdout, x, "%g"); printf("\n"); +#endif + + for (i = nsing; i < n; i++) + { + gsl_vector_set (x, i, 0.0); + } + + if (nsing > 0) + { + for (j = nsing; j > 0 && j--;) + { + double rjj = gsl_matrix_get (r, j, j); + double temp = gsl_vector_get (x, j) / rjj; + + gsl_vector_set (x, j, temp); + + for (i = 0; i < j; i++) + { + double rij = gsl_matrix_get (r, i, j); + double xi = gsl_vector_get (x, i); + gsl_vector_set (x, i, xi - rij * temp); + } + } + } + + gsl_permute_vector_inverse (perm, x); +} + +static void +compute_newton_correction (const gsl_matrix * r, const gsl_vector * sdiag, + const gsl_permutation * p, gsl_vector * x, + double dxnorm, + const gsl_vector * diag, gsl_vector * w) +{ + size_t n = r->size2; + size_t i, j; + + for (i = 0; i < n; i++) + { + size_t pi = gsl_permutation_get (p, i); + + double dpi = gsl_vector_get (diag, pi); + double xpi = gsl_vector_get (x, pi); + + gsl_vector_set (w, i, dpi * (dpi * xpi) / dxnorm); + } + + for (j = 0; j < n; j++) + { + double sj = gsl_vector_get (sdiag, j); + double wj = gsl_vector_get (w, j); + + double tj = wj / sj; + + gsl_vector_set (w, j, tj); + + for (i = j + 1; i < n; i++) + { + double rij = gsl_matrix_get (r, i, j); + double wi = gsl_vector_get (w, i); + + gsl_vector_set (w, i, wi - rij * tj); + } + } +} + +static void +compute_newton_bound (const gsl_matrix * r, const gsl_vector * x, + double dxnorm, const gsl_permutation * perm, + const gsl_vector * diag, gsl_vector * w) +{ + /* If the jacobian is not rank-deficient then the Newton step + provides a lower bound for the zero of the function. Otherwise + set this bound to zero. */ + + size_t n = r->size2; + + size_t i, j; + + size_t nsing = count_nsing (r); + + if (nsing < n) + { + gsl_vector_set_zero (w); + return; + } + + for (i = 0; i < n; i++) + { + size_t pi = gsl_permutation_get (perm, i); + + double dpi = gsl_vector_get (diag, pi); + double xpi = gsl_vector_get (x, pi); + + gsl_vector_set (w, i, dpi * (dpi * xpi / dxnorm)); + } + + for (j = 0; j < n; j++) + { + double sum = 0; + + for (i = 0; i < j; i++) + { + sum += gsl_matrix_get (r, i, j) * gsl_vector_get (w, i); + } + + { + double rjj = gsl_matrix_get (r, j, j); + double wj = gsl_vector_get (w, j); + + gsl_vector_set (w, j, (wj - sum) / rjj); + } + } +} + +static void +compute_gradient_direction (const gsl_matrix * r, const gsl_permutation * p, + const gsl_vector * qtf, const gsl_vector * diag, + gsl_vector * g) +{ + const size_t n = r->size2; + + size_t i, j; + + for (j = 0; j < n; j++) + { + double sum = 0; + + for (i = 0; i <= j; i++) + { + sum += gsl_matrix_get (r, i, j) * gsl_vector_get (qtf, i); + } + + { + size_t pj = gsl_permutation_get (p, j); + double dpj = gsl_vector_get (diag, pj); + + gsl_vector_set (g, j, sum / dpj); + } + } +} + +static int +lmpar (gsl_matrix * r, const gsl_permutation * perm, const gsl_vector * qtf, + const gsl_vector * diag, double delta, double * par_inout, + gsl_vector * newton, gsl_vector * gradient, gsl_vector * sdiag, + gsl_vector * x, gsl_vector * w) +{ + double dxnorm, gnorm, fp, fp_old, par_lower, par_upper, par_c; + + double par = *par_inout; + + size_t iter = 0; + +#ifdef DEBUG + printf("ENTERING lmpar\n"); +#endif + + + compute_newton_direction (r, perm, qtf, newton); + +#ifdef DEBUG + printf ("newton = "); + gsl_vector_fprintf (stdout, newton, "%g"); + printf ("\n"); + + printf ("diag = "); + gsl_vector_fprintf (stdout, diag, "%g"); + printf ("\n"); +#endif + + /* Evaluate the function at the origin and test for acceptance of + the Gauss-Newton direction. */ + + dxnorm = scaled_enorm (diag, newton); + + fp = dxnorm - delta; + +#ifdef DEBUG + printf ("dxnorm = %g, delta = %g, fp = %g\n", dxnorm, delta, fp); +#endif + + if (fp <= 0.1 * delta) + { + gsl_vector_memcpy (x, newton); +#ifdef DEBUG + printf ("took newton (fp = %g, delta = %g)\n", fp, delta); +#endif + + *par_inout = 0; + + return GSL_SUCCESS; + } + +#ifdef DEBUG + printf ("r = "); + gsl_matrix_fprintf (stdout, r, "%g"); + printf ("\n"); + + printf ("newton = "); + gsl_vector_fprintf (stdout, newton, "%g"); + printf ("\n"); + + printf ("dxnorm = %g\n", dxnorm); +#endif + + + compute_newton_bound (r, newton, dxnorm, perm, diag, w); + +#ifdef DEBUG + printf("perm = "); gsl_permutation_fprintf(stdout, perm, "%d"); + + printf ("diag = "); + gsl_vector_fprintf (stdout, diag, "%g"); + printf ("\n"); + + printf ("w = "); + gsl_vector_fprintf (stdout, w, "%g"); + printf ("\n"); +#endif + + + { + double wnorm = enorm (w); + double phider = wnorm * wnorm; + + /* w == zero if r rank-deficient, + then set lower bound to zero form MINPACK, lmder.f + Hans E. Plesser 2002-02-25 (hans.plesser@itf.nlh.no) */ + if ( wnorm > 0 ) + par_lower = fp / (delta * phider); + else + par_lower = 0.0; + } + +#ifdef DEBUG + printf("par = %g\n", par ); + printf("par_lower = %g\n", par_lower); +#endif + + compute_gradient_direction (r, perm, qtf, diag, gradient); + + gnorm = enorm (gradient); + +#ifdef DEBUG + printf("gradient = "); gsl_vector_fprintf(stdout, gradient, "%g"); printf("\n"); + printf("gnorm = %g\n", gnorm); +#endif + + par_upper = gnorm / delta; + + if (par_upper == 0) + { + par_upper = GSL_DBL_MIN / GSL_MIN_DBL(delta, 0.1); + } + +#ifdef DEBUG + printf("par_upper = %g\n", par_upper); +#endif + + if (par > par_upper) + { +#ifdef DEBUG + printf("set par to par_upper\n"); +#endif + + par = par_upper; + } + else if (par < par_lower) + { +#ifdef DEBUG + printf("set par to par_lower\n"); +#endif + + par = par_lower; + } + + if (par == 0) + { + par = gnorm / dxnorm; +#ifdef DEBUG + printf("set par to gnorm/dxnorm = %g\n", par); +#endif + + } + + /* Beginning of iteration */ + +iteration: + + iter++; + +#ifdef DEBUG + printf("lmpar iteration = %d\n", iter); +#endif + +#ifdef BRIANSFIX + /* Seems like this is described in the paper but not in the MINPACK code */ + + if (par < par_lower || par > par_upper) + { + par = GSL_MAX_DBL (0.001 * par_upper, sqrt(par_lower * par_upper)); + } +#endif + + /* Evaluate the function at the current value of par */ + + if (par == 0) + { + par = GSL_MAX_DBL (0.001 * par_upper, GSL_DBL_MIN); +#ifdef DEBUG + printf("par = 0, set par to = %g\n", par); +#endif + + } + + /* Compute the least squares solution of [ R P x - Q^T f, sqrt(par) D x] + for A = Q R P^T */ + +#ifdef DEBUG + printf ("calling qrsolv with par = %g\n", par); +#endif + + { + double sqrt_par = sqrt(par); + + qrsolv (r, perm, sqrt_par, diag, qtf, x, sdiag, w); + } + + dxnorm = scaled_enorm (diag, x); + + fp_old = fp; + + fp = dxnorm - delta; + +#ifdef DEBUG + printf ("After qrsolv dxnorm = %g, delta = %g, fp = %g\n", dxnorm, delta, fp); + printf ("sdiag = ") ; gsl_vector_fprintf(stdout, sdiag, "%g"); printf("\n"); + printf ("x = ") ; gsl_vector_fprintf(stdout, x, "%g"); printf("\n"); + printf ("r = ") ; gsl_matrix_fprintf(stdout, r, "%g"); printf("\nXXX\n"); +#endif + + /* If the function is small enough, accept the current value of par */ + + if (fabs (fp) <= 0.1 * delta) + goto line220; + + if (par_lower == 0 && fp <= fp_old && fp_old < 0) + goto line220; + + /* Check for maximum number of iterations */ + + if (iter == 10) + goto line220; + + /* Compute the Newton correction */ + + compute_newton_correction (r, sdiag, perm, x, dxnorm, diag, w); + +#ifdef DEBUG + printf ("newton_correction = "); + gsl_vector_fprintf(stdout, w, "%g"); printf("\n"); +#endif + + { + double wnorm = enorm (w); + par_c = fp / (delta * wnorm * wnorm); + } + +#ifdef DEBUG + printf("fp = %g\n", fp); + printf("par_lower = %g\n", par_lower); + printf("par_upper = %g\n", par_upper); + printf("par_c = %g\n", par_c); +#endif + + + /* Depending on the sign of the function, update par_lower or par_upper */ + + if (fp > 0) + { + if (par > par_lower) + { + par_lower = par; +#ifdef DEBUG + printf("fp > 0: set par_lower = par = %g\n", par); +#endif + + } + } + else if (fp < 0) + { + if (par < par_upper) + { +#ifdef DEBUG + printf("fp < 0: set par_upper = par = %g\n", par); +#endif + par_upper = par; + } + } + + /* Compute an improved estimate for par */ + +#ifdef DEBUG + printf("improved estimate par = MAX(%g, %g) \n", par_lower, par+par_c); +#endif + + par = GSL_MAX_DBL (par_lower, par + par_c); + +#ifdef DEBUG + printf("improved estimate par = %g \n", par); +#endif + + + goto iteration; + +line220: + +#ifdef DEBUG + printf("LEAVING lmpar, par = %g\n", par); +#endif + + *par_inout = par; + + return GSL_SUCCESS; +} + + + diff --git a/software/gsl-1.15/multifit/lmset.c b/software/gsl-1.15/multifit/lmset.c new file mode 100644 index 000000000..3213c77d1 --- /dev/null +++ b/software/gsl-1.15/multifit/lmset.c @@ -0,0 +1,63 @@ +static int +set (void *vstate, gsl_multifit_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) +{ + lmder_state_t *state = (lmder_state_t *) vstate; + + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + gsl_vector *work1 = state->work1; + gsl_permutation *perm = state->perm; + + int signum; + + /* Evaluate function at x */ + /* return immediately if evaluation raised error */ + { + int status = GSL_MULTIFIT_FN_EVAL_F_DF (fdf, x, f, J); + if (status) + return status; + } + + state->par = 0; + state->iter = 1; + state->fnorm = enorm (f); + + gsl_vector_set_all (dx, 0.0); + + /* store column norms in diag */ + + if (scale) + { + compute_diag (J, diag); + } + else + { + gsl_vector_set_all (diag, 1.0); + } + + /* set delta to 100 |D x| or to 100 if |D x| is zero */ + + state->xnorm = scaled_enorm (diag, x); + state->delta = compute_delta (diag, x); + + /* Factorize J into QR decomposition */ + + gsl_matrix_memcpy (r, J); + gsl_linalg_QRPT_decomp (r, tau, perm, &signum, work1); + + gsl_vector_set_zero (state->rptdx); + gsl_vector_set_zero (state->w); + + /* Zero the trial vector, as in the alloc function */ + + gsl_vector_set_zero (state->f_trial); + +#ifdef DEBUG + printf("r = "); gsl_matrix_fprintf(stdout, r, "%g"); + printf("perm = "); gsl_permutation_fprintf(stdout, perm, "%d"); + printf("tau = "); gsl_vector_fprintf(stdout, tau, "%g"); +#endif + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multifit/lmutil.c b/software/gsl-1.15/multifit/lmutil.c new file mode 100644 index 000000000..1f06178ce --- /dev/null +++ b/software/gsl-1.15/multifit/lmutil.c @@ -0,0 +1,134 @@ +static void compute_diag (const gsl_matrix * J, gsl_vector * diag); +static void update_diag (const gsl_matrix * J, gsl_vector * diag); +static double compute_delta (gsl_vector * diag, gsl_vector * x); +static double scaled_enorm (const gsl_vector * d, const gsl_vector * f); +static double enorm (const gsl_vector * f); + +static double +enorm (const gsl_vector * f) +{ + return gsl_blas_dnrm2 (f); +} + +static double +scaled_enorm (const gsl_vector * d, const gsl_vector * f) +{ + double e2 = 0; + size_t i, n = f->size; + for (i = 0; i < n; i++) + { + double fi = gsl_vector_get (f, i); + double di = gsl_vector_get (d, i); + double u = di * fi; + e2 += u * u; + } + return sqrt (e2); +} + +static double +compute_delta (gsl_vector * diag, gsl_vector * x) +{ + double Dx = scaled_enorm (diag, x); + double factor = 100; /* generally recommended value from MINPACK */ + + return (Dx > 0) ? factor * Dx : factor; +} + +static double +compute_actual_reduction (double fnorm, double fnorm1) +{ + double actred; + + if (0.1 * fnorm1 < fnorm) + { + double u = fnorm1 / fnorm; + actred = 1 - u * u; + } + else + { + actred = -1; + } + + return actred; +} + +static void +compute_diag (const gsl_matrix * J, gsl_vector * diag) +{ + size_t i, j, n = J->size1, p = J->size2; + + for (j = 0; j < p; j++) + { + double sum = 0; + + for (i = 0; i < n; i++) + { + double Jij = gsl_matrix_get (J, i, j); + sum += Jij * Jij; + } + if (sum == 0) + sum = 1.0; + + gsl_vector_set (diag, j, sqrt (sum)); + } +} + +static void +update_diag (const gsl_matrix * J, gsl_vector * diag) +{ + size_t i, j, n = diag->size; + + for (j = 0; j < n; j++) + { + double cnorm, diagj, sum = 0; + for (i = 0; i < n; i++) + { + double Jij = gsl_matrix_get (J, i, j); + sum += Jij * Jij; + } + if (sum == 0) + sum = 1.0; + + cnorm = sqrt (sum); + diagj = gsl_vector_get (diag, j); + + if (cnorm > diagj) + gsl_vector_set (diag, j, cnorm); + } +} + +static void +compute_rptdx (const gsl_matrix * r, const gsl_permutation * p, + const gsl_vector * dx, gsl_vector * rptdx) +{ + size_t i, j, N = dx->size; + + for (i = 0; i < N; i++) + { + double sum = 0; + + for (j = i; j < N; j++) + { + size_t pj = gsl_permutation_get (p, j); + + sum += gsl_matrix_get (r, i, j) * gsl_vector_get (dx, pj); + } + + gsl_vector_set (rptdx, i, sum); + } +} + + +static void +compute_trial_step (gsl_vector * x, gsl_vector * dx, gsl_vector * x_trial) +{ + size_t i, N = x->size; + + for (i = 0; i < N; i++) + { + double pi = gsl_vector_get (dx, i); + double xi = gsl_vector_get (x, i); + gsl_vector_set (x_trial, i, xi + pi); + } +} + diff --git a/software/gsl-1.15/multifit/multilinear.c b/software/gsl-1.15/multifit/multilinear.c new file mode 100644 index 000000000..186fdcaec --- /dev/null +++ b/software/gsl-1.15/multifit/multilinear.c @@ -0,0 +1,560 @@ +/* multifit/multilinear.c + * + * Copyright (C) 2000, 2007, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* Fit + * + * y = X c + * + * where X is an M x N matrix of M observations for N variables. + * + */ + +static int +multifit_linear_svd (const gsl_matrix * X, + const gsl_vector * y, + double tol, + int balance, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, + gsl_multifit_linear_workspace * work) +{ + if (X->size1 != y->size) + { + GSL_ERROR + ("number of observations in y does not match rows of matrix X", + GSL_EBADLEN); + } + else if (X->size2 != c->size) + { + GSL_ERROR ("number of parameters c does not match columns of matrix X", + GSL_EBADLEN); + } + else if (cov->size1 != cov->size2) + { + GSL_ERROR ("covariance matrix is not square", GSL_ENOTSQR); + } + else if (c->size != cov->size1) + { + GSL_ERROR + ("number of parameters does not match size of covariance matrix", + GSL_EBADLEN); + } + else if (X->size1 != work->n || X->size2 != work->p) + { + GSL_ERROR + ("size of workspace does not match size of observation matrix", + GSL_EBADLEN); + } + else if (tol <= 0) + { + GSL_ERROR ("tolerance must be positive", GSL_EINVAL); + } + else + { + const size_t n = X->size1; + const size_t p = X->size2; + + size_t i, j, p_eff; + + gsl_matrix *A = work->A; + gsl_matrix *Q = work->Q; + gsl_matrix *QSI = work->QSI; + gsl_vector *S = work->S; + gsl_vector *xt = work->xt; + gsl_vector *D = work->D; + + /* Copy X to workspace, A <= X */ + + gsl_matrix_memcpy (A, X); + + /* Balance the columns of the matrix A if requested */ + + if (balance) + { + gsl_linalg_balance_columns (A, D); + } + else + { + gsl_vector_set_all (D, 1.0); + } + + /* Decompose A into U S Q^T */ + + gsl_linalg_SV_decomp_mod (A, QSI, Q, S, xt); + + /* Solve y = A c for c */ + + gsl_blas_dgemv (CblasTrans, 1.0, A, y, 0.0, xt); + + /* Scale the matrix Q, Q' = Q S^-1 */ + + gsl_matrix_memcpy (QSI, Q); + + { + double alpha0 = gsl_vector_get (S, 0); + p_eff = 0; + + for (j = 0; j < p; j++) + { + gsl_vector_view column = gsl_matrix_column (QSI, j); + double alpha = gsl_vector_get (S, j); + + if (alpha <= tol * alpha0) { + alpha = 0.0; + } else { + alpha = 1.0 / alpha; + p_eff++; + } + + gsl_vector_scale (&column.vector, alpha); + } + + *rank = p_eff; + } + + gsl_vector_set_zero (c); + + gsl_blas_dgemv (CblasNoTrans, 1.0, QSI, xt, 0.0, c); + + /* Unscale the balancing factors */ + + gsl_vector_div (c, D); + + /* Compute chisq, from residual r = y - X c */ + + { + double s2 = 0, r2 = 0; + + for (i = 0; i < n; i++) + { + double yi = gsl_vector_get (y, i); + gsl_vector_const_view row = gsl_matrix_const_row (X, i); + double y_est, ri; + gsl_blas_ddot (&row.vector, c, &y_est); + ri = yi - y_est; + r2 += ri * ri; + } + + s2 = r2 / (n - p_eff); /* p_eff == rank */ + + *chisq = r2; + + /* Form variance-covariance matrix cov = s2 * (Q S^-1) (Q S^-1)^T */ + + for (i = 0; i < p; i++) + { + gsl_vector_view row_i = gsl_matrix_row (QSI, i); + double d_i = gsl_vector_get (D, i); + + for (j = i; j < p; j++) + { + gsl_vector_view row_j = gsl_matrix_row (QSI, j); + double d_j = gsl_vector_get (D, j); + double s; + + gsl_blas_ddot (&row_i.vector, &row_j.vector, &s); + + gsl_matrix_set (cov, i, j, s * s2 / (d_i * d_j)); + gsl_matrix_set (cov, j, i, s * s2 / (d_i * d_j)); + } + } + } + + return GSL_SUCCESS; + } +} + +int +gsl_multifit_linear (const gsl_matrix * X, + const gsl_vector * y, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + size_t rank; + int status = multifit_linear_svd (X, y, GSL_DBL_EPSILON, 1, &rank, c, + cov, chisq, work); + return status; +} + +/* Handle the general case of the SVD with tolerance and rank */ + +int +gsl_multifit_linear_svd (const gsl_matrix * X, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + int status = multifit_linear_svd (X, y, tol, 1, rank, c, cov, chisq, work); + return status; +} + +int +gsl_multifit_linear_usvd (const gsl_matrix * X, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + int status = multifit_linear_svd (X, y, tol, 0, rank, c, cov, chisq, work); + return status; +} + +/* General weighted case */ + +static int +multifit_wlinear_svd (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + double tol, + int balance, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + if (X->size1 != y->size) + { + GSL_ERROR + ("number of observations in y does not match rows of matrix X", + GSL_EBADLEN); + } + else if (X->size2 != c->size) + { + GSL_ERROR ("number of parameters c does not match columns of matrix X", + GSL_EBADLEN); + } + else if (w->size != y->size) + { + GSL_ERROR ("number of weights does not match number of observations", + GSL_EBADLEN); + } + else if (cov->size1 != cov->size2) + { + GSL_ERROR ("covariance matrix is not square", GSL_ENOTSQR); + } + else if (c->size != cov->size1) + { + GSL_ERROR + ("number of parameters does not match size of covariance matrix", + GSL_EBADLEN); + } + else if (X->size1 != work->n || X->size2 != work->p) + { + GSL_ERROR + ("size of workspace does not match size of observation matrix", + GSL_EBADLEN); + } + else + { + const size_t n = X->size1; + const size_t p = X->size2; + + size_t i, j, p_eff; + + gsl_matrix *A = work->A; + gsl_matrix *Q = work->Q; + gsl_matrix *QSI = work->QSI; + gsl_vector *S = work->S; + gsl_vector *t = work->t; + gsl_vector *xt = work->xt; + gsl_vector *D = work->D; + + /* Scale X, A = sqrt(w) X */ + + gsl_matrix_memcpy (A, X); + + for (i = 0; i < n; i++) + { + double wi = gsl_vector_get (w, i); + + if (wi < 0) + wi = 0; + + { + gsl_vector_view row = gsl_matrix_row (A, i); + gsl_vector_scale (&row.vector, sqrt (wi)); + } + } + + /* Balance the columns of the matrix A if requested */ + + if (balance) + { + gsl_linalg_balance_columns (A, D); + } + else + { + gsl_vector_set_all (D, 1.0); + } + + /* Decompose A into U S Q^T */ + + gsl_linalg_SV_decomp_mod (A, QSI, Q, S, xt); + + /* Solve sqrt(w) y = A c for c, by first computing t = sqrt(w) y */ + + for (i = 0; i < n; i++) + { + double wi = gsl_vector_get (w, i); + double yi = gsl_vector_get (y, i); + if (wi < 0) + wi = 0; + gsl_vector_set (t, i, sqrt (wi) * yi); + } + + gsl_blas_dgemv (CblasTrans, 1.0, A, t, 0.0, xt); + + /* Scale the matrix Q, Q' = Q S^-1 */ + + gsl_matrix_memcpy (QSI, Q); + + { + double alpha0 = gsl_vector_get (S, 0); + p_eff = 0; + + for (j = 0; j < p; j++) + { + gsl_vector_view column = gsl_matrix_column (QSI, j); + double alpha = gsl_vector_get (S, j); + + if (alpha <= tol * alpha0) { + alpha = 0.0; + } else { + alpha = 1.0 / alpha; + p_eff++; + } + + gsl_vector_scale (&column.vector, alpha); + } + + *rank = p_eff; + } + + gsl_vector_set_zero (c); + + /* Solution */ + + gsl_blas_dgemv (CblasNoTrans, 1.0, QSI, xt, 0.0, c); + + /* Unscale the balancing factors */ + + gsl_vector_div (c, D); + + /* Form covariance matrix cov = (Q S^-1) (Q S^-1)^T */ + + for (i = 0; i < p; i++) + { + gsl_vector_view row_i = gsl_matrix_row (QSI, i); + double d_i = gsl_vector_get (D, i); + + for (j = i; j < p; j++) + { + gsl_vector_view row_j = gsl_matrix_row (QSI, j); + double d_j = gsl_vector_get (D, j); + double s; + + gsl_blas_ddot (&row_i.vector, &row_j.vector, &s); + + gsl_matrix_set (cov, i, j, s / (d_i * d_j)); + gsl_matrix_set (cov, j, i, s / (d_i * d_j)); + } + } + + /* Compute chisq, from residual r = y - X c */ + + { + double r2 = 0; + + for (i = 0; i < n; i++) + { + double yi = gsl_vector_get (y, i); + double wi = gsl_vector_get (w, i); + gsl_vector_const_view row = gsl_matrix_const_row (X, i); + double y_est, ri; + gsl_blas_ddot (&row.vector, c, &y_est); + ri = yi - y_est; + r2 += wi * ri * ri; + } + + *chisq = r2; + } + + return GSL_SUCCESS; + } +} + + +int +gsl_multifit_wlinear (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + size_t rank; + int status = multifit_wlinear_svd (X, w, y, GSL_DBL_EPSILON, 1, &rank, c, + cov, chisq, work); + return status; +} + +int +gsl_multifit_wlinear_svd (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + int status = multifit_wlinear_svd (X, w, y, tol, 1, rank, c, + cov, chisq, work); + return status; + +} + +int +gsl_multifit_wlinear_usvd (const gsl_matrix * X, + const gsl_vector * w, + const gsl_vector * y, + double tol, + size_t * rank, + gsl_vector * c, + gsl_matrix * cov, + double *chisq, gsl_multifit_linear_workspace * work) +{ + int status = multifit_wlinear_svd (X, w, y, tol, 0, rank, c, + cov, chisq, work); + return status; + +} + +/* Estimation of values for given x */ + +int +gsl_multifit_linear_est (const gsl_vector * x, + const gsl_vector * c, + const gsl_matrix * cov, double *y, double *y_err) +{ + + if (x->size != c->size) + { + GSL_ERROR ("number of parameters c does not match number of observations x", + GSL_EBADLEN); + } + else if (cov->size1 != cov->size2) + { + GSL_ERROR ("covariance matrix is not square", GSL_ENOTSQR); + } + else if (c->size != cov->size1) + { + GSL_ERROR ("number of parameters c does not match size of covariance matrix cov", + GSL_EBADLEN); + } + else + { + size_t i, j; + double var = 0; + + gsl_blas_ddot(x, c, y); /* y = x.c */ + + /* var = x' cov x */ + + for (i = 0; i < x->size; i++) + { + const double xi = gsl_vector_get (x, i); + var += xi * xi * gsl_matrix_get (cov, i, i); + + for (j = 0; j < i; j++) + { + const double xj = gsl_vector_get (x, j); + var += 2 * xi * xj * gsl_matrix_get (cov, i, j); + } + } + + *y_err = sqrt (var); + + return GSL_SUCCESS; + } +} + +/* +gsl_multifit_linear_residuals() + Compute vector of residuals from fit + +Inputs: X - design matrix + y - rhs vector + c - fit coefficients + r - (output) where to store residuals +*/ + +int +gsl_multifit_linear_residuals (const gsl_matrix *X, const gsl_vector *y, + const gsl_vector *c, gsl_vector *r) +{ + if (X->size1 != y->size) + { + GSL_ERROR + ("number of observations in y does not match rows of matrix X", + GSL_EBADLEN); + } + else if (X->size2 != c->size) + { + GSL_ERROR ("number of parameters c does not match columns of matrix X", + GSL_EBADLEN); + } + else if (y->size != r->size) + { + GSL_ERROR ("number of observations in y does not match number of residuals", + GSL_EBADLEN); + } + else + { + size_t i; + + for (i = 0; i < y->size; ++i) + { + double yi = gsl_vector_get(y, i); + gsl_vector_const_view row = gsl_matrix_const_row(X, i); + double y_est, ri; + + gsl_blas_ddot(&row.vector, c, &y_est); + ri = yi - y_est; + + gsl_vector_set(r, i, ri); + } + + return GSL_SUCCESS; + } +} /* gsl_multifit_linear_residuals() */ diff --git a/software/gsl-1.15/multifit/qrsolv.c b/software/gsl-1.15/multifit/qrsolv.c new file mode 100644 index 000000000..06f039952 --- /dev/null +++ b/software/gsl-1.15/multifit/qrsolv.c @@ -0,0 +1,218 @@ +/* This function computes the solution to the least squares system + + phi = [ A x = b , lambda D x = 0 ]^2 + + where A is an M by N matrix, D is an N by N diagonal matrix, lambda + is a scalar parameter and b is a vector of length M. + + The function requires the factorization of A into A = Q R P^T, + where Q is an orthogonal matrix, R is an upper triangular matrix + with diagonal elements of non-increasing magnitude and P is a + permuation matrix. The system above is then equivalent to + + [ R z = Q^T b, P^T (lambda D) P z = 0 ] + + where x = P z. If this system does not have full rank then a least + squares solution is obtained. On output the function also provides + an upper triangular matrix S such that + + P^T (A^T A + lambda^2 D^T D) P = S^T S + + Parameters, + + r: On input, contains the full upper triangle of R. On output the + strict lower triangle contains the transpose of the strict upper + triangle of S, and the diagonal of S is stored in sdiag. The full + upper triangle of R is not modified. + + p: the encoded form of the permutation matrix P. column j of P is + column p[j] of the identity matrix. + + lambda, diag: contains the scalar lambda and the diagonal elements + of the matrix D + + qtb: contains the product Q^T b + + x: on output contains the least squares solution of the system + + wa: is a workspace of length N + + */ + +static int +qrsolv (gsl_matrix * r, const gsl_permutation * p, const double lambda, + const gsl_vector * diag, const gsl_vector * qtb, + gsl_vector * x, gsl_vector * sdiag, gsl_vector * wa) +{ + size_t n = r->size2; + + size_t i, j, k, nsing; + + /* Copy r and qtb to preserve input and initialise s. In particular, + save the diagonal elements of r in x */ + + for (j = 0; j < n; j++) + { + double rjj = gsl_matrix_get (r, j, j); + double qtbj = gsl_vector_get (qtb, j); + + for (i = j + 1; i < n; i++) + { + double rji = gsl_matrix_get (r, j, i); + gsl_matrix_set (r, i, j, rji); + } + + gsl_vector_set (x, j, rjj); + gsl_vector_set (wa, j, qtbj); + } + + /* Eliminate the diagonal matrix d using a Givens rotation */ + + for (j = 0; j < n; j++) + { + double qtbpj; + + size_t pj = gsl_permutation_get (p, j); + + double diagpj = lambda * gsl_vector_get (diag, pj); + + if (diagpj == 0) + { + continue; + } + + gsl_vector_set (sdiag, j, diagpj); + + for (k = j + 1; k < n; k++) + { + gsl_vector_set (sdiag, k, 0.0); + } + + /* The transformations to eliminate the row of d modify only a + single element of qtb beyond the first n, which is initially + zero */ + + qtbpj = 0; + + for (k = j; k < n; k++) + { + /* Determine a Givens rotation which eliminates the + appropriate element in the current row of d */ + + double sine, cosine; + + double wak = gsl_vector_get (wa, k); + double rkk = gsl_matrix_get (r, k, k); + double sdiagk = gsl_vector_get (sdiag, k); + + if (sdiagk == 0) + { + continue; + } + + if (fabs (rkk) < fabs (sdiagk)) + { + double cotangent = rkk / sdiagk; + sine = 0.5 / sqrt (0.25 + 0.25 * cotangent * cotangent); + cosine = sine * cotangent; + } + else + { + double tangent = sdiagk / rkk; + cosine = 0.5 / sqrt (0.25 + 0.25 * tangent * tangent); + sine = cosine * tangent; + } + + /* Compute the modified diagonal element of r and the + modified element of [qtb,0] */ + + { + double new_rkk = cosine * rkk + sine * sdiagk; + double new_wak = cosine * wak + sine * qtbpj; + + qtbpj = -sine * wak + cosine * qtbpj; + + gsl_matrix_set(r, k, k, new_rkk); + gsl_vector_set(wa, k, new_wak); + } + + /* Accumulate the transformation in the row of s */ + + for (i = k + 1; i < n; i++) + { + double rik = gsl_matrix_get (r, i, k); + double sdiagi = gsl_vector_get (sdiag, i); + + double new_rik = cosine * rik + sine * sdiagi; + double new_sdiagi = -sine * rik + cosine * sdiagi; + + gsl_matrix_set(r, i, k, new_rik); + gsl_vector_set(sdiag, i, new_sdiagi); + } + } + + /* Store the corresponding diagonal element of s and restore the + corresponding diagonal element of r */ + + { + double rjj = gsl_matrix_get (r, j, j); + double xj = gsl_vector_get(x, j); + + gsl_vector_set (sdiag, j, rjj); + gsl_matrix_set (r, j, j, xj); + } + + } + + /* Solve the triangular system for z. If the system is singular then + obtain a least squares solution */ + + nsing = n; + + for (j = 0; j < n; j++) + { + double sdiagj = gsl_vector_get (sdiag, j); + + if (sdiagj == 0) + { + nsing = j; + break; + } + } + + for (j = nsing; j < n; j++) + { + gsl_vector_set (wa, j, 0.0); + } + + for (k = 0; k < nsing; k++) + { + double sum = 0; + + j = (nsing - 1) - k; + + for (i = j + 1; i < nsing; i++) + { + sum += gsl_matrix_get(r, i, j) * gsl_vector_get(wa, i); + } + + { + double waj = gsl_vector_get (wa, j); + double sdiagj = gsl_vector_get (sdiag, j); + + gsl_vector_set (wa, j, (waj - sum) / sdiagj); + } + } + + /* Permute the components of z back to the components of x */ + + for (j = 0; j < n; j++) + { + size_t pj = gsl_permutation_get (p, j); + double waj = gsl_vector_get (wa, j); + + gsl_vector_set (x, pj, waj); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multifit/test.c b/software/gsl-1.15/multifit/test.c new file mode 100644 index 000000000..309efcf58 --- /dev/null +++ b/software/gsl-1.15/multifit/test.c @@ -0,0 +1,283 @@ +/* multifit/test.c + * + * Copyright (C) 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* These tests are based on the NIST Statistical Reference Datasets + See http://www.nist.gov/itl/div898/strd/index.html for more + information. */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "test_longley.c" +#include "test_filip.c" +#include "test_pontius.c" +#include "test_brown.c" +#include "test_enso.c" +#include "test_kirby2.c" +#include "test_hahn1.c" +#include "test_nelson.c" +#include "test_fn.c" +#include "test_estimator.c" + +void +test_lmder (gsl_multifit_function_fdf * f, double x0[], + double * X, double F[], double * cov); + +void +test_fdf (const char * name, gsl_multifit_function_fdf * f, + double x0[], double x[], double sumsq, + double sigma[]); + +int +main (void) +{ + gsl_ieee_env_setup(); + + test_longley(); + test_filip(); + test_pontius(); + test_estimator(); + + { + gsl_multifit_function_fdf f = make_fdf (&brown_f, &brown_df, &brown_fdf, + brown_N, brown_P, 0); + + test_lmder(&f, brown_x0, &brown_X[0][0], brown_F, &brown_cov[0][0]); + } + + { + gsl_multifit_function_fdf f = make_fdf (&enso_f, &enso_df, &enso_fdf, + enso_N, enso_P, 0); + + test_fdf("nist-ENSO", &f, enso_x0, enso_x, enso_sumsq, enso_sigma); + } + + { + gsl_multifit_function_fdf f = make_fdf (&kirby2_f, &kirby2_df, &kirby2_fdf, + kirby2_N, kirby2_P, 0); + + test_fdf("nist-kirby2", &f, kirby2_x0, kirby2_x, kirby2_sumsq, kirby2_sigma); + } + + { + gsl_multifit_function_fdf f = make_fdf (&hahn1_f, &hahn1_df, &hahn1_fdf, + hahn1_N, hahn1_P, 0); + + test_fdf("nist-hahn1", &f, hahn1_x0, hahn1_x, hahn1_sumsq, hahn1_sigma); + } + +#ifdef JUNK + { + gsl_multifit_function_fdf f = make_fdf (&nelson_f, &nelson_df, &nelson_fdf, + nelson_N, nelson_P, 0); + + test_fdf("nist-nelson", &f, nelson_x0, nelson_x, nelson_sumsq, nelson_sigma); + } +#endif + + /* now summarize the results */ + + exit (gsl_test_summary ()); +} + + +void +test_lmder (gsl_multifit_function_fdf * f, double x0[], + double * X, double F[], double * cov) +{ + const gsl_multifit_fdfsolver_type *T; + gsl_multifit_fdfsolver *s; + + const size_t n = f->n; + const size_t p = f->p; + + int status; + size_t iter = 0, i; + + gsl_vector_view x = gsl_vector_view_array (x0, p); + + T = gsl_multifit_fdfsolver_lmsder; + s = gsl_multifit_fdfsolver_alloc (T, n, p); + gsl_multifit_fdfsolver_set (s, f, &x.vector); + + do + { + status = gsl_multifit_fdfsolver_iterate (s); + + for (i = 0 ; i < p; i++) + { + gsl_test_rel (gsl_vector_get (s->x, i), X[p*iter+i], 1e-5, + "lmsder, iter=%u, x%u", iter, i); + } + + gsl_test_rel (gsl_blas_dnrm2 (s->f), F[iter], 1e-5, + "lmsder, iter=%u, f", iter); + + iter++; + } + while (iter < 20); + + { + size_t i, j; + gsl_matrix * covar = gsl_matrix_alloc (4, 4); + gsl_multifit_covar (s->J, 0.0, covar); + + for (i = 0; i < 4; i++) + { + for (j = 0; j < 4; j++) + { + gsl_test_rel (gsl_matrix_get(covar,i,j), cov[i*p + j], 1e-7, + "gsl_multifit_covar cov(%d,%d)", i, j) ; + } + } + + gsl_matrix_free (covar); + } + + gsl_multifit_fdfsolver_free (s); + +} + +void +test_fdf (const char * name, gsl_multifit_function_fdf * f, + double x0[], double x_final[], + double f_sumsq, double sigma[]) +{ + const gsl_multifit_fdfsolver_type *T; + gsl_multifit_fdfsolver *s; + + const size_t n = f->n; + const size_t p = f->p; + + int status; + size_t iter = 0; + + gsl_vector_view x = gsl_vector_view_array (x0, p); + + T = gsl_multifit_fdfsolver_lmsder; + s = gsl_multifit_fdfsolver_alloc (T, n, p); + gsl_multifit_fdfsolver_set (s, f, &x.vector); + + do + { + status = gsl_multifit_fdfsolver_iterate (s); + +#ifdef DEBUG + printf("iter = %d status = %d |f| = %.18e x = \n", + iter, status, gsl_blas_dnrm2 (s->f)); + + gsl_vector_fprintf(stdout, s->x, "%.8e"); +#endif + status = gsl_multifit_test_delta (s->dx, s->x, 0.0, 1e-7); + + iter++; + } + while (status == GSL_CONTINUE && iter < 1000); + + { + size_t i; + gsl_matrix * covar = gsl_matrix_alloc (p, p); + gsl_multifit_covar (s->J, 0.0, covar); + + for (i = 0 ; i < p; i++) + { + gsl_test_rel (gsl_vector_get (s->x, i), x_final[i], 1e-5, + "%s, lmsder, x%u", name, i); + } + + + { + double s2 = pow(gsl_blas_dnrm2 (s->f), 2.0); + + gsl_test_rel (s2, f_sumsq, 1e-5, "%s, lmsder, |f|^2", name); + + for (i = 0; i < p; i++) + { + double ei = sqrt(s2/(n-p))*sqrt(gsl_matrix_get(covar,i,i)); + gsl_test_rel (ei, sigma[i], 1e-4, + "%s, sigma(%d)", name, i) ; + } + } + + gsl_matrix_free (covar); + } + + /* Check that there is no hidden state, restarting should + produce identical results. */ + + { + int status0, status1; + size_t i; + gsl_multifit_fdfsolver *t = gsl_multifit_fdfsolver_alloc (T, n, p); + gsl_multifit_fdfsolver_set (t, f, &x.vector); + + /* do a few extra iterations to stir things up */ + + gsl_multifit_fdfsolver_set (s, f, &x.vector); + + for (i = 0; i < 3; i++) + { + gsl_multifit_fdfsolver_iterate (s); + } + + gsl_multifit_fdfsolver_set (s, f, &x.vector); + + do + { + status0 = gsl_multifit_fdfsolver_iterate (s); + status1 = gsl_multifit_fdfsolver_iterate (t); + + gsl_test_int(status0, status1, "%s, lmsder status after set iter=%u", name, iter); + + for (i = 0; i < p; i++) { + double sxi = gsl_vector_get(s->x,i); + double txi = gsl_vector_get(t->x,i); +#ifdef DEBUG + printf("%d %g %g\n", i, sxi, txi); +#endif + gsl_test_rel(sxi, txi, 1e-15, "%s, lmsder after set, %u/%u", name, iter, i); + } + +#ifdef DEBUG + printf("iter = %d status = %d |f| = %.18e x = \n", + iter, status, gsl_blas_dnrm2 (s->f)); + + gsl_vector_fprintf(stdout, s->x, "%.8e"); +#endif + status0 = gsl_multifit_test_delta (s->dx, s->x, 0.0, 1e-7); + status1 = gsl_multifit_test_delta (t->dx, s->x, 0.0, 1e-7); + + gsl_test_int(status0, status1, "%s, lmsder test delta status after set iter=%u", name, iter); + + iter++; + } + while (status1 == GSL_CONTINUE && iter < 1000); + + gsl_multifit_fdfsolver_free (t); + } + + gsl_multifit_fdfsolver_free (s); +} diff --git a/software/gsl-1.15/multifit/test_brown.c b/software/gsl-1.15/multifit/test_brown.c new file mode 100644 index 000000000..e1ac937db --- /dev/null +++ b/software/gsl-1.15/multifit/test_brown.c @@ -0,0 +1,113 @@ +const size_t brown_N = 20; +const size_t brown_P = 4; + +double brown_X[20][4] = { + {24.3485677, 4.71448798, -2.19486633, 2.69405755}, + {22.4116222, 3.93075538, -1.42344852, 2.5233557}, + {17.88886, 2.9290853, .125174936, -3.96823353}, + {17.3237176, 2.99606803, 2.03285653, 2.28992327}, + {17.0906508, 3.02485425, .296995153, .0876226126}, + {16.578006, 3.1036312, -.18617941, .103262914}, + {15.692993, 3.33088442, .0706406887, 1.05923955}, + {14.3232177, 3.85604218, -2.3762839, -3.09486813}, + {14.1279266, 3.97896121, .446109351, 1.40023753}, + {13.6081961, 4.16435075, -1.51250057, -1.52510626}, + {13.4295245, 4.22697223, -.196985195, .532009293}, + {13.0176117, 4.3579261, -.353131208, .301377627}, + {12.2713535, 4.62398535, -.00183585584, .894170703}, + {11.0316144, 5.13967727, -2.38978772, -2.89510064}, + {10.8807981, 5.24558004, .230495952, 1.27315117}, + {10.4029264, 5.41141257, -1.5116632, -1.47615921}, + {10.2574435, 5.46211045, -.299855732, .451893162}, + {9.87863876, 5.57914292, -.368885288, .358086545}, + {9.1894983, 5.82082741, -.230157969, .621476534}, + {8.00589008, 6.27788753, -1.46022815, -1.33468082} +}; + +double brown_F[20] = { + 2474.05541, + 1924.69004, + 1280.63194, + 1244.81867, + 1190.53739, + 1159.34935, + 1108.44426, + 1090.11073, + 1015.92942, + 1002.43533, + 971.221084, + 949.589435, + 911.359899, + 906.522994, + 840.525729, + 833.950164, + 807.557511, + 791.00924, + 761.09598, + 726.787783, +}; + +double brown_cov[4][4] = { + { 1.8893186910e-01, -4.7099989571e-02, 5.2154168404e-01, 1.6608168209e-02}, + {-4.7099989571e-02, 1.1761534388e-02, -1.2987843074e-01, -4.1615942391e-03}, + { 5.2154168404e-01, -1.2987843074e-01, 1.4653936514e+00, 1.5738321686e-02}, + { 1.6608168209e-02, -4.1615942391e-03, 1.5738321686e-02, 4.2348042340e-02}, +}; + +double brown_x0[4] = { 25, 5, -5, -1 }; + +int +brown_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + size_t i; + + for (i = 0; i < 20; i++) + { + double ti = 0.2 * (i + 1); + double ui = x0 + x1 * ti - exp (ti); + double vi = x2 + x3 * sin (ti) - cos (ti); + + gsl_vector_set (f, i, ui * ui + vi * vi); + } + + return GSL_SUCCESS; +} + +int +brown_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + size_t i; + + for (i = 0; i < 20; i++) + { + double ti = 0.2 * (i + 1); + double ui = x0 + x1 * ti - exp (ti); + double vi = x2 + x3 * sin (ti) - cos (ti); + + gsl_matrix_set (df, i, 0, 2 * ui); + gsl_matrix_set (df, i, 1, 2 * ui * ti); + gsl_matrix_set (df, i, 2, 2 * vi); + gsl_matrix_set (df, i, 3, 2 * vi * sin (ti)); + + } + return GSL_SUCCESS; +} + +int +brown_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + brown_f (x, params, f); + brown_df (x, params, df); + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/multifit/test_enso.c b/software/gsl-1.15/multifit/test_enso.c new file mode 100644 index 000000000..634373869 --- /dev/null +++ b/software/gsl-1.15/multifit/test_enso.c @@ -0,0 +1,279 @@ +const size_t enso_N = 168; +const size_t enso_P = 9; + +double enso_x0[9] = { 10.0, 3.0, 0.5, 44.0, -1.5, 0.5, 26.0, 0.1, 1.5 }; + +double enso_x[9] = { + 1.0510749193E+01, + 3.0762128085E+00, + 5.3280138227E-01, + 4.4311088700E+01, + -1.6231428586E+00, + 5.2554493756E-01, + 2.6887614440E+01, + 2.1232288488E-01, + 1.4966870418E+00 +}; + +double enso_sumsq = 7.8853978668E+02; + +double enso_sigma[9] = { + 1.7488832467E-01, + 2.4310052139E-01, + 2.4354686618E-01, + 9.4408025976E-01, + 2.8078369611E-01, + 4.8073701119E-01, + 4.1612939130E-01, + 5.1460022911E-01, + 2.5434468893E-01 +}; + +double enso_F[168] = { + 12.90000, + 11.30000, + 10.60000, + 11.20000, + 10.90000, + 7.500000, + 7.700000, + 11.70000, + 12.90000, + 14.30000, + 10.90000, + 13.70000, + 17.10000, + 14.00000, + 15.30000, + 8.500000, + 5.700000, + 5.500000, + 7.600000, + 8.600000, + 7.300000, + 7.600000, + 12.70000, + 11.00000, + 12.70000, + 12.90000, + 13.00000, + 10.90000, + 10.400000, + 10.200000, + 8.000000, + 10.90000, + 13.60000, + 10.500000, + 9.200000, + 12.40000, + 12.70000, + 13.30000, + 10.100000, + 7.800000, + 4.800000, + 3.000000, + 2.500000, + 6.300000, + 9.700000, + 11.60000, + 8.600000, + 12.40000, + 10.500000, + 13.30000, + 10.400000, + 8.100000, + 3.700000, + 10.70000, + 5.100000, + 10.400000, + 10.90000, + 11.70000, + 11.40000, + 13.70000, + 14.10000, + 14.00000, + 12.50000, + 6.300000, + 9.600000, + 11.70000, + 5.000000, + 10.80000, + 12.70000, + 10.80000, + 11.80000, + 12.60000, + 15.70000, + 12.60000, + 14.80000, + 7.800000, + 7.100000, + 11.20000, + 8.100000, + 6.400000, + 5.200000, + 12.00000, + 10.200000, + 12.70000, + 10.200000, + 14.70000, + 12.20000, + 7.100000, + 5.700000, + 6.700000, + 3.900000, + 8.500000, + 8.300000, + 10.80000, + 16.70000, + 12.60000, + 12.50000, + 12.50000, + 9.800000, + 7.200000, + 4.100000, + 10.60000, + 10.100000, + 10.100000, + 11.90000, + 13.60000, + 16.30000, + 17.60000, + 15.50000, + 16.00000, + 15.20000, + 11.20000, + 14.30000, + 14.50000, + 8.500000, + 12.00000, + 12.70000, + 11.30000, + 14.50000, + 15.10000, + 10.400000, + 11.50000, + 13.40000, + 7.500000, + 0.6000000, + 0.3000000, + 5.500000, + 5.000000, + 4.600000, + 8.200000, + 9.900000, + 9.200000, + 12.50000, + 10.90000, + 9.900000, + 8.900000, + 7.600000, + 9.500000, + 8.400000, + 10.70000, + 13.60000, + 13.70000, + 13.70000, + 16.50000, + 16.80000, + 17.10000, + 15.40000, + 9.500000, + 6.100000, + 10.100000, + 9.300000, + 5.300000, + 11.20000, + 16.60000, + 15.60000, + 12.00000, + 11.50000, + 8.600000, + 13.80000, + 8.700000, + 8.600000, + 8.600000, + 8.700000, + 12.80000, + 13.20000, + 14.00000, + 13.40000, + 14.80000 +}; + + +int +enso_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double b[9]; + size_t i; + + for (i = 0; i < 9; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 168; i++) + { + double t = (i + 1.0); + double y; + y = b[0]; + y += b[1] * cos(2*M_PI*t/12); + y += b[2] * sin(2*M_PI*t/12); + y += b[4] * cos(2*M_PI*t/b[3]); + y += b[5] * sin(2*M_PI*t/b[3]); + y += b[7] * cos(2*M_PI*t/b[6]); + y += b[8] * sin(2*M_PI*t/b[6]); + + gsl_vector_set (f, i, enso_F[i] - y); + } + + return GSL_SUCCESS; +} + +int +enso_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double b[9]; + size_t i; + + for (i = 0; i < 9; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 168; i++) + { + double t = (i + 1.0); + + gsl_matrix_set (df, i, 0, -1.0); + gsl_matrix_set (df, i, 1, -cos(2*M_PI*t/12)); + gsl_matrix_set (df, i, 2, -sin(2*M_PI*t/12)); + gsl_matrix_set (df, i, 3, + -b[4]*(2*M_PI*t/(b[3]*b[3]))*sin(2*M_PI*t/b[3]) + +b[5]*(2*M_PI*t/(b[3]*b[3]))*cos(2*M_PI*t/b[3])); + gsl_matrix_set (df, i, 4, -cos(2*M_PI*t/b[3])); + gsl_matrix_set (df, i, 5, -sin(2*M_PI*t/b[3])); + gsl_matrix_set (df, i, 6, + -b[7] * (2*M_PI*t/(b[6]*b[6])) * sin(2*M_PI*t/b[6]) + +b[8] * (2*M_PI*t/(b[6]*b[6])) * cos(2*M_PI*t/b[6])); + gsl_matrix_set (df, i, 7, -cos(2*M_PI*t/b[6])); + gsl_matrix_set (df, i, 8, -sin(2*M_PI*t/b[6])); + } + + return GSL_SUCCESS; +} + +int +enso_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + enso_f (x, params, f); + enso_df (x, params, df); + + return GSL_SUCCESS; +} + + + + + diff --git a/software/gsl-1.15/multifit/test_estimator.c b/software/gsl-1.15/multifit/test_estimator.c new file mode 100644 index 000000000..51cbabad8 --- /dev/null +++ b/software/gsl-1.15/multifit/test_estimator.c @@ -0,0 +1,37 @@ +void +test_estimator () +{ + gsl_vector_view c; + gsl_matrix_view cov; + gsl_vector_view x; + double y, y_err; + + double cov_ij[25] = { + 4.271520, -0.526675, 0.957930, 0.267750, -0.103610, + -0.526675, 5.701680, -0.098080, 0.641845, 0.429780, + 0.957930, -0.098080, 4.584790, 0.375865, 1.510810, + 0.267750, 0.641845, 0.375865, 4.422720, 0.392210, + -0.103610, 0.429780, 1.510810, 0.392210, 5.782750 + + }; + + double c_i[5] = { + -0.627020, 0.848674, 0.216877, -0.057883, 0.596668 + }; + + double x_i[5] = { + 0.99932, 0.23858, 0.19797, 1.44008, -0.15335 + }; + + double y_expected = -5.56037032230000e-01; + double yerr_expected = 3.91891123349318e+00; + + cov = gsl_matrix_view_array(cov_ij, 5, 5); + c = gsl_vector_view_array(c_i, 5); + x = gsl_vector_view_array(x_i, 5); + + gsl_multifit_linear_est(&x.vector , &c.vector, &cov.matrix, &y, &y_err); + + gsl_test_rel (y, y_expected, 256*GSL_DBL_EPSILON, "gsl_multifit_linear_est y"); + gsl_test_rel (y_err, yerr_expected, 256*GSL_DBL_EPSILON, "gsl_multifit_linear_est yerr"); +} diff --git a/software/gsl-1.15/multifit/test_filip.c b/software/gsl-1.15/multifit/test_filip.c new file mode 100644 index 000000000..f194cd49f --- /dev/null +++ b/software/gsl-1.15/multifit/test_filip.c @@ -0,0 +1,214 @@ +size_t filip_n = 82; +size_t filip_p = 11; + +double filip_x[] = { -6.860120914, -4.324130045, -4.358625055, +-4.358426747, -6.955852379, -6.661145254, -6.355462942, -6.118102026, +-7.115148017, -6.815308569, -6.519993057, -6.204119983, -5.853871964, +-6.109523091, -5.79832982, -5.482672118, -5.171791386, -4.851705903, +-4.517126416, -4.143573228, -3.709075441, -3.499489089, -6.300769497, +-5.953504836, -5.642065153, -5.031376979, -4.680685696, -4.329846955, +-3.928486195, -8.56735134, -8.363211311, -8.107682739, -7.823908741, +-7.522878745, -7.218819279, -6.920818754, -6.628932138, -6.323946875, +-5.991399828, -8.781464495, -8.663140179, -8.473531488, -8.247337057, +-7.971428747, -7.676129393, -7.352812702, -7.072065318, -6.774174009, +-6.478861916, -6.159517513, -6.835647144, -6.53165267, -6.224098421, +-5.910094889, -5.598599459, -5.290645224, -4.974284616, -4.64454848, +-4.290560426, -3.885055584, -3.408378962, -3.13200249, -8.726767166, +-8.66695597, -8.511026475, -8.165388579, -7.886056648, -7.588043762, +-7.283412422, -6.995678626, -6.691862621, -6.392544977, -6.067374056, +-6.684029655, -6.378719832, -6.065855188, -5.752272167, -5.132414673, +-4.811352704, -4.098269308, -3.66174277, -3.2644011}; + +double filip_y[] = { 0.8116, 0.9072, 0.9052, 0.9039, 0.8053, 0.8377, +0.8667, 0.8809, 0.7975, 0.8162, 0.8515, 0.8766, 0.8885, 0.8859, +0.8959, 0.8913, 0.8959, 0.8971, 0.9021, 0.909, 0.9139, 0.9199, 0.8692, +0.8872, 0.89, 0.891, 0.8977, 0.9035, 0.9078, 0.7675, 0.7705, 0.7713, +0.7736, 0.7775, 0.7841, 0.7971, 0.8329, 0.8641, 0.8804, 0.7668, +0.7633, 0.7678, 0.7697, 0.77, 0.7749, 0.7796, 0.7897, 0.8131, 0.8498, +0.8741, 0.8061, 0.846, 0.8751, 0.8856, 0.8919, 0.8934, 0.894, 0.8957, +0.9047, 0.9129, 0.9209, 0.9219, 0.7739, 0.7681, 0.7665, 0.7703, +0.7702, 0.7761, 0.7809, 0.7961, 0.8253, 0.8602, 0.8809, 0.8301, +0.8664, 0.8834, 0.8898, 0.8964, 0.8963, 0.9074, 0.9119, 0.9228 } ; + + +void +test_filip () +{ + size_t i, j; + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (filip_n, filip_p); + + gsl_matrix * X = gsl_matrix_alloc (filip_n, filip_p); + gsl_vector_view y = gsl_vector_view_array (filip_y, filip_n); + gsl_vector * c = gsl_vector_alloc (filip_p); + gsl_matrix * cov = gsl_matrix_alloc (filip_p, filip_p); + gsl_vector * r = gsl_vector_alloc(filip_n); + gsl_vector_view diag; + + double chisq; + + double expected_c[11] = { -1467.48961422980, + -2772.17959193342, + -2316.37108160893, + -1127.97394098372, + -354.478233703349, + -75.1242017393757, + -10.8753180355343, + -1.06221498588947, + -0.670191154593408E-01, + -0.246781078275479E-02, + -0.402962525080404E-04 }; + + double expected_sd[11] = { 298.084530995537, + 559.779865474950, + 466.477572127796, + 227.204274477751, + 71.6478660875927, + 15.2897178747400, + 2.23691159816033, + 0.221624321934227, + 0.142363763154724E-01, + 0.535617408889821E-03, + 0.896632837373868E-05 }; + + double expected_chisq = 0.795851382172941E-03; + + for (i = 0 ; i < filip_n; i++) + { + for (j = 0; j < filip_p; j++) + { + gsl_matrix_set(X, i, j, pow(filip_x[i], j)); + } + } + + gsl_multifit_linear (X, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-7, "filip gsl_fit_multilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-7, "filip gsl_fit_multilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-7, "filip gsl_fit_multilinear c2") ; + gsl_test_rel (gsl_vector_get(c,3), expected_c[3], 1e-7, "filip gsl_fit_multilinear c3") ; + gsl_test_rel (gsl_vector_get(c,4), expected_c[4], 1e-7, "filip gsl_fit_multilinear c4") ; + gsl_test_rel (gsl_vector_get(c,5), expected_c[5], 1e-7, "filip gsl_fit_multilinear c5") ; + gsl_test_rel (gsl_vector_get(c,6), expected_c[6], 1e-7, "filip gsl_fit_multilinear c6") ; + gsl_test_rel (gsl_vector_get(c,7), expected_c[7], 1e-7, "filip gsl_fit_multilinear c7") ; + gsl_test_rel (gsl_vector_get(c,8), expected_c[8], 1e-7, "filip gsl_fit_multilinear c8") ; + gsl_test_rel (gsl_vector_get(c,9), expected_c[9], 1e-7, "filip gsl_fit_multilinear c9") ; + gsl_test_rel (gsl_vector_get(c,10), expected_c[10], 1e-7, "filip gsl_fit_multilinear c10") ; + + diag = gsl_matrix_diagonal (cov); + + gsl_test_rel (gsl_vector_get(&diag.vector,0), pow(expected_sd[0],2.0), 1e-6, "filip gsl_fit_multilinear cov00") ; + gsl_test_rel (gsl_vector_get(&diag.vector,1), pow(expected_sd[1],2.0), 1e-6, "filip gsl_fit_multilinear cov11") ; + gsl_test_rel (gsl_vector_get(&diag.vector,2), pow(expected_sd[2],2.0), 1e-6, "filip gsl_fit_multilinear cov22") ; + gsl_test_rel (gsl_vector_get(&diag.vector,3), pow(expected_sd[3],2.0), 1e-6, "filip gsl_fit_multilinear cov33") ; + gsl_test_rel (gsl_vector_get(&diag.vector,4), pow(expected_sd[4],2.0), 1e-6, "filip gsl_fit_multilinear cov44") ; + gsl_test_rel (gsl_vector_get(&diag.vector,5), pow(expected_sd[5],2.0), 1e-6, "filip gsl_fit_multilinear cov55") ; + gsl_test_rel (gsl_vector_get(&diag.vector,6), pow(expected_sd[6],2.0), 1e-6, "filip gsl_fit_multilinear cov66") ; + gsl_test_rel (gsl_vector_get(&diag.vector,7), pow(expected_sd[7],2.0), 1e-6, "filip gsl_fit_multilinear cov77") ; + gsl_test_rel (gsl_vector_get(&diag.vector,8), pow(expected_sd[8],2.0), 1e-6, "filip gsl_fit_multilinear cov88") ; + gsl_test_rel (gsl_vector_get(&diag.vector,9), pow(expected_sd[9],2.0), 1e-6, "filip gsl_fit_multilinear cov99") ; + gsl_test_rel (gsl_vector_get(&diag.vector,10), pow(expected_sd[10],2.0), 1e-6, "filip gsl_fit_multilinear cov1010") ; + + gsl_test_rel (chisq, expected_chisq, 1e-7, "filip gsl_fit_multilinear chisq") ; + + gsl_multifit_linear_residuals(X, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-7, "filip gsl_fit_multilinear residuals") ; + + gsl_vector_free(c); + gsl_matrix_free(cov); + gsl_matrix_free(X); + gsl_vector_free(r); + gsl_multifit_linear_free (work); + } + + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (filip_n, filip_p); + + gsl_matrix * X = gsl_matrix_alloc (filip_n, filip_p); + gsl_vector_view y = gsl_vector_view_array (filip_y, filip_n); + gsl_vector * w = gsl_vector_alloc (filip_n); + gsl_vector * c = gsl_vector_alloc (filip_p); + gsl_vector * r = gsl_vector_alloc (filip_n); + gsl_matrix * cov = gsl_matrix_alloc (filip_p, filip_p); + + double chisq; + + double expected_c[11] = { -1467.48961422980, + -2772.17959193342, + -2316.37108160893, + -1127.97394098372, + -354.478233703349, + -75.1242017393757, + -10.8753180355343, + -1.06221498588947, + -0.670191154593408E-01, + -0.246781078275479E-02, + -0.402962525080404E-04 }; + + /* computed using GNU Calc */ + + double expected_cov[11][11] ={ { 7.9269341767252183262588583867942e9, 1.4880416622254098343441063389706e10, 1.2385811858111487905481427591107e10, 6.0210784406215266653697715794241e9, 1.8936652526181982747116667336389e9, 4.0274900618493109653998118587093e8, 5.8685468011819735806180092394606e7, 5.7873451475721689084330083708901e6, 3.6982719848703747920663262917032e5, 1.3834818802741350637527054170891e4, 2.301758578713219280719633494302e2 }, + { 1.4880416622254098334697515488559e10, 2.7955091668548290835529555438088e10, 2.3286604504243362691678565997033e10, 1.132895006796272983689297219686e10, 3.5657281653312473123348357644683e9, 7.5893300392314445528176646366087e8, 1.1066654886143524811964131660002e8, 1.0921285448484575110763947787775e7, 6.9838139975394769253353547606971e5, 2.6143091775349597218939272614126e4, 4.3523386330348588614289505633539e2 }, + { 1.2385811858111487890788272968677e10, 2.3286604504243362677757802422747e10, 1.9412787917766676553608636489674e10, 9.4516246492862131849077729250098e9, 2.9771226694709917550143152097252e9, 6.3413035086730038062129508949859e8, 9.2536164488309401636559552742339e7, 9.1386304643423333815338760248027e6, 5.8479478338916429826337004060941e5, 2.1905933113294737443808429764554e4, 3.6493161325305557266196635180155e2 }, + { 6.0210784406215266545770691532365e9, 1.1328950067962729823273441573365e10, 9.4516246492862131792040001429636e9, 4.6053152992000107509329772255094e9, 1.4517147860312147098138030287038e9, 3.0944988323328589376402579060072e8, 4.5190223822292688669369522708712e7, 4.4660958693678497534529855690752e6, 2.8599340736122198213681258676423e5, 1.0720394998549386596165641244705e4, 1.7870937745661967319298031044424e2 }, + { 1.8936652526181982701620450132636e9, 3.5657281653312473058825073094524e9, 2.9771226694709917514149924058297e9, 1.451714786031214708936087401632e9, 4.5796563896564815123074920050827e8, 9.7693972414561515534525103622773e7, 1.427717861635658545863942948444e7, 1.4120161287735817621354292900338e6, 9.0484361228623960006818614875557e4, 3.394106783764852373199087455398e3, 5.6617406468519495376287407526295e1 }, + { 4.0274900618493109532650887473599e8, 7.589330039231444534478894935778e8, 6.3413035086730037947153564986653e8, 3.09449883233285893390542947998e8, 9.7693972414561515475770399055121e7, 2.0855726248311948992114244257719e7, 3.0501263034740400533872858749566e6, 3.0187475839310308153394428784224e5, 1.9358204633534233524477930175632e4, 7.2662989867560017077361942813911e2, 1.2129002231061036467607394277965e1 }, + { 5.868546801181973559370854830868e7, 1.1066654886143524778548044386795e8, 9.2536164488309401413296494869777e7, 4.5190223822292688587853853162072e7, 1.4277178616356585441556046753562e7, 3.050126303474040051574715592746e6, 4.4639982579046340884744460329946e5, 4.4212093985989836047285007760238e4, 2.8371395028774486687625333589972e3, 1.0656694507620102300567296504381e2, 1.7799982046359973175080475654123e0 }, + { 5.7873451475721688839974153925406e6, 1.0921285448484575071271480643397e7, 9.1386304643423333540728480344578e6, 4.4660958693678497427674903565664e6, 1.4120161287735817596182229182587e6, 3.0187475839310308117812257613082e5, 4.4212093985989836021482392757677e4, 4.3818874017028389517560906916315e3, 2.813828775753142855163154605027e2, 1.0576188138416671883232607188969e1, 1.7676976288918295012452853715408e-1 }, + { 3.6982719848703747742568351456818e5, 6.9838139975394768959780068745979e5, 5.8479478338916429616547638954781e5, 2.8599340736122198128717796825489e5, 9.0484361228623959793493985226792e4, 1.9358204633534233490579641064343e4, 2.8371395028774486654873647731797e3, 2.8138287757531428535592907878017e2, 1.8081118503579798222896804627964e1, 6.8005074291434681866415478598732e-1, 1.1373581557749643543869665860719e-2 }, + { 1.3834818802741350562839757244708e4, 2.614309177534959709397445440919e4, 2.1905933113294737352721470167247e4, 1.0720394998549386558251721913182e4, 3.3941067837648523632905604575131e3, 7.2662989867560016909534954790835e2, 1.0656694507620102282337905013451e2, 1.0576188138416671871337685672492e1, 6.8005074291434681828743281967838e-1, 2.5593857187900736057022477529078e-2, 4.2831487599116264442963102045936e-4 }, + { 2.3017585787132192669801658674163e2, 4.3523386330348588381716460685124e2, 3.6493161325305557094116270974735e2, 1.7870937745661967246233792737255e2, 5.6617406468519495180024059284629e1, 1.2129002231061036433003571679329e1, 1.7799982046359973135014027410646e0, 1.7676976288918294983059118597214e-1, 1.137358155774964353146460100337e-2, 4.283148759911626442000316269063e-4, 7.172253875245080423800933453952e-6 } }; + + double expected_chisq = 0.795851382172941E-03; + + for (i = 0 ; i < filip_n; i++) + { + for (j = 0; j < filip_p; j++) + { + gsl_matrix_set(X, i, j, pow(filip_x[i], j)); + } + } + + gsl_vector_set_all (w, 1.0); + + gsl_multifit_wlinear (X, w, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-7, "filip gsl_fit_multilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-7, "filip gsl_fit_multilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-7, "filip gsl_fit_multilinear c2") ; + gsl_test_rel (gsl_vector_get(c,3), expected_c[3], 1e-7, "filip gsl_fit_multilinear c3") ; + gsl_test_rel (gsl_vector_get(c,4), expected_c[4], 1e-7, "filip gsl_fit_multilinear c4") ; + gsl_test_rel (gsl_vector_get(c,5), expected_c[5], 1e-7, "filip gsl_fit_multilinear c5") ; + gsl_test_rel (gsl_vector_get(c,6), expected_c[6], 1e-7, "filip gsl_fit_multilinear c6") ; + gsl_test_rel (gsl_vector_get(c,7), expected_c[7], 1e-7, "filip gsl_fit_multilinear c7") ; + gsl_test_rel (gsl_vector_get(c,8), expected_c[8], 1e-7, "filip gsl_fit_multilinear c8") ; + gsl_test_rel (gsl_vector_get(c,9), expected_c[9], 1e-7, "filip gsl_fit_multilinear c9") ; + gsl_test_rel (gsl_vector_get(c,10), expected_c[10], 1e-7, "filip gsl_fit_multilinear c10") ; + + + for (i = 0; i < filip_p; i++) + { + for (j = 0; j < filip_p; j++) + { + gsl_test_rel (gsl_matrix_get(cov,i,j), expected_cov[i][j], 1e-6, + "filip gsl_fit_wmultilinear cov(%d,%d)", i, j) ; + } + } + + gsl_test_rel (chisq, expected_chisq, 1e-7, "filip gsl_fit_wmultilinear chisq") ; + + gsl_multifit_linear_residuals(X, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-7, "filip gsl_fit_wmultilinear residuals") ; + + gsl_vector_free(w); + gsl_vector_free(c); + gsl_vector_free(r); + gsl_matrix_free(cov); + gsl_matrix_free(X); + gsl_multifit_linear_free (work); + } +} diff --git a/software/gsl-1.15/multifit/test_fn.c b/software/gsl-1.15/multifit/test_fn.c new file mode 100644 index 000000000..ad190a10e --- /dev/null +++ b/software/gsl-1.15/multifit/test_fn.c @@ -0,0 +1,25 @@ +gsl_multifit_function_fdf +make_fdf (int (* f) (const gsl_vector *, void *, gsl_vector *), + int (* df) (const gsl_vector *, void *, gsl_matrix *), + int (* fdf) (const gsl_vector *, void *, gsl_vector *, gsl_matrix *), + size_t n, + size_t p, + void * params); + +gsl_multifit_function_fdf +make_fdf (int (* f) (const gsl_vector *, void *, gsl_vector *), + int (* df) (const gsl_vector *, void *, gsl_matrix *), + int (* fdf) (const gsl_vector *, void *, gsl_vector *, gsl_matrix *), + size_t n, + size_t p, + void * params) +{ + gsl_multifit_function_fdf F_new; + F_new.f = f; + F_new.df = df; + F_new.fdf = fdf; + F_new.n = n; + F_new.p = p; + F_new.params = params; + return F_new; +} diff --git a/software/gsl-1.15/multifit/test_hahn1.c b/software/gsl-1.15/multifit/test_hahn1.c new file mode 100644 index 000000000..8a2385a8d --- /dev/null +++ b/software/gsl-1.15/multifit/test_hahn1.c @@ -0,0 +1,568 @@ +const size_t hahn1_N = 236; +const size_t hahn1_P = 7; + +/* double hahn1_x0[7] = { 10, -1, 0.05, -0.00001, -0.05, 0.001, -0.000001 }; */ + +double hahn1_x0[7] = { 1, -0.1, 0.005, -0.000001, -0.005, 0.0001, -0.0000001}; + +double hahn1_x[7] = { +1.0776351733E+00, +-1.2269296921E-01, +4.0863750610E-03, +-1.4262662514E-06, +-5.7609940901E-03, +2.4053735503E-04, +-1.2314450199E-07 +}; + +double hahn1_sumsq = 1.5324382854E+00; + +double hahn1_sigma[7] = { + 1.7070154742E-01, + 1.2000289189E-02, + 2.2508314937E-04, + 2.7578037666E-07, + 2.4712888219E-04, + 1.0449373768E-05, + 1.3027335327E-08 +}; + +double hahn1_F1[236] = { + .591E0, + 1.547E0, + 2.902E0, + 2.894E0, + 4.703E0, + 6.307E0, + 7.03E0 , + 7.898E0, + 9.470E0, + 9.484E0, + 10.072E0, + 10.163E0, + 11.615E0, + 12.005E0, + 12.478E0, + 12.982E0, + 12.970E0, + 13.926E0, + 14.452E0, + 14.404E0, + 15.190E0, + 15.550E0, + 15.528E0, + 15.499E0, + 16.131E0, + 16.438E0, + 16.387E0, + 16.549E0, + 16.872E0, + 16.830E0, + 16.926E0, + 16.907E0, + 16.966E0, + 17.060E0, + 17.122E0, + 17.311E0, + 17.355E0, + 17.668E0, + 17.767E0, + 17.803E0, + 17.765E0, + 17.768E0, + 17.736E0, + 17.858E0, + 17.877E0, + 17.912E0, + 18.046E0, + 18.085E0, + 18.291E0, + 18.357E0, + 18.426E0, + 18.584E0, + 18.610E0, + 18.870E0, + 18.795E0, + 19.111E0, + .367E0, + .796E0, + 0.892E0, + 1.903E0, + 2.150E0, + 3.697E0, + 5.870E0, + 6.421E0, + 7.422E0, + 9.944E0, + 11.023E0, + 11.87E0 , + 12.786E0, + 14.067E0, + 13.974E0, + 14.462E0, + 14.464E0, + 15.381E0, + 15.483E0, + 15.59E0 , + 16.075E0, + 16.347E0, + 16.181E0, + 16.915E0, + 17.003E0, + 16.978E0, + 17.756E0, + 17.808E0, + 17.868E0, + 18.481E0, + 18.486E0, + 19.090E0, + 16.062E0, + 16.337E0, + 16.345E0, + 16.388E0, + 17.159E0, + 17.116E0, + 17.164E0, + 17.123E0, + 17.979E0, + 17.974E0, + 18.007E0, + 17.993E0, + 18.523E0, + 18.669E0, + 18.617E0, + 19.371E0, + 19.330E0, + 0.080E0, + 0.248E0, + 1.089E0, + 1.418E0, + 2.278E0, + 3.624E0, + 4.574E0, + 5.556E0, + 7.267E0, + 7.695E0, + 9.136E0, + 9.959E0, + 9.957E0, + 11.600E0, + 13.138E0, + 13.564E0, + 13.871E0, + 13.994E0, + 14.947E0, + 15.473E0, + 15.379E0, + 15.455E0, + 15.908E0, + 16.114E0, + 17.071E0, + 17.135E0, + 17.282E0, + 17.368E0, + 17.483E0, + 17.764E0, + 18.185E0, + 18.271E0, + 18.236E0, + 18.237E0, + 18.523E0, + 18.627E0, + 18.665E0, + 19.086E0, + 0.214E0, + 0.943E0, + 1.429E0, + 2.241E0, + 2.951E0, + 3.782E0, + 4.757E0, + 5.602E0, + 7.169E0, + 8.920E0, + 10.055E0, + 12.035E0, + 12.861E0, + 13.436E0, + 14.167E0, + 14.755E0, + 15.168E0, + 15.651E0, + 15.746E0, + 16.216E0, + 16.445E0, + 16.965E0, + 17.121E0, + 17.206E0, + 17.250E0, + 17.339E0, + 17.793E0, + 18.123E0, + 18.49E0 , + 18.566E0, + 18.645E0, + 18.706E0, + 18.924E0, + 19.1E0 , + 0.375E0, + 0.471E0, + 1.504E0, + 2.204E0, + 2.813E0, + 4.765E0, + 9.835E0, + 10.040E0, + 11.946E0, + 12.596E0, + 13.303E0, + 13.922E0, + 14.440E0, + 14.951E0, + 15.627E0, + 15.639E0, + 15.814E0, + 16.315E0, + 16.334E0, + 16.430E0, + 16.423E0, + 17.024E0, + 17.009E0, + 17.165E0, + 17.134E0, + 17.349E0, + 17.576E0, + 17.848E0, + 18.090E0, + 18.276E0, + 18.404E0, + 18.519E0, + 19.133E0, + 19.074E0, + 19.239E0, + 19.280E0, + 19.101E0, + 19.398E0, + 19.252E0, + 19.89E0 , + 20.007E0, + 19.929E0, + 19.268E0, + 19.324E0, + 20.049E0, + 20.107E0, + 20.062E0, + 20.065E0, + 19.286E0, + 19.972E0, + 20.088E0, + 20.743E0, + 20.83E0 , + 20.935E0, + 21.035E0, + 20.93E0 , + 21.074E0, + 21.085E0, + 20.935E0 +}; + + +double hahn1_F0[236] = { + 24.41E0, + 34.82E0, + 44.09E0, + 45.07E0, + 54.98E0, + 65.51E0, + 70.53E0, + 75.70E0, + 89.57E0, + 91.14E0, + 96.40E0, + 97.19E0, + 114.26E0, + 120.25E0, + 127.08E0, + 133.55E0, + 133.61E0, + 158.67E0, + 172.74E0, + 171.31E0, + 202.14E0, + 220.55E0, + 221.05E0, + 221.39E0, + 250.99E0, + 268.99E0, + 271.80E0, + 271.97E0, + 321.31E0, + 321.69E0, + 330.14E0, + 333.03E0, + 333.47E0, + 340.77E0, + 345.65E0, + 373.11E0, + 373.79E0, + 411.82E0, + 419.51E0, + 421.59E0, + 422.02E0, + 422.47E0, + 422.61E0, + 441.75E0, + 447.41E0, + 448.7E0 , + 472.89E0, + 476.69E0, + 522.47E0, + 522.62E0, + 524.43E0, + 546.75E0, + 549.53E0, + 575.29E0, + 576.00E0, + 625.55E0, + 20.15E0, + 28.78E0, + 29.57E0, + 37.41E0, + 39.12E0, + 50.24E0, + 61.38E0, + 66.25E0, + 73.42E0, + 95.52E0, + 107.32E0, + 122.04E0, + 134.03E0, + 163.19E0, + 163.48E0, + 175.70E0, + 179.86E0, + 211.27E0, + 217.78E0, + 219.14E0, + 262.52E0, + 268.01E0, + 268.62E0, + 336.25E0, + 337.23E0, + 339.33E0, + 427.38E0, + 428.58E0, + 432.68E0, + 528.99E0, + 531.08E0, + 628.34E0, + 253.24E0, + 273.13E0, + 273.66E0, + 282.10E0, + 346.62E0, + 347.19E0, + 348.78E0, + 351.18E0, + 450.10E0, + 450.35E0, + 451.92E0, + 455.56E0, + 552.22E0, + 553.56E0, + 555.74E0, + 652.59E0, + 656.20E0, + 14.13E0, + 20.41E0, + 31.30E0, + 33.84E0, + 39.70E0, + 48.83E0, + 54.50E0, + 60.41E0, + 72.77E0, + 75.25E0, + 86.84E0, + 94.88E0, + 96.40E0, + 117.37E0, + 139.08E0, + 147.73E0, + 158.63E0, + 161.84E0, + 192.11E0, + 206.76E0, + 209.07E0, + 213.32E0, + 226.44E0, + 237.12E0, + 330.90E0, + 358.72E0, + 370.77E0, + 372.72E0, + 396.24E0, + 416.59E0, + 484.02E0, + 495.47E0, + 514.78E0, + 515.65E0, + 519.47E0, + 544.47E0, + 560.11E0, + 620.77E0, + 18.97E0, + 28.93E0, + 33.91E0, + 40.03E0, + 44.66E0, + 49.87E0, + 55.16E0, + 60.90E0, + 72.08E0, + 85.15E0, + 97.06E0, + 119.63E0, + 133.27E0, + 143.84E0, + 161.91E0, + 180.67E0, + 198.44E0, + 226.86E0, + 229.65E0, + 258.27E0, + 273.77E0, + 339.15E0, + 350.13E0, + 362.75E0, + 371.03E0, + 393.32E0, + 448.53E0, + 473.78E0, + 511.12E0, + 524.70E0, + 548.75E0, + 551.64E0, + 574.02E0, + 623.86E0, + 21.46E0, + 24.33E0, + 33.43E0, + 39.22E0, + 44.18E0, + 55.02E0, + 94.33E0, + 96.44E0, + 118.82E0, + 128.48E0, + 141.94E0, + 156.92E0, + 171.65E0, + 190.00E0, + 223.26E0, + 223.88E0, + 231.50E0, + 265.05E0, + 269.44E0, + 271.78E0, + 273.46E0, + 334.61E0, + 339.79E0, + 349.52E0, + 358.18E0, + 377.98E0, + 394.77E0, + 429.66E0, + 468.22E0, + 487.27E0, + 519.54E0, + 523.03E0, + 612.99E0, + 638.59E0, + 641.36E0, + 622.05E0, + 631.50E0, + 663.97E0, + 646.9E0 , + 748.29E0, + 749.21E0, + 750.14E0, + 647.04E0, + 646.89E0, + 746.9E0 , + 748.43E0, + 747.35E0, + 749.27E0, + 647.61E0, + 747.78E0, + 750.51E0, + 851.37E0, + 845.97E0, + 847.54E0, + 849.93E0, + 851.61E0, + 849.75E0, + 850.98E0, + 848.23E0 +}; + + +int +hahn1_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double b[7]; + size_t i; + + for (i = 0; i < 7; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 236; i++) + { + double x = hahn1_F0[i]; + double y = ((b[0] + x* (b[1] + x * (b[2] + x * b[3]))) + / (1 + x*(b[4] + x *(b[5] + x*b[6])))); + gsl_vector_set (f, i, hahn1_F1[i] - y); + } + + return GSL_SUCCESS; +} + +int +hahn1_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double b[7]; + size_t i; + + for (i = 0; i < 7; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 236; i++) + { + double x = hahn1_F0[i]; + double u = (b[0] + x*(b[1] + x*(b[2] + x * b[3]))); + double v = (1 + x*(b[4] + x*(b[5] + x*b[6]))); + gsl_matrix_set (df, i, 0, -1/v); + gsl_matrix_set (df, i, 1, -x/v); + gsl_matrix_set (df, i, 2, -x*x/v); + gsl_matrix_set (df, i, 3, -x*x*x/v); + gsl_matrix_set (df, i, 4, x*u/(v*v)); + gsl_matrix_set (df, i, 5, x*x*u/(v*v)); + gsl_matrix_set (df, i, 6, x*x*x*u/(v*v)); + } + + return GSL_SUCCESS; +} + +int +hahn1_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + hahn1_f (x, params, f); + hahn1_df (x, params, df); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multifit/test_kirby2.c b/software/gsl-1.15/multifit/test_kirby2.c new file mode 100644 index 000000000..623a488ee --- /dev/null +++ b/software/gsl-1.15/multifit/test_kirby2.c @@ -0,0 +1,392 @@ +const size_t kirby2_N = 151; +const size_t kirby2_P = 5; + +/* double kirby2_x0[5] = { 2, -0.1, 0.003, -0.001, 0.00001 }; */ + +double kirby2_x0[5] = { 1.5, -0.15, 0.0025, -0.0015, 0.00002 }; + +double kirby2_x[5] = { + 1.6745063063E+00, + -1.3927397867E-01, + 2.5961181191E-03, + -1.7241811870E-03, + 2.1664802578E-05 +}; + +double kirby2_sumsq = 3.9050739624E+00; + +double kirby2_sigma[5] = { + 8.7989634338E-02, + 4.1182041386E-03, + 4.1856520458E-05, + 5.8931897355E-05, + 2.0129761919E-07 +}; + +double kirby2_F1[151] = { + 0.0082E0, + 0.0112E0, + 0.0149E0, + 0.0198E0, + 0.0248E0, + 0.0324E0, + 0.0420E0, + 0.0549E0, + 0.0719E0, + 0.0963E0, + 0.1291E0, + 0.1710E0, + 0.2314E0, + 0.3227E0, + 0.4809E0, + 0.7084E0, + 1.0220E0, + 1.4580E0, + 1.9520E0, + 2.5410E0, + 3.2230E0, + 3.9990E0, + 4.8520E0, + 5.7320E0, + 6.7270E0, + 7.8350E0, + 9.0250E0, + 10.2670E0, + 11.5780E0, + 12.9440E0, + 14.3770E0, + 15.8560E0, + 17.3310E0, + 18.8850E0, + 20.5750E0, + 22.3200E0, + 22.3030E0, + 23.4600E0, + 24.0600E0, + 25.2720E0, + 25.8530E0, + 27.1100E0, + 27.6580E0, + 28.9240E0, + 29.5110E0, + 30.7100E0, + 31.3500E0, + 32.5200E0, + 33.2300E0, + 34.3300E0, + 35.0600E0, + 36.1700E0, + 36.8400E0, + 38.0100E0, + 38.6700E0, + 39.8700E0, + 40.0300E0, + 40.5000E0, + 41.3700E0, + 41.6700E0, + 42.3100E0, + 42.7300E0, + 43.4600E0, + 44.1400E0, + 44.5500E0, + 45.2200E0, + 45.9200E0, + 46.3000E0, + 47.0000E0, + 47.6800E0, + 48.0600E0, + 48.7400E0, + 49.4100E0, + 49.7600E0, + 50.4300E0, + 51.1100E0, + 51.5000E0, + 52.1200E0, + 52.7600E0, + 53.1800E0, + 53.7800E0, + 54.4600E0, + 54.8300E0, + 55.4000E0, + 56.4300E0, + 57.0300E0, + 58.0000E0, + 58.6100E0, + 59.5800E0, + 60.1100E0, + 61.1000E0, + 61.6500E0, + 62.5900E0, + 63.1200E0, + 64.0300E0, + 64.6200E0, + 65.4900E0, + 66.0300E0, + 66.8900E0, + 67.4200E0, + 68.2300E0, + 68.7700E0, + 69.5900E0, + 70.1100E0, + 70.8600E0, + 71.4300E0, + 72.1600E0, + 72.7000E0, + 73.4000E0, + 73.9300E0, + 74.6000E0, + 75.1600E0, + 75.8200E0, + 76.3400E0, + 76.9800E0, + 77.4800E0, + 78.0800E0, + 78.6000E0, + 79.1700E0, + 79.6200E0, + 79.8800E0, + 80.1900E0, + 80.6600E0, + 81.2200E0, + 81.6600E0, + 82.1600E0, + 82.5900E0, + 83.1400E0, + 83.5000E0, + 84.0000E0, + 84.4000E0, + 84.8900E0, + 85.2600E0, + 85.7400E0, + 86.0700E0, + 86.5400E0, + 86.8900E0, + 87.3200E0, + 87.6500E0, + 88.1000E0, + 88.4300E0, + 88.8300E0, + 89.1200E0, + 89.5400E0, + 89.8500E0, + 90.2500E0, + 90.5500E0, + 90.9300E0, + 91.2000E0, + 91.5500E0, + 92.2000E0 +}; + + +double kirby2_F0[151] = { + 9.65E0, + 10.74E0, + 11.81E0, + 12.88E0, + 14.06E0, + 15.28E0, + 16.63E0, + 18.19E0, + 19.88E0, + 21.84E0, + 24.00E0, + 26.25E0, + 28.86E0, + 31.85E0, + 35.79E0, + 40.18E0, + 44.74E0, + 49.53E0, + 53.94E0, + 58.29E0, + 62.63E0, + 67.03E0, + 71.25E0, + 75.22E0, + 79.33E0, + 83.56E0, + 87.75E0, + 91.93E0, + 96.10E0, + 100.28E0, + 104.46E0, + 108.66E0, + 112.71E0, + 116.88E0, + 121.33E0, + 125.79E0, + 125.79E0, + 128.74E0, + 130.27E0, + 133.33E0, + 134.79E0, + 137.93E0, + 139.33E0, + 142.46E0, + 143.90E0, + 146.91E0, + 148.51E0, + 151.41E0, + 153.17E0, + 155.97E0, + 157.76E0, + 160.56E0, + 162.30E0, + 165.21E0, + 166.90E0, + 169.92E0, + 170.32E0, + 171.54E0, + 173.79E0, + 174.57E0, + 176.25E0, + 177.34E0, + 179.19E0, + 181.02E0, + 182.08E0, + 183.88E0, + 185.75E0, + 186.80E0, + 188.63E0, + 190.45E0, + 191.48E0, + 193.35E0, + 195.22E0, + 196.23E0, + 198.05E0, + 199.97E0, + 201.06E0, + 202.83E0, + 204.69E0, + 205.86E0, + 207.58E0, + 209.50E0, + 210.65E0, + 212.33E0, + 215.43E0, + 217.16E0, + 220.21E0, + 221.98E0, + 225.06E0, + 226.79E0, + 229.92E0, + 231.69E0, + 234.77E0, + 236.60E0, + 239.63E0, + 241.50E0, + 244.48E0, + 246.40E0, + 249.35E0, + 251.32E0, + 254.22E0, + 256.24E0, + 259.11E0, + 261.18E0, + 264.02E0, + 266.13E0, + 268.94E0, + 271.09E0, + 273.87E0, + 276.08E0, + 278.83E0, + 281.08E0, + 283.81E0, + 286.11E0, + 288.81E0, + 291.08E0, + 293.75E0, + 295.99E0, + 298.64E0, + 300.84E0, + 302.02E0, + 303.48E0, + 305.65E0, + 308.27E0, + 310.41E0, + 313.01E0, + 315.12E0, + 317.71E0, + 319.79E0, + 322.36E0, + 324.42E0, + 326.98E0, + 329.01E0, + 331.56E0, + 333.56E0, + 336.10E0, + 338.08E0, + 340.60E0, + 342.57E0, + 345.08E0, + 347.02E0, + 349.52E0, + 351.44E0, + 353.93E0, + 355.83E0, + 358.32E0, + 360.20E0, + 362.67E0, + 364.53E0, + 367.00E0, + 371.30E0 +}; + + +int +kirby2_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double b[5]; + size_t i; + + for (i = 0; i < 5; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 151; i++) + { + double x = kirby2_F0[i]; + double y = ((b[0] + x* (b[1] + x * b[2])) + / (1 + x*(b[3] + x *b[4]))); + gsl_vector_set (f, i, kirby2_F1[i] - y); + } + + return GSL_SUCCESS; +} + +int +kirby2_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double b[5]; + size_t i; + + for (i = 0; i < 5; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 151; i++) + { + double x = kirby2_F0[i]; + double u = (b[0] + x*(b[1] + x*b[2])); + double v = (1 + x*(b[3] + x*b[4])); + gsl_matrix_set (df, i, 0, -1/v); + gsl_matrix_set (df, i, 1, -x/v); + gsl_matrix_set (df, i, 2, -x*x/v); + gsl_matrix_set (df, i, 3, x*u/(v*v)); + gsl_matrix_set (df, i, 4, x*x*u/(v*v)); + } + + return GSL_SUCCESS; +} + +int +kirby2_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + kirby2_f (x, params, f); + kirby2_df (x, params, df); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multifit/test_longley.c b/software/gsl-1.15/multifit/test_longley.c new file mode 100644 index 000000000..057259c65 --- /dev/null +++ b/software/gsl-1.15/multifit/test_longley.c @@ -0,0 +1,178 @@ +size_t longley_n = 16; +size_t longley_p = 7; + +double longley_x [] = { + 1, 83.0, 234289, 2356, 1590, 107608, 1947, + 1, 88.5, 259426, 2325, 1456, 108632, 1948, + 1, 88.2, 258054, 3682, 1616, 109773, 1949, + 1, 89.5, 284599, 3351, 1650, 110929, 1950, + 1, 96.2, 328975, 2099, 3099, 112075, 1951, + 1, 98.1, 346999, 1932, 3594, 113270, 1952, + 1, 99.0, 365385, 1870, 3547, 115094, 1953, + 1, 100.0, 363112, 3578, 3350, 116219, 1954, + 1, 101.2, 397469, 2904, 3048, 117388, 1955, + 1, 104.6, 419180, 2822, 2857, 118734, 1956, + 1, 108.4, 442769, 2936, 2798, 120445, 1957, + 1, 110.8, 444546, 4681, 2637, 121950, 1958, + 1, 112.6, 482704, 3813, 2552, 123366, 1959, + 1, 114.2, 502601, 3931, 2514, 125368, 1960, + 1, 115.7, 518173, 4806, 2572, 127852, 1961, + 1, 116.9, 554894, 4007, 2827, 130081, 1962 } ; + +double longley_y[] = {60323, 61122, 60171, 61187, 63221, 63639, 64989, 63761, + 66019, 67857, 68169, 66513, 68655, 69564, 69331, 70551}; + + +void +test_longley () +{ + size_t i, j; + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (longley_n, longley_p); + + gsl_matrix_view X = gsl_matrix_view_array (longley_x, longley_n, longley_p); + gsl_vector_view y = gsl_vector_view_array (longley_y, longley_n); + gsl_vector * c = gsl_vector_alloc (longley_p); + gsl_vector * r = gsl_vector_alloc (longley_n); + gsl_matrix * cov = gsl_matrix_alloc (longley_p, longley_p); + gsl_vector_view diag; + + double chisq; + + double expected_c[7] = { -3482258.63459582, + 15.0618722713733, + -0.358191792925910E-01, + -2.02022980381683, + -1.03322686717359, + -0.511041056535807E-01, + 1829.15146461355 }; + + double expected_sd[7] = { 890420.383607373, + 84.9149257747669, + 0.334910077722432E-01, + 0.488399681651699, + 0.214274163161675, + 0.226073200069370, + 455.478499142212 } ; + + double expected_chisq = 836424.055505915; + + gsl_multifit_linear (&X.matrix, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-10, "longley gsl_fit_multilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-10, "longley gsl_fit_multilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-10, "longley gsl_fit_multilinear c2") ; + gsl_test_rel (gsl_vector_get(c,3), expected_c[3], 1e-10, "longley gsl_fit_multilinear c3") ; + gsl_test_rel (gsl_vector_get(c,4), expected_c[4], 1e-10, "longley gsl_fit_multilinear c4") ; + gsl_test_rel (gsl_vector_get(c,5), expected_c[5], 1e-10, "longley gsl_fit_multilinear c5") ; + gsl_test_rel (gsl_vector_get(c,6), expected_c[6], 1e-10, "longley gsl_fit_multilinear c6") ; + + diag = gsl_matrix_diagonal (cov); + + gsl_test_rel (gsl_vector_get(&diag.vector,0), pow(expected_sd[0],2.0), 1e-10, "longley gsl_fit_multilinear cov00") ; + gsl_test_rel (gsl_vector_get(&diag.vector,1), pow(expected_sd[1],2.0), 1e-10, "longley gsl_fit_multilinear cov11") ; + gsl_test_rel (gsl_vector_get(&diag.vector,2), pow(expected_sd[2],2.0), 1e-10, "longley gsl_fit_multilinear cov22") ; + gsl_test_rel (gsl_vector_get(&diag.vector,3), pow(expected_sd[3],2.0), 1e-10, "longley gsl_fit_multilinear cov33") ; + gsl_test_rel (gsl_vector_get(&diag.vector,4), pow(expected_sd[4],2.0), 1e-10, "longley gsl_fit_multilinear cov44") ; + gsl_test_rel (gsl_vector_get(&diag.vector,5), pow(expected_sd[5],2.0), 1e-10, "longley gsl_fit_multilinear cov55") ; + gsl_test_rel (gsl_vector_get(&diag.vector,6), pow(expected_sd[6],2.0), 1e-10, "longley gsl_fit_multilinear cov66") ; + + gsl_test_rel (chisq, expected_chisq, 1e-10, "longley gsl_fit_multilinear chisq") ; + + gsl_multifit_linear_residuals(&X.matrix, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-10, "longley gsl_fit_multilinear residuals") ; + + gsl_vector_free(c); + gsl_vector_free(r); + gsl_matrix_free(cov); + gsl_multifit_linear_free (work); + } + + + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (longley_n, longley_p); + + gsl_matrix_view X = gsl_matrix_view_array (longley_x, longley_n, longley_p); + gsl_vector_view y = gsl_vector_view_array (longley_y, longley_n); + gsl_vector * w = gsl_vector_alloc (longley_n); + gsl_vector * c = gsl_vector_alloc (longley_p); + gsl_vector * r = gsl_vector_alloc (longley_n); + gsl_matrix * cov = gsl_matrix_alloc (longley_p, longley_p); + + double chisq; + + double expected_c[7] = { -3482258.63459582, + 15.0618722713733, + -0.358191792925910E-01, + -2.02022980381683, + -1.03322686717359, + -0.511041056535807E-01, + 1829.15146461355 }; + + double expected_cov[7][7] = { { 8531122.56783558, +-166.727799925578, 0.261873708176346, 3.91188317230983, +1.1285582054705, -0.889550869422687, -4362.58709870581}, + +{-166.727799925578, 0.0775861253030891, -1.98725210399982e-05, +-0.000247667096727256, -6.82911920718824e-05, 0.000136160797527761, +0.0775255245956248}, + +{0.261873708176346, -1.98725210399982e-05, 1.20690316701888e-08, +1.66429546772984e-07, 3.61843600487847e-08, -6.78805814483582e-08, +-0.00013158719037715}, + +{3.91188317230983, -0.000247667096727256, 1.66429546772984e-07, +2.56665052544717e-06, 6.96541409215597e-07, -9.00858307771567e-07, +-0.00197260370663974}, + +{1.1285582054705, -6.82911920718824e-05, 3.61843600487847e-08, +6.96541409215597e-07, 4.94032602583969e-07, -9.8469143760973e-08, +-0.000576921112208274}, + +{-0.889550869422687, 0.000136160797527761, -6.78805814483582e-08, +-9.00858307771567e-07, -9.8469143760973e-08, 5.49938542664952e-07, +0.000430074434198215}, + +{-4362.58709870581, 0.0775255245956248, -0.00013158719037715, +-0.00197260370663974, -0.000576921112208274, 0.000430074434198215, +2.23229587481535 }} ; + + double expected_chisq = 836424.055505915; + + gsl_vector_set_all (w, 1.0); + + gsl_multifit_wlinear (&X.matrix, w, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-10, "longley gsl_fit_wmultilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-10, "longley gsl_fit_wmultilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-10, "longley gsl_fit_wmultilinear c2") ; + gsl_test_rel (gsl_vector_get(c,3), expected_c[3], 1e-10, "longley gsl_fit_wmultilinear c3") ; + gsl_test_rel (gsl_vector_get(c,4), expected_c[4], 1e-10, "longley gsl_fit_wmultilinear c4") ; + gsl_test_rel (gsl_vector_get(c,5), expected_c[5], 1e-10, "longley gsl_fit_wmultilinear c5") ; + gsl_test_rel (gsl_vector_get(c,6), expected_c[6], 1e-10, "longley gsl_fit_wmultilinear c6") ; + + for (i = 0; i < longley_p; i++) + { + for (j = 0; j < longley_p; j++) + { + gsl_test_rel (gsl_matrix_get(cov,i,j), expected_cov[i][j], 1e-7, + "longley gsl_fit_wmultilinear cov(%d,%d)", i, j) ; + } + } + + gsl_test_rel (chisq, expected_chisq, 1e-10, "longley gsl_fit_wmultilinear chisq") ; + + gsl_multifit_linear_residuals(&X.matrix, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-10, "longley gsl_fit_wmultilinear residuals") ; + + gsl_vector_free(w); + gsl_vector_free(c); + gsl_vector_free(r); + gsl_matrix_free(cov); + gsl_multifit_linear_free (work); + } +} diff --git a/software/gsl-1.15/multifit/test_nelson.c b/software/gsl-1.15/multifit/test_nelson.c new file mode 100644 index 000000000..19f594e26 --- /dev/null +++ b/software/gsl-1.15/multifit/test_nelson.c @@ -0,0 +1,217 @@ +const size_t nelson_N = 128; +const size_t nelson_P = 3; + +/* double nelson_x0[3] = { 2, 0.0001, -0.01}; */ + +double nelson_x0[3] = { 2.5 , 0.000000005, -0.01}; + +double nelson_x[3] = { + 2.5906836021E+00, + 5.6177717026E-09, + -5.7701013174E-02 +}; + +double nelson_sumsq = 3.7976833176E+00; + +double nelson_sigma[3] = { + 1.9149996413E-02, + 6.1124096540E-09, + 3.9572366543E-03 +}; + +double nelson_F[128][3] = { + { 15.00E0, 1E0, 180E0}, + { 17.00E0, 1E0, 180E0}, + { 15.50E0, 1E0, 180E0}, + { 16.50E0, 1E0, 180E0}, + { 15.50E0, 1E0, 225E0}, + { 15.00E0, 1E0, 225E0}, + { 16.00E0, 1E0, 225E0}, + { 14.50E0, 1E0, 225E0}, + { 15.00E0, 1E0, 250E0}, + { 14.50E0, 1E0, 250E0}, + { 12.50E0, 1E0, 250E0}, + { 11.00E0, 1E0, 250E0}, + { 14.00E0, 1E0, 275E0}, + { 13.00E0, 1E0, 275E0}, + { 14.00E0, 1E0, 275E0}, + { 11.50E0, 1E0, 275E0}, + { 14.00E0, 2E0, 180E0}, + { 16.00E0, 2E0, 180E0}, + { 13.00E0, 2E0, 180E0}, + { 13.50E0, 2E0, 180E0}, + { 13.00E0, 2E0, 225E0}, + { 13.50E0, 2E0, 225E0}, + { 12.50E0, 2E0, 225E0}, + { 12.50E0, 2E0, 225E0}, + { 12.50E0, 2E0, 250E0}, + { 12.00E0, 2E0, 250E0}, + { 11.50E0, 2E0, 250E0}, + { 12.00E0, 2E0, 250E0}, + { 13.00E0, 2E0, 275E0}, + { 11.50E0, 2E0, 275E0}, + { 13.00E0, 2E0, 275E0}, + { 12.50E0, 2E0, 275E0}, + { 13.50E0, 4E0, 180E0}, + { 17.50E0, 4E0, 180E0}, + { 17.50E0, 4E0, 180E0}, + { 13.50E0, 4E0, 180E0}, + { 12.50E0, 4E0, 225E0}, + { 12.50E0, 4E0, 225E0}, + { 15.00E0, 4E0, 225E0}, + { 13.00E0, 4E0, 225E0}, + { 12.00E0, 4E0, 250E0}, + { 13.00E0, 4E0, 250E0}, + { 12.00E0, 4E0, 250E0}, + { 13.50E0, 4E0, 250E0}, + { 10.00E0, 4E0, 275E0}, + { 11.50E0, 4E0, 275E0}, + { 11.00E0, 4E0, 275E0}, + { 9.50E0, 4E0, 275E0}, + { 15.00E0, 8E0, 180E0}, + { 15.00E0, 8E0, 180E0}, + { 15.50E0, 8E0, 180E0}, + { 16.00E0, 8E0, 180E0}, + { 13.00E0, 8E0, 225E0}, + { 10.50E0, 8E0, 225E0}, + { 13.50E0, 8E0, 225E0}, + { 14.00E0, 8E0, 225E0}, + { 12.50E0, 8E0, 250E0}, + { 12.00E0, 8E0, 250E0}, + { 11.50E0, 8E0, 250E0}, + { 11.50E0, 8E0, 250E0}, + { 6.50E0, 8E0, 275E0}, + { 5.50E0, 8E0, 275E0}, + { 6.00E0, 8E0, 275E0}, + { 6.00E0, 8E0, 275E0}, + { 18.50E0, 16E0, 180E0}, + { 17.00E0, 16E0, 180E0}, + { 15.30E0, 16E0, 180E0}, + { 16.00E0, 16E0, 180E0}, + { 13.00E0, 16E0, 225E0}, + { 14.00E0, 16E0, 225E0}, + { 12.50E0, 16E0, 225E0}, + { 11.00E0, 16E0, 225E0}, + { 12.00E0, 16E0, 250E0}, + { 12.00E0, 16E0, 250E0}, + { 11.50E0, 16E0, 250E0}, + { 12.00E0, 16E0, 250E0}, + { 6.00E0, 16E0, 275E0}, + { 6.00E0, 16E0, 275E0}, + { 5.00E0, 16E0, 275E0}, + { 5.50E0, 16E0, 275E0}, + { 12.50E0, 32E0, 180E0}, + { 13.00E0, 32E0, 180E0}, + { 16.00E0, 32E0, 180E0}, + { 12.00E0, 32E0, 180E0}, + { 11.00E0, 32E0, 225E0}, + { 9.50E0, 32E0, 225E0}, + { 11.00E0, 32E0, 225E0}, + { 11.00E0, 32E0, 225E0}, + { 11.00E0, 32E0, 250E0}, + { 10.00E0, 32E0, 250E0}, + { 10.50E0, 32E0, 250E0}, + { 10.50E0, 32E0, 250E0}, + { 2.70E0, 32E0, 275E0}, + { 2.70E0, 32E0, 275E0}, + { 2.50E0, 32E0, 275E0}, + { 2.40E0, 32E0, 275E0}, + { 13.00E0, 48E0, 180E0}, + { 13.50E0, 48E0, 180E0}, + { 16.50E0, 48E0, 180E0}, + { 13.60E0, 48E0, 180E0}, + { 11.50E0, 48E0, 225E0}, + { 10.50E0, 48E0, 225E0}, + { 13.50E0, 48E0, 225E0}, + { 12.00E0, 48E0, 225E0}, + { 7.00E0, 48E0, 250E0}, + { 6.90E0, 48E0, 250E0}, + { 8.80E0, 48E0, 250E0}, + { 7.90E0, 48E0, 250E0}, + { 1.20E0, 48E0, 275E0}, + { 1.50E0, 48E0, 275E0}, + { 1.00E0, 48E0, 275E0}, + { 1.50E0, 48E0, 275E0}, + { 13.00E0, 64E0, 180E0}, + { 12.50E0, 64E0, 180E0}, + { 16.50E0, 64E0, 180E0}, + { 16.00E0, 64E0, 180E0}, + { 11.00E0, 64E0, 225E0}, + { 11.50E0, 64E0, 225E0}, + { 10.50E0, 64E0, 225E0}, + { 10.00E0, 64E0, 225E0}, + { 7.27E0, 64E0, 250E0}, + { 7.50E0, 64E0, 250E0}, + { 6.70E0, 64E0, 250E0}, + { 7.60E0, 64E0, 250E0}, + { 1.50E0, 64E0, 275E0}, + { 1.00E0, 64E0, 275E0}, + { 1.20E0, 64E0, 275E0}, + { 1.20E0, 64E0, 275E0} +}; + + +int +nelson_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double b[3]; + size_t i; + + for (i = 0; i < 3; i++) + { + b[i] = gsl_vector_get(x, i); + } + + + + for (i = 0; i < 128; i++) + { + double x1 = nelson_F[i][1]; + double x2 = nelson_F[i][2]; + + double y = b[0] - b[1] * x1 * (b[2]*x2 < -100) ? 0.0 : exp(-b[2] * x2); + + gsl_vector_set (f, i, log(nelson_F[i][0]) - y); + } + + return GSL_SUCCESS; +} + +int +nelson_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double b[3]; + size_t i; + + for (i = 0; i < 3; i++) + { + b[i] = gsl_vector_get(x, i); + } + + for (i = 0; i < 128; i++) + { + double x1 = nelson_F[i][1]; + double x2 = nelson_F[i][2]; + + gsl_matrix_set (df, i, 0, -1.0); + gsl_matrix_set (df, i, 1, x1 * exp(-b[2] * x2)); + gsl_matrix_set (df, i, 2, -b[1] * x1 * x2 * exp(-b[2] * x2)); + } + + return GSL_SUCCESS; +} + +int +nelson_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + nelson_f (x, params, f); + nelson_df (x, params, df); + + return GSL_SUCCESS; +} + + + + + diff --git a/software/gsl-1.15/multifit/test_pontius.c b/software/gsl-1.15/multifit/test_pontius.c new file mode 100644 index 000000000..3b3d0960d --- /dev/null +++ b/software/gsl-1.15/multifit/test_pontius.c @@ -0,0 +1,143 @@ +size_t pontius_n = 40; +size_t pontius_p = 3; + +double pontius_x[] = { 150000, 300000, 450000, 600000, 750000, 900000, +1050000, 1200000, 1350000, 1500000, 1650000, 1800000, 1950000, 2100000, +2250000, 2400000, 2550000, 2700000, 2850000, 3000000, 150000, 300000, +450000, 600000, 750000, 900000, 1050000, 1200000, 1350000, 1500000, +1650000, 1800000, 1950000, 2100000, 2250000, 2400000, 2550000, 2700000, +2850000, 3000000 }; + +double pontius_y[] = { .11019, .21956, .32949, .43899, .54803, .65694, +.76562, .87487, .98292, 1.09146, 1.20001, 1.30822, 1.41599, 1.52399, +1.63194, 1.73947, 1.84646, 1.95392, 2.06128, 2.16844, .11052, .22018, +.32939, .43886, .54798, .65739, .76596, .87474, .98300, 1.09150, +1.20004, 1.30818, 1.41613, 1.52408, 1.63159, 1.73965, 1.84696, +1.95445, 2.06177, 2.16829 }; + +void +test_pontius () +{ + size_t i, j; + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (pontius_n, pontius_p); + + gsl_matrix * X = gsl_matrix_alloc (pontius_n, pontius_p); + gsl_vector_view y = gsl_vector_view_array (pontius_y, pontius_n); + gsl_vector * c = gsl_vector_alloc (pontius_p); + gsl_vector * r = gsl_vector_alloc (pontius_n); + gsl_matrix * cov = gsl_matrix_alloc (pontius_p, pontius_p); + gsl_vector_view diag; + + double chisq; + + double expected_c[3] = { 0.673565789473684E-03, + 0.732059160401003E-06, + -0.316081871345029E-14}; + + double expected_sd[3] = { 0.107938612033077E-03, + 0.157817399981659E-09, + 0.486652849992036E-16 }; + + double expected_chisq = 0.155761768796992E-05; + + for (i = 0 ; i < pontius_n; i++) + { + for (j = 0; j < pontius_p; j++) + { + gsl_matrix_set(X, i, j, pow(pontius_x[i], j)); + } + } + + gsl_multifit_linear (X, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-10, "pontius gsl_fit_multilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-10, "pontius gsl_fit_multilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-10, "pontius gsl_fit_multilinear c2") ; + + diag = gsl_matrix_diagonal (cov); + + gsl_test_rel (gsl_vector_get(&diag.vector,0), pow(expected_sd[0],2.0), 1e-10, "pontius gsl_fit_multilinear cov00") ; + gsl_test_rel (gsl_vector_get(&diag.vector,1), pow(expected_sd[1],2.0), 1e-10, "pontius gsl_fit_multilinear cov11") ; + gsl_test_rel (gsl_vector_get(&diag.vector,2), pow(expected_sd[2],2.0), 1e-10, "pontius gsl_fit_multilinear cov22") ; + + gsl_test_rel (chisq, expected_chisq, 1e-10, "pontius gsl_fit_multilinear chisq") ; + + gsl_multifit_linear_residuals(X, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-10, "pontius gsl_fit_multilinear residuals") ; + + gsl_vector_free(c); + gsl_vector_free(r); + gsl_matrix_free(cov); + gsl_matrix_free(X); + gsl_multifit_linear_free (work); + } + + + { + gsl_multifit_linear_workspace * work = + gsl_multifit_linear_alloc (pontius_n, pontius_p); + + gsl_matrix * X = gsl_matrix_alloc (pontius_n, pontius_p); + gsl_vector_view y = gsl_vector_view_array (pontius_y, pontius_n); + gsl_vector * w = gsl_vector_alloc (pontius_n); + gsl_vector * c = gsl_vector_alloc (pontius_p); + gsl_vector * r = gsl_vector_alloc (pontius_n); + gsl_matrix * cov = gsl_matrix_alloc (pontius_p, pontius_p); + + double chisq; + + double expected_c[3] = { 0.673565789473684E-03, + 0.732059160401003E-06, + -0.316081871345029E-14}; + + double expected_chisq = 0.155761768796992E-05; + + double expected_cov[3][3] ={ + {2.76754385964916e-01 , -3.59649122807024e-07, 9.74658869395731e-14}, + {-3.59649122807024e-07, 5.91630591630603e-13, -1.77210703526497e-19}, + {9.74658869395731e-14, -1.77210703526497e-19, 5.62573661988878e-26} }; + + + for (i = 0 ; i < pontius_n; i++) + { + for (j = 0; j < pontius_p; j++) + { + gsl_matrix_set(X, i, j, pow(pontius_x[i], j)); + } + } + + gsl_vector_set_all (w, 1.0); + + gsl_multifit_wlinear (X, w, &y.vector, c, cov, &chisq, work); + + gsl_test_rel (gsl_vector_get(c,0), expected_c[0], 1e-10, "pontius gsl_fit_multilinear c0") ; + gsl_test_rel (gsl_vector_get(c,1), expected_c[1], 1e-10, "pontius gsl_fit_multilinear c1") ; + gsl_test_rel (gsl_vector_get(c,2), expected_c[2], 1e-10, "pontius gsl_fit_multilinear c2") ; + + + for (i = 0; i < pontius_p; i++) + { + for (j = 0; j < pontius_p; j++) + { + gsl_test_rel (gsl_matrix_get(cov,i,j), expected_cov[i][j], 1e-10, + "pontius gsl_fit_wmultilinear cov(%d,%d)", i, j) ; + } + } + + gsl_test_rel (chisq, expected_chisq, 1e-10, "pontius gsl_fit_wmultilinear chisq") ; + + gsl_multifit_linear_residuals(X, &y.vector, c, r); + gsl_blas_ddot(r, r, &chisq); + gsl_test_rel (chisq, expected_chisq, 1e-10, "pontius gsl_fit_wmultilinear residuals") ; + + gsl_vector_free(w); + gsl_vector_free(c); + gsl_vector_free(r); + gsl_matrix_free(cov); + gsl_matrix_free(X); + gsl_multifit_linear_free (work); + } +} diff --git a/software/gsl-1.15/multifit/work.c b/software/gsl-1.15/multifit/work.c new file mode 100644 index 000000000..5ff95fd93 --- /dev/null +++ b/software/gsl-1.15/multifit/work.c @@ -0,0 +1,134 @@ +/* multifit/work.c + * + * Copyright (C) 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +gsl_multifit_linear_workspace * +gsl_multifit_linear_alloc (size_t n, size_t p) +{ + gsl_multifit_linear_workspace *w; + + w = (gsl_multifit_linear_workspace *) + malloc (sizeof (gsl_multifit_linear_workspace)); + + if (w == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multifit_linear struct", + GSL_ENOMEM, 0); + } + + w->n = n; /* number of observations */ + w->p = p; /* number of parameters */ + + w->A = gsl_matrix_alloc (n, p); + + if (w->A == 0) + { + free (w); + GSL_ERROR_VAL ("failed to allocate space for A", GSL_ENOMEM, 0); + } + + w->Q = gsl_matrix_alloc (p, p); + + if (w->Q == 0) + { + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for Q", GSL_ENOMEM, 0); + } + + w->QSI = gsl_matrix_alloc (p, p); + + if (w->QSI == 0) + { + gsl_matrix_free (w->Q); + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for QSI", GSL_ENOMEM, 0); + } + + w->S = gsl_vector_alloc (p); + + if (w->S == 0) + { + gsl_matrix_free (w->QSI); + gsl_matrix_free (w->Q); + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for S", GSL_ENOMEM, 0); + } + + w->t = gsl_vector_alloc (n); + + if (w->t == 0) + { + gsl_vector_free (w->S); + gsl_matrix_free (w->QSI); + gsl_matrix_free (w->Q); + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for t", GSL_ENOMEM, 0); + } + + w->xt = gsl_vector_calloc (p); + + if (w->xt == 0) + { + gsl_vector_free (w->t); + gsl_vector_free (w->S); + gsl_matrix_free (w->QSI); + gsl_matrix_free (w->Q); + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for xt", GSL_ENOMEM, 0); + } + + w->D = gsl_vector_calloc (p); + + if (w->D == 0) + { + gsl_vector_free (w->D); + gsl_vector_free (w->t); + gsl_vector_free (w->S); + gsl_matrix_free (w->QSI); + gsl_matrix_free (w->Q); + gsl_matrix_free (w->A); + free (w); + GSL_ERROR_VAL ("failed to allocate space for xt", GSL_ENOMEM, 0); + } + + return w; +} + +void +gsl_multifit_linear_free (gsl_multifit_linear_workspace * work) +{ + RETURN_IF_NULL (work); + gsl_matrix_free (work->A); + gsl_matrix_free (work->Q); + gsl_matrix_free (work->QSI); + gsl_vector_free (work->S); + gsl_vector_free (work->t); + gsl_vector_free (work->xt); + gsl_vector_free (work->D); + free (work); +} + diff --git a/software/gsl-1.15/multimin/.deps/conjugate_fr.Plo b/software/gsl-1.15/multimin/.deps/conjugate_fr.Plo new file mode 100644 index 000000000..a09a86d50 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/conjugate_fr.Plo @@ -0,0 +1,263 @@ +conjugate_fr.lo: conjugate_fr.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h directional_minimize.c + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +directional_minimize.c: diff --git a/software/gsl-1.15/multimin/.deps/conjugate_pr.Plo b/software/gsl-1.15/multimin/.deps/conjugate_pr.Plo new file mode 100644 index 000000000..e66edf8e9 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/conjugate_pr.Plo @@ -0,0 +1,263 @@ +conjugate_pr.lo: conjugate_pr.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h directional_minimize.c + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +directional_minimize.c: diff --git a/software/gsl-1.15/multimin/.deps/convergence.Plo b/software/gsl-1.15/multimin/.deps/convergence.Plo new file mode 100644 index 000000000..8cad0de55 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/convergence.Plo @@ -0,0 +1,261 @@ +convergence.lo: convergence.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/multimin/.deps/diff.Plo b/software/gsl-1.15/multimin/.deps/diff.Plo new file mode 100644 index 000000000..450f3320d --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/diff.Plo @@ -0,0 +1,250 @@ +diff.lo: diff.c ../config.h ../gsl/gsl_multimin.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: diff --git a/software/gsl-1.15/multimin/.deps/fdfminimizer.Plo b/software/gsl-1.15/multimin/.deps/fdfminimizer.Plo new file mode 100644 index 000000000..abe84bf9e --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/fdfminimizer.Plo @@ -0,0 +1,252 @@ +fdfminimizer.lo: fdfminimizer.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: diff --git a/software/gsl-1.15/multimin/.deps/fminimizer.Plo b/software/gsl-1.15/multimin/.deps/fminimizer.Plo new file mode 100644 index 000000000..930087775 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/fminimizer.Plo @@ -0,0 +1,252 @@ +fminimizer.lo: fminimizer.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: diff --git a/software/gsl-1.15/multimin/.deps/simplex.Plo b/software/gsl-1.15/multimin/.deps/simplex.Plo new file mode 100644 index 000000000..8bf7a2dab --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/simplex.Plo @@ -0,0 +1,261 @@ +simplex.lo: simplex.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_multimin.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_min.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_multimin.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_min.h: diff --git a/software/gsl-1.15/multimin/.deps/simplex2.Plo b/software/gsl-1.15/multimin/.deps/simplex2.Plo new file mode 100644 index 000000000..066e7d073 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/simplex2.Plo @@ -0,0 +1,261 @@ +simplex2.lo: simplex2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_multimin.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_min.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_multimin.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_min.h: diff --git a/software/gsl-1.15/multimin/.deps/steepest_descent.Plo b/software/gsl-1.15/multimin/.deps/steepest_descent.Plo new file mode 100644 index 000000000..8a1f8f1d4 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/steepest_descent.Plo @@ -0,0 +1,261 @@ +steepest_descent.lo: steepest_descent.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_blas.h + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_blas.h: diff --git a/software/gsl-1.15/multimin/.deps/test.Po b/software/gsl-1.15/multimin/.deps/test.Po new file mode 100644 index 000000000..114fa5111 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/test.Po @@ -0,0 +1,268 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_test.h ../gsl/gsl_blas.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_multimin.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_min.h ../gsl/gsl_ieee_utils.h \ + test_funcs.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_test.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_multimin.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_min.h: + +../gsl/gsl_ieee_utils.h: + +test_funcs.h: diff --git a/software/gsl-1.15/multimin/.deps/test_funcs.Po b/software/gsl-1.15/multimin/.deps/test_funcs.Po new file mode 100644 index 000000000..55a82c760 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/test_funcs.Po @@ -0,0 +1,252 @@ +test_funcs.o: test_funcs.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_multimin.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h test_funcs.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +test_funcs.h: diff --git a/software/gsl-1.15/multimin/.deps/vector_bfgs.Plo b/software/gsl-1.15/multimin/.deps/vector_bfgs.Plo new file mode 100644 index 000000000..e5636acce --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/vector_bfgs.Plo @@ -0,0 +1,263 @@ +vector_bfgs.lo: vector_bfgs.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h directional_minimize.c + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +directional_minimize.c: diff --git a/software/gsl-1.15/multimin/.deps/vector_bfgs2.Plo b/software/gsl-1.15/multimin/.deps/vector_bfgs2.Plo new file mode 100644 index 000000000..8e0a22377 --- /dev/null +++ b/software/gsl-1.15/multimin/.deps/vector_bfgs2.Plo @@ -0,0 +1,268 @@ +vector_bfgs2.lo: vector_bfgs2.c ../config.h ../gsl/gsl_multimin.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_min.h ../gsl/gsl_blas.h \ + ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h linear_minimize.c \ + ../gsl/gsl_poly.h linear_wrapper.c + +../config.h: + +../gsl/gsl_multimin.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_min.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +linear_minimize.c: + +../gsl/gsl_poly.h: + +linear_wrapper.c: diff --git a/software/gsl-1.15/multimin/ChangeLog b/software/gsl-1.15/multimin/ChangeLog new file mode 100644 index 000000000..f7e9e67d8 --- /dev/null +++ b/software/gsl-1.15/multimin/ChangeLog @@ -0,0 +1,186 @@ +2010-04-07 Brian Gough + + * test.c (test_fdf): handle case of GSL_ENOPROG from early returns + + * test_funcs.c (simpleabs_f): new test function with non-zero + first derivatives around minimum + + * steepest_descent.c (steepest_descent_iterate): return early if + trial point does not move within machine precision + + * directional_minimize.c (intermediate_point): return early with + step=0 if trial point does not move from initial point within + machine precision + +2009-08-05 Brian Gough + + * simplex2.c (contract_by_best): update the size and + center to avoid old values being used + + * test.c (main): added a testcase for the spring function + +2009-07-11 Brian Gough + + * simplex2.c (nmsimplex_set_rand): provide alternative + initialisation which randomizes the initial simplex + +2009-07-09 Brian Gough + + * fminimizer.c (gsl_multimin_fminimizer_free): handle NULL + argument in free + + * fdfminimizer.c (gsl_multimin_fdfminimizer_free): handle NULL + argument in free + +2008-11-29 Brian Gough + + * test.c (test_f): extended fminimizer test to allow type to be + passed in as a parameter + + * simplex2.c: use BLAS, keep track of center in state to avoid + unnecessary computation, compute size as RMS value to allow linear + update. + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-05-06 Brian Gough + + * simplex.c (nmsimplex_iterate): fix search for second highest + point + +2007-07-30 Brian Gough + + * history.c: removed (unused file) + +2007-02-20 Brian Gough + + * vector_bfgs2.c (vector_bfgs2_iterate): use positive step size + +2007-02-17 Brian Gough + + * linear_minimize.c (minimize): return GSL_ENOPROG for roundoff + +2007-02-14 Brian Gough + + * linear_minimize.c: made all functions static + + * linear_wrapper.c: made all functions static + +2007-02-08 Brian Gough + + * linear_wrapper.c: convert multidimensional function to + one-dimensional for line minimisation + + * linear_minimize.c: one-dimensional minimisation from Fletcher + + * vector_bfgs2.c: added Fletcher's implementation + +2006-02-18 Brian Gough + + * vector_bfgs.c (vector_bfgs_iterate): avoid division by zero if + dxdg == 0 + +2003-07-24 Brian Gough + + * simplex.c (nmsimplex_set): changed index variable i from int to + size_t + +2003-04-17 Brian Gough + + * simplex.c (nmsimplex_iterate): bug fix to find the second + highest point correctly + + * vector_bfgs.c (vector_bfgs_iterate): no need to update g0norm on + each downhill step, since g0norm is the norm for the initial + gradient. + + * conjugate_pr.c (conjugate_pr_iterate): no need to update g0norm + on each downhill step, since g0norm is the norm for the initial + gradient. + + * conjugate_fr.c (conjugate_fr_iterate): no need to update g0norm + on each downhill step, since g0norm is the norm for the initial + gradient. + +Sun Sep 30 20:50:00 2002 Tuomo Keskitalo + + * Added Nelder-Mead Simplex optimization algorithm and + fminimizer structure. + +Sun Feb 10 21:57:36 2002 Brian Gough + + * conjugate_pr.c (conjugate_pr_iterate): return error ENOPROG if + cannot find downward step + + * conjugate_fr.c (conjugate_fr_iterate): return error ENOPROG if + cannot find downward step + + * vector_bfgs.c (vector_bfgs_iterate): return error ENOPROG if + cannot find downward step + +Thu Oct 25 11:56:06 2001 Brian Gough + + * added a tolerance parameter for the line minimizations + +Wed Oct 24 23:18:46 2001 Brian Gough + + * modified all routines to use a single minimiztion iteration, + instead of nested iterations for line and gradient search. + +Thu Oct 18 22:56:52 2001 Brian Gough + + * renamed gsl_multimin_f_minimizer to gsl_multimin_fminimizer for + consistency with rest of the library + + * renamed gsl_multimin_fdf_minimizer to gsl_multimin_fdfminimizer + for consistency with rest of the library + +Mon Oct 8 21:41:51 2001 Brian Gough + + * diff.c (gsl_multimin_diff): pass params argument using + GSL_MULTIMIN_FN_EVAL (3 occurrences) + +Sun Jul 15 17:54:15 2001 Brian Gough + + * fdfminimizer.c (gsl_multimin_fdf_minimizer_alloc): eliminated + use of interval type + +Sat Apr 28 11:29:08 2001 Brian Gough + + * diff.c (gsl_multimin_diff): made indices unsigned + +Mon Apr 23 13:22:31 2001 Brian Gough + + * gsl_multimin.h diff.c: made starting_point const throughout to + avoid compiler warnings + + * made internal functions static + + * gsl_multimin.h: added missing prototype for gsl_multimin_diff + +Tue Apr 17 22:15:37 2001 Brian Gough + + * gsl_multimin.h: added missing prototype for gsl_multimin_compute_ep + +Sun Feb 18 16:35:21 2001 Brian Gough + + * fdfminimizer.c (gsl_multimin_fdf_minimizer_alloc): modified to + account for change in calling convection of + gsl_min_fminimizer_alloc + +Fri May 5 16:08:34 2000 Brian Gough + + * test.c (test_fdf): fixed warning about "control reaches end of + non-void function" by changing test_fdf to return type void + +Tue May 2 19:20:46 2000 Brian Gough + + * test.c (main): added return gsl_test_summary() to main, so that + test results are returned through the exit status. + +Mon Feb 14 13:12:16 2000 Brian Gough + + * made all internal functions static + diff --git a/software/gsl-1.15/multimin/Makefile.am b/software/gsl-1.15/multimin/Makefile.am new file mode 100644 index 000000000..d83f8d4bf --- /dev/null +++ b/software/gsl-1.15/multimin/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = libgslmultimin.la + +pkginclude_HEADERS = gsl_multimin.h + +INCLUDES = -I$(top_srcdir) + +libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c simplex2.c + +noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c + +check_PROGRAMS = test #demo + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c test_funcs.c test_funcs.h +test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + diff --git a/software/gsl-1.15/multimin/Makefile.in b/software/gsl-1.15/multimin/Makefile.in new file mode 100644 index 000000000..56b04a60d --- /dev/null +++ b/software/gsl-1.15/multimin/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = multimin +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmultimin_la_LIBADD = +am_libgslmultimin_la_OBJECTS = fdfminimizer.lo steepest_descent.lo \ + conjugate_fr.lo conjugate_pr.lo convergence.lo diff.lo \ + vector_bfgs.lo vector_bfgs2.lo fminimizer.lo simplex.lo \ + simplex2.lo +libgslmultimin_la_OBJECTS = $(am_libgslmultimin_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmultimin.la ../min/libgslmin.la \ + ../poly/libgslpoly.la ../blas/libgslblas.la \ + ../cblas/libgslcblas.la ../linalg/libgsllinalg.la \ + ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmultimin_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmultimin_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmultimin.la +pkginclude_HEADERS = gsl_multimin.h +INCLUDES = -I$(top_srcdir) +libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c vector_bfgs2.c fminimizer.c simplex.c simplex2.c +noinst_HEADERS = directional_minimize.c linear_minimize.c linear_wrapper.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c test_funcs.c test_funcs.h +test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu multimin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu multimin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmultimin.la: $(libgslmultimin_la_OBJECTS) $(libgslmultimin_la_DEPENDENCIES) + $(LINK) $(libgslmultimin_la_OBJECTS) $(libgslmultimin_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conjugate_fr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conjugate_pr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdfminimizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fminimizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplex2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/steepest_descent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_funcs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_bfgs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_bfgs2.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/multimin/TODO b/software/gsl-1.15/multimin/TODO new file mode 100644 index 000000000..fbf4e0f30 --- /dev/null +++ b/software/gsl-1.15/multimin/TODO @@ -0,0 +1,8 @@ +# -*- org -*- +#+CATEGORY: multimin + +* Check behavior of conjugate_fr in multimin -- the demo results look odd. + +* Should have made f and df return int instead of void. + +* Handle errors via GSL_NAN similar to min.h in min/ diff --git a/software/gsl-1.15/multimin/conjugate_fr.c b/software/gsl-1.15/multimin/conjugate_fr.c new file mode 100644 index 000000000..7b3f96372 --- /dev/null +++ b/software/gsl-1.15/multimin/conjugate_fr.c @@ -0,0 +1,271 @@ +/* multimin/conjugate_fr.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* conjugate_fr.c -- Conjugate gradient Fletcher-Reeve algorithm */ + +/* Modified by Brian Gough to use single iteration structure */ + +#include +#include +#include + +#include "directional_minimize.c" + +typedef struct +{ + int iter; + double step; + double max_step; + double tol; + gsl_vector *x1; + gsl_vector *dx1; + gsl_vector *x2; + double pnorm; + gsl_vector *p; + double g0norm; + gsl_vector *g0; +} +conjugate_fr_state_t; + +static int +conjugate_fr_alloc (void *vstate, size_t n) +{ + conjugate_fr_state_t *state = (conjugate_fr_state_t *) vstate; + + state->x1 = gsl_vector_calloc (n); + + if (state->x1 == 0) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->dx1 = gsl_vector_calloc (n); + + if (state->dx1 == 0) + { + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for dx1", GSL_ENOMEM); + } + + state->x2 = gsl_vector_calloc (n); + + if (state->x2 == 0) + { + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for x2", GSL_ENOMEM); + } + + state->p = gsl_vector_calloc (n); + + if (state->p == 0) + { + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); + } + + state->g0 = gsl_vector_calloc (n); + + if (state->g0 == 0) + { + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +conjugate_fr_set (void *vstate, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double *f, gsl_vector * gradient, + double step_size, double tol) +{ + conjugate_fr_state_t *state = (conjugate_fr_state_t *) vstate; + + state->iter = 0; + state->step = step_size; + state->max_step = step_size; + state->tol = tol; + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x, f, gradient); + + /* Use the gradient as the initial direction */ + + gsl_vector_memcpy (state->p, gradient); + gsl_vector_memcpy (state->g0, gradient); + + { + double gnorm = gsl_blas_dnrm2 (gradient); + + state->pnorm = gnorm; + state->g0norm = gnorm; + } + + return GSL_SUCCESS; +} + +static void +conjugate_fr_free (void *vstate) +{ + conjugate_fr_state_t *state = (conjugate_fr_state_t *) vstate; + + gsl_vector_free (state->g0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); +} + +static int +conjugate_fr_restart (void *vstate) +{ + conjugate_fr_state_t *state = (conjugate_fr_state_t *) vstate; + + state->iter = 0; + return GSL_SUCCESS; +} + +static int +conjugate_fr_iterate (void *vstate, gsl_multimin_function_fdf * fdf, + gsl_vector * x, double *f, + gsl_vector * gradient, gsl_vector * dx) +{ + conjugate_fr_state_t *state = (conjugate_fr_state_t *) vstate; + + gsl_vector *x1 = state->x1; + gsl_vector *dx1 = state->dx1; + gsl_vector *x2 = state->x2; + gsl_vector *p = state->p; + gsl_vector *g0 = state->g0; + + double pnorm = state->pnorm; + double g0norm = state->g0norm; + + double fa = *f, fb, fc; + double dir; + double stepa = 0.0, stepb, stepc = state->step, tol = state->tol; + + double g1norm; + double pg; + + if (pnorm == 0.0 || g0norm == 0.0) + { + gsl_vector_set_zero (dx); + return GSL_ENOPROG; + } + + /* Determine which direction is downhill, +p or -p */ + + gsl_blas_ddot (p, gradient, &pg); + + dir = (pg >= 0.0) ? +1.0 : -1.0; + + /* Compute new trial point at x_c= x - step * p, where p is the + current direction */ + + take_step (x, p, stepc, dir / pnorm, x1, dx); + + /* Evaluate function and gradient at new point xc */ + + fc = GSL_MULTIMIN_FN_EVAL_F (fdf, x1); + + if (fc < fa) + { + /* Success, reduced the function value */ + state->step = stepc * 2.0; + *f = fc; + gsl_vector_memcpy (x, x1); + GSL_MULTIMIN_FN_EVAL_DF (fdf, x1, gradient); + return GSL_SUCCESS; + } + +#ifdef DEBUG + printf ("got stepc = %g fc = %g\n", stepc, fc); +#endif + + /* Do a line minimisation in the region (xa,fa) (xc,fc) to find an + intermediate (xb,fb) satisifying fa > fb < fc. Choose an initial + xb based on parabolic interpolation */ + + intermediate_point (fdf, x, p, dir / pnorm, pg, + stepa, stepc, fa, fc, x1, dx1, gradient, &stepb, &fb); + + if (stepb == 0.0) + { + return GSL_ENOPROG; + } + + minimize (fdf, x, p, dir / pnorm, + stepa, stepb, stepc, fa, fb, fc, tol, + x1, dx1, x2, dx, gradient, &(state->step), f, &g1norm); + + gsl_vector_memcpy (x, x2); + + /* Choose a new conjugate direction for the next step */ + + state->iter = (state->iter + 1) % x->size; + + if (state->iter == 0) + { + gsl_vector_memcpy (p, gradient); + state->pnorm = g1norm; + } + else + { + /* p' = g1 - beta * p */ + + double beta = -pow (g1norm / g0norm, 2.0); + gsl_blas_dscal (-beta, p); + gsl_blas_daxpy (1.0, gradient, p); + state->pnorm = gsl_blas_dnrm2 (p); + } + + state->g0norm = g1norm; + gsl_vector_memcpy (g0, gradient); + +#ifdef DEBUG + printf ("updated conjugate directions\n"); + printf ("p: "); + gsl_vector_fprintf (stdout, p, "%g"); + printf ("g: "); + gsl_vector_fprintf (stdout, gradient, "%g"); +#endif + + return GSL_SUCCESS; +} + + + +static const gsl_multimin_fdfminimizer_type conjugate_fr_type = { + "conjugate_fr", /* name */ + sizeof (conjugate_fr_state_t), + &conjugate_fr_alloc, + &conjugate_fr_set, + &conjugate_fr_iterate, + &conjugate_fr_restart, + &conjugate_fr_free +}; + +const gsl_multimin_fdfminimizer_type + * gsl_multimin_fdfminimizer_conjugate_fr = &conjugate_fr_type; diff --git a/software/gsl-1.15/multimin/conjugate_pr.c b/software/gsl-1.15/multimin/conjugate_pr.c new file mode 100644 index 000000000..25241e4dd --- /dev/null +++ b/software/gsl-1.15/multimin/conjugate_pr.c @@ -0,0 +1,276 @@ +/* multimin/conjugate_pr.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* conjugate_pr.c -- Conjugate gradient Polak-Ribiere algorithm */ + +/* Modified by Brian Gough to use single iteration structure */ + +#include +#include +#include + +#include "directional_minimize.c" + +typedef struct +{ + int iter; + double step; + double max_step; + double tol; + gsl_vector *x1; + gsl_vector *dx1; + gsl_vector *x2; + double pnorm; + gsl_vector *p; + double g0norm; + gsl_vector *g0; +} +conjugate_pr_state_t; + +static int +conjugate_pr_alloc (void *vstate, size_t n) +{ + conjugate_pr_state_t *state = (conjugate_pr_state_t *) vstate; + + state->x1 = gsl_vector_calloc (n); + + if (state->x1 == 0) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->dx1 = gsl_vector_calloc (n); + + if (state->dx1 == 0) + { + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for dx1", GSL_ENOMEM); + } + + state->x2 = gsl_vector_calloc (n); + + if (state->x2 == 0) + { + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for x2", GSL_ENOMEM); + } + + state->p = gsl_vector_calloc (n); + + if (state->p == 0) + { + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); + } + + state->g0 = gsl_vector_calloc (n); + + if (state->g0 == 0) + { + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +conjugate_pr_set (void *vstate, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double *f, gsl_vector * gradient, + double step_size, double tol) +{ + conjugate_pr_state_t *state = (conjugate_pr_state_t *) vstate; + + state->iter = 0; + state->step = step_size; + state->max_step = step_size; + state->tol = tol; + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x, f, gradient); + + /* Use the gradient as the initial direction */ + + gsl_vector_memcpy (state->p, gradient); + gsl_vector_memcpy (state->g0, gradient); + + { + double gnorm = gsl_blas_dnrm2 (gradient); + + state->pnorm = gnorm; + state->g0norm = gnorm; + } + + return GSL_SUCCESS; +} + +static void +conjugate_pr_free (void *vstate) +{ + conjugate_pr_state_t *state = (conjugate_pr_state_t *) vstate; + + gsl_vector_free (state->g0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); +} + +static int +conjugate_pr_restart (void *vstate) +{ + conjugate_pr_state_t *state = (conjugate_pr_state_t *) vstate; + + state->iter = 0; + return GSL_SUCCESS; +} + +static int +conjugate_pr_iterate (void *vstate, gsl_multimin_function_fdf * fdf, + gsl_vector * x, double *f, + gsl_vector * gradient, gsl_vector * dx) +{ + conjugate_pr_state_t *state = (conjugate_pr_state_t *) vstate; + + gsl_vector *x1 = state->x1; + gsl_vector *dx1 = state->dx1; + gsl_vector *x2 = state->x2; + gsl_vector *p = state->p; + gsl_vector *g0 = state->g0; + + double pnorm = state->pnorm; + double g0norm = state->g0norm; + + double fa = *f, fb, fc; + double dir; + double stepa = 0.0, stepb, stepc = state->step, tol = state->tol; + + double g1norm; + double pg; + + if (pnorm == 0.0 || g0norm == 0.0) + { + gsl_vector_set_zero (dx); + return GSL_ENOPROG; + } + + /* Determine which direction is downhill, +p or -p */ + + gsl_blas_ddot (p, gradient, &pg); + + dir = (pg >= 0.0) ? +1.0 : -1.0; + + /* Compute new trial point at x_c= x - step * p, where p is the + current direction */ + + take_step (x, p, stepc, dir / pnorm, x1, dx); + + /* Evaluate function and gradient at new point xc */ + + fc = GSL_MULTIMIN_FN_EVAL_F (fdf, x1); + + if (fc < fa) + { + /* Success, reduced the function value */ + state->step = stepc * 2.0; + *f = fc; + gsl_vector_memcpy (x, x1); + GSL_MULTIMIN_FN_EVAL_DF (fdf, x1, gradient); + return GSL_SUCCESS; + } + +#ifdef DEBUG + printf ("got stepc = %g fc = %g\n", stepc, fc); +#endif + + /* Do a line minimisation in the region (xa,fa) (xc,fc) to find an + intermediate (xb,fb) satisifying fa > fb < fc. Choose an initial + xb based on parabolic interpolation */ + + intermediate_point (fdf, x, p, dir / pnorm, pg, + stepa, stepc, fa, fc, x1, dx1, gradient, &stepb, &fb); + + if (stepb == 0.0) + { + return GSL_ENOPROG; + } + + minimize (fdf, x, p, dir / pnorm, + stepa, stepb, stepc, fa, fb, fc, tol, + x1, dx1, x2, dx, gradient, &(state->step), f, &g1norm); + + gsl_vector_memcpy (x, x2); + + /* Choose a new conjugate direction for the next step */ + + state->iter = (state->iter + 1) % x->size; + + if (state->iter == 0) + { + gsl_vector_memcpy (p, gradient); + state->pnorm = g1norm; + } + else + { + /* p' = g1 - beta * p */ + + double g0g1, beta; + + gsl_blas_daxpy (-1.0, gradient, g0); /* g0' = g0 - g1 */ + gsl_blas_ddot(g0, gradient, &g0g1); /* g1g0 = (g0-g1).g1 */ + beta = g0g1 / (g0norm*g0norm); /* beta = -((g1 - g0).g1)/(g0.g0) */ + + gsl_blas_dscal (-beta, p); + gsl_blas_daxpy (1.0, gradient, p); + state->pnorm = gsl_blas_dnrm2 (p); + } + + state->g0norm = g1norm; + gsl_vector_memcpy (g0, gradient); + +#ifdef DEBUG + printf ("updated conjugate directions\n"); + printf ("p: "); + gsl_vector_fprintf (stdout, p, "%g"); + printf ("g: "); + gsl_vector_fprintf (stdout, gradient, "%g"); +#endif + + return GSL_SUCCESS; +} + + + +static const gsl_multimin_fdfminimizer_type conjugate_pr_type = { + "conjugate_pr", /* name */ + sizeof (conjugate_pr_state_t), + &conjugate_pr_alloc, + &conjugate_pr_set, + &conjugate_pr_iterate, + &conjugate_pr_restart, + &conjugate_pr_free +}; + +const gsl_multimin_fdfminimizer_type + * gsl_multimin_fdfminimizer_conjugate_pr = &conjugate_pr_type; diff --git a/software/gsl-1.15/multimin/convergence.c b/software/gsl-1.15/multimin/convergence.c new file mode 100644 index 000000000..3898e8234 --- /dev/null +++ b/software/gsl-1.15/multimin/convergence.c @@ -0,0 +1,58 @@ +/* multimin/convergence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_multimin_test_gradient (const gsl_vector *g, double epsabs) +{ + double norm; + + if (epsabs < 0.0) + { + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + } + + norm = gsl_blas_dnrm2(g); + + if (norm < epsabs) + { + return GSL_SUCCESS; + } + + return GSL_CONTINUE; +} + +int +gsl_multimin_test_size (const double size, double epsabs) +{ + if (epsabs < 0.0) + { + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + } + + if (size < epsabs) + { + return GSL_SUCCESS; + } + + return GSL_CONTINUE; +} diff --git a/software/gsl-1.15/multimin/diff.c b/software/gsl-1.15/multimin/diff.c new file mode 100644 index 000000000..f69372452 --- /dev/null +++ b/software/gsl-1.15/multimin/diff.c @@ -0,0 +1,58 @@ +/* multimin/diff.c + * + * Copyright (C) 2000 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +int +gsl_multimin_diff (const gsl_multimin_function * f, + const gsl_vector * x, gsl_vector * g) +{ + size_t i, n = f->n; + + double h = GSL_SQRT_DBL_EPSILON; + + + gsl_vector * x1 = gsl_vector_alloc (n); /* FIXME: pass as argument */ + + gsl_vector_memcpy (x1, x); + + for (i = 0; i < n; i++) + { + double fl, fh; + + double xi = gsl_vector_get (x, i); + double dx = fabs(xi) * h; + + if (dx == 0.0) dx = h; + + gsl_vector_set (x1, i, xi + dx); + fh = GSL_MULTIMIN_FN_EVAL(f, x1); + + gsl_vector_set (x1, i, xi - dx); + fl = GSL_MULTIMIN_FN_EVAL(f, x1); + + gsl_vector_set (x1, i, xi); + gsl_vector_set (g, i, (fh - fl) / (2.0 * dx)); + } + + gsl_vector_free (x1); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multimin/directional_minimize.c b/software/gsl-1.15/multimin/directional_minimize.c new file mode 100644 index 000000000..6dfa0accb --- /dev/null +++ b/software/gsl-1.15/multimin/directional_minimize.c @@ -0,0 +1,248 @@ +/* multimin/directional_minimize.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void +take_step (const gsl_vector * x, const gsl_vector * p, + double step, double lambda, gsl_vector * x1, gsl_vector * dx) +{ + gsl_vector_set_zero (dx); + gsl_blas_daxpy (-step * lambda, p, dx); + + gsl_vector_memcpy (x1, x); + gsl_blas_daxpy (1.0, dx, x1); +} + +static void +intermediate_point (gsl_multimin_function_fdf * fdf, + const gsl_vector * x, const gsl_vector * p, + double lambda, + double pg, + double stepa, double stepc, + double fa, double fc, + gsl_vector * x1, gsl_vector * dx, gsl_vector * gradient, + double * step, double * f) +{ + double stepb, fb; + +trial: + { + double u = fabs (pg * lambda * stepc); + stepb = 0.5 * stepc * u / ((fc - fa) + u); + } + + take_step (x, p, stepb, lambda, x1, dx); + + if (gsl_vector_equal (x, x1)) + { + /* Take fast exit if trial point does not move from initial point */ +#ifdef DEBUG + printf ("fast exit x == x1 for stepb = %g\n", stepb); +#endif + *step = 0; + *f = fa; + GSL_MULTIMIN_FN_EVAL_DF(fdf, x1, gradient); + return ; + } + + fb = GSL_MULTIMIN_FN_EVAL_F (fdf, x1); + +#ifdef DEBUG + printf ("trying stepb = %g fb = %.18e\n", stepb, fb); +#endif + + if (fb >= fa && stepb > 0.0) + { + /* downhill step failed, reduce step-size and try again */ + fc = fb; + stepc = stepb; + goto trial; + } +#ifdef DEBUG + printf ("ok!\n"); +#endif + + *step = stepb; + *f = fb; + GSL_MULTIMIN_FN_EVAL_DF(fdf, x1, gradient); +} + +static void +minimize (gsl_multimin_function_fdf * fdf, + const gsl_vector * x, const gsl_vector * p, + double lambda, + double stepa, double stepb, double stepc, + double fa, double fb, double fc, double tol, + gsl_vector * x1, gsl_vector * dx1, + gsl_vector * x2, gsl_vector * dx2, gsl_vector * gradient, + double * step, double * f, double * gnorm) +{ + /* Starting at (x0, f0) move along the direction p to find a minimum + f(x0 - lambda * p), returning the new point x1 = x0-lambda*p, + f1=f(x1) and g1 = grad(f) at x1. */ + + double u = stepb; + double v = stepa; + double w = stepc; + double fu = fb; + double fv = fa; + double fw = fc; + + double old2 = fabs(w - v); + double old1 = fabs(v - u); + + double stepm, fm, pg, gnorm1; + + int iter = 0; + + gsl_vector_memcpy (x2, x1); + gsl_vector_memcpy (dx2, dx1); + + *f = fb; + *step = stepb; + *gnorm = gsl_blas_dnrm2 (gradient); + +mid_trial: + + iter++; + + if (iter > 10) + { + return; /* MAX ITERATIONS */ + } + + { + double dw = w - u; + double dv = v - u; + double du = 0.0; + + double e1 = ((fv - fu) * dw * dw + (fu - fw) * dv * dv); + double e2 = 2.0 * ((fv - fu) * dw + (fu - fw) * dv); + + if (e2 != 0.0) + { + du = e1 / e2; + } + + if (du > 0.0 && du < (stepc - stepb) && fabs(du) < 0.5 * old2) + { + stepm = u + du; + } + else if (du < 0.0 && du > (stepa - stepb) && fabs(du) < 0.5 * old2) + { + stepm = u + du; + } + else if ((stepc - stepb) > (stepb - stepa)) + { + stepm = 0.38 * (stepc - stepb) + stepb; + } + else + { + stepm = stepb - 0.38 * (stepb - stepa); + } + } + + take_step (x, p, stepm, lambda, x1, dx1); + + fm = GSL_MULTIMIN_FN_EVAL_F (fdf, x1); + +#ifdef DEBUG + printf ("trying stepm = %g fm = %.18e\n", stepm, fm); +#endif + + if (fm > fb) + { + if (fm < fv) + { + w = v; + v = stepm; + fw = fv; + fv = fm; + } + else if (fm < fw) + { + w = stepm; + fw = fm; + } + + if (stepm < stepb) + { + stepa = stepm; + fa = fm; + } + else + { + stepc = stepm; + fc = fm; + } + goto mid_trial; + } + else if (fm <= fb) + { + old2 = old1; + old1 = fabs(u - stepm); + w = v; + v = u; + u = stepm; + fw = fv; + fv = fu; + fu = fm; + + gsl_vector_memcpy (x2, x1); + gsl_vector_memcpy (dx2, dx1); + + GSL_MULTIMIN_FN_EVAL_DF (fdf, x1, gradient); + gsl_blas_ddot (p, gradient, &pg); + gnorm1 = gsl_blas_dnrm2 (gradient); + +#ifdef DEBUG + printf ("p: "); gsl_vector_fprintf(stdout, p, "%g"); + printf ("g: "); gsl_vector_fprintf(stdout, gradient, "%g"); + printf ("gnorm: %.18e\n", gnorm1); + printf ("pg: %.18e\n", pg); + printf ("orth: %g\n", fabs (pg * lambda/ gnorm1)); +#endif + *f = fm; + *step = stepm; + *gnorm = gnorm1; + + if (fabs (pg * lambda / gnorm1) < tol) + { +#ifdef DEBUG + printf("ok!\n"); +#endif + return; /* SUCCESS */ + } + + if (stepm < stepb) + { + stepc = stepb; + fc = fb; + stepb = stepm; + fb = fm; + } + else + { + stepa = stepb; + fa = fb; + stepb = stepm; + fb = fm; + } + goto mid_trial; + } +} diff --git a/software/gsl-1.15/multimin/fdfminimizer.c b/software/gsl-1.15/multimin/fdfminimizer.c new file mode 100644 index 000000000..7ebb8f4ba --- /dev/null +++ b/software/gsl-1.15/multimin/fdfminimizer.c @@ -0,0 +1,174 @@ +/* multimin/fdfminimizer.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +gsl_multimin_fdfminimizer * +gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type * T, + size_t n) +{ + int status; + + gsl_multimin_fdfminimizer *s = + (gsl_multimin_fdfminimizer *) malloc (sizeof (gsl_multimin_fdfminimizer)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for minimizer struct", + GSL_ENOMEM, 0); + } + + s->type = T; + + s->x = gsl_vector_calloc (n); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->gradient = gsl_vector_calloc (n); + + if (s->gradient == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for gradient", GSL_ENOMEM, 0); + } + + s->dx = gsl_vector_calloc (n); + + if (s->dx == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->gradient); + free (s); + GSL_ERROR_VAL ("failed to allocate space for dx", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->gradient); + gsl_vector_free (s->dx); + free (s); + GSL_ERROR_VAL ("failed to allocate space for minimizer state", + GSL_ENOMEM, 0); + } + + status = (T->alloc) (s->state, n); + + if (status != GSL_SUCCESS) + { + free (s->state); + gsl_vector_free (s->x); + gsl_vector_free (s->gradient); + gsl_vector_free (s->dx); + free (s); + + GSL_ERROR_VAL ("failed to initialize minimizer state", GSL_ENOMEM, 0); + } + + return s; +} + +int +gsl_multimin_fdfminimizer_set (gsl_multimin_fdfminimizer * s, + gsl_multimin_function_fdf * fdf, + const gsl_vector * x, + double step_size, double tol) +{ + if (s->x->size != fdf->n) + { + GSL_ERROR ("function incompatible with solver size", GSL_EBADLEN); + } + + if (x->size != fdf->n) + { + GSL_ERROR ("vector length not compatible with function", GSL_EBADLEN); + } + + s->fdf = fdf; + + gsl_vector_memcpy (s->x,x); + gsl_vector_set_zero (s->dx); + + return (s->type->set) (s->state, s->fdf, s->x, &(s->f), s->gradient, step_size, tol); +} + +void +gsl_multimin_fdfminimizer_free (gsl_multimin_fdfminimizer * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->gradient); + gsl_vector_free (s->x); + free (s); +} + +int +gsl_multimin_fdfminimizer_iterate (gsl_multimin_fdfminimizer * s) +{ + return (s->type->iterate) (s->state, s->fdf, s->x, &(s->f), s->gradient, s->dx); +} + +int +gsl_multimin_fdfminimizer_restart (gsl_multimin_fdfminimizer * s) +{ + return (s->type->restart) (s->state); +} + +const char * +gsl_multimin_fdfminimizer_name (const gsl_multimin_fdfminimizer * s) +{ + return s->type->name; +} + + +gsl_vector * +gsl_multimin_fdfminimizer_x (const gsl_multimin_fdfminimizer * s) +{ + return s->x; +} + +gsl_vector * +gsl_multimin_fdfminimizer_dx (const gsl_multimin_fdfminimizer * s) +{ + return s->dx; +} + +gsl_vector * +gsl_multimin_fdfminimizer_gradient (const gsl_multimin_fdfminimizer * s) +{ + return s->gradient; +} + +double +gsl_multimin_fdfminimizer_minimum (const gsl_multimin_fdfminimizer * s) +{ + return s->f; +} + diff --git a/software/gsl-1.15/multimin/fminimizer.c b/software/gsl-1.15/multimin/fminimizer.c new file mode 100644 index 000000000..676083c4a --- /dev/null +++ b/software/gsl-1.15/multimin/fminimizer.c @@ -0,0 +1,135 @@ +/* multimin/fminimizer.c + * + * Copyright (C) 2002, 2009 Tuomo Keskitalo, Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +gsl_multimin_fminimizer * +gsl_multimin_fminimizer_alloc (const gsl_multimin_fminimizer_type * T, + size_t n) +{ + int status; + + gsl_multimin_fminimizer *s = + (gsl_multimin_fminimizer *) malloc (sizeof (gsl_multimin_fminimizer)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for minimizer struct", + GSL_ENOMEM, 0); + } + + s->type = T; + + s->x = gsl_vector_calloc (n); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for minimizer state", + GSL_ENOMEM, 0); + } + + status = (T->alloc) (s->state, n); + + if (status != GSL_SUCCESS) + { + free (s->state); + gsl_vector_free (s->x); + free (s); + + GSL_ERROR_VAL ("failed to initialize minimizer state", GSL_ENOMEM, 0); + } + + return s; +} + +int +gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * s, + gsl_multimin_function * f, + const gsl_vector * x, + const gsl_vector * step_size) +{ + if (s->x->size != f->n) + { + GSL_ERROR ("function incompatible with solver size", GSL_EBADLEN); + } + + if (x->size != f->n || step_size->size != f->n) + { + GSL_ERROR ("vector length not compatible with function", GSL_EBADLEN); + } + + s->f = f; + + gsl_vector_memcpy (s->x,x); + + return (s->type->set) (s->state, s->f, s->x, &(s->size), step_size); +} + +void +gsl_multimin_fminimizer_free (gsl_multimin_fminimizer * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->x); + free (s); +} + +int +gsl_multimin_fminimizer_iterate (gsl_multimin_fminimizer * s) +{ + return (s->type->iterate) (s->state, s->f, s->x, &(s->size), &(s->fval)); +} + +const char * +gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * s) +{ + return s->type->name; +} + + +gsl_vector * +gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * s) +{ + return s->x; +} + +double +gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * s) +{ + return s->fval; +} + +double +gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * s) +{ + return s->size; +} diff --git a/software/gsl-1.15/multimin/gsl_multimin.h b/software/gsl-1.15/multimin/gsl_multimin.h new file mode 100644 index 000000000..287022727 --- /dev/null +++ b/software/gsl-1.15/multimin/gsl_multimin.h @@ -0,0 +1,226 @@ +/* multimin/gsl_multimin.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Modified by Tuomo Keskitalo to include fminimizer and + Nelder Mead related lines */ + +#ifndef __GSL_MULTIMIN_H__ +#define __GSL_MULTIMIN_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Definition of an arbitrary real-valued function with gsl_vector input and */ +/* parameters */ +struct gsl_multimin_function_struct +{ + double (* f) (const gsl_vector * x, void * params); + size_t n; + void * params; +}; + +typedef struct gsl_multimin_function_struct gsl_multimin_function; + +#define GSL_MULTIMIN_FN_EVAL(F,x) (*((F)->f))(x,(F)->params) + +/* Definition of an arbitrary differentiable real-valued function */ +/* with gsl_vector input and parameters */ +struct gsl_multimin_function_fdf_struct +{ + double (* f) (const gsl_vector * x, void * params); + void (* df) (const gsl_vector * x, void * params,gsl_vector * df); + void (* fdf) (const gsl_vector * x, void * params,double *f,gsl_vector * df); + size_t n; + void * params; +}; + +typedef struct gsl_multimin_function_fdf_struct gsl_multimin_function_fdf; + +#define GSL_MULTIMIN_FN_EVAL_F(F,x) (*((F)->f))(x,(F)->params) +#define GSL_MULTIMIN_FN_EVAL_DF(F,x,g) (*((F)->df))(x,(F)->params,(g)) +#define GSL_MULTIMIN_FN_EVAL_F_DF(F,x,y,g) (*((F)->fdf))(x,(F)->params,(y),(g)) + +int gsl_multimin_diff (const gsl_multimin_function * f, + const gsl_vector * x, gsl_vector * g); + +/* minimization of non-differentiable functions */ + +typedef struct +{ + const char *name; + size_t size; + int (*alloc) (void *state, size_t n); + int (*set) (void *state, gsl_multimin_function * f, + const gsl_vector * x, + double * size, + const gsl_vector * step_size); + int (*iterate) (void *state, gsl_multimin_function * f, + gsl_vector * x, + double * size, + double * fval); + void (*free) (void *state); +} +gsl_multimin_fminimizer_type; + +typedef struct +{ + /* multi dimensional part */ + const gsl_multimin_fminimizer_type *type; + gsl_multimin_function *f; + + double fval; + gsl_vector * x; + + double size; + + void *state; +} +gsl_multimin_fminimizer; + +gsl_multimin_fminimizer * +gsl_multimin_fminimizer_alloc(const gsl_multimin_fminimizer_type *T, + size_t n); + +int +gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * s, + gsl_multimin_function * f, + const gsl_vector * x, + const gsl_vector * step_size); + +void +gsl_multimin_fminimizer_free(gsl_multimin_fminimizer *s); + +const char * +gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * s); + +int +gsl_multimin_fminimizer_iterate(gsl_multimin_fminimizer *s); + +gsl_vector * +gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * s); + +double +gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * s); + +double +gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * s); + +/* Convergence test functions */ + +int +gsl_multimin_test_gradient(const gsl_vector * g, double epsabs); + +int +gsl_multimin_test_size(const double size, double epsabs); + +/* minimisation of differentiable functions */ + +typedef struct +{ + const char *name; + size_t size; + int (*alloc) (void *state, size_t n); + int (*set) (void *state, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double * f, + gsl_vector * gradient, double step_size, double tol); + int (*iterate) (void *state,gsl_multimin_function_fdf * fdf, + gsl_vector * x, double * f, + gsl_vector * gradient, gsl_vector * dx); + int (*restart) (void *state); + void (*free) (void *state); +} +gsl_multimin_fdfminimizer_type; + +typedef struct +{ + /* multi dimensional part */ + const gsl_multimin_fdfminimizer_type *type; + gsl_multimin_function_fdf *fdf; + + double f; + gsl_vector * x; + gsl_vector * gradient; + gsl_vector * dx; + + void *state; +} +gsl_multimin_fdfminimizer; + +gsl_multimin_fdfminimizer * +gsl_multimin_fdfminimizer_alloc(const gsl_multimin_fdfminimizer_type *T, + size_t n); + +int +gsl_multimin_fdfminimizer_set (gsl_multimin_fdfminimizer * s, + gsl_multimin_function_fdf *fdf, + const gsl_vector * x, + double step_size, double tol); + +void +gsl_multimin_fdfminimizer_free(gsl_multimin_fdfminimizer *s); + +const char * +gsl_multimin_fdfminimizer_name (const gsl_multimin_fdfminimizer * s); + +int +gsl_multimin_fdfminimizer_iterate(gsl_multimin_fdfminimizer *s); + +int +gsl_multimin_fdfminimizer_restart(gsl_multimin_fdfminimizer *s); + +gsl_vector * +gsl_multimin_fdfminimizer_x (const gsl_multimin_fdfminimizer * s); + +gsl_vector * +gsl_multimin_fdfminimizer_dx (const gsl_multimin_fdfminimizer * s); + +gsl_vector * +gsl_multimin_fdfminimizer_gradient (const gsl_multimin_fdfminimizer * s); + +double +gsl_multimin_fdfminimizer_minimum (const gsl_multimin_fdfminimizer * s); + +GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_steepest_descent; +GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_conjugate_pr; +GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_conjugate_fr; +GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs; +GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs2; +GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex; +GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex2; +GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex2rand; + +__END_DECLS + +#endif /* __GSL_MULTIMIN_H__ */ diff --git a/software/gsl-1.15/multimin/linear_minimize.c b/software/gsl-1.15/multimin/linear_minimize.c new file mode 100644 index 000000000..60677d63b --- /dev/null +++ b/software/gsl-1.15/multimin/linear_minimize.c @@ -0,0 +1,247 @@ +#include +#include +#include + +/* Find a minimum in x=[0,1] of the interpolating quadratic through + * (0,f0) (1,f1) with derivative fp0 at x=0. The interpolating + * polynomial is q(x) = f0 + fp0 * z + (f1-f0-fp0) * z^2 + */ + +static double +interp_quad (double f0, double fp0, double f1, double zl, double zh) +{ + double fl = f0 + zl*(fp0 + zl*(f1 - f0 -fp0)); + double fh = f0 + zh*(fp0 + zh*(f1 - f0 -fp0)); + double c = 2 * (f1 - f0 - fp0); /* curvature */ + + double zmin = zl, fmin = fl; + + if (fh < fmin) { zmin = zh; fmin = fh; } + + if (c > 0) /* positive curvature required for a minimum */ + { + double z = -fp0 / c; /* location of minimum */ + if (z > zl && z < zh) { + double f = f0 + z*(fp0 + z*(f1 - f0 -fp0)); + if (f < fmin) { zmin = z; fmin = f; }; + } + } + + return zmin; +} + +/* Find a minimum in x=[0,1] of the interpolating cubic through + * (0,f0) (1,f1) with derivatives fp0 at x=0 and fp1 at x=1. + * + * The interpolating polynomial is: + * + * c(x) = f0 + fp0 * z + eta * z^2 + xi * z^3 + * + * where eta=3*(f1-f0)-2*fp0-fp1, xi=fp0+fp1-2*(f1-f0). + */ + +static double +cubic (double c0, double c1, double c2, double c3, double z) +{ + return c0 + z * (c1 + z * (c2 + z * c3)); +} + +static void +check_extremum (double c0, double c1, double c2, double c3, double z, + double *zmin, double *fmin) +{ + /* could make an early return by testing curvature >0 for minimum */ + + double y = cubic (c0, c1, c2, c3, z); + + if (y < *fmin) + { + *zmin = z; /* accepted new point*/ + *fmin = y; + } +} + +static double +interp_cubic (double f0, double fp0, double f1, double fp1, double zl, double zh) +{ + double eta = 3 * (f1 - f0) - 2 * fp0 - fp1; + double xi = fp0 + fp1 - 2 * (f1 - f0); + double c0 = f0, c1 = fp0, c2 = eta, c3 = xi; + double zmin, fmin; + double z0, z1; + + zmin = zl; fmin = cubic(c0, c1, c2, c3, zl); + check_extremum (c0, c1, c2, c3, zh, &zmin, &fmin); + + { + int n = gsl_poly_solve_quadratic (3 * c3, 2 * c2, c1, &z0, &z1); + + if (n == 2) /* found 2 roots */ + { + if (z0 > zl && z0 < zh) + check_extremum (c0, c1, c2, c3, z0, &zmin, &fmin); + if (z1 > zl && z1 < zh) + check_extremum (c0, c1, c2, c3, z1, &zmin, &fmin); + } + else if (n == 1) /* found 1 root */ + { + if (z0 > zl && z0 < zh) + check_extremum (c0, c1, c2, c3, z0, &zmin, &fmin); + } + } + + return zmin; +} + + +static double +interpolate (double a, double fa, double fpa, + double b, double fb, double fpb, double xmin, double xmax, + int order) +{ + /* Map [a,b] to [0,1] */ + double z, alpha, zmin, zmax; + + zmin = (xmin - a) / (b - a); + zmax = (xmax - a) / (b - a); + + if (zmin > zmax) + { + double tmp = zmin; + zmin = zmax; + zmax = tmp; + }; + + if (order > 2 && GSL_IS_REAL(fpb)) { + z = interp_cubic (fa, fpa * (b - a), fb, fpb * (b - a), zmin, zmax); + } else { + z = interp_quad (fa, fpa * (b - a), fb, zmin, zmax); + } + + alpha = a + z * (b - a); + + return alpha; +} + +/* recommended values from Fletcher are + rho = 0.01, sigma = 0.1, tau1 = 9, tau2 = 0.05, tau3 = 0.5 */ + +static int +minimize (gsl_function_fdf * fn, double rho, double sigma, + double tau1, double tau2, double tau3, + int order, double alpha1, double *alpha_new) +{ + double f0, fp0, falpha, falpha_prev, fpalpha, fpalpha_prev, delta, + alpha_next; + double alpha = alpha1, alpha_prev = 0.0; + double a, b, fa, fb, fpa, fpb; + const size_t bracket_iters = 100, section_iters = 100; + size_t i = 0; + + GSL_FN_FDF_EVAL_F_DF (fn, 0.0, &f0, &fp0); + falpha_prev = f0; + fpalpha_prev = fp0; + + /* Avoid uninitialized variables morning */ + a = 0.0; b = alpha; + fa = f0; fb = 0.0; + fpa = fp0; fpb = 0.0; + + /* Begin bracketing */ + + while (i++ < bracket_iters) + { + falpha = GSL_FN_FDF_EVAL_F (fn, alpha); + + /* Fletcher's rho test */ + + if (falpha > f0 + alpha * rho * fp0 || falpha >= falpha_prev) + { + a = alpha_prev; fa = falpha_prev; fpa = fpalpha_prev; + b = alpha; fb = falpha; fpb = GSL_NAN; + break; /* goto sectioning */ + } + + fpalpha = GSL_FN_FDF_EVAL_DF (fn, alpha); + + /* Fletcher's sigma test */ + + if (fabs (fpalpha) <= -sigma * fp0) + { + *alpha_new = alpha; + return GSL_SUCCESS; + } + + if (fpalpha >= 0) + { + a = alpha; fa = falpha; fpa = fpalpha; + b = alpha_prev; fb = falpha_prev; fpb = fpalpha_prev; + break; /* goto sectioning */ + } + + delta = alpha - alpha_prev; + + { + double lower = alpha + delta; + double upper = alpha + tau1 * delta; + + alpha_next = interpolate (alpha_prev, falpha_prev, fpalpha_prev, + alpha, falpha, fpalpha, lower, upper, order); + + } + + alpha_prev = alpha; + falpha_prev = falpha; + fpalpha_prev = fpalpha; + alpha = alpha_next; + } + + /* Sectioning of bracket [a,b] */ + + while (i++ < section_iters) + { + delta = b - a; + + { + double lower = a + tau2 * delta; + double upper = b - tau3 * delta; + + alpha = interpolate (a, fa, fpa, b, fb, fpb, lower, upper, order); + } + + falpha = GSL_FN_FDF_EVAL_F (fn, alpha); + + if ((a-alpha)*fpa <= GSL_DBL_EPSILON) { + /* roundoff prevents progress */ + return GSL_ENOPROG; + }; + + if (falpha > f0 + rho * alpha * fp0 || falpha >= fa) + { + /* a_next = a; */ + b = alpha; fb = falpha; fpb = GSL_NAN; + } + else + { + fpalpha = GSL_FN_FDF_EVAL_DF (fn, alpha); + + if (fabs(fpalpha) <= -sigma * fp0) + { + *alpha_new = alpha; + return GSL_SUCCESS; /* terminate */ + } + + if ( ((b-a) >= 0 && fpalpha >= 0) || ((b-a) <=0 && fpalpha <= 0)) + { + b = a; fb = fa; fpb = fpa; + a = alpha; fa = falpha; fpa = fpalpha; + } + else + { + a = alpha; fa = falpha; fpa = fpalpha; + } + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multimin/linear_wrapper.c b/software/gsl-1.15/multimin/linear_wrapper.c new file mode 100644 index 000000000..b284da9d5 --- /dev/null +++ b/software/gsl-1.15/multimin/linear_wrapper.c @@ -0,0 +1,185 @@ +typedef struct +{ + gsl_function_fdf fdf_linear; + gsl_multimin_function_fdf *fdf; + /* fixed values */ + const gsl_vector *x; + const gsl_vector *g; + const gsl_vector *p; + + /* cached values, for x(alpha) = x + alpha * p */ + double f_alpha; + double df_alpha; + gsl_vector *x_alpha; + gsl_vector *g_alpha; + + /* cache "keys" */ + double f_cache_key; + double df_cache_key; + double x_cache_key; + double g_cache_key; +} +wrapper_t; + +static void +moveto (double alpha, wrapper_t * w) +{ + if (alpha == w->x_cache_key) /* using previously cached position */ + { + return; + } + + /* set x_alpha = x + alpha * p */ + + gsl_vector_memcpy (w->x_alpha, w->x); + gsl_blas_daxpy (alpha, w->p, w->x_alpha); + + w->x_cache_key = alpha; +} + +static double +slope (wrapper_t * w) /* compute gradient . direction */ +{ + double df; + gsl_blas_ddot (w->g_alpha, w->p, &df); + return df; +} + +static double +wrap_f (double alpha, void *params) +{ + wrapper_t *w = (wrapper_t *) params; + if (alpha == w->f_cache_key) /* using previously cached f(alpha) */ + { + return w->f_alpha; + } + + moveto (alpha, w); + + w->f_alpha = GSL_MULTIMIN_FN_EVAL_F (w->fdf, w->x_alpha); + w->f_cache_key = alpha; + + return w->f_alpha; +} + +static double +wrap_df (double alpha, void *params) +{ + wrapper_t *w = (wrapper_t *) params; + if (alpha == w->df_cache_key) /* using previously cached df(alpha) */ + { + return w->df_alpha; + } + + moveto (alpha, w); + + if (alpha != w->g_cache_key) + { + GSL_MULTIMIN_FN_EVAL_DF (w->fdf, w->x_alpha, w->g_alpha); + w->g_cache_key = alpha; + } + + w->df_alpha = slope (w); + w->df_cache_key = alpha; + + return w->df_alpha; +} + +static void +wrap_fdf (double alpha, void *params, double *f, double *df) +{ + wrapper_t *w = (wrapper_t *) params; + + /* Check for previously cached values */ + + if (alpha == w->f_cache_key && alpha == w->df_cache_key) + { + *f = w->f_alpha; + *df = w->df_alpha; + return; + } + + if (alpha == w->f_cache_key || alpha == w->df_cache_key) + { + *f = wrap_f (alpha, params); + *df = wrap_df (alpha, params); + return; + } + + moveto (alpha, w); + GSL_MULTIMIN_FN_EVAL_F_DF (w->fdf, w->x_alpha, &w->f_alpha, w->g_alpha); + w->f_cache_key = alpha; + w->g_cache_key = alpha; + + w->df_alpha = slope (w); + w->df_cache_key = alpha; + + *f = w->f_alpha; + *df = w->df_alpha; +} + +static void +prepare_wrapper (wrapper_t * w, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double f, const gsl_vector *g, + const gsl_vector * p, + gsl_vector * x_alpha, gsl_vector *g_alpha) +{ + w->fdf_linear.f = &wrap_f; + w->fdf_linear.df = &wrap_df; + w->fdf_linear.fdf = &wrap_fdf; + w->fdf_linear.params = (void *)w; /* pointer to "self" */ + + w->fdf = fdf; + + w->x = x; + w->g = g; + w->p = p; + + w->x_alpha = x_alpha; + w->g_alpha = g_alpha; + + gsl_vector_memcpy(w->x_alpha, w->x); + w->x_cache_key = 0.0; + + w->f_alpha = f; + w->f_cache_key = 0.0; + + gsl_vector_memcpy(w->g_alpha, w->g); + w->g_cache_key = 0.0; + + w->df_alpha = slope(w); + w->df_cache_key = 0.0; +} + +static void +update_position (wrapper_t * w, double alpha, gsl_vector *x, double *f, gsl_vector *g) +{ + /* ensure that everything is fully cached */ + { double f_alpha, df_alpha; wrap_fdf (alpha, w, &f_alpha, &df_alpha); } ; + + *f = w->f_alpha; + gsl_vector_memcpy(x, w->x_alpha); + gsl_vector_memcpy(g, w->g_alpha); +} + +static void +change_direction (wrapper_t * w) +{ + /* Convert the cache values from the end of the current minimisation + to those needed for the start of the next minimisation, alpha=0 */ + + /* The new x_alpha for alpha=0 is the current position */ + gsl_vector_memcpy (w->x_alpha, w->x); + w->x_cache_key = 0.0; + + /* The function value does not change */ + w->f_cache_key = 0.0; + + /* The new g_alpha for alpha=0 is the current gradient at the endpoint */ + gsl_vector_memcpy (w->g_alpha, w->g); + w->g_cache_key = 0.0; + + /* Calculate the slope along the new direction vector, p */ + w->df_alpha = slope (w); + w->df_cache_key = 0.0; +} diff --git a/software/gsl-1.15/multimin/simplex.c b/software/gsl-1.15/multimin/simplex.c new file mode 100644 index 000000000..0d05b1b6a --- /dev/null +++ b/software/gsl-1.15/multimin/simplex.c @@ -0,0 +1,467 @@ +/* multimin/simplex.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 2002 Tuomo Keskitalo, Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + - Originally written by Tuomo Keskitalo + - Corrections to nmsimplex_iterate and other functions + by Ivo Alxneit + - Additional help by Brian Gough +*/ + +/* The Simplex method of Nelder and Mead, + also known as the polytope search alogorithm. Ref: + Nelder, J.A., Mead, R., Computer Journal 7 (1965) pp. 308-313. + + This implementation uses n+1 corner points in the simplex. +*/ + +#include +#include +#include +#include + +typedef struct +{ + gsl_matrix *x1; /* simplex corner points */ + gsl_vector *y1; /* function value at corner points */ + gsl_vector *ws1; /* workspace 1 for algorithm */ + gsl_vector *ws2; /* workspace 2 for algorithm */ +} +nmsimplex_state_t; + +static double +nmsimplex_move_corner (const double coeff, const nmsimplex_state_t * state, + size_t corner, gsl_vector * xc, + const gsl_multimin_function * f) +{ + /* moves a simplex corner scaled by coeff (negative value represents + mirroring by the middle point of the "other" corner points) + and gives new corner in xc and function value at xc as a + return value + */ + + gsl_matrix *x1 = state->x1; + + size_t i, j; + double newval, mp; + + for (j = 0; j < x1->size2; j++) + { + mp = 0.0; + for (i = 0; i < x1->size1; i++) + { + if (i != corner) + { + mp += (gsl_matrix_get (x1, i, j)); + } + } + mp /= (double) (x1->size1 - 1); + newval = mp - coeff * (mp - gsl_matrix_get (x1, corner, j)); + gsl_vector_set (xc, j, newval); + } + + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + + return newval; +} + +static int +nmsimplex_contract_by_best (nmsimplex_state_t * state, size_t best, + gsl_vector * xc, gsl_multimin_function * f) +{ + + /* Function contracts the simplex in respect to + best valued corner. That is, all corners besides the + best corner are moved. */ + + /* the xc vector is simply work space here */ + + gsl_matrix *x1 = state->x1; + gsl_vector *y1 = state->y1; + + size_t i, j; + double newval; + + int status = GSL_SUCCESS; + + for (i = 0; i < x1->size1; i++) + { + if (i != best) + { + for (j = 0; j < x1->size2; j++) + { + newval = 0.5 * (gsl_matrix_get (x1, i, j) + + gsl_matrix_get (x1, best, j)); + gsl_matrix_set (x1, i, j, newval); + } + + /* evaluate function in the new point */ + + gsl_matrix_get_row (xc, x1, i); + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + gsl_vector_set (y1, i, newval); + + /* notify caller that we found at least one bad function value. + we finish the contraction (and do not abort) to allow the user + to handle the situation */ + + if(!gsl_finite(newval)) + { + status = GSL_EBADFUNC; + } + } + } + + return status; +} + +static int +nmsimplex_calc_center (const nmsimplex_state_t * state, gsl_vector * mp) +{ + /* calculates the center of the simplex to mp */ + + gsl_matrix *x1 = state->x1; + + size_t i, j; + double val; + + for (j = 0; j < x1->size2; j++) + { + val = 0.0; + for (i = 0; i < x1->size1; i++) + { + val += gsl_matrix_get (x1, i, j); + } + val /= x1->size1; + gsl_vector_set (mp, j, val); + } + + return GSL_SUCCESS; +} + +static double +nmsimplex_size (nmsimplex_state_t * state) +{ + /* calculates simplex size as average sum of length of vectors + from simplex center to corner points: + + ( sum ( || y - y_middlepoint || ) ) / n + */ + + gsl_vector *s = state->ws1; + gsl_vector *mp = state->ws2; + + gsl_matrix *x1 = state->x1; + size_t i; + + double ss = 0.0; + + /* Calculate middle point */ + nmsimplex_calc_center (state, mp); + + for (i = 0; i < x1->size1; i++) + { + gsl_matrix_get_row (s, x1, i); + gsl_blas_daxpy (-1.0, mp, s); + ss += gsl_blas_dnrm2 (s); + } + + return ss / (double) (x1->size1); +} + +static int +nmsimplex_alloc (void *vstate, size_t n) +{ + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + if (n == 0) + { + GSL_ERROR("invalid number of parameters specified", GSL_EINVAL); + } + + state->x1 = gsl_matrix_alloc (n + 1, n); + + if (state->x1 == NULL) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->y1 = gsl_vector_alloc (n + 1); + + if (state->y1 == NULL) + { + gsl_matrix_free(state->x1); + GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); + } + + state->ws1 = gsl_vector_alloc (n); + + if (state->ws1 == NULL) + { + gsl_matrix_free(state->x1); + gsl_vector_free(state->y1); + GSL_ERROR ("failed to allocate space for ws1", GSL_ENOMEM); + } + + state->ws2 = gsl_vector_alloc (n); + + if (state->ws2 == NULL) + { + gsl_matrix_free(state->x1); + gsl_vector_free(state->y1); + gsl_vector_free(state->ws1); + GSL_ERROR ("failed to allocate space for ws2", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +nmsimplex_set (void *vstate, gsl_multimin_function * f, + const gsl_vector * x, + double *size, const gsl_vector * step_size) +{ + int status; + size_t i; + double val; + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_vector *xtemp = state->ws1; + + if (xtemp->size != x->size) + { + GSL_ERROR("incompatible size of x", GSL_EINVAL); + } + + if (xtemp->size != step_size->size) + { + GSL_ERROR("incompatible size of step_size", GSL_EINVAL); + } + + /* first point is the original x0 */ + + val = GSL_MULTIMIN_FN_EVAL (f, x); + + if (!gsl_finite(val)) + { + GSL_ERROR("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, 0, x); + gsl_vector_set (state->y1, 0, val); + + /* following points are initialized to x0 + step_size */ + + for (i = 0; i < x->size; i++) + { + status = gsl_vector_memcpy (xtemp, x); + + if (status != 0) + { + GSL_ERROR ("vector memcopy failed", GSL_EFAILED); + } + + val = gsl_vector_get (xtemp, i) + gsl_vector_get (step_size, i); + gsl_vector_set (xtemp, i, val); + val = GSL_MULTIMIN_FN_EVAL (f, xtemp); + + if (!gsl_finite(val)) + { + GSL_ERROR("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, i + 1, xtemp); + gsl_vector_set (state->y1, i + 1, val); + } + + /* Initialize simplex size */ + + *size = nmsimplex_size (state); + + return GSL_SUCCESS; +} + +static void +nmsimplex_free (void *vstate) +{ + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); +} + +static int +nmsimplex_iterate (void *vstate, gsl_multimin_function * f, + gsl_vector * x, double *size, double *fval) +{ + + /* Simplex iteration tries to minimize function f value */ + /* Includes corrections from Ivo Alxneit */ + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + /* xc and xc2 vectors store tried corner point coordinates */ + + gsl_vector *xc = state->ws1; + gsl_vector *xc2 = state->ws2; + gsl_vector *y1 = state->y1; + gsl_matrix *x1 = state->x1; + + size_t n = y1->size; + size_t i; + size_t hi, s_hi, lo; + double dhi, ds_hi, dlo; + int status; + double val, val2; + + + if (xc->size != x->size) + { + GSL_ERROR("incompatible size of x", GSL_EINVAL); + } + + /* get index of highest, second highest and lowest point */ + + dhi = dlo = gsl_vector_get (y1, 0); + hi = 0; lo = 0; + + ds_hi = gsl_vector_get(y1, 1); + s_hi = 1; + + for (i = 1; i < n; i++) + { + val = (gsl_vector_get (y1, i)); + if (val < dlo) + { + dlo = val; + lo = i; + } + else if (val > dhi) + { + ds_hi = dhi; + s_hi = hi; + dhi = val; + hi = i; + } + else if (val > ds_hi) + { + ds_hi = val; + s_hi = i; + } + } + + /* reflect the highest value */ + + val = nmsimplex_move_corner (-1.0, state, hi, xc, f); + + if (gsl_finite(val) && val < gsl_vector_get (y1, lo)) + { + + /* reflected point becomes lowest point, try expansion */ + + val2 = nmsimplex_move_corner (-2.0, state, hi, xc2, f); + + if (gsl_finite(val2) && val2 < gsl_vector_get (y1, lo)) + { + gsl_matrix_set_row (x1, hi, xc2); + gsl_vector_set (y1, hi, val2); + } + else + { + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + } + + /* reflection does not improve things enough + or + we got a non-finite (illegal) function value */ + + else if (!gsl_finite(val) || val > gsl_vector_get (y1, s_hi)) + { + if (gsl_finite(val) && val <= gsl_vector_get (y1, hi)) + { + + /* if trial point is better than highest point, replace + highest point */ + + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + + /* try one dimensional contraction */ + + val2 = nmsimplex_move_corner (0.5, state, hi, xc2, f); + + if (gsl_finite(val2) && val2 <= gsl_vector_get (y1, hi)) + { + gsl_matrix_set_row (state->x1, hi, xc2); + gsl_vector_set (y1, hi, val2); + } + + else + { + + /* contract the whole simplex in respect to the best point */ + + status = nmsimplex_contract_by_best (state, lo, xc, f); + if (status != GSL_SUCCESS) + { + GSL_ERROR ("nmsimplex_contract_by_best failed", GSL_EFAILED); + } + } + } + else + { + + /* trial point is better than second highest point. + Replace highest point by it */ + + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + + /* return lowest point of simplex as x */ + + lo = gsl_vector_min_index (y1); + gsl_matrix_get_row (x, x1, lo); + *fval = gsl_vector_get (y1, lo); + + /* Update simplex size */ + + *size = nmsimplex_size (state); + + return GSL_SUCCESS; +} + +static const gsl_multimin_fminimizer_type nmsimplex_type = +{ "nmsimplex", /* name */ + sizeof (nmsimplex_state_t), + &nmsimplex_alloc, + &nmsimplex_set, + &nmsimplex_iterate, + &nmsimplex_free +}; + +const gsl_multimin_fminimizer_type + * gsl_multimin_fminimizer_nmsimplex = &nmsimplex_type; diff --git a/software/gsl-1.15/multimin/simplex2.c b/software/gsl-1.15/multimin/simplex2.c new file mode 100644 index 000000000..59dd57dbe --- /dev/null +++ b/software/gsl-1.15/multimin/simplex2.c @@ -0,0 +1,701 @@ +/* multimin/simplex2.c + * + * Copyright (C) 2007, 2008, 2009 Brian Gough + * Copyright (C) 2002 Tuomo Keskitalo, Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + - Originally written by Tuomo Keskitalo + - Corrections to nmsimplex_iterate and other functions + by Ivo Alxneit + - Additional help by Brian Gough + - Optimisations added by Brian Gough + + use BLAS for frequently-called functions + + keep track of the center to avoid unnecessary computation + + compute size as RMS value, allowing linear update on each step + instead of recomputing from all N+1 vectors. +*/ + +/* The Simplex method of Nelder and Mead, also known as the polytope + search alogorithm. Ref: Nelder, J.A., Mead, R., Computer Journal 7 + (1965) pp. 308-313. + + This implementation uses n+1 corner points in the simplex. +*/ + +#include +#include +#include +#include +#include + +typedef struct +{ + gsl_matrix *x1; /* simplex corner points */ + gsl_vector *y1; /* function value at corner points */ + gsl_vector *ws1; /* workspace 1 for algorithm */ + gsl_vector *ws2; /* workspace 2 for algorithm */ + gsl_vector *center; /* center of all points */ + gsl_vector *delta; /* current step */ + gsl_vector *xmc; /* x - center (workspace) */ + double S2; + unsigned long count; +} +nmsimplex_state_t; + +static int +compute_center (const nmsimplex_state_t * state, gsl_vector * center); +static double +compute_size (nmsimplex_state_t * state, const gsl_vector * center); + +static double +try_corner_move (const double coeff, + const nmsimplex_state_t * state, + size_t corner, + gsl_vector * xc, const gsl_multimin_function * f) +{ + /* moves a simplex corner scaled by coeff (negative value represents + mirroring by the middle point of the "other" corner points) + and gives new corner in xc and function value at xc as a + return value + */ + + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + double newval; + + /* xc = (1-coeff)*(P/(P-1)) * center(all) + ((P*coeff-1)/(P-1))*x_corner */ + { + double alpha = (1 - coeff) * P / (P - 1.0); + double beta = (P * coeff - 1.0) / (P - 1.0); + gsl_vector_const_view row = gsl_matrix_const_row (x1, corner); + + gsl_vector_memcpy (xc, state->center); + gsl_blas_dscal (alpha, xc); + gsl_blas_daxpy (beta, &row.vector, xc); + } + + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + + return newval; +} + + +static void +update_point (nmsimplex_state_t * state, size_t i, + const gsl_vector * x, double val) +{ + gsl_vector_const_view x_orig = gsl_matrix_const_row (state->x1, i); + const size_t P = state->x1->size1; + + /* Compute delta = x - x_orig */ + gsl_vector_memcpy (state->delta, x); + gsl_blas_daxpy (-1.0, &x_orig.vector, state->delta); + + /* Compute xmc = x_orig - c */ + gsl_vector_memcpy (state->xmc, &x_orig.vector); + gsl_blas_daxpy (-1.0, state->center, state->xmc); + + /* Update size: S2' = S2 + (2/P) * (x_orig - c).delta + (P-1)*(delta/P)^2 */ + { + double d = gsl_blas_dnrm2 (state->delta); + double xmcd; + gsl_blas_ddot (state->xmc, state->delta, &xmcd); + state->S2 += (2.0 / P) * xmcd + ((P - 1.0) / P) * (d * d / P); + } + + /* Update center: c' = c + (x - x_orig) / P */ + + { + double alpha = 1.0 / P; + gsl_blas_daxpy (-alpha, &x_orig.vector, state->center); + gsl_blas_daxpy (alpha, x, state->center); + } + + gsl_matrix_set_row (state->x1, i, x); + gsl_vector_set (state->y1, i, val); +} + +static int +contract_by_best (nmsimplex_state_t * state, size_t best, + gsl_vector * xc, gsl_multimin_function * f) +{ + + /* Function contracts the simplex in respect to best valued + corner. That is, all corners besides the best corner are moved. + (This function is rarely called in practice, since it is the last + choice, hence not optimised - BJG) */ + + /* the xc vector is simply work space here */ + + gsl_matrix *x1 = state->x1; + gsl_vector *y1 = state->y1; + + size_t i, j; + double newval; + + int status = GSL_SUCCESS; + + for (i = 0; i < x1->size1; i++) + { + if (i != best) + { + for (j = 0; j < x1->size2; j++) + { + newval = 0.5 * (gsl_matrix_get (x1, i, j) + + gsl_matrix_get (x1, best, j)); + gsl_matrix_set (x1, i, j, newval); + } + + /* evaluate function in the new point */ + + gsl_matrix_get_row (xc, x1, i); + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + gsl_vector_set (y1, i, newval); + + /* notify caller that we found at least one bad function value. + we finish the contraction (and do not abort) to allow the user + to handle the situation */ + + if (!gsl_finite (newval)) + { + status = GSL_EBADFUNC; + } + } + } + + /* We need to update the centre and size as well */ + compute_center (state, state->center); + compute_size (state, state->center); + + return status; +} + +static int +compute_center (const nmsimplex_state_t * state, gsl_vector * center) +{ + /* calculates the center of the simplex and stores in center */ + + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + size_t i; + + gsl_vector_set_zero (center); + + for (i = 0; i < P; i++) + { + gsl_vector_const_view row = gsl_matrix_const_row (x1, i); + gsl_blas_daxpy (1.0, &row.vector, center); + } + + { + const double alpha = 1.0 / P; + gsl_blas_dscal (alpha, center); + } + + return GSL_SUCCESS; +} + +static double +compute_size (nmsimplex_state_t * state, const gsl_vector * center) +{ + /* calculates simplex size as rms sum of length of vectors + from simplex center to corner points: + + sqrt( sum ( || y - y_middlepoint ||^2 ) / n ) + */ + + gsl_vector *s = state->ws1; + gsl_matrix *x1 = state->x1; + const size_t P = x1->size1; + size_t i; + + double ss = 0.0; + + for (i = 0; i < P; i++) + { + double t; + gsl_matrix_get_row (s, x1, i); + gsl_blas_daxpy (-1.0, center, s); + t = gsl_blas_dnrm2 (s); + ss += t * t; + } + + /* Store squared size in the state */ + state->S2 = (ss / P); + + return sqrt (ss / P); +} + +static int +nmsimplex_alloc (void *vstate, size_t n) +{ + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + if (n == 0) + { + GSL_ERROR ("invalid number of parameters specified", GSL_EINVAL); + } + + state->x1 = gsl_matrix_alloc (n + 1, n); + + if (state->x1 == NULL) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->y1 = gsl_vector_alloc (n + 1); + + if (state->y1 == NULL) + { + gsl_matrix_free (state->x1); + GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); + } + + state->ws1 = gsl_vector_alloc (n); + + if (state->ws1 == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + GSL_ERROR ("failed to allocate space for ws1", GSL_ENOMEM); + } + + state->ws2 = gsl_vector_alloc (n); + + if (state->ws2 == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + GSL_ERROR ("failed to allocate space for ws2", GSL_ENOMEM); + } + + state->center = gsl_vector_alloc (n); + + if (state->center == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + GSL_ERROR ("failed to allocate space for center", GSL_ENOMEM); + } + + state->delta = gsl_vector_alloc (n); + + if (state->delta == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + GSL_ERROR ("failed to allocate space for delta", GSL_ENOMEM); + } + + state->xmc = gsl_vector_alloc (n); + + if (state->xmc == NULL) + { + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + gsl_vector_free (state->delta); + GSL_ERROR ("failed to allocate space for xmc", GSL_ENOMEM); + } + + state->count = 0; + + return GSL_SUCCESS; +} + +static void +nmsimplex_free (void *vstate) +{ + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + gsl_vector_free (state->center); + gsl_vector_free (state->delta); + gsl_vector_free (state->xmc); +} + +static int +nmsimplex_set (void *vstate, gsl_multimin_function * f, + const gsl_vector * x, + double *size, const gsl_vector * step_size) +{ + int status; + size_t i; + double val; + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_vector *xtemp = state->ws1; + + if (xtemp->size != x->size) + { + GSL_ERROR ("incompatible size of x", GSL_EINVAL); + } + + if (xtemp->size != step_size->size) + { + GSL_ERROR ("incompatible size of step_size", GSL_EINVAL); + } + + /* first point is the original x0 */ + + val = GSL_MULTIMIN_FN_EVAL (f, x); + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, 0, x); + gsl_vector_set (state->y1, 0, val); + + /* following points are initialized to x0 + step_size */ + + for (i = 0; i < x->size; i++) + { + status = gsl_vector_memcpy (xtemp, x); + + if (status != 0) + { + GSL_ERROR ("vector memcopy failed", GSL_EFAILED); + } + + { + double xi = gsl_vector_get (x, i); + double si = gsl_vector_get (step_size, i); + + gsl_vector_set (xtemp, i, xi + si); + val = GSL_MULTIMIN_FN_EVAL (f, xtemp); + } + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, i + 1, xtemp); + gsl_vector_set (state->y1, i + 1, val); + } + + compute_center (state, state->center); + + /* Initialize simplex size */ + *size = compute_size (state, state->center); + + state->count++; + + return GSL_SUCCESS; +} + +static int +nmsimplex_iterate (void *vstate, gsl_multimin_function * f, + gsl_vector * x, double *size, double *fval) +{ + + /* Simplex iteration tries to minimize function f value */ + /* Includes corrections from Ivo Alxneit */ + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + /* xc and xc2 vectors store tried corner point coordinates */ + + gsl_vector *xc = state->ws1; + gsl_vector *xc2 = state->ws2; + gsl_vector *y1 = state->y1; + gsl_matrix *x1 = state->x1; + + const size_t n = y1->size; + size_t i; + size_t hi, s_hi, lo; + double dhi, ds_hi, dlo; + int status; + double val, val2; + + if (xc->size != x->size) + { + GSL_ERROR ("incompatible size of x", GSL_EINVAL); + } + + /* get index of highest, second highest and lowest point */ + + dhi = dlo = gsl_vector_get (y1, 0); + hi = 0; + lo = 0; + + ds_hi = gsl_vector_get (y1, 1); + s_hi = 1; + + for (i = 1; i < n; i++) + { + val = (gsl_vector_get (y1, i)); + if (val < dlo) + { + dlo = val; + lo = i; + } + else if (val > dhi) + { + ds_hi = dhi; + s_hi = hi; + dhi = val; + hi = i; + } + else if (val > ds_hi) + { + ds_hi = val; + s_hi = i; + } + } + + /* try reflecting the highest value point */ + + val = try_corner_move (-1.0, state, hi, xc, f); + + if (gsl_finite (val) && val < gsl_vector_get (y1, lo)) + { + /* reflected point is lowest, try expansion */ + + val2 = try_corner_move (-2.0, state, hi, xc2, f); + + if (gsl_finite (val2) && val2 < gsl_vector_get (y1, lo)) + { + update_point (state, hi, xc2, val2); + } + else + { + update_point (state, hi, xc, val); + } + } + else if (!gsl_finite (val) || val > gsl_vector_get (y1, s_hi)) + { + /* reflection does not improve things enough, or we got a + non-finite function value */ + + if (gsl_finite (val) && val <= gsl_vector_get (y1, hi)) + { + /* if trial point is better than highest point, replace + highest point */ + + update_point (state, hi, xc, val); + } + + /* try one-dimensional contraction */ + + val2 = try_corner_move (0.5, state, hi, xc2, f); + + if (gsl_finite (val2) && val2 <= gsl_vector_get (y1, hi)) + { + update_point (state, hi, xc2, val2); + } + else + { + /* contract the whole simplex about the best point */ + + status = contract_by_best (state, lo, xc, f); + + if (status != GSL_SUCCESS) + { + GSL_ERROR ("contraction failed", GSL_EFAILED); + } + } + } + else + { + /* trial point is better than second highest point. Replace + highest point by it */ + + update_point (state, hi, xc, val); + } + + /* return lowest point of simplex as x */ + + lo = gsl_vector_min_index (y1); + gsl_matrix_get_row (x, x1, lo); + *fval = gsl_vector_get (y1, lo); + + /* Update simplex size */ + + { + double S2 = state->S2; + + if (S2 > 0) + { + *size = sqrt (S2); + } + else + { + /* recompute if accumulated error has made size invalid */ + *size = compute_size (state, state->center); + } + } + + return GSL_SUCCESS; +} + +static const gsl_multimin_fminimizer_type nmsimplex_type = +{ "nmsimplex2", /* name */ + sizeof (nmsimplex_state_t), + &nmsimplex_alloc, + &nmsimplex_set, + &nmsimplex_iterate, + &nmsimplex_free +}; + +const gsl_multimin_fminimizer_type + * gsl_multimin_fminimizer_nmsimplex2 = &nmsimplex_type; + + +static inline double +ran_unif (unsigned long *seed) +{ + unsigned long s = *seed; + *seed = (s * 69069 + 1) & 0xffffffffUL; + return (*seed) / 4294967296.0; +} + +static int +nmsimplex_set_rand (void *vstate, gsl_multimin_function * f, + const gsl_vector * x, + double *size, const gsl_vector * step_size) +{ + size_t i, j; + double val; + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_vector *xtemp = state->ws1; + + if (xtemp->size != x->size) + { + GSL_ERROR ("incompatible size of x", GSL_EINVAL); + } + + if (xtemp->size != step_size->size) + { + GSL_ERROR ("incompatible size of step_size", GSL_EINVAL); + } + + /* first point is the original x0 */ + + val = GSL_MULTIMIN_FN_EVAL (f, x); + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_matrix_set_row (state->x1, 0, x); + gsl_vector_set (state->y1, 0, val); + + { + gsl_matrix_view m = + gsl_matrix_submatrix (state->x1, 1, 0, x->size, x->size); + + /* generate a random orthornomal basis */ + unsigned long seed = state->count ^ 0x12345678; + + ran_unif (&seed); /* warm it up */ + + gsl_matrix_set_identity (&m.matrix); + + /* start with random reflections */ + for (i = 0; i < x->size; i++) + { + double s = ran_unif (&seed); + if (s > 0.5) gsl_matrix_set (&m.matrix, i, i, -1.0); + } + + /* apply random rotations */ + for (i = 0; i < x->size; i++) + { + for (j = i + 1; j < x->size; j++) + { + /* rotate columns i and j by a random angle */ + double angle = 2.0 * M_PI * ran_unif (&seed); + double c = cos (angle), s = sin (angle); + gsl_vector_view c_i = gsl_matrix_column (&m.matrix, i); + gsl_vector_view c_j = gsl_matrix_column (&m.matrix, j); + gsl_blas_drot (&c_i.vector, &c_j.vector, c, s); + } + } + + /* scale the orthonormal basis by the user-supplied step_size in + each dimension, and use as an offset from the central point x */ + + for (i = 0; i < x->size; i++) + { + double x_i = gsl_vector_get (x, i); + double s_i = gsl_vector_get (step_size, i); + gsl_vector_view c_i = gsl_matrix_column (&m.matrix, i); + + for (j = 0; j < x->size; j++) + { + double x_ij = gsl_vector_get (&c_i.vector, j); + gsl_vector_set (&c_i.vector, j, x_i + s_i * x_ij); + } + } + + /* compute the function values at each offset point */ + + for (i = 0; i < x->size; i++) + { + gsl_vector_view r_i = gsl_matrix_row (&m.matrix, i); + + val = GSL_MULTIMIN_FN_EVAL (f, &r_i.vector); + + if (!gsl_finite (val)) + { + GSL_ERROR ("non-finite function value encountered", GSL_EBADFUNC); + } + + gsl_vector_set (state->y1, i + 1, val); + } + } + + compute_center (state, state->center); + + /* Initialize simplex size */ + *size = compute_size (state, state->center); + + state->count++; + + return GSL_SUCCESS; +} + +static const gsl_multimin_fminimizer_type nmsimplex2rand_type = +{ "nmsimplex2rand", /* name */ + sizeof (nmsimplex_state_t), + &nmsimplex_alloc, + &nmsimplex_set_rand, + &nmsimplex_iterate, + &nmsimplex_free +}; + +const gsl_multimin_fminimizer_type + * gsl_multimin_fminimizer_nmsimplex2rand = &nmsimplex2rand_type; diff --git a/software/gsl-1.15/multimin/steepest_descent.c b/software/gsl-1.15/multimin/steepest_descent.c new file mode 100644 index 000000000..1738f761b --- /dev/null +++ b/software/gsl-1.15/multimin/steepest_descent.c @@ -0,0 +1,176 @@ +/* multimin/steepest_descent.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* steepest_descent.c -- the steepest descent algorithm */ + +/* Modified by Brian Gough to use single iteration structure */ + +#include +#include +#include +#include + +typedef struct +{ + double step; + double max_step; + double tol; + gsl_vector *x1; + gsl_vector *g1; +} +steepest_descent_state_t; + +static int +steepest_descent_alloc (void *vstate, size_t n) +{ + steepest_descent_state_t *state = (steepest_descent_state_t *) vstate; + + state->x1 = gsl_vector_alloc (n); + + if (state->x1 == NULL) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->g1 = gsl_vector_alloc (n); + + if (state->g1 == NULL) + { + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g1", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +steepest_descent_set (void *vstate, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double *f, + gsl_vector * gradient, double step_size, double tol) +{ + steepest_descent_state_t *state = (steepest_descent_state_t *) vstate; + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x, f, gradient); + + state->step = step_size; + state->max_step = step_size; + state->tol = tol; + + return GSL_SUCCESS; +} + + +static void +steepest_descent_free (void *vstate) +{ + steepest_descent_state_t *state = (steepest_descent_state_t *) vstate; + + gsl_vector_free (state->x1); + gsl_vector_free (state->g1); +} + +static int +steepest_descent_restart (void *vstate) +{ + steepest_descent_state_t *state = (steepest_descent_state_t *) vstate; + + state->step = state->max_step; + + return GSL_SUCCESS; +} + +static int +steepest_descent_iterate (void *vstate, gsl_multimin_function_fdf * fdf, + gsl_vector * x, double *f, + gsl_vector * gradient, gsl_vector * dx) +{ + steepest_descent_state_t *state = (steepest_descent_state_t *) vstate; + + gsl_vector *x1 = state->x1; + gsl_vector *g1 = state->g1; + + double f0 = *f; + double f1; + double step = state->step, tol = state->tol; + + int failed = 0; + + /* compute new trial point at x1= x - step * dir, where dir is the + normalized gradient */ + + double gnorm = gsl_blas_dnrm2 (gradient); + + if (gnorm == 0.0) + { + gsl_vector_set_zero (dx); + return GSL_ENOPROG; + } + +trial: + gsl_vector_set_zero (dx); + gsl_blas_daxpy (-step / gnorm, gradient, dx); + + gsl_vector_memcpy (x1, x); + gsl_blas_daxpy (1.0, dx, x1); + + if (gsl_vector_equal (x, x1)) + { + return GSL_ENOPROG; + } + + /* evaluate function and gradient at new point x1 */ + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x1, &f1, g1); + + if (f1 > f0) + { + /* downhill step failed, reduce step-size and try again */ + + failed = 1; + step *= tol; + goto trial; + } + + if (failed) + step *= tol; + else + step *= 2.0; + + state->step = step; + + gsl_vector_memcpy (x, x1); + gsl_vector_memcpy (gradient, g1); + + *f = f1; + + return GSL_SUCCESS; +} + +static const gsl_multimin_fdfminimizer_type steepest_descent_type = + { "steepest_descent", /* name */ + sizeof (steepest_descent_state_t), + &steepest_descent_alloc, + &steepest_descent_set, + &steepest_descent_iterate, + &steepest_descent_restart, + &steepest_descent_free +}; + +const gsl_multimin_fdfminimizer_type + * gsl_multimin_fdfminimizer_steepest_descent = &steepest_descent_type; diff --git a/software/gsl-1.15/multimin/test.c b/software/gsl-1.15/multimin/test.c new file mode 100644 index 000000000..a8e3bf23e --- /dev/null +++ b/software/gsl-1.15/multimin/test.c @@ -0,0 +1,223 @@ +/* multimin/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Modified by Tuomo Keskitalo to add Nelder Mead Simplex test suite */ + +#include +#include +#include +#include +#include +#include + +#include "test_funcs.h" + +unsigned int fcount, gcount; + +int +test_fdf(const char * desc, gsl_multimin_function_fdf *f, + initpt_function initpt, const gsl_multimin_fdfminimizer_type *T); + +int +test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt, + const gsl_multimin_fminimizer_type *T); + +int +main (void) +{ + gsl_ieee_env_setup (); + + { + const gsl_multimin_fdfminimizer_type *fdfminimizers[6]; + const gsl_multimin_fdfminimizer_type ** T; + + fdfminimizers[0] = gsl_multimin_fdfminimizer_steepest_descent; + fdfminimizers[1] = gsl_multimin_fdfminimizer_conjugate_pr; + fdfminimizers[2] = gsl_multimin_fdfminimizer_conjugate_fr; + fdfminimizers[3] = gsl_multimin_fdfminimizer_vector_bfgs; + fdfminimizers[4] = gsl_multimin_fdfminimizer_vector_bfgs2; + fdfminimizers[5] = 0; + + T = fdfminimizers; + + while (*T != 0) + { + test_fdf("Roth", &roth, roth_initpt,*T); + test_fdf("Wood", &wood, wood_initpt,*T); + test_fdf("Rosenbrock", &rosenbrock, rosenbrock_initpt,*T); + test_fdf("Rosenbrock1", &rosenbrock, rosenbrock_initpt1,*T); + test_fdf("SimpleAbs", &simpleabs, simpleabs_initpt,*T); + T++; + } + + T = fdfminimizers; + + while (*T != 0) + { + test_fdf("NRoth", &Nroth, roth_initpt,*T); + test_fdf("NWood", &Nwood, wood_initpt,*T); + test_fdf("NRosenbrock", &Nrosenbrock, rosenbrock_initpt,*T); + T++; + } + } + + + { + const gsl_multimin_fminimizer_type *fminimizers[4]; + const gsl_multimin_fminimizer_type ** T; + + fminimizers[0] = gsl_multimin_fminimizer_nmsimplex; + fminimizers[1] = gsl_multimin_fminimizer_nmsimplex2; + fminimizers[2] = gsl_multimin_fminimizer_nmsimplex2rand; + fminimizers[3] = 0; + + T = fminimizers; + + while (*T != 0) + { + test_f("Roth", &roth_fmin, roth_initpt,*T); + test_f("Wood", &wood_fmin, wood_initpt,*T); + test_f("Rosenbrock", &rosenbrock_fmin, rosenbrock_initpt,*T); + test_f("Spring", &spring_fmin, spring_initpt,*T); + T++; + } + } + + + exit (gsl_test_summary()); +} + +int +test_fdf(const char * desc, + gsl_multimin_function_fdf *f, + initpt_function initpt, + const gsl_multimin_fdfminimizer_type *T) +{ + int status; + size_t iter = 0; + double step_size; + + gsl_vector *x = gsl_vector_alloc (f->n); + + gsl_multimin_fdfminimizer *s; + fcount = 0; gcount = 0; + + (*initpt) (x); + + step_size = 0.1 * gsl_blas_dnrm2 (x); + + s = gsl_multimin_fdfminimizer_alloc(T, f->n); + + gsl_multimin_fdfminimizer_set (s, f, x, step_size, 0.1); + +#ifdef DEBUG + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); + printf("g "); gsl_vector_fprintf (stdout, s->gradient, "%g"); +#endif + + do + { + iter++; + status = gsl_multimin_fdfminimizer_iterate(s); + +#ifdef DEBUG + printf("%i: \n",iter); + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); + printf("g "); gsl_vector_fprintf (stdout, s->gradient, "%g"); + printf("f(x) %g\n",s->f); + printf("dx %g\n",gsl_blas_dnrm2(s->dx)); + printf("status=%d\n", status); + printf("\n"); +#endif + if (status == GSL_ENOPROG) + break; + + status = gsl_multimin_test_gradient(s->gradient,1e-3); + } + while (iter < 5000 && status == GSL_CONTINUE); + + /* If no error in iteration, test for numerical convergence */ + if (status == GSL_CONTINUE || status == GSL_ENOPROG) + status = (fabs(s->f) > 1e-5); + + gsl_test(status, "%s, on %s: %i iters (fn+g=%d+%d), f(x)=%g", + gsl_multimin_fdfminimizer_name(s),desc, iter, fcount, gcount, s->f); + + gsl_multimin_fdfminimizer_free(s); + gsl_vector_free(x); + + return status; +} + +int +test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt, + const gsl_multimin_fminimizer_type *T) +{ + int status; + size_t i, iter = 0; + + gsl_vector *x = gsl_vector_alloc (f->n); + + gsl_vector *step_size = gsl_vector_alloc (f->n); + + gsl_multimin_fminimizer *s; + + fcount = 0; gcount = 0; + (*initpt) (x); + + for (i = 0; i < f->n; i++) + gsl_vector_set (step_size, i, 1); + + s = gsl_multimin_fminimizer_alloc(T, f->n); + + gsl_multimin_fminimizer_set (s, f, x, step_size); + +#ifdef DEBUG + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); +#endif + + do + { + iter++; + status = gsl_multimin_fminimizer_iterate(s); + +#ifdef DEBUG + printf("%i: \n",iter); + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); + printf("f(x) %g\n", gsl_multimin_fminimizer_minimum (s)); + printf("size: %g\n", gsl_multimin_fminimizer_size (s)); + printf("\n"); +#endif + + status = gsl_multimin_test_size (gsl_multimin_fminimizer_size (s), + 1e-3); + } + while (iter < 5000 && status == GSL_CONTINUE); + + status |= (fabs(s->fval) > 1e-5); + + gsl_test(status, "%s, on %s: %d iter (fn=%d), f(x)=%g", + gsl_multimin_fminimizer_name(s),desc, iter, fcount, s->fval); + + gsl_multimin_fminimizer_free(s); + gsl_vector_free(x); + gsl_vector_free(step_size); + + return status; +} diff --git a/software/gsl-1.15/multimin/test_funcs.c b/software/gsl-1.15/multimin/test_funcs.c new file mode 100644 index 000000000..d783e4872 --- /dev/null +++ b/software/gsl-1.15/multimin/test_funcs.c @@ -0,0 +1,342 @@ +/* multimin/test_funcs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include "test_funcs.h" + +gsl_multimin_function_fdf simpleabs = +{&simpleabs_f, + &simpleabs_df, + &simpleabs_fdf, + 2, 0}; + +gsl_multimin_function simpleabs_fmin = +{&simpleabs_f, + 2, 0}; + +void simpleabs_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 1.0); + gsl_vector_set (x, 1, 2.0); +} + +void simpleabs_initpt1 (gsl_vector * x) +{ + gsl_vector_set (x, 0, 1.0); + gsl_vector_set (x, 1, 1.0); +} + +double simpleabs_f (const gsl_vector * x, void *params) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = u - 1; + double b = v - 2; + fcount++; + return fabs(a) + fabs(b); +} + +void simpleabs_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + gcount++; + gsl_vector_set(df,0, GSL_SIGN(u-1)); + gsl_vector_set(df,1, GSL_SIGN(v-2)); +} + +void simpleabs_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = u - 1; + double b = v - 2; + gcount++; + *f = fabs(a) + fabs(b); + gsl_vector_set(df,0, GSL_SIGN(u-1)); + gsl_vector_set(df,1, GSL_SIGN(v-2)); +} + +gsl_multimin_function_fdf rosenbrock = +{&rosenbrock_f, + &rosenbrock_df, + &rosenbrock_fdf, + 2, 0}; + +gsl_multimin_function rosenbrock_fmin = +{&rosenbrock_f, + 2, 0}; + +void rosenbrock_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, -1.2); + gsl_vector_set (x, 1, 1.0); +} + +void rosenbrock_initpt1 (gsl_vector * x) +{ + gsl_vector_set (x, 0, 1.0); + gsl_vector_set (x, 1, 1.0); +} + +double rosenbrock_f (const gsl_vector * x, void *params) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = u - 1; + double b = u * u - v; + fcount++; + return a * a + 10 * b * b; +} + +void rosenbrock_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double b = u * u - v; + gcount++; + gsl_vector_set(df,0,2 * (u - 1) + 40 * u * b); + gsl_vector_set(df,1,-20 * b); +} + +void rosenbrock_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = u - 1; + double b = u * u - v; + gcount++; + *f = a * a + 10 * b * b; + gsl_vector_set(df,0,2 * (u - 1) + 40 * u * b); + gsl_vector_set(df,1,-20 * b); +} + +gsl_multimin_function_fdf roth = +{&roth_f, + &roth_df, + &roth_fdf, + 2, 0}; + +gsl_multimin_function roth_fmin = +{&roth_f, + 2, 0}; + +void roth_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 4.5); + gsl_vector_set (x, 1, 3.5); +} + +double roth_f (const gsl_vector * x, void *params) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = -13.0 + u + ((5.0 - v)*v - 2.0)*v; + double b = -29.0 + u + ((v + 1.0)*v - 14.0)*v; + fcount++; + return a * a + b * b; +} + +void roth_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + double u = gsl_vector_get(x,0); + double v = gsl_vector_get(x,1); + double a = -13.0 + u + ((5.0 - v)*v - 2.0)*v; + double b = -29.0 + u + ((v + 1.0)*v - 14.0)*v; + double c = -2 + v * (10 - 3 * v); + double d = -14 + v * (2 + 3 * v); + gcount++; + gsl_vector_set(df,0,2 * a + 2 * b); + gsl_vector_set(df,1,2 * a * c + 2 * b * d); +} + +void roth_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + *f = roth_f (x,params); + roth_df(x,params,df); +} + +gsl_multimin_function_fdf wood = +{&wood_f, + &wood_df, + &wood_fdf, + 4, 0}; + +gsl_multimin_function wood_fmin = +{&wood_f, + 4, 0}; + +void +wood_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, -3.0); + gsl_vector_set (x, 1, -1.0); + gsl_vector_set (x, 2, -3.0); + gsl_vector_set (x, 3, -1.0); +} + +double wood_f (const gsl_vector * x, void *params) +{ + double u1 = gsl_vector_get(x,0); + double u2 = gsl_vector_get(x,1); + double u3 = gsl_vector_get(x,2); + double u4 = gsl_vector_get(x,3); + + double t1 = u1 * u1 - u2; + double t2 = u3 * u3 - u4; + fcount++; + return 100 * t1 * t1 + (1 - u1) * (1 - u1) + + 90 * t2 * t2 + (1 - u3) * (1 - u3) + + 10.1 * ( (1 - u2) * (1 - u2) + (1 - u4) * (1 - u4) ) + + 19.8 * (1 - u2) * (1 - u4); +} + +void wood_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + double u1 = gsl_vector_get(x,0); + double u2 = gsl_vector_get(x,1); + double u3 = gsl_vector_get(x,2); + double u4 = gsl_vector_get(x,3); + + double t1 = u1 * u1 - u2; + double t2 = u3 * u3 - u4; + gcount++; + gsl_vector_set(df,0, 400 * u1 * t1 - 2 * (1 - u1) ); + gsl_vector_set(df,1, -200 * t1 - 20.2 * (1 - u2) - 19.8 * (1 - u4) ); + gsl_vector_set(df,2, 360 * u3 * t2 - 2 * (1 - u3) ); + gsl_vector_set(df,3, -180 * t2 - 20.2 * (1 - u4) - 19.8 * (1 - u2) ); + +} + +void wood_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df) +{ + wood_df(x,params,df); + *f=wood_f(x,params); +} + +gsl_multimin_function_fdf Nrosenbrock = +{&rosenbrock_f, + &Nrosenbrock_df, + &Nrosenbrock_fdf, + 2, 0}; + +void Nrosenbrock_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + gsl_multimin_function F ; + F.f = rosenbrock_f; + F.params = params; + F.n = x->size; + gsl_multimin_diff (&F, x, df); +} + +void Nrosenbrock_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + *f = rosenbrock_f (x, params); + Nrosenbrock_df (x, params, df); +} + +gsl_multimin_function_fdf Nroth = +{&roth_f, + &Nroth_df, + &Nroth_fdf, + 2, 0}; + +void Nroth_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + gsl_multimin_function F ; + F.f = roth_f; + F.params = params; + F.n = x->size; + gsl_multimin_diff (&F, x, df); +} + +void Nroth_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + *f = roth_f (x, params); + Nroth_df (x, params, df); +} + + +gsl_multimin_function_fdf Nwood = +{&wood_f, + &Nwood_df, + &Nwood_fdf, + 4, 0}; + +void Nwood_df (const gsl_vector * x, void *params, gsl_vector * df) +{ + gsl_multimin_function F ; + F.f = wood_f; + F.params = params; + F.n = x->size; + gsl_multimin_diff (&F, x, df); +} + +void Nwood_fdf (const gsl_vector * x, void *params, double * f, + gsl_vector * df) +{ + *f = wood_f (x, params); + Nwood_df (x, params, df); +} + + +gsl_multimin_function spring_fmin = { &spring_f, + 3, 0 +}; + +void +spring_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 1.0); + gsl_vector_set (x, 1, 0.0); + gsl_vector_set (x, 2, 7.0 * M_PI); +} + +double +spring_f (const gsl_vector * x, void *params) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + + double theta = atan2 (x1, x0); + double r = sqrt (x0 * x0 + x1 * x1); + double z = x2; + while (z > M_PI) + z -= 2.0 * M_PI; + while (z < -M_PI) + z += 2.0 * M_PI; + { + double tmz = theta - z; + double rm1 = r - 1.0; + double ret = 0.1 * (expm1 (tmz * tmz + rm1 * rm1) + fabs (x2 / 10.0)); + return ret; + } +} + + diff --git a/software/gsl-1.15/multimin/test_funcs.h b/software/gsl-1.15/multimin/test_funcs.h new file mode 100644 index 000000000..c89169e0f --- /dev/null +++ b/software/gsl-1.15/multimin/test_funcs.h @@ -0,0 +1,68 @@ +/* multimin/test_funcs.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +extern unsigned int fcount, gcount; + +typedef void (*initpt_function) (gsl_vector * x); + +extern gsl_multimin_function_fdf simpleabs; +extern gsl_multimin_function simpleabs_fmin; +void simpleabs_initpt (gsl_vector * x); +void simpleabs_initpt1 (gsl_vector * x); +double simpleabs_f (const gsl_vector * x, void *params); +void simpleabs_df (const gsl_vector * x, void *params, gsl_vector * df); +void simpleabs_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf rosenbrock; +extern gsl_multimin_function rosenbrock_fmin; +void rosenbrock_initpt (gsl_vector * x); +void rosenbrock_initpt1 (gsl_vector * x); +double rosenbrock_f (const gsl_vector * x, void *params); +void rosenbrock_df (const gsl_vector * x, void *params, gsl_vector * df); +void rosenbrock_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf wood; +extern gsl_multimin_function wood_fmin; +void wood_initpt (gsl_vector * x); +double wood_f (const gsl_vector * x, void *params); +void wood_df (const gsl_vector * x, void *params, gsl_vector * df); +void wood_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf roth; +extern gsl_multimin_function roth_fmin; +void roth_initpt (gsl_vector * x); +double roth_f (const gsl_vector * x, void *params); +void roth_df (const gsl_vector * x, void *params, gsl_vector * df); +void roth_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf Nrosenbrock; +void Nrosenbrock_df (const gsl_vector * x, void *params, gsl_vector * df); +void Nrosenbrock_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf Nroth; +void Nroth_df (const gsl_vector * x, void *params, gsl_vector * df); +void Nroth_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function_fdf Nwood; +void Nwood_df (const gsl_vector * x, void *params, gsl_vector * df); +void Nwood_fdf (const gsl_vector * x, void *params, double * f, gsl_vector * df); + +extern gsl_multimin_function spring_fmin; +void spring_initpt (gsl_vector * x); +double spring_f (const gsl_vector *x, void *params); diff --git a/software/gsl-1.15/multimin/vector_bfgs.c b/software/gsl-1.15/multimin/vector_bfgs.c new file mode 100644 index 000000000..e1c958a4b --- /dev/null +++ b/software/gsl-1.15/multimin/vector_bfgs.c @@ -0,0 +1,350 @@ +/* multimin/vector_bfgs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Fabrice Rossi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* vector_bfgs.c -- Limited memory Broyden-Fletcher-Goldfarb-Shanno method */ + +/* Modified by Brian Gough to use single iteration structure */ + +#include +#include +#include + +#include "directional_minimize.c" + +typedef struct +{ + int iter; + double step; + double max_step; + double tol; + gsl_vector *x1; + gsl_vector *dx1; + gsl_vector *x2; + double g0norm; + double pnorm; + gsl_vector *p; + gsl_vector *x0; + gsl_vector *g0; + gsl_vector *dx0; + gsl_vector *dg0; +} +vector_bfgs_state_t; + +static int +vector_bfgs_alloc (void *vstate, size_t n) +{ + vector_bfgs_state_t *state = (vector_bfgs_state_t *) vstate; + + state->x1 = gsl_vector_calloc (n); + + if (state->x1 == 0) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->dx1 = gsl_vector_calloc (n); + + if (state->dx1 == 0) + { + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for dx1", GSL_ENOMEM); + } + + state->x2 = gsl_vector_calloc (n); + + if (state->x2 == 0) + { + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for x2", GSL_ENOMEM); + } + + state->p = gsl_vector_calloc (n); + + if (state->p == 0) + { + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); + } + + state->x0 = gsl_vector_calloc (n); + + if (state->x0 == 0) + { + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->g0 = gsl_vector_calloc (n); + + if (state->g0 == 0) + { + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->dx0 = gsl_vector_calloc (n); + + if (state->dx0 == 0) + { + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->dg0 = gsl_vector_calloc (n); + + if (state->dg0 == 0) + { + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +vector_bfgs_set (void *vstate, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double *f, gsl_vector * gradient, + double step_size, double tol) +{ + vector_bfgs_state_t *state = (vector_bfgs_state_t *) vstate; + + state->iter = 0; + state->step = step_size; + state->max_step = step_size; + state->tol = tol; + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x, f, gradient); + + /* Use the gradient as the initial direction */ + + gsl_vector_memcpy (state->x0, x); + gsl_vector_memcpy (state->p, gradient); + gsl_vector_memcpy (state->g0, gradient); + + { + double gnorm = gsl_blas_dnrm2 (gradient); + state->pnorm = gnorm; + state->g0norm = gnorm; + } + + return GSL_SUCCESS; +} + +static void +vector_bfgs_free (void *vstate) +{ + vector_bfgs_state_t *state = (vector_bfgs_state_t *) vstate; + + gsl_vector_free (state->dg0); + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + gsl_vector_free (state->x2); + gsl_vector_free (state->dx1); + gsl_vector_free (state->x1); +} + +static int +vector_bfgs_restart (void *vstate) +{ + vector_bfgs_state_t *state = (vector_bfgs_state_t *) vstate; + + state->iter = 0; + return GSL_SUCCESS; +} + +static int +vector_bfgs_iterate (void *vstate, gsl_multimin_function_fdf * fdf, + gsl_vector * x, double *f, + gsl_vector * gradient, gsl_vector * dx) +{ + vector_bfgs_state_t *state = (vector_bfgs_state_t *) vstate; + + gsl_vector *x1 = state->x1; + gsl_vector *dx1 = state->dx1; + gsl_vector *x2 = state->x2; + gsl_vector *p = state->p; + gsl_vector *g0 = state->g0; + gsl_vector *x0 = state->x0; + + double pnorm = state->pnorm; + double g0norm = state->g0norm; + + double fa = *f, fb, fc; + double dir; + double stepa = 0.0, stepb, stepc = state->step, tol = state->tol; + + double g1norm; + double pg; + + if (pnorm == 0.0 || g0norm == 0.0) + { + gsl_vector_set_zero (dx); + return GSL_ENOPROG; + } + + /* Determine which direction is downhill, +p or -p */ + + gsl_blas_ddot (p, gradient, &pg); + + dir = (pg >= 0.0) ? +1.0 : -1.0; + + /* Compute new trial point at x_c= x - step * p, where p is the + current direction */ + + take_step (x, p, stepc, dir / pnorm, x1, dx); + + /* Evaluate function and gradient at new point xc */ + + fc = GSL_MULTIMIN_FN_EVAL_F (fdf, x1); + + if (fc < fa) + { + /* Success, reduced the function value */ + state->step = stepc * 2.0; + *f = fc; + gsl_vector_memcpy (x, x1); + GSL_MULTIMIN_FN_EVAL_DF (fdf, x1, gradient); + return GSL_SUCCESS; + } + +#ifdef DEBUG + printf ("got stepc = %g fc = %g\n", stepc, fc); +#endif + + /* Do a line minimisation in the region (xa,fa) (xc,fc) to find an + intermediate (xb,fb) satisifying fa > fb < fc. Choose an initial + xb based on parabolic interpolation */ + + intermediate_point (fdf, x, p, dir / pnorm, pg, + stepa, stepc, fa, fc, x1, dx1, gradient, &stepb, &fb); + + if (stepb == 0.0) + { + return GSL_ENOPROG; + } + + minimize (fdf, x, p, dir / pnorm, + stepa, stepb, stepc, fa, fb, fc, tol, + x1, dx1, x2, dx, gradient, &(state->step), f, &g1norm); + + gsl_vector_memcpy (x, x2); + + /* Choose a new direction for the next step */ + + state->iter = (state->iter + 1) % x->size; + + if (state->iter == 0) + { + gsl_vector_memcpy (p, gradient); + state->pnorm = g1norm; + } + else + { + /* This is the BFGS update: */ + /* p' = g1 - A dx - B dg */ + /* A = - (1+ dg.dg/dx.dg) B + dg.g/dx.dg */ + /* B = dx.g/dx.dg */ + + gsl_vector *dx0 = state->dx0; + gsl_vector *dg0 = state->dg0; + + double dxg, dgg, dxdg, dgnorm, A, B; + + /* dx0 = x - x0 */ + gsl_vector_memcpy (dx0, x); + gsl_blas_daxpy (-1.0, x0, dx0); + + /* dg0 = g - g0 */ + gsl_vector_memcpy (dg0, gradient); + gsl_blas_daxpy (-1.0, g0, dg0); + + gsl_blas_ddot (dx0, gradient, &dxg); + gsl_blas_ddot (dg0, gradient, &dgg); + gsl_blas_ddot (dx0, dg0, &dxdg); + + dgnorm = gsl_blas_dnrm2 (dg0); + + if (dxdg != 0) + { + B = dxg / dxdg; + A = -(1.0 + dgnorm * dgnorm / dxdg) * B + dgg / dxdg; + } + else + { + B = 0; + A = 0; + } + + gsl_vector_memcpy (p, gradient); + gsl_blas_daxpy (-A, dx0, p); + gsl_blas_daxpy (-B, dg0, p); + + state->pnorm = gsl_blas_dnrm2 (p); + } + + gsl_vector_memcpy (g0, gradient); + gsl_vector_memcpy (x0, x); + state->g0norm = gsl_blas_dnrm2 (g0); + +#ifdef DEBUG + printf ("updated directions\n"); + printf ("p: "); + gsl_vector_fprintf (stdout, p, "%g"); + printf ("g: "); + gsl_vector_fprintf (stdout, gradient, "%g"); +#endif + + return GSL_SUCCESS; +} + +static const gsl_multimin_fdfminimizer_type vector_bfgs_type = { + "vector_bfgs", /* name */ + sizeof (vector_bfgs_state_t), + &vector_bfgs_alloc, + &vector_bfgs_set, + &vector_bfgs_iterate, + &vector_bfgs_restart, + &vector_bfgs_free +}; + +const gsl_multimin_fdfminimizer_type + * gsl_multimin_fdfminimizer_vector_bfgs = &vector_bfgs_type; diff --git a/software/gsl-1.15/multimin/vector_bfgs2.c b/software/gsl-1.15/multimin/vector_bfgs2.c new file mode 100644 index 000000000..92ffc03a3 --- /dev/null +++ b/software/gsl-1.15/multimin/vector_bfgs2.c @@ -0,0 +1,331 @@ +/* multimin/vector_bfgs2.c + * + * Copyright (C) 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +/* vector_bfgs2.c -- Fletcher's implementation of the BFGS method, + using the line minimisation algorithm from from R.Fletcher, + "Practical Methods of Optimization", Second Edition, ISBN + 0471915475. Algorithms 2.6.2 and 2.6.4. */ + +/* Thanks to Alan Irwin irwin@beluga.phys.uvic.ca. for suggesting this + algorithm and providing sample fortran benchmarks */ + +#include +#include +#include + +#include "linear_minimize.c" +#include "linear_wrapper.c" + +typedef struct +{ + int iter; + double step; + double g0norm; + double pnorm; + double delta_f; + double fp0; /* f'(0) for f(x-alpha*p) */ + gsl_vector *x0; + gsl_vector *g0; + gsl_vector *p; + /* work space */ + gsl_vector *dx0; + gsl_vector *dg0; + gsl_vector *x_alpha; + gsl_vector *g_alpha; + /* wrapper function */ + wrapper_t wrap; + /* minimization parameters */ + double rho; + double sigma; + double tau1; + double tau2; + double tau3; + int order; +} +vector_bfgs2_state_t; + +static int +vector_bfgs2_alloc (void *vstate, size_t n) +{ + vector_bfgs2_state_t *state = (vector_bfgs2_state_t *) vstate; + + state->p = gsl_vector_calloc (n); + + if (state->p == 0) + { + GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); + } + + state->x0 = gsl_vector_calloc (n); + + if (state->x0 == 0) + { + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->g0 = gsl_vector_calloc (n); + + if (state->g0 == 0) + { + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->dx0 = gsl_vector_calloc (n); + + if (state->dx0 == 0) + { + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->dg0 = gsl_vector_calloc (n); + + if (state->dg0 == 0) + { + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->x_alpha = gsl_vector_calloc (n); + + if (state->x_alpha == 0) + { + gsl_vector_free (state->dg0); + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + state->g_alpha = gsl_vector_calloc (n); + + if (state->g_alpha == 0) + { + gsl_vector_free (state->x_alpha); + gsl_vector_free (state->dg0); + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); + GSL_ERROR ("failed to allocate space for g0", GSL_ENOMEM); + } + + return GSL_SUCCESS; +} + +static int +vector_bfgs2_set (void *vstate, gsl_multimin_function_fdf * fdf, + const gsl_vector * x, double *f, gsl_vector * gradient, + double step_size, double tol) +{ + vector_bfgs2_state_t *state = (vector_bfgs2_state_t *) vstate; + + state->iter = 0; + state->step = step_size; + state->delta_f = 0; + + GSL_MULTIMIN_FN_EVAL_F_DF (fdf, x, f, gradient); + + /* Use the gradient as the initial direction */ + + gsl_vector_memcpy (state->x0, x); + gsl_vector_memcpy (state->g0, gradient); + state->g0norm = gsl_blas_dnrm2 (state->g0); + + gsl_vector_memcpy (state->p, gradient); + gsl_blas_dscal (-1 / state->g0norm, state->p); + state->pnorm = gsl_blas_dnrm2 (state->p); /* should be 1 */ + state->fp0 = -state->g0norm; + + /* Prepare the wrapper */ + + prepare_wrapper (&state->wrap, fdf, + state->x0, *f, state->g0, + state->p, state->x_alpha, state->g_alpha); + + /* Prepare 1d minimisation parameters */ + + state->rho = 0.01; + state->sigma = tol; + state->tau1 = 9; + state->tau2 = 0.05; + state->tau3 = 0.5; + state->order = 3; /* use cubic interpolation where possible */ + + return GSL_SUCCESS; +} + +static void +vector_bfgs2_free (void *vstate) +{ + vector_bfgs2_state_t *state = (vector_bfgs2_state_t *) vstate; + + gsl_vector_free (state->x_alpha); + gsl_vector_free (state->g_alpha); + gsl_vector_free (state->dg0); + gsl_vector_free (state->dx0); + gsl_vector_free (state->g0); + gsl_vector_free (state->x0); + gsl_vector_free (state->p); +} + +static int +vector_bfgs2_restart (void *vstate) +{ + vector_bfgs2_state_t *state = (vector_bfgs2_state_t *) vstate; + + state->iter = 0; + return GSL_SUCCESS; +} + +static int +vector_bfgs2_iterate (void *vstate, gsl_multimin_function_fdf * fdf, + gsl_vector * x, double *f, + gsl_vector * gradient, gsl_vector * dx) +{ + vector_bfgs2_state_t *state = (vector_bfgs2_state_t *) vstate; + double alpha = 0.0, alpha1; + gsl_vector *x0 = state->x0; + gsl_vector *g0 = state->g0; + gsl_vector *p = state->p; + + double g0norm = state->g0norm; + double pnorm = state->pnorm; + double delta_f = state->delta_f; + double pg, dir; + int status; + + double f0 = *f; + + if (pnorm == 0.0 || g0norm == 0.0 || state->fp0 == 0) + { + gsl_vector_set_zero (dx); + return GSL_ENOPROG; + } + + if (delta_f < 0) + { + double del = GSL_MAX_DBL (-delta_f, 10 * GSL_DBL_EPSILON * fabs(f0)); + alpha1 = GSL_MIN_DBL (1.0, 2.0 * del / (-state->fp0)); + } + else + { + alpha1 = fabs(state->step); + } + + /* line minimisation, with cubic interpolation (order = 3) */ + + status = minimize (&state->wrap.fdf_linear, state->rho, state->sigma, + state->tau1, state->tau2, state->tau3, state->order, + alpha1, &alpha); + + if (status != GSL_SUCCESS) + { + return status; + } + + update_position (&(state->wrap), alpha, x, f, gradient); + + state->delta_f = *f - f0; + + /* Choose a new direction for the next step */ + + { + /* This is the BFGS update: */ + /* p' = g1 - A dx - B dg */ + /* A = - (1+ dg.dg/dx.dg) B + dg.g/dx.dg */ + /* B = dx.g/dx.dg */ + + gsl_vector *dx0 = state->dx0; + gsl_vector *dg0 = state->dg0; + + double dxg, dgg, dxdg, dgnorm, A, B; + + /* dx0 = x - x0 */ + gsl_vector_memcpy (dx0, x); + gsl_blas_daxpy (-1.0, x0, dx0); + + gsl_vector_memcpy (dx, dx0); /* keep a copy */ + + /* dg0 = g - g0 */ + gsl_vector_memcpy (dg0, gradient); + gsl_blas_daxpy (-1.0, g0, dg0); + + gsl_blas_ddot (dx0, gradient, &dxg); + gsl_blas_ddot (dg0, gradient, &dgg); + gsl_blas_ddot (dx0, dg0, &dxdg); + + dgnorm = gsl_blas_dnrm2 (dg0); + + if (dxdg != 0) + { + B = dxg / dxdg; + A = -(1.0 + dgnorm * dgnorm / dxdg) * B + dgg / dxdg; + } + else + { + B = 0; + A = 0; + } + + gsl_vector_memcpy (p, gradient); + gsl_blas_daxpy (-A, dx0, p); + gsl_blas_daxpy (-B, dg0, p); + } + + gsl_vector_memcpy (g0, gradient); + gsl_vector_memcpy (x0, x); + state->g0norm = gsl_blas_dnrm2 (g0); + state->pnorm = gsl_blas_dnrm2 (p); + + /* update direction and fp0 */ + + gsl_blas_ddot (p, gradient, &pg); + dir = (pg >= 0.0) ? -1.0 : +1.0; + gsl_blas_dscal (dir / state->pnorm, p); + state->pnorm = gsl_blas_dnrm2 (p); + gsl_blas_ddot (p, g0, &state->fp0); + + change_direction (&state->wrap); + + return GSL_SUCCESS; +} + +static const gsl_multimin_fdfminimizer_type vector_bfgs2_type = { + "vector_bfgs2", /* name */ + sizeof (vector_bfgs2_state_t), + &vector_bfgs2_alloc, + &vector_bfgs2_set, + &vector_bfgs2_iterate, + &vector_bfgs2_restart, + &vector_bfgs2_free +}; + +const gsl_multimin_fdfminimizer_type + * gsl_multimin_fdfminimizer_vector_bfgs2 = &vector_bfgs2_type; diff --git a/software/gsl-1.15/multiroots/.deps/broyden.Plo b/software/gsl-1.15/multiroots/.deps/broyden.Plo new file mode 100644 index 000000000..e723a4c81 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/broyden.Plo @@ -0,0 +1,261 @@ +broyden.lo: broyden.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h enorm.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +enorm.c: diff --git a/software/gsl-1.15/multiroots/.deps/convergence.Plo b/software/gsl-1.15/multiroots/.deps/convergence.Plo new file mode 100644 index 000000000..90b945f17 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/convergence.Plo @@ -0,0 +1,250 @@ +convergence.lo: convergence.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multiroots/.deps/dnewton.Plo b/software/gsl-1.15/multiroots/.deps/dnewton.Plo new file mode 100644 index 000000000..da492b81d --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/dnewton.Plo @@ -0,0 +1,259 @@ +dnewton.lo: dnewton.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/multiroots/.deps/fdfsolver.Plo b/software/gsl-1.15/multiroots/.deps/fdfsolver.Plo new file mode 100644 index 000000000..06906711a --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/fdfsolver.Plo @@ -0,0 +1,256 @@ +fdfsolver.lo: fdfsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_multiroots.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multiroots/.deps/fdjac.Plo b/software/gsl-1.15/multiroots/.deps/fdjac.Plo new file mode 100644 index 000000000..0a8bce7dc --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/fdjac.Plo @@ -0,0 +1,249 @@ +fdjac.lo: fdjac.c ../config.h ../gsl/gsl_multiroots.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +../gsl/gsl_multiroots.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multiroots/.deps/fsolver.Plo b/software/gsl-1.15/multiroots/.deps/fsolver.Plo new file mode 100644 index 000000000..3cc3c05d0 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/fsolver.Plo @@ -0,0 +1,256 @@ +fsolver.lo: fsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_multiroots.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/multiroots/.deps/gnewton.Plo b/software/gsl-1.15/multiroots/.deps/gnewton.Plo new file mode 100644 index 000000000..b15fbb4f5 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/gnewton.Plo @@ -0,0 +1,261 @@ +gnewton.lo: gnewton.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h enorm.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +enorm.c: diff --git a/software/gsl-1.15/multiroots/.deps/hybrid.Plo b/software/gsl-1.15/multiroots/.deps/hybrid.Plo new file mode 100644 index 000000000..a9d0291a4 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/hybrid.Plo @@ -0,0 +1,263 @@ +hybrid.lo: hybrid.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h dogleg.c enorm.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +dogleg.c: + +enorm.c: diff --git a/software/gsl-1.15/multiroots/.deps/hybridj.Plo b/software/gsl-1.15/multiroots/.deps/hybridj.Plo new file mode 100644 index 000000000..b71d2ebe8 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/hybridj.Plo @@ -0,0 +1,263 @@ +hybridj.lo: hybridj.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h dogleg.c enorm.c + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +dogleg.c: + +enorm.c: diff --git a/software/gsl-1.15/multiroots/.deps/newton.Plo b/software/gsl-1.15/multiroots/.deps/newton.Plo new file mode 100644 index 000000000..38e8c07b7 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/newton.Plo @@ -0,0 +1,259 @@ +newton.lo: newton.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_multiroots.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: diff --git a/software/gsl-1.15/multiroots/.deps/test.Po b/software/gsl-1.15/multiroots/.deps/test.Po new file mode 100644 index 000000000..ffe55a000 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/test.Po @@ -0,0 +1,256 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_test.h \ + ../gsl/gsl_multiroots.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_matrix.h ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_ieee_utils.h test_funcs.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_test.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_ieee_utils.h: + +test_funcs.h: diff --git a/software/gsl-1.15/multiroots/.deps/test_funcs.Po b/software/gsl-1.15/multiroots/.deps/test_funcs.Po new file mode 100644 index 000000000..4a3799e07 --- /dev/null +++ b/software/gsl-1.15/multiroots/.deps/test_funcs.Po @@ -0,0 +1,250 @@ +test_funcs.o: test_funcs.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_multiroots.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h test_funcs.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_multiroots.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +test_funcs.h: diff --git a/software/gsl-1.15/multiroots/ChangeLog b/software/gsl-1.15/multiroots/ChangeLog new file mode 100644 index 000000000..d5a85bde6 --- /dev/null +++ b/software/gsl-1.15/multiroots/ChangeLog @@ -0,0 +1,142 @@ +2011-01-24 Brian Gough + + * gnewton.c (gnewton_iterate): check for singular jacobian + + * newton.c (newton_iterate): check for singular jacobian + +2009-07-09 Brian Gough + + * fsolver.c (gsl_multiroot_fsolver_free): handle NULL argument in + free + + * fdfsolver.c (gsl_multiroot_fdfsolver_free): handle NULL argument + in free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-11-09 Brian Gough + + * convergence.c (gsl_multiroot_test_delta): accept dxi = 0 + +2007-08-27 Brian Gough + + * fdjac.c (gsl_multiroot_fdjacobian): detect null columns (dx too + small) + (gsl_multiroot_fdjacobian): avoid memory leak for x1,f1 + +2007-01-26 Brian Gough + + * fsolver.c (gsl_multiroot_fsolver_set): made vector argument x + const + + * fdfsolver.c (gsl_multiroot_fdfsolver_set): made vector argument + x const + +Tue Nov 12 22:26:40 2002 Brian Gough + + * newton.c (newton_alloc): return error code, not null + + * hybridj.c (hybridj_alloc): return error code, not null + + * hybrid.c (hybrid_alloc): return error code, not null + + * gnewton.c (gnewton_alloc): return error code, not null + + * dnewton.c (dnewton_alloc): return error code, not null + + * broyden.c (broyden_alloc): return error code, not null + +Wed May 1 21:40:55 2002 Brian Gough + + * fdfsolver.c (gsl_multiroot_fdfsolver_dx): new function to return + dx + (gsl_multiroot_fdfsolver_f): new function to return f + + * fsolver.c (gsl_multiroot_fsolver_dx): new function to return dx + (gsl_multiroot_fsolver_f): new function to return f + +Sat Jan 26 17:11:34 2002 Brian Gough + + * hybrid.c (set): fix broken 'if' statement + +Thu Jan 10 19:26:55 2002 Brian Gough + + * hybrid.c dnewton.c: return status values for user-function + (Theis Peter Hansen) + +Tue Jun 19 23:40:18 2001 Brian Gough + + * hybrid.c: removed workspace for linalg calls, no longer needed + + * hybridj.c: removed workspace for linalg calls, no longer needed + +Wed Jun 6 13:31:18 2001 Brian Gough + + * hybridj.c: updated to use new QR calling convention (now passes + workspace) + + * hybrid.c: updated to use new QR calling convention (now passes + workspace) + +Mon Apr 23 12:55:39 2001 Brian Gough + + * Makefile.am (test_LDADD): added cblas lib + +Mon Apr 16 20:18:08 2001 Brian Gough + + * dnewton.c (dnewton_iterate): removed unnecessary status variable + +Sun Feb 18 11:26:45 2001 Brian Gough + + * fdfsolver.c fsolver.c: changed so that the solver _alloc + function no longer calls _set, the user must do that separately. + +Thu Nov 30 21:48:39 2000 Brian Gough + + * newton.c (newton_iterate): return GSL_EBADFUNC if error in + function evaluation + + * hybridj.c (iterate): return GSL_EBADFUNC if error in + function evaluation + + * hybrid.c (iterate): return GSL_EBADFUNC if error in function + evaluation + + * gnewton.c (gnewton_iterate): return GSL_EBADFUNC if error in + function evaluation + + * fdjac.c (gsl_multiroot_fdjacobian): return GSL_EBADFUNC if error + in function evaluation + + * dnewton.c (dnewton_iterate): return GSL_EBADFUNC if error in + function evaluation + + * broyden.c (broyden_iterate): return GSL_EBADFUNC if error in + function evaluation + +Sun Aug 27 13:43:13 2000 Brian Gough + + * hybridj.c hybrid.c dogleg.c: begin comments with a capital + letter to improve readability + +Sat Aug 26 16:12:19 2000 Brian Gough + + * hybridj.c hybrid.c: renamed rdiag to tau, since it plays that + role here and is not the diagonal of R (see qr.c documentation for + more details) + +Wed Feb 23 15:36:39 2000 Brian Gough + + * changed gsl_vector_copy to gsl_vector_cpy + +Fri Feb 18 18:45:02 2000 Brian Gough + + * fixed various .c files to use permutation + +Wed Feb 16 21:13:24 2000 Brian Gough + + * fixed Makefiles that include gsl_linalg.h to add + -I$(srcdir)/../permutation to their include path + diff --git a/software/gsl-1.15/multiroots/Makefile.am b/software/gsl-1.15/multiroots/Makefile.am new file mode 100644 index 000000000..1a9d7247d --- /dev/null +++ b/software/gsl-1.15/multiroots/Makefile.am @@ -0,0 +1,19 @@ +# -*-makefile-*- + +noinst_LTLIBRARIES = libgslmultiroots.la + +pkginclude_HEADERS = gsl_multiroots.h + +noinst_HEADERS = enorm.c dogleg.c + +INCLUDES = -I$(top_srcdir) + +libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c test_funcs.c test_funcs.h +test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + diff --git a/software/gsl-1.15/multiroots/Makefile.in b/software/gsl-1.15/multiroots/Makefile.in new file mode 100644 index 000000000..2334c29b4 --- /dev/null +++ b/software/gsl-1.15/multiroots/Makefile.in @@ -0,0 +1,680 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*-makefile-*- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = multiroots +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmultiroots_la_LIBADD = +am_libgslmultiroots_la_OBJECTS = fdjac.lo fsolver.lo fdfsolver.lo \ + convergence.lo newton.lo gnewton.lo dnewton.lo broyden.lo \ + hybrid.lo hybridj.lo +libgslmultiroots_la_OBJECTS = $(am_libgslmultiroots_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmultiroots.la ../linalg/libgsllinalg.la \ + ../blas/libgslblas.la ../cblas/libgslcblas.la \ + ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmultiroots_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmultiroots_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmultiroots.la +pkginclude_HEADERS = gsl_multiroots.h +noinst_HEADERS = enorm.c dogleg.c +INCLUDES = -I$(top_srcdir) +libgslmultiroots_la_SOURCES = fdjac.c fsolver.c fdfsolver.c convergence.c newton.c gnewton.c dnewton.c broyden.c hybrid.c hybridj.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c test_funcs.c test_funcs.h +test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu multiroots/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu multiroots/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmultiroots.la: $(libgslmultiroots_la_OBJECTS) $(libgslmultiroots_la_DEPENDENCIES) + $(LINK) $(libgslmultiroots_la_OBJECTS) $(libgslmultiroots_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/broyden.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnewton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdfsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdjac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnewton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hybrid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hybridj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_funcs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/multiroots/broyden.c b/software/gsl-1.15/multiroots/broyden.c new file mode 100644 index 000000000..65c96478d --- /dev/null +++ b/software/gsl-1.15/multiroots/broyden.c @@ -0,0 +1,456 @@ +/* multiroots/broyden.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "enorm.c" + +/* Broyden's method. It is not an efficient or modern algorithm but + gives an example of a rank-1 update. + + C.G. Broyden, "A Class of Methods for Solving Nonlinear + Simultaneous Equations", Mathematics of Computation, vol 19 (1965), + p 577-593 + + */ + +typedef struct + { + gsl_matrix *H; + gsl_matrix *lu; + gsl_permutation *permutation; + gsl_vector *v; + gsl_vector *w; + gsl_vector *y; + gsl_vector *p; + gsl_vector *fnew; + gsl_vector *x_trial; + double phi; + } +broyden_state_t; + +static int broyden_alloc (void *vstate, size_t n); +static int broyden_set (void *vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static int broyden_iterate (void *vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static void broyden_free (void *vstate); + + +static int +broyden_alloc (void *vstate, size_t n) +{ + broyden_state_t *state = (broyden_state_t *) vstate; + gsl_vector *v, *w, *y, *fnew, *x_trial, *p; + gsl_permutation *perm; + gsl_matrix *m, *H; + + m = gsl_matrix_calloc (n, n); + + if (m == 0) + { + GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); + } + + state->lu = m; + + perm = gsl_permutation_calloc (n); + + if (perm == 0) + { + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); + } + + state->permutation = perm; + + H = gsl_matrix_calloc (n, n); + + if (H == 0) + { + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); + } + + state->H = H; + + v = gsl_vector_calloc (n); + + if (v == 0) + { + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); + } + + state->v = v; + + w = gsl_vector_calloc (n); + + if (w == 0) + { + gsl_vector_free (v); + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); + } + + state->w = w; + + y = gsl_vector_calloc (n); + + if (y == 0) + { + gsl_vector_free (w); + gsl_vector_free (v); + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); + } + + state->y = y; + + fnew = gsl_vector_calloc (n); + + if (fnew == 0) + { + gsl_vector_free (y); + gsl_vector_free (w); + gsl_vector_free (v); + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for fnew", GSL_ENOMEM); + } + + state->fnew = fnew; + + x_trial = gsl_vector_calloc (n); + + if (x_trial == 0) + { + gsl_vector_free (fnew); + gsl_vector_free (y); + gsl_vector_free (w); + gsl_vector_free (v); + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); + } + + state->x_trial = x_trial; + + p = gsl_vector_calloc (n); + + if (p == 0) + { + gsl_vector_free (x_trial); + gsl_vector_free (fnew); + gsl_vector_free (y); + gsl_vector_free (w); + gsl_vector_free (v); + gsl_matrix_free (H); + gsl_permutation_free (perm); + gsl_matrix_free (m); + + GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); + } + + state->p = p; + + return GSL_SUCCESS; +} + +static int +broyden_set (void *vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx) +{ + broyden_state_t *state = (broyden_state_t *) vstate; + size_t i, j, n = function->n; + int signum = 0; + + GSL_MULTIROOT_FN_EVAL (function, x, f); + + gsl_multiroot_fdjacobian (function, x, f, GSL_SQRT_DBL_EPSILON, state->lu); + gsl_linalg_LU_decomp (state->lu, state->permutation, &signum); + gsl_linalg_LU_invert (state->lu, state->permutation, state->H); + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + gsl_matrix_set(state->H,i,j,-gsl_matrix_get(state->H,i,j)); + + for (i = 0; i < n; i++) + { + gsl_vector_set (dx, i, 0.0); + } + + state->phi = enorm (f); + + return GSL_SUCCESS; +} + +static int +broyden_iterate (void *vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx) +{ + broyden_state_t *state = (broyden_state_t *) vstate; + + double phi0, phi1, t, lambda; + + gsl_matrix *H = state->H; + gsl_vector *p = state->p; + gsl_vector *y = state->y; + gsl_vector *v = state->v; + gsl_vector *w = state->w; + gsl_vector *fnew = state->fnew; + gsl_vector *x_trial = state->x_trial; + gsl_matrix *lu = state->lu; + gsl_permutation *perm = state->permutation; + + size_t i, j, iter; + + size_t n = function->n; + + /* p = H f */ + + for (i = 0; i < n; i++) + { + double sum = 0; + + for (j = 0; j < n; j++) + { + sum += gsl_matrix_get (H, i, j) * gsl_vector_get (f, j); + } + gsl_vector_set (p, i, sum); + } + + t = 1; + iter = 0; + + phi0 = state->phi; + +new_step: + + for (i = 0; i < n; i++) + { + double pi = gsl_vector_get (p, i); + double xi = gsl_vector_get (x, i); + gsl_vector_set (x_trial, i, xi + t * pi); + } + + { + int status = GSL_MULTIROOT_FN_EVAL (function, x_trial, fnew); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + phi1 = enorm (fnew); + + iter++ ; + + if (phi1 > phi0 && iter < 10 && t > 0.1) + { + /* full step goes uphill, take a reduced step instead */ + + double theta = phi1 / phi0; + t *= (sqrt (1.0 + 6.0 * theta) - 1.0) / (3.0 * theta); + goto new_step; + } + + if (phi1 > phi0) + { + /* need to recompute Jacobian */ + int signum = 0; + + gsl_multiroot_fdjacobian (function, x, f, GSL_SQRT_DBL_EPSILON, lu); + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + gsl_matrix_set(lu,i,j,-gsl_matrix_get(lu,i,j)); + + gsl_linalg_LU_decomp (lu, perm, &signum); + gsl_linalg_LU_invert (lu, perm, H); + + gsl_linalg_LU_solve (lu, perm, f, p); + + t = 1; + + for (i = 0; i < n; i++) + { + double pi = gsl_vector_get (p, i); + double xi = gsl_vector_get (x, i); + gsl_vector_set (x_trial, i, xi + t * pi); + } + + { + int status = GSL_MULTIROOT_FN_EVAL (function, x_trial, fnew); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + phi1 = enorm (fnew); + } + + /* y = f' - f */ + + for (i = 0; i < n; i++) + { + double yi = gsl_vector_get (fnew, i) - gsl_vector_get (f, i); + gsl_vector_set (y, i, yi); + } + + /* v = H y */ + + for (i = 0; i < n; i++) + { + double sum = 0; + + for (j = 0; j < n; j++) + { + sum += gsl_matrix_get (H, i, j) * gsl_vector_get (y, j); + } + + gsl_vector_set (v, i, sum); + } + + /* lambda = p . v */ + + lambda = 0; + + for (i = 0; i < n; i++) + { + lambda += gsl_vector_get (p, i) * gsl_vector_get (v, i); + } + + if (lambda == 0) + { + GSL_ERROR ("approximation to Jacobian has collapsed", GSL_EZERODIV) ; + } + + /* v' = v + t * p */ + + for (i = 0; i < n; i++) + { + double vi = gsl_vector_get (v, i) + t * gsl_vector_get (p, i); + gsl_vector_set (v, i, vi); + } + + /* w^T = p^T H */ + + for (i = 0; i < n; i++) + { + double sum = 0; + + for (j = 0; j < n; j++) + { + sum += gsl_matrix_get (H, j, i) * gsl_vector_get (p, j); + } + + gsl_vector_set (w, i, sum); + } + + /* Hij -> Hij - (vi wj / lambda) */ + + for (i = 0; i < n; i++) + { + double vi = gsl_vector_get (v, i); + + for (j = 0; j < n; j++) + { + double wj = gsl_vector_get (w, j); + double Hij = gsl_matrix_get (H, i, j) - vi * wj / lambda; + gsl_matrix_set (H, i, j, Hij); + } + } + + /* copy fnew into f */ + + gsl_vector_memcpy (f, fnew); + + /* copy x_trial into x */ + + gsl_vector_memcpy (x, x_trial); + + for (i = 0; i < n; i++) + { + double pi = gsl_vector_get (p, i); + gsl_vector_set (dx, i, t * pi); + } + + state->phi = phi1; + + return GSL_SUCCESS; +} + + +static void +broyden_free (void *vstate) +{ + broyden_state_t *state = (broyden_state_t *) vstate; + + gsl_matrix_free (state->H); + + gsl_matrix_free (state->lu); + gsl_permutation_free (state->permutation); + + gsl_vector_free (state->v); + gsl_vector_free (state->w); + gsl_vector_free (state->y); + gsl_vector_free (state->p); + + gsl_vector_free (state->fnew); + gsl_vector_free (state->x_trial); + +} + + +static const gsl_multiroot_fsolver_type broyden_type = +{"broyden", /* name */ + sizeof (broyden_state_t), + &broyden_alloc, + &broyden_set, + &broyden_iterate, + &broyden_free}; + +const gsl_multiroot_fsolver_type *gsl_multiroot_fsolver_broyden = &broyden_type; diff --git a/software/gsl-1.15/multiroots/convergence.c b/software/gsl-1.15/multiroots/convergence.c new file mode 100644 index 000000000..17cea33a8 --- /dev/null +++ b/software/gsl-1.15/multiroots/convergence.c @@ -0,0 +1,90 @@ +/* multiroots/convergence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_multiroot_test_delta (const gsl_vector * dx, const gsl_vector * x, + double epsabs, double epsrel) +{ + size_t i; + int ok = 1; + const size_t n = x->size ; + + if (epsrel < 0.0) + { + GSL_ERROR ("relative tolerance is negative", GSL_EBADTOL); + } + + for (i = 0 ; i < n ; i++) + { + double xi = gsl_vector_get(x,i); + double dxi = gsl_vector_get(dx,i); + double tolerance = epsabs + epsrel * fabs(xi) ; + + if (fabs(dxi) < tolerance || dxi == 0) + { + ok = 1; + } + else + { + ok = 0; + break; + } + } + + if (ok) + return GSL_SUCCESS ; + + return GSL_CONTINUE; +} + +int +gsl_multiroot_test_residual (const gsl_vector * f, double epsabs) +{ + size_t i; + + double residual = 0; + + const size_t n = f->size; + + if (epsabs < 0.0) + { + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + } + + for (i = 0 ; i < n ; i++) + { + double fi = gsl_vector_get(f, i); + + residual += fabs(fi); + } + + + if (residual < epsabs) + { + return GSL_SUCCESS; + } + + return GSL_CONTINUE ; +} + diff --git a/software/gsl-1.15/multiroots/dnewton.c b/software/gsl-1.15/multiroots/dnewton.c new file mode 100644 index 000000000..66b049bb8 --- /dev/null +++ b/software/gsl-1.15/multiroots/dnewton.c @@ -0,0 +1,186 @@ +/* multiroots/dnewton.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/* Newton method using a finite difference approximation to the jacobian. + The derivatives are estimated using a step size of + + h_i = sqrt(DBL_EPSILON) * x_i + + */ + +typedef struct + { + gsl_matrix * J; + gsl_matrix * lu; + gsl_permutation * permutation; + } +dnewton_state_t; + +static int dnewton_alloc (void * vstate, size_t n); +static int dnewton_set (void * vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static int dnewton_iterate (void * vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static void dnewton_free (void * vstate); + +static int +dnewton_alloc (void * vstate, size_t n) +{ + dnewton_state_t * state = (dnewton_state_t *) vstate; + gsl_permutation * p; + gsl_matrix * m, * J; + + m = gsl_matrix_calloc (n,n); + + if (m == 0) + { + GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); + } + + state->lu = m ; + + p = gsl_permutation_calloc (n); + + if (p == 0) + { + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); + } + + state->permutation = p ; + + J = gsl_matrix_calloc (n,n); + + if (J == 0) + { + gsl_permutation_free(p); + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); + } + + state->J = J; + + return GSL_SUCCESS; +} + +static int +dnewton_set (void * vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx) +{ + dnewton_state_t * state = (dnewton_state_t *) vstate; + size_t i, n = function->n ; + int status; + + status = GSL_MULTIROOT_FN_EVAL (function, x, f); + if (status) + return status; + + status = gsl_multiroot_fdjacobian (function, x, f, GSL_SQRT_DBL_EPSILON, + state->J); + if (status) + return status; + + for (i = 0; i < n; i++) + { + gsl_vector_set (dx, i, 0.0); + } + + return GSL_SUCCESS; +} + +static int +dnewton_iterate (void * vstate, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx) +{ + dnewton_state_t * state = (dnewton_state_t *) vstate; + + int signum ; + + size_t i; + + size_t n = function->n ; + + gsl_matrix_memcpy (state->lu, state->J); + + { + int status = gsl_linalg_LU_decomp (state->lu, state->permutation, &signum); + if (status) + return status; + } + + { + int status = gsl_linalg_LU_solve (state->lu, state->permutation, f, dx); + if (status) + return status; + } + + for (i = 0; i < n; i++) + { + double e = gsl_vector_get (dx, i); + double y = gsl_vector_get (x, i); + gsl_vector_set (dx, i, -e); + gsl_vector_set (x, i, y - e); + } + + { + int status = GSL_MULTIROOT_FN_EVAL (function, x, f); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + gsl_multiroot_fdjacobian (function, x, f, GSL_SQRT_DBL_EPSILON, state->J); + + return GSL_SUCCESS; +} + + +static void +dnewton_free (void * vstate) +{ + dnewton_state_t * state = (dnewton_state_t *) vstate; + + gsl_matrix_free(state->J); + gsl_matrix_free(state->lu); + gsl_permutation_free(state->permutation); +} + + +static const gsl_multiroot_fsolver_type dnewton_type = +{"dnewton", /* name */ + sizeof (dnewton_state_t), + &dnewton_alloc, + &dnewton_set, + &dnewton_iterate, + &dnewton_free}; + +const gsl_multiroot_fsolver_type * gsl_multiroot_fsolver_dnewton = &dnewton_type; diff --git a/software/gsl-1.15/multiroots/dogleg.c b/software/gsl-1.15/multiroots/dogleg.c new file mode 100644 index 000000000..b439d9531 --- /dev/null +++ b/software/gsl-1.15/multiroots/dogleg.c @@ -0,0 +1,413 @@ +/* multiroots/dogleg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "enorm.c" + +static void compute_diag (const gsl_matrix * J, gsl_vector * diag); +static void update_diag (const gsl_matrix * J, gsl_vector * diag); +static double compute_delta (gsl_vector * diag, gsl_vector * x); +static void compute_df (const gsl_vector * f_trial, const gsl_vector * f, gsl_vector * df); +static void compute_wv (const gsl_vector * qtdf, const gsl_vector *rdx, const gsl_vector *dx, const gsl_vector *diag, double pnorm, gsl_vector * w, gsl_vector * v); + +static double scaled_enorm (const gsl_vector * d, const gsl_vector * f); + +static double scaled_enorm (const gsl_vector * d, const gsl_vector * f) { + double e2 = 0 ; + size_t i, n = f->size ; + for (i = 0; i < n ; i++) { + double fi= gsl_vector_get(f, i); + double di= gsl_vector_get(d, i); + double u = di * fi; + e2 += u * u ; + } + return sqrt(e2); +} + +static double enorm_sum (const gsl_vector * a, const gsl_vector * b); + +static double enorm_sum (const gsl_vector * a, const gsl_vector * b) { + double e2 = 0 ; + size_t i, n = a->size ; + for (i = 0; i < n ; i++) { + double ai= gsl_vector_get(a, i); + double bi= gsl_vector_get(b, i); + double u = ai + bi; + e2 += u * u ; + } + return sqrt(e2); +} + +static void +compute_wv (const gsl_vector * qtdf, const gsl_vector *rdx, const gsl_vector *dx, const gsl_vector *diag, double pnorm, gsl_vector * w, gsl_vector * v) +{ + size_t i, n = qtdf->size; + + for (i = 0; i < n; i++) + { + double qtdfi = gsl_vector_get (qtdf, i); + double rdxi = gsl_vector_get (rdx, i); + double dxi = gsl_vector_get (dx, i); + double diagi = gsl_vector_get (diag, i); + + gsl_vector_set (w, i, (qtdfi - rdxi) / pnorm); + gsl_vector_set (v, i, diagi * diagi * dxi / pnorm); + } +} + + +static void +compute_df (const gsl_vector * f_trial, const gsl_vector * f, gsl_vector * df) +{ + size_t i, n = f->size; + + for (i = 0; i < n; i++) + { + double dfi = gsl_vector_get (f_trial, i) - gsl_vector_get (f, i); + gsl_vector_set (df, i, dfi); + } +} + +static void +compute_diag (const gsl_matrix * J, gsl_vector * diag) +{ + size_t i, j, n = diag->size; + + for (j = 0; j < n; j++) + { + double sum = 0; + for (i = 0; i < n; i++) + { + double Jij = gsl_matrix_get (J, i, j); + sum += Jij * Jij; + } + if (sum == 0) + sum = 1.0; + + gsl_vector_set (diag, j, sqrt (sum)); + } +} + +static void +update_diag (const gsl_matrix * J, gsl_vector * diag) +{ + size_t i, j, n = diag->size; + + for (j = 0; j < n; j++) + { + double cnorm, diagj, sum = 0; + for (i = 0; i < n; i++) + { + double Jij = gsl_matrix_get (J, i, j); + sum += Jij * Jij; + } + if (sum == 0) + sum = 1.0; + + cnorm = sqrt (sum); + diagj = gsl_vector_get (diag, j); + + if (cnorm > diagj) + gsl_vector_set (diag, j, cnorm); + } +} + +static double +compute_delta (gsl_vector * diag, gsl_vector * x) +{ + double Dx = scaled_enorm (diag, x); + double factor = 100; + + return (Dx > 0) ? factor * Dx : factor; +} + +static double +compute_actual_reduction (double fnorm, double fnorm1) +{ + double actred; + + if (fnorm1 < fnorm) + { + double u = fnorm1 / fnorm; + actred = 1 - u * u; + } + else + { + actred = -1; + } + + return actred; +} + +static double +compute_predicted_reduction (double fnorm, double fnorm1) +{ + double prered; + + if (fnorm1 < fnorm) + { + double u = fnorm1 / fnorm; + prered = 1 - u * u; + } + else + { + prered = 0; + } + + return prered; +} + +static void +compute_qtf (const gsl_matrix * q, const gsl_vector * f, gsl_vector * qtf) +{ + size_t i, j, N = f->size ; + + for (j = 0; j < N; j++) + { + double sum = 0; + for (i = 0; i < N; i++) + sum += gsl_matrix_get (q, i, j) * gsl_vector_get (f, i); + + gsl_vector_set (qtf, j, sum); + } +} + +static void +compute_rdx (const gsl_matrix * r, const gsl_vector * dx, gsl_vector * rdx) +{ + size_t i, j, N = dx->size ; + + for (i = 0; i < N; i++) + { + double sum = 0; + + for (j = i; j < N; j++) + { + sum += gsl_matrix_get (r, i, j) * gsl_vector_get (dx, j); + } + + gsl_vector_set (rdx, i, sum); + } +} + + +static void +compute_trial_step (gsl_vector *x, gsl_vector * dx, gsl_vector * x_trial) +{ + size_t i, N = x->size; + + for (i = 0; i < N; i++) + { + double pi = gsl_vector_get (dx, i); + double xi = gsl_vector_get (x, i); + gsl_vector_set (x_trial, i, xi + pi); + } +} + +static int +newton_direction (const gsl_matrix * r, const gsl_vector * qtf, gsl_vector * p) +{ + const size_t N = r->size2; + size_t i; + int status; + + status = gsl_linalg_R_solve (r, qtf, p); + +#ifdef DEBUG + printf("rsolve status = %d\n", status); +#endif + + for (i = 0; i < N; i++) + { + double pi = gsl_vector_get (p, i); + gsl_vector_set (p, i, -pi); + } + + return status; +} + +static void +gradient_direction (const gsl_matrix * r, const gsl_vector * qtf, + const gsl_vector * diag, gsl_vector * g) +{ + const size_t M = r->size1; + const size_t N = r->size2; + + size_t i, j; + + for (j = 0; j < M; j++) + { + double sum = 0; + double dj; + + for (i = 0; i < N; i++) + { + sum += gsl_matrix_get (r, i, j) * gsl_vector_get (qtf, i); + } + + dj = gsl_vector_get (diag, j); + gsl_vector_set (g, j, -sum / dj); + } +} + +static void +minimum_step (double gnorm, const gsl_vector * diag, gsl_vector * g) +{ + const size_t N = g->size; + size_t i; + + for (i = 0; i < N; i++) + { + double gi = gsl_vector_get (g, i); + double di = gsl_vector_get (diag, i); + gsl_vector_set (g, i, (gi / gnorm) / di); + } +} + +static void +compute_Rg (const gsl_matrix * r, const gsl_vector * gradient, gsl_vector * Rg) +{ + const size_t N = r->size2; + size_t i, j; + + for (i = 0; i < N; i++) + { + double sum = 0; + + for (j = i; j < N; j++) + { + double gj = gsl_vector_get (gradient, j); + double rij = gsl_matrix_get (r, i, j); + sum += rij * gj; + } + + gsl_vector_set (Rg, i, sum); + } +} + +static void +scaled_addition (double alpha, gsl_vector * newton, double beta, gsl_vector * gradient, gsl_vector * p) +{ + const size_t N = p->size; + size_t i; + + for (i = 0; i < N; i++) + { + double ni = gsl_vector_get (newton, i); + double gi = gsl_vector_get (gradient, i); + gsl_vector_set (p, i, alpha * ni + beta * gi); + } +} + +static int +dogleg (const gsl_matrix * r, const gsl_vector * qtf, + const gsl_vector * diag, double delta, + gsl_vector * newton, gsl_vector * gradient, gsl_vector * p) +{ + double qnorm, gnorm, sgnorm, bnorm, temp; + + newton_direction (r, qtf, newton); + +#ifdef DEBUG + printf("newton = "); gsl_vector_fprintf(stdout, newton, "%g"); printf("\n"); +#endif + + qnorm = scaled_enorm (diag, newton); + + if (qnorm <= delta) + { + gsl_vector_memcpy (p, newton); +#ifdef DEBUG + printf("took newton (qnorm = %g <= delta = %g)\n", qnorm, delta); +#endif + return GSL_SUCCESS; + } + + gradient_direction (r, qtf, diag, gradient); + +#ifdef DEBUG + printf("grad = "); gsl_vector_fprintf(stdout, gradient, "%g"); printf("\n"); +#endif + + gnorm = enorm (gradient); + + if (gnorm == 0) + { + double alpha = delta / qnorm; + double beta = 0; + scaled_addition (alpha, newton, beta, gradient, p); +#ifdef DEBUG + printf("took scaled newton because gnorm = 0\n"); +#endif + return GSL_SUCCESS; + } + + minimum_step (gnorm, diag, gradient); + + compute_Rg (r, gradient, p); /* Use p as temporary space to compute Rg */ + +#ifdef DEBUG + printf("mingrad = "); gsl_vector_fprintf(stdout, gradient, "%g"); printf("\n"); + printf("Rg = "); gsl_vector_fprintf(stdout, p, "%g"); printf("\n"); +#endif + + temp = enorm (p); + sgnorm = (gnorm / temp) / temp; + + if (sgnorm > delta) + { + double alpha = 0; + double beta = delta; + scaled_addition (alpha, newton, beta, gradient, p); +#ifdef DEBUG + printf("took gradient\n"); +#endif + return GSL_SUCCESS; + } + + bnorm = enorm (qtf); + + { + double bg = bnorm / gnorm; + double bq = bnorm / qnorm; + double dq = delta / qnorm; + double dq2 = dq * dq; + double sd = sgnorm / delta; + double sd2 = sd * sd; + + double t1 = bg * bq * sd; + double u = t1 - dq; + double t2 = t1 - dq * sd2 + sqrt (u * u + (1-dq2) * (1 - sd2)); + + double alpha = dq * (1 - sd2) / t2; + double beta = (1 - alpha) * sgnorm; + +#ifdef DEBUG + printf("bnorm = %g\n", bnorm); + printf("gnorm = %g\n", gnorm); + printf("qnorm = %g\n", qnorm); + printf("delta = %g\n", delta); + printf("alpha = %g beta = %g\n", alpha, beta); + printf("took scaled combination of newton and gradient\n"); +#endif + + scaled_addition (alpha, newton, beta, gradient, p); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multiroots/enorm.c b/software/gsl-1.15/multiroots/enorm.c new file mode 100644 index 000000000..0d90dba76 --- /dev/null +++ b/software/gsl-1.15/multiroots/enorm.c @@ -0,0 +1,33 @@ +/* multiroots/enorm.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static double enorm (const gsl_vector * f); + +static double enorm (const gsl_vector * f) { + double e2 = 0 ; + size_t i, n = f->size ; + for (i = 0; i < n ; i++) { + double fi= gsl_vector_get(f, i); + e2 += fi * fi ; + } + return sqrt(e2); +} + + + diff --git a/software/gsl-1.15/multiroots/fdfsolver.c b/software/gsl-1.15/multiroots/fdfsolver.c new file mode 100644 index 000000000..82db3b462 --- /dev/null +++ b/software/gsl-1.15/multiroots/fdfsolver.c @@ -0,0 +1,177 @@ +/* multiroots/fdfsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_multiroot_fdfsolver * +gsl_multiroot_fdfsolver_alloc (const gsl_multiroot_fdfsolver_type * T, + size_t n) +{ + int status; + + gsl_multiroot_fdfsolver * s; + + s = (gsl_multiroot_fdfsolver *) malloc (sizeof (gsl_multiroot_fdfsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multiroot solver struct", + GSL_ENOMEM, 0); + } + + s->x = gsl_vector_calloc (n); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->f = gsl_vector_calloc (n); + + if (s->f == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for f", GSL_ENOMEM, 0); + } + + s->J = gsl_matrix_calloc (n,n); + + if (s->J == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for g", GSL_ENOMEM, 0); + } + + s->dx = gsl_vector_calloc (n); + + if (s->dx == 0) + { + gsl_matrix_free (s->J); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for dx", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for multiroot solver state", + GSL_ENOMEM, 0); + } + + s->type = T ; + + status = (s->type->alloc)(s->state, n); + + if (status != GSL_SUCCESS) + { + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to set solver", status, 0); + } + + s->fdf = NULL; + + return s; +} + +int +gsl_multiroot_fdfsolver_set (gsl_multiroot_fdfsolver * s, + gsl_multiroot_function_fdf * f, + const gsl_vector * x) +{ + if (s->x->size != f->n) + { + GSL_ERROR ("function incompatible with solver size", GSL_EBADLEN); + } + + if (x->size != f->n) + { + GSL_ERROR ("vector length not compatible with function", GSL_EBADLEN); + } + + s->fdf = f; + gsl_vector_memcpy(s->x,x); + + return (s->type->set) (s->state, s->fdf, s->x, s->f, s->J, s->dx); +} + +int +gsl_multiroot_fdfsolver_iterate (gsl_multiroot_fdfsolver * s) +{ + return (s->type->iterate) (s->state, s->fdf, s->x, s->f, s->J, s->dx); +} + +void +gsl_multiroot_fdfsolver_free (gsl_multiroot_fdfsolver * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + gsl_matrix_free (s->J); + free (s); +} + +const char * +gsl_multiroot_fdfsolver_name (const gsl_multiroot_fdfsolver * s) +{ + return s->type->name; +} + +gsl_vector * +gsl_multiroot_fdfsolver_root (const gsl_multiroot_fdfsolver * s) +{ + return s->x; +} + +gsl_vector * +gsl_multiroot_fdfsolver_dx (const gsl_multiroot_fdfsolver * s) +{ + return s->dx; +} + +gsl_vector * +gsl_multiroot_fdfsolver_f (const gsl_multiroot_fdfsolver * s) +{ + return s->f; +} diff --git a/software/gsl-1.15/multiroots/fdjac.c b/software/gsl-1.15/multiroots/fdjac.c new file mode 100644 index 000000000..286752c99 --- /dev/null +++ b/software/gsl-1.15/multiroots/fdjac.c @@ -0,0 +1,111 @@ +/* multiroots/fdjac.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +int +gsl_multiroot_fdjacobian (gsl_multiroot_function * F, + const gsl_vector * x, const gsl_vector * f, + double epsrel, gsl_matrix * jacobian) +{ + const size_t n = x->size; + const size_t m = f->size; + const size_t n1 = jacobian->size1; + const size_t n2 = jacobian->size2; + int status = 0; + + if (m != n1 || n != n2) + { + GSL_ERROR ("function and jacobian are not conformant", GSL_EBADLEN); + } + + { + size_t i,j; + gsl_vector *x1, *f1; + + x1 = gsl_vector_alloc (n); + + if (x1 == 0) + { + GSL_ERROR ("failed to allocate space for x1 workspace", GSL_ENOMEM); + } + + f1 = gsl_vector_alloc (m); + + if (f1 == 0) + { + gsl_vector_free (x1); + + GSL_ERROR ("failed to allocate space for f1 workspace", GSL_ENOMEM); + } + + gsl_vector_memcpy (x1, x); /* copy x into x1 */ + + for (j = 0; j < n; j++) + { + double xj = gsl_vector_get (x, j); + double dx = epsrel * fabs (xj); + + if (dx == 0) + { + dx = epsrel; + } + + gsl_vector_set (x1, j, xj + dx); + + { + int f_stat = GSL_MULTIROOT_FN_EVAL (F, x1, f1); + + if (f_stat != GSL_SUCCESS) + { + status = GSL_EBADFUNC; + break; /* n.b. avoid memory leak for x1,f1 */ + } + } + + gsl_vector_set (x1, j, xj); + + for (i = 0; i < m; i++) + { + double g1 = gsl_vector_get (f1, i); + double g0 = gsl_vector_get (f, i); + gsl_matrix_set (jacobian, i, j, (g1 - g0) / dx); + } + + { + gsl_vector_view col = gsl_matrix_column (jacobian, j); + int null_col = gsl_vector_isnull (&col.vector); + /* if column is null, return an error - this may be due to + dx being too small. Try increasing epsrel */ + if (null_col) { + status = GSL_ESING; + } + } + } + + gsl_vector_free (x1); + gsl_vector_free (f1); + } + + if (status) + return status; + else + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multiroots/fsolver.c b/software/gsl-1.15/multiroots/fsolver.c new file mode 100644 index 000000000..c460ab36b --- /dev/null +++ b/software/gsl-1.15/multiroots/fsolver.c @@ -0,0 +1,164 @@ +/* multiroots/fsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_multiroot_fsolver * +gsl_multiroot_fsolver_alloc (const gsl_multiroot_fsolver_type * T, + size_t n) +{ + int status; + + gsl_multiroot_fsolver * s; + + s = (gsl_multiroot_fsolver *) malloc (sizeof (gsl_multiroot_fsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multiroot solver struct", + GSL_ENOMEM, 0); + } + + s->x = gsl_vector_calloc (n); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->f = gsl_vector_calloc (n); + + if (s->f == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for f", GSL_ENOMEM, 0); + } + + s->dx = gsl_vector_calloc (n); + + if (s->dx == 0) + { + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); + GSL_ERROR_VAL ("failed to allocate space for dx", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for multiroot solver state", + GSL_ENOMEM, 0); + } + + s->type = T ; + + status = (s->type->alloc)(s->state, n); + + if (status != GSL_SUCCESS) + { + (s->type->free)(s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to set solver", status, 0); + } + + s->function = NULL; + + return s; +} + +int +gsl_multiroot_fsolver_set (gsl_multiroot_fsolver * s, + gsl_multiroot_function * f, + const gsl_vector * x) +{ + if (s->x->size != f->n) + { + GSL_ERROR ("function incompatible with solver size", GSL_EBADLEN); + } + + if (x->size != f->n) + { + GSL_ERROR ("vector length not compatible with function", GSL_EBADLEN); + } + + s->function = f; + gsl_vector_memcpy(s->x,x); + + return (s->type->set) (s->state, s->function, s->x, s->f, s->dx); +} + +int +gsl_multiroot_fsolver_iterate (gsl_multiroot_fsolver * s) +{ + return (s->type->iterate) (s->state, s->function, s->x, s->f, s->dx); +} + +void +gsl_multiroot_fsolver_free (gsl_multiroot_fsolver * s) +{ + RETURN_IF_NULL (s); + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->dx); + gsl_vector_free (s->x); + gsl_vector_free (s->f); + free (s); +} + +const char * +gsl_multiroot_fsolver_name (const gsl_multiroot_fsolver * s) +{ + return s->type->name; +} + +gsl_vector * +gsl_multiroot_fsolver_root (const gsl_multiroot_fsolver * s) +{ + return s->x; +} + +gsl_vector * +gsl_multiroot_fsolver_dx (const gsl_multiroot_fsolver * s) +{ + return s->dx; +} + +gsl_vector * +gsl_multiroot_fsolver_f (const gsl_multiroot_fsolver * s) +{ + return s->f; +} diff --git a/software/gsl-1.15/multiroots/gnewton.c b/software/gsl-1.15/multiroots/gnewton.c new file mode 100644 index 000000000..44ac26270 --- /dev/null +++ b/software/gsl-1.15/multiroots/gnewton.c @@ -0,0 +1,230 @@ +/* multiroots/gnewton.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "enorm.c" + +/* Simple globally convergent Newton method (rejects uphill steps) */ + +typedef struct + { + double phi; + gsl_vector * x_trial; + gsl_vector * d; + gsl_matrix * lu; + gsl_permutation * permutation; + } +gnewton_state_t; + +static int gnewton_alloc (void * vstate, size_t n); +static int gnewton_set (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int gnewton_iterate (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static void gnewton_free (void * vstate); + +static int +gnewton_alloc (void * vstate, size_t n) +{ + gnewton_state_t * state = (gnewton_state_t *) vstate; + gsl_vector * d, * x_trial ; + gsl_permutation * p; + gsl_matrix * m; + + m = gsl_matrix_calloc (n,n); + + if (m == 0) + { + GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); + } + + state->lu = m ; + + p = gsl_permutation_calloc (n); + + if (p == 0) + { + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); + } + + state->permutation = p ; + + d = gsl_vector_calloc (n); + + if (d == 0) + { + gsl_permutation_free(p); + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); + } + + state->d = d; + + x_trial = gsl_vector_calloc (n); + + if (x_trial == 0) + { + gsl_vector_free(d); + gsl_permutation_free(p); + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); + } + + state->x_trial = x_trial; + + return GSL_SUCCESS; +} + + +static int +gnewton_set (void * vstate, gsl_multiroot_function_fdf * FDF, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + gnewton_state_t * state = (gnewton_state_t *) vstate; + size_t i, n = FDF->n ; + + GSL_MULTIROOT_FN_EVAL_F_DF (FDF, x, f, J); + + for (i = 0; i < n; i++) + { + gsl_vector_set (dx, i, 0.0); + } + + state->phi = enorm(f); + + return GSL_SUCCESS; +} + +static int +gnewton_iterate (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + gnewton_state_t * state = (gnewton_state_t *) vstate; + + int signum ; + double t, phi0, phi1; + + size_t i; + + size_t n = fdf->n ; + + gsl_matrix_memcpy (state->lu, J); + + gsl_linalg_LU_decomp (state->lu, state->permutation, &signum); + + { + int status = gsl_linalg_LU_solve (state->lu, state->permutation, f, state->d); + if (status) + return status; + } + + t = 1; + + phi0 = state->phi; + +new_step: + + for (i = 0; i < n; i++) + { + double di = gsl_vector_get (state->d, i); + double xi = gsl_vector_get (x, i); + gsl_vector_set (state->x_trial, i, xi - t*di); + } + + { + int status = GSL_MULTIROOT_FN_EVAL_F (fdf, state->x_trial, f); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + phi1 = enorm (f); + + if (phi1 > phi0 && t > GSL_DBL_EPSILON) + { + /* full step goes uphill, take a reduced step instead */ + + double theta = phi1 / phi0; + double u = (sqrt(1.0 + 6.0 * theta) - 1.0) / (3.0 * theta); + + t *= u ; + + goto new_step; + } + + /* copy x_trial into x */ + + gsl_vector_memcpy (x, state->x_trial); + + for (i = 0; i < n; i++) + { + double di = gsl_vector_get (state->d, i); + gsl_vector_set (dx, i, -t*di); + } + + { + int status = GSL_MULTIROOT_FN_EVAL_DF (fdf, x, J); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + state->phi = phi1; + + return GSL_SUCCESS; +} + + +static void +gnewton_free (void * vstate) +{ + gnewton_state_t * state = (gnewton_state_t *) vstate; + + gsl_vector_free(state->d); + gsl_vector_free(state->x_trial); + gsl_matrix_free(state->lu); + gsl_permutation_free(state->permutation); +} + + +static const gsl_multiroot_fdfsolver_type gnewton_type = +{"gnewton", /* name */ + sizeof (gnewton_state_t), + &gnewton_alloc, + &gnewton_set, + &gnewton_iterate, + &gnewton_free}; + +const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_gnewton = &gnewton_type; diff --git a/software/gsl-1.15/multiroots/gsl_multiroots.h b/software/gsl-1.15/multiroots/gsl_multiroots.h new file mode 100644 index 000000000..7f661547f --- /dev/null +++ b/software/gsl-1.15/multiroots/gsl_multiroots.h @@ -0,0 +1,177 @@ +/* multiroots/gsl_multiroots.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MULTIROOTS_H__ +#define __GSL_MULTIROOTS_H__ + +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Definition of vector-valued functions with parameters based on gsl_vector */ + +struct gsl_multiroot_function_struct +{ + int (* f) (const gsl_vector * x, void * params, gsl_vector * f); + size_t n; + void * params; +}; + +typedef struct gsl_multiroot_function_struct gsl_multiroot_function ; + +#define GSL_MULTIROOT_FN_EVAL(F,x,y) (*((F)->f))(x,(F)->params,(y)) + +int gsl_multiroot_fdjacobian (gsl_multiroot_function * F, + const gsl_vector * x, const gsl_vector * f, + double epsrel, gsl_matrix * jacobian); + + +typedef struct + { + const char *name; + size_t size; + int (*alloc) (void *state, size_t n); + int (*set) (void *state, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); + int (*iterate) (void *state, gsl_multiroot_function * function, gsl_vector * x, gsl_vector * f, gsl_vector * dx); + void (*free) (void *state); + } +gsl_multiroot_fsolver_type; + +typedef struct + { + const gsl_multiroot_fsolver_type * type; + gsl_multiroot_function * function ; + gsl_vector * x ; + gsl_vector * f ; + gsl_vector * dx ; + void *state; + } +gsl_multiroot_fsolver; + +gsl_multiroot_fsolver * +gsl_multiroot_fsolver_alloc (const gsl_multiroot_fsolver_type * T, + size_t n); + +void gsl_multiroot_fsolver_free (gsl_multiroot_fsolver * s); + +int gsl_multiroot_fsolver_set (gsl_multiroot_fsolver * s, + gsl_multiroot_function * f, + const gsl_vector * x); + +int gsl_multiroot_fsolver_iterate (gsl_multiroot_fsolver * s); + +const char * gsl_multiroot_fsolver_name (const gsl_multiroot_fsolver * s); +gsl_vector * gsl_multiroot_fsolver_root (const gsl_multiroot_fsolver * s); +gsl_vector * gsl_multiroot_fsolver_dx (const gsl_multiroot_fsolver * s); +gsl_vector * gsl_multiroot_fsolver_f (const gsl_multiroot_fsolver * s); + +/* Definition of vector-valued functions and gradient with parameters + based on gsl_vector */ + +struct gsl_multiroot_function_fdf_struct +{ + int (* f) (const gsl_vector * x, void * params, gsl_vector * f); + int (* df) (const gsl_vector * x, void * params, gsl_matrix * df); + int (* fdf) (const gsl_vector * x, void * params, gsl_vector * f, gsl_matrix *df); + size_t n; + void * params; +}; + +typedef struct gsl_multiroot_function_fdf_struct gsl_multiroot_function_fdf ; + +#define GSL_MULTIROOT_FN_EVAL_F(F,x,y) ((*((F)->f))(x,(F)->params,(y))) +#define GSL_MULTIROOT_FN_EVAL_DF(F,x,dy) ((*((F)->df))(x,(F)->params,(dy))) +#define GSL_MULTIROOT_FN_EVAL_F_DF(F,x,y,dy) ((*((F)->fdf))(x,(F)->params,(y),(dy))) + +typedef struct + { + const char *name; + size_t size; + int (*alloc) (void *state, size_t n); + int (*set) (void *state, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); + int (*iterate) (void *state, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); + void (*free) (void *state); + } +gsl_multiroot_fdfsolver_type; + +typedef struct + { + const gsl_multiroot_fdfsolver_type * type; + gsl_multiroot_function_fdf * fdf ; + gsl_vector * x; + gsl_vector * f; + gsl_matrix * J; + gsl_vector * dx; + void *state; + } +gsl_multiroot_fdfsolver; + +gsl_multiroot_fdfsolver * +gsl_multiroot_fdfsolver_alloc (const gsl_multiroot_fdfsolver_type * T, + size_t n); + +int +gsl_multiroot_fdfsolver_set (gsl_multiroot_fdfsolver * s, + gsl_multiroot_function_fdf * fdf, + const gsl_vector * x); + +int +gsl_multiroot_fdfsolver_iterate (gsl_multiroot_fdfsolver * s); + +void +gsl_multiroot_fdfsolver_free (gsl_multiroot_fdfsolver * s); + +const char * gsl_multiroot_fdfsolver_name (const gsl_multiroot_fdfsolver * s); +gsl_vector * gsl_multiroot_fdfsolver_root (const gsl_multiroot_fdfsolver * s); +gsl_vector * gsl_multiroot_fdfsolver_dx (const gsl_multiroot_fdfsolver * s); +gsl_vector * gsl_multiroot_fdfsolver_f (const gsl_multiroot_fdfsolver * s); + +int gsl_multiroot_test_delta (const gsl_vector * dx, const gsl_vector * x, + double epsabs, double epsrel); + +int gsl_multiroot_test_residual (const gsl_vector * f, double epsabs); + +GSL_VAR const gsl_multiroot_fsolver_type * gsl_multiroot_fsolver_dnewton; +GSL_VAR const gsl_multiroot_fsolver_type * gsl_multiroot_fsolver_broyden; +GSL_VAR const gsl_multiroot_fsolver_type * gsl_multiroot_fsolver_hybrid; +GSL_VAR const gsl_multiroot_fsolver_type * gsl_multiroot_fsolver_hybrids; + +GSL_VAR const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_newton; +GSL_VAR const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_gnewton; +GSL_VAR const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_hybridj; +GSL_VAR const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_hybridsj; + + +__END_DECLS + +#endif /* __GSL_MULTIROOTS_H__ */ diff --git a/software/gsl-1.15/multiroots/hybrid.c b/software/gsl-1.15/multiroots/hybrid.c new file mode 100644 index 000000000..654938237 --- /dev/null +++ b/software/gsl-1.15/multiroots/hybrid.c @@ -0,0 +1,662 @@ +/* multiroots/hybrid.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "dogleg.c" + +typedef struct +{ + size_t iter; + size_t ncfail; + size_t ncsuc; + size_t nslow1; + size_t nslow2; + double fnorm; + double delta; + gsl_matrix *J; + gsl_matrix *q; + gsl_matrix *r; + gsl_vector *tau; + gsl_vector *diag; + gsl_vector *qtf; + gsl_vector *newton; + gsl_vector *gradient; + gsl_vector *x_trial; + gsl_vector *f_trial; + gsl_vector *df; + gsl_vector *qtdf; + gsl_vector *rdx; + gsl_vector *w; + gsl_vector *v; +} +hybrid_state_t; + +static int hybrid_alloc (void *vstate, size_t n); +static int hybrid_set (void *vstate, gsl_multiroot_function * func, + gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static int hybrids_set (void *vstate, gsl_multiroot_function * func, + gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static int hybrid_set_impl (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx, int scale); +static int hybrid_iterate (void *vstate, gsl_multiroot_function * func, + gsl_vector * x, gsl_vector * f, gsl_vector * dx); +static void hybrid_free (void *vstate); +static int hybrid_iterate_impl (void *vstate, gsl_multiroot_function * func, + gsl_vector * x, gsl_vector * f, gsl_vector * dx, + int scale); + +static int +hybrid_alloc (void *vstate, size_t n) +{ + hybrid_state_t *state = (hybrid_state_t *) vstate; + gsl_matrix *J, *q, *r; + gsl_vector *tau, *diag, *qtf, *newton, *gradient, *x_trial, *f_trial, + *df, *qtdf, *rdx, *w, *v; + + J = gsl_matrix_calloc (n, n); + + if (J == 0) + { + GSL_ERROR ("failed to allocate space for J", GSL_ENOMEM); + } + + state->J = J; + + q = gsl_matrix_calloc (n, n); + + if (q == 0) + { + gsl_matrix_free (J); + + GSL_ERROR ("failed to allocate space for q", GSL_ENOMEM); + } + + state->q = q; + + r = gsl_matrix_calloc (n, n); + + if (r == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + + GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); + } + + state->r = r; + + tau = gsl_vector_calloc (n); + + if (tau == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + + GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); + } + + state->tau = tau; + + diag = gsl_vector_calloc (n); + + if (diag == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + + GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); + } + + state->diag = diag; + + qtf = gsl_vector_calloc (n); + + if (qtf == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + + GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); + } + + state->qtf = qtf; + + newton = gsl_vector_calloc (n); + + if (newton == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + + GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); + } + + state->newton = newton; + + gradient = gsl_vector_calloc (n); + + if (gradient == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + + GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); + } + + state->gradient = gradient; + + x_trial = gsl_vector_calloc (n); + + if (x_trial == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + + GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); + } + + state->x_trial = x_trial; + + f_trial = gsl_vector_calloc (n); + + if (f_trial == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + + GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); + } + + state->f_trial = f_trial; + + df = gsl_vector_calloc (n); + + if (df == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + + GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); + } + + state->df = df; + + qtdf = gsl_vector_calloc (n); + + if (qtdf == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + + GSL_ERROR ("failed to allocate space for qtdf", GSL_ENOMEM); + } + + state->qtdf = qtdf; + + + rdx = gsl_vector_calloc (n); + + if (rdx == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + + GSL_ERROR ("failed to allocate space for rdx", GSL_ENOMEM); + } + + state->rdx = rdx; + + w = gsl_vector_calloc (n); + + if (w == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + gsl_vector_free (rdx); + + GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); + } + + state->w = w; + + v = gsl_vector_calloc (n); + + if (v == 0) + { + gsl_matrix_free (J); + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + gsl_vector_free (rdx); + gsl_vector_free (w); + + GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); + } + + state->v = v; + + return GSL_SUCCESS; +} + +static int +hybrid_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx) +{ + int status = hybrid_set_impl (vstate, func, x, f, dx, 0); + return status; +} + +static int +hybrids_set (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx) +{ + int status = hybrid_set_impl (vstate, func, x, f, dx, 1); + return status; +} + +static int +hybrid_set_impl (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx, int scale) +{ + hybrid_state_t *state = (hybrid_state_t *) vstate; + + gsl_matrix *J = state->J; + gsl_matrix *q = state->q; + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + + int status; + + status = GSL_MULTIROOT_FN_EVAL (func, x, f); + + if (status) + { + return status; + } + + status = gsl_multiroot_fdjacobian (func, x, f, GSL_SQRT_DBL_EPSILON, J); + + if (status) + { + return status; + } + + state->iter = 1; + state->fnorm = enorm (f); + state->ncfail = 0; + state->ncsuc = 0; + state->nslow1 = 0; + state->nslow2 = 0; + + gsl_vector_set_all (dx, 0.0); + + /* Store column norms in diag */ + + if (scale) + compute_diag (J, diag); + else + gsl_vector_set_all (diag, 1.0); + + /* Set delta to factor |D x| or to factor if |D x| is zero */ + + state->delta = compute_delta (diag, x); + + /* Factorize J into QR decomposition */ + + status = gsl_linalg_QR_decomp (J, tau); + + if (status) + { + return status; + } + + status = gsl_linalg_QR_unpack (J, tau, q, r); + + return status; +} + +static int +hybrid_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx) +{ + int status = hybrid_iterate_impl (vstate, func, x, f, dx, 0); + return status; +} + +static int +hybrids_iterate (void *vstate, gsl_multiroot_function * func, gsl_vector * x, + gsl_vector * f, gsl_vector * dx) +{ + int status = hybrid_iterate_impl (vstate, func, x, f, dx, 1); + return status; +} + +static int +hybrid_iterate_impl (void *vstate, gsl_multiroot_function * func, + gsl_vector * x, + gsl_vector * f, gsl_vector * dx, int scale) +{ + hybrid_state_t *state = (hybrid_state_t *) vstate; + + const double fnorm = state->fnorm; + + gsl_matrix *J = state->J; + gsl_matrix *q = state->q; + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + gsl_vector *qtf = state->qtf; + gsl_vector *x_trial = state->x_trial; + gsl_vector *f_trial = state->f_trial; + gsl_vector *df = state->df; + gsl_vector *qtdf = state->qtdf; + gsl_vector *rdx = state->rdx; + gsl_vector *w = state->w; + gsl_vector *v = state->v; + + double prered, actred; + double pnorm, fnorm1, fnorm1p; + double ratio; + double p1 = 0.1, p5 = 0.5, p001 = 0.001, p0001 = 0.0001; + + /* Compute qtf = Q^T f */ + + compute_qtf (q, f, qtf); + + /* Compute dogleg step */ + + dogleg (r, qtf, diag, state->delta, state->newton, state->gradient, dx); + + /* Take a trial step */ + + compute_trial_step (x, dx, state->x_trial); + + pnorm = scaled_enorm (diag, dx); + + if (state->iter == 1) + { + if (pnorm < state->delta) + { + state->delta = pnorm; + } + } + + /* Evaluate function at x + p */ + + { + int status = GSL_MULTIROOT_FN_EVAL (func, x_trial, f_trial); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + /* Set df = f_trial - f */ + + compute_df (f_trial, f, df); + + /* Compute the scaled actual reduction */ + + fnorm1 = enorm (f_trial); + + actred = compute_actual_reduction (fnorm, fnorm1); + + /* Compute rdx = R dx */ + + compute_rdx (r, dx, rdx); + + /* Compute the scaled predicted reduction phi1p = |Q^T f + R dx| */ + + fnorm1p = enorm_sum (qtf, rdx); + + prered = compute_predicted_reduction (fnorm, fnorm1p); + + /* Compute the ratio of the actual to predicted reduction */ + + if (prered > 0) + { + ratio = actred / prered; + } + else + { + ratio = 0; + } + + /* Update the step bound */ + + if (ratio < p1) + { + state->ncsuc = 0; + state->ncfail++; + state->delta *= p5; + } + else + { + state->ncfail = 0; + state->ncsuc++; + + if (ratio >= p5 || state->ncsuc > 1) + state->delta = GSL_MAX (state->delta, pnorm / p5); + if (fabs (ratio - 1) <= p1) + state->delta = pnorm / p5; + } + + /* Test for successful iteration */ + + if (ratio >= p0001) + { + gsl_vector_memcpy (x, x_trial); + gsl_vector_memcpy (f, f_trial); + state->fnorm = fnorm1; + state->iter++; + } + + /* Determine the progress of the iteration */ + + state->nslow1++; + if (actred >= p001) + state->nslow1 = 0; + + if (actred >= p1) + state->nslow2 = 0; + + if (state->ncfail == 2) + { + gsl_multiroot_fdjacobian (func, x, f, GSL_SQRT_DBL_EPSILON, J); + + state->nslow2++; + + if (state->iter == 1) + { + if (scale) + compute_diag (J, diag); + state->delta = compute_delta (diag, x); + } + else + { + if (scale) + update_diag (J, diag); + } + + /* Factorize J into QR decomposition */ + + gsl_linalg_QR_decomp (J, tau); + gsl_linalg_QR_unpack (J, tau, q, r); + + return GSL_SUCCESS; + } + + /* Compute qtdf = Q^T df, w = (Q^T df - R dx)/|dx|, v = D^2 dx/|dx| */ + + compute_qtf (q, df, qtdf); + + compute_wv (qtdf, rdx, dx, diag, pnorm, w, v); + + /* Rank-1 update of the jacobian Q'R' = Q(R + w v^T) */ + + gsl_linalg_QR_update (q, r, w, v); + + /* No progress as measured by jacobian evaluations */ + + if (state->nslow2 == 5) + { + return GSL_ENOPROGJ; + } + + /* No progress as measured by function evaluations */ + + if (state->nslow1 == 10) + { + return GSL_ENOPROG; + } + + return GSL_SUCCESS; +} + + +static void +hybrid_free (void *vstate) +{ + hybrid_state_t *state = (hybrid_state_t *) vstate; + + gsl_vector_free (state->v); + gsl_vector_free (state->w); + gsl_vector_free (state->rdx); + gsl_vector_free (state->qtdf); + gsl_vector_free (state->df); + gsl_vector_free (state->f_trial); + gsl_vector_free (state->x_trial); + gsl_vector_free (state->gradient); + gsl_vector_free (state->newton); + gsl_vector_free (state->qtf); + gsl_vector_free (state->diag); + gsl_vector_free (state->tau); + gsl_matrix_free (state->r); + gsl_matrix_free (state->q); + gsl_matrix_free (state->J); +} + +static const gsl_multiroot_fsolver_type hybrid_type = { + "hybrid", /* name */ + sizeof (hybrid_state_t), + &hybrid_alloc, + &hybrid_set, + &hybrid_iterate, + &hybrid_free +}; + +static const gsl_multiroot_fsolver_type hybrids_type = { + "hybrids", /* name */ + sizeof (hybrid_state_t), + &hybrid_alloc, + &hybrids_set, + &hybrids_iterate, + &hybrid_free +}; + +const gsl_multiroot_fsolver_type *gsl_multiroot_fsolver_hybrid = &hybrid_type; +const gsl_multiroot_fsolver_type *gsl_multiroot_fsolver_hybrids = + &hybrids_type; diff --git a/software/gsl-1.15/multiroots/hybridj.c b/software/gsl-1.15/multiroots/hybridj.c new file mode 100644 index 000000000..afe523025 --- /dev/null +++ b/software/gsl-1.15/multiroots/hybridj.c @@ -0,0 +1,608 @@ +/* multiroots/hybridj.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "dogleg.c" + +typedef struct + { + size_t iter; + size_t ncfail; + size_t ncsuc; + size_t nslow1; + size_t nslow2; + double fnorm; + double delta; + gsl_matrix *q; + gsl_matrix *r; + gsl_vector *tau; + gsl_vector *diag; + gsl_vector *qtf; + gsl_vector *newton; + gsl_vector *gradient; + gsl_vector *x_trial; + gsl_vector *f_trial; + gsl_vector *df; + gsl_vector *qtdf; + gsl_vector *rdx; + gsl_vector *w; + gsl_vector *v; + } +hybridj_state_t; + +static int hybridj_alloc (void *vstate, size_t n); +static int hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int hybridj_set_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); +static int hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static void hybridj_free (void *vstate); +static int hybridj_iterate_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale); + +static int +hybridj_alloc (void *vstate, size_t n) +{ + hybridj_state_t *state = (hybridj_state_t *) vstate; + gsl_matrix *q, *r; + gsl_vector *tau, *diag, *qtf, *newton, *gradient, *x_trial, *f_trial, + *df, *qtdf, *rdx, *w, *v; + + q = gsl_matrix_calloc (n, n); + + if (q == 0) + { + GSL_ERROR ("failed to allocate space for q", GSL_ENOMEM); + } + + state->q = q; + + r = gsl_matrix_calloc (n, n); + + if (r == 0) + { + gsl_matrix_free (q); + + GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); + } + + state->r = r; + + tau = gsl_vector_calloc (n); + + if (tau == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + + GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); + } + + state->tau = tau; + + diag = gsl_vector_calloc (n); + + if (diag == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + + GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); + } + + state->diag = diag; + + qtf = gsl_vector_calloc (n); + + if (qtf == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + + GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); + } + + state->qtf = qtf; + + newton = gsl_vector_calloc (n); + + if (newton == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + + GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); + } + + state->newton = newton; + + gradient = gsl_vector_calloc (n); + + if (gradient == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + + GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); + } + + state->gradient = gradient; + + x_trial = gsl_vector_calloc (n); + + if (x_trial == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + + GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); + } + + state->x_trial = x_trial; + + f_trial = gsl_vector_calloc (n); + + if (f_trial == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + + GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); + } + + state->f_trial = f_trial; + + df = gsl_vector_calloc (n); + + if (df == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + + GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); + } + + state->df = df; + + qtdf = gsl_vector_calloc (n); + + if (qtdf == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + + GSL_ERROR ("failed to allocate space for qtdf", GSL_ENOMEM); + } + + state->qtdf = qtdf; + + + rdx = gsl_vector_calloc (n); + + if (rdx == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + + GSL_ERROR ("failed to allocate space for rdx", GSL_ENOMEM); + } + + state->rdx = rdx; + + w = gsl_vector_calloc (n); + + if (w == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + gsl_vector_free (rdx); + + GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); + } + + state->w = w; + + v = gsl_vector_calloc (n); + + if (v == 0) + { + gsl_matrix_free (q); + gsl_matrix_free (r); + gsl_vector_free (tau); + gsl_vector_free (diag); + gsl_vector_free (qtf); + gsl_vector_free (newton); + gsl_vector_free (gradient); + gsl_vector_free (x_trial); + gsl_vector_free (f_trial); + gsl_vector_free (df); + gsl_vector_free (qtdf); + gsl_vector_free (rdx); + gsl_vector_free (w); + + GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); + } + + state->v = v; + + return GSL_SUCCESS; +} + +static int +hybridj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = hybridj_set_impl (vstate, fdf, x, f, J, dx, 0); + return status ; +} + +static int +hybridsj_set (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = hybridj_set_impl (vstate, fdf, x, f, J, dx, 1); + return status ; +} + +static int +hybridj_set_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) +{ + hybridj_state_t *state = (hybridj_state_t *) vstate; + + gsl_matrix *q = state->q; + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + + GSL_MULTIROOT_FN_EVAL_F_DF (fdf, x, f, J); + + state->iter = 1; + state->fnorm = enorm (f); + state->ncfail = 0; + state->ncsuc = 0; + state->nslow1 = 0; + state->nslow2 = 0; + + gsl_vector_set_all (dx, 0.0); + + /* Store column norms in diag */ + + if (scale) + compute_diag (J, diag); + else + gsl_vector_set_all (diag, 1.0); + + /* Set delta to factor |D x| or to factor if |D x| is zero */ + + state->delta = compute_delta (diag, x); + + /* Factorize J into QR decomposition */ + + gsl_linalg_QR_decomp (J, tau); + gsl_linalg_QR_unpack (J, tau, q, r); + + return GSL_SUCCESS; +} + +static int +hybridj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = hybridj_iterate_impl (vstate, fdf, x, f, J, dx, 0); + return status; +} + +static int +hybridsj_iterate (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + int status = hybridj_iterate_impl (vstate, fdf, x, f, J, dx, 1); + return status; +} + +static int +hybridj_iterate_impl (void *vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx, int scale) +{ + hybridj_state_t *state = (hybridj_state_t *) vstate; + + const double fnorm = state->fnorm; + + gsl_matrix *q = state->q; + gsl_matrix *r = state->r; + gsl_vector *tau = state->tau; + gsl_vector *diag = state->diag; + gsl_vector *qtf = state->qtf; + gsl_vector *x_trial = state->x_trial; + gsl_vector *f_trial = state->f_trial; + gsl_vector *df = state->df; + gsl_vector *qtdf = state->qtdf; + gsl_vector *rdx = state->rdx; + gsl_vector *w = state->w; + gsl_vector *v = state->v; + + double prered, actred; + double pnorm, fnorm1, fnorm1p; + double ratio; + double p1 = 0.1, p5 = 0.5, p001 = 0.001, p0001 = 0.0001; + + /* Compute qtf = Q^T f */ + + compute_qtf (q, f, qtf); + + /* Compute dogleg step */ + + dogleg (r, qtf, diag, state->delta, state->newton, state->gradient, dx); + + /* Take a trial step */ + + compute_trial_step (x, dx, state->x_trial); + + pnorm = scaled_enorm (diag, dx); + + if (state->iter == 1) + { + if (pnorm < state->delta) + { + state->delta = pnorm; + } + } + + /* Evaluate function at x + p */ + + { + int status = GSL_MULTIROOT_FN_EVAL_F (fdf, x_trial, f_trial); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + /* Set df = f_trial - f */ + + compute_df (f_trial, f, df); + + /* Compute the scaled actual reduction */ + + fnorm1 = enorm (f_trial); + + actred = compute_actual_reduction (fnorm, fnorm1); + + /* Compute rdx = R dx */ + + compute_rdx (r, dx, rdx); + + /* Compute the scaled predicted reduction phi1p = |Q^T f + R dx| */ + + fnorm1p = enorm_sum (qtf, rdx); + + prered = compute_predicted_reduction (fnorm, fnorm1p); + + /* Compute the ratio of the actual to predicted reduction */ + + if (prered > 0) + { + ratio = actred / prered; + } + else + { + ratio = 0; + } + + /* Update the step bound */ + + if (ratio < p1) + { + state->ncsuc = 0; + state->ncfail++; + state->delta *= p5; + } + else + { + state->ncfail = 0; + state->ncsuc++; + + if (ratio >= p5 || state->ncsuc > 1) + state->delta = GSL_MAX (state->delta, pnorm / p5); + if (fabs (ratio - 1) <= p1) + state->delta = pnorm / p5; + } + + /* Test for successful iteration */ + + if (ratio >= p0001) + { + gsl_vector_memcpy (x, x_trial); + gsl_vector_memcpy (f, f_trial); + state->fnorm = fnorm1; + state->iter++; + } + + /* Determine the progress of the iteration */ + + state->nslow1++; + if (actred >= p001) + state->nslow1 = 0; + + if (actred >= p1) + state->nslow2 = 0; + + if (state->ncfail == 2) + { + { + int status = GSL_MULTIROOT_FN_EVAL_DF (fdf, x, J); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + state->nslow2++; + + if (state->iter == 1) + { + if (scale) + compute_diag (J, diag); + state->delta = compute_delta (diag, x); + } + else + { + if (scale) + update_diag (J, diag); + } + + /* Factorize J into QR decomposition */ + + gsl_linalg_QR_decomp (J, tau); + gsl_linalg_QR_unpack (J, tau, q, r); + return GSL_SUCCESS; + } + + /* Compute qtdf = Q^T df, w = (Q^T df - R dx)/|dx|, v = D^2 dx/|dx| */ + + compute_qtf (q, df, qtdf); + + compute_wv (qtdf, rdx, dx, diag, pnorm, w, v); + + /* Rank-1 update of the jacobian Q'R' = Q(R + w v^T) */ + + gsl_linalg_QR_update (q, r, w, v); + + /* No progress as measured by jacobian evaluations */ + + if (state->nslow2 == 5) + { + return GSL_ENOPROGJ; + } + + /* No progress as measured by function evaluations */ + + if (state->nslow1 == 10) + { + return GSL_ENOPROG; + } + + return GSL_SUCCESS; +} + + +static void +hybridj_free (void *vstate) +{ + hybridj_state_t *state = (hybridj_state_t *) vstate; + + gsl_vector_free (state->v); + gsl_vector_free (state->w); + gsl_vector_free (state->rdx); + gsl_vector_free (state->qtdf); + gsl_vector_free (state->df); + gsl_vector_free (state->f_trial); + gsl_vector_free (state->x_trial); + gsl_vector_free (state->gradient); + gsl_vector_free (state->newton); + gsl_vector_free (state->qtf); + gsl_vector_free (state->diag); + gsl_vector_free (state->tau); + gsl_matrix_free (state->r); + gsl_matrix_free (state->q); +} + +static const gsl_multiroot_fdfsolver_type hybridj_type = +{ + "hybridj", /* name */ + sizeof (hybridj_state_t), + &hybridj_alloc, + &hybridj_set, + &hybridj_iterate, + &hybridj_free +}; + +static const gsl_multiroot_fdfsolver_type hybridsj_type = +{ + "hybridsj", /* name */ + sizeof (hybridj_state_t), + &hybridj_alloc, + &hybridsj_set, + &hybridsj_iterate, + &hybridj_free +}; + +const gsl_multiroot_fdfsolver_type *gsl_multiroot_fdfsolver_hybridj = &hybridj_type; +const gsl_multiroot_fdfsolver_type *gsl_multiroot_fdfsolver_hybridsj = &hybridsj_type; diff --git a/software/gsl-1.15/multiroots/newton.c b/software/gsl-1.15/multiroots/newton.c new file mode 100644 index 000000000..f60ddca9b --- /dev/null +++ b/software/gsl-1.15/multiroots/newton.c @@ -0,0 +1,156 @@ +/* multiroots/newton.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +typedef struct + { + gsl_matrix * lu; + gsl_permutation * permutation; + } +newton_state_t; + +static int newton_alloc (void * vstate, size_t n); +static int newton_set (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static int newton_iterate (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx); +static void newton_free (void * vstate); + +static int +newton_alloc (void * vstate, size_t n) +{ + newton_state_t * state = (newton_state_t *) vstate; + gsl_permutation * p; + gsl_matrix * m; + + m = gsl_matrix_calloc (n,n); + + if (m == 0) + { + GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); + } + + state->lu = m ; + + p = gsl_permutation_calloc (n); + + if (p == 0) + { + gsl_matrix_free(m); + + GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); + } + + state->permutation = p ; + + return GSL_SUCCESS; +} + +static int +newton_set (void * vstate, gsl_multiroot_function_fdf * FDF, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + newton_state_t * state = (newton_state_t *) vstate; + + size_t i, n = FDF->n ; + + state = 0 ; /* avoid warnings about unused parameters */ + + GSL_MULTIROOT_FN_EVAL_F_DF (FDF, x, f, J); + + for (i = 0; i < n; i++) + { + gsl_vector_set (dx, i, 0.0); + } + + return GSL_SUCCESS; +} + +static int +newton_iterate (void * vstate, gsl_multiroot_function_fdf * fdf, gsl_vector * x, gsl_vector * f, gsl_matrix * J, gsl_vector * dx) +{ + newton_state_t * state = (newton_state_t *) vstate; + + int signum; + + size_t i; + + size_t n = fdf->n ; + + gsl_matrix_memcpy (state->lu, J); + + gsl_linalg_LU_decomp (state->lu, state->permutation, &signum); + + { + int status = gsl_linalg_LU_solve (state->lu, state->permutation, f, dx); + + if (status) + return status; + } + + for (i = 0; i < n; i++) + { + double e = gsl_vector_get (dx, i); + double y = gsl_vector_get (x, i); + gsl_vector_set (dx, i, -e); + gsl_vector_set (x, i, y - e); + } + + { + int status = GSL_MULTIROOT_FN_EVAL_F_DF (fdf, x, f, J); + + if (status != GSL_SUCCESS) + { + return GSL_EBADFUNC; + } + } + + return GSL_SUCCESS; +} + + +static void +newton_free (void * vstate) +{ + newton_state_t * state = (newton_state_t *) vstate; + + gsl_matrix_free(state->lu); + + gsl_permutation_free(state->permutation); +} + + +static const gsl_multiroot_fdfsolver_type newton_type = +{"newton", /* name */ + sizeof (newton_state_t), + &newton_alloc, + &newton_set, + &newton_iterate, + &newton_free}; + +const gsl_multiroot_fdfsolver_type * gsl_multiroot_fdfsolver_newton = &newton_type; diff --git a/software/gsl-1.15/multiroots/test.c b/software/gsl-1.15/multiroots/test.c new file mode 100644 index 000000000..2f2593d30 --- /dev/null +++ b/software/gsl-1.15/multiroots/test.c @@ -0,0 +1,260 @@ +/* multiroots/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "test_funcs.h" +int test_fdf (const char * desc, gsl_multiroot_function_fdf * function, initpt_function initpt, double factor, const gsl_multiroot_fdfsolver_type * T); +int test_f (const char * desc, gsl_multiroot_function_fdf * fdf, initpt_function initpt, double factor, const gsl_multiroot_fsolver_type * T); + + +int +main (void) +{ + const gsl_multiroot_fsolver_type * fsolvers[5] ; + const gsl_multiroot_fsolver_type ** T1 ; + + const gsl_multiroot_fdfsolver_type * fdfsolvers[5] ; + const gsl_multiroot_fdfsolver_type ** T2 ; + + double f; + + fsolvers[0] = gsl_multiroot_fsolver_dnewton; + fsolvers[1] = gsl_multiroot_fsolver_broyden; + fsolvers[2] = gsl_multiroot_fsolver_hybrid; + fsolvers[3] = gsl_multiroot_fsolver_hybrids; + fsolvers[4] = 0; + + fdfsolvers[0] = gsl_multiroot_fdfsolver_newton; + fdfsolvers[1] = gsl_multiroot_fdfsolver_gnewton; + fdfsolvers[2] = gsl_multiroot_fdfsolver_hybridj; + fdfsolvers[3] = gsl_multiroot_fdfsolver_hybridsj; + fdfsolvers[4] = 0; + + gsl_ieee_env_setup(); + + + f = 1.0 ; + + T1 = fsolvers ; + + while (*T1 != 0) + { + test_f ("Rosenbrock", &rosenbrock, rosenbrock_initpt, f, *T1); + test_f ("Roth", &roth, roth_initpt, f, *T1); + test_f ("Powell badly scaled", &powellscal, powellscal_initpt, f, *T1); + test_f ("Brown badly scaled", &brownscal, brownscal_initpt, f, *T1); + test_f ("Powell singular", &powellsing, powellsing_initpt, f, *T1); + test_f ("Wood", &wood, wood_initpt, f, *T1); + test_f ("Helical", &helical, helical_initpt, f, *T1); + test_f ("Discrete BVP", &dbv, dbv_initpt, f, *T1); + test_f ("Trig", &trig, trig_initpt, f, *T1); + T1++; + } + + T2 = fdfsolvers ; + + while (*T2 != 0) + { + test_fdf ("Rosenbrock", &rosenbrock, rosenbrock_initpt, f, *T2); + test_fdf ("Roth", &roth, roth_initpt, f, *T2); + test_fdf ("Powell badly scaled", &powellscal, powellscal_initpt, f, *T2); + test_fdf ("Brown badly scaled", &brownscal, brownscal_initpt, f, *T2); + test_fdf ("Powell singular", &powellsing, powellsing_initpt, f, *T2); + test_fdf ("Wood", &wood, wood_initpt, f, *T2); + test_fdf ("Helical", &helical, helical_initpt, f, *T2); + test_fdf ("Discrete BVP", &dbv, dbv_initpt, f, *T2); + test_fdf ("Trig", &trig, trig_initpt, f, *T2); + T2++; + } + + exit (gsl_test_summary ()); +} + +void scale (gsl_vector * x, double factor); + +void +scale (gsl_vector * x, double factor) +{ + size_t i, n = x->size; + + if (gsl_vector_isnull(x)) + { + for (i = 0; i < n; i++) + { + gsl_vector_set (x, i, factor); + } + } + else + { + for (i = 0; i < n; i++) + { + double xi = gsl_vector_get(x, i); + gsl_vector_set(x, i, factor * xi); + } + } +} + +int +test_fdf (const char * desc, gsl_multiroot_function_fdf * function, + initpt_function initpt, double factor, + const gsl_multiroot_fdfsolver_type * T) +{ + int status; + double residual = 0; + size_t i, n = function->n, iter = 0; + + gsl_vector *x = gsl_vector_alloc (n); + gsl_matrix *J = gsl_matrix_alloc (n, n); + + gsl_multiroot_fdfsolver *s; + + (*initpt) (x); + + if (factor != 1.0) scale(x, factor); + + s = gsl_multiroot_fdfsolver_alloc (T, n); + gsl_multiroot_fdfsolver_set (s, function, x); + + do + { + iter++; + status = gsl_multiroot_fdfsolver_iterate (s); + + if (status) + break ; + + status = gsl_multiroot_test_residual (s->f, 0.0000001); + } + while (status == GSL_CONTINUE && iter < 1000); + +#ifdef DEBUG + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); printf("\n"); + printf("f "); gsl_vector_fprintf (stdout, s->f, "%g"); printf("\n"); +#endif + + +#ifdef TEST_JACOBIAN + { + double r,sum; size_t j; + + gsl_multiroot_function f1 ; + f1.f = function->f ; + f1.n = function->n ; + f1.params = function->params ; + + gsl_multiroot_fdjacobian (&f1, s->x, s->f, GSL_SQRT_DBL_EPSILON, J); + + /* compare J and s->J */ + + r=0;sum=0; + for (i = 0; i < n; i++) + for (j = 0; j< n ; j++) + { + double u = gsl_matrix_get(J,i,j); + double su = gsl_matrix_get(s->J, i, j); + r = fabs(u - su)/(1e-6 + 1e-6 * fabs(u)); sum+=r; + if (fabs(u - su) > 1e-6 + 1e-6 * fabs(u)) + printf("broken jacobian %g\n", r); + } + printf("avg r = %g\n", sum/(n*n)); + } +#endif + + for (i = 0; i < n ; i++) + { + residual += fabs(gsl_vector_get(s->f, i)); + } + + gsl_multiroot_fdfsolver_free (s); + gsl_matrix_free(J); + gsl_vector_free(x); + + gsl_test(status, "%s on %s (%g), %u iterations, residual = %.2g", T->name, desc, factor, iter, residual); + + return status; +} + + +int +test_f (const char * desc, gsl_multiroot_function_fdf * fdf, + initpt_function initpt, double factor, + const gsl_multiroot_fsolver_type * T) +{ + int status; + size_t i, n = fdf->n, iter = 0; + double residual = 0; + + gsl_vector *x; + + gsl_multiroot_fsolver *s; + gsl_multiroot_function function; + + function.f = fdf->f; + function.params = fdf->params; + function.n = n ; + + x = gsl_vector_alloc (n); + + (*initpt) (x); + + if (factor != 1.0) scale(x, factor); + + s = gsl_multiroot_fsolver_alloc (T, n); + gsl_multiroot_fsolver_set (s, &function, x); + +/* printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); printf("\n"); */ +/* printf("f "); gsl_vector_fprintf (stdout, s->f, "%g"); printf("\n"); */ + + do + { + iter++; + status = gsl_multiroot_fsolver_iterate (s); + + if (status) + break ; + + status = gsl_multiroot_test_residual (s->f, 0.0000001); + } + while (status == GSL_CONTINUE && iter < 1000); + +#ifdef DEBUG + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); printf("\n"); + printf("f "); gsl_vector_fprintf (stdout, s->f, "%g"); printf("\n"); +#endif + + for (i = 0; i < n ; i++) + { + residual += fabs(gsl_vector_get(s->f, i)); + } + + gsl_multiroot_fsolver_free (s); + gsl_vector_free(x); + + gsl_test(status, "%s on %s (%g), %u iterations, residual = %.2g", T->name, desc, factor, iter, residual); + + return status; +} diff --git a/software/gsl-1.15/multiroots/test_funcs.c b/software/gsl-1.15/multiroots/test_funcs.c new file mode 100644 index 000000000..b1dbf779c --- /dev/null +++ b/software/gsl-1.15/multiroots/test_funcs.c @@ -0,0 +1,744 @@ +/* multiroots/test_funcs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "test_funcs.h" + +/* For information on testing see the following paper, + + J.J More, B.S. Garbow, K.E. Hillstrom, "Testing Unconstrained + Optimization Software", ACM Transactions on Mathematical Software, + Vol 7, No 1, (1981) p 17-41 + + */ + +/* Rosenbrock Function */ + +gsl_multiroot_function_fdf rosenbrock = +{&rosenbrock_f, + &rosenbrock_df, + &rosenbrock_fdf, + 2, 0}; + +void +rosenbrock_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, -1.2); + gsl_vector_set (x, 1, 1.0); +} + +int +rosenbrock_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double y0 = 1 - x0; + double y1 = 10 * (x1 - x0 * x0); + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +rosenbrock_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + + double df00 = -1; + double df01 = 0; + double df10 = -20 * x0; + double df11 = 10; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +rosenbrock_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + rosenbrock_f (x, params, f); + rosenbrock_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Freudenstein and Roth function */ + +gsl_multiroot_function_fdf roth = +{&roth_f, + &roth_df, + &roth_fdf, + 2, 0}; + +void +roth_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 4.5); /* changed from the value in the paper */ + gsl_vector_set (x, 1, 3.5); /* otherwise the problem is too hard */ +} + +int +roth_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double y0 = -13.0 + x0 + ((5.0 - x1)*x1 - 2.0)*x1; + double y1 = -29.0 + x0 + ((x1 + 1.0)*x1 - 14.0)*x1; + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +roth_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x1 = gsl_vector_get (x, 1); + + double df00 = 1; + double df01 = -3 * x1 * x1 + 10 * x1 - 2; + double df10 = 1; + double df11 = 3 * x1 * x1 + 2 * x1 - 14; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +roth_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + roth_f (x, params, f); + roth_df (x, params, df); + + return GSL_SUCCESS; +} + + + +/* Powell badly scaled function */ + +gsl_multiroot_function_fdf powellscal = +{&powellscal_f, + &powellscal_df, + &powellscal_fdf, + 2, 0}; + +void +powellscal_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 0.0); + gsl_vector_set (x, 1, 1.0); +} + +int +powellscal_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double y0 = 10000.0 * x0 * x1 - 1.0; + double y1 = exp (-x0) + exp (-x1) - 1.0001; + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +powellscal_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double df00 = 10000.0 * x1, df01 = 10000.0 * x0; + double df10 = -exp (-x0), df11 = -exp (-x1); + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +powellscal_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + powellscal_f (x, params, f); + powellscal_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Brown badly scaled function */ + +gsl_multiroot_function_fdf brownscal = +{&brownscal_f, + &brownscal_df, + &brownscal_fdf, + 2, 0}; + +void +brownscal_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 1.0); + gsl_vector_set (x, 1, 1.0); +} + +int +brownscal_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double y0 = x0 - 1e6; + double y1 = x0 * x1 - 2; + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +brownscal_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double df00 = 1.0, df01 = 0.0; + double df10 = x1, df11 = x0; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +brownscal_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + brownscal_f (x, params, f); + brownscal_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Powell Singular Function */ + +gsl_multiroot_function_fdf powellsing = +{&powellsing_f, + &powellsing_df, + &powellsing_fdf, + 4, 0}; + +void +powellsing_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, 3.0); + gsl_vector_set (x, 1, -1.0); + gsl_vector_set (x, 2, 0.0); + gsl_vector_set (x, 3, 1.0); +} + +int +powellsing_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + + double y0 = x0 + 10 * x1; + double y1 = sqrt (5.0) * (x2 - x3); + double y2 = pow (x1 - 2 * x2, 2.0); + double y3 = sqrt (10.0) * pow (x0 - x3, 2.0); + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + gsl_vector_set (f, 2, y2); + gsl_vector_set (f, 3, y3); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +powellsing_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + + double df00 = 1, df01 = 10, df02 = 0, df03 = 0; + double df10 = 0, df11 = 0, df12 = sqrt (5.0), df13 = -df12; + double df20 = 0, df21 = 2 * (x1 - 2 * x2), df22 = -2 * df21, df23 = 0; + double df30 = 2 * sqrt (10.0) * (x0 - x3), df31 = 0, df32 = 0, df33 = -df30; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 0, 2, df02); + gsl_matrix_set (df, 0, 3, df03); + + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + gsl_matrix_set (df, 1, 2, df12); + gsl_matrix_set (df, 1, 3, df13); + + gsl_matrix_set (df, 2, 0, df20); + gsl_matrix_set (df, 2, 1, df21); + gsl_matrix_set (df, 2, 2, df22); + gsl_matrix_set (df, 2, 3, df23); + + gsl_matrix_set (df, 3, 0, df30); + gsl_matrix_set (df, 3, 1, df31); + gsl_matrix_set (df, 3, 2, df32); + gsl_matrix_set (df, 3, 3, df33); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +powellsing_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + powellsing_f (x, params, f); + powellsing_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Wood function */ + +gsl_multiroot_function_fdf wood = +{&wood_f, + &wood_df, + &wood_fdf, + 4, 0}; + +void +wood_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, -3.0); + gsl_vector_set (x, 1, -1.0); + gsl_vector_set (x, 2, -3.0); + gsl_vector_set (x, 3, -1.0); +} + +int +wood_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + + double t1 = x1 - x0 * x0; + double t2 = x3 - x2 * x2; + + double y0 = -200.0 * x0 * t1 - (1 - x0); + double y1 = 200.0 * t1 + 20.2 * (x1 - 1) + 19.8 * (x3 - 1); + double y2 = -180.0 * x2 * t2 - (1 - x2); + double y3 = 180.0 * t2 + 20.2 * (x3 - 1) + 19.8 * (x1 - 1); + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + gsl_vector_set (f, 2, y2); + gsl_vector_set (f, 3, y3); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +wood_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + double x3 = gsl_vector_get (x, 3); + + double t1 = x1 - 3 * x0 * x0; + double t2 = x3 - 3 * x2 * x2; + + double df00 = -200.0 * t1 + 1, df01 = -200.0 * x0, df02 = 0, df03 = 0; + double df10 = -400.0*x0, df11 = 200.0 + 20.2, df12 = 0, df13 = 19.8; + double df20 = 0, df21 = 0, df22 = -180.0 * t2 + 1, df23 = -180.0 * x2; + double df30 = 0, df31 = 19.8, df32 = -2 * 180 * x2, df33 = 180.0 + 20.2; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 0, 2, df02); + gsl_matrix_set (df, 0, 3, df03); + + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + gsl_matrix_set (df, 1, 2, df12); + gsl_matrix_set (df, 1, 3, df13); + + gsl_matrix_set (df, 2, 0, df20); + gsl_matrix_set (df, 2, 1, df21); + gsl_matrix_set (df, 2, 2, df22); + gsl_matrix_set (df, 2, 3, df23); + + gsl_matrix_set (df, 3, 0, df30); + gsl_matrix_set (df, 3, 1, df31); + gsl_matrix_set (df, 3, 2, df32); + gsl_matrix_set (df, 3, 3, df33); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +wood_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + wood_f (x, params, f); + wood_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Helical Valley Function */ + +gsl_multiroot_function_fdf helical = +{&helical_f, + &helical_df, + &helical_fdf, + 3, 0}; + +void +helical_initpt (gsl_vector * x) +{ + gsl_vector_set (x, 0, -1.0); + gsl_vector_set (x, 1, 0.0); + gsl_vector_set (x, 2, 0.0); +} + +int +helical_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + double x2 = gsl_vector_get (x, 2); + + double t1, t2; + double y0, y1, y2; + + if (x0 > 0) + { + t1 = atan(x1/x0) / (2.0 * M_PI); + } + else if (x0 < 0) + { + t1 = 0.5 + atan(x1/x0) / (2.0 * M_PI); + } + else + { + t1 = 0.25 * (x1 > 0 ? +1 : -1); + } + + t2 = sqrt(x0*x0 + x1*x1) ; + + y0 = 10 * (x2 - 10 * t1); + y1 = 10 * (t2 - 1); + y2 = x2 ; + + gsl_vector_set (f, 0, y0); + gsl_vector_set (f, 1, y1); + gsl_vector_set (f, 2, y2); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +helical_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + double x0 = gsl_vector_get (x, 0); + double x1 = gsl_vector_get (x, 1); + + double t = x0 * x0 + x1 * x1 ; + double t1 = 2 * M_PI * t ; + double t2 = sqrt(t) ; + + double df00 = 100*x1/t1, df01 = -100.0 * x0/t1, df02 = 10.0; + double df10 = 10*x0/t2, df11 = 10*x1/t2, df12 = 0; + double df20 = 0, df21 = 0, df22 = 1.0; + + gsl_matrix_set (df, 0, 0, df00); + gsl_matrix_set (df, 0, 1, df01); + gsl_matrix_set (df, 0, 2, df02); + + gsl_matrix_set (df, 1, 0, df10); + gsl_matrix_set (df, 1, 1, df11); + gsl_matrix_set (df, 1, 2, df12); + + gsl_matrix_set (df, 2, 0, df20); + gsl_matrix_set (df, 2, 1, df21); + gsl_matrix_set (df, 2, 2, df22); + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +helical_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + helical_f (x, params, f); + helical_df (x, params, df); + + return GSL_SUCCESS; +} + + +/* Discrete Boundary Value Function */ + +#define N 10 + +gsl_multiroot_function_fdf dbv = +{&dbv_f, + &dbv_df, + &dbv_fdf, + N, 0}; + +void +dbv_initpt (gsl_vector * x) +{ + size_t i; + double h = 1.0 / (N + 1.0); + + for (i = 0; i < N; i++) + { + double t = (i + 1) * h; + double z = t * (t - 1); + gsl_vector_set (x, i, z); + } +} + +int +dbv_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + size_t i; + + double h = 1.0 / (N + 1.0); + + for (i = 0; i < N; i++) + { + double z, ti = (i + 1) * h; + double xi = 0, xim1 = 0, xip1 = 0; + + xi = gsl_vector_get (x, i); + + if (i > 0) + xim1 = gsl_vector_get (x, i - 1); + + if (i < N - 1) + xip1 = gsl_vector_get (x, i + 1); + + z = 2 * xi - xim1 - xip1 + h * h * pow(xi + ti + 1, 3.0) / 2.0; + + gsl_vector_set (f, i, z); + + } + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +dbv_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + size_t i, j; + + double h = 1.0 / (N + 1.0); + + for (i = 0; i < N; i++) + for (j = 0; j < N; j++) + gsl_matrix_set (df, i, j, 0.0); + + for (i = 0; i < N; i++) + { + double dz_dxi, ti = (i + 1) * h; + + double xi = gsl_vector_get (x, i); + + dz_dxi = 2.0 + (3.0 / 2.0) * h * h * pow(xi + ti + 1, 2.0) ; + + gsl_matrix_set (df, i, i, dz_dxi); + + if (i > 0) + gsl_matrix_set (df, i, i-1, -1.0); + + if (i < N - 1) + gsl_matrix_set (df, i, i+1, -1.0); + + } + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +dbv_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + dbv_f (x, params, f); + dbv_df (x, params, df); + + return GSL_SUCCESS; +} + +/* Trigonometric Function */ + +gsl_multiroot_function_fdf trig = +{&trig_f, + &trig_df, + &trig_fdf, + N, 0}; + +void +trig_initpt (gsl_vector * x) +{ + size_t i; + + for (i = 0; i < N; i++) /* choose an initial point which converges */ + { + gsl_vector_set (x, i, 0.05); + } +} + +int +trig_f (const gsl_vector * x, void *params, gsl_vector * f) +{ + size_t i; + double sum = 0; + + for (i = 0; i < N; i++) + { + sum += cos(gsl_vector_get(x,i)); + } + + for (i = 0; i < N; i++) + { + double xi = gsl_vector_get (x,i); + double z = N - sum + (i + 1) * (1 - cos(xi)) - sin(xi); + + gsl_vector_set (f, i, z); + } + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +trig_df (const gsl_vector * x, void *params, gsl_matrix * df) +{ + size_t i, j; + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + double dz; + double xi = gsl_vector_get(x, i); + double xj = gsl_vector_get(x, j); + + if (j == i) + dz = sin(xi) + (i + 1) * sin(xi) - cos(xi); + else + dz = sin(xj); + + gsl_matrix_set(df, i, j, dz); + } + } + + params = 0; /* avoid warning about unused parameters */ + + return GSL_SUCCESS; +} + +int +trig_fdf (const gsl_vector * x, void *params, + gsl_vector * f, gsl_matrix * df) +{ + trig_f (x, params, f); + trig_df (x, params, df); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multiroots/test_funcs.h b/software/gsl-1.15/multiroots/test_funcs.h new file mode 100644 index 000000000..73b433d7d --- /dev/null +++ b/software/gsl-1.15/multiroots/test_funcs.h @@ -0,0 +1,76 @@ +/* multiroots/test_funcs.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +typedef void (*initpt_function) (gsl_vector * x); + +extern gsl_multiroot_function_fdf rosenbrock; +void rosenbrock_initpt (gsl_vector * x); +int rosenbrock_f (const gsl_vector * x, void *params, gsl_vector * f); +int rosenbrock_df (const gsl_vector * x, void *params, gsl_matrix * df); +int rosenbrock_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf roth; +void roth_initpt (gsl_vector * x); +int roth_f (const gsl_vector * x, void *params, gsl_vector * f); +int roth_df (const gsl_vector * x, void *params, gsl_matrix * df); +int roth_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf brownscal; +void brownscal_initpt (gsl_vector * x); +int brownscal_f (const gsl_vector * x, void *params, gsl_vector * f); +int brownscal_df (const gsl_vector * x, void *params, gsl_matrix * df); +int brownscal_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf powellscal; +void powellscal_initpt (gsl_vector * x); +int powellscal_f (const gsl_vector * x, void *params, gsl_vector * f); +int powellscal_df (const gsl_vector * x, void *params, gsl_matrix * df); +int powellscal_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf powellsing; +void powellsing_initpt (gsl_vector * x); +int powellsing_f (const gsl_vector * x, void *params, gsl_vector * f); +int powellsing_df (const gsl_vector * x, void *params, gsl_matrix * df); +int powellsing_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf wood; +void wood_initpt (gsl_vector * x); +int wood_f (const gsl_vector * x, void *params, gsl_vector * f); +int wood_df (const gsl_vector * x, void *params, gsl_matrix * df); +int wood_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf helical; +void helical_initpt (gsl_vector * x); +int helical_f (const gsl_vector * x, void *params, gsl_vector * f); +int helical_df (const gsl_vector * x, void *params, gsl_matrix * df); +int helical_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf dbv; +void dbv_initpt (gsl_vector * x); +int dbv_f (const gsl_vector * x, void *params, gsl_vector * f); +int dbv_df (const gsl_vector * x, void *params, gsl_matrix * df); +int dbv_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + +extern gsl_multiroot_function_fdf trig; +void trig_initpt (gsl_vector * x); +int trig_f (const gsl_vector * x, void *params, gsl_vector * f); +int trig_df (const gsl_vector * x, void *params, gsl_matrix * df); +int trig_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * df); + diff --git a/software/gsl-1.15/multiset/.deps/file.Plo b/software/gsl-1.15/multiset/.deps/file.Plo new file mode 100644 index 000000000..929f48a91 --- /dev/null +++ b/software/gsl-1.15/multiset/.deps/file.Plo @@ -0,0 +1,97 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multiset.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multiset.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/multiset/.deps/init.Plo b/software/gsl-1.15/multiset/.deps/init.Plo new file mode 100644 index 000000000..2c837a21c --- /dev/null +++ b/software/gsl-1.15/multiset/.deps/init.Plo @@ -0,0 +1,97 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multiset.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multiset.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/multiset/.deps/inline.Plo b/software/gsl-1.15/multiset/.deps/inline.Plo new file mode 100644 index 000000000..d97655b29 --- /dev/null +++ b/software/gsl-1.15/multiset/.deps/inline.Plo @@ -0,0 +1,98 @@ +inline.lo: inline.c ../build.h ../gsl/gsl_multiset.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_inline.h \ + ../gsl/gsl_check_range.h + +../build.h: + +../gsl/gsl_multiset.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/multiset/.deps/multiset.Plo b/software/gsl-1.15/multiset/.deps/multiset.Plo new file mode 100644 index 000000000..2528f55bd --- /dev/null +++ b/software/gsl-1.15/multiset/.deps/multiset.Plo @@ -0,0 +1,98 @@ +multiset.lo: multiset.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_multiset.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_multiset.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/multiset/.deps/test.Po b/software/gsl-1.15/multiset/.deps/test.Po new file mode 100644 index 000000000..7c2ee8b0b --- /dev/null +++ b/software/gsl-1.15/multiset/.deps/test.Po @@ -0,0 +1,104 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + ../gsl/gsl_multiset.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_inline.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_multiset.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/multiset/ChangeLog b/software/gsl-1.15/multiset/ChangeLog new file mode 100644 index 000000000..3289c0ec9 --- /dev/null +++ b/software/gsl-1.15/multiset/ChangeLog @@ -0,0 +1,3 @@ +2009-09-21 Rhys Ulerich + + * added multiset support to GSL based on combinations diff --git a/software/gsl-1.15/multiset/Makefile.am b/software/gsl-1.15/multiset/Makefile.am new file mode 100644 index 000000000..a99f2f251 --- /dev/null +++ b/software/gsl-1.15/multiset/Makefile.am @@ -0,0 +1,21 @@ +noinst_LTLIBRARIES = libgslmultiset.la + +pkginclude_HEADERS = gsl_multiset.h + +INCLUDES = -I$(top_srcdir) + +libgslmultiset_la_SOURCES = init.c file.c multiset.c inline.c + +noinst_HEADERS = + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c + +test_LDADD = libgslmultiset.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#noinst_PROGRAMS = demo +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultiset.la ../vector/libgslvector.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/multiset/Makefile.in b/software/gsl-1.15/multiset/Makefile.in new file mode 100644 index 000000000..411abbbf1 --- /dev/null +++ b/software/gsl-1.15/multiset/Makefile.in @@ -0,0 +1,670 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = multiset +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmultiset_la_LIBADD = +am_libgslmultiset_la_OBJECTS = init.lo file.lo multiset.lo inline.lo +libgslmultiset_la_OBJECTS = $(am_libgslmultiset_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmultiset.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslmultiset_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmultiset_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmultiset.la +pkginclude_HEADERS = gsl_multiset.h +INCLUDES = -I$(top_srcdir) +libgslmultiset_la_SOURCES = init.c file.c multiset.c inline.c +noinst_HEADERS = +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslmultiset.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu multiset/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu multiset/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslmultiset.la: $(libgslmultiset_la_OBJECTS) $(libgslmultiset_la_DEPENDENCIES) + $(LINK) $(libgslmultiset_la_OBJECTS) $(libgslmultiset_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#noinst_PROGRAMS = demo +#demo_SOURCES = demo.c +#demo_LDADD = libgslmultiset.la ../vector/libgslvector.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/multiset/TODO b/software/gsl-1.15/multiset/TODO new file mode 100644 index 000000000..44415e0c0 --- /dev/null +++ b/software/gsl-1.15/multiset/TODO @@ -0,0 +1,4 @@ +# -*- org -*- +#+CATEGORY: multiset + +* The module has a lot of overlap with combination/ some of the functions could be abstracted out. diff --git a/software/gsl-1.15/multiset/file.c b/software/gsl-1.15/multiset/file.c new file mode 100644 index 000000000..97be1f15a --- /dev/null +++ b/software/gsl-1.15/multiset/file.c @@ -0,0 +1,115 @@ +/* multiset/file.c + * based on combination/file.c by Szymon Jaroszewicz + * based on permutation/file.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * Copyright (C) 2009 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#define IN_FORMAT "%lu" + +int +gsl_multiset_fread (FILE * stream, gsl_multiset * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t items = fread (data, sizeof (size_t), k, stream); + + if (items != k) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_multiset_fwrite (FILE * stream, const gsl_multiset * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t items = fwrite (data, sizeof (size_t), k, stream); + + if (items != k) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_multiset_fprintf (FILE * stream, const gsl_multiset * c, const char *format) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t i; + + for (i = 0; i < k; i++) + { + int status = fprintf (stream, format, data[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +int +gsl_multiset_fscanf (FILE * stream, gsl_multiset * c) +{ + size_t k = c->k ; + + size_t * data = c->data ; + + size_t i; + + for (i = 0; i < k; i++) + { + unsigned long j ; + + /* FIXME: what if size_t != unsigned long ??? + + want read in size_t but have to read in unsigned long to avoid + error from compiler */ + + int status = fscanf (stream, IN_FORMAT, &j); + + if (status != 1) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + + data[i] = j; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multiset/gsl_multiset.h b/software/gsl-1.15/multiset/gsl_multiset.h new file mode 100644 index 000000000..1ba5d6cc4 --- /dev/null +++ b/software/gsl-1.15/multiset/gsl_multiset.h @@ -0,0 +1,93 @@ +/* multiset/gsl_multiset.h + * based on combination/gsl_combination.h by Szymon Jaroszewicz + * based on permutation/gsl_permutation.h by Brian Gough + * + * Copyright (C) 2009 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_MULTISET_H__ +#define __GSL_MULTISET_H__ + +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_multiset_struct +{ + size_t n; + size_t k; + size_t *data; +}; + +typedef struct gsl_multiset_struct gsl_multiset; + +gsl_multiset *gsl_multiset_alloc (const size_t n, const size_t k); +gsl_multiset *gsl_multiset_calloc (const size_t n, const size_t k); +void gsl_multiset_init_first (gsl_multiset * c); +void gsl_multiset_init_last (gsl_multiset * c); +void gsl_multiset_free (gsl_multiset * c); +int gsl_multiset_memcpy (gsl_multiset * dest, const gsl_multiset * src); + +int gsl_multiset_fread (FILE * stream, gsl_multiset * c); +int gsl_multiset_fwrite (FILE * stream, const gsl_multiset * c); +int gsl_multiset_fscanf (FILE * stream, gsl_multiset * c); +int gsl_multiset_fprintf (FILE * stream, const gsl_multiset * c, const char *format); + +size_t gsl_multiset_n (const gsl_multiset * c); +size_t gsl_multiset_k (const gsl_multiset * c); +size_t * gsl_multiset_data (const gsl_multiset * c); + +int gsl_multiset_valid (gsl_multiset * c); +int gsl_multiset_next (gsl_multiset * c); +int gsl_multiset_prev (gsl_multiset * c); + +INLINE_DECL size_t gsl_multiset_get (const gsl_multiset * c, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +size_t +gsl_multiset_get (const gsl_multiset * c, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= c->k)) /* size_t is unsigned, can't be negative */ + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return c->data[i]; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_MULTISET_H__ */ diff --git a/software/gsl-1.15/multiset/init.c b/software/gsl-1.15/multiset/init.c new file mode 100644 index 000000000..b71b7369c --- /dev/null +++ b/software/gsl-1.15/multiset/init.c @@ -0,0 +1,130 @@ +/* multiset/init.c + * based on combination/init.c by Szymon Jaroszewicz + * based on permutation/init.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * Copyright (C) 2009 Brian Gough + * Copyright (C) 2009 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_multiset * +gsl_multiset_alloc (const size_t n, const size_t k) +{ + gsl_multiset * c; + + if (n == 0) + { + GSL_ERROR_VAL ("multiset parameter n must be positive integer", + GSL_EDOM, 0); + } + if (k > n) + { + GSL_ERROR_VAL ("multiset length k must be an integer less than or equal to n", + GSL_EDOM, 0); + } + c = (gsl_multiset *) malloc (sizeof (gsl_multiset)); + + if (c == 0) + { + GSL_ERROR_VAL ("failed to allocate space for multiset struct", + GSL_ENOMEM, 0); + } + + if (k > 0) + { + c->data = (size_t *) malloc (k * sizeof (size_t)); + + if (c->data == 0) + { + free (c); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for multiset data", + GSL_ENOMEM, 0); + } + } + else + { + c->data = 0; + } + + c->n = n; + c->k = k; + + return c; +} + +gsl_multiset * +gsl_multiset_calloc (const size_t n, const size_t k) +{ + size_t i; + + gsl_multiset * c = gsl_multiset_alloc (n, k); + + if (c == 0) + return 0; + + /* initialize multiset to repeated first element */ + + for (i = 0; i < k; i++) + { + c->data[i] = 0; + } + + return c; +} + +void +gsl_multiset_init_first (gsl_multiset * c) +{ + const size_t k = c->k ; + size_t i; + + /* initialize multiset to repeated first element */ + + for (i = 0; i < k; i++) + { + c->data[i] = 0; + } +} + +void +gsl_multiset_init_last (gsl_multiset * c) +{ + const size_t k = c->k ; + size_t i; + size_t n = c->n; + + /* initialize multiset to repeated last element */ + + for (i = 0; i < k; i++) + { + c->data[i] = n - 1; + } +} + +void +gsl_multiset_free (gsl_multiset * c) +{ + RETURN_IF_NULL (c); + if (c->k > 0) free (c->data); + free (c); +} diff --git a/software/gsl-1.15/multiset/inline.c b/software/gsl-1.15/multiset/inline.c new file mode 100644 index 000000000..f59e9f336 --- /dev/null +++ b/software/gsl-1.15/multiset/inline.c @@ -0,0 +1,24 @@ +/* multiset/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/multiset/multiset.c b/software/gsl-1.15/multiset/multiset.c new file mode 100644 index 000000000..9b1e145bf --- /dev/null +++ b/software/gsl-1.15/multiset/multiset.c @@ -0,0 +1,181 @@ +/* multiset/multiset.c + * based on combination/combination.c by Szymon Jaroszewicz + * based on permutation/permutation.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * Copyright (C) 2009 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +size_t +gsl_multiset_n (const gsl_multiset * c) +{ + return c->n ; +} + +size_t +gsl_multiset_k (const gsl_multiset * c) +{ + return c->k ; +} + +size_t * +gsl_multiset_data (const gsl_multiset * c) +{ + return c->data ; +} + +int +gsl_multiset_valid (gsl_multiset * c) +{ + const size_t n = c->n ; + const size_t k = c->k ; + + size_t i, j ; + + if( k > n ) + { + GSL_ERROR("multiset has k greater than n", GSL_FAILURE) ; + } + for (i = 0; i < k; i++) + { + const size_t ci = c->data[i]; + + if (ci >= n) + { + GSL_ERROR("multiset index outside range", GSL_FAILURE) ; + } + + for (j = 0; j < i; j++) + { + if (c->data[j] > ci) + { + GSL_ERROR("multiset indices not in increasing order", + GSL_FAILURE) ; + } + } + } + + return GSL_SUCCESS; +} + + +int +gsl_multiset_next (gsl_multiset * c) +{ + /* Replaces c with the next multiset (in the standard lexicographical + * ordering). Returns GSL_FAILURE if there is no next multiset. + */ + const size_t n = c->n; + const size_t k = c->k; + size_t *data = c->data; + size_t i; + + if(k == 0) + { + return GSL_FAILURE; + } + i = k - 1; + + while(i > 0 && data[i] == n-1) + { + --i; + } + + if (i == 0 && data[0] == n-1) + { + return GSL_FAILURE; + } + + ++data[i]; + + while(i < k-1) + { + data[i+1] = data[i]; + ++i; + } + + return GSL_SUCCESS; +} + +int +gsl_multiset_prev (gsl_multiset * c) +{ + /* Replaces c with the previous multiset (in the standard + * lexicographical ordering). Returns GSL_FAILURE if there is no + * previous multiset. + */ + const size_t n = c->n; + const size_t k = c->k; + size_t *data = c->data; + size_t i; + + if(k == 0) + { + return GSL_FAILURE; + } + i = k - 1; + + while(i > 0 && data[i-1] == data[i]) + { + --i; + } + + if(i == 0 && data[i] == 0) + { + return GSL_FAILURE; + } + + data[i]--; + + if (data[i] < n-1) + { + while (i < k-1) { + data[++i] = n - 1; + } + } + + return GSL_SUCCESS; +} + +int +gsl_multiset_memcpy (gsl_multiset * dest, const gsl_multiset * src) +{ + const size_t src_n = src->n; + const size_t src_k = src->k; + const size_t dest_n = dest->n; + const size_t dest_k = dest->k; + + if (src_n != dest_n || src_k != dest_k) + { + GSL_ERROR ("multiset lengths are not equal", GSL_EBADLEN); + } + + { + size_t j; + + for (j = 0; j < src_k; j++) + { + dest->data[j] = src->data[j]; + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/multiset/test.c b/software/gsl-1.15/multiset/test.c new file mode 100644 index 000000000..4548554a5 --- /dev/null +++ b/software/gsl-1.15/multiset/test.c @@ -0,0 +1,278 @@ +/* multiset/test.c + * based on combination/test.c by Szymon Jaroszewicz + * based on permutation/test.c by Brian Gough + * + * Copyright (C) 2001 Szymon Jaroszewicz + * Copyright (C) 2009 Rhys Ulerich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +size_t c63[56][3] = { + { 0,0,0 }, { 0,0,1 }, { 0,0,2 }, { 0,0,3 }, { 0,0,4 }, { 0,0,5 }, + { 0,1,1 }, { 0,1,2 }, { 0,1,3 }, { 0,1,4 }, { 0,1,5 }, + { 0,2,2 }, { 0,2,3 }, { 0,2,4 }, { 0,2,5 }, + { 0,3,3 }, { 0,3,4 }, { 0,3,5 }, + { 0,4,4 }, { 0,4,5 }, + { 0,5,5 }, + { 1,1,1 }, { 1,1,2 }, { 1,1,3 }, { 1,1,4 }, { 1,1,5 }, + { 1,2,2 }, { 1,2,3 }, { 1,2,4 }, { 1,2,5 }, + { 1,3,3 }, { 1,3,4 }, { 1,3,5 }, + { 1,4,4 }, { 1,4,5 }, + { 1,5,5 }, + { 2,2,2 }, { 2,2,3 }, { 2,2,4 }, { 2,2,5 }, + { 2,3,3 }, { 2,3,4 }, { 2,3,5 }, + { 2,4,4 }, { 2,4,5 }, + { 2,5,5 }, + { 3,3,3 }, { 3,3,4 }, { 3,3,5 }, + { 3,4,4 }, { 3,4,5 }, + { 3,5,5 }, + { 4,4,4 }, { 4,4,5 }, + { 4,5,5 }, + { 5,5,5 } +} ; + +void my_error_handler (const char *reason, const char *file, int line, int err); + +int +main (void) +{ + size_t i, j; + int status = 0, s; + gsl_multiset * c ; + + gsl_ieee_env_setup (); + + c = gsl_multiset_alloc (6,3); + + /* Test multisets in forward order */ + + gsl_multiset_init_first (c); + + i = 0; + + do + { + if ( i >= 56 ) + { + status = 1; + break; + } + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[i][j]); + } + + { + int s1 = gsl_multiset_valid (c); + gsl_test (s1, "gsl_multiset_valid (%u)", i); + } + + i++; + } + while (gsl_multiset_next(c) == GSL_SUCCESS); + + gsl_test(status, "gsl_multiset_next, 6 choose 3 multiset, 56 steps"); + + gsl_multiset_next(c); + gsl_multiset_next(c); + gsl_multiset_next(c); + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[55][j]); + } + gsl_test(status, "gsl_multiset_next on the last multiset"); + + { + int s1 = gsl_multiset_valid (c); + gsl_test (s1, "gsl_multiset_valid on the last multiset"); + } + + { + gsl_multiset * d = gsl_multiset_alloc (6,3); + gsl_multiset_memcpy (d, c); + + status = 0; + + for (j = 0; j < 3; j++) + { + status |= (d->data[j] != c->data[j]); + } + + gsl_test (status, "gsl_multiset_memcpy, 6 choose 3 multiset"); + gsl_multiset_free(d); + } + + + /* Now test multisets in reverse order */ + + gsl_multiset_init_last (c); + + i = 56; + do + { + if ( i == 0 ) + { + status = 1; + break; + } + + i--; + + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[i][j]); + } + + { + int s1 = gsl_multiset_valid (c); + gsl_test (s1, "gsl_multiset_valid (%u)", i); + } + } + while (gsl_multiset_prev(c) == GSL_SUCCESS); + + gsl_test(status, "gsl_multiset_prev, 6 choose 3 multiset, 20 steps"); + + gsl_multiset_prev(c); + gsl_multiset_prev(c); + gsl_multiset_prev(c); + for (j = 0; j < 3; j++) + { + status |= (c->data[j] != c63[0][j]); + } + gsl_test(status, "gsl_multiset_prev on the first multiset"); + + { + int s1 = gsl_multiset_valid (c); + gsl_test (s1, "gsl_multiset_valid on the first multiset"); + } + + { + gsl_multiset * d = gsl_multiset_alloc (6,3); + gsl_multiset_memcpy (d, c); + + status = 0; + + for (j = 0; j < 3; j++) + { + status |= (d->data[j] != c->data[j]); + } + + gsl_test (status, "gsl_multiset_memcpy, 6 choose 3 multiset"); + gsl_multiset_free(d); + } + + gsl_multiset_free (c); + + c = gsl_multiset_calloc(7, 0); + /* should return GSL_FAILURE every time */ + status |= (gsl_multiset_next(c) != GSL_FAILURE); + status |= (gsl_multiset_next(c) != GSL_FAILURE); + status |= (gsl_multiset_prev(c) != GSL_FAILURE); + status |= (gsl_multiset_prev(c) != GSL_FAILURE); + gsl_test(status, "gsl_multiset 7 choose 0"); + gsl_multiset_free (c); + + c = gsl_multiset_calloc(1, 1); + /* should return GSL_FAILURE every time */ + for(j = 0; j < 1; j++) + { + status |= (gsl_multiset_get(c, j) != j); + } + status |= (gsl_multiset_next(c) != GSL_FAILURE); + for(j = 0; j < 1; j++) + { + status |= (gsl_multiset_get(c, j) != j); + } + status |= (gsl_multiset_next(c) != GSL_FAILURE); + for(j = 0; j < 1; j++) + { + status |= (gsl_multiset_get(c, j) != j); + } + status |= (gsl_multiset_prev(c) != GSL_FAILURE); + for(j = 0; j < 1; j++) + { + status |= (gsl_multiset_get(c, j) != j); + } + status |= (gsl_multiset_prev(c) != GSL_FAILURE); + for(j = 0; j < 1; j++) + { + status |= (gsl_multiset_get(c, j) != j); + } + gsl_test(status, "gsl_multiset 7 choose 7"); + gsl_multiset_free (c); + + c = gsl_multiset_calloc(6, 3); + + gsl_set_error_handler (&my_error_handler); + + c->data[0] = 1; + c->data[1] = 2; + c->data[2] = 1; + s = gsl_multiset_valid (c); + gsl_test (!s, "gsl_multiset_valid on an invalid multiset (1,1,2)"); + + c->data[0] = 2; + c->data[1] = 1; + c->data[2] = 0; + s = gsl_multiset_valid (c); + gsl_test (!s, "gsl_multiset_valid on an invalid multiset (2,1,0)"); + + c->data[0] = 1; + c->data[1] = 2; + c->data[2] = 0; + s = gsl_multiset_valid (c); + gsl_test (!s, "gsl_multiset_valid on an invalid multiset (1,2,0)"); + + { + gsl_multiset * d = gsl_multiset_alloc (6,4); + int s = gsl_multiset_memcpy (d, c); + gsl_test (!s, "gsl_multiset_memcpy, (6,4) vs (6,3)"); + gsl_multiset_free(d); + } + + { + gsl_multiset * d = gsl_multiset_alloc (7,3); + int s = gsl_multiset_memcpy (d, c); + gsl_test (!s, "gsl_multiset_memcpy, (7,3) vs (6,3)"); + gsl_multiset_free(d); + } + + { + gsl_multiset * d = gsl_multiset_alloc (7,2); + int s = gsl_multiset_memcpy (d, c); + gsl_test (!s, "gsl_multiset_memcpy, (7,2) vs (6,3)"); + gsl_multiset_free(d); + } + + + gsl_multiset_free (c); + + exit (gsl_test_summary()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err) ; +} diff --git a/software/gsl-1.15/ntuple/.deps/ntuple.Plo b/software/gsl-1.15/ntuple/.deps/ntuple.Plo new file mode 100644 index 000000000..5a19e6019 --- /dev/null +++ b/software/gsl-1.15/ntuple/.deps/ntuple.Plo @@ -0,0 +1,96 @@ +ntuple.lo: ntuple.c ../config.h /usr/include/errno.h \ + /usr/include/sys/errno.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_types.h ../gsl/gsl_ntuple.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_histogram.h + +../config.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_types.h: + +../gsl/gsl_ntuple.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_histogram.h: diff --git a/software/gsl-1.15/ntuple/.deps/test.Po b/software/gsl-1.15/ntuple/.deps/test.Po new file mode 100644 index 000000000..16b5abcde --- /dev/null +++ b/software/gsl-1.15/ntuple/.deps/test.Po @@ -0,0 +1,99 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_ntuple.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_histogram.h \ + ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_ntuple.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_histogram.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/ntuple/ChangeLog b/software/gsl-1.15/ntuple/ChangeLog new file mode 100644 index 000000000..359858d80 --- /dev/null +++ b/software/gsl-1.15/ntuple/ChangeLog @@ -0,0 +1,9 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2004-05-30 Brian Gough + + * ntuple/test.c (main): choose ratio 1/(i+1.5) to avoid values + exactly on test cutoff x=0.1 + diff --git a/software/gsl-1.15/ntuple/Makefile.am b/software/gsl-1.15/ntuple/Makefile.am new file mode 100644 index 000000000..215ec4f15 --- /dev/null +++ b/software/gsl-1.15/ntuple/Makefile.am @@ -0,0 +1,22 @@ +noinst_LTLIBRARIES = libgslntuple.la + +pkginclude_HEADERS = gsl_ntuple.h + +INCLUDES = -I$(top_srcdir) + +libgslntuple_la_SOURCES = ntuple.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test #demo demo1 + +test_SOURCES = test.c +test_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#demo1_SOURCES = demo1.c +#demo1_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +CLEANFILES = test.dat diff --git a/software/gsl-1.15/ntuple/Makefile.in b/software/gsl-1.15/ntuple/Makefile.in new file mode 100644 index 000000000..4a5983604 --- /dev/null +++ b/software/gsl-1.15/ntuple/Makefile.in @@ -0,0 +1,670 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = ntuple +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslntuple_la_LIBADD = +am_libgslntuple_la_OBJECTS = ntuple.lo +libgslntuple_la_OBJECTS = $(am_libgslntuple_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslntuple.la ../histogram/libgslhistogram.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslntuple_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslntuple_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslntuple.la +pkginclude_HEADERS = gsl_ntuple.h +INCLUDES = -I$(top_srcdir) +libgslntuple_la_SOURCES = ntuple.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#demo_SOURCES = demo.c +#demo_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#demo1_SOURCES = demo1.c +#demo1_LDADD = libgslntuple.la ../histogram/libgslhistogram.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +CLEANFILES = test.dat +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ntuple/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ntuple/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslntuple.la: $(libgslntuple_la_OBJECTS) $(libgslntuple_la_DEPENDENCIES) + $(LINK) $(libgslntuple_la_OBJECTS) $(libgslntuple_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntuple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/ntuple/gsl_ntuple.h b/software/gsl-1.15/ntuple/gsl_ntuple.h new file mode 100644 index 000000000..90d8a26c3 --- /dev/null +++ b/software/gsl-1.15/ntuple/gsl_ntuple.h @@ -0,0 +1,82 @@ +/* histogram/ntuple.h + * + * Copyright (C) 2000 Simone Piccardi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Jan/2001 Modified by Brian Gough. Minor changes for GSL */ + +#ifndef __GSL_NTUPLE_H__ +#define __GSL_NTUPLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct { + FILE * file; + void * ntuple_data; + size_t size; +} gsl_ntuple; + +typedef struct { + int (* function) (void * ntuple_data, void * params); + void * params; +} gsl_ntuple_select_fn; + +typedef struct { + double (* function) (void * ntuple_data, void * params); + void * params; +} gsl_ntuple_value_fn; + +gsl_ntuple * +gsl_ntuple_open (char * filename, void * ntuple_data, size_t size); + +gsl_ntuple * +gsl_ntuple_create (char * filename, void * ntuple_data, size_t size); + +int gsl_ntuple_write (gsl_ntuple * ntuple); +int gsl_ntuple_read (gsl_ntuple * ntuple); + +int gsl_ntuple_bookdata (gsl_ntuple * ntuple); /* synonym for write */ + +int gsl_ntuple_project (gsl_histogram * h, gsl_ntuple * ntuple, + gsl_ntuple_value_fn *value_func, + gsl_ntuple_select_fn *select_func); + +int gsl_ntuple_close (gsl_ntuple * ntuple); + +__END_DECLS + +#endif /* __GSL_NTUPLE_H__ */ + + + + diff --git a/software/gsl-1.15/ntuple/ntuple.c b/software/gsl-1.15/ntuple/ntuple.c new file mode 100644 index 000000000..0019fe597 --- /dev/null +++ b/software/gsl-1.15/ntuple/ntuple.c @@ -0,0 +1,202 @@ +/* histogram/ntuple.c + * + * Copyright (C) 2000 Simone Piccardi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Jan/2001 Modified by Brian Gough. Minor changes for GSL */ + +#include +#include +#include +#include + +/* + * gsl_ntuple_open: + * Initialize an ntuple structure and create the related file + */ + +gsl_ntuple * +gsl_ntuple_create (char *filename, void *ntuple_data, size_t size) +{ + gsl_ntuple *ntuple = (gsl_ntuple *)malloc (sizeof (gsl_ntuple)); + + if (ntuple == 0) + { + GSL_ERROR_VAL ("failed to allocate space for ntuple struct", + GSL_ENOMEM, 0); + } + + ntuple->ntuple_data = ntuple_data; + ntuple->size = size; + + ntuple->file = fopen (filename, "wb"); + + if (ntuple->file == 0) + { + free (ntuple); + GSL_ERROR_VAL ("unable to create ntuple file", GSL_EFAILED, 0); + } + + return ntuple; +} + +/* + * gsl_ntuple_open: + * Initialize an ntuple structure and open the related file + */ + +gsl_ntuple * +gsl_ntuple_open (char *filename, void *ntuple_data, size_t size) +{ + gsl_ntuple *ntuple = (gsl_ntuple *)malloc (sizeof (gsl_ntuple)); + + if (ntuple == 0) + { + GSL_ERROR_VAL ("failed to allocate space for ntuple struct", + GSL_ENOMEM, 0); + } + + ntuple->ntuple_data = ntuple_data; + ntuple->size = size; + + ntuple->file = fopen (filename, "rb"); + + if (ntuple->file == 0) + { + free (ntuple); + GSL_ERROR_VAL ("unable to open ntuple file for reading", + GSL_EFAILED, 0); + } + + return ntuple; +} + +/* + * gsl_ntuple_write: + * write to file a data row, must be used in a loop! + */ + +int +gsl_ntuple_write (gsl_ntuple * ntuple) +{ + size_t nwrite; + + nwrite = fwrite (ntuple->ntuple_data, ntuple->size, + 1, ntuple->file); + + if (nwrite != 1) + { + GSL_ERROR ("failed to write ntuple entry to file", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +/* the following function is a synonym for gsl_ntuple_write */ + +int +gsl_ntuple_bookdata (gsl_ntuple * ntuple) +{ + return gsl_ntuple_write (ntuple); +} + +/* + * gsl_ntuple_read: + * read form file a data row, must be used in a loop! + */ + +int +gsl_ntuple_read (gsl_ntuple * ntuple) +{ + size_t nread; + + nread = fread (ntuple->ntuple_data, ntuple->size, 1, ntuple->file); + + if (nread == 0 && feof(ntuple->file)) + { + return GSL_EOF; + } + + if (nread != 1) + { + GSL_ERROR ("failed to read ntuple entry from file", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +/* + * gsl_ntuple_project: + * fill an histogram with an ntuple file contents, use + * SelVal and SelFunc user defined functions to get + * the value to book and the selection funtion + */ + +#define EVAL(f,x) ((*((f)->function))(x,(f)->params)) + +int +gsl_ntuple_project (gsl_histogram * h, gsl_ntuple * ntuple, + gsl_ntuple_value_fn * value_func, + gsl_ntuple_select_fn * select_func) +{ + size_t nread; + + do + { + nread = fread (ntuple->ntuple_data, ntuple->size, + 1, ntuple->file); + + if (nread == 0 && feof(ntuple->file)) + { + break ; + } + + if (nread != 1) + { + GSL_ERROR ("failed to read ntuple for projection", GSL_EFAILED); + } + + if (EVAL(select_func, ntuple->ntuple_data)) + { + gsl_histogram_increment (h, EVAL(value_func, ntuple->ntuple_data)); + } + } + while (1); + + return GSL_SUCCESS; +} + + +/* + * gsl_ntuple_close: + * close the ntuple file and free the memory + */ + +int +gsl_ntuple_close (gsl_ntuple * ntuple) +{ + int status = fclose (ntuple->file); + + if (status) + { + GSL_ERROR ("failed to close ntuple file", GSL_EFAILED); + } + + free (ntuple); + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ntuple/test.c b/software/gsl-1.15/ntuple/test.c new file mode 100644 index 000000000..68e7dca6c --- /dev/null +++ b/software/gsl-1.15/ntuple/test.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include + +struct data +{ + int num; + double x; + double y; + double z; +}; +int sel_func (void *ntuple_data, void * params); +double val_func (void *ntuple_data, void * params); + +int +main (void) +{ + struct data ntuple_row; + int i; + + double x[1000], y[1000], z[1000], f[100]; + + gsl_ntuple_select_fn S; + gsl_ntuple_value_fn V; + + double scale = 1.5; + + gsl_ieee_env_setup (); + + S.function = &sel_func; + S.params = &scale; + + V.function = &val_func; + V.params = &scale; + + { + gsl_ntuple *ntuple = gsl_ntuple_create ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + + int status = 0; + + for (i = 0; i < 100; i++) f[i] = 0; + + for (i = 0; i < 1000; i++) + { + double xi = 1.0 / (i + 1.5); + double yi = xi * xi ; + double zi = xi * xi * xi; + + ntuple_row.x = xi; + ntuple_row.y = yi; + ntuple_row.z = zi; + ntuple_row.num = i; + + x[i] = xi; y[i] = yi; z[i] = zi; + + if (xi * scale < 0.1) + { + double v = xi + yi + zi; + int k = (int)(100.0*v*scale); + f[k]++; + } + + /* printf ("x,y,z = %f,%f,%f; n=%x \n", ntuple_row.x, + ntuple_row.y, ntuple_row.z, ntuple_row.num); */ + + { + int s = gsl_ntuple_bookdata (ntuple); + + if (s != GSL_SUCCESS) + { + status = 1; + } + } + } + + gsl_ntuple_close (ntuple); + + gsl_test (status, "writing ntuples"); + } + + { + gsl_ntuple *ntuple = gsl_ntuple_open ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + int status = 0; + + for (i = 0; i < 1000; i++) + { + gsl_ntuple_read (ntuple); + + status = (ntuple_row.num != i); + status |= (ntuple_row.x != x[i]); + status |= (ntuple_row.y != y[i]); + status |= (ntuple_row.z != z[i]); + + /* printf ("x,y,z = %f,%f,%f; n=%d\n", ntuple_row.x, + ntuple_row.y, ntuple_row.z, ntuple_row.num); */ + } + gsl_ntuple_close (ntuple); + + gsl_test (status, "reading ntuples"); + } + + { + int status = 0; + + gsl_ntuple *ntuple = gsl_ntuple_open ("test.dat", &ntuple_row, + sizeof (ntuple_row)); + + gsl_histogram *h = gsl_histogram_calloc_uniform (100, 0., 1.); + + gsl_ntuple_project (h, ntuple, &V, &S); + + gsl_ntuple_close (ntuple); + + /* gsl_histogram_fprintf (stdout, h, "%f", "%f"); */ + + for (i = 0; i < 100; i++) + { + /* printf ("h %g f %g\n", h->bin[i], f[i]); */ + + if (h->bin[i] != f[i]) + { + status = 1; + } + } + + gsl_test (status, "histogramming ntuples"); + + gsl_histogram_free (h); + } + + exit (gsl_test_summary()); +} + +int +sel_func (void *ntuple_data, void * params) +{ + double x, y, z, scale; + scale = *(double *)params; + + x = ((struct data *) ntuple_data)->x; + y = ((struct data *) ntuple_data)->y; + z = ((struct data *) ntuple_data)->z; + + return (x*scale < 0.1); +} + +double +val_func (void *ntuple_data, void * params) +{ + double x, y, z, scale; + scale = *(double *)params; + + x = ((struct data *) ntuple_data)->x; + y = ((struct data *) ntuple_data)->y; + z = ((struct data *) ntuple_data)->z; + + return (x + y + z) * scale; +} diff --git a/software/gsl-1.15/ode-initval/.deps/bsimp.Plo b/software/gsl-1.15/ode-initval/.deps/bsimp.Plo new file mode 100644 index 000000000..fc4dd7604 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/bsimp.Plo @@ -0,0 +1,265 @@ +bsimp.lo: bsimp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/control.Plo b/software/gsl-1.15/ode-initval/.deps/control.Plo new file mode 100644 index 000000000..f35996392 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/control.Plo @@ -0,0 +1,131 @@ +control.lo: control.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_odeiv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: diff --git a/software/gsl-1.15/ode-initval/.deps/cscal.Plo b/software/gsl-1.15/ode-initval/.deps/cscal.Plo new file mode 100644 index 000000000..ce789a439 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/cscal.Plo @@ -0,0 +1,139 @@ +cscal.lo: cscal.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_odeiv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_odeiv.h: diff --git a/software/gsl-1.15/ode-initval/.deps/cstd.Plo b/software/gsl-1.15/ode-initval/.deps/cstd.Plo new file mode 100644 index 000000000..3b1d5ab65 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/cstd.Plo @@ -0,0 +1,131 @@ +cstd.lo: cstd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_odeiv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_odeiv.h: diff --git a/software/gsl-1.15/ode-initval/.deps/evolve.Plo b/software/gsl-1.15/ode-initval/.deps/evolve.Plo new file mode 100644 index 000000000..834389378 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/evolve.Plo @@ -0,0 +1,141 @@ +evolve.lo: evolve.c ../config.h /usr/include/string.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/gear1.Plo b/software/gsl-1.15/ode-initval/.deps/gear1.Plo new file mode 100644 index 000000000..497fd148f --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/gear1.Plo @@ -0,0 +1,141 @@ +gear1.lo: gear1.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/gear2.Plo b/software/gsl-1.15/ode-initval/.deps/gear2.Plo new file mode 100644 index 000000000..1d4f00652 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/gear2.Plo @@ -0,0 +1,141 @@ +gear2.lo: gear2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h odeiv_util.h ../gsl/gsl_odeiv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +odeiv_util.h: + +../gsl/gsl_odeiv.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk2.Plo b/software/gsl-1.15/ode-initval/.deps/rk2.Plo new file mode 100644 index 000000000..f22de9b11 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk2.Plo @@ -0,0 +1,102 @@ +rk2.lo: rk2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk2imp.Plo b/software/gsl-1.15/ode-initval/.deps/rk2imp.Plo new file mode 100644 index 000000000..233cff4de --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk2imp.Plo @@ -0,0 +1,141 @@ +rk2imp.lo: rk2imp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk2simp.Plo b/software/gsl-1.15/ode-initval/.deps/rk2simp.Plo new file mode 100644 index 000000000..71fd0d293 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk2simp.Plo @@ -0,0 +1,266 @@ +rk2simp.lo: rk2simp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk4.Plo b/software/gsl-1.15/ode-initval/.deps/rk4.Plo new file mode 100644 index 000000000..044d54044 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk4.Plo @@ -0,0 +1,102 @@ +rk4.lo: rk4.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk4imp.Plo b/software/gsl-1.15/ode-initval/.deps/rk4imp.Plo new file mode 100644 index 000000000..1da48ef06 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk4imp.Plo @@ -0,0 +1,141 @@ +rk4imp.lo: rk4imp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rk8pd.Plo b/software/gsl-1.15/ode-initval/.deps/rk8pd.Plo new file mode 100644 index 000000000..ee7ed4d6f --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rk8pd.Plo @@ -0,0 +1,102 @@ +rk8pd.lo: rk8pd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rkck.Plo b/software/gsl-1.15/ode-initval/.deps/rkck.Plo new file mode 100644 index 000000000..0f30da3af --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rkck.Plo @@ -0,0 +1,102 @@ +rkck.lo: rkck.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/rkf45.Plo b/software/gsl-1.15/ode-initval/.deps/rkf45.Plo new file mode 100644 index 000000000..05d11b073 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/rkf45.Plo @@ -0,0 +1,102 @@ +rkf45.lo: rkf45.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/.deps/step.Plo b/software/gsl-1.15/ode-initval/.deps/step.Plo new file mode 100644 index 000000000..c82c83b65 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/step.Plo @@ -0,0 +1,92 @@ +step.lo: step.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_odeiv.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv.h: diff --git a/software/gsl-1.15/ode-initval/.deps/test.Po b/software/gsl-1.15/ode-initval/.deps/test.Po new file mode 100644 index 000000000..9ac4d2ad9 --- /dev/null +++ b/software/gsl-1.15/ode-initval/.deps/test.Po @@ -0,0 +1,269 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + /usr/include/math.h ../gsl/gsl_test.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h ../gsl/gsl_vector.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_odeiv.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/math.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_odeiv.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval/ChangeLog b/software/gsl-1.15/ode-initval/ChangeLog new file mode 100644 index 000000000..1a137cb9b --- /dev/null +++ b/software/gsl-1.15/ode-initval/ChangeLog @@ -0,0 +1,188 @@ +2011-04-25 Brian Gough + + * This module is now superseded by ode-initval2 + +2009-08-12 Brian Gough + + * rk4.c (rk4_alloc): fix order of free statements to avoid memory + leak + +2009-07-09 Brian Gough + + * step.c (gsl_odeiv_step_free): handle NULL argument in free + + * evolve.c (gsl_odeiv_evolve_free): handle NULL argument in free + + * control.c (gsl_odeiv_control_free): handle NULL argument in free + +2009-04-21 Brian Gough + + * gear2.c (gear2_apply): save initial values of y for possible + failures + +2009-04-20 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): restore original t value when + step fails + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-01-28 Brian Gough + + * test.c (test_evolve_negative_h): test evolution with negative + steps as well as positive + +2008-01-03 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): handle the case where + GSL_ODEIV_HADJ_DEC does not represent a real decrease (e.g. where + x+h = x due to finite precision) + +2006-07-29 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): notify user of step-size + which caused any failure by returning it + +2006-06-13 Brian Gough + + * gsl_odeiv.h, control.c (gsl_odeiv_control_hadjust): change y0 to + y in prototype to avoid conflict with bessel y0() in math.h + + * test.c (test_odeiv_stepper): change y0 to ystart + +2005-04-08 Brian Gough + + * Fixed all functions to consistently return status instead of + GSL_EBADFUNC. + +2004-12-29 Brian Gough + + * test.c (test_compare_vanderpol): avoid variable size array + (test_compare_oregonator): as above + +2004-12-23 Brian Gough + + * test.c (test_evolve_xsin): changed description from "failures" + to "errors" + +2004-12-22 Brian Gough + + * rk2simp.c (rk2simp_step): added missing static declaration + + * gear1.c (gear1_step): added missing static declaration + + * gear2.c (gear2_step): added missing static declaration + + * rk4imp.c (rk4imp_step): added missing static declaration + + * rk4.c (rk4_step): added missing static declaration + + * rk2imp.c (rk2imp_step): added missing static declaration + +2004-12-01 Brian Gough + + * updated all solvers to ensure correct handling of error codes + from user defined functions + + * test.c (rhs_xsin): added a test which includes failures of the + function itself and jacobian + +2004-11-25 Brian Gough + + * gear2.c (gear2_alloc): added check for non-allocation of primer, + and two-step error estimation + +2004-11-23 Brian Gough + + * gear1.c (gear1_apply): use 90% error bound + + * rk2imp.c (rk2imp_apply): use 90% error bound + + * rk2simp.c (rk2simp_apply): use 90% error bound + +2004-11-18 Brian Gough + + * test.c: new test program (Tuomo Keskitalo) + +2004-11-12 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): check for internal stepper + failure (Tuomo Keskitalo) + + * bsimp.c: gives exact dydt_out (Tuomo Keskitalo) + + * rk2simp.c: new semi-implicit solver (Tuomo Keskitalo) + + * gear1.c rkf45.c rkck.c rk8pd.c rk4imp.c rk2imp.c rk2.c rk4.c: + fix error estimate, exact derivatives on output (Tuomo Keskitalo) + +2004-05-28 Brian Gough + + * bsimp.c (bsimp_apply): fix prototype of function to match + definition in typedef by removing const on double args. + +Sat Aug 3 19:02:37 2002 Brian Gough + + * cscal.c (struct): use matlab style error control, with scalar + relative error and vector absolute error + +Wed Oct 3 13:19:28 2001 Brian Gough + + * evolve.c (gsl_odeiv_evolve_apply): report error if step + direction does not match interval direction + + * cstd.c (std_control_hadjust): allow for negative step-sizes + + * evolve.c (gsl_odeiv_evolve_apply): allow for integrating + backwards in time + +Sat Sep 29 21:02:36 2001 Brian Gough + + * bsimp.c: use the condition |D^-1 Delta| >> 1 to detect + singularities, as described in the paper and implemented in METAN1 + by Deuflhard et al. + + * evolve.c (gsl_odeiv_evolve_apply): reset the final_step flag + whenever the step size is decreased + +Sun Jul 1 22:42:02 2001 Brian Gough + + * bsimp.c: modified to use new-style vector views + +Fri Jun 22 11:59:24 2001 Brian Gough + + * evolve.c: keep track of failed step count + +Tue Jun 12 11:34:23 2001 Brian Gough + + * rkf45.c: added Runge-Kutta Fehlberg method, RKF45 + + * reorganized to use standard gsl conventions + +Mon Apr 23 10:26:22 2001 Brian Gough + + * unified error handling conventions to _e for error handling + functions and no suffix for plain functions, so _impl functions + are no longer needed. + + * removed tests for EFAULT, since EFAULT should only apply to + invalid non-null pointers. + +2000-05-14 Steve Robbins + + * Makefile.am (test_LDADD): put libgslpermutation ahead of + libgslvector in the link beccause the former uses + `gsl_check_range' which is defined in the latter. + +Tue Apr 11 19:59:01 2000 Brian Gough + + * bsimp.c (bsimp_step_local): changed gsl_la prefix to gsl_linalg, + new naming convention + + +Fri Oct 1 15:46:13 1999 Brian Gough + + * bsimp.c: converted to use new-style block/vector code + diff --git a/software/gsl-1.15/ode-initval/Makefile.am b/software/gsl-1.15/ode-initval/Makefile.am new file mode 100644 index 000000000..e5e38bea0 --- /dev/null +++ b/software/gsl-1.15/ode-initval/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libgslodeiv.la + +pkginclude_HEADERS = gsl_odeiv.h + +INCLUDES = -I$(top_srcdir) + +libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk2simp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c + +noinst_HEADERS = odeiv_util.h + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + diff --git a/software/gsl-1.15/ode-initval/Makefile.in b/software/gsl-1.15/ode-initval/Makefile.in new file mode 100644 index 000000000..70e020267 --- /dev/null +++ b/software/gsl-1.15/ode-initval/Makefile.in @@ -0,0 +1,683 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = ode-initval +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslodeiv_la_LIBADD = +am_libgslodeiv_la_OBJECTS = control.lo cstd.lo cscal.lo evolve.lo \ + step.lo rk2.lo rk2imp.lo rk2simp.lo rk4.lo rk4imp.lo rkf45.lo \ + rk8pd.lo rkck.lo bsimp.lo gear1.lo gear2.lo +libgslodeiv_la_OBJECTS = $(am_libgslodeiv_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslodeiv.la ../linalg/libgsllinalg.la \ + ../blas/libgslblas.la ../cblas/libgslcblas.la \ + ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslodeiv_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslodeiv_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslodeiv.la +pkginclude_HEADERS = gsl_odeiv.h +INCLUDES = -I$(top_srcdir) +libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk2simp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c +noinst_HEADERS = odeiv_util.h +TESTS = $(check_PROGRAMS) +test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ode-initval/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ode-initval/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslodeiv.la: $(libgslodeiv_la_OBJECTS) $(libgslodeiv_la_DEPENDENCIES) + $(LINK) $(libgslodeiv_la_OBJECTS) $(libgslodeiv_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsimp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cstd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evolve.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gear1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gear2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk2imp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk2simp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk4imp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk8pd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rkck.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rkf45.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/ode-initval/TODO b/software/gsl-1.15/ode-initval/TODO new file mode 100644 index 000000000..9baa4220b --- /dev/null +++ b/software/gsl-1.15/ode-initval/TODO @@ -0,0 +1,81 @@ +# -*- org -*- +#+CATEGORY: ode-initval + +* Add a higher level interface which accepts a + +start point, +end point, +result array (size N, y0, y1, y2 ... ,y(N-1)) +desired relative and absolute errors epsrel and epsabs + +it should have its own workspace which is a wrapper around the +existing workspaces + +* Implement other stepping methods from well-known packages such as +RKSUITE, VODE, DASSL, etc + +* Roundoff error needs to be taken into account to prevent the +step-size being made arbitrarily small + +* The entry below has been downgraded from a bug. We use the +coefficients given in the original paper by Prince and Dormand, and it +is true that these are inexact (the values in the paper are said to be +accurate 18 figures). If somebody publishes exact versions we will +use them, but at present it is better to stick with the published +versions of the coefficients them use our own. +---------------------------------------------------------------------- +BUG#8 -- inexact coefficients in rk8pd.c + +From: Luc Maisonobe +To: gsl-discuss@sources.redhat.com +Subject: further thoughts about Dormand-Prince 8 (RK8PD) +Date: Wed, 14 Aug 2002 10:50:49 +0200 + +I was looking for some references concerning Runge-Kutta methods when I +noticed GSL had an high order one. I also found a question in the list +archive (April 2002) about the references of this method which is +implemented in rk8pd.c. It was said the coefficients were taken from the +"Numerical Algorithms with C" book by Engeln-Mullges and Uhlig. + +I have checked the coefficients somewhat with a little java tool I have +developped (see http://www.spaceroots.org/archive.htm#RKCheckSoftware) +and found they were not exact. I think this method is really the method +that is already in rksuite (http://www.netlib.org/ode/rksuite/) were the +coefficients are given as real values with 30 decimal digits. The +coefficients have probably been approximated as fractions later on. +However, these approximations are not perfect, they are good only for +the first 16 or 18 digits depending on the coefficient. + +This has no consequence for practical purposes since they are stored in +double variables, but give a false impression of beeing exact +expressions. Well, there are even some coefficients that should really +be rational numbers but for which wrong numerators and denominators are +given. As an example, the first and fourth elements of the b7 array are +given as 29443841.0 / 614563906.0 and 77736538.0 / 692538347, hence the +sum off all elements of the b7 array (which should theoretically be +equal to ah[5]) only approximate this. For these two coefficients, this +could have been avoided using 215595617.0 / 4500000000.0 and +202047683.0 / 1800000000.0, which also looks more coherent with the +other coefficients. + +The rksuite comments say this method is described in this paper : + + High Order Embedded Runge-Kutta Formulae + P.J. Prince and J.R. Dormand + J. Comp. Appl. Math.,7, pp. 67-75, 1981 + +It also says the method is an 8(7) method (i.e. the coefficients set +used to advance integration is order 8 and error estimation is order 7). +If I use my tool to check the order, I am forced to check the order +conditions numerically with a tolerance since I do not have an exact +expression of the coefficients. Since even if some conditions are not +mathematically met, the residuals are small and could be below the +tolerance. There are tolerance values for which such numerical test +dedeuce the method is of order 9, as is said in GSL. However, I am not +convinced, there are to few parameters for the large number of order +conditions needed at order 9. + +I would suggest to correct the coefficients in rk8pd.c (just put the +literal constants of rksuite) and to add the reference to the article. + +---------------------------------------------------------------------- diff --git a/software/gsl-1.15/ode-initval/bsimp.c b/software/gsl-1.15/ode-initval/bsimp.c new file mode 100644 index 000000000..07fc2feb8 --- /dev/null +++ b/software/gsl-1.15/ode-initval/bsimp.c @@ -0,0 +1,567 @@ +/* ode-initval/bsimp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Bulirsch-Stoer Implicit */ + +/* Author: G. Jungman + */ +/* Bader-Deuflhard implicit extrapolative stepper. + * [Numer. Math., 41, 373 (1983)] + */ +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +#define SEQUENCE_COUNT 8 +#define SEQUENCE_MAX 7 + +/* Bader-Deuflhard extrapolation sequence */ +static const int bd_sequence[SEQUENCE_COUNT] = + { 2, 6, 10, 14, 22, 34, 50, 70 }; + +typedef struct +{ + gsl_matrix *d; /* workspace for extrapolation */ + gsl_matrix *a_mat; /* workspace for linear system matrix */ + gsl_permutation *p_vec; /* workspace for LU permutation */ + + double x[SEQUENCE_MAX]; /* workspace for extrapolation */ + + /* state info */ + size_t k_current; + size_t k_choice; + double h_next; + double eps; + + /* workspace for extrapolation step */ + double *yp; + double *y_save; + double *yerr_save; + double *y_extrap_save; + double *y_extrap_sequence; + double *extrap_work; + double *dfdt; + double *y_temp; + double *delta_temp; + double *weight; + gsl_matrix *dfdy; + + /* workspace for the basic stepper */ + double *rhs_temp; + double *delta; + + /* order of last step */ + size_t order; +} +bsimp_state_t; + +/* Compute weighting factor */ + +static void +compute_weights (const double y[], double w[], size_t dim) +{ + size_t i; + for (i = 0; i < dim; i++) + { + double u = fabs(y[i]); + w[i] = (u > 0.0) ? u : 1.0; + } +} + +/* Calculate a choice for the "order" of the method, using the + * Deuflhard criteria. + */ + +static size_t +bsimp_deuf_kchoice (double eps, size_t dimension) +{ + const double safety_f = 0.25; + const double small_eps = safety_f * eps; + + double a_work[SEQUENCE_COUNT]; + double alpha[SEQUENCE_MAX][SEQUENCE_MAX]; + + int i, k; + + a_work[0] = bd_sequence[0] + 1.0; + + for (k = 0; k < SEQUENCE_MAX; k++) + { + a_work[k + 1] = a_work[k] + bd_sequence[k + 1]; + } + + for (i = 0; i < SEQUENCE_MAX; i++) + { + alpha[i][i] = 1.0; + for (k = 0; k < i; k++) + { + const double tmp1 = a_work[k + 1] - a_work[i + 1]; + const double tmp2 = (a_work[i + 1] - a_work[0] + 1.0) * (2 * k + 1); + alpha[k][i] = pow (small_eps, tmp1 / tmp2); + } + } + + a_work[0] += dimension; + + for (k = 0; k < SEQUENCE_MAX; k++) + { + a_work[k + 1] = a_work[k] + bd_sequence[k + 1]; + } + + for (k = 0; k < SEQUENCE_MAX - 1; k++) + { + if (a_work[k + 2] > a_work[k + 1] * alpha[k][k + 1]) + break; + } + + return k; +} + +static void +poly_extrap (gsl_matrix * d, + const double x[], + const unsigned int i_step, + const double x_i, + const double y_i[], + double y_0[], double y_0_err[], double work[], const size_t dim) +{ + size_t j, k; + + DBL_MEMCPY (y_0_err, y_i, dim); + DBL_MEMCPY (y_0, y_i, dim); + + if (i_step == 0) + { + for (j = 0; j < dim; j++) + { + gsl_matrix_set (d, 0, j, y_i[j]); + } + } + else + { + DBL_MEMCPY (work, y_i, dim); + + for (k = 0; k < i_step; k++) + { + double delta = 1.0 / (x[i_step - k - 1] - x_i); + const double f1 = delta * x_i; + const double f2 = delta * x[i_step - k - 1]; + + for (j = 0; j < dim; j++) + { + const double q_kj = gsl_matrix_get (d, k, j); + gsl_matrix_set (d, k, j, y_0_err[j]); + delta = work[j] - q_kj; + y_0_err[j] = f1 * delta; + work[j] = f2 * delta; + y_0[j] += y_0_err[j]; + } + } + + for (j = 0; j < dim; j++) + { + gsl_matrix_set (d, i_step, j, y_0_err[j]); + } + } +} + +/* Basic implicit Bulirsch-Stoer step. Divide the step h_total into + * n_step smaller steps and do the Bader-Deuflhard semi-implicit + * iteration. */ + +static int +bsimp_step_local (void *vstate, + size_t dim, + const double t0, + const double h_total, + const unsigned int n_step, + const double y[], + const double yp[], + const double dfdt[], + const gsl_matrix * dfdy, + double y_out[], + const gsl_odeiv_system * sys) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + gsl_matrix *const a_mat = state->a_mat; + gsl_permutation *const p_vec = state->p_vec; + + double *const delta = state->delta; + double *const y_temp = state->y_temp; + double *const delta_temp = state->delta_temp; + double *const rhs_temp = state->rhs_temp; + double *const w = state->weight; + + gsl_vector_view y_temp_vec = gsl_vector_view_array (y_temp, dim); + gsl_vector_view delta_temp_vec = gsl_vector_view_array (delta_temp, dim); + gsl_vector_view rhs_temp_vec = gsl_vector_view_array (rhs_temp, dim); + + const double h = h_total / n_step; + double t = t0 + h; + + double sum; + + /* This is the factor sigma referred to in equation 3.4 of the + paper. A relative change in y exceeding sigma indicates a + runaway behavior. According to the authors suitable values for + sigma are >>1. I have chosen a value of 100*dim. BJG */ + + const double max_sum = 100.0 * dim; + + int signum, status; + size_t i, j; + size_t n_inter; + + /* Calculate the matrix for the linear system. */ + for (i = 0; i < dim; i++) + { + for (j = 0; j < dim; j++) + { + gsl_matrix_set (a_mat, i, j, -h * gsl_matrix_get (dfdy, i, j)); + } + gsl_matrix_set (a_mat, i, i, gsl_matrix_get (a_mat, i, i) + 1.0); + } + + /* LU decomposition for the linear system. */ + + gsl_linalg_LU_decomp (a_mat, p_vec, &signum); + + /* Compute weighting factors */ + + compute_weights (y, w, dim); + + /* Initial step. */ + + for (i = 0; i < dim; i++) + { + y_temp[i] = h * (yp[i] + h * dfdt[i]); + } + + gsl_linalg_LU_solve (a_mat, p_vec, &y_temp_vec.vector, &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + const double di = delta_temp[i]; + delta[i] = di; + y_temp[i] = y[i] + di; + sum += fabs(di) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED ; + } + + /* Intermediate steps. */ + + status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); + + if (status) + { + return status; + } + + for (n_inter = 1; n_inter < n_step; n_inter++) + { + for (i = 0; i < dim; i++) + { + rhs_temp[i] = h * y_out[i] - delta[i]; + } + + gsl_linalg_LU_solve (a_mat, p_vec, &rhs_temp_vec.vector, &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + delta[i] += 2.0 * delta_temp[i]; + y_temp[i] += delta[i]; + sum += fabs(delta[i]) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED ; + } + + t += h; + + status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); + + if (status) + { + return status; + } + } + + + /* Final step. */ + + for (i = 0; i < dim; i++) + { + rhs_temp[i] = h * y_out[i] - delta[i]; + } + + gsl_linalg_LU_solve (a_mat, p_vec, &rhs_temp_vec.vector, &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + y_out[i] = y_temp[i] + delta_temp[i]; + sum += fabs(delta_temp[i]) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED ; + } + + return GSL_SUCCESS; +} + + +static void * +bsimp_alloc (size_t dim) +{ + bsimp_state_t *state = (bsimp_state_t *) malloc (sizeof (bsimp_state_t)); + + state->d = gsl_matrix_alloc (SEQUENCE_MAX, dim); + state->a_mat = gsl_matrix_alloc (dim, dim); + state->p_vec = gsl_permutation_alloc (dim); + + state->yp = (double *) malloc (dim * sizeof (double)); + state->y_save = (double *) malloc (dim * sizeof (double)); + state->yerr_save = (double *) malloc (dim * sizeof (double)); + state->y_extrap_save = (double *) malloc (dim * sizeof (double)); + state->y_extrap_sequence = (double *) malloc (dim * sizeof (double)); + state->extrap_work = (double *) malloc (dim * sizeof (double)); + state->dfdt = (double *) malloc (dim * sizeof (double)); + state->y_temp = (double *) malloc (dim * sizeof (double)); + state->delta_temp = (double *) malloc (dim * sizeof(double)); + state->weight = (double *) malloc (dim * sizeof(double)); + + state->dfdy = gsl_matrix_alloc (dim, dim); + + state->rhs_temp = (double *) malloc (dim * sizeof(double)); + state->delta = (double *) malloc (dim * sizeof (double)); + + { + size_t k_choice = bsimp_deuf_kchoice (GSL_SQRT_DBL_EPSILON, dim); /*FIXME: choice of epsilon? */ + state->k_choice = k_choice; + state->k_current = k_choice; + state->order = 2 * k_choice; + } + + state->h_next = -GSL_SQRT_DBL_MAX; + + return state; +} + +/* Perform the basic semi-implicit extrapolation + * step, of size h, at a Deuflhard determined order. + */ +static int +bsimp_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], + const gsl_odeiv_system * sys) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + double *const x = state->x; + double *const yp = state->yp; + double *const y_save = state->y_save; + double *const yerr_save = state->yerr_save; + double *const y_extrap_sequence = state->y_extrap_sequence; + double *const y_extrap_save = state->y_extrap_save; + double *const extrap_work = state->extrap_work; + double *const dfdt = state->dfdt; + gsl_matrix *d = state->d; + gsl_matrix *dfdy = state->dfdy; + + const double t_local = t; + size_t i, k; + + if (h + t_local == t_local) + { + return GSL_EUNDRFLW; /* FIXME: error condition */ + } + + DBL_MEMCPY (y_extrap_save, y, dim); + + /* Save inputs */ + DBL_MEMCPY (y_save, y, dim); + DBL_MEMCPY (yerr_save, yerr, dim); + + /* Evaluate the derivative. */ + if (dydt_in != NULL) + { + DBL_MEMCPY (yp, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t_local, y, yp); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Evaluate the Jacobian for the system. */ + { + int s = GSL_ODEIV_JA_EVAL (sys, t_local, y, dfdy->data, dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Make a series of refined extrapolations, + * up to the specified maximum order, which + * was calculated based on the Deuflhard + * criterion upon state initialization. */ + for (k = 0; k <= state->k_current; k++) + { + const unsigned int N = bd_sequence[k]; + const double r = (h / N); + const double x_k = r * r; + + int status = bsimp_step_local (state, + dim, t_local, h, N, + y_extrap_save, yp, + dfdt, dfdy, + y_extrap_sequence, + sys); + + if (status == GSL_EFAILED) + { + /* If the local step fails, set the error to infinity in + order to force a reduction in the step size */ + + for (i = 0; i < dim; i++) + { + yerr[i] = GSL_POSINF; + } + + break; + } + + else if (status != GSL_SUCCESS) + { + return status; + } + + x[k] = x_k; + + poly_extrap (d, x, k, x_k, y_extrap_sequence, y, yerr, extrap_work, dim); + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + DBL_MEMCPY (y, y_save, dim); + DBL_MEMCPY (yerr, yerr_save, dim); + return s; + } + } + + return GSL_SUCCESS; +} + +static unsigned int +bsimp_order (void *vstate) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + return state->order; +} + +static int +bsimp_reset (void *vstate, size_t dim) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + state->h_next = 0; + + DBL_ZERO_MEMSET (state->yp, dim); + + return GSL_SUCCESS; +} + + +static void +bsimp_free (void * vstate) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + free (state->delta); + free (state->rhs_temp); + + gsl_matrix_free (state->dfdy); + + free (state->weight); + free (state->delta_temp); + free (state->y_temp); + free (state->dfdt); + free (state->extrap_work); + free (state->y_extrap_sequence); + free (state->y_extrap_save); + free (state->y_save); + free (state->yerr_save); + free (state->yp); + + gsl_permutation_free (state->p_vec); + gsl_matrix_free (state->a_mat); + gsl_matrix_free (state->d); + free (state); +} + +static const gsl_odeiv_step_type bsimp_type = { + "bsimp", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &bsimp_alloc, + &bsimp_apply, + &bsimp_reset, + &bsimp_order, + &bsimp_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_bsimp = &bsimp_type; diff --git a/software/gsl-1.15/ode-initval/control.c b/software/gsl-1.15/ode-initval/control.c new file mode 100644 index 000000000..2a802f783 --- /dev/null +++ b/software/gsl-1.15/ode-initval/control.c @@ -0,0 +1,81 @@ +/* ode-initval/control.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +gsl_odeiv_control * +gsl_odeiv_control_alloc(const gsl_odeiv_control_type * T) +{ + gsl_odeiv_control * c = + (gsl_odeiv_control *) malloc(sizeof(gsl_odeiv_control)); + + if(c == 0) + { + GSL_ERROR_NULL ("failed to allocate space for control struct", + GSL_ENOMEM); + }; + + c->type = T; + c->state = c->type->alloc(); + + if (c->state == 0) + { + free (c); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_NULL ("failed to allocate space for control state", + GSL_ENOMEM); + }; + + return c; +} + +int +gsl_odeiv_control_init(gsl_odeiv_control * c, + double eps_abs, double eps_rel, + double a_y, double a_dydt) +{ + return c->type->init (c->state, eps_abs, eps_rel, a_y, a_dydt); +} + +void +gsl_odeiv_control_free(gsl_odeiv_control * c) +{ + RETURN_IF_NULL (c); + c->type->free(c->state); + free(c); +} + +const char * +gsl_odeiv_control_name(const gsl_odeiv_control * c) +{ + return c->type->name; +} + +int +gsl_odeiv_control_hadjust (gsl_odeiv_control * c, gsl_odeiv_step * s, const double y[], const double yerr[], const double dydt[], double * h) +{ + return c->type->hadjust(c->state, s->dimension, s->type->order(s->state), + y, yerr, dydt, h); +} diff --git a/software/gsl-1.15/ode-initval/cscal.c b/software/gsl-1.15/ode-initval/cscal.c new file mode 100644 index 000000000..f48d2abf7 --- /dev/null +++ b/software/gsl-1.15/ode-initval/cscal.c @@ -0,0 +1,193 @@ +/* ode-initval/cscal.c + * + * Copyright (C) 2002, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef struct +{ + double eps_abs; + double eps_rel; + double a_y; + double a_dydt; + double * scale_abs; +} +sc_control_state_t; + +static void * +sc_control_alloc (void) +{ + sc_control_state_t * s = + (sc_control_state_t *) malloc (sizeof(sc_control_state_t)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for sc_control_state", + GSL_ENOMEM); + } + + return s; +} + +static int +sc_control_init (void * vstate, + double eps_abs, double eps_rel, double a_y, double a_dydt) +{ + sc_control_state_t * s = (sc_control_state_t *) vstate; + + if (eps_abs < 0) + { + GSL_ERROR ("eps_abs is negative", GSL_EINVAL); + } + else if (eps_rel < 0) + { + GSL_ERROR ("eps_rel is negative", GSL_EINVAL); + } + else if (a_y < 0) + { + GSL_ERROR ("a_y is negative", GSL_EINVAL); + } + else if (a_dydt < 0) + { + GSL_ERROR ("a_dydt is negative", GSL_EINVAL); + } + + s->eps_rel = eps_rel; + s->eps_abs = eps_abs; + s->a_y = a_y; + s->a_dydt = a_dydt; + + return GSL_SUCCESS; +} + +static int +sc_control_hadjust(void * vstate, size_t dim, unsigned int ord, const double y[], const double yerr[], const double yp[], double * h) +{ + sc_control_state_t *state = (sc_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + const double * scale_abs = state->scale_abs; + + const double S = 0.9; + const double h_old = *h; + + double rmax = DBL_MIN; + size_t i; + + for(i=0; i 1.1) { + /* decrease step, no more than factor of 5, but a fraction S more + than scaling suggests (for better accuracy) */ + double r = S / pow(rmax, 1.0/ord); + + if (r < 0.2) + r = 0.2; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_DEC; + } + else if(rmax < 0.5) { + /* increase step, no more than factor of 5 */ + double r = S / pow(rmax, 1.0/(ord+1.0)); + + if (r > 5.0) + r = 5.0; + + if (r < 1.0) /* don't allow any decrease caused by S<1 */ + r = 1.0; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_INC; + } + else { + /* no change */ + return GSL_ODEIV_HADJ_NIL; + } +} + + +static void +sc_control_free (void * vstate) +{ + sc_control_state_t *state = (sc_control_state_t *) vstate; + free (state->scale_abs); + free (state); +} + +static const gsl_odeiv_control_type sc_control_type = +{"scaled", /* name */ + &sc_control_alloc, + &sc_control_init, + &sc_control_hadjust, + &sc_control_free}; + +const gsl_odeiv_control_type *gsl_odeiv_control_scaled = &sc_control_type; + + +gsl_odeiv_control * +gsl_odeiv_control_scaled_new(double eps_abs, double eps_rel, + double a_y, double a_dydt, + const double scale_abs[], + size_t dim) +{ + gsl_odeiv_control * c = + gsl_odeiv_control_alloc (gsl_odeiv_control_scaled); + + int status = gsl_odeiv_control_init (c, eps_abs, eps_rel, a_y, a_dydt); + + if (status != GSL_SUCCESS) + { + gsl_odeiv_control_free (c); + GSL_ERROR_NULL ("error trying to initialize control", status); + } + + { + sc_control_state_t * s = (sc_control_state_t *) c->state; + + s->scale_abs = (double *)malloc(dim * sizeof(double)); + + if (s->scale_abs == 0) + { + free (s); + GSL_ERROR_NULL ("failed to allocate space for scale_abs", + GSL_ENOMEM); + } + + memcpy(s->scale_abs, scale_abs, dim * sizeof(double)); + } + + return c; +} diff --git a/software/gsl-1.15/ode-initval/cstd.c b/software/gsl-1.15/ode-initval/cstd.c new file mode 100644 index 000000000..53108b0eb --- /dev/null +++ b/software/gsl-1.15/ode-initval/cstd.c @@ -0,0 +1,184 @@ +/* ode-initval/cstd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +typedef struct +{ + double eps_abs; + double eps_rel; + double a_y; + double a_dydt; +} +std_control_state_t; + +static void * +std_control_alloc (void) +{ + std_control_state_t * s = + (std_control_state_t *) malloc (sizeof(std_control_state_t)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for std_control_state", + GSL_ENOMEM); + } + + return s; +} + +static int +std_control_init (void * vstate, + double eps_abs, double eps_rel, double a_y, double a_dydt) +{ + std_control_state_t * s = (std_control_state_t *) vstate; + + if (eps_abs < 0) + { + GSL_ERROR ("eps_abs is negative", GSL_EINVAL); + } + else if (eps_rel < 0) + { + GSL_ERROR ("eps_rel is negative", GSL_EINVAL); + } + else if (a_y < 0) + { + GSL_ERROR ("a_y is negative", GSL_EINVAL); + } + else if (a_dydt < 0) + { + GSL_ERROR ("a_dydt is negative", GSL_EINVAL); + } + + s->eps_rel = eps_rel; + s->eps_abs = eps_abs; + s->a_y = a_y; + s->a_dydt = a_dydt; + + return GSL_SUCCESS; +} + +static int +std_control_hadjust(void * vstate, size_t dim, unsigned int ord, const double y[], const double yerr[], const double yp[], double * h) +{ + std_control_state_t *state = (std_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + + const double S = 0.9; + const double h_old = *h; + + double rmax = DBL_MIN; + size_t i; + + for(i=0; i 1.1) { + /* decrease step, no more than factor of 5, but a fraction S more + than scaling suggests (for better accuracy) */ + double r = S / pow(rmax, 1.0/ord); + + if (r < 0.2) + r = 0.2; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_DEC; + } + else if(rmax < 0.5) { + /* increase step, no more than factor of 5 */ + double r = S / pow(rmax, 1.0/(ord+1.0)); + + if (r > 5.0) + r = 5.0; + + if (r < 1.0) /* don't allow any decrease caused by S<1 */ + r = 1.0; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_INC; + } + else { + /* no change */ + return GSL_ODEIV_HADJ_NIL; + } +} + + +static void +std_control_free (void * vstate) +{ + std_control_state_t *state = (std_control_state_t *) vstate; + free (state); +} + +static const gsl_odeiv_control_type std_control_type = +{"standard", /* name */ + &std_control_alloc, + &std_control_init, + &std_control_hadjust, + &std_control_free}; + +const gsl_odeiv_control_type *gsl_odeiv_control_standard = &std_control_type; + + +gsl_odeiv_control * +gsl_odeiv_control_standard_new(double eps_abs, double eps_rel, + double a_y, double a_dydt) +{ + gsl_odeiv_control * c = + gsl_odeiv_control_alloc (gsl_odeiv_control_standard); + + int status = gsl_odeiv_control_init (c, eps_abs, eps_rel, a_y, a_dydt); + + if (status != GSL_SUCCESS) + { + gsl_odeiv_control_free (c); + GSL_ERROR_NULL ("error trying to initialize control", status); + } + + return c; +} + +gsl_odeiv_control * +gsl_odeiv_control_y_new(double eps_abs, double eps_rel) +{ + return gsl_odeiv_control_standard_new(eps_abs, eps_rel, 1.0, 0.0); +} + + +gsl_odeiv_control * +gsl_odeiv_control_yp_new(double eps_abs, double eps_rel) +{ + return gsl_odeiv_control_standard_new(eps_abs, eps_rel, 0.0, 1.0); +} diff --git a/software/gsl-1.15/ode-initval/evolve.c b/software/gsl-1.15/ode-initval/evolve.c new file mode 100644 index 000000000..d61842a3d --- /dev/null +++ b/software/gsl-1.15/ode-initval/evolve.c @@ -0,0 +1,236 @@ +/* ode-initval/evolve.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +gsl_odeiv_evolve * +gsl_odeiv_evolve_alloc (size_t dim) +{ + gsl_odeiv_evolve *e = + (gsl_odeiv_evolve *) malloc (sizeof (gsl_odeiv_evolve)); + + if (e == 0) + { + GSL_ERROR_NULL ("failed to allocate space for evolve struct", + GSL_ENOMEM); + } + + e->y0 = (double *) malloc (dim * sizeof (double)); + + if (e->y0 == 0) + { + free (e); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + e->yerr = (double *) malloc (dim * sizeof (double)); + + if (e->yerr == 0) + { + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for yerr", GSL_ENOMEM); + } + + e->dydt_in = (double *) malloc (dim * sizeof (double)); + + if (e->dydt_in == 0) + { + free (e->yerr); + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for dydt_in", GSL_ENOMEM); + } + + e->dydt_out = (double *) malloc (dim * sizeof (double)); + + if (e->dydt_out == 0) + { + free (e->dydt_in); + free (e->yerr); + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for dydt_out", GSL_ENOMEM); + } + + e->dimension = dim; + e->count = 0; + e->failed_steps = 0; + e->last_step = 0.0; + + return e; +} + +int +gsl_odeiv_evolve_reset (gsl_odeiv_evolve * e) +{ + e->count = 0; + e->failed_steps = 0; + e->last_step = 0.0; + return GSL_SUCCESS; +} + +void +gsl_odeiv_evolve_free (gsl_odeiv_evolve * e) +{ + RETURN_IF_NULL (e); + free (e->dydt_out); + free (e->dydt_in); + free (e->yerr); + free (e->y0); + free (e); +} + +/* Evolution framework method. + * + * Uses an adaptive step control object + */ +int +gsl_odeiv_evolve_apply (gsl_odeiv_evolve * e, + gsl_odeiv_control * con, + gsl_odeiv_step * step, + const gsl_odeiv_system * dydt, + double *t, double t1, double *h, double y[]) +{ + const double t0 = *t; + double h0 = *h; + int step_status; + int final_step = 0; + double dt = t1 - t0; /* remaining time, possibly less than h */ + + if (e->dimension != step->dimension) + { + GSL_ERROR ("step dimension must match evolution size", GSL_EINVAL); + } + + if ((dt < 0.0 && h0 > 0.0) || (dt > 0.0 && h0 < 0.0)) + { + GSL_ERROR ("step direction must match interval direction", GSL_EINVAL); + } + + /* No need to copy if we cannot control the step size. */ + + if (con != NULL) + { + DBL_MEMCPY (e->y0, y, e->dimension); + } + + /* Calculate initial dydt once if the method can benefit. */ + + if (step->type->can_use_dydt_in) + { + int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); + + if (status) + { + return status; + } + } + +try_step: + + if ((dt >= 0.0 && h0 > dt) || (dt < 0.0 && h0 < dt)) + { + h0 = dt; + final_step = 1; + } + else + { + final_step = 0; + } + + if (step->type->can_use_dydt_in) + { + step_status = + gsl_odeiv_step_apply (step, t0, h0, y, e->yerr, e->dydt_in, + e->dydt_out, dydt); + } + else + { + step_status = + gsl_odeiv_step_apply (step, t0, h0, y, e->yerr, NULL, e->dydt_out, + dydt); + } + + /* Check for stepper internal failure */ + + if (step_status != GSL_SUCCESS) + { + *h = h0; /* notify user of step-size which caused the failure */ + *t = t0; /* restore original t value */ + return step_status; + } + + e->count++; + e->last_step = h0; + + if (final_step) + { + *t = t1; + } + else + { + *t = t0 + h0; + } + + if (con != NULL) + { + /* Check error and attempt to adjust the step. */ + + double h_old = h0; + + const int hadjust_status + = gsl_odeiv_control_hadjust (con, step, y, e->yerr, e->dydt_out, &h0); + + if (hadjust_status == GSL_ODEIV_HADJ_DEC) + { + /* Check that the reported status is correct (i.e. an actual + decrease in h0 occured) and the suggested h0 will change + the time by at least 1 ulp */ + + double t_curr = GSL_COERCE_DBL(*t); + double t_next = GSL_COERCE_DBL((*t) + h0); + + if (fabs(h0) < fabs(h_old) && t_next != t_curr) + { + /* Step was decreased. Undo step, and try again with new h0. */ + DBL_MEMCPY (y, e->y0, dydt->dimension); + e->failed_steps++; + goto try_step; + } + else + { + h0 = h_old; /* keep current step size */ + } + } + } + + *h = h0; /* suggest step size for next time-step */ + + return step_status; +} diff --git a/software/gsl-1.15/ode-initval/gear1.c b/software/gsl-1.15/ode-initval/gear1.c new file mode 100644 index 000000000..1111bd3fd --- /dev/null +++ b/software/gsl-1.15/ode-initval/gear1.c @@ -0,0 +1,272 @@ +/* ode-initval/gear1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Gear 1. This is the implicit Euler a.k.a backward Euler method. */ + +/* Author: G. Jungman + */ + +/* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. + The method is also described in eg. this reference. +*/ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *k; + double *y0; + double *y0_orig; + double *y_onestep; +} +gear1_state_t; + +static void * +gear1_alloc (size_t dim) +{ + gear1_state_t *state = (gear1_state_t *) malloc (sizeof (gear1_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for gear1_state", GSL_ENOMEM); + } + + state->k = (double *) malloc (dim * sizeof (double)); + + if (state->k == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + return state; +} + +static int +gear1_step (double *y, gear1_state_t *state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system *sys) +{ + /* Makes an implicit Euler advance with step size h. + y0 is the initial values of variables y. + + The implicit matrix equations to solve are: + + k = y0 + h * f(t + h, k) + + y = y0 + h * f(t + h, k) + */ + + const int iter_steps = 3; + int nu; + size_t i; + double *y0 = state->y0; + double *k = state->k; + + /* Iterative solution of k = y0 + h * f(t + h, k) + + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < iter_steps; nu++) + { + int s = GSL_ODEIV_FN_EVAL(sys, t + h, y, k); + + if (s != GSL_SUCCESS) + { + return s; + } + + for (i=0; iy0; + double *y0_orig = state->y0_orig; + double *y_onestep = state->y_onestep; + + /* initialization */ + DBL_MEMCPY(y0, y, dim); + + /* Save initial values for possible failures */ + DBL_MEMCPY (y0_orig, y, dim); + + /* First traverse h with one step (save to y_onestep) */ + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = gear1_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + { + int s = gear1_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = gear1_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Cleanup update */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]); + } + + return GSL_SUCCESS; +} + +static int +gear1_reset (void *vstate, size_t dim) +{ + gear1_state_t *state = (gear1_state_t *) vstate; + + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->k, dim); + return GSL_SUCCESS; +} + +static unsigned int +gear1_order (void *vstate) +{ + gear1_state_t *state = (gear1_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 1; +} + +static void +gear1_free (void *vstate) +{ + gear1_state_t *state = (gear1_state_t *) vstate; + free (state->y_onestep); + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state); +} + +static const gsl_odeiv_step_type gear1_type = { "gear1", /* name */ + 0, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &gear1_alloc, + &gear1_apply, + &gear1_reset, + &gear1_order, + &gear1_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_gear1 = &gear1_type; diff --git a/software/gsl-1.15/ode-initval/gear2.c b/software/gsl-1.15/ode-initval/gear2.c new file mode 100644 index 000000000..f27b2f3e6 --- /dev/null +++ b/software/gsl-1.15/ode-initval/gear2.c @@ -0,0 +1,347 @@ +/* ode-initval/gear2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Gear 2 */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include "odeiv_util.h" +#include + + +/* gear2 state object */ +typedef struct +{ + int primed; /* flag indicating that yim1 is ready */ + double t_primed; /* system was primed for this value of t */ + double last_h; /* last step size */ + gsl_odeiv_step *primer; /* stepper to use for priming */ + double *yim1; /* y_{i-1} */ + double *k; /* work space */ + double *y0; /* work space */ + double *y0_orig; + double *y_onestep; + int stutter; +} +gear2_state_t; + +static void * +gear2_alloc (size_t dim) +{ + gear2_state_t *state = (gear2_state_t *) malloc (sizeof (gear2_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for gear2_state", GSL_ENOMEM); + } + + state->yim1 = (double *) malloc (dim * sizeof (double)); + + if (state->yim1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for yim1", GSL_ENOMEM); + } + + state->k = (double *) malloc (dim * sizeof (double)); + + if (state->k == 0) + { + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->primed = 0; + state->primer = gsl_odeiv_step_alloc (gsl_odeiv_step_rk4imp, dim); + + if (state->primer == 0) + { + free (state->y_onestep); + free (state->y0_orig); + free (state->y0); + free (state->k); + free (state->yim1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for primer", GSL_ENOMEM); + } + + state->last_h = 0.0; + + return state; +} + +static int +gear2_step (double *y, gear2_state_t * state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system * sys) +{ + /* Makes a Gear2 advance with step size h. + y0 is the initial values of variables y. + The implicit matrix equations to solve are: + k = y0 + h * f(t + h, k) + y = y0 + h * f(t + h, k) + */ + + const int iter_steps = 3; + int nu; + size_t i; + double *y0 = state->y0; + double *yim1 = state->yim1; + double *k = state->k; + + /* Iterative solution of k = y0 + h * f(t + h, k) + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < iter_steps; nu++) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, k); + + if (s != GSL_SUCCESS) + { + return s; + } + + for (i = 0; i < dim; i++) + { + y[i] = ((4.0 * y0[i] - yim1[i]) + 2.0 * h * k[i]) / 3.0; + } + } + + return GSL_SUCCESS; +} + +static int +gear2_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + gear2_state_t *state = (gear2_state_t *) vstate; + + state->stutter = 0; + + if (state->primed == 0 || t == state->t_primed || h != state->last_h) + { + /* Execute a single-step method to prime the process. Note that + * we do this if the step size changes, so frequent step size + * changes will cause the method to stutter. + * + * Note that we reuse this method if the time has not changed, + * which can occur when the adaptive driver is attempting to find + * an appropriate step-size on its first iteration */ + + int status; + DBL_MEMCPY (state->yim1, y, dim); + + status = + gsl_odeiv_step_apply (state->primer, t, h, y, yerr, dydt_in, dydt_out, + sys); + + /* Make note of step size and indicate readiness for a Gear step. */ + + state->primed = 1; + state->t_primed = t; + state->last_h = h; + state->stutter = 1; + + return status; + } + else + { + /* We have a previous y value in the buffer, and the step + * sizes match, so we go ahead with the Gear step. + */ + + double *const k = state->k; + double *const y0 = state->y0; + double *const y0_orig = state->y0_orig; + double *const yim1 = state->yim1; + double *y_onestep = state->y_onestep; + + int s; + size_t i; + + /* initialization */ + DBL_MEMCPY (y0, y, dim); + + /* Save initial values for possible failures */ + DBL_MEMCPY (y0_orig, y, dim); + + /* iterative solution */ + + if (dydt_out != NULL) + { + DBL_MEMCPY (k, dydt_out, dim); + } + + /* First traverse h with one step (save to y_onestep) */ + + DBL_MEMCPY (y_onestep, y, dim); + + s = gear2_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + + /* Then with two steps with half step length (save to y) */ + + s = gear2_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + + DBL_MEMCPY (y0, y, dim); + + s = gear2_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + + /* Cleanup update */ + + if (dydt_out != NULL) + { + s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Estimate error and update the state buffer. */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]); + yim1[i] = y0[i]; + } + + /* Make note of step size. */ + state->last_h = h; + + return 0; + } +} + +static int +gear2_reset (void *vstate, size_t dim) +{ + gear2_state_t *state = (gear2_state_t *) vstate; + + DBL_ZERO_MEMSET (state->yim1, dim); + DBL_ZERO_MEMSET (state->k, dim); + DBL_ZERO_MEMSET (state->y0, dim); + + state->primed = 0; + state->last_h = 0.0; + return GSL_SUCCESS; +} + +static unsigned int +gear2_order (void *vstate) +{ + gear2_state_t *state = (gear2_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 3; +} + +static void +gear2_free (void *vstate) +{ + gear2_state_t *state = (gear2_state_t *) vstate; + + free (state->yim1); + free (state->k); + free (state->y0); + free (state->y0_orig); + free (state->y_onestep); + gsl_odeiv_step_free (state->primer); + + free (state); +} + +static const gsl_odeiv_step_type gear2_type = { "gear2", /* name */ + 1, /* can use dydt_in */ + 0, /* gives exact dydt_out */ + &gear2_alloc, + &gear2_apply, + &gear2_reset, + &gear2_order, + &gear2_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_gear2 = &gear2_type; diff --git a/software/gsl-1.15/ode-initval/gsl_odeiv.h b/software/gsl-1.15/ode-initval/gsl_odeiv.h new file mode 100644 index 000000000..d70f15015 --- /dev/null +++ b/software/gsl-1.15/ode-initval/gsl_odeiv.h @@ -0,0 +1,230 @@ +/* ode-initval/gsl_odeiv.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#ifndef __GSL_ODEIV_H__ +#define __GSL_ODEIV_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Description of a system of ODEs. + * + * y' = f(t,y) = dydt(t, y) + * + * The system is specified by giving the right-hand-side + * of the equation and possibly a jacobian function. + * + * Some methods require the jacobian function, which calculates + * the matrix dfdy and the vector dfdt. The matrix dfdy conforms + * to the GSL standard, being a continuous range of floating point + * values, in row-order. + * + * As with GSL function objects, user-supplied parameter + * data is also present. + */ + +typedef struct +{ + int (* function) (double t, const double y[], double dydt[], void * params); + int (* jacobian) (double t, const double y[], double * dfdy, double dfdt[], void * params); + size_t dimension; + void * params; +} +gsl_odeiv_system; + +#define GSL_ODEIV_FN_EVAL(S,t,y,f) (*((S)->function))(t,y,f,(S)->params) +#define GSL_ODEIV_JA_EVAL(S,t,y,dfdy,dfdt) (*((S)->jacobian))(t,y,dfdy,dfdt,(S)->params) + + +/* General stepper object. + * + * Opaque object for stepping an ODE system from t to t+h. + * In general the object has some state which facilitates + * iterating the stepping operation. + */ + +typedef struct +{ + const char * name; + int can_use_dydt_in; + int gives_exact_dydt_out; + void * (*alloc) (size_t dim); + int (*apply) (void * state, size_t dim, double t, double h, double y[], double yerr[], const double dydt_in[], double dydt_out[], const gsl_odeiv_system * dydt); + int (*reset) (void * state, size_t dim); + unsigned int (*order) (void * state); + void (*free) (void * state); +} +gsl_odeiv_step_type; + +typedef struct { + const gsl_odeiv_step_type * type; + size_t dimension; + void * state; +} +gsl_odeiv_step; + + +/* Available stepper types. + * + * rk2 : embedded 2nd(3rd) Runge-Kutta + * rk4 : 4th order (classical) Runge-Kutta + * rkck : embedded 4th(5th) Runge-Kutta, Cash-Karp + * rk8pd : embedded 8th(9th) Runge-Kutta, Prince-Dormand + * rk2imp : implicit 2nd order Runge-Kutta at Gaussian points + * rk4imp : implicit 4th order Runge-Kutta at Gaussian points + * gear1 : M=1 implicit Gear method + * gear2 : M=2 implicit Gear method + */ + +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk2; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk4; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rkf45; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rkck; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk8pd; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk2imp; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk2simp; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_rk4imp; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_bsimp; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_gear1; +GSL_VAR const gsl_odeiv_step_type *gsl_odeiv_step_gear2; + + +/* Constructor for specialized stepper objects. + */ +gsl_odeiv_step * gsl_odeiv_step_alloc(const gsl_odeiv_step_type * T, size_t dim); +int gsl_odeiv_step_reset(gsl_odeiv_step * s); +void gsl_odeiv_step_free(gsl_odeiv_step * s); + +/* General stepper object methods. + */ +const char * gsl_odeiv_step_name(const gsl_odeiv_step * s); +unsigned int gsl_odeiv_step_order(const gsl_odeiv_step * s); + +int gsl_odeiv_step_apply(gsl_odeiv_step * s, double t, double h, double y[], double yerr[], const double dydt_in[], double dydt_out[], const gsl_odeiv_system * dydt); + +/* General step size control object. + * + * The hadjust() method controls the adjustment of + * step size given the result of a step and the error. + * Valid hadjust() methods must return one of the codes below. + * + * The general data can be used by specializations + * to store state and control their heuristics. + */ + +typedef struct +{ + const char * name; + void * (*alloc) (void); + int (*init) (void * state, double eps_abs, double eps_rel, double a_y, double a_dydt); + int (*hadjust) (void * state, size_t dim, unsigned int ord, const double y[], const double yerr[], const double yp[], double * h); + void (*free) (void * state); +} +gsl_odeiv_control_type; + +typedef struct +{ + const gsl_odeiv_control_type * type; + void * state; +} +gsl_odeiv_control; + +/* Possible return values for an hadjust() evolution method. + */ +#define GSL_ODEIV_HADJ_INC 1 /* step was increased */ +#define GSL_ODEIV_HADJ_NIL 0 /* step unchanged */ +#define GSL_ODEIV_HADJ_DEC (-1) /* step decreased */ + +gsl_odeiv_control * gsl_odeiv_control_alloc(const gsl_odeiv_control_type * T); +int gsl_odeiv_control_init(gsl_odeiv_control * c, double eps_abs, double eps_rel, double a_y, double a_dydt); +void gsl_odeiv_control_free(gsl_odeiv_control * c); +int gsl_odeiv_control_hadjust (gsl_odeiv_control * c, gsl_odeiv_step * s, const double y[], const double yerr[], const double dydt[], double * h); +const char * gsl_odeiv_control_name(const gsl_odeiv_control * c); + +/* Available control object constructors. + * + * The standard control object is a four parameter heuristic + * defined as follows: + * D0 = eps_abs + eps_rel * (a_y |y| + a_dydt h |y'|) + * D1 = |yerr| + * q = consistency order of method (q=4 for 4(5) embedded RK) + * S = safety factor (0.9 say) + * + * / (D0/D1)^(1/(q+1)) D0 >= D1 + * h_NEW = S h_OLD * | + * \ (D0/D1)^(1/q) D0 < D1 + * + * This encompasses all the standard error scaling methods. + * + * The y method is the standard method with a_y=1, a_dydt=0. + * The yp method is the standard method with a_y=0, a_dydt=1. + */ + +gsl_odeiv_control * gsl_odeiv_control_standard_new(double eps_abs, double eps_rel, double a_y, double a_dydt); +gsl_odeiv_control * gsl_odeiv_control_y_new(double eps_abs, double eps_rel); +gsl_odeiv_control * gsl_odeiv_control_yp_new(double eps_abs, double eps_rel); + +/* This controller computes errors using different absolute errors for + * each component + * + * D0 = eps_abs * scale_abs[i] + eps_rel * (a_y |y| + a_dydt h |y'|) + */ +gsl_odeiv_control * gsl_odeiv_control_scaled_new(double eps_abs, double eps_rel, double a_y, double a_dydt, const double scale_abs[], size_t dim); + +/* General evolution object. + */ +typedef struct { + size_t dimension; + double * y0; + double * yerr; + double * dydt_in; + double * dydt_out; + double last_step; + unsigned long int count; + unsigned long int failed_steps; +} +gsl_odeiv_evolve; + +/* Evolution object methods. + */ +gsl_odeiv_evolve * gsl_odeiv_evolve_alloc(size_t dim); +int gsl_odeiv_evolve_apply(gsl_odeiv_evolve * e, gsl_odeiv_control * con, gsl_odeiv_step * step, const gsl_odeiv_system * dydt, double * t, double t1, double * h, double y[]); +int gsl_odeiv_evolve_reset(gsl_odeiv_evolve * e); +void gsl_odeiv_evolve_free(gsl_odeiv_evolve * e); + + +__END_DECLS + +#endif /* __GSL_ODEIV_H__ */ diff --git a/software/gsl-1.15/ode-initval/odeiv_util.h b/software/gsl-1.15/ode-initval/odeiv_util.h new file mode 100644 index 000000000..5288b356e --- /dev/null +++ b/software/gsl-1.15/ode-initval/odeiv_util.h @@ -0,0 +1,2 @@ +#define DBL_MEMCPY(dest,src,n) memcpy((dest),(src),(n)*sizeof(double)) +#define DBL_ZERO_MEMSET(dest,n) memset((dest),0,(n)*sizeof(double)) diff --git a/software/gsl-1.15/ode-initval/rk2.c b/software/gsl-1.15/ode-initval/rk2.c new file mode 100644 index 000000000..54b20324a --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk2.c @@ -0,0 +1,250 @@ +/* ode-initval/rk2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 2(3), Euler-Cauchy */ + +/* Author: G. Jungman + */ + +/* Reference: Abramowitz & Stegun, section 25.5. Runge-Kutta 2nd (25.5.7) + and 3rd (25.5.8) order methods */ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *ytmp; +} +rk2_state_t; + +static void * +rk2_alloc (size_t dim) +{ + rk2_state_t *state = (rk2_state_t *) malloc (sizeof (rk2_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rk2_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], + const gsl_odeiv_system * sys) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const ytmp = state->ytmp; + + /* k1 step */ + /* k1 = f(t,y) */ + + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* k2 step */ + /* k2 = f(t + 0.5*h, y + 0.5*k1) */ + + for (i = 0; i < dim; i++) + { + ytmp[i] = y[i] + 0.5 * h * k1[i]; + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* k3 step */ + /* for 3rd order estimates, is used for error estimation + k3 = f(t + h, y - k1 + 2*k2) */ + + for (i = 0; i < dim; i++) + { + ytmp[i] = y[i] + h * (-k1[i] + 2.0 * k2[i]); + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* final sum */ + + for (i = 0; i < dim; i++) + { + /* Save original values if derivative evaluation below fails */ + ytmp[i] = y[i]; + + { + const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; + y[i] += h * ksum3; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, ytmp, dim); + + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; + yerr[i] = h * (k2[i] - ksum3); + } + + return GSL_SUCCESS; +} + +static int +rk2_reset (void *vstate, size_t dim) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk2_order (void *vstate) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; +} + +static void +rk2_free (void *vstate) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + free (state->k1); + free (state->k2); + free (state->k3); + free (state->ytmp); + free (state); +} + +static const gsl_odeiv_step_type rk2_type = { "rk2", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk2_alloc, + &rk2_apply, + &rk2_reset, + &rk2_order, + &rk2_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk2 = &rk2_type; diff --git a/software/gsl-1.15/ode-initval/rk2imp.c b/software/gsl-1.15/ode-initval/rk2imp.c new file mode 100644 index 000000000..4e94b0825 --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk2imp.c @@ -0,0 +1,336 @@ +/* ode-initval/rk2imp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 2, Gaussian implicit. Also known as the implicit + midpoint rule. */ + +/* Author: G. Jungman */ + +/* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. + The method is also described in eg. this reference. +*/ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *Y1; + double *y0; + double *ytmp; + double *y_onestep; + double *y0_orig; +} +rk2imp_state_t; + +static void * +rk2imp_alloc (size_t dim) +{ + rk2imp_state_t *state = (rk2imp_state_t *) malloc (sizeof (rk2imp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2imp_state", + GSL_ENOMEM); + } + + state->Y1 = (double *) malloc (dim * sizeof (double)); + + if (state->Y1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for Y1", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->Y1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->Y1); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->Y1); + free (state->ytmp); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y_onestep); + free (state->Y1); + free (state->ytmp); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + return state; +} + +static int +rk2imp_step (double *y, rk2imp_state_t *state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system *sys) +{ + /* Makes a Runge-Kutta 2nd order implicit advance with step size h. + y0 is initial values of variables y. + + The implicit matrix equations to solve are: + + Y1 = y0 + h/2 * f(t + h/2, Y1) + + y = y0 + h * f(t + h/2, Y1) + */ + + const double *y0 = state->y0; + double *Y1 = state->Y1; + double *ytmp = state->ytmp; + int max_iter=3; + int nu; + size_t i; + + /* iterative solution of Y1 = y0 + h/2 * f(t + h/2, Y1) + Y1 should include initial values at call. + + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < max_iter; nu++) + { + for (i = 0; i < dim; i++) + { + ytmp[i] = y0[i] + 0.5 * h * Y1[i]; + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, Y1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + /* assignment */ + + for (i = 0; i < dim; i++) + { + y[i] = y0[i] + h * Y1[i]; + } + + return GSL_SUCCESS; +} + +static int +rk2imp_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + size_t i; + + double *Y1 = state->Y1; + double *y0 = state->y0; + double *y_onestep = state->y_onestep; + double *y0_orig = state->y0_orig; + + /* Error estimation is done by step doubling procedure */ + + /* initialization step */ + + DBL_MEMCPY (y0, y, dim); + + /* Save initial values for possible failures */ + DBL_MEMCPY (y0_orig, y, dim); + + if (dydt_in != NULL) + { + DBL_MEMCPY (Y1, dydt_in, dim); + } + + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, Y1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* First traverse h with one step (save to y_onestep) */ + + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk2imp_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + { + int s = rk2imp_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h / 2.0, y, Y1); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + { + int s = rk2imp_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 3.0; + } + + return GSL_SUCCESS; +} + +static int +rk2imp_reset (void *vstate, size_t dim) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->Y1, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk2imp_order (void *vstate) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; +} + +static void +rk2imp_free (void *vstate) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + free (state->Y1); + free (state->ytmp); + free (state->y0); + free (state->y_onestep); + free (state->y0_orig); + free (state); +} + +static const gsl_odeiv_step_type rk2imp_type = { "rk2imp", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk2imp_alloc, + &rk2imp_apply, + &rk2imp_reset, + &rk2imp_order, + &rk2imp_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk2imp = &rk2imp_type; diff --git a/software/gsl-1.15/ode-initval/rk2simp.c b/software/gsl-1.15/ode-initval/rk2simp.c new file mode 100644 index 000000000..f8edca21b --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk2simp.c @@ -0,0 +1,382 @@ +/* ode-initval/rk2simp.c + * + * Copyright (C) 2004 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 2, Gaussian implicit. Also known as implicit midpoint rule. + + Non-linear equations solved by linearization, LU-decomposition + and matrix inversion. For reference, see eg. + + Ascher, U.M., Petzold, L.R., Computer methods for ordinary + differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *Y1; + double *y0; + double *y0_orig; + double *ytmp; + double *dfdy; /* Jacobian */ + double *dfdt; /* time derivatives, not used */ + double *y_onestep; + gsl_permutation *p; +} +rk2simp_state_t; + +static void * +rk2simp_alloc (size_t dim) +{ + rk2simp_state_t *state = + (rk2simp_state_t *) malloc (sizeof (rk2simp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2simp_state", + GSL_ENOMEM); + } + + state->Y1 = (double *) malloc (dim * sizeof (double)); + + if (state->Y1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for Y1", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->Y1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->Y1); + free (state->y0); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->dfdy = (double *) malloc (dim * dim * sizeof (double)); + + if (state->dfdy == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->p = gsl_permutation_alloc (dim); + + if (state->p == 0) + { + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state); + GSL_ERROR_NULL ("failed to allocate space for p", GSL_ENOMEM); + } + + return state; +} + + +static int +rk2simp_step (double *y, rk2simp_state_t * state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system * sys) +{ + /* Makes a Runge-Kutta 2nd order semi-implicit advance with step size h. + y0 is initial values of variables y. + + The linearized semi-implicit equations to calculate are: + + Y1 = y0 + h/2 * (1 - h/2 * df/dy)^(-1) * f(t + h/2, y0) + + y = y0 + h * f(t + h/2, Y1) + */ + + const double *y0 = state->y0; + double *Y1 = state->Y1; + double *ytmp = state->ytmp; + + size_t i; + int s, ps; + + gsl_matrix_view J = gsl_matrix_view_array (state->dfdy, dim, dim); + + /* First solve Y1. + Calculate the inverse matrix (1 - h/2 * df/dy)^-1 + */ + + /* Create matrix to J */ + + s = GSL_ODEIV_JA_EVAL (sys, t, y0, state->dfdy, state->dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + + gsl_matrix_scale (&J.matrix, -h / 2.0); + gsl_matrix_add_diagonal(&J.matrix, 1.0); + + /* Invert it by LU-decomposition to invmat */ + + s += gsl_linalg_LU_decomp (&J.matrix, state->p, &ps); + + if (s != GSL_SUCCESS) + { + return GSL_EFAILED; + } + + /* Evaluate f(t + h/2, y0) */ + + s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, y0, ytmp); + + if (s != GSL_SUCCESS) + { + return s; + } + + /* Calculate Y1 = y0 + h/2 * ((1-h/2 * df/dy)^-1) ytmp */ + + { + gsl_vector_const_view y0_view = gsl_vector_const_view_array(y0, dim); + gsl_vector_view ytmp_view = gsl_vector_view_array(ytmp, dim); + gsl_vector_view Y1_view = gsl_vector_view_array(Y1, dim); + + s = gsl_linalg_LU_solve (&J.matrix, state->p, + &ytmp_view.vector, &Y1_view.vector); + + gsl_vector_scale (&Y1_view.vector, 0.5 * h); + gsl_vector_add (&Y1_view.vector, &y0_view.vector); + } + + /* And finally evaluation of f(t + h/2, Y1) and calculation of y */ + + s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, Y1, ytmp); + + if (s != GSL_SUCCESS) + { + return s; + } + + for (i = 0; i < dim; i++) + { + y[i] = y0[i] + h * ytmp[i]; + } + + return s; +} + +static int +rk2simp_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + + size_t i; + + double *y0 = state->y0; + double *y0_orig = state->y0_orig; + double *y_onestep = state->y_onestep; + + /* Error estimation is done by step doubling procedure */ + + DBL_MEMCPY (y0, y, dim); + + /* Save initial values in case of failure */ + DBL_MEMCPY (y0_orig, y, dim); + + /* First traverse h with one step (save to y_onestep) */ + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk2simp_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + { + int s = rk2simp_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = rk2simp_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 3.0; + } + + return GSL_SUCCESS; +} + + +static int +rk2simp_reset (void *vstate, size_t dim) +{ + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->Y1, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->dfdt, dim * dim); + DBL_ZERO_MEMSET (state->dfdt, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk2simp_order (void *vstate) +{ + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; +} + +static void +rk2simp_free (void *vstate) +{ + rk2simp_state_t *state = (rk2simp_state_t *) vstate; + free (state->Y1); + free (state->y0); + free (state->y0_orig); + free (state->ytmp); + free (state->dfdy); + free (state->dfdt); + free (state->y_onestep); + gsl_permutation_free (state->p); + free (state); +} + +static const gsl_odeiv_step_type rk2simp_type = { + "rk2simp", /* name */ + 0, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk2simp_alloc, + &rk2simp_apply, + &rk2simp_reset, + &rk2simp_order, + &rk2simp_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk2simp = &rk2simp_type; diff --git a/software/gsl-1.15/ode-initval/rk4.c b/software/gsl-1.15/ode-initval/rk4.c new file mode 100644 index 000000000..fda743618 --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk4.c @@ -0,0 +1,365 @@ +/* ode-initval/rk4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 4th order, Classical */ + +/* Author: G. Jungman + */ + +/* Reference: Abramowitz & Stegun, section 25.5. equation 25.5.10 + + Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. +*/ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *k; + double *k1; + double *y0; + double *ytmp; + double *y_onestep; +} +rk4_state_t; + +static void * +rk4_alloc (size_t dim) +{ + rk4_state_t *state = (rk4_state_t *) malloc (sizeof (rk4_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk4_state", GSL_ENOMEM); + } + + state->k = (double *) malloc (dim * sizeof (double)); + + if (state->k == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->ytmp); + free (state->y0); + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + +static int +rk4_step (double *y, const rk4_state_t *state, + const double h, const double t, const size_t dim, + const gsl_odeiv_system *sys) +{ + /* Makes a Runge-Kutta 4th order advance with step size h. */ + + /* initial values of variables y. */ + const double *y0 = state->y0; + + /* work space */ + double *ytmp = state->ytmp; + + /* Runge-Kutta coefficients. Contains values of coefficient k1 + in the beginning + */ + double *k = state->k; + + size_t i; + + /* k1 step */ + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + h * k[i]; + } + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + } + + return GSL_SUCCESS; +} + + +static int +rk4_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], + const gsl_odeiv_system * sys) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + + size_t i; + + double *const k = state->k; + double *const k1 = state->k1; + double *const y0 = state->y0; + double *const y_onestep = state->y_onestep; + + DBL_MEMCPY (y0, y, dim); + + if (dydt_in != NULL) + { + DBL_MEMCPY (k, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y0, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Error estimation is done by step doubling procedure */ + + /* Save first point derivatives*/ + + DBL_MEMCPY (k1, k, dim); + + /* First traverse h with one step (save to y_onestep) */ + + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk4_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + DBL_MEMCPY (k, k1, dim); + + { + int s = rk4_step (y, state, h/2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* Update before second step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h/2.0, y, k); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* Save original y0 to k1 for possible failures */ + DBL_MEMCPY (k1, y0, dim); + + /* Update y0 for second step */ + DBL_MEMCPY (y0, y, dim); + + { + int s = rk4_step (y, state, h/2.0, t + h/2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, k1, dim); + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, k1, dim); + return s; + } + } + + /* Error estimation + + yerr = C * 0.5 * | y(onestep) - y(twosteps) | / (2^order - 1) + + constant C is approximately 8.0 to ensure 90% of samples lie within + the error (assuming a gaussian distribution with prior p(sigma)=1/sigma.) + + */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 4.0 * (y[i] - y_onestep[i]) / 15.0; + } + + return GSL_SUCCESS; +} + +static int +rk4_reset (void *vstate, size_t dim) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k, dim); + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk4_order (void *vstate) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 4; +} + +static void +rk4_free (void *vstate) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + free (state->k); + free (state->k1); + free (state->y0); + free (state->ytmp); + free (state->y_onestep); + free (state); +} + +static const gsl_odeiv_step_type rk4_type = { "rk4", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk4_alloc, + &rk4_apply, + &rk4_reset, + &rk4_order, + &rk4_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk4 = &rk4_type; diff --git a/software/gsl-1.15/ode-initval/rk4imp.c b/software/gsl-1.15/ode-initval/rk4imp.c new file mode 100644 index 000000000..e569b7e53 --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk4imp.c @@ -0,0 +1,390 @@ +/* ode-initval/rk4imp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 4, Gaussian implicit */ + +/* Author: G. Jungman +*/ + +/* Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. + Method coefficients can also be found in it. +*/ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + double *k1nu; + double *k2nu; + double *ytmp1; + double *ytmp2; + double *y0; + double *y0_orig; + double *y_onestep; +} +rk4imp_state_t; + +static void * +rk4imp_alloc (size_t dim) +{ + rk4imp_state_t *state = (rk4imp_state_t *) malloc (sizeof (rk4imp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk4imp_state", + GSL_ENOMEM); + } + + state->k1nu = (double *) malloc (dim * sizeof (double)); + + if (state->k1nu == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1nu", GSL_ENOMEM); + } + + state->k2nu = (double *) malloc (dim * sizeof (double)); + + if (state->k2nu == 0) + { + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2nu", GSL_ENOMEM); + } + + state->ytmp1 = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp1 == 0) + { + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp1", GSL_ENOMEM); + } + + state->ytmp2 = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp2 == 0) + { + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp2", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->y0_orig = (double *) malloc (dim * sizeof (double)); + + if (state->y0_orig == 0) + { + free (state->y0); + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0_orig", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->y0_orig); + free (state->y0); + free (state->ytmp2); + free (state->ytmp1); + free (state->k2nu); + free (state->k1nu); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + return state; +} + +static int +rk4imp_step (double *y, rk4imp_state_t *state, + const double h, const double t, + const size_t dim, const gsl_odeiv_system *sys) +{ + /* Makes a Runge-Kutta 4th order implicit advance with step size h. + y0 is initial values of variables y. + + The implicit matrix equations to solve are: + + Y1 = y0 + h * a11 * f(t + h * c1, Y1) + h * a12 * f(t + h * c2, Y2) + Y2 = y0 + h * a21 * f(t + h * c1, Y1) + h * a22 * f(t + h * c2, Y2) + + y = y0 + h * b1 * f(t + h * c1, Y1) + h * b2 * f(t + h * c2, Y2) + + with constant coefficients a, b and c. For this method + they are: b=[0.5 0.5] c=[(3-sqrt(3))/6 (3+sqrt(3))/6] + a11=1/4, a12=(3-2*sqrt(3))/12, a21=(3+2*sqrt(3))/12 and a22=1/4 + */ + + const double ir3 = 1.0 / M_SQRT3; + const int iter_steps = 3; + int nu; + size_t i; + + double *const k1nu = state->k1nu; + double *const k2nu = state->k2nu; + double *const ytmp1 = state->ytmp1; + double *const ytmp2 = state->ytmp2; + + /* iterative solution of Y1 and Y2. + + Note: This method does not check for convergence of the + iterative solution! + */ + + for (nu = 0; nu < iter_steps; nu++) + { + for (i = 0; i < dim; i++) + { + ytmp1[i] = + y[i] + h * (0.25 * k1nu[i] + 0.5 * (0.5 - ir3) * k2nu[i]); + ytmp2[i] = + y[i] + h * (0.25 * k2nu[i] + 0.5 * (0.5 + ir3) * k1nu[i]); + } + { + int s = + GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 - ir3), ytmp1, k1nu); + + if (s != GSL_SUCCESS) + { + return s; + } + } + { + int s = + GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h * (1.0 + ir3), ytmp2, k2nu); + + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + /* assignment */ + + for (i = 0; i < dim; i++) + { + const double d_i = 0.5 * (k1nu[i] + k2nu[i]); + y[i] += h * d_i; + } + + return GSL_SUCCESS; +} + +static int +rk4imp_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], + const gsl_odeiv_system * sys) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + size_t i; + + double *y0 = state->y0; + double *y0_orig = state->y0_orig; + double *y_onestep = state->y_onestep; + double *k1nu = state->k1nu; + double *k2nu = state->k2nu; + + /* Initialization step */ + DBL_MEMCPY (y0, y, dim); + + /* Save initial values in case of failure */ + DBL_MEMCPY (y0_orig, y, dim); + + if (dydt_in != 0) + { + DBL_MEMCPY (k1nu, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1nu); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + DBL_MEMCPY (k2nu, k1nu, dim); + + /* First traverse h with one step (save to y_onestep) */ + + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk4imp_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + { + int s = rk4imp_step (y, state, h/2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + DBL_MEMCPY (y0, y, dim); + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h/2.0, y, k1nu); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + DBL_MEMCPY (k2nu, k1nu, dim); + + { + int s = rk4imp_step (y, state, h/2.0, t + h/2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) { + /* Restore original y vector */ + DBL_MEMCPY (y, y0_orig, dim); + return s; + } + } + + /* Error estimation */ + + /* Denominator in step doubling error equation + * yerr = 0.5 * | y(onestep) - y(twosteps) | / (2^order - 1) + */ + + for (i = 0; i < dim; i++) + { + yerr[i] = 8.0 * 0.5 * (y[i] - y_onestep[i]) / 15.0; + } + + return GSL_SUCCESS; +} + +static int +rk4imp_reset (void *vstate, size_t dim) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y0_orig, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->k1nu, dim); + DBL_ZERO_MEMSET (state->k2nu, dim); + DBL_ZERO_MEMSET (state->ytmp1, dim); + DBL_ZERO_MEMSET (state->ytmp2, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk4imp_order (void *vstate) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 4; +} + +static void +rk4imp_free (void *vstate) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + free (state->y_onestep); + free (state->y0_orig); + free (state->y0); + free (state->k1nu); + free (state->k2nu); + free (state->ytmp1); + free (state->ytmp2); + free (state); +} + +static const gsl_odeiv_step_type rk4imp_type = { "rk4imp", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk4imp_alloc, + &rk4imp_apply, + &rk4imp_reset, + &rk4imp_order, + &rk4imp_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk4imp = &rk4imp_type; diff --git a/software/gsl-1.15/ode-initval/rk8pd.c b/software/gsl-1.15/ode-initval/rk8pd.c new file mode 100644 index 000000000..a82d1bd26 --- /dev/null +++ b/software/gsl-1.15/ode-initval/rk8pd.c @@ -0,0 +1,537 @@ +/* ode-initval/rk8pd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 8(9), Prince-Dormand + * + * High Order Embedded Runge-Kutta Formulae + * P.J. Prince and J.R. Dormand + * J. Comp. Appl. Math.,7, pp. 67-75, 1981 + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +/* Prince-Dormand constants */ + +static const double Abar[] = { + 14005451.0 / 335480064.0, + 0.0, + 0.0, + 0.0, + 0.0, + -59238493.0 / 1068277825.0, + 181606767.0 / 758867731.0, + 561292985.0 / 797845732.0, + -1041891430.0 / 1371343529.0, + 760417239.0 / 1151165299.0, + 118820643.0 / 751138087.0, + -528747749.0 / 2220607170.0, + 1.0 / 4.0 +}; + +static const double A[] = { + 13451932.0 / 455176623.0, + 0.0, + 0.0, + 0.0, + 0.0, + -808719846.0 / 976000145.0, + 1757004468.0 / 5645159321.0, + 656045339.0 / 265891186.0, + -3867574721.0 / 1518517206.0, + 465885868.0 / 322736535.0, + 53011238.0 / 667516719.0, + 2.0 / 45.0 +}; + +static const double ah[] = { + 1.0 / 18.0, + 1.0 / 12.0, + 1.0 / 8.0, + 5.0 / 16.0, + 3.0 / 8.0, + 59.0 / 400.0, + 93.0 / 200.0, + 5490023248.0 / 9719169821.0, + 13.0 / 20.0, + 1201146811.0 / 1299019798.0 +}; + +static const double b21 = 1.0 / 18.0; +static const double b3[] = { 1.0 / 48.0, 1.0 / 16.0 }; +static const double b4[] = { 1.0 / 32.0, 0.0, 3.0 / 32.0 }; +static const double b5[] = { 5.0 / 16.0, 0.0, -75.0 / 64.0, 75.0 / 64.0 }; +static const double b6[] = { 3.0 / 80.0, 0.0, 0.0, 3.0 / 16.0, 3.0 / 20.0 }; +static const double b7[] = { + 29443841.0 / 614563906.0, + 0.0, + 0.0, + 77736538.0 / 692538347.0, + -28693883.0 / 1125000000.0, + 23124283.0 / 1800000000.0 +}; +static const double b8[] = { + 16016141.0 / 946692911.0, + 0.0, + 0.0, + 61564180.0 / 158732637.0, + 22789713.0 / 633445777.0, + 545815736.0 / 2771057229.0, + -180193667.0 / 1043307555.0 +}; +static const double b9[] = { + 39632708.0 / 573591083.0, + 0.0, + 0.0, + -433636366.0 / 683701615.0, + -421739975.0 / 2616292301.0, + 100302831.0 / 723423059.0, + 790204164.0 / 839813087.0, + 800635310.0 / 3783071287.0 +}; +static const double b10[] = { + 246121993.0 / 1340847787.0, + 0.0, + 0.0, + -37695042795.0 / 15268766246.0, + -309121744.0 / 1061227803.0, + -12992083.0 / 490766935.0, + 6005943493.0 / 2108947869.0, + 393006217.0 / 1396673457.0, + 123872331.0 / 1001029789.0 +}; +static const double b11[] = { + -1028468189.0 / 846180014.0, + 0.0, + 0.0, + 8478235783.0 / 508512852.0, + 1311729495.0 / 1432422823.0, + -10304129995.0 / 1701304382.0, + -48777925059.0 / 3047939560.0, + 15336726248.0 / 1032824649.0, + -45442868181.0 / 3398467696.0, + 3065993473.0 / 597172653.0 +}; +static const double b12[] = { + 185892177.0 / 718116043.0, + 0.0, + 0.0, + -3185094517.0 / 667107341.0, + -477755414.0 / 1098053517.0, + -703635378.0 / 230739211.0, + 5731566787.0 / 1027545527.0, + 5232866602.0 / 850066563.0, + -4093664535.0 / 808688257.0, + 3962137247.0 / 1805957418.0, + 65686358.0 / 487910083.0 +}; +static const double b13[] = { + 403863854.0 / 491063109.0, + 0.0, + 0.0, + -5068492393.0 / 434740067.0, + -411421997.0 / 543043805.0, + 652783627.0 / 914296604.0, + 11173962825.0 / 925320556.0, + -13158990841.0 / 6184727034.0, + 3936647629.0 / 1978049680.0, + -160528059.0 / 685178525.0, + 248638103.0 / 1413531060.0, + 0.0 +}; + +typedef struct +{ + double *k[13]; + double *ytmp; + double *y0; +} +rk8pd_state_t; + +static void * +rk8pd_alloc (size_t dim) +{ + rk8pd_state_t *state = (rk8pd_state_t *) malloc (sizeof (rk8pd_state_t)); + int i, j; + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk8pd_state", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + for (i = 0; i < 13; i++) + { + state->k[i] = (double *) malloc (dim * sizeof (double)); + + if (state->k[i] == 0) + { + for (j = 0; j < i; j++) + { + free (state->k[j]); + } + free (state->y0); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k's", GSL_ENOMEM); + } + } + + return state; +} + + +static int +rk8pd_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + + size_t i; + + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + /* Note that k1 is stored in state->k[0] due to zero-based indexing */ + double *const k1 = state->k[0]; + double *const k2 = state->k[1]; + double *const k3 = state->k[2]; + double *const k4 = state->k[3]; + double *const k5 = state->k[4]; + double *const k6 = state->k[5]; + double *const k7 = state->k[6]; + double *const k8 = state->k[7]; + double *const k9 = state->k[8]; + double *const k10 = state->k[9]; + double *const k11 = state->k[10]; + double *const k12 = state->k[11]; + double *const k13 = state->k[12]; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + b21 * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b5[0] * k1[i] + b5[2] * k3[i] + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b6[0] * k1[i] + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b7[0] * k1[i] + b7[3] * k4[i] + b7[4] * k5[i] + + b7[5] * k6[i]); + + /* k7 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[5] * h, ytmp, k7); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b8[0] * k1[i] + b8[3] * k4[i] + b8[4] * k5[i] + + b8[5] * k6[i] + b8[6] * k7[i]); + + /* k8 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[6] * h, ytmp, k8); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b9[0] * k1[i] + b9[3] * k4[i] + b9[4] * k5[i] + + b9[5] * k6[i] + b9[6] * k7[i] + b9[7] * k8[i]); + + /* k9 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[7] * h, ytmp, k9); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b10[0] * k1[i] + b10[3] * k4[i] + b10[4] * k5[i] + + b10[5] * k6[i] + b10[6] * k7[i] + b10[7] * k8[i] + + b10[8] * k9[i]); + + /* k10 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[8] * h, ytmp, k10); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b11[0] * k1[i] + b11[3] * k4[i] + b11[4] * k5[i] + + b11[5] * k6[i] + b11[6] * k7[i] + b11[7] * k8[i] + + b11[8] * k9[i] + b11[9] * k10[i]); + + /* k11 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[9] * h, ytmp, k11); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b12[0] * k1[i] + b12[3] * k4[i] + b12[4] * k5[i] + + b12[5] * k6[i] + b12[6] * k7[i] + b12[7] * k8[i] + + b12[8] * k9[i] + b12[9] * k10[i] + b12[10] * k11[i]); + + /* k12 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k12); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b13[0] * k1[i] + b13[3] * k4[i] + b13[4] * k5[i] + + b13[5] * k6[i] + b13[6] * k7[i] + b13[7] * k8[i] + + b13[8] * k9[i] + b13[9] * k10[i] + b13[10] * k11[i] + + b13[11] * k12[i]); + + /* k13 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k13); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* final sum */ + for (i = 0; i < dim; i++) + { + const double ksum8 = + Abar[0] * k1[i] + Abar[5] * k6[i] + Abar[6] * k7[i] + + Abar[7] * k8[i] + Abar[8] * k9[i] + Abar[9] * k10[i] + + Abar[10] * k11[i] + Abar[11] * k12[i] + Abar[12] * k13[i]; + y[i] += h * ksum8; + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* error estimate */ + for (i = 0; i < dim; i++) + { + const double ksum8 = + Abar[0] * k1[i] + Abar[5] * k6[i] + Abar[6] * k7[i] + + Abar[7] * k8[i] + Abar[8] * k9[i] + Abar[9] * k10[i] + + Abar[10] * k11[i] + Abar[11] * k12[i] + Abar[12] * k13[i]; + const double ksum7 = + A[0] * k1[i] + A[5] * k6[i] + A[6] * k7[i] + A[7] * k8[i] + + A[8] * k9[i] + A[9] * k10[i] + A[10] * k11[i] + A[11] * k12[i]; + yerr[i] = h * (ksum7 - ksum8); + } + + return GSL_SUCCESS; +} + +static int +rk8pd_reset (void *vstate, size_t dim) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + + int i; + + for (i = 0; i < 13; i++) + { + DBL_ZERO_MEMSET (state->k[i], dim); + } + + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk8pd_order (void *vstate) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 8; +} + +static void +rk8pd_free (void *vstate) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + int i; + + for (i = 0; i < 13; i++) + { + free (state->k[i]); + } + free (state->y0); + free (state->ytmp); + free (state); +} + +static const gsl_odeiv_step_type rk8pd_type = { "rk8pd", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk8pd_alloc, + &rk8pd_apply, + &rk8pd_reset, + &rk8pd_order, + &rk8pd_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rk8pd = &rk8pd_type; diff --git a/software/gsl-1.15/ode-initval/rkck.c b/software/gsl-1.15/ode-initval/rkck.c new file mode 100644 index 000000000..73ee3a5fb --- /dev/null +++ b/software/gsl-1.15/ode-initval/rkck.c @@ -0,0 +1,371 @@ +/* ode-initval/rkck.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 4(5), Cash-Karp */ + +/* Reference: Cash, J.R., Karp, A.H., ACM Transactions of Mathematical + Software, vol. 16 (1990) 201-222. */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +/* Cash-Karp constants */ +static const double ah[] = { 1.0 / 5.0, 0.3, 3.0 / 5.0, 1.0, 7.0 / 8.0 }; +static const double b21 = 1.0 / 5.0; +static const double b3[] = { 3.0 / 40.0, 9.0 / 40.0 }; +static const double b4[] = { 0.3, -0.9, 1.2 }; +static const double b5[] = { -11.0 / 54.0, 2.5, -70.0 / 27.0, 35.0 / 27.0 }; +static const double b6[] = + { 1631.0 / 55296.0, 175.0 / 512.0, 575.0 / 13824.0, 44275.0 / 110592.0, + 253.0 / 4096.0 }; +static const double c1 = 37.0 / 378.0; +static const double c3 = 250.0 / 621.0; +static const double c4 = 125.0 / 594.0; +static const double c6 = 512.0 / 1771.0; + +/* These are the differences of fifth and fourth order coefficients + for error estimation */ + +static const double ec[] = { 0.0, + 37.0 / 378.0 - 2825.0 / 27648.0, + 0.0, + 250.0 / 621.0 - 18575.0 / 48384.0, + 125.0 / 594.0 - 13525.0 / 55296.0, + -277.0 / 14336.0, + 512.0 / 1771.0 - 0.25 +}; + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *k4; + double *k5; + double *k6; + double *y0; + double *ytmp; +} +rkck_state_t; + +static void * +rkck_alloc (size_t dim) +{ + rkck_state_t *state = (rkck_state_t *) malloc (sizeof (rkck_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rkck_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->k4 = (double *) malloc (dim * sizeof (double)); + + if (state->k4 == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k4", GSL_ENOMEM); + } + + state->k5 = (double *) malloc (dim * sizeof (double)); + + if (state->k5 == 0) + { + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k5", GSL_ENOMEM); + } + + state->k6 = (double *) malloc (dim * sizeof (double)); + + if (state->k6 == 0) + { + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k6", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rkck_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const k4 = state->k4; + double *const k5 = state->k5; + double *const k6 = state->k6; + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + b21 * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b5[0] * k1[i] + b5[1] * k2[i] + b5[2] * k3[i] + + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b6[0] * k1[i] + b6[1] * k2[i] + b6[2] * k3[i] + + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step and final sum */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c6 * k6[i]; + y[i] += h * d_i; + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* difference between 4th and 5th order */ + for (i = 0; i < dim; i++) + { + yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + + ec[5] * k5[i] + ec[6] * k6[i]); + } + + return GSL_SUCCESS; +} + + +static int +rkck_reset (void *vstate, size_t dim) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->k4, dim); + DBL_ZERO_MEMSET (state->k5, dim); + DBL_ZERO_MEMSET (state->k6, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rkck_order (void *vstate) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 5; /* FIXME: should this be 4? */ +} + +static void +rkck_free (void *vstate) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + free (state->ytmp); + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); +} + +static const gsl_odeiv_step_type rkck_type = { "rkck", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rkck_alloc, + &rkck_apply, + &rkck_reset, + &rkck_order, + &rkck_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rkck = &rkck_type; diff --git a/software/gsl-1.15/ode-initval/rkf45.c b/software/gsl-1.15/ode-initval/rkf45.c new file mode 100644 index 000000000..f938d6121 --- /dev/null +++ b/software/gsl-1.15/ode-initval/rkf45.c @@ -0,0 +1,372 @@ +/* ode-initval/rkf45.c + * + * Copyright (C) 2001, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta-Fehlberg 4(5)*/ + +/* Reference eg. Hairer, E., Norsett S.P., Wanner, G. Solving ordinary + differential equations I, Nonstiff Problems, 2nd revised edition, + Springer, 2000. +*/ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +/* Runge-Kutta-Fehlberg coefficients. Zero elements left out */ + +static const double ah[] = { 1.0/4.0, 3.0/8.0, 12.0/13.0, 1.0, 1.0/2.0 }; +static const double b3[] = { 3.0/32.0, 9.0/32.0 }; +static const double b4[] = { 1932.0/2197.0, -7200.0/2197.0, 7296.0/2197.0}; +static const double b5[] = { 8341.0/4104.0, -32832.0/4104.0, 29440.0/4104.0, -845.0/4104.0}; +static const double b6[] = { -6080.0/20520.0, 41040.0/20520.0, -28352.0/20520.0, 9295.0/20520.0, -5643.0/20520.0}; + +static const double c1 = 902880.0/7618050.0; +static const double c3 = 3953664.0/7618050.0; +static const double c4 = 3855735.0/7618050.0; +static const double c5 = -1371249.0/7618050.0; +static const double c6 = 277020.0/7618050.0; + +/* These are the differences of fifth and fourth order coefficients + for error estimation */ + +static const double ec[] = { 0.0, + 1.0 / 360.0, + 0.0, + -128.0 / 4275.0, + -2197.0 / 75240.0, + 1.0 / 50.0, + 2.0 / 55.0 +}; + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *k4; + double *k5; + double *k6; + double *y0; + double *ytmp; +} +rkf45_state_t; + +static void * +rkf45_alloc (size_t dim) +{ + rkf45_state_t *state = (rkf45_state_t *) malloc (sizeof (rkf45_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rkf45_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->k4 = (double *) malloc (dim * sizeof (double)); + + if (state->k4 == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k4", GSL_ENOMEM); + } + + state->k5 = (double *) malloc (dim * sizeof (double)); + + if (state->k5 == 0) + { + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k5", GSL_ENOMEM); + } + + state->k6 = (double *) malloc (dim * sizeof (double)); + + if (state->k6 == 0) + { + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k6", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rkf45_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv_system * sys) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const k4 = state->k4; + double *const k5 = state->k5; + double *const k6 = state->k6; + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + ah[0] * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b5[0] * k1[i] + b5[1] * k2[i] + b5[2] * k3[i] + + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b6[0] * k1[i] + b6[1] * k2[i] + b6[2] * k3[i] + + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step and final sum */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c5 * k5[i] + c6 * k6[i]; + y[i] += h * d_i; + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + + return s; + } + } + + /* difference between 4th and 5th order */ + for (i = 0; i < dim; i++) + { + yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + + ec[5] * k5[i] + ec[6] * k6[i]); + } + + return GSL_SUCCESS; +} + + +static int +rkf45_reset (void *vstate, size_t dim) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->k4, dim); + DBL_ZERO_MEMSET (state->k5, dim); + DBL_ZERO_MEMSET (state->k6, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rkf45_order (void *vstate) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 5; +} + +static void +rkf45_free (void *vstate) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + free (state->ytmp); + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); +} + +static const gsl_odeiv_step_type rkf45_type = { "rkf45", /* name */ + 1, /* can use dydt_in */ + 0, /* gives exact dydt_out */ + &rkf45_alloc, + &rkf45_apply, + &rkf45_reset, + &rkf45_order, + &rkf45_free +}; + +const gsl_odeiv_step_type *gsl_odeiv_step_rkf45 = &rkf45_type; diff --git a/software/gsl-1.15/ode-initval/step.c b/software/gsl-1.15/ode-initval/step.c new file mode 100644 index 000000000..7131cc96d --- /dev/null +++ b/software/gsl-1.15/ode-initval/step.c @@ -0,0 +1,90 @@ +/* ode-initval/odeiv.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include + +gsl_odeiv_step * +gsl_odeiv_step_alloc(const gsl_odeiv_step_type * T, size_t dim) +{ + gsl_odeiv_step *s = (gsl_odeiv_step *) malloc (sizeof (gsl_odeiv_step)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for ode struct", GSL_ENOMEM); + }; + + s->type = T; + s->dimension = dim; + + s->state = s->type->alloc(dim); + + if (s->state == 0) + { + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_NULL ("failed to allocate space for ode state", GSL_ENOMEM); + }; + + return s; +} + +const char * +gsl_odeiv_step_name(const gsl_odeiv_step * s) +{ + return s->type->name; +} + +unsigned int +gsl_odeiv_step_order(const gsl_odeiv_step * s) +{ + return s->type->order(s->state); +} + +int +gsl_odeiv_step_apply( + gsl_odeiv_step * s, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], + const gsl_odeiv_system * dydt) +{ + return s->type->apply(s->state, s->dimension, t, h, y, yerr, dydt_in, dydt_out, dydt); +} + +int +gsl_odeiv_step_reset(gsl_odeiv_step * s) +{ + return s->type->reset(s->state, s->dimension); +} + +void +gsl_odeiv_step_free(gsl_odeiv_step * s) +{ + RETURN_IF_NULL (s); + s->type->free(s->state); + free(s); +} diff --git a/software/gsl-1.15/ode-initval/test.c b/software/gsl-1.15/ode-initval/test.c new file mode 100644 index 000000000..409c3dd60 --- /dev/null +++ b/software/gsl-1.15/ode-initval/test.c @@ -0,0 +1,1268 @@ +/* ode-initval/test_odeiv.c + * + * Copyright (C) 2004, 2009 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Some functions and tests based on test.c by G. Jungman. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "odeiv_util.h" + +/* Maximum number of ODE equations */ +#define MAXEQ 4 + +/* RHS for f=2. Solution y = 2 * t + t0 */ + +int +rhs_linear (double t, const double y[], double f[], void *params) +{ + f[0] = 2.0; + + return GSL_SUCCESS; +} + +int +jac_linear (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 0.0; + dfdt[0] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_lin = { + rhs_linear, + jac_linear, + 1, + 0 +}; + +/* RHS for f=y. Equals y=exp(t) with initial value y(0)=1.0 */ + +int +rhs_exp (double t, const double y[], double f[], void *params) +{ + f[0] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_exp (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = y[0]; + dfdt[0] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_exp = { + rhs_exp, + jac_exp, + 1, + 0 +}; + +/* RHS for f0 = -y1, f1 = y0 + equals y = [cos(t), sin(t)] with initial values [1, 0] +*/ + +int +rhs_sin (double t, const double y[], double f[], void *params) +{ + f[0] = -y[1]; + f[1] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_sin (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 0.0; + dfdy[1] = -1.0; + dfdy[2] = 1.0; + dfdy[3] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_sin = { + rhs_sin, + jac_sin, + 2, + 0 +}; + +/* Sine/cosine with random failures */ + +static int rhs_xsin_reset = 0; +static int jac_xsin_reset = 0; + +int +rhs_xsin (double t, const double y[], double f[], void *params) +{ + static int n = 0, m = 0; + + if (rhs_xsin_reset) { rhs_xsin_reset = 0; n = 0; m = 1;} + n++; + + if (n >= m) { + m = n * 1.3; + return GSL_EFAILED; + } ; + + if (n > 40 && n < 65) { + f[0] = GSL_NAN; + f[1] = GSL_NAN; + return GSL_EFAILED; + } + + f[0] = -y[1]; + f[1] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_xsin (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + static int n = 0; + + if (jac_xsin_reset) { jac_xsin_reset = 0; n = 0; } + + n++; + + if (n > 50 && n < 55) { + dfdy[0] = GSL_NAN; + dfdy[1] = GSL_NAN; + dfdy[2] = GSL_NAN; + dfdy[3] = GSL_NAN; + + dfdt[0] = GSL_NAN; + dfdt[1] = GSL_NAN; + return GSL_EFAILED; + } + + dfdy[0] = 0.0; + dfdy[1] = -1.0; + dfdy[2] = 1.0; + dfdy[3] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_xsin = { + rhs_xsin, + jac_xsin, + 2, + 0 +}; + + +/* RHS for classic stiff example + dy0 / dt = 998 * y0 + 1998 * y1 y0(0) = 1.0 + dy1 / dt = -999 * y0 - 1999 * y1 y1(0) = 0.0 + + solution is + y0 = 2 * exp(-t) - exp(-1000 * t) + y1 = - exp(-t) + exp(-1000 * t) +*/ + +int +rhs_stiff (double t, const double y[], double f[], void *params) +{ + f[0] = 998.0 * y[0] + 1998.0 * y[1]; + f[1] = -999.0 * y[0] - 1999.0 * y[1]; + + return GSL_SUCCESS; +} + +int +jac_stiff (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 998.0; + dfdy[1] = 1998.0; + dfdy[2] = -999.0; + dfdy[3] = -1999.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_stiff = { + rhs_stiff, + jac_stiff, + 2, + 0 +}; + +/* van Der Pol oscillator: + f0 = y1 y0(0) = 1.0 + f1 = -y0 + mu * y1 * (1 - y0^2) y1(0) = 0.0 +*/ + +int +rhs_vanderpol (double t, const double y[], double f[], void *params) +{ + const double mu = 10.0; + + f[0] = y[1]; + f[1] = -y[0] + mu * y[1] * (1.0 - y[0]*y[0]); + + return GSL_SUCCESS; +} + +int +jac_vanderpol (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double mu = 10.0; + + dfdy[0] = 0.0; + dfdy[1] = 1.0; + dfdy[2] = -2.0 * mu * y[0] * y[1] - 1.0; + dfdy[3] = mu * (1.0 - y[0] * y[0]); + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_vanderpol = { + rhs_vanderpol, + jac_vanderpol, + 2, + 0 +}; + +/* The Oregonator - chemical Belusov-Zhabotinskii reaction + y0(0) = 1.0, y1(0) = 2.0, y2(0) = 3.0 +*/ + +int +rhs_oregonator (double t, const double y[], double f[], void *params) +{ + const double c1=77.27; + const double c2=8.375e-6; + const double c3=0.161; + + f[0] = c1 * (y[1] + y[0] * (1 - c2 * y[0] - y[1])); + f[1] = 1/c1 * (y[2] - y[1] * (1 + y[0])); + f[2] = c3 * (y[0] - y[2]); + + return GSL_SUCCESS; +} + +int +jac_oregonator (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double c1=77.27; + const double c2=8.375e-6; + const double c3=0.161; + + dfdy[0] = c1 * (1 - 2 * c2 * y[0] - y[1]); + dfdy[1] = c1 * (1 - y[0]); + dfdy[2] = 0.0; + + dfdy[3] = 1/c1 * (-y[1]); + dfdy[4] = 1/c1 * (-1 - y[0]); + dfdy[5] = 1/c1; + + dfdy[6] = c3; + dfdy[7] = 0.0; + dfdy[8] = -c3; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + dfdt[2] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_oregonator = { + rhs_oregonator, + jac_oregonator, + 3, + 0 +}; + +/* Volterra-Lotka predator-prey model + + f0 = (a - b * y1) * y0 y0(0) = 3.0 + f1 = (-c + d * y0) * y1 y1(0) = 1.0 + */ + +int +rhs_vl (double t, const double y[], double f[], void *params) +{ + const double a = 1.0; + const double b = 1.0; + const double c = 1.0; + const double d = 1.0; + + f[0] = (a - b * y[1]) * y[0]; + f[1] = (-c + d * y[0]) * y[1]; + + return GSL_SUCCESS; +} + +int +jac_vl (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double a = 1.0; + const double b = 1.0; + const double c = 1.0; + const double d = 1.0; + + dfdy[0] = a - b * y[1]; + dfdy[1] = -b * y[0]; + dfdy[2] = d * y[1]; + dfdy[3] = -c + d * y[0]; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_vl = { + rhs_vl, + jac_vl, + 2, + 0 +}; + +/* Stiff trigonometric example + + f0 = -50 * (y0 - cos(t)) y0(0) = 0.0 + */ + +int +rhs_stifftrig (double t, const double y[], double f[], void *params) +{ + f[0] = -50 * (y[0] - cos(t)); + + return GSL_SUCCESS; +} + +int +jac_stifftrig (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = -50; + + dfdt[0] = -50 * sin(t); + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_stifftrig = { + rhs_stifftrig, + jac_stifftrig, + 1, + 0 +}; + +/* E5 - a stiff badly scaled chemical problem by Enright, Hull & + Lindberg (1975): Comparing numerical methods for stiff systems of + ODEs. BIT, vol. 15, pp. 10-48. + + f0 = -a * y0 - b * y0 * y2 y0(0) = 1.76e-3 + f1 = a * y0 - m * c * y1 * y2 y1(0) = 0.0 + f2 = a * y0 - b * y0 * y2 - m * c * y1 * y2 + c * y3 y2(0) = 0.0 + f3 = b * y0 * y2 - c * y3 y3(0) = 0.0 + */ + +int +rhs_e5 (double t, const double y[], double f[], void *params) +{ + const double a = 7.89e-10; + const double b = 1.1e7; + const double c = 1.13e3; + const double m = 1.0e6; + + f[0] = -a * y[0] - b * y[0] * y[2]; + f[1] = a * y[0] - m * c * y[1] * y[2]; + f[3] = b * y[0] * y[2] - c * y[3]; + f[2] = f[1] - f[3]; + + return GSL_SUCCESS; +} + +int +jac_e5 (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double a = 7.89e-10; + const double b = 1.1e7; + const double c = 1.13e3; + const double m = 1.0e6; + + dfdy[0] = -a - b * y[2]; + dfdy[1] = 0.0; + dfdy[2] = -b * y[0]; + dfdy[3] = 0.0; + + dfdy[4] = a; + dfdy[5] = -m * c * y[2]; + dfdy[6] = -m * c * y[1]; + dfdy[7] = 0.0; + + dfdy[8] = a - b * y[2]; + dfdy[9] = -m * c * y[2]; + dfdy[10] = -b * y[0] - m * c * y[1]; + dfdy[11] = c; + + dfdy[12] = b * y[2]; + dfdy[13] = 0.0; + dfdy[14] = b * y[0]; + dfdy[15] = -c; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + dfdt[2] = 0.0; + dfdt[3] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv_system rhs_func_e5 = { + rhs_e5, + jac_e5, + 4, + 0 +}; + +void +test_odeiv_stepper (const gsl_odeiv_step_type *T, const gsl_odeiv_system *sys, + const double h, const double t, const char desc[], + const double ystart[], const double yfin[], + const double relerr) +{ + /* tests stepper T with one fixed length step advance of system sys + and compares with given values yfin + */ + + double y[MAXEQ] = {0.0}; + double yerr[MAXEQ] = {0.0}; + size_t ne = sys->dimension; + size_t i; + + gsl_odeiv_step *step = gsl_odeiv_step_alloc (T, ne); + + DBL_MEMCPY (y, ystart, MAXEQ); + + { + int s = gsl_odeiv_step_apply (step, t, h, y, yerr, 0, 0, sys); + if (s != GSL_SUCCESS) + { + gsl_test(s, "test_odeiv_stepper: %s step_apply returned %d", desc, s); + } + } + + for (i = 0; i < ne; i++) + { + gsl_test_rel (y[i], yfin[i], relerr, + "%s %s step(%d)", + gsl_odeiv_step_name (step), desc,i); + } + + gsl_odeiv_step_free (step); +} + +void +test_stepper (const gsl_odeiv_step_type *T) +{ + /* Tests stepper T with a step of selected systems */ + + double y[MAXEQ] = {0.0}; + double yfin[MAXEQ] = {0.0}; + + /* Step length */ + double h; + + /* Required tolerance */ + double err_target; + + /* linear */ + h = 1e-1; + err_target = 1e-10; + y[0] = 0.58; + yfin[0] = y[0] + 2 * h; + test_odeiv_stepper (T, &rhs_func_lin, h, 0.0, "linear", + y, yfin, err_target); + + /* exponential */ + h = 1e-4; + err_target = 1e-8; + y[0] = exp(2.7); + yfin[0] = exp(2.7 + h); + test_odeiv_stepper (T, &rhs_func_exp, h, 2.7, "exponential", + y, yfin, err_target); + /* cosine-sine */ + h = 1e-3; + err_target = 1e-6; + y[0] = cos(1.2); + y[1] = sin(1.2); + yfin[0] = cos(1.2 + h); + yfin[1] = sin(1.2 + h); + test_odeiv_stepper (T, &rhs_func_sin, h, 1.2, "cosine-sine", + y, yfin, err_target); + + /* classic stiff */ + h = 1e-7; + err_target = 1e-4; + y[0] = 1.0; + y[1] = 0.0; + + { + const double e1 = exp (-h); + const double e2 = exp (-1000.0 * h); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + + test_odeiv_stepper (T, &rhs_func_stiff, h, 0.0, "classic_stiff", + y, yfin, err_target); +} + +void +test_evolve_system (const gsl_odeiv_step_type * T, + const gsl_odeiv_system * sys, + double t0, double t1, double hstart, + double y[], double yfin[], + double err_target, const char *desc) +{ + /* Tests system sys with stepper T. Step length is controlled by + error estimation from the stepper. + */ + + int steps = 0; + size_t i; + + double t = t0; + double h = hstart; + + /* Tolerance factor in testing errors */ + const double factor = 10; + + gsl_odeiv_step * step = gsl_odeiv_step_alloc (T, sys->dimension); + + gsl_odeiv_control *c = + gsl_odeiv_control_standard_new (err_target, err_target, 1.0, 0.0); + + gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); + + double * y_orig = malloc (sys->dimension * sizeof(double)); + + while (t < t1) + { + double t_orig = t; + int s; + memcpy (y_orig, y, sys->dimension * sizeof(double)); + s= gsl_odeiv_evolve_apply (e, c, step, sys, &t, t1, &h, y); + + if (s != GSL_SUCCESS) + { + /* check that t and y are unchanged */ + gsl_test_abs(t, t_orig, 0.0, "%s, t must be restored on failure", + gsl_odeiv_step_name (step)); + + for (i = 0; i < sys->dimension; i++) + { + gsl_test_abs (y[i], y_orig[i], 0.0, + "%s, y must be restored on failure", + gsl_odeiv_step_name (step), desc, i); + } + + if (sys != &rhs_func_xsin) { + /* apart from xsin, other functions should not return errors */ + gsl_test(s, "%s evolve_apply returned %d", + gsl_odeiv_step_name (step), s); + break; + } + } + + if (steps > 100000) + { + gsl_test(GSL_EFAILED, + "%s evolve_apply reached maxiter", + gsl_odeiv_step_name (step)); + break; + } + + steps++; + } + + /* err_target is target error of one step. Test if stepper has made + larger error than (tolerance factor times) the number of steps + times the err_target */ + + for (i = 0; i < sys->dimension; i++) + { + gsl_test_abs (y[i], yfin[i], factor * e->count * err_target, + "%s %s evolve(%d)", + gsl_odeiv_step_name (step), desc, i); + } + + free (y_orig); + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (step); +} + +int +sys_driver (const gsl_odeiv_step_type * T, + const gsl_odeiv_system * sys, + double t0, double t1, double hstart, + double y[], double epsabs, double epsrel, + const char desc[]) +{ + /* This function evolves a system sys with stepper T from t0 to t1. + Step length is varied via error control with possibly different + absolute and relative error tolerances. + */ + + int s = 0; + int steps = 0; + + double t = t0; + double h = hstart; + + gsl_odeiv_step * step = gsl_odeiv_step_alloc (T, sys->dimension); + + gsl_odeiv_control *c = + gsl_odeiv_control_standard_new (epsabs, epsrel, 1.0, 0.0); + gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc (sys->dimension); + + while (t < t1) + { + s = gsl_odeiv_evolve_apply (e, c, step, sys, &t, t1, &h, y); + + if (s != GSL_SUCCESS) + { + gsl_test(s, "sys_driver: %s evolve_apply returned %d", + gsl_odeiv_step_name (step), s); + break; + } + + if (steps > 1e7) + { + gsl_test(GSL_EMAXITER, + "sys_driver: %s evolve_apply reached maxiter at t=%g", + gsl_odeiv_step_name (step), t); + s = GSL_EMAXITER; + break; + } + + steps++; + } + + gsl_test(s, "%s %s [%g,%g], %d steps completed", + gsl_odeiv_step_name (step), desc, t0, t1, steps); + + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (step); + + return s; +} + +void +test_compare_vanderpol (void) +{ + /* Compares output of van Der Pol oscillator with several steppers */ + + /* system dimension */ + const size_t sd = 2; + + const gsl_odeiv_step_type *steppers[20]; + const gsl_odeiv_step_type **T; + + /* Required error tolerance for each stepper. */ + double err_target[20]; + + /* number of ODE solvers */ + const size_t ns = 11; + + /* initial values for each ode-solver */ + double y[11][2]; + double *yp = &y[0][0]; + + size_t i, j, k; + int status = 0; + + /* Parameters for the problem and stepper */ + const double start = 0.0; + const double end = 100.0; + const double epsabs = 1e-8; + const double epsrel = 1e-8; + const double initstepsize = 1e-5; + + /* Initialize */ + + steppers[0] = gsl_odeiv_step_rk2; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv_step_rk4; + err_target[1] = 1e-6; + steppers[2] = gsl_odeiv_step_rkf45; + err_target[2] = 1e-6; + steppers[3] = gsl_odeiv_step_rkck; + err_target[3] = 1e-6; + steppers[4] = gsl_odeiv_step_rk8pd; + err_target[4] = 1e-6; + steppers[5] = gsl_odeiv_step_rk2imp; + err_target[5] = 1e-5; + steppers[6] = gsl_odeiv_step_rk2simp; + err_target[6] = 1e-5; + steppers[7] = gsl_odeiv_step_rk4imp; + err_target[7] = 1e-6; + steppers[8] = gsl_odeiv_step_bsimp; + err_target[8] = 1e-7; + steppers[9] = gsl_odeiv_step_gear1; + err_target[9] = 1e-2; + steppers[10] = gsl_odeiv_step_gear2; + err_target[10] = 1e-6; + steppers[11] = 0; + + T = steppers; + + for (i = 0; i < ns; i++) + { + y[i][0] = 1.0; + y[i][1] = 0.0; + } + + /* Call each solver for the problem */ + + i = 0; + while (*T != 0) + { + { + int s = sys_driver (*T, &rhs_func_vanderpol, + start, end, initstepsize, &yp[i], + epsabs, epsrel, "vanderpol"); + if (s != GSL_SUCCESS) + { + status++; + } + } + + T++; + i += sd; + } + + if (status != GSL_SUCCESS) + { + return; + } + + /* Compare results */ + + T = steppers; + + for (i = 0; i < ns; i++) + for (j = i+1; j < ns; j++) + for (k = 0; k < sd; k++) + { + const double val1 = yp[sd * i + k]; + const double val2 = yp[sd * j + k]; + gsl_test_abs (val1, val2, + ( GSL_MAX(err_target[i], err_target[j]) ), + "%s/%s vanderpol", + T[i]->name, T[j]->name); + } + +} + +void +test_compare_oregonator (void) +{ + /* Compares output of the Oregonator with several steppers */ + + /* system dimension */ + const size_t sd = 3; + + const gsl_odeiv_step_type *steppers[20]; + const gsl_odeiv_step_type **T; + + /* Required error tolerance for each stepper. */ + double err_target[20]; + + /* number of ODE solvers */ + const size_t ns = 2; + + /* initial values for each ode-solver */ + double y[2][3]; + double *yp = &y[0][0]; + + size_t i, j, k; + int status = 0; + + /* Parameters for the problem and stepper */ + const double start = 0.0; + const double end = 360.0; + const double epsabs = 1e-8; + const double epsrel = 1e-8; + const double initstepsize = 1e-5; + + /* Initialize */ + + steppers[0] = gsl_odeiv_step_rk2simp; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv_step_bsimp; + err_target[1] = 1e-6; + steppers[2] = 0; + + T = steppers; + + for (i = 0; i < ns; i++) + { + y[i][0] = 1.0; + y[i][1] = 2.0; + y[i][2] = 3.0; + } + + /* Call each solver for the problem */ + + i = 0; + while (*T != 0) + { + { + int s = sys_driver (*T, &rhs_func_oregonator, + start, end, initstepsize, &yp[i], + epsabs, epsrel, "oregonator"); + + if (s != GSL_SUCCESS) + { + status++; + } + } + + T++; + i += sd; + } + + if (status != GSL_SUCCESS) + { + return; + } + + /* Compare results */ + + T = steppers; + + for (i = 0; i < ns; i++) + for (j = i+1; j < ns; j++) + for (k = 0; k < sd; k++) + { + const double val1 = yp[sd * i + k]; + const double val2 = yp[sd * j + k]; + gsl_test_rel (val1, val2, + ( GSL_MAX(err_target[i], err_target[j]) ), + "%s/%s oregonator", + T[i]->name, T[j]->name); + } + +} + +void +test_evolve_linear (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = 9.0; + test_evolve_system (T, &rhs_func_lin, 0.0, 4.0, h, y, yfin, err, + "linear[0,4]"); +} + +void +test_evolve_exp (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = exp (2.0); + test_evolve_system (T, &rhs_func_exp, 0.0, 2.0, h, y, yfin, err, + "exp[0,2]"); +} + +void +test_evolve_sin (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + yfin[0] = cos (2.0); + yfin[1] = sin (2.0); + test_evolve_system (T, &rhs_func_sin, 0.0, 2.0, h, y, yfin, err, + "sine[0,2]"); +} + +void +test_evolve_xsin (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[2]; + double yfin[2]; + y[0] = 1.0; + y[1] = 0.0; + yfin[0] = cos (2.0); + yfin[1] = sin (2.0); + rhs_xsin_reset = 1; + jac_xsin_reset = 1; + test_evolve_system (T, &rhs_func_xsin, 0.0, 2.0, h, y, yfin, err, + "sine[0,2] w/errors"); +} + + +void +test_evolve_stiff1 (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + { + double arg = 1.0; + double e1 = exp (-arg); + double e2 = exp (-1000.0 * arg); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + test_evolve_system (T, &rhs_func_stiff, 0.0, 1.0, h, y, yfin, err, + "stiff[0,1]"); +} + +void +test_evolve_stiff5 (const gsl_odeiv_step_type * T, double h, double err) +{ + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + { + double arg = 5.0; + double e1 = exp (-arg); + double e2 = exp (-1000.0 * arg); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + test_evolve_system (T, &rhs_func_stiff, 0.0, 5.0, h, y, yfin, err, + "stiff[0,5]"); +} + +/* Test cases from Frank Reininghaus */ + +int rhs_stepfn (double t, const double * y, double * dydt, void * params) { + if (t >= 1.0) + dydt [0] = 1; + else + dydt [0] = 0; + + return GSL_SUCCESS; +} + +void test_stepfn (void) { + /* infinite loop for epsabs = 1e-18, but not for 1e-17 */ + double epsabs = 1e-18; + double epsrel = 1e-6; + + const gsl_odeiv_step_type * T = gsl_odeiv_step_rk2; + gsl_odeiv_step * s = gsl_odeiv_step_alloc (T, 1); + gsl_odeiv_control * c = gsl_odeiv_control_y_new (epsabs, epsrel); + gsl_odeiv_evolve * e = gsl_odeiv_evolve_alloc (1); + gsl_odeiv_system sys = {rhs_stepfn, 0, 1, 0}; + + double t = 0.0; + double h = 1e-6; + double y = 0.0; + int i = 0; + int status; + + while (t < 2.0 && i < 1000000) { + status = gsl_odeiv_evolve_apply (e, c, s, &sys, &t, 2, &h, &y); +#ifdef DEBUG + printf("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); +#endif + if (status != GSL_SUCCESS) + break; + + i++; + } + + gsl_test_abs(t, 2.0, 1e-16, "evolve step function, t (stepfn/rk2)"); + gsl_test_rel(y, 1.0, epsrel, "evolve step function, y (stepfn/rk2)"); + + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (s); +} + +int rhs_stepfn2 (double t, const double * y, double * dydt, void * params) { + if (t >= 0.0) + dydt [0] = 1e300; + else + dydt [0] = 0; + + return GSL_SUCCESS; +} + +void test_stepfn2 (void) { + /* infinite loop for epsabs = 1e-25, but not for 1e-24 */ + double epsabs = 1e-25; + double epsrel = 1e-6; + + const gsl_odeiv_step_type * T = gsl_odeiv_step_rk2; + gsl_odeiv_step * s = gsl_odeiv_step_alloc (T, 1); + gsl_odeiv_control * c = gsl_odeiv_control_y_new (epsabs, epsrel); + gsl_odeiv_evolve * e = gsl_odeiv_evolve_alloc (1); + gsl_odeiv_system sys = {rhs_stepfn2, 0, 1, 0}; + + double t = -1.0; + double h = 1e-6; + double y = 0.0; + + int i = 0; + int status; + + while (t < 1.0 && i < 10000) { + status = gsl_odeiv_evolve_apply (e, c, s, &sys, &t, 1.0, &h, &y); +#ifdef DEBUG + printf("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); +#endif + if (status != GSL_SUCCESS) + break; + + i++; + } + + gsl_test_abs(t, 1.0, 1e-16, "evolve big step function, t (stepfn2/rk2)"); + gsl_test_rel(y, 1e300, epsrel, "evolve big step function, y (stepfn2/rk2)"); + + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (s); +} + +int rhs_stepfn3 (double t, const double * y, double * dydt, void * params) { + + static int calls = 0; + + if (t >= 0.0) + dydt [0] = 1e300; + else + dydt [0] = 0; + + calls++; + + return (calls < 100000) ? GSL_SUCCESS : -999; +} + + +void test_stepfn3 (void) { + /* infinite loop for epsabs = 1e-26, but not for 1e-25 */ + double epsabs = 1e-26; + double epsrel = 1e-6; + + const gsl_odeiv_step_type * T = gsl_odeiv_step_rkf45; + gsl_odeiv_step * s = gsl_odeiv_step_alloc (T, 1); + gsl_odeiv_control * c = gsl_odeiv_control_y_new (epsabs, epsrel); + gsl_odeiv_evolve * e = gsl_odeiv_evolve_alloc (1); + gsl_odeiv_system sys = {rhs_stepfn3, 0, 1, 0}; + + double t = -1.0; + double h = 1e-6; + double y = 0.0; + + int i = 0; + int status; + + while (t < 1.0 && i < 10000) { + status = gsl_odeiv_evolve_apply (e, c, s, &sys, &t, 1.0, &h, &y); +#ifdef DEBUG + printf("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); +#endif + if (status != GSL_SUCCESS) + break; + + i++; + } + + gsl_test_abs(t, 1.0, 1e-16, "evolve big step function, t (stepfn3/rkf45)"); + gsl_test_rel(y, 1e300, epsrel, "evolve big step function, y (stepfn3/rkf45)"); + + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (s); +} + +int rhs_cos (double t, const double * y, double * dydt, void * params) { + dydt [0] = cos (t); + return GSL_SUCCESS; +} + +int jac_cos (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 0.0; + dfdt[0] = -sin(t); + + return GSL_SUCCESS; +} + +/* Test evolution in negative direction */ + +void +test_evolve_negative_h (const gsl_odeiv_step_type * T, double h, double err) +{ + /* Tolerance factor in testing errors */ + const double factor = 10; + + gsl_odeiv_step * step = gsl_odeiv_step_alloc (T, 1); + gsl_odeiv_control * c = gsl_odeiv_control_standard_new (err, err, 1.0, 0.0); + gsl_odeiv_evolve * e = gsl_odeiv_evolve_alloc (1); + gsl_odeiv_system sys = {rhs_cos, jac_cos, 1, 0}; + + double t = 0; + double t1 = -4.0; + + double y = 0.0; + double yfin = sin (t1); + + /* Make initial h negative */ + h = -fabs(h); + + while (t > t1) { + int status = gsl_odeiv_evolve_apply (e, c, step, &sys, &t, t1, &h, &y); + + if (status != GSL_SUCCESS) + { + gsl_test(status, "%s evolve_apply returned %d for negative h", + gsl_odeiv_step_name (step), status); + break; + } + } + + gsl_test_abs (y, yfin, factor * e->count * err, + "evolution with negative h (using %s)", + gsl_odeiv_step_name (step)); + + gsl_odeiv_evolve_free (e); + gsl_odeiv_control_free (c); + gsl_odeiv_step_free (step); +} + +int +main (void) +{ + int i; + + struct ptype + { + const gsl_odeiv_step_type *type; + double h; + } + p[20]; + + p[0].type = gsl_odeiv_step_rk2; + p[0].h = 1.0e-3; + p[1].type = gsl_odeiv_step_rk4; + p[1].h = 1.0e-3; + p[2].type = gsl_odeiv_step_rkf45; + p[2].h = 1.0e-3; + p[3].type = gsl_odeiv_step_rkck; + p[3].h = 1.0e-3; + p[4].type = gsl_odeiv_step_rk8pd; + p[4].h = 1.0e-3; + p[5].type = gsl_odeiv_step_rk2imp; + p[5].h = 1.0e-3; + p[6].type = gsl_odeiv_step_rk2simp; + p[6].h = 1.0e-3; + p[7].type = gsl_odeiv_step_rk4imp; + p[7].h = 1.0e-3; + p[8].type = gsl_odeiv_step_bsimp; + p[8].h = 1.0e-3; + p[9].type = gsl_odeiv_step_gear1; + p[9].h = 1.0e-3; + p[10].type = gsl_odeiv_step_gear2; + p[10].h = 1.0e-3; + p[11].type = 0; + + gsl_ieee_env_setup (); + + for (i = 0; p[i].type != 0; i++) + { + test_stepper(p[i].type); + } + + for (i = 0; p[i].type != 0; i++) + { + test_evolve_linear (p[i].type, p[i].h, 1e-10); + test_evolve_exp (p[i].type, p[i].h, 1e-6); + test_evolve_sin (p[i].type, p[i].h, 1e-8); + test_evolve_xsin (p[i].type, p[i].h, 1e-8); + test_evolve_xsin (p[i].type, 0.1, 1e-8); /* test with large step size */ + test_evolve_stiff1 (p[i].type, p[i].h, 1e-7); + test_evolve_stiff5 (p[i].type, p[i].h, 1e-7); + test_evolve_negative_h (p[i].type, p[i].h, 1e-7); + } + + test_compare_vanderpol(); + test_compare_oregonator(); + + test_stepfn(); + test_stepfn2(); + test_stepfn3(); + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/ode-initval2/.deps/bsimp.Plo b/software/gsl-1.15/ode-initval2/.deps/bsimp.Plo new file mode 100644 index 000000000..16d196536 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/bsimp.Plo @@ -0,0 +1,267 @@ +bsimp.lo: bsimp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/control.Plo b/software/gsl-1.15/ode-initval2/.deps/control.Plo new file mode 100644 index 000000000..baa1dc2a3 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/control.Plo @@ -0,0 +1,131 @@ +control.lo: control.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/cscal.Plo b/software/gsl-1.15/ode-initval2/.deps/cscal.Plo new file mode 100644 index 000000000..d8eac17da --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/cscal.Plo @@ -0,0 +1,141 @@ +cscal.lo: cscal.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_odeiv2.h control_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_odeiv2.h: + +control_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/cstd.Plo b/software/gsl-1.15/ode-initval2/.deps/cstd.Plo new file mode 100644 index 000000000..98fce4d03 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/cstd.Plo @@ -0,0 +1,133 @@ +cstd.lo: cstd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_odeiv2.h control_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_odeiv2.h: + +control_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/driver.Plo b/software/gsl-1.15/ode-initval2/.deps/driver.Plo new file mode 100644 index 000000000..230e4e09a --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/driver.Plo @@ -0,0 +1,114 @@ +driver.lo: driver.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/evolve.Plo b/software/gsl-1.15/ode-initval2/.deps/evolve.Plo new file mode 100644 index 000000000..0b0f21403 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/evolve.Plo @@ -0,0 +1,141 @@ +evolve.lo: evolve.c ../config.h /usr/include/string.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h odeiv_util.h + +../config.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/msadams.Plo b/software/gsl-1.15/ode-initval2/.deps/msadams.Plo new file mode 100644 index 000000000..0cfeb415a --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/msadams.Plo @@ -0,0 +1,268 @@ +msadams.lo: msadams.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h ../gsl/gsl_blas.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/msbdf.Plo b/software/gsl-1.15/ode-initval2/.deps/msbdf.Plo new file mode 100644 index 000000000..eec968565 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/msbdf.Plo @@ -0,0 +1,275 @@ +msbdf.lo: msbdf.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h ../gsl/gsl_blas.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk1imp.Plo b/software/gsl-1.15/ode-initval2/.deps/rk1imp.Plo new file mode 100644 index 000000000..83a97bbd9 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk1imp.Plo @@ -0,0 +1,279 @@ +rk1imp.lo: rk1imp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h odeiv_util.h rksubs.c \ + modnewton1.c ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +rksubs.c: + +modnewton1.c: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk2.Plo b/software/gsl-1.15/ode-initval2/.deps/rk2.Plo new file mode 100644 index 000000000..02656e154 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk2.Plo @@ -0,0 +1,104 @@ +rk2.lo: rk2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk2imp.Plo b/software/gsl-1.15/ode-initval2/.deps/rk2imp.Plo new file mode 100644 index 000000000..6287b6819 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk2imp.Plo @@ -0,0 +1,279 @@ +rk2imp.lo: rk2imp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h odeiv_util.h rksubs.c \ + modnewton1.c ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +rksubs.c: + +modnewton1.c: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk4.Plo b/software/gsl-1.15/ode-initval2/.deps/rk4.Plo new file mode 100644 index 000000000..453d6fc96 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk4.Plo @@ -0,0 +1,104 @@ +rk4.lo: rk4.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk4imp.Plo b/software/gsl-1.15/ode-initval2/.deps/rk4imp.Plo new file mode 100644 index 000000000..08904efdb --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk4imp.Plo @@ -0,0 +1,279 @@ +rk4imp.lo: rk4imp.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_odeiv2.h odeiv_util.h rksubs.c \ + modnewton1.c ../gsl/gsl_linalg.h ../gsl/gsl_mode.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas.h ../gsl/gsl_blas_types.h \ + ../gsl/gsl_cblas.h /usr/bin/../lib/clang/4.1/include/stddef.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +rksubs.c: + +modnewton1.c: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/rk8pd.Plo b/software/gsl-1.15/ode-initval2/.deps/rk8pd.Plo new file mode 100644 index 000000000..50387ffc0 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rk8pd.Plo @@ -0,0 +1,104 @@ +rk8pd.lo: rk8pd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/rkck.Plo b/software/gsl-1.15/ode-initval2/.deps/rkck.Plo new file mode 100644 index 000000000..c7618f14b --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rkck.Plo @@ -0,0 +1,104 @@ +rkck.lo: rkck.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/rkf45.Plo b/software/gsl-1.15/ode-initval2/.deps/rkf45.Plo new file mode 100644 index 000000000..5e6fd2284 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/rkf45.Plo @@ -0,0 +1,104 @@ +rkf45.lo: rkf45.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_odeiv2.h odeiv_util.h step_utils.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: + +step_utils.c: diff --git a/software/gsl-1.15/ode-initval2/.deps/step.Plo b/software/gsl-1.15/ode-initval2/.deps/step.Plo new file mode 100644 index 000000000..9b1ad07ea --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/step.Plo @@ -0,0 +1,92 @@ +step.lo: step.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_odeiv2.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_odeiv2.h: diff --git a/software/gsl-1.15/ode-initval2/.deps/test.Po b/software/gsl-1.15/ode-initval2/.deps/test.Po new file mode 100644 index 000000000..51ea3d37d --- /dev/null +++ b/software/gsl-1.15/ode-initval2/.deps/test.Po @@ -0,0 +1,269 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + /usr/include/math.h ../gsl/gsl_test.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_vector_complex_double.h \ + ../gsl/gsl_vector_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_matrix_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_matrix_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_matrix_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_matrix_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_linalg.h \ + ../gsl/gsl_mode.h ../gsl/gsl_permutation.h ../gsl/gsl_vector.h \ + ../gsl/gsl_ieee_utils.h ../gsl/gsl_odeiv2.h odeiv_util.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/math.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_linalg.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_odeiv2.h: + +odeiv_util.h: diff --git a/software/gsl-1.15/ode-initval2/ChangeLog b/software/gsl-1.15/ode-initval2/ChangeLog new file mode 100644 index 000000000..89398d71c --- /dev/null +++ b/software/gsl-1.15/ode-initval2/ChangeLog @@ -0,0 +1,265 @@ +2011-05-02 Brian Gough + + * gsl_odeiv2.h: fix header guard to __GSL_ODEIV2_H__ + +2011-05-01 Tuomo Keskitalo + + * Replaced ChangeLog with contents of ode-initval2 development log + file (ChangeLog-odeiv2_development) and reformatted the log file. + +2010-10-16 Tuomo Keskitalo + + * Modified evolve and driver so that when user function returns + GSL_EBADFUNC, then ode-initval2 functions return immediately with + that same return value. + + * Corrected bug in msadams for saving ordm1coeff to state. Thanks + to Andrew Benson for pointing out this bug! + +2010-10-10 Tuomo Keskitalo + + * driver.c: Corrected error in driver_evolve_apply, integration to + negative direction should work now. + + * Added evolve_apply_fixed_step and driver_apply_fixed_step for + users who want to use a constant step size to evolve the system. + + * test.c: added test cases for driver (negative evolution, + apply_fixed_step). + + * gsl_odeiv2.h: cleaning and add apply_fixed_step functions. + + * doc/ode-initval.texi: Replaced derivative apostrophe with \prime + (because my new system fails to make ps otherwise). Added new + documentation about apply_fixed_step functions. + +2010-10-09 Tuomo Keskitalo + + * ode-initval2 bzr development branch now at savannah: + http://bzr.savannah.gnu.org/r/gsl/ode-initval2/ + +2010-01-02 Tuomo Keskitalo + + * Changes from ode-initval2-0.9 to ode-initval2-1.0: + + * Removed set_control member from step object and added a + set_driver member to evolve, control and step objects, so that the + driver object and consequently evolve, control and step objects + are all accessible from another. Currently only some steppers + utilize this. They access the control_errlevel function via + state->driver->c instead of state->control. This modification to + the framework enables implementation of more efficient ODE + solvers, which utilize communication among evolve, control and + stepper objects. This also means that some steppers now require a + driver object, and it is best to use those stepper methods through + driver object functions. + + * cstd.c and cscal.c: Added a sanity check for errlev <= 0 + + * run indent -gnu -nut for *.c *.h + + * driver.c: added function odeiv2_driver_alloc_standard_new and + odeiv2_driver_alloc_yp_new + + * driver.c: changed n and nmax in driver struct to unsigned long + int + + * modified documentation accordingly with small nomenclature + changes and made year updates to source files + +2009-11-01 Tuomo Keskitalo + + * Merged with master and modified source to be published as a + package for gsl-1.13. + +2009-05-09 Tuomo Keskitalo + + * Agreed with Brian Gough that the modification I've made cannot + be incorporated to GSL until a major version number change, due to + changes in API. + + * Replated rk2imp with imprk2 and rk4imp with imprk4. Also renamed + impeuler to rk1imp for consistency. + + * Deleted steppers that are deprecated considering new major + release: gear1, gear2, and rk2simp. Modified test.c accordingly. + +2009-05-01 Tuomo Keskitalo + + * Merged with master (evolve.c and test.c needed some manual + work). + + * driver.c: Modified alloc-functions to minimal interface, added + set_hmax, set_nmax and set_hmin functions. + + * test.c: Added test for minimum allowed step size. + Applied indent -gnu -nut. + + * doc/ode-initval.texi: Updated documentation, added Driver + section, updated examples. + +2009-04-05 Tuomo Keskitalo + + * Several uninitialized variable corrections from Brian Gough + added + + * modnewton1, impeuler, imprk2, imprk4: removed unneeded arguments + from solve and init + + * msadams and msbdf modifications: + + * added ordprevbackup, ordwaitbackup (backups) and failcount (to + detect repeated steps rejections). + + * added checks to make sure order is not changed by more than one + order. Added sanity check to catch it. + + * corrected failure and rejection handling for first step + + * Added a heuristic stability enhancement for msbdf. This is yet + to be tested in practice. + + * test.c: Added more benchmark test cases. The results seem + sensible. + + * test.c: Note for benchmark_precision: msbdf performs badly in + rhs_func_exp. Newton iteration starts to fail to converge at some + point, and this forces very small step sizes to be used. I + currently think that this is not a bug, but that msbdf is just not + suitable for this problem. I think that msbdf's prediction step + does not give a good initial guess for Newton iteration in this + case. + + * I tried to increase max_iter in msbdf from 3 to 7 (value used in + modnewton1), and as a result, the performance was better for this + case (Newton iteration convergence was better). However, I would + not increase max_iter, because the default value of 3 is the value + used by the authors in the references, and because it would + decrease the efficiency of msbdf (method would use more function + evaluations per step, and convergence might still not be + achieved). It is best to useanother stepper in this kind of a + case. + +2009-02-28 Tuomo Keskitalo + + * new stepper: msbdf. This is a variable-coefficient linear + multistep backward differentiation formula (BDF) method in + Nordsieck form. It appears to handle stiff cases well and it is + efficient! + + * test.c: Ordered functions in file. Added extreme test case. + + * modnewton1: Convergence test now takes the desired error level + via control object into account. Modified steppers that use + modnewton1 accordingly. + + * modnewton1: Removed reuse_decomp. The variable was useless since + iteration matrix is reconstructed at each stepper call. + + * modnewton1: Dropped max_iter from 10 to 7. Hairer and Wanner + suggests a "relatively high number", but many iterations per step + is costly. + + * steppers that use step doubling for error estimates: Introduced + constant GSL_ODEIV_ERR_SAFETY in gsl_odeiv.h that is used to + multiply the error estimates (yerr). This way user can modify this + coefficient in one place if a change is wanted. + + * driver.c: This is a high level wrapper for ode-initval, which + was wished for in TODO. Added test_driver to test.c to test it. Is + this functionality enough? + + * ode-initval.texi: Added documentation for new steppers. Moved + note about user error codes to system definition. + + * Some finetuning / code cleanup. + +2009-01-21 Tuomo Keskitalo + + * New explicit stepper: msadams (An explicit variable-coefficient + linear multistep Adams method in Nordsieck form). Functional + iteration is used to solve the non-linear equation system. The + algorithms described in the references (see msadams.c) have been + adapted to fit GSL odeiv framework. Currently this is beta, but + the stepper now passes the odeiv test suite. + + * control.c, cstd.c, cscal.c: Added errlev function which + calculates desired error level. This is used in masadams (and can + be used in imp* steppers, too) to control accuracy of functional + iteration. User must call gsl_odeiv_step_set_control after + allocating step and control objects to pass the information about + control object to stepper. This change (or something similar) is + needed to pass tolerance for the stepper routines that need + it. Modified stepper routines accordingly. + + * evolve.c: Changed the step length scaling coefficient for + stepper failure from 0.1 to 0.5, because msadams seems to cope + much better with this change in stiff[0,1] test case. + + * gsl_odeiv.h: gsl_odeiv_control and control_type introduced + earlier because gsl_odeiv_step_type now refers to it. + +2008-11-01 Tuomo Keskitalo + + * New implicit solvers: imprk4 (replaces imprk42 in previous test + package), imprk2 (replaces imprk21 in previous test package) and + impeuler, which use modified Newton iteration to solve the + implicit equations. I decided to dump imprk42 and imprk21 because + I was unsure how to calculate the error estimates for them. I + think that these new implicit methods could be used instead of + rk4imp, rk2imp, gear2 and gear1, which use functional + iteration (which is inefficient for stiff problems.) However, even + these new solvers can not be used efficiently for truly nasty + stiff problems, and better solvers are still needed. + + * modnewton1.c: a modified Newton solver for solution of + non-linear equations of implicit solvers. Jacobian evaluation has + been moved from modnewton1 to imprk2, imprk4 and impeuler. + + * evolve.c: modification to decrease step size if stepper fails, + instead of giving up immediately. + + * evolve.c: A bug fix: Exit with GSL_FAILURE if step size reaches + machine precision instead of continuing with old step size. + + * test.c: added Robertson stiff test + + * test.c: embedded test_oregonator to test_compare_stiff_probelms + to test several stiff problems. Note: the tested integration + interval is rather short due to inefficiency of solvers other than + bsimp in these problems. + + * test.c: modified test_compare_vanderpol and + test_compare_stiff_problems to check against results from first + ode-solver. Changed rk4 or bsimp to first place. + + * test.c: modified stepfn and stepfn2 and expanded these to be + tested with all explicit solvers + + * test.c: removed stepfn3 and added test_broken and + test_stepsize_fail to check that evolve decreases step size below + machine precision and exits with a failure code in the end if user + functions fail continuously. + + * Changes in ode-initval.texi: + + * removed untrue sentence concerning stepping functions: "The + step-size @var{h} will be set to the step-size which caused the + error." + + * Changed gsl_odeiv_system variable name from dydt to sys for + clarity + + * added "explicit" or "implicit" to stepper introductions for + clarity + + * reformulated description of evolve_apply and step_apply and made + changes to reflect the modifications to the code. + + * clarified the point on integrating over discontinuities. It is + best to integrate in sequences. + + * removed the text suggesting the user to force a step size to + integrate over the edge of a discontinuity. The applicability of + this kind of a numerical tweak depends on the case, and should in + my opinion not to be included in a reference book. diff --git a/software/gsl-1.15/ode-initval2/Makefile.am b/software/gsl-1.15/ode-initval2/Makefile.am new file mode 100644 index 000000000..4e18ba135 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libgslodeiv2.la + +pkginclude_HEADERS = gsl_odeiv2.h + +INCLUDES = -I$(top_srcdir) + +libgslodeiv2_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c rk1imp.c msadams.c msbdf.c driver.c + +noinst_HEADERS = odeiv_util.h step_utils.c rksubs.c modnewton1.c control_utils.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslodeiv2.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + diff --git a/software/gsl-1.15/ode-initval2/Makefile.in b/software/gsl-1.15/ode-initval2/Makefile.in new file mode 100644 index 000000000..a29f48ea6 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = ode-initval2 +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslodeiv2_la_LIBADD = +am_libgslodeiv2_la_OBJECTS = control.lo cstd.lo cscal.lo evolve.lo \ + step.lo rk2.lo rk2imp.lo rk4.lo rk4imp.lo rkf45.lo rk8pd.lo \ + rkck.lo bsimp.lo rk1imp.lo msadams.lo msbdf.lo driver.lo +libgslodeiv2_la_OBJECTS = $(am_libgslodeiv2_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslodeiv2.la ../linalg/libgsllinalg.la \ + ../blas/libgslblas.la ../cblas/libgslcblas.la \ + ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslodeiv2_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslodeiv2_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslodeiv2.la +pkginclude_HEADERS = gsl_odeiv2.h +INCLUDES = -I$(top_srcdir) +libgslodeiv2_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c rk1imp.c msadams.c msbdf.c driver.c +noinst_HEADERS = odeiv_util.h step_utils.c rksubs.c modnewton1.c control_utils.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslodeiv2.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ode-initval2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ode-initval2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslodeiv2.la: $(libgslodeiv2_la_OBJECTS) $(libgslodeiv2_la_DEPENDENCIES) + $(LINK) $(libgslodeiv2_la_OBJECTS) $(libgslodeiv2_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsimp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cscal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cstd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evolve.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msadams.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msbdf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk1imp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk2imp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk4imp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rk8pd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rkck.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rkf45.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/ode-initval2/TODO b/software/gsl-1.15/ode-initval2/TODO new file mode 100644 index 000000000..5de515efe --- /dev/null +++ b/software/gsl-1.15/ode-initval2/TODO @@ -0,0 +1,65 @@ +* Implement other stepping methods from well-known packages such as +RKSUITE, DASSL, etc + +* The entry below has been downgraded from a bug. We use the +coefficients given in the original paper by Prince and Dormand, and it +is true that these are inexact (the values in the paper are said to be +accurate 18 figures). If somebody publishes exact versions we will +use them, but at present it is better to stick with the published +versions of the coefficients them use our own. +---------------------------------------------------------------------- +BUG#8 -- inexact coefficients in rk8pd.c + +From: Luc Maisonobe +To: gsl-discuss@sources.redhat.com +Subject: further thoughts about Dormand-Prince 8 (RK8PD) +Date: Wed, 14 Aug 2002 10:50:49 +0200 + +I was looking for some references concerning Runge-Kutta methods when I +noticed GSL had an high order one. I also found a question in the list +archive (April 2002) about the references of this method which is +implemented in rk8pd.c. It was said the coefficients were taken from the +"Numerical Algorithms with C" book by Engeln-Mullges and Uhlig. + +I have checked the coefficients somewhat with a little java tool I have +developped (see http://www.spaceroots.org/archive.htm#RKCheckSoftware) +and found they were not exact. I think this method is really the method +that is already in rksuite (http://www.netlib.org/ode/rksuite/) were the +coefficients are given as real values with 30 decimal digits. The +coefficients have probably been approximated as fractions later on. +However, these approximations are not perfect, they are good only for +the first 16 or 18 digits depending on the coefficient. + +This has no consequence for practical purposes since they are stored in +double variables, but give a false impression of beeing exact +expressions. Well, there are even some coefficients that should really +be rational numbers but for which wrong numerators and denominators are +given. As an example, the first and fourth elements of the b7 array are +given as 29443841.0 / 614563906.0 and 77736538.0 / 692538347, hence the +sum off all elements of the b7 array (which should theoretically be +equal to ah[5]) only approximate this. For these two coefficients, this +could have been avoided using 215595617.0 / 4500000000.0 and +202047683.0 / 1800000000.0, which also looks more coherent with the +other coefficients. + +The rksuite comments say this method is described in this paper : + + High Order Embedded Runge-Kutta Formulae + P.J. Prince and J.R. Dormand + J. Comp. Appl. Math.,7, pp. 67-75, 1981 + +It also says the method is an 8(7) method (i.e. the coefficients set +used to advance integration is order 8 and error estimation is order 7). +If I use my tool to check the order, I am forced to check the order +conditions numerically with a tolerance since I do not have an exact +expression of the coefficients. Since even if some conditions are not +mathematically met, the residuals are small and could be below the +tolerance. There are tolerance values for which such numerical test +dedeuce the method is of order 9, as is said in GSL. However, I am not +convinced, there are to few parameters for the large number of order +conditions needed at order 9. + +I would suggest to correct the coefficients in rk8pd.c (just put the +literal constants of rksuite) and to add the reference to the article. + +---------------------------------------------------------------------- diff --git a/software/gsl-1.15/ode-initval2/bsimp.c b/software/gsl-1.15/ode-initval2/bsimp.c new file mode 100644 index 000000000..474bb57ad --- /dev/null +++ b/software/gsl-1.15/ode-initval2/bsimp.c @@ -0,0 +1,571 @@ +/* ode-initval2/bsimp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Bulirsch-Stoer Implicit */ + +/* Author: G. Jungman + */ +/* Bader-Deuflhard implicit extrapolative stepper. + * [Numer. Math., 41, 373 (1983)] + */ +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +#define SEQUENCE_COUNT 8 +#define SEQUENCE_MAX 7 + +/* Bader-Deuflhard extrapolation sequence */ +static const int bd_sequence[SEQUENCE_COUNT] = + { 2, 6, 10, 14, 22, 34, 50, 70 }; + +typedef struct +{ + gsl_matrix *d; /* workspace for extrapolation */ + gsl_matrix *a_mat; /* workspace for linear system matrix */ + gsl_permutation *p_vec; /* workspace for LU permutation */ + + double x[SEQUENCE_MAX]; /* workspace for extrapolation */ + + /* state info */ + size_t k_current; + size_t k_choice; + double h_next; + double eps; + + /* workspace for extrapolation step */ + double *yp; + double *y_save; + double *yerr_save; + double *y_extrap_save; + double *y_extrap_sequence; + double *extrap_work; + double *dfdt; + double *y_temp; + double *delta_temp; + double *weight; + gsl_matrix *dfdy; + + /* workspace for the basic stepper */ + double *rhs_temp; + double *delta; + + /* order of last step */ + size_t order; +} +bsimp_state_t; + +/* Compute weighting factor */ + +static void +compute_weights (const double y[], double w[], size_t dim) +{ + size_t i; + for (i = 0; i < dim; i++) + { + double u = fabs (y[i]); + w[i] = (u > 0.0) ? u : 1.0; + } +} + +/* Calculate a choice for the "order" of the method, using the + * Deuflhard criteria. + */ + +static size_t +bsimp_deuf_kchoice (double eps, size_t dimension) +{ + const double safety_f = 0.25; + const double small_eps = safety_f * eps; + + double a_work[SEQUENCE_COUNT]; + double alpha[SEQUENCE_MAX][SEQUENCE_MAX]; + + int i, k; + + a_work[0] = bd_sequence[0] + 1.0; + + for (k = 0; k < SEQUENCE_MAX; k++) + { + a_work[k + 1] = a_work[k] + bd_sequence[k + 1]; + } + + for (i = 0; i < SEQUENCE_MAX; i++) + { + alpha[i][i] = 1.0; + for (k = 0; k < i; k++) + { + const double tmp1 = a_work[k + 1] - a_work[i + 1]; + const double tmp2 = (a_work[i + 1] - a_work[0] + 1.0) * (2 * k + 1); + alpha[k][i] = pow (small_eps, tmp1 / tmp2); + } + } + + a_work[0] += dimension; + + for (k = 0; k < SEQUENCE_MAX; k++) + { + a_work[k + 1] = a_work[k] + bd_sequence[k + 1]; + } + + for (k = 0; k < SEQUENCE_MAX - 1; k++) + { + if (a_work[k + 2] > a_work[k + 1] * alpha[k][k + 1]) + break; + } + + return k; +} + +static void +poly_extrap (gsl_matrix * d, + const double x[], + const unsigned int i_step, + const double x_i, + const double y_i[], + double y_0[], double y_0_err[], double work[], const size_t dim) +{ + size_t j, k; + + DBL_MEMCPY (y_0_err, y_i, dim); + DBL_MEMCPY (y_0, y_i, dim); + + if (i_step == 0) + { + for (j = 0; j < dim; j++) + { + gsl_matrix_set (d, 0, j, y_i[j]); + } + } + else + { + DBL_MEMCPY (work, y_i, dim); + + for (k = 0; k < i_step; k++) + { + double delta = 1.0 / (x[i_step - k - 1] - x_i); + const double f1 = delta * x_i; + const double f2 = delta * x[i_step - k - 1]; + + for (j = 0; j < dim; j++) + { + const double q_kj = gsl_matrix_get (d, k, j); + gsl_matrix_set (d, k, j, y_0_err[j]); + delta = work[j] - q_kj; + y_0_err[j] = f1 * delta; + work[j] = f2 * delta; + y_0[j] += y_0_err[j]; + } + } + + for (j = 0; j < dim; j++) + { + gsl_matrix_set (d, i_step, j, y_0_err[j]); + } + } +} + +/* Basic implicit Bulirsch-Stoer step. Divide the step h_total into + * n_step smaller steps and do the Bader-Deuflhard semi-implicit + * iteration. */ + +static int +bsimp_step_local (void *vstate, + size_t dim, + const double t0, + const double h_total, + const unsigned int n_step, + const double y[], + const double yp[], + const double dfdt[], + const gsl_matrix * dfdy, + double y_out[], const gsl_odeiv2_system * sys) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + gsl_matrix *const a_mat = state->a_mat; + gsl_permutation *const p_vec = state->p_vec; + + double *const delta = state->delta; + double *const y_temp = state->y_temp; + double *const delta_temp = state->delta_temp; + double *const rhs_temp = state->rhs_temp; + double *const w = state->weight; + + gsl_vector_view y_temp_vec = gsl_vector_view_array (y_temp, dim); + gsl_vector_view delta_temp_vec = gsl_vector_view_array (delta_temp, dim); + gsl_vector_view rhs_temp_vec = gsl_vector_view_array (rhs_temp, dim); + + const double h = h_total / n_step; + double t = t0 + h; + + double sum; + + /* This is the factor sigma referred to in equation 3.4 of the + paper. A relative change in y exceeding sigma indicates a + runaway behavior. According to the authors suitable values for + sigma are >>1. I have chosen a value of 100*dim. BJG */ + + const double max_sum = 100.0 * dim; + + int signum, status; + size_t i, j; + size_t n_inter; + + /* Calculate the matrix for the linear system. */ + for (i = 0; i < dim; i++) + { + for (j = 0; j < dim; j++) + { + gsl_matrix_set (a_mat, i, j, -h * gsl_matrix_get (dfdy, i, j)); + } + gsl_matrix_set (a_mat, i, i, gsl_matrix_get (a_mat, i, i) + 1.0); + } + + /* LU decomposition for the linear system. */ + + gsl_linalg_LU_decomp (a_mat, p_vec, &signum); + + /* Compute weighting factors */ + + compute_weights (y, w, dim); + + /* Initial step. */ + + for (i = 0; i < dim; i++) + { + y_temp[i] = h * (yp[i] + h * dfdt[i]); + } + + gsl_linalg_LU_solve (a_mat, p_vec, &y_temp_vec.vector, + &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + const double di = delta_temp[i]; + delta[i] = di; + y_temp[i] = y[i] + di; + sum += fabs (di) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED; + } + + /* Intermediate steps. */ + + status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); + + if (status) + { + return status; + } + + for (n_inter = 1; n_inter < n_step; n_inter++) + { + for (i = 0; i < dim; i++) + { + rhs_temp[i] = h * y_out[i] - delta[i]; + } + + gsl_linalg_LU_solve (a_mat, p_vec, &rhs_temp_vec.vector, + &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + delta[i] += 2.0 * delta_temp[i]; + y_temp[i] += delta[i]; + sum += fabs (delta[i]) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED; + } + + t += h; + + status = GSL_ODEIV_FN_EVAL (sys, t, y_temp, y_out); + + if (status) + { + return status; + } + } + + + /* Final step. */ + + for (i = 0; i < dim; i++) + { + rhs_temp[i] = h * y_out[i] - delta[i]; + } + + gsl_linalg_LU_solve (a_mat, p_vec, &rhs_temp_vec.vector, + &delta_temp_vec.vector); + + sum = 0.0; + + for (i = 0; i < dim; i++) + { + y_out[i] = y_temp[i] + delta_temp[i]; + sum += fabs (delta_temp[i]) / w[i]; + } + + if (sum > max_sum) + { + return GSL_EFAILED; + } + + return GSL_SUCCESS; +} + + +static void * +bsimp_alloc (size_t dim) +{ + bsimp_state_t *state = (bsimp_state_t *) malloc (sizeof (bsimp_state_t)); + + state->d = gsl_matrix_alloc (SEQUENCE_MAX, dim); + state->a_mat = gsl_matrix_alloc (dim, dim); + state->p_vec = gsl_permutation_alloc (dim); + + state->yp = (double *) malloc (dim * sizeof (double)); + state->y_save = (double *) malloc (dim * sizeof (double)); + state->yerr_save = (double *) malloc (dim * sizeof (double)); + state->y_extrap_save = (double *) malloc (dim * sizeof (double)); + state->y_extrap_sequence = (double *) malloc (dim * sizeof (double)); + state->extrap_work = (double *) malloc (dim * sizeof (double)); + state->dfdt = (double *) malloc (dim * sizeof (double)); + state->y_temp = (double *) malloc (dim * sizeof (double)); + state->delta_temp = (double *) malloc (dim * sizeof (double)); + state->weight = (double *) malloc (dim * sizeof (double)); + + state->dfdy = gsl_matrix_alloc (dim, dim); + + state->rhs_temp = (double *) malloc (dim * sizeof (double)); + state->delta = (double *) malloc (dim * sizeof (double)); + + { + size_t k_choice = bsimp_deuf_kchoice (GSL_SQRT_DBL_EPSILON, dim); /*FIXME: choice of epsilon? */ + state->k_choice = k_choice; + state->k_current = k_choice; + state->order = 2 * k_choice; + } + + state->h_next = -GSL_SQRT_DBL_MAX; + + return state; +} + +/* Perform the basic semi-implicit extrapolation + * step, of size h, at a Deuflhard determined order. + */ +static int +bsimp_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + double *const x = state->x; + double *const yp = state->yp; + double *const y_save = state->y_save; + double *const yerr_save = state->yerr_save; + double *const y_extrap_sequence = state->y_extrap_sequence; + double *const y_extrap_save = state->y_extrap_save; + double *const extrap_work = state->extrap_work; + double *const dfdt = state->dfdt; + gsl_matrix *d = state->d; + gsl_matrix *dfdy = state->dfdy; + + const double t_local = t; + size_t i, k; + + if (h + t_local == t_local) + { + return GSL_EUNDRFLW; /* FIXME: error condition */ + } + + DBL_MEMCPY (y_extrap_save, y, dim); + + /* Save inputs */ + DBL_MEMCPY (y_save, y, dim); + DBL_MEMCPY (yerr_save, yerr, dim); + + /* Evaluate the derivative. */ + if (dydt_in != NULL) + { + DBL_MEMCPY (yp, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t_local, y, yp); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Evaluate the Jacobian for the system. */ + { + int s = GSL_ODEIV_JA_EVAL (sys, t_local, y, dfdy->data, dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Make a series of refined extrapolations, + * up to the specified maximum order, which + * was calculated based on the Deuflhard + * criterion upon state initialization. */ + for (k = 0; k <= state->k_current; k++) + { + const unsigned int N = bd_sequence[k]; + const double r = (h / N); + const double x_k = r * r; + + int status = bsimp_step_local (state, + dim, t_local, h, N, + y_extrap_save, yp, + dfdt, dfdy, + y_extrap_sequence, + sys); + + if (status == GSL_EFAILED) + { + /* If the local step fails, set the error to infinity in + order to force a reduction in the step size */ + + for (i = 0; i < dim; i++) + { + yerr[i] = GSL_POSINF; + } + + break; + } + + else if (status != GSL_SUCCESS) + { + return status; + } + + x[k] = x_k; + + poly_extrap (d, x, k, x_k, y_extrap_sequence, y, yerr, extrap_work, + dim); + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + DBL_MEMCPY (y, y_save, dim); + DBL_MEMCPY (yerr, yerr_save, dim); + return s; + } + } + + return GSL_SUCCESS; +} + +static unsigned int +bsimp_order (void *vstate) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + return state->order; +} + +static int +bsimp_reset (void *vstate, size_t dim) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + state->h_next = 0; + + DBL_ZERO_MEMSET (state->yp, dim); + + return GSL_SUCCESS; +} + + +static void +bsimp_free (void *vstate) +{ + bsimp_state_t *state = (bsimp_state_t *) vstate; + + free (state->delta); + free (state->rhs_temp); + + gsl_matrix_free (state->dfdy); + + free (state->weight); + free (state->delta_temp); + free (state->y_temp); + free (state->dfdt); + free (state->extrap_work); + free (state->y_extrap_sequence); + free (state->y_extrap_save); + free (state->y_save); + free (state->yerr_save); + free (state->yp); + + gsl_permutation_free (state->p_vec); + gsl_matrix_free (state->a_mat); + gsl_matrix_free (state->d); + free (state); +} + +static const gsl_odeiv2_step_type bsimp_type = { + "bsimp", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &bsimp_alloc, + &bsimp_apply, + &stepper_set_driver_null, + &bsimp_reset, + &bsimp_order, + &bsimp_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_bsimp = &bsimp_type; diff --git a/software/gsl-1.15/ode-initval2/control.c b/software/gsl-1.15/ode-initval2/control.c new file mode 100644 index 000000000..4a09b8152 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/control.c @@ -0,0 +1,107 @@ +/* ode-initval/control.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +gsl_odeiv2_control * +gsl_odeiv2_control_alloc (const gsl_odeiv2_control_type * T) +{ + gsl_odeiv2_control *c = + (gsl_odeiv2_control *) malloc (sizeof (gsl_odeiv2_control)); + + if (c == 0) + { + GSL_ERROR_NULL ("failed to allocate space for control struct", + GSL_ENOMEM); + }; + + c->type = T; + c->state = c->type->alloc (); + + if (c->state == 0) + { + free (c); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_NULL ("failed to allocate space for control state", + GSL_ENOMEM); + }; + + return c; +} + +int +gsl_odeiv2_control_init (gsl_odeiv2_control * c, + double eps_abs, double eps_rel, + double a_y, double a_dydt) +{ + return c->type->init (c->state, eps_abs, eps_rel, a_y, a_dydt); +} + +void +gsl_odeiv2_control_free (gsl_odeiv2_control * c) +{ + RETURN_IF_NULL (c); + c->type->free (c->state); + free (c); +} + +const char * +gsl_odeiv2_control_name (const gsl_odeiv2_control * c) +{ + return c->type->name; +} + +int +gsl_odeiv2_control_hadjust (gsl_odeiv2_control * c, gsl_odeiv2_step * s, + const double y[], const double yerr[], + const double dydt[], double *h) +{ + return c->type->hadjust (c->state, s->dimension, s->type->order (s->state), + y, yerr, dydt, h); +} + +int +gsl_odeiv2_control_errlevel (gsl_odeiv2_control * c, const double y, + const double dydt, const double h, + const size_t ind, double *errlev) +{ + return c->type->errlevel (c->state, y, dydt, h, ind, errlev); +} + +int +gsl_odeiv2_control_set_driver (gsl_odeiv2_control * c, + const gsl_odeiv2_driver * d) +{ + if (d != NULL) + { + c->type->set_driver (c->state, d); + } + else + { + GSL_ERROR_NULL ("driver pointer is null", GSL_EFAULT); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/control_utils.c b/software/gsl-1.15/ode-initval2/control_utils.c new file mode 100644 index 000000000..7695500a3 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/control_utils.c @@ -0,0 +1,27 @@ +/* ode-initval2/control_utils.c + * + * Copyright (C) 2009 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +control_set_driver_null (void *vstate, const gsl_odeiv2_driver * d) +{ + /* Dummy set function for those control objects that do not + need pointer to driver object. */ + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/cscal.c b/software/gsl-1.15/ode-initval2/cscal.c new file mode 100644 index 000000000..420d86a76 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/cscal.c @@ -0,0 +1,223 @@ +/* ode-initval2/cscal.c + * + * Copyright (C) 2002, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "control_utils.c" + +typedef struct +{ + double eps_abs; + double eps_rel; + double a_y; + double a_dydt; + double *scale_abs; +} +sc_control_state_t; + +static void * +sc_control_alloc (void) +{ + sc_control_state_t *s = + (sc_control_state_t *) malloc (sizeof (sc_control_state_t)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for sc_control_state", + GSL_ENOMEM); + } + + return s; +} + +static int +sc_control_init (void *vstate, + double eps_abs, double eps_rel, double a_y, double a_dydt) +{ + sc_control_state_t *s = (sc_control_state_t *) vstate; + + if (eps_abs < 0) + { + GSL_ERROR ("eps_abs is negative", GSL_EINVAL); + } + else if (eps_rel < 0) + { + GSL_ERROR ("eps_rel is negative", GSL_EINVAL); + } + else if (a_y < 0) + { + GSL_ERROR ("a_y is negative", GSL_EINVAL); + } + else if (a_dydt < 0) + { + GSL_ERROR ("a_dydt is negative", GSL_EINVAL); + } + + s->eps_rel = eps_rel; + s->eps_abs = eps_abs; + s->a_y = a_y; + s->a_dydt = a_dydt; + + return GSL_SUCCESS; +} + +static int +sc_control_hadjust (void *vstate, size_t dim, unsigned int ord, + const double y[], const double yerr[], const double yp[], + double *h) +{ + sc_control_state_t *state = (sc_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + const double *scale_abs = state->scale_abs; + + const double S = 0.9; + const double h_old = *h; + + double rmax = DBL_MIN; + size_t i; + + for (i = 0; i < dim; i++) + { + const double D0 = + eps_rel * (a_y * fabs (y[i]) + a_dydt * fabs (h_old * yp[i])) + + eps_abs * scale_abs[i]; + const double r = fabs (yerr[i]) / fabs (D0); + rmax = GSL_MAX_DBL (r, rmax); + } + + if (rmax > 1.1) + { + /* decrease step, no more than factor of 5, but a fraction S more + than scaling suggests (for better accuracy) */ + double r = S / pow (rmax, 1.0 / ord); + + if (r < 0.2) + r = 0.2; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_DEC; + } + else if (rmax < 0.5) + { + /* increase step, no more than factor of 5 */ + double r = S / pow (rmax, 1.0 / (ord + 1.0)); + + if (r > 5.0) + r = 5.0; + + if (r < 1.0) /* don't allow any decrease caused by S<1 */ + r = 1.0; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_INC; + } + else + { + /* no change */ + return GSL_ODEIV_HADJ_NIL; + } +} + +static int +sc_control_errlevel (void *vstate, const double y, const double dydt, + const double h, const size_t ind, double *errlev) +{ + sc_control_state_t *state = (sc_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + const double *scale_abs = state->scale_abs; + + *errlev = eps_rel * (a_y * fabs (y) + a_dydt * fabs (h * dydt)) + + eps_abs * scale_abs[ind]; + + if (*errlev <= 0.0) + { + GSL_ERROR_NULL ("errlev <= zero", GSL_ESANITY); + } + + return GSL_SUCCESS; +} + + +static void +sc_control_free (void *vstate) +{ + sc_control_state_t *state = (sc_control_state_t *) vstate; + free (state->scale_abs); + free (state); +} + +static const gsl_odeiv2_control_type sc_control_type = { "scaled", /* name */ + &sc_control_alloc, + &sc_control_init, + &sc_control_hadjust, + &sc_control_errlevel, + &control_set_driver_null, + &sc_control_free +}; + +const gsl_odeiv2_control_type *gsl_odeiv2_control_scaled = &sc_control_type; + + +gsl_odeiv2_control * +gsl_odeiv2_control_scaled_new (double eps_abs, double eps_rel, + double a_y, double a_dydt, + const double scale_abs[], size_t dim) +{ + gsl_odeiv2_control *c = + gsl_odeiv2_control_alloc (gsl_odeiv2_control_scaled); + + int status = gsl_odeiv2_control_init (c, eps_abs, eps_rel, a_y, a_dydt); + + if (status != GSL_SUCCESS) + { + gsl_odeiv2_control_free (c); + GSL_ERROR_NULL ("error trying to initialize control", status); + } + + { + sc_control_state_t *s = (sc_control_state_t *) c->state; + + s->scale_abs = (double *) malloc (dim * sizeof (double)); + + if (s->scale_abs == 0) + { + free (s); + GSL_ERROR_NULL ("failed to allocate space for scale_abs", GSL_ENOMEM); + } + + memcpy (s->scale_abs, scale_abs, dim * sizeof (double)); + } + + return c; +} diff --git a/software/gsl-1.15/ode-initval2/cstd.c b/software/gsl-1.15/ode-initval2/cstd.c new file mode 100644 index 000000000..6b6833a2b --- /dev/null +++ b/software/gsl-1.15/ode-initval2/cstd.c @@ -0,0 +1,216 @@ +/* ode-initval2/cstd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include "control_utils.c" + +typedef struct +{ + double eps_abs; + double eps_rel; + double a_y; + double a_dydt; +} +std_control_state_t; + +static void * +std_control_alloc (void) +{ + std_control_state_t *s = + (std_control_state_t *) malloc (sizeof (std_control_state_t)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for std_control_state", + GSL_ENOMEM); + } + + return s; +} + +static int +std_control_init (void *vstate, + double eps_abs, double eps_rel, double a_y, double a_dydt) +{ + std_control_state_t *s = (std_control_state_t *) vstate; + + if (eps_abs < 0) + { + GSL_ERROR ("eps_abs is negative", GSL_EINVAL); + } + else if (eps_rel < 0) + { + GSL_ERROR ("eps_rel is negative", GSL_EINVAL); + } + else if (a_y < 0) + { + GSL_ERROR ("a_y is negative", GSL_EINVAL); + } + else if (a_dydt < 0) + { + GSL_ERROR ("a_dydt is negative", GSL_EINVAL); + } + + s->eps_rel = eps_rel; + s->eps_abs = eps_abs; + s->a_y = a_y; + s->a_dydt = a_dydt; + + return GSL_SUCCESS; +} + +static int +std_control_hadjust (void *vstate, size_t dim, unsigned int ord, + const double y[], const double yerr[], const double yp[], + double *h) +{ + std_control_state_t *state = (std_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + + const double S = 0.9; + const double h_old = *h; + + double rmax = DBL_MIN; + size_t i; + + for (i = 0; i < dim; i++) + { + const double D0 = + eps_rel * (a_y * fabs (y[i]) + a_dydt * fabs (h_old * yp[i])) + + eps_abs; + const double r = fabs (yerr[i]) / fabs (D0); + rmax = GSL_MAX_DBL (r, rmax); + } + + if (rmax > 1.1) + { + /* decrease step, no more than factor of 5, but a fraction S more + than scaling suggests (for better accuracy) */ + double r = S / pow (rmax, 1.0 / ord); + + if (r < 0.2) + r = 0.2; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_DEC; + } + else if (rmax < 0.5) + { + /* increase step, no more than factor of 5 */ + double r = S / pow (rmax, 1.0 / (ord + 1.0)); + + if (r > 5.0) + r = 5.0; + + if (r < 1.0) /* don't allow any decrease caused by S<1 */ + r = 1.0; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_INC; + } + else + { + /* no change */ + return GSL_ODEIV_HADJ_NIL; + } +} + +static int +std_control_errlevel (void *vstate, const double y, const double dydt, + const double h, const size_t ind, double *errlev) +{ + std_control_state_t *state = (std_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + + *errlev = eps_rel * (a_y * fabs (y) + a_dydt * fabs (h * dydt)) + eps_abs; + + if (*errlev <= 0.0) + { + GSL_ERROR_NULL ("errlev <= zero", GSL_ESANITY); + } + + return GSL_SUCCESS; +} + + +static void +std_control_free (void *vstate) +{ + std_control_state_t *state = (std_control_state_t *) vstate; + free (state); +} + +static const gsl_odeiv2_control_type std_control_type = { "standard", /* name */ + &std_control_alloc, + &std_control_init, + &std_control_hadjust, + &std_control_errlevel, + &control_set_driver_null, + &std_control_free +}; + +const gsl_odeiv2_control_type *gsl_odeiv2_control_standard = + &std_control_type; + + +gsl_odeiv2_control * +gsl_odeiv2_control_standard_new (double eps_abs, double eps_rel, + double a_y, double a_dydt) +{ + gsl_odeiv2_control *c = + gsl_odeiv2_control_alloc (gsl_odeiv2_control_standard); + + int status = gsl_odeiv2_control_init (c, eps_abs, eps_rel, a_y, a_dydt); + + if (status != GSL_SUCCESS) + { + gsl_odeiv2_control_free (c); + GSL_ERROR_NULL ("error trying to initialize control", status); + } + + return c; +} + +gsl_odeiv2_control * +gsl_odeiv2_control_y_new (double eps_abs, double eps_rel) +{ + return gsl_odeiv2_control_standard_new (eps_abs, eps_rel, 1.0, 0.0); +} + + +gsl_odeiv2_control * +gsl_odeiv2_control_yp_new (double eps_abs, double eps_rel) +{ + return gsl_odeiv2_control_standard_new (eps_abs, eps_rel, 0.0, 1.0); +} diff --git a/software/gsl-1.15/ode-initval2/driver.c b/software/gsl-1.15/ode-initval2/driver.c new file mode 100644 index 000000000..6e031d746 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/driver.c @@ -0,0 +1,474 @@ +/* ode-initval2/driver.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Driver routine for odeiv2. This is a wrapper for low level GSL + functions that allows a simple interface to step, control and + evolve layers. + */ + +#include +#include +#include +#include +#include + +static gsl_odeiv2_driver * +driver_alloc (const gsl_odeiv2_system * sys, const double hstart, + const gsl_odeiv2_step_type * T) +{ + /* Allocates and initializes an ODE driver system. Step and evolve + objects are allocated here, but control object is allocated in + another function. + */ + + gsl_odeiv2_driver *state = + (gsl_odeiv2_driver *) malloc (sizeof (gsl_odeiv2_driver)); + + if (state == NULL) + { + GSL_ERROR_NULL ("failed to allocate space for driver state", + GSL_ENOMEM); + } + + if (sys == NULL) + { + GSL_ERROR_NULL ("gsl_odeiv2_system must be defined", GSL_EINVAL); + } + + { + const size_t dim = sys->dimension; + + if (dim == 0) + { + GSL_ERROR_NULL + ("gsl_odeiv2_system dimension must be a positive integer", + GSL_EINVAL); + } + + state->sys = sys; + + state->s = gsl_odeiv2_step_alloc (T, dim); + + if (state->s == NULL) + { + free (state); + GSL_ERROR_NULL ("failed to allocate step object", GSL_ENOMEM); + } + + state->e = gsl_odeiv2_evolve_alloc (dim); + } + + if (state->e == NULL) + { + gsl_odeiv2_step_free (state->s); + free (state); + GSL_ERROR_NULL ("failed to allocate evolve object", GSL_ENOMEM); + } + + if (hstart >= 0.0 || hstart < 0.0) + { + state->h = hstart; + } + else + { + GSL_ERROR_NULL ("invalid hstart", GSL_EINVAL); + } + + state->h = hstart; + state->hmin = 0.0; + state->hmax = GSL_DBL_MAX; + state->nmax = 0; + state->n = 0; + state->c = NULL; + + return state; +} + +int +gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver * d, const double hmin) +{ + /* Sets minimum allowed step size fabs(hmin) for driver. It is + required that hmin <= fabs(h) <= hmax. */ + + if ((fabs (hmin) > fabs (d->h)) || (fabs (hmin) > d->hmax)) + { + GSL_ERROR_NULL ("hmin <= fabs(h) <= hmax required", GSL_EINVAL); + } + + if (hmin >= 0.0 || hmin < 0.0) + { + d->hmin = fabs (hmin); + } + else + { + GSL_ERROR_NULL ("invalid hmin", GSL_EINVAL); + } + + return GSL_SUCCESS; +} + +int +gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver * d, const double hmax) +{ + /* Sets maximum allowed step size fabs(hmax) for driver. It is + required that hmin <= fabs(h) <= hmax. */ + + if ((fabs (hmax) < fabs (d->h)) || (fabs (hmax) < d->hmin)) + { + GSL_ERROR_NULL ("hmin <= fabs(h) <= hmax required", GSL_EINVAL); + } + + if (hmax > 0.0 || hmax < 0.0) + { + d->hmax = fabs (hmax); + } + else + { + GSL_ERROR_NULL ("invalid hmax", GSL_EINVAL); + } + + return GSL_SUCCESS; +} + +int +gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver * d, + const unsigned long int nmax) +{ + /* Sets maximum number of allowed steps (nmax) for driver */ + + d->nmax = nmax; + + return GSL_SUCCESS; +} + +gsl_odeiv2_driver * +gsl_odeiv2_driver_alloc_y_new (const gsl_odeiv2_system * sys, + const gsl_odeiv2_step_type * T, + const double hstart, + const double epsabs, const double epsrel) +{ + /* Initializes an ODE driver system with control object of type y_new. */ + + gsl_odeiv2_driver *state = driver_alloc (sys, hstart, T); + + if (state == NULL) + { + GSL_ERROR_NULL ("failed to allocate driver object", GSL_ENOMEM); + } + + if (epsabs >= 0.0 && epsrel >= 0.0) + { + state->c = gsl_odeiv2_control_y_new (epsabs, epsrel); + + if (state->c == NULL) + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("failed to allocate control object", GSL_ENOMEM); + } + } + else + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("epsabs and epsrel must be positive", GSL_EINVAL); + } + + /* Distribute pointer to driver object */ + + gsl_odeiv2_step_set_driver (state->s, state); + gsl_odeiv2_evolve_set_driver (state->e, state); + gsl_odeiv2_control_set_driver (state->c, state); + + return state; +} + +gsl_odeiv2_driver * +gsl_odeiv2_driver_alloc_yp_new (const gsl_odeiv2_system * sys, + const gsl_odeiv2_step_type * T, + const double hstart, + const double epsabs, const double epsrel) +{ + /* Initializes an ODE driver system with control object of type yp_new. */ + + gsl_odeiv2_driver *state = driver_alloc (sys, hstart, T); + + if (state == NULL) + { + GSL_ERROR_NULL ("failed to allocate driver object", GSL_ENOMEM); + } + + if (epsabs >= 0.0 && epsrel >= 0.0) + { + state->c = gsl_odeiv2_control_yp_new (epsabs, epsrel); + + if (state->c == NULL) + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("failed to allocate control object", GSL_ENOMEM); + } + } + else + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("epsabs and epsrel must be positive", GSL_EINVAL); + } + + /* Distribute pointer to driver object */ + + gsl_odeiv2_step_set_driver (state->s, state); + gsl_odeiv2_evolve_set_driver (state->e, state); + gsl_odeiv2_control_set_driver (state->c, state); + + return state; +} + +gsl_odeiv2_driver * +gsl_odeiv2_driver_alloc_standard_new (const gsl_odeiv2_system * sys, + const gsl_odeiv2_step_type * T, + const double hstart, + const double epsabs, + const double epsrel, const double a_y, + const double a_dydt) +{ + /* Initializes an ODE driver system with control object of type + standard_new. + */ + + gsl_odeiv2_driver *state = driver_alloc (sys, hstart, T); + + if (state == NULL) + { + GSL_ERROR_NULL ("failed to allocate driver object", GSL_ENOMEM); + } + + if (epsabs >= 0.0 && epsrel >= 0.0) + { + state->c = + gsl_odeiv2_control_standard_new (epsabs, epsrel, a_y, a_dydt); + + if (state->c == NULL) + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("failed to allocate control object", GSL_ENOMEM); + } + } + else + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("epsabs and epsrel must be positive", GSL_EINVAL); + } + + /* Distribute pointer to driver object */ + + gsl_odeiv2_step_set_driver (state->s, state); + gsl_odeiv2_evolve_set_driver (state->e, state); + gsl_odeiv2_control_set_driver (state->c, state); + + return state; +} + +gsl_odeiv2_driver * +gsl_odeiv2_driver_alloc_scaled_new (const gsl_odeiv2_system * sys, + const gsl_odeiv2_step_type * T, + const double hstart, + const double epsabs, const double epsrel, + const double a_y, const double a_dydt, + const double scale_abs[]) +{ + /* Initializes an ODE driver system with control object of type + scaled_new. + */ + + gsl_odeiv2_driver *state = driver_alloc (sys, hstart, T); + + if (state == NULL) + { + GSL_ERROR_NULL ("failed to allocate driver object", GSL_ENOMEM); + } + + if (epsabs >= 0.0 && epsrel >= 0.0) + { + state->c = gsl_odeiv2_control_scaled_new (epsabs, epsrel, a_y, a_dydt, + scale_abs, sys->dimension); + + if (state->c == NULL) + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("failed to allocate control object", GSL_ENOMEM); + } + } + else + { + gsl_odeiv2_driver_free (state); + GSL_ERROR_NULL ("epsabs and epsrel must be positive", GSL_EINVAL); + } + + /* Distribute pointer to driver object */ + + gsl_odeiv2_step_set_driver (state->s, state); + gsl_odeiv2_evolve_set_driver (state->e, state); + gsl_odeiv2_control_set_driver (state->c, state); + + return state; +} + +int +gsl_odeiv2_driver_apply (gsl_odeiv2_driver * d, double *t, + const double t1, double y[]) +{ + /* Main driver function that evolves the system from t to t1. In + beginning vector y contains the values of dependent variables at + t. This function returns values at t=t1 in y. In case of + unrecoverable error, y and t contains the values after the last + successful step. + */ + + int sign = 0; + d->n = 0; + + /* Determine integration direction sign */ + + if (d->h > 0.0) + { + sign = 1; + } + else + { + sign = -1; + } + + /* Check that t, t1 and step direction are sensible */ + + if (sign * (t1 - *t) < 0.0) + { + GSL_ERROR_NULL + ("integration limits and/or step direction not consistent", + GSL_EINVAL); + } + + /* Evolution loop */ + + while (sign * (t1 - *t) > 0.0) + { + int s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, d->sys, + t, t1, &(d->h), y); + + if (s != GSL_SUCCESS) + { + return s; + } + + /* Check for maximum allowed steps */ + + if ((d->nmax > 0) && (d->n > d->nmax)) + { + return GSL_EMAXITER; + } + + /* Set step size if maximum size is exceeded */ + + if (fabs (d->h) > d->hmax) + { + d->h = sign * d->hmax; + } + + /* Check for too small step size */ + + if (fabs (d->h) < d->hmin) + { + return GSL_ENOPROG; + } + + d->n++; + } + + return GSL_SUCCESS; +} + +int +gsl_odeiv2_driver_apply_fixed_step (gsl_odeiv2_driver * d, double *t, + const double h, const unsigned long int n, + double y[]) +{ + /* Alternative driver function that evolves the system from t using + * n steps of size h. In the beginning vector y contains the values + * of dependent variables at t. This function returns values at t = + * t + n * h in y. In case of an unrecoverable error, y and t + * contains the values after the last successful step. + */ + + unsigned long int i; + d->n = 0; + + /* Evolution loop */ + + for (i = 0; i < n; i++) + { + int s = gsl_odeiv2_evolve_apply_fixed_step (d->e, d->c, d->s, d->sys, + t, h, y); + + if (s != GSL_SUCCESS) + { + return s; + } + + d->n++; + } + + return GSL_SUCCESS; +} + +int +gsl_odeiv2_driver_reset (gsl_odeiv2_driver * d) +{ + /* Reset the driver. Resets evolve and step objects. */ + + { + int s = gsl_odeiv2_evolve_reset (d->e); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = gsl_odeiv2_step_reset (d->s); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + return GSL_SUCCESS; +} + + +void +gsl_odeiv2_driver_free (gsl_odeiv2_driver * state) +{ + if (state->c != NULL) + { + gsl_odeiv2_control_free (state->c); + } + + gsl_odeiv2_evolve_free (state->e); + gsl_odeiv2_step_free (state->s); + free (state); +} diff --git a/software/gsl-1.15/ode-initval2/evolve.c b/software/gsl-1.15/ode-initval2/evolve.c new file mode 100644 index 000000000..a49233072 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/evolve.c @@ -0,0 +1,381 @@ +/* ode-initval/evolve.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +gsl_odeiv2_evolve * +gsl_odeiv2_evolve_alloc (size_t dim) +{ + gsl_odeiv2_evolve *e = + (gsl_odeiv2_evolve *) malloc (sizeof (gsl_odeiv2_evolve)); + + if (e == 0) + { + GSL_ERROR_NULL ("failed to allocate space for evolve struct", + GSL_ENOMEM); + } + + e->y0 = (double *) malloc (dim * sizeof (double)); + + if (e->y0 == 0) + { + free (e); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + e->yerr = (double *) malloc (dim * sizeof (double)); + + if (e->yerr == 0) + { + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for yerr", GSL_ENOMEM); + } + + e->dydt_in = (double *) malloc (dim * sizeof (double)); + + if (e->dydt_in == 0) + { + free (e->yerr); + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for dydt_in", GSL_ENOMEM); + } + + e->dydt_out = (double *) malloc (dim * sizeof (double)); + + if (e->dydt_out == 0) + { + free (e->dydt_in); + free (e->yerr); + free (e->y0); + free (e); + GSL_ERROR_NULL ("failed to allocate space for dydt_out", GSL_ENOMEM); + } + + e->dimension = dim; + e->count = 0; + e->failed_steps = 0; + e->last_step = 0.0; + e->driver = NULL; + + return e; +} + +int +gsl_odeiv2_evolve_reset (gsl_odeiv2_evolve * e) +{ + e->count = 0; + e->failed_steps = 0; + e->last_step = 0.0; + return GSL_SUCCESS; +} + +void +gsl_odeiv2_evolve_free (gsl_odeiv2_evolve * e) +{ + RETURN_IF_NULL (e); + free (e->dydt_out); + free (e->dydt_in); + free (e->yerr); + free (e->y0); + free (e); +} + +/* Evolution framework method. + * + * Uses an adaptive step control object + */ +int +gsl_odeiv2_evolve_apply (gsl_odeiv2_evolve * e, + gsl_odeiv2_control * con, + gsl_odeiv2_step * step, + const gsl_odeiv2_system * dydt, + double *t, double t1, double *h, double y[]) +{ + const double t0 = *t; + double h0 = *h; + int step_status; + int final_step = 0; + double dt = t1 - t0; /* remaining time, possibly less than h */ + + if (e->dimension != step->dimension) + { + GSL_ERROR ("step dimension must match evolution size", GSL_EINVAL); + } + + if ((dt < 0.0 && h0 > 0.0) || (dt > 0.0 && h0 < 0.0)) + { + GSL_ERROR ("step direction must match interval direction", GSL_EINVAL); + } + + /* Save y in case of failure in a step */ + + DBL_MEMCPY (e->y0, y, e->dimension); + + /* Calculate initial dydt once if the method can benefit. */ + + if (step->type->can_use_dydt_in) + { + int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); + + if (status) + { + return status; + } + } + +try_step: + + if ((dt >= 0.0 && h0 > dt) || (dt < 0.0 && h0 < dt)) + { + h0 = dt; + final_step = 1; + } + else + { + final_step = 0; + } + + if (step->type->can_use_dydt_in) + { + step_status = + gsl_odeiv2_step_apply (step, t0, h0, y, e->yerr, e->dydt_in, + e->dydt_out, dydt); + } + else + { + step_status = + gsl_odeiv2_step_apply (step, t0, h0, y, e->yerr, NULL, e->dydt_out, + dydt); + } + + /* Return if stepper indicates a pointer or user function failure */ + + if (step_status == GSL_EFAULT || step_status == GSL_EBADFUNC) + { + return step_status; + } + + /* Check for stepper internal failure */ + + if (step_status != GSL_SUCCESS) + { + /* Stepper was unable to calculate step. Try decreasing step size. */ + + double h_old = h0; + + h0 *= 0.5; + + /* Check that an actual decrease in h0 occured and the + suggested h0 will change the time by at least 1 ulp */ + + { + double t_curr = GSL_COERCE_DBL (*t); + double t_next = GSL_COERCE_DBL ((*t) + h0); + + if (fabs (h0) < fabs (h_old) && t_next != t_curr) + { + + /* Step was decreased. Undo step, and try again with new h0. */ + + DBL_MEMCPY (y, e->y0, dydt->dimension); + e->failed_steps++; + goto try_step; + } + else + { + *h = h0; /* notify user of step-size which caused the failure */ + *t = t0; /* restore original t value */ + return step_status; + } + } + } + + e->count++; + e->last_step = h0; + + if (final_step) + { + *t = t1; + } + else + { + *t = t0 + h0; + } + + if (con != NULL) + { + /* Check error and attempt to adjust the step. */ + + double h_old = h0; + + const int hadjust_status + = + gsl_odeiv2_control_hadjust (con, step, y, e->yerr, e->dydt_out, &h0); + + if (hadjust_status == GSL_ODEIV_HADJ_DEC) + { + /* Check that the reported status is correct (i.e. an actual + decrease in h0 occured) and the suggested h0 will change + the time by at least 1 ulp */ + + double t_curr = GSL_COERCE_DBL (*t); + double t_next = GSL_COERCE_DBL ((*t) + h0); + + if (fabs (h0) < fabs (h_old) && t_next != t_curr) + { + /* Step was decreased. Undo step, and try again with new h0. */ + + DBL_MEMCPY (y, e->y0, dydt->dimension); + e->failed_steps++; + goto try_step; + } + else + { + /* Can not obtain required error tolerance, and can not + decrease step-size any further, so give up and return + GSL_FAILURE. + */ + + *h = h0; /* notify user of step-size which caused the failure */ + return GSL_FAILURE; + } + } + } + + /* Suggest step size for next time-step. Change of step size is not + suggested in the final step, because that step can be very + small compared to previous step, to reach t1. + */ + + if (final_step == 0) + { + *h = h0; + } + + return step_status; +} + +/* Evolves the system using the user specified constant step size h. + */ + +int +gsl_odeiv2_evolve_apply_fixed_step (gsl_odeiv2_evolve * e, + gsl_odeiv2_control * con, + gsl_odeiv2_step * step, + const gsl_odeiv2_system * dydt, + double *t, const double h, double y[]) +{ + const double t0 = *t; + int step_status; + + if (e->dimension != step->dimension) + { + GSL_ERROR ("step dimension must match evolution size", GSL_EINVAL); + } + + /* Save y in case of failure in a step */ + + DBL_MEMCPY (e->y0, y, e->dimension); + + /* Calculate initial dydt once if the method can benefit. */ + + if (step->type->can_use_dydt_in) + { + int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); + + if (status) + { + return status; + } + } + + if (step->type->can_use_dydt_in) + { + step_status = + gsl_odeiv2_step_apply (step, t0, h, y, e->yerr, e->dydt_in, + e->dydt_out, dydt); + } + else + { + step_status = + gsl_odeiv2_step_apply (step, t0, h, y, e->yerr, NULL, e->dydt_out, + dydt); + } + + /* Return the stepper return value in case of an error */ + + if (step_status != GSL_SUCCESS) + { + return step_status; + } + + if (con != NULL) + { + /* Calculate error level. Fail if error level exceeds desired + error level. */ + + double htemp = h; + + const int hadjust_status + = gsl_odeiv2_control_hadjust (con, step, y, e->yerr, + e->dydt_out, &htemp); + + if (hadjust_status == GSL_ODEIV_HADJ_DEC) + { + DBL_MEMCPY (y, e->y0, dydt->dimension); + e->failed_steps++; + return GSL_FAILURE; + } + } + + /* Step is accepted, update status */ + + e->count++; + e->last_step = h; + *t = t0 + h; + + return GSL_SUCCESS; +} + +int +gsl_odeiv2_evolve_set_driver (gsl_odeiv2_evolve * e, + const gsl_odeiv2_driver * d) +{ + if (d != NULL) + { + e->driver = d; + } + else + { + GSL_ERROR_NULL ("driver pointer is null", GSL_EFAULT); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/gsl_odeiv2.h b/software/gsl-1.15/ode-initval2/gsl_odeiv2.h new file mode 100644 index 000000000..49004dffd --- /dev/null +++ b/software/gsl-1.15/ode-initval2/gsl_odeiv2.h @@ -0,0 +1,332 @@ +/* ode-initval/odeiv2.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ +/* Modified by Tuomo Keskitalo */ + +#ifndef __GSL_ODEIV2_H__ +#define __GSL_ODEIV2_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS +/* Description of a system of ODEs. + * + * y' = f(t,y) = dydt(t, y) + * + * The system is specified by giving the right-hand-side + * of the equation and possibly a jacobian function. + * + * Some methods require the jacobian function, which calculates + * the matrix dfdy and the vector dfdt. The matrix dfdy conforms + * to the GSL standard, being a continuous range of floating point + * values, in row-order. + * + * As with GSL function objects, user-supplied parameter + * data is also present. + */ + typedef struct +{ + int (*function) (double t, const double y[], double dydt[], void *params); + int (*jacobian) (double t, const double y[], double *dfdy, double dfdt[], + void *params); + size_t dimension; + void *params; +} +gsl_odeiv2_system; + +/* Function evaluation macros */ + +#define GSL_ODEIV_FN_EVAL(S,t,y,f) (*((S)->function))(t,y,f,(S)->params) +#define GSL_ODEIV_JA_EVAL(S,t,y,dfdy,dfdt) (*((S)->jacobian))(t,y,dfdy,dfdt,(S)->params) + +/* Type definitions */ + +typedef struct gsl_odeiv2_step_struct gsl_odeiv2_step; +typedef struct gsl_odeiv2_control_struct gsl_odeiv2_control; +typedef struct gsl_odeiv2_evolve_struct gsl_odeiv2_evolve; +typedef struct gsl_odeiv2_driver_struct gsl_odeiv2_driver; + +/* Stepper object + * + * Opaque object for stepping an ODE system from t to t+h. + * In general the object has some state which facilitates + * iterating the stepping operation. + */ + +typedef struct +{ + const char *name; + int can_use_dydt_in; + int gives_exact_dydt_out; + void *(*alloc) (size_t dim); + int (*apply) (void *state, size_t dim, double t, double h, double y[], + double yerr[], const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * dydt); + int (*set_driver) (void *state, const gsl_odeiv2_driver * d); + int (*reset) (void *state, size_t dim); + unsigned int (*order) (void *state); + void (*free) (void *state); +} +gsl_odeiv2_step_type; + +struct gsl_odeiv2_step_struct +{ + const gsl_odeiv2_step_type *type; + size_t dimension; + void *state; +}; + +/* Available stepper types */ + +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk2; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk4; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rkf45; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rkck; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk8pd; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk2imp; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk4imp; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_bsimp; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_rk1imp; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_msadams; +GSL_VAR const gsl_odeiv2_step_type *gsl_odeiv2_step_msbdf; + +/* Stepper object methods */ + +gsl_odeiv2_step *gsl_odeiv2_step_alloc (const gsl_odeiv2_step_type * T, + size_t dim); +int gsl_odeiv2_step_reset (gsl_odeiv2_step * s); +void gsl_odeiv2_step_free (gsl_odeiv2_step * s); +const char *gsl_odeiv2_step_name (const gsl_odeiv2_step * s); +unsigned int gsl_odeiv2_step_order (const gsl_odeiv2_step * s); +int gsl_odeiv2_step_apply (gsl_odeiv2_step * s, double t, double h, + double y[], double yerr[], const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * dydt); +int gsl_odeiv2_step_set_driver (gsl_odeiv2_step * s, + const gsl_odeiv2_driver * d); + +/* Step size control object. */ + +typedef struct +{ + const char *name; + void *(*alloc) (void); + int (*init) (void *state, double eps_abs, double eps_rel, double a_y, + double a_dydt); + int (*hadjust) (void *state, size_t dim, unsigned int ord, const double y[], + const double yerr[], const double yp[], double *h); + int (*errlevel) (void *state, const double y, const double dydt, + const double h, const size_t ind, double *errlev); + int (*set_driver) (void *state, const gsl_odeiv2_driver * d); + void (*free) (void *state); +} +gsl_odeiv2_control_type; + +struct gsl_odeiv2_control_struct +{ + const gsl_odeiv2_control_type *type; + void *state; +}; + +/* Possible return values for an hadjust() evolution method */ + +#define GSL_ODEIV_HADJ_INC 1 /* step was increased */ +#define GSL_ODEIV_HADJ_NIL 0 /* step unchanged */ +#define GSL_ODEIV_HADJ_DEC (-1) /* step decreased */ + +/* General step size control methods. + * + * The hadjust() method controls the adjustment of + * step size given the result of a step and the error. + * Valid hadjust() methods must return one of the codes below. + * errlevel function calculates the desired error level D0. + * + * The general data can be used by specializations + * to store state and control their heuristics. + */ + +gsl_odeiv2_control *gsl_odeiv2_control_alloc (const gsl_odeiv2_control_type * + T); +int gsl_odeiv2_control_init (gsl_odeiv2_control * c, double eps_abs, + double eps_rel, double a_y, double a_dydt); +void gsl_odeiv2_control_free (gsl_odeiv2_control * c); +int gsl_odeiv2_control_hadjust (gsl_odeiv2_control * c, gsl_odeiv2_step * s, + const double y[], const double yerr[], + const double dydt[], double *h); +const char *gsl_odeiv2_control_name (const gsl_odeiv2_control * c); +int gsl_odeiv2_control_errlevel (gsl_odeiv2_control * c, const double y, + const double dydt, const double h, + const size_t ind, double *errlev); +int gsl_odeiv2_control_set_driver (gsl_odeiv2_control * c, + const gsl_odeiv2_driver * d); + +/* Available control object constructors. + * + * The standard control object is a four parameter heuristic + * defined as follows: + * D0 = eps_abs + eps_rel * (a_y |y| + a_dydt h |y'|) + * D1 = |yerr| + * q = consistency order of method (q=4 for 4(5) embedded RK) + * S = safety factor (0.9 say) + * + * / (D0/D1)^(1/(q+1)) D0 >= D1 + * h_NEW = S h_OLD * | + * \ (D0/D1)^(1/q) D0 < D1 + * + * This encompasses all the standard error scaling methods. + * + * The y method is the standard method with a_y=1, a_dydt=0. + * The yp method is the standard method with a_y=0, a_dydt=1. + */ + +gsl_odeiv2_control *gsl_odeiv2_control_standard_new (double eps_abs, + double eps_rel, + double a_y, + double a_dydt); +gsl_odeiv2_control *gsl_odeiv2_control_y_new (double eps_abs, double eps_rel); +gsl_odeiv2_control *gsl_odeiv2_control_yp_new (double eps_abs, + double eps_rel); + +/* This controller computes errors using different absolute errors for + * each component + * + * D0 = eps_abs * scale_abs[i] + eps_rel * (a_y |y| + a_dydt h |y'|) + */ + +gsl_odeiv2_control *gsl_odeiv2_control_scaled_new (double eps_abs, + double eps_rel, double a_y, + double a_dydt, + const double scale_abs[], + size_t dim); + +/* Evolution object */ + +struct gsl_odeiv2_evolve_struct +{ + size_t dimension; + double *y0; + double *yerr; + double *dydt_in; + double *dydt_out; + double last_step; + unsigned long int count; + unsigned long int failed_steps; + const gsl_odeiv2_driver *driver; +}; + +/* Evolution object methods */ + +gsl_odeiv2_evolve *gsl_odeiv2_evolve_alloc (size_t dim); +int gsl_odeiv2_evolve_apply (gsl_odeiv2_evolve * e, gsl_odeiv2_control * con, + gsl_odeiv2_step * step, + const gsl_odeiv2_system * dydt, double *t, + double t1, double *h, double y[]); +int gsl_odeiv2_evolve_apply_fixed_step (gsl_odeiv2_evolve * e, + gsl_odeiv2_control * con, + gsl_odeiv2_step * step, + const gsl_odeiv2_system * dydt, + double *t, const double h0, + double y[]); +int gsl_odeiv2_evolve_reset (gsl_odeiv2_evolve * e); +void gsl_odeiv2_evolve_free (gsl_odeiv2_evolve * e); +int gsl_odeiv2_evolve_set_driver (gsl_odeiv2_evolve * e, + const gsl_odeiv2_driver * d); + +/* Driver object + * + * This is a high level wrapper for step, control and + * evolve objects. + */ + +struct gsl_odeiv2_driver_struct +{ + const gsl_odeiv2_system *sys; /* ODE system */ + gsl_odeiv2_step *s; /* stepper object */ + gsl_odeiv2_control *c; /* control object */ + gsl_odeiv2_evolve *e; /* evolve object */ + double h; /* step size */ + double hmin; /* minimum step size allowed */ + double hmax; /* maximum step size allowed */ + unsigned long int n; /* number of steps taken */ + unsigned long int nmax; /* Maximum number of steps allowed */ +}; + +/* Driver object methods */ + +gsl_odeiv2_driver *gsl_odeiv2_driver_alloc_y_new (const gsl_odeiv2_system * + sys, + const gsl_odeiv2_step_type * + T, const double hstart, + const double epsabs, + const double epsrel); +gsl_odeiv2_driver *gsl_odeiv2_driver_alloc_yp_new (const gsl_odeiv2_system * + sys, + const gsl_odeiv2_step_type + * T, const double hstart, + const double epsabs, + const double epsrel); +gsl_odeiv2_driver *gsl_odeiv2_driver_alloc_scaled_new (const gsl_odeiv2_system + * sys, + const + gsl_odeiv2_step_type * + T, const double hstart, + const double epsabs, + const double epsrel, + const double a_y, + const double a_dydt, + const double + scale_abs[]); +gsl_odeiv2_driver *gsl_odeiv2_driver_alloc_standard_new (const + gsl_odeiv2_system * + sys, + const + gsl_odeiv2_step_type + * T, + const double hstart, + const double epsabs, + const double epsrel, + const double a_y, + const double a_dydt); +int gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver * d, const double hmin); +int gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver * d, const double hmax); +int gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver * d, + const unsigned long int nmax); +int gsl_odeiv2_driver_apply (gsl_odeiv2_driver * d, double *t, + const double t1, double y[]); +int gsl_odeiv2_driver_apply_fixed_step (gsl_odeiv2_driver * d, double *t, + const double h, + const unsigned long int n, + double y[]); +int gsl_odeiv2_driver_reset (gsl_odeiv2_driver * d); +void gsl_odeiv2_driver_free (gsl_odeiv2_driver * state); + +__END_DECLS +#endif /* __GSL_ODEIV2_H__ */ diff --git a/software/gsl-1.15/ode-initval2/modnewton1.c b/software/gsl-1.15/ode-initval2/modnewton1.c new file mode 100644 index 000000000..1e2f97316 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/modnewton1.c @@ -0,0 +1,426 @@ +/* ode-initval2/modnewton1.c + * + * Copyright (C) 2008, 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* A modified Newton iteration method for solving non-linear + equations in implicit Runge-Kutta methods. +*/ + +/* References: + + Ascher, U.M., Petzold, L.R., Computer methods for ordinary + differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. ISBN 0898714125, 9780898714128 + + Hairer, E., Wanner, G., Solving Ordinary Differential + Equations II: Stiff and Differential-Algebraic Problems, + Springer, 1996. ISBN 3540604529, 9783540604525 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +typedef struct +{ + /* iteration matrix I - h A (*) J */ + gsl_matrix *IhAJ; + + /* permutation for LU-decomposition */ + gsl_permutation *p; + + /* difference vector for kth Newton iteration */ + gsl_vector *dYk; + + /* scaled dYk with desired error level */ + gsl_vector *dScal; + + /* current Runge-Kutta points (absolute values) */ + double *Yk; + + /* function values at points Yk */ + double *fYk; + + /* right hand side of Newton iteration formula */ + gsl_vector *rhs; + + /* stopping criterion value from previous step */ + double eeta_prev; +} +modnewton1_state_t; + +static void * +modnewton1_alloc (size_t dim, size_t stage) +{ + modnewton1_state_t *state = + (modnewton1_state_t *) malloc (sizeof (modnewton1_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for modnewton1_state_t", + GSL_ENOMEM); + } + + state->IhAJ = gsl_matrix_alloc (dim * stage, dim * stage); + + if (state->IhAJ == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for IhAJ", GSL_ENOMEM); + } + + state->p = gsl_permutation_alloc (dim * stage); + + if (state->p == 0) + { + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for p", GSL_ENOMEM); + } + + state->dYk = gsl_vector_alloc (dim * stage); + + if (state->dYk == 0) + { + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dYk", GSL_ENOMEM); + } + + state->dScal = gsl_vector_alloc (dim * stage); + + if (state->dScal == 0) + { + gsl_vector_free (state->dYk); + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dScal", GSL_ENOMEM); + } + + state->Yk = (double *) malloc (dim * stage * sizeof (double)); + + if (state->Yk == 0) + { + gsl_vector_free (state->dScal); + gsl_vector_free (state->dYk); + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for Yk", GSL_ENOMEM); + } + + state->fYk = (double *) malloc (dim * stage * sizeof (double)); + + if (state->fYk == 0) + { + free (state->Yk); + gsl_vector_free (state->dScal); + gsl_vector_free (state->dYk); + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for Yk", GSL_ENOMEM); + } + + state->rhs = gsl_vector_alloc (dim * stage); + + if (state->rhs == 0) + { + free (state->fYk); + free (state->Yk); + gsl_vector_free (state->dScal); + gsl_vector_free (state->dYk); + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); + GSL_ERROR_NULL ("failed to allocate space for rhs", GSL_ENOMEM); + } + + state->eeta_prev = GSL_DBL_MAX; + + return state; +} + +static int +modnewton1_init (void *vstate, const gsl_matrix * A, + const double h, const gsl_matrix * dfdy, + const gsl_odeiv2_system * sys) +{ + /* Initializes the method by forming the iteration matrix IhAJ + and generating its LU-decomposition + */ + + modnewton1_state_t *state = (modnewton1_state_t *) vstate; + + gsl_matrix *const IhAJ = state->IhAJ; + gsl_permutation *const p = state->p; + + const size_t dim = sys->dimension; + const size_t stage = A->size1; + + state->eeta_prev = GSL_DBL_MAX; + + /* Generate IhAJ */ + + { + size_t i, j, k, m; + + for (i = 0; i < dim; i++) + for (j = 0; j < dim; j++) + for (k = 0; k < stage; k++) + for (m = 0; m < stage; m++) + { + size_t x = dim * k + i; + size_t y = dim * m + j; + + if (x != y) + gsl_matrix_set (IhAJ, x, y, + -h * gsl_matrix_get (A, k, m) * + gsl_matrix_get (dfdy, i, j)); + else + gsl_matrix_set (IhAJ, x, y, + 1.0 - h * gsl_matrix_get (A, k, m) * + gsl_matrix_get (dfdy, i, j)); + } + } + + /* decompose */ + + { + int signum; + int s = gsl_linalg_LU_decomp (IhAJ, p, &signum); + + if (s != GSL_SUCCESS) + return s; + } + + return GSL_SUCCESS; +} + +static int +modnewton1_solve (void *vstate, const gsl_matrix * A, + const double c[], const double t, const double h, + const double y0[], const gsl_odeiv2_system * sys, + double YZ[], const double errlev[]) +{ + /* Solves the non-linear equation system resulting from implicit + Runge-Kutta methods by a modified Newton iteration. The + modified Newton iteration with this problem is stated in the + form + + IhAJ * dYk = rhs + + in which IhAJ is the iteration matrix: IhAJ = (I - hA (*) J) in + which (*) is the Kronecker matrix product (size of IhAJ = + dim*stage, dim*stage), dYk is the Runge-Kutta point (Y) + difference vector for kth Newton iteration: dYk = Y(k+1) - Y(k), + and rhs = Y(k) - y0 - h * sum j=1..stage (a_j * f(Y(k))) + + This function solves dYk by LU-decomposition of IhAJ with partial + pivoting. + */ + + modnewton1_state_t *state = (modnewton1_state_t *) vstate; + + gsl_matrix *const IhAJ = state->IhAJ; + gsl_permutation *const p = state->p; + gsl_vector *const dYk = state->dYk; + double *const Yk = state->Yk; + double *const fYk = state->fYk; + gsl_vector *const rhs = state->rhs; + double *const eeta_prev = &(state->eeta_prev); + gsl_vector *const dScal = state->dScal; + + const size_t dim = sys->dimension; + const size_t stage = A->size1; + + int status = GSL_CONTINUE; /* Convergence status for Newton iteration */ + + /* Set starting values for iteration. Use starting values of Y(k) = + y0. FIXME: Implement better initial guess described in Hairer and + Wanner. + */ + + { + size_t j, m; + + gsl_vector_set_zero (dYk); + + for (j = 0; j < stage; j++) + for (m = 0; m < dim; m++) + Yk[j * dim + m] = y0[m]; + } + + /* Loop modified Newton iterations */ + + { + size_t iter = 0; + size_t j, m, n; + + /* Maximum number of Newton iterations. */ + const size_t max_iter = 7; + + double dScal_norm = 0.0; /* Newton iteration step length */ + double dScal_norm_prev = 0.0; /* Previous dScal_norm */ + + while (status == GSL_CONTINUE && iter < max_iter) + { + iter++; + + /* Update Y(k) and evaluate function */ + + for (j = 0; j < stage; j++) + { + for (m = 0; m < dim; m++) + { + Yk[j * dim + m] += gsl_vector_get (dYk, j * dim + m); + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[j] * h, &Yk[j * dim], + &fYk[j * dim]); + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + /* Calculate rhs */ + + for (j = 0; j < stage; j++) + for (m = 0; m < dim; m++) + { + double sum = 0; + + for (n = 0; n < stage; n++) + sum += gsl_matrix_get (A, j, n) * fYk[n * dim + m]; + + gsl_vector_set (rhs, j * dim + m, + -1.0 * Yk[j * dim + m] + y0[m] + h * sum); + } + + /* Solve dYk */ + + { + int s = gsl_linalg_LU_solve (IhAJ, p, rhs, dYk); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Evaluate convergence according to method by Hairer and + Wanner, section IV.8. The iteration step is normalized by + desired error level before calculation of the norm, to take + the tolerance on each component of y into account. + */ + + { + /* relative change in two Newton iteration steps */ + double theta_k; + + /* transformation of theta_k */ + double eeta_k = 0.0; + + for (j = 0; j < stage; j++) + for (m = 0; m < dim; m++) + { + gsl_vector_set (dScal, j * dim + m, + gsl_vector_get (dYk, j * dim + m) + / errlev[m]); + } + + dScal_norm_prev = dScal_norm; + dScal_norm = gsl_blas_dnrm2 (dScal); + + theta_k = dScal_norm / dScal_norm_prev; + + if (iter > 1) + { + /* check for increase in step size, which indicates divergence */ + + if (theta_k >= 1.0) + { + return GSL_FAILURE; + } + + eeta_k = theta_k / (1.0 - theta_k); + } + + else + { + eeta_k = pow (GSL_MAX_DBL (*eeta_prev, GSL_DBL_EPSILON), 0.8); + } + + *eeta_prev = eeta_k; + + if (eeta_k * dScal_norm < 1.0) + { + status = GSL_SUCCESS; + } + } + } + } + + /* No convergence reached within allowed iterations */ + + if (status != GSL_SUCCESS) + { + return GSL_FAILURE; + } + + /* Give solution in YZ */ + + else + { + size_t j, m; + + for (j = 0; j < stage; j++) + for (m = 0; m < dim; m++) + YZ[j * dim + m] = + Yk[j * dim + m] + gsl_vector_get (dYk, j * dim + m); + + return status; + } +} + +static void +modnewton1_free (void *vstate) +{ + modnewton1_state_t *state = (modnewton1_state_t *) vstate; + + gsl_vector_free (state->rhs); + free (state->fYk); + free (state->Yk); + gsl_vector_free (state->dScal); + gsl_vector_free (state->dYk); + gsl_permutation_free (state->p); + gsl_matrix_free (state->IhAJ); + free (state); +} diff --git a/software/gsl-1.15/ode-initval2/msadams.c b/software/gsl-1.15/ode-initval2/msadams.c new file mode 100644 index 000000000..3c3342cf1 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/msadams.c @@ -0,0 +1,1314 @@ +/* ode-initval2/msadams.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* A variable-coefficient linear multistep Adams method in Nordsieck + form. This stepper uses explicit Adams-Bashforth (predictor) and + implicit Adams-Moulton (corrector) methods in P(EC)^m functional + iteration mode. Method order varies dynamically between 1 and 12. + + References: + + Byrne, G. D., and Hindmarsh, A. C., A Polyalgorithm for the + Numerical Solution of Ordinary Differential Equations, + ACM Trans. Math. Software, 1 (1975), pp. 71-96. + + Brown, P. N., Byrne, G. D., and Hindmarsh, A. C., VODE: A + Variable-coefficient ODE Solver, SIAM J. Sci. Stat. Comput. 10, + (1989), pp. 1038-1051. + + Hindmarsh, A. C., Brown, P. N., Grant, K. E., Lee, S. L., Serban, + R., Shumaker, D. E., and Woodward, C. S., SUNDIALS: Suite of + Nonlinear and Differential/Algebraic Equation Solvers, ACM + Trans. Math. Software 31 (2005), pp. 363-396. + + Note: The algorithms have been adapted for GSL ode-initval2 + framework. +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +/* Maximum order of Adams methods */ +#define MSADAMS_MAX_ORD 12 + +typedef struct +{ + /* Nordsieck history matrix. Includes concatenated + Nordsieck vectors [y_n, h*y_n', (h^2/2!)*y_n'', ..., + (h^ord/ord!)*d^(ord)(y_n)]. Nordsieck vector number i is located + at z[i*dim] (i=0..ord). + */ + double *z; + + double *zbackup; /* backup of Nordsieck matrix */ + double *ytmp; /* work area */ + double *ytmp2; /* work area */ + double *pc; /* product term coefficients */ + double *l; /* polynomial coefficients */ + double *hprev; /* previous step sizes */ + double *hprevbackup; /* backup of hprev */ + double *errlev; /* desired error level of y */ + gsl_vector *abscor; /* absolute y values for correction */ + gsl_vector *relcor; /* relative y values for correction */ + gsl_vector *svec; /* saved abscor & work area */ + gsl_vector *tempvec; /* work area */ + const gsl_odeiv2_driver *driver; /* pointer to gsl_odeiv2_driver object */ + + long int ni; /* stepper call counter */ + size_t ord; /* current order of method */ + size_t ordprev; /* order of previous call */ + size_t ordprevbackup; /* backup of ordprev */ + double tprev; /* t point of previous call */ + size_t ordwait; /* counter for order change */ + size_t ordwaitbackup; /* backup of ordwait */ + size_t failord; /* order of convergence failure */ + double failt; /* t point of convergence failure */ + double ordm1coeff; /* saved order-1 coefficiet */ + double ordp1coeffprev; /* saved order+1 coefficient */ + size_t failcount; /* counter for rejected steps */ +} +msadams_state_t; + +/* Introduce msadams_reset for use in msadams_alloc and _apply */ + +static int msadams_reset (void *, size_t); + +static void * +msadams_alloc (size_t dim) +{ + msadams_state_t *state = + (msadams_state_t *) malloc (sizeof (msadams_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for msadams_state", + GSL_ENOMEM); + } + + state->z = + (double *) malloc ((MSADAMS_MAX_ORD + 1) * dim * sizeof (double)); + + if (state->z == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for z", GSL_ENOMEM); + } + + state->zbackup = + (double *) malloc ((MSADAMS_MAX_ORD + 1) * dim * sizeof (double)); + + if (state->zbackup == 0) + { + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for zbackup", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->ytmp2 = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp2 == 0) + { + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp2", GSL_ENOMEM); + } + + state->pc = (double *) malloc ((MSADAMS_MAX_ORD + 1) * sizeof (double)); + + if (state->pc == 0) + { + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for pc", GSL_ENOMEM); + } + + state->l = (double *) malloc ((MSADAMS_MAX_ORD + 1) * sizeof (double)); + + if (state->l == 0) + { + free (state->pc); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for l", GSL_ENOMEM); + } + + state->hprev = (double *) malloc (MSADAMS_MAX_ORD * sizeof (double)); + + if (state->hprev == 0) + { + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for hprev", GSL_ENOMEM); + } + + state->hprevbackup = (double *) malloc (MSADAMS_MAX_ORD * sizeof (double)); + + if (state->hprevbackup == 0) + { + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for hprevbackup", GSL_ENOMEM); + } + + state->errlev = (double *) malloc (dim * sizeof (double)); + + if (state->errlev == 0) + { + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for errlev", GSL_ENOMEM); + } + + state->abscor = gsl_vector_alloc (dim); + + if (state->abscor == 0) + { + free (state->errlev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for abscor", GSL_ENOMEM); + } + + state->relcor = gsl_vector_alloc (dim); + + if (state->relcor == 0) + { + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for relcor", GSL_ENOMEM); + } + + state->svec = gsl_vector_alloc (dim); + + if (state->svec == 0) + { + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for svec", GSL_ENOMEM); + } + + state->tempvec = gsl_vector_alloc (dim); + + if (state->tempvec == 0) + { + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for tempvec", GSL_ENOMEM); + } + + msadams_reset ((void *) state, dim); + + state->driver = NULL; + + return state; +} + +static int +msadams_failurehandler (void *vstate, const size_t dim, const double t) +{ + /* Internal failure handler routine for msadams. Adjusted strategy + for GSL: Decrease order if this is the second time a failure + has occurred at this order and point. + */ + + msadams_state_t *state = (msadams_state_t *) vstate; + + const size_t ord = state->ord; + + if (ord > 1 && (ord - state->ordprev == 0) && + ord == state->failord && t == state->failt) + { + state->ord--; + } + + /* Save information about failure */ + + state->failord = ord; + state->failt = t; + state->ni++; + + /* Force reinitialization if failure took place at lowest + order + */ + + if (ord == 1) + { + msadams_reset (vstate, dim); + } + + return GSL_SUCCESS; +} + +static int +msadams_calccoeffs (const size_t ord, const size_t ordwait, + const double h, const double hprev[], + double pc[], double l[], + double *errcoeff, double *ordm1coeff, + double *ordp1coeff, double *ordp2coeff) +{ + + /* Calculates coefficients (l) of polynomial Lambda, error and + auxiliary order change evaluation coefficients. + */ + + if (ord == 1) + { + l[0] = 1.0; + l[1] = 1.0; + *errcoeff = 0.5; + *ordp1coeff = 1.0; + *ordp2coeff = 12.0; + } + else + { + size_t i, j; + double hsum = h; + double st1 = 0.0; /* sum term coefficients */ + double st2 = 0.0; + + /* Calculate coefficients (pc) of product terms */ + + DBL_ZERO_MEMSET (pc, MSADAMS_MAX_ORD + 1); + + pc[0] = 1.0; + + for (i = 1; i < ord; i++) + { + /* Calculate auxiliary coefficient used in evaluation of + change of order + */ + + if (i == ord - 1 && ordwait == 1) + { + int s = 1; + + *ordm1coeff = 0.0; + + for (j = 0; j < ord - 1; j++) + { + *ordm1coeff += s * pc[j] / (j + 2); + s = -s; + } + + *ordm1coeff = pc[ord - 2] / (ord * (*ordm1coeff)); + } + + for (j = i; j > 0; j--) + { + pc[j] += pc[j - 1] * h / hsum; + } + + hsum += hprev[i - 1]; + } + + /* Calculate sum term 1 for error estimation */ + + { + int s = 1; + + for (i = 0; i < ord; i++) + { + st1 += s * pc[i] / (i + 1.0); + s = -s; + } + } + + /* Calculate sum term 2 for error estimation */ + + { + int s = 1; + + for (i = 0; i < ord; i++) + { + st2 += s * pc[i] / (i + 2.0); + s = -s; + } + } + + /* Calculate the actual polynomial coefficients (l) */ + + DBL_ZERO_MEMSET (l, MSADAMS_MAX_ORD + 1); + + l[0] = 1.0; + + for (i = 1; i < ord + 1; i++) + { + l[i] = pc[i - 1] / (i * st1); + } + +#ifdef DEBUG + { + size_t di; + + printf ("-- calccoeffs l: "); + for (di = 0; di < ord + 1; di++) + { + printf ("%.5e ", l[di]); + } + printf ("\n"); + + printf ("-- calccoeffs pc: "); + for (di = 0; di < ord; di++) + { + printf ("%.5e ", pc[di]); + } + printf ("\n"); + + printf ("-- calccoeffs st1=%.5e, st2=%.5e\n", st1, st2); + } +#endif + + /* Calculate error coefficient */ + + *errcoeff = (h / hsum) * (st2 / st1); + + /* Calculate auxiliary coefficients used in evaluation of change + of order + */ + + if (ordwait < 2) + { + int s = 1; + + *ordp1coeff = hsum / (h * l[ord]); + + *ordp2coeff = 0.0; + + for (i = ord; i > 0; i--) + { + pc[i] += pc[i - 1] * (h / hsum); + } + + for (i = 0; i < ord + 1; i++) + { + *ordp2coeff += s * pc[i] / (i + 2); + s = -s; + } + + *ordp2coeff = (ord + 1) * st1 / (*ordp2coeff); + } + } + +#ifdef DEBUG + printf ("-- calccoeffs ordm1coeff=%.5e ", *ordm1coeff); + printf ("ordp1coeff=%.5e ", *ordp1coeff); + printf ("ordp2coeff=%.5e ", *ordp2coeff); + printf ("errcoeff=%.5e\n", *errcoeff); +#endif + + return GSL_SUCCESS; +} + +static int +msadams_corrector (void *vstate, const gsl_odeiv2_system * sys, + const double t, const double h, const size_t dim, + const double z[], const double errlev[], + const double l[], const double errcoeff, + gsl_vector * abscor, gsl_vector * relcor, + double ytmp[], double ytmp2[]) +{ + /* Calculates the correction step (abscor). Non-linear equation + system is solved by functional iteration. + */ + + size_t mi, i; + const size_t max_iter = 3; /* Maximum number of iterations */ + double convrate = 1.0; /* convergence rate */ + double stepnorm = 0.0; /* norm of correction step */ + double stepnormprev = 0.0; + + /* Evaluate at predicted values */ + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, z, ytmp); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msadams_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + /* Calculate correction step (abscor) */ + + gsl_vector_set_zero (abscor); + + for (mi = 0; mi < max_iter; mi++) + { + const double safety = 0.3; + const double safety2 = 0.1; + + /* Calculate new y values to ytmp2 */ + + for (i = 0; i < dim; i++) + { + ytmp[i] *= h; + ytmp[i] -= z[1 * dim + i]; + ytmp[i] /= l[1]; + ytmp2[i] = z[0 * dim + i] + ytmp[i]; + } + +#ifdef DEBUG + { + size_t di; + printf ("-- dstep: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", ytmp[di]); + } + printf ("\n"); + } +#endif + /* Convergence test. Norms used are root-mean-square norms. */ + + for (i = 0; i < dim; i++) + { + gsl_vector_set (relcor, i, + (ytmp[i] - gsl_vector_get (abscor, i)) / errlev[i]); + gsl_vector_set (abscor, i, ytmp[i]); + } + + stepnorm = gsl_blas_dnrm2 (relcor) / sqrt (dim); + + if (mi > 0) + { + convrate = GSL_MAX_DBL (safety * convrate, stepnorm / stepnormprev); + } + else + { + convrate = 1.0; + } + + { + const double convtest = + GSL_MIN_DBL (convrate, 1.0) * stepnorm * errcoeff / safety2; + +#ifdef DEBUG + printf + ("-- func iter loop %d, errcoeff=%.5e, stepnorm =%.5e, convrate = %.5e, convtest = %.5e\n", + (int) mi, errcoeff, stepnorm, convrate, convtest); +#endif + if (convtest <= 1.0) + { + break; + } + } + + /* Check for divergence during iteration */ + { + const double div_const = 2.0; + + if (mi > 1 && stepnorm > div_const * stepnormprev) + { + msadams_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL, diverging functional iteration\n"); +#endif + return GSL_FAILURE; + } + } + + /* Evaluate at new y */ + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp2, ytmp); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msadams_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + stepnormprev = stepnorm; + } + +#ifdef DEBUG + printf ("-- functional iteration exit at mi=%d\n", (int) mi); +#endif + + /* Handle convergence failure */ + + if (mi == max_iter) + { + msadams_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL, max_iter reached\n"); +#endif + return GSL_FAILURE; + } + + return GSL_SUCCESS; +} + +static int +msadams_eval_order (gsl_vector * abscor, gsl_vector * tempvec, + gsl_vector * svec, const double errcoeff, + const size_t dim, const double errlev[], + const double ordm1coeff, const double ordp1coeff, + const double ordp1coeffprev, const double ordp2coeff, + const double hprev[], + const double h, const double z[], + size_t * ord, size_t * ordwait) +{ + /* Evaluates and executes change in method order (current, current-1 + or current+1). Order which maximizes the step length is selected. + */ + + size_t i; + + /* step size estimates at current order, order-1 and order+1 */ + double ordest = 0.0; + double ordm1est = 0.0; + double ordp1est = 0.0; + + const double safety = 1e-6; + const double bias = 6.0; + const double bias2 = 10.0; + + /* Relative step length estimate for current order */ + + ordest = 1.0 / (pow (bias * gsl_blas_dnrm2 (abscor) / sqrt (dim) + * errcoeff, 1.0 / (*ord + 1)) + safety); + + /* Relative step length estimate for order ord - 1 */ + + if (*ord > 1) + { + for (i = 0; i < dim; i++) + { + gsl_vector_set (tempvec, i, z[*ord * dim + i] / errlev[i]); + } + + ordm1est = 1.0 / (pow (bias * gsl_blas_dnrm2 (tempvec) / sqrt (dim) + / ordm1coeff, 1.0 / (*ord)) + safety); + } + else + { + ordm1est = 0.0; + } + + /* Relative step length estimate for order ord + 1 */ + + if (*ord < MSADAMS_MAX_ORD) + { + const double c = -ordp1coeff / ordp1coeffprev * + pow (h / hprev[1], *ord + 1); + + for (i = 0; i < dim; i++) + { + gsl_vector_set (svec, i, gsl_vector_get (svec, i) * c + + gsl_vector_get (abscor, i)); + } + + ordp1est = 1.0 / (pow (bias2 * gsl_blas_dnrm2 (svec) / sqrt (dim) + / ordp2coeff, 1.0 / (*ord + 2)) + safety); + } + else + { + ordp1est = 0.0; + } + +#ifdef DEBUG + printf + ("-- eval_order ord=%d, ordest=%.5e, ordm1est=%.5e, ordp1est=%.5e\n", + (int) *ord, ordest, ordm1est, ordp1est); +#endif + + /* Choose order that maximises step size and increases step + size markedly compared to current step + */ + + { + const double min_incr = 1.5; + + if (ordm1est > ordest && ordm1est > ordp1est && ordm1est > min_incr) + { + *ord -= 1; +#ifdef DEBUG + printf ("-- eval_order order DECREASED to %d\n", (int) *ord); +#endif + } + + else if (ordp1est > ordest && ordp1est > ordm1est && ordp1est > min_incr) + { + *ord += 1; +#ifdef DEBUG + printf ("-- eval_order order INCREASED to %d\n", (int) *ord); +#endif + } + } + + *ordwait = *ord + 2; + + + return GSL_SUCCESS; +} + + +static int +msadams_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], + const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * sys) +{ + /* Conducts a step by Adams linear multistep methods. */ + + msadams_state_t *state = (msadams_state_t *) vstate; + + double *const z = state->z; + double *const zbackup = state->zbackup; + double *const ytmp = state->ytmp; + double *const ytmp2 = state->ytmp2; + double *const pc = state->pc; + double *const l = state->l; + double *const hprev = state->hprev; + double *const hprevbackup = state->hprevbackup; + double *const errlev = state->errlev; + gsl_vector *const abscor = state->abscor; + gsl_vector *const relcor = state->relcor; + gsl_vector *const svec = state->svec; + gsl_vector *const tempvec = state->tempvec; + + size_t ord = state->ord; + double ordm1coeff = 0.0; + double ordp1coeff = 0.0; + double ordp2coeff = 0.0; + double errcoeff = 0.0; /* error coefficient */ + + int deltaord; + +#ifdef DEBUG + { + size_t di; + + printf ("msadams_apply: t=%.5e, ord=%d, h=%.5e, y:", t, (int) ord, h); + + for (di = 0; di < dim; di++) + { + printf ("%.5e ", y[di]); + } + printf ("\n"); + } +#endif + + /* Check if t is the same as on previous stepper call (or last + failed call). This means that calculation of previous step failed + or the step was rejected, and therefore previous state will be + restored or the method will be reset. + */ + + if (state->ni > 0 && (t == state->tprev || t == state->failt)) + { + if (state->ni == 1) + { + /* No step has been accepted yet, reset method */ + + msadams_reset (vstate, dim); +#ifdef DEBUG + printf ("-- first step was REJECTED, msadams_reset called\n"); +#endif + } + else + { + /* A succesful step has been saved, restore previous state. */ + + /* If previous step suggests order increase, but the step was + rejected, then do not increase order. + */ + + if (ord > state->ordprev) + { + state->ord = state->ordprev; + ord = state->ord; + } + + /* Restore previous state */ + + DBL_MEMCPY (z, zbackup, (MSADAMS_MAX_ORD + 1) * dim); + DBL_MEMCPY (hprev, hprevbackup, MSADAMS_MAX_ORD); + state->ordprev = state->ordprevbackup; + state->ordwait = state->ordwaitbackup; + +#ifdef DEBUG + printf ("-- previous step was REJECTED, state restored\n"); +#endif + } + + /* If step is repeatedly rejected, then reset method */ + + state->failcount++; + + { + const size_t max_failcount = 3; + + if (state->failcount > max_failcount && state->ni > 1) + { + msadams_reset (vstate, dim); + ord = state->ord; + +#ifdef DEBUG + printf ("-- max_failcount reached, msadams_reset called\n"); +#endif + } + } + } + else + { + /* The previous step was accepted. Backup current state. */ + + DBL_MEMCPY (zbackup, z, (MSADAMS_MAX_ORD + 1) * dim); + DBL_MEMCPY (hprevbackup, hprev, MSADAMS_MAX_ORD); + state->ordprevbackup = state->ordprev; + state->ordwaitbackup = state->ordwait; + + state->failcount = 0; + +#ifdef DEBUG + if (state->ni > 0) + { + printf ("-- previous step was ACCEPTED, state saved\n"); + } +#endif + } + +#ifdef DEBUG + printf ("-- ord=%d, ni=%ld, ordwait=%d\n", (int) ord, state->ni, + (int) state->ordwait); + printf ("-- ordprev: %d\n", (int) state->ordprev); +#endif + + /* Get desired error levels via gsl_odeiv2_control object through driver + object, which is a requirement for this stepper. + */ + + if (state->driver == NULL) + { + return GSL_EFAULT; + } + else + { + size_t i; + + for (i = 0; i < dim; i++) + { + if (dydt_in != NULL) + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + dydt_in[i], h, i, &errlev[i]); + } + else + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + 0.0, h, i, &errlev[i]); + } + } + } + +#ifdef DEBUG + { + size_t di; + printf ("-- errlev: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", errlev[di]); + } + printf ("\n"); + } +#endif + + /* On first call initialize Nordsieck matrix */ + + if (state->ni == 0) + { + size_t i; + + DBL_ZERO_MEMSET (z, (MSADAMS_MAX_ORD + 1) * dim); + + if (dydt_in != NULL) + { + DBL_MEMCPY (ytmp, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, ytmp); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + DBL_MEMCPY (&z[0 * dim], y, dim); + DBL_MEMCPY (&z[1 * dim], ytmp, dim); + + for (i = 0; i < dim; i++) + { + z[1 * dim + i] *= h; + } + } + + /* Sanity check */ + + deltaord = ord - state->ordprev; + + if (deltaord > 1 || deltaord < -1) + { + printf ("-- order change %d\n", deltaord); + GSL_ERROR_NULL ("msadams_apply too large order change", GSL_ESANITY); + } + + /* Modify Nordsieck matrix if order or step length has been changed */ + + /* If order increased by 1, initialize new Nordsieck vector */ + + if (deltaord == 1) + { + DBL_ZERO_MEMSET (&z[ord * dim], dim); + +#ifdef DEBUG + printf ("-- order increase detected, Nordsieck modified\n"); +#endif + } + + /* If order decreased by 1, adjust Nordsieck matrix */ + + if (deltaord == -1) + { + double hsum = 0.0; + size_t i, j; + + /* Calculate coefficients used in adjustment to l */ + + DBL_ZERO_MEMSET (l, MSADAMS_MAX_ORD + 1); + + l[1] = 1.0; + + for (i = 1; i < ord; i++) + { + hsum += hprev[i - 1]; + + for (j = i + 1; j > 0; j--) + { + l[j] *= hsum / hprev[0]; + l[j] += l[j - 1]; + } + } + + for (i = 1; i < ord; i++) + { + l[i + 1] = (ord + 1) * l[i] / (i + 1); + } + + /* Scale Nordsieck matrix */ + + for (i = 2; i < ord + 1; i++) + for (j = 0; j < dim; j++) + { + z[i * dim + j] += -l[i] * z[(ord + 1) * dim + j]; + } + +#ifdef DEBUG + printf ("-- order decrease detected, Nordsieck modified\n"); +#endif + } + + /* Scale Nordsieck vectors if step size has been changed */ + + if (state->ni > 0 && h != hprev[0]) + { + size_t i, j; + const double hrel = h / hprev[0]; + double coeff = hrel; + + for (i = 1; i < ord + 1; i++) + { + for (j = 0; j < dim; j++) + { + z[i * dim + j] *= coeff; + } + + coeff *= hrel; + } + +#ifdef DEBUG + printf ("-- h != hprev, Nordsieck modified\n"); +#endif + } + + /* Calculate polynomial coefficients (l), error coefficient and + auxiliary coefficients + */ + + msadams_calccoeffs (ord, state->ordwait, h, hprev, pc, l, &errcoeff, + º1coeff, &ordp1coeff, &ordp2coeff); + + /* Carry out the prediction step */ + + { + size_t i, j, k; + + for (i = 1; i < ord + 1; i++) + for (j = ord; j > i - 1; j--) + for (k = 0; k < dim; k++) + { + z[(j - 1) * dim + k] += z[j * dim + k]; + } + +#ifdef DEBUG + { + size_t di; + printf ("-- predicted y: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", z[di]); + } + printf ("\n"); + } +#endif + } + + /* Calculate correction step to abscor */ + { + int s; + s = msadams_corrector (vstate, sys, t, h, dim, z, errlev, l, errcoeff, + abscor, relcor, ytmp, ytmp2); + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + /* Add accepted final correction step to Nordsieck matrix */ + + size_t i, j; + + for (i = 0; i < ord + 1; i++) + for (j = 0; j < dim; j++) + { + z[i * dim + j] += l[i] * gsl_vector_get (abscor, j); + } + +#ifdef DEBUG + { + size_t di; + printf ("-- corrected y: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", z[di]); + } + printf ("\n"); + } +#endif + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, z, dydt_out); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msadams_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + /* Calculate error estimate */ + + for (i = 0; i < dim; i++) + { + yerr[i] = fabs (gsl_vector_get (abscor, i)) * errcoeff; + } + +#ifdef DEBUG + { + size_t di; + printf ("-- yerr: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", yerr[di]); + } + printf ("\n"); + } +#endif + + /* Save y values */ + + for (i = 0; i < dim; i++) + { + y[i] = z[0 * dim + i]; + } + } + + /* Scale abscor with errlev for later use in norm calculations */ + { + size_t i; + + for (i = 0; i < dim; i++) + { + gsl_vector_set (abscor, i, gsl_vector_get (abscor, i) / errlev[i]); + } + } + + /* Save items needed for evaluation of order increase on next + call, if needed + */ + + if (state->ordwait == 1 && ord < MSADAMS_MAX_ORD) + { + size_t i; + + state->ordp1coeffprev = ordp1coeff; + state->ordm1coeff = ordm1coeff; + + for (i = 0; i < dim; i++) + { + gsl_vector_set (svec, i, gsl_vector_get (abscor, i)); + } + } + + /* Consider and execute order change for next step */ + + if (state->ordwait == 0) + { + msadams_eval_order (abscor, tempvec, svec, errcoeff, dim, errlev, + state->ordm1coeff, ordp1coeff, + state->ordp1coeffprev, ordp2coeff, + hprev, h, z, &(state->ord), &(state->ordwait)); + } + + /* Save information about current step in state and update counters */ + { + size_t i; + + state->ordprev = ord; + + for (i = MSADAMS_MAX_ORD - 1; i > 0; i--) + { + hprev[i] = hprev[i - 1]; + } + hprev[0] = h; + +#ifdef DEBUG + { + size_t di; + printf ("-- hprev: "); + for (di = 0; di < MSADAMS_MAX_ORD; di++) + { + printf ("%.5e ", hprev[di]); + } + printf ("\n"); + } +#endif + + state->tprev = t; + state->ordwait--; + state->ni++; + } + + return GSL_SUCCESS; +} + +static int +msadams_set_driver (void *vstate, const gsl_odeiv2_driver * d) +{ + msadams_state_t *state = (msadams_state_t *) vstate; + + state->driver = d; + + return GSL_SUCCESS; +} + +static int +msadams_reset (void *vstate, size_t dim) +{ + msadams_state_t *state = (msadams_state_t *) vstate; + + state->ni = 0; + state->ord = 1; + state->ordprev = 1; + state->ordprevbackup = 1; + state->ordwait = 2; + state->ordwaitbackup = 2; + state->failord = 0; + state->failt = GSL_NAN; + state->failcount = 0; + + DBL_ZERO_MEMSET (state->hprev, MSADAMS_MAX_ORD); + DBL_ZERO_MEMSET (state->z, (MSADAMS_MAX_ORD + 1) * dim); + +#ifdef DEBUG + printf ("-- msadams_reset called\n"); +#endif + + return GSL_SUCCESS; +} + +static unsigned int +msadams_order (void *vstate) +{ + msadams_state_t *state = (msadams_state_t *) vstate; + + return state->ord; +} + +static void +msadams_free (void *vstate) +{ + msadams_state_t *state = (msadams_state_t *) vstate; + + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->pc); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); +} + +static const gsl_odeiv2_step_type msadams_type = { + "msadams", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &msadams_alloc, + &msadams_apply, + &msadams_set_driver, + &msadams_reset, + &msadams_order, + &msadams_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_msadams = &msadams_type; diff --git a/software/gsl-1.15/ode-initval2/msbdf.c b/software/gsl-1.15/ode-initval2/msbdf.c new file mode 100644 index 000000000..d6f28737d --- /dev/null +++ b/software/gsl-1.15/ode-initval2/msbdf.c @@ -0,0 +1,1774 @@ +/* ode-initval2/msbdf.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* A variable-coefficient linear multistep backward differentiation + formula (BDF) method in Nordsieck form. This stepper uses the + explicit BDF formula as predictor and implicit BDF formula as + corrector. A modified Newton iteration method is used to + solve the system of non-linear equations. Method order varies + dynamically between 1 and 5. + + References: + + Byrne, G. D., and Hindmarsh, A. C., A Polyalgorithm for the + Numerical Solution of Ordinary Differential Equations, + ACM Trans. Math. Software, 1 (1975), pp. 71-96. + + Brown, P. N., Byrne, G. D., and Hindmarsh, A. C., VODE: A + Variable-coefficient ODE Solver, SIAM J. Sci. Stat. Comput. 10, + (1989), pp. 1038-1051. + + Hindmarsh, A. C., Brown, P. N., Grant, K. E., Lee, S. L., Serban, + R., Shumaker, D. E., and Woodward, C. S., SUNDIALS: Suite of + Nonlinear and Differential/Algebraic Equation Solvers, ACM + Trans. Math. Software 31 (2005), pp. 363-396. + + Note: The algorithms have been adapted for GSL ode-initval2 + framework. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" + +/* Maximum order of BDF methods */ +#define MSBDF_MAX_ORD 5 + +/* Steps until Jacobian evaluation is forced */ +#define MSBDF_JAC_WAIT 50 + +/* Steps until iteration matrix M evaluation is forced */ +#define MSBDF_M_WAIT 20 + +typedef struct +{ + /* Nordsieck history matrix. Includes concatenated + Nordsieck vectors [y_n, h*y_n', (h^2/2!)*y_n'', ..., + (h^ord/ord!)*d^(ord)(y_n)]. Nordsieck vector number i is located + at z[i*dim] (i=0..ord). + */ + double *z; + + double *zbackup; /* backup of Nordsieck matrix */ + double *ytmp; /* work area */ + double *ytmp2; /* work area */ + double *l; /* polynomial coefficients */ + double *hprev; /* previous step sizes */ + double *hprevbackup; /* backup of hprev */ + size_t *ordprev; /* orders of previous calls */ + size_t *ordprevbackup; /* backup of ordprev */ + double *errlev; /* desired error level of y */ + gsl_vector *abscor; /* absolute y values for correction */ + gsl_vector *relcor; /* relative y values for correction */ + gsl_vector *svec; /* saved abscor & work area */ + gsl_vector *tempvec; /* work area */ + const gsl_odeiv2_driver *driver; /* pointer to gsl_odeiv2_driver object */ + gsl_matrix *dfdy; /* Jacobian */ + double *dfdt; /* storage for time derivative of f */ + gsl_matrix *M; /* Newton iteration matrix */ + gsl_permutation *p; /* permutation for LU decomposition of M */ + gsl_vector *rhs; /* right hand side equations (-G) */ + + long int ni; /* stepper call counter */ + size_t ord; /* current order of method */ + double tprev; /* t point of previous call */ + size_t ordwait; /* counter for order change */ + size_t ordwaitbackup; /* backup of ordwait */ + size_t failord; /* order of convergence failure */ + double failt; /* t point of convergence failure */ + double ordp1coeffprev; /* saved order coefficient */ + size_t nJ; /* step counter for Jacobian evaluation */ + size_t nM; /* step counter for update of M */ + double gammaprev; /* gamma of previous call */ + double gammaprevbackup; /* backup of gammaprev */ + size_t failcount; /* counter for rejected steps */ +} +msbdf_state_t; + +/* Introduce msbdf_reset for use in msbdf_alloc and _apply */ + +static int msbdf_reset (void *, size_t); + +static void * +msbdf_alloc (size_t dim) +{ + msbdf_state_t *state = (msbdf_state_t *) malloc (sizeof (msbdf_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for msbdf_state", GSL_ENOMEM); + } + + state->z = (double *) malloc ((MSBDF_MAX_ORD + 1) * dim * sizeof (double)); + + if (state->z == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for z", GSL_ENOMEM); + } + + state->zbackup = + (double *) malloc ((MSBDF_MAX_ORD + 1) * dim * sizeof (double)); + + if (state->zbackup == 0) + { + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for zbackup", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->ytmp2 = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp2 == 0) + { + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp2", GSL_ENOMEM); + } + + state->l = (double *) malloc ((MSBDF_MAX_ORD + 1) * sizeof (double)); + + if (state->l == 0) + { + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for l", GSL_ENOMEM); + } + + state->hprev = (double *) malloc (MSBDF_MAX_ORD * sizeof (double)); + + if (state->hprev == 0) + { + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for hprev", GSL_ENOMEM); + } + + state->hprevbackup = (double *) malloc (MSBDF_MAX_ORD * sizeof (double)); + + if (state->hprevbackup == 0) + { + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for hprevbackup", GSL_ENOMEM); + } + + state->ordprev = (size_t *) malloc (MSBDF_MAX_ORD * sizeof (size_t)); + + if (state->ordprev == 0) + { + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ordprev", GSL_ENOMEM); + } + + state->ordprevbackup = (size_t *) malloc (MSBDF_MAX_ORD * sizeof (size_t)); + + if (state->ordprevbackup == 0) + { + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ordprevbackup", + GSL_ENOMEM); + } + + state->errlev = (double *) malloc (dim * sizeof (double)); + + if (state->errlev == 0) + { + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for errlev", GSL_ENOMEM); + } + + state->abscor = gsl_vector_alloc (dim); + + if (state->abscor == 0) + { + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for abscor", GSL_ENOMEM); + } + + state->relcor = gsl_vector_alloc (dim); + + if (state->relcor == 0) + { + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for relcor", GSL_ENOMEM); + } + + state->svec = gsl_vector_alloc (dim); + + if (state->svec == 0) + { + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for svec", GSL_ENOMEM); + } + + state->tempvec = gsl_vector_alloc (dim); + + if (state->tempvec == 0) + { + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for tempvec", GSL_ENOMEM); + } + + state->dfdy = gsl_matrix_alloc (dim, dim); + + if (state->dfdy == 0) + { + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + gsl_matrix_free (state->dfdy); + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->M = gsl_matrix_alloc (dim, dim); + + if (state->M == 0) + { + free (state->dfdt); + gsl_matrix_free (state->dfdy); + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for M", GSL_ENOMEM); + } + + state->p = gsl_permutation_alloc (dim); + + if (state->p == 0) + { + gsl_matrix_free (state->M); + free (state->dfdt); + gsl_matrix_free (state->dfdy); + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for p", GSL_ENOMEM); + } + + state->rhs = gsl_vector_alloc (dim); + + if (state->rhs == 0) + { + gsl_permutation_free (state->p); + gsl_matrix_free (state->M); + free (state->dfdt); + gsl_matrix_free (state->dfdy); + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); + GSL_ERROR_NULL ("failed to allocate space for rhs", GSL_ENOMEM); + } + + msbdf_reset ((void *) state, dim); + + state->driver = NULL; + + return state; +} + +static int +msbdf_failurehandler (void *vstate, const size_t dim, const double t) +{ + /* Internal failure handler routine for msbdf. Adjusted strategy + for GSL: Decrease order if this is the second time a failure + has occurred at this order and point. + */ + + msbdf_state_t *state = (msbdf_state_t *) vstate; + + const size_t ord = state->ord; + + if (ord > 1 && (ord - state->ordprev[0] == 0) && + ord == state->failord && t == state->failt) + { + state->ord--; + } + + /* Save information about failure */ + + state->failord = ord; + state->failt = t; + state->ni++; + + /* Force reinitialization if failure took place at lowest + order + */ + + if (ord == 1) + { + msbdf_reset (vstate, dim); + } + + return GSL_SUCCESS; +} + +static int +msbdf_calccoeffs (const size_t ord, const size_t ordwait, + const double h, const double hprev[], + double l[], + double *errcoeff, double *ordm1coeff, + double *ordp1coeff, double *ordp2coeff, double *gamma) +{ + /* Calculates coefficients (l) of polynomial Lambda, error and + auxiliary order change evaluation coefficients. + */ + + if (ord == 1) + { + l[0] = 1.0; + l[1] = 1.0; + *errcoeff = 0.5; + *ordp1coeff = 2.0; + + { + const double hsum = h + hprev[0]; + + const double a5 = -1.5; + const double a6 = -1.0 - h / hsum; + const double c2 = 2.0 / (1.0 - a6 + a5); + + *ordp2coeff = fabs (c2 * (h / hsum) * 3.0 * a5); + } + } + else + { + size_t i, j; + double hsum = h; + double coeff1 = -1.0; + double x; + + /* Calculate the actual polynomial coefficients (l) */ + + DBL_ZERO_MEMSET (l, MSBDF_MAX_ORD + 1); + + l[0] = 1.0; + l[1] = 1.0; + + for (i = 2; i < ord; i++) + { + hsum += hprev[i - 2]; + coeff1 += -1.0 / i; + + for (j = i; j > 0; j--) + { + l[j] += h / hsum * l[j - 1]; + } + } + + coeff1 += -1.0 / ord; + + x = -l[1] - coeff1; + + for (i = ord; i > 0; i--) + { + l[i] += l[i - 1] * x; + } + +#ifdef DEBUG + { + size_t di; + + printf ("-- calccoeffs l: "); + for (di = 0; di < ord + 1; di++) + { + printf ("%.5e ", l[di]); + } + printf ("\n"); + } +#endif + + hsum += hprev[ord - 2]; + + { + const double coeff2 = -l[1] - h / hsum; + const double a1 = 1.0 - coeff2 + coeff1; + const double a2 = 1.0 + ord * a1; + + /* Calculate error coefficient */ + + *errcoeff = fabs (a1 / (coeff1 * a2)); + + /* Calculate auxiliary coefficients used in evaluation of change + of order + */ + + if (ordwait < 2) + { + const double a3 = coeff1 + 1.0 / ord; + const double a4 = coeff2 + h / hsum; + const double c1 = a3 / (1.0 - a4 + a3); + + *ordm1coeff = fabs (c1 / (x / l[ord])); + + *ordp1coeff = fabs (a2 / (l[ord] * (h / hsum) / x)); + + hsum += hprev[ord - 1]; + + { + const double a5 = coeff1 - 1.0 / (ord + 1.0); + const double a6 = coeff2 - h / hsum; + const double c2 = a2 / (1.0 - a6 + a5); + + *ordp2coeff = fabs (c2 * (h / hsum) * (ord + 2) * a5); + } + } + } + } + + *gamma = h / l[1]; + +#ifdef DEBUG + printf ("-- calccoeffs ordm1coeff=%.5e ", *ordm1coeff); + printf ("ordp1coeff=%.5e ", *ordp1coeff); + printf ("ordp2coeff=%.5e ", *ordp2coeff); + printf ("errcoeff=%.5e\n", *errcoeff); +#endif + + return GSL_SUCCESS; +} + +static int +msbdf_update (void *vstate, const size_t dim, gsl_matrix * dfdy, double *dfdt, + const double t, const double *y, const gsl_odeiv2_system * sys, + gsl_matrix * M, gsl_permutation * p, + const size_t iter, size_t * nJ, size_t * nM, + const double tprev, const double failt, + const double gamma, const double gammaprev, const double hratio) +{ + /* Evaluates Jacobian dfdy and updates iteration matrix M + if criteria for update is met. + */ + + /* Jacobian is evaluated + - at first step + - if MSBDF_JAC_WAIT steps have been made without re-evaluation + - in case of a convergence failure if + --- change in gamma is small, or + --- convergence failure resulted in step size decrease + */ + + const double c = 0.2; + const double gammarel = fabs (gamma / gammaprev - 1.0); + + if (*nJ == 0 || *nJ > MSBDF_JAC_WAIT || + (t == failt && (gammarel < c || hratio < 1.0))) + { +#ifdef DEBUG + printf ("-- evaluate jacobian\n"); +#endif + int s = GSL_ODEIV_JA_EVAL (sys, t, y, dfdy->data, dfdt); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msbdf_failurehandler (vstate, dim, t); +#ifdef DEBUG + printf ("-- FAIL at jacobian function evaluation\n"); +#endif + return s; + } + + /* Reset counter */ + + *nJ = 0; + } + + /* Iteration matrix M (and it's LU decomposition) is generated + - at first step + - if MSBDF_M_WAIT steps have been made without an update + - if change in gamma is significant (e.g. change in step size) + - if previous step was rejected + */ + + if (*nM == 0 || *nM > MSBDF_M_WAIT || gammarel >= c || + t == tprev || t == failt) + { +#ifdef DEBUG + printf ("-- update M, gamma=%.5e\n", gamma); +#endif + size_t i; + gsl_matrix_memcpy (M, dfdy); + gsl_matrix_scale (M, -gamma); + + for (i = 0; i < dim; i++) + { + gsl_matrix_set (M, i, i, gsl_matrix_get (M, i, i) + 1.0); + } + + { + int signum; + int s = gsl_linalg_LU_decomp (M, p, &signum); + + if (s != GSL_SUCCESS) + { + return GSL_FAILURE; + } + } + + /* Reset counter */ + + *nM = 0; + } + + return GSL_SUCCESS; +} + +static int +msbdf_corrector (void *vstate, const gsl_odeiv2_system * sys, + const double t, const double h, const size_t dim, + const double z[], const double errlev[], + const double l[], const double errcoeff, + gsl_vector * abscor, gsl_vector * relcor, + double ytmp[], double ytmp2[], + gsl_matrix * dfdy, double dfdt[], gsl_matrix * M, + gsl_permutation * p, gsl_vector * rhs, + size_t * nJ, size_t * nM, + const double tprev, const double failt, + const double gamma, const double gammaprev, + const double hprev0) +{ + /* Calculates the correction step (abscor). Equation + system M = I - gamma * dfdy = -G is solved by Newton iteration. + */ + + size_t mi, i; + const size_t max_iter = 3; /* Maximum number of iterations */ + double convrate = 1.0; /* convergence rate */ + double stepnorm = 0.0; /* norm of correction step */ + double stepnormprev = 0.0; /* previous norm value */ + + /* Evaluate at predicted values */ + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, z, ytmp); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + /* Calculate correction step (abscor) */ + + gsl_vector_set_zero (abscor); + + for (mi = 0; mi < max_iter; mi++) + { + const double safety = 0.3; + const double safety2 = 0.1; + + /* Generate or update Jacobian and/or iteration matrix M if needed */ + + if (mi == 0) + { + int s = msbdf_update (vstate, dim, dfdy, dfdt, t + h, z, + sys, M, p, mi, + nJ, nM, tprev, failt, + gamma, gammaprev, + h / hprev0); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Evaluate the right hand side (-G) */ + + for (i = 0; i < dim; i++) + { + const double r = -1.0 * gsl_vector_get (abscor, i) - + z[1 * dim + i] / l[1] + gamma * ytmp[i]; + + gsl_vector_set (rhs, i, r); + } + + /* Solve system of equations */ + + { + int s = gsl_linalg_LU_solve (M, p, rhs, relcor); + + if (s != GSL_SUCCESS) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at LU_solve\n"); +#endif + return GSL_FAILURE; + } + } + +#ifdef DEBUG + { + size_t di; + printf ("-- dstep: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", gsl_vector_get (relcor, di)); + } + printf ("\n"); + } +#endif + + /* Add iteration results */ + + for (i = 0; i < dim; i++) + { + const double r = + gsl_vector_get (abscor, i) + gsl_vector_get (relcor, i); + + gsl_vector_set (abscor, i, r); + + ytmp2[i] = z[i] + r; + + gsl_vector_set (relcor, i, gsl_vector_get (relcor, i) / errlev[i]); + } + +#ifdef DEBUG + { + size_t di; + printf ("-- abscor: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", gsl_vector_get (abscor, di)); + } + printf ("\n"); + } +#endif + + /* Convergence test. Norms used are root-mean-square norms. */ + + stepnorm = gsl_blas_dnrm2 (relcor) / sqrt (dim); + + if (mi > 0) + { + convrate = GSL_MAX_DBL (safety * convrate, stepnorm / stepnormprev); + } + else + { + convrate = 1.0; + } + + { + const double convtest = + GSL_MIN_DBL (convrate, 1.0) * stepnorm * errcoeff / safety2; + +#ifdef DEBUG + printf + ("-- newt iter loop %d, errcoeff=%.5e, stepnorm =%.5e, convrate = %.5e, convtest = %.5e\n", + (int) mi, errcoeff, stepnorm, convrate, convtest); +#endif + if (convtest <= 1.0) + { + break; + } + } + + /* Check for divergence during iteration */ + + { + const double div_const = 2.0; + + if (mi > 1 && stepnorm > div_const * stepnormprev) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL, diverging Newton iteration\n"); +#endif + return GSL_FAILURE; + } + } + + /* Evaluate at new y */ + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp2, ytmp); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + stepnormprev = stepnorm; + } + +#ifdef DEBUG + printf ("-- Newton iteration exit at mi=%d\n", (int) mi); +#endif + + /* Handle convergence failure */ + + if (mi == max_iter) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL, max_iter reached\n"); +#endif + return GSL_FAILURE; + } + + return GSL_SUCCESS; +} + +static int +msbdf_eval_order (gsl_vector * abscor, gsl_vector * tempvec, + gsl_vector * svec, const double errcoeff, + const size_t dim, const double errlev[], + const double ordm1coeff, const double ordp1coeff, + const double ordp1coeffprev, const double ordp2coeff, + const double hprev[], + const double h, const double z[], + size_t * ord, size_t * ordwait) +{ + /* Evaluates and executes change in method order (current, current-1 + or current+1). Order which maximizes the step length is selected. + */ + + size_t i; + + /* step size estimates at current order, order-1 and order+1 */ + double ordest = 0.0; + double ordm1est = 0.0; + double ordp1est = 0.0; + + const double safety = 1e-6; + const double bias = 6.0; + const double bias2 = 10.0; + const double min_incr = 1.5; + + /* Relative step length estimate for current order */ + + ordest = 1.0 / (pow (bias * gsl_blas_dnrm2 (abscor) / sqrt (dim) + * errcoeff, 1.0 / (*ord + 1)) + safety); + + /* Relative step length estimate for order ord - 1 */ + + if (*ord > 1) + { + for (i = 0; i < dim; i++) + { + gsl_vector_set (tempvec, i, z[*ord * dim + i] / errlev[i]); + } + + ordm1est = 1.0 / (pow (bias * gsl_blas_dnrm2 (tempvec) / sqrt (dim) + / ordm1coeff, 1.0 / (*ord)) + safety); + } + else + { + ordm1est = 0.0; + } + + /* Relative step length estimate for order ord + 1 */ + + if (*ord < MSBDF_MAX_ORD) + { + const double c = -ordp1coeff / ordp1coeffprev * + pow (h / hprev[1], *ord + 1); + + for (i = 0; i < dim; i++) + { + gsl_vector_set (svec, i, gsl_vector_get (svec, i) * c + + gsl_vector_get (abscor, i)); + } + + ordp1est = 1.0 / (pow (bias2 * gsl_blas_dnrm2 (svec) / sqrt (dim) + / ordp2coeff, 1.0 / (*ord + 2)) + safety); + } + else + { + ordp1est = 0.0; + } + +#ifdef DEBUG + printf + ("-- eval_order ord=%d, ordest=%.5e, ordm1est=%.5e, ordp1est=%.5e\n", + (int) *ord, ordest, ordm1est, ordp1est); +#endif + + /* Choose order that maximises step size and increases step + size markedly compared to current step + */ + + if (ordm1est > ordest && ordm1est > ordp1est && ordm1est > min_incr) + { + *ord -= 1; +#ifdef DEBUG + printf ("-- eval_order order DECREASED to %d\n", (int) *ord); +#endif + } + + else if (ordp1est > ordest && ordp1est > ordm1est && ordp1est > min_incr) + { + *ord += 1; +#ifdef DEBUG + printf ("-- eval_order order INCREASED to %d\n", (int) *ord); +#endif + } + + *ordwait = *ord + 2; + + return GSL_SUCCESS; +} + +static int +msbdf_check_no_order_decrease (size_t const ordprev[]) +{ + /* Checks if order has not been decreased according to order history + array. Used in stability enhancement. + */ + + size_t i; + + for (i = 0; i < MSBDF_MAX_ORD - 1; i++) + { + if (ordprev[i + 1] > ordprev[i]) + { + return 0; + } + } + + return 1; +} + +static int +msbdf_check_step_size_decrease (double const hprev[]) +{ + /* Checks if step size has decreased markedly according to + step size history array. Used in stability enhancement. + */ + + size_t i; + double max = fabs (hprev[0]); + const double min = fabs (hprev[0]); + const double decrease_limit = 0.5; + + for (i = 1; i < MSBDF_MAX_ORD; i++) + { + const double h = fabs (hprev[i]); + + if (h > min && h > max) + { + max = h; + } + } + + if (min / max < decrease_limit) + { + return 1; + } + + return 0; +} + +static int +msbdf_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], + const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * sys) +{ + /* Carries out a step by BDF linear multistep methods. */ + + msbdf_state_t *state = (msbdf_state_t *) vstate; + + double *const z = state->z; + double *const zbackup = state->zbackup; + double *const ytmp = state->ytmp; + double *const ytmp2 = state->ytmp2; + double *const l = state->l; + double *const hprev = state->hprev; + double *const hprevbackup = state->hprevbackup; + size_t *const ordprev = state->ordprev; + size_t *const ordprevbackup = state->ordprevbackup; + double *const errlev = state->errlev; + gsl_vector *const abscor = state->abscor; + gsl_vector *const relcor = state->relcor; + gsl_vector *const svec = state->svec; + gsl_vector *const tempvec = state->tempvec; + + size_t ord = state->ord; /* order for this step */ + double ordm1coeff = 0.0; + double ordp1coeff = 0.0; + double ordp2coeff = 0.0; + double errcoeff = 0.0; /* error coefficient */ + double gamma = 0.0; /* gamma coefficient */ + + const size_t max_failcount = 3; + size_t i; + +#ifdef DEBUG + { + size_t di; + + printf ("msbdf_apply: t=%.5e, ord=%d, h=%.5e, y:", t, (int) ord, h); + + for (di = 0; di < dim; di++) + { + printf ("%.5e ", y[di]); + } + printf ("\n"); + } +#endif + + /* Check if t is the same as on previous stepper call (or last + failed call). This means that calculation of previous step failed + or the step was rejected, and therefore previous state will be + restored or the method will be reset. + */ + + if (state->ni > 0 && (t == state->tprev || t == state->failt)) + { + if (state->ni == 1) + { + /* No step has been accepted yet, reset method */ + + msbdf_reset (vstate, dim); +#ifdef DEBUG + printf ("-- first step was REJECTED, msbdf_reset called\n"); +#endif + } + else + { + /* A succesful step has been saved, restore previous state. */ + + /* If previous step suggests order increase, but the step was + rejected, then do not increase order. + */ + + if (ord > ordprev[0]) + { + state->ord = ordprev[0]; + ord = state->ord; + } + + /* Restore previous state */ + + DBL_MEMCPY (z, zbackup, (MSBDF_MAX_ORD + 1) * dim); + DBL_MEMCPY (hprev, hprevbackup, MSBDF_MAX_ORD); + + for (i = 0; i < MSBDF_MAX_ORD; i++) + { + ordprev[i] = ordprevbackup[i]; + } + + state->ordwait = state->ordwaitbackup; + state->gammaprev = state->gammaprevbackup; + +#ifdef DEBUG + printf ("-- previous step was REJECTED, state restored\n"); +#endif + } + + /* If step is repeatedly rejected, then reset method */ + + state->failcount++; + + if (state->failcount > max_failcount && state->ni > 1) + { + msbdf_reset (vstate, dim); + ord = state->ord; + +#ifdef DEBUG + printf ("-- max_failcount reached, msbdf_reset called\n"); +#endif + } + } + else + { + /* The previous step was accepted. Backup current state. */ + + DBL_MEMCPY (zbackup, z, (MSBDF_MAX_ORD + 1) * dim); + DBL_MEMCPY (hprevbackup, hprev, MSBDF_MAX_ORD); + + for (i = 0; i < MSBDF_MAX_ORD; i++) + { + ordprevbackup[i] = ordprev[i]; + } + + state->ordwaitbackup = state->ordwait; + state->gammaprevbackup = state->gammaprev; + + state->failcount = 0; + +#ifdef DEBUG + if (state->ni > 0) + { + printf ("-- previous step was ACCEPTED, state saved\n"); + } +#endif + } + +#ifdef DEBUG + printf ("-- ord=%d, ni=%ld, ordwait=%d\n", (int) ord, state->ni, + (int) state->ordwait); + + size_t di; + printf ("-- ordprev: "); + + for (di = 0; di < MSBDF_MAX_ORD; di++) + { + printf ("%d ", (int) ordprev[di]); + } + + printf ("\n"); +#endif + + /* Get desired error levels via gsl_odeiv2_control object through driver + object, which is a requirement for this stepper. + */ + + if (state->driver == NULL) + { + return GSL_EFAULT; + } + else + { + size_t i; + + for (i = 0; i < dim; i++) + { + if (dydt_in != NULL) + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + dydt_in[i], h, i, &errlev[i]); + } + else + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + 0.0, h, i, &errlev[i]); + } + } + } + +#ifdef DEBUG + { + size_t di; + printf ("-- errlev: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", errlev[di]); + } + printf ("\n"); + } +#endif + + /* On first call initialize Nordsieck matrix */ + + if (state->ni == 0) + { + size_t i; + + DBL_ZERO_MEMSET (z, (MSBDF_MAX_ORD + 1) * dim); + + if (dydt_in != NULL) + { + DBL_MEMCPY (ytmp, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, ytmp); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + DBL_MEMCPY (&z[0 * dim], y, dim); + DBL_MEMCPY (&z[1 * dim], ytmp, dim); + + for (i = 0; i < dim; i++) + { + z[1 * dim + i] *= h; + } + } + + /* Stability enhancement heuristic for msbdf: If order > 1 and order + has not been changed, check for decrease in step size, that is + not accompanied by a decrease in method order. This condition may + be indication of BDF method stability problems, a change in ODE + system, or convergence problems in Newton iteration. In all + cases, the strategy is to decrease method order. + */ + +#ifdef DEBUG + printf ("-- check_no_order_decrease %d, check_step_size_decrease %d\n", + msbdf_check_no_order_decrease (ordprev), + msbdf_check_step_size_decrease (hprev)); +#endif + + if (ord > 1 && + ord - ordprev[0] == 0 && + msbdf_check_no_order_decrease (ordprev) && + msbdf_check_step_size_decrease (hprev)) + { + state->ord--; + state->ordwait = ord + 2; + ord = state->ord; + +#ifdef DEBUG + printf ("-- stability enhancement decreased order to %d\n", (int) ord); +#endif + } + + /* Sanity check */ + + { + const int deltaord = ord - ordprev[0]; + + if (deltaord > 1 || deltaord < -1) + { + printf ("-- order change %d\n", deltaord); + GSL_ERROR_NULL ("msbdf_apply too large order change", GSL_ESANITY); + } + + /* Modify Nordsieck matrix if order or step length has been changed */ + + /* If order increased by 1, adjust Nordsieck matrix */ + + if (deltaord == 1) + { + if (ord > 2) + { + size_t i, j; + double hsum = h; + double coeff1 = -1.0; + double coeff2 = 1.0; + double hrelprev = 1.0; + double hrelprod = 1.0; + double hrel = 0.0; + + /* Calculate coefficients used in adjustment to l */ + + DBL_ZERO_MEMSET (l, MSBDF_MAX_ORD + 1); + + l[2] = 1.0; + + for (i = 1; i < ord - 1; i++) + { + hsum += hprev[i]; + hrel = hsum / h; + hrelprod *= hrel; + coeff1 -= 1.0 / (i + 1); + coeff2 += 1.0 / hrel; + + for (j = i + 2; j > 1; j--) + { + l[j] *= hrelprev; + l[j] += l[j - 1]; + } + + hrelprev = hrel; + } + + /* Scale Nordsieck matrix */ + + { + const double c = (-coeff1 - coeff2) / hrelprod; + + for (i = 0; i < dim; i++) + { + z[ord * dim + i] = c * gsl_vector_get (abscor, i); + } + } + for (i = 2; i < ord; i++) + for (j = 0; j < dim; j++) + { + z[i * dim + j] += l[i] * z[ord * dim + j]; + } + } + else + { + /* zero new vector for order incease from 1 to 2 */ + + DBL_ZERO_MEMSET (&z[ord * dim], dim); + } + +#ifdef DEBUG + printf ("-- order increase detected, Nordsieck modified\n"); +#endif + } + + /* If order decreased by 1, adjust Nordsieck matrix */ + + if (deltaord == -1) + { + size_t i, j; + double hsum = 0.0; + + /* Calculate coefficients used in adjustment to l */ + + DBL_ZERO_MEMSET (l, MSBDF_MAX_ORD + 1); + + l[2] = 1.0; + + for (i = 1; i < ord; i++) + { + hsum += hprev[i - 1]; + + for (j = i + 2; j > 1; j--) + { + l[j] *= hsum / h; + l[j] += l[j - 1]; + } + } + + /* Scale Nordsieck matrix */ + + for (i = 2; i < ord + 1; i++) + for (j = 0; j < dim; j++) + { + z[i * dim + j] += -l[i] * z[(ord + 1) * dim + j]; + } + +#ifdef DEBUG + printf ("-- order decrease detected, Nordsieck modified\n"); +#endif + } + + /* Scale Nordsieck vectors if step size has been changed */ + + if (state->ni > 0 && h != hprev[0]) + { + size_t i, j; + const double hrel = h / hprev[0]; + double coeff = hrel; + + for (i = 1; i < ord + 1; i++) + { + for (j = 0; j < dim; j++) + { + z[i * dim + j] *= coeff; + } + + coeff *= hrel; + } + +#ifdef DEBUG + printf ("-- h != hprev, Nordsieck modified\n"); +#endif + } + + /* Calculate polynomial coefficients (l), error coefficient and + auxiliary coefficients + */ + + msbdf_calccoeffs (ord, state->ordwait, h, hprev, l, &errcoeff, + º1coeff, &ordp1coeff, &ordp2coeff, &gamma); + + /* Carry out the prediction step */ + + { + size_t i, j, k; + + for (i = 1; i < ord + 1; i++) + for (j = ord; j > i - 1; j--) + for (k = 0; k < dim; k++) + { + z[(j - 1) * dim + k] += z[j * dim + k]; + } + +#ifdef DEBUG + { + size_t di; + printf ("-- predicted y: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", z[di]); + } + printf ("\n"); + } +#endif + } + + /* Calculate correction step to abscor */ + { + int s; + s = msbdf_corrector (vstate, sys, t, h, dim, z, errlev, l, errcoeff, + abscor, relcor, ytmp, ytmp2, + state->dfdy, state->dfdt, state->M, + state->p, state->rhs, + &(state->nJ), &(state->nM), + state->tprev, state->failt, gamma, + state->gammaprev, hprev[0]); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + /* Add accepted final correction step to Nordsieck matrix */ + + size_t i, j; + + for (i = 0; i < ord + 1; i++) + for (j = 0; j < dim; j++) + { + z[i * dim + j] += l[i] * gsl_vector_get (abscor, j); + } + +#ifdef DEBUG + { + size_t di; + printf ("---- l: "); + for (di = 0; di < ord + 1; di++) + { + printf ("%.5e ", l[di]); + } + printf ("\n"); + + printf ("-- corrected y: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", z[di]); + } + printf ("\n"); + } +#endif + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, z, dydt_out); + + if (s == GSL_EBADFUNC) + { + return s; + } + + if (s != GSL_SUCCESS) + { + msbdf_failurehandler (vstate, dim, t); + +#ifdef DEBUG + printf ("-- FAIL at user function evaluation\n"); +#endif + return s; + } + } + + /* Calculate error estimate */ + + for (i = 0; i < dim; i++) + { + yerr[i] = fabs (gsl_vector_get (abscor, i)) * errcoeff; + } + +#ifdef DEBUG + { + size_t di; + printf ("-- yerr: "); + for (di = 0; di < dim; di++) + { + printf ("%.5e ", yerr[di]); + } + printf ("\n"); + } +#endif + + /* Save y values */ + + for (i = 0; i < dim; i++) + { + y[i] = z[0 * dim + i]; + } + } + + /* Scale abscor with errlev for later use in norm calculations */ + { + size_t i; + + for (i = 0; i < dim; i++) + { + gsl_vector_set (abscor, i, gsl_vector_get (abscor, i) / errlev[i]); + } + } + + /* Save items needed for evaluation of order increase on next + call, if needed + */ + + if (state->ordwait == 1 && ord < MSBDF_MAX_ORD) + { + size_t i; + + state->ordp1coeffprev = ordp1coeff; + + for (i = 0; i < dim; i++) + { + gsl_vector_set (svec, i, gsl_vector_get (abscor, i)); + } + } + + /* Consider and execute order change for next step */ + + if (state->ordwait == 0) + { + msbdf_eval_order (abscor, tempvec, svec, errcoeff, dim, errlev, + ordm1coeff, ordp1coeff, + state->ordp1coeffprev, ordp2coeff, + hprev, h, z, &(state->ord), &(state->ordwait)); + } + + /* Undo scaling of abscor for possible order increase on next step */ + { + size_t i; + + for (i = 0; i < dim; i++) + { + gsl_vector_set (abscor, i, gsl_vector_get (abscor, i) * errlev[i]); + } + } + + /* Save information about current step in state and update counters */ + { + size_t i; + + for (i = MSBDF_MAX_ORD - 1; i > 0; i--) + { + hprev[i] = hprev[i - 1]; + ordprev[i] = ordprev[i - 1]; + } + } + + hprev[0] = h; + ordprev[0] = ord; + +#ifdef DEBUG + { + size_t di; + printf ("-- hprev: "); + for (di = 0; di < MSBDF_MAX_ORD; di++) + { + printf ("%.5e ", hprev[di]); + } + printf ("\n"); + } +#endif + + state->tprev = t; + state->ordwait--; + state->ni++; + state->gammaprev = gamma; + + state->nJ++; + state->nM++; + +#ifdef DEBUG + printf ("-- nJ=%d, nM=%d\n", (int) state->nJ, (int) state->nM); +#endif + } + + return GSL_SUCCESS; +} + +static int +msbdf_set_driver (void *vstate, const gsl_odeiv2_driver * d) +{ + msbdf_state_t *state = (msbdf_state_t *) vstate; + + state->driver = d; + + return GSL_SUCCESS; +} + +static int +msbdf_reset (void *vstate, size_t dim) +{ + msbdf_state_t *state = (msbdf_state_t *) vstate; + size_t i; + + state->ni = 0; + state->ord = 1; + state->ordwait = 2; + state->ordwaitbackup = 2; + state->failord = 0; + state->failt = GSL_NAN; + state->gammaprev = 1.0; + state->nJ = 0; + state->nM = 0; + state->failcount = 0; + + DBL_ZERO_MEMSET (state->hprev, MSBDF_MAX_ORD); + DBL_ZERO_MEMSET (state->hprevbackup, MSBDF_MAX_ORD); + DBL_ZERO_MEMSET (state->z, (MSBDF_MAX_ORD + 1) * dim); + DBL_ZERO_MEMSET (state->zbackup, (MSBDF_MAX_ORD + 1) * dim); + + for (i = 0; i < MSBDF_MAX_ORD; i++) + { + state->ordprev[i] = 1; + state->ordprevbackup[i] = 1; + } + +#ifdef DEBUG + printf ("-- msbdf_reset called\n"); +#endif + + return GSL_SUCCESS; +} + +static unsigned int +msbdf_order (void *vstate) +{ + msbdf_state_t *state = (msbdf_state_t *) vstate; + + return state->ord; +} + +static void +msbdf_free (void *vstate) +{ + msbdf_state_t *state = (msbdf_state_t *) vstate; + + gsl_vector_free (state->rhs); + gsl_permutation_free (state->p); + gsl_matrix_free (state->M); + free (state->dfdt); + gsl_matrix_free (state->dfdy); + gsl_vector_free (state->tempvec); + gsl_vector_free (state->svec); + gsl_vector_free (state->relcor); + gsl_vector_free (state->abscor); + free (state->errlev); + free (state->ordprevbackup); + free (state->ordprev); + free (state->hprevbackup); + free (state->hprev); + free (state->l); + free (state->ytmp2); + free (state->ytmp); + free (state->zbackup); + free (state->z); + free (state); +} + +static const gsl_odeiv2_step_type msbdf_type = { + "msbdf", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &msbdf_alloc, + &msbdf_apply, + &msbdf_set_driver, + &msbdf_reset, + &msbdf_order, + &msbdf_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_msbdf = &msbdf_type; diff --git a/software/gsl-1.15/ode-initval2/odeiv_util.h b/software/gsl-1.15/ode-initval2/odeiv_util.h new file mode 100644 index 000000000..a385f207c --- /dev/null +++ b/software/gsl-1.15/ode-initval2/odeiv_util.h @@ -0,0 +1,17 @@ +#define DBL_MEMCPY(dest,src,n) memcpy((dest),(src),(n)*sizeof(double)) +#define DBL_ZERO_MEMSET(dest,n) memset((dest),0,(n)*sizeof(double)) + +/* Error estimation safety coefficient for methods that use step + * doubling for error estimates. Error estimates are multiplied by + * this constant to ensure that the error of a step is not + * underestimated. + * + * The default safety value of 8.0 ensures 90% of samples lie within + * the error (assuming a Gaussian distribution with prior + * p(sigma) = 1 / sigma). Value of 1.0 conforms to equation + * by Ascher and Petzold (reference: Ascher, U.M., Petzold, L.R., + * Computer methods for ordinary differential and + * differential-algebraic equations, SIAM, Philadelphia, 1998). + */ + +#define ODEIV_ERR_SAFETY 8.0 diff --git a/software/gsl-1.15/ode-initval2/rk1imp.c b/software/gsl-1.15/ode-initval2/rk1imp.c new file mode 100644 index 000000000..a0a8b1f28 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk1imp.c @@ -0,0 +1,499 @@ +/* ode-initval2/rk1imp.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Implicit Euler a.k.a backward Euler method. */ + +/* Reference: Ascher, U.M., Petzold, L.R., Computer methods for + ordinary differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. +*/ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "rksubs.c" +#include "modnewton1.c" + +/* Stage of method */ +#define RK1IMP_STAGE 1 + +typedef struct +{ + gsl_matrix *A; /* Runge-Kutta coefficients */ + double *y_onestep; /* Result with one step */ + double *y_twostep; /* Result with two half steps */ + double *ytmp; /* Temporary work space */ + double *y_save; /* Backup space */ + double *YZ; /* Runge-Kutta points */ + double *fYZ; /* Derivatives at YZ */ + gsl_matrix *dfdy; /* Jacobian matrix */ + double *dfdt; /* time derivative of f */ + modnewton1_state_t *esol; /* nonlinear equation solver */ + double *errlev; /* desired error level of y */ + const gsl_odeiv2_driver *driver; /* pointer to driver object */ +} +rk1imp_state_t; + +static void * +rk1imp_alloc (size_t dim) +{ + rk1imp_state_t *state = (rk1imp_state_t *) malloc (sizeof (rk1imp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk1imp_state", + GSL_ENOMEM); + } + + state->A = gsl_matrix_alloc (RK1IMP_STAGE, RK1IMP_STAGE); + + if (state->A == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for A", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->y_twostep = (double *) malloc (dim * sizeof (double)); + + if (state->y_twostep == 0) + { + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_save = (double *) malloc (dim * sizeof (double)); + + if (state->y_save == 0) + { + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_save", GSL_ENOMEM); + } + + state->YZ = (double *) malloc (dim * RK1IMP_STAGE * sizeof (double)); + + if (state->YZ == 0) + { + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for YZ", GSL_ENOMEM); + } + + state->fYZ = (double *) malloc (dim * RK1IMP_STAGE * sizeof (double)); + + if (state->fYZ == 0) + { + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for fYZ", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->dfdy = gsl_matrix_alloc (dim, dim); + + if (state->dfdy == 0) + { + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->esol = modnewton1_alloc (dim, RK1IMP_STAGE); + + if (state->esol == 0) + { + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for esol", GSL_ENOMEM); + } + + state->errlev = (double *) malloc (dim * sizeof (double)); + + if (state->errlev == 0) + { + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for errlev", GSL_ENOMEM); + } + + state->driver = NULL; + + return state; +} + +static int +rk1imp_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], + const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * sys) +{ + /* Makes an implicit Euler step with size h and estimates the local + error of the step by step doubling. + */ + + rk1imp_state_t *state = (rk1imp_state_t *) vstate; + + double *const y_onestep = state->y_onestep; + double *const y_twostep = state->y_twostep; + double *const ytmp = state->ytmp; + double *const y_save = state->y_save; + double *const YZ = state->YZ; + double *const fYZ = state->fYZ; + gsl_matrix *const dfdy = state->dfdy; + double *const dfdt = state->dfdt; + double *const errlev = state->errlev; + + const modnewton1_state_t *esol = state->esol; + + /* Runge-Kutta coefficients */ + + gsl_matrix *A = state->A; + const double b[] = { 1.0 }; + const double c[] = { 1.0 }; + gsl_matrix_set (A, 0, 0, 1.0); + + if (esol == NULL) + { + GSL_ERROR ("no non-linear equation solver speficied", GSL_EINVAL); + } + + /* Get desired error levels via gsl_odeiv2_control object through driver + object, which is a requirement for this stepper. + */ + + if (state->driver == NULL) + { + return GSL_EFAULT; + } + else + { + size_t i; + + for (i = 0; i < dim; i++) + { + if (dydt_in != NULL) + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + dydt_in[i], h, i, &errlev[i]); + } + else + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + 0.0, h, i, &errlev[i]); + } + } + } + + /* Evaluate Jacobian for modnewton1 */ + + { + int s = GSL_ODEIV_JA_EVAL (sys, t, y, dfdy->data, dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Calculate a single step with size h */ + + { + int s = modnewton1_init ((void *) esol, A, h, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[0] * h, YZ, fYZ); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = rksubs (y_onestep, h, y, fYZ, b, RK1IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + return s; + } + + /* Error estimation by step doubling */ + + { + int s = modnewton1_init ((void *) esol, A, h / 2.0, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* 1st half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h / 2.0, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[0] * h / 2.0, YZ, fYZ); + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = rksubs (ytmp, h / 2.0, y, fYZ, b, RK1IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + return s; + } + + /* Save original y values in case of error */ + + DBL_MEMCPY (y_save, y, dim); + + /* 2nd half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t + h / 2.0, h / 2.0, + ytmp, sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h / 2.0 + c[0] * h / 2.0, YZ, fYZ); + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + /* Note: rk1imp returns y using the results from two half steps + instead of the single step since the results are freely + available and more precise. + */ + + int s = rksubs (y_twostep, h / 2.0, ytmp, fYZ, b, RK1IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + DBL_MEMCPY (y, y_save, dim); + return s; + } + } + + DBL_MEMCPY (y, y_twostep, dim); + + /* Error estimation */ + + { + size_t i; + for (i = 0; i < dim; i++) + { + yerr[i] = ODEIV_ERR_SAFETY * 0.5 * fabs (y_twostep[i] - y_onestep[i]); + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y_save, dim); + + return s; + } + } + + return GSL_SUCCESS; +} + +static int +rk1imp_set_driver (void *vstate, const gsl_odeiv2_driver * d) +{ + rk1imp_state_t *state = (rk1imp_state_t *) vstate; + + state->driver = d; + + return GSL_SUCCESS; +} + +static int +rk1imp_reset (void *vstate, size_t dim) +{ + rk1imp_state_t *state = (rk1imp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y_twostep, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_save, dim); + DBL_ZERO_MEMSET (state->YZ, dim); + DBL_ZERO_MEMSET (state->fYZ, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk1imp_order (void *vstate) +{ + rk1imp_state_t *state = (rk1imp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 1; +} + +static void +rk1imp_free (void *vstate) +{ + rk1imp_state_t *state = (rk1imp_state_t *) vstate; + + free (state->errlev); + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); +} + +static const gsl_odeiv2_step_type rk1imp_type = { + "rk1imp", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk1imp_alloc, + &rk1imp_apply, + &rk1imp_set_driver, + &rk1imp_reset, + &rk1imp_order, + &rk1imp_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk1imp = &rk1imp_type; diff --git a/software/gsl-1.15/ode-initval2/rk2.c b/software/gsl-1.15/ode-initval2/rk2.c new file mode 100644 index 000000000..4d0eaef20 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk2.c @@ -0,0 +1,251 @@ +/* ode-initval/rk2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 2(3), Euler-Cauchy */ + +/* Author: G. Jungman + */ + +/* Reference: Abramowitz & Stegun, section 25.5. Runge-Kutta 2nd (25.5.7) + and 3rd (25.5.8) order methods */ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *ytmp; +} +rk2_state_t; + +static void * +rk2_alloc (size_t dim) +{ + rk2_state_t *state = (rk2_state_t *) malloc (sizeof (rk2_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rk2_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const ytmp = state->ytmp; + + /* k1 step */ + /* k1 = f(t,y) */ + + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* k2 step */ + /* k2 = f(t + 0.5*h, y + 0.5*k1) */ + + for (i = 0; i < dim; i++) + { + ytmp[i] = y[i] + 0.5 * h * k1[i]; + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* k3 step */ + /* for 3rd order estimates, is used for error estimation + k3 = f(t + h, y - k1 + 2*k2) */ + + for (i = 0; i < dim; i++) + { + ytmp[i] = y[i] + h * (-k1[i] + 2.0 * k2[i]); + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* final sum */ + + for (i = 0; i < dim; i++) + { + /* Save original values if derivative evaluation below fails */ + ytmp[i] = y[i]; + + { + const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; + y[i] += h * ksum3; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, ytmp, dim); + + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + const double ksum3 = (k1[i] + 4.0 * k2[i] + k3[i]) / 6.0; + yerr[i] = h * (k2[i] - ksum3); + } + + return GSL_SUCCESS; +} + +static int +rk2_reset (void *vstate, size_t dim) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk2_order (void *vstate) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; +} + +static void +rk2_free (void *vstate) +{ + rk2_state_t *state = (rk2_state_t *) vstate; + free (state->k1); + free (state->k2); + free (state->k3); + free (state->ytmp); + free (state); +} + +static const gsl_odeiv2_step_type rk2_type = { "rk2", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk2_alloc, + &rk2_apply, + &stepper_set_driver_null, + &rk2_reset, + &rk2_order, + &rk2_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk2 = &rk2_type; diff --git a/software/gsl-1.15/ode-initval2/rk2imp.c b/software/gsl-1.15/ode-initval2/rk2imp.c new file mode 100644 index 000000000..9abac5dc9 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk2imp.c @@ -0,0 +1,507 @@ +/* ode-initval2/rk2imp.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Based on rk2imp.c by Gerard Jungman */ + +/* Runge-Kutta 2, Gaussian implicit. Also known as implicit midpoint + rule. Error estimation is carried out by the step doubling + method. + */ + +/* Reference: Ascher, U.M., Petzold, L.R., Computer methods for + ordinary differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. + */ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "rksubs.c" +#include "modnewton1.c" + +/* Stage of method */ +#define RK2IMP_STAGE 1 + +typedef struct +{ + gsl_matrix *A; /* Runge-Kutta coefficients */ + double *y_onestep; /* Result with one step */ + double *y_twostep; /* Result with two half steps */ + double *ytmp; /* Temporary work space */ + double *y_save; /* Backup space */ + double *YZ; /* Runge-Kutta points */ + double *fYZ; /* Derivatives at YZ */ + gsl_matrix *dfdy; /* Jacobian matrix */ + double *dfdt; /* time derivative of f */ + modnewton1_state_t *esol; /* nonlinear equation solver */ + double *errlev; /* desired error level of y */ + const gsl_odeiv2_driver *driver; /* pointer to driver object */ +} +rk2imp_state_t; + +static void * +rk2imp_alloc (size_t dim) +{ + rk2imp_state_t *state = (rk2imp_state_t *) malloc (sizeof (rk2imp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk2imp_state", + GSL_ENOMEM); + } + + state->A = gsl_matrix_alloc (RK2IMP_STAGE, RK2IMP_STAGE); + + if (state->A == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for A", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->y_twostep = (double *) malloc (dim * sizeof (double)); + + if (state->y_twostep == 0) + { + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_save = (double *) malloc (dim * sizeof (double)); + + if (state->y_save == 0) + { + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_save", GSL_ENOMEM); + } + + state->YZ = (double *) malloc (dim * RK2IMP_STAGE * sizeof (double)); + + if (state->YZ == 0) + { + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for YZ", GSL_ENOMEM); + } + + state->fYZ = (double *) malloc (dim * RK2IMP_STAGE * sizeof (double)); + + if (state->fYZ == 0) + { + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for fYZ", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->dfdy = gsl_matrix_alloc (dim, dim); + + if (state->dfdy == 0) + { + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->esol = modnewton1_alloc (dim, RK2IMP_STAGE); + + if (state->esol == 0) + { + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for esol", GSL_ENOMEM); + } + + state->errlev = (double *) malloc (dim * sizeof (double)); + + if (state->errlev == 0) + { + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for errlev", GSL_ENOMEM); + } + + state->driver = NULL; + + return state; +} + +static int +rk2imp_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], + const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * sys) +{ + /* Makes a Gaussian implicit 4th order Runge-Kutta step with size h + and estimates the local error of the step by step doubling. + */ + + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + double *const y_onestep = state->y_onestep; + double *const y_twostep = state->y_twostep; + double *const ytmp = state->ytmp; + double *const y_save = state->y_save; + double *const YZ = state->YZ; + double *const fYZ = state->fYZ; + gsl_matrix *const dfdy = state->dfdy; + double *const dfdt = state->dfdt; + double *const errlev = state->errlev; + + const modnewton1_state_t *esol = state->esol; + + /* Runge-Kutta coefficients */ + gsl_matrix *A = state->A; + const double b[] = { 1.0 }; + const double c[] = { 0.5 }; + gsl_matrix_set (A, 0, 0, 0.5); + + if (esol == NULL) + { + GSL_ERROR ("no non-linear equation solver speficied", GSL_EINVAL); + } + + /* Get desired error levels via gsl_odeiv2_control object through driver + object, which is a requirement for this stepper. + */ + + if (state->driver == NULL) + { + return GSL_EFAULT; + } + else + { + size_t i; + + for (i = 0; i < dim; i++) + { + if (dydt_in != NULL) + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + dydt_in[i], h, i, &errlev[i]); + } + else + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + 0.0, h, i, &errlev[i]); + } + } + } + + /* Evaluate Jacobian for modnewton1 */ + + { + int s = GSL_ODEIV_JA_EVAL (sys, t, y, dfdy->data, dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Calculate a single step with size h */ + + { + int s = modnewton1_init ((void *) esol, A, h, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[0] * h, YZ, fYZ); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = rksubs (y_onestep, h, y, fYZ, b, RK2IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Error estimation by step doubling */ + + { + int s = modnewton1_init ((void *) esol, A, h / 2.0, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* 1st half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h / 2.0, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + return s; + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[0] * h / 2.0, YZ, fYZ); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = rksubs (ytmp, h / 2.0, y, fYZ, b, RK2IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Save original y values in case of error */ + + DBL_MEMCPY (y_save, y, dim); + + /* 2nd half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t + h / 2.0, h / 2.0, + ytmp, sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h / 2.0 + c[0] * h / 2.0, YZ, fYZ); + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + /* Note: rk2imp returns y using the results from two half steps + instead of the single step since the results are freely + available and more precise. + */ + + int s = rksubs (y_twostep, h / 2.0, ytmp, fYZ, b, RK2IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + DBL_MEMCPY (y, y_save, dim); + return s; + } + } + + DBL_MEMCPY (y, y_twostep, dim); + + /* Error estimation */ + + { + size_t i; + for (i = 0; i < dim; i++) + { + yerr[i] = ODEIV_ERR_SAFETY * 0.5 * + fabs (y_twostep[i] - y_onestep[i]) / 3.0; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y_save, dim); + + return s; + } + } + + return GSL_SUCCESS; +} + +static int +rk2imp_set_driver (void *vstate, const gsl_odeiv2_driver * d) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + state->driver = d; + + return GSL_SUCCESS; +} + +static int +rk2imp_reset (void *vstate, size_t dim) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y_twostep, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_save, dim); + DBL_ZERO_MEMSET (state->YZ, dim); + DBL_ZERO_MEMSET (state->fYZ, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk2imp_order (void *vstate) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 2; +} + +static void +rk2imp_free (void *vstate) +{ + rk2imp_state_t *state = (rk2imp_state_t *) vstate; + + free (state->errlev); + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); +} + +static const gsl_odeiv2_step_type rk2imp_type = { + "rk2imp", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk2imp_alloc, + &rk2imp_apply, + &rk2imp_set_driver, + &rk2imp_reset, + &rk2imp_order, + &rk2imp_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk2imp = &rk2imp_type; diff --git a/software/gsl-1.15/ode-initval2/rk4.c b/software/gsl-1.15/ode-initval2/rk4.c new file mode 100644 index 000000000..626ae4e67 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk4.c @@ -0,0 +1,360 @@ +/* ode-initval/rk4.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 4th order, Classical */ + +/* Author: G. Jungman + */ + +/* Reference: Abramowitz & Stegun, section 25.5. equation 25.5.10 + + Error estimation by step doubling, see eg. Ascher, U.M., Petzold, + L.R., Computer methods for ordinary differential and + differential-algebraic equations, SIAM, Philadelphia, 1998. +*/ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +typedef struct +{ + double *k; + double *k1; + double *y0; + double *ytmp; + double *y_onestep; +} +rk4_state_t; + +static void * +rk4_alloc (size_t dim) +{ + rk4_state_t *state = (rk4_state_t *) malloc (sizeof (rk4_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk4_state", GSL_ENOMEM); + } + + state->k = (double *) malloc (dim * sizeof (double)); + + if (state->k == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state->k); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + free (state->ytmp); + free (state->y0); + free (state->k); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + +static int +rk4_step (double *y, const rk4_state_t * state, + const double h, const double t, const size_t dim, + const gsl_odeiv2_system * sys) +{ + /* Makes a Runge-Kutta 4th order advance with step size h. */ + + /* initial values of variables y. */ + const double *y0 = state->y0; + + /* work space */ + double *ytmp = state->ytmp; + + /* Runge-Kutta coefficients. Contains values of coefficient k1 + in the beginning + */ + double *k = state->k; + + size_t i; + + /* k1 step */ + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + 0.5 * h * k[i]; + } + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + 0.5 * h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 3.0 * k[i]; + ytmp[i] = y0[i] + h * k[i]; + } + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + y[i] += h / 6.0 * k[i]; + } + + return GSL_SUCCESS; +} + + +static int +rk4_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + + size_t i; + + double *const k = state->k; + double *const k1 = state->k1; + double *const y0 = state->y0; + double *const y_onestep = state->y_onestep; + + DBL_MEMCPY (y0, y, dim); + + if (dydt_in != NULL) + { + DBL_MEMCPY (k, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y0, k); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Error estimation is done by step doubling procedure */ + + /* Save first point derivatives */ + + DBL_MEMCPY (k1, k, dim); + + /* First traverse h with one step (save to y_onestep) */ + + DBL_MEMCPY (y_onestep, y, dim); + + { + int s = rk4_step (y_onestep, state, h, t, dim, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Then with two steps with half step length (save to y) */ + + DBL_MEMCPY (k, k1, dim); + + { + int s = rk4_step (y, state, h / 2.0, t, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* Update before second step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h / 2.0, y, k); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* Save original y0 to k1 for possible failures */ + DBL_MEMCPY (k1, y0, dim); + + /* Update y0 for second step */ + DBL_MEMCPY (y0, y, dim); + + { + int s = rk4_step (y, state, h / 2.0, t + h / 2.0, dim, sys); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, k1, dim); + return s; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, k1, dim); + return s; + } + } + + /* Error estimation */ + + for (i = 0; i < dim; i++) + { + yerr[i] = ODEIV_ERR_SAFETY * 0.5 * (y[i] - y_onestep[i]) / 15.0; + } + + return GSL_SUCCESS; +} + +static int +rk4_reset (void *vstate, size_t dim) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k, dim); + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_onestep, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk4_order (void *vstate) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 4; +} + +static void +rk4_free (void *vstate) +{ + rk4_state_t *state = (rk4_state_t *) vstate; + free (state->k); + free (state->k1); + free (state->y0); + free (state->ytmp); + free (state->y_onestep); + free (state); +} + +static const gsl_odeiv2_step_type rk4_type = { "rk4", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk4_alloc, + &rk4_apply, + &stepper_set_driver_null, + &rk4_reset, + &rk4_order, + &rk4_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk4 = &rk4_type; diff --git a/software/gsl-1.15/ode-initval2/rk4imp.c b/software/gsl-1.15/ode-initval2/rk4imp.c new file mode 100644 index 000000000..99267169a --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk4imp.c @@ -0,0 +1,532 @@ +/* ode-initval2/rk4imp.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Based on rk4imp.c by Gerard Jungman */ + +/* Gaussian implicit 4th order Runge-Kutta method. Error estimation + is carried out by the step doubling method. + */ + +/* References: + + Ascher, U.M., Petzold, L.R., Computer methods for ordinary + differential and differential-algebraic equations, SIAM, + Philadelphia, 1998. ISBN 0898714125, 9780898714128 +*/ + +#include +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "rksubs.c" +#include "modnewton1.c" + +/* Stage of method */ +#define RK4IMP_STAGE 2 + +typedef struct +{ + gsl_matrix *A; /* Runge-Kutta coefficients */ + double *y_onestep; /* Result with one step */ + double *y_twostep; /* Result with two half steps */ + double *ytmp; /* Temporary work space */ + double *y_save; /* Backup space */ + double *YZ; /* Runge-Kutta points */ + double *fYZ; /* Derivatives at YZ */ + gsl_matrix *dfdy; /* Jacobian matrix */ + double *dfdt; /* time derivative of f */ + modnewton1_state_t *esol; /* nonlinear equation solver */ + double *errlev; /* desired error level of y */ + const gsl_odeiv2_driver *driver; /* pointer to driver object */ +} +rk4imp_state_t; + +static void * +rk4imp_alloc (size_t dim) +{ + rk4imp_state_t *state = (rk4imp_state_t *) malloc (sizeof (rk4imp_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk4imp_state", + GSL_ENOMEM); + } + + state->A = gsl_matrix_alloc (RK4IMP_STAGE, RK4IMP_STAGE); + + if (state->A == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for A", GSL_ENOMEM); + } + + state->y_onestep = (double *) malloc (dim * sizeof (double)); + + if (state->y_onestep == 0) + { + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->y_twostep = (double *) malloc (dim * sizeof (double)); + + if (state->y_twostep == 0) + { + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_onestep", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y_save = (double *) malloc (dim * sizeof (double)); + + if (state->y_save == 0) + { + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y_save", GSL_ENOMEM); + } + + state->YZ = (double *) malloc (dim * RK4IMP_STAGE * sizeof (double)); + + if (state->YZ == 0) + { + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for YZ", GSL_ENOMEM); + } + + state->fYZ = (double *) malloc (dim * RK4IMP_STAGE * sizeof (double)); + + if (state->fYZ == 0) + { + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for fYZ", GSL_ENOMEM); + } + + state->dfdt = (double *) malloc (dim * sizeof (double)); + + if (state->dfdt == 0) + { + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdt", GSL_ENOMEM); + } + + state->dfdy = gsl_matrix_alloc (dim, dim); + + if (state->dfdy == 0) + { + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for dfdy", GSL_ENOMEM); + } + + state->esol = modnewton1_alloc (dim, RK4IMP_STAGE); + + if (state->esol == 0) + { + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for esol", GSL_ENOMEM); + } + + state->errlev = (double *) malloc (dim * sizeof (double)); + + if (state->errlev == 0) + { + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); + GSL_ERROR_NULL ("failed to allocate space for errlev", GSL_ENOMEM); + } + + state->driver = NULL; + + return state; +} + +static int +rk4imp_apply (void *vstate, size_t dim, double t, double h, + double y[], double yerr[], + const double dydt_in[], double dydt_out[], + const gsl_odeiv2_system * sys) +{ + /* Makes a Gaussian implicit 4th order Runge-Kutta with step size h + and estimates the local error of the step. + */ + + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + double *const y_onestep = state->y_onestep; + double *const y_twostep = state->y_twostep; + double *const ytmp = state->ytmp; + double *const y_save = state->y_save; + double *const YZ = state->YZ; /* Runge-Kutta points */ + double *const fYZ = state->fYZ; + gsl_matrix *const dfdy = state->dfdy; + double *const dfdt = state->dfdt; + double *const errlev = state->errlev; + + const modnewton1_state_t *esol = state->esol; + + /* Runge-Kutta coefficients */ + + gsl_matrix *A = state->A; + + const double b[] = { 0.5, 0.5 }; + const double c[] = { (3 - sqrt (3)) / 6, (3 + sqrt (3)) / 6 }; + + gsl_matrix_set (A, 0, 0, 1.0 / 4); + gsl_matrix_set (A, 0, 1, (3 - 2 * sqrt (3)) / 12); + gsl_matrix_set (A, 1, 0, (3 + 2 * sqrt (3)) / 12); + gsl_matrix_set (A, 1, 1, 1.0 / 4); + + if (esol == NULL) + { + GSL_ERROR ("no non-linear equation solver speficied", GSL_EINVAL); + } + + /* Get desired error levels via gsl_odeiv2_control object through driver + object, which is a requirement for this stepper. + */ + + if (state->driver == NULL) + { + return GSL_EFAULT; + } + else + { + size_t i; + + for (i = 0; i < dim; i++) + { + if (dydt_in != NULL) + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + dydt_in[i], h, i, &errlev[i]); + } + else + { + gsl_odeiv2_control_errlevel (state->driver->c, y[i], + 0.0, h, i, &errlev[i]); + } + } + } + + /* Evaluate Jacobian for modnewton1 */ + + { + int s = GSL_ODEIV_JA_EVAL (sys, t, y, dfdy->data, dfdt); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Calculate a single step with size h */ + + { + int s = modnewton1_init ((void *) esol, A, h, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + size_t j; + + for (j = 0; j < RK4IMP_STAGE; j++) + { + int s = + GSL_ODEIV_FN_EVAL (sys, t + c[j] * h, &YZ[j * dim], &fYZ[j * dim]); + + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + { + int s = rksubs (y_onestep, h, y, fYZ, b, RK4IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* Error estimation by step doubling */ + + { + int s = modnewton1_init ((void *) esol, A, h / 2.0, dfdy, sys); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* 1st half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t, h / 2.0, y, + sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + size_t j; + + for (j = 0; j < RK4IMP_STAGE; j++) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + c[j] * h / 2.0, &YZ[j * dim], + &fYZ[j * dim]); + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + { + int s = rksubs (ytmp, h / 2.0, y, fYZ, b, RK4IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + return s; + } + + /* Save original y values in case of error */ + + DBL_MEMCPY (y_save, y, dim); + + /* 2nd half step */ + + { + int s = modnewton1_solve ((void *) esol, A, c, t + h / 2.0, h / 2.0, + ytmp, sys, YZ, errlev); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + { + size_t j; + + for (j = 0; j < RK4IMP_STAGE; j++) + { + int s = + GSL_ODEIV_FN_EVAL (sys, t + h / 2.0 + c[j] * h / 2.0, &YZ[j * dim], + &fYZ[j * dim]); + if (s != GSL_SUCCESS) + { + return s; + } + } + } + + { + int s = rksubs (y_twostep, h / 2.0, ytmp, fYZ, b, RK4IMP_STAGE, dim); + + if (s != GSL_SUCCESS) + { + DBL_MEMCPY (y, y_save, dim); + return s; + } + } + + /* Note: rk4imp returns y using the results from two half steps + instead of the single step since the results are freely + available and more precise. + */ + + DBL_MEMCPY (y, y_twostep, dim); + + /* Error estimation */ + + { + size_t i; + for (i = 0; i < dim; i++) + { + yerr[i] = ODEIV_ERR_SAFETY * 0.5 * + fabs (y_twostep[i] - y_onestep[i]) / 15.0; + } + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore original values */ + DBL_MEMCPY (y, y_save, dim); + + return s; + } + } + + return GSL_SUCCESS; +} + +static int +rk4imp_set_driver (void *vstate, const gsl_odeiv2_driver * d) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + state->driver = d; + + return GSL_SUCCESS; +} + +static int +rk4imp_reset (void *vstate, size_t dim) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + DBL_ZERO_MEMSET (state->y_onestep, dim); + DBL_ZERO_MEMSET (state->y_twostep, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y_save, dim); + DBL_ZERO_MEMSET (state->YZ, dim * RK4IMP_STAGE); + DBL_ZERO_MEMSET (state->fYZ, dim * RK4IMP_STAGE); + + return GSL_SUCCESS; +} + +static unsigned int +rk4imp_order (void *vstate) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 4; +} + +static void +rk4imp_free (void *vstate) +{ + rk4imp_state_t *state = (rk4imp_state_t *) vstate; + + free (state->errlev); + modnewton1_free (state->esol); + gsl_matrix_free (state->dfdy); + free (state->dfdt); + free (state->fYZ); + free (state->YZ); + free (state->y_save); + free (state->ytmp); + free (state->y_twostep); + free (state->y_onestep); + gsl_matrix_free (state->A); + free (state); +} + +static const gsl_odeiv2_step_type rk4imp_type = { + "rk4imp", /* name */ + 1, /* can use dydt_in? */ + 1, /* gives exact dydt_out? */ + &rk4imp_alloc, + &rk4imp_apply, + &rk4imp_set_driver, + &rk4imp_reset, + &rk4imp_order, + &rk4imp_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk4imp = &rk4imp_type; diff --git a/software/gsl-1.15/ode-initval2/rk8pd.c b/software/gsl-1.15/ode-initval2/rk8pd.c new file mode 100644 index 000000000..5880f141c --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rk8pd.c @@ -0,0 +1,546 @@ +/* ode-initval2/rk8pd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 8(9), Prince-Dormand + * + * High Order Embedded Runge-Kutta Formulae + * P.J. Prince and J.R. Dormand + * J. Comp. Appl. Math.,7, pp. 67-75, 1981 + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +/* Prince-Dormand constants */ + +static const double Abar[] = { + 14005451.0 / 335480064.0, + 0.0, + 0.0, + 0.0, + 0.0, + -59238493.0 / 1068277825.0, + 181606767.0 / 758867731.0, + 561292985.0 / 797845732.0, + -1041891430.0 / 1371343529.0, + 760417239.0 / 1151165299.0, + 118820643.0 / 751138087.0, + -528747749.0 / 2220607170.0, + 1.0 / 4.0 +}; + +static const double A[] = { + 13451932.0 / 455176623.0, + 0.0, + 0.0, + 0.0, + 0.0, + -808719846.0 / 976000145.0, + 1757004468.0 / 5645159321.0, + 656045339.0 / 265891186.0, + -3867574721.0 / 1518517206.0, + 465885868.0 / 322736535.0, + 53011238.0 / 667516719.0, + 2.0 / 45.0 +}; + +static const double ah[] = { + 1.0 / 18.0, + 1.0 / 12.0, + 1.0 / 8.0, + 5.0 / 16.0, + 3.0 / 8.0, + 59.0 / 400.0, + 93.0 / 200.0, + 5490023248.0 / 9719169821.0, + 13.0 / 20.0, + 1201146811.0 / 1299019798.0 +}; + +static const double b21 = 1.0 / 18.0; +static const double b3[] = { 1.0 / 48.0, 1.0 / 16.0 }; +static const double b4[] = { 1.0 / 32.0, 0.0, 3.0 / 32.0 }; +static const double b5[] = { 5.0 / 16.0, 0.0, -75.0 / 64.0, 75.0 / 64.0 }; +static const double b6[] = { 3.0 / 80.0, 0.0, 0.0, 3.0 / 16.0, 3.0 / 20.0 }; + +static const double b7[] = { + 29443841.0 / 614563906.0, + 0.0, + 0.0, + 77736538.0 / 692538347.0, + -28693883.0 / 1125000000.0, + 23124283.0 / 1800000000.0 +}; + +static const double b8[] = { + 16016141.0 / 946692911.0, + 0.0, + 0.0, + 61564180.0 / 158732637.0, + 22789713.0 / 633445777.0, + 545815736.0 / 2771057229.0, + -180193667.0 / 1043307555.0 +}; + +static const double b9[] = { + 39632708.0 / 573591083.0, + 0.0, + 0.0, + -433636366.0 / 683701615.0, + -421739975.0 / 2616292301.0, + 100302831.0 / 723423059.0, + 790204164.0 / 839813087.0, + 800635310.0 / 3783071287.0 +}; + +static const double b10[] = { + 246121993.0 / 1340847787.0, + 0.0, + 0.0, + -37695042795.0 / 15268766246.0, + -309121744.0 / 1061227803.0, + -12992083.0 / 490766935.0, + 6005943493.0 / 2108947869.0, + 393006217.0 / 1396673457.0, + 123872331.0 / 1001029789.0 +}; + +static const double b11[] = { + -1028468189.0 / 846180014.0, + 0.0, + 0.0, + 8478235783.0 / 508512852.0, + 1311729495.0 / 1432422823.0, + -10304129995.0 / 1701304382.0, + -48777925059.0 / 3047939560.0, + 15336726248.0 / 1032824649.0, + -45442868181.0 / 3398467696.0, + 3065993473.0 / 597172653.0 +}; + +static const double b12[] = { + 185892177.0 / 718116043.0, + 0.0, + 0.0, + -3185094517.0 / 667107341.0, + -477755414.0 / 1098053517.0, + -703635378.0 / 230739211.0, + 5731566787.0 / 1027545527.0, + 5232866602.0 / 850066563.0, + -4093664535.0 / 808688257.0, + 3962137247.0 / 1805957418.0, + 65686358.0 / 487910083.0 +}; + +static const double b13[] = { + 403863854.0 / 491063109.0, + 0.0, + 0.0, + -5068492393.0 / 434740067.0, + -411421997.0 / 543043805.0, + 652783627.0 / 914296604.0, + 11173962825.0 / 925320556.0, + -13158990841.0 / 6184727034.0, + 3936647629.0 / 1978049680.0, + -160528059.0 / 685178525.0, + 248638103.0 / 1413531060.0, + 0.0 +}; + +typedef struct +{ + double *k[13]; + double *ytmp; + double *y0; +} +rk8pd_state_t; + +static void * +rk8pd_alloc (size_t dim) +{ + rk8pd_state_t *state = (rk8pd_state_t *) malloc (sizeof (rk8pd_state_t)); + int i, j; + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rk8pd_state", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + for (i = 0; i < 13; i++) + { + state->k[i] = (double *) malloc (dim * sizeof (double)); + + if (state->k[i] == 0) + { + for (j = 0; j < i; j++) + { + free (state->k[j]); + } + free (state->y0); + free (state->ytmp); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k's", GSL_ENOMEM); + } + } + + return state; +} + + +static int +rk8pd_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + + size_t i; + + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + /* Note that k1 is stored in state->k[0] due to zero-based indexing */ + double *const k1 = state->k[0]; + double *const k2 = state->k[1]; + double *const k3 = state->k[2]; + double *const k4 = state->k[3]; + double *const k5 = state->k[4]; + double *const k6 = state->k[5]; + double *const k7 = state->k[6]; + double *const k8 = state->k[7]; + double *const k9 = state->k[8]; + double *const k10 = state->k[9]; + double *const k11 = state->k[10]; + double *const k12 = state->k[11]; + double *const k13 = state->k[12]; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + b21 * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b5[0] * k1[i] + b5[2] * k3[i] + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b6[0] * k1[i] + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b7[0] * k1[i] + b7[3] * k4[i] + b7[4] * k5[i] + + b7[5] * k6[i]); + + /* k7 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[5] * h, ytmp, k7); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b8[0] * k1[i] + b8[3] * k4[i] + b8[4] * k5[i] + + b8[5] * k6[i] + b8[6] * k7[i]); + + /* k8 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[6] * h, ytmp, k8); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b9[0] * k1[i] + b9[3] * k4[i] + b9[4] * k5[i] + + b9[5] * k6[i] + b9[6] * k7[i] + b9[7] * k8[i]); + + /* k9 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[7] * h, ytmp, k9); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b10[0] * k1[i] + b10[3] * k4[i] + b10[4] * k5[i] + + b10[5] * k6[i] + b10[6] * k7[i] + b10[7] * k8[i] + + b10[8] * k9[i]); + + /* k10 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[8] * h, ytmp, k10); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b11[0] * k1[i] + b11[3] * k4[i] + b11[4] * k5[i] + + b11[5] * k6[i] + b11[6] * k7[i] + b11[7] * k8[i] + + b11[8] * k9[i] + b11[9] * k10[i]); + + /* k11 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[9] * h, ytmp, k11); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b12[0] * k1[i] + b12[3] * k4[i] + b12[4] * k5[i] + + b12[5] * k6[i] + b12[6] * k7[i] + b12[7] * k8[i] + + b12[8] * k9[i] + b12[9] * k10[i] + b12[10] * k11[i]); + + /* k12 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k12); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b13[0] * k1[i] + b13[3] * k4[i] + b13[4] * k5[i] + + b13[5] * k6[i] + b13[6] * k7[i] + b13[7] * k8[i] + + b13[8] * k9[i] + b13[9] * k10[i] + b13[10] * k11[i] + + b13[11] * k12[i]); + + /* k13 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, ytmp, k13); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + /* final sum */ + for (i = 0; i < dim; i++) + { + const double ksum8 = + Abar[0] * k1[i] + Abar[5] * k6[i] + Abar[6] * k7[i] + + Abar[7] * k8[i] + Abar[8] * k9[i] + Abar[9] * k10[i] + + Abar[10] * k11[i] + Abar[11] * k12[i] + Abar[12] * k13[i]; + y[i] += h * ksum8; + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* error estimate */ + for (i = 0; i < dim; i++) + { + const double ksum8 = + Abar[0] * k1[i] + Abar[5] * k6[i] + Abar[6] * k7[i] + + Abar[7] * k8[i] + Abar[8] * k9[i] + Abar[9] * k10[i] + + Abar[10] * k11[i] + Abar[11] * k12[i] + Abar[12] * k13[i]; + const double ksum7 = + A[0] * k1[i] + A[5] * k6[i] + A[6] * k7[i] + A[7] * k8[i] + + A[8] * k9[i] + A[9] * k10[i] + A[10] * k11[i] + A[11] * k12[i]; + yerr[i] = h * (ksum7 - ksum8); + } + + return GSL_SUCCESS; +} + +static int +rk8pd_reset (void *vstate, size_t dim) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + + int i; + + for (i = 0; i < 13; i++) + { + DBL_ZERO_MEMSET (state->k[i], dim); + } + + DBL_ZERO_MEMSET (state->y0, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rk8pd_order (void *vstate) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 8; +} + +static void +rk8pd_free (void *vstate) +{ + rk8pd_state_t *state = (rk8pd_state_t *) vstate; + int i; + + for (i = 0; i < 13; i++) + { + free (state->k[i]); + } + free (state->y0); + free (state->ytmp); + free (state); +} + +static const gsl_odeiv2_step_type rk8pd_type = { "rk8pd", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rk8pd_alloc, + &rk8pd_apply, + &stepper_set_driver_null, + &rk8pd_reset, + &rk8pd_order, + &rk8pd_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rk8pd = &rk8pd_type; diff --git a/software/gsl-1.15/ode-initval2/rkck.c b/software/gsl-1.15/ode-initval2/rkck.c new file mode 100644 index 000000000..ef5ce2b3a --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rkck.c @@ -0,0 +1,377 @@ +/* ode-initval2/rkck.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta 4(5), Cash-Karp */ + +/* Reference: Cash, J.R., Karp, A.H., ACM Transactions of Mathematical + Software, vol. 16 (1990) 201-222. */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +/* Cash-Karp constants */ +static const double ah[] = { 1.0 / 5.0, 0.3, 3.0 / 5.0, 1.0, 7.0 / 8.0 }; + +static const double b21 = 1.0 / 5.0; +static const double b3[] = { 3.0 / 40.0, 9.0 / 40.0 }; +static const double b4[] = { 0.3, -0.9, 1.2 }; +static const double b5[] = { -11.0 / 54.0, 2.5, -70.0 / 27.0, 35.0 / 27.0 }; + +static const double b6[] = + { 1631.0 / 55296.0, 175.0 / 512.0, 575.0 / 13824.0, 44275.0 / 110592.0, + 253.0 / 4096.0 +}; + +static const double c1 = 37.0 / 378.0; +static const double c3 = 250.0 / 621.0; +static const double c4 = 125.0 / 594.0; +static const double c6 = 512.0 / 1771.0; + +/* These are the differences of fifth and fourth order coefficients + for error estimation */ + +static const double ec[] = { 0.0, + 37.0 / 378.0 - 2825.0 / 27648.0, + 0.0, + 250.0 / 621.0 - 18575.0 / 48384.0, + 125.0 / 594.0 - 13525.0 / 55296.0, + -277.0 / 14336.0, + 512.0 / 1771.0 - 0.25 +}; + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *k4; + double *k5; + double *k6; + double *y0; + double *ytmp; +} +rkck_state_t; + +static void * +rkck_alloc (size_t dim) +{ + rkck_state_t *state = (rkck_state_t *) malloc (sizeof (rkck_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rkck_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->k4 = (double *) malloc (dim * sizeof (double)); + + if (state->k4 == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k4", GSL_ENOMEM); + } + + state->k5 = (double *) malloc (dim * sizeof (double)); + + if (state->k5 == 0) + { + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k5", GSL_ENOMEM); + } + + state->k6 = (double *) malloc (dim * sizeof (double)); + + if (state->k6 == 0) + { + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k6", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rkck_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const k4 = state->k4; + double *const k5 = state->k5; + double *const k6 = state->k6; + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + b21 * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b5[0] * k1[i] + b5[1] * k2[i] + b5[2] * k3[i] + + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b6[0] * k1[i] + b6[1] * k2[i] + b6[2] * k3[i] + + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step and final sum */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + const double d_i = c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c6 * k6[i]; + y[i] += h * d_i; + } + + /* Evaluate dydt_out[]. */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + return s; + } + } + + /* difference between 4th and 5th order */ + for (i = 0; i < dim; i++) + { + yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + + ec[5] * k5[i] + ec[6] * k6[i]); + } + + return GSL_SUCCESS; +} + + +static int +rkck_reset (void *vstate, size_t dim) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->k4, dim); + DBL_ZERO_MEMSET (state->k5, dim); + DBL_ZERO_MEMSET (state->k6, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rkck_order (void *vstate) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 5; /* FIXME: should this be 4? */ +} + +static void +rkck_free (void *vstate) +{ + rkck_state_t *state = (rkck_state_t *) vstate; + + free (state->ytmp); + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); +} + +static const gsl_odeiv2_step_type rkck_type = { "rkck", /* name */ + 1, /* can use dydt_in */ + 1, /* gives exact dydt_out */ + &rkck_alloc, + &rkck_apply, + &stepper_set_driver_null, + &rkck_reset, + &rkck_order, + &rkck_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rkck = &rkck_type; diff --git a/software/gsl-1.15/ode-initval2/rkf45.c b/software/gsl-1.15/ode-initval2/rkf45.c new file mode 100644 index 000000000..31a721115 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rkf45.c @@ -0,0 +1,381 @@ +/* ode-initval2/rkf45.c + * + * Copyright (C) 2001, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Runge-Kutta-Fehlberg 4(5)*/ + +/* Reference eg. Hairer, E., Norsett S.P., Wanner, G. Solving ordinary + differential equations I, Nonstiff Problems, 2nd revised edition, + Springer, 2000. +*/ + +#include +#include +#include +#include +#include + +#include "odeiv_util.h" +#include "step_utils.c" + +/* Runge-Kutta-Fehlberg coefficients. Zero elements left out */ + +static const double ah[] = + { 1.0 / 4.0, 3.0 / 8.0, 12.0 / 13.0, 1.0, 1.0 / 2.0 }; +static const double b3[] = { 3.0 / 32.0, 9.0 / 32.0 }; +static const double b4[] = + { 1932.0 / 2197.0, -7200.0 / 2197.0, 7296.0 / 2197.0 }; +static const double b5[] = + { 8341.0 / 4104.0, -32832.0 / 4104.0, 29440.0 / 4104.0, -845.0 / 4104.0 }; +static const double b6[] = + { -6080.0 / 20520.0, 41040.0 / 20520.0, -28352.0 / 20520.0, + 9295.0 / 20520.0, -5643.0 / 20520.0 +}; + +static const double c1 = 902880.0 / 7618050.0; +static const double c3 = 3953664.0 / 7618050.0; +static const double c4 = 3855735.0 / 7618050.0; +static const double c5 = -1371249.0 / 7618050.0; +static const double c6 = 277020.0 / 7618050.0; + +/* These are the differences of fifth and fourth order coefficients + for error estimation */ + +static const double ec[] = { 0.0, + 1.0 / 360.0, + 0.0, + -128.0 / 4275.0, + -2197.0 / 75240.0, + 1.0 / 50.0, + 2.0 / 55.0 +}; + +typedef struct +{ + double *k1; + double *k2; + double *k3; + double *k4; + double *k5; + double *k6; + double *y0; + double *ytmp; +} +rkf45_state_t; + +static void * +rkf45_alloc (size_t dim) +{ + rkf45_state_t *state = (rkf45_state_t *) malloc (sizeof (rkf45_state_t)); + + if (state == 0) + { + GSL_ERROR_NULL ("failed to allocate space for rkf45_state", GSL_ENOMEM); + } + + state->k1 = (double *) malloc (dim * sizeof (double)); + + if (state->k1 == 0) + { + free (state); + GSL_ERROR_NULL ("failed to allocate space for k1", GSL_ENOMEM); + } + + state->k2 = (double *) malloc (dim * sizeof (double)); + + if (state->k2 == 0) + { + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k2", GSL_ENOMEM); + } + + state->k3 = (double *) malloc (dim * sizeof (double)); + + if (state->k3 == 0) + { + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k3", GSL_ENOMEM); + } + + state->k4 = (double *) malloc (dim * sizeof (double)); + + if (state->k4 == 0) + { + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k4", GSL_ENOMEM); + } + + state->k5 = (double *) malloc (dim * sizeof (double)); + + if (state->k5 == 0) + { + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k5", GSL_ENOMEM); + } + + state->k6 = (double *) malloc (dim * sizeof (double)); + + if (state->k6 == 0) + { + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for k6", GSL_ENOMEM); + } + + state->y0 = (double *) malloc (dim * sizeof (double)); + + if (state->y0 == 0) + { + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for y0", GSL_ENOMEM); + } + + state->ytmp = (double *) malloc (dim * sizeof (double)); + + if (state->ytmp == 0) + { + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); + GSL_ERROR_NULL ("failed to allocate space for ytmp", GSL_ENOMEM); + } + + return state; +} + + +static int +rkf45_apply (void *vstate, + size_t dim, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * sys) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + size_t i; + + double *const k1 = state->k1; + double *const k2 = state->k2; + double *const k3 = state->k3; + double *const k4 = state->k4; + double *const k5 = state->k5; + double *const k6 = state->k6; + double *const ytmp = state->ytmp; + double *const y0 = state->y0; + + DBL_MEMCPY (y0, y, dim); + + /* k1 step */ + if (dydt_in != NULL) + { + DBL_MEMCPY (k1, dydt_in, dim); + } + else + { + int s = GSL_ODEIV_FN_EVAL (sys, t, y, k1); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + ah[0] * h * k1[i]; + + /* k2 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[0] * h, ytmp, k2); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b3[0] * k1[i] + b3[1] * k2[i]); + + /* k3 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[1] * h, ytmp, k3); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = y[i] + h * (b4[0] * k1[i] + b4[1] * k2[i] + b4[2] * k3[i]); + + /* k4 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[2] * h, ytmp, k4); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b5[0] * k1[i] + b5[1] * k2[i] + b5[2] * k3[i] + + b5[3] * k4[i]); + + /* k5 step */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[3] * h, ytmp, k5); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + ytmp[i] = + y[i] + h * (b6[0] * k1[i] + b6[1] * k2[i] + b6[2] * k3[i] + + b6[3] * k4[i] + b6[4] * k5[i]); + + /* k6 step and final sum */ + { + int s = GSL_ODEIV_FN_EVAL (sys, t + ah[4] * h, ytmp, k6); + + if (s != GSL_SUCCESS) + { + return s; + } + } + + for (i = 0; i < dim; i++) + { + const double d_i = + c1 * k1[i] + c3 * k3[i] + c4 * k4[i] + c5 * k5[i] + c6 * k6[i]; + y[i] += h * d_i; + } + + /* Derivatives at output */ + + if (dydt_out != NULL) + { + int s = GSL_ODEIV_FN_EVAL (sys, t + h, y, dydt_out); + + if (s != GSL_SUCCESS) + { + /* Restore initial values */ + DBL_MEMCPY (y, y0, dim); + + return s; + } + } + + /* difference between 4th and 5th order */ + for (i = 0; i < dim; i++) + { + yerr[i] = h * (ec[1] * k1[i] + ec[3] * k3[i] + ec[4] * k4[i] + + ec[5] * k5[i] + ec[6] * k6[i]); + } + + return GSL_SUCCESS; +} + + +static int +rkf45_reset (void *vstate, size_t dim) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + DBL_ZERO_MEMSET (state->k1, dim); + DBL_ZERO_MEMSET (state->k2, dim); + DBL_ZERO_MEMSET (state->k3, dim); + DBL_ZERO_MEMSET (state->k4, dim); + DBL_ZERO_MEMSET (state->k5, dim); + DBL_ZERO_MEMSET (state->k6, dim); + DBL_ZERO_MEMSET (state->ytmp, dim); + DBL_ZERO_MEMSET (state->y0, dim); + + return GSL_SUCCESS; +} + +static unsigned int +rkf45_order (void *vstate) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + state = 0; /* prevent warnings about unused parameters */ + return 5; +} + +static void +rkf45_free (void *vstate) +{ + rkf45_state_t *state = (rkf45_state_t *) vstate; + + free (state->ytmp); + free (state->y0); + free (state->k6); + free (state->k5); + free (state->k4); + free (state->k3); + free (state->k2); + free (state->k1); + free (state); +} + +static const gsl_odeiv2_step_type rkf45_type = { "rkf45", /* name */ + 1, /* can use dydt_in */ + 0, /* gives exact dydt_out */ + &rkf45_alloc, + &rkf45_apply, + &stepper_set_driver_null, + &rkf45_reset, + &rkf45_order, + &rkf45_free +}; + +const gsl_odeiv2_step_type *gsl_odeiv2_step_rkf45 = &rkf45_type; diff --git a/software/gsl-1.15/ode-initval2/rksubs.c b/software/gsl-1.15/ode-initval2/rksubs.c new file mode 100644 index 000000000..4b6a664cd --- /dev/null +++ b/software/gsl-1.15/ode-initval2/rksubs.c @@ -0,0 +1,52 @@ +/* ode-initval2/rksubs.c + * + * Copyright (C) 2008, 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +rksubs (double y[], const double h, const double y0[], const double fY[], + const double b[], const size_t stage, const size_t dim) +{ + /* The final substitution step in Runge-Kutta equation: + Calculates new values y by substituting the value of step size + (h), current initial values of y (y0), function f values at + Runge-Kutta points (fY), Runge-Kutta b-coefficients (b) and + method stage (stage) into the equation + + y = y0 + h * sum j=1..stage (b_j * fY_j) + + dim is the number of ODEs. + */ + + size_t i, j; + + for (i = 0; i < dim; i++) + { + y[i] = 0.0; + + for (j = 0; j < stage; j++) + y[i] += b[j] * fY[j * dim + i]; + } + + for (i = 0; i < dim; i++) + { + y[i] *= h; + y[i] += y0[i]; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/step.c b/software/gsl-1.15/ode-initval2/step.c new file mode 100644 index 000000000..4c67037b1 --- /dev/null +++ b/software/gsl-1.15/ode-initval2/step.c @@ -0,0 +1,104 @@ +/* ode-initval/odeiv.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman + */ +#include +#include +#include +#include + +gsl_odeiv2_step * +gsl_odeiv2_step_alloc (const gsl_odeiv2_step_type * T, size_t dim) +{ + gsl_odeiv2_step *s = (gsl_odeiv2_step *) malloc (sizeof (gsl_odeiv2_step)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for ode struct", GSL_ENOMEM); + }; + + s->type = T; + s->dimension = dim; + + s->state = s->type->alloc (dim); + + if (s->state == 0) + { + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_NULL ("failed to allocate space for ode state", GSL_ENOMEM); + }; + + return s; +} + +const char * +gsl_odeiv2_step_name (const gsl_odeiv2_step * s) +{ + return s->type->name; +} + +unsigned int +gsl_odeiv2_step_order (const gsl_odeiv2_step * s) +{ + return s->type->order (s->state); +} + +int +gsl_odeiv2_step_apply (gsl_odeiv2_step * s, + double t, + double h, + double y[], + double yerr[], + const double dydt_in[], + double dydt_out[], const gsl_odeiv2_system * dydt) +{ + return s->type->apply (s->state, s->dimension, t, h, y, yerr, dydt_in, + dydt_out, dydt); +} + +int +gsl_odeiv2_step_reset (gsl_odeiv2_step * s) +{ + return s->type->reset (s->state, s->dimension); +} + +void +gsl_odeiv2_step_free (gsl_odeiv2_step * s) +{ + RETURN_IF_NULL (s); + s->type->free (s->state); + free (s); +} + +int +gsl_odeiv2_step_set_driver (gsl_odeiv2_step * s, const gsl_odeiv2_driver * d) +{ + if (d != NULL) + { + s->type->set_driver (s->state, d); + } + else + { + GSL_ERROR_NULL ("driver pointer is null", GSL_EFAULT); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/step_utils.c b/software/gsl-1.15/ode-initval2/step_utils.c new file mode 100644 index 000000000..9b71be4ee --- /dev/null +++ b/software/gsl-1.15/ode-initval2/step_utils.c @@ -0,0 +1,27 @@ +/* ode-initval2/step_utils.c + * + * Copyright (C) 2009 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int +stepper_set_driver_null (void *vstate, const gsl_odeiv2_driver * d) +{ + /* Dummy set function for those steppers that do not + need pointer to driver object. */ + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/ode-initval2/test.c b/software/gsl-1.15/ode-initval2/test.c new file mode 100644 index 000000000..eecc3bf5f --- /dev/null +++ b/software/gsl-1.15/ode-initval2/test.c @@ -0,0 +1,2506 @@ +/* ode-initval/test.c + * + * Copyright (C) 2009, 2010 Tuomo Keskitalo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Some functions and tests based on test.c by G. Jungman. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "odeiv_util.h" + +/* Maximum number of ODE equations */ +#define MAXEQ 15 + +/* Maximum number of ODE solvers */ +#define MAXNS 20 + +/* Track number of function and jacobian evaluations in tests + with global variables + */ +int nfe; +int nje; + +/**********************************************************/ +/* ODE test system definitions */ +/**********************************************************/ + +/* RHS for f=2. Solution y = 2 * t + t0 */ + +int +rhs_linear (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = 2.0; + + return GSL_SUCCESS; +} + +int +jac_linear (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = 0.0; + dfdt[0] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_lin = { + rhs_linear, + jac_linear, + 1, + 0 +}; + +/* RHS for f=y. Equals y=exp(t) with initial value y(0)=1.0 */ + +int +rhs_exp (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_exp (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = y[0]; + dfdt[0] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_exp = { + rhs_exp, + jac_exp, + 1, + 0 +}; + +int +rhs_sin (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = -y[1]; + f[1] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_sin (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = 0.0; + dfdy[1] = -1.0; + dfdy[2] = 1.0; + dfdy[3] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_sin = { + rhs_sin, + jac_sin, + 2, + 0 +}; + +/* Sine/cosine with random failures */ + +static int rhs_xsin_reset = 0; +static int jac_xsin_reset = 0; + +int +rhs_xsin (double t, const double y[], double f[], void *params) +{ + static int n = 0, m = 0; + extern int nfe; + nfe += 1; + + if (rhs_xsin_reset) + { + rhs_xsin_reset = 0; + n = 0; + m = 1; + } + n++; + + if (n >= m) + { + m = n * 1.3; + return GSL_EFAILED; + } + + if (n > 40 && n < 65) + { + f[0] = GSL_NAN; + f[1] = GSL_NAN; + return GSL_EFAILED; + } + + f[0] = -y[1]; + f[1] = y[0]; + + return GSL_SUCCESS; +} + +int +jac_xsin (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + static int n = 0; + extern int nje; + nje += 1; + + if (jac_xsin_reset) + { + jac_xsin_reset = 0; + n = 0; + } + n++; + + if (n > 50 && n < 55) + { + dfdy[0] = GSL_NAN; + dfdy[1] = GSL_NAN; + dfdy[2] = GSL_NAN; + dfdy[3] = GSL_NAN; + + dfdt[0] = GSL_NAN; + dfdt[1] = GSL_NAN; + return GSL_EFAILED; + } + + dfdy[0] = 0.0; + dfdy[1] = -1.0; + dfdy[2] = 1.0; + dfdy[3] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_xsin = { + rhs_xsin, + jac_xsin, + 2, + 0 +}; + +/* RHS for classic stiff example + dy0 / dt = 998 * y0 + 1998 * y1 y0(0) = 1.0 + dy1 / dt = -999 * y0 - 1999 * y1 y1(0) = 0.0 + + solution is + y0 = 2 * exp(-t) - exp(-1000 * t) + y1 = - exp(-t) + exp(-1000 * t) +*/ + +int +rhs_stiff (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = 998.0 * y[0] + 1998.0 * y[1]; + f[1] = -999.0 * y[0] - 1999.0 * y[1]; + + return GSL_SUCCESS; +} + +int +jac_stiff (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = 998.0; + dfdy[1] = 1998.0; + dfdy[2] = -999.0; + dfdy[3] = -1999.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_stiff = { + rhs_stiff, + jac_stiff, + 2, + 0 +}; + +/* Cosine function */ + +int +rhs_cos (double t, const double *y, double *dydt, void *params) +{ + dydt[0] = cos (t); + return GSL_SUCCESS; +} + +int +jac_cos (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 0.0; + dfdt[0] = -sin (t); + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_cos = { + rhs_cos, + jac_cos, + 1, + 0 +}; + +/* Broken problem for testing numerical problems in user function that + leads to decrease of step size in gsl_odeiv2_evolve below machine + precision. + */ + +int +rhs_broken (double t, const double y[], double f[], void *params) +{ + if (t < 10.0) + { + f[0] = 1.0; + } + + else + { + f[0] = GSL_NAN; + return 123; + } + + return GSL_SUCCESS; +} + +int +jac_broken (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + if (t < 10.0) + { + dfdy[0] = 0.0; + dfdt[0] = 0.0; + } + else + { + dfdy[0] = GSL_NAN; + dfdt[0] = GSL_NAN; + return 123; + } + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_broken = { + rhs_broken, + jac_broken, + 1, + 0 +}; + +/* Immediate user break (at t > 1.5) test sine system */ + +int +rhs_sin_ub (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = -y[1]; + f[1] = y[0]; + + if (t > 1.5) + { + return GSL_EBADFUNC; + } + + return GSL_SUCCESS; +} + +int +jac_sin_ub (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = 0.0; + dfdy[1] = -1.0; + dfdy[2] = 1.0; + dfdy[3] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + if (t > 1.5) + { + return GSL_EBADFUNC; + } + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_sin_ub = { + rhs_sin_ub, + jac_sin_ub, + 2, + 0 +}; + +/* Badly scaled random function */ + +int +rhs_br (double t, const double *y, double *dydt, void *params) +{ + dydt[0] = (rand () - RAND_MAX / 2) * 2e100; + return GSL_SUCCESS; +} + +int +jac_br (double t, const double y[], double *dfdy, double dfdt[], void *params) +{ + dfdy[0] = (rand () - RAND_MAX / 2) * 2e100; + dfdt[0] = (rand () - RAND_MAX / 2) * 2e100; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_br = { + rhs_br, + jac_br, + 1, + 0 +}; + +/* stepfn and stepfn2 based on testcases from Frank Reininghaus + +*/ + +/* Derivative change at t=0, small derivative */ + +int +rhs_stepfn (double t, const double *y, double *dydt, void *params) +{ + if (t >= 1.0) + dydt[0] = 1; + else + dydt[0] = 0; + + return GSL_SUCCESS; +} + +int +jac_stepfn (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + dfdy[0] = 0.0; + dfdt[0] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_stepfn = { + rhs_stepfn, + jac_stepfn, + 1, + 0 +}; + +/* Derivative change at t=0, large derivative */ + +int +rhs_stepfn2 (double t, const double *y, double *dydt, void *params) +{ + if (t >= 0.0) + dydt[0] = 1e300; + else + dydt[0] = 0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_stepfn2 = { + rhs_stepfn2, + jac_stepfn, + 1, + 0 +}; + +/* Volterra-Lotka predator-prey model + f0 = (a - b * y1) * y0 y0(0) = 2.725 + f1 = (-c + d * y0) * y1 y1(0) = 1.0 + */ + +int +rhs_vl (double t, const double y[], double f[], void *params) +{ + const double a = -1.0; + const double b = -1.0; + const double c = -2.0; + const double d = -1.0; + + extern int nfe; + nfe += 1; + + f[0] = (a - b * y[1]) * y[0]; + f[1] = (-c + d * y[0]) * y[1]; + + return GSL_SUCCESS; +} + +int +jac_vl (double t, const double y[], double *dfdy, double dfdt[], void *params) +{ + const double a = -1.0; + const double b = -1.0; + const double c = -2.0; + const double d = -1.0; + + extern int nje; + nje += 1; + + dfdy[0] = a - b * y[1]; + dfdy[1] = -b * y[0]; + dfdy[2] = d * y[1]; + dfdy[3] = -c + d * y[0]; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_vl = { + rhs_vl, + jac_vl, + 2, + 0 +}; + +/* van Der Pol oscillator + f0 = y1 y0(0) = 1.0 + f1 = -y0 + mu * y1 * (1 - y0^2) y1(0) = 0.0 +*/ + +int +rhs_vanderpol (double t, const double y[], double f[], void *params) +{ + const double mu = 10.0; + + extern int nfe; + nfe += 1; + + f[0] = y[1]; + f[1] = -y[0] + mu * y[1] * (1.0 - y[0] * y[0]); + + return GSL_SUCCESS; +} + +int +jac_vanderpol (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double mu = 10.0; + + extern int nje; + nje += 1; + + dfdy[0] = 0.0; + dfdy[1] = 1.0; + dfdy[2] = -2.0 * mu * y[0] * y[1] - 1.0; + dfdy[3] = mu * (1.0 - y[0] * y[0]); + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_vanderpol = { + rhs_vanderpol, + jac_vanderpol, + 2, + 0 +}; + +/* Stiff trigonometric example + f0 = -50 * (y0 - cos(t)) y0(0) = 0.0 + */ + +int +rhs_stifftrig (double t, const double y[], double f[], void *params) +{ + extern int nfe; + nfe += 1; + + f[0] = -50 * (y[0] - cos (t)); + + return GSL_SUCCESS; +} + +int +jac_stifftrig (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + extern int nje; + nje += 1; + + dfdy[0] = -50; + + dfdt[0] = -50 * sin (t); + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_stifftrig = { + rhs_stifftrig, + jac_stifftrig, + 1, + 0 +}; + +/* The Oregonator - chemical Belusov-Zhabotinskii reaction + y0(0) = 1.0, y1(0) = 2.0, y2(0) = 3.0 +*/ + +int +rhs_oregonator (double t, const double y[], double f[], void *params) +{ + const double c1 = 77.27; + const double c2 = 8.375e-6; + const double c3 = 0.161; + + extern int nfe; + nfe += 1; + + f[0] = c1 * (y[1] + y[0] * (1 - c2 * y[0] - y[1])); + f[1] = 1 / c1 * (y[2] - y[1] * (1 + y[0])); + f[2] = c3 * (y[0] - y[2]); + + return GSL_SUCCESS; +} + +int +jac_oregonator (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double c1 = 77.27; + const double c2 = 8.375e-6; + const double c3 = 0.161; + + extern int nje; + nje += 1; + + dfdy[0] = c1 * (1 - 2 * c2 * y[0] - y[1]); + dfdy[1] = c1 * (1 - y[0]); + dfdy[2] = 0.0; + + dfdy[3] = 1 / c1 * (-y[1]); + dfdy[4] = 1 / c1 * (-1 - y[0]); + dfdy[5] = 1 / c1; + + dfdy[6] = c3; + dfdy[7] = 0.0; + dfdy[8] = -c3; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + dfdt[2] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_oregonator = { + rhs_oregonator, + jac_oregonator, + 3, + 0 +}; + +/* E5 - a stiff badly scaled chemical problem by Enright, Hull & + Lindberg (1975): Comparing numerical methods for stiff systems of + ODEs. BIT, vol. 15, pp. 10-48. + + f0 = -a * y0 - b * y0 * y2 y0(0) = 1.76e-3 + f1 = a * y0 - m * c * y1 * y2 y1(0) = 0.0 + f2 = a * y0 - b * y0 * y2 - m * c * y1 * y2 + c * y3 y2(0) = 0.0 + f3 = b * y0 * y2 - c * y3 y3(0) = 0.0 + */ + +int +rhs_e5 (double t, const double y[], double f[], void *params) +{ + const double a = 7.89e-10; + const double b = 1.1e7; + const double c = 1.13e3; + const double m = 1.0e6; + + extern int nfe; + nfe += 1; + + f[0] = -a * y[0] - b * y[0] * y[2]; + f[1] = a * y[0] - m * c * y[1] * y[2]; + f[3] = b * y[0] * y[2] - c * y[3]; + f[2] = f[1] - f[3]; + + return GSL_SUCCESS; +} + +int +jac_e5 (double t, const double y[], double *dfdy, double dfdt[], void *params) +{ + const double a = 7.89e-10; + const double b = 1.1e7; + const double c = 1.13e3; + const double m = 1.0e6; + + extern int nje; + nje += 1; + + dfdy[0] = -a - b * y[2]; + dfdy[1] = 0.0; + dfdy[2] = -b * y[0]; + dfdy[3] = 0.0; + + dfdy[4] = a; + dfdy[5] = -m * c * y[2]; + dfdy[6] = -m * c * y[1]; + dfdy[7] = 0.0; + + dfdy[8] = a - b * y[2]; + dfdy[9] = -m * c * y[2]; + dfdy[10] = -b * y[0] - m * c * y[1]; + dfdy[11] = c; + + dfdy[12] = b * y[2]; + dfdy[13] = 0.0; + dfdy[14] = b * y[0]; + dfdy[15] = -c; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + dfdt[2] = 0.0; + dfdt[3] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_e5 = { + rhs_e5, + jac_e5, + 4, + 0 +}; + +/* Chemical reaction system of H.H. Robertson (1966): The solution of + a set of reaction rate equations. In: J. Walsh, ed.: Numer. + Anal., an Introduction, Academ. Press, pp. 178-182. + + f0 = -a * y0 + b * y1 * y2 y0(0) = 1.0 + f1 = a * y0 - b * y1 * y2 - c * y1^2 y1(0) = 0.0 + f2 = c * y1^2 y2(0) = 0.0 + */ + +int +rhs_robertson (double t, const double y[], double f[], void *params) +{ + const double a = 0.04; + const double b = 1.0e4; + const double c = 3.0e7; + + extern int nfe; + nfe += 1; + + f[0] = -a * y[0] + b * y[1] * y[2]; + f[2] = c * y[1] * y[1]; + f[1] = -f[0] - f[2]; + + return GSL_SUCCESS; +} + +int +jac_robertson (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double a = 0.04; + const double b = 1.0e4; + const double c = 3.0e7; + + extern int nje; + nje += 1; + + dfdy[0] = -a; + dfdy[1] = b * y[2]; + dfdy[2] = b * y[1]; + + dfdy[3] = a; + dfdy[4] = -b * y[2] - 2 * c * y[1]; + dfdy[5] = -b * y[1]; + + dfdy[6] = 0.0; + dfdy[7] = 2 * c * y[1]; + dfdy[8] = 0.0; + + dfdt[0] = 0.0; + dfdt[1] = 0.0; + dfdt[2] = 0.0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_robertson = { + rhs_robertson, + jac_robertson, + 3, + 0 +}; + +/* A two-dimensional oscillating Brusselator system. + + f0 = a + y0^2 * y1 - (b + 1) * y0 y0(0) = 1.5 + f1 = b * y0 - y0^2 * y1 y1(0) = 3.0 + */ + +int +rhs_brusselator (double t, const double y[], double f[], void *params) +{ + const double a = 1.0; + const double b = 3.0; + + extern int nfe; + nfe += 1; + + f[0] = a + y[0] * y[0] * y[1] - (b + 1.0) * y[0]; + f[1] = b * y[0] - y[0] * y[0] * y[1]; + + return GSL_SUCCESS; +} + +int +jac_brusselator (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double b = 3.0; + + extern int nje; + nje += 1; + + dfdy[0] = 2 * y[0] * y[1] - (b + 1.0); + dfdy[1] = y[0] * y[0]; + + dfdy[2] = b - 2 * y[0] * y[1]; + dfdy[3] = -y[0] * y[0]; + + dfdt[0] = 0; + dfdt[1] = 0; + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_brusselator = { + rhs_brusselator, + jac_brusselator, + 2, + 0 +}; + +/* Ring Modulator, stiff ODE of dimension 15. + + Reference: Walter M. Lioen, Jacques J.B. de Swart, Test Set for + Initial Value Problem Solvers, Release 2.1 September 1999, + http://ftp.cwi.nl/IVPtestset/software.htm + */ + +#define NRINGMOD 15 + +int +rhs_ringmod (double t, const double y[], double f[], void *params) +{ + const double c = 1.6e-8; + const double cs = 2e-12; + const double cp = 1e-8; + const double r = 25e3; + const double rp = 50e0; + const double lh = 4.45e0; + const double ls1 = 2e-3; + const double ls2 = 5e-4; + const double ls3 = 5e-4; + const double rg1 = 36.3; + const double rg2 = 17.3; + const double rg3 = 17.3; + const double ri = 5e1; + const double rc = 6e2; + const double gamma = 40.67286402e-9; + const double delta = 17.7493332; + const double pi = 3.141592653589793238462643383; + + const double uin1 = 0.5 * sin (2e3 * pi * t); + const double uin2 = 2 * sin (2e4 * pi * t); + const double ud1 = +y[2] - y[4] - y[6] - uin2; + const double ud2 = -y[3] + y[5] - y[6] - uin2; + const double ud3 = +y[3] + y[4] + y[6] + uin2; + const double ud4 = -y[2] - y[5] + y[6] + uin2; + + const double qud1 = gamma * (exp (delta * ud1) - 1.0); + const double qud2 = gamma * (exp (delta * ud2) - 1.0); + const double qud3 = gamma * (exp (delta * ud3) - 1.0); + const double qud4 = gamma * (exp (delta * ud4) - 1.0); + + extern int nfe; + nfe += 1; + + f[0] = (y[7] - 0.5 * y[9] + 0.5 * y[10] + y[13] - y[0] / r) / c; + f[1] = (y[8] - 0.5 * y[11] + 0.5 * y[12] + y[14] - y[1] / r) / c; + f[2] = (y[9] - qud1 + qud4) / cs; + f[3] = (-y[10] + qud2 - qud3) / cs; + f[4] = (y[11] + qud1 - qud3) / cs; + f[5] = (-y[12] - qud2 + qud4) / cs; + f[6] = (-y[6] / rp + qud1 + qud2 - qud3 - qud4) / cp; + f[7] = -y[0] / lh; + f[8] = -y[1] / lh; + f[9] = (0.5 * y[0] - y[2] - rg2 * y[9]) / ls2; + f[10] = (-0.5 * y[0] + y[3] - rg3 * y[10]) / ls3; + f[11] = (0.5 * y[1] - y[4] - rg2 * y[11]) / ls2; + f[12] = (-0.5 * y[1] + y[5] - rg3 * y[12]) / ls3; + f[13] = (-y[0] + uin1 - (ri + rg1) * y[13]) / ls1; + f[14] = (-y[1] - (rc + rg1) * y[14]) / ls1; + + return GSL_SUCCESS; +} + +int +jac_ringmod (double t, const double y[], double *dfdy, double dfdt[], + void *params) +{ + const double c = 1.6e-8; + const double cs = 2e-12; + const double cp = 1e-8; + const double r = 25e3; + const double rp = 50e0; + const double lh = 4.45e0; + const double ls1 = 2e-3; + const double ls2 = 5e-4; + const double ls3 = 5e-4; + const double rg1 = 36.3; + const double rg2 = 17.3; + const double rg3 = 17.3; + const double ri = 5e1; + const double rc = 6e2; + const double gamma = 40.67286402e-9; + const double delta = 17.7493332; + const double pi = 3.141592653589793238462643383; + + const double uin2 = 2 * sin (2e4 * pi * t); + const double ud1 = +y[2] - y[4] - y[6] - uin2; + const double ud2 = -y[3] + y[5] - y[6] - uin2; + const double ud3 = +y[3] + y[4] + y[6] + uin2; + const double ud4 = -y[2] - y[5] + y[6] + uin2; + const double qpud1 = gamma * delta * exp (delta * ud1); + const double qpud2 = gamma * delta * exp (delta * ud2); + const double qpud3 = gamma * delta * exp (delta * ud3); + const double qpud4 = gamma * delta * exp (delta * ud4); + + extern int nje; + size_t i; + + nje += 1; + + for (i = 0; i < NRINGMOD * NRINGMOD; i++) + { + dfdy[i] = 0.0; + } + + + + dfdy[0 * NRINGMOD + 0] = -1 / (c * r); + dfdy[0 * NRINGMOD + 7] = 1 / c; + dfdy[0 * NRINGMOD + 9] = -0.5 / c; + dfdy[0 * NRINGMOD + 10] = -dfdy[0 * NRINGMOD + 9]; + dfdy[0 * NRINGMOD + 13] = dfdy[0 * NRINGMOD + 7]; + dfdy[1 * NRINGMOD + 1] = dfdy[0 * NRINGMOD + 0]; + dfdy[1 * NRINGMOD + 8] = dfdy[0 * NRINGMOD + 7]; + dfdy[1 * NRINGMOD + 11] = dfdy[0 * NRINGMOD + 9]; + dfdy[1 * NRINGMOD + 12] = dfdy[0 * NRINGMOD + 10]; + dfdy[1 * NRINGMOD + 14] = dfdy[0 * NRINGMOD + 13]; + dfdy[2 * NRINGMOD + 2] = (-qpud1 - qpud4) / cs; + dfdy[2 * NRINGMOD + 4] = qpud1 / cs; + dfdy[2 * NRINGMOD + 5] = -qpud4 / cs; + dfdy[2 * NRINGMOD + 6] = (qpud1 + qpud4) / cs; + dfdy[2 * NRINGMOD + 9] = 1 / cs; + dfdy[3 * NRINGMOD + 3] = (-qpud2 - qpud3) / cs; + dfdy[3 * NRINGMOD + 4] = -qpud3 / cs; + dfdy[3 * NRINGMOD + 5] = qpud2 / cs; + dfdy[3 * NRINGMOD + 6] = (-qpud2 - qpud3) / cs; + dfdy[3 * NRINGMOD + 10] = -1 / cs; + dfdy[4 * NRINGMOD + 2] = qpud1 / cs; + dfdy[4 * NRINGMOD + 3] = -qpud3 / cs; + dfdy[4 * NRINGMOD + 4] = (-qpud1 - qpud3) / cs; + dfdy[4 * NRINGMOD + 6] = (-qpud1 - qpud3) / cs; + dfdy[4 * NRINGMOD + 11] = 1 / cs; + dfdy[5 * NRINGMOD + 2] = -qpud4 / cs; + dfdy[5 * NRINGMOD + 3] = qpud2 / cs; + dfdy[5 * NRINGMOD + 5] = (-qpud2 - qpud4) / cs; + dfdy[5 * NRINGMOD + 6] = (qpud2 + qpud4) / cs; + dfdy[5 * NRINGMOD + 12] = -1 / cs; + dfdy[6 * NRINGMOD + 2] = (qpud1 + qpud4) / cp; + dfdy[6 * NRINGMOD + 3] = (-qpud2 - qpud3) / cp; + dfdy[6 * NRINGMOD + 4] = (-qpud1 - qpud3) / cp; + dfdy[6 * NRINGMOD + 5] = (qpud2 + qpud4) / cp; + dfdy[6 * NRINGMOD + 6] = (-qpud1 - qpud2 - qpud3 - qpud4 - 1 / rp) / cp; + dfdy[7 * NRINGMOD + 0] = -1 / lh; + dfdy[8 * NRINGMOD + 1] = dfdy[7 * NRINGMOD + 0]; + dfdy[9 * NRINGMOD + 0] = 0.5 / ls2; + dfdy[9 * NRINGMOD + 2] = -1 / ls2; + dfdy[9 * NRINGMOD + 9] = -rg2 / ls2; + dfdy[10 * NRINGMOD + 0] = -0.5 / ls3; + dfdy[10 * NRINGMOD + 3] = 1 / ls3; + dfdy[10 * NRINGMOD + 10] = -rg3 / ls3; + dfdy[11 * NRINGMOD + 1] = dfdy[9 * NRINGMOD + 0]; + dfdy[11 * NRINGMOD + 4] = dfdy[9 * NRINGMOD + 2]; + dfdy[11 * NRINGMOD + 11] = dfdy[9 * NRINGMOD + 9]; + dfdy[12 * NRINGMOD + 1] = dfdy[10 * NRINGMOD + 0]; + dfdy[12 * NRINGMOD + 5] = dfdy[10 * NRINGMOD + 3]; + dfdy[12 * NRINGMOD + 12] = dfdy[10 * NRINGMOD + 10]; + dfdy[13 * NRINGMOD + 0] = -1 / ls1; + dfdy[13 * NRINGMOD + 13] = -(ri + rg1) / ls1; + dfdy[14 * NRINGMOD + 1] = dfdy[13 * NRINGMOD + 0]; + dfdy[14 * NRINGMOD + 14] = -(rc + rg1) / ls1; + + for (i = 0; i < NRINGMOD; i++) + { + dfdt[i] = 0.0; + } + + return GSL_SUCCESS; +} + +gsl_odeiv2_system rhs_func_ringmod = { + rhs_ringmod, + jac_ringmod, + NRINGMOD, + NULL +}; + + +/**********************************************************/ +/* Functions for carrying out tests */ +/**********************************************************/ + +void +test_odeiv_stepper (const gsl_odeiv2_step_type * T, + const gsl_odeiv2_system * sys, const double h, + const double t, const char desc[], const double ystart[], + const double yfin[], const double relerr) +{ + /* tests stepper T with one fixed length step advance of system sys + and compares the result with given values yfin + */ + + double y[MAXEQ] = { 0.0 }; + double yerr[MAXEQ] = { 0.0 }; + double scale_abs[MAXEQ]; + size_t ne = sys->dimension; + size_t i; + gsl_odeiv2_driver *d; + + for (i = 0; i < MAXEQ; i++) + { + scale_abs[i] = 1.0; + } + + d = gsl_odeiv2_driver_alloc_scaled_new (sys, T, h, relerr, relerr, + 1.0, 0.0, scale_abs); + + DBL_MEMCPY (y, ystart, MAXEQ); + + { + int s = gsl_odeiv2_step_apply (d->s, t, h, y, yerr, 0, 0, sys); + if (s != GSL_SUCCESS) + { + gsl_test (s, "test_odeiv_stepper: %s step_apply returned %d", desc, + s); + } + } + + for (i = 0; i < ne; i++) + { + gsl_test_rel (y[i], yfin[i], relerr, + "%s %s step(%d)", gsl_odeiv2_step_name (d->s), desc, i); + } + + gsl_odeiv2_driver_free (d); +} + +void +test_stepper (const gsl_odeiv2_step_type * T) +{ + /* Tests stepper T with a step of selected systems */ + + double y[MAXEQ] = { 0.0 }; + double yfin[MAXEQ] = { 0.0 }; + + /* Step length */ + double h; + + /* Required tolerance */ + double err_target; + + /* classic stiff */ + h = 1e-7; + err_target = 1e-4; + y[0] = 1.0; + y[1] = 0.0; + + { + const double e1 = exp (-h); + const double e2 = exp (-1000.0 * h); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + + test_odeiv_stepper (T, &rhs_func_stiff, h, 0.0, "classic_stiff", + y, yfin, err_target); + + /* linear */ + h = 1e-1; + err_target = 1e-10; + y[0] = 0.58; + yfin[0] = y[0] + 2 * h; + test_odeiv_stepper (T, &rhs_func_lin, h, 0.0, "linear", + y, yfin, err_target); + + /* exponential */ + h = 1e-4; + err_target = 1e-8; + y[0] = exp (2.7); + yfin[0] = exp (2.7 + h); + test_odeiv_stepper (T, &rhs_func_exp, h, 2.7, "exponential", + y, yfin, err_target); + /* cosine-sine */ + h = 1e-3; + err_target = 1e-6; + y[0] = cos (1.2); + y[1] = sin (1.2); + yfin[0] = cos (1.2 + h); + yfin[1] = sin (1.2 + h); + test_odeiv_stepper (T, &rhs_func_sin, h, 1.2, "cosine-sine", + y, yfin, err_target); +} + +void +test_evolve_system (const gsl_odeiv2_step_type * T, + const gsl_odeiv2_system * sys, + double t0, double t1, double hstart, + double y[], double yfin[], + double err_target, const char *desc) +{ + /* Tests system sys with stepper T. Step length is controlled by + error estimation from the stepper. + */ + + int steps = 0; + size_t i; + + double t = t0; + double h = hstart; + + /* Tolerance factor in testing errors */ + const double factor = 10; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_standard_new (sys, T, h, err_target, err_target, + 1.0, 0.0); + + double *y_orig = (double *) malloc (sys->dimension * sizeof (double)); + + int s = 0; + + extern int nfe, nje; + nfe = 0; + nje = 0; + + while (t < t1) + { + double t_orig = t; + memcpy (y_orig, y, sys->dimension * sizeof (double)); + s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, sys, &t, t1, &h, y); + +#ifdef DEBUG + printf (" %.5e %.5e %.5e %d\n", t, y[0], y[1], + gsl_odeiv2_step_order (d->s)); +#endif + + if (s != GSL_SUCCESS) + { + /* check that t and y are unchanged */ + gsl_test_abs (t, t_orig, 0.0, "%s, t must be restored on failure", + gsl_odeiv2_step_name (d->s)); + + for (i = 0; i < sys->dimension; i++) + { + gsl_test_abs (y[i], y_orig[i], 0.0, + "%s, y must be restored on failure", + gsl_odeiv2_step_name (d->s), desc, i); + } + + if (sys != &rhs_func_xsin) + { + /* apart from xsin, other functions should not return errors */ + gsl_test (s, "%s evolve_apply returned %d", + gsl_odeiv2_step_name (d->s), s); + break; + } + } + + if (steps > 100000) + { + gsl_test (GSL_EFAILED, + "%s evolve_apply reached maxiter", + gsl_odeiv2_step_name (d->s)); + break; + } + + steps++; + } + + gsl_test (s, "%s %s [%g,%g], %d steps (nfe %d, nje %d) completed", + gsl_odeiv2_step_name (d->s), desc, t0, t1, steps, nfe, nje); + + /* err_target is target error of one step. Test if stepper has made + larger error than (tolerance factor times) the number of steps + times the err_target. + */ + + for (i = 0; i < sys->dimension; i++) + { + gsl_test_abs (y[i], yfin[i], factor * d->e->count * err_target, + "%s %s evolve(%d)", gsl_odeiv2_step_name (d->s), desc, i); + } + + free (y_orig); + gsl_odeiv2_driver_free (d); +} + +int +sys_driver (const gsl_odeiv2_step_type * T, + const gsl_odeiv2_system * sys, + double t0, double t1, double hstart, + double y[], double epsabs, double epsrel, const char desc[]) +{ + /* This function evolves a system sys with stepper T from t0 to t1. + Step length is varied via error control with possibly different + absolute and relative error tolerances. + */ + + int s = 0; + int steps = 0; + + double t = t0; + double h = hstart; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_standard_new (sys, T, h, epsabs, epsrel, + 1.0, 0.0); + + extern int nfe, nje; + nfe = 0; + nje = 0; + + while (t < t1) + { + s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, sys, &t, t1, &h, y); + +#ifdef DEBUG + printf ("%.5e %.5e %.5e %d\n", t, y[0], y[1], + gsl_odeiv2_step_order (d->s)); +#endif + + if (s != GSL_SUCCESS) + { + gsl_test (s, "sys_driver: %s evolve_apply returned %d", + gsl_odeiv2_step_name (d->s), s); + break; + } + + if (steps > 1e7) + { + gsl_test (GSL_EMAXITER, + "sys_driver: %s evolve_apply reached maxiter at t=%g", + gsl_odeiv2_step_name (d->s), t); + s = GSL_EMAXITER; + break; + } + + steps++; + } + + gsl_test (s, "%s %s [%g,%g], %d steps (nfe %d, nje %d) completed", + gsl_odeiv2_step_name (d->s), desc, t0, t1, steps, nfe, nje); + + gsl_odeiv2_driver_free (d); + + return s; +} + +void +test_evolve_linear (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test linear evolve */ + + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = 9.0; + test_evolve_system (T, &rhs_func_lin, 0.0, 4.0, h, y, yfin, err, + "linear[0,4]"); +} + +void +test_evolve_exp (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test exponential evolve */ + + double y[1]; + double yfin[1]; + + y[0] = 1.0; + yfin[0] = exp (2.0); + test_evolve_system (T, &rhs_func_exp, 0.0, 2.0, h, y, yfin, err, + "exp[0,2]"); +} + +void +test_evolve_sin (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test sinusoidal evolve */ + + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + yfin[0] = cos (2.0); + yfin[1] = sin (2.0); + test_evolve_system (T, &rhs_func_sin, 0.0, 2.0, h, y, yfin, err, + "sine[0,2]"); +} + +void +test_evolve_xsin (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test sinusoidal evolve including a failing window */ + + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + yfin[0] = cos (2.0); + yfin[1] = sin (2.0); + rhs_xsin_reset = 1; + jac_xsin_reset = 1; + test_evolve_system (T, &rhs_func_xsin, 0.0, 2.0, h, y, yfin, err, + "sine[0,2] w/errors"); +} + +void +test_evolve_stiff1 (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test classical stiff problem evolve, t=[0,1] */ + + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + { + double arg = 1.0; + double e1 = exp (-arg); + double e2 = exp (-1000.0 * arg); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + test_evolve_system (T, &rhs_func_stiff, 0.0, 1.0, h, y, yfin, err, + "stiff[0,1]"); +} + +void +test_evolve_stiff5 (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test classical stiff problem evolve, t=[0,5] */ + + double y[2]; + double yfin[2]; + + y[0] = 1.0; + y[1] = 0.0; + { + double arg = 5.0; + double e1 = exp (-arg); + double e2 = exp (-1000.0 * arg); + yfin[0] = 2.0 * e1 - e2; + yfin[1] = -e1 + e2; + } + test_evolve_system (T, &rhs_func_stiff, 0.0, 5.0, h, y, yfin, err, + "stiff[0,5]"); +} + +void +test_evolve_negative_h (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Test evolution in negative direction */ + + /* Tolerance factor in testing errors */ + const double factor = 10; + + const gsl_odeiv2_system sys = rhs_func_cos; + + double t = 0; + double t1 = -4.0; + + double y = 0.0; + double yfin = sin (t1); + gsl_odeiv2_driver *d; + + /* Make initial h negative */ + h = -fabs (h); + d = gsl_odeiv2_driver_alloc_standard_new (&sys, T, h, err, err, 1.0, 0.0); + + while (t > t1) + { + int status = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, + &sys, &t, t1, &h, &y); + + if (status != GSL_SUCCESS) + { + gsl_test (status, "%s evolve_apply returned %d for negative h", + gsl_odeiv2_step_name (d->s), status); + break; + } + } + + gsl_test_abs (y, yfin, factor * d->e->count * err, + "%s evolution with negative h", gsl_odeiv2_step_name (d->s)); + + gsl_odeiv2_driver_free (d); +} + +void +test_broken (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Check for gsl_odeiv2_evolve_apply. The user function fails at + t>=10, which in this test causes step size to decrease below + machine precision and return with a failure code. + */ + + /* Tolerance factor in testing errors */ + const double factor = 10; + + const gsl_odeiv2_system sys = rhs_func_broken; + + gsl_odeiv2_driver *d = gsl_odeiv2_driver_alloc_y_new (&sys, T, h, err, err); + + double t = 0; + double t1 = 100.0; + + double y = 0.0; + const double final_max_h = GSL_DBL_EPSILON; + + int status; + while (t < t1) + { + status = + gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, t1, &h, &y); + + if (status != GSL_SUCCESS) + { + break; + } + } + + gsl_test_abs (h + final_max_h, final_max_h, factor * final_max_h, + "%s test_broken: step size at break point", + gsl_odeiv2_step_name (d->s)); + + gsl_test_abs (t, 10.0, factor * err, + "%s test_broken: point of break", + gsl_odeiv2_step_name (d->s)); + + /* GSL_FAILURE results from stepper failure, 123 from user function */ + + if (status != GSL_FAILURE && status != 123) + { + gsl_test (status, "%s test_broken: evolve return value %d", + gsl_odeiv2_step_name (d->s), status); + } + else + { + gsl_test (GSL_SUCCESS, "%s test_broken: evolve return value %d", + gsl_odeiv2_step_name (d->s), status); + } + + gsl_odeiv2_driver_free (d); +} + +void +test_stepsize_fail (const gsl_odeiv2_step_type * T, double h) +{ + /* Check for gsl_odeiv2_evolve_apply. The user function works + apparently fine (returns GSL_SUCCESS) but is faulty in this case. + gsl_odeiv2_evolve_apply therefore decreases the step-size below + machine precision and therefore stops with GSL_FAILURE. + */ + + /* Error tolerance */ + const double epsabs = 1e-16; + const double epsrel = 1e-6; + + /* Tolerance factor in testing errors */ + const double factor = 10; + + const double final_max_h = GSL_DBL_EPSILON; + const gsl_odeiv2_system sys = rhs_func_br; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_y_new (&sys, T, h, epsabs, epsrel); + + double t = 1.0; + double t1 = 1e5; + double y = 0.0; + int status; + + while (t < t1) + { + status = + gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, t1, &h, &y); + + if (status != GSL_SUCCESS) + { + break; + } + } + + gsl_test_abs (h + final_max_h, final_max_h, factor * final_max_h, + "%s test_stepsize_fail: step size at break point", + gsl_odeiv2_step_name (d->s)); + + gsl_test_abs (t, 1.0, 1e-6, + "%s test_stepsize_fail: point of break", + gsl_odeiv2_step_name (d->s)); + + gsl_test_int (status, GSL_FAILURE, + "%s test_stepsize_fail: evolve return value", + gsl_odeiv2_step_name (d->s)); + + gsl_odeiv2_driver_free (d); +} + +void +test_user_break (const gsl_odeiv2_step_type * T, double h) +{ + /* Tests for user signaled immediate break */ + + const double tol = 1e-8; + + gsl_odeiv2_driver *d = gsl_odeiv2_driver_alloc_y_new (&rhs_func_sin_ub, T, + h, tol, tol); + + double y[] = { 1.0, 0.0 }; + double t = 0.0; + const double t1 = 8.25; + + int s = gsl_odeiv2_driver_apply (d, &t, t1, y); + + gsl_test ((s - GSL_EBADFUNC), "test_user_break returned %d", s); + + gsl_odeiv2_driver_free (d); +} + +void +test_stepfn (const gsl_odeiv2_step_type * T) +{ + /* Test evolve on a small derivative change at t=0 */ + + double epsabs = 1e-16; + double epsrel = 1e-6; + + const gsl_odeiv2_system sys = rhs_func_stepfn; + + double t = 0.0; + double h = 1e-6; + double y = 0.0; + int i = 0; + int status = 0; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_y_new (&sys, T, h, epsabs, epsrel); + + while (t < 2 && i < 1000000) + { + status = + gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, 2, &h, &y); +#ifdef DEBUG + printf ("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); +#endif + + if (status != GSL_SUCCESS) + break; + + i++; + } + + gsl_test (status, "evolve step function, return value (stepfn/%s): %d", + gsl_odeiv2_step_name (d->s), status); + + gsl_test_abs (t, 2, 1e-16, "evolve step function, t (stepfn/%s)", + gsl_odeiv2_step_name (d->s)); + + gsl_test_rel (y, 1, epsrel, "evolve step function, y (stepfn/%s)", + gsl_odeiv2_step_name (d->s)); + + gsl_odeiv2_driver_free (d); +} + +void +test_stepfn2 (const gsl_odeiv2_step_type * T) +{ + /* Test evolve on a large derivative change at t=0 */ + + double epsabs = 1e-16; + double epsrel = 1e-6; + + const gsl_odeiv2_system sys = rhs_func_stepfn2; + + double t = -1.0; + double h = 1e-6; + double y = 0.0; + + int i = 0; + int status; + const int maxiter = 100000; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_yp_new (&sys, T, h, epsabs, epsrel); + + while (t < 1.0 && i < maxiter) + { + status = + gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, 1.0, &h, &y); +#ifdef DEBUG + printf ("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); +#endif + if (status != GSL_SUCCESS) + break; + + i++; + } + + if (i >= maxiter) + printf ("FAIL: evolve big step function, (stepfn2/%s) reached maxiter\n", + gsl_odeiv2_step_name (d->s)); + + gsl_test_abs (t, 1.0, 1e-16, "evolve big step function, t (stepfn2/%s)", + gsl_odeiv2_step_name (d->s)); + gsl_test_rel (y, 1e300, epsrel, "evolve big step function, y (stepfn2/%s)", + gsl_odeiv2_step_name (d->s)); + + gsl_odeiv2_driver_free (d); +} + +void +test_nonstiff_problems (void) +{ + /* Compares output of non-stiff (or only moderately stiff) problems + with several steppers + */ + + const gsl_odeiv2_step_type *steppers[MAXNS]; + + /* Required error tolerance for each stepper. */ + double err_target[MAXNS]; + + /* initial values for each ode-solver */ + double y[MAXEQ * MAXNS]; + + size_t i, k, p; + + /* Number of problems to test */ +#define CONST_NONSTIFF_NPROB 4 + + /* Problems, their names and number of equations */ + const gsl_odeiv2_system *prob[] = + { &rhs_func_vl, &rhs_func_vanderpol, &rhs_func_stifftrig, + &rhs_func_brusselator + }; + const char *probname[] = + { "volterra-lotka", "vanderpol", "stifftrig", "brusselator" }; + const size_t sd[] = { 2, 2, 1, 2 }; + + /* Integration interval for problems */ + const double start[CONST_NONSTIFF_NPROB] = { 0.0 }; + const double end[] = { 9.0, 100.0, 1.5, 20.0 }; + + const double epsabs = 1e-8; + const double epsrel = 1e-8; + const double initstepsize = 1e-5; + + /* Steppers */ + + steppers[0] = gsl_odeiv2_step_rk4; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv2_step_rk2; + err_target[1] = 1e-6; + steppers[2] = gsl_odeiv2_step_rkf45; + err_target[2] = 1e-6; + steppers[3] = gsl_odeiv2_step_rkck; + err_target[3] = 1e-6; + steppers[4] = gsl_odeiv2_step_rk8pd; + err_target[4] = 1e-6; + steppers[5] = gsl_odeiv2_step_rk1imp; + err_target[5] = 1e-3; + steppers[6] = gsl_odeiv2_step_rk2imp; + err_target[6] = 1e-5; + steppers[7] = gsl_odeiv2_step_rk4imp; + err_target[7] = 1e-6; + steppers[8] = gsl_odeiv2_step_bsimp; + err_target[8] = 1e-6; + steppers[9] = gsl_odeiv2_step_msadams; + err_target[9] = 1e-5; + steppers[10] = gsl_odeiv2_step_msbdf; + err_target[10] = 1e-5; + steppers[11] = 0; + + /* Loop over problems */ + + for (p = 0; p < CONST_NONSTIFF_NPROB; p++) + { + /* Initialize */ + + for (i = 0; i < MAXNS * MAXEQ; i++) + { + y[i] = 0.0; + } + + for (i = 0; i < MAXNS; i++) + { + switch (p) + { + case 0: + y[i * sd[p]] = 2.725; + y[i * sd[p] + 1] = 1.0; + break; + case 1: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 0.0; + break; + case 2: + y[i * sd[p]] = 0.0; + break; + case 3: + y[i * sd[p]] = 1.5; + y[i * sd[p] + 1] = 3.0; + break; + default: + gsl_test (GSL_EFAILED, + "test_nonstiff_problems: initialization error\n"); + return; + } + } + + /* Call each solver for the problem */ + + for (i = 0; steppers[i] != 0; i++) + { + int s = sys_driver (steppers[i], prob[p], start[p], end[p], + initstepsize, &y[sd[p] * i], + epsabs, epsrel, probname[p]); + + if (s != GSL_SUCCESS) + { + gsl_test (s, "test_nonstiff_problems %s %s", + steppers[i]->name, probname[p]); + } + } + + /* Compare results */ + + for (i = 1; steppers[i] != 0; i++) + for (k = 0; k < sd[p]; k++) + { + const double val1 = y[k]; + const double val2 = y[sd[p] * i + k]; + gsl_test_rel (val1, val2, + (GSL_MAX (err_target[0], err_target[i])), + "%s/%s %s [%d]", + steppers[0]->name, steppers[i]->name, + probname[p], k); + } + } +} + +void +test_stiff_problems (void) +{ + /* Compares output of stiff problems with several steppers */ + + const gsl_odeiv2_step_type *steppers[MAXNS]; + + /* Required error tolerance for each stepper. */ + double err_target[MAXNS]; + + /* initial values for each ode-solver */ + double y[MAXEQ * MAXNS]; + + size_t i, k, p; + + /* Number of problems to test */ +#define CONST_STIFF_NPROB 3 + + /* Problems, their names and number of equations */ + const gsl_odeiv2_system *prob[] = + { &rhs_func_oregonator, &rhs_func_e5, &rhs_func_robertson }; + const char *probname[] = { "oregonator", "e5", "robertson" }; + const size_t sd[] = { 3, 4, 3 }; + + /* Integration interval for problems */ + const double start[CONST_STIFF_NPROB] = { 0.0 }; + const double end[] = { 360.0, 1e4, 1e4 }; + + const double epsabs = 1e-40; + const double epsrel = 1e-7; + const double initstepsize = 1e-5; + + /* Steppers */ + + steppers[0] = gsl_odeiv2_step_bsimp; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv2_step_rk1imp; + err_target[1] = 5e-3; + steppers[2] = gsl_odeiv2_step_rk2imp; + err_target[2] = 5e-5; + steppers[3] = gsl_odeiv2_step_rk4imp; + err_target[3] = 5e-5; + steppers[4] = gsl_odeiv2_step_msbdf; + err_target[4] = 1e-4; + steppers[5] = 0; + + /* Loop over problems */ + + for (p = 0; p < CONST_STIFF_NPROB; p++) + { + /* Initialize */ + + for (i = 0; i < MAXNS * MAXEQ; i++) + { + y[i] = 0.0; + } + + for (i = 0; i < MAXNS; i++) + { + switch (p) + { + case 0: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 2.0; + y[i * sd[p] + 2] = 3.0; + break; + case 1: + y[i * sd[p]] = 1.76e-3; + y[i * sd[p] + 1] = 0.0; + y[i * sd[p] + 2] = 0.0; + y[i * sd[p] + 3] = 0.0; + break; + case 2: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 0.0; + y[i * sd[p] + 2] = 0.0; + break; + default: + gsl_test (GSL_EFAILED, + "test_stiff_problems: initialization error\n"); + return; + } + } + + /* Call each solver for the problem */ + + for (i = 0; steppers[i] != 0; i++) + { + int s = sys_driver (steppers[i], prob[p], start[p], end[p], + initstepsize, &y[sd[p] * i], + epsabs, epsrel, probname[p]); + + if (s != GSL_SUCCESS) + { + gsl_test (s, "test_stiff_problems %s %s", + steppers[i]->name, probname[p]); + } + } + + /* Compare results */ + + for (i = 1; steppers[i] != 0; i++) + for (k = 0; k < sd[p]; k++) + { + const double val1 = y[k]; + const double val2 = y[sd[p] * i + k]; + gsl_test_rel (val1, val2, + (GSL_MAX (err_target[0], err_target[i])), + "%s/%s %s [%d]", + steppers[0]->name, steppers[i]->name, + probname[p], k); + } + } +} + +void +test_extreme_problems (void) +{ + /* Compares output of numerically particularly demanding problems + with several steppers */ + + const gsl_odeiv2_step_type *steppers[MAXNS]; + + /* Required error tolerance for each stepper. */ + double err_target[MAXNS]; + + /* initial values for each ode-solver */ + double y[MAXEQ * MAXNS]; + + size_t i, k, p; + + /* Number of problems to test */ +#define CONST_EXTREME_NPROB 3 + + /* Problems, their names and number of equations */ + const gsl_odeiv2_system *prob[] = + { &rhs_func_e5, &rhs_func_robertson, &rhs_func_ringmod }; + const char *probname[] = { "e5_bigt", "robertson_bigt", "ringmod" }; + const size_t sd[] = { 4, 3, NRINGMOD }; + + /* Integration interval for problems */ + const double start[CONST_EXTREME_NPROB] = { 0.0 }; + const double end[CONST_EXTREME_NPROB] = { 1e11, 1e11, 1e-3 }; + + const double epsabs[CONST_EXTREME_NPROB] = + { 1e1 * GSL_DBL_MIN, 1e1 * GSL_DBL_MIN, 1e-7 }; + const double epsrel[CONST_EXTREME_NPROB] = { 1e-12, 1e-12, 1e-7 }; + const double initstepsize[CONST_EXTREME_NPROB] = { 1e-5, 1e-5, 1e-10 }; + + /* Problem specific tolerance modification coefficients */ + const double pec[CONST_EXTREME_NPROB] = { 1.0, 1.0, 1e1 }; + + /* Steppers */ + + steppers[0] = gsl_odeiv2_step_bsimp; + err_target[0] = 1e-3; + steppers[1] = gsl_odeiv2_step_msbdf; + err_target[1] = 1e-3; + steppers[2] = 0; + + /* Loop over problems */ + + for (p = 0; p < CONST_EXTREME_NPROB; p++) + { + /* Initialize */ + + for (i = 0; i < MAXNS * MAXEQ; i++) + { + y[i] = 0.0; + } + + for (i = 0; i < MAXNS; i++) + { + switch (p) + { + case 0: + y[i * sd[p]] = 1.76e-3; + y[i * sd[p] + 1] = 0.0; + y[i * sd[p] + 2] = 0.0; + y[i * sd[p] + 3] = 0.0; + break; + case 1: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 0.0; + y[i * sd[p] + 2] = 0.0; + break; + case 2: + { + size_t j; + for (j = 0; j < NRINGMOD; j++) + { + y[i * sd[p] + j] = 0.0; + } + } + break; + default: + gsl_test (GSL_EFAILED, + "test_extreme_problems: initialization error\n"); + return; + } + } + + /* Call each solver for the problem */ + + for (i = 0; steppers[i] != 0; i++) + { + int s = sys_driver (steppers[i], prob[p], start[p], end[p], + initstepsize[p], &y[sd[p] * i], + epsabs[p], epsrel[p], probname[p]); + + if (s != GSL_SUCCESS) + { + printf ("start=%.5e, initstepsize=%.5e\n", start[p], + initstepsize[p]); + gsl_test (s, "test_extreme_problems %s %s", steppers[i]->name, + probname[p]); + } + } + + /* Compare results */ + + for (i = 1; steppers[i] != 0; i++) + for (k = 0; k < sd[p]; k++) + { + const double val1 = y[k]; + const double val2 = y[sd[p] * i + k]; + gsl_test_rel (val1, val2, + (pec[p] * GSL_MAX (err_target[0], err_target[i])), + "%s/%s %s [%d]", + steppers[0]->name, steppers[i]->name, + probname[p], k); + } + } +} + +void +test_driver (void) +{ + /* Tests for gsl_odeiv2_driver object */ + int s; + const double tol = 1e-8; + const double hmax = 1e-2; + + double y[] = { 1.0, 0.0 }; + double t = 0.0; + const double t1 = 8.25; + const double t2 = 100; + const double t3 = -2.5; + const size_t minsteps = ceil (t1 / hmax); + const size_t maxsteps = 20; + const double hmin = 1e-10; + const size_t nfsteps = 100; + + gsl_odeiv2_driver *d = + gsl_odeiv2_driver_alloc_y_new (&rhs_func_sin, gsl_odeiv2_step_rkf45, + 1e-3, tol, tol); + gsl_odeiv2_driver_set_hmax (d, hmax); + + s = gsl_odeiv2_driver_apply (d, &t, t1, y); + + if (s != GSL_SUCCESS) + { + gsl_test (s, "test_driver apply returned %d", s); + } + + /* Test that result is correct */ + + gsl_test_rel (y[0], cos (t1), d->n * tol, "test_driver y0 "); + gsl_test_rel (y[1], sin (t1), d->n * tol, "test_driver y1 "); + + /* Test that maximum step length is obeyed */ + + if (d->n < minsteps) + { + gsl_test (1, "test_driver steps %d < minsteps %d \n", d->n, minsteps); + } + else + { + gsl_test (0, "test_driver max step length test"); + } + + gsl_odeiv2_driver_free (d); + + /* Test that maximum number of steps is obeyed */ + + d = gsl_odeiv2_driver_alloc_y_new (&rhs_func_sin, gsl_odeiv2_step_rkf45, + 1e-3, tol, tol); + gsl_odeiv2_driver_set_hmax (d, hmax); + gsl_odeiv2_driver_set_nmax (d, maxsteps); + + s = gsl_odeiv2_driver_apply (d, &t, t2, y); + + if (d->n != maxsteps + 1) + { + gsl_test (1, "test_driver steps %d, expected %d", d->n, maxsteps + 1); + } + else + { + gsl_test (0, "test_driver max steps test"); + } + + gsl_odeiv2_driver_free (d); + + /* Test that minimum step length is obeyed */ + + d = gsl_odeiv2_driver_alloc_y_new (&rhs_func_broken, gsl_odeiv2_step_rk8pd, + 1e-3, tol, tol); + + gsl_odeiv2_driver_set_hmin (d, hmin); + y[0] = 0.0; + t = 0.0; + + s = gsl_odeiv2_driver_apply (d, &t, t2, y); + + if (s != GSL_ENOPROG) + { + gsl_test (1, "test_driver min step test returned %d", s); + } + else + { + gsl_test (0, "test_driver min step test"); + } + + gsl_odeiv2_driver_free (d); + + /* Test negative integration direction */ + + d = gsl_odeiv2_driver_alloc_y_new (&rhs_func_sin, gsl_odeiv2_step_rkf45, + -1e-3, tol, tol); + + y[0] = 1.0; + y[1] = 0.0; + t = 2.5; + + gsl_odeiv2_driver_set_nmax (d, 1000); + s = gsl_odeiv2_driver_apply (d, &t, t3, y); + + { + const double tol = 1e-6; + const double test = fabs (t - t3); + const double val = fabs (sin (-5.0) - y[1]); + + if (test > GSL_DBL_EPSILON) + { + gsl_test (1, + "test_driver negative dir diff %e, expected less than %e", + test, GSL_DBL_EPSILON); + } + else if (val > tol) + { + gsl_test (1, "test_driver negative dir val %e, expected less than %e", + val, tol); + } + else + { + gsl_test (s, "test_driver negative direction test"); + } + } + + /* Test driver_apply_fixed_step */ + + s = gsl_odeiv2_driver_apply_fixed_step (d, &t, 0.025, nfsteps, y); + + { + const double tol = 1e-6; + const double val = fabs (sin (-2.5) - y[1]); + + if (fabs (t) > nfsteps * GSL_DBL_EPSILON) + { + gsl_test (1, + "test_driver apply_fixed_step diff %e, expected less than %e", + fabs (t), nfsteps * GSL_DBL_EPSILON); + } + else if (val > tol) + { + gsl_test (1, + "test_driver apply_fixed_step val %e, expected less than %e", + val, tol); + } + else + { + gsl_test (s, "test_driver apply_fixed_step test"); + } + } + + gsl_odeiv2_driver_free (d); + +} + +void +benchmark_precision (void) +{ + /* Tests steppers with several error tolerances and evaluates their + performance and precision. + */ + + /* Maximum number of tolerances to be tested */ +#define MAXNT 12 + + const gsl_odeiv2_step_type *steppers[MAXNS]; + + /* Required error tolerance for each stepper. */ + double err_target[MAXNS]; + + /* initial values for each ode-solver */ + double y[MAXEQ * MAXNS * MAXNT]; + + /* precise results from e.g. analytical solution */ + double yres[MAXEQ]; + + size_t i, j, k, p; + + /* Number of problems to test */ +#define CONST_BENCHMARK_PRECISION_NPROB 3 + + /* Problems, their names and number of equations */ + const gsl_odeiv2_system *prob[] = + { &rhs_func_sin, &rhs_func_exp, &rhs_func_stiff }; + const char *probname[] = + { "rhs_func_sin", "rhs_func_exp", "rhs_func_stiff" }; + const size_t sd[] = { 2, 1, 2 }; + + /* Integration interval for problems */ + const double start[] = { 0.0, 0.0, 0.0 }; + const double end[] = { 2.4, 8.4, 1.2 }; + + const double epsabs[] = { 1e-4, 1e-6, 1e-8, 1e-10, 1e-12, 1e-14, 0 }; + const double epsrel[] = { 1e-4, 1e-6, 1e-8, 1e-10, 1e-12, 1e-14, 0 }; + const double initstepsize = 1e-5; + + /* number of function and jacobian evaluations */ + extern int nfe, nje; + int nnfe[MAXNS * MAXNT] = { 0.0 }; + int nnje[MAXNS * MAXNT] = { 0.0 }; + + /* Steppers */ + + steppers[0] = gsl_odeiv2_step_rk4; + err_target[0] = 1e-6; + steppers[1] = gsl_odeiv2_step_rk2; + err_target[1] = 1e-6; + steppers[2] = gsl_odeiv2_step_rkf45; + err_target[2] = 1e-6; + steppers[3] = gsl_odeiv2_step_rkck; + err_target[3] = 1e-6; + steppers[4] = gsl_odeiv2_step_rk8pd; + err_target[4] = 1e-6; + steppers[5] = gsl_odeiv2_step_rk1imp; + err_target[5] = 1e-3; + steppers[6] = gsl_odeiv2_step_rk2imp; + err_target[6] = 1e-5; + steppers[7] = gsl_odeiv2_step_rk4imp; + err_target[7] = 1e-6; + steppers[8] = gsl_odeiv2_step_bsimp; + err_target[8] = 1e-6; + steppers[9] = gsl_odeiv2_step_msadams; + err_target[9] = 1e-5; + steppers[10] = gsl_odeiv2_step_msbdf; + err_target[10] = 1e-5; + steppers[11] = 0; + + /* Loop over problems */ + + for (p = 0; p < CONST_BENCHMARK_PRECISION_NPROB; p++) + { + /* Initialize */ + + for (i = 0; i < MAXNS * MAXEQ * MAXNT; i++) + { + y[i] = 0.0; + } + + for (i = 0; i < MAXNS * MAXNT; i++) + { + switch (p) + { + case 0: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 0.0; + yres[0] = cos (2.4); + yres[1] = sin (2.4); + break; + case 1: + y[i * sd[p]] = 1.0; + yres[0] = exp (8.4); + break; + case 2: + y[i * sd[p]] = 1.0; + y[i * sd[p] + 1] = 0.0; + yres[0] = 2 * exp (-1.2) - exp (-1000 * 1.2); + yres[1] = -exp (-1.2) + exp (-1000 * 1.2); + break; + default: + gsl_test (GSL_EFAILED, + "benchmark_precision: initialization error\n"); + return; + } + } + + /* Call each solver for the problem */ + + for (i = 0; steppers[i] != 0; i++) + for (j = 0; epsrel[j] != 0; j++) + { + int s = sys_driver (steppers[i], prob[p], start[p], end[p], + initstepsize, &y[sd[p] * (j + i * MAXNT)], + epsabs[j], epsrel[j], probname[p]); + + if (s != GSL_SUCCESS) + { + for (k = 0; k < sd[p]; k++) + { + y[sd[p] * (j + i * MAXNT) + k] = GSL_NAN; + } + } + + else + { + nnfe[j + i * MAXNT] = nfe; + nnje[j + i * MAXNT] = nje; + } + } + + /* Print results */ + + printf + ("benchmark_precision: diff = (y_true - y) / y_true with %s\n epsrel: ", + probname[p]); + + for (i = 0; epsrel[i] != 0.0; i++) + { + printf ("%12.0e ", epsrel[i]); + } + + printf ("\n"); + + for (i = 0; steppers[i] != 0; i++) + { + for (k = 0; k < sd[p]; k++) + { + printf ("%8s diff[%d]: ", steppers[i]->name, (int) k); + + for (j = 0; epsrel[j] != 0; j++) + { + const double diff = + (yres[k] - y[sd[p] * (j + i * MAXNT) + k]) / yres[k]; + printf ("%12.5e ", diff); + } + + printf ("\n"); + } + } + + printf ("\n"); + + /* Print number of function/jacobian evaluations */ + + printf + ("benchmark_precision: number of function/jacobian evaluations with %s\n epsrel: ", + probname[p]); + + for (i = 0; epsrel[i] != 0.0; i++) + { + printf ("%12.0e ", epsrel[i]); + } + + printf ("\n"); + + for (i = 0; steppers[i] != 0; i++) + { + printf ("%8s nfe/nje: ", steppers[i]->name); + + for (j = 0; epsrel[j] != 0; j++) + { + printf ("%9d %9d | ", nnfe[j + i * MAXNT], nnje[j + i * MAXNT]); + } + + printf ("\n"); + } + printf ("\n"); + + } +} + +void +test_evolve_temp (const gsl_odeiv2_step_type * T, double h, double err) +{ + /* Temporary test */ + + double y[3]; + double yfin[3]; + + y[0] = 1.0; + y[1] = 0.0; + y[2] = 0.0; + yfin[0] = 0; + yfin[1] = 0; + yfin[2] = 0; + test_evolve_system (T, &rhs_func_stiff, 0.0, 1.0, h, y, yfin, err, "temp"); +} + +/**********************************************************/ +/* Main function */ +/**********************************************************/ + +int +main (void) +{ + + /* Benchmark routine to compare stepper performance */ + /* benchmark_precision(); return 0;*/ + + /* Test single problem, for debugging purposes */ + /* test_evolve_temp (gsl_odeiv2_step_msadams, 1e-3, 1e-8); return 0; */ + int i; + + struct ptype + { + const gsl_odeiv2_step_type *type; + double h; + } + p[MAXNS]; + + struct ptype explicit_stepper[MAXNS]; + + p[0].type = gsl_odeiv2_step_rk4; + p[0].h = 1.0e-3; + p[1].type = gsl_odeiv2_step_rk2; + p[1].h = 1.0e-3; + p[2].type = gsl_odeiv2_step_rkf45; + p[2].h = 1.0e-3; + p[3].type = gsl_odeiv2_step_rkck; + p[3].h = 1.0e-3; + p[4].type = gsl_odeiv2_step_rk8pd; + p[4].h = 1.0e-3; + p[5].type = gsl_odeiv2_step_rk1imp; + p[5].h = 1.0e-3; + p[6].type = gsl_odeiv2_step_rk2imp; + p[6].h = 1.0e-3; + p[7].type = gsl_odeiv2_step_rk4imp; + p[7].h = 1.0e-3; + p[8].type = gsl_odeiv2_step_bsimp; + p[8].h = 1.0e-3; + p[9].type = gsl_odeiv2_step_msadams; + p[9].h = 1.0e-3; + p[10].type = gsl_odeiv2_step_msbdf; + p[10].h = 1.0e-3; + p[11].type = 0; + + gsl_ieee_env_setup (); + + /* Basic tests for all steppers */ + + for (i = 0; p[i].type != 0; i++) + { + test_stepper (p[i].type); + } + + for (i = 0; p[i].type != 0; i++) + { + test_evolve_linear (p[i].type, p[i].h, 1e-10); + test_evolve_exp (p[i].type, p[i].h, 1e-5); + test_evolve_sin (p[i].type, p[i].h, 1e-8); + test_evolve_xsin (p[i].type, p[i].h, 1e-8); + test_evolve_xsin (p[i].type, 0.1, 1e-8); + test_evolve_stiff1 (p[i].type, p[i].h, 1e-7); + test_evolve_stiff5 (p[i].type, p[i].h, 1e-7); + test_evolve_negative_h (p[i].type, p[i].h, 1e-7); + test_broken (p[i].type, p[i].h, 1e-8); + test_stepsize_fail (p[i].type, p[i].h); + test_user_break (p[i].type, p[i].h); + } + + /* Derivative test for explicit steppers */ + + explicit_stepper[0].type = gsl_odeiv2_step_rk4; + explicit_stepper[0].h = 1.0e-3; + explicit_stepper[1].type = gsl_odeiv2_step_rk2; + explicit_stepper[1].h = 1.0e-3; + explicit_stepper[2].type = gsl_odeiv2_step_rkf45; + explicit_stepper[2].h = 1.0e-3; + explicit_stepper[3].type = gsl_odeiv2_step_rkck; + explicit_stepper[3].h = 1.0e-3; + explicit_stepper[4].type = gsl_odeiv2_step_rk8pd; + explicit_stepper[4].h = 1.0e-3; + explicit_stepper[5].type = gsl_odeiv2_step_msadams; + explicit_stepper[5].h = 1.0e-3; + explicit_stepper[6].type = 0; + + for (i = 0; explicit_stepper[i].type != 0; i++) + { + test_stepfn (explicit_stepper[i].type); + test_stepfn2 (explicit_stepper[i].type); + } + + /* Special tests */ + + test_nonstiff_problems (); + + test_stiff_problems (); + + test_extreme_problems (); + + test_driver (); + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/permutation/.deps/canonical.Plo b/software/gsl-1.15/permutation/.deps/canonical.Plo new file mode 100644 index 000000000..d08355188 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/canonical.Plo @@ -0,0 +1,98 @@ +canonical.lo: canonical.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_permutation.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/permutation/.deps/file.Plo b/software/gsl-1.15/permutation/.deps/file.Plo new file mode 100644 index 000000000..f31815497 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/file.Plo @@ -0,0 +1,97 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_permutation.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/permutation/.deps/init.Plo b/software/gsl-1.15/permutation/.deps/init.Plo new file mode 100644 index 000000000..0cc34a2da --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/init.Plo @@ -0,0 +1,97 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/permutation/.deps/inline.Plo b/software/gsl-1.15/permutation/.deps/inline.Plo new file mode 100644 index 000000000..ca81c64e2 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/inline.Plo @@ -0,0 +1,99 @@ +inline.lo: inline.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../build.h \ + ../gsl/gsl_permutation.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../build.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/permutation/.deps/permutation.Plo b/software/gsl-1.15/permutation/.deps/permutation.Plo new file mode 100644 index 000000000..845768554 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/permutation.Plo @@ -0,0 +1,98 @@ +permutation.lo: permutation.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_permutation.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_permutation.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/permutation/.deps/permute.Plo b/software/gsl-1.15/permutation/.deps/permute.Plo new file mode 100644 index 000000000..02d2e3c97 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/permute.Plo @@ -0,0 +1,258 @@ +permute.lo: permute.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_permute.h \ + ../gsl/gsl_permute_complex_long_double.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_permute_complex_double.h ../gsl/gsl_permute_complex_float.h \ + ../gsl/gsl_permute_long_double.h ../gsl/gsl_permute_double.h \ + ../gsl/gsl_permute_float.h ../gsl/gsl_permute_ulong.h \ + ../gsl/gsl_permute_long.h ../gsl/gsl_permute_uint.h \ + ../gsl/gsl_permute_int.h ../gsl/gsl_permute_ushort.h \ + ../gsl/gsl_permute_short.h ../gsl/gsl_permute_uchar.h \ + ../gsl/gsl_permute_char.h ../gsl/gsl_permute_vector.h \ + ../gsl/gsl_permute_vector_complex_long_double.h \ + ../gsl/gsl_permute_vector_complex_double.h \ + ../gsl/gsl_permute_vector_complex_float.h \ + ../gsl/gsl_permute_vector_long_double.h \ + ../gsl/gsl_permute_vector_double.h ../gsl/gsl_permute_vector_float.h \ + ../gsl/gsl_permute_vector_ulong.h ../gsl/gsl_permute_vector_long.h \ + ../gsl/gsl_permute_vector_uint.h ../gsl/gsl_permute_vector_int.h \ + ../gsl/gsl_permute_vector_ushort.h ../gsl/gsl_permute_vector_short.h \ + ../gsl/gsl_permute_vector_uchar.h ../gsl/gsl_permute_vector_char.h \ + ../templates_on.h permute_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_permute.h: + +../gsl/gsl_permute_complex_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_permute_complex_double.h: + +../gsl/gsl_permute_complex_float.h: + +../gsl/gsl_permute_long_double.h: + +../gsl/gsl_permute_double.h: + +../gsl/gsl_permute_float.h: + +../gsl/gsl_permute_ulong.h: + +../gsl/gsl_permute_long.h: + +../gsl/gsl_permute_uint.h: + +../gsl/gsl_permute_int.h: + +../gsl/gsl_permute_ushort.h: + +../gsl/gsl_permute_short.h: + +../gsl/gsl_permute_uchar.h: + +../gsl/gsl_permute_char.h: + +../gsl/gsl_permute_vector.h: + +../gsl/gsl_permute_vector_complex_long_double.h: + +../gsl/gsl_permute_vector_complex_double.h: + +../gsl/gsl_permute_vector_complex_float.h: + +../gsl/gsl_permute_vector_long_double.h: + +../gsl/gsl_permute_vector_double.h: + +../gsl/gsl_permute_vector_float.h: + +../gsl/gsl_permute_vector_ulong.h: + +../gsl/gsl_permute_vector_long.h: + +../gsl/gsl_permute_vector_uint.h: + +../gsl/gsl_permute_vector_int.h: + +../gsl/gsl_permute_vector_ushort.h: + +../gsl/gsl_permute_vector_short.h: + +../gsl/gsl_permute_vector_uchar.h: + +../gsl/gsl_permute_vector_char.h: + +../templates_on.h: + +permute_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/permutation/.deps/test.Po b/software/gsl-1.15/permutation/.deps/test.Po new file mode 100644 index 000000000..93fd8bb70 --- /dev/null +++ b/software/gsl-1.15/permutation/.deps/test.Po @@ -0,0 +1,107 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_permute_double.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_permute_double.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/permutation/ChangeLog b/software/gsl-1.15/permutation/ChangeLog new file mode 100644 index 000000000..c47838723 --- /dev/null +++ b/software/gsl-1.15/permutation/ChangeLog @@ -0,0 +1,74 @@ +2009-07-09 Brian Gough + + * init.c (gsl_permutation_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * permutation.c: move gsl_permutation_get to inline.c + + * gsl_permutation.h: use new inline declarations + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2003-02-17 Brian Gough + + * canonical.c (gsl_permutation_canonical_to_linear): fixed bug + confusing input and output (swapped pp and qq) + +Sat Apr 6 19:08:40 2002 Brian Gough + + * test.c (main): added tests for canonical representation + functions + + * canonical.c: functions for canonical representations + (Nicolas Darnis) + +Mon Apr 1 17:29:49 2002 Brian Gough + + * permutation.c (gsl_permutation_mul): added function for + combining permutations (Nicolas Darnis) + +Sat Feb 9 18:17:53 2002 Brian Gough + + * permutation.c (gsl_permutation_memcpy): added memcpy function + +Tue Sep 4 17:22:06 2001 Brian Gough + + * added permutations of complex arrays and vectors + + * permute_source.c: added permutations of complex arrays and + vectors + +Sat Dec 30 21:30:16 2000 Brian Gough + + * test.c: added the start of a test program + + * permutation.c: added gsl_permutation_next and + gsl_permutation_prev as in STL, from vattervi@msu.edu + +Mon Apr 24 20:54:03 2000 Brian Gough + + * gsl_permutation.h: renamed gsl_permutation_invert to + gsl_permutation_inverse + +Mon Apr 10 14:31:01 2000 Brian Gough + + * added functions for permuting data and vectors + +Thu Feb 24 17:53:55 2000 Brian Gough + + * permutation.c (gsl_permutation_invert): add an inverse function + for permutations + +Sat Feb 19 12:04:32 2000 Brian Gough + + * permutation.c (gsl_permutation_reverse): changed from return + type int to void, since no errors can occur. + +Fri Feb 18 12:06:13 2000 Brian Gough + + * permutation.c: added valid and reverse methods + (gsl_permutation_reverse): fixed bug in reverse + diff --git a/software/gsl-1.15/permutation/Makefile.am b/software/gsl-1.15/permutation/Makefile.am new file mode 100644 index 000000000..1a4ac94a1 --- /dev/null +++ b/software/gsl-1.15/permutation/Makefile.am @@ -0,0 +1,21 @@ +noinst_LTLIBRARIES = libgslpermutation.la + +pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h + +INCLUDES = -I$(top_srcdir) + +libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c inline.c + +noinst_HEADERS = permute_source.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c + +test_LDADD = libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +#CLEANFILES = test.txt test.dat + + diff --git a/software/gsl-1.15/permutation/Makefile.in b/software/gsl-1.15/permutation/Makefile.in new file mode 100644 index 000000000..bf7859983 --- /dev/null +++ b/software/gsl-1.15/permutation/Makefile.in @@ -0,0 +1,671 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = permutation +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslpermutation_la_LIBADD = +am_libgslpermutation_la_OBJECTS = init.lo file.lo permutation.lo \ + permute.lo canonical.lo inline.lo +libgslpermutation_la_OBJECTS = $(am_libgslpermutation_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslpermutation.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslpermutation_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslpermutation_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslpermutation.la +pkginclude_HEADERS = gsl_permutation.h gsl_permute.h gsl_permute_char.h gsl_permute_complex_double.h gsl_permute_complex_float.h gsl_permute_complex_long_double.h gsl_permute_double.h gsl_permute_float.h gsl_permute_int.h gsl_permute_long.h gsl_permute_long_double.h gsl_permute_short.h gsl_permute_uchar.h gsl_permute_uint.h gsl_permute_ulong.h gsl_permute_ushort.h gsl_permute_vector.h gsl_permute_vector_char.h gsl_permute_vector_complex_double.h gsl_permute_vector_complex_float.h gsl_permute_vector_complex_long_double.h gsl_permute_vector_double.h gsl_permute_vector_float.h gsl_permute_vector_int.h gsl_permute_vector_long.h gsl_permute_vector_long_double.h gsl_permute_vector_short.h gsl_permute_vector_uchar.h gsl_permute_vector_uint.h gsl_permute_vector_ulong.h gsl_permute_vector_ushort.h +INCLUDES = -I$(top_srcdir) +libgslpermutation_la_SOURCES = init.c file.c permutation.c permute.c canonical.c inline.c +noinst_HEADERS = permute_source.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu permutation/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu permutation/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslpermutation.la: $(libgslpermutation_la_OBJECTS) $(libgslpermutation_la_DEPENDENCIES) + $(LINK) $(libgslpermutation_la_OBJECTS) $(libgslpermutation_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonical.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/permutation.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/permute.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +#CLEANFILES = test.txt test.dat + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/permutation/canonical.c b/software/gsl-1.15/permutation/canonical.c new file mode 100644 index 000000000..d782f0e31 --- /dev/null +++ b/software/gsl-1.15/permutation/canonical.c @@ -0,0 +1,194 @@ +/* permutation/permutation.c + * + * Copyright (C) 2001, 2002 Nicolas Darnis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Modified for GSL by Brian Gough. + * Use in-place algorithms, no need for workspace + * Use conventions for canonical form given in Knuth (opposite of Sedgewick) + */ + +#include +#include +#include + +int +gsl_permutation_linear_to_canonical (gsl_permutation * q, + const gsl_permutation * p) +{ + const size_t n = p->size; + size_t i, k, s; + size_t t = n; + + const size_t *const pp = p->data; + size_t *const qq = q->data; + + if (q->size != p->size) + { + GSL_ERROR ("size of q does not match size of p", GSL_EINVAL); + } + + for (i = 0; i < n; i++) + { + + k = pp[i]; + s = 1; + + while (k > i) + { + k = pp[k]; + s++; + } + + if (k < i) + continue; + + /* Now have k == i, i.e the least in its cycle, and s == cycle length */ + + t -= s; + + qq[t] = i; + + k = pp[i]; + s = 1; + + while (k > i) + { + qq[t + s] = k; + k = pp[k]; + s++; + } + + if (t == 0) + break; + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_canonical_to_linear (gsl_permutation * p, + const gsl_permutation * q) +{ + size_t i, k, kk, first; + const size_t n = p->size; + + size_t *const pp = p->data; + const size_t *const qq = q->data; + + if (q->size != p->size) + { + GSL_ERROR ("size of q does not match size of p", GSL_EINVAL); + } + + for (i = 0; i < n; i++) + { + pp[i] = i; + } + + k = qq[0]; + first = pp[k]; + + for (i = 1; i < n; i++) + { + kk = qq[i]; + + if (kk > first) + { + pp[k] = pp[kk]; + k = kk; + } + else + { + pp[k] = first; + k = kk; + first = pp[kk]; + } + } + + pp[k] = first; + + return GSL_SUCCESS; +} + + +size_t +gsl_permutation_inversions (const gsl_permutation * p) +{ + size_t count = 0; + size_t i, j; + const size_t size = p->size; + + for (i = 0; i < size - 1; i++) + { + for (j = i + 1; j < size; j++) + { + if (p->data[i] > p->data[j]) + { + count++; + } + } + } + + return count; +} + +size_t +gsl_permutation_linear_cycles (const gsl_permutation * p) +{ + size_t i, k; + size_t count = 0; + const size_t size = p->size; + + for (i = 0; i < size; i++) + { + + k = p->data[i]; + + while (k > i) + { + k = p->data[k]; + } + + if (k < i) + continue; + + count++; + } + + return count; +} + +size_t +gsl_permutation_canonical_cycles (const gsl_permutation * p) +{ + size_t i; + size_t count = 1; + size_t min = p->data[0]; + + for (i = 0; i < p->size; i++) + { + if (p->data[i] < min) + { + min = p->data[i]; + count++; + } + } + + return count; +} + diff --git a/software/gsl-1.15/permutation/file.c b/software/gsl-1.15/permutation/file.c new file mode 100644 index 000000000..bb12fc680 --- /dev/null +++ b/software/gsl-1.15/permutation/file.c @@ -0,0 +1,113 @@ +/* permutation/file.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#define IN_FORMAT "%lu" + +int +gsl_permutation_fread (FILE * stream, gsl_permutation * p) +{ + size_t n = p->size ; + + size_t * data = p->data ; + + size_t items = fread (data, sizeof (size_t), n, stream); + + if (items != n) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_fwrite (FILE * stream, const gsl_permutation * p) +{ + size_t n = p->size ; + + size_t * data = p->data ; + + size_t items = fwrite (data, sizeof (size_t), n, stream); + + if (items != n) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_fprintf (FILE * stream, const gsl_permutation * p, const char *format) +{ + size_t n = p->size ; + + size_t * data = p->data ; + + size_t i; + + for (i = 0; i < n; i++) + { + int status = fprintf (stream, format, data[i]); + + if (status < 0) + { + GSL_ERROR ("fprintf failed", GSL_EFAILED); + } + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_fscanf (FILE * stream, gsl_permutation * p) +{ + size_t n = p->size ; + + size_t * data = p->data ; + + size_t i; + + for (i = 0; i < n; i++) + { + unsigned long j ; + + /* FIXME: what if size_t != unsigned long ??? + + want read in size_t but have to read in unsigned long to avoid + error from compiler */ + + int status = fscanf (stream, IN_FORMAT, &j); + + if (status != 1) + { + GSL_ERROR ("fscanf failed", GSL_EFAILED); + } + + data[i] = j; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/permutation/gsl_permutation.h b/software/gsl-1.15/permutation/gsl_permutation.h new file mode 100644 index 000000000..10ac0f58a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permutation.h @@ -0,0 +1,100 @@ +/* permutation/gsl_permutation.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTATION_H__ +#define __GSL_PERMUTATION_H__ + +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_permutation_struct +{ + size_t size; + size_t *data; +}; + +typedef struct gsl_permutation_struct gsl_permutation; + +gsl_permutation *gsl_permutation_alloc (const size_t n); +gsl_permutation *gsl_permutation_calloc (const size_t n); +void gsl_permutation_init (gsl_permutation * p); +void gsl_permutation_free (gsl_permutation * p); +int gsl_permutation_memcpy (gsl_permutation * dest, const gsl_permutation * src); + +int gsl_permutation_fread (FILE * stream, gsl_permutation * p); +int gsl_permutation_fwrite (FILE * stream, const gsl_permutation * p); +int gsl_permutation_fscanf (FILE * stream, gsl_permutation * p); +int gsl_permutation_fprintf (FILE * stream, const gsl_permutation * p, const char *format); + +size_t gsl_permutation_size (const gsl_permutation * p); +size_t * gsl_permutation_data (const gsl_permutation * p); + +int gsl_permutation_swap (gsl_permutation * p, const size_t i, const size_t j); + +int gsl_permutation_valid (const gsl_permutation * p); +void gsl_permutation_reverse (gsl_permutation * p); +int gsl_permutation_inverse (gsl_permutation * inv, const gsl_permutation * p); +int gsl_permutation_next (gsl_permutation * p); +int gsl_permutation_prev (gsl_permutation * p); +int gsl_permutation_mul (gsl_permutation * p, const gsl_permutation * pa, const gsl_permutation * pb); + +int gsl_permutation_linear_to_canonical (gsl_permutation * q, const gsl_permutation * p); +int gsl_permutation_canonical_to_linear (gsl_permutation * p, const gsl_permutation * q); + +size_t gsl_permutation_inversions (const gsl_permutation * p); +size_t gsl_permutation_linear_cycles (const gsl_permutation * p); +size_t gsl_permutation_canonical_cycles (const gsl_permutation * q); + +INLINE_DECL size_t gsl_permutation_get (const gsl_permutation * p, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +size_t +gsl_permutation_get (const gsl_permutation * p, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= p->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return p->data[i]; +} + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_PERMUTATION_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute.h b/software/gsl-1.15/permutation/gsl_permute.h new file mode 100644 index 000000000..23f09a6f0 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute.h @@ -0,0 +1,24 @@ +#ifndef __GSL_PERMUTE_H__ +#define __GSL_PERMUTE_H__ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_PERMUTE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_char.h b/software/gsl-1.15/permutation/gsl_permute_char.h new file mode 100644 index 000000000..bf2ebb1dc --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_char.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_CHAR_H__ +#define __GSL_PERMUTE_CHAR_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_char (const size_t * p, char * data, const size_t stride, const size_t n); +int gsl_permute_char_inverse (const size_t * p, char * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_CHAR_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_complex_double.h b/software/gsl-1.15/permutation/gsl_permute_complex_double.h new file mode 100644 index 000000000..c20442b6a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_complex_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_complex_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_COMPLEX_DOUBLE_H__ +#define __GSL_PERMUTE_COMPLEX_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_complex (const size_t * p, double * data, const size_t stride, const size_t n); +int gsl_permute_complex_inverse (const size_t * p, double * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_COMPLEX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_complex_float.h b/software/gsl-1.15/permutation/gsl_permute_complex_float.h new file mode 100644 index 000000000..65ee0fe44 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_complex_float.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_COMPLEX_FLOAT_H__ +#define __GSL_PERMUTE_COMPLEX_FLOAT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_complex_float (const size_t * p, float * data, const size_t stride, const size_t n); +int gsl_permute_complex_float_inverse (const size_t * p, float * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_complex_long_double.h b/software/gsl-1.15/permutation/gsl_permute_complex_long_double.h new file mode 100644 index 000000000..4849b15df --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_complex_long_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_complex_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_COMPLEX_LONG_DOUBLE_H__ +#define __GSL_PERMUTE_COMPLEX_LONG_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_complex_long_double (const size_t * p, long double * data, const size_t stride, const size_t n); +int gsl_permute_complex_long_double_inverse (const size_t * p, long double * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_COMPLEX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_double.h b/software/gsl-1.15/permutation/gsl_permute_double.h new file mode 100644 index 000000000..58be1812b --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_double.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_DOUBLE_H__ +#define __GSL_PERMUTE_DOUBLE_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute (const size_t * p, double * data, const size_t stride, const size_t n); +int gsl_permute_inverse (const size_t * p, double * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_float.h b/software/gsl-1.15/permutation/gsl_permute_float.h new file mode 100644 index 000000000..bc79bd5a4 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_float.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_FLOAT_H__ +#define __GSL_PERMUTE_FLOAT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_float (const size_t * p, float * data, const size_t stride, const size_t n); +int gsl_permute_float_inverse (const size_t * p, float * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_FLOAT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_int.h b/software/gsl-1.15/permutation/gsl_permute_int.h new file mode 100644 index 000000000..b6ff50080 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_int.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_INT_H__ +#define __GSL_PERMUTE_INT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_int (const size_t * p, int * data, const size_t stride, const size_t n); +int gsl_permute_int_inverse (const size_t * p, int * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_INT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_long.h b/software/gsl-1.15/permutation/gsl_permute_long.h new file mode 100644 index 000000000..383294c5a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_long.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_LONG_H__ +#define __GSL_PERMUTE_LONG_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_long (const size_t * p, long * data, const size_t stride, const size_t n); +int gsl_permute_long_inverse (const size_t * p, long * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_LONG_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_long_double.h b/software/gsl-1.15/permutation/gsl_permute_long_double.h new file mode 100644 index 000000000..f58e1cd8a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_long_double.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_LONG_DOUBLE_H__ +#define __GSL_PERMUTE_LONG_DOUBLE_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_long_double (const size_t * p, long double * data, const size_t stride, const size_t n); +int gsl_permute_long_double_inverse (const size_t * p, long double * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_short.h b/software/gsl-1.15/permutation/gsl_permute_short.h new file mode 100644 index 000000000..39cf55d67 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_short.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_SHORT_H__ +#define __GSL_PERMUTE_SHORT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_short (const size_t * p, short * data, const size_t stride, const size_t n); +int gsl_permute_short_inverse (const size_t * p, short * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_SHORT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_uchar.h b/software/gsl-1.15/permutation/gsl_permute_uchar.h new file mode 100644 index 000000000..54bb401b0 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_uchar.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_UCHAR_H__ +#define __GSL_PERMUTE_UCHAR_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_uchar (const size_t * p, unsigned char * data, const size_t stride, const size_t n); +int gsl_permute_uchar_inverse (const size_t * p, unsigned char * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_UCHAR_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_uint.h b/software/gsl-1.15/permutation/gsl_permute_uint.h new file mode 100644 index 000000000..8915b7bc6 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_uint.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_UINT_H__ +#define __GSL_PERMUTE_UINT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_uint (const size_t * p, unsigned int * data, const size_t stride, const size_t n); +int gsl_permute_uint_inverse (const size_t * p, unsigned int * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_UINT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_ulong.h b/software/gsl-1.15/permutation/gsl_permute_ulong.h new file mode 100644 index 000000000..0084c506c --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_ulong.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_ULONG_H__ +#define __GSL_PERMUTE_ULONG_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_ulong (const size_t * p, unsigned long * data, const size_t stride, const size_t n); +int gsl_permute_ulong_inverse (const size_t * p, unsigned long * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_ULONG_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_ushort.h b/software/gsl-1.15/permutation/gsl_permute_ushort.h new file mode 100644 index 000000000..eff079a57 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_ushort.h @@ -0,0 +1,44 @@ +/* permutation/gsl_permute_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_USHORT_H__ +#define __GSL_PERMUTE_USHORT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_ushort (const size_t * p, unsigned short * data, const size_t stride, const size_t n); +int gsl_permute_ushort_inverse (const size_t * p, unsigned short * data, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_PERMUTE_USHORT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector.h b/software/gsl-1.15/permutation/gsl_permute_vector.h new file mode 100644 index 000000000..4369e4955 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector.h @@ -0,0 +1,24 @@ +#ifndef __GSL_PERMUTE_VECTOR_H__ +#define __GSL_PERMUTE_VECTOR_H__ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_PERMUTE_VECTOR_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_char.h b/software/gsl-1.15/permutation/gsl_permute_vector_char.h new file mode 100644 index 000000000..15278eddf --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_char.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_CHAR_H__ +#define __GSL_PERMUTE_VECTOR_CHAR_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_char (const gsl_permutation * p, gsl_vector_char * v); +int gsl_permute_vector_char_inverse (const gsl_permutation * p, gsl_vector_char * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_CHAR_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_complex_double.h b/software/gsl-1.15/permutation/gsl_permute_vector_complex_double.h new file mode 100644 index 000000000..60558e21a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_complex_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_complex_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_COMPLEX_DOUBLE_H__ +#define __GSL_PERMUTE_VECTOR_COMPLEX_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_complex (const gsl_permutation * p, gsl_vector_complex * v); +int gsl_permute_vector_complex_inverse (const gsl_permutation * p, gsl_vector_complex * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_COMPLEX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_complex_float.h b/software/gsl-1.15/permutation/gsl_permute_vector_complex_float.h new file mode 100644 index 000000000..b08696bc6 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_complex_float.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_COMPLEX_FLOAT_H__ +#define __GSL_PERMUTE_VECTOR_COMPLEX_FLOAT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_complex_float (const gsl_permutation * p, gsl_vector_complex_float * v); +int gsl_permute_vector_complex_float_inverse (const gsl_permutation * p, gsl_vector_complex_float * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_complex_long_double.h b/software/gsl-1.15/permutation/gsl_permute_vector_complex_long_double.h new file mode 100644 index 000000000..c19ac25d8 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_complex_long_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_complex_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_COMPLEX_LONG_DOUBLE_H__ +#define __GSL_PERMUTE_VECTOR_COMPLEX_LONG_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_complex_long_double (const gsl_permutation * p, gsl_vector_complex_long_double * v); +int gsl_permute_vector_complex_long_double_inverse (const gsl_permutation * p, gsl_vector_complex_long_double * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_COMPLEX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_double.h b/software/gsl-1.15/permutation/gsl_permute_vector_double.h new file mode 100644 index 000000000..65f616744 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_DOUBLE_H__ +#define __GSL_PERMUTE_VECTOR_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector (const gsl_permutation * p, gsl_vector * v); +int gsl_permute_vector_inverse (const gsl_permutation * p, gsl_vector * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_float.h b/software/gsl-1.15/permutation/gsl_permute_vector_float.h new file mode 100644 index 000000000..bdd9d1a63 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_float.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_FLOAT_H__ +#define __GSL_PERMUTE_VECTOR_FLOAT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_float (const gsl_permutation * p, gsl_vector_float * v); +int gsl_permute_vector_float_inverse (const gsl_permutation * p, gsl_vector_float * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_FLOAT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_int.h b/software/gsl-1.15/permutation/gsl_permute_vector_int.h new file mode 100644 index 000000000..3316d504f --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_int.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_INT_H__ +#define __GSL_PERMUTE_VECTOR_INT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_int (const gsl_permutation * p, gsl_vector_int * v); +int gsl_permute_vector_int_inverse (const gsl_permutation * p, gsl_vector_int * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_INT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_long.h b/software/gsl-1.15/permutation/gsl_permute_vector_long.h new file mode 100644 index 000000000..291f949b3 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_long.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_LONG_H__ +#define __GSL_PERMUTE_VECTOR_LONG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_long (const gsl_permutation * p, gsl_vector_long * v); +int gsl_permute_vector_long_inverse (const gsl_permutation * p, gsl_vector_long * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_LONG_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_long_double.h b/software/gsl-1.15/permutation/gsl_permute_vector_long_double.h new file mode 100644 index 000000000..a6b02960a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_long_double.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_LONG_DOUBLE_H__ +#define __GSL_PERMUTE_VECTOR_LONG_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_long_double (const gsl_permutation * p, gsl_vector_long_double * v); +int gsl_permute_vector_long_double_inverse (const gsl_permutation * p, gsl_vector_long_double * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_short.h b/software/gsl-1.15/permutation/gsl_permute_vector_short.h new file mode 100644 index 000000000..cd0dd6b4b --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_short.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_SHORT_H__ +#define __GSL_PERMUTE_VECTOR_SHORT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_short (const gsl_permutation * p, gsl_vector_short * v); +int gsl_permute_vector_short_inverse (const gsl_permutation * p, gsl_vector_short * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_SHORT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_uchar.h b/software/gsl-1.15/permutation/gsl_permute_vector_uchar.h new file mode 100644 index 000000000..df069a0a6 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_uchar.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_UCHAR_H__ +#define __GSL_PERMUTE_VECTOR_UCHAR_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_uchar (const gsl_permutation * p, gsl_vector_uchar * v); +int gsl_permute_vector_uchar_inverse (const gsl_permutation * p, gsl_vector_uchar * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_UCHAR_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_uint.h b/software/gsl-1.15/permutation/gsl_permute_vector_uint.h new file mode 100644 index 000000000..ee5218af9 --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_uint.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_UINT_H__ +#define __GSL_PERMUTE_VECTOR_UINT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_uint (const gsl_permutation * p, gsl_vector_uint * v); +int gsl_permute_vector_uint_inverse (const gsl_permutation * p, gsl_vector_uint * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_UINT_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_ulong.h b/software/gsl-1.15/permutation/gsl_permute_vector_ulong.h new file mode 100644 index 000000000..e536d9a8a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_ulong.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_ULONG_H__ +#define __GSL_PERMUTE_VECTOR_ULONG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_ulong (const gsl_permutation * p, gsl_vector_ulong * v); +int gsl_permute_vector_ulong_inverse (const gsl_permutation * p, gsl_vector_ulong * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_ULONG_H__ */ diff --git a/software/gsl-1.15/permutation/gsl_permute_vector_ushort.h b/software/gsl-1.15/permutation/gsl_permute_vector_ushort.h new file mode 100644 index 000000000..7533ba00a --- /dev/null +++ b/software/gsl-1.15/permutation/gsl_permute_vector_ushort.h @@ -0,0 +1,45 @@ +/* permutation/gsl_permute_vector_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_PERMUTE_VECTOR_USHORT_H__ +#define __GSL_PERMUTE_VECTOR_USHORT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_permute_vector_ushort (const gsl_permutation * p, gsl_vector_ushort * v); +int gsl_permute_vector_ushort_inverse (const gsl_permutation * p, gsl_vector_ushort * v); + +__END_DECLS + +#endif /* __GSL_PERMUTE_VECTOR_USHORT_H__ */ diff --git a/software/gsl-1.15/permutation/init.c b/software/gsl-1.15/permutation/init.c new file mode 100644 index 000000000..e98736500 --- /dev/null +++ b/software/gsl-1.15/permutation/init.c @@ -0,0 +1,99 @@ +/* permutation/init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_permutation * +gsl_permutation_alloc (const size_t n) +{ + gsl_permutation * p; + + if (n == 0) + { + GSL_ERROR_VAL ("permutation length n must be positive integer", + GSL_EDOM, 0); + } + + p = (gsl_permutation *) malloc (sizeof (gsl_permutation)); + + if (p == 0) + { + GSL_ERROR_VAL ("failed to allocate space for permutation struct", + GSL_ENOMEM, 0); + } + + p->data = (size_t *) malloc (n * sizeof (size_t)); + + if (p->data == 0) + { + free (p); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for permutation data", + GSL_ENOMEM, 0); + } + + p->size = n; + + return p; +} + +gsl_permutation * +gsl_permutation_calloc (const size_t n) +{ + size_t i; + + gsl_permutation * p = gsl_permutation_alloc (n); + + if (p == 0) + return 0; + + /* initialize permutation to identity */ + + for (i = 0; i < n; i++) + { + p->data[i] = i; + } + + return p; +} + +void +gsl_permutation_init (gsl_permutation * p) +{ + const size_t n = p->size ; + size_t i; + + /* initialize permutation to identity */ + + for (i = 0; i < n; i++) + { + p->data[i] = i; + } +} + +void +gsl_permutation_free (gsl_permutation * p) +{ + RETURN_IF_NULL (p); + free (p->data); + free (p); +} diff --git a/software/gsl-1.15/permutation/inline.c b/software/gsl-1.15/permutation/inline.c new file mode 100644 index 000000000..527576d44 --- /dev/null +++ b/software/gsl-1.15/permutation/inline.c @@ -0,0 +1,27 @@ +/* permutation/inline.c + * + * Copyright (C) 2008 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/permutation/permutation.c b/software/gsl-1.15/permutation/permutation.c new file mode 100644 index 000000000..611aaadfa --- /dev/null +++ b/software/gsl-1.15/permutation/permutation.c @@ -0,0 +1,275 @@ +/* permutation/permutation.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +size_t +gsl_permutation_size (const gsl_permutation * p) +{ + return p->size ; +} + +size_t * +gsl_permutation_data (const gsl_permutation * p) +{ + return p->data ; +} + +int +gsl_permutation_swap (gsl_permutation * p, const size_t i, const size_t j) +{ + const size_t size = p->size ; + + if (i >= size) + { + GSL_ERROR("first index is out of range", GSL_EINVAL); + } + + if (j >= size) + { + GSL_ERROR("second index is out of range", GSL_EINVAL); + } + + if (i != j) + { + size_t tmp = p->data[i]; + p->data[i] = p->data[j]; + p->data[j] = tmp; + } + + return GSL_SUCCESS; +} + + +int +gsl_permutation_valid (const gsl_permutation * p) +{ + const size_t size = p->size ; + + size_t i, j ; + + for (i = 0; i < size; i++) + { + if (p->data[i] >= size) + { + GSL_ERROR("permutation index outside range", GSL_FAILURE) ; + } + + for (j = 0; j < i; j++) + { + if (p->data[i] == p->data[j]) + { + GSL_ERROR("duplicate permutation index", GSL_FAILURE) ; + } + } + } + + return GSL_SUCCESS; +} + +void +gsl_permutation_reverse (gsl_permutation * p) +{ + const size_t size = p->size ; + + size_t i ; + + for (i = 0; i < (size / 2); i++) + { + size_t j = size - i - 1; + + size_t tmp = p->data[i] ; + p->data[i] = p->data[j] ; + p->data[j] = tmp ; + } +} + +int +gsl_permutation_inverse (gsl_permutation * inv, const gsl_permutation * p) +{ + const size_t size = p->size ; + + size_t i ; + + if (inv->size != size) + { + GSL_ERROR("permutation lengths are not equal", GSL_EBADLEN); + } + + for (i = 0; i < size; i++) + { + inv->data[p->data[i]] = i ; + } + + return GSL_SUCCESS ; +} + +int +gsl_permutation_next (gsl_permutation * p) +{ + /* Replaces p with the next permutation (in the standard lexicographical + * ordering). Returns GSL_FAILURE if there is no next permutation. + */ + const size_t size = p->size; + size_t i, j, k; + + if (size < 2) + { + return GSL_FAILURE; + } + + i = size - 2; + + while ((p->data[i] > p->data[i+1]) && (i != 0)) + { + i--; + } + + if ((i == 0) && (p->data[0] > p->data[1])) + { + return GSL_FAILURE; + } + + k = i + 1; + + for (j = i + 2; j < size; j++ ) + { + if ((p->data[j] > p->data[i]) && (p->data[j] < p->data[k])) + { + k = j; + } + } + + /* swap i and k */ + + { + size_t tmp = p->data[i]; + p->data[i] = p->data[k]; + p->data[k] = tmp; + } + + for (j = i + 1; j <= ((size + i) / 2); j++) + { + size_t tmp = p->data[j]; + p->data[j] = p->data[size + i - j]; + p->data[size + i - j] = tmp; + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_prev (gsl_permutation * p) +{ + const size_t size = p->size; + size_t i, j, k; + + if (size < 2) + { + return GSL_FAILURE; + } + + i = size - 2; + + while ((p->data[i] < p->data[i+1]) && (i != 0)) + { + i--; + } + + if ((i == 0) && (p->data[0] < p->data[1])) + { + return GSL_FAILURE; + } + + k = i + 1; + + for (j = i + 2; j < size; j++ ) + { + if ((p->data[j] < p->data[i]) && (p->data[j] > p->data[k])) + { + k = j; + } + } + + /* swap i and k */ + + { + size_t tmp = p->data[i]; + p->data[i] = p->data[k]; + p->data[k] = tmp; + } + + for (j = i + 1; j <= ((size + i) / 2); j++) + { + size_t tmp = p->data[j]; + p->data[j] = p->data[size + i - j]; + p->data[size + i - j] = tmp; + } + + return GSL_SUCCESS; +} + +int +gsl_permutation_mul (gsl_permutation * p, const gsl_permutation * pa, const gsl_permutation * pb) +{ + size_t i; + const size_t size = p->size; + + if (pa->size != size) + { + GSL_ERROR("size of result does not match size of pa", GSL_EINVAL); + } + + if (pb->size != size) + { + GSL_ERROR("size of result does not match size of pb", GSL_EINVAL); + } + + for (i = 0; i < size; i++) + { + p->data[i] = pb->data[pa->data[i]]; + } + + return GSL_SUCCESS; +} +int +gsl_permutation_memcpy (gsl_permutation * dest, + const gsl_permutation * src) +{ + const size_t src_size = src->size; + const size_t dest_size = dest->size; + + if (src_size != dest_size) + { + GSL_ERROR ("permutation lengths are not equal", GSL_EBADLEN); + } + + { + size_t j; + + for (j = 0; j < src_size; j++) + { + dest->data[j] = src->data[j]; + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/permutation/permute.c b/software/gsl-1.15/permutation/permute.c new file mode 100644 index 000000000..5859b71d7 --- /dev/null +++ b/software/gsl-1.15/permutation/permute.c @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "permute_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/permutation/permute_source.c b/software/gsl-1.15/permutation/permute_source.c new file mode 100644 index 000000000..b42a772db --- /dev/null +++ b/software/gsl-1.15/permutation/permute_source.c @@ -0,0 +1,163 @@ +/* permutation/permute_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* In-place Permutations + + permute: OUT[i] = IN[perm[i]] i = 0 .. N-1 + invpermute: OUT[perm[i]] = IN[i] i = 0 .. N-1 + + PERM is an index map, i.e. a vector which contains a permutation of + the integers 0 .. N-1. + + From Knuth "Sorting and Searching", Volume 3 (3rd ed), Section 5.2 + Exercise 10 (answers), p 617 + + FIXME: these have not been fully tested. +*/ + +int +TYPE (gsl_permute) (const size_t * p, ATOMIC * data, const size_t stride, const size_t n) +{ + size_t i, k, pk; + + for (i = 0; i < n; i++) + { + k = p[i]; + + while (k > i) + k = p[k]; + + if (k < i) + continue ; + + /* Now have k == i, i.e the least in its cycle */ + + pk = p[k]; + + if (pk == i) + continue ; + + /* shuffle the elements of the cycle */ + + { + unsigned int a; + + ATOMIC t[MULTIPLICITY]; + + for (a = 0; a < MULTIPLICITY; a++) + t[a] = data[i*stride*MULTIPLICITY + a]; + + while (pk != i) + { + for (a = 0; a < MULTIPLICITY; a++) + { + ATOMIC r1 = data[pk*stride*MULTIPLICITY + a]; + data[k*stride*MULTIPLICITY + a] = r1; + } + k = pk; + pk = p[k]; + }; + + for (a = 0; a < MULTIPLICITY; a++) + data[k*stride*MULTIPLICITY + a] = t[a]; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_permute,inverse) (const size_t * p, ATOMIC * data, const size_t stride, const size_t n) +{ + size_t i, k, pk; + + for (i = 0; i < n; i++) + { + k = p[i]; + + while (k > i) + k = p[k]; + + if (k < i) + continue ; + + /* Now have k == i, i.e the least in its cycle */ + + pk = p[k]; + + if (pk == i) + continue ; + + /* shuffle the elements of the cycle in the inverse direction */ + + { + unsigned int a; + + ATOMIC t[MULTIPLICITY]; + + for (a = 0; a < MULTIPLICITY; a++) + t[a] = data[k*stride*MULTIPLICITY+a]; + + while (pk != i) + { + for (a = 0; a < MULTIPLICITY; a++) + { + ATOMIC r1 = data[pk*stride*MULTIPLICITY + a]; + data[pk*stride*MULTIPLICITY + a] = t[a]; + t[a] = r1; + } + + k = pk; + pk = p[k]; + }; + + for (a = 0; a < MULTIPLICITY; a++) + data[pk*stride*MULTIPLICITY+a] = t[a]; + } + } + + return GSL_SUCCESS; +} + + +int +TYPE (gsl_permute_vector) (const gsl_permutation * p, TYPE (gsl_vector) * v) +{ + if (v->size != p->size) + { + GSL_ERROR ("vector and permutation must be the same length", GSL_EBADLEN); + } + + TYPE (gsl_permute) (p->data, v->data, v->stride, v->size) ; + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_permute_vector,inverse) (const gsl_permutation * p, TYPE (gsl_vector) * v) +{ + if (v->size != p->size) + { + GSL_ERROR ("vector and permutation must be the same length", GSL_EBADLEN); + } + + FUNCTION (gsl_permute,inverse) (p->data, v->data, v->stride, v->size) ; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/permutation/test.c b/software/gsl-1.15/permutation/test.c new file mode 100644 index 000000000..953512b1a --- /dev/null +++ b/software/gsl-1.15/permutation/test.c @@ -0,0 +1,300 @@ +/* permutation/test.c + * + * Copyright (C) 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +unsigned int p5[120][5] = { + {0, 1, 2, 3, 4}, {0, 1, 2, 4, 3}, {0, 1, 3, 2, 4}, {0, 1, 3, 4, 2}, + {0, 1, 4, 2, 3}, {0, 1, 4, 3, 2}, {0, 2, 1, 3, 4}, {0, 2, 1, 4, 3}, + {0, 2, 3, 1, 4}, {0, 2, 3, 4, 1}, {0, 2, 4, 1, 3}, {0, 2, 4, 3, 1}, + {0, 3, 1, 2, 4}, {0, 3, 1, 4, 2}, {0, 3, 2, 1, 4}, {0, 3, 2, 4, 1}, + {0, 3, 4, 1, 2}, {0, 3, 4, 2, 1}, {0, 4, 1, 2, 3}, {0, 4, 1, 3, 2}, + {0, 4, 2, 1, 3}, {0, 4, 2, 3, 1}, {0, 4, 3, 1, 2}, {0, 4, 3, 2, 1}, + {1, 0, 2, 3, 4}, {1, 0, 2, 4, 3}, {1, 0, 3, 2, 4}, {1, 0, 3, 4, 2}, + {1, 0, 4, 2, 3}, {1, 0, 4, 3, 2}, {1, 2, 0, 3, 4}, {1, 2, 0, 4, 3}, + {1, 2, 3, 0, 4}, {1, 2, 3, 4, 0}, {1, 2, 4, 0, 3}, {1, 2, 4, 3, 0}, + {1, 3, 0, 2, 4}, {1, 3, 0, 4, 2}, {1, 3, 2, 0, 4}, {1, 3, 2, 4, 0}, + {1, 3, 4, 0, 2}, {1, 3, 4, 2, 0}, {1, 4, 0, 2, 3}, {1, 4, 0, 3, 2}, + {1, 4, 2, 0, 3}, {1, 4, 2, 3, 0}, {1, 4, 3, 0, 2}, {1, 4, 3, 2, 0}, + {2, 0, 1, 3, 4}, {2, 0, 1, 4, 3}, {2, 0, 3, 1, 4}, {2, 0, 3, 4, 1}, + {2, 0, 4, 1, 3}, {2, 0, 4, 3, 1}, {2, 1, 0, 3, 4}, {2, 1, 0, 4, 3}, + {2, 1, 3, 0, 4}, {2, 1, 3, 4, 0}, {2, 1, 4, 0, 3}, {2, 1, 4, 3, 0}, + {2, 3, 0, 1, 4}, {2, 3, 0, 4, 1}, {2, 3, 1, 0, 4}, {2, 3, 1, 4, 0}, + {2, 3, 4, 0, 1}, {2, 3, 4, 1, 0}, {2, 4, 0, 1, 3}, {2, 4, 0, 3, 1}, + {2, 4, 1, 0, 3}, {2, 4, 1, 3, 0}, {2, 4, 3, 0, 1}, {2, 4, 3, 1, 0}, + {3, 0, 1, 2, 4}, {3, 0, 1, 4, 2}, {3, 0, 2, 1, 4}, {3, 0, 2, 4, 1}, + {3, 0, 4, 1, 2}, {3, 0, 4, 2, 1}, {3, 1, 0, 2, 4}, {3, 1, 0, 4, 2}, + {3, 1, 2, 0, 4}, {3, 1, 2, 4, 0}, {3, 1, 4, 0, 2}, {3, 1, 4, 2, 0}, + {3, 2, 0, 1, 4}, {3, 2, 0, 4, 1}, {3, 2, 1, 0, 4}, {3, 2, 1, 4, 0}, + {3, 2, 4, 0, 1}, {3, 2, 4, 1, 0}, {3, 4, 0, 1, 2}, {3, 4, 0, 2, 1}, + {3, 4, 1, 0, 2}, {3, 4, 1, 2, 0}, {3, 4, 2, 0, 1}, {3, 4, 2, 1, 0}, + {4, 0, 1, 2, 3}, {4, 0, 1, 3, 2}, {4, 0, 2, 1, 3}, {4, 0, 2, 3, 1}, + {4, 0, 3, 1, 2}, {4, 0, 3, 2, 1}, {4, 1, 0, 2, 3}, {4, 1, 0, 3, 2}, + {4, 1, 2, 0, 3}, {4, 1, 2, 3, 0}, {4, 1, 3, 0, 2}, {4, 1, 3, 2, 0}, + {4, 2, 0, 1, 3}, {4, 2, 0, 3, 1}, {4, 2, 1, 0, 3}, {4, 2, 1, 3, 0}, + {4, 2, 3, 0, 1}, {4, 2, 3, 1, 0}, {4, 3, 0, 1, 2}, {4, 3, 0, 2, 1}, + {4, 3, 1, 0, 2}, {4, 3, 1, 2, 0}, {4, 3, 2, 0, 1}, {4, 3, 2, 1, 0} +} ; + +unsigned int c5[120][5] = { + {4, 3, 2, 1, 0}, {3, 4, 2, 1, 0}, {4, 2, 3, 1, 0}, {2, 3, 4, 1, 0}, + {2, 4, 3, 1, 0}, {3, 2, 4, 1, 0}, {4, 3, 1, 2, 0}, {3, 4, 1, 2, 0}, + {4, 1, 2, 3, 0}, {1, 2, 3, 4, 0}, {1, 2, 4, 3, 0}, {3, 1, 2, 4, 0}, + {4, 1, 3, 2, 0}, {1, 3, 4, 2, 0}, {4, 2, 1, 3, 0}, {2, 1, 3, 4, 0}, + {2, 4, 1, 3, 0}, {1, 3, 2, 4, 0}, {1, 4, 3, 2, 0}, {3, 1, 4, 2, 0}, + {2, 1, 4, 3, 0}, {3, 2, 1, 4, 0}, {1, 4, 2, 3, 0}, {2, 3, 1, 4, 0}, + {4, 3, 2, 0, 1}, {3, 4, 2, 0, 1}, {4, 2, 3, 0, 1}, {2, 3, 4, 0, 1}, + {2, 4, 3, 0, 1}, {3, 2, 4, 0, 1}, {4, 3, 0, 1, 2}, {3, 4, 0, 1, 2}, + {4, 0, 1, 2, 3}, {0, 1, 2, 3, 4}, {0, 1, 2, 4, 3}, {3, 0, 1, 2, 4}, + {4, 0, 1, 3, 2}, {0, 1, 3, 4, 2}, {4, 2, 0, 1, 3}, {2, 0, 1, 3, 4}, + {2, 4, 0, 1, 3}, {0, 1, 3, 2, 4}, {0, 1, 4, 3, 2}, {3, 0, 1, 4, 2}, + {2, 0, 1, 4, 3}, {3, 2, 0, 1, 4}, {0, 1, 4, 2, 3}, {2, 3, 0, 1, 4}, + {4, 3, 0, 2, 1}, {3, 4, 0, 2, 1}, {4, 0, 2, 3, 1}, {0, 2, 3, 4, 1}, + {0, 2, 4, 3, 1}, {3, 0, 2, 4, 1}, {4, 3, 1, 0, 2}, {3, 4, 1, 0, 2}, + {4, 1, 0, 2, 3}, {1, 0, 2, 3, 4}, {1, 0, 2, 4, 3}, {3, 1, 0, 2, 4}, + {4, 1, 3, 0, 2}, {1, 3, 4, 0, 2}, {4, 0, 2, 1, 3}, {0, 2, 1, 3, 4}, + {0, 2, 4, 1, 3}, {1, 3, 0, 2, 4}, {1, 4, 3, 0, 2}, {3, 1, 4, 0, 2}, + {0, 2, 1, 4, 3}, {3, 0, 2, 1, 4}, {1, 4, 0, 2, 3}, {0, 2, 3, 1, 4}, + {4, 0, 3, 2, 1}, {0, 3, 4, 2, 1}, {4, 2, 0, 3, 1}, {2, 0, 3, 4, 1}, + {2, 4, 0, 3, 1}, {0, 3, 2, 4, 1}, {4, 1, 0, 3, 2}, {1, 0, 3, 4, 2}, + {4, 2, 1, 0, 3}, {2, 1, 0, 3, 4}, {2, 4, 1, 0, 3}, {1, 0, 3, 2, 4}, + {4, 0, 3, 1, 2}, {0, 3, 4, 1, 2}, {4, 1, 2, 0, 3}, {1, 2, 0, 3, 4}, + {1, 2, 4, 0, 3}, {0, 3, 1, 2, 4}, {0, 3, 1, 4, 2}, {1, 4, 0, 3, 2}, + {1, 4, 2, 0, 3}, {0, 3, 2, 1, 4}, {2, 1, 4, 0, 3}, {2, 0, 3, 1, 4}, + {0, 4, 3, 2, 1}, {3, 0, 4, 2, 1}, {2, 0, 4, 3, 1}, {3, 2, 0, 4, 1}, + {0, 4, 2, 3, 1}, {2, 3, 0, 4, 1}, {1, 0, 4, 3, 2}, {3, 1, 0, 4, 2}, + {2, 1, 0, 4, 3}, {3, 2, 1, 0, 4}, {1, 0, 4, 2, 3}, {2, 3, 1, 0, 4}, + {0, 4, 3, 1, 2}, {3, 0, 4, 1, 2}, {1, 2, 0, 4, 3}, {3, 1, 2, 0, 4}, + {0, 4, 1, 2, 3}, {1, 2, 3, 0, 4}, {1, 3, 0, 4, 2}, {0, 4, 1, 3, 2}, + {0, 4, 2, 1, 3}, {1, 3, 2, 0, 4}, {2, 0, 4, 1, 3}, {2, 1, 3, 0, 4} +} ; + +unsigned int cycles[120] = { + 5, 4, 4, 3, 3, 4, 4, 3, 3, 2, + 2, 3, 3, 2, 4, 3, 3, 2, 2, 3, + 3, 4, 2, 3, 4, 3, 3, 2, 2, 3, + 3, 2, 2, 1, 1, 2, 2, 1, 3, 2, + 2, 1, 1, 2, 2, 3, 1, 2, 3, 2, + 2, 1, 1, 2, 4, 3, 3, 2, 2, 3, + 3, 2, 2, 1, 1, 2, 2, 3, 1, 2, + 2, 1, 2, 1, 3, 2, 2, 1, 3, 2, + 4, 3, 3, 2, 2, 1, 3, 2, 2, 1, + 1, 2, 2, 1, 3, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 3, 4, 2, 3, 1, 2, + 2, 3, 1, 2, 2, 1, 1, 2, 2, 3 +} ; + +unsigned int inversions[120] = { + 0, 1, 1, 2, 2, 3, 1, 2, 2, 3, + 3, 4, 2, 3, 3, 4, 4, 5, 3, 4, + 4, 5, 5, 6, 1, 2, 2, 3, 3, 4, + 2, 3, 3, 4, 4, 5, 3, 4, 4, 5, + 5, 6, 4, 5, 5, 6, 6, 7, 2, 3, + 3, 4, 4, 5, 3, 4, 4, 5, 5, 6, + 4, 5, 5, 6, 6, 7, 5, 6, 6, 7, + 7, 8, 3, 4, 4, 5, 5, 6, 4, 5, + 5, 6, 6, 7, 5, 6, 6, 7, 7, 8, + 6, 7, 7, 8, 8, 9, 4, 5, 5, 6, + 6, 7, 5, 6, 6, 7, 7, 8, 6, 7, + 7, 8, 8, 9, 7, 8, 8, 9, 9, 10 +} ; + +int +main (void) +{ + gsl_ieee_env_setup (); + + { + int i = 0, j, status = 0; + + gsl_permutation * p ; + + p = gsl_permutation_alloc (5); + + gsl_permutation_init (p); + + do + { + for (j = 0; j < 5; j++) + { + status |= (p->data[j] != p5[i][j]); + } + + i++; + } + while (gsl_permutation_next(p) == GSL_SUCCESS); + + gsl_test(status, "gsl_permutation_next, 5-th order permutation, 120 steps"); + + do + { + i--; + + for (j = 0; j < 5; j++) + { + status |= (p->data[j] != p5[i][j]); + } + } + while (gsl_permutation_prev(p) == GSL_SUCCESS); + + gsl_test(status, "gsl_permutation_prev, 5-th order permutation, 120 steps"); + + gsl_permutation_free (p); + } + +#ifdef JUNK + { + int i; + int status = 0 ; + + gsl_permutation * p1 = gsl_permutation_alloc (5); + gsl_permutation * p2 = gsl_permutation_alloc (5); + gsl_permutation * p = gsl_permutation_alloc (5); + + double v[5] = { 100.0, 101.0, 102.0, 103.0, 104.0 } ; + + gsl_permutation_init (p1); + + do + { + gsl_permutation_init (p2); + + do + { + double x[5], y[5]; + + /* Compute x= p1 p2 v */ + memcpy (x, v, 5 * sizeof(double)); + gsl_permute (p2->data, x, 1, 5); + gsl_permute (p1->data, x, 1, 5); + + /* Compute P= p1 p2, y = P v */ + gsl_permutation_mul (p, p1, p2); + memcpy (y, v, 5 * sizeof(double)); + gsl_permute (p->data, y, 1, 5); + + for (i = 0; i < 5; i++) + { + if (x[i] != y[i]) + status = 1; + } + + if (status == 1) + break; + } + while (gsl_permutation_next(p2) == GSL_SUCCESS); + + if (status == 1) + break; + } + while (gsl_permutation_next(p1) == GSL_SUCCESS); + + gsl_permutation_free (p1); + gsl_permutation_free (p2); + gsl_permutation_free (p); + + gsl_test(status, "gsl_permutation_mul, all 5-th order combinations"); + } +#endif + + /* testing cycles representations */ + { + int i = 0, j, status = 0; + + gsl_permutation * p = gsl_permutation_alloc (5); + + gsl_permutation * plin = gsl_permutation_alloc (5); + gsl_permutation * pcan = gsl_permutation_alloc (5); + + gsl_permutation_init (p); + + do + { + gsl_permutation_memcpy (plin, p); + + for (j = 0; j < 5; j++) + { + pcan->data[j] = 0; + } + + gsl_permutation_linear_to_canonical (pcan, plin); + + for (j = 0; j < 5; j++) + { + status |= (pcan->data[j] != c5[i][j]); + } + + status |= (gsl_permutation_canonical_cycles (pcan) != cycles[i]); + + status |= (gsl_permutation_linear_cycles (plin) != cycles[i]); + + for (j = 0; j < 5; j++) + { + plin->data[j] = 0; + } + + gsl_permutation_canonical_to_linear (plin, pcan); + + for (j = 0; j < 5; j++) + { + status |= (plin->data[j] != p5[i][j]); + } + + i++; + } + while (gsl_permutation_next(p) == GSL_SUCCESS); + + gsl_permutation_free (p); + gsl_permutation_free (plin); + gsl_permutation_free (pcan); + + gsl_test (status, "gsl_permutation canonical conversion, 5-th order permutation, 120 steps"); + } + + /* testing number of inversions */ + { + int i = 0, status = 0; + + gsl_permutation * p = gsl_permutation_alloc (5); + + gsl_permutation_init (p); + + do + { + status |= gsl_permutation_inversions (p) != inversions[i]; + i++; + } + while (gsl_permutation_next(p) == GSL_SUCCESS); + + gsl_permutation_free (p); + + gsl_test (status, "gsl_permutation_inversions, 5-th order permutation, 120 steps"); + } + + + exit (gsl_test_summary()); +} + diff --git a/software/gsl-1.15/pkgconfig.test b/software/gsl-1.15/pkgconfig.test new file mode 100755 index 000000000..fdf7a242b --- /dev/null +++ b/software/gsl-1.15/pkgconfig.test @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e +# skip test if we have no pkg-config +pkg-config --version >/dev/null 2>&1 || exit 77 +PKG_CONFIG_PATH=. +export PKG_CONFIG_PATH +pkg-config --define-variable=GSL_CBLAS_LIB=-lfoo --libs gsl | grep 'lfoo' > /dev/null 2>&1 +exit 0 diff --git a/software/gsl-1.15/poly/.deps/dd.Plo b/software/gsl-1.15/poly/.deps/dd.Plo new file mode 100644 index 000000000..a6353337b --- /dev/null +++ b/software/gsl-1.15/poly/.deps/dd.Plo @@ -0,0 +1,97 @@ +dd.lo: dd.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/deriv.Plo b/software/gsl-1.15/poly/.deps/deriv.Plo new file mode 100644 index 000000000..7c66021a2 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/deriv.Plo @@ -0,0 +1,97 @@ +deriv.lo: deriv.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/eval.Plo b/software/gsl-1.15/poly/.deps/eval.Plo new file mode 100644 index 000000000..61188a4d5 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/eval.Plo @@ -0,0 +1,83 @@ +eval.lo: eval.c ../config.h ../build.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h + +../config.h: + +../build.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/solve_cubic.Plo b/software/gsl-1.15/poly/.deps/solve_cubic.Plo new file mode 100644 index 000000000..80fcd12c3 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/solve_cubic.Plo @@ -0,0 +1,119 @@ +solve_cubic.lo: solve_cubic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_poly.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/solve_quadratic.Plo b/software/gsl-1.15/poly/.deps/solve_quadratic.Plo new file mode 100644 index 000000000..97ab1fb45 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/solve_quadratic.Plo @@ -0,0 +1,82 @@ +solve_quadratic.lo: solve_quadratic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h ../gsl/gsl_complex.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/test.Po b/software/gsl-1.15/poly/.deps/test.Po new file mode 100644 index 000000000..f0c6a6977 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/test.Po @@ -0,0 +1,131 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_poly.h ../gsl/gsl_complex.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_poly.h: + +../gsl/gsl_complex.h: diff --git a/software/gsl-1.15/poly/.deps/zsolve.Plo b/software/gsl-1.15/poly/.deps/zsolve.Plo new file mode 100644 index 000000000..847af72e9 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/zsolve.Plo @@ -0,0 +1,140 @@ +zsolve.lo: zsolve.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_poly.h \ + companion.c balance.c qr.c + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_poly.h: + +companion.c: + +balance.c: + +qr.c: diff --git a/software/gsl-1.15/poly/.deps/zsolve_cubic.Plo b/software/gsl-1.15/poly/.deps/zsolve_cubic.Plo new file mode 100644 index 000000000..f4891a9f9 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/zsolve_cubic.Plo @@ -0,0 +1,118 @@ +zsolve_cubic.lo: zsolve_cubic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_complex.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/poly/.deps/zsolve_init.Plo b/software/gsl-1.15/poly/.deps/zsolve_init.Plo new file mode 100644 index 000000000..80d9f394c --- /dev/null +++ b/software/gsl-1.15/poly/.deps/zsolve_init.Plo @@ -0,0 +1,133 @@ +zsolve_init.lo: zsolve_init.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_complex.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: diff --git a/software/gsl-1.15/poly/.deps/zsolve_quadratic.Plo b/software/gsl-1.15/poly/.deps/zsolve_quadratic.Plo new file mode 100644 index 000000000..372ed9950 --- /dev/null +++ b/software/gsl-1.15/poly/.deps/zsolve_quadratic.Plo @@ -0,0 +1,83 @@ +zsolve_quadratic.lo: zsolve_quadratic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_complex.h \ + ../gsl/gsl_poly.h /usr/include/stdlib.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/poly/ChangeLog b/software/gsl-1.15/poly/ChangeLog new file mode 100644 index 000000000..6564003c4 --- /dev/null +++ b/software/gsl-1.15/poly/ChangeLog @@ -0,0 +1,103 @@ +2009-07-09 Brian Gough + + * zsolve_init.c (gsl_poly_complex_workspace_free): handle NULL + argument in free + +2009-05-09 Brian Gough + + * zsolve_cubic.c (gsl_poly_complex_solve_cubic): test R2 < Q3 + directly, to avoid argument of acos exceeding 1 due to + extended precision. + + * solve_cubic.c (gsl_poly_solve_cubic): ditto + +2008-07-03 Brian Gough + + * gsl_poly.h: use new inline declarations + + * inline.c: handle inline functions in separate file + + * dd.c: move gsl_poly_dd_eval to inline.c + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-04-28 Brian Gough + + * dd.c (gsl_poly_dd_taylor): use new descending loop convention + +2007-12-17 Brian Gough + + * eval.c: added functions for complex polynomials + +2005-07-03 Brian Gough + + * test.c (main): added tests for linear case + + * zsolve_quadratic.c (gsl_poly_complex_solve_quadratic): handle + the linear case + + * solve_quadratic.c (gsl_poly_solve_quadratic): handle the linear + case + +2005-05-19 Brian Gough + + * Makefile.am (noinst_HEADERS): removed norm.c (unused) + +Sun Dec 2 22:02:31 2001 Brian Gough + + * dd.c: added divided differences code from Dan, Ho-Jin + +Wed Oct 31 18:42:10 2001 Brian Gough + + * qr.c (qr_companion): increased maximum number of iterations from + 30 to 60 + +Thu Jun 28 11:24:51 2001 Brian Gough + + * test.c (main): fixed a subtle bug in the test where the array + for the complex results was too small by a factor of two + +Mon Apr 30 12:36:08 2001 Brian Gough + + * eval.c (gsl_poly_eval): added eval function from specfunc + +Tue Aug 24 12:02:47 1999 Brian Gough + + * zsolve.c: added general solver using QR method + +1999-08-22 Mark Galassi + + * Makefile.am (libgslpoly_a_SOURCES): for now commented out + zsolve.c, since it has some strange errors that make it look like + it was not committed. + +Tue Aug 17 14:23:47 1999 Brian Gough + + * zsolve_cubic.c (gsl_poly_complex_solve_cubic): compute the + discriminant without division so that it is exact for exact inputs + + * solve_cubic.c (gsl_poly_solve_cubic): compute the discriminant + without division so that it is exact for exact inputs + + * changed the way roots are counted to make all the routines + consistent. Conincident roots are no longer a special case, now + they are made up of separate roots which happen to have the same + values. + + * zsolve_quadratic.c (gsl_poly_complex_solve_quadratic): in the + case of a multiple root set all the returned values r0 = r1 = + root, rather than just setting one and leaving the others + potentially unset. + + * solve_quadratic.c (gsl_poly_solve_quadratic): ditto + +Tue Aug 3 19:36:26 1999 Brian Gough + + * gsl_poly.h: changed all functions to take separate variables for + roots (z0, z1, z2) of variable-length arrays + +Sat Feb 20 12:13:46 1999 Brian Gough + + * split out polynomial root finding algorithms into a new poly/ + directory + diff --git a/software/gsl-1.15/poly/Makefile.am b/software/gsl-1.15/poly/Makefile.am new file mode 100644 index 000000000..a56758f65 --- /dev/null +++ b/software/gsl-1.15/poly/Makefile.am @@ -0,0 +1,17 @@ +noinst_LTLIBRARIES = libgslpoly.la + +pkginclude_HEADERS = gsl_poly.h + +INCLUDES = -I$(top_srcdir) + +libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c deriv.c + +noinst_HEADERS = balance.c companion.c qr.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c +test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + diff --git a/software/gsl-1.15/poly/Makefile.in b/software/gsl-1.15/poly/Makefile.in new file mode 100644 index 000000000..805497306 --- /dev/null +++ b/software/gsl-1.15/poly/Makefile.in @@ -0,0 +1,672 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = poly +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslpoly_la_LIBADD = +am_libgslpoly_la_OBJECTS = dd.lo eval.lo solve_quadratic.lo \ + solve_cubic.lo zsolve_quadratic.lo zsolve_cubic.lo zsolve.lo \ + zsolve_init.lo deriv.lo +libgslpoly_la_OBJECTS = $(am_libgslpoly_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslpoly.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslpoly_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslpoly_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslpoly.la +pkginclude_HEADERS = gsl_poly.h +INCLUDES = -I$(top_srcdir) +libgslpoly_la_SOURCES = dd.c eval.c solve_quadratic.c solve_cubic.c zsolve_quadratic.c zsolve_cubic.c zsolve.c zsolve_init.c deriv.c +noinst_HEADERS = balance.c companion.c qr.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu poly/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu poly/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslpoly.la: $(libgslpoly_la_OBJECTS) $(libgslpoly_la_DEPENDENCIES) + $(LINK) $(libgslpoly_la_OBJECTS) $(libgslpoly_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve_cubic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve_quadratic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsolve.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsolve_cubic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsolve_init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsolve_quadratic.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/poly/TODO b/software/gsl-1.15/poly/TODO new file mode 100644 index 000000000..db04620bb --- /dev/null +++ b/software/gsl-1.15/poly/TODO @@ -0,0 +1,133 @@ +# -*- org -*- +#+CATEGORY: poly + +* Estimate error on general poly roots using Newton method? Allow for +multiple roots and higher derivatives + +* Newton-Maehly (Newton with implicit deflation) + +* Jenkins-Traub + +* Brian Smith's adaptation of Laguerre's method + +* Hirano's method, SIAM J Num Anal 19 (1982) 793-99 by Murota + +* Carstensen, Petkovic, "On iteration methods without derivatives for +the simultaneous determination of polynomial zeros", J. Comput. Appl. +Math., 45 (1993) 251-267 + +* Investigate this, + + > NA Digest Sunday, July 11, 1999 Volume 99 : Issue 28 + > + > From: Murakami Hiroshi + > Date: Sun, 11 Jul 1999 18:56:54 +0900 (JST) + > Subject: Code for Wilf's Complex Bisection Method + > + > A sample demo source of root finding method for the general complex + > coefficient polynomial is placed to URL . + > It is about 8KB in size and is a tar and gnu-zipped file. + > The algorithm is taken from the following reference: + > HERBERT S.WILF,"A Global Bisection Algorithm for Computing the Zeros + > of Polynomials in the Complex Plane",ACM.vol.25,No.3,July 1978,pp.415-420. + > + > The Wilf's method is the complex plane version of the Sturm bi-section + > method for the real polynomial. And theoretically very interesting. + > For the given complex interval (complex rectilinear region and sides are + > parallel to the x-y axis), the procedure gives the count of the complex + > roots of the polynomial inside the interval. Thus, successive bi-section + > or quad-section of the interval can give the sequence of the shrinking + > intervals containing the root inside to attain the required accuracies. + > The source code is written mostly Fortran77 language, however some + > violations are intensionally left as: 1: The DO-ENDDO loop structure. + > 2: The longer than 6 letter names. 3: The use of under-score letter. + > 4: The use of include statement. + > The code will be placed in the public domain. + > + +* Investigate this + +From: "Steven G. Johnson" +To: help-gsl@gnu.org +Subject: [Help-gsl] (in)accuracy of gsl_poly_complex_solve for repeated + roots? +Date: Sun, 05 Jun 2005 16:25:40 -0400 +Precedence: list +Envelope-to: bjg@network-theory.co.uk + +Hi, I noticed that gsl_poly_complex_solve seems to be surprisingly +inaccurate. For example, if you ask it for the roots of 1 + 4x + 6x^2 + +4x^3 + x^4, which should have x = -1 as a four-fold root (note that the +coefficients and solutions are exactly representable), it gives roots: + +-0.999903+9.66605e-05i +-0.999903-9.66605e-05i +-1.0001+9.66834e-05i +-1.0001-9.66834e-05i + +i.e. it is accurate to only 4 significant digits. (On the other hand, +when I have 4 distinct real roots it seems to be accurate to machine +precision.) + +If this kind of catastrophic accuracy loss is intrinsic to the algorithm +when repeated roots are encountered, please note it in the manual. + +However, I suspect that there may be algorithms to obtain higher +accuracy for multiple roots. I found the below references in a +literature search on the topic, which you may want to look into. (The +first reference can be found online at +http://www.neiu.edu/~zzeng/multroot.htm) + +Cordially, +Steven G. Johnson + +--------------------------------------------------------------------- +Algorithm 835: MULTROOT - a Matlab package for computing polynomial +roots and multiplicities +Zeng, Z. (Dept. of Math., Northeastern Illinois Univ., Chicago, IL, USA) +Source: ACM Transactions on Mathematical Software, v 30, n 2, June 2004, +p 218-36 +ISSN: 0098-3500 CODEN: ACMSCU +Publisher: ACM, USA + +Abstract: MULTROOT is a collection of Matlab modules for accurate +computation of polynomial roots, especially roots with nontrivial +multiplicities. As a blackbox-type software, MULTROOT requires the +polynomial coefficients as the only input, and outputs the computed +roots, multiplicities, backward error, estimated forward error, and the +structure-preserving condition number. The most significant features of +MULTROOT are the multiplicity identification capability and high +accuracy on multiple roots without using multiprecision arithmetic, even +if the polynomial coefficients are inexact. A comprehensive test suite +of polynomials that are collected from the literature is included for +numerical experiments and performance comparison (21 refs.) + +--------------------------------------------------------------------- +Ten methods to bound multiple roots of polynomials +Rump, S.M. (Inst. fur Informatik III, Tech. Univ. Hamburg-Harburg, +Hamburg, Germany) Source: Journal of Computational and Applied +Mathematics, v 156, n 2, 15 July 2003, p 403-32 +ISSN: 0377-0427 CODEN: JCAMDI +Publisher: Elsevier, Netherlands + +Abstract: Given a univariate polynomial P with a k-fold multiple root or +a k-fold root cluster near some z, we discuss nine different methods to +compute a disc near z which either contains exactly or contains at least +k roots of P. Many of the presented methods are known and of those some +are new. We are especially interested in the behavior of methods when +implemented in a rigorous way, that is, when taking into account all +possible effects of rounding errors. In other words, every result shall +be mathematically correct. We display extensive test sets comparing the +methods under different circumstances. Based on the results, we present +a tenth, hybrid method combining five of the previous methods which, for +give z, (i) detects the number k of roots near z and (ii) computes an +including disc with in most cases a radius of the order of the numerical +sensitivity of the root cluster. Therefore, the resulting discs are +numerically nearly optimal + + + +_______________________________________________ +Help-gsl mailing list +Help-gsl@gnu.org +http://lists.gnu.org/mailman/listinfo/help-gsl diff --git a/software/gsl-1.15/poly/balance.c b/software/gsl-1.15/poly/balance.c new file mode 100644 index 000000000..9bb6b2d47 --- /dev/null +++ b/software/gsl-1.15/poly/balance.c @@ -0,0 +1,127 @@ +/* poly/balance.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void balance_companion_matrix (double *m, size_t n); + +#define RADIX 2 +#define RADIX2 (RADIX*RADIX) + +static void +balance_companion_matrix (double *m, size_t nc) +{ + int not_converged = 1; + + double row_norm = 0; + double col_norm = 0; + + while (not_converged) + { + size_t i, j; + double g, f, s; + + not_converged = 0; + + for (i = 0; i < nc; i++) + { + /* column norm, excluding the diagonal */ + + if (i != nc - 1) + { + col_norm = fabs (MAT (m, i + 1, i, nc)); + } + else + { + col_norm = 0; + + for (j = 0; j < nc - 1; j++) + { + col_norm += fabs (MAT (m, j, nc - 1, nc)); + } + } + + /* row norm, excluding the diagonal */ + + if (i == 0) + { + row_norm = fabs (MAT (m, 0, nc - 1, nc)); + } + else if (i == nc - 1) + { + row_norm = fabs (MAT (m, i, i - 1, nc)); + } + else + { + row_norm = (fabs (MAT (m, i, i - 1, nc)) + + fabs (MAT (m, i, nc - 1, nc))); + } + + if (col_norm == 0 || row_norm == 0) + { + continue; + } + + g = row_norm / RADIX; + f = 1; + s = col_norm + row_norm; + + while (col_norm < g) + { + f *= RADIX; + col_norm *= RADIX2; + } + + g = row_norm * RADIX; + + while (col_norm > g) + { + f /= RADIX; + col_norm /= RADIX2; + } + + if ((row_norm + col_norm) < 0.95 * s * f) + { + not_converged = 1; + + g = 1 / f; + + if (i == 0) + { + MAT (m, 0, nc - 1, nc) *= g; + } + else + { + MAT (m, i, i - 1, nc) *= g; + MAT (m, i, nc - 1, nc) *= g; + } + + if (i == nc - 1) + { + for (j = 0; j < nc; j++) + { + MAT (m, j, i, nc) *= f; + } + } + else + { + MAT (m, i + 1, i, nc) *= f; + } + } + } + } +} diff --git a/software/gsl-1.15/poly/companion.c b/software/gsl-1.15/poly/companion.c new file mode 100644 index 000000000..872cc0599 --- /dev/null +++ b/software/gsl-1.15/poly/companion.c @@ -0,0 +1,36 @@ +/* poly/companion.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static void set_companion_matrix (const double *a, size_t n, double *m); + +static void +set_companion_matrix (const double *a, size_t nc, double *m) +{ + size_t i, j; + + for (i = 0; i < nc; i++) + for (j = 0; j < nc; j++) + MAT (m, i, j, nc) = 0.0; + + for (i = 1; i < nc; i++) + MAT (m, i, i - 1, nc) = 1.0; + + for (i = 0; i < nc; i++) + MAT (m, i, nc - 1, nc) = -a[i] / a[nc]; +} diff --git a/software/gsl-1.15/poly/dd.c b/software/gsl-1.15/poly/dd.c new file mode 100644 index 000000000..54f8024cf --- /dev/null +++ b/software/gsl-1.15/poly/dd.c @@ -0,0 +1,85 @@ +/* interpolation/interp_poly.c + * + * Copyright (C) 2001 DAN, HO-JIN + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Modified for standalone use in polynomial directory, B.Gough 2001 */ + +#include +#include +#include + +int +gsl_poly_dd_init (double dd[], const double xa[], const double ya[], + size_t size) +{ + size_t i, j; + + /* Newton's divided differences */ + + dd[0] = ya[0]; + + for (j = size - 1; j >= 1; j--) + { + dd[j] = (ya[j] - ya[j - 1]) / (xa[j] - xa[j - 1]); + } + + for (i = 2; i < size; i++) + { + for (j = size - 1; j >= i; j--) + { + dd[j] = (dd[j] - dd[j - 1]) / (xa[j] - xa[j - i]); + } + } + + return GSL_SUCCESS; +} + +int +gsl_poly_dd_taylor (double c[], double xp, + const double dd[], const double xa[], size_t size, + double w[]) +{ + size_t i, j; + + for (i = 0; i < size; i++) + { + c[i] = 0.0; + w[i] = 0.0; + } + + w[size - 1] = 1.0; + + c[0] = dd[0]; + + for (i = size - 1; i-- > 0;) + { + w[i] = -w[i + 1] * (xa[size - 2 - i] - xp); + + for (j = i + 1; j < size - 1; j++) + { + w[j] = w[j] - w[j + 1] * (xa[size - 2 - i] - xp); + } + + for (j = i; j < size; j++) + { + c[j - i] += w[j] * dd[size - i - 1]; + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/poly/deriv.c b/software/gsl-1.15/poly/deriv.c new file mode 100644 index 000000000..461a2d457 --- /dev/null +++ b/software/gsl-1.15/poly/deriv.c @@ -0,0 +1,64 @@ +/* poly/eval.c + * + * Copyright (C) 2009 Marc JOURDAIN + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +int +gsl_poly_eval_derivs (const double c[], const size_t lenc, const double x, + double res[], const size_t lenres) +{ + size_t i, n, nmax; + size_t k, l, lmax; + + for (i = 0, n = 0, nmax = 0; i < lenres; i++) + { + if (n < lenc) + { + res[i] = c[lenc - 1]; + nmax = n; + n++; + } + else + res[i] = 0.0; + } + + for (i = 0; i < lenc - 1; i++) + { + k = (lenc - 1) - i; + res[0] = ((x * res[0]) + c[k - 1]); + lmax = (nmax < k) ? nmax : k - 1; + for (l = 1; l <= lmax; l++) + { + res[l] = ((x * res[l]) + res[l - 1]); + } + } + + { + double f = 1.0; + for (i = 2; i <= nmax; i++) + { + f *= i; + res[i] *= f; + } + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/poly/eval.c b/software/gsl-1.15/poly/eval.c new file mode 100644 index 000000000..8b0437a33 --- /dev/null +++ b/software/gsl-1.15/poly/eval.c @@ -0,0 +1,27 @@ +/* poly/eval.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Complex functions Copyright (C) 2007 Frank Reininghaus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/poly/gsl_poly.h b/software/gsl-1.15/poly/gsl_poly.h new file mode 100644 index 000000000..ab1036da6 --- /dev/null +++ b/software/gsl-1.15/poly/gsl_poly.h @@ -0,0 +1,179 @@ +/* poly/gsl_poly.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_POLY_H__ +#define __GSL_POLY_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Evaluate polynomial + * + * c[0] + c[1] x + c[2] x^2 + ... + c[len-1] x^(len-1) + * + * exceptions: none + */ + +/* real polynomial, real x */ +INLINE_DECL double gsl_poly_eval(const double c[], const int len, const double x); + +/* real polynomial, complex x */ +INLINE_DECL gsl_complex gsl_poly_complex_eval (const double c [], const int len, const gsl_complex z); + +/* complex polynomial, complex x */ +INLINE_DECL gsl_complex gsl_complex_poly_complex_eval (const gsl_complex c [], const int len, const gsl_complex z); + +int gsl_poly_eval_derivs(const double c[], const size_t lenc, const double x, double res[], const size_t lenres); + +#ifdef HAVE_INLINE +INLINE_FUN +double +gsl_poly_eval(const double c[], const int len, const double x) +{ + int i; + double ans = c[len-1]; + for(i=len-1; i>0; i--) ans = c[i-1] + x * ans; + return ans; +} + +INLINE_FUN +gsl_complex +gsl_poly_complex_eval(const double c[], const int len, const gsl_complex z) +{ + int i; + gsl_complex ans; + GSL_SET_COMPLEX (&ans, c[len-1], 0.0); + for(i=len-1; i>0; i--) { + /* The following three lines are equivalent to + ans = gsl_complex_add_real (gsl_complex_mul (z, ans), c[i-1]); + but faster */ + double tmp = c[i-1] + GSL_REAL (z) * GSL_REAL (ans) - GSL_IMAG (z) * GSL_IMAG (ans); + GSL_SET_IMAG (&ans, GSL_IMAG (z) * GSL_REAL (ans) + GSL_REAL (z) * GSL_IMAG (ans)); + GSL_SET_REAL (&ans, tmp); + } + return ans; +} + +INLINE_FUN +gsl_complex +gsl_complex_poly_complex_eval(const gsl_complex c[], const int len, const gsl_complex z) +{ + int i; + gsl_complex ans = c[len-1]; + for(i=len-1; i>0; i--) { + /* The following three lines are equivalent to + ans = gsl_complex_add (c[i-1], gsl_complex_mul (x, ans)); + but faster */ + double tmp = GSL_REAL (c[i-1]) + GSL_REAL (z) * GSL_REAL (ans) - GSL_IMAG (z) * GSL_IMAG (ans); + GSL_SET_IMAG (&ans, GSL_IMAG (c[i-1]) + GSL_IMAG (z) * GSL_REAL (ans) + GSL_REAL (z) * GSL_IMAG (ans)); + GSL_SET_REAL (&ans, tmp); + } + return ans; +} +#endif /* HAVE_INLINE */ + +/* Work with divided-difference polynomials, Abramowitz & Stegun 25.2.26 */ + +int +gsl_poly_dd_init (double dd[], const double x[], const double y[], + size_t size); + +INLINE_DECL double +gsl_poly_dd_eval (const double dd[], const double xa[], const size_t size, const double x); + +#ifdef HAVE_INLINE +INLINE_FUN +double +gsl_poly_dd_eval(const double dd[], const double xa[], const size_t size, const double x) +{ + size_t i; + double y = dd[size - 1]; + for (i = size - 1; i--;) y = dd[i] + (x - xa[i]) * y; + return y; +} +#endif /* HAVE_INLINE */ + + +int +gsl_poly_dd_taylor (double c[], double xp, + const double dd[], const double x[], size_t size, + double w[]); + +/* Solve for real or complex roots of the standard quadratic equation, + * returning the number of real roots. + * + * Roots are returned ordered. + */ +int gsl_poly_solve_quadratic (double a, double b, double c, + double * x0, double * x1); + +int +gsl_poly_complex_solve_quadratic (double a, double b, double c, + gsl_complex * z0, gsl_complex * z1); + + +/* Solve for real roots of the cubic equation + * x^3 + a x^2 + b x + c = 0, returning the + * number of real roots. + * + * Roots are returned ordered. + */ +int gsl_poly_solve_cubic (double a, double b, double c, + double * x0, double * x1, double * x2); + +int +gsl_poly_complex_solve_cubic (double a, double b, double c, + gsl_complex * z0, gsl_complex * z1, + gsl_complex * z2); + + +/* Solve for the complex roots of a general real polynomial */ + +typedef struct +{ + size_t nc ; + double * matrix ; +} +gsl_poly_complex_workspace ; + +gsl_poly_complex_workspace * gsl_poly_complex_workspace_alloc (size_t n); +void gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * w); + +int +gsl_poly_complex_solve (const double * a, size_t n, + gsl_poly_complex_workspace * w, + gsl_complex_packed_ptr z); + +__END_DECLS + +#endif /* __GSL_POLY_H__ */ diff --git a/software/gsl-1.15/poly/qr.c b/software/gsl-1.15/poly/qr.c new file mode 100644 index 000000000..efedf7de6 --- /dev/null +++ b/software/gsl-1.15/poly/qr.c @@ -0,0 +1,245 @@ +/* poly/qr.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static int qr_companion (double *h, size_t nc, gsl_complex_packed_ptr z); + +static int +qr_companion (double *h, size_t nc, gsl_complex_packed_ptr zroot) +{ + double t = 0.0; + + size_t iterations, e, i, j, k, m; + + double w, x, y, s, z; + + double p = 0, q = 0, r = 0; + + /* FIXME: if p,q,r, are not set to zero then the compiler complains + that they ``might be used uninitialized in this + function''. Looking at the code this does seem possible, so this + should be checked. */ + + int notlast; + + size_t n = nc; + +next_root: + + if (n == 0) + return GSL_SUCCESS ; + + iterations = 0; + +next_iteration: + + for (e = n; e >= 2; e--) + { + double a1 = fabs (FMAT (h, e, e - 1, nc)); + double a2 = fabs (FMAT (h, e - 1, e - 1, nc)); + double a3 = fabs (FMAT (h, e, e, nc)); + + if (a1 <= GSL_DBL_EPSILON * (a2 + a3)) + break; + } + + x = FMAT (h, n, n, nc); + + if (e == n) + { + GSL_SET_COMPLEX_PACKED (zroot, n-1, x + t, 0); /* one real root */ + n--; + goto next_root; + /*continue;*/ + } + + y = FMAT (h, n - 1, n - 1, nc); + w = FMAT (h, n - 1, n, nc) * FMAT (h, n, n - 1, nc); + + if (e == n - 1) + { + p = (y - x) / 2; + q = p * p + w; + y = sqrt (fabs (q)); + + x += t; + + if (q > 0) /* two real roots */ + { + if (p < 0) + y = -y; + y += p; + + GSL_SET_COMPLEX_PACKED (zroot, n-1, x - w / y, 0); + GSL_SET_COMPLEX_PACKED (zroot, n-2, x + y, 0); + } + else + { + GSL_SET_COMPLEX_PACKED (zroot, n-1, x + p, -y); + GSL_SET_COMPLEX_PACKED (zroot, n-2, x + p, y); + } + n -= 2; + + goto next_root; + /*continue;*/ + } + + /* No more roots found yet, do another iteration */ + + if (iterations == 60) /* increased from 30 to 60 */ + { + /* too many iterations - give up! */ + + return GSL_FAILURE ; + } + + if (iterations % 10 == 0 && iterations > 0) + { + /* use an exceptional shift */ + + t += x; + + for (i = 1; i <= n; i++) + { + FMAT (h, i, i, nc) -= x; + } + + s = fabs (FMAT (h, n, n - 1, nc)) + fabs (FMAT (h, n - 1, n - 2, nc)); + y = 0.75 * s; + x = y; + w = -0.4375 * s * s; + } + + iterations++; + + for (m = n - 2; m >= e; m--) + { + double a1, a2, a3; + + z = FMAT (h, m, m, nc); + r = x - z; + s = y - z; + p = FMAT (h, m, m + 1, nc) + (r * s - w) / FMAT (h, m + 1, m, nc); + q = FMAT (h, m + 1, m + 1, nc) - z - r - s; + r = FMAT (h, m + 2, m + 1, nc); + s = fabs (p) + fabs (q) + fabs (r); + p /= s; + q /= s; + r /= s; + + if (m == e) + break; + + a1 = fabs (FMAT (h, m, m - 1, nc)); + a2 = fabs (FMAT (h, m - 1, m - 1, nc)); + a3 = fabs (FMAT (h, m + 1, m + 1, nc)); + + if (a1 * (fabs (q) + fabs (r)) <= GSL_DBL_EPSILON * fabs (p) * (a2 + a3)) + break; + } + + for (i = m + 2; i <= n; i++) + { + FMAT (h, i, i - 2, nc) = 0; + } + + for (i = m + 3; i <= n; i++) + { + FMAT (h, i, i - 3, nc) = 0; + } + + /* double QR step */ + + for (k = m; k <= n - 1; k++) + { + notlast = (k != n - 1); + + if (k != m) + { + p = FMAT (h, k, k - 1, nc); + q = FMAT (h, k + 1, k - 1, nc); + r = notlast ? FMAT (h, k + 2, k - 1, nc) : 0.0; + + x = fabs (p) + fabs (q) + fabs (r); + + if (x == 0) + continue; /* FIXME????? */ + + p /= x; + q /= x; + r /= x; + } + + s = sqrt (p * p + q * q + r * r); + + if (p < 0) + s = -s; + + if (k != m) + { + FMAT (h, k, k - 1, nc) = -s * x; + } + else if (e != m) + { + FMAT (h, k, k - 1, nc) *= -1; + } + + p += s; + x = p / s; + y = q / s; + z = r / s; + q /= p; + r /= p; + + /* do row modifications */ + + for (j = k; j <= n; j++) + { + p = FMAT (h, k, j, nc) + q * FMAT (h, k + 1, j, nc); + + if (notlast) + { + p += r * FMAT (h, k + 2, j, nc); + FMAT (h, k + 2, j, nc) -= p * z; + } + + FMAT (h, k + 1, j, nc) -= p * y; + FMAT (h, k, j, nc) -= p * x; + } + + j = (k + 3 < n) ? (k + 3) : n; + + /* do column modifications */ + + for (i = e; i <= j; i++) + { + p = x * FMAT (h, i, k, nc) + y * FMAT (h, i, k + 1, nc); + + if (notlast) + { + p += z * FMAT (h, i, k + 2, nc); + FMAT (h, i, k + 2, nc) -= p * r; + } + FMAT (h, i, k + 1, nc) -= p * q; + FMAT (h, i, k, nc) -= p; + } + } + + goto next_iteration; +} + diff --git a/software/gsl-1.15/poly/solve_cubic.c b/software/gsl-1.15/poly/solve_cubic.c new file mode 100644 index 000000000..e2d8d8548 --- /dev/null +++ b/software/gsl-1.15/poly/solve_cubic.c @@ -0,0 +1,110 @@ +/* poly/solve_cubic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* solve_cubic.c - finds the real roots of x^3 + a x^2 + b x + c = 0 */ + +#include +#include +#include +#include + +#define SWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while(0) + +int +gsl_poly_solve_cubic (double a, double b, double c, + double *x0, double *x1, double *x2) +{ + double q = (a * a - 3 * b); + double r = (2 * a * a * a - 9 * a * b + 27 * c); + + double Q = q / 9; + double R = r / 54; + + double Q3 = Q * Q * Q; + double R2 = R * R; + + double CR2 = 729 * r * r; + double CQ3 = 2916 * q * q * q; + + if (R == 0 && Q == 0) + { + *x0 = - a / 3 ; + *x1 = - a / 3 ; + *x2 = - a / 3 ; + return 3 ; + } + else if (CR2 == CQ3) + { + /* this test is actually R2 == Q3, written in a form suitable + for exact computation with integers */ + + /* Due to finite precision some double roots may be missed, and + considered to be a pair of complex roots z = x +/- epsilon i + close to the real axis. */ + + double sqrtQ = sqrt (Q); + + if (R > 0) + { + *x0 = -2 * sqrtQ - a / 3; + *x1 = sqrtQ - a / 3; + *x2 = sqrtQ - a / 3; + } + else + { + *x0 = - sqrtQ - a / 3; + *x1 = - sqrtQ - a / 3; + *x2 = 2 * sqrtQ - a / 3; + } + return 3 ; + } + else if (R2 < Q3) + { + double sgnR = (R >= 0 ? 1 : -1); + double ratio = sgnR * sqrt (R2 / Q3); + double theta = acos (ratio); + double norm = -2 * sqrt (Q); + *x0 = norm * cos (theta / 3) - a / 3; + *x1 = norm * cos ((theta + 2.0 * M_PI) / 3) - a / 3; + *x2 = norm * cos ((theta - 2.0 * M_PI) / 3) - a / 3; + + /* Sort *x0, *x1, *x2 into increasing order */ + + if (*x0 > *x1) + SWAP(*x0, *x1) ; + + if (*x1 > *x2) + { + SWAP(*x1, *x2) ; + + if (*x0 > *x1) + SWAP(*x0, *x1) ; + } + + return 3; + } + else + { + double sgnR = (R >= 0 ? 1 : -1); + double A = -sgnR * pow (fabs (R) + sqrt (R2 - Q3), 1.0/3.0); + double B = Q / A ; + *x0 = A + B - a / 3; + return 1; + } +} diff --git a/software/gsl-1.15/poly/solve_quadratic.c b/software/gsl-1.15/poly/solve_quadratic.c new file mode 100644 index 000000000..cc6f601eb --- /dev/null +++ b/software/gsl-1.15/poly/solve_quadratic.c @@ -0,0 +1,85 @@ +/* poly/solve_quadratic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* solve_quadratic.c - finds the real roots of a x^2 + b x + c = 0 */ + +#include +#include + +#include + +int +gsl_poly_solve_quadratic (double a, double b, double c, + double *x0, double *x1) +{ + double disc = b * b - 4 * a * c; + + if (a == 0) /* Handle linear case */ + { + if (b == 0) + { + return 0; + } + else + { + *x0 = -c / b; + return 1; + }; + } + + if (disc > 0) + { + if (b == 0) + { + double r = fabs (0.5 * sqrt (disc) / a); + *x0 = -r; + *x1 = r; + } + else + { + double sgnb = (b > 0 ? 1 : -1); + double temp = -0.5 * (b + sgnb * sqrt (disc)); + double r1 = temp / a ; + double r2 = c / temp ; + + if (r1 < r2) + { + *x0 = r1 ; + *x1 = r2 ; + } + else + { + *x0 = r2 ; + *x1 = r1 ; + } + } + return 2; + } + else if (disc == 0) + { + *x0 = -0.5 * b / a ; + *x1 = -0.5 * b / a ; + return 2 ; + } + else + { + return 0; + } +} + diff --git a/software/gsl-1.15/poly/test.c b/software/gsl-1.15/poly/test.c new file mode 100644 index 000000000..2dec8da59 --- /dev/null +++ b/software/gsl-1.15/poly/test.c @@ -0,0 +1,579 @@ +/* poly/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +int +main (void) +{ + const double eps = 100.0 * GSL_DBL_EPSILON; + + gsl_ieee_env_setup (); + + /* Polynomial evaluation */ + + { + double x, y; + double c[3] = { 1.0, 0.5, 0.3 }; + x = 0.5; + y = gsl_poly_eval (c, 3, x); + gsl_test_rel (y, 1 + 0.5 * x + 0.3 * x * x, eps, + "gsl_poly_eval({1, 0.5, 0.3}, 0.5)"); + } + + { + double x, y; + double d[11] = { 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1 }; + x = 1.0; + y = gsl_poly_eval (d, 11, x); + gsl_test_rel (y, 1.0, eps, + "gsl_poly_eval({1,-1, 1, -1, 1, -1, 1, -1, 1, -1, 1}, 1.0)"); + + } + + { + gsl_complex x, y; + double c[1] = {0.3}; + GSL_SET_REAL (&x, 0.75); + GSL_SET_IMAG (&x, 1.2); + y = gsl_poly_complex_eval (c, 1, x); + + gsl_test_rel (GSL_REAL (y), 0.3, eps, "y.real, gsl_poly_complex_eval ({0.3}, 0.75 + 1.2i)"); + gsl_test_rel (GSL_IMAG (y), 0.0, eps, "y.imag, gsl_poly_complex_eval ({0.3}, 0.75 + 1.2i)"); + } + + { + gsl_complex x, y; + double c[4] = {2.1, -1.34, 0.76, 0.45}; + GSL_SET_REAL (&x, 0.49); + GSL_SET_IMAG (&x, 0.95); + y = gsl_poly_complex_eval (c, 4, x); + + gsl_test_rel (GSL_REAL (y), 0.3959143, eps, "y.real, gsl_poly_complex_eval ({2.1, -1.34, 0.76, 0.45}, 0.49 + 0.95i)"); + gsl_test_rel (GSL_IMAG (y), -0.6433305, eps, "y.imag, gsl_poly_complex_eval ({2.1, -1.34, 0.76, 0.45}, 0.49 + 0.95i)"); + } + + { + gsl_complex x, y; + gsl_complex c[1]; + GSL_SET_REAL (&c[0], 0.674); + GSL_SET_IMAG (&c[0], -1.423); + GSL_SET_REAL (&x, -1.44); + GSL_SET_IMAG (&x, 9.55); + y = gsl_complex_poly_complex_eval (c, 1, x); + + gsl_test_rel (GSL_REAL (y), 0.674, eps, "y.real, gsl_complex_poly_complex_eval ({0.674 - 1.423i}, -1.44 + 9.55i)"); + gsl_test_rel (GSL_IMAG (y), -1.423, eps, "y.imag, gsl_complex_poly_complex_eval ({0.674 - 1.423i}, -1.44 + 9.55i)"); + } + + { + gsl_complex x, y; + gsl_complex c[4]; + GSL_SET_REAL (&c[0], -2.31); + GSL_SET_IMAG (&c[0], 0.44); + GSL_SET_REAL (&c[1], 4.21); + GSL_SET_IMAG (&c[1], -3.19); + GSL_SET_REAL (&c[2], 0.93); + GSL_SET_IMAG (&c[2], 1.04); + GSL_SET_REAL (&c[3], -0.42); + GSL_SET_IMAG (&c[3], 0.68); + GSL_SET_REAL (&x, 0.49); + GSL_SET_IMAG (&x, 0.95); + y = gsl_complex_poly_complex_eval (c, 4, x); + + gsl_test_rel (GSL_REAL (y), 1.82462012, eps, "y.real, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i)"); + gsl_test_rel (GSL_IMAG (y), 2.30389412, eps, "y.imag, gsl_complex_poly_complex_eval ({-2.31 + 0.44i, 4.21 - 3.19i, 0.93 + 1.04i, -0.42 + 0.68i}, 0.49 + 0.95i)"); + } + + /* Quadratic */ + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (4.0, -20.0, 26.0, &x0, &x1); + + gsl_test (n != 0, "gsl_poly_solve_quadratic, no roots, (2x - 5)^2 = -1"); + } + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (4.0, -20.0, 25.0, &x0, &x1); + + gsl_test (n != 2, "gsl_poly_solve_quadratic, one root, (2x - 5)^2 = 0"); + gsl_test_rel (x0, 2.5, 1e-9, "x0, (2x - 5)^2 = 0"); + gsl_test_rel (x1, 2.5, 1e-9, "x1, (2x - 5)^2 = 0"); + gsl_test (x0 != x1, "x0 == x1, (2x - 5)^2 = 0"); + } + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (4.0, -20.0, 21.0, &x0, &x1); + + gsl_test (n != 2, "gsl_poly_solve_quadratic, two roots, (2x - 5)^2 = 4"); + gsl_test_rel (x0, 1.5, 1e-9, "x0, (2x - 5)^2 = 4"); + gsl_test_rel (x1, 3.5, 1e-9, "x1, (2x - 5)^2 = 4"); + } + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (4.0, 7.0, 0.0, &x0, &x1); + + gsl_test (n != 2, "gsl_poly_solve_quadratic, two roots, x(4x + 7) = 0"); + gsl_test_rel (x0, -1.75, 1e-9, "x0, x(4x + 7) = 0"); + gsl_test_rel (x1, 0.0, 1e-9, "x1, x(4x + 7) = 0"); + } + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (5.0, 0.0, -20.0, &x0, &x1); + + gsl_test (n != 2, + "gsl_poly_solve_quadratic, two roots b = 0, 5 x^2 = 20"); + gsl_test_rel (x0, -2.0, 1e-9, "x0, 5 x^2 = 20"); + gsl_test_rel (x1, 2.0, 1e-9, "x1, 5 x^2 = 20"); + } + + + { + double x0, x1; + + int n = gsl_poly_solve_quadratic (0.0, 3.0, -21.0, &x0, &x1); + + gsl_test (n != 1, + "gsl_poly_solve_quadratic, one root (linear) 3 x - 21 = 0"); + gsl_test_rel (x0, 7.0, 1e-9, "x0, 3x - 21 = 0"); + } + + + { + double x0, x1; + int n = gsl_poly_solve_quadratic (0.0, 0.0, 1.0, &x0, &x1); + + gsl_test (n != 0, + "gsl_poly_solve_quadratic, no roots 1 = 0"); + } + + + /* Cubic */ + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (0.0, 0.0, -27.0, &x0, &x1, &x2); + + gsl_test (n != 1, "gsl_poly_solve_cubic, one root, x^3 = 27"); + gsl_test_rel (x0, 3.0, 1e-9, "x0, x^3 = 27"); + } + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (-51.0, 867.0, -4913.0, &x0, &x1, &x2); + + gsl_test (n != 3, "gsl_poly_solve_cubic, three roots, (x-17)^3=0"); + gsl_test_rel (x0, 17.0, 1e-9, "x0, (x-17)^3=0"); + gsl_test_rel (x1, 17.0, 1e-9, "x1, (x-17)^3=0"); + gsl_test_rel (x2, 17.0, 1e-9, "x2, (x-17)^3=0"); + } + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (-57.0, 1071.0, -6647.0, &x0, &x1, &x2); + + gsl_test (n != 3, + "gsl_poly_solve_cubic, three roots, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (x0, 17.0, 1e-9, "x0, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (x1, 17.0, 1e-9, "x1, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (x2, 23.0, 1e-9, "x2, (x-17)(x-17)(x-23)=0"); + } + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (-11.0, -493.0, +6647.0, &x0, &x1, &x2); + + gsl_test (n != 3, + "gsl_poly_solve_cubic, three roots, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (x0, -23.0, 1e-9, "x0, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (x1, 17.0, 1e-9, "x1, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (x2, 17.0, 1e-9, "x2, (x+23)(x-17)(x-17)=0"); + } + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (-143.0, 5087.0, -50065.0, &x0, &x1, &x2); + + gsl_test (n != 3, + "gsl_poly_solve_cubic, three roots, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (x0, 17.0, 1e-9, "x0, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (x1, 31.0, 1e-9, "x1, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (x2, 95.0, 1e-9, "x2, (x-17)(x-31)(x-95)=0"); + } + + { + double x0, x1, x2; + + int n = gsl_poly_solve_cubic (-109.0, 803.0, 50065.0, &x0, &x1, &x2); + + gsl_test (n != 3, + "gsl_poly_solve_cubic, three roots, (x+17)(x-31)(x-95)=0"); + gsl_test_rel (x0, -17.0, 1e-9, "x0, (x+17)(x-31)(x-95)=0"); + gsl_test_rel (x1, 31.0, 1e-9, "x1, (x+17)(x-31)(x-95)=0"); + gsl_test_rel (x2, 95.0, 1e-9, "x2, (x+17)(x-31)(x-95)=0"); + } + + /* Quadratic with complex roots */ + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (4.0, -20.0, 26.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, 2 roots (2x - 5)^2 = -1"); + gsl_test_rel (GSL_REAL (z0), 2.5, 1e-9, "z0.real, (2x - 5)^2 = -1"); + gsl_test_rel (GSL_IMAG (z0), -0.5, 1e-9, "z0.imag, (2x - 5)^2 = -1"); + + gsl_test_rel (GSL_REAL (z1), 2.5, 1e-9, "z1.real, (2x - 5)^2 = -1"); + gsl_test_rel (GSL_IMAG (z1), 0.5, 1e-9, "z1.imag, (2x - 5)^2 = -1"); + } + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (4.0, -20.0, 25.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, one root, (2x - 5)^2 = 0"); + gsl_test_rel (GSL_REAL (z0), 2.5, 1e-9, "z0.real, (2x - 5)^2 = 0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag (2x - 5)^2 = 0"); + gsl_test_rel (GSL_REAL (z1), 2.5, 1e-9, "z1.real, (2x - 5)^2 = 0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag (2x - 5)^2 = 0"); + gsl_test (GSL_REAL (z0) != GSL_REAL (z1), + "z0.real == z1.real, (2x - 5)^2 = 0"); + gsl_test (GSL_IMAG (z0) != GSL_IMAG (z1), + "z0.imag == z1.imag, (2x - 5)^2 = 0"); + } + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (4.0, -20.0, 21.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, two roots, (2x - 5)^2 = 4"); + gsl_test_rel (GSL_REAL (z0), 1.5, 1e-9, "z0.real, (2x - 5)^2 = 4"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (2x - 5)^2 = 4"); + gsl_test_rel (GSL_REAL (z1), 3.5, 1e-9, "z1.real, (2x - 5)^2 = 4"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, (2x - 5)^2 = 4"); + } + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (4.0, 7.0, 0.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, two roots, x(4x + 7) = 0"); + gsl_test_rel (GSL_REAL (z0), -1.75, 1e-9, "z0.real, x(4x + 7) = 0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, x(4x + 7) = 0"); + gsl_test_rel (GSL_REAL (z1), 0.0, 1e-9, "z1.real, x(4x + 7) = 0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, x(4x + 7) = 0"); + } + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (5.0, 0.0, -20.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, two roots b = 0, 5 x^2 = 20"); + gsl_test_rel (GSL_REAL (z0), -2.0, 1e-9, "z0.real, 5 x^2 = 20"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, 5 x^2 = 20"); + gsl_test_rel (GSL_REAL (z1), 2.0, 1e-9, "z1.real, 5 x^2 = 20"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, 5 x^2 = 20"); + } + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (5.0, 0.0, 20.0, &z0, &z1); + + gsl_test (n != 2, + "gsl_poly_complex_solve_quadratic, two roots b = 0, 5 x^2 = -20"); + gsl_test_rel (GSL_REAL (z0), 0.0, 1e-9, "z0.real, 5 x^2 = -20"); + gsl_test_rel (GSL_IMAG (z0), -2.0, 1e-9, "z0.imag, 5 x^2 = -20"); + gsl_test_rel (GSL_REAL (z1), 0.0, 1e-9, "z1.real, 5 x^2 = -20"); + gsl_test_rel (GSL_IMAG (z1), 2.0, 1e-9, "z1.imag, 5 x^2 = -20"); + } + + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (0.0, 3.0, -21.0, &z0, &z1); + + gsl_test (n != 1, + "gsl_poly_complex_solve_quadratic, one root (linear) 3 x - 21 = 0"); + + gsl_test_rel (GSL_REAL (z0), 7.0, 1e-9, "z0.real, 3x - 21 = 0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, 3x - 21 = 0"); + } + + + { + gsl_complex z0, z1; + + int n = gsl_poly_complex_solve_quadratic (0.0, 0.0, 1.0, &z0, &z1); + gsl_test (n != 0, + "gsl_poly_complex_solve_quadratic, no roots 1 = 0"); + } + + + + /* Cubic with complex roots */ + + { + gsl_complex z0, z1, z2; + + int n = gsl_poly_complex_solve_cubic (0.0, 0.0, -27.0, &z0, &z1, &z2); + + gsl_test (n != 3, "gsl_poly_complex_solve_cubic, three root, x^3 = 27"); + gsl_test_rel (GSL_REAL (z0), -1.5, 1e-9, "z0.real, x^3 = 27"); + gsl_test_rel (GSL_IMAG (z0), -1.5 * sqrt (3.0), 1e-9, + "z0.imag, x^3 = 27"); + gsl_test_rel (GSL_REAL (z1), -1.5, 1e-9, "z1.real, x^3 = 27"); + gsl_test_rel (GSL_IMAG (z1), 1.5 * sqrt (3.0), 1e-9, "z1.imag, x^3 = 27"); + gsl_test_rel (GSL_REAL (z2), 3.0, 1e-9, "z2.real, x^3 = 27"); + gsl_test_rel (GSL_IMAG (z2), 0.0, 1e-9, "z2.imag, x^3 = 27"); + } + + { + gsl_complex z0, z1, z2; + + int n = gsl_poly_complex_solve_cubic (-1.0, 1.0, 39.0, &z0, &z1, &z2); + + gsl_test (n != 3, + "gsl_poly_complex_solve_cubic, three root, (x+3)(x^2-4x+13) = 0"); + gsl_test_rel (GSL_REAL (z0), -3.0, 1e-9, "z0.real, (x+3)(x^2+1) = 0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (x+3)(x^2+1) = 0"); + gsl_test_rel (GSL_REAL (z1), 2.0, 1e-9, "z1.real, (x+3)(x^2+1) = 0"); + gsl_test_rel (GSL_IMAG (z1), -3.0, 1e-9, "z1.imag, (x+3)(x^2+1) = 0"); + gsl_test_rel (GSL_REAL (z2), 2.0, 1e-9, "z2.real, (x+3)(x^2+1) = 0"); + gsl_test_rel (GSL_IMAG (z2), 3.0, 1e-9, "z2.imag, (x+3)(x^2+1) = 0"); + } + + { + gsl_complex z0, z1, z2; + + int n = + gsl_poly_complex_solve_cubic (-51.0, 867.0, -4913.0, &z0, &z1, &z2); + + gsl_test (n != 3, + "gsl_poly_complex_solve_cubic, three roots, (x-17)^3=0"); + gsl_test_rel (GSL_REAL (z0), 17.0, 1e-9, "z0.real, (x-17)^3=0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (x-17)^3=0"); + gsl_test_rel (GSL_REAL (z1), 17.0, 1e-9, "z1.real, (x-17)^3=0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, (x-17)^3=0"); + gsl_test_rel (GSL_REAL (z2), 17.0, 1e-9, "z2.real, (x-17)^3=0"); + gsl_test_rel (GSL_IMAG (z2), 0.0, 1e-9, "z2.imag, (x-17)^3=0"); + } + + { + gsl_complex z0, z1, z2; + + int n = + gsl_poly_complex_solve_cubic (-57.0, 1071.0, -6647.0, &z0, &z1, &z2); + + gsl_test (n != 3, + "gsl_poly_complex_solve_cubic, three roots, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_REAL (z0), 17.0, 1e-9, "z0.real, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_REAL (z1), 17.0, 1e-9, "z1.real, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_REAL (z2), 23.0, 1e-9, "z2.real, (x-17)(x-17)(x-23)=0"); + gsl_test_rel (GSL_IMAG (z2), 0.0, 1e-9, "z2.imag, (x-17)(x-17)(x-23)=0"); + } + + { + gsl_complex z0, z1, z2; + + int n = + gsl_poly_complex_solve_cubic (-11.0, -493.0, +6647.0, &z0, &z1, &z2); + + gsl_test (n != 3, + "gsl_poly_complex_solve_cubic, three roots, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_REAL (z0), -23.0, 1e-9, + "z0.real, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_REAL (z1), 17.0, 1e-9, "z1.real, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_REAL (z2), 17.0, 1e-9, "z2.real, (x+23)(x-17)(x-17)=0"); + gsl_test_rel (GSL_IMAG (z2), 0.0, 1e-9, "z2.imag, (x+23)(x-17)(x-17)=0"); + } + + + { + gsl_complex z0, z1, z2; + + int n = + gsl_poly_complex_solve_cubic (-143.0, 5087.0, -50065.0, &z0, &z1, &z2); + + gsl_test (n != 3, + "gsl_poly_complex_solve_cubic, three roots, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_REAL (z0), 17.0, 1e-9, "z0.real, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_IMAG (z0), 0.0, 1e-9, "z0.imag, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_REAL (z1), 31.0, 1e-9, "z1.real, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_IMAG (z1), 0.0, 1e-9, "z1.imag, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_REAL (z2), 95.0, 1e-9, "z2.real, (x-17)(x-31)(x-95)=0"); + gsl_test_rel (GSL_IMAG (z2), 0.0, 1e-9, "z2.imag, (x-17)(x-31)(x-95)=0"); + } + + + { + /* Wilkinson polynomial: y = (x-1)(x-2)(x-3)(x-4)(x-5) */ + + double a[6] = { -120, 274, -225, 85, -15, 1 }; + double z[6*2]; + + gsl_poly_complex_workspace *w = gsl_poly_complex_workspace_alloc (6); + + int status = gsl_poly_complex_solve (a, 6, w, z); + + gsl_poly_complex_workspace_free (w); + + gsl_test (status, + "gsl_poly_complex_solve, 5th-order Wilkinson polynomial"); + gsl_test_rel (z[0], 1.0, 1e-9, "z0.real, 5th-order polynomial"); + gsl_test_rel (z[1], 0.0, 1e-9, "z0.imag, 5th-order polynomial"); + gsl_test_rel (z[2], 2.0, 1e-9, "z1.real, 5th-order polynomial"); + gsl_test_rel (z[3], 0.0, 1e-9, "z1.imag, 5th-order polynomial"); + gsl_test_rel (z[4], 3.0, 1e-9, "z2.real, 5th-order polynomial"); + gsl_test_rel (z[5], 0.0, 1e-9, "z2.imag, 5th-order polynomial"); + gsl_test_rel (z[6], 4.0, 1e-9, "z3.real, 5th-order polynomial"); + gsl_test_rel (z[7], 0.0, 1e-9, "z3.imag, 5th-order polynomial"); + gsl_test_rel (z[8], 5.0, 1e-9, "z4.real, 5th-order polynomial"); + gsl_test_rel (z[9], 0.0, 1e-9, "z4.imag, 5th-order polynomial"); + } + + { + /* : 8-th order polynomial y = x^8 + x^4 + 1 */ + + double a[9] = { 1, 0, 0, 0, 1, 0, 0, 0, 1 }; + double z[8*2]; + + double C = 0.5; + double S = sqrt (3.0) / 2.0; + + gsl_poly_complex_workspace *w = gsl_poly_complex_workspace_alloc (9); + + int status = gsl_poly_complex_solve (a, 9, w, z); + + gsl_poly_complex_workspace_free (w); + + gsl_test (status, "gsl_poly_complex_solve, 8th-order polynomial"); + + gsl_test_rel (z[0], -S, 1e-9, "z0.real, 8th-order polynomial"); + gsl_test_rel (z[1], C, 1e-9, "z0.imag, 8th-order polynomial"); + gsl_test_rel (z[2], -S, 1e-9, "z1.real, 8th-order polynomial"); + gsl_test_rel (z[3], -C, 1e-9, "z1.imag, 8th-order polynomial"); + gsl_test_rel (z[4], -C, 1e-9, "z2.real, 8th-order polynomial"); + gsl_test_rel (z[5], S, 1e-9, "z2.imag, 8th-order polynomial"); + gsl_test_rel (z[6], -C, 1e-9, "z3.real, 8th-order polynomial"); + gsl_test_rel (z[7], -S, 1e-9, "z3.imag, 8th-order polynomial"); + gsl_test_rel (z[8], C, 1e-9, "z4.real, 8th-order polynomial"); + gsl_test_rel (z[9], S, 1e-9, "z4.imag, 8th-order polynomial"); + gsl_test_rel (z[10], C, 1e-9, "z5.real, 8th-order polynomial"); + gsl_test_rel (z[11], -S, 1e-9, "z5.imag, 8th-order polynomial"); + gsl_test_rel (z[12], S, 1e-9, "z6.real, 8th-order polynomial"); + gsl_test_rel (z[13], C, 1e-9, "z6.imag, 8th-order polynomial"); + gsl_test_rel (z[14], S, 1e-9, "z7.real, 8th-order polynomial"); + gsl_test_rel (z[15], -C, 1e-9, "z7.imag, 8th-order polynomial"); + + } + + { + int i; + + double xa[7] = {0.16, 0.97, 1.94, 2.74, 3.58, 3.73, 4.70 }; + double ya[7] = {0.73, 1.11, 1.49, 1.84, 2.30, 2.41, 3.07 }; + + double dd_expected[7] = { 7.30000000000000e-01, + 4.69135802469136e-01, + -4.34737219941284e-02, + 2.68681098870099e-02, + -3.22937056934996e-03, + 6.12763259971375e-03, + -6.45402453527083e-03 }; + + double dd[7], coeff[7], work[7]; + + gsl_poly_dd_init (dd, xa, ya, 7); + + for (i = 0; i < 7; i++) + { + gsl_test_rel (dd[i], dd_expected[i], 1e-10, "divided difference dd[%d]", i); + } + + for (i = 0; i < 7; i++) + { + double y = gsl_poly_dd_eval(dd, xa, 7, xa[i]); + gsl_test_rel (y, ya[i], 1e-10, "divided difference y[%d]", i); + } + + gsl_poly_dd_taylor (coeff, 1.5, dd, xa, 7, work); + + for (i = 0; i < 7; i++) + { + double y = gsl_poly_eval(coeff, 7, xa[i] - 1.5); + gsl_test_rel (y, ya[i], 1e-10, "taylor expansion about 1.5 y[%d]", i); + } + } + + { + double c[6] = { +1.0, -2.0, +3.0, -4.0, +5.0, -6.0 }; + double dc[6]; + double x; + x = -0.5; + gsl_poly_eval_derivs(c, 6, x, dc, 6); + + gsl_test_rel (dc[0], c[0] + c[1]*x + c[2]*x*x + c[3]*x*x*x + c[4]*x*x*x*x + c[5]*x*x*x*x*x , eps, "gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6}, 3.75)"); + gsl_test_rel (dc[1], c[1] + 2.0*c[2]*x + 3.0*c[3]*x*x + 4.0*c[4]*x*x*x + 5.0*c[5]*x*x*x*x , eps, "gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6} deriv 1, -12.375)"); + gsl_test_rel (dc[2], 2.0*c[2] + 3.0*2.0*c[3]*x + 4.0*3.0*c[4]*x*x + 5.0*4.0*c[5]*x*x*x , eps, "gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6} deriv 2, +48.0)"); + gsl_test_rel (dc[3], 3.0*2.0*c[3] + 4.0*3.0*2.0*c[4]*x + 5.0*4.0*3.0*c[5]*x*x , eps,"gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6} deriv 3, -174.0)"); + gsl_test_rel (dc[4], 4.0*3.0*2.0*c[4] + 5.0*4.0*3.0*2.0*c[5]*x, eps, "gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6} deriv 4, +480.0)"); + gsl_test_rel (dc[5], 5.0*4.0*3.0*2.0*c[5] , eps, "gsl_poly_eval_dp({+1, -2, +3, -4, +5, -6} deriv 5, -720.0)"); + } + + + /* now summarize the results */ + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/poly/zsolve.c b/software/gsl-1.15/poly/zsolve.c new file mode 100644 index 000000000..aac231cc4 --- /dev/null +++ b/software/gsl-1.15/poly/zsolve.c @@ -0,0 +1,85 @@ +/* poly/zsolve.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* zsolve.c - finds the complex roots of = 0 */ + +#include +#include +#include +#include +#include +#include +#include + +/* C-style matrix elements */ +#define MAT(m,i,j,n) ((m)[(i)*(n) + (j)]) + +/* Fortran-style matrix elements */ +#define FMAT(m,i,j,n) ((m)[((i)-1)*(n) + ((j)-1)]) + +#include "companion.c" +#include "balance.c" +#include "qr.c" + +int +gsl_poly_complex_solve (const double *a, size_t n, + gsl_poly_complex_workspace * w, + gsl_complex_packed_ptr z) +{ + int status; + double *m; + + if (n == 0) + { + GSL_ERROR ("number of terms must be a positive integer", GSL_EINVAL); + } + + if (n == 1) + { + GSL_ERROR ("cannot solve for only one term", GSL_EINVAL); + } + + if (a[n - 1] == 0) + { + GSL_ERROR ("leading term of polynomial must be non-zero", GSL_EINVAL) ; + } + + if (w->nc != n - 1) + { + GSL_ERROR ("size of workspace does not match polynomial", GSL_EINVAL); + } + + m = w->matrix; + + set_companion_matrix (a, n - 1, m); + + balance_companion_matrix (m, n - 1); + + status = qr_companion (m, n - 1, z); + + if (status) + { + GSL_ERROR("root solving qr method failed to converge", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + + + diff --git a/software/gsl-1.15/poly/zsolve_cubic.c b/software/gsl-1.15/poly/zsolve_cubic.c new file mode 100644 index 000000000..226c1a260 --- /dev/null +++ b/software/gsl-1.15/poly/zsolve_cubic.c @@ -0,0 +1,153 @@ +/* poly/zsolve_cubic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* zsolve_cubic.c - finds the complex roots of x^3 + a x^2 + b x + c = 0 */ + +#include +#include +#include +#include +#include + +#define SWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while(0) + +int +gsl_poly_complex_solve_cubic (double a, double b, double c, + gsl_complex *z0, gsl_complex *z1, + gsl_complex *z2) +{ + double q = (a * a - 3 * b); + double r = (2 * a * a * a - 9 * a * b + 27 * c); + + double Q = q / 9; + double R = r / 54; + + double Q3 = Q * Q * Q; + double R2 = R * R; + + double CR2 = 729 * r * r; + double CQ3 = 2916 * q * q * q; + + if (R == 0 && Q == 0) + { + GSL_REAL (*z0) = -a / 3; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = -a / 3; + GSL_IMAG (*z1) = 0; + GSL_REAL (*z2) = -a / 3; + GSL_IMAG (*z2) = 0; + return 3; + } + else if (CR2 == CQ3) + { + /* this test is actually R2 == Q3, written in a form suitable + for exact computation with integers */ + + /* Due to finite precision some double roots may be missed, and + will be considered to be a pair of complex roots z = x +/- + epsilon i close to the real axis. */ + + double sqrtQ = sqrt (Q); + + if (R > 0) + { + GSL_REAL (*z0) = -2 * sqrtQ - a / 3; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = sqrtQ - a / 3; + GSL_IMAG (*z1) = 0; + GSL_REAL (*z2) = sqrtQ - a / 3; + GSL_IMAG (*z2) = 0; + } + else + { + GSL_REAL (*z0) = -sqrtQ - a / 3; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = -sqrtQ - a / 3; + GSL_IMAG (*z1) = 0; + GSL_REAL (*z2) = 2 * sqrtQ - a / 3; + GSL_IMAG (*z2) = 0; + } + return 3; + } + else if (R2 < Q3) + { + double sgnR = (R >= 0 ? 1 : -1); + double ratio = sgnR * sqrt (R2 / Q3); + double theta = acos (ratio); + double norm = -2 * sqrt (Q); + double r0 = norm * cos (theta / 3) - a / 3; + double r1 = norm * cos ((theta + 2.0 * M_PI) / 3) - a / 3; + double r2 = norm * cos ((theta - 2.0 * M_PI) / 3) - a / 3; + + /* Sort r0, r1, r2 into increasing order */ + + if (r0 > r1) + SWAP (r0, r1); + + if (r1 > r2) + { + SWAP (r1, r2); + + if (r0 > r1) + SWAP (r0, r1); + } + + GSL_REAL (*z0) = r0; + GSL_IMAG (*z0) = 0; + + GSL_REAL (*z1) = r1; + GSL_IMAG (*z1) = 0; + + GSL_REAL (*z2) = r2; + GSL_IMAG (*z2) = 0; + + return 3; + } + else + { + double sgnR = (R >= 0 ? 1 : -1); + double A = -sgnR * pow (fabs (R) + sqrt (R2 - Q3), 1.0 / 3.0); + double B = Q / A; + + if (A + B < 0) + { + GSL_REAL (*z0) = A + B - a / 3; + GSL_IMAG (*z0) = 0; + + GSL_REAL (*z1) = -0.5 * (A + B) - a / 3; + GSL_IMAG (*z1) = -(sqrt (3.0) / 2.0) * fabs(A - B); + + GSL_REAL (*z2) = -0.5 * (A + B) - a / 3; + GSL_IMAG (*z2) = (sqrt (3.0) / 2.0) * fabs(A - B); + } + else + { + GSL_REAL (*z0) = -0.5 * (A + B) - a / 3; + GSL_IMAG (*z0) = -(sqrt (3.0) / 2.0) * fabs(A - B); + + GSL_REAL (*z1) = -0.5 * (A + B) - a / 3; + GSL_IMAG (*z1) = (sqrt (3.0) / 2.0) * fabs(A - B); + + GSL_REAL (*z2) = A + B - a / 3; + GSL_IMAG (*z2) = 0; + } + + return 3; + } +} diff --git a/software/gsl-1.15/poly/zsolve_init.c b/software/gsl-1.15/poly/zsolve_init.c new file mode 100644 index 000000000..2409c0793 --- /dev/null +++ b/software/gsl-1.15/poly/zsolve_init.c @@ -0,0 +1,70 @@ +/* poly/zsolve_init.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +gsl_poly_complex_workspace * +gsl_poly_complex_workspace_alloc (size_t n) +{ + size_t nc ; + + gsl_poly_complex_workspace * w ; + + if (n == 0) + { + GSL_ERROR_VAL ("matrix size n must be positive integer", GSL_EDOM, 0); + } + + w = (gsl_poly_complex_workspace *) + malloc (sizeof(gsl_poly_complex_workspace)); + + if (w == 0) + { + GSL_ERROR_VAL ("failed to allocate space for struct", GSL_ENOMEM, 0); + } + + nc = n - 1; + + w->nc = nc; + + w->matrix = (double *) malloc (nc * nc * sizeof(double)); + + if (w->matrix == 0) + { + free (w) ; /* error in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for workspace matrix", + GSL_ENOMEM, 0); + } + + return w ; +} + +void +gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * w) +{ + RETURN_IF_NULL (w); + free(w->matrix) ; + free(w); +} diff --git a/software/gsl-1.15/poly/zsolve_quadratic.c b/software/gsl-1.15/poly/zsolve_quadratic.c new file mode 100644 index 000000000..886134f73 --- /dev/null +++ b/software/gsl-1.15/poly/zsolve_quadratic.c @@ -0,0 +1,103 @@ +/* poly/zsolve_quadratic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* complex_solve_quadratic.c - finds complex roots of a x^2 + b x + c = 0 */ + +#include +#include +#include +#include + +int +gsl_poly_complex_solve_quadratic (double a, double b, double c, + gsl_complex *z0, gsl_complex *z1) +{ + double disc = b * b - 4 * a * c; + + if (a == 0) /* Handle linear case */ + { + if (b == 0) + { + return 0; + } + else + { + GSL_REAL(*z0) = -c / b; + GSL_IMAG(*z0) = 0; + return 1; + }; + } + + if (disc > 0) + { + if (b == 0) + { + double s = fabs (0.5 * sqrt (disc) / a); + GSL_REAL (*z0) = -s; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = s; + GSL_IMAG (*z1) = 0; + } + else + { + double sgnb = (b > 0 ? 1 : -1); + double temp = -0.5 * (b + sgnb * sqrt (disc)); + double r1 = temp / a; + double r2 = c / temp; + + if (r1 < r2) + { + GSL_REAL (*z0) = r1; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = r2; + GSL_IMAG (*z1) = 0; + } + else + { + GSL_REAL (*z0) = r2; + GSL_IMAG (*z0) = 0; + GSL_REAL (*z1) = r1; + GSL_IMAG (*z1) = 0; + } + } + return 2; + } + else if (disc == 0) + { + GSL_REAL (*z0) = -0.5 * b / a; + GSL_IMAG (*z0) = 0; + + GSL_REAL (*z1) = -0.5 * b / a; + GSL_IMAG (*z1) = 0; + + return 2; + } + else + { + double s = fabs (0.5 * sqrt (-disc) / a); + + GSL_REAL (*z0) = -0.5 * b / a; + GSL_IMAG (*z0) = -s; + + GSL_REAL (*z1) = -0.5 * b / a; + GSL_IMAG (*z1) = s; + + return 2; + } +} diff --git a/software/gsl-1.15/qrng/.deps/halton.Plo b/software/gsl-1.15/qrng/.deps/halton.Plo new file mode 100644 index 000000000..a154a394a --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/halton.Plo @@ -0,0 +1,94 @@ +halton.lo: halton.c ../config.h ../gsl/gsl_qrng.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +../gsl/gsl_qrng.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/inline.Plo b/software/gsl-1.15/qrng/.deps/inline.Plo new file mode 100644 index 000000000..a2f12d26d --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/inline.Plo @@ -0,0 +1,104 @@ +inline.lo: inline.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../build.h ../gsl/gsl_qrng.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../build.h: + +../gsl/gsl_qrng.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/niederreiter-2.Plo b/software/gsl-1.15/qrng/.deps/niederreiter-2.Plo new file mode 100644 index 000000000..bfae747a1 --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/niederreiter-2.Plo @@ -0,0 +1,95 @@ +niederreiter-2.lo: niederreiter-2.c ../config.h ../gsl/gsl_qrng.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +../gsl/gsl_qrng.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/qrng.Plo b/software/gsl-1.15/qrng/.deps/qrng.Plo new file mode 100644 index 000000000..4275735b7 --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/qrng.Plo @@ -0,0 +1,102 @@ +qrng.lo: qrng.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_qrng.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_qrng.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/reversehalton.Plo b/software/gsl-1.15/qrng/.deps/reversehalton.Plo new file mode 100644 index 000000000..703b57ba6 --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/reversehalton.Plo @@ -0,0 +1,95 @@ +reversehalton.lo: reversehalton.c ../config.h ../gsl/gsl_qrng.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +../gsl/gsl_qrng.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/sobol.Plo b/software/gsl-1.15/qrng/.deps/sobol.Plo new file mode 100644 index 000000000..427fdd28e --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/sobol.Plo @@ -0,0 +1,94 @@ +sobol.lo: sobol.c ../config.h ../gsl/gsl_qrng.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +../gsl/gsl_qrng.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/qrng/.deps/test.Po b/software/gsl-1.15/qrng/.deps/test.Po new file mode 100644 index 000000000..8fdd2f86b --- /dev/null +++ b/software/gsl-1.15/qrng/.deps/test.Po @@ -0,0 +1,102 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_qrng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_test.h /usr/include/math.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_qrng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_test.h: + +/usr/include/math.h: diff --git a/software/gsl-1.15/qrng/ChangeLog b/software/gsl-1.15/qrng/ChangeLog new file mode 100644 index 000000000..4d7b82a98 --- /dev/null +++ b/software/gsl-1.15/qrng/ChangeLog @@ -0,0 +1,43 @@ +2009-07-09 Brian Gough + + * qrng.c (gsl_qrng_free): handle NULL argument in free + +2008-07-03 Brian Gough + + * qrng.c: moved gsl_qrng_get to inline.c + + * gsl_qrng.h (gsl_qrng_get): new inline declaration + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-03-17 Brian Gough + + * reversehalton.c (reversehalton_init): removed unused variable i + + * halton.c (halton_init): removed unused variable i + +2006-04-21 Brian Gough + + * qrng.c gsl_qrng.h: use q instead of r in all prototypes + +2004-05-26 Brian Gough + + * test.c: added for exit() + +2002-11-16 Brian Gough + + * niederreiter-2.c (calculate_cj): clear uninitialized memory + +Mon Apr 22 19:20:05 2002 Brian Gough + + * test.c: output results for each individual test + + * qrng.c (gsl_qrng_init): added missing init function + +Mon Oct 23 19:59:46 2000 Brian Gough + + * qrng.c (gsl_qrng_get): use an array type for the array + arguments, rather than a pointer + diff --git a/software/gsl-1.15/qrng/Makefile.am b/software/gsl-1.15/qrng/Makefile.am new file mode 100644 index 000000000..55879fe49 --- /dev/null +++ b/software/gsl-1.15/qrng/Makefile.am @@ -0,0 +1,14 @@ +noinst_LTLIBRARIES = libgslqrng.la + +pkginclude_HEADERS = gsl_qrng.h + +INCLUDES = -I$(top_srcdir) + +libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c inline.c + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test + +test_SOURCES = test.c +test_LDADD = libgslqrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + diff --git a/software/gsl-1.15/qrng/Makefile.in b/software/gsl-1.15/qrng/Makefile.in new file mode 100644 index 000000000..ed8a680e4 --- /dev/null +++ b/software/gsl-1.15/qrng/Makefile.in @@ -0,0 +1,667 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = qrng +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslqrng_la_LIBADD = +am_libgslqrng_la_OBJECTS = qrng.lo niederreiter-2.lo sobol.lo \ + halton.lo reversehalton.lo inline.lo +libgslqrng_la_OBJECTS = $(am_libgslqrng_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslqrng.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslqrng_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslqrng_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslqrng.la +pkginclude_HEADERS = gsl_qrng.h +INCLUDES = -I$(top_srcdir) +libgslqrng_la_SOURCES = gsl_qrng.h qrng.c niederreiter-2.c sobol.c halton.c reversehalton.c inline.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslqrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu qrng/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu qrng/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslqrng.la: $(libgslqrng_la_OBJECTS) $(libgslqrng_la_DEPENDENCIES) + $(LINK) $(libgslqrng_la_OBJECTS) $(libgslqrng_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/halton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niederreiter-2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reversehalton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sobol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/qrng/TODO b/software/gsl-1.15/qrng/TODO new file mode 100644 index 000000000..a62b5cb25 --- /dev/null +++ b/software/gsl-1.15/qrng/TODO @@ -0,0 +1,13 @@ +# -*- org -*- +#+CATEGORY: qrng + +* Sort out "const" in prototypes, it looks odd since there are consts +for many functions which modify the state. (Applies to both qrng and rng) + +* It would be useful to include functions to generate quasi-random + number distributions (at least the Gaussian distribution)? obviously + the Box-Mueller algorithm cannot be used to maintain the low + discrepancy characteristics of the sequence, there are several + methods suggested in the literature but it isn't at all my field so + I'm not sure which is to be preferred. (DENISON Francis + ) diff --git a/software/gsl-1.15/qrng/gsl_qrng.h b/software/gsl-1.15/qrng/gsl_qrng.h new file mode 100644 index 000000000..47de500fb --- /dev/null +++ b/software/gsl-1.15/qrng/gsl_qrng.h @@ -0,0 +1,111 @@ +/* Author: G. Jungman + modifications from O. Teytaud + */ +#ifndef __GSL_QRNG_H__ +#define __GSL_QRNG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Once again, more inane C-style OOP... kill me now. */ + +/* Structure describing a type of generator. + */ +typedef struct +{ + const char * name; + unsigned int max_dimension; + size_t (*state_size) (unsigned int dimension); + int (*init_state) (void * state, unsigned int dimension); + int (*get) (void * state, unsigned int dimension, double x[]); +} +gsl_qrng_type; + +/* Structure describing a generator instance of a + * specified type, with generator-specific state info + * and dimension-specific info. + */ +typedef struct +{ + const gsl_qrng_type * type; + unsigned int dimension; + size_t state_size; + void * state; +} +gsl_qrng; + + +/* Supported generator types. + */ +GSL_VAR const gsl_qrng_type * gsl_qrng_niederreiter_2; +GSL_VAR const gsl_qrng_type * gsl_qrng_sobol; +GSL_VAR const gsl_qrng_type * gsl_qrng_halton; +GSL_VAR const gsl_qrng_type * gsl_qrng_reversehalton; + + +/* Allocate and initialize a generator + * of the specified type, in the given + * space dimension. + */ +gsl_qrng * gsl_qrng_alloc (const gsl_qrng_type * T, unsigned int dimension); + + +/* Copy a generator. */ +int gsl_qrng_memcpy (gsl_qrng * dest, const gsl_qrng * src); + + +/* Clone a generator. */ +gsl_qrng * gsl_qrng_clone (const gsl_qrng * q); + + +/* Free a generator. */ +void gsl_qrng_free (gsl_qrng * q); + + +/* Intialize a generator. */ +void gsl_qrng_init (gsl_qrng * q); + + +/* Get the standardized name of the generator. */ +const char * gsl_qrng_name (const gsl_qrng * q); + + +/* ISN'T THIS CONFUSING FOR PEOPLE? + WHAT IF SOMEBODY TRIES TO COPY WITH THIS ??? + */ +size_t gsl_qrng_size (const gsl_qrng * q); + + +void * gsl_qrng_state (const gsl_qrng * q); + + +/* Retrieve next vector in sequence. */ +INLINE_DECL int gsl_qrng_get (const gsl_qrng * q, double x[]); + +#ifdef HAVE_INLINE +INLINE_FUN int gsl_qrng_get (const gsl_qrng * q, double x[]) +{ + return (q->type->get) (q->state, q->dimension, x); +} + +#endif /* HAVE_INLINE */ + + +__END_DECLS + + +#endif /* !__GSL_QRNG_H__ */ diff --git a/software/gsl-1.15/qrng/halton.c b/software/gsl-1.15/qrng/halton.c new file mode 100644 index 000000000..54e6cc433 --- /dev/null +++ b/software/gsl-1.15/qrng/halton.c @@ -0,0 +1,239 @@ +/* Authors: O. Teytaud + * Copyright (C) 2007 O. Teytaud + * (all comments welcome at olivier.teytaud@inria.fr) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Implementation for Halton generator. See [J.H. Halton, On the + * efficiency of certain quasi-random sequences of points in + * evaluating multi-dimensional integrals Numerische Mathematik, 1960] + */ + +#include +#include + +/* maximum allowed space dimension */ +#define HALTON_MAX_DIMENSION 1229 + +/* prototypes for generator type functions */ +static size_t halton_state_size (unsigned int dimension); +static int halton_init (void *state, unsigned int dimension); +static int halton_get (void *state, unsigned int dimension, double *v); + +/* global Halton generator type object */ +static const gsl_qrng_type halton_type = { + "halton", + HALTON_MAX_DIMENSION, + halton_state_size, + halton_init, + halton_get +}; + +const gsl_qrng_type *gsl_qrng_halton = &halton_type; + +/* prime numbers (thanks to trolltech http://doc.trolltech.com/3.2/primes.html) +*/ +static const int prime_numbers[HALTON_MAX_DIMENSION] = { + 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, + 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, + 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, + 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, + 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, + 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, + 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, + 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, + 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, + 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, + 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, + 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, + 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, + 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, + 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, + 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, + 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, + 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, + 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, + 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, + 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, + 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, + 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, + 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, + 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, + 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, + 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, + 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, + 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, + 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, + 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, + 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, + 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, + 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, + 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, + 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, + 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, + 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, + 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, + 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, + 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, + 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, + 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, + 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, + 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, + 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, + 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, + 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, + 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, + 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, + 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, + 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, + 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, + 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, + 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, + 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, + 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, + 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, + 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, + 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, + 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, + 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, + 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, + 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, + 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, + 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, + 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, + 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, + 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, + 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, + 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, + 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, + 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, + 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, + 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, + 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, + 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, + 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, + 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, + 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, + 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, + 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, + 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, + 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, + 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, + 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, + 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, + 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, + 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, + 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, + 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, + 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, + 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, + 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, + 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, + 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, + 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, + 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, + 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, + 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, + 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, + 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, + 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, + 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, + 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, + 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, + 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, + 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, + 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, + 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, + 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, + 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, + 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, + 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, + 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, + 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, + 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, + 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, + 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, + 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, + 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, + 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, + 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973 +}; + +/* Halton generator state. + * sequence_count = number of calls with this generator + */ +typedef struct +{ + unsigned int sequence_count; +} +halton_state_t; + +static size_t +halton_state_size (unsigned int dimension) +{ + return sizeof (halton_state_t); +} + +static int +halton_init (void *state, unsigned int dimension) +{ + halton_state_t *h_state = (halton_state_t *) state; + + h_state->sequence_count = 0; + + if (dimension < 1 || dimension > HALTON_MAX_DIMENSION) + { + return GSL_EINVAL; + } + + return GSL_SUCCESS; +} + +static double +vdcorput (int x, int b) +{ + double r = 0.; + double v = 1.; + double binv = 1. / (double) b; + + while (x > 0) + { + v *= binv; + r += v * (double) (x % b); + x /= b; + } + return r; +} + +static int +halton_get (void *state, unsigned int dimension, double *v) +{ + halton_state_t *h_state = (halton_state_t *) state; + unsigned int i; + + if (dimension < 1 || dimension > HALTON_MAX_DIMENSION) + { + return GSL_EINVAL; + } + h_state->sequence_count++; + + for (i = 0; i < dimension; i++) + { + v[i] = vdcorput (h_state->sequence_count, prime_numbers[i]); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/qrng/inline.c b/software/gsl-1.15/qrng/inline.c new file mode 100644 index 000000000..5b9c8b560 --- /dev/null +++ b/software/gsl-1.15/qrng/inline.c @@ -0,0 +1,13 @@ +/* Author: G. Jungman + */ +#include +#include +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + diff --git a/software/gsl-1.15/qrng/niederreiter-2.c b/software/gsl-1.15/qrng/niederreiter-2.c new file mode 100644 index 000000000..1a28009f1 --- /dev/null +++ b/software/gsl-1.15/qrng/niederreiter-2.c @@ -0,0 +1,353 @@ +/* Author: G. Jungman + */ +/* Implement Niederreiter base 2 generator. + * See: + * Bratley, Fox, Niederreiter, ACM Trans. Model. Comp. Sim. 2, 195 (1992) + */ +#include +#include + + +#define NIED2_CHARACTERISTIC 2 +#define NIED2_BASE 2 + +#define NIED2_MAX_DIMENSION 12 +#define NIED2_MAX_PRIM_DEGREE 5 +#define NIED2_MAX_DEGREE 50 + +#define NIED2_BIT_COUNT 30 +#define NIED2_NBITS (NIED2_BIT_COUNT+1) + +#define MAXV (NIED2_NBITS + NIED2_MAX_DEGREE) + +/* Z_2 field operations */ +#define NIED2_ADD(x,y) (((x)+(y))%2) +#define NIED2_MUL(x,y) (((x)*(y))%2) +#define NIED2_SUB(x,y) NIED2_ADD((x),(y)) + + +static size_t nied2_state_size(unsigned int dimension); +static int nied2_init(void * state, unsigned int dimension); +static int nied2_get(void * state, unsigned int dimension, double * v); + + +static const gsl_qrng_type nied2_type = +{ + "niederreiter-base-2", + NIED2_MAX_DIMENSION, + nied2_state_size, + nied2_init, + nied2_get +}; + +const gsl_qrng_type * gsl_qrng_niederreiter_2 = &nied2_type; + +/* primitive polynomials in binary encoding */ +static const int primitive_poly[NIED2_MAX_DIMENSION+1][NIED2_MAX_PRIM_DEGREE+1] = +{ + { 1, 0, 0, 0, 0, 0 }, /* 1 */ + { 0, 1, 0, 0, 0, 0 }, /* x */ + { 1, 1, 0, 0, 0, 0 }, /* 1 + x */ + { 1, 1, 1, 0, 0, 0 }, /* 1 + x + x^2 */ + { 1, 1, 0, 1, 0, 0 }, /* 1 + x + x^3 */ + { 1, 0, 1, 1, 0, 0 }, /* 1 + x^2 + x^3 */ + { 1, 1, 0, 0, 1, 0 }, /* 1 + x + x^4 */ + { 1, 0, 0, 1, 1, 0 }, /* 1 + x^3 + x^4 */ + { 1, 1, 1, 1, 1, 0 }, /* 1 + x + x^2 + x^3 + x^4 */ + { 1, 0, 1, 0, 0, 1 }, /* 1 + x^2 + x^5 */ + { 1, 0, 0, 1, 0, 1 }, /* 1 + x^3 + x^5 */ + { 1, 1, 1, 1, 0, 1 }, /* 1 + x + x^2 + x^3 + x^5 */ + { 1, 1, 1, 0, 1, 1 } /* 1 + x + x^2 + x^4 + x^5 */ +}; + +/* degrees of primitive polynomials */ +static const int poly_degree[NIED2_MAX_DIMENSION+1] = +{ + 0, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5 +}; + + +typedef struct +{ + unsigned int sequence_count; + int cj[NIED2_NBITS][NIED2_MAX_DIMENSION]; + int nextq[NIED2_MAX_DIMENSION]; +} nied2_state_t; + + +static size_t nied2_state_size(unsigned int dimension) +{ + return sizeof(nied2_state_t); +} + + +/* Multiply polynomials over Z_2. + * Notice use of a temporary vector, + * side-stepping aliasing issues when + * one of inputs is the same as the output + * [especially important in the original fortran version, I guess]. + */ +static void poly_multiply( + const int pa[], int pa_degree, + const int pb[], int pb_degree, + int pc[], int * pc_degree + ) +{ + int j, k; + int pt[NIED2_MAX_DEGREE+1]; + int pt_degree = pa_degree + pb_degree; + + for(k=0; k<=pt_degree; k++) { + int term = 0; + for(j=0; j<=k; j++) { + const int conv_term = NIED2_MUL(pa[k-j], pb[j]); + term = NIED2_ADD(term, conv_term); + } + pt[k] = term; + } + + for(k=0; k<=pt_degree; k++) { + pc[k] = pt[k]; + } + for(k=pt_degree+1; k<=NIED2_MAX_DEGREE; k++) { + pc[k] = 0; + } + + *pc_degree = pt_degree; +} + + +/* Calculate the values of the constants V(J,R) as + * described in BFN section 3.3. + * + * px = appropriate irreducible polynomial for current dimension + * pb = polynomial defined in section 2.3 of BFN. + * pb is modified + */ +static void calculate_v( + const int px[], int px_degree, + int pb[], int * pb_degree, + int v[], int maxv + ) +{ + const int nonzero_element = 1; /* nonzero element of Z_2 */ + const int arbitrary_element = 1; /* arbitray element of Z_2 */ + + /* The polynomial ph is px**(J-1), which is the value of B on arrival. + * In section 3.3, the values of Hi are defined with a minus sign: + * don't forget this if you use them later ! + */ + int ph[NIED2_MAX_DEGREE+1]; + /* int ph_degree = *pb_degree; */ + int bigm = *pb_degree; /* m from section 3.3 */ + int m; /* m from section 2.3 */ + int r, k, kj; + + for(k=0; k<=NIED2_MAX_DEGREE; k++) { + ph[k] = pb[k]; + } + + /* Now multiply B by PX so B becomes PX**J. + * In section 2.3, the values of Bi are defined with a minus sign : + * don't forget this if you use them later ! + */ + poly_multiply(px, px_degree, pb, *pb_degree, pb, pb_degree); + m = *pb_degree; + + /* Now choose a value of Kj as defined in section 3.3. + * We must have 0 <= Kj < E*J = M. + * The limit condition on Kj does not seem very relevant + * in this program. + */ + /* Quoting from BFN: "Our program currently sets each K_q + * equal to eq. This has the effect of setting all unrestricted + * values of v to 1." + * Actually, it sets them to the arbitrary chosen value. + * Whatever. + */ + kj = bigm; + + /* Now choose values of V in accordance with + * the conditions in section 3.3. + */ + for(r=0; r= bigm) { + for(r=kj+1; rcj[r][i_dim] = term; + } + + } +} + + +static int nied2_init(void * state, unsigned int dimension) +{ + nied2_state_t * n_state = (nied2_state_t *) state; + unsigned int i_dim; + + if(dimension < 1 || dimension > NIED2_MAX_DIMENSION) return GSL_EINVAL; + + calculate_cj(n_state, dimension); + + for(i_dim=0; i_dimnextq[i_dim] = 0; + n_state->sequence_count = 0; + + return GSL_SUCCESS; +} + + +static int nied2_get(void * state, unsigned int dimension, double * v) +{ + static const double recip = 1.0/(double)(1U << NIED2_NBITS); /* 2^(-nbits) */ + nied2_state_t * n_state = (nied2_state_t *) state; + int r; + int c; + unsigned int i_dim; + + /* Load the result from the saved state. */ + for(i_dim=0; i_dimnextq[i_dim] * recip; + } + + /* Find the position of the least-significant zero in sequence_count. + * This is the bit that changes in the Gray-code representation as + * the count is advanced. + */ + r = 0; + c = n_state->sequence_count; + while(1) { + if((c % 2) == 1) { + ++r; + c /= 2; + } + else break; + } + + if(r >= NIED2_NBITS) return GSL_EFAILED; /* FIXME: better error code here */ + + /* Calculate the next state. */ + for(i_dim=0; i_dimnextq[i_dim] ^= n_state->cj[r][i_dim]; + } + + n_state->sequence_count++; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/qrng/qrng.c b/software/gsl-1.15/qrng/qrng.c new file mode 100644 index 000000000..1f7bdf301 --- /dev/null +++ b/software/gsl-1.15/qrng/qrng.c @@ -0,0 +1,118 @@ +/* Author: G. Jungman + */ +#include +#include +#include +#include +#include + + +gsl_qrng * +gsl_qrng_alloc (const gsl_qrng_type * T, unsigned int dimension) +{ + + gsl_qrng * q = (gsl_qrng *) malloc (sizeof (gsl_qrng)); + + if (q == 0) + { + GSL_ERROR_VAL ("allocation failed for qrng struct", + GSL_ENOMEM, 0); + }; + + q->dimension = dimension; + q->state_size = T->state_size(dimension); + q->state = malloc (q->state_size); + + if (q->state == 0) + { + free (q); + GSL_ERROR_VAL ("allocation failed for qrng state", + GSL_ENOMEM, 0); + }; + + q->type = T; + + T->init_state(q->state, q->dimension); + + return q; +} + +void +gsl_qrng_init (gsl_qrng * q) +{ + (q->type->init_state) (q->state, q->dimension); +} + +int +gsl_qrng_memcpy (gsl_qrng * dest, const gsl_qrng * src) +{ + if (dest->type != src->type) + { + GSL_ERROR ("generators must be of the same type", GSL_EINVAL); + } + + dest->dimension = src->dimension; + dest->state_size = src->state_size; + memcpy (dest->state, src->state, src->state_size); + + return GSL_SUCCESS; +} + + +gsl_qrng * +gsl_qrng_clone (const gsl_qrng * q) +{ + gsl_qrng * r = (gsl_qrng *) malloc (sizeof (gsl_qrng)); + + if (r == 0) + { + GSL_ERROR_VAL ("failed to allocate space for rng struct", + GSL_ENOMEM, 0); + }; + + r->dimension = q->dimension; + r->state_size = q->state_size; + r->state = malloc (r->state_size); + + if (r->state == 0) + { + free (r); + GSL_ERROR_VAL ("failed to allocate space for rng state", + GSL_ENOMEM, 0); + }; + + r->type = q->type; + + memcpy (r->state, q->state, q->state_size); + + return r; +} + +const char * +gsl_qrng_name (const gsl_qrng * q) +{ + return q->type->name; +} + + +size_t +gsl_qrng_size (const gsl_qrng * q) +{ + return q->state_size; +} + + +void * +gsl_qrng_state (const gsl_qrng * q) +{ + return q->state; +} + + +void +gsl_qrng_free (gsl_qrng * q) +{ + RETURN_IF_NULL (q); + if(q->state != 0) free (q->state); + free (q); +} diff --git a/software/gsl-1.15/qrng/reversehalton.c b/software/gsl-1.15/qrng/reversehalton.c new file mode 100644 index 000000000..1a566bbd2 --- /dev/null +++ b/software/gsl-1.15/qrng/reversehalton.c @@ -0,0 +1,241 @@ +/* Authors: O. Teytaud + * Copyright (C) 2007 O. Teytaud + * (all comments/suggestions welcome at olivier.teytaud@inria.fr) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Implementation for Halton generator, modified according to the + * following improvement (reverse scrambling): [ B. Vandewoestyne and + * R. Cools, Good permutations for deterministic scrambled Halton + * sequences in terms of L2-discrepancy, Computational and Applied + * Mathematics 189, 2006] + */ + +#include +#include + +/* maximum allowed space dimension */ +#define REVERSEHALTON_MAX_DIMENSION 1229 + +/* prototypes for generator type functions */ +static size_t reversehalton_state_size (unsigned int dimension); +static int reversehalton_init (void *state, unsigned int dimension); +static int reversehalton_get (void *state, unsigned int dimension, double *v); + +/* global Halton generator type object */ +static const gsl_qrng_type reversehalton_type = { + "reversehalton", + REVERSEHALTON_MAX_DIMENSION, + reversehalton_state_size, + reversehalton_init, + reversehalton_get +}; +const gsl_qrng_type *gsl_qrng_reversehalton = &reversehalton_type; + +/* prime numbers (thanks to trolltech http://doc.trolltech.com/3.2/primes.html) + */ + +static const int prime_numbers[REVERSEHALTON_MAX_DIMENSION] = { + 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, + 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, + 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, + 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, + 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, + 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, + 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, + 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, + 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, + 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, + 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, + 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, + 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, + 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, + 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, + 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, + 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, + 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, + 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, + 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, + 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, + 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, + 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, + 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, + 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, + 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, + 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, + 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, + 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, + 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, + 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, + 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, + 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, + 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, + 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, + 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, + 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, + 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, + 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, + 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, + 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, + 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, + 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, + 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, + 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, + 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, + 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, + 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, + 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, + 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, + 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, + 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, + 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, + 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, + 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, + 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, + 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, + 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, + 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, + 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, + 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, + 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, + 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, + 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, + 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, + 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, + 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, + 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, + 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, + 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, + 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, + 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, + 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, + 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, + 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, + 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, + 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, + 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, + 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, + 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, + 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, + 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, + 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, + 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, + 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, + 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, + 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, + 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, + 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, + 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, + 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, + 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, + 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, + 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, + 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, + 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, + 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, + 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, + 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, + 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, + 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, + 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, + 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, + 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, + 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, + 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, + 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, + 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, + 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, + 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, + 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, + 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, + 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, + 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, + 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, + 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, + 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, + 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, + 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, + 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, + 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, + 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, + 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973 +}; + +/* Halton generator state. + * sequence_count = number of calls with this generator + */ +typedef struct +{ + unsigned int sequence_count; +} +reversehalton_state_t; + +static size_t +reversehalton_state_size (unsigned int dimension) +{ + return sizeof (reversehalton_state_t); +} + +static int +reversehalton_init (void *state, unsigned int dimension) +{ + reversehalton_state_t *h_state = (reversehalton_state_t *) state; + + h_state->sequence_count = 0; + + if (dimension < 1 || dimension > REVERSEHALTON_MAX_DIMENSION) + { + return GSL_EINVAL; + } + + return GSL_SUCCESS; +} + +static double +vdcorput (int x, int b) +{ + double r = 0.; + double v = 1.; + double binv = 1. / (double) b; + + while (x > 0) + { + v *= binv; + r += v * (double) ((x % b == 0) ? 0 : b - (x % b)); + x /= b; + } + return r; +} + +static int +reversehalton_get (void *state, unsigned int dimension, double *v) +{ + reversehalton_state_t *h_state = (reversehalton_state_t *) state; + unsigned int i; + + if (dimension < 1 || dimension > REVERSEHALTON_MAX_DIMENSION) + { + return GSL_EINVAL; + } + h_state->sequence_count++; + + for (i = 0; i < dimension; i++) + { + v[i] = vdcorput (h_state->sequence_count, prime_numbers[i]); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/qrng/sobol.c b/software/gsl-1.15/qrng/sobol.c new file mode 100644 index 000000000..51c9baaec --- /dev/null +++ b/software/gsl-1.15/qrng/sobol.c @@ -0,0 +1,231 @@ +/* Author: G. Jungman + */ +/* Implementation for Sobol generator. + * See + * [Bratley+Fox, TOMS 14, 88 (1988)] + * [Antonov+Saleev, USSR Comput. Maths. Math. Phys. 19, 252 (1980)] + */ +#include +#include + + +/* maximum allowed space dimension */ +#define SOBOL_MAX_DIMENSION 40 + +/* bit count; assumes sizeof(int) >= 32-bit */ +#define SOBOL_BIT_COUNT 30 + +/* prototypes for generator type functions */ +static size_t sobol_state_size(unsigned int dimension); +static int sobol_init(void * state, unsigned int dimension); +static int sobol_get(void * state, unsigned int dimension, double * v); + +/* global Sobol generator type object */ +static const gsl_qrng_type sobol_type = +{ + "sobol", + SOBOL_MAX_DIMENSION, + sobol_state_size, + sobol_init, + sobol_get +}; +const gsl_qrng_type * gsl_qrng_sobol = &sobol_type; + + +/* primitive polynomials in binary encoding + */ +static const int primitive_polynomials[SOBOL_MAX_DIMENSION] = +{ + 1, 3, 7, 11, 13, 19, 25, 37, 59, 47, + 61, 55, 41, 67, 97, 91, 109, 103, 115, 131, + 193, 137, 145, 143, 241, 157, 185, 167, 229, 171, + 213, 191, 253, 203, 211, 239, 247, 285, 369, 299 +}; + +/* degrees of the primitive polynomials */ +static const int degree_table[SOBOL_MAX_DIMENSION] = +{ + 0, 1, 2, 3, 3, 4, 4, 5, 5, 5, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 8, 8, 8 +}; + + +/* initial values for direction tables, following + * Bratley+Fox, taken from [Sobol+Levitan, preprint 1976] + */ +static const int v_init[8][SOBOL_MAX_DIMENSION] = +{ + { + 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1 + }, + { + 0, 0, 1, 3, 1, 3, 1, 3, 3, 1, + 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, + 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, + 3, 1, 1, 3, 1, 3, 1, 3, 1, 3 + }, + { + 0, 0, 0, 7, 5, 1, 3, 3, 7, 5, + 5, 7, 7, 1, 3, 3, 7, 5, 1, 1, + 5, 3, 3, 1, 7, 5, 1, 3, 3, 7, + 5, 1, 1, 5, 7, 7, 5, 1, 3, 3 + }, + { + 0, 0, 0, 0, 0, 1, 7, 9, 13, 11, + 1, 3, 7, 9, 5, 13, 13, 11, 3, 15, + 5, 3, 15, 7, 9, 13, 9, 1, 11, 7, + 5, 15, 1, 15, 11, 5, 3, 1, 7, 9 + }, + { + 0, 0, 0, 0, 0, 0, 0, 9, 3, 27, + 15, 29, 21, 23, 19, 11, 25, 7, 13, 17, + 1, 25, 29, 3, 31, 11, 5, 23, 27, 19, + 21, 5, 1, 17, 13, 7, 15, 9, 31, 9 + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 33, 7, 5, 11, 39, 63, + 27, 17, 15, 23, 29, 3, 21, 13, 31, 25, + 9, 49, 33, 19, 29, 11, 19, 27, 15, 25 + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, + 33, 115, 41, 79, 17, 29, 119, 75, 73, 105, + 7, 59, 65, 21, 3, 113, 61, 89, 45, 107 + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 7, 23, 39 + } +}; + + +/* Sobol generator state. + * sequence_count = number of calls with this generator + * last_numerator_vec = last generated numerator vector + * last_denominator_inv = 1/denominator for last numerator vector + * v_direction = direction number table + */ +typedef struct +{ + unsigned int sequence_count; + double last_denominator_inv; + int last_numerator_vec[SOBOL_MAX_DIMENSION]; + int v_direction[SOBOL_BIT_COUNT][SOBOL_MAX_DIMENSION]; +} sobol_state_t; + +/* NOTE: I fixed the size for the preliminary implementation. + This could/should be relaxed, as an optimization. + */ + +static size_t sobol_state_size(unsigned int dimension) +{ + return sizeof(sobol_state_t); +} + + +static int sobol_init(void * state, unsigned int dimension) +{ + sobol_state_t * s_state = (sobol_state_t *) state; + unsigned int i_dim; + int j, k; + int ell; + + if(dimension < 1 || dimension > SOBOL_MAX_DIMENSION) { + return GSL_EINVAL; + } + + /* Initialize direction table in dimension 0. */ + for(k=0; kv_direction[k][0] = 1; + + /* Initialize in remaining dimensions. */ + for(i_dim=1; i_dim= 0; k--) { + includ[k] = ((p_i % 2) == 1); + p_i /= 2; + } + + /* Leading elements for dimension i come from v_init[][]. */ + for(j=0; jv_direction[j][i_dim] = v_init[j][i_dim]; + + /* Calculate remaining elements for this dimension, + * as explained in Bratley+Fox, section 2. + */ + for(j=degree_i; jv_direction[j-degree_i][i_dim]; + ell = 1; + for(k=0; kv_direction[j-k-1][i_dim]); + } + s_state->v_direction[j][i_dim] = newv; + } + } + + /* Multiply columns of v by appropriate power of 2. */ + ell = 1; + for(j=SOBOL_BIT_COUNT-1-1; j>=0; j--) { + ell *= 2; + for(i_dim=0; i_dimv_direction[j][i_dim] *= ell; + } + } + + /* 1/(common denominator of the elements in v_direction) */ + s_state->last_denominator_inv = 1.0 /(2.0 * ell); + + /* final setup */ + s_state->sequence_count = 0; + for(i_dim=0; i_dimlast_numerator_vec[i_dim] = 0; + + return GSL_SUCCESS; +} + + +static int sobol_get(void * state, unsigned int dimension, double * v) +{ + sobol_state_t * s_state = (sobol_state_t *) state; + + unsigned int i_dimension; + + /* Find the position of the least-significant zero in count. */ + int ell = 0; + int c = s_state->sequence_count; + while(1) { + ++ell; + if((c % 2) == 1) c /= 2; + else break; + } + + /* Check for exhaustion. */ + if(ell > SOBOL_BIT_COUNT) return GSL_EFAILED; /* FIXME: good return code here */ + + for(i_dimension=0; i_dimensionv_direction[ell-1][i_dimension]; + const int old_numerator_i = s_state->last_numerator_vec[i_dimension]; + const int new_numerator_i = old_numerator_i ^ direction_i; + s_state->last_numerator_vec[i_dimension] = new_numerator_i; + v[i_dimension] = new_numerator_i * s_state->last_denominator_inv; + } + + s_state->sequence_count++; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/qrng/test.c b/software/gsl-1.15/qrng/test.c new file mode 100644 index 000000000..c5ab7cde1 --- /dev/null +++ b/software/gsl-1.15/qrng/test.c @@ -0,0 +1,247 @@ +/* Author: G. Jungman (+modifications from O. Teytaud olivier.teytaud@inria.fr) + */ +#include +#include +#include + +#include +#include +#include + +void test_sobol(void) +{ + int status = 0; + double v[3]; + /* int i; */ + + /* test in dimension 2 */ + gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_sobol, 2); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.375 || v[1] != 0.375 ); + gsl_qrng_free(g); + + gsl_test (status, "Sobol d=2"); + + status = 0; + /* test in dimension 3 */ + g = gsl_qrng_alloc(gsl_qrng_sobol, 3); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.25 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.375 || v[1] != 0.375 || v[2] != 0.625 ); + + gsl_test (status, "Sobol d=3"); + + status = 0; + gsl_qrng_init(g); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.25 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.375 || v[1] != 0.375 || v[2] != 0.625 ); + gsl_qrng_free(g); + + gsl_test (status, "Sobol d=3 (reinitialized)"); +} + +void test_halton(void) +{ + int status = 0; + double v[1229]; + unsigned int i; + + /* test in dimension 1229 */ + + gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_halton, 1229); + for (i=0;i<30;i++) + gsl_qrng_get(g, v); + gsl_qrng_free(g); + + gsl_test (status, "Halton d=1229"); + status = 0; + + /* test in dimension 2 */ + /*should be + * 0.5 0.333333 + * 0.25 0.666667 + * 0.75 0.111111 + * 0.125 0.444444*/ + g = gsl_qrng_alloc(gsl_qrng_halton, 2); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 3.0/4.0, 1e-3, "halton(2) k=2 v[0]"); + gsl_test_rel (v[1], 1.0/9.0, 1e-3, "halton(2) k=2 v[1]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 1.0/8.0, 1e-3, "halton(2) k=3 v[0]"); + gsl_test_rel (v[1], 4.0/9.0, 1e-3, "halton(2) k=3 v[1]"); + + gsl_qrng_free(g); + + /* test in dimension 3 */ + g = gsl_qrng_alloc(gsl_qrng_halton, 3); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.75, 1e-3, "halton(3) k=3 v[0]"); + gsl_test_rel (v[1], 1.0/9.0, 1e-3, "halton(3) k=3 v[1]"); + gsl_test_rel (v[2], 0.6, 1e-3, "halton(3) k=3 v[2]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.125, 1e-3, "halton(3) k=4 v[0]"); + gsl_test_rel (v[1], 4.0/9.0, 1e-3, "halton(3) k=4 v[1]"); + gsl_test_rel (v[2], 0.8, 1e-3, "halton(3) k=4 v[2]"); + + gsl_qrng_init(g); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.75, 1e-3, "halton(3) reinitialized k=3 v[0]"); + gsl_test_rel (v[1], 1.0/9.0, 1e-3, "halton(3) reinitialized k=3 v[1]"); + gsl_test_rel (v[2], 0.6, 1e-3, "halton(3) reinitialized k=3 v[2]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.125, 1e-3, "halton(3) reinitialized k=4 v[0]"); + gsl_test_rel (v[1], 4.0/9.0, 1e-3, "halton(3) reinitialized k=4 v[1]"); + gsl_test_rel (v[2], 0.8, 1e-3, "halton(3) reinitialized k=4 v[2]"); + + gsl_qrng_free(g); +} + +void test_reversehalton(void) +{ + int status = 0; + double v[3]; + + /* test in dimension 2 */ + gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_reversehalton, 2); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + /* should be + * 0.5 0.666667 + * 0.25 0.333333 + * 0.75 0.222222 + * 0.125 0.888889*/ + + gsl_test_rel (v[0], 3.0/4.0, 1e-3, "reversehalton(2) k=2 v[0]"); + gsl_test_rel (v[1], 2.0/9.0, 1e-3, "reversehalton(2) k=2 v[1]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 1.0/8.0, 1e-3, "reversehalton(2) k=2 v[0]"); + gsl_test_rel (v[1], 8.0/9.0, 1e-3, "reversehalton(2) k=2 v[1]"); + + gsl_qrng_free(g); + + + /* test in dimension 3 */ + g = gsl_qrng_alloc(gsl_qrng_reversehalton, 3); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.75, 1e-3, "reversehalton(3) k=3 v[0]"); + gsl_test_rel (v[1], 2.0/9.0, 1e-3, "reversehalton(3) k=3 v[1]"); + gsl_test_rel (v[2], 0.4, 1e-3, "reversehalton(3) k=3 v[2]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.125, 1e-3, "reversehalton(3) k=3 v[0]"); + gsl_test_rel (v[1], 8.0/9.0, 1e-3, "reversehalton(3) k=3 v[1]"); + gsl_test_rel (v[2], 0.2, 1e-3, "reversehalton(3) k=3 v[2]"); + + status = 0; + gsl_qrng_init(g); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.75, 1e-3, "reversehalton(3) reinitialized k=3 v[0]"); + gsl_test_rel (v[1], 2.0/9.0, 1e-3, "reversehalton(3) reinitialized k=3 v[1]"); + gsl_test_rel (v[2], 0.4, 1e-3, "reversehalton(3) reinitialized k=3 v[2]"); + + gsl_qrng_get(g, v); + gsl_test_rel (v[0], 0.125, 1e-3, "reversehalton(3) reinitialized k=3 v[0]"); + gsl_test_rel (v[1], 8.0/9.0, 1e-3, "reversehalton(3) reinitialized k=3 v[1]"); + gsl_test_rel (v[2], 0.2, 1e-3, "reversehalton(3) reinitialized k=3 v[2]"); + + gsl_qrng_free(g); +} + + +void test_nied2(void) +{ + int status = 0; + double v[3]; + /* int i; */ + + /* test in dimension 2 */ + gsl_qrng * g = gsl_qrng_alloc(gsl_qrng_niederreiter_2, 2); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.75 || v[1] != 0.25 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 ); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.625 || v[1] != 0.125 ); + gsl_qrng_free(g); + + gsl_test (status, "Niederreiter d=2"); + + status = 0; + + /* test in dimension 3 */ + g = gsl_qrng_alloc(gsl_qrng_niederreiter_2, 3); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.75 || v[1] != 0.25 || v[2] != 0.3125 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.5625 ); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.625 || v[1] != 0.125 || v[2] != 0.6875 ); + + gsl_test (status, "Niederreiter d=3"); + + status = 0; + + gsl_qrng_init(g); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.75 || v[1] != 0.25 || v[2] != 0.3125 ); + gsl_qrng_get(g, v); + status += ( v[0] != 0.25 || v[1] != 0.75 || v[2] != 0.5625 ); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + gsl_qrng_get(g, v); + status += ( v[0] != 0.625 || v[1] != 0.125 || v[2] != 0.6875 ); + gsl_qrng_free(g); + + + gsl_test (status, "Niederreiter d=3 (reinitialized)"); +} + + +int main() +{ + + gsl_ieee_env_setup (); + + test_sobol(); + test_halton(); + test_reversehalton(); + test_nied2(); + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/randist/.deps/bernoulli.Plo b/software/gsl-1.15/randist/.deps/bernoulli.Plo new file mode 100644 index 000000000..430c72b7c --- /dev/null +++ b/software/gsl-1.15/randist/.deps/bernoulli.Plo @@ -0,0 +1,99 @@ +bernoulli.lo: bernoulli.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/beta.Plo b/software/gsl-1.15/randist/.deps/beta.Plo new file mode 100644 index 000000000..5ae0af564 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/beta.Plo @@ -0,0 +1,138 @@ +beta.lo: beta.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/bigauss.Plo b/software/gsl-1.15/randist/.deps/bigauss.Plo new file mode 100644 index 000000000..1bcfd6e45 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/bigauss.Plo @@ -0,0 +1,133 @@ +bigauss.lo: bigauss.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/binomial.Plo b/software/gsl-1.15/randist/.deps/binomial.Plo new file mode 100644 index 000000000..73a015d7d --- /dev/null +++ b/software/gsl-1.15/randist/.deps/binomial.Plo @@ -0,0 +1,105 @@ +binomial.lo: binomial.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/binomial_tpe.Plo b/software/gsl-1.15/randist/.deps/binomial_tpe.Plo new file mode 100644 index 000000000..c1b172b19 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/binomial_tpe.Plo @@ -0,0 +1,106 @@ +binomial_tpe.lo: binomial_tpe.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h ../gsl/gsl_pow_int.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/cauchy.Plo b/software/gsl-1.15/randist/.deps/cauchy.Plo new file mode 100644 index 000000000..66dc78ecb --- /dev/null +++ b/software/gsl-1.15/randist/.deps/cauchy.Plo @@ -0,0 +1,133 @@ +cauchy.lo: cauchy.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/chisq.Plo b/software/gsl-1.15/randist/.deps/chisq.Plo new file mode 100644 index 000000000..331283f8f --- /dev/null +++ b/software/gsl-1.15/randist/.deps/chisq.Plo @@ -0,0 +1,104 @@ +chisq.lo: chisq.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/dirichlet.Plo b/software/gsl-1.15/randist/.deps/dirichlet.Plo new file mode 100644 index 000000000..aca701936 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/dirichlet.Plo @@ -0,0 +1,138 @@ +dirichlet.lo: dirichlet.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/discrete.Plo b/software/gsl-1.15/randist/.deps/discrete.Plo new file mode 100644 index 000000000..bfdadc704 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/discrete.Plo @@ -0,0 +1,99 @@ +discrete.lo: discrete.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_rng.h \ + ../gsl/gsl_inline.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/erlang.Plo b/software/gsl-1.15/randist/.deps/erlang.Plo new file mode 100644 index 000000000..0d80cdad8 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/erlang.Plo @@ -0,0 +1,104 @@ +erlang.lo: erlang.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/exponential.Plo b/software/gsl-1.15/randist/.deps/exponential.Plo new file mode 100644 index 000000000..ad58b3d40 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/exponential.Plo @@ -0,0 +1,133 @@ +exponential.lo: exponential.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/exppow.Plo b/software/gsl-1.15/randist/.deps/exppow.Plo new file mode 100644 index 000000000..94d924e19 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/exppow.Plo @@ -0,0 +1,138 @@ +exppow.lo: exppow.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_rng.h /usr/include/stdlib.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/fdist.Plo b/software/gsl-1.15/randist/.deps/fdist.Plo new file mode 100644 index 000000000..450f2fe32 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/fdist.Plo @@ -0,0 +1,104 @@ +fdist.lo: fdist.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/flat.Plo b/software/gsl-1.15/randist/.deps/flat.Plo new file mode 100644 index 000000000..2106c45f9 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/flat.Plo @@ -0,0 +1,99 @@ +flat.lo: flat.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/gamma.Plo b/software/gsl-1.15/randist/.deps/gamma.Plo new file mode 100644 index 000000000..86c0136e4 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/gamma.Plo @@ -0,0 +1,138 @@ +gamma.lo: gamma.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_rng.h /usr/include/stdlib.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/gauss.Plo b/software/gsl-1.15/randist/.deps/gauss.Plo new file mode 100644 index 000000000..b246a97da --- /dev/null +++ b/software/gsl-1.15/randist/.deps/gauss.Plo @@ -0,0 +1,133 @@ +gauss.lo: gauss.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/gausstail.Plo b/software/gsl-1.15/randist/.deps/gausstail.Plo new file mode 100644 index 000000000..5f4fe7c23 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/gausstail.Plo @@ -0,0 +1,138 @@ +gausstail.lo: gausstail.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h ../gsl/gsl_sf_erf.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/gausszig.Plo b/software/gsl-1.15/randist/.deps/gausszig.Plo new file mode 100644 index 000000000..eb1298258 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/gausszig.Plo @@ -0,0 +1,133 @@ +gausszig.lo: gausszig.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/geometric.Plo b/software/gsl-1.15/randist/.deps/geometric.Plo new file mode 100644 index 000000000..506b9d5af --- /dev/null +++ b/software/gsl-1.15/randist/.deps/geometric.Plo @@ -0,0 +1,99 @@ +geometric.lo: geometric.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/gumbel.Plo b/software/gsl-1.15/randist/.deps/gumbel.Plo new file mode 100644 index 000000000..c9babf3d9 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/gumbel.Plo @@ -0,0 +1,99 @@ +gumbel.lo: gumbel.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/hyperg.Plo b/software/gsl-1.15/randist/.deps/hyperg.Plo new file mode 100644 index 000000000..305e44fca --- /dev/null +++ b/software/gsl-1.15/randist/.deps/hyperg.Plo @@ -0,0 +1,103 @@ +hyperg.lo: hyperg.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/landau.Plo b/software/gsl-1.15/randist/.deps/landau.Plo new file mode 100644 index 000000000..5554bdfa1 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/landau.Plo @@ -0,0 +1,99 @@ +landau.lo: landau.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/laplace.Plo b/software/gsl-1.15/randist/.deps/laplace.Plo new file mode 100644 index 000000000..51ac26026 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/laplace.Plo @@ -0,0 +1,99 @@ +laplace.lo: laplace.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/levy.Plo b/software/gsl-1.15/randist/.deps/levy.Plo new file mode 100644 index 000000000..45ba76e30 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/levy.Plo @@ -0,0 +1,133 @@ +levy.lo: levy.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/logarithmic.Plo b/software/gsl-1.15/randist/.deps/logarithmic.Plo new file mode 100644 index 000000000..3edd2835e --- /dev/null +++ b/software/gsl-1.15/randist/.deps/logarithmic.Plo @@ -0,0 +1,99 @@ +logarithmic.lo: logarithmic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/logistic.Plo b/software/gsl-1.15/randist/.deps/logistic.Plo new file mode 100644 index 000000000..358e3475c --- /dev/null +++ b/software/gsl-1.15/randist/.deps/logistic.Plo @@ -0,0 +1,99 @@ +logistic.lo: logistic.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/lognormal.Plo b/software/gsl-1.15/randist/.deps/lognormal.Plo new file mode 100644 index 000000000..84be69868 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/lognormal.Plo @@ -0,0 +1,133 @@ +lognormal.lo: lognormal.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/multinomial.Plo b/software/gsl-1.15/randist/.deps/multinomial.Plo new file mode 100644 index 000000000..a8bf84282 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/multinomial.Plo @@ -0,0 +1,103 @@ +multinomial.lo: multinomial.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/nbinomial.Plo b/software/gsl-1.15/randist/.deps/nbinomial.Plo new file mode 100644 index 000000000..28c39fc0d --- /dev/null +++ b/software/gsl-1.15/randist/.deps/nbinomial.Plo @@ -0,0 +1,103 @@ +nbinomial.lo: nbinomial.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/randist/.deps/pareto.Plo b/software/gsl-1.15/randist/.deps/pareto.Plo new file mode 100644 index 000000000..80466bc4f --- /dev/null +++ b/software/gsl-1.15/randist/.deps/pareto.Plo @@ -0,0 +1,99 @@ +pareto.lo: pareto.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/pascal.Plo b/software/gsl-1.15/randist/.deps/pascal.Plo new file mode 100644 index 000000000..1c3f4ca7c --- /dev/null +++ b/software/gsl-1.15/randist/.deps/pascal.Plo @@ -0,0 +1,99 @@ +pascal.lo: pascal.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/poisson.Plo b/software/gsl-1.15/randist/.deps/poisson.Plo new file mode 100644 index 000000000..a8539b477 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/poisson.Plo @@ -0,0 +1,104 @@ +poisson.lo: poisson.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/rayleigh.Plo b/software/gsl-1.15/randist/.deps/rayleigh.Plo new file mode 100644 index 000000000..fe0d232bd --- /dev/null +++ b/software/gsl-1.15/randist/.deps/rayleigh.Plo @@ -0,0 +1,99 @@ +rayleigh.lo: rayleigh.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/shuffle.Plo b/software/gsl-1.15/randist/.deps/shuffle.Plo new file mode 100644 index 000000000..e34d29dd5 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/shuffle.Plo @@ -0,0 +1,99 @@ +shuffle.lo: shuffle.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_rng.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/sphere.Plo b/software/gsl-1.15/randist/.deps/sphere.Plo new file mode 100644 index 000000000..751974a52 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/sphere.Plo @@ -0,0 +1,99 @@ +sphere.lo: sphere.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/tdist.Plo b/software/gsl-1.15/randist/.deps/tdist.Plo new file mode 100644 index 000000000..11bb99521 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/tdist.Plo @@ -0,0 +1,138 @@ +tdist.lo: tdist.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_rng.h /usr/include/stdlib.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/.deps/test.Po b/software/gsl-1.15/randist/.deps/test.Po new file mode 100644 index 000000000..b30393224 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/test.Po @@ -0,0 +1,140 @@ +test.o: test.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_randist.h ../gsl/gsl_rng.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h ../gsl/gsl_integration.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_randist.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_integration.h: diff --git a/software/gsl-1.15/randist/.deps/weibull.Plo b/software/gsl-1.15/randist/.deps/weibull.Plo new file mode 100644 index 000000000..596ce39d4 --- /dev/null +++ b/software/gsl-1.15/randist/.deps/weibull.Plo @@ -0,0 +1,99 @@ +weibull.lo: weibull.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_randist.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_randist.h: diff --git a/software/gsl-1.15/randist/ChangeLog b/software/gsl-1.15/randist/ChangeLog new file mode 100644 index 000000000..4553be989 --- /dev/null +++ b/software/gsl-1.15/randist/ChangeLog @@ -0,0 +1,514 @@ +2010-12-14 Brian Gough + + * gamma.c (gamma_frac): avoid potential division by zero, handle + a=0 as a special case + +2010-11-20 Brian Gough + + * chisq.c (gsl_ran_chisq_pdf): handle x=0 as special case + (x=0, nu=2 is also special) + +2010-10-12 Brian Gough + + * test.c (test_binomial_max): added a test case for n larger than + maxint + +2010-07-21 Brian Gough + + * beta.c (gsl_ran_beta_pdf): avoid overflow for x==0 || x==1 and + a>1,b>1 + +2010-03-01 Brian Gough + + * test.c (testPDF): extend the test run if a sample fails on the + first pass. + +2010-02-24 Brian Gough + + * fdist.c (gsl_ran_fdist_pdf): compute log of pdf to avoid + overflow/underflow. + +2009-07-10 Brian Gough + + * exponential.c (gsl_ran_exponential): use log(1-u) to include 0 + in the range of possible outputs + +2009-07-09 Brian Gough + + * discrete.c (gsl_ran_discrete_free): handle NULL argument in free + +2009-05-16 Brian Gough + + * discrete.c (push_stack): replace abort() with an error return + value + (pop_stack): replace abort() with GSL_ERROR + (gsl_ran_discrete_preproc): use g->A as a temporary array to store + the results of the test E[k] + + * test.c (test_gamma_vlarge): added test for a >= UINT_MAX. + + * gamma.c (gsl_ran_gamma_knuth): handle the case a >= UINT_MAX. + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-02-09 Brian Gough + + * gausszig.c (gsl_ran_gaussian_ziggurat): handle different + generator ranges explicitly + +2007-09-20 Brian Gough + + * multinomial.c (gsl_ran_multinomial_lnpdf): Handle case where + n[k]==0 and p[k]==0 + +2007-08-20 Brian Gough + + * test.c (integrate): perform the integration of the pdf with the + gsl_integration functions for accuracy (needed for dirichlet + distribution) + + * dirichlet.c (ran_dirichlet_small): handle underflow for small + alpha[] values + +2007-02-20 Brian Gough + + * gamma.c (gsl_ran_gamma): avoid an unnecessary function call to + gsl_ran_gamma_mt, since that maps back to gsl_ran_gamma now + +2007-02-14 Brian Gough + + * test.c (testPDF): reduce the test sensitivity to avoid failures + caused by weaknesses in the underlying rng + +2007-01-26 Brian Gough + + * gamma.c (gsl_ran_gamma): the Marsaglia Tsang method is now the + default + (gsl_ran_gamma_knuth): new function name, preserving the original + gsl_ran_gamma + +2006-08-30 Brian Gough + + * discrete.c (gsl_ran_discrete_preproc): use GSL_ENOMEM instead of + ENOMEM + +2006-04-18 Brian Gough + + * gausszig.c (gsl_ran_gaussian_ziggurat): fix prototype const + +2006-03-26 Brian Gough + + * multinomial.c (gsl_ran_multinomial_lnpdf): use gsl_sf_lnfact + instead of gsl_sf_lngamma for an integer argument + +2006-03-17 Brian Gough + + * binomial_tpe.c (gsl_ran_binomial): cast return values to + unsigned + +2006-02-27 Brian Gough + + * beta.c (gsl_ran_beta_pdf): work with logs avoid + underflow/overflow + +2006-02-19 Brian Gough + + * gauss.c (gsl_ran_gaussian): reject case where x=-1 || y=-1 + for true symmetry + (gsl_ran_gaussian_ratio_method): add Leva bounds + + * exppow.c (gsl_ran_exppow): added faster rejection methods + +2006-02-01 Brian Gough + + * gausszig.c: added ziggurat gaussian (Jochen Voss) + +2006-01-20 Brian Gough + + * binomial.c (gsl_ran_binomial_pdf): handle the cases p=0 and p=1 + (gsl_ran_binomial_pdf): use log1p to calculate more accurately + near k=0,p=0 + +2005-08-31 Brian Gough + + * test.c (main): free allocated memory before exit + +2005-08-22 Brian Gough + + * binomial_tpe.c (gsl_ran_binomial): switch to the TPE algorithm + as the default + + * binomial.c (gsl_ran_binomial_knuth): rename the original + binomial function to ..._knuth + +2004-05-30 Brian Gough + + * landau.c (gsl_ran_landau): fix potential array bounds overflow + by extending array. + +2004-04-22 Brian Gough + + * sphere.c (gsl_ran_dir_3d): removed unnecessary check for s==0.0 + +2003-07-25 Brian Gough + + * dirichlet.c: include gsl_sf_gamma.h instead of gsl_sf.h + +2003-07-24 Brian Gough + + * binomial_tpe.c (gsl_ran_binomial_tpe): convert to double to + avoid possible signed/unsigned problems in comparison (ix > n) + (Stirling): removed spurious trailing ; + +2003-05-14 Brian Gough + + * binomial_tpe.c: fast binomial algorithm using TPE method + + * test.c: added the tests for the fast Binomial TPE routine + +2003-02-09 Brian Gough + + * discrete.c (gsl_ran_discrete_preproc): fixed bug reported by + ahoward + +2003-01-25 Brian Gough + + * chisq.c: corrected comments + +2002-12-10 Brian Gough + + * multinomial.c (gsl_ran_multinomial): added multinomial + distribution + + * dirichlet.c (gsl_ran_dirichlet_lnpdf): added logpdf function for + accuracy + +Tue Aug 27 19:08:33 2002 Brian Gough + + * dirichlet.c: added dirichlet distribution + +Sat Aug 18 22:21:07 2001 Brian Gough + + * gsl-randist.c: moved to top-level directory + +Wed Jul 18 12:57:55 2001 Brian Gough + + * landau.c: added Landau distribution from Dave Morrison + +Sat Jun 23 12:30:38 2001 Brian Gough + + * gausstail.c (gsl_ran_gaussian_tail): allow negative values for + the tail cutoff parameter. + +Mon May 21 12:17:07 2001 Brian Gough + + * shuffle.c (gsl_ran_choose): removed void * return value + (gsl_ran_sample): removed void * return value + +Tue Apr 24 17:10:47 2001 Brian Gough + + * bernoulli.c (gsl_ran_bernoulli_pdf): removed unnecessary + reference to gsl_sf.h + +Mon Apr 23 10:25:44 2001 Brian Gough + + * changed calls to old specfunc _impl functions to use new error + handling conventions + +Tue Apr 17 19:57:59 2001 Brian Gough + + * weibull.c (gsl_ran_weibull): changed parameter mu to a, since it + is not the mean + (gsl_ran_weibull_pdf): changed parameter mu to a, since it + is not the mean + + * logistic.c (gsl_ran_logistic): changed parameter mu to a, since it + is not the mean + (gsl_ran_logistic_pdf): changed parameter mu to a, since it + is not the mean + + * laplace.c (gsl_ran_laplace): changed parameter mu to a, since it + is not the mean + (gsl_ran_laplace_pdf): changed parameter mu to a, since it + is not the mean + + * exppow.c (gsl_ran_exppow): changed parameter mu to a, since it + is not the mean + (gsl_ran_exppow_pdf): changed parameter mu to a, since it + is not the mean + + * cauchy.c (gsl_ran_cauchy): changed parameter mu to a, since it + is not the mean + (gsl_ran_cauchy_pdf): changed parameter mu to a, since it + is not the mean + +Tue Feb 20 11:14:00 2001 Brian Gough + + * levy.c: added the skew symmetric routine from Keith Briggs, + changed the definition of the original function to match and not + use mu as a scale parameter. + +2000-10-17 Brian Gough + + * shuffle.c (gsl_ran_shuffle): replaced calls of the form + N*gsl_rng_uniform(r) with the integer form gsl_rng_uniform(r, N) + +Thu Sep 21 18:41:53 2000 Brian Gough + + * pareto.c (gsl_ran_pareto): made arguments and documentation + consistent + +Wed May 10 14:55:43 2000 Brian Gough + + * gsl-randist.c (main): fixed bug for lognormal (it was calling + exppow) Tadhg O'Meara + + * gsl-randist.c (main): print out all the dimensions for dir-nd, + not just the first + +Tue Apr 25 20:45:14 2000 Brian Gough + + * shuffle.c (gsl_ran_sample): lifted the restriction that sampling + with replacement could only be done less than n times for n objects. + +Tue Mar 14 21:31:46 2000 Brian Gough + + * logistic.c (gsl_ran_logistic_pdf): prevent overflow in + computation of pdf for x < 0 + +Thu Oct 7 12:55:40 1999 Brian Gough + + * discrete.c (gsl_ran_discrete_free): removed unreachable code + "return 0"; + +Fri Aug 6 16:02:08 1999 Brian Gough + + * sphere.c (gsl_ran_dir_nd): number of dimensions is now unsigned + (size_t) + + * logarithmic.c (gsl_ran_logarithmic_pdf): removed warning about + passing arg 2 of `pow' as floating rather than integer due to + prototype + +Sun Aug 1 20:29:43 1999 Brian Gough + + * discrete.c: converted to GSL_ERROR macros for error handling + +Tue Jul 27 14:14:38 1999 Brian Gough + + * sphere.c (gsl_ran_dir_3d): use the Knop method only -- it is the + best. + (gsl_ran_dir_2d_trig_method): split out the trig method as an + alternative for those platforms where it is faster + + * bigauss.c: split out the bivariate gaussian into its own source + file + +1999-06-30 Mark Galassi + + * discrete.c: (thanks to Frederick W. Wheeler + ) changed the type stack_t to gsl_stack_t to + avoid a conflict on HPUX. + +Sun Feb 28 20:41:18 1999 Brian Gough + + * gsl-randist.c (main): change cfree() to free(), which is + standard. + + * discrete.c (gsl_ran_discrete_preproc): removed warning, pTotal + is now initialized to zero. + +1999-01-31 James Theiler + * gauss.c added a new function gsl_ran_ugaussian_tail() which + provides random numbers out on the tail of a gaussian. I also + added (but then #ifdef'd out) a second implementation of ordinary + gaussian numbers. This second implementation passes the tests + okay, but it is a touch slower on my home Pentium. + * gsl_randist.h added prototypes + * test.c added tests for new gaussian tail function; also altered + testMoment's ugaussian range (-1,1) value from .68 to a more + accurate value. + * ../doc/random.texi further updated + +1999-01-30 James Theiler + * discrete.c added implementation of Walker's algorithm for + rapidly choosing a random integer k where the k's are distributed + by a user-supplied array of probabilities P[k]. This includes + functions gsl_ran_discrete(), gsl_ran_discrete_preproc(), + gsl_ran_discrete_free(), and gsl_ran_discrete_pdf(). + * gsl_randist.h added definition of structure gsl_ran_discrete_t, + also prototypes of new functions defined in discrete.c + * test.c added tests for gsl_ran_discrete(), also + * test.c made some essentially cosmetic changes: + 1/ redefined FUNC and FUNC2 macros so now output looks like + "test gsl_ran_poisson" instead of "gsl_ran_test_poisson" + 2/ changed names of toplevel tests, eg test_moments->testMoments, + test_pdf->testPDF, etc, to distinguish them from all the individual + functions test_poisson, test_binomial, etc. + hope that's ok. + * ../doc/random.texi updated to reflect the new discrete functions, + as well as the new implementations of the sphere.c routines. + +1999-01-28 James Theiler + * sphere.c modified gsl_ran_dir_3d, to speed it up about 2x + also modified gsl_ran_dir_2d, providing alternative algorithms + (#ifdef'd appropriately). which is faster is machine dependent. + also gsl_ran_dir_nd for n-dimensional direction, using + gaussian random variables, normalized to the unit sphere + also added ref's to Knuth and others describing the algorithms + * gsl_randist.h added gsl_ran_dir_nd() prototype + * gsl-randist.c added dir-nd option + +Tue Dec 15 23:08:57 1998 Brian Gough + + * updated all the functions depending on gsl_sf to use the new + special function interface, based on gsl_sf_result + +Tue Nov 17 17:02:54 1998 Brian Gough + + * added #include to all top-level source files + +1998-11-06 + + * test.c: ensured that M_PI is available by #include + +Wed Sep 16 14:44:08 1998 Brian Gough + + * rayleigh.c: added rayleigh tail distribution + +Sat Sep 12 13:03:19 1998 Brian Gough + + * rayleigh.c: added rayleigh distribution + +Mon Aug 31 James Theiler + + * Makefile.am: added ../utils/libutils.a to some LDADD's + +Mon Aug 17 14:31:55 1998 Brian Gough + + * gsl_randist.h: renamed discrete probability distribution + parameters to use consistent k,n notation (k = sample, n = total, + e.g. p(k) = function(k,n) ) + +Wed Aug 12 14:02:31 1998 Brian Gough + + * lognormal.c: added zeta and sigma (location and scale parameters) + + * logarithmic.c (gsl_ran_logarithmic): added logarithmic distribution + +Mon Aug 10 14:41:15 1998 Brian Gough + + * gsl-randist.c: added random direction functions + + * gamma.c: added the scale paramter for the gamma distribution + +Thu Aug 6 12:19:59 1998 Brian Gough + + * gauss.c (gsl_ran_bivariate_gaussian): added bivariate with + correlations. + + * hyperg.c: renamed variables, fixed bug + +Wed Aug 5 11:21:45 1998 Brian Gough + + * gsl-dist.c: renamed gsl-dist.c to gsl-randist.c, for + consistency + +Tue Aug 4 12:29:17 1998 Brian Gough + + * gsl-dist.c: a program for generating samples from the + distributions + + * levy.c (gsl_ran_levy): take care of special case, a=1 + + * logistic.c: allow scale parameter, mu + + * weibull.c: allow scale parameter, mu + + * pareto.c: allow scale parameter, mu + + * exppow.c: handle the case a<1 using a transformation of the + gamma distribution. + + * gamma.c (gsl_ran_gamma_int): removed the check for + GSL_LOGINIFINITY since underflow can't occur for 32-bit random + numbers in double precision. + +Mon Aug 3 13:09:39 1998 Brian Gough + + * test.c: added tests for shuffle and choose + + * pascal.c: added the Pascal distribution + + * hyperg.c: added the hypergeometric distribution + +Fri Jul 31 12:52:12 1998 Brian Gough + + * gsl_randist.h: renamed gsl_ran_two_sided_exponential to + gsl_ran_laplace + +1998-07-26 Mark Galassi + + * Makefile.am (INCLUDES): added -I$(top_srcdir), since gsl_math.h + is needed, and that is in the top level source directory. This is + necessary for using a separate build directory. + +Tue Jul 14 12:39:30 1998 Brian Gough + + * nbinomial.c: added Negative Binomial distribution + + * bernoulli.c: added Bernoulli distribution + + * poisson.c (gsl_ran_poisson): fixed a serious bug in the unrolled + recursion which led to an incorrect result being returned for the + large t case. This shows the importance of tests that cover all + possible branches!!! + + * erlang.c (gsl_ran_erlang_pdf): renamed mu to a for consistency + +Thu Jul 2 15:47:05 1998 Brian Gough + + * added some extra distributions, lognormal.c gaussian.c + logistic.c pareto.c geometric.c erlang.c chisq.c weibull.c, + although they aren't finished yet + +Wed Jul 1 11:56:06 1998 Brian Gough + + * replace do { u = gsl_rng_uniform(r) } while (u == 0) by a direct + call to gsl_rng_uniform_pos. + +Sun Jun 28 14:21:13 1998 Brian Gough + + * converted everything to work with rng style generators + +Sun Apr 19 19:06:59 1998 Brian Gough + + * made the 'gsl-dist' programs just output a single column of + their random numbers (previously some of the programs printed both + the uniform variate and the transformed number) + + * got rid of the 'bench-' programs. We will have a full testing + suite soon. + + * renamed the installed programs from 'dist' to 'gsl-dist' so that + they don't overwrite anything, e.g. it's possible the user might + have other programs called 'gauss' or 'gamma' installed in + /usr/local + +Sat Mar 21 16:09:16 1998 Brian Gough + + * laplace.c (gsl_ran_laplace): added a Laplace distribution + (two-sided exponential) + + * lorentz.c (gsl_ran_lorentzian): added a Lorentz distribution + +1998-01-30 Mark Galassi + + * Makefile.am (lib_LIBRARIES): now it creates libgslrandist.a so + that we have gaussian and poisson distributions. + diff --git a/software/gsl-1.15/randist/Makefile.am b/software/gsl-1.15/randist/Makefile.am new file mode 100644 index 000000000..4745c2f0b --- /dev/null +++ b/software/gsl-1.15/randist/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgslrandist.la + +pkginclude_HEADERS= gsl_randist.h + +INCLUDES = -I$(top_srcdir) + +libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c +test_LDADD = libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../integration/libgslintegration.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + + diff --git a/software/gsl-1.15/randist/Makefile.in b/software/gsl-1.15/randist/Makefile.in new file mode 100644 index 000000000..a52b95268 --- /dev/null +++ b/software/gsl-1.15/randist/Makefile.in @@ -0,0 +1,707 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = randist +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslrandist_la_LIBADD = +am_libgslrandist_la_OBJECTS = bernoulli.lo beta.lo bigauss.lo \ + binomial.lo cauchy.lo chisq.lo dirichlet.lo discrete.lo \ + erlang.lo exponential.lo exppow.lo fdist.lo flat.lo gamma.lo \ + gauss.lo gausszig.lo gausstail.lo geometric.lo gumbel.lo \ + hyperg.lo laplace.lo levy.lo logarithmic.lo logistic.lo \ + lognormal.lo multinomial.lo nbinomial.lo pareto.lo pascal.lo \ + poisson.lo rayleigh.lo shuffle.lo sphere.lo tdist.lo \ + weibull.lo landau.lo binomial_tpe.lo +libgslrandist_la_OBJECTS = $(am_libgslrandist_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslrandist.la ../rng/libgslrng.la \ + ../specfunc/libgslspecfunc.la \ + ../integration/libgslintegration.la \ + ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslrandist_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslrandist_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslrandist.la +pkginclude_HEADERS = gsl_randist.h +INCLUDES = -I$(top_srcdir) +libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../integration/libgslintegration.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu randist/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu randist/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslrandist.la: $(libgslrandist_la_OBJECTS) $(libgslrandist_la_DEPENDENCIES) + $(LINK) $(libgslrandist_la_OBJECTS) $(libgslrandist_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bernoulli.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigauss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binomial.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binomial_tpe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cauchy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chisq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirichlet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/discrete.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erlang.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exponential.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exppow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gauss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gausstail.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gausszig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geometric.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gumbel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/landau.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/laplace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logarithmic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logistic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lognormal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multinomial.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbinomial.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pareto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pascal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poisson.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rayleigh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shuffle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weibull.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/randist/TODO b/software/gsl-1.15/randist/TODO new file mode 100644 index 000000000..7e6bd5365 --- /dev/null +++ b/software/gsl-1.15/randist/TODO @@ -0,0 +1,69 @@ +# -*- org -*- +#+CATEGORY: randist + +* ACM Computing Surveys (CSUR) + Volume 39 , Issue 4 (2007) + + Gaussian random number generators + David B. Thomas, Wayne Luk, Philip H.W. Leong, John D. Villasenor + Article No. 11 + + +* add Erlang dist back in? + +* DONE, for mu. + + Note that we need to get rid of mu when it is not the mean. + + From: Brian Gough + To: briggsk@info.bt.co.uk + Cc: gsl-discuss@sourceware.cygnus.com + Subject: Re: Pareto Distribution + Date: Sun, 9 Jul 2000 20:05:03 +0100 (BST) + + Yes, we should adopt the conventions from a standard reference book -- + the existing functions are drawn from a variety of sources, mostly + Devroye's book on Random Variates (which is public domain, but not + available electronically unfortunately). Maybe the three volumes of + Johnson & Kotz on Univariate Distributions would do, for + example. Patches are welcome from anyone who wants sort this out. + + Keith Briggs writes: + > Another thing to think about: some of the other distributions + > have a argument `mu' to the C function which is a parameter + > which is not the mean. This is non-standard and confusing. + > (Also, in the Pareto function, `a' is normally called beta, + > `b' is normally called alpha.) + > + > Keith + > + > +-------------------------------------------------------------------+ + > | Dr. Keith M. Briggs, Complexity Research Group, BT Research Labs. | + > | Adastral Park admin2 pp5, Martlesham Heath, IP5 3RE, Suffolk, UK | + > | Tel. 01473 641 911 Fax. 01473 647 410. Home tel: 01473 625 972 | + > | www.bt.com | personal homepage: www.labs.bt.com/people/briggsk2/ | + > +-------------------------------------------------------------------+ + + +* The exponential power distribution method could be speeded up by +using a rational function approximation for the rejection scaling +parameter. + +* Do something about the possibility of the user providing invalid +parameters (e.g. negative variance etc). Not sure what to do though, +since returning an error code is not possible. Maybe just return zero. + We should return NAN in this case, and for the CDFs. + +* Add the triangular distribution. + +* Look at Marsaglia & Tsang, "The Monte Python Method for generating +random variables", ACM TOMS Vol 24, No 3, p341 + +and the paper on the Ziggurat Method: Journal of Statistical Software, +Volume 05 Issue 08. George Marsaglia and Wai Wan Tsang. "The ziggurat +method for generating random variables" + +* Should 0 be included in distributions such as the exponential +distribution? If we want a consistent behaviour, is it included in +others? Note that 1-gsl_rng_uniform() can have a slight loss of +precision when the random float is small. diff --git a/software/gsl-1.15/randist/bernoulli.c b/software/gsl-1.15/randist/bernoulli.c new file mode 100644 index 000000000..c10f5a49a --- /dev/null +++ b/software/gsl-1.15/randist/bernoulli.c @@ -0,0 +1,61 @@ +/* randist/bernoulli.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The bernoulli distribution has the form, + + prob(0) = 1-p, prob(1) = p + + */ + +unsigned int +gsl_ran_bernoulli (const gsl_rng * r, double p) +{ + double u = gsl_rng_uniform (r) ; + + if (u < p) + { + return 1 ; + } + else + { + return 0 ; + } +} + +double +gsl_ran_bernoulli_pdf (const unsigned int k, double p) +{ + if (k == 0) + { + return 1 - p ; + } + else if (k == 1) + { + return p ; + } + else + { + return 0 ; + } +} diff --git a/software/gsl-1.15/randist/beta.c b/software/gsl-1.15/randist/beta.c new file mode 100644 index 000000000..587f831e1 --- /dev/null +++ b/software/gsl-1.15/randist/beta.c @@ -0,0 +1,75 @@ +/* randist/beta.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The beta distribution has the form + + p(x) dx = (Gamma(a + b)/(Gamma(a) Gamma(b))) x^(a-1) (1-x)^(b-1) dx + + The method used here is the one described in Knuth */ + +double +gsl_ran_beta (const gsl_rng * r, const double a, const double b) +{ + double x1 = gsl_ran_gamma (r, a, 1.0); + double x2 = gsl_ran_gamma (r, b, 1.0); + + return x1 / (x1 + x2); +} + +double +gsl_ran_beta_pdf (const double x, const double a, const double b) +{ + if (x < 0 || x > 1) + { + return 0 ; + } + else + { + double p; + + double gab = gsl_sf_lngamma (a + b); + double ga = gsl_sf_lngamma (a); + double gb = gsl_sf_lngamma (b); + + if (x == 0.0 || x == 1.0) + { + if (a > 1.0 && b > 1.0) + { + p = 0.0; + } + else + { + p = exp (gab - ga - gb) * pow (x, a - 1) * pow (1 - x, b - 1); + } + } + else + { + p = exp (gab - ga - gb + log(x) * (a - 1) + log1p(-x) * (b - 1)); + } + + return p; + } +} diff --git a/software/gsl-1.15/randist/bigauss.c b/software/gsl-1.15/randist/bigauss.c new file mode 100644 index 000000000..c23f401bf --- /dev/null +++ b/software/gsl-1.15/randist/bigauss.c @@ -0,0 +1,70 @@ +/* randist/bigauss.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The Bivariate Gaussian probability distribution is + + p(x,y) dxdy = (1/(2 pi sigma_x sigma_y sqrt(c))) + exp(-((x/sigma_x)^2 + (y/sigma_y)^2 - 2 r (x/sigma_x)(y/sigma_y))/2c) dxdy + + where c = 1-r^2 +*/ + +void +gsl_ran_bivariate_gaussian (const gsl_rng * r, + double sigma_x, double sigma_y, double rho, + double *x, double *y) +{ + double u, v, r2, scale; + + do + { + /* choose x,y in uniform square (-1,-1) to (+1,+1) */ + + u = -1 + 2 * gsl_rng_uniform (r); + v = -1 + 2 * gsl_rng_uniform (r); + + /* see if it is in the unit circle */ + r2 = u * u + v * v; + } + while (r2 > 1.0 || r2 == 0); + + scale = sqrt (-2.0 * log (r2) / r2); + + *x = sigma_x * u * scale; + *y = sigma_y * (rho * u + sqrt(1 - rho*rho) * v) * scale; +} + +double +gsl_ran_bivariate_gaussian_pdf (const double x, const double y, + const double sigma_x, const double sigma_y, + const double rho) +{ + double u = x / sigma_x ; + double v = y / sigma_y ; + double c = 1 - rho*rho ; + double p = (1 / (2 * M_PI * sigma_x * sigma_y * sqrt(c))) + * exp (-(u * u - 2 * rho * u * v + v * v) / (2 * c)); + return p; +} diff --git a/software/gsl-1.15/randist/binomial.c b/software/gsl-1.15/randist/binomial.c new file mode 100644 index 000000000..8a423d260 --- /dev/null +++ b/software/gsl-1.15/randist/binomial.c @@ -0,0 +1,100 @@ +/* randist/binomial.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The binomial distribution has the form, + + prob(k) = n!/(k!(n-k)!) * p^k (1-p)^(n-k) for k = 0, 1, ..., n + + This is the algorithm from Knuth */ + +/* Default binomial generator is now in binomial_tpe.c */ + +unsigned int +gsl_ran_binomial_knuth (const gsl_rng * r, double p, unsigned int n) +{ + unsigned int i, a, b, k = 0; + + while (n > 10) /* This parameter is tunable */ + { + double X; + a = 1 + (n / 2); + b = 1 + n - a; + + X = gsl_ran_beta (r, (double) a, (double) b); + + if (X >= p) + { + n = a - 1; + p /= X; + } + else + { + k += a; + n = b - 1; + p = (p - X) / (1 - X); + } + } + + for (i = 0; i < n; i++) + { + double u = gsl_rng_uniform (r); + if (u < p) + k++; + } + + return k; +} + +double +gsl_ran_binomial_pdf (const unsigned int k, const double p, + const unsigned int n) +{ + if (k > n) + { + return 0; + } + else + { + double P; + + if (p == 0) + { + P = (k == 0) ? 1 : 0; + } + else if (p == 1) + { + P = (k == n) ? 1 : 0; + } + else + { + double ln_Cnk = gsl_sf_lnchoose (n, k); + P = ln_Cnk + k * log (p) + (n - k) * log1p (-p); + P = exp (P); + } + + return P; + } +} diff --git a/software/gsl-1.15/randist/binomial_tpe.c b/software/gsl-1.15/randist/binomial_tpe.c new file mode 100644 index 000000000..d32423ccf --- /dev/null +++ b/software/gsl-1.15/randist/binomial_tpe.c @@ -0,0 +1,381 @@ +/* randist/binomial_tpe.c + * + * Copyright (C) 1996, 2003, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The binomial distribution has the form, + + f(x) = n!/(x!(n-x)!) * p^x (1-p)^(n-x) for integer 0 <= x <= n + = 0 otherwise + + This implementation follows the public domain ranlib function + "ignbin", the bulk of which is the BTPE (Binomial Triangle + Parallelogram Exponential) algorithm introduced in + Kachitvichyanukul and Schmeiser[1]. It has been translated to use + modern C coding standards. + + If n is small and/or p is near 0 or near 1 (specifically, if + n*min(p,1-p) < SMALL_MEAN), then a different algorithm, called + BINV, is used which has an average runtime that scales linearly + with n*min(p,1-p). + + But for larger problems, the BTPE algorithm takes the form of two + functions b(x) and t(x) -- "bottom" and "top" -- for which b(x) < + f(x)/f(M) < t(x), with M = floor(n*p+p). b(x) defines a triangular + region, and t(x) includes a parallelogram and two tails. Details + (including a nice drawing) are in the paper. + + [1] Kachitvichyanukul, V. and Schmeiser, B. W. Binomial Random + Variate Generation. Communications of the ACM, 31, 2 (February, + 1988) 216. + + Note, Bruce Schmeiser (personal communication) points out that if + you want very fast binomial deviates, and you are happy with + approximate results, and/or n and n*p are both large, then you can + just use gaussian estimates: mean=n*p, variance=n*p*(1-p). + + This implementation by James Theiler, April 2003, after obtaining + permission -- and some good advice -- from Drs. Kachitvichyanukul + and Schmeiser to use their code as a starting point, and then doing + a little bit of tweaking. + + Additional polishing for GSL coding standards by Brian Gough. */ + +#define SMALL_MEAN 14 /* If n*p < SMALL_MEAN then use BINV + algorithm. The ranlib + implementation used cutoff=30; but + on my computer 14 works better */ + +#define BINV_CUTOFF 110 /* In BINV, do not permit ix too large */ + +#define FAR_FROM_MEAN 20 /* If ix-n*p is larger than this, then + use the "squeeze" algorithm. + Ranlib used 20, and this seems to + be the best choice on my machine as + well */ + +#define LNFACT(x) gsl_sf_lnfact(x) + +inline static double +Stirling (double y1) +{ + double y2 = y1 * y1; + double s = + (13860.0 - + (462.0 - (132.0 - (99.0 - 140.0 / y2) / y2) / y2) / y2) / y1 / 166320.0; + return s; +} + +unsigned int +gsl_ran_binomial_tpe (const gsl_rng * rng, double p, unsigned int n) +{ + return gsl_ran_binomial (rng, p, n); +} + +unsigned int +gsl_ran_binomial (const gsl_rng * rng, double p, unsigned int n) +{ + int ix; /* return value */ + int flipped = 0; + double q, s, np; + + if (n == 0) + return 0; + + if (p > 0.5) + { + p = 1.0 - p; /* work with small p */ + flipped = 1; + } + + q = 1 - p; + s = p / q; + np = n * p; + + /* Inverse cdf logic for small mean (BINV in K+S) */ + + if (np < SMALL_MEAN) + { + double f0 = gsl_pow_uint (q, n); /* f(x), starting with x=0 */ + + while (1) + { + /* This while(1) loop will almost certainly only loop once; but + * if u=1 to within a few epsilons of machine precision, then it + * is possible for roundoff to prevent the main loop over ix to + * achieve its proper value. following the ranlib implementation, + * we introduce a check for that situation, and when it occurs, + * we just try again. + */ + + double f = f0; + double u = gsl_rng_uniform (rng); + + for (ix = 0; ix <= BINV_CUTOFF; ++ix) + { + if (u < f) + goto Finish; + u -= f; + /* Use recursion f(x+1) = f(x)*[(n-x)/(x+1)]*[p/(1-p)] */ + f *= s * (n - ix) / (ix + 1); + } + + /* It should be the case that the 'goto Finish' was encountered + * before this point was ever reached. But if we have reached + * this point, then roundoff has prevented u from decreasing + * all the way to zero. This can happen only if the initial u + * was very nearly equal to 1, which is a rare situation. In + * that rare situation, we just try again. + * + * Note, following the ranlib implementation, we loop ix only to + * a hardcoded value of SMALL_MEAN_LARGE_N=110; we could have + * looped to n, and 99.99...% of the time it won't matter. This + * choice, I think is a little more robust against the rare + * roundoff error. If n>LARGE_N, then it is technically + * possible for ix>LARGE_N, but it is astronomically rare, and + * if ix is that large, it is more likely due to roundoff than + * probability, so better to nip it at LARGE_N than to take a + * chance that roundoff will somehow conspire to produce an even + * larger (and more improbable) ix. If n= SMALL_MEAN, we invoke the BTPE algorithm */ + + int k; + + double ffm = np + p; /* ffm = n*p+p */ + int m = (int) ffm; /* m = int floor[n*p+p] */ + double fm = m; /* fm = double m; */ + double xm = fm + 0.5; /* xm = half integer mean (tip of triangle) */ + double npq = np * q; /* npq = n*p*q */ + + /* Compute cumulative area of tri, para, exp tails */ + + /* p1: radius of triangle region; since height=1, also: area of region */ + /* p2: p1 + area of parallelogram region */ + /* p3: p2 + area of left tail */ + /* p4: p3 + area of right tail */ + /* pi/p4: probability of i'th area (i=1,2,3,4) */ + + /* Note: magic numbers 2.195, 4.6, 0.134, 20.5, 15.3 */ + /* These magic numbers are not adjustable...at least not easily! */ + + double p1 = floor (2.195 * sqrt (npq) - 4.6 * q) + 0.5; + + /* xl, xr: left and right edges of triangle */ + double xl = xm - p1; + double xr = xm + p1; + + /* Parameter of exponential tails */ + /* Left tail: t(x) = c*exp(-lambda_l*[xl - (x+0.5)]) */ + /* Right tail: t(x) = c*exp(-lambda_r*[(x+0.5) - xr]) */ + + double c = 0.134 + 20.5 / (15.3 + fm); + double p2 = p1 * (1.0 + c + c); + + double al = (ffm - xl) / (ffm - xl * p); + double lambda_l = al * (1.0 + 0.5 * al); + double ar = (xr - ffm) / (xr * q); + double lambda_r = ar * (1.0 + 0.5 * ar); + double p3 = p2 + c / lambda_l; + double p4 = p3 + c / lambda_r; + + double var, accept; + double u, v; /* random variates */ + + TryAgain: + + /* generate random variates, u specifies which region: Tri, Par, Tail */ + u = gsl_rng_uniform (rng) * p4; + v = gsl_rng_uniform (rng); + + if (u <= p1) + { + /* Triangular region */ + ix = (int) (xm - p1 * v + u); + goto Finish; + } + else if (u <= p2) + { + /* Parallelogram region */ + double x = xl + (u - p1) / c; + v = v * c + 1.0 - fabs (x - xm) / p1; + if (v > 1.0 || v <= 0.0) + goto TryAgain; + ix = (int) x; + } + else if (u <= p3) + { + /* Left tail */ + ix = (int) (xl + log (v) / lambda_l); + if (ix < 0) + goto TryAgain; + v *= ((u - p2) * lambda_l); + } + else + { + /* Right tail */ + ix = (int) (xr - log (v) / lambda_r); + if (ix > (double) n) + goto TryAgain; + v *= ((u - p3) * lambda_r); + } + + /* At this point, the goal is to test whether v <= f(x)/f(m) + * + * v <= f(x)/f(m) = (m!(n-m)! / (x!(n-x)!)) * (p/q)^{x-m} + * + */ + + /* Here is a direct test using logarithms. It is a little + * slower than the various "squeezing" computations below, but + * if things are working, it should give exactly the same answer + * (given the same random number seed). */ + +#ifdef DIRECT + var = log (v); + + accept = + LNFACT (m) + LNFACT (n - m) - LNFACT (ix) - LNFACT (n - ix) + + (ix - m) * log (p / q); + +#else /* SQUEEZE METHOD */ + + /* More efficient determination of whether v < f(x)/f(M) */ + + k = abs (ix - m); + + if (k <= FAR_FROM_MEAN) + { + /* + * If ix near m (ie, |ix-m| ix) + { + int i; + for (i = ix + 1; i <= m; i++) + { + f /= (g / i - s); + } + } + + accept = f; + } + else + { + /* If ix is far from the mean m: k=ABS(ix-m) large */ + + var = log (v); + + if (k < npq / 2 - 1) + { + /* "Squeeze" using upper and lower bounds on + * log(f(x)) The squeeze condition was derived + * under the condition k < npq/2-1 */ + double amaxp = + k / npq * ((k * (k / 3.0 + 0.625) + (1.0 / 6.0)) / npq + 0.5); + double ynorm = -(k * k / (2.0 * npq)); + if (var < ynorm - amaxp) + goto Finish; + if (var > ynorm + amaxp) + goto TryAgain; + } + + /* Now, again: do the test log(v) vs. log f(x)/f(M) */ + +#if USE_EXACT + /* This is equivalent to the above, but is a little (~20%) slower */ + /* There are five log's vs three above, maybe that's it? */ + + accept = LNFACT (m) + LNFACT (n - m) + - LNFACT (ix) - LNFACT (n - ix) + (ix - m) * log (p / q); + +#else /* USE STIRLING */ + /* The "#define Stirling" above corresponds to the first five + * terms in asymptoic formula for + * log Gamma (y) - (y-0.5)log(y) + y - 0.5 log(2*pi); + * See Abramowitz and Stegun, eq 6.1.40 + */ + + /* Note below: two Stirling's are added, and two are + * subtracted. In both K+S, and in the ranlib + * implementation, all four are added. I (jt) believe that + * is a mistake -- this has been confirmed by personal + * correspondence w/ Dr. Kachitvichyanukul. Note, however, + * the corrections are so small, that I couldn't find an + * example where it made a difference that could be + * observed, let alone tested. In fact, define'ing Stirling + * to be zero gave identical results!! In practice, alv is + * O(1), ranging 0 to -10 or so, while the Stirling + * correction is typically O(10^{-5}) ...setting the + * correction to zero gives about a 2% performance boost; + * might as well keep it just to be pendantic. */ + + { + double x1 = ix + 1.0; + double w1 = n - ix + 1.0; + double f1 = fm + 1.0; + double z1 = n + 1.0 - fm; + + accept = xm * log (f1 / x1) + (n - m + 0.5) * log (z1 / w1) + + (ix - m) * log (w1 * p / (x1 * q)) + + Stirling (f1) + Stirling (z1) - Stirling (x1) - Stirling (w1); + } +#endif +#endif + } + + + if (var <= accept) + { + goto Finish; + } + else + { + goto TryAgain; + } + } + +Finish: + + return (flipped) ? (n - ix) : (unsigned int)ix; +} diff --git a/software/gsl-1.15/randist/cauchy.c b/software/gsl-1.15/randist/cauchy.c new file mode 100644 index 000000000..c5f1a1d6d --- /dev/null +++ b/software/gsl-1.15/randist/cauchy.c @@ -0,0 +1,51 @@ +/* randist/cauchy.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The Cauchy probability distribution is + + p(x) dx = (1/(pi a)) (1 + (x/a)^2)^(-1) dx + + It is also known as the Lorentzian probability distribution */ + +double +gsl_ran_cauchy (const gsl_rng * r, const double a) +{ + double u; + do + { + u = gsl_rng_uniform (r); + } + while (u == 0.5); + + return a * tan (M_PI * u); +} + +double +gsl_ran_cauchy_pdf (const double x, const double a) +{ + double u = x / a; + double p = (1 / (M_PI * a)) / (1 + u * u); + return p; +} diff --git a/software/gsl-1.15/randist/chisq.c b/software/gsl-1.15/randist/chisq.c new file mode 100644 index 000000000..aef22ec36 --- /dev/null +++ b/software/gsl-1.15/randist/chisq.c @@ -0,0 +1,61 @@ +/* randist/chisq.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The chisq distribution has the form + + p(x) dx = (1/(2*Gamma(nu/2))) (x/2)^(nu/2 - 1) exp(-x/2) dx + + for x = 0 ... +infty */ + +double +gsl_ran_chisq (const gsl_rng * r, const double nu) +{ + double chisq = 2 * gsl_ran_gamma (r, nu / 2, 1.0); + return chisq; +} + +double +gsl_ran_chisq_pdf (const double x, const double nu) +{ + if (x < 0) + { + return 0 ; + } + else + { + if(nu == 2.0) + { + return exp(-x/2.0) / 2.0; + } + else + { + double p; + double lngamma = gsl_sf_lngamma (nu / 2); + + p = exp ((nu / 2 - 1) * log (x/2) - x/2 - lngamma) / 2; + return p; + } + } +} diff --git a/software/gsl-1.15/randist/dirichlet.c b/software/gsl-1.15/randist/dirichlet.c new file mode 100644 index 000000000..b6c7713e8 --- /dev/null +++ b/software/gsl-1.15/randist/dirichlet.c @@ -0,0 +1,163 @@ +/* randist/dirichlet.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 2002 Gavin E. Crooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + + +/* The Dirichlet probability distribution of order K-1 is + + p(\theta_1,...,\theta_K) d\theta_1 ... d\theta_K = + (1/Z) \prod_i=1,K \theta_i^{alpha_i - 1} \delta(1 -\sum_i=1,K \theta_i) + + The normalization factor Z can be expressed in terms of gamma functions: + + Z = {\prod_i=1,K \Gamma(\alpha_i)} / {\Gamma( \sum_i=1,K \alpha_i)} + + The K constants, \alpha_1,...,\alpha_K, must be positive. The K parameters, + \theta_1,...,\theta_K are nonnegative and sum to 1. + + The random variates are generated by sampling K values from gamma + distributions with parameters a=\alpha_i, b=1, and renormalizing. + See A.M. Law, W.D. Kelton, Simulation Modeling and Analysis (1991). + + Gavin E. Crooks (2002) +*/ + +static void ran_dirichlet_small (const gsl_rng * r, const size_t K, const double alpha[], double theta[]); + +void +gsl_ran_dirichlet (const gsl_rng * r, const size_t K, + const double alpha[], double theta[]) +{ + size_t i; + double norm = 0.0; + + for (i = 0; i < K; i++) + { + theta[i] = gsl_ran_gamma (r, alpha[i], 1.0); + } + + for (i = 0; i < K; i++) + { + norm += theta[i]; + } + + if (norm < GSL_SQRT_DBL_MIN) /* Handle underflow */ + { + ran_dirichlet_small (r, K, alpha, theta); + return; + } + + for (i = 0; i < K; i++) + { + theta[i] /= norm; + } +} + + +/* When the values of alpha[] are small, scale the variates to avoid + underflow so that the result is not 0/0. Note that the Dirichlet + distribution is defined by a ratio of gamma functions so we can + take out an arbitrary factor to keep the values in the range of + double precision. */ + +static void +ran_dirichlet_small (const gsl_rng * r, const size_t K, + const double alpha[], double theta[]) +{ + size_t i; + double norm = 0.0, umax = 0; + + for (i = 0; i < K; i++) + { + double u = log(gsl_rng_uniform_pos (r)) / alpha[i]; + + theta[i] = u; + + if (u > umax || i == 0) { + umax = u; + } + } + + for (i = 0; i < K; i++) + { + theta[i] = exp(theta[i] - umax); + } + + for (i = 0; i < K; i++) + { + theta[i] = theta[i] * gsl_ran_gamma (r, alpha[i] + 1.0, 1.0); + } + + for (i = 0; i < K; i++) + { + norm += theta[i]; + } + + for (i = 0; i < K; i++) + { + theta[i] /= norm; + } +} + + + + + +double +gsl_ran_dirichlet_pdf (const size_t K, + const double alpha[], const double theta[]) +{ + return exp (gsl_ran_dirichlet_lnpdf (K, alpha, theta)); +} + +double +gsl_ran_dirichlet_lnpdf (const size_t K, + const double alpha[], const double theta[]) +{ + /*We calculate the log of the pdf to minimize the possibility of overflow */ + size_t i; + double log_p = 0.0; + double sum_alpha = 0.0; + + for (i = 0; i < K; i++) + { + log_p += (alpha[i] - 1.0) * log (theta[i]); + } + + for (i = 0; i < K; i++) + { + sum_alpha += alpha[i]; + } + + log_p += gsl_sf_lngamma (sum_alpha); + + for (i = 0; i < K; i++) + { + log_p -= gsl_sf_lngamma (alpha[i]); + } + + return log_p; +} diff --git a/software/gsl-1.15/randist/discrete.c b/software/gsl-1.15/randist/discrete.c new file mode 100644 index 000000000..a1400eeba --- /dev/null +++ b/software/gsl-1.15/randist/discrete.c @@ -0,0 +1,406 @@ +/* randist/discrete.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + Random Discrete Events + + Given K discrete events with different probabilities P[k] + produce a value k consistent with its probability. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. You should have received + a copy of the GNU General Public License along with this program; + if not, write to the Free Foundation, Inc., 59 Temple Place, Suite + 330, Boston, MA 02111-1307 USA +*/ + +/* + * Based on: Alastair J Walker, An efficient method for generating + * discrete random variables with general distributions, ACM Trans + * Math Soft 3, 253-256 (1977). See also: D. E. Knuth, The Art of + * Computer Programming, Volume 2 (Seminumerical algorithms), 3rd + * edition, Addison-Wesley (1997), p120. + + * Walker's algorithm does some preprocessing, and provides two + * arrays: floating point F[k] and integer A[k]. A value k is chosen + * from 0..K-1 with equal likelihood, and then a uniform random number + * u is compared to F[k]. If it is less than F[k], then k is + * returned. Otherwise, A[k] is returned. + + * Walker's original paper describes an O(K^2) algorithm for setting + * up the F and A arrays. I found this disturbing since I wanted to + * use very large values of K. I'm sure I'm not the first to realize + * this, but in fact the preprocessing can be done in O(K) steps. + + * A figure of merit for the preprocessing is the average value for + * the F[k]'s (that is, SUM_k F[k]/K); this corresponds to the + * probability that k is returned, instead of A[k], thereby saving a + * redirection. Walker's O(K^2) preprocessing will generally improve + * that figure of merit, compared to my cheaper O(K) method; from some + * experiments with a perl script, I get values of around 0.6 for my + * method and just under 0.75 for Walker's. Knuth has pointed out + * that finding _the_ optimum lookup tables, which maximize the + * average F[k], is a combinatorially difficult problem. But any + * valid preprocessing will still provide O(1) time for the call to + * gsl_ran_discrete(). I find that if I artificially set F[k]=1 -- + * ie, better than optimum! -- I get a speedup of maybe 20%, so that's + * the maximum I could expect from the most expensive preprocessing. + * Folding in the difference of 0.6 vs 0.75, I'd estimate that the + * speedup would be less than 10%. + + * I've not implemented it here, but one compromise is to sort the + * probabilities once, and then work from the two ends inward. This + * requires O(K log K), still lots cheaper than O(K^2), and from my + * experiments with the perl script, the figure of merit is within + * about 0.01 for K up to 1000, and no sign of diverging (in fact, + * they seemed to be converging, but it's hard to say with just a + * handful of runs). + + * The O(K) algorithm goes through all the p_k's and decides if they + * are "smalls" or "bigs" according to whether they are less than or + * greater than the mean value 1/K. The indices to the smalls and the + * bigs are put in separate stacks, and then we work through the + * stacks together. For each small, we pair it up with the next big + * in the stack (Walker always wanted to pair up the smallest small + * with the biggest big). The small "borrows" from the big just + * enough to bring the small up to mean. This reduces the size of the + * big, so the (smaller) big is compared again to the mean, and if it + * is smaller, it gets "popped" from the big stack and "pushed" to the + * small stack. Otherwise, it stays put. Since every time we pop a + * small, we are able to deal with it right then and there, and we + * never have to pop more than K smalls, then the algorithm is O(K). + + * This implementation sets up two separate stacks, and allocates K + * elements between them. Since neither stack ever grows, we do an + * extra O(K) pass through the data to determine how many smalls and + * bigs there are to begin with and allocate appropriately. In all + * there are 2*K*sizeof(double) transient bytes of memory that are + * used than returned, and K*(sizeof(int)+sizeof(double)) bytes used + * in the lookup table. + + * Walker spoke of using two random numbers (an integer 0..K-1, and a + * floating point u in [0,1]), but Knuth points out that one can just + * use the integer and fractional parts of K*u where u is in [0,1]. + * In fact, Knuth further notes that taking F'[k]=(k+F[k])/K, one can + * directly compare u to F'[k] without having to explicitly set + * u=K*u-int(K*u). + + * Usage: + + * Starting with an array of probabilities P, initialize and do + * preprocessing with a call to: + + * gsl_rng *r; + * gsl_ran_discrete_t *f; + * f = gsl_ran_discrete_preproc(K,P); + + * Then, whenever a random index 0..K-1 is desired, use + + * k = gsl_ran_discrete(r,f); + + * Note that several different randevent struct's can be + * simultaneously active. + + * Aside: A very clever alternative approach is described in + * Abramowitz and Stegun, p 950, citing: Marsaglia, Random variables + * and computers, Proc Third Prague Conference in Probability Theory, + * 1962. A more accesible reference is: G. Marsaglia, Generating + * discrete random numbers in a computer, Comm ACM 6, 37-38 (1963). + * If anybody is interested, I (jt) have also coded up this version as + * part of another software package. However, I've done some + * comparisons, and the Walker method is both faster and more stingy + * with memory. So, in the end I decided not to include it with the + * GSL package. + + * Written 26 Jan 1999, James Theiler, jt@lanl.gov + * Adapted to GSL, 30 Jan 1999, jt + + */ + +#include +#include /* used for NULL, also fprintf(stderr,...) */ +#include /* used for malloc's */ +#include +#include +#include +#include +#define DEBUG 0 +#define KNUTH_CONVENTION 1 /* Saves a few steps of arithmetic + * in the call to gsl_ran_discrete() + */ + +/*** Begin Stack (this code is used just in this file) ***/ + +/* Stack code converted to use unsigned indices (i.e. s->i == 0 now + means an empty stack, instead of -1), for consistency and to give a + bigger allowable range. BJG */ + +typedef struct { + size_t N; /* max number of elts on stack */ + size_t *v; /* array of values on the stack */ + size_t i; /* index of top of stack */ +} gsl_stack_t; + +static gsl_stack_t * +new_stack(size_t N) { + gsl_stack_t *s; + s = (gsl_stack_t *)malloc(sizeof(gsl_stack_t)); + s->N = N; + s->i = 0; /* indicates stack is empty */ + s->v = (size_t *)malloc(sizeof(size_t)*N); + return s; +} + +static int +push_stack(gsl_stack_t *s, size_t v) +{ + if ((s->i) >= (s->N)) { + return -1; /* stack overflow (shouldn't happen) */ + } + (s->v)[s->i] = v; + s->i += 1; + return 0; +} + +static size_t pop_stack(gsl_stack_t *s) +{ + if ((s->i) == 0) { + GSL_ERROR ("internal error - stack exhausted", GSL_ESANITY); + } + s->i -= 1; + return ((s->v)[s->i]); +} + +static inline size_t size_stack(const gsl_stack_t *s) +{ + return s->i; +} + +static void free_stack(gsl_stack_t *s) +{ + free((char *)(s->v)); + free((char *)s); +} + +/*** End Stack ***/ + + +/*** Begin Walker's Algorithm ***/ + +gsl_ran_discrete_t * +gsl_ran_discrete_preproc(size_t Kevents, const double *ProbArray) +{ + size_t k,b,s; + gsl_ran_discrete_t *g; + size_t nBigs, nSmalls; + gsl_stack_t *Bigs; + gsl_stack_t *Smalls; + double *E; + double pTotal = 0.0, mean, d; + + if (Kevents < 1) { + /* Could probably treat Kevents=1 as a special case */ + + GSL_ERROR_VAL ("number of events must be a positive integer", + GSL_EINVAL, 0); + } + + /* Make sure elements of ProbArray[] are positive. + * Won't enforce that sum is unity; instead will just normalize + */ + + for (k=0; kK = Kevents; + g->F = (double *)malloc(sizeof(double)*Kevents); + g->A = (size_t *)malloc(sizeof(size_t)*Kevents); + + E = (double *)malloc(sizeof(double)*Kevents); + + if (E==NULL) { + GSL_ERROR_VAL ("Cannot allocate memory for randevent", GSL_ENOMEM, 0); + } + + for (k=0; kA[k] to indicate small or large */ + size_t * const which = g->A; + + for (k=0; k 0) { + s = pop_stack(Smalls); + if (size_stack(Bigs) == 0) { + (g->A)[s]=s; + (g->F)[s]=1.0; + continue; + } + b = pop_stack(Bigs); + (g->A)[s]=b; + (g->F)[s]=Kevents*E[s]; +#if DEBUG + fprintf(stderr,"s=%2d, A=%2d, F=%.4f\n",s,(g->A)[s],(g->F)[s]); +#endif + d = mean - E[s]; + E[s] += d; /* now E[s] == mean */ + E[b] -= d; + if (E[b] < mean) { + push_stack(Smalls,b); /* no longer big, join ranks of the small */ + } + else if (E[b] > mean) { + push_stack(Bigs,b); /* still big, put it back where you found it */ + } + else { + /* E[b]==mean implies it is finished too */ + (g->A)[b]=b; + (g->F)[b]=1.0; + } + } + while (size_stack(Bigs) > 0) { + b = pop_stack(Bigs); + (g->A)[b]=b; + (g->F)[b]=1.0; + } + /* Stacks have been emptied, and A and F have been filled */ + + if ( size_stack(Smalls) != 0) { + GSL_ERROR_VAL ("Smalls stack has not been emptied", + GSL_ESANITY, 0 ); + } + +#if 0 + /* if 1, then artificially set all F[k]'s to unity. This will + * give wrong answers, but you'll get them faster. But, not + * that much faster (I get maybe 20%); that's an upper bound + * on what the optimal preprocessing would give. + */ + for (k=0; kF)[k] = 1.0; + } +#endif + +#if KNUTH_CONVENTION + /* For convenience, set F'[k]=(k+F[k])/K */ + /* This saves some arithmetic in gsl_ran_discrete(); I find that + * it doesn't actually make much difference. + */ + for (k=0; kF)[k] += k; + (g->F)[k] /= Kevents; + } +#endif + + free_stack(Bigs); + free_stack(Smalls); + free((char *)E); + + return g; +} + +size_t +gsl_ran_discrete(const gsl_rng *r, const gsl_ran_discrete_t *g) +{ + size_t c=0; + double u,f; + u = gsl_rng_uniform(r); +#if KNUTH_CONVENTION + c = (u*(g->K)); +#else + u *= g->K; + c = u; + u -= c; +#endif + f = (g->F)[c]; + /* fprintf(stderr,"c,f,u: %d %.4f %f\n",c,f,u); */ + if (f == 1.0) return c; + + if (u < f) { + return c; + } + else { + return (g->A)[c]; + } +} + +void gsl_ran_discrete_free(gsl_ran_discrete_t *g) +{ + RETURN_IF_NULL (g); + free((char *)(g->A)); + free((char *)(g->F)); + free((char *)g); +} + +double +gsl_ran_discrete_pdf(size_t k, const gsl_ran_discrete_t *g) +{ + size_t i,K; + double f,p=0; + K= g->K; + if (k>K) return 0; + for (i=0; iF)[i]; +#if KNUTH_CONVENTION + f = K*f-i; +#endif + if (i==k) { + p += f; + } else if (k == (g->A)[i]) { + p += 1.0 - f; + } + } + return p/K; +} diff --git a/software/gsl-1.15/randist/erlang.c b/software/gsl-1.15/randist/erlang.c new file mode 100644 index 000000000..e3635f1fd --- /dev/null +++ b/software/gsl-1.15/randist/erlang.c @@ -0,0 +1,54 @@ +/* randist/erlang.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The sum of N samples from an exponential distribution gives an + Erlang distribution + + p(x) dx = x^(n-1) exp (-x/a) / ((n-1)!a^n) dx + + for x = 0 ... +infty */ + +double +gsl_ran_erlang (const gsl_rng * r, const double a, const double n) +{ + return gsl_ran_gamma (r, n, a); +} + +double +gsl_ran_erlang_pdf (const double x, const double a, const double n) +{ + if (x <= 0) + { + return 0 ; + } + else + { + double p; + double lngamma = gsl_sf_lngamma (n); + + p = exp ((n - 1) * log (x/a) - x/a - lngamma) / a; + return p; + } +} diff --git a/software/gsl-1.15/randist/exponential.c b/software/gsl-1.15/randist/exponential.c new file mode 100644 index 000000000..e13e1379a --- /dev/null +++ b/software/gsl-1.15/randist/exponential.c @@ -0,0 +1,53 @@ +/* randist/exponential.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The exponential distribution has the form + + p(x) dx = exp(-x/mu) dx/mu + + for x = 0 ... +infty */ + +double +gsl_ran_exponential (const gsl_rng * r, const double mu) +{ + double u = gsl_rng_uniform (r); + + return -mu * log1p (-u); +} + +double +gsl_ran_exponential_pdf (const double x, const double mu) +{ + if (x < 0) + { + return 0 ; + } + else + { + double p = exp (-x/mu)/mu; + + return p; + } +} diff --git a/software/gsl-1.15/randist/exppow.c b/software/gsl-1.15/randist/exppow.c new file mode 100644 index 000000000..f3fce0beb --- /dev/null +++ b/software/gsl-1.15/randist/exppow.c @@ -0,0 +1,122 @@ +/* randist/exppow.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 James Theiler, Brian Gough + * Copyright (C) 2006 Giulio Bottazzi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The exponential power probability distribution is + + p(x) dx = (1/(2 a Gamma(1+1/b))) * exp(-|x/a|^b) dx + + for -infty < x < infty. For b = 1 it reduces to the Laplace + distribution. + + The exponential power distribution is related to the gamma + distribution by E = a * pow(G(1/b),1/b), where E is an exponential + power variate and G is a gamma variate. + + We use this relation for b < 1. For b >=1 we use rejection methods + based on the laplace and gaussian distributions which should be + faster. For b>4 we revert to the gamma method. + + See P. R. Tadikamalla, "Random Sampling from the Exponential Power + Distribution", Journal of the American Statistical Association, + September 1980, Volume 75, Number 371, pages 683-686. + +*/ + +double +gsl_ran_exppow (const gsl_rng * r, const double a, const double b) +{ + if (b < 1 || b > 4) + { + double u = gsl_rng_uniform (r); + double v = gsl_ran_gamma (r, 1 / b, 1.0); + double z = a * pow (v, 1 / b); + + if (u > 0.5) + { + return z; + } + else + { + return -z; + } + } + else if (b == 1) + { + /* Laplace distribution */ + return gsl_ran_laplace (r, a); + } + else if (b < 2) + { + /* Use laplace distribution for rejection method, from Tadikamalla */ + + double x, h, u; + + double B = pow (1 / b, 1 / b); + + do + { + x = gsl_ran_laplace (r, B); + u = gsl_rng_uniform_pos (r); + h = -pow (fabs (x), b) + fabs (x) / B - 1 + (1 / b); + } + while (log (u) > h); + + return a * x; + } + else if (b == 2) + { + /* Gaussian distribution */ + return gsl_ran_gaussian (r, a / sqrt (2.0)); + } + else + { + /* Use gaussian for rejection method, from Tadikamalla */ + + double x, h, u; + + double B = pow (1 / b, 1 / b); + + do + { + x = gsl_ran_gaussian (r, B); + u = gsl_rng_uniform_pos (r); + h = -pow (fabs (x), b) + (x * x) / (2 * B * B) + (1 / b) - 0.5; + } + while (log (u) > h); + + return a * x; + } +} + +double +gsl_ran_exppow_pdf (const double x, const double a, const double b) +{ + double p; + double lngamma = gsl_sf_lngamma (1 + 1 / b); + p = (1 / (2 * a)) * exp (-pow (fabs (x / a), b) - lngamma); + return p; +} diff --git a/software/gsl-1.15/randist/fdist.c b/software/gsl-1.15/randist/fdist.c new file mode 100644 index 000000000..2aef9e895 --- /dev/null +++ b/software/gsl-1.15/randist/fdist.c @@ -0,0 +1,68 @@ +/* randist/fdist.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The F distribution has the form + + p(x) dx = (nu1^(nu1/2) nu2^(nu2/2) Gamma((nu1 + nu2)/2) / + Gamma(nu1/2) Gamma(nu2/2)) * + x^(nu1/2 - 1) (nu2 + nu1 * x)^(-nu1/2 -nu2/2) dx + + The method used here is the one described in Knuth */ + +double +gsl_ran_fdist (const gsl_rng * r, const double nu1, const double nu2) +{ + + double Y1 = gsl_ran_gamma (r, nu1 / 2, 2.0); + double Y2 = gsl_ran_gamma (r, nu2 / 2, 2.0); + + double f = (Y1 * nu2) / (Y2 * nu1); + + return f; +} + +double +gsl_ran_fdist_pdf (const double x, const double nu1, const double nu2) +{ + if (x < 0) + { + return 0 ; + } + else + { + double p; + double lglg = (nu1 / 2) * log (nu1) + (nu2 / 2) * log (nu2) ; + + double lg12 = gsl_sf_lngamma ((nu1 + nu2) / 2); + double lg1 = gsl_sf_lngamma (nu1 / 2); + double lg2 = gsl_sf_lngamma (nu2 / 2); + + p = + exp (lglg + lg12 - lg1 - lg2 + (nu1 / 2 - 1) * log (x) - + ((nu1 + nu2) / 2) * log (nu2 + nu1 * x)); + + return p; + } +} diff --git a/software/gsl-1.15/randist/flat.c b/software/gsl-1.15/randist/flat.c new file mode 100644 index 000000000..d81d41492 --- /dev/null +++ b/software/gsl-1.15/randist/flat.c @@ -0,0 +1,53 @@ +/* randist/flat.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* This is the uniform distribution in the range [a, b) + + p(x) dx = 1/(b-a) dx if a <= x < b + ..... = 0 otherwise + + */ + +double +gsl_ran_flat (const gsl_rng * r, const double a, const double b) +{ + double u = gsl_rng_uniform (r); + + /* A uniform distribution over [a,b) */ + + return a * (1 - u) + b * u; +} + +double +gsl_ran_flat_pdf (double x, const double a, const double b) +{ + if (x < b && x >= a) + { + return 1 / (b - a); + } + else + { + return 0; + } +} diff --git a/software/gsl-1.15/randist/gamma.c b/software/gsl-1.15/randist/gamma.c new file mode 100644 index 000000000..3dd350d84 --- /dev/null +++ b/software/gsl-1.15/randist/gamma.c @@ -0,0 +1,229 @@ +/* randist/gamma.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +static double gamma_large (const gsl_rng * r, const double a); +static double gamma_frac (const gsl_rng * r, const double a); + +/* The Gamma distribution of order a>0 is defined by: + + p(x) dx = {1 / \Gamma(a) b^a } x^{a-1} e^{-x/b} dx + + for x>0. If X and Y are independent gamma-distributed random + variables of order a1 and a2 with the same scale parameter b, then + X+Y has gamma distribution of order a1+a2. + + The algorithms below are from Knuth, vol 2, 2nd ed, p. 129. */ + +double +gsl_ran_gamma_knuth (const gsl_rng * r, const double a, const double b) +{ + /* assume a > 0 */ + unsigned int na = floor (a); + + if(a >= UINT_MAX) + { + return b * (gamma_large (r, floor (a)) + gamma_frac (r, a - floor (a))); + } + else if (a == na) + { + return b * gsl_ran_gamma_int (r, na); + } + else if (na == 0) + { + return b * gamma_frac (r, a); + } + else + { + return b * (gsl_ran_gamma_int (r, na) + gamma_frac (r, a - na)) ; + } +} + +double +gsl_ran_gamma_int (const gsl_rng * r, const unsigned int a) +{ + if (a < 12) + { + unsigned int i; + double prod = 1; + + for (i = 0; i < a; i++) + { + prod *= gsl_rng_uniform_pos (r); + } + + /* Note: for 12 iterations we are safe against underflow, since + the smallest positive random number is O(2^-32). This means + the smallest possible product is 2^(-12*32) = 10^-116 which + is within the range of double precision. */ + + return -log (prod); + } + else + { + return gamma_large (r, (double) a); + } +} + +static double +gamma_large (const gsl_rng * r, const double a) +{ + /* Works only if a > 1, and is most efficient if a is large + + This algorithm, reported in Knuth, is attributed to Ahrens. A + faster one, we are told, can be found in: J. H. Ahrens and + U. Dieter, Computing 12 (1974) 223-246. */ + + double sqa, x, y, v; + sqa = sqrt (2 * a - 1); + do + { + do + { + y = tan (M_PI * gsl_rng_uniform (r)); + x = sqa * y + a - 1; + } + while (x <= 0); + v = gsl_rng_uniform (r); + } + while (v > (1 + y * y) * exp ((a - 1) * log (x / (a - 1)) - sqa * y)); + + return x; +} + +static double +gamma_frac (const gsl_rng * r, const double a) +{ + /* This is exercise 16 from Knuth; see page 135, and the solution is + on page 551. */ + + double p, q, x, u, v; + + if (a == 0) { + return 0; + } + + p = M_E / (a + M_E); + do + { + u = gsl_rng_uniform (r); + v = gsl_rng_uniform_pos (r); + + if (u < p) + { + x = exp ((1 / a) * log (v)); + q = exp (-x); + } + else + { + x = 1 - log (v); + q = exp ((a - 1) * log (x)); + } + } + while (gsl_rng_uniform (r) >= q); + + return x; +} + +double +gsl_ran_gamma_pdf (const double x, const double a, const double b) +{ + if (x < 0) + { + return 0 ; + } + else if (x == 0) + { + if (a == 1) + return 1/b ; + else + return 0 ; + } + else if (a == 1) + { + return exp(-x/b)/b ; + } + else + { + double p; + double lngamma = gsl_sf_lngamma (a); + p = exp ((a - 1) * log (x/b) - x/b - lngamma)/b; + return p; + } +} + + +/* New version based on Marsaglia and Tsang, "A Simple Method for + * generating gamma variables", ACM Transactions on Mathematical + * Software, Vol 26, No 3 (2000), p363-372. + * + * Implemented by J.D.Lamb@btinternet.com, minor modifications for GSL + * by Brian Gough + */ + +double +gsl_ran_gamma_mt (const gsl_rng * r, const double a, const double b) +{ + return gsl_ran_gamma (r, a, b); +} + +double +gsl_ran_gamma (const gsl_rng * r, const double a, const double b) +{ + /* assume a > 0 */ + + if (a < 1) + { + double u = gsl_rng_uniform_pos (r); + return gsl_ran_gamma (r, 1.0 + a, b) * pow (u, 1.0 / a); + } + + { + double x, v, u; + double d = a - 1.0 / 3.0; + double c = (1.0 / 3.0) / sqrt (d); + + while (1) + { + do + { + x = gsl_ran_gaussian_ziggurat (r, 1.0); + v = 1.0 + c * x; + } + while (v <= 0); + + v = v * v * v; + u = gsl_rng_uniform_pos (r); + + if (u < 1 - 0.0331 * x * x * x * x) + break; + + if (log (u) < 0.5 * x * x + d * (1 - v + log (v))) + break; + } + + return b * d * v; + } +} diff --git a/software/gsl-1.15/randist/gauss.c b/software/gsl-1.15/randist/gauss.c new file mode 100644 index 000000000..1b3442ea3 --- /dev/null +++ b/software/gsl-1.15/randist/gauss.c @@ -0,0 +1,143 @@ +/* randist/gauss.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007 James Theiler, Brian Gough + * Copyright (C) 2006 Charles Karney + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* Of the two methods provided below, I think the Polar method is more + * efficient, but only when you are actually producing two random + * deviates. We don't produce two, because then we'd have to save one + * in a static variable for the next call, and that would screws up + * re-entrant or threaded code, so we only produce one. This makes + * the Ratio method suddenly more appealing. + * + * [Added by Charles Karney] We use Leva's implementation of the Ratio + * method which avoids calling log() nearly all the time and makes the + * Ratio method faster than the Polar method (when it produces just one + * result per call). Timing per call (gcc -O2 on 866MHz Pentium, + * average over 10^8 calls) + * + * Polar method: 660 ns + * Ratio method: 368 ns + * + */ + +/* Polar (Box-Mueller) method; See Knuth v2, 3rd ed, p122 */ + +double +gsl_ran_gaussian (const gsl_rng * r, const double sigma) +{ + double x, y, r2; + + do + { + /* choose x,y in uniform square (-1,-1) to (+1,+1) */ + x = -1 + 2 * gsl_rng_uniform_pos (r); + y = -1 + 2 * gsl_rng_uniform_pos (r); + + /* see if it is in the unit circle */ + r2 = x * x + y * y; + } + while (r2 > 1.0 || r2 == 0); + + /* Box-Muller transform */ + return sigma * y * sqrt (-2.0 * log (r2) / r2); +} + +/* Ratio method (Kinderman-Monahan); see Knuth v2, 3rd ed, p130. + * K+M, ACM Trans Math Software 3 (1977) 257-260. + * + * [Added by Charles Karney] This is an implementation of Leva's + * modifications to the original K+M method; see: + * J. L. Leva, ACM Trans Math Software 18 (1992) 449-453 and 454-455. */ + +double +gsl_ran_gaussian_ratio_method (const gsl_rng * r, const double sigma) +{ + double u, v, x, y, Q; + const double s = 0.449871; /* Constants from Leva */ + const double t = -0.386595; + const double a = 0.19600; + const double b = 0.25472; + const double r1 = 0.27597; + const double r2 = 0.27846; + + do /* This loop is executed 1.369 times on average */ + { + /* Generate a point P = (u, v) uniform in a rectangle enclosing + the K+M region v^2 <= - 4 u^2 log(u). */ + + /* u in (0, 1] to avoid singularity at u = 0 */ + u = 1 - gsl_rng_uniform (r); + + /* v is in the asymmetric interval [-0.5, 0.5). However v = -0.5 + is rejected in the last part of the while clause. The + resulting normal deviate is strictly symmetric about 0 + (provided that v is symmetric once v = -0.5 is excluded). */ + v = gsl_rng_uniform (r) - 0.5; + + /* Constant 1.7156 > sqrt(8/e) (for accuracy); but not by too + much (for efficiency). */ + v *= 1.7156; + + /* Compute Leva's quadratic form Q */ + x = u - s; + y = fabs (v) - t; + Q = x * x + y * (a * y - b * x); + + /* Accept P if Q < r1 (Leva) */ + /* Reject P if Q > r2 (Leva) */ + /* Accept if v^2 <= -4 u^2 log(u) (K+M) */ + /* This final test is executed 0.012 times on average. */ + } + while (Q >= r1 && (Q > r2 || v * v > -4 * u * u * log (u))); + + return sigma * (v / u); /* Return slope */ +} + +double +gsl_ran_gaussian_pdf (const double x, const double sigma) +{ + double u = x / fabs (sigma); + double p = (1 / (sqrt (2 * M_PI) * fabs (sigma))) * exp (-u * u / 2); + return p; +} + +double +gsl_ran_ugaussian (const gsl_rng * r) +{ + return gsl_ran_gaussian (r, 1.0); +} + +double +gsl_ran_ugaussian_ratio_method (const gsl_rng * r) +{ + return gsl_ran_gaussian_ratio_method (r, 1.0); +} + +double +gsl_ran_ugaussian_pdf (const double x) +{ + return gsl_ran_gaussian_pdf (x, 1.0); +} + diff --git a/software/gsl-1.15/randist/gausstail.c b/software/gsl-1.15/randist/gausstail.c new file mode 100644 index 000000000..e7c9ced79 --- /dev/null +++ b/software/gsl-1.15/randist/gausstail.c @@ -0,0 +1,107 @@ +/* randist/gausstail.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +double +gsl_ran_gaussian_tail (const gsl_rng * r, const double a, const double sigma) +{ + /* Returns a gaussian random variable larger than a + * This implementation does one-sided upper-tailed deviates. + */ + + double s = a / sigma; + + if (s < 1) + { + /* For small s, use a direct rejection method. The limit s < 1 + can be adjusted to optimise the overall efficiency */ + + double x; + + do + { + x = gsl_ran_gaussian (r, 1.0); + } + while (x < s); + return x * sigma; + } + else + { + /* Use the "supertail" deviates from the last two steps + * of Marsaglia's rectangle-wedge-tail method, as described + * in Knuth, v2, 3rd ed, pp 123-128. (See also exercise 11, p139, + * and the solution, p586.) + */ + + double u, v, x; + + do + { + u = gsl_rng_uniform (r); + do + { + v = gsl_rng_uniform (r); + } + while (v == 0.0); + x = sqrt (s * s - 2 * log (v)); + } + while (x * u > s); + return x * sigma; + } +} + +double +gsl_ran_gaussian_tail_pdf (const double x, const double a, const double sigma) +{ + if (x < a) + { + return 0; + } + else + { + double N, p; + double u = x / sigma ; + + double f = gsl_sf_erfc (a / (sqrt (2.0) * sigma)); + + N = 0.5 * f; + + p = (1 / (N * sqrt (2 * M_PI) * sigma)) * exp (-u * u / 2); + + return p; + } +} + +double +gsl_ran_ugaussian_tail (const gsl_rng * r, const double a) +{ + return gsl_ran_gaussian_tail (r, a, 1.0) ; +} + +double +gsl_ran_ugaussian_tail_pdf (const double x, const double a) +{ + return gsl_ran_gaussian_tail_pdf (x, a, 1.0) ; +} diff --git a/software/gsl-1.15/randist/gausszig.c b/software/gsl-1.15/randist/gausszig.c new file mode 100644 index 000000000..2ded63a3d --- /dev/null +++ b/software/gsl-1.15/randist/gausszig.c @@ -0,0 +1,227 @@ +/* gauss.c - gaussian random numbers, using the Ziggurat method + * + * Copyright (C) 2005 Jochen Voss. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * This routine is based on the following article, with a couple of + * modifications which simplify the implementation. + * + * George Marsaglia, Wai Wan Tsang + * The Ziggurat Method for Generating Random Variables + * Journal of Statistical Software, vol. 5 (2000), no. 8 + * http://www.jstatsoft.org/v05/i08/ + * + * The modifications are: + * + * 1) use 128 steps instead of 256 to decrease the amount of static + * data necessary. + * + * 2) use an acceptance sampling from an exponential wedge + * exp(-R*(x-R/2)) for the tail of the base strip to simplify the + * implementation. The area of exponential wedge is used in + * calculating 'v' and the coefficients in ziggurat table, so the + * coefficients differ slightly from those in the Marsaglia and Tsang + * paper. + * + * See also Leong et al, "A Comment on the Implementation of the + * Ziggurat Method", Journal of Statistical Software, vol 5 (2005), no 7. + * + */ + + +#include +#include +#include +#include +#include + +/* position of right-most step */ +#define PARAM_R 3.44428647676 + +/* tabulated values for the heigt of the Ziggurat levels */ +static const double ytab[128] = { + 1, 0.963598623011, 0.936280813353, 0.913041104253, + 0.892278506696, 0.873239356919, 0.855496407634, 0.838778928349, + 0.822902083699, 0.807732738234, 0.793171045519, 0.779139726505, + 0.765577436082, 0.752434456248, 0.739669787677, 0.727249120285, + 0.715143377413, 0.703327646455, 0.691780377035, 0.68048276891, + 0.669418297233, 0.65857233912, 0.647931876189, 0.637485254896, + 0.62722199145, 0.617132611532, 0.607208517467, 0.597441877296, + 0.587825531465, 0.578352913803, 0.569017984198, 0.559815170911, + 0.550739320877, 0.541785656682, 0.532949739145, 0.524227434628, + 0.515614886373, 0.507108489253, 0.498704867478, 0.490400854812, + 0.482193476986, 0.47407993601, 0.466057596125, 0.458123971214, + 0.450276713467, 0.442513603171, 0.434832539473, 0.427231532022, + 0.419708693379, 0.41226223212, 0.404890446548, 0.397591718955, + 0.390364510382, 0.383207355816, 0.376118859788, 0.369097692334, + 0.362142585282, 0.355252328834, 0.348425768415, 0.341661801776, + 0.334959376311, 0.328317486588, 0.321735172063, 0.31521151497, + 0.308745638367, 0.302336704338, 0.29598391232, 0.289686497571, + 0.283443729739, 0.27725491156, 0.271119377649, 0.265036493387, + 0.259005653912, 0.253026283183, 0.247097833139, 0.241219782932, + 0.235391638239, 0.229612930649, 0.223883217122, 0.218202079518, + 0.212569124201, 0.206983981709, 0.201446306496, 0.195955776745, + 0.190512094256, 0.185114984406, 0.179764196185, 0.174459502324, + 0.169200699492, 0.1639876086, 0.158820075195, 0.153697969964, + 0.148621189348, 0.143589656295, 0.138603321143, 0.133662162669, + 0.128766189309, 0.123915440582, 0.119109988745, 0.114349940703, + 0.10963544023, 0.104966670533, 0.100343857232, 0.0957672718266, + 0.0912372357329, 0.0867541250127, 0.082318375932, 0.0779304915295, + 0.0735910494266, 0.0693007111742, 0.065060233529, 0.0608704821745, + 0.056732448584, 0.05264727098, 0.0486162607163, 0.0446409359769, + 0.0407230655415, 0.0368647267386, 0.0330683839378, 0.0293369977411, + 0.0256741818288, 0.0220844372634, 0.0185735200577, 0.0151490552854, + 0.0118216532614, 0.00860719483079, 0.00553245272614, 0.00265435214565 +}; + +/* tabulated values for 2^24 times x[i]/x[i+1], + * used to accept for U*x[i+1]<=x[i] without any floating point operations */ +static const unsigned long ktab[128] = { + 0, 12590644, 14272653, 14988939, + 15384584, 15635009, 15807561, 15933577, + 16029594, 16105155, 16166147, 16216399, + 16258508, 16294295, 16325078, 16351831, + 16375291, 16396026, 16414479, 16431002, + 16445880, 16459343, 16471578, 16482744, + 16492970, 16502368, 16511031, 16519039, + 16526459, 16533352, 16539769, 16545755, + 16551348, 16556584, 16561493, 16566101, + 16570433, 16574511, 16578353, 16581977, + 16585398, 16588629, 16591685, 16594575, + 16597311, 16599901, 16602354, 16604679, + 16606881, 16608968, 16610945, 16612818, + 16614592, 16616272, 16617861, 16619363, + 16620782, 16622121, 16623383, 16624570, + 16625685, 16626730, 16627708, 16628619, + 16629465, 16630248, 16630969, 16631628, + 16632228, 16632768, 16633248, 16633671, + 16634034, 16634340, 16634586, 16634774, + 16634903, 16634972, 16634980, 16634926, + 16634810, 16634628, 16634381, 16634066, + 16633680, 16633222, 16632688, 16632075, + 16631380, 16630598, 16629726, 16628757, + 16627686, 16626507, 16625212, 16623794, + 16622243, 16620548, 16618698, 16616679, + 16614476, 16612071, 16609444, 16606571, + 16603425, 16599973, 16596178, 16591995, + 16587369, 16582237, 16576520, 16570120, + 16562917, 16554758, 16545450, 16534739, + 16522287, 16507638, 16490152, 16468907, + 16442518, 16408804, 16364095, 16301683, + 16207738, 16047994, 15704248, 15472926 +}; + +/* tabulated values of 2^{-24}*x[i] */ +static const double wtab[128] = { + 1.62318314817e-08, 2.16291505214e-08, 2.54246305087e-08, 2.84579525938e-08, + 3.10340022482e-08, 3.33011726243e-08, 3.53439060345e-08, 3.72152672658e-08, + 3.8950989572e-08, 4.05763964764e-08, 4.21101548915e-08, 4.35664624904e-08, + 4.49563968336e-08, 4.62887864029e-08, 4.75707945735e-08, 4.88083237257e-08, + 5.00063025384e-08, 5.11688950428e-08, 5.22996558616e-08, 5.34016475624e-08, + 5.44775307871e-08, 5.55296344581e-08, 5.65600111659e-08, 5.75704813695e-08, + 5.85626690412e-08, 5.95380306862e-08, 6.04978791776e-08, 6.14434034901e-08, + 6.23756851626e-08, 6.32957121259e-08, 6.42043903937e-08, 6.51025540077e-08, + 6.59909735447e-08, 6.68703634341e-08, 6.77413882848e-08, 6.8604668381e-08, + 6.94607844804e-08, 7.03102820203e-08, 7.11536748229e-08, 7.1991448372e-08, + 7.2824062723e-08, 7.36519550992e-08, 7.44755422158e-08, 7.52952223703e-08, + 7.61113773308e-08, 7.69243740467e-08, 7.77345662086e-08, 7.85422956743e-08, + 7.93478937793e-08, 8.01516825471e-08, 8.09539758128e-08, 8.17550802699e-08, + 8.25552964535e-08, 8.33549196661e-08, 8.41542408569e-08, 8.49535474601e-08, + 8.57531242006e-08, 8.65532538723e-08, 8.73542180955e-08, 8.8156298059e-08, + 8.89597752521e-08, 8.97649321908e-08, 9.05720531451e-08, 9.138142487e-08, + 9.21933373471e-08, 9.30080845407e-08, 9.38259651738e-08, 9.46472835298e-08, + 9.54723502847e-08, 9.63014833769e-08, 9.71350089201e-08, 9.79732621669e-08, + 9.88165885297e-08, 9.96653446693e-08, 1.00519899658e-07, 1.0138063623e-07, + 1.02247952126e-07, 1.03122261554e-07, 1.04003996769e-07, 1.04893609795e-07, + 1.05791574313e-07, 1.06698387725e-07, 1.07614573423e-07, 1.08540683296e-07, + 1.09477300508e-07, 1.1042504257e-07, 1.11384564771e-07, 1.12356564007e-07, + 1.13341783071e-07, 1.14341015475e-07, 1.15355110887e-07, 1.16384981291e-07, + 1.17431607977e-07, 1.18496049514e-07, 1.19579450872e-07, 1.20683053909e-07, + 1.21808209468e-07, 1.2295639141e-07, 1.24129212952e-07, 1.25328445797e-07, + 1.26556042658e-07, 1.27814163916e-07, 1.29105209375e-07, 1.30431856341e-07, + 1.31797105598e-07, 1.3320433736e-07, 1.34657379914e-07, 1.36160594606e-07, + 1.37718982103e-07, 1.39338316679e-07, 1.41025317971e-07, 1.42787873535e-07, + 1.44635331499e-07, 1.4657889173e-07, 1.48632138436e-07, 1.50811780719e-07, + 1.53138707402e-07, 1.55639532047e-07, 1.58348931426e-07, 1.61313325908e-07, + 1.64596952856e-07, 1.68292495203e-07, 1.72541128694e-07, 1.77574279496e-07, + 1.83813550477e-07, 1.92166040885e-07, 2.05295471952e-07, 2.22600839893e-07 +}; + + +double +gsl_ran_gaussian_ziggurat (const gsl_rng * r, const double sigma) +{ + unsigned long int i, j; + int sign; + double x, y; + + const unsigned long int range = r->type->max - r->type->min; + const unsigned long int offset = r->type->min; + + while (1) + { + if (range >= 0xFFFFFFFF) + { + unsigned long int k = gsl_rng_get(r) - offset; + i = (k & 0xFF); + j = (k >> 8) & 0xFFFFFF; + } + else if (range >= 0x00FFFFFF) + { + unsigned long int k1 = gsl_rng_get(r) - offset; + unsigned long int k2 = gsl_rng_get(r) - offset; + i = (k1 & 0xFF); + j = (k2 & 0x00FFFFFF); + } + else + { + i = gsl_rng_uniform_int (r, 256); /* choose the step */ + j = gsl_rng_uniform_int (r, 16777216); /* sample from 2^24 */ + } + + sign = (i & 0x80) ? +1 : -1; + i &= 0x7f; + + x = j * wtab[i]; + + if (j < ktab[i]) + break; + + if (i < 127) + { + double y0, y1, U1; + y0 = ytab[i]; + y1 = ytab[i + 1]; + U1 = gsl_rng_uniform (r); + y = y1 + (y0 - y1) * U1; + } + else + { + double U1, U2; + U1 = 1.0 - gsl_rng_uniform (r); + U2 = gsl_rng_uniform (r); + x = PARAM_R - log (U1) / PARAM_R; + y = exp (-PARAM_R * (x - 0.5 * PARAM_R)) * U2; + } + + if (y < exp (-0.5 * x * x)) + break; + } + + return sign * sigma * x; +} diff --git a/software/gsl-1.15/randist/geometric.c b/software/gsl-1.15/randist/geometric.c new file mode 100644 index 000000000..afce6b27b --- /dev/null +++ b/software/gsl-1.15/randist/geometric.c @@ -0,0 +1,67 @@ +/* randist/geometric.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* Geometric distribution (bernoulli trial with probability p) + + prob(k) = p (1 - p)^(k-1) for n = 1, 2, 3, ... + + It gives the distribution of "waiting times" for an event that + occurs with probability p. */ + +unsigned int +gsl_ran_geometric (const gsl_rng * r, const double p) +{ + double u = gsl_rng_uniform_pos (r); + + unsigned int k; + + if (p == 1) + { + k = 1; + } + else + { + k = log (u) / log (1 - p) + 1; + } + + return k; +} + +double +gsl_ran_geometric_pdf (const unsigned int k, const double p) +{ + if (k == 0) + { + return 0 ; + } + else if (k == 1) + { + return p ; + } + else + { + double P = p * pow (1 - p, k - 1.0); + return P; + } +} diff --git a/software/gsl-1.15/randist/gsl_randist.h b/software/gsl-1.15/randist/gsl_randist.h new file mode 100644 index 000000000..6f4b0e315 --- /dev/null +++ b/software/gsl-1.15/randist/gsl_randist.h @@ -0,0 +1,185 @@ +/* randist/gsl_randist.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_RANDIST_H__ +#define __GSL_RANDIST_H__ +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +unsigned int gsl_ran_bernoulli (const gsl_rng * r, double p); +double gsl_ran_bernoulli_pdf (const unsigned int k, double p); + +double gsl_ran_beta (const gsl_rng * r, const double a, const double b); +double gsl_ran_beta_pdf (const double x, const double a, const double b); + +unsigned int gsl_ran_binomial (const gsl_rng * r, double p, unsigned int n); +unsigned int gsl_ran_binomial_knuth (const gsl_rng * r, double p, unsigned int n); +unsigned int gsl_ran_binomial_tpe (const gsl_rng * r, double p, unsigned int n); +double gsl_ran_binomial_pdf (const unsigned int k, const double p, const unsigned int n); + +double gsl_ran_exponential (const gsl_rng * r, const double mu); +double gsl_ran_exponential_pdf (const double x, const double mu); + +double gsl_ran_exppow (const gsl_rng * r, const double a, const double b); +double gsl_ran_exppow_pdf (const double x, const double a, const double b); + +double gsl_ran_cauchy (const gsl_rng * r, const double a); +double gsl_ran_cauchy_pdf (const double x, const double a); + +double gsl_ran_chisq (const gsl_rng * r, const double nu); +double gsl_ran_chisq_pdf (const double x, const double nu); + +void gsl_ran_dirichlet (const gsl_rng * r, const size_t K, const double alpha[], double theta[]); +double gsl_ran_dirichlet_pdf (const size_t K, const double alpha[], const double theta[]); +double gsl_ran_dirichlet_lnpdf (const size_t K, const double alpha[], const double theta[]); + +double gsl_ran_erlang (const gsl_rng * r, const double a, const double n); +double gsl_ran_erlang_pdf (const double x, const double a, const double n); + +double gsl_ran_fdist (const gsl_rng * r, const double nu1, const double nu2); +double gsl_ran_fdist_pdf (const double x, const double nu1, const double nu2); + +double gsl_ran_flat (const gsl_rng * r, const double a, const double b); +double gsl_ran_flat_pdf (double x, const double a, const double b); + +double gsl_ran_gamma (const gsl_rng * r, const double a, const double b); +double gsl_ran_gamma_int (const gsl_rng * r, const unsigned int a); +double gsl_ran_gamma_pdf (const double x, const double a, const double b); +double gsl_ran_gamma_mt (const gsl_rng * r, const double a, const double b); +double gsl_ran_gamma_knuth (const gsl_rng * r, const double a, const double b); + +double gsl_ran_gaussian (const gsl_rng * r, const double sigma); +double gsl_ran_gaussian_ratio_method (const gsl_rng * r, const double sigma); +double gsl_ran_gaussian_ziggurat (const gsl_rng * r, const double sigma); +double gsl_ran_gaussian_pdf (const double x, const double sigma); + +double gsl_ran_ugaussian (const gsl_rng * r); +double gsl_ran_ugaussian_ratio_method (const gsl_rng * r); +double gsl_ran_ugaussian_pdf (const double x); + +double gsl_ran_gaussian_tail (const gsl_rng * r, const double a, const double sigma); +double gsl_ran_gaussian_tail_pdf (const double x, const double a, const double sigma); + +double gsl_ran_ugaussian_tail (const gsl_rng * r, const double a); +double gsl_ran_ugaussian_tail_pdf (const double x, const double a); + +void gsl_ran_bivariate_gaussian (const gsl_rng * r, double sigma_x, double sigma_y, double rho, double *x, double *y); +double gsl_ran_bivariate_gaussian_pdf (const double x, const double y, const double sigma_x, const double sigma_y, const double rho); + +double gsl_ran_landau (const gsl_rng * r); +double gsl_ran_landau_pdf (const double x); + +unsigned int gsl_ran_geometric (const gsl_rng * r, const double p); +double gsl_ran_geometric_pdf (const unsigned int k, const double p); + +unsigned int gsl_ran_hypergeometric (const gsl_rng * r, unsigned int n1, unsigned int n2, unsigned int t); +double gsl_ran_hypergeometric_pdf (const unsigned int k, const unsigned int n1, const unsigned int n2, unsigned int t); + +double gsl_ran_gumbel1 (const gsl_rng * r, const double a, const double b); +double gsl_ran_gumbel1_pdf (const double x, const double a, const double b); + +double gsl_ran_gumbel2 (const gsl_rng * r, const double a, const double b); +double gsl_ran_gumbel2_pdf (const double x, const double a, const double b); + +double gsl_ran_logistic (const gsl_rng * r, const double a); +double gsl_ran_logistic_pdf (const double x, const double a); + +double gsl_ran_lognormal (const gsl_rng * r, const double zeta, const double sigma); +double gsl_ran_lognormal_pdf (const double x, const double zeta, const double sigma); + +unsigned int gsl_ran_logarithmic (const gsl_rng * r, const double p); +double gsl_ran_logarithmic_pdf (const unsigned int k, const double p); + +void gsl_ran_multinomial (const gsl_rng * r, const size_t K, + const unsigned int N, const double p[], + unsigned int n[] ); +double gsl_ran_multinomial_pdf (const size_t K, + const double p[], const unsigned int n[] ); +double gsl_ran_multinomial_lnpdf (const size_t K, + const double p[], const unsigned int n[] ); + + +unsigned int gsl_ran_negative_binomial (const gsl_rng * r, double p, double n); +double gsl_ran_negative_binomial_pdf (const unsigned int k, const double p, double n); + +unsigned int gsl_ran_pascal (const gsl_rng * r, double p, unsigned int n); +double gsl_ran_pascal_pdf (const unsigned int k, const double p, unsigned int n); + +double gsl_ran_pareto (const gsl_rng * r, double a, const double b); +double gsl_ran_pareto_pdf (const double x, const double a, const double b); + +unsigned int gsl_ran_poisson (const gsl_rng * r, double mu); +void gsl_ran_poisson_array (const gsl_rng * r, size_t n, unsigned int array[], + double mu); +double gsl_ran_poisson_pdf (const unsigned int k, const double mu); + +double gsl_ran_rayleigh (const gsl_rng * r, const double sigma); +double gsl_ran_rayleigh_pdf (const double x, const double sigma); + +double gsl_ran_rayleigh_tail (const gsl_rng * r, const double a, const double sigma); +double gsl_ran_rayleigh_tail_pdf (const double x, const double a, const double sigma); + +double gsl_ran_tdist (const gsl_rng * r, const double nu); +double gsl_ran_tdist_pdf (const double x, const double nu); + +double gsl_ran_laplace (const gsl_rng * r, const double a); +double gsl_ran_laplace_pdf (const double x, const double a); + +double gsl_ran_levy (const gsl_rng * r, const double c, const double alpha); +double gsl_ran_levy_skew (const gsl_rng * r, const double c, const double alpha, const double beta); + +double gsl_ran_weibull (const gsl_rng * r, const double a, const double b); +double gsl_ran_weibull_pdf (const double x, const double a, const double b); + +void gsl_ran_dir_2d (const gsl_rng * r, double * x, double * y); +void gsl_ran_dir_2d_trig_method (const gsl_rng * r, double * x, double * y); +void gsl_ran_dir_3d (const gsl_rng * r, double * x, double * y, double * z); +void gsl_ran_dir_nd (const gsl_rng * r, size_t n, double * x); + +void gsl_ran_shuffle (const gsl_rng * r, void * base, size_t nmembm, size_t size); +int gsl_ran_choose (const gsl_rng * r, void * dest, size_t k, void * src, size_t n, size_t size) ; +void gsl_ran_sample (const gsl_rng * r, void * dest, size_t k, void * src, size_t n, size_t size) ; + + +typedef struct { /* struct for Walker algorithm */ + size_t K; + size_t *A; + double *F; +} gsl_ran_discrete_t; + +gsl_ran_discrete_t * gsl_ran_discrete_preproc (size_t K, const double *P); +void gsl_ran_discrete_free(gsl_ran_discrete_t *g); +size_t gsl_ran_discrete (const gsl_rng *r, const gsl_ran_discrete_t *g); +double gsl_ran_discrete_pdf (size_t k, const gsl_ran_discrete_t *g); + + +__END_DECLS + +#endif /* __GSL_RANDIST_H__ */ diff --git a/software/gsl-1.15/randist/gumbel.c b/software/gsl-1.15/randist/gumbel.c new file mode 100644 index 000000000..8ec9c5679 --- /dev/null +++ b/software/gsl-1.15/randist/gumbel.c @@ -0,0 +1,78 @@ +/* randist/gumbel.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Type I Gumbel distribution has the form, + + p(x) dx = a b exp(-(b exp(-ax) + ax)) dx + + and the Type II Gumbel distribution has the form, + + p(x) dx = b a x^-(a+1) exp(-b x^-a)) dx + + */ + +double +gsl_ran_gumbel1 (const gsl_rng * r, const double a, const double b) +{ + double x = gsl_rng_uniform_pos (r); + + double z = (log(b) - log(-log(x))) / a; + + return z; +} + +double +gsl_ran_gumbel1_pdf (const double x, const double a, const double b) +{ + double p = a * b * exp (-(b * exp(-a * x) + a * x)); + return p; +} + +double +gsl_ran_gumbel2 (const gsl_rng * r, const double a, const double b) +{ + double x = gsl_rng_uniform_pos (r); + + double z = pow(-b / log(x), 1/a); + + return z; +} + +double +gsl_ran_gumbel2_pdf (const double x, const double a, const double b) +{ + if (x <= 0) + { + return 0 ; + } + else + { + double p = b * a * pow(x,-(a+1)) * exp (-b * pow(x, -a)); + return p; + } +} + + + + diff --git a/software/gsl-1.15/randist/hyperg.c b/software/gsl-1.15/randist/hyperg.c new file mode 100644 index 000000000..46b74047e --- /dev/null +++ b/software/gsl-1.15/randist/hyperg.c @@ -0,0 +1,124 @@ +/* randist/hyperg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The hypergeometric distribution has the form, + + prob(k) = choose(n1,t) choose(n2, t-k) / choose(n1+n2,t) + + where choose(a,b) = a!/(b!(a-b)!) + + n1 + n2 is the total population (tagged plus untagged) + n1 is the tagged population + t is the number of samples taken (without replacement) + k is the number of tagged samples found + +*/ + +unsigned int +gsl_ran_hypergeometric (const gsl_rng * r, unsigned int n1, unsigned int n2, + unsigned int t) +{ + const unsigned int n = n1 + n2; + + unsigned int i = 0; + unsigned int a = n1; + unsigned int b = n1 + n2; + unsigned int k = 0; + + if (t > n) + { + t = n ; + } + + if (t < n / 2) + { + for (i = 0 ; i < t ; i++) + { + double u = gsl_rng_uniform(r) ; + + if (b * u < a) + { + k++ ; + if (k == n1) + return k ; + a-- ; + } + b-- ; + } + return k; + } + else + { + for (i = 0 ; i < n - t ; i++) + { + double u = gsl_rng_uniform(r) ; + + if (b * u < a) + { + k++ ; + if (k == n1) + return n1 - k ; + a-- ; + } + b-- ; + } + return n1 - k; + } + + +} + +double +gsl_ran_hypergeometric_pdf (const unsigned int k, + const unsigned int n1, + const unsigned int n2, + unsigned int t) +{ + if (t > n1 + n2) + { + t = n1 + n2 ; + } + + if (k > n1 || k > t) + { + return 0 ; + } + else if (t > n2 && k + n2 < t ) + { + return 0 ; + } + else + { + double p; + + double c1 = gsl_sf_lnchoose(n1,k); + double c2 = gsl_sf_lnchoose(n2,t-k); + double c3 = gsl_sf_lnchoose(n1+n2,t); + + p = exp(c1 + c2 - c3) ; + + return p; + } +} diff --git a/software/gsl-1.15/randist/landau.c b/software/gsl-1.15/randist/landau.c new file mode 100644 index 000000000..3a5966c55 --- /dev/null +++ b/software/gsl-1.15/randist/landau.c @@ -0,0 +1,565 @@ +/* randist/landau.c + * + * Copyright (C) 2001, 2004 David Morrison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Adapted from the CERN library routines DENLAN, RANLAN, and DISLAN + * as described in http://consult.cern.ch/shortwrups/g110/top.html. + * Original author: K.S. K\"olbig. + * + * The distribution is given by the complex path integral, + * + * p(x) = (1/(2 pi i)) \int_{c-i\inf}^{c+i\inf} ds exp(s log(s) + x s) + * + * which can be converted into a real integral over [0,+\inf] + * + * p(x) = (1/pi) \int_0^\inf dt \exp(-t log(t) - x t) sin(pi t) + * + */ + +#include +#include +#include +#include + +double +gsl_ran_landau_pdf(const double x) +{ + static double P1[5] = + { + 0.4259894875E0, -0.1249762550E0, 0.3984243700E-1, + -0.6298287635E-2, 0.1511162253E-2 + }; + static double P2[5] = + { + 0.1788541609E0, 0.1173957403E0, 0.1488850518E-1, + -0.1394989411E-2, 0.1283617211E-3 + }; + static double P3[5] = + { + 0.1788544503E0, 0.9359161662E-1, 0.6325387654E-2, + 0.6611667319E-4, -0.2031049101E-5 + }; + static double P4[5] = + { + 0.9874054407E0, 0.1186723273E3, 0.8492794360E3, + -0.7437792444E3, 0.4270262186E3 + }; + static double P5[5] = + { + 0.1003675074E1, 0.1675702434E3, 0.4789711289E4, + 0.2121786767E5, -0.2232494910E5 + }; + static double P6[5] = + { + 0.1000827619E1, 0.6649143136E3, 0.6297292665E5, + 0.4755546998E6, -0.5743609109E7 + }; + + static double Q1[5] = + { + 1.0, -0.3388260629E0, 0.9594393323E-1, + -0.1608042283E-1, 0.3778942063E-2 + }; + static double Q2[5] = + { + 1.0, 0.7428795082E0, 0.3153932961E0, + 0.6694219548E-1, 0.8790609714E-2 + }; + static double Q3[5] = + { + 1.0, 0.6097809921E0, 0.2560616665E0, + 0.4746722384E-1, 0.6957301675E-2 + }; + static double Q4[5] = + { + 1.0, 0.1068615961E3, 0.3376496214E3, + 0.2016712389E4, 0.1597063511E4 + }; + static double Q5[5] = + { + 1.0, 0.1569424537E3, 0.3745310488E4, + 0.9834698876E4, 0.6692428357E5 + }; + static double Q6[5] = + { + 1.0, 0.6514101098E3, 0.5697473333E5, + 0.1659174725E6, -0.2815759939E7 + }; + + static double A1[3] = + { + 0.4166666667E-1, -0.1996527778E-1, 0.2709538966E-1 + }; + static double A2[2] = + { + -0.1845568670E1, -0.4284640743E1 + }; + + double U, V, DENLAN; + + V = x; + if (V < -5.5) + { + U = exp(V + 1.0); + DENLAN = 0.3989422803 * (exp( -1 / U) / sqrt(U)) * + (1 + (A1[0] + (A1[1] + A1[2] * U) * U) * U); + } + else if (V < -1) + { + U = exp( -V - 1); + DENLAN = exp( -U) * sqrt(U) * + (P1[0] + (P1[1] + (P1[2] + (P1[3] + P1[4] * V) * V) * V) * V) / + (Q1[0] + (Q1[1] + (Q1[2] + (Q1[3] + Q1[4] * V) * V) * V) * V); + } + else if (V < 1) + { + DENLAN = (P2[0] + (P2[1] + (P2[2] + (P2[3] + P2[4] * V) * V) * V) * V) / + (Q2[0] + (Q2[1] + (Q2[2] + (Q2[3] + Q2[4] * V) * V) * V) * V); + } + else if (V < 5) + { + DENLAN = (P3[0] + (P3[1] + (P3[2] + (P3[3] + P3[4] * V) * V) * V) * V) / + (Q3[0] + (Q3[1] + (Q3[2] + (Q3[3] + Q3[4] * V) * V) * V) * V); + } + else if (V < 12) + { + U = 1 / V; + DENLAN = U * U * + (P4[0] + (P4[1] + (P4[2] + (P4[3] + P4[4] * U) * U) * U) * U) / + (Q4[0] + (Q4[1] + (Q4[2] + (Q4[3] + Q4[4] * U) * U) * U) * U); + } + else if (V < 50) + { + U = 1 / V; + DENLAN = U * U * + (P5[0] + (P5[1] + (P5[2] + (P5[3] + P5[4] * U) * U) * U) * U) / + (Q5[0] + (Q5[1] + (Q5[2] + (Q5[3] + Q5[4] * U) * U) * U) * U); + } + else if (V < 300) + { + U = 1 / V; + DENLAN = U * U * + (P6[0] + (P6[1] + (P6[2] + (P6[3] + P6[4] * U) * U) * U) * U) / + (Q6[0] + (Q6[1] + (Q6[2] + (Q6[3] + Q6[4] * U) * U) * U) * U); + } + else + { + U = 1 / (V - V * log(V) / (V + 1)); + DENLAN = U * U * (1 + (A2[0] + A2[1] * U) * U); + } + + return DENLAN; +} + +#if 0 /* Not needed yet */ +/* This function is a translation from the original Fortran of the + * CERN library routine DISLAN, the integral from -inf to x of the + * Landau p.d.f. + */ +static +double +gsl_ran_landau_dislan(const double x) +{ + static double P1[5] = + { + 0.2514091491E0, -0.6250580444E-1, + 0.1458381230E-1, -0.2108817737E-2, + 0.7411247290E-3 + }; + + static double P2[4] = + { + 0.2868328584E0, 0.3564363231E0, + 0.1523518695E0, 0.2251304883E-1 + }; + + static double P3[4] = + { + 0.2868329066E0, 0.3003828436E0, + 0.9950951941E-1, 0.8733827185E-2 + }; + + static double P4[4] = + { + 0.1000351630E1, 0.4503592498E1, + 0.1085883880E2, 0.7536052269E1 + }; + + static double P5[4] = + { + 0.1000006517E1, 0.4909414111E2, + 0.8505544753E2, 0.1532153455E3 + }; + + static double P6[4] = + { + 0.1000000983E1, 0.1329868456E3, + 0.9162149244E3, -0.9605054274E3 + }; + + static double Q1[5] = + { + 1.0, -0.5571175625E-2, + 0.6225310236E-1, -0.3137378427E-2, + 0.1931496439E-2 + }; + + static double Q2[4] = + { + 1.0, 0.6191136137E0, + 0.1720721448E0, 0.2278594771E-1 + }; + + static double Q3[4] = + { + 1.0, 0.4237190502E0, + 0.1095631512E0, 0.8693851567E-2 + }; + + static double Q4[4] = + { + 1.0, 0.5539969678E1, + 0.1933581111E2, 0.2721321508E2 + }; + + static double Q5[4] = + { + 1.0, 0.5009928881E2, + 0.1399819104E3, 0.4200002909E3 + }; + + static double Q6[4] = + { + 1.0, 0.1339887843E3, + 0.1055990413E4, 0.5532224619E3 + }; + + static double A1[3] = + { + -0.4583333333E0, 0.6675347222E0, -0.1641741416E1 + }; + + static double A2[3] = + { + 1.0, -0.4227843351E0, -0.2043403138E1 + }; + + double U, V, DISLAN; + + V = x; + if (V < -5.5) + { + U = exp(V + 1); + DISLAN = 0.3989422803 * exp( -1 / U) * sqrt(U) * + (1 + (A1[0] + (A1[1] + A1[2] * U) * U) * U); + } + else if (V < -1) + { + U = exp( -V - 1); + DISLAN = (exp( -U) / sqrt(U)) * + (P1[0] + (P1[1] + (P1[2] + (P1[3] + P1[4] * V) * V) * V) * V) / + (Q1[0] + (Q1[1] + (Q1[2] + (Q1[3] + Q1[4] * V) * V) * V) * V); + } + else if (V < 1) + { + DISLAN = (P2[0] + (P2[1] + (P2[2] + P2[3] * V) * V) * V) / + (Q2[0] + (Q2[1] + (Q2[2] + Q2[3] * V) * V) * V); + } + else if (V < 4) + { + DISLAN = (P3[0] + (P3[1] + (P3[2] + P3[3] * V) * V) * V) / + (Q3[0] + (Q3[1] + (Q3[2] + Q3[3] * V) * V) * V); + } + else if (V < 12) + { + U = 1 / V; + DISLAN = (P4[0] + (P4[1] + (P4[2] + P4[3] * U) * U) * U) / + (Q4[0] + (Q4[1] + (Q4[2] + Q4[3] * U) * U) * U); + } + else if (V < 50) + { + U = 1 / V; + DISLAN = (P5[0] + (P5[1] + (P5[2] + P5[3] * U) * U) * U) / + (Q5[0] + (Q5[1] + (Q5[2] + Q5[3] * U) * U) * U); + } + else if (V < 300) + { + U = 1 / V; + DISLAN = (P6[0] + (P6[1] + (P6[2] + P6[3] * U) * U) * U) / + (Q6[0] + (Q6[1] + (Q6[2] + Q6[3] * U) * U) * U); + } + else + { + U = 1 / (V - V * log(V) / (V + 1)); + DISLAN = 1 - (A2[0] + (A2[1] + A2[2] * U) * U) * U; + } + + return DISLAN; +} +#endif + +double +gsl_ran_landau(const gsl_rng * r) +{ + static double F[983] = + { + 0.0000000, /* Add empty element [0] to account for difference + between C and Fortran convention for lower bound. */ + 00.000000, 00.000000, 00.000000, 00.000000, 00.000000, + -2.244733, -2.204365, -2.168163, -2.135219, -2.104898, + -2.076740, -2.050397, -2.025605, -2.002150, -1.979866, + -1.958612, -1.938275, -1.918760, -1.899984, -1.881879, + -1.864385, -1.847451, -1.831030, -1.815083, -1.799574, + -1.784473, -1.769751, -1.755383, -1.741346, -1.727620, + -1.714187, -1.701029, -1.688130, -1.675477, -1.663057, + -1.650858, -1.638868, -1.627078, -1.615477, -1.604058, + -1.592811, -1.581729, -1.570806, -1.560034, -1.549407, + -1.538919, -1.528565, -1.518339, -1.508237, -1.498254, + -1.488386, -1.478628, -1.468976, -1.459428, -1.449979, + -1.440626, -1.431365, -1.422195, -1.413111, -1.404112, + -1.395194, -1.386356, -1.377594, -1.368906, -1.360291, + -1.351746, -1.343269, -1.334859, -1.326512, -1.318229, + -1.310006, -1.301843, -1.293737, -1.285688, -1.277693, + -1.269752, -1.261863, -1.254024, -1.246235, -1.238494, + -1.230800, -1.223153, -1.215550, -1.207990, -1.200474, + -1.192999, -1.185566, -1.178172, -1.170817, -1.163500, + -1.156220, -1.148977, -1.141770, -1.134598, -1.127459, + -1.120354, -1.113282, -1.106242, -1.099233, -1.092255, + -1.085306, -1.078388, -1.071498, -1.064636, -1.057802, + -1.050996, -1.044215, -1.037461, -1.030733, -1.024029, + -1.017350, -1.010695, -1.004064, -0.997456, -0.990871, + -0.984308, -0.977767, -0.971247, -0.964749, -0.958271, + -0.951813, -0.945375, -0.938957, -0.932558, -0.926178, + -0.919816, -0.913472, -0.907146, -0.900838, -0.894547, + -0.888272, -0.882014, -0.875773, -0.869547, -0.863337, + -0.857142, -0.850963, -0.844798, -0.838648, -0.832512, + -0.826390, -0.820282, -0.814187, -0.808106, -0.802038, + -0.795982, -0.789940, -0.783909, -0.777891, -0.771884, + -0.765889, -0.759906, -0.753934, -0.747973, -0.742023, + -0.736084, -0.730155, -0.724237, -0.718328, -0.712429, + -0.706541, -0.700661, -0.694791, -0.688931, -0.683079, + -0.677236, -0.671402, -0.665576, -0.659759, -0.653950, + -0.648149, -0.642356, -0.636570, -0.630793, -0.625022, + -0.619259, -0.613503, -0.607754, -0.602012, -0.596276, + -0.590548, -0.584825, -0.579109, -0.573399, -0.567695, + -0.561997, -0.556305, -0.550618, -0.544937, -0.539262, + -0.533592, -0.527926, -0.522266, -0.516611, -0.510961, + -0.505315, -0.499674, -0.494037, -0.488405, -0.482777, + -0.477153, -0.471533, -0.465917, -0.460305, -0.454697, + -0.449092, -0.443491, -0.437893, -0.432299, -0.426707, + -0.421119, -0.415534, -0.409951, -0.404372, -0.398795, + -0.393221, -0.387649, -0.382080, -0.376513, -0.370949, + -0.365387, -0.359826, -0.354268, -0.348712, -0.343157, + -0.337604, -0.332053, -0.326503, -0.320955, -0.315408, + -0.309863, -0.304318, -0.298775, -0.293233, -0.287692, + -0.282152, -0.276613, -0.271074, -0.265536, -0.259999, + -0.254462, -0.248926, -0.243389, -0.237854, -0.232318, + -0.226783, -0.221247, -0.215712, -0.210176, -0.204641, + -0.199105, -0.193568, -0.188032, -0.182495, -0.176957, + -0.171419, -0.165880, -0.160341, -0.154800, -0.149259, + -0.143717, -0.138173, -0.132629, -0.127083, -0.121537, + -0.115989, -0.110439, -0.104889, -0.099336, -0.093782, + -0.088227, -0.082670, -0.077111, -0.071550, -0.065987, + -0.060423, -0.054856, -0.049288, -0.043717, -0.038144, + -0.032569, -0.026991, -0.021411, -0.015828, -0.010243, + -0.004656, 00.000934, 00.006527, 00.012123, 00.017722, + 00.023323, 00.028928, 00.034535, 00.040146, 00.045759, + 00.051376, 00.056997, 00.062620, 00.068247, 00.073877, + 00.079511, 00.085149, 00.090790, 00.096435, 00.102083, + 00.107736, 00.113392, 00.119052, 00.124716, 00.130385, + 00.136057, 00.141734, 00.147414, 00.153100, 00.158789, + 00.164483, 00.170181, 00.175884, 00.181592, 00.187304, + 00.193021, 00.198743, 00.204469, 00.210201, 00.215937, + 00.221678, 00.227425, 00.233177, 00.238933, 00.244696, + 00.250463, 00.256236, 00.262014, 00.267798, 00.273587, + 00.279382, 00.285183, 00.290989, 00.296801, 00.302619, + 00.308443, 00.314273, 00.320109, 00.325951, 00.331799, + 00.337654, 00.343515, 00.349382, 00.355255, 00.361135, + 00.367022, 00.372915, 00.378815, 00.384721, 00.390634, + 00.396554, 00.402481, 00.408415, 00.414356, 00.420304, + 00.426260, 00.432222, 00.438192, 00.444169, 00.450153, + 00.456145, 00.462144, 00.468151, 00.474166, 00.480188, + 00.486218, 00.492256, 00.498302, 00.504356, 00.510418, + 00.516488, 00.522566, 00.528653, 00.534747, 00.540850, + 00.546962, 00.553082, 00.559210, 00.565347, 00.571493, + 00.577648, 00.583811, 00.589983, 00.596164, 00.602355, + 00.608554, 00.614762, 00.620980, 00.627207, 00.633444, + 00.639689, 00.645945, 00.652210, 00.658484, 00.664768, + 00.671062, 00.677366, 00.683680, 00.690004, 00.696338, + 00.702682, 00.709036, 00.715400, 00.721775, 00.728160, + 00.734556, 00.740963, 00.747379, 00.753807, 00.760246, + 00.766695, 00.773155, 00.779627, 00.786109, 00.792603, + 00.799107, 00.805624, 00.812151, 00.818690, 00.825241, + 00.831803, 00.838377, 00.844962, 00.851560, 00.858170, + 00.864791, 00.871425, 00.878071, 00.884729, 00.891399, + 00.898082, 00.904778, 00.911486, 00.918206, 00.924940, + 00.931686, 00.938446, 00.945218, 00.952003, 00.958802, + 00.965614, 00.972439, 00.979278, 00.986130, 00.992996, + 00.999875, 01.006769, 01.013676, 01.020597, 01.027533, + 01.034482, 01.041446, 01.048424, 01.055417, 01.062424, + 01.069446, 01.076482, 01.083534, 01.090600, 01.097681, + 01.104778, 01.111889, 01.119016, 01.126159, 01.133316, + 01.140490, 01.147679, 01.154884, 01.162105, 01.169342, + 01.176595, 01.183864, 01.191149, 01.198451, 01.205770, + 01.213105, 01.220457, 01.227826, 01.235211, 01.242614, + 01.250034, 01.257471, 01.264926, 01.272398, 01.279888, + 01.287395, 01.294921, 01.302464, 01.310026, 01.317605, + 01.325203, 01.332819, 01.340454, 01.348108, 01.355780, + 01.363472, 01.371182, 01.378912, 01.386660, 01.394429, + 01.402216, 01.410024, 01.417851, 01.425698, 01.433565, + 01.441453, 01.449360, 01.457288, 01.465237, 01.473206, + 01.481196, 01.489208, 01.497240, 01.505293, 01.513368, + 01.521465, 01.529583, 01.537723, 01.545885, 01.554068, + 01.562275, 01.570503, 01.578754, 01.587028, 01.595325, + 01.603644, 01.611987, 01.620353, 01.628743, 01.637156, + 01.645593, 01.654053, 01.662538, 01.671047, 01.679581, + 01.688139, 01.696721, 01.705329, 01.713961, 01.722619, + 01.731303, 01.740011, 01.748746, 01.757506, 01.766293, + 01.775106, 01.783945, 01.792810, 01.801703, 01.810623, + 01.819569, 01.828543, 01.837545, 01.846574, 01.855631, + 01.864717, 01.873830, 01.882972, 01.892143, 01.901343, + 01.910572, 01.919830, 01.929117, 01.938434, 01.947781, + 01.957158, 01.966566, 01.976004, 01.985473, 01.994972, + 02.004503, 02.014065, 02.023659, 02.033285, 02.042943, + 02.052633, 02.062355, 02.072110, 02.081899, 02.091720, + 02.101575, 02.111464, 02.121386, 02.131343, 02.141334, + 02.151360, 02.161421, 02.171517, 02.181648, 02.191815, + 02.202018, 02.212257, 02.222533, 02.232845, 02.243195, + 02.253582, 02.264006, 02.274468, 02.284968, 02.295507, + 02.306084, 02.316701, 02.327356, 02.338051, 02.348786, + 02.359562, 02.370377, 02.381234, 02.392131, 02.403070, + 02.414051, 02.425073, 02.436138, 02.447246, 02.458397, + 02.469591, 02.480828, 02.492110, 02.503436, 02.514807, + 02.526222, 02.537684, 02.549190, 02.560743, 02.572343, + 02.583989, 02.595682, 02.607423, 02.619212, 02.631050, + 02.642936, 02.654871, 02.666855, 02.678890, 02.690975, + 02.703110, 02.715297, 02.727535, 02.739825, 02.752168, + 02.764563, 02.777012, 02.789514, 02.802070, 02.814681, + 02.827347, 02.840069, 02.852846, 02.865680, 02.878570, + 02.891518, 02.904524, 02.917588, 02.930712, 02.943894, + 02.957136, 02.970439, 02.983802, 02.997227, 03.010714, + 03.024263, 03.037875, 03.051551, 03.065290, 03.079095, + 03.092965, 03.106900, 03.120902, 03.134971, 03.149107, + 03.163312, 03.177585, 03.191928, 03.206340, 03.220824, + 03.235378, 03.250005, 03.264704, 03.279477, 03.294323, + 03.309244, 03.324240, 03.339312, 03.354461, 03.369687, + 03.384992, 03.400375, 03.415838, 03.431381, 03.447005, + 03.462711, 03.478500, 03.494372, 03.510328, 03.526370, + 03.542497, 03.558711, 03.575012, 03.591402, 03.607881, + 03.624450, 03.641111, 03.657863, 03.674708, 03.691646, + 03.708680, 03.725809, 03.743034, 03.760357, 03.777779, + 03.795300, 03.812921, 03.830645, 03.848470, 03.866400, + 03.884434, 03.902574, 03.920821, 03.939176, 03.957640, + 03.976215, 03.994901, 04.013699, 04.032612, 04.051639, + 04.070783, 04.090045, 04.109425, 04.128925, 04.148547, + 04.168292, 04.188160, 04.208154, 04.228275, 04.248524, + 04.268903, 04.289413, 04.310056, 04.330832, 04.351745, + 04.372794, 04.393982, 04.415310, 04.436781, 04.458395, + 04.480154, 04.502060, 04.524114, 04.546319, 04.568676, + 04.591187, 04.613854, 04.636678, 04.659662, 04.682807, + 04.706116, 04.729590, 04.753231, 04.777041, 04.801024, + 04.825179, 04.849511, 04.874020, 04.898710, 04.923582, + 04.948639, 04.973883, 04.999316, 05.024942, 05.050761, + 05.076778, 05.102993, 05.129411, 05.156034, 05.182864, + 05.209903, 05.237156, 05.264625, 05.292312, 05.320220, + 05.348354, 05.376714, 05.405306, 05.434131, 05.463193, + 05.492496, 05.522042, 05.551836, 05.581880, 05.612178, + 05.642734, 05.673552, 05.704634, 05.735986, 05.767610, + 05.799512, 05.831694, 05.864161, 05.896918, 05.929968, + 05.963316, 05.996967, 06.030925, 06.065194, 06.099780, + 06.134687, 06.169921, 06.205486, 06.241387, 06.277630, + 06.314220, 06.351163, 06.388465, 06.426130, 06.464166, + 06.502578, 06.541371, 06.580553, 06.620130, 06.660109, + 06.700495, 06.741297, 06.782520, 06.824173, 06.866262, + 06.908795, 06.951780, 06.995225, 07.039137, 07.083525, + 07.128398, 07.173764, 07.219632, 07.266011, 07.312910, + 07.360339, 07.408308, 07.456827, 07.505905, 07.555554, + 07.605785, 07.656608, 07.708035, 07.760077, 07.812747, + 07.866057, 07.920019, 07.974647, 08.029953, 08.085952, + 08.142657, 08.200083, 08.258245, 08.317158, 08.376837, + 08.437300, 08.498562, 08.560641, 08.623554, 08.687319, + 08.751955, 08.817481, 08.883916, 08.951282, 09.019600, + 09.088889, 09.159174, 09.230477, 09.302822, 09.376233, + 09.450735, 09.526355, 09.603118, 09.681054, 09.760191, + 09.840558, 09.922186, 10.005107, 10.089353, 10.174959, + 10.261958, 10.350389, 10.440287, 10.531693, 10.624646, + 10.719188, 10.815362, 10.913214, 11.012789, 11.114137, + 11.217307, 11.322352, 11.429325, 11.538283, 11.649285, + 11.762390, 11.877664, 11.995170, 12.114979, 12.237161, + 12.361791, 12.488946, 12.618708, 12.751161, 12.886394, + 13.024498, 13.165570, 13.309711, 13.457026, 13.607625, + 13.761625, 13.919145, 14.080314, 14.245263, 14.414134, + 14.587072, 14.764233, 14.945778, 15.131877, 15.322712, + 15.518470, 15.719353, 15.925570, 16.137345, 16.354912, + 16.578520, 16.808433, 17.044929, 17.288305, 17.538873, + 17.796967, 18.062943, 18.337176, 18.620068, 18.912049, + 19.213574, 19.525133, 19.847249, 20.180480, 20.525429, + 20.882738, 21.253102, 21.637266, 22.036036, 22.450278, + 22.880933, 23.329017, 23.795634, 24.281981, 24.789364, + 25.319207, 25.873062, 26.452634, 27.059789, 27.696581, + 28.365274, 29.068370, 29.808638, 30.589157, 31.413354, + 32.285060, 33.208568, 34.188705, 35.230920, 36.341388, + 37.527131, 38.796172, 40.157721, 41.622399, 43.202525, + 44.912465, 46.769077, 48.792279, 51.005773, 53.437996, + 56.123356, 59.103894 + }; + double X, U, V, RANLAN; + int I; + + X = gsl_rng_uniform_pos(r); + U = 1000.0 * X; + I = U; + U = U - I; + + if (I >= 70 && I <= 800) + { + RANLAN = F[I] + U * (F[I + 1] - F[I]); + } + else if (I >= 7 && I <= 980) + { + RANLAN = F[I] + + U * (F[I + 1] - F[I] + - 0.25 * (1 - U) * (F[I + 2] - F[I + 1] - F[I] + F[I - 1])); + } + else if (I < 7) + { + V = log(X); + U = 1 / V; + RANLAN = ((0.99858950 + (3.45213058E1 + 1.70854528E1 * U) * U) / + (1 + (3.41760202E1 + 4.01244582 * U) * U)) * + ( -log( -0.91893853 - V) - 1); + } + else + { + U = 1 - X; + V = U * U; + if (X <= 0.999) + { + RANLAN = (1.00060006 + 2.63991156E2 * U + 4.37320068E3 * V) / + ((1 + 2.57368075E2 * U + 3.41448018E3 * V) * U); + } + else + { + RANLAN = (1.00001538 + 6.07514119E3 * U + 7.34266409E5 * V) / + ((1 + 6.06511919E3 * U + 6.94021044E5 * V) * U); + } + } + + return RANLAN; +} + diff --git a/software/gsl-1.15/randist/laplace.c b/software/gsl-1.15/randist/laplace.c new file mode 100644 index 000000000..659ac0a6a --- /dev/null +++ b/software/gsl-1.15/randist/laplace.c @@ -0,0 +1,57 @@ +/* randist/laplace.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The two-sided exponential probability distribution is + + p(x) dx = (1/(2 a)) * exp(-|x/a|) dx + + for -infty < x < infty. It is also known as the Laplace distribution. */ + +double +gsl_ran_laplace (const gsl_rng * r, const double a) +{ + double u; + do + { + u = 2 * gsl_rng_uniform (r) - 1.0; + } + while (u == 0.0); + + if (u < 0) + { + return a * log (-u); + } + else + { + return -a * log (u); + } +} + +double +gsl_ran_laplace_pdf (const double x, const double a) +{ + double p = (1/(2*a)) * exp (-fabs (x)/a); + return p; +} + diff --git a/software/gsl-1.15/randist/levy.c b/software/gsl-1.15/randist/levy.c new file mode 100644 index 000000000..44b1d098c --- /dev/null +++ b/software/gsl-1.15/randist/levy.c @@ -0,0 +1,136 @@ +/* randist/levy.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The stable Levy probability distributions have the form + + p(x) dx = (1/(2 pi)) \int dt exp(- it x - |c t|^alpha) + + with 0 < alpha <= 2. + + For alpha = 1, we get the Cauchy distribution + For alpha = 2, we get the Gaussian distribution with sigma = sqrt(2) c. + + Fromn Chapter 5 of Bratley, Fox and Schrage "A Guide to + Simulation". The original reference given there is, + + J.M. Chambers, C.L. Mallows and B. W. Stuck. "A method for + simulating stable random variates". Journal of the American + Statistical Association, JASA 71 340-344 (1976). + + */ + +double +gsl_ran_levy (const gsl_rng * r, const double c, const double alpha) +{ + double u, v, t, s; + + u = M_PI * (gsl_rng_uniform_pos (r) - 0.5); + + if (alpha == 1) /* cauchy case */ + { + t = tan (u); + return c * t; + } + + do + { + v = gsl_ran_exponential (r, 1.0); + } + while (v == 0); + + if (alpha == 2) /* gaussian case */ + { + t = 2 * sin (u) * sqrt(v); + return c * t; + } + + /* general case */ + + t = sin (alpha * u) / pow (cos (u), 1 / alpha); + s = pow (cos ((1 - alpha) * u) / v, (1 - alpha) / alpha); + + return c * t * s; +} + + +/* The following routine for the skew-symmetric case was provided by + Keith Briggs. + + The stable Levy probability distributions have the form + + 2*pi* p(x) dx + + = \int dt exp(mu*i*t-|sigma*t|^alpha*(1-i*beta*sign(t)*tan(pi*alpha/2))) for alpha!=1 + = \int dt exp(mu*i*t-|sigma*t|^alpha*(1+i*beta*sign(t)*2/pi*log(|t|))) for alpha==1 + + with 00. + + For beta=0, sigma=c, mu=0, we get gsl_ran_levy above. + + For alpha = 1, beta=0, we get the Lorentz distribution + For alpha = 2, beta=0, we get the Gaussian distribution + + See A. Weron and R. Weron: Computer simulation of L�vy alpha-stable + variables and processes, preprint Technical University of Wroclaw. + http://www.im.pwr.wroc.pl/~hugo/Publications.html + +*/ + +double +gsl_ran_levy_skew (const gsl_rng * r, const double c, + const double alpha, const double beta) +{ + double V, W, X; + + if (beta == 0) /* symmetric case */ + { + return gsl_ran_levy (r, c, alpha); + } + + V = M_PI * (gsl_rng_uniform_pos (r) - 0.5); + + do + { + W = gsl_ran_exponential (r, 1.0); + } + while (W == 0); + + if (alpha == 1) + { + X = ((M_PI_2 + beta * V) * tan (V) - + beta * log (M_PI_2 * W * cos (V) / (M_PI_2 + beta * V))) / M_PI_2; + return c * (X + beta * log (c) / M_PI_2); + } + else + { + double t = beta * tan (M_PI_2 * alpha); + double B = atan (t) / alpha; + double S = pow (1 + t * t, 1/(2 * alpha)); + + X = S * sin (alpha * (V + B)) / pow (cos (V), 1 / alpha) + * pow (cos (V - alpha * (V + B)) / W, (1 - alpha) / alpha); + return c * X; + } +} diff --git a/software/gsl-1.15/randist/logarithmic.c b/software/gsl-1.15/randist/logarithmic.c new file mode 100644 index 000000000..d474af078 --- /dev/null +++ b/software/gsl-1.15/randist/logarithmic.c @@ -0,0 +1,76 @@ +/* randist/logarithmic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* Logarithmic distribution + + prob(n) = p^n / (n log(1/(1-p)) for n = 1, 2, 3, ... + + We use Kemp's second accelerated generator, from Luc Devroye's book + on "Non-Uniform Random Variate Generation", Springer */ + +unsigned int +gsl_ran_logarithmic (const gsl_rng * r, const double p) +{ + double c = log (1-p) ; + + double v = gsl_rng_uniform_pos (r); + + if (v >= p) + { + return 1 ; + } + else + { + double u = gsl_rng_uniform_pos (r); + double q = 1 - exp (c * u); + + if (v <= q*q) + { + double x = 1 + log(v)/log(q) ; + return x ; + } + else if (v <= q) + { + return 2; + } + else + { + return 1 ; + } + } +} + +double +gsl_ran_logarithmic_pdf (const unsigned int k, const double p) +{ + if (k == 0) + { + return 0 ; + } + else + { + double P = pow(p, (double)k) / (double) k / log(1/(1-p)) ; + return P; + } +} diff --git a/software/gsl-1.15/randist/logistic.c b/software/gsl-1.15/randist/logistic.c new file mode 100644 index 000000000..c1e05d4f8 --- /dev/null +++ b/software/gsl-1.15/randist/logistic.c @@ -0,0 +1,53 @@ +/* randist/logistic.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The logistic distribution has the form, + + p(x) dx = (1/a) exp(-x/a) / (1 + exp(-x/a))^2 dx + + for -infty < x < infty */ + +double +gsl_ran_logistic (const gsl_rng * r, const double a) +{ + double x, z; + + do + { + x = gsl_rng_uniform_pos (r); + } + while (x == 1); + + z = log (x / (1 - x)); + + return a * z; +} + +double +gsl_ran_logistic_pdf (const double x, const double a) +{ + double u = exp (-fabs(x)/a); + double p = u / (fabs(a) * (1 + u) * (1 + u)); + return p; +} diff --git a/software/gsl-1.15/randist/lognormal.c b/software/gsl-1.15/randist/lognormal.c new file mode 100644 index 000000000..5e3db0ec8 --- /dev/null +++ b/software/gsl-1.15/randist/lognormal.c @@ -0,0 +1,70 @@ +/* randist/lognormal.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The lognormal distribution has the form + + p(x) dx = 1/(x * sqrt(2 pi sigma^2)) exp(-(ln(x) - zeta)^2/2 sigma^2) dx + + for x > 0. Lognormal random numbers are the exponentials of + gaussian random numbers */ + +double +gsl_ran_lognormal (const gsl_rng * r, const double zeta, const double sigma) +{ + double u, v, r2, normal, z; + + do + { + /* choose x,y in uniform square (-1,-1) to (+1,+1) */ + + u = -1 + 2 * gsl_rng_uniform (r); + v = -1 + 2 * gsl_rng_uniform (r); + + /* see if it is in the unit circle */ + r2 = u * u + v * v; + } + while (r2 > 1.0 || r2 == 0); + + normal = u * sqrt (-2.0 * log (r2) / r2); + + z = exp (sigma * normal + zeta); + + return z; +} + +double +gsl_ran_lognormal_pdf (const double x, const double zeta, const double sigma) +{ + if (x <= 0) + { + return 0 ; + } + else + { + double u = (log (x) - zeta)/sigma; + double p = 1 / (x * fabs(sigma) * sqrt (2 * M_PI)) * exp (-(u * u) /2); + return p; + } +} diff --git a/software/gsl-1.15/randist/multinomial.c b/software/gsl-1.15/randist/multinomial.c new file mode 100644 index 000000000..a4a3a1f3d --- /dev/null +++ b/software/gsl-1.15/randist/multinomial.c @@ -0,0 +1,121 @@ +/* randist/multinomial.c + * + * Copyright (C) 2002 Gavin E. Crooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The multinomial distribution has the form + + N! n_1 n_2 n_K + prob(n_1, n_2, ... n_K) = -------------------- p_1 p_2 ... p_K + (n_1! n_2! ... n_K!) + + where n_1, n_2, ... n_K are nonnegative integers, sum_{k=1,K} n_k = N, + and p = (p_1, p_2, ..., p_K) is a probability distribution. + + Random variates are generated using the conditional binomial method. + This scales well with N and does not require a setup step. + + Ref: + C.S. David, The computer generation of multinomial random variates, + Comp. Stat. Data Anal. 16 (1993) 205-217 +*/ + +void +gsl_ran_multinomial (const gsl_rng * r, const size_t K, + const unsigned int N, const double p[], unsigned int n[]) +{ + size_t k; + double norm = 0.0; + double sum_p = 0.0; + + unsigned int sum_n = 0; + + /* p[k] may contain non-negative weights that do not sum to 1.0. + * Even a probability distribution will not exactly sum to 1.0 + * due to rounding errors. + */ + + for (k = 0; k < K; k++) + { + norm += p[k]; + } + + for (k = 0; k < K; k++) + { + if (p[k] > 0.0) + { + n[k] = gsl_ran_binomial (r, p[k] / (norm - sum_p), N - sum_n); + } + else + { + n[k] = 0; + } + + sum_p += p[k]; + sum_n += n[k]; + } + +} + + +double +gsl_ran_multinomial_pdf (const size_t K, + const double p[], const unsigned int n[]) +{ + return exp (gsl_ran_multinomial_lnpdf (K, p, n)); +} + + +double +gsl_ran_multinomial_lnpdf (const size_t K, + const double p[], const unsigned int n[]) +{ + size_t k; + unsigned int N = 0; + double log_pdf = 0.0; + double norm = 0.0; + + for (k = 0; k < K; k++) + { + N += n[k]; + } + + for (k = 0; k < K; k++) + { + norm += p[k]; + } + + log_pdf = gsl_sf_lnfact (N); + + for (k = 0; k < K; k++) + { + /* Handle case where n[k]==0 and p[k]==0 */ + + if (n[k] > 0) + { + log_pdf += log (p[k] / norm) * n[k] - gsl_sf_lnfact (n[k]); + } + } + + return log_pdf; +} diff --git a/software/gsl-1.15/randist/nbinomial.c b/software/gsl-1.15/randist/nbinomial.c new file mode 100644 index 000000000..7542f360e --- /dev/null +++ b/software/gsl-1.15/randist/nbinomial.c @@ -0,0 +1,54 @@ +/* randist/nbinomial.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The negative binomial distribution has the form, + + prob(k) = Gamma(n + k)/(Gamma(n) Gamma(k + 1)) p^n (1-p)^k + + for k = 0, 1, ... . Note that n does not have to be an integer. + + This is the Leger's algorithm (given in the answers in Knuth) */ + +unsigned int +gsl_ran_negative_binomial (const gsl_rng * r, double p, double n) +{ + double X = gsl_ran_gamma (r, n, 1.0) ; + unsigned int k = gsl_ran_poisson (r, X*(1-p)/p) ; + return k ; +} + +double +gsl_ran_negative_binomial_pdf (const unsigned int k, const double p, double n) +{ + double P; + + double f = gsl_sf_lngamma (k + n) ; + double a = gsl_sf_lngamma (n) ; + double b = gsl_sf_lngamma (k + 1.0) ; + + P = exp(f-a-b) * pow (p, n) * pow (1 - p, (double)k); + + return P; +} diff --git a/software/gsl-1.15/randist/pareto.c b/software/gsl-1.15/randist/pareto.c new file mode 100644 index 000000000..9d031bab0 --- /dev/null +++ b/software/gsl-1.15/randist/pareto.c @@ -0,0 +1,54 @@ +/* randist/pareto.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Pareto distribution has the form, + + p(x) dx = (a/b) / (x/b)^(a+1) dx for x >= b + + */ + +double +gsl_ran_pareto (const gsl_rng * r, double a, const double b) +{ + double x = gsl_rng_uniform_pos (r); + + double z = pow (x, -1 / a); + + return b * z; +} + +double +gsl_ran_pareto_pdf (const double x, const double a, const double b) +{ + if (x >= b) + { + double p = (a/b) / pow (x/b, a + 1); + return p; + } + else + { + return 0; + } +} + diff --git a/software/gsl-1.15/randist/pascal.c b/software/gsl-1.15/randist/pascal.c new file mode 100644 index 000000000..38a25a42a --- /dev/null +++ b/software/gsl-1.15/randist/pascal.c @@ -0,0 +1,50 @@ +/* randist/pascal.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Pascal distribution is a negative binomial with valued integer n + + prob(k) = (n - 1 + k)!/(n!(k - 1)!) * p^n (1-p)^k for k = 0, 1, ..., n + + */ + +unsigned int +gsl_ran_pascal (const gsl_rng * r, double p, unsigned int n) +{ + /* This is a separate interface for the pascal distribution so that + it can be optimized differently from the negative binomial in + future. + + e.g. if n < 10 it might be faster to generate the Pascal + distributions as the sum of geometric variates directly. */ + + unsigned int k = gsl_ran_negative_binomial (r, p, (double) n); + return k; +} + +double +gsl_ran_pascal_pdf (const unsigned int k, const double p, unsigned int n) +{ + double P = gsl_ran_negative_binomial_pdf (k, p, (double) n); + return P; +} diff --git a/software/gsl-1.15/randist/poisson.c b/software/gsl-1.15/randist/poisson.c new file mode 100644 index 000000000..b28e29c9e --- /dev/null +++ b/software/gsl-1.15/randist/poisson.c @@ -0,0 +1,93 @@ +/* randist/poisson.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* The poisson distribution has the form + + p(n) = (mu^n / n!) exp(-mu) + + for n = 0, 1, 2, ... . The method used here is the one from Knuth. */ + +unsigned int +gsl_ran_poisson (const gsl_rng * r, double mu) +{ + double emu; + double prod = 1.0; + unsigned int k = 0; + + while (mu > 10) + { + unsigned int m = mu * (7.0 / 8.0); + + double X = gsl_ran_gamma_int (r, m); + + if (X >= mu) + { + return k + gsl_ran_binomial (r, mu / X, m - 1); + } + else + { + k += m; + mu -= X; + } + } + + /* This following method works well when mu is small */ + + emu = exp (-mu); + + do + { + prod *= gsl_rng_uniform (r); + k++; + } + while (prod > emu); + + return k - 1; + +} + +void +gsl_ran_poisson_array (const gsl_rng * r, size_t n, unsigned int array[], + double mu) +{ + size_t i; + + for (i = 0; i < n; i++) + { + array[i] = gsl_ran_poisson (r, mu); + } + + return; +} + +double +gsl_ran_poisson_pdf (const unsigned int k, const double mu) +{ + double p; + double lf = gsl_sf_lnfact (k); + + p = exp (log (mu) * k - lf - mu); + return p; +} diff --git a/software/gsl-1.15/randist/rayleigh.c b/software/gsl-1.15/randist/rayleigh.c new file mode 100644 index 000000000..c7c93046f --- /dev/null +++ b/software/gsl-1.15/randist/rayleigh.c @@ -0,0 +1,85 @@ +/* randist/rayleigh.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Rayleigh distribution has the form + + p(x) dx = (x / sigma^2) exp(-x^2/(2 sigma^2)) dx + + for x = 0 ... +infty */ + +double +gsl_ran_rayleigh (const gsl_rng * r, const double sigma) +{ + double u = gsl_rng_uniform_pos (r); + + return sigma * sqrt(-2.0 * log (u)); +} + +double +gsl_ran_rayleigh_pdf (const double x, const double sigma) +{ + if (x < 0) + { + return 0 ; + } + else + { + double u = x / sigma ; + double p = (u / sigma) * exp(-u * u / 2.0) ; + + return p; + } +} + +/* The Rayleigh tail distribution has the form + + p(x) dx = (x / sigma^2) exp((a^2 - x^2)/(2 sigma^2)) dx + + for x = a ... +infty */ + +double +gsl_ran_rayleigh_tail (const gsl_rng * r, const double a, const double sigma) +{ + double u = gsl_rng_uniform_pos (r); + + return sqrt(a * a - 2.0 * sigma * sigma * log (u)); +} + +double +gsl_ran_rayleigh_tail_pdf (const double x, const double a, const double sigma) +{ + if (x < a) + { + return 0 ; + } + else + { + double u = x / sigma ; + double v = a / sigma ; + + double p = (u / sigma) * exp((v + u) * (v - u) / 2.0) ; + + return p; + } +} diff --git a/software/gsl-1.15/randist/shuffle.c b/software/gsl-1.15/randist/shuffle.c new file mode 100644 index 000000000..1e45420a9 --- /dev/null +++ b/software/gsl-1.15/randist/shuffle.c @@ -0,0 +1,124 @@ +/* randist/shuffle.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* Inline swap and copy functions for moving objects around */ + +static inline +void swap (void * base, size_t size, size_t i, size_t j) +{ + register char * a = size * i + (char *) base ; + register char * b = size * j + (char *) base ; + register size_t s = size ; + + if (i == j) + return ; + + do + { + char tmp = *a; + *a++ = *b; + *b++ = tmp; + } + while (--s > 0); +} + +static inline void +copy (void * dest, size_t i, void * src, size_t j, size_t size) +{ + register char * a = size * i + (char *) dest ; + register char * b = size * j + (char *) src ; + register size_t s = size ; + + do + { + *a++ = *b++; + } + while (--s > 0); +} + +/* Randomly permute (shuffle) N indices + + Supply an array x[N] with nmemb members, each of size size and on + return it will be shuffled into a random order. The algorithm is + from Knuth, SemiNumerical Algorithms, v2, p139, who cites Moses and + Oakford, and Durstenfeld */ + +void +gsl_ran_shuffle (const gsl_rng * r, void * base, size_t n, size_t size) +{ + size_t i ; + + for (i = n - 1; i > 0; i--) + { + size_t j = gsl_rng_uniform_int(r, i+1); /* originally (i + 1) * gsl_rng_uniform (r) */ + + swap (base, size, i, j) ; + } +} + +int +gsl_ran_choose (const gsl_rng * r, void * dest, size_t k, void * src, + size_t n, size_t size) +{ + size_t i, j = 0; + + /* Choose k out of n items, return an array x[] of the k items. + These items will prevserve the relative order of the original + input -- you can use shuffle() to randomize the output if you + wish */ + + if (k > n) + { + GSL_ERROR ("k is greater than n, cannot sample more than n items", + GSL_EINVAL) ; + } + + for (i = 0; i < n && j < k; i++) + { + if ((n - i) * gsl_rng_uniform (r) < k - j) + { + copy (dest, j, src, i, size) ; + j++ ; + } + } + + return GSL_SUCCESS; +} + +void +gsl_ran_sample (const gsl_rng * r, void * dest, size_t k, void * src, + size_t n, size_t size) +{ + size_t i, j = 0; + + /* Choose k out of n items, with replacement */ + + for (i = 0; i < k; i++) + { + j = gsl_rng_uniform_int (r, n); /* originally n * gsl_rng_uniform (r) */ + + copy (dest, i, src, j, size) ; + } +} diff --git a/software/gsl-1.15/randist/sphere.c b/software/gsl-1.15/randist/sphere.c new file mode 100644 index 000000000..a93615e62 --- /dev/null +++ b/software/gsl-1.15/randist/sphere.c @@ -0,0 +1,119 @@ +/* randist/sphere.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +void +gsl_ran_dir_2d (const gsl_rng * r, double *x, double *y) +{ + /* This method avoids trig, but it does take an average of 8/pi = + * 2.55 calls to the RNG, instead of one for the direct + * trigonometric method. */ + + double u, v, s; + do + { + u = -1 + 2 * gsl_rng_uniform (r); + v = -1 + 2 * gsl_rng_uniform (r); + s = u * u + v * v; + } + while (s > 1.0 || s == 0.0); + + /* This is the Von Neumann trick. See Knuth, v2, 3rd ed, p140 + * (exercise 23). Note, no sin, cos, or sqrt ! */ + + *x = (u * u - v * v) / s; + *y = 2 * u * v / s; + + /* Here is the more straightforward approach, + * s = sqrt (s); *x = u / s; *y = v / s; + * It has fewer total operations, but one of them is a sqrt */ +} + +void +gsl_ran_dir_2d_trig_method (const gsl_rng * r, double *x, double *y) +{ + /* This is the obvious solution... */ + /* It ain't clever, but since sin/cos are often hardware accelerated, + * it can be faster -- it is on my home Pentium -- than von Neumann's + * solution, or slower -- as it is on my Sun Sparc 20 at work + */ + double t = 6.2831853071795864 * gsl_rng_uniform (r); /* 2*PI */ + *x = cos (t); + *y = sin (t); +} + +void +gsl_ran_dir_3d (const gsl_rng * r, double *x, double *y, double *z) +{ + double s, a; + + /* This is a variant of the algorithm for computing a random point + * on the unit sphere; the algorithm is suggested in Knuth, v2, + * 3rd ed, p136; and attributed to Robert E Knop, CACM, 13 (1970), + * 326. + */ + + /* Begin with the polar method for getting x,y inside a unit circle + */ + do + { + *x = -1 + 2 * gsl_rng_uniform (r); + *y = -1 + 2 * gsl_rng_uniform (r); + s = (*x) * (*x) + (*y) * (*y); + } + while (s > 1.0); + + *z = -1 + 2 * s; /* z uniformly distributed from -1 to 1 */ + a = 2 * sqrt (1 - s); /* factor to adjust x,y so that x^2+y^2 + * is equal to 1-z^2 */ + *x *= a; + *y *= a; +} + +void +gsl_ran_dir_nd (const gsl_rng * r, size_t n, double *x) +{ + double d; + size_t i; + /* See Knuth, v2, 3rd ed, p135-136. The method is attributed to + * G. W. Brown, in Modern Mathematics for the Engineer (1956). + * The idea is that gaussians G(x) have the property that + * G(x)G(y)G(z)G(...) is radially symmetric, a function only + * r = sqrt(x^2+y^2+...) + */ + d = 0; + do + { + for (i = 0; i < n; ++i) + { + x[i] = gsl_ran_gaussian (r, 1.0); + d += x[i] * x[i]; + } + } + while (d == 0); + d = sqrt (d); + for (i = 0; i < n; ++i) + { + x[i] /= d; + } +} diff --git a/software/gsl-1.15/randist/tdist.c b/software/gsl-1.15/randist/tdist.c new file mode 100644 index 000000000..f25437010 --- /dev/null +++ b/software/gsl-1.15/randist/tdist.c @@ -0,0 +1,80 @@ +/* randist/tdist.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The t-distribution has the form + + p(x) dx = (Gamma((nu + 1)/2)/(sqrt(pi nu) Gamma(nu/2)) + * (1 + (x^2)/nu)^-((nu + 1)/2) dx + + The method used here is the one described in Knuth */ + +double +gsl_ran_tdist (const gsl_rng * r, const double nu) +{ + if (nu <= 2) + { + double Y1 = gsl_ran_ugaussian (r); + double Y2 = gsl_ran_chisq (r, nu); + + double t = Y1 / sqrt (Y2 / nu); + + return t; + } + else + { + double Y1, Y2, Z, t; + do + { + Y1 = gsl_ran_ugaussian (r); + Y2 = gsl_ran_exponential (r, 1 / (nu/2 - 1)); + + Z = Y1 * Y1 / (nu - 2); + } + while (1 - Z < 0 || exp (-Y2 - Z) > (1 - Z)); + + /* Note that there is a typo in Knuth's formula, the line below + is taken from the original paper of Marsaglia, Mathematics of + Computation, 34 (1980), p 234-256 */ + + t = Y1 / sqrt ((1 - 2 / nu) * (1 - Z)); + return t; + } +} + +double +gsl_ran_tdist_pdf (const double x, const double nu) +{ + double p; + + double lg1 = gsl_sf_lngamma (nu / 2); + double lg2 = gsl_sf_lngamma ((nu + 1) / 2); + + p = ((exp (lg2 - lg1) / sqrt (M_PI * nu)) + * pow ((1 + x * x / nu), -(nu + 1) / 2)); + return p; +} + + diff --git a/software/gsl-1.15/randist/test.c b/software/gsl-1.15/randist/test.c new file mode 100644 index 000000000..dd042396c --- /dev/null +++ b/software/gsl-1.15/randist/test.c @@ -0,0 +1,2178 @@ +/* randist/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 100000 + +/* Convient test dimension for multivariant distributions */ +#define MULTI_DIM 10 + + +void testMoments (double (*f) (void), const char *name, + double a, double b, double p); +void testPDF (double (*f) (void), double (*pdf) (double), const char *name); +void testDiscretePDF (double (*f) (void), double (*pdf) (unsigned int), + const char *name); + +void test_shuffle (void); +void test_choose (void); +double test_beta (void); +double test_beta_pdf (double x); +double test_bernoulli (void); +double test_bernoulli_pdf (unsigned int n); + +double test_binomial (void); +double test_binomial_pdf (unsigned int n); +double test_binomial_large (void); +double test_binomial_large_pdf (unsigned int n); +double test_binomial_huge (void); +double test_binomial_huge_pdf (unsigned int n); +double test_binomial_max (void); +double test_binomial_max_pdf (unsigned int n); +double test_binomial0 (void); +double test_binomial0_pdf (unsigned int n); +double test_binomial1 (void); +double test_binomial1_pdf (unsigned int n); + + + +double test_binomial_knuth (void); +double test_binomial_knuth_pdf (unsigned int n); +double test_binomial_large_knuth (void); +double test_binomial_large_knuth_pdf (unsigned int n); +double test_binomial_huge_knuth (void); +double test_binomial_huge_knuth_pdf (unsigned int n); + +double test_cauchy (void); +double test_cauchy_pdf (double x); +double test_chisq (void); +double test_chisq_pdf (double x); +double test_chisqnu2 (void); +double test_chisqnu2_pdf (double x); +double test_dirichlet (void); +double test_dirichlet_pdf (double x); +double test_dirichlet_small (void); +double test_dirichlet_small_pdf (double x); +void test_dirichlet_moments (void); +double test_discrete1 (void); +double test_discrete1_pdf (unsigned int n); +double test_discrete2 (void); +double test_discrete2_pdf (unsigned int n); +double test_discrete3 (void); +double test_discrete3_pdf (unsigned int n); +double test_erlang (void); +double test_erlang_pdf (double x); +double test_exponential (void); +double test_exponential_pdf (double x); +double test_exppow0 (void); +double test_exppow0_pdf (double x); +double test_exppow1 (void); +double test_exppow1_pdf (double x); +double test_exppow1a (void); +double test_exppow1a_pdf (double x); +double test_exppow2 (void); +double test_exppow2_pdf (double x); +double test_exppow2a (void); +double test_exppow2a_pdf (double x); +double test_exppow2b (void); +double test_exppow2b_pdf (double x); +double test_fdist (void); +double test_fdist_pdf (double x); +double test_fdist_large (void); +double test_fdist_large_pdf (double x); +double test_flat (void); +double test_flat_pdf (double x); +double test_gamma (void); +double test_gamma_pdf (double x); +double test_gamma1 (void); +double test_gamma1_pdf (double x); +double test_gamma_int (void); +double test_gamma_int_pdf (double x); +double test_gamma_large (void); +double test_gamma_large_pdf (double x); +double test_gamma_vlarge (void); +double test_gamma_vlarge_pdf (double x); +double test_gamma_small (void); +double test_gamma_small_pdf (double x); +double test_gamma_mt (void); +double test_gamma_mt_pdf (double x); +double test_gamma_mt1 (void); +double test_gamma_mt1_pdf (double x); +double test_gamma_mt_int (void); +double test_gamma_mt_int_pdf (double x); +double test_gamma_mt_large (void); +double test_gamma_mt_large_pdf (double x); +double test_gamma_mt_small (void); +double test_gamma_mt_small_pdf (double x); +double test_gamma_knuth_vlarge (void); +double test_gamma_knuth_vlarge_pdf (double x); +double test_gaussian (void); +double test_gaussian_pdf (double x); +double test_gaussian_ratio_method (void); +double test_gaussian_ratio_method_pdf (double x); +double test_gaussian_ziggurat (void); +double test_gaussian_ziggurat_pdf (double x); +double test_gaussian_tail (void); +double test_gaussian_tail_pdf (double x); +double test_gaussian_tail1 (void); +double test_gaussian_tail1_pdf (double x); +double test_gaussian_tail2 (void); +double test_gaussian_tail2_pdf (double x); +double test_ugaussian (void); +double test_ugaussian_pdf (double x); +double test_ugaussian_ratio_method (void); +double test_ugaussian_ratio_method_pdf (double x); +double test_ugaussian_tail (void); +double test_ugaussian_tail_pdf (double x); +double test_bivariate_gaussian1 (void); +double test_bivariate_gaussian1_pdf (double x); +double test_bivariate_gaussian2 (void); +double test_bivariate_gaussian2_pdf (double x); +double test_bivariate_gaussian3 (void); +double test_bivariate_gaussian3_pdf (double x); +double test_bivariate_gaussian4 (void); +double test_bivariate_gaussian4_pdf (double x); +double test_gumbel1 (void); +double test_gumbel1_pdf (double x); +double test_gumbel2 (void); +double test_gumbel2_pdf (double x); +double test_geometric (void); +double test_geometric_pdf (unsigned int x); +double test_geometric1 (void); +double test_geometric1_pdf (unsigned int x); +double test_hypergeometric1 (void); +double test_hypergeometric1_pdf (unsigned int x); +double test_hypergeometric2 (void); +double test_hypergeometric2_pdf (unsigned int x); +double test_hypergeometric3 (void); +double test_hypergeometric3_pdf (unsigned int x); +double test_hypergeometric4 (void); +double test_hypergeometric4_pdf (unsigned int x); +double test_hypergeometric5 (void); +double test_hypergeometric5_pdf (unsigned int x); +double test_hypergeometric6 (void); +double test_hypergeometric6_pdf (unsigned int x); +double test_landau (void); +double test_landau_pdf (double x); +double test_levy1 (void); +double test_levy1_pdf (double x); +double test_levy2 (void); +double test_levy2_pdf (double x); +double test_levy1a (void); +double test_levy1a_pdf (double x); +double test_levy2a (void); +double test_levy2a_pdf (double x); +double test_levy_skew1 (void); +double test_levy_skew1_pdf (double x); +double test_levy_skew2 (void); +double test_levy_skew2_pdf (double x); +double test_levy_skew1a (void); +double test_levy_skew1a_pdf (double x); +double test_levy_skew2a (void); +double test_levy_skew2a_pdf (double x); +double test_levy_skew1b (void); +double test_levy_skew1b_pdf (double x); +double test_levy_skew2b (void); +double test_levy_skew2b_pdf (double x); +double test_logistic (void); +double test_logistic_pdf (double x); +double test_lognormal (void); +double test_lognormal_pdf (double x); +double test_logarithmic (void); +double test_logarithmic_pdf (unsigned int n); +double test_multinomial (void); +double test_multinomial_pdf (unsigned int n); +double test_multinomial_large (void); +double test_multinomial_large_pdf (unsigned int n); +void test_multinomial_moments (void); +double test_negative_binomial (void); +double test_negative_binomial_pdf (unsigned int n); +double test_pascal (void); +double test_pascal_pdf (unsigned int n); +double test_pareto (void); +double test_pareto_pdf (double x); +double test_poisson (void); +double test_poisson_pdf (unsigned int x); +double test_poisson_large (void); +double test_poisson_large_pdf (unsigned int x); +double test_dir2d (void); +double test_dir2d_pdf (double x); +double test_dir2d_trig_method (void); +double test_dir2d_trig_method_pdf (double x); +double test_dir3dxy (void); +double test_dir3dxy_pdf (double x); +double test_dir3dyz (void); +double test_dir3dyz_pdf (double x); +double test_dir3dzx (void); +double test_dir3dzx_pdf (double x); +double test_rayleigh (void); +double test_rayleigh_pdf (double x); +double test_rayleigh_tail (void); +double test_rayleigh_tail_pdf (double x); +double test_tdist1 (void); +double test_tdist1_pdf (double x); +double test_tdist2 (void); +double test_tdist2_pdf (double x); +double test_laplace (void); +double test_laplace_pdf (double x); +double test_weibull (void); +double test_weibull_pdf (double x); +double test_weibull1 (void); +double test_weibull1_pdf (double x); + +gsl_rng *r_global; + +static gsl_ran_discrete_t *g1 = NULL; +static gsl_ran_discrete_t *g2 = NULL; +static gsl_ran_discrete_t *g3 = NULL; + +int +main (void) +{ + gsl_ieee_env_setup (); + + gsl_rng_env_setup (); + r_global = gsl_rng_alloc (gsl_rng_default); + +#define FUNC(x) test_ ## x, "test gsl_ran_" #x +#define FUNC2(x) test_ ## x, test_ ## x ## _pdf, "test gsl_ran_" #x + + test_shuffle (); + test_choose (); + + testMoments (FUNC (ugaussian), 0.0, 100.0, 0.5); + testMoments (FUNC (ugaussian), -1.0, 1.0, 0.6826895); + testMoments (FUNC (ugaussian), 3.0, 3.5, 0.0011172689); + testMoments (FUNC (ugaussian_tail), 3.0, 3.5, 0.0011172689 / 0.0013498981); + testMoments (FUNC (exponential), 0.0, 1.0, 1 - exp (-0.5)); + testMoments (FUNC (cauchy), 0.0, 10000.0, 0.5); + + testMoments (FUNC (discrete1), -0.5, 0.5, 0.59); + testMoments (FUNC (discrete1), 0.5, 1.5, 0.40); + testMoments (FUNC (discrete1), 1.5, 3.5, 0.01); + + testMoments (FUNC (discrete2), -0.5, 0.5, 1.0/45.0 ); + testMoments (FUNC (discrete2), 8.5, 9.5, 0 ); + + testMoments (FUNC (discrete3), -0.5, 0.5, 0.05 ); + testMoments (FUNC (discrete3), 0.5, 1.5, 0.05 ); + testMoments (FUNC (discrete3), -0.5, 9.5, 0.5 ); + + test_dirichlet_moments (); + test_multinomial_moments (); + + testPDF (FUNC2 (beta)); + testPDF (FUNC2 (cauchy)); + testPDF (FUNC2 (chisq)); + testPDF (FUNC2 (chisqnu2)); + testPDF (FUNC2 (dirichlet)); + testPDF (FUNC2 (dirichlet_small)); + testPDF (FUNC2 (erlang)); + testPDF (FUNC2 (exponential)); + + testPDF (FUNC2 (exppow0)); + testPDF (FUNC2 (exppow1)); + testPDF (FUNC2 (exppow1a)); + testPDF (FUNC2 (exppow2)); + testPDF (FUNC2 (exppow2a)); + testPDF (FUNC2 (exppow2b)); + + testPDF (FUNC2 (fdist)); + testPDF (FUNC2 (fdist_large)); + testPDF (FUNC2 (flat)); + testPDF (FUNC2 (gamma)); + testPDF (FUNC2 (gamma1)); + testPDF (FUNC2 (gamma_int)); + testPDF (FUNC2 (gamma_large)); + testPDF (FUNC2 (gamma_vlarge)); + testPDF (FUNC2 (gamma_knuth_vlarge)); + testPDF (FUNC2 (gamma_small)); + testPDF (FUNC2 (gamma_mt)); + testPDF (FUNC2 (gamma_mt1)); + testPDF (FUNC2 (gamma_mt_int)); + testPDF (FUNC2 (gamma_mt_large)); + testPDF (FUNC2 (gamma_mt_small)); + testPDF (FUNC2 (gaussian)); + testPDF (FUNC2 (gaussian_ratio_method)); + testPDF (FUNC2 (gaussian_ziggurat)); + testPDF (FUNC2 (ugaussian)); + testPDF (FUNC2 (ugaussian_ratio_method)); + testPDF (FUNC2 (gaussian_tail)); + testPDF (FUNC2 (gaussian_tail1)); + testPDF (FUNC2 (gaussian_tail2)); + testPDF (FUNC2 (ugaussian_tail)); + + testPDF (FUNC2 (bivariate_gaussian1)); + testPDF (FUNC2 (bivariate_gaussian2)); + testPDF (FUNC2 (bivariate_gaussian3)); + testPDF (FUNC2 (bivariate_gaussian4)); + + testPDF (FUNC2 (gumbel1)); + testPDF (FUNC2 (gumbel2)); + testPDF (FUNC2 (landau)); + testPDF (FUNC2 (levy1)); + testPDF (FUNC2 (levy2)); + testPDF (FUNC2 (levy1a)); + testPDF (FUNC2 (levy2a)); + testPDF (FUNC2 (levy_skew1)); + testPDF (FUNC2 (levy_skew2)); + testPDF (FUNC2 (levy_skew1a)); + testPDF (FUNC2 (levy_skew2a)); + testPDF (FUNC2 (levy_skew1b)); + testPDF (FUNC2 (levy_skew2b)); + testPDF (FUNC2 (logistic)); + testPDF (FUNC2 (lognormal)); + testPDF (FUNC2 (pareto)); + testPDF (FUNC2 (rayleigh)); + testPDF (FUNC2 (rayleigh_tail)); + testPDF (FUNC2 (tdist1)); + testPDF (FUNC2 (tdist2)); + testPDF (FUNC2 (laplace)); + testPDF (FUNC2 (weibull)); + testPDF (FUNC2 (weibull1)); + + testPDF (FUNC2 (dir2d)); + testPDF (FUNC2 (dir2d_trig_method)); + testPDF (FUNC2 (dir3dxy)); + testPDF (FUNC2 (dir3dyz)); + testPDF (FUNC2 (dir3dzx)); + + testDiscretePDF (FUNC2 (discrete1)); + testDiscretePDF (FUNC2 (discrete2)); + testDiscretePDF (FUNC2 (discrete3)); + testDiscretePDF (FUNC2 (poisson)); + testDiscretePDF (FUNC2 (poisson_large)); + testDiscretePDF (FUNC2 (bernoulli)); + testDiscretePDF (FUNC2 (binomial)); + testDiscretePDF (FUNC2 (binomial0)); + testDiscretePDF (FUNC2 (binomial1)); + testDiscretePDF (FUNC2 (binomial_knuth)); + testDiscretePDF (FUNC2 (binomial_large)); + testDiscretePDF (FUNC2 (binomial_large_knuth)); + testDiscretePDF (FUNC2 (binomial_huge)); + testDiscretePDF (FUNC2 (binomial_huge_knuth)); + testDiscretePDF (FUNC2 (binomial_max)); + testDiscretePDF (FUNC2 (geometric)); + testDiscretePDF (FUNC2 (geometric1)); + testDiscretePDF (FUNC2 (hypergeometric1)); + testDiscretePDF (FUNC2 (hypergeometric2)); + testDiscretePDF (FUNC2 (hypergeometric3)); + testDiscretePDF (FUNC2 (hypergeometric4)); + testDiscretePDF (FUNC2 (hypergeometric5)); + testDiscretePDF (FUNC2 (hypergeometric6)); + testDiscretePDF (FUNC2 (logarithmic)); + testDiscretePDF (FUNC2 (multinomial)); + testDiscretePDF (FUNC2 (multinomial_large)); + testDiscretePDF (FUNC2 (negative_binomial)); + testDiscretePDF (FUNC2 (pascal)); + + gsl_rng_free (r_global); + gsl_ran_discrete_free (g1); + gsl_ran_discrete_free (g2); + gsl_ran_discrete_free (g3); + + exit (gsl_test_summary ()); +} + +void +test_shuffle (void) +{ + double count[10][10]; + int x[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + int i, j, status = 0; + + for (i = 0; i < 10; i++) + { + for (j = 0; j < 10; j++) + { + count[i][j] = 0; + } + } + + for (i = 0; i < N; i++) + { + for (j = 0; j < 10; j++) + x[j] = j; + + gsl_ran_shuffle (r_global, x, 10, sizeof (int)); + + for (j = 0; j < 10; j++) + count[x[j]][j]++; + } + + for (i = 0; i < 10; i++) + { + for (j = 0; j < 10; j++) + { + double expected = N / 10.0; + double d = fabs (count[i][j] - expected); + double sigma = d / sqrt (expected); + if (sigma > 5 && d > 1) + { + status = 1; + gsl_test (status, + "gsl_ran_shuffle %d,%d (%g observed vs %g expected)", + i, j, count[i][j] / N, 0.1); + } + } + } + + gsl_test (status, "gsl_ran_shuffle on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}"); + +} + +void +test_choose (void) +{ + double count[10]; + int x[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + int y[3] = { 0, 1, 2 }; + int i, j, status = 0; + + for (i = 0; i < 10; i++) + { + count[i] = 0; + } + + for (i = 0; i < N; i++) + { + for (j = 0; j < 10; j++) + x[j] = j; + + gsl_ran_choose (r_global, y, 3, x, 10, sizeof (int)); + + for (j = 0; j < 3; j++) + count[y[j]]++; + } + + for (i = 0; i < 10; i++) + { + double expected = 3.0 * N / 10.0; + double d = fabs (count[i] - expected); + double sigma = d / sqrt (expected); + if (sigma > 5 && d > 1) + { + status = 1; + gsl_test (status, + "gsl_ran_choose %d (%g observed vs %g expected)", + i, count[i] / N, 0.1); + } + } + + gsl_test (status, "gsl_ran_choose (3) on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}"); + +} + + + + +void +testMoments (double (*f) (void), const char *name, + double a, double b, double p) +{ + int i; + double count = 0, expected, sigma; + int status; + + for (i = 0; i < N; i++) + { + double r = f (); + if (r < b && r > a) + count++; + } + + expected = p * N; + sigma = (expected > 0) ? fabs (count - expected) / sqrt (expected) : fabs(count - expected); + + status = (sigma > 3); + + gsl_test (status, "%s [%g,%g] (%g observed vs %g expected)", + name, a, b, count / N, p); +} + +#define BINS 100 + +typedef double pdf_func(double); + +/* Keep track of invalid values during integration */ +static int pdf_errors = 0; +static double pdf_errval = 0.0; + +double +wrapper_function (double x, void *params) +{ + pdf_func * pdf = (pdf_func *)params; + double P = pdf(x); + if (!gsl_finite(P)) { + pdf_errors++; + pdf_errval = P; + P = 0; /* skip invalid value now, but return pdf_errval at the end */ + } + return P; +} + +double +integrate (pdf_func * pdf, double a, double b) +{ + double result, abserr; + size_t n = 1000; + gsl_function f; + gsl_integration_workspace * w = gsl_integration_workspace_alloc (n); + f.function = &wrapper_function; + f.params = (void *)pdf; + pdf_errors = 0; + gsl_integration_qags (&f, a, b, 1e-16, 1e-4, n, w, &result, &abserr); + gsl_integration_workspace_free (w); + if (pdf_errors) return pdf_errval; + return result; +} + + +void +testPDF (double (*f) (void), double (*pdf) (double), const char *name) +{ + double count[BINS], edge[BINS], p[BINS]; + double a = -5.0, b = +5.0; + double dx = (b - a) / BINS; + double bin; + double total = 0, mean; + int i, j, status = 0, status_i = 0, attempts = 0; + long int n0 = 0, n = N; + + for (i = 0; i < BINS; i++) + { + /* Compute the integral of p(x) from x to x+dx */ + + double x = a + i * dx; + + if (fabs (x) < 1e-10) /* hit the origin exactly */ + x = 0.0; + + p[i] = integrate (pdf, x, x+dx); + } + + + for (i = 0; i < BINS; i++) + { + count[i] = 0; + edge[i] = 0; + } + + trial: + attempts++; + + for (i = n0; i < n; i++) + { + double r = f (); + total += r; + + if (r < b && r > a) + { + double u = (r - a) / dx; + double f = modf(u, &bin); + j = (int)bin; + + if (f == 0) + edge[j]++; + else + count[j]++; + } + } + + /* Sort out where the hits on the edges should go */ + + for (i = 0; i < BINS; i++) + { + /* If the bin above is empty, its lower edge hits belong in the + lower bin */ + + if (i + 1 < BINS && count[i+1] == 0) { + count[i] += edge[i+1]; + edge[i+1] = 0; + } + + count[i] += edge[i]; + edge[i] = 0; + } + + mean = (total / n); + + status = !gsl_finite(mean); + if (status) { + gsl_test (status, "%s, finite mean, observed %g", name, mean); + return; + } + + for (i = 0; i < BINS; i++) + { + double x = a + i * dx; + double d = fabs (count[i] - n * p[i]); + if (!gsl_finite(p[i])) + { + status_i = 1; + } + else if (p[i] != 0) + { + double s = d / sqrt (n * p[i]); + status_i = (s > 5) && (d > 2); + } + else + { + status_i = (count[i] != 0); + } + + /* Extend the sample if there is an outlier on the first attempt + to avoid spurious failures when running large numbers of tests. */ + if (status_i && attempts < 50) + { + n0 = n; + n = 2.0*n; + goto trial; + } + + status |= status_i; + if (status_i) + gsl_test (status_i, "%s [%g,%g) (%g/%d=%g observed vs %g expected)", + name, x, x + dx, count[i], n, count[i] / n, p[i]); + } + + if (status == 0) + gsl_test (status, "%s, sampling against pdf over range [%g,%g) ", + name, a, b); +} + +void +testDiscretePDF (double (*f) (void), double (*pdf) (unsigned int), + const char *name) +{ + double count[BINS], p[BINS]; + unsigned int i; + int status = 0, status_i = 0; + + for (i = 0; i < BINS; i++) + count[i] = 0; + + for (i = 0; i < N; i++) + { + int r = (int) (f ()); + if (r >= 0 && r < BINS) + count[r]++; + } + + for (i = 0; i < BINS; i++) + p[i] = pdf (i); + + for (i = 0; i < BINS; i++) + { + double d = fabs (count[i] - N * p[i]); + if (p[i] != 0) + { + double s = d / sqrt (N * p[i]); + status_i = (s > 5) && (d > 1); + } + else + { + status_i = (count[i] != 0); + } + status |= status_i; + if (status_i) + gsl_test (status_i, "%s i=%d (%g observed vs %g expected)", + name, i, count[i] / N, p[i]); + } + + if (status == 0) + gsl_test (status, "%s, sampling against pdf over range [%d,%d) ", + name, 0, BINS); +} + + + +double +test_beta (void) +{ + return gsl_ran_beta (r_global, 2.0, 3.0); +} + +double +test_beta_pdf (double x) +{ + return gsl_ran_beta_pdf (x, 2.0, 3.0); +} + +double +test_bernoulli (void) +{ + return gsl_ran_bernoulli (r_global, 0.3); +} + +double +test_bernoulli_pdf (unsigned int n) +{ + return gsl_ran_bernoulli_pdf (n, 0.3); +} + +double +test_binomial (void) +{ + return gsl_ran_binomial (r_global, 0.3, 5); +} + +double +test_binomial_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 5); +} + +double +test_binomial0 (void) +{ + return gsl_ran_binomial (r_global, 0, 8); +} + +double +test_binomial0_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0, 8); +} + +double +test_binomial1 (void) +{ + return gsl_ran_binomial (r_global, 1, 8); +} + +double +test_binomial1_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 1, 8); +} + +double +test_binomial_knuth (void) +{ + return gsl_ran_binomial_knuth (r_global, 0.3, 5); +} + +double +test_binomial_knuth_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 5); +} + + +double +test_binomial_large (void) +{ + return gsl_ran_binomial (r_global, 0.3, 55); +} + +double +test_binomial_large_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 55); +} + +double +test_binomial_large_knuth (void) +{ + return gsl_ran_binomial_knuth (r_global, 0.3, 55); +} + +double +test_binomial_large_knuth_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 55); +} + + +double +test_binomial_huge (void) +{ + return gsl_ran_binomial (r_global, 0.3, 5500); +} + +double +test_binomial_huge_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 5500); +} + +double +test_binomial_huge_knuth (void) +{ + return gsl_ran_binomial_knuth (r_global, 0.3, 5500); +} + +double +test_binomial_huge_knuth_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 0.3, 5500); +} + +double +test_binomial_max (void) +{ + return gsl_ran_binomial (r_global, 1e-8, 1<<31); +} + +double +test_binomial_max_pdf (unsigned int n) +{ + return gsl_ran_binomial_pdf (n, 1e-8, 1<<31); +} + +double +test_cauchy (void) +{ + return gsl_ran_cauchy (r_global, 2.0); +} + +double +test_cauchy_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 2.0); +} + +double +test_chisq (void) +{ + return gsl_ran_chisq (r_global, 13.0); +} + +double +test_chisq_pdf (double x) +{ + return gsl_ran_chisq_pdf (x, 13.0); +} + +double +test_chisqnu2 (void) +{ + return gsl_ran_chisq (r_global, 2.0); +} + +double +test_chisqnu2_pdf (double x) +{ + return gsl_ran_chisq_pdf (x, 2.0); +} + + +double +test_dir2d (void) +{ + double x = 0, y = 0, theta; + gsl_ran_dir_2d (r_global, &x, &y); + theta = atan2 (x, y); + return theta; +} + +double +test_dir2d_pdf (double x) +{ + if (x > -M_PI && x <= M_PI) + { + return 1 / (2 * M_PI); + } + else + { + return 0; + } +} + +double +test_dir2d_trig_method (void) +{ + double x = 0, y = 0, theta; + gsl_ran_dir_2d_trig_method (r_global, &x, &y); + theta = atan2 (x, y); + return theta; +} + +double +test_dir2d_trig_method_pdf (double x) +{ + if (x > -M_PI && x <= M_PI) + { + return 1 / (2 * M_PI); + } + else + { + return 0; + } +} + +double +test_dir3dxy (void) +{ + double x = 0, y = 0, z = 0, theta; + gsl_ran_dir_3d (r_global, &x, &y, &z); + theta = atan2 (x, y); + return theta; +} + +double +test_dir3dxy_pdf (double x) +{ + if (x > -M_PI && x <= M_PI) + { + return 1 / (2 * M_PI); + } + else + { + return 0; + } +} + +double +test_dir3dyz (void) +{ + double x = 0, y = 0, z = 0, theta; + gsl_ran_dir_3d (r_global, &x, &y, &z); + theta = atan2 (y, z); + return theta; +} + +double +test_dir3dyz_pdf (double x) +{ + if (x > -M_PI && x <= M_PI) + { + return 1 / (2 * M_PI); + } + else + { + return 0; + } +} + +double +test_dir3dzx (void) +{ + double x = 0, y = 0, z = 0, theta; + gsl_ran_dir_3d (r_global, &x, &y, &z); + theta = atan2 (z, x); + return theta; +} + +double +test_dir3dzx_pdf (double x) +{ + if (x > -M_PI && x <= M_PI) + { + return 1 / (2 * M_PI); + } + else + { + return 0; + } +} + +double +test_dirichlet (void) +{ + /* This is a bit of a lame test, since when K=2, the Dirichlet distribution + becomes a beta distribution */ + size_t K = 2; + double alpha[2] = { 2.5, 5.0 }; + double theta[2] = { 0.0, 0.0 }; + + gsl_ran_dirichlet (r_global, K, alpha, theta); + + return theta[0]; +} + +double +test_dirichlet_pdf (double x) +{ + size_t K = 2; + double alpha[2] = { 2.5, 5.0 }; + double theta[2]; + + if (x <= 0.0 || x >= 1.0) + return 0.0; /* Out of range */ + + theta[0] = x; + theta[1] = 1.0 - x; + + return gsl_ran_dirichlet_pdf (K, alpha, theta); +} + + +double +test_dirichlet_small (void) +{ + size_t K = 2; + double alpha[2] = { 2.5e-3, 5.0e-3}; + double theta[2] = { 0.0, 0.0 }; + + gsl_ran_dirichlet (r_global, K, alpha, theta); + + return theta[0]; +} + +double +test_dirichlet_small_pdf (double x) +{ + size_t K = 2; + double alpha[2] = { 2.5e-3, 5.0e-3 }; + double theta[2]; + + if (x <= 0.0 || x >= 1.0) + return 0.0; /* Out of range */ + + theta[0] = x; + theta[1] = 1.0 - x; + + return gsl_ran_dirichlet_pdf (K, alpha, theta); +} + + +/* Check that the observed means of the Dirichlet variables are + within reasonable statistical errors of their correct values. */ + +#define DIRICHLET_K 10 + +void +test_dirichlet_moments (void) +{ + double alpha[DIRICHLET_K]; + double theta[DIRICHLET_K]; + double theta_sum[DIRICHLET_K]; + + double alpha_sum = 0.0; + double mean, obs_mean, sd, sigma; + int status, k, n; + + for (k = 0; k < DIRICHLET_K; k++) + { + alpha[k] = gsl_ran_exponential (r_global, 0.1); + alpha_sum += alpha[k]; + theta_sum[k] = 0.0; + } + + for (n = 0; n < N; n++) + { + gsl_ran_dirichlet (r_global, DIRICHLET_K, alpha, theta); + for (k = 0; k < DIRICHLET_K; k++) + theta_sum[k] += theta[k]; + } + + for (k = 0; k < DIRICHLET_K; k++) + { + mean = alpha[k] / alpha_sum; + sd = + sqrt ((alpha[k] * (1. - alpha[k] / alpha_sum)) / + (alpha_sum * (alpha_sum + 1.))); + obs_mean = theta_sum[k] / N; + sigma = sqrt ((double) N) * fabs (mean - obs_mean) / sd; + + status = (sigma > 3.0); + + gsl_test (status, + "test gsl_ran_dirichlet: mean (%g observed vs %g expected)", + obs_mean, mean); + } +} + + +/* Check that the observed means of the multinomial variables are + within reasonable statistical errors of their correct values. */ + +void +test_multinomial_moments (void) +{ + const unsigned int sum_n = 100; + + const double p[MULTI_DIM] ={ 0.2, 0.20, 0.17, 0.14, 0.12, + 0.07, 0.05, 0.02, 0.02, 0.01 }; + + unsigned int x[MULTI_DIM]; + double x_sum[MULTI_DIM]; + + double mean, obs_mean, sd, sigma; + int status, k, n; + + for (k = 0; k < MULTI_DIM; k++) + x_sum[k] =0.0; + + for (n = 0; n < N; n++) + { + gsl_ran_multinomial (r_global, MULTI_DIM, sum_n, p, x); + for (k = 0; k < MULTI_DIM; k++) + x_sum[k] += x[k]; + } + + for (k = 0; k < MULTI_DIM; k++) + { + mean = p[k] * sum_n; + sd = p[k] * (1.-p[k]) * sum_n; + + obs_mean = x_sum[k] / N; + sigma = sqrt ((double) N) * fabs (mean - obs_mean) / sd; + + status = (sigma > 3.0); + + gsl_test (status, + "test gsl_ran_multinomial: mean (%g observed vs %g expected)", + obs_mean, mean); + } +} + + +double +test_discrete1 (void) +{ + static double P[3] = { 0.59, 0.4, 0.01 }; + if (g1 == NULL) + { + g1 = gsl_ran_discrete_preproc (3, P); + } + return gsl_ran_discrete (r_global, g1); +} + +double +test_discrete1_pdf (unsigned int n) +{ + return gsl_ran_discrete_pdf ((size_t) n, g1); +} + +double +test_discrete2 (void) +{ + static double P[10] = { 1, 9, 3, 4, 5, 8, 6, 7, 2, 0 }; + if (g2 == NULL) + { + g2 = gsl_ran_discrete_preproc (10, P); + } + return gsl_ran_discrete (r_global, g2); +} + +double +test_discrete2_pdf (unsigned int n) +{ + return gsl_ran_discrete_pdf ((size_t) n, g2); +} +double +test_discrete3 (void) +{ + static double P[20]; + if (g3 == NULL) + { int i; + for (i=0; i<20; ++i) P[i]=1.0/20; + g3 = gsl_ran_discrete_preproc (20, P); + } + return gsl_ran_discrete (r_global, g3); +} + +double +test_discrete3_pdf (unsigned int n) +{ + return gsl_ran_discrete_pdf ((size_t) n, g3); +} + + +double +test_erlang (void) +{ + return gsl_ran_erlang (r_global, 3.0, 4.0); +} + +double +test_erlang_pdf (double x) +{ + return gsl_ran_erlang_pdf (x, 3.0, 4.0); +} + +double +test_exponential (void) +{ + return gsl_ran_exponential (r_global, 2.0); +} + +double +test_exponential_pdf (double x) +{ + return gsl_ran_exponential_pdf (x, 2.0); +} + +double +test_exppow0 (void) +{ + return gsl_ran_exppow (r_global, 3.7, 0.3); +} + +double +test_exppow0_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 0.3); +} + +double +test_exppow1 (void) +{ + return gsl_ran_exppow (r_global, 3.7, 1.0); +} + +double +test_exppow1_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 1.0); +} + +double +test_exppow1a (void) +{ + return gsl_ran_exppow (r_global, 3.7, 1.9); +} + +double +test_exppow1a_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 1.9); +} + +double +test_exppow2 (void) +{ + return gsl_ran_exppow (r_global, 3.7, 2.0); +} + +double +test_exppow2_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 2.0); +} + + +double +test_exppow2a (void) +{ + return gsl_ran_exppow (r_global, 3.7, 3.5); +} + +double +test_exppow2a_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 3.5); +} + +double +test_exppow2b (void) +{ + return gsl_ran_exppow (r_global, 3.7, 7.5); +} + +double +test_exppow2b_pdf (double x) +{ + return gsl_ran_exppow_pdf (x, 3.7, 7.5); +} + +double +test_fdist (void) +{ + return gsl_ran_fdist (r_global, 3.0, 4.0); +} + +double +test_fdist_pdf (double x) +{ + return gsl_ran_fdist_pdf (x, 3.0, 4.0); +} + +/* Test case for bug #28500: overflow in gsl_ran_fdist_pdf */ + +double +test_fdist_large (void) +{ + return gsl_ran_fdist (r_global, 8.0, 249.0); +} + +double +test_fdist_large_pdf (double x) +{ + return gsl_ran_fdist_pdf (x, 8.0, 249.0); +} + +double +test_flat (void) +{ + return gsl_ran_flat (r_global, 3.0, 4.0); +} + +double +test_flat_pdf (double x) +{ + return gsl_ran_flat_pdf (x, 3.0, 4.0); +} + +double +test_gamma (void) +{ + return gsl_ran_gamma (r_global, 2.5, 2.17); +} + +double +test_gamma_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 2.5, 2.17); +} + +double +test_gamma1 (void) +{ + return gsl_ran_gamma (r_global, 1.0, 2.17); +} + +double +test_gamma1_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 1.0, 2.17); +} + + +double +test_gamma_int (void) +{ + return gsl_ran_gamma (r_global, 10.0, 2.17); +} + +double +test_gamma_int_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 10.0, 2.17); +} + + +double +test_gamma_large (void) +{ + return gsl_ran_gamma (r_global, 20.0, 2.17); +} + +double +test_gamma_large_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 20.0, 2.17); +} + +double +test_gamma_small (void) +{ + return gsl_ran_gamma (r_global, 0.92, 2.17); +} + +double +test_gamma_small_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 0.92, 2.17); +} + +double +test_gamma_vlarge (void) +{ + /* Scale the distribution to get it into the range [-5,5] */ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return (gsl_ran_gamma (r_global, 4294967296.0, b) - c) * d; +} + +double +test_gamma_vlarge_pdf (double x) +{ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return gsl_ran_gamma_pdf ((x / d) + c, 4294967296.0, b) / d; +} + +double +test_gamma_mt (void) +{ + return gsl_ran_gamma_mt (r_global, 2.5, 2.17); +} + +double +test_gamma_mt_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 2.5, 2.17); +} + +double +test_gamma_mt1 (void) +{ + return gsl_ran_gamma_mt (r_global, 1.0, 2.17); +} + +double +test_gamma_mt1_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 1.0, 2.17); +} + + +double +test_gamma_mt_int (void) +{ + return gsl_ran_gamma_mt (r_global, 10.0, 2.17); +} + +double +test_gamma_mt_int_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 10.0, 2.17); +} + + +double +test_gamma_mt_large (void) +{ + return gsl_ran_gamma_mt (r_global, 20.0, 2.17); +} + +double +test_gamma_mt_large_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 20.0, 2.17); +} + + +double +test_gamma_mt_small (void) +{ + return gsl_ran_gamma_mt (r_global, 0.92, 2.17); +} + +double +test_gamma_mt_small_pdf (double x) +{ + return gsl_ran_gamma_pdf (x, 0.92, 2.17); +} + + +double +test_gamma_knuth_vlarge (void) +{ + /* Scale the distribution to get it into the range [-5,5] */ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return (gsl_ran_gamma_knuth (r_global, 4294967296.0, b) - c) * d; +} + +double +test_gamma_knuth_vlarge_pdf (double x) +{ + double c = 2.71828181565; + double b = 6.32899304917e-10; + double d = 1e4; + return gsl_ran_gamma_pdf ((x / d) + c, 4294967296.0, b) / d; +} + +double +test_gaussian (void) +{ + return gsl_ran_gaussian (r_global, 3.0); +} + +double +test_gaussian_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, 3.0); +} + +double +test_gaussian_ratio_method (void) +{ + return gsl_ran_gaussian_ratio_method (r_global, 3.0); +} + +double +test_gaussian_ratio_method_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, 3.0); +} + +double +test_gaussian_ziggurat (void) +{ + return gsl_ran_gaussian_ziggurat (r_global, 3.12); +} + +double +test_gaussian_ziggurat_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, 3.12); +} + +double +test_gaussian_tail (void) +{ + return gsl_ran_gaussian_tail (r_global, 1.7, 0.25); +} + +double +test_gaussian_tail_pdf (double x) +{ + return gsl_ran_gaussian_tail_pdf (x, 1.7, 0.25); +} + +double +test_gaussian_tail1 (void) +{ + return gsl_ran_gaussian_tail (r_global, -1.7, 5.0); +} + +double +test_gaussian_tail1_pdf (double x) +{ + return gsl_ran_gaussian_tail_pdf (x, -1.7, 5.0); +} + +double +test_gaussian_tail2 (void) +{ + return gsl_ran_gaussian_tail (r_global, 0.1, 2.0); +} + +double +test_gaussian_tail2_pdf (double x) +{ + return gsl_ran_gaussian_tail_pdf (x, 0.1, 2.0); +} + + +double +test_ugaussian (void) +{ + return gsl_ran_ugaussian (r_global); +} + +double +test_ugaussian_pdf (double x) +{ + return gsl_ran_ugaussian_pdf (x); +} + +double +test_ugaussian_ratio_method (void) +{ + return gsl_ran_ugaussian_ratio_method (r_global); +} + +double +test_ugaussian_ratio_method_pdf (double x) +{ + return gsl_ran_ugaussian_pdf (x); +} + +double +test_ugaussian_tail (void) +{ + return gsl_ran_ugaussian_tail (r_global, 3.0); +} + +double +test_ugaussian_tail_pdf (double x) +{ + return gsl_ran_ugaussian_tail_pdf (x, 3.0); +} + +double +test_bivariate_gaussian1 (void) +{ + double x = 0, y = 0; + gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); + return x; +} + +double +test_bivariate_gaussian1_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, 3.0); +} + +double +test_bivariate_gaussian2 (void) +{ + double x = 0, y = 0; + gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); + return y; +} + +double +test_bivariate_gaussian2_pdf (double y) +{ + int i, n = 10; + double sum = 0; + double a = -10, b = 10, dx = (b - a) / n; + for (i = 0; i < n; i++) + { + double x = a + i * dx; + sum += gsl_ran_bivariate_gaussian_pdf (x, y, 3.0, 2.0, 0.3) * dx; + } + return sum; +} + + +double +test_bivariate_gaussian3 (void) +{ + double x = 0, y = 0; + gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); + return x + y; +} + +double +test_bivariate_gaussian3_pdf (double x) +{ + double sx = 3.0, sy = 2.0, r = 0.3; + double su = (sx + r * sy); + double sv = sy * sqrt (1 - r * r); + double sigma = sqrt (su * su + sv * sv); + + return gsl_ran_gaussian_pdf (x, sigma); +} + +double +test_bivariate_gaussian4 (void) +{ + double x = 0, y = 0; + gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, -0.5, &x, &y); + return x + y; +} + +double +test_bivariate_gaussian4_pdf (double x) +{ + double sx = 3.0, sy = 2.0, r = -0.5; + double su = (sx + r * sy); + double sv = sy * sqrt (1 - r * r); + double sigma = sqrt (su * su + sv * sv); + + return gsl_ran_gaussian_pdf (x, sigma); +} + + +double +test_geometric (void) +{ + return gsl_ran_geometric (r_global, 0.5); +} + +double +test_geometric_pdf (unsigned int n) +{ + return gsl_ran_geometric_pdf (n, 0.5); +} + +double +test_geometric1 (void) +{ + return gsl_ran_geometric (r_global, 1.0); +} + +double +test_geometric1_pdf (unsigned int n) +{ + return gsl_ran_geometric_pdf (n, 1.0); +} + +double +test_hypergeometric1 (void) +{ + return gsl_ran_hypergeometric (r_global, 5, 7, 4); +} + +double +test_hypergeometric1_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 5, 7, 4); +} + + +double +test_hypergeometric2 (void) +{ + return gsl_ran_hypergeometric (r_global, 5, 7, 11); +} + +double +test_hypergeometric2_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 5, 7, 11); +} + +double +test_hypergeometric3 (void) +{ + return gsl_ran_hypergeometric (r_global, 5, 7, 1); +} + +double +test_hypergeometric3_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 5, 7, 1); +} + +double +test_hypergeometric4 (void) +{ + return gsl_ran_hypergeometric (r_global, 5, 7, 20); +} + +double +test_hypergeometric4_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 5, 7, 20); +} + +double +test_hypergeometric5 (void) +{ + return gsl_ran_hypergeometric (r_global, 2, 7, 5); +} + +double +test_hypergeometric5_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 2, 7, 5); +} + + +double +test_hypergeometric6 (void) +{ + return gsl_ran_hypergeometric (r_global, 2, 10, 3); +} + +double +test_hypergeometric6_pdf (unsigned int n) +{ + return gsl_ran_hypergeometric_pdf (n, 2, 10, 3); +} + + + + +double +test_gumbel1 (void) +{ + return gsl_ran_gumbel1 (r_global, 3.12, 4.56); +} + +double +test_gumbel1_pdf (double x) +{ + return gsl_ran_gumbel1_pdf (x, 3.12, 4.56); +} + +double +test_gumbel2 (void) +{ + return gsl_ran_gumbel2 (r_global, 3.12, 4.56); +} + +double +test_gumbel2_pdf (double x) +{ + return gsl_ran_gumbel2_pdf (x, 3.12, 4.56); +} + +double +test_landau (void) +{ + return gsl_ran_landau (r_global); +} + +double +test_landau_pdf (double x) +{ + return gsl_ran_landau_pdf (x); +} + +double +test_levy1 (void) +{ + return gsl_ran_levy (r_global, 5.0, 1.0); +} + +double +test_levy1_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 5.0); +} + +double +test_levy2 (void) +{ + return gsl_ran_levy (r_global, 5.0, 2.0); +} + +double +test_levy2_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); +} + +double +test_levy1a (void) +{ + return gsl_ran_levy (r_global, 5.0, 1.01); +} + +double +test_levy1a_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 5.0); +} + +double +test_levy2a (void) +{ + return gsl_ran_levy (r_global, 5.0, 1.99); +} + +double +test_levy2a_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); +} + + +double +test_levy_skew1 (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 1.0, 0.0); +} + +double +test_levy_skew1_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 5.0); +} + +double +test_levy_skew2 (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 2.0, 0.0); +} + +double +test_levy_skew2_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); +} + +double +test_levy_skew1a (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 1.01, 0.0); +} + +double +test_levy_skew1a_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 5.0); +} + +double +test_levy_skew2a (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 1.99, 0.0); +} + +double +test_levy_skew2a_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); +} + +double +test_levy_skew1b (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 1.01, 0.001); +} + +double +test_levy_skew1b_pdf (double x) +{ + return gsl_ran_cauchy_pdf (x, 5.0); +} + +double +test_levy_skew2b (void) +{ + return gsl_ran_levy_skew (r_global, 5.0, 1.99, 0.001); +} + +double +test_levy_skew2b_pdf (double x) +{ + return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); +} + + +double +test_logistic (void) +{ + return gsl_ran_logistic (r_global, 3.1); +} + +double +test_logistic_pdf (double x) +{ + return gsl_ran_logistic_pdf (x, 3.1); +} + +double +test_logarithmic (void) +{ + return gsl_ran_logarithmic (r_global, 0.4); +} + +double +test_logarithmic_pdf (unsigned int n) +{ + return gsl_ran_logarithmic_pdf (n, 0.4); +} + + +double +test_lognormal (void) +{ + return gsl_ran_lognormal (r_global, 2.7, 1.3); +} + +double +test_lognormal_pdf (double x) +{ + return gsl_ran_lognormal_pdf (x, 2.7, 1.3); +} + +double +test_multinomial (void) +{ + const size_t K = 3; + const unsigned int sum_n = BINS; + unsigned int n[3]; + /* Test use of weights instead of probabilities. */ + const double p[] = { 2., 7., 1.}; + + gsl_ran_multinomial ( r_global, K, sum_n, p, n); + + return n[0]; +} + +double +test_multinomial_pdf (unsigned int n_0) +{ + /* The margional distribution of just 1 variate is binomial. */ + size_t K = 2; + /* Test use of weights instead of probabilities */ + double p[] = { 0.4, 1.6}; + const unsigned int sum_n = BINS; + unsigned int n[2]; + + n[0] = n_0; + n[1] =sum_n - n_0; + + return gsl_ran_multinomial_pdf (K, p, n); +} + + +double +test_multinomial_large (void) +{ + const unsigned int sum_n = BINS; + unsigned int n[MULTI_DIM]; + const double p[MULTI_DIM] = { 0.2, 0.20, 0.17, 0.14, 0.12, + 0.07, 0.05, 0.04, 0.01, 0.00 }; + + gsl_ran_multinomial ( r_global, MULTI_DIM, sum_n, p, n); + + return n[0]; +} + +double +test_multinomial_large_pdf (unsigned int n_0) +{ + return test_multinomial_pdf(n_0); +} + +double +test_negative_binomial (void) +{ + return gsl_ran_negative_binomial (r_global, 0.3, 20.0); +} + +double +test_negative_binomial_pdf (unsigned int n) +{ + return gsl_ran_negative_binomial_pdf (n, 0.3, 20.0); +} + +double +test_pascal (void) +{ + return gsl_ran_pascal (r_global, 0.8, 3); +} + +double +test_pascal_pdf (unsigned int n) +{ + return gsl_ran_pascal_pdf (n, 0.8, 3); +} + + +double +test_pareto (void) +{ + return gsl_ran_pareto (r_global, 1.9, 2.75); +} + +double +test_pareto_pdf (double x) +{ + return gsl_ran_pareto_pdf (x, 1.9, 2.75); +} + +double +test_rayleigh (void) +{ + return gsl_ran_rayleigh (r_global, 1.9); +} + +double +test_rayleigh_pdf (double x) +{ + return gsl_ran_rayleigh_pdf (x, 1.9); +} + +double +test_rayleigh_tail (void) +{ + return gsl_ran_rayleigh_tail (r_global, 2.7, 1.9); +} + +double +test_rayleigh_tail_pdf (double x) +{ + return gsl_ran_rayleigh_tail_pdf (x, 2.7, 1.9); +} + + +double +test_poisson (void) +{ + return gsl_ran_poisson (r_global, 5.0); +} + +double +test_poisson_pdf (unsigned int n) +{ + return gsl_ran_poisson_pdf (n, 5.0); +} + +double +test_poisson_large (void) +{ + return gsl_ran_poisson (r_global, 30.0); +} + +double +test_poisson_large_pdf (unsigned int n) +{ + return gsl_ran_poisson_pdf (n, 30.0); +} + + +double +test_tdist1 (void) +{ + return gsl_ran_tdist (r_global, 1.75); +} + +double +test_tdist1_pdf (double x) +{ + return gsl_ran_tdist_pdf (x, 1.75); +} + +double +test_tdist2 (void) +{ + return gsl_ran_tdist (r_global, 12.75); +} + +double +test_tdist2_pdf (double x) +{ + return gsl_ran_tdist_pdf (x, 12.75); +} + + +double +test_laplace (void) +{ + return gsl_ran_laplace (r_global, 2.75); +} + +double +test_laplace_pdf (double x) +{ + return gsl_ran_laplace_pdf (x, 2.75); +} + +double +test_weibull (void) +{ + return gsl_ran_weibull (r_global, 3.14, 2.75); +} + +double +test_weibull_pdf (double x) +{ + return gsl_ran_weibull_pdf (x, 3.14, 2.75); +} + + +double +test_weibull1 (void) +{ + return gsl_ran_weibull (r_global, 2.97, 1.0); +} + +double +test_weibull1_pdf (double x) +{ + return gsl_ran_weibull_pdf (x, 2.97, 1.0); +} diff --git a/software/gsl-1.15/randist/weibull.c b/software/gsl-1.15/randist/weibull.c new file mode 100644 index 000000000..b1494ef36 --- /dev/null +++ b/software/gsl-1.15/randist/weibull.c @@ -0,0 +1,64 @@ +/* randist/weibull.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* The Weibull distribution has the form, + + p(x) dx = (b/a) (x/a)^(b-1) exp(-(x/a)^b) dx + + */ + +double +gsl_ran_weibull (const gsl_rng * r, const double a, const double b) +{ + double x = gsl_rng_uniform_pos (r); + + double z = pow (-log (x), 1 / b); + + return a * z; +} + +double +gsl_ran_weibull_pdf (const double x, const double a, const double b) +{ + if (x < 0) + { + return 0 ; + } + else if (x == 0) + { + if (b == 1) + return 1/a ; + else + return 0 ; + } + else if (b == 1) + { + return exp(-x/a)/a ; + } + else + { + double p = (b/a) * exp (-pow (x/a, b) + (b - 1) * log (x/a)); + return p; + } +} diff --git a/software/gsl-1.15/rng/.deps/borosh13.Plo b/software/gsl-1.15/rng/.deps/borosh13.Plo new file mode 100644 index 000000000..9640814a1 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/borosh13.Plo @@ -0,0 +1,95 @@ +borosh13.lo: borosh13.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/cmrg.Plo b/software/gsl-1.15/rng/.deps/cmrg.Plo new file mode 100644 index 000000000..454e0ef74 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/cmrg.Plo @@ -0,0 +1,95 @@ +cmrg.lo: cmrg.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/coveyou.Plo b/software/gsl-1.15/rng/.deps/coveyou.Plo new file mode 100644 index 000000000..9a5792419 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/coveyou.Plo @@ -0,0 +1,95 @@ +coveyou.lo: coveyou.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/default.Plo b/software/gsl-1.15/rng/.deps/default.Plo new file mode 100644 index 000000000..c86722219 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/default.Plo @@ -0,0 +1,102 @@ +default.lo: default.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/secure/_string.h ../gsl/gsl_rng.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/file.Plo b/software/gsl-1.15/rng/.deps/file.Plo new file mode 100644 index 000000000..afa9a61a2 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/file.Plo @@ -0,0 +1,95 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_rng.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/fishman18.Plo b/software/gsl-1.15/rng/.deps/fishman18.Plo new file mode 100644 index 000000000..371d5f797 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/fishman18.Plo @@ -0,0 +1,97 @@ +fishman18.lo: fishman18.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h schrage.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +schrage.c: diff --git a/software/gsl-1.15/rng/.deps/fishman20.Plo b/software/gsl-1.15/rng/.deps/fishman20.Plo new file mode 100644 index 000000000..c10e5c69e --- /dev/null +++ b/software/gsl-1.15/rng/.deps/fishman20.Plo @@ -0,0 +1,95 @@ +fishman20.lo: fishman20.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/fishman2x.Plo b/software/gsl-1.15/rng/.deps/fishman2x.Plo new file mode 100644 index 000000000..ad77abe7d --- /dev/null +++ b/software/gsl-1.15/rng/.deps/fishman2x.Plo @@ -0,0 +1,95 @@ +fishman2x.lo: fishman2x.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/gfsr4.Plo b/software/gsl-1.15/rng/.deps/gfsr4.Plo new file mode 100644 index 000000000..04df24f33 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/gfsr4.Plo @@ -0,0 +1,95 @@ +gfsr4.lo: gfsr4.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/inline.Plo b/software/gsl-1.15/rng/.deps/inline.Plo new file mode 100644 index 000000000..05aa83a07 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/inline.Plo @@ -0,0 +1,104 @@ +inline.lo: inline.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../build.h ../gsl/gsl_rng.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../build.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/knuthran.Plo b/software/gsl-1.15/rng/.deps/knuthran.Plo new file mode 100644 index 000000000..574af2e94 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/knuthran.Plo @@ -0,0 +1,95 @@ +knuthran.lo: knuthran.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/knuthran2.Plo b/software/gsl-1.15/rng/.deps/knuthran2.Plo new file mode 100644 index 000000000..6991c07dd --- /dev/null +++ b/software/gsl-1.15/rng/.deps/knuthran2.Plo @@ -0,0 +1,97 @@ +knuthran2.lo: knuthran2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h schrage.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +schrage.c: diff --git a/software/gsl-1.15/rng/.deps/knuthran2002.Plo b/software/gsl-1.15/rng/.deps/knuthran2002.Plo new file mode 100644 index 000000000..e48c914c3 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/knuthran2002.Plo @@ -0,0 +1,95 @@ +knuthran2002.lo: knuthran2002.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/lecuyer21.Plo b/software/gsl-1.15/rng/.deps/lecuyer21.Plo new file mode 100644 index 000000000..7fe9c3e72 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/lecuyer21.Plo @@ -0,0 +1,95 @@ +lecuyer21.lo: lecuyer21.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/minstd.Plo b/software/gsl-1.15/rng/.deps/minstd.Plo new file mode 100644 index 000000000..09556f62e --- /dev/null +++ b/software/gsl-1.15/rng/.deps/minstd.Plo @@ -0,0 +1,95 @@ +minstd.lo: minstd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/mrg.Plo b/software/gsl-1.15/rng/.deps/mrg.Plo new file mode 100644 index 000000000..ab6ba7cb0 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/mrg.Plo @@ -0,0 +1,95 @@ +mrg.lo: mrg.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/mt.Plo b/software/gsl-1.15/rng/.deps/mt.Plo new file mode 100644 index 000000000..81270e405 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/mt.Plo @@ -0,0 +1,95 @@ +mt.lo: mt.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/r250.Plo b/software/gsl-1.15/rng/.deps/r250.Plo new file mode 100644 index 000000000..cecef6dda --- /dev/null +++ b/software/gsl-1.15/rng/.deps/r250.Plo @@ -0,0 +1,95 @@ +r250.lo: r250.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ran0.Plo b/software/gsl-1.15/rng/.deps/ran0.Plo new file mode 100644 index 000000000..abb06c5d8 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ran0.Plo @@ -0,0 +1,95 @@ +ran0.lo: ran0.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_rng.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ran1.Plo b/software/gsl-1.15/rng/.deps/ran1.Plo new file mode 100644 index 000000000..5d408e884 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ran1.Plo @@ -0,0 +1,95 @@ +ran1.lo: ran1.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ran2.Plo b/software/gsl-1.15/rng/.deps/ran2.Plo new file mode 100644 index 000000000..b08c44b48 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ran2.Plo @@ -0,0 +1,95 @@ +ran2.lo: ran2.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ran3.Plo b/software/gsl-1.15/rng/.deps/ran3.Plo new file mode 100644 index 000000000..27e0707d5 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ran3.Plo @@ -0,0 +1,95 @@ +ran3.lo: ran3.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/rand.Plo b/software/gsl-1.15/rng/.deps/rand.Plo new file mode 100644 index 000000000..a53191cae --- /dev/null +++ b/software/gsl-1.15/rng/.deps/rand.Plo @@ -0,0 +1,95 @@ +rand.lo: rand.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/rand48.Plo b/software/gsl-1.15/rng/.deps/rand48.Plo new file mode 100644 index 000000000..6f98745db --- /dev/null +++ b/software/gsl-1.15/rng/.deps/rand48.Plo @@ -0,0 +1,99 @@ +rand48.lo: rand48.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_sys.h ../gsl/gsl_rng.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/random.Plo b/software/gsl-1.15/rng/.deps/random.Plo new file mode 100644 index 000000000..9340a0890 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/random.Plo @@ -0,0 +1,95 @@ +random.lo: random.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/randu.Plo b/software/gsl-1.15/rng/.deps/randu.Plo new file mode 100644 index 000000000..7ba2bd3f0 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/randu.Plo @@ -0,0 +1,95 @@ +randu.lo: randu.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ranf.Plo b/software/gsl-1.15/rng/.deps/ranf.Plo new file mode 100644 index 000000000..ab920e55d --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ranf.Plo @@ -0,0 +1,97 @@ +ranf.lo: ranf.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ranlux.Plo b/software/gsl-1.15/rng/.deps/ranlux.Plo new file mode 100644 index 000000000..904f15ecc --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ranlux.Plo @@ -0,0 +1,95 @@ +ranlux.lo: ranlux.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ranlxd.Plo b/software/gsl-1.15/rng/.deps/ranlxd.Plo new file mode 100644 index 000000000..f62d856b8 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ranlxd.Plo @@ -0,0 +1,95 @@ +ranlxd.lo: ranlxd.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ranlxs.Plo b/software/gsl-1.15/rng/.deps/ranlxs.Plo new file mode 100644 index 000000000..76728aaf8 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ranlxs.Plo @@ -0,0 +1,95 @@ +ranlxs.lo: ranlxs.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/ranmar.Plo b/software/gsl-1.15/rng/.deps/ranmar.Plo new file mode 100644 index 000000000..abe7ea21e --- /dev/null +++ b/software/gsl-1.15/rng/.deps/ranmar.Plo @@ -0,0 +1,95 @@ +ranmar.lo: ranmar.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/rng.Plo b/software/gsl-1.15/rng/.deps/rng.Plo new file mode 100644 index 000000000..76ce81411 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/rng.Plo @@ -0,0 +1,102 @@ +rng.lo: rng.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_types.h ../gsl/gsl_rng.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/slatec.Plo b/software/gsl-1.15/rng/.deps/slatec.Plo new file mode 100644 index 000000000..57b00422a --- /dev/null +++ b/software/gsl-1.15/rng/.deps/slatec.Plo @@ -0,0 +1,95 @@ +slatec.lo: slatec.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/taus.Plo b/software/gsl-1.15/rng/.deps/taus.Plo new file mode 100644 index 000000000..5b0e85b14 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/taus.Plo @@ -0,0 +1,95 @@ +taus.lo: taus.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/taus113.Plo b/software/gsl-1.15/rng/.deps/taus113.Plo new file mode 100644 index 000000000..52e0254c9 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/taus113.Plo @@ -0,0 +1,95 @@ +taus113.lo: taus113.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/test.Po b/software/gsl-1.15/rng/.deps/test.Po new file mode 100644 index 000000000..263f10add --- /dev/null +++ b/software/gsl-1.15/rng/.deps/test.Po @@ -0,0 +1,102 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_rng.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/rng/.deps/transputer.Plo b/software/gsl-1.15/rng/.deps/transputer.Plo new file mode 100644 index 000000000..4636c1a6b --- /dev/null +++ b/software/gsl-1.15/rng/.deps/transputer.Plo @@ -0,0 +1,95 @@ +transputer.lo: transputer.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/tt.Plo b/software/gsl-1.15/rng/.deps/tt.Plo new file mode 100644 index 000000000..f066cb889 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/tt.Plo @@ -0,0 +1,95 @@ +tt.lo: tt.c ../config.h /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/types.Plo b/software/gsl-1.15/rng/.deps/types.Plo new file mode 100644 index 000000000..a03f25507 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/types.Plo @@ -0,0 +1,95 @@ +types.lo: types.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/uni.Plo b/software/gsl-1.15/rng/.deps/uni.Plo new file mode 100644 index 000000000..999310d09 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/uni.Plo @@ -0,0 +1,95 @@ +uni.lo: uni.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/uni32.Plo b/software/gsl-1.15/rng/.deps/uni32.Plo new file mode 100644 index 000000000..a1c8abe83 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/uni32.Plo @@ -0,0 +1,95 @@ +uni32.lo: uni32.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/vax.Plo b/software/gsl-1.15/rng/.deps/vax.Plo new file mode 100644 index 000000000..943ba1317 --- /dev/null +++ b/software/gsl-1.15/rng/.deps/vax.Plo @@ -0,0 +1,95 @@ +vax.lo: vax.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/waterman14.Plo b/software/gsl-1.15/rng/.deps/waterman14.Plo new file mode 100644 index 000000000..549e0593e --- /dev/null +++ b/software/gsl-1.15/rng/.deps/waterman14.Plo @@ -0,0 +1,95 @@ +waterman14.lo: waterman14.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/.deps/zuf.Plo b/software/gsl-1.15/rng/.deps/zuf.Plo new file mode 100644 index 000000000..f1902c4fc --- /dev/null +++ b/software/gsl-1.15/rng/.deps/zuf.Plo @@ -0,0 +1,95 @@ +zuf.lo: zuf.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/rng/ChangeLog b/software/gsl-1.15/rng/ChangeLog new file mode 100644 index 000000000..33088aa48 --- /dev/null +++ b/software/gsl-1.15/rng/ChangeLog @@ -0,0 +1,404 @@ +2011-04-28 Brian Gough + + * ranlxs.c (ranlxs_set_lux): enforce maximum seed of + 2^31-1 (0x7FFFFFFF) for ranlxs + +2010-01-07 Brian Gough + + * ran3.c (ran3_set): added a check for negative j + +2009-07-09 Brian Gough + + * rng.c (gsl_rng_free): handle NULL argument in free + +2008-10-13 Brian Gough + + * file.c: added (char *) to allow compilation with C++ compiler + +2008-07-03 Brian Gough + + * rng.c: moved inline functions to inline.c + + * gsl_rng.h: use new inline declarations + + * inline.c: handle inline functions separately + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-01-28 Brian Gough + + * knuthran2002.c: added revised version from 9th printing + +2007-01-04 Brian Gough + + * default.c (gsl_rng_env_setup): send newline to stderr not stdout + +2006-04-13 Brian Gough + + * default.c (gsl_rng_env_setup): print a newline after list of + generators in error message + +2006-03-16 Brian Gough + + * test.c (main): added taus2 test + +2006-02-19 Brian Gough + + * rng.c: added note about why range=max-min not max-min+1 + +2005-12-16 Brian Gough + + * rng.c (gsl_rng_uniform_int): catch the case n = 0 and return an + error + +2003-07-23 Brian Gough + + * file.c: added fwrite/fread functions + +2003-06-12 Brian Gough + + * Makefile.am: removed benchmark programs from default build + +2003-06-02 Brian Gough + + * waterman14.c: increased RAND_MIN to 1 + + * lecuyer21.c: corrections to RAND_MIN, RAND_MAX, floating point + denominator and seeding modulus + + * fishman20.c (ran_get): use schrage multiplication to avoid + overflow + + * coveyou.c: corrected value of RAND_MIN to 1 and RAND_MAX to 2^32-1 + + * borosh13.c: increased RAND_MIN to 1 + + * knuthran2.c (ran_get): use schrage multiplication to avoid + overflow in intermediate results + + * fishman2x.c (ran_get): use schrage multiplication to avoid + overflow in intermediate results + + * fishman18.c (ran_get): use schrage multiplication to avoid + overflow in intermediate results + + * schrage.c (schrage): utility functions for multiplication of + long integers + + * test.c (main): updated incorrect test values for + gsl_rng_fishman18 gsl_rng_fishman2x gsl_rng_knuthran2 + +Mon Nov 25 19:27:10 2002 Brian Gough + + * taus.c (taus2_set): fixed bug in seeding for s3 (test should be + for s3<16, not s3<8) + +Sun Nov 3 14:40:43 2002 Brian Gough + + * taus.c (taus2_set): fixed bug in seeding for s2 < 8 + +Mon Jun 17 21:04:10 2002 Brian Gough + + * mt.c (mt_set): ensure state counter mti is initialised by + seeding routine + +Wed May 29 21:52:11 2002 Brian Gough + + * randu.c: removed unused variable m + +Tue May 7 22:34:52 2002 Brian Gough + + * mt.c (mt_1999_set): updated seeding procedure according to new + release of MT19937 from the original authors. + +Fri Apr 26 21:17:05 2002 Brian Gough + + * taus.c (taus2_set): added alternate seeding procedure as + described in erratum to P.L'Ecuyer's paper. + +Wed Apr 17 19:37:49 2002 Brian Gough + + * test.c (main): added missing test for gsl_rng_mt19937_1998 + + * gsl_rng.h: added missing declaration for gsl_rng_mt19937_1998 + +Sun Dec 2 15:45:24 2001 Brian Gough + + * Added new generators borosh13, coveyou, fishman18, fishman20, + fishman2x, knuthran, knuthran2, lecuyer21, waterman14 from Knuth's + Seminumerical Algorithms 3rd Ed. Implemented by Carlo Perassi. + + * gfsr4.c (gfsr4_get_double): increased divisor for double to + 2^32, avoids generating exact result of 1.0 as specified in the + documentation + +Mon Sep 3 10:32:01 2001 Brian Gough + + * mt.c (mt_1998_set): renamed macro to avoid duplicate definition + +Fri Aug 31 17:49:37 2001 Brian Gough + + * mt.c (mt_1998_set): added the original (buggy) MT19937 seeding + routine as mt19937_1998 for compatibility. + +Wed May 2 15:35:38 2001 Brian Gough + + * ran1.c (ran1_get_double): use float constants for comparison + for compatibility with original Numerical Recipes routines + + * ran2.c (ran2_get_double): ditto + +Fri Apr 27 18:47:07 2001 Brian Gough + + * types.c (gsl_rng_types_setup): added void to make prototype + valid in ansi c + +Mon Apr 16 20:03:07 2001 Brian Gough + + * default.c (gsl_rng_env_setup): removed spurious argument to + fprintf + +Tue Jan 23 13:24:26 2001 Brian Gough + + * types.c (gsl_rng_types_setup): provide a function that returns a + list of all the generator types + + * default.c (gsl_rng_env_setup): get the list of generators from a + function rather than having a list in the code itself. Display a + list of the valid generators if the user provides an incorrect one. + +Fri Dec 8 20:30:58 2000 Brian Gough + + * ranlxs.c: renamed internal function ranlxs_set_impl to + ranlxs_set + + * ranlxd.c: renamed internal function ranlxd_set_impl to + ranlxd_set + + * ranlux.c: renamed internal function ranlux_set_impl to + ranlux_set + + * random.c: renamed internal function random_get_impl function to + random_get + +Sat Jul 29 14:29:54 2000 Brian Gough + + * test.c (main): updated test value for MT19937 for new seeding + procedure + + * mt.c: The seeding procedure has been updated to match the 10/99 + release of MT19937. + +Wed Mar 8 16:04:34 2000 Brian Gough + + * rng.c (gsl_rng_memcpy): generators must now be of the same type + for a copy from one to the other to work. + +Thu Feb 24 16:41:48 2000 Brian Gough + + * ran3.c (ran3_set): initialize unused zeroth element of state to + zero for consistency. + +Mon Feb 14 13:28:26 2000 Brian Gough + + * made all internal functions static + +Mon Dec 6 16:21:05 1999 Brian Gough + + * test.c (main): rewrote the tests to loop over all the generators + +Wed Aug 11 20:57:10 1999 Brian Gough + + * ranlxd.c, ranlxs.c: added ranlxd and ranlxs, second generation + RANLUX generators from Martin Luescher. + +Mon Mar 1 21:12:28 1999 Brian Gough + + * test.c (rng_parallel_state_test): added some extra tests to fill + a few holes in the net + + * gsl_rng.h: moved static class information (max, min, etc) out of + the instance data. Originally I avoided this because of the + overhead of the extra indirection (r->type->get vs r->get) for + every get function call, but that turns out to be only about 10% + at worst so it's worth the slight speed cost to make the code + safer. + +Tue Nov 17 17:09:31 1998 Brian Gough + + * gfsr4.c: added #include which was missing + +1998-11-04 + + * ranf.c: fix portability problems on alpha, by ensuring that + shorts are correctly promoted to longs at the appropriate points + + * rand48.c: fix portability problems by ensuring that shorts are + correctly promoted to longs at the appropriate points + + * rng-dump.c (main): write out file correctly by using chars + instead of unsigned long ints, since these can vary in size on + different architectures + +Wed Oct 28 15:02:22 1998 Brian Gough + + * rng.c: added #include to get prototype for memcpy + +Mon Sep 14 20:53:09 1998 Brian Gough + + * default.c (gsl_rng_env_setup): added gfsr4 + +1998-09-10 James Theiler + + * gfsr4.c: added new random number generator + + * Makefile.am: added gfsr4.c to SOURCES list + + * gsl_rng.h: added gfsr4 + + * test.c: added gfsr4 + + * benchmark.c: added gfsr4 + +Mon Aug 10 22:12:13 1998 Brian Gough + + * rng-dump.c: program to write out 3 million random numbers, + suitable for testing with DIEHARD. + +Tue Aug 4 19:51:57 1998 Brian Gough + + * default.c (gsl_rng_env_setup): send default/enviroment output to + stderr + +Mon Aug 3 18:25:52 1998 Brian Gough + + * mt.c: made constants static since they shouldn't be exported, + added some speed improvements from Cokus' code (not all of them + since they seemed to use more registers than available on the + pentium). + +Thu Jul 9 13:56:20 1998 Brian Gough + + * slatec.c: renamed cmlib.c to slatec.c + + * transputer.c: renamed tds.c to transputer.c so the name is a bit + more obvious + + * random.c: renamed random0 functions to random8, since obviously + we can't have 0 bytes of state + + * default.c (gsl_rng_env_setup): made gsl_rng_mt19937 the default + generator + +Wed Jul 8 17:06:54 1998 Brian Gough + + * added random() functions. There are three(!) versions: the + original BSD, linux libc5 (had a typo in the multiplier, but got + installed on millions of machines so is now a defacto standard) + and GNU glibc2 (fixes the typo and has an improved seeding + procedure) + +Sun Jul 5 15:59:29 1998 Brian Gough + + * rand.c: renamed rand.c to cmlib.c and bsdrand.c to rand.c. + + * ranf.c: added CRAY RANF, 48 bit generator + + * rand48.c: added the standard unix rand48() + + * changed all the routines to allow an additional callback for + returning doubles. Now we can implement numerical recipes with its + non-standard checks on the floating point results and also access + the full state for getting 48-bit doubles out of rand48. + +Sat Jul 4 11:14:49 1998 Brian Gough + + * ranmar.c: added the RANMAR generator + + * tds.c: added the INMOS Transputer RNG + + * test.c (rng_min_test): added a test for RAND_MIN, to make sure + none of the generators go below it. Statistically the test is not + much good since it's very unlikely that an off-by-one error would + show up unless we ran the test for > 4 billion numbers. However, + the test might detect a gross error like a typo in RAND_MIN or a + degeneracy 0,0,0,... for a multiplicative generator. + + * uni.c: fixed RAND_MAX here too + + * uni32.c: fixed RAND_MAX to m1-1, not m1 (since it's modulo m1 so + m1 can't occur, only m1-1) + +Fri Jul 3 15:55:34 1998 Brian Gough + + * rng.c (gsl_rng_uniform_gt0_lt1): added a function which returns + numbers in the range (0,1), i.e. excluding 0.0 and 1.0 + + * renamed bad_randu.c to randu.c + + * renamed bad_rand.c to bsdrand.c + +Mon Jun 29 18:11:08 1998 Brian Gough + + * added implementations of the numerical recipes algorithms ran0, + ran1, ran2, ran3 + +Sun Jun 28 11:51:48 1998 Brian Gough + + * gsl_rng.h: added gsl_rng_uniform_pos which guarantees positive + numbers, (0,1] + + * added a RAND_MIN entry to the gsl_rng/gsl_rng_type structs + + * gsl_rng.h: renamed gsl_rng_get_uni to gsl_rng_uniform + +Wed Jun 24 12:10:23 1998 Brian Gough + + * gsl_rng.h: added inline versions of gsl_rng_get and + gsl_rng_get_uni + + * benchmark.c: added a simple benchmark program to measure rng's + per second + + * test.c (N2): reduced the number of tests from 1 million to 100k + to speed things up a bit + + * changed the generic seeding algorithm to s -> (69069*s) & + 0xFFFFFFFF which covers all 32 bits. + +Sun Jun 21 23:24:36 1998 Brian Gough + + * added the MT19937 and TT880 mersenne prime generators + +Sat Jun 20 13:58:40 1998 Brian Gough + + * ensured that 32 bit quantities are defined as 'long', as + required by ANSI. On a 16 bit platform 'int' is usually just 16 + bits. + + * ranlux.c: added the RANLUX generator + +Fri Jun 19 11:12:06 1998 Brian Gough + + * removed the gsl- prefix from generator name strings + +Thu Jun 18 12:17:16 1998 Brian Gough + + * test.c: added a 10000 iteration check for cmrg + + * got rid of init_state values. It's simpler to generate them + directly from the seed, the cost of creating an rng is not usually + a big deal. + + * rng.c: eliminated the gsl_rng_internal struct since it was not + really necessary + +Wed Jun 17 17:31:27 1998 Brian Gough + + * minstd.c: added Park and Millers MINSTD generator + +Thu Jun 11 18:08:40 1998 Brian Gough + + * this will be an alternate, thread-safe interface to the random + number generators. + diff --git a/software/gsl-1.15/rng/Makefile.am b/software/gsl-1.15/rng/Makefile.am new file mode 100644 index 000000000..df434ccb8 --- /dev/null +++ b/software/gsl-1.15/rng/Makefile.am @@ -0,0 +1,22 @@ +noinst_LTLIBRARIES = libgslrng.la + +pkginclude_HEADERS = gsl_rng.h + +INCLUDES = -I$(top_srcdir) + +libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c inline.c + +CLEANFILES = test.dat + +noinst_HEADERS = schrage.c + +test_SOURCES = test.c +test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +TESTS = $(check_PROGRAMS) +check_PROGRAMS = test + +# benchmark_SOURCES = benchmark.c +# benchmark_LDADD = libgslrng.la ../err/libgslerr.la ../utils/libutils.la +# rng_dump_SOURCES = rng-dump.c +# rng_dump_LDADD = libgslrng.la ../err/libgslerr.la ../utils/libutils.la diff --git a/software/gsl-1.15/rng/Makefile.in b/software/gsl-1.15/rng/Makefile.in new file mode 100644 index 000000000..f6a30ebfa --- /dev/null +++ b/software/gsl-1.15/rng/Makefile.in @@ -0,0 +1,718 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = rng +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslrng_la_LIBADD = +am_libgslrng_la_OBJECTS = borosh13.lo cmrg.lo coveyou.lo default.lo \ + file.lo fishman18.lo fishman20.lo fishman2x.lo gfsr4.lo \ + knuthran2.lo knuthran.lo knuthran2002.lo lecuyer21.lo \ + minstd.lo mrg.lo mt.lo r250.lo ran0.lo ran1.lo ran2.lo ran3.lo \ + rand48.lo rand.lo random.lo randu.lo ranf.lo ranlux.lo \ + ranlxd.lo ranlxs.lo ranmar.lo rng.lo slatec.lo taus.lo \ + taus113.lo transputer.lo tt.lo types.lo uni32.lo uni.lo vax.lo \ + waterman14.lo zuf.lo inline.lo +libgslrng_la_OBJECTS = $(am_libgslrng_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslrng.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslrng_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslrng_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslrng.la +pkginclude_HEADERS = gsl_rng.h +INCLUDES = -I$(top_srcdir) +libgslrng_la_SOURCES = borosh13.c cmrg.c coveyou.c default.c file.c fishman18.c fishman20.c fishman2x.c gfsr4.c knuthran2.c knuthran.c knuthran2002.c lecuyer21.c minstd.c mrg.c mt.c r250.c ran0.c ran1.c ran2.c ran3.c rand48.c rand.c random.c randu.c ranf.c ranlux.c ranlxd.c ranlxs.c ranmar.c rng.c slatec.c taus.c taus113.c transputer.c tt.c types.c uni32.c uni.c vax.c waterman14.c zuf.c inline.c +CLEANFILES = test.dat +noinst_HEADERS = schrage.c +test_SOURCES = test.c +test_LDADD = libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +TESTS = $(check_PROGRAMS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rng/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu rng/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslrng.la: $(libgslrng_la_OBJECTS) $(libgslrng_la_DEPENDENCIES) + $(LINK) $(libgslrng_la_OBJECTS) $(libgslrng_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/borosh13.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmrg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coveyou.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/default.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fishman18.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fishman20.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fishman2x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfsr4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knuthran.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knuthran2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knuthran2002.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lecuyer21.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minstd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mrg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r250.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ran0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ran1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ran2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ran3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rand48.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranlux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranlxd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranlxs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranmar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slatec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taus113.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transputer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uni.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uni32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waterman14.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# benchmark_SOURCES = benchmark.c +# benchmark_LDADD = libgslrng.la ../err/libgslerr.la ../utils/libutils.la +# rng_dump_SOURCES = rng-dump.c +# rng_dump_LDADD = libgslrng.la ../err/libgslerr.la ../utils/libutils.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/rng/TODO b/software/gsl-1.15/rng/TODO new file mode 100644 index 000000000..aeea95e8b --- /dev/null +++ b/software/gsl-1.15/rng/TODO @@ -0,0 +1,100 @@ +# -*- org -*- +#+CATEGORY: rng + +* gfsr: for consistency (Charles A. Wemple). Make this change in 2.0 + + 127a142 +> state->nd = i-1; +133,134c148,149 +< for (i=0; i<32; ++i) { +< int k=7+i*3; +--- +> for (i=0; i<32; i++) { +> int k=7*i+3; +141d155 +< state->nd = i; + + +* Sort out "const" in prototypes, it looks odd since there are consts +for many functions which modify the state. (Applies to both qrng and rng) + +* New 64 bit generators in "Tables of 64-bit Mersenne Twisters", +Takuji Nishimura, ACM Transactions on Modeling and Computer +Simulation, Volumen 10, No 4, October 2000, p 348--357 + +* Need to run tests over the space of seeds, in addition to serial +tests (DIEHARD) for the default seed. The congruences used for +seeding will give poor initial vectors for some seed values, e.g. 2^n. +Improve the seeding procedure by using a high-quality generator +(e.g. hash functions, md5 or sha) to generate the initial vectors. +Even if this is moderately expensive it is worthwhile since the +seeding is usually a one-off cost at program initialization, and the +results of all subsequent calls to the generator depend on it. The +GSFR4 generator is particularly likely to benefit from this procedure. + +* Add SWNS generator Phys.Rev.E 50 (2) p. 1607-1615 (1994), Phys.Rev.E +60 (6), p.7626-7628 (1999) + +* Add get_array type methods which can provide optimized versions of +each function (?). We should offer the possibility of eliminating +function call overhead -- there are various possible ways to implement +it. + +* Add ISAAC generator (??) + +* Add (A)RC4 and hash based random number generators MD5, SHA. This +should give crypto quality randomness, and guarantee different +sequences for each seed. Make the state (seed, count) where count +increments on each call of the generator. Implement count as a big +integer stored in separate unsigned integers so that the period is +sufficiently long (e.g. 2^64 or 2^96). The generator would return +HASH(seed, count) on each call. + +* Check that RANLXS will work on machines with non-standard width of +float/dbl (original has checks for DBL_MANT_DIG ..) + +* mention more clearly why not all Cokus used (or recheck MT pages for +improvements) + +* run the DIEHARD tests on all the generators, especially the ones we +are listing as "Simulation Quality" -- some of those are a bit old and +might fail one or two diehard tests. + +* Add NAG, missing, gave up! + CDC 48-bit missing + +* Check out the bug fix to mrand48 that was made in glibc2, pr757 + +* Check out the following paper, + + On the anomaly of ran1() in Monte Carlo pricing of financial + derivatives; Akira Tajima , Syoiti Ninomiya , and Shu Tezuka ; Winter + simulation , 1996, Page 360, from ACM + +* The following papers have been published, I think we refer to them +(or could do), + + Pierre L'Ecuyer, "Tables of Linear Congruential Generators of different + size and good lattice structure", Mathematics of Computation, Vol 68, + No 225, Jan 1999, p249-260 + + Pierre L'Ecuyer, "Tables of Maximally equidistributed combined LSFR + generators", ibid, p261-270 + +* Look at this paper: I. Vattulainen, "Framework for testing random numbers + in parallel calculations", Phys. Rev. E, 59, 6, June 1999, p7200 + +---------------------------------------------------------------------- +DONE + +x1. Improve the seeding for routines that use the LCG seed generator. +It can only generate 130,000 different initial states. We should +change it to provide 2^31 different initial states (this will also +prevent the high bits being zero). DONE - we now use a 32-bit +generator. + +x8. Get the macros from the faster MT19937 generator and use them. We +need to make MT be the fastest of the simulation quality generators if +it is the default. DONE. It didn't improve the speed on other +platforms, so I just used the tricks which also worked on the pentium +(e.g. changing mag[x&1] to x&1 ? mag[1] : mag[0]) diff --git a/software/gsl-1.15/rng/borosh13.c b/software/gsl-1.15/rng/borosh13.c new file mode 100644 index 000000000..02f4dce22 --- /dev/null +++ b/software/gsl-1.15/rng/borosh13.c @@ -0,0 +1,92 @@ +/* rng/borosh13.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 106-108 + * + * It is called "Borosh - Niederreiter" + * + * This implementation copyright (C) 2001 Carlo Perassi and + * (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +#define AA 1812433253UL +#define MM 0xffffffffUL /* 2 ^ 32 - 1 */ + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + state->x = (AA * state->x) & MM; + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 4294967296.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->x = s & MM; + + return; +} + +static const gsl_rng_type ran_type = { + "borosh13", /* name */ + MM, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_borosh13 = &ran_type; diff --git a/software/gsl-1.15/rng/cmrg.c b/software/gsl-1.15/rng/cmrg.c new file mode 100644 index 000000000..5137cd72f --- /dev/null +++ b/software/gsl-1.15/rng/cmrg.c @@ -0,0 +1,197 @@ +/* rng/cmrg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a combined multiple recursive generator. The sequence is, + + z_n = (x_n - y_n) mod m1 + + where the two underlying generators x and y are, + + x_n = (a_{1} x_{n-1} + a_{2} x_{n-2} + a_{3} x_{n-3}) mod m1 + y_n = (b_{1} y_{n-1} + b_{2} y_{n-2} + b_{3} y_{n-3}) mod m2 + + with coefficients a11 ... a23, + + a_{1} = 0, a_{2} = 63308, a_{3} = -183326 + b_{1} = 86098, b_{2} = 0, b_{3} = -539608 + + and moduli m1, m2, + + m1 = 2^31 - 1 = 2147483647 + m2 = 2^31 - 2000169 = 2145483479 + + We initialize the generator with + + x_1 = s_1 MOD m1, x_2 = s_2 MOD m1, x_3 = s_3 MOD m1 + y_1 = s_4 MOD m2, y_2 = s_5 MOD m2, y_3 = s_6 MOD m2 + + where s_n = (69069 * s_{n-1}) mod 2^32 and s_0 = s is the + user-supplied seed. + + NOTE: According to the paper the initial values for x_n must lie in + the range 0 <= x_n <= (m1 - 1) and the initial values for y_n must + lie in the range 0 <= y_n <= (m2 - 1), with at least one non-zero + value -- our seeding procedure satisfies these constraints. + + We then use 7 iterations of the generator to "warm up" the internal + state. + + The theoretical value of z_{10008} is 719452880. The subscript 10008 + means (1) seed the generator with s=1, (2) do the seven warm-up + iterations that are part of the seeding process, (3) then do 10000 + actual iterations. + + The period of this generator is about 2^205. + + From: P. L'Ecuyer, "Combined Multiple Recursive Random Number + Generators," Operations Research, 44, 5 (1996), 816--822. + + This is available on the net from L'Ecuyer's home page, + + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/combmrg.ps + ftp://ftp.iro.umontreal.ca/pub/simulation/lecuyer/papers/combmrg.ps */ + +static inline unsigned long int cmrg_get (void *vstate); +static double cmrg_get_double (void *vstate); +static void cmrg_set (void *state, unsigned long int s); + +static const long int m1 = 2147483647, m2 = 2145483479; + +static const long int a2 = 63308, qa2 = 33921, ra2 = 12979; +static const long int a3 = -183326, qa3 = 11714, ra3 = 2883; +static const long int b1 = 86098, qb1 = 24919, rb1 = 7417; +static const long int b3 = -539608, qb3 = 3976, rb3 = 2071; + +typedef struct + { + long int x1, x2, x3; /* first component */ + long int y1, y2, y3; /* second component */ + } +cmrg_state_t; + +static inline unsigned long int +cmrg_get (void *vstate) +{ + cmrg_state_t *state = (cmrg_state_t *) vstate; + + /* Component 1 */ + + { + long int h3 = state->x3 / qa3; + long int p3 = -a3 * (state->x3 - h3 * qa3) - h3 * ra3; + + long int h2 = state->x2 / qa2; + long int p2 = a2 * (state->x2 - h2 * qa2) - h2 * ra2; + + if (p3 < 0) + p3 += m1; + if (p2 < 0) + p2 += m1; + + state->x3 = state->x2; + state->x2 = state->x1; + state->x1 = p2 - p3; + if (state->x1 < 0) + state->x1 += m1; + } + + /* Component 2 */ + + { + long int h3 = state->y3 / qb3; + long int p3 = -b3 * (state->y3 - h3 * qb3) - h3 * rb3; + + long int h1 = state->y1 / qb1; + long int p1 = b1 * (state->y1 - h1 * qb1) - h1 * rb1; + + if (p3 < 0) + p3 += m2; + if (p1 < 0) + p1 += m2; + + state->y3 = state->y2; + state->y2 = state->y1; + state->y1 = p1 - p3; + if (state->y1 < 0) + state->y1 += m2; + } + + if (state->x1 < state->y1) + return (state->x1 - state->y1 + m1); + else + return (state->x1 - state->y1); +} + +static double +cmrg_get_double (void *vstate) +{ + return cmrg_get (vstate) / 2147483647.0 ; +} + + +static void +cmrg_set (void *vstate, unsigned long int s) +{ + /* An entirely adhoc way of seeding! This does **not** come from + L'Ecuyer et al */ + + cmrg_state_t *state = (cmrg_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + s = LCG (s); + state->x1 = s % m1; + s = LCG (s); + state->x2 = s % m1; + s = LCG (s); + state->x3 = s % m1; + + s = LCG (s); + state->y1 = s % m2; + s = LCG (s); + state->y2 = s % m2; + s = LCG (s); + state->y3 = s % m2; + + /* "warm it up" */ + cmrg_get (state); + cmrg_get (state); + cmrg_get (state); + cmrg_get (state); + cmrg_get (state); + cmrg_get (state); + cmrg_get (state); +} + +static const gsl_rng_type cmrg_type = +{"cmrg", /* name */ + 2147483646, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (cmrg_state_t), + &cmrg_set, + &cmrg_get, + &cmrg_get_double}; + +const gsl_rng_type *gsl_rng_cmrg = &cmrg_type; diff --git a/software/gsl-1.15/rng/coveyou.c b/software/gsl-1.15/rng/coveyou.c new file mode 100644 index 000000000..2f73aee11 --- /dev/null +++ b/software/gsl-1.15/rng/coveyou.c @@ -0,0 +1,92 @@ +/* rng/coveyou.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Section 3.2.2 + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + * Carlo Perassi reorganized the code to use the rng framework of GSL. + */ + +#include +#include +#include + +#define MM 0xffffffffUL /* 2 ^ 32 - 1 */ + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + state->x = (state->x * (state->x + 1)) & MM; + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 4294967296.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + unsigned long int diff = ((s % 4UL) - 2UL) % MM; + + if (diff) + state->x = (s - diff) & MM; + else + state->x = s & MM; + + return; +} + +static const gsl_rng_type ran_type = { + "coveyou", /* name */ + MM-1, /* RAND_MAX */ + 2, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_coveyou = &ran_type; diff --git a/software/gsl-1.15/rng/default.c b/software/gsl-1.15/rng/default.c new file mode 100644 index 000000000..4b0f80d87 --- /dev/null +++ b/software/gsl-1.15/rng/default.c @@ -0,0 +1,93 @@ +/* rng/default.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* The initial defaults are defined in the file mt.c, so we can get + access to the static parts of the default generator. */ + +const gsl_rng_type * +gsl_rng_env_setup (void) +{ + unsigned long int seed = 0; + const char *p = getenv ("GSL_RNG_TYPE"); + + if (p) + { + const gsl_rng_type **t, **t0 = gsl_rng_types_setup (); + + gsl_rng_default = 0; + + /* check GSL_RNG_TYPE against the names of all the generators */ + + for (t = t0; *t != 0; t++) + { + if (strcmp (p, (*t)->name) == 0) + { + gsl_rng_default = *t; + break; + } + } + + if (gsl_rng_default == 0) + { + int i = 0; + + fprintf (stderr, "GSL_RNG_TYPE=%s not recognized\n", p); + fprintf (stderr, "Valid generator types are:\n"); + + for (t = t0; *t != 0; t++) + { + fprintf (stderr, " %18s", (*t)->name); + + if ((++i) % 4 == 0) + { + fputc ('\n', stderr); + } + } + + fputc ('\n', stderr); + + GSL_ERROR_VAL ("unknown generator", GSL_EINVAL, 0); + } + + fprintf (stderr, "GSL_RNG_TYPE=%s\n", gsl_rng_default->name); + } + else + { + gsl_rng_default = gsl_rng_mt19937; + } + + p = getenv ("GSL_RNG_SEED"); + + if (p) + { + seed = strtoul (p, 0, 0); + fprintf (stderr, "GSL_RNG_SEED=%lu\n", seed); + }; + + gsl_rng_default_seed = seed; + + return gsl_rng_default; +} diff --git a/software/gsl-1.15/rng/file.c b/software/gsl-1.15/rng/file.c new file mode 100644 index 000000000..a0b865673 --- /dev/null +++ b/software/gsl-1.15/rng/file.c @@ -0,0 +1,57 @@ +/* rng/file.c + * + * Copyright (C) 2003 Olaf Lenz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_rng_fread (FILE * stream, gsl_rng * r) +{ + size_t n = r->type->size ; + + char * state = (char *)r->state; + + size_t items = fread (state, 1, n, stream); + + if (items != n) + { + GSL_ERROR ("fread failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + +int +gsl_rng_fwrite (FILE * stream, const gsl_rng * r) +{ + size_t n = r->type->size ; + + char * state = (char *)r->state; + + size_t items = fwrite (state, 1, n, stream); + + if (items != n) + { + GSL_ERROR ("fwrite failed", GSL_EFAILED); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/rng/fishman18.c b/software/gsl-1.15/rng/fishman18.c new file mode 100644 index 000000000..42ef3df2c --- /dev/null +++ b/software/gsl-1.15/rng/fishman18.c @@ -0,0 +1,95 @@ +/* rng/fishman18.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 106-108 + * + * It is called "Fishman - Moore III". + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +#include "schrage.c" + +#define AA 62089911UL +#define MM 0x7fffffffUL /* 2 ^ 31 - 1 */ +#define CEIL_SQRT_MM 46341UL /* ceil(sqrt(2 ^ 31 - 1)) */ + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + state->x = schrage_mult (AA, state->x, MM, CEIL_SQRT_MM); + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 2147483647.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if ((s % MM) == 0) + s = 1; /* default seed is 1 */ + + state->x = s % MM; + + return; +} + +static const gsl_rng_type ran_type = { + "fishman18", /* name */ + MM - 1, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_fishman18 = &ran_type; diff --git a/software/gsl-1.15/rng/fishman20.c b/software/gsl-1.15/rng/fishman20.c new file mode 100644 index 000000000..025bec324 --- /dev/null +++ b/software/gsl-1.15/rng/fishman20.c @@ -0,0 +1,103 @@ +/* rng/fishman20.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 108 + * + * It is called "Fishman" + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +static const long int m = 2147483647, a = 48271, q = 44488, r = 3399; + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + const unsigned long int x = state->x; + + const long int h = x / q; + const long int t = a * (x - h * q) - h * r; + + if (t < 0) + { + state->x = t + m; + } + else + { + state->x = t; + } + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 2147483647.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if ((s%m) == 0) + s = 1; /* default seed is 1 */ + + state->x = s & m; + + return; +} + +static const gsl_rng_type ran_type = { + "fishman20", /* name */ + 2147483646, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_fishman20 = &ran_type; diff --git a/software/gsl-1.15/rng/fishman2x.c b/software/gsl-1.15/rng/fishman2x.c new file mode 100644 index 000000000..fb3c97c24 --- /dev/null +++ b/software/gsl-1.15/rng/fishman2x.c @@ -0,0 +1,121 @@ +/* rng/fishman2x.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 108 + * + * It is called "Fishman - L'Ecuyer" + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +/* Fishman */ +#define AAA_F 48271UL +#define MMM_F 0x7fffffffUL /* 2 ^ 31 - 1 */ +#define QQQ_F 44488UL +#define RRR_F 3399UL + +/* L'Ecuyer */ +#define AAA_L 40692UL +#define MMM_L 0x7fffff07UL /* 2 ^ 31 - 249 */ +#define QQQ_L 52774UL +#define RRR_L 3791UL + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; + unsigned long int y; + unsigned long int z; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + long int y, r; + + r = RRR_F * (state->x / QQQ_F); + y = AAA_F * (state->x % QQQ_F) - r; + if (y < 0) + y += MMM_F; + state->x = y; + + r = RRR_L * (state->y / QQQ_L); + y = AAA_L * (state->y % QQQ_L) - r; + if (y < 0) + y += MMM_L; + state->y = y; + + state->z = (state->x > state->y) ? (state->x - state->y) : + MMM_F + state->x - state->y; + + return state->z; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 2147483647.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if ((s % MMM_F) == 0 || (s % MMM_L) == 0) + s = 1; /* default seed is 1 */ + + state->x = s % MMM_F; + state->y = s % MMM_L; + state->z = (state->x > state->y) ? (state->x - state->y) : + MMM_F + state->x - state->y; + + return; +} + +static const gsl_rng_type ran_type = { + "fishman2x", /* name */ + MMM_F - 1, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_fishman2x = &ran_type; diff --git a/software/gsl-1.15/rng/gfsr4.c b/software/gsl-1.15/rng/gfsr4.c new file mode 100644 index 000000000..10d15e76a --- /dev/null +++ b/software/gsl-1.15/rng/gfsr4.c @@ -0,0 +1,165 @@ +/* This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. You should have received + a copy of the GNU General Public License along with this program; + if not, write to the Free Foundation, Inc., 59 Temple Place, Suite + 330, Boston, MA 02111-1307 USA + + From Robert M. Ziff, "Four-tap shift-register-sequence + random-number generators," Computers in Physics 12(4), Jul/Aug + 1998, pp 385-392. A generalized feedback shift-register (GFSR) + is basically an xor-sum of particular past lagged values. A + four-tap register looks like: + ra[nd] = ra[nd-A] ^ ra[nd-B] ^ ra[nd-C] ^ ra[nd-D] + + Ziff notes that "it is now widely known" that two-tap registers + have serious flaws, the most obvious one being the three-point + correlation that comes from the defn of the generator. Nice + mathematical properties can be derived for GFSR's, and numerics + bears out the claim that 4-tap GFSR's with appropriately chosen + offsets are as random as can be measured, using the author's test. + + This implementation uses the values suggested the the author's + example on p392, but altered to fit the GSL framework. The "state" + is 2^14 longs, or 64Kbytes; 2^14 is the smallest power of two that + is larger than D, the largest offset. We really only need a state + with the last D values, but by going to a power of two, we can do a + masking operation instead of a modulo, and this is presumably + faster, though I haven't actually tried it. The article actually + suggested a short/fast hack: + + #define RandomInteger (++nd, ra[nd&M]=ra[(nd-A)&M]\ + ^ra[(nd-B)&M]^ra[(nd-C)&M]^ra[(nd-D)&M]) + + so that (as long as you've defined nd,ra[M+1]), then you ca do things + like: 'if (RandomInteger < p) {...}'. + + Note that n&M varies from 0 to M, *including* M, so that the + array has to be of size M+1. Since M+1 is a power of two, n&M + is a potentially quicker implementation of the equivalent n%(M+1). + + This implementation copyright (C) 1998 James Theiler, based on + the example mt.c in the GSL, as implemented by Brian Gough. +*/ + +#include +#include +#include + +static inline unsigned long int gfsr4_get (void *vstate); +static double gfsr4_get_double (void *vstate); +static void gfsr4_set (void *state, unsigned long int s); + +/* Magic numbers */ +#define A 471 +#define B 1586 +#define C 6988 +#define D 9689 +#define M 16383 /* = 2^14-1 */ +/* #define M 0x0003fff */ + +typedef struct + { + int nd; + unsigned long ra[M+1]; + } +gfsr4_state_t; + +static inline unsigned long +gfsr4_get (void *vstate) +{ + gfsr4_state_t *state = (gfsr4_state_t *) vstate; + + state->nd = ((state->nd)+1)&M; + return state->ra[(state->nd)] = + state->ra[((state->nd)+(M+1-A))&M]^ + state->ra[((state->nd)+(M+1-B))&M]^ + state->ra[((state->nd)+(M+1-C))&M]^ + state->ra[((state->nd)+(M+1-D))&M]; + +} + +static double +gfsr4_get_double (void * vstate) +{ + return gfsr4_get (vstate) / 4294967296.0 ; +} + +static void +gfsr4_set (void *vstate, unsigned long int s) +{ + gfsr4_state_t *state = (gfsr4_state_t *) vstate; + int i, j; + /* Masks for turning on the diagonal bit and turning off the + leftmost bits */ + unsigned long int msb = 0x80000000UL; + unsigned long int mask = 0xffffffffUL; + + if (s == 0) + s = 4357; /* the default seed is 4357 */ + + /* We use the congruence s_{n+1} = (69069*s_n) mod 2^32 to + initialize the state. This works because ANSI-C unsigned long + integer arithmetic is automatically modulo 2^32 (or a higher + power of two), so we can safely ignore overflow. */ + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + + /* Brian Gough suggests this to avoid low-order bit correlations */ + for (i = 0; i <= M; i++) + { + unsigned long t = 0 ; + unsigned long bit = msb ; + for (j = 0; j < 32; j++) + { + s = LCG(s) ; + if (s & msb) + t |= bit ; + bit >>= 1 ; + } + state->ra[i] = t ; + } + + /* Perform the "orthogonalization" of the matrix */ + /* Based on the orthogonalization used in r250, as suggested initially + * by Kirkpatrick and Stoll, and pointed out to me by Brian Gough + */ + + /* BJG: note that this orthogonalisation doesn't have any effect + here because the the initial 6695 elements do not participate in + the calculation. For practical purposes this orthogonalisation + is somewhat irrelevant, because the probability of the original + sequence being degenerate should be exponentially small. */ + + for (i=0; i<32; ++i) { + int k=7+i*3; + state->ra[k] &= mask; /* Turn off bits left of the diagonal */ + state->ra[k] |= msb; /* Turn on the diagonal bit */ + mask >>= 1; + msb >>= 1; + } + + state->nd = i; +} + +static const gsl_rng_type gfsr4_type = +{"gfsr4", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (gfsr4_state_t), + &gfsr4_set, + &gfsr4_get, + &gfsr4_get_double}; + +const gsl_rng_type *gsl_rng_gfsr4 = &gfsr4_type; + + + + + diff --git a/software/gsl-1.15/rng/gsl_rng.h b/software/gsl-1.15/rng/gsl_rng.h new file mode 100644 index 000000000..4ec55911c --- /dev/null +++ b/software/gsl-1.15/rng/gsl_rng.h @@ -0,0 +1,217 @@ +/* rng/gsl_rng.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_RNG_H__ +#define __GSL_RNG_H__ +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct + { + const char *name; + unsigned long int max; + unsigned long int min; + size_t size; + void (*set) (void *state, unsigned long int seed); + unsigned long int (*get) (void *state); + double (*get_double) (void *state); + } +gsl_rng_type; + +typedef struct + { + const gsl_rng_type * type; + void *state; + } +gsl_rng; + + +/* These structs also need to appear in default.c so you can select + them via the environment variable GSL_RNG_TYPE */ + +GSL_VAR const gsl_rng_type *gsl_rng_borosh13; +GSL_VAR const gsl_rng_type *gsl_rng_coveyou; +GSL_VAR const gsl_rng_type *gsl_rng_cmrg; +GSL_VAR const gsl_rng_type *gsl_rng_fishman18; +GSL_VAR const gsl_rng_type *gsl_rng_fishman20; +GSL_VAR const gsl_rng_type *gsl_rng_fishman2x; +GSL_VAR const gsl_rng_type *gsl_rng_gfsr4; +GSL_VAR const gsl_rng_type *gsl_rng_knuthran; +GSL_VAR const gsl_rng_type *gsl_rng_knuthran2; +GSL_VAR const gsl_rng_type *gsl_rng_knuthran2002; +GSL_VAR const gsl_rng_type *gsl_rng_lecuyer21; +GSL_VAR const gsl_rng_type *gsl_rng_minstd; +GSL_VAR const gsl_rng_type *gsl_rng_mrg; +GSL_VAR const gsl_rng_type *gsl_rng_mt19937; +GSL_VAR const gsl_rng_type *gsl_rng_mt19937_1999; +GSL_VAR const gsl_rng_type *gsl_rng_mt19937_1998; +GSL_VAR const gsl_rng_type *gsl_rng_r250; +GSL_VAR const gsl_rng_type *gsl_rng_ran0; +GSL_VAR const gsl_rng_type *gsl_rng_ran1; +GSL_VAR const gsl_rng_type *gsl_rng_ran2; +GSL_VAR const gsl_rng_type *gsl_rng_ran3; +GSL_VAR const gsl_rng_type *gsl_rng_rand; +GSL_VAR const gsl_rng_type *gsl_rng_rand48; +GSL_VAR const gsl_rng_type *gsl_rng_random128_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random128_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random128_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_random256_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random256_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random256_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_random32_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random32_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random32_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_random64_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random64_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random64_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_random8_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random8_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random8_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_random_bsd; +GSL_VAR const gsl_rng_type *gsl_rng_random_glibc2; +GSL_VAR const gsl_rng_type *gsl_rng_random_libc5; +GSL_VAR const gsl_rng_type *gsl_rng_randu; +GSL_VAR const gsl_rng_type *gsl_rng_ranf; +GSL_VAR const gsl_rng_type *gsl_rng_ranlux; +GSL_VAR const gsl_rng_type *gsl_rng_ranlux389; +GSL_VAR const gsl_rng_type *gsl_rng_ranlxd1; +GSL_VAR const gsl_rng_type *gsl_rng_ranlxd2; +GSL_VAR const gsl_rng_type *gsl_rng_ranlxs0; +GSL_VAR const gsl_rng_type *gsl_rng_ranlxs1; +GSL_VAR const gsl_rng_type *gsl_rng_ranlxs2; +GSL_VAR const gsl_rng_type *gsl_rng_ranmar; +GSL_VAR const gsl_rng_type *gsl_rng_slatec; +GSL_VAR const gsl_rng_type *gsl_rng_taus; +GSL_VAR const gsl_rng_type *gsl_rng_taus2; +GSL_VAR const gsl_rng_type *gsl_rng_taus113; +GSL_VAR const gsl_rng_type *gsl_rng_transputer; +GSL_VAR const gsl_rng_type *gsl_rng_tt800; +GSL_VAR const gsl_rng_type *gsl_rng_uni; +GSL_VAR const gsl_rng_type *gsl_rng_uni32; +GSL_VAR const gsl_rng_type *gsl_rng_vax; +GSL_VAR const gsl_rng_type *gsl_rng_waterman14; +GSL_VAR const gsl_rng_type *gsl_rng_zuf; + +const gsl_rng_type ** gsl_rng_types_setup(void); + +GSL_VAR const gsl_rng_type *gsl_rng_default; +GSL_VAR unsigned long int gsl_rng_default_seed; + +gsl_rng *gsl_rng_alloc (const gsl_rng_type * T); +int gsl_rng_memcpy (gsl_rng * dest, const gsl_rng * src); +gsl_rng *gsl_rng_clone (const gsl_rng * r); + +void gsl_rng_free (gsl_rng * r); + +void gsl_rng_set (const gsl_rng * r, unsigned long int seed); +unsigned long int gsl_rng_max (const gsl_rng * r); +unsigned long int gsl_rng_min (const gsl_rng * r); +const char *gsl_rng_name (const gsl_rng * r); + +int gsl_rng_fread (FILE * stream, gsl_rng * r); +int gsl_rng_fwrite (FILE * stream, const gsl_rng * r); + +size_t gsl_rng_size (const gsl_rng * r); +void * gsl_rng_state (const gsl_rng * r); + +void gsl_rng_print_state (const gsl_rng * r); + +const gsl_rng_type * gsl_rng_env_setup (void); + +INLINE_DECL unsigned long int gsl_rng_get (const gsl_rng * r); +INLINE_DECL double gsl_rng_uniform (const gsl_rng * r); +INLINE_DECL double gsl_rng_uniform_pos (const gsl_rng * r); +INLINE_DECL unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n); + +#ifdef HAVE_INLINE + +INLINE_FUN unsigned long int +gsl_rng_get (const gsl_rng * r) +{ + return (r->type->get) (r->state); +} + +INLINE_FUN double +gsl_rng_uniform (const gsl_rng * r) +{ + return (r->type->get_double) (r->state); +} + +INLINE_FUN double +gsl_rng_uniform_pos (const gsl_rng * r) +{ + double x ; + do + { + x = (r->type->get_double) (r->state) ; + } + while (x == 0) ; + + return x ; +} + +/* Note: to avoid integer overflow in (range+1) we work with scale = + range/n = (max-min)/n rather than scale=(max-min+1)/n, this reduces + efficiency slightly but avoids having to check for the out of range + value. Note that range is typically O(2^32) so the addition of 1 + is negligible in most usage. */ + +INLINE_FUN unsigned long int +gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n) +{ + unsigned long int offset = r->type->min; + unsigned long int range = r->type->max - offset; + unsigned long int scale; + unsigned long int k; + + if (n > range || n == 0) + { + GSL_ERROR_VAL ("invalid n, either 0 or exceeds maximum value of generator", + GSL_EINVAL, 0) ; + } + + scale = range / n; + + do + { + k = (((r->type->get) (r->state)) - offset) / scale; + } + while (k >= n); + + return k; +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_RNG_H__ */ diff --git a/software/gsl-1.15/rng/inline.c b/software/gsl-1.15/rng/inline.c new file mode 100644 index 000000000..56bbf907d --- /dev/null +++ b/software/gsl-1.15/rng/inline.c @@ -0,0 +1,30 @@ +/* rng/inline.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include diff --git a/software/gsl-1.15/rng/knuthran.c b/software/gsl-1.15/rng/knuthran.c new file mode 100644 index 000000000..c51fc0953 --- /dev/null +++ b/software/gsl-1.15/rng/knuthran.c @@ -0,0 +1,177 @@ +/* rng/knuthran.c + * + * Copyright (C) 2001, 2007 Brian Gough, Carlo Perassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Section 3.6 + * + * The comments are taken from the book + * Our comments are signed + */ + +#include +#include +#include + +#define BUFLEN 2009 /* [Brian]: length of the buffer aa[] */ +#define KK 100 /* the long lag */ +#define LL 37 /* the short lag */ +#define MM (1L << 30) /* the modulus */ +#define TT 70 /* guaranteed separation between streams */ + +#define evenize(x) ((x) & (MM - 2)) /* make x even */ +#define is_odd(x) ((x) & 1) /* the units bit of x */ +#define mod_diff(x, y) (((x) - (y)) & (MM - 1)) /* (x - y) mod MM */ + +static inline void ran_array (unsigned long int aa[], unsigned int n, + unsigned long int ran_x[]); +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned int i; + unsigned long int aa[BUFLEN]; /* [Carlo]: I can't pass n to ran_array like + Knuth does */ + unsigned long int ran_x[KK]; /* the generator state */ +} +ran_state_t; + +static inline void +ran_array (unsigned long int aa[], unsigned int n, unsigned long int ran_x[]) +{ + unsigned int i; + unsigned int j; + + for (j = 0; j < KK; j++) + aa[j] = ran_x[j]; + + for (; j < n; j++) + aa[j] = mod_diff (aa[j - KK], aa[j - LL]); + + for (i = 0; i < LL; i++, j++) + ran_x[i] = mod_diff (aa[j - KK], aa[j - LL]); + + for (; i < KK; i++, j++) + ran_x[i] = mod_diff (aa[j - KK], ran_x[i - LL]); +} + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + unsigned int i = state->i; + + if (i == 0) + { + /* fill buffer with new random numbers */ + ran_array (state->aa, BUFLEN, state->ran_x); + } + + state->i = (i + 1) % BUFLEN; + + return state->aa[i]; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 1073741824.0; /* [Carlo]: RAND_MAX + 1 */ +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + long x[KK + KK - 1]; /* the preparation buffer */ + + register int j; + register int t; + register long ss = evenize (s + 2); + + for (j = 0; j < KK; j++) + { + x[j] = ss; /* bootstrap the buffer */ + ss <<= 1; + if (ss >= MM) /* cyclic shift 29 bits */ + ss -= MM - 2; + } + for (; j < KK + KK - 1; j++) + x[j] = 0; + x[1]++; /* make x[1] (and only x[1]) odd */ + ss = s & (MM - 1); + t = TT - 1; + while (t) + { + for (j = KK - 1; j > 0; j--) /* square */ + x[j + j] = x[j]; + for (j = KK + KK - 2; j > KK - LL; j -= 2) + x[KK + KK - 1 - j] = evenize (x[j]); + for (j = KK + KK - 2; j >= KK; j--) + if (is_odd (x[j])) + { + x[j - (KK - LL)] = mod_diff (x[j - (KK - LL)], x[j]); + x[j - KK] = mod_diff (x[j - KK], x[j]); + } + if (is_odd (ss)) + { /* multiply by "z" */ + for (j = KK; j > 0; j--) + x[j] = x[j - 1]; + x[0] = x[KK]; /* shift the buffer cyclically */ + if (is_odd (x[KK])) + x[LL] = mod_diff (x[LL], x[KK]); + } + if (ss) + ss >>= 1; + else + t--; + } + + state->i = 0; + + for (j = 0; j < LL; j++) + state->ran_x[j + KK - LL] = x[j]; + for (; j < KK; j++) + state->ran_x[j - LL] = x[j]; + + return; +} + +static const gsl_rng_type ran_type = { + "knuthran", /* name */ + 0x3fffffffUL, /* RAND_MAX *//* [Carlo]: (2 ^ 30) - 1 */ + 0, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_knuthran = &ran_type; diff --git a/software/gsl-1.15/rng/knuthran2.c b/software/gsl-1.15/rng/knuthran2.c new file mode 100644 index 000000000..6835672e6 --- /dev/null +++ b/software/gsl-1.15/rng/knuthran2.c @@ -0,0 +1,103 @@ +/* rng/knuthran2.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 108 + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +#include "schrage.c" + +#define AA1 271828183UL +#define AA2 1833324378UL /* = -314159269 mod (2 ^ 31 -1) */ +#define MM 0x7fffffffUL /* 2 ^ 31 - 1 */ +#define CEIL_SQRT_MM 46341UL /* sqrt(2 ^ 31 - 1) */ + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x0; + unsigned long int x1; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + const unsigned long int xtmp = state->x1; + state->x1 = schrage_mult (AA1, state->x1, MM, CEIL_SQRT_MM) + + schrage_mult (AA2, state->x0, MM, CEIL_SQRT_MM); + + if (state->x1 >= MM) + state->x1 -= MM; + + state->x0 = xtmp; + + return state->x1; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 2147483647.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if ((s % MM) == 0) + s = 1; /* default seed is 1 */ + + state->x0 = s % MM; + state->x1 = s % MM; + + return; +} + +static const gsl_rng_type ran_type = { + "knuthran2", /* name */ + MM - 1L, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_knuthran2 = &ran_type; diff --git a/software/gsl-1.15/rng/knuthran2002.c b/software/gsl-1.15/rng/knuthran2002.c new file mode 100644 index 000000000..a09c2dbca --- /dev/null +++ b/software/gsl-1.15/rng/knuthran2002.c @@ -0,0 +1,189 @@ +/* rng/knuthran2002.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 2001, 2007 Brian Gough, Carlo Perassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth, The Art of Computer Programming, Volume 2, Section 3.6 + * Third Edition, Addison-Wesley, + * + * The modifications introduced in the 9th printing (2002) are + * included here; there's no backwards compatibility with the + * original. [ see http://www-cs-faculty.stanford.edu/~knuth/taocp.html ] + * + */ + +#include +#include +#include + +#define BUFLEN 1009 /* length of the buffer aa[] */ +#define KK 100 /* the long lag */ +#define LL 37 /* the short lag */ +#define MM (1L << 30) /* the modulus */ +#define TT 70 /* guaranteed separation between streams */ + +#define is_odd(x) ((x) & 1) /* the units bit of x */ +#define mod_diff(x, y) (((x) - (y)) & (MM - 1)) /* (x - y) mod MM */ + +static inline void ran_array (long int aa[], unsigned int n, + long int ran_x[]); +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned int i; + long int aa[BUFLEN]; + long int ran_x[KK]; /* the generator state */ +} +ran_state_t; + +static inline void +ran_array (long int aa[], unsigned int n, long int ran_x[]) +{ + unsigned int i; + unsigned int j; + + for (j = 0; j < KK; j++) + aa[j] = ran_x[j]; + + for (; j < n; j++) + aa[j] = mod_diff (aa[j - KK], aa[j - LL]); + + for (i = 0; i < LL; i++, j++) + ran_x[i] = mod_diff (aa[j - KK], aa[j - LL]); + + for (; i < KK; i++, j++) + ran_x[i] = mod_diff (aa[j - KK], ran_x[i - LL]); +} + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + unsigned int i = state->i; + unsigned long int v; + + if (i == 0) + { + /* fill buffer with new random numbers */ + ran_array (state->aa, BUFLEN, state->ran_x); + } + + v = state->aa[i]; + + state->i = (i + 1) % KK; + + return v; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 1073741824.0; /* RAND_MAX + 1 */ +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + long x[KK + KK - 1]; /* the preparation buffer */ + + register int j; + register int t; + register long ss; + + if (s == 0 ) + s = 314159; /* default seed used by Knuth */ + + ss = (s + 2)&(MM-2); + + for (j = 0; j < KK; j++) + { + x[j] = ss; /* bootstrap the buffer */ + ss <<= 1; + if (ss >= MM) /* cyclic shift 29 bits */ + ss -= MM - 2; + } + x[1]++; /* make x[1] (and only x[1]) odd */ + + ss = s & (MM - 1); + t = TT - 1; + while (t) + { + for (j = KK - 1; j > 0; j--) /* square */ + { + x[j + j] = x[j]; + x[j + j - 1] = 0; + } + + for (j = KK + KK - 2; j >= KK; j--) + { + x[j - (KK - LL)] = mod_diff (x[j - (KK - LL)], x[j]); + x[j - KK] = mod_diff (x[j - KK], x[j]); + } + + if (is_odd (ss)) + { /* multiply by "z" */ + for (j = KK; j > 0; j--) + { + x[j] = x[j - 1]; + } + x[0] = x[KK]; /* shift the buffer cyclically */ + x[LL] = mod_diff (x[LL], x[KK]); + } + + if (ss) + ss >>= 1; + else + t--; + } + + for (j = 0; j < LL; j++) + state->ran_x[j + KK - LL] = x[j]; + for (; j < KK; j++) + state->ran_x[j - LL] = x[j]; + + + for (j = 0; j< 10; j++) + ran_array(x, KK+KK-1, state->ran_x); /* warm things up */ + + state->i = 0; + + return; +} + +static const gsl_rng_type ran_type = { + "knuthran2002", /* name */ + 0x3fffffffUL, /* RAND_MAX = (2 ^ 30) - 1 */ + 0, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_knuthran2002 = &ran_type; diff --git a/software/gsl-1.15/rng/lecuyer21.c b/software/gsl-1.15/rng/lecuyer21.c new file mode 100644 index 000000000..b54055ee8 --- /dev/null +++ b/software/gsl-1.15/rng/lecuyer21.c @@ -0,0 +1,99 @@ +/* rng/lecuyer21.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 108 + * + * This implementation copyright (C) 2001 Brian Gough, Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +#define AAA 40692 +#define MMM 2147483399UL +#define QQQ 52774 +#define RRR 3791 + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + long int y = state->x; + long int r = RRR * (y / QQQ); + + y = AAA * (y % QQQ) - r; + if (y < 0) + y += MMM; + + state->x = y; + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 2147483399.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if ((s%MMM) == 0) + s = 1; /* default seed is 1 */ + + state->x = s % MMM; + + return; +} + +static const gsl_rng_type ran_type = { + "lecuyer21", /* name */ + MMM-1, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_lecuyer21 = &ran_type; diff --git a/software/gsl-1.15/rng/minstd.c b/software/gsl-1.15/rng/minstd.c new file mode 100644 index 000000000..feb0a95b3 --- /dev/null +++ b/software/gsl-1.15/rng/minstd.c @@ -0,0 +1,109 @@ +/* rng/minstd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* MINSTD is Park and Miller's minimal standard generator (i.e. it's + not particularly good). + + The sequence is + + x_{n+1} = (a x_n) mod m + + with a = 16807 and m = 2^31 - 1 = 2147483647. The seed specifies + the initial value, x_1. + + The theoretical value of x_{10001} is 1043618065, starting with a + seed of x_1 = 1. + + The period of this generator is 2^31. + + It is used as the RNUN subroutine in the IMSL Library and the RAND + function in MATLAB. The generator is sometimes known by the acronym + "GGL" (I'm not sure what that stands for). + + From: Park and Miller, "Random Number Generators: Good ones are + hard to find" Communications of the ACM, October 1988, Volume 31, + No 10, pages 1192-1201. */ + +static inline unsigned long int minstd_get (void *vstate); +static double minstd_get_double (void *vstate); +static void minstd_set (void *state, unsigned long int s); + +static const long int m = 2147483647, a = 16807, q = 127773, r = 2836; + +typedef struct + { + unsigned long int x; + } +minstd_state_t; + +static inline unsigned long int +minstd_get (void *vstate) +{ + minstd_state_t *state = (minstd_state_t *) vstate; + + const unsigned long int x = state->x; + + const long int h = x / q; + const long int t = a * (x - h * q) - h * r; + + if (t < 0) + { + state->x = t + m; + } + else + { + state->x = t; + } + + return state->x; +} + +static double +minstd_get_double (void *vstate) +{ + return minstd_get (vstate) / 2147483647.0; +} + +static void +minstd_set (void *vstate, unsigned long int s) +{ + minstd_state_t *state = (minstd_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->x = s; + + return; +} + +static const gsl_rng_type minstd_type = +{"minstd", /* name */ + 2147483646, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (minstd_state_t), + &minstd_set, + &minstd_get, + &minstd_get_double}; + +const gsl_rng_type *gsl_rng_minstd = &minstd_type; diff --git a/software/gsl-1.15/rng/mrg.c b/software/gsl-1.15/rng/mrg.c new file mode 100644 index 000000000..666ac0222 --- /dev/null +++ b/software/gsl-1.15/rng/mrg.c @@ -0,0 +1,149 @@ +/* rng/mrg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a fifth-order multiple recursive generator. The sequence is, + + x_n = (a_1 x_{n-1} + a_5 x_{n-5}) mod m + + with a_1 = 107374182, a_2 = a_3 = a_4 = 0, a_5 = 104480 and m = 2^31-1. + + We initialize the generator with x_n = s_n MOD m for n = 1..5, + where s_n = (69069 * s_{n-1}) mod 2^32, and s_0 = s is the + user-supplied seed. + + NOTE: According to the paper the seeds must lie in the range [0, + 2^31 - 2] with at least one non-zero value -- our seeding procedure + satisfies these constraints. + + We then use 6 iterations of the generator to "warm up" the internal + state. + + With this initialization procedure the theoretical value of + z_{10006} is 2064828650 for s = 1. The subscript 10006 means (1) + seed the generator with s = 1, (2) do the 6 warm-up iterations + that are part of the seeding process, (3) then do 10000 actual + iterations. + + The period of this generator is about 2^155. + + From: P. L'Ecuyer, F. Blouin, and R. Coutre, "A search for good + multiple recursive random number generators", ACM Transactions on + Modeling and Computer Simulation 3, 87-98 (1993). */ + +static inline unsigned long int mrg_get (void *vstate); +static double mrg_get_double (void *vstate); +static void mrg_set (void *state, unsigned long int s); + +static const long int m = 2147483647; +static const long int a1 = 107374182, q1 = 20, r1 = 7; +static const long int a5 = 104480, q5 = 20554, r5 = 1727; + +typedef struct + { + long int x1, x2, x3, x4, x5; + } +mrg_state_t; + +static inline unsigned long int +mrg_get (void *vstate) +{ + mrg_state_t *state = (mrg_state_t *) vstate; + + long int p1, h1, p5, h5; + + h5 = state->x5 / q5; + p5 = a5 * (state->x5 - h5 * q5) - h5 * r5; + if (p5 > 0) + p5 -= m; + + h1 = state->x1 / q1; + p1 = a1 * (state->x1 - h1 * q1) - h1 * r1; + if (p1 < 0) + p1 += m; + + state->x5 = state->x4; + state->x4 = state->x3; + state->x3 = state->x2; + state->x2 = state->x1; + + state->x1 = p1 + p5; + + if (state->x1 < 0) + state->x1 += m; + + return state->x1; +} + +static double +mrg_get_double (void *vstate) +{ + return mrg_get (vstate) / 2147483647.0 ; +} + + +static void +mrg_set (void *vstate, unsigned long int s) +{ + /* An entirely adhoc way of seeding! This does **not** come from + L'Ecuyer et al */ + + mrg_state_t *state = (mrg_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + s = LCG (s); + state->x1 = s % m; + s = LCG (s); + state->x2 = s % m; + s = LCG (s); + state->x3 = s % m; + s = LCG (s); + state->x4 = s % m; + s = LCG (s); + state->x5 = s % m; + + /* "warm it up" with at least 5 calls to go through + all the x values */ + + mrg_get (state); + mrg_get (state); + mrg_get (state); + mrg_get (state); + mrg_get (state); + mrg_get (state); + + return; +} + +static const gsl_rng_type mrg_type = +{"mrg", /* name */ + 2147483646, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (mrg_state_t), + &mrg_set, + &mrg_get, + &mrg_get_double}; + +const gsl_rng_type *gsl_rng_mrg = &mrg_type; diff --git a/software/gsl-1.15/rng/mt.c b/software/gsl-1.15/rng/mt.c new file mode 100644 index 000000000..27c30d3e2 --- /dev/null +++ b/software/gsl-1.15/rng/mt.c @@ -0,0 +1,241 @@ +/* This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. You should have received + a copy of the GNU General Public License along with this program; + if not, write to the Free Foundation, Inc., 59 Temple Place, Suite + 330, Boston, MA 02111-1307 USA + + Original implementation was copyright (C) 1997 Makoto Matsumoto and + Takuji Nishimura. Coded by Takuji Nishimura, considering the + suggestions by Topher Cooper and Marc Rieffel in July-Aug. 1997, "A + C-program for MT19937: Integer version (1998/4/6)" + + This implementation copyright (C) 1998 Brian Gough. I reorganized + the code to use the module framework of GSL. The license on this + implementation was changed from LGPL to GPL, following paragraph 3 + of the LGPL, version 2. + + Update: + + The seeding procedure has been updated to match the 10/99 release + of MT19937. + + Update: + + The seeding procedure has been updated again to match the 2002 + release of MT19937 + + The original code included the comment: "When you use this, send an + email to: matumoto@math.keio.ac.jp with an appropriate reference to + your work". + + Makoto Matsumoto has a web page with more information about the + generator, http://www.math.keio.ac.jp/~matumoto/emt.html. + + The paper below has details of the algorithm. + + From: Makoto Matsumoto and Takuji Nishimura, "Mersenne Twister: A + 623-dimensionally equidistributerd uniform pseudorandom number + generator". ACM Transactions on Modeling and Computer Simulation, + Vol. 8, No. 1 (Jan. 1998), Pages 3-30 + + You can obtain the paper directly from Makoto Matsumoto's web page. + + The period of this generator is 2^{19937} - 1. + +*/ + +#include +#include +#include + +static inline unsigned long int mt_get (void *vstate); +static double mt_get_double (void *vstate); +static void mt_set (void *state, unsigned long int s); + +#define N 624 /* Period parameters */ +#define M 397 + +/* most significant w-r bits */ +static const unsigned long UPPER_MASK = 0x80000000UL; + +/* least significant r bits */ +static const unsigned long LOWER_MASK = 0x7fffffffUL; + +typedef struct + { + unsigned long mt[N]; + int mti; + } +mt_state_t; + +static inline unsigned long +mt_get (void *vstate) +{ + mt_state_t *state = (mt_state_t *) vstate; + + unsigned long k ; + unsigned long int *const mt = state->mt; + +#define MAGIC(y) (((y)&0x1) ? 0x9908b0dfUL : 0) + + if (state->mti >= N) + { /* generate N words at one time */ + int kk; + + for (kk = 0; kk < N - M; kk++) + { + unsigned long y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); + mt[kk] = mt[kk + M] ^ (y >> 1) ^ MAGIC(y); + } + for (; kk < N - 1; kk++) + { + unsigned long y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); + mt[kk] = mt[kk + (M - N)] ^ (y >> 1) ^ MAGIC(y); + } + + { + unsigned long y = (mt[N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK); + mt[N - 1] = mt[M - 1] ^ (y >> 1) ^ MAGIC(y); + } + + state->mti = 0; + } + + /* Tempering */ + + k = mt[state->mti]; + k ^= (k >> 11); + k ^= (k << 7) & 0x9d2c5680UL; + k ^= (k << 15) & 0xefc60000UL; + k ^= (k >> 18); + + state->mti++; + + return k; +} + +static double +mt_get_double (void * vstate) +{ + return mt_get (vstate) / 4294967296.0 ; +} + +static void +mt_set (void *vstate, unsigned long int s) +{ + mt_state_t *state = (mt_state_t *) vstate; + int i; + + if (s == 0) + s = 4357; /* the default seed is 4357 */ + + state->mt[0]= s & 0xffffffffUL; + + for (i = 1; i < N; i++) + { + /* See Knuth's "Art of Computer Programming" Vol. 2, 3rd + Ed. p.106 for multiplier. */ + + state->mt[i] = + (1812433253UL * (state->mt[i-1] ^ (state->mt[i-1] >> 30)) + i); + + state->mt[i] &= 0xffffffffUL; + } + + state->mti = i; +} + +static void +mt_1999_set (void *vstate, unsigned long int s) +{ + mt_state_t *state = (mt_state_t *) vstate; + int i; + + if (s == 0) + s = 4357; /* the default seed is 4357 */ + + /* This is the October 1999 version of the seeding procedure. It + was updated by the original developers to avoid the periodicity + in the simple congruence originally used. + + Note that an ANSI-C unsigned long integer arithmetic is + automatically modulo 2^32 (or a higher power of two), so we can + safely ignore overflow. */ + +#define LCG(x) ((69069 * x) + 1) &0xffffffffUL + + for (i = 0; i < N; i++) + { + state->mt[i] = s & 0xffff0000UL; + s = LCG(s); + state->mt[i] |= (s &0xffff0000UL) >> 16; + s = LCG(s); + } + + state->mti = i; +} + +/* This is the original version of the seeding procedure, no longer + used but available for compatibility with the original MT19937. */ + +static void +mt_1998_set (void *vstate, unsigned long int s) +{ + mt_state_t *state = (mt_state_t *) vstate; + int i; + + if (s == 0) + s = 4357; /* the default seed is 4357 */ + + state->mt[0] = s & 0xffffffffUL; + +#define LCG1998(n) ((69069 * n) & 0xffffffffUL) + + for (i = 1; i < N; i++) + state->mt[i] = LCG1998 (state->mt[i - 1]); + + state->mti = i; +} + +static const gsl_rng_type mt_type = +{"mt19937", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (mt_state_t), + &mt_set, + &mt_get, + &mt_get_double}; + +static const gsl_rng_type mt_1999_type = +{"mt19937_1999", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (mt_state_t), + &mt_1999_set, + &mt_get, + &mt_get_double}; + +static const gsl_rng_type mt_1998_type = +{"mt19937_1998", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (mt_state_t), + &mt_1998_set, + &mt_get, + &mt_get_double}; + +const gsl_rng_type *gsl_rng_mt19937 = &mt_type; +const gsl_rng_type *gsl_rng_mt19937_1999 = &mt_1999_type; +const gsl_rng_type *gsl_rng_mt19937_1998 = &mt_1998_type; + +/* MT19937 is the default generator, so define that here too */ + +const gsl_rng_type *gsl_rng_default = &mt_type; +unsigned long int gsl_rng_default_seed = 0; diff --git a/software/gsl-1.15/rng/r250.c b/software/gsl-1.15/rng/r250.c new file mode 100644 index 000000000..9274d6b03 --- /dev/null +++ b/software/gsl-1.15/rng/r250.c @@ -0,0 +1,172 @@ +/* rng/r250.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a shift-register random number generator. The sequence is + + x_n = x_{n-103} ^ x_{n-250} ("^" means XOR) + + defined on 32-bit words. + + BJG: Note that this implementation actually uses the sequence, x_n + = x_{n-147} ^ x_{n-250} which generates the outputs in + time-reversed order but is otherwise completely equivalent. + + The first 250 elements x_1 .. x_250 are first initialized as x_n = + s_n, where s_n = (69069*s_{n-1}) mod 2^32 and s_0=s is the + user-supplied seed. To ensure that the sequence does not lie on a + subspace we force 32 of the entries to be linearly independent. We + take the 32 elements x[3], x[10], x[17], x[24], ..., 213 and apply + the following operations, + + x[3] &= 11111111111111111111111111111111 + x[3] |= 10000000000000000000000000000000 + x[10] &= 01111111111111111111111111111111 + x[10] |= 01000000000000000000000000000000 + x[17] &= 00111111111111111111111111111111 + x[17] |= 00100000000000000000000000000000 + .... ... + x[206] &= 00000000000000000000000000000111 + x[206] |= 00000000000000000000000000000100 + x[213] &= 00000000000000000000000000000011 + x[213] |= 00000000000000000000000000000010 + x[220] &= 00000000000000000000000000000001 + x[220] |= 00000000000000000000000000000001 + + i.e. if we consider the bits of the 32 elements as forming a 32x32 + array then we are setting the diagonal bits of the array to one and + masking the lower triangle below the diagonal to zero. + + With this initialization procedure the theoretical value of + x_{10001} is 1100653588 for s = 1 (Actually I got this by running + the original code). The subscript 10001 means (1) seed the + generator with s = 1 and then do 10000 actual iterations. + + The period of this generator is about 2^250. + + The algorithm works for any number of bits. It is implemented here + for 32 bits. + + From: S. Kirkpatrick and E. Stoll, "A very fast shift-register + sequence random number generator", Journal of Computational Physics, + 40, 517-526 (1981). */ + +static inline unsigned long int r250_get (void *vstate); +static double r250_get_double (void *vstate); +static void r250_set (void *state, unsigned long int s); + +typedef struct + { + int i; + unsigned long x[250]; + } +r250_state_t; + +static inline unsigned long int +r250_get (void *vstate) +{ + r250_state_t *state = (r250_state_t *) vstate; + unsigned long int k; + int j; + + int i = state->i; + + if (i >= 147) + { + j = i - 147; + } + else + { + j = i + 103; + } + + k = state->x[i] ^ state->x[j]; + state->x[i] = k; + + if (i >= 249) + { + state->i = 0; + } + else + { + state->i = i + 1; + } + + return k; +} + +static double +r250_get_double (void *vstate) +{ + return r250_get (vstate) / 4294967296.0 ; +} + +static void +r250_set (void *vstate, unsigned long int s) +{ + r250_state_t *state = (r250_state_t *) vstate; + + int i; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->i = 0; + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + + for (i = 0; i < 250; i++) /* Fill the buffer */ + { + s = LCG (s); + state->x[i] = s; + } + + { + /* Masks for turning on the diagonal bit and turning off the + leftmost bits */ + + unsigned long int msb = 0x80000000UL; + unsigned long int mask = 0xffffffffUL; + + for (i = 0; i < 32; i++) + { + int k = 7 * i + 3; /* Select a word to operate on */ + state->x[k] &= mask; /* Turn off bits left of the diagonal */ + state->x[k] |= msb; /* Turn on the diagonal bit */ + mask >>= 1; + msb >>= 1; + } + } + + return; +} + +static const gsl_rng_type r250_type = +{"r250", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (r250_state_t), + &r250_set, + &r250_get, + &r250_get_double}; + +const gsl_rng_type *gsl_rng_r250 = &r250_type; diff --git a/software/gsl-1.15/rng/ran0.c b/software/gsl-1.15/rng/ran0.c new file mode 100644 index 000000000..029274fff --- /dev/null +++ b/software/gsl-1.15/rng/ran0.c @@ -0,0 +1,100 @@ +/* rng/ran0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* This is an implementation of the algorithm used in Numerical + Recipe's ran0 generator. It is the same as MINSTD with an XOR mask + of 123459876 on the seed. + + The period of this generator is 2^31. + + Note, if you choose a seed of 123459876 it would give a degenerate + series 0,0,0,0, ... I've made that into an error. */ + +static inline unsigned long int ran0_get (void *vstate); +static double ran0_get_double (void *vstate); +static void ran0_set (void *state, unsigned long int s); + +static const long int m = 2147483647, a = 16807, q = 127773, r = 2836; +static const unsigned long int mask = 123459876; + +typedef struct + { + unsigned long int x; + } +ran0_state_t; + +static inline unsigned long int +ran0_get (void *vstate) +{ + ran0_state_t *state = (ran0_state_t *) vstate; + + const unsigned long int x = state->x; + + const long int h = x / q; + const long int t = a * (x - h * q) - h * r; + + if (t < 0) + { + state->x = t + m; + } + else + { + state->x = t; + } + + return state->x; +} + +static double +ran0_get_double (void *vstate) +{ + return ran0_get (vstate) / 2147483647.0 ; +} + +static void +ran0_set (void *vstate, unsigned long int s) +{ + ran0_state_t *state = (ran0_state_t *) vstate; + + if (s == mask) + { + GSL_ERROR_VOID ("ran0 should not use seed == mask", + GSL_EINVAL); + } + + state->x = s ^ mask; + + return; +} + +static const gsl_rng_type ran0_type = +{"ran0", /* name */ + 2147483646, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran0_state_t), + &ran0_set, + &ran0_get, + &ran0_get_double}; + +const gsl_rng_type *gsl_rng_ran0 = &ran0_type; diff --git a/software/gsl-1.15/rng/ran1.c b/software/gsl-1.15/rng/ran1.c new file mode 100644 index 000000000..fd002e987 --- /dev/null +++ b/software/gsl-1.15/rng/ran1.c @@ -0,0 +1,130 @@ +/* rng/ran1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is an implementation of the algorithm used in Numerical + Recipe's ran1 generator. It is MINSTD with a 32-element + shuffle-box. */ + +static inline unsigned long int ran1_get (void *vstate); +static double ran1_get_double (void *vstate); +static void ran1_set (void *state, unsigned long int s); + +static const long int m = 2147483647, a = 16807, q = 127773, r = 2836; + +#define N_SHUFFLE 32 +#define N_DIV (1 + 2147483646/N_SHUFFLE) + +typedef struct + { + unsigned long int x; + unsigned long int n; + unsigned long int shuffle[N_SHUFFLE]; + } +ran1_state_t; + +static inline unsigned long int +ran1_get (void *vstate) +{ + ran1_state_t *state = (ran1_state_t *) vstate; + + const unsigned long int x = state->x; + + const long int h = x / q; + const long int t = a * (x - h * q) - h * r; + + if (t < 0) + { + state->x = t + m; + } + else + { + state->x = t; + } + + { + unsigned long int j = state->n / N_DIV; + state->n = state->shuffle[j]; + state->shuffle[j] = state->x; + } + + return state->n; +} + +static double +ran1_get_double (void *vstate) +{ + float x_max = 1 - 1.2e-7f ; /* Numerical Recipes version of 1-FLT_EPS */ + + float x = ran1_get (vstate) / 2147483647.0f ; + + if (x > x_max) + return x_max ; + + return x ; +} + + +static void +ran1_set (void *vstate, unsigned long int s) +{ + ran1_state_t *state = (ran1_state_t *) vstate; + int i; + + if (s == 0) + s = 1; /* default seed is 1 */ + + for (i = 0; i < 8; i++) + { + long int h = s / q; + long int t = a * (s - h * q) - h * r; + if (t < 0) + t += m; + s = t; + } + + for (i = N_SHUFFLE - 1; i >= 0; i--) + { + long int h = s / q; + long int t = a * (s - h * q) - h * r; + if (t < 0) + t += m; + s = t; + state->shuffle[i] = s; + } + + state->x = s; + state->n = s; + + return; +} + +static const gsl_rng_type ran1_type = +{"ran1", /* name */ + 2147483646, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran1_state_t), + &ran1_set, + &ran1_get, + &ran1_get_double}; + +const gsl_rng_type *gsl_rng_ran1 = &ran1_type; diff --git a/software/gsl-1.15/rng/ran2.c b/software/gsl-1.15/rng/ran2.c new file mode 100644 index 000000000..a98552314 --- /dev/null +++ b/software/gsl-1.15/rng/ran2.c @@ -0,0 +1,146 @@ +/* rng/ran2.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is an implementation of the algorithm used in Numerical + Recipe's ran2 generator. It is a L'Ecuyer combined recursive + generator with a 32-element shuffle-box. + + As far as I can tell, in general the effects of adding a shuffle + box cannot be proven theoretically, so the period of this generator + is unknown. + + The period of the underlying combined generator is O(2^60). */ + +static inline unsigned long int ran2_get (void *vstate); +static double ran2_get_double (void *vstate); +static void ran2_set (void *state, unsigned long int s); + +static const long int m1 = 2147483563, a1 = 40014, q1 = 53668, r1 = 12211; +static const long int m2 = 2147483399, a2 = 40692, q2 = 52774, r2 = 3791; + +#define N_SHUFFLE 32 +#define N_DIV (1 + 2147483562/N_SHUFFLE) + +typedef struct + { + unsigned long int x; + unsigned long int y; + unsigned long int n; + unsigned long int shuffle[N_SHUFFLE]; + } +ran2_state_t; + +static inline unsigned long int +ran2_get (void *vstate) +{ + ran2_state_t *state = (ran2_state_t *) vstate; + + const unsigned long int x = state->x; + const unsigned long int y = state->y; + + long int h1 = x / q1; + long int t1 = a1 * (x - h1 * q1) - h1 * r1; + + long int h2 = y / q2; + long int t2 = a2 * (y - h2 * q2) - h2 * r2; + + if (t1 < 0) + t1 += m1; + + if (t2 < 0) + t2 += m2; + + state->x = t1; + state->y = t2; + + { + unsigned long int j = state->n / N_DIV; + long int delta = state->shuffle[j] - t2; + if (delta < 1) + delta += m1 - 1; + state->n = delta; + state->shuffle[j] = t1; + } + + return state->n; +} + +static double +ran2_get_double (void *vstate) +{ + float x_max = 1 - 1.2e-7f ; /* Numerical Recipes version of 1-FLT_EPS */ + + float x = ran2_get (vstate) / 2147483563.0f ; + + if (x > x_max) + return x_max ; + + return x ; +} + +static void +ran2_set (void *vstate, unsigned long int s) +{ + ran2_state_t *state = (ran2_state_t *) vstate; + int i; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->y = s; + + for (i = 0; i < 8; i++) + { + long int h = s / q1; + long int t = a1 * (s - h * q1) - h * r1; + if (t < 0) + t += m1; + s = t; + } + + for (i = N_SHUFFLE - 1; i >= 0; i--) + { + long int h = s / q1; + long int t = a1 * (s - h * q1) - h * r1; + if (t < 0) + t += m1; + s = t; + state->shuffle[i] = s; + } + + state->x = s; + state->n = s; + + return; +} + +static const gsl_rng_type ran2_type = +{"ran2", /* name */ + 2147483562, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran2_state_t), + &ran2_set, + &ran2_get, + &ran2_get_double}; + +const gsl_rng_type *gsl_rng_ran2 = &ran2_type; diff --git a/software/gsl-1.15/rng/ran3.c b/software/gsl-1.15/rng/ran3.c new file mode 100644 index 000000000..d855d2547 --- /dev/null +++ b/software/gsl-1.15/rng/ran3.c @@ -0,0 +1,135 @@ +/* rng/ran3.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is an implementation of the algorithm used in Knuths's + subtractive generator, with the Numerical Recipe's ran3 paramters. + It is a subtractive lagged fibonnaci generator. */ + +static inline unsigned long int ran3_get (void *vstate); +static double ran3_get_double (void *vstate); +static void ran3_set (void *state, unsigned long int s); + +#define M_BIG 1000000000 +#define M_SEED 161803398 + +typedef struct + { + unsigned int x; + unsigned int y; + unsigned long int buffer[56]; + } +ran3_state_t; + +static inline unsigned long int +ran3_get (void *vstate) +{ + ran3_state_t *state = (ran3_state_t *) vstate; + long int j; + + state->x++; + + if (state->x == 56) + state->x = 1; + + state->y++; + + if (state->y == 56) + state->y = 1; + + j = state->buffer[state->x] - state->buffer[state->y]; + + if (j < 0) + j += M_BIG; + + state->buffer[state->x] = j; + + return j; +} + +static double +ran3_get_double (void *vstate) +{ + return ran3_get (vstate) / (double) M_BIG ; +} + +static void +ran3_set (void *vstate, unsigned long int s) +{ + ran3_state_t *state = (ran3_state_t *) vstate; + int i, i1; + long int j, k; + + if (s == 0) + s = 1; /* default seed is 1 */ + + j = (M_SEED - s) % M_BIG; + + /* Avoid potential problem with negative values */ + if (j < 0) j += M_BIG; + + /* the zeroth element is never used, but we initialize it for + consistency between states */ + + state->buffer[0] = 0; + + state->buffer[55] = j; + + k = 1; + for (i = 1; i < 55; i++) + { + int n = (21 * i) % 55; + state->buffer[n] = k; + k = j - k; + if (k < 0) + k += M_BIG; + j = state->buffer[n]; + + } + + for (i1 = 0; i1 < 4; i1++) + { + for (i = 1; i < 56; i++) + { + long int t = state->buffer[i] - state->buffer[1 + (i + 30) % 55]; + if (t < 0) + t += M_BIG; + state->buffer[i] = t; + } + } + + state->x = 0; + state->y = 31; + + return; +} + +static const gsl_rng_type ran3_type = +{"ran3", /* name */ + M_BIG, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ran3_state_t), + &ran3_set, + &ran3_get, + &ran3_get_double}; + +const gsl_rng_type *gsl_rng_ran3 = &ran3_type; diff --git a/software/gsl-1.15/rng/rand.c b/software/gsl-1.15/rng/rand.c new file mode 100644 index 000000000..1f2a0269e --- /dev/null +++ b/software/gsl-1.15/rng/rand.c @@ -0,0 +1,85 @@ +/* rng/rand.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is the old BSD rand() generator. The sequence is + + x_{n+1} = (a x_n + c) mod m + + with a = 1103515245, c = 12345 and m = 2^31 = 2147483648. The seed + specifies the initial value, x_1. + + The theoretical value of x_{10001} is 1910041713. + + The period of this generator is 2^31. + + The rand() generator is not very good -- the low bits of successive + numbers are correlated. */ + +static inline unsigned long int rand_get (void *vstate); +static double rand_get_double (void *vstate); +static void rand_set (void *state, unsigned long int s); + +typedef struct + { + unsigned long int x; + } +rand_state_t; + +static inline unsigned long int +rand_get (void *vstate) +{ + rand_state_t *state = (rand_state_t *) vstate; + + /* The following line relies on unsigned 32-bit arithmetic */ + + state->x = (1103515245 * state->x + 12345) & 0x7fffffffUL; + + return state->x; +} + +static double +rand_get_double (void *vstate) +{ + return rand_get (vstate) / 2147483648.0 ; +} + +static void +rand_set (void *vstate, unsigned long int s) +{ + rand_state_t *state = (rand_state_t *) vstate; + + state->x = s; + + return; +} + +static const gsl_rng_type rand_type = +{"rand", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (rand_state_t), + &rand_set, + &rand_get, + &rand_get_double}; + +const gsl_rng_type *gsl_rng_rand = &rand_type; diff --git a/software/gsl-1.15/rng/rand48.c b/software/gsl-1.15/rng/rand48.c new file mode 100644 index 000000000..efb19935f --- /dev/null +++ b/software/gsl-1.15/rng/rand48.c @@ -0,0 +1,143 @@ +/* rng/rand48.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +/* This is the Unix rand48() generator. The generator returns the + upper 32 bits from each term of the sequence, + + x_{n+1} = (a x_n + c) mod m + + using 48-bit unsigned arithmetic, with a = 0x5DEECE66D , c = 0xB + and m = 2^48. The seed specifies the upper 32 bits of the initial + value, x_1, with the lower 16 bits set to 0x330E. + + The theoretical value of x_{10001} is 244131582646046. + + The period of this generator is ? FIXME (probably around 2^48). */ + +static inline void rand48_advance (void *vstate); +static unsigned long int rand48_get (void *vstate); +static double rand48_get_double (void *vstate); +static void rand48_set (void *state, unsigned long int s); + +static const unsigned short int a0 = 0xE66D ; +static const unsigned short int a1 = 0xDEEC ; +static const unsigned short int a2 = 0x0005 ; + +static const unsigned short int c0 = 0x000B ; + +typedef struct + { + unsigned short int x0, x1, x2; + } +rand48_state_t; + +static inline void +rand48_advance (void *vstate) +{ + rand48_state_t *state = (rand48_state_t *) vstate; + + /* work with unsigned long ints throughout to get correct integer + promotions of any unsigned short ints */ + + const unsigned long int x0 = (unsigned long int) state->x0 ; + const unsigned long int x1 = (unsigned long int) state->x1 ; + const unsigned long int x2 = (unsigned long int) state->x2 ; + + unsigned long int a ; + + a = a0 * x0 + c0 ; + state->x0 = (a & 0xFFFF) ; + + a >>= 16 ; + + /* although the next line may overflow we only need the top 16 bits + in the following stage, so it does not matter */ + + a += a0 * x1 + a1 * x0 ; + state->x1 = (a & 0xFFFF) ; + + a >>= 16 ; + a += a0 * x2 + a1 * x1 + a2 * x0 ; + state->x2 = (a & 0xFFFF) ; +} + +static unsigned long int +rand48_get (void *vstate) +{ + unsigned long int x1, x2; + + rand48_state_t *state = (rand48_state_t *) vstate; + rand48_advance (state) ; + + x2 = (unsigned long int) state->x2; + x1 = (unsigned long int) state->x1; + + return (x2 << 16) + x1; +} + +static double +rand48_get_double (void * vstate) +{ + rand48_state_t *state = (rand48_state_t *) vstate; + + rand48_advance (state) ; + + return (ldexp((double) state->x2, -16) + + ldexp((double) state->x1, -32) + + ldexp((double) state->x0, -48)) ; +} + +static void +rand48_set (void *vstate, unsigned long int s) +{ + rand48_state_t *state = (rand48_state_t *) vstate; + + if (s == 0) /* default seed */ + { + state->x0 = 0x330E ; + state->x1 = 0xABCD ; + state->x2 = 0x1234 ; + } + else + { + state->x0 = 0x330E ; + state->x1 = s & 0xFFFF ; + state->x2 = (s >> 16) & 0xFFFF ; + } + + return; +} + +static const gsl_rng_type rand48_type = +{"rand48", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (rand48_state_t), + &rand48_set, + &rand48_get, + &rand48_get_double +}; + +const gsl_rng_type *gsl_rng_rand48 = &rand48_type; diff --git a/software/gsl-1.15/rng/random.c b/software/gsl-1.15/rng/random.c new file mode 100644 index 000000000..b292eb3d9 --- /dev/null +++ b/software/gsl-1.15/rng/random.c @@ -0,0 +1,656 @@ +/* rng/random.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This file provides support for random() generators. There are three + versions in widespread use today, + + - The original BSD version, e.g. on SunOS 4.1 and FreeBSD. + + - The Linux libc5 version, which is differs from the BSD version in + its seeding procedure, possibly due to the introduction of a typo + in the multiplier. + + - The GNU glibc2 version, which has a new (and better) seeding + procedure. + + They all produce different numbers, due to the different seeding + algorithms, but the algorithm for the generator is the same in each + case. + + */ + +static inline long int random_get (int * i, int * j, int n, long int * x); + +static inline unsigned long int random8_get (void *vstate); +static inline unsigned long int random32_get (void *vstate); +static inline unsigned long int random64_get (void *vstate); +static inline unsigned long int random128_get (void *vstate); +static inline unsigned long int random256_get (void *vstate); + +static double random8_get_double (void *vstate); +static double random32_get_double (void *vstate); +static double random64_get_double (void *vstate); +static double random128_get_double (void *vstate); +static double random256_get_double (void *vstate); + +static void random8_glibc2_set (void *state, unsigned long int s); +static void random32_glibc2_set (void *state, unsigned long int s); +static void random64_glibc2_set (void *state, unsigned long int s); +static void random128_glibc2_set (void *state, unsigned long int s); +static void random256_glibc2_set (void *state, unsigned long int s); + +static void random8_libc5_set (void *state, unsigned long int s); +static void random32_libc5_set (void *state, unsigned long int s); +static void random64_libc5_set (void *state, unsigned long int s); +static void random128_libc5_set (void *state, unsigned long int s); +static void random256_libc5_set (void *state, unsigned long int s); + +static void random8_bsd_set (void *state, unsigned long int s); +static void random32_bsd_set (void *state, unsigned long int s); +static void random64_bsd_set (void *state, unsigned long int s); +static void random128_bsd_set (void *state, unsigned long int s); +static void random256_bsd_set (void *state, unsigned long int s); + +static void bsd_initialize (long int * x, int n, unsigned long int s); +static void libc5_initialize (long int * x, int n, unsigned long int s); +static void glibc2_initialize (long int * x, int n, unsigned long int s); + +typedef struct + { + long int x; + } +random8_state_t; + +typedef struct + { + int i, j; + long int x[7]; + } +random32_state_t; + +typedef struct + { + int i, j; + long int x[15]; + } +random64_state_t; + +typedef struct + { + int i, j; + long int x[31]; + } +random128_state_t; + +typedef struct + { + int i, j; + long int x[63]; + } +random256_state_t; + +static inline unsigned long int +random8_get (void *vstate) +{ + random8_state_t *state = (random8_state_t *) vstate; + + state->x = (1103515245 * state->x + 12345) & 0x7fffffffUL; + return state->x; +} + +static inline long int +random_get (int * i, int * j, int n, long int * x) +{ + long int k ; + + x[*i] += x[*j] ; + k = (x[*i] >> 1) & 0x7FFFFFFF ; + + (*i)++ ; + if (*i == n) + *i = 0 ; + + (*j)++ ; + if (*j == n) + *j = 0 ; + + return k ; +} + +static inline unsigned long int +random32_get (void *vstate) +{ + random32_state_t *state = (random32_state_t *) vstate; + unsigned long int k = random_get (&state->i, &state->j, 7, state->x) ; + return k ; +} + +static inline unsigned long int +random64_get (void *vstate) +{ + random64_state_t *state = (random64_state_t *) vstate; + long int k = random_get (&state->i, &state->j, 15, state->x) ; + return k ; +} + +static inline unsigned long int +random128_get (void *vstate) +{ + random128_state_t *state = (random128_state_t *) vstate; + unsigned long int k = random_get (&state->i, &state->j, 31, state->x) ; + return k ; +} + +static inline unsigned long int +random256_get (void *vstate) +{ + random256_state_t *state = (random256_state_t *) vstate; + long int k = random_get (&state->i, &state->j, 63, state->x) ; + return k ; +} + +static double +random8_get_double (void *vstate) +{ + return random8_get (vstate) / 2147483648.0 ; +} + +static double +random32_get_double (void *vstate) +{ + return random32_get (vstate) / 2147483648.0 ; +} + +static double +random64_get_double (void *vstate) +{ + return random64_get (vstate) / 2147483648.0 ; +} + +static double +random128_get_double (void *vstate) +{ + return random128_get (vstate) / 2147483648.0 ; +} + +static double +random256_get_double (void *vstate) +{ + return random256_get (vstate) / 2147483648.0 ; +} + +static void +random8_bsd_set (void *vstate, unsigned long int s) +{ + random8_state_t *state = (random8_state_t *) vstate; + + if (s == 0) + s = 1; + + state->x = s; +} + +static void +random32_bsd_set (void *vstate, unsigned long int s) +{ + random32_state_t *state = (random32_state_t *) vstate; + int i; + + bsd_initialize (state->x, 7, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 7 ; i++) + random32_get (state) ; +} + +static void +random64_bsd_set (void *vstate, unsigned long int s) +{ + random64_state_t *state = (random64_state_t *) vstate; + int i; + + bsd_initialize (state->x, 15, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 15 ; i++) + random64_get (state) ; +} + +static void +random128_bsd_set (void *vstate, unsigned long int s) +{ + random128_state_t *state = (random128_state_t *) vstate; + int i; + + bsd_initialize (state->x, 31, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 31 ; i++) + random128_get (state) ; +} + +static void +random256_bsd_set (void *vstate, unsigned long int s) +{ + random256_state_t *state = (random256_state_t *) vstate; + int i; + + bsd_initialize (state->x, 63, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 63 ; i++) + random256_get (state) ; +} + +static void +bsd_initialize (long int * x, int n, unsigned long int s) +{ + int i; + + if (s == 0) + s = 1 ; + + x[0] = s; + + for (i = 1 ; i < n ; i++) + x[i] = 1103515245 * x[i-1] + 12345 ; +} + +static void +libc5_initialize (long int * x, int n, unsigned long int s) +{ + int i; + + if (s == 0) + s = 1 ; + + x[0] = s; + + for (i = 1 ; i < n ; i++) + x[i] = 1103515145 * x[i-1] + 12345 ; +} + +static void +glibc2_initialize (long int * x, int n, unsigned long int s) +{ + int i; + + if (s == 0) + s = 1 ; + + x[0] = s; + + for (i = 1 ; i < n ; i++) + { + const long int h = s / 127773; + const long int t = 16807 * (s - h * 127773) - h * 2836; + if (t < 0) + { + s = t + 2147483647 ; + } + else + { + s = t ; + } + + x[i] = s ; + } +} + +static void +random8_glibc2_set (void *vstate, unsigned long int s) +{ + random8_state_t *state = (random8_state_t *) vstate; + + if (s == 0) + s = 1; + + state->x = s; +} + +static void +random32_glibc2_set (void *vstate, unsigned long int s) +{ + random32_state_t *state = (random32_state_t *) vstate; + int i; + + glibc2_initialize (state->x, 7, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 7 ; i++) + random32_get (state) ; +} + +static void +random64_glibc2_set (void *vstate, unsigned long int s) +{ + random64_state_t *state = (random64_state_t *) vstate; + int i; + + glibc2_initialize (state->x, 15, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 15 ; i++) + random64_get (state) ; +} + +static void +random128_glibc2_set (void *vstate, unsigned long int s) +{ + random128_state_t *state = (random128_state_t *) vstate; + int i; + + glibc2_initialize (state->x, 31, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 31 ; i++) + random128_get (state) ; +} + +static void +random256_glibc2_set (void *vstate, unsigned long int s) +{ + random256_state_t *state = (random256_state_t *) vstate; + int i; + + glibc2_initialize (state->x, 63, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 63 ; i++) + random256_get (state) ; +} + + +static void +random8_libc5_set (void *vstate, unsigned long int s) +{ + random8_state_t *state = (random8_state_t *) vstate; + + if (s == 0) + s = 1; + + state->x = s; +} + +static void +random32_libc5_set (void *vstate, unsigned long int s) +{ + random32_state_t *state = (random32_state_t *) vstate; + int i; + + libc5_initialize (state->x, 7, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 7 ; i++) + random32_get (state) ; +} + +static void +random64_libc5_set (void *vstate, unsigned long int s) +{ + random64_state_t *state = (random64_state_t *) vstate; + int i; + + libc5_initialize (state->x, 15, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 15 ; i++) + random64_get (state) ; +} + +static void +random128_libc5_set (void *vstate, unsigned long int s) +{ + random128_state_t *state = (random128_state_t *) vstate; + int i; + + libc5_initialize (state->x, 31, s) ; + + state->i = 3; + state->j = 0; + + for (i = 0 ; i < 10 * 31 ; i++) + random128_get (state) ; +} + +static void +random256_libc5_set (void *vstate, unsigned long int s) +{ + random256_state_t *state = (random256_state_t *) vstate; + int i; + + libc5_initialize (state->x, 63, s) ; + + state->i = 1; + state->j = 0; + + for (i = 0 ; i < 10 * 63 ; i++) + random256_get (state) ; +} + +static const gsl_rng_type random_glibc2_type = +{"random-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_glibc2_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random8_glibc2_type = +{"random8-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random8_state_t), + &random8_glibc2_set, + &random8_get, + &random8_get_double}; + +static const gsl_rng_type random32_glibc2_type = +{"random32-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random32_state_t), + &random32_glibc2_set, + &random32_get, + &random32_get_double}; + +static const gsl_rng_type random64_glibc2_type = +{"random64-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random64_state_t), + &random64_glibc2_set, + &random64_get, + &random64_get_double}; + +static const gsl_rng_type random128_glibc2_type = +{"random128-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_glibc2_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random256_glibc2_type = +{"random256-glibc2", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random256_state_t), + &random256_glibc2_set, + &random256_get, + &random256_get_double}; + +static const gsl_rng_type random_libc5_type = +{"random-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_libc5_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random8_libc5_type = +{"random8-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random8_state_t), + &random8_libc5_set, + &random8_get, + &random8_get_double}; + +static const gsl_rng_type random32_libc5_type = +{"random32-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random32_state_t), + &random32_libc5_set, + &random32_get, + &random32_get_double}; + +static const gsl_rng_type random64_libc5_type = +{"random64-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random64_state_t), + &random64_libc5_set, + &random64_get, + &random64_get_double}; + +static const gsl_rng_type random128_libc5_type = +{"random128-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_libc5_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random256_libc5_type = +{"random256-libc5", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random256_state_t), + &random256_libc5_set, + &random256_get, + &random256_get_double}; + +static const gsl_rng_type random_bsd_type = +{"random-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_bsd_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random8_bsd_type = +{"random8-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random8_state_t), + &random8_bsd_set, + &random8_get, + &random8_get_double}; + +static const gsl_rng_type random32_bsd_type = +{"random32-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random32_state_t), + &random32_bsd_set, + &random32_get, + &random32_get_double}; + +static const gsl_rng_type random64_bsd_type = +{"random64-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random64_state_t), + &random64_bsd_set, + &random64_get, + &random64_get_double}; + +static const gsl_rng_type random128_bsd_type = +{"random128-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random128_state_t), + &random128_bsd_set, + &random128_get, + &random128_get_double}; + +static const gsl_rng_type random256_bsd_type = +{"random256-bsd", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (random256_state_t), + &random256_bsd_set, + &random256_get, + &random256_get_double}; + +const gsl_rng_type *gsl_rng_random_libc5 = &random_libc5_type; +const gsl_rng_type *gsl_rng_random8_libc5 = &random8_libc5_type; +const gsl_rng_type *gsl_rng_random32_libc5 = &random32_libc5_type; +const gsl_rng_type *gsl_rng_random64_libc5 = &random64_libc5_type; +const gsl_rng_type *gsl_rng_random128_libc5 = &random128_libc5_type; +const gsl_rng_type *gsl_rng_random256_libc5 = &random256_libc5_type; + +const gsl_rng_type *gsl_rng_random_glibc2 = &random_glibc2_type; +const gsl_rng_type *gsl_rng_random8_glibc2 = &random8_glibc2_type; +const gsl_rng_type *gsl_rng_random32_glibc2 = &random32_glibc2_type; +const gsl_rng_type *gsl_rng_random64_glibc2 = &random64_glibc2_type; +const gsl_rng_type *gsl_rng_random128_glibc2 = &random128_glibc2_type; +const gsl_rng_type *gsl_rng_random256_glibc2 = &random256_glibc2_type; + +const gsl_rng_type *gsl_rng_random_bsd = &random_bsd_type; +const gsl_rng_type *gsl_rng_random8_bsd = &random8_bsd_type; +const gsl_rng_type *gsl_rng_random32_bsd = &random32_bsd_type; +const gsl_rng_type *gsl_rng_random64_bsd = &random64_bsd_type; +const gsl_rng_type *gsl_rng_random128_bsd = &random128_bsd_type; +const gsl_rng_type *gsl_rng_random256_bsd = &random256_bsd_type; + + + + diff --git a/software/gsl-1.15/rng/randu.c b/software/gsl-1.15/rng/randu.c new file mode 100644 index 000000000..420aa3876 --- /dev/null +++ b/software/gsl-1.15/rng/randu.c @@ -0,0 +1,95 @@ +/* rng/randu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a reincarnation of the infamously bad RANDU generator. + The sequence is, + + x_{n+1} = (a x_n) mod m + + with a = 65539 and m = 2^31 = 2147483648. The seed specifies + the initial value, x_1. + + The theoretical value of x_{10001} is 1623524161. + + The period of this generator is 2^29. + + Note: Knuth describes this generator as "really horrible". + + From: Park and Miller, "Random Number Generators: Good ones are + hard to find" Communications of the ACM, October 1988, Volume 31, + No 10, pages 1192-1201. */ + +static inline unsigned long int randu_get (void *vstate); +static double randu_get_double (void *vstate); +static void randu_set (void *state, unsigned long int s); + +static const long int a = 65539; +/* static const unsigned long int m = 2147483648UL; */ + +typedef struct + { + unsigned long int x; + } +randu_state_t; + +static inline unsigned long int +randu_get (void *vstate) +{ + randu_state_t *state = (randu_state_t *) vstate; + + /* The following line relies on unsigned 32-bit arithmetic */ + + state->x = (a * state->x) & 0x7fffffffUL; + + return state->x; +} + +static double +randu_get_double (void *vstate) +{ + return randu_get (vstate) / 2147483648.0 ; +} + +static void +randu_set (void *vstate, unsigned long int s) +{ + randu_state_t *state = (randu_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->x = s; + + return; +} + +static const gsl_rng_type randu_type = +{"randu", /* name */ + 0x7fffffffUL, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (randu_state_t), + &randu_set, + &randu_get, + &randu_get_double}; + +const gsl_rng_type *gsl_rng_randu = &randu_type; diff --git a/software/gsl-1.15/rng/ranf.c b/software/gsl-1.15/rng/ranf.c new file mode 100644 index 000000000..1375679e8 --- /dev/null +++ b/software/gsl-1.15/rng/ranf.c @@ -0,0 +1,161 @@ +/* rng/ranf.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +/* This is the CRAY RANF generator. The generator returns the + upper 32 bits from each term of the sequence, + + x_{n+1} = (a x_n) mod m + + using 48-bit unsigned arithmetic, with a = 0x2875A2E7B175 and m = + 2^48. The seed specifies the lower 32 bits of the initial value, + x_1, with the lowest bit set (to prevent the seed taking an even + value), and the upper 16 bits set to 0. + + There is a subtlety in the implementation of the seed. The initial + state is put one step back by multiplying by the modular inverse of + a mod m. This is done for compatibility with the original CRAY + implementation. + + Note, you can only seed the generator with integers up to 2^32, + while the CRAY uses wide integers which can cover all 2^48 states + of the generator. + + The theoretical value of x_{10001} is 141091827447341. + + The period of this generator is 2^{46}. */ + +static inline void ranf_advance (void *vstate); +static unsigned long int ranf_get (void *vstate); +static double ranf_get_double (void *vstate); +static void ranf_set (void *state, unsigned long int s); + +static const unsigned short int a0 = 0xB175 ; +static const unsigned short int a1 = 0xA2E7 ; +static const unsigned short int a2 = 0x2875 ; + +typedef struct + { + unsigned short int x0, x1, x2; + } +ranf_state_t; + +static inline void +ranf_advance (void *vstate) +{ + ranf_state_t *state = (ranf_state_t *) vstate; + + const unsigned long int x0 = (unsigned long int) state->x0 ; + const unsigned long int x1 = (unsigned long int) state->x1 ; + const unsigned long int x2 = (unsigned long int) state->x2 ; + + unsigned long int r ; + + r = a0 * x0 ; + state->x0 = (r & 0xFFFF) ; + + r >>= 16 ; + r += a0 * x1 + a1 * x0 ; + state->x1 = (r & 0xFFFF) ; + + r >>= 16 ; + r += a0 * x2 + a1 * x1 + a2 * x0 ; + state->x2 = (r & 0xFFFF) ; +} + +static unsigned long int +ranf_get (void *vstate) +{ + unsigned long int x1, x2; + + ranf_state_t *state = (ranf_state_t *) vstate; + ranf_advance (state) ; + + x1 = (unsigned long int) state->x1; + x2 = (unsigned long int) state->x2; + + return (x2 << 16) + x1; +} + +static double +ranf_get_double (void * vstate) +{ + ranf_state_t *state = (ranf_state_t *) vstate; + + ranf_advance (state) ; + + return (ldexp((double) state->x2, -16) + + ldexp((double) state->x1, -32) + + ldexp((double) state->x0, -48)) ; +} + +static void +ranf_set (void *vstate, unsigned long int s) +{ + ranf_state_t *state = (ranf_state_t *) vstate; + + unsigned short int x0, x1, x2 ; + unsigned long int r ; + + unsigned long int b0 = 0xD6DD ; + unsigned long int b1 = 0xB894 ; + unsigned long int b2 = 0x5CEE ; + + if (s == 0) /* default seed */ + { + x0 = 0x9CD1 ; + x1 = 0x53FC ; + x2 = 0x9482 ; + } + else + { + x0 = (s | 1) & 0xFFFF ; + x1 = s >> 16 & 0xFFFF ; + x2 = 0 ; + } + + r = b0 * x0 ; + state->x0 = (r & 0xFFFF) ; + + r >>= 16 ; + r += b0 * x1 + b1 * x0 ; + state->x1 = (r & 0xFFFF) ; + + r >>= 16 ; + r += b0 * x2 + b1 * x1 + b2 * x0 ; + state->x2 = (r & 0xFFFF) ; + + return; +} + +static const gsl_rng_type ranf_type = +{"ranf", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranf_state_t), + &ranf_set, + &ranf_get, + &ranf_get_double +}; + +const gsl_rng_type *gsl_rng_ranf = &ranf_type; diff --git a/software/gsl-1.15/rng/ranlux.c b/software/gsl-1.15/rng/ranlux.c new file mode 100644 index 000000000..2bd770658 --- /dev/null +++ b/software/gsl-1.15/rng/ranlux.c @@ -0,0 +1,222 @@ +/* rng/ranlux.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a lagged fibonacci generator with skipping developed by Luescher. + The sequence is a series of 24-bit integers, x_n, + + x_n = d_n + b_n + + where d_n = x_{n-10} - x_{n-24} - c_{n-1}, b_n = 0 if d_n >= 0 and + b_n = 2^24 if d_n < 0, c_n = 0 if d_n >= 0 and c_n = 1 if d_n < 0, + where after 24 samples a group of p integers are "skipped", to + reduce correlations. By default p = 199, but can be increased to + 365. + + The period of the generator is around 10^171. + + From: M. Luescher, "A portable high-quality random number generator + for lattice field theory calculations", Computer Physics + Communications, 79 (1994) 100-110. + + Available on the net as hep-lat/9309020 at http://xxx.lanl.gov/ + + See also, + + F. James, "RANLUX: A Fortran implementation of the high-quality + pseudo-random number generator of Luscher", Computer Physics + Communications, 79 (1994) 111-114 + + Kenneth G. Hamilton, F. James, "Acceleration of RANLUX", Computer + Physics Communications, 101 (1997) 241-248 + + Kenneth G. Hamilton, "Assembler RANLUX for PCs", Computer Physics + Communications, 101 (1997) 249-253 */ + +static inline unsigned long int ranlux_get (void *vstate); +static double ranlux_get_double (void *vstate); +static void ranlux_set_lux (void *state, unsigned long int s, unsigned int luxury); +static void ranlux_set (void *state, unsigned long int s); +static void ranlux389_set (void *state, unsigned long int s); + +static const unsigned long int mask_lo = 0x00ffffffUL; /* 2^24 - 1 */ +static const unsigned long int mask_hi = ~0x00ffffffUL; +static const unsigned long int two24 = 16777216; /* 2^24 */ + +typedef struct + { + unsigned int i; + unsigned int j; + unsigned int n; + unsigned int skip; + unsigned int carry; + unsigned long int u[24]; + } +ranlux_state_t; + +static inline unsigned long int increment_state (ranlux_state_t * state); + +static inline unsigned long int +increment_state (ranlux_state_t * state) +{ + unsigned int i = state->i; + unsigned int j = state->j; + long int delta = state->u[j] - state->u[i] - state->carry; + + if (delta & mask_hi) + { + state->carry = 1; + delta &= mask_lo; + } + else + { + state->carry = 0; + } + + state->u[i] = delta; + + if (i == 0) + { + i = 23; + } + else + { + i--; + } + + state->i = i; + + if (j == 0) + { + j = 23; + } + else + { + j--; + } + + state->j = j; + + return delta; +} + +static inline unsigned long int +ranlux_get (void *vstate) +{ + ranlux_state_t *state = (ranlux_state_t *) vstate; + const unsigned int skip = state->skip; + unsigned long int r = increment_state (state); + + state->n++; + + if (state->n == 24) + { + unsigned int i; + state->n = 0; + for (i = 0; i < skip; i++) + increment_state (state); + } + + return r; +} + +static double +ranlux_get_double (void *vstate) +{ + return ranlux_get (vstate) / 16777216.0; +} + +static void +ranlux_set_lux (void *vstate, unsigned long int s, unsigned int luxury) +{ + ranlux_state_t *state = (ranlux_state_t *) vstate; + int i; + + long int seed; + + if (s == 0) + s = 314159265; /* default seed is 314159265 */ + + seed = s; + + /* This is the initialization algorithm of F. James, widely in use + for RANLUX. */ + + for (i = 0; i < 24; i++) + { + unsigned long int k = seed / 53668; + seed = 40014 * (seed - k * 53668) - k * 12211; + if (seed < 0) + { + seed += 2147483563; + } + state->u[i] = seed % two24; + } + + state->i = 23; + state->j = 9; + state->n = 0; + state->skip = luxury - 24; + + if (state->u[23] & mask_hi) + { + state->carry = 1; + } + else + { + state->carry = 0; + } +} + +static void +ranlux_set (void *vstate, unsigned long int s) +{ + ranlux_set_lux (vstate, s, 223); +} + +static void +ranlux389_set (void *vstate, unsigned long int s) +{ + ranlux_set_lux (vstate, s, 389); +} + + +static const gsl_rng_type ranlux_type = +{"ranlux", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlux_state_t), + &ranlux_set, + &ranlux_get, + &ranlux_get_double}; + +static const gsl_rng_type ranlux389_type = +{"ranlux389", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlux_state_t), + &ranlux389_set, + &ranlux_get, + &ranlux_get_double}; + +const gsl_rng_type *gsl_rng_ranlux = &ranlux_type; +const gsl_rng_type *gsl_rng_ranlux389 = &ranlux389_type; diff --git a/software/gsl-1.15/rng/ranlxd.c b/software/gsl-1.15/rng/ranlxd.c new file mode 100644 index 000000000..af01f6fe0 --- /dev/null +++ b/software/gsl-1.15/rng/ranlxd.c @@ -0,0 +1,249 @@ +/* rng/ranlxd.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is an implementation of Martin Luescher's second generation + double-precision (48-bit) version of the RANLUX generator. + + Thanks to Martin Luescher for providing information on this + generator. + +*/ + +static inline unsigned long int ranlxd_get (void *vstate); +static double ranlxd_get_double (void *vstate); +static void ranlxd_set_lux (void *state, unsigned long int s, unsigned int luxury); +static void ranlxd1_set (void *state, unsigned long int s); +static void ranlxd2_set (void *state, unsigned long int s); + +static const int next[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0}; + +static const double one_bit = 1.0 / 281474976710656.0; /* 1/2^48 */ + +#define RANLUX_STEP(x1,x2,i1,i2,i3) \ + x1=xdbl[i1] - xdbl[i2]; \ + if (x2 < 0) \ + { \ + x1-=one_bit; \ + x2+=1; \ + } \ + xdbl[i3]=x2 + +typedef struct + { + double xdbl[12]; + double carry; + unsigned int ir; + unsigned int jr; + unsigned int ir_old; + unsigned int pr; + } +ranlxd_state_t; + +static inline void increment_state (ranlxd_state_t * state); + +static inline void +increment_state (ranlxd_state_t * state) +{ + int k, kmax; + double y1, y2, y3; + + double *xdbl = state->xdbl; + double carry = state->carry; + unsigned int ir = state->ir; + unsigned int jr = state->jr; + + for (k = 0; ir > 0; ++k) + { + y1 = xdbl[jr] - xdbl[ir]; + y2 = y1 - carry; + if (y2 < 0) + { + carry = one_bit; + y2 += 1; + } + else + { + carry = 0; + } + xdbl[ir] = y2; + ir = next[ir]; + jr = next[jr]; + } + + kmax = state->pr - 12; + + for (; k <= kmax; k += 12) + { + y1 = xdbl[7] - xdbl[0]; + y1 -= carry; + + RANLUX_STEP (y2, y1, 8, 1, 0); + RANLUX_STEP (y3, y2, 9, 2, 1); + RANLUX_STEP (y1, y3, 10, 3, 2); + RANLUX_STEP (y2, y1, 11, 4, 3); + RANLUX_STEP (y3, y2, 0, 5, 4); + RANLUX_STEP (y1, y3, 1, 6, 5); + RANLUX_STEP (y2, y1, 2, 7, 6); + RANLUX_STEP (y3, y2, 3, 8, 7); + RANLUX_STEP (y1, y3, 4, 9, 8); + RANLUX_STEP (y2, y1, 5, 10, 9); + RANLUX_STEP (y3, y2, 6, 11, 10); + + if (y3 < 0) + { + carry = one_bit; + y3 += 1; + } + else + { + carry = 0; + } + xdbl[11] = y3; + } + + kmax = state->pr; + + for (; k < kmax; ++k) + { + y1 = xdbl[jr] - xdbl[ir]; + y2 = y1 - carry; + if (y2 < 0) + { + carry = one_bit; + y2 += 1; + } + else + { + carry = 0; + } + xdbl[ir] = y2; + ir = next[ir]; + jr = next[jr]; + } + state->ir = ir; + state->ir_old = ir; + state->jr = jr; + state->carry = carry; +} + +static inline unsigned long int +ranlxd_get (void *vstate) +{ + return ranlxd_get_double (vstate) * 4294967296.0; /* 2^32 */ +} + +static double +ranlxd_get_double (void *vstate) +{ + ranlxd_state_t *state = (ranlxd_state_t *) vstate; + + int ir = state->ir; + + state->ir = next[ir]; + + if (state->ir == state->ir_old) + increment_state (state); + + return state->xdbl[state->ir]; +} + +static void +ranlxd_set_lux (void *vstate, unsigned long int s, unsigned int luxury) +{ + ranlxd_state_t *state = (ranlxd_state_t *) vstate; + + int ibit, jbit, i, k, l, xbit[31]; + double x, y; + + long int seed; + + if (s == 0) + s = 1; /* default seed is 1 */ + + seed = s; + + i = seed & 0xFFFFFFFFUL; + + for (k = 0; k < 31; ++k) + { + xbit[k] = i % 2; + i /= 2; + } + + ibit = 0; + jbit = 18; + + for (k = 0; k < 12; ++k) + { + x = 0; + + for (l = 1; l <= 48; ++l) + { + y = (double) ((xbit[ibit] + 1) % 2); + x += x + y; + xbit[ibit] = (xbit[ibit] + xbit[jbit]) % 2; + ibit = (ibit + 1) % 31; + jbit = (jbit + 1) % 31; + } + state->xdbl[k] = one_bit * x; + } + + state->carry = 0; + state->ir = 11; + state->jr = 7; + state->ir_old = 0; + state->pr = luxury; +} + +static void +ranlxd1_set (void *vstate, unsigned long int s) +{ + ranlxd_set_lux (vstate, s, 202); +} + +static void +ranlxd2_set (void *vstate, unsigned long int s) +{ + ranlxd_set_lux (vstate, s, 397); +} + +static const gsl_rng_type ranlxd1_type = +{"ranlxd1", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlxd_state_t), + &ranlxd1_set, + &ranlxd_get, + &ranlxd_get_double}; + +static const gsl_rng_type ranlxd2_type = +{"ranlxd2", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlxd_state_t), + &ranlxd2_set, + &ranlxd_get, + &ranlxd_get_double}; + +const gsl_rng_type *gsl_rng_ranlxd1 = &ranlxd1_type; +const gsl_rng_type *gsl_rng_ranlxd2 = &ranlxd2_type; diff --git a/software/gsl-1.15/rng/ranlxs.c b/software/gsl-1.15/rng/ranlxs.c new file mode 100644 index 000000000..a88ce7728 --- /dev/null +++ b/software/gsl-1.15/rng/ranlxs.c @@ -0,0 +1,302 @@ +/* rng/ranlxs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is an implementation of M. Luescher's second generation + version of the RANLUX generator. + + Thanks to Martin Luescher for providing information on this + generator. + + */ + +static unsigned long int ranlxs_get (void *vstate); +static inline double ranlxs_get_double (void *vstate); +static void ranlxs_set_lux (void *state, unsigned long int s, unsigned int luxury); +static void ranlxs0_set (void *state, unsigned long int s); +static void ranlxs1_set (void *state, unsigned long int s); +static void ranlxs2_set (void *state, unsigned long int s); + +static const int next[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0}; +static const int snext[24] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0}; + +static const double sbase = 16777216.0; /* 2^24 */ +static const double sone_bit = 1.0 / 16777216.0; /* 1/2^24 */ +static const double one_bit = 1.0 / 281474976710656.0; /* 1/2^48 */ + +static const double shift = 268435456.0; /* 2^28 */ + +#define RANLUX_STEP(x1,x2,i1,i2,i3) \ + x1=xdbl[i1] - xdbl[i2]; \ + if (x2 < 0) \ + { \ + x1-=one_bit; \ + x2+=1; \ + } \ + xdbl[i3]=x2 + +typedef struct + { + double xdbl[12], ydbl[12]; /* doubles first so they are 8-byte aligned */ + double carry; + float xflt[24]; + unsigned int ir; + unsigned int jr; + unsigned int is; + unsigned int is_old; + unsigned int pr; + } +ranlxs_state_t; + +static void increment_state (ranlxs_state_t * state); + +static void +increment_state (ranlxs_state_t * state) +{ + int k, kmax, m; + double x, y1, y2, y3; + + float *xflt = state->xflt; + double *xdbl = state->xdbl; + double *ydbl = state->ydbl; + double carry = state->carry; + unsigned int ir = state->ir; + unsigned int jr = state->jr; + + for (k = 0; ir > 0; ++k) + { + y1 = xdbl[jr] - xdbl[ir]; + y2 = y1 - carry; + if (y2 < 0) + { + carry = one_bit; + y2 += 1; + } + else + { + carry = 0; + } + xdbl[ir] = y2; + ir = next[ir]; + jr = next[jr]; + } + + kmax = state->pr - 12; + + for (; k <= kmax; k += 12) + { + y1 = xdbl[7] - xdbl[0]; + y1 -= carry; + + RANLUX_STEP (y2, y1, 8, 1, 0); + RANLUX_STEP (y3, y2, 9, 2, 1); + RANLUX_STEP (y1, y3, 10, 3, 2); + RANLUX_STEP (y2, y1, 11, 4, 3); + RANLUX_STEP (y3, y2, 0, 5, 4); + RANLUX_STEP (y1, y3, 1, 6, 5); + RANLUX_STEP (y2, y1, 2, 7, 6); + RANLUX_STEP (y3, y2, 3, 8, 7); + RANLUX_STEP (y1, y3, 4, 9, 8); + RANLUX_STEP (y2, y1, 5, 10, 9); + RANLUX_STEP (y3, y2, 6, 11, 10); + + if (y3 < 0) + { + carry = one_bit; + y3 += 1; + } + else + { + carry = 0; + } + xdbl[11] = y3; + } + + kmax = state->pr; + + for (; k < kmax; ++k) + { + y1 = xdbl[jr] - xdbl[ir]; + y2 = y1 - carry; + if (y2 < 0) + { + carry = one_bit; + y2 += 1; + } + else + { + carry = 0; + } + xdbl[ir] = y2; + ydbl[ir] = y2 + shift; + ir = next[ir]; + jr = next[jr]; + } + + ydbl[ir] = xdbl[ir] + shift; + + for (k = next[ir]; k > 0;) + { + ydbl[k] = xdbl[k] + shift; + k = next[k]; + } + + for (k = 0, m = 0; k < 12; ++k) + { + x = xdbl[k]; + y2 = ydbl[k] - shift; + if (y2 > x) + y2 -= sone_bit; + y1 = (x - y2) * sbase; + + xflt[m++] = (float) y1; + xflt[m++] = (float) y2; + } + + state->ir = ir; + state->is = 2 * ir; + state->is_old = 2 * ir; + state->jr = jr; + state->carry = carry; +} + + +static inline double +ranlxs_get_double (void *vstate) +{ + ranlxs_state_t *state = (ranlxs_state_t *) vstate; + + const unsigned int is = snext[state->is]; + + state->is = is; + + if (is == state->is_old) + increment_state (state); + + return state->xflt[state->is]; +} + +static unsigned long int +ranlxs_get (void *vstate) +{ + return ranlxs_get_double (vstate) * 16777216.0; /* 2^24 */ +} + +static void +ranlxs_set_lux (void *vstate, unsigned long int s, unsigned int luxury) +{ + ranlxs_state_t *state = (ranlxs_state_t *) vstate; + + int ibit, jbit, i, k, m, xbit[31]; + double x, y; + + long int seed; + + if (s == 0) + s = 1; /* default seed is 1 */ + + seed = s; + + i = seed & 0x7FFFFFFFUL; /* Allowed seeds for ranlxs are 0 .. 2^31-1 */ + + for (k = 0; k < 31; ++k) + { + xbit[k] = i % 2; + i /= 2; + } + + ibit = 0; + jbit = 18; + + for (k = 0; k < 12; ++k) + { + x = 0; + + for (m = 1; m <= 48; ++m) + { + y = (double) xbit[ibit]; + x += x + y; + xbit[ibit] = (xbit[ibit] + xbit[jbit]) % 2; + ibit = (ibit + 1) % 31; + jbit = (jbit + 1) % 31; + } + state->xdbl[k] = one_bit * x; + } + + state->carry = 0; + state->ir = 0; + state->jr = 7; + state->is = 23; + state->is_old = 0; + state->pr = luxury; +} + +static void +ranlxs0_set (void *vstate, unsigned long int s) +{ + ranlxs_set_lux (vstate, s, 109); +} + +void +ranlxs1_set (void *vstate, unsigned long int s) +{ + ranlxs_set_lux (vstate, s, 202); +} + +static void +ranlxs2_set (void *vstate, unsigned long int s) +{ + ranlxs_set_lux (vstate, s, 397); +} + + +static const gsl_rng_type ranlxs0_type = +{"ranlxs0", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlxs_state_t), + &ranlxs0_set, + &ranlxs_get, + &ranlxs_get_double}; + +static const gsl_rng_type ranlxs1_type = +{"ranlxs1", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlxs_state_t), + &ranlxs1_set, + &ranlxs_get, + &ranlxs_get_double}; + +static const gsl_rng_type ranlxs2_type = +{"ranlxs2", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranlxs_state_t), + &ranlxs2_set, + &ranlxs_get, + &ranlxs_get_double}; + +const gsl_rng_type *gsl_rng_ranlxs0 = &ranlxs0_type; +const gsl_rng_type *gsl_rng_ranlxs1 = &ranlxs1_type; +const gsl_rng_type *gsl_rng_ranlxs2 = &ranlxs2_type; diff --git a/software/gsl-1.15/rng/ranmar.c b/software/gsl-1.15/rng/ranmar.c new file mode 100644 index 000000000..61a07d89d --- /dev/null +++ b/software/gsl-1.15/rng/ranmar.c @@ -0,0 +1,173 @@ +/* rng/ranmar.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is the RANMAR lagged fibonacci generator of Marsaglia, Zaman + and Tsang. The sequence is a series of 24-bit integers, x_n, + + x_n = (y_n - c_n + 2^24) mod 2^24 + + where, + + y_n = (y_{n-97) - y_{n-33} + 2^24) mod 2^24 + c_n = (c_{n-1} - 7654321 + 2^24 - 3) mod (2^24 - 3) + + The period of this generator is 2^144. + + The generator provides about 900 million different subsequences + each of length O(10^30). Thus each seed up to 900,000,000 gives an + independent sequence. + + Although it was good in its day this generator now has known + statistical defects and has been superseded by RANLUX. + + From: F. James, "A Review of Pseudorandom number generators", + Computer Physics Communications 60, 329 (1990). + + G. Marsaglia, A. Zaman and W.W. Tsang, Stat. Prob. Lett. 9, 35 (1990) */ + +static inline unsigned long int ranmar_get (void *vstate); +static double ranmar_get_double (void *vstate); +static void ranmar_set (void *state, unsigned long int s); + +static const unsigned long int two24 = 16777216; /* 2^24 */ + +typedef struct + { + unsigned int i; + unsigned int j; + long int carry; + unsigned long int u[97]; + } +ranmar_state_t; + +static inline unsigned long int +ranmar_get (void *vstate) +{ + ranmar_state_t *state = (ranmar_state_t *) vstate; + + unsigned int i = state->i; + unsigned int j = state->j; + long int carry = state->carry; + + long int delta = state->u[i] - state->u[j]; + + if (delta < 0) + delta += two24 ; + + state->u[i] = delta; + + if (i == 0) + { + i = 96; + } + else + { + i--; + } + + state->i = i; + + if (j == 0) + { + j = 96; + } + else + { + j--; + } + + state->j = j; + + carry += - 7654321 ; + + if (carry < 0) + carry += two24 - 3; + + state->carry = carry ; + + delta += - carry ; + + if (delta < 0) + delta += two24 ; + + return delta; +} + +static double +ranmar_get_double (void *vstate) +{ + return ranmar_get (vstate) / 16777216.0 ; +} + +static void +ranmar_set (void *vstate, unsigned long int s) +{ + ranmar_state_t *state = (ranmar_state_t *) vstate; + + unsigned long int ij = s / 30082 ; + unsigned long int kl = s % 30082 ; + + int i = (ij / 177) % 177 + 2 ; + int j = (ij % 177) + 2 ; + int k = (kl / 169) % 178 + 1 ; + int l = (kl % 169) ; + + int a, b; + + for (a = 0; a < 97; a++) + { + unsigned long int sum = 0 ; + unsigned long int t = two24 ; + + for (b = 0; b < 24; b++) + { + unsigned long int m = (((i * j) % 179) * k) % 179 ; + i = j ; + j = k ; + k = m ; + l = (53 * l + 1) % 169 ; + t >>= 1 ; + + if ((l * m) % 64 >= 32) + sum += t ; + } + + state->u[a] = sum ; + } + + state->i = 96; + state->j = 32; + state->carry = 362436 ; + +} + +static const gsl_rng_type ranmar_type = +{"ranmar", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (ranmar_state_t), + &ranmar_set, + &ranmar_get, + &ranmar_get_double}; + +const gsl_rng_type *gsl_rng_ranmar = &ranmar_type; diff --git a/software/gsl-1.15/rng/rng.c b/software/gsl-1.15/rng/rng.c new file mode 100644 index 000000000..87ea74c13 --- /dev/null +++ b/software/gsl-1.15/rng/rng.c @@ -0,0 +1,154 @@ +/* rng/rng.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +gsl_rng * +gsl_rng_alloc (const gsl_rng_type * T) +{ + + gsl_rng *r = (gsl_rng *) malloc (sizeof (gsl_rng)); + + if (r == 0) + { + GSL_ERROR_VAL ("failed to allocate space for rng struct", + GSL_ENOMEM, 0); + }; + + r->state = malloc (T->size); + + if (r->state == 0) + { + free (r); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for rng state", + GSL_ENOMEM, 0); + }; + + r->type = T; + + gsl_rng_set (r, gsl_rng_default_seed); /* seed the generator */ + + return r; +} + +int +gsl_rng_memcpy (gsl_rng * dest, const gsl_rng * src) +{ + if (dest->type != src->type) + { + GSL_ERROR ("generators must be of the same type", GSL_EINVAL); + } + + memcpy (dest->state, src->state, src->type->size); + + return GSL_SUCCESS; +} + +gsl_rng * +gsl_rng_clone (const gsl_rng * q) +{ + gsl_rng *r = (gsl_rng *) malloc (sizeof (gsl_rng)); + + if (r == 0) + { + GSL_ERROR_VAL ("failed to allocate space for rng struct", + GSL_ENOMEM, 0); + }; + + r->state = malloc (q->type->size); + + if (r->state == 0) + { + free (r); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for rng state", + GSL_ENOMEM, 0); + }; + + r->type = q->type; + + memcpy (r->state, q->state, q->type->size); + + return r; +} + +void +gsl_rng_set (const gsl_rng * r, unsigned long int seed) +{ + (r->type->set) (r->state, seed); +} + +unsigned long int +gsl_rng_max (const gsl_rng * r) +{ + return r->type->max; +} + +unsigned long int +gsl_rng_min (const gsl_rng * r) +{ + return r->type->min; +} + +const char * +gsl_rng_name (const gsl_rng * r) +{ + return r->type->name; +} + +size_t +gsl_rng_size (const gsl_rng * r) +{ + return r->type->size; +} + +void * +gsl_rng_state (const gsl_rng * r) +{ + return r->state; +} + +void +gsl_rng_print_state (const gsl_rng * r) +{ + size_t i; + unsigned char *p = (unsigned char *) (r->state); + const size_t n = r->type->size; + + for (i = 0; i < n; i++) + { + /* FIXME: we're assuming that a char is 8 bits */ + printf ("%.2x", *(p + i)); + } + +} + +void +gsl_rng_free (gsl_rng * r) +{ + RETURN_IF_NULL (r); + free (r->state); + free (r); +} diff --git a/software/gsl-1.15/rng/schrage.c b/software/gsl-1.15/rng/schrage.c new file mode 100644 index 000000000..bfc685b5f --- /dev/null +++ b/software/gsl-1.15/rng/schrage.c @@ -0,0 +1,51 @@ +/* rng/schrage.c + * Copyright (C) 2003 Carlo Perassi and Heiko Bauke. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static inline unsigned long int +schrage (unsigned long int a, unsigned long int b, unsigned long int m) +{ + /* This is a modified version of Schrage's method. It ensures that no + * overflow or underflow occurs even if a=ceil(sqrt(m)). Usual + * Schrage's method works only until a=floor(sqrt(m)). + */ + unsigned long int q, t; + if (a == 0UL) + return 0UL; + q = m / a; + t = 2 * m - (m % a) * (b / q); + if (t >= m) + t -= m; + t += a * (b % q); + return (t >= m) ? (t - m) : t; +} + +static inline unsigned long int +schrage_mult (unsigned long int a, unsigned long int b, + unsigned long int m, + unsigned long int sqrtm) +{ + /* To multiply a and b use Schrage's method 3 times. + * represent a in base ceil(sqrt(m)) a = a1*ceil(sqrt(m)) + a0 + * a*b = (a1*ceil(sqrt(m)) + a0)*b = a1*ceil(sqrt(m))*b + a0*b + */ + unsigned long int t0 = schrage (sqrtm, b, m); + unsigned long int t1 = schrage (a / sqrtm, t0, m); + unsigned long int t2 = schrage (a % sqrtm, b, m); + unsigned long int t = t1 + t2; + return (t >= m) ? (t - m) : t; +} diff --git a/software/gsl-1.15/rng/slatec.c b/software/gsl-1.15/rng/slatec.c new file mode 100644 index 000000000..53e78f79a --- /dev/null +++ b/software/gsl-1.15/rng/slatec.c @@ -0,0 +1,205 @@ +/* rng/slatec.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** + +* ====================================================================== +* NIST Guide to Available Math Software. +* Source for module RAND from package CMLIB. +* Retrieved from TIBER on Fri Oct 11 11:43:42 1996. +* ====================================================================== + FUNCTION RAND(R) +C***BEGIN PROLOGUE RAND +C***DATE WRITTEN 770401 (YYMMDD) +C***REVISION DATE 820801 (YYMMDD) +C***CATEGORY NO. L6A21 +C***KEYWORDS RANDOM NUMBER,SPECIAL FUNCTION,UNIFORM +C***AUTHOR FULLERTON, W., (LANL) +C***PURPOSE Generates a uniformly distributed random number. +C***DESCRIPTION +C +C This pseudo-random number generator is portable among a wide +C variety of computers. RAND(R) undoubtedly is not as good as many +C readily available installation dependent versions, and so this +C routine is not recommended for widespread usage. Its redeeming +C feature is that the exact same random numbers (to within final round- +C off error) can be generated from machine to machine. Thus, programs +C that make use of random numbers can be easily transported to and +C checked in a new environment. +C The random numbers are generated by the linear congruential +C method described, e.g., by Knuth in Seminumerical Methods (p.9), +C Addison-Wesley, 1969. Given the I-th number of a pseudo-random +C sequence, the I+1 -st number is generated from +C X(I+1) = (A*X(I) + C) MOD M, +C where here M = 2**22 = 4194304, C = 1731 and several suitable values +C of the multiplier A are discussed below. Both the multiplier A and +C random number X are represented in double precision as two 11-bit +C words. The constants are chosen so that the period is the maximum +C possible, 4194304. +C In order that the same numbers be generated from machine to +C machine, it is necessary that 23-bit integers be reducible modulo +C 2**11 exactly, that 23-bit integers be added exactly, and that 11-bit +C integers be multiplied exactly. Furthermore, if the restart option +C is used (where R is between 0 and 1), then the product R*2**22 = +C R*4194304 must be correct to the nearest integer. +C The first four random numbers should be .0004127026, +C .6750836372, .1614754200, and .9086198807. The tenth random number +C is .5527787209, and the hundredth is .3600893021 . The thousandth +C number should be .2176990509 . +C In order to generate several effectively independent sequences +C with the same generator, it is necessary to know the random number +C for several widely spaced calls. The I-th random number times 2**22, +C where I=K*P/8 and P is the period of the sequence (P = 2**22), is +C still of the form L*P/8. In particular we find the I-th random +C number multiplied by 2**22 is given by +C I = 0 1*P/8 2*P/8 3*P/8 4*P/8 5*P/8 6*P/8 7*P/8 8*P/8 +C RAND= 0 5*P/8 2*P/8 7*P/8 4*P/8 1*P/8 6*P/8 3*P/8 0 +C Thus the 4*P/8 = 2097152 random number is 2097152/2**22. +C Several multipliers have been subjected to the spectral test +C (see Knuth, p. 82). Four suitable multipliers roughly in order of +C goodness according to the spectral test are +C 3146757 = 1536*2048 + 1029 = 2**21 + 2**20 + 2**10 + 5 +C 2098181 = 1024*2048 + 1029 = 2**21 + 2**10 + 5 +C 3146245 = 1536*2048 + 517 = 2**21 + 2**20 + 2**9 + 5 +C 2776669 = 1355*2048 + 1629 = 5**9 + 7**7 + 1 +C +C In the table below LOG10(NU(I)) gives roughly the number of +C random decimal digits in the random numbers considered I at a time. +C C is the primary measure of goodness. In both cases bigger is better. +C +C LOG10 NU(I) C(I) +C A I=2 I=3 I=4 I=5 I=2 I=3 I=4 I=5 +C +C 3146757 3.3 2.0 1.6 1.3 3.1 1.3 4.6 2.6 +C 2098181 3.3 2.0 1.6 1.2 3.2 1.3 4.6 1.7 +C 3146245 3.3 2.2 1.5 1.1 3.2 4.2 1.1 0.4 +C 2776669 3.3 2.1 1.6 1.3 2.5 2.0 1.9 2.6 +C Best +C Possible 3.3 2.3 1.7 1.4 3.6 5.9 9.7 14.9 +C +C Input Argument -- +C R If R=0., the next random number of the sequence is generated. +C If R .LT. 0., the last generated number will be returned for +C possible use in a restart procedure. +C If R .GT. 0., the sequence of random numbers will start with +C the seed R mod 1. This seed is also returned as the value of +C RAND provided the arithmetic is done exactly. +C +C Output Value -- +C RAND a pseudo-random number between 0. and 1. +C***REFERENCES (NONE) +C***ROUTINES CALLED (NONE) +C***END PROLOGUE RAND + DATA IA1, IA0, IA1MA0 /1536, 1029, 507/ + DATA IC /1731/ + DATA IX1, IX0 /0, 0/ +C***FIRST EXECUTABLE STATEMENT RAND + IF (R.LT.0.) GO TO 10 + IF (R.GT.0.) GO TO 20 +C +C A*X = 2**22*IA1*IX1 + 2**11*(IA1*IX1 + (IA1-IA0)*(IX0-IX1) +C + IA0*IX0) + IA0*IX0 +C + IY0 = IA0*IX0 + IY1 = IA1*IX1 + IA1MA0*(IX0-IX1) + IY0 + IY0 = IY0 + IC + IX0 = MOD (IY0, 2048) + IY1 = IY1 + (IY0-IX0)/2048 + IX1 = MOD (IY1, 2048) +C + 10 RAND = IX1*2048 + IX0 + RAND = RAND / 4194304. + RETURN +C + 20 IX1 = AMOD(R,1.)*4194304. + 0.5 + IX0 = MOD (IX1, 2048) + IX1 = (IX1-IX0)/2048 + GO TO 10 +C + END + + **/ + +#include +#include +#include + +static inline unsigned long int slatec_get (void *vstate); +static double slatec_get_double (void *vstate); +static void slatec_set (void *state, unsigned long int s); + +typedef struct + { + long int x0, x1; + } +slatec_state_t; + +static const long P = 4194304; +static const long a1 = 1536; +static const long a0 = 1029; +static const long a1ma0 = 507; +static const long c = 1731; + +static inline unsigned long int +slatec_get (void *vstate) +{ + long y0, y1; + slatec_state_t *state = (slatec_state_t *) vstate; + + y0 = a0 * state->x0; + y1 = a1 * state->x1 + a1ma0 * (state->x0 - state->x1) + y0; + y0 = y0 + c; + state->x0 = y0 % 2048; + y1 = y1 + (y0 - state->x0) / 2048; + state->x1 = y1 % 2048; + + return state->x1 * 2048 + state->x0; +} + +static double +slatec_get_double (void *vstate) +{ + return slatec_get (vstate) / 4194304.0 ; +} + +static void +slatec_set (void *vstate, unsigned long int s) +{ + slatec_state_t *state = (slatec_state_t *) vstate; + + /* Only eight seeds are permitted. This is pretty limiting, but + at least we are guaranteed that the eight sequences are different */ + + s = s % 8; + s *= P / 8; + + state->x0 = s % 2048; + state->x1 = (s - state->x0) / 2048; +} + +static const gsl_rng_type slatec_type = +{"slatec", /* name */ + 4194303, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (slatec_state_t), + &slatec_set, + &slatec_get, + &slatec_get_double}; + +const gsl_rng_type *gsl_rng_slatec = &slatec_type; diff --git a/software/gsl-1.15/rng/taus.c b/software/gsl-1.15/rng/taus.c new file mode 100644 index 000000000..290c00d94 --- /dev/null +++ b/software/gsl-1.15/rng/taus.c @@ -0,0 +1,184 @@ +/* rng/taus.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is a maximally equidistributed combined Tausworthe + generator. The sequence is, + + x_n = (s1_n ^ s2_n ^ s3_n) + + s1_{n+1} = (((s1_n & 4294967294) <<12) ^ (((s1_n <<13) ^ s1_n) >>19)) + s2_{n+1} = (((s2_n & 4294967288) << 4) ^ (((s2_n << 2) ^ s2_n) >>25)) + s3_{n+1} = (((s3_n & 4294967280) <<17) ^ (((s3_n << 3) ^ s3_n) >>11)) + + computed modulo 2^32. In the three formulas above '^' means + exclusive-or (C-notation), not exponentiation. Note that the + algorithm relies on the properties of 32-bit unsigned integers (it + is formally defined on bit-vectors of length 32). I have added a + bitmask to make it work on 64 bit machines. + + We initialize the generator with s1_1 .. s3_1 = s_n MOD m, where + s_n = (69069 * s_{n-1}) mod 2^32, and s_0 = s is the user-supplied + seed. + + The theoretical value of x_{10007} is 2733957125. The subscript + 10007 means (1) seed the generator with s=1 (2) do six warm-up + iterations, (3) then do 10000 actual iterations. + + The period of this generator is about 2^88. + + From: P. L'Ecuyer, "Maximally Equidistributed Combined Tausworthe + Generators", Mathematics of Computation, 65, 213 (1996), 203--213. + + This is available on the net from L'Ecuyer's home page, + + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps + ftp://ftp.iro.umontreal.ca/pub/simulation/lecuyer/papers/tausme.ps + + Update: April 2002 + + There is an erratum in the paper "Tables of Maximally + Equidistributed Combined LFSR Generators", Mathematics of + Computation, 68, 225 (1999), 261--269: + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme2.ps + + ... the k_j most significant bits of z_j must be non- + zero, for each j. (Note: this restriction also applies to the + computer code given in [4], but was mistakenly not mentioned in + that paper.) + + This affects the seeding procedure by imposing the requirement + s1 > 1, s2 > 7, s3 > 15. + + The generator taus2 has been added to satisfy this requirement. + The original taus generator is unchanged. + + Update: November 2002 + + There was a bug in the correction to the seeding procedure for s2. + It affected the following seeds 254679140 1264751179 1519430319 + 2274823218 2529502358 3284895257 3539574397 (s2 < 8). + +*/ + +static inline unsigned long int taus_get (void *vstate); +static double taus_get_double (void *vstate); +static void taus_set (void *state, unsigned long int s); + +typedef struct + { + unsigned long int s1, s2, s3; + } +taus_state_t; + +static inline unsigned long +taus_get (void *vstate) +{ + taus_state_t *state = (taus_state_t *) vstate; + +#define MASK 0xffffffffUL +#define TAUSWORTHE(s,a,b,c,d) (((s &c) <>b) + + state->s1 = TAUSWORTHE (state->s1, 13, 19, 4294967294UL, 12); + state->s2 = TAUSWORTHE (state->s2, 2, 25, 4294967288UL, 4); + state->s3 = TAUSWORTHE (state->s3, 3, 11, 4294967280UL, 17); + + return (state->s1 ^ state->s2 ^ state->s3); +} + +static double +taus_get_double (void *vstate) +{ + return taus_get (vstate) / 4294967296.0 ; +} + +static void +taus_set (void *vstate, unsigned long int s) +{ + taus_state_t *state = (taus_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + state->s1 = LCG (s); + state->s2 = LCG (state->s1); + state->s3 = LCG (state->s2); + + /* "warm it up" */ + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + return; +} + +static void +taus2_set (void *vstate, unsigned long int s) +{ + taus_state_t *state = (taus_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + +#define LCG(n) ((69069 * n) & 0xffffffffUL) + state->s1 = LCG (s); + if (state->s1 < 2) state->s1 += 2UL; + state->s2 = LCG (state->s1); + if (state->s2 < 8) state->s2 += 8UL; + state->s3 = LCG (state->s2); + if (state->s3 < 16) state->s3 += 16UL; + + /* "warm it up" */ + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + taus_get (state); + return; +} + + +static const gsl_rng_type taus_type = +{"taus", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (taus_state_t), + &taus_set, + &taus_get, + &taus_get_double}; + +const gsl_rng_type *gsl_rng_taus = &taus_type; + +static const gsl_rng_type taus2_type = +{"taus2", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (taus_state_t), + &taus2_set, + &taus_get, + &taus_get_double}; + +const gsl_rng_type *gsl_rng_taus2 = &taus2_type; diff --git a/software/gsl-1.15/rng/taus113.c b/software/gsl-1.15/rng/taus113.c new file mode 100644 index 000000000..04da6a893 --- /dev/null +++ b/software/gsl-1.15/rng/taus113.c @@ -0,0 +1,168 @@ +/* rng/taus113.c + * Copyright (C) 2002 Atakan Gurkan + * Based on the file taus.c which has the notice + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* This is a maximally equidistributed combined, collision free + Tausworthe generator, with a period ~2^{113}. The sequence is, + + x_n = (z1_n ^ z2_n ^ z3_n ^ z4_n) + + b = (((z1_n << 6) ^ z1_n) >> 13) + z1_{n+1} = (((z1_n & 4294967294) << 18) ^ b) + b = (((z2_n << 2) ^ z2_n) >> 27) + z2_{n+1} = (((z2_n & 4294967288) << 2) ^ b) + b = (((z3_n << 13) ^ z3_n) >> 21) + z3_{n+1} = (((z3_n & 4294967280) << 7) ^ b) + b = (((z4_n << 3) ^ z4_n) >> 12) + z4_{n+1} = (((z4_n & 4294967168) << 13) ^ b) + + computed modulo 2^32. In the formulas above '^' means exclusive-or + (C-notation), not exponentiation. + The algorithm is for 32-bit integers, hence a bitmask is used to clear + all but least significant 32 bits, after left shifts, to make the code + work on architectures where integers are 64-bit. + + The generator is initialized with + zi = (69069 * z{i+1}) MOD 2^32 where z0 is the seed provided + During initialization a check is done to make sure that the initial seeds + have a required number of their most significant bits set. + After this, the state is passed through the RNG 10 times to ensure the + state satisfies a recurrence relation. + + References: + P. L'Ecuyer, "Tables of Maximally-Equidistributed Combined LFSR Generators", + Mathematics of Computation, 68, 225 (1999), 261--269. + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme2.ps + P. L'Ecuyer, "Maximally Equidistributed Combined Tausworthe Generators", + Mathematics of Computation, 65, 213 (1996), 203--213. + http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps + the online version of the latter contains corrections to the print version. +*/ + +#include +#include +#include + +#define LCG(n) ((69069UL * n) & 0xffffffffUL) +#define MASK 0xffffffffUL + +static inline unsigned long int taus113_get (void *vstate); +static double taus113_get_double (void *vstate); +static void taus113_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int z1, z2, z3, z4; +} +taus113_state_t; + +static inline unsigned long +taus113_get (void *vstate) +{ + taus113_state_t *state = (taus113_state_t *) vstate; + unsigned long b1, b2, b3, b4; + + b1 = ((((state->z1 << 6UL) & MASK) ^ state->z1) >> 13UL); + state->z1 = ((((state->z1 & 4294967294UL) << 18UL) & MASK) ^ b1); + + b2 = ((((state->z2 << 2UL) & MASK) ^ state->z2) >> 27UL); + state->z2 = ((((state->z2 & 4294967288UL) << 2UL) & MASK) ^ b2); + + b3 = ((((state->z3 << 13UL) & MASK) ^ state->z3) >> 21UL); + state->z3 = ((((state->z3 & 4294967280UL) << 7UL) & MASK) ^ b3); + + b4 = ((((state->z4 << 3UL) & MASK) ^ state->z4) >> 12UL); + state->z4 = ((((state->z4 & 4294967168UL) << 13UL) & MASK) ^ b4); + + return (state->z1 ^ state->z2 ^ state->z3 ^ state->z4); + +} + +static double +taus113_get_double (void *vstate) +{ + return taus113_get (vstate) / 4294967296.0; +} + +static void +taus113_set (void *vstate, unsigned long int s) +{ + taus113_state_t *state = (taus113_state_t *) vstate; + + if (!s) + s = 1UL; /* default seed is 1 */ + + state->z1 = LCG (s); + if (state->z1 < 2UL) + state->z1 += 2UL; + state->z2 = LCG (state->z1); + if (state->z2 < 8UL) + state->z2 += 8UL; + state->z3 = LCG (state->z2); + if (state->z3 < 16UL) + state->z3 += 16UL; + state->z4 = LCG (state->z3); + if (state->z4 < 128UL) + state->z4 += 128UL; + + /* Calling RNG ten times to satify recurrence condition */ + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + taus113_get (state); + + return; +} + +static const gsl_rng_type taus113_type = { + "taus113", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (taus113_state_t), + &taus113_set, + &taus113_get, + &taus113_get_double +}; + +const gsl_rng_type *gsl_rng_taus113 = &taus113_type; + + +/* Rules for analytic calculations using GNU Emacs Calc: + (used to find the values for the test program) + + [ LCG(n) := n * 69069 mod (2^32) ] + + [ b1(x) := rsh(xor(lsh(x, 6), x), 13), + q1(x) := xor(lsh(and(x, 4294967294), 18), b1(x)), + b2(x) := rsh(xor(lsh(x, 2), x), 27), + q2(x) := xor(lsh(and(x, 4294967288), 2), b2(x)), + b3(x) := rsh(xor(lsh(x, 13), x), 21), + q3(x) := xor(lsh(and(x, 4294967280), 7), b3(x)), + b4(x) := rsh(xor(lsh(x, 3), x), 12), + q4(x) := xor(lsh(and(x, 4294967168), 13), b4(x)) + ] + + [ S([z1,z2,z3,z4]) := [q1(z1), q2(z2), q3(z3), q4(z4)] ] +*/ diff --git a/software/gsl-1.15/rng/test.c b/software/gsl-1.15/rng/test.c new file mode 100644 index 000000000..053268b36 --- /dev/null +++ b/software/gsl-1.15/rng/test.c @@ -0,0 +1,602 @@ +/* rng/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +void rng_test (const gsl_rng_type * T, unsigned long int seed, unsigned int n, + unsigned long int result); +void rng_float_test (const gsl_rng_type * T); +void generic_rng_test (const gsl_rng_type * T); +void rng_state_test (const gsl_rng_type * T); +void rng_parallel_state_test (const gsl_rng_type * T); +void rng_read_write_test (const gsl_rng_type * T); +int rng_max_test (gsl_rng * r, unsigned long int *kmax, unsigned long int ran_max) ; +int rng_min_test (gsl_rng * r, unsigned long int *kmin, unsigned long int ran_min, unsigned long int ran_max) ; +int rng_sum_test (gsl_rng * r, double *sigma); +int rng_bin_test (gsl_rng * r, double *sigma); + +#define N 10000 +#define N2 200000 + +int +main (void) +{ + const gsl_rng_type ** rngs = gsl_rng_types_setup(); /* get all rng types */ + + const gsl_rng_type ** r ; + + gsl_ieee_env_setup (); + + gsl_rng_env_setup (); + + /* specific tests of known results for 10000 iterations with seed = 1 */ + + rng_test (gsl_rng_rand, 1, 10000, 1910041713); + rng_test (gsl_rng_randu, 1, 10000, 1623524161); + rng_test (gsl_rng_cmrg, 1, 10000, 719452880); + rng_test (gsl_rng_minstd, 1, 10000, 1043618065); + rng_test (gsl_rng_mrg, 1, 10000, 2064828650); + rng_test (gsl_rng_taus, 1, 10000, 2733957125UL); + rng_test (gsl_rng_taus2, 1, 10000, 2733957125UL); + rng_test (gsl_rng_taus113, 1, 1000, 1925420673UL); + rng_test (gsl_rng_transputer, 1, 10000, 1244127297UL); + rng_test (gsl_rng_vax, 1, 10000, 3051034865UL); + + /* Borosh13 test value from PARI: (1812433253^10000)%(2^32) */ + rng_test (gsl_rng_borosh13, 1, 10000, 2513433025UL); + + /* Fishman18 test value from PARI: (62089911^10000)%(2^31-1) */ + rng_test (gsl_rng_fishman18, 1, 10000, 330402013UL); + + /* Fishman2x test value from PARI: + ((48271^10000)%(2^31-1) - (40692^10000)%(2^31-249))%(2^31-1) */ + rng_test (gsl_rng_fishman2x, 1, 10000, 540133597UL); + + /* Knuthran2 test value from PARI: + { xn1=1; xn2=1; for (n=1,10000, + xn = (271828183*xn1 - 314159269*xn2)%(2^31-1); + xn2=xn1; xn1=xn; print(xn); ) } */ + rng_test (gsl_rng_knuthran2, 1, 10000, 1084477620UL); + + /* Knuthran test value taken from p188 in Knuth Vol 2. 3rd Ed */ + rng_test (gsl_rng_knuthran, 310952, 1009 * 2009 + 1, 461390032); + + /* Knuthran improved test value from Knuth's source */ + rng_test (gsl_rng_knuthran2002, 310952, 1, 708622036); + rng_test (gsl_rng_knuthran2002, 310952, 2, 1005450560); + rng_test (gsl_rng_knuthran2002, 310952, 100 * 2009 + 1, 995235265); + rng_test (gsl_rng_knuthran2002, 310952, 1009 * 2009 + 1, 704987132); + + /* Lecuyer21 test value from PARI: (40692^10000)%(2^31-249) */ + rng_test (gsl_rng_lecuyer21, 1, 10000, 2006618587UL); + + /* Waterman14 test value from PARI: (1566083941^10000)%(2^32) */ + rng_test (gsl_rng_waterman14, 1, 10000, 3776680385UL); + + /* specific tests of known results for 10000 iterations with seed = 6 */ + + /* Coveyou test value from PARI: + x=6; for(n=1,10000,x=(x*(x+1))%(2^32);print(x);) */ + + rng_test (gsl_rng_coveyou, 6, 10000, 1416754246UL); + + /* Fishman20 test value from PARI: (6*48271^10000)%(2^31-1) */ + rng_test (gsl_rng_fishman20, 6, 10000, 248127575UL); + + /* FIXME: the ranlux tests below were made by running the fortran code and + getting the expected value from that. An analytic calculation + would be preferable. */ + + rng_test (gsl_rng_ranlux, 314159265, 10000, 12077992); + rng_test (gsl_rng_ranlux389, 314159265, 10000, 165942); + + rng_test (gsl_rng_ranlxs0, 1, 10000, 11904320); + /* 0.709552764892578125 * ldexp(1.0,24) */ + + rng_test (gsl_rng_ranlxs1, 1, 10000, 8734328); + /* 0.520606517791748047 * ldexp(1.0,24) */ + + rng_test (gsl_rng_ranlxs2, 1, 10000, 6843140); + /* 0.407882928848266602 * ldexp(1.0,24) */ + + rng_test (gsl_rng_ranlxd1, 1, 10000, 1998227290UL); + /* 0.465248546261094020 * ldexp(1.0,32) */ + + rng_test (gsl_rng_ranlxd2, 1, 10000, 3949287736UL); + /* 0.919515205581550532 * ldexp(1.0,32) */ + + /* FIXME: the tests below were made by running the original code in + the ../random directory and getting the expected value from + that. An analytic calculation would be preferable. */ + + rng_test (gsl_rng_slatec, 1, 10000, 45776); + rng_test (gsl_rng_uni, 1, 10000, 9214); + rng_test (gsl_rng_uni32, 1, 10000, 1155229825); + rng_test (gsl_rng_zuf, 1, 10000, 3970); + + /* The tests below were made by running the original code and + getting the expected value from that. An analytic calculation + would be preferable. */ + + rng_test (gsl_rng_r250, 1, 10000, 1100653588); + rng_test (gsl_rng_mt19937, 4357, 1000, 1186927261); + rng_test (gsl_rng_mt19937_1999, 4357, 1000, 1030650439); + rng_test (gsl_rng_mt19937_1998, 4357, 1000, 1309179303); + rng_test (gsl_rng_tt800, 0, 10000, 2856609219UL); + + rng_test (gsl_rng_ran0, 0, 10000, 1115320064); + rng_test (gsl_rng_ran1, 0, 10000, 1491066076); + rng_test (gsl_rng_ran2, 0, 10000, 1701364455); + rng_test (gsl_rng_ran3, 0, 10000, 186340785); + + rng_test (gsl_rng_ranmar, 1, 10000, 14428370); + + rng_test (gsl_rng_rand48, 0, 10000, 0xDE095043UL); + rng_test (gsl_rng_rand48, 1, 10000, 0xEDA54977UL); + + rng_test (gsl_rng_random_glibc2, 0, 10000, 1908609430); + rng_test (gsl_rng_random8_glibc2, 0, 10000, 1910041713); + rng_test (gsl_rng_random32_glibc2, 0, 10000, 1587395585); + rng_test (gsl_rng_random64_glibc2, 0, 10000, 52848624); + rng_test (gsl_rng_random128_glibc2, 0, 10000, 1908609430); + rng_test (gsl_rng_random256_glibc2, 0, 10000, 179943260); + + rng_test (gsl_rng_random_bsd, 0, 10000, 1457025928); + rng_test (gsl_rng_random8_bsd, 0, 10000, 1910041713); + rng_test (gsl_rng_random32_bsd, 0, 10000, 1663114331); + rng_test (gsl_rng_random64_bsd, 0, 10000, 864469165); + rng_test (gsl_rng_random128_bsd, 0, 10000, 1457025928); + rng_test (gsl_rng_random256_bsd, 0, 10000, 1216357476); + + rng_test (gsl_rng_random_libc5, 0, 10000, 428084942); + rng_test (gsl_rng_random8_libc5, 0, 10000, 1910041713); + rng_test (gsl_rng_random32_libc5, 0, 10000, 1967452027); + rng_test (gsl_rng_random64_libc5, 0, 10000, 2106639801); + rng_test (gsl_rng_random128_libc5, 0, 10000, 428084942); + rng_test (gsl_rng_random256_libc5, 0, 10000, 116367984); + + rng_test (gsl_rng_ranf, 0, 10000, 2152890433UL); + rng_test (gsl_rng_ranf, 2, 10000, 339327233); + + /* Test constant relationship between int and double functions */ + + for (r = rngs ; *r != 0; r++) + rng_float_test (*r); + + /* Test save/restore functions */ + + for (r = rngs ; *r != 0; r++) + rng_state_test (*r); + + for (r = rngs ; *r != 0; r++) + rng_parallel_state_test (*r); + + for (r = rngs ; *r != 0; r++) + rng_read_write_test (*r); + + /* generic statistical tests (these are just to make sure that we + don't get any crazy results back from the generator, i.e. they + aren't a test of the algorithm, just the implementation) */ + + for (r = rngs ; *r != 0; r++) + generic_rng_test (*r); + + exit (gsl_test_summary ()); +} + + +void +rng_test (const gsl_rng_type * T, unsigned long int seed, unsigned int n, + unsigned long int result) +{ + gsl_rng *r = gsl_rng_alloc (T); + unsigned int i; + unsigned long int k = 0; + int status; + + if (seed != 0) + { + gsl_rng_set (r, seed); + } + + for (i = 0; i < n; i++) + { + k = gsl_rng_get (r); + } + + status = (k != result); + gsl_test (status, "%s, %u steps (%u observed vs %u expected)", + gsl_rng_name (r), n, k, result); + + gsl_rng_free (r); +} + +void +rng_float_test (const gsl_rng_type * T) +{ + gsl_rng *ri = gsl_rng_alloc (T); + gsl_rng *rf = gsl_rng_alloc (T); + + double u, c ; + unsigned int i; + unsigned long int k = 0; + int status = 0 ; + + do + { + k = gsl_rng_get (ri); + u = gsl_rng_get (rf); + } + while (k == 0) ; + + c = k / u ; + for (i = 0; i < N2; i++) + { + k = gsl_rng_get (ri); + u = gsl_rng_get (rf); + if (c*k != u) + { + status = 1 ; + break ; + } + } + + gsl_test (status, "%s, ratio of int to double (%g observed vs %g expected)", + gsl_rng_name (ri), c, k/u); + + gsl_rng_free (ri); + gsl_rng_free (rf); +} + + +void +rng_state_test (const gsl_rng_type * T) +{ + unsigned long int test_a[N], test_b[N]; + + int i; + + gsl_rng *r = gsl_rng_alloc (T); + gsl_rng *r_save = gsl_rng_alloc (T); + + for (i = 0; i < N; ++i) + { + gsl_rng_get (r); /* throw away N iterations */ + } + + gsl_rng_memcpy (r_save, r); /* save the intermediate state */ + + for (i = 0; i < N; ++i) + { + test_a[i] = gsl_rng_get (r); + } + + gsl_rng_memcpy (r, r_save); /* restore the intermediate state */ + gsl_rng_free (r_save); + + for (i = 0; i < N; ++i) + { + test_b[i] = gsl_rng_get (r); + } + + { + int status = 0; + for (i = 0; i < N; ++i) + { + status |= (test_b[i] != test_a[i]); + } + gsl_test (status, "%s, random number state consistency", + gsl_rng_name (r)); + } + + gsl_rng_free (r); +} + + +void +rng_parallel_state_test (const gsl_rng_type * T) +{ + unsigned long int test_a[N], test_b[N]; + unsigned long int test_c[N], test_d[N]; + double test_e[N], test_f[N]; + + int i; + + gsl_rng *r1 = gsl_rng_alloc (T); + gsl_rng *r2 = gsl_rng_alloc (T); + + for (i = 0; i < N; ++i) + { + gsl_rng_get (r1); /* throw away N iterations */ + } + + gsl_rng_memcpy (r2, r1); /* save the intermediate state */ + + for (i = 0; i < N; ++i) + { + /* check that there is no hidden state intermixed between r1 and r2 */ + test_a[i] = gsl_rng_get (r1); + test_b[i] = gsl_rng_get (r2); + test_c[i] = gsl_rng_uniform_int (r1, 1234); + test_d[i] = gsl_rng_uniform_int (r2, 1234); + test_e[i] = gsl_rng_uniform (r1); + test_f[i] = gsl_rng_uniform (r2); + } + + { + int status = 0; + for (i = 0; i < N; ++i) + { + status |= (test_b[i] != test_a[i]); + status |= (test_c[i] != test_d[i]); + status |= (test_e[i] != test_f[i]); + } + gsl_test (status, "%s, parallel random number state consistency", + gsl_rng_name (r1)); + } + + gsl_rng_free (r1); + gsl_rng_free (r2); + +} + +void +rng_read_write_test (const gsl_rng_type * T) +{ + unsigned long int test_a[N], test_b[N]; + + int i; + + gsl_rng *r = gsl_rng_alloc (T); + + for (i = 0; i < N; ++i) + { + gsl_rng_get (r); /* throw away N iterations */ + } + + { /* save the state to a binary file */ + FILE *f = fopen("test.dat", "wb"); + gsl_rng_fwrite(f, r); + fclose(f); + } + + for (i = 0; i < N; ++i) + { + test_a[i] = gsl_rng_get (r); + } + + { /* read the state from a binary file */ + FILE *f = fopen("test.dat", "rb"); + gsl_rng_fread(f, r); + fclose(f); + } + + for (i = 0; i < N; ++i) + { + test_b[i] = gsl_rng_get (r); + } + + { + int status = 0; + for (i = 0; i < N; ++i) + { + status |= (test_b[i] != test_a[i]); + } + gsl_test (status, "%s, random number generator read and write", + gsl_rng_name (r)); + } + + gsl_rng_free (r); +} + +void +generic_rng_test (const gsl_rng_type * T) +{ + gsl_rng *r = gsl_rng_alloc (T); + const char *name = gsl_rng_name (r); + unsigned long int kmax = 0, kmin = 1000; + double sigma = 0; + const unsigned long int ran_max = gsl_rng_max (r); + const unsigned long int ran_min = gsl_rng_min (r); + + int status = rng_max_test (r, &kmax, ran_max); + + gsl_test (status, + "%s, observed vs theoretical maximum (%lu vs %lu)", + name, kmax, ran_max); + + status = rng_min_test (r, &kmin, ran_min, ran_max); + + gsl_test (status, + "%s, observed vs theoretical minimum (%lu vs %lu)", + name, kmin, ran_min); + + status = rng_sum_test (r, &sigma); + + gsl_test (status, + "%s, sum test within acceptable sigma (observed %.2g sigma)", + name, sigma); + + status = rng_bin_test (r, &sigma); + + gsl_test (status, + "%s, bin test within acceptable chisq (observed %.2g sigma)", + name, sigma); + + gsl_rng_set (r, 1); /* set seed to 1 */ + status = rng_max_test (r, &kmax, ran_max); + + gsl_rng_set (r, 1); /* set seed to 1 */ + status |= rng_min_test (r, &kmin, ran_min, ran_max); + + gsl_rng_set (r, 1); /* set seed to 1 */ + status |= rng_sum_test (r, &sigma); + + gsl_test (status, "%s, maximum and sum tests for seed=1", name); + + gsl_rng_set (r, 12345); /* set seed to a "typical" value */ + status = rng_max_test (r, &kmax, ran_max); + + gsl_rng_set (r, 12345); /* set seed to a "typical" value */ + status |= rng_min_test (r, &kmin, ran_min, ran_max); + + gsl_rng_set (r, 12345); /* set seed to a "typical" value */ + status |= rng_sum_test (r, &sigma); + + gsl_test (status, "%s, maximum and sum tests for non-default seeds", name); + + gsl_rng_free (r); +} + +int +rng_max_test (gsl_rng * r, unsigned long int *kmax, unsigned long int ran_max) +{ + unsigned long int actual_uncovered; + double expect_uncovered; + int status; + unsigned long int max = 0; + int i; + + for (i = 0; i < N2; ++i) + { + unsigned long int k = gsl_rng_get (r); + if (k > max) + max = k; + } + + *kmax = max; + + actual_uncovered = ran_max - max; + expect_uncovered = (double) ran_max / (double) N2; + + status = (max > ran_max) || (actual_uncovered > 7 * expect_uncovered) ; + + return status; +} + +int +rng_min_test (gsl_rng * r, unsigned long int *kmin, + unsigned long int ran_min, unsigned long int ran_max) +{ + unsigned long int actual_uncovered; + double expect_uncovered; + int status; + unsigned long int min = 1000000000UL; + int i; + + for (i = 0; i < N2; ++i) + { + unsigned long int k = gsl_rng_get (r); + if (k < min) + min = k; + } + + *kmin = min; + + actual_uncovered = min - ran_min; + expect_uncovered = (double) ran_max / (double) N2; + + status = (min < ran_min) || (actual_uncovered > 7 * expect_uncovered); + + return status; +} + +int +rng_sum_test (gsl_rng * r, double *sigma) +{ + double sum = 0; + int i, status; + + for (i = 0; i < N2; ++i) + { + double x = gsl_rng_uniform (r) - 0.5; + sum += x; + } + + sum /= N2; + + /* expect the average to have a variance of 1/(12 n) */ + + *sigma = sum * sqrt (12.0 * N2); + + /* more than 3 sigma is an error (increased to 3.1 to avoid false alarms) */ + + status = (fabs (*sigma) > 3.1 || fabs(*sigma) < 0.003); + + if (status) { + fprintf(stderr,"sum=%g, sigma=%g\n",sum,*sigma); + } + + return status; +} + +#define BINS 17 +#define EXTRA 10 +int +rng_bin_test (gsl_rng * r, double *sigma) +{ + int count[BINS+EXTRA]; + double chisq = 0; + int i, status; + + for (i = 0; i < BINS+EXTRA; i++) + count[i] = 0 ; + + + for (i = 0; i < N2; i++) + { + int j = gsl_rng_uniform_int (r, BINS); + count[j]++ ; + } + + chisq = 0 ; + for (i = 0; i < BINS; i++) + { + double x = (double)N2/(double)BINS ; + double d = (count[i] - x) ; + chisq += (d*d) / x; + } + + *sigma = sqrt(chisq/BINS) ; + + /* more than 3 sigma is an error */ + + status = (fabs (*sigma) > 3 || fabs(*sigma) < 0.003); + + for (i = BINS; i < BINS+EXTRA; i++) + { + if (count[i] != 0) + { + status = 1 ; + gsl_test (status, + "%s, wrote outside range in bin test " + "(%d observed vs %d expected)", + gsl_rng_name(r), i, BINS - 1); + } + } + + return status; +} + diff --git a/software/gsl-1.15/rng/transputer.c b/software/gsl-1.15/rng/transputer.c new file mode 100644 index 000000000..a2c422ab9 --- /dev/null +++ b/software/gsl-1.15/rng/transputer.c @@ -0,0 +1,83 @@ +/* rng/transputer.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is the INMOS Transputer Development System generator. The sequence is, + + x_{n+1} = (a x_n) mod m + + with a = 1664525 and m = 2^32. The seed specifies the initial + value, x_1. + + The theoretical value of x_{10001} is 1244127297. + + The period of this generator is 2^30. */ + +static inline unsigned long int transputer_get (void *vstate); +static double transputer_get_double (void *vstate); +static void transputer_set (void *state, unsigned long int s); + +typedef struct + { + unsigned long int x; + } +transputer_state_t; + +static unsigned long int +transputer_get (void *vstate) +{ + transputer_state_t *state = (transputer_state_t *) vstate; + + state->x = (1664525 * state->x) & 0xffffffffUL; + + return state->x; +} + +static double +transputer_get_double (void *vstate) +{ + return transputer_get (vstate) / 4294967296.0 ; +} + +static void +transputer_set (void *vstate, unsigned long int s) +{ + transputer_state_t *state = (transputer_state_t *) vstate; + + if (s == 0) + s = 1 ; /* default seed is 1. */ + + state->x = s; + + return; +} + +static const gsl_rng_type transputer_type = +{"transputer", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (transputer_state_t), + &transputer_set, + &transputer_get, + &transputer_get_double}; + +const gsl_rng_type *gsl_rng_transputer = &transputer_type; diff --git a/software/gsl-1.15/rng/tt.c b/software/gsl-1.15/rng/tt.c new file mode 100644 index 000000000..e5d4f558c --- /dev/null +++ b/software/gsl-1.15/rng/tt.c @@ -0,0 +1,143 @@ +/* rng/tt.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is the TT800 twisted GSFR generator for 32 bit integers. It + has been superceded by MT19937 (mt.c). The period is 2^800. + + This implementation is based on tt800.c, July 8th 1996 version by + M. Matsumoto, email: matumoto@math.keio.ac.jp + + From: Makoto Matsumoto and Yoshiharu Kurita, "Twisted GFSR + Generators II", ACM Transactions on Modelling and Computer + Simulation, Vol. 4, No. 3, 1994, pages 254-266. */ + +static inline unsigned long int tt_get (void *vstate); +static double tt_get_double (void *vstate); +static void tt_set (void *state, unsigned long int s); + +#define N 25 +#define M 7 + +typedef struct + { + int n; + unsigned long int x[N]; + } +tt_state_t; + +static inline unsigned long int +tt_get (void *vstate) +{ + tt_state_t *state = (tt_state_t *) vstate; + + /* this is the magic vector, a */ + + const unsigned long mag01[2] = + {0x00000000, 0x8ebfd028UL}; + unsigned long int y; + unsigned long int *const x = state->x; + int n = state->n; + + if (n >= N) + { + int i; + for (i = 0; i < N - M; i++) + { + x[i] = x[i + M] ^ (x[i] >> 1) ^ mag01[x[i] % 2]; + } + for (; i < N; i++) + { + x[i] = x[i + (M - N)] ^ (x[i] >> 1) ^ mag01[x[i] % 2]; + }; + n = 0; + } + + y = x[n]; + y ^= (y << 7) & 0x2b5b2500UL; /* s and b, magic vectors */ + y ^= (y << 15) & 0xdb8b0000UL; /* t and c, magic vectors */ + y &= 0xffffffffUL; /* you may delete this line if word size = 32 */ + + /* The following line was added by Makoto Matsumoto in the 1996 + version to improve lower bit's correlation. Delete this line + to use the code published in 1994. */ + + y ^= (y >> 16); /* added to the 1994 version */ + + state->n = n + 1; + + return y; +} + +static double +tt_get_double (void * vstate) +{ + return tt_get (vstate) / 4294967296.0 ; +} + +static void +tt_set (void *vstate, unsigned long int s) +{ + tt_state_t *state = (tt_state_t *) vstate; + + const tt_state_t init_state = + {0, + {0x95f24dabUL, 0x0b685215UL, 0xe76ccae7UL, + 0xaf3ec239UL, 0x715fad23UL, 0x24a590adUL, + 0x69e4b5efUL, 0xbf456141UL, 0x96bc1b7bUL, + 0xa7bdf825UL, 0xc1de75b7UL, 0x8858a9c9UL, + 0x2da87693UL, 0xb657f9ddUL, 0xffdc8a9fUL, + 0x8121da71UL, 0x8b823ecbUL, 0x885d05f5UL, + 0x4e20cd47UL, 0x5a9ad5d9UL, 0x512c0c03UL, + 0xea857ccdUL, 0x4cc1d30fUL, 0x8891a8a1UL, + 0xa6b7aadbUL}}; + + + if (s == 0) /* default seed is given explicitly in the original code */ + { + *state = init_state; + } + else + { + int i; + + state->n = 0; + + state->x[0] = s & 0xffffffffUL; + + for (i = 1; i < N; i++) + state->x[i] = (69069 * state->x[i - 1]) & 0xffffffffUL; + } + + return; +} + +static const gsl_rng_type tt_type = +{"tt800", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (tt_state_t), + &tt_set, + &tt_get, + &tt_get_double}; + +const gsl_rng_type *gsl_rng_tt800 = &tt_type; diff --git a/software/gsl-1.15/rng/types.c b/software/gsl-1.15/rng/types.c new file mode 100644 index 000000000..071edcf63 --- /dev/null +++ b/software/gsl-1.15/rng/types.c @@ -0,0 +1,101 @@ +/* rng/types.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#define N 100 + +const gsl_rng_type * gsl_rng_generator_types[N]; + +#define ADD(t) {if (i==N) abort(); gsl_rng_generator_types[i] = (t); i++; }; + +const gsl_rng_type ** +gsl_rng_types_setup (void) +{ + int i = 0; + + ADD(gsl_rng_borosh13); + ADD(gsl_rng_cmrg); + ADD(gsl_rng_coveyou); + ADD(gsl_rng_fishman18); + ADD(gsl_rng_fishman20); + ADD(gsl_rng_fishman2x); + ADD(gsl_rng_gfsr4); + ADD(gsl_rng_knuthran); + ADD(gsl_rng_knuthran2); + ADD(gsl_rng_knuthran2002); + ADD(gsl_rng_lecuyer21); + ADD(gsl_rng_minstd); + ADD(gsl_rng_mrg); + ADD(gsl_rng_mt19937); + ADD(gsl_rng_mt19937_1999); + ADD(gsl_rng_mt19937_1998); + ADD(gsl_rng_r250); + ADD(gsl_rng_ran0); + ADD(gsl_rng_ran1); + ADD(gsl_rng_ran2); + ADD(gsl_rng_ran3); + ADD(gsl_rng_rand); + ADD(gsl_rng_rand48); + ADD(gsl_rng_random128_bsd); + ADD(gsl_rng_random128_glibc2); + ADD(gsl_rng_random128_libc5); + ADD(gsl_rng_random256_bsd); + ADD(gsl_rng_random256_glibc2); + ADD(gsl_rng_random256_libc5); + ADD(gsl_rng_random32_bsd); + ADD(gsl_rng_random32_glibc2); + ADD(gsl_rng_random32_libc5); + ADD(gsl_rng_random64_bsd); + ADD(gsl_rng_random64_glibc2); + ADD(gsl_rng_random64_libc5); + ADD(gsl_rng_random8_bsd); + ADD(gsl_rng_random8_glibc2); + ADD(gsl_rng_random8_libc5); + ADD(gsl_rng_random_bsd); + ADD(gsl_rng_random_glibc2); + ADD(gsl_rng_random_libc5); + ADD(gsl_rng_randu); + ADD(gsl_rng_ranf); + ADD(gsl_rng_ranlux); + ADD(gsl_rng_ranlux389); + ADD(gsl_rng_ranlxd1); + ADD(gsl_rng_ranlxd2); + ADD(gsl_rng_ranlxs0); + ADD(gsl_rng_ranlxs1); + ADD(gsl_rng_ranlxs2); + ADD(gsl_rng_ranmar); + ADD(gsl_rng_slatec); + ADD(gsl_rng_taus); + ADD(gsl_rng_taus2); + ADD(gsl_rng_taus113); + ADD(gsl_rng_transputer); + ADD(gsl_rng_tt800); + ADD(gsl_rng_uni); + ADD(gsl_rng_uni32); + ADD(gsl_rng_vax); + ADD(gsl_rng_waterman14); + ADD(gsl_rng_zuf); + ADD(0); + + return gsl_rng_generator_types; +} + diff --git a/software/gsl-1.15/rng/uni.c b/software/gsl-1.15/rng/uni.c new file mode 100644 index 000000000..a3fcc69c4 --- /dev/null +++ b/software/gsl-1.15/rng/uni.c @@ -0,0 +1,201 @@ +/* rng/uni.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** + This is a lagged Fibonacci generator which supposedly excellent + statistical properties (I do not concur) + + I got it from the net and translated into C. + +* ====================================================================== +* NIST Guide to Available Math Software. +* Fullsource for module UNI from package CMLIB. +* Retrieved from CAMSUN on Tue Oct 8 14:04:10 1996. +* ====================================================================== + +C***BEGIN PROLOGUE UNI +C***DATE WRITTEN 810915 +C***REVISION DATE 830805 +C***CATEGORY NO. L6A21 +C***KEYWORDS RANDOM NUMBERS, UNIFORM RANDOM NUMBERS +C***AUTHOR BLUE, JAMES, SCIENTIFIC COMPUTING DIVISION, NBS +C KAHANER, DAVID, SCIENTIFIC COMPUTING DIVISION, NBS +C MARSAGLIA, GEORGE, COMPUTER SCIENCE DEPT., WASH STATE UNIV +C +C***PURPOSE THIS ROUTINE GENERATES QUASI UNIFORM RANDOM NUMBERS ON [0,1 +C AND CAN BE USED ON ANY COMPUTER WITH WHICH ALLOWS INTEGERS +C AT LEAST AS LARGE AS 32767. +C***DESCRIPTION +C +C THIS ROUTINE GENERATES QUASI UNIFORM RANDOM NUMBERS ON THE INTER +C [0,1). IT CAN BE USED WITH ANY COMPUTER WHICH ALLOWS +C INTEGERS AT LEAST AS LARGE AS 32767. +C +C +C USE +C FIRST TIME.... +C Z = UNI(JD) +C HERE JD IS ANY N O N - Z E R O INTEGER. +C THIS CAUSES INITIALIZATION OF THE PROGRAM +C AND THE FIRST RANDOM NUMBER TO BE RETURNED AS Z. +C SUBSEQUENT TIMES... +C Z = UNI(0) +C CAUSES THE NEXT RANDOM NUMBER TO BE RETURNED AS Z. +C +C +C.................................................................. +C NOTE: USERS WHO WISH TO TRANSPORT THIS PROGRAM FROM ONE COMPUTER +C TO ANOTHER SHOULD READ THE FOLLOWING INFORMATION..... +C +C MACHINE DEPENDENCIES... +C MDIG = A LOWER BOUND ON THE NUMBER OF BINARY DIGITS AVAILABLE +C FOR REPRESENTING INTEGERS, INCLUDING THE SIGN BIT. +C THIS VALUE MUST BE AT LEAST 16, BUT MAY BE INCREASED +C IN LINE WITH REMARK A BELOW. +C +C REMARKS... +C A. THIS PROGRAM CAN BE USED IN TWO WAYS: +C (1) TO OBTAIN REPEATABLE RESULTS ON DIFFERENT COMPUTERS, +C SET 'MDIG' TO THE SMALLEST OF ITS VALUES ON EACH, OR, +C (2) TO ALLOW THE LONGEST SEQUENCE OF RANDOM NUMBERS TO BE +C GENERATED WITHOUT CYCLING (REPEATING) SET 'MDIG' TO THE +C LARGEST POSSIBLE VALUE. +C B. THE SEQUENCE OF NUMBERS GENERATED DEPENDS ON THE INITIAL +C INPUT 'JD' AS WELL AS THE VALUE OF 'MDIG'. +C IF MDIG=16 ONE SHOULD FIND THAT + Editors Note: set the seed using 152 in order to get uni(305) + -jt +C THE FIRST EVALUATION +C Z=UNI(305) GIVES Z=.027832881... +C THE SECOND EVALUATION +C Z=UNI(0) GIVES Z=.56102176... +C THE THIRD EVALUATION +C Z=UNI(0) GIVES Z=.41456343... +C THE THOUSANDTH EVALUATION +C Z=UNI(0) GIVES Z=.19797357... +C +C***REFERENCES MARSAGLIA G., "COMMENTS ON THE PERFECT UNIFORM RANDOM +C NUMBER GENERATOR", UNPUBLISHED NOTES, WASH S. U. +C***ROUTINES CALLED I1MACH,XERROR +C***END PROLOGUE UNI + + **/ + +#include +#include +#include + +static inline unsigned long int uni_get (void *vstate); +static double uni_get_double (void *vstate); +static void uni_set (void *state, unsigned long int s); + +static const unsigned int MDIG = 16; /* Machine digits in int */ +static const unsigned int m1 = 32767; /* 2^(MDIG-1) - 1 */ +static const unsigned int m2 = 256; /* 2^(MDIG/2) */ + +typedef struct + { + int i, j; + unsigned long m[17]; + } +uni_state_t; + +static inline unsigned long +uni_get (void *vstate) +{ + uni_state_t *state = (uni_state_t *) vstate; + const int i = state->i; + const int j = state->j; + + /* important k not be unsigned */ + long k = state->m[i] - state->m[j]; + + if (k < 0) + k += m1; + state->m[j] = k; + + if (i == 0) + { + state->i = 16; + } + else + { + (state->i)--; + } + + if (j == 0) + { + state->j = 16; + } + else + { + (state->j)--; + } + + return k; +} + +static double +uni_get_double (void *vstate) +{ + return uni_get (vstate) / 32767.0 ; +} + +static void +uni_set (void *vstate, unsigned long int s) +{ + unsigned int i, seed, k0, k1, j0, j1; + + uni_state_t *state = (uni_state_t *) vstate; + + /* For this routine, the seeding is very elaborate! */ + /* A flaw in this approach is that seeds 1,2 give exactly the + same random number sequence! */ + + s = 2 * s + 1; /* enforce seed be odd */ + seed = (s < m1 ? s : m1); /* seed should be less than m1 */ + + k0 = 9069 % m2; + k1 = 9069 / m2; + j0 = seed % m2; + j1 = seed / m2; + + for (i = 0; i < 17; ++i) + { + seed = j0 * k0; + j1 = (seed / m2 + j0 * k1 + j1 * k0) % (m2 / 2); + j0 = seed % m2; + state->m[i] = j0 + m2 * j1; + } + state->i = 4; + state->j = 16; + + return; +} + +static const gsl_rng_type uni_type = +{"uni", /* name */ + 32766, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (uni_state_t), + &uni_set, + &uni_get, + &uni_get_double}; + +const gsl_rng_type *gsl_rng_uni = &uni_type; diff --git a/software/gsl-1.15/rng/uni32.c b/software/gsl-1.15/rng/uni32.c new file mode 100644 index 000000000..35f690652 --- /dev/null +++ b/software/gsl-1.15/rng/uni32.c @@ -0,0 +1,203 @@ +/* rng/uni32.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** + This is a lagged Fibonacci generator which supposedly excellent + statistical properties (I do not concur) + + I got it from the net and translated into C. + +* ====================================================================== +* NIST Guide to Available Math Software. +* Fullsource for module UNI from package CMLIB. +* Retrieved from CAMSUN on Tue Oct 8 14:04:10 1996. +* ====================================================================== + +C***BEGIN PROLOGUE UNI +C***DATE WRITTEN 810915 +C***REVISION DATE 830805 +C***CATEGORY NO. L6A21 +C***KEYWORDS RANDOM NUMBERS, UNIFORM RANDOM NUMBERS +C***AUTHOR BLUE, JAMES, SCIENTIFIC COMPUTING DIVISION, NBS +C KAHANER, DAVID, SCIENTIFIC COMPUTING DIVISION, NBS +C MARSAGLIA, GEORGE, COMPUTER SCIENCE DEPT., WASH STATE UNIV +C +C***PURPOSE THIS ROUTINE GENERATES QUASI UNIFORM RANDOM NUMBERS ON [0,1 +C AND CAN BE USED ON ANY COMPUTER WITH WHICH ALLOWS INTEGERS +C AT LEAST AS LARGE AS 32767. +C***DESCRIPTION +C +C THIS ROUTINE GENERATES QUASI UNIFORM RANDOM NUMBERS ON THE INTER +C [0,1). IT CAN BE USED WITH ANY COMPUTER WHICH ALLOWS +C INTEGERS AT LEAST AS LARGE AS 32767. +C +C +C USE +C FIRST TIME.... +C Z = UNI(JD) +C HERE JD IS ANY N O N - Z E R O INTEGER. +C THIS CAUSES INITIALIZATION OF THE PROGRAM +C AND THE FIRST RANDOM NUMBER TO BE RETURNED AS Z. +C SUBSEQUENT TIMES... +C Z = UNI(0) +C CAUSES THE NEXT RANDOM NUMBER TO BE RETURNED AS Z. +C +C +C.................................................................. +C NOTE: USERS WHO WISH TO TRANSPORT THIS PROGRAM FROM ONE COMPUTER +C TO ANOTHER SHOULD READ THE FOLLOWING INFORMATION..... +C +C MACHINE DEPENDENCIES... +C MDIG = A LOWER BOUND ON THE NUMBER OF BINARY DIGITS AVAILABLE +C FOR REPRESENTING INTEGERS, INCLUDING THE SIGN BIT. +C THIS VALUE MUST BE AT LEAST 16, BUT MAY BE INCREASED +C IN LINE WITH REMARK A BELOW. +C +C REMARKS... +C A. THIS PROGRAM CAN BE USED IN TWO WAYS: +C (1) TO OBTAIN REPEATABLE RESULTS ON DIFFERENT COMPUTERS, +C SET 'MDIG' TO THE SMALLEST OF ITS VALUES ON EACH, OR, +C (2) TO ALLOW THE LONGEST SEQUENCE OF RANDOM NUMBERS TO BE +C GENERATED WITHOUT CYCLING (REPEATING) SET 'MDIG' TO THE +C LARGEST POSSIBLE VALUE. +C B. THE SEQUENCE OF NUMBERS GENERATED DEPENDS ON THE INITIAL +C INPUT 'JD' AS WELL AS THE VALUE OF 'MDIG'. +C IF MDIG=16 ONE SHOULD FIND THAT + Editors Note: set the seed using 152 in order to get uni(305) + -jt +C THE FIRST EVALUATION +C Z=UNI(305) GIVES Z=.027832881... +C THE SECOND EVALUATION +C Z=UNI(0) GIVES Z=.56102176... +C THE THIRD EVALUATION +C Z=UNI(0) GIVES Z=.41456343... +C THE THOUSANDTH EVALUATION +C Z=UNI(0) GIVES Z=.19797357... +C +C***REFERENCES MARSAGLIA G., "COMMENTS ON THE PERFECT UNIFORM RANDOM +C NUMBER GENERATOR", UNPUBLISHED NOTES, WASH S. U. +C***ROUTINES CALLED I1MACH,XERROR +C***END PROLOGUE UNI + + **/ + +#include +#include +#include + +static inline unsigned long int uni32_get (void *vstate); +static double uni32_get_double (void *vstate); +static void uni32_set (void *state, unsigned long int s); + +static const unsigned long int MDIG = 32; /* Machine digits in int */ +static const unsigned long int m1 = 2147483647; /* 2^(MDIG-1) - 1 */ +static const unsigned long int m2 = 65536; /* 2^(MDIG/2) */ + +typedef struct + { + int i, j; + unsigned long m[17]; + } +uni32_state_t; + +static inline unsigned long +uni32_get (void *vstate) +{ + uni32_state_t *state = (uni32_state_t *) vstate; + const long int i = state->i; + const long int j = state->j; + + /* important k not be unsigned */ + long int k = state->m[i] - state->m[j]; + + if (k < 0) + k += m1; + state->m[j] = k; + + if (i == 0) + { + state->i = 16; + } + else + { + (state->i)--; + } + + if (j == 0) + { + state->j = 16; + } + else + { + (state->j)--; + } + + return k; +} + +static double +uni32_get_double (void *vstate) +{ + return uni32_get (vstate) / 2147483647.0 ; +} + +static void +uni32_set (void *vstate, unsigned long int s) +{ + long int seed, k0, k1, j0, j1; + int i; + + uni32_state_t *state = (uni32_state_t *) vstate; + + /* For this routine, the seeding is very elaborate! */ + /* A flaw in this approach is that seeds 1,2 give exactly the + same random number sequence! */ + + /*s = 2*s+1; *//* enforce seed be odd */ + seed = (s < m1 ? s : m1); /* seed should be less than m1 */ + seed -= (seed % 2 == 0 ? 1 : 0); + + k0 = 9069 % m2; + k1 = 9069 / m2; + j0 = seed % m2; + j1 = seed / m2; + + for (i = 0; i < 17; i++) + { + seed = j0 * k0; + j1 = (seed / m2 + j0 * k1 + j1 * k0) % (m2 / 2); + j0 = seed % m2; + state->m[i] = j0 + m2 * j1; + } + state->i = 4; + state->j = 16; + + return; +} + +static const gsl_rng_type uni32_type = +{"uni32", /* name */ + 2147483646, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (uni32_state_t), + &uni32_set, + &uni32_get, + &uni32_get_double}; + +const gsl_rng_type *gsl_rng_uni32 = &uni32_type; diff --git a/software/gsl-1.15/rng/vax.c b/software/gsl-1.15/rng/vax.c new file mode 100644 index 000000000..98c05f75d --- /dev/null +++ b/software/gsl-1.15/rng/vax.c @@ -0,0 +1,83 @@ +/* rng/vax.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* This is the old vax generator MTH$RANDOM. The sequence is, + + x_{n+1} = (a x_n + c) mod m + + with a = 69069, c = 1 and m = 2^32. The seed specifies the initial + value, x_1. + + The theoretical value of x_{10001} is 3051034865. + + The period of this generator is 2^32. */ + +static inline unsigned long int vax_get (void *vstate); +static double vax_get_double (void *vstate); +static void vax_set (void *state, unsigned long int s); + +typedef struct + { + unsigned long int x; + } +vax_state_t; + +static inline unsigned long int +vax_get (void *vstate) +{ + vax_state_t *state = (vax_state_t *) vstate; + + state->x = (69069 * state->x + 1) & 0xffffffffUL; + + return state->x; +} + +static double +vax_get_double (void *vstate) +{ + return vax_get (vstate) / 4294967296.0 ; +} + +static void +vax_set (void *vstate, unsigned long int s) +{ + vax_state_t *state = (vax_state_t *) vstate; + + /* default seed is 0. The constant term c stops the series from + collapsing to 0,0,0,0,0,... */ + + state->x = s; + + return; +} + +static const gsl_rng_type vax_type = +{"vax", /* name */ + 0xffffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (vax_state_t), + &vax_set, + &vax_get, + &vax_get_double}; + +const gsl_rng_type *gsl_rng_vax = &vax_type; diff --git a/software/gsl-1.15/rng/waterman14.c b/software/gsl-1.15/rng/waterman14.c new file mode 100644 index 000000000..3300fb8bc --- /dev/null +++ b/software/gsl-1.15/rng/waterman14.c @@ -0,0 +1,92 @@ +/* rng/waterman14.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * This generator is taken from + * + * Donald E. Knuth + * The Art of Computer Programming + * Volume 2 + * Third Edition + * Addison-Wesley + * Page 106-108 + * + * It is called "Waterman". + * + * This implementation copyright (C) 2001 Carlo Perassi + * and (C) 2003 Heiko Bauke. + */ + +#include +#include +#include + +#define AA 1566083941UL +#define MM 0xffffffffUL /* 2 ^ 32 - 1 */ + +static inline unsigned long int ran_get (void *vstate); +static double ran_get_double (void *vstate); +static void ran_set (void *state, unsigned long int s); + +typedef struct +{ + unsigned long int x; +} +ran_state_t; + +static inline unsigned long int +ran_get (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + state->x = (AA * state->x) & MM; + + return state->x; +} + +static double +ran_get_double (void *vstate) +{ + ran_state_t *state = (ran_state_t *) vstate; + + return ran_get (state) / 4294967296.0; +} + +static void +ran_set (void *vstate, unsigned long int s) +{ + ran_state_t *state = (ran_state_t *) vstate; + + if (s == 0) + s = 1; /* default seed is 1 */ + + state->x = s & MM; + + return; +} + +static const gsl_rng_type ran_type = { + "waterman14", /* name */ + MM, /* RAND_MAX */ + 1, /* RAND_MIN */ + sizeof (ran_state_t), + &ran_set, + &ran_get, + &ran_get_double +}; + +const gsl_rng_type *gsl_rng_waterman14 = &ran_type; diff --git a/software/gsl-1.15/rng/zuf.c b/software/gsl-1.15/rng/zuf.c new file mode 100644 index 000000000..f9b5f2f24 --- /dev/null +++ b/software/gsl-1.15/rng/zuf.c @@ -0,0 +1,141 @@ +/* rng/zuf.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/* It is crucial that m == n-273 mod 607 at all times; + For speed of execution, however, this is never enforced. + Instead is is set in the initializer: note 607-273=334 + Note also that the state.u[607] is not initialized */ + +static inline unsigned long int zuf_get (void *vstate); +static double zuf_get_double (void *vstate); +static void zuf_set (void *state, unsigned long int s); + +static const unsigned long int zuf_randmax = 16777216; /* 2^24 */ + +typedef struct + { + int n; + unsigned long int u[607]; + } +zuf_state_t; + +/* The zufall package was implemented with float's, which is to say 24 + bits of precision. Since I'm using long's instead, my RANDMAX + reflects this. */ + +static inline unsigned long int +zuf_get (void *vstate) +{ + zuf_state_t *state = (zuf_state_t *) vstate; + const int n = state->n; + const int m = (n - 273 + 607) % 607; + unsigned long int t = state->u[n] + state->u[m]; + + while (t > zuf_randmax) + t -= zuf_randmax; + + state->u[n] = t; + + if (n == 606) + { + state->n = 0; + } + else + { + state->n = n + 1; + } + + return t; +} + +static double +zuf_get_double (void *vstate) +{ + return zuf_get (vstate) / 16777216.0 ; +} + +static void +zuf_set (void *vstate, unsigned long int s) +{ + /* A very elaborate seeding procedure is provided with the + zufall package; this is virtually a copy of that procedure */ + + /* Initialized data */ + + long int kl = 9373; + long int ij = 1802; + + /* Local variables */ + long int i, j, k, l, m; + double x, y; + long int ii, jj; + + zuf_state_t *state = (zuf_state_t *) vstate; + + state->n = 0; + +/* generates initial seed buffer by linear congruential */ +/* method. Taken from Marsaglia, FSU report FSU-SCRI-87-50 */ +/* variable seed should be 0 < seed <31328 */ + + if (s == 0) + s = 1802; /* default seed is 1802 */ + + ij = s; + + i = ij / 177 % 177 + 2; + j = ij % 177 + 2; + k = kl / 169 % 178 + 1; + l = kl % 169; + for (ii = 0; ii < 607; ++ii) + { + x = 0.0; + y = 0.5; + /* 24 bits?? */ + for (jj = 1; jj <= 24; ++jj) + { + m = i * j % 179 * k % 179; + i = j; + j = k; + k = m; + l = (l * 53 + 1) % 169; + if (l * m % 64 >= 32) + { + x += y; + } + y *= 0.5; + } + state->u[ii] = (unsigned long int) (x * zuf_randmax); + } +} + +static const gsl_rng_type zuf_type = +{"zuf", /* name */ + 0x00ffffffUL, /* RAND_MAX */ + 0, /* RAND_MIN */ + sizeof (zuf_state_t), + &zuf_set, + &zuf_get, + &zuf_get_double}; + +const gsl_rng_type *gsl_rng_zuf = &zuf_type; diff --git a/software/gsl-1.15/roots/.deps/bisection.Plo b/software/gsl-1.15/roots/.deps/bisection.Plo new file mode 100644 index 000000000..b2bb415c4 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/bisection.Plo @@ -0,0 +1,137 @@ +bisection.lo: bisection.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/brent.Plo b/software/gsl-1.15/roots/.deps/brent.Plo new file mode 100644 index 000000000..4bd19cc60 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/brent.Plo @@ -0,0 +1,137 @@ +brent.lo: brent.c ../config.h /usr/bin/../lib/clang/4.1/include/stddef.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/convergence.Plo b/software/gsl-1.15/roots/.deps/convergence.Plo new file mode 100644 index 000000000..80e6b4745 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/convergence.Plo @@ -0,0 +1,132 @@ +convergence.lo: convergence.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/roots/.deps/falsepos.Plo b/software/gsl-1.15/roots/.deps/falsepos.Plo new file mode 100644 index 000000000..9e40b51be --- /dev/null +++ b/software/gsl-1.15/roots/.deps/falsepos.Plo @@ -0,0 +1,137 @@ +falsepos.lo: falsepos.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/fdfsolver.Plo b/software/gsl-1.15/roots/.deps/fdfsolver.Plo new file mode 100644 index 000000000..0e4a68029 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/fdfsolver.Plo @@ -0,0 +1,138 @@ +fdfsolver.lo: fdfsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_roots.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_roots.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/roots/.deps/fsolver.Plo b/software/gsl-1.15/roots/.deps/fsolver.Plo new file mode 100644 index 000000000..dec5865d9 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/fsolver.Plo @@ -0,0 +1,138 @@ +fsolver.lo: fsolver.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_roots.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_roots.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/roots/.deps/newton.Plo b/software/gsl-1.15/roots/.deps/newton.Plo new file mode 100644 index 000000000..4fd65824f --- /dev/null +++ b/software/gsl-1.15/roots/.deps/newton.Plo @@ -0,0 +1,137 @@ +newton.lo: newton.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/secant.Plo b/software/gsl-1.15/roots/.deps/secant.Plo new file mode 100644 index 000000000..c3425571b --- /dev/null +++ b/software/gsl-1.15/roots/.deps/secant.Plo @@ -0,0 +1,137 @@ +secant.lo: secant.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/steffenson.Plo b/software/gsl-1.15/roots/.deps/steffenson.Plo new file mode 100644 index 000000000..b62a7c8b6 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/steffenson.Plo @@ -0,0 +1,137 @@ +steffenson.lo: steffenson.c ../config.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_roots.h \ + roots.h + +../config.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_roots.h: + +roots.h: diff --git a/software/gsl-1.15/roots/.deps/test.Po b/software/gsl-1.15/roots/.deps/test.Po new file mode 100644 index 000000000..d365c93ab --- /dev/null +++ b/software/gsl-1.15/roots/.deps/test.Po @@ -0,0 +1,140 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_roots.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_ieee_utils.h roots.h test.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_roots.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_ieee_utils.h: + +roots.h: + +test.h: diff --git a/software/gsl-1.15/roots/.deps/test_funcs.Po b/software/gsl-1.15/roots/.deps/test_funcs.Po new file mode 100644 index 000000000..854a5b864 --- /dev/null +++ b/software/gsl-1.15/roots/.deps/test_funcs.Po @@ -0,0 +1,118 @@ +test_funcs.o: test_funcs.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/stdlib.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h ../gsl/gsl_roots.h test.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/stdlib.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_roots.h: + +test.h: diff --git a/software/gsl-1.15/roots/ChangeLog b/software/gsl-1.15/roots/ChangeLog new file mode 100644 index 000000000..8c1a56e62 --- /dev/null +++ b/software/gsl-1.15/roots/ChangeLog @@ -0,0 +1,181 @@ +2009-07-09 Brian Gough + + * fsolver.c (gsl_root_fsolver_free): handle NULL argument in free + + * fdfsolver.c (gsl_root_fdfsolver_free): handle NULL argument in + free + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-07-30 Brian Gough + + * newton.c (newton_iterate): use gsl_finite instead of finite + + * roots.h (SAFE_FUNC_CALL): use gsl_finite instead of finite + + * secant.c (secant_iterate): use gsl_finite instead of finite + + * steffenson.c (steffenson_iterate): use gsl_finite instead of + finite + +2007-01-04 Brian Gough + + * convergence.c (gsl_root_test_delta): added termination + alternative condition x1==x0 + +2005-03-02 Brian Gough + + * steffenson.c (steffenson_iterate): improved wording of error messages + + * secant.c (secant_iterate): improved wording of error messages + + * roots.h (SAFE_FUNC_CALL): improved wording of error message + + * newton.c (newton_iterate): improved wording of error messages + + * utility.c: removed, not needed any more + +Sun Jul 15 17:53:48 2001 Brian Gough + + * removed interval type + +Sun May 6 14:26:59 2001 Brian Gough + + * test.c: removed tests for macros, which are now in sys/. + +Mon Apr 16 20:17:04 2001 Brian Gough + + * fsolver.c (gsl_root_fsolver_alloc): removed unnecessary status + variable + +Sun Feb 18 15:35:25 2001 Brian Gough + + * fdfsolver.c fsolver.c: changed so that the solver _alloc + function no longer calls _set, the user must do that separately. + +Wed May 17 11:37:15 2000 Brian Gough + + * test_macros.c (test_macros): use GSL_POSINF and GSL_NAN macros + instead of 1/0 and 0/0 + +Mon Feb 14 13:05:30 2000 Brian Gough + + * removed definition of isinf macro (no longer needed) + + * made all internal functions static + +Wed Nov 3 11:59:35 1999 Brian Gough + + * fixed test failures + + * test.c (main): added a call to gsl_ieee_env_setup for testing + + * test_roots.c: increased the maximum number of iterations to 150 + so that the tests still work on the difficult cases. + + * steffenson.c (steffenson_iterate): add a check to avoid division + by zero + +Sat Oct 16 19:43:14 1999 Brian Gough + + * removed GSL_ROOT_EPSILON_BUFFER, not needed anymore + +Wed Jul 21 18:47:01 1999 Brian Gough + + * gsl_roots.h, convergence.c: changed order of relative and + absolute errors to make them the same as quadpack routines + (abs,rel) + +Wed Jul 21 16:30:56 1999 Brian Gough + + * brent.c (brent_iterate): fixed bug where bounding interval could + be incorrect and not include root. + +Mon Mar 1 15:38:06 1999 Brian Gough + + * moved static class data out of gsl_root_fsolver and + gsl_root_fdfsolver and into gsl_root_fsolver_type and + gsl_root_fdfsolver_type + + +Mon Mar 1 15:38:06 1999 Brian Gough + + * renamed f_solver to fsolver and fdf_solver to fdfsolver, since + these look neater + +Sun Feb 28 21:11:21 1999 Brian Gough + + * rewrote the root finding functions in an iterative framework + +Tue Nov 17 16:47:09 1998 Brian Gough + + * secant.c, falsepos.c newton.c: added gsl_math.h to included + headers to import GSL_MAX and GSL_MIN + +Mon Nov 9 21:21:45 1998 Brian Gough + + * roots.h: got rid of local MAX(a,b) and MIN(a,b) definitions + since they are now in config.h + +Wed Nov 4 16:08:32 1998 Brian Gough + + * test.c (test_brent): allow the brent tests to run for more + iterations since they take longer on the pathological cases. + + * brent.c (gsl_root_brent): on each iteration keep track of + current best estimates of the root and the bounds so that they are + returned to the user if the function exits prematurely. + + clean up the brent algorithm based on remarks in the original + paper + +Mon Oct 26 16:31:21 1998 Brian Gough + + * in all routines with upper and lower bounds if a root is found + exactly then the bracket is collapsed onto the root instead of + being untouched. + +Thu Oct 15 13:59:30 1998 Brian Gough + + * bisection.c, falsepos.c, secant.c: reordered the tests so that + the minimum number of function evaluations are performed when + there is an early exit due to one of the supplied limits lying on + a root. + +Fri Aug 21 14:48:13 1998 Brian Gough + + * test.c: clean up of tests to get rid of warnings + +Thu Aug 20 10:21:15 1998 Brian Gough + + * roots.h (_WITHIN_TOL): added extra parens in macro definition, + for safety + + * falsepos.c (gsl_root_falsepos): removed test for absolute + equality and replaced by a flag indicating which variables + changed. + + * test.c (main): simplified the tests, removed command line + arguments (can use the debugger to select which ones to run) + +Mon Jun 15 22:22:54 1998 Brian Gough + + * started to eliminate void * arguments for function types (they + are not a good idea and can easily be specified) + +1998-02-09 Mark Galassi + + * test.c (main): added an extra argument so that the $(srcdir) can + be passed along when "make check" is run in a separate build + directory. + + * test-macros, test-secant, test-bisection, test-newton, + test-falsepos: modified these to use build and source directories + explicitly. Now "make check" in a separate build directory works. + +1998-02-02 Mark Galassi + + * Makefile.am (TESTS): added $(srcdir) before these scripts, since + the TESTS target picks things from the build directory. diff --git a/software/gsl-1.15/roots/Makefile.am b/software/gsl-1.15/roots/Makefile.am new file mode 100644 index 000000000..3ff72e152 --- /dev/null +++ b/software/gsl-1.15/roots/Makefile.am @@ -0,0 +1,19 @@ +# -*-makefile-*- + +noinst_LTLIBRARIES = libgslroots.la + +pkginclude_HEADERS = gsl_roots.h + +noinst_HEADERS = roots.h + +INCLUDES = -I$(top_srcdir) + +libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c test_funcs.c test.h +test_LDADD = libgslroots.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + diff --git a/software/gsl-1.15/roots/Makefile.in b/software/gsl-1.15/roots/Makefile.in new file mode 100644 index 000000000..67402d883 --- /dev/null +++ b/software/gsl-1.15/roots/Makefile.in @@ -0,0 +1,675 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*-makefile-*- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = roots +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslroots_la_LIBADD = +am_libgslroots_la_OBJECTS = bisection.lo brent.lo falsepos.lo \ + newton.lo secant.lo steffenson.lo convergence.lo fsolver.lo \ + fdfsolver.lo +libgslroots_la_OBJECTS = $(am_libgslroots_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslroots.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslroots_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslroots_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslroots.la +pkginclude_HEADERS = gsl_roots.h +noinst_HEADERS = roots.h +INCLUDES = -I$(top_srcdir) +libgslroots_la_SOURCES = bisection.c brent.c falsepos.c newton.c secant.c steffenson.c convergence.c fsolver.c fdfsolver.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c test_funcs.c test.h +test_LDADD = libgslroots.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu roots/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu roots/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslroots.la: $(libgslroots_la_OBJECTS) $(libgslroots_la_DEPENDENCIES) + $(LINK) $(libgslroots_la_OBJECTS) $(libgslroots_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bisection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brent.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/falsepos.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdfsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsolver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newton.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secant.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/steffenson.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_funcs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/roots/TODO b/software/gsl-1.15/roots/TODO new file mode 100644 index 000000000..6adc8d48f --- /dev/null +++ b/software/gsl-1.15/roots/TODO @@ -0,0 +1,12 @@ +# -*- org -*- +#+CATEGORY: roots + +* Add an inline version of the iterate method for speed? Perhaps not, +the time taken for each iteration surely dominated by the convergence +test. + +* Numerical derivatives? Maybe have a function to manufacture an fdf +from an f and optionally a df. (We'll need to approximate the +derivative if it is not provided; this is something which should be +done outside the root finding package.) + diff --git a/software/gsl-1.15/roots/bisection.c b/software/gsl-1.15/roots/bisection.c new file mode 100644 index 000000000..9665b7369 --- /dev/null +++ b/software/gsl-1.15/roots/bisection.c @@ -0,0 +1,134 @@ +/* roots/bisection.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +/* bisection.c -- bisection root finding algorithm */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + +typedef struct + { + double f_lower, f_upper; + } +bisection_state_t; + +static int bisection_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper); +static int bisection_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper); + +static int +bisection_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper) +{ + bisection_state_t * state = (bisection_state_t *) vstate; + + double f_lower, f_upper ; + + *root = 0.5 * (x_lower + x_upper) ; + + SAFE_FUNC_CALL (f, x_lower, &f_lower); + SAFE_FUNC_CALL (f, x_upper, &f_upper); + + state->f_lower = f_lower; + state->f_upper = f_upper; + + if ((f_lower < 0.0 && f_upper < 0.0) || (f_lower > 0.0 && f_upper > 0.0)) + { + GSL_ERROR ("endpoints do not straddle y=0", GSL_EINVAL); + } + + return GSL_SUCCESS; + +} + +static int +bisection_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper) +{ + bisection_state_t * state = (bisection_state_t *) vstate; + + double x_bisect, f_bisect; + + const double x_left = *x_lower ; + const double x_right = *x_upper ; + + const double f_lower = state->f_lower; + const double f_upper = state->f_upper; + + if (f_lower == 0.0) + { + *root = x_left ; + *x_upper = x_left; + return GSL_SUCCESS; + } + + if (f_upper == 0.0) + { + *root = x_right ; + *x_lower = x_right; + return GSL_SUCCESS; + } + + x_bisect = (x_left + x_right) / 2.0; + + SAFE_FUNC_CALL (f, x_bisect, &f_bisect); + + if (f_bisect == 0.0) + { + *root = x_bisect; + *x_lower = x_bisect; + *x_upper = x_bisect; + return GSL_SUCCESS; + } + + /* Discard the half of the interval which doesn't contain the root. */ + + if ((f_lower > 0.0 && f_bisect < 0.0) || (f_lower < 0.0 && f_bisect > 0.0)) + { + *root = 0.5 * (x_left + x_bisect) ; + *x_upper = x_bisect; + state->f_upper = f_bisect; + } + else + { + *root = 0.5 * (x_bisect + x_right) ; + *x_lower = x_bisect; + state->f_lower = f_bisect; + } + + return GSL_SUCCESS; +} + + +static const gsl_root_fsolver_type bisection_type = +{"bisection", /* name */ + sizeof (bisection_state_t), + &bisection_init, + &bisection_iterate}; + +const gsl_root_fsolver_type * gsl_root_fsolver_bisection = &bisection_type; diff --git a/software/gsl-1.15/roots/brent.c b/software/gsl-1.15/roots/brent.c new file mode 100644 index 000000000..4f0c9cd33 --- /dev/null +++ b/software/gsl-1.15/roots/brent.c @@ -0,0 +1,244 @@ +/* roots/brent.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* brent.c -- brent root finding algorithm */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + + +typedef struct + { + double a, b, c, d, e; + double fa, fb, fc; + } +brent_state_t; + +static int brent_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper); +static int brent_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper); + + +static int +brent_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper) +{ + brent_state_t * state = (brent_state_t *) vstate; + + double f_lower, f_upper ; + + *root = 0.5 * (x_lower + x_upper) ; + + SAFE_FUNC_CALL (f, x_lower, &f_lower); + SAFE_FUNC_CALL (f, x_upper, &f_upper); + + state->a = x_lower; + state->fa = f_lower; + + state->b = x_upper; + state->fb = f_upper; + + state->c = x_upper; + state->fc = f_upper; + + state->d = x_upper - x_lower ; + state->e = x_upper - x_lower ; + + if ((f_lower < 0.0 && f_upper < 0.0) || (f_lower > 0.0 && f_upper > 0.0)) + { + GSL_ERROR ("endpoints do not straddle y=0", GSL_EINVAL); + } + + return GSL_SUCCESS; + +} + +static int +brent_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper) +{ + brent_state_t * state = (brent_state_t *) vstate; + + double tol, m; + + int ac_equal = 0; + + double a = state->a, b = state->b, c = state->c; + double fa = state->fa, fb = state->fb, fc = state->fc; + double d = state->d, e = state->e; + + if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) + { + ac_equal = 1; + c = a; + fc = fa; + d = b - a; + e = b - a; + } + + if (fabs (fc) < fabs (fb)) + { + ac_equal = 1; + a = b; + b = c; + c = a; + fa = fb; + fb = fc; + fc = fa; + } + + tol = 0.5 * GSL_DBL_EPSILON * fabs (b); + m = 0.5 * (c - b); + + if (fb == 0) + { + *root = b; + *x_lower = b; + *x_upper = b; + + return GSL_SUCCESS; + } + + if (fabs (m) <= tol) + { + *root = b; + + if (b < c) + { + *x_lower = b; + *x_upper = c; + } + else + { + *x_lower = c; + *x_upper = b; + } + + return GSL_SUCCESS; + } + + if (fabs (e) < tol || fabs (fa) <= fabs (fb)) + { + d = m; /* use bisection */ + e = m; + } + else + { + double p, q, r; /* use inverse cubic interpolation */ + double s = fb / fa; + + if (ac_equal) + { + p = 2 * m * s; + q = 1 - s; + } + else + { + q = fa / fc; + r = fb / fc; + p = s * (2 * m * q * (q - r) - (b - a) * (r - 1)); + q = (q - 1) * (r - 1) * (s - 1); + } + + if (p > 0) + { + q = -q; + } + else + { + p = -p; + } + + if (2 * p < GSL_MIN (3 * m * q - fabs (tol * q), fabs (e * q))) + { + e = d; + d = p / q; + } + else + { + /* interpolation failed, fall back to bisection */ + + d = m; + e = m; + } + } + + a = b; + fa = fb; + + if (fabs (d) > tol) + { + b += d; + } + else + { + b += (m > 0 ? +tol : -tol); + } + + SAFE_FUNC_CALL (f, b, &fb); + + state->a = a ; + state->b = b ; + state->c = c ; + state->d = d ; + state->e = e ; + state->fa = fa ; + state->fb = fb ; + state->fc = fc ; + + /* Update the best estimate of the root and bounds on each + iteration */ + + *root = b; + + if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) + { + c = a; + } + + if (b < c) + { + *x_lower = b; + *x_upper = c; + } + else + { + *x_lower = c; + *x_upper = b; + } + + return GSL_SUCCESS ; +} + + +static const gsl_root_fsolver_type brent_type = +{"brent", /* name */ + sizeof (brent_state_t), + &brent_init, + &brent_iterate}; + +const gsl_root_fsolver_type * gsl_root_fsolver_brent = &brent_type; diff --git a/software/gsl-1.15/roots/convergence.c b/software/gsl-1.15/roots/convergence.c new file mode 100644 index 000000000..2b1b4740c --- /dev/null +++ b/software/gsl-1.15/roots/convergence.c @@ -0,0 +1,87 @@ +/* roots/convergence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +int +gsl_root_test_interval (double x_lower, double x_upper, double epsabs, double epsrel) +{ + const double abs_lower = fabs(x_lower) ; + const double abs_upper = fabs(x_upper) ; + + double min_abs, tolerance; + + if (epsrel < 0.0) + GSL_ERROR ("relative tolerance is negative", GSL_EBADTOL); + + if (epsabs < 0.0) + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + + if (x_lower > x_upper) + GSL_ERROR ("lower bound larger than upper bound", GSL_EINVAL); + + if ((x_lower > 0.0 && x_upper > 0.0) || (x_lower < 0.0 && x_upper < 0.0)) + { + min_abs = GSL_MIN_DBL(abs_lower, abs_upper) ; + } + else + { + min_abs = 0; + } + + tolerance = epsabs + epsrel * min_abs ; + + if (fabs(x_upper - x_lower) < tolerance) + return GSL_SUCCESS; + + return GSL_CONTINUE ; +} + +int +gsl_root_test_delta (double x1, double x0, double epsabs, double epsrel) +{ + const double tolerance = epsabs + epsrel * fabs(x1) ; + + if (epsrel < 0.0) + GSL_ERROR ("relative tolerance is negative", GSL_EBADTOL); + + if (epsabs < 0.0) + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + + if (fabs(x1 - x0) < tolerance || x1 == x0) + return GSL_SUCCESS; + + return GSL_CONTINUE ; +} + +int +gsl_root_test_residual (double f, double epsabs) +{ + if (epsabs < 0.0) + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + + if (fabs(f) < epsabs) + return GSL_SUCCESS; + + return GSL_CONTINUE ; +} + diff --git a/software/gsl-1.15/roots/falsepos.c b/software/gsl-1.15/roots/falsepos.c new file mode 100644 index 000000000..f6cda5c88 --- /dev/null +++ b/software/gsl-1.15/roots/falsepos.c @@ -0,0 +1,178 @@ +/* roots/falsepos.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* falsepos.c -- falsepos root finding algorithm + + The false position algorithm uses bracketing by linear interpolation. + + If a linear interpolation step would decrease the size of the + bracket by less than a bisection step would then the algorithm + takes a bisection step instead. + + The last linear interpolation estimate of the root is used. If a + bisection step causes it to fall outside the brackets then it is + replaced by the bisection estimate (x_upper + x_lower)/2. + +*/ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + +typedef struct + { + double f_lower, f_upper; + } +falsepos_state_t; + +static int falsepos_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper); +static int falsepos_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper); + +static int +falsepos_init (void * vstate, gsl_function * f, double * root, double x_lower, double x_upper) +{ + falsepos_state_t * state = (falsepos_state_t *) vstate; + + double f_lower, f_upper ; + + *root = 0.5 * (x_lower + x_upper); + + SAFE_FUNC_CALL (f, x_lower, &f_lower); + SAFE_FUNC_CALL (f, x_upper, &f_upper); + + state->f_lower = f_lower; + state->f_upper = f_upper; + + if ((f_lower < 0.0 && f_upper < 0.0) || (f_lower > 0.0 && f_upper > 0.0)) + { + GSL_ERROR ("endpoints do not straddle y=0", GSL_EINVAL); + } + + return GSL_SUCCESS; + +} + +static int +falsepos_iterate (void * vstate, gsl_function * f, double * root, double * x_lower, double * x_upper) +{ + falsepos_state_t * state = (falsepos_state_t *) vstate; + + double x_linear, f_linear; + double x_bisect, f_bisect; + + double x_left = *x_lower ; + double x_right = *x_upper ; + + double f_lower = state->f_lower; + double f_upper = state->f_upper; + + double w ; + + if (f_lower == 0.0) + { + *root = x_left ; + *x_upper = x_left; + return GSL_SUCCESS; + } + + if (f_upper == 0.0) + { + *root = x_right ; + *x_lower = x_right; + return GSL_SUCCESS; + } + + /* Draw a line between f(*lower_bound) and f(*upper_bound) and + note where it crosses the X axis; that's where we will + split the interval. */ + + x_linear = x_right - (f_upper * (x_left - x_right) / (f_lower - f_upper)); + + SAFE_FUNC_CALL (f, x_linear, &f_linear); + + if (f_linear == 0.0) + { + *root = x_linear; + *x_lower = x_linear; + *x_upper = x_linear; + return GSL_SUCCESS; + } + + /* Discard the half of the interval which doesn't contain the root. */ + + if ((f_lower > 0.0 && f_linear < 0.0) || (f_lower < 0.0 && f_linear > 0.0)) + { + *root = x_linear ; + *x_upper = x_linear; + state->f_upper = f_linear; + w = x_linear - x_left ; + } + else + { + *root = x_linear ; + *x_lower = x_linear; + state->f_lower = f_linear; + w = x_right - x_linear; + } + + if (w < 0.5 * (x_right - x_left)) + { + return GSL_SUCCESS ; + } + + x_bisect = 0.5 * (x_left + x_right); + + SAFE_FUNC_CALL (f, x_bisect, &f_bisect); + + if ((f_lower > 0.0 && f_bisect < 0.0) || (f_lower < 0.0 && f_bisect > 0.0)) + { + *x_upper = x_bisect; + state->f_upper = f_bisect; + if (*root > x_bisect) + *root = 0.5 * (x_left + x_bisect) ; + } + else + { + *x_lower = x_bisect; + state->f_lower = f_bisect; + if (*root < x_bisect) + *root = 0.5 * (x_bisect + x_right) ; + } + + return GSL_SUCCESS; +} + + +static const gsl_root_fsolver_type falsepos_type = +{"falsepos", /* name */ + sizeof (falsepos_state_t), + &falsepos_init, + &falsepos_iterate}; + +const gsl_root_fsolver_type * gsl_root_fsolver_falsepos = &falsepos_type; diff --git a/software/gsl-1.15/roots/fdfsolver.c b/software/gsl-1.15/roots/fdfsolver.c new file mode 100644 index 000000000..cfd95355d --- /dev/null +++ b/software/gsl-1.15/roots/fdfsolver.c @@ -0,0 +1,89 @@ +/* roots/fdfsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_root_fdfsolver * +gsl_root_fdfsolver_alloc (const gsl_root_fdfsolver_type * T) +{ + + gsl_root_fdfsolver * s = (gsl_root_fdfsolver *) malloc (sizeof (gsl_root_fdfsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for root solver struct", + GSL_ENOMEM, 0); + }; + + s->state = malloc (T->size); + + if (s->state == 0) + { + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for root solver state", + GSL_ENOMEM, 0); + }; + + s->type = T ; + s->fdf = NULL; + + return s; +} + +int +gsl_root_fdfsolver_set (gsl_root_fdfsolver * s, gsl_function_fdf * f, double root) +{ + s->fdf = f; + s->root = root; + + return (s->type->set) (s->state, s->fdf, &(s->root)); +} + +int +gsl_root_fdfsolver_iterate (gsl_root_fdfsolver * s) +{ + return (s->type->iterate) (s->state, s->fdf, &(s->root)); +} + +void +gsl_root_fdfsolver_free (gsl_root_fdfsolver * s) +{ + RETURN_IF_NULL (s); + free (s->state); + free (s); +} + +const char * +gsl_root_fdfsolver_name (const gsl_root_fdfsolver * s) +{ + return s->type->name; +} + +double +gsl_root_fdfsolver_root (const gsl_root_fdfsolver * s) +{ + return s->root; +} + + diff --git a/software/gsl-1.15/roots/fsolver.c b/software/gsl-1.15/roots/fsolver.c new file mode 100644 index 000000000..8f586bb66 --- /dev/null +++ b/software/gsl-1.15/roots/fsolver.c @@ -0,0 +1,108 @@ +/* roots/fsolver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +gsl_root_fsolver * +gsl_root_fsolver_alloc (const gsl_root_fsolver_type * T) +{ + gsl_root_fsolver * s = (gsl_root_fsolver *) malloc (sizeof (gsl_root_fsolver)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for root solver struct", + GSL_ENOMEM, 0); + }; + + s->state = malloc (T->size); + + if (s->state == 0) + { + free (s); /* exception in constructor, avoid memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for root solver state", + GSL_ENOMEM, 0); + }; + + s->type = T ; + s->function = NULL ; + + return s; +} + +int +gsl_root_fsolver_set (gsl_root_fsolver * s, gsl_function * f, double x_lower, double x_upper) +{ + if (x_lower > x_upper) + { + GSL_ERROR ("invalid interval (lower > upper)", GSL_EINVAL); + } + + s->function = f; + s->root = 0.5 * (x_lower + x_upper); /* initial estimate */ + s->x_lower = x_lower; + s->x_upper = x_upper; + + return (s->type->set) (s->state, s->function, &(s->root), x_lower, x_upper); +} + +int +gsl_root_fsolver_iterate (gsl_root_fsolver * s) +{ + return (s->type->iterate) (s->state, + s->function, &(s->root), + &(s->x_lower), &(s->x_upper)); +} + +void +gsl_root_fsolver_free (gsl_root_fsolver * s) +{ + RETURN_IF_NULL (s); + free (s->state); + free (s); +} + +const char * +gsl_root_fsolver_name (const gsl_root_fsolver * s) +{ + return s->type->name; +} + +double +gsl_root_fsolver_root (const gsl_root_fsolver * s) +{ + return s->root; +} + +double +gsl_root_fsolver_x_lower (const gsl_root_fsolver * s) +{ + return s->x_lower; +} + +double +gsl_root_fsolver_x_upper (const gsl_root_fsolver * s) +{ + return s->x_upper; +} + diff --git a/software/gsl-1.15/roots/gsl_roots.h b/software/gsl-1.15/roots/gsl_roots.h new file mode 100644 index 000000000..46e458706 --- /dev/null +++ b/software/gsl-1.15/roots/gsl_roots.h @@ -0,0 +1,127 @@ +/* roots/gsl_roots.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_ROOTS_H__ +#define __GSL_ROOTS_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct + { + const char *name; + size_t size; + int (*set) (void *state, gsl_function * f, double * root, double x_lower, double x_upper); + int (*iterate) (void *state, gsl_function * f, double * root, double * x_lower, double * x_upper); + } +gsl_root_fsolver_type; + +typedef struct + { + const gsl_root_fsolver_type * type; + gsl_function * function ; + double root ; + double x_lower; + double x_upper; + void *state; + } +gsl_root_fsolver; + +typedef struct + { + const char *name; + size_t size; + int (*set) (void *state, gsl_function_fdf * f, double * root); + int (*iterate) (void *state, gsl_function_fdf * f, double * root); + } +gsl_root_fdfsolver_type; + +typedef struct + { + const gsl_root_fdfsolver_type * type; + gsl_function_fdf * fdf ; + double root ; + void *state; + } +gsl_root_fdfsolver; + +gsl_root_fsolver * +gsl_root_fsolver_alloc (const gsl_root_fsolver_type * T); +void gsl_root_fsolver_free (gsl_root_fsolver * s); + +int gsl_root_fsolver_set (gsl_root_fsolver * s, + gsl_function * f, + double x_lower, double x_upper); + +int gsl_root_fsolver_iterate (gsl_root_fsolver * s); + +const char * gsl_root_fsolver_name (const gsl_root_fsolver * s); +double gsl_root_fsolver_root (const gsl_root_fsolver * s); +double gsl_root_fsolver_x_lower (const gsl_root_fsolver * s); +double gsl_root_fsolver_x_upper (const gsl_root_fsolver * s); + + +gsl_root_fdfsolver * +gsl_root_fdfsolver_alloc (const gsl_root_fdfsolver_type * T); + +int +gsl_root_fdfsolver_set (gsl_root_fdfsolver * s, + gsl_function_fdf * fdf, double root); + +int +gsl_root_fdfsolver_iterate (gsl_root_fdfsolver * s); + +void +gsl_root_fdfsolver_free (gsl_root_fdfsolver * s); + +const char * gsl_root_fdfsolver_name (const gsl_root_fdfsolver * s); +double gsl_root_fdfsolver_root (const gsl_root_fdfsolver * s); + +int +gsl_root_test_interval (double x_lower, double x_upper, double epsabs, double epsrel); + +int +gsl_root_test_residual (double f, double epsabs); + +int +gsl_root_test_delta (double x1, double x0, double epsabs, double epsrel); + +GSL_VAR const gsl_root_fsolver_type * gsl_root_fsolver_bisection; +GSL_VAR const gsl_root_fsolver_type * gsl_root_fsolver_brent; +GSL_VAR const gsl_root_fsolver_type * gsl_root_fsolver_falsepos; +GSL_VAR const gsl_root_fdfsolver_type * gsl_root_fdfsolver_newton; +GSL_VAR const gsl_root_fdfsolver_type * gsl_root_fdfsolver_secant; +GSL_VAR const gsl_root_fdfsolver_type * gsl_root_fdfsolver_steffenson; + +__END_DECLS + +#endif /* __GSL_ROOTS_H__ */ diff --git a/software/gsl-1.15/roots/newton.c b/software/gsl-1.15/roots/newton.c new file mode 100644 index 000000000..add5e01cc --- /dev/null +++ b/software/gsl-1.15/roots/newton.c @@ -0,0 +1,106 @@ +/* roots/newton.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* newton.c -- newton root finding algorithm + + This is the classical Newton-Raphson iteration. + + x[i+1] = x[i] - f(x[i])/f'(x[i]) + +*/ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + +typedef struct + { + double f, df; + } +newton_state_t; + +static int newton_init (void * vstate, gsl_function_fdf * fdf, double * root); +static int newton_iterate (void * vstate, gsl_function_fdf * fdf, double * root); + +static int +newton_init (void * vstate, gsl_function_fdf * fdf, double * root) +{ + newton_state_t * state = (newton_state_t *) vstate; + + const double x = *root ; + + state->f = GSL_FN_FDF_EVAL_F (fdf, x); + state->df = GSL_FN_FDF_EVAL_DF (fdf, x) ; + + return GSL_SUCCESS; + +} + +static int +newton_iterate (void * vstate, gsl_function_fdf * fdf, double * root) +{ + newton_state_t * state = (newton_state_t *) vstate; + + double root_new, f_new, df_new; + + if (state->df == 0.0) + { + GSL_ERROR("derivative is zero", GSL_EZERODIV); + } + + root_new = *root - (state->f / state->df); + + *root = root_new ; + + GSL_FN_FDF_EVAL_F_DF(fdf, root_new, &f_new, &df_new); + + state->f = f_new ; + state->df = df_new ; + + if (!gsl_finite(f_new)) + { + GSL_ERROR ("function value is not finite", GSL_EBADFUNC); + } + + if (!gsl_finite (df_new)) + { + GSL_ERROR ("derivative value is not finite", GSL_EBADFUNC); + } + + return GSL_SUCCESS; +} + + +static const gsl_root_fdfsolver_type newton_type = +{"newton", /* name */ + sizeof (newton_state_t), + &newton_init, + &newton_iterate}; + +const gsl_root_fdfsolver_type * gsl_root_fdfsolver_newton = &newton_type; diff --git a/software/gsl-1.15/roots/roots.h b/software/gsl-1.15/roots/roots.h new file mode 100644 index 000000000..b869655e3 --- /dev/null +++ b/software/gsl-1.15/roots/roots.h @@ -0,0 +1,37 @@ +/* roots/roots.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* roots.h -- declarations for internal root finding and RF support stuff. */ + +#ifndef __ROOTS_H__ +#define __ROOTS_H__ + +/* Call the pointed-to function with argument x, put its result in y, and + return an error if the function value is Inf/Nan. */ + +#define SAFE_FUNC_CALL(f, x, yp) \ +do { \ + *yp = GSL_FN_EVAL(f,x); \ + if (!gsl_finite(*yp)) \ + GSL_ERROR("function value is not finite", GSL_EBADFUNC); \ +} while (0) + +#endif /* __ROOTS_H__ */ + + diff --git a/software/gsl-1.15/roots/secant.c b/software/gsl-1.15/roots/secant.c new file mode 100644 index 000000000..e5eb077d6 --- /dev/null +++ b/software/gsl-1.15/roots/secant.c @@ -0,0 +1,117 @@ +/* roots/secant.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* secant.c -- secant root finding algorithm + + The secant algorithm is a variant of the Newton algorithm with the + derivative term replaced by a numerical estimate from the last two + function evaluations. + + x[i+1] = x[i] - f(x[i]) / f'_est + + where f'_est = (f(x[i]) - f(x[i-1])) / (x[i] - x[i-1]) + + The exact derivative is used for the initial value of f'_est. + +*/ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + +typedef struct + { + double f; + double df; + } +secant_state_t; + +static int secant_init (void * vstate, gsl_function_fdf * fdf, double * root); +static int secant_iterate (void * vstate, gsl_function_fdf * fdf, double * root); + +static int +secant_init (void * vstate, gsl_function_fdf * fdf, double * root) +{ + secant_state_t * state = (secant_state_t *) vstate; + + const double x = *root; + + GSL_FN_FDF_EVAL_F_DF (fdf, x, &(state->f), &(state->df)); + + return GSL_SUCCESS; + +} + +static int +secant_iterate (void * vstate, gsl_function_fdf * fdf, double * root) +{ + secant_state_t * state = (secant_state_t *) vstate; + + const double x = *root ; + const double f = state->f; + const double df = state->df; + + double x_new, f_new, df_new; + + if (state->df == 0.0) + { + GSL_ERROR("derivative is zero", GSL_EZERODIV); + } + + x_new = x - (f / df); + + f_new = GSL_FN_FDF_EVAL_F(fdf, x_new) ; + df_new = (f_new - f) / (x_new - x) ; + + *root = x_new ; + + state->f = f_new ; + state->df = df_new ; + + if (!gsl_finite (f_new)) + { + GSL_ERROR ("function value is not finite", GSL_EBADFUNC); + } + + if (!gsl_finite (df_new)) + { + GSL_ERROR ("derivative value is not finite", GSL_EBADFUNC); + } + + return GSL_SUCCESS; +} + + +static const gsl_root_fdfsolver_type secant_type = +{"secant", /* name */ + sizeof (secant_state_t), + &secant_init, + &secant_iterate}; + +const gsl_root_fdfsolver_type * gsl_root_fdfsolver_secant = &secant_type; diff --git a/software/gsl-1.15/roots/steffenson.c b/software/gsl-1.15/roots/steffenson.c new file mode 100644 index 000000000..cef77cff6 --- /dev/null +++ b/software/gsl-1.15/roots/steffenson.c @@ -0,0 +1,144 @@ +/* roots/steffenson.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* steffenson.c -- steffenson root finding algorithm + + This is Newton's method with an Aitken "delta-squared" + acceleration of the iterates. This can improve the convergence on + multiple roots where the ordinary Newton algorithm is slow. + + x[i+1] = x[i] - f(x[i]) / f'(x[i]) + + x_accelerated[i] = x[i] - (x[i+1] - x[i])**2 / (x[i+2] - 2*x[i+1] + x[i]) + + We can only use the accelerated estimate after three iterations, + and use the unaccelerated value until then. + + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "roots.h" + +typedef struct + { + double f, df; + double x; + double x_1; + double x_2; + int count; + } +steffenson_state_t; + +static int steffenson_init (void * vstate, gsl_function_fdf * fdf, double * root); +static int steffenson_iterate (void * vstate, gsl_function_fdf * fdf, double * root); + +static int +steffenson_init (void * vstate, gsl_function_fdf * fdf, double * root) +{ + steffenson_state_t * state = (steffenson_state_t *) vstate; + + const double x = *root ; + + state->f = GSL_FN_FDF_EVAL_F (fdf, x); + state->df = GSL_FN_FDF_EVAL_DF (fdf, x) ; + + state->x = x; + state->x_1 = 0.0; + state->x_2 = 0.0; + + state->count = 1; + + return GSL_SUCCESS; + +} + +static int +steffenson_iterate (void * vstate, gsl_function_fdf * fdf, double * root) +{ + steffenson_state_t * state = (steffenson_state_t *) vstate; + + double x_new, f_new, df_new; + + double x_1 = state->x_1 ; + double x = state->x ; + + if (state->df == 0.0) + { + GSL_ERROR("derivative is zero", GSL_EZERODIV); + } + + x_new = x - (state->f / state->df); + + GSL_FN_FDF_EVAL_F_DF(fdf, x_new, &f_new, &df_new); + + state->x_2 = x_1 ; + state->x_1 = x ; + state->x = x_new; + + state->f = f_new ; + state->df = df_new ; + + if (!gsl_finite (f_new)) + { + GSL_ERROR ("function value is not finite", GSL_EBADFUNC); + } + + if (state->count < 3) + { + *root = x_new ; + state->count++ ; + } + else + { + double u = (x - x_1) ; + double v = (x_new - 2 * x + x_1); + + if (v == 0) + *root = x_new; /* avoid division by zero */ + else + *root = x_1 - u * u / v ; /* accelerated value */ + } + + if (!gsl_finite (df_new)) + { + GSL_ERROR ("derivative value is not finite", GSL_EBADFUNC); + } + + return GSL_SUCCESS; +} + + +static const gsl_root_fdfsolver_type steffenson_type = +{"steffenson", /* name */ + sizeof (steffenson_state_t), + &steffenson_init, + &steffenson_iterate}; + +const gsl_root_fdfsolver_type * gsl_root_fdfsolver_steffenson = &steffenson_type; diff --git a/software/gsl-1.15/roots/test.c b/software/gsl-1.15/roots/test.c new file mode 100644 index 000000000..2651d225f --- /dev/null +++ b/software/gsl-1.15/roots/test.c @@ -0,0 +1,315 @@ +/* roots/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "roots.h" +#include "test.h" + +/* stopping parameters */ +const double EPSREL = (10 * GSL_DBL_EPSILON); +const double EPSABS = (10 * GSL_DBL_EPSILON); +const unsigned int MAX_ITERATIONS = 150; + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +#define WITHIN_TOL(a, b, epsrel, epsabs) \ + ((fabs((a) - (b)) < (epsrel) * GSL_MIN(fabs(a), fabs(b)) + (epsabs))) + +int +main (void) +{ + gsl_function F_sin, F_cos, F_func1, F_func2, F_func3, F_func4, + F_func5, F_func6; + + gsl_function_fdf FDF_sin, FDF_cos, FDF_func1, FDF_func2, FDF_func3, FDF_func4, + FDF_func5, FDF_func6; + + const gsl_root_fsolver_type * fsolver[4] ; + const gsl_root_fdfsolver_type * fdfsolver[4] ; + + const gsl_root_fsolver_type ** T; + const gsl_root_fdfsolver_type ** S; + + gsl_ieee_env_setup(); + + fsolver[0] = gsl_root_fsolver_bisection; + fsolver[1] = gsl_root_fsolver_brent; + fsolver[2] = gsl_root_fsolver_falsepos; + fsolver[3] = 0; + + fdfsolver[0] = gsl_root_fdfsolver_newton; + fdfsolver[1] = gsl_root_fdfsolver_secant; + fdfsolver[2] = gsl_root_fdfsolver_steffenson; + fdfsolver[3] = 0; + + F_sin = create_function (sin_f) ; + F_cos = create_function (cos_f) ; + F_func1 = create_function (func1) ; + F_func2 = create_function (func2) ; + F_func3 = create_function (func3) ; + F_func4 = create_function (func4) ; + F_func5 = create_function (func5) ; + F_func6 = create_function (func6) ; + + FDF_sin = create_fdf (sin_f, sin_df, sin_fdf) ; + FDF_cos = create_fdf (cos_f, cos_df, cos_fdf) ; + FDF_func1 = create_fdf (func1, func1_df, func1_fdf) ; + FDF_func2 = create_fdf (func2, func2_df, func2_fdf) ; + FDF_func3 = create_fdf (func3, func3_df, func3_fdf) ; + FDF_func4 = create_fdf (func4, func4_df, func4_fdf) ; + FDF_func5 = create_fdf (func5, func5_df, func5_fdf) ; + FDF_func6 = create_fdf (func6, func6_df, func6_fdf) ; + + gsl_set_error_handler (&my_error_handler); + + for (T = fsolver ; *T != 0 ; T++) + { + test_f (*T, "sin(x) [3, 4]", &F_sin, 3.0, 4.0, M_PI); + test_f (*T, "sin(x) [-4, -3]", &F_sin, -4.0, -3.0, -M_PI); + test_f (*T, "sin(x) [-1/3, 1]", &F_sin, -1.0 / 3.0, 1.0, 0.0); + test_f (*T, "cos(x) [0, 3]", &F_cos, 0.0, 3.0, M_PI / 2.0); + test_f (*T, "cos(x) [-3, 0]", &F_cos, -3.0, 0.0, -M_PI / 2.0); + test_f (*T, "x^20 - 1 [0.1, 2]", &F_func1, 0.1, 2.0, 1.0); + test_f (*T, "sqrt(|x|)*sgn(x)", &F_func2, -1.0 / 3.0, 1.0, 0.0); + test_f (*T, "x^2 - 1e-8 [0, 1]", &F_func3, 0.0, 1.0, sqrt (1e-8)); + test_f (*T, "x exp(-x) [-1/3, 2]", &F_func4, -1.0 / 3.0, 2.0, 0.0); + test_f (*T, "(x - 1)^7 [0.9995, 1.0002]", &F_func6, 0.9995, 1.0002, 1.0); + + test_f_e (*T, "invalid range check [4, 0]", &F_sin, 4.0, 0.0, M_PI); + test_f_e (*T, "invalid range check [1, 1]", &F_sin, 1.0, 1.0, M_PI); + test_f_e (*T, "invalid range check [0.1, 0.2]", &F_sin, 0.1, 0.2, M_PI); + } + + for (S = fdfsolver ; *S != 0 ; S++) + { + test_fdf (*S,"sin(x) {3.4}", &FDF_sin, 3.4, M_PI); + test_fdf (*S,"sin(x) {-3.3}", &FDF_sin, -3.3, -M_PI); + test_fdf (*S,"sin(x) {0.5}", &FDF_sin, 0.5, 0.0); + test_fdf (*S,"cos(x) {0.6}", &FDF_cos, 0.6, M_PI / 2.0); + test_fdf (*S,"cos(x) {-2.5}", &FDF_cos, -2.5, -M_PI / 2.0); + test_fdf (*S,"x^{20} - 1 {0.9}", &FDF_func1, 0.9, 1.0); + test_fdf (*S,"x^{20} - 1 {1.1}", &FDF_func1, 1.1, 1.0); + test_fdf (*S,"sqrt(|x|)*sgn(x) {1.001}", &FDF_func2, 0.001, 0.0); + test_fdf (*S,"x^2 - 1e-8 {1}", &FDF_func3, 1.0, sqrt (1e-8)); + test_fdf (*S,"x exp(-x) {-2}", &FDF_func4, -2.0, 0.0); + test_fdf_e (*S,"max iterations x -> +Inf, x exp(-x) {2}", &FDF_func4, 2.0, 0.0); + test_fdf_e (*S,"max iterations x -> -Inf, 1/(1 + exp(-x)) {0}", &FDF_func5, 0.0, 0.0); + } + + test_fdf (gsl_root_fdfsolver_steffenson, + "(x - 1)^7 {0.9}", &FDF_func6, 0.9, 1.0); + + /* now summarize the results */ + + exit (gsl_test_summary ()); +} + + +/* Using gsl_root_bisection, find the root of the function pointed to by f, + using the interval [lower_bound, upper_bound]. Check if f succeeded and + that it was accurate enough. */ + +void +test_f (const gsl_root_fsolver_type * T, const char * description, gsl_function *f, + double lower_bound, double upper_bound, double correct_root) +{ + int status; + size_t iterations = 0; + double r, a, b; + double x_lower, x_upper; + gsl_root_fsolver * s; + + x_lower = lower_bound; + x_upper = upper_bound; + + s = gsl_root_fsolver_alloc(T); + gsl_root_fsolver_set(s, f, x_lower, x_upper) ; + + do + { + iterations++ ; + + gsl_root_fsolver_iterate (s); + + r = gsl_root_fsolver_root(s); + + a = gsl_root_fsolver_x_lower(s); + b = gsl_root_fsolver_x_upper(s); + + if (a > b) + gsl_test (GSL_FAILURE, "interval is invalid (%g,%g)", a, b); + + if (r < a || r > b) + gsl_test (GSL_FAILURE, "r lies outside interval %g (%g,%g)", r, a, b); + + status = gsl_root_test_interval (a,b, EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + + gsl_test (status, "%s, %s (%g obs vs %g expected) ", + gsl_root_fsolver_name(s), description, + gsl_root_fsolver_root(s), correct_root); + + if (iterations == MAX_ITERATIONS) + { + gsl_test (GSL_FAILURE, "exceeded maximum number of iterations"); + } + + /* check the validity of the returned result */ + + if (!WITHIN_TOL (r, correct_root, EPSREL, EPSABS)) + { + gsl_test (GSL_FAILURE, "incorrect precision (%g obs vs %g expected)", + r, correct_root); + + } + + gsl_root_fsolver_free(s); +} + +void +test_f_e (const gsl_root_fsolver_type * T, + const char * description, gsl_function *f, + double lower_bound, double upper_bound, double correct_root) +{ + int status; + size_t iterations = 0; + double x_lower, x_upper; + gsl_root_fsolver * s; + + x_lower = lower_bound; + x_upper = upper_bound; + + s = gsl_root_fsolver_alloc(T); + status = gsl_root_fsolver_set(s, f, x_lower, x_upper) ; + + gsl_test (status != GSL_EINVAL, "%s (set), %s", T->name, description); + + if (status == GSL_EINVAL) + { + gsl_root_fsolver_free(s); + return ; + } + + do + { + iterations++ ; + gsl_root_fsolver_iterate (s); + x_lower = gsl_root_fsolver_x_lower(s); + x_upper = gsl_root_fsolver_x_lower(s); + status = gsl_root_test_interval (x_lower, x_upper, + EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + gsl_test (!status, "%s, %s", gsl_root_fsolver_name(s), description, + gsl_root_fsolver_root(s) - correct_root); + + gsl_root_fsolver_free(s); +} + +void +test_fdf (const gsl_root_fdfsolver_type * T, const char * description, + gsl_function_fdf *fdf, double root, double correct_root) +{ + int status; + size_t iterations = 0; + double prev = 0 ; + + gsl_root_fdfsolver * s = gsl_root_fdfsolver_alloc(T); + gsl_root_fdfsolver_set (s, fdf, root) ; + + do + { + iterations++ ; + prev = gsl_root_fdfsolver_root(s); + gsl_root_fdfsolver_iterate (s); + status = gsl_root_test_delta(gsl_root_fdfsolver_root(s), prev, + EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + gsl_test (status, "%s, %s (%g obs vs %g expected) ", + gsl_root_fdfsolver_name(s), description, + gsl_root_fdfsolver_root(s), correct_root); + + if (iterations == MAX_ITERATIONS) + { + gsl_test (GSL_FAILURE, "exceeded maximum number of iterations"); + } + + /* check the validity of the returned result */ + + if (!WITHIN_TOL (gsl_root_fdfsolver_root(s), correct_root, + EPSREL, EPSABS)) + { + gsl_test (GSL_FAILURE, "incorrect precision (%g obs vs %g expected)", + gsl_root_fdfsolver_root(s), correct_root); + + } + gsl_root_fdfsolver_free(s); +} + +void +test_fdf_e (const gsl_root_fdfsolver_type * T, + const char * description, gsl_function_fdf *fdf, + double root, double correct_root) +{ + int status; + size_t iterations = 0; + double prev = 0 ; + + gsl_root_fdfsolver * s = gsl_root_fdfsolver_alloc(T); + status = gsl_root_fdfsolver_set (s, fdf, root) ; + + gsl_test (status, "%s (set), %s", T->name, description); + + do + { + iterations++ ; + prev = gsl_root_fdfsolver_root(s); + gsl_root_fdfsolver_iterate (s); + status = gsl_root_test_delta(gsl_root_fdfsolver_root(s), prev, + EPSABS, EPSREL); + } + while (status == GSL_CONTINUE && iterations < MAX_ITERATIONS); + + gsl_test (!status, "%s, %s", gsl_root_fdfsolver_name(s), + description, gsl_root_fdfsolver_root(s) - correct_root); + gsl_root_fdfsolver_free(s); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); +} + + + diff --git a/software/gsl-1.15/roots/test.h b/software/gsl-1.15/roots/test.h new file mode 100644 index 000000000..c15b56ed6 --- /dev/null +++ b/software/gsl-1.15/roots/test.h @@ -0,0 +1,129 @@ +/* roots/test.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +gsl_function create_function (double (*f)(double, void *)) ; +gsl_function_fdf create_fdf (double (*f)(double, void *), + double (*df)(double, void *), + void (*fdf)(double, void *, double *, double *)); + +void + test_macros (void); + +void + test_roots (void); + +void + test_poly (void); + +void +test_f (const gsl_root_fsolver_type * T, + const char * description, gsl_function *f, + double lower_bound, double upper_bound, double correct_root); + +void +test_f_e (const gsl_root_fsolver_type * T, const char * description, + gsl_function *f, + double lower_bound, double upper_bound, double correct_root); + +void +test_fdf (const gsl_root_fdfsolver_type * T, const char * description, + gsl_function_fdf *fdf, double root, double correct_root); + +void +test_fdf_e (const gsl_root_fdfsolver_type * T, const char * description, + gsl_function_fdf *fdf, double root, double correct_root); + + +void + usage (void); + +void + error_handler (const char *reason, const char *file, int line); + +double + func1 (double x, void * p); + +double + func1_df (double x, void * p); + +void + func1_fdf (double x, void * p, double *y, double *yprime); + +double + func2 (double x, void * p); + +double + func2_df (double x, void * p); + +void + func2_fdf (double x, void * p, double *y, double *yprime); + +double + func3 (double x, void * p); + +double + func3_df (double x, void * p); + +void + func3_fdf (double x, void * p, double *y, double *yprime); + +double + func4 (double x, void * p); + +double + func4_df (double x, void * p); + +void + func4_fdf (double x, void * p, double *y, double *yprime); + +double + func5 (double x, void * p); + +double + func5_df (double x, void * p); + +void + func5_fdf (double x, void * p, double *y, double *yprime); + +double + func6 (double x, void * p); + +double + func6_df (double x, void * p); + +void + func6_fdf (double x, void * p, double *y, double *yprime); + +double + sin_f (double x, void * p); + +double + sin_df (double x, void * p); + +void + sin_fdf (double x, void * p, double *y, double *yprime); + +double + cos_f (double x, void * p); + +double + cos_df (double x, void * p); + +void + cos_fdf (double x, void * p, double *y, double *yprime); diff --git a/software/gsl-1.15/roots/test_funcs.c b/software/gsl-1.15/roots/test_funcs.c new file mode 100644 index 000000000..9b8f05e05 --- /dev/null +++ b/software/gsl-1.15/roots/test_funcs.c @@ -0,0 +1,229 @@ +/* roots/test_funcs.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "test.h" + +gsl_function create_function (double (*f)(double, void *)) +{ + gsl_function F ; + F.function = f; + F.params = 0; + return F ; +} + +gsl_function_fdf create_fdf (double (*f)(double, void *), + double (*df)(double, void *), + void (*fdf)(double, void *, double *, double *)) +{ + gsl_function_fdf FDF ; + FDF.f = f ; + FDF.df = df ; + FDF.fdf = fdf ; + FDF.params = 0 ; + return FDF ; +} + +/* f(x) = x^{20} - 1 */ +/* f'(x) = 20x^{19} */ +/* zero at x = 1 or -1 */ + +double +func1 (double x, void *p) +{ + return pow (x, 20.0) - 1; +} + +double +func1_df (double x, void * p) +{ + return 20.0 * pow (x, 19.0); +} + +void +func1_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func1 (x, p); + *yprime = 20.0 * pow (x, 19.0); +} + +/* f(x) = sqrt(abs(x))*sgn(x) */ +/* f'(x) = 1 / sqrt(abs(x) */ +/* zero at x = 0 */ +double +func2 (double x, void * p) +{ + double delta; + + if (x > 0) + delta = 1.0; + else if (x < 0) + delta = -1.0; + else + delta = 0.0; + + return sqrt (fabs (x)) * delta; +} + +double +func2_df (double x, void * p) +{ + return 1 / sqrt (fabs (x)); +} + +void +func2_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func2 (x, p); + *yprime = 1 / sqrt (fabs (x)); +} + + +/* f(x) = x^2 - 1e-8 */ +/* f'(x) = 2x */ +/* zero at x = sqrt(1e-8) or -sqrt(1e-8) */ +double +func3 (double x, void * p) +{ + return pow (x, 2.0) - 1e-8; +} + +double +func3_df (double x, void * p) +{ + return 2 * x; +} + +void +func3_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func3 (x, p); + *yprime = 2 * x; +} + +/* f(x) = x exp(-x) */ +/* f'(x) = exp(-x) - x exp(-x) */ +/* zero at x = 0 */ +double +func4 (double x, void * p) +{ + return x * exp (-x); +} + +double +func4_df (double x, void * p) +{ + return exp (-x) - x * exp (-x); +} + +void +func4_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func4 (x, p); + *yprime = exp (-x) - x * exp (-x); +} + +/* f(x) = 1/(1+exp(x)) */ +/* f'(x) = -exp(x) / (1 + exp(x))^2 */ +/* no roots! */ +double +func5 (double x, void * p) +{ + return 1 / (1 + exp (x)); +} + +double +func5_df (double x, void * p) +{ + return -exp (x) / pow (1 + exp (x), 2.0); +} + +void +func5_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func5 (x, p); + *yprime = -exp (x) / pow (1 + exp (x), 2.0); +} + +/* f(x) = (x - 1)^7 */ +/* f'(x) = 7 * (x - 1)^6 */ +/* zero at x = 1 */ +double +func6 (double x, void * p) +{ + return pow (x - 1, 7.0); +} + +double +func6_df (double x, void * p) +{ + return 7.0 * pow (x - 1, 6.0); +} + +void +func6_fdf (double x, void * p, double *y, double *yprime) +{ + *y = func6 (x, p); + *yprime = 7.0 * pow (x - 1, 6.0); +} + +/* sin(x) packaged up nicely. */ +double +sin_f (double x, void * p) +{ + return sin (x); +} + +double +sin_df (double x, void * p) +{ + return cos (x); +} + +void +sin_fdf (double x, void * p, double *y, double *yprime) +{ + *y = sin (x); + *yprime = cos (x); +} + +/* cos(x) packaged up nicely. */ +double +cos_f (double x, void * p) +{ + return cos (x); +} + +double +cos_df (double x, void * p) +{ + return -sin (x); +} + +void +cos_fdf (double x, void * p, double *y, double *yprime) +{ + *y = cos (x); + *yprime = -sin (x); +} diff --git a/software/gsl-1.15/siman/.deps/siman.Plo b/software/gsl-1.15/siman/.deps/siman.Plo new file mode 100644 index 000000000..c202d88bf --- /dev/null +++ b/software/gsl-1.15/siman/.deps/siman.Plo @@ -0,0 +1,130 @@ +siman.lo: siman.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/assert.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_rng.h ../gsl/gsl_types.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_inline.h \ + ../gsl/gsl_siman.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/assert.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_siman.h: diff --git a/software/gsl-1.15/siman/.deps/siman_tsp.Po b/software/gsl-1.15/siman/.deps/siman_tsp.Po new file mode 100644 index 000000000..82c416c71 --- /dev/null +++ b/software/gsl-1.15/siman/.deps/siman_tsp.Po @@ -0,0 +1,143 @@ +siman_tsp.o: siman_tsp.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/string.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + /usr/include/secure/_common.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_rng.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_siman.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_rng.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_siman.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/siman/.deps/test.Po b/software/gsl-1.15/siman/.deps/test.Po new file mode 100644 index 000000000..797c0a1d5 --- /dev/null +++ b/software/gsl-1.15/siman/.deps/test.Po @@ -0,0 +1,112 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/math.h ../gsl/gsl_test.h ../gsl/gsl_rng.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h ../gsl/gsl_siman.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_test.h: + +../gsl/gsl_rng.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_siman.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/siman/ChangeLog b/software/gsl-1.15/siman/ChangeLog new file mode 100644 index 000000000..8c311fcb6 --- /dev/null +++ b/software/gsl-1.15/siman/ChangeLog @@ -0,0 +1,129 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-05-30 Brian Gough + + * siman.c (boltzmann): moved safe_exp into boltzmann + (copy_state): put all copying into one function + +2006-03-08 Brian Gough + + * test.c (square): removed inline since it causes problems with + some compilers + +2005-11-14 Brian Gough + + * siman.c (safe_exp): added a safe_exp function to avoid underflow + for large uphill steps + +2003-03-31 Brian Gough + + * siman.c (gsl_siman_solve): avoid reevaluation for best_E + (gsl_siman_solve): loop over param.iters_fixed_T not + params.n_tries + (gsl_siman_solve): initialise energy at start + +Sat Aug 3 20:32:38 2002 Brian Gough + + * siman.c (gsl_siman_solve): fix acceptance criterion to match + documentation (Peter S. Christopher) + +Thu Jun 13 20:57:00 2002 Brian Gough + + * siman.c (gsl_siman_solve): keep track of the best result + +2002-02-07 Mark Galassi + + * siman.c (gsl_siman_solve): bug fix in the destructor for x and + new_x which was being called on &x and &new_x instead of x and + new_x; thanks to Karsten Howes + +Thu Jul 12 21:50:07 2001 Brian Gough + + * gsl_siman.h: changed renamed gsl_Efunc_t to gsl_siman_Efunc_t, + in accordance with namespace conventions + +2000-12-15 Mark Galassi + + * siman.c (gsl_siman_solve): reversed a small change I had made + earlier and went back to taking Boltzmann-conditional steps when + the new energy is equal to the previous one. This allows you to + move around if you are stuck on a plateau. + + * gsl_siman.h, siman.c, siman_test.c, siman_tsp.c, test.c: changed + the siman_solve API to allow for more general search spaces. The + problem was that we assumed that points in the search space were + data structures that were allocated in continguous memory, so they + could not be linked structures. I replaced the malloc(), memcpy() + and free() calls with copy_constructor(), copyfunc() and + copy_destructor() functions. The user passes these functions, + which means that siman_solve() now takes three more arguments of + type gsl_siman_copy_t, gsl_siman_copy_construct_t and + gsl_siman_destroy_t. If these arguments are NULL (and all three + of them have to be NULL together), the traditional memcpy() + approach is used. + +1999-02-14 Mark Galassi + + * minor fixes. + +Tue Nov 17 17:22:14 1998 Brian Gough + + * added #include to all top-level source files + +Sun Nov 8 20:40:28 1998 Brian Gough + + * siman_tsp.c: clean up for make strict + +1998-11-06 + + * test.c: added prototype for memcpy using #include + + * siman_test.c: added prototype for memcpy using #include + +Wed Oct 28 15:06:58 1998 Brian Gough + + * siman.c: added #include for memcpy + +Thu Aug 20 12:22:28 1998 Brian Gough + + * siman.c: use (char *) judiciously to avoid warnings about void + pointer arithmetic (see randist/shuffle.c for similar examples) + + * siman_test.c: perform several tests, using the exact answer as + the comparison value, rather than checking for stationarity. + +Sun Jun 28 14:11:04 1998 Brian Gough + + * Converted to work with rng-style random number generators + + * gsl_siman.h: gsl_siman_step_t type functions now take a gsl_rng + random number generator as their first argument + + * siman.c (gsl_siman_solve): Now takes a gsl_rng random number + generator as the first argument + +Fri Jun 19 11:17:24 1998 Brian Gough + + * siman.c (gsl_siman_solve_many): changed the variable 'throw' to + 'u' (for uniform-random-number) so that we can compile with c++ + where throw is a reserved word. + +Sat May 23 13:59:55 1998 Brian Gough + + * siman.c: made the solving functions deterministic by removing + the random seed, gsl_ran_seed(time(0L)). When the function is + non-deterministic it is hard to debug and test (about 1 time in 20 + the test would fail due to the randomness). We can let the user do + the seeding if they need that. + +1998-02-09 Mark Galassi + + * siman_test_driver.sh (LAST_ENERGY): fixed a typo; the tests now + report well when they converge. + +1998-01-30 Mark Galassi + + * siman_test_driver.sh, Makefile.am (TESTS): added a test driver + so that now "make check" does something interesting. diff --git a/software/gsl-1.15/siman/Makefile.am b/software/gsl-1.15/siman/Makefile.am new file mode 100644 index 000000000..0870b63d7 --- /dev/null +++ b/software/gsl-1.15/siman/Makefile.am @@ -0,0 +1,21 @@ +## Process this file with automake to produce Makefile.in + +check_PROGRAMS = test +noinst_PROGRAMS = siman_tsp +noinst_LTLIBRARIES = libgslsiman.la + +TESTS = $(check_PROGRAMS) +EXTRA_DIST = siman_test_driver.sh + +test_SOURCES = test.c +test_LDADD = libgslsiman.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +siman_tsp_SOURCES = siman_tsp.c +siman_tsp_LDADD = libgslsiman.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../sys/libgslsys.la ../utils/libutils.la + +CLEANFILES = siman_test.out + +libgslsiman_la_SOURCES = siman.c +pkginclude_HEADERS = gsl_siman.h + +INCLUDES = -I$(top_srcdir) diff --git a/software/gsl-1.15/siman/Makefile.in b/software/gsl-1.15/siman/Makefile.in new file mode 100644 index 000000000..faf8194d2 --- /dev/null +++ b/software/gsl-1.15/siman/Makefile.in @@ -0,0 +1,689 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +noinst_PROGRAMS = siman_tsp$(EXEEXT) +subdir = siman +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslsiman_la_LIBADD = +am_libgslsiman_la_OBJECTS = siman.lo +libgslsiman_la_OBJECTS = $(am_libgslsiman_la_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +am_siman_tsp_OBJECTS = siman_tsp.$(OBJEXT) +siman_tsp_OBJECTS = $(am_siman_tsp_OBJECTS) +siman_tsp_DEPENDENCIES = libgslsiman.la ../rng/libgslrng.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../sys/libgslsys.la ../utils/libutils.la +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslsiman.la ../rng/libgslrng.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslsiman_la_SOURCES) $(siman_tsp_SOURCES) \ + $(test_SOURCES) +DIST_SOURCES = $(libgslsiman_la_SOURCES) $(siman_tsp_SOURCES) \ + $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslsiman.la +TESTS = $(check_PROGRAMS) +EXTRA_DIST = siman_test_driver.sh +test_SOURCES = test.c +test_LDADD = libgslsiman.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +siman_tsp_SOURCES = siman_tsp.c +siman_tsp_LDADD = libgslsiman.la ../rng/libgslrng.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../sys/libgslsys.la ../utils/libutils.la +CLEANFILES = siman_test.out +libgslsiman_la_SOURCES = siman.c +pkginclude_HEADERS = gsl_siman.h +INCLUDES = -I$(top_srcdir) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu siman/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu siman/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslsiman.la: $(libgslsiman_la_OBJECTS) $(libgslsiman_la_DEPENDENCIES) + $(LINK) $(libgslsiman_la_OBJECTS) $(libgslsiman_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +siman_tsp$(EXEEXT): $(siman_tsp_OBJECTS) $(siman_tsp_DEPENDENCIES) + @rm -f siman_tsp$(EXEEXT) + $(LINK) $(siman_tsp_OBJECTS) $(siman_tsp_LDADD) $(LIBS) +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siman_tsp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/siman/TODO b/software/gsl-1.15/siman/TODO new file mode 100644 index 000000000..86ad467a9 --- /dev/null +++ b/software/gsl-1.15/siman/TODO @@ -0,0 +1,9 @@ +# -*- org -*- +#+CATEGORY: siman + +* Reorganize siman interfaces to allow iterative use. + +* Maybe the routines can be made to work with pointers instead of structs + so that only pointer manipulation is done by the siman algorithm and + there is no need for malloc. A call would look something like + siman(&start,&result, ...) diff --git a/software/gsl-1.15/siman/gsl_siman.h b/software/gsl-1.15/siman/gsl_siman.h new file mode 100644 index 000000000..a16f7c7c7 --- /dev/null +++ b/software/gsl-1.15/siman/gsl_siman.h @@ -0,0 +1,82 @@ +/* siman/gsl_siman.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SIMAN_H__ +#define __GSL_SIMAN_H__ +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* types for the function pointers passed to gsl_siman_solve */ + +typedef double (*gsl_siman_Efunc_t) (void *xp); +typedef void (*gsl_siman_step_t) (const gsl_rng *r, void *xp, double step_size); +typedef double (*gsl_siman_metric_t) (void *xp, void *yp); +typedef void (*gsl_siman_print_t) (void *xp); +typedef void (*gsl_siman_copy_t) (void *source, void *dest); +typedef void * (*gsl_siman_copy_construct_t) (void *xp); +typedef void (*gsl_siman_destroy_t) (void *xp); + +/* this structure contains all the information needed to structure the + search, beyond the energy function, the step function and the + initial guess. */ + +typedef struct { + int n_tries; /* how many points to try for each step */ + int iters_fixed_T; /* how many iterations at each temperature? */ + double step_size; /* max step size in the random walk */ + /* the following parameters are for the Boltzmann distribution */ + double k, t_initial, mu_t, t_min; +} gsl_siman_params_t; + +/* prototype for the workhorse function */ + +void gsl_siman_solve(const gsl_rng * r, + void *x0_p, gsl_siman_Efunc_t Ef, + gsl_siman_step_t take_step, + gsl_siman_metric_t distance, + gsl_siman_print_t print_position, + gsl_siman_copy_t copyfunc, + gsl_siman_copy_construct_t copy_constructor, + gsl_siman_destroy_t destructor, + size_t element_size, + gsl_siman_params_t params); + +void +gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef, + gsl_siman_step_t take_step, + gsl_siman_metric_t distance, + gsl_siman_print_t print_position, + size_t element_size, + gsl_siman_params_t params); + +__END_DECLS + +#endif /* __GSL_SIMAN_H__ */ diff --git a/software/gsl-1.15/siman/siman.c b/software/gsl-1.15/siman/siman.c new file mode 100644 index 000000000..65b9177fe --- /dev/null +++ b/software/gsl-1.15/siman/siman.c @@ -0,0 +1,273 @@ +/* siman/siman.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static inline double +boltzmann(double E, double new_E, double T, gsl_siman_params_t *params) +{ + double x = -(new_E - E) / (params->k * T); + /* avoid underflow errors for large uphill steps */ + return (x < GSL_LOG_DBL_MIN) ? 0.0 : exp(x); +} + +static inline void +copy_state(void *src, void *dst, size_t size, gsl_siman_copy_t copyfunc) +{ + if (copyfunc) { + copyfunc(src, dst); + } else { + memcpy(dst, src, size); + } +} + +/* implementation of a basic simulated annealing algorithm */ + +void +gsl_siman_solve (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef, + gsl_siman_step_t take_step, + gsl_siman_metric_t distance, + gsl_siman_print_t print_position, + gsl_siman_copy_t copyfunc, + gsl_siman_copy_construct_t copy_constructor, + gsl_siman_destroy_t destructor, + size_t element_size, + gsl_siman_params_t params) +{ + void *x, *new_x, *best_x; + double E, new_E, best_E; + int i; + double T, T_factor; + int n_evals = 1, n_iter = 0, n_accepts, n_rejects, n_eless; + + /* this function requires that either the dynamic functions (copy, + copy_constructor and destrcutor) are passed, or that an element + size is given */ + assert((copyfunc != NULL && copy_constructor != NULL && destructor != NULL) + || (element_size != 0)); + + distance = 0 ; /* This parameter is not currently used */ + E = Ef(x0_p); + + if (copyfunc) { + x = copy_constructor(x0_p); + new_x = copy_constructor(x0_p); + best_x = copy_constructor(x0_p); + } else { + x = (void *) malloc (element_size); + memcpy (x, x0_p, element_size); + new_x = (void *) malloc (element_size); + best_x = (void *) malloc (element_size); + memcpy (best_x, x0_p, element_size); + } + + best_E = E; + + T = params.t_initial; + T_factor = 1.0 / params.mu_t; + + if (print_position) { + printf ("#-iter #-evals temperature position energy\n"); + } + + while (1) { + + n_accepts = 0; + n_rejects = 0; + n_eless = 0; + + for (i = 0; i < params.iters_fixed_T; ++i) { + + copy_state(x, new_x, element_size, copyfunc); + + take_step (r, new_x, params.step_size); + new_E = Ef (new_x); + + if(new_E <= best_E){ + if (copyfunc) { + copyfunc(new_x,best_x); + } else { + memcpy (best_x, new_x, element_size); + } + best_E=new_E; + } + + ++n_evals; /* keep track of Ef() evaluations */ + /* now take the crucial step: see if the new point is accepted + or not, as determined by the boltzmann probability */ + if (new_E < E) { + + if (new_E < best_E) { + copy_state(new_x, best_x, element_size, copyfunc); + best_E = new_E; + } + + /* yay! take a step */ + copy_state(new_x, x, element_size, copyfunc); + E = new_E; + ++n_eless; + + } else if (gsl_rng_uniform(r) < boltzmann(E, new_E, T, ¶ms)) { + /* yay! take a step */ + copy_state(new_x, x, element_size, copyfunc); + E = new_E; + ++n_accepts; + + } else { + ++n_rejects; + } + } + + if (print_position) { + /* see if we need to print stuff as we go */ + /* printf("%5d %12g %5d %3d %3d %3d", n_iter, T, n_evals, */ + /* 100*n_eless/n_steps, 100*n_accepts/n_steps, */ + /* 100*n_rejects/n_steps); */ + printf ("%5d %7d %12g", n_iter, n_evals, T); + print_position (x); + printf (" %12g %12g\n", E, best_E); + } + + /* apply the cooling schedule to the temperature */ + /* FIXME: I should also introduce a cooling schedule for the iters */ + T *= T_factor; + ++n_iter; + if (T < params.t_min) { + break; + } + } + + /* at the end, copy the result onto the initial point, so we pass it + back to the caller */ + copy_state(best_x, x0_p, element_size, copyfunc); + + if (copyfunc) { + destructor(x); + destructor(new_x); + destructor(best_x); + } else { + free (x); + free (new_x); + free (best_x); + } +} + +/* implementation of a simulated annealing algorithm with many tries */ + +void +gsl_siman_solve_many (const gsl_rng * r, void *x0_p, gsl_siman_Efunc_t Ef, + gsl_siman_step_t take_step, + gsl_siman_metric_t distance, + gsl_siman_print_t print_position, + size_t element_size, + gsl_siman_params_t params) +{ + /* the new set of trial points, and their energies and probabilities */ + void *x, *new_x; + double *energies, *probs, *sum_probs; + double Ex; /* energy of the chosen point */ + double T, T_factor; /* the temperature and a step multiplier */ + int i; + double u; /* throw the die to choose a new "x" */ + int n_iter; + + if (print_position) { + printf ("#-iter temperature position"); + printf (" delta_pos energy\n"); + } + + x = (void *) malloc (params.n_tries * element_size); + new_x = (void *) malloc (params.n_tries * element_size); + energies = (double *) malloc (params.n_tries * sizeof (double)); + probs = (double *) malloc (params.n_tries * sizeof (double)); + sum_probs = (double *) malloc (params.n_tries * sizeof (double)); + + T = params.t_initial; + T_factor = 1.0 / params.mu_t; + + memcpy (x, x0_p, element_size); + + n_iter = 0; + while (1) + { + Ex = Ef (x); + for (i = 0; i < params.n_tries - 1; ++i) + { /* only go to N_TRIES-2 */ + /* center the new_x[] around x, then pass it to take_step() */ + sum_probs[i] = 0; + memcpy ((char *)new_x + i * element_size, x, element_size); + take_step (r, (char *)new_x + i * element_size, params.step_size); + energies[i] = Ef ((char *)new_x + i * element_size); + probs[i] = boltzmann(Ex, energies[i], T, ¶ms); + } + /* now add in the old value of "x", so it is a contendor */ + memcpy ((char *)new_x + (params.n_tries - 1) * element_size, x, element_size); + energies[params.n_tries - 1] = Ex; + probs[params.n_tries - 1] = boltzmann(Ex, energies[i], T, ¶ms); + + /* now throw biased die to see which new_x[i] we choose */ + sum_probs[0] = probs[0]; + for (i = 1; i < params.n_tries; ++i) + { + sum_probs[i] = sum_probs[i - 1] + probs[i]; + } + u = gsl_rng_uniform (r) * sum_probs[params.n_tries - 1]; + for (i = 0; i < params.n_tries; ++i) + { + if (u < sum_probs[i]) + { + memcpy (x, (char *) new_x + i * element_size, element_size); + break; + } + } + if (print_position) + { + printf ("%5d\t%12g\t", n_iter, T); + print_position (x); + printf ("\t%12g\t%12g\n", distance (x, x0_p), Ex); + } + T *= T_factor; + ++n_iter; + if (T < params.t_min) + { + break; + } + } + + /* now return the value via x0_p */ + memcpy (x0_p, x, element_size); + + /* printf("the result is: %g (E=%g)\n", x, Ex); */ + + free (x); + free (new_x); + free (energies); + free (probs); + free (sum_probs); +} diff --git a/software/gsl-1.15/siman/siman_test_driver.sh b/software/gsl-1.15/siman/siman_test_driver.sh new file mode 100755 index 000000000..21b393ccf --- /dev/null +++ b/software/gsl-1.15/siman/siman_test_driver.sh @@ -0,0 +1,22 @@ +#! /bin/sh + +# assume good result from tests; increment it if any test fails +EXIT_STATUS=0 + +for seed in "" 12345 ; +do +./siman_test > siman_test.out 2>&1 +SECOND_LAST_ENERGY=`tail -2 siman_test.out1 | head -1 | awk '{print $4}'` +LAST_ENERGY=`tail -1 siman_test.out1 | awk '{print $4}'` +# echo " " $SECOND_LAST_ENERGY $LAST_ENERGY +if [ $SECOND_LAST_ENERGY = $LAST_ENERGY ]; +then + echo -n "PASS: " +else + echo -n "FAIL: " + EXIT_STATUS=`expr $EXIT_STATUS + 1` +fi +echo "simulated annealing test (travelling salesman problem) seed=${seed:-default}" +done + +exit $EXIT_STATUS diff --git a/software/gsl-1.15/siman/siman_tsp.c b/software/gsl-1.15/siman/siman_tsp.c new file mode 100644 index 000000000..7bd26c6e2 --- /dev/null +++ b/software/gsl-1.15/siman/siman_tsp.c @@ -0,0 +1,329 @@ +/* siman/siman_tsp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* set up parameters for this simulated annealing run */ + +#define N_TRIES 200 /* how many points do we try before stepping */ +#define ITERS_FIXED_T 2000 /* how many iterations for each T? */ +#define STEP_SIZE 1.0 /* max step size in random walk */ +#define K 1.0 /* Boltzmann constant */ +#define T_INITIAL 5000.0 /* initial temperature */ +#define MU_T 1.002 /* damping factor for temperature */ +#define T_MIN 5.0e-1 + +gsl_siman_params_t params = {N_TRIES, ITERS_FIXED_T, STEP_SIZE, + K, T_INITIAL, MU_T, T_MIN}; + +struct s_tsp_city { + const char * name; + double lat, longitude; /* coordinates */ +}; +typedef struct s_tsp_city Stsp_city; + +void prepare_distance_matrix(void); +void exhaustive_search(void); +void print_distance_matrix(void); +double city_distance(Stsp_city c1, Stsp_city c2); +double Etsp(void *xp); +double Mtsp(void *xp, void *yp); +void Stsp(const gsl_rng * r, void *xp, double step_size); +void Ptsp(void *xp); + +/* in this table, latitude and longitude are obtained from the US + Census Bureau, at http://www.census.gov/cgi-bin/gazetteer */ + +Stsp_city cities[] = {{"Santa Fe", 35.68, 105.95}, + {"Phoenix", 33.54, 112.07}, + {"Albuquerque", 35.12, 106.62}, + {"Clovis", 34.41, 103.20}, + {"Durango", 37.29, 107.87}, + {"Dallas", 32.79, 96.77}, + {"Tesuque", 35.77, 105.92}, + {"Grants", 35.15, 107.84}, + {"Los Alamos", 35.89, 106.28}, + {"Las Cruces", 32.34, 106.76}, + {"Cortez", 37.35, 108.58}, + {"Gallup", 35.52, 108.74}}; + +#define N_CITIES (sizeof(cities)/sizeof(Stsp_city)) + +double distance_matrix[N_CITIES][N_CITIES]; + +/* distance between two cities */ +double city_distance(Stsp_city c1, Stsp_city c2) +{ + const double earth_radius = 6375.000; /* 6000KM approximately */ + /* sin and cos of lat and long; must convert to radians */ + double sla1 = sin(c1.lat*M_PI/180), cla1 = cos(c1.lat*M_PI/180), + slo1 = sin(c1.longitude*M_PI/180), clo1 = cos(c1.longitude*M_PI/180); + double sla2 = sin(c2.lat*M_PI/180), cla2 = cos(c2.lat*M_PI/180), + slo2 = sin(c2.longitude*M_PI/180), clo2 = cos(c2.longitude*M_PI/180); + + double x1 = cla1*clo1; + double x2 = cla2*clo2; + + double y1 = cla1*slo1; + double y2 = cla2*slo2; + + double z1 = sla1; + double z2 = sla2; + + double dot_product = x1*x2 + y1*y2 + z1*z2; + + double angle = acos(dot_product); + + /* distance is the angle (in radians) times the earth radius */ + return angle*earth_radius; +} + +/* energy for the travelling salesman problem */ +double Etsp(void *xp) +{ + /* an array of N_CITIES integers describing the order */ + int *route = (int *) xp; + double E = 0; + unsigned int i; + + for (i = 0; i < N_CITIES; ++i) { + /* use the distance_matrix to optimize this calculation; it had + better be allocated!! */ + E += distance_matrix[route[i]][route[(i + 1) % N_CITIES]]; + } + + return E; +} + +double Mtsp(void *xp, void *yp) +{ + int *route1 = (int *) xp, *route2 = (int *) yp; + double distance = 0; + unsigned int i; + + for (i = 0; i < N_CITIES; ++i) { + distance += ((route1[i] == route2[i]) ? 0 : 1); + } + + return distance; +} + +/* take a step through the TSP space */ +void Stsp(const gsl_rng * r, void *xp, double step_size) +{ + int x1, x2, dummy; + int *route = (int *) xp; + + step_size = 0 ; /* prevent warnings about unused parameter */ + + /* pick the two cities to swap in the matrix; we leave the first + city fixed */ + x1 = (gsl_rng_get (r) % (N_CITIES-1)) + 1; + do { + x2 = (gsl_rng_get (r) % (N_CITIES-1)) + 1; + } while (x2 == x1); + + dummy = route[x1]; + route[x1] = route[x2]; + route[x2] = dummy; +} + +void Ptsp(void *xp) +{ + unsigned int i; + int *route = (int *) xp; + printf(" ["); + for (i = 0; i < N_CITIES; ++i) { + printf(" %d ", route[i]); + } + printf("] "); +} + +int main(void) +{ + int x_initial[N_CITIES]; + unsigned int i; + + const gsl_rng * r = gsl_rng_alloc (gsl_rng_env_setup()) ; + + gsl_ieee_env_setup (); + + prepare_distance_matrix(); + + /* set up a trivial initial route */ + printf("# initial order of cities:\n"); + for (i = 0; i < N_CITIES; ++i) { + printf("# \"%s\"\n", cities[i].name); + x_initial[i] = i; + } + + printf("# distance matrix is:\n"); + print_distance_matrix(); + + printf("# initial coordinates of cities (longitude and latitude)\n"); + /* this can be plotted with */ + /* ./siman_tsp > hhh ; grep city_coord hhh | awk '{print $2 " " $3}' | xyplot -ps -d "xy" > c.eps */ + for (i = 0; i < N_CITIES+1; ++i) { + printf("###initial_city_coord: %g %g \"%s\"\n", + -cities[x_initial[i % N_CITIES]].longitude, + cities[x_initial[i % N_CITIES]].lat, + cities[x_initial[i % N_CITIES]].name); + } + +/* exhaustive_search(); */ + + gsl_siman_solve(r, x_initial, Etsp, Stsp, Mtsp, Ptsp, NULL, NULL, NULL, + N_CITIES*sizeof(int), params); + + printf("# final order of cities:\n"); + for (i = 0; i < N_CITIES; ++i) { + printf("# \"%s\"\n", cities[x_initial[i]].name); + } + + printf("# final coordinates of cities (longitude and latitude)\n"); + /* this can be plotted with */ + /* ./siman_tsp > hhh ; grep city_coord hhh | awk '{print $2 " " $3}' | xyplot -ps -d "xy" > c.eps */ + for (i = 0; i < N_CITIES+1; ++i) { + printf("###final_city_coord: %g %g %s\n", + -cities[x_initial[i % N_CITIES]].longitude, + cities[x_initial[i % N_CITIES]].lat, + cities[x_initial[i % N_CITIES]].name); + } + + printf("# "); + fflush(stdout); +#if 0 + system("date"); +#endif /* 0 */ + fflush(stdout); + + return 0; +} + +void prepare_distance_matrix() +{ + unsigned int i, j; + double dist; + + for (i = 0; i < N_CITIES; ++i) { + for (j = 0; j < N_CITIES; ++j) { + if (i == j) { + dist = 0; + } else { + dist = city_distance(cities[i], cities[j]); + } + distance_matrix[i][j] = dist; + } + } +} + +void print_distance_matrix() +{ + unsigned int i, j; + + for (i = 0; i < N_CITIES; ++i) { + printf("# "); + for (j = 0; j < N_CITIES; ++j) { + printf("%15.8f ", distance_matrix[i][j]); + } + printf("\n"); + } +} + +/* [only works for 12] search the entire space for solutions */ +static double best_E = 1.0e100, second_E = 1.0e100, third_E = 1.0e100; +static int best_route[N_CITIES]; +static int second_route[N_CITIES]; +static int third_route[N_CITIES]; +static void do_all_perms(int *route, int n); + +void exhaustive_search() +{ + static int initial_route[N_CITIES] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + printf("\n# "); + fflush(stdout); +#if 0 + system("date"); +#endif + fflush(stdout); + do_all_perms(initial_route, 1); + printf("\n# "); + fflush(stdout); +#if 0 + system("date"); +#endif /* 0 */ + fflush(stdout); + + printf("# exhaustive best route: "); + Ptsp(best_route); + printf("\n# its energy is: %g\n", best_E); + + printf("# exhaustive second_best route: "); + Ptsp(second_route); + printf("\n# its energy is: %g\n", second_E); + + printf("# exhaustive third_best route: "); + Ptsp(third_route); + printf("\n# its energy is: %g\n", third_E); +} + +/* James Theiler's recursive algorithm for generating all routes */ +static void do_all_perms(int *route, int n) +{ + if (n == (N_CITIES-1)) { + /* do it! calculate the energy/cost for that route */ + double E; + E = Etsp(route); /* TSP energy function */ + /* now save the best 3 energies and routes */ + if (E < best_E) { + third_E = second_E; + memcpy(third_route, second_route, N_CITIES*sizeof(*route)); + second_E = best_E; + memcpy(second_route, best_route, N_CITIES*sizeof(*route)); + best_E = E; + memcpy(best_route, route, N_CITIES*sizeof(*route)); + } else if (E < second_E) { + third_E = second_E; + memcpy(third_route, second_route, N_CITIES*sizeof(*route)); + second_E = E; + memcpy(second_route, route, N_CITIES*sizeof(*route)); + } else if (E < third_E) { + third_E = E; + memcpy(route, third_route, N_CITIES*sizeof(*route)); + } + } else { + int new_route[N_CITIES]; + unsigned int j; + int swap_tmp; + memcpy(new_route, route, N_CITIES*sizeof(*route)); + for (j = n; j < N_CITIES; ++j) { + swap_tmp = new_route[j]; + new_route[j] = new_route[n]; + new_route[n] = swap_tmp; + do_all_perms(new_route, n+1); + } + } +} diff --git a/software/gsl-1.15/siman/test.c b/software/gsl-1.15/siman/test.c new file mode 100644 index 000000000..e7c5e02a4 --- /dev/null +++ b/software/gsl-1.15/siman/test.c @@ -0,0 +1,162 @@ +/* siman/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Mark Galassi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* set up parameters for this simulated annealing run */ +#define N_TRIES 200 /* how many points do we try before stepping */ +#define ITERS_FIXED_T 1000 /* how many iterations for each T? */ +#define STEP_SIZE 1.0 /* max step size in random walk */ +#define K 1.0 /* Boltzmann constant */ +#define T_INITIAL 0.008 /* initial temperature */ +#define MU_T 1.003 /* damping factor for temperature */ +#define T_MIN 2.0e-6 + +gsl_siman_params_t params = {N_TRIES, ITERS_FIXED_T, STEP_SIZE, + K, T_INITIAL, MU_T, T_MIN}; + +double square (double x) ; +double square (double x) { return x * x ; } + +double E1(void *xp); +double M1(void *xp, void *yp); +void S1(const gsl_rng * r, void *xp, double step_size); +void P1(void *xp); + +/* now some functions to test in one dimension */ +double E1(void *xp) +{ + double x = * ((double *) xp); + + return exp(-square(x-1))*sin(8*x) - exp(-square(x-1000))*0.89; +} + +double M1(void *xp, void *yp) +{ + double x = *((double *) xp); + double y = *((double *) yp); + + return fabs(x - y); +} + +void S1(const gsl_rng * r, void *xp, double step_size) +{ + double old_x = *((double *) xp); + double new_x; + + new_x = gsl_rng_uniform(r)*2*step_size - step_size + old_x; + + memcpy(xp, &new_x, sizeof(new_x)); +} + +void P1(void *xp) +{ + printf(" %12g ", *((double *) xp)); +} + +int main(void) +{ + double x_min = 1.36312999455315182 ; + double x ; + + gsl_rng * r = gsl_rng_alloc (gsl_rng_env_setup()) ; + + gsl_ieee_env_setup (); + + /* The function tested here has multiple mimima. + The global minimum is at x = 1.36312999, (f = -0.87287) + There is a local minimum at x = 0.60146196, (f = -0.84893) */ + + x = -10.0 ; + gsl_siman_solve(r, &x, E1, S1, M1, NULL, NULL, NULL, NULL, + sizeof(double), params); + gsl_test_rel(x, x_min, 1e-3, "f(x)= exp(-(x-1)^2) sin(8x), x0=-10") ; + + x = +10.0 ; + gsl_siman_solve(r, &x, E1, S1, M1, NULL, NULL, NULL, NULL, + sizeof(double), params); + gsl_test_rel(x, x_min, 1e-3, "f(x)= exp(-(x-1)^2) sin(8x), x0=10") ; + + /* Start at the false minimum */ + + x = +0.6 ; + gsl_siman_solve(r, &x, E1, S1, M1, NULL, NULL, NULL, NULL, + sizeof(double), params); + gsl_test_rel(x, x_min, 1e-3, "f(x)= exp(-(x-1)^2) sin(8x), x0=0.6") ; + + x = +0.5 ; + gsl_siman_solve(r, &x, E1, S1, M1, NULL, NULL, NULL, NULL, + sizeof(double), params); + gsl_test_rel(x, x_min, 1e-3, "f(x)= exp(-(x-1)^2) sin(8x), x0=0.5") ; + + x = +0.4 ; + gsl_siman_solve(r, &x, E1, S1, M1, NULL, NULL, NULL, NULL, + sizeof(double), params); + gsl_test_rel(x, x_min, 1e-3, "f(x)= exp(-(x-1)^2) sin(8x), x0=0.4") ; + + gsl_rng_free(r); + exit (gsl_test_summary ()); + +#ifdef JUNK + x0.D1 = 12.0; + printf("#one dimensional problem, x0 = %f\n", x0.D1); + gsl_siman_Usolve(r, &x0, test_E_1D, test_step_1D, distance_1D, + print_pos_1D, params); + + + x0.D2[0] = 12.0; + x0.D2[1] = 5.5; + printf("#two dimensional problem, (x0,y0) = (%f,%f)\n", + x0.D2[0], x0.D2[1]); + gsl_siman_Usolve(r, &x0, test_E_2D, test_step_2D, distance_2D, + print_pos_2D, params); + + x0.D3[0] = 12.2; + x0.D3[1] = 5.5; + x0.D3[2] = -15.5; + printf("#three dimensional problem, (x0,y0,z0) = (%f,%f,%f)\n", + x0.D3[0], x0.D3[1], x0.D3[2]); + gsl_siman_Usolve(r, &x0, test_E_3D, test_step_3D, distance_3D, + print_pos_3D, params); + + x0.D2[0] = 12.2; + x0.D2[1] = 5.5; + + gsl_siman_solve(r, &x0, test_E_2D, test_step_2D, distance_2D, print_pos_2D, params); + + x0.D3[0] = 12.2; + x0.D3[1] = 5.5; + x0.D3[2] = -15.5; + + gsl_siman_solve(r, &x0, test_E_3D, test_step_3D, distance_3D, print_pos_3D, params); + + return 0; +#endif +} + + + diff --git a/software/gsl-1.15/sort/.deps/sort.Plo b/software/gsl-1.15/sort/.deps/sort.Plo new file mode 100644 index 000000000..b1b43378e --- /dev/null +++ b/software/gsl-1.15/sort/.deps/sort.Plo @@ -0,0 +1,99 @@ +sort.lo: sort.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_heapsort.h ../gsl/gsl_permutation.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_heapsort.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/sort/.deps/sortind.Plo b/software/gsl-1.15/sort/.deps/sortind.Plo new file mode 100644 index 000000000..d33a81936 --- /dev/null +++ b/software/gsl-1.15/sort/.deps/sortind.Plo @@ -0,0 +1,99 @@ +sortind.lo: sortind.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_heapsort.h ../gsl/gsl_permutation.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_inline.h ../gsl/gsl_check_range.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_heapsort.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: diff --git a/software/gsl-1.15/sort/.deps/sortvec.Plo b/software/gsl-1.15/sort/.deps/sortvec.Plo new file mode 100644 index 000000000..058d3abdf --- /dev/null +++ b/software/gsl-1.15/sort/.deps/sortvec.Plo @@ -0,0 +1,240 @@ +sortvec.lo: sortvec.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_sort_double.h ../gsl/gsl_sort_float.h \ + ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h ../gsl/gsl_sort_uint.h \ + ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h ../gsl/gsl_sort_short.h \ + ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../templates_on.h sortvec_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../templates_on.h: + +sortvec_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/sort/.deps/sortvecind.Plo b/software/gsl-1.15/sort/.deps/sortvecind.Plo new file mode 100644 index 000000000..4d8acdf6c --- /dev/null +++ b/software/gsl-1.15/sort/.deps/sortvecind.Plo @@ -0,0 +1,241 @@ +sortvecind.lo: sortvecind.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_sort_double.h ../gsl/gsl_sort_float.h \ + ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h ../gsl/gsl_sort_uint.h \ + ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h ../gsl/gsl_sort_short.h \ + ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../templates_on.h sortvecind_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../templates_on.h: + +sortvecind_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/sort/.deps/subset.Plo b/software/gsl-1.15/sort/.deps/subset.Plo new file mode 100644 index 000000000..5d76dbbdd --- /dev/null +++ b/software/gsl-1.15/sort/.deps/subset.Plo @@ -0,0 +1,240 @@ +subset.lo: subset.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_sort_double.h ../gsl/gsl_sort_float.h \ + ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h ../gsl/gsl_sort_uint.h \ + ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h ../gsl/gsl_sort_short.h \ + ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../templates_on.h subset_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../templates_on.h: + +subset_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/sort/.deps/subsetind.Plo b/software/gsl-1.15/sort/.deps/subsetind.Plo new file mode 100644 index 000000000..f497798d2 --- /dev/null +++ b/software/gsl-1.15/sort/.deps/subsetind.Plo @@ -0,0 +1,241 @@ +subsetind.lo: subsetind.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_sort_double.h ../gsl/gsl_sort_float.h \ + ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h ../gsl/gsl_sort_uint.h \ + ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h ../gsl/gsl_sort_short.h \ + ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../templates_on.h subsetind_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../templates_on.h: + +subsetind_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/sort/.deps/test.Po b/software/gsl-1.15/sort/.deps/test.Po new file mode 100644 index 000000000..bb7a071d0 --- /dev/null +++ b/software/gsl-1.15/sort/.deps/test.Po @@ -0,0 +1,263 @@ +test.o: test.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_test.h ../gsl/gsl_heapsort.h \ + ../gsl/gsl_permutation.h ../gsl/gsl_check_range.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_sort_double.h \ + ../gsl/gsl_sort_float.h ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h \ + ../gsl/gsl_sort_uint.h ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h \ + ../gsl/gsl_sort_short.h ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_vector_float.h ../gsl/gsl_block_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_vector_ulong.h \ + ../gsl/gsl_block_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_vector_uint.h \ + ../gsl/gsl_block_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h \ + ../gsl/gsl_ieee_utils.h test_heapsort.c ../templates_on.h \ + test_source.c ../templates_off.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_test.h: + +../gsl/gsl_heapsort.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_ieee_utils.h: + +test_heapsort.c: + +../templates_on.h: + +test_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/sort/ChangeLog b/software/gsl-1.15/sort/ChangeLog new file mode 100644 index 000000000..8fd17441a --- /dev/null +++ b/software/gsl-1.15/sort/ChangeLog @@ -0,0 +1,66 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-02-09 Brian Gough + + * test_source.c: prevent signed overflow in tests + +2005-08-31 Brian Gough + + * test_source.c: free index memory as well + +2005-04-08 Brian Gough + + * sortvecind_source.c sortvec_source.c: write tests in such a way + as to avoid an infinite loop if nan, by always comparing in the + same direction (note that nan < x and nan > x are both false) + +Tue Jun 26 12:06:58 2001 Brian Gough + + * subset_source. subsetind_source.c: make prototypes match header + file + +Sun Jan 21 18:36:04 2001 Brian Gough + + * subset.c, subsetind.c: added functions for selecting subsets + (k-th smallest or largest values) + +Mon Mar 13 13:57:33 2000 Brian Gough + + * sortind.c (gsl_heapsort_index): changed to use an array of + size_t's directly instead of gsl_permutation + +Mon Feb 28 20:30:06 2000 Brian Gough + + * renamed gsl_sort to gsl_heapsort, since this is more meaningful + and gsl_sort, gsl_sort_float, ... is now used for sorting of + arrays. + + * added support for sorting of arrays, without going through a + gsl_vector object (gsl_sort_vector is now implemented in terms of + these functions) + +Sat Feb 26 14:47:36 2000 Brian Gough + + * added support for indirect sorting of objects + + * fixed bug in indirect sorting from use of BASE type instead of + size_t for index. + + * reorganized directory + +Fri Feb 25 19:30:08 2000 Brian Gough + + * sortind_source.c: changed return type of indirect sort to int, + to allow error return code in case where permutation and vector + sizes do not match + +Sat Feb 19 12:18:28 2000 Brian Gough + + * sortind_source.c: added indirect sorting + +Fri Feb 18 10:48:24 2000 Brian Gough + + * initial GPL sources from Thomas Walter + diff --git a/software/gsl-1.15/sort/Makefile.am b/software/gsl-1.15/sort/Makefile.am new file mode 100644 index 000000000..a194c74f7 --- /dev/null +++ b/software/gsl-1.15/sort/Makefile.am @@ -0,0 +1,16 @@ +noinst_LTLIBRARIES = libgslsort.la + +pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h + +INCLUDES = -I$(top_srcdir) + +libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c +noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_SOURCES = test.c +test_LDADD = libgslsort.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la + diff --git a/software/gsl-1.15/sort/Makefile.in b/software/gsl-1.15/sort/Makefile.in new file mode 100644 index 000000000..fd526e3bb --- /dev/null +++ b/software/gsl-1.15/sort/Makefile.in @@ -0,0 +1,669 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = sort +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslsort_la_LIBADD = +am_libgslsort_la_OBJECTS = sort.lo sortind.lo sortvec.lo sortvecind.lo \ + subset.lo subsetind.lo +libgslsort_la_OBJECTS = $(am_libgslsort_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslsort.la ../permutation/libgslpermutation.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslsort_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslsort_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslsort.la +pkginclude_HEADERS = gsl_heapsort.h gsl_sort.h gsl_sort_char.h gsl_sort_double.h gsl_sort_float.h gsl_sort_int.h gsl_sort_long.h gsl_sort_long_double.h gsl_sort_short.h gsl_sort_uchar.h gsl_sort_uint.h gsl_sort_ulong.h gsl_sort_ushort.h gsl_sort_vector.h gsl_sort_vector_char.h gsl_sort_vector_double.h gsl_sort_vector_float.h gsl_sort_vector_int.h gsl_sort_vector_long.h gsl_sort_vector_long_double.h gsl_sort_vector_short.h gsl_sort_vector_uchar.h gsl_sort_vector_uint.h gsl_sort_vector_ulong.h gsl_sort_vector_ushort.h +INCLUDES = -I$(top_srcdir) +libgslsort_la_SOURCES = sort.c sortind.c sortvec.c sortvecind.c subset.c subsetind.c +noinst_HEADERS = sortvec_source.c sortvecind_source.c subset_source.c subsetind_source.c test_source.c test_heapsort.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslsort.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sort/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu sort/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslsort.la: $(libgslsort_la_OBJECTS) $(libgslsort_la_DEPENDENCIES) + $(LINK) $(libgslsort_la_OBJECTS) $(libgslsort_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sortind.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sortvec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sortvecind.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsetind.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/sort/TODO b/software/gsl-1.15/sort/TODO new file mode 100644 index 000000000..a336c1e20 --- /dev/null +++ b/software/gsl-1.15/sort/TODO @@ -0,0 +1,39 @@ +# -*- org -*- +#+CATEGORY: sort + +* Routines for selecting the k largest or smallest values could use +heapsort for speed O(N log k) rather than insertion O(N k). + +* Sorting of complex arrarys without using additional memory. We try +to avoid allocating memory internally in GSL, so internally computing +the magnitudes and storing them in a temporary array is undesirable. + +Obviously a complex array can be sorted using sqrt(x*x + y*y) <=> +sqrt(u*u + v*v) (written in a numerically stable way) for every +comparison, but this may be unacceptably slow. Maybe not? It is just a +constant factor. The square roots could sometimes be avoided by +optimization, + + (x,y) = (MAX(|x|,|y|), MIN(|x|,|y|)) + (u,v) = (MAX(|u|,|v|), MIN(|u|,|v|)) + + if (x < u/sqrt(2)) /* This part is optional optimization */ + return -1 + if (x > u*sqrt(2)) + return +1 + + if (x == 0 && u == 0) ... + if (x == 0) ... + if (u == 0) ... + + t = u*sqrt((1+(v/u)^2)/(1+(y/x)^2)) + + if (x < t) + return -1 + if (x > t) + return +1 + else + return 0 + +but this does depend on the data having sufficient range for the +optimization to be worthwhile, otherwise it is an extra cost. diff --git a/software/gsl-1.15/sort/gsl_heapsort.h b/software/gsl-1.15/sort/gsl_heapsort.h new file mode 100644 index 000000000..213fae1e8 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_heapsort.h @@ -0,0 +1,44 @@ +/* sort/gsl_heapsort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_HEAPSORT_H__ +#define __GSL_HEAPSORT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef int (*gsl_comparison_fn_t) (const void *, const void *); + +void gsl_heapsort (void * array, size_t count, size_t size, gsl_comparison_fn_t compare); +int gsl_heapsort_index (size_t * p, const void * array, size_t count, size_t size, gsl_comparison_fn_t compare); + +__END_DECLS + +#endif /* __GSL_HEAPSORT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort.h b/software/gsl-1.15/sort/gsl_sort.h new file mode 100644 index 000000000..b1496c2ef --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort.h @@ -0,0 +1,20 @@ +#ifndef __GSL_SORT_H__ +#define __GSL_SORT_H__ + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_SORT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_char.h b/software/gsl-1.15/sort/gsl_sort_char.h new file mode 100644 index 000000000..f709e3db4 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_char.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_CHAR_H__ +#define __GSL_SORT_CHAR_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_char (char * data, const size_t stride, const size_t n); +void gsl_sort_char_index (size_t * p, const char * data, const size_t stride, const size_t n); + +int gsl_sort_char_smallest (char * dest, const size_t k, const char * src, const size_t stride, const size_t n); +int gsl_sort_char_smallest_index (size_t * p, const size_t k, const char * src, const size_t stride, const size_t n); + +int gsl_sort_char_largest (char * dest, const size_t k, const char * src, const size_t stride, const size_t n); +int gsl_sort_char_largest_index (size_t * p, const size_t k, const char * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_CHAR_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_double.h b/software/gsl-1.15/sort/gsl_sort_double.h new file mode 100644 index 000000000..aa44ab148 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_double.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_DOUBLE_H__ +#define __GSL_SORT_DOUBLE_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort (double * data, const size_t stride, const size_t n); +void gsl_sort_index (size_t * p, const double * data, const size_t stride, const size_t n); + +int gsl_sort_smallest (double * dest, const size_t k, const double * src, const size_t stride, const size_t n); +int gsl_sort_smallest_index (size_t * p, const size_t k, const double * src, const size_t stride, const size_t n); + +int gsl_sort_largest (double * dest, const size_t k, const double * src, const size_t stride, const size_t n); +int gsl_sort_largest_index (size_t * p, const size_t k, const double * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_DOUBLE_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_float.h b/software/gsl-1.15/sort/gsl_sort_float.h new file mode 100644 index 000000000..116a2f2a8 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_float.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_FLOAT_H__ +#define __GSL_SORT_FLOAT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_float (float * data, const size_t stride, const size_t n); +void gsl_sort_float_index (size_t * p, const float * data, const size_t stride, const size_t n); + +int gsl_sort_float_smallest (float * dest, const size_t k, const float * src, const size_t stride, const size_t n); +int gsl_sort_float_smallest_index (size_t * p, const size_t k, const float * src, const size_t stride, const size_t n); + +int gsl_sort_float_largest (float * dest, const size_t k, const float * src, const size_t stride, const size_t n); +int gsl_sort_float_largest_index (size_t * p, const size_t k, const float * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_FLOAT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_int.h b/software/gsl-1.15/sort/gsl_sort_int.h new file mode 100644 index 000000000..3b1e210c0 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_int.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_INT_H__ +#define __GSL_SORT_INT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_int (int * data, const size_t stride, const size_t n); +void gsl_sort_int_index (size_t * p, const int * data, const size_t stride, const size_t n); + +int gsl_sort_int_smallest (int * dest, const size_t k, const int * src, const size_t stride, const size_t n); +int gsl_sort_int_smallest_index (size_t * p, const size_t k, const int * src, const size_t stride, const size_t n); + +int gsl_sort_int_largest (int * dest, const size_t k, const int * src, const size_t stride, const size_t n); +int gsl_sort_int_largest_index (size_t * p, const size_t k, const int * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_INT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_long.h b/software/gsl-1.15/sort/gsl_sort_long.h new file mode 100644 index 000000000..3b851d109 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_long.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_LONG_H__ +#define __GSL_SORT_LONG_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_long (long * data, const size_t stride, const size_t n); +void gsl_sort_long_index (size_t * p, const long * data, const size_t stride, const size_t n); + +int gsl_sort_long_smallest (long * dest, const size_t k, const long * src, const size_t stride, const size_t n); +int gsl_sort_long_smallest_index (size_t * p, const size_t k, const long * src, const size_t stride, const size_t n); + +int gsl_sort_long_largest (long * dest, const size_t k, const long * src, const size_t stride, const size_t n); +int gsl_sort_long_largest_index (size_t * p, const size_t k, const long * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_LONG_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_long_double.h b/software/gsl-1.15/sort/gsl_sort_long_double.h new file mode 100644 index 000000000..492886527 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_long_double.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_LONG_DOUBLE_H__ +#define __GSL_SORT_LONG_DOUBLE_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_long_double (long double * data, const size_t stride, const size_t n); +void gsl_sort_long_double_index (size_t * p, const long double * data, const size_t stride, const size_t n); + +int gsl_sort_long_double_smallest (long double * dest, const size_t k, const long double * src, const size_t stride, const size_t n); +int gsl_sort_long_double_smallest_index (size_t * p, const size_t k, const long double * src, const size_t stride, const size_t n); + +int gsl_sort_long_double_largest (long double * dest, const size_t k, const long double * src, const size_t stride, const size_t n); +int gsl_sort_long_double_largest_index (size_t * p, const size_t k, const long double * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_short.h b/software/gsl-1.15/sort/gsl_sort_short.h new file mode 100644 index 000000000..0773cb1c1 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_short.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_SHORT_H__ +#define __GSL_SORT_SHORT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_short (short * data, const size_t stride, const size_t n); +void gsl_sort_short_index (size_t * p, const short * data, const size_t stride, const size_t n); + +int gsl_sort_short_smallest (short * dest, const size_t k, const short * src, const size_t stride, const size_t n); +int gsl_sort_short_smallest_index (size_t * p, const size_t k, const short * src, const size_t stride, const size_t n); + +int gsl_sort_short_largest (short * dest, const size_t k, const short * src, const size_t stride, const size_t n); +int gsl_sort_short_largest_index (size_t * p, const size_t k, const short * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_SHORT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_uchar.h b/software/gsl-1.15/sort/gsl_sort_uchar.h new file mode 100644 index 000000000..0292dfef3 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_uchar.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_UCHAR_H__ +#define __GSL_SORT_UCHAR_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_uchar (unsigned char * data, const size_t stride, const size_t n); +void gsl_sort_uchar_index (size_t * p, const unsigned char * data, const size_t stride, const size_t n); + +int gsl_sort_uchar_smallest (unsigned char * dest, const size_t k, const unsigned char * src, const size_t stride, const size_t n); +int gsl_sort_uchar_smallest_index (size_t * p, const size_t k, const unsigned char * src, const size_t stride, const size_t n); + +int gsl_sort_uchar_largest (unsigned char * dest, const size_t k, const unsigned char * src, const size_t stride, const size_t n); +int gsl_sort_uchar_largest_index (size_t * p, const size_t k, const unsigned char * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_UCHAR_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_uint.h b/software/gsl-1.15/sort/gsl_sort_uint.h new file mode 100644 index 000000000..740df8202 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_uint.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_UINT_H__ +#define __GSL_SORT_UINT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_uint (unsigned int * data, const size_t stride, const size_t n); +void gsl_sort_uint_index (size_t * p, const unsigned int * data, const size_t stride, const size_t n); + +int gsl_sort_uint_smallest (unsigned int * dest, const size_t k, const unsigned int * src, const size_t stride, const size_t n); +int gsl_sort_uint_smallest_index (size_t * p, const size_t k, const unsigned int * src, const size_t stride, const size_t n); + +int gsl_sort_uint_largest (unsigned int * dest, const size_t k, const unsigned int * src, const size_t stride, const size_t n); +int gsl_sort_uint_largest_index (size_t * p, const size_t k, const unsigned int * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_UINT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_ulong.h b/software/gsl-1.15/sort/gsl_sort_ulong.h new file mode 100644 index 000000000..bdbd4c651 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_ulong.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_ULONG_H__ +#define __GSL_SORT_ULONG_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_ulong (unsigned long * data, const size_t stride, const size_t n); +void gsl_sort_ulong_index (size_t * p, const unsigned long * data, const size_t stride, const size_t n); + +int gsl_sort_ulong_smallest (unsigned long * dest, const size_t k, const unsigned long * src, const size_t stride, const size_t n); +int gsl_sort_ulong_smallest_index (size_t * p, const size_t k, const unsigned long * src, const size_t stride, const size_t n); + +int gsl_sort_ulong_largest (unsigned long * dest, const size_t k, const unsigned long * src, const size_t stride, const size_t n); +int gsl_sort_ulong_largest_index (size_t * p, const size_t k, const unsigned long * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_ULONG_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_ushort.h b/software/gsl-1.15/sort/gsl_sort_ushort.h new file mode 100644 index 000000000..a29bb693a --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_ushort.h @@ -0,0 +1,50 @@ +/* sort/gsl_sort_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_USHORT_H__ +#define __GSL_SORT_USHORT_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_ushort (unsigned short * data, const size_t stride, const size_t n); +void gsl_sort_ushort_index (size_t * p, const unsigned short * data, const size_t stride, const size_t n); + +int gsl_sort_ushort_smallest (unsigned short * dest, const size_t k, const unsigned short * src, const size_t stride, const size_t n); +int gsl_sort_ushort_smallest_index (size_t * p, const size_t k, const unsigned short * src, const size_t stride, const size_t n); + +int gsl_sort_ushort_largest (unsigned short * dest, const size_t k, const unsigned short * src, const size_t stride, const size_t n); +int gsl_sort_ushort_largest_index (size_t * p, const size_t k, const unsigned short * src, const size_t stride, const size_t n); + +__END_DECLS + +#endif /* __GSL_SORT_USHORT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector.h b/software/gsl-1.15/sort/gsl_sort_vector.h new file mode 100644 index 000000000..d65a9ee9b --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector.h @@ -0,0 +1,20 @@ +#ifndef __GSL_SORT_VECTOR_H__ +#define __GSL_SORT_VECTOR_H__ + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_SORT_VECTOR_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_char.h b/software/gsl-1.15/sort/gsl_sort_vector_char.h new file mode 100644 index 000000000..488fdc69b --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_char.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_CHAR_H__ +#define __GSL_SORT_VECTOR_CHAR_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_char (gsl_vector_char * v); +int gsl_sort_vector_char_index (gsl_permutation * p, const gsl_vector_char * v); + +int gsl_sort_vector_char_smallest (char * dest, const size_t k, const gsl_vector_char * v); +int gsl_sort_vector_char_largest (char * dest, const size_t k, const gsl_vector_char * v); + +int gsl_sort_vector_char_smallest_index (size_t * p, const size_t k, const gsl_vector_char * v); +int gsl_sort_vector_char_largest_index (size_t * p, const size_t k, const gsl_vector_char * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_CHAR_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_double.h b/software/gsl-1.15/sort/gsl_sort_vector_double.h new file mode 100644 index 000000000..9430fd4ed --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_double.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_DOUBLE_H__ +#define __GSL_SORT_VECTOR_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector (gsl_vector * v); +int gsl_sort_vector_index (gsl_permutation * p, const gsl_vector * v); + +int gsl_sort_vector_smallest (double * dest, const size_t k, const gsl_vector * v); +int gsl_sort_vector_largest (double * dest, const size_t k, const gsl_vector * v); + +int gsl_sort_vector_smallest_index (size_t * p, const size_t k, const gsl_vector * v); +int gsl_sort_vector_largest_index (size_t * p, const size_t k, const gsl_vector * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_DOUBLE_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_float.h b/software/gsl-1.15/sort/gsl_sort_vector_float.h new file mode 100644 index 000000000..fc0df5504 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_float.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_FLOAT_H__ +#define __GSL_SORT_VECTOR_FLOAT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_float (gsl_vector_float * v); +int gsl_sort_vector_float_index (gsl_permutation * p, const gsl_vector_float * v); + +int gsl_sort_vector_float_smallest (float * dest, const size_t k, const gsl_vector_float * v); +int gsl_sort_vector_float_largest (float * dest, const size_t k, const gsl_vector_float * v); + +int gsl_sort_vector_float_smallest_index (size_t * p, const size_t k, const gsl_vector_float * v); +int gsl_sort_vector_float_largest_index (size_t * p, const size_t k, const gsl_vector_float * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_FLOAT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_int.h b/software/gsl-1.15/sort/gsl_sort_vector_int.h new file mode 100644 index 000000000..4ac5a5d74 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_int.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_INT_H__ +#define __GSL_SORT_VECTOR_INT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_int (gsl_vector_int * v); +int gsl_sort_vector_int_index (gsl_permutation * p, const gsl_vector_int * v); + +int gsl_sort_vector_int_smallest (int * dest, const size_t k, const gsl_vector_int * v); +int gsl_sort_vector_int_largest (int * dest, const size_t k, const gsl_vector_int * v); + +int gsl_sort_vector_int_smallest_index (size_t * p, const size_t k, const gsl_vector_int * v); +int gsl_sort_vector_int_largest_index (size_t * p, const size_t k, const gsl_vector_int * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_INT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_long.h b/software/gsl-1.15/sort/gsl_sort_vector_long.h new file mode 100644 index 000000000..6ccb21c49 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_long.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_LONG_H__ +#define __GSL_SORT_VECTOR_LONG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_long (gsl_vector_long * v); +int gsl_sort_vector_long_index (gsl_permutation * p, const gsl_vector_long * v); + +int gsl_sort_vector_long_smallest (long * dest, const size_t k, const gsl_vector_long * v); +int gsl_sort_vector_long_largest (long * dest, const size_t k, const gsl_vector_long * v); + +int gsl_sort_vector_long_smallest_index (size_t * p, const size_t k, const gsl_vector_long * v); +int gsl_sort_vector_long_largest_index (size_t * p, const size_t k, const gsl_vector_long * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_LONG_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_long_double.h b/software/gsl-1.15/sort/gsl_sort_vector_long_double.h new file mode 100644 index 000000000..3f12ca61c --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_long_double.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_LONG_DOUBLE_H__ +#define __GSL_SORT_VECTOR_LONG_DOUBLE_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_long_double (gsl_vector_long_double * v); +int gsl_sort_vector_long_double_index (gsl_permutation * p, const gsl_vector_long_double * v); + +int gsl_sort_vector_long_double_smallest (long double * dest, const size_t k, const gsl_vector_long_double * v); +int gsl_sort_vector_long_double_largest (long double * dest, const size_t k, const gsl_vector_long_double * v); + +int gsl_sort_vector_long_double_smallest_index (size_t * p, const size_t k, const gsl_vector_long_double * v); +int gsl_sort_vector_long_double_largest_index (size_t * p, const size_t k, const gsl_vector_long_double * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_short.h b/software/gsl-1.15/sort/gsl_sort_vector_short.h new file mode 100644 index 000000000..b55e2e470 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_short.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_SHORT_H__ +#define __GSL_SORT_VECTOR_SHORT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_short (gsl_vector_short * v); +int gsl_sort_vector_short_index (gsl_permutation * p, const gsl_vector_short * v); + +int gsl_sort_vector_short_smallest (short * dest, const size_t k, const gsl_vector_short * v); +int gsl_sort_vector_short_largest (short * dest, const size_t k, const gsl_vector_short * v); + +int gsl_sort_vector_short_smallest_index (size_t * p, const size_t k, const gsl_vector_short * v); +int gsl_sort_vector_short_largest_index (size_t * p, const size_t k, const gsl_vector_short * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_SHORT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_uchar.h b/software/gsl-1.15/sort/gsl_sort_vector_uchar.h new file mode 100644 index 000000000..4209e1532 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_uchar.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_UCHAR_H__ +#define __GSL_SORT_VECTOR_UCHAR_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_uchar (gsl_vector_uchar * v); +int gsl_sort_vector_uchar_index (gsl_permutation * p, const gsl_vector_uchar * v); + +int gsl_sort_vector_uchar_smallest (unsigned char * dest, const size_t k, const gsl_vector_uchar * v); +int gsl_sort_vector_uchar_largest (unsigned char * dest, const size_t k, const gsl_vector_uchar * v); + +int gsl_sort_vector_uchar_smallest_index (size_t * p, const size_t k, const gsl_vector_uchar * v); +int gsl_sort_vector_uchar_largest_index (size_t * p, const size_t k, const gsl_vector_uchar * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_UCHAR_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_uint.h b/software/gsl-1.15/sort/gsl_sort_vector_uint.h new file mode 100644 index 000000000..4c2caa275 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_uint.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_UINT_H__ +#define __GSL_SORT_VECTOR_UINT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_uint (gsl_vector_uint * v); +int gsl_sort_vector_uint_index (gsl_permutation * p, const gsl_vector_uint * v); + +int gsl_sort_vector_uint_smallest (unsigned int * dest, const size_t k, const gsl_vector_uint * v); +int gsl_sort_vector_uint_largest (unsigned int * dest, const size_t k, const gsl_vector_uint * v); + +int gsl_sort_vector_uint_smallest_index (size_t * p, const size_t k, const gsl_vector_uint * v); +int gsl_sort_vector_uint_largest_index (size_t * p, const size_t k, const gsl_vector_uint * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_UINT_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_ulong.h b/software/gsl-1.15/sort/gsl_sort_vector_ulong.h new file mode 100644 index 000000000..e61446a39 --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_ulong.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_ULONG_H__ +#define __GSL_SORT_VECTOR_ULONG_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_ulong (gsl_vector_ulong * v); +int gsl_sort_vector_ulong_index (gsl_permutation * p, const gsl_vector_ulong * v); + +int gsl_sort_vector_ulong_smallest (unsigned long * dest, const size_t k, const gsl_vector_ulong * v); +int gsl_sort_vector_ulong_largest (unsigned long * dest, const size_t k, const gsl_vector_ulong * v); + +int gsl_sort_vector_ulong_smallest_index (size_t * p, const size_t k, const gsl_vector_ulong * v); +int gsl_sort_vector_ulong_largest_index (size_t * p, const size_t k, const gsl_vector_ulong * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_ULONG_H__ */ diff --git a/software/gsl-1.15/sort/gsl_sort_vector_ushort.h b/software/gsl-1.15/sort/gsl_sort_vector_ushort.h new file mode 100644 index 000000000..c3776dc7d --- /dev/null +++ b/software/gsl-1.15/sort/gsl_sort_vector_ushort.h @@ -0,0 +1,51 @@ +/* sort/gsl_sort_vector_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SORT_VECTOR_USHORT_H__ +#define __GSL_SORT_VECTOR_USHORT_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void gsl_sort_vector_ushort (gsl_vector_ushort * v); +int gsl_sort_vector_ushort_index (gsl_permutation * p, const gsl_vector_ushort * v); + +int gsl_sort_vector_ushort_smallest (unsigned short * dest, const size_t k, const gsl_vector_ushort * v); +int gsl_sort_vector_ushort_largest (unsigned short * dest, const size_t k, const gsl_vector_ushort * v); + +int gsl_sort_vector_ushort_smallest_index (size_t * p, const size_t k, const gsl_vector_ushort * v); +int gsl_sort_vector_ushort_largest_index (size_t * p, const size_t k, const gsl_vector_ushort * v); + +__END_DECLS + +#endif /* __GSL_SORT_VECTOR_USHORT_H__ */ diff --git a/software/gsl-1.15/sort/sort.c b/software/gsl-1.15/sort/sort.c new file mode 100644 index 000000000..8eee12d63 --- /dev/null +++ b/software/gsl-1.15/sort/sort.c @@ -0,0 +1,114 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include + +static inline void swap (void *base, size_t size, size_t i, size_t j); +static inline void downheap (void *data, const size_t size, const size_t N, size_t k, gsl_comparison_fn_t compare); + +/* Inline swap function for moving objects around */ + +static inline void +swap (void *base, size_t size, size_t i, size_t j) +{ + register char *a = size * i + (char *) base; + register char *b = size * j + (char *) base; + register size_t s = size; + + if (i == j) + return; + + do + { + char tmp = *a; + *a++ = *b; + *b++ = tmp; + } + while (--s > 0); +} + +#define CMP(data,size,j,k) (compare((char *)(data) + (size) * (j), (char *)(data) + (size) * (k))) + +static inline void +downheap (void *data, const size_t size, const size_t N, size_t k, gsl_comparison_fn_t compare) +{ + while (k <= N / 2) + { + size_t j = 2 * k; + + if (j < N && CMP (data, size, j, j + 1) < 0) + { + j++; + } + + if (CMP (data, size, k, j) < 0) + { + swap (data, size, j, k); + } + else + { + break; + } + + k = j; + } +} + +void +gsl_heapsort (void *data, size_t count, size_t size, gsl_comparison_fn_t compare) +{ + /* Sort the array in ascending order. This is a true inplace + algorithm with N log N operations. Worst case (an already sorted + array) is something like 20% slower */ + + size_t N; + size_t k; + + if (count == 0) + { + return; /* No data to sort */ + } + + /* We have n_data elements, last element is at 'n_data-1', first at + '0' Set N to the last element number. */ + + N = count - 1; + + k = N / 2; + k++; /* Compensate the first use of 'k--' */ + do + { + k--; + downheap (data, size, N, k, compare); + } + while (k > 0); + + while (N > 0) + { + /* first swap the elements */ + swap (data, size, 0, N); + + /* then process the heap */ + N--; + + downheap (data, size, N, 0, compare); + } +} diff --git a/software/gsl-1.15/sort/sortind.c b/software/gsl-1.15/sort/sortind.c new file mode 100644 index 000000000..de0fecdde --- /dev/null +++ b/software/gsl-1.15/sort/sortind.c @@ -0,0 +1,101 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include + +static inline void downheap (size_t * p, const void *data, const size_t size, const size_t N, size_t k, gsl_comparison_fn_t compare); + +#define CMP(data,size,j,k) (compare((const char *)(data) + (size) * (j), (const char *)(data) + (size) * (k))) + +static inline void +downheap (size_t * p, const void *data, const size_t size, const size_t N, size_t k, gsl_comparison_fn_t compare) +{ + const size_t pki = p[k]; + + while (k <= N / 2) + { + size_t j = 2 * k; + + if (j < N && CMP (data, size, p[j], p[j + 1]) < 0) + { + j++; + } + + if (CMP (data, size, pki, p[j]) >= 0) + { + break; + } + + p[k] = p[j]; + + k = j; + } + + p[k] = pki; +} + +int +gsl_heapsort_index (size_t * p, const void *data, size_t count, size_t size, gsl_comparison_fn_t compare) +{ + /* Sort the array in ascending order. This is a true inplace + algorithm with N log N operations. Worst case (an already sorted + array) is something like 20% slower */ + + size_t i, k, N; + + if (count == 0) + { + return GSL_SUCCESS; /* No data to sort */ + } + + for (i = 0; i < count; i++) + { + p[i] = i ; /* set permutation to identity */ + } + + /* We have n_data elements, last element is at 'n_data-1', first at + '0' Set N to the last element number. */ + + N = count - 1; + + k = N / 2; + k++; /* Compensate the first use of 'k--' */ + do + { + k--; + downheap (p, data, size, N, k, compare); + } + while (k > 0); + + while (N > 0) + { + /* first swap the elements */ + size_t tmp = p[0]; + p[0] = p[N]; + p[N] = tmp; + + /* then process the heap */ + N--; + + downheap (p, data, size, N, 0, compare); + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/sort/sortvec.c b/software/gsl-1.15/sort/sortvec.c new file mode 100644 index 000000000..182a9f593 --- /dev/null +++ b/software/gsl-1.15/sort/sortvec.c @@ -0,0 +1,90 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "sortvec_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/sort/sortvec_source.c b/software/gsl-1.15/sort/sortvec_source.c new file mode 100644 index 000000000..96627a377 --- /dev/null +++ b/software/gsl-1.15/sort/sortvec_source.c @@ -0,0 +1,93 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +static inline void FUNCTION (my, downheap) (BASE * data, const size_t stride, const size_t N, size_t k); + +static inline void +FUNCTION (my, downheap) (BASE * data, const size_t stride, const size_t N, size_t k) +{ + BASE v = data[k * stride]; + + while (k <= N / 2) + { + size_t j = 2 * k; + + if (j < N && data[j * stride] < data[(j + 1) * stride]) + { + j++; + } + + if (!(v < data[j * stride])) /* avoid infinite loop if nan */ + { + break; + } + + data[k * stride] = data[j * stride]; + + k = j; + } + + data[k * stride] = v; +} + +void +TYPE (gsl_sort) (BASE * data, const size_t stride, const size_t n) +{ + size_t N; + size_t k; + + if (n == 0) + { + return; /* No data to sort */ + } + + /* We have n_data elements, last element is at 'n_data-1', first at + '0' Set N to the last element number. */ + + N = n - 1; + + k = N / 2; + k++; /* Compensate the first use of 'k--' */ + do + { + k--; + FUNCTION (my, downheap) (data, stride, N, k); + } + while (k > 0); + + while (N > 0) + { + /* first swap the elements */ + BASE tmp = data[0 * stride]; + data[0 * stride] = data[N * stride]; + data[N * stride] = tmp; + + /* then process the heap */ + N--; + + FUNCTION (my, downheap) (data, stride, N, 0); + } +} + +void +TYPE (gsl_sort_vector) (TYPE (gsl_vector) * v) +{ + TYPE (gsl_sort) (v->data, v->stride, v->size) ; +} + diff --git a/software/gsl-1.15/sort/sortvecind.c b/software/gsl-1.15/sort/sortvecind.c new file mode 100644 index 000000000..aa1aa8a7d --- /dev/null +++ b/software/gsl-1.15/sort/sortvecind.c @@ -0,0 +1,90 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "sortvecind_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/sort/sortvecind_source.c b/software/gsl-1.15/sort/sortvecind_source.c new file mode 100644 index 000000000..9b4dfd083 --- /dev/null +++ b/software/gsl-1.15/sort/sortvecind_source.c @@ -0,0 +1,106 @@ +/* + * Implement Heap sort -- direct and indirect sorting + * Based on descriptions in Sedgewick "Algorithms in C" + * + * Copyright (C) 1999 Thomas Walter + * + * 18 February 2000: Modified for GSL by Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +static inline void FUNCTION (index, downheap) (size_t * p, const BASE * data, const size_t stride, const size_t N, size_t k); + +static inline void +FUNCTION (index, downheap) (size_t * p, const BASE * data, const size_t stride, const size_t N, size_t k) +{ + const size_t pki = p[k]; + + while (k <= N / 2) + { + size_t j = 2 * k; + + if (j < N && data[p[j] * stride] < data[p[j + 1] * stride]) + { + j++; + } + + if (!(data[pki * stride] < data[p[j] * stride])) /* avoid infinite loop if nan */ + { + break; + } + + p[k] = p[j]; + + k = j; + } + + p[k] = pki; +} + +void +FUNCTION (gsl_sort, index) (size_t * p, const BASE * data, const size_t stride, const size_t n) +{ + size_t N; + size_t i, k; + + if (n == 0) + { + return; /* No data to sort */ + } + + /* set permutation to identity */ + + for (i = 0 ; i < n ; i++) + { + p[i] = i ; + } + + /* We have n_data elements, last element is at 'n_data-1', first at + '0' Set N to the last element number. */ + + N = n - 1; + + k = N / 2; + k++; /* Compensate the first use of 'k--' */ + do + { + k--; + FUNCTION (index, downheap) (p, data, stride, N, k); + } + while (k > 0); + + while (N > 0) + { + /* first swap the elements */ + size_t tmp = p[0]; + p[0] = p[N]; + p[N] = tmp; + + /* then process the heap */ + N--; + + FUNCTION (index, downheap) (p, data, stride, N, 0); + } +} + +int +FUNCTION (gsl_sort_vector, index) (gsl_permutation * permutation, const TYPE (gsl_vector) * v) +{ + if (permutation->size != v->size) + { + GSL_ERROR ("permutation and vector lengths are not equal", GSL_EBADLEN); + } + + FUNCTION (gsl_sort, index) (permutation->data, v->data, v->stride, v->size) ; + + return GSL_SUCCESS ; +} diff --git a/software/gsl-1.15/sort/subset.c b/software/gsl-1.15/sort/subset.c new file mode 100644 index 000000000..4b2f33c0e --- /dev/null +++ b/software/gsl-1.15/sort/subset.c @@ -0,0 +1,86 @@ +/* sort/subset.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "subset_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/sort/subset_source.c b/software/gsl-1.15/sort/subset_source.c new file mode 100644 index 000000000..a4f6f6880 --- /dev/null +++ b/software/gsl-1.15/sort/subset_source.c @@ -0,0 +1,146 @@ +/* sort/subset_source.c + * + * Copyright (C) 1999,2000,2001 Thomas Walter, Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/* find the k-th smallest elements of the vector data, in ascending order */ + +int +FUNCTION (gsl_sort, smallest) (BASE * dest, const size_t k, + const BASE * src, const size_t stride, + const size_t n) +{ + size_t i, j; + BASE xbound; + + if (k > n) + { + GSL_ERROR ("subset length k exceeds vector length n", GSL_EINVAL); + } + + if (k == 0 || n == 0) + { + return GSL_SUCCESS; + } + + /* take the first element */ + + j = 1; + xbound = src[0 * stride]; + dest[0] = xbound; + + /* examine the remaining elements */ + + for (i = 1; i < n; i++) + { + size_t i1; + + BASE xi = src[i * stride]; + + if (j < k) + { + j++; + } + else if (xi >= xbound) + { + continue; + } + + for (i1 = j - 1; i1 > 0 ; i1--) + { + if (xi > dest[i1 - 1]) + break; + + dest[i1] = dest[i1 - 1]; + } + + dest[i1] = xi; + + xbound = dest[j-1]; + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_sort_vector,smallest) (BASE * dest, const size_t k, + const TYPE (gsl_vector) * v) +{ + return FUNCTION (gsl_sort, smallest) (dest, k, v->data, v->stride, v->size); +} + +int +FUNCTION (gsl_sort, largest) (BASE * dest, const size_t k, + const BASE * src, const size_t stride, + const size_t n) +{ + size_t i, j; + BASE xbound; + + if (k > n) + { + GSL_ERROR ("subset length k exceeds vector length n", GSL_EINVAL); + } + + if (k == 0 || n == 0) + { + return GSL_SUCCESS; + } + + /* take the first element */ + + j = 1; + xbound = src[0 * stride]; + dest[0] = xbound; + + /* examine the remaining elements */ + + for (i = 1; i < n; i++) + { + size_t i1; + + BASE xi = src[i * stride]; + + if (j < k) + { + j++; + } + else if (xi <= xbound) + { + continue; + } + + for (i1 = j - 1; i1 > 0 ; i1--) + { + if (xi < dest[i1 - 1]) + break; + + dest[i1] = dest[i1 - 1]; + } + + dest[i1] = xi; + + xbound = dest[j-1]; + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_sort_vector,largest) (BASE * dest, const size_t k, + const TYPE (gsl_vector) * v) +{ + return FUNCTION (gsl_sort, largest) (dest, k, v->data, v->stride, v->size); +} diff --git a/software/gsl-1.15/sort/subsetind.c b/software/gsl-1.15/sort/subsetind.c new file mode 100644 index 000000000..c8874f50f --- /dev/null +++ b/software/gsl-1.15/sort/subsetind.c @@ -0,0 +1,86 @@ +/* sort/subsetind.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "subsetind_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/sort/subsetind_source.c b/software/gsl-1.15/sort/subsetind_source.c new file mode 100644 index 000000000..ebe745d03 --- /dev/null +++ b/software/gsl-1.15/sort/subsetind_source.c @@ -0,0 +1,146 @@ +/* sort/subsetind_source.c + * + * Copyright (C) 1999,2000,2001 Thomas Walter, Brian Gough + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 3, or (at your option) any + * later version. + * + * This source is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/* find the k-th smallest elements of the vector data, in ascending order */ + +int +FUNCTION (gsl_sort, smallest_index) (size_t * p, const size_t k, + const BASE * src, const size_t stride, + const size_t n) +{ + size_t i, j; + BASE xbound; + + if (k > n) + { + GSL_ERROR ("subset length k exceeds vector length n", GSL_EINVAL); + } + + if (k == 0 || n == 0) + { + return GSL_SUCCESS; + } + + /* take the first element */ + + j = 1; + xbound = src[0 * stride]; + p[0] = 0; + + /* examine the remaining elements */ + + for (i = 1; i < n; i++) + { + size_t i1; + + BASE xi = src[i * stride]; + + if (j < k) + { + j++; + } + else if (xi >= xbound) + { + continue; + } + + for (i1 = j - 1; i1 > 0 ; i1--) + { + if (xi > src[p[i1 - 1] * stride]) + break; + + p[i1] = p[i1 - 1]; + } + + p[i1] = i; + + xbound = src[p[j-1] * stride]; + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_sort_vector,smallest_index) (size_t * p, const size_t k, + const TYPE (gsl_vector) * v) +{ + return FUNCTION (gsl_sort, smallest_index) (p, k, v->data, v->stride, v->size); +} + +int +FUNCTION (gsl_sort, largest_index) (size_t * p, const size_t k, + const BASE * src, const size_t stride, + const size_t n) +{ + size_t i, j; + BASE xbound; + + if (k > n) + { + GSL_ERROR ("subset length k exceeds vector length n", GSL_EINVAL); + } + + if (k == 0 || n == 0) + { + return GSL_SUCCESS; + } + + /* take the first element */ + + j = 1; + xbound = src[0 * stride]; + p[0] = 0; + + /* examine the remaining elements */ + + for (i = 1; i < n; i++) + { + size_t i1; + + BASE xi = src[i * stride]; + + if (j < k) + { + j++; + } + else if (xi <= xbound) + { + continue; + } + + for (i1 = j - 1; i1 > 0 ; i1--) + { + if (xi < src[stride * p[i1 - 1]]) + break; + + p[i1] = p[i1 - 1]; + } + + p[i1] = i; + + xbound = src[stride * p[j-1]]; + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (gsl_sort_vector,largest_index) (size_t * p, const size_t k, + const TYPE (gsl_vector) * v) +{ + return FUNCTION (gsl_sort, largest_index) (p, k, v->data, v->stride, v->size); +} diff --git a/software/gsl-1.15/sort/test.c b/software/gsl-1.15/sort/test.c new file mode 100644 index 000000000..945e76fbc --- /dev/null +++ b/software/gsl-1.15/sort/test.c @@ -0,0 +1,140 @@ +/* sort/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +size_t urand (size_t); + +#include "test_heapsort.c" + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +int +main (void) +{ + size_t i, s; + + gsl_ieee_env_setup (); + + /* Test for lengths of 1 ... 31, then 32, 64, 128, 256, ... */ + + for (i = 1; i < 1024; i = (i < 32) ? i + 1 : 2 * i) + test_heapsort (i); + + for (i = 1; i < 1024; i = (i < 32) ? i + 1 : 2 * i) + { + for (s = 1; s < 4; s++) + { + test_sort_vector (i, s); + test_sort_vector_float (i, s); + test_sort_vector_long_double (i, s); + test_sort_vector_ulong (i, s); + test_sort_vector_long (i, s); + test_sort_vector_uint (i, s); + test_sort_vector_int (i, s); + test_sort_vector_ushort (i, s); + test_sort_vector_short (i, s); + test_sort_vector_uchar (i, s); + test_sort_vector_char (i, s); + } + } + + exit (gsl_test_summary ()); +} + +size_t +urand (size_t N) +{ + static unsigned long int x = 1; + x = (1103515245 * x + 12345) & 0x7fffffffUL; + return (size_t) ((x / 2147483648.0) * N); +} diff --git a/software/gsl-1.15/sort/test_heapsort.c b/software/gsl-1.15/sort/test_heapsort.c new file mode 100644 index 000000000..3f8bfbfe9 --- /dev/null +++ b/software/gsl-1.15/sort/test_heapsort.c @@ -0,0 +1,183 @@ +/* sort/test_heapsort.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int cmp_dbl (const void *a, const void *b); +void test_heapsort (size_t N); +void initialize (double *data, size_t N); +void cpy (double *dest, double *src, size_t N); +void randomize (double *data, size_t n); +void reverse (double *data, size_t N); +int check (double *data, double *orig, size_t N); +int pcheck (size_t * p, double *data, double *orig, size_t N); + +void +test_heapsort (size_t N) +{ + int status; + + double *orig = (double *) malloc (N * sizeof (double)); + double *data = (double *) malloc (N * sizeof (double)); + size_t *p = (size_t *) malloc (N * sizeof(size_t)); + + initialize (orig, N); + + /* Already sorted */ + cpy (data, orig, N); + + status = gsl_heapsort_index (p, data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status |= pcheck (p, data, orig, N); + gsl_test (status, "indexing array, n = %u, ordered", N); + + gsl_heapsort (data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status = check (data, orig, N); + + gsl_test (status, "sorting, array, n = %u, ordered", N); + + /* Reverse the data */ + + cpy (data, orig, N); + reverse (data, N); + + status = gsl_heapsort_index (p, data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status |= pcheck (p, data, orig, N); + gsl_test (status, "indexing array, n = %u, reversed", N); + + gsl_heapsort (data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status = check (data, orig, N); + + gsl_test (status, "sorting, array, n = %u, reversed", N); + + /* Perform some shuffling */ + + cpy (data, orig, N); + randomize (data, N); + + status = gsl_heapsort_index (p, data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status |= pcheck (p, data, orig, N); + gsl_test (status, "indexing array, n = %u, randomized", N); + + gsl_heapsort (data, N, sizeof (double), (gsl_comparison_fn_t) & cmp_dbl); + status = check (data, orig, N); + + gsl_test (status, "sorting, array, n = %u, randomized", N); + + free (orig); + free (data); + free (p); +} + +void +initialize (double *data, size_t N) +{ + size_t i; + + for (i = 0; i < N; i++) + { + data[i] = i; + } +} + +void +cpy (double *dest, double *src, size_t N) +{ + size_t i; + + for (i = 0; i < N; i++) + { + dest[i] = src[i]; + } +} + +void +randomize (double *data, size_t N) +{ + size_t i; + + for (i = 0; i < N; i++) + { + size_t j = urand (N); + double tmp = data[i]; + data[i] = data[j]; + data[j] = tmp; + } +} + +void +reverse (double *data, size_t N) +{ + size_t i; + + for (i = 0; i < N / 2; i++) + { + size_t j = N - i - 1; + + { + double tmp = data[i]; + data[i] = data[j]; + data[j] = tmp; + } + } +} + +int +check (double *data, double *orig, size_t N) +{ + size_t i; + + for (i = 0; i < N; i++) + { + if (data[i] != orig[i]) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + +int +pcheck (size_t * p, double *data, double *orig, size_t N) +{ + size_t i; + + for (i = 0; i < N; i++) + { + if (data[p[i]] != orig[i]) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + + + +int +cmp_dbl (const void *a, const void *b) +{ + const double x = *(const double *) a; + const double y = *(const double *) b; + if (x > y) + return 1; + if (x == y) + return 0; + else + return -1; +} diff --git a/software/gsl-1.15/sort/test_source.c b/software/gsl-1.15/sort/test_source.c new file mode 100644 index 000000000..f009af2e8 --- /dev/null +++ b/software/gsl-1.15/sort/test_source.c @@ -0,0 +1,303 @@ +/* sort/test_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Thomas Walter, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void TYPE (test_sort_vector) (size_t N, size_t stride); +void FUNCTION (my, initialize) (TYPE (gsl_vector) * v); +void FUNCTION (my, randomize) (TYPE (gsl_vector) * v); +int FUNCTION (my, check) (TYPE (gsl_vector) * data, TYPE (gsl_vector) * orig); +int FUNCTION (my, pcheck) (gsl_permutation * p, TYPE (gsl_vector) * data, TYPE (gsl_vector) * orig); +int FUNCTION (my, scheck) (BASE * x, size_t k, TYPE (gsl_vector) * data); +int FUNCTION (my, lcheck) (BASE * x, size_t k, TYPE (gsl_vector) * data); +int FUNCTION (my, sicheck) (size_t * p, size_t k, gsl_permutation * perm, + TYPE (gsl_vector) * data); +int FUNCTION (my, licheck) (size_t * p, size_t k, gsl_permutation * perm, + TYPE (gsl_vector) * data); + +void +TYPE (test_sort_vector) (size_t N, size_t stride) +{ + int status; + size_t k = N/2; + + TYPE (gsl_block) * b1 = FUNCTION (gsl_block, calloc) (N * stride); + TYPE (gsl_block) * b2 = FUNCTION (gsl_block, calloc) (N * stride); + TYPE (gsl_block) * b3 = FUNCTION (gsl_block, calloc) (N * stride); + + TYPE (gsl_vector) * orig = FUNCTION (gsl_vector, alloc_from_block) (b1, 0, N, stride); + TYPE (gsl_vector) * data = FUNCTION (gsl_vector, alloc_from_block) (b2, 0, N, stride); + TYPE (gsl_vector) * data2 = FUNCTION (gsl_vector, alloc_from_block) (b3, 0, N, stride); + + BASE * small = (BASE *)malloc(k * sizeof(BASE)); + BASE * large = (BASE *)malloc(k * sizeof(BASE)); + size_t * index = (size_t *)malloc(k * sizeof(size_t)); + + gsl_permutation *p = gsl_permutation_alloc (N); + + FUNCTION (my, initialize) (orig); + + /* Already sorted */ + FUNCTION (gsl_vector, memcpy) (data, orig); + + status = FUNCTION (gsl_sort_vector, index) (p, data); + status |= FUNCTION (my, pcheck) (p, data, orig); + gsl_test (status, "indexing " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + TYPE (gsl_sort_vector) (data); + status = FUNCTION (my, check) (data, orig); + gsl_test (status, "sorting, " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + FUNCTION (gsl_sort_vector, smallest) (small, k, data); + status = FUNCTION (my, scheck) (small, k, orig); + gsl_test (status, "smallest, " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + FUNCTION (gsl_sort_vector, largest) (large, k, data); + status = FUNCTION (my, lcheck) (large, k, orig); + gsl_test (status, "largest, " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + FUNCTION (gsl_sort_vector, smallest_index) (index, k, data); + status = FUNCTION (my, sicheck) (index, k, p, data); + gsl_test (status, "smallest index, " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + FUNCTION (gsl_sort_vector, largest_index) (index, k, data); + status = FUNCTION (my, licheck) (index, k, p, data); + gsl_test (status, "largest index, " NAME (gsl_vector) ", n = %u, stride = %u, ordered", N, stride); + + /* Reverse the data */ + + FUNCTION (gsl_vector, memcpy) (data, orig); + FUNCTION (gsl_vector, reverse) (data); + + status = FUNCTION (gsl_sort_vector, index) (p, data); + status |= FUNCTION (my, pcheck) (p, data, orig); + gsl_test (status, "indexing " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + TYPE (gsl_sort_vector) (data); + status = FUNCTION (my, check) (data, orig); + gsl_test (status, "sorting, " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + FUNCTION (gsl_vector, memcpy) (data, orig); + FUNCTION (gsl_vector, reverse) (data); + + FUNCTION (gsl_sort_vector, smallest) (small, k, data); + status = FUNCTION (my, scheck) (small, k, orig); + gsl_test (status, "smallest, " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + FUNCTION (gsl_sort_vector, largest) (large, k, data); + status = FUNCTION (my, lcheck) (large, k, orig); + gsl_test (status, "largest, " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + FUNCTION (gsl_sort_vector, smallest_index) (index, k, data); + status = FUNCTION (my, sicheck) (index, k, p, data); + gsl_test (status, "smallest index, " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + FUNCTION (gsl_sort_vector, largest_index) (index, k, data); + status = FUNCTION (my, licheck) (index, k, p, data); + gsl_test (status, "largest index, " NAME (gsl_vector) ", n = %u, stride = %u, reversed", N, stride); + + /* Perform some shuffling */ + + FUNCTION (gsl_vector, memcpy) (data, orig); + FUNCTION (my, randomize) (data); + FUNCTION (gsl_vector, memcpy) (data2, data); + + status = FUNCTION (gsl_sort_vector, index) (p, data); + status |= FUNCTION (my, pcheck) (p, data, orig); + gsl_test (status, "indexing " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + TYPE (gsl_sort_vector) (data); + status = FUNCTION (my, check) (data, orig); + gsl_test (status, "sorting, " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + FUNCTION (gsl_vector, memcpy) (data, data2); + + FUNCTION (gsl_sort_vector, smallest) (small, k, data); + status = FUNCTION (my, scheck) (small, k, orig); + gsl_test (status, "smallest, " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + FUNCTION (gsl_sort_vector, largest) (large, k, data); + status = FUNCTION (my, lcheck) (large, k, orig); + gsl_test (status, "largest, " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + FUNCTION (gsl_sort_vector, smallest_index) (index, k, data); + status = FUNCTION (my, sicheck) (index, k, p, data); + gsl_test (status, "smallest index, " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + FUNCTION (gsl_sort_vector, largest_index) (index, k, data); + status = FUNCTION (my, licheck) (index, k, p, data); + gsl_test (status, "largest index, " NAME (gsl_vector) ", n = %u, stride = %u, randomized", N, stride); + + FUNCTION (gsl_vector, free) (orig); + FUNCTION (gsl_vector, free) (data); + FUNCTION (gsl_vector, free) (data2); + FUNCTION (gsl_block, free) (b1); + FUNCTION (gsl_block, free) (b2); + FUNCTION (gsl_block, free) (b3); + gsl_permutation_free (p); + free (small); + free (large); + free (index); +} + + +void +FUNCTION (my, initialize) (TYPE (gsl_vector) * v) +{ + size_t i; + ATOMIC k = 0; + volatile ATOMIC kk; + + /* Must be sorted initially */ + + for (i = 0; i < v->size; i++) + { + kk = k; + k++; + /* Prevent overflow */ + if (k < kk) k = kk; + FUNCTION (gsl_vector, set) (v, i, k); + } +} + +void +FUNCTION (my, randomize) (TYPE (gsl_vector) * v) +{ + size_t i; + + for (i = 0; i < v->size; i++) + { + size_t j = urand (v->size); + FUNCTION (gsl_vector, swap_elements) (v, i, j); + } +} + +int +FUNCTION (my, check) (TYPE (gsl_vector) * data, TYPE (gsl_vector) * orig) +{ + size_t i; + + for (i = 0; i < data->size; i++) + { + if (FUNCTION (gsl_vector, get) (data, i) != FUNCTION (gsl_vector, get) (orig, i)) + { +#if DUMP_ERROR + size_t j; + for (j = 0 ; j < data->size; j++) { + printf("%u: " OUT_FORMAT " " OUT_FORMAT " %c\n", j, + FUNCTION (gsl_vector, get) (data, j), + FUNCTION (gsl_vector, get) (orig, j), + (i == j) ? '*' : ' '); + } +#endif + + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (my, pcheck) (gsl_permutation * p, TYPE (gsl_vector) * data, TYPE (gsl_vector) * orig) +{ + size_t i; + + for (i = 0; i < p->size; i++) + { + if (FUNCTION (gsl_vector, get) (data, p->data[i]) != FUNCTION (gsl_vector, get) (orig, i)) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (my, scheck) (BASE * x, size_t k, TYPE (gsl_vector) * data) +{ + size_t i; + + for (i = 0; i < k; i++) + { + if (x[i] != FUNCTION (gsl_vector, get) (data, i)) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + + + +int +FUNCTION (my, lcheck) (BASE * x, size_t k, TYPE (gsl_vector) * data) +{ + size_t i; + + for (i = 0; i < k; i++) + { + if (x[i] != FUNCTION (gsl_vector, get) (data, data->size - i - 1)) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + + +int +FUNCTION (my, sicheck) (size_t * p1, size_t k, gsl_permutation * p, + TYPE (gsl_vector) * data) +{ + size_t i; + + for (i = 0; i < k; i++) + { + if (FUNCTION(gsl_vector,get)(data,p1[i]) + != FUNCTION(gsl_vector,get)(data, p->data[i])) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (my, licheck) (size_t * p1, size_t k, gsl_permutation * p, + TYPE (gsl_vector) * data) +{ + size_t i; + + for (i = 0; i < k; i++) + { + if (FUNCTION(gsl_vector,get)(data,p1[i]) + != FUNCTION(gsl_vector,get)(data, p->data[p->size - i - 1])) + { + return GSL_FAILURE; + } + } + + return GSL_SUCCESS; +} + + + diff --git a/software/gsl-1.15/specfunc/.deps/airy.Plo b/software/gsl-1.15/specfunc/.deps/airy.Plo new file mode 100644 index 000000000..8e8bd12b3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/airy.Plo @@ -0,0 +1,101 @@ +airy.lo: airy.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h error.h \ + check.h chebyshev.h cheb_eval_mode.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +error.h: + +check.h: + +chebyshev.h: + +cheb_eval_mode.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/airy_der.Plo b/software/gsl-1.15/specfunc/.deps/airy_der.Plo new file mode 100644 index 000000000..48d43e717 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/airy_der.Plo @@ -0,0 +1,99 @@ +airy_der.lo: airy_der.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h error.h \ + chebyshev.h cheb_eval_mode.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +error.h: + +chebyshev.h: + +cheb_eval_mode.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/airy_zero.Plo b/software/gsl-1.15/specfunc/.deps/airy_zero.Plo new file mode 100644 index 000000000..31506a1f9 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/airy_zero.Plo @@ -0,0 +1,93 @@ +airy_zero.lo: airy_zero.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/atanint.Plo b/software/gsl-1.15/specfunc/.deps/atanint.Plo new file mode 100644 index 000000000..d72595e64 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/atanint.Plo @@ -0,0 +1,95 @@ +atanint.lo: atanint.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_mode.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_result.h chebyshev.h cheb_eval.c \ + eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_result.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel.Plo b/software/gsl-1.15/specfunc/.deps/bessel.Plo new file mode 100644 index 000000000..122f5e347 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel.Plo @@ -0,0 +1,108 @@ +bessel.lo: bessel.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_elementary.h \ + ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_trig.h error.h \ + bessel_amp_phase.h chebyshev.h bessel_temme.h bessel.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_trig.h: + +error.h: + +bessel_amp_phase.h: + +chebyshev.h: + +bessel_temme.h: + +bessel.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_I0.Plo b/software/gsl-1.15/specfunc/.deps/bessel_I0.Plo new file mode 100644 index 000000000..caecfb3ca --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_I0.Plo @@ -0,0 +1,146 @@ +bessel_I0.lo: bessel_I0.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_I1.Plo b/software/gsl-1.15/specfunc/.deps/bessel_I1.Plo new file mode 100644 index 000000000..d16e8147d --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_I1.Plo @@ -0,0 +1,146 @@ +bessel_I1.lo: bessel_I1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_In.Plo b/software/gsl-1.15/specfunc/.deps/bessel_In.Plo new file mode 100644 index 000000000..07faf91e3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_In.Plo @@ -0,0 +1,143 @@ +bessel_In.lo: bessel_In.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h bessel.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +bessel.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Inu.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Inu.Plo new file mode 100644 index 000000000..050a7626d --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Inu.Plo @@ -0,0 +1,150 @@ +bessel_Inu.lo: bessel_Inu.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_temme.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_temme.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_J0.Plo b/software/gsl-1.15/specfunc/.deps/bessel_J0.Plo new file mode 100644 index 000000000..5351263fa --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_J0.Plo @@ -0,0 +1,150 @@ +bessel_J0.lo: bessel_J0.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_mode.h \ + bessel.h ../gsl/gsl_sf_result.h bessel_amp_phase.h chebyshev.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h cheb_eval.c \ + eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_mode.h: + +bessel.h: + +../gsl/gsl_sf_result.h: + +bessel_amp_phase.h: + +chebyshev.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_J1.Plo b/software/gsl-1.15/specfunc/.deps/bessel_J1.Plo new file mode 100644 index 000000000..996560230 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_J1.Plo @@ -0,0 +1,152 @@ +bessel_J1.lo: bessel_J1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_amp_phase.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_amp_phase.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Jn.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Jn.Plo new file mode 100644 index 000000000..02a0f611c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Jn.Plo @@ -0,0 +1,150 @@ +bessel_Jn.lo: bessel_Jn.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h bessel.h bessel_amp_phase.h chebyshev.h \ + bessel_olver.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +bessel.h: + +bessel_amp_phase.h: + +chebyshev.h: + +bessel_olver.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Jnu.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Jnu.Plo new file mode 100644 index 000000000..922ee8ad4 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Jnu.Plo @@ -0,0 +1,148 @@ +bessel_Jnu.lo: bessel_Jnu.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h bessel.h \ + bessel_olver.h bessel_temme.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +bessel.h: + +bessel_olver.h: + +bessel_temme.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_K0.Plo b/software/gsl-1.15/specfunc/.deps/bessel_K0.Plo new file mode 100644 index 000000000..a9c0cb4d3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_K0.Plo @@ -0,0 +1,147 @@ +bessel_K0.lo: bessel_K0.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_K1.Plo b/software/gsl-1.15/specfunc/.deps/bessel_K1.Plo new file mode 100644 index 000000000..20bd37fda --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_K1.Plo @@ -0,0 +1,147 @@ +bessel_K1.lo: bessel_K1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Kn.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Kn.Plo new file mode 100644 index 000000000..5c0d46466 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Kn.Plo @@ -0,0 +1,148 @@ +bessel_Kn.lo: bessel_Kn.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_psi.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Knu.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Knu.Plo new file mode 100644 index 000000000..9b8c40ecd --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Knu.Plo @@ -0,0 +1,150 @@ +bessel_Knu.lo: bessel_Knu.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_temme.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_temme.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Y0.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Y0.Plo new file mode 100644 index 000000000..d5476e07c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Y0.Plo @@ -0,0 +1,152 @@ +bessel_Y0.lo: bessel_Y0.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_amp_phase.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_amp_phase.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Y1.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Y1.Plo new file mode 100644 index 000000000..a10cb531b --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Y1.Plo @@ -0,0 +1,152 @@ +bessel_Y1.lo: bessel_Y1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_amp_phase.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_amp_phase.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Yn.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Yn.Plo new file mode 100644 index 000000000..6171f1a90 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Yn.Plo @@ -0,0 +1,155 @@ +bessel_Yn.lo: bessel_Yn.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_psi.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_amp_phase.h chebyshev.h \ + bessel_olver.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_amp_phase.h: + +chebyshev.h: + +bessel_olver.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_Ynu.Plo b/software/gsl-1.15/specfunc/.deps/bessel_Ynu.Plo new file mode 100644 index 000000000..9489b67cd --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_Ynu.Plo @@ -0,0 +1,148 @@ +bessel_Ynu.lo: bessel_Ynu.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h bessel.h \ + bessel_olver.h bessel_temme.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +bessel.h: + +bessel_olver.h: + +bessel_temme.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_amp_phase.Plo b/software/gsl-1.15/specfunc/.deps/bessel_amp_phase.Plo new file mode 100644 index 000000000..86dbbb900 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_amp_phase.Plo @@ -0,0 +1,142 @@ +bessel_amp_phase.lo: bessel_amp_phase.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h bessel_amp_phase.h \ + chebyshev.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +bessel_amp_phase.h: + +chebyshev.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_i.Plo b/software/gsl-1.15/specfunc/.deps/bessel_i.Plo new file mode 100644 index 000000000..d181c9f4c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_i.Plo @@ -0,0 +1,144 @@ +bessel_i.lo: bessel_i.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_j.Plo b/software/gsl-1.15/specfunc/.deps/bessel_j.Plo new file mode 100644 index 000000000..3d20272b3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_j.Plo @@ -0,0 +1,149 @@ +bessel_j.lo: bessel_j.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_olver.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_olver.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_k.Plo b/software/gsl-1.15/specfunc/.deps/bessel_k.Plo new file mode 100644 index 000000000..a644e6c4a --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_k.Plo @@ -0,0 +1,149 @@ +bessel_k.lo: bessel_k.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h check.h bessel.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +check.h: + +bessel.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_olver.Plo b/software/gsl-1.15/specfunc/.deps/bessel_olver.Plo new file mode 100644 index 000000000..da046ed76 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_olver.Plo @@ -0,0 +1,100 @@ +bessel_olver.lo: bessel_olver.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h bessel.h \ + bessel_olver.h chebyshev.h cheb_eval.c + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +bessel.h: + +bessel_olver.h: + +chebyshev.h: + +cheb_eval.c: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_sequence.Plo b/software/gsl-1.15/specfunc/.deps/bessel_sequence.Plo new file mode 100644 index 000000000..510cd6a8c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_sequence.Plo @@ -0,0 +1,137 @@ +bessel_sequence.lo: bessel_sequence.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_temme.Plo b/software/gsl-1.15/specfunc/.deps/bessel_temme.Plo new file mode 100644 index 000000000..16ceeb25e --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_temme.Plo @@ -0,0 +1,93 @@ +bessel_temme.lo: bessel_temme.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_mode.h \ + bessel_temme.h ../gsl/gsl_sf_result.h chebyshev.h cheb_eval.c + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_mode.h: + +bessel_temme.h: + +../gsl/gsl_sf_result.h: + +chebyshev.h: + +cheb_eval.c: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_y.Plo b/software/gsl-1.15/specfunc/.deps/bessel_y.Plo new file mode 100644 index 000000000..c027b0299 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_y.Plo @@ -0,0 +1,151 @@ +bessel_y.lo: bessel_y.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h error.h bessel.h bessel_olver.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +error.h: + +bessel.h: + +bessel_olver.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/bessel_zero.Plo b/software/gsl-1.15/specfunc/.deps/bessel_zero.Plo new file mode 100644 index 000000000..ddbee8260 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/bessel_zero.Plo @@ -0,0 +1,148 @@ +bessel_zero.lo: bessel_zero.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h error.h \ + bessel_olver.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +error.h: + +bessel_olver.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/beta.Plo b/software/gsl-1.15/specfunc/.deps/beta.Plo new file mode 100644 index 000000000..803f0e02a --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/beta.Plo @@ -0,0 +1,97 @@ +beta.lo: beta.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_log.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_gamma.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_gamma.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/beta_inc.Plo b/software/gsl-1.15/specfunc/.deps/beta_inc.Plo new file mode 100644 index 000000000..93b55d8dc --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/beta_inc.Plo @@ -0,0 +1,99 @@ +beta_inc.lo: beta_inc.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_hyperg.h error.h check.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_hyperg.h: + +error.h: + +check.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/clausen.Plo b/software/gsl-1.15/specfunc/.deps/clausen.Plo new file mode 100644 index 000000000..0e4c03d09 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/clausen.Plo @@ -0,0 +1,95 @@ +clausen.lo: clausen.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_clausen.h chebyshev.h cheb_eval.c \ + eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_clausen.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/coulomb.Plo b/software/gsl-1.15/specfunc/.deps/coulomb.Plo new file mode 100644 index 000000000..9d3e28fc7 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/coulomb.Plo @@ -0,0 +1,102 @@ +coulomb.lo: coulomb.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_psi.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_coulomb.h error.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_coulomb.h: + +error.h: diff --git a/software/gsl-1.15/specfunc/.deps/coulomb_bound.Plo b/software/gsl-1.15/specfunc/.deps/coulomb_bound.Plo new file mode 100644 index 000000000..4396b88ec --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/coulomb_bound.Plo @@ -0,0 +1,105 @@ +coulomb_bound.lo: coulomb_bound.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_laguerre.h ../gsl/gsl_sf_coulomb.h ../gsl/gsl_mode.h \ + error.h check.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_mode.h: + +error.h: + +check.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/coupling.Plo b/software/gsl-1.15/specfunc/.deps/coupling.Plo new file mode 100644 index 000000000..4f91ec2e4 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/coupling.Plo @@ -0,0 +1,140 @@ +coupling.lo: coupling.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_coupling.h error.h eval.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_coupling.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/dawson.Plo b/software/gsl-1.15/specfunc/.deps/dawson.Plo new file mode 100644 index 000000000..0c5e352e1 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/dawson.Plo @@ -0,0 +1,94 @@ +dawson.lo: dawson.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_dawson.h \ + ../gsl/gsl_sf_result.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/debye.Plo b/software/gsl-1.15/specfunc/.deps/debye.Plo new file mode 100644 index 000000000..a640c4a42 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/debye.Plo @@ -0,0 +1,96 @@ +debye.lo: debye.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_debye.h \ + ../gsl/gsl_sf_result.h error.h check.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_result.h: + +error.h: + +check.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/dilog.Plo b/software/gsl-1.15/specfunc/.deps/dilog.Plo new file mode 100644 index 000000000..eee2fa338 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/dilog.Plo @@ -0,0 +1,95 @@ +dilog.lo: dilog.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_dilog.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_dilog.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/elementary.Plo b/software/gsl-1.15/specfunc/.deps/elementary.Plo new file mode 100644 index 000000000..c9be83a3c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/elementary.Plo @@ -0,0 +1,94 @@ +elementary.lo: elementary.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_result.h error.h check.h \ + eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_result.h: + +error.h: + +check.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/ellint.Plo b/software/gsl-1.15/specfunc/.deps/ellint.Plo new file mode 100644 index 000000000..922adca4c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/ellint.Plo @@ -0,0 +1,92 @@ +ellint.lo: ellint.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/elljac.Plo b/software/gsl-1.15/specfunc/.deps/elljac.Plo new file mode 100644 index 000000000..82dd1612c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/elljac.Plo @@ -0,0 +1,88 @@ +elljac.lo: elljac.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_elljac.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_elljac.h: diff --git a/software/gsl-1.15/specfunc/.deps/erfc.Plo b/software/gsl-1.15/specfunc/.deps/erfc.Plo new file mode 100644 index 000000000..a6d046bfd --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/erfc.Plo @@ -0,0 +1,97 @@ +erfc.lo: erfc.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_erf.h check.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_erf.h: + +check.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/exp.Plo b/software/gsl-1.15/specfunc/.deps/exp.Plo new file mode 100644 index 000000000..c6a9d0ee1 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/exp.Plo @@ -0,0 +1,92 @@ +exp.lo: exp.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/expint.Plo b/software/gsl-1.15/specfunc/.deps/expint.Plo new file mode 100644 index 000000000..8b8ccf185 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/expint.Plo @@ -0,0 +1,99 @@ +expint.lo: expint.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_expint.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h error.h check.h \ + chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +error.h: + +check.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/expint3.Plo b/software/gsl-1.15/specfunc/.deps/expint3.Plo new file mode 100644 index 000000000..10b0156c3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/expint3.Plo @@ -0,0 +1,94 @@ +expint3.lo: expint3.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_expint.h \ + ../gsl/gsl_sf_result.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/fermi_dirac.Plo b/software/gsl-1.15/specfunc/.deps/fermi_dirac.Plo new file mode 100644 index 000000000..47cc89605 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/fermi_dirac.Plo @@ -0,0 +1,107 @@ +fermi_dirac.lo: fermi_dirac.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_hyperg.h \ + ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_zeta.h \ + ../gsl/gsl_sf_fermi_dirac.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_zeta.h: + +../gsl/gsl_sf_fermi_dirac.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/gamma.Plo b/software/gsl-1.15/specfunc/.deps/gamma.Plo new file mode 100644 index 000000000..bd9aaa005 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/gamma.Plo @@ -0,0 +1,106 @@ +gamma.lo: gamma.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_log.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_gamma.h error.h check.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_gamma.h: + +error.h: + +check.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/gamma_inc.Plo b/software/gsl-1.15/specfunc/.deps/gamma_inc.Plo new file mode 100644 index 000000000..f29651111 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/gamma_inc.Plo @@ -0,0 +1,100 @@ +gamma_inc.lo: gamma_inc.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_erf.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_expint.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_expint.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/gegenbauer.Plo b/software/gsl-1.15/specfunc/.deps/gegenbauer.Plo new file mode 100644 index 000000000..49fc18624 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/gegenbauer.Plo @@ -0,0 +1,91 @@ +gegenbauer.lo: gegenbauer.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_sf_gegenbauer.h ../gsl/gsl_sf_result.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_result.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg.Plo b/software/gsl-1.15/specfunc/.deps/hyperg.Plo new file mode 100644 index 000000000..fef5a0f50 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg.Plo @@ -0,0 +1,92 @@ +hyperg.lo: hyperg.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h error.h hyperg.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +error.h: + +hyperg.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg_0F1.Plo b/software/gsl-1.15/specfunc/.deps/hyperg_0F1.Plo new file mode 100644 index 000000000..768f6fc9e --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg_0F1.Plo @@ -0,0 +1,148 @@ +hyperg_0F1.lo: hyperg_0F1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_hyperg.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_hyperg.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg_1F1.Plo b/software/gsl-1.15/specfunc/.deps/hyperg_1F1.Plo new file mode 100644 index 000000000..9f1b9a052 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg_1F1.Plo @@ -0,0 +1,155 @@ +hyperg_1F1.lo: hyperg_1F1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_hyperg.h error.h hyperg.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_hyperg.h: + +error.h: + +hyperg.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg_2F0.Plo b/software/gsl-1.15/specfunc/.deps/hyperg_2F0.Plo new file mode 100644 index 000000000..14cfea4a0 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg_2F0.Plo @@ -0,0 +1,93 @@ +hyperg_2F0.lo: hyperg_2F0.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_hyperg.h \ + ../gsl/gsl_sf_result.h error.h hyperg.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_result.h: + +error.h: + +hyperg.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg_2F1.Plo b/software/gsl-1.15/specfunc/.deps/hyperg_2F1.Plo new file mode 100644 index 000000000..2c47586a1 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg_2F1.Plo @@ -0,0 +1,100 @@ +hyperg_2F1.lo: hyperg_2F1.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_gamma.h \ + ../gsl/gsl_sf_psi.h ../gsl/gsl_sf_hyperg.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_hyperg.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/hyperg_U.Plo b/software/gsl-1.15/specfunc/.deps/hyperg_U.Plo new file mode 100644 index 000000000..ea7fdaba6 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/hyperg_U.Plo @@ -0,0 +1,154 @@ +hyperg_U.lo: hyperg_U.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_laguerre.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_hyperg.h error.h hyperg.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_hyperg.h: + +error.h: + +hyperg.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/laguerre.Plo b/software/gsl-1.15/specfunc/.deps/laguerre.Plo new file mode 100644 index 000000000..3484a447d --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/laguerre.Plo @@ -0,0 +1,95 @@ +laguerre.lo: laguerre.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_laguerre.h \ + error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_laguerre.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/lambert.Plo b/software/gsl-1.15/specfunc/.deps/lambert.Plo new file mode 100644 index 000000000..a58c704b3 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/lambert.Plo @@ -0,0 +1,88 @@ +lambert.lo: lambert.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_lambert.h \ + ../gsl/gsl_sf_result.h eval.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_result.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/legendre_H3d.Plo b/software/gsl-1.15/specfunc/.deps/legendre_H3d.Plo new file mode 100644 index 000000000..a05488b91 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/legendre_H3d.Plo @@ -0,0 +1,100 @@ +legendre_H3d.lo: legendre_H3d.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_legendre.h error.h legendre.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_legendre.h: + +error.h: + +legendre.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/legendre_Qn.Plo b/software/gsl-1.15/specfunc/.deps/legendre_Qn.Plo new file mode 100644 index 000000000..6ef88a2a9 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/legendre_Qn.Plo @@ -0,0 +1,151 @@ +legendre_Qn.lo: legendre_Qn.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_elementary.h \ + ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_legendre.h \ + error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_legendre.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/legendre_con.Plo b/software/gsl-1.15/specfunc/.deps/legendre_con.Plo new file mode 100644 index 000000000..6c728453d --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/legendre_con.Plo @@ -0,0 +1,165 @@ +legendre_con.lo: legendre_con.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_poly.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_bessel.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_legendre.h error.h legendre.h \ + eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_poly.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_bessel.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_legendre.h: + +error.h: + +legendre.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/legendre_poly.Plo b/software/gsl-1.15/specfunc/.deps/legendre_poly.Plo new file mode 100644 index 000000000..47709f02e --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/legendre_poly.Plo @@ -0,0 +1,153 @@ +legendre_poly.lo: legendre_poly.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_log.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_legendre.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_legendre.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/log.Plo b/software/gsl-1.15/specfunc/.deps/log.Plo new file mode 100644 index 000000000..2c24cadc2 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/log.Plo @@ -0,0 +1,94 @@ +log.lo: log.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_result.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/mathieu_angfunc.Plo b/software/gsl-1.15/specfunc/.deps/mathieu_angfunc.Plo new file mode 100644 index 000000000..9571f995c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/mathieu_angfunc.Plo @@ -0,0 +1,254 @@ +mathieu_angfunc.lo: mathieu_angfunc.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf_mathieu.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/specfunc/.deps/mathieu_charv.Plo b/software/gsl-1.15/specfunc/.deps/mathieu_charv.Plo new file mode 100644 index 000000000..319193412 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/mathieu_charv.Plo @@ -0,0 +1,254 @@ +mathieu_charv.lo: mathieu_charv.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_mathieu.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/specfunc/.deps/mathieu_coeff.Plo b/software/gsl-1.15/specfunc/.deps/mathieu_coeff.Plo new file mode 100644 index 000000000..c16925235 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/mathieu_coeff.Plo @@ -0,0 +1,220 @@ +mathieu_coeff.lo: mathieu_coeff.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_sf_mathieu.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/specfunc/.deps/mathieu_radfunc.Plo b/software/gsl-1.15/specfunc/.deps/mathieu_radfunc.Plo new file mode 100644 index 000000000..2b323cb04 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/mathieu_radfunc.Plo @@ -0,0 +1,325 @@ +mathieu_radfunc.lo: mathieu_radfunc.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h \ + ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h ../gsl/gsl_sf_bessel.h \ + ../gsl/gsl_sf_clausen.h ../gsl/gsl_sf_coupling.h \ + ../gsl/gsl_sf_coulomb.h ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h \ + ../gsl/gsl_sf_dilog.h ../gsl/gsl_sf_elementary.h \ + ../gsl/gsl_sf_ellint.h ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h \ + ../gsl/gsl_sf_exp.h ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_bessel.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: diff --git a/software/gsl-1.15/specfunc/.deps/mathieu_workspace.Plo b/software/gsl-1.15/specfunc/.deps/mathieu_workspace.Plo new file mode 100644 index 000000000..e7fe1743f --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/mathieu_workspace.Plo @@ -0,0 +1,255 @@ +mathieu_workspace.lo: mathieu_workspace.c ../config.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_mathieu.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: diff --git a/software/gsl-1.15/specfunc/.deps/poch.Plo b/software/gsl-1.15/specfunc/.deps/poch.Plo new file mode 100644 index 000000000..ce956323c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/poch.Plo @@ -0,0 +1,99 @@ +poch.lo: poch.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_log.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_psi.h ../gsl/gsl_sf_gamma.h error.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_gamma.h: + +error.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/pow_int.Plo b/software/gsl-1.15/specfunc/.deps/pow_int.Plo new file mode 100644 index 000000000..627875def --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/pow_int.Plo @@ -0,0 +1,88 @@ +pow_int.lo: pow_int.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_result.h eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_result.h: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/psi.Plo b/software/gsl-1.15/specfunc/.deps/psi.Plo new file mode 100644 index 000000000..01df49d57 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/psi.Plo @@ -0,0 +1,106 @@ +psi.lo: psi.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_zeta.h \ + ../gsl/gsl_sf_psi.h ../gsl/gsl_complex_math.h ../gsl/gsl_complex.h \ + error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_zeta.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_complex_math.h: + +../gsl/gsl_complex.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/result.Plo b/software/gsl-1.15/specfunc/.deps/result.Plo new file mode 100644 index 000000000..52f8a7486 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/result.Plo @@ -0,0 +1,86 @@ +result.lo: result.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: diff --git a/software/gsl-1.15/specfunc/.deps/shint.Plo b/software/gsl-1.15/specfunc/.deps/shint.Plo new file mode 100644 index 000000000..bdecbba27 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/shint.Plo @@ -0,0 +1,94 @@ +shint.lo: shint.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_expint.h \ + ../gsl/gsl_sf_result.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_result.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/sinint.Plo b/software/gsl-1.15/specfunc/.deps/sinint.Plo new file mode 100644 index 000000000..f1a9b163c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/sinint.Plo @@ -0,0 +1,97 @@ +sinint.lo: sinint.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_trig.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_expint.h error.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_expint.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/synchrotron.Plo b/software/gsl-1.15/specfunc/.deps/synchrotron.Plo new file mode 100644 index 000000000..f6920bb52 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/synchrotron.Plo @@ -0,0 +1,100 @@ +synchrotron.lo: synchrotron.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_pow_int.h \ + ../gsl/gsl_sf_synchrotron.h error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_synchrotron.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_airy.Po b/software/gsl-1.15/specfunc/.deps/test_airy.Po new file mode 100644 index 000000000..894dc7cc1 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_airy.Po @@ -0,0 +1,329 @@ +test_airy.o: test_airy.c ../config.h ../gsl/gsl_test.h ../gsl/gsl_sf.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_bessel.Po b/software/gsl-1.15/specfunc/.deps/test_bessel.Po new file mode 100644 index 000000000..abc140f7c --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_bessel.Po @@ -0,0 +1,330 @@ +test_bessel.o: test_bessel.c ../config.h ../gsl/gsl_test.h \ + ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_coulomb.Po b/software/gsl-1.15/specfunc/.deps/test_coulomb.Po new file mode 100644 index 000000000..64e940edd --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_coulomb.Po @@ -0,0 +1,330 @@ +test_coulomb.o: test_coulomb.c ../config.h ../gsl/gsl_test.h \ + ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_dilog.Po b/software/gsl-1.15/specfunc/.deps/test_dilog.Po new file mode 100644 index 000000000..707aa963b --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_dilog.Po @@ -0,0 +1,329 @@ +test_dilog.o: test_dilog.c ../config.h ../gsl/gsl_test.h ../gsl/gsl_sf.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_gamma.Po b/software/gsl-1.15/specfunc/.deps/test_gamma.Po new file mode 100644 index 000000000..e3d3ce52f --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_gamma.Po @@ -0,0 +1,329 @@ +test_gamma.o: test_gamma.c ../config.h ../gsl/gsl_test.h ../gsl/gsl_sf.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_hyperg.Po b/software/gsl-1.15/specfunc/.deps/test_hyperg.Po new file mode 100644 index 000000000..5e9c2ce2e --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_hyperg.Po @@ -0,0 +1,330 @@ +test_hyperg.o: test_hyperg.c ../config.h ../gsl/gsl_test.h \ + ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_legendre.Po b/software/gsl-1.15/specfunc/.deps/test_legendre.Po new file mode 100644 index 000000000..b8b11fa49 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_legendre.Po @@ -0,0 +1,330 @@ +test_legendre.o: test_legendre.c ../config.h ../gsl/gsl_test.h \ + ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h \ + /usr/include/stdlib.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../config.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_mathieu.Po b/software/gsl-1.15/specfunc/.deps/test_mathieu.Po new file mode 100644 index 000000000..60c567557 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_mathieu.Po @@ -0,0 +1,327 @@ +test_mathieu.o: test_mathieu.c ../gsl/gsl_test.h ../gsl/gsl_sf.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h ../gsl/gsl_sf_bessel.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_nan.h \ + ../gsl/gsl_pow_int.h ../gsl/gsl_minmax.h + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_sf_bessel.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/specfunc/.deps/test_sf.Po b/software/gsl-1.15/specfunc/.deps/test_sf.Po new file mode 100644 index 000000000..1112477e1 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/test_sf.Po @@ -0,0 +1,339 @@ +test_sf.o: test_sf.c ../config.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/string.h /usr/include/strings.h \ + /usr/include/secure/_string.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_ieee_utils.h ../gsl/gsl_test.h \ + ../gsl/gsl_sf.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_airy.h \ + ../gsl/gsl_mode.h ../gsl/gsl_sf_bessel.h ../gsl/gsl_sf_clausen.h \ + ../gsl/gsl_sf_coupling.h ../gsl/gsl_sf_coulomb.h \ + ../gsl/gsl_sf_dawson.h ../gsl/gsl_sf_debye.h ../gsl/gsl_sf_dilog.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_ellint.h \ + ../gsl/gsl_sf_elljac.h ../gsl/gsl_sf_erf.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_expint.h ../gsl/gsl_sf_fermi_dirac.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_gegenbauer.h \ + ../gsl/gsl_sf_hyperg.h ../gsl/gsl_sf_laguerre.h \ + ../gsl/gsl_sf_lambert.h ../gsl/gsl_sf_legendre.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_mathieu.h ../gsl/gsl_eigen.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_matrix.h \ + ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_psi.h \ + ../gsl/gsl_sf_synchrotron.h ../gsl/gsl_sf_transport.h \ + ../gsl/gsl_sf_trig.h ../gsl/gsl_sf_zeta.h test_sf.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/string.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_ieee_utils.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sf.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_airy.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_sf_bessel.h: + +../gsl/gsl_sf_clausen.h: + +../gsl/gsl_sf_coupling.h: + +../gsl/gsl_sf_coulomb.h: + +../gsl/gsl_sf_dawson.h: + +../gsl/gsl_sf_debye.h: + +../gsl/gsl_sf_dilog.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_ellint.h: + +../gsl/gsl_sf_elljac.h: + +../gsl/gsl_sf_erf.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_expint.h: + +../gsl/gsl_sf_fermi_dirac.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_gegenbauer.h: + +../gsl/gsl_sf_hyperg.h: + +../gsl/gsl_sf_laguerre.h: + +../gsl/gsl_sf_lambert.h: + +../gsl/gsl_sf_legendre.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_mathieu.h: + +../gsl/gsl_eigen.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_psi.h: + +../gsl/gsl_sf_synchrotron.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_trig.h: + +../gsl/gsl_sf_zeta.h: + +test_sf.h: diff --git a/software/gsl-1.15/specfunc/.deps/transport.Plo b/software/gsl-1.15/specfunc/.deps/transport.Plo new file mode 100644 index 000000000..698d97964 --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/transport.Plo @@ -0,0 +1,98 @@ +transport.lo: transport.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_sf_transport.h ../gsl/gsl_sf_result.h error.h check.h \ + chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_transport.h: + +../gsl/gsl_sf_result.h: + +error.h: + +check.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/trig.Plo b/software/gsl-1.15/specfunc/.deps/trig.Plo new file mode 100644 index 000000000..670b6187f --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/trig.Plo @@ -0,0 +1,97 @@ +trig.lo: trig.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sf_log.h \ + ../gsl/gsl_sf_result.h ../gsl/gsl_sf_trig.h error.h chebyshev.h \ + cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_log.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_trig.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/.deps/zeta.Plo b/software/gsl-1.15/specfunc/.deps/zeta.Plo new file mode 100644 index 000000000..c00fc54dc --- /dev/null +++ b/software/gsl-1.15/specfunc/.deps/zeta.Plo @@ -0,0 +1,104 @@ +zeta.lo: zeta.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h \ + ../gsl/gsl_sf_elementary.h ../gsl/gsl_sf_result.h ../gsl/gsl_sf_exp.h \ + ../gsl/gsl_sf_gamma.h ../gsl/gsl_sf_pow_int.h ../gsl/gsl_sf_zeta.h \ + error.h chebyshev.h cheb_eval.c eval.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sf_elementary.h: + +../gsl/gsl_sf_result.h: + +../gsl/gsl_sf_exp.h: + +../gsl/gsl_sf_gamma.h: + +../gsl/gsl_sf_pow_int.h: + +../gsl/gsl_sf_zeta.h: + +error.h: + +chebyshev.h: + +cheb_eval.c: + +eval.h: diff --git a/software/gsl-1.15/specfunc/ChangeLog b/software/gsl-1.15/specfunc/ChangeLog new file mode 100644 index 000000000..1ca6433b3 --- /dev/null +++ b/software/gsl-1.15/specfunc/ChangeLog @@ -0,0 +1,799 @@ +2010-11-11 Brian Gough + + * ellint.c (gsl_sf_ellint_RC_e, gsl_sf_ellint_RD_e) + (gsl_sf_ellint_RF_e, gsl_sf_ellint_RJ_e): introduce a limit of + 10000 iterations to avoid infinite loops + + * bessel_Knu.c (gsl_sf_bessel_Knu_scaled_e10_e): alternative + version of Knu_scaled function to allow greater range for + gsl_sf_bessel_lnKnu_e. + +2010-10-29 Brian Gough + + * hyperg_U.c (hyperg_U_small_a_bgt0): corrected result->err for + case where a==0.0 + +2010-08-31 Brian Gough + + * beta_inc.c (gsl_sf_beta_inc_e): ignore underflow error when term + is subtracted from 1 + +2010-08-27 Brian Gough + + * hyperg_2F1.c (gsl_sf_hyperg_2F1_e): use ap and bp consistently + in large c and large b cases, previously mixed a,b and ap,bp. + +2010-04-15 Brian Gough + + * atanint.c (gsl_sf_atanint_e): added missing term 1/ax for large x + +2010-02-25 Brian Gough + + * hyperg_U.c (hyperg_U_negx): handle the case where x<0 + +2010-01-23 Brian Gough + + * hyperg_1F1.c (gsl_sf_hyperg_1F1_e): use Kummer transformation + for larger range of x when b>a and a<0 + +2009-07-17 Brian Gough + + * hyperg_U.c (hyperg_U_series): use a rearrangement of the factor + in front of the series to avoid incorrect termination when the + the leading term is zero. + +2009-07-16 Brian Gough + + * poch.c (gsl_sf_lnpoch_sgn_e): handle negative and zero values of + a, e.g. where gamma(a) and/or gamma(a+x) is infinite + (gsl_sf_poch_e): handle the case where lnpoch_sgn returns + GSL_NEGINF when the Pochhammer ratio is zero. + + * test_gamma.c (test_gamma): added tests for poch(a,x) with + negative arguments + +2009-07-12 Brian Gough + + * hyperg_U.c (hyperg_U_int_bge1): avoid using the series when + 1+a-b is zero or a negative integer. + +2009-07-11 Brian Gough + + * hyperg_U.c (gsl_sf_hyperg_U_int_e10_e, gsl_sf_hyperg_U_e10_e) + (hyperg_U_origin, hyperg_U_int_origin): added special case for + U(a,b,z=0). + +2009-07-09 Brian Gough + + * mathieu_workspace.c (gsl_sf_mathieu_free): handle NULL argument + in free + +2009-05-13 Brian Gough + + * hyperg_2F1.c (gsl_sf_hyperg_2F1_e): fix condition on a and b + when c is a negative integer (either a or b must cause + cancellation of the series) + +2009-01-14 Brian Gough + + * mathieu_workspace.c (gsl_sf_mathieu_alloc): increase number of + terms + + * mathieu_charv.c (gsl_sf_mathieu_a): increase number of terms + (gsl_sf_mathieu_b): increase number of terms + +2008-12-04 Brian Gough + + * gamma_inc.c (gamma_inc_D): propagate cancellation error + in (x-a)/x for x close to a + +2008-12-03 Brian Gough + + * exp.c (exprel_n_CF): changed N to double, to allow non-integer + usage for gamma_inc, double error factor to allow for two + parameters in recurrence. + (gsl_sf_exprel_n_CF_e): exported function to allow calls to + exprel_n_CF + + * gamma_inc.c (gamma_inc_P_series): improved convergence condition + using estimate of the remainder of the series, added continued + fraction as a fallback, increased nmax to 10000 + +2008-08-26 Brian Gough + + * ellint.c (gsl_sf_ellint_Kcomp_e): corrected taylor expansion for + k close to 1. + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-06-27 Brian Gough + + * legendre_poly.c (gsl_sf_legendre_array_size): removed inline + version of this function in gsl_sf_legendre.h + +2008-03-17 Brian Gough + + * hyperg_2F1.c (gsl_sf_hyperg_2F1_e): replace duplicate error + check on stat3 by stat4 + +2008-03-15 Brian Gough + + * bessel.c (gsl_sf_bessel_Jnu_asympx_e): use full asymptotic + series + +2008-03-14 Brian Gough + + * bessel_j.c (gsl_sf_bessel_jl_e): increase error estimate by + factor of 2 + +2008-02-09 Brian Gough + + * exp.c (gsl_sf_exp_e10_e): only use exponent e10 when standard + exp() is out of range + (gsl_sf_exp_mult_e10_e): add full set of error terms + +2008-01-10 Brian Gough + + * hyperg_2F1.c (gsl_sf_hyperg_2F1_e): handle case of x==1 + +2007-10-25 Brian Gough + + * bessel.c (gsl_sf_bessel_J_CF1): handle underflow by rescaling in + recurrence + +2007-09-13 Brian Gough + + * ellint.c (gsl_sf_ellint_Pcomp_e): remove test for n <1, no + restriction needed + +2007-09-10 Brian Gough + + * expint.c (gsl_sf_expint_En_e): added for support En(x) + (gsl_sf_expint_En_scaled_e): added for support En(x) scaled + + * gamma_inc.c (gamma_inc_CF): include finite precision of log term + +2007-08-30 Brian Gough + + * psi.c (psi_complex_rhp): accumulate error, to allow for + cancellation effects + + * beta.c (gsl_sf_lnbeta_sgn_e): added missing factor of 2 for + error. + +2007-08-27 Brian Gough + + * beta_inc.c (gsl_sf_beta_inc_e): handle cases where a<=0 or b<=0 + +2007-04-27 Brian Gough + + * lambert.c (halley_iteration): increase tolerance to prevent + exceeding max iters due to finite precision + +2007-04-04 Brian Gough + + * laguerre.c (gsl_sf_laguerre_n_e): use recursion for a=0 in + addition to a>0 + +2007-02-17 Brian Gough + + * log.c (gsl_sf_log_e): removed HIDE_INLINE_STATIC + + * exp.c (gsl_sf_exp_e): removed HIDE_INLINE_STATIC + +2007-02-14 Brian Gough + + * mathieu_charv.c: made solve_cubic static + +2007-02-12 Brian Gough + + * mathieu_charv.c (figi): ensure that e[ii] is set when + e2[ii]==0.0 and there is no error condition, as per the original + eispack routine + +2007-02-09 Brian Gough + + * ellint.c (gsl_sf_ellint_F_e): do argument reduction for phi>pi/2 + (gsl_sf_ellint_E_e): do argument reduction for phi>pi/2 + (gsl_sf_ellint_P_e): do argument reduction for phi>pi/2 + (gsl_sf_ellint_D_e): do argument reduction for phi>pi/2 + (gsl_sf_ellint_Dcomp_e): added complete D integral + (gsl_sf_ellint_Pcomp_e): added complete P integral + +2007-01-31 Brian Gough + + * beta.c (gsl_sf_lnbeta_sgn_e): added to support calculations with + negative a,b + (gsl_sf_lnbeta_e): rewritten in terms of gsl_sf_lnbeta_sgn_e + (gsl_sf_beta_e): handle negative a,b + + * gamma.c (gsl_sf_lngamma_sgn_e): make error calculations an exact + copy of gsl_sf_lngamma_e (these functions could be merged to avoid + duplication) + +2007-01-29 Brian Gough + + * test_legendre.c (test_legendre): added extra test cases for + underflow + +2007-01-26 Brian Gough + + * expint.c (expint_E2_impl): handle x==0.0 as a special case + (expint_E2_impl): corrected error term + + * gsl_sf_log.h: removed inline version of log + + * gsl_sf_exp.h: removed inline version of exp + +2007-01-23 Brian Gough + + * hyperg_1F1.c (hyperg_1F1_1_series): increase accuracy by factor + of 4 in sum, tighter convergence condition, increase error + estimate to allow for accumulated roundoff + (hyperg_1F1_1): use series when |x| > |b| + (gsl_sf_hyperg_1F1_e): only use Kummer when |x| < 100 otherwise + exponential takes extreme value + + * hyperg.c (gsl_sf_hyperg_1F1_series_e): allow 10000 iterations in + series to extend valid range + (gsl_sf_hyperg_1F1_series_e): increase accuracy by factor of 4 in + sum, tighter convergence condition + +2007-01-19 Brian Gough + + * laguerre.c (laguerre_large_n): use the second term in the + asymptotic expansion from Slater, p.73. + +2007-01-17 Brian Gough + + * hyperg_1F1.c (hyperg_1F1_largebx): asymptotic expansion for + large b and x, with |x|<|b| from Slater 4.3.7 + (hyperg_1F1_1): use new asymptotic expansion for |x|<|b| + (hyperg_1F1_small_a_bgt0): use new asymptotic expansion for |x|<|b| + (hyperg_1F1_renorm_b0): add neglected terms in expansion for AS13.3.7 + +2007-01-14 Brian Gough + + * legendre_poly.c (gsl_sf_legendre_sphPlm_e): added explicit + computation of error term to allow for case when final term is + zero. + +2007-01-12 Brian Gough + + * trig.c (gsl_sf_angle_restrict_symm_err_e): compute edge cases + more reliably, return NaN when total loss of precision + (gsl_sf_angle_restrict_pos_err_e): as above + + * legendre_poly.c (gsl_sf_legendre_Pl_e): improve error estimate + for large l by including rounding error at each step of recurrence + +2006-10-03 Brian Gough + + * poch.c (gsl_sf_lnpoch_e, gsl_sf_lnpoch_sgn_e): corrected + result->val to 0.0 for x==0, previously returned incorrect value + 1.0 + +2006-09-24 Brian Gough + + * laguerre.c (laguerre_large_n): work with small angles to avoid + cancellation error, computer angular reduction exactly for integer + eta. + +2006-09-22 Brian Gough + + * zeta.c (gsl_sf_zeta_e): make sin_term exactly zero for negative + even integers + (gsl_sf_zetam1_int_e): return value is -1 for zetam1_int with + negative even integers + +2006-03-26 Brian Gough + + * fermi_dirac.c (fd_neg): initialize s to zero (avoid spurious + warning from compiler) + +2006-02-23 Brian Gough + + * coulomb.c (gsl_sf_coulomb_wave_FG_e): fixed sign of F_lam_min, + covers case when k_lam_G is nonzero and F_lam_min and F_lam differ + in sign. + +2006-01-21 Brian Gough + + * synchrotron.c (gsl_sf_synchrotron_1_e): added first order + correction term for the taylor expansion + (gsl_sf_synchrotron_2_e): added first order correction term for + the taylor expansion + +2006-01-20 Brian Gough + + * bessel_j.c (gsl_sf_bessel_jl_e): limit the use of + gsl_sf_bessel_Jnu_asympx_e to the range x>100*l*l to satisfy + the requirement x>>l*l in the asymptotic expansion + + * bessel_In.c (gsl_sf_bessel_In_scaled_e): limit the use of + gsl_sf_bessel_I_CF1_ser to the region where the continued + converges with the allowed 20000 terms (|x|<1e7) + +2005-12-20 Brian Gough + + * debye.c (gsl_sf_debye_5_e, gsl_sf_debye_6_e): added n=5,6 + (R. J. Mathar) + +2005-11-15 Brian Gough + + * dilog.c (dilog_xge0): fix calculation of error estimate + +2005-08-04 Brian Gough + + * coulomb.c (gsl_sf_coulomb_wave_sphF_array): fix warning about + variable shadowing for k + +2005-07-29 Brian Gough + + * gamma_inc.c (gsl_sf_gamma_inc_Q_e): use continued fraction close + to peak of the integrand x > a - sqrt(a) + +2005-07-28 Brian Gough + + * elljac.c (gsl_sf_elljac_e): use separate iterations to avoid + division by zero, new algorithm from Bulirsch avoids inverse trig + functions. + +2005-07-03 Brian Gough + + * legendre_poly.c (gsl_sf_legendre_sphPlm_e): compute exponential + internally to avoid underflow error when calling gsl_sf_exp_err + +2005-07-02 Brian Gough + + * bessel_i.c (gsl_sf_bessel_il_scaled_array): handle x==0 as a + special case + + * bessel_k.c (gsl_sf_bessel_kl_scaled_array): added lmax==0 as a + special case + + * bessel_y.c (gsl_sf_bessel_yl_array): added lmax==0 as a special + case + + * transport.c (gsl_sf_transport_2_e): improve error estimate for + small x + +2005-06-26 Brian Gough + + * test_sf.c (test_jac): added tests over the full period for + elljac functions + +2005-05-23 Brian Gough + + * test_bessel.c (test_bessel): added test for steed(99,1,...) + + * legendre_H3d.c (legendre_H3d_CF1): use hypot + (legendre_H3d_CF1_ser): use hypot + (gsl_sf_legendre_H3d_e): use hypot + (gsl_sf_legendre_H3d_e): use hypot + (gsl_sf_legendre_H3d_array): use hypot + + * dilog.c (dilogc_unitdisk): use hypot + + * coulomb.c (gsl_sf_coulomb_CL_array): use hypot + (coulomb_F_recur): use hypot + (coulomb_G_recur): use hypot + (coulomb_jwkb): use hypot + (gsl_sf_coulomb_wave_F_array): use hypot + (gsl_sf_coulomb_wave_FG_array): use hypot + (gsl_sf_coulomb_wave_FGp_array): use hypot + + * bessel_j.c (gsl_sf_bessel_jl_steed_array): use hypot + + * bessel.c (gsl_sf_bessel_Inu_scaled_asymp_unif_e): use hypot + (gsl_sf_bessel_Knu_scaled_asymp_unif_e): use hypot + +2005-03-02 Brian Gough + + * coulomb_bound.c (gsl_sf_hydrogenicR_e): don't check for + underflow when function is known to be zero (e.g. r=0 l>0 or at + zeroes of the laguerre polynomial). + +2004-12-29 Brian Gough + + * dilog.c (gsl_sf_complex_dilog_e): use const consistently in + arguments of declaration and definition + (gsl_sf_complex_dilog_xy_e): as above + +2004-12-26 Brian Gough + + * gamma_inc.c (gamma_inc_D): improve error estimate for case of + u=x/a to include cancellation errors and only use it when x < 0.5*a + since the cancellation errors are significant for x/a ~ 1 + +2004-12-23 Brian Gough + + * gsl_sf_coupling.h: fixed declaration to + gsl_sf_coupling_6j_INCORRECT instead of + gsl_sf_coupling_INCORRECT_6j + +2004-11-12 Brian Gough + + * psi.c (gsl_sf_psi_1): added missing function definition + gsl_sf_psi_1 + +2004-10-11 Brian Gough + + * expint.c (gsl_sf_expint_Ei_scaled): fixed call to incorrect + function gsl_sf_expint_Ei_e + +2004-06-03 Brian Gough + + * psi.c (psi_n_xg0): added missing return type int + +2003-11-30 Brian Gough + + * gsl_sf_log.h: added missing headers for inline functions + +2003-08-11 Brian Gough + + * test_sf.c: added preprocessor definitions TEST_FACTOR and + TEST_SIGMA to allow larger tolerances on released versions (to + reduce the number of spurious bug reports). + +2003-07-24 Brian Gough + + * gamma.c (gsl_sf_choose_e): declare k as unsigned int instead of + int + (gsl_sf_gamma_e): avoid shadowed declaration of sgn + + * bessel_sequence.c (gsl_sf_bessel_sequence_Jnu_e): declare i as + size_t instead of int + +2003-06-11 Brian Gough + + * coupling.c (gsl_sf_coupling_6j_INCORRECT_e): fixed typo in test + for two_jf < 0 + (gsl_sf_coupling_6j_e): moved the implementation from the + INCORRECT function into the correct function + +2003-06-05 Brian Gough + + * test_sf.c (test_coupling): added some regression tests for + coupling functions + +2003-06-02 Brian Gough + + * gamma_inc.c (gamma_inc_D): handle x10 as a special case + +2003-04-18 Brian Gough + + * gamma.c (gsl_sf_gammainv_e): handle any singularities in + gamma(x) up front and return zero directly + +2003-04-12 Brian Gough + + * psi.c: changed value of psi(1,1) in table psi_1_table to be + positive ((-)^2 * 1! * zeta(2)), in accordance with Abramowitz & + Stegun 6.4.2. + +2003-04-08 G. Jungman + + * erfc.c, gsl_sf_erf.h: added gsl_sf_hazard_e() and + gsl_sf_hazard() functions + +2003-04-07 G. Jungman + + * gamma_inc.c, gsl_sf_gamma.h: added gsl_sf_gamma_inc_e() and + gsl_sf_gamma_inc(), implmentations of the non-normalized incomplete + gamma function + +2003-03-09 Brian Gough + + * gsl_sf_legendre.h: added missing const to formal parameter on + gsl_sf_legendre_sphPlm_deriv_array + +2003-01-25 Brian Gough + + * test_gamma.c (test_gamma): added a test for + gamma_inc_P(10,1e-16) (BUG#12) + +Sat Sep 7 15:56:15 2002 Brian Gough + + * test_sf.h (TEST_FACTOR): include an overall factor in the test + tolerances, otherwise there are too many bug reports for minor + failures. + +Sun Sep 1 17:34:27 2002 Brian Gough + + * test_legendre.c (test_legendre): increased tolerance on test + +Sat Jul 13 23:11:37 2002 Brian Gough + + * ellint.c (gsl_sf_ellint_Kcomp_e): improved error estimate to + take cancellation of y=1-k^2 into account near k=1 + +Sun Jul 7 21:39:12 2002 Brian Gough + + * test_bessel.c (test_bessel): increased tolerance on test of + bessel_Jn_array + +Tue May 28 21:04:29 2002 Brian Gough + + * psi.c (gsl_sf_psi_1piy_e): changed log(y) to log(ay) since + function is even and can be extended to negative y + +Mon Jan 28 19:02:42 2002 Brian Gough + + * gamma_inc.c (gamma_inc_Q_CF): express 'small' constant in terms + of GSL_DBL_EPSILON + (gamma_inc_Q_CF): patch for more reliable series from Hans Plesser + +Sat Jan 26 17:33:29 2002 Brian Gough + + * test_gamma.c (test_gamma): increased tolerance on a test + + * test_hyperg.c (test_hyperg): increased tolerance on a couple of + tests + +Fri Jan 18 15:12:30 2002 Brian Gough + + * test_airy.c (test_airy): increased tolerance on test + +Tue Jan 8 14:31:04 2002 Brian Gough + + * test_legendre.c (test_legendre): increased tolerance by one + level on _array tests + + * hyperg_1F1.c (hyperg_1F1_small_a_bgt0): fix branch for a==1 + +Fri Dec 7 12:38:40 2001 Brian Gough + + * laguerre.c (laguerre_n_cp): catch internal error, not global + error + + * error.h (INTERNAL_OVERFLOW_ERROR): added internal error macros + which do not call the error handler. + +Wed Dec 5 19:25:26 2001 Brian Gough + + * gamma.c (gamma_xgthalf): return gamma(x) exactly when x is an + integer + + * hyperg_1F1.c (hyperg_1F1_ab_posint): fix bug in recurrence + initialisation, as done for hyperg_1F1_ab_pos + +Thu Oct 18 11:37:25 2001 Brian Gough + + * coulomb.c (gsl_sf_coulomb_CL_array): renamed from + gsl_sf_coulomb_CL_list for consistency + +Sat Oct 13 15:55:56 2001 Brian Gough + + * cheb_eval.c (cheb_eval_e): keep track of cancellation error to + prevent underestimates of total error. + +Fri Oct 12 16:39:27 2001 Brian Gough + + * test_hyperg.c (test_hyperg): increased tolerance from TOL0 to + TOL1 on one test to allow it to pass under different optimizations + +Thu Oct 11 14:21:34 2001 Brian Gough + + * gegenbauer.c (gsl_sf_gegenpoly_n_e): initialize variable gk to + zero to avoid warning + + * bessel_i.c (gsl_sf_bessel_il_scaled_e): initialize variable + iellm1 to zero to avoid warning + + * bessel_Jnu.c (gsl_sf_bessel_Jnu_e): initialize variable Ynp1 to + zero to avoid warning + + * legendre_poly.c (gsl_sf_legendre_sphPlm_e): initialize variables + p_ell, y_ell to zero to avoid warning + +Thu Sep 6 10:38:51 2001 Brian Gough + + * clausen.c: added missing initialiser to cheb_series struct + + * pow_int.c (gsl_sf_pow_int_e): handle the case x == 0, n < 0 + + * legendre_poly.c (gsl_sf_legendre_array_size): added missing + static version of this inline function + +Wed Aug 15 20:18:43 2001 Brian Gough + + * hyperg_1F1.c (hyperg_1F1_ab_pos): fix bug in recurrence + initialisation + (hyperg_1F1_ab_neg): if all else fails, try the series. + +Wed Aug 8 19:55:34 2001 Brian Gough + + * test_sf.c (test_coupling): used analytic expressions for the + exact values to problems with insufficient precision + +Thu Jul 12 15:25:04 2001 Brian Gough + + * test_legendre.c (test_legendre): corrected tests to use exact + floating point arguments near singularities. + + * legendre_Qn.c (gsl_sf_legendre_Q0_e): removed unnecessary error + terms that I added + (gsl_sf_legendre_Q1_e): removed unnecessary error terms that I + added + +Wed Jul 11 16:06:45 2001 Brian Gough + + * error.h: moved domain, overflow and underflow errors into + macros, return Nan for domain error, Inf for overflow. + +Tue Jul 10 22:00:55 2001 Brian Gough + + * erfc.c (gsl_sf_log_erfc_e): introduce an additional log(erfc) + branch to prevent loss of accuracy for small x + + * test_sf.c (test_zeta): increased tolerance on zeta function test + to take into account differences in rounding + +2001-07-10 Brian Gough + + * legendre_Qn.c (gsl_sf_legendre_Q0_e): use (log1p(x) - log1p(-x)) + instead of log((1+x)/(1-x)), for accuracy + (gsl_sf_legendre_Q1_e): use (log1p(x) - log1p(-x)) instead of + log((1+x)/(1-x)), for accuracy + (gsl_sf_legendre_Q0_e): improve error estimate near singular + points + (gsl_sf_legendre_Q1_e): improve error estimate near singular + points + (gsl_sf_legendre_Q0_e): fixed incorrect factor of 2 in asymptotic + expansion + + * check.h (CHECK_UNDERFLOW): provide macro for checking results + for underflow + +Fri Jul 6 20:16:19 2001 Brian Gough + + * zeta.c (riemann_zeta1m_slt0): added a function to compute + zeta(1-s) without loss of accuracy for s near zero, as used by the + reflection formula. This fixes a bug in the accuracy of results + of zeta(-x) for small x, where loss of precision previously + occurred by evaluating 1-x. + +2001-07-06 Brian Gough + + * bessel_I0.c (gsl_sf_bessel_I0_scaled_e): added missing scaling + factor of exp(-x) for case x<2sqrt(epsilon) + +Thu Jul 5 16:16:13 2001 Brian Gough + + * erfc.c (gsl_sf_erfc_e): corrected case of -10 + + * eval.h (EVAL_DOUBLE): avoid returning the status value as a + numerical result + +2001-06-28 Brian Gough + + * elementary.c (gsl_sf_multiply_e): use GSL_COERCE_DBL macro to + deal with extended register problem + + * coupling.c: include stdlib.h for prototype of abs() + +Wed Jun 27 21:20:22 2001 Brian Gough + + * test_sf.c (test_fermidirac): increased tolerance on test of + gsl_sf_fermi_dirac_int(9,500) by factor of two to allow for MSVC + +Tue Jun 26 12:10:17 2001 Brian Gough + + * gsl_sf_gamma.h: added const to prototype, to match function + definition + +Sun May 6 13:01:01 2001 Brian Gough + + * test_sf.c: initialize message_buff to null string to prevent + random segmentation faults + + * test_sf.h: simplified test macros to reduce stack usage + +Mon Apr 30 12:38:15 2001 Brian Gough + + * airy_zero.c bessel_zero.c: zeros are now counted using an + unsigned int + + * poly.c: moved poly_eval function into poly/ directory + +Wed Apr 25 17:28:48 2001 Brian Gough + + * trig.c (gsl_sf_polar_to_rect): dropped _e from polar/rect + conversion functions + +Tue Apr 24 17:05:22 2001 Brian Gough + + * split out chebyshev functions into their own cheb/ directory, + leaving behind an internal cheb struct and cheb evaluation + function. + +Mon Apr 23 10:21:06 2001 Brian Gough + + * changed tests for EFAULT into a commented-out macro, since + EFAULT should only apply to invalid non-null pointers, but it + might be useful to keep the tests around for debugging in this + directory. + + * unified error handling conventions to _e for error handling + functions and no suffix for plain functions, so _impl functions + are no longer needed. + +1999-08-02 Mark Galassi + + * fermi_dirac.c: took out the use of some "const int" constants + which were being used to size arrays, since this is not portable + (thanks to Bernd Petrovitsch for pointing + this out). + +1999-01-02 Mark Galassi + + * trig.c (gsl_sf_rect_to_polar_impl): introduced an #ifdef + HAVE_HYPOT for systems that do not have the hypot() routine. + +Sun Feb 14 20:59:50 1999 Brian Gough + + * Makefile.am (include_HEADERS): added gsl_sf_result.h + +1998-12-05 Mark Galassi + + * Makefile.am: t-erf.c was commented out, which is a problem + (pointed out by automake-1.3b). Moved the commented-out t-erf.c + line to the end of the long list of files. + + * legendre_poly.c (gsl_sf_legendre_Pl_impl): + * legendre_con.c (gsl_sf_conicalP_xgt1_neg_mu_largetau_impl): + added an ugly fix to the invocation of gsl_sf_bessel_Jn_impl() to + give it two bogus arguments so that it builds. I hope Jerry fixes + it up soon! + + * gsl_sf_airy.h: added an include of gsl_precision.h so that + gsl_prec_t is defined. + +Tue Nov 17 17:29:31 1998 Brian Gough + + * added #include to all top-level source files + + * chebyshev.c (gsl_sf_cheb_eval_n): changed local gslMIN and + gslMAX to the standard GSL_MIN and GSL_MAX macros + +Tue Aug 18 13:36:15 1998 Brian Gough + + * coulomb.c (C0sq): changed to using gsl_sf_expm1_impl instead of + expm1, since the latter is a GNU extension. + +Mon Aug 3 14:43:16 1998 Brian Gough + + * bessel_amp_phase.h: undefined consts are now declared extern + +Mon Jul 13 12:40:27 1998 Brian Gough + + * gamma.c: changed all the factorial functions to take unsigned + int arguments, since negative values are not allowed. + (gsl_sf_choose): fixed off by one error in call to factorial. + +Sun Jul 12 13:21:41 1998 Brian Gough + + * gsl_sf_legendre.h, gsl_sf_poly.h, gsl_sf_pow_int.h: added + HAVE_INLINE around some inline definitions in the header files + + * gamma.c: implemented the natural versions of gsl_sf_lnchoose and + gsl_sf_choose. + +Wed Apr 15 21:27:48 1998 Brian Gough + + * added the return code as the second argument of GSL_WARNING, so + we can filter on the error number or output a standard message for + each one. + +1998-02-02 Mark Galassi + + * Makefile.am (include_HEADERS): added gsl_specfunc.h so it gets + into the distribution. + (INCLUDES): added -I$(top_srcdir) so that bessel.c can find + gsl_math.h diff --git a/software/gsl-1.15/specfunc/Makefile.am b/software/gsl-1.15/specfunc/Makefile.am new file mode 100644 index 000000000..11b1fbc8f --- /dev/null +++ b/software/gsl-1.15/specfunc/Makefile.am @@ -0,0 +1,19 @@ +noinst_LTLIBRARIES = libgslspecfunc.la + +pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h + +noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h + +INCLUDES = -I$(top_srcdir) + +libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c + + diff --git a/software/gsl-1.15/specfunc/Makefile.in b/software/gsl-1.15/specfunc/Makefile.in new file mode 100644 index 000000000..91fda4dc2 --- /dev/null +++ b/software/gsl-1.15/specfunc/Makefile.in @@ -0,0 +1,772 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = specfunc +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslspecfunc_la_LIBADD = +am_libgslspecfunc_la_OBJECTS = airy.lo airy_der.lo airy_zero.lo \ + atanint.lo bessel.lo bessel_I0.lo bessel_I1.lo bessel_In.lo \ + bessel_Inu.lo bessel_J0.lo bessel_J1.lo bessel_Jn.lo \ + bessel_Jnu.lo bessel_K0.lo bessel_K1.lo bessel_Kn.lo \ + bessel_Knu.lo bessel_Y0.lo bessel_Y1.lo bessel_Yn.lo \ + bessel_Ynu.lo bessel_amp_phase.lo bessel_i.lo bessel_j.lo \ + bessel_k.lo bessel_olver.lo bessel_temme.lo bessel_y.lo \ + bessel_zero.lo bessel_sequence.lo beta.lo beta_inc.lo \ + clausen.lo coulomb.lo coupling.lo coulomb_bound.lo dawson.lo \ + debye.lo dilog.lo elementary.lo ellint.lo elljac.lo erfc.lo \ + exp.lo expint.lo expint3.lo fermi_dirac.lo gegenbauer.lo \ + gamma.lo gamma_inc.lo hyperg_0F1.lo hyperg_2F0.lo \ + hyperg_1F1.lo hyperg_2F1.lo hyperg_U.lo hyperg.lo laguerre.lo \ + lambert.lo legendre_H3d.lo legendre_Qn.lo legendre_con.lo \ + legendre_poly.lo log.lo mathieu_angfunc.lo mathieu_charv.lo \ + mathieu_coeff.lo mathieu_radfunc.lo mathieu_workspace.lo \ + poch.lo pow_int.lo psi.lo result.lo shint.lo sinint.lo \ + synchrotron.lo transport.lo trig.lo zeta.lo +libgslspecfunc_la_OBJECTS = $(am_libgslspecfunc_la_OBJECTS) +am_test_OBJECTS = test_sf.$(OBJEXT) test_airy.$(OBJEXT) \ + test_bessel.$(OBJEXT) test_coulomb.$(OBJEXT) \ + test_dilog.$(OBJEXT) test_gamma.$(OBJEXT) \ + test_hyperg.$(OBJEXT) test_legendre.$(OBJEXT) \ + test_mathieu.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslspecfunc.la ../eigen/libgsleigen.la \ + ../linalg/libgsllinalg.la ../sort/libgslsort.la \ + ../matrix/libgslmatrix.la ../vector/libgslvector.la \ + ../blas/libgslblas.la ../cblas/libgslcblas.la \ + ../block/libgslblock.la ../complex/libgslcomplex.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslspecfunc_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslspecfunc_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslspecfunc.la +pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h +noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h +INCLUDES = -I$(top_srcdir) +libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu specfunc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu specfunc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslspecfunc.la: $(libgslspecfunc_la_OBJECTS) $(libgslspecfunc_la_DEPENDENCIES) + $(LINK) $(libgslspecfunc_la_OBJECTS) $(libgslspecfunc_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/airy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/airy_der.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/airy_zero.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atanint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_I0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_I1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_In.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Inu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_J0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_J1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Jn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Jnu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_K0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_K1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Kn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Knu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Y0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Y1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Yn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_Ynu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_amp_phase.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_i.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_j.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_olver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_sequence.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_temme.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_y.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bessel_zero.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beta_inc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clausen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coulomb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coulomb_bound.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coupling.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dawson.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debye.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dilog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elementary.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ellint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elljac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erfc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expint3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fermi_dirac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma_inc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gegenbauer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg_0F1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg_1F1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg_2F0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg_2F1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperg_U.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/laguerre.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lambert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre_H3d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre_Qn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre_con.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre_poly.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathieu_angfunc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathieu_charv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathieu_coeff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathieu_radfunc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathieu_workspace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_int.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchrotron.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_airy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bessel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_coulomb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dilog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gamma.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hyperg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_legendre.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mathieu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transport.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/specfunc/TODO b/software/gsl-1.15/specfunc/TODO new file mode 100644 index 000000000..9e48f694b --- /dev/null +++ b/software/gsl-1.15/specfunc/TODO @@ -0,0 +1,678 @@ +# -*- org -*- +#+CATEGORY: specfunc + +* Complex hypergeometric function 1F1 + +* Could probably return immediately for exact zeros in 3j,6j,9j +functions. Easiest to implement for 3j. + + Note from Serge Winitzki : + + The package "matpack" (www.matpack.de) includes many special functions, + also the 3j symbols. They refer to some quite complicated numerical + methods using recursion relations to get the right answers for large + momenta, and to 1975-1976 papers by Schulten and Gordon for the + description of the algorithms. The papers can be downloaded for free at + http://www.ks.uiuc.edu/Publications/Papers/ + + http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU76B + http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU75A + http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU75 + +* add Fresnel Integrals to specfunc. See TOMS 723 + 2 subsequent +errata. + +* make mode variables consistent in specfunc -- some seem to be +unnecessary from performance point of view since the speed difference +is negligible. + +* From: "Alexander Babansky" +To: "Brian Gough" +Subject: Re: gsl-1.2 +Date: Sun, 3 Nov 2002 14:15:15 -0500 + +Hi Brian, +May I suggest you to add another function to gsl-1.2 ? +It's a modified Ei(x) function: + +Em(x)=exp(-x)*Ei(x); + +As u might know, Ei(x) raises as e^x on the negative interval. +Therefore, Ei(100) is very very large. +But Ei(100)*exp(-100) = 0.010; + +Unfortunately, if u try x=800 u'll get overflow in Ei(800). +but Ei(800)*exp(-800) should be around 0.0001; + +Modified function Em(x) is used in cos, sin integrals such as: +int_0^\infinity dx sin(bx)/(x^2+z^2)=(1/2z)*(Em(bz)-Em(-bz)); + +int_0^\infinity dx x cos(bx)/(x^2+z^2)=(1/2)*(Em(bz)+Em(-bz)); + +One of possible ways to add it to the library is: +Em(x) = - PV int_0^\infinity e^(-t)/(t+x) dt + +Sincerely, +Alex + +DONE: Wed Nov 6 13:06:42 MST 2002 [GJ] + + +---------------------------------------------------------------------- + +The following should be finished before a 1.0 level release. + +* Implement the conicalP_sph_reg() functions. + DONE: Fri Nov 6 23:33:53 MST 1998 [GJ] + +* Irregular (Q) Legendre functions, at least + the integer order ones. More general cases + can probably wait. + DONE: Sat Nov 7 15:47:35 MST 1998 [GJ] + +* Make hyperg_1F1() work right. + This is the last remaining source of test failures. + The problem is with an unstable recursion in certain cases. + Look for the recursion with the variable named "start_pair"; + this is stupid hack to keep track of when the recursion + result is going the wrong way for awhile by remembering the + minimum value. An error estimate is amde from that. But it + is just a hack. Somethign must be done abou that case. + +* Clean-up Coulomb wave functions. This does not + mean completing a fully controlled low-energy + evaluation, which is a larger project. + DONE: Sun May 16 13:49:47 MDT 1999 [GJ] + +* Clean-up the Fermi-Dirac code. The full Fermi-Dirac + functions can probably wait until a later release, + but we should have at least the common j = integer and + j = 1/2-integer cases for the 1.0 release. These + are not too hard. + DONE: Sat Nov 7 19:46:27 MST 1998 [GJ] + +* Go over the tests and make sure nothing is left out. + +* Sanitize all the error-checking, error-estimation, + algorithm tuning, etc. + +* Fill out our scorecard, working from Lozier's + "Software Needs in Special Functions" paper. + +* Final Seal of Approval + This section has itself gone through several + revisions (sigh), proving that the notion of + done-ness is ill-defined. So it is worth + stating the criteria for done-ness explicitly: + o interfaces stabilized + o error-estimation in place + o all deprecated constructs removed + o passes tests + + + - airy.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - airy_der.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - airy_zero.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - atanint.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_I0.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_I1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_In.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Inu.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_J0.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_J1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Jn.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Jnu.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_K0.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_K1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Kn.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Knu.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Y0.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Y1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Yn.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_Ynu.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_amp_phase.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_i.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_j.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_k.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_olver.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_sequence.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_temme.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_y.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - bessel_zero.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - beta.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - chebyshev.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - clausen.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - coulomb.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - coulomb_bound.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - coupling.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - dawson.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - debye.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - dilog.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - elementary.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - ellint.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - elljac.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - erfc.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - exp.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - expint.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - expint3.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - fermi_dirac.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - gamma.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - gamma_inc.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - gegenbauer.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - hyperg.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - hyperg_0F1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - hyperg_1F1.c + + - hyperg_2F0.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - hyperg_2F1.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - hyperg_U.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - laguerre.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - legendre_H3d.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - legendre_Qn.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - legendre_con.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - legendre_poly.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - log.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - poch.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - poly.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - pow_int.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - psi.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - result.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - shint.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - sinint.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - synchrotron.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - transport.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - trig.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + - zeta.c + INTERFACES: + ERRORESTIM: + DEPRECATED: + PASSTESTS: + + + +---------------------------------------------------------------------- + +The following are important but probably will +not see completion before a 1.0 level release. + +* Incomplete Fermi-Dirac functions. + Other Fermi-Dirac functions, including the + generic 1/2-integer case, which was not done. + +* Implement the low-energy regime for the Coulomb + wave functions. This is fairly well understood in + the recent literature but will require some + detailed work. Specifically this means creating + a drop-in replacement for coulomb_jwkb() which + is controlled and extensible. + +* General Legendre functions (at least on the cut). + This subsumes the toroidal functions, so we need not + consider those separately. SLATEC code exists (originally + due to Olver+Smith). + +* Characterize the algorithms. A significant fraction of + the code is home-grown and it should be reviewed by + other parties. + + +---------------------------------------------------------------------- + +The following are extra features which need not +be implemented for a version 1.0 release. + +* Spheroidal wave functions. + +* Mathieu functions. + +* Weierstrass elliptic functions. + + +---------------------------------------------------------------------- + +Improve accuracy of ERF + +NNTP-Posting-Date: Thu, 11 Sep 2003 07:41:42 -0500 +From: "George Marsaglia" +Newsgroups: comp.lang.c +References: +Subject: Re: When (32-bit) double precision isn't precise enough +Date: Thu, 11 Sep 2003 08:41:40 -0400 +X-Priority: 3 +X-MSMail-Priority: Normal +X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 +X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 +Message-ID: +Lines: 265 +NNTP-Posting-Host: 68.35.247.101 +X-Trace: sv3-4YY+jkhhdeQvGKAREa99vDBFHJoKVqVBdUTSuRxA71OwlgxX0uUFnKYs54FlnUs0Xb6BRngKigkd75d!tKin8l8rAQKylaP+4vzTI3AO33bivOw1lKDZUUtXe4lUMW1qn+goUp/Pfksstg== +X-Complaints-To: abuse@comcast.net +X-DMCA-Complaints-To: dmca@comcast.net +X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers +X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly +X-Postfilter: 1.1 + + +Why most of those who deal with the normal integral in probability +theory are still stuck with the historical baggage of the error function +is a puzzle to me, as is the poor quality of the results one gets from +standard library implementations of erf(). (One of the most common + is based on ALGORITHM AS66, APPL. STATIST.(1973) Vol.22, .424 by HILL, + which gives only 6-8 digit accuracy). + +Here is a listing of my method: + +/* +Marsaglia Complementary Normal Distribution Function + cPhi(x) = integral from x to infinity of exp(-.5*t^2)/sqrt(2*pi), x<15 + 15-digit accuracy for x<15, returns 0 for x>15. +#include +*/ + +double cPhi(double x){ +long double v[]={0.,.65567954241879847154L, +.42136922928805447322L,.30459029871010329573L, +.23665238291356067062L,.19280810471531576488L, +.16237766089686746182L,.14010418345305024160L, +.12313196325793229628L,.10978728257830829123L, +.99028596471731921395e-1L,.90175675501064682280e-1L, +.82766286501369177252e-1L,.76475761016248502993e-1L, +.71069580538852107091e-1L,.66374235823250173591e-1L}; +long double h,a,b,z,t,sum,pwr; +int i,j; + if(x>15.) return (0.); + if(x<-15.) return (1.); + j=fabs(x)+1.; + z=j; + h=fabs(x)-z; + a=v[j]; + b=z*a-1.; + pwr=1.; + sum=a+h*b; + for(i=2;i<60;i+=2){ + a=(a+z*b)/i; + b=(b+z*a)/(i+1); + pwr=pwr*h*h; + t=sum; + sum=sum+pwr*(a+h*b); + if(sum==t) break; } + sum=sum*exp(-.5*x*x-.91893853320467274178L); + if(x<0.) sum=1.-sum; + return ((double) sum); + } +*/ + end of listing +*/ + +The method is based on defining phi(x)=exp(-x^2)/sqrt(2pi) and + + R(x)=cPhi(x)/phi(x). + +The function R(x) is well-behaved and terms of its Taylor +series are readily obtained by a two-term recursion. With an accurate +representation of R(x) at ,say, x=0,1,2,...,15, a simple evaluation +of the Taylor series at intermediate points provides up to +15 digits of accuracy. +An article describing the method will be in the new version of +my Diehard CDROM. A new version of the Diehard tests +of randomness (but not yet the new DVDROM) is at + http://www.csis.hku.hk/~diehard/ + + + George Marsaglia \ No newline at end of file diff --git a/software/gsl-1.15/specfunc/airy.c b/software/gsl-1.15/specfunc/airy.c new file mode 100644 index 000000000..18b78107a --- /dev/null +++ b/software/gsl-1.15/specfunc/airy.c @@ -0,0 +1,869 @@ +/* specfunc/airy.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval_mode.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* chebyshev expansions for Airy modulus and phase + based on SLATEC r9aimp() + + Series for AM21 on the interval -1.25000D-01 to 0. + with weighted error 2.89E-17 + log weighted error 16.54 + significant figures required 14.15 + decimal places required 17.34 + + Series for ATH1 on the interval -1.25000D-01 to 0. + with weighted error 2.53E-17 + log weighted error 16.60 + significant figures required 15.15 + decimal places required 17.38 + + Series for AM22 on the interval -1.00000D+00 to -1.25000D-01 + with weighted error 2.99E-17 + log weighted error 16.52 + significant figures required 14.57 + decimal places required 17.28 + + Series for ATH2 on the interval -1.00000D+00 to -1.25000D-01 + with weighted error 2.57E-17 + log weighted error 16.59 + significant figures required 15.07 + decimal places required 17.34 +*/ + +static double am21_data[37] = { + 0.0065809191761485, + 0.0023675984685722, + 0.0001324741670371, + 0.0000157600904043, + 0.0000027529702663, + 0.0000006102679017, + 0.0000001595088468, + 0.0000000471033947, + 0.0000000152933871, + 0.0000000053590722, + 0.0000000020000910, + 0.0000000007872292, + 0.0000000003243103, + 0.0000000001390106, + 0.0000000000617011, + 0.0000000000282491, + 0.0000000000132979, + 0.0000000000064188, + 0.0000000000031697, + 0.0000000000015981, + 0.0000000000008213, + 0.0000000000004296, + 0.0000000000002284, + 0.0000000000001232, + 0.0000000000000675, + 0.0000000000000374, + 0.0000000000000210, + 0.0000000000000119, + 0.0000000000000068, + 0.0000000000000039, + 0.0000000000000023, + 0.0000000000000013, + 0.0000000000000008, + 0.0000000000000005, + 0.0000000000000003, + 0.0000000000000001, + 0.0000000000000001 +}; +static cheb_series am21_cs = { + am21_data, + 36, + -1, 1, + 20 +}; + +static double ath1_data[36] = { + -0.07125837815669365, + -0.00590471979831451, + -0.00012114544069499, + -0.00000988608542270, + -0.00000138084097352, + -0.00000026142640172, + -0.00000006050432589, + -0.00000001618436223, + -0.00000000483464911, + -0.00000000157655272, + -0.00000000055231518, + -0.00000000020545441, + -0.00000000008043412, + -0.00000000003291252, + -0.00000000001399875, + -0.00000000000616151, + -0.00000000000279614, + -0.00000000000130428, + -0.00000000000062373, + -0.00000000000030512, + -0.00000000000015239, + -0.00000000000007758, + -0.00000000000004020, + -0.00000000000002117, + -0.00000000000001132, + -0.00000000000000614, + -0.00000000000000337, + -0.00000000000000188, + -0.00000000000000105, + -0.00000000000000060, + -0.00000000000000034, + -0.00000000000000020, + -0.00000000000000011, + -0.00000000000000007, + -0.00000000000000004, + -0.00000000000000002 +}; +static cheb_series ath1_cs = { + ath1_data, + 35, + -1, 1, + 15 +}; + +static double am22_data[33] = { + -0.01562844480625341, + 0.00778336445239681, + 0.00086705777047718, + 0.00015696627315611, + 0.00003563962571432, + 0.00000924598335425, + 0.00000262110161850, + 0.00000079188221651, + 0.00000025104152792, + 0.00000008265223206, + 0.00000002805711662, + 0.00000000976821090, + 0.00000000347407923, + 0.00000000125828132, + 0.00000000046298826, + 0.00000000017272825, + 0.00000000006523192, + 0.00000000002490471, + 0.00000000000960156, + 0.00000000000373448, + 0.00000000000146417, + 0.00000000000057826, + 0.00000000000022991, + 0.00000000000009197, + 0.00000000000003700, + 0.00000000000001496, + 0.00000000000000608, + 0.00000000000000248, + 0.00000000000000101, + 0.00000000000000041, + 0.00000000000000017, + 0.00000000000000007, + 0.00000000000000002 +}; +static cheb_series am22_cs = { + am22_data, + 32, + -1, 1, + 15 +}; + +static double ath2_data[32] = { + 0.00440527345871877, + -0.03042919452318455, + -0.00138565328377179, + -0.00018044439089549, + -0.00003380847108327, + -0.00000767818353522, + -0.00000196783944371, + -0.00000054837271158, + -0.00000016254615505, + -0.00000005053049981, + -0.00000001631580701, + -0.00000000543420411, + -0.00000000185739855, + -0.00000000064895120, + -0.00000000023105948, + -0.00000000008363282, + -0.00000000003071196, + -0.00000000001142367, + -0.00000000000429811, + -0.00000000000163389, + -0.00000000000062693, + -0.00000000000024260, + -0.00000000000009461, + -0.00000000000003716, + -0.00000000000001469, + -0.00000000000000584, + -0.00000000000000233, + -0.00000000000000093, + -0.00000000000000037, + -0.00000000000000015, + -0.00000000000000006, + -0.00000000000000002 +}; +static cheb_series ath2_cs = { + ath2_data, + 31, + -1, 1, + 16 +}; + + +/* Airy modulus and phase for x < -1 */ +static +int +airy_mod_phase(const double x, gsl_mode_t mode, gsl_sf_result * mod, gsl_sf_result * phase) +{ + gsl_sf_result result_m; + gsl_sf_result result_p; + double m, p; + double sqx; + + if(x < -2.0) { + double z = 16.0/(x*x*x) + 1.0; + cheb_eval_mode_e(&am21_cs, z, mode, &result_m); + cheb_eval_mode_e(&ath1_cs, z, mode, &result_p); + } + else if(x <= -1.0) { + double z = (16.0/(x*x*x) + 9.0)/7.0; + cheb_eval_mode_e(&am22_cs, z, mode, &result_m); + cheb_eval_mode_e(&ath2_cs, z, mode, &result_p); + } + else { + mod->val = 0.0; + mod->err = 0.0; + phase->val = 0.0; + phase->err = 0.0; + GSL_ERROR ("x is greater than 1.0", GSL_EDOM); + } + + m = 0.3125 + result_m.val; + p = -0.625 + result_p.val; + + sqx = sqrt(-x); + + mod->val = sqrt(m/sqx); + mod->err = fabs(mod->val) * (GSL_DBL_EPSILON + fabs(result_m.err/result_m.val)); + phase->val = M_PI_4 - x*sqx * p; + phase->err = fabs(phase->val) * (GSL_DBL_EPSILON + fabs(result_p.err/result_p.val)); + + return GSL_SUCCESS; +} + + + +/* Chebyshev series for Ai(x) with x in [-1,1] + based on SLATEC ai(x) + + series for aif on the interval -1.00000d+00 to 1.00000d+00 + with weighted error 1.09e-19 + log weighted error 18.96 + significant figures required 17.76 + decimal places required 19.44 + + series for aig on the interval -1.00000d+00 to 1.00000d+00 + with weighted error 1.51e-17 + log weighted error 16.82 + significant figures required 15.19 + decimal places required 17.27 + */ +static double ai_data_f[9] = { + -0.03797135849666999750, + 0.05919188853726363857, + 0.00098629280577279975, + 0.00000684884381907656, + 0.00000002594202596219, + 0.00000000006176612774, + 0.00000000000010092454, + 0.00000000000000012014, + 0.00000000000000000010 +}; +static cheb_series aif_cs = { + ai_data_f, + 8, + -1, 1, + 8 +}; + +static double ai_data_g[8] = { + 0.01815236558116127, + 0.02157256316601076, + 0.00025678356987483, + 0.00000142652141197, + 0.00000000457211492, + 0.00000000000952517, + 0.00000000000001392, + 0.00000000000000001 +}; +static cheb_series aig_cs = { + ai_data_g, + 7, + -1, 1, + 7 +}; + + +/* Chebvyshev series for Bi(x) with x in [-1,1] + based on SLATEC bi(x) + + series for bif on the interval -1.00000d+00 to 1.00000d+00 + with weighted error 1.88e-19 + log weighted error 18.72 + significant figures required 17.74 + decimal places required 19.20 + + series for big on the interval -1.00000d+00 to 1.00000d+00 + with weighted error 2.61e-17 + log weighted error 16.58 + significant figures required 15.17 + decimal places required 17.03 + */ +static double data_bif[9] = { + -0.01673021647198664948, + 0.10252335834249445610, + 0.00170830925073815165, + 0.00001186254546774468, + 0.00000004493290701779, + 0.00000000010698207143, + 0.00000000000017480643, + 0.00000000000000020810, + 0.00000000000000000018 +}; +static cheb_series bif_cs = { + data_bif, + 8, + -1, 1, + 8 +}; + +static double data_big[8] = { + 0.02246622324857452, + 0.03736477545301955, + 0.00044476218957212, + 0.00000247080756363, + 0.00000000791913533, + 0.00000000001649807, + 0.00000000000002411, + 0.00000000000000002 +}; +static cheb_series big_cs = { + data_big, + 7, + -1, 1, + 7 +}; + + +/* Chebyshev series for Bi(x) with x in [1,8] + based on SLATEC bi(x) + */ +static double data_bif2[10] = { + 0.0998457269381604100, + 0.4786249778630055380, + 0.0251552119604330118, + 0.0005820693885232645, + 0.0000074997659644377, + 0.0000000613460287034, + 0.0000000003462753885, + 0.0000000000014288910, + 0.0000000000000044962, + 0.0000000000000000111 +}; +static cheb_series bif2_cs = { + data_bif2, + 9, + -1, 1, + 9 +}; + +static double data_big2[10] = { + 0.033305662145514340, + 0.161309215123197068, + 0.0063190073096134286, + 0.0001187904568162517, + 0.0000013045345886200, + 0.0000000093741259955, + 0.0000000000474580188, + 0.0000000000001783107, + 0.0000000000000005167, + 0.0000000000000000011 +}; +static cheb_series big2_cs = { + data_big2, + 9, + -1, 1, + 9 +}; + + +/* chebyshev for Ai(x) asymptotic factor + based on SLATEC aie() + + Series for AIP on the interval 0. to 1.00000D+00 + with weighted error 5.10E-17 + log weighted error 16.29 + significant figures required 14.41 + decimal places required 17.06 + + [GJ] Sun Apr 19 18:14:31 EDT 1998 + There was something wrong with these coefficients. I was getting + errors after 3 or 4 digits. So I recomputed this table. Now I get + double precision agreement with Mathematica. But it does not seem + possible that the small differences here would account for the + original discrepancy. There must have been something wrong with my + original usage... +*/ +static double data_aip[36] = { + -0.0187519297793867540198, + -0.0091443848250055004725, + 0.0009010457337825074652, + -0.0001394184127221491507, + 0.0000273815815785209370, + -0.0000062750421119959424, + 0.0000016064844184831521, + -0.0000004476392158510354, + 0.0000001334635874651668, + -0.0000000420735334263215, + 0.0000000139021990246364, + -0.0000000047831848068048, + 0.0000000017047897907465, + -0.0000000006268389576018, + 0.0000000002369824276612, + -0.0000000000918641139267, + 0.0000000000364278543037, + -0.0000000000147475551725, + 0.0000000000060851006556, + -0.0000000000025552772234, + 0.0000000000010906187250, + -0.0000000000004725870319, + 0.0000000000002076969064, + -0.0000000000000924976214, + 0.0000000000000417096723, + -0.0000000000000190299093, + 0.0000000000000087790676, + -0.0000000000000040927557, + 0.0000000000000019271068, + -0.0000000000000009160199, + 0.0000000000000004393567, + -0.0000000000000002125503, + 0.0000000000000001036735, + -0.0000000000000000509642, + 0.0000000000000000252377, + -0.0000000000000000125793 +/* + -.0187519297793868 + -.0091443848250055, + .0009010457337825, + -.0001394184127221, + .0000273815815785, + -.0000062750421119, + .0000016064844184, + -.0000004476392158, + .0000001334635874, + -.0000000420735334, + .0000000139021990, + -.0000000047831848, + .0000000017047897, + -.0000000006268389, + .0000000002369824, + -.0000000000918641, + .0000000000364278, + -.0000000000147475, + .0000000000060851, + -.0000000000025552, + .0000000000010906, + -.0000000000004725, + .0000000000002076, + -.0000000000000924, + .0000000000000417, + -.0000000000000190, + .0000000000000087, + -.0000000000000040, + .0000000000000019, + -.0000000000000009, + .0000000000000004, + -.0000000000000002, + .0000000000000001, + -.0000000000000000 +*/ +}; +static cheb_series aip_cs = { + data_aip, + 35, + -1, 1, + 17 +}; + + +/* chebyshev for Bi(x) asymptotic factor + based on SLATEC bie() + + Series for BIP on the interval 1.25000D-01 to 3.53553D-01 + with weighted error 1.91E-17 + log weighted error 16.72 + significant figures required 15.35 + decimal places required 17.41 + + Series for BIP2 on the interval 0. to 1.25000D-01 + with weighted error 1.05E-18 + log weighted error 17.98 + significant figures required 16.74 + decimal places required 18.71 +*/ +static double data_bip[24] = { + -0.08322047477943447, + 0.01146118927371174, + 0.00042896440718911, + -0.00014906639379950, + -0.00001307659726787, + 0.00000632759839610, + -0.00000042226696982, + -0.00000019147186298, + 0.00000006453106284, + -0.00000000784485467, + -0.00000000096077216, + 0.00000000070004713, + -0.00000000017731789, + 0.00000000002272089, + 0.00000000000165404, + -0.00000000000185171, + 0.00000000000059576, + -0.00000000000012194, + 0.00000000000001334, + 0.00000000000000172, + -0.00000000000000145, + 0.00000000000000049, + -0.00000000000000011, + 0.00000000000000001 +}; +static cheb_series bip_cs = { + data_bip, + 23, + -1, 1, + 14 +}; + +static double data_bip2[29] = { + -0.113596737585988679, + 0.0041381473947881595, + 0.0001353470622119332, + 0.0000104273166530153, + 0.0000013474954767849, + 0.0000001696537405438, + -0.0000000100965008656, + -0.0000000167291194937, + -0.0000000045815364485, + 0.0000000003736681366, + 0.0000000005766930320, + 0.0000000000621812650, + -0.0000000000632941202, + -0.0000000000149150479, + 0.0000000000078896213, + 0.0000000000024960513, + -0.0000000000012130075, + -0.0000000000003740493, + 0.0000000000002237727, + 0.0000000000000474902, + -0.0000000000000452616, + -0.0000000000000030172, + 0.0000000000000091058, + -0.0000000000000009814, + -0.0000000000000016429, + 0.0000000000000005533, + 0.0000000000000002175, + -0.0000000000000001737, + -0.0000000000000000010 +}; +static cheb_series bip2_cs = { + data_bip2, + 28, + -1, 1, + 10 +}; + + +/* assumes x >= 1.0 */ +inline static int +airy_aie(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + double sqx = sqrt(x); + double z = 2.0/(x*sqx) - 1.0; + double y = sqrt(sqx); + gsl_sf_result result_c; + cheb_eval_mode_e(&aip_cs, z, mode, &result_c); + result->val = (0.28125 + result_c.val)/y; + result->err = result_c.err/y + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; +} + +/* assumes x >= 2.0 */ +static int airy_bie(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + const double ATR = 8.7506905708484345; + const double BTR = -2.0938363213560543; + + if(x < 4.0) { + double sqx = sqrt(x); + double z = ATR/(x*sqx) + BTR; + double y = sqrt(sqx); + gsl_sf_result result_c; + cheb_eval_mode_e(&bip_cs, z, mode, &result_c); + result->val = (0.625 + result_c.val)/y; + result->err = result_c.err/y + GSL_DBL_EPSILON * fabs(result->val); + } + else { + double sqx = sqrt(x); + double z = 16.0/(x*sqx) - 1.0; + double y = sqrt(sqx); + gsl_sf_result result_c; + cheb_eval_mode_e(&bip2_cs, z, mode, &result_c); + result->val = (0.625 + result_c.val)/y; + result->err = result_c.err/y + GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_airy_Ai_e(const double x, const gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result mod; + gsl_sf_result theta; + gsl_sf_result cos_result; + int stat_mp = airy_mod_phase(x, mode, &mod, &theta); + int stat_cos = gsl_sf_cos_err_e(theta.val, theta.err, &cos_result); + result->val = mod.val * cos_result.val; + result->err = fabs(mod.val * cos_result.err) + fabs(cos_result.val * mod.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_mp, stat_cos); + } + else if(x <= 1.0) { + const double z = x*x*x; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&aif_cs, z, mode, &result_c0); + cheb_eval_mode_e(&aig_cs, z, mode, &result_c1); + result->val = 0.375 + (result_c0.val - x*(0.25 + result_c1.val)); + result->err = result_c0.err + fabs(x*result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double x32 = x * sqrt(x); + double s = exp(-2.0*x32/3.0); + gsl_sf_result result_aie; + int stat_aie = airy_aie(x, mode, &result_aie); + result->val = result_aie.val * s; + result->err = result_aie.err * s + result->val * x32 * GSL_DBL_EPSILON; + result->err += GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return stat_aie; + } +} + + +int +gsl_sf_airy_Ai_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result mod; + gsl_sf_result theta; + gsl_sf_result cos_result; + int stat_mp = airy_mod_phase(x, mode, &mod, &theta); + int stat_cos = gsl_sf_cos_err_e(theta.val, theta.err, &cos_result); + result->val = mod.val * cos_result.val; + result->err = fabs(mod.val * cos_result.err) + fabs(cos_result.val * mod.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_mp, stat_cos); + } + else if(x <= 1.0) { + const double z = x*x*x; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&aif_cs, z, mode, &result_c0); + cheb_eval_mode_e(&aig_cs, z, mode, &result_c1); + result->val = 0.375 + (result_c0.val - x*(0.25 + result_c1.val)); + result->err = result_c0.err + fabs(x*result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + + if(x > 0.0) { + const double scale = exp(2.0/3.0 * sqrt(z)); + result->val *= scale; + result->err *= scale; + } + + return GSL_SUCCESS; + } + else { + return airy_aie(x, mode, result); + } +} + + +int gsl_sf_airy_Bi_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + if(x < -1.0) { + gsl_sf_result mod; + gsl_sf_result theta; + gsl_sf_result sin_result; + int stat_mp = airy_mod_phase(x, mode, &mod, &theta); + int stat_sin = gsl_sf_sin_err_e(theta.val, theta.err, &sin_result); + result->val = mod.val * sin_result.val; + result->err = fabs(mod.val * sin_result.err) + fabs(sin_result.val * mod.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_mp, stat_sin); + } + else if(x < 1.0) { + const double z = x*x*x; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&bif_cs, z, mode, &result_c0); + cheb_eval_mode_e(&big_cs, z, mode, &result_c1); + result->val = 0.625 + result_c0.val + x*(0.4375 + result_c1.val); + result->err = result_c0.err + fabs(x * result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= 2.0) { + const double z = (2.0*x*x*x - 9.0)/7.0; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&bif2_cs, z, mode, &result_c0); + cheb_eval_mode_e(&big2_cs, z, mode, &result_c1); + result->val = 1.125 + result_c0.val + x*(0.625 + result_c1.val); + result->err = result_c0.err + fabs(x * result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double y = 2.0*x*sqrt(x)/3.0; + const double s = exp(y); + + if(y > GSL_LOG_DBL_MAX - 1.0) { + OVERFLOW_ERROR(result); + } + else { + gsl_sf_result result_bie; + int stat_bie = airy_bie(x, mode, &result_bie); + result->val = result_bie.val * s; + result->err = result_bie.err * s + fabs(1.5*y * (GSL_DBL_EPSILON * result->val)); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return stat_bie; + } + } +} + + +int +gsl_sf_airy_Bi_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result mod; + gsl_sf_result theta; + gsl_sf_result sin_result; + int stat_mp = airy_mod_phase(x, mode, &mod, &theta); + int stat_sin = gsl_sf_sin_err_e(theta.val, theta.err, &sin_result); + result->val = mod.val * sin_result.val; + result->err = fabs(mod.val * sin_result.err) + fabs(sin_result.val * mod.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_mp, stat_sin); + } + else if(x < 1.0) { + const double z = x*x*x; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&bif_cs, z, mode, &result_c0); + cheb_eval_mode_e(&big_cs, z, mode, &result_c1); + result->val = 0.625 + result_c0.val + x*(0.4375 + result_c1.val); + result->err = result_c0.err + fabs(x * result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + if(x > 0.0) { + const double scale = exp(-2.0/3.0 * sqrt(z)); + result->val *= scale; + result->err *= scale; + } + return GSL_SUCCESS; + } + else if(x <= 2.0) { + const double x3 = x*x*x; + const double z = (2.0*x3 - 9.0)/7.0; + const double s = exp(-2.0/3.0 * sqrt(x3)); + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&bif2_cs, z, mode, &result_c0); + cheb_eval_mode_e(&big2_cs, z, mode, &result_c1); + result->val = s * (1.125 + result_c0.val + x*(0.625 + result_c1.val)); + result->err = s * (result_c0.err + fabs(x * result_c1.err)); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return airy_bie(x, mode, result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_airy_Ai(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Ai_e(x, mode, &result)); +} + +double gsl_sf_airy_Ai_scaled(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Ai_scaled_e(x, mode, &result)); +} + +double gsl_sf_airy_Bi(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Bi_e(x, mode, &result)); +} + +double gsl_sf_airy_Bi_scaled(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Bi_scaled_e(x, mode, &result)); +} + + diff --git a/software/gsl-1.15/specfunc/airy_der.c b/software/gsl-1.15/specfunc/airy_der.c new file mode 100644 index 000000000..32a91c674 --- /dev/null +++ b/software/gsl-1.15/specfunc/airy_der.c @@ -0,0 +1,888 @@ +/* specfunc/airy_der.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval_mode.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on SLATEC aide.f, bide.f, aid.f, bid.f, r9admp.f */ + +/* + series for aif on the interval -1.00000e+00 to 1.00000e+00 + with weighted error 5.22e-18 + log weighted error 17.28 + significant figures required 16.01 + decimal places required 17.73 +*/ +static double aif_data[8] = { + 0.10527461226531408809, + 0.01183613628152997844, + 0.00012328104173225664, + 0.00000062261225638140, + 0.00000000185298887844, + 0.00000000000363328873, + 0.00000000000000504622, + 0.00000000000000000522 +}; +static cheb_series aif_cs = { + aif_data, + 7, + -1, 1, + 7 +}; + +/* + series for aig on the interval -1.00000e+00 to 1.00000e+00 + with weighted error 3.14e-19 + log weighted error 18.50 + significant figures required 17.44 + decimal places required 18.98 +*/ +static double aig_data[9] = { + 0.021233878150918666852, + 0.086315930335214406752, + 0.001797594720383231358, + 0.000014265499875550693, + 0.000000059437995283683, + 0.000000000152403366479, + 0.000000000000264587660, + 0.000000000000000331562, + 0.000000000000000000314 +}; +static cheb_series aig_cs = { + aig_data, + 8, + -1, 1, + 8 +}; + +/* + series for aip2 on the interval 0.00000e+00 to 1.25000e-01 + with weighted error 2.15e-17 + log weighted error 16.67 + significant figures required 14.27 + decimal places required 17.26 +*/ +static double aip2_data[15] = { + 0.0065457691989713757, + 0.0023833724120774592, + -0.0000430700770220586, + 0.0000015629125858629, + -0.0000000815417186163, + 0.0000000054103738057, + -0.0000000004284130883, + 0.0000000000389497963, + -0.0000000000039623161, + 0.0000000000004428184, + -0.0000000000000536297, + 0.0000000000000069650, + -0.0000000000000009620, + 0.0000000000000001403, + -0.0000000000000000215 +}; +static cheb_series aip2_cs = { + aip2_data, + 14, + -1, 1, + 9 +}; + +/* + series for aip1 on the interval 1.25000e-01 to 1.00000e+00 + with weighted error 2.60e-17 + log weighted error 16.58 + significant figures required 14.91 + decimal places required 17.28 +*/ +static double aip1_data[25] = { + 0.0358865097808301538, + 0.0114668575627764899, + -0.0007592073583861400, + 0.0000869517610893841, + -0.0000128237294298592, + 0.0000022062695681038, + -0.0000004222295185921, + 0.0000000874686415726, + -0.0000000192773588418, + 0.0000000044668460054, + -0.0000000010790108052, + 0.0000000002700029447, + -0.0000000000696480108, + 0.0000000000184489907, + -0.0000000000050027817, + 0.0000000000013852243, + -0.0000000000003908218, + 0.0000000000001121536, + -0.0000000000000326862, + 0.0000000000000096619, + -0.0000000000000028935, + 0.0000000000000008770, + -0.0000000000000002688, + 0.0000000000000000832, + -0.0000000000000000260 +}; +static cheb_series aip1_cs = { + aip1_data, + 24, + -1, 1, + 14 +}; + + +/* + series for bif on the interval -1.00000e+00 to 1.00000e+00 + with weighted error 9.05e-18 + log weighted error 17.04 + significant figures required 15.83 + decimal places required 17.49 +*/ +static double bif_data[8] = { + 0.1153536790828570243, + 0.0205007894049192875, + 0.0002135290278902876, + 0.0000010783960614677, + 0.0000000032094708833, + 0.0000000000062930407, + 0.0000000000000087403, + 0.0000000000000000090 +}; +static cheb_series bif_cs = { + bif_data, + 7, + -1, 1, + 7 +}; + +/* + series for big on the interval -1.00000e+00 to 1.00000e+00 + with weighted error 5.44e-19 + log weighted error 18.26 + significant figures required 17.46 + decimal places required 18.74 +*/ +static double big_data[9] = { + -0.097196440416443537390, + 0.149503576843167066571, + 0.003113525387121326042, + 0.000024708570579821297, + 0.000000102949627731379, + 0.000000000263970373987, + 0.000000000000458279271, + 0.000000000000000574283, + 0.000000000000000000544 +}; +static cheb_series big_cs = { + big_data, + 8, + -1, 1, + 8 +}; + +/* + series for bif2 on the interval 1.00000e+00 to 8.00000e+00 + with weighted error 3.82e-19 + log weighted error 18.42 + significant figures required 17.68 + decimal places required 18.92 +*/ +static double bif2_data[10] = { + 0.323493987603522033521, + 0.086297871535563559139, + 0.002994025552655397426, + 0.000051430528364661637, + 0.000000525840250036811, + 0.000000003561751373958, + 0.000000000017146864007, + 0.000000000000061663520, + 0.000000000000000171911, + 0.000000000000000000382 +}; +static cheb_series bif2_cs = { + bif2_data, + 9, + -1, 1, + 9 +}; + +/* + series for big2 on the interval 1.00000e+00 to 8.00000e+00 + with weighted error 3.35e-17 + log weighted error 16.48 + significant figures required 16.52 + decimal places required 16.98 +*/ +static double big2_data[10] = { + 1.6062999463621294578, + 0.7449088819876088652, + 0.0470138738610277380, + 0.0012284422062548239, + 0.0000173222412256624, + 0.0000001521901652368, + 0.0000000009113560249, + 0.0000000000039547918, + 0.0000000000000130017, + 0.0000000000000000335 +}; +static cheb_series big2_cs = { + big2_data, + 9, + -1, 1, + 9 +}; + +/* + series for bip2 on the interval 0.00000e+00 to 1.25000e-01 + with weighted error 2.07e-18 + log weighted error 17.69 + significant figures required 16.51 + decimal places required 18.42 +*/ +static double bip2_data[29] = { + -0.13269705443526630495, + -0.00568443626045977481, + -0.00015643601119611610, + -0.00001136737203679562, + -0.00000143464350991284, + -0.00000018098531185164, + 0.00000000926177343611, + 0.00000001710005490721, + 0.00000000476698163504, + -0.00000000035195022023, + -0.00000000058890614316, + -0.00000000006678499608, + 0.00000000006395565102, + 0.00000000001554529427, + -0.00000000000792397000, + -0.00000000000258326243, + 0.00000000000121655048, + 0.00000000000038707207, + -0.00000000000022487045, + -0.00000000000004953477, + 0.00000000000004563782, + 0.00000000000000332998, + -0.00000000000000921750, + 0.00000000000000094157, + 0.00000000000000167154, + -0.00000000000000055134, + -0.00000000000000022369, + 0.00000000000000017487, + 0.00000000000000000207 +}; +static cheb_series bip2_cs = { + bip2_data, + 28, + -1, 1, + 14 +}; + +/* + series for bip1 on the interval 1.25000e-01 to 3.53553e-01 + with weighted error 1.86e-17 + log weighted error 16.73 + significant figures required 15.67 + decimal places required 17.42 +*/ +static double bip1_data[24] = { + -0.1729187351079553719, + -0.0149358492984694364, + -0.0005471104951678566, + 0.0001537966292958408, + 0.0000154353476192179, + -0.0000065434113851906, + 0.0000003728082407879, + 0.0000002072078388189, + -0.0000000658173336470, + 0.0000000074926746354, + 0.0000000011101336884, + -0.0000000007265140553, + 0.0000000001782723560, + -0.0000000000217346352, + -0.0000000000020302035, + 0.0000000000019311827, + -0.0000000000006044953, + 0.0000000000001209450, + -0.0000000000000125109, + -0.0000000000000019917, + 0.0000000000000015154, + -0.0000000000000004977, + 0.0000000000000001155, + -0.0000000000000000186 +}; +static cheb_series bip1_cs = { + bip1_data, + 23, + -1, 1, + 13 +}; + +/* + series for an22 on the interval -1.00000e+00 to -1.25000e-01 + with weighted error 3.30e-17 + log weighted error 16.48 + significant figures required 14.95 + decimal places required 17.24 +*/ +static double an22_data[33] = { + 0.0537418629629794329, + -0.0126661435859883193, + -0.0011924334106593007, + -0.0002032327627275655, + -0.0000446468963075164, + -0.0000113359036053123, + -0.0000031641352378546, + -0.0000009446708886149, + -0.0000002966562236472, + -0.0000000969118892024, + -0.0000000326822538653, + -0.0000000113144618964, + -0.0000000040042691002, + -0.0000000014440333684, + -0.0000000005292853746, + -0.0000000001967763374, + -0.0000000000740800096, + -0.0000000000282016314, + -0.0000000000108440066, + -0.0000000000042074801, + -0.0000000000016459150, + -0.0000000000006486827, + -0.0000000000002574095, + -0.0000000000001027889, + -0.0000000000000412846, + -0.0000000000000166711, + -0.0000000000000067657, + -0.0000000000000027585, + -0.0000000000000011296, + -0.0000000000000004645, + -0.0000000000000001917, + -0.0000000000000000794, + -0.0000000000000000330 +}; +static cheb_series an22_cs = { + an22_data, + 32, + -1, 1, + 18 +}; + +/* + series for an21 on the interval -1.25000e-01 to -1.56250e-02 + with weighted error 3.43e-17 + log weighted error 16.47 + significant figures required 14.48 + decimal places required 17.16 +*/ +static double an21_data[24] = { + 0.0198313155263169394, + -0.0029376249067087533, + -0.0001136260695958196, + -0.0000100554451087156, + -0.0000013048787116563, + -0.0000002123881993151, + -0.0000000402270833384, + -0.0000000084996745953, + -0.0000000019514839426, + -0.0000000004783865344, + -0.0000000001236733992, + -0.0000000000334137486, + -0.0000000000093702824, + -0.0000000000027130128, + -0.0000000000008075954, + -0.0000000000002463214, + -0.0000000000000767656, + -0.0000000000000243883, + -0.0000000000000078831, + -0.0000000000000025882, + -0.0000000000000008619, + -0.0000000000000002908, + -0.0000000000000000993, + -0.0000000000000000343 +}; +static cheb_series an21_cs = { + an21_data, + 23, + -1, 1, + 12 +}; + +/* + series for an20 on the interval -1.56250e-02 to 0.00000e+00 + with weighted error 4.41e-17 + log weighted error 16.36 + significant figures required 14.16 + decimal places required 16.96 +*/ +static double an20_data[16] = { + 0.0126732217145738027, + -0.0005212847072615621, + -0.0000052672111140370, + -0.0000001628202185026, + -0.0000000090991442687, + -0.0000000007438647126, + -0.0000000000795494752, + -0.0000000000104050944, + -0.0000000000015932426, + -0.0000000000002770648, + -0.0000000000000535343, + -0.0000000000000113062, + -0.0000000000000025772, + -0.0000000000000006278, + -0.0000000000000001621, + -0.0000000000000000441 +}; +static cheb_series an20_cs = { + an20_data, + 15, + -1, 1, + 8 +}; + +/* + series for aph2 on the interval -1.00000e+00 to -1.25000e-01 + with weighted error 2.94e-17 + log weighted error 16.53 + significant figures required 15.58 + decimal places required 17.28 +*/ +static double aph2_data[32] = { + -0.2057088719781465107, + 0.0422196961357771922, + 0.0020482560511207275, + 0.0002607800735165006, + 0.0000474824268004729, + 0.0000105102756431612, + 0.0000026353534014668, + 0.0000007208824863499, + 0.0000002103236664473, + 0.0000000644975634555, + 0.0000000205802377264, + 0.0000000067836273921, + 0.0000000022974015284, + 0.0000000007961306765, + 0.0000000002813860610, + 0.0000000001011749057, + 0.0000000000369306738, + 0.0000000000136615066, + 0.0000000000051142751, + 0.0000000000019351689, + 0.0000000000007393607, + 0.0000000000002849792, + 0.0000000000001107281, + 0.0000000000000433412, + 0.0000000000000170801, + 0.0000000000000067733, + 0.0000000000000027017, + 0.0000000000000010835, + 0.0000000000000004367, + 0.0000000000000001769, + 0.0000000000000000719, + 0.0000000000000000294 +}; +static cheb_series aph2_cs = { + aph2_data, + 31, + -1, 1, + 16 +}; + +/* + series for aph1 on the interval -1.25000e-01 to -1.56250e-02 + with weighted error 6.38e-17 + log weighted error 16.20 + significant figures required 14.91 + decimal places required 16.87 +*/ +static double aph1_data[22] = { + -0.1024172908077571694, + 0.0071697275146591248, + 0.0001209959363122329, + 0.0000073361512841220, + 0.0000007535382954272, + 0.0000001041478171741, + 0.0000000174358728519, + 0.0000000033399795033, + 0.0000000007073075174, + 0.0000000001619187515, + 0.0000000000394539982, + 0.0000000000101192282, + 0.0000000000027092778, + 0.0000000000007523806, + 0.0000000000002156369, + 0.0000000000000635283, + 0.0000000000000191757, + 0.0000000000000059143, + 0.0000000000000018597, + 0.0000000000000005950, + 0.0000000000000001934, + 0.0000000000000000638 +}; +static cheb_series aph1_cs = { + aph1_data, + 21, + -1, 1, + 10 +}; + +/* + series for aph0 on the interval -1.56250e-02 to 0.00000e+00 + with weighted error 2.29e-17 + log weighted error 16.64 + significant figures required 15.27 + decimal places required 17.23 +*/ +static double aph0_data[15] = { + -0.0855849241130933257, + 0.0011214378867065261, + 0.0000042721029353664, + 0.0000000817607381483, + 0.0000000033907645000, + 0.0000000002253264423, + 0.0000000000206284209, + 0.0000000000023858763, + 0.0000000000003301618, + 0.0000000000000527010, + 0.0000000000000094555, + 0.0000000000000018709, + 0.0000000000000004024, + 0.0000000000000000930, + 0.0000000000000000229 +}; +static cheb_series aph0_cs = { + aph0_data, + 14, + -1, 1, + 7 +}; + + +static +int +airy_deriv_mod_phase(const double x, gsl_mode_t mode, + gsl_sf_result * ampl, gsl_sf_result * phi) +{ + const double pi34 = 2.356194490192344928847; + gsl_sf_result result_a; + gsl_sf_result result_p; + double a, p; + double sqx; + double x32; + + if(x <= -4.0) { + double z = 128.0/(x*x*x) + 1.0; + cheb_eval_mode_e(&an20_cs, z, mode, &result_a); + cheb_eval_mode_e(&aph0_cs, z, mode, &result_p); + } + else if(x <= -2.0) { + double z = (128.0/(x*x*x) + 9.0) / 7.0; + cheb_eval_mode_e(&an21_cs, z, mode, &result_a); + cheb_eval_mode_e(&aph1_cs, z, mode, &result_p); + } + else if(x <= -1.0) { + double z = (16.0/(x*x*x) + 9.0) / 7.0; + cheb_eval_mode_e(&an22_cs, z, mode, &result_a); + cheb_eval_mode_e(&aph2_cs, z, mode, &result_p); + } + else { + ampl->val = 0.0; + ampl->err = 0.0; + phi->val = 0.0; + phi->err = 0.0; + GSL_ERROR ("x is greater than 1.0", GSL_EDOM); + } + + a = 0.3125 + result_a.val; + p = -0.625 + result_p.val; + + sqx = sqrt(-x); + x32 = x*sqx; + + ampl->val = sqrt(a * sqx); + ampl->err = fabs(ampl->val) * (GSL_DBL_EPSILON + fabs(result_a.err/result_a.val)); + phi->val = pi34 - x * sqx * p; + phi->err = fabs(phi->val) * (GSL_DBL_EPSILON + fabs(result_p.err/result_p.val)); + + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_airy_Ai_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result a; + gsl_sf_result p; + int status_ap = airy_deriv_mod_phase(x, mode, &a, &p); + double c = cos(p.val); + result->val = a.val * c; + result->err = fabs(result->val * p.err) + fabs(c * a.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status_ap; + } + else if(x <= 1.0) { + const double x3 = x*x*x; + const double x2 = x*x; + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&aif_cs, x3, mode, &result_c0); + cheb_eval_mode_e(&aig_cs, x3, mode, &result_c1); + + result->val = (x2*(0.125 + result_c0.val) - result_c1.val) - 0.25; + result->err = fabs(x2*result_c0.val) + result_c1.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + + if(x > GSL_ROOT3_DBL_EPSILON*GSL_ROOT3_DBL_EPSILON) { + /* scale only if x is positive */ + double s = exp(2.0*x*sqrt(x)/3.0); + result->val *= s; + result->err *= s; + } + + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double sqrtx = sqrt(x); + const double z = (16.0/(x*sqrtx) - 9.0)/7.0; + const double s = sqrt(sqrtx); + gsl_sf_result result_c0; + cheb_eval_mode_e(&aip1_cs, z, mode, &result_c0); + result->val = -(0.28125 + result_c0.val) * s; + result->err = result_c0.err * s; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sqrtx = sqrt(x); + const double z = 16.0/(x*sqrtx) - 1.0; + const double s = sqrt(sqrtx); + gsl_sf_result result_c0; + cheb_eval_mode_e(&aip2_cs, z, mode, &result_c0); + result->val = -(0.28125 + result_c0.val) * s; + result->err = result_c0.err * s; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_airy_Ai_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result a; + gsl_sf_result p; + int status_ap = airy_deriv_mod_phase(x, mode, &a, &p); + double c = cos(p.val); + result->val = a.val * c; + result->err = fabs(result->val * p.err) + fabs(c * a.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status_ap; + } + else if(x < 1.0) { + const double x3 = x*x*x; + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_mode_e(&aif_cs, x3, mode, &result_c1); + cheb_eval_mode_e(&aig_cs, x3, mode, &result_c2); + result->val = (x*x*(0.125 + result_c1.val) - result_c2.val) - 0.25; + result->err = fabs(x*x*result_c1.err) + result_c2.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x*x*x < 9.0/4.0 * GSL_LOG_DBL_MIN*GSL_LOG_DBL_MIN) { + gsl_sf_result result_aps; + const double arg = -2.0*x*sqrt(x)/3.0; + const int stat_a = gsl_sf_airy_Ai_deriv_scaled_e(x, mode, &result_aps); + const int stat_e = gsl_sf_exp_mult_err_e(arg, 1.5*fabs(arg*GSL_DBL_EPSILON), + result_aps.val, result_aps.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_a); + } + else { + UNDERFLOW_ERROR(result); + } +} + + +int +gsl_sf_airy_Bi_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + const double atr = 8.7506905708484345; /* 16./(sqrt(8)-1) */ + const double btr = -2.0938363213560543; /* -(sqrt(8)+1)/(sqrt(8)-1) */ + + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result a; + gsl_sf_result p; + int status_ap = airy_deriv_mod_phase(x, mode, &a, &p); + double s = sin(p.val); + result->val = a.val * s; + result->err = fabs(result->val * p.err) + fabs(s * a.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status_ap; + } + else if(x < 1.0) { + const double x3 = x*x*x; + const double x2 = x*x; + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_mode_e(&bif_cs, x3, mode, &result_c1); + cheb_eval_mode_e(&big_cs, x3, mode, &result_c2); + result->val = x2 * (result_c1.val + 0.25) + result_c2.val + 0.5; + result->err = x2 * result_c1.err + result_c2.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + + if(x > GSL_ROOT3_DBL_EPSILON*GSL_ROOT3_DBL_EPSILON) { + /* scale only if x is positive */ + const double s = exp(-2.0*x*sqrt(x)/3.0); + result->val *= s; + result->err *= s; + } + + return GSL_SUCCESS; + } + else if(x < 2.0) { + const double z = (2.0*x*x*x - 9.0) / 7.0; + const double s = exp(-2.0*x*sqrt(x)/3.0); + gsl_sf_result result_c0; + gsl_sf_result result_c1; + cheb_eval_mode_e(&bif2_cs, z, mode, &result_c0); + cheb_eval_mode_e(&big2_cs, z, mode, &result_c1); + result->val = s * (x*x * (0.25 + result_c0.val) + 0.5 + result_c1.val); + result->err = s * (x*x * result_c0.err + result_c1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 4.0) { + const double sqrtx = sqrt(x); + const double z = atr/(x*sqrtx) + btr; + const double s = sqrt(sqrtx); + gsl_sf_result result_c0; + cheb_eval_mode_e(&bip1_cs, z, mode, &result_c0); + result->val = s * (0.625 + result_c0.val); + result->err = s * result_c0.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sqrtx = sqrt(x); + const double z = 16.0/(x*sqrtx) - 1.0; + const double s = sqrt(sqrtx); + gsl_sf_result result_c0; + cheb_eval_mode_e(&bip2_cs, z, mode, &result_c0); + result->val = s * (0.625 + result_c0.val); + result->err = s * result_c0.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_airy_Bi_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < -1.0) { + gsl_sf_result a; + gsl_sf_result p; + int status_ap = airy_deriv_mod_phase(x, mode, &a, &p); + double s = sin(p.val); + result->val = a.val * s; + result->err = fabs(result->val * p.err) + fabs(s * a.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status_ap; + } + else if(x < 1.0) { + const double x3 = x*x*x; + const double x2 = x*x; + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_mode_e(&bif_cs, x3, mode, &result_c1); + cheb_eval_mode_e(&big_cs, x3, mode, &result_c2); + result->val = x2 * (result_c1.val + 0.25) + result_c2.val + 0.5; + result->err = x2 * result_c1.err + result_c2.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 2.0) { + const double z = (2.0*x*x*x - 9.0) / 7.0; + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_mode_e(&bif2_cs, z, mode, &result_c1); + cheb_eval_mode_e(&big2_cs, z, mode, &result_c2); + result->val = x*x * (result_c1.val + 0.25) + result_c2.val + 0.5; + result->err = x*x * result_c1.err + result_c2.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_ROOT3_DBL_MAX*GSL_ROOT3_DBL_MAX) { + gsl_sf_result result_bps; + const double arg = 2.0*(x*sqrt(x)/3.0); + int stat_b = gsl_sf_airy_Bi_deriv_scaled_e(x, mode, &result_bps); + int stat_e = gsl_sf_exp_mult_err_e(arg, 1.5*fabs(arg*GSL_DBL_EPSILON), + result_bps.val, result_bps.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_b); + } + else { + OVERFLOW_ERROR(result); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_airy_Ai_deriv_scaled(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Ai_deriv_scaled_e(x, mode, &result)); +} + +double gsl_sf_airy_Ai_deriv(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Ai_deriv_e(x, mode, &result)); +} + +double gsl_sf_airy_Bi_deriv_scaled(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Bi_deriv_scaled_e(x, mode, &result)); +} + +double gsl_sf_airy_Bi_deriv(const double x, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_airy_Bi_deriv_e(x, mode, &result)); +} diff --git a/software/gsl-1.15/specfunc/airy_zero.c b/software/gsl-1.15/specfunc/airy_zero.c new file mode 100644 index 000000000..81ea744ee --- /dev/null +++ b/software/gsl-1.15/specfunc/airy_zero.c @@ -0,0 +1,546 @@ +/* specfunc/airy_zero.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +static const double zero_Ai[] = { + 0, + -2.338107410459767039, + -4.087949444130970617, + -5.520559828095551059, + -6.786708090071758999, + -7.944133587120853123, + -9.022650853340980380, + -10.04017434155808593, + -11.00852430373326289, + -11.93601556323626252, + -12.82877675286575720, + -13.69148903521071793, + -14.52782995177533498, + -15.34075513597799686, + -16.13268515694577144, + -16.90563399742994263, + -17.661300105697057509, + -18.401132599207115416, + -19.126380474246952144, + -19.838129891721499701, + -20.537332907677566360, + -21.224829943642096955, + -21.901367595585130707, + -22.567612917496502831, + -23.224165001121681061, + -23.871564455535918567, + -24.510301236589677490, + -25.140821166148963748, + -25.763531400982756459, + -26.378805052137232374, + -26.986985111606367686, + -27.588387809882444812, + -28.183305502632644923, + -28.772009165237435382, + -29.354750558766287963, + -29.931764119086555913, + -30.503268611418505287, + -31.069468585183755604, + -31.63055565801265934, + -32.18670965295205069, + -32.73809960900026913, + -33.28488468190140188, + -33.82721494950865194, + -34.36523213386365906, + -34.89907025034531210, + -35.42885619274788846, + -35.95471026189862926, + -36.47674664437480896, + -36.99507384699450161, + -37.50979509200501613, + -38.02100867725525443, + -38.52880830509424882, + -39.03328338327251391, + -39.53451930072301805, + -40.03259768075417603, + -40.52759661388971821, + -41.01959087233248966, + -41.50865210780525018, + -41.99484903432643004, + -42.47824759730839188, + -42.95891113021656009, + -43.43690049989685412, + -43.91227424156370168, + -44.38508868433939023, + -44.85539806814583243, + -45.32325465267043011, + -45.78870881905730086, + -46.25180916491254629, + -46.71260259315651633, + -47.17113439520631705, + -47.62744832892739292, + -48.08158669175325711, + -48.53359038933679845, + -48.98349900006458366, + -49.43135083573678341, + -49.87718299868941729, + -50.32103143561221860, + -50.76293098829428522, + -51.20291544151056412, + -51.64101756824489758, + -52.07726917242964943, + -52.51170112936766183, + -52.94434342398931824, + -53.37522518708567514, + -53.80437472964785717, + -54.23181957543308298, + -54.65758649186871111, + -55.08170151939748312, + -55.50418999935962251, + -55.92507660050055598, + -56.34438534418670066, + -56.76213962840595327, + -57.17836225062417808, + -57.59307542956407782, + -58.00630082596830627, + -58.41805956240450934, + -58.82837224216613231, + -59.23725896731927534, + -59.64473935594259360, + -60.05083255860419805, + -60.45555727411669871 +}; +static const size_t size_zero_Ai = sizeof(zero_Ai)/sizeof(double); + + +static const double zero_Bi[] = { + 0, + -1.173713222709127925, + -3.271093302836352716, + -4.830737841662015933, + -6.169852128310251260, + -7.376762079367763714, + -8.491948846509388013, + -9.538194379346238887, + -10.52991350670535792, + -11.47695355127877944, + -12.38641713858273875, + -13.26363952294180555, + -14.11275680906865779, + -14.93705741215416404, + -15.739210351190482771, + -16.521419550634379054, + -17.285531624581242533, + -18.033113287225001572, + -18.765508284480081041, + -19.483880132989234014, + -20.189244785396202420, + -20.882495994193175768, + -21.564425284712977653, + -22.235737881803385167, + -22.897065554219793474, + -23.548977079642448269, + -24.191986850649000086, + -24.826562012152892172, + -25.453128427085131994, + -26.072075698466804494, + -26.683761425120990449, + -27.288514830076298204, + -27.886639871735962459, + -28.478417925678661737, + -29.064110107777650305, + -29.643959295918396591, + -30.218191897047274645, + -30.787019397921766297, + -31.350639731255585371, + -31.90923848358456965, + -32.46298996683685318, + -33.01205817205683814, + -33.55659762084006113, + -34.09675412765602851, + -34.63266548426775468, + -35.16446207582101720, + -35.69226743681080479, + -36.21619875398748222, + -36.73636732230120657, + -37.25287895916828697, + -37.76583438165180116, + -38.27532955056003997, + -38.78145598496327279, + -39.28430105019802461, + -39.78394822205711298, + -40.28047732954369150, + -40.77396477829068148, + -41.26448375650675678, + -41.75210442510106287, + -42.23689409345656643, + -42.71891738216253539, + -43.19823637387693118, + -43.67491075336673948, + -44.14899793766617113, + -44.62055319719727274, + -45.08962976861312825, + -45.55627896004907928, + -46.02055024940102076, + -46.48249137619078661, + -46.94214842752602207, + -47.39956591861496210, + -47.85478686825452176, + -48.30785286967246692, + -48.75880415707066192, + -49.20767966818603897, + -49.65451710315861501, + -50.09935297997125482, + -50.54222268670364757, + -50.98316053082286586, + -51.42219978571468262, + -51.85937273464332870, + -52.29471071231240525, + -52.72824414418606069, + -53.16000258371716397, + -53.59001474761792882, + -54.01830854929815828, + -54.44491113058688729, + -54.86984889184461534, + -55.29314752056546491, + -55.71483201856140365, + -56.13492672781406761, + -56.55345535507366411, + -56.97044099527886475, + -57.38590615386647834, + -57.79987276803497897, + -58.21236222702161974, + -58.62339539144885603, + -59.03299261179210306, + -59.44117374601743460, + -59.84795817643466996, + -60.25336482580837088 +}; +static const size_t size_zero_Bi = sizeof(zero_Bi)/sizeof(double); + + +static const double zero_Aip[] = { + 0, + -1.018792971647471089, + -3.248197582179836738, + -4.820099211178735639, + -6.163307355639486822, + -7.372177255047770177, + -8.488486734019722133, + -9.535449052433547471, + -10.52766039695740728, + -11.47505663348024529, + -12.384788371845747325, + -13.262218961665210382, + -14.111501970462995282, + -14.935937196720517467, + -15.738201373692538303, + -16.520503825433793542, + -17.284695050216437357, + -18.032344622504393395, + -18.764798437665954740, + -19.483221656567231178, + -20.188631509463373154, + -20.881922755516737701, + -21.563887723198974958, + -22.235232285348913331, + -22.896588738874619001, + -23.548526295928801574, + -24.191559709526353841, + -24.826156425921155001, + -25.452742561777649948, + -26.071707935173912515, + -26.683410328322449767, + -27.288179121523985029, + -27.886318408768461192, + -28.478109683102278108, + -29.063814162638199090, + -29.643674814632015921, + -30.217918124468574603, + -30.786755648012502519, + -31.350385379083034671, + -31.90899295843046320, + -32.46275274623847982, + -33.01182877663428709, + -33.55637560978942190, + -34.09653909480913771, + -34.63245705463586589, + -35.16425990255340758, + -35.69207119851046870, + -36.21600815233519918, + -36.73618207994680321, + -37.25269881785414827, + -37.76565910053887108, + -38.27515890473087933, + -38.78128976408036876, + -39.28413905729859644, + -39.78379027246823278, + -40.28032324990371935, + -40.77381440566486637, + -41.26433693758643383, + -41.75196101547722703, + -42.23675395695976012, + -42.71878039026198233, + -43.19810240513270670, + -43.67477969292950869, + -44.14886967681966886, + -44.62042763293925724, + -45.08950680327102630, + -45.55615850092696446, + -46.02043220845493728, + -46.48237566972975615, + -46.94203497593635633, + -47.39945464610575493, + -47.85467770262241617, + -48.30774574208398774, + -48.75869900186057804, + -49.20757642267037247, + -49.65441570746105074, + -50.09925337686182515, + -50.54212482144867502, + -50.98306435104524282, + -51.42210524126365311, + -51.85927977747301469, + -52.29461929636838876, + -52.72815422529939506, + -53.15991411950524351, + -53.58992769739169611, + -54.01822287397517367, + -54.44482679260982599, + -54.86976585510479430, + -55.29306575033103518, + -55.71475148140987392, + -56.13484739156885235, + -56.55337718874437424, + -56.97036396900508167, + -57.38583023886477265, + -57.79979793654895377, + -58.21228845227477578, + -58.62332264760009139, + -59.03292087389367419, + -59.44110298997521892, + -59.84788837897058171, + -60.25329596442479317 +}; +static const size_t size_zero_Aip = sizeof(zero_Aip)/sizeof(double); + + +static const double zero_Bip[] = { + 0, + -2.294439682614123247, + -4.073155089071828216, + -5.512395729663599496, + -6.781294445990305390, + -7.940178689168578927, + -9.019583358794239067, + -10.037696334908545802, + -11.006462667712289940, + -11.934261645014844663, + -12.827258309177217640, + -13.690155826835049101, + -14.526645763485711410, + -15.339693082242404109, + -16.131724782385900578, + -16.904759411889649958, + -17.660498743114976102, + -18.400394367181703280, + -19.125697156412638066, + -19.837494718415910503, + -20.536740241453273980, + -21.224275044889266569, + -21.900846445139208281, + -22.567122080497200470, + -23.223701521208962116, + -23.871125771677973595, + -24.509885117016242729, + -25.140425655367878908, + -25.763154776913454319, + -26.378445791146615697, + -26.986641859775034987, + -27.588059359225600573, + -28.182990771292975456, + -28.771707180886056250, + -29.354460444612957224, + -29.931485082026055160, + -30.502999931936645516, + -31.069209608721234058, + -31.63030578754333679, + -32.18646834257807369, + -32.73786635840274752, + -33.28465903151424981, + -33.82699647630635587, + -34.36502044767239631, + -34.89886499060196419, + -35.42865702564380962, + -35.95451687785511190, + -36.47655875580547918, + -36.99489118631672770, + -37.50961740986809593, + -38.02083574095788210 +}; +static const size_t size_zero_Bip = sizeof(zero_Bip)/sizeof(double); + + + +/* [Abramowitz+Stegun, 10.4.105] */ +static double +zero_f(double z) +{ + const double pre = pow(z, 2.0/3.0); + const double zi2 = 1.0/(z*z); + const double zi4 = zi2 * zi2; + const double t1 = 5.0/48.0 * zi2; + const double t2 = -5.0/36.0 * zi4; + const double t3 = 77125.0/82944.0 * zi4 * zi2; + const double t4 = -108056875.0/6967296.0 * zi4 * zi4; + return pre * (1.0 + t1 + t2 + t3 + t4); + +} +static double +zero_g(double z) +{ + const double pre = pow(z, 2.0/3.0); + const double zi2 = 1.0/(z*z); + const double zi4 = zi2 * zi2; + const double t1 = -7.0/48.0 * zi2; + const double t2 = 35.0/288.0 * zi4; + const double t3 = -181223.0/207360.0 * zi4 * zi2; + const double t4 = 18683371.0/1244160.0 * zi4 * zi4; + return pre * (1.0 + t1 + t2 + t3 + t4); +} + + + +int +gsl_sf_airy_zero_Ai_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s < 1) { + DOMAIN_ERROR_MSG("s is less than 1", result); + } + else if(s < size_zero_Ai) { + result->val = zero_Ai[s]; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double z = 3.0*M_PI/8.0 * (4.0*s - 1.0); + const double f = zero_f(z); + result->val = -f; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_airy_zero_Bi_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s < 1) { + DOMAIN_ERROR_MSG("s is less than 1", result); + } + else if(s < size_zero_Bi) { + result->val = zero_Bi[s]; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double z = 3.0*M_PI/8.0 * (4.0*s - 3.0); + const double f = zero_f(z); + result->val = -f; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_airy_zero_Ai_deriv_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s < 1) { + DOMAIN_ERROR_MSG("s is less than 1", result); + } + else if(s < size_zero_Aip) { + result->val = zero_Aip[s]; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double z = 3.0*M_PI/8.0 * (4.0*s - 3.0); + const double g = zero_g(z); + result->val = -g; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_airy_zero_Bi_deriv_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s < 1) { + DOMAIN_ERROR_MSG("s is less than 1", result); + } + else if(s < size_zero_Bip) { + result->val = zero_Bip[s]; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double z = 3.0*M_PI/8.0 * (4.0*s - 1.0); + const double g = zero_g(z); + result->val = -g; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_airy_zero_Ai(unsigned int s) +{ + EVAL_RESULT(gsl_sf_airy_zero_Ai_e(s, &result)); +} + +double gsl_sf_airy_zero_Bi(unsigned int s) +{ + EVAL_RESULT(gsl_sf_airy_zero_Bi_e(s, &result)); +} + +double gsl_sf_airy_zero_Ai_deriv(unsigned int s) +{ + EVAL_RESULT(gsl_sf_airy_zero_Ai_deriv_e(s, &result)); +} + +double gsl_sf_airy_zero_Bi_deriv(unsigned int s) +{ + EVAL_RESULT(gsl_sf_airy_zero_Bi_deriv_e(s, &result)); +} diff --git a/software/gsl-1.15/specfunc/atanint.c b/software/gsl-1.15/specfunc/atanint.c new file mode 100644 index 000000000..166c4f8de --- /dev/null +++ b/software/gsl-1.15/specfunc/atanint.c @@ -0,0 +1,115 @@ +/* specfunc/atanint.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "chebyshev.h" +#include "cheb_eval.c" + + +static double atanint_data[21] = { + 1.91040361296235937512, + -0.4176351437656746940e-01, + 0.275392550786367434e-02, + -0.25051809526248881e-03, + 0.2666981285121171e-04, + -0.311890514107001e-05, + 0.38833853132249e-06, + -0.5057274584964e-07, + 0.681225282949e-08, + -0.94212561654e-09, + 0.13307878816e-09, + -0.1912678075e-10, + 0.278912620e-11, + -0.41174820e-12, + 0.6142987e-13, + -0.924929e-14, + 0.140387e-14, + -0.21460e-15, + 0.3301e-16, + -0.511e-17, + 0.79e-18, +}; +static cheb_series atanint_cs = { + atanint_data, + 20, + -1, 1, + 10 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_atanint_e(const double x, gsl_sf_result * result) +{ + const double ax = fabs(x); + const double sgn = GSL_SIGN(x); + + /* CHECK_POINTER(result) */ + + if(ax == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 0.5*GSL_SQRT_DBL_EPSILON) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax <= 1.0) { + const double t = 2.0 * (x*x - 0.5); + gsl_sf_result result_c; + cheb_eval_e(&atanint_cs, t, &result_c); + result->val = x * result_c.val; + result->err = x * result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(ax < 1.0/GSL_SQRT_DBL_EPSILON) { + const double t = 2.0 * (1.0/(x*x) - 0.5); + gsl_sf_result result_c; + cheb_eval_e(&atanint_cs, t, &result_c); + result->val = sgn * (0.5*M_PI*log(ax) + result_c.val/ax); + result->err = result_c.err/ax + fabs(result->val*GSL_DBL_EPSILON); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = sgn * (0.5*M_PI*log(ax) + 1.0 / ax); + result->err = 2.0 * fabs(result->val * GSL_DBL_EPSILON); + return GSL_SUCCESS; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_atanint(const double x) +{ + EVAL_RESULT(gsl_sf_atanint_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel.c b/software/gsl-1.15/specfunc/bessel.c new file mode 100644 index 000000000..361657a6e --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel.c @@ -0,0 +1,983 @@ +/* specfunc/bessel.c + * + * Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ +/* Miscellaneous support functions for Bessel function evaluations. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel_amp_phase.h" +#include "bessel_temme.h" +#include "bessel.h" + +#define CubeRoot2_ 1.25992104989487316476721060728 + + + +/* Debye functions [Abramowitz+Stegun, 9.3.9-10] */ + +inline static double +debye_u1(const double * tpow) +{ + return (3.0*tpow[1] - 5.0*tpow[3])/24.0; +} + +inline static double +debye_u2(const double * tpow) +{ + return (81.0*tpow[2] - 462.0*tpow[4] + 385.0*tpow[6])/1152.0; +} + +inline +static double debye_u3(const double * tpow) +{ + return (30375.0*tpow[3] - 369603.0*tpow[5] + 765765.0*tpow[7] - 425425.0*tpow[9])/414720.0; +} + +inline +static double debye_u4(const double * tpow) +{ + return (4465125.0*tpow[4] - 94121676.0*tpow[6] + 349922430.0*tpow[8] - + 446185740.0*tpow[10] + 185910725.0*tpow[12])/39813120.0; +} + +inline +static double debye_u5(const double * tpow) +{ + return (1519035525.0*tpow[5] - 49286948607.0*tpow[7] + + 284499769554.0*tpow[9] - 614135872350.0*tpow[11] + + 566098157625.0*tpow[13] - 188699385875.0*tpow[15])/6688604160.0; +} + +#if 0 +inline +static double debye_u6(const double * tpow) +{ + return (2757049477875.0*tpow[6] - 127577298354750.0*tpow[8] + + 1050760774457901.0*tpow[10] - 3369032068261860.0*tpow[12] + + 5104696716244125.0*tpow[14] - 3685299006138750.0*tpow[16] + + 1023694168371875.0*tpow[18])/4815794995200.0; +} +#endif + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_bessel_IJ_taylor_e(const double nu, const double x, + const int sign, + const int kmax, + const double threshold, + gsl_sf_result * result + ) +{ + /* CHECK_POINTER(result) */ + + if(nu < 0.0 || x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + if(nu == 0.0) { + result->val = 1.0; + result->err = 0.0; + } + else { + result->val = 0.0; + result->err = 0.0; + } + return GSL_SUCCESS; + } + else { + gsl_sf_result prefactor; /* (x/2)^nu / Gamma(nu+1) */ + gsl_sf_result sum; + + int stat_pre; + int stat_sum; + int stat_mul; + + if(nu == 0.0) { + prefactor.val = 1.0; + prefactor.err = 0.0; + stat_pre = GSL_SUCCESS; + } + else if(nu < INT_MAX-1) { + /* Separate the integer part and use + * y^nu / Gamma(nu+1) = y^N /N! y^f / (N+1)_f, + * to control the error. + */ + const int N = (int)floor(nu + 0.5); + const double f = nu - N; + gsl_sf_result poch_factor; + gsl_sf_result tc_factor; + const int stat_poch = gsl_sf_poch_e(N+1.0, f, &poch_factor); + const int stat_tc = gsl_sf_taylorcoeff_e(N, 0.5*x, &tc_factor); + const double p = pow(0.5*x,f); + prefactor.val = tc_factor.val * p / poch_factor.val; + prefactor.err = tc_factor.err * p / poch_factor.val; + prefactor.err += fabs(prefactor.val) / poch_factor.val * poch_factor.err; + prefactor.err += 2.0 * GSL_DBL_EPSILON * fabs(prefactor.val); + stat_pre = GSL_ERROR_SELECT_2(stat_tc, stat_poch); + } + else { + gsl_sf_result lg; + const int stat_lg = gsl_sf_lngamma_e(nu+1.0, &lg); + const double term1 = nu*log(0.5*x); + const double term2 = lg.val; + const double ln_pre = term1 - term2; + const double ln_pre_err = GSL_DBL_EPSILON * (fabs(term1)+fabs(term2)) + lg.err; + const int stat_ex = gsl_sf_exp_err_e(ln_pre, ln_pre_err, &prefactor); + stat_pre = GSL_ERROR_SELECT_2(stat_ex, stat_lg); + } + + /* Evaluate the sum. + * [Abramowitz+Stegun, 9.1.10] + * [Abramowitz+Stegun, 9.6.7] + */ + { + const double y = sign * 0.25 * x*x; + double sumk = 1.0; + double term = 1.0; + int k; + + for(k=1; k<=kmax; k++) { + term *= y/((nu+k)*k); + sumk += term; + if(fabs(term/sumk) < threshold) break; + } + + sum.val = sumk; + sum.err = threshold * fabs(sumk); + + stat_sum = ( k >= kmax ? GSL_EMAXITER : GSL_SUCCESS ); + } + + stat_mul = gsl_sf_multiply_err_e(prefactor.val, prefactor.err, + sum.val, sum.err, + result); + + return GSL_ERROR_SELECT_3(stat_mul, stat_pre, stat_sum); + } +} + + +/* Hankel's Asymptotic Expansion - A&S 9.2.5 + * + * x >> nu*nu+1 + * error ~ O( ((nu*nu+1)/x)^4 ) + * + * empirical error analysis: + * choose GSL_ROOT4_MACH_EPS * x > (nu*nu + 1) + * + * This is not especially useful. When the argument gets + * large enough for this to apply, the cos() and sin() + * start loosing digits. However, this seems inevitable + * for this particular method. + * + * Wed Jun 25 14:39:38 MDT 2003 [GJ] + * This function was inconsistent since the Q term did not + * go to relative order eps^2. That's why the error estimate + * originally given was screwy (it didn't make sense that the + * "empirical" error was coming out O(eps^3)). + * With Q to proper order, the error is O(eps^4). + * + * Sat Mar 15 05:16:18 GMT 2008 [BG] + * Extended to use additional terms in the series to gain + * higher accuracy. + * + */ + +int +gsl_sf_bessel_Jnu_asympx_e(const double nu, const double x, gsl_sf_result * result) +{ + double mu = 4.0*nu*nu; + double chi = x - (0.5*nu + 0.25)*M_PI; + + double P = 0.0; + double Q = 0.0; + + double k = 0, t = 1; + int convP, convQ; + + do + { + t *= (k == 0) ? 1 : -(mu - (2*k-1)*(2*k-1)) / (k * (8 * x)); + convP = fabs(t) < GSL_DBL_EPSILON * fabs(P); + P += t; + + k++; + + t *= (mu - (2*k-1)*(2*k-1)) / (k * (8 * x)); + convQ = fabs(t) < GSL_DBL_EPSILON * fabs(Q); + Q += t; + + /* To preserve the consistency of the series we need to exit + when P and Q have the same number of terms */ + + if (convP && convQ && k > (nu / 2)) + break; + + k++; + } + while (k < 1000); + + { + double pre = sqrt(2.0/(M_PI*x)); + double c = cos(chi); + double s = sin(chi); + + result->val = pre * (c*P - s*Q); + result->err = pre * GSL_DBL_EPSILON * (fabs(c*P) + fabs(s*Q) + fabs(t)) * (1 + fabs(x)); + /* NB: final term accounts for phase error with large x */ + } + + return GSL_SUCCESS; +} + + +/* x >> nu*nu+1 + */ +int +gsl_sf_bessel_Ynu_asympx_e(const double nu, const double x, gsl_sf_result * result) +{ + double ampl; + double theta; + double alpha = x; + double beta = -0.5*nu*M_PI; + int stat_a = gsl_sf_bessel_asymp_Mnu_e(nu, x, &l); + int stat_t = gsl_sf_bessel_asymp_thetanu_corr_e(nu, x, &theta); + double sin_alpha = sin(alpha); + double cos_alpha = cos(alpha); + double sin_chi = sin(beta + theta); + double cos_chi = cos(beta + theta); + double sin_term = sin_alpha * cos_chi + sin_chi * cos_alpha; + double sin_term_mag = fabs(sin_alpha * cos_chi) + fabs(sin_chi * cos_alpha); + result->val = ampl * sin_term; + result->err = fabs(ampl) * GSL_DBL_EPSILON * sin_term_mag; + result->err += fabs(result->val) * 2.0 * GSL_DBL_EPSILON; + + if(fabs(alpha) > 1.0/GSL_DBL_EPSILON) { + result->err *= 0.5 * fabs(alpha); + } + else if(fabs(alpha) > 1.0/GSL_SQRT_DBL_EPSILON) { + result->err *= 256.0 * fabs(alpha) * GSL_SQRT_DBL_EPSILON; + } + + return GSL_ERROR_SELECT_2(stat_t, stat_a); +} + + +/* x >> nu*nu+1 + */ +int +gsl_sf_bessel_Inu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result) +{ + double mu = 4.0*nu*nu; + double mum1 = mu-1.0; + double mum9 = mu-9.0; + double pre = 1.0/sqrt(2.0*M_PI*x); + double r = mu/x; + result->val = pre * (1.0 - mum1/(8.0*x) + mum1*mum9/(128.0*x*x)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + pre * fabs(0.1*r*r*r); + return GSL_SUCCESS; +} + +/* x >> nu*nu+1 + */ +int +gsl_sf_bessel_Knu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result) +{ + double mu = 4.0*nu*nu; + double mum1 = mu-1.0; + double mum9 = mu-9.0; + double pre = sqrt(M_PI/(2.0*x)); + double r = nu/x; + result->val = pre * (1.0 + mum1/(8.0*x) + mum1*mum9/(128.0*x*x)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + pre * fabs(0.1*r*r*r); + return GSL_SUCCESS; +} + + +/* nu -> Inf; uniform in x > 0 [Abramowitz+Stegun, 9.7.7] + * + * error: + * The error has the form u_N(t)/nu^N where 0 <= t <= 1. + * It is not hard to show that |u_N(t)| is small for such t. + * We have N=6 here, and |u_6(t)| < 0.025, so the error is clearly + * bounded by 0.025/nu^6. This gives the asymptotic bound on nu + * seen below as nu ~ 100. For general MACH_EPS it will be + * nu > 0.5 / MACH_EPS^(1/6) + * When t is small, the bound is even better because |u_N(t)| vanishes + * as t->0. In fact u_N(t) ~ C t^N as t->0, with C ~= 0.1. + * We write + * err_N <= min(0.025, C(1/(1+(x/nu)^2))^3) / nu^6 + * therefore + * min(0.29/nu^2, 0.5/(nu^2+x^2)) < MACH_EPS^{1/3} + * and this is the general form. + * + * empirical error analysis, assuming 14 digit requirement: + * choose x > 50.000 nu ==> nu > 3 + * choose x > 10.000 nu ==> nu > 15 + * choose x > 2.000 nu ==> nu > 50 + * choose x > 1.000 nu ==> nu > 75 + * choose x > 0.500 nu ==> nu > 80 + * choose x > 0.100 nu ==> nu > 83 + * + * This makes sense. For x << nu, the error will be of the form u_N(1)/nu^N, + * since the polynomial term will be evaluated near t=1, so the bound + * on nu will become constant for small x. Furthermore, increasing x with + * nu fixed will decrease the error. + */ +int +gsl_sf_bessel_Inu_scaled_asymp_unif_e(const double nu, const double x, gsl_sf_result * result) +{ + int i; + double z = x/nu; + double root_term = hypot(1.0,z); + double pre = 1.0/sqrt(2.0*M_PI*nu * root_term); + double eta = root_term + log(z/(1.0+root_term)); + double ex_arg = ( z < 1.0/GSL_ROOT3_DBL_EPSILON ? nu*(-z + eta) : -0.5*nu/z*(1.0 - 1.0/(12.0*z*z)) ); + gsl_sf_result ex_result; + int stat_ex = gsl_sf_exp_e(ex_arg, &ex_result); + if(stat_ex == GSL_SUCCESS) { + double t = 1.0/root_term; + double sum; + double tpow[16]; + tpow[0] = 1.0; + for(i=1; i<16; i++) tpow[i] = t * tpow[i-1]; + sum = 1.0 + debye_u1(tpow)/nu + debye_u2(tpow)/(nu*nu) + debye_u3(tpow)/(nu*nu*nu) + + debye_u4(tpow)/(nu*nu*nu*nu) + debye_u5(tpow)/(nu*nu*nu*nu*nu); + result->val = pre * ex_result.val * sum; + result->err = pre * ex_result.val / (nu*nu*nu*nu*nu*nu); + result->err += pre * ex_result.err * fabs(sum); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_ex; + } +} + + +/* nu -> Inf; uniform in x > 0 [Abramowitz+Stegun, 9.7.8] + * + * error: + * identical to that above for Inu_scaled + */ +int +gsl_sf_bessel_Knu_scaled_asymp_unif_e(const double nu, const double x, gsl_sf_result * result) +{ + int i; + double z = x/nu; + double root_term = hypot(1.0,z); + double pre = sqrt(M_PI/(2.0*nu*root_term)); + double eta = root_term + log(z/(1.0+root_term)); + double ex_arg = ( z < 1.0/GSL_ROOT3_DBL_EPSILON ? nu*(z - eta) : 0.5*nu/z*(1.0 + 1.0/(12.0*z*z)) ); + gsl_sf_result ex_result; + int stat_ex = gsl_sf_exp_e(ex_arg, &ex_result); + if(stat_ex == GSL_SUCCESS) { + double t = 1.0/root_term; + double sum; + double tpow[16]; + tpow[0] = 1.0; + for(i=1; i<16; i++) tpow[i] = t * tpow[i-1]; + sum = 1.0 - debye_u1(tpow)/nu + debye_u2(tpow)/(nu*nu) - debye_u3(tpow)/(nu*nu*nu) + + debye_u4(tpow)/(nu*nu*nu*nu) - debye_u5(tpow)/(nu*nu*nu*nu*nu); + result->val = pre * ex_result.val * sum; + result->err = pre * ex_result.err * fabs(sum); + result->err += pre * ex_result.val / (nu*nu*nu*nu*nu*nu); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_ex; + } +} + + +/* Evaluate J_mu(x),J_{mu+1}(x) and Y_mu(x),Y_{mu+1}(x) for |mu| < 1/2 + */ +int +gsl_sf_bessel_JY_mu_restricted(const double mu, const double x, + gsl_sf_result * Jmu, gsl_sf_result * Jmup1, + gsl_sf_result * Ymu, gsl_sf_result * Ymup1) +{ + /* CHECK_POINTER(Jmu) */ + /* CHECK_POINTER(Jmup1) */ + /* CHECK_POINTER(Ymu) */ + /* CHECK_POINTER(Ymup1) */ + + if(x < 0.0 || fabs(mu) > 0.5) { + Jmu->val = 0.0; + Jmu->err = 0.0; + Jmup1->val = 0.0; + Jmup1->err = 0.0; + Ymu->val = 0.0; + Ymu->err = 0.0; + Ymup1->val = 0.0; + Ymup1->err = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else if(x == 0.0) { + if(mu == 0.0) { + Jmu->val = 1.0; + Jmu->err = 0.0; + } + else { + Jmu->val = 0.0; + Jmu->err = 0.0; + } + Jmup1->val = 0.0; + Jmup1->err = 0.0; + Ymu->val = 0.0; + Ymu->err = 0.0; + Ymup1->val = 0.0; + Ymup1->err = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else { + int stat_Y; + int stat_J; + + if(x < 2.0) { + /* Use Taylor series for J and the Temme series for Y. + * The Taylor series for J requires nu > 0, so we shift + * up one and use the recursion relation to get Jmu, in + * case mu < 0. + */ + gsl_sf_result Jmup2; + int stat_J1 = gsl_sf_bessel_IJ_taylor_e(mu+1.0, x, -1, 100, GSL_DBL_EPSILON, Jmup1); + int stat_J2 = gsl_sf_bessel_IJ_taylor_e(mu+2.0, x, -1, 100, GSL_DBL_EPSILON, &Jmup2); + double c = 2.0*(mu+1.0)/x; + Jmu->val = c * Jmup1->val - Jmup2.val; + Jmu->err = c * Jmup1->err + Jmup2.err; + Jmu->err += 2.0 * GSL_DBL_EPSILON * fabs(Jmu->val); + stat_J = GSL_ERROR_SELECT_2(stat_J1, stat_J2); + stat_Y = gsl_sf_bessel_Y_temme(mu, x, Ymu, Ymup1); + return GSL_ERROR_SELECT_2(stat_J, stat_Y); + } + else if(x < 1000.0) { + double P, Q; + double J_ratio; + double J_sgn; + const int stat_CF1 = gsl_sf_bessel_J_CF1(mu, x, &J_ratio, &J_sgn); + const int stat_CF2 = gsl_sf_bessel_JY_steed_CF2(mu, x, &P, &Q); + double Jprime_J_ratio = mu/x - J_ratio; + double gamma = (P - Jprime_J_ratio)/Q; + Jmu->val = J_sgn * sqrt(2.0/(M_PI*x) / (Q + gamma*(P-Jprime_J_ratio))); + Jmu->err = 4.0 * GSL_DBL_EPSILON * fabs(Jmu->val); + Jmup1->val = J_ratio * Jmu->val; + Jmup1->err = fabs(J_ratio) * Jmu->err; + Ymu->val = gamma * Jmu->val; + Ymu->err = fabs(gamma) * Jmu->err; + Ymup1->val = Ymu->val * (mu/x - P - Q/gamma); + Ymup1->err = Ymu->err * fabs(mu/x - P - Q/gamma) + 4.0*GSL_DBL_EPSILON*fabs(Ymup1->val); + return GSL_ERROR_SELECT_2(stat_CF1, stat_CF2); + } + else { + /* Use asymptotics for large argument. + */ + const int stat_J0 = gsl_sf_bessel_Jnu_asympx_e(mu, x, Jmu); + const int stat_J1 = gsl_sf_bessel_Jnu_asympx_e(mu+1.0, x, Jmup1); + const int stat_Y0 = gsl_sf_bessel_Ynu_asympx_e(mu, x, Ymu); + const int stat_Y1 = gsl_sf_bessel_Ynu_asympx_e(mu+1.0, x, Ymup1); + stat_J = GSL_ERROR_SELECT_2(stat_J0, stat_J1); + stat_Y = GSL_ERROR_SELECT_2(stat_Y0, stat_Y1); + return GSL_ERROR_SELECT_2(stat_J, stat_Y); + } + } +} + + +int +gsl_sf_bessel_J_CF1(const double nu, const double x, + double * ratio, double * sgn) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const double RECUR_SMALL = GSL_SQRT_DBL_MIN; + const int maxiter = 10000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = x/(2.0*(nu+1.0)); + double An = Anm1 + a1*Anm2; + double Bn = Bnm1 + a1*Bnm2; + double an; + double fn = An/Bn; + double dn = a1; + double s = 1.0; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = -x*x/(4.0*(nu+n-1.0)*(nu+n)); + An = Anm1 + an*Anm2; + Bn = Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + } else if(fabs(An) < RECUR_SMALL || fabs(Bn) < RECUR_SMALL) { + An /= RECUR_SMALL; + Bn /= RECUR_SMALL; + Anm1 /= RECUR_SMALL; + Bnm1 /= RECUR_SMALL; + Anm2 /= RECUR_SMALL; + Bnm2 /= RECUR_SMALL; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + dn = 1.0 / (2.0*(nu+n)/x - dn); + if(dn < 0.0) s = -s; + + if(fabs(del - 1.0) < 2.0*GSL_DBL_EPSILON) break; + } + + /* FIXME: we should return an error term here as well, because the + error from this recurrence affects the overall error estimate. */ + + *ratio = fn; + *sgn = s; + + if(n >= maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + + +/* Evaluate the continued fraction CF1 for J_{nu+1}/J_nu + * using Gautschi (Euler) equivalent series. + * This exhibits an annoying problem because the + * a_k are not positive definite (in fact they are all negative). + * There are cases when rho_k blows up. Example: nu=1,x=4. + */ +#if 0 +int +gsl_sf_bessel_J_CF1_ser(const double nu, const double x, + double * ratio, double * sgn) +{ + const int maxk = 20000; + double tk = 1.0; + double sum = 1.0; + double rhok = 0.0; + double dk = 0.0; + double s = 1.0; + int k; + + for(k=1; k 2 is a good cutoff. + * Also requires |nu| < 1/2. + */ +int +gsl_sf_bessel_K_scaled_steed_temme_CF2(const double nu, const double x, + double * K_nu, double * K_nup1, + double * Kp_nu) +{ + const int maxiter = 10000; + + int i = 1; + double bi = 2.0*(1.0 + x); + double di = 1.0/bi; + double delhi = di; + double hi = di; + + double qi = 0.0; + double qip1 = 1.0; + + double ai = -(0.25 - nu*nu); + double a1 = ai; + double ci = -ai; + double Qi = -ai; + + double s = 1.0 + Qi*delhi; + + for(i=2; i<=maxiter; i++) { + double dels; + double tmp; + ai -= 2.0*(i-1); + ci = -ai*ci/i; + tmp = (qi - bi*qip1)/ai; + qi = qip1; + qip1 = tmp; + Qi += ci*qip1; + bi += 2.0; + di = 1.0/(bi + ai*di); + delhi = (bi*di - 1.0) * delhi; + hi += delhi; + dels = Qi*delhi; + s += dels; + if(fabs(dels/s) < GSL_DBL_EPSILON) break; + } + + hi *= -a1; + + *K_nu = sqrt(M_PI/(2.0*x)) / s; + *K_nup1 = *K_nu * (nu + x + 0.5 - hi)/x; + *Kp_nu = - *K_nup1 + nu/x * *K_nu; + if(i == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +int gsl_sf_bessel_cos_pi4_e(double y, double eps, gsl_sf_result * result) +{ + const double sy = sin(y); + const double cy = cos(y); + const double s = sy + cy; + const double d = sy - cy; + const double abs_sum = fabs(cy) + fabs(sy); + double seps; + double ceps; + if(fabs(eps) < GSL_ROOT5_DBL_EPSILON) { + const double e2 = eps*eps; + seps = eps * (1.0 - e2/6.0 * (1.0 - e2/20.0)); + ceps = 1.0 - e2/2.0 * (1.0 - e2/12.0); + } + else { + seps = sin(eps); + ceps = cos(eps); + } + result->val = (ceps * s - seps * d)/ M_SQRT2; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(ceps) + fabs(seps)) * abs_sum / M_SQRT2; + + /* Try to account for error in evaluation of sin(y), cos(y). + * This is a little sticky because we don't really know + * how the library routines are doing their argument reduction. + * However, we will make a reasonable guess. + * FIXME ? + */ + if(y > 1.0/GSL_DBL_EPSILON) { + result->err *= 0.5 * y; + } + else if(y > 1.0/GSL_SQRT_DBL_EPSILON) { + result->err *= 256.0 * y * GSL_SQRT_DBL_EPSILON; + } + + return GSL_SUCCESS; +} + + +int gsl_sf_bessel_sin_pi4_e(double y, double eps, gsl_sf_result * result) +{ + const double sy = sin(y); + const double cy = cos(y); + const double s = sy + cy; + const double d = sy - cy; + const double abs_sum = fabs(cy) + fabs(sy); + double seps; + double ceps; + if(fabs(eps) < GSL_ROOT5_DBL_EPSILON) { + const double e2 = eps*eps; + seps = eps * (1.0 - e2/6.0 * (1.0 - e2/20.0)); + ceps = 1.0 - e2/2.0 * (1.0 - e2/12.0); + } + else { + seps = sin(eps); + ceps = cos(eps); + } + result->val = (ceps * d + seps * s)/ M_SQRT2; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(ceps) + fabs(seps)) * abs_sum / M_SQRT2; + + /* Try to account for error in evaluation of sin(y), cos(y). + * See above. + * FIXME ? + */ + if(y > 1.0/GSL_DBL_EPSILON) { + result->err *= 0.5 * y; + } + else if(y > 1.0/GSL_SQRT_DBL_EPSILON) { + result->err *= 256.0 * y * GSL_SQRT_DBL_EPSILON; + } + + return GSL_SUCCESS; +} + + +/************************************************************************ + * * + Asymptotic approximations 8.11.5, 8.12.5, and 8.42.7 from + G.N.Watson, A Treatise on the Theory of Bessel Functions, + 2nd Edition (Cambridge University Press, 1944). + Higher terms in expansion for x near l given by + Airey in Phil. Mag. 31, 520 (1916). + + This approximation is accurate to near 0.1% at the boundaries + between the asymptotic regions; well away from the boundaries + the accuracy is better than 10^{-5}. + * * + ************************************************************************/ +#if 0 +double besselJ_meissel(double nu, double x) +{ + double beta = pow(nu, 0.325); + double result; + + /* Fitted matching points. */ + double llimit = 1.1 * beta; + double ulimit = 1.3 * beta; + + double nu2 = nu * nu; + + if (nu < 5. && x < 1.) + { + /* Small argument and order. Use a Taylor expansion. */ + int k; + double xo2 = 0.5 * x; + double gamfactor = pow(nu,nu) * exp(-nu) * sqrt(nu * 2. * M_PI) + * (1. + 1./(12.*nu) + 1./(288.*nu*nu)); + double prefactor = pow(xo2, nu) / gamfactor; + double C[5]; + + C[0] = 1.; + C[1] = -C[0] / (nu+1.); + C[2] = -C[1] / (2.*(nu+2.)); + C[3] = -C[2] / (3.*(nu+3.)); + C[4] = -C[3] / (4.*(nu+4.)); + + result = 0.; + for(k=0; k<5; k++) + result += C[k] * pow(xo2, 2.*k); + + result *= prefactor; + } + else if(x < nu - llimit) + { + /* Small x region: x << l. */ + double z = x / nu; + double z2 = z*z; + double rtomz2 = sqrt(1.-z2); + double omz2_2 = (1.-z2)*(1.-z2); + + /* Calculate Meissel exponent. */ + double term1 = 1./(24.*nu) * ((2.+3.*z2)/((1.-z2)*rtomz2) -2.); + double term2 = - z2*(4. + z2)/(16.*nu2*(1.-z2)*omz2_2); + double V_nu = term1 + term2; + + /* Calculate the harmless prefactor. */ + double sterlingsum = 1. + 1./(12.*nu) + 1./(288*nu2); + double harmless = 1. / (sqrt(rtomz2*2.*M_PI*nu) * sterlingsum); + + /* Calculate the logarithm of the nu dependent prefactor. */ + double ln_nupre = rtomz2 + log(z) - log(1. + rtomz2); + + result = harmless * exp(nu*ln_nupre - V_nu); + } + else if(x < nu + ulimit) + { + /* Intermediate region 1: x near nu. */ + double eps = 1.-nu/x; + double eps_x = eps * x; + double eps_x_2 = eps_x * eps_x; + double xo6 = x/6.; + double B[6]; + static double gam[6] = {2.67894, 1.35412, 1., 0.89298, 0.902745, 1.}; + static double sf[6] = {0.866025, 0.866025, 0., -0.866025, -0.866025, 0.}; + + /* Some terms are identically zero, because sf[] can be zero. + * Some terms do not appear in the result. + */ + B[0] = 1.; + B[1] = eps_x; + /* B[2] = 0.5 * eps_x_2 - 1./20.; */ + B[3] = eps_x * (eps_x_2/6. - 1./15.); + B[4] = eps_x_2 * (eps_x_2 - 1.)/24. + 1./280.; + /* B[5] = eps_x * (eps_x_2*(0.5*eps_x_2 - 1.)/60. + 43./8400.); */ + + result = B[0] * gam[0] * sf[0] / pow(xo6, 1./3.); + result += B[1] * gam[1] * sf[1] / pow(xo6, 2./3.); + result += B[3] * gam[3] * sf[3] / pow(xo6, 4./3.); + result += B[4] * gam[4] * sf[4] / pow(xo6, 5./3.); + + result /= (3.*M_PI); + } + else + { + /* Region of very large argument. Use expansion + * for x>>l, and we need not be very exacting. + */ + double secb = x/nu; + double sec2b= secb*secb; + + double cotb = 1./sqrt(sec2b-1.); /* cotb=cot(beta) */ + + double beta = acos(nu/x); + double trigarg = nu/cotb - nu*beta - 0.25 * M_PI; + + double cot3b = cotb * cotb * cotb; + double cot6b = cot3b * cot3b; + + double sum1, sum2, expterm, prefactor, trigcos; + + sum1 = 2.0 + 3.0 * sec2b; + trigarg -= sum1 * cot3b / (24.0 * nu); + + trigcos = cos(trigarg); + + sum2 = 4.0 + sec2b; + expterm = sum2 * sec2b * cot6b / (16.0 * nu2); + + expterm = exp(-expterm); + prefactor = sqrt(2. * cotb / (nu * M_PI)); + + result = prefactor * expterm * trigcos; + } + + return result; +} +#endif diff --git a/software/gsl-1.15/specfunc/bessel.h b/software/gsl-1.15/specfunc/bessel.h new file mode 100644 index 000000000..7b2f26b8d --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel.h @@ -0,0 +1,92 @@ +/* specfunc/bessel.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef _BESSEL_H_ +#define _BESSEL_H_ + +#include + + +/* Taylor expansion for J_nu(x) or I_nu(x) + * sign = -1 ==> Jnu + * sign = +1 ==> Inu + */ +int gsl_sf_bessel_IJ_taylor_e(const double nu, const double x, + const int sign, + const int kmax, + const double threshold, + gsl_sf_result * result + ); + +int gsl_sf_bessel_Jnu_asympx_e(const double nu, const double x, gsl_sf_result * result); +int gsl_sf_bessel_Ynu_asympx_e(const double nu, const double x, gsl_sf_result * result); + +int gsl_sf_bessel_Inu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result); +int gsl_sf_bessel_Knu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result); + +int gsl_sf_bessel_Inu_scaled_asymp_unif_e(const double nu, const double x, gsl_sf_result * result); +int gsl_sf_bessel_Knu_scaled_asymp_unif_e(const double nu, const double x, gsl_sf_result * result); + + +/* ratio = J_{nu+1}(x) / J_nu(x) + * sgn = sgn(J_nu(x)) + */ +int +gsl_sf_bessel_J_CF1(const double nu, const double x, double * ratio, double * sgn); + + +/* ratio = I_{nu+1}(x) / I_nu(x) + */ +int +gsl_sf_bessel_I_CF1_ser(const double nu, const double x, double * ratio); + + +/* Evaluate the Steed method continued fraction CF2 for + * + * (J' + i Y')/(J + i Y) := P + i Q + */ +int +gsl_sf_bessel_JY_steed_CF2(const double nu, const double x, + double * P, double * Q); + + +int +gsl_sf_bessel_JY_mu_restricted(const double mu, const double x, + gsl_sf_result * Jmu, gsl_sf_result * Jmup1, + gsl_sf_result * Ymu, gsl_sf_result * Ymup1); + + +int +gsl_sf_bessel_K_scaled_steed_temme_CF2(const double nu, const double x, + double * K_nu, double * K_nup1, + double * Kp_nu); + + +/* These are of use in calculating the oscillating + * Bessel functions. + * cos(y - pi/4 + eps) + * sin(y - pi/4 + eps) + */ +int gsl_sf_bessel_cos_pi4_e(double y, double eps, gsl_sf_result * result); +int gsl_sf_bessel_sin_pi4_e(double y, double eps, gsl_sf_result * result); + + +#endif /* !_BESSEL_H_ */ diff --git a/software/gsl-1.15/specfunc/bessel_I0.c b/software/gsl-1.15/specfunc/bessel_I0.c new file mode 100644 index 000000000..8e1be8b79 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_I0.c @@ -0,0 +1,232 @@ +/* specfunc/bessel_I0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on SLATEC besi0 */ + +/* chebyshev expansions + + series for bi0 on the interval 0. to 9.00000d+00 + with weighted error 2.46e-18 + log weighted error 17.61 + significant figures required 17.90 + decimal places required 18.15 + + series for ai0 on the interval 1.25000d-01 to 3.33333d-01 + with weighted error 7.87e-17 + log weighted error 16.10 + significant figures required 14.69 + decimal places required 16.76 + + + series for ai02 on the interval 0. to 1.25000d-01 + with weighted error 3.79e-17 + log weighted error 16.42 + significant figures required 14.86 + decimal places required 17.09 +*/ + +static double bi0_data[12] = { + -.07660547252839144951, + 1.92733795399380827000, + .22826445869203013390, + .01304891466707290428, + .00043442709008164874, + .00000942265768600193, + .00000014340062895106, + .00000000161384906966, + .00000000001396650044, + .00000000000009579451, + .00000000000000053339, + .00000000000000000245 +}; +static cheb_series bi0_cs = { + bi0_data, + 11, + -1, 1, + 11 +}; + +static double ai0_data[21] = { + .07575994494023796, + .00759138081082334, + .00041531313389237, + .00001070076463439, + -.00000790117997921, + -.00000078261435014, + .00000027838499429, + .00000000825247260, + -.00000001204463945, + .00000000155964859, + .00000000022925563, + -.00000000011916228, + .00000000001757854, + .00000000000112822, + -.00000000000114684, + .00000000000027155, + -.00000000000002415, + -.00000000000000608, + .00000000000000314, + -.00000000000000071, + .00000000000000007 +}; +static cheb_series ai0_cs = { + ai0_data, + 20, + -1, 1, + 13 +}; + +static double ai02_data[22] = { + .05449041101410882, + .00336911647825569, + .00006889758346918, + .00000289137052082, + .00000020489185893, + .00000002266668991, + .00000000339623203, + .00000000049406022, + .00000000001188914, + -.00000000003149915, + -.00000000001321580, + -.00000000000179419, + .00000000000071801, + .00000000000038529, + .00000000000001539, + -.00000000000004151, + -.00000000000000954, + .00000000000000382, + .00000000000000176, + -.00000000000000034, + -.00000000000000027, + .00000000000000003 +}; +static cheb_series ai02_cs = { + ai02_data, + 21, + -1, 1, + 11 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_I0_scaled_e(const double x, gsl_sf_result * result) +{ + double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y < 2.0 * GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - y; + result->err = 0.5*y*y; + return GSL_SUCCESS; + } + else if(y <= 3.0) { + const double ey = exp(-y); + gsl_sf_result c; + cheb_eval_e(&bi0_cs, y*y/4.5-1.0, &c); + result->val = ey * (2.75 + c.val); + result->err = GSL_DBL_EPSILON * fabs(result->val) + ey * c.err; + return GSL_SUCCESS; + } + else if(y <= 8.0) { + const double sy = sqrt(y); + gsl_sf_result c; + cheb_eval_e(&ai0_cs, (48.0/y-11.0)/5.0, &c); + result->val = (0.375 + c.val) / sy; + result->err = 2.0 * GSL_DBL_EPSILON * (0.375 + fabs(c.val)) / sy; + result->err += c.err / sy; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sy = sqrt(y); + gsl_sf_result c; + cheb_eval_e(&ai02_cs, 16.0/y-1.0, &c); + result->val = (0.375 + c.val) / sy; + result->err = 2.0 * GSL_DBL_EPSILON * (0.375 + fabs(c.val)) / sy; + result->err += c.err / sy; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_I0_e(const double x, gsl_sf_result * result) +{ + double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y < 2.0 * GSL_SQRT_DBL_EPSILON) { + result->val = 1.0; + result->err = 0.5*y*y; + return GSL_SUCCESS; + } + else if(y <= 3.0) { + gsl_sf_result c; + cheb_eval_e(&bi0_cs, y*y/4.5-1.0, &c); + result->val = 2.75 + c.val; + result->err = GSL_DBL_EPSILON * (2.75 + fabs(c.val)); + result->err += c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y < GSL_LOG_DBL_MAX - 1.0) { + const double ey = exp(y); + gsl_sf_result b_scaled; + gsl_sf_bessel_I0_scaled_e(x, &b_scaled); + result->val = ey * b_scaled.val; + result->err = ey * b_scaled.err + y*GSL_DBL_EPSILON*fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_I0_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_I0_scaled_e(x, &result); ) +} + +double gsl_sf_bessel_I0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_I0_e(x, &result); ) +} diff --git a/software/gsl-1.15/specfunc/bessel_I1.c b/software/gsl-1.15/specfunc/bessel_I1.c new file mode 100644 index 000000000..b5d30fd38 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_I1.c @@ -0,0 +1,258 @@ +/* specfunc/bessel_I1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +#define ROOT_EIGHT (2.0*M_SQRT2) + + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC besi1(), besi1e() */ + +/* chebyshev expansions + + series for bi1 on the interval 0. to 9.00000d+00 + with weighted error 2.40e-17 + log weighted error 16.62 + significant figures required 16.23 + decimal places required 17.14 + + series for ai1 on the interval 1.25000d-01 to 3.33333d-01 + with weighted error 6.98e-17 + log weighted error 16.16 + significant figures required 14.53 + decimal places required 16.82 + + series for ai12 on the interval 0. to 1.25000d-01 + with weighted error 3.55e-17 + log weighted error 16.45 + significant figures required 14.69 + decimal places required 17.12 +*/ + +static double bi1_data[11] = { + -0.001971713261099859, + 0.407348876675464810, + 0.034838994299959456, + 0.001545394556300123, + 0.000041888521098377, + 0.000000764902676483, + 0.000000010042493924, + 0.000000000099322077, + 0.000000000000766380, + 0.000000000000004741, + 0.000000000000000024 +}; +static cheb_series bi1_cs = { + bi1_data, + 10, + -1, 1, + 10 +}; + +static double ai1_data[21] = { + -0.02846744181881479, + -0.01922953231443221, + -0.00061151858579437, + -0.00002069971253350, + 0.00000858561914581, + 0.00000104949824671, + -0.00000029183389184, + -0.00000001559378146, + 0.00000001318012367, + -0.00000000144842341, + -0.00000000029085122, + 0.00000000012663889, + -0.00000000001664947, + -0.00000000000166665, + 0.00000000000124260, + -0.00000000000027315, + 0.00000000000002023, + 0.00000000000000730, + -0.00000000000000333, + 0.00000000000000071, + -0.00000000000000006 +}; +static cheb_series ai1_cs = { + ai1_data, + 20, + -1, 1, + 11 +}; + +static double ai12_data[22] = { + 0.02857623501828014, + -0.00976109749136147, + -0.00011058893876263, + -0.00000388256480887, + -0.00000025122362377, + -0.00000002631468847, + -0.00000000383538039, + -0.00000000055897433, + -0.00000000001897495, + 0.00000000003252602, + 0.00000000001412580, + 0.00000000000203564, + -0.00000000000071985, + -0.00000000000040836, + -0.00000000000002101, + 0.00000000000004273, + 0.00000000000001041, + -0.00000000000000382, + -0.00000000000000186, + 0.00000000000000033, + 0.00000000000000028, + -0.00000000000000003 +}; +static cheb_series ai12_cs = { + ai12_data, + 21, + -1, 1, + 9 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_I1_scaled_e(const double x, gsl_sf_result * result) +{ + const double xmin = 2.0 * GSL_DBL_MIN; + const double x_small = ROOT_EIGHT * GSL_SQRT_DBL_EPSILON; + const double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y < xmin) { + UNDERFLOW_ERROR(result); + } + else if(y < x_small) { + result->val = 0.5*x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y <= 3.0) { + const double ey = exp(-y); + gsl_sf_result c; + cheb_eval_e(&bi1_cs, y*y/4.5-1.0, &c); + result->val = x * ey * (0.875 + c.val); + result->err = ey * c.err + y * GSL_DBL_EPSILON * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y <= 8.0) { + const double sy = sqrt(y); + gsl_sf_result c; + double b; + double s; + cheb_eval_e(&ai1_cs, (48.0/y-11.0)/5.0, &c); + b = (0.375 + c.val) / sy; + s = (x > 0.0 ? 1.0 : -1.0); + result->val = s * b; + result->err = c.err / sy; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sy = sqrt(y); + gsl_sf_result c; + double b; + double s; + cheb_eval_e(&ai12_cs, 16.0/y-1.0, &c); + b = (0.375 + c.val) / sy; + s = (x > 0.0 ? 1.0 : -1.0); + result->val = s * b; + result->err = c.err / sy; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_I1_e(const double x, gsl_sf_result * result) +{ + const double xmin = 2.0 * GSL_DBL_MIN; + const double x_small = ROOT_EIGHT * GSL_SQRT_DBL_EPSILON; + const double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y < xmin) { + UNDERFLOW_ERROR(result); + } + else if(y < x_small) { + result->val = 0.5*x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y <= 3.0) { + gsl_sf_result c; + cheb_eval_e(&bi1_cs, y*y/4.5-1.0, &c); + result->val = x * (0.875 + c.val); + result->err = y * c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y < GSL_LOG_DBL_MAX) { + const double ey = exp(y); + gsl_sf_result I1_scaled; + gsl_sf_bessel_I1_scaled_e(x, &I1_scaled); + result->val = ey * I1_scaled.val; + result->err = ey * I1_scaled.err + y * GSL_DBL_EPSILON * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_I1_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_I1_scaled_e(x, &result)); +} + +double gsl_sf_bessel_I1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_I1_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_In.c b/software/gsl-1.15/specfunc/bessel_In.c new file mode 100644 index 000000000..74da5fc57 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_In.c @@ -0,0 +1,225 @@ +/* specfunc/bessel_In.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int +gsl_sf_bessel_In_scaled_e(int n, const double x, gsl_sf_result * result) +{ + const double ax = fabs(x); + + n = abs(n); /* I(-n, z) = I(n, z) */ + + /* CHECK_POINTER(result) */ + + if(n == 0) { + return gsl_sf_bessel_I0_scaled_e(x, result); + } + else if(n == 1) { + return gsl_sf_bessel_I1_scaled_e(x, result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x*x < 10.0*(n+1.0)/M_E) { + gsl_sf_result t; + double ex = exp(-ax); + int stat_In = gsl_sf_bessel_IJ_taylor_e((double)n, ax, 1, 50, GSL_DBL_EPSILON, &t); + result->val = t.val * ex; + result->err = t.err * ex; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if(x < 0.0 && GSL_IS_ODD(n)) result->val = -result->val; + return stat_In; + } + else if(n < 150 && ax < 1e7) { + gsl_sf_result I0_scaled; + int stat_I0 = gsl_sf_bessel_I0_scaled_e(ax, &I0_scaled); + double rat; + int stat_CF1 = gsl_sf_bessel_I_CF1_ser((double)n, ax, &rat); + double Ikp1 = rat * GSL_SQRT_DBL_MIN; + double Ik = GSL_SQRT_DBL_MIN; + double Ikm1; + int k; + for(k=n; k >= 1; k--) { + Ikm1 = Ikp1 + 2.0*k/ax * Ik; + Ikp1 = Ik; + Ik = Ikm1; + } + result->val = I0_scaled.val * (GSL_SQRT_DBL_MIN / Ik); + result->err = I0_scaled.err * (GSL_SQRT_DBL_MIN / Ik); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if(x < 0.0 && GSL_IS_ODD(n)) result->val = -result->val; + return GSL_ERROR_SELECT_2(stat_I0, stat_CF1); + } + else if( GSL_MIN( 0.29/(n*n), 0.5/(n*n + x*x) ) < 0.5*GSL_ROOT3_DBL_EPSILON) { + int stat_as = gsl_sf_bessel_Inu_scaled_asymp_unif_e((double)n, ax, result); + if(x < 0.0 && GSL_IS_ODD(n)) result->val = -result->val; + return stat_as; + } + else { + const int nhi = 2 + (int) (1.2 / GSL_ROOT6_DBL_EPSILON); + gsl_sf_result r_Ikp1; + gsl_sf_result r_Ik; + int stat_a1 = gsl_sf_bessel_Inu_scaled_asymp_unif_e(nhi+1.0, ax, &r_Ikp1); + int stat_a2 = gsl_sf_bessel_Inu_scaled_asymp_unif_e((double)nhi, ax, &r_Ik); + double Ikp1 = r_Ikp1.val; + double Ik = r_Ik.val; + double Ikm1; + int k; + for(k=nhi; k > n; k--) { + Ikm1 = Ikp1 + 2.0*k/ax * Ik; + Ikp1 = Ik; + Ik = Ikm1; + } + result->val = Ik; + result->err = Ik * (r_Ikp1.err/r_Ikp1.val + r_Ik.err/r_Ik.val); + if(x < 0.0 && GSL_IS_ODD(n)) result->val = -result->val; + return GSL_ERROR_SELECT_2(stat_a1, stat_a2); + } +} + + +int +gsl_sf_bessel_In_scaled_array(const int nmin, const int nmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(nmax < nmin || nmin < 0) { + int j; + for(j=0; j<=nmax-nmin; j++) result_array[j] = 0.0; + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(x == 0.0) { + int j; + for(j=0; j<=nmax-nmin; j++) result_array[j] = 0.0; + if(nmin == 0) result_array[0] = 1.0; + return GSL_SUCCESS; + } + else if(nmax == 0) { + gsl_sf_result I0_scaled; + int stat = gsl_sf_bessel_I0_scaled_e(x, &I0_scaled); + result_array[0] = I0_scaled.val; + return stat; + } + else { + const double ax = fabs(x); + const double two_over_x = 2.0/ax; + + /* starting values */ + gsl_sf_result r_Inp1; + gsl_sf_result r_In; + int stat_0 = gsl_sf_bessel_In_scaled_e(nmax+1, ax, &r_Inp1); + int stat_1 = gsl_sf_bessel_In_scaled_e(nmax, ax, &r_In); + double Inp1 = r_Inp1.val; + double In = r_In.val; + double Inm1; + int n; + + for(n=nmax; n>=nmin; n--) { + result_array[n-nmin] = In; + Inm1 = Inp1 + n * two_over_x * In; + Inp1 = In; + In = Inm1; + } + + /* deal with signs */ + if(x < 0.0) { + for(n=nmin; n<=nmax; n++) { + if(GSL_IS_ODD(n)) result_array[n-nmin] = -result_array[n-nmin]; + } + } + + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } +} + + +int +gsl_sf_bessel_In_e(const int n_in, const double x, gsl_sf_result * result) +{ + const double ax = fabs(x); + const int n = abs(n_in); /* I(-n, z) = I(n, z) */ + gsl_sf_result In_scaled; + const int stat_In_scaled = gsl_sf_bessel_In_scaled_e(n, ax, &In_scaled); + + /* In_scaled is always less than 1, + * so this overflow check is conservative. + */ + if(ax > GSL_LOG_DBL_MAX - 1.0) { + OVERFLOW_ERROR(result); + } + else { + const double ex = exp(ax); + result->val = ex * In_scaled.val; + result->err = ex * In_scaled.err; + result->err += ax * GSL_DBL_EPSILON * fabs(result->val); + if(x < 0.0 && GSL_IS_ODD(n)) result->val = -result->val; + return stat_In_scaled; + } +} + + +int +gsl_sf_bessel_In_array(const int nmin, const int nmax, const double x, double * result_array) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result_array) */ + + if(ax > GSL_LOG_DBL_MAX - 1.0) { + int j; + for(j=0; j<=nmax-nmin; j++) result_array[j] = 0.0; /* FIXME: should be Inf */ + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + int j; + double eax = exp(ax); + int status = gsl_sf_bessel_In_scaled_array(nmin, nmax, x, result_array); + for(j=0; j<=nmax-nmin; j++) result_array[j] *= eax; + return status; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_In_scaled(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_In_scaled_e(n, x, &result)); +} + +double gsl_sf_bessel_In(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_In_e(n, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Inu.c b/software/gsl-1.15/specfunc/bessel_Inu.c new file mode 100644 index 000000000..b3a1a9e16 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Inu.c @@ -0,0 +1,122 @@ +/* specfunc/bessel_Inu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_temme.h" + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_bessel_Inu_scaled_e(double nu, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < 0.0 || nu < 0.0) { + DOMAIN_ERROR(result); + } + else if(x*x < 10.0*(nu+1.0)) { + gsl_sf_result b; + double ex = exp(-x); + int stat = gsl_sf_bessel_IJ_taylor_e(nu, x, 1, 100, GSL_DBL_EPSILON, &b); + result->val = b.val * ex; + result->err = b.err * ex; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat; + } + else if(0.5/(nu*nu + x*x) < GSL_ROOT3_DBL_EPSILON) { + return gsl_sf_bessel_Inu_scaled_asymp_unif_e(nu, x, result); + } + else { + int N = (int)(nu + 0.5); + double mu = nu - N; /* -1/2 <= mu <= 1/2 */ + double K_mu, K_mup1, Kp_mu; + double K_nu, K_nup1, K_num1; + double I_nu_ratio; + int stat_Irat; + int stat_Kmu; + int n; + + /* obtain K_mu, K_mup1 */ + if(x < 2.0) { + stat_Kmu = gsl_sf_bessel_K_scaled_temme(mu, x, &K_mu, &K_mup1, &Kp_mu); + } + else { + stat_Kmu = gsl_sf_bessel_K_scaled_steed_temme_CF2(mu, x, &K_mu, &K_mup1, &Kp_mu); + } + + /* recurse forward to obtain K_num1, K_nu */ + K_nu = K_mu; + K_nup1 = K_mup1; + + for(n=0; nval = 1.0/(x * (K_nup1 + I_nu_ratio * K_nu)); + result->err = GSL_DBL_EPSILON * (0.5*N + 2.0) * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_Kmu, stat_Irat); + } +} + + +int +gsl_sf_bessel_Inu_e(double nu, double x, gsl_sf_result * result) +{ + gsl_sf_result b; + int stat_I = gsl_sf_bessel_Inu_scaled_e(nu, x, &b); + int stat_e = gsl_sf_exp_mult_err_e(x, fabs(x*GSL_DBL_EPSILON), + b.val, b.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_I); +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Inu_scaled(double nu, double x) +{ + EVAL_RESULT(gsl_sf_bessel_Inu_scaled_e(nu, x, &result)); +} + + +double gsl_sf_bessel_Inu(double nu, double x) +{ + EVAL_RESULT(gsl_sf_bessel_Inu_e(nu, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_J0.c b/software/gsl-1.15/specfunc/bessel_J0.c new file mode 100644 index 000000000..a0fc5810f --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_J0.c @@ -0,0 +1,111 @@ +/* specfunc/bessel_J0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include "bessel.h" +#include "bessel_amp_phase.h" +#include +#include + +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on SLATEC besj0, 1977 version, w. fullerton */ + +/* chebyshev expansions for Bessel functions + + series for bj0 on the interval 0. to 1.60000d+01 + with weighted error 7.47e-18 + log weighted error 17.13 + significant figures required 16.98 + decimal places required 17.68 + +*/ + +static double bj0_data[13] = { + 0.100254161968939137, + -0.665223007764405132, + 0.248983703498281314, + -0.0332527231700357697, + 0.0023114179304694015, + -0.0000991127741995080, + 0.0000028916708643998, + -0.0000000612108586630, + 0.0000000009838650793, + -0.0000000000124235515, + 0.0000000000001265433, + -0.0000000000000010619, + 0.0000000000000000074, +}; +static cheb_series bj0_cs = { + bj0_data, + 12, + -1, 1, + 9 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_J0_e(const double x, gsl_sf_result * result) +{ + double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y < 2.0*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0; + result->err = y*y; + return GSL_SUCCESS; + } + else if(y <= 4.0) { + return cheb_eval_e(&bj0_cs, 0.125*y*y - 1.0, result); + } + else { + const double z = 32.0/(y*y) - 1.0; + gsl_sf_result ca; + gsl_sf_result ct; + gsl_sf_result cp; + const int stat_ca = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bm0_cs, z, &ca); + const int stat_ct = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bth0_cs, z, &ct); + const int stat_cp = gsl_sf_bessel_cos_pi4_e(y, ct.val/y, &cp); + const double sqrty = sqrt(y); + const double ampl = (0.75 + ca.val) / sqrty; + result->val = ampl * cp.val; + result->err = fabs(cp.val) * ca.err/sqrty + fabs(ampl) * cp.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_ca, stat_ct, stat_cp); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_J0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_J0_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_J1.c b/software/gsl-1.15/specfunc/bessel_J1.c new file mode 100644 index 000000000..e38c30b62 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_J1.c @@ -0,0 +1,128 @@ +/* specfunc/bessel_J1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_amp_phase.h" +#include "cheb_eval.c" + +#define ROOT_EIGHT (2.0*M_SQRT2) + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on SLATEC besj1, 1983 version, w. fullerton */ + +/* chebyshev expansions + + series for bj1 on the interval 0. to 1.60000d+01 + with weighted error 4.48e-17 + log weighted error 16.35 + significant figures required 15.77 + decimal places required 16.89 + +*/ +static double bj1_data[12] = { + -0.11726141513332787, + -0.25361521830790640, + 0.050127080984469569, + -0.004631514809625081, + 0.000247996229415914, + -0.000008678948686278, + 0.000000214293917143, + -0.000000003936093079, + 0.000000000055911823, + -0.000000000000632761, + 0.000000000000005840, + -0.000000000000000044, +}; +static cheb_series bj1_cs = { + bj1_data, + 11, + -1, 1, + 8 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_J1_e(const double x, gsl_sf_result * result) +{ + double y = fabs(x); + + /* CHECK_POINTER(result) */ + + if(y == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y < 2.0*GSL_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(y < ROOT_EIGHT * GSL_SQRT_DBL_EPSILON) { + result->val = 0.5*x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y < 4.0) { + gsl_sf_result c; + cheb_eval_e(&bj1_cs, 0.125*y*y-1.0, &c); + result->val = x * (0.25 + c.val); + result->err = fabs(x * c.err); + return GSL_SUCCESS; + } + else { + /* Because the leading term in the phase is y, + * which we assume is exactly known, the error + * in the cos() evaluation is bounded. + */ + const double z = 32.0/(y*y) - 1.0; + gsl_sf_result ca; + gsl_sf_result ct; + gsl_sf_result sp; + const int stat_ca = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bm1_cs, z, &ca); + const int stat_ct = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bth1_cs, z, &ct); + const int stat_sp = gsl_sf_bessel_sin_pi4_e(y, ct.val/y, &sp); + const double sqrty = sqrt(y); + const double ampl = (0.75 + ca.val) / sqrty; + result->val = (x < 0.0 ? -ampl : ampl) * sp.val; + result->err = fabs(sp.val) * ca.err/sqrty + fabs(ampl) * sp.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_ca, stat_ct, stat_sp); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_J1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_J1_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Jn.c b/software/gsl-1.15/specfunc/bessel_Jn.c new file mode 100644 index 000000000..3d5c95815 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Jn.c @@ -0,0 +1,199 @@ +/* specfunc/bessel_Jn.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include "bessel.h" +#include "bessel_amp_phase.h" +#include "bessel_olver.h" +#include + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int gsl_sf_bessel_Jn_e(int n, double x, gsl_sf_result * result) +{ + int sign = 1; + + if(n < 0) { + /* reduce to case n >= 0 */ + n = -n; + if(GSL_IS_ODD(n)) sign = -sign; + } + + if(x < 0.0) { + /* reduce to case x >= 0. */ + x = -x; + if(GSL_IS_ODD(n)) sign = -sign; + } + + /* CHECK_POINTER(result) */ + + if(n == 0) { + gsl_sf_result b0; + int stat_J0 = gsl_sf_bessel_J0_e(x, &b0); + result->val = sign * b0.val; + result->err = b0.err; + return stat_J0; + } + else if(n == 1) { + gsl_sf_result b1; + int stat_J1 = gsl_sf_bessel_J1_e(x, &b1); + result->val = sign * b1.val; + result->err = b1.err; + return stat_J1; + } + else { + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x*x < 10.0*(n+1.0)*GSL_ROOT5_DBL_EPSILON) { + gsl_sf_result b; + int status = gsl_sf_bessel_IJ_taylor_e((double)n, x, -1, 50, GSL_DBL_EPSILON, &b); + result->val = sign * b.val; + result->err = b.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status; + } + else if(GSL_ROOT4_DBL_EPSILON * x > (n*n+1.0)) { + int status = gsl_sf_bessel_Jnu_asympx_e((double)n, x, result); + result->val *= sign; + return status; + } + else if(n > 50) { + int status = gsl_sf_bessel_Jnu_asymp_Olver_e((double)n, x, result); + result->val *= sign; + return status; + } + else if(x > 1000.0) + { + /* We need this to avoid feeding large x to CF1; note that + * due to the above check, we know that n <= 50. + */ + int status = gsl_sf_bessel_Jnu_asympx_e((double)n, x, result); + result->val *= sign; + return status; + } + else { + double ans; + double err; + double ratio; + double sgn; + int stat_b; + int stat_CF1 = gsl_sf_bessel_J_CF1((double)n, x, &ratio, &sgn); + + /* backward recurrence */ + double Jkp1 = GSL_SQRT_DBL_MIN * ratio; + double Jk = GSL_SQRT_DBL_MIN; + double Jkm1; + int k; + + for(k=n; k>0; k--) { + Jkm1 = 2.0*k/x * Jk - Jkp1; + Jkp1 = Jk; + Jk = Jkm1; + } + + if(fabs(Jkp1) > fabs(Jk)) { + gsl_sf_result b1; + stat_b = gsl_sf_bessel_J1_e(x, &b1); + ans = b1.val/Jkp1 * GSL_SQRT_DBL_MIN; + err = b1.err/Jkp1 * GSL_SQRT_DBL_MIN; + } + else { + gsl_sf_result b0; + stat_b = gsl_sf_bessel_J0_e(x, &b0); + ans = b0.val/Jk * GSL_SQRT_DBL_MIN; + err = b0.err/Jk * GSL_SQRT_DBL_MIN; + } + + result->val = sign * ans; + result->err = fabs(err); + return GSL_ERROR_SELECT_2(stat_CF1, stat_b); + } + } +} + + +int +gsl_sf_bessel_Jn_array(int nmin, int nmax, double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(nmin < 0 || nmax < nmin) { + int n; + for(n=nmax; n>=nmin; n--) { + result_array[n-nmin] = 0.0; + } + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(x == 0.0) { + int n; + for(n=nmax; n>=nmin; n--) { + result_array[n-nmin] = 0.0; + } + if(nmin == 0) result_array[0] = 1.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result r_Jnp1; + gsl_sf_result r_Jn; + int stat_np1 = gsl_sf_bessel_Jn_e(nmax+1, x, &r_Jnp1); + int stat_n = gsl_sf_bessel_Jn_e(nmax, x, &r_Jn); + int stat = GSL_ERROR_SELECT_2(stat_np1, stat_n); + + double Jnp1 = r_Jnp1.val; + double Jn = r_Jn.val; + double Jnm1; + int n; + + if(stat == GSL_SUCCESS) { + for(n=nmax; n>=nmin; n--) { + result_array[n-nmin] = Jn; + Jnm1 = -Jnp1 + 2.0*n/x * Jn; + Jnp1 = Jn; + Jn = Jnm1; + } + } + else { + for(n=nmax; n>=nmin; n--) { + result_array[n-nmin] = 0.0; + } + } + + return stat; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Jn(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Jn_e(n, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Jnu.c b/software/gsl-1.15/specfunc/bessel_Jnu.c new file mode 100644 index 000000000..3cc06a706 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Jnu.c @@ -0,0 +1,185 @@ +/* specfunc/bessel_Jnu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_olver.h" +#include "bessel_temme.h" + + +/* Evaluate at large enough nu to apply asymptotic + * results and apply backward recurrence. + */ +#if 0 +static +int +bessel_J_recur_asymp(const double nu, const double x, + gsl_sf_result * Jnu, gsl_sf_result * Jnup1) +{ + const double nu_cut = 25.0; + int n; + int steps = ceil(nu_cut - nu) + 1; + + gsl_sf_result r_Jnp1; + gsl_sf_result r_Jn; + int stat_O1 = gsl_sf_bessel_Jnu_asymp_Olver_e(nu + steps + 1.0, x, &r_Jnp1); + int stat_O2 = gsl_sf_bessel_Jnu_asymp_Olver_e(nu + steps, x, &r_Jn); + double r_fe = fabs(r_Jnp1.err/r_Jnp1.val) + fabs(r_Jn.err/r_Jn.val); + double Jnp1 = r_Jnp1.val; + double Jn = r_Jn.val; + double Jnm1; + double Jnp1_save; + + for(n=steps; n>0; n--) { + Jnm1 = 2.0*(nu+n)/x * Jn - Jnp1; + Jnp1 = Jn; + Jnp1_save = Jn; + Jn = Jnm1; + } + + Jnu->val = Jn; + Jnu->err = (r_fe + GSL_DBL_EPSILON * (steps + 1.0)) * fabs(Jn); + Jnup1->val = Jnp1_save; + Jnup1->err = (r_fe + GSL_DBL_EPSILON * (steps + 1.0)) * fabs(Jnp1_save); + + return GSL_ERROR_SELECT_2(stat_O1, stat_O2); +} +#endif + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_bessel_Jnu_e(const double nu, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < 0.0 || nu < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + if(nu == 0.0) { + result->val = 1.0; + result->err = 0.0; + } + else { + result->val = 0.0; + result->err = 0.0; + } + return GSL_SUCCESS; + } + else if(x*x < 10.0*(nu+1.0)) { + return gsl_sf_bessel_IJ_taylor_e(nu, x, -1, 100, GSL_DBL_EPSILON, result); + } + else if(nu > 50.0) { + return gsl_sf_bessel_Jnu_asymp_Olver_e(nu, x, result); + } + else if(x > 1000.0) + { + /* We need this to avoid feeding large x to CF1; note that + * due to the above check, we know that n <= 50. See similar + * block in bessel_Jn.c. + */ + return gsl_sf_bessel_Jnu_asympx_e(nu, x, result); + } + else { + /* -1/2 <= mu <= 1/2 */ + int N = (int)(nu + 0.5); + double mu = nu - N; + + /* Determine the J ratio at nu. + */ + double Jnup1_Jnu; + double sgn_Jnu; + const int stat_CF1 = gsl_sf_bessel_J_CF1(nu, x, &Jnup1_Jnu, &sgn_Jnu); + + if(x < 2.0) { + /* Determine Y_mu, Y_mup1 directly and recurse forward to nu. + * Then use the CF1 information to solve for J_nu and J_nup1. + */ + gsl_sf_result Y_mu, Y_mup1; + const int stat_mu = gsl_sf_bessel_Y_temme(mu, x, &Y_mu, &Y_mup1); + + double Ynm1 = Y_mu.val; + double Yn = Y_mup1.val; + double Ynp1 = 0.0; + int n; + for(n=1; nval = 2.0/(M_PI*x) / (Jnup1_Jnu*Yn - Ynp1); + result->err = GSL_DBL_EPSILON * (N + 2.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_mu, stat_CF1); + } + else { + /* Recurse backward from nu to mu, determining the J ratio + * at mu. Use this together with a Steed method CF2 to + * determine the actual J_mu, and thus obtain the normalization. + */ + double Jmu; + double Jmup1_Jmu; + double sgn_Jmu; + double Jmuprime_Jmu; + double P, Q; + const int stat_CF2 = gsl_sf_bessel_JY_steed_CF2(mu, x, &P, &Q); + double gamma; + + double Jnp1 = sgn_Jnu * GSL_SQRT_DBL_MIN * Jnup1_Jnu; + double Jn = sgn_Jnu * GSL_SQRT_DBL_MIN; + double Jnm1; + int n; + for(n=N; n>0; n--) { + Jnm1 = 2.0*(mu+n)/x * Jn - Jnp1; + Jnp1 = Jn; + Jn = Jnm1; + } + Jmup1_Jmu = Jnp1/Jn; + sgn_Jmu = GSL_SIGN(Jn); + Jmuprime_Jmu = mu/x - Jmup1_Jmu; + + gamma = (P - Jmuprime_Jmu)/Q; + Jmu = sgn_Jmu * sqrt(2.0/(M_PI*x) / (Q + gamma*(P-Jmuprime_Jmu))); + + result->val = Jmu * (sgn_Jnu * GSL_SQRT_DBL_MIN) / Jn; + result->err = 2.0 * GSL_DBL_EPSILON * (N + 2.0) * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_CF2, stat_CF1); + } + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Jnu(const double nu, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Jnu_e(nu, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_K0.c b/software/gsl-1.15/specfunc/bessel_K0.c new file mode 100644 index 000000000..a50b059f6 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_K0.c @@ -0,0 +1,214 @@ +/* specfunc/bessel_K0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC bk0(), bk0e() */ + +/* chebyshev expansions + + series for bk0 on the interval 0. to 4.00000d+00 + with weighted error 3.57e-19 + log weighted error 18.45 + significant figures required 17.99 + decimal places required 18.97 + + series for ak0 on the interval 1.25000d-01 to 5.00000d-01 + with weighted error 5.34e-17 + log weighted error 16.27 + significant figures required 14.92 + decimal places required 16.89 + + series for ak02 on the interval 0. to 1.25000d-01 + with weighted error 2.34e-17 + log weighted error 16.63 + significant figures required 14.67 + decimal places required 17.20 +*/ + +static double bk0_data[11] = { + -0.03532739323390276872, + 0.3442898999246284869, + 0.03597993651536150163, + 0.00126461541144692592, + 0.00002286212103119451, + 0.00000025347910790261, + 0.00000000190451637722, + 0.00000000001034969525, + 0.00000000000004259816, + 0.00000000000000013744, + 0.00000000000000000035 +}; +static cheb_series bk0_cs = { + bk0_data, + 10, + -1, 1, + 10 +}; + +static double ak0_data[17] = { + -0.07643947903327941, + -0.02235652605699819, + 0.00077341811546938, + -0.00004281006688886, + 0.00000308170017386, + -0.00000026393672220, + 0.00000002563713036, + -0.00000000274270554, + 0.00000000031694296, + -0.00000000003902353, + 0.00000000000506804, + -0.00000000000068895, + 0.00000000000009744, + -0.00000000000001427, + 0.00000000000000215, + -0.00000000000000033, + 0.00000000000000005 +}; +static cheb_series ak0_cs = { + ak0_data, + 16, + -1, 1, + 10 +}; + +static double ak02_data[14] = { + -0.01201869826307592, + -0.00917485269102569, + 0.00014445509317750, + -0.00000401361417543, + 0.00000015678318108, + -0.00000000777011043, + 0.00000000046111825, + -0.00000000003158592, + 0.00000000000243501, + -0.00000000000020743, + 0.00000000000001925, + -0.00000000000000192, + 0.00000000000000020, + -0.00000000000000002 +}; +static cheb_series ak02_cs = { + ak02_data, + 13, + -1, 1, + 8 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_K0_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x <= 2.0) { + const double lx = log(x); + const double ex = exp(x); + int stat_I0; + gsl_sf_result I0; + gsl_sf_result c; + cheb_eval_e(&bk0_cs, 0.5*x*x-1.0, &c); + stat_I0 = gsl_sf_bessel_I0_e(x, &I0); + result->val = ex * ((-lx+M_LN2)*I0.val - 0.25 + c.val); + result->err = ex * ((M_LN2+fabs(lx))*I0.err + c.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_I0; + } + else if(x <= 8.0) { + const double sx = sqrt(x); + gsl_sf_result c; + cheb_eval_e(&ak0_cs, (16.0/x-5.0)/3.0, &c); + result->val = (1.25 + c.val) / sx; + result->err = c.err / sx; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sx = sqrt(x); + gsl_sf_result c; + cheb_eval_e(&ak02_cs, 16.0/x-1.0, &c); + result->val = (1.25 + c.val) / sx; + result->err = (c.err + GSL_DBL_EPSILON) / sx; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_K0_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x <= 2.0) { + const double lx = log(x); + int stat_I0; + gsl_sf_result I0; + gsl_sf_result c; + cheb_eval_e(&bk0_cs, 0.5*x*x-1.0, &c); + stat_I0 = gsl_sf_bessel_I0_e(x, &I0); + result->val = (-lx+M_LN2)*I0.val - 0.25 + c.val; + result->err = (fabs(lx) + M_LN2) * I0.err + c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_I0; + } + else { + gsl_sf_result K0_scaled; + int stat_K0 = gsl_sf_bessel_K0_scaled_e(x, &K0_scaled); + int stat_e = gsl_sf_exp_mult_err_e(-x, GSL_DBL_EPSILON*fabs(x), + K0_scaled.val, K0_scaled.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K0); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_K0_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_K0_scaled_e(x, &result)); +} + +double gsl_sf_bessel_K0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_K0_e(x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/bessel_K1.c b/software/gsl-1.15/specfunc/bessel_K1.c new file mode 100644 index 000000000..ff635e70d --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_K1.c @@ -0,0 +1,220 @@ +/* specfunc/bessel_K1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC besk1(), besk1e() */ + +/* chebyshev expansions + + series for bk1 on the interval 0. to 4.00000d+00 + with weighted error 7.02e-18 + log weighted error 17.15 + significant figures required 16.73 + decimal places required 17.67 + + series for ak1 on the interval 1.25000d-01 to 5.00000d-01 + with weighted error 6.06e-17 + log weighted error 16.22 + significant figures required 15.41 + decimal places required 16.83 + + series for ak12 on the interval 0. to 1.25000d-01 + with weighted error 2.58e-17 + log weighted error 16.59 + significant figures required 15.22 + decimal places required 17.16 +*/ + +static double bk1_data[11] = { + 0.0253002273389477705, + -0.3531559607765448760, + -0.1226111808226571480, + -0.0069757238596398643, + -0.0001730288957513052, + -0.0000024334061415659, + -0.0000000221338763073, + -0.0000000001411488392, + -0.0000000000006666901, + -0.0000000000000024274, + -0.0000000000000000070 +}; + +static cheb_series bk1_cs = { + bk1_data, + 10, + -1, 1, + 8 +}; + +static double ak1_data[17] = { + 0.27443134069738830, + 0.07571989953199368, + -0.00144105155647540, + 0.00006650116955125, + -0.00000436998470952, + 0.00000035402774997, + -0.00000003311163779, + 0.00000000344597758, + -0.00000000038989323, + 0.00000000004720819, + -0.00000000000604783, + 0.00000000000081284, + -0.00000000000011386, + 0.00000000000001654, + -0.00000000000000248, + 0.00000000000000038, + -0.00000000000000006 +}; +static cheb_series ak1_cs = { + ak1_data, + 16, + -1, 1, + 9 +}; + +static double ak12_data[14] = { + 0.06379308343739001, + 0.02832887813049721, + -0.00024753706739052, + 0.00000577197245160, + -0.00000020689392195, + 0.00000000973998344, + -0.00000000055853361, + 0.00000000003732996, + -0.00000000000282505, + 0.00000000000023720, + -0.00000000000002176, + 0.00000000000000215, + -0.00000000000000022, + 0.00000000000000002 +}; +static cheb_series ak12_cs = { + ak12_data, + 13, + -1, 1, + 7 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_K1_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*GSL_DBL_MIN) { + OVERFLOW_ERROR(result); + } + else if(x <= 2.0) { + const double lx = log(x); + const double ex = exp(x); + int stat_I1; + gsl_sf_result I1; + gsl_sf_result c; + cheb_eval_e(&bk1_cs, 0.5*x*x-1.0, &c); + stat_I1 = gsl_sf_bessel_I1_e(x, &I1); + result->val = ex * ((lx-M_LN2)*I1.val + (0.75 + c.val)/x); + result->err = ex * (c.err/x + fabs(lx)*I1.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_I1; + } + else if(x <= 8.0) { + const double sx = sqrt(x); + gsl_sf_result c; + cheb_eval_e(&ak1_cs, (16.0/x-5.0)/3.0, &c); + result->val = (1.25 + c.val) / sx; + result->err = c.err / sx; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double sx = sqrt(x); + gsl_sf_result c; + cheb_eval_e(&ak12_cs, 16.0/x-1.0, &c); + result->val = (1.25 + c.val) / sx; + result->err = c.err / sx; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_K1_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*GSL_DBL_MIN) { + OVERFLOW_ERROR(result); + } + else if(x <= 2.0) { + const double lx = log(x); + int stat_I1; + gsl_sf_result I1; + gsl_sf_result c; + cheb_eval_e(&bk1_cs, 0.5*x*x-1.0, &c); + stat_I1 = gsl_sf_bessel_I1_e(x, &I1); + result->val = (lx-M_LN2)*I1.val + (0.75 + c.val)/x; + result->err = c.err/x + fabs(lx)*I1.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_I1; + } + else { + gsl_sf_result K1_scaled; + int stat_K1 = gsl_sf_bessel_K1_scaled_e(x, &K1_scaled); + int stat_e = gsl_sf_exp_mult_err_e(-x, 0.0, + K1_scaled.val, K1_scaled.err, + result); + result->err = fabs(result->val) * (GSL_DBL_EPSILON*fabs(x) + K1_scaled.err/K1_scaled.val); + return GSL_ERROR_SELECT_2(stat_e, stat_K1); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_K1_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_K1_scaled_e(x, &result)); +} + +double gsl_sf_bessel_K1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_K1_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Kn.c b/software/gsl-1.15/specfunc/bessel_Kn.c new file mode 100644 index 000000000..2ccf460d1 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Kn.c @@ -0,0 +1,240 @@ +/* specfunc/bessel_Kn.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* [Abramowitz+Stegun, 9.6.11] + * assumes n >= 1 + */ +static +int +bessel_Kn_scaled_small_x(const int n, const double x, gsl_sf_result * result) +{ + int k; + double y = 0.25 * x * x; + double ln_x_2 = log(0.5*x); + double ex = exp(x); + gsl_sf_result ln_nm1_fact; + double k_term; + double term1, sum1, ln_pre1; + double term2, sum2, pre2; + + gsl_sf_lnfact_e((unsigned int)(n-1), &ln_nm1_fact); + + ln_pre1 = -n*ln_x_2 + ln_nm1_fact.val; + if(ln_pre1 > GSL_LOG_DBL_MAX - 3.0) GSL_ERROR ("error", GSL_EOVRFLW); + + sum1 = 1.0; + k_term = 1.0; + for(k=1; k<=n-1; k++) { + k_term *= -y/(k * (n-k)); + sum1 += k_term; + } + term1 = 0.5 * exp(ln_pre1) * sum1; + + pre2 = 0.5 * exp(n*ln_x_2); + if(pre2 > 0.0) { + const int KMAX = 20; + gsl_sf_result psi_n; + gsl_sf_result npk_fact; + double yk = 1.0; + double k_fact = 1.0; + double psi_kp1 = -M_EULER; + double psi_npkp1; + gsl_sf_psi_int_e(n, &psi_n); + gsl_sf_fact_e((unsigned int)n, &npk_fact); + psi_npkp1 = psi_n.val + 1.0/n; + sum2 = (psi_kp1 + psi_npkp1 - 2.0*ln_x_2)/npk_fact.val; + for(k=1; kval = ex * (term1 + term2); + result->err = ex * GSL_DBL_EPSILON * (fabs(ln_pre1)*fabs(term1) + fabs(term2)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_Kn_scaled_e(int n, const double x, gsl_sf_result * result) +{ + n = abs(n); /* K(-n, z) = K(n, z) */ + + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(n == 0) { + return gsl_sf_bessel_K0_scaled_e(x, result); + } + else if(n == 1) { + return gsl_sf_bessel_K1_scaled_e(x, result); + } + else if(x <= 5.0) { + return bessel_Kn_scaled_small_x(n, x, result); + } + else if(GSL_ROOT3_DBL_EPSILON * x > 0.25 * (n*n + 1)) { + return gsl_sf_bessel_Knu_scaled_asympx_e((double)n, x, result); + } + else if(GSL_MIN(0.29/(n*n), 0.5/(n*n + x*x)) < GSL_ROOT3_DBL_EPSILON) { + return gsl_sf_bessel_Knu_scaled_asymp_unif_e((double)n, x, result); + } + else { + /* Upward recurrence. [Gradshteyn + Ryzhik, 8.471.1] */ + double two_over_x = 2.0/x; + gsl_sf_result r_b_jm1; + gsl_sf_result r_b_j; + int stat_0 = gsl_sf_bessel_K0_scaled_e(x, &r_b_jm1); + int stat_1 = gsl_sf_bessel_K1_scaled_e(x, &r_b_j); + double b_jm1 = r_b_jm1.val; + double b_j = r_b_j.val; + double b_jp1; + int j; + + for(j=1; jval = b_j; + result->err = n * (fabs(b_j) * (fabs(r_b_jm1.err/r_b_jm1.val) + fabs(r_b_j.err/r_b_j.val))); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } +} + + +int gsl_sf_bessel_Kn_e(const int n, const double x, gsl_sf_result * result) +{ + const int status = gsl_sf_bessel_Kn_scaled_e(n, x, result); + const double ex = exp(-x); + result->val *= ex; + result->err *= ex; + result->err += x * GSL_DBL_EPSILON * fabs(result->val); + return status; +} + + +int gsl_sf_bessel_Kn_scaled_array(const int nmin, const int nmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(nmin < 0 || nmax < nmin || x <= 0.0) { + int j; + for(j=0; j<=nmax-nmin; j++) result_array[j] = 0.0; + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(nmax == 0) { + gsl_sf_result b; + int stat = gsl_sf_bessel_K0_scaled_e(x, &b); + result_array[0] = b.val; + return stat; + } + else { + double two_over_x = 2.0/x; + gsl_sf_result r_Knm1; + gsl_sf_result r_Kn; + int stat_0 = gsl_sf_bessel_Kn_scaled_e(nmin, x, &r_Knm1); + int stat_1 = gsl_sf_bessel_Kn_scaled_e(nmin+1, x, &r_Kn); + int stat = GSL_ERROR_SELECT_2(stat_0, stat_1); + double Knp1; + double Kn = r_Kn.val; + double Knm1 = r_Knm1.val; + int n; + + for(n=nmin+1; n<=nmax+1; n++) { + if(Knm1 < GSL_DBL_MAX) { + result_array[n-1-nmin] = Knm1; + Knp1 = Knm1 + n * two_over_x * Kn; + Knm1 = Kn; + Kn = Knp1; + } + else { + /* Overflow. Set the rest of the elements to + * zero and bug out. + * FIXME: Note: this relies on the convention + * that the test x < DBL_MIN fails for x not + * a number. This may be only an IEEE convention, + * so the portability is unclear. + */ + int j; + for(j=n; j<=nmax+1; j++) result_array[j-1-nmin] = 0.0; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + } + + return stat; + } +} + + +int +gsl_sf_bessel_Kn_array(const int nmin, const int nmax, const double x, double * result_array) +{ + int status = gsl_sf_bessel_Kn_scaled_array(nmin, nmax, x, result_array); + double ex = exp(-x); + int i; + for(i=0; i<=nmax-nmin; i++) result_array[i] *= ex; + return status; +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Kn_scaled(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Kn_scaled_e(n, x, &result)); +} + +double gsl_sf_bessel_Kn(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Kn_e(n, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Knu.c b/software/gsl-1.15/specfunc/bessel_Knu.c new file mode 100644 index 000000000..8d2642d92 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Knu.c @@ -0,0 +1,189 @@ +/* specfunc/bessel_Knu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_temme.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_bessel_Knu_scaled_e(const double nu, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu < 0.0) { + DOMAIN_ERROR(result); + } + else { + gsl_sf_result_e10 result_e10; + int status = gsl_sf_bessel_Knu_scaled_e10_e(nu, x, &result_e10); + int status2 = gsl_sf_result_smash_e(&result_e10, result); + return GSL_ERROR_SELECT_2(status, status2); + } +} + +int +gsl_sf_bessel_Knu_scaled_e10_e(const double nu, const double x, gsl_sf_result_e10 * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu < 0.0) { + DOMAIN_ERROR_E10(result); + } + else { + int N = (int)(nu + 0.5); + double mu = nu - N; /* -1/2 <= mu <= 1/2 */ + double K_mu, K_mup1, Kp_mu; + double K_nu, K_nup1, K_num1; + int n, e10 = 0; + + if(x < 2.0) { + gsl_sf_bessel_K_scaled_temme(mu, x, &K_mu, &K_mup1, &Kp_mu); + } + else { + gsl_sf_bessel_K_scaled_steed_temme_CF2(mu, x, &K_mu, &K_mup1, &Kp_mu); + } + + /* recurse forward to obtain K_num1, K_nu */ + K_nu = K_mu; + K_nup1 = K_mup1; + + for(n=0; n GSL_SQRT_DBL_MAX) { + double p = floor(log(fabs(K_nu))/M_LN10); + double factor = pow(10.0, p); + K_num1 /= factor; + K_nu /= factor; + e10 += p; + }; + K_nup1 = 2.0*(mu+n+1)/x * K_nu + K_num1; + } + + result->val = K_nu; + result->err = 2.0 * GSL_DBL_EPSILON * (N + 4.0) * fabs(result->val); + result->e10 = e10; + return GSL_SUCCESS; + } +} + + +int +gsl_sf_bessel_Knu_e(const double nu, const double x, gsl_sf_result * result) +{ + gsl_sf_result b; + int stat_K = gsl_sf_bessel_Knu_scaled_e(nu, x, &b); + int stat_e = gsl_sf_exp_mult_err_e(-x, 0.0, b.val, b.err, result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); +} + + +int +gsl_sf_bessel_lnKnu_e(const double nu, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu < 0.0) { + DOMAIN_ERROR(result); + } + else if(nu == 0.0) { + gsl_sf_result K_scaled; + /* This cannot underflow, and + * it will not throw GSL_EDOM + * since that is already checked. + */ + gsl_sf_bessel_K0_scaled_e(x, &K_scaled); + result->val = -x + log(fabs(K_scaled.val)); + result->err = GSL_DBL_EPSILON * fabs(x) + fabs(K_scaled.err/K_scaled.val); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 2.0 && nu > 1.0) { + /* Make use of the inequality + * Knu(x) <= 1/2 (2/x)^nu Gamma(nu), + * which follows from the integral representation + * [Abramowitz+Stegun, 9.6.23 (2)]. With this + * we decide whether or not there is an overflow + * problem because x is small. + */ + double ln_bound; + gsl_sf_result lg_nu; + gsl_sf_lngamma_e(nu, &lg_nu); + ln_bound = -M_LN2 - nu*log(0.5*x) + lg_nu.val; + if(ln_bound > GSL_LOG_DBL_MAX - 20.0) { + /* x must be very small or nu very large (or both). + */ + double xi = 0.25*x*x; + double sum = 1.0 - xi/(nu-1.0); + if(nu > 2.0) sum += (xi/(nu-1.0)) * (xi/(nu-2.0)); + result->val = ln_bound + log(sum); + result->err = lg_nu.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + /* can drop-through here */ + } + + + { + /* We passed the above tests, so no problem. + * Evaluate as usual. Note the possible drop-through + * in the above code! + */ + gsl_sf_result_e10 K_scaled; + int status = gsl_sf_bessel_Knu_scaled_e10_e(nu, x, &K_scaled); + result->val = -x + log(fabs(K_scaled.val)) + K_scaled.e10 * M_LN10; + result->err = GSL_DBL_EPSILON * fabs(x) + fabs(K_scaled.err/K_scaled.val); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return status; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Knu_scaled(const double nu, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Knu_scaled_e(nu, x, &result)); +} + +double gsl_sf_bessel_Knu(const double nu, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Knu_e(nu, x, &result)); +} + +double gsl_sf_bessel_lnKnu(const double nu, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_lnKnu_e(nu, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Y0.c b/software/gsl-1.15/specfunc/bessel_Y0.c new file mode 100644 index 000000000..f4b467364 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Y0.c @@ -0,0 +1,122 @@ +/* specfunc/bessel_Y0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_amp_phase.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC besy0, 1980 version, w. fullerton */ + +/* chebyshev expansions + + series for by0 on the interval 0. to 1.60000d+01 + with weighted error 1.20e-17 + log weighted error 16.92 + significant figures required 16.15 + decimal places required 17.48 +*/ + +static double by0_data[13] = { + -0.011277839392865573, + -0.128345237560420350, + -0.104378847997942490, + 0.023662749183969695, + -0.002090391647700486, + 0.000103975453939057, + -0.000003369747162423, + 0.000000077293842676, + -0.000000001324976772, + 0.000000000017648232, + -0.000000000000188105, + 0.000000000000001641, + -0.000000000000000011 +}; +static cheb_series by0_cs = { + by0_data, + 12, + -1, 1, + 8 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_Y0_e(const double x, gsl_sf_result * result) +{ + const double two_over_pi = 2.0/M_PI; + const double xmax = 1.0/GSL_DBL_EPSILON; + + /* CHECK_POINTER(result) */ + + if (x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 4.0) { + gsl_sf_result J0; + gsl_sf_result c; + int stat_J0 = gsl_sf_bessel_J0_e(x, &J0); + cheb_eval_e(&by0_cs, 0.125*x*x-1.0, &c); + result->val = two_over_pi*(-M_LN2 + log(x))*J0.val + 0.375 + c.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + c.err; + return stat_J0; + } + else if(x < xmax) { + /* Leading behaviour of phase is x, which is exact, + * so the error is bounded. + */ + const double z = 32.0/(x*x) - 1.0; + gsl_sf_result c1; + gsl_sf_result c2; + gsl_sf_result sp; + const int stat_c1 = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bm0_cs, z, &c1); + const int stat_c2 = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bth0_cs, z, &c2); + const int stat_sp = gsl_sf_bessel_sin_pi4_e(x, c2.val/x, &sp); + const double sqrtx = sqrt(x); + const double ampl = (0.75 + c1.val) / sqrtx; + result->val = ampl * sp.val; + result->err = fabs(sp.val) * c1.err/sqrtx + fabs(ampl) * sp.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_sp, stat_c1, stat_c2); + } + else { + UNDERFLOW_ERROR(result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Y0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Y0_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Y1.c b/software/gsl-1.15/specfunc/bessel_Y1.c new file mode 100644 index 000000000..41bb743e9 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Y1.c @@ -0,0 +1,137 @@ +/* specfunc/bessel_Y1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_amp_phase.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC besy1, 1977 version, w. fullerton */ + +/* chebyshev expansions + + series for by1 on the interval 0. to 1.60000d+01 + with weighted error 1.87e-18 + log weighted error 17.73 + significant figures required 17.83 + decimal places required 18.30 +*/ + +static double by1_data[14] = { + 0.03208047100611908629, + 1.262707897433500450, + 0.00649996189992317500, + -0.08936164528860504117, + 0.01325088122175709545, + -0.00089790591196483523, + 0.00003647361487958306, + -0.00000100137438166600, + 0.00000001994539657390, + -0.00000000030230656018, + 0.00000000000360987815, + -0.00000000000003487488, + 0.00000000000000027838, + -0.00000000000000000186 +}; +static cheb_series by1_cs = { + by1_data, + 13, + -1, 1, + 10 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_Y1_e(const double x, gsl_sf_result * result) +{ + const double two_over_pi = 2.0/M_PI; + const double xmin = 1.571*GSL_DBL_MIN; /*exp ( amax1(alog(r1mach(1)), -alog(r1mach(2)))+.01) */ + const double x_small = 2.0 * GSL_SQRT_DBL_EPSILON; + const double xmax = 1.0/GSL_DBL_EPSILON; + + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < xmin) { + OVERFLOW_ERROR(result); + } + else if(x < x_small) { + const double lnterm = log(0.5*x); + gsl_sf_result J1; + gsl_sf_result c; + int status = gsl_sf_bessel_J1_e(x, &J1); + cheb_eval_e(&by1_cs, -1.0, &c); + result->val = two_over_pi * lnterm * J1.val + (0.5 + c.val)/x; + result->err = fabs(lnterm) * (fabs(GSL_DBL_EPSILON * J1.val) + J1.err) + c.err/x; + return status; + } + else if(x < 4.0) { + const double lnterm = log(0.5*x); + int status; + gsl_sf_result J1; + gsl_sf_result c; + cheb_eval_e(&by1_cs, 0.125*x*x-1.0, &c); + status = gsl_sf_bessel_J1_e(x, &J1); + result->val = two_over_pi * lnterm * J1.val + (0.5 + c.val)/x; + result->err = fabs(lnterm) * (fabs(GSL_DBL_EPSILON * J1.val) + J1.err) + c.err/x; + return status; + } + else if(x < xmax) { + const double z = 32.0/(x*x) - 1.0; + gsl_sf_result ca; + gsl_sf_result ct; + gsl_sf_result cp; + const int stat_ca = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bm1_cs, z, &ca); + const int stat_ct = cheb_eval_e(&_gsl_sf_bessel_amp_phase_bth1_cs, z, &ct); + const int stat_cp = gsl_sf_bessel_cos_pi4_e(x, ct.val/x, &cp); + const double sqrtx = sqrt(x); + const double ampl = (0.75 + ca.val) / sqrtx; + result->val = -ampl * cp.val; + result->err = fabs(cp.val) * ca.err/sqrtx + fabs(ampl) * cp.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_ca, stat_ct, stat_cp); + } + else { + UNDERFLOW_ERROR(result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Y1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Y1_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_Yn.c b/software/gsl-1.15/specfunc/bessel_Yn.c new file mode 100644 index 000000000..3dc1a99b0 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Yn.c @@ -0,0 +1,217 @@ +/* specfunc/bessel_Yn.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_amp_phase.h" +#include "bessel_olver.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* assumes n >= 1 */ +static int bessel_Yn_small_x(const int n, const double x, gsl_sf_result * result) +{ + int k; + double y = 0.25 * x * x; + double ln_x_2 = log(0.5*x); + gsl_sf_result ln_nm1_fact; + double k_term; + double term1, sum1, ln_pre1; + double term2, sum2, pre2; + + gsl_sf_lnfact_e((unsigned int)(n-1), &ln_nm1_fact); + + ln_pre1 = -n*ln_x_2 + ln_nm1_fact.val; + if(ln_pre1 > GSL_LOG_DBL_MAX - 3.0) GSL_ERROR ("error", GSL_EOVRFLW); + + sum1 = 1.0; + k_term = 1.0; + for(k=1; k<=n-1; k++) { + k_term *= y/(k * (n-k)); + sum1 += k_term; + } + term1 = -exp(ln_pre1) * sum1 / M_PI; + + pre2 = -exp(n*ln_x_2) / M_PI; + if(fabs(pre2) > 0.0) { + const int KMAX = 20; + gsl_sf_result psi_n; + gsl_sf_result npk_fact; + double yk = 1.0; + double k_fact = 1.0; + double psi_kp1 = -M_EULER; + double psi_npkp1; + gsl_sf_psi_int_e(n, &psi_n); + gsl_sf_fact_e((unsigned int)n, &npk_fact); + psi_npkp1 = psi_n.val + 1.0/n; + sum2 = (psi_kp1 + psi_npkp1 - 2.0*ln_x_2)/npk_fact.val; + for(k=1; kval = term1 + term2; + result->err = GSL_DBL_EPSILON * (fabs(ln_pre1)*fabs(term1) + fabs(term2)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int +gsl_sf_bessel_Yn_e(int n, const double x, gsl_sf_result * result) +{ + int sign = 1; + + if(n < 0) { + /* reduce to case n >= 0 */ + n = -n; + if(GSL_IS_ODD(n)) sign = -1; + } + + /* CHECK_POINTER(result) */ + + if(n == 0) { + int status = gsl_sf_bessel_Y0_e(x, result); + result->val *= sign; + return status; + } + else if(n == 1) { + int status = gsl_sf_bessel_Y1_e(x, result); + result->val *= sign; + return status; + } + else { + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + if(x < 5.0) { + int status = bessel_Yn_small_x(n, x, result); + result->val *= sign; + return status; + } + else if(GSL_ROOT3_DBL_EPSILON * x > (n*n + 1.0)) { + int status = gsl_sf_bessel_Ynu_asympx_e((double)n, x, result); + result->val *= sign; + return status; + } + else if(n > 50) { + int status = gsl_sf_bessel_Ynu_asymp_Olver_e((double)n, x, result); + result->val *= sign; + return status; + } + else { + double two_over_x = 2.0/x; + gsl_sf_result r_by; + gsl_sf_result r_bym; + int stat_1 = gsl_sf_bessel_Y1_e(x, &r_by); + int stat_0 = gsl_sf_bessel_Y0_e(x, &r_bym); + double bym = r_bym.val; + double by = r_by.val; + double byp; + int j; + + for(j=1; jval = sign * by; + result->err = fabs(result->val) * (fabs(r_by.err/r_by.val) + fabs(r_bym.err/r_bym.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_1, stat_0); + } + } +} + + +int +gsl_sf_bessel_Yn_array(const int nmin, const int nmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(nmin < 0 || nmax < nmin || x <= 0.0) { + int j; + for(j=0; j<=nmax-nmin; j++) result_array[j] = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else { + gsl_sf_result r_Ynm1; + gsl_sf_result r_Yn; + int stat_nm1 = gsl_sf_bessel_Yn_e(nmin, x, &r_Ynm1); + int stat_n = gsl_sf_bessel_Yn_e(nmin+1, x, &r_Yn); + double Ynp1; + double Yn = r_Yn.val; + double Ynm1 = r_Ynm1.val; + int n; + + int stat = GSL_ERROR_SELECT_2(stat_nm1, stat_n); + + if(stat == GSL_SUCCESS) { + for(n=nmin+1; n<=nmax+1; n++) { + result_array[n-nmin-1] = Ynm1; + Ynp1 = -Ynm1 + 2.0*n/x * Yn; + Ynm1 = Yn; + Yn = Ynp1; + } + } + else { + for(n=nmin; n<=nmax; n++) { + result_array[n-nmin] = 0.0; + } + } + + return stat; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Yn(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Yn_e(n, x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/bessel_Ynu.c b/software/gsl-1.15/specfunc/bessel_Ynu.c new file mode 100644 index 000000000..7ecdc5811 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_Ynu.c @@ -0,0 +1,131 @@ +/* specfunc/bessel_Ynu.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_olver.h" +#include "bessel_temme.h" + +/* Perform forward recurrence for Y_nu(x) and Y'_nu(x) + * + * Y_{nu+1} = nu/x Y_nu - Y'_nu + * Y'_{nu+1} = -(nu+1)/x Y_{nu+1} + Y_nu + */ +#if 0 +static +int +bessel_Y_recur(const double nu_min, const double x, const int kmax, + const double Y_start, const double Yp_start, + double * Y_end, double * Yp_end) +{ + double x_inv = 1.0/x; + double nu = nu_min; + double Y_nu = Y_start; + double Yp_nu = Yp_start; + int k; + + for(k=1; k<=kmax; k++) { + double nuox = nu*x_inv; + double Y_nu_save = Y_nu; + Y_nu = -Yp_nu + nuox * Y_nu; + Yp_nu = Y_nu_save - (nuox+x_inv) * Y_nu; + nu += 1.0; + } + *Y_end = Y_nu; + *Yp_end = Yp_nu; + return GSL_SUCCESS; +} +#endif + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_bessel_Ynu_e(double nu, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu < 0.0) { + DOMAIN_ERROR(result); + } + else if(nu > 50.0) { + return gsl_sf_bessel_Ynu_asymp_Olver_e(nu, x, result); + } + else { + /* -1/2 <= mu <= 1/2 */ + int N = (int)(nu + 0.5); + double mu = nu - N; + + gsl_sf_result Y_mu, Y_mup1; + int stat_mu; + double Ynm1; + double Yn; + double Ynp1; + int n; + + if(x < 2.0) { + /* Determine Ymu, Ymup1 directly. This is really + * an optimization since this case could as well + * be handled by a call to gsl_sf_bessel_JY_mu_restricted(), + * as below. + */ + stat_mu = gsl_sf_bessel_Y_temme(mu, x, &Y_mu, &Y_mup1); + } + else { + /* Determine Ymu, Ymup1 and Jmu, Jmup1. + */ + gsl_sf_result J_mu, J_mup1; + stat_mu = gsl_sf_bessel_JY_mu_restricted(mu, x, &J_mu, &J_mup1, &Y_mu, &Y_mup1); + } + + /* Forward recursion to get Ynu, Ynup1. + */ + Ynm1 = Y_mu.val; + Yn = Y_mup1.val; + for(n=1; n<=N; n++) { + Ynp1 = 2.0*(mu+n)/x * Yn - Ynm1; + Ynm1 = Yn; + Yn = Ynp1; + } + + result->val = Ynm1; /* Y_nu */ + result->err = (N + 1.0) * fabs(Ynm1) * (fabs(Y_mu.err/Y_mu.val) + fabs(Y_mup1.err/Y_mup1.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(Ynm1); + + return stat_mu; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_Ynu(const double nu, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_Ynu_e(nu, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/bessel_amp_phase.c b/software/gsl-1.15/specfunc/bessel_amp_phase.c new file mode 100644 index 000000000..43b6940dc --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_amp_phase.c @@ -0,0 +1,188 @@ +/* specfunc/bessel_amp_phase.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include + +#include +#include +#include +#include "bessel_amp_phase.h" + +/* chebyshev expansions for amplitude and phase + functions used in bessel evaluations + + These are the same for J0,Y0 and for J1,Y1, so + they sit outside those functions. +*/ + +static double bm0_data[21] = { + 0.09284961637381644, + -0.00142987707403484, + 0.00002830579271257, + -0.00000143300611424, + 0.00000012028628046, + -0.00000001397113013, + 0.00000000204076188, + -0.00000000035399669, + 0.00000000007024759, + -0.00000000001554107, + 0.00000000000376226, + -0.00000000000098282, + 0.00000000000027408, + -0.00000000000008091, + 0.00000000000002511, + -0.00000000000000814, + 0.00000000000000275, + -0.00000000000000096, + 0.00000000000000034, + -0.00000000000000012, + 0.00000000000000004 +}; +const cheb_series _gsl_sf_bessel_amp_phase_bm0_cs = { + bm0_data, + 20, + -1, 1, + 10 +}; + +static double bth0_data[24] = { + -0.24639163774300119, + 0.001737098307508963, + -0.000062183633402968, + 0.000004368050165742, + -0.000000456093019869, + 0.000000062197400101, + -0.000000010300442889, + 0.000000001979526776, + -0.000000000428198396, + 0.000000000102035840, + -0.000000000026363898, + 0.000000000007297935, + -0.000000000002144188, + 0.000000000000663693, + -0.000000000000215126, + 0.000000000000072659, + -0.000000000000025465, + 0.000000000000009229, + -0.000000000000003448, + 0.000000000000001325, + -0.000000000000000522, + 0.000000000000000210, + -0.000000000000000087, + 0.000000000000000036 +}; +const cheb_series _gsl_sf_bessel_amp_phase_bth0_cs = { + bth0_data, + 23, + -1, 1, + 12 +}; + + +static double bm1_data[21] = { + 0.1047362510931285, + 0.00442443893702345, + -0.00005661639504035, + 0.00000231349417339, + -0.00000017377182007, + 0.00000001893209930, + -0.00000000265416023, + 0.00000000044740209, + -0.00000000008691795, + 0.00000000001891492, + -0.00000000000451884, + 0.00000000000116765, + -0.00000000000032265, + 0.00000000000009450, + -0.00000000000002913, + 0.00000000000000939, + -0.00000000000000315, + 0.00000000000000109, + -0.00000000000000039, + 0.00000000000000014, + -0.00000000000000005, +}; +const cheb_series _gsl_sf_bessel_amp_phase_bm1_cs = { + bm1_data, + 20, + -1, 1, + 10 +}; + +static double bth1_data[24] = { + 0.74060141026313850, + -0.004571755659637690, + 0.000119818510964326, + -0.000006964561891648, + 0.000000655495621447, + -0.000000084066228945, + 0.000000013376886564, + -0.000000002499565654, + 0.000000000529495100, + -0.000000000124135944, + 0.000000000031656485, + -0.000000000008668640, + 0.000000000002523758, + -0.000000000000775085, + 0.000000000000249527, + -0.000000000000083773, + 0.000000000000029205, + -0.000000000000010534, + 0.000000000000003919, + -0.000000000000001500, + 0.000000000000000589, + -0.000000000000000237, + 0.000000000000000097, + -0.000000000000000040, +}; +const cheb_series _gsl_sf_bessel_amp_phase_bth1_cs = { + bth1_data, + 23, + -1, 1, + 12 +}; + + +int +gsl_sf_bessel_asymp_Mnu_e(const double nu, const double x, double * result) +{ + const double r = 2.0*nu/x; + const double r2 = r*r; + const double x2 = x*x; + const double term1 = (r2-1.0/x2)/8.0; + const double term2 = (r2-1.0/x2)*(r2-9.0/x2)*3.0/128.0; + const double Mnu2_c = 2.0/(M_PI) * (1.0 + term1 + term2); + *result = sqrt(Mnu2_c)/sqrt(x); /* will never underflow this way */ + return GSL_SUCCESS; +} + + +int +gsl_sf_bessel_asymp_thetanu_corr_e(const double nu, const double x, double * result) +{ + const double r = 2.0*nu/x; + const double r2 = r*r; + const double x2 = x*x; + const double term1 = x*(r2 - 1.0/x2)/8.0; + const double term2 = x*(r2 - 1.0/x2)*(r2 - 25.0/x2)/384.0; + *result = (-0.25*M_PI + term1 + term2); + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/specfunc/bessel_amp_phase.h b/software/gsl-1.15/specfunc/bessel_amp_phase.h new file mode 100644 index 000000000..189d88660 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_amp_phase.h @@ -0,0 +1,45 @@ +/* specfunc/bessel_amp_phase.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef _BESSEL_AMP_PHASE_H_ +#define _BESSEL_AMP_PHASE_H_ + + +#include "chebyshev.h" + +extern const cheb_series _gsl_sf_bessel_amp_phase_bm0_cs; +extern const cheb_series _gsl_sf_bessel_amp_phase_bth0_cs; + +extern const cheb_series _gsl_sf_bessel_amp_phase_bm1_cs; +extern const cheb_series _gsl_sf_bessel_amp_phase_bth1_cs; + + +/* large argument expansions [Abramowitz+Stegun, 9.2.28-29] + * + * thetanu_corr = thetanu - x + 1/2 nu Pi + * + * assumes x > 0 + */ +int gsl_sf_bessel_asymp_Mnu_e(const double nu, const double x, double * result); +int gsl_sf_bessel_asymp_thetanu_corr_e(const double nu, const double x, double * result); /* w/o x term */ + + +#endif /* !_BESSEL_AMP_PHASE_H_ */ diff --git a/software/gsl-1.15/specfunc/bessel_i.c b/software/gsl-1.15/specfunc/bessel_i.c new file mode 100644 index 000000000..e888e3a53 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_i.c @@ -0,0 +1,329 @@ +/* specfunc/bessel_i.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" + + +/* i_{l+1}/i_l + */ +static +int +bessel_il_CF1(const int l, const double x, const double threshold, double * ratio) +{ + const int kmax = 2000; + double tk = 1.0; + double sum = 1.0; + double rhok = 0.0; + int k; + + for(k=1; k<=kmax; k++) { + double ak = (x/(2.0*l+1.0+2.0*k)) * (x/(2.0*l+3.0+2.0*k)); + rhok = -ak*(1.0 + rhok)/(1.0 + ak*(1.0 + rhok)); + tk *= rhok; + sum += tk; + if(fabs(tk/sum) < threshold) break; + } + + *ratio = x/(2.0*l+3.0) * sum; + + if(k == kmax) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_i0_scaled_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 0.2) { + const double eax = exp(-ax); + const double y = ax*ax; + const double c1 = 1.0/6.0; + const double c2 = 1.0/120.0; + const double c3 = 1.0/5040.0; + const double c4 = 1.0/362880.0; + const double c5 = 1.0/39916800.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*c5)))); + result->val = eax * sum; + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + } + else if(ax < -0.5*GSL_LOG_DBL_EPSILON) { + result->val = (1.0 - exp(-2.0*ax))/(2.0*ax); + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + } + else { + result->val = 1.0/(2.0*ax); + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + } + return GSL_SUCCESS; +} + + +int gsl_sf_bessel_i1_scaled_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 3.0*GSL_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(ax < 0.25) { + const double eax = exp(-ax); + const double y = x*x; + const double c1 = 1.0/10.0; + const double c2 = 1.0/280.0; + const double c3 = 1.0/15120.0; + const double c4 = 1.0/1330560.0; + const double c5 = 1.0/172972800.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*c5)))); + result->val = eax * x/3.0 * sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double ex = exp(-2.0*ax); + result->val = 0.5 * (ax*(1.0+ex) - (1.0-ex)) / (ax*ax); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if(x < 0.0) result->val = -result->val; + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_i2_scaled_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 4.0*GSL_SQRT_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(ax < 0.25) { + const double y = x*x; + const double c1 = 1.0/14.0; + const double c2 = 1.0/504.0; + const double c3 = 1.0/33264.0; + const double c4 = 1.0/3459456.0; + const double c5 = 1.0/518918400.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*c5)))); + const double pre = exp(-ax) * x*x/15.0; + result->val = pre * sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double ex = exp(-2.0*ax); + double x2 = x*x; + result->val = 0.5 * ((3.0+x2)*(1.0-ex) - 3.0*ax*(1.0+ex))/(ax*ax*ax); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_il_scaled_e(const int l, double x, gsl_sf_result * result) +{ + double sgn = 1.0; + double ax = fabs(x); + + if(x < 0.0) { + /* i_l(-x) = (-1)^l i_l(x) */ + sgn = ( GSL_IS_ODD(l) ? -1.0 : 1.0 ); + x = -x; + } + + if(l < 0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = ( l == 0 ? 1.0 : 0.0 ); + result->err = 0.0; + return GSL_SUCCESS; + } + else if(l == 0) { + gsl_sf_result il; + int stat_il = gsl_sf_bessel_i0_scaled_e(x, &il); + result->val = sgn * il.val; + result->err = il.err; + return stat_il; + } + else if(l == 1) { + gsl_sf_result il; + int stat_il = gsl_sf_bessel_i1_scaled_e(x, &il); + result->val = sgn * il.val; + result->err = il.err; + return stat_il; + } + else if(l == 2) { + gsl_sf_result il; + int stat_il = gsl_sf_bessel_i2_scaled_e(x, &il); + result->val = sgn * il.val; + result->err = il.err; + return stat_il; + } + else if(x*x < 10.0*(l+1.5)/M_E) { + gsl_sf_result b; + int stat = gsl_sf_bessel_IJ_taylor_e(l+0.5, x, 1, 50, GSL_DBL_EPSILON, &b); + double pre = exp(-ax) * sqrt((0.5*M_PI)/x); + result->val = sgn * pre * b.val; + result->err = pre * b.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat; + } + else if(l < 150) { + gsl_sf_result i0_scaled; + int stat_i0 = gsl_sf_bessel_i0_scaled_e(ax, &i0_scaled); + double rat; + int stat_CF1 = bessel_il_CF1(l, ax, GSL_DBL_EPSILON, &rat); + double iellp1 = rat * GSL_SQRT_DBL_MIN; + double iell = GSL_SQRT_DBL_MIN; + double iellm1; + int ell; + for(ell = l; ell >= 1; ell--) { + iellm1 = iellp1 + (2*ell + 1)/x * iell; + iellp1 = iell; + iell = iellm1; + } + result->val = sgn * i0_scaled.val * (GSL_SQRT_DBL_MIN / iell); + result->err = i0_scaled.err * (GSL_SQRT_DBL_MIN / iell); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_i0, stat_CF1); + } + else if(GSL_MIN(0.29/(l*l+1.0), 0.5/(l*l+1.0+x*x)) < 0.5*GSL_ROOT3_DBL_EPSILON) { + int status = gsl_sf_bessel_Inu_scaled_asymp_unif_e(l + 0.5, x, result); + double pre = sqrt((0.5*M_PI)/x); + result->val *= sgn * pre; + result->err *= pre; + return status; + } + else { + /* recurse down from safe values */ + double rt_term = sqrt((0.5*M_PI)/x); + const int LMAX = 2 + (int) (1.2 / GSL_ROOT6_DBL_EPSILON); + gsl_sf_result r_iellp1; + gsl_sf_result r_iell; + int stat_a1 = gsl_sf_bessel_Inu_scaled_asymp_unif_e(LMAX + 1 + 0.5, x, &r_iellp1); + int stat_a2 = gsl_sf_bessel_Inu_scaled_asymp_unif_e(LMAX + 0.5, x, &r_iell); + double iellp1 = r_iellp1.val; + double iell = r_iell.val; + double iellm1 = 0.0; + int ell; + iellp1 *= rt_term; + iell *= rt_term; + for(ell = LMAX; ell >= l+1; ell--) { + iellm1 = iellp1 + (2*ell + 1)/x * iell; + iellp1 = iell; + iell = iellm1; + } + result->val = sgn * iellm1; + result->err = fabs(result->val)*(GSL_DBL_EPSILON + fabs(r_iellp1.err/r_iellp1.val) + fabs(r_iell.err/r_iell.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_a1, stat_a2); + } +} + + +int gsl_sf_bessel_il_scaled_array(const int lmax, const double x, double * result_array) +{ + if(x == 0.0) { + int ell; + result_array[0] = 1.0; + for (ell = lmax; ell >= 1; ell--) { + result_array[ell] = 0.0; + }; + return GSL_SUCCESS; + } else { + int ell; + gsl_sf_result r_iellp1; + gsl_sf_result r_iell; + int stat_0 = gsl_sf_bessel_il_scaled_e(lmax+1, x, &r_iellp1); + int stat_1 = gsl_sf_bessel_il_scaled_e(lmax, x, &r_iell); + double iellp1 = r_iellp1.val; + double iell = r_iell.val; + double iellm1; + result_array[lmax] = iell; + for(ell = lmax; ell >= 1; ell--) { + iellm1 = iellp1 + (2*ell + 1)/x * iell; + iellp1 = iell; + iell = iellm1; + result_array[ell-1] = iellm1; + } + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_i0_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_i0_scaled_e(x, &result)); +} + +double gsl_sf_bessel_i1_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_i1_scaled_e(x, &result)); +} + +double gsl_sf_bessel_i2_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_i2_scaled_e(x, &result)); +} + +double gsl_sf_bessel_il_scaled(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_il_scaled_e(l, x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/bessel_j.c b/software/gsl-1.15/specfunc/bessel_j.c new file mode 100644 index 000000000..d369fdada --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_j.c @@ -0,0 +1,396 @@ +/* specfunc/bessel_j.c + * + * Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_olver.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_j0_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(ax < 0.5) { + const double y = x*x; + const double c1 = -1.0/6.0; + const double c2 = 1.0/120.0; + const double c3 = -1.0/5040.0; + const double c4 = 1.0/362880.0; + const double c5 = -1.0/39916800.0; + const double c6 = 1.0/6227020800.0; + result->val = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*c6))))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result sin_result; + const int stat = gsl_sf_sin_e(x, &sin_result); + result->val = sin_result.val/x; + result->err = fabs(sin_result.err/x); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat; + } +} + + +int gsl_sf_bessel_j1_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 3.1*GSL_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(ax < 0.25) { + const double y = x*x; + const double c1 = -1.0/10.0; + const double c2 = 1.0/280.0; + const double c3 = -1.0/15120.0; + const double c4 = 1.0/1330560.0; + const double c5 = -1.0/172972800.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*c5)))); + result->val = x/3.0 * sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result cos_result; + gsl_sf_result sin_result; + const int stat_cos = gsl_sf_cos_e(x, &cos_result); + const int stat_sin = gsl_sf_sin_e(x, &sin_result); + const double cos_x = cos_result.val; + const double sin_x = sin_result.val; + result->val = (sin_x/x - cos_x)/x; + result->err = (fabs(sin_result.err/x) + fabs(cos_result.err))/fabs(x); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(sin_x/(x*x)) + fabs(cos_x/x)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_cos, stat_sin); + } +} + + +int gsl_sf_bessel_j2_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax < 4.0*GSL_SQRT_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(ax < 1.3) { + const double y = x*x; + const double c1 = -1.0/14.0; + const double c2 = 1.0/504.0; + const double c3 = -1.0/33264.0; + const double c4 = 1.0/3459456.0; + const double c5 = -1.0/518918400; + const double c6 = 1.0/105859353600.0; + const double c7 = -1.0/28158588057600.0; + const double c8 = 1.0/9461285587353600.0; + const double c9 = -1.0/3916972233164390400.0; + const double sum = 1.0+y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*(c6+y*(c7+y*(c8+y*c9)))))))); + result->val = y/15.0 * sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result cos_result; + gsl_sf_result sin_result; + const int stat_cos = gsl_sf_cos_e(x, &cos_result); + const int stat_sin = gsl_sf_sin_e(x, &sin_result); + const double cos_x = cos_result.val; + const double sin_x = sin_result.val; + const double f = (3.0/(x*x) - 1.0); + result->val = (f * sin_x - 3.0*cos_x/x)/x; + result->err = fabs(f * sin_result.err/x) + fabs((3.0*cos_result.err/x)/x); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(f*sin_x/x) + 3.0*fabs(cos_x/(x*x))); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_cos, stat_sin); + } +} + + +int +gsl_sf_bessel_jl_e(const int l, const double x, gsl_sf_result * result) +{ + if(l < 0 || x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = ( l > 0 ? 0.0 : 1.0 ); + result->err = 0.0; + return GSL_SUCCESS; + } + else if(l == 0) { + return gsl_sf_bessel_j0_e(x, result); + } + else if(l == 1) { + return gsl_sf_bessel_j1_e(x, result); + } + else if(l == 2) { + return gsl_sf_bessel_j2_e(x, result); + } + else if(x*x < 10.0*(l+0.5)/M_E) { + gsl_sf_result b; + int status = gsl_sf_bessel_IJ_taylor_e(l+0.5, x, -1, 50, GSL_DBL_EPSILON, &b); + double pre = sqrt((0.5*M_PI)/x); + result->val = pre * b.val; + result->err = pre * b.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return status; + } + else if(GSL_ROOT4_DBL_EPSILON * x > (l*l + l + 1.0)) { + gsl_sf_result b; + int status = gsl_sf_bessel_Jnu_asympx_e(l + 0.5, x, &b); + double pre = sqrt((0.5*M_PI)/x); + result->val = pre * b.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + pre * b.err; + return status; + } + else if(l > 1.0/GSL_ROOT6_DBL_EPSILON) { + gsl_sf_result b; + int status = gsl_sf_bessel_Jnu_asymp_Olver_e(l + 0.5, x, &b); + double pre = sqrt((0.5*M_PI)/x); + result->val = pre * b.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + pre * b.err; + return status; + } + else if(x > 1000.0 && x > l*l) + { + /* We need this path to avoid feeding large x to CF1 below; */ + gsl_sf_result b; + int status = gsl_sf_bessel_Jnu_asympx_e(l + 0.5, x, &b); + double pre = sqrt((0.5*M_PI)/x); + result->val = pre * b.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + pre * b.err; + return status; + } + else { + double sgn; + double ratio; + /* The CF1 call will hit 10000 iterations for x > 10000 + l */ + int stat_CF1 = gsl_sf_bessel_J_CF1(l+0.5, x, &ratio, &sgn); + double jellp1 = GSL_SQRT_DBL_EPSILON * ratio; + double jell = GSL_SQRT_DBL_EPSILON; + double jellm1; + int ell; + for(ell = l; ell > 0; ell--) { + jellm1 = -jellp1 + (2*ell + 1)/x * jell; + jellp1 = jell; + jell = jellm1; + } + + if(fabs(jell) > fabs(jellp1)) { + gsl_sf_result j0_result; + int stat_j0 = gsl_sf_bessel_j0_e(x, &j0_result); + double pre = GSL_SQRT_DBL_EPSILON / jell; + result->val = j0_result.val * pre; + result->err = j0_result.err * fabs(pre); + result->err += 4.0 * GSL_DBL_EPSILON * (0.5*l + 1.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_j0, stat_CF1); + } + else { + gsl_sf_result j1_result; + int stat_j1 = gsl_sf_bessel_j1_e(x, &j1_result); + double pre = GSL_SQRT_DBL_EPSILON / jellp1; + result->val = j1_result.val * pre; + result->err = j1_result.err * fabs(pre); + result->err += 4.0 * GSL_DBL_EPSILON * (0.5*l + 1.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_j1, stat_CF1); + } + } +} + + +int +gsl_sf_bessel_jl_array(const int lmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(lmax < 0 || x < 0.0) { + int j; + for(j=0; j<=lmax; j++) result_array[j] = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else if(x == 0.0) { + int j; + for(j=1; j<=lmax; j++) result_array[j] = 0.0; + result_array[0] = 1.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result r_jellp1; + gsl_sf_result r_jell; + int stat_0 = gsl_sf_bessel_jl_e(lmax+1, x, &r_jellp1); + int stat_1 = gsl_sf_bessel_jl_e(lmax, x, &r_jell); + double jellp1 = r_jellp1.val; + double jell = r_jell.val; + double jellm1; + int ell; + + result_array[lmax] = jell; + for(ell = lmax; ell >= 1; ell--) { + jellm1 = -jellp1 + (2*ell + 1)/x * jell; + jellp1 = jell; + jell = jellm1; + result_array[ell-1] = jellm1; + } + + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } +} + + +int gsl_sf_bessel_jl_steed_array(const int lmax, const double x, double * jl_x) +{ + /* CHECK_POINTER(jl_x) */ + + if(lmax < 0 || x < 0.0) { + int j; + for(j=0; j<=lmax; j++) jl_x[j] = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else if(x == 0.0) { + int j; + for(j=1; j<=lmax; j++) jl_x[j] = 0.0; + jl_x[0] = 1.0; + return GSL_SUCCESS; + } + else if(x < 2.0*GSL_ROOT4_DBL_EPSILON) { + /* first two terms of Taylor series */ + double inv_fact = 1.0; /* 1/(1 3 5 ... (2l+1)) */ + double x_l = 1.0; /* x^l */ + int l; + for(l=0; l<=lmax; l++) { + jl_x[l] = x_l * inv_fact; + jl_x[l] *= 1.0 - 0.5*x*x/(2.0*l+3.0); + inv_fact /= 2.0*l+3.0; + x_l *= x; + } + return GSL_SUCCESS; + } + else { + /* Steed/Barnett algorithm [Comp. Phys. Comm. 21, 297 (1981)] */ + double x_inv = 1.0/x; + double W = 2.0*x_inv; + double F = 1.0; + double FP = (lmax+1.0) * x_inv; + double B = 2.0*FP + x_inv; + double end = B + 20000.0*W; + double D = 1.0/B; + double del = -D; + + FP += del; + + /* continued fraction */ + do { + B += W; + D = 1.0/(B-D); + del *= (B*D - 1.); + FP += del; + if(D < 0.0) F = -F; + if(B > end) { + GSL_ERROR ("error", GSL_EMAXITER); + } + } + while(fabs(del) >= fabs(FP) * GSL_DBL_EPSILON); + + FP *= F; + + if(lmax > 0) { + /* downward recursion */ + double XP2 = FP; + double PL = lmax * x_inv; + int L = lmax; + int LP; + jl_x[lmax] = F; + for(LP = 1; LP<=lmax; LP++) { + jl_x[L-1] = PL * jl_x[L] + XP2; + FP = PL*jl_x[L-1] - jl_x[L]; + XP2 = FP; + PL -= x_inv; + --L; + } + F = jl_x[0]; + } + + /* normalization */ + W = x_inv / hypot(FP, F); + jl_x[0] = W*F; + if(lmax > 0) { + int L; + for(L=1; L<=lmax; L++) { + jl_x[L] *= W; + } + } + + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_j0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_j0_e(x, &result)); +} + +double gsl_sf_bessel_j1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_j1_e(x, &result)); +} + +double gsl_sf_bessel_j2(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_j2_e(x, &result)); +} + +double gsl_sf_bessel_jl(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_jl_e(l, x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/bessel_k.c b/software/gsl-1.15/specfunc/bessel_k.c new file mode 100644 index 000000000..d206c0353 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_k.c @@ -0,0 +1,248 @@ +/* specfunc/bessel_k.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "bessel.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* [Abramowitz+Stegun, 10.2.4 + 10.2.6] + * with lmax=15, precision ~ 15D for x < 3 + * + * assumes l >= 1 + */ +static int bessel_kl_scaled_small_x(int l, const double x, gsl_sf_result * result) +{ + gsl_sf_result num_fact; + double den = gsl_sf_pow_int(x, l+1); + int stat_df = gsl_sf_doublefact_e((unsigned int) (2*l-1), &num_fact); + + if(stat_df != GSL_SUCCESS || den == 0.0) { + OVERFLOW_ERROR(result); + } + else { + const int lmax = 50; + gsl_sf_result ipos_term; + double ineg_term; + double sgn = (GSL_IS_ODD(l) ? -1.0 : 1.0); + double ex = exp(x); + double t = 0.5*x*x; + double sum = 1.0; + double t_coeff = 1.0; + double t_power = 1.0; + double delta; + int stat_il; + int i; + + for(i=1; ival = -sgn * 0.5*M_PI * (ex*ipos_term.val - ineg_term); + result->val *= ex; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_il; + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_bessel_k0_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else { + result->val = M_PI/(2.0*x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_k1_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < (M_SQRTPI+1.0)/(M_SQRT2*GSL_SQRT_DBL_MAX)) { + OVERFLOW_ERROR(result); + } + else { + result->val = M_PI/(2.0*x) * (1.0 + 1.0/x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_k2_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0/GSL_ROOT3_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else { + result->val = M_PI/(2.0*x) * (1.0 + 3.0/x * (1.0 + 1.0/x)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_bessel_kl_scaled_e(int l, const double x, gsl_sf_result * result) +{ + if(l < 0 || x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(l == 0) { + return gsl_sf_bessel_k0_scaled_e(x, result); + } + else if(l == 1) { + return gsl_sf_bessel_k1_scaled_e(x, result); + } + else if(l == 2) { + return gsl_sf_bessel_k2_scaled_e(x, result); + } + else if(x < 3.0) { + return bessel_kl_scaled_small_x(l, x, result); + } + else if(GSL_ROOT3_DBL_EPSILON * x > (l*l + l + 1)) { + int status = gsl_sf_bessel_Knu_scaled_asympx_e(l + 0.5, x, result); + double pre = sqrt((0.5*M_PI)/x); + result->val *= pre; + result->err *= pre; + return status; + } + else if(GSL_MIN(0.29/(l*l+1.0), 0.5/(l*l+1.0+x*x)) < GSL_ROOT3_DBL_EPSILON) { + int status = gsl_sf_bessel_Knu_scaled_asymp_unif_e(l + 0.5, x, result); + double pre = sqrt((0.5*M_PI)/x); + result->val *= pre; + result->err *= pre; + return status; + } + else { + /* recurse upward */ + gsl_sf_result r_bk; + gsl_sf_result r_bkm; + int stat_1 = gsl_sf_bessel_k1_scaled_e(x, &r_bk); + int stat_0 = gsl_sf_bessel_k0_scaled_e(x, &r_bkm); + double bkp; + double bk = r_bk.val; + double bkm = r_bkm.val; + int j; + for(j=1; jval = bk; + result->err = fabs(bk) * (fabs(r_bk.err/r_bk.val) + fabs(r_bkm.err/r_bkm.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_1, stat_0); + } +} + +int +gsl_sf_bessel_kl_scaled_array(const int lmax, const double x, double * result_array) +{ + if(lmax < 0 || x <= 0.0) { + GSL_ERROR("domain error", GSL_EDOM); + } else if (lmax == 0) { + gsl_sf_result result; + int stat = gsl_sf_bessel_k0_scaled_e(x, &result); + result_array[0] = result.val; + return stat; + } else { + int ell; + double kellp1, kell, kellm1; + gsl_sf_result r_kell; + gsl_sf_result r_kellm1; + gsl_sf_bessel_k1_scaled_e(x, &r_kell); + gsl_sf_bessel_k0_scaled_e(x, &r_kellm1); + kell = r_kell.val; + kellm1 = r_kellm1.val; + result_array[0] = kellm1; + result_array[1] = kell; + for(ell = 1; ell < lmax; ell++) { + kellp1 = (2*ell+1)/x * kell + kellm1; + result_array[ell+1] = kellp1; + kellm1 = kell; + kell = kellp1; + } + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_k0_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_k0_scaled_e(x, &result)); +} + +double gsl_sf_bessel_k1_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_k1_scaled_e(x, &result)); +} + +double gsl_sf_bessel_k2_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_k2_scaled_e(x, &result)); +} + +double gsl_sf_bessel_kl_scaled(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_kl_scaled_e(l, x, &result)); +} + + diff --git a/software/gsl-1.15/specfunc/bessel_olver.c b/software/gsl-1.15/specfunc/bessel_olver.c new file mode 100644 index 000000000..949c0987e --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_olver.c @@ -0,0 +1,982 @@ +/* specfunc/bessel_olver.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_olver.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/* fit for f(x) = zofmzeta((x+1)/2), 0 <= mzeta <= 1 */ +static double zofmzeta_a_data[20] = { + 2.9332563730829348990, + 0.4896518224847036624, + 0.0228637617355380860, + -0.0001715731377284693, + -0.0000105927538148751, + 1.0595602530419e-6, + -4.68016051691e-8, + 5.8310020e-12, + 1.766537581e-10, + -1.45034640e-11, + 4.357772e-13, + 4.60971e-14, + -2.57571e-14, + 2.26468e-14, + -2.22053e-14, + 2.08593e-14, + -1.84454e-14, + 1.50150e-14, + -1.06506e-14, + 5.5375e-15 +}; +static cheb_series zofmzeta_a_cs = { + zofmzeta_a_data, + 19, + -1,1, + 8 +}; + + +/* fit for f(x) = zofmzeta((9x+11)/2), 1 <= mzeta <= 10 */ +static double zofmzeta_b_data[30] = { + 22.40725276466303489, + 10.39808258825165581, + 1.092050144486018425, + -0.071111274777921604, + 0.008990125336059704, + -0.001201950338088875, + 0.000106686807968315, + 0.000017406491576830, + -0.000014946669657805, + 6.189984487752e-6, + -2.049466715178e-6, + 5.87189458020e-7, + -1.46077514157e-7, + 2.9803936132e-8, + -3.817692108e-9, + -4.66980416e-10, + 5.83860334e-10, + -2.78825299e-10, + 1.01682688e-10, + -3.1209928e-11, + 8.111122e-12, + -1.663986e-12, + 1.81364e-13, + 5.3414e-14, + -4.7234e-14, + 2.1689e-14, + -7.815e-15, + 2.371e-15, + -6.04e-16, + 1.20e-16 +}; +static cheb_series zofmzeta_b_cs = { + zofmzeta_b_data, + 29, + -1,1, + 15 +}; + + +/* fit for f(x) = zofmzeta(mz(x))/mz(x)^(3/2), + * mz(x) = (2/(x+1))^(2/3) 10 + * 10 <= mzeta <= Inf + */ +static double zofmzeta_c_data[11] = { + 1.3824761227122911500, + 0.0244856101686774245, + -0.0000842866496282540, + 1.4656076569771e-6, + -3.14874099476e-8, + 7.561134833e-10, + -1.94531643e-11, + 5.245878e-13, + -1.46380e-14, + 4.192e-16, + -1.23e-17 +}; +static cheb_series zofmzeta_c_cs = { + zofmzeta_c_data, + 10, + -1,1, + 6 +}; + + +/* Invert [Abramowitz+Stegun, 9.3.39]. + * Assumes minus_zeta >= 0. + */ +double +gsl_sf_bessel_Olver_zofmzeta(double minus_zeta) +{ + if(minus_zeta < 1.0) { + const double x = 2.0*minus_zeta - 1.0; + gsl_sf_result c; + cheb_eval_e(&zofmzeta_a_cs, x, &c); + return c.val; + } + else if(minus_zeta < 10.0) { + const double x = (2.0*minus_zeta - 11.0)/9.0; + gsl_sf_result c; + cheb_eval_e(&zofmzeta_b_cs, x, &c); + return c.val; + } + else { + const double TEN_32 = 31.62277660168379332; /* 10^(3/2) */ + const double p = pow(minus_zeta, 3.0/2.0); + const double x = 2.0*TEN_32/p - 1.0; + gsl_sf_result c; + cheb_eval_e(&zofmzeta_c_cs, x, &c); + return c.val * p; + } +} + + +/* Chebyshev fit for f(x) = z(x)^6 A_3(z(x)), z(x) = 22/(10(x+1)) */ +static double A3_gt1_data[31] = { + -0.123783199829515294670493131190, + 0.104636462534700704670877382304, + -0.067500816575851826744877535903, + 0.035563362418888483652711005520, + -0.0160738524035979408472979609051, + 0.0064497878252851092073278056238, + -0.00235408261133449663958121821593, + 0.00079545702851302155411892534965, + -0.00025214920745855079895784825637, + 0.00007574004596069392921153301833, + -0.00002172917966339623434407978263, + 5.9914810727868915476543145465e-06, + -1.5958781571808992162953719817e-06, + 4.1232986512903717525448312012e-07, + -1.0369725993417659101913919101e-07, + 2.5457982304266541145999235022e-08, + -6.1161715053791743082427422443e-09, + 1.4409346199138658887871461320e-09, + -3.3350445956255561668232014995e-10, + 7.5950686572918996453336138108e-11, + -1.7042296334409430377389900278e-11, + 3.7723525020626230919721640081e-12, + -8.2460237635733980528416501227e-13, + 1.7816961527997797696251868875e-13, + -3.8084101506541792942694560802e-14, + 8.0593669930916099079755351563e-15, + -1.6896565961641739017452636964e-15, + 3.5115651805888443184822853595e-16, + -7.2384771938569255638904297651e-17, + 1.4806598977677176106283840244e-17, + -3.0069285750787303634897997963e-18 +}; +static cheb_series A3_gt1_cs = { + A3_gt1_data, + 30, + -1,1, + 17 +}; + +/* chebyshev expansion for f(x) = z(x)^8 A_4(z(x)), z(x) = 12/(5(x+1)) */ +static double A4_gt1_data[30] = { + 1.15309329391198493586724229008, + -1.01812701728669338904729927846, + 0.71964022270555684403652781941, + -0.42359963977172689685150061355, + 0.215024488759339557817435404261, + -0.096751915348145944032096342479, + 0.039413982058824310099856035361, + -0.014775225692561697963781115014, + 0.005162114514159370516947823271, + -0.00169783446445524322560925166335, + 0.00052995667873006847211519193478, + -0.00015802027574996477115667974856, + 0.000045254366680989687988902825193, + -0.000012503722965474638015488600967, + 3.3457656998119148699124716204e-06, + -8.6981575241150758412492331833e-07, + 2.2030895484325645640823940625e-07, + -5.4493369492600677068285936533e-08, + 1.3190457281724829107139385556e-08, + -3.1301560183377379158951191769e-09, + 7.2937802527123344842593076131e-10, + -1.6712080137945140407348940109e-10, + 3.7700053248213600430503521194e-11, + -8.3824538848817227637828899571e-12, + 1.8388741910049766865274037194e-12, + -3.9835919980753778560117573063e-13, + 8.5288827136546615604290389711e-14, + -1.8060227869114416998653266836e-14, + 3.7849342199690728470461022877e-15, + -7.8552867468122209577151823365e-16 +}; +static cheb_series A4_gt1_cs = { + A4_gt1_data, + 17, /* 29, */ + -1, 1, + 17 +}; + +/* Chebyshev fit for f(x) = z(x)^3 B_2(z(x)), z(x) = 12/(5(x+1)) */ +static double B2_gt1_data[40] = { + 0.00118587147272683864479328868589, + 0.00034820459990648274622193981840, + -0.00030411304425639768103075864567, + 0.00002812066284012343531484682886, + 0.00004493525295901613184489898748, + -0.00003037629997093072196779489677, + 0.00001125979647123875721949743970, + -2.4832533969517775991951008218e-06, + -9.9003813640537799587086928278e-08, + 4.9259859656183110299492296029e-07, + -3.7644120964426705960749504975e-07, + 2.2887828521334625189639122509e-07, + -1.3202687370822203731489855050e-07, + 7.7019669092537400811434860763e-08, + -4.6589706973010511603890144294e-08, + 2.9396476233013923711978522963e-08, + -1.9293230611988282919101954538e-08, + 1.3099107013728717842406906896e-08, + -9.1509111940885962831104149355e-09, + 6.5483472971925614347299375295e-09, + -4.7831253582139967461241674569e-09, + 3.5562625457426178152760148639e-09, + -2.6853389444008414186916562103e-09, + 2.0554738667134200145781857289e-09, + -1.5923172019517426277886522758e-09, + 1.2465923213464381457319481498e-09, + -9.8494846881180588507969988989e-10, + 7.8438674499372126663957464312e-10, + -6.2877567918342950225937136855e-10, + 5.0662318868755257959686944117e-10, + -4.0962270881243451160378710952e-10, + 3.3168684677374908553161911299e-10, + -2.6829406619847450633596163305e-10, + 2.1603988122184568375561077873e-10, + -1.7232373309560278402012124481e-10, + 1.3512709089611470626617830434e-10, + -1.0285354732538663013167579792e-10, + 7.4211345443901713467637018423e-11, + -4.8124980266864320351456993068e-11, + 2.3666534694476306077416831958e-11 +}; +static cheb_series B2_gt1_cs = { + B2_gt1_data, + 39, + -1, 1, + 30 +}; + + +/* Chebyshev fit for f(x) = z(x)^6 B_3(z(x)), z(x) = 12/(5(x+1)) */ +static double B3_gt1_data[30] = { + -0.0102445379362695740863663926486, + 0.0036618484329295342954730801917, + 0.0026154252498599303282569321117, + -0.0036187389410353156728771706336, + 0.0021878564157692275944613452462, + -0.0008219952303590803584426516821, + 0.0001281773889155631494321316520, + 0.0001000944653368032985720548637, + -0.0001288293344663774273453147788, + 0.00010136264202696513867821487205, + -0.00007000275849659556221916572733, + 0.00004694886396757430431607955146, + -0.00003190003869717837686356945696, + 0.00002231453668447775219665947479, + -0.00001611102197712439539300336438, + 0.00001196634424990735214466633513, + -9.0986920398931223804111374679e-06, + 7.0492613694235423068926562567e-06, + -5.5425216624642184684300615394e-06, + 4.4071884714230296614449244106e-06, + -3.5328595506791663127928952625e-06, + 2.84594975572077091520522824686e-06, + -2.29592697828824392391071619788e-06, + 1.84714740375289956396370322228e-06, + -1.47383331248116454652025598620e-06, + 1.15687781098593231076084710267e-06, + -8.8174688524627071175315084910e-07, + 6.3705856964426840441434605593e-07, + -4.1358791499961929237755474814e-07, + 2.0354151158738819867477996807e-07 +}; +static cheb_series B3_gt1_cs = { + B3_gt1_data, + 29, + -1, 1, + 29 +}; + + +/* Chebyshev fit for f(x) = z(x) B_2(z(x)), z(x) = 2(x+1)/5 */ +static double B2_lt1_data[40] = { + 0.00073681565841337130021924199490, + 0.00033803599647571227535304316937, + -0.00008251723219239754024210552679, + -0.00003390879948656432545900779710, + 0.00001961398056848881816694014889, + -2.35593745904151401624656805567e-06, + -1.79055017080406086541563835433e-06, + 1.33129571185610681090725934031e-06, + -5.38879444715436544130673956170e-07, + 1.49603056041381416881299945557e-07, + -1.83377228267274327911131293091e-08, + -1.33191430762944336526965187651e-08, + 1.60642096463700438411396889489e-08, + -1.28932576330421806740136816643e-08, + 9.6169275086179165484403221944e-09, + -7.1818502280703532276832887290e-09, + 5.4744009217215145730697754561e-09, + -4.2680446690508456935030086136e-09, + 3.3941665009266174865683284781e-09, + -2.7440714072221673882163135170e-09, + 2.2488361522108255229193038962e-09, + -1.8638240716608748862087923337e-09, + 1.5592350940805373500866440401e-09, + -1.3145743937732330609242633070e-09, + 1.1153716777215047842790244968e-09, + -9.5117576805266622854647303110e-10, + 8.1428799553234876296804561100e-10, + -6.9893770813548773664326279169e-10, + 6.0073113636087448745018831981e-10, + -5.1627434258513453901420776514e-10, + 4.4290993195074905891788459756e-10, + -3.7852978599966867611179315200e-10, + 3.2143959338863177145307610452e-10, + -2.7025926680620777594992221143e-10, + 2.2384857772457918539228234321e-10, + -1.8125071664276678046551271701e-10, + 1.4164870008713668767293008546e-10, + -1.0433101857132782485813325981e-10, + 6.8663910168392483929411418190e-11, + -3.4068313177952244040559740439e-11 +}; +static cheb_series B2_lt1_cs = { + B2_lt1_data, + 39, + -1, 1, + 39 +}; + + +/* Chebyshev fit for f(x) = B_3(2(x+1)/5) */ +static double B3_lt1_data[40] = { + -0.00137160820526992057354001614451, + -0.00025474937951101049982680561302, + 0.00024762975547895881652073467771, + 0.00005229657281480196749313930265, + -0.00007488354272621512385016593760, + 0.00001416880012891046449980449746, + 0.00001528986060172183690742576230, + -0.00001668672297078590514293325326, + 0.00001061765189536459018739585094, + -5.8220577442406209989680801335e-06, + 3.3322423743855900506302033234e-06, + -2.23292405803003860894449897815e-06, + 1.74816651036678291794777245325e-06, + -1.49581306041395051804547535093e-06, + 1.32759146107893129050610165582e-06, + -1.19376077392564467408373553343e-06, + 1.07878303863211630544654040875e-06, + -9.7743335011819134006676476250e-07, + 8.8729318903693324226127054792e-07, + -8.0671146292125665050876015280e-07, + 7.3432860378667354971042255937e-07, + -6.6897926072697370325310483359e-07, + 6.0966619703735610352576581485e-07, + -5.5554095284507959561958605420e-07, + 5.0588335673197236002812826526e-07, + -4.6008146297767601862670079590e-07, + 4.1761348515688145911438168306e-07, + -3.7803230006989446874174476515e-07, + 3.4095248501364300041684648230e-07, + -3.0603959751354749520615015472e-07, + 2.7300134179365690589640458993e-07, + -2.4158028250762304756044254231e-07, + 2.1154781038298751985689113868e-07, + -1.8269911328756771201465223313e-07, + 1.5484895085808513749026173074e-07, + -1.2782806851555809369226440495e-07, + 1.0148011725394892565174207341e-07, + -7.5658969771439627809239950461e-08, + 5.0226342286491286957075289622e-08, + -2.5049645660259882970547555831e-08 +}; +static cheb_series B3_lt1_cs = { + B3_lt1_data, + 39, + -1, 1, + 39 +}; + + +/* Chebyshev fit for f(x) = A_3(9(x+1)/20) */ +static double A3_lt1_data[40] = { + -0.00017982561472134418587634980117, + -0.00036558603837525275836608884064, + -0.00002819398055929628850294406363, + 0.00016704539863875736769812786067, + -0.00007098969970347674307623044850, + -8.4470843942344237748899879940e-06, + 0.0000273413090343147765148014327150, + -0.0000199073838489821681991178018081, + 0.0000100004176278235088881096950105, + -3.9739852013143676487867902026e-06, + 1.2265357766449574306882693267e-06, + -1.88755584306424047416914864854e-07, + -1.37482206060161206336523452036e-07, + 2.10326379301853336795686477738e-07, + -2.05583778245412633433934301948e-07, + 1.82377384812654863038691147988e-07, + -1.58130247846381041027699152436e-07, + 1.36966982725588978654041029615e-07, + -1.19250280944620257443805710485e-07, + 1.04477169029350256435316644493e-07, + -9.2064832489437534542041040184e-08, + 8.1523798290458784610230199344e-08, + -7.2471794980050867512294061891e-08, + 6.4614432955971132569968860233e-08, + -5.7724095125560946811081322985e-08, + 5.1623107567436835158110947901e-08, + -4.6171250746798606260216486042e-08, + 4.1256621998650164023254101585e-08, + -3.6788925543159819135102047082e-08, + 3.2694499457951844422299750661e-08, + -2.89125899697964696586521743928e-08, + 2.53925288725374047626589488217e-08, + -2.20915707933726481321465184207e-08, + 1.89732166352720474944407102940e-08, + -1.60058977893259856012119939554e-08, + 1.31619294542205876946742394494e-08, + -1.04166651771938038563454275883e-08, + 7.7478015858156185064152078434e-09, + -5.1347942579352613057675111787e-09, + 2.5583541594586723967261504321e-09 +}; +static cheb_series A3_lt1_cs = { + A3_lt1_data, + 39, + -1, 1, + 39 +}; + +/* chebyshev fit for f(x) = A_4(2(x+1)/5) */ +static double A4_lt1_data[30] = { + 0.00009054703770051610946958226736, + 0.00033066000498098017589672988293, + 0.00019737453734363989127226073272, + -0.00015490809725932037720034762889, + -0.00004514948935538730085479280454, + 0.00007976881782603940889444573924, + -0.00003314566154544740986264993251, + -1.88212148790135672249935711657e-06, + 0.0000114788756505519986352882940648, + -9.2263039911196207101468331210e-06, + 5.1401128250377780476084336340e-06, + -2.38418218951722002658891397905e-06, + 1.00664292214481531598338960828e-06, + -4.23224678096490060264249970540e-07, + 2.00132031535793489976535190025e-07, + -1.18689501178886741400633921047e-07, + 8.7819524319114212999768013738e-08, + -7.3964150324206644900787216386e-08, + 6.5780431507637165113885884236e-08, + -5.9651053193022652369837650411e-08, + 5.4447762662767276209052293773e-08, + -4.9802057381568863702541294988e-08, + 4.5571368194694340198117635845e-08, + -4.1682117173547642845382848197e-08, + 3.8084701352766049815367147717e-08, + -3.4740302885185237434662649907e-08, + 3.1616557064701510611273692060e-08, + -2.8685739487689556252374879267e-08, + 2.5923752117132254429002796600e-08, + -2.3309428552190587304662883477e-08 +}; +static cheb_series A4_lt1_cs = { + A4_lt1_data, + 29, + -1, 1, + 29 +}; + + +static double olver_B0(double z, double abs_zeta) +{ + if(z < 0.98) { + const double t = 1.0/sqrt(1.0-z*z); + return -5.0/(48.0*abs_zeta*abs_zeta) + t*(-3.0 + 5.0*t*t)/(24.0*sqrt(abs_zeta)); + } + else if(z < 1.02) { + const double a = 1.0-z; + const double c0 = 0.0179988721413553309252458658183; + const double c1 = 0.0111992982212877614645974276203; + const double c2 = 0.0059404069786014304317781160605; + const double c3 = 0.0028676724516390040844556450173; + const double c4 = 0.0012339189052567271708525111185; + const double c5 = 0.0004169250674535178764734660248; + const double c6 = 0.0000330173385085949806952777365; + const double c7 = -0.0001318076238578203009990106425; + const double c8 = -0.0001906870370050847239813945647; + return c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*(c6 + a*(c7 + a*c8))))))); + } + else { + const double t = 1.0/(z*sqrt(1.0 - 1.0/(z*z))); + return -5.0/(48.0*abs_zeta*abs_zeta) + t*(3.0 + 5.0*t*t)/(24.0*sqrt(abs_zeta)); + } +} + + +static double olver_B1(double z, double abs_zeta) +{ + if(z < 0.88) { + const double t = 1.0/sqrt(1.0-z*z); + const double t2 = t*t; + const double rz = sqrt(abs_zeta); + const double z32 = rz*rz*rz; + const double z92 = z32*z32*z32; + const double term1 = t*t*t * (30375.0 - 369603.0*t2 + 765765.0*t2*t2 - 425425.0*t2*t2*t2)/414720.0; + const double term2 = 85085.0/(663552.0*z92); + const double term3 = 385.0/110592.*t*(3.0-5.0*t2)/(abs_zeta*abs_zeta*abs_zeta); + const double term4 = 5.0/55296.0*t2*(81.0 - 462.0*t2 + 385.0*t2*t2)/z32; + return -(term1 + term2 + term3 + term4)/rz; + } + else if(z < 1.12) { + const double a = 1.0-z; + const double c0 = -0.00149282953213429172050073403334; + const double c1 = -0.00175640941909277865678308358128; + const double c2 = -0.00113346148874174912576929663517; + const double c3 = -0.00034691090981382974689396961817; + const double c4 = 0.00022752516104839243675693256916; + const double c5 = 0.00051764145724244846447294636552; + const double c6 = 0.00058906174858194233998714243010; + const double c7 = 0.00053485514521888073087240392846; + const double c8 = 0.00042891792986220150647633418796; + const double c9 = 0.00031639765900613633260381972850; + const double c10 = 0.00021908147678699592975840749194; + return c0+a*(c1+a*(c2+a*(c3+a*(c4+a*(c5+a*(c6+a*(c7+a*(c8+a*(c9+a*c10))))))))); + } + else { + const double t = 1.0/(z*sqrt(1.0 - 1.0/(z*z))); + const double t2 = t*t; + const double rz = sqrt(abs_zeta); + const double z32 = rz*rz*rz; + const double z92 = z32*z32*z32; + const double term1 = -t2*t * (30375.0 + 369603.0*t2 + 765765.0*t2*t2 + 425425.0*t2*t2*t2)/414720.0; + const double term2 = 85085.0/(663552.0*z92); + const double term3 = -385.0/110592.0*t*(3.0+5.0*t2)/(abs_zeta*abs_zeta*abs_zeta); + const double term4 = 5.0/55296.0*t2*(81.0 + 462.0*t2 + 385.0*t2*t2)/z32; + return (term1 + term2 + term3 + term4)/rz; + } +} + + +static double olver_B2(double z, double abs_zeta) +{ + if(z < 0.8) { + const double x = 5.0*z/2.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&B2_lt1_cs, x, &c); + return c.val / z; + } + else if(z <= 1.2) { + const double a = 1.0-z; + const double c0 = 0.00055221307672129279005986982501; + const double c1 = 0.00089586516310476929281129228969; + const double c2 = 0.00067015003441569770883539158863; + const double c3 = 0.00010166263361949045682945811828; + const double c4 = -0.00044086345133806887291336488582; + const double c5 = -0.00073963081508788743392883072523; + const double c6 = -0.00076745494377839561259903887331; + const double c7 = -0.00060829038106040362291568012663; + const double c8 = -0.00037128707528893496121336168683; + const double c9 = -0.00014116325105702609866850307176; + return c0+a*(c1+a*(c2+a*(c3+a*(c4+a*(c5+a*(c6+a*(c7+a*(c8+a*c9)))))))); + } + else { + const double zi = 1.0/z; + const double x = 12.0/5.0 * zi - 1.0; + gsl_sf_result c; + cheb_eval_e(&B2_gt1_cs, x, &c); + return c.val * zi*zi*zi; + } +} + + +static double olver_B3(double z, double abs_zeta) +{ + if(z < 0.8) { + const double x = 5.0*z/2.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&B3_lt1_cs, x, &c); + return c.val; + } + else if(z < 1.2) { + const double a = 1.0-z; + const double c0 = -0.00047461779655995980754441833105; + const double c1 = -0.00095572913429464297452176811898; + const double c2 = -0.00080369634512082892655558133973; + const double c3 = -0.00000727921669154784138080600339; + const double c4 = 0.00093162500331581345235746518994; + const double c5 = 0.00149848796913751497227188612403; + const double c6 = 0.00148406039675949727870390426462; + return c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*c6))))); + } + else { + const double x = 12.0/(5.0*z) - 1.0; + const double zi2 = 1.0/(z*z); + gsl_sf_result c; + cheb_eval_e(&B3_gt1_cs, x, &c); + return c.val * zi2*zi2*zi2; + } +} + + +static double olver_A1(double z, double abs_zeta, double * err) +{ + if(z < 0.98) { + double t = 1.0/sqrt(1.0-z*z); + double rz = sqrt(abs_zeta); + double t2 = t*t; + double term1 = t2*(81.0 - 462.0*t2 + 385.0*t2*t2)/1152.0; + double term2 = -455.0/(4608.0*abs_zeta*abs_zeta*abs_zeta); + double term3 = 7.0*t*(-3.0 + 5.0*t2)/(1152.0*rz*rz*rz); + *err = 2.0 * GSL_DBL_EPSILON * (fabs(term1) + fabs(term2) + fabs(term3)); + return term1 + term2 + term3; + } + else if(z < 1.02) { + const double a = 1.0-z; + const double c0 = -0.00444444444444444444444444444444; + const double c1 = -0.00184415584415584415584415584416; + const double c2 = 0.00056812076812076812076812076812; + const double c3 = 0.00168137865661675185484709294233; + const double c4 = 0.00186744042139000122193399504324; + const double c5 = 0.00161330105833747826430066790326; + const double c6 = 0.00123177312220625816558607537838; + const double c7 = 0.00087334711007377573881689318421; + const double c8 = 0.00059004942455353250141217015410; + const double sum = c0+a*(c1+a*(c2+a*(c3+a*(c4+a*(c5+a*(c6+a*(c7+a*c8))))))); + *err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + return sum; + } + else { + const double t = 1.0/(z*sqrt(1.0 - 1.0/(z*z))); + const double rz = sqrt(abs_zeta); + const double t2 = t*t; + const double term1 = -t2*(81.0 + 462.0*t2 + 385.0*t2*t2)/1152.0; + const double term2 = 455.0/(4608.0*abs_zeta*abs_zeta*abs_zeta); + const double term3 = -7.0*t*(3.0 + 5.0*t2)/(1152.0*rz*rz*rz); + *err = 2.0 * GSL_DBL_EPSILON * (fabs(term1) + fabs(term2) + fabs(term3)); + return term1 + term2 + term3; + } +} + + +static double olver_A2(double z, double abs_zeta) +{ + if(z < 0.88) { + double t = 1.0/sqrt(1.0-z*z); + double t2 = t*t; + double t4 = t2*t2; + double t6 = t4*t2; + double t8 = t4*t4; + double rz = sqrt(abs_zeta); + double z3 = abs_zeta*abs_zeta*abs_zeta; + double z32 = rz*rz*rz; + double z92 = z3*z32; + double term1 = t4*(4465125.0 - 94121676.0*t2 + 349922430.0*t4 - 446185740.0*t6 + 185910725.0*t8)/39813120.0; + double term2 = -40415375.0/(127401984.0*z3*z3); + double term3 = -95095.0/15925248.0*t*(3.0-5.0*t2)/z92; + double term4 = -455.0/5308416.0 *t2*(81.0 - 462.0*t2 + 385.0*t4)/z3; + double term5 = -7.0/19906560.0*t*t2*(30375.0 - 369603.0*t2 + 765765.0*t4 - 425425.0*t6)/z32; + return term1 + term2 + term3 + term4 + term5; + } + else if(z < 1.12) { + double a = 1.0-z; + const double c0 = 0.000693735541354588973636592684210; + const double c1 = 0.000464483490365843307019777608010; + const double c2 = -0.000289036254605598132482570468291; + const double c3 = -0.000874764943953712638574497548110; + const double c4 = -0.001029716376139865629968584679350; + const double c5 = -0.000836857329713810600584714031650; + const double c6 = -0.000488910893527218954998270124540; + const double c7 = -0.000144236747940817220502256810151; + const double c8 = 0.000114363800986163478038576460325; + const double c9 = 0.000266806881492777536223944807117; + const double c10 = -0.011975517576151069627471048587000; + return c0+a*(c1+a*(c2+a*(c3+a*(c4+a*(c5+a*(c6+a*(c7+a*(c8+a*(c9+a*c10))))))))); + } + else { + const double t = 1.0/(z*sqrt(1.0 - 1.0/(z*z))); + const double t2 = t*t; + const double t4 = t2*t2; + const double t6 = t4*t2; + const double t8 = t4*t4; + const double rz = sqrt(abs_zeta); + const double z3 = abs_zeta*abs_zeta*abs_zeta; + const double z32 = rz*rz*rz; + const double z92 = z3*z32; + const double term1 = t4*(4465125.0 + 94121676.0*t2 + 349922430.0*t4 + 446185740.0*t6 + 185910725.0*t8)/39813120.0; + const double term2 = -40415375.0/(127401984.0*z3*z3); + const double term3 = 95095.0/15925248.0*t*(3.0+5.0*t2)/z92; + const double term4 = -455.0/5308416.0 *t2*(81.0 + 462.0*t2 + 385.0*t4)/z3; + const double term5 = 7.0/19906560.0*t*t2*(30375.0 + 369603.0*t2 + 765765.0*t4 + 425425.0*t6)/z32; + return term1 + term2 + term3 + term4 + term5; + } +} + + +static double olver_A3(double z, double abs_zeta) +{ + if(z < 0.9) { + const double x = 20.0*z/9.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&A3_lt1_cs, x, &c); + return c.val; + } + else if(z < 1.1) { + double a = 1.0-z; + const double c0 = -0.000354211971457743840771125759200; + const double c1 = -0.000312322527890318832782774881353; + const double c2 = 0.000277947465383133980329617631915; + const double c3 = 0.000919803044747966977054155192400; + const double c4 = 0.001147600388275977640983696906320; + const double c5 = 0.000869239326123625742931772044544; + const double c6 = 0.000287392257282507334785281718027; + return c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*c6))))); + } + else { + const double x = 11.0/(5.0*z) - 1.0; + const double zi2 = 1.0/(z*z); + gsl_sf_result c; + cheb_eval_e(&A3_gt1_cs, x, &c); + return c.val * zi2*zi2*zi2; + } +} + + +static double olver_A4(double z, double abs_zeta) +{ + if(z < 0.8) { + const double x = 5.0*z/2.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&A4_lt1_cs, x, &c); + return c.val; + } + else if(z < 1.2) { + double a = 1.0-z; + const double c0 = 0.00037819419920177291402661228437; + const double c1 = 0.00040494390552363233477213857527; + const double c2 = -0.00045764735528936113047289344569; + const double c3 = -0.00165361044229650225813161341879; + const double c4 = -0.00217527517983360049717137015539; + const double c5 = -0.00152003287866490735107772795537; + return c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*c5)))); + } + else { + const double x = 12.0/(5.0*z) - 1.0; + const double zi2 = 1.0/(z*z); + gsl_sf_result c; + cheb_eval_e(&A4_gt1_cs, x, &c); + return c.val * zi2*zi2*zi2*zi2; + } +} + +inline +static double olver_Asum(double nu, double z, double abs_zeta, double * err) +{ + double nu2 = nu*nu; + double A1_err; + double A1 = olver_A1(z, abs_zeta, &A1_err); + double A2 = olver_A2(z, abs_zeta); + double A3 = olver_A3(z, abs_zeta); + double A4 = olver_A4(z, abs_zeta); + *err = A1_err/nu2 + GSL_DBL_EPSILON; + return 1.0 + A1/nu2 + A2/(nu2*nu2) + A3/(nu2*nu2*nu2) + A4/(nu2*nu2*nu2*nu2); +} + +inline +static double olver_Bsum(double nu, double z, double abs_zeta) +{ + double nu2 = nu*nu; + double B0 = olver_B0(z, abs_zeta); + double B1 = olver_B1(z, abs_zeta); + double B2 = olver_B2(z, abs_zeta); + double B3 = olver_B3(z, abs_zeta); + return B0 + B1/nu2 + B2/(nu2*nu2) + B3/(nu2*nu2*nu2*nu2); +} + + +/* uniform asymptotic, nu -> Inf, [Abramowitz+Stegun, 9.3.35] + * + * error: + * nu = 2: uniformly good to > 6D + * nu = 5: uniformly good to > 8D + * nu = 10: uniformly good to > 10D + * nu = 20: uniformly good to > 13D + * + */ +int gsl_sf_bessel_Jnu_asymp_Olver_e(double nu, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu <= 0.0) { + DOMAIN_ERROR(result); + } + else { + double zeta, abs_zeta; + double arg; + double pre; + double asum, bsum, asum_err; + gsl_sf_result ai; + gsl_sf_result aip; + double z = x/nu; + double crnu = pow(nu, 1.0/3.0); + double nu3 = nu*nu*nu; + double nu11 = nu3*nu3*nu3*nu*nu; + int stat_a, stat_ap; + + if(fabs(1.0-z) < 0.02) { + const double a = 1.0-z; + const double c0 = 1.25992104989487316476721060728; + const double c1 = 0.37797631496846194943016318218; + const double c2 = 0.230385563409348235843147082474; + const double c3 = 0.165909603649648694839821892031; + const double c4 = 0.12931387086451008907; + const double c5 = 0.10568046188858133991; + const double c6 = 0.08916997952268186978; + const double c7 = 0.07700014900618802456; + pre = c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*(c6 + a*c7)))))); + zeta = a * pre; + pre = sqrt(2.0*sqrt(pre/(1.0+z))); + abs_zeta = fabs(zeta); + } + else if(z < 1.0) { + double rt = sqrt(1.0 - z*z); + abs_zeta = pow(1.5*(log((1.0+rt)/z) - rt), 2.0/3.0); + zeta = abs_zeta; + pre = sqrt(2.0*sqrt(abs_zeta/(rt*rt))); + } + else { + /* z > 1 */ + double rt = z * sqrt(1.0 - 1.0/(z*z)); + abs_zeta = pow(1.5*(rt - acos(1.0/z)), 2.0/3.0); + zeta = -abs_zeta; + pre = sqrt(2.0*sqrt(abs_zeta/(rt*rt))); + } + + asum = olver_Asum(nu, z, abs_zeta, &asum_err); + bsum = olver_Bsum(nu, z, abs_zeta); + + arg = crnu*crnu * zeta; + stat_a = gsl_sf_airy_Ai_e(arg, GSL_MODE_DEFAULT, &ai); + stat_ap = gsl_sf_airy_Ai_deriv_e(arg, GSL_MODE_DEFAULT, &aip); + + result->val = pre * (ai.val*asum/crnu + aip.val*bsum/(nu*crnu*crnu)); + result->err = pre * (ai.err * fabs(asum/crnu)); + result->err += pre * fabs(ai.val) * asum_err / crnu; + result->err += pre * fabs(ai.val * asum) / (crnu*nu11); + result->err += 8.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_a, stat_ap); + } +} + + +/* uniform asymptotic, nu -> Inf, [Abramowitz+Stegun, 9.3.36] + * + * error: + * nu = 2: uniformly good to > 6D + * nu = 5: uniformly good to > 8D + * nu = 10: uniformly good to > 10D + * nu = 20: uniformly good to > 13D + */ +int gsl_sf_bessel_Ynu_asymp_Olver_e(double nu, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0 || nu <= 0.0) { + DOMAIN_ERROR(result); + } + else { + double zeta, abs_zeta; + double arg; + double pre; + double asum, bsum, asum_err; + gsl_sf_result bi; + gsl_sf_result bip; + double z = x/nu; + double crnu = pow(nu, 1.0/3.0); + double nu3 = nu*nu*nu; + double nu11 = nu3*nu3*nu3*nu*nu; + int stat_b, stat_d; + + if(fabs(1.0-z) < 0.02) { + const double a = 1.0-z; + const double c0 = 1.25992104989487316476721060728; + const double c1 = 0.37797631496846194943016318218; + const double c2 = 0.230385563409348235843147082474; + const double c3 = 0.165909603649648694839821892031; + const double c4 = 0.12931387086451008907; + const double c5 = 0.10568046188858133991; + const double c6 = 0.08916997952268186978; + const double c7 = 0.07700014900618802456; + pre = c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*(c6 + a*c7)))))); + zeta = a * pre; + pre = sqrt(2.0*sqrt(pre/(1.0+z))); + abs_zeta = fabs(zeta); + } + else if(z < 1.0) { + double rt = sqrt(1.0 - z*z); + abs_zeta = pow(1.5*(log((1.0+rt)/z) - rt), 2.0/3.0); + zeta = abs_zeta; + pre = sqrt(2.0*sqrt(abs_zeta/(rt*rt))); + } + else { + /* z > 1 */ + double rt = z * sqrt(1.0 - 1.0/(z*z)); + double ac = acos(1.0/z); + abs_zeta = pow(1.5*(rt - ac), 2.0/3.0); + zeta = -abs_zeta; + pre = sqrt(2.0*sqrt(abs_zeta)/rt); + } + + asum = olver_Asum(nu, z, abs_zeta, &asum_err); + bsum = olver_Bsum(nu, z, abs_zeta); + + arg = crnu*crnu * zeta; + stat_b = gsl_sf_airy_Bi_e(arg, GSL_MODE_DEFAULT, &bi); + stat_d = gsl_sf_airy_Bi_deriv_e(arg, GSL_MODE_DEFAULT, &bip); + + result->val = -pre * (bi.val*asum/crnu + bip.val*bsum/(nu*crnu*crnu)); + result->err = pre * (bi.err * fabs(asum/crnu)); + result->err += pre * fabs(bi.val) * asum_err / crnu; + result->err += pre * fabs(bi.val*asum) / (crnu*nu11); + result->err += 8.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_b, stat_d); + } +} diff --git a/software/gsl-1.15/specfunc/bessel_olver.h b/software/gsl-1.15/specfunc/bessel_olver.h new file mode 100644 index 000000000..3693fc4d6 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_olver.h @@ -0,0 +1,33 @@ +/* specfunc/bessel_olver.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef BESSEL_OLVER_H_ +#define BESSEL_OLVER_H_ + +#include + +int gsl_sf_bessel_Jnu_asymp_Olver_e(double nu, double x, gsl_sf_result * result); +int gsl_sf_bessel_Ynu_asymp_Olver_e(double nu, double x, gsl_sf_result * result); + +double gsl_sf_bessel_Olver_zofmzeta(double minus_zeta); + + +#endif /* !BESSEL_OLVER_H_ */ diff --git a/software/gsl-1.15/specfunc/bessel_sequence.c b/software/gsl-1.15/specfunc/bessel_sequence.c new file mode 100644 index 000000000..fcd3cc668 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_sequence.c @@ -0,0 +1,154 @@ +/* specfunc/bessel_sequence.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + + +#define DYDX_p(p,u,x) (-(p)/(x) + (((nu)*(nu))/((x)*(x))-1.0)*(u)) +#define DYDX_u(p,u,x) (p) + +static int +rk_step(double nu, double x, double dx, double * Jp, double * J) +{ + double p_0 = *Jp; + double u_0 = *J; + + double p_1 = dx * DYDX_p(p_0, u_0, x); + double u_1 = dx * DYDX_u(p_0, u_0, x); + + double p_2 = dx * DYDX_p(p_0 + 0.5*p_1, u_0 + 0.5*u_1, x + 0.5*dx); + double u_2 = dx * DYDX_u(p_0 + 0.5*p_1, u_0 + 0.5*u_1, x + 0.5*dx); + + double p_3 = dx * DYDX_p(p_0 + 0.5*p_2, u_0 + 0.5*u_2, x + 0.5*dx); + double u_3 = dx * DYDX_u(p_0 + 0.5*p_2, u_0 + 0.5*u_2, x + 0.5*dx); + + double p_4 = dx * DYDX_p(p_0 + p_3, u_0 + u_3, x + dx); + double u_4 = dx * DYDX_u(p_0 + p_3, u_0 + u_3, x + dx); + + *Jp = p_0 + p_1/6.0 + p_2/3.0 + p_3/3.0 + p_4/6.0; + *J = u_0 + u_1/6.0 + u_2/3.0 + u_3/3.0 + u_4/6.0; + + return GSL_SUCCESS; +} + + +int +gsl_sf_bessel_sequence_Jnu_e(double nu, gsl_mode_t mode, size_t size, double * v) +{ + /* CHECK_POINTER(v) */ + + if(nu < 0.0) { + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(size == 0) { + GSL_ERROR ("error", GSL_EINVAL); + } + else { + const gsl_prec_t goal = GSL_MODE_PREC(mode); + const double dx_array[] = { 0.001, 0.03, 0.1 }; /* double, single, approx */ + const double dx_nominal = dx_array[goal]; + + const int cnu = (int) ceil(nu); + const double nu13 = pow(nu,1.0/3.0); + const double smalls[] = { 0.01, 0.02, 0.4, 0.7, 1.3, 2.0, 2.5, 3.2, 3.5, 4.5, 6.0 }; + const double x_small = ( nu >= 10.0 ? nu - nu13 : smalls[cnu] ); + + gsl_sf_result J0, J1; + double Jp, J; + double x; + size_t i = 0; + + /* Calculate the first point. */ + x = v[0]; + gsl_sf_bessel_Jnu_e(nu, x, &J0); + v[0] = J0.val; + ++i; + + /* Step over the idiot case where the + * first point was actually zero. + */ + if(x == 0.0) { + if(v[1] <= x) { + /* Strict ordering failure. */ + GSL_ERROR ("error", GSL_EFAILED); + } + x = v[1]; + gsl_sf_bessel_Jnu_e(nu, x, &J0); + v[1] = J0.val; + ++i; + } + + /* Calculate directly as long as the argument + * is small. This is necessary because the + * integration is not very good there. + */ + while(v[i] < x_small && i < size) { + if(v[i] <= x) { + /* Strict ordering failure. */ + GSL_ERROR ("error", GSL_EFAILED); + } + x = v[i]; + gsl_sf_bessel_Jnu_e(nu, x, &J0); + v[i] = J0.val; + ++i; + } + + /* At this point we are ready to integrate. + * The value of x is the last calculated + * point, which has the value J0; v[i] is + * the next point we need to calculate. We + * calculate nu+1 at x as well to get + * the derivative, then we go forward. + */ + gsl_sf_bessel_Jnu_e(nu+1.0, x, &J1); + J = J0.val; + Jp = -J1.val + nu/x * J0.val; + + while(i < size) { + const double dv = v[i] - x; + const int Nd = (int) ceil(dv/dx_nominal); + const double dx = dv / Nd; + double xj; + int j; + + if(v[i] <= x) { + /* Strict ordering failure. */ + GSL_ERROR ("error", GSL_EFAILED); + } + + /* Integrate over interval up to next sample point. + */ + for(j=0, xj=x; j 0. + */ +#include +#include +#include +#include +#include "bessel_temme.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/* nu = (x+1)/4, -1val = -sum0; + Ynu->err = (2.0 + 0.5*k) * GSL_DBL_EPSILON * fabs(Ynu->val); + Ynup1->val = -sum1 * 2.0/x; + Ynup1->err = (2.0 + 0.5*k) * GSL_DBL_EPSILON * fabs(Ynup1->val); + + stat_iter = ( k >= max_iter ? GSL_EMAXITER : GSL_SUCCESS ); + return GSL_ERROR_SELECT_2(stat_iter, stat_g); +} + + +int +gsl_sf_bessel_K_scaled_temme(const double nu, const double x, + double * K_nu, double * K_nup1, double * Kp_nu) +{ + const int max_iter = 15000; + + const double half_x = 0.5 * x; + const double ln_half_x = log(half_x); + const double half_x_nu = exp(nu*ln_half_x); + const double pi_nu = M_PI * nu; + const double sigma = -nu * ln_half_x; + const double sinrat = (fabs(pi_nu) < GSL_DBL_EPSILON ? 1.0 : pi_nu/sin(pi_nu)); + const double sinhrat = (fabs(sigma) < GSL_DBL_EPSILON ? 1.0 : sinh(sigma)/sigma); + const double ex = exp(x); + + double sum0, sum1; + double fk, pk, qk, hk, ck; + int k = 0; + int stat_iter; + + double g_1pnu, g_1mnu, g1, g2; + int stat_g = gsl_sf_temme_gamma(nu, &g_1pnu, &g_1mnu, &g1, &g2); + + fk = sinrat * (cosh(sigma)*g1 - sinhrat*ln_half_x*g2); + pk = 0.5/half_x_nu * g_1pnu; + qk = 0.5*half_x_nu * g_1mnu; + hk = pk; + ck = 1.0; + sum0 = fk; + sum1 = hk; + while(k < max_iter) { + double del0; + double del1; + k++; + fk = (k*fk + pk + qk)/(k*k-nu*nu); + ck *= half_x*half_x/k; + pk /= (k - nu); + qk /= (k + nu); + hk = -k*fk + pk; + del0 = ck * fk; + del1 = ck * hk; + sum0 += del0; + sum1 += del1; + if(fabs(del0) < 0.5*fabs(sum0)*GSL_DBL_EPSILON) break; + } + + *K_nu = sum0 * ex; + *K_nup1 = sum1 * 2.0/x * ex; + *Kp_nu = - *K_nup1 + nu/x * *K_nu; + + stat_iter = ( k == max_iter ? GSL_EMAXITER : GSL_SUCCESS ); + return GSL_ERROR_SELECT_2(stat_iter, stat_g); +} diff --git a/software/gsl-1.15/specfunc/bessel_temme.h b/software/gsl-1.15/specfunc/bessel_temme.h new file mode 100644 index 000000000..e1e04f37c --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_temme.h @@ -0,0 +1,38 @@ +/* specfunc/bessel_temme.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef BESSEL_TEMME_H_ +#define BESSEL_TEMME_H_ + +#include + + +int +gsl_sf_bessel_Y_temme(const double nu, const double x, + gsl_sf_result * Y_nu, + gsl_sf_result * Y_nup1); + +int +gsl_sf_bessel_K_scaled_temme(const double nu, const double x, + double * K_nu, double * K_nup1, double * Kp_nu); + + +#endif /* !BESSEL_TEMME_H_ */ diff --git a/software/gsl-1.15/specfunc/bessel_y.c b/software/gsl-1.15/specfunc/bessel_y.c new file mode 100644 index 000000000..4800545b8 --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_y.c @@ -0,0 +1,292 @@ +/* specfunc/bessel_y.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel.h" +#include "bessel_olver.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* [Abramowitz+Stegun, 10.1.3] + * with lmax=15, precision ~ 15D for x < 3 + * + * checked OK [GJ] Wed May 13 15:41:25 MDT 1998 + */ +static int bessel_yl_small_x(int l, const double x, gsl_sf_result * result) +{ + gsl_sf_result num_fact; + double den = gsl_sf_pow_int(x, l+1); + int stat_df = gsl_sf_doublefact_e(2*l-1, &num_fact); + + if(stat_df != GSL_SUCCESS || den == 0.0) { + OVERFLOW_ERROR(result); + } + else { + const int lmax = 200; + double t = -0.5*x*x; + double sum = 1.0; + double t_coeff = 1.0; + double t_power = 1.0; + double delta; + int i; + for(i=1; i<=lmax; i++) { + t_coeff /= i*(2*(i-l) - 1); + t_power *= t; + delta = t_power*t_coeff; + sum += delta; + if(fabs(delta/sum) < 0.5*GSL_DBL_EPSILON) break; + } + result->val = -num_fact.val/den * sum; + result->err = GSL_DBL_EPSILON * fabs(result->val); + + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int gsl_sf_bessel_y0_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(1.0/GSL_DBL_MAX > 0.0 && x < 1.0/GSL_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else { + gsl_sf_result cos_result; + const int stat = gsl_sf_cos_e(x, &cos_result); + result->val = -cos_result.val/x; + result->err = fabs(cos_result.err/x); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat; + } +} + + +int gsl_sf_bessel_y1_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 1.0/GSL_SQRT_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else if(x < 0.25) { + const double y = x*x; + const double c1 = 1.0/2.0; + const double c2 = -1.0/8.0; + const double c3 = 1.0/144.0; + const double c4 = -1.0/5760.0; + const double c5 = 1.0/403200.0; + const double c6 = -1.0/43545600.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*c6))))); + result->val = -sum/y; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result cos_result; + gsl_sf_result sin_result; + const int stat_cos = gsl_sf_cos_e(x, &cos_result); + const int stat_sin = gsl_sf_sin_e(x, &sin_result); + const double cx = cos_result.val; + const double sx = sin_result.val; + result->val = -(cx/x + sx)/x; + result->err = (fabs(cos_result.err/x) + sin_result.err)/fabs(x); + result->err += GSL_DBL_EPSILON * (fabs(sx/x) + fabs(cx/(x*x))); + return GSL_ERROR_SELECT_2(stat_cos, stat_sin); + } +} + + +int gsl_sf_bessel_y2_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 1.0/GSL_ROOT3_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else if(x < 0.5) { + const double y = x*x; + const double c1 = 1.0/6.0; + const double c2 = 1.0/24.0; + const double c3 = -1.0/144.0; + const double c4 = 1.0/3456.0; + const double c5 = -1.0/172800.0; + const double c6 = 1.0/14515200.0; + const double c7 = -1.0/1828915200.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*(c6 + y*c7)))))); + result->val = -3.0/(x*x*x) * sum; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result cos_result; + gsl_sf_result sin_result; + const int stat_cos = gsl_sf_cos_e(x, &cos_result); + const int stat_sin = gsl_sf_sin_e(x, &sin_result); + const double sx = sin_result.val; + const double cx = cos_result.val; + const double a = 3.0/(x*x); + result->val = (1.0 - a)/x * cx - a * sx; + result->err = cos_result.err * fabs((1.0 - a)/x) + sin_result.err * fabs(a); + result->err += GSL_DBL_EPSILON * (fabs(cx/x) + fabs(sx/(x*x))); + return GSL_ERROR_SELECT_2(stat_cos, stat_sin); + } +} + + +int gsl_sf_bessel_yl_e(int l, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(l < 0 || x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(l == 0) { + return gsl_sf_bessel_y0_e(x, result); + } + else if(l == 1) { + return gsl_sf_bessel_y1_e(x, result); + } + else if(l == 2) { + return gsl_sf_bessel_y2_e(x, result); + } + else if(x < 3.0) { + return bessel_yl_small_x(l, x, result); + } + else if(GSL_ROOT3_DBL_EPSILON * x > (l*l + l + 1.0)) { + int status = gsl_sf_bessel_Ynu_asympx_e(l + 0.5, x, result); + double pre = sqrt((0.5*M_PI)/x); + result->val *= pre; + result->err *= pre; + return status; + } + else if(l > 40) { + int status = gsl_sf_bessel_Ynu_asymp_Olver_e(l + 0.5, x, result); + double pre = sqrt((0.5*M_PI)/x); + result->val *= pre; + result->err *= pre; + return status; + } + else { + /* recurse upward */ + gsl_sf_result r_by; + gsl_sf_result r_bym; + int stat_1 = gsl_sf_bessel_y1_e(x, &r_by); + int stat_0 = gsl_sf_bessel_y0_e(x, &r_bym); + double bym = r_bym.val; + double by = r_by.val; + double byp; + int j; + for(j=1; jval = by; + result->err = fabs(result->val) * (GSL_DBL_EPSILON + fabs(r_by.err/r_by.val) + fabs(r_bym.err/r_bym.val)); + + return GSL_ERROR_SELECT_2(stat_1, stat_0); + } +} + + +int gsl_sf_bessel_yl_array(const int lmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(lmax < 0 || x <= 0.0) { + GSL_ERROR ("error", GSL_EDOM); + } else if (lmax == 0) { + gsl_sf_result result; + int stat = gsl_sf_bessel_y0_e(x, &result); + result_array[0] = result.val; + return stat; + } else { + gsl_sf_result r_yell; + gsl_sf_result r_yellm1; + int stat_1 = gsl_sf_bessel_y1_e(x, &r_yell); + int stat_0 = gsl_sf_bessel_y0_e(x, &r_yellm1); + double yellp1; + double yell = r_yell.val; + double yellm1 = r_yellm1.val; + int ell; + + result_array[0] = yellm1; + result_array[1] = yell; + + for(ell = 1; ell < lmax; ell++) { + yellp1 = (2*ell+1)/x * yell - yellm1; + result_array[ell+1] = yellp1; + yellm1 = yell; + yell = yellp1; + } + + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_y0(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_y0_e(x, &result)); +} + +double gsl_sf_bessel_y1(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_y1_e(x, &result)); +} + +double gsl_sf_bessel_y2(const double x) +{ + EVAL_RESULT(gsl_sf_bessel_y2_e(x, &result)); +} + +double gsl_sf_bessel_yl(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_bessel_yl_e(l, x, &result)); +} + + diff --git a/software/gsl-1.15/specfunc/bessel_zero.c b/software/gsl-1.15/specfunc/bessel_zero.c new file mode 100644 index 000000000..14d557a9f --- /dev/null +++ b/software/gsl-1.15/specfunc/bessel_zero.c @@ -0,0 +1,1219 @@ +/* specfunc/bessel_zero.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "bessel_olver.h" + +/* For Chebyshev expansions of the roots as functions of nu, + * see [G. Nemeth, Mathematical Approximation of Special Functions]. + * This gives the fits for all nu and s <= 10. + * I made the fits for other values of s myself [GJ]. + */ + +/* Chebyshev expansion: j_{nu,1} = c_k T_k*(nu/2), nu <= 2 */ +static const double coef_jnu1_a[] = { + 3.801775243633476, + 1.360704737511120, + -0.030707710261106, + 0.004526823746202, + -0.000808682832134, + 0.000159218792489, + -0.000033225189761, + 0.000007205599763, + -0.000001606110397, + 0.000000365439424, + -0.000000084498039, + 0.000000019793815, + -0.000000004687054, + 0.000000001120052, + -0.000000000269767, + 0.000000000065420, + -0.000000000015961, + 0.000000000003914, + -0.000000000000965, + 0.000000000000239, + -0.000000000000059, + 0.000000000000015, + -0.000000000000004, + 0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,1} = nu c_k T_k*((2/nu)^(2/3)), nu >= 2 */ +static const double coef_jnu1_b[] = { + 1.735063412537096, + 0.784478100951978, + 0.048881473180370, + -0.000578279783021, + -0.000038984957864, + 0.000005758297879, + -0.000000327583229, + -0.000000003853878, + 0.000000002284653, + -0.000000000153079, + -0.000000000000895, + 0.000000000000283, + 0.000000000000043, + 0.000000000000010, + -0.000000000000003 +}; + + +/* Chebyshev expansion: j_{nu,2} = c_k T_k*(nu/2), nu <= 2 */ +static const double coef_jnu2_a[] = { + 6.992370244046161, + 1.446379282056534, + -0.023458616207293, + 0.002172149448700, + -0.000246262775620, + 0.000030990180959, + -0.000004154183047, + 0.000000580766328, + -0.000000083648175, + 0.000000012317355, + -0.000000001844887, + 0.000000000280076, + -0.000000000042986, + 0.000000000006658, + -0.000000000001039, + 0.000000000000163, + -0.000000000000026, + 0.000000000000004, + -0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,2} = nu c_k T_k*((2/nu)^(2/3)), nu >= 2 */ +static const double coef_jnu2_b[] = { + 2.465611864263400, + 1.607952988471069, + 0.138758034431497, + -0.003687791182054, + -0.000051276007868, + 0.000045113570749, + -0.000007579172152, + 0.000000736469208, + -0.000000011118527, + -0.000000011919884, + 0.000000002696788, + -0.000000000314488, + 0.000000000008124, + 0.000000000005211, + -0.000000000001292, + 0.000000000000158, + -0.000000000000004, + -0.000000000000003, + 0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,3} = c_k T_k*(nu/3), nu <= 3 */ +static const double coef_jnu3_a[] = { + 10.869647065239236, + 2.177524286141710, + -0.034822817125293, + 0.003167249102413, + -0.000353960349344, + 0.000044039086085, + -0.000005851380981, + 0.000000812575483, + -0.000000116463617, + 0.000000017091246, + -0.000000002554376, + 0.000000000387335, + -0.000000000059428, + 0.000000000009207, + -0.000000000001438, + 0.000000000000226, + -0.000000000000036, + 0.000000000000006, + -0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,3} = nu c_k T_k*((3/nu)^(2/3)), nu >= 3 */ +static const double coef_jnu3_b[] = { + 2.522816775173244, + 1.673199424973720, + 0.146431617506314, + -0.004049001763912, + -0.000039517767244, + 0.000048781729288, + -0.000008729705695, + 0.000000928737310, + -0.000000028388244, + -0.000000012927432, + 0.000000003441008, + -0.000000000471695, + 0.000000000025590, + 0.000000000005502, + -0.000000000001881, + 0.000000000000295, + -0.000000000000020, + -0.000000000000003, + 0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,4} = c_k T_k*(nu/4), nu <= 4 */ +static const double coef_jnu4_a[] = { + 14.750310252773009, + 2.908010932941708, + -0.046093293420315, + 0.004147172321412, + -0.000459092310473, + 0.000056646951906, + -0.000007472351546, + 0.000001031210065, + -0.000000147008137, + 0.000000021475218, + -0.000000003197208, + 0.000000000483249, + -0.000000000073946, + 0.000000000011431, + -0.000000000001782, + 0.000000000000280, + -0.000000000000044, + 0.000000000000007, + -0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,4} = nu c_k T_k*((4/nu)^(2/3)), nu >= 4 */ +static const double coef_jnu4_b[] = { + 2.551681323117914, + 1.706177978336572, + 0.150357658406131, + -0.004234001378590, + -0.000033854229898, + 0.000050763551485, + -0.000009337464057, + 0.000001029717834, + -0.000000037474196, + -0.000000013450153, + 0.000000003836180, + -0.000000000557404, + 0.000000000035748, + 0.000000000005487, + -0.000000000002187, + 0.000000000000374, + -0.000000000000031, + -0.000000000000003, + 0.000000000000001 +}; + + + +/* Chebyshev expansion: j_{nu,5} = c_k T_k*(nu/5), nu <= 5 */ +static const double coef_jnu5_a[] = { + 18.632261081028211, + 3.638249012596966, + -0.057329705998828, + 0.005121709126820, + -0.000563325259487, + 0.000069100826174, + -0.000009066603030, + 0.000001245181383, + -0.000000176737282, + 0.000000025716695, + -0.000000003815184, + 0.000000000574839, + -0.000000000087715, + 0.000000000013526, + -0.000000000002104, + 0.000000000000330, + -0.000000000000052, + 0.000000000000008, + -0.000000000000001 +}; + + +/* Chebyshev expansion: j_{nu,5} = nu c_k T_k*((5/nu)^(2/3)), nu >= 5 */ +/* FIXME: There is something wrong with this fit, in about the + * 9th or 10th decimal place. + */ +static const double coef_jnu5_b[] = { + 2.569079487591442, + 1.726073360882134, + 0.152740776809531, + -0.004346449660148, + -0.000030512461856, + 0.000052000821080, + -0.000009713343981, + 0.000001091997863, + -0.000000043061707, + -0.000000013779413, + 0.000000004082870, + -0.000000000611259, + 0.000000000042242, + 0.000000000005448, + -0.000000000002377, + 0.000000000000424, + -0.000000000000038, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,6} = c_k T_k*(nu/6), nu <= 6 */ +static const double coef_jnu6_a[] = { + 22.514836143374042, + 4.368367257557198, + -0.068550155285562, + 0.006093776505822, + -0.000667152784957, + 0.000081486022398, + -0.000010649011647, + 0.000001457089679, + -0.000000206105082, + 0.000000029894724, + -0.000000004422012, + 0.000000000664471, + -0.000000000101140, + 0.000000000015561, + -0.000000000002416, + 0.000000000000378, + -0.000000000000060, + 0.000000000000009, + -0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,6} = nu c_k T_k*((6/nu)^(2/3)), nu >= 6 */ +static const double coef_jnu6_b[] = { + 2.580710285494837, + 1.739380728566154, + 0.154340696401691, + -0.004422028860168, + -0.000028305272624, + 0.000052845975269, + -0.000009968794373, + 0.000001134252926, + -0.000000046841241, + -0.000000014007555, + 0.000000004251816, + -0.000000000648213, + 0.000000000046728, + 0.000000000005414, + -0.000000000002508, + 0.000000000000459, + -0.000000000000043, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,7} = c_k T_k*(nu/7), nu <= 7 */ +static const double coef_jnu7_a[] = { + 26.397760539730869, + 5.098418721711790, + -0.079761896398948, + 0.007064521280487, + -0.000770766522482, + 0.000093835449636, + -0.000012225308542, + 0.000001667939800, + -0.000000235288157, + 0.000000034040347, + -0.000000005023142, + 0.000000000753101, + -0.000000000114389, + 0.000000000017564, + -0.000000000002722, + 0.000000000000425, + -0.000000000000067, + 0.000000000000011, + -0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,7} = nu c_k T_k*((7/nu)^(2/3)), nu >= 7 */ +static const double coef_jnu7_b[] = { + 2.589033335856773, + 1.748907007612678, + 0.155488900387653, + -0.004476317805688, + -0.000026737952924, + 0.000053459680946, + -0.000010153699240, + 0.000001164804272, + -0.000000049566917, + -0.000000014175403, + 0.000000004374840, + -0.000000000675135, + 0.000000000050004, + 0.000000000005387, + -0.000000000002603, + 0.000000000000485, + -0.000000000000047, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,8} = c_k T_k*(nu/8), nu <= 8 */ +static const double coef_jnu8_a[] = { + 30.280900001606662, + 5.828429205461221, + -0.090968381181069, + 0.008034479731033, + -0.000874254899080, + 0.000106164151611, + -0.000013798098749, + 0.000001878187386, + -0.000000264366627, + 0.000000038167685, + -0.000000005621060, + 0.000000000841165, + -0.000000000127538, + 0.000000000019550, + -0.000000000003025, + 0.000000000000472, + -0.000000000000074, + 0.000000000000012, + -0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,8} = nu c_k T_k*((8/nu)^(2/3)), nu >= 8 */ +static const double coef_jnu8_b[] = { + 2.595283877150078, + 1.756063044986928, + 0.156352972371030, + -0.004517201896761, + -0.000025567187878, + 0.000053925472558, + -0.000010293734486, + 0.000001187923085, + -0.000000051625122, + -0.000000014304212, + 0.000000004468450, + -0.000000000695620, + 0.000000000052500, + 0.000000000005367, + -0.000000000002676, + 0.000000000000505, + -0.000000000000050, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,9} = c_k T_k*(nu/9), nu <= 9 */ +static const double coef_jnu9_a[] = { + 34.164181213238386, + 6.558412747925228, + -0.102171455365016, + 0.009003934361201, + -0.000977663914535, + 0.000118479876579, + -0.000015368714220, + 0.000002088064285, + -0.000000293381154, + 0.000000042283900, + -0.000000006217033, + 0.000000000928887, + -0.000000000140627, + 0.000000000021526, + -0.000000000003326, + 0.000000000000518, + -0.000000000000081, + 0.000000000000013, + -0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,9} = nu c_k T_k*((9/nu)^(2/3)), nu >= 9 */ +static const double coef_jnu9_b[] = { + 2.600150240905079, + 1.761635491694032, + 0.157026743724010, + -0.004549100368716, + -0.000024659248617, + 0.000054291035068, + -0.000010403464334, + 0.000001206027524, + -0.000000053234089, + -0.000000014406241, + 0.000000004542078, + -0.000000000711728, + 0.000000000054464, + 0.000000000005350, + -0.000000000002733, + 0.000000000000521, + -0.000000000000052, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,10} = c_k T_k*(nu/10), nu <= 10 */ +static const double coef_jnu10_a[] = { + 38.047560766184647, + 7.288377637926008, + -0.113372193277897, + 0.009973047509098, + -0.001081019701335, + 0.000130786983847, + -0.000016937898538, + 0.000002297699179, + -0.000000322354218, + 0.000000046392941, + -0.000000006811759, + 0.000000001016395, + -0.000000000153677, + 0.000000000023486, + -0.000000000003616, + 0.000000000000561, + -0.000000000000095, + 0.000000000000027, + -0.000000000000013, + 0.000000000000005 +}; + + +/* Chebyshev expansion: j_{nu,10} = nu c_k T_k*((10/nu)^(2/3)), nu >= 10 */ +static const double coef_jnu10_b[] = { + 2.604046346867949, + 1.766097596481182, + 0.157566834446511, + -0.004574682244089, + -0.000023934500688, + 0.000054585558231, + -0.000010491765415, + 0.000001220589364, + -0.000000054526331, + -0.000000014489078, + 0.000000004601510, + -0.000000000724727, + 0.000000000056049, + 0.000000000005337, + -0.000000000002779, + 0.000000000000533, + -0.000000000000054, + -0.000000000000002, + 0.000000000000002 +}; + + +/* Chebyshev expansion: j_{nu,11} = c_k T_k*(nu/22), nu <= 22 */ +static const double coef_jnu11_a[] = { + 49.5054081076848637, + 15.33692279367165101, + -0.33677234163517130, + 0.04623235772920729, + -0.00781084960665093, + 0.00147217395434708, + -0.00029695043846867, + 0.00006273356860235, + -0.00001370575125628, + 3.07171282012e-6, + -7.0235041249e-7, + 1.6320559339e-7, + -3.843117306e-8, + 9.15083800e-9, + -2.19957642e-9, + 5.3301703e-10, + -1.3007541e-10, + 3.193827e-11, + -7.88605e-12, + 1.95918e-12, + -4.9020e-13, + 1.2207e-13, + -2.820e-14, + 5.25e-15, + -1.88e-15, + 2.80e-15, + -2.45e-15 +}; + + +/* Chebyshev expansion: j_{nu,12} = c_k T_k*(nu/24), nu <= 24 */ +static const double coef_jnu12_a[] = { + 54.0787833216641519, + 16.7336367772863598, + -0.36718411124537953, + 0.05035523375053820, + -0.00849884978867533, + 0.00160027692813434, + -0.00032248114889921, + 0.00006806354127199, + -0.00001485665901339, + 3.32668783672e-6, + -7.5998952729e-7, + 1.7644939709e-7, + -4.151538210e-8, + 9.87722772e-9, + -2.37230133e-9, + 5.7442875e-10, + -1.4007767e-10, + 3.437166e-11, + -8.48215e-12, + 2.10554e-12, + -5.2623e-13, + 1.3189e-13, + -3.175e-14, + 5.73e-15, + 5.6e-16, + -8.7e-16, + -6.5e-16 +}; + + +/* Chebyshev expansion: j_{nu,13} = c_k T_k*(nu/26), nu <= 26 */ +static const double coef_jnu13_a[] = { + 58.6521941921708890, + 18.1303398137970284, + -0.39759381380126650, + 0.05447765240465494, + -0.00918674227679980, + 0.00172835361420579, + -0.00034800528297612, + 0.00007339183835188, + -0.00001600713368099, + 3.58154960392e-6, + -8.1759873497e-7, + 1.8968523220e-7, + -4.459745253e-8, + 1.060304419e-8, + -2.54487624e-9, + 6.1580214e-10, + -1.5006751e-10, + 3.679707e-11, + -9.07159e-12, + 2.24713e-12, + -5.5943e-13, + 1.4069e-13, + -3.679e-14, + 1.119e-14, + -4.99e-15, + 3.43e-15, + -2.85e-15, + 2.3e-15, + -1.7e-15, + 8.7e-16 +}; + + +/* Chebyshev expansion: j_{nu,14} = c_k T_k*(nu/28), nu <= 28 */ +static const double coef_jnu14_a[] = { + 63.2256329577315566, + 19.5270342832914901, + -0.42800190567884337, + 0.05859971627729398, + -0.00987455163523582, + 0.00185641011402081, + -0.00037352439419968, + 0.00007871886257265, + -0.00001715728110045, + 3.83632624437e-6, + -8.7518558668e-7, + 2.0291515353e-7, + -4.767795233e-8, + 1.132844415e-8, + -2.71734219e-9, + 6.5714886e-10, + -1.6005342e-10, + 3.922557e-11, + -9.66637e-12, + 2.39379e-12, + -5.9541e-13, + 1.4868e-13, + -3.726e-14, + 9.37e-15, + -2.36e-15, + 6.0e-16 +}; + + +/* Chebyshev expansion: j_{nu,15} = c_k T_k*(nu/30), nu <= 30 */ +static const double coef_jnu15_a[] = { + 67.7990939565631635, + 20.9237219226859859, + -0.45840871823085836, + 0.06272149946755639, + -0.01056229551143042, + 0.00198445078693100, + -0.00039903958650729, + 0.00008404489865469, + -0.00001830717574922, + 4.09103745566e-6, + -9.3275533309e-7, + 2.1614056403e-7, + -5.075725222e-8, + 1.205352081e-8, + -2.88971837e-9, + 6.9846848e-10, + -1.7002946e-10, + 4.164941e-11, + -1.025859e-11, + 2.53921e-12, + -6.3128e-13, + 1.5757e-13, + -3.947e-14, + 9.92e-15, + -2.50e-15, + 6.3e-16 +}; + + +/* Chebyshev expansion: j_{nu,16} = c_k T_k*(nu/32), nu <= 32 */ +static const double coef_jnu16_a[] = { + 72.3725729616724770, + 22.32040402918608585, + -0.48881449782358690, + 0.06684305681828766, + -0.01124998690363398, + 0.00211247882775445, + -0.00042455166484632, + 0.00008937015316346, + -0.00001945687139551, + 4.34569739281e-6, + -9.9031173548e-7, + 2.2936247195e-7, + -5.383562595e-8, + 1.277835103e-8, + -3.06202860e-9, + 7.3977037e-10, + -1.8000071e-10, + 4.407196e-11, + -1.085046e-11, + 2.68453e-12, + -6.6712e-13, + 1.6644e-13, + -4.168e-14, + 1.047e-14, + -2.64e-15, + 6.7e-16 +}; + + +/* Chebyshev expansion: j_{nu,17} = c_k T_k*(nu/34), nu <= 34 */ +static const double coef_jnu17_a[] = { + 76.9460667535209549, + 23.71708159112252670, + -0.51921943142405352, + 0.07096442978067622, + -0.01193763559341369, + 0.00224049662974902, + -0.00045006122941781, + 0.00009469477941684, + -0.00002060640777107, + 4.60031647195e-6, + -1.04785755046e-6, + 2.4258161247e-7, + -5.691327087e-8, + 1.350298805e-8, + -3.23428733e-9, + 7.8105847e-10, + -1.8996825e-10, + 4.649350e-11, + -1.144205e-11, + 2.82979e-12, + -7.0294e-13, + 1.7531e-13, + -4.388e-14, + 1.102e-14, + -2.78e-15, + 7.0e-16 +}; + + +/* Chebyshev expansion: j_{nu,18} = c_k T_k*(nu/36), nu <= 36 */ +static const double coef_jnu18_a[] = { + 81.5195728368096659, + 25.11375537470259305, + -0.54962366347317668, + 0.07508565026117689, + -0.01262524908033818, + 0.00236850602019778, + -0.00047556873651929, + 0.00010001889347161, + -0.00002175581482429, + 4.85490251239e-6, + -1.10539483940e-6, + 2.5579853343e-7, + -5.999033352e-8, + 1.422747129e-8, + -3.40650521e-9, + 8.2233565e-10, + -1.9993286e-10, + 4.891426e-11, + -1.203343e-11, + 2.97498e-12, + -7.3875e-13, + 1.8418e-13, + -4.608e-14, + 1.157e-14, + -2.91e-15, + 7.4e-16 +}; + + +/* Chebyshev expansion: j_{nu,19} = c_k T_k*(nu/38), nu <= 38 */ +static const double coef_jnu19_a[] = { + 86.0930892477047512, + 26.51042598308271729, + -0.58002730731948358, + 0.07920674321589394, + -0.01331283320930301, + 0.00249650841778073, + -0.00050107453900793, + 0.00010534258471335, + -0.00002290511552874, + 5.10946148897e-6, + -1.16292517157e-6, + 2.6901365037e-7, + -6.306692473e-8, + 1.495183048e-8, + -3.57869025e-9, + 8.6360410e-10, + -2.0989514e-10, + 5.133439e-11, + -1.262465e-11, + 3.12013e-12, + -7.7455e-13, + 1.9304e-13, + -4.829e-14, + 1.212e-14, + -3.05e-15, + 7.7e-16 +}; + + +/* Chebyshev expansion: j_{nu,20} = c_k T_k*(nu/40), nu <= 40 */ +static const double coef_jnu20_a[] = { + 90.6666144195163770, + 27.9070938975436823, + -0.61043045315390591, + 0.08332772844325554, + -0.01400039260208282, + 0.00262450494035660, + -0.00052657891389470, + 0.00011066592304919, + -0.00002405432778364, + 5.36399803946e-6, + -1.22044976064e-6, + 2.8222728362e-7, + -6.614312964e-8, + 1.567608839e-8, + -3.75084856e-9, + 9.0486546e-10, + -2.1985553e-10, + 5.375401e-11, + -1.321572e-11, + 3.26524e-12, + -8.1033e-13, + 2.0190e-13, + -5.049e-14, + 1.267e-14, + -3.19e-15, + 8.0e-16, + -2.0e-16 +}; + + +static const double * coef_jnu_a[] = { + 0, + coef_jnu1_a, + coef_jnu2_a, + coef_jnu3_a, + coef_jnu4_a, + coef_jnu5_a, + coef_jnu6_a, + coef_jnu7_a, + coef_jnu8_a, + coef_jnu9_a, + coef_jnu10_a, + coef_jnu11_a, + coef_jnu12_a, + coef_jnu13_a, + coef_jnu14_a, + coef_jnu15_a, + coef_jnu16_a, + coef_jnu17_a, + coef_jnu18_a, + coef_jnu19_a, + coef_jnu20_a +}; + +static const size_t size_jnu_a[] = { + 0, + sizeof(coef_jnu1_a)/sizeof(double), + sizeof(coef_jnu2_a)/sizeof(double), + sizeof(coef_jnu3_a)/sizeof(double), + sizeof(coef_jnu4_a)/sizeof(double), + sizeof(coef_jnu5_a)/sizeof(double), + sizeof(coef_jnu6_a)/sizeof(double), + sizeof(coef_jnu7_a)/sizeof(double), + sizeof(coef_jnu8_a)/sizeof(double), + sizeof(coef_jnu9_a)/sizeof(double), + sizeof(coef_jnu10_a)/sizeof(double), + sizeof(coef_jnu11_a)/sizeof(double), + sizeof(coef_jnu12_a)/sizeof(double), + sizeof(coef_jnu13_a)/sizeof(double), + sizeof(coef_jnu14_a)/sizeof(double), + sizeof(coef_jnu15_a)/sizeof(double), + sizeof(coef_jnu16_a)/sizeof(double), + sizeof(coef_jnu17_a)/sizeof(double), + sizeof(coef_jnu18_a)/sizeof(double), + sizeof(coef_jnu19_a)/sizeof(double), + sizeof(coef_jnu20_a)/sizeof(double) +}; + + +static const double * coef_jnu_b[] = { + 0, + coef_jnu1_b, + coef_jnu2_b, + coef_jnu3_b, + coef_jnu4_b, + coef_jnu5_b, + coef_jnu6_b, + coef_jnu7_b, + coef_jnu8_b, + coef_jnu9_b, + coef_jnu10_b +}; + +static const size_t size_jnu_b[] = { + 0, + sizeof(coef_jnu1_b)/sizeof(double), + sizeof(coef_jnu2_b)/sizeof(double), + sizeof(coef_jnu3_b)/sizeof(double), + sizeof(coef_jnu4_b)/sizeof(double), + sizeof(coef_jnu5_b)/sizeof(double), + sizeof(coef_jnu6_b)/sizeof(double), + sizeof(coef_jnu7_b)/sizeof(double), + sizeof(coef_jnu8_b)/sizeof(double), + sizeof(coef_jnu9_b)/sizeof(double), + sizeof(coef_jnu10_b)/sizeof(double) +}; + + + +/* Evaluate Clenshaw recurrence for + * a T* Chebyshev series. + * sizeof(c) = N+1 + */ +static double +clenshaw(const double * c, int N, double u) +{ + double B_np1 = 0.0; + double B_n = c[N]; + double B_nm1; + int n; + for(n=N; n>0; n--) { + B_nm1 = 2.0*(2.0*u-1.0) * B_n - B_np1 + c[n-1]; + B_np1 = B_n; + B_n = B_nm1; + } + return B_n - (2.0*u-1.0)*B_np1; +} + + + +/* correction terms to leading McMahon expansion + * [Abramowitz+Stegun 9.5.12] + * [Olver, Royal Society Math. Tables, v. 7] + * We factor out a beta, so that this is a multiplicative + * correction: + * j_{nu,s} = beta(s,nu) * mcmahon_correction(nu, beta(s,nu)) + * macmahon_correction --> 1 as s --> Inf + */ +static double +mcmahon_correction(const double mu, const double beta) +{ + const double eb = 8.0*beta; + const double ebsq = eb*eb; + + if(mu < GSL_DBL_EPSILON) { + /* Prevent division by zero below. */ + const double term1 = 1.0/ebsq; + const double term2 = -4.0*31.0/(3*ebsq*ebsq); + const double term3 = 32.0*3779.0/(15.0*ebsq*ebsq*ebsq); + const double term4 = -64.0*6277237.0/(105.0*ebsq*ebsq*ebsq*ebsq); + const double term5 = 512.0*2092163573.0/(315.0*ebsq*ebsq*ebsq*ebsq*ebsq); + return 1.0 + 8.0*(term1 + term2 + term3 + term4 + term5); + } + else { + /* Here we do things in terms of 1/mu, which + * is purely to prevent overflow in the very + * unlikely case that mu is really big. + */ + const double mi = 1.0/mu; + const double r = mu/ebsq; + const double n2 = 4.0/3.0 * (7.0 - 31.0*mi); + const double n3 = 32.0/15.0 * (83.0 + (-982.0 + 3779.0*mi)*mi); + const double n4 = 64.0/105.0 * (6949.0 + (-153855.0 + (1585743.0 - 6277237.0*mi)*mi)*mi); + const double n5 = 512.0/315.0 * (70197.0 + (-2479316.0 + (48010494.0 + (-512062548.0 + 2092163573.0*mi)*mi)*mi)*mi); + const double n6 = 2048.0/3465.0 * (5592657.0 + (-287149133.0 + (8903961290.0 + (-179289628602.0 + (1982611456181.0 - 8249725736393.0*mi)*mi)*mi)*mi)*mi); + const double term1 = (1.0 - mi) * r; + const double term2 = term1 * n2 * r; + const double term3 = term1 * n3 * r*r; + const double term4 = term1 * n4 * r*r*r; + const double term5 = term1 * n5 * r*r*r*r; + const double term6 = term1 * n6 * r*r*r*r*r; + return 1.0 - 8.0*(term1 + term2 + term3 + term4 + term5 + term6); + } +} + + +/* Assumes z >= 1.0 */ +static double +olver_b0(double z, double minus_zeta) +{ + if(z < 1.02) { + const double a = 1.0-z; + const double c0 = 0.0179988721413553309252458658183; + const double c1 = 0.0111992982212877614645974276203; + const double c2 = 0.0059404069786014304317781160605; + const double c3 = 0.0028676724516390040844556450173; + const double c4 = 0.0012339189052567271708525111185; + const double c5 = 0.0004169250674535178764734660248; + const double c6 = 0.0000330173385085949806952777365; + const double c7 = -0.0001318076238578203009990106425; + const double c8 = -0.0001906870370050847239813945647; + return c0 + a*(c1 + a*(c2 + a*(c3 + a*(c4 + a*(c5 + a*(c6 + a*(c7 + a*c8))))))); + } + else { + const double abs_zeta = minus_zeta; + const double t = 1.0/(z*sqrt(1.0 - 1.0/(z*z))); + return -5.0/(48.0*abs_zeta*abs_zeta) + t*(3.0 + 5.0*t*t)/(24.0*sqrt(abs_zeta)); + } +} + + +inline +static double +olver_f1(double z, double minus_zeta) +{ + const double b0 = olver_b0(z, minus_zeta); + const double h2 = sqrt(4.0*minus_zeta/(z*z-1.0)); /* FIXME */ + return 0.5 * z * h2 * b0; +} + + +int +gsl_sf_bessel_zero_J0_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s == 0){ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EINVAL); + } + else { + /* See [F. Lether, J. Comp. Appl .Math. 67, 167 (1996)]. */ + + static const double P[] = { 1567450796.0/12539606369.0, + 8903660.0/2365861.0, + 10747040.0/536751.0, + 17590991.0/1696654.0 + }; + static const double Q[] = { 1.0, + 29354255.0/954518.0, + 76900001.0/431847.0, + 67237052.0/442411.0 + }; + + const double beta = (s - 0.25) * M_PI; + const double bi2 = 1.0/(beta*beta); + const double R33num = P[0] + bi2 * (P[1] + bi2 * (P[2] + P[3] * bi2)); + const double R33den = Q[0] + bi2 * (Q[1] + bi2 * (Q[2] + Q[3] * bi2)); + const double R33 = R33num/R33den; + result->val = beta + R33/beta; + result->err = fabs(3.0e-15 * result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_bessel_zero_J1_e(unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s == 0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* See [M. Branders et al., J. Comp. Phys. 42, 403 (1981)]. */ + + static const double a[] = { -0.362804405737084, + 0.120341279038597, + 0.439454547101171e-01, + 0.159340088474713e-02 + }; + static const double b[] = { 1.0, + -0.325641790801361, + -0.117453445968927, + -0.424906902601794e-02 + }; + + const double beta = (s + 0.25) * M_PI; + const double bi2 = 1.0/(beta*beta); + const double Rnum = a[3] + bi2 * (a[2] + bi2 * (a[1] + bi2 * a[0])); + const double Rden = b[3] + bi2 * (b[2] + bi2 * (b[1] + bi2 * b[0])); + const double R = Rnum/Rden; + result->val = beta * (1.0 + R*bi2); + result->err = fabs(2.0e-14 * result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_bessel_zero_Jnu_e(double nu, unsigned int s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(nu <= -1.0) { + DOMAIN_ERROR(result); + } + else if(s == 0) { + result->val = 0.0; + result->err = 0.0; + if (nu == 0.0) { + GSL_ERROR ("no zero-th root for nu = 0.0", GSL_EINVAL); + } + return GSL_SUCCESS; + } + else if(nu < 0.0) { + /* This can be done, I'm just lazy now. */ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR("unimplemented", GSL_EUNIMPL); + } + else if(s == 1) { + /* Chebyshev fits for the first positive zero. + * For some reason Nemeth made this different from the others. + */ + if(nu < 2.0) { + const double * c = coef_jnu_a[s]; + const size_t L = size_jnu_a[s]; + const double arg = nu/2.0; + const double chb = clenshaw(c, L-1, arg); + result->val = chb; + result->err = 2.0e-15 * result->val; + } + else { + const double * c = coef_jnu_b[s]; + const size_t L = size_jnu_b[s]; + const double arg = pow(2.0/nu, 2.0/3.0); + const double chb = clenshaw(c, L-1, arg); + result->val = nu * chb; + result->err = 2.0e-15 * result->val; + } + return GSL_SUCCESS; + } + else if(s <= 10) { + /* Chebyshev fits for the first 10 positive zeros. */ + if(nu < s) { + const double * c = coef_jnu_a[s]; + const size_t L = size_jnu_a[s]; + const double arg = nu/s; + const double chb = clenshaw(c, L-1, arg); + result->val = chb; + result->err = 2.0e-15 * result->val; + } + else { + const double * c = coef_jnu_b[s]; + const size_t L = size_jnu_b[s]; + const double arg = pow(s/nu, 2.0/3.0); + const double chb = clenshaw(c, L-1, arg); + result->val = nu * chb; + result->err = 2.0e-15 * result->val; + + /* FIXME: truth in advertising for the screwed up + * s = 5 fit. Need to fix that. + */ + if(s == 5) { + result->err *= 5.0e+06; + } + } + return GSL_SUCCESS; + } + else if(s > 0.5*nu && s <= 20) { + /* Chebyshev fits for 10 < s <= 20. */ + const double * c = coef_jnu_a[s]; + const size_t L = size_jnu_a[s]; + const double arg = nu/(2.0*s); + const double chb = clenshaw(c, L-1, arg); + result->val = chb; + result->err = 4.0e-15 * chb; + return GSL_SUCCESS; + } + else if(s > 2.0 * nu) { + /* McMahon expansion if s is large compared to nu. */ + const double beta = (s + 0.5*nu - 0.25) * M_PI; + const double mc = mcmahon_correction(4.0*nu*nu, beta); + gsl_sf_result rat12; + gsl_sf_pow_int_e(nu/beta, 14, &rat12); + result->val = beta * mc; + result->err = 4.0 * fabs(beta) * rat12.val; + result->err += 4.0 * fabs(GSL_DBL_EPSILON * result->val); + return GSL_SUCCESS; + } + else { + /* Olver uniform asymptotic. */ + gsl_sf_result as; + const int stat_as = gsl_sf_airy_zero_Ai_e(s, &as); + const double minus_zeta = -pow(nu,-2.0/3.0) * as.val; + const double z = gsl_sf_bessel_Olver_zofmzeta(minus_zeta); + const double f1 = olver_f1(z, minus_zeta); + result->val = nu * (z + f1/(nu*nu)); + result->err = 0.001/(nu*nu*nu); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_as; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_bessel_zero_J0(unsigned int s) +{ + EVAL_RESULT(gsl_sf_bessel_zero_J0_e(s, &result)); +} + +double gsl_sf_bessel_zero_J1(unsigned int s) +{ + EVAL_RESULT(gsl_sf_bessel_zero_J1_e(s, &result)); +} + +double gsl_sf_bessel_zero_Jnu(double nu, unsigned int s) +{ + EVAL_RESULT(gsl_sf_bessel_zero_Jnu_e(nu, s, &result)); +} diff --git a/software/gsl-1.15/specfunc/beta.c b/software/gsl-1.15/specfunc/beta.c new file mode 100644 index 000000000..692514540 --- /dev/null +++ b/software/gsl-1.15/specfunc/beta.c @@ -0,0 +1,169 @@ +/* specfunc/beta.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +static double +isnegint (const double x) +{ + return (x < 0) && (x == floor(x)); +} + +int +gsl_sf_lnbeta_e(const double x, const double y, gsl_sf_result * result) +{ + double sgn; + int status = gsl_sf_lnbeta_sgn_e(x,y,result,&sgn); + if (sgn == -1) { + DOMAIN_ERROR(result); + } + return status; +} + +int +gsl_sf_lnbeta_sgn_e(const double x, const double y, gsl_sf_result * result, double * sgn) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0 || y == 0.0) { + *sgn = 0.0; + DOMAIN_ERROR(result); + } else if (isnegint(x) || isnegint(y)) { + *sgn = 0.0; + DOMAIN_ERROR(result); /* not defined for negative integers */ + } + + /* See if we can handle the postive case with min/max < 0.2 */ + + if (x > 0 && y > 0) { + const double max = GSL_MAX(x,y); + const double min = GSL_MIN(x,y); + const double rat = min/max; + + if(rat < 0.2) { + /* min << max, so be careful + * with the subtraction + */ + double lnpre_val; + double lnpre_err; + double lnpow_val; + double lnpow_err; + double t1, t2, t3; + gsl_sf_result lnopr; + gsl_sf_result gsx, gsy, gsxy; + gsl_sf_gammastar_e(x, &gsx); + gsl_sf_gammastar_e(y, &gsy); + gsl_sf_gammastar_e(x+y, &gsxy); + gsl_sf_log_1plusx_e(rat, &lnopr); + lnpre_val = log(gsx.val*gsy.val/gsxy.val * M_SQRT2*M_SQRTPI); + lnpre_err = gsx.err/gsx.val + gsy.err/gsy.val + gsxy.err/gsxy.val; + t1 = min*log(rat); + t2 = 0.5*log(min); + t3 = (x+y-0.5)*lnopr.val; + lnpow_val = t1 - t2 - t3; + lnpow_err = GSL_DBL_EPSILON * (fabs(t1) + fabs(t2) + fabs(t3)); + lnpow_err += fabs(x+y-0.5) * lnopr.err; + result->val = lnpre_val + lnpow_val; + result->err = lnpre_err + lnpow_err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *sgn = 1.0; + return GSL_SUCCESS; + } + } + + /* General case - Fallback */ + { + gsl_sf_result lgx, lgy, lgxy; + double sgx, sgy, sgxy, xy = x+y; + int stat_gx = gsl_sf_lngamma_sgn_e(x, &lgx, &sgx); + int stat_gy = gsl_sf_lngamma_sgn_e(y, &lgy, &sgy); + int stat_gxy = gsl_sf_lngamma_sgn_e(xy, &lgxy, &sgxy); + *sgn = sgx * sgy * sgxy; + result->val = lgx.val + lgy.val - lgxy.val; + result->err = lgx.err + lgy.err + lgxy.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(lgx.val) + fabs(lgy.val) + fabs(lgxy.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_gx, stat_gy, stat_gxy); + } +} + + +int +gsl_sf_beta_e(const double x, const double y, gsl_sf_result * result) +{ + if((x > 0 && y > 0) && x < 50.0 && y < 50.0) { + /* Handle the easy case */ + gsl_sf_result gx, gy, gxy; + gsl_sf_gamma_e(x, &gx); + gsl_sf_gamma_e(y, &gy); + gsl_sf_gamma_e(x+y, &gxy); + result->val = (gx.val*gy.val)/gxy.val; + result->err = gx.err * fabs(gy.val/gxy.val); + result->err += gy.err * fabs(gx.val/gxy.val); + result->err += fabs((gx.val*gy.val)/(gxy.val*gxy.val)) * gxy.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if (isnegint(x) || isnegint(y)) { + DOMAIN_ERROR(result); + } else if (isnegint(x+y)) { /* infinity in the denominator */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } else { + gsl_sf_result lb; + double sgn; + int stat_lb = gsl_sf_lnbeta_sgn_e(x, y, &lb, &sgn); + if(stat_lb == GSL_SUCCESS) { + int status = gsl_sf_exp_err_e(lb.val, lb.err, result); + result->val *= sgn; + return status; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_lb; + } + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_lnbeta(const double x, const double y) +{ + EVAL_RESULT(gsl_sf_lnbeta_e(x, y, &result)); +} + +double gsl_sf_beta(const double x, const double y) +{ + EVAL_RESULT(gsl_sf_beta_e(x, y, &result)); +} diff --git a/software/gsl-1.15/specfunc/beta_inc.c b/software/gsl-1.15/specfunc/beta_inc.c new file mode 100644 index 000000000..836574e14 --- /dev/null +++ b/software/gsl-1.15/specfunc/beta_inc.c @@ -0,0 +1,210 @@ +/* specfunc/beta_inc.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +static double +isnegint (const double x) +{ + return (x < 0) && (x == floor(x)); +} + +static +int +beta_cont_frac( + const double a, + const double b, + const double x, + gsl_sf_result * result + ) +{ + const unsigned int max_iter = 512; /* control iterations */ + const double cutoff = 2.0 * GSL_DBL_MIN; /* control the zero cutoff */ + unsigned int iter_count = 0; + double cf; + + /* standard initialization for continued fraction */ + double num_term = 1.0; + double den_term = 1.0 - (a+b)*x/(a+1.0); + if (fabs(den_term) < cutoff) den_term = cutoff; + den_term = 1.0/den_term; + cf = den_term; + + while(iter_count < max_iter) { + const int k = iter_count + 1; + double coeff = k*(b-k)*x/(((a-1.0)+2*k)*(a+2*k)); + double delta_frac; + + /* first step */ + den_term = 1.0 + coeff*den_term; + num_term = 1.0 + coeff/num_term; + if(fabs(den_term) < cutoff) den_term = cutoff; + if(fabs(num_term) < cutoff) num_term = cutoff; + den_term = 1.0/den_term; + + delta_frac = den_term * num_term; + cf *= delta_frac; + + coeff = -(a+k)*(a+b+k)*x/((a+2*k)*(a+2*k+1.0)); + + /* second step */ + den_term = 1.0 + coeff*den_term; + num_term = 1.0 + coeff/num_term; + if(fabs(den_term) < cutoff) den_term = cutoff; + if(fabs(num_term) < cutoff) num_term = cutoff; + den_term = 1.0/den_term; + + delta_frac = den_term*num_term; + cf *= delta_frac; + + if(fabs(delta_frac-1.0) < 2.0*GSL_DBL_EPSILON) break; + + ++iter_count; + } + + result->val = cf; + result->err = iter_count * 4.0 * GSL_DBL_EPSILON * fabs(cf); + + if(iter_count >= max_iter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_beta_inc_e( + const double a, + const double b, + const double x, + gsl_sf_result * result + ) +{ + if(x < 0.0 || x > 1.0) { + DOMAIN_ERROR(result); + } else if (isnegint(a) || isnegint(b)) { + DOMAIN_ERROR(result); + } else if (isnegint(a+b)) { + DOMAIN_ERROR(result); + } else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x == 1.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } else if (a <= 0 || b <= 0) { + gsl_sf_result f, beta; + int stat; + const int stat_f = gsl_sf_hyperg_2F1_e(a, 1-b, a+1, x, &f); + const int stat_beta = gsl_sf_beta_e(a, b, &beta); + double prefactor = (pow(x, a) / a); + result->val = prefactor * f.val / beta.val; + result->err = fabs(prefactor) * f.err/ fabs(beta.val) + fabs(result->val/beta.val) * beta.err; + + stat = GSL_ERROR_SELECT_2(stat_f, stat_beta); + if(stat == GSL_SUCCESS) { + CHECK_UNDERFLOW(result); + } + return stat; + } else { + gsl_sf_result ln_beta; + gsl_sf_result ln_x; + gsl_sf_result ln_1mx; + gsl_sf_result prefactor; + const int stat_ln_beta = gsl_sf_lnbeta_e(a, b, &ln_beta); + const int stat_ln_1mx = gsl_sf_log_1plusx_e(-x, &ln_1mx); + const int stat_ln_x = gsl_sf_log_e(x, &ln_x); + const int stat_ln = GSL_ERROR_SELECT_3(stat_ln_beta, stat_ln_1mx, stat_ln_x); + + const double ln_pre_val = -ln_beta.val + a * ln_x.val + b * ln_1mx.val; + const double ln_pre_err = ln_beta.err + fabs(a*ln_x.err) + fabs(b*ln_1mx.err); + const int stat_exp = gsl_sf_exp_err_e(ln_pre_val, ln_pre_err, &prefactor); + + if(stat_ln != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_ESANITY); + } + + if(x < (a + 1.0)/(a+b+2.0)) { + /* Apply continued fraction directly. */ + gsl_sf_result cf; + const int stat_cf = beta_cont_frac(a, b, x, &cf); + int stat; + result->val = prefactor.val * cf.val / a; + result->err = (fabs(prefactor.err * cf.val) + fabs(prefactor.val * cf.err))/a; + + stat = GSL_ERROR_SELECT_2(stat_exp, stat_cf); + if(stat == GSL_SUCCESS) { + CHECK_UNDERFLOW(result); + } + return stat; + } + else { + /* Apply continued fraction after hypergeometric transformation. */ + gsl_sf_result cf; + const int stat_cf = beta_cont_frac(b, a, 1.0-x, &cf); + int stat; + const double term = prefactor.val * cf.val / b; + result->val = 1.0 - term; + result->err = fabs(prefactor.err * cf.val)/b; + result->err += fabs(prefactor.val * cf.err)/b; + result->err += 2.0 * GSL_DBL_EPSILON * (1.0 + fabs(term)); + /* since the prefactor term is subtracted from 1 we need to + ignore underflow */ + if (stat_exp != GSL_EUNDRFLW) { + stat = GSL_ERROR_SELECT_2(stat_exp, stat_cf); + } else { + stat = stat_cf; + }; + if(stat == GSL_SUCCESS) { + CHECK_UNDERFLOW(result); + } + return stat; + } + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_beta_inc(const double a, const double b, const double x) +{ + EVAL_RESULT(gsl_sf_beta_inc_e(a, b, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/cheb_eval.c b/software/gsl-1.15/specfunc/cheb_eval.c new file mode 100644 index 000000000..a659ecba8 --- /dev/null +++ b/software/gsl-1.15/specfunc/cheb_eval.c @@ -0,0 +1,34 @@ + +static inline int +cheb_eval_e(const cheb_series * cs, + const double x, + gsl_sf_result * result) +{ + int j; + double d = 0.0; + double dd = 0.0; + + double y = (2.0*x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + double e = 0.0; + + for(j = cs->order; j>=1; j--) { + double temp = d; + d = y2*d - dd + cs->c[j]; + e += fabs(y2*temp) + fabs(dd) + fabs(cs->c[j]); + dd = temp; + } + + { + double temp = d; + d = y*d - dd + 0.5 * cs->c[0]; + e += fabs(y*temp) + fabs(dd) + 0.5 * fabs(cs->c[0]); + } + + result->val = d; + result->err = GSL_DBL_EPSILON * e + fabs(cs->c[cs->order]); + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/specfunc/cheb_eval_mode.c b/software/gsl-1.15/specfunc/cheb_eval_mode.c new file mode 100644 index 000000000..80127dede --- /dev/null +++ b/software/gsl-1.15/specfunc/cheb_eval_mode.c @@ -0,0 +1,30 @@ +static inline int +cheb_eval_mode_e(const cheb_series * cs, + const double x, + gsl_mode_t mode, + gsl_sf_result * result) +{ + int j; + double d = 0.0; + double dd = 0.0; + + double y = (2.*x - cs->a - cs->b) / (cs->b - cs->a); + double y2 = 2.0 * y; + + int eval_order; + + if(GSL_MODE_PREC(mode) == GSL_PREC_DOUBLE) + eval_order = cs->order; + else + eval_order = cs->order_sp; + + for(j = eval_order; j>=1; j--) { + double temp = d; + d = y2*d - dd + cs->c[j]; + dd = temp; + } + + result->val = y*d - dd + 0.5 * cs->c[0]; + result->err = GSL_DBL_EPSILON * fabs(result->val) + fabs(cs->c[eval_order]); + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/specfunc/chebyshev.h b/software/gsl-1.15/specfunc/chebyshev.h new file mode 100644 index 000000000..2d93ec71d --- /dev/null +++ b/software/gsl-1.15/specfunc/chebyshev.h @@ -0,0 +1,31 @@ +/* specfunc/chebyshev.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* data for a Chebyshev series over a given interval */ + +struct cheb_series_struct { + double * c; /* coefficients */ + int order; /* order of expansion */ + double a; /* lower interval point */ + double b; /* upper interval point */ + int order_sp; /* effective single precision order */ +}; +typedef struct cheb_series_struct cheb_series; + + diff --git a/software/gsl-1.15/specfunc/check.h b/software/gsl-1.15/specfunc/check.h new file mode 100644 index 000000000..df6eee689 --- /dev/null +++ b/software/gsl-1.15/specfunc/check.h @@ -0,0 +1,3 @@ +/* check for underflow */ + +#define CHECK_UNDERFLOW(r) if (fabs((r)->val) < GSL_DBL_MIN) GSL_ERROR("underflow", GSL_EUNDRFLW); diff --git a/software/gsl-1.15/specfunc/clausen.c b/software/gsl-1.15/specfunc/clausen.c new file mode 100644 index 000000000..ebaebbd62 --- /dev/null +++ b/software/gsl-1.15/specfunc/clausen.c @@ -0,0 +1,111 @@ +/* specfunc/clausen.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "chebyshev.h" +#include "cheb_eval.c" + +static double aclaus_data[15] = { + 2.142694363766688447e+00, + 0.723324281221257925e-01, + 0.101642475021151164e-02, + 0.3245250328531645e-04, + 0.133315187571472e-05, + 0.6213240591653e-07, + 0.313004135337e-08, + 0.16635723056e-09, + 0.919659293e-11, + 0.52400462e-12, + 0.3058040e-13, + 0.18197e-14, + 0.1100e-15, + 0.68e-17, + 0.4e-18 +}; +static cheb_series aclaus_cs = { + aclaus_data, + 14, + -1, 1, + 8 /* FIXME: this is a guess, correct value needed here BJG */ +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_clausen_e(double x, gsl_sf_result *result) +{ + const double x_cut = M_PI * GSL_SQRT_DBL_EPSILON; + + double sgn = 1.0; + int status_red; + + if(x < 0.0) { + x = -x; + sgn = -1.0; + } + + /* Argument reduction to [0, 2pi) */ + status_red = gsl_sf_angle_restrict_pos_e(&x); + + /* Further reduction to [0,pi) */ + if(x > M_PI) { + /* simulated extra precision: 2PI = p0 + p1 */ + const double p0 = 6.28125; + const double p1 = 0.19353071795864769253e-02; + x = (p0 - x) + p1; + sgn = -sgn; + } + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + } + else if(x < x_cut) { + result->val = x * (1.0 - log(x)); + result->err = x * GSL_DBL_EPSILON; + } + else { + const double t = 2.0*(x*x / (M_PI*M_PI) - 0.5); + gsl_sf_result result_c; + cheb_eval_e(&aclaus_cs, t, &result_c); + result->val = x * (result_c.val - log(x)); + result->err = x * (result_c.err + GSL_DBL_EPSILON); + } + + result->val *= sgn; + + return status_red; +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_clausen(const double x) +{ + EVAL_RESULT(gsl_sf_clausen_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/coulomb.c b/software/gsl-1.15/specfunc/coulomb.c new file mode 100644 index 000000000..2e0ac7c7e --- /dev/null +++ b/software/gsl-1.15/specfunc/coulomb.c @@ -0,0 +1,1417 @@ +/* specfunc/coulomb.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Evaluation of Coulomb wave functions F_L(eta, x), G_L(eta, x), + * and their derivatives. A combination of Steed's method, asymptotic + * results, and power series. + * + * Steed's method: + * [Barnett, CPC 21, 297 (1981)] + * Power series and other methods: + * [Biedenharn et al., PR 97, 542 (1954)] + * [Bardin et al., CPC 3, 73 (1972)] + * [Abad+Sesma, CPC 71, 110 (1992)] + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +/* the L=0 normalization constant + * [Abramowitz+Stegun 14.1.8] + */ +static +double +C0sq(double eta) +{ + double twopieta = 2.0*M_PI*eta; + + if(fabs(eta) < GSL_DBL_EPSILON) { + return 1.0; + } + else if(twopieta > GSL_LOG_DBL_MAX) { + return 0.0; + } + else { + gsl_sf_result scale; + gsl_sf_expm1_e(twopieta, &scale); + return twopieta/scale.val; + } +} + + +/* the full definition of C_L(eta) for any valid L and eta + * [Abramowitz and Stegun 14.1.7] + * This depends on the complex gamma function. For large + * arguments the phase of the complex gamma function is not + * very accurately determined. However the modulus is, and that + * is all that we need to calculate C_L. + * + * This is not valid for L <= -3/2 or L = -1. + */ +static +int +CLeta(double L, double eta, gsl_sf_result * result) +{ + gsl_sf_result ln1; /* log of numerator Gamma function */ + gsl_sf_result ln2; /* log of denominator Gamma function */ + double sgn = 1.0; + double arg_val, arg_err; + + if(fabs(eta/(L+1.0)) < GSL_DBL_EPSILON) { + gsl_sf_lngamma_e(L+1.0, &ln1); + } + else { + gsl_sf_result p1; /* phase of numerator Gamma -- not used */ + gsl_sf_lngamma_complex_e(L+1.0, eta, &ln1, &p1); /* should be ok */ + } + + gsl_sf_lngamma_e(2.0*(L+1.0), &ln2); + if(L < -1.0) sgn = -sgn; + + arg_val = L*M_LN2 - 0.5*eta*M_PI + ln1.val - ln2.val; + arg_err = ln1.err + ln2.err; + arg_err += GSL_DBL_EPSILON * (fabs(L*M_LN2) + fabs(0.5*eta*M_PI)); + return gsl_sf_exp_err_e(arg_val, arg_err, result); +} + + +int +gsl_sf_coulomb_CL_e(double lam, double eta, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(lam <= -1.0) { + DOMAIN_ERROR(result); + } + else if(fabs(lam) < GSL_DBL_EPSILON) { + /* saves a calculation of complex_lngamma(), otherwise not necessary */ + result->val = sqrt(C0sq(eta)); + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + return CLeta(lam, eta, result); + } +} + + +/* cl[0] .. cl[kmax] = C_{lam_min}(eta) .. C_{lam_min+kmax}(eta) + */ +int +gsl_sf_coulomb_CL_array(double lam_min, int kmax, double eta, double * cl) +{ + int k; + gsl_sf_result cl_0; + gsl_sf_coulomb_CL_e(lam_min, eta, &cl_0); + cl[0] = cl_0.val; + + for(k=1; k<=kmax; k++) { + double L = lam_min + k; + cl[k] = cl[k-1] * hypot(L, eta)/(L*(2.0*L+1.0)); + } + + return GSL_SUCCESS; +} + + +/* Evaluate the series for Phi_L(eta,x) and Phi_L*(eta,x) + * [Abramowitz+Stegun 14.1.5] + * [Abramowitz+Stegun 14.1.13] + * + * The sequence of coefficients A_k^L is + * manifestly well-controlled for L >= -1/2 + * and eta < 10. + * + * This makes sense since this is the region + * away from threshold, and you expect + * the evaluation to become easier as you + * get farther from threshold. + * + * Empirically, this is quite well-behaved for + * L >= -1/2 + * eta < 10 + * x < 10 + */ +#if 0 +static +int +coulomb_Phi_series(const double lam, const double eta, const double x, + double * result, double * result_star) +{ + int kmin = 5; + int kmax = 200; + int k; + double Akm2 = 1.0; + double Akm1 = eta/(lam+1.0); + double Ak; + + double xpow = x; + double sum = Akm2 + Akm1*x; + double sump = (lam+1.0)*Akm2 + (lam+2.0)*Akm1*x; + double prev_abs_del = fabs(Akm1*x); + double prev_abs_del_p = (lam+2.0) * prev_abs_del; + + for(k=2; k kmin + ) break; + + /* We need to keep track of the previous delta because when + * eta is near zero the odd terms of the sum are very small + * and this could lead to premature termination. + */ + prev_abs_del = abs_del; + prev_abs_del_p = abs_del_p; + + Akm2 = Akm1; + Akm1 = Ak; + } + + *result = sum; + *result_star = sump; + + if(k==kmax) { + GSL_ERROR ("error", GSL_EMAXITER); + } + else { + return GSL_SUCCESS; + } +} +#endif /* 0 */ + + +/* Determine the connection phase, phi_lambda. + * See coulomb_FG_series() below. We have + * to be careful about sin(phi)->0. Note that + * there is an underflow condition for large + * positive eta in any case. + */ +static +int +coulomb_connection(const double lam, const double eta, + double * cos_phi, double * sin_phi) +{ + if(eta > -GSL_LOG_DBL_MIN/2.0*M_PI-1.0) { + *cos_phi = 1.0; + *sin_phi = 0.0; + GSL_ERROR ("error", GSL_EUNDRFLW); + } + else if(eta > -GSL_LOG_DBL_EPSILON/(4.0*M_PI)) { + const double eps = 2.0 * exp(-2.0*M_PI*eta); + const double tpl = tan(M_PI * lam); + const double dth = eps * tpl / (tpl*tpl + 1.0); + *cos_phi = -1.0 + 0.5 * dth*dth; + *sin_phi = -dth; + return GSL_SUCCESS; + } + else { + double X = tanh(M_PI * eta) / tan(M_PI * lam); + double phi = -atan(X) - (lam + 0.5) * M_PI; + *cos_phi = cos(phi); + *sin_phi = sin(phi); + return GSL_SUCCESS; + } +} + + +/* Evaluate the Frobenius series for F_lam(eta,x) and G_lam(eta,x). + * Homegrown algebra. Evaluates the series for F_{lam} and + * F_{-lam-1}, then uses + * G_{lam} = (F_{lam} cos(phi) - F_{-lam-1}) / sin(phi) + * where + * phi = Arg[Gamma[1+lam+I eta]] - Arg[Gamma[-lam + I eta]] - (lam+1/2)Pi + * = Arg[Sin[Pi(-lam+I eta)] - (lam+1/2)Pi + * = atan2(-cos(lam Pi)sinh(eta Pi), -sin(lam Pi)cosh(eta Pi)) - (lam+1/2)Pi + * + * = -atan(X) - (lam+1/2) Pi, X = tanh(eta Pi)/tan(lam Pi) + * + * Not appropriate for lam <= -1/2, lam = 0, or lam >= 1/2. + */ +static +int +coulomb_FG_series(const double lam, const double eta, const double x, + gsl_sf_result * F, gsl_sf_result * G) +{ + const int max_iter = 800; + gsl_sf_result ClamA; + gsl_sf_result ClamB; + int stat_A = CLeta(lam, eta, &ClamA); + int stat_B = CLeta(-lam-1.0, eta, &ClamB); + const double tlp1 = 2.0*lam + 1.0; + const double pow_x = pow(x, lam); + double cos_phi_lam; + double sin_phi_lam; + + double uA_mm2 = 1.0; /* uA sum is for F_{lam} */ + double uA_mm1 = x*eta/(lam+1.0); + double uA_m; + double uB_mm2 = 1.0; /* uB sum is for F_{-lam-1} */ + double uB_mm1 = -x*eta/lam; + double uB_m; + double A_sum = uA_mm2 + uA_mm1; + double B_sum = uB_mm2 + uB_mm1; + double A_abs_del_prev = fabs(A_sum); + double B_abs_del_prev = fabs(B_sum); + gsl_sf_result FA, FB; + int m = 2; + + int stat_conn = coulomb_connection(lam, eta, &cos_phi_lam, &sin_phi_lam); + + if(stat_conn == GSL_EUNDRFLW) { + F->val = 0.0; /* FIXME: should this be set to Inf too like G? */ + F->err = 0.0; + OVERFLOW_ERROR(G); + } + + while(m < max_iter) { + double abs_dA; + double abs_dB; + uA_m = x*(2.0*eta*uA_mm1 - x*uA_mm2)/(m*(m+tlp1)); + uB_m = x*(2.0*eta*uB_mm1 - x*uB_mm2)/(m*(m-tlp1)); + A_sum += uA_m; + B_sum += uB_m; + abs_dA = fabs(uA_m); + abs_dB = fabs(uB_m); + if(m > 15) { + /* Don't bother checking until we have gone out a little ways; + * a minor optimization. Also make sure to check both the + * current and the previous increment because the odd and even + * terms of the sum can have very different behaviour, depending + * on the value of eta. + */ + double max_abs_dA = GSL_MAX(abs_dA, A_abs_del_prev); + double max_abs_dB = GSL_MAX(abs_dB, B_abs_del_prev); + double abs_A = fabs(A_sum); + double abs_B = fabs(B_sum); + if( max_abs_dA/(max_abs_dA + abs_A) < 4.0*GSL_DBL_EPSILON + && max_abs_dB/(max_abs_dB + abs_B) < 4.0*GSL_DBL_EPSILON + ) break; + } + A_abs_del_prev = abs_dA; + B_abs_del_prev = abs_dB; + uA_mm2 = uA_mm1; + uA_mm1 = uA_m; + uB_mm2 = uB_mm1; + uB_mm1 = uB_m; + m++; + } + + FA.val = A_sum * ClamA.val * pow_x * x; + FA.err = fabs(A_sum) * ClamA.err * pow_x * x + 2.0*GSL_DBL_EPSILON*fabs(FA.val); + FB.val = B_sum * ClamB.val / pow_x; + FB.err = fabs(B_sum) * ClamB.err / pow_x + 2.0*GSL_DBL_EPSILON*fabs(FB.val); + + F->val = FA.val; + F->err = FA.err; + + G->val = (FA.val * cos_phi_lam - FB.val)/sin_phi_lam; + G->err = (FA.err * fabs(cos_phi_lam) + FB.err)/fabs(sin_phi_lam); + + if(m >= max_iter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_ERROR_SELECT_2(stat_A, stat_B); +} + + +/* Evaluate the Frobenius series for F_0(eta,x) and G_0(eta,x). + * See [Bardin et al., CPC 3, 73 (1972), (14)-(17)]; + * note the misprint in (17): nu_0=1 is correct, not nu_0=0. + */ +static +int +coulomb_FG0_series(const double eta, const double x, + gsl_sf_result * F, gsl_sf_result * G) +{ + const int max_iter = 800; + const double x2 = x*x; + const double tex = 2.0*eta*x; + gsl_sf_result C0; + int stat_CL = CLeta(0.0, eta, &C0); + gsl_sf_result r1pie; + int psi_stat = gsl_sf_psi_1piy_e(eta, &r1pie); + double u_mm2 = 0.0; /* u_0 */ + double u_mm1 = x; /* u_1 */ + double u_m; + double v_mm2 = 1.0; /* nu_0 */ + double v_mm1 = tex*(2.0*M_EULER-1.0+r1pie.val); /* nu_1 */ + double v_m; + double u_sum = u_mm2 + u_mm1; + double v_sum = v_mm2 + v_mm1; + double u_abs_del_prev = fabs(u_sum); + double v_abs_del_prev = fabs(v_sum); + int m = 2; + double u_sum_err = 2.0 * GSL_DBL_EPSILON * fabs(u_sum); + double v_sum_err = 2.0 * GSL_DBL_EPSILON * fabs(v_sum); + double ln2x = log(2.0*x); + + while(m < max_iter) { + double abs_du; + double abs_dv; + double m_mm1 = m*(m-1.0); + u_m = (tex*u_mm1 - x2*u_mm2)/m_mm1; + v_m = (tex*v_mm1 - x2*v_mm2 - 2.0*eta*(2*m-1)*u_m)/m_mm1; + u_sum += u_m; + v_sum += v_m; + abs_du = fabs(u_m); + abs_dv = fabs(v_m); + u_sum_err += 2.0 * GSL_DBL_EPSILON * abs_du; + v_sum_err += 2.0 * GSL_DBL_EPSILON * abs_dv; + if(m > 15) { + /* Don't bother checking until we have gone out a little ways; + * a minor optimization. Also make sure to check both the + * current and the previous increment because the odd and even + * terms of the sum can have very different behaviour, depending + * on the value of eta. + */ + double max_abs_du = GSL_MAX(abs_du, u_abs_del_prev); + double max_abs_dv = GSL_MAX(abs_dv, v_abs_del_prev); + double abs_u = fabs(u_sum); + double abs_v = fabs(v_sum); + if( max_abs_du/(max_abs_du + abs_u) < 40.0*GSL_DBL_EPSILON + && max_abs_dv/(max_abs_dv + abs_v) < 40.0*GSL_DBL_EPSILON + ) break; + } + u_abs_del_prev = abs_du; + v_abs_del_prev = abs_dv; + u_mm2 = u_mm1; + u_mm1 = u_m; + v_mm2 = v_mm1; + v_mm1 = v_m; + m++; + } + + F->val = C0.val * u_sum; + F->err = C0.err * fabs(u_sum); + F->err += fabs(C0.val) * u_sum_err; + F->err += 2.0 * GSL_DBL_EPSILON * fabs(F->val); + + G->val = (v_sum + 2.0*eta*u_sum * ln2x) / C0.val; + G->err = (fabs(v_sum) + fabs(2.0*eta*u_sum * ln2x)) / fabs(C0.val) * fabs(C0.err/C0.val); + G->err += (v_sum_err + fabs(2.0*eta*u_sum_err*ln2x)) / fabs(C0.val); + G->err += 2.0 * GSL_DBL_EPSILON * fabs(G->val); + + if(m == max_iter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_ERROR_SELECT_2(psi_stat, stat_CL); +} + + +/* Evaluate the Frobenius series for F_{-1/2}(eta,x) and G_{-1/2}(eta,x). + * Homegrown algebra. + */ +static +int +coulomb_FGmhalf_series(const double eta, const double x, + gsl_sf_result * F, gsl_sf_result * G) +{ + const int max_iter = 800; + const double rx = sqrt(x); + const double x2 = x*x; + const double tex = 2.0*eta*x; + gsl_sf_result Cmhalf; + int stat_CL = CLeta(-0.5, eta, &Cmhalf); + double u_mm2 = 1.0; /* u_0 */ + double u_mm1 = tex * u_mm2; /* u_1 */ + double u_m; + double v_mm2, v_mm1, v_m; + double f_sum, g_sum; + double tmp1; + gsl_sf_result rpsi_1pe; + gsl_sf_result rpsi_1p2e; + int m = 2; + + gsl_sf_psi_1piy_e(eta, &rpsi_1pe); + gsl_sf_psi_1piy_e(2.0*eta, &rpsi_1p2e); + + v_mm2 = 2.0*M_EULER - M_LN2 - rpsi_1pe.val + 2.0*rpsi_1p2e.val; + v_mm1 = tex*(v_mm2 - 2.0*u_mm2); + + f_sum = u_mm2 + u_mm1; + g_sum = v_mm2 + v_mm1; + + while(m < max_iter) { + double m2 = m*m; + u_m = (tex*u_mm1 - x2*u_mm2)/m2; + v_m = (tex*v_mm1 - x2*v_mm2 - 2.0*m*u_m)/m2; + f_sum += u_m; + g_sum += v_m; + if( f_sum != 0.0 + && g_sum != 0.0 + && (fabs(u_m/f_sum) + fabs(v_m/g_sum) < 10.0*GSL_DBL_EPSILON)) break; + u_mm2 = u_mm1; + u_mm1 = u_m; + v_mm2 = v_mm1; + v_mm1 = v_m; + m++; + } + + F->val = Cmhalf.val * rx * f_sum; + F->err = Cmhalf.err * fabs(rx * f_sum) + 2.0*GSL_DBL_EPSILON*fabs(F->val); + + tmp1 = f_sum*log(x); + G->val = -rx*(tmp1 + g_sum)/Cmhalf.val; + G->err = fabs(rx)*(fabs(tmp1) + fabs(g_sum))/fabs(Cmhalf.val) * fabs(Cmhalf.err/Cmhalf.val); + + if(m == max_iter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return stat_CL; +} + + +/* Evolve the backwards recurrence for F,F'. + * + * F_{lam-1} = (S_lam F_lam + F_lam') / R_lam + * F_{lam-1}' = (S_lam F_{lam-1} - R_lam F_lam) + * where + * R_lam = sqrt(1 + (eta/lam)^2) + * S_lam = lam/x + eta/lam + * + */ +static +int +coulomb_F_recur(double lam_min, int kmax, + double eta, double x, + double F_lam_max, double Fp_lam_max, + double * F_lam_min, double * Fp_lam_min + ) +{ + double x_inv = 1.0/x; + double fcl = F_lam_max; + double fpl = Fp_lam_max; + double lam_max = lam_min + kmax; + double lam = lam_max; + int k; + + for(k=kmax-1; k>=0; k--) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double fc_lm1; + fc_lm1 = (fcl*sl + fpl)/rl; + fpl = fc_lm1*sl - fcl*rl; + fcl = fc_lm1; + lam -= 1.0; + } + + *F_lam_min = fcl; + *Fp_lam_min = fpl; + return GSL_SUCCESS; +} + + +/* Evolve the forward recurrence for G,G'. + * + * G_{lam+1} = (S_lam G_lam - G_lam')/R_lam + * G_{lam+1}' = R_{lam+1} G_lam - S_lam G_{lam+1} + * + * where S_lam and R_lam are as above in the F recursion. + */ +static +int +coulomb_G_recur(const double lam_min, const int kmax, + const double eta, const double x, + const double G_lam_min, const double Gp_lam_min, + double * G_lam_max, double * Gp_lam_max + ) +{ + double x_inv = 1.0/x; + double gcl = G_lam_min; + double gpl = Gp_lam_min; + double lam = lam_min + 1.0; + int k; + + for(k=1; k<=kmax; k++) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double gcl1 = (sl*gcl - gpl)/rl; + gpl = rl*gcl - sl*gcl1; + gcl = gcl1; + lam += 1.0; + } + + *G_lam_max = gcl; + *Gp_lam_max = gpl; + return GSL_SUCCESS; +} + + +/* Evaluate the first continued fraction, giving + * the ratio F'/F at the upper lambda value. + * We also determine the sign of F at that point, + * since it is the sign of the last denominator + * in the continued fraction. + */ +static +int +coulomb_CF1(double lambda, + double eta, double x, + double * fcl_sign, + double * result, + int * count + ) +{ + const double CF1_small = 1.e-30; + const double CF1_abort = 1.0e+05; + const double CF1_acc = 2.0*GSL_DBL_EPSILON; + const double x_inv = 1.0/x; + const double px = lambda + 1.0 + CF1_abort; + + double pk = lambda + 1.0; + double F = eta/pk + pk*x_inv; + double D, C; + double df; + + *fcl_sign = 1.0; + *count = 0; + + if(fabs(F) < CF1_small) F = CF1_small; + D = 0.0; + C = F; + + do { + double pk1 = pk + 1.0; + double ek = eta / pk; + double rk2 = 1.0 + ek*ek; + double tk = (pk + pk1)*(x_inv + ek/pk1); + D = tk - rk2 * D; + C = tk - rk2 / C; + if(fabs(C) < CF1_small) C = CF1_small; + if(fabs(D) < CF1_small) D = CF1_small; + D = 1.0/D; + df = D * C; + F = F * df; + if(D < 0.0) { + /* sign of result depends on sign of denominator */ + *fcl_sign = - *fcl_sign; + } + pk = pk1; + if( pk > px ) { + *result = F; + GSL_ERROR ("error", GSL_ERUNAWAY); + } + ++(*count); + } + while(fabs(df-1.0) > CF1_acc); + + *result = F; + return GSL_SUCCESS; +} + + +#if 0 +static +int +old_coulomb_CF1(const double lambda, + double eta, double x, + double * fcl_sign, + double * result + ) +{ + const double CF1_abort = 1.e5; + const double CF1_acc = 10.0*GSL_DBL_EPSILON; + const double x_inv = 1.0/x; + const double px = lambda + 1.0 + CF1_abort; + + double pk = lambda + 1.0; + + double D; + double df; + + double F; + double p; + double pk1; + double ek; + + double fcl = 1.0; + + double tk; + + while(1) { + ek = eta/pk; + F = (ek + pk*x_inv)*fcl + (fcl - 1.0)*x_inv; + pk1 = pk + 1.0; + if(fabs(eta*x + pk*pk1) > CF1_acc) break; + fcl = (1.0 + ek*ek)/(1.0 + eta*eta/(pk1*pk1)); + pk = 2.0 + pk; + } + + D = 1.0/((pk + pk1)*(x_inv + ek/pk1)); + df = -fcl*(1.0 + ek*ek)*D; + + if(fcl != 1.0) fcl = -1.0; + if(D < 0.0) fcl = -fcl; + + F = F + df; + + p = 1.0; + do { + pk = pk1; + pk1 = pk + 1.0; + ek = eta / pk; + tk = (pk + pk1)*(x_inv + ek/pk1); + D = tk - D*(1.0+ek*ek); + if(fabs(D) < sqrt(CF1_acc)) { + p += 1.0; + if(p > 2.0) { + printf("HELP............\n"); + } + } + D = 1.0/D; + if(D < 0.0) { + /* sign of result depends on sign of denominator */ + fcl = -fcl; + } + df = df*(D*tk - 1.0); + F = F + df; + if( pk > px ) { + GSL_ERROR ("error", GSL_ERUNAWAY); + } + } + while(fabs(df) > fabs(F)*CF1_acc); + + *fcl_sign = fcl; + *result = F; + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* Evaluate the second continued fraction to + * obtain the ratio + * (G' + i F')/(G + i F) := P + i Q + * at the specified lambda value. + */ +static +int +coulomb_CF2(const double lambda, const double eta, const double x, + double * result_P, double * result_Q, int * count + ) +{ + int status = GSL_SUCCESS; + + const double CF2_acc = 4.0*GSL_DBL_EPSILON; + const double CF2_abort = 2.0e+05; + + const double wi = 2.0*eta; + const double x_inv = 1.0/x; + const double e2mm1 = eta*eta + lambda*(lambda + 1.0); + + double ar = -e2mm1; + double ai = eta; + + double br = 2.0*(x - eta); + double bi = 2.0; + + double dr = br/(br*br + bi*bi); + double di = -bi/(br*br + bi*bi); + + double dp = -x_inv*(ar*di + ai*dr); + double dq = x_inv*(ar*dr - ai*di); + + double A, B, C, D; + + double pk = 0.0; + double P = 0.0; + double Q = 1.0 - eta*x_inv; + + *count = 0; + + do { + P += dp; + Q += dq; + pk += 2.0; + ar += pk; + ai += wi; + bi += 2.0; + D = ar*dr - ai*di + br; + di = ai*dr + ar*di + bi; + C = 1.0/(D*D + di*di); + dr = C*D; + di = -C*di; + A = br*dr - bi*di - 1.; + B = bi*dr + br*di; + C = dp*A - dq*B; + dq = dp*B + dq*A; + dp = C; + if(pk > CF2_abort) { + status = GSL_ERUNAWAY; + break; + } + ++(*count); + } + while(fabs(dp)+fabs(dq) > (fabs(P)+fabs(Q))*CF2_acc); + + if(Q < CF2_abort*GSL_DBL_EPSILON*fabs(P)) { + status = GSL_ELOSS; + } + + *result_P = P; + *result_Q = Q; + return status; +} + + +/* WKB evaluation of F, G. Assumes 0 < x < turning point. + * Overflows are trapped, GSL_EOVRFLW is signalled, + * and an exponent is returned such that: + * + * result_F = fjwkb * exp(-exponent) + * result_G = gjwkb * exp( exponent) + * + * See [Biedenharn et al. Phys. Rev. 97, 542-554 (1955), Section IV] + * + * Unfortunately, this is not very accurate in general. The + * test cases typically have 3-4 digits of precision. One could + * argue that this is ok for general use because, for instance, + * F is exponentially small in this region and so the absolute + * accuracy is still roughly acceptable. But it would be better + * to have a systematic method for improving the precision. See + * the Abad+Sesma method discussion below. + */ +static +int +coulomb_jwkb(const double lam, const double eta, const double x, + gsl_sf_result * fjwkb, gsl_sf_result * gjwkb, + double * exponent) +{ + const double llp1 = lam*(lam+1.0) + 6.0/35.0; + const double llp1_eff = GSL_MAX(llp1, 0.0); + const double rho_ghalf = sqrt(x*(2.0*eta - x) + llp1_eff); + const double sinh_arg = sqrt(llp1_eff/(eta*eta+llp1_eff)) * rho_ghalf / x; + const double sinh_inv = log(sinh_arg + hypot(1.0,sinh_arg)); + + const double phi = fabs(rho_ghalf - eta*atan2(rho_ghalf,x-eta) - sqrt(llp1_eff) * sinh_inv); + + const double zeta_half = pow(3.0*phi/2.0, 1.0/3.0); + const double prefactor = sqrt(M_PI*phi*x/(6.0 * rho_ghalf)); + + double F = prefactor * 3.0/zeta_half; + double G = prefactor * 3.0/zeta_half; /* Note the sqrt(3) from Bi normalization */ + double F_exp; + double G_exp; + + const double airy_scale_exp = phi; + gsl_sf_result ai; + gsl_sf_result bi; + gsl_sf_airy_Ai_scaled_e(zeta_half*zeta_half, GSL_MODE_DEFAULT, &ai); + gsl_sf_airy_Bi_scaled_e(zeta_half*zeta_half, GSL_MODE_DEFAULT, &bi); + F *= ai.val; + G *= bi.val; + F_exp = log(F) - airy_scale_exp; + G_exp = log(G) + airy_scale_exp; + + if(G_exp >= GSL_LOG_DBL_MAX) { + fjwkb->val = F; + gjwkb->val = G; + fjwkb->err = 1.0e-3 * fabs(F); /* FIXME: real error here ... could be smaller */ + gjwkb->err = 1.0e-3 * fabs(G); + *exponent = airy_scale_exp; + GSL_ERROR ("error", GSL_EOVRFLW); + } + else { + fjwkb->val = exp(F_exp); + gjwkb->val = exp(G_exp); + fjwkb->err = 1.0e-3 * fabs(fjwkb->val); + gjwkb->err = 1.0e-3 * fabs(gjwkb->val); + *exponent = 0.0; + return GSL_SUCCESS; + } +} + + +/* Asymptotic evaluation of F and G below the minimal turning point. + * + * This is meant to be a drop-in replacement for coulomb_jwkb(). + * It uses the expressions in [Abad+Sesma]. This requires some + * work because I am not sure where it is valid. They mumble + * something about |x| < |lam|^(-1/2) or 8|eta x| > lam when |x| < 1. + * This seems true, but I thought the result was based on a uniform + * expansion and could be controlled by simply using more terms. + */ +#if 0 +static +int +coulomb_AS_xlt2eta(const double lam, const double eta, const double x, + gsl_sf_result * f_AS, gsl_sf_result * g_AS, + double * exponent) +{ + /* no time to do this now... */ +} +#endif /* 0 */ + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_coulomb_wave_FG_e(const double eta, const double x, + const double lam_F, + const int k_lam_G, /* lam_G = lam_F - k_lam_G */ + gsl_sf_result * F, gsl_sf_result * Fp, + gsl_sf_result * G, gsl_sf_result * Gp, + double * exp_F, double * exp_G) +{ + const double lam_G = lam_F - k_lam_G; + + if(x < 0.0 || lam_F <= -0.5 || lam_G <= -0.5) { + GSL_SF_RESULT_SET(F, 0.0, 0.0); + GSL_SF_RESULT_SET(Fp, 0.0, 0.0); + GSL_SF_RESULT_SET(G, 0.0, 0.0); + GSL_SF_RESULT_SET(Gp, 0.0, 0.0); + *exp_F = 0.0; + *exp_G = 0.0; + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(x == 0.0) { + gsl_sf_result C0; + CLeta(0.0, eta, &C0); + GSL_SF_RESULT_SET(F, 0.0, 0.0); + GSL_SF_RESULT_SET(Fp, 0.0, 0.0); + GSL_SF_RESULT_SET(G, 0.0, 0.0); /* FIXME: should be Inf */ + GSL_SF_RESULT_SET(Gp, 0.0, 0.0); /* FIXME: should be Inf */ + *exp_F = 0.0; + *exp_G = 0.0; + if(lam_F == 0.0){ + GSL_SF_RESULT_SET(Fp, C0.val, C0.err); + } + if(lam_G == 0.0) { + GSL_SF_RESULT_SET(Gp, 1.0/C0.val, fabs(C0.err/C0.val)/fabs(C0.val)); + } + GSL_ERROR ("domain error", GSL_EDOM); + /* After all, since we are asking for G, this is a domain error... */ + } + else if(x < 1.2 && 2.0*M_PI*eta < 0.9*(-GSL_LOG_DBL_MIN) && fabs(eta*x) < 10.0) { + /* Reduce to a small lambda value and use the series + * representations for F and G. We cannot allow eta to + * be large and positive because the connection formula + * for G_lam is badly behaved due to an underflow in sin(phi_lam) + * [see coulomb_FG_series() and coulomb_connection() above]. + * Note that large negative eta is ok however. + */ + const double SMALL = GSL_SQRT_DBL_EPSILON; + const int N = (int)(lam_F + 0.5); + const int span = GSL_MAX(k_lam_G, N); + const double lam_min = lam_F - N; /* -1/2 <= lam_min < 1/2 */ + double F_lam_F, Fp_lam_F; + double G_lam_G, Gp_lam_G; + double F_lam_F_err, Fp_lam_F_err; + double Fp_over_F_lam_F; + double F_sign_lam_F; + double F_lam_min_unnorm, Fp_lam_min_unnorm; + double Fp_over_F_lam_min; + gsl_sf_result F_lam_min; + gsl_sf_result G_lam_min, Gp_lam_min; + double F_scale; + double Gerr_frac; + double F_scale_frac_err; + double F_unnorm_frac_err; + + /* Determine F'/F at lam_F. */ + int CF1_count; + int stat_CF1 = coulomb_CF1(lam_F, eta, x, &F_sign_lam_F, &Fp_over_F_lam_F, &CF1_count); + + int stat_ser; + int stat_Fr; + int stat_Gr; + + /* Recurse down with unnormalized F,F' values. */ + F_lam_F = SMALL; + Fp_lam_F = Fp_over_F_lam_F * F_lam_F; + if(span != 0) { + stat_Fr = coulomb_F_recur(lam_min, span, eta, x, + F_lam_F, Fp_lam_F, + &F_lam_min_unnorm, &Fp_lam_min_unnorm + ); + } + else { + F_lam_min_unnorm = F_lam_F; + Fp_lam_min_unnorm = Fp_lam_F; + stat_Fr = GSL_SUCCESS; + } + + /* Determine F and G at lam_min. */ + if(lam_min == -0.5) { + stat_ser = coulomb_FGmhalf_series(eta, x, &F_lam_min, &G_lam_min); + } + else if(lam_min == 0.0) { + stat_ser = coulomb_FG0_series(eta, x, &F_lam_min, &G_lam_min); + } + else if(lam_min == 0.5) { + /* This cannot happen. */ + F->val = F_lam_F; + F->err = 2.0 * GSL_DBL_EPSILON * fabs(F->val); + Fp->val = Fp_lam_F; + Fp->err = 2.0 * GSL_DBL_EPSILON * fabs(Fp->val); + G->val = G_lam_G; + G->err = 2.0 * GSL_DBL_EPSILON * fabs(G->val); + Gp->val = Gp_lam_G; + Gp->err = 2.0 * GSL_DBL_EPSILON * fabs(Gp->val); + *exp_F = 0.0; + *exp_G = 0.0; + GSL_ERROR ("error", GSL_ESANITY); + } + else { + stat_ser = coulomb_FG_series(lam_min, eta, x, &F_lam_min, &G_lam_min); + } + + /* Determine remaining quantities. */ + Fp_over_F_lam_min = Fp_lam_min_unnorm / F_lam_min_unnorm; + Gp_lam_min.val = Fp_over_F_lam_min*G_lam_min.val - 1.0/F_lam_min.val; + Gp_lam_min.err = fabs(Fp_over_F_lam_min)*G_lam_min.err; + Gp_lam_min.err += fabs(1.0/F_lam_min.val) * fabs(F_lam_min.err/F_lam_min.val); + F_scale = F_lam_min.val / F_lam_min_unnorm; + + /* Apply scale to the original F,F' values. */ + F_scale_frac_err = fabs(F_lam_min.err/F_lam_min.val); + F_unnorm_frac_err = 2.0*GSL_DBL_EPSILON*(CF1_count+span+1); + F_lam_F *= F_scale; + F_lam_F_err = fabs(F_lam_F) * (F_unnorm_frac_err + F_scale_frac_err); + Fp_lam_F *= F_scale; + Fp_lam_F_err = fabs(Fp_lam_F) * (F_unnorm_frac_err + F_scale_frac_err); + + /* Recurse up to get the required G,G' values. */ + stat_Gr = coulomb_G_recur(lam_min, GSL_MAX(N-k_lam_G,0), eta, x, + G_lam_min.val, Gp_lam_min.val, + &G_lam_G, &Gp_lam_G + ); + + F->val = F_lam_F; + F->err = F_lam_F_err; + F->err += 2.0 * GSL_DBL_EPSILON * fabs(F_lam_F); + + Fp->val = Fp_lam_F; + Fp->err = Fp_lam_F_err; + Fp->err += 2.0 * GSL_DBL_EPSILON * fabs(Fp_lam_F); + + Gerr_frac = fabs(G_lam_min.err/G_lam_min.val) + fabs(Gp_lam_min.err/Gp_lam_min.val); + + G->val = G_lam_G; + G->err = Gerr_frac * fabs(G_lam_G); + G->err += 2.0 * (CF1_count+1) * GSL_DBL_EPSILON * fabs(G->val); + + Gp->val = Gp_lam_G; + Gp->err = Gerr_frac * fabs(Gp->val); + Gp->err += 2.0 * (CF1_count+1) * GSL_DBL_EPSILON * fabs(Gp->val); + + *exp_F = 0.0; + *exp_G = 0.0; + + return GSL_ERROR_SELECT_4(stat_ser, stat_CF1, stat_Fr, stat_Gr); + } + else if(x < 2.0*eta) { + /* Use WKB approximation to obtain F and G at the two + * lambda values, and use the Wronskian and the + * continued fractions for F'/F to obtain F' and G'. + */ + gsl_sf_result F_lam_F, G_lam_F; + gsl_sf_result F_lam_G, G_lam_G; + double exp_lam_F, exp_lam_G; + int stat_lam_F; + int stat_lam_G; + int stat_CF1_lam_F; + int stat_CF1_lam_G; + int CF1_count; + double Fp_over_F_lam_F; + double Fp_over_F_lam_G; + double F_sign_lam_F; + double F_sign_lam_G; + + stat_lam_F = coulomb_jwkb(lam_F, eta, x, &F_lam_F, &G_lam_F, &exp_lam_F); + if(k_lam_G == 0) { + stat_lam_G = stat_lam_F; + F_lam_G = F_lam_F; + G_lam_G = G_lam_F; + exp_lam_G = exp_lam_F; + } + else { + stat_lam_G = coulomb_jwkb(lam_G, eta, x, &F_lam_G, &G_lam_G, &exp_lam_G); + } + + stat_CF1_lam_F = coulomb_CF1(lam_F, eta, x, &F_sign_lam_F, &Fp_over_F_lam_F, &CF1_count); + if(k_lam_G == 0) { + stat_CF1_lam_G = stat_CF1_lam_F; + F_sign_lam_G = F_sign_lam_F; + Fp_over_F_lam_G = Fp_over_F_lam_F; + } + else { + stat_CF1_lam_G = coulomb_CF1(lam_G, eta, x, &F_sign_lam_G, &Fp_over_F_lam_G, &CF1_count); + } + + F->val = F_lam_F.val; + F->err = F_lam_F.err; + + G->val = G_lam_G.val; + G->err = G_lam_G.err; + + Fp->val = Fp_over_F_lam_F * F_lam_F.val; + Fp->err = fabs(Fp_over_F_lam_F) * F_lam_F.err; + Fp->err += 2.0*GSL_DBL_EPSILON*fabs(Fp->val); + + Gp->val = Fp_over_F_lam_G * G_lam_G.val - 1.0/F_lam_G.val; + Gp->err = fabs(Fp_over_F_lam_G) * G_lam_G.err; + Gp->err += fabs(1.0/F_lam_G.val) * fabs(F_lam_G.err/F_lam_G.val); + + *exp_F = exp_lam_F; + *exp_G = exp_lam_G; + + if(stat_lam_F == GSL_EOVRFLW || stat_lam_G == GSL_EOVRFLW) { + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + return GSL_ERROR_SELECT_2(stat_lam_F, stat_lam_G); + } + } + else { + /* x > 2 eta, so we know that we can find a lambda value such + * that x is above the turning point. We do this, evaluate + * using Steed's method at that oscillatory point, then + * use recursion on F and G to obtain the required values. + * + * lam_0 = a value of lambda such that x is below the turning point + * lam_min = minimum of lam_0 and the requested lam_G, since + * we must go at least as low as lam_G + */ + const double SMALL = GSL_SQRT_DBL_EPSILON; + const double C = sqrt(1.0 + 4.0*x*(x-2.0*eta)); + const int N = ceil(lam_F - C + 0.5); + const double lam_0 = lam_F - GSL_MAX(N, 0); + const double lam_min = GSL_MIN(lam_0, lam_G); + double F_lam_F, Fp_lam_F; + double G_lam_G, Gp_lam_G; + double F_lam_min_unnorm, Fp_lam_min_unnorm; + double F_lam_min, Fp_lam_min; + double G_lam_min, Gp_lam_min; + double Fp_over_F_lam_F; + double Fp_over_F_lam_min; + double F_sign_lam_F, F_sign_lam_min; + double P_lam_min, Q_lam_min; + double alpha; + double gamma; + double F_scale; + + int CF1_count; + int CF2_count; + int stat_CF1 = coulomb_CF1(lam_F, eta, x, &F_sign_lam_F, &Fp_over_F_lam_F, &CF1_count); + int stat_CF2; + int stat_Fr; + int stat_Gr; + + int F_recur_count; + int G_recur_count; + + double err_amplify; + + F_lam_F = F_sign_lam_F * SMALL; /* unnormalized */ + Fp_lam_F = Fp_over_F_lam_F * F_lam_F; + + /* Backward recurrence to get F,Fp at lam_min */ + F_recur_count = GSL_MAX(k_lam_G, N); + stat_Fr = coulomb_F_recur(lam_min, F_recur_count, eta, x, + F_lam_F, Fp_lam_F, + &F_lam_min_unnorm, &Fp_lam_min_unnorm + ); + Fp_over_F_lam_min = Fp_lam_min_unnorm / F_lam_min_unnorm; + + /* Steed evaluation to complete evaluation of F,Fp,G,Gp at lam_min */ + stat_CF2 = coulomb_CF2(lam_min, eta, x, &P_lam_min, &Q_lam_min, &CF2_count); + alpha = Fp_over_F_lam_min - P_lam_min; + gamma = alpha/Q_lam_min; + + F_sign_lam_min = GSL_SIGN(F_lam_min_unnorm) ; + + F_lam_min = F_sign_lam_min / sqrt(alpha*alpha/Q_lam_min + Q_lam_min); + Fp_lam_min = Fp_over_F_lam_min * F_lam_min; + G_lam_min = gamma * F_lam_min; + Gp_lam_min = (P_lam_min * gamma - Q_lam_min) * F_lam_min; + + /* Apply scale to values of F,Fp at lam_F (the top). */ + F_scale = F_lam_min / F_lam_min_unnorm; + F_lam_F *= F_scale; + Fp_lam_F *= F_scale; + + /* Forward recurrence to get G,Gp at lam_G (the top). */ + G_recur_count = GSL_MAX(N-k_lam_G,0); + stat_Gr = coulomb_G_recur(lam_min, G_recur_count, eta, x, + G_lam_min, Gp_lam_min, + &G_lam_G, &Gp_lam_G + ); + + err_amplify = CF1_count + CF2_count + F_recur_count + G_recur_count + 1; + + F->val = F_lam_F; + F->err = 8.0*err_amplify*GSL_DBL_EPSILON * fabs(F->val); + + Fp->val = Fp_lam_F; + Fp->err = 8.0*err_amplify*GSL_DBL_EPSILON * fabs(Fp->val); + + G->val = G_lam_G; + G->err = 8.0*err_amplify*GSL_DBL_EPSILON * fabs(G->val); + + Gp->val = Gp_lam_G; + Gp->err = 8.0*err_amplify*GSL_DBL_EPSILON * fabs(Gp->val); + + *exp_F = 0.0; + *exp_G = 0.0; + + return GSL_ERROR_SELECT_4(stat_CF1, stat_CF2, stat_Fr, stat_Gr); + } +} + + +int +gsl_sf_coulomb_wave_F_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, + double * F_exp) +{ + if(x == 0.0) { + int k; + *F_exp = 0.0; + for(k=0; k<=kmax; k++) { + fc_array[k] = 0.0; + } + if(lam_min == 0.0){ + gsl_sf_result f_0; + CLeta(0.0, eta, &f_0); + fc_array[0] = f_0.val; + } + return GSL_SUCCESS; + } + else { + const double x_inv = 1.0/x; + const double lam_max = lam_min + kmax; + gsl_sf_result F, Fp; + gsl_sf_result G, Gp; + double G_exp; + + int stat_FG = gsl_sf_coulomb_wave_FG_e(eta, x, lam_max, 0, + &F, &Fp, &G, &Gp, F_exp, &G_exp); + + double fcl = F.val; + double fpl = Fp.val; + double lam = lam_max; + int k; + + fc_array[kmax] = F.val; + + for(k=kmax-1; k>=0; k--) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double fc_lm1 = (fcl*sl + fpl)/rl; + fc_array[k] = fc_lm1; + fpl = fc_lm1*sl - fcl*rl; + fcl = fc_lm1; + lam -= 1.0; + } + + return stat_FG; + } +} + + +int +gsl_sf_coulomb_wave_FG_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, double * gc_array, + double * F_exp, double * G_exp) +{ + const double x_inv = 1.0/x; + const double lam_max = lam_min + kmax; + gsl_sf_result F, Fp; + gsl_sf_result G, Gp; + + int stat_FG = gsl_sf_coulomb_wave_FG_e(eta, x, lam_max, kmax, + &F, &Fp, &G, &Gp, F_exp, G_exp); + + double fcl = F.val; + double fpl = Fp.val; + double lam = lam_max; + int k; + + double gcl, gpl; + + fc_array[kmax] = F.val; + + for(k=kmax-1; k>=0; k--) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double fc_lm1; + fc_lm1 = (fcl*sl + fpl)/rl; + fc_array[k] = fc_lm1; + fpl = fc_lm1*sl - fcl*rl; + fcl = fc_lm1; + lam -= 1.0; + } + + gcl = G.val; + gpl = Gp.val; + lam = lam_min + 1.0; + + gc_array[0] = G.val; + + for(k=1; k<=kmax; k++) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double gcl1 = (sl*gcl - gpl)/rl; + gc_array[k] = gcl1; + gpl = rl*gcl - sl*gcl1; + gcl = gcl1; + lam += 1.0; + } + + return stat_FG; +} + + +int +gsl_sf_coulomb_wave_FGp_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, double * fcp_array, + double * gc_array, double * gcp_array, + double * F_exp, double * G_exp) + +{ + const double x_inv = 1.0/x; + const double lam_max = lam_min + kmax; + gsl_sf_result F, Fp; + gsl_sf_result G, Gp; + + int stat_FG = gsl_sf_coulomb_wave_FG_e(eta, x, lam_max, kmax, + &F, &Fp, &G, &Gp, F_exp, G_exp); + + double fcl = F.val; + double fpl = Fp.val; + double lam = lam_max; + int k; + + double gcl, gpl; + + fc_array[kmax] = F.val; + fcp_array[kmax] = Fp.val; + + for(k=kmax-1; k>=0; k--) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double fc_lm1; + fc_lm1 = (fcl*sl + fpl)/rl; + fc_array[k] = fc_lm1; + fpl = fc_lm1*sl - fcl*rl; + fcp_array[k] = fpl; + fcl = fc_lm1; + lam -= 1.0; + } + + gcl = G.val; + gpl = Gp.val; + lam = lam_min + 1.0; + + gc_array[0] = G.val; + gcp_array[0] = Gp.val; + + for(k=1; k<=kmax; k++) { + double el = eta/lam; + double rl = hypot(1.0, el); + double sl = el + lam*x_inv; + double gcl1 = (sl*gcl - gpl)/rl; + gc_array[k] = gcl1; + gpl = rl*gcl - sl*gcl1; + gcp_array[k] = gpl; + gcl = gcl1; + lam += 1.0; + } + + return stat_FG; +} + + +int +gsl_sf_coulomb_wave_sphF_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, + double * F_exp) +{ + if(x < 0.0 || lam_min < -0.5) { + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(x < 10.0/GSL_DBL_MAX) { + int k; + for(k=0; k<=kmax; k++) { + fc_array[k] = 0.0; + } + if(lam_min == 0.0) { + fc_array[0] = sqrt(C0sq(eta)); + } + *F_exp = 0.0; + if(x == 0.0) + return GSL_SUCCESS; + else + GSL_ERROR ("underflow", GSL_EUNDRFLW); + } + else { + int k; + int stat_F = gsl_sf_coulomb_wave_F_array(lam_min, kmax, + eta, x, + fc_array, + F_exp); + + for(k=0; k<=kmax; k++) { + fc_array[k] = fc_array[k] / x; + } + return stat_F; + } +} + + diff --git a/software/gsl-1.15/specfunc/coulomb_bound.c b/software/gsl-1.15/specfunc/coulomb_bound.c new file mode 100644 index 000000000..097d0ba89 --- /dev/null +++ b/software/gsl-1.15/specfunc/coulomb_bound.c @@ -0,0 +1,120 @@ +/* specfunc/coulomb_bound.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +/* normalization for hydrogenic wave functions */ +static +int +R_norm(const int n, const int l, const double Z, gsl_sf_result * result) +{ + double A = 2.0*Z/n; + double pre = sqrt(A*A*A /(2.0*n)); + gsl_sf_result ln_a, ln_b; + gsl_sf_result ex; + int stat_a = gsl_sf_lnfact_e(n+l, &ln_a); + int stat_b = gsl_sf_lnfact_e(n-l-1, &ln_b); + double diff_val = 0.5*(ln_b.val - ln_a.val); + double diff_err = 0.5*(ln_b.err + ln_a.err) + GSL_DBL_EPSILON * fabs(diff_val); + int stat_e = gsl_sf_exp_err_e(diff_val, diff_err, &ex); + result->val = pre * ex.val; + result->err = pre * ex.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_e, stat_a, stat_b); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_hydrogenicR_1_e(const double Z, const double r, gsl_sf_result * result) +{ + if(Z > 0.0 && r >= 0.0) { + double A = 2.0*Z; + double norm = A*sqrt(Z); + double ea = exp(-Z*r); + result->val = norm*ea; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) * fabs(Z*r); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +int +gsl_sf_hydrogenicR_e(const int n, const int l, + const double Z, const double r, + gsl_sf_result * result) +{ + if(n < 1 || l > n-1 || Z <= 0.0 || r < 0.0) { + DOMAIN_ERROR(result); + } + else { + double A = 2.0*Z/n; + gsl_sf_result norm; + int stat_norm = R_norm(n, l, Z, &norm); + double rho = A*r; + double ea = exp(-0.5*rho); + double pp = gsl_sf_pow_int(rho, l); + gsl_sf_result lag; + int stat_lag = gsl_sf_laguerre_n_e(n-l-1, 2*l+1, rho, &lag); + double W_val = norm.val * ea * pp; + double W_err = norm.err * ea * pp; + W_err += norm.val * ((0.5*rho + 1.0) * GSL_DBL_EPSILON) * ea * pp; + W_err += norm.val * ea * ((l+1.0) * GSL_DBL_EPSILON) * pp; + result->val = W_val * lag.val; + result->err = W_val * lag.err + W_err * fabs(lag.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if ((l == 0 || (r > 0 && l > 0)) && lag.val != 0.0 + && stat_lag == GSL_SUCCESS && stat_norm == GSL_SUCCESS) { + CHECK_UNDERFLOW(result); + }; + return GSL_ERROR_SELECT_2(stat_lag, stat_norm); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hydrogenicR_1(const double Z, const double r) +{ + EVAL_RESULT(gsl_sf_hydrogenicR_1_e(Z, r, &result)); +} + + +double gsl_sf_hydrogenicR(const int n, const int l, const double Z, const double r) +{ + EVAL_RESULT(gsl_sf_hydrogenicR_e(n, l, Z, r, &result)); +} diff --git a/software/gsl-1.15/specfunc/coupling.c b/software/gsl-1.15/specfunc/coupling.c new file mode 100644 index 000000000..9a7140b61 --- /dev/null +++ b/software/gsl-1.15/specfunc/coupling.c @@ -0,0 +1,439 @@ +/* specfunc/coupling.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +inline +static +int locMax3(const int a, const int b, const int c) +{ + int d = GSL_MAX(a, b); + return GSL_MAX(d, c); +} + +inline +static +int locMin3(const int a, const int b, const int c) +{ + int d = GSL_MIN(a, b); + return GSL_MIN(d, c); +} + +inline +static +int locMin5(const int a, const int b, const int c, const int d, const int e) +{ + int f = GSL_MIN(a, b); + int g = GSL_MIN(c, d); + int h = GSL_MIN(f, g); + return GSL_MIN(e, h); +} + + +/* See: [Thompson, Atlas for Computing Mathematical Functions] */ + +static +int +delta(int ta, int tb, int tc, gsl_sf_result * d) +{ + gsl_sf_result f1, f2, f3, f4; + int status = 0; + status += gsl_sf_fact_e((ta + tb - tc)/2, &f1); + status += gsl_sf_fact_e((ta + tc - tb)/2, &f2); + status += gsl_sf_fact_e((tb + tc - ta)/2, &f3); + status += gsl_sf_fact_e((ta + tb + tc)/2 + 1, &f4); + if(status != 0) { + OVERFLOW_ERROR(d); + } + d->val = f1.val * f2.val * f3.val / f4.val; + d->err = 4.0 * GSL_DBL_EPSILON * fabs(d->val); + return GSL_SUCCESS; +} + + +static +int +triangle_selection_fails(int two_ja, int two_jb, int two_jc) +{ + return ((two_jb < abs(two_ja - two_jc)) || (two_jb > two_ja + two_jc)); +} + + +static +int +m_selection_fails(int two_ja, int two_jb, int two_jc, + int two_ma, int two_mb, int two_mc) +{ + return ( + abs(two_ma) > two_ja + || abs(two_mb) > two_jb + || abs(two_mc) > two_jc + || GSL_IS_ODD(two_ja + two_ma) + || GSL_IS_ODD(two_jb + two_mb) + || GSL_IS_ODD(two_jc + two_mc) + || (two_ma + two_mb + two_mc) != 0 + ); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int +gsl_sf_coupling_3j_e (int two_ja, int two_jb, int two_jc, + int two_ma, int two_mb, int two_mc, + gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(two_ja < 0 || two_jb < 0 || two_jc < 0) { + DOMAIN_ERROR(result); + } + else if ( triangle_selection_fails(two_ja, two_jb, two_jc) + || m_selection_fails(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc) + ) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + int jca = (-two_ja + two_jb + two_jc) / 2, + jcb = ( two_ja - two_jb + two_jc) / 2, + jcc = ( two_ja + two_jb - two_jc) / 2, + jmma = ( two_ja - two_ma) / 2, + jmmb = ( two_jb - two_mb) / 2, + jmmc = ( two_jc - two_mc) / 2, + jpma = ( two_ja + two_ma) / 2, + jpmb = ( two_jb + two_mb) / 2, + jpmc = ( two_jc + two_mc) / 2, + jsum = ( two_ja + two_jb + two_jc) / 2, + kmin = locMax3 (0, jpmb - jmmc, jmma - jpmc), + kmax = locMin3 (jcc, jmma, jpmb), + k, sign = GSL_IS_ODD (kmin - jpma + jmmb) ? -1 : 1, + status = 0; + double sum_pos = 0.0, sum_neg = 0.0, norm, term; + gsl_sf_result bc1, bc2, bc3, bcn1, bcn2, bcd1, bcd2, bcd3, bcd4; + + status += gsl_sf_choose_e (two_ja, jcc , &bcn1); + status += gsl_sf_choose_e (two_jb, jcc , &bcn2); + status += gsl_sf_choose_e (jsum+1, jcc , &bcd1); + status += gsl_sf_choose_e (two_ja, jmma, &bcd2); + status += gsl_sf_choose_e (two_jb, jmmb, &bcd3); + status += gsl_sf_choose_e (two_jc, jpmc, &bcd4); + + if (status != 0) { + OVERFLOW_ERROR (result); + } + + norm = sqrt (bcn1.val * bcn2.val) + / sqrt (bcd1.val * bcd2.val * bcd3.val * bcd4.val * ((double) two_jc + 1.0)); + + for (k = kmin; k <= kmax; k++) { + status += gsl_sf_choose_e (jcc, k, &bc1); + status += gsl_sf_choose_e (jcb, jmma - k, &bc2); + status += gsl_sf_choose_e (jca, jpmb - k, &bc3); + + if (status != 0) { + OVERFLOW_ERROR (result); + } + + term = bc1.val * bc2.val * bc3.val; + + if (sign < 0) { + sum_neg += norm * term; + } else { + sum_pos += norm * term; + } + + sign = -sign; + } + + result->val = sum_pos - sum_neg; + result->err = 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += 2.0 * GSL_DBL_EPSILON * (kmax - kmin) * fabs(result->val); + + return GSL_SUCCESS; + } +} + +int +gsl_sf_coupling_6j_INCORRECT_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result) +{ + return gsl_sf_coupling_6j_e(two_ja, two_jb, two_je, two_jd, two_jc, two_jf, result); +} + + +int +gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if( two_ja < 0 || two_jb < 0 || two_jc < 0 + || two_jd < 0 || two_je < 0 || two_jf < 0 + ) { + DOMAIN_ERROR(result); + } + else if( triangle_selection_fails(two_ja, two_jb, two_jc) + || triangle_selection_fails(two_ja, two_je, two_jf) + || triangle_selection_fails(two_jb, two_jd, two_jf) + || triangle_selection_fails(two_je, two_jd, two_jc) + ) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result n1; + gsl_sf_result d1, d2, d3, d4, d5, d6; + double norm; + int tk, tkmin, tkmax; + double phase; + double sum_pos = 0.0; + double sum_neg = 0.0; + double sumsq_err = 0.0; + int status = 0; + status += delta(two_ja, two_jb, two_jc, &d1); + status += delta(two_ja, two_je, two_jf, &d2); + status += delta(two_jb, two_jd, two_jf, &d3); + status += delta(two_je, two_jd, two_jc, &d4); + if(status != GSL_SUCCESS) { + OVERFLOW_ERROR(result); + } + norm = sqrt(d1.val) * sqrt(d2.val) * sqrt(d3.val) * sqrt(d4.val); + + tkmin = locMax3(0, + two_ja + two_jd - two_jc - two_jf, + two_jb + two_je - two_jc - two_jf); + + tkmax = locMin5(two_ja + two_jb + two_je + two_jd + 2, + two_ja + two_jb - two_jc, + two_je + two_jd - two_jc, + two_ja + two_je - two_jf, + two_jb + two_jd - two_jf); + + phase = GSL_IS_ODD((two_ja + two_jb + two_je + two_jd + tkmin)/2) + ? -1.0 + : 1.0; + + for(tk=tkmin; tk<=tkmax; tk += 2) { + double term; + double term_err; + gsl_sf_result den_1, den_2; + gsl_sf_result d1_a, d1_b; + status = 0; + + status += gsl_sf_fact_e((two_ja + two_jb + two_je + two_jd - tk)/2 + 1, &n1); + status += gsl_sf_fact_e(tk/2, &d1_a); + status += gsl_sf_fact_e((two_jc + two_jf - two_ja - two_jd + tk)/2, &d1_b); + status += gsl_sf_fact_e((two_jc + two_jf - two_jb - two_je + tk)/2, &d2); + status += gsl_sf_fact_e((two_ja + two_jb - two_jc - tk)/2, &d3); + status += gsl_sf_fact_e((two_je + two_jd - two_jc - tk)/2, &d4); + status += gsl_sf_fact_e((two_ja + two_je - two_jf - tk)/2, &d5); + status += gsl_sf_fact_e((two_jb + two_jd - two_jf - tk)/2, &d6); + + if(status != GSL_SUCCESS) { + OVERFLOW_ERROR(result); + } + + d1.val = d1_a.val * d1_b.val; + d1.err = d1_a.err * fabs(d1_b.val) + fabs(d1_a.val) * d1_b.err; + + den_1.val = d1.val*d2.val*d3.val; + den_1.err = d1.err * fabs(d2.val*d3.val); + den_1.err += d2.err * fabs(d1.val*d3.val); + den_1.err += d3.err * fabs(d1.val*d2.val); + + den_2.val = d4.val*d5.val*d6.val; + den_2.err = d4.err * fabs(d5.val*d6.val); + den_2.err += d5.err * fabs(d4.val*d6.val); + den_2.err += d6.err * fabs(d4.val*d5.val); + + term = phase * n1.val / den_1.val / den_2.val; + phase = -phase; + term_err = n1.err / fabs(den_1.val) / fabs(den_2.val); + term_err += fabs(term / den_1.val) * den_1.err; + term_err += fabs(term / den_2.val) * den_2.err; + + if(term >= 0.0) { + sum_pos += norm*term; + } + else { + sum_neg -= norm*term; + } + + sumsq_err += norm*norm * term_err*term_err; + } + + result->val = sum_pos - sum_neg; + result->err = 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += sqrt(sumsq_err / (0.5*(tkmax-tkmin)+1.0)); + result->err += 2.0 * GSL_DBL_EPSILON * (tkmax - tkmin + 2.0) * fabs(result->val); + + return GSL_SUCCESS; + } +} + + +int +gsl_sf_coupling_RacahW_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result) +{ + int status = gsl_sf_coupling_6j_e(two_ja, two_jb, two_je, two_jd, two_jc, two_jf, result); + int phase_sum = (two_ja + two_jb + two_jc + two_jd)/2; + result->val *= ( GSL_IS_ODD(phase_sum) ? -1.0 : 1.0 ); + return status; +} + + +int +gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + int two_jg, int two_jh, int two_ji, + gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if( two_ja < 0 || two_jb < 0 || two_jc < 0 + || two_jd < 0 || two_je < 0 || two_jf < 0 + || two_jg < 0 || two_jh < 0 || two_ji < 0 + ) { + DOMAIN_ERROR(result); + } + else if( triangle_selection_fails(two_ja, two_jb, two_jc) + || triangle_selection_fails(two_jd, two_je, two_jf) + || triangle_selection_fails(two_jg, two_jh, two_ji) + || triangle_selection_fails(two_ja, two_jd, two_jg) + || triangle_selection_fails(two_jb, two_je, two_jh) + || triangle_selection_fails(two_jc, two_jf, two_ji) + ) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + int tk; + int tkmin = locMax3(abs(two_ja-two_ji), abs(two_jh-two_jd), abs(two_jb-two_jf)); + int tkmax = locMin3(two_ja + two_ji, two_jh + two_jd, two_jb + two_jf); + double sum_pos = 0.0; + double sum_neg = 0.0; + double sumsq_err = 0.0; + double phase; + for(tk=tkmin; tk<=tkmax; tk += 2) { + gsl_sf_result s1, s2, s3; + double term; + double term_err; + int status = 0; + + status += gsl_sf_coupling_6j_e(two_ja, two_ji, tk, two_jh, two_jd, two_jg, &s1); + status += gsl_sf_coupling_6j_e(two_jb, two_jf, tk, two_jd, two_jh, two_je, &s2); + status += gsl_sf_coupling_6j_e(two_ja, two_ji, tk, two_jf, two_jb, two_jc, &s3); + + if(status != GSL_SUCCESS) { + OVERFLOW_ERROR(result); + } + term = s1.val * s2.val * s3.val; + term_err = s1.err * fabs(s2.val*s3.val); + term_err += s2.err * fabs(s1.val*s3.val); + term_err += s3.err * fabs(s1.val*s2.val); + + if(term >= 0.0) { + sum_pos += (tk + 1) * term; + } + else { + sum_neg -= (tk + 1) * term; + } + + sumsq_err += ((tk+1) * term_err) * ((tk+1) * term_err); + } + + phase = GSL_IS_ODD(tkmin) ? -1.0 : 1.0; + + result->val = phase * (sum_pos - sum_neg); + result->err = 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += sqrt(sumsq_err / (0.5*(tkmax-tkmin)+1.0)); + result->err += 2.0 * GSL_DBL_EPSILON * (tkmax-tkmin + 2.0) * fabs(result->val); + + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_coupling_3j(int two_ja, int two_jb, int two_jc, + int two_ma, int two_mb, int two_mc) +{ + EVAL_RESULT(gsl_sf_coupling_3j_e(two_ja, two_jb, two_jc, + two_ma, two_mb, two_mc, + &result)); +} + + +double gsl_sf_coupling_6j_INCORRECT(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf) +{ + EVAL_RESULT(gsl_sf_coupling_6j_INCORRECT_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + &result)); +} + + +double gsl_sf_coupling_6j(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf) +{ + EVAL_RESULT(gsl_sf_coupling_6j_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + &result)); +} + + +double gsl_sf_coupling_RacahW(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf) +{ + EVAL_RESULT(gsl_sf_coupling_RacahW_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + &result)); +} + + +double gsl_sf_coupling_9j(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + int two_jg, int two_jh, int two_ji) +{ + EVAL_RESULT(gsl_sf_coupling_9j_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + two_jg, two_jh, two_ji, + &result)); +} diff --git a/software/gsl-1.15/specfunc/dawson.c b/software/gsl-1.15/specfunc/dawson.c new file mode 100644 index 000000000..478ab6e9a --- /dev/null +++ b/software/gsl-1.15/specfunc/dawson.c @@ -0,0 +1,281 @@ +/* specfunc/dawson.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" +#include "chebyshev.h" +#include "cheb_eval.c" + +/* Based on ddaws.f, Fullerton, W., (LANL) */ + + +/* Chebyshev expansions + + Series for DAW on the interval 0. to 1.00000E+00 + with weighted error 8.95E-32 + log weighted error 31.05 + significant figures required 30.41 + decimal places required 31.71 + + Series for DAW2 on the interval 0. to 1.60000E+01 + with weighted error 1.61E-32 + log weighted error 31.79 + significant figures required 31.40 + decimal places required 32.62 + + Series for DAWA on the interval 0. to 6.25000E-02 + with weighted error 1.97E-32 + log weighted error 31.71 + significant figures required 29.79 + decimal places required 32.64 +*/ +static double daw_data[21] = { + -0.6351734375145949201065127736293e-02, + -0.2294071479677386939899824125866e+00, + 0.2213050093908476441683979161786e-01, + -0.1549265453892985046743057753375e-02, + 0.8497327715684917456777542948066e-04, + -0.3828266270972014924994099521309e-05, + 0.1462854806250163197757148949539e-06, + -0.4851982381825991798846715425114e-08, + 0.1421463577759139790347568183304e-09, + -0.3728836087920596525335493054088e-11, + 0.8854942961778203370194565231369e-13, + -0.1920757131350206355421648417493e-14, + 0.3834325867246327588241074439253e-16, + -0.7089154168175881633584099327999e-18, + 0.1220552135889457674416901120000e-19, + -0.1966204826605348760299451733333e-21, + 0.2975845541376597189113173333333e-23, + -0.4247069514800596951039999999999e-25, + 0.5734270767391742798506666666666e-27, + -0.7345836823178450261333333333333e-29, + 0.8951937667516552533333333333333e-31 +}; +static cheb_series daw_cs = { + daw_data, + 15, /* 20, */ + -1, 1, + 9 +}; + +static double daw2_data[45] = { + -0.56886544105215527114160533733674e-01, + -0.31811346996168131279322878048822e+00, + 0.20873845413642236789741580198858e+00, + -0.12475409913779131214073498314784e+00, + 0.67869305186676777092847516423676e-01, + -0.33659144895270939503068230966587e-01, + 0.15260781271987971743682460381640e-01, + -0.63483709625962148230586094788535e-02, + 0.24326740920748520596865966109343e-02, + -0.86219541491065032038526983549637e-03, + 0.28376573336321625302857636538295e-03, + -0.87057549874170423699396581464335e-04, + 0.24986849985481658331800044137276e-04, + -0.67319286764160294344603050339520e-05, + 0.17078578785573543710504524047844e-05, + -0.40917551226475381271896592490038e-06, + 0.92828292216755773260751785312273e-07, + -0.19991403610147617829845096332198e-07, + 0.40963490644082195241210487868917e-08, + -0.80032409540993168075706781753561e-09, + 0.14938503128761465059143225550110e-09, + -0.26687999885622329284924651063339e-10, + 0.45712216985159458151405617724103e-11, + -0.75187305222043565872243727326771e-12, + 0.11893100052629681879029828987302e-12, + -0.18116907933852346973490318263084e-13, + 0.26611733684358969193001612199626e-14, + -0.37738863052129419795444109905930e-15, + 0.51727953789087172679680082229329e-16, + -0.68603684084077500979419564670102e-17, + 0.88123751354161071806469337321745e-18, + -0.10974248249996606292106299624652e-18, + 0.13261199326367178513595545891635e-19, + -0.15562732768137380785488776571562e-20, + 0.17751425583655720607833415570773e-21, + -0.19695006967006578384953608765439e-22, + 0.21270074896998699661924010120533e-23, + -0.22375398124627973794182113962666e-24, + 0.22942768578582348946971383125333e-25, + -0.22943788846552928693329592319999e-26, + 0.22391702100592453618342297600000e-27, + -0.21338230616608897703678225066666e-28, + 0.19866196585123531518028458666666e-29, + -0.18079295866694391771955199999999e-30, + 0.16090686015283030305450666666666e-31 +}; +static cheb_series daw2_cs = { + daw2_data, + 32, /* 44, */ + -1, 1, + 21 +}; + +static double dawa_data[75] = { + 0.1690485637765703755422637438849e-01, + 0.8683252278406957990536107850768e-02, + 0.2424864042417715453277703459889e-03, + 0.1261182399572690001651949240377e-04, + 0.1066453314636176955705691125906e-05, + 0.1358159794790727611348424505728e-06, + 0.2171042356577298398904312744743e-07, + 0.2867010501805295270343676804813e-08, + -0.1901336393035820112282492378024e-09, + -0.3097780484395201125532065774268e-09, + -0.1029414876057509247398132286413e-09, + -0.6260356459459576150417587283121e-11, + 0.8563132497446451216262303166276e-11, + 0.3033045148075659292976266276257e-11, + -0.2523618306809291372630886938826e-12, + -0.4210604795440664513175461934510e-12, + -0.4431140826646238312143429452036e-13, + 0.4911210272841205205940037065117e-13, + 0.1235856242283903407076477954739e-13, + -0.5788733199016569246955765071069e-14, + -0.2282723294807358620978183957030e-14, + 0.7637149411014126476312362917590e-15, + 0.3851546883566811728777594002095e-15, + -0.1199932056928290592803237283045e-15, + -0.6313439150094572347334270285250e-16, + 0.2239559965972975375254912790237e-16, + 0.9987925830076495995132891200749e-17, + -0.4681068274322495334536246507252e-17, + -0.1436303644349721337241628751534e-17, + 0.1020822731410541112977908032130e-17, + 0.1538908873136092072837389822372e-18, + -0.2189157877645793888894790926056e-18, + 0.2156879197938651750392359152517e-20, + 0.4370219827442449851134792557395e-19, + -0.8234581460977207241098927905177e-20, + -0.7498648721256466222903202835420e-20, + 0.3282536720735671610957612930039e-20, + 0.8858064309503921116076561515151e-21, + -0.9185087111727002988094460531485e-21, + 0.2978962223788748988314166045791e-22, + 0.1972132136618471883159505468041e-21, + -0.5974775596362906638089584995117e-22, + -0.2834410031503850965443825182441e-22, + 0.2209560791131554514777150489012e-22, + -0.5439955741897144300079480307711e-25, + -0.5213549243294848668017136696470e-23, + 0.1702350556813114199065671499076e-23, + 0.6917400860836148343022185660197e-24, + -0.6540941793002752512239445125802e-24, + 0.6093576580439328960371824654636e-25, + 0.1408070432905187461501945080272e-24, + -0.6785886121054846331167674943755e-25, + -0.9799732036214295711741583102225e-26, + 0.2121244903099041332598960939160e-25, + -0.5954455022548790938238802154487e-26, + -0.3093088861875470177838847232049e-26, + 0.2854389216344524682400691986104e-26, + -0.3951289447379305566023477271811e-27, + -0.5906000648607628478116840894453e-27, + 0.3670236964668687003647889980609e-27, + -0.4839958238042276256598303038941e-29, + -0.9799265984210443869597404017022e-28, + 0.4684773732612130606158908804300e-28, + 0.5030877696993461051647667603155e-29, + -0.1547395051706028239247552068295e-28, + 0.6112180185086419243976005662714e-29, + 0.1357913399124811650343602736158e-29, + -0.2417687752768673088385304299044e-29, + 0.8369074582074298945292887587291e-30, + 0.2665413042788979165838319401566e-30, + -0.3811653692354890336935691003712e-30, + 0.1230054721884951464371706872585e-30, + 0.4622506399041493508805536929983e-31, + -0.6120087296881677722911435593001e-31, + 0.1966024640193164686956230217896e-31 +}; +static cheb_series dawa_cs = { + dawa_data, + 34, /* 74, */ + -1, 1, + 12 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_dawson_e(double x, gsl_sf_result * result) +{ + const double xsml = 1.225 * GSL_SQRT_DBL_EPSILON; + const double xbig = 1.0/(M_SQRT2*GSL_SQRT_DBL_EPSILON); + const double xmax = 0.1 * GSL_DBL_MAX; + + const double y = fabs(x); + + if(y < xsml) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(y < 1.0) { + gsl_sf_result result_c; + cheb_eval_e(&daw_cs, 2.0*y*y - 1.0, &result_c); + result->val = x * (0.75 + result_c.val); + result->err = y * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y < 4.0) { + gsl_sf_result result_c; + cheb_eval_e(&daw2_cs, 0.125*y*y - 1.0, &result_c); + result->val = x * (0.25 + result_c.val); + result->err = y * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y < xbig) { + gsl_sf_result result_c; + cheb_eval_e(&dawa_cs, 32.0/(y*y) - 1.0, &result_c); + result->val = (0.5 + result_c.val) / x; + result->err = result_c.err / y; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(y < xmax) { + result->val = 0.5/x; + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_dawson(double x) +{ + EVAL_RESULT(gsl_sf_dawson_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/debye.c b/software/gsl-1.15/specfunc/debye.c new file mode 100644 index 000000000..02af95cb0 --- /dev/null +++ b/software/gsl-1.15/specfunc/debye.c @@ -0,0 +1,566 @@ +/* specfunc/debye.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ +/* augmented to n=5 and 6 2005-11-08 by R. J. Mathar, http://www.strw.leidenuniv.nl/~mathar */ + +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +static double adeb1_data[17] = { + 2.4006597190381410194, + 0.1937213042189360089, + -0.62329124554895770e-02, + 0.3511174770206480e-03, + -0.228222466701231e-04, + 0.15805467875030e-05, + -0.1135378197072e-06, + 0.83583361188e-08, + -0.6264424787e-09, + 0.476033489e-10, + -0.36574154e-11, + 0.2835431e-12, + -0.221473e-13, + 0.17409e-14, + -0.1376e-15, + 0.109e-16, + -0.9e-18 +}; +static cheb_series adeb1_cs = { + adeb1_data, + 16, + -1.0, 1.0, + 9 +}; + +static double adeb2_data[18] = { + 2.5943810232570770282, + 0.2863357204530719834, + -0.102062656158046713e-01, + 0.6049109775346844e-03, + -0.405257658950210e-04, + 0.28633826328811e-05, + -0.2086394303065e-06, + 0.155237875826e-07, + -0.11731280087e-08, + 0.897358589e-10, + -0.69317614e-11, + 0.5398057e-12, + -0.423241e-13, + 0.33378e-14, + -0.2645e-15, + 0.211e-16, + -0.17e-17, + 0.1e-18 +}; +static cheb_series adeb2_cs = { + adeb2_data, + 17, + -1.0, 1.0, + 10 +}; + +static double adeb3_data[17] = { + 2.707737068327440945, + 0.340068135211091751, + -0.12945150184440869e-01, + 0.7963755380173816e-03, + -0.546360009590824e-04, + 0.39243019598805e-05, + -0.2894032823539e-06, + 0.217317613962e-07, + -0.16542099950e-08, + 0.1272796189e-09, + -0.987963460e-11, + 0.7725074e-12, + -0.607797e-13, + 0.48076e-14, + -0.3820e-15, + 0.305e-16, + -0.24e-17 +}; +static cheb_series adeb3_cs = { + adeb3_data, + 16, + -1.0, 1.0, + 10 +}; + +static double adeb4_data[17] = { + 2.781869415020523460, + 0.374976783526892863, + -0.14940907399031583e-01, + 0.945679811437042e-03, + -0.66132916138933e-04, + 0.4815632982144e-05, + -0.3588083958759e-06, + 0.271601187416e-07, + -0.20807099122e-08, + 0.1609383869e-09, + -0.125470979e-10, + 0.9847265e-12, + -0.777237e-13, + 0.61648e-14, + -0.4911e-15, + 0.393e-16, + -0.32e-17 +}; +static cheb_series adeb4_cs = { + adeb4_data, + 16, + -1.0, 1.0, + 10 +}; + +static double adeb5_data[17] = { + 2.8340269546834530149, + 0.3994098857106266445, + -0.164566764773099646e-1, + 0.10652138340664541e-2, + -0.756730374875418e-4, + 0.55745985240273e-5, + -0.4190692330918e-6, + 0.319456143678e-7, + -0.24613318171e-8, + 0.1912801633e-9, + -0.149720049e-10, + 0.11790312e-11, + -0.933329e-13, + 0.74218e-14, + -0.5925e-15, + 0.475e-16, + -0.39e-17 +}; +static cheb_series adeb5_cs = { + adeb5_data, + 16, + -1.0, 1.0, + 10 +}; + +static double adeb6_data[17] = { + 2.8726727134130122113, + 0.4174375352339027746, + -0.176453849354067873e-1, + 0.11629852733494556e-2, + -0.837118027357117e-4, + 0.62283611596189e-5, + -0.4718644465636e-6, + 0.361950397806e-7, + -0.28030368010e-8, + 0.2187681983e-9, + -0.171857387e-10, + 0.13575809e-11, + -0.1077580e-12, + 0.85893e-14, + -0.6872e-15, + 0.552e-16, + -0.44e-17 +}; +static cheb_series adeb6_cs = { + adeb6_data, + 16, + -1.0, 1.0, + 10 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_debye_1_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 1.64493406684822644; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - 0.25*x + x*x/36.0; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb1_cs, t, &c); + result->val = c.val - 0.25 * x; + result->err = c.err + 0.25 * x * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double sum = 0.0; + double xk = nexp * x; + double rk = nexp; + int i; + for(i=nexp; i>=1; i--) { + sum *= ex; + sum += (1.0 + 1.0/xk)/rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/x - sum*ex; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < xcut) { + result->val = (val_infinity - exp(-x)*(x+1.0)) / x; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = val_infinity/x; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_debye_2_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 4.80822761263837714; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - x/3.0 + x*x/24.0; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb2_cs, t, &c); + result->val = c.val - x/3.0; + result->err = c.err + GSL_DBL_EPSILON * x/3.0; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double xk = nexp * x; + double rk = nexp; + double sum = 0.0; + int i; + for(i=nexp; i>=1; i--) { + sum *= ex; + sum += (1.0 + 2.0/xk + 2.0/(xk*xk)) / rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/(x*x) - 2.0 * sum * ex; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < xcut) { + const double x2 = x*x; + const double sum = 2.0 + 2.0*x + x2; + result->val = (val_infinity - 2.0 * sum * exp(-x)) / x2; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = (val_infinity/x)/x; + result->err = GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_debye_3_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 19.4818182068004875; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - 3.0*x/8.0 + x*x/20.0; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb3_cs, t, &c); + result->val = c.val - 0.375*x; + result->err = c.err + GSL_DBL_EPSILON * 0.375*x; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double xk = nexp * x; + double rk = nexp; + double sum = 0.0; + int i; + for(i=nexp; i>=1; i--) { + double xk_inv = 1.0/xk; + sum *= ex; + sum += (((6.0*xk_inv + 6.0)*xk_inv + 3.0)*xk_inv + 1.0) / rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/(x*x*x) - 3.0 * sum * ex; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x < xcut) { + const double x3 = x*x*x; + const double sum = 6.0 + 6.0*x + 3.0*x*x + x3; + result->val = (val_infinity - 3.0 * sum * exp(-x)) / x3; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + result->val = ((val_infinity/x)/x)/x; + result->err = GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_debye_4_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 99.5450644937635129; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - 2.0*x/5.0 + x*x/18.0; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb4_cs, t, &c); + result->val = c.val - 2.0*x/5.0; + result->err = c.err + GSL_DBL_EPSILON * 2.0*x/5.0; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double xk = nexp * x; + double rk = nexp; + double sum = 0.0; + int i; + for(i=nexp; i>=1; i--) { + double xk_inv = 1.0/xk; + sum *= ex; + sum += ((((24.0*xk_inv + 24.0)*xk_inv + 12.0)*xk_inv + 4.0)*xk_inv + 1.0) / rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/(x*x*x*x) - 4.0 * sum * ex; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x < xcut) { + const double x2 = x*x; + const double x4 = x2*x2; + const double sum = 24.0 + 24.0*x + 12.0*x2 + 4.0*x2*x + x4; + result->val = (val_infinity - 4.0 * sum * exp(-x)) / x4; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + result->val = (((val_infinity/x)/x)/x)/x; + result->err = GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + +int gsl_sf_debye_5_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 610.405837190669483828710757875 ; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - 5.0*x/12.0 + 5.0*x*x/84.0; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb5_cs, t, &c); + result->val = c.val - 5.0*x/12.0; + result->err = c.err + GSL_DBL_EPSILON * 5.0*x/12.0; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double xk = nexp * x; + double rk = nexp; + double sum = 0.0; + int i; + for(i=nexp; i>=1; i--) { + double xk_inv = 1.0/xk; + sum *= ex; + sum += (((((120.0*xk_inv + 120.0)*xk_inv + 60.0)*xk_inv + 20.0)*xk_inv + 5.0)*xk_inv+ 1.0) / rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/(x*x*x*x*x) - 5.0 * sum * ex; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x < xcut) { + const double x2 = x*x; + const double x4 = x2*x2; + const double x5 = x4*x; + const double sum = 120.0 + 120.0*x + 60.0*x2 + 20.0*x2*x + 5.0*x4 + x5; + result->val = (val_infinity - 5.0 * sum * exp(-x)) / x5; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + result->val = ((((val_infinity/x)/x)/x)/x)/x; + result->err = GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + +int gsl_sf_debye_6_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 4356.06887828990661194792541535 ; + const double xcut = -GSL_LOG_DBL_MIN; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + result->val = 1.0 - 3.0*x/7.0 + x*x/16.0; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double t = x*x/8.0 - 1.0; + gsl_sf_result c; + cheb_eval_e(&adeb6_cs, t, &c); + result->val = c.val - 3.0*x/7.0; + result->err = c.err + GSL_DBL_EPSILON * 3.0*x/7.0; + return GSL_SUCCESS; + } + else if(x < -(M_LN2 + GSL_LOG_DBL_EPSILON)) { + const int nexp = floor(xcut/x); + const double ex = exp(-x); + double xk = nexp * x; + double rk = nexp; + double sum = 0.0; + int i; + for(i=nexp; i>=1; i--) { + double xk_inv = 1.0/xk; + sum *= ex; + sum += ((((((720.0*xk_inv + 720.0)*xk_inv + 360.0)*xk_inv + 120.0)*xk_inv + 30.0)*xk_inv+ 6.0)*xk_inv+ 1.0) / rk; + rk -= 1.0; + xk -= x; + } + result->val = val_infinity/(x*x*x*x*x*x) - 6.0 * sum * ex; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x < xcut) { + const double x2 = x*x; + const double x4 = x2*x2; + const double x6 = x4*x2; + const double sum = 720.0 + 720.0*x + 360.0*x2 + 120.0*x2*x + 30.0*x4 + 6.0*x4*x +x6 ; + result->val = (val_infinity - 6.0 * sum * exp(-x)) / x6; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + result->val = (((((val_infinity/x)/x)/x)/x)/x)/x ; + result->err = GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_debye_1(const double x) +{ + EVAL_RESULT(gsl_sf_debye_1_e(x, &result)); +} + +double gsl_sf_debye_2(const double x) +{ + EVAL_RESULT(gsl_sf_debye_2_e(x, &result)); +} + +double gsl_sf_debye_3(const double x) +{ + EVAL_RESULT(gsl_sf_debye_3_e(x, &result)); +} + +double gsl_sf_debye_4(const double x) +{ + EVAL_RESULT(gsl_sf_debye_4_e(x, &result)); +} + +double gsl_sf_debye_5(const double x) +{ + EVAL_RESULT(gsl_sf_debye_5_e(x, &result)); +} + +double gsl_sf_debye_6(const double x) +{ + EVAL_RESULT(gsl_sf_debye_6_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/dilog.c b/software/gsl-1.15/specfunc/dilog.c new file mode 100644 index 000000000..15586ef0d --- /dev/null +++ b/software/gsl-1.15/specfunc/dilog.c @@ -0,0 +1,662 @@ +/* specfunc/dilog.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + + +/* Evaluate series for real dilog(x) + * Sum[ x^k / k^2, {k,1,Infinity}] + * + * Converges rapidly for |x| < 1/2. + */ +static +int +dilog_series_1(const double x, gsl_sf_result * result) +{ + const int kmax = 1000; + double sum = x; + double term = x; + int k; + for(k=2; kval = sum; + result->err = 2.0 * fabs(term); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + if(k == kmax) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Compute the associated series + * + * sum_{k=1}{infty} r^k / (k^2 (k+1)) + * + * This is a series which appears in the one-step accelerated + * method, which splits out one elementary function from the + * full definition of Li_2(x). See below. + */ +static int +series_2(double r, gsl_sf_result * result) +{ + static const int kmax = 100; + double rk = r; + double sum = 0.5 * r; + int k; + for(k=2; k<10; k++) + { + double ds; + rk *= r; + ds = rk/(k*k*(k+1.0)); + sum += ds; + } + for(; kval = sum; + result->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(sum); + + return GSL_SUCCESS; +} + + +/* Compute Li_2(x) using the accelerated series representation. + * + * Li_2(x) = 1 + (1-x)ln(1-x)/x + series_2(x) + * + * assumes: -1 < x < 1 + */ +static int +dilog_series_2(double x, gsl_sf_result * result) +{ + const int stat_s3 = series_2(x, result); + double t; + if(x > 0.01) + t = (1.0 - x) * log(1.0-x) / x; + else + { + static const double c3 = 1.0/3.0; + static const double c4 = 1.0/4.0; + static const double c5 = 1.0/5.0; + static const double c6 = 1.0/6.0; + static const double c7 = 1.0/7.0; + static const double c8 = 1.0/8.0; + const double t68 = c6 + x*(c7 + x*c8); + const double t38 = c3 + x *(c4 + x *(c5 + x * t68)); + t = (x - 1.0) * (1.0 + x*(0.5 + x*t38)); + } + result->val += 1.0 + t; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(t); + return stat_s3; +} + + +/* Calculates Li_2(x) for real x. Assumes x >= 0.0. + */ +static +int +dilog_xge0(const double x, gsl_sf_result * result) +{ + if(x > 2.0) { + gsl_sf_result ser; + const int stat_ser = dilog_series_2(1.0/x, &ser); + const double log_x = log(x); + const double t1 = M_PI*M_PI/3.0; + const double t2 = ser.val; + const double t3 = 0.5*log_x*log_x; + result->val = t1 - t2 - t3; + result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; + result->err += GSL_DBL_EPSILON * (fabs(t1) + fabs(t2) + fabs(t3)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_ser; + } + else if(x > 1.01) { + gsl_sf_result ser; + const int stat_ser = dilog_series_2(1.0 - 1.0/x, &ser); + const double log_x = log(x); + const double log_term = log_x * (log(1.0-1.0/x) + 0.5*log_x); + const double t1 = M_PI*M_PI/6.0; + const double t2 = ser.val; + const double t3 = log_term; + result->val = t1 + t2 - t3; + result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; + result->err += GSL_DBL_EPSILON * (fabs(t1) + fabs(t2) + fabs(t3)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_ser; + } + else if(x > 1.0) { + /* series around x = 1.0 */ + const double eps = x - 1.0; + const double lne = log(eps); + const double c0 = M_PI*M_PI/6.0; + const double c1 = 1.0 - lne; + const double c2 = -(1.0 - 2.0*lne)/4.0; + const double c3 = (1.0 - 3.0*lne)/9.0; + const double c4 = -(1.0 - 4.0*lne)/16.0; + const double c5 = (1.0 - 5.0*lne)/25.0; + const double c6 = -(1.0 - 6.0*lne)/36.0; + const double c7 = (1.0 - 7.0*lne)/49.0; + const double c8 = -(1.0 - 8.0*lne)/64.0; + result->val = c0+eps*(c1+eps*(c2+eps*(c3+eps*(c4+eps*(c5+eps*(c6+eps*(c7+eps*c8))))))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x == 1.0) { + result->val = M_PI*M_PI/6.0; + result->err = 2.0 * GSL_DBL_EPSILON * M_PI*M_PI/6.0; + return GSL_SUCCESS; + } + else if(x > 0.5) { + gsl_sf_result ser; + const int stat_ser = dilog_series_2(1.0-x, &ser); + const double log_x = log(x); + const double t1 = M_PI*M_PI/6.0; + const double t2 = ser.val; + const double t3 = log_x*log(1.0-x); + result->val = t1 - t2 - t3; + result->err = GSL_DBL_EPSILON * fabs(log_x) + ser.err; + result->err += GSL_DBL_EPSILON * (fabs(t1) + fabs(t2) + fabs(t3)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_ser; + } + else if(x > 0.25) { + return dilog_series_2(x, result); + } + else if(x > 0.0) { + return dilog_series_1(x, result); + } + else { + /* x == 0.0 */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } +} + + +/* Evaluate the series representation for Li2(z): + * + * Li2(z) = Sum[ |z|^k / k^2 Exp[i k arg(z)], {k,1,Infinity}] + * |z| = r + * arg(z) = theta + * + * Assumes 0 < r < 1. + * It is used only for small r. + */ +static +int +dilogc_series_1( + const double r, + const double x, + const double y, + gsl_sf_result * real_result, + gsl_sf_result * imag_result + ) +{ + const double cos_theta = x/r; + const double sin_theta = y/r; + const double alpha = 1.0 - cos_theta; + const double beta = sin_theta; + double ck = cos_theta; + double sk = sin_theta; + double rk = r; + double real_sum = r*ck; + double imag_sum = r*sk; + const int kmax = 50 + (int)(22.0/(-log(r))); /* tuned for double-precision */ + int k; + for(k=2; kval = real_sum; + real_result->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(real_sum); + imag_result->val = imag_sum; + imag_result->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(imag_sum); + + return GSL_SUCCESS; +} + + +/* Compute + * + * sum_{k=1}{infty} z^k / (k^2 (k+1)) + * + * This is a series which appears in the one-step accelerated + * method, which splits out one elementary function from the + * full definition of Li_2. + */ +static int +series_2_c( + double r, + double x, + double y, + gsl_sf_result * sum_re, + gsl_sf_result * sum_im + ) +{ + const double cos_theta = x/r; + const double sin_theta = y/r; + const double alpha = 1.0 - cos_theta; + const double beta = sin_theta; + double ck = cos_theta; + double sk = sin_theta; + double rk = r; + double real_sum = 0.5 * r*ck; + double imag_sum = 0.5 * r*sk; + const int kmax = 30 + (int)(18.0/(-log(r))); /* tuned for double-precision */ + int k; + for(k=2; kval = real_sum; + sum_re->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(real_sum); + sum_im->val = imag_sum; + sum_im->err = 2.0 * kmax * GSL_DBL_EPSILON * fabs(imag_sum); + + return GSL_SUCCESS; +} + + +/* Compute Li_2(z) using the one-step accelerated series. + * + * Li_2(z) = 1 + (1-z)ln(1-z)/z + series_2_c(z) + * + * z = r exp(i theta) + * assumes: r < 1 + * assumes: r > epsilon, so that we take no special care with log(1-z) + */ +static +int +dilogc_series_2( + const double r, + const double x, + const double y, + gsl_sf_result * real_dl, + gsl_sf_result * imag_dl + ) +{ + if(r == 0.0) + { + real_dl->val = 0.0; + imag_dl->val = 0.0; + real_dl->err = 0.0; + imag_dl->err = 0.0; + return GSL_SUCCESS; + } + else + { + gsl_sf_result sum_re; + gsl_sf_result sum_im; + const int stat_s3 = series_2_c(r, x, y, &sum_re, &sum_im); + + /* t = ln(1-z)/z */ + gsl_sf_result ln_omz_r; + gsl_sf_result ln_omz_theta; + const int stat_log = gsl_sf_complex_log_e(1.0-x, -y, &ln_omz_r, &ln_omz_theta); + const double t_x = ( ln_omz_r.val * x + ln_omz_theta.val * y)/(r*r); + const double t_y = (-ln_omz_r.val * y + ln_omz_theta.val * x)/(r*r); + + /* r = (1-z) ln(1-z)/z */ + const double r_x = (1.0 - x) * t_x + y * t_y; + const double r_y = (1.0 - x) * t_y - y * t_x; + + real_dl->val = sum_re.val + r_x + 1.0; + imag_dl->val = sum_im.val + r_y; + real_dl->err = sum_re.err + 2.0*GSL_DBL_EPSILON*(fabs(real_dl->val) + fabs(r_x)); + imag_dl->err = sum_im.err + 2.0*GSL_DBL_EPSILON*(fabs(imag_dl->val) + fabs(r_y)); + return GSL_ERROR_SELECT_2(stat_s3, stat_log); + } +} + + +/* Evaluate a series for Li_2(z) when |z| is near 1. + * This is uniformly good away from z=1. + * + * Li_2(z) = Sum[ a^n/n! H_n(theta), {n, 0, Infinity}] + * + * where + * H_n(theta) = Sum[ e^(i m theta) m^n / m^2, {m, 1, Infinity}] + * a = ln(r) + * + * H_0(t) = Gl_2(t) + i Cl_2(t) + * H_1(t) = 1/2 ln(2(1-c)) + I atan2(-s, 1-c) + * H_2(t) = -1/2 + I/2 s/(1-c) + * H_3(t) = -1/2 /(1-c) + * H_4(t) = -I/2 s/(1-c)^2 + * H_5(t) = 1/2 (2 + c)/(1-c)^2 + * H_6(t) = I/2 s/(1-c)^5 (8(1-c) - s^2 (3 + c)) + */ +static +int +dilogc_series_3( + const double r, + const double x, + const double y, + gsl_sf_result * real_result, + gsl_sf_result * imag_result + ) +{ + const double theta = atan2(y, x); + const double cos_theta = x/r; + const double sin_theta = y/r; + const double a = log(r); + const double omc = 1.0 - cos_theta; + const double omc2 = omc*omc; + double H_re[7]; + double H_im[7]; + double an, nfact; + double sum_re, sum_im; + gsl_sf_result Him0; + int n; + + H_re[0] = M_PI*M_PI/6.0 + 0.25*(theta*theta - 2.0*M_PI*fabs(theta)); + gsl_sf_clausen_e(theta, &Him0); + H_im[0] = Him0.val; + + H_re[1] = -0.5*log(2.0*omc); + H_im[1] = -atan2(-sin_theta, omc); + + H_re[2] = -0.5; + H_im[2] = 0.5 * sin_theta/omc; + + H_re[3] = -0.5/omc; + H_im[3] = 0.0; + + H_re[4] = 0.0; + H_im[4] = -0.5*sin_theta/omc2; + + H_re[5] = 0.5 * (2.0 + cos_theta)/omc2; + H_im[5] = 0.0; + + H_re[6] = 0.0; + H_im[6] = 0.5 * sin_theta/(omc2*omc2*omc) * (8.0*omc - sin_theta*sin_theta*(3.0 + cos_theta)); + + sum_re = H_re[0]; + sum_im = H_im[0]; + an = 1.0; + nfact = 1.0; + for(n=1; n<=6; n++) { + double t; + an *= a; + nfact *= n; + t = an/nfact; + sum_re += t * H_re[n]; + sum_im += t * H_im[n]; + } + + real_result->val = sum_re; + real_result->err = 2.0 * 6.0 * GSL_DBL_EPSILON * fabs(sum_re) + fabs(an/nfact); + imag_result->val = sum_im; + imag_result->err = 2.0 * 6.0 * GSL_DBL_EPSILON * fabs(sum_im) + Him0.err + fabs(an/nfact); + + return GSL_SUCCESS; +} + + +/* Calculate complex dilogarithm Li_2(z) in the fundamental region, + * which we take to be the intersection of the unit disk with the + * half-space x < MAGIC_SPLIT_VALUE. It turns out that 0.732 is a + * nice choice for MAGIC_SPLIT_VALUE since then points mapped out + * of the x > MAGIC_SPLIT_VALUE region and into another part of the + * unit disk are bounded in radius by MAGIC_SPLIT_VALUE itself. + * + * If |z| < 0.98 we use a direct series summation. Otherwise z is very + * near the unit circle, and the series_2 expansion is used; see above. + * Because the fundamental region is bounded away from z = 1, this + * works well. + */ +static +int +dilogc_fundamental(double r, double x, double y, gsl_sf_result * real_dl, gsl_sf_result * imag_dl) +{ + if(r > 0.98) + return dilogc_series_3(r, x, y, real_dl, imag_dl); + else if(r > 0.25) + return dilogc_series_2(r, x, y, real_dl, imag_dl); + else + return dilogc_series_1(r, x, y, real_dl, imag_dl); +} + + +/* Compute Li_2(z) for z in the unit disk, |z| < 1. If z is outside + * the fundamental region, which means that it is too close to z = 1, + * then it is reflected into the fundamental region using the identity + * + * Li2(z) = -Li2(1-z) + zeta(2) - ln(z) ln(1-z). + */ +static +int +dilogc_unitdisk(double x, double y, gsl_sf_result * real_dl, gsl_sf_result * imag_dl) +{ + static const double MAGIC_SPLIT_VALUE = 0.732; + static const double zeta2 = M_PI*M_PI/6.0; + const double r = hypot(x, y); + + if(x > MAGIC_SPLIT_VALUE) + { + /* Reflect away from z = 1 if we are too close. The magic value + * insures that the reflected value of the radius satisfies the + * related inequality r_tmp < MAGIC_SPLIT_VALUE. + */ + const double x_tmp = 1.0 - x; + const double y_tmp = - y; + const double r_tmp = hypot(x_tmp, y_tmp); + /* const double cos_theta_tmp = x_tmp/r_tmp; */ + /* const double sin_theta_tmp = y_tmp/r_tmp; */ + + gsl_sf_result result_re_tmp; + gsl_sf_result result_im_tmp; + + const int stat_dilog = dilogc_fundamental(r_tmp, x_tmp, y_tmp, &result_re_tmp, &result_im_tmp); + + const double lnz = log(r); /* log(|z|) */ + const double lnomz = log(r_tmp); /* log(|1-z|) */ + const double argz = atan2(y, x); /* arg(z) assuming principal branch */ + const double argomz = atan2(y_tmp, x_tmp); /* arg(1-z) */ + real_dl->val = -result_re_tmp.val + zeta2 - lnz*lnomz + argz*argomz; + real_dl->err = result_re_tmp.err; + real_dl->err += 2.0 * GSL_DBL_EPSILON * (zeta2 + fabs(lnz*lnomz) + fabs(argz*argomz)); + imag_dl->val = -result_im_tmp.val - argz*lnomz - argomz*lnz; + imag_dl->err = result_im_tmp.err; + imag_dl->err += 2.0 * GSL_DBL_EPSILON * (fabs(argz*lnomz) + fabs(argomz*lnz)); + + return stat_dilog; + } + else + { + return dilogc_fundamental(r, x, y, real_dl, imag_dl); + } +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int +gsl_sf_dilog_e(const double x, gsl_sf_result * result) +{ + if(x >= 0.0) { + return dilog_xge0(x, result); + } + else { + gsl_sf_result d1, d2; + int stat_d1 = dilog_xge0( -x, &d1); + int stat_d2 = dilog_xge0(x*x, &d2); + result->val = -d1.val + 0.5 * d2.val; + result->err = d1.err + 0.5 * d2.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_d1, stat_d2); + } +} + + +int +gsl_sf_complex_dilog_xy_e( + const double x, + const double y, + gsl_sf_result * real_dl, + gsl_sf_result * imag_dl + ) +{ + const double zeta2 = M_PI*M_PI/6.0; + const double r2 = x*x + y*y; + + if(y == 0.0) + { + if(x >= 1.0) + { + imag_dl->val = -M_PI * log(x); + imag_dl->err = 2.0 * GSL_DBL_EPSILON * fabs(imag_dl->val); + } + else + { + imag_dl->val = 0.0; + imag_dl->err = 0.0; + } + return gsl_sf_dilog_e(x, real_dl); + } + else if(fabs(r2 - 1.0) < GSL_DBL_EPSILON) + { + /* Lewin A.2.4.1 and A.2.4.2 */ + + const double theta = atan2(y, x); + const double term1 = theta*theta/4.0; + const double term2 = M_PI*fabs(theta)/2.0; + real_dl->val = zeta2 + term1 - term2; + real_dl->err = 2.0 * GSL_DBL_EPSILON * (zeta2 + term1 + term2); + return gsl_sf_clausen_e(theta, imag_dl); + } + else if(r2 < 1.0) + { + return dilogc_unitdisk(x, y, real_dl, imag_dl); + } + else + { + /* Reduce argument to unit disk. */ + const double r = sqrt(r2); + const double x_tmp = x/r2; + const double y_tmp = -y/r2; + /* const double r_tmp = 1.0/r; */ + gsl_sf_result result_re_tmp, result_im_tmp; + + const int stat_dilog = + dilogc_unitdisk(x_tmp, y_tmp, &result_re_tmp, &result_im_tmp); + + /* Unwind the inversion. + * + * Li_2(z) + Li_2(1/z) = -zeta(2) - 1/2 ln(-z)^2 + */ + const double theta = atan2(y, x); + const double theta_abs = fabs(theta); + const double theta_sgn = ( theta < 0.0 ? -1.0 : 1.0 ); + const double ln_minusz_re = log(r); + const double ln_minusz_im = theta_sgn * (theta_abs - M_PI); + const double lmz2_re = ln_minusz_re*ln_minusz_re - ln_minusz_im*ln_minusz_im; + const double lmz2_im = 2.0*ln_minusz_re*ln_minusz_im; + real_dl->val = -result_re_tmp.val - 0.5 * lmz2_re - zeta2; + real_dl->err = result_re_tmp.err + 2.0*GSL_DBL_EPSILON*(0.5 * fabs(lmz2_re) + zeta2); + imag_dl->val = -result_im_tmp.val - 0.5 * lmz2_im; + imag_dl->err = result_im_tmp.err + 2.0*GSL_DBL_EPSILON*fabs(lmz2_im); + return stat_dilog; + } +} + + +int +gsl_sf_complex_dilog_e( + const double r, + const double theta, + gsl_sf_result * real_dl, + gsl_sf_result * imag_dl + ) +{ + const double cos_theta = cos(theta); + const double sin_theta = sin(theta); + const double x = r * cos_theta; + const double y = r * sin_theta; + return gsl_sf_complex_dilog_xy_e(x, y, real_dl, imag_dl); +} + + +int +gsl_sf_complex_spence_xy_e( + const double x, + const double y, + gsl_sf_result * real_sp, + gsl_sf_result * imag_sp + ) +{ + const double oms_x = 1.0 - x; + const double oms_y = - y; + return gsl_sf_complex_dilog_xy_e(oms_x, oms_y, real_sp, imag_sp); +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_dilog(const double x) +{ + EVAL_RESULT(gsl_sf_dilog_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/elementary.c b/software/gsl-1.15/specfunc/elementary.c new file mode 100644 index 000000000..38eaa013d --- /dev/null +++ b/software/gsl-1.15/specfunc/elementary.c @@ -0,0 +1,86 @@ +/* specfunc/elementary.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +int +gsl_sf_multiply_e(const double x, const double y, gsl_sf_result * result) +{ + const double ax = fabs(x); + const double ay = fabs(y); + + if(x == 0.0 || y == 0.0) { + /* It is necessary to eliminate this immediately. + */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if((ax <= 1.0 && ay >= 1.0) || (ay <= 1.0 && ax >= 1.0)) { + /* Straddling 1.0 is always safe. + */ + result->val = x*y; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double f = 1.0 - 2.0 * GSL_DBL_EPSILON; + const double min = GSL_MIN_DBL(fabs(x), fabs(y)); + const double max = GSL_MAX_DBL(fabs(x), fabs(y)); + if(max < 0.9 * GSL_SQRT_DBL_MAX || min < (f * DBL_MAX)/max) { + result->val = GSL_COERCE_DBL(x*y); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } + } +} + + +int +gsl_sf_multiply_err_e(const double x, const double dx, + const double y, const double dy, + gsl_sf_result * result) +{ + int status = gsl_sf_multiply_e(x, y, result); + result->err += fabs(dx*y) + fabs(dy*x); + return status; +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_multiply(const double x, const double y) +{ + EVAL_RESULT(gsl_sf_multiply_e(x, y, &result)); +} + diff --git a/software/gsl-1.15/specfunc/ellint.c b/software/gsl-1.15/specfunc/ellint.c new file mode 100644 index 000000000..f56bbbe15 --- /dev/null +++ b/software/gsl-1.15/specfunc/ellint.c @@ -0,0 +1,651 @@ +/* specfunc/ellint.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +inline +static double locMAX3(double x, double y, double z) +{ + double xy = GSL_MAX(x, y); + return GSL_MAX(xy, z); +} + +inline +static double locMAX4(double x, double y, double z, double w) +{ + double xy = GSL_MAX(x, y); + double xyz = GSL_MAX(xy, z); + return GSL_MAX(xyz, w); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on Carlson's algorithms: + [B. C. Carlson Numer. Math. 33, 1 (1979)] + + see also: + [B.C. Carlson, Special Functions of Applied Mathematics (1977)] + */ + +/* According to Carlson's algorithm, the errtol parameter + typically effects the relative error in the following way: + + relative error < 16 errtol^6 / (1 - 2 errtol) + + errtol precision + ------ ---------- + 0.001 1.0e-17 + 0.003 2.0e-14 + 0.01 2.0e-11 + 0.03 2.0e-8 + 0.1 2.0e-5 +*/ + + +int +gsl_sf_ellint_RC_e(double x, double y, gsl_mode_t mode, gsl_sf_result * result) +{ + const double lolim = 5.0 * GSL_DBL_MIN; + const double uplim = 0.2 * GSL_DBL_MAX; + const gsl_prec_t goal = GSL_MODE_PREC(mode); + const double errtol = ( goal == GSL_PREC_DOUBLE ? 0.001 : 0.03 ); + const double prec = gsl_prec_eps[goal]; + const int nmax = 10000; + + if(x < 0.0 || y < 0.0 || x + y < lolim) { + DOMAIN_ERROR(result); + } + else if(GSL_MAX(x, y) < uplim) { + const double c1 = 1.0 / 7.0; + const double c2 = 9.0 / 22.0; + double xn = x; + double yn = y; + double mu, sn, lamda, s; + int n = 0; + while(1) { + mu = (xn + yn + yn) / 3.0; + sn = (yn + mu) / mu - 2.0; + if (fabs(sn) < errtol) break; + lamda = 2.0 * sqrt(xn) * sqrt(yn) + yn; + xn = (xn + lamda) * 0.25; + yn = (yn + lamda) * 0.25; + n++; + if(n==nmax) { + MAXITER_ERROR (result); + } + } + s = sn * sn * (0.3 + sn * (c1 + sn * (0.375 + sn * c2))); + result->val = (1.0 + s) / sqrt(mu); + result->err = prec * fabs(result->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +int +gsl_sf_ellint_RD_e(double x, double y, double z, gsl_mode_t mode, gsl_sf_result * result) +{ + const gsl_prec_t goal = GSL_MODE_PREC(mode); + const double errtol = ( goal == GSL_PREC_DOUBLE ? 0.001 : 0.03 ); + const double prec = gsl_prec_eps[goal]; + const double lolim = 2.0/pow(GSL_DBL_MAX, 2.0/3.0); + const double uplim = pow(0.1*errtol/GSL_DBL_MIN, 2.0/3.0); + const nmax = 10000; + + if(GSL_MIN(x,y) < 0.0 || GSL_MIN(x+y,z) < lolim) { + DOMAIN_ERROR(result); + } + else if(locMAX3(x,y,z) < uplim) { + const double c1 = 3.0 / 14.0; + const double c2 = 1.0 / 6.0; + const double c3 = 9.0 / 22.0; + const double c4 = 3.0 / 26.0; + double xn = x; + double yn = y; + double zn = z; + double sigma = 0.0; + double power4 = 1.0; + double ea, eb, ec, ed, ef, s1, s2; + double mu, xndev, yndev, zndev; + int n = 0; + while(1) { + double xnroot, ynroot, znroot, lamda; + double epslon; + mu = (xn + yn + 3.0 * zn) * 0.2; + xndev = (mu - xn) / mu; + yndev = (mu - yn) / mu; + zndev = (mu - zn) / mu; + epslon = locMAX3(fabs(xndev), fabs(yndev), fabs(zndev)); + if (epslon < errtol) break; + xnroot = sqrt(xn); + ynroot = sqrt(yn); + znroot = sqrt(zn); + lamda = xnroot * (ynroot + znroot) + ynroot * znroot; + sigma += power4 / (znroot * (zn + lamda)); + power4 *= 0.25; + xn = (xn + lamda) * 0.25; + yn = (yn + lamda) * 0.25; + zn = (zn + lamda) * 0.25; + n++; + if(n==nmax) { + MAXITER_ERROR (result); + } + } + ea = xndev * yndev; + eb = zndev * zndev; + ec = ea - eb; + ed = ea - 6.0 * eb; + ef = ed + ec + ec; + s1 = ed * (- c1 + 0.25 * c3 * ed - 1.5 * c4 * zndev * ef); + s2 = zndev * (c2 * ef + zndev * (- c3 * ec + zndev * c4 * ea)); + result->val = 3.0 * sigma + power4 * (1.0 + s1 + s2) / (mu * sqrt(mu)); + result->err = prec * fabs(result->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +int +gsl_sf_ellint_RF_e(double x, double y, double z, gsl_mode_t mode, gsl_sf_result * result) +{ + const double lolim = 5.0 * GSL_DBL_MIN; + const double uplim = 0.2 * GSL_DBL_MAX; + const gsl_prec_t goal = GSL_MODE_PREC(mode); + const double errtol = ( goal == GSL_PREC_DOUBLE ? 0.001 : 0.03 ); + const double prec = gsl_prec_eps[goal]; + const int nmax = 10000; + + if(x < 0.0 || y < 0.0 || z < 0.0) { + DOMAIN_ERROR(result); + } + else if(x+y < lolim || x+z < lolim || y+z < lolim) { + DOMAIN_ERROR(result); + } + else if(locMAX3(x,y,z) < uplim) { + const double c1 = 1.0 / 24.0; + const double c2 = 3.0 / 44.0; + const double c3 = 1.0 / 14.0; + double xn = x; + double yn = y; + double zn = z; + double mu, xndev, yndev, zndev, e2, e3, s; + int n = 0; + while(1) { + double epslon, lamda; + double xnroot, ynroot, znroot; + mu = (xn + yn + zn) / 3.0; + xndev = 2.0 - (mu + xn) / mu; + yndev = 2.0 - (mu + yn) / mu; + zndev = 2.0 - (mu + zn) / mu; + epslon = locMAX3(fabs(xndev), fabs(yndev), fabs(zndev)); + if (epslon < errtol) break; + xnroot = sqrt(xn); + ynroot = sqrt(yn); + znroot = sqrt(zn); + lamda = xnroot * (ynroot + znroot) + ynroot * znroot; + xn = (xn + lamda) * 0.25; + yn = (yn + lamda) * 0.25; + zn = (zn + lamda) * 0.25; + n++; + if(n==nmax) { + MAXITER_ERROR (result); + } + } + e2 = xndev * yndev - zndev * zndev; + e3 = xndev * yndev * zndev; + s = 1.0 + (c1 * e2 - 0.1 - c2 * e3) * e2 + c3 * e3; + result->val = s / sqrt(mu); + result->err = prec * fabs(result->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +int +gsl_sf_ellint_RJ_e(double x, double y, double z, double p, gsl_mode_t mode, gsl_sf_result * result) +{ + const gsl_prec_t goal = GSL_MODE_PREC(mode); + const double errtol = ( goal == GSL_PREC_DOUBLE ? 0.001 : 0.03 ); + const double prec = gsl_prec_eps[goal]; + const double lolim = pow(5.0 * GSL_DBL_MIN, 1.0/3.0); + const double uplim = 0.3 * pow(0.2 * GSL_DBL_MAX, 1.0/3.0); + const int nmax = 10000; + + if(x < 0.0 || y < 0.0 || z < 0.0) { + DOMAIN_ERROR(result); + } + else if(x + y < lolim || x + z < lolim || y + z < lolim || p < lolim) { + DOMAIN_ERROR(result); + } + else if(locMAX4(x,y,z,p) < uplim) { + const double c1 = 3.0 / 14.0; + const double c2 = 1.0 / 3.0; + const double c3 = 3.0 / 22.0; + const double c4 = 3.0 / 26.0; + double xn = x; + double yn = y; + double zn = z; + double pn = p; + double sigma = 0.0; + double power4 = 1.0; + double mu, xndev, yndev, zndev, pndev; + double ea, eb, ec, e2, e3, s1, s2, s3; + int n = 0; + while(1) { + double xnroot, ynroot, znroot; + double lamda, alfa, beta; + double epslon; + gsl_sf_result rcresult; + int rcstatus; + mu = (xn + yn + zn + pn + pn) * 0.2; + xndev = (mu - xn) / mu; + yndev = (mu - yn) / mu; + zndev = (mu - zn) / mu; + pndev = (mu - pn) / mu; + epslon = locMAX4(fabs(xndev), fabs(yndev), fabs(zndev), fabs(pndev)); + if(epslon < errtol) break; + xnroot = sqrt(xn); + ynroot = sqrt(yn); + znroot = sqrt(zn); + lamda = xnroot * (ynroot + znroot) + ynroot * znroot; + alfa = pn * (xnroot + ynroot + znroot) + xnroot * ynroot * znroot; + alfa = alfa * alfa; + beta = pn * (pn + lamda) * (pn + lamda); + rcstatus = gsl_sf_ellint_RC_e(alfa, beta, mode, &rcresult); + if(rcstatus != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + return rcstatus; + } + sigma += power4 * rcresult.val; + power4 *= 0.25; + xn = (xn + lamda) * 0.25; + yn = (yn + lamda) * 0.25; + zn = (zn + lamda) * 0.25; + pn = (pn + lamda) * 0.25; + n++; + if(n==nmax) { + MAXITER_ERROR (result); + } + } + + ea = xndev * (yndev + zndev) + yndev * zndev; + eb = xndev * yndev * zndev; + ec = pndev * pndev; + e2 = ea - 3.0 * ec; + e3 = eb + 2.0 * pndev * (ea - ec); + s1 = 1.0 + e2 * (- c1 + 0.75 * c3 * e2 - 1.5 * c4 * e3); + s2 = eb * (0.5 * c2 + pndev * (- c3 - c3 + pndev * c4)); + s3 = pndev * ea * (c2 - pndev * c3) - c2 * pndev * ec; + result->val = 3.0 * sigma + power4 * (s1 + s2 + s3) / (mu * sqrt(mu)); + result->err = prec * fabs(result->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.1)] */ +int +gsl_sf_ellint_F_e(double phi, double k, gsl_mode_t mode, gsl_sf_result * result) +{ + /* Angular reduction to -pi/2 < phi < pi/2 (we should really use an + exact reduction but this will have to do for now) BJG */ + + double nc = floor(phi/M_PI + 0.5); + double phi_red = phi - nc * M_PI; + phi = phi_red; + + { + double sin_phi = sin(phi); + double sin2_phi = sin_phi*sin_phi; + double x = 1.0 - sin2_phi; + double y = 1.0 - k*k*sin2_phi; + gsl_sf_result rf; + int status = gsl_sf_ellint_RF_e(x, y, 1.0, mode, &rf); + result->val = sin_phi * rf.val; + result->err = GSL_DBL_EPSILON * fabs(result->val) + fabs(sin_phi*rf.err); + if (nc == 0) { + return status; + } else { + gsl_sf_result rk; /* add extra terms from periodicity */ + const int rkstatus = gsl_sf_ellint_Kcomp_e(k, mode, &rk); + result->val += 2*nc*rk.val; + result->err += 2*fabs(nc)*rk.err; + return GSL_ERROR_SELECT_2(status, rkstatus); + } + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.2)] */ +int +gsl_sf_ellint_E_e(double phi, double k, gsl_mode_t mode, gsl_sf_result * result) +{ + /* Angular reduction to -pi/2 < phi < pi/2 (we should really use an + exact reduction but this will have to do for now) BJG */ + + double nc = floor(phi/M_PI + 0.5); + double phi_red = phi - nc * M_PI; + phi = phi_red; + + { + const double sin_phi = sin(phi); + const double sin2_phi = sin_phi * sin_phi; + const double x = 1.0 - sin2_phi; + const double y = 1.0 - k*k*sin2_phi; + + if(x < GSL_DBL_EPSILON) { + gsl_sf_result re; + const int status = gsl_sf_ellint_Ecomp_e(k, mode, &re); + /* could use A&S 17.4.14 to improve the value below */ + result->val = 2*nc*re.val + GSL_SIGN(sin_phi) * re.val; + result->err = 2*fabs(nc)*re.err + re.err; + return status; + } + else { + gsl_sf_result rf, rd; + const double sin3_phi = sin2_phi * sin_phi; + const int rfstatus = gsl_sf_ellint_RF_e(x, y, 1.0, mode, &rf); + const int rdstatus = gsl_sf_ellint_RD_e(x, y, 1.0, mode, &rd); + result->val = sin_phi * rf.val - k*k/3.0 * sin3_phi * rd.val; + result->err = GSL_DBL_EPSILON * fabs(sin_phi * rf.val); + result->err += fabs(sin_phi*rf.err); + result->err += k*k/3.0 * GSL_DBL_EPSILON * fabs(sin3_phi * rd.val); + result->err += k*k/3.0 * fabs(sin3_phi*rd.err); + if (nc == 0) { + return GSL_ERROR_SELECT_2(rfstatus, rdstatus); + } else { + gsl_sf_result re; /* add extra terms from periodicity */ + const int restatus = gsl_sf_ellint_Ecomp_e(k, mode, &re); + result->val += 2*nc*re.val; + result->err += 2*fabs(nc)*re.err; + return GSL_ERROR_SELECT_3(rfstatus, rdstatus, restatus); + } + } + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.3)] */ +int +gsl_sf_ellint_P_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result * result) +{ + /* Angular reduction to -pi/2 < phi < pi/2 (we should really use an + exact reduction but this will have to do for now) BJG */ + + double nc = floor(phi/M_PI + 0.5); + double phi_red = phi - nc * M_PI; + phi = phi_red; + + /* FIXME: need to handle the case of small x, as for E,F */ + + { + const double sin_phi = sin(phi); + const double sin2_phi = sin_phi * sin_phi; + const double sin3_phi = sin2_phi * sin_phi; + const double x = 1.0 - sin2_phi; + const double y = 1.0 - k*k*sin2_phi; + gsl_sf_result rf; + gsl_sf_result rj; + const int rfstatus = gsl_sf_ellint_RF_e(x, y, 1.0, mode, &rf); + const int rjstatus = gsl_sf_ellint_RJ_e(x, y, 1.0, 1.0 + n*sin2_phi, mode, &rj); + result->val = sin_phi * rf.val - n/3.0*sin3_phi * rj.val; + result->err = GSL_DBL_EPSILON * fabs(sin_phi * rf.val); + result->err += fabs(sin_phi * rf.err); + result->err += n/3.0 * GSL_DBL_EPSILON * fabs(sin3_phi*rj.val); + result->err += n/3.0 * fabs(sin3_phi*rj.err); + if (nc == 0) { + return GSL_ERROR_SELECT_2(rfstatus, rjstatus); + } else { + gsl_sf_result rp; /* add extra terms from periodicity */ + const int rpstatus = gsl_sf_ellint_Pcomp_e(k, n, mode, &rp); + result->val += 2*nc*rp.val; + result->err += 2*fabs(nc)*rp.err; + return GSL_ERROR_SELECT_3(rfstatus, rjstatus, rpstatus); + } + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.4)] */ +int +gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result * result) +{ + /* Angular reduction to -pi/2 < phi < pi/2 (we should really use an + exact reduction but this will have to do for now) BJG */ + + double nc = floor(phi/M_PI + 0.5); + double phi_red = phi - nc * M_PI; + phi = phi_red; + + /* FIXME: need to handle the case of small x, as for E,F */ + { + const double sin_phi = sin(phi); + const double sin2_phi = sin_phi * sin_phi; + const double sin3_phi = sin2_phi * sin_phi; + const double x = 1.0 - sin2_phi; + const double y = 1.0 - k*k*sin2_phi; + gsl_sf_result rd; + const int status = gsl_sf_ellint_RD_e(x, y, 1.0, mode, &rd); + result->val = sin3_phi/3.0 * rd.val; + result->err = GSL_DBL_EPSILON * fabs(result->val) + fabs(sin3_phi/3.0 * rd.err); + if (nc == 0) { + return status; + } else { + gsl_sf_result rd; /* add extra terms from periodicity */ + const int rdstatus = gsl_sf_ellint_Dcomp_e(k, mode, &rd); + result->val += 2*nc*rd.val; + result->err += 2*fabs(nc)*rd.err; + return GSL_ERROR_SELECT_2(status, rdstatus); + } + } +} + +int +gsl_sf_ellint_Dcomp_e(double k, gsl_mode_t mode, gsl_sf_result * result) +{ + if(k*k >= 1.0) { + DOMAIN_ERROR(result); + } else { + const double y = 1.0 - k*k; /* FIXME: still need to handle k~=~1 */ + gsl_sf_result rd; + const int status = gsl_sf_ellint_RD_e(0.0, y, 1.0, mode, &rd); + result->val = (1.0/3.0) * rd.val; + result->err = GSL_DBL_EPSILON * fabs(result->val) + fabs(1.0/3.0 * rd.err); + return status; + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.5)] */ +int +gsl_sf_ellint_Kcomp_e(double k, gsl_mode_t mode, gsl_sf_result * result) +{ + if(k*k >= 1.0) { + DOMAIN_ERROR(result); + } + else if(k*k >= 1.0 - GSL_SQRT_DBL_EPSILON) { + /* [Abramowitz+Stegun, 17.3.34] */ + const double y = 1.0 - k*k; + const double a[] = { 1.38629436112, 0.09666344259, 0.03590092383 }; + const double b[] = { 0.5, 0.12498593597, 0.06880248576 }; + const double ta = a[0] + y*(a[1] + y*a[2]); + const double tb = -log(y) * (b[0] + y*(b[1] + y*b[2])); + result->val = ta + tb; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(result->val) + fabs(k/y)); + return GSL_SUCCESS; + } + else { + /* This was previously computed as, + + return gsl_sf_ellint_RF_e(0.0, 1.0 - k*k, 1.0, mode, result); + + but this underestimated the total error for small k, since the + argument y=1-k^2 is not exact (there is an absolute error of + GSL_DBL_EPSILON near y=0 due to cancellation in the subtraction). + Taking the singular behavior of -log(y) above gives an error + of 0.5*epsilon/y near y=0. (BJG) */ + + double y = 1.0 - k*k; + int status = gsl_sf_ellint_RF_e(0.0, y, 1.0, mode, result); + result->err += 0.5 * GSL_DBL_EPSILON / y; + return status ; + } +} + + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.6)] */ +int +gsl_sf_ellint_Ecomp_e(double k, gsl_mode_t mode, gsl_sf_result * result) +{ + if(k*k >= 1.0) { + DOMAIN_ERROR(result); + } + else if(k*k >= 1.0 - GSL_SQRT_DBL_EPSILON) { + /* [Abramowitz+Stegun, 17.3.36] */ + const double y = 1.0 - k*k; + const double a[] = { 0.44325141463, 0.06260601220, 0.04757383546 }; + const double b[] = { 0.24998368310, 0.09200180037, 0.04069697526 }; + const double ta = 1.0 + y*(a[0] + y*(a[1] + a[2]*y)); + const double tb = -y*log(y) * (b[0] + y*(b[1] + b[2]*y)); + result->val = ta + tb; + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + gsl_sf_result rf; + gsl_sf_result rd; + const double y = 1.0 - k*k; + const int rfstatus = gsl_sf_ellint_RF_e(0.0, y, 1.0, mode, &rf); + const int rdstatus = gsl_sf_ellint_RD_e(0.0, y, 1.0, mode, &rd); + result->val = rf.val - k*k/3.0 * rd.val; + result->err = rf.err + k*k/3.0 * rd.err; + return GSL_ERROR_SELECT_2(rfstatus, rdstatus); + } +} + +/* [Carlson, Numer. Math. 33 (1979) 1, (4.3) phi=pi/2] */ +int +gsl_sf_ellint_Pcomp_e(double k, double n, gsl_mode_t mode, gsl_sf_result * result) +{ + if(k*k >= 1.0) { + DOMAIN_ERROR(result); + } + /* FIXME: need to handle k ~=~ 1 cancellations */ + else { + gsl_sf_result rf; + gsl_sf_result rj; + const double y = 1.0 - k*k; + const int rfstatus = gsl_sf_ellint_RF_e(0.0, y, 1.0, mode, &rf); + const int rjstatus = gsl_sf_ellint_RJ_e(0.0, y, 1.0, 1.0 + n, mode, &rj); + result->val = rf.val - (n/3.0) * rj.val; + result->err = rf.err + fabs(n/3.0) * rj.err; + return GSL_ERROR_SELECT_2(rfstatus, rjstatus); + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_ellint_Kcomp(double k, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_Kcomp_e(k, mode, &result)); +} + +double gsl_sf_ellint_Ecomp(double k, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_Ecomp_e(k, mode, &result)); +} + +double gsl_sf_ellint_Pcomp(double k, double n, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_Pcomp_e(k, n, mode, &result)); +} + +double gsl_sf_ellint_Dcomp(double k, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_Dcomp_e(k, mode, &result)); +} + +double gsl_sf_ellint_F(double phi, double k, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_F_e(phi, k, mode, &result)); +} + +double gsl_sf_ellint_E(double phi, double k, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_E_e(phi, k, mode, &result)); +} + +double gsl_sf_ellint_P(double phi, double k, double n, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_P_e(phi, k, n, mode, &result)); +} + +double gsl_sf_ellint_D(double phi, double k, double n, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_D_e(phi, k, n, mode, &result)); +} + +double gsl_sf_ellint_RC(double x, double y, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_RC_e(x, y, mode, &result)); +} + +double gsl_sf_ellint_RD(double x, double y, double z, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_RD_e(x, y, z, mode, &result)); +} + +double gsl_sf_ellint_RF(double x, double y, double z, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_RF_e(x, y, z, mode, &result)); +} + +double gsl_sf_ellint_RJ(double x, double y, double z, double p, gsl_mode_t mode) +{ + EVAL_RESULT(gsl_sf_ellint_RJ_e(x, y, z, p, mode, &result)); +} diff --git a/software/gsl-1.15/specfunc/elljac.c b/software/gsl-1.15/specfunc/elljac.c new file mode 100644 index 000000000..340306e48 --- /dev/null +++ b/software/gsl-1.15/specfunc/elljac.c @@ -0,0 +1,128 @@ +/* specfunc/elljac.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + + +/* GJ: See [Thompson, Atlas for Computing Mathematical Functions] */ + +/* BJG 2005-07: New algorithm based on Algorithm 5 from Numerische + Mathematik 7, 78-90 (1965) "Numerical Calculation of Elliptic + Integrals and Elliptic Functions" R. Bulirsch. + + Minor tweak is to avoid division by zero when sin(x u_l) = 0 by + computing reflected values sn(K-u) cn(K-u) dn(K-u) and using + transformation from Abramowitz & Stegun table 16.8 column "K-u"*/ + +int +gsl_sf_elljac_e(double u, double m, double * sn, double * cn, double * dn) +{ + if(fabs(m) > 1.0) { + *sn = 0.0; + *cn = 0.0; + *dn = 0.0; + GSL_ERROR ("|m| > 1.0", GSL_EDOM); + } + else if(fabs(m) < 2.0*GSL_DBL_EPSILON) { + *sn = sin(u); + *cn = cos(u); + *dn = 1.0; + return GSL_SUCCESS; + } + else if(fabs(m - 1.0) < 2.0*GSL_DBL_EPSILON) { + *sn = tanh(u); + *cn = 1.0/cosh(u); + *dn = *cn; + return GSL_SUCCESS; + } + else { + int status = GSL_SUCCESS; + const int N = 16; + double mu[16]; + double nu[16]; + double c[16]; + double d[16]; + double sin_umu, cos_umu, t, r; + int n = 0; + + mu[0] = 1.0; + nu[0] = sqrt(1.0 - m); + + while( fabs(mu[n] - nu[n]) > 4.0 * GSL_DBL_EPSILON * fabs(mu[n]+nu[n])) { + mu[n+1] = 0.5 * (mu[n] + nu[n]); + nu[n+1] = sqrt(mu[n] * nu[n]); + ++n; + if(n >= N - 1) { + status = GSL_EMAXITER; + break; + } + } + + sin_umu = sin(u * mu[n]); + cos_umu = cos(u * mu[n]); + + /* Since sin(u*mu(n)) can be zero we switch to computing sn(K-u), + cn(K-u), dn(K-u) when |sin| < |cos| */ + + if (fabs(sin_umu) < fabs(cos_umu)) + { + t = sin_umu / cos_umu; + + c[n] = mu[n] * t; + d[n] = 1.0; + + while(n > 0) { + n--; + c[n] = d[n+1] * c[n+1]; + r = (c[n+1] * c[n+1]) / mu[n+1]; + d[n] = (r + nu[n]) / (r + mu[n]); + } + + *dn = sqrt(1.0-m) / d[n]; + *cn = (*dn) * GSL_SIGN(cos_umu) / gsl_hypot(1.0, c[n]); + *sn = (*cn) * c[n] /sqrt(1.0-m); + } + else + { + t = cos_umu / sin_umu; + + c[n] = mu[n] * t; + d[n] = 1.0; + + while(n > 0) { + --n; + c[n] = d[n+1] * c[n+1]; + r = (c[n+1] * c[n+1]) / mu[n+1]; + d[n] = (r + nu[n]) / (r + mu[n]); + } + + *dn = d[n]; + *sn = GSL_SIGN(sin_umu) / gsl_hypot(1.0, c[n]); + *cn = c[n] * (*sn); + } + + return status; + } +} diff --git a/software/gsl-1.15/specfunc/erfc.c b/software/gsl-1.15/specfunc/erfc.c new file mode 100644 index 000000000..819dbb029 --- /dev/null +++ b/software/gsl-1.15/specfunc/erfc.c @@ -0,0 +1,465 @@ +/* specfunc/erfc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: J. Theiler (modifications by G. Jungman) */ + +/* + * See Hart et al, Computer Approximations, John Wiley and Sons, New York (1968) + * (This applies only to the erfc8 stuff, which is the part + * of the original code that survives. I have replaced much of + * the other stuff with Chebyshev fits. These are simpler and + * more precise than the original approximations. [GJ]) + */ +#include +#include +#include +#include +#include + +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +#define LogRootPi_ 0.57236494292470008706 + + +static double erfc8_sum(double x) +{ + /* estimates erfc(x) valid for 8 < x < 100 */ + /* This is based on index 5725 in Hart et al */ + + static double P[] = { + 2.97886562639399288862, + 7.409740605964741794425, + 6.1602098531096305440906, + 5.019049726784267463450058, + 1.275366644729965952479585264, + 0.5641895835477550741253201704 + }; + static double Q[] = { + 3.3690752069827527677, + 9.608965327192787870698, + 17.08144074746600431571095, + 12.0489519278551290360340491, + 9.396034016235054150430579648, + 2.260528520767326969591866945, + 1.0 + }; + double num=0.0, den=0.0; + int i; + + num = P[5]; + for (i=4; i>=0; --i) { + num = x*num + P[i]; + } + den = Q[6]; + for (i=5; i>=0; --i) { + den = x*den + Q[i]; + } + + return num/den; +} + +inline +static double erfc8(double x) +{ + double e; + e = erfc8_sum(x); + e *= exp(-x*x); + return e; +} + +inline +static double log_erfc8(double x) +{ + double e; + e = erfc8_sum(x); + e = log(e) - x*x; + return e; +} + +#if 0 +/* Abramowitz+Stegun, 7.2.14 */ +static double erfcasympsum(double x) +{ + int i; + double e = 1.; + double coef = 1.; + for (i=1; i<5; ++i) { + /* coef *= -(2*i-1)/(2*x*x); ??? [GJ] */ + coef *= -(2*i+1)/(i*(4*x*x*x*x)); + e += coef; + /* + if (fabs(coef) < 1.0e-15) break; + if (fabs(coef) > 1.0e10) break; + + [GJ]: These tests are not useful. This function is only + used below. Took them out; they gum up the pipeline. + */ + } + return e; +} +#endif /* 0 */ + + +/* Abramowitz+Stegun, 7.1.5 */ +static int erfseries(double x, gsl_sf_result * result) +{ + double coef = x; + double e = coef; + double del; + int k; + for (k=1; k<30; ++k) { + coef *= -x*x/k; + del = coef/(2.0*k+1.0); + e += del; + } + result->val = 2.0 / M_SQRTPI * e; + result->err = 2.0 / M_SQRTPI * (fabs(del) + GSL_DBL_EPSILON); + return GSL_SUCCESS; +} + + +/* Chebyshev fit for erfc((t+1)/2), -1 < t < 1 + */ +static double erfc_xlt1_data[20] = { + 1.06073416421769980345174155056, + -0.42582445804381043569204735291, + 0.04955262679620434040357683080, + 0.00449293488768382749558001242, + -0.00129194104658496953494224761, + -0.00001836389292149396270416979, + 0.00002211114704099526291538556, + -5.23337485234257134673693179020e-7, + -2.78184788833537885382530989578e-7, + 1.41158092748813114560316684249e-8, + 2.72571296330561699984539141865e-9, + -2.06343904872070629406401492476e-10, + -2.14273991996785367924201401812e-11, + 2.22990255539358204580285098119e-12, + 1.36250074650698280575807934155e-13, + -1.95144010922293091898995913038e-14, + -6.85627169231704599442806370690e-16, + 1.44506492869699938239521607493e-16, + 2.45935306460536488037576200030e-18, + -9.29599561220523396007359328540e-19 +}; +static cheb_series erfc_xlt1_cs = { + erfc_xlt1_data, + 19, + -1, 1, + 12 +}; + +/* Chebyshev fit for erfc(x) exp(x^2), 1 < x < 5, x = 2t + 3, -1 < t < 1 + */ +static double erfc_x15_data[25] = { + 0.44045832024338111077637466616, + -0.143958836762168335790826895326, + 0.044786499817939267247056666937, + -0.013343124200271211203618353102, + 0.003824682739750469767692372556, + -0.001058699227195126547306482530, + 0.000283859419210073742736310108, + -0.000073906170662206760483959432, + 0.000018725312521489179015872934, + -4.62530981164919445131297264430e-6, + 1.11558657244432857487884006422e-6, + -2.63098662650834130067808832725e-7, + 6.07462122724551777372119408710e-8, + -1.37460865539865444777251011793e-8, + 3.05157051905475145520096717210e-9, + -6.65174789720310713757307724790e-10, + 1.42483346273207784489792999706e-10, + -3.00141127395323902092018744545e-11, + 6.22171792645348091472914001250e-12, + -1.26994639225668496876152836555e-12, + 2.55385883033257575402681845385e-13, + -5.06258237507038698392265499770e-14, + 9.89705409478327321641264227110e-15, + -1.90685978789192181051961024995e-15, + 3.50826648032737849245113757340e-16 +}; +static cheb_series erfc_x15_cs = { + erfc_x15_data, + 24, + -1, 1, + 16 +}; + +/* Chebyshev fit for erfc(x) x exp(x^2), 5 < x < 10, x = (5t + 15)/2, -1 < t < 1 + */ +static double erfc_x510_data[20] = { + 1.11684990123545698684297865808, + 0.003736240359381998520654927536, + -0.000916623948045470238763619870, + 0.000199094325044940833965078819, + -0.000040276384918650072591781859, + 7.76515264697061049477127605790e-6, + -1.44464794206689070402099225301e-6, + 2.61311930343463958393485241947e-7, + -4.61833026634844152345304095560e-8, + 8.00253111512943601598732144340e-9, + -1.36291114862793031395712122089e-9, + 2.28570483090160869607683087722e-10, + -3.78022521563251805044056974560e-11, + 6.17253683874528285729910462130e-12, + -9.96019290955316888445830597430e-13, + 1.58953143706980770269506726000e-13, + -2.51045971047162509999527428316e-14, + 3.92607828989125810013581287560e-15, + -6.07970619384160374392535453420e-16, + 9.12600607264794717315507477670e-17 +}; +static cheb_series erfc_x510_cs = { + erfc_x510_data, + 19, + -1, 1, + 12 +}; + +#if 0 +inline +static double +erfc_asymptotic(double x) +{ + return exp(-x*x)/x * erfcasympsum(x) / M_SQRTPI; +} +inline +static double +log_erfc_asymptotic(double x) +{ + return log(erfcasympsum(x)/x) - x*x - LogRootPi_; +} +#endif /* 0 */ + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_erfc_e(double x, gsl_sf_result * result) +{ + const double ax = fabs(x); + double e_val, e_err; + + /* CHECK_POINTER(result) */ + + if(ax <= 1.0) { + double t = 2.0*ax - 1.0; + gsl_sf_result c; + cheb_eval_e(&erfc_xlt1_cs, t, &c); + e_val = c.val; + e_err = c.err; + } + else if(ax <= 5.0) { + double ex2 = exp(-x*x); + double t = 0.5*(ax-3.0); + gsl_sf_result c; + cheb_eval_e(&erfc_x15_cs, t, &c); + e_val = ex2 * c.val; + e_err = ex2 * (c.err + 2.0*fabs(x)*GSL_DBL_EPSILON); + } + else if(ax < 10.0) { + double exterm = exp(-x*x) / ax; + double t = (2.0*ax - 15.0)/5.0; + gsl_sf_result c; + cheb_eval_e(&erfc_x510_cs, t, &c); + e_val = exterm * c.val; + e_err = exterm * (c.err + 2.0*fabs(x)*GSL_DBL_EPSILON + GSL_DBL_EPSILON); + } + else { + e_val = erfc8(ax); + e_err = (x*x + 1.0) * GSL_DBL_EPSILON * fabs(e_val); + } + + if(x < 0.0) { + result->val = 2.0 - e_val; + result->err = e_err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + else { + result->val = e_val; + result->err = e_err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_SUCCESS; +} + + +int gsl_sf_log_erfc_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x*x < 10.0*GSL_ROOT6_DBL_EPSILON) { + const double y = x / M_SQRTPI; + /* series for -1/2 Log[Erfc[Sqrt[Pi] y]] */ + const double c3 = (4.0 - M_PI)/3.0; + const double c4 = 2.0*(1.0 - M_PI/3.0); + const double c5 = -0.001829764677455021; /* (96.0 - 40.0*M_PI + 3.0*M_PI*M_PI)/30.0 */ + const double c6 = 0.02629651521057465; /* 2.0*(120.0 - 60.0*M_PI + 7.0*M_PI*M_PI)/45.0 */ + const double c7 = -0.01621575378835404; + const double c8 = 0.00125993961762116; + const double c9 = 0.00556964649138; + const double c10 = -0.0045563339802; + const double c11 = 0.0009461589032; + const double c12 = 0.0013200243174; + const double c13 = -0.00142906; + const double c14 = 0.00048204; + double series = c8 + y*(c9 + y*(c10 + y*(c11 + y*(c12 + y*(c13 + c14*y))))); + series = y*(1.0 + y*(1.0 + y*(c3 + y*(c4 + y*(c5 + y*(c6 + y*(c7 + y*series))))))); + result->val = -2.0 * series; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + /* + don't like use of log1p(); added above series stuff for small x instead, should be ok [GJ] + else if (fabs(x) < 1.0) { + gsl_sf_result result_erf; + gsl_sf_erf_e(x, &result_erf); + result->val = log1p(-result_erf.val); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + */ + else if(x > 8.0) { + result->val = log_erfc8(x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result result_erfc; + gsl_sf_erfc_e(x, &result_erfc); + result->val = log(result_erfc.val); + result->err = fabs(result_erfc.err / result_erfc.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_erf_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(fabs(x) < 1.0) { + return erfseries(x, result); + } + else { + gsl_sf_result result_erfc; + gsl_sf_erfc_e(x, &result_erfc); + result->val = 1.0 - result_erfc.val; + result->err = result_erfc.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_erf_Z_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + const double ex2 = exp(-x*x/2.0); + result->val = ex2 / (M_SQRT2 * M_SQRTPI); + result->err = fabs(x * result->val) * GSL_DBL_EPSILON; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_erf_Q_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + gsl_sf_result result_erfc; + int stat = gsl_sf_erfc_e(x/M_SQRT2, &result_erfc); + result->val = 0.5 * result_erfc.val; + result->err = 0.5 * result_erfc.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat; + } +} + + +int gsl_sf_hazard_e(double x, gsl_sf_result * result) +{ + if(x < 25.0) + { + gsl_sf_result result_ln_erfc; + const int stat_l = gsl_sf_log_erfc_e(x/M_SQRT2, &result_ln_erfc); + const double lnc = -0.22579135264472743236; /* ln(sqrt(2/pi)) */ + const double arg = lnc - 0.5*x*x - result_ln_erfc.val; + const int stat_e = gsl_sf_exp_e(arg, result); + result->err += 3.0 * (1.0 + fabs(x)) * GSL_DBL_EPSILON * fabs(result->val); + result->err += fabs(result_ln_erfc.err * result->val); + return GSL_ERROR_SELECT_2(stat_l, stat_e); + } + else + { + const double ix2 = 1.0/(x*x); + const double corrB = 1.0 - 9.0*ix2 * (1.0 - 11.0*ix2); + const double corrM = 1.0 - 5.0*ix2 * (1.0 - 7.0*ix2 * corrB); + const double corrT = 1.0 - ix2 * (1.0 - 3.0*ix2*corrM); + result->val = x / corrT; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_erfc(double x) +{ + EVAL_RESULT(gsl_sf_erfc_e(x, &result)); +} + +double gsl_sf_log_erfc(double x) +{ + EVAL_RESULT(gsl_sf_log_erfc_e(x, &result)); +} + +double gsl_sf_erf(double x) +{ + EVAL_RESULT(gsl_sf_erf_e(x, &result)); +} + +double gsl_sf_erf_Z(double x) +{ + EVAL_RESULT(gsl_sf_erf_Z_e(x, &result)); +} + +double gsl_sf_erf_Q(double x) +{ + EVAL_RESULT(gsl_sf_erf_Q_e(x, &result)); +} + +double gsl_sf_hazard(double x) +{ + EVAL_RESULT(gsl_sf_hazard_e(x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/error.h b/software/gsl-1.15/specfunc/error.h new file mode 100644 index 000000000..9f049af3e --- /dev/null +++ b/software/gsl-1.15/specfunc/error.h @@ -0,0 +1,25 @@ +#define OVERFLOW_ERROR(result) do { (result)->val = GSL_POSINF; (result)->err = GSL_POSINF; GSL_ERROR ("overflow", GSL_EOVRFLW); } while(0) + +#define UNDERFLOW_ERROR(result) do { (result)->val = 0.0; (result)->err = GSL_DBL_MIN; GSL_ERROR ("underflow", GSL_EUNDRFLW); } while(0) + +#define INTERNAL_OVERFLOW_ERROR(result) do { (result)->val = GSL_POSINF; (result)->err = GSL_POSINF; return GSL_EOVRFLW; } while(0) + +#define INTERNAL_UNDERFLOW_ERROR(result) do { (result)->val = 0.0; (result)->err = GSL_DBL_MIN; return GSL_EUNDRFLW; } while(0) + +#define DOMAIN_ERROR(result) do { (result)->val = GSL_NAN; (result)->err = GSL_NAN; GSL_ERROR ("domain error", GSL_EDOM); } while(0) + +#define DOMAIN_ERROR_MSG(msg, result) do { (result)->val = GSL_NAN; (result)->err = GSL_NAN; GSL_ERROR ((msg), GSL_EDOM); } while(0) + +#define DOMAIN_ERROR_E10(result) do { (result)->val = GSL_NAN; (result)->err = GSL_NAN; (result)->e10 = 0 ; GSL_ERROR ("domain error", GSL_EDOM); } while(0) + +#define OVERFLOW_ERROR_E10(result) do { (result)->val = GSL_POSINF; (result)->err = GSL_POSINF; (result)->e10 = 0; GSL_ERROR ("overflow", GSL_EOVRFLW); } while(0) +#define UNDERFLOW_ERROR_E10(result) do { (result)->val = 0.0; (result)->err = GSL_DBL_MIN; (result)->e10 = 0; GSL_ERROR ("underflow", GSL_EUNDRFLW); } while(0) + + +#define OVERFLOW_ERROR_2(r1,r2) do { (r1)->val = GSL_POSINF; (r1)->err = GSL_POSINF; (r2)->val = GSL_POSINF ; (r2)->err=GSL_POSINF; GSL_ERROR ("overflow", GSL_EOVRFLW); } while(0) + +#define UNDERFLOW_ERROR_2(r1,r2) do { (r1)->val = 0.0; (r1)->err = GSL_DBL_MIN; (r2)->val = 0.0 ; (r2)->err = GSL_DBL_MIN; GSL_ERROR ("underflow", GSL_EUNDRFLW); } while(0) + +#define DOMAIN_ERROR_2(r1,r2) do { (r1)->val = GSL_NAN; (r1)->err = GSL_NAN; (r2)->val = GSL_NAN; (r2)->err = GSL_NAN; GSL_ERROR ("domain error", GSL_EDOM); } while(0) + +#define MAXITER_ERROR(result) do { (result)->val = GSL_NAN; (result)->err = GSL_NAN; GSL_ERROR ("too many iterations error", GSL_EMAXITER); } while(0) diff --git a/software/gsl-1.15/specfunc/eval.h b/software/gsl-1.15/specfunc/eval.h new file mode 100644 index 000000000..00ddfed3b --- /dev/null +++ b/software/gsl-1.15/specfunc/eval.h @@ -0,0 +1,17 @@ +/* evaluate a function discarding the status value in a modifiable way */ + +#define EVAL_RESULT(fn) \ + gsl_sf_result result; \ + int status = fn; \ + if (status != GSL_SUCCESS) { \ + GSL_ERROR_VAL(#fn, status, result.val); \ + } ; \ + return result.val; + +#define EVAL_DOUBLE(fn) \ + int status = fn; \ + if (status != GSL_SUCCESS) { \ + GSL_ERROR_VAL(#fn, status, result); \ + } ; \ + return result; + diff --git a/software/gsl-1.15/specfunc/exp.c b/software/gsl-1.15/specfunc/exp.c new file mode 100644 index 000000000..3045b2523 --- /dev/null +++ b/software/gsl-1.15/specfunc/exp.c @@ -0,0 +1,614 @@ +/* specfunc/exp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +/* Evaluate the continued fraction for exprel. + * [Abramowitz+Stegun, 4.2.41] + */ +static +int +exprel_n_CF(const double N, const double x, gsl_sf_result * result) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 5000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = 1.0; + double b1 = 1.0; + double a2 = -x; + double b2 = N+1; + double an, bn; + + double fn; + + double An = b1*Anm1 + a1*Anm2; /* A1 */ + double Bn = b1*Bnm1 + a1*Bnm2; /* B1 */ + + /* One explicit step, before we get to the main pattern. */ + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + An = b2*Anm1 + a2*Anm2; /* A2 */ + Bn = b2*Bnm1 + a2*Bnm2; /* B2 */ + + fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = ( GSL_IS_ODD(n) ? ((n-1)/2)*x : -(N+(n/2)-1)*x ); + bn = N + n - 1; + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 2.0*GSL_DBL_EPSILON) break; + } + + result->val = fn; + result->err = 4.0*(n+1.0)*GSL_DBL_EPSILON*fabs(fn); + + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_exp_e(const double x, gsl_sf_result * result) +{ + if(x > GSL_LOG_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else { + result->val = exp(x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result) +{ + if(x > INT_MAX-1) { + OVERFLOW_ERROR_E10(result); + } + else if(x < INT_MIN+1) { + UNDERFLOW_ERROR_E10(result); + } + else { + const int N = (x > GSL_LOG_DBL_MAX || x < GSL_LOG_DBL_MIN) ? (int) floor(x/M_LN10) : 0; + result->val = exp(x-N*M_LN10); + result->err = 2.0 * (fabs(x)+1.0) * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = N; + return GSL_SUCCESS; + } +} + + +int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result) +{ + const double ay = fabs(y); + + if(y == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if( ( x < 0.5*GSL_LOG_DBL_MAX && x > 0.5*GSL_LOG_DBL_MIN) + && (ay < 0.8*GSL_SQRT_DBL_MAX && ay > 1.2*GSL_SQRT_DBL_MIN) + ) { + const double ex = exp(x); + result->val = y * ex; + result->err = (2.0 + fabs(x)) * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double ly = log(ay); + const double lnr = x + ly; + + if(lnr > GSL_LOG_DBL_MAX - 0.01) { + OVERFLOW_ERROR(result); + } + else if(lnr < GSL_LOG_DBL_MIN + 0.01) { + UNDERFLOW_ERROR(result); + } + else { + const double sy = GSL_SIGN(y); + const double M = floor(x); + const double N = floor(ly); + const double a = x - M; + const double b = ly - N; + const double berr = 2.0 * GSL_DBL_EPSILON * (fabs(ly) + fabs(N)); + result->val = sy * exp(M+N) * exp(a+b); + result->err = berr * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * (M + N + 1.0) * fabs(result->val); + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result) +{ + const double ay = fabs(y); + + if(y == 0.0) { + result->val = 0.0; + result->err = 0.0; + result->e10 = 0; + return GSL_SUCCESS; + } + else if( ( x < 0.5*GSL_LOG_DBL_MAX && x > 0.5*GSL_LOG_DBL_MIN) + && (ay < 0.8*GSL_SQRT_DBL_MAX && ay > 1.2*GSL_SQRT_DBL_MIN) + ) { + const double ex = exp(x); + result->val = y * ex; + result->err = (2.0 + fabs(x)) * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = 0; + return GSL_SUCCESS; + } + else { + const double ly = log(ay); + const double l10_val = (x + ly)/M_LN10; + + if(l10_val > INT_MAX-1) { + OVERFLOW_ERROR_E10(result); + } + else if(l10_val < INT_MIN+1) { + UNDERFLOW_ERROR_E10(result); + } + else { + const double sy = GSL_SIGN(y); + const int N = (int) floor(l10_val); + const double arg_val = (l10_val - N) * M_LN10; + const double arg_err = 2.0 * GSL_DBL_EPSILON * (fabs(x) + fabs(ly) + M_LN10*fabs(N)); + + result->val = sy * exp(arg_val); + result->err = arg_err * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = N; + + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_exp_mult_err_e(const double x, const double dx, + const double y, const double dy, + gsl_sf_result * result) +{ + const double ay = fabs(y); + + if(y == 0.0) { + result->val = 0.0; + result->err = fabs(dy * exp(x)); + return GSL_SUCCESS; + } + else if( ( x < 0.5*GSL_LOG_DBL_MAX && x > 0.5*GSL_LOG_DBL_MIN) + && (ay < 0.8*GSL_SQRT_DBL_MAX && ay > 1.2*GSL_SQRT_DBL_MIN) + ) { + double ex = exp(x); + result->val = y * ex; + result->err = ex * (fabs(dy) + fabs(y*dx)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double ly = log(ay); + const double lnr = x + ly; + + if(lnr > GSL_LOG_DBL_MAX - 0.01) { + OVERFLOW_ERROR(result); + } + else if(lnr < GSL_LOG_DBL_MIN + 0.01) { + UNDERFLOW_ERROR(result); + } + else { + const double sy = GSL_SIGN(y); + const double M = floor(x); + const double N = floor(ly); + const double a = x - M; + const double b = ly - N; + const double eMN = exp(M+N); + const double eab = exp(a+b); + result->val = sy * eMN * eab; + result->err = eMN * eab * 2.0*GSL_DBL_EPSILON; + result->err += eMN * eab * fabs(dy/y); + result->err += eMN * eab * fabs(dx); + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, + const double y, const double dy, + gsl_sf_result_e10 * result) +{ + const double ay = fabs(y); + + if(y == 0.0) { + result->val = 0.0; + result->err = fabs(dy * exp(x)); + result->e10 = 0; + return GSL_SUCCESS; + } + else if( ( x < 0.5*GSL_LOG_DBL_MAX && x > 0.5*GSL_LOG_DBL_MIN) + && (ay < 0.8*GSL_SQRT_DBL_MAX && ay > 1.2*GSL_SQRT_DBL_MIN) + ) { + const double ex = exp(x); + result->val = y * ex; + result->err = ex * (fabs(dy) + fabs(y*dx)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = 0; + return GSL_SUCCESS; + } + else { + const double ly = log(ay); + const double l10_val = (x + ly)/M_LN10; + + if(l10_val > INT_MAX-1) { + OVERFLOW_ERROR_E10(result); + } + else if(l10_val < INT_MIN+1) { + UNDERFLOW_ERROR_E10(result); + } + else { + const double sy = GSL_SIGN(y); + const int N = (int) floor(l10_val); + const double arg_val = (l10_val - N) * M_LN10; + const double arg_err = dy/fabs(y) + dx + 2.0*GSL_DBL_EPSILON*fabs(arg_val); + + result->val = sy * exp(arg_val); + result->err = arg_err * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = N; + + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_expm1_e(const double x, gsl_sf_result * result) +{ + const double cut = 0.002; + + if(x < GSL_LOG_DBL_MIN) { + result->val = -1.0; + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < -cut) { + result->val = exp(x) - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < cut) { + result->val = x * (1.0 + 0.5*x*(1.0 + x/3.0*(1.0 + 0.25*x*(1.0 + 0.2*x)))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_LOG_DBL_MAX) { + result->val = exp(x) - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_exprel_e(const double x, gsl_sf_result * result) +{ + const double cut = 0.002; + + if(x < GSL_LOG_DBL_MIN) { + result->val = -1.0/x; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -cut) { + result->val = (exp(x) - 1.0)/x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < cut) { + result->val = (1.0 + 0.5*x*(1.0 + x/3.0*(1.0 + 0.25*x*(1.0 + 0.2*x)))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_LOG_DBL_MAX) { + result->val = (exp(x) - 1.0)/x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_exprel_2_e(double x, gsl_sf_result * result) +{ + const double cut = 0.002; + + if(x < GSL_LOG_DBL_MIN) { + result->val = -2.0/x*(1.0 + 1.0/x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -cut) { + result->val = 2.0*(exp(x) - 1.0 - x)/(x*x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < cut) { + result->val = (1.0 + 1.0/3.0*x*(1.0 + 0.25*x*(1.0 + 0.2*x*(1.0 + 1.0/6.0*x)))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_LOG_DBL_MAX) { + result->val = 2.0*(exp(x) - 1.0 - x)/(x*x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int +gsl_sf_exprel_n_CF_e(const double N, const double x, gsl_sf_result * result) +{ + return exprel_n_CF(N, x, result); +} + +int +gsl_sf_exprel_n_e(const int N, const double x, gsl_sf_result * result) +{ + if(N < 0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(fabs(x) < GSL_ROOT3_DBL_EPSILON * N) { + result->val = 1.0 + x/(N+1) * (1.0 + x/(N+2)); + result->err = 2.0 * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(N == 0) { + return gsl_sf_exp_e(x, result); + } + else if(N == 1) { + return gsl_sf_exprel_e(x, result); + } + else if(N == 2) { + return gsl_sf_exprel_2_e(x, result); + } + else { + if(x > N && (-x + N*(1.0 + log(x/N)) < GSL_LOG_DBL_EPSILON)) { + /* x is much larger than n. + * Ignore polynomial part, so + * exprel_N(x) ~= e^x N!/x^N + */ + gsl_sf_result lnf_N; + double lnr_val; + double lnr_err; + double lnterm; + gsl_sf_lnfact_e(N, &lnf_N); + lnterm = N*log(x); + lnr_val = x + lnf_N.val - lnterm; + lnr_err = GSL_DBL_EPSILON * (fabs(x) + fabs(lnf_N.val) + fabs(lnterm)); + lnr_err += lnf_N.err; + return gsl_sf_exp_err_e(lnr_val, lnr_err, result); + } + else if(x > N) { + /* Write the identity + * exprel_n(x) = e^x n! / x^n (1 - Gamma[n,x]/Gamma[n]) + * then use the asymptotic expansion + * Gamma[n,x] ~ x^(n-1) e^(-x) (1 + (n-1)/x + (n-1)(n-2)/x^2 + ...) + */ + double ln_x = log(x); + gsl_sf_result lnf_N; + double lg_N; + double lnpre_val; + double lnpre_err; + gsl_sf_lnfact_e(N, &lnf_N); /* log(N!) */ + lg_N = lnf_N.val - log(N); /* log(Gamma(N)) */ + lnpre_val = x + lnf_N.val - N*ln_x; + lnpre_err = GSL_DBL_EPSILON * (fabs(x) + fabs(lnf_N.val) + fabs(N*ln_x)); + lnpre_err += lnf_N.err; + if(lnpre_val < GSL_LOG_DBL_MAX - 5.0) { + int stat_eG; + gsl_sf_result bigG_ratio; + gsl_sf_result pre; + int stat_ex = gsl_sf_exp_err_e(lnpre_val, lnpre_err, &pre); + double ln_bigG_ratio_pre = -x + (N-1)*ln_x - lg_N; + double bigGsum = 1.0; + double term = 1.0; + int k; + for(k=1; kval = pre.val * (1.0 - bigG_ratio.val); + result->err = pre.val * (2.0*GSL_DBL_EPSILON + bigG_ratio.err); + result->err += pre.err * fabs(1.0 - bigG_ratio.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_ex; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_eG; + } + } + else { + OVERFLOW_ERROR(result); + } + } + else if(x > -10.0*N) { + return exprel_n_CF(N, x, result); + } + else { + /* x -> -Inf asymptotic: + * exprel_n(x) ~ e^x n!/x^n - n/x (1 + (n-1)/x + (n-1)(n-2)/x + ...) + * ~ - n/x (1 + (n-1)/x + (n-1)(n-2)/x + ...) + */ + double sum = 1.0; + double term = 1.0; + int k; + for(k=1; kval = -N/x * sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + } +} + + +int +gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result) +{ + const double adx = fabs(dx); + + /* CHECK_POINTER(result) */ + + if(x + adx > GSL_LOG_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else if(x - adx < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else { + const double ex = exp(x); + const double edx = exp(adx); + result->val = ex; + result->err = ex * GSL_MAX_DBL(GSL_DBL_EPSILON, edx - 1.0/edx); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result) +{ + const double adx = fabs(dx); + + /* CHECK_POINTER(result) */ + + if(x + adx > INT_MAX - 1) { + OVERFLOW_ERROR_E10(result); + } + else if(x - adx < INT_MIN + 1) { + UNDERFLOW_ERROR_E10(result); + } + else { + const int N = (int)floor(x/M_LN10); + const double ex = exp(x-N*M_LN10); + result->val = ex; + result->err = ex * (2.0 * GSL_DBL_EPSILON * (fabs(x) + 1.0) + adx); + result->e10 = N; + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_exp(const double x) +{ + EVAL_RESULT(gsl_sf_exp_e(x, &result)); +} + +double gsl_sf_exp_mult(const double x, const double y) +{ + EVAL_RESULT(gsl_sf_exp_mult_e(x, y, &result)); +} + +double gsl_sf_expm1(const double x) +{ + EVAL_RESULT(gsl_sf_expm1_e(x, &result)); +} + +double gsl_sf_exprel(const double x) +{ + EVAL_RESULT(gsl_sf_exprel_e(x, &result)); +} + +double gsl_sf_exprel_2(const double x) +{ + EVAL_RESULT(gsl_sf_exprel_2_e(x, &result)); +} + +double gsl_sf_exprel_n(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_exprel_n_e(n, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/expint.c b/software/gsl-1.15/specfunc/expint.c new file mode 100644 index 000000000..0b0b258e8 --- /dev/null +++ b/software/gsl-1.15/specfunc/expint.c @@ -0,0 +1,581 @@ +/* specfunc/expint.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* + Chebyshev expansions: based on SLATEC e1.f, W. Fullerton + + Series for AE11 on the interval -1.00000D-01 to 0. + with weighted error 1.76E-17 + log weighted error 16.75 + significant figures required 15.70 + decimal places required 17.55 + + + Series for AE12 on the interval -2.50000D-01 to -1.00000D-01 + with weighted error 5.83E-17 + log weighted error 16.23 + significant figures required 15.76 + decimal places required 16.93 + + + Series for E11 on the interval -4.00000D+00 to -1.00000D+00 + with weighted error 1.08E-18 + log weighted error 17.97 + significant figures required 19.02 + decimal places required 18.61 + + + Series for E12 on the interval -1.00000D+00 to 1.00000D+00 + with weighted error 3.15E-18 + log weighted error 17.50 + approx significant figures required 15.8 + decimal places required 18.10 + + + Series for AE13 on the interval 2.50000D-01 to 1.00000D+00 + with weighted error 2.34E-17 + log weighted error 16.63 + significant figures required 16.14 + decimal places required 17.33 + + + Series for AE14 on the interval 0. to 2.50000D-01 + with weighted error 5.41E-17 + log weighted error 16.27 + significant figures required 15.38 + decimal places required 16.97 +*/ + +static double AE11_data[39] = { + 0.121503239716065790, + -0.065088778513550150, + 0.004897651357459670, + -0.000649237843027216, + 0.000093840434587471, + 0.000000420236380882, + -0.000008113374735904, + 0.000002804247688663, + 0.000000056487164441, + -0.000000344809174450, + 0.000000058209273578, + 0.000000038711426349, + -0.000000012453235014, + -0.000000005118504888, + 0.000000002148771527, + 0.000000000868459898, + -0.000000000343650105, + -0.000000000179796603, + 0.000000000047442060, + 0.000000000040423282, + -0.000000000003543928, + -0.000000000008853444, + -0.000000000000960151, + 0.000000000001692921, + 0.000000000000607990, + -0.000000000000224338, + -0.000000000000200327, + -0.000000000000006246, + 0.000000000000045571, + 0.000000000000016383, + -0.000000000000005561, + -0.000000000000006074, + -0.000000000000000862, + 0.000000000000001223, + 0.000000000000000716, + -0.000000000000000024, + -0.000000000000000201, + -0.000000000000000082, + 0.000000000000000017 +}; +static cheb_series AE11_cs = { + AE11_data, + 38, + -1, 1, + 20 +}; + +static double AE12_data[25] = { + 0.582417495134726740, + -0.158348850905782750, + -0.006764275590323141, + 0.005125843950185725, + 0.000435232492169391, + -0.000143613366305483, + -0.000041801320556301, + -0.000002713395758640, + 0.000001151381913647, + 0.000000420650022012, + 0.000000066581901391, + 0.000000000662143777, + -0.000000002844104870, + -0.000000000940724197, + -0.000000000177476602, + -0.000000000015830222, + 0.000000000002905732, + 0.000000000001769356, + 0.000000000000492735, + 0.000000000000093709, + 0.000000000000010707, + -0.000000000000000537, + -0.000000000000000716, + -0.000000000000000244, + -0.000000000000000058 +}; +static cheb_series AE12_cs = { + AE12_data, + 24, + -1, 1, + 15 +}; + +static double E11_data[19] = { + -16.11346165557149402600, + 7.79407277874268027690, + -1.95540581886314195070, + 0.37337293866277945612, + -0.05692503191092901938, + 0.00721107776966009185, + -0.00078104901449841593, + 0.00007388093356262168, + -0.00000620286187580820, + 0.00000046816002303176, + -0.00000003209288853329, + 0.00000000201519974874, + -0.00000000011673686816, + 0.00000000000627627066, + -0.00000000000031481541, + 0.00000000000001479904, + -0.00000000000000065457, + 0.00000000000000002733, + -0.00000000000000000108 +}; +static cheb_series E11_cs = { + E11_data, + 18, + -1, 1, + 13 +}; + +static double E12_data[16] = { + -0.03739021479220279500, + 0.04272398606220957700, + -0.13031820798497005440, + 0.01441912402469889073, + -0.00134617078051068022, + 0.00010731029253063780, + -0.00000742999951611943, + 0.00000045377325690753, + -0.00000002476417211390, + 0.00000000122076581374, + -0.00000000005485141480, + 0.00000000000226362142, + -0.00000000000008635897, + 0.00000000000000306291, + -0.00000000000000010148, + 0.00000000000000000315 +}; +static cheb_series E12_cs = { + E12_data, + 15, + -1, 1, + 10 +}; + +static double AE13_data[25] = { + -0.605773246640603460, + -0.112535243483660900, + 0.013432266247902779, + -0.001926845187381145, + 0.000309118337720603, + -0.000053564132129618, + 0.000009827812880247, + -0.000001885368984916, + 0.000000374943193568, + -0.000000076823455870, + 0.000000016143270567, + -0.000000003466802211, + 0.000000000758754209, + -0.000000000168864333, + 0.000000000038145706, + -0.000000000008733026, + 0.000000000002023672, + -0.000000000000474132, + 0.000000000000112211, + -0.000000000000026804, + 0.000000000000006457, + -0.000000000000001568, + 0.000000000000000383, + -0.000000000000000094, + 0.000000000000000023 +}; +static cheb_series AE13_cs = { + AE13_data, + 24, + -1, 1, + 15 +}; + +static double AE14_data[26] = { + -0.18929180007530170, + -0.08648117855259871, + 0.00722410154374659, + -0.00080975594575573, + 0.00010999134432661, + -0.00001717332998937, + 0.00000298562751447, + -0.00000056596491457, + 0.00000011526808397, + -0.00000002495030440, + 0.00000000569232420, + -0.00000000135995766, + 0.00000000033846628, + -0.00000000008737853, + 0.00000000002331588, + -0.00000000000641148, + 0.00000000000181224, + -0.00000000000052538, + 0.00000000000015592, + -0.00000000000004729, + 0.00000000000001463, + -0.00000000000000461, + 0.00000000000000148, + -0.00000000000000048, + 0.00000000000000016, + -0.00000000000000005 +}; +static cheb_series AE14_cs = { + AE14_data, + 25, + -1, 1, + 13 +}; + + + +/* implementation for E1, allowing for scaling by exp(x) */ +static +int expint_E1_impl(const double x, gsl_sf_result * result, const int scale) +{ + const double xmaxt = -GSL_LOG_DBL_MIN; /* XMAXT = -LOG (R1MACH(1)) */ + const double xmax = xmaxt - log(xmaxt); /* XMAX = XMAXT - LOG(XMAXT) */ + + /* CHECK_POINTER(result) */ + + if(x < -xmax && !scale) { + OVERFLOW_ERROR(result); + } + else if(x <= -10.0) { + const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); + gsl_sf_result result_c; + cheb_eval_e(&AE11_cs, 20.0/x+1.0, &result_c); + result->val = s * (1.0 + result_c.val); + result->err = s * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(x) + 1.0) * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= -4.0) { + const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); + gsl_sf_result result_c; + cheb_eval_e(&AE12_cs, (40.0/x+7.0)/3.0, &result_c); + result->val = s * (1.0 + result_c.val); + result->err = s * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= -1.0) { + const double ln_term = -log(fabs(x)); + const double scale_factor = ( scale ? exp(x) : 1.0 ); + gsl_sf_result result_c; + cheb_eval_e(&E11_cs, (2.0*x+5.0)/3.0, &result_c); + result->val = scale_factor * (ln_term + result_c.val); + result->err = scale_factor * (result_c.err + GSL_DBL_EPSILON * fabs(ln_term)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x == 0.0) { + DOMAIN_ERROR(result); + } + else if(x <= 1.0) { + const double ln_term = -log(fabs(x)); + const double scale_factor = ( scale ? exp(x) : 1.0 ); + gsl_sf_result result_c; + cheb_eval_e(&E12_cs, x, &result_c); + result->val = scale_factor * (ln_term - 0.6875 + x + result_c.val); + result->err = scale_factor * (result_c.err + GSL_DBL_EPSILON * fabs(ln_term)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); + gsl_sf_result result_c; + cheb_eval_e(&AE13_cs, (8.0/x-5.0)/3.0, &result_c); + result->val = s * (1.0 + result_c.val); + result->err = s * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x <= xmax || scale) { + const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); + gsl_sf_result result_c; + cheb_eval_e(&AE14_cs, 8.0/x-1.0, &result_c); + result->val = s * (1.0 + result_c.val); + result->err = s * (GSL_DBL_EPSILON + result_c.err); + result->err += 2.0 * (x + 1.0) * GSL_DBL_EPSILON * fabs(result->val); + if(result->val == 0.0) + UNDERFLOW_ERROR(result); + else + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + + +static +int expint_E2_impl(const double x, gsl_sf_result * result, const int scale) +{ + const double xmaxt = -GSL_LOG_DBL_MIN; + const double xmax = xmaxt - log(xmaxt); + + /* CHECK_POINTER(result) */ + + if(x < -xmax && !scale) { + OVERFLOW_ERROR(result); + } + else if (x == 0.0) { + result->val = (scale ? 1.0 : 1.0); + result->err = 0.0; + return GSL_SUCCESS; + } else if(x < 100.0) { + const double ex = ( scale ? 1.0 : exp(-x) ); + gsl_sf_result result_E1; + int stat_E1 = expint_E1_impl(x, &result_E1, scale); + result->val = ex - x*result_E1.val; + result->err = GSL_DBL_EPSILON*ex + fabs(x) * result_E1.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_E1; + } + else if(x < xmax || scale) { + const double s = ( scale ? 1.0 : exp(-x) ); + const double c1 = -2.0; + const double c2 = 6.0; + const double c3 = -24.0; + const double c4 = 120.0; + const double c5 = -720.0; + const double c6 = 5040.0; + const double c7 = -40320.0; + const double c8 = 362880.0; + const double c9 = -3628800.0; + const double c10 = 39916800.0; + const double c11 = -479001600.0; + const double c12 = 6227020800.0; + const double c13 = -87178291200.0; + const double y = 1.0/x; + const double sum6 = c6+y*(c7+y*(c8+y*(c9+y*(c10+y*(c11+y*(c12+y*c13)))))); + const double sum = y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*sum6))))); + result->val = s * (1.0 + sum)/x; + result->err = 2.0 * (x + 1.0) * GSL_DBL_EPSILON * result->val; + if(result->val == 0.0) + UNDERFLOW_ERROR(result); + else + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + +static +int expint_En_impl(const int n, const double x, gsl_sf_result * result, const int scale) +{ + if (n < 0) { + DOMAIN_ERROR(result); + } else if (n == 0) { + if (x == 0) { + DOMAIN_ERROR(result); + } else { + result->val = (scale ? 1.0 : exp(-x)) / x; + result->err = 2 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + } else if (n == 1) { + return expint_E1_impl(x, result, scale); + } else if (n == 2) { + return expint_E2_impl(x, result, scale); + } else { + if(x < 0) { + DOMAIN_ERROR(result); + } + if (x == 0) { + result->val = (scale ? exp(x) : 1 ) * (1/(n-1.0)); + result->err = 2 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } else { + gsl_sf_result result_g; + double prefactor = pow(x, n-1); + int status = gsl_sf_gamma_inc_e (1-n, x, &result_g); + double scale_factor = ( scale ? exp(x) : 1.0 ); + result->val = scale_factor * prefactor * result_g.val; + result->err = 2 * GSL_DBL_EPSILON * fabs(result->val); + result->err += 2 * fabs(scale_factor * prefactor * result_g.err); + if (status == GSL_SUCCESS) CHECK_UNDERFLOW(result); + return status; + } + } +} + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result) +{ + return expint_E1_impl(x, result, 0); +} + + +int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result * result) +{ + return expint_E1_impl(x, result, 1); +} + + +int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result) +{ + return expint_E2_impl(x, result, 0); +} + + +int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result * result) +{ + return expint_E2_impl(x, result, 1); +} + +int gsl_sf_expint_En_e(const int n, const double x, gsl_sf_result * result) +{ + return expint_En_impl(n, x, result, 0); +} + + +int gsl_sf_expint_En_scaled_e(const int n, const double x, gsl_sf_result * result) +{ + return expint_En_impl(n, x, result, 1); +} + + +int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + int status = gsl_sf_expint_E1_e(-x, result); + result->val = -result->val; + return status; + } +} + + +int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + int status = gsl_sf_expint_E1_scaled_e(-x, result); + result->val = -result->val; + return status; + } +} + + +#if 0 +static double recurse_En(int n, double x, double E1) +{ + int i; + double En = E1; + double ex = exp(-x); + for(i=2; i<=n; i++) { + En = 1./(i-1) * (ex - x * En); + } + return En; +} +#endif + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_expint_E1(const double x) +{ + EVAL_RESULT(gsl_sf_expint_E1_e(x, &result)); +} + +double gsl_sf_expint_E1_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_expint_E1_scaled_e(x, &result)); +} + +double gsl_sf_expint_E2(const double x) +{ + EVAL_RESULT(gsl_sf_expint_E2_e(x, &result)); +} + +double gsl_sf_expint_E2_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_expint_E2_scaled_e(x, &result)); +} + +double gsl_sf_expint_En(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_expint_En_e(n, x, &result)); +} + +double gsl_sf_expint_En_scaled(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_expint_En_scaled_e(n, x, &result)); +} + +double gsl_sf_expint_Ei(const double x) +{ + EVAL_RESULT(gsl_sf_expint_Ei_e(x, &result)); +} + +double gsl_sf_expint_Ei_scaled(const double x) +{ + EVAL_RESULT(gsl_sf_expint_Ei_scaled_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/expint3.c b/software/gsl-1.15/specfunc/expint3.c new file mode 100644 index 000000000..91bb7e07e --- /dev/null +++ b/software/gsl-1.15/specfunc/expint3.c @@ -0,0 +1,146 @@ +/* specfunc/expint3.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +static double expint3_data[24] = { + 1.269198414221126014, + -0.248846446384140982, + 0.80526220717231041e-01, + -0.25772733251968330e-01, + 0.7599878873073774e-02, + -0.2030695581940405e-02, + 0.490834586699330e-03, + -0.107682239142021e-03, + 0.21551726264290e-04, + -0.3956705137384e-05, + 0.6699240933896e-06, + -0.105132180807e-06, + 0.15362580199e-07, + -0.20990960364e-08, + 0.2692109538e-09, + -0.325195242e-10, + 0.37114816e-11, + -0.4013652e-12, + 0.412334e-13, + -0.40338e-14, + 0.3766e-15, + -0.336e-16, + 0.29e-17, + -0.2e-18 +}; +static cheb_series expint3_cs = { + expint3_data, + 23, + -1.0, 1.0, + 15 +}; + +static double expint3a_data[23] = { + 1.9270464955068273729, + -0.349293565204813805e-01, + 0.14503383718983009e-02, + -0.8925336718327903e-04, + 0.70542392191184e-05, + -0.6671727454761e-06, + 0.724267589982e-07, + -0.87825825606e-08, + 0.11672234428e-08, + -0.1676631281e-09, + 0.257550158e-10, + -0.41957888e-11, + 0.7201041e-12, + -0.1294906e-12, + 0.24287e-13, + -0.47331e-14, + 0.95531e-15, + -0.1991e-15, + 0.428e-16, + -0.94e-17, + 0.21e-17, + -0.5e-18, + 0.1e-18 +}; +static cheb_series expint3a_cs = { + expint3a_data, + 22, + -1.0, 1.0, + 10 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_expint_3_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 0.892979511569249211; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 1.6*GSL_ROOT3_DBL_EPSILON) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x <= 2.0) { + const double t = x*x*x/4.0 - 1.0; + gsl_sf_result result_c; + cheb_eval_e(&expint3_cs, t, &result_c); + result->val = x * result_c.val; + result->err = x * result_c.err; + return GSL_SUCCESS; + } + else if(x < pow(-GSL_LOG_DBL_EPSILON, 1.0/3.0)) { + const double t = 16.0/(x*x*x) - 1.0; + const double s = exp(-x*x*x)/(3.0*x*x); + gsl_sf_result result_c; + cheb_eval_e(&expint3a_cs, t, &result_c); + result->val = val_infinity - result_c.val * s; + result->err = val_infinity * GSL_DBL_EPSILON + s * result_c.err; + return GSL_SUCCESS; + } + else { + result->val = val_infinity; + result->err = val_infinity * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_expint_3(double x) +{ + EVAL_RESULT(gsl_sf_expint_3_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/fermi_dirac.c b/software/gsl-1.15/specfunc/fermi_dirac.c new file mode 100644 index 000000000..81beff434 --- /dev/null +++ b/software/gsl-1.15/specfunc/fermi_dirac.c @@ -0,0 +1,1633 @@ +/* specfunc/fermi_dirac.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +#define locEPS (1000.0*GSL_DBL_EPSILON) + + +/* Chebyshev fit for F_{1}(t); -1 < t < 1, -1 < x < 1 + */ +static double fd_1_a_data[22] = { + 1.8949340668482264365, + 0.7237719066890052793, + 0.1250000000000000000, + 0.0101065196435973942, + 0.0, + -0.0000600615242174119, + 0.0, + 6.816528764623e-7, + 0.0, + -9.5895779195e-9, + 0.0, + 1.515104135e-10, + 0.0, + -2.5785616e-12, + 0.0, + 4.62270e-14, + 0.0, + -8.612e-16, + 0.0, + 1.65e-17, + 0.0, + -3.e-19 +}; +static cheb_series fd_1_a_cs = { + fd_1_a_data, + 21, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{1}(3/2(t+1) + 1); -1 < t < 1, 1 < x < 4 + */ +static double fd_1_b_data[22] = { + 10.409136795234611872, + 3.899445098225161947, + 0.513510935510521222, + 0.010618736770218426, + -0.001584468020659694, + 0.000146139297161640, + -1.408095734499e-6, + -2.177993899484e-6, + 3.91423660640e-7, + -2.3860262660e-8, + -4.138309573e-9, + 1.283965236e-9, + -1.39695990e-10, + -4.907743e-12, + 4.399878e-12, + -7.17291e-13, + 2.4320e-14, + 1.4230e-14, + -3.446e-15, + 2.93e-16, + 3.7e-17, + -1.6e-17 +}; +static cheb_series fd_1_b_cs = { + fd_1_b_data, + 21, + -1, 1, + 11 +}; + + +/* Chebyshev fit for F_{1}(3(t+1) + 4); -1 < t < 1, 4 < x < 10 + */ +static double fd_1_c_data[23] = { + 56.78099449124299762, + 21.00718468237668011, + 2.24592457063193457, + 0.00173793640425994, + -0.00058716468739423, + 0.00016306958492437, + -0.00003817425583020, + 7.64527252009e-6, + -1.31348500162e-6, + 1.9000646056e-7, + -2.141328223e-8, + 1.23906372e-9, + 2.1848049e-10, + -1.0134282e-10, + 2.484728e-11, + -4.73067e-12, + 7.3555e-13, + -8.740e-14, + 4.85e-15, + 1.23e-15, + -5.6e-16, + 1.4e-16, + -3.e-17 +}; +static cheb_series fd_1_c_cs = { + fd_1_c_data, + 22, + -1, 1, + 13 +}; + + +/* Chebyshev fit for F_{1}(x) / x^2 + * 10 < x < 30 + * -1 < t < 1 + * t = 1/10 (x-10) - 1 = x/10 - 2 + * x = 10(t+2) + */ +static double fd_1_d_data[30] = { + 1.0126626021151374442, + -0.0063312525536433793, + 0.0024837319237084326, + -0.0008764333697726109, + 0.0002913344438921266, + -0.0000931877907705692, + 0.0000290151342040275, + -8.8548707259955e-6, + 2.6603474114517e-6, + -7.891415690452e-7, + 2.315730237195e-7, + -6.73179452963e-8, + 1.94048035606e-8, + -5.5507129189e-9, + 1.5766090896e-9, + -4.449310875e-10, + 1.248292745e-10, + -3.48392894e-11, + 9.6791550e-12, + -2.6786240e-12, + 7.388852e-13, + -2.032828e-13, + 5.58115e-14, + -1.52987e-14, + 4.1886e-15, + -1.1458e-15, + 3.132e-16, + -8.56e-17, + 2.33e-17, + -5.9e-18 +}; +static cheb_series fd_1_d_cs = { + fd_1_d_data, + 29, + -1, 1, + 14 +}; + + +/* Chebyshev fit for F_{1}(x) / x^2 + * 30 < x < Inf + * -1 < t < 1 + * t = 60/x - 1 + * x = 60/(t+1) + */ +static double fd_1_e_data[10] = { + 1.0013707783890401683, + 0.0009138522593601060, + 0.0002284630648400133, + -1.57e-17, + -1.27e-17, + -9.7e-18, + -6.9e-18, + -4.6e-18, + -2.9e-18, + -1.7e-18 +}; +static cheb_series fd_1_e_cs = { + fd_1_e_data, + 9, + -1, 1, + 4 +}; + + +/* Chebyshev fit for F_{2}(t); -1 < t < 1, -1 < x < 1 + */ +static double fd_2_a_data[21] = { + 2.1573661917148458336, + 0.8849670334241132182, + 0.1784163467613519713, + 0.0208333333333333333, + 0.0012708226459768508, + 0.0, + -5.0619314244895e-6, + 0.0, + 4.32026533989e-8, + 0.0, + -4.870544166e-10, + 0.0, + 6.4203740e-12, + 0.0, + -9.37424e-14, + 0.0, + 1.4715e-15, + 0.0, + -2.44e-17, + 0.0, + 4.e-19 +}; +static cheb_series fd_2_a_cs = { + fd_2_a_data, + 20, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{2}(3/2(t+1) + 1); -1 < t < 1, 1 < x < 4 + */ +static double fd_2_b_data[22] = { + 16.508258811798623599, + 7.421719394793067988, + 1.458309885545603821, + 0.128773850882795229, + 0.001963612026198147, + -0.000237458988738779, + 0.000018539661382641, + -1.92805649479e-7, + -2.01950028452e-7, + 3.2963497518e-8, + -1.885817092e-9, + -2.72632744e-10, + 8.0554561e-11, + -8.313223e-12, + -2.24489e-13, + 2.18778e-13, + -3.4290e-14, + 1.225e-15, + 5.81e-16, + -1.37e-16, + 1.2e-17, + 1.e-18 +}; +static cheb_series fd_2_b_cs = { + fd_2_b_data, + 21, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{1}(3(t+1) + 4); -1 < t < 1, 4 < x < 10 + */ +static double fd_2_c_data[20] = { + 168.87129776686440711, + 81.80260488091659458, + 15.75408505947931513, + 1.12325586765966440, + 0.00059057505725084, + -0.00016469712946921, + 0.00003885607810107, + -7.89873660613e-6, + 1.39786238616e-6, + -2.1534528656e-7, + 2.831510953e-8, + -2.94978583e-9, + 1.6755082e-10, + 2.234229e-11, + -1.035130e-11, + 2.41117e-12, + -4.3531e-13, + 6.447e-14, + -7.39e-15, + 4.3e-16 +}; +static cheb_series fd_2_c_cs = { + fd_2_c_data, + 19, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{1}(x) / x^3 + * 10 < x < 30 + * -1 < t < 1 + * t = 1/10 (x-10) - 1 = x/10 - 2 + * x = 10(t+2) + */ +static double fd_2_d_data[30] = { + 0.3459960518965277589, + -0.00633136397691958024, + 0.00248382959047594408, + -0.00087651191884005114, + 0.00029139255351719932, + -0.00009322746111846199, + 0.00002904021914564786, + -8.86962264810663e-6, + 2.66844972574613e-6, + -7.9331564996004e-7, + 2.3359868615516e-7, + -6.824790880436e-8, + 1.981036528154e-8, + -5.71940426300e-9, + 1.64379426579e-9, + -4.7064937566e-10, + 1.3432614122e-10, + -3.823400534e-11, + 1.085771994e-11, + -3.07727465e-12, + 8.7064848e-13, + -2.4595431e-13, + 6.938531e-14, + -1.954939e-14, + 5.50162e-15, + -1.54657e-15, + 4.3429e-16, + -1.2178e-16, + 3.394e-17, + -8.81e-18 +}; +static cheb_series fd_2_d_cs = { + fd_2_d_data, + 29, + -1, 1, + 14 +}; + + +/* Chebyshev fit for F_{2}(x) / x^3 + * 30 < x < Inf + * -1 < t < 1 + * t = 60/x - 1 + * x = 60/(t+1) + */ +static double fd_2_e_data[4] = { + 0.3347041117223735227, + 0.00091385225936012645, + 0.00022846306484003205, + 5.2e-19 +}; +static cheb_series fd_2_e_cs = { + fd_2_e_data, + 3, + -1, 1, + 3 +}; + + +/* Chebyshev fit for F_{-1/2}(t); -1 < t < 1, -1 < x < 1 + */ +static double fd_mhalf_a_data[20] = { + 1.2663290042859741974, + 0.3697876251911153071, + 0.0278131011214405055, + -0.0033332848565672007, + -0.0004438108265412038, + 0.0000616495177243839, + 8.7589611449897e-6, + -1.2622936986172e-6, + -1.837464037221e-7, + 2.69495091400e-8, + 3.9760866257e-9, + -5.894468795e-10, + -8.77321638e-11, + 1.31016571e-11, + 1.9621619e-12, + -2.945887e-13, + -4.43234e-14, + 6.6816e-15, + 1.0084e-15, + -1.561e-16 +}; +static cheb_series fd_mhalf_a_cs = { + fd_mhalf_a_data, + 19, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{-1/2}(3/2(t+1) + 1); -1 < t < 1, 1 < x < 4 + */ +static double fd_mhalf_b_data[20] = { + 3.270796131942071484, + 0.5809004935853417887, + -0.0299313438794694987, + -0.0013287935412612198, + 0.0009910221228704198, + -0.0001690954939688554, + 6.5955849946915e-6, + 3.5953966033618e-6, + -9.430672023181e-7, + 8.75773958291e-8, + 1.06247652607e-8, + -4.9587006215e-9, + 7.160432795e-10, + 4.5072219e-12, + -2.3695425e-11, + 4.9122208e-12, + -2.905277e-13, + -9.59291e-14, + 3.00028e-14, + -3.4970e-15 +}; +static cheb_series fd_mhalf_b_cs = { + fd_mhalf_b_data, + 19, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{-1/2}(3(t+1) + 4); -1 < t < 1, 4 < x < 10 + */ +static double fd_mhalf_c_data[25] = { + 5.828283273430595507, + 0.677521118293264655, + -0.043946248736481554, + 0.005825595781828244, + -0.000864858907380668, + 0.000110017890076539, + -6.973305225404e-6, + -1.716267414672e-6, + 8.59811582041e-7, + -2.33066786976e-7, + 4.8503191159e-8, + -8.130620247e-9, + 1.021068250e-9, + -5.3188423e-11, + -1.9430559e-11, + 8.750506e-12, + -2.324897e-12, + 4.83102e-13, + -8.1207e-14, + 1.0132e-14, + -4.64e-16, + -2.24e-16, + 9.7e-17, + -2.6e-17, + 5.e-18 +}; +static cheb_series fd_mhalf_c_cs = { + fd_mhalf_c_data, + 24, + -1, 1, + 13 +}; + + +/* Chebyshev fit for F_{-1/2}(x) / x^(1/2) + * 10 < x < 30 + * -1 < t < 1 + * t = 1/10 (x-10) - 1 = x/10 - 2 + */ +static double fd_mhalf_d_data[30] = { + 2.2530744202862438709, + 0.0018745152720114692, + -0.0007550198497498903, + 0.0002759818676644382, + -0.0000959406283465913, + 0.0000324056855537065, + -0.0000107462396145761, + 3.5126865219224e-6, + -1.1313072730092e-6, + 3.577454162766e-7, + -1.104926666238e-7, + 3.31304165692e-8, + -9.5837381008e-9, + 2.6575790141e-9, + -7.015201447e-10, + 1.747111336e-10, + -4.04909605e-11, + 8.5104999e-12, + -1.5261885e-12, + 1.876851e-13, + 1.00574e-14, + -1.82002e-14, + 8.6634e-15, + -3.2058e-15, + 1.0572e-15, + -3.259e-16, + 9.60e-17, + -2.74e-17, + 7.6e-18, + -1.9e-18 +}; +static cheb_series fd_mhalf_d_cs = { + fd_mhalf_d_data, + 29, + -1, 1, + 15 +}; + + +/* Chebyshev fit for F_{1/2}(t); -1 < t < 1, -1 < x < 1 + */ +static double fd_half_a_data[23] = { + 1.7177138871306189157, + 0.6192579515822668460, + 0.0932802275119206269, + 0.0047094853246636182, + -0.0004243667967864481, + -0.0000452569787686193, + 5.2426509519168e-6, + 6.387648249080e-7, + -8.05777004848e-8, + -1.04290272415e-8, + 1.3769478010e-9, + 1.847190359e-10, + -2.51061890e-11, + -3.4497818e-12, + 4.784373e-13, + 6.68828e-14, + -9.4147e-15, + -1.3333e-15, + 1.898e-16, + 2.72e-17, + -3.9e-18, + -6.e-19, + 1.e-19 +}; +static cheb_series fd_half_a_cs = { + fd_half_a_data, + 22, + -1, 1, + 11 +}; + + +/* Chebyshev fit for F_{1/2}(3/2(t+1) + 1); -1 < t < 1, 1 < x < 4 + */ +static double fd_half_b_data[20] = { + 7.651013792074984027, + 2.475545606866155737, + 0.218335982672476128, + -0.007730591500584980, + -0.000217443383867318, + 0.000147663980681359, + -0.000021586361321527, + 8.07712735394e-7, + 3.28858050706e-7, + -7.9474330632e-8, + 6.940207234e-9, + 6.75594681e-10, + -3.10200490e-10, + 4.2677233e-11, + -2.1696e-14, + -1.170245e-12, + 2.34757e-13, + -1.4139e-14, + -3.864e-15, + 1.202e-15 +}; +static cheb_series fd_half_b_cs = { + fd_half_b_data, + 19, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{1/2}(3(t+1) + 4); -1 < t < 1, 4 < x < 10 + */ +static double fd_half_c_data[23] = { + 29.584339348839816528, + 8.808344283250615592, + 0.503771641883577308, + -0.021540694914550443, + 0.002143341709406890, + -0.000257365680646579, + 0.000027933539372803, + -1.678525030167e-6, + -2.78100117693e-7, + 1.35218065147e-7, + -3.3740425009e-8, + 6.474834942e-9, + -1.009678978e-9, + 1.20057555e-10, + -6.636314e-12, + -1.710566e-12, + 7.75069e-13, + -1.97973e-13, + 3.9414e-14, + -6.374e-15, + 7.77e-16, + -4.0e-17, + -1.4e-17 +}; +static cheb_series fd_half_c_cs = { + fd_half_c_data, + 22, + -1, 1, + 13 +}; + + +/* Chebyshev fit for F_{1/2}(x) / x^(3/2) + * 10 < x < 30 + * -1 < t < 1 + * t = 1/10 (x-10) - 1 = x/10 - 2 + */ +static double fd_half_d_data[30] = { + 1.5116909434145508537, + -0.0036043405371630468, + 0.0014207743256393359, + -0.0005045399052400260, + 0.0001690758006957347, + -0.0000546305872688307, + 0.0000172223228484571, + -5.3352603788706e-6, + 1.6315287543662e-6, + -4.939021084898e-7, + 1.482515450316e-7, + -4.41552276226e-8, + 1.30503160961e-8, + -3.8262599802e-9, + 1.1123226976e-9, + -3.204765534e-10, + 9.14870489e-11, + -2.58778946e-11, + 7.2550731e-12, + -2.0172226e-12, + 5.566891e-13, + -1.526247e-13, + 4.16121e-14, + -1.12933e-14, + 3.0537e-15, + -8.234e-16, + 2.215e-16, + -5.95e-17, + 1.59e-17, + -4.0e-18 +}; +static cheb_series fd_half_d_cs = { + fd_half_d_data, + 29, + -1, 1, + 15 +}; + + + +/* Chebyshev fit for F_{3/2}(t); -1 < t < 1, -1 < x < 1 + */ +static double fd_3half_a_data[20] = { + 2.0404775940601704976, + 0.8122168298093491444, + 0.1536371165644008069, + 0.0156174323847845125, + 0.0005943427879290297, + -0.0000429609447738365, + -3.8246452994606e-6, + 3.802306180287e-7, + 4.05746157593e-8, + -4.5530360159e-9, + -5.306873139e-10, + 6.37297268e-11, + 7.8403674e-12, + -9.840241e-13, + -1.255952e-13, + 1.62617e-14, + 2.1318e-15, + -2.825e-16, + -3.78e-17, + 5.1e-18 +}; +static cheb_series fd_3half_a_cs = { + fd_3half_a_data, + 19, + -1, 1, + 11 +}; + + +/* Chebyshev fit for F_{3/2}(3/2(t+1) + 1); -1 < t < 1, 1 < x < 4 + */ +static double fd_3half_b_data[22] = { + 13.403206654624176674, + 5.574508357051880924, + 0.931228574387527769, + 0.054638356514085862, + -0.001477172902737439, + -0.000029378553381869, + 0.000018357033493246, + -2.348059218454e-6, + 8.3173787440e-8, + 2.6826486956e-8, + -6.011244398e-9, + 4.94345981e-10, + 3.9557340e-11, + -1.7894930e-11, + 2.348972e-12, + -1.2823e-14, + -5.4192e-14, + 1.0527e-14, + -6.39e-16, + -1.47e-16, + 4.5e-17, + -5.e-18 +}; +static cheb_series fd_3half_b_cs = { + fd_3half_b_data, + 21, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{3/2}(3(t+1) + 4); -1 < t < 1, 4 < x < 10 + */ +static double fd_3half_c_data[21] = { + 101.03685253378877642, + 43.62085156043435883, + 6.62241373362387453, + 0.25081415008708521, + -0.00798124846271395, + 0.00063462245101023, + -0.00006392178890410, + 6.04535131939e-6, + -3.4007683037e-7, + -4.072661545e-8, + 1.931148453e-8, + -4.46328355e-9, + 7.9434717e-10, + -1.1573569e-10, + 1.304658e-11, + -7.4114e-13, + -1.4181e-13, + 6.491e-14, + -1.597e-14, + 3.05e-15, + -4.8e-16 +}; +static cheb_series fd_3half_c_cs = { + fd_3half_c_data, + 20, + -1, 1, + 12 +}; + + +/* Chebyshev fit for F_{3/2}(x) / x^(5/2) + * 10 < x < 30 + * -1 < t < 1 + * t = 1/10 (x-10) - 1 = x/10 - 2 + */ +static double fd_3half_d_data[25] = { + 0.6160645215171852381, + -0.0071239478492671463, + 0.0027906866139659846, + -0.0009829521424317718, + 0.0003260229808519545, + -0.0001040160912910890, + 0.0000322931223232439, + -9.8243506588102e-6, + 2.9420132351277e-6, + -8.699154670418e-7, + 2.545460071999e-7, + -7.38305056331e-8, + 2.12545670310e-8, + -6.0796532462e-9, + 1.7294556741e-9, + -4.896540687e-10, + 1.380786037e-10, + -3.88057305e-11, + 1.08753212e-11, + -3.0407308e-12, + 8.485626e-13, + -2.364275e-13, + 6.57636e-14, + -1.81807e-14, + 4.6884e-15 +}; +static cheb_series fd_3half_d_cs = { + fd_3half_d_data, + 24, + -1, 1, + 16 +}; + + +/* Goano's modification of the Levin-u implementation. + * This is a simplification of the original WHIZ algorithm. + * See [Fessler et al., ACM Toms 9, 346 (1983)]. + */ +static +int +fd_whiz(const double term, const int iterm, + double * qnum, double * qden, + double * result, double * s) +{ + if(iterm == 0) *s = 0.0; + + *s += term; + + qden[iterm] = 1.0/(term*(iterm+1.0)*(iterm+1.0)); + qnum[iterm] = *s * qden[iterm]; + + if(iterm > 0) { + double factor = 1.0; + double ratio = iterm/(iterm+1.0); + int j; + for(j=iterm-1; j>=0; j--) { + double c = factor * (j+1.0) / (iterm+1.0); + factor *= ratio; + qden[j] = qden[j+1] - c * qden[j]; + qnum[j] = qnum[j+1] - c * qnum[j]; + } + } + + *result = qnum[0] / qden[0]; + return GSL_SUCCESS; +} + + +/* Handle case of integer j <= -2. + */ +static +int +fd_nint(const int j, const double x, gsl_sf_result * result) +{ +/* const int nsize = 100 + 1; */ + enum { + nsize = 100+1 + }; + double qcoeff[nsize]; + + if(j >= -1) { + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_ESANITY); + } + else if(j < -(nsize)) { + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EUNIMPL); + } + else { + double a, p, f; + int i, k; + int n = -(j+1); + + qcoeff[1] = 1.0; + + for(k=2; k<=n; k++) { + qcoeff[k] = -qcoeff[k-1]; + for(i=k-1; i>=2; i--) { + qcoeff[i] = i*qcoeff[i] - (k-(i-1))*qcoeff[i-1]; + } + } + + if(x >= 0.0) { + a = exp(-x); + f = qcoeff[1]; + for(i=2; i<=n; i++) { + f = f*a + qcoeff[i]; + } + } + else { + a = exp(x); + f = qcoeff[n]; + for(i=n-1; i>=1; i--) { + f = f*a + qcoeff[i]; + } + } + + p = gsl_sf_pow_int(1.0+a, j); + result->val = f*a*p; + result->err = 3.0 * GSL_DBL_EPSILON * fabs(f*a*p); + return GSL_SUCCESS; + } +} + + +/* x < 0 + */ +static +int +fd_neg(const double j, const double x, gsl_sf_result * result) +{ + enum { + itmax = 100, + qsize = 100+1 + }; +/* const int itmax = 100; */ +/* const int qsize = 100 + 1; */ + double qnum[qsize], qden[qsize]; + + if(x < GSL_LOG_DBL_MIN) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < -1.0 && x < -fabs(j+1.0)) { + /* Simple series implementation. Avoid the + * complexity and extra work of the series + * acceleration method below. + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<100; n++) { + double rat = (n-1.0)/n; + double p = pow(rat, j+1.0); + term *= -ex * p; + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + return GSL_SUCCESS; + } + else { + double s = 0.0; + double xn = x; + double ex = -exp(x); + double enx = -ex; + double f = 0.0; + double f_previous; + int jterm; + for(jterm=0; jterm<=itmax; jterm++) { + double p = pow(jterm+1.0, j+1.0); + double term = enx/p; + f_previous = f; + fd_whiz(term, jterm, qnum, qden, &f, &s); + xn += x; + if(fabs(f-f_previous) < fabs(f)*2.0*GSL_DBL_EPSILON || xn < GSL_LOG_DBL_MIN) break; + enx *= ex; + } + + result->val = f; + result->err = fabs(f-f_previous); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(f); + + if(jterm == itmax) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; + } +} + + +/* asymptotic expansion + * j + 2.0 > 0.0 + */ +static +int +fd_asymp(const double j, const double x, gsl_sf_result * result) +{ + const int j_integer = ( fabs(j - floor(j+0.5)) < 100.0*GSL_DBL_EPSILON ); + const int itmax = 200; + gsl_sf_result lg; + int stat_lg = gsl_sf_lngamma_e(j + 2.0, &lg); + double seqn_val = 0.5; + double seqn_err = 0.0; + double xm2 = (1.0/x)/x; + double xgam = 1.0; + double add = GSL_DBL_MAX; + double cos_term; + double ln_x; + double ex_term_1; + double ex_term_2; + gsl_sf_result fneg; + gsl_sf_result ex_arg; + gsl_sf_result ex; + int stat_fneg; + int stat_e; + int n; + for(n=1; n<=itmax; n++) { + double add_previous = add; + gsl_sf_result eta; + gsl_sf_eta_int_e(2*n, &eta); + xgam = xgam * xm2 * (j + 1.0 - (2*n-2)) * (j + 1.0 - (2*n-1)); + add = eta.val * xgam; + if(!j_integer && fabs(add) > fabs(add_previous)) break; + if(fabs(add/seqn_val) < GSL_DBL_EPSILON) break; + seqn_val += add; + seqn_err += 2.0 * GSL_DBL_EPSILON * fabs(add); + } + seqn_err += fabs(add); + + stat_fneg = fd_neg(j, -x, &fneg); + ln_x = log(x); + ex_term_1 = (j+1.0)*ln_x; + ex_term_2 = lg.val; + ex_arg.val = ex_term_1 - ex_term_2; /*(j+1.0)*ln_x - lg.val; */ + ex_arg.err = GSL_DBL_EPSILON*(fabs(ex_term_1) + fabs(ex_term_2)) + lg.err; + stat_e = gsl_sf_exp_err_e(ex_arg.val, ex_arg.err, &ex); + cos_term = cos(j*M_PI); + result->val = cos_term * fneg.val + 2.0 * seqn_val * ex.val; + result->err = fabs(2.0 * ex.err * seqn_val); + result->err += fabs(2.0 * ex.val * seqn_err); + result->err += fabs(cos_term) * fneg.err; + result->err += 4.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_e, stat_fneg, stat_lg); +} + + +/* Series evaluation for small x, generic j. + * [Goano (8)] + */ +#if 0 +static +int +fd_series(const double j, const double x, double * result) +{ + const int nmax = 1000; + int n; + double sum = 0.0; + double prev; + double pow_factor = 1.0; + double eta_factor; + gsl_sf_eta_e(j + 1.0, &eta_factor); + prev = pow_factor * eta_factor; + sum += prev; + for(n=1; n 0, integer j > 0; x < Pi. + * [Goano (8)] + */ +static +int +fd_series_int(const int j, const double x, gsl_sf_result * result) +{ + int n; + double sum = 0.0; + double del; + double pow_factor = 1.0; + gsl_sf_result eta_factor; + gsl_sf_eta_int_e(j + 1, &eta_factor); + del = pow_factor * eta_factor.val; + sum += del; + + /* Sum terms where the argument + * of eta() is positive. + */ + for(n=1; n<=j+2; n++) { + gsl_sf_eta_int_e(j+1-n, &eta_factor); + pow_factor *= x/n; + del = pow_factor * eta_factor.val; + sum += del; + if(fabs(del/sum) < GSL_DBL_EPSILON) break; + } + + /* Now sum the terms where eta() is negative. + * The argument of eta() must be odd as well, + * so it is convenient to transform the series + * as follows: + * + * Sum[ eta(j+1-n) x^n / n!, {n,j+4,Infinity}] + * = x^j / j! Sum[ eta(1-2m) x^(2m) j! / (2m+j)! , {m,2,Infinity}] + * + * We do not need to do this sum if j is large enough. + */ + if(j < 32) { + int m; + gsl_sf_result jfact; + double sum2; + double pre2; + + gsl_sf_fact_e((unsigned int)j, &jfact); + pre2 = gsl_sf_pow_int(x, j) / jfact.val; + + gsl_sf_eta_int_e(-3, &eta_factor); + pow_factor = x*x*x*x / ((j+4)*(j+3)*(j+2)*(j+1)); + sum2 = eta_factor.val * pow_factor; + + for(m=3; m<24; m++) { + gsl_sf_eta_int_e(1-2*m, &eta_factor); + pow_factor *= x*x / ((j+2*m)*(j+2*m-1)); + sum2 += eta_factor.val * pow_factor; + } + + sum += pre2 * sum2; + } + + result->val = sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + + return GSL_SUCCESS; +} + + +/* series of hypergeometric functions for integer j > 0, x > 0 + * [Goano (7)] + */ +static +int +fd_UMseries_int(const int j, const double x, gsl_sf_result * result) +{ + const int nmax = 2000; + double pre; + double lnpre_val; + double lnpre_err; + double sum_even_val = 1.0; + double sum_even_err = 0.0; + double sum_odd_val = 0.0; + double sum_odd_err = 0.0; + int stat_sum; + int stat_e; + int stat_h = GSL_SUCCESS; + int n; + + if(x < 500.0 && j < 80) { + double p = gsl_sf_pow_int(x, j+1); + gsl_sf_result g; + gsl_sf_fact_e(j+1, &g); /* Gamma(j+2) */ + lnpre_val = 0.0; + lnpre_err = 0.0; + pre = p/g.val; + } + else { + double lnx = log(x); + gsl_sf_result lg; + gsl_sf_lngamma_e(j + 2.0, &lg); + lnpre_val = (j+1.0)*lnx - lg.val; + lnpre_err = 2.0 * GSL_DBL_EPSILON * fabs((j+1.0)*lnx) + lg.err; + pre = 1.0; + } + + /* Add up the odd terms of the sum. + */ + for(n=1; n= nmax ? GSL_EMAXITER : GSL_SUCCESS ); + stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, + pre*(sum_even_val + sum_odd_val), + pre*(sum_even_err + sum_odd_err), + result); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_3(stat_e, stat_h, stat_sum); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +/* [Goano (4)] */ +int gsl_sf_fermi_dirac_m1_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < 0.0) { + const double ex = exp(x); + result->val = ex/(1.0+ex); + result->err = 2.0 * (fabs(x) + 1.0) * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double ex = exp(-x); + result->val = 1.0/(1.0 + ex); + result->err = 2.0 * GSL_DBL_EPSILON * (x + 1.0) * ex; + return GSL_SUCCESS; + } +} + + +/* [Goano (3)] */ +int gsl_sf_fermi_dirac_0_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -5.0) { + double ex = exp(x); + double ser = 1.0 - ex*(0.5 - ex*(1.0/3.0 - ex*(1.0/4.0 - ex*(1.0/5.0 - ex/6.0)))); + result->val = ex * ser; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 10.0) { + result->val = log(1.0 + exp(x)); + result->err = fabs(x * GSL_DBL_EPSILON); + return GSL_SUCCESS; + } + else { + double ex = exp(-x); + result->val = x + ex * (1.0 - 0.5*ex + ex*ex/3.0 - ex*ex*ex/4.0); + result->err = (x + ex) * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } +} + + +int gsl_sf_fermi_dirac_1_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -1.0) { + /* series [Goano (6)] + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<100 ; n++) { + double rat = (n-1.0)/n; + term *= -ex * rat * rat; + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * fabs(sum) * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 1.0) { + return cheb_eval_e(&fd_1_a_cs, x, result); + } + else if(x < 4.0) { + double t = 2.0/3.0*(x-1.0) - 1.0; + return cheb_eval_e(&fd_1_b_cs, t, result); + } + else if(x < 10.0) { + double t = 1.0/3.0*(x-4.0) - 1.0; + return cheb_eval_e(&fd_1_c_cs, t, result); + } + else if(x < 30.0) { + double t = 0.1*x - 2.0; + gsl_sf_result c; + cheb_eval_e(&fd_1_d_cs, t, &c); + result->val = c.val * x*x; + result->err = c.err * x*x + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 1.0/GSL_SQRT_DBL_EPSILON) { + double t = 60.0/x - 1.0; + gsl_sf_result c; + cheb_eval_e(&fd_1_e_cs, t, &c); + result->val = c.val * x*x; + result->err = c.err * x*x + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_SQRT_DBL_MAX) { + result->val = 0.5 * x*x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_fermi_dirac_2_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -1.0) { + /* series [Goano (6)] + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<100 ; n++) { + double rat = (n-1.0)/n; + term *= -ex * rat * rat * rat; + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + return GSL_SUCCESS; + } + else if(x < 1.0) { + return cheb_eval_e(&fd_2_a_cs, x, result); + } + else if(x < 4.0) { + double t = 2.0/3.0*(x-1.0) - 1.0; + return cheb_eval_e(&fd_2_b_cs, t, result); + } + else if(x < 10.0) { + double t = 1.0/3.0*(x-4.0) - 1.0; + return cheb_eval_e(&fd_2_c_cs, t, result); + } + else if(x < 30.0) { + double t = 0.1*x - 2.0; + gsl_sf_result c; + cheb_eval_e(&fd_2_d_cs, t, &c); + result->val = c.val * x*x*x; + result->err = c.err * x*x*x + 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 1.0/GSL_ROOT3_DBL_EPSILON) { + double t = 60.0/x - 1.0; + gsl_sf_result c; + cheb_eval_e(&fd_2_e_cs, t, &c); + result->val = c.val * x*x*x; + result->err = c.err * x*x*x + 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < GSL_ROOT3_DBL_MAX) { + result->val = 1.0/6.0 * x*x*x; + result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_fermi_dirac_int_e(const int j, const double x, gsl_sf_result * result) +{ + if(j < -1) { + return fd_nint(j, x, result); + } + else if (j == -1) { + return gsl_sf_fermi_dirac_m1_e(x, result); + } + else if(j == 0) { + return gsl_sf_fermi_dirac_0_e(x, result); + } + else if(j == 1) { + return gsl_sf_fermi_dirac_1_e(x, result); + } + else if(j == 2) { + return gsl_sf_fermi_dirac_2_e(x, result); + } + else if(x < 0.0) { + return fd_neg(j, x, result); + } + else if(x == 0.0) { + return gsl_sf_eta_int_e(j+1, result); + } + else if(x < 1.5) { + return fd_series_int(j, x, result); + } + else { + gsl_sf_result fasymp; + int stat_asymp = fd_asymp(j, x, &fasymp); + + if(stat_asymp == GSL_SUCCESS) { + result->val = fasymp.val; + result->err = fasymp.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_asymp; + } + else { + return fd_UMseries_int(j, x, result); + } + } +} + + +int gsl_sf_fermi_dirac_mhalf_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -1.0) { + /* series [Goano (6)] + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<200 ; n++) { + double rat = (n-1.0)/n; + term *= -ex * sqrt(rat); + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * fabs(sum) * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 1.0) { + return cheb_eval_e(&fd_mhalf_a_cs, x, result); + } + else if(x < 4.0) { + double t = 2.0/3.0*(x-1.0) - 1.0; + return cheb_eval_e(&fd_mhalf_b_cs, t, result); + } + else if(x < 10.0) { + double t = 1.0/3.0*(x-4.0) - 1.0; + return cheb_eval_e(&fd_mhalf_c_cs, t, result); + } + else if(x < 30.0) { + double rtx = sqrt(x); + double t = 0.1*x - 2.0; + gsl_sf_result c; + cheb_eval_e(&fd_mhalf_d_cs, t, &c); + result->val = c.val * rtx; + result->err = c.err * rtx + 0.5 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return fd_asymp(-0.5, x, result); + } +} + + +int gsl_sf_fermi_dirac_half_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -1.0) { + /* series [Goano (6)] + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<100 ; n++) { + double rat = (n-1.0)/n; + term *= -ex * rat * sqrt(rat); + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * fabs(sum) * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 1.0) { + return cheb_eval_e(&fd_half_a_cs, x, result); + } + else if(x < 4.0) { + double t = 2.0/3.0*(x-1.0) - 1.0; + return cheb_eval_e(&fd_half_b_cs, t, result); + } + else if(x < 10.0) { + double t = 1.0/3.0*(x-4.0) - 1.0; + return cheb_eval_e(&fd_half_c_cs, t, result); + } + else if(x < 30.0) { + double x32 = x*sqrt(x); + double t = 0.1*x - 2.0; + gsl_sf_result c; + cheb_eval_e(&fd_half_d_cs, t, &c); + result->val = c.val * x32; + result->err = c.err * x32 + 1.5 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return fd_asymp(0.5, x, result); + } +} + + +int gsl_sf_fermi_dirac_3half_e(const double x, gsl_sf_result * result) +{ + if(x < GSL_LOG_DBL_MIN) { + UNDERFLOW_ERROR(result); + } + else if(x < -1.0) { + /* series [Goano (6)] + */ + double ex = exp(x); + double term = ex; + double sum = term; + int n; + for(n=2; n<100 ; n++) { + double rat = (n-1.0)/n; + term *= -ex * rat * rat * sqrt(rat); + sum += term; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + } + result->val = sum; + result->err = 2.0 * fabs(sum) * GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 1.0) { + return cheb_eval_e(&fd_3half_a_cs, x, result); + } + else if(x < 4.0) { + double t = 2.0/3.0*(x-1.0) - 1.0; + return cheb_eval_e(&fd_3half_b_cs, t, result); + } + else if(x < 10.0) { + double t = 1.0/3.0*(x-4.0) - 1.0; + return cheb_eval_e(&fd_3half_c_cs, t, result); + } + else if(x < 30.0) { + double x52 = x*x*sqrt(x); + double t = 0.1*x - 2.0; + gsl_sf_result c; + cheb_eval_e(&fd_3half_d_cs, t, &c); + result->val = c.val * x52; + result->err = c.err * x52 + 2.5 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return fd_asymp(1.5, x, result); + } +} + +/* [Goano p. 222] */ +int gsl_sf_fermi_dirac_inc_0_e(const double x, const double b, gsl_sf_result * result) +{ + if(b < 0.0) { + DOMAIN_ERROR(result); + } + else { + double arg = b - x; + gsl_sf_result f0; + int status = gsl_sf_fermi_dirac_0_e(arg, &f0); + result->val = f0.val - arg; + result->err = f0.err + GSL_DBL_EPSILON * (fabs(x) + fabs(b)); + return status; + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_fermi_dirac_m1(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_m1_e(x, &result)); +} + +double gsl_sf_fermi_dirac_0(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_0_e(x, &result)); +} + +double gsl_sf_fermi_dirac_1(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_1_e(x, &result)); +} + +double gsl_sf_fermi_dirac_2(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_2_e(x, &result)); +} + +double gsl_sf_fermi_dirac_int(const int j, const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_int_e(j, x, &result)); +} + +double gsl_sf_fermi_dirac_mhalf(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_mhalf_e(x, &result)); +} + +double gsl_sf_fermi_dirac_half(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_half_e(x, &result)); +} + +double gsl_sf_fermi_dirac_3half(const double x) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_3half_e(x, &result)); +} + +double gsl_sf_fermi_dirac_inc_0(const double x, const double b) +{ + EVAL_RESULT(gsl_sf_fermi_dirac_inc_0_e(x, b, &result)); +} diff --git a/software/gsl-1.15/specfunc/gamma.c b/software/gsl-1.15/specfunc/gamma.c new file mode 100644 index 000000000..8ec22c83a --- /dev/null +++ b/software/gsl-1.15/specfunc/gamma.c @@ -0,0 +1,1685 @@ +/* specfunc/gamma.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +#define LogRootTwoPi_ 0.9189385332046727418 + + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +static struct {int n; double f; long i; } fact_table[GSL_SF_FACT_NMAX + 1] = { + { 0, 1.0, 1L }, + { 1, 1.0, 1L }, + { 2, 2.0, 2L }, + { 3, 6.0, 6L }, + { 4, 24.0, 24L }, + { 5, 120.0, 120L }, + { 6, 720.0, 720L }, + { 7, 5040.0, 5040L }, + { 8, 40320.0, 40320L }, + + { 9, 362880.0, 362880L }, + { 10, 3628800.0, 3628800L }, + { 11, 39916800.0, 39916800L }, + { 12, 479001600.0, 479001600L }, + + { 13, 6227020800.0, 0 }, + { 14, 87178291200.0, 0 }, + { 15, 1307674368000.0, 0 }, + { 16, 20922789888000.0, 0 }, + { 17, 355687428096000.0, 0 }, + { 18, 6402373705728000.0, 0 }, + { 19, 121645100408832000.0, 0 }, + { 20, 2432902008176640000.0, 0 }, + { 21, 51090942171709440000.0, 0 }, + { 22, 1124000727777607680000.0, 0 }, + { 23, 25852016738884976640000.0, 0 }, + { 24, 620448401733239439360000.0, 0 }, + { 25, 15511210043330985984000000.0, 0 }, + { 26, 403291461126605635584000000.0, 0 }, + { 27, 10888869450418352160768000000.0, 0 }, + { 28, 304888344611713860501504000000.0, 0 }, + { 29, 8841761993739701954543616000000.0, 0 }, + { 30, 265252859812191058636308480000000.0, 0 }, + { 31, 8222838654177922817725562880000000.0, 0 }, + { 32, 263130836933693530167218012160000000.0, 0 }, + { 33, 8683317618811886495518194401280000000.0, 0 }, + { 34, 2.95232799039604140847618609644e38, 0 }, + { 35, 1.03331479663861449296666513375e40, 0 }, + { 36, 3.71993326789901217467999448151e41, 0 }, + { 37, 1.37637530912263450463159795816e43, 0 }, + { 38, 5.23022617466601111760007224100e44, 0 }, + { 39, 2.03978820811974433586402817399e46, 0 }, + { 40, 8.15915283247897734345611269600e47, 0 }, + { 41, 3.34525266131638071081700620534e49, 0 }, + { 42, 1.40500611775287989854314260624e51, 0 }, + { 43, 6.04152630633738356373551320685e52, 0 }, + { 44, 2.65827157478844876804362581101e54, 0 }, + { 45, 1.19622220865480194561963161496e56, 0 }, + { 46, 5.50262215981208894985030542880e57, 0 }, + { 47, 2.58623241511168180642964355154e59, 0 }, + { 48, 1.24139155925360726708622890474e61, 0 }, + { 49, 6.08281864034267560872252163321e62, 0 }, + { 50, 3.04140932017133780436126081661e64, 0 }, + { 51, 1.55111875328738228022424301647e66, 0 }, + { 52, 8.06581751709438785716606368564e67, 0 }, + { 53, 4.27488328406002556429801375339e69, 0 }, + { 54, 2.30843697339241380472092742683e71, 0 }, + { 55, 1.26964033536582759259651008476e73, 0 }, + { 56, 7.10998587804863451854045647464e74, 0 }, + { 57, 4.05269195048772167556806019054e76, 0 }, + { 58, 2.35056133128287857182947491052e78, 0 }, + { 59, 1.38683118545689835737939019720e80, 0 }, + { 60, 8.32098711274139014427634118320e81, 0 }, + { 61, 5.07580213877224798800856812177e83, 0 }, + { 62, 3.14699732603879375256531223550e85, 0 }, + { 63, 1.982608315404440064116146708360e87, 0 }, + { 64, 1.268869321858841641034333893350e89, 0 }, + { 65, 8.247650592082470666723170306800e90, 0 }, + { 66, 5.443449390774430640037292402480e92, 0 }, + { 67, 3.647111091818868528824985909660e94, 0 }, + { 68, 2.480035542436830599600990418570e96, 0 }, + { 69, 1.711224524281413113724683388810e98, 0 }, + { 70, 1.197857166996989179607278372170e100, 0 }, + { 71, 8.504785885678623175211676442400e101, 0 }, + { 72, 6.123445837688608686152407038530e103, 0 }, + { 73, 4.470115461512684340891257138130e105, 0 }, + { 74, 3.307885441519386412259530282210e107, 0 }, + { 75, 2.480914081139539809194647711660e109, 0 }, + { 76, 1.885494701666050254987932260860e111, 0 }, + { 77, 1.451830920282858696340707840860e113, 0 }, + { 78, 1.132428117820629783145752115870e115, 0 }, + { 79, 8.946182130782975286851441715400e116, 0 }, + { 80, 7.156945704626380229481153372320e118, 0 }, + { 81, 5.797126020747367985879734231580e120, 0 }, + { 82, 4.753643337012841748421382069890e122, 0 }, + { 83, 3.945523969720658651189747118010e124, 0 }, + { 84, 3.314240134565353266999387579130e126, 0 }, + { 85, 2.817104114380550276949479442260e128, 0 }, + { 86, 2.422709538367273238176552320340e130, 0 }, + { 87, 2.107757298379527717213600518700e132, 0 }, + { 88, 1.854826422573984391147968456460e134, 0 }, + { 89, 1.650795516090846108121691926250e136, 0 }, + { 90, 1.485715964481761497309522733620e138, 0 }, + { 91, 1.352001527678402962551665687590e140, 0 }, + { 92, 1.243841405464130725547532432590e142, 0 }, + { 93, 1.156772507081641574759205162310e144, 0 }, + { 94, 1.087366156656743080273652852570e146, 0 }, + { 95, 1.032997848823905926259970209940e148, 0 }, + { 96, 9.916779348709496892095714015400e149, 0 }, + { 97, 9.619275968248211985332842594960e151, 0 }, + { 98, 9.426890448883247745626185743100e153, 0 }, + { 99, 9.332621544394415268169923885600e155, 0 }, + { 100, 9.33262154439441526816992388563e157, 0 }, + { 101, 9.42594775983835942085162312450e159, 0 }, + { 102, 9.61446671503512660926865558700e161, 0 }, + { 103, 9.90290071648618040754671525458e163, 0 }, + { 104, 1.02990167451456276238485838648e166, 0 }, + { 105, 1.08139675824029090050410130580e168, 0 }, + { 106, 1.146280563734708354534347384148e170, 0 }, + { 107, 1.226520203196137939351751701040e172, 0 }, + { 108, 1.324641819451828974499891837120e174, 0 }, + { 109, 1.443859583202493582204882102460e176, 0 }, + { 110, 1.588245541522742940425370312710e178, 0 }, + { 111, 1.762952551090244663872161047110e180, 0 }, + { 112, 1.974506857221074023536820372760e182, 0 }, + { 113, 2.231192748659813646596607021220e184, 0 }, + { 114, 2.543559733472187557120132004190e186, 0 }, + { 115, 2.925093693493015690688151804820e188, 0 }, + { 116, 3.393108684451898201198256093590e190, 0 }, + { 117, 3.96993716080872089540195962950e192, 0 }, + { 118, 4.68452584975429065657431236281e194, 0 }, + { 119, 5.57458576120760588132343171174e196, 0 }, + { 120, 6.68950291344912705758811805409e198, 0 }, + { 121, 8.09429852527344373968162284545e200, 0 }, + { 122, 9.87504420083360136241157987140e202, 0 }, + { 123, 1.21463043670253296757662432419e205, 0 }, + { 124, 1.50614174151114087979501416199e207, 0 }, + { 125, 1.88267717688892609974376770249e209, 0 }, + { 126, 2.37217324288004688567714730514e211, 0 }, + { 127, 3.01266001845765954480997707753e213, 0 }, + { 128, 3.85620482362580421735677065923e215, 0 }, + { 129, 4.97450422247728744039023415041e217, 0 }, + { 130, 6.46685548922047367250730439554e219, 0 }, + { 131, 8.47158069087882051098456875820e221, 0 }, + { 132, 1.11824865119600430744996307608e224, 0 }, + { 133, 1.48727070609068572890845089118e226, 0 }, + { 134, 1.99294274616151887673732419418e228, 0 }, + { 135, 2.69047270731805048359538766215e230, 0 }, + { 136, 3.65904288195254865768972722052e232, 0 }, + { 137, 5.01288874827499166103492629211e234, 0 }, + { 138, 6.91778647261948849222819828311e236, 0 }, + { 139, 9.61572319694108900419719561353e238, 0 }, + { 140, 1.34620124757175246058760738589e241, 0 }, + { 141, 1.89814375907617096942852641411e243, 0 }, + { 142, 2.69536413788816277658850750804e245, 0 }, + { 143, 3.85437071718007277052156573649e247, 0 }, + { 144, 5.55029383273930478955105466055e249, 0 }, + { 145, 8.04792605747199194484902925780e251, 0 }, + { 146, 1.17499720439091082394795827164e254, 0 }, + { 147, 1.72724589045463891120349865931e256, 0 }, + { 148, 2.55632391787286558858117801578e258, 0 }, + { 149, 3.80892263763056972698595524351e260, 0 }, + { 150, 5.71338395644585459047893286526e262, 0 }, + { 151, 8.62720977423324043162318862650e264, 0 }, + { 152, 1.31133588568345254560672467123e267, 0 }, + { 153, 2.00634390509568239477828874699e269, 0 }, + { 154, 3.08976961384735088795856467036e271, 0 }, + { 155, 4.78914290146339387633577523906e273, 0 }, + { 156, 7.47106292628289444708380937294e275, 0 }, + { 157, 1.17295687942641442819215807155e278, 0 }, + { 158, 1.85327186949373479654360975305e280, 0 }, + { 159, 2.94670227249503832650433950735e282, 0 }, + { 160, 4.71472363599206132240694321176e284, 0 }, + { 161, 7.59070505394721872907517857094e286, 0 }, + { 162, 1.22969421873944943411017892849e289, 0 }, + { 163, 2.00440157654530257759959165344e291, 0 }, + { 164, 3.28721858553429622726333031164e293, 0 }, + { 165, 5.42391066613158877498449501421e295, 0 }, + { 166, 9.00369170577843736647426172359e297, 0 }, + { 167, 1.50361651486499904020120170784e300, 0 }, + { 168, 2.52607574497319838753801886917e302, 0 }, + { 169, 4.26906800900470527493925188890e304, 0 }, + { 170, 7.25741561530799896739672821113e306, 0 }, + + /* + { 171, 1.24101807021766782342484052410e309, 0 }, + { 172, 2.13455108077438865629072570146e311, 0 }, + { 173, 3.69277336973969237538295546352e313, 0 }, + { 174, 6.42542566334706473316634250653e315, 0 }, + { 175, 1.12444949108573632830410993864e318, 0 }, + { 176, 1.97903110431089593781523349201e320, 0 }, + { 177, 3.50288505463028580993296328086e322, 0 }, + { 178, 6.23513539724190874168067463993e324, 0 }, + { 179, 1.11608923610630166476084076055e327, 0 }, + { 180, 2.00896062499134299656951336898e329, 0 }, + { 181, 3.63621873123433082379081919786e331, 0 }, + { 182, 6.61791809084648209929929094011e333, 0 }, + { 183, 1.21107901062490622417177024204e336, 0 }, + { 184, 2.22838537954982745247605724535e338, 0 }, + { 185, 4.12251295216718078708070590390e340, 0 }, + { 186, 7.66787409103095626397011298130e342, 0 }, + { 187, 1.43389245502278882136241112750e345, 0 }, + { 188, 2.69571781544284298416133291969e347, 0 }, + { 189, 5.09490667118697324006491921822e349, 0 }, + { 190, 9.68032267525524915612334651460e351, 0 }, + { 191, 1.84894163097375258881955918429e354, 0 }, + { 192, 3.54996793146960497053355363384e356, 0 }, + { 193, 6.85143810773633759312975851330e358, 0 }, + { 194, 1.32917899290084949306717315158e361, 0 }, + { 195, 2.59189903615665651148098764559e363, 0 }, + { 196, 5.08012211086704676250273578535e365, 0 }, + { 197, 1.00078405584080821221303894971e368, 0 }, + { 198, 1.98155243056480026018181712043e370, 0 }, + { 199, 3.94328933682395251776181606966e372, 0 }, + { 200, 7.88657867364790503552363213932e374, 0 } + */ +}; + +static struct {int n; double f; long i; } doub_fact_table[GSL_SF_DOUBLEFACT_NMAX + 1] = { + { 0, 1.000000000000000000000000000, 1L }, + { 1, 1.000000000000000000000000000, 1L }, + { 2, 2.000000000000000000000000000, 2L }, + { 3, 3.000000000000000000000000000, 3L }, + { 4, 8.000000000000000000000000000, 8L }, + { 5, 15.00000000000000000000000000, 15L }, + { 6, 48.00000000000000000000000000, 48L }, + { 7, 105.0000000000000000000000000, 105L }, + { 8, 384.0000000000000000000000000, 384L }, + { 9, 945.0000000000000000000000000, 945L }, + { 10, 3840.000000000000000000000000, 3840L }, + { 11, 10395.00000000000000000000000, 10395L }, + { 12, 46080.00000000000000000000000, 46080L }, + { 13, 135135.0000000000000000000000, 135135L }, + { 14, 645120.00000000000000000000000, 645120L }, + { 15, 2.02702500000000000000000000000e6, 2027025L }, + { 16, 1.03219200000000000000000000000e7, 10321920L }, + { 17, 3.4459425000000000000000000000e7, 34459425L }, + { 18, 1.85794560000000000000000000000e8, 185794560L }, + { 19, 6.5472907500000000000000000000e8, 0 }, + { 20, 3.7158912000000000000000000000e9, 0 }, + { 21, 1.37493105750000000000000000000e10, 0 }, + { 22, 8.1749606400000000000000000000e10, 0 }, + { 23, 3.1623414322500000000000000000e11, 0 }, + { 24, 1.96199055360000000000000000000e12, 0 }, + { 25, 7.9058535806250000000000000000e12, 0 }, + { 26, 5.1011754393600000000000000000e13, 0 }, + { 27, 2.13458046676875000000000000000e14, 0 }, + { 28, 1.42832912302080000000000000000e15, 0 }, + { 29, 6.1902833536293750000000000000e15, 0 }, + { 30, 4.2849873690624000000000000000e16, 0 }, + { 31, 1.91898783962510625000000000000e17, 0 }, + { 32, 1.37119595809996800000000000000e18, 0 }, + { 33, 6.3326598707628506250000000000e18, 0 }, + { 34, 4.6620662575398912000000000000e19, 0 }, + { 35, 2.21643095476699771875000000000e20, 0 }, + { 36, 1.67834385271436083200000000000e21, 0 }, + { 37, 8.2007945326378915593750000000e21, 0 }, + { 38, 6.3777066403145711616000000000e22, 0 }, + { 39, 3.1983098677287777081562500000e23, 0 }, + { 40, 2.55108265612582846464000000000e24, 0 }, + { 41, 1.31130704576879886034406250000e25, 0 }, + { 42, 1.07145471557284795514880000000e26, 0 }, + { 43, 5.6386202968058350994794687500e26, 0 }, + { 44, 4.7144007485205310026547200000e27, 0 }, + { 45, 2.53737913356262579476576093750e28, 0 }, + { 46, 2.16862434431944426122117120000e29, 0 }, + { 47, 1.19256819277443412353990764062e30, 0 }, + { 48, 1.04093968527333324538616217600e31, 0 }, + { 49, 5.8435841445947272053455474391e31, 0 }, + { 50, 5.2046984263666662269308108800e32, 0 }, + { 51, 2.98022791374331087472622919392e33, 0 }, + { 52, 2.70644318171066643800402165760e34, 0 }, + { 53, 1.57952079428395476360490147278e35, 0 }, + { 54, 1.46147931812375987652217169510e36, 0 }, + { 55, 8.6873643685617511998269581003e36, 0 }, + { 56, 8.1842841814930553085241614926e37, 0 }, + { 57, 4.9517976900801981839013661172e38, 0 }, + { 58, 4.7468848252659720789440136657e39, 0 }, + { 59, 2.92156063714731692850180600912e40, 0 }, + { 60, 2.84813089515958324736640819942e41, 0 }, + { 61, 1.78215198865986332638610166557e42, 0 }, + { 62, 1.76584115499894161336717308364e43, 0 }, + { 63, 1.12275575285571389562324404931e44, 0 }, + { 64, 1.13013833919932263255499077353e45, 0 }, + { 65, 7.2979123935621403215510863205e45, 0 }, + { 66, 7.4589130387155293748629391053e46, 0 }, + { 67, 4.8896013036866340154392278347e47, 0 }, + { 68, 5.0720608663265599749067985916e48, 0 }, + { 69, 3.3738248995437774706530672060e49, 0 }, + { 70, 3.5504426064285919824347590141e50, 0 }, + { 71, 2.39541567867608200416367771623e51, 0 }, + { 72, 2.55631867662858622735302649017e52, 0 }, + { 73, 1.74865344543353986303948473285e53, 0 }, + { 74, 1.89167582070515380824123960272e54, 0 }, + { 75, 1.31149008407515489727961354964e55, 0 }, + { 76, 1.43767362373591689426334209807e56, 0 }, + { 77, 1.00984736473786927090530243322e57, 0 }, + { 78, 1.12138542651401517752540683649e58, 0 }, + { 79, 7.9777941814291672401518892225e58, 0 }, + { 80, 8.9710834121121214202032546920e59, 0 }, + { 81, 6.4620132869576254645230302702e60, 0 }, + { 82, 7.3562883979319395645666688474e61, 0 }, + { 83, 5.3634710281748291355541151243e62, 0 }, + { 84, 6.1792822542628292342360018318e63, 0 }, + { 85, 4.5589503739486047652209978556e64, 0 }, + { 86, 5.3141827386660331414429615754e65, 0 }, + { 87, 3.9662868253352861457422681344e66, 0 }, + { 88, 4.6764808100261091644698061863e67, 0 }, + { 89, 3.5299952745484046697106186396e68, 0 }, + { 90, 4.2088327290234982480228255677e69, 0 }, + { 91, 3.2122956998390482494366629620e70, 0 }, + { 92, 3.8721261107016183881809995223e71, 0 }, + { 93, 2.98743500085031487197609655470e72, 0 }, + { 94, 3.6397985440595212848901395509e73, 0 }, + { 95, 2.83806325080779912837729172696e74, 0 }, + { 96, 3.4942066022971404334945339689e75, 0 }, + { 97, 2.75292135328356515452597297515e76, 0 }, + { 98, 3.4243224702511976248246432895e77, 0 }, + { 99, 2.72539213975072950298071324540e78, 0 }, + { 100, 3.4243224702511976248246432895e79, 0 }, + { 101, 2.75264606114823679801052037785e80, 0 }, + { 102, 3.4928089196562215773211361553e81, 0 }, + { 103, 2.83522544298268390195083598919e82, 0 }, + { 104, 3.6325212764424704404139816015e83, 0 }, + { 105, 2.97698671513181809704837778865e84, 0 }, + { 106, 3.8504725530290186668388204976e85, 0 }, + { 107, 3.1853757851910453638417642339e86, 0 }, + { 108, 4.1585103572713401601859261374e87, 0 }, + { 109, 3.4720596058582394465875230149e88, 0 }, + { 110, 4.5743613929984741762045187512e89, 0 }, + { 111, 3.8539861625026457857121505465e90, 0 }, + { 112, 5.1232847601582910773490610013e91, 0 }, + { 113, 4.3550043636279897378547301176e92, 0 }, + { 114, 5.8405446265804518281779295415e93, 0 }, + { 115, 5.0082550181721881985329396352e94, 0 }, + { 116, 6.7750317668333241206863982681e95, 0 }, + { 117, 5.8596583712614601922835393732e96, 0 }, + { 118, 7.9945374848633224624099499564e97, 0 }, + { 119, 6.9729934618011376288174118541e98, 0 }, + { 120, 9.5934449818359869548919399477e99, 0 }, + { 121, 8.4373220887793765308690683435e100, 0 }, + { 122, 1.17040028778399040849681667362e102, 0 }, + { 123, 1.03779061691986331329689540625e103, 0 }, + { 124, 1.45129635685214810653605267528e104, 0 }, + { 125, 1.29723827114982914162111925781e105, 0 }, + { 126, 1.82863340963370661423542637086e106, 0 }, + { 127, 1.64749260436028300985882145742e107, 0 }, + { 128, 2.34065076433114446622134575470e108, 0 }, + { 129, 2.12526545962476508271787968008e109, 0 }, + { 130, 3.04284599363048780608774948111e110, 0 }, + { 131, 2.78409775210844225836042238090e111, 0 }, + { 132, 4.0165567115922439040358293151e112, 0 }, + { 133, 3.7028500103042282036193617666e113, 0 }, + { 134, 5.3821859935336068314080112822e114, 0 }, + { 135, 4.9988475139107080748861383849e115, 0 }, + { 136, 7.3197729512057052907148953438e116, 0 }, + { 137, 6.8484210940576700625940095873e117, 0 }, + { 138, 1.01012866726638733011865555744e119, 0 }, + { 139, 9.5193053207401613870056733264e119, 0 }, + { 140, 1.41418013417294226216611778042e121, 0 }, + { 141, 1.34222205022436275556779993902e122, 0 }, + { 142, 2.00813579052557801227588724819e123, 0 }, + { 143, 1.91937753182083874046195391280e124, 0 }, + { 144, 2.89171553835683233767727763739e125, 0 }, + { 145, 2.78309742114021617366983317355e126, 0 }, + { 146, 4.2219046860009752130088253506e127, 0 }, + { 147, 4.0911532090761177752946547651e128, 0 }, + { 148, 6.2484189352814433152530615189e129, 0 }, + { 149, 6.0958182815234154851890356000e130, 0 }, + { 150, 9.3726284029221649728795922783e131, 0 }, + { 151, 9.2046856051003573826354437561e132, 0 }, + { 152, 1.42463951724416907587769802630e134, 0 }, + { 153, 1.40831689758035467954322289468e135, 0 }, + { 154, 2.19394485655602037685165496051e136, 0 }, + { 155, 2.18289119124954975329199548675e137, 0 }, + { 156, 3.4225539762273917878885817384e138, 0 }, + { 157, 3.4271391702617931126684329142e139, 0 }, + { 158, 5.4076352824392790248639591467e140, 0 }, + { 159, 5.4491512807162510491428083336e141, 0 }, + { 160, 8.6522164519028464397823346347e142, 0 }, + { 161, 8.7731335619531641891199214170e143, 0 }, + { 162, 1.40165906520826112324473821082e145, 0 }, + { 163, 1.43002077059836576282654719098e146, 0 }, + { 164, 2.29872086694154824212137066574e147, 0 }, + { 165, 2.35953427148730350866380286512e148, 0 }, + { 166, 3.8158766391229700819214753051e149, 0 }, + { 167, 3.9404222333837968594685507847e150, 0 }, + { 168, 6.4106727537265897376280785126e151, 0 }, + { 169, 6.6593135744186166925018508262e152, 0 }, + { 170, 1.08981436813352025539677334714e154, 0 }, + { 171, 1.13874262122558345441781649128e155, 0 }, + { 172, 1.87448071318965483928245015709e156, 0 }, + { 173, 1.97002473472025937614282252992e157, 0 }, + { 174, 3.2615964409499994203514632733e158, 0 }, + { 175, 3.4475432857604539082499394274e159, 0 }, + { 176, 5.7404097360719989798185753611e160, 0 }, + { 177, 6.1021516157960034176023927864e161, 0 }, + { 178, 1.02179293302081581840770641427e163, 0 }, + { 179, 1.09228513922748461175082830877e164, 0 }, + { 180, 1.83922727943746847313387154568e165, 0 }, + { 181, 1.97703610200174714726899923887e166, 0 }, + { 182, 3.3473936485761926211036462131e167, 0 }, + { 183, 3.6179760666631972795022686071e168, 0 }, + { 184, 6.1592043133801944228307090322e169, 0 }, + { 185, 6.6932557233269149670791969232e170, 0 }, + { 186, 1.14561200228871616264651187999e172, 0 }, + { 187, 1.25163882026213309884380982464e173, 0 }, + { 188, 2.15375056430278638577544233437e174, 0 }, + { 189, 2.36559737029543155681480056857e175, 0 }, + { 190, 4.0921260721752941329733404353e176, 0 }, + { 191, 4.5182909772642742735162690860e177, 0 }, + { 192, 7.8568820585765647353088136358e178, 0 }, + { 193, 8.7203015861200493478863993359e179, 0 }, + { 194, 1.52423511936385355864990984535e181, 0 }, + { 195, 1.70045880929340962283784787050e182, 0 }, + { 196, 2.98750083395315297495382329688e183, 0 }, + { 197, 3.3499038543080169569905603049e184, 0 }, + { 198, 5.9152516512272428904085701278e185, 0 }, + { 199, 6.6663086700729537444112150067e186, 0 }, + { 200, 1.18305033024544857808171402556e188, 0 }, + { 201, 1.33992804268466370262665421635e189, 0 }, + { 202, 2.38976166709580612772506233164e190, 0 }, + { 203, 2.72005392664986731633210805920e191, 0 }, + { 204, 4.8751138008754445005591271565e192, 0 }, + { 205, 5.5761105496322279984808215214e193, 0 }, + { 206, 1.00427344298034156711518019425e195, 0 }, + { 207, 1.15425488377387119568553005492e196, 0 }, + { 208, 2.08888876139911045959957480403e197, 0 }, + { 209, 2.41239270708739079898275781478e198, 0 }, + { 210, 4.3866663989381319651591070885e199, 0 }, + { 211, 5.0901486119543945858536189892e200, 0 }, + { 212, 9.2997327657488397661373070276e201, 0 }, + { 213, 1.08420165434628604678682084470e203, 0 }, + { 214, 1.99014281187025170995338370390e204, 0 }, + { 215, 2.33103355684451500059166481610e205, 0 }, + { 216, 4.2987084736397436934993088004e206, 0 }, + { 217, 5.0583428183525975512839126509e207, 0 }, + { 218, 9.3711844725346412518284931849e208, 0 }, + { 219, 1.10777707721921886373117687056e210, 0 }, + { 220, 2.06166058395762107540226850068e211, 0 }, + { 221, 2.44818734065447368884590088393e212, 0 }, + { 222, 4.5768864963859187873930360715e213, 0 }, + { 223, 5.4594577696594763261263589712e214, 0 }, + { 224, 1.02522257519044580837604008002e216, 0 }, + { 225, 1.22837799817338217337843076851e217, 0 }, + { 226, 2.31700301993040752692985058084e218, 0 }, + { 227, 2.78841805585357753356903784452e219, 0 }, + { 228, 5.2827668854413291614000593243e220, 0 }, + { 229, 6.3854773479046925518730966640e221, 0 }, + { 230, 1.21503638365150570712201364459e223, 0 }, + { 231, 1.47504526736598397948268532937e224, 0 }, + { 232, 2.81888441007149324052307165546e225, 0 }, + { 233, 3.4368554729627426721946568174e226, 0 }, + { 234, 6.5961895195672941828239876738e227, 0 }, + { 235, 8.0766103614624452796574435210e228, 0 }, + { 236, 1.55670072661788142714646109101e230, 0 }, + { 237, 1.91415665566659953127881411447e231, 0 }, + { 238, 3.7049477293505577966085773966e232, 0 }, + { 239, 4.5748344070431728797563657336e233, 0 }, + { 240, 8.8918745504413387118605857518e234, 0 }, + { 241, 1.10253509209740466402128414180e236, 0 }, + { 242, 2.15183364120680396827026175195e237, 0 }, + { 243, 2.67916027379669333357172046456e238, 0 }, + { 244, 5.2504740845446016825794386748e239, 0 }, + { 245, 6.5639426708018986672507151382e240, 0 }, + { 246, 1.29161662479797201391454191399e242, 0 }, + { 247, 1.62129383968806897081092663913e243, 0 }, + { 248, 3.2032092294989705945080639467e244, 0 }, + { 249, 4.0370216608232917373192073314e245, 0 }, + { 250, 8.0080230737474264862701598667e246, 0 }, + { 251, 1.01329243686664622606712104019e248, 0 }, + { 252, 2.01802181458435147454008028642e249, 0 }, + { 253, 2.56362986527261495194981623168e250, 0 }, + { 254, 5.1257754090442527453318039275e251, 0 }, + { 255, 6.5372561564451681274720313908e252, 0 }, + { 256, 1.31219850471532870280494180544e254, 0 }, + { 257, 1.68007483220640820876031206743e255, 0 }, + { 258, 3.3854721421655480532367498580e256, 0 }, + { 259, 4.3513938154145972606892082546e257, 0 }, + { 260, 8.8022275696304249384155496309e258, 0 }, + { 261, 1.13571378582320988503988335446e260, 0 }, + { 262, 2.30618362324317133386487400329e261, 0 }, + { 263, 2.98692725671504199765489322224e262, 0 }, + { 264, 6.0883247653619723214032673687e263, 0 }, + { 265, 7.9153572302948612937854670389e264, 0 }, + { 266, 1.61949438758628463749326912007e266, 0 }, + { 267, 2.11340038048872796544071969939e267, 0 }, + { 268, 4.3402449587312428284819612418e268, 0 }, + { 269, 5.6850470235146782270355359914e269, 0 }, + { 270, 1.17186613885743556369012953528e271, 0 }, + { 271, 1.54064774337247779952663025366e272, 0 }, + { 272, 3.1874758976922247332371523360e273, 0 }, + { 273, 4.2059683394068643927077005925e274, 0 }, + { 274, 8.7336839596766957690697974006e275, 0 }, + { 275, 1.15664129333688770799461766294e277, 0 }, + { 276, 2.41049677287076803226326408256e278, 0 }, + { 277, 3.2038963825431789511450909263e279, 0 }, + { 278, 6.7011810285807351296918741495e280, 0 }, + { 279, 8.9388709072954692736948036845e281, 0 }, + { 280, 1.87633068800260583631372476186e283, 0 }, + { 281, 2.51182272495002686590823983534e284, 0 }, + { 282, 5.2912525401673484584047038284e285, 0 }, + { 283, 7.1084583116085760305203187340e286, 0 }, + { 284, 1.50271572140752696218693588728e288, 0 }, + { 285, 2.02591061880844416869829083919e289, 0 }, + { 286, 4.2977669632255271118546366376e290, 0 }, + { 287, 5.8143634759802347641640947085e291, 0 }, + { 288, 1.23775688540895180821413535163e293, 0 }, + { 289, 1.68035104455828784684342337075e294, 0 }, + { 290, 3.5894949676859602438209925197e295, 0 }, + { 291, 4.8898215396646176343143620089e296, 0 }, + { 292, 1.04813253056430039119572981576e298, 0 }, + { 293, 1.43271771112173296685410806860e299, 0 }, + { 294, 3.08150963985904315011544565835e300, 0 }, + { 295, 4.2265172478091122522196188024e301, 0 }, + { 296, 9.1212685339827677243417191487e302, 0 }, + { 297, 1.25527562259930633890922678431e304, 0 }, + /* + { 298, 2.71813802312686478185383230631e305, 0 }, + { 299, 3.7532741115719259533385880851e306, 0 }, + { 300, 8.1544140693805943455614969189e307, } + */ +}; + + +/* Chebyshev coefficients for Gamma*(3/4(t+1)+1/2), -1val = (zr+0.5)*log1_r.val - zi*log1_i.val - (zr+7.5) + LogRootTwoPi_ + logAg_r.val; + yi->val = zi*log1_r.val + (zr+0.5)*log1_i.val - zi + logAg_i.val; + yr->err = 4.0 * GSL_DBL_EPSILON * fabs(yr->val); + yi->err = 4.0 * GSL_DBL_EPSILON * fabs(yi->val); + yi_tmp_val = yi->val; + yi_tmp_err = yi->err; + gsl_sf_angle_restrict_symm_err_e(yi_tmp_val, yi); + yi->err += yi_tmp_err; + return GSL_SUCCESS; +} + + +/* Lanczos method for real x > 0; + * gamma=7, truncated at 1/(z+8) + * [J. SIAM Numer. Anal, Ser. B, 1 (1964) 86] + */ +static +int +lngamma_lanczos(double x, gsl_sf_result * result) +{ + int k; + double Ag; + double term1, term2; + + x -= 1.0; /* Lanczos writes z! instead of Gamma(z) */ + + Ag = lanczos_7_c[0]; + for(k=1; k<=8; k++) { Ag += lanczos_7_c[k]/(x+k); } + + /* (x+0.5)*log(x+7.5) - (x+7.5) + LogRootTwoPi_ + log(Ag(x)) */ + term1 = (x+0.5)*log((x+7.5)/M_E); + term2 = LogRootTwoPi_ + log(Ag); + result->val = term1 + (term2 - 7.0); + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(term1) + fabs(term2) + 7.0); + result->err += GSL_DBL_EPSILON * fabs(result->val); + + return GSL_SUCCESS; +} + +/* x = eps near zero + * gives double-precision for |eps| < 0.02 + */ +static +int +lngamma_sgn_0(double eps, gsl_sf_result * lng, double * sgn) +{ + /* calculate series for g(eps) = Gamma(eps) eps - 1/(1+eps) - eps/2 */ + const double c1 = -0.07721566490153286061; + const double c2 = -0.01094400467202744461; + const double c3 = 0.09252092391911371098; + const double c4 = -0.01827191316559981266; + const double c5 = 0.01800493109685479790; + const double c6 = -0.00685088537872380685; + const double c7 = 0.00399823955756846603; + const double c8 = -0.00189430621687107802; + const double c9 = 0.00097473237804513221; + const double c10 = -0.00048434392722255893; + const double g6 = c6+eps*(c7+eps*(c8 + eps*(c9 + eps*c10))); + const double g = eps*(c1+eps*(c2+eps*(c3+eps*(c4+eps*(c5+eps*g6))))); + + /* calculate Gamma(eps) eps, a positive quantity */ + const double gee = g + 1.0/(1.0+eps) + 0.5*eps; + + lng->val = log(gee/fabs(eps)); + lng->err = 4.0 * GSL_DBL_EPSILON * fabs(lng->val); + *sgn = GSL_SIGN(eps); + + return GSL_SUCCESS; +} + + +/* x near a negative integer + * Calculates sign as well as log(|gamma(x)|). + * x = -N + eps + * assumes N >= 1 + */ +static +int +lngamma_sgn_sing(int N, double eps, gsl_sf_result * lng, double * sgn) +{ + if(eps == 0.0) { + lng->val = 0.0; + lng->err = 0.0; + *sgn = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else if(N == 1) { + /* calculate series for + * g = eps gamma(-1+eps) + 1 + eps/2 (1+3eps)/(1-eps^2) + * double-precision for |eps| < 0.02 + */ + const double c0 = 0.07721566490153286061; + const double c1 = 0.08815966957356030521; + const double c2 = -0.00436125434555340577; + const double c3 = 0.01391065882004640689; + const double c4 = -0.00409427227680839100; + const double c5 = 0.00275661310191541584; + const double c6 = -0.00124162645565305019; + const double c7 = 0.00065267976121802783; + const double c8 = -0.00032205261682710437; + const double c9 = 0.00016229131039545456; + const double g5 = c5 + eps*(c6 + eps*(c7 + eps*(c8 + eps*c9))); + const double g = eps*(c0 + eps*(c1 + eps*(c2 + eps*(c3 + eps*(c4 + eps*g5))))); + + /* calculate eps gamma(-1+eps), a negative quantity */ + const double gam_e = g - 1.0 - 0.5*eps*(1.0+3.0*eps)/(1.0 - eps*eps); + + lng->val = log(fabs(gam_e)/fabs(eps)); + lng->err = 2.0 * GSL_DBL_EPSILON * fabs(lng->val); + *sgn = ( eps > 0.0 ? -1.0 : 1.0 ); + return GSL_SUCCESS; + } + else { + double g; + + /* series for sin(Pi(N+1-eps))/(Pi eps) modulo the sign + * double-precision for |eps| < 0.02 + */ + const double cs1 = -1.6449340668482264365; + const double cs2 = 0.8117424252833536436; + const double cs3 = -0.1907518241220842137; + const double cs4 = 0.0261478478176548005; + const double cs5 = -0.0023460810354558236; + const double e2 = eps*eps; + const double sin_ser = 1.0 + e2*(cs1+e2*(cs2+e2*(cs3+e2*(cs4+e2*cs5)))); + + /* calculate series for ln(gamma(1+N-eps)) + * double-precision for |eps| < 0.02 + */ + double aeps = fabs(eps); + double c1, c2, c3, c4, c5, c6, c7; + double lng_ser; + gsl_sf_result c0; + gsl_sf_result psi_0; + gsl_sf_result psi_1; + gsl_sf_result psi_2; + gsl_sf_result psi_3; + gsl_sf_result psi_4; + gsl_sf_result psi_5; + gsl_sf_result psi_6; + psi_2.val = 0.0; + psi_3.val = 0.0; + psi_4.val = 0.0; + psi_5.val = 0.0; + psi_6.val = 0.0; + gsl_sf_lnfact_e(N, &c0); + gsl_sf_psi_int_e(N+1, &psi_0); + gsl_sf_psi_1_int_e(N+1, &psi_1); + if(aeps > 0.00001) gsl_sf_psi_n_e(2, N+1.0, &psi_2); + if(aeps > 0.0002) gsl_sf_psi_n_e(3, N+1.0, &psi_3); + if(aeps > 0.001) gsl_sf_psi_n_e(4, N+1.0, &psi_4); + if(aeps > 0.005) gsl_sf_psi_n_e(5, N+1.0, &psi_5); + if(aeps > 0.01) gsl_sf_psi_n_e(6, N+1.0, &psi_6); + c1 = psi_0.val; + c2 = psi_1.val/2.0; + c3 = psi_2.val/6.0; + c4 = psi_3.val/24.0; + c5 = psi_4.val/120.0; + c6 = psi_5.val/720.0; + c7 = psi_6.val/5040.0; + lng_ser = c0.val-eps*(c1-eps*(c2-eps*(c3-eps*(c4-eps*(c5-eps*(c6-eps*c7)))))); + + /* calculate + * g = ln(|eps gamma(-N+eps)|) + * = -ln(gamma(1+N-eps)) + ln(|eps Pi/sin(Pi(N+1+eps))|) + */ + g = -lng_ser - log(sin_ser); + + lng->val = g - log(fabs(eps)); + lng->err = c0.err + 2.0 * GSL_DBL_EPSILON * (fabs(g) + fabs(lng->val)); + + *sgn = ( GSL_IS_ODD(N) ? -1.0 : 1.0 ) * ( eps > 0.0 ? 1.0 : -1.0 ); + + return GSL_SUCCESS; + } +} + + +/* This gets bad near the negative half axis. However, this + * region can be avoided by use of the reflection formula, as usual. + * Only the first two terms of the series are kept. + */ +#if 0 +static +int +lngamma_complex_stirling(const double zr, const double zi, double * lg_r, double * arg) +{ + double re_zinv, im_zinv; + double re_zinv2, im_zinv2; + double re_zinv3, im_zinv3; + double re_zhlnz, im_zhlnz; + double r, lnr, theta; + gsl_sf_complex_log_e(zr, zi, &lnr, &theta); /* z = r e^{i theta} */ + r = exp(lnr); + re_zinv = (zr/r)/r; + im_zinv = -(zi/r)/r; + re_zinv2 = re_zinv*re_zinv - im_zinv*im_zinv; + re_zinv2 = 2.0*re_zinv*im_zinv; + re_zinv3 = re_zinv2*re_zinv - im_zinv2*im_zinv; + re_zinv3 = re_zinv2*im_zinv + im_zinv2*re_zinv; + re_zhlnz = (zr - 0.5)*lnr - zi*theta; + im_zhlnz = zi*lnr + zr*theta; + *lg_r = re_zhlnz - zr + 0.5*(M_LN2+M_LNPI) + re_zinv/12.0 - re_zinv3/360.0; + *arg = im_zhlnz - zi + 1.0/12.0*im_zinv - im_zinv3/360.0; + return GSL_SUCCESS; +} +#endif /* 0 */ + + +inline +static +int +lngamma_1_pade(const double eps, gsl_sf_result * result) +{ + /* Use (2,2) Pade for Log[Gamma[1+eps]]/eps + * plus a correction series. + */ + const double n1 = -1.0017419282349508699871138440; + const double n2 = 1.7364839209922879823280541733; + const double d1 = 1.2433006018858751556055436011; + const double d2 = 5.0456274100274010152489597514; + const double num = (eps + n1) * (eps + n2); + const double den = (eps + d1) * (eps + d2); + const double pade = 2.0816265188662692474880210318 * num / den; + const double c0 = 0.004785324257581753; + const double c1 = -0.01192457083645441; + const double c2 = 0.01931961413960498; + const double c3 = -0.02594027398725020; + const double c4 = 0.03141928755021455; + const double eps5 = eps*eps*eps*eps*eps; + const double corr = eps5 * (c0 + eps*(c1 + eps*(c2 + eps*(c3 + c4*eps)))); + result->val = eps * (pade + corr); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; +} + +inline +static +int +lngamma_2_pade(const double eps, gsl_sf_result * result) +{ + /* Use (2,2) Pade for Log[Gamma[2+eps]]/eps + * plus a correction series. + */ + const double n1 = 1.000895834786669227164446568; + const double n2 = 4.209376735287755081642901277; + const double d1 = 2.618851904903217274682578255; + const double d2 = 10.85766559900983515322922936; + const double num = (eps + n1) * (eps + n2); + const double den = (eps + d1) * (eps + d2); + const double pade = 2.85337998765781918463568869 * num/den; + const double c0 = 0.0001139406357036744; + const double c1 = -0.0001365435269792533; + const double c2 = 0.0001067287169183665; + const double c3 = -0.0000693271800931282; + const double c4 = 0.0000407220927867950; + const double eps5 = eps*eps*eps*eps*eps; + const double corr = eps5 * (c0 + eps*(c1 + eps*(c2 + eps*(c3 + c4*eps)))); + result->val = eps * (pade + corr); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; +} + + +/* series for gammastar(x) + * double-precision for x > 10.0 + */ +static +int +gammastar_ser(const double x, gsl_sf_result * result) +{ + /* Use the Stirling series for the correction to Log(Gamma(x)), + * which is better behaved and easier to compute than the + * regular Stirling series for Gamma(x). + */ + const double y = 1.0/(x*x); + const double c0 = 1.0/12.0; + const double c1 = -1.0/360.0; + const double c2 = 1.0/1260.0; + const double c3 = -1.0/1680.0; + const double c4 = 1.0/1188.0; + const double c5 = -691.0/360360.0; + const double c6 = 1.0/156.0; + const double c7 = -3617.0/122400.0; + const double ser = c0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*(c6 + y*c7)))))); + result->val = exp(ser/x); + result->err = 2.0 * GSL_DBL_EPSILON * result->val * GSL_MAX_DBL(1.0, ser/x); + return GSL_SUCCESS; +} + + +/* Chebyshev expansion for log(gamma(x)/gamma(8)) + * 5 < x < 10 + * -1 < t < 1 + */ +static double gamma_5_10_data[24] = { + -1.5285594096661578881275075214, + 4.8259152300595906319768555035, + 0.2277712320977614992970601978, + -0.0138867665685617873604917300, + 0.0012704876495201082588139723, + -0.0001393841240254993658962470, + 0.0000169709242992322702260663, + -2.2108528820210580075775889168e-06, + 3.0196602854202309805163918716e-07, + -4.2705675000079118380587357358e-08, + 6.2026423818051402794663551945e-09, + -9.1993973208880910416311405656e-10, + 1.3875551258028145778301211638e-10, + -2.1218861491906788718519522978e-11, + 3.2821736040381439555133562600e-12, + -5.1260001009953791220611135264e-13, + 8.0713532554874636696982146610e-14, + -1.2798522376569209083811628061e-14, + 2.0417711600852502310258808643e-15, + -3.2745239502992355776882614137e-16, + 5.2759418422036579482120897453e-17, + -8.5354147151695233960425725513e-18, + 1.3858639703888078291599886143e-18, + -2.2574398807738626571560124396e-19 +}; +static const cheb_series gamma_5_10_cs = { + gamma_5_10_data, + 23, + -1, 1, + 11 +}; + + +/* gamma(x) for x >= 1/2 + * assumes x >= 1/2 + */ +static +int +gamma_xgthalf(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.5) { + result->val = 1.77245385090551602729817; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } else if (x <= (GSL_SF_FACT_NMAX + 1.0) && x == floor(x)) { + int n = (int) floor (x); + result->val = fact_table[n - 1].f; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(fabs(x - 1.0) < 0.01) { + /* Use series for Gamma[1+eps] - 1/(1+eps). + */ + const double eps = x - 1.0; + const double c1 = 0.4227843350984671394; + const double c2 = -0.01094400467202744461; + const double c3 = 0.09252092391911371098; + const double c4 = -0.018271913165599812664; + const double c5 = 0.018004931096854797895; + const double c6 = -0.006850885378723806846; + const double c7 = 0.003998239557568466030; + result->val = 1.0/x + eps*(c1+eps*(c2+eps*(c3+eps*(c4+eps*(c5+eps*(c6+eps*c7)))))); + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(fabs(x - 2.0) < 0.01) { + /* Use series for Gamma[1 + eps]. + */ + const double eps = x - 2.0; + const double c1 = 0.4227843350984671394; + const double c2 = 0.4118403304264396948; + const double c3 = 0.08157691924708626638; + const double c4 = 0.07424901075351389832; + const double c5 = -0.00026698206874501476832; + const double c6 = 0.011154045718130991049; + const double c7 = -0.002852645821155340816; + const double c8 = 0.0021039333406973880085; + result->val = 1.0 + eps*(c1+eps*(c2+eps*(c3+eps*(c4+eps*(c5+eps*(c6+eps*(c7+eps*c8))))))); + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 5.0) { + /* Exponentiating the logarithm is fine, as + * long as the exponential is not so large + * that it greatly amplifies the error. + */ + gsl_sf_result lg; + lngamma_lanczos(x, &lg); + result->val = exp(lg.val); + result->err = result->val * (lg.err + 2.0 * GSL_DBL_EPSILON); + return GSL_SUCCESS; + } + else if(x < 10.0) { + /* This is a sticky area. The logarithm + * is too large and the gammastar series + * is not good. + */ + const double gamma_8 = 5040.0; + const double t = (2.0*x - 15.0)/5.0; + gsl_sf_result c; + cheb_eval_e(&gamma_5_10_cs, t, &c); + result->val = exp(c.val) * gamma_8; + result->err = result->val * c.err; + result->err += 2.0 * GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x < GSL_SF_GAMMA_XMAX) { + /* We do not want to exponentiate the logarithm + * if x is large because of the inevitable + * inflation of the error. So we carefully + * use pow() and exp() with exact quantities. + */ + double p = pow(x, 0.5*x); + double e = exp(-x); + double q = (p * e) * p; + double pre = M_SQRT2 * M_SQRTPI * q/sqrt(x); + gsl_sf_result gstar; + int stat_gs = gammastar_ser(x, &gstar); + result->val = pre * gstar.val; + result->err = (x + 2.5) * GSL_DBL_EPSILON * result->val; + return stat_gs; + } + else { + OVERFLOW_ERROR(result); + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int gsl_sf_lngamma_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(fabs(x - 1.0) < 0.01) { + /* Note that we must amplify the errors + * from the Pade evaluations because of + * the way we must pass the argument, i.e. + * writing (1-x) is a loss of precision + * when x is near 1. + */ + int stat = lngamma_1_pade(x - 1.0, result); + result->err *= 1.0/(GSL_DBL_EPSILON + fabs(x - 1.0)); + return stat; + } + else if(fabs(x - 2.0) < 0.01) { + int stat = lngamma_2_pade(x - 2.0, result); + result->err *= 1.0/(GSL_DBL_EPSILON + fabs(x - 2.0)); + return stat; + } + else if(x >= 0.5) { + return lngamma_lanczos(x, result); + } + else if(x == 0.0) { + DOMAIN_ERROR(result); + } + else if(fabs(x) < 0.02) { + double sgn; + return lngamma_sgn_0(x, result, &sgn); + } + else if(x > -0.5/(GSL_DBL_EPSILON*M_PI)) { + /* Try to extract a fractional + * part from x. + */ + double z = 1.0 - x; + double s = sin(M_PI*z); + double as = fabs(s); + if(s == 0.0) { + DOMAIN_ERROR(result); + } + else if(as < M_PI*0.015) { + /* x is near a negative integer, -N */ + if(x < INT_MIN + 2.0) { + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EROUND); + } + else { + int N = -(int)(x - 0.5); + double eps = x + N; + double sgn; + return lngamma_sgn_sing(N, eps, result, &sgn); + } + } + else { + gsl_sf_result lg_z; + lngamma_lanczos(z, &lg_z); + result->val = M_LNPI - (log(as) + lg_z.val); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + lg_z.err; + return GSL_SUCCESS; + } + } + else { + /* |x| was too large to extract any fractional part */ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EROUND); + } +} + + +int gsl_sf_lngamma_sgn_e(double x, gsl_sf_result * result_lg, double * sgn) +{ + if(fabs(x - 1.0) < 0.01) { + int stat = lngamma_1_pade(x - 1.0, result_lg); + result_lg->err *= 1.0/(GSL_DBL_EPSILON + fabs(x - 1.0)); + *sgn = 1.0; + return stat; + } + else if(fabs(x - 2.0) < 0.01) { + int stat = lngamma_2_pade(x - 2.0, result_lg); + result_lg->err *= 1.0/(GSL_DBL_EPSILON + fabs(x - 2.0)); + *sgn = 1.0; + return stat; + } + else if(x >= 0.5) { + *sgn = 1.0; + return lngamma_lanczos(x, result_lg); + } + else if(x == 0.0) { + *sgn = 0.0; + DOMAIN_ERROR(result_lg); + } + else if(fabs(x) < 0.02) { + return lngamma_sgn_0(x, result_lg, sgn); + } + else if(x > -0.5/(GSL_DBL_EPSILON*M_PI)) { + /* Try to extract a fractional + * part from x. + */ + double z = 1.0 - x; + double s = sin(M_PI*x); + double as = fabs(s); + if(s == 0.0) { + *sgn = 0.0; + DOMAIN_ERROR(result_lg); + } + else if(as < M_PI*0.015) { + /* x is near a negative integer, -N */ + if(x < INT_MIN + 2.0) { + result_lg->val = 0.0; + result_lg->err = 0.0; + *sgn = 0.0; + GSL_ERROR ("error", GSL_EROUND); + } + else { + int N = -(int)(x - 0.5); + double eps = x + N; + return lngamma_sgn_sing(N, eps, result_lg, sgn); + } + } + else { + gsl_sf_result lg_z; + lngamma_lanczos(z, &lg_z); + *sgn = (s > 0.0 ? 1.0 : -1.0); + result_lg->val = M_LNPI - (log(as) + lg_z.val); + result_lg->err = 2.0 * GSL_DBL_EPSILON * fabs(result_lg->val) + lg_z.err; + return GSL_SUCCESS; + } + } + else { + /* |x| was too large to extract any fractional part */ + result_lg->val = 0.0; + result_lg->err = 0.0; + *sgn = 0.0; + GSL_ERROR ("x too large to extract fraction part", GSL_EROUND); + } +} + + +int +gsl_sf_gamma_e(const double x, gsl_sf_result * result) +{ + if(x < 0.5) { + int rint_x = (int)floor(x+0.5); + double f_x = x - rint_x; + double sgn_gamma = ( GSL_IS_EVEN(rint_x) ? 1.0 : -1.0 ); + double sin_term = sgn_gamma * sin(M_PI * f_x) / M_PI; + + if(sin_term == 0.0) { + DOMAIN_ERROR(result); + } + else if(x > -169.0) { + gsl_sf_result g; + gamma_xgthalf(1.0-x, &g); + if(fabs(sin_term) * g.val * GSL_DBL_MIN < 1.0) { + result->val = 1.0/(sin_term * g.val); + result->err = fabs(g.err/g.val) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } + } + else { + /* It is hard to control it here. + * We can only exponentiate the + * logarithm and eat the loss of + * precision. + */ + gsl_sf_result lng; + double sgn; + int stat_lng = gsl_sf_lngamma_sgn_e(x, &lng, &sgn); + int stat_e = gsl_sf_exp_mult_err_e(lng.val, lng.err, sgn, 0.0, result); + return GSL_ERROR_SELECT_2(stat_e, stat_lng); + } + } + else { + return gamma_xgthalf(x, result); + } +} + + +int +gsl_sf_gammastar_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 0.5) { + gsl_sf_result lg; + const int stat_lg = gsl_sf_lngamma_e(x, &lg); + const double lx = log(x); + const double c = 0.5*(M_LN2+M_LNPI); + const double lnr_val = lg.val - (x-0.5)*lx + x - c; + const double lnr_err = lg.err + 2.0 * GSL_DBL_EPSILON *((x+0.5)*fabs(lx) + c); + const int stat_e = gsl_sf_exp_err_e(lnr_val, lnr_err, result); + return GSL_ERROR_SELECT_2(stat_lg, stat_e); + } + else if(x < 2.0) { + const double t = 4.0/3.0*(x-0.5) - 1.0; + return cheb_eval_e(&gstar_a_cs, t, result); + } + else if(x < 10.0) { + const double t = 0.25*(x-2.0) - 1.0; + gsl_sf_result c; + cheb_eval_e(&gstar_b_cs, t, &c); + result->val = c.val/(x*x) + 1.0 + 1.0/(12.0*x); + result->err = c.err/(x*x); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 1.0/GSL_ROOT4_DBL_EPSILON) { + return gammastar_ser(x, result); + } + else if(x < 1.0/GSL_DBL_EPSILON) { + /* Use Stirling formula for Gamma(x). + */ + const double xi = 1.0/x; + result->val = 1.0 + xi/12.0*(1.0 + xi/24.0*(1.0 - xi*(139.0/180.0 + 571.0/8640.0*xi))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = 1.0; + result->err = 1.0/x; + return GSL_SUCCESS; + } +} + + +int +gsl_sf_gammainv_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if (x <= 0.0 && x == floor(x)) { /* negative integer */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } else if(x < 0.5) { + gsl_sf_result lng; + double sgn; + int stat_lng = gsl_sf_lngamma_sgn_e(x, &lng, &sgn); + if(stat_lng == GSL_EDOM) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(stat_lng != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + return stat_lng; + } + else { + return gsl_sf_exp_mult_err_e(-lng.val, lng.err, sgn, 0.0, result); + } + } + else { + gsl_sf_result g; + int stat_g = gamma_xgthalf(x, &g); + if(stat_g == GSL_EOVRFLW) { + UNDERFLOW_ERROR(result); + } + else { + result->val = 1.0/g.val; + result->err = fabs(g.err/g.val) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + } +} + + +int +gsl_sf_lngamma_complex_e(double zr, double zi, gsl_sf_result * lnr, gsl_sf_result * arg) +{ + if(zr <= 0.5) { + /* Transform to right half plane using reflection; + * in fact we do a little better by stopping at 1/2. + */ + double x = 1.0-zr; + double y = -zi; + gsl_sf_result a, b; + gsl_sf_result lnsin_r, lnsin_i; + + int stat_l = lngamma_lanczos_complex(x, y, &a, &b); + int stat_s = gsl_sf_complex_logsin_e(M_PI*zr, M_PI*zi, &lnsin_r, &lnsin_i); + + if(stat_s == GSL_SUCCESS) { + int stat_r; + lnr->val = M_LNPI - lnsin_r.val - a.val; + lnr->err = lnsin_r.err + a.err + 2.0 * GSL_DBL_EPSILON * fabs(lnr->val); + arg->val = -lnsin_i.val - b.val; + arg->err = lnsin_i.err + b.err + 2.0 * GSL_DBL_EPSILON * fabs(arg->val); + stat_r = gsl_sf_angle_restrict_symm_e(&(arg->val)); + return GSL_ERROR_SELECT_2(stat_r, stat_l); + } + else { + DOMAIN_ERROR_2(lnr,arg); + } + } + else { + /* otherwise plain vanilla Lanczos */ + return lngamma_lanczos_complex(zr, zi, lnr, arg); + } +} + + +int gsl_sf_taylorcoeff_e(const int n, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < 0.0 || n < 0) { + DOMAIN_ERROR(result); + } + else if(n == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n == 1) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + const double log2pi = M_LNPI + M_LN2; + const double ln_test = n*(log(x)+1.0) + 1.0 - (n+0.5)*log(n+1.0) + 0.5*log2pi; + + if(ln_test < GSL_LOG_DBL_MIN+1.0) { + UNDERFLOW_ERROR(result); + } + else if(ln_test > GSL_LOG_DBL_MAX-1.0) { + OVERFLOW_ERROR(result); + } + else { + double product = 1.0; + int k; + for(k=1; k<=n; k++) { + product *= (x/k); + } + result->val = product; + result->err = n * GSL_DBL_EPSILON * product; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_fact_e(const unsigned int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n < 18) { + result->val = fact_table[n].f; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n <= GSL_SF_FACT_NMAX){ + result->val = fact_table[n].f; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_doublefact_e(const unsigned int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n < 26) { + result->val = doub_fact_table[n].f; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n <= GSL_SF_DOUBLEFACT_NMAX){ + result->val = doub_fact_table[n].f; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } +} + + +int gsl_sf_lnfact_e(const unsigned int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n <= GSL_SF_FACT_NMAX){ + result->val = log(fact_table[n].f); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_lngamma_e(n+1.0, result); + return GSL_SUCCESS; + } +} + + +int gsl_sf_lndoublefact_e(const unsigned int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n <= GSL_SF_DOUBLEFACT_NMAX){ + result->val = log(doub_fact_table[n].f); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(GSL_IS_ODD(n)) { + gsl_sf_result lg; + gsl_sf_lngamma_e(0.5*(n+2.0), &lg); + result->val = 0.5*(n+1.0) * M_LN2 - 0.5*M_LNPI + lg.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + lg.err; + return GSL_SUCCESS; + } + else { + gsl_sf_result lg; + gsl_sf_lngamma_e(0.5*n+1.0, &lg); + result->val = 0.5*n*M_LN2 + lg.val; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + lg.err; + return GSL_SUCCESS; + } +} + + +int gsl_sf_lnchoose_e(unsigned int n, unsigned int m, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(m > n) { + DOMAIN_ERROR(result); + } + else if(m == n || m == 0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result nf; + gsl_sf_result mf; + gsl_sf_result nmmf; + if(m*2 > n) m = n-m; + gsl_sf_lnfact_e(n, &nf); + gsl_sf_lnfact_e(m, &mf); + gsl_sf_lnfact_e(n-m, &nmmf); + result->val = nf.val - mf.val - nmmf.val; + result->err = nf.err + mf.err + nmmf.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_choose_e(unsigned int n, unsigned int m, gsl_sf_result * result) +{ + if(m > n) { + DOMAIN_ERROR(result); + } + else if(m == n || m == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if (n <= GSL_SF_FACT_NMAX) { + result->val = (fact_table[n].f / fact_table[m].f) / fact_table[n-m].f; + result->err = 6.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } else { + if(m*2 < n) m = n-m; + + if (n - m < 64) /* compute product for a manageable number of terms */ + { + double prod = 1.0; + unsigned int k; + + for(k=n; k>=m+1; k--) { + double tk = (double)k / (double)(k-m); + if(tk > GSL_DBL_MAX/prod) { + OVERFLOW_ERROR(result); + } + prod *= tk; + } + result->val = prod; + result->err = 2.0 * GSL_DBL_EPSILON * prod * fabs(n-m); + return GSL_SUCCESS; + } + else + { + gsl_sf_result lc; + const int stat_lc = gsl_sf_lnchoose_e (n, m, &lc); + const int stat_e = gsl_sf_exp_err_e(lc.val, lc.err, result); + return GSL_ERROR_SELECT_2(stat_lc, stat_e); + } + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_fact(const unsigned int n) +{ + EVAL_RESULT(gsl_sf_fact_e(n, &result)); +} + +double gsl_sf_lnfact(const unsigned int n) +{ + EVAL_RESULT(gsl_sf_lnfact_e(n, &result)); +} + +double gsl_sf_doublefact(const unsigned int n) +{ + EVAL_RESULT(gsl_sf_doublefact_e(n, &result)); +} + +double gsl_sf_lndoublefact(const unsigned int n) +{ + EVAL_RESULT(gsl_sf_lndoublefact_e(n, &result)); +} + +double gsl_sf_lngamma(const double x) +{ + EVAL_RESULT(gsl_sf_lngamma_e(x, &result)); +} + +double gsl_sf_gamma(const double x) +{ + EVAL_RESULT(gsl_sf_gamma_e(x, &result)); +} + +double gsl_sf_gammastar(const double x) +{ + EVAL_RESULT(gsl_sf_gammastar_e(x, &result)); +} + +double gsl_sf_gammainv(const double x) +{ + EVAL_RESULT(gsl_sf_gammainv_e(x, &result)); +} + +double gsl_sf_taylorcoeff(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_taylorcoeff_e(n, x, &result)); +} + +double gsl_sf_choose(unsigned int n, unsigned int m) +{ + EVAL_RESULT(gsl_sf_choose_e(n, m, &result)); +} + +double gsl_sf_lnchoose(unsigned int n, unsigned int m) +{ + EVAL_RESULT(gsl_sf_lnchoose_e(n, m, &result)); +} diff --git a/software/gsl-1.15/specfunc/gamma_inc.c b/software/gsl-1.15/specfunc/gamma_inc.c new file mode 100644 index 000000000..990275166 --- /dev/null +++ b/software/gsl-1.15/specfunc/gamma_inc.c @@ -0,0 +1,721 @@ +/* specfunc/gamma_inc.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +/* The dominant part, + * D(a,x) := x^a e^(-x) / Gamma(a+1) + */ +static +int +gamma_inc_D(const double a, const double x, gsl_sf_result * result) +{ + if(a < 10.0) { + double lnr; + gsl_sf_result lg; + gsl_sf_lngamma_e(a+1.0, &lg); + lnr = a * log(x) - x - lg.val; + result->val = exp(lnr); + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(lnr) + 1.0) * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result gstar; + gsl_sf_result ln_term; + double term1; + if (x < 0.5*a) { + double u = x/a; + double ln_u = log(u); + ln_term.val = ln_u - u + 1.0; + ln_term.err = (fabs(ln_u) + fabs(u) + 1.0) * GSL_DBL_EPSILON; + } else { + double mu = (x-a)/a; + gsl_sf_log_1plusx_mx_e(mu, &ln_term); /* log(1+mu) - mu */ + /* Propagate cancellation error from x-a, since the absolute + error of mu=x-a is DBL_EPSILON */ + ln_term.err += GSL_DBL_EPSILON * fabs(mu); + }; + gsl_sf_gammastar_e(a, &gstar); + term1 = exp(a*ln_term.val)/sqrt(2.0*M_PI*a); + result->val = term1/gstar.val; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(a*ln_term.val) + 1.0) * fabs(result->val); + /* Include propagated error from log term */ + result->err += fabs(a) * ln_term.err * fabs(result->val); + result->err += gstar.err/fabs(gstar.val) * fabs(result->val); + return GSL_SUCCESS; + } + +} + + +/* P series representation. + */ +static +int +gamma_inc_P_series(const double a, const double x, gsl_sf_result * result) +{ + const int nmax = 10000; + + gsl_sf_result D; + int stat_D = gamma_inc_D(a, x, &D); + + /* Approximating the terms of the series using Stirling's + approximation gives t_n = (x/a)^n * exp(-n(n+1)/(2a)), so the + convergence condition is n^2 / (2a) + (1-(x/a) + (1/2a)) n >> + -log(GSL_DBL_EPS) if we want t_n < O(1e-16) t_0. The condition + below detects cases where the minimum value of n is > 5000 */ + + if (x > 0.995 * a && a > 1e5) { /* Difficult case: try continued fraction */ + gsl_sf_result cf_res; + int status = gsl_sf_exprel_n_CF_e(a, x, &cf_res); + result->val = D.val * cf_res.val; + result->err = fabs(D.val * cf_res.err) + fabs(D.err * cf_res.val); + return status; + } + + /* Series would require excessive number of terms */ + + if (x > (a + nmax)) { + GSL_ERROR ("gamma_inc_P_series x>>a exceeds range", GSL_EMAXITER); + } + + /* Normal case: sum the series */ + + { + double sum = 1.0; + double term = 1.0; + double remainder; + int n; + + /* Handle lower part of the series where t_n is increasing, |x| > a+n */ + + int nlow = (x > a) ? (x - a): 0; + + for(n=1; n < nlow; n++) { + term *= x/(a+n); + sum += term; + } + + /* Handle upper part of the series where t_n is decreasing, |x| < a+n */ + + for (/* n = previous n */ ; nval = D.val * sum; + result->err = D.err * fabs(sum) + fabs(D.val * remainder); + result->err += (1.0 + n) * GSL_DBL_EPSILON * fabs(result->val); + + if(n == nmax && fabs(remainder/sum) > GSL_SQRT_DBL_EPSILON) + GSL_ERROR ("gamma_inc_P_series failed to converge", GSL_EMAXITER); + else + return stat_D; + } +} + + +/* Q large x asymptotic + */ +static +int +gamma_inc_Q_large_x(const double a, const double x, gsl_sf_result * result) +{ + const int nmax = 5000; + + gsl_sf_result D; + const int stat_D = gamma_inc_D(a, x, &D); + + double sum = 1.0; + double term = 1.0; + double last = 1.0; + int n; + for(n=1; n 1.0) break; + if(fabs(term/sum) < GSL_DBL_EPSILON) break; + sum += term; + last = term; + } + + result->val = D.val * (a/x) * sum; + result->err = D.err * fabs((a/x) * sum); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + if(n == nmax) + GSL_ERROR ("error in large x asymptotic", GSL_EMAXITER); + else + return stat_D; +} + + +/* Uniform asymptotic for x near a, a and x large. + * See [Temme, p. 285] + */ +static +int +gamma_inc_Q_asymp_unif(const double a, const double x, gsl_sf_result * result) +{ + const double rta = sqrt(a); + const double eps = (x-a)/a; + + gsl_sf_result ln_term; + const int stat_ln = gsl_sf_log_1plusx_mx_e(eps, &ln_term); /* log(1+eps) - eps */ + const double eta = GSL_SIGN(eps) * sqrt(-2.0*ln_term.val); + + gsl_sf_result erfc; + + double R; + double c0, c1; + + /* This used to say erfc(eta*M_SQRT2*rta), which is wrong. + * The sqrt(2) is in the denominator. Oops. + * Fixed: [GJ] Mon Nov 15 13:25:32 MST 2004 + */ + gsl_sf_erfc_e(eta*rta/M_SQRT2, &erfc); + + if(fabs(eps) < GSL_ROOT5_DBL_EPSILON) { + c0 = -1.0/3.0 + eps*(1.0/12.0 - eps*(23.0/540.0 - eps*(353.0/12960.0 - eps*589.0/30240.0))); + c1 = -1.0/540.0 - eps/288.0; + } + else { + const double rt_term = sqrt(-2.0 * ln_term.val/(eps*eps)); + const double lam = x/a; + c0 = (1.0 - 1.0/rt_term)/eps; + c1 = -(eta*eta*eta * (lam*lam + 10.0*lam + 1.0) - 12.0 * eps*eps*eps) / (12.0 * eta*eta*eta*eps*eps*eps); + } + + R = exp(-0.5*a*eta*eta)/(M_SQRT2*M_SQRTPI*rta) * (c0 + c1/a); + + result->val = 0.5 * erfc.val + R; + result->err = GSL_DBL_EPSILON * fabs(R * 0.5 * a*eta*eta) + 0.5 * erfc.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return stat_ln; +} + + +/* Continued fraction which occurs in evaluation + * of Q(a,x) or Gamma(a,x). + * + * 1 (1-a)/x 1/x (2-a)/x 2/x (3-a)/x + * F(a,x) = ---- ------- ----- -------- ----- -------- ... + * 1 + 1 + 1 + 1 + 1 + 1 + + * + * Hans E. Plesser, 2002-01-22 (hans dot plesser at itf dot nlh dot no). + * + * Split out from gamma_inc_Q_CF() by GJ [Tue Apr 1 13:16:41 MST 2003]. + * See gamma_inc_Q_CF() below. + * + */ +static int +gamma_inc_F_CF(const double a, const double x, gsl_sf_result * result) +{ + const int nmax = 5000; + const double small = gsl_pow_3 (GSL_DBL_EPSILON); + + double hn = 1.0; /* convergent */ + double Cn = 1.0 / small; + double Dn = 1.0; + int n; + + /* n == 1 has a_1, b_1, b_0 independent of a,x, + so that has been done by hand */ + for ( n = 2 ; n < nmax ; n++ ) + { + double an; + double delta; + + if(GSL_IS_ODD(n)) + an = 0.5*(n-1)/x; + else + an = (0.5*n-a)/x; + + Dn = 1.0 + an * Dn; + if ( fabs(Dn) < small ) + Dn = small; + Cn = 1.0 + an/Cn; + if ( fabs(Cn) < small ) + Cn = small; + Dn = 1.0 / Dn; + delta = Cn * Dn; + hn *= delta; + if(fabs(delta-1.0) < GSL_DBL_EPSILON) break; + } + + result->val = hn; + result->err = 2.0*GSL_DBL_EPSILON * fabs(hn); + result->err += GSL_DBL_EPSILON * (2.0 + 0.5*n) * fabs(result->val); + + if(n == nmax) + GSL_ERROR ("error in CF for F(a,x)", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Continued fraction for Q. + * + * Q(a,x) = D(a,x) a/x F(a,x) + * + * Hans E. Plesser, 2002-01-22 (hans dot plesser at itf dot nlh dot no): + * + * Since the Gautschi equivalent series method for CF evaluation may lead + * to singularities, I have replaced it with the modified Lentz algorithm + * given in + * + * I J Thompson and A R Barnett + * Coulomb and Bessel Functions of Complex Arguments and Order + * J Computational Physics 64:490-509 (1986) + * + * In consequence, gamma_inc_Q_CF_protected() is now obsolete and has been + * removed. + * + * Identification of terms between the above equation for F(a, x) and + * the first equation in the appendix of Thompson&Barnett is as follows: + * + * b_0 = 0, b_n = 1 for all n > 0 + * + * a_1 = 1 + * a_n = (n/2-a)/x for n even + * a_n = (n-1)/(2x) for n odd + * + */ +static +int +gamma_inc_Q_CF(const double a, const double x, gsl_sf_result * result) +{ + gsl_sf_result D; + gsl_sf_result F; + const int stat_D = gamma_inc_D(a, x, &D); + const int stat_F = gamma_inc_F_CF(a, x, &F); + + result->val = D.val * (a/x) * F.val; + result->err = D.err * fabs((a/x) * F.val) + fabs(D.val * a/x * F.err); + + return GSL_ERROR_SELECT_2(stat_F, stat_D); +} + + +/* Useful for small a and x. Handles the subtraction analytically. + */ +static +int +gamma_inc_Q_series(const double a, const double x, gsl_sf_result * result) +{ + double term1; /* 1 - x^a/Gamma(a+1) */ + double sum; /* 1 + (a+1)/(a+2)(-x)/2! + (a+1)/(a+3)(-x)^2/3! + ... */ + int stat_sum; + double term2; /* a temporary variable used at the end */ + + { + /* Evaluate series for 1 - x^a/Gamma(a+1), small a + */ + const double pg21 = -2.404113806319188570799476; /* PolyGamma[2,1] */ + const double lnx = log(x); + const double el = M_EULER+lnx; + const double c1 = -el; + const double c2 = M_PI*M_PI/12.0 - 0.5*el*el; + const double c3 = el*(M_PI*M_PI/12.0 - el*el/6.0) + pg21/6.0; + const double c4 = -0.04166666666666666667 + * (-1.758243446661483480 + lnx) + * (-0.764428657272716373 + lnx) + * ( 0.723980571623507657 + lnx) + * ( 4.107554191916823640 + lnx); + const double c5 = -0.0083333333333333333 + * (-2.06563396085715900 + lnx) + * (-1.28459889470864700 + lnx) + * (-0.27583535756454143 + lnx) + * ( 1.33677371336239618 + lnx) + * ( 5.17537282427561550 + lnx); + const double c6 = -0.0013888888888888889 + * (-2.30814336454783200 + lnx) + * (-1.65846557706987300 + lnx) + * (-0.88768082560020400 + lnx) + * ( 0.17043847751371778 + lnx) + * ( 1.92135970115863890 + lnx) + * ( 6.22578557795474900 + lnx); + const double c7 = -0.00019841269841269841 + * (-2.5078657901291800 + lnx) + * (-1.9478900888958200 + lnx) + * (-1.3194837322612730 + lnx) + * (-0.5281322700249279 + lnx) + * ( 0.5913834939078759 + lnx) + * ( 2.4876819633378140 + lnx) + * ( 7.2648160783762400 + lnx); + const double c8 = -0.00002480158730158730 + * (-2.677341544966400 + lnx) + * (-2.182810448271700 + lnx) + * (-1.649350342277400 + lnx) + * (-1.014099048290790 + lnx) + * (-0.191366955370652 + lnx) + * ( 0.995403817918724 + lnx) + * ( 3.041323283529310 + lnx) + * ( 8.295966556941250 + lnx); + const double c9 = -2.75573192239859e-6 + * (-2.8243487670469080 + lnx) + * (-2.3798494322701120 + lnx) + * (-1.9143674728689960 + lnx) + * (-1.3814529102920370 + lnx) + * (-0.7294312810261694 + lnx) + * ( 0.1299079285269565 + lnx) + * ( 1.3873333251885240 + lnx) + * ( 3.5857258865210760 + lnx) + * ( 9.3214237073814600 + lnx); + const double c10 = -2.75573192239859e-7 + * (-2.9540329644556910 + lnx) + * (-2.5491366926991850 + lnx) + * (-2.1348279229279880 + lnx) + * (-1.6741881076349450 + lnx) + * (-1.1325949616098420 + lnx) + * (-0.4590034650618494 + lnx) + * ( 0.4399352987435699 + lnx) + * ( 1.7702236517651670 + lnx) + * ( 4.1231539047474080 + lnx) + * ( 10.342627908148680 + lnx); + + term1 = a*(c1+a*(c2+a*(c3+a*(c4+a*(c5+a*(c6+a*(c7+a*(c8+a*(c9+a*c10))))))))); + } + + { + /* Evaluate the sum. + */ + const int nmax = 5000; + double t = 1.0; + int n; + sum = 1.0; + + for(n=1; nval = term1 + term2; + result->err = GSL_DBL_EPSILON * (fabs(term1) + 2.0*fabs(term2)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_sum; +} + + +/* series for small a and x, but not defined for a == 0 */ +static int +gamma_inc_series(double a, double x, gsl_sf_result * result) +{ + gsl_sf_result Q; + gsl_sf_result G; + const int stat_Q = gamma_inc_Q_series(a, x, &Q); + const int stat_G = gsl_sf_gamma_e(a, &G); + result->val = Q.val * G.val; + result->err = fabs(Q.val * G.err) + fabs(Q.err * G.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_Q, stat_G); +} + + +static int +gamma_inc_a_gt_0(double a, double x, gsl_sf_result * result) +{ + /* x > 0 and a > 0; use result for Q */ + gsl_sf_result Q; + gsl_sf_result G; + const int stat_Q = gsl_sf_gamma_inc_Q_e(a, x, &Q); + const int stat_G = gsl_sf_gamma_e(a, &G); + + result->val = G.val * Q.val; + result->err = fabs(G.val * Q.err) + fabs(G.err * Q.val); + result->err += 2.0*GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_G, stat_Q); +} + + +static int +gamma_inc_CF(double a, double x, gsl_sf_result * result) +{ + gsl_sf_result F; + gsl_sf_result pre; + const double am1lgx = (a-1.0)*log(x); + const int stat_F = gamma_inc_F_CF(a, x, &F); + const int stat_E = gsl_sf_exp_err_e(am1lgx - x, GSL_DBL_EPSILON*fabs(am1lgx), &pre); + + result->val = F.val * pre.val; + result->err = fabs(F.err * pre.val) + fabs(F.val * pre.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_F, stat_E); +} + + +/* evaluate Gamma(0,x), x > 0 */ +#define GAMMA_INC_A_0(x, result) gsl_sf_expint_E1_e(x, result) + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_gamma_inc_Q_e(const double a, const double x, gsl_sf_result * result) +{ + if(a < 0.0 || x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(a == 0.0) + { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x <= 0.5*a) { + /* If the series is quick, do that. It is + * robust and simple. + */ + gsl_sf_result P; + int stat_P = gamma_inc_P_series(a, x, &P); + result->val = 1.0 - P.val; + result->err = P.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_P; + } + else if(a >= 1.0e+06 && (x-a)*(x-a) < a) { + /* Then try the difficult asymptotic regime. + * This is the only way to do this region. + */ + return gamma_inc_Q_asymp_unif(a, x, result); + } + else if(a < 0.2 && x < 5.0) { + /* Cancellations at small a must be handled + * analytically; x should not be too big + * either since the series terms grow + * with x and log(x). + */ + return gamma_inc_Q_series(a, x, result); + } + else if(a <= x) { + if(x <= 1.0e+06) { + /* Continued fraction is excellent for x >~ a. + * We do not let x be too large when x > a since + * it is somewhat pointless to try this there; + * the function is rapidly decreasing for + * x large and x > a, and it will just + * underflow in that region anyway. We + * catch that case in the standard + * large-x method. + */ + return gamma_inc_Q_CF(a, x, result); + } + else { + return gamma_inc_Q_large_x(a, x, result); + } + } + else { + if(x > a - sqrt(a)) { + /* Continued fraction again. The convergence + * is a little slower here, but that is fine. + * We have to trade that off against the slow + * convergence of the series, which is the + * only other option. + */ + return gamma_inc_Q_CF(a, x, result); + } + else { + gsl_sf_result P; + int stat_P = gamma_inc_P_series(a, x, &P); + result->val = 1.0 - P.val; + result->err = P.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_P; + } + } +} + + +int +gsl_sf_gamma_inc_P_e(const double a, const double x, gsl_sf_result * result) +{ + if(a <= 0.0 || x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 20.0 || x < 0.5*a) { + /* Do the easy series cases. Robust and quick. + */ + return gamma_inc_P_series(a, x, result); + } + else if(a > 1.0e+06 && (x-a)*(x-a) < a) { + /* Crossover region. Note that Q and P are + * roughly the same order of magnitude here, + * so the subtraction is stable. + */ + gsl_sf_result Q; + int stat_Q = gamma_inc_Q_asymp_unif(a, x, &Q); + result->val = 1.0 - Q.val; + result->err = Q.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_Q; + } + else if(a <= x) { + /* Q <~ P in this area, so the + * subtractions are stable. + */ + gsl_sf_result Q; + int stat_Q; + if(a > 0.2*x) { + stat_Q = gamma_inc_Q_CF(a, x, &Q); + } + else { + stat_Q = gamma_inc_Q_large_x(a, x, &Q); + } + result->val = 1.0 - Q.val; + result->err = Q.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_Q; + } + else { + if((x-a)*(x-a) < a) { + /* This condition is meant to insure + * that Q is not very close to 1, + * so the subtraction is stable. + */ + gsl_sf_result Q; + int stat_Q = gamma_inc_Q_CF(a, x, &Q); + result->val = 1.0 - Q.val; + result->err = Q.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_Q; + } + else { + return gamma_inc_P_series(a, x, result); + } + } +} + + +int +gsl_sf_gamma_inc_e(const double a, const double x, gsl_sf_result * result) +{ + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + return gsl_sf_gamma_e(a, result); + } + else if(a == 0.0) + { + return GAMMA_INC_A_0(x, result); + } + else if(a > 0.0) + { + return gamma_inc_a_gt_0(a, x, result); + } + else if(x > 0.25) + { + /* continued fraction seems to fail for x too small; otherwise + it is ok, independent of the value of |x/a|, because of the + non-oscillation in the expansion, i.e. the CF is + un-conditionally convergent for a < 0 and x > 0 + */ + return gamma_inc_CF(a, x, result); + } + else if(fabs(a) < 0.5) + { + return gamma_inc_series(a, x, result); + } + else + { + /* a = fa + da; da >= 0 */ + const double fa = floor(a); + const double da = a - fa; + + gsl_sf_result g_da; + const int stat_g_da = ( da > 0.0 ? gamma_inc_a_gt_0(da, x, &g_da) + : GAMMA_INC_A_0(x, &g_da)); + + double alpha = da; + double gax = g_da.val; + + /* Gamma(alpha-1,x) = 1/(alpha-1) (Gamma(a,x) - x^(alpha-1) e^-x) */ + do + { + const double shift = exp(-x + (alpha-1.0)*log(x)); + gax = (gax - shift) / (alpha - 1.0); + alpha -= 1.0; + } while(alpha > a); + + result->val = gax; + result->err = 2.0*(1.0 + fabs(a))*GSL_DBL_EPSILON*fabs(gax); + return stat_g_da; + } + +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_gamma_inc_P(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_gamma_inc_P_e(a, x, &result)); +} + +double gsl_sf_gamma_inc_Q(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_gamma_inc_Q_e(a, x, &result)); +} + +double gsl_sf_gamma_inc(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_gamma_inc_e(a, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/gegenbauer.c b/software/gsl-1.15/specfunc/gegenbauer.c new file mode 100644 index 000000000..95feebad1 --- /dev/null +++ b/software/gsl-1.15/specfunc/gegenbauer.c @@ -0,0 +1,194 @@ +/* specfunc/gegenbauer.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +/* See: [Thompson, Atlas for Computing Mathematical Functions] */ + + +int +gsl_sf_gegenpoly_1_e(double lambda, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(lambda == 0.0) { + result->val = 2.0*x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = 2.0*lambda*x; + result->err = 4.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +int +gsl_sf_gegenpoly_2_e(double lambda, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(lambda == 0.0) { + const double txx = 2.0*x*x; + result->val = -1.0 + txx; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(txx); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = lambda*(-1.0 + 2.0*(1.0+lambda)*x*x); + result->err = GSL_DBL_EPSILON * (2.0 * fabs(result->val) + fabs(lambda)); + return GSL_SUCCESS; + } +} + +int +gsl_sf_gegenpoly_3_e(double lambda, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(lambda == 0.0) { + result->val = x*(-2.0 + 4.0/3.0*x*x); + result->err = GSL_DBL_EPSILON * (2.0 * fabs(result->val) + fabs(x)); + return GSL_SUCCESS; + } + else { + double c = 4.0 + lambda*(6.0 + 2.0*lambda); + result->val = 2.0*lambda * x * ( -1.0 - lambda + c*x*x/3.0 ); + result->err = GSL_DBL_EPSILON * (2.0 * fabs(result->val) + fabs(lambda * x)); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_gegenpoly_n_e(int n, double lambda, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(lambda <= -0.5 || n < 0) { + DOMAIN_ERROR(result); + } + else if(n == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n == 1) { + return gsl_sf_gegenpoly_1_e(lambda, x, result); + } + else if(n == 2) { + return gsl_sf_gegenpoly_2_e(lambda, x, result); + } + else if(n == 3) { + return gsl_sf_gegenpoly_3_e(lambda, x, result); + } + else { + if(lambda == 0.0 && (x >= -1.0 || x <= 1.0)) { + /* 2 T_n(x)/n */ + const double z = n * acos(x); + result->val = 2.0 * cos(z) / n; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(z * result->val); + return GSL_SUCCESS; + } + else { + int k; + gsl_sf_result g2; + gsl_sf_result g3; + int stat_g2 = gsl_sf_gegenpoly_2_e(lambda, x, &g2); + int stat_g3 = gsl_sf_gegenpoly_3_e(lambda, x, &g3); + int stat_g = GSL_ERROR_SELECT_2(stat_g2, stat_g3); + double gkm2 = g2.val; + double gkm1 = g3.val; + double gk = 0.0; + for(k=4; k<=n; k++) { + gk = (2.0*(k+lambda-1.0)*x*gkm1 - (k+2.0*lambda-2.0)*gkm2) / k; + gkm2 = gkm1; + gkm1 = gk; + } + result->val = gk; + result->err = 2.0 * GSL_DBL_EPSILON * 0.5 * n * fabs(gk); + return stat_g; + } + } +} + + +int +gsl_sf_gegenpoly_array(int nmax, double lambda, double x, double * result_array) +{ + int k; + + /* CHECK_POINTER(result_array) */ + + if(lambda <= -0.5 || nmax < 0) { + GSL_ERROR("domain error", GSL_EDOM); + } + + /* n == 0 */ + result_array[0] = 1.0; + if(nmax == 0) return GSL_SUCCESS; + + /* n == 1 */ + if(lambda == 0.0) + result_array[1] = 2.0*x; + else + result_array[1] = 2.0*lambda*x; + + /* n <= nmax */ + for(k=2; k<=nmax; k++) { + double term1 = 2.0*(k+lambda-1.0) * x * result_array[k-1]; + double term2 = (k+2.0*lambda-2.0) * result_array[k-2]; + result_array[k] = (term1 - term2) / k; + } + + return GSL_SUCCESS; +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_gegenpoly_1(double lambda, double x) +{ + EVAL_RESULT(gsl_sf_gegenpoly_1_e(lambda, x, &result)); +} + +double gsl_sf_gegenpoly_2(double lambda, double x) +{ + EVAL_RESULT(gsl_sf_gegenpoly_2_e(lambda, x, &result)); +} + +double gsl_sf_gegenpoly_3(double lambda, double x) +{ + EVAL_RESULT(gsl_sf_gegenpoly_3_e(lambda, x, &result)); +} + +double gsl_sf_gegenpoly_n(int n, double lambda, double x) +{ + EVAL_RESULT(gsl_sf_gegenpoly_n_e(n, lambda, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/gsl_sf.h b/software/gsl-1.15/specfunc/gsl_sf.h new file mode 100644 index 000000000..643cf3415 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf.h @@ -0,0 +1,39 @@ +/* Author: G. Jungman */ + +#ifndef __GSL_SF_H__ +#define __GSL_SF_H__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif /* __GSL_SF_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_airy.h b/software/gsl-1.15/specfunc/gsl_sf_airy.h new file mode 100644 index 000000000..703338306 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_airy.h @@ -0,0 +1,139 @@ +/* specfunc/gsl_sf_airy.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_AIRY_H__ +#define __GSL_SF_AIRY_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Airy function Ai(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_airy_Ai_e(const double x, const gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Ai(const double x, gsl_mode_t mode); + + +/* Airy function Bi(x) + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_airy_Bi_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Bi(const double x, gsl_mode_t mode); + + +/* scaled Ai(x): + * Ai(x) x < 0 + * exp(+2/3 x^{3/2}) Ai(x) x > 0 + * + * exceptions: none + */ +int gsl_sf_airy_Ai_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Ai_scaled(const double x, gsl_mode_t mode); + + +/* scaled Bi(x): + * Bi(x) x < 0 + * exp(-2/3 x^{3/2}) Bi(x) x > 0 + * + * exceptions: none + */ +int gsl_sf_airy_Bi_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Bi_scaled(const double x, gsl_mode_t mode); + + +/* derivative Ai'(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_airy_Ai_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Ai_deriv(const double x, gsl_mode_t mode); + + +/* derivative Bi'(x) + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_airy_Bi_deriv_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Bi_deriv(const double x, gsl_mode_t mode); + + +/* scaled derivative Ai'(x): + * Ai'(x) x < 0 + * exp(+2/3 x^{3/2}) Ai'(x) x > 0 + * + * exceptions: none + */ +int gsl_sf_airy_Ai_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Ai_deriv_scaled(const double x, gsl_mode_t mode); + + +/* scaled derivative: + * Bi'(x) x < 0 + * exp(-2/3 x^{3/2}) Bi'(x) x > 0 + * + * exceptions: none + */ +int gsl_sf_airy_Bi_deriv_scaled_e(const double x, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_airy_Bi_deriv_scaled(const double x, gsl_mode_t mode); + + +/* Zeros of Ai(x) + */ +int gsl_sf_airy_zero_Ai_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_airy_zero_Ai(unsigned int s); + + +/* Zeros of Bi(x) + */ +int gsl_sf_airy_zero_Bi_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_airy_zero_Bi(unsigned int s); + + +/* Zeros of Ai'(x) + */ +int gsl_sf_airy_zero_Ai_deriv_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_airy_zero_Ai_deriv(unsigned int s); + + +/* Zeros of Bi'(x) + */ +int gsl_sf_airy_zero_Bi_deriv_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_airy_zero_Bi_deriv(unsigned int s); + + +__END_DECLS + +#endif /* __GSL_SF_AIRY_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_bessel.h b/software/gsl-1.15/specfunc/gsl_sf_bessel.h new file mode 100644 index 000000000..d72957aeb --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_bessel.h @@ -0,0 +1,549 @@ +/* specfunc/gsl_sf_bessel.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_BESSEL_H__ +#define __GSL_SF_BESSEL_H__ + +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Regular Bessel Function J_0(x) + * + * exceptions: none + */ +int gsl_sf_bessel_J0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_J0(const double x); + + +/* Regular Bessel Function J_1(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_J1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_J1(const double x); + + +/* Regular Bessel Function J_n(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_Jn_e(int n, double x, gsl_sf_result * result); +double gsl_sf_bessel_Jn(const int n, const double x); + + +/* Regular Bessel Function J_n(x), nmin <= n <= nmax + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Jn_array(int nmin, int nmax, double x, double * result_array); + + +/* Irregular Bessel function Y_0(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Y0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_Y0(const double x); + + +/* Irregular Bessel function Y_1(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Y1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_Y1(const double x); + + +/* Irregular Bessel function Y_n(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Yn_e(int n,const double x, gsl_sf_result * result); +double gsl_sf_bessel_Yn(const int n,const double x); + + +/* Irregular Bessel function Y_n(x), nmin <= n <= nmax + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Yn_array(const int nmin, const int nmax, const double x, double * result_array); + + +/* Regular modified Bessel function I_0(x) + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_bessel_I0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_I0(const double x); + + +/* Regular modified Bessel function I_1(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_I1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_I1(const double x); + + +/* Regular modified Bessel function I_n(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_In_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_bessel_In(const int n, const double x); + + +/* Regular modified Bessel function I_n(x) for n=nmin,...,nmax + * + * nmin >=0, nmax >= nmin + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_In_array(const int nmin, const int nmax, const double x, double * result_array); + + +/* Scaled regular modified Bessel function + * exp(-|x|) I_0(x) + * + * exceptions: none + */ +int gsl_sf_bessel_I0_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_I0_scaled(const double x); + + +/* Scaled regular modified Bessel function + * exp(-|x|) I_1(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_I1_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_I1_scaled(const double x); + + +/* Scaled regular modified Bessel function + * exp(-|x|) I_n(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_In_scaled_e(int n, const double x, gsl_sf_result * result); +double gsl_sf_bessel_In_scaled(const int n, const double x); + + +/* Scaled regular modified Bessel function + * exp(-|x|) I_n(x) for n=nmin,...,nmax + * + * nmin >=0, nmax >= nmin + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_In_scaled_array(const int nmin, const int nmax, const double x, double * result_array); + + +/* Irregular modified Bessel function K_0(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_K0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_K0(const double x); + + +/* Irregular modified Bessel function K_1(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_K1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_K1(const double x); + + +/* Irregular modified Bessel function K_n(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Kn_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_bessel_Kn(const int n, const double x); + + +/* Irregular modified Bessel function K_n(x) for n=nmin,...,nmax + * + * x > 0.0, nmin >=0, nmax >= nmin + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Kn_array(const int nmin, const int nmax, const double x, double * result_array); + + +/* Scaled irregular modified Bessel function + * exp(x) K_0(x) + * + * x > 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_bessel_K0_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_K0_scaled(const double x); + + +/* Scaled irregular modified Bessel function + * exp(x) K_1(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_K1_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_K1_scaled(const double x); + + +/* Scaled irregular modified Bessel function + * exp(x) K_n(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Kn_scaled_e(int n, const double x, gsl_sf_result * result); +double gsl_sf_bessel_Kn_scaled(const int n, const double x); + + +/* Scaled irregular modified Bessel function exp(x) K_n(x) for n=nmin,...,nmax + * + * x > 0.0, nmin >=0, nmax >= nmin + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Kn_scaled_array(const int nmin, const int nmax, const double x, double * result_array); + + +/* Regular spherical Bessel function j_0(x) = sin(x)/x + * + * exceptions: none + */ +int gsl_sf_bessel_j0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_j0(const double x); + + +/* Regular spherical Bessel function j_1(x) = (sin(x)/x - cos(x))/x + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_j1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_j1(const double x); + + +/* Regular spherical Bessel function j_2(x) = ((3/x^2 - 1)sin(x) - 3cos(x)/x)/x + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_j2_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_j2(const double x); + + +/* Regular spherical Bessel function j_l(x) + * + * l >= 0, x >= 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_jl_e(const int l, const double x, gsl_sf_result * result); +double gsl_sf_bessel_jl(const int l, const double x); + + +/* Regular spherical Bessel function j_l(x) for l=0,1,...,lmax + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_jl_array(const int lmax, const double x, double * result_array); + + +/* Regular spherical Bessel function j_l(x) for l=0,1,...,lmax + * Uses Steed's method. + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_jl_steed_array(const int lmax, const double x, double * jl_x_array); + + +/* Irregular spherical Bessel function y_0(x) + * + * exceptions: none + */ +int gsl_sf_bessel_y0_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_y0(const double x); + + +/* Irregular spherical Bessel function y_1(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_y1_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_y1(const double x); + + +/* Irregular spherical Bessel function y_2(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_y2_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_y2(const double x); + + +/* Irregular spherical Bessel function y_l(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_yl_e(int l, const double x, gsl_sf_result * result); +double gsl_sf_bessel_yl(const int l, const double x); + + +/* Irregular spherical Bessel function y_l(x) for l=0,1,...,lmax + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_yl_array(const int lmax, const double x, double * result_array); + + +/* Regular scaled modified spherical Bessel function + * + * Exp[-|x|] i_0(x) + * + * exceptions: none + */ +int gsl_sf_bessel_i0_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_i0_scaled(const double x); + + +/* Regular scaled modified spherical Bessel function + * + * Exp[-|x|] i_1(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_i1_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_i1_scaled(const double x); + + +/* Regular scaled modified spherical Bessel function + * + * Exp[-|x|] i_2(x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_i2_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_i2_scaled(const double x); + + +/* Regular scaled modified spherical Bessel functions + * + * Exp[-|x|] i_l(x) + * + * i_l(x) = Sqrt[Pi/(2x)] BesselI[l+1/2,x] + * + * l >= 0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_il_scaled_e(const int l, double x, gsl_sf_result * result); +double gsl_sf_bessel_il_scaled(const int l, const double x); + + +/* Regular scaled modified spherical Bessel functions + * + * Exp[-|x|] i_l(x) + * for l=0,1,...,lmax + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_bessel_il_scaled_array(const int lmax, const double x, double * result_array); + + +/* Irregular scaled modified spherical Bessel function + * Exp[x] k_0(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_k0_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_k0_scaled(const double x); + + +/* Irregular modified spherical Bessel function + * Exp[x] k_1(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_bessel_k1_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_k1_scaled(const double x); + + +/* Irregular modified spherical Bessel function + * Exp[x] k_2(x) + * + * x > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_bessel_k2_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_bessel_k2_scaled(const double x); + + +/* Irregular modified spherical Bessel function + * Exp[x] k_l[x] + * + * k_l(x) = Sqrt[Pi/(2x)] BesselK[l+1/2,x] + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_kl_scaled_e(int l, const double x, gsl_sf_result * result); +double gsl_sf_bessel_kl_scaled(const int l, const double x); + + +/* Irregular scaled modified spherical Bessel function + * Exp[x] k_l(x) + * + * for l=0,1,...,lmax + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_kl_scaled_array(const int lmax, const double x, double * result_array); + + +/* Regular cylindrical Bessel function J_nu(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Jnu_e(const double nu, const double x, gsl_sf_result * result); +double gsl_sf_bessel_Jnu(const double nu, const double x); + + +/* Irregular cylindrical Bessel function Y_nu(x) + * + * exceptions: + */ +int gsl_sf_bessel_Ynu_e(double nu, double x, gsl_sf_result * result); +double gsl_sf_bessel_Ynu(const double nu, const double x); + + +/* Regular cylindrical Bessel function J_nu(x) + * evaluated at a series of x values. The array + * contains the x values. They are assumed to be + * strictly ordered and positive. The array is + * over-written with the values of J_nu(x_i). + * + * exceptions: GSL_EDOM, GSL_EINVAL + */ +int gsl_sf_bessel_sequence_Jnu_e(double nu, gsl_mode_t mode, size_t size, double * v); + + +/* Scaled modified cylindrical Bessel functions + * + * Exp[-|x|] BesselI[nu, x] + * x >= 0, nu >= 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_bessel_Inu_scaled_e(double nu, double x, gsl_sf_result * result); +double gsl_sf_bessel_Inu_scaled(double nu, double x); + + +/* Modified cylindrical Bessel functions + * + * BesselI[nu, x] + * x >= 0, nu >= 0 + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_bessel_Inu_e(double nu, double x, gsl_sf_result * result); +double gsl_sf_bessel_Inu(double nu, double x); + + +/* Scaled modified cylindrical Bessel functions + * + * Exp[+|x|] BesselK[nu, x] + * x > 0, nu >= 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_bessel_Knu_scaled_e(const double nu, const double x, gsl_sf_result * result); +double gsl_sf_bessel_Knu_scaled(const double nu, const double x); + +int gsl_sf_bessel_Knu_scaled_e10_e(const double nu, const double x, gsl_sf_result_e10 * result); + +/* Modified cylindrical Bessel functions + * + * BesselK[nu, x] + * x > 0, nu >= 0 + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_bessel_Knu_e(const double nu, const double x, gsl_sf_result * result); +double gsl_sf_bessel_Knu(const double nu, const double x); + + +/* Logarithm of modified cylindrical Bessel functions. + * + * Log[BesselK[nu, x]] + * x > 0, nu >= 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_bessel_lnKnu_e(const double nu, const double x, gsl_sf_result * result); +double gsl_sf_bessel_lnKnu(const double nu, const double x); + + +/* s'th positive zero of the Bessel function J_0(x). + * + * exceptions: + */ +int gsl_sf_bessel_zero_J0_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_bessel_zero_J0(unsigned int s); + + +/* s'th positive zero of the Bessel function J_1(x). + * + * exceptions: + */ +int gsl_sf_bessel_zero_J1_e(unsigned int s, gsl_sf_result * result); +double gsl_sf_bessel_zero_J1(unsigned int s); + + +/* s'th positive zero of the Bessel function J_nu(x). + * + * exceptions: + */ +int gsl_sf_bessel_zero_Jnu_e(double nu, unsigned int s, gsl_sf_result * result); +double gsl_sf_bessel_zero_Jnu(double nu, unsigned int s); + + +__END_DECLS + +#endif /* __GSL_SF_BESSEL_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_clausen.h b/software/gsl-1.15/specfunc/gsl_sf_clausen.h new file mode 100644 index 000000000..8e4ccd244 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_clausen.h @@ -0,0 +1,52 @@ +/* specfunc/gsl_sf_clausen.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_CLAUSEN_H__ +#define __GSL_SF_CLAUSEN_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Calculate the Clausen integral: + * Cl_2(x) := Integrate[-Log[2 Sin[t/2]], {t,0,x}] + * + * Relation to dilogarithm: + * Cl_2(theta) = Im[ Li_2(e^(i theta)) ] + */ +int gsl_sf_clausen_e(double x, gsl_sf_result * result); +double gsl_sf_clausen(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_CLAUSEN_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_coulomb.h b/software/gsl-1.15/specfunc/gsl_sf_coulomb.h new file mode 100644 index 000000000..764a5714d --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_coulomb.h @@ -0,0 +1,128 @@ +/* specfunc/gsl_sf_coulomb.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_COULOMB_H__ +#define __GSL_SF_COULOMB_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Normalized hydrogenic bound states, radial dependence. */ + +/* R_1 := 2Z sqrt(Z) exp(-Z r) + */ +int gsl_sf_hydrogenicR_1_e(const double Z, const double r, gsl_sf_result * result); +double gsl_sf_hydrogenicR_1(const double Z, const double r); + +/* R_n := norm exp(-Z r/n) (2Z/n)^l Laguerre[n-l-1, 2l+1, 2Z/n r] + * + * normalization such that psi(n,l,r) = R_n Y_{lm} + */ +int gsl_sf_hydrogenicR_e(const int n, const int l, const double Z, const double r, gsl_sf_result * result); +double gsl_sf_hydrogenicR(const int n, const int l, const double Z, const double r); + + +/* Coulomb wave functions F_{lam_F}(eta,x), G_{lam_G}(eta,x) + * and their derivatives; lam_G := lam_F - k_lam_G + * + * lam_F, lam_G > -0.5 + * x > 0.0 + * + * Conventions of Abramowitz+Stegun. + * + * Because there can be a large dynamic range of values, + * overflows are handled gracefully. If an overflow occurs, + * GSL_EOVRFLW is signalled and exponent(s) are returned + * through exp_F, exp_G. These are such that + * + * F_L(eta,x) = fc[k_L] * exp(exp_F) + * G_L(eta,x) = gc[k_L] * exp(exp_G) + * F_L'(eta,x) = fcp[k_L] * exp(exp_F) + * G_L'(eta,x) = gcp[k_L] * exp(exp_G) + */ +int +gsl_sf_coulomb_wave_FG_e(const double eta, const double x, + const double lam_F, + const int k_lam_G, + gsl_sf_result * F, gsl_sf_result * Fp, + gsl_sf_result * G, gsl_sf_result * Gp, + double * exp_F, double * exp_G); + + +/* F_L(eta,x) as array */ +int gsl_sf_coulomb_wave_F_array( + double lam_min, int kmax, + double eta, double x, + double * fc_array, + double * F_exponent + ); + +/* F_L(eta,x), G_L(eta,x) as arrays */ +int gsl_sf_coulomb_wave_FG_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, double * gc_array, + double * F_exponent, + double * G_exponent + ); + +/* F_L(eta,x), G_L(eta,x), F'_L(eta,x), G'_L(eta,x) as arrays */ +int gsl_sf_coulomb_wave_FGp_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, double * fcp_array, + double * gc_array, double * gcp_array, + double * F_exponent, + double * G_exponent + ); + +/* Coulomb wave function divided by the argument, + * F(eta, x)/x. This is the function which reduces to + * spherical Bessel functions in the limit eta->0. + */ +int gsl_sf_coulomb_wave_sphF_array(double lam_min, int kmax, + double eta, double x, + double * fc_array, + double * F_exponent + ); + + +/* Coulomb wave function normalization constant. + * [Abramowitz+Stegun 14.1.8, 14.1.9] + */ +int gsl_sf_coulomb_CL_e(double L, double eta, gsl_sf_result * result); +int gsl_sf_coulomb_CL_array(double Lmin, int kmax, double eta, double * cl); + + +__END_DECLS + +#endif /* __GSL_SF_COULOMB_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_coupling.h b/software/gsl-1.15/specfunc/gsl_sf_coupling.h new file mode 100644 index 000000000..c46b9f583 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_coupling.h @@ -0,0 +1,125 @@ +/* specfunc/gsl_sf_coupling.h + * + * Copyright (C) 1996,1997,1998,1999,2000,2001,2002 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_COUPLING_H__ +#define __GSL_SF_COUPLING_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* 3j Symbols: / ja jb jc \ + * \ ma mb mc / + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_coupling_3j_e(int two_ja, int two_jb, int two_jc, + int two_ma, int two_mb, int two_mc, + gsl_sf_result * result + ); +double gsl_sf_coupling_3j(int two_ja, int two_jb, int two_jc, + int two_ma, int two_mb, int two_mc + ); + + +/* 6j Symbols: / ja jb jc \ + * \ jd je jf / + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result + ); +double gsl_sf_coupling_6j(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf + ); + +/* Racah W coefficients: + * + * W(a b c d; e f) = (-1)^{a+b+c+d} / a b e \ + * \ d c f / + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_coupling_RacahW_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result + ); +double gsl_sf_coupling_RacahW(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf + ); + + +/* 9j Symbols: / ja jb jc \ + * | jd je jf | + * \ jg jh ji / + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + int two_jg, int two_jh, int two_ji, + gsl_sf_result * result + ); +double gsl_sf_coupling_9j(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + int two_jg, int two_jh, int two_ji + ); + + +/* INCORRECT version of 6j Symbols: + * This function actually calculates + * / ja jb je \ + * \ jd jc jf / + * It represents the original implementation, + * which had the above permutation of the + * arguments. This was wrong and confusing, + * and I had to fix it. Sorry for the trouble. + * [GJ] Tue Nov 26 12:53:39 MST 2002 + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +#ifndef GSL_DISABLE_DEPRECATED +int gsl_sf_coupling_6j_INCORRECT_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result + ); +double gsl_sf_coupling_6j_INCORRECT(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf + ); +#endif /* !GSL_DISABLE_DEPRECATED */ + + +__END_DECLS + +#endif /* __GSL_SF_COUPLING_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_dawson.h b/software/gsl-1.15/specfunc/gsl_sf_dawson.h new file mode 100644 index 000000000..7c11f9f41 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_dawson.h @@ -0,0 +1,52 @@ +/* specfunc/gsl_sf_dawson.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_DAWSON_H__ +#define __GSL_SF_DAWSON_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Dawson's integral: + * + * Exp[-x^2] Integral[ Exp[t^2], {t,0,x}] + * + * exceptions: GSL_EUNDRFLW; + */ +int gsl_sf_dawson_e(double x, gsl_sf_result * result); +double gsl_sf_dawson(double x); + + +__END_DECLS + +#endif /* __GSL_SF_DAWSON_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_debye.h b/software/gsl-1.15/specfunc/gsl_sf_debye.h new file mode 100644 index 000000000..bc732b17b --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_debye.h @@ -0,0 +1,91 @@ +/* specfunc/gsl_sf_debye.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ +/* augmented by D_5(x) and D_6(x) by Richard J. Mathar, 2005-11-08 */ + +#ifndef __GSL_SF_DEBYE_H__ +#define __GSL_SF_DEBYE_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* D_n(x) := n/x^n Integrate[t^n/(e^t - 1), {t,0,x}] */ + +/* D_1(x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_debye_1_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_1(const double x); + + +/* D_2(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_debye_2_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_2(const double x); + + +/* D_3(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_debye_3_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_3(const double x); + + +/* D_4(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_debye_4_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_4(const double x); + +/* D_5(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_debye_5_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_5(const double x); + +/* D_6(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_debye_6_e(const double x, gsl_sf_result * result); +double gsl_sf_debye_6(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_DEBYE_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_dilog.h b/software/gsl-1.15/specfunc/gsl_sf_dilog.h new file mode 100644 index 000000000..79b2b76f5 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_dilog.h @@ -0,0 +1,130 @@ +/* specfunc/gsl_sf_dilog.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_DILOG_H__ +#define __GSL_SF_DILOG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Real part of DiLogarithm(x), for real argument. + * In Lewin's notation, this is Li_2(x). + * + * Li_2(x) = - Re[ Integrate[ Log[1-s] / s, {s, 0, x}] ] + * + * The function in the complex plane has a branch point + * at z = 1; we place the cut in the conventional way, + * on [1, +infty). This means that the value for real x > 1 + * is a matter of definition; however, this choice does not + * affect the real part and so is not relevant to the + * interpretation of this implemented function. + */ +int gsl_sf_dilog_e(const double x, gsl_sf_result * result); +double gsl_sf_dilog(const double x); + + +/* DiLogarithm(z), for complex argument z = x + i y. + * Computes the principal branch. + * + * Recall that the branch cut is on the real axis with x > 1. + * The imaginary part of the computed value on the cut is given + * by -Pi*log(x), which is the limiting value taken approaching + * from y < 0. This is a conventional choice, though there is no + * true standardized choice. + * + * Note that there is no canonical way to lift the defining + * contour to the full Riemann surface because of the appearance + * of a "hidden branch point" at z = 0 on non-principal sheets. + * Experts will know the simple algebraic prescription for + * obtaining the sheet they want; non-experts will not want + * to know anything about it. This is why GSL chooses to compute + * only on the principal branch. + */ +int +gsl_sf_complex_dilog_xy_e( + const double x, + const double y, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ); + + + +/* DiLogarithm(z), for complex argument z = r Exp[i theta]. + * Computes the principal branch, thereby assuming an + * implicit reduction of theta to the range (-2 pi, 2 pi). + * + * If theta is identically zero, the imaginary part is computed + * as if approaching from y > 0. For other values of theta no + * special consideration is given, since it is assumed that + * no other machine representations of multiples of pi will + * produce y = 0 precisely. This assumption depends on some + * subtle properties of the machine arithmetic, such as + * correct rounding and monotonicity of the underlying + * implementation of sin() and cos(). + * + * This function is ok, but the interface is confusing since + * it makes it appear that the branch structure is resolved. + * Furthermore the handling of values close to the branch + * cut is subtle. Perhap this interface should be deprecated. + */ +int +gsl_sf_complex_dilog_e( + const double r, + const double theta, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ); + + + +/* Spence integral; spence(s) := Li_2(1-s) + * + * This function has a branch point at 0; we place the + * cut on (-infty,0). Because of our choice for the value + * of Li_2(z) on the cut, spence(s) is continuous as + * s approaches the cut from above. In other words, + * we define spence(x) = spence(x + i 0+). + */ +int +gsl_sf_complex_spence_xy_e( + const double x, + const double y, + gsl_sf_result * real_sp, + gsl_sf_result * imag_sp + ); + + +__END_DECLS + +#endif /* __GSL_SF_DILOG_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_elementary.h b/software/gsl-1.15/specfunc/gsl_sf_elementary.h new file mode 100644 index 000000000..467bfdaab --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_elementary.h @@ -0,0 +1,57 @@ +/* specfunc/gsl_sf_elementary.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Miscellaneous elementary functions and operations. + */ +#ifndef __GSL_SF_ELEMENTARY_H__ +#define __GSL_SF_ELEMENTARY_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Multiplication. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_multiply_e(const double x, const double y, gsl_sf_result * result); +double gsl_sf_multiply(const double x, const double y); + + +/* Multiplication of quantities with associated errors. + */ +int gsl_sf_multiply_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); + + +__END_DECLS + +#endif /* __GSL_SF_ELEMENTARY_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_ellint.h b/software/gsl-1.15/specfunc/gsl_sf_ellint.h new file mode 100644 index 000000000..7d92a1e5a --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_ellint.h @@ -0,0 +1,112 @@ +/* specfunc/gsl_sf_ellint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_ELLINT_H__ +#define __GSL_SF_ELLINT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Legendre form of complete elliptic integrals + * + * K(k) = Integral[1/Sqrt[1 - k^2 Sin[t]^2], {t, 0, Pi/2}] + * E(k) = Integral[ Sqrt[1 - k^2 Sin[t]^2], {t, 0, Pi/2}] + * + * exceptions: GSL_EDOM + */ +int gsl_sf_ellint_Kcomp_e(double k, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_Kcomp(double k, gsl_mode_t mode); + +int gsl_sf_ellint_Ecomp_e(double k, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_Ecomp(double k, gsl_mode_t mode); + +int gsl_sf_ellint_Pcomp_e(double k, double n, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_Pcomp(double k, double n, gsl_mode_t mode); + +int gsl_sf_ellint_Dcomp_e(double k, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_Dcomp(double k, gsl_mode_t mode); + + +/* Legendre form of incomplete elliptic integrals + * + * F(phi,k) = Integral[1/Sqrt[1 - k^2 Sin[t]^2], {t, 0, phi}] + * E(phi,k) = Integral[ Sqrt[1 - k^2 Sin[t]^2], {t, 0, phi}] + * P(phi,k,n) = Integral[(1 + n Sin[t]^2)^(-1)/Sqrt[1 - k^2 Sin[t]^2], {t, 0, phi}] + * D(phi,k,n) = R_D(1-Sin[phi]^2, 1-k^2 Sin[phi]^2, 1.0) + * + * F: [Carlson, Numerische Mathematik 33 (1979) 1, (4.1)] + * E: [Carlson, ", (4.2)] + * P: [Carlson, ", (4.3)] + * D: [Carlson, ", (4.4)] + * + * exceptions: GSL_EDOM + */ +int gsl_sf_ellint_F_e(double phi, double k, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_F(double phi, double k, gsl_mode_t mode); + +int gsl_sf_ellint_E_e(double phi, double k, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_E(double phi, double k, gsl_mode_t mode); + +int gsl_sf_ellint_P_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_P(double phi, double k, double n, gsl_mode_t mode); + +int gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_D(double phi, double k, double n, gsl_mode_t mode); + + +/* Carlson's symmetric basis of functions + * + * RC(x,y) = 1/2 Integral[(t+x)^(-1/2) (t+y)^(-1)], {t,0,Inf}] + * RD(x,y,z) = 3/2 Integral[(t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-3/2), {t,0,Inf}] + * RF(x,y,z) = 1/2 Integral[(t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2), {t,0,Inf}] + * RJ(x,y,z,p) = 3/2 Integral[(t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) (t+p)^(-1), {t,0,Inf}] + * + * exceptions: GSL_EDOM + */ +int gsl_sf_ellint_RC_e(double x, double y, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_RC(double x, double y, gsl_mode_t mode); + +int gsl_sf_ellint_RD_e(double x, double y, double z, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_RD(double x, double y, double z, gsl_mode_t mode); + +int gsl_sf_ellint_RF_e(double x, double y, double z, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_RF(double x, double y, double z, gsl_mode_t mode); + +int gsl_sf_ellint_RJ_e(double x, double y, double z, double p, gsl_mode_t mode, gsl_sf_result * result); +double gsl_sf_ellint_RJ(double x, double y, double z, double p, gsl_mode_t mode); + + +__END_DECLS + +#endif /* __GSL_SF_ELLINT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_elljac.h b/software/gsl-1.15/specfunc/gsl_sf_elljac.h new file mode 100644 index 000000000..7f804a5c5 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_elljac.h @@ -0,0 +1,48 @@ +/* specfunc/gsl_sf_elljac.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_ELLJAC_H__ +#define __GSL_SF_ELLJAC_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Jacobian elliptic functions sn, dn, cn, + * by descending Landen transformations + * + * exceptions: GSL_EDOM + */ +int gsl_sf_elljac_e(double u, double m, double * sn, double * cn, double * dn); + + +__END_DECLS + +#endif /* __GSL_SF_ELLJAC_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_erf.h b/software/gsl-1.15/specfunc/gsl_sf_erf.h new file mode 100644 index 000000000..a196d0dfe --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_erf.h @@ -0,0 +1,91 @@ +/* specfunc/gsl_sf_erf.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_ERF_H__ +#define __GSL_SF_ERF_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Complementary Error Function + * erfc(x) := 2/Sqrt[Pi] Integrate[Exp[-t^2], {t,x,Infinity}] + * + * exceptions: none + */ +int gsl_sf_erfc_e(double x, gsl_sf_result * result); +double gsl_sf_erfc(double x); + + +/* Log Complementary Error Function + * + * exceptions: none + */ +int gsl_sf_log_erfc_e(double x, gsl_sf_result * result); +double gsl_sf_log_erfc(double x); + + +/* Error Function + * erf(x) := 2/Sqrt[Pi] Integrate[Exp[-t^2], {t,0,x}] + * + * exceptions: none + */ +int gsl_sf_erf_e(double x, gsl_sf_result * result); +double gsl_sf_erf(double x); + + +/* Probability functions: + * Z(x) : Abramowitz+Stegun 26.2.1 + * Q(x) : Abramowitz+Stegun 26.2.3 + * + * exceptions: none + */ +int gsl_sf_erf_Z_e(double x, gsl_sf_result * result); +int gsl_sf_erf_Q_e(double x, gsl_sf_result * result); +double gsl_sf_erf_Z(double x); +double gsl_sf_erf_Q(double x); + + +/* Hazard function, also known as the inverse Mill's ratio. + * + * H(x) := Z(x)/Q(x) + * = Sqrt[2/Pi] Exp[-x^2 / 2] / Erfc[x/Sqrt[2]] + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_hazard_e(double x, gsl_sf_result * result); +double gsl_sf_hazard(double x); + + +__END_DECLS + +#endif /* __GSL_SF_ERF_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_exp.h b/software/gsl-1.15/specfunc/gsl_sf_exp.h new file mode 100644 index 000000000..8f8aff760 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_exp.h @@ -0,0 +1,134 @@ +/* specfunc/gsl_sf_exp.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_EXP_H__ +#define __GSL_SF_EXP_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Provide an exp() function with GSL semantics, + * i.e. with proper error checking, etc. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e(const double x, gsl_sf_result * result); +double gsl_sf_exp(const double x); + + +/* Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result); +double gsl_sf_exp_mult(const double x, const double y); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result); + + +/* exp(x)-1 + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_expm1_e(const double x, gsl_sf_result * result); +double gsl_sf_expm1(const double x); + + +/* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_e(const double x, gsl_sf_result * result); +double gsl_sf_exprel(const double x); + + +/* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_2_e(double x, gsl_sf_result * result); +double gsl_sf_exprel_2(const double x); + + +/* Similarly for the N-th generalization of + * the above. The so-called N-relative exponential + * + * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) + * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... + * = 1F1(1,1+N,x) + */ +int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_exprel_n(const int n, const double x); + +int gsl_sf_exprel_n_CF_e(const double n, const double x, gsl_sf_result * result); + + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result); + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10 * result); + +__END_DECLS + +#endif /* __GSL_SF_EXP_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_expint.h b/software/gsl-1.15/specfunc/gsl_sf_expint.h new file mode 100644 index 000000000..4005f72a6 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_expint.h @@ -0,0 +1,167 @@ +/* specfunc/gsl_sf_expint.h + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_EXPINT_H__ +#define __GSL_SF_EXPINT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* E_1(x) := Re[ Integrate[ Exp[-xt]/t, {t,1,Infinity}] ] + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_E1(const double x); + + +/* E_2(x) := Re[ Integrate[ Exp[-xt]/t^2, {t,1,Infinity}] ] + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_E2(const double x); + + +/* E_n(x) := Re[ Integrate[ Exp[-xt]/t^n, {t,1,Infinity}] ] + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_En_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_expint_En(const int n, const double x); + + +/* E_1_scaled(x) := exp(x) E_1(x) + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_E1_scaled(const double x); + + +/* E_2_scaled(x) := exp(x) E_2(x) + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_E2_scaled(const double x); + +/* E_n_scaled(x) := exp(x) E_n(x) + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_En_scaled_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_expint_En_scaled(const int n, const double x); + + +/* Ei(x) := - PV Integrate[ Exp[-t]/t, {t,-x,Infinity}] + * := PV Integrate[ Exp[t]/t, {t,-Infinity,x}] + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_Ei(const double x); + + +/* Ei_scaled(x) := exp(-x) Ei(x) + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_Ei_scaled(const double x); + + +/* Shi(x) := Integrate[ Sinh[t]/t, {t,0,x}] + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_Shi_e(const double x, gsl_sf_result * result); +double gsl_sf_Shi(const double x); + + +/* Chi(x) := Re[ M_EULER + log(x) + Integrate[(Cosh[t]-1)/t, {t,0,x}] ] + * + * x != 0.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_Chi_e(const double x, gsl_sf_result * result); +double gsl_sf_Chi(const double x); + + +/* Ei_3(x) := Integral[ Exp[-t^3], {t,0,x}] + * + * x >= 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_expint_3_e(const double x, gsl_sf_result * result); +double gsl_sf_expint_3(double x); + + +/* Si(x) := Integrate[ Sin[t]/t, {t,0,x}] + * + * exceptions: none + */ +int gsl_sf_Si_e(const double x, gsl_sf_result * result); +double gsl_sf_Si(const double x); + + +/* Ci(x) := -Integrate[ Cos[t]/t, {t,x,Infinity}] + * + * x > 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_Ci_e(const double x, gsl_sf_result * result); +double gsl_sf_Ci(const double x); + + +/* AtanInt(x) := Integral[ Arctan[t]/t, {t,0,x}] + * + * + * exceptions: + */ +int gsl_sf_atanint_e(const double x, gsl_sf_result * result); +double gsl_sf_atanint(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_EXPINT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_fermi_dirac.h b/software/gsl-1.15/specfunc/gsl_sf_fermi_dirac.h new file mode 100644 index 000000000..8f708cd2b --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_fermi_dirac.h @@ -0,0 +1,126 @@ +/* specfunc/gsl_sf_fermi_dirac.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_FERMI_DIRAC_H__ +#define __GSL_SF_FERMI_DIRAC_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Complete Fermi-Dirac Integrals: + * + * F_j(x) := 1/Gamma[j+1] Integral[ t^j /(Exp[t-x] + 1), {t,0,Infinity}] + * + * + * Incomplete Fermi-Dirac Integrals: + * + * F_j(x,b) := 1/Gamma[j+1] Integral[ t^j /(Exp[t-x] + 1), {t,b,Infinity}] + */ + + +/* Complete integral F_{-1}(x) = e^x / (1 + e^x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_fermi_dirac_m1_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_m1(const double x); + + +/* Complete integral F_0(x) = ln(1 + e^x) + * + * exceptions: GSL_EUNDRFLW + */ +int gsl_sf_fermi_dirac_0_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_0(const double x); + + +/* Complete integral F_1(x) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_1_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_1(const double x); + + +/* Complete integral F_2(x) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_2_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_2(const double x); + + +/* Complete integral F_j(x) + * for integer j + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_int_e(const int j, const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_int(const int j, const double x); + + +/* Complete integral F_{-1/2}(x) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_mhalf_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_mhalf(const double x); + + +/* Complete integral F_{1/2}(x) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_half_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_half(const double x); + + +/* Complete integral F_{3/2}(x) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_fermi_dirac_3half_e(const double x, gsl_sf_result * result); +double gsl_sf_fermi_dirac_3half(const double x); + + +/* Incomplete integral F_0(x,b) = ln(1 + e^(b-x)) - (b-x) + * + * exceptions: GSL_EUNDRFLW, GSL_EDOM + */ +int gsl_sf_fermi_dirac_inc_0_e(const double x, const double b, gsl_sf_result * result); +double gsl_sf_fermi_dirac_inc_0(const double x, const double b); + + +__END_DECLS + +#endif /* __GSL_SF_FERMI_DIRAC_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_gamma.h b/software/gsl-1.15/specfunc/gsl_sf_gamma.h new file mode 100644 index 000000000..d5e867ba6 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_gamma.h @@ -0,0 +1,293 @@ +/* specfunc/gsl_sf_gamma.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_GAMMA_H__ +#define __GSL_SF_GAMMA_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Log[Gamma(x)], x not a negative integer + * Uses real Lanczos method. + * Returns the real part of Log[Gamma[x]] when x < 0, + * i.e. Log[|Gamma[x]|]. + * + * exceptions: GSL_EDOM, GSL_EROUND + */ +int gsl_sf_lngamma_e(double x, gsl_sf_result * result); +double gsl_sf_lngamma(const double x); + + +/* Log[Gamma(x)], x not a negative integer + * Uses real Lanczos method. Determines + * the sign of Gamma[x] as well as Log[|Gamma[x]|] for x < 0. + * So Gamma[x] = sgn * Exp[result_lg]. + * + * exceptions: GSL_EDOM, GSL_EROUND + */ +int gsl_sf_lngamma_sgn_e(double x, gsl_sf_result * result_lg, double *sgn); + + +/* Gamma(x), x not a negative integer + * Uses real Lanczos method. + * + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EROUND + */ +int gsl_sf_gamma_e(const double x, gsl_sf_result * result); +double gsl_sf_gamma(const double x); + + +/* Regulated Gamma Function, x > 0 + * Gamma^*(x) = Gamma(x)/(Sqrt[2Pi] x^(x-1/2) exp(-x)) + * = (1 + 1/(12x) + ...), x->Inf + * A useful suggestion of Temme. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_gammastar_e(const double x, gsl_sf_result * result); +double gsl_sf_gammastar(const double x); + + +/* 1/Gamma(x) + * Uses real Lanczos method. + * + * exceptions: GSL_EUNDRFLW, GSL_EROUND + */ +int gsl_sf_gammainv_e(const double x, gsl_sf_result * result); +double gsl_sf_gammainv(const double x); + + +/* Log[Gamma(z)] for z complex, z not a negative integer + * Uses complex Lanczos method. Note that the phase part (arg) + * is not well-determined when |z| is very large, due + * to inevitable roundoff in restricting to (-Pi,Pi]. + * This will raise the GSL_ELOSS exception when it occurs. + * The absolute value part (lnr), however, never suffers. + * + * Calculates: + * lnr = log|Gamma(z)| + * arg = arg(Gamma(z)) in (-Pi, Pi] + * + * exceptions: GSL_EDOM, GSL_ELOSS + */ +int gsl_sf_lngamma_complex_e(double zr, double zi, gsl_sf_result * lnr, gsl_sf_result * arg); + + +/* x^n / n! + * + * x >= 0.0, n >= 0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_taylorcoeff_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_taylorcoeff(const int n, const double x); + + +/* n! + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_fact_e(const unsigned int n, gsl_sf_result * result); +double gsl_sf_fact(const unsigned int n); + + +/* n!! = n(n-2)(n-4) ... + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_doublefact_e(const unsigned int n, gsl_sf_result * result); +double gsl_sf_doublefact(const unsigned int n); + + +/* log(n!) + * Faster than ln(Gamma(n+1)) for n < 170; defers for larger n. + * + * exceptions: none + */ +int gsl_sf_lnfact_e(const unsigned int n, gsl_sf_result * result); +double gsl_sf_lnfact(const unsigned int n); + + +/* log(n!!) + * + * exceptions: none + */ +int gsl_sf_lndoublefact_e(const unsigned int n, gsl_sf_result * result); +double gsl_sf_lndoublefact(const unsigned int n); + + +/* log(n choose m) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_lnchoose_e(unsigned int n, unsigned int m, gsl_sf_result * result); +double gsl_sf_lnchoose(unsigned int n, unsigned int m); + + +/* n choose m + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_choose_e(unsigned int n, unsigned int m, gsl_sf_result * result); +double gsl_sf_choose(unsigned int n, unsigned int m); + + +/* Logarithm of Pochhammer (Apell) symbol + * log( (a)_x ) + * where (a)_x := Gamma[a + x]/Gamma[a] + * + * a > 0, a+x > 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_lnpoch_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_lnpoch(const double a, const double x); + + +/* Logarithm of Pochhammer (Apell) symbol, with sign information. + * result = log( |(a)_x| ) + * sgn = sgn( (a)_x ) + * where (a)_x := Gamma[a + x]/Gamma[a] + * + * a != neg integer, a+x != neg integer + * + * exceptions: GSL_EDOM + */ +int gsl_sf_lnpoch_sgn_e(const double a, const double x, gsl_sf_result * result, double * sgn); + + +/* Pochhammer (Apell) symbol + * (a)_x := Gamma[a + x]/Gamma[x] + * + * a != neg integer, a+x != neg integer + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_poch_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_poch(const double a, const double x); + + +/* Relative Pochhammer (Apell) symbol + * ((a,x) - 1)/x + * where (a,x) = (a)_x := Gamma[a + x]/Gamma[a] + * + * exceptions: GSL_EDOM + */ +int gsl_sf_pochrel_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_pochrel(const double a, const double x); + + +/* Normalized Incomplete Gamma Function + * + * Q(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,x,Infinity} ] + * + * a >= 0, x >= 0 + * Q(a,0) := 1 + * Q(0,x) := 0, x != 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_gamma_inc_Q_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_gamma_inc_Q(const double a, const double x); + + +/* Complementary Normalized Incomplete Gamma Function + * + * P(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,0,x} ] + * + * a > 0, x >= 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_gamma_inc_P_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_gamma_inc_P(const double a, const double x); + + +/* Non-normalized Incomplete Gamma Function + * + * Gamma(a,x) := Integral[ t^(a-1) e^(-t), {t,x,Infinity} ] + * + * x >= 0.0 + * Gamma(a, 0) := Gamma(a) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_gamma_inc_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_gamma_inc(const double a, const double x); + + +/* Logarithm of Beta Function + * Log[B(a,b)] + * + * a > 0, b > 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_lnbeta_e(const double a, const double b, gsl_sf_result * result); +double gsl_sf_lnbeta(const double a, const double b); + +int gsl_sf_lnbeta_sgn_e(const double x, const double y, gsl_sf_result * result, double * sgn); + + +/* Beta Function + * B(a,b) + * + * a > 0, b > 0 + * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_beta_e(const double a, const double b, gsl_sf_result * result); +double gsl_sf_beta(const double a, const double b); + + +/* Normalized Incomplete Beta Function + * B_x(a,b)/B(a,b) + * + * a > 0, b > 0, 0 <= x <= 1 + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_beta_inc_e(const double a, const double b, const double x, gsl_sf_result * result); +double gsl_sf_beta_inc(const double a, const double b, const double x); + + +/* The maximum x such that gamma(x) is not + * considered an overflow. + */ +#define GSL_SF_GAMMA_XMAX 171.0 + +/* The maximum n such that gsl_sf_fact(n) does not give an overflow. */ +#define GSL_SF_FACT_NMAX 170 + +/* The maximum n such that gsl_sf_doublefact(n) does not give an overflow. */ +#define GSL_SF_DOUBLEFACT_NMAX 297 + +__END_DECLS + +#endif /* __GSL_SF_GAMMA_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_gegenbauer.h b/software/gsl-1.15/specfunc/gsl_sf_gegenbauer.h new file mode 100644 index 000000000..bf41d218e --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_gegenbauer.h @@ -0,0 +1,73 @@ +/* specfunc/gsl_sf_gegenbauer.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_GEGENBAUER_H__ +#define __GSL_SF_GEGENBAUER_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Evaluate Gegenbauer polynomials + * using explicit representations. + * + * exceptions: none + */ +int gsl_sf_gegenpoly_1_e(double lambda, double x, gsl_sf_result * result); +int gsl_sf_gegenpoly_2_e(double lambda, double x, gsl_sf_result * result); +int gsl_sf_gegenpoly_3_e(double lambda, double x, gsl_sf_result * result); +double gsl_sf_gegenpoly_1(double lambda, double x); +double gsl_sf_gegenpoly_2(double lambda, double x); +double gsl_sf_gegenpoly_3(double lambda, double x); + + +/* Evaluate Gegenbauer polynomials. + * + * lambda > -1/2, n >= 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_gegenpoly_n_e(int n, double lambda, double x, gsl_sf_result * result); +double gsl_sf_gegenpoly_n(int n, double lambda, double x); + + +/* Calculate array of Gegenbauer polynomials + * for n = (0, 1, 2, ... nmax) + * + * lambda > -1/2, nmax >= 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_gegenpoly_array(int nmax, double lambda, double x, double * result_array); + + +__END_DECLS + +#endif /* __GSL_SF_GEGENBAUER_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_hyperg.h b/software/gsl-1.15/specfunc/gsl_sf_hyperg.h new file mode 100644 index 000000000..8366b88d0 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_hyperg.h @@ -0,0 +1,154 @@ +/* specfunc/gsl_sf_hyperg.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_HYPERG_H__ +#define __GSL_SF_HYPERG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Hypergeometric function related to Bessel functions + * 0F1[c,x] = + * Gamma[c] x^(1/2(1-c)) I_{c-1}(2 Sqrt[x]) + * Gamma[c] (-x)^(1/2(1-c)) J_{c-1}(2 Sqrt[-x]) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_hyperg_0F1_e(double c, double x, gsl_sf_result * result); +double gsl_sf_hyperg_0F1(const double c, const double x); + + +/* Confluent hypergeometric function for integer parameters. + * 1F1[m,n,x] = M(m,n,x) + * + * exceptions: + */ +int gsl_sf_hyperg_1F1_int_e(const int m, const int n, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_1F1_int(const int m, const int n, double x); + + +/* Confluent hypergeometric function. + * 1F1[a,b,x] = M(a,b,x) + * + * exceptions: + */ +int gsl_sf_hyperg_1F1_e(const double a, const double b, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_1F1(double a, double b, double x); + + +/* Confluent hypergeometric function for integer parameters. + * U(m,n,x) + * + * exceptions: + */ +int gsl_sf_hyperg_U_int_e(const int m, const int n, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_U_int(const int m, const int n, const double x); + + +/* Confluent hypergeometric function for integer parameters. + * U(m,n,x) + * + * exceptions: + */ +int gsl_sf_hyperg_U_int_e10_e(const int m, const int n, const double x, gsl_sf_result_e10 * result); + + +/* Confluent hypergeometric function. + * U(a,b,x) + * + * exceptions: + */ +int gsl_sf_hyperg_U_e(const double a, const double b, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_U(const double a, const double b, const double x); + + +/* Confluent hypergeometric function. + * U(a,b,x) + * + * exceptions: + */ +int gsl_sf_hyperg_U_e10_e(const double a, const double b, const double x, gsl_sf_result_e10 * result); + + +/* Gauss hypergeometric function 2F1[a,b,c,x] + * |x| < 1 + * + * exceptions: + */ +int gsl_sf_hyperg_2F1_e(double a, double b, const double c, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_2F1(double a, double b, double c, double x); + + +/* Gauss hypergeometric function + * 2F1[aR + I aI, aR - I aI, c, x] + * |x| < 1 + * + * exceptions: + */ +int gsl_sf_hyperg_2F1_conj_e(const double aR, const double aI, const double c, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_2F1_conj(double aR, double aI, double c, double x); + + +/* Renormalized Gauss hypergeometric function + * 2F1[a,b,c,x] / Gamma[c] + * |x| < 1 + * + * exceptions: + */ +int gsl_sf_hyperg_2F1_renorm_e(const double a, const double b, const double c, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_2F1_renorm(double a, double b, double c, double x); + + +/* Renormalized Gauss hypergeometric function + * 2F1[aR + I aI, aR - I aI, c, x] / Gamma[c] + * |x| < 1 + * + * exceptions: + */ +int gsl_sf_hyperg_2F1_conj_renorm_e(const double aR, const double aI, const double c, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_2F1_conj_renorm(double aR, double aI, double c, double x); + + +/* Mysterious hypergeometric function. The series representation + * is a divergent hypergeometric series. However, for x < 0 we + * have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_hyperg_2F0_e(const double a, const double b, const double x, gsl_sf_result * result); +double gsl_sf_hyperg_2F0(const double a, const double b, const double x); + + +__END_DECLS + +#endif /* __GSL_SF_HYPERG_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_laguerre.h b/software/gsl-1.15/specfunc/gsl_sf_laguerre.h new file mode 100644 index 000000000..0d7f1c370 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_laguerre.h @@ -0,0 +1,68 @@ +/* specfunc/gsl_sf_laguerre.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LAGUERRE_H__ +#define __GSL_SF_LAGUERRE_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* L^a_n(x) = (a+1)_n / n! 1F1(-n,a+1,x) */ + + +/* Evaluate generalized Laguerre polynomials + * using explicit representations. + * + * exceptions: none + */ +int gsl_sf_laguerre_1_e(const double a, const double x, gsl_sf_result * result); +int gsl_sf_laguerre_2_e(const double a, const double x, gsl_sf_result * result); +int gsl_sf_laguerre_3_e(const double a, const double x, gsl_sf_result * result); +double gsl_sf_laguerre_1(double a, double x); +double gsl_sf_laguerre_2(double a, double x); +double gsl_sf_laguerre_3(double a, double x); + + +/* Evaluate generalized Laguerre polynomials. + * + * a > -1.0 + * n >= 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_laguerre_n_e(const int n, const double a, const double x, gsl_sf_result * result); +double gsl_sf_laguerre_n(int n, double a, double x); + + +__END_DECLS + +#endif /* __GSL_SF_LAGUERRE_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_lambert.h b/software/gsl-1.15/specfunc/gsl_sf_lambert.h new file mode 100644 index 000000000..53b70a3a3 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_lambert.h @@ -0,0 +1,69 @@ +/* specfunc/gsl_sf_lambert.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LAMBERT_H__ +#define __GSL_SF_LAMBERT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Lambert's Function W_0(x) + * + * W_0(x) is the principal branch of the + * implicit function defined by W e^W = x. + * + * -1/E < x < \infty + * + * exceptions: GSL_EMAXITER; + */ +int gsl_sf_lambert_W0_e(double x, gsl_sf_result * result); +double gsl_sf_lambert_W0(double x); + + +/* Lambert's Function W_{-1}(x) + * + * W_{-1}(x) is the second real branch of the + * implicit function defined by W e^W = x. + * It agrees with W_0(x) when x >= 0. + * + * -1/E < x < \infty + * + * exceptions: GSL_MAXITER; + */ +int gsl_sf_lambert_Wm1_e(double x, gsl_sf_result * result); +double gsl_sf_lambert_Wm1(double x); + + +__END_DECLS + +#endif /* __GSL_SF_LAMBERT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_legendre.h b/software/gsl-1.15/specfunc/gsl_sf_legendre.h new file mode 100644 index 000000000..918a9bcc2 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_legendre.h @@ -0,0 +1,315 @@ +/* specfunc/gsl_sf_legendre.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LEGENDRE_H__ +#define __GSL_SF_LEGENDRE_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* P_l(x) l >= 0; |x| <= 1 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Pl_e(const int l, const double x, gsl_sf_result * result); +double gsl_sf_legendre_Pl(const int l, const double x); + + +/* P_l(x) for l=0,...,lmax; |x| <= 1 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Pl_array( + const int lmax, const double x, + double * result_array + ); + + +/* P_l(x) and P_l'(x) for l=0,...,lmax; |x| <= 1 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Pl_deriv_array( + const int lmax, const double x, + double * result_array, + double * result_deriv_array + ); + + +/* P_l(x), l=1,2,3 + * + * exceptions: none + */ +int gsl_sf_legendre_P1_e(double x, gsl_sf_result * result); +int gsl_sf_legendre_P2_e(double x, gsl_sf_result * result); +int gsl_sf_legendre_P3_e(double x, gsl_sf_result * result); +double gsl_sf_legendre_P1(const double x); +double gsl_sf_legendre_P2(const double x); +double gsl_sf_legendre_P3(const double x); + + +/* Q_0(x), x > -1, x != 1 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Q0_e(const double x, gsl_sf_result * result); +double gsl_sf_legendre_Q0(const double x); + + +/* Q_1(x), x > -1, x != 1 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Q1_e(const double x, gsl_sf_result * result); +double gsl_sf_legendre_Q1(const double x); + + +/* Q_l(x), x > -1, x != 1, l >= 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_Ql_e(const int l, const double x, gsl_sf_result * result); +double gsl_sf_legendre_Ql(const int l, const double x); + + +/* P_l^m(x) m >= 0; l >= m; |x| <= 1.0 + * + * Note that this function grows combinatorially with l. + * Therefore we can easily generate an overflow for l larger + * than about 150. + * + * There is no trouble for small m, but when m and l are both large, + * then there will be trouble. Rather than allow overflows, these + * functions refuse to calculate when they can sense that l and m are + * too big. + * + * If you really want to calculate a spherical harmonic, then DO NOT + * use this. Instead use legendre_sphPlm() below, which uses a similar + * recursion, but with the normalized functions. + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_legendre_Plm_e(const int l, const int m, const double x, gsl_sf_result * result); +double gsl_sf_legendre_Plm(const int l, const int m, const double x); + + +/* P_l^m(x) m >= 0; l >= m; |x| <= 1.0 + * l=|m|,...,lmax + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_legendre_Plm_array( + const int lmax, const int m, const double x, + double * result_array + ); + + +/* P_l^m(x) and d(P_l^m(x))/dx; m >= 0; lmax >= m; |x| <= 1.0 + * l=|m|,...,lmax + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_legendre_Plm_deriv_array( + const int lmax, const int m, const double x, + double * result_array, + double * result_deriv_array + ); + + +/* P_l^m(x), normalized properly for use in spherical harmonics + * m >= 0; l >= m; |x| <= 1.0 + * + * There is no overflow problem, as there is for the + * standard normalization of P_l^m(x). + * + * Specifically, it returns: + * + * sqrt((2l+1)/(4pi)) sqrt((l-m)!/(l+m)!) P_l^m(x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_sphPlm_e(const int l, int m, const double x, gsl_sf_result * result); +double gsl_sf_legendre_sphPlm(const int l, const int m, const double x); + + +/* sphPlm(l,m,x) values + * m >= 0; l >= m; |x| <= 1.0 + * l=|m|,...,lmax + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_sphPlm_array( + const int lmax, int m, const double x, + double * result_array + ); + + +/* sphPlm(l,m,x) and d(sphPlm(l,m,x))/dx values + * m >= 0; l >= m; |x| <= 1.0 + * l=|m|,...,lmax + * + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_sphPlm_deriv_array( + const int lmax, const int m, const double x, + double * result_array, + double * result_deriv_array + ); + + + +/* size of result_array[] needed for the array versions of Plm + * (lmax - m + 1) + */ +int gsl_sf_legendre_array_size(const int lmax, const int m); + +/* Irregular Spherical Conical Function + * P^{1/2}_{-1/2 + I lambda}(x) + * + * x > -1.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_half_e(const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_half(const double lambda, const double x); + + +/* Regular Spherical Conical Function + * P^{-1/2}_{-1/2 + I lambda}(x) + * + * x > -1.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_mhalf_e(const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_mhalf(const double lambda, const double x); + + +/* Conical Function + * P^{0}_{-1/2 + I lambda}(x) + * + * x > -1.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_0_e(const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_0(const double lambda, const double x); + + +/* Conical Function + * P^{1}_{-1/2 + I lambda}(x) + * + * x > -1.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_1_e(const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_1(const double lambda, const double x); + + +/* Regular Spherical Conical Function + * P^{-1/2-l}_{-1/2 + I lambda}(x) + * + * x > -1.0, l >= -1 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_sph_reg_e(const int l, const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_sph_reg(const int l, const double lambda, const double x); + + +/* Regular Cylindrical Conical Function + * P^{-m}_{-1/2 + I lambda}(x) + * + * x > -1.0, m >= -1 + * exceptions: GSL_EDOM + */ +int gsl_sf_conicalP_cyl_reg_e(const int m, const double lambda, const double x, gsl_sf_result * result); +double gsl_sf_conicalP_cyl_reg(const int m, const double lambda, const double x); + + +/* The following spherical functions are specializations + * of Legendre functions which give the regular eigenfunctions + * of the Laplacian on a 3-dimensional hyperbolic space. + * Of particular interest is the flat limit, which is + * Flat-Lim := {lambda->Inf, eta->0, lambda*eta fixed}. + */ + +/* Zeroth radial eigenfunction of the Laplacian on the + * 3-dimensional hyperbolic space. + * + * legendre_H3d_0(lambda,eta) := sin(lambda*eta)/(lambda*sinh(eta)) + * + * Normalization: + * Flat-Lim legendre_H3d_0(lambda,eta) = j_0(lambda*eta) + * + * eta >= 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_H3d_0_e(const double lambda, const double eta, gsl_sf_result * result); +double gsl_sf_legendre_H3d_0(const double lambda, const double eta); + + +/* First radial eigenfunction of the Laplacian on the + * 3-dimensional hyperbolic space. + * + * legendre_H3d_1(lambda,eta) := + * 1/sqrt(lambda^2 + 1) sin(lam eta)/(lam sinh(eta)) + * (coth(eta) - lambda cot(lambda*eta)) + * + * Normalization: + * Flat-Lim legendre_H3d_1(lambda,eta) = j_1(lambda*eta) + * + * eta >= 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_H3d_1_e(const double lambda, const double eta, gsl_sf_result * result); +double gsl_sf_legendre_H3d_1(const double lambda, const double eta); + + +/* l'th radial eigenfunction of the Laplacian on the + * 3-dimensional hyperbolic space. + * + * Normalization: + * Flat-Lim legendre_H3d_l(l,lambda,eta) = j_l(lambda*eta) + * + * eta >= 0.0, l >= 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_legendre_H3d_e(const int l, const double lambda, const double eta, gsl_sf_result * result); +double gsl_sf_legendre_H3d(const int l, const double lambda, const double eta); + + +/* Array of H3d(ell), 0 <= ell <= lmax + */ +int gsl_sf_legendre_H3d_array(const int lmax, const double lambda, const double eta, double * result_array); + + +__END_DECLS + +#endif /* __GSL_SF_LEGENDRE_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_log.h b/software/gsl-1.15/specfunc/gsl_sf_log.h new file mode 100644 index 000000000..92aa68574 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_log.h @@ -0,0 +1,82 @@ +/* specfunc/gsl_sf_log.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LOG_H__ +#define __GSL_SF_LOG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Provide a logarithm function with GSL semantics. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_e(const double x, gsl_sf_result * result); +double gsl_sf_log(const double x); + + +/* Log(|x|) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_abs_e(const double x, gsl_sf_result * result); +double gsl_sf_log_abs(const double x); + + +/* Complex Logarithm + * exp(lnr + I theta) = zr + I zi + * Returns argument in [-pi,pi]. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta); + + +/* Log(1 + x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx(const double x); + + +/* Log(1 + x) - x + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx_mx(const double x); + +__END_DECLS + +#endif /* __GSL_SF_LOG_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_mathieu.h b/software/gsl-1.15/specfunc/gsl_sf_mathieu.h new file mode 100644 index 000000000..19d82561a --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_mathieu.h @@ -0,0 +1,107 @@ +/* specfunc/gsl_sf_mathieu.h + * + * Copyright (C) 2002 Lowell Johnson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Author: L. Johnson */ + +#ifndef __GSL_SF_MATHIEU_H__ +#define __GSL_SF_MATHIEU_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +#define GSL_SF_MATHIEU_COEFF 100 + +typedef struct +{ + size_t size; + size_t even_order; + size_t odd_order; + int extra_values; + double qa; /* allow for caching of results: not implemented yet */ + double qb; /* allow for caching of results: not implemented yet */ + double *aa; + double *bb; + double *dd; + double *ee; + double *tt; + double *e2; + double *zz; + gsl_vector *eval; + gsl_matrix *evec; + gsl_eigen_symmv_workspace *wmat; +} gsl_sf_mathieu_workspace; + + +/* Compute an array of characteristic (eigen) values from the recurrence + matrices for the Mathieu equations. */ +int gsl_sf_mathieu_a_array(int order_min, int order_max, double qq, gsl_sf_mathieu_workspace *work, double result_array[]); +int gsl_sf_mathieu_b_array(int order_min, int order_max, double qq, gsl_sf_mathieu_workspace *work, double result_array[]); + +/* Compute the characteristic value for a Mathieu function of order n and + type ntype. */ +int gsl_sf_mathieu_a(int order, double qq, gsl_sf_result *result); +int gsl_sf_mathieu_b(int order, double qq, gsl_sf_result *result); + +/* Compute the Fourier coefficients for a Mathieu function. */ +int gsl_sf_mathieu_a_coeff(int order, double qq, double aa, double coeff[]); +int gsl_sf_mathieu_b_coeff(int order, double qq, double aa, double coeff[]); + +/* Allocate computational storage space for eigenvalue solution. */ +gsl_sf_mathieu_workspace *gsl_sf_mathieu_alloc(const size_t nn, + const double qq); +void gsl_sf_mathieu_free(gsl_sf_mathieu_workspace *workspace); + +/* Compute an angular Mathieu function. */ +int gsl_sf_mathieu_ce(int order, double qq, double zz, gsl_sf_result *result); +int gsl_sf_mathieu_se(int order, double qq, double zz, gsl_sf_result *result); +int gsl_sf_mathieu_ce_array(int nmin, int nmax, double qq, double zz, + gsl_sf_mathieu_workspace *work, + double result_array[]); +int gsl_sf_mathieu_se_array(int nmin, int nmax, double qq, double zz, + gsl_sf_mathieu_workspace *work, + double result_array[]); + +/* Compute a radial Mathieu function. */ +int gsl_sf_mathieu_Mc(int kind, int order, double qq, double zz, + gsl_sf_result *result); +int gsl_sf_mathieu_Ms(int kind, int order, double qq, double zz, + gsl_sf_result *result); +int gsl_sf_mathieu_Mc_array(int kind, int nmin, int nmax, double qq, + double zz, gsl_sf_mathieu_workspace *work, + double result_array[]); +int gsl_sf_mathieu_Ms_array(int kind, int nmin, int nmax, double qq, + double zz, gsl_sf_mathieu_workspace *work, + double result_array[]); + + +__END_DECLS + +#endif /* !__GSL_SF_MATHIEU_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_pow_int.h b/software/gsl-1.15/specfunc/gsl_sf_pow_int.h new file mode 100644 index 000000000..e535d5721 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_pow_int.h @@ -0,0 +1,49 @@ +/* specfunc/gsl_sf_pow_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_POW_INT_H__ +#define __GSL_SF_POW_INT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Calculate x^n. + * Does not check for overflow/underflow. + */ +int gsl_sf_pow_int_e(double x, int n, gsl_sf_result * result); +double gsl_sf_pow_int(const double x, const int n); + + +__END_DECLS + +#endif /* __GSL_SF_POW_INT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_psi.h b/software/gsl-1.15/specfunc/gsl_sf_psi.h new file mode 100644 index 000000000..ec6117906 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_psi.h @@ -0,0 +1,113 @@ +/* specfunc/gsl_sf_psi.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_PSI_H__ +#define __GSL_SF_PSI_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Poly-Gamma Functions + * + * psi(m,x) := (d/dx)^m psi(0,x) = (d/dx)^{m+1} log(gamma(x)) + */ + + +/* Di-Gamma Function psi(n) = psi(0,n) + * + * n > 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_psi_int_e(const int n, gsl_sf_result * result); +double gsl_sf_psi_int(const int n); + + +/* Di-Gamma Function psi(x) = psi(0, x) + * + * x != 0.0, -1.0, -2.0, ... + * exceptions: GSL_EDOM, GSL_ELOSS + */ +int gsl_sf_psi_e(const double x, gsl_sf_result * result); +double gsl_sf_psi(const double x); + + +/* Di-Gamma Function Re[psi(1 + I y)] + * + * exceptions: none + */ +int gsl_sf_psi_1piy_e(const double y, gsl_sf_result * result); +double gsl_sf_psi_1piy(const double y); + + +/* Di-Gamma Function psi(z) for general complex argument z = x + iy + * + * exceptions: GSL_EDOM + */ +int gsl_sf_complex_psi_e( + const double x, + const double y, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ); + + +/* Tri-Gamma Function psi^(1)(n) + * + * n > 0 + * exceptions: GSL_EDOM + */ +int gsl_sf_psi_1_int_e(const int n, gsl_sf_result * result); +double gsl_sf_psi_1_int(const int n); + + +/* Tri-Gamma Function psi^(1)(x) + * + * x != 0.0, -1.0, -2.0, ... + * exceptions: GSL_EDOM, GSL_ELOSS + */ +int gsl_sf_psi_1_e(const double x, gsl_sf_result * result); +double gsl_sf_psi_1(const double x); + + +/* Poly-Gamma Function psi^(n)(x) + * + * n >= 0, x > 0.0 + * exceptions: GSL_EDOM + */ +int gsl_sf_psi_n_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_psi_n(const int n, const double x); + + +__END_DECLS + +#endif /* __GSL_SF_PSI_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_result.h b/software/gsl-1.15/specfunc/gsl_sf_result.h new file mode 100644 index 000000000..512bad7c4 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_result.h @@ -0,0 +1,59 @@ +/* specfunc/gsl_sf_result.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_RESULT_H__ +#define __GSL_SF_RESULT_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +struct gsl_sf_result_struct { + double val; + double err; +}; +typedef struct gsl_sf_result_struct gsl_sf_result; + +#define GSL_SF_RESULT_SET(r,v,e) do { (r)->val=(v); (r)->err=(e); } while(0) + + +struct gsl_sf_result_e10_struct { + double val; + double err; + int e10; +}; +typedef struct gsl_sf_result_e10_struct gsl_sf_result_e10; + + +int gsl_sf_result_smash_e(const gsl_sf_result_e10 * re, gsl_sf_result * r); + + +__END_DECLS + +#endif /* __GSL_SF_RESULT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_synchrotron.h b/software/gsl-1.15/specfunc/gsl_sf_synchrotron.h new file mode 100644 index 000000000..26028c893 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_synchrotron.h @@ -0,0 +1,60 @@ +/* specfunc/gsl_sf_synchrotron.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_SYNCHROTRON_H__ +#define __GSL_SF_SYNCHROTRON_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* First synchrotron function: + * synchrotron_1(x) = x Integral[ K_{5/3}(t), {t, x, Infinity}] + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_synchrotron_1_e(const double x, gsl_sf_result * result); +double gsl_sf_synchrotron_1(const double x); + + +/* Second synchroton function: + * synchrotron_2(x) = x * K_{2/3}(x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_synchrotron_2_e(const double x, gsl_sf_result * result); +double gsl_sf_synchrotron_2(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_SYNCHROTRON_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_transport.h b/software/gsl-1.15/specfunc/gsl_sf_transport.h new file mode 100644 index 000000000..c0fd7fc23 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_transport.h @@ -0,0 +1,78 @@ +/* specfunc/gsl_sf_transport.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_TRANSPORT_H__ +#define __GSL_SF_TRANSPORT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Transport function: + * J(n,x) := Integral[ t^n e^t /(e^t - 1)^2, {t,0,x}] + */ + +/* J(2,x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_transport_2_e(const double x, gsl_sf_result * result); +double gsl_sf_transport_2(const double x); + + +/* J(3,x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_transport_3_e(const double x, gsl_sf_result * result); +double gsl_sf_transport_3(const double x); + + +/* J(4,x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_transport_4_e(const double x, gsl_sf_result * result); +double gsl_sf_transport_4(const double x); + + +/* J(5,x) + * + * exceptions: GSL_EDOM, GSL_EUNDRFLW + */ +int gsl_sf_transport_5_e(const double x, gsl_sf_result * result); +double gsl_sf_transport_5(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_TRANSPORT_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_trig.h b/software/gsl-1.15/specfunc/gsl_sf_trig.h new file mode 100644 index 000000000..e2c5722d9 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_trig.h @@ -0,0 +1,152 @@ +/* specfunc/gsl_sf_trig.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_TRIG_H__ +#define __GSL_SF_TRIG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Sin(x) with GSL semantics. This is actually important + * because we want to control the error estimate, and trying + * to guess the error for the standard library implementation + * every time it is used would be a little goofy. + */ +int gsl_sf_sin_e(double x, gsl_sf_result * result); +double gsl_sf_sin(const double x); + + +/* Cos(x) with GSL semantics. + */ +int gsl_sf_cos_e(double x, gsl_sf_result * result); +double gsl_sf_cos(const double x); + + +/* Hypot(x,y) with GSL semantics. + */ +int gsl_sf_hypot_e(const double x, const double y, gsl_sf_result * result); +double gsl_sf_hypot(const double x, const double y); + + +/* Sin(z) for complex z + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_complex_sin_e(const double zr, const double zi, gsl_sf_result * szr, gsl_sf_result * szi); + + +/* Cos(z) for complex z + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_complex_cos_e(const double zr, const double zi, gsl_sf_result * czr, gsl_sf_result * czi); + + +/* Log(Sin(z)) for complex z + * + * exceptions: GSL_EDOM, GSL_ELOSS + */ +int gsl_sf_complex_logsin_e(const double zr, const double zi, gsl_sf_result * lszr, gsl_sf_result * lszi); + + +/* Sinc(x) = sin(pi x) / (pi x) + * + * exceptions: none + */ +int gsl_sf_sinc_e(double x, gsl_sf_result * result); +double gsl_sf_sinc(const double x); + + +/* Log(Sinh(x)), x > 0 + * + * exceptions: GSL_EDOM + */ +int gsl_sf_lnsinh_e(const double x, gsl_sf_result * result); +double gsl_sf_lnsinh(const double x); + + +/* Log(Cosh(x)) + * + * exceptions: none + */ +int gsl_sf_lncosh_e(const double x, gsl_sf_result * result); +double gsl_sf_lncosh(const double x); + + +/* Convert polar to rectlinear coordinates. + * + * exceptions: GSL_ELOSS + */ +int gsl_sf_polar_to_rect(const double r, const double theta, gsl_sf_result * x, gsl_sf_result * y); + +/* Convert rectilinear to polar coordinates. + * return argument in range [-pi, pi] + * + * exceptions: GSL_EDOM + */ +int gsl_sf_rect_to_polar(const double x, const double y, gsl_sf_result * r, gsl_sf_result * theta); + +/* Sin(x) for quantity with an associated error. + */ +int gsl_sf_sin_err_e(const double x, const double dx, gsl_sf_result * result); + + +/* Cos(x) for quantity with an associated error. + */ +int gsl_sf_cos_err_e(const double x, const double dx, gsl_sf_result * result); + + +/* Force an angle to lie in the range (-pi,pi]. + * + * exceptions: GSL_ELOSS + */ +int gsl_sf_angle_restrict_symm_e(double * theta); +double gsl_sf_angle_restrict_symm(const double theta); + + +/* Force an angle to lie in the range [0, 2pi) + * + * exceptions: GSL_ELOSS + */ +int gsl_sf_angle_restrict_pos_e(double * theta); +double gsl_sf_angle_restrict_pos(const double theta); + + +int gsl_sf_angle_restrict_symm_err_e(const double theta, gsl_sf_result * result); + +int gsl_sf_angle_restrict_pos_err_e(const double theta, gsl_sf_result * result); + + +__END_DECLS + +#endif /* __GSL_SF_TRIG_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_sf_zeta.h b/software/gsl-1.15/specfunc/gsl_sf_zeta.h new file mode 100644 index 000000000..2d7fad0ad --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_sf_zeta.h @@ -0,0 +1,112 @@ +/* specfunc/gsl_sf_zeta.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_ZETA_H__ +#define __GSL_SF_ZETA_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Riemann Zeta Function + * zeta(n) = Sum[ k^(-n), {k,1,Infinity} ] + * + * n=integer, n != 1 + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_zeta_int_e(const int n, gsl_sf_result * result); +double gsl_sf_zeta_int(const int n); + + +/* Riemann Zeta Function + * zeta(x) = Sum[ k^(-s), {k,1,Infinity} ], s != 1.0 + * + * s != 1.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_zeta_e(const double s, gsl_sf_result * result); +double gsl_sf_zeta(const double s); + + +/* Riemann Zeta Function minus 1 + * useful for evaluating the fractional part + * of Riemann zeta for large argument + * + * s != 1.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_zetam1_e(const double s, gsl_sf_result * result); +double gsl_sf_zetam1(const double s); + + +/* Riemann Zeta Function minus 1 for integer arg + * useful for evaluating the fractional part + * of Riemann zeta for large argument + * + * s != 1.0 + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ +int gsl_sf_zetam1_int_e(const int s, gsl_sf_result * result); +double gsl_sf_zetam1_int(const int s); + + +/* Hurwitz Zeta Function + * zeta(s,q) = Sum[ (k+q)^(-s), {k,0,Infinity} ] + * + * s > 1.0, q > 0.0 + * exceptions: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_hzeta_e(const double s, const double q, gsl_sf_result * result); +double gsl_sf_hzeta(const double s, const double q); + + +/* Eta Function + * eta(n) = (1-2^(1-n)) zeta(n) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_eta_int_e(int n, gsl_sf_result * result); +double gsl_sf_eta_int(const int n); + + +/* Eta Function + * eta(s) = (1-2^(1-s)) zeta(s) + * + * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW + */ +int gsl_sf_eta_e(const double s, gsl_sf_result * result); +double gsl_sf_eta(const double s); + + +__END_DECLS + +#endif /* __GSL_SF_ZETA_H__ */ diff --git a/software/gsl-1.15/specfunc/gsl_specfunc.h b/software/gsl-1.15/specfunc/gsl_specfunc.h new file mode 100644 index 000000000..e07b5aa08 --- /dev/null +++ b/software/gsl-1.15/specfunc/gsl_specfunc.h @@ -0,0 +1,10 @@ +/* Author: G. Jungman */ + + +/* Convenience header */ +#ifndef __GSL_SPECFUNC_H__ +#define __GSL_SPECFUNC_H__ + +#include + +#endif /* __GSL_SPECFUNC_H__ */ diff --git a/software/gsl-1.15/specfunc/hyperg.c b/software/gsl-1.15/specfunc/hyperg.c new file mode 100644 index 000000000..7188e9a1e --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg.c @@ -0,0 +1,291 @@ +/* specfunc/hyperg.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Miscellaneous implementations of use + * for evaluation of hypergeometric functions. + */ +#include +#include +#include +#include +#include + +#include "error.h" +#include "hyperg.h" + +#define SUM_LARGE (1.0e-5*GSL_DBL_MAX) + + +int +gsl_sf_hyperg_1F1_series_e(const double a, const double b, const double x, + gsl_sf_result * result + ) +{ + double an = a; + double bn = b; + double n = 1.0; + double del = 1.0; + double abs_del = 1.0; + double max_abs_del = 1.0; + double sum_val = 1.0; + double sum_err = 0.0; + + while(abs_del/fabs(sum_val) > 0.25*GSL_DBL_EPSILON) { + double u, abs_u; + + if(bn == 0.0) { + DOMAIN_ERROR(result); + } + + if(an == 0.0) { + result->val = sum_val; + result->err = sum_err; + result->err += 2.0 * GSL_DBL_EPSILON * n * fabs(sum_val); + return GSL_SUCCESS; + } + + if (n > 10000.0) { + result->val = sum_val; + result->err = sum_err; + GSL_ERROR ("hypergeometric series failed to converge", GSL_EFAILED); + } + + u = x * (an/(bn*n)); + abs_u = fabs(u); + if(abs_u > 1.0 && max_abs_del > GSL_DBL_MAX/abs_u) { + result->val = sum_val; + result->err = fabs(sum_val); + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + del *= u; + sum_val += del; + if(fabs(sum_val) > SUM_LARGE) { + result->val = sum_val; + result->err = fabs(sum_val); + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + + abs_del = fabs(del); + max_abs_del = GSL_MAX_DBL(abs_del, max_abs_del); + sum_err += 2.0*GSL_DBL_EPSILON*abs_del; + + an += 1.0; + bn += 1.0; + n += 1.0; + } + + result->val = sum_val; + result->err = sum_err; + result->err += abs_del; + result->err += 2.0 * GSL_DBL_EPSILON * n * fabs(sum_val); + + return GSL_SUCCESS; +} + + +int +gsl_sf_hyperg_1F1_large_b_e(const double a, const double b, const double x, gsl_sf_result * result) +{ + if(fabs(x/b) < 1.0) { + const double u = x/b; + const double v = 1.0/(1.0-u); + const double pre = pow(v,a); + const double uv = u*v; + const double uv2 = uv*uv; + const double t1 = a*(a+1.0)/(2.0*b)*uv2; + const double t2a = a*(a+1.0)/(24.0*b*b)*uv2; + const double t2b = 12.0 + 16.0*(a+2.0)*uv + 3.0*(a+2.0)*(a+3.0)*uv2; + const double t2 = t2a*t2b; + result->val = pre * (1.0 - t1 + t2); + result->err = pre * GSL_DBL_EPSILON * (1.0 + fabs(t1) + fabs(t2)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR(result); + } +} + + +int +gsl_sf_hyperg_U_large_b_e(const double a, const double b, const double x, + gsl_sf_result * result, + double * ln_multiplier + ) +{ + double N = floor(b); /* b = N + eps */ + double eps = b - N; + + if(fabs(eps) < GSL_SQRT_DBL_EPSILON) { + double lnpre_val; + double lnpre_err; + gsl_sf_result M; + if(b > 1.0) { + double tmp = (1.0-b)*log(x); + gsl_sf_result lg_bm1; + gsl_sf_result lg_a; + gsl_sf_lngamma_e(b-1.0, &lg_bm1); + gsl_sf_lngamma_e(a, &lg_a); + lnpre_val = tmp + x + lg_bm1.val - lg_a.val; + lnpre_err = lg_bm1.err + lg_a.err + GSL_DBL_EPSILON * (fabs(x) + fabs(tmp)); + gsl_sf_hyperg_1F1_large_b_e(1.0-a, 2.0-b, -x, &M); + } + else { + gsl_sf_result lg_1mb; + gsl_sf_result lg_1pamb; + gsl_sf_lngamma_e(1.0-b, &lg_1mb); + gsl_sf_lngamma_e(1.0+a-b, &lg_1pamb); + lnpre_val = lg_1mb.val - lg_1pamb.val; + lnpre_err = lg_1mb.err + lg_1pamb.err; + gsl_sf_hyperg_1F1_large_b_e(a, b, x, &M); + } + + if(lnpre_val > GSL_LOG_DBL_MAX-10.0) { + result->val = M.val; + result->err = M.err; + *ln_multiplier = lnpre_val; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + gsl_sf_result epre; + int stat_e = gsl_sf_exp_err_e(lnpre_val, lnpre_err, &epre); + result->val = epre.val * M.val; + result->err = epre.val * M.err + epre.err * fabs(M.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *ln_multiplier = 0.0; + return stat_e; + } + } + else { + double omb_lnx = (1.0-b)*log(x); + gsl_sf_result lg_1mb; double sgn_1mb; + gsl_sf_result lg_1pamb; double sgn_1pamb; + gsl_sf_result lg_bm1; double sgn_bm1; + gsl_sf_result lg_a; double sgn_a; + gsl_sf_result M1, M2; + double lnpre1_val, lnpre2_val; + double lnpre1_err, lnpre2_err; + double sgpre1, sgpre2; + gsl_sf_hyperg_1F1_large_b_e( a, b, x, &M1); + gsl_sf_hyperg_1F1_large_b_e(1.0-a, 2.0-b, x, &M2); + + gsl_sf_lngamma_sgn_e(1.0-b, &lg_1mb, &sgn_1mb); + gsl_sf_lngamma_sgn_e(1.0+a-b, &lg_1pamb, &sgn_1pamb); + + gsl_sf_lngamma_sgn_e(b-1.0, &lg_bm1, &sgn_bm1); + gsl_sf_lngamma_sgn_e(a, &lg_a, &sgn_a); + + lnpre1_val = lg_1mb.val - lg_1pamb.val; + lnpre1_err = lg_1mb.err + lg_1pamb.err; + lnpre2_val = lg_bm1.val - lg_a.val - omb_lnx - x; + lnpre2_err = lg_bm1.err + lg_a.err + GSL_DBL_EPSILON * (fabs(omb_lnx)+fabs(x)); + sgpre1 = sgn_1mb * sgn_1pamb; + sgpre2 = sgn_bm1 * sgn_a; + + if(lnpre1_val > GSL_LOG_DBL_MAX-10.0 || lnpre2_val > GSL_LOG_DBL_MAX-10.0) { + double max_lnpre_val = GSL_MAX(lnpre1_val,lnpre2_val); + double max_lnpre_err = GSL_MAX(lnpre1_err,lnpre2_err); + double lp1 = lnpre1_val - max_lnpre_val; + double lp2 = lnpre2_val - max_lnpre_val; + double t1 = sgpre1*exp(lp1); + double t2 = sgpre2*exp(lp2); + result->val = t1*M1.val + t2*M2.val; + result->err = fabs(t1)*M1.err + fabs(t2)*M2.err; + result->err += GSL_DBL_EPSILON * exp(max_lnpre_err) * (fabs(t1*M1.val) + fabs(t2*M2.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *ln_multiplier = max_lnpre_val; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + double t1 = sgpre1*exp(lnpre1_val); + double t2 = sgpre2*exp(lnpre2_val); + result->val = t1*M1.val + t2*M2.val; + result->err = fabs(t1) * M1.err + fabs(t2)*M2.err; + result->err += GSL_DBL_EPSILON * (exp(lnpre1_err)*fabs(t1*M1.val) + exp(lnpre2_err)*fabs(t2*M2.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *ln_multiplier = 0.0; + return GSL_SUCCESS; + } + } +} + + + +/* [Carlson, p.109] says the error in truncating this asymptotic series + * is less than the absolute value of the first neglected term. + * + * A termination argument is provided, so that the series will + * be summed at most up to n=n_trunc. If n_trunc is set negative, + * then the series is summed until it appears to start diverging. + */ +int +gsl_sf_hyperg_2F0_series_e(const double a, const double b, const double x, + int n_trunc, + gsl_sf_result * result + ) +{ + const int maxiter = 2000; + double an = a; + double bn = b; + double n = 1.0; + double sum = 1.0; + double del = 1.0; + double abs_del = 1.0; + double max_abs_del = 1.0; + double last_abs_del = 1.0; + + while(abs_del/fabs(sum) > GSL_DBL_EPSILON && n < maxiter) { + + double u = an * (bn/n * x); + double abs_u = fabs(u); + + if(abs_u > 1.0 && (max_abs_del > GSL_DBL_MAX/abs_u)) { + result->val = sum; + result->err = fabs(sum); + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + + del *= u; + sum += del; + + abs_del = fabs(del); + + if(abs_del > last_abs_del) break; /* series is probably starting to grow */ + + last_abs_del = abs_del; + max_abs_del = GSL_MAX(abs_del, max_abs_del); + + an += 1.0; + bn += 1.0; + n += 1.0; + + if(an == 0.0 || bn == 0.0) break; /* series terminated */ + + if(n_trunc >= 0 && n >= n_trunc) break; /* reached requested timeout */ + } + + result->val = sum; + result->err = GSL_DBL_EPSILON * n + abs_del; + if(n >= maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/specfunc/hyperg.h b/software/gsl-1.15/specfunc/hyperg.h new file mode 100644 index 000000000..37d11b046 --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg.h @@ -0,0 +1,78 @@ +/* specfunc/hyperg.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Miscellaneous implementations of use + * for evaluation of hypergeometric functions. + */ +#ifndef _HYPERG_H_ +#define _HYPERG_H_ + +#include + + +/* Direct implementation of 1F1 series. + */ +int +gsl_sf_hyperg_1F1_series_e(const double a, const double b, const double x, gsl_sf_result * result); + + +/* Implementation of the 1F1 related to the + * incomplete gamma function: 1F1(1,b,x), b >= 1. + */ +int +gsl_sf_hyperg_1F1_1_e(double b, double x, gsl_sf_result * result); + + +/* 1F1(1,b,x) for integer b >= 1 + */ +int +gsl_sf_hyperg_1F1_1_int_e(int b, double x, gsl_sf_result * result); + + +/* Implementation of large b asymptotic. + * [Bateman v. I, 6.13.3 (18)] + * [Luke, The Special Functions and Their Approximations v. I, p. 129, 4.8 (4)] + * + * a^2 << b, |x|/|b| < 1 - delta + */ +int +gsl_sf_hyperg_1F1_large_b_e(const double a, const double b, const double x, gsl_sf_result * result); + + +/* Implementation of large b asymptotic. + * + * Assumes a > 0 is small, x > 0, and |x|<|b|. + */ +int +gsl_sf_hyperg_U_large_b_e(const double a, const double b, const double x, + gsl_sf_result * result, + double * ln_multiplier + ); + + +/* Implementation of 2F0 asymptotic series. + */ +int +gsl_sf_hyperg_2F0_series_e(const double a, const double b, const double x, int n_trunc, + gsl_sf_result * result); + + +#endif /* !_HYPERG_H_ */ diff --git a/software/gsl-1.15/specfunc/hyperg_0F1.c b/software/gsl-1.15/specfunc/hyperg_0F1.c new file mode 100644 index 000000000..9461bad7b --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg_0F1.c @@ -0,0 +1,178 @@ +/* specfunc/hyperg_0F1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#define locEPS (1000.0*GSL_DBL_EPSILON) + + +/* Evaluate bessel_I(nu, x), allowing nu < 0. + * This is fine here because we do not not allow + * nu to be a negative integer. + * x > 0. + */ +static +int +hyperg_0F1_bessel_I(const double nu, const double x, gsl_sf_result * result) +{ + if(x > GSL_LOG_DBL_MAX) { + OVERFLOW_ERROR(result); + } + + if(nu < 0.0) { + const double anu = -nu; + const double s = 2.0/M_PI * sin(anu*M_PI); + const double ex = exp(x); + gsl_sf_result I; + gsl_sf_result K; + int stat_I = gsl_sf_bessel_Inu_scaled_e(anu, x, &I); + int stat_K = gsl_sf_bessel_Knu_scaled_e(anu, x, &K); + result->val = ex * I.val + s * (K.val / ex); + result->err = ex * I.err + fabs(s * K.err/ex); + result->err += fabs(s * (K.val/ex)) * GSL_DBL_EPSILON * anu * M_PI; + return GSL_ERROR_SELECT_2(stat_K, stat_I); + } + else { + const double ex = exp(x); + gsl_sf_result I; + int stat_I = gsl_sf_bessel_Inu_scaled_e(nu, x, &I); + result->val = ex * I.val; + result->err = ex * I.err + GSL_DBL_EPSILON * fabs(result->val); + return stat_I; + } +} + + +/* Evaluate bessel_J(nu, x), allowing nu < 0. + * This is fine here because we do not not allow + * nu to be a negative integer. + * x > 0. + */ +static +int +hyperg_0F1_bessel_J(const double nu, const double x, gsl_sf_result * result) +{ + if(nu < 0.0) { + const double anu = -nu; + const double s = sin(anu*M_PI); + const double c = cos(anu*M_PI); + gsl_sf_result J; + gsl_sf_result Y; + int stat_J = gsl_sf_bessel_Jnu_e(anu, x, &J); + int stat_Y = gsl_sf_bessel_Ynu_e(anu, x, &Y); + result->val = c * J.val - s * Y.val; + result->err = fabs(c * J.err) + fabs(s * Y.err); + result->err += fabs(anu * M_PI) * GSL_DBL_EPSILON * fabs(J.val + Y.val); + return GSL_ERROR_SELECT_2(stat_Y, stat_J); + } + else { + return gsl_sf_bessel_Jnu_e(nu, x, result); + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_hyperg_0F1_e(double c, double x, gsl_sf_result * result) +{ + const double rintc = floor(c + 0.5); + const int c_neg_integer = (c < 0.0 && fabs(c - rintc) < locEPS); + + /* CHECK_POINTER(result) */ + + if(c == 0.0 || c_neg_integer) { + DOMAIN_ERROR(result); + } + else if(x < 0.0) { + gsl_sf_result Jcm1; + gsl_sf_result lg_c; + double sgn; + int stat_g = gsl_sf_lngamma_sgn_e(c, &lg_c, &sgn); + int stat_J = hyperg_0F1_bessel_J(c-1.0, 2.0*sqrt(-x), &Jcm1); + if(stat_g != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + return stat_g; + } + else if(Jcm1.val == 0.0) { + result->val = 0.0; + result->err = 0.0; + return stat_J; + } + else { + const double tl = log(-x)*0.5*(1.0-c); + double ln_pre_val = lg_c.val + tl; + double ln_pre_err = lg_c.err + 2.0 * GSL_DBL_EPSILON * fabs(tl); + return gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + sgn*Jcm1.val, Jcm1.err, + result); + } + } + else if(x == 0.0) { + result->val = 1.0; + result->err = 1.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result Icm1; + gsl_sf_result lg_c; + double sgn; + int stat_g = gsl_sf_lngamma_sgn_e(c, &lg_c, &sgn); + int stat_I = hyperg_0F1_bessel_I(c-1.0, 2.0*sqrt(x), &Icm1); + if(stat_g != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + return stat_g; + } + else if(Icm1.val == 0.0) { + result->val = 0.0; + result->err = 0.0; + return stat_I; + } + else { + const double tl = log(x)*0.5*(1.0-c); + const double ln_pre_val = lg_c.val + tl; + const double ln_pre_err = lg_c.err + 2.0 * GSL_DBL_EPSILON * fabs(tl); + return gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + sgn*Icm1.val, Icm1.err, + result); + } + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hyperg_0F1(const double c, const double x) +{ + EVAL_RESULT(gsl_sf_hyperg_0F1_e(c, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/hyperg_1F1.c b/software/gsl-1.15/specfunc/hyperg_1F1.c new file mode 100644 index 000000000..dc411f571 --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg_1F1.c @@ -0,0 +1,2065 @@ +/* specfunc/hyperg_1F1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "hyperg.h" + +#define _1F1_INT_THRESHOLD (100.0*GSL_DBL_EPSILON) + + +/* Asymptotic result for 1F1(a, b, x) x -> -Infinity. + * Assumes b-a != neg integer and b != neg integer. + */ +static +int +hyperg_1F1_asymp_negx(const double a, const double b, const double x, + gsl_sf_result * result) +{ + gsl_sf_result lg_b; + gsl_sf_result lg_bma; + double sgn_b; + double sgn_bma; + + int stat_b = gsl_sf_lngamma_sgn_e(b, &lg_b, &sgn_b); + int stat_bma = gsl_sf_lngamma_sgn_e(b-a, &lg_bma, &sgn_bma); + + if(stat_b == GSL_SUCCESS && stat_bma == GSL_SUCCESS) { + gsl_sf_result F; + int stat_F = gsl_sf_hyperg_2F0_series_e(a, 1.0+a-b, -1.0/x, -1, &F); + if(F.val != 0) { + double ln_term_val = a*log(-x); + double ln_term_err = 2.0 * GSL_DBL_EPSILON * (fabs(a) + fabs(ln_term_val)); + double ln_pre_val = lg_b.val - lg_bma.val - ln_term_val; + double ln_pre_err = lg_b.err + lg_bma.err + ln_term_err; + int stat_e = gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + sgn_bma*sgn_b*F.val, F.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_F); + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_F; + } + } + else { + DOMAIN_ERROR(result); + } +} + + +/* Asymptotic result for 1F1(a, b, x) x -> +Infinity + * Assumes b != neg integer and a != neg integer + */ +static +int +hyperg_1F1_asymp_posx(const double a, const double b, const double x, + gsl_sf_result * result) +{ + gsl_sf_result lg_b; + gsl_sf_result lg_a; + double sgn_b; + double sgn_a; + + int stat_b = gsl_sf_lngamma_sgn_e(b, &lg_b, &sgn_b); + int stat_a = gsl_sf_lngamma_sgn_e(a, &lg_a, &sgn_a); + + if(stat_a == GSL_SUCCESS && stat_b == GSL_SUCCESS) { + gsl_sf_result F; + int stat_F = gsl_sf_hyperg_2F0_series_e(b-a, 1.0-a, 1.0/x, -1, &F); + if(stat_F == GSL_SUCCESS && F.val != 0) { + double lnx = log(x); + double ln_term_val = (a-b)*lnx; + double ln_term_err = 2.0 * GSL_DBL_EPSILON * (fabs(a) + fabs(b)) * fabs(lnx) + + 2.0 * GSL_DBL_EPSILON * fabs(a-b); + double ln_pre_val = lg_b.val - lg_a.val + ln_term_val + x; + double ln_pre_err = lg_b.err + lg_a.err + ln_term_err + 2.0 * GSL_DBL_EPSILON * fabs(x); + int stat_e = gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + sgn_a*sgn_b*F.val, F.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_F); + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_F; + } + } + else { + DOMAIN_ERROR(result); + } +} + +/* Asymptotic result from Slater 4.3.7 + * + * To get the general series, write M(a,b,x) as + * + * M(a,b,x)=sum ((a)_n/(b)_n) (x^n / n!) + * + * and expand (b)_n in inverse powers of b as follows + * + * -log(1/(b)_n) = sum_(k=0)^(n-1) log(b+k) + * = n log(b) + sum_(k=0)^(n-1) log(1+k/b) + * + * Do a taylor expansion of the log in 1/b and sum the resulting terms + * using the standard algebraic formulas for finite sums of powers of + * k. This should then give + * + * M(a,b,x) = sum_(n=0)^(inf) (a_n/n!) (x/b)^n * (1 - n(n-1)/(2b) + * + (n-1)n(n+1)(3n-2)/(24b^2) + ... + * + * which can be summed explicitly. The trick for summing it is to take + * derivatives of sum_(i=0)^(inf) a_n*y^n/n! = (1-y)^(-a); + * + * [BJG 16/01/2007] + */ + +static +int +hyperg_1F1_largebx(const double a, const double b, const double x, gsl_sf_result * result) +{ + double y = x/b; + double f = exp(-a*log1p(-y)); + double t1 = -((a*(a+1.0))/(2*b))*pow((y/(1.0-y)),2.0); + double t2 = (1/(24*b*b))*((a*(a+1)*y*y)/pow(1-y,4))*(12+8*(2*a+1)*y+(3*a*a-a-2)*y*y); + double t3 = (-1/(48*b*b*b*pow(1-y,6)))*a*((a + 1)*((y*((a + 1)*(a*(y*(y*((y*(a - 2) + 16)*(a - 1)) + 72)) + 96)) + 24)*pow(y, 2))); + result->val = f * (1 + t1 + t2 + t3); + result->err = 2*fabs(f*t3) + 2*GSL_DBL_EPSILON*fabs(result->val); + return GSL_SUCCESS; +} + +/* Asymptotic result for x < 2b-4a, 2b-4a large. + * [Abramowitz+Stegun, 13.5.21] + * + * assumes 0 <= x/(2b-4a) <= 1 + */ +static +int +hyperg_1F1_large2bm4a(const double a, const double b, const double x, gsl_sf_result * result) +{ + double eta = 2.0*b - 4.0*a; + double cos2th = x/eta; + double sin2th = 1.0 - cos2th; + double th = acos(sqrt(cos2th)); + double pre_h = 0.25*M_PI*M_PI*eta*eta*cos2th*sin2th; + gsl_sf_result lg_b; + int stat_lg = gsl_sf_lngamma_e(b, &lg_b); + double t1 = 0.5*(1.0-b)*log(0.25*x*eta); + double t2 = 0.25*log(pre_h); + double lnpre_val = lg_b.val + 0.5*x + t1 - t2; + double lnpre_err = lg_b.err + 2.0 * GSL_DBL_EPSILON * (fabs(0.5*x) + fabs(t1) + fabs(t2)); +#if SMALL_ANGLE + const double eps = asin(sqrt(cos2th)); /* theta = pi/2 - eps */ + double s1 = (fmod(a, 1.0) == 0.0) ? 0.0 : sin(a*M_PI); + double eta_reduc = (fmod(eta + 1, 4.0) == 0.0) ? 0.0 : fmod(eta + 1, 8.0); + double phi1 = 0.25*eta_reduc*M_PI; + double phi2 = 0.25*eta*(2*eps + sin(2.0*eps)); + double s2 = sin(phi1 - phi2); +#else + double s1 = sin(a*M_PI); + double s2 = sin(0.25*eta*(2.0*th - sin(2.0*th)) + 0.25*M_PI); +#endif + double ser_val = s1 + s2; + double ser_err = 2.0 * GSL_DBL_EPSILON * (fabs(s1) + fabs(s2)); + int stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, + ser_val, ser_err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_lg); +} + + +/* Luke's rational approximation. + * See [Luke, Algorithms for the Computation of Mathematical Functions, p.182] + * + * Like the case of the 2F1 rational approximations, these are + * probably guaranteed to converge for x < 0, barring gross + * numerical instability in the pre-asymptotic regime. + */ +static +int +hyperg_1F1_luke(const double a, const double c, const double xin, + gsl_sf_result * result) +{ + const double RECUR_BIG = 1.0e+50; + const int nmax = 5000; + int n = 3; + const double x = -xin; + const double x3 = x*x*x; + const double t0 = a/c; + const double t1 = (a+1.0)/(2.0*c); + const double t2 = (a+2.0)/(2.0*(c+1.0)); + double F = 1.0; + double prec; + + double Bnm3 = 1.0; /* B0 */ + double Bnm2 = 1.0 + t1 * x; /* B1 */ + double Bnm1 = 1.0 + t2 * x * (1.0 + t1/3.0 * x); /* B2 */ + + double Anm3 = 1.0; /* A0 */ + double Anm2 = Bnm2 - t0 * x; /* A1 */ + double Anm1 = Bnm1 - t0*(1.0 + t2*x)*x + t0 * t1 * (c/(c+1.0)) * x*x; /* A2 */ + + while(1) { + double npam1 = n + a - 1; + double npcm1 = n + c - 1; + double npam2 = n + a - 2; + double npcm2 = n + c - 2; + double tnm1 = 2*n - 1; + double tnm3 = 2*n - 3; + double tnm5 = 2*n - 5; + double F1 = (n-a-2) / (2*tnm3*npcm1); + double F2 = (n+a)*npam1 / (4*tnm1*tnm3*npcm2*npcm1); + double F3 = -npam2*npam1*(n-a-2) / (8*tnm3*tnm3*tnm5*(n+c-3)*npcm2*npcm1); + double E = -npam1*(n-c-1) / (2*tnm3*npcm2*npcm1); + + double An = (1.0+F1*x)*Anm1 + (E + F2*x)*x*Anm2 + F3*x3*Anm3; + double Bn = (1.0+F1*x)*Bnm1 + (E + F2*x)*x*Bnm2 + F3*x3*Bnm3; + double r = An/Bn; + + prec = fabs((F - r)/F); + F = r; + + if(prec < GSL_DBL_EPSILON || n > nmax) break; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + Anm3 /= RECUR_BIG; + Bnm3 /= RECUR_BIG; + } + else if(fabs(An) < 1.0/RECUR_BIG || fabs(Bn) < 1.0/RECUR_BIG) { + An *= RECUR_BIG; + Bn *= RECUR_BIG; + Anm1 *= RECUR_BIG; + Bnm1 *= RECUR_BIG; + Anm2 *= RECUR_BIG; + Bnm2 *= RECUR_BIG; + Anm3 *= RECUR_BIG; + Bnm3 *= RECUR_BIG; + } + + n++; + Bnm3 = Bnm2; + Bnm2 = Bnm1; + Bnm1 = Bn; + Anm3 = Anm2; + Anm2 = Anm1; + Anm1 = An; + } + + result->val = F; + result->err = 2.0 * fabs(F * prec); + result->err += 2.0 * GSL_DBL_EPSILON * (n-1.0) * fabs(F); + + return GSL_SUCCESS; +} + +/* Series for 1F1(1,b,x) + * b > 0 + */ +static +int +hyperg_1F1_1_series(const double b, const double x, gsl_sf_result * result) +{ + double sum_val = 1.0; + double sum_err = 0.0; + double term = 1.0; + double n = 1.0; + while(fabs(term/sum_val) > 0.25*GSL_DBL_EPSILON) { + term *= x/(b+n-1); + sum_val += term; + sum_err += 8.0*GSL_DBL_EPSILON*fabs(term) + GSL_DBL_EPSILON*fabs(sum_val); + n += 1.0; + } + result->val = sum_val; + result->err = sum_err; + result->err += 2.0 * fabs(term); + return GSL_SUCCESS; +} + + +/* 1F1(1,b,x) + * b >= 1, b integer + */ +static +int +hyperg_1F1_1_int(const int b, const double x, gsl_sf_result * result) +{ + if(b < 1) { + DOMAIN_ERROR(result); + } + else if(b == 1) { + return gsl_sf_exp_e(x, result); + } + else if(b == 2) { + return gsl_sf_exprel_e(x, result); + } + else if(b == 3) { + return gsl_sf_exprel_2_e(x, result); + } + else { + return gsl_sf_exprel_n_e(b-1, x, result); + } +} + + +/* 1F1(1,b,x) + * b >=1, b real + * + * checked OK: [GJ] Thu Oct 1 16:46:35 MDT 1998 + */ +static +int +hyperg_1F1_1(const double b, const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + double ib = floor(b + 0.1); + + if(b < 1.0) { + DOMAIN_ERROR(result); + } + else if(b == 1.0) { + return gsl_sf_exp_e(x, result); + } + else if(b >= 1.4*ax) { + return hyperg_1F1_1_series(b, x, result); + } + else if(fabs(b - ib) < _1F1_INT_THRESHOLD && ib < INT_MAX) { + return hyperg_1F1_1_int((int)ib, x, result); + } + else if(x > 0.0) { + if(x > 100.0 && b < 0.75*x) { + return hyperg_1F1_asymp_posx(1.0, b, x, result); + } + else if(b < 1.0e+05) { + /* Recurse backward on b, from a + * chosen offset point. For x > 0, + * which holds here, this should + * be a stable direction. + */ + const double off = ceil(1.4*x-b) + 1.0; + double bp = b + off; + gsl_sf_result M; + int stat_s = hyperg_1F1_1_series(bp, x, &M); + const double err_rat = M.err / fabs(M.val); + while(bp > b+0.1) { + /* M(1,b-1) = x/(b-1) M(1,b) + 1 */ + bp -= 1.0; + M.val = 1.0 + x/bp * M.val; + } + result->val = M.val; + result->err = err_rat * fabs(M.val); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(off)+1.0) * fabs(M.val); + return stat_s; + } else if (fabs(x) < fabs(b) && fabs(x) < sqrt(fabs(b)) * fabs(b-x)) { + return hyperg_1F1_largebx(1.0, b, x, result); + } else if (fabs(x) > fabs(b)) { + return hyperg_1F1_1_series(b, x, result); + } else { + return hyperg_1F1_large2bm4a(1.0, b, x, result); + } + } + else { + /* x <= 0 and b not large compared to |x| + */ + if(ax < 10.0 && b < 10.0) { + return hyperg_1F1_1_series(b, x, result); + } + else if(ax >= 100.0 && GSL_MAX_DBL(fabs(2.0-b),1.0) < 0.99*ax) { + return hyperg_1F1_asymp_negx(1.0, b, x, result); + } + else { + return hyperg_1F1_luke(1.0, b, x, result); + } + } +} + + +/* 1F1(a,b,x)/Gamma(b) for b->0 + * [limit of Abramowitz+Stegun 13.3.7] + */ +static +int +hyperg_1F1_renorm_b0(const double a, const double x, gsl_sf_result * result) +{ + double eta = a*x; + if(eta > 0.0) { + double root_eta = sqrt(eta); + gsl_sf_result I1_scaled; + int stat_I = gsl_sf_bessel_I1_scaled_e(2.0*root_eta, &I1_scaled); + if(I1_scaled.val <= 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_ERROR_SELECT_2(stat_I, GSL_EDOM); + } + else { + /* Note that 13.3.7 contains higher terms which are zeroth order + in b. These make a non-negligible contribution to the sum. + With the first correction term, the I1 above is replaced by + I1 + (2/3)*a*(x/(4a))**(3/2)*I2(2*root_eta). We will add + this as part of the result and error estimate. */ + + const double corr1 =(2.0/3.0)*a*pow(x/(4.0*a),1.5)*gsl_sf_bessel_In_scaled(2, 2.0*root_eta) + ; + const double lnr_val = 0.5*x + 0.5*log(eta) + fabs(2.0*root_eta) + log(I1_scaled.val+corr1); + const double lnr_err = GSL_DBL_EPSILON * (1.5*fabs(x) + 1.0) + fabs((I1_scaled.err+corr1)/I1_scaled.val); + return gsl_sf_exp_err_e(lnr_val, lnr_err, result); + } + } + else if(eta == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* eta < 0 */ + double root_eta = sqrt(-eta); + gsl_sf_result J1; + int stat_J = gsl_sf_bessel_J1_e(2.0*root_eta, &J1); + if(J1.val <= 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_ERROR_SELECT_2(stat_J, GSL_EDOM); + } + else { + const double t1 = 0.5*x; + const double t2 = 0.5*log(-eta); + const double t3 = fabs(x); + const double t4 = log(J1.val); + const double lnr_val = t1 + t2 + t3 + t4; + const double lnr_err = GSL_DBL_EPSILON * (1.5*fabs(x) + 1.0) + fabs(J1.err/J1.val); + gsl_sf_result ex; + int stat_e = gsl_sf_exp_err_e(lnr_val, lnr_err, &ex); + result->val = -ex.val; + result->err = ex.err; + return stat_e; + } + } + +} + + +/* 1F1'(a,b,x)/1F1(a,b,x) + * Uses Gautschi's version of the CF. + * [Gautschi, Math. Comp. 31, 994 (1977)] + * + * Supposedly this suffers from the "anomalous convergence" + * problem when b < x. I have seen anomalous convergence + * in several of the continued fractions associated with + * 1F1(a,b,x). This particular CF formulation seems stable + * for b > x. However, it does display a painful artifact + * of the anomalous convergence; the convergence plateaus + * unless b >>> x. For example, even for b=1000, x=1, this + * method locks onto a ratio which is only good to about + * 4 digits. Apparently the rest of the digits are hiding + * way out on the plateau, but finite-precision lossage + * means you will never get them. + */ +#if 0 +static +int +hyperg_1F1_CF1_p(const double a, const double b, const double x, double * result) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 5000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = 1.0; + double b1 = 1.0; + double An = b1*Anm1 + a1*Anm2; + double Bn = b1*Bnm1 + a1*Bnm2; + double an, bn; + double fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = (a+n)*x/((b-x+n-1)*(b-x+n)); + bn = 1.0; + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 10.0*GSL_DBL_EPSILON) break; + } + + *result = a/(b-x) * fn; + + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* 1F1'(a,b,x)/1F1(a,b,x) + * Uses Gautschi's series transformation of the + * continued fraction. This is apparently the best + * method for getting this ratio in the stable region. + * The convergence is monotone and supergeometric + * when b > x. + * Assumes a >= -1. + */ +static +int +hyperg_1F1_CF1_p_ser(const double a, const double b, const double x, double * result) +{ + if(a == 0.0) { + *result = 0.0; + return GSL_SUCCESS; + } + else { + const int maxiter = 5000; + double sum = 1.0; + double pk = 1.0; + double rhok = 0.0; + int k; + for(k=1; k RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 10.0*GSL_DBL_EPSILON) break; + } + + *result = fn; + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* 1F1(a,b+1,x)/1F1(a,b,x) + * + * This seemed to suffer from "anomalous convergence". + * However, I have no theory for this recurrence. + */ +#if 0 +static +int +hyperg_1F1_CF1_b(const double a, const double b, const double x, double * result) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 5000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = b + 1.0; + double b1 = (b + 1.0) * (b - x); + double An = b1*Anm1 + a1*Anm2; + double Bn = b1*Bnm1 + a1*Bnm2; + double an, bn; + double fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = (b + n) * (b + n - 1.0 - a) * x; + bn = (b + n) * (b + n - 1.0 - x); + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 10.0*GSL_DBL_EPSILON) break; + } + + *result = fn; + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* 1F1(a,b,x) + * |a| <= 1, b > 0 + */ +static +int +hyperg_1F1_small_a_bgt0(const double a, const double b, const double x, gsl_sf_result * result) +{ + const double bma = b-a; + const double oma = 1.0-a; + const double ap1mb = 1.0+a-b; + const double abs_bma = fabs(bma); + const double abs_oma = fabs(oma); + const double abs_ap1mb = fabs(ap1mb); + + const double ax = fabs(x); + + if(a == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(a == 1.0 && b >= 1.0) { + return hyperg_1F1_1(b, x, result); + } + else if(a == -1.0) { + result->val = 1.0 + a/b * x; + result->err = GSL_DBL_EPSILON * (1.0 + fabs(a/b * x)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(b >= 1.4*ax) { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if(x > 0.0) { + if(x > 100.0 && abs_bma*abs_oma < 0.5*x) { + return hyperg_1F1_asymp_posx(a, b, x, result); + } + else if(b < 5.0e+06) { + /* Recurse backward on b from + * a suitably high point. + */ + const double b_del = ceil(1.4*x-b) + 1.0; + double bp = b + b_del; + gsl_sf_result r_Mbp1; + gsl_sf_result r_Mb; + double Mbp1; + double Mb; + double Mbm1; + int stat_0 = gsl_sf_hyperg_1F1_series_e(a, bp+1.0, x, &r_Mbp1); + int stat_1 = gsl_sf_hyperg_1F1_series_e(a, bp, x, &r_Mb); + const double err_rat = fabs(r_Mbp1.err/r_Mbp1.val) + fabs(r_Mb.err/r_Mb.val); + Mbp1 = r_Mbp1.val; + Mb = r_Mb.val; + while(bp > b+0.1) { + /* Do backward recursion. */ + Mbm1 = ((x+bp-1.0)*Mb - x*(bp-a)/bp*Mbp1)/(bp-1.0); + bp -= 1.0; + Mbp1 = Mb; + Mb = Mbm1; + } + result->val = Mb; + result->err = err_rat * (fabs(b_del)+1.0) * fabs(Mb); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(Mb); + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } + else if (fabs(x) < fabs(b) && fabs(a*x) < sqrt(fabs(b)) * fabs(b-x)) { + return hyperg_1F1_largebx(a, b, x, result); + } else { + return hyperg_1F1_large2bm4a(a, b, x, result); + } + } + else { + /* x < 0 and b not large compared to |x| + */ + if(ax < 10.0 && b < 10.0) { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if(ax >= 100.0 && GSL_MAX(abs_ap1mb,1.0) < 0.99*ax) { + return hyperg_1F1_asymp_negx(a, b, x, result); + } + else { + return hyperg_1F1_luke(a, b, x, result); + } + } +} + + +/* 1F1(b+eps,b,x) + * |eps|<=1, b > 0 + */ +static +int +hyperg_1F1_beps_bgt0(const double eps, const double b, const double x, gsl_sf_result * result) +{ + if(b > fabs(x) && fabs(eps) < GSL_SQRT_DBL_EPSILON) { + /* If b-a is very small and x/b is not too large we can + * use this explicit approximation. + * + * 1F1(b+eps,b,x) = exp(ax/b) (1 - eps x^2 (v2 + v3 x + ...) + ...) + * + * v2 = a/(2b^2(b+1)) + * v3 = a(b-2a)/(3b^3(b+1)(b+2)) + * ... + * + * See [Luke, Mathematical Functions and Their Approximations, p.292] + * + * This cannot be used for b near a negative integer or zero. + * Also, if x/b is large the deviation from exp(x) behaviour grows. + */ + double a = b + eps; + gsl_sf_result exab; + int stat_e = gsl_sf_exp_e(a*x/b, &exab); + double v2 = a/(2.0*b*b*(b+1.0)); + double v3 = a*(b-2.0*a)/(3.0*b*b*b*(b+1.0)*(b+2.0)); + double v = v2 + v3 * x; + double f = (1.0 - eps*x*x*v); + result->val = exab.val * f; + result->err = exab.err * fabs(f); + result->err += fabs(exab.val) * GSL_DBL_EPSILON * (1.0 + fabs(eps*x*x*v)); + result->err += 4.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_e; + } + else { + /* Otherwise use a Kummer transformation to reduce + * it to the small a case. + */ + gsl_sf_result Kummer_1F1; + int stat_K = hyperg_1F1_small_a_bgt0(-eps, b, -x, &Kummer_1F1); + if(Kummer_1F1.val != 0.0) { + int stat_e = gsl_sf_exp_mult_err_e(x, 2.0*GSL_DBL_EPSILON*fabs(x), + Kummer_1F1.val, Kummer_1F1.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_K; + } + } +} + + +/* 1F1(a,2a,x) = Gamma(a + 1/2) E(x) (|x|/4)^(-a+1/2) scaled_I(a-1/2,|x|/2) + * + * E(x) = exp(x) x > 0 + * = 1 x < 0 + * + * a >= 1/2 + */ +static +int +hyperg_1F1_beq2a_pos(const double a, const double x, gsl_sf_result * result) +{ + if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result I; + int stat_I = gsl_sf_bessel_Inu_scaled_e(a-0.5, 0.5*fabs(x), &I); + gsl_sf_result lg; + int stat_g = gsl_sf_lngamma_e(a + 0.5, &lg); + double ln_term = (0.5-a)*log(0.25*fabs(x)); + double lnpre_val = lg.val + GSL_MAX_DBL(x,0.0) + ln_term; + double lnpre_err = lg.err + GSL_DBL_EPSILON * (fabs(ln_term) + fabs(x)); + int stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, + I.val, I.err, + result); + return GSL_ERROR_SELECT_3(stat_e, stat_g, stat_I); + } +} + + +/* Determine middle parts of diagonal recursion along b=2a + * from two endpoints, i.e. + * + * given: M(a,b) and M(a+1,b+2) + * get: M(a+1,b+1) and M(a,b+1) + */ +#if 0 +inline +static +int +hyperg_1F1_diag_step(const double a, const double b, const double x, + const double Mab, const double Map1bp2, + double * Map1bp1, double * Mabp1) +{ + if(a == b) { + *Map1bp1 = Mab; + *Mabp1 = Mab - x/(b+1.0) * Map1bp2; + } + else { + *Map1bp1 = Mab - x * (a-b)/(b*(b+1.0)) * Map1bp2; + *Mabp1 = (a * *Map1bp1 - b * Mab)/(a-b); + } + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* Determine endpoint of diagonal recursion. + * + * given: M(a,b) and M(a+1,b+2) + * get: M(a+1,b) and M(a+1,b+1) + */ +#if 0 +inline +static +int +hyperg_1F1_diag_end_step(const double a, const double b, const double x, + const double Mab, const double Map1bp2, + double * Map1b, double * Map1bp1) +{ + *Map1bp1 = Mab - x * (a-b)/(b*(b+1.0)) * Map1bp2; + *Map1b = Mab + x/b * *Map1bp1; + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* Handle the case of a and b both positive integers. + * Assumes a > 0 and b > 0. + */ +static +int +hyperg_1F1_ab_posint(const int a, const int b, const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + if(a == b) { + return gsl_sf_exp_e(x, result); /* 1F1(a,a,x) */ + } + else if(a == 1) { + return gsl_sf_exprel_n_e(b-1, x, result); /* 1F1(1,b,x) */ + } + else if(b == a + 1) { + gsl_sf_result K; + int stat_K = gsl_sf_exprel_n_e(a, -x, &K); /* 1F1(1,1+a,-x) */ + int stat_e = gsl_sf_exp_mult_err_e(x, 2.0 * GSL_DBL_EPSILON * fabs(x), + K.val, K.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else if(a == b + 1) { + gsl_sf_result ex; + int stat_e = gsl_sf_exp_e(x, &ex); + result->val = ex.val * (1.0 + x/b); + result->err = ex.err * (1.0 + x/b); + result->err += ex.val * GSL_DBL_EPSILON * (1.0 + fabs(x/b)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_e; + } + else if(a == b + 2) { + gsl_sf_result ex; + int stat_e = gsl_sf_exp_e(x, &ex); + double poly = (1.0 + x/b*(2.0 + x/(b+1.0))); + result->val = ex.val * poly; + result->err = ex.err * fabs(poly); + result->err += ex.val * GSL_DBL_EPSILON * (1.0 + fabs(x/b) * (2.0 + fabs(x/(b+1.0)))); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_e; + } + else if(b == 2*a) { + return hyperg_1F1_beq2a_pos(a, x, result); /* 1F1(a,2a,x) */ + } + else if( ( b < 10 && a < 10 && ax < 5.0 ) + || ( b > a*ax ) + || ( b > a && ax < 5.0 ) + ) { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if(b > a && b >= 2*a + x) { + /* Use the Gautschi CF series, then + * recurse backward to a=0 for normalization. + * This will work for either sign of x. + */ + double rap; + int stat_CF1 = hyperg_1F1_CF1_p_ser(a, b, x, &rap); + double ra = 1.0 + x/a * rap; + double Ma = GSL_SQRT_DBL_MIN; + double Map1 = ra * Ma; + double Mnp1 = Map1; + double Mn = Ma; + double Mnm1; + int n; + for(n=a; n>0; n--) { + Mnm1 = (n * Mnp1 - (2*n-b+x) * Mn) / (b-n); + Mnp1 = Mn; + Mn = Mnm1; + } + result->val = Ma/Mn; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(a) + 1.0) * fabs(Ma/Mn); + return stat_CF1; + } + else if(b > a && b < 2*a + x && b > x) { + /* Use the Gautschi series representation of + * the continued fraction. Then recurse forward + * to the a=b line for normalization. This will + * work for either sign of x, although we do need + * to check for b > x, for when x is positive. + */ + double rap; + int stat_CF1 = hyperg_1F1_CF1_p_ser(a, b, x, &rap); + double ra = 1.0 + x/a * rap; + gsl_sf_result ex; + int stat_ex; + + double Ma = GSL_SQRT_DBL_MIN; + double Map1 = ra * Ma; + double Mnm1 = Ma; + double Mn = Map1; + double Mnp1; + int n; + for(n=a+1; nval = ex.val * Ma/Mn; + result->err = ex.err * fabs(Ma/Mn); + result->err += 4.0 * GSL_DBL_EPSILON * (fabs(b-a)+1.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_ex, stat_CF1); + } + else if(x >= 0.0) { + + if(b < a) { + /* The point b,b is below the b=2a+x line. + * Forward recursion on a from b,b+1 is possible. + * Note that a > b + 1 as well, since we already tried a = b + 1. + */ + if(x + log(fabs(x/b)) < GSL_LOG_DBL_MAX-2.0) { + double ex = exp(x); + int n; + double Mnm1 = ex; /* 1F1(b,b,x) */ + double Mn = ex * (1.0 + x/b); /* 1F1(b+1,b,x) */ + double Mnp1; + for(n=b+1; nval = Mn; + result->err = (x + 1.0) * GSL_DBL_EPSILON * fabs(Mn); + result->err *= fabs(a-b)+1.0; + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } + } + else { + /* b > a + * b < 2a + x + * b <= x (otherwise we would have finished above) + * + * Gautschi anomalous convergence region. However, we can + * recurse forward all the way from a=0,1 because we are + * always underneath the b=2a+x line. + */ + gsl_sf_result r_Mn; + double Mnm1 = 1.0; /* 1F1(0,b,x) */ + double Mn; /* 1F1(1,b,x) */ + double Mnp1; + int n; + gsl_sf_exprel_n_e(b-1, x, &r_Mn); + Mn = r_Mn.val; + for(n=1; nval = Mn; + result->err = fabs(Mn) * (1.0 + fabs(a)) * fabs(r_Mn.err / r_Mn.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(Mn); + return GSL_SUCCESS; + } + } + else { + /* x < 0 + * b < a (otherwise we would have tripped one of the above) + */ + + if(a <= 0.5*(b-x) || a >= -x) { + /* Gautschi continued fraction is in the anomalous region, + * so we must find another way. We recurse down in b, + * from the a=b line. + */ + double ex = exp(x); + double Manp1 = ex; + double Man = ex * (1.0 + x/(a-1.0)); + double Manm1; + int n; + for(n=a-1; n>b; n--) { + Manm1 = (-n*(1-n-x)*Man - x*(n-a)*Manp1)/(n*(n-1.0)); + Manp1 = Man; + Man = Manm1; + } + result->val = Man; + result->err = (fabs(x) + 1.0) * GSL_DBL_EPSILON * fabs(Man); + result->err *= fabs(b-a)+1.0; + return GSL_SUCCESS; + } + else { + /* Pick a0 such that b ~= 2a0 + x, then + * recurse down in b from a0,a0 to determine + * the values near the line b=2a+x. Then recurse + * forward on a from a0. + */ + int a0 = ceil(0.5*(b-x)); + double Ma0b; /* M(a0,b) */ + double Ma0bp1; /* M(a0,b+1) */ + double Ma0p1b; /* M(a0+1,b) */ + double Mnm1; + double Mn; + double Mnp1; + int n; + { + double ex = exp(x); + double Ma0np1 = ex; + double Ma0n = ex * (1.0 + x/(a0-1.0)); + double Ma0nm1; + for(n=a0-1; n>b; n--) { + Ma0nm1 = (-n*(1-n-x)*Ma0n - x*(n-a0)*Ma0np1)/(n*(n-1.0)); + Ma0np1 = Ma0n; + Ma0n = Ma0nm1; + } + Ma0bp1 = Ma0np1; + Ma0b = Ma0n; + Ma0p1b = (b*(a0+x)*Ma0b + x*(a0-b)*Ma0bp1)/(a0*b); + } + + /* Initialise the recurrence correctly BJG */ + + if (a0 >= a) + { + Mn = Ma0b; + } + else if (a0 + 1>= a) + { + Mn = Ma0p1b; + } + else + { + Mnm1 = Ma0b; + Mn = Ma0p1b; + + for(n=a0+1; nval = Mn; + result->err = (fabs(x) + 1.0) * GSL_DBL_EPSILON * fabs(Mn); + result->err *= fabs(b-a)+1.0; + return GSL_SUCCESS; + } + } +} + + +/* Evaluate a <= 0, a integer, cases directly. (Polynomial; Horner) + * When the terms are all positive, this + * must work. We will assume this here. + */ +static +int +hyperg_1F1_a_negint_poly(const int a, const double b, const double x, gsl_sf_result * result) +{ + if(a == 0) { + result->val = 1.0; + result->err = 1.0; + return GSL_SUCCESS; + } + else { + int N = -a; + double poly = 1.0; + int k; + for(k=N-1; k>=0; k--) { + double t = (a+k)/(b+k) * (x/(k+1)); + double r = t + 1.0/poly; + if(r > 0.9*GSL_DBL_MAX/poly) { + OVERFLOW_ERROR(result); + } + else { + poly *= r; /* P_n = 1 + t_n P_{n-1} */ + } + } + result->val = poly; + result->err = 2.0 * (sqrt(N) + 1.0) * GSL_DBL_EPSILON * fabs(poly); + return GSL_SUCCESS; + } +} + + +/* Evaluate negative integer a case by relation + * to Laguerre polynomials. This is more general than + * the direct polynomial evaluation, but is safe + * for all values of x. + * + * 1F1(-n,b,x) = n!/(b)_n Laguerre[n,b-1,x] + * = n B(b,n) Laguerre[n,b-1,x] + * + * assumes b is not a negative integer + */ +static +int +hyperg_1F1_a_negint_lag(const int a, const double b, const double x, gsl_sf_result * result) +{ + const int n = -a; + + gsl_sf_result lag; + const int stat_l = gsl_sf_laguerre_n_e(n, b-1.0, x, &lag); + if(b < 0.0) { + gsl_sf_result lnfact; + gsl_sf_result lng1; + gsl_sf_result lng2; + double s1, s2; + const int stat_f = gsl_sf_lnfact_e(n, &lnfact); + const int stat_g1 = gsl_sf_lngamma_sgn_e(b + n, &lng1, &s1); + const int stat_g2 = gsl_sf_lngamma_sgn_e(b, &lng2, &s2); + const double lnpre_val = lnfact.val - (lng1.val - lng2.val); + const double lnpre_err = lnfact.err + lng1.err + lng2.err + + 2.0 * GSL_DBL_EPSILON * fabs(lnpre_val); + const int stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, + s1*s2*lag.val, lag.err, + result); + return GSL_ERROR_SELECT_5(stat_e, stat_l, stat_g1, stat_g2, stat_f); + } + else { + gsl_sf_result lnbeta; + gsl_sf_lnbeta_e(b, n, &lnbeta); + if(fabs(lnbeta.val) < 0.1) { + /* As we have noted, when B(x,y) is near 1, + * evaluating log(B(x,y)) is not accurate. + * Instead we evaluate B(x,y) directly. + */ + const double ln_term_val = log(1.25*n); + const double ln_term_err = 2.0 * GSL_DBL_EPSILON * ln_term_val; + gsl_sf_result beta; + int stat_b = gsl_sf_beta_e(b, n, &beta); + int stat_e = gsl_sf_exp_mult_err_e(ln_term_val, ln_term_err, + lag.val, lag.err, + result); + result->val *= beta.val/1.25; + result->err *= beta.val/1.25; + return GSL_ERROR_SELECT_3(stat_e, stat_l, stat_b); + } + else { + /* B(x,y) was not near 1, so it is safe to use + * the logarithmic values. + */ + const double ln_n = log(n); + const double ln_term_val = lnbeta.val + ln_n; + const double ln_term_err = lnbeta.err + 2.0 * GSL_DBL_EPSILON * fabs(ln_n); + int stat_e = gsl_sf_exp_mult_err_e(ln_term_val, ln_term_err, + lag.val, lag.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_l); + } + } +} + + +/* Handle negative integer a case for x > 0 and + * generic b. + * + * Combine [Abramowitz+Stegun, 13.6.9 + 13.6.27] + * M(-n,b,x) = (-1)^n / (b)_n U(-n,b,x) = n! / (b)_n Laguerre^(b-1)_n(x) + */ +#if 0 +static +int +hyperg_1F1_a_negint_U(const int a, const double b, const double x, gsl_sf_result * result) +{ + const int n = -a; + const double sgn = ( GSL_IS_ODD(n) ? -1.0 : 1.0 ); + double sgpoch; + gsl_sf_result lnpoch; + gsl_sf_result U; + const int stat_p = gsl_sf_lnpoch_sgn_e(b, n, &lnpoch, &sgpoch); + const int stat_U = gsl_sf_hyperg_U_e(-n, b, x, &U); + const int stat_e = gsl_sf_exp_mult_err_e(-lnpoch.val, lnpoch.err, + sgn * sgpoch * U.val, U.err, + result); + return GSL_ERROR_SELECT_3(stat_e, stat_U, stat_p); +} +#endif + + +/* Assumes a <= -1, b <= -1, and b <= a. + */ +static +int +hyperg_1F1_ab_negint(const int a, const int b, const double x, gsl_sf_result * result) +{ + if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x > 0.0) { + return hyperg_1F1_a_negint_poly(a, b, x, result); + } + else { + /* Apply a Kummer transformation to make x > 0 so + * we can evaluate the polynomial safely. Of course, + * this assumes b <= a, which must be true for + * a<0 and b<0, since otherwise the thing is undefined. + */ + gsl_sf_result K; + int stat_K = hyperg_1F1_a_negint_poly(b-a, b, -x, &K); + int stat_e = gsl_sf_exp_mult_err_e(x, 2.0 * GSL_DBL_EPSILON * fabs(x), + K.val, K.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } +} + + +/* [Abramowitz+Stegun, 13.1.3] + * + * M(a,b,x) = Gamma(1+a-b)/Gamma(2-b) x^(1-b) * + * { Gamma(b)/Gamma(a) M(1+a-b,2-b,x) - (b-1) U(1+a-b,2-b,x) } + * + * b not an integer >= 2 + * a-b not a negative integer + */ +static +int +hyperg_1F1_U(const double a, const double b, const double x, gsl_sf_result * result) +{ + const double bp = 2.0 - b; + const double ap = a - b + 1.0; + + gsl_sf_result lg_ap, lg_bp; + double sg_ap; + int stat_lg0 = gsl_sf_lngamma_sgn_e(ap, &lg_ap, &sg_ap); + int stat_lg1 = gsl_sf_lngamma_e(bp, &lg_bp); + int stat_lg2 = GSL_ERROR_SELECT_2(stat_lg0, stat_lg1); + double t1 = (bp-1.0) * log(x); + double lnpre_val = lg_ap.val - lg_bp.val + t1; + double lnpre_err = lg_ap.err + lg_bp.err + 2.0 * GSL_DBL_EPSILON * fabs(t1); + + gsl_sf_result lg_2mbp, lg_1papmbp; + double sg_2mbp, sg_1papmbp; + int stat_lg3 = gsl_sf_lngamma_sgn_e(2.0-bp, &lg_2mbp, &sg_2mbp); + int stat_lg4 = gsl_sf_lngamma_sgn_e(1.0+ap-bp, &lg_1papmbp, &sg_1papmbp); + int stat_lg5 = GSL_ERROR_SELECT_2(stat_lg3, stat_lg4); + double lnc1_val = lg_2mbp.val - lg_1papmbp.val; + double lnc1_err = lg_2mbp.err + lg_1papmbp.err + + GSL_DBL_EPSILON * (fabs(lg_2mbp.val) + fabs(lg_1papmbp.val)); + + gsl_sf_result M; + gsl_sf_result_e10 U; + int stat_F = gsl_sf_hyperg_1F1_e(ap, bp, x, &M); + int stat_U = gsl_sf_hyperg_U_e10_e(ap, bp, x, &U); + int stat_FU = GSL_ERROR_SELECT_2(stat_F, stat_U); + + gsl_sf_result_e10 term_M; + int stat_e0 = gsl_sf_exp_mult_err_e10_e(lnc1_val, lnc1_err, + sg_2mbp*sg_1papmbp*M.val, M.err, + &term_M); + + const double ombp = 1.0 - bp; + const double Uee_val = U.e10*M_LN10; + const double Uee_err = 2.0 * GSL_DBL_EPSILON * fabs(Uee_val); + const double Mee_val = term_M.e10*M_LN10; + const double Mee_err = 2.0 * GSL_DBL_EPSILON * fabs(Mee_val); + int stat_e1; + + /* Do a little dance with the exponential prefactors + * to avoid overflows in intermediate results. + */ + if(Uee_val > Mee_val) { + const double factorM_val = exp(Mee_val-Uee_val); + const double factorM_err = 2.0 * GSL_DBL_EPSILON * (fabs(Mee_val-Uee_val)+1.0) * factorM_val; + const double inner_val = term_M.val*factorM_val - ombp*U.val; + const double inner_err = + term_M.err*factorM_val + fabs(ombp) * U.err + + fabs(term_M.val) * factorM_err + + GSL_DBL_EPSILON * (fabs(term_M.val*factorM_val) + fabs(ombp*U.val)); + stat_e1 = gsl_sf_exp_mult_err_e(lnpre_val+Uee_val, lnpre_err+Uee_err, + sg_ap*inner_val, inner_err, + result); + } + else { + const double factorU_val = exp(Uee_val - Mee_val); + const double factorU_err = 2.0 * GSL_DBL_EPSILON * (fabs(Mee_val-Uee_val)+1.0) * factorU_val; + const double inner_val = term_M.val - ombp*factorU_val*U.val; + const double inner_err = + term_M.err + fabs(ombp*factorU_val*U.err) + + fabs(ombp*factorU_err*U.val) + + GSL_DBL_EPSILON * (fabs(term_M.val) + fabs(ombp*factorU_val*U.val)); + stat_e1 = gsl_sf_exp_mult_err_e(lnpre_val+Mee_val, lnpre_err+Mee_err, + sg_ap*inner_val, inner_err, + result); + } + + return GSL_ERROR_SELECT_5(stat_e1, stat_e0, stat_FU, stat_lg5, stat_lg2); +} + + +/* Handle case of generic positive a, b. + * Assumes b-a is not a negative integer. + */ +static +int +hyperg_1F1_ab_pos(const double a, const double b, + const double x, + gsl_sf_result * result) +{ + const double ax = fabs(x); + + if( ( b < 10.0 && a < 10.0 && ax < 5.0 ) + || ( b > a*ax ) + || ( b > a && ax < 5.0 ) + ) { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if( x < -100.0 + && GSL_MAX_DBL(fabs(a),1.0)*GSL_MAX_DBL(fabs(1.0+a-b),1.0) < 0.7*fabs(x) + ) { + /* Large negative x asymptotic. + */ + return hyperg_1F1_asymp_negx(a, b, x, result); + } + else if( x > 100.0 + && GSL_MAX_DBL(fabs(b-a),1.0)*GSL_MAX_DBL(fabs(1.0-a),1.0) < 0.7*fabs(x) + ) { + /* Large positive x asymptotic. + */ + return hyperg_1F1_asymp_posx(a, b, x, result); + } + else if(fabs(b-a) <= 1.0) { + /* Directly handle b near a. + */ + return hyperg_1F1_beps_bgt0(a-b, b, x, result); /* a = b + eps */ + } + + else if(b > a && b >= 2*a + x) { + /* Use the Gautschi CF series, then + * recurse backward to a near 0 for normalization. + * This will work for either sign of x. + */ + double rap; + int stat_CF1 = hyperg_1F1_CF1_p_ser(a, b, x, &rap); + double ra = 1.0 + x/a * rap; + + double Ma = GSL_SQRT_DBL_MIN; + double Map1 = ra * Ma; + double Mnp1 = Map1; + double Mn = Ma; + double Mnm1; + gsl_sf_result Mn_true; + int stat_Mt; + double n; + for(n=a; n>0.5; n -= 1.0) { + Mnm1 = (n * Mnp1 - (2.0*n-b+x) * Mn) / (b-n); + Mnp1 = Mn; + Mn = Mnm1; + } + + stat_Mt = hyperg_1F1_small_a_bgt0(n, b, x, &Mn_true); + + result->val = (Ma/Mn) * Mn_true.val; + result->err = fabs(Ma/Mn) * Mn_true.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(a)+1.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_Mt, stat_CF1); + } + else if(b > a && b < 2*a + x && b > x) { + /* Use the Gautschi series representation of + * the continued fraction. Then recurse forward + * to near the a=b line for normalization. This will + * work for either sign of x, although we do need + * to check for b > x, which is relevant when x is positive. + */ + gsl_sf_result Mn_true; + int stat_Mt; + double rap; + int stat_CF1 = hyperg_1F1_CF1_p_ser(a, b, x, &rap); + double ra = 1.0 + x/a * rap; + double Ma = GSL_SQRT_DBL_MIN; + double Mnm1 = Ma; + double Mn = ra * Mnm1; + double Mnp1; + double n; + for(n=a+1.0; nval = Ma/Mn * Mn_true.val; + result->err = fabs(Ma/Mn) * Mn_true.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(b-a)+1.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_Mt, stat_CF1); + } + else if(x >= 0.0) { + + if(b < a) { + /* Forward recursion on a from a=b+eps-1,b+eps. + */ + double N = floor(a-b); + double eps = a - b - N; + gsl_sf_result r_M0; + gsl_sf_result r_M1; + int stat_0 = hyperg_1F1_beps_bgt0(eps-1.0, b, x, &r_M0); + int stat_1 = hyperg_1F1_beps_bgt0(eps, b, x, &r_M1); + double M0 = r_M0.val; + double M1 = r_M1.val; + + double Mam1 = M0; + double Ma = M1; + double Map1; + double ap; + double start_pair = fabs(M0) + fabs(M1); + double minim_pair = GSL_DBL_MAX; + double pair_ratio; + double rat_0 = fabs(r_M0.err/r_M0.val); + double rat_1 = fabs(r_M1.err/r_M1.val); + for(ap=b+eps; apval = Ma; + result->err = 2.0 * (rat_0 + rat_1 + GSL_DBL_EPSILON) * (fabs(b-a)+1.0) * fabs(Ma); + result->err += 2.0 * (rat_0 + rat_1) * pair_ratio*pair_ratio * fabs(Ma); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(Ma); + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } + else { + /* b > a + * b < 2a + x + * b <= x + * + * Recurse forward on a from a=eps,eps+1. + */ + double eps = a - floor(a); + gsl_sf_result r_Mnm1; + gsl_sf_result r_Mn; + int stat_0 = hyperg_1F1_small_a_bgt0(eps, b, x, &r_Mnm1); + int stat_1 = hyperg_1F1_small_a_bgt0(eps+1.0, b, x, &r_Mn); + double Mnm1 = r_Mnm1.val; + double Mn = r_Mn.val; + double Mnp1; + + double n; + double start_pair = fabs(Mn) + fabs(Mnm1); + double minim_pair = GSL_DBL_MAX; + double pair_ratio; + double rat_0 = fabs(r_Mnm1.err/r_Mnm1.val); + double rat_1 = fabs(r_Mn.err/r_Mn.val); + for(n=eps+1.0; nval = Mn; + result->err = 2.0 * (rat_0 + rat_1 + GSL_DBL_EPSILON) * (fabs(a)+1.0) * fabs(Mn); + result->err += 2.0 * (rat_0 + rat_1) * pair_ratio*pair_ratio * fabs(Mn); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(Mn); + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } + } + else { + /* x < 0 + * b < a + */ + + if(a <= 0.5*(b-x) || a >= -x) { + /* Recurse down in b, from near the a=b line, b=a+eps,a+eps-1. + */ + double N = floor(a - b); + double eps = 1.0 + N - a + b; + gsl_sf_result r_Manp1; + gsl_sf_result r_Man; + int stat_0 = hyperg_1F1_beps_bgt0(-eps, a+eps, x, &r_Manp1); + int stat_1 = hyperg_1F1_beps_bgt0(1.0-eps, a+eps-1.0, x, &r_Man); + double Manp1 = r_Manp1.val; + double Man = r_Man.val; + double Manm1; + + double n; + double start_pair = fabs(Manp1) + fabs(Man); + double minim_pair = GSL_DBL_MAX; + double pair_ratio; + double rat_0 = fabs(r_Manp1.err/r_Manp1.val); + double rat_1 = fabs(r_Man.err/r_Man.val); + for(n=a+eps-1.0; n>b+0.1; n -= 1.0) { + Manm1 = (-n*(1-n-x)*Man - x*(n-a)*Manp1)/(n*(n-1.0)); + Manp1 = Man; + Man = Manm1; + minim_pair = GSL_MIN_DBL(fabs(Manp1) + fabs(Man), minim_pair); + } + + /* FIXME: this is a nasty little hack; there is some + (transient?) instability in this recurrence for some + values. I can tell when it happens, which is when + this pair_ratio is large. But I do not know how to + measure the error in terms of it. I guessed quadratic + below, but it is probably worse than that. + */ + pair_ratio = start_pair/minim_pair; + result->val = Man; + result->err = 2.0 * (rat_0 + rat_1 + GSL_DBL_EPSILON) * (fabs(b-a)+1.0) * fabs(Man); + result->err *= pair_ratio*pair_ratio + 1.0; + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } + else { + /* Pick a0 such that b ~= 2a0 + x, then + * recurse down in b from a0,a0 to determine + * the values near the line b=2a+x. Then recurse + * forward on a from a0. + */ + double epsa = a - floor(a); + double a0 = floor(0.5*(b-x)) + epsa; + double N = floor(a0 - b); + double epsb = 1.0 + N - a0 + b; + double Ma0b; + double Ma0bp1; + double Ma0p1b; + int stat_a0; + double Mnm1; + double Mn; + double Mnp1; + double n; + double err_rat; + { + gsl_sf_result r_Ma0np1; + gsl_sf_result r_Ma0n; + int stat_0 = hyperg_1F1_beps_bgt0(-epsb, a0+epsb, x, &r_Ma0np1); + int stat_1 = hyperg_1F1_beps_bgt0(1.0-epsb, a0+epsb-1.0, x, &r_Ma0n); + double Ma0np1 = r_Ma0np1.val; + double Ma0n = r_Ma0n.val; + double Ma0nm1; + + err_rat = fabs(r_Ma0np1.err/r_Ma0np1.val) + fabs(r_Ma0n.err/r_Ma0n.val); + + for(n=a0+epsb-1.0; n>b+0.1; n -= 1.0) { + Ma0nm1 = (-n*(1-n-x)*Ma0n - x*(n-a0)*Ma0np1)/(n*(n-1.0)); + Ma0np1 = Ma0n; + Ma0n = Ma0nm1; + } + Ma0bp1 = Ma0np1; + Ma0b = Ma0n; + Ma0p1b = (b*(a0+x)*Ma0b+x*(a0-b)*Ma0bp1)/(a0*b); /* right-down hook */ + stat_a0 = GSL_ERROR_SELECT_2(stat_0, stat_1); + } + + + /* Initialise the recurrence correctly BJG */ + + if (a0 >= a - 0.1) + { + Mn = Ma0b; + } + else if (a0 + 1>= a - 0.1) + { + Mn = Ma0p1b; + } + else + { + Mnm1 = Ma0b; + Mn = Ma0p1b; + + for(n=a0+1.0; nval = Mn; + result->err = (err_rat + GSL_DBL_EPSILON) * (fabs(b-a)+1.0) * fabs(Mn); + return stat_a0; + } + } +} + + +/* Assumes b != integer + * Assumes a != integer when x > 0 + * Assumes b-a != neg integer when x < 0 + */ +static +int +hyperg_1F1_ab_neg(const double a, const double b, const double x, + gsl_sf_result * result) +{ + const double bma = b - a; + const double abs_x = fabs(x); + const double abs_a = fabs(a); + const double abs_b = fabs(b); + const double size_a = GSL_MAX(abs_a, 1.0); + const double size_b = GSL_MAX(abs_b, 1.0); + const int bma_integer = ( bma - floor(bma+0.5) < _1F1_INT_THRESHOLD ); + + if( (abs_a < 10.0 && abs_b < 10.0 && abs_x < 5.0) + || (b > 0.8*GSL_MAX(fabs(a),1.0)*fabs(x)) + ) { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if( x > 0.0 + && size_b > size_a + && size_a*log(M_E*x/size_b) < GSL_LOG_DBL_EPSILON+7.0 + ) { + /* Series terms are positive definite up until + * there is a sign change. But by then the + * terms are small due to the last condition. + */ + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + else if( (abs_x < 5.0 && fabs(bma) < 10.0 && abs_b < 10.0) + || (b > 0.8*GSL_MAX_DBL(fabs(bma),1.0)*abs_x) + ) { + /* Use Kummer transformation to render series safe. + */ + gsl_sf_result Kummer_1F1; + int stat_K = gsl_sf_hyperg_1F1_series_e(bma, b, -x, &Kummer_1F1); + int stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + Kummer_1F1.val, Kummer_1F1.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else if( x < -30.0 + && GSL_MAX_DBL(fabs(a),1.0)*GSL_MAX_DBL(fabs(1.0+a-b),1.0) < 0.99*fabs(x) + ) { + /* Large negative x asymptotic. + * Note that we do not check if b-a is a negative integer. + */ + return hyperg_1F1_asymp_negx(a, b, x, result); + } + else if( x > 100.0 + && GSL_MAX_DBL(fabs(bma),1.0)*GSL_MAX_DBL(fabs(1.0-a),1.0) < 0.99*fabs(x) + ) { + /* Large positive x asymptotic. + * Note that we do not check if a is a negative integer. + */ + return hyperg_1F1_asymp_posx(a, b, x, result); + } + else if(x > 0.0 && !(bma_integer && bma > 0.0)) { + return hyperg_1F1_U(a, b, x, result); + } + else { + /* FIXME: if all else fails, try the series... BJG */ + if (x < 0.0) { + /* Apply Kummer Transformation */ + int status = gsl_sf_hyperg_1F1_series_e(b-a, b, -x, result); + double K_factor = exp(x); + result->val *= K_factor; + result->err *= K_factor; + return status; + } else { + int status = gsl_sf_hyperg_1F1_series_e(a, b, x, result); + return status; + } + + /* Sadness... */ + /* result->val = 0.0; */ + /* result->err = 0.0; */ + /* GSL_ERROR ("error", GSL_EUNIMPL); */ + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_hyperg_1F1_int_e(const int a, const int b, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(a == b) { + return gsl_sf_exp_e(x, result); + } + else if(b == 0) { + DOMAIN_ERROR(result); + } + else if(a == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(b < 0 && (a < b || a > 0)) { + /* Standard domain error due to singularity. */ + DOMAIN_ERROR(result); + } + else if(x > 100.0 && GSL_MAX_DBL(1.0,fabs(b-a))*GSL_MAX_DBL(1.0,fabs(1-a)) < 0.5 * x) { + /* x -> +Inf asymptotic */ + return hyperg_1F1_asymp_posx(a, b, x, result); + } + else if(x < -100.0 && GSL_MAX_DBL(1.0,fabs(a))*GSL_MAX_DBL(1.0,fabs(1+a-b)) < 0.5 * fabs(x)) { + /* x -> -Inf asymptotic */ + return hyperg_1F1_asymp_negx(a, b, x, result); + } + else if(a < 0 && b < 0) { + return hyperg_1F1_ab_negint(a, b, x, result); + } + else if(a < 0 && b > 0) { + /* Use Kummer to reduce it to the positive integer case. + * Note that b > a, strictly, since we already trapped b = a. + */ + gsl_sf_result Kummer_1F1; + int stat_K = hyperg_1F1_ab_posint(b-a, b, -x, &Kummer_1F1); + int stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + Kummer_1F1.val, Kummer_1F1.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else { + /* a > 0 and b > 0 */ + return hyperg_1F1_ab_posint(a, b, x, result); + } +} + + +int +gsl_sf_hyperg_1F1_e(const double a, const double b, const double x, + gsl_sf_result * result + ) +{ + const double bma = b - a; + const double rinta = floor(a + 0.5); + const double rintb = floor(b + 0.5); + const double rintbma = floor(bma + 0.5); + const int a_integer = ( fabs(a-rinta) < _1F1_INT_THRESHOLD && rinta > INT_MIN && rinta < INT_MAX ); + const int b_integer = ( fabs(b-rintb) < _1F1_INT_THRESHOLD && rintb > INT_MIN && rintb < INT_MAX ); + const int bma_integer = ( fabs(bma-rintbma) < _1F1_INT_THRESHOLD && rintbma > INT_MIN && rintbma < INT_MAX ); + const int b_neg_integer = ( b < -0.1 && b_integer ); + const int a_neg_integer = ( a < -0.1 && a_integer ); + const int bma_neg_integer = ( bma < -0.1 && bma_integer ); + + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + /* Testing for this before testing a and b + * is somewhat arbitrary. The result is that + * we have 1F1(a,0,0) = 1. + */ + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(b == 0.0) { + DOMAIN_ERROR(result); + } + else if(a == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(a == b) { + /* case: a==b; exp(x) + * It's good to test exact equality now. + * We also test approximate equality later. + */ + return gsl_sf_exp_e(x, result); + } else if(fabs(b) < _1F1_INT_THRESHOLD && fabs(a) < _1F1_INT_THRESHOLD) { + /* a and b near zero: 1 + a/b (exp(x)-1) + */ + + /* Note that neither a nor b is zero, since + * we eliminated that with the above tests. + */ + + gsl_sf_result exm1; + int stat_e = gsl_sf_expm1_e(x, &exm1); + double sa = ( a > 0.0 ? 1.0 : -1.0 ); + double sb = ( b > 0.0 ? 1.0 : -1.0 ); + double lnab = log(fabs(a/b)); /* safe */ + gsl_sf_result hx; + int stat_hx = gsl_sf_exp_mult_err_e(lnab, GSL_DBL_EPSILON * fabs(lnab), + sa * sb * exm1.val, exm1.err, + &hx); + result->val = (hx.val == GSL_DBL_MAX ? hx.val : 1.0 + hx.val); /* FIXME: excessive paranoia ? what is DBL_MAX+1 ?*/ + result->err = hx.err; + return GSL_ERROR_SELECT_2(stat_hx, stat_e); + } else if (fabs(b) < _1F1_INT_THRESHOLD && fabs(x*a) < 1) { + /* b near zero and a not near zero + */ + const double m_arg = 1.0/(0.5*b); + gsl_sf_result F_renorm; + int stat_F = hyperg_1F1_renorm_b0(a, x, &F_renorm); + int stat_m = gsl_sf_multiply_err_e(m_arg, 2.0 * GSL_DBL_EPSILON * m_arg, + 0.5*F_renorm.val, 0.5*F_renorm.err, + result); + return GSL_ERROR_SELECT_2(stat_m, stat_F); + } + else if(a_integer && b_integer) { + /* Check for reduction to the integer case. + * Relies on the arbitrary "near an integer" test. + */ + return gsl_sf_hyperg_1F1_int_e((int)rinta, (int)rintb, x, result); + } + else if(b_neg_integer && !(a_neg_integer && a > b)) { + /* Standard domain error due to + * uncancelled singularity. + */ + DOMAIN_ERROR(result); + } + else if(a_neg_integer) { + return hyperg_1F1_a_negint_lag((int)rinta, b, x, result); + } + else if(b > 0.0) { + if(-1.0 <= a && a <= 1.0) { + /* Handle small a explicitly. + */ + return hyperg_1F1_small_a_bgt0(a, b, x, result); + } + else if(bma_neg_integer) { + /* Catch this now, to avoid problems in the + * generic evaluation code. + */ + gsl_sf_result Kummer_1F1; + int stat_K = hyperg_1F1_a_negint_lag((int)rintbma, b, -x, &Kummer_1F1); + int stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + Kummer_1F1.val, Kummer_1F1.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else if(a < 0.0 && fabs(x) < 2*GSL_LOG_DBL_MAX) { + /* Use Kummer to reduce it to the generic positive case. + * Note that b > a, strictly, since we already trapped b = a. + * Also b-(b-a)=a, and a is not a negative integer here, + * so the generic evaluation is safe. + */ + gsl_sf_result Kummer_1F1; + int stat_K = hyperg_1F1_ab_pos(b-a, b, -x, &Kummer_1F1); + int stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + Kummer_1F1.val, Kummer_1F1.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else if (a > 0) { + /* a > 0.0 */ + return hyperg_1F1_ab_pos(a, b, x, result); + } else { + return gsl_sf_hyperg_1F1_series_e(a, b, x, result); + } + } + else { + /* b < 0.0 */ + + if(bma_neg_integer && x < 0.0) { + /* Handle this now to prevent problems + * in the generic evaluation. + */ + gsl_sf_result K; + int stat_K; + int stat_e; + if(a < 0.0) { + /* Kummer transformed version of safe polynomial. + * The condition a < 0 is equivalent to b < b-a, + * which is the condition required for the series + * to be positive definite here. + */ + stat_K = hyperg_1F1_a_negint_poly((int)rintbma, b, -x, &K); + } + else { + /* Generic eval for negative integer a. */ + stat_K = hyperg_1F1_a_negint_lag((int)rintbma, b, -x, &K); + } + stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + K.val, K.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else if(a > 0.0) { + /* Use Kummer to reduce it to the generic negative case. + */ + gsl_sf_result K; + int stat_K = hyperg_1F1_ab_neg(b-a, b, -x, &K); + int stat_e = gsl_sf_exp_mult_err_e(x, GSL_DBL_EPSILON * fabs(x), + K.val, K.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_K); + } + else { + return hyperg_1F1_ab_neg(a, b, x, result); + } + } +} + + + +#if 0 + /* Luke in the canonical case. + */ + if(x < 0.0 && !a_neg_integer && !bma_neg_integer) { + double prec; + return hyperg_1F1_luke(a, b, x, result, &prec); + } + + + /* Luke with Kummer transformation. + */ + if(x > 0.0 && !a_neg_integer && !bma_neg_integer) { + double prec; + double Kummer_1F1; + double ex; + int stat_F = hyperg_1F1_luke(b-a, b, -x, &Kummer_1F1, &prec); + int stat_e = gsl_sf_exp_e(x, &ex); + if(stat_F == GSL_SUCCESS && stat_e == GSL_SUCCESS) { + double lnr = log(fabs(Kummer_1F1)) + x; + if(lnr < GSL_LOG_DBL_MAX) { + *result = ex * Kummer_1F1; + return GSL_SUCCESS; + } + else { + *result = GSL_POSINF; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + } + else if(stat_F != GSL_SUCCESS) { + *result = 0.0; + return stat_F; + } + else { + *result = 0.0; + return stat_e; + } + } +#endif + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hyperg_1F1_int(const int m, const int n, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_1F1_int_e(m, n, x, &result)); +} + +double gsl_sf_hyperg_1F1(double a, double b, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_1F1_e(a, b, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/hyperg_2F0.c b/software/gsl-1.15/specfunc/hyperg_2F0.c new file mode 100644 index 000000000..69c373680 --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg_2F0.c @@ -0,0 +1,63 @@ +/* specfunc/hyperg_2F0.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" +#include "hyperg.h" + +int +gsl_sf_hyperg_2F0_e(const double a, const double b, const double x, gsl_sf_result * result) +{ + if(x < 0.0) { + /* Use "definition" 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x). + */ + gsl_sf_result U; + double pre = pow(-1.0/x, a); + int stat_U = gsl_sf_hyperg_U_e(a, 1.0+a-b, -1.0/x, &U); + result->val = pre * U.val; + result->err = GSL_DBL_EPSILON * fabs(result->val) + pre * U.err; + return stat_U; + } + else if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* Use asymptotic series. ?? + */ + /* return hyperg_2F0_series(a, b, x, -1, result, &prec); */ + DOMAIN_ERROR(result); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hyperg_2F0(const double a, const double b, const double x) +{ + EVAL_RESULT(gsl_sf_hyperg_2F0_e(a, b, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/hyperg_2F1.c b/software/gsl-1.15/specfunc/hyperg_2F1.c new file mode 100644 index 000000000..65683ec8d --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg_2F1.c @@ -0,0 +1,946 @@ +/* specfunc/hyperg_2F1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#define locEPS (1000.0*GSL_DBL_EPSILON) + + +/* Assumes c != negative integer. + */ +static int +hyperg_2F1_series(const double a, const double b, const double c, + const double x, + gsl_sf_result * result + ) +{ + double sum_pos = 1.0; + double sum_neg = 0.0; + double del_pos = 1.0; + double del_neg = 0.0; + double del = 1.0; + double k = 0.0; + int i = 0; + + if(fabs(c) < GSL_DBL_EPSILON) { + result->val = 0.0; /* FIXME: ?? */ + result->err = 1.0; + GSL_ERROR ("error", GSL_EDOM); + } + + do { + if(++i > 30000) { + result->val = sum_pos - sum_neg; + result->err = del_pos + del_neg; + result->err += 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += 2.0 * GSL_DBL_EPSILON * (2.0*sqrt(k)+1.0) * fabs(result->val); + GSL_ERROR ("error", GSL_EMAXITER); + } + del *= (a+k)*(b+k) * x / ((c+k) * (k+1.0)); /* Gauss series */ + + if(del > 0.0) { + del_pos = del; + sum_pos += del; + } + else if(del == 0.0) { + /* Exact termination (a or b was a negative integer). + */ + del_pos = 0.0; + del_neg = 0.0; + break; + } + else { + del_neg = -del; + sum_neg -= del; + } + + k += 1.0; + } while(fabs((del_pos + del_neg)/(sum_pos-sum_neg)) > GSL_DBL_EPSILON); + + result->val = sum_pos - sum_neg; + result->err = del_pos + del_neg; + result->err += 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += 2.0 * GSL_DBL_EPSILON * (2.0*sqrt(k) + 1.0) * fabs(result->val); + + return GSL_SUCCESS; +} + + +/* a = aR + i aI, b = aR - i aI */ +static +int +hyperg_2F1_conj_series(const double aR, const double aI, const double c, + double x, + gsl_sf_result * result) +{ + if(c == 0.0) { + result->val = 0.0; /* FIXME: should be Inf */ + result->err = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else { + double sum_pos = 1.0; + double sum_neg = 0.0; + double del_pos = 1.0; + double del_neg = 0.0; + double del = 1.0; + double k = 0.0; + do { + del *= ((aR+k)*(aR+k) + aI*aI)/((k+1.0)*(c+k)) * x; + + if(del >= 0.0) { + del_pos = del; + sum_pos += del; + } + else { + del_neg = -del; + sum_neg -= del; + } + + if(k > 30000) { + result->val = sum_pos - sum_neg; + result->err = del_pos + del_neg; + result->err += 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += 2.0 * GSL_DBL_EPSILON * (2.0*sqrt(k)+1.0) * fabs(result->val); + GSL_ERROR ("error", GSL_EMAXITER); + } + + k += 1.0; + } while(fabs((del_pos + del_neg)/(sum_pos - sum_neg)) > GSL_DBL_EPSILON); + + result->val = sum_pos - sum_neg; + result->err = del_pos + del_neg; + result->err += 2.0 * GSL_DBL_EPSILON * (sum_pos + sum_neg); + result->err += 2.0 * GSL_DBL_EPSILON * (2.0*sqrt(k) + 1.0) * fabs(result->val); + + return GSL_SUCCESS; + } +} + + +/* Luke's rational approximation. The most accesible + * discussion is in [Kolbig, CPC 23, 51 (1981)]. + * The convergence is supposedly guaranteed for x < 0. + * You have to read Luke's books to see this and other + * results. Unfortunately, the stability is not so + * clear to me, although it seems very efficient when + * it works. + */ +static +int +hyperg_2F1_luke(const double a, const double b, const double c, + const double xin, + gsl_sf_result * result) +{ + int stat_iter; + const double RECUR_BIG = 1.0e+50; + const int nmax = 20000; + int n = 3; + const double x = -xin; + const double x3 = x*x*x; + const double t0 = a*b/c; + const double t1 = (a+1.0)*(b+1.0)/(2.0*c); + const double t2 = (a+2.0)*(b+2.0)/(2.0*(c+1.0)); + double F = 1.0; + double prec; + + double Bnm3 = 1.0; /* B0 */ + double Bnm2 = 1.0 + t1 * x; /* B1 */ + double Bnm1 = 1.0 + t2 * x * (1.0 + t1/3.0 * x); /* B2 */ + + double Anm3 = 1.0; /* A0 */ + double Anm2 = Bnm2 - t0 * x; /* A1 */ + double Anm1 = Bnm1 - t0*(1.0 + t2*x)*x + t0 * t1 * (c/(c+1.0)) * x*x; /* A2 */ + + while(1) { + double npam1 = n + a - 1; + double npbm1 = n + b - 1; + double npcm1 = n + c - 1; + double npam2 = n + a - 2; + double npbm2 = n + b - 2; + double npcm2 = n + c - 2; + double tnm1 = 2*n - 1; + double tnm3 = 2*n - 3; + double tnm5 = 2*n - 5; + double n2 = n*n; + double F1 = (3.0*n2 + (a+b-6)*n + 2 - a*b - 2*(a+b)) / (2*tnm3*npcm1); + double F2 = -(3.0*n2 - (a+b+6)*n + 2 - a*b)*npam1*npbm1/(4*tnm1*tnm3*npcm2*npcm1); + double F3 = (npam2*npam1*npbm2*npbm1*(n-a-2)*(n-b-2)) / (8*tnm3*tnm3*tnm5*(n+c-3)*npcm2*npcm1); + double E = -npam1*npbm1*(n-c-1) / (2*tnm3*npcm2*npcm1); + + double An = (1.0+F1*x)*Anm1 + (E + F2*x)*x*Anm2 + F3*x3*Anm3; + double Bn = (1.0+F1*x)*Bnm1 + (E + F2*x)*x*Bnm2 + F3*x3*Bnm3; + double r = An/Bn; + + prec = fabs((F - r)/F); + F = r; + + if(prec < GSL_DBL_EPSILON || n > nmax) break; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + Anm3 /= RECUR_BIG; + Bnm3 /= RECUR_BIG; + } + else if(fabs(An) < 1.0/RECUR_BIG || fabs(Bn) < 1.0/RECUR_BIG) { + An *= RECUR_BIG; + Bn *= RECUR_BIG; + Anm1 *= RECUR_BIG; + Bnm1 *= RECUR_BIG; + Anm2 *= RECUR_BIG; + Bnm2 *= RECUR_BIG; + Anm3 *= RECUR_BIG; + Bnm3 *= RECUR_BIG; + } + + n++; + Bnm3 = Bnm2; + Bnm2 = Bnm1; + Bnm1 = Bn; + Anm3 = Anm2; + Anm2 = Anm1; + Anm1 = An; + } + + result->val = F; + result->err = 2.0 * fabs(prec * F); + result->err += 2.0 * GSL_DBL_EPSILON * (n+1.0) * fabs(F); + + /* FIXME: just a hack: there's a lot of shit going on here */ + result->err *= 8.0 * (fabs(a) + fabs(b) + 1.0); + + stat_iter = (n >= nmax ? GSL_EMAXITER : GSL_SUCCESS ); + + return stat_iter; +} + + +/* Luke's rational approximation for the + * case a = aR + i aI, b = aR - i aI. + */ +static +int +hyperg_2F1_conj_luke(const double aR, const double aI, const double c, + const double xin, + gsl_sf_result * result) +{ + int stat_iter; + const double RECUR_BIG = 1.0e+50; + const int nmax = 10000; + int n = 3; + const double x = -xin; + const double x3 = x*x*x; + const double atimesb = aR*aR + aI*aI; + const double apb = 2.0*aR; + const double t0 = atimesb/c; + const double t1 = (atimesb + apb + 1.0)/(2.0*c); + const double t2 = (atimesb + 2.0*apb + 4.0)/(2.0*(c+1.0)); + double F = 1.0; + double prec; + + double Bnm3 = 1.0; /* B0 */ + double Bnm2 = 1.0 + t1 * x; /* B1 */ + double Bnm1 = 1.0 + t2 * x * (1.0 + t1/3.0 * x); /* B2 */ + + double Anm3 = 1.0; /* A0 */ + double Anm2 = Bnm2 - t0 * x; /* A1 */ + double Anm1 = Bnm1 - t0*(1.0 + t2*x)*x + t0 * t1 * (c/(c+1.0)) * x*x; /* A2 */ + + while(1) { + double nm1 = n - 1; + double nm2 = n - 2; + double npam1_npbm1 = atimesb + nm1*apb + nm1*nm1; + double npam2_npbm2 = atimesb + nm2*apb + nm2*nm2; + double npcm1 = nm1 + c; + double npcm2 = nm2 + c; + double tnm1 = 2*n - 1; + double tnm3 = 2*n - 3; + double tnm5 = 2*n - 5; + double n2 = n*n; + double F1 = (3.0*n2 + (apb-6)*n + 2 - atimesb - 2*apb) / (2*tnm3*npcm1); + double F2 = -(3.0*n2 - (apb+6)*n + 2 - atimesb)*npam1_npbm1/(4*tnm1*tnm3*npcm2*npcm1); + double F3 = (npam2_npbm2*npam1_npbm1*(nm2*nm2 - nm2*apb + atimesb)) / (8*tnm3*tnm3*tnm5*(n+c-3)*npcm2*npcm1); + double E = -npam1_npbm1*(n-c-1) / (2*tnm3*npcm2*npcm1); + + double An = (1.0+F1*x)*Anm1 + (E + F2*x)*x*Anm2 + F3*x3*Anm3; + double Bn = (1.0+F1*x)*Bnm1 + (E + F2*x)*x*Bnm2 + F3*x3*Bnm3; + double r = An/Bn; + + prec = fabs(F - r)/fabs(F); + F = r; + + if(prec < GSL_DBL_EPSILON || n > nmax) break; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + Anm3 /= RECUR_BIG; + Bnm3 /= RECUR_BIG; + } + else if(fabs(An) < 1.0/RECUR_BIG || fabs(Bn) < 1.0/RECUR_BIG) { + An *= RECUR_BIG; + Bn *= RECUR_BIG; + Anm1 *= RECUR_BIG; + Bnm1 *= RECUR_BIG; + Anm2 *= RECUR_BIG; + Bnm2 *= RECUR_BIG; + Anm3 *= RECUR_BIG; + Bnm3 *= RECUR_BIG; + } + + n++; + Bnm3 = Bnm2; + Bnm2 = Bnm1; + Bnm1 = Bn; + Anm3 = Anm2; + Anm2 = Anm1; + Anm1 = An; + } + + result->val = F; + result->err = 2.0 * fabs(prec * F); + result->err += 2.0 * GSL_DBL_EPSILON * (n+1.0) * fabs(F); + + /* FIXME: see above */ + result->err *= 8.0 * (fabs(aR) + fabs(aI) + 1.0); + + stat_iter = (n >= nmax ? GSL_EMAXITER : GSL_SUCCESS ); + + return stat_iter; +} + + +/* Do the reflection described in [Moshier, p. 334]. + * Assumes a,b,c != neg integer. + */ +static +int +hyperg_2F1_reflect(const double a, const double b, const double c, + const double x, gsl_sf_result * result) +{ + const double d = c - a - b; + const int intd = floor(d+0.5); + const int d_integer = ( fabs(d - intd) < locEPS ); + + if(d_integer) { + const double ln_omx = log(1.0 - x); + const double ad = fabs(d); + int stat_F2 = GSL_SUCCESS; + double sgn_2; + gsl_sf_result F1; + gsl_sf_result F2; + double d1, d2; + gsl_sf_result lng_c; + gsl_sf_result lng_ad2; + gsl_sf_result lng_bd2; + int stat_c; + int stat_ad2; + int stat_bd2; + + if(d >= 0.0) { + d1 = d; + d2 = 0.0; + } + else { + d1 = 0.0; + d2 = d; + } + + stat_ad2 = gsl_sf_lngamma_e(a+d2, &lng_ad2); + stat_bd2 = gsl_sf_lngamma_e(b+d2, &lng_bd2); + stat_c = gsl_sf_lngamma_e(c, &lng_c); + + /* Evaluate F1. + */ + if(ad < GSL_DBL_EPSILON) { + /* d = 0 */ + F1.val = 0.0; + F1.err = 0.0; + } + else { + gsl_sf_result lng_ad; + gsl_sf_result lng_ad1; + gsl_sf_result lng_bd1; + int stat_ad = gsl_sf_lngamma_e(ad, &lng_ad); + int stat_ad1 = gsl_sf_lngamma_e(a+d1, &lng_ad1); + int stat_bd1 = gsl_sf_lngamma_e(b+d1, &lng_bd1); + + if(stat_ad1 == GSL_SUCCESS && stat_bd1 == GSL_SUCCESS && stat_ad == GSL_SUCCESS) { + /* Gamma functions in the denominator are ok. + * Proceed with evaluation. + */ + int i; + double sum1 = 1.0; + double term = 1.0; + double ln_pre1_val = lng_ad.val + lng_c.val + d2*ln_omx - lng_ad1.val - lng_bd1.val; + double ln_pre1_err = lng_ad.err + lng_c.err + lng_ad1.err + lng_bd1.err + GSL_DBL_EPSILON * fabs(ln_pre1_val); + int stat_e; + + /* Do F1 sum. + */ + for(i=1; ival = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EOVRFLW); + } + } + stat_F2 = GSL_ERROR_SELECT_2(stat_F2, stat_dall); + } + else { + /* Gamma functions in the denominator not ok. + * So the F2 term is zero. + */ + F2.val = 0.0; + F2.err = 0.0; + } /* end F2 evaluation */ + + sgn_2 = ( GSL_IS_ODD(intd) ? -1.0 : 1.0 ); + result->val = F1.val + sgn_2 * F2.val; + result->err = F1.err + F2. err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(F1.val) + fabs(F2.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_F2; + } + else { + /* d not an integer */ + + gsl_sf_result pre1, pre2; + double sgn1, sgn2; + gsl_sf_result F1, F2; + int status_F1, status_F2; + + /* These gamma functions appear in the denominator, so we + * catch their harmless domain errors and set the terms to zero. + */ + gsl_sf_result ln_g1ca, ln_g1cb, ln_g2a, ln_g2b; + double sgn_g1ca, sgn_g1cb, sgn_g2a, sgn_g2b; + int stat_1ca = gsl_sf_lngamma_sgn_e(c-a, &ln_g1ca, &sgn_g1ca); + int stat_1cb = gsl_sf_lngamma_sgn_e(c-b, &ln_g1cb, &sgn_g1cb); + int stat_2a = gsl_sf_lngamma_sgn_e(a, &ln_g2a, &sgn_g2a); + int stat_2b = gsl_sf_lngamma_sgn_e(b, &ln_g2b, &sgn_g2b); + int ok1 = (stat_1ca == GSL_SUCCESS && stat_1cb == GSL_SUCCESS); + int ok2 = (stat_2a == GSL_SUCCESS && stat_2b == GSL_SUCCESS); + + gsl_sf_result ln_gc, ln_gd, ln_gmd; + double sgn_gc, sgn_gd, sgn_gmd; + gsl_sf_lngamma_sgn_e( c, &ln_gc, &sgn_gc); + gsl_sf_lngamma_sgn_e( d, &ln_gd, &sgn_gd); + gsl_sf_lngamma_sgn_e(-d, &ln_gmd, &sgn_gmd); + + sgn1 = sgn_gc * sgn_gd * sgn_g1ca * sgn_g1cb; + sgn2 = sgn_gc * sgn_gmd * sgn_g2a * sgn_g2b; + + if(ok1 && ok2) { + double ln_pre1_val = ln_gc.val + ln_gd.val - ln_g1ca.val - ln_g1cb.val; + double ln_pre2_val = ln_gc.val + ln_gmd.val - ln_g2a.val - ln_g2b.val + d*log(1.0-x); + double ln_pre1_err = ln_gc.err + ln_gd.err + ln_g1ca.err + ln_g1cb.err; + double ln_pre2_err = ln_gc.err + ln_gmd.err + ln_g2a.err + ln_g2b.err; + if(ln_pre1_val < GSL_LOG_DBL_MAX && ln_pre2_val < GSL_LOG_DBL_MAX) { + gsl_sf_exp_err_e(ln_pre1_val, ln_pre1_err, &pre1); + gsl_sf_exp_err_e(ln_pre2_val, ln_pre2_err, &pre2); + pre1.val *= sgn1; + pre2.val *= sgn2; + } + else { + OVERFLOW_ERROR(result); + } + } + else if(ok1 && !ok2) { + double ln_pre1_val = ln_gc.val + ln_gd.val - ln_g1ca.val - ln_g1cb.val; + double ln_pre1_err = ln_gc.err + ln_gd.err + ln_g1ca.err + ln_g1cb.err; + if(ln_pre1_val < GSL_LOG_DBL_MAX) { + gsl_sf_exp_err_e(ln_pre1_val, ln_pre1_err, &pre1); + pre1.val *= sgn1; + pre2.val = 0.0; + pre2.err = 0.0; + } + else { + OVERFLOW_ERROR(result); + } + } + else if(!ok1 && ok2) { + double ln_pre2_val = ln_gc.val + ln_gmd.val - ln_g2a.val - ln_g2b.val + d*log(1.0-x); + double ln_pre2_err = ln_gc.err + ln_gmd.err + ln_g2a.err + ln_g2b.err; + if(ln_pre2_val < GSL_LOG_DBL_MAX) { + pre1.val = 0.0; + pre1.err = 0.0; + gsl_sf_exp_err_e(ln_pre2_val, ln_pre2_err, &pre2); + pre2.val *= sgn2; + } + else { + OVERFLOW_ERROR(result); + } + } + else { + pre1.val = 0.0; + pre2.val = 0.0; + UNDERFLOW_ERROR(result); + } + + status_F1 = hyperg_2F1_series( a, b, 1.0-d, 1.0-x, &F1); + status_F2 = hyperg_2F1_series(c-a, c-b, 1.0+d, 1.0-x, &F2); + + result->val = pre1.val*F1.val + pre2.val*F2.val; + result->err = fabs(pre1.val*F1.err) + fabs(pre2.val*F2.err); + result->err += fabs(pre1.err*F1.val) + fabs(pre2.err*F2.val); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(pre1.val*F1.val) + fabs(pre2.val*F2.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_SUCCESS; + } +} + + +static int pow_omx(const double x, const double p, gsl_sf_result * result) +{ + double ln_omx; + double ln_result; + if(fabs(x) < GSL_ROOT5_DBL_EPSILON) { + ln_omx = -x*(1.0 + x*(1.0/2.0 + x*(1.0/3.0 + x/4.0 + x*x/5.0))); + } + else { + ln_omx = log(1.0-x); + } + ln_result = p * ln_omx; + return gsl_sf_exp_err_e(ln_result, GSL_DBL_EPSILON * fabs(ln_result), result); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_hyperg_2F1_e(double a, double b, const double c, + const double x, + gsl_sf_result * result) +{ + const double d = c - a - b; + const double rinta = floor(a + 0.5); + const double rintb = floor(b + 0.5); + const double rintc = floor(c + 0.5); + const int a_neg_integer = ( a < 0.0 && fabs(a - rinta) < locEPS ); + const int b_neg_integer = ( b < 0.0 && fabs(b - rintb) < locEPS ); + const int c_neg_integer = ( c < 0.0 && fabs(c - rintc) < locEPS ); + + result->val = 0.0; + result->err = 0.0; + + /* Handle x == 1.0 RJM */ + + if (fabs (x - 1.0) < locEPS && (c - a - b) > 0 && c != 0 && !c_neg_integer) { + gsl_sf_result lngamc, lngamcab, lngamca, lngamcb; + double lngamc_sgn, lngamca_sgn, lngamcb_sgn; + int status; + int stat1 = gsl_sf_lngamma_sgn_e (c, &lngamc, &lngamc_sgn); + int stat2 = gsl_sf_lngamma_e (c - a - b, &lngamcab); + int stat3 = gsl_sf_lngamma_sgn_e (c - a, &lngamca, &lngamca_sgn); + int stat4 = gsl_sf_lngamma_sgn_e (c - b, &lngamcb, &lngamcb_sgn); + + if (stat1 != GSL_SUCCESS || stat2 != GSL_SUCCESS + || stat3 != GSL_SUCCESS || stat4 != GSL_SUCCESS) + { + DOMAIN_ERROR (result); + } + + status = + gsl_sf_exp_err_e (lngamc.val + lngamcab.val - lngamca.val - lngamcb.val, + lngamc.err + lngamcab.err + lngamca.err + lngamcb.err, + result); + + result->val *= lngamc_sgn / (lngamca_sgn * lngamcb_sgn); + return status; + } + + if(x < -1.0 || 1.0 <= x) { + DOMAIN_ERROR(result); + } + + if(c_neg_integer) { + /* If c is a negative integer, then either a or b must be a + negative integer of smaller magnitude than c to ensure + cancellation of the series. */ + if(! (a_neg_integer && a > c + 0.1) && ! (b_neg_integer && b > c + 0.1)) { + DOMAIN_ERROR(result); + } + } + + if(fabs(c-b) < locEPS || fabs(c-a) < locEPS) { + return pow_omx(x, d, result); /* (1-x)^(c-a-b) */ + } + + if(a >= 0.0 && b >= 0.0 && c >=0.0 && x >= 0.0 && x < 0.995) { + /* Series has all positive definite + * terms and x is not close to 1. + */ + return hyperg_2F1_series(a, b, c, x, result); + } + + if(fabs(a) < 10.0 && fabs(b) < 10.0) { + /* a and b are not too large, so we attempt + * variations on the series summation. + */ + if(a_neg_integer) { + return hyperg_2F1_series(rinta, b, c, x, result); + } + if(b_neg_integer) { + return hyperg_2F1_series(a, rintb, c, x, result); + } + + if(x < -0.25) { + return hyperg_2F1_luke(a, b, c, x, result); + } + else if(x < 0.5) { + return hyperg_2F1_series(a, b, c, x, result); + } + else { + if(fabs(c) > 10.0) { + return hyperg_2F1_series(a, b, c, x, result); + } + else { + return hyperg_2F1_reflect(a, b, c, x, result); + } + } + } + else { + /* Either a or b or both large. + * Introduce some new variables ap,bp so that bp is + * the larger in magnitude. + */ + double ap, bp; + if(fabs(a) > fabs(b)) { + bp = a; + ap = b; + } + else { + bp = b; + ap = a; + } + + if(x < 0.0) { + /* What the hell, maybe Luke will converge. + */ + return hyperg_2F1_luke(a, b, c, x, result); + } + + if(GSL_MAX_DBL(fabs(ap),1.0)*fabs(bp)*fabs(x) < 2.0*fabs(c)) { + /* If c is large enough or x is small enough, + * we can attempt the series anyway. + */ + return hyperg_2F1_series(a, b, c, x, result); + } + + if(fabs(bp*bp*x*x) < 0.001*fabs(bp) && fabs(ap) < 10.0) { + /* The famous but nearly worthless "large b" asymptotic. + */ + int stat = gsl_sf_hyperg_1F1_e(ap, c, bp*x, result); + result->err = 0.001 * fabs(result->val); + return stat; + } + + /* We give up. */ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EUNIMPL); + } +} + + +int +gsl_sf_hyperg_2F1_conj_e(const double aR, const double aI, const double c, + const double x, + gsl_sf_result * result) +{ + const double ax = fabs(x); + const double rintc = floor(c + 0.5); + const int c_neg_integer = ( c < 0.0 && fabs(c - rintc) < locEPS ); + + result->val = 0.0; + result->err = 0.0; + + if(ax >= 1.0 || c_neg_integer || c == 0.0) { + DOMAIN_ERROR(result); + } + + if( (ax < 0.25 && fabs(aR) < 20.0 && fabs(aI) < 20.0) + || (c > 0.0 && x > 0.0) + ) { + return hyperg_2F1_conj_series(aR, aI, c, x, result); + } + else if(fabs(aR) < 10.0 && fabs(aI) < 10.0) { + if(x < -0.25) { + return hyperg_2F1_conj_luke(aR, aI, c, x, result); + } + else { + return hyperg_2F1_conj_series(aR, aI, c, x, result); + } + } + else { + if(x < 0.0) { + /* What the hell, maybe Luke will converge. + */ + return hyperg_2F1_conj_luke(aR, aI, c, x, result); + } + + /* Give up. */ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_EUNIMPL); + } +} + + +int +gsl_sf_hyperg_2F1_renorm_e(const double a, const double b, const double c, + const double x, + gsl_sf_result * result + ) +{ + const double rinta = floor(a + 0.5); + const double rintb = floor(b + 0.5); + const double rintc = floor(c + 0.5); + const int a_neg_integer = ( a < 0.0 && fabs(a - rinta) < locEPS ); + const int b_neg_integer = ( b < 0.0 && fabs(b - rintb) < locEPS ); + const int c_neg_integer = ( c < 0.0 && fabs(c - rintc) < locEPS ); + + if(c_neg_integer) { + if((a_neg_integer && a > c+0.1) || (b_neg_integer && b > c+0.1)) { + /* 2F1 terminates early */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* 2F1 does not terminate early enough, so something survives */ + /* [Abramowitz+Stegun, 15.1.2] */ + gsl_sf_result g1, g2, g3, g4, g5; + double s1, s2, s3, s4, s5; + int stat = 0; + stat += gsl_sf_lngamma_sgn_e(a-c+1, &g1, &s1); + stat += gsl_sf_lngamma_sgn_e(b-c+1, &g2, &s2); + stat += gsl_sf_lngamma_sgn_e(a, &g3, &s3); + stat += gsl_sf_lngamma_sgn_e(b, &g4, &s4); + stat += gsl_sf_lngamma_sgn_e(-c+2, &g5, &s5); + if(stat != 0) { + DOMAIN_ERROR(result); + } + else { + gsl_sf_result F; + int stat_F = gsl_sf_hyperg_2F1_e(a-c+1, b-c+1, -c+2, x, &F); + double ln_pre_val = g1.val + g2.val - g3.val - g4.val - g5.val; + double ln_pre_err = g1.err + g2.err + g3.err + g4.err + g5.err; + double sg = s1 * s2 * s3 * s4 * s5; + int stat_e = gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + sg * F.val, F.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_F); + } + } + } + else { + /* generic c */ + gsl_sf_result F; + gsl_sf_result lng; + double sgn; + int stat_g = gsl_sf_lngamma_sgn_e(c, &lng, &sgn); + int stat_F = gsl_sf_hyperg_2F1_e(a, b, c, x, &F); + int stat_e = gsl_sf_exp_mult_err_e(-lng.val, lng.err, + sgn*F.val, F.err, + result); + return GSL_ERROR_SELECT_3(stat_e, stat_F, stat_g); + } +} + + +int +gsl_sf_hyperg_2F1_conj_renorm_e(const double aR, const double aI, const double c, + const double x, + gsl_sf_result * result + ) +{ + const double rintc = floor(c + 0.5); + const double rinta = floor(aR + 0.5); + const int a_neg_integer = ( aR < 0.0 && fabs(aR-rinta) < locEPS && aI == 0.0); + const int c_neg_integer = ( c < 0.0 && fabs(c - rintc) < locEPS ); + + if(c_neg_integer) { + if(a_neg_integer && aR > c+0.1) { + /* 2F1 terminates early */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* 2F1 does not terminate early enough, so something survives */ + /* [Abramowitz+Stegun, 15.1.2] */ + gsl_sf_result g1, g2; + gsl_sf_result g3; + gsl_sf_result a1, a2; + int stat = 0; + stat += gsl_sf_lngamma_complex_e(aR-c+1, aI, &g1, &a1); + stat += gsl_sf_lngamma_complex_e(aR, aI, &g2, &a2); + stat += gsl_sf_lngamma_e(-c+2.0, &g3); + if(stat != 0) { + DOMAIN_ERROR(result); + } + else { + gsl_sf_result F; + int stat_F = gsl_sf_hyperg_2F1_conj_e(aR-c+1, aI, -c+2, x, &F); + double ln_pre_val = 2.0*(g1.val - g2.val) - g3.val; + double ln_pre_err = 2.0 * (g1.err + g2.err) + g3.err; + int stat_e = gsl_sf_exp_mult_err_e(ln_pre_val, ln_pre_err, + F.val, F.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_F); + } + } + } + else { + /* generic c */ + gsl_sf_result F; + gsl_sf_result lng; + double sgn; + int stat_g = gsl_sf_lngamma_sgn_e(c, &lng, &sgn); + int stat_F = gsl_sf_hyperg_2F1_conj_e(aR, aI, c, x, &F); + int stat_e = gsl_sf_exp_mult_err_e(-lng.val, lng.err, + sgn*F.val, F.err, + result); + return GSL_ERROR_SELECT_3(stat_e, stat_F, stat_g); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hyperg_2F1(double a, double b, double c, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_2F1_e(a, b, c, x, &result)); +} + +double gsl_sf_hyperg_2F1_conj(double aR, double aI, double c, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_2F1_conj_e(aR, aI, c, x, &result)); +} + +double gsl_sf_hyperg_2F1_renorm(double a, double b, double c, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_2F1_renorm_e(a, b, c, x, &result)); +} + +double gsl_sf_hyperg_2F1_conj_renorm(double aR, double aI, double c, double x) +{ + EVAL_RESULT(gsl_sf_hyperg_2F1_conj_renorm_e(aR, aI, c, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/hyperg_U.c b/software/gsl-1.15/specfunc/hyperg_U.c new file mode 100644 index 000000000..7137a7ec6 --- /dev/null +++ b/software/gsl-1.15/specfunc/hyperg_U.c @@ -0,0 +1,1746 @@ +/* specfunc/hyperg_U.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2009, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "hyperg.h" + +#define INT_THRESHOLD (1000.0*GSL_DBL_EPSILON) + +#define SERIES_EVAL_OK(a,b,x) ((fabs(a) < 5 && b < 5 && x < 2.0) || (fabs(a) < 10 && b < 10 && x < 1.0)) + +#define ASYMP_EVAL_OK(a,b,x) (GSL_MAX_DBL(fabs(a),1.0)*GSL_MAX_DBL(fabs(1.0+a-b),1.0) < 0.99*fabs(x)) + +/* Log[U(a,2a,x)] + * [Abramowitz+stegun, 13.6.21] + * Assumes x > 0, a > 1/2. + */ +static +int +hyperg_lnU_beq2a(const double a, const double x, gsl_sf_result * result) +{ + const double lx = log(x); + const double nu = a - 0.5; + const double lnpre = 0.5*(x - M_LNPI) - nu*lx; + gsl_sf_result lnK; + gsl_sf_bessel_lnKnu_e(nu, 0.5*x, &lnK); + result->val = lnpre + lnK.val; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(0.5*x) + 0.5*M_LNPI + fabs(nu*lx)); + result->err += lnK.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; +} + + +/* Evaluate u_{N+1}/u_N by Steed's continued fraction method. + * + * u_N := Gamma[a+N]/Gamma[a] U(a + N, b, x) + * + * u_{N+1}/u_N = (a+N) U(a+N+1,b,x)/U(a+N,b,x) + */ +static +int +hyperg_U_CF1(const double a, const double b, const int N, const double x, + double * result, int * count) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 20000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = -(a + N); + double b1 = (b - 2.0*a - x - 2.0*(N+1)); + double An = b1*Anm1 + a1*Anm2; + double Bn = b1*Bnm1 + a1*Bnm2; + double an, bn; + double fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = -(a + N + n - b)*(a + N + n - 1.0); + bn = (b - 2.0*a - x - 2.0*(N+n)); + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 10.0*GSL_DBL_EPSILON) break; + } + + *result = fn; + *count = n; + + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Large x asymptotic for x^a U(a,b,x) + * Based on SLATEC D9CHU() [W. Fullerton] + * + * Uses a rational approximation due to Luke. + * See [Luke, Algorithms for the Computation of Special Functions, p. 252] + * [Luke, Utilitas Math. (1977)] + * + * z^a U(a,b,z) ~ 2F0(a,1+a-b,-1/z) + * + * This assumes that a is not a negative integer and + * that 1+a-b is not a negative integer. If one of them + * is, then the 2F0 actually terminates, the above + * relation is an equality, and the sum should be + * evaluated directly [see below]. + */ +static +int +d9chu(const double a, const double b, const double x, gsl_sf_result * result) +{ + const double EPS = 8.0 * GSL_DBL_EPSILON; /* EPS = 4.0D0*D1MACH(4) */ + const int maxiter = 500; + double aa[4], bb[4]; + int i; + + double bp = 1.0 + a - b; + double ab = a*bp; + double ct2 = 2.0 * (x - ab); + double sab = a + bp; + + double ct3 = sab + 1.0 + ab; + double anbn = ct3 + sab + 3.0; + double ct1 = 1.0 + 2.0*x/anbn; + + bb[0] = 1.0; + aa[0] = 1.0; + + bb[1] = 1.0 + 2.0*x/ct3; + aa[1] = 1.0 + ct2/ct3; + + bb[2] = 1.0 + 6.0*ct1*x/ct3; + aa[2] = 1.0 + 6.0*ab/anbn + 3.0*ct1*ct2/ct3; + + for(i=4; ival = aa[3]/bb[3]; + result->err = 8.0 * GSL_DBL_EPSILON * fabs(result->val); + + if(i == maxiter) { + GSL_ERROR ("error", GSL_EMAXITER); + } + else { + return GSL_SUCCESS; + } +} + + +/* Evaluate asymptotic for z^a U(a,b,z) ~ 2F0(a,1+a-b,-1/z) + * We check for termination of the 2F0 as a special case. + * Assumes x > 0. + * Also assumes a,b are not too large compared to x. + */ +static +int +hyperg_zaU_asymp(const double a, const double b, const double x, gsl_sf_result *result) +{ + const double ap = a; + const double bp = 1.0 + a - b; + const double rintap = floor(ap + 0.5); + const double rintbp = floor(bp + 0.5); + const int ap_neg_int = ( ap < 0.0 && fabs(ap - rintap) < INT_THRESHOLD ); + const int bp_neg_int = ( bp < 0.0 && fabs(bp - rintbp) < INT_THRESHOLD ); + + if(ap_neg_int || bp_neg_int) { + /* Evaluate 2F0 polynomial. + */ + double mxi = -1.0/x; + double nmax = -(int)(GSL_MIN(ap,bp) - 0.1); + double tn = 1.0; + double sum = 1.0; + double n = 1.0; + double sum_err = 0.0; + while(n <= nmax) { + double apn = (ap+n-1.0); + double bpn = (bp+n-1.0); + tn *= ((apn/n)*mxi)*bpn; + sum += tn; + sum_err += 2.0 * GSL_DBL_EPSILON * fabs(tn); + n += 1.0; + } + result->val = sum; + result->err = sum_err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(nmax)+1.0) * fabs(sum); + return GSL_SUCCESS; + } + else { + return d9chu(a,b,x,result); + } +} + + +/* Evaluate finite sum which appears below. + */ +static +int +hyperg_U_finite_sum(int N, double a, double b, double x, double xeps, + gsl_sf_result * result) +{ + int i; + double sum_val; + double sum_err; + + if(N <= 0) { + double t_val = 1.0; + double t_err = 0.0; + gsl_sf_result poch; + int stat_poch; + + sum_val = 1.0; + sum_err = 0.0; + for(i=1; i<= -N; i++) { + const double xi1 = i - 1; + const double mult = (a+xi1)*x/((b+xi1)*(xi1+1.0)); + t_val *= mult; + t_err += fabs(mult) * t_err + fabs(t_val) * 8.0 * 2.0 * GSL_DBL_EPSILON; + sum_val += t_val; + sum_err += t_err; + } + + stat_poch = gsl_sf_poch_e(1.0+a-b, -a, &poch); + + result->val = sum_val * poch.val; + result->err = fabs(sum_val) * poch.err + sum_err * fabs(poch.val); + result->err += fabs(poch.val) * (fabs(N) + 2.0) * GSL_DBL_EPSILON * fabs(sum_val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->err *= 2.0; /* FIXME: fudge factor... why is the error estimate too small? */ + return stat_poch; + } + else { + const int M = N - 2; + if(M < 0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + gsl_sf_result gbm1; + gsl_sf_result gamr; + int stat_gbm1; + int stat_gamr; + double t_val = 1.0; + double t_err = 0.0; + + sum_val = 1.0; + sum_err = 0.0; + for(i=1; i<=M; i++) { + const double mult = (a-b+i)*x/((1.0-b+i)*i); + t_val *= mult; + t_err += t_err * fabs(mult) + fabs(t_val) * 8.0 * 2.0 * GSL_DBL_EPSILON; + sum_val += t_val; + sum_err += t_err; + } + + stat_gbm1 = gsl_sf_gamma_e(b-1.0, &gbm1); + stat_gamr = gsl_sf_gammainv_e(a, &gamr); + + if(stat_gbm1 == GSL_SUCCESS) { + gsl_sf_result powx1N; + int stat_p = gsl_sf_pow_int_e(x, 1-N, &powx1N); + double pe_val = powx1N.val * xeps; + double pe_err = powx1N.err * fabs(xeps) + 2.0 * GSL_DBL_EPSILON * fabs(pe_val); + double coeff_val = gbm1.val * gamr.val * pe_val; + double coeff_err = gbm1.err * fabs(gamr.val * pe_val) + + gamr.err * fabs(gbm1.val * pe_val) + + fabs(gbm1.val * gamr.val) * pe_err + + 2.0 * GSL_DBL_EPSILON * fabs(coeff_val); + + result->val = sum_val * coeff_val; + result->err = fabs(sum_val) * coeff_err + sum_err * fabs(coeff_val); + result->err += 2.0 * GSL_DBL_EPSILON * (M+2.0) * fabs(result->val); + result->err *= 2.0; /* FIXME: fudge factor... why is the error estimate too small? */ + return stat_p; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_gbm1; + } + } + } +} + + +/* Evaluate infinite sum which appears below. + */ +static +int +hyperg_U_infinite_sum_stable(int N, double a, double bint, double b, double beps, double x, double xeps, gsl_sf_result sum, + gsl_sf_result * result) +{ + const double EPS = 2.0 * GSL_DBL_EPSILON; /* EPS = D1MACH(3) */ + + int istrt = ( N < 1 ? 1-N : 0 ); + double xi = istrt; + + gsl_sf_result gamr; + gsl_sf_result powx; + int stat_gamr = gsl_sf_gammainv_e(1.0+a-b, &gamr); + int stat_powx = gsl_sf_pow_int_e(x, istrt, &powx); + double sarg = beps*M_PI; + double sfact = ( sarg != 0.0 ? sarg/sin(sarg) : 1.0 ); + double factor_val = sfact * ( GSL_IS_ODD(N) ? -1.0 : 1.0 ) * gamr.val * powx.val; + double factor_err = fabs(gamr.val) * powx.err + fabs(powx.val) * gamr.err + + 2.0 * GSL_DBL_EPSILON * fabs(factor_val); + + gsl_sf_result pochai; + gsl_sf_result gamri1; + gsl_sf_result gamrni; + int stat_pochai = gsl_sf_poch_e(a, xi, &pochai); + int stat_gamri1 = gsl_sf_gammainv_e(xi + 1.0, &gamri1); + int stat_gamrni = gsl_sf_gammainv_e(bint + xi, &gamrni); + int stat_gam123 = GSL_ERROR_SELECT_3(stat_gamr, stat_gamri1, stat_gamrni); + int stat_gamall = GSL_ERROR_SELECT_3(stat_gam123, stat_pochai, stat_powx); + + gsl_sf_result pochaxibeps; + gsl_sf_result gamrxi1beps; + int stat_pochaxibeps = gsl_sf_poch_e(a, xi-beps, &pochaxibeps); + int stat_gamrxi1beps = gsl_sf_gammainv_e(xi + 1.0 - beps, &gamrxi1beps); + + int stat_all = GSL_ERROR_SELECT_3(stat_gamall, stat_pochaxibeps, stat_gamrxi1beps); + + double b0_val = factor_val * pochaxibeps.val * gamrni.val * gamrxi1beps.val; + double b0_err = fabs(factor_val * pochaxibeps.val * gamrni.val) * gamrxi1beps.err + + fabs(factor_val * pochaxibeps.val * gamrxi1beps.val) * gamrni.err + + fabs(factor_val * gamrni.val * gamrxi1beps.val) * pochaxibeps.err + + fabs(pochaxibeps.val * gamrni.val * gamrxi1beps.val) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(b0_val); + + /* + C X**(-BEPS) IS VERY DIFFERENT FROM 1.0, SO THE + C STRAIGHTFORWARD FORMULATION IS STABLE. + */ + int i; + double dchu_val; + double dchu_err; + double t_val; + double t_err; + gsl_sf_result dgamrbxi; + int stat_dgamrbxi = gsl_sf_gammainv_e(b+xi, &dgamrbxi); + double a0_val = factor_val * pochai.val * dgamrbxi.val * gamri1.val / beps; + double a0_err = fabs(factor_val * pochai.val * dgamrbxi.val / beps) * gamri1.err + + fabs(factor_val * pochai.val * gamri1.val / beps) * dgamrbxi.err + + fabs(factor_val * dgamrbxi.val * gamri1.val / beps) * pochai.err + + fabs(pochai.val * dgamrbxi.val * gamri1.val / beps) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(a0_val); + stat_all = GSL_ERROR_SELECT_2(stat_all, stat_dgamrbxi); + + b0_val = xeps * b0_val / beps; + b0_err = fabs(xeps / beps) * b0_err + 4.0 * GSL_DBL_EPSILON * fabs(b0_val); + dchu_val = sum.val + a0_val - b0_val; + dchu_err = sum.err + a0_err + b0_err + + 2.0 * GSL_DBL_EPSILON * (fabs(sum.val) + fabs(a0_val) + fabs(b0_val)); + + for(i=1; i<2000; i++) { + double xi = istrt + i; + double xi1 = istrt + i - 1; + double a0_multiplier = (a+xi1)*x/((b+xi1)*xi); + double b0_multiplier = (a+xi1-beps)*x/((bint+xi1)*(xi-beps)); + a0_val *= a0_multiplier; + a0_err += fabs(a0_multiplier) * a0_err; + b0_val *= b0_multiplier; + b0_err += fabs(b0_multiplier) * b0_err; + t_val = a0_val - b0_val; + t_err = a0_err + b0_err; + dchu_val += t_val; + dchu_err += t_err; + if(fabs(t_val) < EPS*fabs(dchu_val)) break; + } + + result->val = dchu_val; + result->err = 2.0 * dchu_err; + result->err += 2.0 * fabs(t_val); + result->err += 4.0 * GSL_DBL_EPSILON * (i+2.0) * fabs(dchu_val); + result->err *= 2.0; /* FIXME: fudge factor */ + + if(i >= 2000) { + GSL_ERROR ("error", GSL_EMAXITER); + } + else { + return stat_all; + } +} + +static +int +hyperg_U_infinite_sum_simple(int N, double a, double bint, double b, double beps, double x, double xeps, gsl_sf_result sum, + gsl_sf_result * result) +{ + const double EPS = 2.0 * GSL_DBL_EPSILON; /* EPS = D1MACH(3) */ + + int istrt = ( N < 1 ? 1-N : 0 ); + double xi = istrt; + + gsl_sf_result powx; + int stat_powx = gsl_sf_pow_int_e(x, istrt, &powx); + double sarg = beps*M_PI; + double sfact = ( sarg != 0.0 ? sarg/sin(sarg) : 1.0 ); + double factor_val = sfact * ( GSL_IS_ODD(N) ? -1.0 : 1.0 ) * powx.val; + double factor_err = fabs(powx.err) + 2.0 * GSL_DBL_EPSILON * fabs(factor_val); + + gsl_sf_result pochai; + gsl_sf_result gamri1; + gsl_sf_result gamrni; + int stat_pochai = gsl_sf_poch_e(a, xi, &pochai); + int stat_gamri1 = gsl_sf_gammainv_e(xi + 1.0, &gamri1); + int stat_gamrni = gsl_sf_gammainv_e(bint + xi, &gamrni); + int stat_gam123 = GSL_ERROR_SELECT_2(stat_gamri1, stat_gamrni); + int stat_gamall = GSL_ERROR_SELECT_3(stat_gam123, stat_pochai, stat_powx); + + gsl_sf_result pochaxibeps; + gsl_sf_result gamrxi1beps; + int stat_pochaxibeps = gsl_sf_poch_e(a, xi-beps, &pochaxibeps); + int stat_gamrxi1beps = gsl_sf_gammainv_e(xi + 1.0 - beps, &gamrxi1beps); + + int stat_all = GSL_ERROR_SELECT_3(stat_gamall, stat_pochaxibeps, stat_gamrxi1beps); + + double X = sfact * ( GSL_IS_ODD(N) ? -1.0 : 1.0 ) * powx.val * gsl_sf_poch(1 + a - b, xi - 1 + b - beps) * gsl_sf_gammainv(a); + + double b0_val = X * gamrni.val * gamrxi1beps.val; + double b0_err = fabs(factor_val * pochaxibeps.val * gamrni.val) * gamrxi1beps.err + + fabs(factor_val * pochaxibeps.val * gamrxi1beps.val) * gamrni.err + + fabs(factor_val * gamrni.val * gamrxi1beps.val) * pochaxibeps.err + + fabs(pochaxibeps.val * gamrni.val * gamrxi1beps.val) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(b0_val); + + /* + C X**(-BEPS) IS VERY DIFFERENT FROM 1.0, SO THE + C STRAIGHTFORWARD FORMULATION IS STABLE. + */ + int i; + double dchu_val; + double dchu_err; + double t_val; + double t_err; + gsl_sf_result gamr; + gsl_sf_result dgamrbxi; + int stat_gamr = gsl_sf_gammainv_e(1.0+a-b, &gamr); + int stat_dgamrbxi = gsl_sf_gammainv_e(b+xi, &dgamrbxi); + double a0_val = factor_val * gamr.val * pochai.val * dgamrbxi.val * gamri1.val / beps; + double a0_err = fabs(factor_val * pochai.val * dgamrbxi.val * gamri1.val / beps) * gamr.err + + fabs(factor_val * gamr.val * dgamrbxi.val * gamri1.val / beps) * pochai.err + + fabs(factor_val * gamr.val * pochai.val * gamri1.val / beps) * dgamrbxi.err + + fabs(factor_val * gamr.val * pochai.val * dgamrbxi.val / beps) * gamri1.err + + fabs(pochai.val * gamr.val * dgamrbxi.val * gamri1.val / beps) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(a0_val); + stat_all = GSL_ERROR_SELECT_3(stat_all, stat_gamr, stat_dgamrbxi); + + b0_val = xeps * b0_val / beps; + b0_err = fabs(xeps / beps) * b0_err + 4.0 * GSL_DBL_EPSILON * fabs(b0_val); + dchu_val = sum.val + a0_val - b0_val; + dchu_err = sum.err + a0_err + b0_err + + 2.0 * GSL_DBL_EPSILON * (fabs(sum.val) + fabs(a0_val) + fabs(b0_val)); + for(i=1; i<2000; i++) { + double xi = istrt + i; + double xi1 = istrt + i - 1; + double a0_multiplier = (a+xi1)*x/((b+xi1)*xi); + double b0_multiplier = (a+xi1-beps)*x/((bint+xi1)*(xi-beps)); + a0_val *= a0_multiplier; + a0_err += fabs(a0_multiplier) * a0_err; + b0_val *= b0_multiplier; + b0_err += fabs(b0_multiplier) * b0_err; + t_val = a0_val - b0_val; + t_err = a0_err + b0_err; + dchu_val += t_val; + dchu_err += t_err; + if(!finite(t_val) || fabs(t_val) < EPS*fabs(dchu_val)) break; + } + + result->val = dchu_val; + result->err = 2.0 * dchu_err; + result->err += 2.0 * fabs(t_val); + result->err += 4.0 * GSL_DBL_EPSILON * (i+2.0) * fabs(dchu_val); + result->err *= 2.0; /* FIXME: fudge factor */ + + if(i >= 2000) { + GSL_ERROR ("error", GSL_EMAXITER); + } + else { + return stat_all; + } +} + + +static +int +hyperg_U_infinite_sum_improved(int N, double a, double bint, double b, double beps, double x, double xeps, gsl_sf_result sum, + gsl_sf_result * result) +{ + const double EPS = 2.0 * GSL_DBL_EPSILON; /* EPS = D1MACH(3) */ + const double lnx = log(x); + + int istrt = ( N < 1 ? 1-N : 0 ); + double xi = istrt; + + gsl_sf_result gamr; + gsl_sf_result powx; + int stat_gamr = gsl_sf_gammainv_e(1.0+a-b, &gamr); + int stat_powx = gsl_sf_pow_int_e(x, istrt, &powx); + double sarg = beps*M_PI; + double sfact = ( sarg != 0.0 ? sarg/sin(sarg) : 1.0 ); + double factor_val = sfact * ( GSL_IS_ODD(N) ? -1.0 : 1.0 ) * gamr.val * powx.val; + double factor_err = fabs(gamr.val) * powx.err + fabs(powx.val) * gamr.err + + 2.0 * GSL_DBL_EPSILON * fabs(factor_val); + + gsl_sf_result pochai; + gsl_sf_result gamri1; + gsl_sf_result gamrni; + int stat_pochai = gsl_sf_poch_e(a, xi, &pochai); + int stat_gamri1 = gsl_sf_gammainv_e(xi + 1.0, &gamri1); + int stat_gamrni = gsl_sf_gammainv_e(bint + xi, &gamrni); + int stat_gam123 = GSL_ERROR_SELECT_3(stat_gamr, stat_gamri1, stat_gamrni); + int stat_gamall = GSL_ERROR_SELECT_3(stat_gam123, stat_pochai, stat_powx); + + gsl_sf_result pochaxibeps; + gsl_sf_result gamrxi1beps; + int stat_pochaxibeps = gsl_sf_poch_e(a, xi-beps, &pochaxibeps); + int stat_gamrxi1beps = gsl_sf_gammainv_e(xi + 1.0 - beps, &gamrxi1beps); + + int stat_all = GSL_ERROR_SELECT_3(stat_gamall, stat_pochaxibeps, stat_gamrxi1beps); + + double b0_val = factor_val * pochaxibeps.val * gamrni.val * gamrxi1beps.val; + double b0_err = fabs(factor_val * pochaxibeps.val * gamrni.val) * gamrxi1beps.err + + fabs(factor_val * pochaxibeps.val * gamrxi1beps.val) * gamrni.err + + fabs(factor_val * gamrni.val * gamrxi1beps.val) * pochaxibeps.err + + fabs(pochaxibeps.val * gamrni.val * gamrxi1beps.val) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(b0_val); + + /* + C X**(-BEPS) IS CLOSE TO 1.0D0, SO WE MUST BE + C CAREFUL IN EVALUATING THE DIFFERENCES. + */ + int i; + gsl_sf_result pch1ai; + gsl_sf_result pch1i; + gsl_sf_result poch1bxibeps; + int stat_pch1ai = gsl_sf_pochrel_e(a + xi, -beps, &pch1ai); + int stat_pch1i = gsl_sf_pochrel_e(xi + 1.0 - beps, beps, &pch1i); + int stat_poch1bxibeps = gsl_sf_pochrel_e(b+xi, -beps, &poch1bxibeps); + double c0_t1_val = beps*pch1ai.val*pch1i.val; + double c0_t1_err = fabs(beps) * fabs(pch1ai.val) * pch1i.err + + fabs(beps) * fabs(pch1i.val) * pch1ai.err + + 2.0 * GSL_DBL_EPSILON * fabs(c0_t1_val); + double c0_t2_val = -poch1bxibeps.val + pch1ai.val - pch1i.val + c0_t1_val; + double c0_t2_err = poch1bxibeps.err + pch1ai.err + pch1i.err + c0_t1_err + + 2.0 * GSL_DBL_EPSILON * fabs(c0_t2_val); + double c0_val = factor_val * pochai.val * gamrni.val * gamri1.val * c0_t2_val; + double c0_err = fabs(factor_val * pochai.val * gamrni.val * gamri1.val) * c0_t2_err + + fabs(factor_val * pochai.val * gamrni.val * c0_t2_val) * gamri1.err + + fabs(factor_val * pochai.val * gamri1.val * c0_t2_val) * gamrni.err + + fabs(factor_val * gamrni.val * gamri1.val * c0_t2_val) * pochai.err + + fabs(pochai.val * gamrni.val * gamri1.val * c0_t2_val) * factor_err + + 2.0 * GSL_DBL_EPSILON * fabs(c0_val); + /* + C XEPS1 = (1.0 - X**(-BEPS))/BEPS = (X**(-BEPS) - 1.0)/(-BEPS) + */ + gsl_sf_result dexprl; + int stat_dexprl = gsl_sf_exprel_e(-beps*lnx, &dexprl); + double xeps1_val = lnx * dexprl.val; + double xeps1_err = 2.0 * GSL_DBL_EPSILON * (1.0 + fabs(beps*lnx)) * fabs(dexprl.val) + + fabs(lnx) * dexprl.err + + 2.0 * GSL_DBL_EPSILON * fabs(xeps1_val); + double dchu_val = sum.val + c0_val + xeps1_val*b0_val; + double dchu_err = sum.err + c0_err + + fabs(xeps1_val)*b0_err + xeps1_err * fabs(b0_val) + + fabs(b0_val*lnx)*dexprl.err + + 2.0 * GSL_DBL_EPSILON * (fabs(sum.val) + fabs(c0_val) + fabs(xeps1_val*b0_val)); + double xn = N; + double t_val; + double t_err; + + stat_all = GSL_ERROR_SELECT_5(stat_all, stat_dexprl, stat_poch1bxibeps, stat_pch1i, stat_pch1ai); + + for(i=1; i<2000; i++) { + const double xi = istrt + i; + const double xi1 = istrt + i - 1; + const double tmp = (a-1.0)*(xn+2.0*xi-1.0) + xi*(xi-beps); + const double b0_multiplier = (a+xi1-beps)*x/((xn+xi1)*(xi-beps)); + const double c0_multiplier_1 = (a+xi1)*x/((b+xi1)*xi); + const double c0_multiplier_2 = tmp / (xi*(b+xi1)*(a+xi1-beps)); + b0_val *= b0_multiplier; + b0_err += fabs(b0_multiplier) * b0_err + fabs(b0_val) * 8.0 * 2.0 * GSL_DBL_EPSILON; + c0_val = c0_multiplier_1 * c0_val - c0_multiplier_2 * b0_val; + c0_err = fabs(c0_multiplier_1) * c0_err + + fabs(c0_multiplier_2) * b0_err + + fabs(c0_val) * 8.0 * 2.0 * GSL_DBL_EPSILON + + fabs(b0_val * c0_multiplier_2) * 16.0 * 2.0 * GSL_DBL_EPSILON; + t_val = c0_val + xeps1_val*b0_val; + t_err = c0_err + fabs(xeps1_val)*b0_err; + t_err += fabs(b0_val*lnx) * dexprl.err; + t_err += fabs(b0_val)*xeps1_err; + dchu_val += t_val; + dchu_err += t_err; + if(fabs(t_val) < EPS*fabs(dchu_val)) break; + } + + result->val = dchu_val; + result->err = 2.0 * dchu_err; + result->err += 2.0 * fabs(t_val); + result->err += 4.0 * GSL_DBL_EPSILON * (i+2.0) * fabs(dchu_val); + result->err *= 2.0; /* FIXME: fudge factor */ + + if(i >= 2000) { + GSL_ERROR ("error", GSL_EMAXITER); + } + else { + return stat_all; + } +} + +/* Based on SLATEC DCHU() [W. Fullerton] + * Assumes x > 0. + * This is just a series summation method, and + * it is not good for large a. + * + * I patched up the window for 1+a-b near zero. [GJ] + */ +static +int +hyperg_U_series(const double a, const double b, const double x, gsl_sf_result * result) +{ + const double SQRT_EPS = M_SQRT2 * GSL_SQRT_DBL_EPSILON; + + if(fabs(1.0 + a - b) < SQRT_EPS) { + /* Original Comment: ALGORITHM IS BAD WHEN 1+A-B IS NEAR ZERO FOR SMALL X + */ + /* We can however do the following: + * U(a,b,x) = U(a,a+1,x) when 1+a-b=0 + * and U(a,a+1,x) = x^(-a). + */ + double lnr = -a * log(x); + int stat_e = gsl_sf_exp_e(lnr, result); + result->err += 2.0 * SQRT_EPS * fabs(result->val); + return stat_e; + } + else { + double bint = ( b < 0.0 ? ceil(b-0.5) : floor(b+0.5) ); + double beps = b - bint; + int N = bint; + + double lnx = log(x); + double xeps = exp(-beps*lnx); + + /* Evaluate finite sum. + */ + gsl_sf_result sum; + int stat_sum = hyperg_U_finite_sum(N, a, b, x, xeps, &sum); + int stat_inf; + + /* Evaluate infinite sum. */ + if(fabs(xeps-1.0) > 0.5 ) { + stat_inf = hyperg_U_infinite_sum_stable(N, a, bint, b, beps, x, xeps, sum, result); + } else if (1+a-b < 0 && 1+a-b==floor(1+a-b) && beps != 0) { + stat_inf = hyperg_U_infinite_sum_simple(N, a, bint, b, beps, x, xeps, sum, result); + } else { + stat_inf = hyperg_U_infinite_sum_improved(N, a, bint, b, beps, x, xeps, sum, result); + } + + return GSL_ERROR_SELECT_2(stat_sum, stat_inf); + + } +} + + + +/* Assumes b > 0 and x > 0. + */ +static +int +hyperg_U_small_ab(const double a, const double b, const double x, gsl_sf_result * result) +{ + if(a == -1.0) { + /* U(-1,c+1,x) = Laguerre[c,0,x] = -b + x + */ + result->val = -b + x; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(b) + fabs(x)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(a == 0.0) { + /* U(0,c+1,x) = Laguerre[c,0,x] = 1 + */ + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ASYMP_EVAL_OK(a,b,x)) { + double p = pow(x, -a); + gsl_sf_result asymp; + int stat_asymp = hyperg_zaU_asymp(a, b, x, &asymp); + result->val = asymp.val * p; + result->err = asymp.err * p; + result->err += fabs(asymp.val) * GSL_DBL_EPSILON * fabs(a) * p; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_asymp; + } + else { + return hyperg_U_series(a, b, x, result); + } +} + + +/* Assumes b > 0 and x > 0. + */ +static +int +hyperg_U_small_a_bgt0(const double a, const double b, const double x, + gsl_sf_result * result, + double * ln_multiplier + ) +{ + if(a == 0.0) { + result->val = 1.0; + result->err = 0.0; + *ln_multiplier = 0.0; + return GSL_SUCCESS; + } + else if( (b > 5000.0 && x < 0.90 * fabs(b)) + || (b > 500.0 && x < 0.50 * fabs(b)) + ) { + int stat = gsl_sf_hyperg_U_large_b_e(a, b, x, result, ln_multiplier); + if(stat == GSL_EOVRFLW) + return GSL_SUCCESS; + else + return stat; + } + else if(b > 15.0) { + /* Recurse up from b near 1. + */ + double eps = b - floor(b); + double b0 = 1.0 + eps; + gsl_sf_result r_Ubm1; + gsl_sf_result r_Ub; + int stat_0 = hyperg_U_small_ab(a, b0, x, &r_Ubm1); + int stat_1 = hyperg_U_small_ab(a, b0+1.0, x, &r_Ub); + double Ubm1 = r_Ubm1.val; + double Ub = r_Ub.val; + double Ubp1; + double bp; + + for(bp = b0+1.0; bpval = Ub; + result->err = (fabs(r_Ubm1.err/r_Ubm1.val) + fabs(r_Ub.err/r_Ub.val)) * fabs(Ub); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(b-b0)+1.0) * fabs(Ub); + *ln_multiplier = 0.0; + return GSL_ERROR_SELECT_2(stat_0, stat_1); + } + else { + *ln_multiplier = 0.0; + return hyperg_U_small_ab(a, b, x, result); + } +} + + +/* We use this to keep track of large + * dynamic ranges in the recursions. + * This can be important because sometimes + * we want to calculate a very large and + * a very small number and the answer is + * the product, of order 1. This happens, + * for instance, when we apply a Kummer + * transform to make b positive and + * both x and b are large. + */ +#define RESCALE_2(u0,u1,factor,count) \ +do { \ + double au0 = fabs(u0); \ + if(au0 > factor) { \ + u0 /= factor; \ + u1 /= factor; \ + count++; \ + } \ + else if(au0 < 1.0/factor) { \ + u0 *= factor; \ + u1 *= factor; \ + count--; \ + } \ +} while (0) + + +/* Specialization to b >= 1, for integer parameters. + * Assumes x > 0. + */ +static +int +hyperg_U_int_bge1(const int a, const int b, const double x, + gsl_sf_result_e10 * result) +{ + if(a == 0) { + result->val = 1.0; + result->err = 0.0; + result->e10 = 0; + return GSL_SUCCESS; + } + else if(a == -1) { + result->val = -b + x; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(b) + fabs(x)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->e10 = 0; + return GSL_SUCCESS; + } + else if(b == a + 1) { + /* U(a,a+1,x) = x^(-a) + */ + return gsl_sf_exp_e10_e(-a*log(x), result); + } + else if(ASYMP_EVAL_OK(a,b,x)) { + const double ln_pre_val = -a*log(x); + const double ln_pre_err = 2.0 * GSL_DBL_EPSILON * fabs(ln_pre_val); + gsl_sf_result asymp; + int stat_asymp = hyperg_zaU_asymp(a, b, x, &asymp); + int stat_e = gsl_sf_exp_mult_err_e10_e(ln_pre_val, ln_pre_err, + asymp.val, asymp.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_asymp); + } + else if(SERIES_EVAL_OK(a,b,x) && 1 + a - b > 0) { + gsl_sf_result ser; + const int stat_ser = hyperg_U_series(a, b, x, &ser); + result->val = ser.val; + result->err = ser.err; + result->e10 = 0; + return stat_ser; + } + else if(a < 0) { + /* Recurse backward from a = -1,0. + */ + int scale_count = 0; + const double scale_factor = GSL_SQRT_DBL_MAX; + gsl_sf_result lnm; + gsl_sf_result y; + double lnscale; + double Uap1 = 1.0; /* U(0,b,x) */ + double Ua = -b + x; /* U(-1,b,x) */ + double Uam1; + int ap; + + for(ap=-1; ap>a; ap--) { + Uam1 = ap*(b-ap-1.0)*Uap1 + (x+2.0*ap-b)*Ua; + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count); + } + + lnscale = log(scale_factor); + lnm.val = scale_count*lnscale; + lnm.err = 2.0 * GSL_DBL_EPSILON * fabs(lnm.val); + y.val = Ua; + y.err = 4.0 * GSL_DBL_EPSILON * (fabs(a)+1.0) * fabs(Ua); + return gsl_sf_exp_mult_err_e10_e(lnm.val, lnm.err, y.val, y.err, result); + } + else if(b >= 2.0*a + x) { + /* Recurse forward from a = 0,1. + */ + int scale_count = 0; + const double scale_factor = GSL_SQRT_DBL_MAX; + gsl_sf_result r_Ua; + gsl_sf_result lnm; + gsl_sf_result y; + double lnscale; + double lm; + int stat_1 = hyperg_U_small_a_bgt0(1.0, b, x, &r_Ua, &lm); /* U(1,b,x) */ + int stat_e; + double Uam1 = 1.0; /* U(0,b,x) */ + double Ua = r_Ua.val; + double Uap1; + int ap; + + Uam1 *= exp(-lm); + + for(ap=1; apa_target; ap--) { + Uam1 = -((b-2.0*ap-x)*Ua + ap*(1.0+ap-b)*Uap1); + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count); + } + + if(Ua == 0.0) { + result->val = 0.0; + result->err = 0.0; + result->e10 = 0; + GSL_ERROR ("error", GSL_EZERODIV); + } + else { + double lnscl = -scale_count*log(scale_factor); + double lnpre_val = lnU_target + lnscl; + double lnpre_err = 2.0 * GSL_DBL_EPSILON * (fabs(lnU_target) + fabs(lnscl)); + double oUa_err = 2.0 * (fabs(a_target-a) + CF1_count + 1.0) * GSL_DBL_EPSILON * fabs(1.0/Ua); + int stat_e = gsl_sf_exp_mult_err_e10_e(lnpre_val, lnpre_err, + 1.0/Ua, oUa_err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_CF1); + } + } + else { + /* Recurse backward to near the b=2a+x line, then + * determine normalization by either direct evaluation + * or by a forward recursion. The direct evaluation + * is needed when x is small (which is precisely + * when it is easy to do). + */ + const double scale_factor = GSL_SQRT_DBL_MAX; + int scale_count_for = 0; + int scale_count_bck = 0; + int a0 = 1; + int a1 = a0 + ceil(0.5*(b-x) - a0); + double Ua1_bck_val; + double Ua1_bck_err; + double Ua1_for_val; + double Ua1_for_err; + int stat_for; + int stat_bck; + gsl_sf_result lm_for; + + { + /* Recurse back to determine U(a1,b), sans normalization. + */ + double ru; + int CF1_count; + int stat_CF1 = hyperg_U_CF1(a, b, 0, x, &ru, &CF1_count); + double Ua = 1.0; + double Uap1 = ru/a * Ua; + double Uam1; + int ap; + for(ap=a; ap>a1; ap--) { + Uam1 = -((b-2.0*ap-x)*Ua + ap*(1.0+ap-b)*Uap1); + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count_bck); + } + Ua1_bck_val = Ua; + Ua1_bck_err = 2.0 * GSL_DBL_EPSILON * (fabs(a1-a)+CF1_count+1.0) * fabs(Ua); + stat_bck = stat_CF1; + } + + if(b == 2*a1 && a1 > 1) { + /* This can happen when x is small, which is + * precisely when we need to be careful with + * this evaluation. + */ + hyperg_lnU_beq2a((double)a1, x, &lm_for); + Ua1_for_val = 1.0; + Ua1_for_err = 0.0; + stat_for = GSL_SUCCESS; + } + else if(b == 2*a1 - 1 && a1 > 1) { + /* Similar to the above. Happens when x is small. + * Use + * U(a,2a-1) = (x U(a,2a) - U(a-1,2(a-1))) / (2a - 2) + */ + gsl_sf_result lnU00, lnU12; + gsl_sf_result U00, U12; + hyperg_lnU_beq2a(a1-1.0, x, &lnU00); + hyperg_lnU_beq2a(a1, x, &lnU12); + if(lnU00.val > lnU12.val) { + lm_for.val = lnU00.val; + lm_for.err = lnU00.err; + U00.val = 1.0; + U00.err = 0.0; + gsl_sf_exp_err_e(lnU12.val - lm_for.val, lnU12.err + lm_for.err, &U12); + } + else { + lm_for.val = lnU12.val; + lm_for.err = lnU12.err; + U12.val = 1.0; + U12.err = 0.0; + gsl_sf_exp_err_e(lnU00.val - lm_for.val, lnU00.err + lm_for.err, &U00); + } + Ua1_for_val = (x * U12.val - U00.val) / (2.0*a1 - 2.0); + Ua1_for_err = (fabs(x)*U12.err + U00.err) / fabs(2.0*a1 - 2.0); + Ua1_for_err += 2.0 * GSL_DBL_EPSILON * fabs(Ua1_for_val); + stat_for = GSL_SUCCESS; + } + else { + /* Recurse forward to determine U(a1,b) with + * absolute normalization. + */ + gsl_sf_result r_Ua; + double Uam1 = 1.0; /* U(a0-1,b,x) = U(0,b,x) */ + double Ua; + double Uap1; + int ap; + double lm_for_local; + stat_for = hyperg_U_small_a_bgt0(a0, b, x, &r_Ua, &lm_for_local); /* U(1,b,x) */ + Ua = r_Ua.val; + Uam1 *= exp(-lm_for_local); + lm_for.val = lm_for_local; + lm_for.err = 0.0; + + for(ap=a0; apval = 0.0; + result->err = 0.0; + result->e10 = 0; + GSL_ERROR ("error", GSL_EZERODIV); + } + else if(Ua1_for_val == 0.0) { + /* Should never happen. */ + UNDERFLOW_ERROR_E10(result); + } + else { + double lns = (scale_count_for - scale_count_bck)*log(scale_factor); + double ln_for_val = log(fabs(Ua1_for_val)); + double ln_for_err = GSL_DBL_EPSILON + fabs(Ua1_for_err/Ua1_for_val); + double ln_bck_val = log(fabs(Ua1_bck_val)); + double ln_bck_err = GSL_DBL_EPSILON + fabs(Ua1_bck_err/Ua1_bck_val); + double lnr_val = lm_for.val + ln_for_val - ln_bck_val + lns; + double lnr_err = lm_for.err + ln_for_err + ln_bck_err + + 2.0 * GSL_DBL_EPSILON * (fabs(lm_for.val) + fabs(ln_for_val) + fabs(ln_bck_val) + fabs(lns)); + double sgn = GSL_SIGN(Ua1_for_val) * GSL_SIGN(Ua1_bck_val); + int stat_e = gsl_sf_exp_err_e10_e(lnr_val, lnr_err, result); + result->val *= sgn; + return GSL_ERROR_SELECT_3(stat_e, stat_bck, stat_for); + } + } + } +} + + +/* Handle b >= 1 for generic a,b values. + */ +static +int +hyperg_U_bge1(const double a, const double b, const double x, + gsl_sf_result_e10 * result) +{ + const double rinta = floor(a+0.5); + const int a_neg_integer = (a < 0.0 && fabs(a - rinta) < INT_THRESHOLD); + + if(a == 0.0) { + result->val = 1.0; + result->err = 0.0; + result->e10 = 0; + return GSL_SUCCESS; + } + else if(a_neg_integer && fabs(rinta) < INT_MAX) { + /* U(-n,b,x) = (-1)^n n! Laguerre[n,b-1,x] + */ + const int n = -(int)rinta; + const double sgn = (GSL_IS_ODD(n) ? -1.0 : 1.0); + gsl_sf_result lnfact; + gsl_sf_result L; + const int stat_L = gsl_sf_laguerre_n_e(n, b-1.0, x, &L); + gsl_sf_lnfact_e(n, &lnfact); + { + const int stat_e = gsl_sf_exp_mult_err_e10_e(lnfact.val, lnfact.err, + sgn*L.val, L.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_L); + } + } + else if(ASYMP_EVAL_OK(a,b,x)) { + const double ln_pre_val = -a*log(x); + const double ln_pre_err = 2.0 * GSL_DBL_EPSILON * fabs(ln_pre_val); + gsl_sf_result asymp; + int stat_asymp = hyperg_zaU_asymp(a, b, x, &asymp); + int stat_e = gsl_sf_exp_mult_err_e10_e(ln_pre_val, ln_pre_err, + asymp.val, asymp.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_asymp); + } + else if(fabs(a) <= 1.0) { + gsl_sf_result rU; + double ln_multiplier; + int stat_U = hyperg_U_small_a_bgt0(a, b, x, &rU, &ln_multiplier); + int stat_e = gsl_sf_exp_mult_err_e10_e(ln_multiplier, 2.0*GSL_DBL_EPSILON*fabs(ln_multiplier), rU.val, rU.err, result); + return GSL_ERROR_SELECT_2(stat_U, stat_e); + } + else if(SERIES_EVAL_OK(a,b,x)) { + gsl_sf_result ser; + const int stat_ser = hyperg_U_series(a, b, x, &ser); + result->val = ser.val; + result->err = ser.err; + result->e10 = 0; + return stat_ser; + } + else if(a < 0.0) { + /* Recurse backward on a and then upward on b. + */ + const double scale_factor = GSL_SQRT_DBL_MAX; + const double a0 = a - floor(a) - 1.0; + const double b0 = b - floor(b) + 1.0; + int scale_count = 0; + double lm_0, lm_1; + double lm_max; + gsl_sf_result r_Uap1; + gsl_sf_result r_Ua; + int stat_0 = hyperg_U_small_a_bgt0(a0+1.0, b0, x, &r_Uap1, &lm_0); + int stat_1 = hyperg_U_small_a_bgt0(a0, b0, x, &r_Ua, &lm_1); + int stat_e; + double Uap1 = r_Uap1.val; + double Ua = r_Ua.val; + double Uam1; + double ap; + lm_max = GSL_MAX(lm_0, lm_1); + Uap1 *= exp(lm_0-lm_max); + Ua *= exp(lm_1-lm_max); + + /* Downward recursion on a. + */ + for(ap=a0; ap>a+0.1; ap -= 1.0) { + Uam1 = ap*(b0-ap-1.0)*Uap1 + (x+2.0*ap-b0)*Ua; + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count); + } + + if(b < 2.0) { + /* b == b0, so no recursion necessary + */ + const double lnscale = log(scale_factor); + gsl_sf_result lnm; + gsl_sf_result y; + lnm.val = lm_max + scale_count * lnscale; + lnm.err = 2.0 * GSL_DBL_EPSILON * (fabs(lm_max) + scale_count * fabs(lnscale)); + y.val = Ua; + y.err = fabs(r_Uap1.err/r_Uap1.val) * fabs(Ua); + y.err += fabs(r_Ua.err/r_Ua.val) * fabs(Ua); + y.err += 2.0 * GSL_DBL_EPSILON * (fabs(a-a0) + 1.0) * fabs(Ua); + y.err *= fabs(lm_0-lm_max) + 1.0; + y.err *= fabs(lm_1-lm_max) + 1.0; + stat_e = gsl_sf_exp_mult_err_e10_e(lnm.val, lnm.err, y.val, y.err, result); + } + else { + /* Upward recursion on b. + */ + const double err_mult = fabs(b-b0) + fabs(a-a0) + 1.0; + const double lnscale = log(scale_factor); + gsl_sf_result lnm; + gsl_sf_result y; + + double Ubm1 = Ua; /* U(a,b0) */ + double Ub = (a*(b0-a-1.0)*Uap1 + (a+x)*Ua)/x; /* U(a,b0+1) */ + double Ubp1; + double bp; + for(bp=b0+1.0; bp= 2*a + x) { + /* Recurse forward from a near zero. + * Note that we cannot cross the singularity at + * the line b=a+1, because the only way we could + * be in that little wedge is if a < 1. But we + * have already dealt with the small a case. + */ + int scale_count = 0; + const double a0 = a - floor(a); + const double scale_factor = GSL_SQRT_DBL_MAX; + double lnscale; + double lm_0, lm_1, lm_max; + gsl_sf_result r_Uam1; + gsl_sf_result r_Ua; + int stat_0 = hyperg_U_small_a_bgt0(a0-1.0, b, x, &r_Uam1, &lm_0); + int stat_1 = hyperg_U_small_a_bgt0(a0, b, x, &r_Ua, &lm_1); + int stat_e; + gsl_sf_result lnm; + gsl_sf_result y; + double Uam1 = r_Uam1.val; + double Ua = r_Ua.val; + double Uap1; + double ap; + lm_max = GSL_MAX(lm_0, lm_1); + Uam1 *= exp(lm_0-lm_max); + Ua *= exp(lm_1-lm_max); + + for(ap=a0; apa0+0.1; ap -= 1.0) { + Uam1 = -((b-2.0*ap-x)*Ua + ap*(1.0+ap-b)*Uap1); + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count); + } + + stat_U0 = hyperg_U_small_a_bgt0(a0, b, x, &U0, &lm_0); + + lnscale = log(scale_factor); + lnm.val = lm_0 - scale_count * lnscale; + lnm.err = 2.0 * GSL_DBL_EPSILON * (fabs(lm_0) + fabs(scale_count * lnscale)); + y.val = GSL_SQRT_DBL_MIN*(U0.val/Ua); + y.err = GSL_SQRT_DBL_MIN*(U0.err/fabs(Ua)); + y.err += 2.0 * GSL_DBL_EPSILON * (fabs(a0-a) + CF1_count + 1.0) * fabs(y.val); + stat_e = gsl_sf_exp_mult_err_e10_e(lnm.val, lnm.err, y.val, y.err, result); + return GSL_ERROR_SELECT_3(stat_e, stat_U0, stat_CF1); + } + else { + /* Recurse backward to near the b=2a+x line, then + * forward from a near zero to get the normalization. + */ + int scale_count_for = 0; + int scale_count_bck = 0; + const double scale_factor = GSL_SQRT_DBL_MAX; + const double eps = a - floor(a); + const double a0 = ( eps == 0.0 ? 1.0 : eps ); + const double a1 = a0 + ceil(0.5*(b-x) - a0); + gsl_sf_result lnm; + gsl_sf_result y; + double lm_for; + double lnscale; + double Ua1_bck; + double Ua1_for; + int stat_for; + int stat_bck; + int stat_e; + int CF1_count; + + { + /* Recurse back to determine U(a1,b), sans normalization. + */ + double Uap1; + double Ua; + double Uam1; + double ap; + double ru; + double r; + int stat_CF1 = hyperg_U_CF1(a, b, 0, x, &ru, &CF1_count); + r = ru/a; + Ua = GSL_SQRT_DBL_MIN; + Uap1 = r * Ua; + for(ap=a; ap>a1+0.1; ap -= 1.0) { + Uam1 = -((b-2.0*ap-x)*Ua + ap*(1.0+ap-b)*Uap1); + Uap1 = Ua; + Ua = Uam1; + RESCALE_2(Ua,Uap1,scale_factor,scale_count_bck); + } + Ua1_bck = Ua; + stat_bck = stat_CF1; + } + { + /* Recurse forward to determine U(a1,b) with + * absolute normalization. + */ + gsl_sf_result r_Uam1; + gsl_sf_result r_Ua; + double lm_0, lm_1; + int stat_0 = hyperg_U_small_a_bgt0(a0-1.0, b, x, &r_Uam1, &lm_0); + int stat_1 = hyperg_U_small_a_bgt0(a0, b, x, &r_Ua, &lm_1); + double Uam1 = r_Uam1.val; + double Ua = r_Ua.val; + double Uap1; + double ap; + + lm_for = GSL_MAX(lm_0, lm_1); + Uam1 *= exp(lm_0 - lm_for); + Ua *= exp(lm_1 - lm_for); + + for(ap=a0; apval = factor * r1.val * r2.val; + result->err = fabs(factor) * (r1.err + r2.err); + result->e10 = 0; + + return GSL_ERROR_SELECT_2(stat_1, stat_2); +} + +static int +hyperg_U_int_origin (const int a, const int b, gsl_sf_result_e10 * result) +{ + return hyperg_U_origin (a, b, result); +} + +/* Calculate U(a,b,x) for x < 0 + + Abramowitz and Stegun formula 13.1.3 + + U(a,b,x) = (gamma(1-b)/gamma(1+a-b)) M(a,b,x) + - z^(1-b) (gamma(1-b)/gamma(a)) M(1+a-b,2-b,x) + + can be transformed into + + U(a,b,x) = poch(1+a-b,-a) M(a,b,x) + + z^(1-b) poch(a,-(1+a-b)) M(1+a-b,2-b,x) + + using the reflection formula 6.1.17 and the definition of + Poch(a,b)=gamma(a+b)/gamma(a). Our poch function already handles + the special cases of ratios of gamma functions with negative + integer argument. + + Note that U(a,b,x) is complex in general for x<0 due to the term + x^(1-b), but is real when + + 1) b is an integer + + 4) a is zero or a negative integer so x^(1-b)/gamma(a) is zero. + + For integer b U(a,b,x) is defined as the limit beta->b U(a,beta,x). + This makes the situation slightly more complicated. + +*/ + +static int +hyperg_U_negx (const double a, const double b, const double x, gsl_sf_result_e10 * result) +{ + gsl_sf_result r1, r2; + int stat_1, stat_2, status; + int a_int = (a == floor(a)); + int b_int = (b == floor(b)); + + double T1 = 0, T1_err = 0, T2 = 0, T2_err = 0; + + /* Compute the first term poch(1+a-b) M(a,b,x) */ + + if (b_int && b <= 0 && !(a_int && a <= 0 && a >= b)) + { + /* Need to handle first term as + + lim_{beta->b} poch(1+a-beta,-a) M(a,beta,x) + + due to pole in M(a,b,x) for b == 0 or -ve integer + + We skip this case when a is zero or a negative integer and + a>=b because the hypergeometric series terminates before any + singular terms + */ + + /* FIXME: TO BE IMPLEMENTED ! */ + result->val = GSL_NAN; result->err = GSL_NAN; + GSL_ERROR("limit case integer b <= 0 unimplemented", GSL_EUNIMPL); + } + else + { + stat_1 = gsl_sf_poch_e(1+a-b,-a,&r1); + status = stat_1; + + if (r1.val != 0.0) + { + gsl_sf_result Mr1; + int stat_Mr1 = gsl_sf_hyperg_1F1_e (a, b, x, &Mr1); + status = GSL_ERROR_SELECT_2(status, stat_Mr1); + + T1 = Mr1.val * r1.val; + T1_err = 2.0 * GSL_DBL_EPSILON * fabs(T1) + + fabs(Mr1.err * r1.val) + fabs(Mr1.val * r1.err) ; + } + } + + + /* Compute the second term z^(1-b) poch(a,-(1+a-b)) M(1+a-b,2-b,x) */ + + if (b_int && b >= 2 && !(a_int && a <= (b - 2))) + { + /* Need to handle second term as a limit due to pole in + M(1+a-b,2-b,x). + + We skip this case when a is integer and a <= b-2 because the + hypergeometric series terminates before any singular terms + */ + + /* FIXME: TO BE IMPLEMENTED ! */ + result->val = GSL_NAN; result->err = GSL_NAN; + GSL_ERROR("limit case integer b >= 2 unimplemented", GSL_EUNIMPL); + } + else + { + if (a_int && a <= 0 && (b >= 1)) + { + r2.val = 0; + r2.err = 0; + } + else + { + stat_2 = gsl_sf_poch_e(a,-(1+a-b),&r2); + status = GSL_ERROR_SELECT_2(status, stat_2); + } + + if (r2.val != 0.0) + { + gsl_sf_result Mr2; + int stat_Mr2 = gsl_sf_hyperg_1F1_e (1+a-b, 2-b, x, &Mr2); + T2 = Mr2.val * r2.val; + T2_err = 2.0 * GSL_DBL_EPSILON * fabs(T2) + + fabs(Mr2.err * r2.val) + fabs(Mr2.val * r2.err); + status = GSL_ERROR_SELECT_2(status, stat_Mr2); + + if (T2 != 0.0) + { + double x1mb = pow(x, 1-b); + T2 = x1mb * T2; + T2_err = fabs(x1mb) * T2_err; + } + } + } + + result->val = (T1 + T2); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val) + (T1_err + T2_err); + result->e10 = 0; + + return status; +} + +static int +hyperg_U_int_negx (const int a, const int b, const double x, gsl_sf_result_e10 * result) +{ + return hyperg_U_negx (a, b, x, result); +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int +gsl_sf_hyperg_U_int_e10_e(const int a, const int b, const double x, + gsl_sf_result_e10 * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0 && b >= 1) { + DOMAIN_ERROR_E10(result); + } + else if (x == 0.0) { + return hyperg_U_int_origin (a, b, result); + } else if (x < 0.0) { + return hyperg_U_int_negx (a, b, x, result); + } + else { + if(b >= 1) { + return hyperg_U_int_bge1(a, b, x, result); + } + else { + /* Use the reflection formula + * U(a,b,x) = x^(1-b) U(1+a-b,2-b,x) + */ + gsl_sf_result_e10 U; + double ln_x = log(x); + int ap = 1 + a - b; + int bp = 2 - b; + int stat_e; + int stat_U = hyperg_U_int_bge1(ap, bp, x, &U); + double ln_pre_val = (1.0-b)*ln_x; + double ln_pre_err = 2.0 * GSL_DBL_EPSILON * (fabs(b)+1.0) * fabs(ln_x); + ln_pre_err += 2.0 * GSL_DBL_EPSILON * fabs(1.0-b); /* error in log(x) */ + stat_e = gsl_sf_exp_mult_err_e10_e(ln_pre_val + U.e10*M_LN10, ln_pre_err, + U.val, U.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_U); + } + } +} + + +int +gsl_sf_hyperg_U_e10_e(const double a, const double b, const double x, + gsl_sf_result_e10 * result) +{ + const double rinta = floor(a + 0.5); + const double rintb = floor(b + 0.5); + const int a_integer = ( fabs(a - rinta) < INT_THRESHOLD ); + const int b_integer = ( fabs(b - rintb) < INT_THRESHOLD ); + + /* CHECK_POINTER(result) */ + + if(x == 0.0 && b >= 1) { + DOMAIN_ERROR_E10(result); + } + else if(a == 0.0) { + result->val = 1.0; + result->err = 0.0; + result->e10 = 0; + return GSL_SUCCESS; + } else if (x == 0.0) { + return hyperg_U_origin (a, b, result); + } else if (x < 0.0) { + return hyperg_U_negx (a, b, x, result); + } + else if(a_integer && b_integer) { + return gsl_sf_hyperg_U_int_e10_e(rinta, rintb, x, result); + } + else { + if(b >= 1.0) { + /* Use b >= 1 function. + */ + return hyperg_U_bge1(a, b, x, result); + } + else { + /* Use the reflection formula + * U(a,b,x) = x^(1-b) U(1+a-b,2-b,x) + */ + const double lnx = log(x); + const double ln_pre_val = (1.0-b)*lnx; + const double ln_pre_err = fabs(lnx) * 2.0 * GSL_DBL_EPSILON * (1.0 + fabs(b)); + const double ap = 1.0 + a - b; + const double bp = 2.0 - b; + gsl_sf_result_e10 U; + int stat_U = hyperg_U_bge1(ap, bp, x, &U); + int stat_e = gsl_sf_exp_mult_err_e10_e(ln_pre_val + U.e10*M_LN10, ln_pre_err, + U.val, U.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_U); + } + } +} + + +int +gsl_sf_hyperg_U_int_e(const int a, const int b, const double x, gsl_sf_result * result) +{ + gsl_sf_result_e10 re; + int stat_U = gsl_sf_hyperg_U_int_e10_e(a, b, x, &re); + int stat_c = gsl_sf_result_smash_e(&re, result); + return GSL_ERROR_SELECT_2(stat_c, stat_U); +} + + +int +gsl_sf_hyperg_U_e(const double a, const double b, const double x, gsl_sf_result * result) +{ + gsl_sf_result_e10 re; + int stat_U = gsl_sf_hyperg_U_e10_e(a, b, x, &re); + int stat_c = gsl_sf_result_smash_e(&re, result); + return GSL_ERROR_SELECT_2(stat_c, stat_U); +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_hyperg_U_int(const int a, const int b, const double x) +{ + EVAL_RESULT(gsl_sf_hyperg_U_int_e(a, b, x, &result)); +} + +double gsl_sf_hyperg_U(const double a, const double b, const double x) +{ + EVAL_RESULT(gsl_sf_hyperg_U_e(a, b, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/laguerre.c b/software/gsl-1.15/specfunc/laguerre.c new file mode 100644 index 000000000..8fb08a783 --- /dev/null +++ b/software/gsl-1.15/specfunc/laguerre.c @@ -0,0 +1,335 @@ +/* specfunc/laguerre.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* based on the large 2b-4a asymptotic for 1F1 + * [Abramowitz+Stegun, 13.5.21] + * L^a_n(x) = (a+1)_n / n! 1F1(-n,a+1,x) + * + * The second term (ser_term2) is from Slater,"The Confluent + * Hypergeometric Function" p.73. I think there may be an error in + * the first term of the expression given there, comparing with AS + * 13.5.21 (cf sin(a\pi+\Theta) vs sin(a\pi) + sin(\Theta)) - but the + * second term appears correct. + * + */ +static +int +laguerre_large_n(const int n, const double alpha, const double x, + gsl_sf_result * result) +{ + const double a = -n; + const double b = alpha + 1.0; + const double eta = 2.0*b - 4.0*a; + const double cos2th = x/eta; + const double sin2th = 1.0 - cos2th; + const double eps = asin(sqrt(cos2th)); /* theta = pi/2 - eps */ + const double pre_h = 0.25*M_PI*M_PI*eta*eta*cos2th*sin2th; + gsl_sf_result lg_b; + gsl_sf_result lnfact; + int stat_lg = gsl_sf_lngamma_e(b+n, &lg_b); + int stat_lf = gsl_sf_lnfact_e(n, &lnfact); + double pre_term1 = 0.5*(1.0-b)*log(0.25*x*eta); + double pre_term2 = 0.25*log(pre_h); + double lnpre_val = lg_b.val - lnfact.val + 0.5*x + pre_term1 - pre_term2; + double lnpre_err = lg_b.err + lnfact.err + GSL_DBL_EPSILON * (fabs(pre_term1)+fabs(pre_term2)); + + double phi1 = 0.25*eta*(2*eps + sin(2.0*eps)); + double ser_term1 = -sin(phi1); + + double A1 = (1.0/12.0)*(5.0/(4.0*sin2th)+(3.0*b*b-6.0*b+2.0)*sin2th - 1.0); + double ser_term2 = -A1 * cos(phi1)/(0.25*eta*sin(2.0*eps)); + + double ser_val = ser_term1 + ser_term2; + double ser_err = ser_term2*ser_term2 + GSL_DBL_EPSILON * (fabs(ser_term1) + fabs(ser_term2)); + int stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, ser_val, ser_err, result); + result->err += 2.0 * GSL_SQRT_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_e, stat_lf, stat_lg); +} + + +/* Evaluate polynomial based on confluent hypergeometric representation. + * + * L^a_n(x) = (a+1)_n / n! 1F1(-n,a+1,x) + * + * assumes n > 0 and a != negative integer greater than -n + */ +static +int +laguerre_n_cp(const int n, const double a, const double x, gsl_sf_result * result) +{ + gsl_sf_result lnfact; + gsl_sf_result lg1; + gsl_sf_result lg2; + double s1, s2; + int stat_f = gsl_sf_lnfact_e(n, &lnfact); + int stat_g1 = gsl_sf_lngamma_sgn_e(a+1.0+n, &lg1, &s1); + int stat_g2 = gsl_sf_lngamma_sgn_e(a+1.0, &lg2, &s2); + double poly_1F1_val = 1.0; + double poly_1F1_err = 0.0; + int stat_e; + int k; + + double lnpre_val = (lg1.val - lg2.val) - lnfact.val; + double lnpre_err = lg1.err + lg2.err + lnfact.err + 2.0 * GSL_DBL_EPSILON * fabs(lnpre_val); + + for(k=n-1; k>=0; k--) { + double t = (-n+k)/(a+1.0+k) * (x/(k+1)); + double r = t + 1.0/poly_1F1_val; + if(r > 0.9*GSL_DBL_MAX/poly_1F1_val) { + /* internal error only, don't call the error handler */ + INTERNAL_OVERFLOW_ERROR(result); + } + else { + /* Collect the Horner terms. */ + poly_1F1_val = 1.0 + t * poly_1F1_val; + poly_1F1_err += GSL_DBL_EPSILON + fabs(t) * poly_1F1_err; + } + } + + stat_e = gsl_sf_exp_mult_err_e(lnpre_val, lnpre_err, + poly_1F1_val, poly_1F1_err, + result); + + return GSL_ERROR_SELECT_4(stat_e, stat_f, stat_g1, stat_g2); +} + + +/* Evaluate the polynomial based on the confluent hypergeometric + * function in a safe way, with no restriction on the arguments. + * + * assumes x != 0 + */ +static +int +laguerre_n_poly_safe(const int n, const double a, const double x, gsl_sf_result * result) +{ + const double b = a + 1.0; + const double mx = -x; + const double tc_sgn = (x < 0.0 ? 1.0 : (GSL_IS_ODD(n) ? -1.0 : 1.0)); + gsl_sf_result tc; + int stat_tc = gsl_sf_taylorcoeff_e(n, fabs(x), &tc); + + if(stat_tc == GSL_SUCCESS) { + double term = tc.val * tc_sgn; + double sum_val = term; + double sum_err = tc.err; + int k; + for(k=n-1; k>=0; k--) { + term *= ((b+k)/(n-k))*(k+1.0)/mx; + sum_val += term; + sum_err += 4.0 * GSL_DBL_EPSILON * fabs(term); + } + result->val = sum_val; + result->err = sum_err + 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(stat_tc == GSL_EOVRFLW) { + result->val = 0.0; /* FIXME: should be Inf */ + result->err = 0.0; + return stat_tc; + } + else { + result->val = 0.0; + result->err = 0.0; + return stat_tc; + } +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_laguerre_1_e(const double a, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + result->val = 1.0 + a - x; + result->err = 2.0 * GSL_DBL_EPSILON * (1.0 + fabs(a) + fabs(x)); + return GSL_SUCCESS; + } +} + +int +gsl_sf_laguerre_2_e(const double a, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(a == -2.0) { + result->val = 0.5*x*x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double c0 = 0.5 * (2.0+a)*(1.0+a); + double c1 = -(2.0+a); + double c2 = -0.5/(2.0+a); + result->val = c0 + c1*x*(1.0 + c2*x); + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(c0) + 2.0 * fabs(c1*x) * (1.0 + 2.0 * fabs(c2*x))); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +int +gsl_sf_laguerre_3_e(const double a, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(a == -2.0) { + double x2_6 = x*x/6.0; + result->val = x2_6 * (3.0 - x); + result->err = x2_6 * (3.0 + fabs(x)) * 2.0 * GSL_DBL_EPSILON; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(a == -3.0) { + result->val = -x*x/6.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double c0 = (3.0+a)*(2.0+a)*(1.0+a) / 6.0; + double c1 = -c0 * 3.0 / (1.0+a); + double c2 = -1.0/(2.0+a); + double c3 = -1.0/(3.0*(3.0+a)); + result->val = c0 + c1*x*(1.0 + c2*x*(1.0 + c3*x)); + result->err = 1.0 + 2.0 * fabs(c3*x); + result->err = 1.0 + 2.0 * fabs(c2*x) * result->err; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(c0) + 2.0 * fabs(c1*x) * result->err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_laguerre_n_e(const int n, const double a, const double x, + gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n < 0) { + DOMAIN_ERROR(result); + } + else if(n == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n == 1) { + result->val = 1.0 + a - x; + result->err = 2.0 * GSL_DBL_EPSILON * (1.0 + fabs(a) + fabs(x)); + return GSL_SUCCESS; + } + else if(x == 0.0) { + double product = a + 1.0; + int k; + for(k=2; k<=n; k++) { + product *= (a + k)/k; + } + result->val = product; + result->err = 2.0 * (n + 1.0) * GSL_DBL_EPSILON * fabs(product) + GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(x < 0.0 && a > -1.0) { + /* In this case all the terms in the polynomial + * are of the same sign. Note that this also + * catches overflows correctly. + */ + return laguerre_n_cp(n, a, x, result); + } + else if(n < 5 || (x > 0.0 && a < -n-1)) { + /* Either the polynomial will not lose too much accuracy + * or all the terms are negative. In any case, + * the error estimate here is good. We try both + * explicit summation methods, as they have different + * characteristics. One may underflow/overflow while the + * other does not. + */ + if(laguerre_n_cp(n, a, x, result) == GSL_SUCCESS) + return GSL_SUCCESS; + else + return laguerre_n_poly_safe(n, a, x, result); + } + else if(n > 1.0e+07 && x > 0.0 && a > -1.0 && x < 2.0*(a+1.0)+4.0*n) { + return laguerre_large_n(n, a, x, result); + } + else if(a >= 0.0 || (x > 0.0 && a < -n-1)) { + gsl_sf_result lg2; + int stat_lg2 = gsl_sf_laguerre_2_e(a, x, &lg2); + double Lkm1 = 1.0 + a - x; + double Lk = lg2.val; + double Lkp1; + int k; + + for(k=2; kval = Lk; + result->err = (fabs(lg2.err/lg2.val) + GSL_DBL_EPSILON) * n * fabs(Lk); + return stat_lg2; + } + else { + /* Despair... or magic? */ + return laguerre_n_poly_safe(n, a, x, result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_laguerre_1(double a, double x) +{ + EVAL_RESULT(gsl_sf_laguerre_1_e(a, x, &result)); +} + +double gsl_sf_laguerre_2(double a, double x) +{ + EVAL_RESULT(gsl_sf_laguerre_2_e(a, x, &result)); +} + +double gsl_sf_laguerre_3(double a, double x) +{ + EVAL_RESULT(gsl_sf_laguerre_3_e(a, x, &result)); +} + +double gsl_sf_laguerre_n(int n, double a, double x) +{ + EVAL_RESULT(gsl_sf_laguerre_n_e(n, a, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/lambert.c b/software/gsl-1.15/specfunc/lambert.c new file mode 100644 index 000000000..606f8492e --- /dev/null +++ b/software/gsl-1.15/specfunc/lambert.c @@ -0,0 +1,231 @@ +/* specfunc/lambert.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +/* Started with code donated by K. Briggs; added + * error estimates, GSL foo, and minor tweaks. + * Some Lambert-ology from + * [Corless, Gonnet, Hare, and Jeffrey, "On Lambert's W Function".] + */ + + +/* Halley iteration (eqn. 5.12, Corless et al) */ +static int +halley_iteration( + double x, + double w_initial, + unsigned int max_iters, + gsl_sf_result * result + ) +{ + double w = w_initial; + unsigned int i; + + for(i=0; i 0) { + t = (t/p)/e; /* Newton iteration */ + } else { + t /= e*p - 0.5*(p + 1.0)*t/p; /* Halley iteration */ + }; + + w -= t; + + tol = 10 * GSL_DBL_EPSILON * GSL_MAX_DBL(fabs(w), 1.0/(fabs(p)*e)); + + if(fabs(t) < tol) + { + result->val = w; + result->err = 2.0*tol; + return GSL_SUCCESS; + } + } + + /* should never get here */ + result->val = w; + result->err = fabs(w); + return GSL_EMAXITER; +} + + +/* series which appears for q near zero; + * only the argument is different for the different branches + */ +static double +series_eval(double r) +{ + static const double c[12] = { + -1.0, + 2.331643981597124203363536062168, + -1.812187885639363490240191647568, + 1.936631114492359755363277457668, + -2.353551201881614516821543561516, + 3.066858901050631912893148922704, + -4.175335600258177138854984177460, + 5.858023729874774148815053846119, + -8.401032217523977370984161688514, + 12.250753501314460424, + -18.100697012472442755, + 27.029044799010561650 + }; + const double t_8 = c[8] + r*(c[9] + r*(c[10] + r*c[11])); + const double t_5 = c[5] + r*(c[6] + r*(c[7] + r*t_8)); + const double t_1 = c[1] + r*(c[2] + r*(c[3] + r*(c[4] + r*t_5))); + return c[0] + r*t_1; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_lambert_W0_e(double x, gsl_sf_result * result) +{ + const double one_over_E = 1.0/M_E; + const double q = x + one_over_E; + + if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(q < 0.0) { + /* Strictly speaking this is an error. But because of the + * arithmetic operation connecting x and q, I am a little + * lenient in case of some epsilon overshoot. The following + * answer is quite accurate in that case. Anyway, we have + * to return GSL_EDOM. + */ + result->val = -1.0; + result->err = sqrt(-q); + return GSL_EDOM; + } + else if(q == 0.0) { + result->val = -1.0; + result->err = GSL_DBL_EPSILON; /* cannot error is zero, maybe q == 0 by "accident" */ + return GSL_SUCCESS; + } + else if(q < 1.0e-03) { + /* series near -1/E in sqrt(q) */ + const double r = sqrt(q); + result->val = series_eval(r); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + static const unsigned int MAX_ITERS = 10; + double w; + + if (x < 1.0) { + /* obtain initial approximation from series near x=0; + * no need for extra care, since the Halley iteration + * converges nicely on this branch + */ + const double p = sqrt(2.0 * M_E * q); + w = -1.0 + p*(1.0 + p*(-1.0/3.0 + p*11.0/72.0)); + } + else { + /* obtain initial approximation from rough asymptotic */ + w = log(x); + if(x > 3.0) w -= log(w); + } + + return halley_iteration(x, w, MAX_ITERS, result); + } +} + + +int +gsl_sf_lambert_Wm1_e(double x, gsl_sf_result * result) +{ + if(x > 0.0) { + return gsl_sf_lambert_W0_e(x, result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + static const unsigned int MAX_ITERS = 32; + const double one_over_E = 1.0/M_E; + const double q = x + one_over_E; + double w; + + if (q < 0.0) { + /* As in the W0 branch above, return some reasonable answer anyway. */ + result->val = -1.0; + result->err = sqrt(-q); + return GSL_EDOM; + } + + if(x < -1.0e-6) { + /* Obtain initial approximation from series about q = 0, + * as long as we're not very close to x = 0. + * Use full series and try to bail out if q is too small, + * since the Halley iteration has bad convergence properties + * in finite arithmetic for q very small, because the + * increment alternates and p is near zero. + */ + const double r = -sqrt(q); + w = series_eval(r); + if(q < 3.0e-3) { + /* this approximation is good enough */ + result->val = w; + result->err = 5.0 * GSL_DBL_EPSILON * fabs(w); + return GSL_SUCCESS; + } + } + else { + /* Obtain initial approximation from asymptotic near zero. */ + const double L_1 = log(-x); + const double L_2 = log(-L_1); + w = L_1 - L_2 + L_2/L_1; + } + + return halley_iteration(x, w, MAX_ITERS, result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_lambert_W0(double x) +{ + EVAL_RESULT(gsl_sf_lambert_W0_e(x, &result)); +} + +double gsl_sf_lambert_Wm1(double x) +{ + EVAL_RESULT(gsl_sf_lambert_Wm1_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/legendre.h b/software/gsl-1.15/specfunc/legendre.h new file mode 100644 index 000000000..5d34560c1 --- /dev/null +++ b/software/gsl-1.15/specfunc/legendre.h @@ -0,0 +1,72 @@ +/* specfunc/legendre.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +/* Declare private but non-local support functions + * used in various Legendre function evaluations. + */ + +#include + + +/* Large negative mu asymptotic + * P^{-mu}_{-1/2 + I tau}, mu -> Inf + * |x| < 1 + */ +int +gsl_sf_conicalP_xlt1_large_neg_mu_e(double mu, double tau, double x, + gsl_sf_result * result, double * ln_multiplier); + + +/* Large tau uniform asymptotics + * P^{-mu}_{-1/2 + I tau}, tau -> Inf + * 1 < x + */ +int +gsl_sf_conicalP_xgt1_neg_mu_largetau_e(const double mu, const double tau, + const double x, double acosh_x, + gsl_sf_result * result, double * ln_multiplier); + + +/* Large tau uniform asymptotics + * P^{-mu}_{-1/2 + I tau}, tau -> Inf + * -1 < x < 1 + */ +int +gsl_sf_conicalP_xlt1_neg_mu_largetau_e(const double mu, const double tau, + const double x, const double acos_x, + gsl_sf_result * result, double * ln_multiplier); + + +/* P^{mu}_{-1/2 + I tau} + * x->Inf + * + * * This is effective to precision EPS for + * + * (mu^2 + tau^2)/((1 + tau^2)^(1/2) x^2) < EPS^{1/3} + * + * since it goes only to a fixed order, based on the + * representation in terms of hypegeometric functions + * of argument 1/x^2. + * [Zhurina+Karmazina, (3.8)] + */ +int +gsl_sf_conicalP_large_x_e(const double mu, const double tau, const double x, + gsl_sf_result * result, double * ln_multiplier); diff --git a/software/gsl-1.15/specfunc/legendre_H3d.c b/software/gsl-1.15/specfunc/legendre_H3d.c new file mode 100644 index 000000000..8b58423dd --- /dev/null +++ b/software/gsl-1.15/specfunc/legendre_H3d.c @@ -0,0 +1,568 @@ +/* specfunc/legendre_H3d.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "legendre.h" + +/* See [Abbott+Schaefer, Ap.J. 308, 546 (1986)] for + * enough details to follow what is happening here. + */ + + +/* Logarithm of normalization factor, Log[N(ell,lambda)]. + * N(ell,lambda) = Product[ lambda^2 + n^2, {n,0,ell} ] + * = |Gamma(ell + 1 + I lambda)|^2 lambda sinh(Pi lambda) / Pi + * Assumes ell >= 0. + */ +static +int +legendre_H3d_lnnorm(const int ell, const double lambda, double * result) +{ + double abs_lam = fabs(lambda); + + if(abs_lam == 0.0) { + *result = 0.0; + GSL_ERROR ("error", GSL_EDOM); + } + else if(lambda > (ell + 1.0)/GSL_ROOT3_DBL_EPSILON) { + /* There is a cancellation between the sinh(Pi lambda) + * term and the log(gamma(ell + 1 + i lambda) in the + * result below, so we show some care and save some digits. + * Note that the above guarantees that lambda is large, + * since ell >= 0. We use Stirling and a simple expansion + * of sinh. + */ + double rat = (ell+1.0)/lambda; + double ln_lam2ell2 = 2.0*log(lambda) + log(1.0 + rat*rat); + double lg_corrected = -2.0*(ell+1.0) + M_LNPI + (ell+0.5)*ln_lam2ell2 + 1.0/(288.0*lambda*lambda); + double angle_terms = lambda * 2.0 * rat * (1.0 - rat*rat/3.0); + *result = log(abs_lam) + lg_corrected + angle_terms - M_LNPI; + return GSL_SUCCESS; + } + else { + gsl_sf_result lg_r; + gsl_sf_result lg_theta; + gsl_sf_result ln_sinh; + gsl_sf_lngamma_complex_e(ell+1.0, lambda, &lg_r, &lg_theta); + gsl_sf_lnsinh_e(M_PI * abs_lam, &ln_sinh); + *result = log(abs_lam) + ln_sinh.val + 2.0*lg_r.val - M_LNPI; + return GSL_SUCCESS; + } +} + + +/* Calculate series for small eta*lambda. + * Assumes eta > 0, lambda != 0. + * + * This is just the defining hypergeometric for the Legendre function. + * + * P^{mu}_{-1/2 + I lam}(z) = 1/Gamma(l+3/2) ((z+1)/(z-1)^(mu/2) + * 2F1(1/2 - I lam, 1/2 + I lam; l+3/2; (1-z)/2) + * We use + * z = cosh(eta) + * (z-1)/2 = sinh^2(eta/2) + * + * And recall + * H3d = sqrt(Pi Norm /(2 lam^2 sinh(eta))) P^{-l-1/2}_{-1/2 + I lam}(cosh(eta)) + */ +static +int +legendre_H3d_series(const int ell, const double lambda, const double eta, + gsl_sf_result * result) +{ + const int nmax = 5000; + const double shheta = sinh(0.5*eta); + const double ln_zp1 = M_LN2 + log(1.0 + shheta*shheta); + const double ln_zm1 = M_LN2 + 2.0*log(shheta); + const double zeta = -shheta*shheta; + gsl_sf_result lg_lp32; + double term = 1.0; + double sum = 1.0; + double sum_err = 0.0; + gsl_sf_result lnsheta; + double lnN; + double lnpre_val, lnpre_err, lnprepow; + int stat_e; + int n; + + gsl_sf_lngamma_e(ell + 3.0/2.0, &lg_lp32); + gsl_sf_lnsinh_e(eta, &lnsheta); + legendre_H3d_lnnorm(ell, lambda, &lnN); + lnprepow = 0.5*(ell + 0.5) * (ln_zm1 - ln_zp1); + lnpre_val = lnprepow + 0.5*(lnN + M_LNPI - M_LN2 - lnsheta.val) - lg_lp32.val - log(fabs(lambda)); + lnpre_err = lnsheta.err + lg_lp32.err + GSL_DBL_EPSILON * fabs(lnpre_val); + lnpre_err += 2.0*GSL_DBL_EPSILON * (fabs(lnN) + M_LNPI + M_LN2); + lnpre_err += 2.0*GSL_DBL_EPSILON * (0.5*(ell + 0.5) * (fabs(ln_zm1) + fabs(ln_zp1))); + for(n=1; n RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 4.0*GSL_DBL_EPSILON) break; + } + + result->val = fn; + result->err = 2.0 * GSL_DBL_EPSILON * (sqrt(n)+1.0) * fabs(fn); + + if(n >= maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} +#endif /* 0 */ + + +/* Evaluate legendre_H3d(ell+1)/legendre_H3d(ell) + * by continued fraction. Use the Gautschi (Euler) + * equivalent series. + */ + /* FIXME: Maybe we have to worry about this. The a_k are + * not positive and there can be a blow-up. It happened + * for J_nu once or twice. Then we should probably use + * the method above. + */ +static +int +legendre_H3d_CF1_ser(const int ell, const double lambda, const double coth_eta, + gsl_sf_result * result) +{ + const double pre = hypot(lambda, ell+1.0)/((2.0*ell+3)*coth_eta); + const int maxk = 20000; + double tk = 1.0; + double sum = 1.0; + double rhok = 0.0; + double sum_err = 0.0; + int k; + + for(k=1; kval = pre * sum; + result->err = fabs(pre * tk); + result->err += fabs(pre * sum_err); + result->err += 4.0 * GSL_DBL_EPSILON * fabs(result->val); + + if(k >= maxk) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_legendre_H3d_0_e(const double lambda, const double eta, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(eta < 0.0) { + DOMAIN_ERROR(result); + } + else if(eta == 0.0 || lambda == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + const double lam_eta = lambda * eta; + gsl_sf_result s; + gsl_sf_sin_err_e(lam_eta, 2.0*GSL_DBL_EPSILON * fabs(lam_eta), &s); + if(eta > -0.5*GSL_LOG_DBL_EPSILON) { + double f = 2.0 / lambda * exp(-eta); + result->val = f * s.val; + result->err = fabs(f * s.val) * (fabs(eta) + 1.0) * GSL_DBL_EPSILON; + result->err += fabs(f) * s.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + else { + double f = 1.0/(lambda*sinh(eta)); + result->val = f * s.val; + result->err = fabs(f * s.val) * (fabs(eta) + 1.0) * GSL_DBL_EPSILON; + result->err += fabs(f) * s.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + return GSL_SUCCESS; + } +} + + +int +gsl_sf_legendre_H3d_1_e(const double lambda, const double eta, gsl_sf_result * result) +{ + const double xi = fabs(eta*lambda); + const double lsq = lambda*lambda; + const double lsqp1 = lsq + 1.0; + + /* CHECK_POINTER(result) */ + + if(eta < 0.0) { + DOMAIN_ERROR(result); + } + else if(eta == 0.0 || lambda == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(xi < GSL_ROOT5_DBL_EPSILON && eta < GSL_ROOT5_DBL_EPSILON) { + double etasq = eta*eta; + double xisq = xi*xi; + double term1 = (etasq + xisq)/3.0; + double term2 = -(2.0*etasq*etasq + 5.0*etasq*xisq + 3.0*xisq*xisq)/90.0; + double sinh_term = 1.0 - eta*eta/6.0 * (1.0 - 7.0/60.0*eta*eta); + double pre = sinh_term/sqrt(lsqp1) / eta; + result->val = pre * (term1 + term2); + result->err = pre * GSL_DBL_EPSILON * (fabs(term1) + fabs(term2)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double sin_term; /* Sin(xi)/xi */ + double cos_term; /* Cos(xi) */ + double coth_term; /* eta/Tanh(eta) */ + double sinh_term; /* eta/Sinh(eta) */ + double sin_term_err; + double cos_term_err; + double t1; + double pre_val; + double pre_err; + double term1; + double term2; + if(xi < GSL_ROOT5_DBL_EPSILON) { + sin_term = 1.0 - xi*xi/6.0 * (1.0 - xi*xi/20.0); + cos_term = 1.0 - 0.5*xi*xi * (1.0 - xi*xi/12.0); + sin_term_err = GSL_DBL_EPSILON; + cos_term_err = GSL_DBL_EPSILON; + } + else { + gsl_sf_result sin_xi_result; + gsl_sf_result cos_xi_result; + gsl_sf_sin_e(xi, &sin_xi_result); + gsl_sf_cos_e(xi, &cos_xi_result); + sin_term = sin_xi_result.val/xi; + cos_term = cos_xi_result.val; + sin_term_err = sin_xi_result.err/fabs(xi); + cos_term_err = cos_xi_result.err; + } + if(eta < GSL_ROOT5_DBL_EPSILON) { + coth_term = 1.0 + eta*eta/3.0 * (1.0 - eta*eta/15.0); + sinh_term = 1.0 - eta*eta/6.0 * (1.0 - 7.0/60.0*eta*eta); + } + else { + coth_term = eta/tanh(eta); + sinh_term = eta/sinh(eta); + } + t1 = sqrt(lsqp1) * eta; + pre_val = sinh_term/t1; + pre_err = 2.0 * GSL_DBL_EPSILON * fabs(pre_val); + term1 = sin_term*coth_term; + term2 = cos_term; + result->val = pre_val * (term1 - term2); + result->err = pre_err * fabs(term1 - term2); + result->err += pre_val * (sin_term_err * coth_term + cos_term_err); + result->err += pre_val * fabs(term1-term2) * (fabs(eta) + 1.0) * GSL_DBL_EPSILON; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_legendre_H3d_e(const int ell, const double lambda, const double eta, + gsl_sf_result * result) +{ + const double abs_lam = fabs(lambda); + const double lsq = abs_lam*abs_lam; + const double xi = abs_lam * eta; + const double cosh_eta = cosh(eta); + + /* CHECK_POINTER(result) */ + + if(eta < 0.0) { + DOMAIN_ERROR(result); + } + else if(eta > GSL_LOG_DBL_MAX) { + /* cosh(eta) is too big. */ + OVERFLOW_ERROR(result); + } + else if(ell == 0) { + return gsl_sf_legendre_H3d_0_e(lambda, eta, result); + } + else if(ell == 1) { + return gsl_sf_legendre_H3d_1_e(lambda, eta, result); + } + else if(eta == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(xi < 1.0) { + return legendre_H3d_series(ell, lambda, eta, result); + } + else if((ell*ell+lsq)/sqrt(1.0+lsq)/(cosh_eta*cosh_eta) < 5.0*GSL_ROOT3_DBL_EPSILON) { + /* Large argument. + */ + gsl_sf_result P; + double lm; + int stat_P = gsl_sf_conicalP_large_x_e(-ell-0.5, lambda, cosh_eta, &P, &lm); + if(P.val == 0.0) { + result->val = 0.0; + result->err = 0.0; + return stat_P; + } + else { + double lnN; + gsl_sf_result lnsh; + double ln_abslam; + double lnpre_val, lnpre_err; + int stat_e; + gsl_sf_lnsinh_e(eta, &lnsh); + legendre_H3d_lnnorm(ell, lambda, &lnN); + ln_abslam = log(abs_lam); + lnpre_val = 0.5*(M_LNPI + lnN - M_LN2 - lnsh.val) - ln_abslam; + lnpre_err = lnsh.err; + lnpre_err += 2.0 * GSL_DBL_EPSILON * (0.5*(M_LNPI + M_LN2 + fabs(lnN)) + fabs(ln_abslam)); + lnpre_err += 2.0 * GSL_DBL_EPSILON * fabs(lnpre_val); + stat_e = gsl_sf_exp_mult_err_e(lnpre_val + lm, lnpre_err, P.val, P.err, result); + return GSL_ERROR_SELECT_2(stat_e, stat_P); + } + } + else if(abs_lam > 1000.0*ell*ell) { + /* Large degree. + */ + gsl_sf_result P; + double lm; + int stat_P = gsl_sf_conicalP_xgt1_neg_mu_largetau_e(ell+0.5, + lambda, + cosh_eta, eta, + &P, &lm); + if(P.val == 0.0) { + result->val = 0.0; + result->err = 0.0; + return stat_P; + } + else { + double lnN; + gsl_sf_result lnsh; + double ln_abslam; + double lnpre_val, lnpre_err; + int stat_e; + gsl_sf_lnsinh_e(eta, &lnsh); + legendre_H3d_lnnorm(ell, lambda, &lnN); + ln_abslam = log(abs_lam); + lnpre_val = 0.5*(M_LNPI + lnN - M_LN2 - lnsh.val) - ln_abslam; + lnpre_err = lnsh.err; + lnpre_err += GSL_DBL_EPSILON * (0.5*(M_LNPI + M_LN2 + fabs(lnN)) + fabs(ln_abslam)); + lnpre_err += 2.0 * GSL_DBL_EPSILON * fabs(lnpre_val); + stat_e = gsl_sf_exp_mult_err_e(lnpre_val + lm, lnpre_err, P.val, P.err, result); + return GSL_ERROR_SELECT_2(stat_e, stat_P); + } + } + else { + /* Backward recurrence. + */ + const double coth_eta = 1.0/tanh(eta); + const double coth_err_mult = fabs(eta) + 1.0; + gsl_sf_result rH; + int stat_CF1 = legendre_H3d_CF1_ser(ell, lambda, coth_eta, &rH); + double Hlm1; + double Hl = GSL_SQRT_DBL_MIN; + double Hlp1 = rH.val * Hl; + int lp; + for(lp=ell; lp>0; lp--) { + double root_term_0 = hypot(lambda,lp); + double root_term_1 = hypot(lambda,lp+1.0); + Hlm1 = ((2.0*lp + 1.0)*coth_eta*Hl - root_term_1 * Hlp1)/root_term_0; + Hlp1 = Hl; + Hl = Hlm1; + } + + if(fabs(Hl) > fabs(Hlp1)) { + gsl_sf_result H0; + int stat_H0 = gsl_sf_legendre_H3d_0_e(lambda, eta, &H0); + result->val = GSL_SQRT_DBL_MIN/Hl * H0.val; + result->err = GSL_SQRT_DBL_MIN/fabs(Hl) * H0.err; + result->err += fabs(rH.err/rH.val) * (ell+1.0) * coth_err_mult * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_H0, stat_CF1); + } + else { + gsl_sf_result H1; + int stat_H1 = gsl_sf_legendre_H3d_1_e(lambda, eta, &H1); + result->val = GSL_SQRT_DBL_MIN/Hlp1 * H1.val; + result->err = GSL_SQRT_DBL_MIN/fabs(Hlp1) * H1.err; + result->err += fabs(rH.err/rH.val) * (ell+1.0) * coth_err_mult * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_H1, stat_CF1); + } + } +} + + +int +gsl_sf_legendre_H3d_array(const int lmax, const double lambda, const double eta, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(eta < 0.0 || lmax < 0) { + int ell; + for(ell=0; ell<=lmax; ell++) result_array[ell] = 0.0; + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(eta > GSL_LOG_DBL_MAX) { + /* cosh(eta) is too big. */ + int ell; + for(ell=0; ell<=lmax; ell++) result_array[ell] = 0.0; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else if(lmax == 0) { + gsl_sf_result H0; + int stat = gsl_sf_legendre_H3d_e(0, lambda, eta, &H0); + result_array[0] = H0.val; + return stat; + } + else { + /* Not the most efficient method. But what the hell... it's simple. + */ + gsl_sf_result r_Hlp1; + gsl_sf_result r_Hl; + int stat_lmax = gsl_sf_legendre_H3d_e(lmax, lambda, eta, &r_Hlp1); + int stat_lmaxm1 = gsl_sf_legendre_H3d_e(lmax-1, lambda, eta, &r_Hl); + int stat_max = GSL_ERROR_SELECT_2(stat_lmax, stat_lmaxm1); + + const double coth_eta = 1.0/tanh(eta); + int stat_recursion = GSL_SUCCESS; + double Hlp1 = r_Hlp1.val; + double Hl = r_Hl.val; + double Hlm1; + int ell; + + result_array[lmax] = Hlp1; + result_array[lmax-1] = Hl; + + for(ell=lmax-1; ell>0; ell--) { + double root_term_0 = hypot(lambda,ell); + double root_term_1 = hypot(lambda,ell+1.0); + Hlm1 = ((2.0*ell + 1.0)*coth_eta*Hl - root_term_1 * Hlp1)/root_term_0; + result_array[ell-1] = Hlm1; + if(!(Hlm1 < GSL_DBL_MAX)) stat_recursion = GSL_EOVRFLW; + Hlp1 = Hl; + Hl = Hlm1; + } + + return GSL_ERROR_SELECT_2(stat_recursion, stat_max); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_legendre_H3d_0(const double lambda, const double eta) +{ + EVAL_RESULT(gsl_sf_legendre_H3d_0_e(lambda, eta, &result)); +} + +double gsl_sf_legendre_H3d_1(const double lambda, const double eta) +{ + EVAL_RESULT(gsl_sf_legendre_H3d_1_e(lambda, eta, &result)); +} + +double gsl_sf_legendre_H3d(const int l, const double lambda, const double eta) +{ + EVAL_RESULT(gsl_sf_legendre_H3d_e(l, lambda, eta, &result)); +} diff --git a/software/gsl-1.15/specfunc/legendre_Qn.c b/software/gsl-1.15/specfunc/legendre_Qn.c new file mode 100644 index 000000000..54edcbcf9 --- /dev/null +++ b/software/gsl-1.15/specfunc/legendre_Qn.c @@ -0,0 +1,366 @@ +/* specfunc/legendre_Qn.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +/* Evaluate f_{ell+1}/f_ell + * f_ell := Q^{b}_{a+ell}(x) + * x > 1 + */ +static +int +legendreQ_CF1_xgt1(int ell, double a, double b, double x, double * result) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 5000; + int n = 1; + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = ell + 1.0 + a + b; + double b1 = (2.0*(ell+1.0+a) + 1.0) * x; + double An = b1*Anm1 + a1*Anm2; + double Bn = b1*Bnm1 + a1*Bnm2; + double an, bn; + double fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + double lna; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + lna = ell + n + a; + an = b*b - lna*lna; + bn = (2.0*lna + 1.0) * x; + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 4.0*GSL_DBL_EPSILON) break; + } + + *result = fn; + + if(n == maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Uniform asymptotic for Q_l(x). + * Assumes x > -1.0 and x != 1.0. + * Discards second order and higher terms. + */ +static +int +legendre_Ql_asymp_unif(const double ell, const double x, gsl_sf_result * result) +{ + if(x < 1.0) { + double u = ell + 0.5; + double th = acos(x); + gsl_sf_result Y0, Y1; + int stat_Y0, stat_Y1; + int stat_m; + double pre; + double B00; + double sum; + + /* B00 = 1/8 (1 - th cot(th) / th^2 + * pre = sqrt(th/sin(th)) + */ + if(th < GSL_ROOT4_DBL_EPSILON) { + B00 = (1.0 + th*th/15.0)/24.0; + pre = 1.0 + th*th/12.0; + } + else { + double sin_th = sqrt(1.0 - x*x); + double cot_th = x / sin_th; + B00 = 1.0/8.0 * (1.0 - th * cot_th) / (th*th); + pre = sqrt(th/sin_th); + } + + stat_Y0 = gsl_sf_bessel_Y0_e(u*th, &Y0); + stat_Y1 = gsl_sf_bessel_Y1_e(u*th, &Y1); + + sum = -0.5*M_PI * (Y0.val + th/u * Y1.val * B00); + + stat_m = gsl_sf_multiply_e(pre, sum, result); + result->err += 0.5*M_PI * fabs(pre) * (Y0.err + fabs(th/u*B00)*Y1.err); + result->err += GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_3(stat_m, stat_Y0, stat_Y1); + } + else { + double u = ell + 0.5; + double xi = acosh(x); + gsl_sf_result K0_scaled, K1_scaled; + int stat_K0, stat_K1; + int stat_e; + double pre; + double B00; + double sum; + + /* B00 = -1/8 (1 - xi coth(xi) / xi^2 + * pre = sqrt(xi/sinh(xi)) + */ + if(xi < GSL_ROOT4_DBL_EPSILON) { + B00 = (1.0-xi*xi/15.0)/24.0; + pre = 1.0 - xi*xi/12.0; + } + else { + double sinh_xi = sqrt(x*x - 1.0); + double coth_xi = x / sinh_xi; + B00 = -1.0/8.0 * (1.0 - xi * coth_xi) / (xi*xi); + pre = sqrt(xi/sinh_xi); + } + + stat_K0 = gsl_sf_bessel_K0_scaled_e(u*xi, &K0_scaled); + stat_K1 = gsl_sf_bessel_K1_scaled_e(u*xi, &K1_scaled); + + sum = K0_scaled.val - xi/u * K1_scaled.val * B00; + + stat_e = gsl_sf_exp_mult_e(-u*xi, pre * sum, result); + result->err = GSL_DBL_EPSILON * fabs(result->val) * fabs(u*xi); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_3(stat_e, stat_K0, stat_K1); + } +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_legendre_Q0_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0 || x == 1.0) { + DOMAIN_ERROR(result); + } + else if(x*x < GSL_ROOT6_DBL_EPSILON) { /* |x| <~ 0.05 */ + const double c3 = 1.0/3.0; + const double c5 = 1.0/5.0; + const double c7 = 1.0/7.0; + const double c9 = 1.0/9.0; + const double c11 = 1.0/11.0; + const double y = x * x; + const double series = 1.0 + y*(c3 + y*(c5 + y*(c7 + y*(c9 + y*c11)))); + result->val = x * series; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(x); + return GSL_SUCCESS; + } + else if(x < 1.0) { + result->val = 0.5 * log((1.0+x)/(1.0-x)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 10.0) { + result->val = 0.5 * log((x+1.0)/(x-1.0)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x*GSL_DBL_MIN < 2.0) { + const double y = 1.0/(x*x); + const double c1 = 1.0/3.0; + const double c2 = 1.0/5.0; + const double c3 = 1.0/7.0; + const double c4 = 1.0/9.0; + const double c5 = 1.0/11.0; + const double c6 = 1.0/13.0; + const double c7 = 1.0/15.0; + result->val = (1.0/x) * (1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*(c6 + y*c7))))))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + + +int +gsl_sf_legendre_Q1_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0 || x == 1.0) { + DOMAIN_ERROR(result); + } + else if(x*x < GSL_ROOT6_DBL_EPSILON) { /* |x| <~ 0.05 */ + const double c3 = 1.0/3.0; + const double c5 = 1.0/5.0; + const double c7 = 1.0/7.0; + const double c9 = 1.0/9.0; + const double c11 = 1.0/11.0; + const double y = x * x; + const double series = 1.0 + y*(c3 + y*(c5 + y*(c7 + y*(c9 + y*c11)))); + result->val = x * x * series - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 1.0){ + result->val = 0.5 * x * (log((1.0+x)/(1.0-x))) - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 6.0) { + result->val = 0.5 * x * log((x+1.0)/(x-1.0)) - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x*GSL_SQRT_DBL_MIN < 0.99/M_SQRT3) { + const double y = 1/(x*x); + const double c1 = 3.0/5.0; + const double c2 = 3.0/7.0; + const double c3 = 3.0/9.0; + const double c4 = 3.0/11.0; + const double c5 = 3.0/13.0; + const double c6 = 3.0/15.0; + const double c7 = 3.0/17.0; + const double c8 = 3.0/19.0; + const double sum = 1.0 + y*(c1 + y*(c2 + y*(c3 + y*(c4 + y*(c5 + y*(c6 + y*(c7 + y*c8))))))); + result->val = sum / (3.0*x*x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + + +int +gsl_sf_legendre_Ql_e(const int l, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0 || x == 1.0 || l < 0) { + DOMAIN_ERROR(result); + } + else if(l == 0) { + return gsl_sf_legendre_Q0_e(x, result); + } + else if(l == 1) { + return gsl_sf_legendre_Q1_e(x, result); + } + else if(l > 100000) { + return legendre_Ql_asymp_unif(l, x, result); + } + else if(x < 1.0){ + /* Forward recurrence. + */ + gsl_sf_result Q0, Q1; + int stat_Q0 = gsl_sf_legendre_Q0_e(x, &Q0); + int stat_Q1 = gsl_sf_legendre_Q1_e(x, &Q1); + double Qellm1 = Q0.val; + double Qell = Q1.val; + double Qellp1; + int ell; + for(ell=1; ellval = Qell; + result->err = GSL_DBL_EPSILON * l * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_Q0, stat_Q1); + } + else { + /* x > 1.0 */ + + double rat; + int stat_CF1 = legendreQ_CF1_xgt1(l, 0.0, 0.0, x, &rat); + int stat_Q; + double Qellp1 = rat * GSL_SQRT_DBL_MIN; + double Qell = GSL_SQRT_DBL_MIN; + double Qellm1; + int ell; + for(ell=l; ell>0; ell--) { + Qellm1 = (x * (2.0*ell + 1.0) * Qell - (ell+1.0) * Qellp1) / ell; + Qellp1 = Qell; + Qell = Qellm1; + } + + if(fabs(Qell) > fabs(Qellp1)) { + gsl_sf_result Q0; + stat_Q = gsl_sf_legendre_Q0_e(x, &Q0); + result->val = GSL_SQRT_DBL_MIN * Q0.val / Qell; + result->err = l * GSL_DBL_EPSILON * fabs(result->val); + } + else { + gsl_sf_result Q1; + stat_Q = gsl_sf_legendre_Q1_e(x, &Q1); + result->val = GSL_SQRT_DBL_MIN * Q1.val / Qellp1; + result->err = l * GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_ERROR_SELECT_2(stat_Q, stat_CF1); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_legendre_Q0(const double x) +{ + EVAL_RESULT(gsl_sf_legendre_Q0_e(x, &result)); +} + +double gsl_sf_legendre_Q1(const double x) +{ + EVAL_RESULT(gsl_sf_legendre_Q1_e(x, &result)); +} + +double gsl_sf_legendre_Ql(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_legendre_Ql_e(l, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/legendre_con.c b/software/gsl-1.15/specfunc/legendre_con.c new file mode 100644 index 000000000..85dee57b7 --- /dev/null +++ b/software/gsl-1.15/specfunc/legendre_con.c @@ -0,0 +1,1374 @@ +/* specfunc/legendre_con.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" +#include "legendre.h" + +#define Root_2OverPi_ 0.797884560802865355879892 +#define locEPS (1000.0*GSL_DBL_EPSILON) + + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +#define RECURSE_LARGE (1.0e-5*GSL_DBL_MAX) +#define RECURSE_SMALL (1.0e+5*GSL_DBL_MIN) + + +/* Continued fraction for f_{ell+1}/f_ell + * f_ell := P^{-mu-ell}_{-1/2 + I tau}(x), x < 1.0 + * + * Uses standard CF method from Temme's book. + */ +static +int +conicalP_negmu_xlt1_CF1(const double mu, const int ell, const double tau, + const double x, gsl_sf_result * result) +{ + const double RECUR_BIG = GSL_SQRT_DBL_MAX; + const int maxiter = 5000; + int n = 1; + double xi = x/(sqrt(1.0-x)*sqrt(1.0+x)); + double Anm2 = 1.0; + double Bnm2 = 0.0; + double Anm1 = 0.0; + double Bnm1 = 1.0; + double a1 = 1.0; + double b1 = 2.0*(mu + ell + 1.0) * xi; + double An = b1*Anm1 + a1*Anm2; + double Bn = b1*Bnm1 + a1*Bnm2; + double an, bn; + double fn = An/Bn; + + while(n < maxiter) { + double old_fn; + double del; + n++; + Anm2 = Anm1; + Bnm2 = Bnm1; + Anm1 = An; + Bnm1 = Bn; + an = tau*tau + (mu - 0.5 + ell + n)*(mu - 0.5 + ell + n); + bn = 2.0*(ell + mu + n) * xi; + An = bn*Anm1 + an*Anm2; + Bn = bn*Bnm1 + an*Bnm2; + + if(fabs(An) > RECUR_BIG || fabs(Bn) > RECUR_BIG) { + An /= RECUR_BIG; + Bn /= RECUR_BIG; + Anm1 /= RECUR_BIG; + Bnm1 /= RECUR_BIG; + Anm2 /= RECUR_BIG; + Bnm2 /= RECUR_BIG; + } + + old_fn = fn; + fn = An/Bn; + del = old_fn/fn; + + if(fabs(del - 1.0) < 2.0*GSL_DBL_EPSILON) break; + } + + result->val = fn; + result->err = 4.0 * GSL_DBL_EPSILON * (sqrt(n) + 1.0) * fabs(fn); + + if(n >= maxiter) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Continued fraction for f_{ell+1}/f_ell + * f_ell := P^{-mu-ell}_{-1/2 + I tau}(x), x >= 1.0 + * + * Uses Gautschi (Euler) equivalent series. + */ +static +int +conicalP_negmu_xgt1_CF1(const double mu, const int ell, const double tau, + const double x, gsl_sf_result * result) +{ + const int maxk = 20000; + const double gamma = 1.0-1.0/(x*x); + const double pre = sqrt(x-1.0)*sqrt(x+1.0) / (x*(2.0*(ell+mu+1.0))); + double tk = 1.0; + double sum = 1.0; + double rhok = 0.0; + int k; + + for(k=1; kval = pre * sum; + result->err = fabs(pre * tk); + result->err += 2.0 * GSL_DBL_EPSILON * (sqrt(k) + 1.0) * fabs(pre*sum); + + if(k >= maxk) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* Implementation of large negative mu asymptotic + * [Dunster, Proc. Roy. Soc. Edinburgh 119A, 311 (1991), p. 326] + */ + +inline +static double olver_U1(double beta2, double p) +{ + return (p-1.0)/(24.0*(1.0+beta2)) * (3.0 + beta2*(2.0 + 5.0*p*(1.0+p))); +} + +inline +static double olver_U2(double beta2, double p) +{ + double beta4 = beta2*beta2; + double p2 = p*p; + double poly1 = 4.0*beta4 + 84.0*beta2 - 63.0; + double poly2 = 16.0*beta4 + 90.0*beta2 - 81.0; + double poly3 = beta2*p2*(97.0*beta2 - 432.0 + 77.0*p*(beta2-6.0) - 385.0*beta2*p2*(1.0 + p)); + return (1.0-p)/(1152.0*(1.0+beta2)) * (poly1 + poly2 + poly3); +} + +static const double U3c1[] = { -1307.0, -1647.0, 3375.0, 3675.0 }; +static const double U3c2[] = { 29366.0, 35835.0, -252360.0, -272630.0, + 276810.0, 290499.0 }; +static const double U3c3[] = { -29748.0, -8840.0, 1725295.0, 1767025.0, + -7313470.0, -754778.0, 6309875.0, 6480045.0 }; +static const double U3c4[] = { 2696.0, -16740.0, -524250.0, -183975.0, + 14670540.0, 14172939.0, -48206730.0, -48461985.0, + 36756720.0, 37182145.0 }; +static const double U3c5[] = { 9136.0, 22480.0, 12760.0, + -252480.0, -4662165.0, -1705341.0, + 92370135.0, 86244015.0, -263678415.0, + -260275015.0, 185910725.0, 185910725.0 }; + +#if 0 +static double olver_U3(double beta2, double p) +{ + double beta4 = beta2*beta2; + double beta6 = beta4*beta2; + double opb2s = (1.0+beta2)*(1.0+beta2); + double den = 39813120.0 * opb2s*opb2s; + double poly1 = gsl_poly_eval(U3c1, 4, p); + double poly2 = gsl_poly_eval(U3c2, 6, p); + double poly3 = gsl_poly_eval(U3c3, 8, p); + double poly4 = gsl_poly_eval(U3c4, 10, p); + double poly5 = gsl_poly_eval(U3c5, 12, p); + + return (p-1.0)*( 1215.0*poly1 + 324.0*beta2*poly2 + + 54.0*beta4*poly3 + 12.0*beta6*poly4 + + beta4*beta4*poly5 + ) / den; +} +#endif /* 0 */ + + +/* Large negative mu asymptotic + * P^{-mu}_{-1/2 + I tau}, mu -> Inf + * |x| < 1 + * + * [Dunster, Proc. Roy. Soc. Edinburgh 119A, 311 (1991), p. 326] + */ +int +gsl_sf_conicalP_xlt1_large_neg_mu_e(double mu, double tau, double x, + gsl_sf_result * result, double * ln_multiplier) +{ + double beta = tau/mu; + double beta2 = beta*beta; + double S = beta * acos((1.0-beta2)/(1.0+beta2)); + double p = x/sqrt(beta2*(1.0-x*x) + 1.0); + gsl_sf_result lg_mup1; + int lg_stat = gsl_sf_lngamma_e(mu+1.0, &lg_mup1); + double ln_pre_1 = 0.5*mu*(S - log(1.0+beta2) + log((1.0-p)/(1.0+p))) - lg_mup1.val; + double ln_pre_2 = -0.25 * log(1.0 + beta2*(1.0-x)); + double ln_pre_3 = -tau * atan(p*beta); + double ln_pre = ln_pre_1 + ln_pre_2 + ln_pre_3; + double sum = 1.0 - olver_U1(beta2, p)/mu + olver_U2(beta2, p)/(mu*mu); + + if(sum == 0.0) { + result->val = 0.0; + result->err = 0.0; + *ln_multiplier = 0.0; + return GSL_SUCCESS; + } + else { + int stat_e = gsl_sf_exp_mult_e(ln_pre, sum, result); + if(stat_e != GSL_SUCCESS) { + result->val = sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + *ln_multiplier = ln_pre; + } + else { + *ln_multiplier = 0.0; + } + return lg_stat; + } +} + + +/* Implementation of large tau asymptotic + * + * A_n^{-mu}, B_n^{-mu} [Olver, p.465, 469] + */ + +inline +static double olver_B0_xi(double mu, double xi) +{ + return (1.0 - 4.0*mu*mu)/(8.0*xi) * (1.0/tanh(xi) - 1.0/xi); +} + +static double olver_A1_xi(double mu, double xi, double x) +{ + double B = olver_B0_xi(mu, xi); + double psi; + if(fabs(x - 1.0) < GSL_ROOT4_DBL_EPSILON) { + double y = x - 1.0; + double s = -1.0/3.0 + y*(2.0/15.0 - y *(61.0/945.0 - 452.0/14175.0*y)); + psi = (4.0*mu*mu - 1.0)/16.0 * s; + } + else { + psi = (4.0*mu*mu - 1.0)/16.0 * (1.0/(x*x-1.0) - 1.0/(xi*xi)); + } + return 0.5*xi*xi*B*B + (mu+0.5)*B - psi + mu/6.0*(0.25 - mu*mu); +} + +inline +static double olver_B0_th(double mu, double theta) +{ + return -(1.0 - 4.0*mu*mu)/(8.0*theta) * (1.0/tan(theta) - 1.0/theta); +} + +static double olver_A1_th(double mu, double theta, double x) +{ + double B = olver_B0_th(mu, theta); + double psi; + if(fabs(x - 1.0) < GSL_ROOT4_DBL_EPSILON) { + double y = 1.0 - x; + double s = -1.0/3.0 + y*(2.0/15.0 - y *(61.0/945.0 - 452.0/14175.0*y)); + psi = (4.0*mu*mu - 1.0)/16.0 * s; + } + else { + psi = (4.0*mu*mu - 1.0)/16.0 * (1.0/(x*x-1.0) + 1.0/(theta*theta)); + } + return -0.5*theta*theta*B*B + (mu+0.5)*B - psi + mu/6.0*(0.25 - mu*mu); +} + + +/* Large tau uniform asymptotics + * P^{-mu}_{-1/2 + I tau} + * 1 < x + * tau -> Inf + * [Olver, p. 469] + */ +int +gsl_sf_conicalP_xgt1_neg_mu_largetau_e(const double mu, const double tau, + const double x, double acosh_x, + gsl_sf_result * result, double * ln_multiplier) +{ + double xi = acosh_x; + double ln_xi_pre; + double ln_pre; + double sumA, sumB, sum; + double arg; + gsl_sf_result J_mup1; + gsl_sf_result J_mu; + double J_mum1; + + if(xi < GSL_ROOT4_DBL_EPSILON) { + ln_xi_pre = -xi*xi/6.0; /* log(1.0 - xi*xi/6.0) */ + } + else { + gsl_sf_result lnshxi; + gsl_sf_lnsinh_e(xi, &lnshxi); + ln_xi_pre = log(xi) - lnshxi.val; /* log(xi/sinh(xi) */ + } + + ln_pre = 0.5*ln_xi_pre - mu*log(tau); + + arg = tau*xi; + + gsl_sf_bessel_Jnu_e(mu + 1.0, arg, &J_mup1); + gsl_sf_bessel_Jnu_e(mu, arg, &J_mu); + J_mum1 = -J_mup1.val + 2.0*mu/arg*J_mu.val; /* careful of mu < 1 */ + + sumA = 1.0 - olver_A1_xi(-mu, xi, x)/(tau*tau); + sumB = olver_B0_xi(-mu, xi); + sum = J_mu.val * sumA - xi/tau * J_mum1 * sumB; + + if(sum == 0.0) { + result->val = 0.0; + result->err = 0.0; + *ln_multiplier = 0.0; + return GSL_SUCCESS; + } + else { + int stat_e = gsl_sf_exp_mult_e(ln_pre, sum, result); + if(stat_e != GSL_SUCCESS) { + result->val = sum; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(sum); + *ln_multiplier = ln_pre; + } + else { + *ln_multiplier = 0.0; + } + return GSL_SUCCESS; + } +} + + +/* Large tau uniform asymptotics + * P^{-mu}_{-1/2 + I tau} + * -1 < x < 1 + * tau -> Inf + * [Olver, p. 473] + */ +int +gsl_sf_conicalP_xlt1_neg_mu_largetau_e(const double mu, const double tau, + const double x, const double acos_x, + gsl_sf_result * result, double * ln_multiplier) +{ + double theta = acos_x; + double ln_th_pre; + double ln_pre; + double sumA, sumB, sum, sumerr; + double arg; + gsl_sf_result I_mup1, I_mu; + double I_mum1; + + if(theta < GSL_ROOT4_DBL_EPSILON) { + ln_th_pre = theta*theta/6.0; /* log(1.0 + theta*theta/6.0) */ + } + else { + ln_th_pre = log(theta/sin(theta)); + } + + ln_pre = 0.5 * ln_th_pre - mu * log(tau); + + arg = tau*theta; + gsl_sf_bessel_Inu_e(mu + 1.0, arg, &I_mup1); + gsl_sf_bessel_Inu_e(mu, arg, &I_mu); + I_mum1 = I_mup1.val + 2.0*mu/arg * I_mu.val; /* careful of mu < 1 */ + + sumA = 1.0 - olver_A1_th(-mu, theta, x)/(tau*tau); + sumB = olver_B0_th(-mu, theta); + sum = I_mu.val * sumA - theta/tau * I_mum1 * sumB; + sumerr = fabs(I_mu.err * sumA); + sumerr += fabs(I_mup1.err * theta/tau * sumB); + sumerr += fabs(I_mu.err * theta/tau * sumB * 2.0 * mu/arg); + + if(sum == 0.0) { + result->val = 0.0; + result->err = 0.0; + *ln_multiplier = 0.0; + return GSL_SUCCESS; + } + else { + int stat_e = gsl_sf_exp_mult_e(ln_pre, sum, result); + if(stat_e != GSL_SUCCESS) { + result->val = sum; + result->err = sumerr; + result->err += GSL_DBL_EPSILON * fabs(sum); + *ln_multiplier = ln_pre; + } + else { + *ln_multiplier = 0.0; + } + return GSL_SUCCESS; + } +} + + +/* Hypergeometric function which appears in the + * large x expansion below: + * + * 2F1(1/4 - mu/2 - I tau/2, 3/4 - mu/2 - I tau/2, 1 - I tau, y) + * + * Note that for the usage below y = 1/x^2; + */ +static +int +conicalP_hyperg_large_x(const double mu, const double tau, const double y, + double * reF, double * imF) +{ + const int kmax = 1000; + const double re_a = 0.25 - 0.5*mu; + const double re_b = 0.75 - 0.5*mu; + const double re_c = 1.0; + const double im_a = -0.5*tau; + const double im_b = -0.5*tau; + const double im_c = -tau; + + double re_sum = 1.0; + double im_sum = 0.0; + double re_term = 1.0; + double im_term = 0.0; + int k; + + for(k=1; k<=kmax; k++) { + double re_ak = re_a + k - 1.0; + double re_bk = re_b + k - 1.0; + double re_ck = re_c + k - 1.0; + double im_ak = im_a; + double im_bk = im_b; + double im_ck = im_c; + double den = re_ck*re_ck + im_ck*im_ck; + double re_multiplier = ((re_ak*re_bk - im_ak*im_bk)*re_ck + im_ck*(im_ak*re_bk + re_ak*im_bk)) / den; + double im_multiplier = ((im_ak*re_bk + re_ak*im_bk)*re_ck - im_ck*(re_ak*re_bk - im_ak*im_bk)) / den; + double re_tmp = re_multiplier*re_term - im_multiplier*im_term; + double im_tmp = im_multiplier*re_term + re_multiplier*im_term; + double asum = fabs(re_sum) + fabs(im_sum); + re_term = y/k * re_tmp; + im_term = y/k * im_tmp; + if(fabs(re_term/asum) < GSL_DBL_EPSILON && fabs(im_term/asum) < GSL_DBL_EPSILON) break; + re_sum += re_term; + im_sum += im_term; + } + + *reF = re_sum; + *imF = im_sum; + + if(k == kmax) + GSL_ERROR ("error", GSL_EMAXITER); + else + return GSL_SUCCESS; +} + + +/* P^{mu}_{-1/2 + I tau} + * x->Inf + */ +int +gsl_sf_conicalP_large_x_e(const double mu, const double tau, const double x, + gsl_sf_result * result, double * ln_multiplier) +{ + /* 2F1 term + */ + double y = ( x < 0.5*GSL_SQRT_DBL_MAX ? 1.0/(x*x) : 0.0 ); + double reF, imF; + int stat_F = conicalP_hyperg_large_x(mu, tau, y, &reF, &imF); + + /* f = Gamma(+i tau)/Gamma(1/2 - mu + i tau) + * FIXME: shift so it's better for tau-> 0 + */ + gsl_sf_result lgr_num, lgth_num; + gsl_sf_result lgr_den, lgth_den; + int stat_gn = gsl_sf_lngamma_complex_e(0.0,tau,&lgr_num,&lgth_num); + int stat_gd = gsl_sf_lngamma_complex_e(0.5-mu,tau,&lgr_den,&lgth_den); + + double angle = lgth_num.val - lgth_den.val + atan2(imF,reF); + + double lnx = log(x); + double lnxp1 = log(x+1.0); + double lnxm1 = log(x-1.0); + double lnpre_const = 0.5*M_LN2 - 0.5*M_LNPI; + double lnpre_comm = (mu-0.5)*lnx - 0.5*mu*(lnxp1 + lnxm1); + double lnpre_err = GSL_DBL_EPSILON * (0.5*M_LN2 + 0.5*M_LNPI) + + GSL_DBL_EPSILON * fabs((mu-0.5)*lnx) + + GSL_DBL_EPSILON * fabs(0.5*mu)*(fabs(lnxp1)+fabs(lnxm1)); + + /* result = pre*|F|*|f| * cos(angle - tau * (log(x)+M_LN2)) + */ + gsl_sf_result cos_result; + int stat_cos = gsl_sf_cos_e(angle + tau*(log(x) + M_LN2), &cos_result); + int status = GSL_ERROR_SELECT_4(stat_cos, stat_gd, stat_gn, stat_F); + if(cos_result.val == 0.0) { + result->val = 0.0; + result->err = 0.0; + return status; + } + else { + double lnFf_val = 0.5*log(reF*reF+imF*imF) + lgr_num.val - lgr_den.val; + double lnFf_err = lgr_num.err + lgr_den.err + GSL_DBL_EPSILON * fabs(lnFf_val); + double lnnoc_val = lnpre_const + lnpre_comm + lnFf_val; + double lnnoc_err = lnpre_err + lnFf_err + GSL_DBL_EPSILON * fabs(lnnoc_val); + int stat_e = gsl_sf_exp_mult_err_e(lnnoc_val, lnnoc_err, + cos_result.val, cos_result.err, + result); + if(stat_e == GSL_SUCCESS) { + *ln_multiplier = 0.0; + } + else { + result->val = cos_result.val; + result->err = cos_result.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *ln_multiplier = lnnoc_val; + } + return status; + } +} + + +/* P^{mu}_{-1/2 + I tau} first hypergeometric representation + * -1 < x < 1 + * This is more effective for |x| small, however it will work w/o + * reservation for any x < 0 because everything is positive + * definite in that case. + * + * [Kolbig, (3)] (note typo in args of gamma functions) + * [Bateman, (22)] (correct form) + */ +static +int +conicalP_xlt1_hyperg_A(double mu, double tau, double x, gsl_sf_result * result) +{ + double x2 = x*x; + double err_amp = 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-fabs(x))); + double pre_val = M_SQRTPI / pow(0.5*sqrt(1-x2), mu); + double pre_err = err_amp * GSL_DBL_EPSILON * (fabs(mu)+1.0) * fabs(pre_val) ; + gsl_sf_result ln_g1, ln_g2, arg_g1, arg_g2; + gsl_sf_result F1, F2; + gsl_sf_result pre1, pre2; + double t1_val, t1_err; + double t2_val, t2_err; + + int stat_F1 = gsl_sf_hyperg_2F1_conj_e(0.25 - 0.5*mu, 0.5*tau, 0.5, x2, &F1); + int stat_F2 = gsl_sf_hyperg_2F1_conj_e(0.75 - 0.5*mu, 0.5*tau, 1.5, x2, &F2); + int status = GSL_ERROR_SELECT_2(stat_F1, stat_F2); + + gsl_sf_lngamma_complex_e(0.75 - 0.5*mu, -0.5*tau, &ln_g1, &arg_g1); + gsl_sf_lngamma_complex_e(0.25 - 0.5*mu, -0.5*tau, &ln_g2, &arg_g2); + + gsl_sf_exp_err_e(-2.0*ln_g1.val, 2.0*ln_g1.err, &pre1); + gsl_sf_exp_err_e(-2.0*ln_g2.val, 2.0*ln_g2.err, &pre2); + pre2.val *= -2.0*x; + pre2.err *= 2.0*fabs(x); + pre2.err += GSL_DBL_EPSILON * fabs(pre2.val); + + t1_val = pre1.val * F1.val; + t1_err = fabs(pre1.val) * F1.err + pre1.err * fabs(F1.val); + t2_val = pre2.val * F2.val; + t2_err = fabs(pre2.val) * F2.err + pre2.err * fabs(F2.val); + + result->val = pre_val * (t1_val + t2_val); + result->err = pre_val * (t1_err + t2_err); + result->err += pre_err * fabs(t1_val + t2_val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return status; +} + + +/* P^{mu}_{-1/2 + I tau} + * defining hypergeometric representation + * [Abramowitz+Stegun, 8.1.2] + * 1 < x < 3 + * effective for x near 1 + * + */ +#if 0 +static +int +conicalP_def_hyperg(double mu, double tau, double x, double * result) +{ + double F; + int stat_F = gsl_sf_hyperg_2F1_conj_renorm_e(0.5, tau, 1.0-mu, 0.5*(1.0-x), &F); + *result = pow((x+1.0)/(x-1.0), 0.5*mu) * F; + return stat_F; +} +#endif /* 0 */ + + +/* P^{mu}_{-1/2 + I tau} second hypergeometric representation + * [Zhurina+Karmazina, (3.1)] + * -1 < x < 3 + * effective for x near 1 + * + */ +#if 0 +static +int +conicalP_xnear1_hyperg_C(double mu, double tau, double x, double * result) +{ + double ln_pre, arg_pre; + double ln_g1, arg_g1; + double ln_g2, arg_g2; + double F; + + int stat_F = gsl_sf_hyperg_2F1_conj_renorm_e(0.5+mu, tau, 1.0+mu, 0.5*(1.0-x), &F); + + gsl_sf_lngamma_complex_e(0.5+mu, tau, &ln_g1, &arg_g1); + gsl_sf_lngamma_complex_e(0.5-mu, tau, &ln_g2, &arg_g2); + + ln_pre = mu*M_LN2 - 0.5*mu*log(fabs(x*x-1.0)) + ln_g1 - ln_g2; + arg_pre = arg_g1 - arg_g2; + + *result = exp(ln_pre) * F; + return stat_F; +} +#endif /* 0 */ + + +/* V0, V1 from Kolbig, m = 0 + */ +static +int +conicalP_0_V(const double t, const double f, const double tau, const double sgn, + double * V0, double * V1) +{ + double C[8]; + double T[8]; + double H[8]; + double V[12]; + int i; + T[0] = 1.0; + H[0] = 1.0; + V[0] = 1.0; + for(i=1; i<=7; i++) { + T[i] = T[i-1] * t; + H[i] = H[i-1] * (t*f); + } + for(i=1; i<=11; i++) { + V[i] = V[i-1] * tau; + } + + C[0] = 1.0; + C[1] = (H[1]-1.0)/(8.0*T[1]); + C[2] = (9.0*H[2] + 6.0*H[1] - 15.0 - sgn*8.0*T[2])/(128.0*T[2]); + C[3] = 5.0*(15.0*H[3] + 27.0*H[2] + 21.0*H[1] - 63.0 - sgn*T[2]*(16.0*H[1]+24.0))/(1024.0*T[3]); + C[4] = 7.0*(525.0*H[4] + 1500.0*H[3] + 2430.0*H[2] + 1980.0*H[1] - 6435.0 + + 192.0*T[4] - sgn*T[2]*(720.0*H[2]+1600.0*H[1]+2160.0) + ) / (32768.0*T[4]); + C[5] = 21.0*(2835.0*H[5] + 11025.0*H[4] + 24750.0*H[3] + 38610.0*H[2] + + 32175.0*H[1] - 109395.0 + T[4]*(1984.0*H[1]+4032.0) + - sgn*T[2]*(4800.0*H[3]+15120.0*H[2]+26400.0*H[1]+34320.0) + ) / (262144.0*T[5]); + C[6] = 11.0*(218295.0*H[6] + 1071630.0*H[5] + 3009825.0*H[4] + 6142500.0*H[3] + + 9398025.0*H[2] + 7936110.0*H[1] - 27776385.0 + + T[4]*(254016.0*H[2]+749952.0*H[1]+1100736.0) + - sgn*T[2]*(441000.0*H[4] + 1814400.0*H[3] + 4127760.0*H[2] + + 6552000.0*H[1] + 8353800.0 + 31232.0*T[4] + ) + ) / (4194304.0*T[6]); + + *V0 = C[0] + (-4.0*C[3]/T[1]+C[4])/V[4] + + (-192.0*C[5]/T[3]+144.0*C[6]/T[2])/V[8] + + sgn * (-C[2]/V[2] + + (-24.0*C[4]/T[2]+12.0*C[5]/T[1]-C[6])/V[6] + + (-1920.0*C[6]/T[4])/V[10] + ); + *V1 = C[1]/V[1] + (8.0*(C[3]/T[2]-C[4]/T[1])+C[5])/V[5] + + (384.0*C[5]/T[4] - 768.0*C[6]/T[3])/V[9] + + sgn * ((2.0*C[2]/T[1]-C[3])/V[3] + + (48.0*C[4]/T[3]-72.0*C[5]/T[2] + 18.0*C[6]/T[1])/V[7] + + (3840.0*C[6]/T[5])/V[11] + ); + + return GSL_SUCCESS; +} + + +/* V0, V1 from Kolbig, m = 1 + */ +static +int +conicalP_1_V(const double t, const double f, const double tau, const double sgn, + double * V0, double * V1) +{ + double Cm1; + double C[8]; + double T[8]; + double H[8]; + double V[12]; + int i; + T[0] = 1.0; + H[0] = 1.0; + V[0] = 1.0; + for(i=1; i<=7; i++) { + T[i] = T[i-1] * t; + H[i] = H[i-1] * (t*f); + } + for(i=1; i<=11; i++) { + V[i] = V[i-1] * tau; + } + + Cm1 = -1.0; + C[0] = 3.0*(1.0-H[1])/(8.0*T[1]); + C[1] = (-15.0*H[2]+6.0*H[1]+9.0+sgn*8.0*T[2])/(128.0*T[2]); + C[2] = 3.0*(-35.0*H[3] - 15.0*H[2] + 15.0*H[1] + 35.0 + sgn*T[2]*(32.0*H[1]+8.0))/(1024.0*T[3]); + C[3] = (-4725.0*H[4] - 6300.0*H[3] - 3150.0*H[2] + 3780.0*H[1] + 10395.0 + -1216.0*T[4] + sgn*T[2]*(6000.0*H[2]+5760.0*H[1]+1680.0)) / (32768.0*T[4]); + C[4] = 7.0*(-10395.0*H[5] - 23625.0*H[4] - 28350.0*H[3] - 14850.0*H[2] + +19305.0*H[1] + 57915.0 - T[4]*(6336.0*H[1]+6080.0) + + sgn*T[2]*(16800.0*H[3] + 30000.0*H[2] + 25920.0*H[1] + 7920.0) + ) / (262144.0*T[5]); + C[5] = (-2837835.0*H[6] - 9168390.0*H[5] - 16372125.0*H[4] - 18918900*H[3] + -10135125.0*H[2] + 13783770.0*H[1] + 43648605.0 + -T[4]*(3044160.0*H[2] + 5588352.0*H[1] + 4213440.0) + +sgn*T[2]*(5556600.0*H[4] + 14817600.0*H[3] + 20790000.0*H[2] + + 17297280.0*H[1] + 5405400.0 + 323072.0*T[4] + ) + ) / (4194304.0*T[6]); + C[6] = 0.0; + + *V0 = C[0] + (-4.0*C[3]/T[1]+C[4])/V[4] + + (-192.0*C[5]/T[3]+144.0*C[6]/T[2])/V[8] + + sgn * (-C[2]/V[2] + + (-24.0*C[4]/T[2]+12.0*C[5]/T[1]-C[6])/V[6] + ); + *V1 = C[1]/V[1] + (8.0*(C[3]/T[2]-C[4]/T[1])+C[5])/V[5] + + (384.0*C[5]/T[4] - 768.0*C[6]/T[3])/V[9] + + sgn * (Cm1*V[1] + (2.0*C[2]/T[1]-C[3])/V[3] + + (48.0*C[4]/T[3]-72.0*C[5]/T[2] + 18.0*C[6]/T[1])/V[7] + ); + + return GSL_SUCCESS; +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +/* P^0_{-1/2 + I lambda} + */ +int +gsl_sf_conicalP_0_e(const double lambda, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(x == 1.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(lambda == 0.0) { + gsl_sf_result K; + int stat_K; + if(x < 1.0) { + const double th = acos(x); + const double s = sin(0.5*th); + stat_K = gsl_sf_ellint_Kcomp_e(s, GSL_MODE_DEFAULT, &K); + result->val = 2.0/M_PI * K.val; + result->err = 2.0/M_PI * K.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_K; + } + else { + const double xi = acosh(x); + const double c = cosh(0.5*xi); + const double t = tanh(0.5*xi); + stat_K = gsl_sf_ellint_Kcomp_e(t, GSL_MODE_DEFAULT, &K); + result->val = 2.0/M_PI / c * K.val; + result->err = 2.0/M_PI / c * K.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_K; + } + } + else if( (x <= 0.0 && lambda < 1000.0) + || (x < 0.1 && lambda < 17.0) + || (x < 0.2 && lambda < 5.0 ) + ) { + return conicalP_xlt1_hyperg_A(0.0, lambda, x, result); + } + else if( (x <= 0.2 && lambda < 17.0) + || (x <= 1.5 && lambda < 20.0) + ) { + return gsl_sf_hyperg_2F1_conj_e(0.5, lambda, 1.0, (1.0-x)/2, result); + } + else if(1.5 < x && lambda < GSL_MAX(x,20.0)) { + gsl_sf_result P; + double lm; + int stat_P = gsl_sf_conicalP_large_x_e(0.0, lambda, x, + &P, &lm + ); + int stat_e = gsl_sf_exp_mult_err_e(lm, 2.0*GSL_DBL_EPSILON * fabs(lm), + P.val, P.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_P); + } + else { + double V0, V1; + if(x < 1.0) { + double th = acos(x); + double sth = sqrt(1.0-x*x); /* sin(th) */ + gsl_sf_result I0, I1; + int stat_I0 = gsl_sf_bessel_I0_scaled_e(th * lambda, &I0); + int stat_I1 = gsl_sf_bessel_I1_scaled_e(th * lambda, &I1); + int stat_I = GSL_ERROR_SELECT_2(stat_I0, stat_I1); + int stat_V = conicalP_0_V(th, x/sth, lambda, -1.0, &V0, &V1); + double bessterm = V0 * I0.val + V1 * I1.val; + double besserr = fabs(V0) * I0.err + fabs(V1) * I1.err; + double arg1 = th*lambda; + double sqts = sqrt(th/sth); + int stat_e = gsl_sf_exp_mult_err_e(arg1, 4.0 * GSL_DBL_EPSILON * fabs(arg1), + sqts * bessterm, sqts * besserr, + result); + return GSL_ERROR_SELECT_3(stat_e, stat_V, stat_I); + } + else { + double sh = sqrt(x-1.0)*sqrt(x+1.0); /* sinh(xi) */ + double xi = log(x + sh); /* xi = acosh(x) */ + gsl_sf_result J0, J1; + int stat_J0 = gsl_sf_bessel_J0_e(xi * lambda, &J0); + int stat_J1 = gsl_sf_bessel_J1_e(xi * lambda, &J1); + int stat_J = GSL_ERROR_SELECT_2(stat_J0, stat_J1); + int stat_V = conicalP_0_V(xi, x/sh, lambda, 1.0, &V0, &V1); + double bessterm = V0 * J0.val + V1 * J1.val; + double besserr = fabs(V0) * J0.err + fabs(V1) * J1.err; + double pre_val = sqrt(xi/sh); + double pre_err = 2.0 * fabs(pre_val); + result->val = pre_val * bessterm; + result->err = pre_val * besserr; + result->err += pre_err * fabs(bessterm); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_V, stat_J); + } + } +} + + +/* P^1_{-1/2 + I lambda} + */ +int +gsl_sf_conicalP_1_e(const double lambda, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(lambda == 0.0) { + gsl_sf_result K, E; + int stat_K, stat_E; + if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 1.0) { + if(1.0-x < GSL_SQRT_DBL_EPSILON) { + double err_amp = GSL_MAX_DBL(1.0, 1.0/(GSL_DBL_EPSILON + fabs(1.0-x))); + result->val = 0.25/M_SQRT2 * sqrt(1.0-x) * (1.0 + 5.0/16.0 * (1.0-x)); + result->err = err_amp * 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double th = acos(x); + const double s = sin(0.5*th); + const double c2 = 1.0 - s*s; + const double sth = sin(th); + const double pre = 2.0/(M_PI*sth); + stat_K = gsl_sf_ellint_Kcomp_e(s, GSL_MODE_DEFAULT, &K); + stat_E = gsl_sf_ellint_Ecomp_e(s, GSL_MODE_DEFAULT, &E); + result->val = pre * (E.val - c2 * K.val); + result->err = pre * (E.err + fabs(c2) * K.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_K, stat_E); + } + } + else { + if(x-1.0 < GSL_SQRT_DBL_EPSILON) { + double err_amp = GSL_MAX_DBL(1.0, 1.0/(GSL_DBL_EPSILON + fabs(1.0-x))); + result->val = -0.25/M_SQRT2 * sqrt(x-1.0) * (1.0 - 5.0/16.0 * (x-1.0)); + result->err = err_amp * 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double xi = acosh(x); + const double c = cosh(0.5*xi); + const double t = tanh(0.5*xi); + const double sxi = sinh(xi); + const double pre = 2.0/(M_PI*sxi) * c; + stat_K = gsl_sf_ellint_Kcomp_e(t, GSL_MODE_DEFAULT, &K); + stat_E = gsl_sf_ellint_Ecomp_e(t, GSL_MODE_DEFAULT, &E); + result->val = pre * (E.val - K.val); + result->err = pre * (E.err + K.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_K, stat_E); + } + } + } + else if( (x <= 0.0 && lambda < 1000.0) + || (x < 0.1 && lambda < 17.0) + || (x < 0.2 && lambda < 5.0 ) + ) { + return conicalP_xlt1_hyperg_A(1.0, lambda, x, result); + } + else if( (x <= 0.2 && lambda < 17.0) + || (x < 1.5 && lambda < 20.0) + ) { + const double arg = fabs(x*x - 1.0); + const double sgn = GSL_SIGN(1.0 - x); + const double pre = 0.5*(lambda*lambda + 0.25) * sgn * sqrt(arg); + gsl_sf_result F; + int stat_F = gsl_sf_hyperg_2F1_conj_e(1.5, lambda, 2.0, (1.0-x)/2, &F); + result->val = pre * F.val; + result->err = fabs(pre) * F.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_F; + } + else if(1.5 <= x && lambda < GSL_MAX(x,20.0)) { + gsl_sf_result P; + double lm; + int stat_P = gsl_sf_conicalP_large_x_e(1.0, lambda, x, + &P, &lm + ); + int stat_e = gsl_sf_exp_mult_err_e(lm, 2.0 * GSL_DBL_EPSILON * fabs(lm), + P.val, P.err, + result); + return GSL_ERROR_SELECT_2(stat_e, stat_P); + } + else { + double V0, V1; + if(x < 1.0) { + const double sqrt_1mx = sqrt(1.0 - x); + const double sqrt_1px = sqrt(1.0 + x); + const double th = acos(x); + const double sth = sqrt_1mx * sqrt_1px; /* sin(th) */ + gsl_sf_result I0, I1; + int stat_I0 = gsl_sf_bessel_I0_scaled_e(th * lambda, &I0); + int stat_I1 = gsl_sf_bessel_I1_scaled_e(th * lambda, &I1); + int stat_I = GSL_ERROR_SELECT_2(stat_I0, stat_I1); + int stat_V = conicalP_1_V(th, x/sth, lambda, -1.0, &V0, &V1); + double bessterm = V0 * I0.val + V1 * I1.val; + double besserr = fabs(V0) * I0.err + fabs(V1) * I1.err + + 2.0 * GSL_DBL_EPSILON * fabs(V0 * I0.val) + + 2.0 * GSL_DBL_EPSILON * fabs(V1 * I1.val); + double arg1 = th * lambda; + double sqts = sqrt(th/sth); + int stat_e = gsl_sf_exp_mult_err_e(arg1, 2.0 * GSL_DBL_EPSILON * fabs(arg1), + sqts * bessterm, sqts * besserr, + result); + result->err *= 1.0/sqrt_1mx; + return GSL_ERROR_SELECT_3(stat_e, stat_V, stat_I); + } + else { + const double sqrt_xm1 = sqrt(x - 1.0); + const double sqrt_xp1 = sqrt(x + 1.0); + const double sh = sqrt_xm1 * sqrt_xp1; /* sinh(xi) */ + const double xi = log(x + sh); /* xi = acosh(x) */ + const double xi_lam = xi * lambda; + gsl_sf_result J0, J1; + const int stat_J0 = gsl_sf_bessel_J0_e(xi_lam, &J0); + const int stat_J1 = gsl_sf_bessel_J1_e(xi_lam, &J1); + const int stat_J = GSL_ERROR_SELECT_2(stat_J0, stat_J1); + const int stat_V = conicalP_1_V(xi, x/sh, lambda, 1.0, &V0, &V1); + const double bessterm = V0 * J0.val + V1 * J1.val; + const double besserr = fabs(V0) * J0.err + fabs(V1) * J1.err + + 512.0 * 2.0 * GSL_DBL_EPSILON * fabs(V0 * J0.val) + + 512.0 * 2.0 * GSL_DBL_EPSILON * fabs(V1 * J1.val) + + GSL_DBL_EPSILON * fabs(xi_lam * V0 * J1.val) + + GSL_DBL_EPSILON * fabs(xi_lam * V1 * J0.val); + const double pre = sqrt(xi/sh); + result->val = pre * bessterm; + result->err = pre * besserr * sqrt_xp1 / sqrt_xm1; + result->err += 4.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_V, stat_J); + } + } +} + + +/* P^{1/2}_{-1/2 + I lambda} (x) + * [Abramowitz+Stegun 8.6.8, 8.6.12] + * checked OK [GJ] Fri May 8 12:24:36 MDT 1998 + */ +int gsl_sf_conicalP_half_e(const double lambda, const double x, + gsl_sf_result * result + ) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(x < 1.0) { + double err_amp = 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-fabs(x))); + double ac = acos(x); + double den = sqrt(sqrt(1.0-x)*sqrt(1.0+x)); + result->val = Root_2OverPi_ / den * cosh(ac * lambda); + result->err = err_amp * 3.0 * GSL_DBL_EPSILON * fabs(result->val); + result->err *= fabs(ac * lambda) + 1.0; + return GSL_SUCCESS; + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* x > 1 */ + double err_amp = 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-fabs(x))); + double sq_term = sqrt(x-1.0)*sqrt(x+1.0); + double ln_term = log(x + sq_term); + double den = sqrt(sq_term); + double carg_val = lambda * ln_term; + double carg_err = 2.0 * GSL_DBL_EPSILON * fabs(carg_val); + gsl_sf_result cos_result; + int stat_cos = gsl_sf_cos_err_e(carg_val, carg_err, &cos_result); + result->val = Root_2OverPi_ / den * cos_result.val; + result->err = err_amp * Root_2OverPi_ / den * cos_result.err; + result->err += 4.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_cos; + } +} + + +/* P^{-1/2}_{-1/2 + I lambda} (x) + * [Abramowitz+Stegun 8.6.9, 8.6.14] + * checked OK [GJ] Fri May 8 12:24:43 MDT 1998 + */ +int gsl_sf_conicalP_mhalf_e(const double lambda, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(x < 1.0) { + double ac = acos(x); + double den = sqrt(sqrt(1.0-x)*sqrt(1.0+x)); + double arg = ac * lambda; + double err_amp = 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-fabs(x))); + if(fabs(arg) < GSL_SQRT_DBL_EPSILON) { + result->val = Root_2OverPi_ / den * ac; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->err *= err_amp; + } + else { + result->val = Root_2OverPi_ / (den*lambda) * sinh(arg); + result->err = GSL_DBL_EPSILON * (fabs(arg)+1.0) * fabs(result->val); + result->err *= err_amp; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + return GSL_SUCCESS; + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* x > 1 */ + double sq_term = sqrt(x-1.0)*sqrt(x+1.0); + double ln_term = log(x + sq_term); + double den = sqrt(sq_term); + double arg_val = lambda * ln_term; + double arg_err = 2.0 * GSL_DBL_EPSILON * fabs(arg_val); + if(arg_val < GSL_SQRT_DBL_EPSILON) { + result->val = Root_2OverPi_ / den * ln_term; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result sin_result; + int stat_sin = gsl_sf_sin_err_e(arg_val, arg_err, &sin_result); + result->val = Root_2OverPi_ / (den*lambda) * sin_result.val; + result->err = Root_2OverPi_ / fabs(den*lambda) * sin_result.err; + result->err += 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_sin; + } + } +} + + +int gsl_sf_conicalP_sph_reg_e(const int l, const double lambda, + const double x, + gsl_sf_result * result + ) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0 || l < -1) { + DOMAIN_ERROR(result); + } + else if(l == -1) { + return gsl_sf_conicalP_half_e(lambda, x, result); + } + else if(l == 0) { + return gsl_sf_conicalP_mhalf_e(lambda, x, result); + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 0.0) { + double c = 1.0/sqrt(1.0-x*x); + gsl_sf_result r_Pellm1; + gsl_sf_result r_Pell; + int stat_0 = gsl_sf_conicalP_half_e(lambda, x, &r_Pellm1); /* P^( 1/2) */ + int stat_1 = gsl_sf_conicalP_mhalf_e(lambda, x, &r_Pell); /* P^(-1/2) */ + int stat_P = GSL_ERROR_SELECT_2(stat_0, stat_1); + double Pellm1 = r_Pellm1.val; + double Pell = r_Pell.val; + double Pellp1; + int ell; + + for(ell=0; ellval = Pell; + result->err = (0.5*l + 1.0) * GSL_DBL_EPSILON * fabs(Pell); + result->err += GSL_DBL_EPSILON * l * fabs(result->val); + return stat_P; + } + else if(x < 1.0) { + const double xi = x/(sqrt(1.0-x)*sqrt(1.0+x)); + gsl_sf_result rat; + gsl_sf_result Phf; + int stat_CF1 = conicalP_negmu_xlt1_CF1(0.5, l, lambda, x, &rat); + int stat_Phf = gsl_sf_conicalP_half_e(lambda, x, &Phf); + double Pellp1 = rat.val * GSL_SQRT_DBL_MIN; + double Pell = GSL_SQRT_DBL_MIN; + double Pellm1; + int ell; + + for(ell=l; ell>=0; ell--) { + double d = (ell+1.0)*(ell+1.0) + lambda*lambda; + Pellm1 = (2.0*ell+1.0)*xi * Pell + d * Pellp1; + Pellp1 = Pell; + Pell = Pellm1; + } + + result->val = GSL_SQRT_DBL_MIN * Phf.val / Pell; + result->err = GSL_SQRT_DBL_MIN * Phf.err / fabs(Pell); + result->err += fabs(rat.err/rat.val) * (l + 1.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_Phf, stat_CF1); + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* x > 1.0 */ + + const double xi = x/sqrt((x-1.0)*(x+1.0)); + gsl_sf_result rat; + int stat_CF1 = conicalP_negmu_xgt1_CF1(0.5, l, lambda, x, &rat); + int stat_P; + double Pellp1 = rat.val * GSL_SQRT_DBL_MIN; + double Pell = GSL_SQRT_DBL_MIN; + double Pellm1; + int ell; + + for(ell=l; ell>=0; ell--) { + double d = (ell+1.0)*(ell+1.0) + lambda*lambda; + Pellm1 = (2.0*ell+1.0)*xi * Pell - d * Pellp1; + Pellp1 = Pell; + Pell = Pellm1; + } + + if(fabs(Pell) > fabs(Pellp1)){ + gsl_sf_result Phf; + stat_P = gsl_sf_conicalP_half_e(lambda, x, &Phf); + result->val = GSL_SQRT_DBL_MIN * Phf.val / Pell; + result->err = 2.0 * GSL_SQRT_DBL_MIN * Phf.err / fabs(Pell); + result->err += 2.0 * fabs(rat.err/rat.val) * (l + 1.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + else { + gsl_sf_result Pmhf; + stat_P = gsl_sf_conicalP_mhalf_e(lambda, x, &Pmhf); + result->val = GSL_SQRT_DBL_MIN * Pmhf.val / Pellp1; + result->err = 2.0 * GSL_SQRT_DBL_MIN * Pmhf.err / fabs(Pellp1); + result->err += 2.0 * fabs(rat.err/rat.val) * (l + 1.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_ERROR_SELECT_2(stat_P, stat_CF1); + } +} + + +int gsl_sf_conicalP_cyl_reg_e(const int m, const double lambda, + const double x, + gsl_sf_result * result + ) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0 || m < -1) { + DOMAIN_ERROR(result); + } + else if(m == -1) { + return gsl_sf_conicalP_1_e(lambda, x, result); + } + else if(m == 0) { + return gsl_sf_conicalP_0_e(lambda, x, result); + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 0.0) { + double c = 1.0/sqrt(1.0-x*x); + gsl_sf_result r_Pkm1; + gsl_sf_result r_Pk; + int stat_0 = gsl_sf_conicalP_1_e(lambda, x, &r_Pkm1); /* P^1 */ + int stat_1 = gsl_sf_conicalP_0_e(lambda, x, &r_Pk); /* P^0 */ + int stat_P = GSL_ERROR_SELECT_2(stat_0, stat_1); + double Pkm1 = r_Pkm1.val; + double Pk = r_Pk.val; + double Pkp1; + int k; + + for(k=0; kval = Pk; + result->err = (m + 2.0) * GSL_DBL_EPSILON * fabs(Pk); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return stat_P; + } + else if(x < 1.0) { + const double xi = x/(sqrt(1.0-x)*sqrt(1.0+x)); + gsl_sf_result rat; + gsl_sf_result P0; + int stat_CF1 = conicalP_negmu_xlt1_CF1(0.0, m, lambda, x, &rat); + int stat_P0 = gsl_sf_conicalP_0_e(lambda, x, &P0); + double Pkp1 = rat.val * GSL_SQRT_DBL_MIN; + double Pk = GSL_SQRT_DBL_MIN; + double Pkm1; + int k; + + for(k=m; k>0; k--) { + double d = (k+0.5)*(k+0.5) + lambda*lambda; + Pkm1 = 2.0*k*xi * Pk + d * Pkp1; + Pkp1 = Pk; + Pk = Pkm1; + } + + result->val = GSL_SQRT_DBL_MIN * P0.val / Pk; + result->err = 2.0 * GSL_SQRT_DBL_MIN * P0.err / fabs(Pk); + result->err += 2.0 * fabs(rat.err/rat.val) * (m + 1.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_P0, stat_CF1); + } + else if(x == 1.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* x > 1.0 */ + + const double xi = x/sqrt((x-1.0)*(x+1.0)); + gsl_sf_result rat; + int stat_CF1 = conicalP_negmu_xgt1_CF1(0.0, m, lambda, x, &rat); + int stat_P; + double Pkp1 = rat.val * GSL_SQRT_DBL_MIN; + double Pk = GSL_SQRT_DBL_MIN; + double Pkm1; + int k; + + for(k=m; k>-1; k--) { + double d = (k+0.5)*(k+0.5) + lambda*lambda; + Pkm1 = 2.0*k*xi * Pk - d * Pkp1; + Pkp1 = Pk; + Pk = Pkm1; + } + + if(fabs(Pk) > fabs(Pkp1)){ + gsl_sf_result P1; + stat_P = gsl_sf_conicalP_1_e(lambda, x, &P1); + result->val = GSL_SQRT_DBL_MIN * P1.val / Pk; + result->err = 2.0 * GSL_SQRT_DBL_MIN * P1.err / fabs(Pk); + result->err += 2.0 * fabs(rat.err/rat.val) * (m+2.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + else { + gsl_sf_result P0; + stat_P = gsl_sf_conicalP_0_e(lambda, x, &P0); + result->val = GSL_SQRT_DBL_MIN * P0.val / Pkp1; + result->err = 2.0 * GSL_SQRT_DBL_MIN * P0.err / fabs(Pkp1); + result->err += 2.0 * fabs(rat.err/rat.val) * (m+2.0) * fabs(result->val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_ERROR_SELECT_2(stat_P, stat_CF1); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_conicalP_0(const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_0_e(lambda, x, &result)); +} + +double gsl_sf_conicalP_1(const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_1_e(lambda, x, &result)); +} + +double gsl_sf_conicalP_half(const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_half_e(lambda, x, &result)); +} + +double gsl_sf_conicalP_mhalf(const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_mhalf_e(lambda, x, &result)); +} + +double gsl_sf_conicalP_sph_reg(const int l, const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_sph_reg_e(l, lambda, x, &result)); +} + +double gsl_sf_conicalP_cyl_reg(const int m, const double lambda, const double x) +{ + EVAL_RESULT(gsl_sf_conicalP_cyl_reg_e(m, lambda, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/legendre_poly.c b/software/gsl-1.15/specfunc/legendre_poly.c new file mode 100644 index 000000000..654a4b044 --- /dev/null +++ b/software/gsl-1.15/specfunc/legendre_poly.c @@ -0,0 +1,779 @@ +/* specfunc/legendre_poly.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + + + +/* Calculate P_m^m(x) from the analytic result: + * P_m^m(x) = (-1)^m (2m-1)!! (1-x^2)^(m/2) , m > 0 + * = 1 , m = 0 + */ +static double legendre_Pmm(int m, double x) +{ + if(m == 0) + { + return 1.0; + } + else + { + double p_mm = 1.0; + double root_factor = sqrt(1.0-x)*sqrt(1.0+x); + double fact_coeff = 1.0; + int i; + for(i=1; i<=m; i++) + { + p_mm *= -fact_coeff * root_factor; + fact_coeff += 2.0; + } + return p_mm; + } +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_legendre_P1_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } +} + +int +gsl_sf_legendre_P2_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + result->val = 0.5*(3.0*x*x - 1.0); + result->err = GSL_DBL_EPSILON * (fabs(3.0*x*x) + 1.0); + return GSL_SUCCESS; + } +} + +int +gsl_sf_legendre_P3_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + result->val = 0.5*x*(5.0*x*x - 3.0); + result->err = GSL_DBL_EPSILON * (fabs(result->val) + 0.5 * fabs(x) * (fabs(5.0*x*x) + 3.0)); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_legendre_Pl_e(const int l, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(l < 0 || x < -1.0 || x > 1.0) { + DOMAIN_ERROR(result); + } + else if(l == 0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(l == 1) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(l == 2) { + result->val = 0.5 * (3.0*x*x - 1.0); + result->err = GSL_DBL_EPSILON * (fabs(3.0*x*x) + 1.0); + /*result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); + removed this old bogus estimate [GJ] + */ + return GSL_SUCCESS; + } + else if(x == 1.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x == -1.0) { + result->val = ( GSL_IS_ODD(l) ? -1.0 : 1.0 ); + result->err = 0.0; + return GSL_SUCCESS; + } + else if(l < 100000) { + /* upward recurrence: l P_l = (2l-1) z P_{l-1} - (l-1) P_{l-2} */ + + double p_ellm2 = 1.0; /* P_0(x) */ + double p_ellm1 = x; /* P_1(x) */ + double p_ell = p_ellm1; + + double e_ellm2 = GSL_DBL_EPSILON; + double e_ellm1 = fabs(x)*GSL_DBL_EPSILON; + double e_ell = e_ellm1; + + int ell; + + for(ell=2; ell <= l; ell++){ + p_ell = (x*(2*ell-1)*p_ellm1 - (ell-1)*p_ellm2) / ell; + p_ellm2 = p_ellm1; + p_ellm1 = p_ell; + + e_ell = 0.5*(fabs(x)*(2*ell-1.0) * e_ellm1 + (ell-1.0)*e_ellm2)/ell; + e_ellm2 = e_ellm1; + e_ellm1 = e_ell; + } + + result->val = p_ell; + result->err = e_ell + l*fabs(p_ell)*GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else { + /* Asymptotic expansion. + * [Olver, p. 473] + */ + double u = l + 0.5; + double th = acos(x); + gsl_sf_result J0; + gsl_sf_result Jm1; + int stat_J0 = gsl_sf_bessel_J0_e(u*th, &J0); + int stat_Jm1 = gsl_sf_bessel_Jn_e(-1, u*th, &Jm1); + double pre; + double B00; + double c1; + + /* B00 = 1/8 (1 - th cot(th) / th^2 + * pre = sqrt(th/sin(th)) + */ + if(th < GSL_ROOT4_DBL_EPSILON) { + B00 = (1.0 + th*th/15.0)/24.0; + pre = 1.0 + th*th/12.0; + } + else { + double sin_th = sqrt(1.0 - x*x); + double cot_th = x / sin_th; + B00 = 1.0/8.0 * (1.0 - th * cot_th) / (th*th); + pre = sqrt(th/sin_th); + } + + c1 = th/u * B00; + + result->val = pre * (J0.val + c1 * Jm1.val); + result->err = pre * (J0.err + fabs(c1) * Jm1.err); + result->err += GSL_SQRT_DBL_EPSILON * fabs(result->val); + + return GSL_ERROR_SELECT_2(stat_J0, stat_Jm1); + } +} + + +int +gsl_sf_legendre_Pl_array(const int lmax, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(lmax < 0 || x < -1.0 || x > 1.0) { + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(lmax == 0) { + result_array[0] = 1.0; + return GSL_SUCCESS; + } + else if(lmax == 1) { + result_array[0] = 1.0; + result_array[1] = x; + return GSL_SUCCESS; + } + else { + /* upward recurrence: l P_l = (2l-1) z P_{l-1} - (l-1) P_{l-2} */ + + double p_ellm2 = 1.0; /* P_0(x) */ + double p_ellm1 = x; /* P_1(x) */ + double p_ell = p_ellm1; + int ell; + + result_array[0] = 1.0; + result_array[1] = x; + + for(ell=2; ell <= lmax; ell++){ + p_ell = (x*(2*ell-1)*p_ellm1 - (ell-1)*p_ellm2) / ell; + p_ellm2 = p_ellm1; + p_ellm1 = p_ell; + result_array[ell] = p_ell; + } + + return GSL_SUCCESS; + } +} + + +int +gsl_sf_legendre_Pl_deriv_array(const int lmax, const double x, double * result_array, double * result_deriv_array) +{ + int stat_array = gsl_sf_legendre_Pl_array(lmax, x, result_array); + + if(lmax >= 0) result_deriv_array[0] = 0.0; + if(lmax >= 1) result_deriv_array[1] = 1.0; + + if(stat_array == GSL_SUCCESS) + { + int ell; + + if(fabs(x - 1.0)*(lmax+1.0)*(lmax+1.0) < GSL_SQRT_DBL_EPSILON) + { + /* x is near 1 */ + for(ell = 2; ell <= lmax; ell++) + { + const double pre = 0.5 * ell * (ell+1.0); + result_deriv_array[ell] = pre * (1.0 - 0.25 * (1.0-x) * (ell+2.0)*(ell-1.0)); + } + } + else if(fabs(x + 1.0)*(lmax+1.0)*(lmax+1.0) < GSL_SQRT_DBL_EPSILON) + { + /* x is near -1 */ + for(ell = 2; ell <= lmax; ell++) + { + const double sgn = ( GSL_IS_ODD(ell) ? 1.0 : -1.0 ); /* derivative is odd in x for even ell */ + const double pre = sgn * 0.5 * ell * (ell+1.0); + result_deriv_array[ell] = pre * (1.0 - 0.25 * (1.0+x) * (ell+2.0)*(ell-1.0)); + } + } + else + { + const double diff_a = 1.0 + x; + const double diff_b = 1.0 - x; + for(ell = 2; ell <= lmax; ell++) + { + result_deriv_array[ell] = - ell * (x * result_array[ell] - result_array[ell-1]) / (diff_a * diff_b); + } + } + + return GSL_SUCCESS; + } + else + { + return stat_array; + } +} + + +int +gsl_sf_legendre_Plm_e(const int l, const int m, const double x, gsl_sf_result * result) +{ + /* If l is large and m is large, then we have to worry + * about overflow. Calculate an approximate exponent which + * measures the normalization of this thing. + */ + const double dif = l-m; + const double sum = l+m; + const double t_d = ( dif == 0.0 ? 0.0 : 0.5 * dif * (log(dif)-1.0) ); + const double t_s = ( dif == 0.0 ? 0.0 : 0.5 * sum * (log(sum)-1.0) ); + const double exp_check = 0.5 * log(2.0*l+1.0) + t_d - t_s; + + /* CHECK_POINTER(result) */ + + if(m < 0 || l < m || x < -1.0 || x > 1.0) { + DOMAIN_ERROR(result); + } + else if(exp_check < GSL_LOG_DBL_MIN + 10.0){ + /* Bail out. */ + OVERFLOW_ERROR(result); + } + else { + /* Account for the error due to the + * representation of 1-x. + */ + const double err_amp = 1.0 / (GSL_DBL_EPSILON + fabs(1.0-fabs(x))); + + /* P_m^m(x) and P_{m+1}^m(x) */ + double p_mm = legendre_Pmm(m, x); + double p_mmp1 = x * (2*m + 1) * p_mm; + + if(l == m){ + result->val = p_mm; + result->err = err_amp * 2.0 * GSL_DBL_EPSILON * fabs(p_mm); + return GSL_SUCCESS; + } + else if(l == m + 1) { + result->val = p_mmp1; + result->err = err_amp * 2.0 * GSL_DBL_EPSILON * fabs(p_mmp1); + return GSL_SUCCESS; + } + else{ + /* upward recurrence: (l-m) P(l,m) = (2l-1) z P(l-1,m) - (l+m-1) P(l-2,m) + * start at P(m,m), P(m+1,m) + */ + + double p_ellm2 = p_mm; + double p_ellm1 = p_mmp1; + double p_ell = 0.0; + int ell; + + for(ell=m+2; ell <= l; ell++){ + p_ell = (x*(2*ell-1)*p_ellm1 - (ell+m-1)*p_ellm2) / (ell-m); + p_ellm2 = p_ellm1; + p_ellm1 = p_ell; + } + + result->val = p_ell; + result->err = err_amp * (0.5*(l-m) + 1.0) * GSL_DBL_EPSILON * fabs(p_ell); + + return GSL_SUCCESS; + } + } +} + + +int +gsl_sf_legendre_Plm_array(const int lmax, const int m, const double x, double * result_array) +{ + /* If l is large and m is large, then we have to worry + * about overflow. Calculate an approximate exponent which + * measures the normalization of this thing. + */ + const double dif = lmax-m; + const double sum = lmax+m; + const double t_d = ( dif == 0.0 ? 0.0 : 0.5 * dif * (log(dif)-1.0) ); + const double t_s = ( dif == 0.0 ? 0.0 : 0.5 * sum * (log(sum)-1.0) ); + const double exp_check = 0.5 * log(2.0*lmax+1.0) + t_d - t_s; + + /* CHECK_POINTER(result_array) */ + + if(m < 0 || lmax < m || x < -1.0 || x > 1.0) { + GSL_ERROR ("domain error", GSL_EDOM); + } + else if(m > 0 && (x == 1.0 || x == -1.0)) { + int ell; + for(ell=m; ell<=lmax; ell++) result_array[ell-m] = 0.0; + return GSL_SUCCESS; + } + else if(exp_check < GSL_LOG_DBL_MIN + 10.0){ + /* Bail out. */ + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + double p_mm = legendre_Pmm(m, x); + double p_mmp1 = x * (2.0*m + 1.0) * p_mm; + + if(lmax == m){ + result_array[0] = p_mm; + return GSL_SUCCESS; + } + else if(lmax == m + 1) { + result_array[0] = p_mm; + result_array[1] = p_mmp1; + return GSL_SUCCESS; + } + else { + double p_ellm2 = p_mm; + double p_ellm1 = p_mmp1; + double p_ell = 0.0; + int ell; + + result_array[0] = p_mm; + result_array[1] = p_mmp1; + + for(ell=m+2; ell <= lmax; ell++){ + p_ell = (x*(2.0*ell-1.0)*p_ellm1 - (ell+m-1)*p_ellm2) / (ell-m); + p_ellm2 = p_ellm1; + p_ellm1 = p_ell; + result_array[ell-m] = p_ell; + } + + return GSL_SUCCESS; + } + } +} + + +int +gsl_sf_legendre_Plm_deriv_array( + const int lmax, const int m, const double x, + double * result_array, + double * result_deriv_array) +{ + if(m < 0 || m > lmax) + { + GSL_ERROR("m < 0 or m > lmax", GSL_EDOM); + } + else if(m == 0) + { + /* It is better to do m=0 this way, so we can more easily + * trap the divergent case which can occur when m == 1. + */ + return gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); + } + else + { + int stat_array = gsl_sf_legendre_Plm_array(lmax, m, x, result_array); + + if(stat_array == GSL_SUCCESS) + { + int ell; + + if(m == 1 && (1.0 - fabs(x) < GSL_DBL_EPSILON)) + { + /* This divergence is real and comes from the cusp-like + * behaviour for m = 1. For example, P[1,1] = - Sqrt[1-x^2]. + */ + GSL_ERROR("divergence near |x| = 1.0 since m = 1", GSL_EOVRFLW); + } + else if(m == 2 && (1.0 - fabs(x) < GSL_DBL_EPSILON)) + { + /* m = 2 gives a finite nonzero result for |x| near 1 */ + if(fabs(x - 1.0) < GSL_DBL_EPSILON) + { + for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = -0.25 * x * (ell - 1.0)*ell*(ell+1.0)*(ell+2.0); + } + else if(fabs(x + 1.0) < GSL_DBL_EPSILON) + { + for(ell = m; ell <= lmax; ell++) + { + const double sgn = ( GSL_IS_ODD(ell) ? 1.0 : -1.0 ); + result_deriv_array[ell-m] = -0.25 * sgn * x * (ell - 1.0)*ell*(ell+1.0)*(ell+2.0); + } + } + return GSL_SUCCESS; + } + else + { + /* m > 2 is easier to deal with since the endpoints always vanish */ + if(1.0 - fabs(x) < GSL_DBL_EPSILON) + { + for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; + return GSL_SUCCESS; + } + else + { + const double diff_a = 1.0 + x; + const double diff_b = 1.0 - x; + result_deriv_array[0] = - m * x / (diff_a * diff_b) * result_array[0]; + if(lmax-m >= 1) result_deriv_array[1] = (2.0 * m + 1.0) * (x * result_deriv_array[0] + result_array[0]); + for(ell = m+2; ell <= lmax; ell++) + { + result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); + } + return GSL_SUCCESS; + } + } + } + else + { + return stat_array; + } + } +} + + +int +gsl_sf_legendre_sphPlm_e(const int l, int m, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(m < 0 || l < m || x < -1.0 || x > 1.0) { + DOMAIN_ERROR(result); + } + else if(m == 0) { + gsl_sf_result P; + int stat_P = gsl_sf_legendre_Pl_e(l, x, &P); + double pre = sqrt((2.0*l + 1.0)/(4.0*M_PI)); + result->val = pre * P.val; + result->err = pre * P.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_P; + } + else if(x == 1.0 || x == -1.0) { + /* m > 0 here */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + /* m > 0 and |x| < 1 here */ + + /* Starting value for recursion. + * Y_m^m(x) = sqrt( (2m+1)/(4pi m) gamma(m+1/2)/gamma(m) ) (-1)^m (1-x^2)^(m/2) / pi^(1/4) + */ + gsl_sf_result lncirc; + gsl_sf_result lnpoch; + double lnpre_val; + double lnpre_err; + gsl_sf_result ex_pre; + double sr; + const double sgn = ( GSL_IS_ODD(m) ? -1.0 : 1.0); + const double y_mmp1_factor = x * sqrt(2.0*m + 3.0); + double y_mm, y_mm_err; + double y_mmp1, y_mmp1_err; + gsl_sf_log_1plusx_e(-x*x, &lncirc); + gsl_sf_lnpoch_e(m, 0.5, &lnpoch); /* Gamma(m+1/2)/Gamma(m) */ + lnpre_val = -0.25*M_LNPI + 0.5 * (lnpoch.val + m*lncirc.val); + lnpre_err = 0.25*M_LNPI*GSL_DBL_EPSILON + 0.5 * (lnpoch.err + fabs(m)*lncirc.err); + /* Compute exp(ln_pre) with error term, avoiding call to gsl_sf_exp_err BJG */ + ex_pre.val = exp(lnpre_val); + ex_pre.err = 2.0*(sinh(lnpre_err) + GSL_DBL_EPSILON)*ex_pre.val; + sr = sqrt((2.0+1.0/m)/(4.0*M_PI)); + y_mm = sgn * sr * ex_pre.val; + y_mm_err = 2.0 * GSL_DBL_EPSILON * fabs(y_mm) + sr * ex_pre.err; + y_mm_err *= 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-x)); + y_mmp1 = y_mmp1_factor * y_mm; + y_mmp1_err=fabs(y_mmp1_factor) * y_mm_err; + + if(l == m){ + result->val = y_mm; + result->err = y_mm_err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(y_mm); + return GSL_SUCCESS; + } + else if(l == m + 1) { + result->val = y_mmp1; + result->err = y_mmp1_err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(y_mmp1); + return GSL_SUCCESS; + } + else{ + double y_ell = 0.0; + double y_ell_err; + int ell; + + /* Compute Y_l^m, l > m+1, upward recursion on l. */ + for(ell=m+2; ell <= l; ell++){ + const double rat1 = (double)(ell-m)/(double)(ell+m); + const double rat2 = (ell-m-1.0)/(ell+m-1.0); + const double factor1 = sqrt(rat1*(2.0*ell+1.0)*(2.0*ell-1.0)); + const double factor2 = sqrt(rat1*rat2*(2.0*ell+1.0)/(2.0*ell-3.0)); + y_ell = (x*y_mmp1*factor1 - (ell+m-1.0)*y_mm*factor2) / (ell-m); + y_mm = y_mmp1; + y_mmp1 = y_ell; + + y_ell_err = 0.5*(fabs(x*factor1)*y_mmp1_err + fabs((ell+m-1.0)*factor2)*y_mm_err) / fabs(ell-m); + y_mm_err = y_mmp1_err; + y_mmp1_err = y_ell_err; + } + + result->val = y_ell; + result->err = y_ell_err + (0.5*(l-m) + 1.0) * GSL_DBL_EPSILON * fabs(y_ell); + + return GSL_SUCCESS; + } + } +} + + +int +gsl_sf_legendre_sphPlm_array(const int lmax, int m, const double x, double * result_array) +{ + /* CHECK_POINTER(result_array) */ + + if(m < 0 || lmax < m || x < -1.0 || x > 1.0) { + GSL_ERROR ("error", GSL_EDOM); + } + else if(m > 0 && (x == 1.0 || x == -1.0)) { + int ell; + for(ell=m; ell<=lmax; ell++) result_array[ell-m] = 0.0; + return GSL_SUCCESS; + } + else { + double y_mm; + double y_mmp1; + + if(m == 0) { + y_mm = 0.5/M_SQRTPI; /* Y00 = 1/sqrt(4pi) */ + y_mmp1 = x * M_SQRT3 * y_mm; + } + else { + /* |x| < 1 here */ + + gsl_sf_result lncirc; + gsl_sf_result lnpoch; + double lnpre; + const double sgn = ( GSL_IS_ODD(m) ? -1.0 : 1.0); + gsl_sf_log_1plusx_e(-x*x, &lncirc); + gsl_sf_lnpoch_e(m, 0.5, &lnpoch); /* Gamma(m+1/2)/Gamma(m) */ + lnpre = -0.25*M_LNPI + 0.5 * (lnpoch.val + m*lncirc.val); + y_mm = sqrt((2.0+1.0/m)/(4.0*M_PI)) * sgn * exp(lnpre); + y_mmp1 = x * sqrt(2.0*m + 3.0) * y_mm; + } + + if(lmax == m){ + result_array[0] = y_mm; + return GSL_SUCCESS; + } + else if(lmax == m + 1) { + result_array[0] = y_mm; + result_array[1] = y_mmp1; + return GSL_SUCCESS; + } + else{ + double y_ell; + int ell; + + result_array[0] = y_mm; + result_array[1] = y_mmp1; + + /* Compute Y_l^m, l > m+1, upward recursion on l. */ + for(ell=m+2; ell <= lmax; ell++){ + const double rat1 = (double)(ell-m)/(double)(ell+m); + const double rat2 = (ell-m-1.0)/(ell+m-1.0); + const double factor1 = sqrt(rat1*(2*ell+1)*(2*ell-1)); + const double factor2 = sqrt(rat1*rat2*(2*ell+1)/(2*ell-3)); + y_ell = (x*y_mmp1*factor1 - (ell+m-1)*y_mm*factor2) / (ell-m); + y_mm = y_mmp1; + y_mmp1 = y_ell; + result_array[ell-m] = y_ell; + } + } + + return GSL_SUCCESS; + } +} + + +int +gsl_sf_legendre_sphPlm_deriv_array( + const int lmax, const int m, const double x, + double * result_array, + double * result_deriv_array) +{ + if(m < 0 || lmax < m || x < -1.0 || x > 1.0) + { + GSL_ERROR ("domain", GSL_EDOM); + } + else if(m == 0) + { + /* m = 0 is easy to trap */ + const int stat_array = gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); + int ell; + for(ell = 0; ell <= lmax; ell++) + { + const double prefactor = sqrt((2.0 * ell + 1.0)/(4.0*M_PI)); + result_array[ell] *= prefactor; + result_deriv_array[ell] *= prefactor; + } + return stat_array; + } + else if(m == 1) + { + /* Trapping m = 1 is necessary because of the possible divergence. + * Recall that this divergence is handled properly in ..._Plm_deriv_array(), + * and the scaling factor is not large for small m, so we just scale. + */ + const int stat_array = gsl_sf_legendre_Plm_deriv_array(lmax, m, x, result_array, result_deriv_array); + int ell; + for(ell = 1; ell <= lmax; ell++) + { + const double prefactor = sqrt((2.0 * ell + 1.0)/(ell + 1.0) / (4.0*M_PI*ell)); + result_array[ell-1] *= prefactor; + result_deriv_array[ell-1] *= prefactor; + } + return stat_array; + } + else + { + /* as for the derivative of P_lm, everything is regular for m >= 2 */ + + int stat_array = gsl_sf_legendre_sphPlm_array(lmax, m, x, result_array); + + if(stat_array == GSL_SUCCESS) + { + int ell; + + if(1.0 - fabs(x) < GSL_DBL_EPSILON) + { + for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; + return GSL_SUCCESS; + } + else + { + const double diff_a = 1.0 + x; + const double diff_b = 1.0 - x; + result_deriv_array[0] = - m * x / (diff_a * diff_b) * result_array[0]; + if(lmax-m >= 1) result_deriv_array[1] = sqrt(2.0 * m + 3.0) * (x * result_deriv_array[0] + result_array[0]); + for(ell = m+2; ell <= lmax; ell++) + { + const double c1 = sqrt(((2.0*ell+1.0)/(2.0*ell-1.0)) * ((double)(ell-m)/(double)(ell+m))); + result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - c1 * (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); + } + return GSL_SUCCESS; + } + } + else + { + return stat_array; + } + } +} + +int +gsl_sf_legendre_array_size(const int lmax, const int m) +{ + return lmax-m+1; +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_legendre_P1(const double x) +{ + EVAL_RESULT(gsl_sf_legendre_P1_e(x, &result)); +} + +double gsl_sf_legendre_P2(const double x) +{ + EVAL_RESULT(gsl_sf_legendre_P2_e(x, &result)); +} + +double gsl_sf_legendre_P3(const double x) +{ + EVAL_RESULT(gsl_sf_legendre_P3_e(x, &result)); +} + +double gsl_sf_legendre_Pl(const int l, const double x) +{ + EVAL_RESULT(gsl_sf_legendre_Pl_e(l, x, &result)); +} + +double gsl_sf_legendre_Plm(const int l, const int m, const double x) +{ + EVAL_RESULT(gsl_sf_legendre_Plm_e(l, m, x, &result)); +} + +double gsl_sf_legendre_sphPlm(const int l, const int m, const double x) +{ + EVAL_RESULT(gsl_sf_legendre_sphPlm_e(l, m, x, &result)); +} + diff --git a/software/gsl-1.15/specfunc/log.c b/software/gsl-1.15/specfunc/log.c new file mode 100644 index 000000000..bf83f0261 --- /dev/null +++ b/software/gsl-1.15/specfunc/log.c @@ -0,0 +1,266 @@ +/* specfunc/log.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* Chebyshev expansion for log(1 + x(t))/x(t) + * + * x(t) = (4t-1)/(2(4-t)) + * t(x) = (8x+1)/(2(x+2)) + * -1/2 < x < 1/2 + * -1 < t < 1 + */ +static double lopx_data[21] = { + 2.16647910664395270521272590407, + -0.28565398551049742084877469679, + 0.01517767255690553732382488171, + -0.00200215904941415466274422081, + 0.00019211375164056698287947962, + -0.00002553258886105542567601400, + 2.9004512660400621301999384544e-06, + -3.8873813517057343800270917900e-07, + 4.7743678729400456026672697926e-08, + -6.4501969776090319441714445454e-09, + 8.2751976628812389601561347296e-10, + -1.1260499376492049411710290413e-10, + 1.4844576692270934446023686322e-11, + -2.0328515972462118942821556033e-12, + 2.7291231220549214896095654769e-13, + -3.7581977830387938294437434651e-14, + 5.1107345870861673561462339876e-15, + -7.0722150011433276578323272272e-16, + 9.7089758328248469219003866867e-17, + -1.3492637457521938883731579510e-17, + 1.8657327910677296608121390705e-18 +}; +static cheb_series lopx_cs = { + lopx_data, + 20, + -1, 1, + 10 +}; + +/* Chebyshev expansion for (log(1 + x(t)) - x(t))/x(t)^2 + * + * x(t) = (4t-1)/(2(4-t)) + * t(x) = (8x+1)/(2(x+2)) + * -1/2 < x < 1/2 + * -1 < t < 1 + */ +static double lopxmx_data[20] = { + -1.12100231323744103373737274541, + 0.19553462773379386241549597019, + -0.01467470453808083971825344956, + 0.00166678250474365477643629067, + -0.00018543356147700369785746902, + 0.00002280154021771635036301071, + -2.8031253116633521699214134172e-06, + 3.5936568872522162983669541401e-07, + -4.6241857041062060284381167925e-08, + 6.0822637459403991012451054971e-09, + -8.0339824424815790302621320732e-10, + 1.0751718277499375044851551587e-10, + -1.4445310914224613448759230882e-11, + 1.9573912180610336168921438426e-12, + -2.6614436796793061741564104510e-13, + 3.6402634315269586532158344584e-14, + -4.9937495922755006545809120531e-15, + 6.8802890218846809524646902703e-16, + -9.5034129794804273611403251480e-17, + 1.3170135013050997157326965813e-17 +}; +static cheb_series lopxmx_cs = { + lopxmx_data, + 19, + -1, 1, + 9 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_log_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else { + result->val = log(x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_log_abs_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + DOMAIN_ERROR(result); + } + else { + result->val = log(fabs(x)); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +int +gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta) +{ + /* CHECK_POINTER(lnr) */ + /* CHECK_POINTER(theta) */ + + if(zr != 0.0 || zi != 0.0) { + const double ax = fabs(zr); + const double ay = fabs(zi); + const double min = GSL_MIN(ax, ay); + const double max = GSL_MAX(ax, ay); + lnr->val = log(max) + 0.5 * log(1.0 + (min/max)*(min/max)); + lnr->err = 2.0 * GSL_DBL_EPSILON * fabs(lnr->val); + theta->val = atan2(zi, zr); + theta->err = GSL_DBL_EPSILON * fabs(lnr->val); + return GSL_SUCCESS; + } + else { + DOMAIN_ERROR_2(lnr, theta); + } +} + + +int +gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(fabs(x) < GSL_ROOT6_DBL_EPSILON) { + const double c1 = -0.5; + const double c2 = 1.0/3.0; + const double c3 = -1.0/4.0; + const double c4 = 1.0/5.0; + const double c5 = -1.0/6.0; + const double c6 = 1.0/7.0; + const double c7 = -1.0/8.0; + const double c8 = 1.0/9.0; + const double c9 = -1.0/10.0; + const double t = c5 + x*(c6 + x*(c7 + x*(c8 + x*c9))); + result->val = x * (1.0 + x*(c1 + x*(c2 + x*(c3 + x*(c4 + x*t))))); + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(fabs(x) < 0.5) { + double t = 0.5*(8.0*x + 1.0)/(x+2.0); + gsl_sf_result c; + cheb_eval_e(&lopx_cs, t, &c); + result->val = x * c.val; + result->err = fabs(x * c.err); + return GSL_SUCCESS; + } + else { + result->val = log(1.0 + x); + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int +gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= -1.0) { + DOMAIN_ERROR(result); + } + else if(fabs(x) < GSL_ROOT5_DBL_EPSILON) { + const double c1 = -0.5; + const double c2 = 1.0/3.0; + const double c3 = -1.0/4.0; + const double c4 = 1.0/5.0; + const double c5 = -1.0/6.0; + const double c6 = 1.0/7.0; + const double c7 = -1.0/8.0; + const double c8 = 1.0/9.0; + const double c9 = -1.0/10.0; + const double t = c5 + x*(c6 + x*(c7 + x*(c8 + x*c9))); + result->val = x*x * (c1 + x*(c2 + x*(c3 + x*(c4 + x*t)))); + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(fabs(x) < 0.5) { + double t = 0.5*(8.0*x + 1.0)/(x+2.0); + gsl_sf_result c; + cheb_eval_e(&lopxmx_cs, t, &c); + result->val = x*x * c.val; + result->err = x*x * c.err; + return GSL_SUCCESS; + } + else { + const double lterm = log(1.0 + x); + result->val = lterm - x; + result->err = GSL_DBL_EPSILON * (fabs(lterm) + fabs(x)); + return GSL_SUCCESS; + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_log(const double x) +{ + EVAL_RESULT(gsl_sf_log_e(x, &result)); +} + +double gsl_sf_log_abs(const double x) +{ + EVAL_RESULT(gsl_sf_log_abs_e(x, &result)); +} + +double gsl_sf_log_1plusx(const double x) +{ + EVAL_RESULT(gsl_sf_log_1plusx_e(x, &result)); +} + +double gsl_sf_log_1plusx_mx(const double x) +{ + EVAL_RESULT(gsl_sf_log_1plusx_mx_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/mathieu_angfunc.c b/software/gsl-1.15/specfunc/mathieu_angfunc.c new file mode 100644 index 000000000..e3c450420 --- /dev/null +++ b/software/gsl-1.15/specfunc/mathieu_angfunc.c @@ -0,0 +1,343 @@ +/* specfunc/mathieu_angfunc.c + * + * Copyright (C) 2002 Lowell Johnson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Author: L. Johnson */ + +#include +#include +#include +#include +#include +#include + + +int gsl_sf_mathieu_ce(int order, double qq, double zz, gsl_sf_result *result) +{ + int even_odd, ii, status; + double coeff[GSL_SF_MATHIEU_COEFF], norm, fn, factor; + gsl_sf_result aa; + + + norm = 0.0; + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Handle the trivial case where q = 0. */ + if (qq == 0.0) + { + norm = 1.0; + if (order == 0) + norm = sqrt(2.0); + + fn = cos(order*zz)/norm; + + result->val = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; + } + + /* Use symmetry characteristics of the functions to handle cases with + negative order. */ + if (order < 0) + order *= -1; + + /* Compute the characteristic value. */ + status = gsl_sf_mathieu_a(order, qq, &aa); + if (status != GSL_SUCCESS) + { + return status; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_a_coeff(order, qq, aa.val, coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + fn = 0.0; + norm = coeff[0]*coeff[0]; + for (ii=0; iival = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; +} + + +int gsl_sf_mathieu_se(int order, double qq, double zz, gsl_sf_result *result) +{ + int even_odd, ii, status; + double coeff[GSL_SF_MATHIEU_COEFF], norm, fn, factor; + gsl_sf_result aa; + + + norm = 0.0; + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Handle the trivial cases where order = 0 and/or q = 0. */ + if (order == 0) + { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + + if (qq == 0.0) + { + norm = 1.0; + fn = sin(order*zz); + + result->val = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; + } + + /* Use symmetry characteristics of the functions to handle cases with + negative order. */ + if (order < 0) + order *= -1; + + /* Compute the characteristic value. */ + status = gsl_sf_mathieu_b(order, qq, &aa); + if (status != GSL_SUCCESS) + { + return status; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_b_coeff(order, qq, aa.val, coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + fn = 0.0; + for (ii=0; iival = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; +} + + +int gsl_sf_mathieu_ce_array(int nmin, int nmax, double qq, double zz, + gsl_sf_mathieu_workspace *work, + double result_array[]) +{ + int even_odd, order, ii, jj, status; + double coeff[GSL_SF_MATHIEU_COEFF], *aa = work->aa, norm; + + + /* Initialize the result array to zeroes. */ + for (ii=0; iisize < (unsigned int)nmax) + { + GSL_ERROR("Work space not large enough", GSL_EINVAL); + } + + if (nmin < 0 || nmax < nmin) + { + GSL_ERROR("domain error", GSL_EDOM); + } + + /* Compute all of the eigenvalues up to nmax. */ + gsl_sf_mathieu_a_array(0, nmax, qq, work, aa); + + for (ii=0, order=nmin; order<=nmax; ii++, order++) + { + norm = 0.0; + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Handle the trivial case where q = 0. */ + if (qq == 0.0) + { + norm = 1.0; + if (order == 0) + norm = sqrt(2.0); + + result_array[ii] = cos(order*zz)/norm; + + continue; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_a_coeff(order, qq, aa[order], coeff); + if (status != GSL_SUCCESS) + return status; + + if (even_odd == 0) + { + norm = coeff[0]*coeff[0]; + for (jj=0; jjbb, norm; + + + /* Initialize the result array to zeroes. */ + for (ii=0; iisize < (unsigned int)nmax) + { + GSL_ERROR("Work space not large enough", GSL_EINVAL); + } + + if (nmin < 0 || nmax < nmin) + { + GSL_ERROR("domain error", GSL_EDOM); + } + + /* Compute all of the eigenvalues up to nmax. */ + gsl_sf_mathieu_b_array(0, nmax, qq, work, bb); + + for (ii=0, order=nmin; order<=nmax; ii++, order++) + { + norm = 0.0; + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Handle the trivial case where q = 0. */ + if (qq == 0.0) + { + norm = 1.0; + result_array[ii] = sin(order*zz); + + continue; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_b_coeff(order, qq, bb[order], coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + for (jj=0; jj +#include +#include +#include +#include +#include +#include +#include + + +/* prototypes */ +static double solve_cubic(double c2, double c1, double c0); + + +static double ceer(int order, double qq, double aa, int nterms) +{ + + double term, term1; + int ii, n1; + + + if (order == 0) + term = 0.0; + else + { + term = 2.0*qq*qq/aa; + + if (order != 2) + { + n1 = order/2 - 1; + + for (ii=0; ii= 0) + { + double t1 = rr + sqrt(ww); + ss = fabs(t1)/t1*pow(fabs(t1), 1/3.); + t1 = rr - sqrt(ww); + tt = fabs(t1)/t1*pow(fabs(t1), 1/3.); + } + else + { + double theta = acos(rr/sqrt(-qq*qq*qq)); + ss = 2*sqrt(-qq)*cos((theta + 4*M_PI)/3.); + tt = 0.0; + } + + return (ss + tt - c2/3); +} + + +/* Compute an initial approximation for the characteristic value. */ +static double approx_c(int order, double qq) +{ + double approx; + double c0, c1, c2; + + + if (order < 0) + { + GSL_ERROR_VAL("Undefined order for Mathieu function", GSL_EINVAL, 0.0); + } + + switch (order) + { + case 0: + if (qq <= 4) + return (2 - sqrt(4 + 2*qq*qq)); /* Eqn. 31 */ + else + return asymptotic(order, qq); + break; + + case 1: + if (qq <= 4) + return (5 + 0.5*(qq - sqrt(5*qq*qq - 16*qq + 64))); /* Eqn. 32 */ + else + return asymptotic(order, qq); + break; + + case 2: + if (qq <= 3) + { + c2 = -8.0; /* Eqn. 33 */ + c1 = -48 - 3*qq*qq; + c0 = 20*qq*qq; + } + else + return asymptotic(order, qq); + break; + + case 3: + if (qq <= 6.25) + { + c2 = -qq - 8; /* Eqn. 34 */ + c1 = 16*qq - 128 - 2*qq*qq; + c0 = qq*qq*(qq + 8); + } + else + return asymptotic(order, qq); + break; + + default: + if (order < 70) + { + if (1.7*order > 2*sqrt(qq)) + { + /* Eqn. 30 */ + double n2 = (double)(order*order); + double n22 = (double)((n2 - 1)*(n2 - 1)); + double q2 = qq*qq; + double q4 = q2*q2; + approx = n2 + 0.5*q2/(n2 - 1); + approx += (5*n2 + 7)*q4/(32*n22*(n2 - 1)*(n2 - 4)); + approx += (9*n2*n2 + 58*n2 + 29)*q4*q2/ + (64*n22*n22*(n2 - 1)*(n2 - 4)*(n2 - 9)); + if (1.4*order < 2*sqrt(qq)) + { + approx += asymptotic(order, qq); + approx *= 0.5; + } + } + else + approx = asymptotic(order, qq); + + return approx; + } + else + return order*order; + } + + /* Solve the cubic x^3 + c2*x^2 + c1*x + c0 = 0 */ + approx = solve_cubic(c2, c1, c0); + + if ( approx < 0 && sqrt(qq) > 0.1*order ) + return asymptotic(order-1, qq); + else + return (order*order + fabs(approx)); +} + + +static double approx_s(int order, double qq) +{ + double approx; + double c0, c1, c2; + + + if (order < 1) + { + GSL_ERROR_VAL("Undefined order for Mathieu function", GSL_EINVAL, 0.0); + } + + switch (order) + { + case 1: + if (qq <= 4) + return (5 - 0.5*(qq + sqrt(5*qq*qq + 16*qq + 64))); /* Eqn. 35 */ + else + return asymptotic(order-1, qq); + break; + + case 2: + if (qq <= 5) + return (10 - sqrt(36 + qq*qq)); /* Eqn. 36 */ + else + return asymptotic(order-1, qq); + break; + + case 3: + if (qq <= 6.25) + { + c2 = qq - 8; /* Eqn. 37 */ + c1 = -128 - 16*qq - 2*qq*qq; + c0 = qq*qq*(8 - qq); + } + else + return asymptotic(order-1, qq); + break; + + default: + if (order < 70) + { + if (1.7*order > 2*sqrt(qq)) + { + /* Eqn. 30 */ + double n2 = (double)(order*order); + double n22 = (double)((n2 - 1)*(n2 - 1)); + double q2 = qq*qq; + double q4 = q2*q2; + approx = n2 + 0.5*q2/(n2 - 1); + approx += (5*n2 + 7)*q4/(32*n22*(n2 - 1)*(n2 - 4)); + approx += (9*n2*n2 + 58*n2 + 29)*q4*q2/ + (64*n22*n22*(n2 - 1)*(n2 - 4)*(n2 - 9)); + if (1.4*order < 2*sqrt(qq)) + { + approx += asymptotic(order-1, qq); + approx *= 0.5; + } + } + else + approx = asymptotic(order-1, qq); + + return approx; + } + else + return order*order; + } + + /* Solve the cubic x^3 + c2*x^2 + c1*x + c0 = 0 */ + approx = solve_cubic(c2, c1, c0); + + if ( approx < 0 && sqrt(qq) > 0.1*order ) + return asymptotic(order-1, qq); + else + return (order*order + fabs(approx)); +} + + +int gsl_sf_mathieu_a(int order, double qq, gsl_sf_result *result) +{ + int even_odd, nterms = 50, ii, counter = 0, maxcount = 1000; + int dir = 0; /* step direction for new search */ + double a1, a2, fa, fa1, dela, aa_orig, da = 0.025, aa; + double aa_approx; /* current approximation for solution */ + + + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* If the argument is 0, then the coefficient is simply the square of + the order. */ + if (qq == 0) + { + result->val = order*order; + result->err = 0.0; + return GSL_SUCCESS; + } + + /* Use symmetry characteristics of the functions to handle cases with + negative order and/or argument q. See Abramowitz & Stegun, 20.8.3. */ + if (order < 0) + order *= -1; + if (qq < 0.0) + { + if (even_odd == 0) + return gsl_sf_mathieu_a(order, -qq, result); + else + return gsl_sf_mathieu_b(order, -qq, result); + } + + /* Compute an initial approximation for the characteristic value. */ + aa_approx = approx_c(order, qq); + + /* Save the original approximation for later comparison. */ + aa_orig = aa = aa_approx; + + /* Loop as long as the final value is not near the approximate value + (with a max limit to avoid potential infinite loop). */ + while (counter < maxcount) + { + a1 = aa + 0.001; + ii = 0; + if (even_odd == 0) + fa1 = ceer(order, qq, a1, nterms); + else + fa1 = ceor(order, qq, a1, nterms); + + for (;;) + { + if (even_odd == 0) + fa = ceer(order, qq, aa, nterms); + else + fa = ceor(order, qq, aa, nterms); + + a2 = a1; + a1 = aa; + + if (fa == fa1) + { + result->err = GSL_DBL_EPSILON; + break; + } + aa -= (aa - a2)/(fa - fa1)*fa; + dela = fabs(aa - a2); + if (dela < GSL_DBL_EPSILON) + { + result->err = GSL_DBL_EPSILON; + break; + } + if (ii > 40) + { + result->err = dela; + break; + } + fa1 = fa; + ii++; + } + + /* If the solution found is not near the original approximation, + tweak the approximate value, and try again. */ + if (fabs(aa - aa_orig) > (3 + 0.01*order*fabs(aa_orig)) || + (order > 10 && fabs(aa - aa_orig) > 1.5*order)) + { + counter++; + if (counter == maxcount) + { + result->err = fabs(aa - aa_orig); + break; + } + if (aa > aa_orig) + { + if (dir == 1) + da /= 2; + dir = -1; + } + else + { + if (dir == -1) + da /= 2; + dir = 1; + } + aa_approx += dir*da*counter; + aa = aa_approx; + + continue; + } + else + break; + } + + result->val = aa; + + /* If we went through the maximum number of retries and still didn't + find the solution, let us know. */ + if (counter == maxcount) + { + GSL_ERROR("Wrong characteristic Mathieu value", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + + +int gsl_sf_mathieu_b(int order, double qq, gsl_sf_result *result) +{ + int even_odd, nterms = 50, ii, counter = 0, maxcount = 1000; + int dir = 0; /* step direction for new search */ + double a1, a2, fa, fa1, dela, aa_orig, da = 0.025, aa; + double aa_approx; /* current approximation for solution */ + + + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* The order cannot be 0. */ + if (order == 0) + { + GSL_ERROR("Characteristic value undefined for order 0", GSL_EFAILED); + } + + /* If the argument is 0, then the coefficient is simply the square of + the order. */ + if (qq == 0) + { + result->val = order*order; + result->err = 0.0; + return GSL_SUCCESS; + } + + /* Use symmetry characteristics of the functions to handle cases with + negative order and/or argument q. See Abramowitz & Stegun, 20.8.3. */ + if (order < 0) + order *= -1; + if (qq < 0.0) + { + if (even_odd == 0) + return gsl_sf_mathieu_b(order, -qq, result); + else + return gsl_sf_mathieu_a(order, -qq, result); + } + + /* Compute an initial approximation for the characteristic value. */ + aa_approx = approx_s(order, qq); + + /* Save the original approximation for later comparison. */ + aa_orig = aa = aa_approx; + + /* Loop as long as the final value is not near the approximate value + (with a max limit to avoid potential infinite loop). */ + while (counter < maxcount) + { + a1 = aa + 0.001; + ii = 0; + if (even_odd == 0) + fa1 = seer(order, qq, a1, nterms); + else + fa1 = seor(order, qq, a1, nterms); + + for (;;) + { + if (even_odd == 0) + fa = seer(order, qq, aa, nterms); + else + fa = seor(order, qq, aa, nterms); + + a2 = a1; + a1 = aa; + + if (fa == fa1) + { + result->err = GSL_DBL_EPSILON; + break; + } + aa -= (aa - a2)/(fa - fa1)*fa; + dela = fabs(aa - a2); + if (dela < 1e-18) + { + result->err = GSL_DBL_EPSILON; + break; + } + if (ii > 40) + { + result->err = dela; + break; + } + fa1 = fa; + ii++; + } + + /* If the solution found is not near the original approximation, + tweak the approximate value, and try again. */ + if (fabs(aa - aa_orig) > (3 + 0.01*order*fabs(aa_orig)) || + (order > 10 && fabs(aa - aa_orig) > 1.5*order)) + { + counter++; + if (counter == maxcount) + { + result->err = fabs(aa - aa_orig); + break; + } + if (aa > aa_orig) + { + if (dir == 1) + da /= 2; + dir = -1; + } + else + { + if (dir == -1) + da /= 2; + dir = 1; + } + aa_approx += dir*da*counter; + aa = aa_approx; + + continue; + } + else + break; + } + + result->val = aa; + + /* If we went through the maximum number of retries and still didn't + find the solution, let us know. */ + if (counter == maxcount) + { + GSL_ERROR("Wrong characteristic Mathieu value", GSL_EFAILED); + } + + return GSL_SUCCESS; +} + + +/* Eigenvalue solutions for characteristic values below. */ + + +/* figi.c converted from EISPACK Fortran FIGI.F. + * + * given a nonsymmetric tridiagonal matrix such that the products + * of corresponding pairs of off-diagonal elements are all + * non-negative, this subroutine reduces it to a symmetric + * tridiagonal matrix with the same eigenvalues. if, further, + * a zero product only occurs when both factors are zero, + * the reduced matrix is similar to the original matrix. + * + * on input + * + * n is the order of the matrix. + * + * t contains the input matrix. its subdiagonal is + * stored in the last n-1 positions of the first column, + * its diagonal in the n positions of the second column, + * and its superdiagonal in the first n-1 positions of + * the third column. t(1,1) and t(n,3) are arbitrary. + * + * on output + * + * t is unaltered. + * + * d contains the diagonal elements of the symmetric matrix. + * + * e contains the subdiagonal elements of the symmetric + * matrix in its last n-1 positions. e(1) is not set. + * + * e2 contains the squares of the corresponding elements of e. + * e2 may coincide with e if the squares are not needed. + * + * ierr is set to + * zero for normal return, + * n+i if t(i,1)*t(i-1,3) is negative, + * -(3*n+i) if t(i,1)*t(i-1,3) is zero with one factor + * non-zero. in this case, the eigenvectors of + * the symmetric matrix are not simply related + * to those of t and should not be sought. + * + * questions and comments should be directed to burton s. garbow, + * mathematics and computer science div, argonne national laboratory + * + * this version dated august 1983. + */ +static int figi(int nn, double *tt, double *dd, double *ee, + double *e2) +{ + int ii; + + for (ii=0; iieven_order, odd_order = work->odd_order, + extra_values = work->extra_values, ii, jj; + int status; + double *tt = work->tt, *dd = work->dd, *ee = work->ee, *e2 = work->e2, + *zz = work->zz, *aa = work->aa; + gsl_matrix_view mat, evec; + gsl_vector_view eval; + gsl_eigen_symmv_workspace *wmat = work->wmat; + + if (order_max > work->size || order_max <= order_min || order_min < 0) + { + GSL_ERROR ("invalid range [order_min,order_max]", GSL_EINVAL); + } + + /* Convert the nonsymmetric tridiagonal matrix to a symmetric tridiagonal + form. */ + + tt[0] = 0.0; + tt[1] = 0.0; + tt[2] = qq; + for (ii=1; iieval, 0, even_order); + evec = gsl_matrix_submatrix(work->evec, 0, 0, even_order, even_order); + gsl_eigen_symmv(&mat.matrix, &eval.vector, &evec.matrix, wmat); + gsl_eigen_symmv_sort(&eval.vector, &evec.matrix, GSL_EIGEN_SORT_VAL_ASC); + + for (ii=0; iieval, 0, odd_order); + evec = gsl_matrix_submatrix(work->evec, 0, 0, odd_order, odd_order); + gsl_eigen_symmv(&mat.matrix, &eval.vector, &evec.matrix, wmat); + gsl_eigen_symmv_sort(&eval.vector, &evec.matrix, GSL_EIGEN_SORT_VAL_ASC); + + for (ii=0; iieven_order-1, odd_order = work->odd_order, + extra_values = work->extra_values, ii, jj; + double *zz = work->zz, *bb = work->bb; + gsl_matrix_view mat, evec; + gsl_vector_view eval; + gsl_eigen_symmv_workspace *wmat = work->wmat; + + if (order_max > work->size || order_max <= order_min || order_min < 0) + { + GSL_ERROR ("invalid range [order_min,order_max]", GSL_EINVAL); + } + + /* Fill the period \pi matrix. */ + for (ii=0; iieval, 0, even_order); + evec = gsl_matrix_submatrix(work->evec, 0, 0, even_order, even_order); + gsl_eigen_symmv(&mat.matrix, &eval.vector, &evec.matrix, wmat); + gsl_eigen_symmv_sort(&eval.vector, &evec.matrix, GSL_EIGEN_SORT_VAL_ASC); + + bb[0] = 0.0; + for (ii=0; iieval, 0, odd_order); + evec = gsl_matrix_submatrix(work->evec, 0, 0, odd_order, odd_order); + gsl_eigen_symmv(&mat.matrix, &eval.vector, &evec.matrix, wmat); + gsl_eigen_symmv_sort(&eval.vector, &evec.matrix, GSL_EIGEN_SORT_VAL_ASC); + + for (ii=0; ii +#include +#include +#include + + +/***************************************************************************** + * backward_recurse + * + * Purpose: + ****************************************************************************/ +static void backward_recurse_c(double aa, double qq, double xx, double *ff, + double *gx, int even_odd, int ni) +{ + int ii, nn; + double g1; + + + g1 = *gx; + ff[ni] = xx; + + if (even_odd == 0) + { + for (ii=0; ii GSL_SF_MATHIEU_COEFF) + return GSL_FAILURE; + + /* Handle the trivial case where q = 0. */ + if (qq == 0.0) + { + for (ii=0; ii GSL_SF_MATHIEU_COEFF) + return GSL_FAILURE; + + /* Handle the trivial case where q = 0. */ + if (qq == 0.0) + { + for (ii=0; ii +#include +#include +#include +#include +#include + + +int gsl_sf_mathieu_Mc(int kind, int order, double qq, double zz, + gsl_sf_result *result) +{ + int even_odd, kk, mm, status; + double maxerr = 1e-14, amax, pi = M_PI, fn, factor; + double coeff[GSL_SF_MATHIEU_COEFF], fc; + double j1c, z2c, j1pc, z2pc; + double u1, u2; + gsl_sf_result aa; + + + /* Check for out of bounds parameters. */ + if (qq <= 0.0) + { + GSL_ERROR("q must be greater than zero", GSL_EINVAL); + } + if (kind < 1 || kind > 2) + { + GSL_ERROR("kind must be 1 or 2", GSL_EINVAL); + } + + mm = 0; + amax = 0.0; + fn = 0.0; + u1 = sqrt(qq)*exp(-1.0*zz); + u2 = sqrt(qq)*exp(zz); + + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Compute the characteristic value. */ + status = gsl_sf_mathieu_a(order, qq, &aa); + if (status != GSL_SUCCESS) + { + return status; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_a_coeff(order, qq, aa.val, coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + for (kk=0; kkval = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; +} + + +int gsl_sf_mathieu_Ms(int kind, int order, double qq, double zz, + gsl_sf_result *result) +{ + int even_odd, kk, mm, status; + double maxerr = 1e-14, amax, pi = M_PI, fn, factor; + double coeff[GSL_SF_MATHIEU_COEFF], fc; + double j1c, z2c, j1mc, z2mc, j1pc, z2pc; + double u1, u2; + gsl_sf_result aa; + + + /* Check for out of bounds parameters. */ + if (qq <= 0.0) + { + GSL_ERROR("q must be greater than zero", GSL_EINVAL); + } + if (kind < 1 || kind > 2) + { + GSL_ERROR("kind must be 1 or 2", GSL_EINVAL); + } + + mm = 0; + amax = 0.0; + fn = 0.0; + u1 = sqrt(qq)*exp(-1.0*zz); + u2 = sqrt(qq)*exp(zz); + + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Compute the characteristic value. */ + status = gsl_sf_mathieu_b(order, qq, &aa); + if (status != GSL_SUCCESS) + { + return status; + } + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_b_coeff(order, qq, aa.val, coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + for (kk=0; kkval = fn; + result->err = 2.0*GSL_DBL_EPSILON; + factor = fabs(fn); + if (factor > 1.0) + result->err *= factor; + + return GSL_SUCCESS; +} + + +int gsl_sf_mathieu_Mc_array(int kind, int nmin, int nmax, double qq, + double zz, gsl_sf_mathieu_workspace *work, + double result_array[]) +{ + int even_odd, order, ii, kk, mm, status; + double maxerr = 1e-14, amax, pi = M_PI, fn; + double coeff[GSL_SF_MATHIEU_COEFF], fc; + double j1c, z2c, j1pc, z2pc; + double u1, u2; + double *aa = work->aa; + + + /* Initialize the result array to zeroes. */ + for (ii=0; ii 2) + { + GSL_ERROR("kind must be 1 or 2", GSL_EINVAL); + } + + mm = 0; + amax = 0.0; + fn = 0.0; + u1 = sqrt(qq)*exp(-1.0*zz); + u2 = sqrt(qq)*exp(zz); + + /* Compute all eigenvalues up to nmax. */ + gsl_sf_mathieu_a_array(0, nmax, qq, work, aa); + + for (ii=0, order=nmin; order<=nmax; ii++, order++) + { + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_a_coeff(order, qq, aa[order], coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + for (kk=0; kkbb; + + + /* Initialize the result array to zeroes. */ + for (ii=0; ii 2) + { + GSL_ERROR("kind must be 1 or 2", GSL_EINVAL); + } + + mm = 0; + amax = 0.0; + fn = 0.0; + u1 = sqrt(qq)*exp(-1.0*zz); + u2 = sqrt(qq)*exp(zz); + + /* Compute all eigenvalues up to nmax. */ + gsl_sf_mathieu_b_array(0, nmax, qq, work, bb); + + for (ii=0, order=nmin; order<=nmax; ii++, order++) + { + even_odd = 0; + if (order % 2 != 0) + even_odd = 1; + + /* Compute the series coefficients. */ + status = gsl_sf_mathieu_b_coeff(order, qq, bb[order], coeff); + if (status != GSL_SUCCESS) + { + return status; + } + + if (even_odd == 0) + { + for (kk=0; kk +#include +#include +#include +#include + + +gsl_sf_mathieu_workspace *gsl_sf_mathieu_alloc(const size_t nn, + const double qq) +{ + gsl_sf_mathieu_workspace *workspace; + unsigned int even_order = nn/2 + 1, odd_order = (nn + 1)/2, + extra_values; + + /* Compute the maximum number of extra terms required for 10^-18 root + accuracy for a given value of q (contributed by Brian Gladman). */ + extra_values = (int)(2.1*pow(fabs(qq), 0.37)) + 9; + extra_values += 20; /* additional fudge */ + + if (nn + 1 == 0) + { + GSL_ERROR_NULL("matrix dimension must be positive integer", GSL_EINVAL); + } + + workspace = + (gsl_sf_mathieu_workspace *)malloc(sizeof(gsl_sf_mathieu_workspace)); + if (workspace == NULL) + { + GSL_ERROR_NULL("failed to allocate space for workspace", GSL_ENOMEM); + } + + /* Extend matrices to ensure accuracy. */ + even_order += extra_values; + odd_order += extra_values; + + workspace->size = nn; + workspace->even_order = even_order; + workspace->odd_order = odd_order; + workspace->extra_values = extra_values; + + /* Allocate space for the characteristic values. */ + workspace->aa = (double *)malloc((nn+1)*sizeof(double)); + if (workspace->aa == NULL) + { + free(workspace); + GSL_ERROR_NULL("Error allocating memory for characteristic a values", + GSL_ENOMEM); + } + + workspace->bb = (double *)malloc((nn+1)*sizeof(double)); + if (workspace->bb == NULL) + { + free(workspace->aa); + free(workspace); + GSL_ERROR_NULL("Error allocating memory for characteristic b values", + GSL_ENOMEM); + } + + /* Since even_order is always >= odd_order, dimension the arrays for + even_order. */ + + workspace->dd = (double *)malloc(even_order*sizeof(double)); + if (workspace->dd == NULL) + { + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for diagonal", GSL_ENOMEM); + } + + workspace->ee = (double *)malloc(even_order*sizeof(double)); + if (workspace->ee == NULL) + { + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for diagonal", GSL_ENOMEM); + } + + workspace->tt = (double *)malloc(3*even_order*sizeof(double)); + if (workspace->tt == NULL) + { + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for diagonal", GSL_ENOMEM); + } + + workspace->e2 = (double *)malloc(even_order*sizeof(double)); + if (workspace->e2 == NULL) + { + free(workspace->tt); + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for diagonal", GSL_ENOMEM); + } + + workspace->zz = (double *)malloc(even_order*even_order*sizeof(double)); + if (workspace->zz == NULL) + { + free(workspace->e2); + free(workspace->tt); + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for diagonal", GSL_ENOMEM); + } + + workspace->eval = gsl_vector_alloc(even_order); + + if (workspace->eval == NULL) + { + free(workspace->zz); + free(workspace->e2); + free(workspace->tt); + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for eval", GSL_ENOMEM); + } + + workspace->evec = gsl_matrix_alloc(even_order, even_order); + + if (workspace->evec == NULL) + { + gsl_vector_free (workspace->eval); + free(workspace->zz); + free(workspace->e2); + free(workspace->tt); + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for evec", GSL_ENOMEM); + } + + workspace->wmat = gsl_eigen_symmv_alloc(even_order); + + if (workspace->wmat == NULL) + { + gsl_matrix_free (workspace->evec); + gsl_vector_free (workspace->eval); + free(workspace->zz); + free(workspace->e2); + free(workspace->tt); + free(workspace->ee); + free(workspace->dd); + free(workspace->aa); + free(workspace->bb); + free(workspace); + GSL_ERROR_NULL("failed to allocate space for wmat", GSL_ENOMEM); + } + + return workspace; +} + + +void gsl_sf_mathieu_free(gsl_sf_mathieu_workspace *workspace) +{ + RETURN_IF_NULL (workspace); + gsl_vector_free(workspace->eval); + gsl_matrix_free(workspace->evec); + gsl_eigen_symmv_free(workspace->wmat); + free(workspace->aa); + free(workspace->bb); + free(workspace->dd); + free(workspace->ee); + free(workspace->tt); + free(workspace->e2); + free(workspace->zz); + free(workspace); +} diff --git a/software/gsl-1.15/specfunc/poch.c b/software/gsl-1.15/specfunc/poch.c new file mode 100644 index 000000000..75fdba6c7 --- /dev/null +++ b/software/gsl-1.15/specfunc/poch.c @@ -0,0 +1,465 @@ +/* specfunc/poch.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 2009 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +static const double bern[21] = { + 0.0 /* no element 0 */, + +0.833333333333333333333333333333333e-01, + -0.138888888888888888888888888888888e-02, + +0.330687830687830687830687830687830e-04, + -0.826719576719576719576719576719576e-06, + +0.208767569878680989792100903212014e-07, + -0.528419013868749318484768220217955e-09, + +0.133825365306846788328269809751291e-10, + -0.338968029632258286683019539124944e-12, + +0.858606205627784456413590545042562e-14, + -0.217486869855806187304151642386591e-15, + +0.550900282836022951520265260890225e-17, + -0.139544646858125233407076862640635e-18, + +0.353470703962946747169322997780379e-20, + -0.895351742703754685040261131811274e-22, + +0.226795245233768306031095073886816e-23, + -0.574472439520264523834847971943400e-24, + +0.145517247561486490186626486727132e-26, + -0.368599494066531017818178247990866e-28, + +0.933673425709504467203255515278562e-30, + -0.236502241570062993455963519636983e-31 +}; + + +/* ((a)_x - 1)/x in the "small x" region where + * cancellation must be controlled. + * + * Based on SLATEC DPOCH1(). + */ +/* +C When ABS(X) is so small that substantial cancellation will occur if +C the straightforward formula is used, we use an expansion due +C to Fields and discussed by Y. L. Luke, The Special Functions and Their +C Approximations, Vol. 1, Academic Press, 1969, page 34. +C +C The ratio POCH(A,X) = GAMMA(A+X)/GAMMA(A) is written by Luke as +C (A+(X-1)/2)**X * polynomial in (A+(X-1)/2)**(-2) . +C In order to maintain significance in POCH1, we write for positive a +C (A+(X-1)/2)**X = EXP(X*LOG(A+(X-1)/2)) = EXP(Q) +C = 1.0 + Q*EXPREL(Q) . +C Likewise the polynomial is written +C POLY = 1.0 + X*POLY1(A,X) . +C Thus, +C POCH1(A,X) = (POCH(A,X) - 1) / X +C = EXPREL(Q)*(Q/X + Q*POLY1(A,X)) + POLY1(A,X) +C +*/ +static +int +pochrel_smallx(const double a, const double x, gsl_sf_result * result) +{ + /* + SQTBIG = 1.0D0/SQRT(24.0D0*D1MACH(1)) + ALNEPS = LOG(D1MACH(3)) + */ + const double SQTBIG = 1.0/(2.0*M_SQRT2*M_SQRT3*GSL_SQRT_DBL_MIN); + const double ALNEPS = GSL_LOG_DBL_EPSILON - M_LN2; + + if(x == 0.0) { + return gsl_sf_psi_e(a, result); + } + else { + const double bp = ( (a < -0.5) ? 1.0-a-x : a ); + const int incr = ( (bp < 10.0) ? 11.0-bp : 0 ); + const double b = bp + incr; + double dpoch1; + gsl_sf_result dexprl; + int stat_dexprl; + int i; + + double var = b + 0.5*(x-1.0); + double alnvar = log(var); + double q = x*alnvar; + + double poly1 = 0.0; + + if(var < SQTBIG) { + const int nterms = (int)(-0.5*ALNEPS/alnvar + 1.0); + const double var2 = (1.0/var)/var; + const double rho = 0.5 * (x + 1.0); + double term = var2; + double gbern[24]; + int k, j; + + gbern[1] = 1.0; + gbern[2] = -rho/12.0; + poly1 = gbern[2] * term; + + if(nterms > 20) { + /* NTERMS IS TOO BIG, MAYBE D1MACH(3) IS BAD */ + /* nterms = 20; */ + result->val = 0.0; + result->err = 0.0; + GSL_ERROR ("error", GSL_ESANITY); + } + + for(k=2; k<=nterms; k++) { + double gbk = 0.0; + for(j=1; j<=k; j++) { + gbk += bern[k-j+1]*gbern[j]; + } + gbern[k+1] = -rho*gbk/k; + + term *= (2*k-2-x)*(2*k-1-x)*var2; + poly1 += gbern[k+1]*term; + } + } + + stat_dexprl = gsl_sf_expm1_e(q, &dexprl); + if(stat_dexprl != GSL_SUCCESS) { + result->val = 0.0; + result->err = 0.0; + return stat_dexprl; + } + dexprl.val = dexprl.val/q; + poly1 *= (x - 1.0); + dpoch1 = dexprl.val * (alnvar + q * poly1) + poly1; + + for(i=incr-1; i >= 0; i--) { + /* + C WE HAVE DPOCH1(B,X), BUT BP IS SMALL, SO WE USE BACKWARDS RECURSION + C TO OBTAIN DPOCH1(BP,X). + */ + double binv = 1.0/(bp+i); + dpoch1 = (dpoch1 - binv) / (1.0 + x*binv); + } + + if(bp == a) { + result->val = dpoch1; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(incr) + 1.0) * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* + C WE HAVE DPOCH1(BP,X), BUT A IS LT -0.5. WE THEREFORE USE A + C REFLECTION FORMULA TO OBTAIN DPOCH1(A,X). + */ + double sinpxx = sin(M_PI*x)/x; + double sinpx2 = sin(0.5*M_PI*x); + double t1 = sinpxx/tan(M_PI*b); + double t2 = 2.0*sinpx2*(sinpx2/x); + double trig = t1 - t2; + result->val = dpoch1 * (1.0 + x*trig) + trig; + result->err = (fabs(dpoch1*x) + 1.0) * GSL_DBL_EPSILON * (fabs(t1) + fabs(t2)); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(incr) + 1.0) * fabs(result->val); + return GSL_SUCCESS; + } + } +} + + +/* Assumes a>0 and a+x>0. + */ +static +int +lnpoch_pos(const double a, const double x, gsl_sf_result * result) +{ + double absx = fabs(x); + + if(absx > 0.1*a || absx*log(GSL_MAX_DBL(a,2.0)) > 0.1) { + if(a < GSL_SF_GAMMA_XMAX && a+x < GSL_SF_GAMMA_XMAX) { + /* If we can do it by calculating the gamma functions + * directly, then that will be more accurate than + * doing the subtraction of the logs. + */ + gsl_sf_result g1; + gsl_sf_result g2; + gsl_sf_gammainv_e(a, &g1); + gsl_sf_gammainv_e(a+x, &g2); + result->val = -log(g2.val/g1.val); + result->err = g1.err/fabs(g1.val) + g2.err/fabs(g2.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* Otherwise we must do the subtraction. + */ + gsl_sf_result lg1; + gsl_sf_result lg2; + int stat_1 = gsl_sf_lngamma_e(a, &lg1); + int stat_2 = gsl_sf_lngamma_e(a+x, &lg2); + result->val = lg2.val - lg1.val; + result->err = lg2.err + lg1.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_1, stat_2); + } + } + else if(absx < 0.1*a && a > 15.0) { + /* Be careful about the implied subtraction. + * Note that both a+x and and a must be + * large here since a is not small + * and x is not relatively large. + * So we calculate using Stirling for Log[Gamma(z)]. + * + * Log[Gamma(a+x)/Gamma(a)] = x(Log[a]-1) + (x+a-1/2)Log[1+x/a] + * + (1/(1+eps) - 1) / (12 a) + * - (1/(1+eps)^3 - 1) / (360 a^3) + * + (1/(1+eps)^5 - 1) / (1260 a^5) + * - (1/(1+eps)^7 - 1) / (1680 a^7) + * + ... + */ + const double eps = x/a; + const double den = 1.0 + eps; + const double d3 = den*den*den; + const double d5 = d3*den*den; + const double d7 = d5*den*den; + const double c1 = -eps/den; + const double c3 = -eps*(3.0+eps*(3.0+eps))/d3; + const double c5 = -eps*(5.0+eps*(10.0+eps*(10.0+eps*(5.0+eps))))/d5; + const double c7 = -eps*(7.0+eps*(21.0+eps*(35.0+eps*(35.0+eps*(21.0+eps*(7.0+eps))))))/d7; + const double p8 = gsl_sf_pow_int(1.0+eps,8); + const double c8 = 1.0/p8 - 1.0; /* these need not */ + const double c9 = 1.0/(p8*(1.0+eps)) - 1.0; /* be very accurate */ + const double a4 = a*a*a*a; + const double a6 = a4*a*a; + const double ser_1 = c1 + c3/(30.0*a*a) + c5/(105.0*a4) + c7/(140.0*a6); + const double ser_2 = c8/(99.0*a6*a*a) - 691.0/360360.0 * c9/(a6*a4); + const double ser = (ser_1 + ser_2)/ (12.0*a); + + double term1 = x * log(a/M_E); + double term2; + gsl_sf_result ln_1peps; + gsl_sf_log_1plusx_e(eps, &ln_1peps); /* log(1 + x/a) */ + term2 = (x + a - 0.5) * ln_1peps.val; + + result->val = term1 + term2 + ser; + result->err = GSL_DBL_EPSILON*fabs(term1); + result->err += fabs((x + a - 0.5)*ln_1peps.err); + result->err += fabs(ln_1peps.val) * GSL_DBL_EPSILON * (fabs(x) + fabs(a) + 0.5); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result poch_rel; + int stat_p = pochrel_smallx(a, x, &poch_rel); + double eps = x*poch_rel.val; + int stat_e = gsl_sf_log_1plusx_e(eps, result); + result->err = 2.0 * fabs(x * poch_rel.err / (1.0 + eps)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_e, stat_p); + } +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_lnpoch_e(const double a, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(a <= 0.0 || a+x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + return lnpoch_pos(a, x, result); + } +} + + +int +gsl_sf_lnpoch_sgn_e(const double a, const double x, + gsl_sf_result * result, double * sgn) +{ + if(x == 0.0) { + *sgn = 1.0; + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(a > 0.0 && a+x > 0.0) { + *sgn = 1.0; + return lnpoch_pos(a, x, result); + } + else if (a <= 0 && a == floor(a)) { + /* Special cases for infinite denominator Gamma(a) */ + if (a + x < 0 && x == floor(x)) { + /* Handle the case where both a and a+x are negative integers. */ + gsl_sf_result result_pos; + /* Use the reflection formula AMS6.1.17 + poch(-a,-x) = (-1)^x (a/(a+x)) 1/poch(a,x) */ + int stat = lnpoch_pos (-a, -x, &result_pos); + double f = log (a / (a + x)); + double s = (fmod(x, 2) == 0) ? 1 : -1; + result->val = f - result_pos.val; + result->err = result_pos.err + 2.0 * GSL_DBL_EPSILON * f; + *sgn = s; + return stat; + } else if (a + x == 0) { + /* Handle a+x = 0 i.e. Gamma(0)/Gamma(a) */ + /* poch (-a,a) == (-1)^a Gamma(a+1) */ + int stat = gsl_sf_lngamma_sgn_e (-a + 1, result, sgn); + double s = (fmod(-a, 2) == 0) ? 1 : -1; + *sgn *= s; + return stat; + } else { + /* Handle finite numerator, Gamma(a+x) for a+x != 0 or neg int */ + result->val = GSL_NEGINF; + result->err = 0.0; + *sgn = 1; + return GSL_SUCCESS; + } + } else if(a < 0.0 && a+x < 0.0) { + /* Reduce to positive case using reflection. + */ + double sin_1 = sin(M_PI * (1.0 - a)); + double sin_2 = sin(M_PI * (1.0 - a - x)); + if(sin_1 == 0.0 || sin_2 == 0.0) { + *sgn = 0.0; + DOMAIN_ERROR(result); + } + else { + gsl_sf_result lnp_pos; + int stat_pp = lnpoch_pos(1.0-a, -x, &lnp_pos); + double lnterm = log(fabs(sin_1/sin_2)); + result->val = lnterm - lnp_pos.val; + result->err = lnp_pos.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(1.0-a) + fabs(1.0-a-x)) * fabs(lnterm); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *sgn = GSL_SIGN(sin_1*sin_2); + return stat_pp; + } + } + else { + /* Evaluate gamma ratio directly. + */ + gsl_sf_result lg_apn; + gsl_sf_result lg_a; + double s_apn, s_a; + int stat_apn = gsl_sf_lngamma_sgn_e(a+x, &lg_apn, &s_apn); + int stat_a = gsl_sf_lngamma_sgn_e(a, &lg_a, &s_a); + if(stat_apn == GSL_SUCCESS && stat_a == GSL_SUCCESS) { + result->val = lg_apn.val - lg_a.val; + result->err = lg_apn.err + lg_a.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + *sgn = s_a * s_apn; + return GSL_SUCCESS; + } + else if(stat_apn == GSL_EDOM || stat_a == GSL_EDOM){ + *sgn = 0.0; + DOMAIN_ERROR(result); + } + else { + result->val = 0.0; + result->err = 0.0; + *sgn = 0.0; + return GSL_FAILURE; + } + } +} + + +int +gsl_sf_poch_e(const double a, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0) { + result->val = 1.0; + result->err = 0.0; + return GSL_SUCCESS; + } else { + gsl_sf_result lnpoch; + double sgn; + int stat_lnpoch = gsl_sf_lnpoch_sgn_e(a, x, &lnpoch, &sgn); + if (lnpoch.val == GSL_NEGINF) { + result->val = 0; + result->err = 0; + return stat_lnpoch; + } else { + int stat_exp = gsl_sf_exp_err_e(lnpoch.val, lnpoch.err, result); + result->val *= sgn; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_exp, stat_lnpoch); + } + } +} + + +int +gsl_sf_pochrel_e(const double a, const double x, gsl_sf_result * result) +{ + const double absx = fabs(x); + const double absa = fabs(a); + + /* CHECK_POINTER(result) */ + + if(absx > 0.1*absa || absx*log(GSL_MAX(absa,2.0)) > 0.1) { + gsl_sf_result lnpoch; + double sgn; + int stat_poch = gsl_sf_lnpoch_sgn_e(a, x, &lnpoch, &sgn); + if(lnpoch.val > GSL_LOG_DBL_MAX) { + OVERFLOW_ERROR(result); + } + else { + const double el = exp(lnpoch.val); + result->val = (sgn*el - 1.0)/x; + result->err = fabs(result->val) * (lnpoch.err + 2.0 * GSL_DBL_EPSILON); + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(sgn*el) + 1.0) / fabs(x); + return stat_poch; + } + } + else { + return pochrel_smallx(a, x, result); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_lnpoch(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_lnpoch_e(a, x, &result)); +} + +double gsl_sf_poch(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_poch_e(a, x, &result)); +} + +double gsl_sf_pochrel(const double a, const double x) +{ + EVAL_RESULT(gsl_sf_pochrel_e(a, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/pow_int.c b/software/gsl-1.15/specfunc/pow_int.c new file mode 100644 index 000000000..a81d8ebc9 --- /dev/null +++ b/software/gsl-1.15/specfunc/pow_int.c @@ -0,0 +1,74 @@ +/* specfunc/pow_int.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions w/ Error handling *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_pow_int_e(double x, int n, gsl_sf_result * result) +{ + double value = 1.0; + int count = 0; + + /* CHECK_POINTER(result) */ + + + if(n < 0) { + n = -n; + + if(x == 0.0) { + double u = 1.0 / x; + result->val = (n % 2) ? u : (u * u) ; /* correct sign of infinity */ + result->err = GSL_POSINF; + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + + x = 1.0/x; + } + + /* repeated squaring method + * returns 0.0^0 = 1.0, so continuous in x + */ + do { + if(GSL_IS_ODD(n)) value *= x; + n >>= 1; + x *= x; + ++count; + } while (n); + + result->val = value; + result->err = 2.0 * GSL_DBL_EPSILON * (count + 1.0) * fabs(value); + + return GSL_SUCCESS; +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_pow_int(const double x, const int n) +{ + EVAL_RESULT(gsl_sf_pow_int_e(x, n, &result)); +} diff --git a/software/gsl-1.15/specfunc/psi.c b/software/gsl-1.15/specfunc/psi.c new file mode 100644 index 000000000..546ec7736 --- /dev/null +++ b/software/gsl-1.15/specfunc/psi.c @@ -0,0 +1,866 @@ +/* specfunc/psi.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + + +/* Chebyshev fit for f(y) = Re(Psi(1+Iy)) + M_EULER - y^2/(1+y^2) - y^2/(2(4+y^2)) + * 1 < y < 10 + * ==> + * y(x) = (9x + 11)/2, -1 < x < 1 + * x(y) = (2y - 11)/9 + * + * g(x) := f(y(x)) + */ +static double r1py_data[] = { + 1.59888328244976954803168395603, + 0.67905625353213463845115658455, + -0.068485802980122530009506482524, + -0.005788184183095866792008831182, + 0.008511258167108615980419855648, + -0.004042656134699693434334556409, + 0.001352328406159402601778462956, + -0.000311646563930660566674525382, + 0.000018507563785249135437219139, + 0.000028348705427529850296492146, + -0.000019487536014574535567541960, + 8.0709788710834469408621587335e-06, + -2.2983564321340518037060346561e-06, + 3.0506629599604749843855962658e-07, + 1.3042238632418364610774284846e-07, + -1.2308657181048950589464690208e-07, + 5.7710855710682427240667414345e-08, + -1.8275559342450963966092636354e-08, + 3.1020471300626589420759518930e-09, + 6.8989327480593812470039430640e-10, + -8.7182290258923059852334818997e-10, + 4.4069147710243611798213548777e-10, + -1.4727311099198535963467200277e-10, + 2.7589682523262644748825844248e-11, + 4.1871826756975856411554363568e-12, + -6.5673460487260087541400767340e-12, + 3.4487900886723214020103638000e-12, + -1.1807251417448690607973794078e-12, + 2.3798314343969589258709315574e-13, + 2.1663630410818831824259465821e-15 +}; +static cheb_series r1py_cs = { + r1py_data, + 29, + -1,1, + 18 +}; + + +/* Chebyshev fits from SLATEC code for psi(x) + + Series for PSI on the interval 0. to 1.00000D+00 + with weighted error 2.03E-17 + log weighted error 16.69 + significant figures required 16.39 + decimal places required 17.37 + + Series for APSI on the interval 0. to 2.50000D-01 + with weighted error 5.54E-17 + log weighted error 16.26 + significant figures required 14.42 + decimal places required 16.86 + +*/ + +static double psics_data[23] = { + -.038057080835217922, + .491415393029387130, + -.056815747821244730, + .008357821225914313, + -.001333232857994342, + .000220313287069308, + -.000037040238178456, + .000006283793654854, + -.000001071263908506, + .000000183128394654, + -.000000031353509361, + .000000005372808776, + -.000000000921168141, + .000000000157981265, + -.000000000027098646, + .000000000004648722, + -.000000000000797527, + .000000000000136827, + -.000000000000023475, + .000000000000004027, + -.000000000000000691, + .000000000000000118, + -.000000000000000020 +}; +static cheb_series psi_cs = { + psics_data, + 22, + -1, 1, + 17 +}; + +static double apsics_data[16] = { + -.0204749044678185, + -.0101801271534859, + .0000559718725387, + -.0000012917176570, + .0000000572858606, + -.0000000038213539, + .0000000003397434, + -.0000000000374838, + .0000000000048990, + -.0000000000007344, + .0000000000001233, + -.0000000000000228, + .0000000000000045, + -.0000000000000009, + .0000000000000002, + -.0000000000000000 +}; +static cheb_series apsi_cs = { + apsics_data, + 15, + -1, 1, + 9 +}; + +#define PSI_TABLE_NMAX 100 +static double psi_table[PSI_TABLE_NMAX+1] = { + 0.0, /* Infinity */ /* psi(0) */ + -M_EULER, /* psi(1) */ + 0.42278433509846713939348790992, /* ... */ + 0.92278433509846713939348790992, + 1.25611766843180047272682124325, + 1.50611766843180047272682124325, + 1.70611766843180047272682124325, + 1.87278433509846713939348790992, + 2.01564147795560999653634505277, + 2.14064147795560999653634505277, + 2.25175258906672110764745616389, + 2.35175258906672110764745616389, + 2.44266167997581201673836525479, + 2.52599501330914535007169858813, + 2.60291809023222227314862166505, + 2.67434666166079370172005023648, + 2.74101332832746036838671690315, + 2.80351332832746036838671690315, + 2.86233685773922507426906984432, + 2.91789241329478062982462539988, + 2.97052399224214905087725697883, + 3.02052399224214905087725697883, + 3.06814303986119666992487602645, + 3.11359758531574212447033057190, + 3.15707584618530734186163491973, + 3.1987425128519740085283015864, + 3.2387425128519740085283015864, + 3.2772040513135124700667631249, + 3.3142410883505495071038001619, + 3.3499553740648352213895144476, + 3.3844381326855248765619282407, + 3.4177714660188582098952615740, + 3.4500295305349872421533260902, + 3.4812795305349872421533260902, + 3.5115825608380175451836291205, + 3.5409943255438998981248055911, + 3.5695657541153284695533770196, + 3.5973435318931062473311547974, + 3.6243705589201332743581818244, + 3.6506863483938174848844976139, + 3.6763273740348431259101386396, + 3.7013273740348431259101386396, + 3.7257176179372821503003825420, + 3.7495271417468059598241920658, + 3.7727829557002943319172153216, + 3.7955102284275670591899425943, + 3.8177324506497892814121648166, + 3.8394715810845718901078169905, + 3.8607481768292527411716467777, + 3.8815815101625860745049801110, + 3.9019896734278921969539597029, + 3.9219896734278921969539597029, + 3.9415975165651470989147440166, + 3.9608282857959163296839747858, + 3.9796962103242182164764276160, + 3.9982147288427367349949461345, + 4.0163965470245549168131279527, + 4.0342536898816977739559850956, + 4.0517975495308205809735289552, + 4.0690389288411654085597358518, + 4.0859880813835382899156680552, + 4.1026547480502049565823347218, + 4.1190481906731557762544658694, + 4.1351772229312202923834981274, + 4.1510502388042361653993711433, + 4.1666752388042361653993711433, + 4.1820598541888515500147557587, + 4.1972113693403667015299072739, + 4.2121367424746950597388624977, + 4.2268426248276362362094507330, + 4.2413353784508246420065521823, + 4.2556210927365389277208378966, + 4.2697055997787924488475984600, + 4.2835944886676813377364873489, + 4.2972931188046676391063503626, + 4.3108066323181811526198638761, + 4.3241399656515144859531972094, + 4.3372978603883565912163551041, + 4.3502848733753695782293421171, + 4.3631053861958823987421626300, + 4.3757636140439836645649474401, + 4.3882636140439836645649474401, + 4.4006092930563293435772931191, + 4.4128044150075488557724150703, + 4.4248526077786331931218126607, + 4.4367573696833950978837174226, + 4.4485220755657480390601880108, + 4.4601499825424922251066996387, + 4.4716442354160554434975042364, + 4.4830078717796918071338678728, + 4.4942438268358715824147667492, + 4.5053549379469826935258778603, + 4.5163439489359936825368668713, + 4.5272135141533849868846929582, + 4.5379662023254279976373811303, + 4.5486045001977684231692960239, + 4.5591308159872421073798223397, + 4.5695474826539087740464890064, + 4.5798567610044242379640147796, + 4.5900608426370772991885045755, + 4.6001618527380874001986055856 +}; + + +#define PSI_1_TABLE_NMAX 100 +static double psi_1_table[PSI_1_TABLE_NMAX+1] = { + 0.0, /* Infinity */ /* psi(1,0) */ + M_PI*M_PI/6.0, /* psi(1,1) */ + 0.644934066848226436472415, /* ... */ + 0.394934066848226436472415, + 0.2838229557371153253613041, + 0.2213229557371153253613041, + 0.1813229557371153253613041, + 0.1535451779593375475835263, + 0.1331370146940314251345467, + 0.1175120146940314251345467, + 0.1051663356816857461222010, + 0.0951663356816857461222010, + 0.0869018728717683907503002, + 0.0799574284273239463058557, + 0.0740402686640103368384001, + 0.0689382278476838062261552, + 0.0644937834032393617817108, + 0.0605875334032393617817108, + 0.0571273257907826143768665, + 0.0540409060376961946237801, + 0.0512708229352031198315363, + 0.0487708229352031198315363, + 0.0465032492390579951149830, + 0.0444371335365786562720078, + 0.0425467743683366902984728, + 0.0408106632572255791873617, + 0.0392106632572255791873617, + 0.0377313733163971768204978, + 0.0363596312039143235969038, + 0.0350841209998326909438426, + 0.0338950603577399442137594, + 0.0327839492466288331026483, + 0.0317433665203020901265817, + 0.03076680402030209012658168, + 0.02984853037475571730748159, + 0.02898347847164153045627052, + 0.02816715194102928555831133, + 0.02739554700275768062003973, + 0.02666508681283803124093089, + 0.02597256603721476254286995, + 0.02531510384129102815759710, + 0.02469010384129102815759710, + 0.02409521984367056414807896, + 0.02352832641963428296894063, + 0.02298749353699501850166102, + 0.02247096461137518379091722, + 0.02197713745088135663042339, + 0.02150454765882086513703965, + 0.02105185413233829383780923, + 0.02061782635456051606003145, + 0.02020133322669712580597065, + 0.01980133322669712580597065, + 0.01941686571420193164987683, + 0.01904704322899483105816086, + 0.01869104465298913508094477, + 0.01834810912486842177504628, + 0.01801753061247172756017024, + 0.01769865306145131939690494, + 0.01739086605006319997554452, + 0.01709360088954001329302371, + 0.01680632711763538818529605, + 0.01652854933985761040751827, + 0.01625980437882562975715546, + 0.01599965869724394401313881, + 0.01574770606433893015574400, + 0.01550356543933893015574400, + 0.01526687904880638577704578, + 0.01503731063741979257227076, + 0.01481454387422086185273411, + 0.01459828089844231513993134, + 0.01438824099085987447620523, + 0.01418415935820681325171544, + 0.01398578601958352422176106, + 0.01379288478501562298719316, + 0.01360523231738567365335942, + 0.01342261726990576130858221, + 0.01324483949212798353080444, + 0.01307170929822216635628920, + 0.01290304679189732236910755, + 0.01273868124291638877278934, + 0.01257845051066194236996928, + 0.01242220051066194236996928, + 0.01226978472038606978956995, + 0.01212106372098095378719041, + 0.01197590477193174490346273, + 0.01183418141592267460867815, + 0.01169577311142440471248438, + 0.01156056489076458859566448, + 0.01142844704164317229232189, + 0.01129931481023821361463594, + 0.01117306812421372175754719, + 0.01104961133409026496742374, + 0.01092885297157366069257770, + 0.01081070552355853781923177, + 0.01069508522063334415522437, + 0.01058191183901270133041676, + 0.01047110851491297833872701, + 0.01036260157046853389428257, + 0.01025632035036012704977199, /* ... */ + 0.01015219706839427948625679, /* psi(1,99) */ + 0.01005016666333357139524567 /* psi(1,100) */ +}; + + +/* digamma for x both positive and negative; we do both + * cases here because of the way we use even/odd parts + * of the function + */ +static int +psi_x(const double x, gsl_sf_result * result) +{ + const double y = fabs(x); + + if(x == 0.0 || x == -1.0 || x == -2.0) { + DOMAIN_ERROR(result); + } + else if(y >= 2.0) { + const double t = 8.0/(y*y)-1.0; + gsl_sf_result result_c; + cheb_eval_e(&apsi_cs, t, &result_c); + if(x < 0.0) { + const double s = sin(M_PI*x); + const double c = cos(M_PI*x); + if(fabs(s) < 2.0*GSL_SQRT_DBL_MIN) { + DOMAIN_ERROR(result); + } + else { + result->val = log(y) - 0.5/x + result_c.val - M_PI * c/s; + result->err = M_PI*fabs(x)*GSL_DBL_EPSILON/(s*s); + result->err += result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + } + else { + result->val = log(y) - 0.5/x + result_c.val; + result->err = result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + } + else { /* -2 < x < 2 */ + gsl_sf_result result_c; + + if(x < -1.0) { /* x = -2 + v */ + const double v = x + 2.0; + const double t1 = 1.0/x; + const double t2 = 1.0/(x+1.0); + const double t3 = 1.0/v; + cheb_eval_e(&psi_cs, 2.0*v-1.0, &result_c); + + result->val = -(t1 + t2 + t3) + result_c.val; + result->err = GSL_DBL_EPSILON * (fabs(t1) + fabs(x/(t2*t2)) + fabs(x/(t3*t3))); + result->err += result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 0.0) { /* x = -1 + v */ + const double v = x + 1.0; + const double t1 = 1.0/x; + const double t2 = 1.0/v; + cheb_eval_e(&psi_cs, 2.0*v-1.0, &result_c); + + result->val = -(t1 + t2) + result_c.val; + result->err = GSL_DBL_EPSILON * (fabs(t1) + fabs(x/(t2*t2))); + result->err += result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < 1.0) { /* x = v */ + const double t1 = 1.0/x; + cheb_eval_e(&psi_cs, 2.0*x-1.0, &result_c); + + result->val = -t1 + result_c.val; + result->err = GSL_DBL_EPSILON * t1; + result->err += result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { /* x = 1 + v */ + const double v = x - 1.0; + return cheb_eval_e(&psi_cs, 2.0*v-1.0, result); + } + } +} + + +/* psi(z) for large |z| in the right half-plane; [Abramowitz + Stegun, 6.3.18] */ +static +gsl_complex +psi_complex_asymp(gsl_complex z) +{ + /* coefficients in the asymptotic expansion for large z; + * let w = z^(-2) and write the expression in the form + * + * ln(z) - 1/(2z) - 1/12 w (1 + c1 w + c2 w + c3 w + ... ) + */ + static const double c1 = -0.1; + static const double c2 = 1.0/21.0; + static const double c3 = -0.05; + + gsl_complex zi = gsl_complex_inverse(z); + gsl_complex w = gsl_complex_mul(zi, zi); + gsl_complex cs; + + /* Horner method evaluation of term in parentheses */ + gsl_complex sum; + sum = gsl_complex_mul_real(w, c3/c2); + sum = gsl_complex_add_real(sum, 1.0); + sum = gsl_complex_mul_real(sum, c2/c1); + sum = gsl_complex_mul(sum, w); + sum = gsl_complex_add_real(sum, 1.0); + sum = gsl_complex_mul_real(sum, c1); + sum = gsl_complex_mul(sum, w); + sum = gsl_complex_add_real(sum, 1.0); + + /* correction added to log(z) */ + cs = gsl_complex_mul(sum, w); + cs = gsl_complex_mul_real(cs, -1.0/12.0); + cs = gsl_complex_add(cs, gsl_complex_mul_real(zi, -0.5)); + + return gsl_complex_add(gsl_complex_log(z), cs); +} + + + +/* psi(z) for complex z in the right half-plane */ +static int +psi_complex_rhp( + gsl_complex z, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ) +{ + int n_recurse = 0; + int i; + gsl_complex a; + + if(GSL_REAL(z) == 0.0 && GSL_IMAG(z) == 0.0) + { + result_re->val = 0.0; + result_im->val = 0.0; + result_re->err = 0.0; + result_im->err = 0.0; + return GSL_EDOM; + } + + /* compute the number of recurrences to apply */ + if(GSL_REAL(z) < 20.0 && fabs(GSL_IMAG(z)) < 20.0) + { + const double sp = sqrt(20.0 + GSL_IMAG(z)); + const double sn = sqrt(20.0 - GSL_IMAG(z)); + const double rhs = sp*sn - GSL_REAL(z); + if(rhs > 0.0) n_recurse = ceil(rhs); + } + + /* compute asymptotic at the large value z + n_recurse */ + a = psi_complex_asymp(gsl_complex_add_real(z, n_recurse)); + + result_re->err = 2.0 * GSL_DBL_EPSILON * fabs(GSL_REAL(a)); + result_im->err = 2.0 * GSL_DBL_EPSILON * fabs(GSL_IMAG(a)); + + /* descend recursively, if necessary */ + for(i = n_recurse; i >= 1; --i) + { + gsl_complex zn = gsl_complex_add_real(z, i - 1.0); + gsl_complex zn_inverse = gsl_complex_inverse(zn); + a = gsl_complex_sub(a, zn_inverse); + + /* accumulate the error, to catch cancellations */ + result_re->err += 2.0 * GSL_DBL_EPSILON * fabs(GSL_REAL(zn_inverse)); + result_im->err += 2.0 * GSL_DBL_EPSILON * fabs(GSL_IMAG(zn_inverse)); + } + + result_re->val = GSL_REAL(a); + result_im->val = GSL_IMAG(a); + + result_re->err += 2.0 * GSL_DBL_EPSILON * fabs(result_re->val); + result_im->err += 2.0 * GSL_DBL_EPSILON * fabs(result_im->val); + + return GSL_SUCCESS; +} + + + +/* generic polygamma; assumes n >= 0 and x > 0 + */ +static int +psi_n_xg0(const int n, const double x, gsl_sf_result * result) +{ + if(n == 0) { + return gsl_sf_psi_e(x, result); + } + else { + /* Abramowitz + Stegun 6.4.10 */ + gsl_sf_result ln_nf; + gsl_sf_result hzeta; + int stat_hz = gsl_sf_hzeta_e(n+1.0, x, &hzeta); + int stat_nf = gsl_sf_lnfact_e((unsigned int) n, &ln_nf); + int stat_e = gsl_sf_exp_mult_err_e(ln_nf.val, ln_nf.err, + hzeta.val, hzeta.err, + result); + if(GSL_IS_EVEN(n)) result->val = -result->val; + return GSL_ERROR_SELECT_3(stat_e, stat_nf, stat_hz); + } +} + + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_psi_int_e(const int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n <= 0) { + DOMAIN_ERROR(result); + } + else if(n <= PSI_TABLE_NMAX) { + result->val = psi_table[n]; + result->err = GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* Abramowitz+Stegun 6.3.18 */ + const double c2 = -1.0/12.0; + const double c3 = 1.0/120.0; + const double c4 = -1.0/252.0; + const double c5 = 1.0/240.0; + const double ni2 = (1.0/n)*(1.0/n); + const double ser = ni2 * (c2 + ni2 * (c3 + ni2 * (c4 + ni2*c5))); + result->val = log(n) - 0.5/n + ser; + result->err = GSL_DBL_EPSILON * (fabs(log(n)) + fabs(0.5/n) + fabs(ser)); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_psi_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + return psi_x(x, result); +} + + +int +gsl_sf_psi_1piy_e(const double y, gsl_sf_result * result) +{ + const double ay = fabs(y); + + /* CHECK_POINTER(result) */ + + if(ay > 1000.0) { + /* [Abramowitz+Stegun, 6.3.19] */ + const double yi2 = 1.0/(ay*ay); + const double lny = log(ay); + const double sum = yi2 * (1.0/12.0 + 1.0/120.0 * yi2 + 1.0/252.0 * yi2*yi2); + result->val = lny + sum; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(lny) + fabs(sum)); + return GSL_SUCCESS; + } + else if(ay > 10.0) { + /* [Abramowitz+Stegun, 6.3.19] */ + const double yi2 = 1.0/(ay*ay); + const double lny = log(ay); + const double sum = yi2 * (1.0/12.0 + + yi2 * (1.0/120.0 + + yi2 * (1.0/252.0 + + yi2 * (1.0/240.0 + + yi2 * (1.0/132.0 + 691.0/32760.0 * yi2))))); + result->val = lny + sum; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(lny) + fabs(sum)); + return GSL_SUCCESS; + } + else if(ay > 1.0){ + const double y2 = ay*ay; + const double x = (2.0*ay - 11.0)/9.0; + const double v = y2*(1.0/(1.0+y2) + 0.5/(4.0+y2)); + gsl_sf_result result_c; + cheb_eval_e(&r1py_cs, x, &result_c); + result->val = result_c.val - M_EULER + v; + result->err = result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * (fabs(v) + M_EULER + fabs(result_c.val)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + result->err *= 5.0; /* FIXME: losing a digit somewhere... maybe at x=... ? */ + return GSL_SUCCESS; + } + else { + /* [Abramowitz+Stegun, 6.3.17] + * + * -M_EULER + y^2 Sum[1/n 1/(n^2 + y^2), {n,1,M}] + * + Sum[1/n^3, {n,M+1,Infinity}] + * - y^2 Sum[1/n^5, {n,M+1,Infinity}] + * + y^4 Sum[1/n^7, {n,M+1,Infinity}] + * - y^6 Sum[1/n^9, {n,M+1,Infinity}] + * + O(y^8) + * + * We take M=50 for at least 15 digit precision. + */ + const int M = 50; + const double y2 = y*y; + const double c0 = 0.00019603999466879846570; + const double c2 = 3.8426659205114376860e-08; + const double c4 = 1.0041592839497643554e-11; + const double c6 = 2.9516743763500191289e-15; + const double p = c0 + y2 *(-c2 + y2*(c4 - y2*c6)); + double sum = 0.0; + double v; + + int n; + for(n=1; n<=M; n++) { + sum += 1.0/(n * (n*n + y*y)); + } + + v = y2 * (sum + p); + result->val = -M_EULER + v; + result->err = GSL_DBL_EPSILON * (M_EULER + fabs(v)); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_psi_1_int_e(const int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + if(n <= 0) { + DOMAIN_ERROR(result); + } + else if(n <= PSI_1_TABLE_NMAX) { + result->val = psi_1_table[n]; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else { + /* Abramowitz+Stegun 6.4.12 + * double-precision for n > 100 + */ + const double c0 = -1.0/30.0; + const double c1 = 1.0/42.0; + const double c2 = -1.0/30.0; + const double ni2 = (1.0/n)*(1.0/n); + const double ser = ni2*ni2 * (c0 + ni2*(c1 + c2*ni2)); + result->val = (1.0 + 0.5/n + 1.0/(6.0*n*n) + ser) / n; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } +} + + +int gsl_sf_psi_1_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0 || x == -1.0 || x == -2.0) { + DOMAIN_ERROR(result); + } + else if(x > 0.0) + { + return psi_n_xg0(1, x, result); + } + else if(x > -5.0) + { + /* Abramowitz + Stegun 6.4.6 */ + int M = -floor(x); + double fx = x + M; + double sum = 0.0; + int m; + + if(fx == 0.0) + DOMAIN_ERROR(result); + + for(m = 0; m < M; ++m) + sum += 1.0/((x+m)*(x+m)); + + { + int stat_psi = psi_n_xg0(1, fx, result); + result->val += sum; + result->err += M * GSL_DBL_EPSILON * sum; + return stat_psi; + } + } + else + { + /* Abramowitz + Stegun 6.4.7 */ + const double sin_px = sin(M_PI * x); + const double d = M_PI*M_PI/(sin_px*sin_px); + gsl_sf_result r; + int stat_psi = psi_n_xg0(1, 1.0-x, &r); + result->val = d - r.val; + result->err = r.err + 2.0*GSL_DBL_EPSILON*d; + return stat_psi; + } +} + + +int gsl_sf_psi_n_e(const int n, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n == 0) + { + return gsl_sf_psi_e(x, result); + } + else if(n == 1) + { + return gsl_sf_psi_1_e(x, result); + } + else if(n < 0 || x <= 0.0) { + DOMAIN_ERROR(result); + } + else { + gsl_sf_result ln_nf; + gsl_sf_result hzeta; + int stat_hz = gsl_sf_hzeta_e(n+1.0, x, &hzeta); + int stat_nf = gsl_sf_lnfact_e((unsigned int) n, &ln_nf); + int stat_e = gsl_sf_exp_mult_err_e(ln_nf.val, ln_nf.err, + hzeta.val, hzeta.err, + result); + if(GSL_IS_EVEN(n)) result->val = -result->val; + return GSL_ERROR_SELECT_3(stat_e, stat_nf, stat_hz); + } +} + + +int +gsl_sf_complex_psi_e( + const double x, + const double y, + gsl_sf_result * result_re, + gsl_sf_result * result_im + ) +{ + if(x >= 0.0) + { + gsl_complex z = gsl_complex_rect(x, y); + return psi_complex_rhp(z, result_re, result_im); + } + else + { + /* reflection formula [Abramowitz+Stegun, 6.3.7] */ + gsl_complex z = gsl_complex_rect(x, y); + gsl_complex omz = gsl_complex_rect(1.0 - x, -y); + gsl_complex zpi = gsl_complex_mul_real(z, M_PI); + gsl_complex cotzpi = gsl_complex_cot(zpi); + int ret_val = psi_complex_rhp(omz, result_re, result_im); + + if(GSL_IS_REAL(GSL_REAL(cotzpi)) && GSL_IS_REAL(GSL_IMAG(cotzpi))) + { + result_re->val -= M_PI * GSL_REAL(cotzpi); + result_im->val -= M_PI * GSL_IMAG(cotzpi); + return ret_val; + } + else + { + GSL_ERROR("singularity", GSL_EDOM); + } + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_psi_int(const int n) +{ + EVAL_RESULT(gsl_sf_psi_int_e(n, &result)); +} + +double gsl_sf_psi(const double x) +{ + EVAL_RESULT(gsl_sf_psi_e(x, &result)); +} + +double gsl_sf_psi_1piy(const double x) +{ + EVAL_RESULT(gsl_sf_psi_1piy_e(x, &result)); +} + +double gsl_sf_psi_1_int(const int n) +{ + EVAL_RESULT(gsl_sf_psi_1_int_e(n, &result)); +} + +double gsl_sf_psi_1(const double x) +{ + EVAL_RESULT(gsl_sf_psi_1_e(x, &result)); +} + +double gsl_sf_psi_n(const int n, const double x) +{ + EVAL_RESULT(gsl_sf_psi_n_e(n, x, &result)); +} diff --git a/software/gsl-1.15/specfunc/recurse.h b/software/gsl-1.15/specfunc/recurse.h new file mode 100644 index 000000000..207e5c802 --- /dev/null +++ b/software/gsl-1.15/specfunc/recurse.h @@ -0,0 +1,125 @@ +/* specfunc/recurse.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef _RECURSE_H_ +#define _RECURSE_H_ + +#define CONCAT(a,b) a ## _ ## b + + +/* n_max >= n_min + 2 + * f[n+1] + a[n] f[n] + b[n] f[n-1] = 0 + * + * Trivial forward recurrence. + */ +#define GEN_RECURSE_FORWARD_SIMPLE(func) \ +int CONCAT(recurse_forward_simple, func) ( \ + const int n_max, const int n_min, \ + const double parameters[], \ + const double f_n_min, \ + const double f_n_min_p1, \ + double * f, \ + double * f_n_max \ + ) \ +{ \ + int n; \ + \ + if(f == 0) { \ + double f2 = f_n_min; \ + double f1 = f_n_min_p1; \ + double f0; \ + for(n=n_min+2; n<=n_max; n++) { \ + f0 = -REC_COEFF_A(n-1,parameters) * f1 - REC_COEFF_B(n-1, parameters) * f2; \ + f2 = f1; \ + f1 = f0; \ + } \ + *f_n_max = f0; \ + } \ + else { \ + f[n_min] = f_n_min; \ + f[n_min + 1] = f_n_min_p1; \ + for(n=n_min+2; n<=n_max; n++) { \ + f[n] = -REC_COEFF_A(n-1,parameters) * f[n-1] - REC_COEFF_B(n-1, parameters) * f[n-2]; \ + } \ + *f_n_max = f[n_max]; \ + } \ + \ + return GSL_SUCCESS; \ +} \ + + +/* n_start >= n_max >= n_min + * f[n+1] + a[n] f[n] + b[n] f[n-1] = 0 + * + * Generate the minimal solution of the above recursion relation, + * with the simplest form of the normalization condition, f[n_min] given. + * [Gautschi, SIAM Rev. 9, 24 (1967); (3.9) with s[n]=0] + */ +#define GEN_RECURSE_BACKWARD_MINIMAL_SIMPLE(func) \ +int CONCAT(recurse_backward_minimal_simple, func) ( \ + const int n_start, \ + const int n_max, const int n_min, \ + const double parameters[], \ + const double f_n_min, \ + double * f, \ + double * f_n_max \ + ) \ +{ \ + int n; \ + double r_n = 0.; \ + double r_nm1; \ + double ratio; \ + \ + for(n=n_start; n > n_max; n--) { \ + r_nm1 = -REC_COEFF_B(n, parameters) / (REC_COEFF_A(n, parameters) + r_n); \ + r_n = r_nm1; \ + } \ + \ + if(f != 0) { \ + f[n_max] = 10.*DBL_MIN; \ + for(n=n_max; n > n_min; n--) { \ + r_nm1 = -REC_COEFF_B(n, parameters) / (REC_COEFF_A(n, parameters) + r_n); \ + f[n-1] = f[n] / r_nm1; \ + r_n = r_nm1; \ + } \ + ratio = f_n_min / f[n_min]; \ + for(n=n_min; n<=n_max; n++) { \ + f[n] *= ratio; \ + } \ + } \ + else { \ + double f_nm1; \ + double f_n = 10.*DBL_MIN; \ + *f_n_max = f_n; \ + for(n=n_max; n > n_min; n--) { \ + r_nm1 = -REC_COEFF_B(n, parameters) / (REC_COEFF_A(n, parameters) + r_n); \ + f_nm1 = f_n / r_nm1; \ + r_n = r_nm1; \ + } \ + ratio = f_n_min / f_nm1; \ + *f_n_max *= ratio; \ + } \ + \ + return GSL_SUCCESS; \ +} \ + + +#endif /* !_RECURSE_H_ */ diff --git a/software/gsl-1.15/specfunc/result.c b/software/gsl-1.15/specfunc/result.c new file mode 100644 index 000000000..f3e2da32f --- /dev/null +++ b/software/gsl-1.15/specfunc/result.c @@ -0,0 +1,89 @@ +/* specfunc/result.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + + +int +gsl_sf_result_smash_e(const gsl_sf_result_e10 * re, gsl_sf_result * r) +{ + if(re->e10 == 0) { + /* nothing to smash */ + r->val = re->val; + r->err = re->err; + return GSL_SUCCESS; + } + else { + const double av = fabs(re->val); + const double ae = fabs(re->err); + + if( GSL_SQRT_DBL_MIN < av && av < GSL_SQRT_DBL_MAX + && GSL_SQRT_DBL_MIN < ae && ae < GSL_SQRT_DBL_MAX + && 0.49*GSL_LOG_DBL_MIN < re->e10 && re->e10 < 0.49*GSL_LOG_DBL_MAX + ) { + const double scale = exp(re->e10 * M_LN10); + r->val = re->val * scale; + r->err = re->err * scale; + return GSL_SUCCESS; + } + else { + return gsl_sf_exp_mult_err_e(re->e10*M_LN10, 0.0, re->val, re->err, r); + } + } +/* + int stat_v; + int stat_e; + + if(re->val == 0.0) { + r->val = 0.0; + stat_v = GSL_SUCCESS; + } + else { + gsl_sf_result r_val; + const double s = GSL_SIGN(re->val); + const double x_v = re->e10*M_LN10 + log(fabs(re->val)); + stat_v = gsl_sf_exp_e(x_v, &r_val); + r->val = s * r_val.val; + } + + if(re->err == 0.0) { + r->err = 0.0; + stat_e = GSL_SUCCESS; + } + else if(re->val != 0.0) { + r->err = fabs(r->val * re->err/re->val); + stat_e = GSL_SUCCESS; + } + else { + gsl_sf_result r_err; + const double x_e = re->e10*M_LN10 + log(fabs(re->err)); + stat_e = gsl_sf_exp_e(x_e, &r_err); + r->err = r_err.val; + } + + return GSL_ERROR_SELECT_2(stat_v, stat_e); +*/ +} + diff --git a/software/gsl-1.15/specfunc/shint.c b/software/gsl-1.15/specfunc/shint.c new file mode 100644 index 000000000..212e27593 --- /dev/null +++ b/software/gsl-1.15/specfunc/shint.c @@ -0,0 +1,135 @@ +/* specfunc/shint.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC shi.f, W. Fullerton + + series for shi on the interval 0.00000e+00 to 1.40625e-01 + with weighted error 4.67e-20 + log weighted error 19.33 + significant figures required 17.07 + decimal places required 19.75 +*/ +static double shi_data[7] = { + 0.0078372685688900950695, + 0.0039227664934234563973, + 0.0000041346787887617267, + 0.0000000024707480372883, + 0.0000000000009379295591, + 0.0000000000000002451817, + 0.0000000000000000000467 +}; +static cheb_series shi_cs = { + shi_data, + 6, + -1, 1, + 6 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_Shi_e(const double x, gsl_sf_result * result) +{ + const double xsml = GSL_SQRT_DBL_EPSILON; /* sqrt (r1mach(3)) */ + const double ax = fabs(x); + + if(ax < xsml) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax <= 0.375) { + gsl_sf_result result_c; + cheb_eval_e(&shi_cs, 128.0*x*x/9.0-1.0, &result_c); + result->val = x * (1.0 + result_c.val); + result->err = x * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result result_Ei; + gsl_sf_result result_E1; + int status_Ei = gsl_sf_expint_Ei_e(x, &result_Ei); + int status_E1 = gsl_sf_expint_E1_e(x, &result_E1); + result->val = 0.5*(result_Ei.val + result_E1.val); + result->err = 0.5*(result_Ei.err + result_E1.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if(status_Ei == GSL_EUNDRFLW && status_E1 == GSL_EUNDRFLW) { + GSL_ERROR ("underflow", GSL_EUNDRFLW); + } + else if(status_Ei == GSL_EOVRFLW || status_E1 == GSL_EOVRFLW) { + GSL_ERROR ("overflow", GSL_EOVRFLW); + } + else { + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_Chi_e(const double x, gsl_sf_result * result) +{ + gsl_sf_result result_Ei; + gsl_sf_result result_E1; + int status_Ei = gsl_sf_expint_Ei_e(x, &result_Ei); + int status_E1 = gsl_sf_expint_E1_e(x, &result_E1); + if(status_Ei == GSL_EDOM || status_E1 == GSL_EDOM) { + DOMAIN_ERROR(result); + } + else if(status_Ei == GSL_EUNDRFLW && status_E1 == GSL_EUNDRFLW) { + UNDERFLOW_ERROR(result); + } + else if(status_Ei == GSL_EOVRFLW || status_E1 == GSL_EOVRFLW) { + OVERFLOW_ERROR(result); + } + else { + result->val = 0.5 * (result_Ei.val - result_E1.val); + result->err = 0.5 * (result_Ei.err + result_E1.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_Shi(const double x) +{ + EVAL_RESULT(gsl_sf_Shi_e(x, &result)); +} + +double gsl_sf_Chi(const double x) +{ + EVAL_RESULT(gsl_sf_Chi_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/sinint.c b/software/gsl-1.15/specfunc/sinint.c new file mode 100644 index 000000000..76a88ea00 --- /dev/null +++ b/software/gsl-1.15/specfunc/sinint.c @@ -0,0 +1,402 @@ +/* specfunc/sinint.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* based on SLATEC r9sifg.f, W. Fullerton */ + +/* + series for f1 on the interval 2.00000e-02 to 6.25000e-02 + with weighted error 2.82e-17 + log weighted error 16.55 + significant figures required 15.36 + decimal places required 17.20 +*/ +static double f1_data[20] = { + -0.1191081969051363610, + -0.0247823144996236248, + 0.0011910281453357821, + -0.0000927027714388562, + 0.0000093373141568271, + -0.0000011058287820557, + 0.0000001464772071460, + -0.0000000210694496288, + 0.0000000032293492367, + -0.0000000005206529618, + 0.0000000000874878885, + -0.0000000000152176187, + 0.0000000000027257192, + -0.0000000000005007053, + 0.0000000000000940241, + -0.0000000000000180014, + 0.0000000000000035063, + -0.0000000000000006935, + 0.0000000000000001391, + -0.0000000000000000282 +}; +static cheb_series f1_cs = { + f1_data, + 19, + -1, 1, + 10 +}; + +/* + + series for f2 on the interval 0.00000e+00 to 2.00000e-02 + with weighted error 4.32e-17 + log weighted error 16.36 + significant figures required 14.75 + decimal places required 17.10 +*/ +static double f2_data[29] = { + -0.0348409253897013234, + -0.0166842205677959686, + 0.0006752901241237738, + -0.0000535066622544701, + 0.0000062693421779007, + -0.0000009526638801991, + 0.0000001745629224251, + -0.0000000368795403065, + 0.0000000087202677705, + -0.0000000022601970392, + 0.0000000006324624977, + -0.0000000001888911889, + 0.0000000000596774674, + -0.0000000000198044313, + 0.0000000000068641396, + -0.0000000000024731020, + 0.0000000000009226360, + -0.0000000000003552364, + 0.0000000000001407606, + -0.0000000000000572623, + 0.0000000000000238654, + -0.0000000000000101714, + 0.0000000000000044259, + -0.0000000000000019634, + 0.0000000000000008868, + -0.0000000000000004074, + 0.0000000000000001901, + -0.0000000000000000900, + 0.0000000000000000432 +}; +static cheb_series f2_cs = { + f2_data, + 28, + -1, 1, + 14 +}; + +/* + + series for g1 on the interval 2.00000e-02 to 6.25000e-02 + with weighted error 5.48e-17 + log weighted error 16.26 + significant figures required 15.47 + decimal places required 16.92 +*/ +static double g1_data[21] = { + -0.3040578798253495954, + -0.0566890984597120588, + 0.0039046158173275644, + -0.0003746075959202261, + 0.0000435431556559844, + -0.0000057417294453025, + 0.0000008282552104503, + -0.0000001278245892595, + 0.0000000207978352949, + -0.0000000035313205922, + 0.0000000006210824236, + -0.0000000001125215474, + 0.0000000000209088918, + -0.0000000000039715832, + 0.0000000000007690431, + -0.0000000000001514697, + 0.0000000000000302892, + -0.0000000000000061400, + 0.0000000000000012601, + -0.0000000000000002615, + 0.0000000000000000548 +}; +static cheb_series g1_cs = { + g1_data, + 20, + -1, 1, + 13 +}; + +/* + + series for g2 on the interval 0.00000e+00 to 2.00000e-02 + with weighted error 5.01e-17 + log weighted error 16.30 + significant figures required 15.12 + decimal places required 17.07 +*/ +static double g2_data[34] = { + -0.0967329367532432218, + -0.0452077907957459871, + 0.0028190005352706523, + -0.0002899167740759160, + 0.0000407444664601121, + -0.0000071056382192354, + 0.0000014534723163019, + -0.0000003364116512503, + 0.0000000859774367886, + -0.0000000238437656302, + 0.0000000070831906340, + -0.0000000022318068154, + 0.0000000007401087359, + -0.0000000002567171162, + 0.0000000000926707021, + -0.0000000000346693311, + 0.0000000000133950573, + -0.0000000000053290754, + 0.0000000000021775312, + -0.0000000000009118621, + 0.0000000000003905864, + -0.0000000000001708459, + 0.0000000000000762015, + -0.0000000000000346151, + 0.0000000000000159996, + -0.0000000000000075213, + 0.0000000000000035970, + -0.0000000000000017530, + 0.0000000000000008738, + -0.0000000000000004487, + 0.0000000000000002397, + -0.0000000000000001347, + 0.0000000000000000801, + -0.0000000000000000501 +}; +static cheb_series g2_cs = { + g2_data, + 33, + -1, 1, + 20 +}; + + +/* x >= 4.0 */ +static void fg_asymp(const double x, gsl_sf_result * f, gsl_sf_result * g) +{ + /* + xbig = sqrt (1.0/r1mach(3)) + xmaxf = exp (amin1(-alog(r1mach(1)), alog(r1mach(2))) - 0.01) + xmaxg = 1.0/sqrt(r1mach(1)) + xbnd = sqrt(50.0) + */ + const double xbig = 1.0/GSL_SQRT_DBL_EPSILON; + const double xmaxf = 1.0/GSL_DBL_MIN; + const double xmaxg = 1.0/GSL_SQRT_DBL_MIN; + const double xbnd = 7.07106781187; + + const double x2 = x*x; + + if(x <= xbnd) { + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_e(&f1_cs, (1.0/x2-0.04125)/0.02125, &result_c1); + cheb_eval_e(&g1_cs, (1.0/x2-0.04125)/0.02125, &result_c2); + f->val = (1.0 + result_c1.val)/x; + g->val = (1.0 + result_c2.val)/x2; + f->err = result_c1.err/x + 2.0 * GSL_DBL_EPSILON * fabs(f->val); + g->err = result_c2.err/x2 + 2.0 * GSL_DBL_EPSILON * fabs(g->val); + } + else if(x <= xbig) { + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_e(&f2_cs, 100.0/x2-1.0, &result_c1); + cheb_eval_e(&g2_cs, 100.0/x2-1.0, &result_c2); + f->val = (1.0 + result_c1.val)/x; + g->val = (1.0 + result_c2.val)/x2; + f->err = result_c1.err/x + 2.0 * GSL_DBL_EPSILON * fabs(f->val); + g->err = result_c2.err/x2 + 2.0 * GSL_DBL_EPSILON * fabs(g->val); + } + else { + f->val = (x < xmaxf ? 1.0/x : 0.0); + g->val = (x < xmaxg ? 1.0/x2 : 0.0); + f->err = 2.0 * GSL_DBL_EPSILON * fabs(f->val); + g->err = 2.0 * GSL_DBL_EPSILON * fabs(g->val); + } + + return; +} + + +/* based on SLATEC si.f, W. Fullerton + + series for si on the interval 0.00000e+00 to 1.60000e+01 + with weighted error 1.22e-17 + log weighted error 16.91 + significant figures required 16.37 + decimal places required 17.45 +*/ + +static double si_data[12] = { + -0.1315646598184841929, + -0.2776578526973601892, + 0.0354414054866659180, + -0.0025631631447933978, + 0.0001162365390497009, + -0.0000035904327241606, + 0.0000000802342123706, + -0.0000000013562997693, + 0.0000000000179440722, + -0.0000000000001908387, + 0.0000000000000016670, + -0.0000000000000000122 +}; + +static cheb_series si_cs = { + si_data, + 11, + -1, 1, + 9 +}; + +/* + series for ci on the interval 0.00000e+00 to 1.60000e+01 + with weighted error 1.94e-18 + log weighted error 17.71 + significant figures required 17.74 + decimal places required 18.27 +*/ +static double ci_data[13] = { + -0.34004281856055363156, + -1.03302166401177456807, + 0.19388222659917082877, + -0.01918260436019865894, + 0.00110789252584784967, + -0.00004157234558247209, + 0.00000109278524300229, + -0.00000002123285954183, + 0.00000000031733482164, + -0.00000000000376141548, + 0.00000000000003622653, + -0.00000000000000028912, + 0.00000000000000000194 +}; +static cheb_series ci_cs = { + ci_data, + 12, + -1, 1, + 9 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_Si_e(const double x, gsl_sf_result * result) +{ + double ax = fabs(x); + + /* CHECK_POINTER(result) */ + + if(ax < GSL_SQRT_DBL_EPSILON) { + result->val = x; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(ax <= 4.0) { + gsl_sf_result result_c; + cheb_eval_e(&si_cs, (x*x-8.0)*0.125, &result_c); + result->val = x * (0.75 + result_c.val); + result->err = ax * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* Note there is no loss of precision + * here bcause of the leading constant. + */ + gsl_sf_result f; + gsl_sf_result g; + fg_asymp(ax, &f, &g); + result->val = 0.5 * M_PI - f.val*cos(ax) - g.val*sin(ax); + result->err = f.err + g.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + if(x < 0.0) result->val = -result->val; + return GSL_SUCCESS; + } +} + + +int gsl_sf_Ci_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(x <= 4.0) { + const double lx = log(x); + const double y = (x*x-8.0)*0.125; + gsl_sf_result result_c; + cheb_eval_e(&ci_cs, y, &result_c); + result->val = lx - 0.5 + result_c.val; + result->err = 2.0 * GSL_DBL_EPSILON * (fabs(lx) + 0.5) + result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result sin_result; + gsl_sf_result cos_result; + int stat_sin = gsl_sf_sin_e(x, &sin_result); + int stat_cos = gsl_sf_cos_e(x, &cos_result); + gsl_sf_result f; + gsl_sf_result g; + fg_asymp(x, &f, &g); + result->val = f.val*sin_result.val - g.val*cos_result.val; + result->err = fabs(f.err*sin_result.val); + result->err += fabs(g.err*cos_result.val); + result->err += fabs(f.val*sin_result.err); + result->err += fabs(g.val*cos_result.err); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_sin, stat_cos); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_Si(const double x) +{ + EVAL_RESULT(gsl_sf_Si_e(x, &result)); +} + +double gsl_sf_Ci(const double x) +{ + EVAL_RESULT(gsl_sf_Ci_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/synchrotron.c b/software/gsl-1.15/specfunc/synchrotron.c new file mode 100644 index 000000000..80b2a5f9d --- /dev/null +++ b/software/gsl-1.15/specfunc/synchrotron.c @@ -0,0 +1,285 @@ +/* specfunc/synchrotron.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +static double synchrotron1_data[13] = { + 30.364682982501076273, + 17.079395277408394574, + 4.560132133545072889, + 0.549281246730419979, + 0.372976075069301172e-01, + 0.161362430201041242e-02, + 0.481916772120371e-04, + 0.10512425288938e-05, + 0.174638504670e-07, + 0.22815486544e-09, + 0.240443082e-11, + 0.2086588e-13, + 0.15167e-15 +}; +static cheb_series synchrotron1_cs = { + synchrotron1_data, + 12, + -1.0, 1.0, + 9 +}; + +static double synchrotron2_data[12] = { + 0.4490721623532660844, + 0.898353677994187218e-01, + 0.81044573772151290e-02, + 0.4261716991089162e-03, + 0.147609631270746e-04, + 0.3628633615300e-06, + 0.66634807498e-08, + 0.949077166e-10, + 0.1079125e-11, + 0.10022e-13, + 0.77e-16, + 0.5e-18 +}; +static cheb_series synchrotron2_cs = { + synchrotron2_data, + 11, + -1.0, 1.0, + 7 +}; + +static double synchrotron1a_data[23] = { + 2.1329305161355000985, + 0.741352864954200240e-01, + 0.86968099909964198e-02, + 0.11703826248775692e-02, + 0.1645105798619192e-03, + 0.240201021420640e-04, + 0.35827756389389e-05, + 0.5447747626984e-06, + 0.838802856196e-07, + 0.13069882684e-07, + 0.2053099071e-08, + 0.325187537e-09, + 0.517914041e-10, + 0.83002988e-11, + 0.13352728e-11, + 0.2159150e-12, + 0.349967e-13, + 0.56994e-14, + 0.9291e-15, + 0.152e-15, + 0.249e-16, + 0.41e-17, + 0.7e-18 +}; +static cheb_series synchrotron1a_cs = { + synchrotron1a_data, + 22, + -1.0, 1.0, + 11 +}; + +static double synchrotron21_data[13] = { + 38.617839923843085480, + 23.037715594963734597, + 5.3802499868335705968, + 0.6156793806995710776, + 0.406688004668895584e-01, + 0.17296274552648414e-02, + 0.51061258836577e-04, + 0.110459595022e-05, + 0.18235530206e-07, + 0.2370769803e-09, + 0.24887296e-11, + 0.21529e-13, + 0.156e-15 +}; +static cheb_series synchrotron21_cs = { + synchrotron21_data, + 12, + -1.0, 1.0, + 9 +}; + +static double synchrotron22_data[13] = { + 7.9063148270660804288, + 3.1353463612853425684, + 0.4854879477453714538, + 0.394816675827237234e-01, + 0.19661622334808802e-02, + 0.659078932293042e-04, + 0.15857561349856e-05, + 0.286865301123e-07, + 0.4041202360e-09, + 0.45568444e-11, + 0.420459e-13, + 0.3232e-15, + 0.21e-17 +}; +static cheb_series synchrotron22_cs = { + synchrotron22_data, + 12, + -1.0, 1.0, + 8 +}; + +static double synchrotron2a_data[17] = { + 2.020337094170713600, + 0.10956237121807404e-01, + 0.8542384730114676e-03, + 0.723430242132822e-04, + 0.63124427962699e-05, + 0.5648193141174e-06, + 0.512832480138e-07, + 0.47196532914e-08, + 0.4380744214e-09, + 0.410268149e-10, + 0.38623072e-11, + 0.3661323e-12, + 0.348023e-13, + 0.33301e-14, + 0.319e-15, + 0.307e-16, + 0.3e-17 +}; +static cheb_series synchrotron2a_cs = { + synchrotron2a_data, + 16, + -1.0, 1.0, + 8 +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int gsl_sf_synchrotron_1_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2 * GSL_SQRT_DBL_EPSILON) { + /* BJG: added first order correction term. The taylor series + is S1(x) = ((4pi)/(sqrt(3)gamma(1/3))) * (x/2)^(1/3) + * (1 - (gamma(1/3)/2)*(x/2)^2/3 + (3/4) * (x/2)^2 ....) */ + double z = pow(x, 1.0/3.0); + double cf = 1 - 8.43812762813205e-01 * z * z; + result->val = 2.14952824153447863671 * z * cf; + result->err = GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double c0 = M_PI/M_SQRT3; + const double px = pow(x,1.0/3.0); + const double px11 = gsl_sf_pow_int(px,11); + const double t = x*x/8.0 - 1.0; + gsl_sf_result result_c1; + gsl_sf_result result_c2; + cheb_eval_e(&synchrotron1_cs, t, &result_c1); + cheb_eval_e(&synchrotron2_cs, t, &result_c2); + result->val = px * result_c1.val - px11 * result_c2.val - c0 * x; + result->err = px * result_c1.err + px11 * result_c2.err + c0 * x * GSL_DBL_EPSILON; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -8.0*GSL_LOG_DBL_MIN/7.0) { + const double c0 = 0.2257913526447274323630976; /* log(sqrt(pi/2)) */ + const double t = (12.0 - x) / (x + 4.0); + gsl_sf_result result_c1; + cheb_eval_e(&synchrotron1a_cs, t, &result_c1); + result->val = sqrt(x) * result_c1.val * exp(c0 - x); + result->err = 2.0 * GSL_DBL_EPSILON * result->val * (fabs(c0-x)+1.0); + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + + +int gsl_sf_synchrotron_2_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 2.0*M_SQRT2*GSL_SQRT_DBL_EPSILON) { + /* BJG: added first order correction term. The taylor series + is S2(x) = ((2pi)/(sqrt(3)*gamma(1/3))) * (x/2)^(1/3) + * (1 - (gamma(1/3)/gamma(4/3))*(x/2)^(4/3) + (gamma(1/3)/gamma(4/3))*(x/2)^2...) */ + + double z = pow(x, 1.0/3.0); + double cf = 1 - 1.17767156510235e+00 * z * x; + result->val = 1.07476412076723931836 * z * cf ; + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double px = pow(x, 1.0/3.0); + const double px5 = gsl_sf_pow_int(px,5); + const double t = x*x/8.0 - 1.0; + gsl_sf_result cheb1; + gsl_sf_result cheb2; + cheb_eval_e(&synchrotron21_cs, t, &cheb1); + cheb_eval_e(&synchrotron22_cs, t, &cheb2); + result->val = px * cheb1.val - px5 * cheb2.val; + result->err = px * cheb1.err + px5 * cheb2.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -8.0*GSL_LOG_DBL_MIN/7.0) { + const double c0 = 0.22579135264472743236; /* log(sqrt(pi/2)) */ + const double t = (10.0 - x) / (x + 2.0); + gsl_sf_result cheb1; + cheb_eval_e(&synchrotron2a_cs, t, &cheb1); + result->val = sqrt(x) * exp(c0-x) * cheb1.val; + result->err = GSL_DBL_EPSILON * result->val * (fabs(c0-x)+1.0); + return GSL_SUCCESS; + } + else { + UNDERFLOW_ERROR(result); + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_synchrotron_1(const double x) +{ + EVAL_RESULT(gsl_sf_synchrotron_1_e(x, &result)); +} + +double gsl_sf_synchrotron_2(const double x) +{ + EVAL_RESULT(gsl_sf_synchrotron_2_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/test_airy.c b/software/gsl-1.15/specfunc/test_airy.c new file mode 100644 index 000000000..ea5a2d53c --- /dev/null +++ b/software/gsl-1.15/specfunc/test_airy.c @@ -0,0 +1,134 @@ +/* specfunc/test_airy.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + + +int test_airy(void) +{ + int s = 0; + int m = GSL_MODE_DEFAULT; + gsl_sf_result r; + + /** functions */ + + TEST_SF(s, gsl_sf_airy_Ai_e, (-500.0, m, &r), 0.0725901201040411396, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_e, (-5.0, m, &r), 0.3507610090241142, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_e, (-0.3000000000000094, m, &r), 0.4309030952855831, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_e, (0.6999999999999907, m, &r), 0.1891624003981519, TEST_TOL0, GSL_SUCCESS); + + /* This original value seemed to be slightly inaccurate in the last place. + I recomputed it with pari to get the new value which end in 885 + instead of 882 */ + /* + TEST_SF(s, gsl_sf_airy_Ai_e, (1.649999999999991, m, &r), 0.05831058618720882, TEST_TOL0, GSL_SUCCESS); + */ + + TEST_SF(s, gsl_sf_airy_Ai_e, (1.649999999999991, m, &r), 0.0583105861872088521, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Ai_e, (2.54999999999999, m, &r), 0.01446149513295428, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_e, (3.499999999999987, m, &r), 0.002584098786989702, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_e, (5.39999999999998, m, &r), 4.272986169411866e-05, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (-5.0, m, &r), 0.3507610090241142, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (0.6999999999999907, m, &r), 0.2795125667681217, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (1.649999999999991, m, &r), 0.2395493001442741, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (2.54999999999999, m, &r), 0.2183658595899388, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (3.499999999999987, m, &r), 0.2032920808163519, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_scaled_e, (5.39999999999998, m, &r), 0.1836050093282229, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Bi_e, (-500.0, m, &r), -0.094688570132991028, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (-5.0, m, &r), -0.1383691349016005, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (0.6999999999999907, m, &r), 0.9733286558781599, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (1.649999999999991, m, &r), 2.196407956850028, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (2.54999999999999, m, &r), 6.973628612493443, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (3.499999999999987, m, &r), 33.05550675461069, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_e, (5.39999999999998, m, &r), 1604.476078241272, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (-5.0, m, &r), -0.1383691349016005, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (0.6999999999999907, m, &r), 0.6587080754582302, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (1.649999999999991, m, &r), 0.5346449995597539, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (2.54999999999999, m, &r), 0.461835455542297, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (3.499999999999987, m, &r), 0.4201771882353061, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_scaled_e, (5.39999999999998, m, &r), 0.3734050675720473, TEST_TOL0, GSL_SUCCESS); + + + /** derivatives */ + + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (-5.0, m, &r), 0.3271928185544435, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (-0.5500000000000094, m, &r), -0.1914604987143629, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (0.4999999999999906, m, &r), -0.2249105326646850, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (1.899999999999992, m, &r), -0.06043678178575718, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (3.249999999999988, m, &r), -0.007792687926790889, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_e, (5.199999999999981, m, &r), -0.0001589434526459543, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (-5.0, m, &r), 0.3271928185544435, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (0.5499999999999906, m, &r), -0.2874057279170166, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (1.499999999999991, m, &r), -0.3314199796863637, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (2.49999999999999, m, &r), -0.3661089384751620, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (3.649999999999986, m, &r), -0.3974033831453963, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Ai_deriv_scaled_e, (6.299999999999977, m, &r), -0.4508799189585947, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (-5.0, m, &r), 0.778411773001899, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (-0.5500000000000094, m, &r), 0.5155785358765014, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (0.4999999999999906, m, &r), 0.5445725641405883, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (1.899999999999992, m, &r), 3.495165862891568, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (3.249999999999988, m, &r), 36.55485149250338, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_e, (5.199999999999981, m, &r), 2279.748293583233, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (-5.0, m, &r), 0.778411773001899, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (0.5499999999999906, m, &r), 0.4322811281817566, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (1.499999999999991, m, &r), 0.5542307563918037, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (2.49999999999999, m, &r), 0.6755384441644985, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (3.649999999999986, m, &r), 0.7613959373000228, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_Bi_deriv_scaled_e, (6.299999999999977, m, &r), 0.8852064139737571, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_zero_Ai_e, (2, &r), -4.087949444130970617, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_e, (50, &r), -38.02100867725525443, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_e, (100, &r), -60.45555727411669871, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_e, (110, &r), -64.43135670991324811, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (2, &r), -3.271093302836352716, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (50, &r), -37.76583438165180116, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (100, &r), -60.25336482580837088, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (110, &r), -64.2355167606561537, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (111, &r), -64.6268994819519378, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_e, (200, &r), -95.88699147356682665, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_zero_Ai_deriv_e, (2, &r), -3.248197582179836561, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_deriv_e, (50, &r), -37.76565910053887108, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_deriv_e, (100, &r), -60.25329596442479317, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_deriv_e, (110, &r), -64.23545617243546956, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Ai_deriv_e, (1000, &r), -280.9378080358935071, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (2, &r), -4.073155089071828216, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (50, &r), -38.02083574095788210, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (100, &r), -60.45548887257140819, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (110, &r), -64.43129648944845060, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (111, &r), -64.82208737584206093, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (200, &r), -96.04731050310324450, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_airy_zero_Bi_deriv_e, (1000, &r), -281.0315164471118527, TEST_TOL0, GSL_SUCCESS); + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_bessel.c b/software/gsl-1.15/specfunc/test_bessel.c new file mode 100644 index 000000000..3b35ff07a --- /dev/null +++ b/software/gsl-1.15/specfunc/test_bessel.c @@ -0,0 +1,618 @@ +/* specfunc/test_bessel.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + +static double J[100]; +static double Y[100]; +static double I[100]; +static double K[100]; + +int test_bessel(void) +{ + gsl_sf_result r; + int i; + int s = 0; + int sa; + + TEST_SF(s, gsl_sf_bessel_J0_e, (0.1, &r), 0.99750156206604003230, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J0_e, (2.0, &r), 0.22389077914123566805, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J0_e, (100.0, &r), 0.019985850304223122424, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J0_e, (1.0e+10, &r), 2.1755917502468917269e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_J1_e, (0.1, &r), 0.04993752603624199756, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J1_e, (2.0, &r), 0.57672480775687338720, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J1_e, (100.0, &r), -0.07714535201411215803, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_J1_e, (1.0e+10, &r), -7.676508175684157103e-06, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Jn_e, (4, 0.1, &r), 2.6028648545684032338e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (5, 2.0, &r), 0.007039629755871685484, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (10, 20.0, &r), 0.18648255802394508321, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (100, 100.0, &r), 0.09636667329586155967, TEST_TOL0, GSL_SUCCESS); + + /* exercise the BUG#3 problem */ + TEST_SF(s, gsl_sf_bessel_Jn_e, (2, 900.0, &r), -0.019974345269680646400, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (2, 15000.0, &r), -0.0020455820181216382666, TEST_TOL4, GSL_SUCCESS); + +#ifdef TEST_LARGE + TEST_SF(s, gsl_sf_bessel_Jn_e, (0, 1.0e+10, &r), 2.1755917502468917269e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (1, 1.0e+10, &r), -7.676508175684157103e-06, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jn_e, (0, 20000, &r), 0.00556597490495494615709982972, TEST_TOL4, GSL_SUCCESS); +#endif + + /* Testcase demonstrating long calculation time: + Time spent in gsl_sf_bessel_J_CF1 for large x<1000 and n<5 + grows in proportion to x + Jonny Taylor */ + TEST_SF(s, gsl_sf_bessel_Jn_e, (45, 900.0, &r), 0.02562434700634278108, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Y0_e, (0.1, &r), -1.5342386513503668441, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y0_e, (2, &r), 0.5103756726497451196, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y0_e, (256.0, &r), -0.03381290171792454909 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y0_e, (4294967296.0, &r), 3.657903190017678681e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Y1_e, (0.1, &r), -6.45895109470202698800, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y1_e, (2, &r), -0.10703243154093754689, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y1_e, (100.0, &r), -0.020372312002759793305, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Y1_e, (4294967296.0, &r), 0.000011612249378370766284, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Yn_e, (4, 0.1, &r), -305832.29793353160319, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Yn_e, (5, 2, &r), -9.935989128481974981, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Yn_e, (100, 100.0, &r), -0.16692141141757650654, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Yn_e, (100, 4294967296.0, &r), 3.657889671577715808e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Yn_e, (1000, 4294967296.0, &r), 3.656551321485397501e-06, 2.0e-05, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Yn_e, (2, 15000.0, &r), -0.006185217273358617849, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_I0_scaled_e, (1e-10, &r), 0.99999999990000000001, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_scaled_e, (0.1, &r), 0.90710092578230109640, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_scaled_e, (2, &r), 0.30850832255367103953, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_scaled_e, (100.0, &r), 0.03994437929909668265, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_scaled_e, (65536.0, &r), 0.0015583712551952223537, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_I1_scaled_e, (0.1, &r), 0.04529844680880932501, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I1_scaled_e, (2, &r), 0.21526928924893765916, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I1_scaled_e, (100.0, &r), 0.03974415302513025267, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I1_scaled_e, (65536.0, &r), 0.0015583593657207350452, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( -4, 0.1, &r), 2.3575258620054605307e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( 4, 0.1, &r), 2.3575258620054605307e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( 5, 2.0, &r), 0.0013297610941881578142, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( 100, 100.0, &r), 1.7266862628167695785e-22, TEST_TOL0, GSL_SUCCESS); + + /* BJG: the "exact" values in the following two tests were originally computed from the + taylor series for I_nu using "long double" and rescaling. The last few digits + were inaccurate due to cumulative roundoff. + + BJG: 2006/05 I have now replaced these with the term asymptotic + expansion from A&S 9.7.1 which should be fully accurate. */ + + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( 2, 1e7, &r), 1.261566024466416433e-4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_scaled_e, ( 2, 1e8, &r), 3.989422729212649531e-5, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_I0_e, (0.1, &r), 1.0025015629340956014, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_e, (2.0, &r), 2.2795853023360672674, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I0_e, (100.0, &r), 1.0737517071310738235e+42, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_I1_e, (0.1, &r), 0.05006252604709269211, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I1_e, (2.0, &r), 1.59063685463732906340, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_I1_e, (100.0, &r), 1.0683693903381624812e+42, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_In_e, ( 4, 0.1, &r), 2.6054690212996573677e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_e, ( 5, 2.0, &r), 0.009825679323131702321, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_In_e, ( 100, 100.0, &r), 4.641534941616199114e+21, TEST_TOL2, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_bessel_K0_scaled_e, (0.1, &r), 2.6823261022628943831, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K0_scaled_e, (2.0, &r), 0.8415682150707714179, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K0_scaled_e, (100.0, &r), 0.1251756216591265789, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_K1_scaled_e, (0.1, &r), 10.890182683049696574, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K1_scaled_e, (2.0, &r), 1.0334768470686885732, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K1_scaled_e, (100.0, &r), 0.1257999504795785293, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Kn_scaled_e, ( 4, 0.1, &r), 530040.2483725626207, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Kn_scaled_e, ( 5, 2.0, &r), 69.68655087607675118, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Kn_scaled_e, ( 100, 100.0, &r), 2.0475736731166756813e+19, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_K0_e, (0.1, &r), 2.4270690247020166125, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K0_e, (2.0, &r), 0.11389387274953343565, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K0_e, (100.0, &r), 4.656628229175902019e-45, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_K1_e, (0.1, &r), 9.853844780870606135, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K1_e, (2.0, &r), 0.13986588181652242728, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_K1_e, (100.0, &r), 4.679853735636909287e-45, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Kn_e, ( 4, 0.1, &r), 479600.2497925682849, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Kn_e, ( 5, 2.0, &r), 9.431049100596467443, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Kn_e, ( 100, 100.0, &r), 7.617129630494085416e-25, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_j0_e, (-10.0, &r), -0.05440211108893698134, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j0_e, (0.001, &r), 0.9999998333333416667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j0_e, ( 1.0, &r), 0.84147098480789650670, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j0_e, ( 10.0, &r), -0.05440211108893698134, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j0_e, (100.0, &r), -0.005063656411097587937, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j0_e, (1048576.0, &r), 3.1518281938718287624e-07, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_j1_e, (-10.0, &r), -0.07846694179875154709, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j1_e, (0.01, &r), 0.003333300000119047399, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j1_e, ( 1.0, &r), 0.30116867893975678925, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j1_e, ( 10.0, &r), 0.07846694179875154709, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j1_e, (100.0, &r), -0.008673825286987815220, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j1_e, (1048576.0, &r), -9.000855242905546158e-07, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_j2_e, (-10.0, &r), 0.07794219362856244547, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j2_e, (0.01, &r), 6.666619047751322551e-06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j2_e, ( 1.0, &r), 0.06203505201137386110, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j2_e, ( 10.0, &r), 0.07794219362856244547, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j2_e, (100.0, &r), 0.004803441652487953480, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_j2_e, (1048576.0, &r), -3.1518539455252413111e-07, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_jl_e, (0, 0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_jl_e, (1, 10.0, &r), 0.07846694179875154709000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (5, 1.0, &r), 0.00009256115861125816357, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (10, 10.0, &r), 0.06460515449256426427, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (100, 100.0, &r), 0.010880477011438336539, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (2000, 1048576.0, &r), 7.449384239168568534e-07, TEST_SQRT_TOL0, GSL_SUCCESS); + + /* related to BUG#3 problem */ + TEST_SF(s, gsl_sf_bessel_jl_e, (2, 900.0, &r), -0.0011089115568832940086, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (2, 15000.0, &r), -0.00005955592033075750554, TEST_TOL4, GSL_SUCCESS); + + /* Bug report by Mario Santos, value computed from AS 10.1.8 */ + TEST_SF(s, gsl_sf_bessel_jl_e, (100, 1000.0, &r), -0.00025326311230945818285, TEST_TOL4, GSL_SUCCESS); + + /* Bug reported by Koichi Takahashi , + computed from Pari besseljh(n,x) and AS 10.1.1 */ + + TEST_SF(s, gsl_sf_bessel_jl_e, (30, 3878.62, &r), -0.00023285567034330878410434732790, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (49, 9912.63, &r), 5.2043354544842669214485107019E-5 , TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (49, 9950.35, &r), 5.0077368819565969286578715503E-5 , TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_jl_e, (52, 9930.51, &r), -7.4838588266727718650124475651E-6 , TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_y0_e, (0.001, &r), -999.99950000004166670, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y0_e, ( 1.0, &r), -0.5403023058681397174, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y0_e, ( 10.0, &r), 0.08390715290764524523, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y0_e, (100.0, &r), -0.008623188722876839341, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y0_e, (65536.0, &r), 0.000011014324202158573930, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y0_e, (4294967296.0, &r), 2.0649445131370357007e-10, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_y1_e, ( 0.01, &r), -10000.499987500069444, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y1_e, ( 1.0, &r), -1.3817732906760362241, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y1_e, ( 10.0, &r), 0.06279282637970150586, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y1_e, (100.0, &r), 0.004977424523868819543, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y1_e, (4294967296.0, &r), 1.0756463271573404688e-10, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_y2_e, ( 0.01, &r), -3.0000500012499791668e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y2_e, ( 1.0, &r), -3.605017566159968955, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y2_e, ( 10.0, &r), -0.06506930499373479347, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y2_e, (100.0, &r), 0.008772511458592903927, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_y2_e, (4294967296.0, &r), -2.0649445123857054207e-10, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_yl_e, (0, 0.01, &r), -99.995000041666528, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (0, 1.0, &r), -0.54030230586813972, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (1, 10.0, &r), 0.062792826379701506, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (5, 1.0, &r), -999.44034339223641, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (10, 0.01, &r), -6.5473079797378378e+30, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (10, 10.0, &r), -0.172453672088057849, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (100, 1.0, &r), -6.6830794632586775e+186, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (100, 100.0, &r), -0.0229838504915622811, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_yl_e, (2000, 1048576.0, &r), 5.9545201447146155e-07, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_i0_scaled_e, (0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i0_scaled_e, (0.1, &r), 0.9063462346100907067, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i0_scaled_e, (2.0, &r), 0.24542109027781645493, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i0_scaled_e, (100.0, &r), 0.005000000000000000000, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_i1_scaled_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i1_scaled_e, (0.1, &r), 0.030191419289002226846, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i1_scaled_e, (2.0, &r), 0.131868364583275317610, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i1_scaled_e, (100.0, &r), 0.004950000000000000000, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_i2_scaled_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i2_scaled_e, (0.1, &r), 0.0006036559400239012567, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i2_scaled_e, (2.0, &r), 0.0476185434029034785100, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_i2_scaled_e, (100.0, &r), 0.0048515000000000000000, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 0, 0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 1, 0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 4, 0.001, &r), 1.0571434341190365013e-15, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 4, 0.1, &r), 9.579352242057134927e-08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 5, 2.0, &r), 0.0004851564602127540059, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 5, 100.0, &r), 0.004300446777500000000, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_il_scaled_e, ( 100, 100.0, &r), 1.3898161964299132789e-23, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_k0_scaled_e, (0.1, &r), 15.707963267948966192, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k0_scaled_e, (2.0, &r), 0.7853981633974483096, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k0_scaled_e, (100.0, &r), 0.015707963267948966192, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_k1_scaled_e, (0.1, &r), 172.78759594743862812, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k1_scaled_e, (2.0, &r), 1.1780972450961724644, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k1_scaled_e, (100.0, &r), 0.015865042900628455854, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_k2_scaled_e, (0.1, &r), 5199.335841691107810, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k2_scaled_e, (2.0, &r), 2.5525440310417070063, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_k2_scaled_e, (100.0, &r), 0.016183914554967819868, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_kl_scaled_e, ( 4, 1.0/256.0, &r), 1.8205599816961954439e+14, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_kl_scaled_e, ( 4, 1.0/8.0, &r), 6.1173217814406597530e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_kl_scaled_e, ( 5, 2.0, &r), 138.10735829492005119, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_kl_scaled_e, ( 100, 100.0, &r), 3.985930768060258219e+18, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Jnu_e, (0.0001, 1.0, &r), 0.7652115411876708497, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (0.0001, 10.0, &r), -0.2459270166445205, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (0.0009765625, 10.0, &r), -0.2458500798634692, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (0.75, 1.0, &r), 0.5586524932048917478, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (0.75, 10.0, &r), -0.04968928974751508135, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, ( 1.0, 0.001, &r), 0.0004999999375000026, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, ( 1.0, 1.0, &r), 0.4400505857449335160, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, ( 1.75, 1.0, &r), 0.168593922545763170103, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (30.0, 1.0, &r), 3.482869794251482902e-42, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (30.0, 100.0, &r), 0.08146012958117222297, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (10.0, 1.0, &r), 2.6306151236874532070e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (10.0, 100.0, &r), -0.05473217693547201474, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (10.2, 100.0, &r), -0.03548919161046526864, TEST_TOL2, GSL_SUCCESS); + + /* related to BUG#3 problem */ + TEST_SF(s, gsl_sf_bessel_Jnu_e, (2.0, 900.0, &r), -0.019974345269680646400, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (2.0, 15000.0, &r), -0.0020455820181216382666, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Ynu_e, (0.0001, 1.0, &r), 0.08813676933044478439, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (0.0001,10.0, &r), 0.05570979797521875261, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, ( 0.75, 1.0, &r), -0.6218694174429746383, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, ( 0.75, 10.0, &r), 0.24757063446760384953, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, ( 1.0, 0.001, &r), -636.6221672311394281, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, ( 1.0, 1.0, &r), -0.7812128213002887165, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (30.0, 1.0, &r), -3.0481287832256432162e+39, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (30.0, 100.0, &r), 0.006138839212010033452, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (10.0, 1.0, &r), -1.2161801427868918929e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (10.0, 100.0, &r), 0.05833157423641492875, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (10.2, 100.0, &r), 0.07169383985546287091, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (0.0001,10.0, &r), 0.12783333709581669672, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, ( 1.0, 0.001, &r), 0.0004995003123542213370, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, ( 1.0, 1.0, &r), 0.20791041534970844887, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (30.0, 1.0, &r), 1.3021094983785914437e-42, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (30.0, 100.0, &r), 0.0004486987756920986146, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (10.0, 1.0, &r), 1.0127529864692066036e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (10.0, 100.0, &r), 0.024176682718258828365, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (10.2, 100.0, &r), 0.023691628843913810043, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Inu_e, (0.0001,10.0, &r), 2815.7166269770030352, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, ( 1.0, 0.001, &r), 0.0005000000625000026042, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, ( 1.0, 1.0, &r), 0.5651591039924850272, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, (30.0, 1.0, &r), 3.539500588106447747e-42, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, (30.0, 100.0, &r), 1.2061548704498434006e+40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, (10.0, 1.0, &r), 2.7529480398368736252e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, (10.0, 100.0, &r), 6.498975524720147799e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Inu_e, (10.2, 100.0, &r), 6.368587361287030443e+41, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (0.0001,10.0, &r), 0.3916319346235421817, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, ( 1.0, 0.001, &r), 1000.9967345590684524, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, ( 1.0, 1.0, &r), 1.6361534862632582465, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (30.0, 1.0, &r), 1.2792629867539753925e+40, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (30.0, 100.0, &r), 10.673443449954850040, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (10.0, 1.0, &r), 4.912296520990198599e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (10.0, 100.0, &r), 0.20578687173955779807, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (10.0, 1000.0, &r), 0.04165905142800565788, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (10.0, 1.0e+8, &r), 0.00012533147624060789938, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_scaled_e, (10.2, 100.0, &r), 0.20995808355244385075, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_Knu_e, (0.0001,0.001, &r), 7.023689431812884141, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (0.0001,10.0, &r), 0.000017780062324654874306, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, ( 1.0, 0.001, &r), 999.9962381560855743, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, ( 1.0, 1.0, &r), 0.6019072301972345747, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (10.0, 0.001, &r), 1.8579455483904008064e+38, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (10.0, 1.0, &r), 1.8071328990102945469e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (10.0, 100.0, &r), 7.655427977388100611e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (10.2, 100.0, &r), 7.810600225948217841e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (30.0, 1.0, &r), 4.706145526783626883e+39, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Knu_e, (30.0, 100.0, &r), 3.970602055959398739e-43, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (0.0001,1.0e-100, &r), 5.439794449319847, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (0.0001,0.0001, &r), 2.232835507214331, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (0.0001,10.0, &r), -10.93743282256098, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, ( 1.0, 1.0e-100, &r), 230.2585092994045, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, ( 1.0, 1.0e-10, &r), 23.025850929940456840, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, ( 1.0, 0.001, &r), 6.907751517131146, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, ( 1.0, 1.0, &r), -0.5076519482107523309, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (30.0, 1.0e-100, &r), 6999.113586185543475, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (30.0, 1.0, &r), 91.34968784026325464, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (30.0, 100.0, &r), -97.63224126416760932, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (100.0, 1.0e-100, &r), 23453.606706185466825, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (100.0, 1.0, &r), 427.7532510250188083, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (100.0, 100.0, &r), -55.53422771502921431, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (1000.0, 1.0e-100, &r), 236856.183755993135, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (10000.0, 1.0e-100, &r), 2.39161558914890695e+06, TEST_TOL0, GSL_SUCCESS); + + /* [bug #31528] gsl_sf_bessel_lnKnu overflows for large nu */ + + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (180.0, 2.2, &r), 735.1994170369583930752590258, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_lnKnu_e, (3500.5, 1500.0, &r), 1731.220077116482710070986699, TEST_TOL1, GSL_SUCCESS); + + sa = 0; + gsl_sf_bessel_Jn_array(3, 38, 1.0, J); + sa += ( test_sf_frac_diff(J[0], 0.0195633539826684059190 ) > TEST_TOL1); + sa += ( test_sf_frac_diff(J[1], 0.0024766389641099550438 ) > TEST_TOL1); + sa += ( test_sf_frac_diff(J[10], 1.9256167644801728904e-14 ) > TEST_TOL1); + sa += ( test_sf_frac_diff(J[35], 6.911232970971626272e-57 ) > TEST_TOL1); + gsl_test(sa, " gsl_sf_bessel_Jn_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_Yn_array(3, 38, 1.0, Y); + sa += ( test_sf_frac_diff(Y[0], -5.821517605964728848 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[1], -33.27842302897211870 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[10], -1.2753618701519837595e+12 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[35], -1.2124435663593357154e+54 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_Yn_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_In_scaled_array(3, 38, 1.0, I); + sa += ( test_sf_frac_diff(I[0], 0.0081553077728142938170 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(I[1], 0.0010069302573377758637 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(I[10], 7.341518665628926244e-15 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(I[35], 2.5753065298357542893e-57 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_In_scaled_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_In_array(3, 38, 1.0, Y); + sa += ( test_sf_frac_diff(Y[0], 0.0221684249243319024760 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[1], 0.0027371202210468663251 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[10], 1.9956316782072007564e-14 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[35], 7.000408942764452901e-57 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_In_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_Kn_array(3, 38, 1.0, K); + sa += ( test_sf_frac_diff(K[0], 7.101262824737944506 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[1], 44.23241584706284452 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[10], 1.9215763927929940846e+12 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[35], 1.8789385023806051223e+54 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_Kn_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_Kn_scaled_array(3, 38, 1.0, K); + sa += ( test_sf_frac_diff(K[0], 19.303233695596904277 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[1], 120.23617222591483717 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[10], 5.223386190525076473e+12 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[35], 5.107484387813251411e+54 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_Kn_scaled_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_jl_array(50, 1.0, J); + sa += ( test_sf_frac_diff(J[0], 0.84147098480789650670 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(J[1], 0.30116867893975678925 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(J[10], 7.116552640047313024e-11 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(J[50], 3.615274717489787311e-81 ) > TEST_TOL2 ); + gsl_test(sa, " gsl_sf_bessel_jl_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_jl_steed_array(99, 1.0, J); + sa += ( test_sf_frac_diff(J[0], 0.84147098480789650670 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(J[1], 0.30116867893975678925 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(J[10], 7.116552640047313024e-11 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(J[50], 3.615274717489787311e-81 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(J[80], 1.136352423414503264e-144 ) > TEST_TOL1 ); + gsl_test(sa, " gsl_sf_bessel_jl_steed_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_yl_array(50, 1.0, Y); + sa += ( test_sf_frac_diff(Y[0], -0.5403023058681397174 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[1], -1.3817732906760362241 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[10], -6.722150082562084436e+08 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(Y[50], -2.7391922846297571576e+78 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_yl_array"); + s += sa; + + { + double Y0[1]; + sa = 0; + gsl_sf_bessel_yl_array(0, 1.0, Y0); + sa += ( test_sf_frac_diff(Y0[0], -0.5403023058681397174 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_yl_array (lmax=0)"); + s += sa; + } + + sa = 0; + gsl_sf_bessel_il_scaled_array(50, 1.0, I); + sa += ( test_sf_frac_diff(I[0], 0.43233235838169365410 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[1], 0.13533528323661269189 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[10], 2.7343719371837065460e-11 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[50], 1.3429606061892023653e-81 ) > TEST_TOL2 ); + gsl_test(sa, " gsl_sf_bessel_il_scaled_array"); + s += sa; + + sa = 0; + gsl_sf_bessel_il_scaled_array(50, 0.0, I); + sa += ( test_sf_frac_diff(I[0], 1.0 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[1], 0.0 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[10], 0.0 ) > TEST_TOL2 ); + sa += ( test_sf_frac_diff(I[50], 0.0 ) > TEST_TOL2 ); + gsl_test(sa, " gsl_sf_bessel_il_scaled_array (L=0)"); + s += sa; + + sa = 0; + gsl_sf_bessel_kl_scaled_array(50, 1.0, K); + sa += ( test_sf_frac_diff(K[0], 1.5707963267948966192 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[1], 3.1415926535897932385 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[10], 2.7231075458948147010e+09 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff(K[50], 1.1578440432804522544e+79 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_kl_scaled_array"); + s += sa; + + { + double K0[1]; + sa = 0; + gsl_sf_bessel_kl_scaled_array(0, 1.0, K0); + sa += ( test_sf_frac_diff(K[0], 1.5707963267948966192 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_bessel_kl_scaled_array (lmax=0)"); + s += sa; + } + + sa = 0; + sa += ( gsl_sf_bessel_zero_J0_e(0, &r) != GSL_EINVAL ); + sa += ( r.val != 0.0 ); + s += sa; + TEST_SF(s, gsl_sf_bessel_zero_J0_e, ( 1, &r), 2.404825557695771, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J0_e, ( 2, &r), 5.520078110286304, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J0_e, (20, &r), 62.048469190227081, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J0_e, (25, &r), 77.756025630388058, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J0_e, (100, &r), 313.37426607752784, TEST_TOL1, GSL_SUCCESS); + + sa = 0; + sa += ( gsl_sf_bessel_zero_J1_e(0, &r) != GSL_SUCCESS ); + sa += ( r.val != 0.0 ); + s += sa; + TEST_SF(s, gsl_sf_bessel_zero_J1_e, ( 1, &r), 3.831705970207512, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J1_e, ( 2, &r), 7.015586669815619, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J1_e, (20, &r), 63.61135669848124, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J1_e, (25, &r), 79.32048717547630, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_J1_e, (100, &r), 314.9434728377672, TEST_TOL2, GSL_SUCCESS); + + sa = 0; + sa += ( gsl_sf_bessel_zero_Jnu_e(0.0, 0, &r) != GSL_EINVAL ); + sa += ( r.val != 0.0 ); + s += sa; + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (0.0, 1, &r), 2.404825557695771, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (0.0, 2, &r), 5.520078110286304, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (0.0, 20, &r), 62.048469190227081, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (0.0, 25, &r), 77.756025630388058, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (0.0, 100, &r), 313.37426607752784, TEST_TOL1, GSL_SUCCESS); + + sa = 0; + sa += ( gsl_sf_bessel_zero_Jnu_e(1.0, 0, &r) != GSL_SUCCESS ); + sa += (r.val != 0.0); + s += sa; + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 1, &r), 4.4934094579090641, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 1, &r), 8.7714838159599540, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 2, &r), 7.7252518369377072, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 2, &r), 12.338604197466944, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 3, &r), 10.904121659428900, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 3, &r), 15.700174079711671, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 4, &r), 14.066193912831473, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 4, &r), 18.980133875179921, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 5, &r), 17.220755271930768, TEST_TOL1, GSL_SUCCESS); + + /* Something wrong with the tolerances on these */ + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 5, &r), 22.217799896561268, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 8.0, 5, &r), 26.266814641176644, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (20.0, 5, &r), 41.413065513892636, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 6, &r), 20.371302959287563, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 6, &r), 25.430341154222704, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 8.0, 6, &r), 29.545659670998550, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 7, &r), 23.519452498689007, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 7, &r), 28.626618307291138, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 8.0, 7, &r), 32.795800037341462, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 8, &r), 26.666054258812674, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 8, &r), 31.811716724047763, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (10.0, 8, &r), 38.761807017881651, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 9, &r), 29.811598790892959, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 9, &r), 34.988781294559295, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (10.0, 9, &r), 42.004190236671805, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 1.5, 10, &r), 32.956389039822477, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 10, &r), 38.159868561967132, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 10, &r), 52.017241278881633, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 11, &r), 41.326383254047406, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 11, &r), 55.289204146560061, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 12, &r), 44.4893191232197314, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 12, &r), 58.5458289043850856, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 13, &r), 47.6493998066970948, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 13, &r), 61.7897598959450550, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 14, &r), 50.8071652030063595, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 14, &r), 65.0230502510422545, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 15, &r), 53.9630265583781707, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 15, &r), 68.2473219964207837, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 16, &r), 57.1173027815042647, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 16, &r), 71.4638758850226630, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 17, &r), 60.2702450729428077, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 17, &r), 74.6737687121404241, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 18, &r), 63.4220540458757799, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 18, &r), 77.8778689734863729, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 19, &r), 66.5728918871182703, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 19, &r), 81.0768977206328326, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 20, &r), 69.722891161716742, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (15.0, 20, &r), 84.271459069716442, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 23.0, 11, &r), 65.843393469524653, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 30.0, 11, &r), 74.797306585175426, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 32.0, 15, &r), 90.913637691861741, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 50.0, 15, &r), 113.69747988073942, TEST_TOL6, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 5.0, 22, &r), 76.020793430591605, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 10.0, 22, &r), 83.439189796105756, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, ( 12.0, 22, &r), 86.345496520534055, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (100.0, 22, &r), 199.82150220122519, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_zero_Jnu_e, (500.0, 22, &r), 649.34132440891735, TEST_TOL2, GSL_SUCCESS); + + sa = 0; + for(i=0; i<100; i++) { + J[i] = i/10.0; + } + gsl_sf_bessel_sequence_Jnu_e(2.0, GSL_MODE_DEFAULT, 100, J); + sa += ( test_sf_frac_diff(J[1], 0.0012489586587999188454 ) > TEST_TOL1 ); + sa += ( test_sf_frac_diff(J[20], 0.3528340286156377192 ) > TEST_TOL4 ); + sa += ( test_sf_frac_diff(J[50], 0.0465651162777522155 ) > TEST_TOL4 ); + gsl_test(sa, " gsl_sf_sequence_Jnu_e(2)"); + s += sa; + + sa = 0; + for(i=0; i<100; i++) { + J[i] = i; + } + gsl_sf_bessel_sequence_Jnu_e(12.0, GSL_MODE_DEFAULT, 100, J); + sa += ( test_sf_frac_diff(J[1], 4.999718179448405289e-13 ) > TEST_TOL1 ); + sa += ( test_sf_frac_diff(J[5], 7.627813166084551355e-05 ) > TEST_TOL1 ); + sa += ( test_sf_frac_diff(J[7], 2.655620035894568062e-03 ) > TEST_TOL3 ); + sa += ( test_sf_frac_diff(J[10], 6.337025497015601509e-02 ) > TEST_TOL3 ); + sa += ( test_sf_frac_diff(J[15], 0.23666584405476805591 ) > TEST_TOL3 ); + sa += ( test_sf_frac_diff(J[30], 0.14825335109966010021 ) > TEST_TOL3 ); + sa += ( test_sf_frac_diff(J[70], 0.04109913716555364262 ) > TEST_TOL4 ); + sa += ( test_sf_frac_diff(J[99], -0.0015052760501176728 ) > TEST_TOL5 ); + gsl_test(sa, " gsl_sf_sequence_Jnu_e(12)"); + s += sa; + + sa = 0; + for(i=0; i<100; i++) { + J[i] = i * 20; + } + gsl_sf_bessel_sequence_Jnu_e(1000.0, GSL_MODE_DEFAULT, 100, J); + sa += ( test_sf_frac_diff(J[50], 0.04473067294796404088 ) > TEST_TOL5 ); + sa += ( test_sf_frac_diff(J[99], 0.01400619760349853902 ) > TEST_TOL6 ); + gsl_test(sa, " gsl_sf_sequence_Jnu_e(1000)"); + s += sa; + + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_coulomb.c b/software/gsl-1.15/specfunc/test_coulomb.c new file mode 100644 index 000000000..899293c20 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_coulomb.c @@ -0,0 +1,442 @@ +/* specfunc/test_coulomb.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + +#define PRINT(n) printf("%22.18g %22.18g %22.18g %22.18g\n", F[n], Fp[n], G[n], Gp[n]) + +#define WKB_TOL (1.0e+04 * TEST_SQRT_TOL0) + + +int test_coulomb(void) +{ + gsl_sf_result r; + int status = 0; + int s = 0; + + char message_buff[2048]; + + /* const int kmax = 20; */ + /* double F[kmax+1], Fp[kmax+1], G[kmax+1], Gp[kmax+1]; */ + gsl_sf_result F, Fp, G, Gp; + double Fe, Ge; + double lam_min; + double lam_F; + double eta, x; + int k_G; + + TEST_SF(s, gsl_sf_hydrogenicR_1_e, (3.0, 2.0, &r), 0.025759948256148471036, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_1_e, (3.0, 10.0, &r), 9.724727052062819704e-13, TEST_TOL1, GSL_SUCCESS); + status += s; + + TEST_SF(s, gsl_sf_hydrogenicR_e, (4, 1, 3.0, 0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_e, (4, 0, 3.0, 2.0, &r), -0.03623182256981820062, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_e, (4, 1, 3.0, 2.0, &r), -0.028065049083129581005, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_e, (4, 2, 3.0, 2.0, &r), 0.14583027278668431009, TEST_TOL0, GSL_SUCCESS); + status += s; + + TEST_SF(s, gsl_sf_hydrogenicR_e, (100, 0, 3.0, 2.0, &r), -0.00007938950980052281367, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_e, (100, 10, 3.0, 2.0, &r), 7.112823375353605977e-12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hydrogenicR_e, (100, 90, 3.0, 2.0, &r), 5.845231751418131548e-245, TEST_TOL2, GSL_SUCCESS); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 1.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.6849374120059439677, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, -0.7236423862556063963, TEST_TOL3); + s += test_sf_check_result(message_buff, G, -0.8984143590920205487, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -0.5108047585190350106, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s," gsl_sf_coulomb_wave_FG_e(1.0, 5.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 10.0; + k_G = 2; + eta = 1.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.0006423773354915823698, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 0.0013299570958719702545, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 33.27615734455096130, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -45.49180102261540580, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s," gsl_sf_coulomb_wave_FG_e(1.0, 5.0, lam_F=10, lam_G=8)"); + status += s; + + lam_F = 4.0; + k_G = 2; + eta = 50.0; + x = 120.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.0735194711823798495, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 0.6368149124126783325, TEST_TOL3); + /* + s += test_sf_check_result(message_buff, G, , TEST_TOL5); + s += test_sf_check_result(message_buff, Gp, , TEST_TOL5); + */ + printf("%s", message_buff); + gsl_test(s," gsl_sf_coulomb_wave_FG_e(50.0, 120.0, lam_F=4, lam_G=2)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = -1000.0; + x = 1.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 9.68222518991341e-02, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 5.12063396274631e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 1.13936784379472e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -4.30243486522438e+00, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-1000.0, 1.0, lam_F=0, lam_G=0)"); + status += s; + + lam_min = 0.0; + eta = -50.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 1.52236975714236e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 2.03091041166137e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 4.41680690236251e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -6.76485374766869e-01, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-50.0, 5.0, lam_F=0, lam_G=0)"); + status += s; + + lam_min = 0.0; + eta = -50.0; + x = 1000.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, -0.2267212182760888523, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, -0.9961306810018401525, TEST_TOL3); + s += test_sf_check_result(message_buff, G, -0.9497684438900352186, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, 0.2377656295411961399, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-50.0, 1000.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 10.0; + k_G = 0; + eta = -50.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, -3.681143602184922e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 1.338467510317215e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 3.315883246109351e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, 1.510888628136180e+00, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-50.0, 5.0, lam_F=10, lam_G=10)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = -4.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 4.078627230056172e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 1.098212336357310e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 6.743270353832442e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -6.361104272804447e-01, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-4.0, 5.0, lam_F=0, lam_G=0"); + status += s; + + lam_F = 3.0; + k_G = 0; + eta = -4.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, -2.568630935581323e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 1.143229422014827e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 7.879899223927996e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, 3.859905878106713e-01, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(-4.0, 5.0, lam_F=3, lam_G=3"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 1.0; + x = 2.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 6.61781613832681e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 4.81557455709949e-01, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 1.27577878476828e+00, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -5.82728813097184e-01, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.0, 2.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 1.0; + x = 0.5; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.08315404535022023302, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 0.22693874616222787568, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 3.1060069279548875140, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -3.549156038719924236, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.0, 0.5, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.5; + k_G = 0; + eta = 1.0; + x = 0.5; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.04049078073829290935, TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 0.14194939168094778795, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 4.720553853049677897, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -8.148033852319180005, TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.0, 0.5, lam_F=0.5, lam_G=0.5)"); + status += s; + + lam_F = 0.1; + k_G = 0; + eta = 1.0; + x = 0.5; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.07365466672379703418, TEST_TOL5); + s += test_sf_check_result(message_buff, Fp, 0.21147121807178518647, TEST_TOL5); + s += test_sf_check_result(message_buff, G, 3.306705446241024890, TEST_TOL5); + s += test_sf_check_result(message_buff, Gp, -4.082931670935696644, TEST_TOL5); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.0, 0.5, lam_F=0.1, lam_G=0.1)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 8.0; + x = 1.05; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 9.882706082810274357e-09, TEST_TOL5); + s += test_sf_check_result(message_buff, Fp, 4.005167028235547770e-08, TEST_TOL5); + s += test_sf_check_result(message_buff, G, 1.333127992006686320e+07, TEST_SQRT_TOL0); + s += test_sf_check_result(message_buff, Gp, -4.715914530842402330e+07, TEST_SQRT_TOL0); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(8.0, 1.05, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.1; + k_G = 0; + eta = 8.0; + x = 1.05; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 9.611416736061987761e-09, TEST_TOL5); + s += test_sf_check_result(message_buff, Fp, 3.909628126126824140e-08, TEST_TOL5); + s += test_sf_check_result(message_buff, G, 1.365928464219262581e+07, 4.0*TEST_SQRT_TOL0); + s += test_sf_check_result(message_buff, Gp, -4.848117385783386850e+07, 4.0*TEST_SQRT_TOL0); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(8.0, 1.05, lam_F=0.1, lam_G=0.1)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 50.0; + x = 0.1; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 2.807788027954216071e-67, TEST_TOL5); + s += test_sf_check_result(message_buff, Fp, 9.677600748751576606e-66, TEST_TOL5); + s += test_sf_check_result(message_buff, G, 5.579810686998358766e+64, TEST_SQRT_TOL0); + s += test_sf_check_result(message_buff, Gp, -1.638329512756321424e+66, TEST_SQRT_TOL0); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(50.0, 0.1, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 10.0; + x = 5.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 1.7207454091787930614e-06, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, Fp, 3.0975994706405458046e-06, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, G, 167637.56609459967623, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, Gp, -279370.76655361803075, 10.0*WKB_TOL); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(10.0, 5.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 25.0; + x = 10.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 1.5451274501076114315e-16, 5.0*WKB_TOL); + s += test_sf_check_result(message_buff, Fp, 3.1390869393378630928e-16, 5.0*WKB_TOL); + s += test_sf_check_result(message_buff, G, 1.6177129008336318136e+15, 5.0*WKB_TOL); + s += test_sf_check_result(message_buff, Gp, -3.1854062013149740860e+15, 5.0*WKB_TOL); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(25.0, 10.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + k_G = 0; + eta = 1.0; + x = 9.2; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, -0.25632012319757955655, TEST_TOL5); + s += test_sf_check_result(message_buff, Fp, 0.91518792286724220370, TEST_TOL5); + s += test_sf_check_result(message_buff, G, 1.03120585918973466110, TEST_SQRT_TOL0); + s += test_sf_check_result(message_buff, Gp, 0.21946326717491250193, TEST_SQRT_TOL0); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.0, 9.2, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + eta = 10.0; + x = 10.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 0.0016262711250135878249, WKB_TOL); + s += test_sf_check_result(message_buff, Fp, 0.0017060476320792806014, WKB_TOL); + s += test_sf_check_result(message_buff, G, 307.87321661090837987, WKB_TOL); + s += test_sf_check_result(message_buff, Gp, -291.92772380826822871, WKB_TOL); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(10.0, 10.0, lam_F=0, lam_G=0)"); + status += s; + + lam_F = 0.0; + eta = 100.0; + x = 1.0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 8.999367996930662705e-126, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, Fp, 1.292746745757069321e-124, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, G, 3.936654148133683610e+123, 10.0*WKB_TOL); + s += test_sf_check_result(message_buff, Gp, -5.456942268061526371e+124, 10.0*WKB_TOL); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(100.0, 1.0, lam_F=0, lam_G=0)"); + status += s; + + /* compute F_1(eta=0,x=3.25), F'_1 and G_1(eta=0,x=3.25), G'_1 */ + + lam_F = 1.0; + eta = 0.0; + x = 3.25; + k_G = 0; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, sin(x)/x - cos(x), TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, -sin(x)/(x*x) + cos(x)/x +sin(x), TEST_TOL3); + s += test_sf_check_result(message_buff, G, cos(x)/x + sin(x), TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -cos(x)/(x*x) - sin(x)/x + cos(x), TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(3.25, 0.0, lam_F=1, lam_G=1)"); + status += s; + + /* compute F_1(eta=0,x=3.25), F'_1 and G_0(eta=0,x=3.25), G'_0 */ + + lam_F = 1.0; + eta = 0.0; + x = 3.25; + k_G = 1; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, sin(x)/x - cos(x), TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, -sin(x)/(x*x) + cos(x)/x +sin(x), TEST_TOL3); + s += test_sf_check_result(message_buff, G, cos(x), TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -sin(x), TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(3.25, 0.0, lam_F=1, lam_G=0)"); + status += s; + +#ifdef FIXME + /* compute F_37(eta=0,x), F'_37 and G_36(eta=0,x), G'_36 for + x=1.2693881947287221e-07 */ + + /* For eta=0 expanding A&S 4.3.1 gives + + FplusIG(L,r)={I*exp(-I*r)*sum(k=0,L,((L+k)!/(k!*(L-k)!))*(I^(L-k))*(2*r)^(-k)) + + or alternatively F+iG can be expressed in terms of bessel functions + + FplusIG(L,r)=sqrt(Pi*x/2)*besselh1(L+1/2,x)) + */ + + lam_F = 37.0; + eta = 0.0; + x = 1.2693881947287221e-07; + k_G = 1; + gsl_sf_coulomb_wave_FG_e(eta, x, lam_F, k_G, &F, &Fp, &G, &Gp, &Fe, &Ge); + s = 0; + message_buff[0] = 0; + s += test_sf_check_result(message_buff, F, 6.5890724278623412974127e-318 , TEST_TOL3); + s += test_sf_check_result(message_buff, Fp, 1.97248369961623986509839591990e-309, TEST_TOL3); + s += test_sf_check_result(message_buff, G, 4.46663541714903607940730e299, TEST_TOL3); + s += test_sf_check_result(message_buff, Gp, -1.26674311046140805594543e308 , TEST_TOL3); + printf("%s", message_buff); + gsl_test(s, " gsl_sf_coulomb_wave_FG_e(1.2693881947287221e-07, 0.0, lam_F=37, lam_G=36)"); + status += s; +#endif + + + return status; +} diff --git a/software/gsl-1.15/specfunc/test_dilog.c b/software/gsl-1.15/specfunc/test_dilog.c new file mode 100644 index 000000000..b377019e9 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_dilog.c @@ -0,0 +1,310 @@ +/* specfunc/test_dilog.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + + +int test_dilog(void) +{ + gsl_sf_result r; + gsl_sf_result r1, r2; + int s = 0; + + /* real dilog */ + + TEST_SF(s, gsl_sf_dilog_e, (-3.0, &r), -1.9393754207667089531, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (-0.5, &r), -0.4484142069236462024, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (-0.001, &r), -0.0009997501110486510834, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (0.1, &r), 0.1026177910993911, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (0.7, &r), 0.8893776242860387386, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (1.0, &r), 1.6449340668482260, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (1.5, &r), 2.3743952702724802007, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (2.0, &r), 2.4674011002723397, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, ( 5.0, &r), 1.7837191612666306277, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, ( 11.0, &r), 0.3218540439999117111, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (12.59, &r), 0.0010060918167266208634, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (12.595, &r), 0.00003314826006436236810, TEST_TOL5, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (13.0, &r), -0.07806971248458575855, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (20.0, &r), -1.2479770861745251168, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (150.0, &r), -9.270042702348657270, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dilog_e, (1100.0, &r), -21.232504073931749553, TEST_TOL0, GSL_SUCCESS); + + + /* complex dilog */ + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99999, M_PI/2.0, &r1, &r2), + -0.20561329262779687646, TEST_TOL0, + 0.91595774018131512060, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.991, M_PI/2.0, &r1, &r2), + -0.20250384721077806127, TEST_TOL0, + 0.90888544355846447810, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.98, M_PI/2.0, &r1, &r2), + -0.19871638377785918403, TEST_TOL2, + 0.90020045882981847610, TEST_TOL2, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.98, -M_PI/2.0, &r1, &r2), + -0.19871638377785918403, TEST_TOL2, + -0.90020045882981847610, TEST_TOL2, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.95, M_PI/2.0, &r1, &r2), + -0.18848636456893572091, TEST_TOL1, + 0.87633754133420277830, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.8, M_PI/2.0, &r1, &r2), + -0.13980800855429037810, TEST_TOL0, + 0.75310609092419884460, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.8, -M_PI/2.0, &r1, &r2), + -0.13980800855429037810, TEST_TOL0, + -0.75310609092419884460, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.5, M_PI/2.0, &r1, &r2), + -0.05897507442156586346, TEST_TOL1, + 0.48722235829452235710, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.5, -M_PI/2.0, &r1, &r2), + -0.05897507442156586346, TEST_TOL1, + -0.48722235829452235710, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.01, M_PI/2.0, &r1, &r2), + -0.000024999375027776215378, TEST_TOL3, + 0.009999888892888684820, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.01, -M_PI/2.0, &r1, &r2), + -0.000024999375027776215378, TEST_TOL3, + -0.009999888892888684820, TEST_TOL3, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/4.0, &r1, &r2), + 0.56273366219795547757, TEST_TOL3, + 0.97009284079274560384, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, -M_PI/4.0, &r1, &r2), + 0.56273366219795547757, TEST_TOL3, + -0.97009284079274560384, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 3.0*M_PI/4.0, &r1, &r2), + -0.66210902664245926235, TEST_TOL1, + 0.51995305609998319025, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 5.0*M_PI/4.0, &r1, &r2), + -0.66210902664245926235, TEST_TOL1, + -0.51995305609998319025, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, 3.0*M_PI/2.0, &r1, &r2), + -0.20215874509123277909, TEST_TOL1, + -0.90809733095648731408, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.25, 3.0*M_PI/2.0, &r1, &r2), + -0.01538741178141053563, TEST_TOL1, + -0.24830175098230686908, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.25, 15.0/8.0*M_PI, &r1, &r2), + 0.24266162342377302235, TEST_TOL1, + -0.10860883369274445067, TEST_TOL1, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/8.0, &r1, &r2), + 1.0571539648820244720, TEST_TOL0, + 0.7469145254610851318, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, M_PI/64.0, &r1, &r2), + 1.5381800285902999666, TEST_TOL0, + 0.1825271634987756651, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (0.99, -M_PI/8.0, &r1, &r2), + 1.05715396488202447202, TEST_TOL1, + -0.74691452546108513176, TEST_TOL1, + GSL_SUCCESS); + + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.00001, M_PI/2.0, &r1, &r2), + -0.20562022409960237363, TEST_TOL1, + 0.91597344814458309320, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (10.0, M_PI/2.0, &r1, &r2), + -3.0596887943287347304, TEST_TOL0, + 3.7167814930680685900, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (100.0, M_PI/2.0, &r1, &r2), + -11.015004738293824854, TEST_TOL0, + 7.2437843013083534970, TEST_TOL0, + GSL_SUCCESS); + + + /** tests brought up by Jim McElwaine bug report */ + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI/2.0, &r1, &r2), + -0.24099184177382733037, TEST_TOL1, + -0.99309132538137822631, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, 3.0*M_PI/2.0, &r1, &r2), + -0.24099184177382733037, TEST_TOL1, + -0.99309132538137822631, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -3.0*M_PI/2.0, &r1, &r2), + -0.24099184177382733037, TEST_TOL1, + 0.99309132538137822631, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI - 0.25*M_PI, &r1, &r2), + -0.72908565537087935118, TEST_TOL1, + 0.56225783937234862649, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, M_PI + 0.25*M_PI, &r1, &r2), + -0.72908565537087935118, TEST_TOL1, + -0.56225783937234862649, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, -M_PI/128.0, &r1, &r2), + 1.8881719454909716580, TEST_TOL1, + -0.3556738764969238976, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.1, M_PI/128.0, &r1, &r2), + 1.8881719454909716580, TEST_TOL1, + 0.3556738764969238976, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, M_PI/8.0, &r1, &r2), + 1.3498525763442498343, TEST_TOL1, + 1.4976532712229749493, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, -M_PI/8.0, &r1, &r2), + 1.3498525763442498343, TEST_TOL1, + -1.4976532712229749493, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, 2.0*M_PI + M_PI/8.0, &r1, &r2), + 1.3498525763442498343, TEST_TOL1, + 1.4976532712229749493, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_e, (1.5, 2.0*M_PI - M_PI/8.0, &r1, &r2), + 1.3498525763442498343, TEST_TOL1, + -1.4976532712229749493, TEST_TOL1, + GSL_SUCCESS); + + + /* tests of the (x,y) function, which is now the underlying implementation */ + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.0, 0.5, &r1, &r2), + -0.05897507442156586346, TEST_TOL1, + 0.48722235829452235710, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.0, -0.5, &r1, &r2), + -0.05897507442156586346, TEST_TOL1, + -0.48722235829452235710, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.91464073718617389108, 0.37885659804143889673, &r1, &r2), + 1.0571539648820244720, TEST_TOL0, + 0.7469145254610851318, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.91464073718617389108, -0.37885659804143889673, &r1, &r2), + 1.05715396488202447202, TEST_TOL1, + -0.74691452546108513176, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (-1.5, 0.0, &r1, &r2), + -1.1473806603755707541, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (0.5, 0.0, &r1, &r2), + 0.58224052646501250590, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_dilog_xy_e, (1.5, 0.0, &r1, &r2), + 2.3743952702724802007, TEST_TOL1, + -1.2738062049196005309, TEST_TOL1, + GSL_SUCCESS); + + + /* small set of spence tests, mostly to check the value on the cut */ + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (1.5, 0.0, &r1, &r2), + -0.44841420692364620244, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (0.5, 0.0, &r1, &r2), + 0.58224052646501250590, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (0.0, 0.0, &r1, &r2), + 1.6449340668482264365, TEST_TOL1, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, 0.0, &r1, &r2), + 2.3743952702724802007, TEST_TOL1, + -1.2738062049196005309, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, 1.0/1024.0, &r1, &r2), + 2.3723507455234125018, TEST_TOL1, + -1.2742581376517839070, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_spence_xy_e, (-0.5, -1.0/1024.0, &r1, &r2), + 2.3723507455234125018, TEST_TOL1, + 1.2742581376517839070, TEST_TOL1, + GSL_SUCCESS); + + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_gamma.c b/software/gsl-1.15/specfunc/test_gamma.c new file mode 100644 index 000000000..979935532 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_gamma.c @@ -0,0 +1,393 @@ +/* specfunc/test_gamma.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + + +int test_gamma(void) +{ + gsl_sf_result r; + gsl_sf_result r1, r2; + double sgn; + int s = 0; + + TEST_SF(s, gsl_sf_lngamma_e, (-0.1, &r), 2.368961332728788655 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (-1.0/256.0, &r), 5.547444766967471595 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (1.0e-08, &r), 18.420680738180208905 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (0.1, &r), 2.252712651734205 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (1.0 + 1.0/256.0, &r), -0.0022422226599611501448 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (2.0 + 1.0/256.0, &r), 0.0016564177556961728692 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (100.0, &r), 359.1342053695753 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (-1.0-1.0/65536.0, &r), 11.090348438090047844 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (-1.0-1.0/268435456.0, &r), 19.408121054103474300 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (-100.5, &r), -364.9009683094273518 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lngamma_e, (-100-1.0/65536.0, &r), -352.6490910117097874 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (0.7, &r, &sgn), 0.26086724653166651439, TEST_TOL1, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (0.1, &r, &sgn), 2.2527126517342059599, TEST_TOL0, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-0.1, &r, &sgn), 2.368961332728788655, TEST_TOL0, -1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-1.0-1.0/65536.0, &r, &sgn), 11.090348438090047844, TEST_TOL0, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-2.0-1.0/256.0, &r, &sgn), 4.848447725860607213, TEST_TOL0, -1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-2.0-1.0/65536.0, &r, &sgn), 10.397193628164674967, TEST_TOL0, -1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-3.0-1.0/8.0, &r, &sgn), 0.15431112768404182427, TEST_TOL2, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lngamma_sgn_e, (-100.5, &r, &sgn), -364.9009683094273518, TEST_TOL0, -1.0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gamma_e, (1.0 + 1.0/4096.0, &r), 0.9998591371459403421 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (1.0 + 1.0/32.0, &r), 0.9829010992836269148 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (2.0 + 1.0/256.0, &r), 1.0016577903733583299 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (9.0, &r), 40320.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (10.0, &r), 362880.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (100.0, &r), 9.332621544394415268e+155 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (170.0, &r), 4.269068009004705275e+304 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (171.0, &r), 7.257415615307998967e+306 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (-10.5, &r), -2.640121820547716316e-07 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_e, (-11.25, &r), 6.027393816261931672e-08 , TEST_TOL0, GSL_SUCCESS); /* exp()... not my fault */ + TEST_SF(s, gsl_sf_gamma_e, (-1.0+1.0/65536.0, &r), -65536.42280587818970 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gammastar_e, (1.0e-08, &r), 3989.423555759890865 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (1.0e-05, &r), 126.17168469882690233 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (0.001, &r), 12.708492464364073506 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (1.5, &r), 1.0563442442685598666 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (3.0, &r), 1.0280645179187893045 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (9.0, &r), 1.0092984264218189715 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (11.0, &r), 1.0076024283104962850 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (100.0, &r), 1.0008336778720121418 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (1.0e+05, &r), 1.0000008333336805529 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammastar_e, (1.0e+20, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gammainv_e, (1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (2.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (3.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (4.0, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gammainv_e, (10.0, &r), 1.0/362880.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (100.0, &r), 1.0715102881254669232e-156, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gammainv_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-1.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-2.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-3.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-4.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gammainv_e, (-10.5, &r), -1.0/2.640121820547716316e-07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-11.25, &r), 1.0/6.027393816261931672e-08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gammainv_e, (-1.0+1.0/65536.0, &r), -1.0/65536.42280587818970 , TEST_TOL1, GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_lngamma_complex_e, (5.0, 2.0, &r1, &r2), + 2.7487017561338026749, TEST_TOL0, + 3.0738434100497007915, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_lngamma_complex_e, (100.0, 100.0, &r1, &r2), + 315.07804459949331323, TEST_TOL1, + 2.0821801804113110099, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_lngamma_complex_e, (100.0, -1000.0, &r1, &r2), + -882.3920483010362817000, TEST_TOL1, + -2.1169293725678813270, TEST_TOL3, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_lngamma_complex_e, (-100.0, -1.0, &r1, &r2), + -365.0362469529239516000, TEST_TOL1, + -3.0393820262864361140, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF(s, gsl_sf_taylorcoeff_e, (10, 1.0/1048576.0, &r), 1.7148961854776073928e-67 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (10, 1.0/1024.0, &r), 2.1738891788497900281e-37 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (10, 1.0, &r), 2.7557319223985890653e-07 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (10, 5.0, &r), 2.6911444554673721340 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (10, 500.0, &r), 2.6911444554673721340e+20 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (100, 100.0, &r), 1.0715102881254669232e+42 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (1000, 200.0, &r), 2.6628790558154746898e-267 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_taylorcoeff_e, (1000, 500.0, &r), 2.3193170139740855074e+131 , TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fact_e, (0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fact_e, (1, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fact_e, (7, &r), 5040.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fact_e, (33, &r), 8.683317618811886496e+36 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_doublefact_e, (0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_doublefact_e, (1, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_doublefact_e, (7, &r), 105.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_doublefact_e, (33, &r), 6.332659870762850625e+18 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lnfact_e, (0, &r), 0.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnfact_e, (1, &r), 0.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnfact_e, (7, &r), 8.525161361065414300 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnfact_e, (33, &r), 85.05446701758151741 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lndoublefact_e, (0, &r), 0.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lndoublefact_e, (7, &r), 4.653960350157523371 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lndoublefact_e, (33, &r), 43.292252022541719660 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lndoublefact_e, (34, &r), 45.288575519655959140 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lndoublefact_e, (1034, &r), 3075.6383796271197707 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lndoublefact_e, (1035, &r), 3078.8839081731809169 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lnchoose_e, (7,3, &r), 3.555348061489413680 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnchoose_e, (5,2, &r), 2.302585092994045684 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_choose_e, (7,3, &r), 35.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_choose_e, (7,4, &r), 35.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_choose_e, (5,2, &r), 10.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_choose_e, (5,3, &r), 10.0 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_choose_e, (500,495, &r), 255244687600.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_choose_e, (500,5, &r), 255244687600.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_choose_e, (500,200, &r), 5.054949849935532221e+144 , TEST_TOL5, GSL_SUCCESS); + TEST_SF(s, gsl_sf_choose_e, (500,300, &r), 5.054949849935532221e+144 , TEST_TOL5, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lnpoch_e, (5, 0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnpoch_e, (5, 1.0/65536.0, &r), 0.000022981557571259389129, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnpoch_e, (5, 1.0/256.0, &r), 0.005884960217985189004, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnpoch_e, (7,3, &r), 6.222576268071368616, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnpoch_e, (5,2, &r), 3.401197381662155375, TEST_TOL0, GSL_SUCCESS); + + TEST_SF_SGN(s, gsl_sf_lnpoch_sgn_e, (5.0, 0.0, &r, &sgn), 0.0, TEST_TOL1, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lnpoch_sgn_e, (-4.5, 0.25, &r, &sgn), 0.7430116475119920117, TEST_TOL1, 1.0, GSL_SUCCESS); + TEST_SF_SGN(s, gsl_sf_lnpoch_sgn_e, (-4.5, 1.25, &r, &sgn), 2.1899306304483174731, TEST_TOL1, -1.0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_poch_e, (5, 0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (7,3, &r), 504.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (5,2, &r), 30.0 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (5,1.0/256.0, &r), 1.0059023106151364982 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_pochrel_e, (5,0, &r), 1.506117668431800472, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (7,3, &r), 503.0/3.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (5,2, &r), 29.0/2.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (5,0.01, &r), 1.5186393661368275330, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (-5.5,0.01, &r), 1.8584945633829063516, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (-5.5,-1.0/8.0, &r), 1.0883319303552135488, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (-5.5,-1.0/256.0, &r), 1.7678268037726177453, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pochrel_e, (-5.5,-11.0, &r), 0.09090909090939652475, TEST_TOL0, GSL_SUCCESS); + + /* Add tests for special cases with negative arguments */ + TEST_SF(s, gsl_sf_poch_e, (-9.0, -4.0, &r), 1.0/17160.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-9.0, -3.0, &r), -1.0/1320.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-9.0, -3.5, &r), 0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_poch_e, (-9.0, 4.0, &r), 3024.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-9.0, 3.0, &r), -504.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-9.0, 3.5, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_poch_e, (-9.0, 0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_poch_e, (-8.0, -4.0, &r), 1.0/11880.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-8.0, -3.0, &r), -1.0/990.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-8.0, +4.0, &r), 1680.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-8.0, +3.0, &r), -336.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-3.0, +4.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + + /* FIXME: we should be able to get an exact answer for poch(-a,a) if + gsl_sf_lngamma functions were fixed to handle integer arguments + exactly as a special case */ + TEST_SF(s, gsl_sf_poch_e, (-3.0, +3.0, &r), -6.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_poch_e, (-4.0, +4.0, &r), 24.0, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_poch_e, (-3.0, +100.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1e-100, 0.001, &r), 1.0, TEST_TOL0, GSL_SUCCESS) ; + TEST_SF(s, gsl_sf_gamma_inc_P_e, (0.001, 0.001, &r), 0.9936876467088602902, TEST_TOL0, GSL_SUCCESS) ; + TEST_SF(s, gsl_sf_gamma_inc_P_e, (0.001, 1.0, &r), 0.9997803916424144436, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (0.001, 10.0, &r), 0.9999999958306921828, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1.0, 0.001, &r), 0.0009995001666250083319, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1.0, 1.01, &r), 0.6357810204284766802, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1.0, 10.0, &r), 0.9999546000702375151, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (10.0, 10.01, &r), 0.5433207586693410570, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (10.0, 20.0, &r), 0.9950045876916924128, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1000.0, 1000.1, &r), 0.5054666401440661753, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1000.0, 2000.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + /* Test for failure of the Gautschi recurrence (now fixed) for x = a - 2 */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (34.0, 32.0, &r), 0.3849626436463866776322932129, TEST_TOL2, GSL_SUCCESS); + /* and the next test is gamma_inc_P(37,35-20*eps) */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (37.0, 3.499999999999999289e+01, &r), 0.3898035054195570860969333039, TEST_TOL2, GSL_SUCCESS); + + /* Regression test Martin Jansche BUG#12 */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (10, 1e-16, &r), 2.755731922398588814734648067e-167, TEST_TOL2, GSL_SUCCESS); + + /* Regression test for gsl_cdf_chisq_Pinv, (0.05, 1263131.0) */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1263131.0, 1261282.3637, &r), 0.04994777516935182963821362168, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (1263131.0, 1263131.0, &r), 0.500118321758657770672882362502514254, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.0, 0.001, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 0.001, &r), 0.006312353291139709793, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 1.0, &r), 0.00021960835758555639171, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 2.0, &r), 0.00004897691783098147880, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (0.001, 5.0, &r), 1.1509813397308608541e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0, 0.001, &r), 0.9990004998333749917, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0, 1.01, &r), 0.3642189795715233198, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0, 10.0, &r), 0.00004539992976248485154, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (10.0, 10.01, &r), 0.4566792413306589430, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (10.0, 100.0, &r), 1.1253473960842733885e-31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1000.0, 1000.1, &r), 0.4945333598559338247, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1000.0, 2000.0, &r), 6.847349459614753180e-136, TEST_TOL2, GSL_SUCCESS); + + + /* designed to trap the a-x=1 problem */ + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (100, 99.0, &r), 0.5266956696005394, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (200, 199.0, &r), 0.5188414119121281, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (100, 99.0, &r), 0.4733043303994607, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_P_e, (200, 199.0, &r), 0.4811585880878718, TEST_TOL2, GSL_SUCCESS); + + /* Test for x86 cancellation problems */ + TEST_SF(s, gsl_sf_gamma_inc_P_e, (5670, 4574, &r), 3.063972328743934e-55, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (5670, 4574, &r), 1.0000000000000000, TEST_TOL2, GSL_SUCCESS); + + + /* test suggested by Michel Lespinasse [gsl-discuss Sat, 13 Nov 2004] */ + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06-1.0, 1.0e+06-2.0, &r), 0.50026596175224547004, TEST_TOL3, GSL_SUCCESS); + + /* tests in asymptotic regime related to Lespinasse test */ + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06+2.0, 1.0e+06+1.0, &r), 0.50026596135330304336, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+06, 1.0e+06-2.0, &r), 0.50066490399940144811, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_Q_e, (1.0e+07, 1.0e+07-2.0, &r), 0.50021026104978614908, TEST_TOL2, GSL_SUCCESS); + + /* non-normalized "Q" function */ + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0/1048576.0, 1.0/1048576.0, &r), 13.285819596290624271, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.001, 1.0/1048576.0, &r), 13.381275128625328858, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0, 1.0/1048576.0, &r), 1.0485617142715768655e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.00001,0.001, &r), 6.3317681434563592142, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.0001,0.001, &r), 6.3338276439767189385, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.001, 0.001, &r), 6.3544709102510843793, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.5, 0.001, &r), 59.763880515942196981, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0, 0.001, &r), 992.66896046923884234, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-3.5, 0.001, &r), 9.0224404490639003706e+09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-10.5, 0.001, &r), 3.0083661558184815656e+30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.001, 0.1, &r), 1.8249109609418620068, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.5, 0.1, &r), 3.4017693366916154163, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-10.0, 0.1, &r), 8.9490757483586989181e+08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-10.5, 0.1, &r), 2.6967403834226421766e+09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.001, 1.0, &r), 0.21928612679072766340, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.5, 1.0, &r), 0.17814771178156069019, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0, 1.0, &r), 0.14849550677592204792, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-2.5, 1.0, &r), 0.096556648631275160264, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0, 10.0, &r), 3.8302404656316087616e-07, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.001, 10.0, &r), 4.1470562324807320961e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-0.5, 10.0, &r), 1.2609042613241570681e-06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-1.0, 10.0, &r), 3.8302404656316087616e-07, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-10.5, 10.0, &r), 6.8404927328441566785e-17, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-100.0, 10.0, &r), 4.1238327669858313997e-107, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (-200.0, 10.0, &r), 2.1614091830529343423e-207, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.0, 0.001, &r), 6.3315393641361493320, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.001, 0.001, &r), 6.3087159394864007261, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 1.0, 0.001, &r), 0.99900049983337499167, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 10.0, 0.001, &r), 362880.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.0, 1.0, &r), 0.21938393439552027368, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.001, 1.0, &r), 0.21948181320730279613, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 1.0, 1.0, &r), 0.36787944117144232160, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 10.0, 1.0, &r), 362879.95956592242045, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (100.0, 1.0, &r), 9.3326215443944152682e+155, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.0, 100.0, &r), 3.6835977616820321802e-46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 0.001, 100.0, &r), 3.7006367674063550631e-46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 1.0, 100.0, &r), 3.7200759760208359630e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, ( 10.0, 100.0, &r), 4.0836606309106112723e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gamma_inc_e, (100.0, 100.0, &r), 4.5421981208626694294e+155, TEST_TOL1, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_lnbeta_e, (1.0e-8, 1.0e-8, &r), 19.113827924512310617 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0e-8, 0.01, &r), 18.420681743788563403 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0e-8, 1.0, &r), 18.420680743952365472 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0e-8, 10.0, &r), 18.420680715662683009 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0e-8, 1000.0, &r), 18.420680669107656949 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (0.1, 0.1, &r), 2.9813614810376273949 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (0.1, 1.0, &r), 2.3025850929940456840 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (0.1, 100.0, &r), 1.7926462324527931217 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (0.1, 1000, &r), 1.5619821298353164928 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0, 1.00025, &r), -0.0002499687552073570, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0, 1.01, &r), -0.009950330853168082848 , TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (1.0, 1000.0, &r), -6.907755278982137052 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (100.0, 100.0, &r), -139.66525908670663927 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (100.0, 1000.0, &r), -336.4348576477366051 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnbeta_e, (100.0, 1.0e+8, &r), -1482.9339185256447309 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (1.0, 1.0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (1.0, 1.001, &r), 0.9990009990009990010 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (1.0, 5.0, &r), 0.2 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (1.0, 100.0, &r), 0.01 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (10.0, 100.0, &r), 2.3455339739604649879e-15 , TEST_TOL2, GSL_SUCCESS); + + /* Test negative arguments */ + TEST_SF(s, gsl_sf_beta_e, (2.5, -0.1, &r), -11.43621278354402041480, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (2.5, -1.1, &r), 14.555179906328753255202, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-0.25, -0.1, &r), -13.238937960945229110, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-1.25, -0.1, &r), -14.298052997820847439, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-100.1, -99.1, &r), -1.005181917797644630375787297e60, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-100.1, 99.3, &r), 0.0004474258199579694011200969001, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (100.1, -99.3, &r), 1.328660939628876472028853747, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-100.1, 1.2, &r), 0.00365530364287960795444856281, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (100.1, -1.2, &r), 1203.895236907821059270698160, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-100.1, -1.2, &r), -3236.073671884748847700283841, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (-100.001, 0.0099, &r), -853.946649365611147996495177, TEST_TOL4, GSL_SUCCESS); + + + /* Other test cases */ + TEST_SF(s, gsl_sf_beta_e, (1e-32, 1.5, &r), 1e32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_e, (1e-6, 0.5, &r), 1000001.386293677092419390336, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_e, (-1.5, 0.5, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_inc_e, (1.0, 1.0, 0.0, &r), 0.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (1.0, 1.0, 1.0, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (0.1, 0.1, 1.0, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 1.0, 0.5, &r), 0.5, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 0.1, 1.0, 0.5, &r), 0.9330329915368074160, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (10.0, 1.0, 0.5, &r), 0.0009765625000000000000, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (50.0, 1.0, 0.5, &r), 8.881784197001252323e-16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 0.1, 0.5, &r), 0.06696700846319258402, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 10.0, 0.5, &r), 0.99902343750000000000, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 50.0, 0.5, &r), 0.99999999999999911180, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 1.0, 0.1, &r), 0.10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 2.0, 0.1, &r), 0.19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 1.0, 2.0, 0.9, &r), 0.99, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (50.0, 60.0, 0.5, &r), 0.8309072939016694143, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (90.0, 90.0, 0.5, &r), 0.5, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, ( 500.0, 500.0, 0.6, &r), 0.9999999999157549630, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (5000.0, 5000.0, 0.4, &r), 4.518543727260666383e-91, TEST_TOL5, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (5000.0, 5000.0, 0.6, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (5000.0, 2000.0, 0.6, &r), 8.445388773903332659e-89, TEST_TOL5, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.1, 1.0, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.2, 1.0, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.2, -0.1, 1.0, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.2, 0.5, &r), 0.675252001958389971991335, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.2, -0.1, 0.5, &r), 0.324747998041610028008665, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.1, 0.0, &r), 0.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.2, 0.0, &r), 0.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.2, -0.1, 0.0, &r), 0.0, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_beta_inc_e, (-0.1, -0.2, 0.3, &r), 0.7469186777964287252, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_beta_inc_e, (-0.2, -0.1, 0.3, &r), 0.3995299653262016818, TEST_TOL2, GSL_SUCCESS); + + /* Bug report from Thomas Tanner */ + + TEST_SF(s, gsl_sf_beta_inc_e, (0.5, 101.5, 0.999457, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_hyperg.c b/software/gsl-1.15/specfunc/test_hyperg.c new file mode 100644 index 000000000..d8c284633 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_hyperg.c @@ -0,0 +1,692 @@ +/* specfunc/test_hyperg.c + * + * Copyright (C) 2007, 2009, 2010 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + + +int test_hyperg(void) +{ + gsl_sf_result r; + int s = 0; + + /* 0F1 */ + + TEST_SF(s, gsl_sf_hyperg_0F1_e, (1, 0.5, &r), 1.5660829297563505373, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (5, 0.5, &r), 1.1042674404828684574, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (100, 30, &r), 1.3492598639485110176, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (-0.5, 3, &r), -39.29137997543434276, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (-100.5, 50, &r), 0.6087930289227538496, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (1, -5.0, &r), -0.3268752818235339109, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_0F1_e, (-0.5, -5.0, &r),-4.581634759005381184, TEST_TOL1, GSL_SUCCESS); + + + /* 1F1 for integer parameters */ + + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (1, 1, 0.5, &r), 1.6487212707001281468, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (1, 2, 500.0, &r), 2.8071844357056748215e+214, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (1, 2, -500.0, &r), 0.002, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (8, 1, 0.5, &r), 13.108875178030540372, TEST_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, 1.0, &r), 131.63017574352619931, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, 10.0, &r), 8.514625476546280796e+09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, 100.0, &r), 1.5671363646800353320e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 20, 1.0, &r), 1.6585618002669675465, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 20, 10.0, &r), 265.26686430340188871, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 20, 100.0, &r), 3.640477355063227129e+34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 1.0, &r), 1.1056660194025527099, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 10.0, &r), 2.8491063634727594206, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 40.0, &r), 133.85880835831230986, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 80.0, &r), 310361.16228011433406, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 100.0, &r), 8.032171336754168282e+07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, 500.0, &r), 7.633961202528731426e+123, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, 1.0, &r), 6.892842729046469965e+07, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, 10.0, &r), 2.4175917112200409098e+28, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, 100.0, &r), 1.9303216896309102993e+110, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 200, 1.0, &r), 1.6497469106162459226, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 200, 10.0, &r), 157.93286197349321981, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 200, 100.0, &r), 2.1819577501255075240e+24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 200, 400.0, &r), 3.728975529926573300e+119, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 10.0, &r), 12.473087623658878813, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 100.0, &r), 9.071230376818550241e+11, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 150.0, &r), 7.160949515742170775e+18, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 200.0, &r), 2.7406690412731576823e+26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 300.0, &r), 6.175110613473276193e+43, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 400.0, &r), 1.1807417662711371440e+64, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 400, 600.0, &r), 2.4076076354888886030e+112, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, -1.0, &r), 0.11394854824644542810, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, -10.0, &r), 0.0006715506365396127863, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 1, -100.0, &r), -4.208138537480269868e-32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 50, -1.0, &r), 0.820006196079380, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, -10.0, &r), 0.38378859043466243, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, -100.0, &r), 0.0008460143401464189061, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, -500.0, &r), 1.1090822141973655929e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (10, 100, -10000.0, &r), 5.173783508088272292e-21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (50, 1, -90.0, &r), -1.6624258547648311554e-21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (50, 1, -100.0, &r), 4.069661775122048204e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (50, 1, -110.0, &r), 1.0072444993946236025e-25, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 10, -100.0, &r), -2.7819353611733941962e-37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, -90.0, &r), 7.501705041159802854e-22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, -100.0, &r), 6.305128893152291187e-25, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 1, -110.0, &r), -7.007122115422439755e-26, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (100, 10, -100.0, &r), -2.7819353611733941962e-37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 50, -1.0, &r), 0.016087060191732290813, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 50, -300.0, &r), -4.294975979706421471e-121, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 100, -1.0, &r), 0.13397521083325179687, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 100, -10.0, &r), 5.835134393749807387e-10, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 100, -100.0, &r), 4.888460453078914804e-74, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (200, 100, -500.0, &r), -1.4478509059582015053e-195, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-1, 1, 2.0, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-1, -2, 2.0, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-2, -3, 2.0, &r), 3.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, 1, 1.0, &r), 0.4189459325396825397, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, 1, 10.0, &r), 27.984126984126984127, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, 1, 100.0, &r), 9.051283795429571429e+12, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, 20, 1.0, &r), 0.0020203016320697069566, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, 1.0, &r), 1.6379141878548080173, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, 10.0, &r), 78.65202404521289970, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, 100.0, &r), 4.416169713262624315e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, 1.0, &r), 1.1046713999681950919, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, 10.0, &r), 2.6035952191039006838, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, 100.0, &r), 1151.6852040836932392, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, 1.0, &r), 1.6476859702535324743, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, 10.0, &r), 139.38026829540687270, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, 100.0, &r), 1.1669433576237933752e+19, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, -1.0, &r), 0.6025549561148035735, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, -10.0, &r), 0.00357079636732993491, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -20, -100.0, &r), 1.64284868563391159e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, -1.0, &r), 0.90442397250313899, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, -10.0, &r), 0.35061515251367215, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-10, -100, -100.0, &r), 8.19512187960476424e-09, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, -1.0, &r), 0.6061497939628952629, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, -10.0, &r), 0.0063278543908877674, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-100, -200, -100.0, &r), 4.34111795007336552e-25, TEST_TOL2, GSL_SUCCESS); + + + /* 1F1 */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, 1, &r), 2.0300784692787049755, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, 10, &r), 6172.859561078406855, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, 100, &r), 2.3822817898485692114e+42, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, 500, &r), 5.562895351723513581e+215, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.5, 2.5, 1, &r), 1.8834451238277954398, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.5, 2.5, 10, &r), 3128.7352996840916381, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, 1, &r), 110.17623733873889579, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, 10, &r), 6.146657975268385438e+09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, 100, &r), 9.331833897230312331e+55, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, 500, &r), 4.519403368795715843e+235, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 50.1, 2, &r), 1.5001295507968071788, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 50.1, 10, &r), 8.713385849265044908, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 50.1, 100, &r), 5.909423932273380330e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 50.1, 500, &r), 9.740060618457198900e+165, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, 1, &r), 5.183531067116809033e+07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, 10, &r), 1.6032649110096979462e+28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, 100, &r), 1.1045151213192280064e+110, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 50.1, 1, &r), 7.222953133216603757, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 50.1, 10, &r), 1.0998696410887171538e+08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 50.1, 100, &r), 7.235304862322283251e+63, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, -1, &r), 0.5380795069127684191, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, -10, &r), 0.05303758099290164485, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, -100, &r), 0.005025384718759852803, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.5, -500, &r), 0.0010010030151059555322, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1, 1.1, -500, &r), 0.00020036137599690208265, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, -1, &r), 0.07227645648935938168, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, -10, &r), 0.0003192415409695588126, TEST_TOL1, GSL_SUCCESS); + /* + sensitive to the pair_ratio hack in hyperg_1F1.c + TEST_SF_RLX(s, gsl_sf_hyperg_1F1_e, (10, 1.1, -100, &r), -8.293425316123158950e-16, 50.0*TEST_SNGL, GSL_SUCCESS); + */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (10, 1.1, -500, &r), -3.400379216707701408e-23, TEST_TOL2, GSL_SUCCESS); + + TEST_SF_RLX(s, gsl_sf_hyperg_1F1_e, (50, 1.1, -90, &r), -7.843129411802921440e-22, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (50, 1.1, -100, &r), 4.632883869540640460e-24, TEST_SQRT_TOL0, GSL_SUCCESS); + + /* FIXME: + tolerance is poor, but is consistent within reported error + */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (50, 1.1, -110.0, &r), 5.642684651305310023e-26, 0.03, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -1, &r), 0.0811637344096042096, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -10, &r), 0.00025945610092231574387, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -50, &r), 2.4284830988994084452e-13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -90, &r), 2.4468224638378426461e-22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -99, &r), 1.0507096272617608461e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -100, &r), 1.8315497474210138602e-24, TEST_TOL2, GSL_SUCCESS); + + /* FIXME: + Reported error is too small. + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -101, &r), -2.3916306291344452490e-24, 0.04, GSL_SUCCESS); + */ + + /* FIXME: + Reported error is too small. + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 1.1, -110, &r), -4.517581986037732280e-26, TEST_TOL0, GSL_SUCCESS); + */ + + /* FIXME: + Result is terrible, but reported error is very large, so consistent. + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, 10.1, -220, &r), -4.296130300021696573e-64, TEST_TOL1, GSL_SUCCESS); + */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -10.1, 10.0, &r), 10959.603204633058116, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -10.1, 1000.0, &r), 2.0942691895502242831e+23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -100.1, 10.0, &r), 2.6012036337980078062, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1000, -1000.1, 10.0, &r), 22004.341698908631636, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1000, -1000.1, 200.0, &r), 7.066514294896245043e+86, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-8.1, -10.1, -10.0, &r), 0.00018469685276347199258, TEST_TOL0, GSL_SUCCESS); + /* TEST_SF(s, gsl_sf_hyperg_1F1_e, (-8.1, -1000.1, -10.0, &r), 0.9218280185080036020, TEST_TOL0, GSL_SUCCESS); */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -5.1, 1, &r), 16.936141866089601635, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -5.1, 10, &r), 771534.0349543820541, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10, -5.1, 100, &r), 2.2733956505084964469e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, -1, &r), 0.13854540373629275583, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, -10, &r), -9.142260314353376284e+19, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, -100, &r), -1.7437371339223929259e+87, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, 1, &r), 7.516831748170351173, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, 10, &r), 1.0551632286359671976e+11, TEST_SQRT_TOL0, GSL_SUCCESS); + /* + These come out way off. On the other hand, the error estimates + are also very large; so much so that the answers are consistent + within the reported error. Something will need to be done about + this eventually + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, 50, &r), -7.564755600940346649e+36, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, -50.1, 100, &r), 4.218776962675977e+55, TEST_TOL3, GSL_SUCCESS); + */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10.5, -8.1, 0.1, &r), 1.1387201443786421724, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-10.5, -11.1, 1, &r), 2.5682766147138452362, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100.5, -80.1, 10, &r), 355145.4517305220603, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100.5, -102.1, 10, &r), 18678.558725244365016, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100.5, -500.1, 10, &r), 7.342209011101454, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100.5, -500.1, 100, &r), 1.2077443075367177662e+8, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-500.5, -80.1, 2, &r), 774057.8541325341699, TEST_TOL4, GSL_SUCCESS); + /* + UNIMPL + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, 1, &r), -2.1213846338338567395e+12, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, 10, &r), -6.624849346145112398e+39, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, 100, &r), -1.2413466759089171904e+129, TEST_TOL0, GSL_SUCCESS); + */ + /* + UNIMPL + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, -1, &r), 34456.29405305551691, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, -10, &r), -7.809224251467710833e+07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (100, -10.1, -100, &r), -5.214065452753988395e-07, TEST_TOL0, GSL_SUCCESS); + */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, 1, &r), 0.21519810496314438414, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, 10, &r), 8.196123715597869948, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, 100, &r), -1.4612966715976530293e+20, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 20.1, 1, &r), 0.0021267655527278456412, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 20.1, 10, &r), 2.0908665169032186979e-11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 20.1, 100, &r), -0.04159447537001340412, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, -1, &r), 2.1214770215694685282e+07, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, -10, &r), 1.0258848879387572642e+24, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 1.1, -100, &r), 1.1811367147091759910e+67, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 50.1, -1, &r), 6.965259317271427390, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 50.1, -10, &r), 1.0690052487716998389e+07, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-100, 50.1, -100, &r), 6.889644435777096248e+36, TEST_TOL3, GSL_SUCCESS); + + + /* Bug report from Fernando Pilotto */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-2.05, 1.0, 5.05, &r), 3.79393389516785e+00, TEST_TOL3, GSL_SUCCESS); + + + /* Bug reports from Ivan Liu */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-26, 2.0, 100.0, &r), 1.444786781107436954e+19, TEST_TOL3, GSL_SUCCESS); + +#ifdef FIXME + /* This one is computed with a huge error, there is loss of + precision but the error estimate flags the problem (assuming the + user looks at it). We should probably trap any return with + err>|val| and signal loss of precision */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-26.1, 2.0, 100.0, &r), 1.341557199575986995e+19, TEST_TOL3, GSL_SUCCESS); +#endif + + /* Bug report H.Moseby */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.2, 1.1e-15, 1.5, &r), 8254503159672429.02, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.0, 1000000.5, 0.8e6 + 0.5, &r), 4.999922505099443804e+00, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.0, 1000000.5, 1001000.5, &r), 3480.3699557431856166, TEST_TOL4, GSL_SUCCESS); + +#ifdef FIXME /* FIX THESE NEXT RELEASE */ + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.1, 1000000.5, 1001000.5, &r), 7304.6126942641350122, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (0.9, 1000000.5, 1001000.5, &r), 1645.4879293475410982, TEST_TOL3, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.1, 1000000.5, 1001000.5, &r), -5.30066488697455e-04, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (1.5, 1000000.5, 0.8e6 + 0.5, &r), 11.18001288977894650469927615, TEST_TOL4, GSL_SUCCESS); + + /* Bug report Lorenzo Moneta */ + + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.5, 1.5, -100., &r), 456.44010011787485545, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.5, 1.5, 99., &r), 4.13360436014643309757065e36, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.5, 1.5, 100., &r), 1.0893724312430935129254e37, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.5, 1.5, 709., &r), 8.7396804160264899999692120e298, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1.5, 1.5, 710., &r), 2.36563187217417898169834615e299, TEST_TOL4, GSL_SUCCESS); + + /* Bug report from Weibin Li */ + +#ifdef FIXME + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-37.8, 2.01, 103.58, &r), -6.21927211009e17, TEST_TOL1, GSL_SUCCESS); +#endif + + /* Testing BJG */ + +#ifdef COMPARISON_WITH_MATHEMATICA + /* Mathematica uses a different convention for M(-m,-n,x) */ + TEST_SF(s, gsl_sf_hyperg_1F1_int_e, (-1, -1, 0.1, &r), 1.1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_1F1_e, (-1, -1, 0.1, &r), 1.1, TEST_TOL0, GSL_SUCCESS); +#endif + + /* U for integer parameters */ + + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 0.0001, &r), 8.634088070212725330, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 0.01, &r), 4.078511443456425847, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 0.5, &r), 0.9229106324837304688, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 2.0, &r), 0.3613286168882225847, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 100, &r), 0.009901942286733018406, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1, 1000, &r), 0.0009990019940238807150, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 0.01, &r), 7.272361203006010000e+16, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 1, &r), 1957.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 5, &r), 1.042496, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 8, &r), 0.3207168579101562500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 50, &r), 0.022660399001600000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 100, &r), 0.010631236727200000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 8, 1000, &r), 0.0010060301203607207200, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 20, 1, &r), 1.7403456103284421000e+16, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 20, 20, &r), 0.22597813610531052969, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 50, 1, &r), 3.374452117521520758e+61, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 50, 50, &r), 0.15394136814987651785, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 0.1, &r), 1.0418325171990852858e+253, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 1, &r), 2.5624945006073464385e+154, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 50, &r), 3.0978624160896431391e+07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 100, &r), 0.11323192555773717475, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 200, &r), 0.009715680951406713589, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 100, 1000, &r), 0.0011085142546061528661, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, 1000, 2000, &r), 0.0009970168547036318206, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -1, 1, &r), 0.29817368116159703717, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -1, 10, &r), 0.07816669698940409380, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -10, 1, &r), 0.08271753756946041959, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -10, 5, &r), 0.06127757419425055261, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -10, 10, &r), 0.04656199948873187212, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -10, 20, &r), 0.031606421847946077709, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 0.01, &r), 0.009900000099999796950, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 1, &r), 0.009802970197050404429, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 10, &r), 0.009001648897173103447, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 20, &r), 0.008253126487166557546, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 50, &r), 0.006607993916432051008, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 90, &r), 0.005222713769726871937, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -100, 110, &r), 0.004727658137692606210, TEST_TOL2, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_int_e, (1, -1000, 1, &r), 0.0009980029970019970050, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (1, -1000, 1010, &r), 0.0004971408839859245170, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 1, 0.001, &r), 0.0007505359326875706975, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 1, 0.5, &r), 6.449509938973479986e-06, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 1, 8, &r), 6.190694573035761284e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 1, 20, &r), 3.647213845460374016e-12, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 8, 1, &r), 0.12289755012652317578, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 8, 10, &r), 5.687710359507564272e-09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (8, 8, 20, &r), 2.8175404594901039724e-11, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (100, 100, 0.01, &r), 1.0099979491941914867e+196, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (100, 100, 0.1, &r), 1.0090713562719862833e+97, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (100, 100, 1, &r), 0.009998990209084729106, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (100, 100, 20, &r), 1.3239363905866130603e-131, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 1, 0.01, &r), 3.274012540759009536e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 1, 1, &r), 1.5202710000000000000e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 1, 10, &r), 1.0154880000000000000e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 1, 100, &r), 3.284529863685482880e+19, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 10, 1, &r), 1.1043089864100000000e+11, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 100, 1, &r), 1.3991152402448957897e+20, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 100, 10, &r), 5.364469916567136000e+19, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 100, 100, &r), 3.909797568000000000e+12, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-10, 100, 500, &r), 8.082625576697984130e+25, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 1, 0.01, &r), 1.6973422555823855798e+64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 1, 1, &r), 7.086160198304780325e+63, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 1, 10, &r), 5.332862895528712200e+65, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 10, 1, &r), -7.106713471565790573e+71, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 100, 1, &r), 2.4661377199407186476e+104, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 10, 10, &r), 5.687538583671241287e+68, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, 100, 10, &r), 1.7880761664553373445e+102, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 1, 0.01, &r), 4.185245354032917715e+137, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 1, 0.1, &r), 2.4234043408007841358e+137, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 1, 10, &r), -1.8987677149221888807e+139, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 10, 10, &r), -5.682999988842066677e+143, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 100, 10, &r), 2.3410029853990624280e+189, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-90, 1000, 10, &r), 1.9799451517572225316e+271, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, -1, 10, &r), -9.083195466262584149e+64, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, -10, 10, &r), -1.4418257327071634407e+62, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, -100, 0.01, &r), 3.0838993811468983931e+93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-50, -100, 10, &r), 4.014552630378340665e+95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-100, -100, 10, &r), 2.0556466922347982030e+162, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-100, -200, 10, &r), 1.1778399522973555582e+219, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (-100, -200, 100, &r), 9.861313408898201873e+235, TEST_TOL3, GSL_SUCCESS); + + + /* U */ + + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 0.0001, 0.0001, &r), 1.0000576350699863577, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 0.0001, 1.0, &r), 0.9999403679233247536, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 0.0001, 100.0, &r), 0.9995385992657260887, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 1, 0.0001, &r), 1.0009210608660065989, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 1.0, 1.0, &r), 0.9999999925484179084, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 10, 1, &r), 13.567851006281412726, TEST_TOL3, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.0001, 10, 5, &r), 1.0006265020064596364, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 10, 10, &r), 0.9999244381454633265, TEST_TOL0, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.0001, 100, 1, &r), 2.5890615708804247881e+150, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.0001, 100, 10, &r), 2.3127845417739661466e+55, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.0001, 100, 50, &r), 6402.818715083582554, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 100, 98, &r), 0.9998517867411840044, TEST_TOL2, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.0001, 1000, 300, &r), 2.5389557274938010716e+213, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 1000, 999, &r), 0.9997195294193261604, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.0001, 1000, 1100, &r), 0.9995342990014584713, TEST_TOL1, GSL_SUCCESS); + TEST_SF_RLX(s, gsl_sf_hyperg_U_e, (0.5, 1000, 300, &r), 1.1977955438214207486e+217, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.5, 1000, 800, &r), 9.103916020464797207e+08, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.5, 1000, 998, &r), 0.21970269691801966806, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0.5, 0.5, 1.0, &r), 0.7578721561413121060, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (1, 0.0001, 0.0001, &r), 0.9992361337764090785, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (1, 0.0001, 1, &r), 0.4036664068111504538, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (1, 0.0001, 100, &r), 0.009805780851264329587, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (1, 1.2, 2.0, &r), 0.3835044780075602550, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (1, -0.0001, 1, &r), 0.4036388693605999482, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (8, 10.5, 1, &r), 27.981926466707438538, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (8, 10.5, 10, &r), 2.4370135607662056809e-8, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (8, 10.5, 100, &r), 1.1226567526311488330e-16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (10, -2.5, 10, &r), 6.734690720346560349e-14, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (10, 2.5, 10, &r), 6.787780794037971638e-13, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (10, 2.5, 50, &r), 2.4098720076596087125e-18, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 1, &r), -3.990841457734147e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 10, &r), 1.307472052129343e+8, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 50, &r), 3.661978424114088e+16, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 90, &r), 8.09469542130868e+19, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 99, &r), 2.546328328942063e+20, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 100, &r), 2.870463201832814e+20, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 1.1, 200, &r), 8.05143453769373e+23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 10.1, 0.1, &r), -3.043016255306515e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 10.1, 1, &r), -3.194745265896115e+12, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 10.1, 4, &r), -6.764203430361954e+07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 10.1, 10, &r), -2.067399425480545e+09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 10.1, 50, &r), 4.661837330822824e+14, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 100.4, 10, &r), -6.805460513724838e+66, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 100.4, 50, &r), -2.081052558162805e+18, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 100.4, 80, &r), 2.034113191014443e+14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 100.4, 100, &r), 6.85047268436107e+13, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-10.5, 100.4, 200, &r), 1.430815706105649e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-19.5, 82.1, 10, &r), 5.464313196201917432e+60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 10, &r), -5.5740216266953e+126, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 40, &r), 5.937463786613894e+91, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 50, &r), -1.631898534447233e+89, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 70, &r), 3.249026971618851e+84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-50.5, 100.1, 100, &r), 1.003401902126641e+85, TEST_TOL1, GSL_SUCCESS); + + /* Bug report from Stefan Gerlach */ + + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 4.0, 1.0, &r), 11.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 0.5, 3.14, &r), 1.1896, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 0.5, 1.13, &r), -1.3631, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 0.5, 0.0, &r), 0.75, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2.0, 0.5, 1e-20, &r), 0.75, TEST_TOL2, GSL_SUCCESS); + + /* U(a,b,x) for x<0 [bug #27859] */ + + /* Tests for b >= 0 */ + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, 0, -0.1, &r), 1, TEST_TOL0, GSL_SUCCESS); +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 0, -0.1, &r), -0.1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 0, -0.1, &r), 0.21, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 0, -0.1, &r), -0.661, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, 0, -0.1, &r), 2.7721, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, 0, -0.1, &r), -14.52201, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, 0, -0.1, &r), 91.230301, TEST_TOL0, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, 1, -0.1, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 1, -0.1, &r), -1.1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 1, -0.1, &r), 2.41, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 1, -0.1, &r), -7.891, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, 1, -0.1, &r), 34.3361, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, 1, -0.1, &r), -186.20251, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, 1, -0.1, &r), 1208.445361, TEST_TOL2, GSL_SUCCESS); + +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, ( 1, 2, -0.1, &r), -10.0, TEST_TOL0, GSL_SUCCESS); +#endif + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, 2, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 2, -0.1, &r), -2.1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 2, -0.1, &r), 6.61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 2, -0.1, &r), -27.721, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, 2, -0.1, &r), 145.2201, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, 2, -0.1, &r), -912.30301, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, 2, -0.1, &r), 6682.263421, TEST_TOL2, GSL_SUCCESS); + +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, ( 2, 3, -0.1, &r), 100.0, TEST_TOL0, GSL_SUCCESS); +#endif + TEST_SF(s, gsl_sf_hyperg_U_e, ( 1, 3, -0.1, &r), 90.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, 3, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 3, -0.1, &r), -3.10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 3, -0.1, &r), 12.81, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 3, -0.1, &r), -66.151, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, 3, -0.1, &r), 409.8241, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, 3, -0.1, &r), -2961.42351, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, 3, -0.1, &r), 24450.804481, TEST_TOL2, GSL_SUCCESS); + +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, ( 3, 4, -0.1, &r), -1000.0, TEST_TOL0, GSL_SUCCESS); +#endif + TEST_SF(s, gsl_sf_hyperg_U_e, ( 2, 4, -0.1, &r), -1900.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, ( 1, 4, -0.1, &r), -1810.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, 4, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 4, -0.1, &r), -4.10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 4, -0.1, &r), 21.01, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 4, -0.1, &r), -129.181, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, 4, -0.1, &r), 926.5481, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, 4, -0.1, &r), -7594.16401, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, 4, -0.1, &r), 70015.788541, TEST_TOL2, GSL_SUCCESS); + + /* Tests for b < 0 */ + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, -1, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, -1, -0.1, &r), 0.9, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, -1, -0.1, &r), 0.01, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, -1, -0.1, &r), -0.031, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, -1, -0.1, &r), 0.1281, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, -1, -0.1, &r), -0.66151, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, -1, -0.1, &r), 4.098241, TEST_TOL0, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, -2, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, -2, -0.1, &r), 1.9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, -2, -0.1, &r), 1.81, TEST_TOL2, GSL_SUCCESS); +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, -2, -0.1, &r), -0.001, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, -2, -0.1, &r), 0.0041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, -2, -0.1, &r), -0.02101, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, -2, -0.1, &r), 0.129181, TEST_TOL0, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, -3, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, -3, -0.1, &r), 2.9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, -3, -0.1, &r), 5.61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, -3, -0.1, &r), 5.429, TEST_TOL2, GSL_SUCCESS); +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, -3, -0.1, &r), 0.0001, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, -3, -0.1, &r), -0.00051, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, -3, -0.1, &r), 0.003121, TEST_TOL0, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_U_e, ( 0, -4, -0.1, &r), 1.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, -4, -0.1, &r), 3.9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, -4, -0.1, &r), 11.41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, -4, -0.1, &r), 22.259, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-4, -4, -0.1, &r), 21.7161, TEST_TOL2, GSL_SUCCESS); +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-5, -4, -0.1, &r), -1e-5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-6, -4, -0.1, &r), 0.000061, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-7, -4, -0.1, &r), -0.0004341, TEST_TOL0, GSL_SUCCESS); +#endif + + /* Tests for integer a */ + + TEST_SF(s, gsl_sf_hyperg_U_e, (-3, 0.5, -0.5, &r), -9.5, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-8, 0.5, -0.5, &r), 180495.0625, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-8, 1.5, -0.5, &r), 827341.0625, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-8, 1.5, -10, &r), 7.162987810253906e9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (3, 6, -0.5, &r), -296.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (3, 7, -0.5, &r), 2824, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (5, 12, -1.7, &r), -153.262676210016018065768591104, TEST_TOL2, GSL_SUCCESS); + + /* A few random tests */ + + TEST_SF(s, gsl_sf_hyperg_U_e, (0, 0, -0.5, &r), 1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0, 1, -0.5, &r), 1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (0, 1, -0.001, &r), 1, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 0.99, -0.1, &r), -1.09, TEST_TOL2, GSL_SUCCESS); + +#ifdef FIXME /* unimplemented case */ + TEST_SF(s, gsl_sf_hyperg_U_e, (-1, 0, -0.5, &r), -0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-2, 0, -0.5, &r), 1.25, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_e, (-7, 0, -0.1, &r), -668.2263421, TEST_TOL0, GSL_SUCCESS); +#endif + + TEST_SF(s, gsl_sf_hyperg_U_int_e, (3, 6, -0.5, &r), -296.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (3, 7, -0.5, &r), 2824, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_U_int_e, (5, 12, -1.7, &r), -153.262676210016018065768591104, TEST_TOL2, GSL_SUCCESS); + + /* Bug report from Raymond Rogers */ + + TEST_SF(s, gsl_sf_hyperg_U_e, (4.11, 0.11, 6.4, &r), 6.422378238765078623739153038e-5, TEST_TOL2, GSL_SUCCESS); + + /* 2F1 */ + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1, 1, 1, 0.5, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, 8, 1, 0.5, &r), 12451584.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, -8, 1, 0.5, &r), 0.13671875, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, -8.1, 1, 0.5, &r), 0.14147385378899930422, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, -8, 1, -0.5, &r), 4945.136718750000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, -8, -5.5, 0.5, &r), -906.6363636363636364, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, -8, -5.5, -0.5, &r), 24565.363636363636364, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, 8, 1, -0.5, &r), -0.006476312098196747669, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, 8, 5, 0.5, &r), 4205.714285714285714, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (8, 8, 5, -0.5, &r), 0.0028489656290296436616, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, 1, 0.99, &r), 1.2363536673577259280e+38 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -1.5, 0.99, &r), 3.796186436458346579e+46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -1.5, -0.99, &r), 0.14733409946001025146, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -8.5, 0.99, &r), -1.1301780432998743440e+65, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -8.5, -0.99, &r), -8.856462606575344483, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -21.5, 0.99, &r), 2.0712920991876073253e+95, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -21.5, -0.99, &r), -74.30517015382249216, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -100.5, 0.99, &r), -3.186778061428268980e+262, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (9, 9, -100.5, -0.99, &r), 2.4454358338375677520, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (25, 25, 1, -0.5, &r), -2.9995530823639545027e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/64.0, &r), 3.17175539044729373926, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/128.0, &r), 3.59937243502024563424, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/256.0, &r), 4.03259299524392504369, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/1024.0, &r), 4.90784159359675398250, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/65536.0, &r), 7.552266033399683914, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, 1.0-1.0/16777216.0, &r), 11.08235454026043830363, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, -1.0+1.0/1024.0, &r), 0.762910940909954974527, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, -1.0+1.0/65536.0, &r), 0.762762124908845424449, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 2.0, -1.0+1.0/1048576.0, &r), 0.762759911089064738044, TEST_TOL0, GSL_SUCCESS); + + /* added special handling with x == 1.0 , Richard J. Mathar, 2008-01-09 */ + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, 0.5, 3.0, 1.0, &r), 1.6976527263135502482014268 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (1.5, -4.2, 3.0, 1.0, &r), .15583601560025710649555254 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (-7.4, 0.7, -1.5, 1.0, &r), -.34478866959246584996859 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (0.1, -2.7, -1.5, 1.0, &r), 1.059766766063610122925 , TEST_TOL2, GSL_SUCCESS); + + /* Taylor Binnington a = 0 */ + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (0, -2, -4, 0.5, &r), 1.0 , TEST_TOL2, GSL_SUCCESS); + + /* Andrew Benson bug #24812 + in Pari: + poch(a,x) = { gamma(a+x)/gamma(a) } + t(a,b,c,x,k) = { (poch(a,k)*poch(b,k)/poch(c,k)) * (x^k)/(k!) } + suminf(k=0,t(-10.34, 2.05, 3.05, 0.1725,k)) */ + + TEST_SF(s, gsl_sf_hyperg_2F1_e, (-10.34, 2.05, 3.05, 0.1725, &r), 0.310473552213130010351006093079548, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_e, (-9.99999999999, 2.05, 3.05, 0.1725, &r),0.32141934630197487540298837643890, TEST_TOL2, GSL_SUCCESS); + + /* Didier Pinchon also bug #24812 */ + TEST_SF(s, gsl_sf_hyperg_2F1_e, (11, -1, 11.0/2.0, 0.125 , &r), 0.75, TEST_TOL2, GSL_SUCCESS); + + + + /* 2F1 conj */ + + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (1, 1, 1, 0.5, &r), 3.352857095662929028, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (8, 8, 1, 0.5, &r), 1.7078067538891293983e+09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (8, 8, 5, 0.5, &r), 285767.15696901140627, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (8, 8, 1, -0.5, &r), 0.007248196261471276276, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (8, 8, 5, -0.5, &r), 0.00023301916814505902809, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_e, (25, 25, 1, -0.5, &r), 5.1696944096e-06, TEST_SQRT_TOL0, GSL_SUCCESS); + + /* updated correct values, testing enabled, Richard J. Mathar, 2008-01-09 */ + + TEST_SF(s, gsl_sf_hyperg_2F0_e, (0.01, 1.0, -0.02, &r), .99980388665511730901180717 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F0_e, (0.1, 0.5, -0.02, &r), .99901595171179281891589794 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F0_e, (1, 1, -0.02, &r), .98075549650574351826538049000 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F0_e, (8, 8, -0.02, &r), .32990592849626965538692141 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F0_e, (50, 50, -0.02, &r), .2688995263772964415245902e-12 , TEST_TOL0, GSL_SUCCESS); + + + /* 2F1 renorm */ + + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (1, 1, 1, 0.5, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, 8, 1, 0.5, &r), 12451584.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, -8, 1, 0.5, &r), 0.13671875, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, -8, 1, -0.5, &r), 4945.13671875, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, -8, -5.5, 0.5, &r), -83081.19167659493609, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, -8, -5.5, -0.5, &r), 2.2510895952730178518e+06, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (8, 8, 5, 0.5, &r), 175.2380952380952381, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (9, 9, -1.5, 0.99, &r), 1.6063266334913066551e+46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (9, 9, -1.5, -0.99, &r), 0.06234327316254516616, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (5, 5, -1, 0.5, &r), 4949760.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (5, 5, -10, 0.5, &r), 139408493229637632000.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_renorm_e, (5, 5, -100, 0.5, &r), 3.0200107544594411315e+206, TEST_TOL3, GSL_SUCCESS); + + /* 2F1 conj renorm */ + + TEST_SF(s, gsl_sf_hyperg_2F1_conj_renorm_e, (9, 9, -1.5, 0.99, &r), 5.912269095984229412e+49, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_renorm_e, (9, 9, -1.5, -0.99, &r), 0.10834020229476124874, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_renorm_e, (5, 5, -1, 0.5, &r), 1.4885106335357933625e+08, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_renorm_e, (5, 5, -10, 0.5, &r), 7.968479361426355095e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hyperg_2F1_conj_renorm_e, (5, 5, -100, 0.5, &r), 3.1113180227052313057e+208, TEST_TOL3, GSL_SUCCESS); + + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_legendre.c b/software/gsl-1.15/specfunc/test_legendre.c new file mode 100644 index 000000000..ad1934b4e --- /dev/null +++ b/software/gsl-1.15/specfunc/test_legendre.c @@ -0,0 +1,552 @@ +/* specfunc/test_legendre.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include "test_sf.h" + + +int test_legendre(void) +{ + gsl_sf_result r; + double L[256], DL[256]; + int s = 0; + int sa; + + TEST_SF(s, gsl_sf_legendre_P1_e, (-0.5, &r), -0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P1_e, ( 0.5, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_P2_e, (0.0, &r), -0.5 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P2_e, (0.5, &r), -0.125, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P2_e, (1.0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P2_e, (100.0, &r), 14999.5 , TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_P3_e, ( -0.5, &r), 0.4375, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P3_e, ( 0.5, &r), -0.4375, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P3_e, ( 1.0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_P3_e, (100.0, &r), 2.49985e+06, TEST_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_legendre_Pl_e, (1, -0.5, &r), -0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1, 1.0e-8, &r), 1.0e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1, 0.5, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Pl_e, (10, -0.5, &r), -0.1882286071777345, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (10, 1.0e-8, &r), -0.24609374999999864648, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (10, 0.5, &r), -0.18822860717773437500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (10, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Pl_e, (99, -0.5, &r), 0.08300778172138770477, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (99, 1.0e-8, &r), -7.958923738716563193e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (99, 0.5, &r), -0.08300778172138770477, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (99, 0.999, &r), -0.3317727359254778874, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (99, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Pl_e, (1000, -0.5, &r), -0.019168251091650277878, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1000, 1.0e-8, &r), 0.0252250181770982897470252620, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1000, 0.5, &r), -0.019168251091650277878, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (1000, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Pl_e, (4000, -0.5, &r), -0.009585404456573080972, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (4000, 0.5, &r), -0.009585404456573080972, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Pl_e, (4000, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + sa = 0; + gsl_sf_legendre_Pl_array(100, 0.5, L); + TEST_SF_VAL(sa, L[0], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, L[10], +0.0, -0.18822860717773437500, TEST_TOL1); + TEST_SF_VAL(sa, L[100], +0.0, -0.06051802596186118687, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_array(100, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Pl_deriv_array(100, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -2.3171234130859375000, TEST_TOL1); + TEST_SF_VAL(sa, DL[100], +0.0, -7.0331691653942815112, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(100, 0.5)"); + s += sa; + sa = 0; + + gsl_sf_legendre_Pl_deriv_array(10, 1.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 55.0, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, 1.0)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, 1.0 - 1.0e-11, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 54.999999985150000001, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, 1.0 - 1.0e-11)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, -1.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -55.0, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, -1.0)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, -1.0 + 1.0e-11, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -54.999999985150000001, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, -1.0 + 1.0e-11)"); + s += sa; + + + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, -0.5, &r), -0.18822860717773437500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, 1.0e-08, &r), -0.24609374999999864648, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, 0.5, &r), -0.18822860717773437500, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 1, -0.5, &r), -2.0066877394361256516, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 1, 1.0e-08, &r), -2.7070312499999951725e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 1, 0.5, &r), 2.0066877394361256516, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 5, -0.5, &r), -30086.169706116174977, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 5, 1.0e-08, &r), -0.0025337812499999964949, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 5, 0.5, &r), 30086.169706116174977, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 5, 0.999, &r), -0.5036411489013270406, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, -0.5, &r), -6.617107444248382171e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, 1.0e-08, &r), 817.8987598063712851, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, 0.5, &r), 6.617107444248382171e+08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, 0.999, &r), -1.9831610803806212189e+09, TEST_TOL2, GSL_SUCCESS); + + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, L[0], +0.0, 5.3290705182007490275e-15, TEST_TOL1); + TEST_SF_VAL(sa, L[1], +0.0, -2.6645352591003721471e-14, TEST_TOL1); + TEST_SF_VAL(sa, L[98], +0.0, 2.2646284847349109694e-08, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 2^(-50)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, L[0], +0.0, 5.3290705182007490275e-15, TEST_TOL1); + TEST_SF_VAL(sa, L[1], +0.0, 2.6645352591003721471e-14, TEST_TOL1); + TEST_SF_VAL(sa, L[10], +0.0, 5.3343995887188313290e-12, TEST_TOL1); + TEST_SF_VAL(sa, L[98], +0.0, 2.2646284847349109694e-08, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 2^(-50)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_array(100, 5, 0.5, L); + TEST_SF_VAL(sa, L[0], +0.0, -460.3466286991656682, TEST_TOL1); + TEST_SF_VAL(sa, L[10], +0.0, 38852.51334152290535, TEST_TOL1 ); + TEST_SF_VAL(sa, L[95], +0.0, 6.617107444248382171e+08, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_array(100, 5, 0.999, L); + TEST_SF_VAL(sa, L[0], +0.0, -0.00016883550990916552255, TEST_TOL2); + TEST_SF_VAL(sa, L[10], +0.0, -30.651334850159821525, TEST_TOL2 ); + TEST_SF_VAL(sa, L[95], +0.0, -1.9831610803806212189e+09, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, 0.999)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_array(100, 5, -0.999, L); + TEST_SF_VAL(sa, L[0], +0.0, -0.00016883550990916552255, TEST_TOL2); + TEST_SF_VAL(sa, L[10], +0.0, -30.651334850159821525, TEST_TOL2 ); + TEST_SF_VAL(sa, L[95], +0.0, 1.9831610803806212189e+09, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, -0.999)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, 0.999, L, DL); + TEST_SF_VAL(sa, L[0], +0.0, 0.00599700000000000000, TEST_TOL1); + TEST_SF_VAL(sa, L[1], +0.0, 0.02995501500000000000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[0], +0.0, -5.9940000000000000000, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, -29.910045000000000000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[2], +0.0, -89.490629790000000000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[10], +0.0, -5703.9461633355291972, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[95], +0.0, 6.4518473603456858414E+06, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 0.999)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0e-15, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, -5.9999999999999940000, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, -29.999999999999910000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[2], +0.0, -89.999999999999490000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[10], +0.0, -6005.9999999996936940, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[95], +0.0, -2.2586255999928454270e+07, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0e-15)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0e-15, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 5.9999999999999940000, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, -29.999999999999910000, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[95], +0.0, -2.2586255999928454270e+07, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0e-15)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 5, 0.999, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.42187762481054616565, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 4.6341560284340909936, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[2], +0.0, 27.759505566959219127, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[10], +0.0, 76051.795860179545484, TEST_TOL1 ); + TEST_SF_VAL(sa, DL[95], +0.0, 3.0344503083851936814e+12, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 5, 0.999)"); + s += sa; + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 0, -0.5, &r), -0.24332702369300133776, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 0, 0.5, &r), -0.24332702369300133776, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 0, 0.999, &r), 1.2225754122797385990, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 5, -0.5, &r), -0.3725739049803293972, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 5, 1.0e-08, &r), -3.1377233589376792243e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 5, 0.5, &r), 0.3725739049803293972, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 5, 0.999, &r), -6.236870674727370094e-06, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 10, -0.5, &r), 0.12876871185785724117, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 10, 0.5, &r), 0.12876871185785724117, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (10, 10, 0.999, &r), 1.7320802307583118647e-14, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (200, 1, -0.5, &r), 0.3302975570099492931, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (200, 1, 0.5, &r), -0.3302975570099492931, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (200, 1, 0.999, &r), -1.4069792055546256912, TEST_TOL2, GSL_SUCCESS); + + + + /* Test case from alberto@physik.fu-berlin.de */ + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (3, 1, 0.0, &r), 0.323180184114150653007, TEST_TOL2, GSL_SUCCESS); + + /* Other test cases */ + + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (200, 1, -0.5, &r), 0.3302975570099492931418227583, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (140,135,1,&r), 0.0, TEST_TOL2, GSL_SUCCESS); + +#ifdef EXTENDED + TEST_SF(s, gsl_sf_legendre_sphPlm_e, (140,135,0.99998689456491752,&r), -6.54265253269093276310395668335e-305, TEST_TOL6, GSL_SUCCESS); +#endif + + sa = 0; + gsl_sf_legendre_sphPlm_array(100, 5, 0.5, L); + TEST_SF_VAL(sa, L[0], +0.0, -0.22609703187800460722, TEST_TOL1); + TEST_SF_VAL(sa, L[10], +0.0, 0.07452710323813558940, TEST_TOL1); + TEST_SF_VAL(sa, L[95], +0.0, 0.25865355990880161717, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 5, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_array(100, 2, 1.0 - 1.0/1125899906842624.0, L); + TEST_SF_VAL(sa, L[0], +0.0, 6.8616082064776657177e-16, TEST_TOL2); + TEST_SF_VAL(sa, L[10], +0.0, 4.8543150313086787324e-14, TEST_TOL2); + TEST_SF_VAL(sa, L[95], +0.0, 8.3138984963650838973e-12, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 2, 1.0 - 2^(-50))"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_array(100, 2, -1.0 + 1.0/1125899906842624.0, L); + TEST_SF_VAL(sa, L[0], +0.0, 6.8616082064776657177e-16, TEST_TOL2); + TEST_SF_VAL(sa, L[95], +0.0, -8.3138984963650838973e-12, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 2, -1.0 + 2^(-50))"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_deriv_array(100, 0, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -2.9953934850252897591, TEST_TOL1); + TEST_SF_VAL(sa, DL[95], +0.0, -36.411811015111761007, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 0, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_deriv_array(100, 1, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.19947114020071633897, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, -0.44603102903819277863, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 1.3658895325030216565, TEST_TOL1); + TEST_SF_VAL(sa, DL[99], +0.0, -27.925571865639037118, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 1, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_deriv_array(100, 1, 1.0 - 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 8.1973898803378530946e+06, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.8329921010504257405e+07, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 1.8439572562895384115e+08, TEST_TOL1); + TEST_SF_VAL(sa, DL[99], +0.0, 4.7682463136232210552e+09, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 1, 1.0 - 2^(-50))"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_deriv_array(100, 2, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, -0.38627420202318958034, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 0.25549636910832059085, TEST_TOL1); + TEST_SF_VAL(sa, DL[2], +0.0, 1.5053547230039006279, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 0.73576559668648243477, TEST_TOL1); + TEST_SF_VAL(sa, DL[98], +0.0, 28.444589950264378407, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 2, 0.5)"); + s += sa; + + sa = 0; + gsl_sf_legendre_sphPlm_deriv_array(100, 5, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.75365677292668202407, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 0.54346962777757450534, TEST_TOL1); + TEST_SF_VAL(sa, DL[2], +0.0, -0.98309969029001383773, TEST_TOL1); + TEST_SF_VAL(sa, DL[3], +0.0, -2.7728270988954534293, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -5.7407133315443482193, TEST_TOL1); + TEST_SF_VAL(sa, DL[95], +0.0, -25.893934624747394561, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, 0.5)"); + s += sa; + sa = 0; + + gsl_sf_legendre_sphPlm_deriv_array(100, 5, 1.0 - 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 1.7374288379067753301e-22, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 6.2643887625426827113e-22, TEST_TOL1); + TEST_SF_VAL(sa, DL[2], +0.0, 1.6482697200734667281e-21, TEST_TOL1); + TEST_SF_VAL(sa, DL[95], +0.0, 3.9890549466071349506e-15, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, 1.0 - 2^(-50))"); + s += sa; + + gsl_sf_legendre_sphPlm_deriv_array(100, 5, -1.0 + 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, -1.7374288379067753301e-22, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 6.2643887625426827113e-22, TEST_TOL1); + TEST_SF_VAL(sa, DL[2], +0.0, -1.6482697200734667281e-21, TEST_TOL1); + TEST_SF_VAL(sa, DL[95], +0.0, 3.9890549466071349506e-15, TEST_TOL3); + gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, -1.0 + 2^(-50))"); + s += sa; + + TEST_SF(s, gsl_sf_conicalP_half_e, (0.0, -0.5, &r), 0.8573827581049917129, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (0.0, 0.5, &r), 0.8573827581049917129, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (0.0, 2.0, &r), 0.6062611623284649811, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (0.0, 100.0, &r), 0.07979045091636735635, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_half_e, (10.0, -0.5, &r), 5.345484922591867188e+08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (10.0, 0.5, &r), 15137.910380385258370, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (10.0, 2.0, &r), 0.4992680691891618544, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (10.0, 100.0, &r), -0.07272008163718195685, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, -1.0e-3, &r), 1.3347639529084185010e+136, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 1.0e-8, &r), 1.0928098010940058507e+136, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 0.5, &r), 3.895546021611205442e+90, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 10.0, &r), -0.04308567180833581268, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 100.0, &r), -0.04694669186576399194, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 1000.0, &r), 0.023698140704121273277, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (200.0, 1.0e+8, &r), -0.00006790983312124277891, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_half_e, (1.0e+8, 1.1, &r), 1.1599311133054742944, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_half_e, (1.0e+8, 100.0, &r), 0.07971967557381557875, TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (0.0, -0.5, &r), 1.7956982494514644808, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (0.0, 0.5, &r), 0.8978491247257322404, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (0.0, 2.0, &r), 0.7984204253272901551, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (0.0, 100.0, &r), 0.4227531369388072584, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (10.0, -0.5, &r), 5.345484922591867181e+07, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (10.0, 0.5, &r), 1513.7910356104985334, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (10.0, 2.0, &r), 0.03439243987215615642, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (10.0, 100.0, &r), 0.003283756665952609624, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, -0.5, &r), 1.7699538115312304280e+179, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 1.0e-8, &r), 5.464049005470029253e+133, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 0.5, &r), 1.9477730108056027211e+88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 10.0, &r), 0.0012462575917716355362, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 100.0, &r), -0.0003225881344802625149, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 1000.0, &r), -0.00004330652890886567623, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (200.0, 1.0e+8, &r), 2.0943091278037078483e-07, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (1.0e+8, 1.1, &r), 2.092320445620989618e-09, 16.0*TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_mhalf_e, (1.0e+8, 100.0, &r), -3.359967833599016923e-11, 256.0*TEST_SQRT_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_conicalP_0_e, (0.0, -0.5, &r), 1.3728805006183501647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (0.0, 0.5, &r), 1.0731820071493643751, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (0.0, 2.0, &r), 0.9012862993604472987, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (0.0, 100.0, &r), 0.30091748588199264556, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_0_e, (10.0, -0.5, &r), 1.6795592815421804669e+08, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (10.0, 0.5, &r), 4826.034132009618240, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (10.0, 2.0, &r), 0.18798468917758716146, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (10.0, 100.0, &r), -0.008622130749987962529, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_0_e, (200.0, -0.5, &r), 2.502194818646823e+180, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_0_e, (1000.0, 100.0, &r), 0.0017908817653497715844, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (1000.0, 1000.0, &r), -0.0006566893804926284301, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_0_e, (1000.0, 1.0e+8, &r), 2.3167213561756390068e-06, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_1_e, (0.0, -0.5, &r), 0.4939371126656998499, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (0.0, 0.5, &r), 0.14933621085538265636, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (0.0, 2.0, &r), -0.13666874968871549533, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (0.0, 100.0, &r), -0.10544528203156629098, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_1_e, (10.0, -0.5, &r), 1.7253802958788312520e+09, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (10.0, 0.5, &r), 46781.02294059967988, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (10.0, 2.0, &r), 0.26613342643657444400, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (10.0, 100.0, &r), -0.23281959695501029796, TEST_TOL2, GSL_SUCCESS); + + + /* FIXME: Mathematica gets some brain-damaged numbers for + * these x < 0 points. I have checked what I am doing in detail, + * and it must be right because you can do it by summing + * manifestly positive definite quantities. + */ + TEST_SF(s, gsl_sf_conicalP_1_e, (200.0, -0.999, &r), 2.71635193199341135e+270, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (200.0, -0.9, &r), 4.2952493176812905e+234, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (200.0, -0.5, &r), 5.01159205956053439e+182, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (200.0, 0.999, &r), 195733.0396081538, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (200.0, 10.0, &r), -2.9272610662414349553, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_conicalP_1_e, (1000.0, 100.0, &r), -1.7783258105862399857, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (1000.0, 1000.0, &r), 0.4535161075156427179, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_1_e, (1000.0, 1.0e+8, &r), 0.0009983414549874888478, TEST_SQRT_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (2, 1.0, -0.5, &r), 1.6406279287008789526, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (10, 1.0, -0.5, &r), 0.000029315266725049129448, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (20, 1.0, -0.5, &r), 7.335769429462034431e-15, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (30, 1.0, -0.5, &r), 1.3235612394267378871e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (10, 1.0, 0.5, &r), 2.7016087199857873954e-10, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (20, 1.0, 0.5, &r), 1.1782569701435933399e-24, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (30, 1.0, 0.5, &r), 3.636240588303797919e-41, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (10, 1.0, 2.0, &r), 2.4934929626284934483e-10, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (20, 1.0, 2.0, &r), 1.1284762488012616191e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_sph_reg_e, (30, 100.0, 100.0, &r), -1.6757772087159526048e-64, TEST_TOL6, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (2, 1.0, -0.5, &r), 2.2048510472375258708, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (10, 1.0, -0.5, &r), 0.00007335034531618655690, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (20, 1.0, -0.5, &r), 2.5419860619212164696e-14, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (30, 1.0, -0.5, &r), 5.579714972260536827e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (10, 1.0, 0.5, &r), 1.1674078819646475282e-09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (20, 1.0, 0.5, &r), 7.066408031229072207e-24, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (30, 1.0, 0.5, &r), 2.6541973286862588488e-40, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (10, 1.0, 2.0, &r), 1.0736109751890863051e-09, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (20, 1.0, 2.0, &r), 6.760965304863386741e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_conicalP_cyl_reg_e, (30, 100.0, 100.0, &r), -4.268753482520651007e-63, TEST_TOL4, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0e-06, 1.0e-06, &r), 0.9999999999998333333 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0, 0.0, &r), 1.0 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0, 1.0, &r), 0.7160229153604338713 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0, 100.0, &r), -3.767437313149604566e-44 , TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0, 500.0, &r), -6.665351935878582205e-218, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (100.0, 1.0, &r), -0.004308757035378200029 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (100.0, 10.0, &r), 7.508054627912986427e-07 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1000.0, 1.0, &r), 0.0007036067909088818319 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0e+08, 1.0, &r), 7.927485371429105968e-09 , TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_0_e, (1.0e+08, 100.0, &r), -3.627118904186918957e-52 , 32.0*TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0e-06, 1.0e-06, &r), 3.333333333334222222e-07, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 1.0e-10, &r), 4.714045207910316829e-11, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 1.0, &r), 0.3397013994799344639, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 100.0, &r), -7.200624449531811272e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 500.0, &r), 4.192260336821728677e-218, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 0.01, &r), 0.30117664944267412324 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 1.0, &r), -0.007393833425336299309 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 10.0, &r), -5.031062029821254982e-07 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1000.0, 0.001, &r), 0.30116875865090396421 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1000.0, 1.0, &r), -0.0004776144516074971885 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0e+08, 1.0e-08, &r), 0.30116867893975679722 , TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0e+08, 1.0, &r), 3.0921097047369081582e-09, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0e+08, 100.0, &r), -6.496142701296286936e-52 , 32.0*TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e-06, 1.0e-06, &r), 1.1544011544013627977e-32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 1.0e-10, &r), 2.0224912016958766992e-52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 1.0, &r), 0.011498635037491577728, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 5.0, &r), 0.0020696945662545205776, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 7.0, &r), -0.0017555303787488993676, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 10.0, &r), 0.00008999979724504887101, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 100.0, &r), -4.185397793298567945e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0, 500.0, &r), 1.4235113901091961263e-217, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 100.0, 0.001, &r), 9.642762597222417946e-10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 100.0, 0.002, &r), 3.0821201254308036109e-08, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 100.0, 0.01, &r), 0.00009281069019005840532, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 100.0, 1.0, &r), -0.008043100696178624653, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 100.0, 10.0, &r), -3.927678432813974207e-07, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1000.0, 0.001, &r), 0.00009256365284253254503, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1000.0, 0.01, &r), -0.05553733815473079983, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 1.0e-08, &r), 0.00009256115861125841299, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_H3d_e, (5, 1.0e+08, 100.0, &r), -6.496143209092860765e-52 , 128.0*TEST_SQRT_TOL0, GSL_SUCCESS); + +#if FIXME + sa = 0; + gsl_sf_legendre_H3d_array(100, 1.0, 3.0, L); + TEST_SF_VAL(sa, L[0], +0.0, gsl_sf_legendre_H3d(0, 1.0, 3.0), 1.0e-12); + TEST_SF_VAL(sa, L[1], +0.0, gsl_sf_legendre_H3d(1, 1.0, 3.0), 1.0e-12); + TEST_SF_VAL(sa, L[10], +0.0, gsl_sf_legendre_H3d(10, 1.0, 3.0), 1.0e-12); + TEST_SF_VAL(sa, L[100], +0.0, gsl_sf_legendre_H3d(100, 1.0, 3.0), 1.0e-12); + gsl_test(sa, " gsl_sf_legendre_H3d_array(100, 1.0, 3.0)"); + s += sa; +#endif + + /* x = -1 + 2^-16 */ + TEST_SF(s, gsl_sf_legendre_Q0_e, (-0.9999847412109375, &r), -5.8917472200477175158028143531855, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, (-0.5, &r), -0.5493061443340548457, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, (-1e-10, &r), -1.000000000000000000e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, (1e-10, &r), 1.000000000000000000e-10, TEST_TOL0, GSL_SUCCESS); + /* x = 1 - 2^-16 */ + TEST_SF(s, gsl_sf_legendre_Q0_e, (0.9999847412109375, &r), 5.8917472200477175158028143531855, TEST_TOL4, GSL_SUCCESS); + /* x = 1 + 2^-16 */ + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 1.0000152587890625, &r), 5.8917548494422489138325509750429, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 1.5, &r), 0.8047189562170501873, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 9.99, &r), 0.1004364599660005447, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 10.0, &r), 0.1003353477310755806, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 10.01, &r), 0.1002344395571710243, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 100, &r), 0.010000333353334762015, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q0_e, ( 1e10, &r), 1.000000000000000000e-10, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Q1_e, (-0.9999847412109375, &r), 4.8916573191196772369, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (-0.5, &r), -0.7253469278329725772, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (-0.01, &r), -0.9998999966664666524, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (-1e-10, &r), -0.999999999999999999, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (0.0, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (1e-10, &r), -0.999999999999999999, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (0.0001, &r), -0.9999999899999999667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (0.01, &r), -0.9998999966664666524, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (0.5, &r), -0.7253469278329725772, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (0.9999847412109375, &r), 4.8916573191196772369, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, (1.0000152587890625, &r), 4.8918447504867045145, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 1.5, &r), 0.20707843432557528095, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 9.99, &r), 3.360235060345441639e-3, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 10.0, &r), 3.353477310755806357e-3, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 10.01, &r), 3.346739967281953346e-3, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 100.0, &r), 3.333533347620158821e-5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Q1_e, ( 1e10, &r), 3.333333333333333333e-21, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Ql_e, (10, -0.5, &r), -0.29165813966586752393, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (10, 0.5, &r), 0.29165813966586752393, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (10, 1.5, &r), 0.000014714232718207477406, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Ql_e, (100, -0.5, &r), -0.09492507395207282096, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (100, 0.5, &r), 0.09492507395207282096, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (100, 1.5, &r), 1.1628163435044121988e-43, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_legendre_Ql_e, (1000, -0.5, &r), -0.030105074974005303500, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (1000, 0.5, &r), 0.030105074974005303500, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_legendre_Ql_e, (1000, 1.1, &r), 1.0757258447825356443e-194, TEST_TOL3, GSL_SUCCESS); + + return s; +} diff --git a/software/gsl-1.15/specfunc/test_mathieu.c b/software/gsl-1.15/specfunc/test_mathieu.c new file mode 100644 index 000000000..95c9613b0 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_mathieu.c @@ -0,0 +1,212 @@ +/* specfunc/test_mathieu.c + * + * Copyright (C) 2003 Lowell Johnson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Author: L. Johnson */ + +#include +#include +#include "test_sf.h" + +#define NVAL 100 + +static double c[NVAL]; + +int test_mathieu(void) +{ + gsl_sf_result r; + gsl_sf_mathieu_workspace *work; + int s = 0; + int sa; + + TEST_SF(s, gsl_sf_mathieu_ce, (0, 0.0, 0.0, &r), + 0.7071067811865475, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 0.0, M_PI_2, &r), + 0.7071067811865475, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 5.0, 0.0, &r), + 0.04480018165188902, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 5.0, M_PI_2, &r), + 1.334848674698019, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 10.0, 0.0, &r), + 0.007626517570935782, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 10.0, M_PI_2, &r), + 1.468660470712856, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 15.0, 0.0, &r), + 0.001932508315204592, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 15.0, M_PI_2, &r), + 1.550108146686649, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 20.0, 0.0, &r), + 0.0006037438292242197, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 20.0, M_PI_2, &r), + 1.609890857395926, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 25.0, 0.0, &r), + 0.0002158630184146612, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (0, 25.0, M_PI_2, &r), + 1.657510298323475, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 0.0, 0.0, &r), + 1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 5.0, 0.0, &r), + 0.2565428793223637, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 10.0, 0.0, &r), + 0.05359874774717657, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 15.0, 0.0, &r), + 0.01504006645382623, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 20.0, 0.0, &r), + 0.005051813764712904, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (1, 25.0, 0.0, &r), + 0.001911051506657645, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 0.0, M_PI_2, &r), + 1.0000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 5.0, M_PI_2, &r), + 1.337433887022345, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 10.0, M_PI_2, &r), + 1.468755664102938, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 15.0, M_PI_2, &r), + 1.550115074357552, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 20.0, M_PI_2, &r), + 1.609891592603772, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (1, 25.0, M_PI_2, &r), + 1.657510398374516, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 0.0, 0.0, &r), + 1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 0.0, M_PI_2, &r), + -1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 5.0, 0.0, &r), + 0.7352943084006845, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 5.0, M_PI_2, &r), + -0.7244881519676682, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 10.0, 0.0, &r), + 0.2458883492913189, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 10.0, M_PI_2, &r), + -0.9267592641263211, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 15.0, 0.0, &r), + 0.07879282784639313, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 15.0, M_PI_2, &r), + -1.019966226030262, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 20.0, 0.0, &r), + 0.02864894314707431, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 20.0, M_PI_2, &r), + -1.075293228779687, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 25.0, 0.0, &r), + 0.0115128663308875, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (2, 25.0, M_PI_2, &r), + -1.116278953295253, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 0.0, 0.0, &r), + 1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 5.0, 0.0, &r), + 1.12480725063848, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 10.0, 0.0, &r), + 1.258019941308287, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 15.0, 0.0, &r), + 1.193432230413072, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 20.0, 0.0, &r), + 0.9365755314226215, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (5, 25.0, 0.0, &r), + 0.6106943100506986, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 0.0, M_PI_2, &r), + 1.0000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 5.0, M_PI_2, &r), + 0.9060779302023551, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 10.0, M_PI_2, &r), + 0.8460384335355106, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 15.0, M_PI_2, &r), + 0.837949340012484, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 20.0, M_PI_2, &r), + 0.8635431218533667, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (5, 25.0, M_PI_2, &r), + 0.8992683245108413, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 0.0, 0.0, &r), + 1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 0.0, M_PI_2, &r), + -1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 5.0, 0.0, &r), + 1.025995027089438, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 5.0, M_PI_2, &r), + -0.975347487235964, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 10.0, 0.0, &r), + 1.053815992100935, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 10.0, M_PI_2, &r), + -0.9516453181789554, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 15.0, 0.0, &r), + 1.084106311839221, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 15.0, M_PI_2, &r), + -0.9285480638845388, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 20.0, 0.0, &r), + 1.117788631259397, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 20.0, M_PI_2, &r), + -0.9057107845940974, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 25.0, 0.0, &r), + 1.156239918632239, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (10, 25.0, M_PI_2, &r), + -0.8826919105636903, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 0.0, 0.0, &r), + 1.00000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 5.0, 0.0, &r), + 1.011293732529566, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 10.0, 0.0, &r), + 1.022878282438181, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 15.0, 0.0, &r), + 1.034793652236873, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 20.0, 0.0, &r), + 1.047084344162887, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_ce, (15, 25.0, 0.0, &r), + 1.059800441813937, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 0.0, M_PI_2, &r), + -1.0000000, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 5.0, M_PI_2, &r), + -0.9889607027406357, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 10.0, M_PI_2, &r), + -0.9781423471832157, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 15.0, M_PI_2, &r), + -0.9675137031854538, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 20.0, M_PI_2, &r), + -0.9570452540612817, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_mathieu_se, (15, 25.0, M_PI_2, &r), + -0.9467086958780897, TEST_SNGL, GSL_SUCCESS); + + work = gsl_sf_mathieu_alloc(NVAL, 20.0); + sa = 0; + gsl_sf_mathieu_ce_array(0, 5, 0.0, M_PI_2, work, c); + sa += (test_sf_frac_diff(c[0], 0.7071067811865475) > TEST_SNGL); + sa += (test_sf_frac_diff(c[2], -1.0) > TEST_SNGL); + sa += (test_sf_frac_diff(c[4], 1.0) > TEST_SNGL); + gsl_test(sa, "gsl_sf_mathieu_ce_array"); + s += sa; + + sa = 0; + gsl_sf_mathieu_ce_array(0, 15, 20.0, 0.0, work, c); + sa += (test_sf_frac_diff(c[0], 0.0006037438292242197) > TEST_SNGL); + sa += (test_sf_frac_diff(c[1], 0.005051813764712904) > TEST_SNGL); + sa += (test_sf_frac_diff(c[2], 0.02864894314707431) > TEST_SNGL); + sa += (test_sf_frac_diff(c[5], 0.9365755314226215) > TEST_SNGL); + sa += (test_sf_frac_diff(c[10], 1.117788631259397) > TEST_SNGL); + sa += (test_sf_frac_diff(c[15], 1.047084344162887) > TEST_SNGL); + gsl_test(sa, "gsl_sf_mathieu_ce_array"); + s += sa; + + sa = 0; + gsl_sf_mathieu_se_array(1, 15, 20.0, M_PI_2, work, c); + sa += (test_sf_frac_diff(c[0], 1.609891592603772) > TEST_SNGL); + sa += (test_sf_frac_diff(c[4], 0.8635431218533667) > TEST_SNGL); + sa += (test_sf_frac_diff(c[14], -0.9570452540612817) > TEST_SNGL); + gsl_test(sa, "gsl_sf_mathieu_se_array"); + s += sa; + + gsl_sf_mathieu_free(work); + return s; +} diff --git a/software/gsl-1.15/specfunc/test_sf.c b/software/gsl-1.15/specfunc/test_sf.c new file mode 100644 index 000000000..51aa893a4 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_sf.c @@ -0,0 +1,2735 @@ +/* specfunc/test_sf.c + * + * Copyright (C) 2007 Brian Gough + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "test_sf.h" + + +double +test_sf_frac_diff(double x1, double x2) +{ + if(x1 == 0.0 && x2 == 0.0) { + return 0.0; + } + else if (x1 == 0.0) { + return fabs(x2); + } else if(x1 <= DBL_MAX && x2 <= DBL_MAX && (x1 + x2 != 0.0)) { + return fabs((x1-x2)/(x1+x2)); + } + else { + return 1.0; + } +} + + +/* Check a result against a given value and tolerance. + */ +int +test_sf_check_result(char * message_buff, gsl_sf_result r, double val, double tol) +{ + int s = 0; + double f = 0, d = 0; + + if (gsl_isnan(r.val) || gsl_isnan(val)) + { + s = (gsl_isnan(r.val) != gsl_isnan(val)) ? TEST_SF_INCONS : s; + } + else if (gsl_isinf(r.val) || gsl_isinf(val)) + { + s = (gsl_isinf(r.val) != gsl_isinf(val)) ? TEST_SF_INCONS : s; + } + else + { + f = test_sf_frac_diff(val, r.val); + d = fabs(val - r.val); + + if(d > 2.0 * TEST_SIGMA * r.err) s |= TEST_SF_INCONS; + if(r.err < 0.0) s |= TEST_SF_ERRNEG; + if(gsl_isinf(r.err)) s |= TEST_SF_ERRBAD; +#if TEST_EXCESSIVE_ERROR + if(d > 0 && r.err > 1e4 * fabs(val)*tol) s |= TEST_SF_ERRBIG; +#endif + if(f > TEST_FACTOR * tol) s |= TEST_SF_TOLBAD; + } + + if(s != 0) { + char buff[2048]; + sprintf(buff, " expected: %20.16e\n", val); + strcat(message_buff, buff); + sprintf(buff, " obtained: %20.16e +/- %.16e (rel=%g)\n", r.val, r.err, r.err/(fabs(r.val) + r.err)); + strcat(message_buff, buff); + sprintf(buff, " fracdiff: %20.16e\n", f); + strcat(message_buff, buff); + sprintf(buff, " tolerance: %20.16e\n", tol); + strcat(message_buff, buff); + } + + if(s & TEST_SF_INCONS) { + strcat(message_buff, " value/expected not consistent within reported error\n"); + } + if(s & TEST_SF_ERRNEG) { + strcat(message_buff, " reported error negative\n"); + } + if(s & TEST_SF_ERRBAD) { + strcat(message_buff, " reported error is bad\n"); + } + if(s & TEST_SF_ERRBIG) { + strcat(message_buff, " reported error is much too big\n"); + } + if(s & TEST_SF_TOLBAD) { + strcat(message_buff, " value not within tolerance of expected value\n"); + } + + return s; +} + +/* Check a result against a given value and tolerance. + */ +int +test_sf_check_e10(char * message_buff, int e10, int e10_in) +{ + int s = 0; + + if (e10 != e10_in) + { + s = TEST_SF_EXPBAD; + } + + if(s != 0) { + char buff[2048]; + sprintf(buff, " expected exponent: 10^%d\n", e10_in); + strcat(message_buff, buff); + sprintf(buff, " obtained exponent: 10^%d", e10); + strcat(message_buff, buff); + } + + if(s & TEST_SF_EXPBAD) { + strcat(message_buff, " exponent is incorrect\n"); + } + + return s; +} + +int +test_sf_check_val(char * message_buff, double rval, double val, double tol) +{ + int s = 0; + double f = test_sf_frac_diff(val, rval); + + if(f > TEST_FACTOR * tol) s |= TEST_SF_TOLBAD; + + if(s != 0) { + char buff[2048]; + sprintf(buff, " expected: %20.16e\n", val); + strcat(message_buff, buff); + sprintf(buff, " obtained: %20.16e\n", rval); + strcat(message_buff, buff); + sprintf(buff, " fracdiff: %20.16e\n", f); + strcat(message_buff, buff); + } + + if(s & TEST_SF_TOLBAD) { + strcat(message_buff, " value not within tolerance of expected value\n"); + } + + return s; +} + + +/* Relax the condition on the agreement and on the usefulness + * of the error estimate. + */ +int +test_sf_check_result_relax(char * message_buff, gsl_sf_result r, double val, double tol) +{ + int s = 0; + double f = test_sf_frac_diff(val, r.val); + + if(f > GSL_MAX_DBL(TEST_SNGL, TEST_FACTOR * tol)) s |= TEST_SF_INCONS; + if(r.err < 0.0) s |= TEST_SF_ERRNEG; + if(gsl_isinf(r.err)) s |= TEST_SF_ERRBAD; + if(f > TEST_FACTOR * tol) s |= TEST_SF_TOLBAD; + + if(s != 0) { + char buff[2048]; + sprintf(buff, " expected: %20.16e\n", val); + strcat(message_buff, buff); + sprintf(buff, " obtained: %20.16e +/- %.16e (rel=%g)\n", r.val, r.err, r.err/(fabs(r.val) + r.err)); + strcat(message_buff, buff); + sprintf(buff, " fracdiff: %20.16e\n", f); + strcat(message_buff, buff); + } + + if(s & TEST_SF_INCONS) { + strcat(message_buff, " value/expected not consistent MAX(tol,SINGLE_PREC)\n"); + } + if(s & TEST_SF_ERRNEG) { + strcat(message_buff, " reported error negative\n"); + } + if(s & TEST_SF_ERRBAD) { + strcat(message_buff, " reported error is bad\n"); + } + if(s & TEST_SF_TOLBAD) { + strcat(message_buff, " value not within tolerance of expected value\n"); + } + + return s; +} + + +/* Check a return value. + */ +int +test_sf_check_return(char * message_buff, int val_return, int expected_return) +{ + if(val_return != expected_return) { + char buff[256]; + sprintf(buff, " unexpected return code: %d\n", val_return); + strcat(message_buff, buff); + return TEST_SF_RETBAD; + } + else { + return 0; + } +} + + +int +test_sf (gsl_sf_result r, double val_in, double tol, int status, + int expect_return, const char * desc) +{ + char message_buff[4096]; + int local_s = 0; + + message_buff[0] = '\0'; + + local_s |= test_sf_check_result(message_buff, r, val_in, tol); + local_s |= test_sf_check_return(message_buff, status, expect_return); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e %22.18e\n", r.val, r.err); + } + return local_s; +} + +int +test_sf_e10 (gsl_sf_result_e10 re, double val_in, int e10_in, double tol, int status, + int expect_return, const char * desc) +{ + char message_buff[4096]; + int local_s = 0; + gsl_sf_result r; + r.val = re.val; r.err = re.err; + + message_buff[0] = '\0'; + + local_s |= test_sf_check_result(message_buff, r, val_in, tol); + local_s |= test_sf_check_e10(message_buff, re.e10, e10_in); + local_s |= test_sf_check_return(message_buff, status, expect_return); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e %22.18e 10^%d\n", re.val, re.err, re.e10); + } + return local_s; +} + + +int +test_sf_val (double val, double val_in, double tol, const char * desc) +{ + char message_buff[4096]; + int local_s = 0; + + message_buff[0] = '\0'; + + local_s |= test_sf_check_val(message_buff, val, val_in, tol); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e\n", val); + } + return local_s; +} + + +int +test_sf_rlx (gsl_sf_result r, double val_in, double tol, int status, + int expect_return, const char * desc) +{ + char message_buff[4096]; + int local_s = 0; + + message_buff[0] = '\0'; + + local_s |= test_sf_check_result_relax(message_buff, r, val_in, tol); + local_s |= test_sf_check_return(message_buff, status, expect_return); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e %22.18e\n", r.val, r.err); + } + return local_s; +} + + +int +test_sf_2 (gsl_sf_result r1, double val1, double tol1, + gsl_sf_result r2, double val2, double tol2, + int status, int expect_return, const char * desc) +{ + char message_buff[4096]; + int local_s = 0; + + message_buff[0] = '\0'; + + local_s |= test_sf_check_result(message_buff, r1, val1, tol1); + local_s |= test_sf_check_result(message_buff, r2, val2, tol2); + local_s |= test_sf_check_return(message_buff, status, expect_return); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e %22.18e\n", r1.val, r1.err); + printf(" %22.18e %22.18e\n", r2.val, r2.err); + } + return local_s; +} + +int +test_sf_sgn (gsl_sf_result r, double sgn, double val_in, double tol, double expect_sgn, int status, + int expect_return, const char * desc) +{ + char message_buff[4096]; + gsl_sf_result local_r; + int local_s = 0; + + message_buff[0] = '\0'; + + local_r.val = sgn; + local_r.err = 0.0; + local_s |= test_sf_check_result(message_buff, r, val_in, tol); + local_s |= test_sf_check_result(message_buff, local_r, expect_sgn, 0.0); + local_s |= test_sf_check_return(message_buff, status, expect_return); + + gsl_test(local_s, desc); + if(local_s != 0) { + /* printf(" %s %d\n", __FILE__, __LINE__); */ + printf("%s", message_buff); + printf(" %22.18e %22.18e\n", r.val, r.err); + } + return local_s; +} + +int test_clausen(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_clausen_e, (M_PI/20.0, &r), 0.4478882448133546, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_clausen_e, (M_PI/6.0, &r), 0.8643791310538927, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_clausen_e, (M_PI/3.0, &r), 1.0149416064096535, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_clausen_e, ( 2.0*M_PI + M_PI/3.0, &r), 1.0149416064096535, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_clausen_e, (100.0*M_PI + M_PI/3.0, &r), 1.0149416064096535, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_coupling(void) +{ + gsl_sf_result r; + int s = 0; + + /* Test 3j */ + + TEST_SF(s, gsl_sf_coupling_3j_e, (0, 1, 1, 0, 1, -1, &r), sqrt(1.0/2.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 1, -1, 0, &r), sqrt(1.0/6.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (2, 4, 6, 0, 2, -2, &r), sqrt(8.0/105.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 0, 0, 0, &r), sqrt(2.0/35.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 2, -2, 0, &r), 2.0/3.0*sqrt(2.0/35.0), TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 4, -4, 0, &r), 1.0/(3.0*sqrt(70.0)), TEST_TOL2, GSL_SUCCESS); + + /* Test 3j error checking */ + + TEST_SF(s, gsl_sf_coupling_3j_e, (-1, 1, 2, 1, -1, 0, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, -1, 2, 1, -1, 0, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, -2, 1, -1, 0, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + + /* Test |m_i|<=j_i */ + + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 2, -1, 0, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 1, -2, 0, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 1, -1, 3, &r), 0, 0, GSL_SUCCESS); + + /* Test triangle condition j1 + j2 >= j, j >= j2 - j1, j>= j1 - j2 */ + + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 3, 1, -1, 0, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (1, 4, 2, 1, -1, 0, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_3j_e, (4, 1, 2, 1, -1, 0, &r), 0, 0, GSL_SUCCESS); + + /* Test 6j */ + + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 2, 2, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 4, 4, 4, &r), -1.0/10.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 4, 4, 2, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 2, 2, 2, &r), -0.5/sqrt(5.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 4, 2, 2, 2, &r), sqrt(7.0/3.0)/10.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (6, 6, 6, 4, 4, 4, &r), -sqrt(3.0/5.0)/14.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (6, 6, 6, 4, 4, 2, &r), -sqrt(3.0/5.0)/7.0, TEST_TOL0, GSL_SUCCESS); + + /* Test 6j error checking */ + + TEST_SF(s, gsl_sf_coupling_6j_e, (-2, 2, 4, 2, 2, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, -2, 4, 2, 2, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, -4, 2, 2, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, -2, 2, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, -2, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 2, -2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + + /* Test 6j triangle conditions */ + + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 2, 7, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 7, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 7, 2, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 7, 2, 2, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (2, 7, 4, 2, 2, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_6j_e, (7, 2, 4, 2, 2, 2, &r), 0, 0, GSL_SUCCESS); + + /* Test 9j */ + + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 1, 2, &r), -sqrt(1.0/6.0)/10.0, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (8, 4, 10, 7, 3, 8, 1, 1, 2, &r), sqrt(7.0/3.0)/60.0, TEST_TOL2, GSL_SUCCESS); + + /* Test 9j error checking */ + + TEST_SF(s, gsl_sf_coupling_9j_e, (-4, 2, 4, 3, 3, 2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, -2, 4, 3, 3, 2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, -4, 3, 3, 2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, -3, 3, 2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, -3, 2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, -2, 1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, -1, 1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, -1, 2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 1, -2, &r), GSL_NAN, GSL_NAN, GSL_EDOM); + + TEST_SF(s, gsl_sf_coupling_9j_e, (10, 2, 4, 3, 3, 2, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 10, 4, 3, 3, 2, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 10, 3, 3, 2, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 10, 3, 2, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 10, 2, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 10, 1, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 10, 1, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 10, 2, &r), 0, 0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 1, 10, &r), 0, 0, GSL_SUCCESS); + return s; +} + +int test_dawson(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_dawson_e, (1.0e-15, &r), 1.0e-15, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dawson_e, (0.5, &r), 0.4244363835020222959, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dawson_e, (2.0, &r), 0.30134038892379196603, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_dawson_e, (1000.0, &r), 0.0005000002500003750009, TEST_TOL0, GSL_SUCCESS); + + return s; +} + +int test_debye(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_debye_1_e, (0.1, &r), 0.975277750004723276, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_1_e, (1.0, &r), 0.777504634112248239, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_1_e, (10.0, &r), 0.164443465679946027, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_debye_2_e, (0.1, &r), 0.967083287045302664, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_2_e, (1.0, &r), 0.70787847562782924, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_2_e, (10.0, &r), 0.0479714980201218708, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_debye_3_e, (0.1, &r), 0.962999940487211048, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_3_e, (1.0, &r), 0.674415564077814667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_3_e, (10.0, &r), 0.0192957656903454886, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_debye_4_e, (0.1, &r), 0.960555486124335944, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_4_e, (1.0, &r), 0.654874068886737049, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_4_e, (10.0, &r), 0.00967367556027115896, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_debye_5_e, (0.1, &r), 0.95892849428310568745, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_5_e, (1.0, &r), 0.6421002580217790246, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_5_e, (10.0, &r), 0.005701535852992908538, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_debye_6_e, (0.1, &r), 0.95776777382605465878, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_6_e, (1.0, &r), 0.63311142583495107588, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_debye_6_e, (10.0, &r), 3.7938493294615955279e-3, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_elementary(void) +{ + gsl_sf_result r; + double x = 0.2*DBL_MAX; + int s = 0; + + TEST_SF(s, gsl_sf_multiply_e, (-3.0,2.0, &r), -6.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_multiply_e, (x, 1.0/x, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_multiply_e, (x, 0.2, &r), 0.04*DBL_MAX, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_multiply_e, (x, 4.0, &r), 0.8*DBL_MAX, TEST_TOL1, GSL_SUCCESS); + s += ( gsl_sf_multiply_e(DBL_MAX, 1.1, &r) != GSL_EOVRFLW); + s += ( gsl_sf_multiply_e(DBL_MIN, DBL_MIN, &r) != GSL_EUNDRFLW); + s += ( gsl_sf_multiply_e(DBL_MIN, -DBL_MIN, &r) != GSL_EUNDRFLW); + + return s; +} + + +int test_ellint(void) +{ + gsl_sf_result r; + gsl_mode_t mode = GSL_MODE_DEFAULT; + int s = 0; + + TEST_SF(s, gsl_sf_ellint_Kcomp_e, ( 0.99, mode, &r), 3.3566005233611923760, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Kcomp_e, ( 0.50, mode, &r), 1.6857503548125960429, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Kcomp_e, (0.010, mode, &r), 1.5708355989121522360, TEST_TOL0, GSL_SUCCESS); + + /* Bug report from Thies Heidecke */ + TEST_SF(s, gsl_sf_ellint_Kcomp_e, ( 0.99999999906867742538, mode, &r), 11.4369284843320018031, TEST_SNGL, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.99, mode, &r), 1.0284758090288040010, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.50, mode, &r), 1.4674622093394271555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Ecomp_e, (0.01, mode, &r), 1.5707570561503852873, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_Pcomp_e, (0.99, 0.1, mode, &r), 3.13792612351836506315593, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Pcomp_e, (0.50, 0.1, mode, &r), 1.60455249360848890075108, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Pcomp_e, (0.01, 0.1, mode, &r), 1.49773208536003801277453, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_Dcomp_e, (0.99, mode, &r), 2.375395076351788975665323192, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Dcomp_e, (0.50, mode, &r), 0.8731525818926755496456335628, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_Dcomp_e, (0.01, mode, &r), 0.7854276176694868932799393751, TEST_TOL0, GSL_SUCCESS); + + /* Bug report from Will M. Farr bug #31362 */ + /* FIXME: we are accepting MAXITER as the return code, but really + this should be changed to EINVAL in the routine itself */ + + TEST_SF(s, gsl_sf_ellint_Kcomp_e, (GSL_NAN, mode, &r), GSL_NAN, GSL_NAN, GSL_EMAXITER); + TEST_SF(s, gsl_sf_ellint_Ecomp_e, (GSL_NAN, mode, &r), GSL_NAN, GSL_NAN, GSL_EMAXITER); + + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/3.0, 0.99, mode, &r), 1.3065333392738766762, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/3.0, 0.50, mode, &r), 1.0895506700518854093, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/3.0, 0.01, mode, &r), 1.0472129063770918952, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/3.0, 0.99, mode, &r), 0.8704819220377943536, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/3.0, 0.50, mode, &r), 1.0075555551444720293, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/3.0, 0.01, mode, &r), 1.0471821963889481104, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/3.0, 0.99, 0.5, mode, &r), 1.1288726598764099882, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/3.0, 0.50, 0.5, mode, &r), 0.9570574331323584890, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/3.0, 0.01, 0.5, mode, &r), 0.9228868127118118465, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RF_e, (5.0e-11, 1.0e-10, 1.0, mode, &r), 12.36441982979439, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RF_e, (1.0, 2.0, 3.0, mode, &r), 0.7269459354689082, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RD_e, (5.0e-11, 1.0e-10, 1.0, mode, &r), 34.0932594919337362, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RD_e, (1.0, 2.0, 3.0, mode, &r), 0.2904602810289906, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RC_e, (1.0, 2.0, mode, &r), 0.7853981633974482, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_RJ_e, (2.0, 3.0, 4.0, 5.0, mode, &r), 0.1429757966715675, TEST_TOL0, GSL_SUCCESS); + + /* E, argument phi > pi/2 */ + + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/2.0, 0.99, mode, &r), 1.02847580902880400098389, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/2.0, 0.50, mode, &r), 1.46746220933942715545980, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI/2.0, 0.01, mode, &r), 1.57075705615038528733708, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI/3.0, 0.99, mode, &r), 1.18646969601981364833972, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI/3.0, 0.50, mode, &r), 1.92736886353438228163734, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI/3.0, 0.01, mode, &r), 2.09433191591182246425715, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI, 0.99, mode, &r), 2.05695161805760800196777, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI, 0.50, mode, &r), 2.93492441867885431091959, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (M_PI, 0.01, mode, &r), 3.14151411230077057467416, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (4*M_PI/3, 0.99, mode, &r), 2.92743354009540235559582, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (4*M_PI/3, 0.50, mode, &r), 3.94247997382332634020184, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (4*M_PI/3, 0.01, mode, &r), 4.18869630868971868509117, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (3*M_PI/2.0, 0.99, mode, &r), 3.08542742708641200295166, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (3*M_PI/2.0, 0.50, mode, &r), 4.40238662801828146637939, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (3*M_PI/2.0, 0.01, mode, &r), 4.71227116845115586201123, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (5*M_PI/3, 0.99, mode, &r), 3.24342131407742165030750, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (5*M_PI/3, 0.50, mode, &r), 4.86229328221323659255693, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (5*M_PI/3, 0.01, mode, &r), 5.23584602821259303893130, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI, 0.99, mode, &r), 4.11390323611521600393555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI, 0.50, mode, &r), 5.86984883735770862183918, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (2*M_PI, 0.01, mode, &r), 6.28302822460154114934831, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (7*M_PI/3.0, 0.99, mode, &r), 4.98438515815301035756360, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (7*M_PI/3.0, 0.50, mode, &r), 6.87740439250218065112143, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (7*M_PI/3.0, 0.01, mode, &r), 7.33021042099048925976532, TEST_TOL0, GSL_SUCCESS); + + /* Test some negative arguments, phi < 0 */ + + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI/2.0, 0.99, mode, &r), -1.02847580902880400098389, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI/2.0, 0.50, mode, &r), -1.46746220933942715545980, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI/2.0, 0.01, mode, &r), -1.57075705615038528733708, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI/3.0, 0.99, mode, &r), -1.18646969601981364833972, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI/3.0, 0.50, mode, &r), -1.92736886353438228163734, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI/3.0, 0.01, mode, &r), -2.09433191591182246425715, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI, 0.99, mode, &r), -2.05695161805760800196777, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI, 0.50, mode, &r), -2.93492441867885431091959, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-M_PI, 0.01, mode, &r), -3.14151411230077057467416, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-4*M_PI/3, 0.99, mode, &r), -2.92743354009540235559582, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-4*M_PI/3, 0.50, mode, &r), -3.94247997382332634020184, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-4*M_PI/3, 0.01, mode, &r), -4.18869630868971868509117, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-3*M_PI/2.0, 0.99, mode, &r), -3.08542742708641200295166, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-3*M_PI/2.0, 0.50, mode, &r), -4.40238662801828146637939, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-3*M_PI/2.0, 0.01, mode, &r), -4.71227116845115586201123, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-5*M_PI/3, 0.99, mode, &r), -3.24342131407742165030750, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-5*M_PI/3, 0.50, mode, &r), -4.86229328221323659255693, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-5*M_PI/3, 0.01, mode, &r), -5.23584602821259303893130, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI, 0.99, mode, &r), -4.11390323611521600393555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI, 0.50, mode, &r), -5.86984883735770862183918, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-2*M_PI, 0.01, mode, &r), -6.28302822460154114934831, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_E_e, (-7*M_PI/3.0, 0.99, mode, &r), -4.98438515815301035756360, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-7*M_PI/3.0, 0.50, mode, &r), -6.87740439250218065112143, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_E_e, (-7*M_PI/3.0, 0.01, mode, &r), -7.33021042099048925976532, TEST_TOL0, GSL_SUCCESS); + + + /* F, argument phi > pi/2 */ + + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/2.0, 0.99, mode, &r), 3.35660052336119237603347, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/2.0, 0.50, mode, &r), 1.68575035481259604287120, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI/2.0, 0.01, mode, &r), 1.57083559891215223602641, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI/3.0, 0.99, mode, &r), 5.40666770744850807588478, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI/3.0, 0.50, mode, &r), 2.28195003957330667648585, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI/3.0, 0.01, mode, &r), 2.09445829144721257687207, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI, 0.99, mode, &r), 6.71320104672238475206694, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI, 0.50, mode, &r), 3.37150070962519208574241, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (M_PI, 0.01, mode, &r), 3.14167119782430447205281, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (4*M_PI/3, 0.99, mode, &r), 8.01973438599626142824910, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (4*M_PI/3, 0.50, mode, &r), 4.46105137967707749499897, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (4*M_PI/3, 0.01, mode, &r), 4.18888410420139636723356, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (3*M_PI/2.0, 0.99, mode, &r), 10.0698015700835771281004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (3*M_PI/2.0, 0.50, mode, &r), 5.05725106443778812861361, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (3*M_PI/2.0, 0.01, mode, &r), 4.71250679673645670807922, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (5*M_PI/3, 0.99, mode, &r), 12.1198687541708928279517, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (5*M_PI/3, 0.50, mode, &r), 5.65345074919849876222825, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (5*M_PI/3, 0.01, mode, &r), 5.23612948927151704892488, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI, 0.99, mode, &r), 13.4264020934447695041339, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI, 0.50, mode, &r), 6.74300141925038417148481, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (2*M_PI, 0.01, mode, &r), 6.28334239564860894410562, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (7*M_PI/3.0, 0.99, mode, &r), 14.7329354327186461803160, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (7*M_PI/3.0, 0.50, mode, &r), 7.83255208930226958074138, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (7*M_PI/3.0, 0.01, mode, &r), 7.33055530202570083928637, TEST_TOL0, GSL_SUCCESS); + + /* F, negative argument phi < 0 */ + + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI/2.0, 0.99, mode, &r), -3.35660052336119237603347, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI/2.0, 0.50, mode, &r), -1.68575035481259604287120, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI/2.0, 0.01, mode, &r), -1.57083559891215223602641, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI/3.0, 0.99, mode, &r), -5.40666770744850807588478, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI/3.0, 0.50, mode, &r), -2.28195003957330667648585, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI/3.0, 0.01, mode, &r), -2.09445829144721257687207, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI, 0.99, mode, &r), -6.71320104672238475206694, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI, 0.50, mode, &r), -3.37150070962519208574241, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-M_PI, 0.01, mode, &r), -3.14167119782430447205281, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-4*M_PI/3, 0.99, mode, &r), -8.01973438599626142824910, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-4*M_PI/3, 0.50, mode, &r), -4.46105137967707749499897, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-4*M_PI/3, 0.01, mode, &r), -4.18888410420139636723356, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-3*M_PI/2.0, 0.99, mode, &r), -10.0698015700835771281004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-3*M_PI/2.0, 0.50, mode, &r), -5.05725106443778812861361, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-3*M_PI/2.0, 0.01, mode, &r), -4.71250679673645670807922, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-5*M_PI/3, 0.99, mode, &r), -12.1198687541708928279517, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-5*M_PI/3, 0.50, mode, &r), -5.65345074919849876222825, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-5*M_PI/3, 0.01, mode, &r), -5.23612948927151704892488, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI, 0.99, mode, &r), -13.4264020934447695041339, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI, 0.50, mode, &r), -6.74300141925038417148481, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-2*M_PI, 0.01, mode, &r), -6.28334239564860894410562, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_F_e, (-7*M_PI/3.0, 0.99, mode, &r), -14.7329354327186461803160, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-7*M_PI/3.0, 0.50, mode, &r), -7.83255208930226958074138, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_F_e, (-7*M_PI/3.0, 0.01, mode, &r), -7.33055530202570083928637, TEST_TOL0, GSL_SUCCESS); + + /* P, argument phi > pi/2 */ + + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/2.0, 0.99, -0.1, mode, &r), 3.61678162163246646783050, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/2.0, 0.50, -0.1, mode, &r), 1.78030349465454812629168, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI/2.0, 0.01, -0.1, mode, &r), 1.65580719756898353270922, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI/3.0, 0.99, -0.1, mode, &r), 5.88008918207571119911983, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI/3.0, 0.50, -0.1, mode, &r), 2.43655207300356008717867, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI/3.0, 0.01, -0.1, mode, &r), 2.23211110528200554950903, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI, 0.99, -0.1, mode, &r), 7.23356324326493293566099, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI, 0.50, -0.1, mode, &r), 3.56060698930909625258336, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (M_PI, 0.01, -0.1, mode, &r), 3.31161439513796706541844, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (4*M_PI/3, 0.99, -0.1, mode, &r), 8.58703730445415467220216, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (4*M_PI/3, 0.50, -0.1, mode, &r), 4.68466190561463241798805, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (4*M_PI/3, 0.01, -0.1, mode, &r), 4.39111768499392858132786, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (3*M_PI/2.0, 0.99, -0.1, mode, &r), 10.8503448648973994034915, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (3*M_PI/2.0, 0.50, -0.1, mode, &r), 5.34091048396364437887504, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (3*M_PI/2.0, 0.01, -0.1, mode, &r), 4.96742159270695059812767, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (5*M_PI/3, 0.99, -0.1, mode, &r), 13.1136524253406441347808, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (5*M_PI/3, 0.50, -0.1, mode, &r), 5.99715906231265633976204, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (5*M_PI/3, 0.01, -0.1, mode, &r), 5.54372550041997261492747, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI, 0.99, -0.1, mode, &r), 14.4671264865298658713220, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI, 0.50, -0.1, mode, &r), 7.12121397861819250516672, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (2*M_PI, 0.01, -0.1, mode, &r), 6.62322879027593413083689, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (7*M_PI/3.0, 0.99, -0.1, mode, &r), 15.8206005477190876078631, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (7*M_PI/3.0, 0.50, -0.1, mode, &r), 8.24526889492372867057141, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (7*M_PI/3.0, 0.01, -0.1, mode, &r), 7.70273208013189564674630, TEST_TOL0, GSL_SUCCESS); + + /* P, negative argument phi < 0 */ + + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI/2.0, 0.99, -0.1, mode, &r), -3.61678162163246646783050, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI/2.0, 0.50, -0.1, mode, &r), -1.78030349465454812629168, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI/2.0, 0.01, -0.1, mode, &r), -1.65580719756898353270922, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI/3.0, 0.99, -0.1, mode, &r), -5.88008918207571119911983, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI/3.0, 0.50, -0.1, mode, &r), -2.43655207300356008717867, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI/3.0, 0.01, -0.1, mode, &r), -2.23211110528200554950903, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI, 0.99, -0.1, mode, &r), -7.23356324326493293566099, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI, 0.50, -0.1, mode, &r), -3.56060698930909625258336, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-M_PI, 0.01, -0.1, mode, &r), -3.31161439513796706541844, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-4*M_PI/3, 0.99, -0.1, mode, &r), -8.58703730445415467220216, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-4*M_PI/3, 0.50, -0.1, mode, &r), -4.68466190561463241798805, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-4*M_PI/3, 0.01, -0.1, mode, &r), -4.39111768499392858132786, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-3*M_PI/2.0, 0.99, -0.1, mode, &r), -10.8503448648973994034915, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-3*M_PI/2.0, 0.50, -0.1, mode, &r), -5.34091048396364437887504, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-3*M_PI/2.0, 0.01, -0.1, mode, &r), -4.96742159270695059812767, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-5*M_PI/3, 0.99, -0.1, mode, &r), -13.1136524253406441347808, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-5*M_PI/3, 0.50, -0.1, mode, &r), -5.99715906231265633976204, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-5*M_PI/3, 0.01, -0.1, mode, &r), -5.54372550041997261492747, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI, 0.99, -0.1, mode, &r), -14.4671264865298658713220, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI, 0.50, -0.1, mode, &r), -7.12121397861819250516672, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-2*M_PI, 0.01, -0.1, mode, &r), -6.62322879027593413083689, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_P_e, (-7*M_PI/3.0, 0.99, -0.1, mode, &r), -15.8206005477190876078631, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-7*M_PI/3.0, 0.50, -0.1, mode, &r), -8.24526889492372867057141, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_P_e, (-7*M_PI/3.0, 0.01, -0.1, mode, &r), -7.70273208013189564674630, TEST_TOL0, GSL_SUCCESS); + + /* D, argument phi > pi/2 */ + + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI/2.0, 0.99, 0, mode, &r), 2.375395076351788975665323192, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI/2.0, 0.50, 0, mode, &r), 0.8731525818926755496456335628, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI/2.0, 0.01, 0, mode, &r), 0.7854276176694868932799393751, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI/3.0, 0.99, 0, mode, &r), 4.305885125424644860264320635, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI/3.0, 0.50, 0, mode, &r), 1.418324704155697579394036402, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI/3.0, 0.01, 0, mode, &r), 1.263755353901126149206022061, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI, 0.99, 0, mode, &r), 4.750790152703577951330646444, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI, 0.50, 0, mode, &r), 1.746305163785351099291267125, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (M_PI, 0.01, 0, mode, &r), 1.570855235338973786559878750, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (4*M_PI/3, 0.99, 0, mode, &r), 5.195695179982511042396972113, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (4*M_PI/3, 0.50, 0, mode, &r), 2.074285623415004619188497818, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (4*M_PI/3, 0.01, 0, mode, &r), 1.877955116776821423913735408, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (3*M_PI/2.0, 0.99, 0, mode, &r), 7.126185229055366926995969476, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (3*M_PI/2.0, 0.50, 0, mode, &r), 2.619457745678026648936900687, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (3*M_PI/2.0, 0.01, 0, mode, &r), 2.356282853008460679839818125, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (5*M_PI/3, 0.99, 0, mode, &r), 9.056675278128222811594967044, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (5*M_PI/3, 0.50, 0, mode, &r), 3.164629867941048678685303509, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (5*M_PI/3, 0.01, 0, mode, &r), 2.834610589240099935765900794, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI, 0.99, 0, mode, &r), 9.501580305407155902661292832, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI, 0.50, 0, mode, &r), 3.492610327570702198582534249, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (2*M_PI, 0.01, 0, mode, &r), 3.141710470677947573119757500, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (7*M_PI/3.0, 0.99, 0, mode, &r), 9.946485332686088993727618315, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (7*M_PI/3.0, 0.50, 0, mode, &r), 3.820590787200355718479764901, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (7*M_PI/3.0, 0.01, 0, mode, &r), 3.448810352115795210473614120, TEST_TOL0, GSL_SUCCESS); + + /* P, negative argument phi < 0 */ + + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI/2.0, 0.99, 0, mode, &r), -2.375395076351788975665323192, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI/2.0, 0.50, 0, mode, &r), -0.8731525818926755496456335628, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI/2.0, 0.01, 0, mode, &r), -0.7854276176694868932799393751, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI/3.0, 0.99, 0, mode, &r), -4.305885125424644860264320635, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI/3.0, 0.50, 0, mode, &r), -1.418324704155697579394036402, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI/3.0, 0.01, 0, mode, &r), -1.263755353901126149206022061, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI, 0.99, 0, mode, &r), -4.750790152703577951330646444, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI, 0.50, 0, mode, &r), -1.746305163785351099291267125, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-M_PI, 0.01, 0, mode, &r), -1.570855235338973786559878750, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-4*M_PI/3, 0.99, 0, mode, &r), -5.195695179982511042396972113, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-4*M_PI/3, 0.50, 0, mode, &r), -2.074285623415004619188497818, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-4*M_PI/3, 0.01, 0, mode, &r), -1.877955116776821423913735408, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-3*M_PI/2.0, 0.99, 0, mode, &r), -7.126185229055366926995969476, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-3*M_PI/2.0, 0.50, 0, mode, &r), -2.619457745678026648936900687, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-3*M_PI/2.0, 0.01, 0, mode, &r), -2.356282853008460679839818125, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-5*M_PI/3, 0.99, 0, mode, &r), -9.056675278128222811594967044, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-5*M_PI/3, 0.50, 0, mode, &r), -3.164629867941048678685303509, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-5*M_PI/3, 0.01, 0, mode, &r), -2.834610589240099935765900794, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI, 0.99, 0, mode, &r), -9.501580305407155902661292832, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI, 0.50, 0, mode, &r), -3.492610327570702198582534249, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-2*M_PI, 0.01, 0, mode, &r), -3.141710470677947573119757500, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_ellint_D_e, (-7*M_PI/3.0, 0.99, 0, mode, &r), -9.946485332686088993727618315, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-7*M_PI/3.0, 0.50, 0, mode, &r), -3.820590787200355718479764901, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_ellint_D_e, (-7*M_PI/3.0, 0.01, 0, mode, &r), -3.448810352115795210473614120, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_erf(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_erfc_e, (-10.0, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (-5.0000002, &r), 1.9999999999984625433, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (-5.0, &r), 1.9999999999984625402, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (-1.0, &r), 1.8427007929497148693, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (-0.5, &r), 1.5204998778130465377, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (1.0, &r), 0.15729920705028513066, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (3.0, &r), 0.000022090496998585441373, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (7.0, &r), 4.183825607779414399e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erfc_e, (10.0, &r), 2.0884875837625447570e-45, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_log_erfc_e, (-1.0, &r), log(1.842700792949714869), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (-0.1, &r), 0.106576400586522485015, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (-1e-10, &r), 1.1283791670318505967e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (0.0, &r), log(1.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (1e-10, &r), -1.128379167159174551e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (0.001, &r), -0.0011290158896213548027, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (0.1, &r), -0.119304973737395598329, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (1.0, &r), log(0.15729920705028513066), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_erfc_e, (10.0, &r), log(2.0884875837625447570e-45), TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_erf_e, (-10.0, &r), -1.0000000000000000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erf_e, (0.5, &r), 0.5204998778130465377, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erf_e, (1.0, &r), 0.8427007929497148693, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erf_e, (10.0, &r), 1.0000000000000000000, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_erf_Z_e, (1.0, &r), 0.24197072451914334980, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_erf_Q_e, (10.0, &r), 7.619853024160526066e-24, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hazard_e, (-20.0, &r), 5.5209483621597631896e-88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (-10.0, &r), 7.6945986267064193463e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (-1.0, &r), 0.28759997093917836123, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, ( 0.0, &r), 0.79788456080286535588, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, ( 1.0, &r), 1.5251352761609812091, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (10.0, &r), 10.098093233962511963, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (20.0, &r), 20.049753068527850542, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (30.0, &r), 30.033259667433677037, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (50.0, &r), 50.019984031905639809, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (80.0, &r), 80.012496096798234468, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (150.0, &r), 150.00666607420571802, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (300.0, &r), 300.00333325926337415, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (900.0, &r), 900.00111110836764382, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (1001.0, &r), 1001.0009989990049990, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hazard_e, (2000.0, &r), 2000.0004999997500003, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_exp(void) +{ + gsl_sf_result r; + gsl_sf_result_e10 re; + double x; + int sa; + int s = 0; + + TEST_SF(s, gsl_sf_exp_e, (-10.0, &r), exp(-10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_e, ( 10.0, &r), exp( 10.0), TEST_TOL0, GSL_SUCCESS); + + sa = 0; + sa += gsl_sf_exp_e10_e(1.0, &re); + sa += ( test_sf_frac_diff(re.val, M_E ) > TEST_TOL0 ); + sa += ( re.err > TEST_TOL1 ); + sa += ( re.e10 != 0 ); + gsl_test(sa, " gsl_sf_exp_e10_e(1.0, &re)"); + + sa = 0; + sa += gsl_sf_exp_e10_e(2000.0, &re); + sa += ( test_sf_frac_diff(re.val, 3.88118019428363725 ) > TEST_TOL3 ); + sa += ( re.err > TEST_TOL5 ); + sa += ( re.e10 != 868 ); + gsl_test(sa, " gsl_sf_exp_e10_e(2000.0, &re)"); + + + TEST_SF(s, gsl_sf_exp_err_e, (-10.0, TEST_TOL1, &r), exp(-10.0), TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_err_e, ( 10.0, TEST_TOL1, &r), exp( 10.0), TEST_TOL1, GSL_SUCCESS); + + sa = 0; + sa += gsl_sf_exp_err_e10_e(1.0, TEST_SQRT_TOL0, &re); + sa += ( test_sf_frac_diff(re.val, M_E ) > TEST_TOL1 ); + sa += ( re.err > 32.0 * TEST_SQRT_TOL0 ); + sa += ( re.e10 != 0 ); + gsl_test(sa, " gsl_sf_exp_err_e10_e(1.0, TEST_SQRT_TOL0, &re)"); + + sa = 0; + sa += gsl_sf_exp_err_e10_e(2000.0, 1.0e-10, &re); + sa += ( test_sf_frac_diff(re.val, 3.88118019428363725 ) > TEST_TOL3 ); + sa += ( re.err > 1.0e-07 ); + sa += ( re.e10 != 868 ); + gsl_test(sa, " gsl_sf_exp_err_e10_e(2000.0, 1.0e-10, &re)"); + + + x = 0.8*GSL_LOG_DBL_MAX; + TEST_SF(s, gsl_sf_exp_mult_e, (-10.0, 1.0e-06, &r), 1.0e-06*exp(-10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (-10.0, 2.0, &r), 2.0*exp(-10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (-10.0, -2.0, &r), -2.0*exp(-10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, ( 10.0, 1.0e-06, &r), 1.0e-06*exp( 10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, ( 10.0, -2.0, &r), -2.0*exp( 10.0), TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, 1.00001, &r), 1.00001*exp(x), TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, 1.000001, &r), 1.000001*exp(x), TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, 1.000000001, &r), 1.000000001*exp(x), TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, 100.0, &r), 100.0*exp(x), TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, 1.0e+20, &r), 1.0e+20*exp(x), TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_e, (x, exp(-x)*exp(M_LN2), &r), 2.0, TEST_TOL4, GSL_SUCCESS ); + + TEST_SF(s, gsl_sf_exp_mult_err_e, (-10.0, TEST_SQRT_TOL0, 2.0, TEST_SQRT_TOL0, &r), 2.0*exp(-10.0), TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exp_mult_err_e, (x, TEST_SQRT_TOL0*x, exp(-x)*exp(M_LN2), TEST_SQRT_TOL0*exp(-x)*exp(M_LN2), &r), 2.0, TEST_SQRT_TOL0, GSL_SUCCESS ); + + sa = 0; + sa += gsl_sf_exp_mult_e10_e(1.0, 1.0, &re); + sa += ( test_sf_frac_diff(re.val, M_E ) > TEST_TOL0 ); + sa += ( re.err > TEST_TOL2 ); + sa += ( re.e10 != 0 ); + gsl_test(sa, "gsl_sf_exp_mult_e10_e(1.0, 1.0, &re)"); + TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (1.0, 1.0, &re), M_E, 0, TEST_TOL0, GSL_SUCCESS); + + sa = 0; + sa += gsl_sf_exp_mult_e10_e(1000.0, 1.0e+200, &re); + sa += ( test_sf_frac_diff(re.val, 1.970071114017046993888879352) > TEST_TOL3 ); + sa += ( re.err > 1.0e-11 ); + sa += ( re.e10 != 634 ); + gsl_test(sa, "gsl_sf_exp_mult_e10_e(1000.0, 1.0e+200, &re)"); + TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (1000.0, 1.0e+200, &re), 1.970071114017046993888879352, 634, TEST_TOL3, GSL_SUCCESS); + + sa = 0; + sa += gsl_sf_exp_mult_err_e10_e(1.0, TEST_TOL0, 1.0, TEST_TOL0, &re); + sa += ( test_sf_frac_diff(re.val, M_E ) > TEST_TOL0 ); + sa += ( re.err > TEST_TOL2 ); + sa += ( re.e10 != 0 ); + gsl_test(sa, "gsl_sf_exp_mult_err_e10_e(1.0, TEST_TOL0, 1.0, TEST_TOL0, &re)"); + TEST_SF_E10(s, gsl_sf_exp_mult_err_e10_e, (1.0, TEST_TOL0, 1.0, TEST_TOL0, &re), M_E, 0, TEST_TOL0, GSL_SUCCESS); + + sa = 0; + sa += gsl_sf_exp_mult_err_e10_e(1000.0, 1.0e-12, 1.0e+200, 1.0e+190, &re); + sa += ( test_sf_frac_diff(re.val, 1.9700711140165661 ) > TEST_TOL3 ); + sa += ( re.err > 1.0e-09 ); + sa += ( re.e10 != 634 ); + gsl_test(sa, "gsl_sf_exp_mult_err_e10_e(1.0e-12, 1.0e+200, &re)"); + TEST_SF_E10(s, gsl_sf_exp_mult_err_e10_e, (1000.0, 1.0e-12, 1.0e+200, 1.0e+190, &re), 1.9700711140165661,634, TEST_TOL3, GSL_SUCCESS); + + /* Test cases from Szymon Jaroszewicz */ + + TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (10000.0, 1.0, &re), 8.806818225662921587261496007, 4342, TEST_TOL5, GSL_SUCCESS); + TEST_SF_E10(s, gsl_sf_exp_mult_e10_e, (100.0, 1.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL2, GSL_SUCCESS); + TEST_SF_E10(s, gsl_sf_exp_e10_e, (100.0, &re), 2.688117141816135448412625551e43, 0, TEST_TOL2, GSL_SUCCESS); + TEST_SF_E10(s, gsl_sf_exp_e10_e, (1000.0, &re), 1.970071114017046993888879352, 434, TEST_TOL3, GSL_SUCCESS); + TEST_SF_E10(s, gsl_sf_exp_e10_e, (-100.0, &re), 3.720075976020835962959695803e-44, 0, TEST_TOL2, GSL_SUCCESS); + TEST_SF_E10(s, gsl_sf_exp_e10_e, (-1000.0, &re), 5.075958897549456765291809479, -435, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expm1_e, (-10.0, &r), exp(-10.0)-1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expm1_e, (-0.001, &r), -0.00099950016662500845, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expm1_e, (-1.0e-8, &r), -1.0e-08 + 0.5e-16, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expm1_e, ( 1.0e-8, &r), 1.0e-08 + 0.5e-16, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expm1_e, ( 0.001, &r), 0.0010005001667083417, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expm1_e, ( 10.0, &r), exp(10.0)-1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_e, (-10.0, &r), 0.0999954600070237515, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_e, (-0.001, &r), 0.9995001666250084, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_e, (-1.0e-8, &r), 1.0 - 0.5e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_e, ( 1.0e-8, &r), 1.0 + 0.5e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_e, ( 0.001, &r), 1.0005001667083417, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_e, ( 10.0, &r), 2202.5465794806716517, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_2_e, (-10.0, &r), 0.18000090799859524970, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_2_e, (-0.001, &r), 0.9996667499833361107, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_2_e, (-1.0e-8, &r), 0.9999999966666666750, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_2_e, ( 1.0e-8, &r), 1.0000000033333333417, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_2_e, ( 0.001, &r), 1.0003334166833361115, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_2_e, ( 10.0, &r), 440.3093158961343303, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_n_e, (3, -1000.0, &r), 0.00299400600000000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, -100.0, &r), 0.02940600000000000000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, -10.0, &r), 0.24599972760042142509, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, -3.0, &r), 0.5444917625849191238, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, -0.001, &r), 0.9997500499916678570, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, -1.0e-8, &r), 0.9999999975000000050, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 1.0e-8, &r), 1.0000000025000000050, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 0.001, &r), 1.0002500500083345240, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 3.0, &r), 2.5745637607083706091, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 3.1, &r), 2.6772417068460206247, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 10.0, &r), 131.79279476884029910, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (3, 100.0, &r), 1.6128702850896812690e+38, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_n_e, (50, -1000.0, &r), 0.04766231609253975959, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, -100.0, &r), 0.3348247572345889317, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, -10.0, &r), 0.8356287051853286482, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, -3.0, &r), 0.9443881609152163615, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, -1.0, &r), 0.980762245565660617, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, -1.0e-8, &r), 1.0 -1.0e-8/51.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 1.0e-8, &r), 1.0 +1.0e-8/51.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 1.0, &r), 1.01999216583666790, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 3.0, &r), 1.0624205757460368307, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 48.0, &r), 7.499573876877194416, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 50.1, &r), 9.311803306230992272, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 100.0, &r), 8.175664432485807634e+07, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (50, 500.0, &r), 4.806352370663185330e+146, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_n_e, (500, -1000.0, &r), 0.3334815803127619256, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, -100.0, &r), 0.8335646217536183909, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, -10.0, &r), 0.9804297803131823066, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, -3.0, &r), 0.9940475488850672997, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, -1.0, &r), 0.9980079602383488808, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, -1.0e-8, &r), 1.0 -1.0e-8/501.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 1.0e-8, &r), 1.0 +1.0e-8/501.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 1.0, &r), 1.0019999920160634252, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 3.0, &r), 1.0060240236632444934, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 48.0, &r), 1.1059355517981272174, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 100.0, &r), 1.2492221464878287204, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 500.0, &r), 28.363019877927630858, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 1000.0, &r), 2.4037563160335300322e+68, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_e, (500, 1600.0, &r), 7.899293535320607403e+226, TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_exprel_n_e, (1263131.0, 1261282.3637, &r), 545.0113107238425900305428360, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_exprel_n_CF_e, (6.315655e+05, 6.302583168053568806e+05, &r), 385.425369029433473098652465720, TEST_TOL4, GSL_SUCCESS); + + return s; +} + + +int test_expint(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_expint_E1_e, (-1.0, &r), -1.8951178163559367555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (1.0e-10, &r), 22.448635265138923980, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (1.0e-05, &r), 10.935719800043695615, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (0.1, &r), 1.82292395841939066610, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (1.0, &r), 0.21938393439552027368, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (10.0, &r), 4.156968929685324277e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (50.0, &r), 3.783264029550459019e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_e, (300.0, &r), 1.710384276804510115e-133, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_E2_e, (-1.0, &r), 0.8231640121031084799, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (1.0/4294967296.0, &r), 0.9999999947372139168, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (1.0/65536.0, &r), 0.9998243233207178845, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (0.1, &r), 0.7225450221940205066, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (1.0, &r), 0.14849550677592204792, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (10.0, &r), 3.830240465631608762e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (50.0, &r), 3.711783318868827367e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_e, (300.0, &r), 1.7047391998483433998e-133, TEST_TOL2, GSL_SUCCESS); + + /* Tests for E_n(x) */ + + TEST_SF(s, gsl_sf_expint_En_e, (1,-1.0, &r), -1.8951178163559367555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,1.0e-10, &r), 22.448635265138923980, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,1.0e-05, &r), 10.935719800043695615, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,0.1, &r), 1.82292395841939066610, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,1.0, &r), 0.21938393439552027368, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,10.0, &r), 4.156968929685324277e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,50.0, &r), 3.783264029550459019e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (1,300.0, &r), 1.710384276804510115e-133, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_e, (2,-1.0, &r), 0.8231640121031084799, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,0.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,1.0/4294967296.0, &r), 0.9999999947372139168, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,1.0/65536.0, &r), 0.9998243233207178845, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,0.1, &r), 0.7225450221940205066, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,1.0, &r), 0.14849550677592204792, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,10.0, &r), 3.830240465631608762e-06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,50.0, &r), 3.711783318868827367e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (2,300.0, &r), 1.7047391998483433998e-133, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_e, (3,0.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,1.0/4294967296.0, &r), 0.499999999767169356972, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,1.0/65536.0, &r), 0.4999847426094515610, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,0.1, &r), 0.4162914579082787612543, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,1.0, &r), 0.10969196719776013683858, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,10.0, &r),0.000003548762553084381959981, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,50.0, &r), 3.6429094264752049812e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (3,300.0, &r),1.699131143349179084e-133, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_e, (10,0.0, &r), 0.111111111111111111, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,1.0/4294967296.0, &r), 0.111111111082007280658, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,1.0/65536.0, &r), 0.11110920377910896018606, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,0.1, &r), 0.099298432000896813567905, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,1.0, &r), 0.036393994031416401634164534, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,10.0, &r), 0.00000232530265702821081778968, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,50.0, &r), 3.223296586749110919572e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_e, (10,300.0, &r), 1.6608815083360041367294736e-133, TEST_TOL2, GSL_SUCCESS); + + /* Tests for Ei(x) */ + + TEST_SF(s, gsl_sf_expint_Ei_e, (-1.0, &r), -0.21938393439552027368, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_e, (1.0/4294967296.0, &r), -21.603494112783886397, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_e, (1.0, &r), 1.8951178163559367555, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-10000.0, &r), -0.00010001000200060024012, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-1000.0, &r), -0.0010010020060241207251, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-10.0, &r), -0.11314702047341077803, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-1.0, &r), -0.69717488323506606877, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0e-10, &r), 22.448635267383787506, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0e-05, &r), 10.935829157788483865, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (0.1, &r), 2.0146425447084516791, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0, &r), 0.59634736232319407434, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (10.0, &r), 0.091563333939788081876, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (50.0, &r), 0.019615109930114870365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (300.0, &r), 0.0033222955652707070644, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1000.0, &r), 0.00099900199402388071500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (10000.0, &r), 0.000099990001999400239880, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-10000.0, &r), -0.00010002000600240120072, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-1000.0, &r), -0.0010020060241207250807, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-10.0, &r), -0.13147020473410778034, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-1.0, &r), 0.30282511676493393123, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (0.0, &r), 1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0/4294967296.0, &r), 0.99999999497004455927, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0/65536.0, &r), 0.99983957954556245453, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (0.1, &r), 0.79853574552915483209, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0, &r), 0.40365263767680592566, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (10.0, &r), 0.084366660602119181239, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (50.0, &r), 0.019244503494256481735, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (300.0, &r), 0.0033113304187878806691, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1000.0, &r), 0.00099800597611928500004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (10000.0, &r), 0.000099980005997601199281, TEST_TOL0, GSL_SUCCESS); + + /* Tests for E_n(x) */ + + + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,-10000.0, &r), -0.00010001000200060024012, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,-1000.0, &r), -0.0010010020060241207251, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,-10.0, &r), -0.11314702047341077803, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,-1.0, &r), -0.69717488323506606877, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,1.0e-10, &r), 22.448635267383787506, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,1.0e-05, &r), 10.935829157788483865, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,0.1, &r), 2.0146425447084516791, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,1.0, &r), 0.59634736232319407434, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,10.0, &r), 0.091563333939788081876, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,50.0, &r), 0.019615109930114870365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,300.0, &r), 0.0033222955652707070644, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,1000.0, &r), 0.00099900199402388071500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (1,10000.0, &r), 0.000099990001999400239880, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,-10000.0, &r), -0.00010002000600240120072, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,-1000.0, &r), -0.0010020060241207250807, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,-10.0, &r), -0.13147020473410778034, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,-1.0, &r), 0.30282511676493393123, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,0.0, &r), 1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,1.0/4294967296.0, &r), 0.99999999497004455927, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,1.0/65536.0, &r), 0.99983957954556245453, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,0.1, &r), 0.79853574552915483209, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,1.0, &r), 0.40365263767680592566, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,10.0, &r), 0.084366660602119181239, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,50.0, &r), 0.019244503494256481735, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,300.0, &r), 0.0033113304187878806691, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,1000.0, &r), 0.00099800597611928500004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (2,10000.0, &r), 0.000099980005997601199281, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,0.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,1.0/4294967296.0, &r), 0.4999999998835846787586, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,1.0/65536.0, &r), 0.4999923718293796877864492, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,0.1, &r), 0.4600732127235422583955, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,1.0, &r), 0.298173681161597037170539, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,10.0, &r), 0.07816669698940409380349, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,50.0, &r), 0.0188874126435879566345, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (3,300.0, &r), 0.00330043718181789963028657675, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,0.0, &r), 0.111111111111111111, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,1.0/4294967296.0, &r), 0.11111111110787735217158, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,1.0/65536.0, &r), 0.1111108991839472074435, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,0.1, &r), 0.1097417392579033988025, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,1.0, &r), 0.09892913264064615521915, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,10.0, &r), 0.0512181994376050593314159875, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,50.0, &r), 0.0167118436335939556034579, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_En_scaled_e, (10,300.0, &r), 0.0032261400811599644878615, TEST_TOL2, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (-1000.0, &r), -0.00099900199402388071500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (-1.0, &r), -0.59634736232319407434, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1.0/4294967296.0, &r), -21.603494107753930958, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1.0, &r), 0.69717488323506606877, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1000.0, &r), 0.0010010020060241207251, TEST_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_Shi_e, (-1.0, &r), -1.0572508753757285146, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (1.0/4294967296.0, &r), 2.3283064365386962891e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (1.0/65536.0, &r), 0.00001525878906269737298, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (0.1, &r), 0.1000555722250569955, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (1.0, &r), 1.0572508753757285146, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (10.0, &r), 1246.1144901994233444, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (50.0, &r), 5.292818448565845482e+19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (300.0, &r), 3.248241254044332895e+127, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_Chi_e, (-1.0, &r), 0.8378669409802082409, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (1.0/4294967296.0, &r), -21.603494113016717041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (1.0/65536.0, &r), -10.513139223999384429, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (1.0/8.0, &r), -1.4983170827635760646, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (1.0, &r), 0.8378669409802082409, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (10.0, &r), 1246.1144860424544147, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (50.0, &r), 5.292818448565845482e+19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Chi_e, (300.0, &r), 3.248241254044332895e+127, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_3_e, (1.0e-10, &r), 1.0e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (1.0e-05, &r), 9.9999999999999975e-06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (0.1, &r), 0.09997500714119079665122, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (0.5, &r), 0.48491714311363971332427, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (1.0, &r), 0.80751118213967145285833, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (2.0, &r), 0.89295351429387631138208, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (5.0, &r), 0.89297951156924921121856, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (10.0, &r), 0.89297951156924921121856, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_3_e, (100.0, &r), 0.89297951156924921121856, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_Si_e, (-1.0, &r), -0.9460830703671830149, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (1.0e-10, &r), 1.0e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (1.0e-05, &r), 9.999999999944444444e-06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (0.1, &r), 0.09994446110827695016, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (1.0, &r), 0.9460830703671830149, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (10.0, &r), 1.6583475942188740493, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (50.0, &r), 1.5516170724859358947, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Si_e, (300.0, &r), 1.5708810882137495193, TEST_TOL0, GSL_SUCCESS); + /* + TEST_SF(s, gsl_sf_Si_e, (1.0e+20, &r), 1.5707963267948966192, TEST_TOL0, GSL_SUCCESS); + */ + + TEST_SF(s, gsl_sf_Ci_e, (1.0/4294967296.0, &r), -21.603494113016717041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (1.0/65536.0, &r), -10.513139224115799751, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (1.0/8.0, &r), -1.5061295845296396649, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (1.0, &r), 0.3374039229009681347, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (10.0, &r), -0.04545643300445537263, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (50.0, &r), -0.005628386324116305440, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (300.0, &r), -0.003332199918592111780, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (65536.0, &r), 0.000010560248837656279453, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (4294967296.0, &r), -1.0756463261957757485e-10, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Ci_e, (1099511627776.0, &r), -3.689865584710764214e-13, 1024.0*TEST_SQRT_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_atanint_e, (1.0e-10, &r), 1.0e-10, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (1.0e-05, &r), 9.99999999988888888889e-06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (0.1, &r), 0.09988928686033618404, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (1.0, &r), 0.91596559417721901505, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (2.0, &r), 1.57601540344632342236, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (10.0, &r), 3.71678149306806859029, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (50.0, &r), 6.16499047850274874222, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (300.0, &r), 8.96281388924518959990, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_atanint_e, (1.0e+5, &r), 18.084471031038661920, TEST_TOL0, GSL_SUCCESS); + + /* Bug report from Wolfgang Ehrhardt */ + TEST_SF(s, gsl_sf_atanint_e, (1.0e+9, &r), 32.552029856869591656, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_fermidirac(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_fermi_dirac_m1_e, (-10.0, &r), 0.00004539786870243439450, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_m1_e, ( -1.0, &r), 0.26894142136999512075, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_m1_e, ( 1.0, &r), 0.7310585786300048793, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_m1_e, ( 10.0, &r), 0.9999546021312975656, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_0_e, (-10.0, &r), 0.00004539889921686464677, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_0_e, ( -1.0, &r), 0.31326168751822283405, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_0_e, ( 1.0, &r), 1.3132616875182228340, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_0_e, ( 10.0, &r), 10.000045398899216865, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_1_e, (-10.0, &r), 0.00004539941448447633524, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( -2.0, &r), 0.13101248471442377127, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( -1.0, &r), 0.3386479964034521798, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( -0.4, &r), 0.5825520806897909028, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 0.4, &r), 1.1423819861584355337, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 1.0, &r), 1.8062860704447742567, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 1.5, &r), 2.5581520872227806402, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 2.5, &r), 4.689474797599761667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 10.0, &r), 51.64488866743374196, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 12.0, &r), 73.64492792264531092, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 20.0, &r), 201.64493406478707282, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_1_e, ( 50.0, &r), 1251.6449340668482264, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_2_e, (-10.0, &r), 0.00004539967212174776662, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( -2.0, &r), 0.13313272938565030508, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( -1.0, &r), 0.3525648792978077590, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( -0.4, &r), 0.6229402647001272120, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 0.4, &r), 1.2915805581060844533, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 1.0, &r), 2.1641656128127008622, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 1.5, &r), 3.247184513920792475, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 2.5, &r), 6.797764392735056317, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 10.0, &r), 183.11605273482105278, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 12.0, &r), 307.73921494638635166, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 20.0, &r), 1366.2320146723590157, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, ( 50.0, &r), 20915.580036675744655, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_2_e, (200.0, &r), 1.3336623201467029786e+06, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, (-10.0, &r), 0.00004539847236080549532, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( -2.0, &r), 0.12366562180120994266, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( -1.0, &r), 0.29402761761145122022, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( -0.4, &r), 0.4631755336886027800, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 0.4, &r), 0.7654084737661656915, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 1.0, &r), 1.0270571254743506890, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 1.5, &r), 1.2493233478527122008, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 2.5, &r), 1.6663128834358313625, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 10.0, &r), 3.552779239536617160, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 12.0, &r), 3.897268231925439359, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 20.0, &r), 5.041018507535328603, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_mhalf_e, ( 50.0, &r), 7.977530858581869960, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_half_e, (-10.0, &r), 0.00004539920105264132755, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( -2.0, &r), 0.12929851332007559106, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( -1.0, &r), 0.3277951592607115477, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( -0.4, &r), 0.5522452153690688947, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 0.4, &r), 1.0386797503389389277, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 1.0, &r), 1.5756407761513002308, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 1.5, &r), 2.1448608775831140360, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 2.5, &r), 3.606975377950373251, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 10.0, &r), 24.084656964637653615, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 12.0, &r), 31.540203287044242593, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 20.0, &r), 67.49151222165892049, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_half_e, ( 50.0, &r), 266.09281252136259343, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, (-10.0, &r), 0.00004539956540456176333, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( -2.0, &r), 0.13224678225177236685, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( -1.0, &r), 0.3466747947990574170, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( -0.4, &r), 0.6056120213305040910, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 0.4, &r), 1.2258236403963668282, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 1.0, &r), 2.0022581487784644573, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 1.5, &r), 2.9277494127932173068, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 2.5, &r), 5.768879312210516582, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 10.0, &r), 101.00510084332600020, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 12.0, &r), 156.51518642795728036, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 20.0, &r), 546.5630100657601959, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_3half_e, ( 50.0, &r), 5332.353566687145552, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, -2.0, &r), 0.1342199155038680215, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 0.0, &r), 0.9470328294972459176, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 0.1, &r), 1.0414170610956165759, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 1.0, &r), 2.3982260822489407070, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 3.0, &r), 12.621635313399690724, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 100.0, &r), 4.174893231066566793e+06, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (3, 500.0, &r), 2.604372285319088354e+09, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, -2.0, &r), 0.13505242246823676478, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 0.0, &r), 0.9855510912974351041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 0.1, &r), 1.0876519750101492782, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 1.0, &r), 2.6222337848692390539, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 3.0, &r), 17.008801618012113022, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 100.0, &r), 1.3957522531334869874e+09, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (5, 500.0, &r), 2.1705672808114817955e+13, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, -2.0, &r), 0.1352641105671255851, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 0.0, &r), 0.9962330018526478992, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 0.1, &r), 1.1005861815180315485, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 1.0, &r), 2.6918878172003129203, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 3.0, &r), 19.033338976999367642, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 10.0, &r), 5654.530932873610014, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 50.0, &r), 1.005005069985066278e+09, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (7, 500.0, &r), 9.691690268341569514e+16, TEST_TOL3, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, -2.0, &r), 0.1353174385330242691, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 0.0, &r), 0.9990395075982715656, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 0.1, &r), 1.1039997234712941212, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 1.0, &r), 2.7113648898129249947, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 3.0, &r), 19.768544008138602223, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 10.0, &r), 10388.990167312912478, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 50.0, &r), 2.85466960802601649e+10, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (9, 500.0, &r), 2.69273849842695876e+20, 2*TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, -2.0, &r), 0.13532635396712288092, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 0.0, &r), 0.9995171434980607541, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 0.1, &r), 1.1045818238852612296, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 1.0, &r), 2.7147765350346120647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 3.0, &r), 19.917151938411675171, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 10.0, &r), 12790.918595516495955, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 50.0, &r), 1.3147703201869657654e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (10, 500.0, &r), 1.2241331244469204398e+22, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, -2.0, &r), 0.1353308162894847149, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 0.0, &r), 0.9997576851438581909, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 0.1, &r), 1.1048751811565850418, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 1.0, &r), 2.7165128749007313436, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 3.0, &r), 19.997483022044603065, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 10.0, &r), 14987.996005901818036, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 50.0, &r), 5.558322924078990628e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (11, 500.0, &r), 5.101293089606198280e+23, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, -2.0, &r), 0.13533527450327238373, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 0.0, &r), 0.9999995232582155428, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 0.1, &r), 1.1051703357941368203, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 1.0, &r), 2.7182783069905721654, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 3.0, &r), 20.085345296028242734, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 10.0, &r), 21898.072920149606475, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 50.0, &r), 1.236873256595717618e+16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_fermi_dirac_int_e, (20, 500.0, &r), 9.358938204369557277e+36, TEST_TOL2, GSL_SUCCESS); + + + return s; +} + + +int test_gegen(void) +{ + gsl_sf_result r; + double ga[100]; + int s = 0; + int sa; + + TEST_SF(s, gsl_sf_gegenpoly_1_e, (-0.2, 1.0, &r), -0.4, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_1_e, ( 0.0, 1.0, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_1_e, ( 1.0, 1.0, &r), 2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_1_e, ( 1.0, 0.5, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_1_e, ( 5.0, 1.0, &r), 10.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_1_e, ( 100.0, 0.5, &r), 100.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gegenpoly_2_e, (-0.2, 0.5, &r), 0.12, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_2_e, ( 0.0, 1.0, &r), 1.00, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_2_e, ( 1.0, 1.0, &r), 3.00, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_2_e, ( 1.0, 0.1, &r), -0.96, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_2_e, ( 5.0, 1.0, &r), 55.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_2_e, ( 100.0, 0.5, &r), 4950.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gegenpoly_3_e, (-0.2, 0.5, &r), 0.112, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_3_e, ( 0.0, 1.0, &r), -2.0/3.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_3_e, ( 1.0, 1.0, &r), 4.000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_3_e, ( 1.0, 0.1, &r), -0.392, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_3_e, ( 5.0, 1.0, &r), 220.000, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_3_e, ( 100.0, 0.5, &r), 161600.000, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_gegenpoly_n_e, (1, 1.0, 1.0, &r), 2.000 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (10, 1.0, 1.0, &r), 11.000 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (10, 1.0, 0.1, &r), -0.4542309376 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (10, 5.0, 1.0, &r), 9.23780e+4 , TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (10, 100.0, 0.5, &r), 1.5729338392690000e+13, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (1000, 100.0, 1.0, &r), 3.3353666135627322e+232, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (100, 2000.0, 1.0, &r), 5.8753432034937579e+202, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (103, 207.0, 2.0, &r), 1.4210272202235983e+145, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_gegenpoly_n_e, (103, -0.4, 0.3, &r), -1.64527498094522e-04, TEST_TOL1, GSL_SUCCESS); + + sa = 0; + gsl_sf_gegenpoly_array(99, 5.0, 1.0, ga); + sa += ( test_sf_frac_diff( ga[1], 10.0 ) > TEST_TOL0 ); + sa += ( test_sf_frac_diff( ga[10], 9.23780e+4 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_sf_gegenpoly_array"); + s += sa; + + return s; +} + + +int test_jac(void) +{ + double u, m; + double sn, cn, dn; + int stat_ej; + int s = 0; + int sa; + + u = 0.5; + m = 0.5; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.4707504736556572833, TEST_TOL0, "gsl_sf_elljac_e(0.5|0.5) sn"); + sa += test_sf_val(cn, 0.8822663948904402865, TEST_TOL0, "gsl_sf_elljac_e(0.5|0.5) cn"); + sa += test_sf_val(dn, 0.9429724257773856873, TEST_TOL0, "gsl_sf_elljac_e(0.5|0.5) dn"); + gsl_test(s, " gsl_sf_elljac_e(0.5|0.5)"); + s += sa; + + u = 1.0; + m = 0.3; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.8187707145344889190, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.3) sn"); + sa += test_sf_val(cn, 0.5741206467465548795, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.3) cn"); + sa += test_sf_val(dn, 0.8938033089590823040, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.3) dn"); + gsl_test(sa, " gsl_sf_elljac_e(1.0|0.3)"); + s += sa; + + u = 1.0; + m = 0.6; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.7949388393365780943, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.6) sn"); + sa += test_sf_val(cn, 0.6066895760718277578, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.6) cn"); + sa += test_sf_val(dn, 0.7879361300438814425, TEST_TOL0, "gsl_sf_elljac_e(1.0|0.6) dn"); + gsl_test(sa, " gsl_sf_elljac_e(1.0|0.6)"); + s += sa; + + u = 3.0; + m = 0.6; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.7432676860864044186, TEST_TOL0, " gsl_sf_elljac_e(3.0|0.6) sn"); + sa += test_sf_val(cn, -0.6689941306317733154, TEST_TOL0, " gsl_sf_elljac_e(3.0|0.6) cn"); + sa += test_sf_val(dn, 0.8176379933025723259, TEST_TOL0, " gsl_sf_elljac_e(3.0|0.6) dn"); + gsl_test(sa, " gsl_sf_elljac_e(3.0|0.6)"); + s += sa; + + u = 2.0; + m = 0.999999; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.96402778575700186570, TEST_TOL1, "gsl_sf_elljac_e(2.0|0.999999) sn"); + sa += test_sf_val(cn, 0.26580148285600686381, TEST_TOL1, "gsl_sf_elljac_e(2.0|0.999999) cn"); + sa += test_sf_val(dn, 0.26580323105264131136, TEST_TOL1, "gsl_sf_elljac_e(2.0|0.999999) dn"); + gsl_test(sa, " gsl_sf_elljac_e(2.0|0.999999)"); + s += sa; + + /* test supplied by Ivan Panchenko */ + u = 1.69695970624443; + m = 0.270378013104138; + sa = 0; + stat_ej = gsl_sf_elljac_e(u, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(1.69..|0.27..) sn"); + sa += test_sf_val(cn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(1.69..|0.27..) cn"); + sa += test_sf_val(dn, 0.8541791304497336, TEST_TOL1, "gsl_sf_elljac_e(1.69..|0.27..) dn"); + gsl_test(sa, " gsl_sf_elljac_e(1.69695970624443|0.270378013104138)"); + s += sa; + + + + /* Check known values from Abramowitz & Stegun, Table 16.5 */ + u = 0; + m = 0.1; + + { + double mc = 1 - m; + /* quarter period K is (pi/2)/agm(1,mc) */ + double K = (M_PI_2)/ 0.9741726903999478375938128316; + + double A = 1.0 / sqrt(1+sqrt(mc)); + double B = pow(mc, 0.25) / sqrt(1+sqrt(mc)); + double C = pow(mc, 0.25); + double C2 = sqrt(mc); + + double eps = 1e-10; + + sa = 0; + stat_ej = gsl_sf_elljac_e(0.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.0, TEST_TOL0, "gsl_sf_elljac_e(0|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(0|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(0|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(0|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -eps, TEST_TOL0, "gsl_sf_elljac_e(-1e-10|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(-1e-10|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, eps, TEST_TOL0, "gsl_sf_elljac_e(1e-10|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(1e-10|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(1e-30, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1e-30, TEST_TOL0, "gsl_sf_elljac_e(1e-30|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(1e-30|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL0, "gsl_sf_elljac_e(1e-30|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(1e-30|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K / 2.0 - eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A - eps*B*C, TEST_TOL2, "gsl_sf_elljac_e(K/2-1e-10|0.1) sn"); + sa += test_sf_val(cn, B + eps*A*C, TEST_TOL2, "gsl_sf_elljac_e(K/2-1e-10|0.1) cn"); + sa += test_sf_val(dn, C + m*eps*A*B, TEST_TOL2, "gsl_sf_elljac_e(K/2-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K/2-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A, TEST_TOL2, "gsl_sf_elljac_e(K/2|0.1) sn"); + sa += test_sf_val(cn, B, TEST_TOL2, "gsl_sf_elljac_e(K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K / 2.0 + eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A + eps*B*C, TEST_TOL2, "gsl_sf_elljac_e(K/2+1e-10|0.1) sn"); + sa += test_sf_val(cn, B - eps*A*C, TEST_TOL2, "gsl_sf_elljac_e(K/2+1e-10|0.1) cn"); + sa += test_sf_val(dn, C - m*eps*A*B, TEST_TOL2, "gsl_sf_elljac_e(K/2+1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K/2+1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K - eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(K-1e-10|0.1) sn"); + sa += test_sf_val(cn, eps*C2, 10*TEST_SNGL, "gsl_sf_elljac_e(K-1e-10|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(K-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(K|0.1) sn"); + sa += test_sf_val(cn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(K|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(K + eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(K+1e-10|0.1) sn"); + sa += test_sf_val(cn, -eps*C2, 10*TEST_SNGL, "gsl_sf_elljac_e(K+1e-10|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(K+1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(K+1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(3.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A, TEST_TOL2, "gsl_sf_elljac_e(3K/2|0.1) sn"); + sa += test_sf_val(cn, -B, TEST_TOL2, "gsl_sf_elljac_e(3K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(3K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(3K/2|0.1)"); + s += sa; + + + sa = 0; + stat_ej = gsl_sf_elljac_e(2.0*K - eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, eps, 10*TEST_SNGL, "gsl_sf_elljac_e(2K-1e-10|0.1) sn"); + sa += test_sf_val(cn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(2K-1e-10|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(2K-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(2K-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(2.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(2K|0.1) sn"); + sa += test_sf_val(cn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(2K|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(2K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(2K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(2.0*K + eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -eps, 10*TEST_SNGL, "gsl_sf_elljac_e(2K+1e-10|0.1) sn"); + sa += test_sf_val(cn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(2K+1e-10|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(2K+1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(2K+1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(5.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -A, TEST_TOL2, "gsl_sf_elljac_e(5K/2|0.1) sn"); + sa += test_sf_val(cn, -B, TEST_TOL2, "gsl_sf_elljac_e(5K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(5K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(5K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(3.0*K - eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(3K-1e-10|0.1) sn"); + sa += test_sf_val(cn, -C2 * eps, 10*TEST_SNGL, "gsl_sf_elljac_e(3K-1e-10|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(3K-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(3K-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(3.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(3K|0.1) sn"); + sa += test_sf_val(cn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(3K|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(3K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(3K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(3.0*K + eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(3K+1e-10|0.1) sn"); + sa += test_sf_val(cn, +C2 * eps, 10*TEST_SNGL, "gsl_sf_elljac_e(3K+1e-10|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(3K+1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(3K+1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(7.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -A, TEST_TOL2, "gsl_sf_elljac_e(7K/2|0.1) sn"); + sa += test_sf_val(cn, B, TEST_TOL2, "gsl_sf_elljac_e(7K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(7K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(7K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(4.0*K - eps, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -eps, 10*TEST_SNGL, "gsl_sf_elljac_e(4K-1e-10|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(4K-1e-10|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(4K-1e-10|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(4K-1e-10|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(4.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(4K|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(4K|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(4K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(4K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(9.0 * K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A, TEST_TOL2, "gsl_sf_elljac_e(9K/2|0.1) sn"); + sa += test_sf_val(cn, B, TEST_TOL2, "gsl_sf_elljac_e(9K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(9K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(9K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -A, TEST_TOL2, "gsl_sf_elljac_e(-K/2|0.1) sn"); + sa += test_sf_val(cn, B, TEST_TOL2, "gsl_sf_elljac_e(-K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(-K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(-K|0.1) sn"); + sa += test_sf_val(cn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(-K|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(-K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-3.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, -A, TEST_TOL2, "gsl_sf_elljac_e(-3K/2|0.1) sn"); + sa += test_sf_val(cn, -B, TEST_TOL2, "gsl_sf_elljac_e(-3K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(-3K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-3K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-2.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(-2K|0.1) sn"); + sa += test_sf_val(cn, -1.0, TEST_TOL1, "gsl_sf_elljac_e(-2K|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(-2K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-2K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-5.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A, TEST_TOL2, "gsl_sf_elljac_e(-5K/2|0.1) sn"); + sa += test_sf_val(cn, -B, TEST_TOL2, "gsl_sf_elljac_e(-5K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(-5K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-5K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-3.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(-3K|0.1) sn"); + sa += test_sf_val(cn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(-3K|0.1) cn"); + sa += test_sf_val(dn, C2, TEST_TOL2, "gsl_sf_elljac_e(-3K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-3K|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-7.0*K / 2.0, m, &sn, &cn, &dn); + sa += test_sf_val(sn, A, TEST_TOL2, "gsl_sf_elljac_e(-7K/2|0.1) sn"); + sa += test_sf_val(cn, B, TEST_TOL2, "gsl_sf_elljac_e(-7K/2|0.1) cn"); + sa += test_sf_val(dn, C, TEST_TOL2, "gsl_sf_elljac_e(-7K/2|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-7K/2|0.1)"); + s += sa; + + sa = 0; + stat_ej = gsl_sf_elljac_e(-4.0*K, m, &sn, &cn, &dn); + sa += test_sf_val(sn, 0.0, TEST_TOL1, "gsl_sf_elljac_e(-4K|0.1) sn"); + sa += test_sf_val(cn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(-4K|0.1) cn"); + sa += test_sf_val(dn, 1.0, TEST_TOL1, "gsl_sf_elljac_e(-4K|0.1) dn"); + gsl_test(sa, " gsl_sf_elljac_e(-4K|0.1)"); + s += sa; + } + + + return s; +} + + +int test_laguerre(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_laguerre_1_e, (0.5, -1.0, &r), 2.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_1_e, (0.5, 1.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_1_e, (1.0, 1.0, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_laguerre_2_e, ( 0.5, -1.0, &r), 4.875, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_2_e, ( 0.5, 1.0, &r), -0.125, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_2_e, ( 1.0, 1.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_2_e, (-1.0, 1.0, &r), -0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_2_e, (-2.0, 1.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_2_e, (-3.0, 1.0, &r), 2.5, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_laguerre_3_e, (0.5, -1.0, &r), 8.479166666666666667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, (0.5, 1.0, &r), -0.6041666666666666667, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, (1.0, 1.0, &r), -0.16666666666666666667, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, ( 2.0, 1.0, &r), 2.3333333333333333333, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, (-2.0, 1.0, &r), 1.0/3.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, (-3.0, 1.0, &r), -1.0/6.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_3_e, (-4.0, 1.0, &r), -8.0/3.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_laguerre_n_e, (1, 0.5, 1.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (2, 1.0, 1.0, &r), 0.5, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (3, 2.0, 1.0, &r), 2.3333333333333333333, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (4, 2.0, 0.5, &r), 6.752604166666666667, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (90, 2.0, 0.5, &r), -48.79047157201507897, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (90, 2.0, -100.0, &r), 2.5295879275042410902e+63, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (90, 2.0, 100.0, &r), -2.0929042259546928670e+20, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 2.0, -0.5, &r), 2.2521795545919391405e+07, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 2.0, 0.5, &r), -28.764832945909097418, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1000, 2.0, -0.5, &r), 2.4399915170947549589e+21, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1000, 2.0, 0.5, &r), -306.77440254315317525, TEST_TOL2, GSL_SUCCESS); /**/ + TEST_SF(s, gsl_sf_laguerre_n_e, (100000, 2.0, 1.0, &r), 5107.73491348319, TEST_TOL4, GSL_SUCCESS); + + /* Compute these with the recurrence + * L(0,alpha,x)=1; + * L(1,alpha,x)=1+alpha-x; + * L(n,alpha,x)=((2*n-1+alpha-x)*L(n-1,alpha,x)-(n+alpha-1)*L(n-2,alpha,x))/k + */ + + TEST_SF(s, gsl_sf_laguerre_n_e, (1e5, 2.5, 2.5, &r), -0.41491680394598644969113795e5, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1e5+1, 2.5, 2.5, &r), -0.41629446949552321027514888e5, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1e6+1, 2.5, 2.5, &r), -0.48017961545391273151977118e6, TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (5e6+1, 2.5, 2.5, &r), -0.15174037401611122446089494e7, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (8e6+1, 2.5, 2.5, &r), 0.63251509472091810994286362e6, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1e7+1, 2.5, 2.5, &r), 0.15299484685632983178033887e7, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1e8+1, 2.5, 2.5, &r), 0.23645341644922756725290777e8, TEST_SNGL, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (1e9+1, 2.5, 2.5, &r), -0.17731002248958790286185878e8, 100*TEST_SNGL, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_laguerre_n_e, (1, -2.0, 1.0, &r), -2.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (2, -2.0, 1.0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (3, -2.0, 1.0, &r), 1.0/3.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (10, -2.0, 1.0, &r), -0.04654954805996472663, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (10, -5.0, 1.0, &r), -0.0031385030864197530864, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (10, -9.0, 1.0, &r), -2.480158730158730159e-06, TEST_TOL5, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (10, -11.0, 1.0, &r), 2.7182818011463844797, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (10, -11.0, -1.0, &r), 0.3678794642857142857, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -2.0, 1.0, &r), -0.0027339992019526273866, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -2.0, -1.0, &r), 229923.09193402028290, TEST_TOL5, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -10.0, 1.0, &r), 3.25966665871244092e-11, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -10.0, -1.0, &r), 0.00016484365618205810025, TEST_TOL6, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -20.0, 1.0, &r), 5.09567630343671251e-21, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -30.0, 1.0, &r), 3.46063150272466192e-34, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.0, 1.0, &r), 1.20981872933162889e-65, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.0, -1.0, &r), 8.60763477742332922e-65, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.5, 1.0, &r), 4.84021010426688393e-31, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.5, -1.0, &r), 8.49861345212160618e-33, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -101.0, 1.0, &r), 2.7182818284590452354, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -101.0, -1.0, &r), 0.3678794411714423216, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -102.0, 1.0, &r), 271.8281828459045235, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -102.0, -1.0, &r), 37.52370299948711680, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -110.0, 1.0, &r), 1.0666955248998831554e+13, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -110.0, -1.0, &r), 1.7028306108058225871e+12, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -200.0, 1.0, &r), 7.47851889721356628e+58, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -200.0, -1.0, &r), 2.73740299754732273e+58, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.0, 10.0, &r), 4.504712811317745591e-21, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, -50.0, -10.0, &r), 1.475165520610679937e-11, TEST_TOL1, GSL_SUCCESS); + + /* test cases for Ed Smith-Rowland */ + + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 0.0, 0.5, &r), 0.18682260367692278801, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 0.0, 10.5, &r), 9.1796907354050059874, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 0.0, -10.5, &r), 5.6329215744170606488e24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 0.0, 100.5, &r), -3.9844782875811907525e20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_laguerre_n_e, (100, 0.0, 150, &r), -1.4463204337261709595e31, TEST_TOL2, GSL_SUCCESS); + + return s; +} + + +int test_lambert(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_lambert_W0_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (1.0, &r), 0.567143290409783872999969, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (2.0, &r), 0.852605502013725491346472, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (20.0, &r), 2.205003278024059970493066, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (1000.0, &r), 5.24960285240159622712606, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (1.0e+6, &r), 11.38335808614005262200016, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (1.0e+12, &r), 24.43500440493491313826305, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (1.0e+308, &r), 702.641362034106812081125, TEST_TOL0, GSL_SUCCESS); + + /* Test case from Katrin Wolff fails under + double-precision */ + + TEST_SF(s, gsl_sf_lambert_W0_e, (1.6849341956993852953416990, &r), 0.775706963944252869680440, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lambert_W0_e, (-1.0/M_E - GSL_DBL_EPSILON, &r), -1.0, TEST_TOL0, GSL_EDOM); + TEST_SF(s, gsl_sf_lambert_W0_e, (-1.0/M_E + 1.0/(1024.0*1024.0*1024.0), &r), -0.999928845560308370714970, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (-1.0/M_E + 1.0/(1024.0*1024.0), &r), -0.997724730359774141620354, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (-1.0/M_E + 1.0/512.0, &r), -0.900335676696088773044678, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_W0_e, (-1.0/M_E + 0.25, &r), -0.1349044682661213545487599, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lambert_Wm1_e, (0.0, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (1.0, &r), 0.567143290409783872999969, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (2.0, &r), 0.852605502013725491346472, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (20.0, &r), 2.205003278024059970493066, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E - GSL_DBL_EPSILON, &r), -1.0, TEST_TOL0, GSL_EDOM); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E + 1.0/(1024.0*1024.0*1024.0), &r), -1.000071157815154608049055, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E + 1.0/(1024.0*1024.0), &r), -1.002278726118593023934693, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E + 1.0/512.0, &r), -1.106761200865743124599130, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E + 1.0/64.0, &r), -1.324240940341812125489772, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lambert_Wm1_e, (-1.0/M_E + 0.25, &r), -3.345798131120112, TEST_TOL1, GSL_SUCCESS); + + return s; +} + + +int test_log(void) +{ + gsl_sf_result r; + gsl_sf_result r1, r2; + int s = 0; + + TEST_SF(s, gsl_sf_log_e, (0.1, &r), -2.3025850929940456840, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_e, (1.1, &r), 0.09531017980432486004, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_e, (1000.0, &r), 6.907755278982137052, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_log_abs_e, (-0.1, &r), -2.3025850929940456840, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_abs_e, (-1.1, &r), 0.09531017980432486004, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_abs_e, (-1000.0, &r), 6.907755278982137052, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_abs_e, (0.1, &r), -2.3025850929940456840, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_abs_e, (1.1, &r), 0.09531017980432486004, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_abs_e, (1000.0, &r), 6.907755278982137052, TEST_TOL0, GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_log_e, (1.0, 1.0, &r1, &r2), + 0.3465735902799726547, TEST_TOL0, + 0.7853981633974483096, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_log_e, (1.0, -1.0, &r1, &r2), + 0.3465735902799726547, TEST_TOL0, + -0.7853981633974483096, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_log_e, (1.0, 100.0, &r1, &r2), + 4.605220183488258022, TEST_TOL0, + 1.560796660108231381, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_log_e, (-1000.0, -1.0, &r1, &r2), + 6.907755778981887052, TEST_TOL0, + -3.1405926539231263718, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_log_e, (-1.0, 0.0, &r1, &r2), + 0.0, TEST_TOL0, + 3.1415926535897932385, TEST_TOL0, + GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_log_1plusx_e, (1.0e-10, &r), 9.999999999500000000e-11, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (1.0e-8, &r), 9.999999950000000333e-09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (1.0e-4, &r), 0.00009999500033330833533, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (0.1, &r), 0.09531017980432486004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (0.49, &r), 0.3987761199573677730, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_log_1plusx_e, (-0.49, &r), -0.6733445532637655964, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (1.0, &r), M_LN2, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_e, (-0.99, &r), -4.605170185988091368, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (1.0e-10, &r), -4.999999999666666667e-21, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (1.0e-8, &r), -4.999999966666666917e-17, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (1.0e-4, &r), -4.999666691664666833e-09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (0.1, &r), -0.004689820195675139956, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (0.49, &r), -0.09122388004263222704, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (-0.49, &r), -0.18334455326376559639, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (1.0, &r), M_LN2-1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_log_1plusx_mx_e, (-0.99, &r), -3.615170185988091368, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_pow_int(void) +{ + gsl_sf_result r; + int status = 0; + int s = 0; + + TEST_SF(s, gsl_sf_pow_int_e, (2.0, 3, &r), 8.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-2.0, 3, &r), -8.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (2.0, -3, &r), 1.0/8.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-2.0, -3, &r), -1.0/8.0, TEST_TOL0, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_pow_int_e, (10.0, 4, &r), 1.0e+4, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (10.0, -4, &r), 1.0e-4, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-10.0, 4, &r), 1.0e+4, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-10.0, -4, &r), 1.0e-4, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_pow_int_e, (10.0, 40, &r), 1.0e+40, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (8.0, -40, &r), 7.523163845262640051e-37, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-10.0, 40, &r), 1.0e+40, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-8.0, -40, &r), 7.523163845262640051e-37, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_pow_int_e, (10.0, 41, &r), 1.0e+41, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (8.0, -41, &r), 9.403954806578300064e-38, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-10.0, 41, &r), -1.0e+41, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_pow_int_e, (-8.0, -41, &r), -9.403954806578300064e-38, TEST_TOL0, GSL_SUCCESS); + + return status; +} + +int test_psi(void) +{ + gsl_sf_result r; + int s = 0; + + /* Test values taken 1-4 from gp-pari */ + + TEST_SF(s, gsl_sf_psi_int_e, (1, &r), -0.57721566490153286060, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (2, &r), 0.42278433509846713939, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (3, &r), 0.92278433509846713939, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (4, &r), 1.2561176684318004727, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_int_e, (5, &r), 1.5061176684318004727, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (100, &r), 4.600161852738087400, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (110, &r), 4.695928024251535633, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_int_e, (5000, &r), 8.517093188082904107, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_e, (5000.0, &r), 8.517093188082904107, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_e, (5.0, &r), 1.5061176684318004727, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_e, (-10.5, &r), 2.3982391295357816134, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_e, (-100.5, &r), 4.615124601338064117, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_e, (-1.0e+5-0.5, &r), 11.512935464924395337, 4.0*TEST_TOL4, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_e, (-262144.0-0.5, &r), 12.476653064769611581, 4.0*TEST_TOL4, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_1piy_e, (0.8, &r), -0.07088340212750589223, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (1.0, &r), 0.09465032062247697727, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (5.0, &r), 1.6127848446157465854, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (100.0, &r), 4.605178519404762003, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (2000.0, &r), 7.600902480375416216, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_1piy_e, (-0.8, &r), -0.07088340212750589223, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (-1.0, &r), 0.09465032062247697727, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (-5.0, &r), 1.6127848446157465854, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (-100.0, &r), 4.605178519404762003, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1piy_e, (-2000.0, &r), 7.600902480375416216, TEST_TOL0, GSL_SUCCESS); + + /* Additional test values 1-4 computed using gp-pari and + Abramowitz & Stegun 6.4.6 */ + + TEST_SF(s, gsl_sf_psi_1_int_e, (1, &r), 1.6449340668482264364, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (2, &r), 0.64493406684822643647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (3, &r), 0.39493406684822643647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (4, &r), 0.28382295573711532536, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_1_int_e, (1, &r), 1.6449340668482264365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (5, &r), 0.22132295573711532536, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (100, &r), 0.010050166663333571395, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (110, &r), 0.009132356622022545705, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_int_e, (500, &r), 0.0020020013333322666697, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_1_e, (1.0/32.0, &r), 1025.5728544782377089, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (1.0, &r), 1.6449340668482264365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (5.0, &r), 0.22132295573711532536, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (100.0, &r), 0.010050166663333571395, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (110.0, &r), 0.009132356622022545705, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (500.0, &r), 0.0020020013333322666697, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_1_e, (-1.0 - 1.0/128.0, &r), 16386.648472598746587, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (-1.50, &r), 9.3792466449891237539, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (-10.5, &r), 9.7787577398148123845, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (-15.5, &r), 9.8071247184113896201, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (-50.5, &r), 9.8499971860824842274, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_1_e, (-1000.5, &r), 9.8686054001734414233, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_n_e, (1, 1, &r), 1.6449340668482264364, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 2, &r), 0.64493406684822643647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 3, &r), 0.39493406684822643647, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 4, &r), 0.28382295573711532536, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_n_e, (1, 5, &r), 0.22132295573711532536, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 100, &r), 0.010050166663333571395, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 110, &r), 0.009132356622022545705, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, 500, &r), 0.0020020013333322666697, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_n_e, (3, 5.0, &r), 0.021427828192755075022, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (3, 500.0, &r), 1.6048063999872000683e-08, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (10, 5.0, &r), -0.08675107579196581317, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (10, 50.0, &r), -4.101091112731268288e-12, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_psi_n_e, (0, -1.5, &r), 0.70315664064524318723, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_psi_n_e, (1, -1.5, &r), 9.3792466449891237539, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_psi_complex(void) +{ + gsl_sf_result r1; + gsl_sf_result r2; + int s = 0; + + TEST_SF_2(s, gsl_sf_complex_psi_e, (1.0e+07, 1.0e+06, &r1, &r2), + 16.1230707668799525, TEST_TOL0, + 0.09966865744165720, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (10.0, 50.0, &r1, &r2), + 3.92973987174863660, TEST_TOL0, + 1.38302847985210276, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (2.0, 21.0, &r1, &r2), + 3.04697388853248195, TEST_TOL0, + 1.49947549076817824, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (1.5, 0.0, &r1, &r2), + 0.0364899739785765206, TEST_TOL2, + 0.0, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (1.0, 5.0, &r1, &r2), + 1.612784844615747, TEST_TOL1, + 1.470796326794968, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (-1.5, 5.0, &r1, &r2), + 1.68260717336484070, TEST_TOL0, + 1.95230236730713338, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_psi_e, (-20.5, -20.5, &r1, &r2), + 3.37919358657933066, TEST_TOL0, + -2.36829046481731091, TEST_TOL0, + GSL_SUCCESS); + + return s; +} + + + + +int test_synch(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_synchrotron_1_e, (0.01, &r), 0.444972504114210632, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_1_e, (1.0, &r), 0.651422815355364504, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_1_e, (10.0, &r), 0.000192238264300868882, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_1_e, (100.0, &r), 4.69759366592220221e-43, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_synchrotron_2_e, (0.01, &r), 0.23098077342226277732, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_2_e, (1.0, &r), 0.4944750621042082670, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_2_e, (10.0, &r), 0.00018161187569530204281, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_synchrotron_2_e, (256.0, &r), 1.3272635474353774058e-110, TEST_TOL4, GSL_SUCCESS); /* exp()... not my fault */ + + return s; +} + + +int test_transport(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_transport_2_e, (1.0e-10, &r), 9.9999999999999999999e-11, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_2_e, (1.0, &r), 0.97303256135517012845, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_2_e, (3.0, &r), 2.41105004901695346199, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_2_e, (10.0, &r), 3.28432911449795173575, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_2_e, (100.0, &r), 3.28986813369645287294, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_2_e, (1.0e+05, &r), 3.28986813369645287294, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_transport_3_e, (1.0e-10, &r), 4.999999999999999999997e-21, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (1.0, &r), 0.479841006572417499939, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (3.0, &r), 3.210604662942246772338, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (5.0, &r), 5.614386613842273228585, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (10.0, &r), 7.150322712008592975030, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (30.0, &r), 7.212341416160946511930, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (100.0, &r), 7.212341418957565712398, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_3_e, (1.0e+05, &r), 7.212341418957565712398, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_transport_4_e, (1.0e-10, &r), 3.33333333333333333333e-31, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (1.0e-07, &r), 3.33333333333333166666e-22, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (1.0e-04, &r), 3.33333333166666666726e-13, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (0.1, &r), 0.000333166726172109903824, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (1.0, &r), 0.31724404523442648241, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (3.0, &r), 5.96482239737147652446, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (5.0, &r), 15.3597843168821829816, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (10.0, &r), 25.2736676770304417334, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (30.0, &r), 25.9757575220840937469, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (100.0, &r), 25.9757576090673165963, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_4_e, (1.0e+05, &r), 25.9757576090673165963, TEST_TOL2, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_transport_5_e, (1.0e-10, &r), 2.49999999999999999999e-41, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (1.0e-07, &r), 2.49999999999999861111e-29, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (1.0e-04, &r), 2.49999999861111111163e-17, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (0.1, &r), 0.000024986116317791487410, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (1.0, &r), 0.236615879239094789259153, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (3.0, &r), 12.77055769104415951115760, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (5.0, &r), 50.26309221817518778543615, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (10.0, &r), 116.3807454024207107698556, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (30.0, &r), 124.4313279083858954839911, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (100.0, &r), 124.4313306172043911597639, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_transport_5_e, (1.0e+05, &r), 124.43133061720439115976, TEST_TOL0, GSL_SUCCESS); + + return s; +} + + +int test_trig(void) +{ + gsl_sf_result r; + gsl_sf_result r1, r2; + double theta; + int s = 0; + int sa; + + TEST_SF(s, gsl_sf_sin_e, (-10.0, &r), 0.5440211108893698134, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1.0, &r), 0.8414709848078965067, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1000.0, &r), 0.8268795405320025603, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1048576.75, &r), 0.8851545351115651914, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (62831853.75, &r), 0.6273955953485000827, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1073741822.5, &r), -0.8284043541754465988, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1073741824.0, &r), -0.6173264150460421708, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_e, (1073741825.5, &r), 0.7410684679436226926, TEST_SQRT_TOL0, GSL_SUCCESS); + /* + TEST_SF(s, gsl_sf_sin_e, (1099511627776.0, &r), -0.4057050115328287198, 32.0*TEST_SQRT_TOL0, GSL_SUCCESS); + */ + + TEST_SF(s, gsl_sf_cos_e, (-10.0, &r), -0.8390715290764524523, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (1.0, &r), 0.5403023058681397174, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (1000.0, &r), 0.5623790762907029911, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (1048576.75, &r), 0.4652971620066351799, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (62831853.75, &r), 0.7787006914966116436, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (1073741822.5, &r), -0.5601305436977716102, TEST_SQRT_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_cos_e, (1073741824.0, &r), 0.7867071229411881196, TEST_SQRT_TOL0, GSL_SUCCESS); + /* + TEST_SF(s, gsl_sf_cos_e, (1099511627776.0, &r), -0.9140040719915570023, 128.0*TEST_SQRT_TOL0, GSL_SUCCESS); + */ + + TEST_SF(s, gsl_sf_sinc_e, (1.0/1024.0, &r), 0.9999984312693665404, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sinc_e, (1.0/2.0, &r), 2.0/M_PI, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sinc_e, (80.5, &r), 0.0039541600768172754, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sinc_e, (100.5, &r), 0.0031672625490924445, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sinc_e, (1.0e+06 + 0.5, &r), 3.18309727028927157e-07, TEST_TOL0, GSL_SUCCESS); + + /* + TEST_SF(s, gsl_sf_sin_pi_x_e, (1000.5, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_pi_x_e, (10000.0 + 1.0/65536.0, &r), 0.00004793689960306688455, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_sin_pi_x_e, (1099511627776.0 + 1 + 0.125, &r), -0.3826834323650897717, TEST_TOL0, GSL_SUCCESS); + */ + + TEST_SF_2(s, gsl_sf_complex_sin_e, (1.0, 5.0, &r1, &r2), + 62.44551846769653403, TEST_TOL0, + 40.09216577799840254, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_cos_e, (1.0, 5.0, &r1, &r2), + 40.09580630629882573, TEST_TOL0, + -62.43984868079963017, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_logsin_e, (1.0, 100.0, &r1, &r2), + 99.3068528194400546900, TEST_TOL0, + 0.5707963267948966192, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_logsin_e, (1.0, -100.0, &r1, &r2), + 99.3068528194400546900, TEST_TOL1, + -0.5707963267948966192, TEST_TOL1, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_complex_logsin_e, (5.0, 5.0, &r1, &r2), + 4.3068909128079757420, TEST_TOL0, + 2.8540063315538773952, TEST_TOL0, + GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lnsinh_e, (0.1, &r), -2.3009189815304652235, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnsinh_e, (1.0, &r), 0.16143936157119563361, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnsinh_e, (5.0, &r), 4.306807418479684201, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lnsinh_e, (100.0, &r), 99.30685281944005469, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_lncosh_e, (0.125, &r), 0.007792239318898252791, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lncosh_e, (1.0, &r), 0.4337808304830271870, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lncosh_e, (5.0, &r), 4.306898218339271555, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_lncosh_e, (100.0, &r), 99.30685281944005469, TEST_TOL0, GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_polar_to_rect, (10.0, M_PI/6.0, &r1, &r2), + (10.0 * sqrt(3) / 2.0), TEST_TOL0, + (10.0 * 0.5), TEST_TOL0, + GSL_SUCCESS); + + TEST_SF_2(s, gsl_sf_polar_to_rect, (10.0, -2.0/3.0*M_PI, &r1, &r2), + (10.0 * (-0.5)), TEST_TOL1, + (10.0 * (-sqrt(3.0)/2.0)), TEST_TOL1, + GSL_SUCCESS); + + /* In double precision M_PI = \pi - 1.2246467991473531772e-16, + i.e. the nearest machine number is slightly below the exact value + of \pi. The true value of \pi satisfies + + M_PI < \pi < nextafter(M_PI,+Inf) + + where nextafter(M_PI,+Inf) = M_PI + 2*DBL_EPSILON + + This also means that 2*M_PI is less than \pi by 2.449e-16. The + true value of 2\pi satisfies + + 2*M_PI < 2\pi < nextafter(2*M_PI,+Inf) + + where nextafter(2*M_PI,+Inf) = 2*M_PI + 4*DBL_EPSILON + + BJG 25/9/06 + */ + +#define DELTA (1.2246467991473531772e-16) + + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (2.0*M_PI), 2*M_PI, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-2.0*M_PI), 2*DELTA, TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (2.0*M_PI+4*GSL_DBL_EPSILON), 4*GSL_DBL_EPSILON-2*DELTA, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-2.0*M_PI-4*GSL_DBL_EPSILON), 2*M_PI-4*GSL_DBL_EPSILON+2*DELTA, TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (4.0*M_PI+8*GSL_DBL_EPSILON), 8*GSL_DBL_EPSILON-4*DELTA, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-4.0*M_PI-8*GSL_DBL_EPSILON), 2*M_PI-8*GSL_DBL_EPSILON+4*DELTA, TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (1e9), 0.5773954235013851694, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (1e12), 5.625560548042800009446, TEST_SNGL); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-1e9), 5.7057898836782013075, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-1e12), 0.6576247591367864674792517289, 100*TEST_SNGL); + +#ifdef EXTENDED + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (1e15), 2.1096981170701125979, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_pos_e, (-1e15), 4.1734871901094738790, TEST_TOL1); +#endif + + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (2.0*M_PI, &r), 2*M_PI, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (-2.0*M_PI, &r), 2*DELTA, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (1e9, &r), 0.5773954235013851694, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (1e12, &r), 5.625560548042800009446, TEST_SNGL, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (-1e9, &r), 5.7057898836782013075, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_angle_restrict_pos_err_e, (-1e12, &r), 0.6576247591367864674792517289, 100*TEST_SNGL, GSL_SUCCESS); + + TEST_SF (s, gsl_sf_angle_restrict_pos_err_e, (1e15, &r), GSL_NAN, TEST_TOL1, GSL_ELOSS); + TEST_SF (s, gsl_sf_angle_restrict_pos_err_e, (-1e15, &r), GSL_NAN, TEST_TOL1, GSL_ELOSS); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (2.0*M_PI), -2*DELTA, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-2.0*M_PI), 2*DELTA, TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (M_PI), M_PI, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-M_PI), -M_PI, TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (M_PI+2*GSL_DBL_EPSILON), -M_PI+2*(GSL_DBL_EPSILON-DELTA), TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-M_PI-2*GSL_DBL_EPSILON), M_PI-2*(GSL_DBL_EPSILON-DELTA), TEST_TOL1); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (3*M_PI+6*GSL_DBL_EPSILON), -M_PI+6*GSL_DBL_EPSILON-4*DELTA, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-3*M_PI-6*GSL_DBL_EPSILON), M_PI-6*GSL_DBL_EPSILON+4*DELTA, TEST_TOL1); + + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (1e9), 0.5773954235013851694, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (1e12), -0.6576247591367864674792517289, 100*TEST_SNGL); + + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-1e9), -0.5773954235013851694, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-1e12), 0.6576247591367864674792517289, 100*TEST_SNGL); + +#ifdef EXTENDED + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (1e15), 2.1096981170701125979, TEST_TOL1); + TEST_SF_THETA(s, gsl_sf_angle_restrict_symm_e, (-1e15), -2.1096981170701125979, TEST_TOL1); +#endif + + TEST_SF (s, gsl_sf_angle_restrict_symm_err_e, (2.0*M_PI, &r), -2*DELTA, TEST_TOL1, GSL_SUCCESS); + TEST_SF (s, gsl_sf_angle_restrict_symm_err_e, (-2.0*M_PI, &r), 2*DELTA, TEST_TOL1, GSL_SUCCESS); + + + TEST_SF(s, gsl_sf_angle_restrict_symm_err_e, (1e9, &r), 0.5773954235013851694, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_angle_restrict_symm_err_e, (1e12, &r), -0.6576247591367864674792517289, 100*TEST_SNGL, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_angle_restrict_symm_err_e, (-1e9, &r), -0.5773954235013851694, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_angle_restrict_symm_err_e, (-1e12, &r), 0.6576247591367864674792517289, 100*TEST_SNGL, GSL_SUCCESS); + + TEST_SF (s, gsl_sf_angle_restrict_symm_err_e, (1e15, &r), GSL_NAN, TEST_TOL1, GSL_ELOSS); + TEST_SF (s, gsl_sf_angle_restrict_symm_err_e, (-1e15, &r), GSL_NAN, TEST_TOL1, GSL_ELOSS); + + theta = 5.0*M_PI + 5*DELTA + M_PI/2.0; + gsl_sf_angle_restrict_pos_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, 3.0/2.0*M_PI ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_pos_e: theta = 11/2 Pi"); + s += sa; + + theta = -5.0*M_PI - 5*DELTA - M_PI/2.0; + gsl_sf_angle_restrict_pos_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, M_PI/2.0 ) > 2.0*TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_pos_e: theta = -11/2 Pi"); + s += sa; + + theta = 50000.0 + 1.0/65536.0; + gsl_sf_angle_restrict_pos_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, 4.6945260308194656055 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_pos_e: theta = 50000.0 + 1.0/65536.0"); + s += sa; + + theta = 5000000.0 + 1.0/65536.0; + gsl_sf_angle_restrict_pos_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, 4.49537973053997376 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_pos_e: theta = 5000000.0 + 1.0/65536.0"); + s += sa; + + /* + theta = 140737488355328.0; + gsl_sf_angle_restrict_pos_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, 3.20652300406795792638 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_pos_e: theta = 2^47"); + s += sa; + */ + + theta = 5.0*M_PI + (5.5*DELTA + M_PI/2.0); + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, -M_PI/2.0 ) > 2.0*TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = 11/2 Pi"); + s += sa; + + theta = -5.0*M_PI - (5.5*DELTA + M_PI/2.0); + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, M_PI/2.0 ) > 2.0*TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = -11/2 Pi"); + s += sa; + + theta = 5.0*M_PI + 5*DELTA - M_PI/2.0; + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, M_PI/2.0 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = -9/2 Pi"); + s += sa; + + theta = 3.0/2.0*M_PI + 3.0/2.0*DELTA; + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, -M_PI/2.0 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = 3/2 Pi"); + s += sa; + + theta = -3.0/2.0*M_PI; + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, M_PI/2.0 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = -3/2 Pi"); + s += sa; + + theta = 50000.0 + 1.0/65536.0; + gsl_sf_angle_restrict_symm_e(&theta); + sa = 0; + sa += ( test_sf_frac_diff( theta, -1.5886592763601208714 ) > TEST_TOL0 ); + gsl_test(sa, " gsl_angle_restrict_symm_e: theta = 50000.0 + 1.0/65536.0"); + s += sa; + + return s; +} + + +/* I computed the values of zeta for s = -1e-10, 0, 1e-10 using the + Jensen formula, + + zeta(s) = -1/2 + 1/(1-s) + + integ(sin(s arctan(t))/((1+t^2)^(s/2)(exp(2pi*t)-1)), t, 0, inf) + + transforming the integral from a semi-infinite range to the range + [0,pi/2] using the substitution t = tan(u). After Taylor expansion + in s and numerical evaluation of the integrals this gave, + + zeta(s) = 1/2 + 1/(1-s) + + (0.0810614667944862 +/- 2e-16) s + + (-3.17822795429232e-3 +/- 2e-17) s^2 + + .... + + for an expansion about s = 0 [BJG 7/01] +*/ + +int test_zeta(void) +{ + gsl_sf_result r; + int s = 0; + + TEST_SF(s, gsl_sf_zeta_int_e, (-61.0, &r), -3.30660898765775767257e+34, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_int_e, (-8, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (-6, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (-5.0, &r), -0.003968253968253968253968, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_int_e, (-4, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (-3, &r), 1.0/120.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (-2, &r), 0.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (-1, &r), -1.0/12.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_int_e, ( 5.0, &r), 1.0369277551433699263313655, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_int_e, (31.0, &r), 1.0000000004656629065033784, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zetam1_int_e, (-61.0, &r), -3.30660898765775767257e+34, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-5.0, &r), -1.003968253968253968253968, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zetam1_int_e, (-8, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-6, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-4, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-3, &r), -119.0/120.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-2, &r), -1.0, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (-1, &r), -13.0/12.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zetam1_int_e, ( 5.0, &r), 0.0369277551433699263313655, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_int_e, (31.0, &r), 0.0000000004656629065033784, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_e, (-151, &r), 8.195215221831378294e+143, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-51, &r), 9.68995788746359406565e+24, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-5, &r), -0.003968253968253968253968, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_e, (-8, &r), 0.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-6, &r), 0.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-4, &r), 0.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-3, &r), 1.0/120.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-2, &r), 0.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (-1, &r), -1.0/12.0, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_e, (-0.5, &r), -0.207886224977354566017307, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_e, (-1e-10, &r), -0.49999999990810614668948, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (0.0, &r), -0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (1e-10, &r), -0.50000000009189385333058, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zeta_e, (0.5, &r), -1.460354508809586812889499, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (1.0-1.0/1024.0, &r), -1023.4228554489429787, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (1.0+1.0/1048576, &r), 1.0485765772157343441e+06, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (5.0, &r), 1.036927755143369926331365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zeta_e, (25.5, &r), 1.000000021074106110269959, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zetam1_e, (-8, &r), -1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-6, &r), -1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-4, &r), -1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-3, &r), -119.0/120.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-2, &r), -1.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-1, &r), -13.0/12.0, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-0.5, &r), -1.207886224977354566017307, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (-1e-10, &r), -1.49999999990810614668948, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (0.0, &r), -1.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (1e-10, &r), -1.50000000009189385333058, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_zetam1_e, (0.5, &r), -2.460354508809586812889499, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (2.0, &r), 0.64493406684822643647, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (3.0, &r), 0.20205690315959428540, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (5.0, &r), 0.0369277551433699263314, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (9.5, &r), 0.0014125906121736622712, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (10.5, &r), 0.000700842641736155219500, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (12.5, &r), 0.000173751733643178193390, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (13.5, &r), 0.000086686727462338155188, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (15.5, &r), 0.000021619904246069108133, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (16.5, &r), 0.000010803124900178547671, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_zetam1_e, (25.5, &r), 0.000000021074106110269959, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_hzeta_e, (2, 1.0, &r), 1.6449340668482264365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (2, 10.0, &r), 0.1051663356816857461, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (5, 1.0, &r), 1.0369277551433699263, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (5, 10.0, &r), 0.000030413798676470276, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (9, 0.1, &r), 1.0000000004253980e+09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (30, 0.5, &r), 1.0737418240000053e+09, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (30, 0.9, &r), 2.3589824880264765e+01, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_hzeta_e, (75, 0.25, &r), 1.4272476927059599e+45, TEST_TOL1, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_eta_int_e, (-91, &r), -4.945598888750002040e+94, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, (-51, &r), -4.363969073121683116e+40, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, (-5, &r), 0.25, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, (-1, &r), 0.25, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, ( 0, &r), 0.5, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, ( 5, &r), 0.9721197704469093059, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, ( 6, &r), 0.9855510912974351041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, ( 20, &r), 0.9999990466115815221, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_int_e, ( 1000, &r), 1.0, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_eta_e, (-51.5, &r), -1.2524184036924703656e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, (-5, &r), 0.25, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, (0.5, &r), 0.6048986434216303702, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, (0.999, &r), 0.6929872789683383574, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, (1.0, &r), 0.6931471805599453094, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, (1.0+1.0e-10, &r), 0.6931471805759321998, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, ( 5, &r), 0.9721197704469093059, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, ( 5.2, &r), 0.9755278712546684682, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, ( 6, &r), 0.9855510912974351041, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_eta_e, ( 20, &r), 0.9999990466115815221, TEST_TOL0, GSL_SUCCESS); + + return s; +} + +int test_results(void) +{ + int s = 0; + + gsl_sf_result_e10 re; + gsl_sf_result r; + + re.val = -1.0; + re.err = 0.5; + re.e10 = 0; + gsl_sf_result_smash_e(&re, &r); + s += ( test_sf_frac_diff(r.val, -1.0) > TEST_TOL0 ); + s += ( test_sf_frac_diff(r.err, 0.5) > TEST_TOL0 ); + + re.val = -1.0; + re.err = 0.5; + re.e10 = 10; + gsl_sf_result_smash_e(&re, &r); + s += ( test_sf_frac_diff(r.val, -1.0e+10) > TEST_TOL1 ); + s += ( test_sf_frac_diff(r.err, 0.5e+10) > TEST_TOL1 ); + + re.val = 1.0; + re.err = 0.5; + re.e10 = 10000; + s += ( gsl_sf_result_smash_e(&re, &r) != GSL_EOVRFLW ); + + re.val = 1.0; + re.err = 0.5; + re.e10 = -10000; + s += ( gsl_sf_result_smash_e(&re, &r) != GSL_EUNDRFLW ); + + return s; +} + + +int main(int argc, char * argv[]) +{ + gsl_ieee_env_setup (); + gsl_set_error_handler_off (); + + gsl_test(test_airy(), "Airy Functions"); + gsl_test(test_bessel(), "Bessel Functions"); + gsl_test(test_clausen(), "Clausen Integral"); + gsl_test(test_coulomb(), "Coulomb Wave Functions"); + gsl_test(test_coupling(), "Coupling Coefficients"); + gsl_test(test_dawson(), "Dawson Integral"); + gsl_test(test_debye(), "Debye Functions"); + gsl_test(test_dilog(), "Dilogarithm"); + gsl_test(test_elementary(), "Elementary Functions (Misc)"); + gsl_test(test_ellint(), "Elliptic Integrals"); + gsl_test(test_jac(), "Elliptic Functions (Jacobi)"); + gsl_test(test_erf(), "Error Functions"); + gsl_test(test_exp(), "Exponential Functions"); + gsl_test(test_expint(), "Exponential/Sine/Cosine Integrals"); + gsl_test(test_fermidirac(), "Fermi-Dirac Functions"); + gsl_test(test_gamma(), "Gamma Functions"); + gsl_test(test_gegen(), "Gegenbauer Polynomials"); + gsl_test(test_hyperg(), "Hypergeometric Functions"); + gsl_test(test_laguerre(), "Laguerre Polynomials"); + gsl_test(test_lambert(), "Lambert W Functions"); + gsl_test(test_legendre(), "Legendre Functions"); + gsl_test(test_log(), "Logarithm"); + gsl_test(test_mathieu(), "Mathieu Functions"); + gsl_test(test_pow_int(), "Integer Powers"); + gsl_test(test_psi(), "Psi Functions"); + gsl_test(test_psi_complex(), "Psi Function for complex argument"); + gsl_test(test_synch(), "Synchrotron Functions"); + gsl_test(test_transport(), "Transport Functions"); + gsl_test(test_trig(), "Trigonometric and Related Functions"); + gsl_test(test_zeta(), "Zeta Functions"); + + gsl_test(test_results(), "Result Methods"); + + exit (gsl_test_summary()); +} diff --git a/software/gsl-1.15/specfunc/test_sf.h b/software/gsl-1.15/specfunc/test_sf.h new file mode 100644 index 000000000..07679da94 --- /dev/null +++ b/software/gsl-1.15/specfunc/test_sf.h @@ -0,0 +1,106 @@ +/* specfunc/test_sf.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef TEST_SF_H +#define TEST_SF_H + +#include +#include +#include +#include + +double test_sf_frac_diff(double x1, double x2); +int test_sf_check_result(char * message_buff, gsl_sf_result r, double val, double tol); +int test_sf_check_val(char * message_buff, double rval, double val, double tol); +int test_sf_check_return(char * message_buff, int val_return, int expected_return); +int test_sf_check_result_relax(char * message_buff, gsl_sf_result r, double val, double tol); + +/* Include an overall test factor to allow for differences between + compilers, otherwise there are too many bug reports on the released + versions. Turn this value down to 1.0 for development purposes */ + + +#ifndef TEST_FACTOR +#ifdef RELEASED +#define TEST_FACTOR 100.0 +#else +#define TEST_FACTOR 1.0 +#endif +#endif + +#ifndef TEST_SIGMA +#ifdef RELEASED +#define TEST_SIGMA 1.5 +#else +#define TEST_SIGMA 1.0 +#endif +#endif + +#define TEST_TOL0 (2.0*GSL_DBL_EPSILON) +#define TEST_TOL1 (16.0*GSL_DBL_EPSILON) +#define TEST_TOL2 (256.0*GSL_DBL_EPSILON) +#define TEST_TOL3 (2048.0*GSL_DBL_EPSILON) +#define TEST_TOL4 (16384.0*GSL_DBL_EPSILON) +#define TEST_TOL5 (131072.0*GSL_DBL_EPSILON) +#define TEST_TOL6 (1048576.0*GSL_DBL_EPSILON) +#define TEST_SQRT_TOL0 (2.0*GSL_SQRT_DBL_EPSILON) +#define TEST_SNGL (1.0e-06) + +#define TEST_SF_INCONS 1 +#define TEST_SF_ERRNEG 2 +#define TEST_SF_TOLBAD 4 +#define TEST_SF_RETBAD 8 +#define TEST_SF_ERRBAD 16 +#define TEST_SF_ERRBIG 32 +#define TEST_SF_EXPBAD 64 + +int test_sf (gsl_sf_result r, double val_in, double tol, int status, int expect_return, const char * desc); +int test_sf_e10 (gsl_sf_result_e10 r, double val_in, int e10_in, double tol, int status, int expect_return, const char * desc); +int test_sf_val (double val, double val_in, double tol, const char * desc); +int test_sf_rlx (gsl_sf_result r, double val_in, double tol, int status, int expect_return, const char * desc); +int test_sf_2 (gsl_sf_result r1, double val1, double tol1, gsl_sf_result r2, double val2, double tol2, int status, int expect_return, const char * desc); +int test_sf_sgn (gsl_sf_result r, double sgn, double val_in, double tol, double expect_sgn, int status, int expect_return, const char * desc); + +#define TEST_SF(stat, func, args, val_in, tol, expect_return) { int status = func args; stat += test_sf(r, val_in, tol, status, expect_return, #func #args); } + +#define TEST_SF_E10(stat, func, args, val_in, e10_in, tol, expect_return) { int status = func args; stat += test_sf_e10(re, val_in, e10_in, tol, status, expect_return, #func #args); } + +#define TEST_SF_VAL(stat, func, args, val_in, tol) { double val = func args; stat += test_sf_val(val, val_in, tol, #func #args); } + +#define TEST_SF_RLX(stat, func, args, val_in, tol, expect_return) { int status = func args; stat += test_sf_rlx(r, val_in, tol, status, expect_return, #func #args); } + +#define TEST_SF_2(stat, func, args, val1, tol1, val2, tol2, expect_return) { int status = func args; stat += test_sf_2(r1, val1, tol1, r2, val2, tol2, status, expect_return, #func #args); } + +#define TEST_SF_SGN(stat, func, args, val_in, tol, expect_sgn, expect_return) { int status = func args; stat += test_sf_sgn(r, sgn, val_in, tol, expect_sgn, status, expect_return, #func #args); } + +#define TEST_SF_THETA(stat, func, args, val_in, tol) { int status; theta=args; status = func (&theta); stat += test_sf_val(theta, val_in, tol, #func #args); } + +int test_airy(void); +int test_bessel(void); +int test_coulomb(void); +int test_dilog(void); +int test_gamma(void); +int test_mathieu(void); +int test_hyperg(void); +int test_legendre(void); + + +#endif /* !TEST_SF_H */ diff --git a/software/gsl-1.15/specfunc/transport.c b/software/gsl-1.15/specfunc/transport.c new file mode 100644 index 000000000..c55c13c10 --- /dev/null +++ b/software/gsl-1.15/specfunc/transport.c @@ -0,0 +1,492 @@ +/* specfunc/transport.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include + +#include "error.h" +#include "check.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +static double transport2_data[18] = { + 1.671760446434538503, + -0.147735359946794490, + 0.148213819946936338e-01, + -0.14195330326305613e-02, + 0.1306541324415708e-03, + -0.117155795867579e-04, + 0.10333498445756e-05, + -0.901911304223e-07, + 0.78177169833e-08, + -0.6744565684e-09, + 0.579946394e-10, + -0.49747619e-11, + 0.425961e-12, + -0.36422e-13, + 0.3111e-14, + -0.265e-15, + 0.23e-16, + -0.19e-17 +}; +static cheb_series transport2_cs = { + transport2_data, + 17, + -1, 1, + 9 +}; + +static double transport3_data[18] = { + 0.762012543243872007, + -0.105674387705058533, + 0.119778084819657810e-01, + -0.12144015203698307e-02, + 0.1155099769392855e-03, + -0.105815992124423e-04, + 0.9474663385302e-06, + -0.836221212858e-07, + 0.73109099278e-08, + -0.6350594779e-09, + 0.549118282e-10, + -0.47321395e-11, + 0.4067695e-12, + -0.348971e-13, + 0.29892e-14, + -0.256e-15, + 0.219e-16, + -0.19e-17 +}; +static cheb_series transport3_cs = { + transport3_data, + 17, + -1, 1, + 9 +}; + + +static double transport4_data[18] = { + 0.4807570994615110579, + -0.8175378810321083956e-01, + 0.1002700665975162973e-01, + -0.10599339359820151e-02, + 0.1034506245030405e-03, + -0.96442705485899e-05, + 0.8745544408515e-06, + -0.779321207981e-07, + 0.68649886141e-08, + -0.5999571076e-09, + 0.521366241e-10, + -0.45118382e-11, + 0.3892159e-12, + -0.334936e-13, + 0.28767e-14, + -0.2467e-15, + 0.211e-16, + -0.18e-17 +}; +static cheb_series transport4_cs = { + transport4_data, + 17, + -1, 1, + 9 +}; + + +static double transport5_data[18] = { + 0.347777777133910789, + -0.66456988976050428e-01, + 0.8611072656883309e-02, + -0.9396682223755538e-03, + 0.936324806081513e-04, + -0.88571319340833e-05, + 0.811914989145e-06, + -0.72957654233e-07, + 0.646971455e-08, + -0.568490283e-09, + 0.49625598e-10, + -0.4310940e-11, + 0.373100e-12, + -0.32198e-13, + 0.2772e-14, + -0.238e-15, + 0.21e-16, + -0.18e-17 +}; +static cheb_series transport5_cs = { + transport5_data, + 17, + -1, 1, + 9 +}; + + +static +double +transport_sumexp(const int numexp, const int order, const double t, double x) +{ + double rk = (double)numexp; + double sumexp = 0.0; + int k; + for(k=1; k<=numexp; k++) { + double sum2 = 1.0; + double xk = 1.0/(rk*x); + double xk1 = 1.0; + int j; + for(j=1; j<=order; j++) { + sum2 = sum2*xk1*xk + 1.0; + xk1 += 1.0; + } + sumexp *= t; + sumexp += sum2; + rk -= 1.0; + } + return sumexp; +} + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + +int +gsl_sf_transport_2_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 3.289868133696452873; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x < 3.0*GSL_SQRT_DBL_EPSILON) { + result->val = x; + result->err = GSL_DBL_EPSILON*fabs(x) + x*x/2.0; + return GSL_SUCCESS; + } + else if(x <= 4.0) { + double t = (x*x/8.0 - 0.5) - 0.5; + gsl_sf_result result_c; + cheb_eval_e(&transport2_cs, t, &result_c); + result->val = x * result_c.val; + result->err = x * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -GSL_LOG_DBL_EPSILON) { + const int numexp = (int)((-GSL_LOG_DBL_EPSILON)/x) + 1; + const double sumexp = transport_sumexp(numexp, 2, exp(-x), x); + const double t = 2.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + fabs(t) * et); + } + return GSL_SUCCESS; + } + else if(x < 2.0/GSL_DBL_EPSILON) { + const int numexp = 1; + const double sumexp = transport_sumexp(numexp, 2, 1.0, x); + const double t = 2.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else { + const double t = 2.0 * log(x) - x; + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } +} + + +int +gsl_sf_transport_3_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 7.212341418957565712; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 3.0*GSL_SQRT_DBL_EPSILON) { + result->val = 0.5*x*x; + result->err = 2.0 * GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double x2 = x*x; + const double t = (x2/8.0 - 0.5) - 0.5; + gsl_sf_result result_c; + cheb_eval_e(&transport3_cs, t, &result_c); + result->val = x2 * result_c.val; + result->err = x2 * result_c.err; + result->err += GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -GSL_LOG_DBL_EPSILON) { + const int numexp = (int)((-GSL_LOG_DBL_EPSILON)/x) + 1; + const double sumexp = transport_sumexp(numexp, 3, exp(-x), x); + const double t = 3.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + fabs(t) * et); + } + return GSL_SUCCESS; + } + else if(x < 3.0/GSL_DBL_EPSILON) { + const int numexp = 1; + const double sumexp = transport_sumexp(numexp, 3, 1.0, x); + const double t = 3.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else { + const double t = 3.0 * log(x) - x; + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } +} + + +int +gsl_sf_transport_4_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 25.97575760906731660; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 3.0*GSL_SQRT_DBL_EPSILON) { + result->val = x*x*x/3.0; + result->err = 3.0 * GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double x2 = x*x; + const double t = (x2/8.0 - 0.5) - 0.5; + gsl_sf_result result_c; + cheb_eval_e(&transport4_cs, t, &result_c); + result->val = x2*x * result_c.val; + result->err = x2*x * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -GSL_LOG_DBL_EPSILON) { + const int numexp = (int)((-GSL_LOG_DBL_EPSILON)/x) + 1; + const double sumexp = transport_sumexp(numexp, 4, exp(-x), x); + const double t = 4.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else if(x < 3.0/GSL_DBL_EPSILON) { + const int numexp = 1; + const double sumexp = transport_sumexp(numexp, 4, 1.0, x); + const double t = 4.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else { + const double t = 4.0 * log(x) - x; + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } +} + + +int +gsl_sf_transport_5_e(const double x, gsl_sf_result * result) +{ + const double val_infinity = 124.4313306172043912; + + /* CHECK_POINTER(result) */ + + if(x < 0.0) { + DOMAIN_ERROR(result); + } + else if(x == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(x < 3.0*GSL_SQRT_DBL_EPSILON) { + result->val = x*x*x*x/4.0; + result->err = 4.0 * GSL_DBL_EPSILON * result->val; + CHECK_UNDERFLOW(result); + return GSL_SUCCESS; + } + else if(x <= 4.0) { + const double x2 = x*x; + const double t = (x2/8.0 - 0.5) - 0.5; + gsl_sf_result result_c; + cheb_eval_e(&transport5_cs, t, &result_c); + result->val = x2*x2 * result_c.val; + result->err = x2*x2 * result_c.err; + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -GSL_LOG_DBL_EPSILON) { + const int numexp = (int)((-GSL_LOG_DBL_EPSILON)/x) + 1; + const double sumexp = transport_sumexp(numexp, 5, exp(-x), x); + const double t = 5.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else if(x < 3.0/GSL_DBL_EPSILON) { + const int numexp = 1; + const double sumexp = transport_sumexp(numexp, 5, 1.0, x); + const double t = 5.0 * log(x) - x + log(sumexp); + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } + else { + const double t = 5.0 * log(x) - x; + if(t < GSL_LOG_DBL_EPSILON) { + result->val = val_infinity; + result->err = 2.0 * GSL_DBL_EPSILON * val_infinity; + } + else { + const double et = exp(t); + result->val = val_infinity - et; + result->err = 2.0 * GSL_DBL_EPSILON * (val_infinity + (fabs(t)+1.0) * et); + } + return GSL_SUCCESS; + } +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_transport_2(const double x) +{ + EVAL_RESULT(gsl_sf_transport_2_e(x, &result)); +} + +double gsl_sf_transport_3(const double x) +{ + EVAL_RESULT(gsl_sf_transport_3_e(x, &result)); +} + +double gsl_sf_transport_4(const double x) +{ + EVAL_RESULT(gsl_sf_transport_4_e(x, &result)); +} + +double gsl_sf_transport_5(const double x) +{ + EVAL_RESULT(gsl_sf_transport_5_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/trig.c b/software/gsl-1.15/specfunc/trig.c new file mode 100644 index 000000000..46cefdcd0 --- /dev/null +++ b/software/gsl-1.15/specfunc/trig.c @@ -0,0 +1,771 @@ +/* specfunc/trig.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +/* sinh(x) series + * double-precision for |x| < 1.0 + */ +inline +static +int +sinh_series(const double x, double * result) +{ + const double y = x*x; + const double c0 = 1.0/6.0; + const double c1 = 1.0/120.0; + const double c2 = 1.0/5040.0; + const double c3 = 1.0/362880.0; + const double c4 = 1.0/39916800.0; + const double c5 = 1.0/6227020800.0; + const double c6 = 1.0/1307674368000.0; + const double c7 = 1.0/355687428096000.0; + *result = x*(1.0 + y*(c0+y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*(c6+y*c7)))))))); + return GSL_SUCCESS; +} + + +/* cosh(x)-1 series + * double-precision for |x| < 1.0 + */ +inline +static +int +cosh_m1_series(const double x, double * result) +{ + const double y = x*x; + const double c0 = 0.5; + const double c1 = 1.0/24.0; + const double c2 = 1.0/720.0; + const double c3 = 1.0/40320.0; + const double c4 = 1.0/3628800.0; + const double c5 = 1.0/479001600.0; + const double c6 = 1.0/87178291200.0; + const double c7 = 1.0/20922789888000.0; + const double c8 = 1.0/6402373705728000.0; + *result = y*(c0+y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*(c6+y*(c7+y*c8)))))))); + return GSL_SUCCESS; +} + + +/* Chebyshev expansion for f(t) = sinc((t+1)/2), -1 < t < 1 + */ +static double sinc_data[17] = { + 1.133648177811747875422, + -0.532677564732557348781, + -0.068293048346633177859, + 0.033403684226353715020, + 0.001485679893925747818, + -0.000734421305768455295, + -0.000016837282388837229, + 0.000008359950146618018, + 0.000000117382095601192, + -0.000000058413665922724, + -0.000000000554763755743, + 0.000000000276434190426, + 0.000000000001895374892, + -0.000000000000945237101, + -0.000000000000004900690, + 0.000000000000002445383, + 0.000000000000000009925 +}; +static cheb_series sinc_cs = { + sinc_data, + 16, + -1, 1, + 10 +}; + + +/* Chebyshev expansion for f(t) = g((t+1)Pi/8), -1val = x * (1.0 - x2/6.0); + result->err = fabs(x*x2*x2 / 100.0); + return GSL_SUCCESS; + } + else { + double sgn_result = sgn_x; + double y = floor(abs_x/(0.25*M_PI)); + int octant = y - ldexp(floor(ldexp(y,-3)),3); + int stat_cs; + double z; + + if(GSL_IS_ODD(octant)) { + octant += 1; + octant &= 07; + y += 1.0; + } + + if(octant > 3) { + octant -= 4; + sgn_result = -sgn_result; + } + + z = ((abs_x - y * P1) - y * P2) - y * P3; + + if(octant == 0) { + gsl_sf_result sin_cs_result; + const double t = 8.0*fabs(z)/M_PI - 1.0; + stat_cs = cheb_eval_e(&sin_cs, t, &sin_cs_result); + result->val = z * (1.0 + z*z * sin_cs_result.val); + } + else { /* octant == 2 */ + gsl_sf_result cos_cs_result; + const double t = 8.0*fabs(z)/M_PI - 1.0; + stat_cs = cheb_eval_e(&cos_cs, t, &cos_cs_result); + result->val = 1.0 - 0.5*z*z * (1.0 - z*z * cos_cs_result.val); + } + + result->val *= sgn_result; + + if(abs_x > 1.0/GSL_DBL_EPSILON) { + result->err = fabs(result->val); + } + else if(abs_x > 100.0/GSL_SQRT_DBL_EPSILON) { + result->err = 2.0 * abs_x * GSL_DBL_EPSILON * fabs(result->val); + } + else if(abs_x > 0.1/GSL_SQRT_DBL_EPSILON) { + result->err = 2.0 * GSL_SQRT_DBL_EPSILON * fabs(result->val); + } + else { + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + + return stat_cs; + } + } +} + + +int +gsl_sf_cos_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + const double P1 = 7.85398125648498535156e-1; + const double P2 = 3.77489470793079817668e-8; + const double P3 = 2.69515142907905952645e-15; + + const double abs_x = fabs(x); + + if(abs_x < GSL_ROOT4_DBL_EPSILON) { + const double x2 = x*x; + result->val = 1.0 - 0.5*x2; + result->err = fabs(x2*x2/12.0); + return GSL_SUCCESS; + } + else { + double sgn_result = 1.0; + double y = floor(abs_x/(0.25*M_PI)); + int octant = y - ldexp(floor(ldexp(y,-3)),3); + int stat_cs; + double z; + + if(GSL_IS_ODD(octant)) { + octant += 1; + octant &= 07; + y += 1.0; + } + + if(octant > 3) { + octant -= 4; + sgn_result = -sgn_result; + } + + if(octant > 1) { + sgn_result = -sgn_result; + } + + z = ((abs_x - y * P1) - y * P2) - y * P3; + + if(octant == 0) { + gsl_sf_result cos_cs_result; + const double t = 8.0*fabs(z)/M_PI - 1.0; + stat_cs = cheb_eval_e(&cos_cs, t, &cos_cs_result); + result->val = 1.0 - 0.5*z*z * (1.0 - z*z * cos_cs_result.val); + } + else { /* octant == 2 */ + gsl_sf_result sin_cs_result; + const double t = 8.0*fabs(z)/M_PI - 1.0; + stat_cs = cheb_eval_e(&sin_cs, t, &sin_cs_result); + result->val = z * (1.0 + z*z * sin_cs_result.val); + } + + result->val *= sgn_result; + + if(abs_x > 1.0/GSL_DBL_EPSILON) { + result->err = fabs(result->val); + } + else if(abs_x > 100.0/GSL_SQRT_DBL_EPSILON) { + result->err = 2.0 * abs_x * GSL_DBL_EPSILON * fabs(result->val); + } + else if(abs_x > 0.1/GSL_SQRT_DBL_EPSILON) { + result->err = 2.0 * GSL_SQRT_DBL_EPSILON * fabs(result->val); + } + else { + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + } + + return stat_cs; + } + } +} + + +int +gsl_sf_hypot_e(const double x, const double y, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x == 0.0 && y == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else { + const double a = fabs(x); + const double b = fabs(y); + const double min = GSL_MIN_DBL(a,b); + const double max = GSL_MAX_DBL(a,b); + const double rat = min/max; + const double root_term = sqrt(1.0 + rat*rat); + + if(max < GSL_DBL_MAX/root_term) { + result->val = max * root_term; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR(result); + } + } +} + + +int +gsl_sf_complex_sin_e(const double zr, const double zi, + gsl_sf_result * szr, gsl_sf_result * szi) +{ + /* CHECK_POINTER(szr) */ + /* CHECK_POINTER(szi) */ + + if(fabs(zi) < 1.0) { + double ch_m1, sh; + sinh_series(zi, &sh); + cosh_m1_series(zi, &ch_m1); + szr->val = sin(zr)*(ch_m1 + 1.0); + szi->val = cos(zr)*sh; + szr->err = 2.0 * GSL_DBL_EPSILON * fabs(szr->val); + szi->err = 2.0 * GSL_DBL_EPSILON * fabs(szi->val); + return GSL_SUCCESS; + } + else if(fabs(zi) < GSL_LOG_DBL_MAX) { + double ex = exp(zi); + double ch = 0.5*(ex+1.0/ex); + double sh = 0.5*(ex-1.0/ex); + szr->val = sin(zr)*ch; + szi->val = cos(zr)*sh; + szr->err = 2.0 * GSL_DBL_EPSILON * fabs(szr->val); + szi->err = 2.0 * GSL_DBL_EPSILON * fabs(szi->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR_2(szr, szi); + } +} + + +int +gsl_sf_complex_cos_e(const double zr, const double zi, + gsl_sf_result * czr, gsl_sf_result * czi) +{ + /* CHECK_POINTER(czr) */ + /* CHECK_POINTER(czi) */ + + if(fabs(zi) < 1.0) { + double ch_m1, sh; + sinh_series(zi, &sh); + cosh_m1_series(zi, &ch_m1); + czr->val = cos(zr)*(ch_m1 + 1.0); + czi->val = -sin(zr)*sh; + czr->err = 2.0 * GSL_DBL_EPSILON * fabs(czr->val); + czi->err = 2.0 * GSL_DBL_EPSILON * fabs(czi->val); + return GSL_SUCCESS; + } + else if(fabs(zi) < GSL_LOG_DBL_MAX) { + double ex = exp(zi); + double ch = 0.5*(ex+1.0/ex); + double sh = 0.5*(ex-1.0/ex); + czr->val = cos(zr)*ch; + czi->val = -sin(zr)*sh; + czr->err = 2.0 * GSL_DBL_EPSILON * fabs(czr->val); + czi->err = 2.0 * GSL_DBL_EPSILON * fabs(czi->val); + return GSL_SUCCESS; + } + else { + OVERFLOW_ERROR_2(czr,czi); + } +} + + +int +gsl_sf_complex_logsin_e(const double zr, const double zi, + gsl_sf_result * lszr, gsl_sf_result * lszi) +{ + /* CHECK_POINTER(lszr) */ + /* CHECK_POINTER(lszi) */ + + if(zi > 60.0) { + lszr->val = -M_LN2 + zi; + lszi->val = 0.5*M_PI - zr; + lszr->err = 2.0 * GSL_DBL_EPSILON * fabs(lszr->val); + lszi->err = 2.0 * GSL_DBL_EPSILON * fabs(lszi->val); + } + else if(zi < -60.0) { + lszr->val = -M_LN2 - zi; + lszi->val = -0.5*M_PI + zr; + lszr->err = 2.0 * GSL_DBL_EPSILON * fabs(lszr->val); + lszi->err = 2.0 * GSL_DBL_EPSILON * fabs(lszi->val); + } + else { + gsl_sf_result sin_r, sin_i; + int status; + gsl_sf_complex_sin_e(zr, zi, &sin_r, &sin_i); /* ok by construction */ + status = gsl_sf_complex_log_e(sin_r.val, sin_i.val, lszr, lszi); + if(status == GSL_EDOM) { + DOMAIN_ERROR_2(lszr, lszi); + } + } + return gsl_sf_angle_restrict_symm_e(&(lszi->val)); +} + + +int +gsl_sf_lnsinh_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if(fabs(x) < 1.0) { + double eps; + sinh_series(x, &eps); + result->val = log(eps); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(x < -0.5*GSL_LOG_DBL_EPSILON) { + result->val = x + log(0.5*(1.0 - exp(-2.0*x))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = -M_LN2 + x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +int gsl_sf_lncosh_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(fabs(x) < 1.0) { + double eps; + cosh_m1_series(x, &eps); + return gsl_sf_log_1plusx_e(eps, result); + } + else if(x < -0.5*GSL_LOG_DBL_EPSILON) { + result->val = x + log(0.5*(1.0 + exp(-2.0*x))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = -M_LN2 + x; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +/* +inline int gsl_sf_sincos_e(const double theta, double * s, double * c) +{ + double tan_half = tan(0.5 * theta); + double den = 1. + tan_half*tan_half; + double cos_theta = (1.0 - tan_half*tan_half) / den; + double sin_theta = 2.0 * tan_half / den; +} +*/ + +int +gsl_sf_polar_to_rect(const double r, const double theta, + gsl_sf_result * x, gsl_sf_result * y) +{ + double t = theta; + int status = gsl_sf_angle_restrict_symm_e(&t); + double c = cos(t); + double s = sin(t); + x->val = r * cos(t); + y->val = r * sin(t); + x->err = r * fabs(s * GSL_DBL_EPSILON * t); + x->err += 2.0 * GSL_DBL_EPSILON * fabs(x->val); + y->err = r * fabs(c * GSL_DBL_EPSILON * t); + y->err += 2.0 * GSL_DBL_EPSILON * fabs(y->val); + return status; +} + + +int +gsl_sf_rect_to_polar(const double x, const double y, + gsl_sf_result * r, gsl_sf_result * theta) +{ + int stat_h = gsl_sf_hypot_e(x, y, r); + if(r->val > 0.0) { + theta->val = atan2(y, x); + theta->err = 2.0 * GSL_DBL_EPSILON * fabs(theta->val); + return stat_h; + } + else { + DOMAIN_ERROR(theta); + } +} + + +int gsl_sf_angle_restrict_symm_err_e(const double theta, gsl_sf_result * result) +{ + /* synthetic extended precision constants */ + const double P1 = 4 * 7.8539812564849853515625e-01; + const double P2 = 4 * 3.7748947079307981766760e-08; + const double P3 = 4 * 2.6951514290790594840552e-15; + const double TwoPi = 2*(P1 + P2 + P3); + + const double y = GSL_SIGN(theta) * 2 * floor(fabs(theta)/TwoPi); + double r = ((theta - y*P1) - y*P2) - y*P3; + + if(r > M_PI) { r = (((r-2*P1)-2*P2)-2*P3); } /* r-TwoPi */ + else if (r < -M_PI) r = (((r+2*P1)+2*P2)+2*P3); /* r+TwoPi */ + + result->val = r; + + if(fabs(theta) > 0.0625/GSL_DBL_EPSILON) { + result->val = GSL_NAN; + result->err = GSL_NAN; + GSL_ERROR ("error", GSL_ELOSS); + } + else if(fabs(theta) > 0.0625/GSL_SQRT_DBL_EPSILON) { + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val - theta); + return GSL_SUCCESS; + } + else { + double delta = fabs(result->val - theta); + result->err = 2.0 * GSL_DBL_EPSILON * ((delta < M_PI) ? delta : M_PI); + return GSL_SUCCESS; + } +} + + +int gsl_sf_angle_restrict_pos_err_e(const double theta, gsl_sf_result * result) +{ + /* synthetic extended precision constants */ + const double P1 = 4 * 7.85398125648498535156e-01; + const double P2 = 4 * 3.77489470793079817668e-08; + const double P3 = 4 * 2.69515142907905952645e-15; + const double TwoPi = 2*(P1 + P2 + P3); + + const double y = 2*floor(theta/TwoPi); + + double r = ((theta - y*P1) - y*P2) - y*P3; + + if(r > TwoPi) {r = (((r-2*P1)-2*P2)-2*P3); } /* r-TwoPi */ + else if (r < 0) { /* may happen due to FP rounding */ + r = (((r+2*P1)+2*P2)+2*P3); /* r+TwoPi */ + } + + result->val = r; + + if(fabs(theta) > 0.0625/GSL_DBL_EPSILON) { + result->val = GSL_NAN; + result->err = fabs(result->val); + GSL_ERROR ("error", GSL_ELOSS); + } + else if(fabs(theta) > 0.0625/GSL_SQRT_DBL_EPSILON) { + result->err = GSL_DBL_EPSILON * fabs(result->val - theta); + return GSL_SUCCESS; + } + else { + double delta = fabs(result->val - theta); + result->err = 2.0 * GSL_DBL_EPSILON * ((delta < M_PI) ? delta : M_PI); + return GSL_SUCCESS; + } +} + + +int gsl_sf_angle_restrict_symm_e(double * theta) +{ + gsl_sf_result r; + int stat = gsl_sf_angle_restrict_symm_err_e(*theta, &r); + *theta = r.val; + return stat; +} + + +int gsl_sf_angle_restrict_pos_e(double * theta) +{ + gsl_sf_result r; + int stat = gsl_sf_angle_restrict_pos_err_e(*theta, &r); + *theta = r.val; + return stat; +} + + +int gsl_sf_sin_err_e(const double x, const double dx, gsl_sf_result * result) +{ + int stat_s = gsl_sf_sin_e(x, result); + result->err += fabs(cos(x) * dx); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return stat_s; +} + + +int gsl_sf_cos_err_e(const double x, const double dx, gsl_sf_result * result) +{ + int stat_c = gsl_sf_cos_e(x, result); + result->err += fabs(sin(x) * dx); + result->err += GSL_DBL_EPSILON * fabs(result->val); + return stat_c; +} + + +#if 0 +int +gsl_sf_sin_pi_x_e(const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(-100.0 < x && x < 100.0) { + result->val = sin(M_PI * x) / (M_PI * x); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + const double N = floor(x + 0.5); + const double f = x - N; + + if(N < INT_MAX && N > INT_MIN) { + /* Make it an integer if we can. Saves another + * call to floor(). + */ + const int intN = (int)N; + const double sign = ( GSL_IS_ODD(intN) ? -1.0 : 1.0 ); + result->val = sign * sin(M_PI * f); + result->err = GSL_DBL_EPSILON * fabs(result->val); + } + else if(N > 2.0/GSL_DBL_EPSILON || N < -2.0/GSL_DBL_EPSILON) { + /* All integer-valued floating point numbers + * bigger than 2/eps=2^53 are actually even. + */ + result->val = 0.0; + result->err = 0.0; + } + else { + const double resN = N - 2.0*floor(0.5*N); /* 0 for even N, 1 for odd N */ + const double sign = ( fabs(resN) > 0.5 ? -1.0 : 1.0 ); + result->val = sign * sin(M_PI*f); + result->err = GSL_DBL_EPSILON * fabs(result->val); + } + + return GSL_SUCCESS; + } +} +#endif + + +int gsl_sf_sinc_e(double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + { + const double ax = fabs(x); + + if(ax < 0.8) { + /* Do not go to the limit of the fit since + * there is a zero there and the Chebyshev + * accuracy will go to zero. + */ + return cheb_eval_e(&sinc_cs, 2.0*ax-1.0, result); + } + else if(ax < 100.0) { + /* Small arguments are no problem. + * We trust the library sin() to + * roughly machine precision. + */ + result->val = sin(M_PI * ax)/(M_PI * ax); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* Large arguments must be handled separately. + */ + const double r = M_PI*ax; + gsl_sf_result s; + int stat_s = gsl_sf_sin_e(r, &s); + result->val = s.val/r; + result->err = s.err/r + 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return stat_s; + } + } +} + + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_sin(const double x) +{ + EVAL_RESULT(gsl_sf_sin_e(x, &result)); +} + +double gsl_sf_cos(const double x) +{ + EVAL_RESULT(gsl_sf_cos_e(x, &result)); +} + +double gsl_sf_hypot(const double x, const double y) +{ + EVAL_RESULT(gsl_sf_hypot_e(x, y, &result)); +} + +double gsl_sf_lnsinh(const double x) +{ + EVAL_RESULT(gsl_sf_lnsinh_e(x, &result)); +} + +double gsl_sf_lncosh(const double x) +{ + EVAL_RESULT(gsl_sf_lncosh_e(x, &result)); +} + +double gsl_sf_angle_restrict_symm(const double theta) +{ + double result = theta; + EVAL_DOUBLE(gsl_sf_angle_restrict_symm_e(&result)); +} + +double gsl_sf_angle_restrict_pos(const double theta) +{ + double result = theta; + EVAL_DOUBLE(gsl_sf_angle_restrict_pos_e(&result)); +} + +#if 0 +double gsl_sf_sin_pi_x(const double x) +{ + EVAL_RESULT(gsl_sf_sin_pi_x_e(x, &result)); +} +#endif + +double gsl_sf_sinc(const double x) +{ + EVAL_RESULT(gsl_sf_sinc_e(x, &result)); +} diff --git a/software/gsl-1.15/specfunc/zeta.c b/software/gsl-1.15/specfunc/zeta.c new file mode 100644 index 000000000..0a7a02e12 --- /dev/null +++ b/software/gsl-1.15/specfunc/zeta.c @@ -0,0 +1,1050 @@ +/* specfunc/zeta.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "error.h" + +#include "chebyshev.h" +#include "cheb_eval.c" + +#define LogTwoPi_ 1.8378770664093454835606594728111235279723 + + +/*-*-*-*-*-*-*-*-*-*-*-* Private Section *-*-*-*-*-*-*-*-*-*-*-*/ + +/* chebyshev fit for (s(t)-1)Zeta[s(t)] + * s(t)= (t+1)/2 + * -1 <= t <= 1 + */ +static double zeta_xlt1_data[14] = { + 1.48018677156931561235192914649, + 0.25012062539889426471999938167, + 0.00991137502135360774243761467, + -0.00012084759656676410329833091, + -4.7585866367662556504652535281e-06, + 2.2229946694466391855561441361e-07, + -2.2237496498030257121309056582e-09, + -1.0173226513229028319420799028e-10, + 4.3756643450424558284466248449e-12, + -6.2229632593100551465504090814e-14, + -6.6116201003272207115277520305e-16, + 4.9477279533373912324518463830e-17, + -1.0429819093456189719660003522e-18, + 6.9925216166580021051464412040e-21, +}; +static cheb_series zeta_xlt1_cs = { + zeta_xlt1_data, + 13, + -1, 1, + 8 +}; + +/* chebyshev fit for (s(t)-1)Zeta[s(t)] + * s(t)= (19t+21)/2 + * -1 <= t <= 1 + */ +static double zeta_xgt1_data[30] = { + 19.3918515726724119415911269006, + 9.1525329692510756181581271500, + 0.2427897658867379985365270155, + -0.1339000688262027338316641329, + 0.0577827064065028595578410202, + -0.0187625983754002298566409700, + 0.0039403014258320354840823803, + -0.0000581508273158127963598882, + -0.0003756148907214820704594549, + 0.0001892530548109214349092999, + -0.0000549032199695513496115090, + 8.7086484008939038610413331863e-6, + 6.4609477924811889068410083425e-7, + -9.6749773915059089205835337136e-7, + 3.6585400766767257736982342461e-7, + -8.4592516427275164351876072573e-8, + 9.9956786144497936572288988883e-9, + 1.4260036420951118112457144842e-9, + -1.1761968823382879195380320948e-9, + 3.7114575899785204664648987295e-10, + -7.4756855194210961661210215325e-11, + 7.8536934209183700456512982968e-12, + 9.9827182259685539619810406271e-13, + -7.5276687030192221587850302453e-13, + 2.1955026393964279988917878654e-13, + -4.1934859852834647427576319246e-14, + 4.6341149635933550715779074274e-15, + 2.3742488509048340106830309402e-16, + -2.7276516388124786119323824391e-16, + 7.8473570134636044722154797225e-17 +}; +static cheb_series zeta_xgt1_cs = { + zeta_xgt1_data, + 29, + -1, 1, + 17 +}; + + +/* chebyshev fit for Ln[Zeta[s(t)] - 1 - 2^(-s(t))] + * s(t)= 10 + 5t + * -1 <= t <= 1; 5 <= s <= 15 + */ +static double zetam1_inter_data[24] = { + -21.7509435653088483422022339374, + -5.63036877698121782876372020472, + 0.0528041358684229425504861579635, + -0.0156381809179670789342700883562, + 0.00408218474372355881195080781927, + -0.0010264867349474874045036628282, + 0.000260469880409886900143834962387, + -0.0000676175847209968878098566819447, + 0.0000179284472587833525426660171124, + -4.83238651318556188834107605116e-6, + 1.31913788964999288471371329447e-6, + -3.63760500656329972578222188542e-7, + 1.01146847513194744989748396574e-7, + -2.83215225141806501619105289509e-8, + 7.97733710252021423361012829496e-9, + -2.25850168553956886676250696891e-9, + 6.42269392950164306086395744145e-10, + -1.83363861846127284505060843614e-10, + 5.25309763895283179960368072104e-11, + -1.50958687042589821074710575446e-11, + 4.34997545516049244697776942981e-12, + -1.25597782748190416118082322061e-12, + 3.61280740072222650030134104162e-13, + -9.66437239205745207188920348801e-14 +}; +static cheb_series zetam1_inter_cs = { + zetam1_inter_data, + 22, + -1, 1, + 12 +}; + + + +/* assumes s >= 0 and s != 1.0 */ +inline +static int +riemann_zeta_sgt0(double s, gsl_sf_result * result) +{ + if(s < 1.0) { + gsl_sf_result c; + cheb_eval_e(&zeta_xlt1_cs, 2.0*s - 1.0, &c); + result->val = c.val / (s - 1.0); + result->err = c.err / fabs(s-1.0) + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(s <= 20.0) { + double x = (2.0*s - 21.0)/19.0; + gsl_sf_result c; + cheb_eval_e(&zeta_xgt1_cs, x, &c); + result->val = c.val / (s - 1.0); + result->err = c.err / (s - 1.0) + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double f2 = 1.0 - pow(2.0,-s); + double f3 = 1.0 - pow(3.0,-s); + double f5 = 1.0 - pow(5.0,-s); + double f7 = 1.0 - pow(7.0,-s); + result->val = 1.0/(f2*f3*f5*f7); + result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +inline +static int +riemann_zeta1ms_slt0(double s, gsl_sf_result * result) +{ + if(s > -19.0) { + double x = (-19 - 2.0*s)/19.0; + gsl_sf_result c; + cheb_eval_e(&zeta_xgt1_cs, x, &c); + result->val = c.val / (-s); + result->err = c.err / (-s) + GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + double f2 = 1.0 - pow(2.0,-(1.0-s)); + double f3 = 1.0 - pow(3.0,-(1.0-s)); + double f5 = 1.0 - pow(5.0,-(1.0-s)); + double f7 = 1.0 - pow(7.0,-(1.0-s)); + result->val = 1.0/(f2*f3*f5*f7); + result->err = 3.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } +} + + +/* works for 5 < s < 15*/ +static int +riemann_zeta_minus_1_intermediate_s(double s, gsl_sf_result * result) +{ + double t = (s - 10.0)/5.0; + gsl_sf_result c; + cheb_eval_e(&zetam1_inter_cs, t, &c); + result->val = exp(c.val) + pow(2.0, -s); + result->err = (c.err + 2.0*GSL_DBL_EPSILON)*result->val; + return GSL_SUCCESS; +} + + +/* assumes s is large and positive + * write: zeta(s) - 1 = zeta(s) * (1 - 1/zeta(s)) + * and expand a few terms of the product formula to evaluate 1 - 1/zeta(s) + * + * works well for s > 15 + */ +static int +riemann_zeta_minus1_large_s(double s, gsl_sf_result * result) +{ + double a = pow( 2.0,-s); + double b = pow( 3.0,-s); + double c = pow( 5.0,-s); + double d = pow( 7.0,-s); + double e = pow(11.0,-s); + double f = pow(13.0,-s); + double t1 = a + b + c + d + e + f; + double t2 = a*(b+c+d+e+f) + b*(c+d+e+f) + c*(d+e+f) + d*(e+f) + e*f; + /* + double t3 = a*(b*(c+d+e+f) + c*(d+e+f) + d*(e+f) + e*f) + + b*(c*(d+e+f) + d*(e+f) + e*f) + + c*(d*(e+f) + e*f) + + d*e*f; + double t4 = a*(b*(c*(d + e + f) + d*(e + f) + e*f) + c*(d*(e+f) + e*f) + d*e*f) + + b*(c*(d*(e+f) + e*f) + d*e*f) + + c*d*e*f; + double t5 = b*c*d*e*f + a*c*d*e*f+ a*b*d*e*f+ a*b*c*e*f+ a*b*c*d*f+ a*b*c*d*e; + double t6 = a*b*c*d*e*f; + */ + double numt = t1 - t2 /* + t3 - t4 + t5 - t6 */; + double zeta = 1.0/((1.0-a)*(1.0-b)*(1.0-c)*(1.0-d)*(1.0-e)*(1.0-f)); + result->val = numt*zeta; + result->err = (15.0/s + 1.0) * 6.0*GSL_DBL_EPSILON*result->val; + return GSL_SUCCESS; +} + + +#if 0 +/* zeta(n) */ +#define ZETA_POS_TABLE_NMAX 100 +static double zeta_pos_int_table_OLD[ZETA_POS_TABLE_NMAX+1] = { + -0.50000000000000000000000000000, /* zeta(0) */ + 0.0 /* FIXME: DirectedInfinity() */, /* zeta(1) */ + 1.64493406684822643647241516665, /* ... */ + 1.20205690315959428539973816151, + 1.08232323371113819151600369654, + 1.03692775514336992633136548646, + 1.01734306198444913971451792979, + 1.00834927738192282683979754985, + 1.00407735619794433937868523851, + 1.00200839282608221441785276923, + 1.00099457512781808533714595890, + 1.00049418860411946455870228253, + 1.00024608655330804829863799805, + 1.00012271334757848914675183653, + 1.00006124813505870482925854511, + 1.00003058823630702049355172851, + 1.00001528225940865187173257149, + 1.00000763719763789976227360029, + 1.00000381729326499983985646164, + 1.00000190821271655393892565696, + 1.00000095396203387279611315204, + 1.00000047693298678780646311672, + 1.00000023845050272773299000365, + 1.00000011921992596531107306779, + 1.00000005960818905125947961244, + 1.00000002980350351465228018606, + 1.00000001490155482836504123466, + 1.00000000745071178983542949198, + 1.00000000372533402478845705482, + 1.00000000186265972351304900640, + 1.00000000093132743241966818287, + 1.00000000046566290650337840730, + 1.00000000023283118336765054920, + 1.00000000011641550172700519776, + 1.00000000005820772087902700889, + 1.00000000002910385044497099687, + 1.00000000001455192189104198424, + 1.00000000000727595983505748101, + 1.00000000000363797954737865119, + 1.00000000000181898965030706595, + 1.00000000000090949478402638893, + 1.00000000000045474737830421540, + 1.00000000000022737368458246525, + 1.00000000000011368684076802278, + 1.00000000000005684341987627586, + 1.00000000000002842170976889302, + 1.00000000000001421085482803161, + 1.00000000000000710542739521085, + 1.00000000000000355271369133711, + 1.00000000000000177635684357912, + 1.00000000000000088817842109308, + 1.00000000000000044408921031438, + 1.00000000000000022204460507980, + 1.00000000000000011102230251411, + 1.00000000000000005551115124845, + 1.00000000000000002775557562136, + 1.00000000000000001387778780973, + 1.00000000000000000693889390454, + 1.00000000000000000346944695217, + 1.00000000000000000173472347605, + 1.00000000000000000086736173801, + 1.00000000000000000043368086900, + 1.00000000000000000021684043450, + 1.00000000000000000010842021725, + 1.00000000000000000005421010862, + 1.00000000000000000002710505431, + 1.00000000000000000001355252716, + 1.00000000000000000000677626358, + 1.00000000000000000000338813179, + 1.00000000000000000000169406589, + 1.00000000000000000000084703295, + 1.00000000000000000000042351647, + 1.00000000000000000000021175824, + 1.00000000000000000000010587912, + 1.00000000000000000000005293956, + 1.00000000000000000000002646978, + 1.00000000000000000000001323489, + 1.00000000000000000000000661744, + 1.00000000000000000000000330872, + 1.00000000000000000000000165436, + 1.00000000000000000000000082718, + 1.00000000000000000000000041359, + 1.00000000000000000000000020680, + 1.00000000000000000000000010340, + 1.00000000000000000000000005170, + 1.00000000000000000000000002585, + 1.00000000000000000000000001292, + 1.00000000000000000000000000646, + 1.00000000000000000000000000323, + 1.00000000000000000000000000162, + 1.00000000000000000000000000081, + 1.00000000000000000000000000040, + 1.00000000000000000000000000020, + 1.00000000000000000000000000010, + 1.00000000000000000000000000005, + 1.00000000000000000000000000003, + 1.00000000000000000000000000001, + 1.00000000000000000000000000001, + 1.00000000000000000000000000000, + 1.00000000000000000000000000000, + 1.00000000000000000000000000000 +}; +#endif /* 0 */ + + +/* zeta(n) - 1 */ +#define ZETA_POS_TABLE_NMAX 100 +static double zetam1_pos_int_table[ZETA_POS_TABLE_NMAX+1] = { + -1.5, /* zeta(0) */ + 0.0, /* FIXME: Infinity */ /* zeta(1) - 1 */ + 0.644934066848226436472415166646, /* zeta(2) - 1 */ + 0.202056903159594285399738161511, + 0.082323233711138191516003696541, + 0.036927755143369926331365486457, + 0.017343061984449139714517929790, + 0.008349277381922826839797549849, + 0.004077356197944339378685238508, + 0.002008392826082214417852769232, + 0.000994575127818085337145958900, + 0.000494188604119464558702282526, + 0.000246086553308048298637998047, + 0.000122713347578489146751836526, + 0.000061248135058704829258545105, + 0.000030588236307020493551728510, + 0.000015282259408651871732571487, + 7.6371976378997622736002935630e-6, + 3.8172932649998398564616446219e-6, + 1.9082127165539389256569577951e-6, + 9.5396203387279611315203868344e-7, + 4.7693298678780646311671960437e-7, + 2.3845050272773299000364818675e-7, + 1.1921992596531107306778871888e-7, + 5.9608189051259479612440207935e-8, + 2.9803503514652280186063705069e-8, + 1.4901554828365041234658506630e-8, + 7.4507117898354294919810041706e-9, + 3.7253340247884570548192040184e-9, + 1.8626597235130490064039099454e-9, + 9.3132743241966818287176473502e-10, + 4.6566290650337840729892332512e-10, + 2.3283118336765054920014559759e-10, + 1.1641550172700519775929738354e-10, + 5.8207720879027008892436859891e-11, + 2.9103850444970996869294252278e-11, + 1.4551921891041984235929632245e-11, + 7.2759598350574810145208690123e-12, + 3.6379795473786511902372363558e-12, + 1.8189896503070659475848321007e-12, + 9.0949478402638892825331183869e-13, + 4.5474737830421540267991120294e-13, + 2.2737368458246525152268215779e-13, + 1.1368684076802278493491048380e-13, + 5.6843419876275856092771829675e-14, + 2.8421709768893018554550737049e-14, + 1.4210854828031606769834307141e-14, + 7.1054273952108527128773544799e-15, + 3.5527136913371136732984695340e-15, + 1.7763568435791203274733490144e-15, + 8.8817842109308159030960913863e-16, + 4.4408921031438133641977709402e-16, + 2.2204460507980419839993200942e-16, + 1.1102230251410661337205445699e-16, + 5.5511151248454812437237365905e-17, + 2.7755575621361241725816324538e-17, + 1.3877787809725232762839094906e-17, + 6.9388939045441536974460853262e-18, + 3.4694469521659226247442714961e-18, + 1.7347234760475765720489729699e-18, + 8.6736173801199337283420550673e-19, + 4.3368086900206504874970235659e-19, + 2.1684043449972197850139101683e-19, + 1.0842021724942414063012711165e-19, + 5.4210108624566454109187004043e-20, + 2.7105054312234688319546213119e-20, + 1.3552527156101164581485233996e-20, + 6.7762635780451890979952987415e-21, + 3.3881317890207968180857031004e-21, + 1.6940658945097991654064927471e-21, + 8.4703294725469983482469926091e-22, + 4.2351647362728333478622704833e-22, + 2.1175823681361947318442094398e-22, + 1.0587911840680233852265001539e-22, + 5.2939559203398703238139123029e-23, + 2.6469779601698529611341166842e-23, + 1.3234889800848990803094510250e-23, + 6.6174449004244040673552453323e-24, + 3.3087224502121715889469563843e-24, + 1.6543612251060756462299236771e-24, + 8.2718061255303444036711056167e-25, + 4.1359030627651609260093824555e-25, + 2.0679515313825767043959679193e-25, + 1.0339757656912870993284095591e-25, + 5.1698788284564313204101332166e-26, + 2.5849394142282142681277617708e-26, + 1.2924697071141066700381126118e-26, + 6.4623485355705318034380021611e-27, + 3.2311742677852653861348141180e-27, + 1.6155871338926325212060114057e-27, + 8.0779356694631620331587381863e-28, + 4.0389678347315808256222628129e-28, + 2.0194839173657903491587626465e-28, + 1.0097419586828951533619250700e-28, + 5.0487097934144756960847711725e-29, + 2.5243548967072378244674341938e-29, + 1.2621774483536189043753999660e-29, + 6.3108872417680944956826093943e-30, + 3.1554436208840472391098412184e-30, + 1.5777218104420236166444327830e-30, + 7.8886090522101180735205378276e-31 +}; + + +#define ZETA_NEG_TABLE_NMAX 99 +#define ZETA_NEG_TABLE_SIZE 50 +static double zeta_neg_int_table[ZETA_NEG_TABLE_SIZE] = { + -0.083333333333333333333333333333, /* zeta(-1) */ + 0.008333333333333333333333333333, /* zeta(-3) */ + -0.003968253968253968253968253968, /* ... */ + 0.004166666666666666666666666667, + -0.007575757575757575757575757576, + 0.021092796092796092796092796093, + -0.083333333333333333333333333333, + 0.44325980392156862745098039216, + -3.05395433027011974380395433027, + 26.4562121212121212121212121212, + -281.460144927536231884057971014, + 3607.5105463980463980463980464, + -54827.583333333333333333333333, + 974936.82385057471264367816092, + -2.0052695796688078946143462272e+07, + 4.7238486772162990196078431373e+08, + -1.2635724795916666666666666667e+10, + 3.8087931125245368811553022079e+11, + -1.2850850499305083333333333333e+13, + 4.8241448354850170371581670362e+14, + -2.0040310656516252738108421663e+16, + 9.1677436031953307756992753623e+17, + -4.5979888343656503490437943262e+19, + 2.5180471921451095697089023320e+21, + -1.5001733492153928733711440151e+23, + 9.6899578874635940656497942895e+24, + -6.7645882379292820990945242302e+26, + 5.0890659468662289689766332916e+28, + -4.1147288792557978697665486068e+30, + 3.5666582095375556109684574609e+32, + -3.3066089876577576725680214670e+34, + 3.2715634236478716264211227016e+36, + -3.4473782558278053878256455080e+38, + 3.8614279832705258893092720200e+40, + -4.5892974432454332168863989006e+42, + 5.7775386342770431824884825688e+44, + -7.6919858759507135167410075972e+46, + 1.0813635449971654696354033351e+49, + -1.6029364522008965406067102346e+51, + 2.5019479041560462843656661499e+53, + -4.1067052335810212479752045004e+55, + 7.0798774408494580617452972433e+57, + -1.2804546887939508790190849756e+60, + 2.4267340392333524078020892067e+62, + -4.8143218874045769355129570066e+64, + 9.9875574175727530680652777408e+66, + -2.1645634868435185631335136160e+69, + 4.8962327039620553206849224516e+71, /* ... */ + -1.1549023923963519663954271692e+74, /* zeta(-97) */ + 2.8382249570693706959264156336e+76 /* zeta(-99) */ +}; + + +/* coefficients for Maclaurin summation in hzeta() + * B_{2j}/(2j)! + */ +static double hzeta_c[15] = { + 1.00000000000000000000000000000, + 0.083333333333333333333333333333, + -0.00138888888888888888888888888889, + 0.000033068783068783068783068783069, + -8.2671957671957671957671957672e-07, + 2.0876756987868098979210090321e-08, + -5.2841901386874931848476822022e-10, + 1.3382536530684678832826980975e-11, + -3.3896802963225828668301953912e-13, + 8.5860620562778445641359054504e-15, + -2.1748686985580618730415164239e-16, + 5.5090028283602295152026526089e-18, + -1.3954464685812523340707686264e-19, + 3.5347070396294674716932299778e-21, + -8.9535174270375468504026113181e-23 +}; + +#define ETA_POS_TABLE_NMAX 100 +static double eta_pos_int_table[ETA_POS_TABLE_NMAX+1] = { +0.50000000000000000000000000000, /* eta(0) */ +M_LN2, /* eta(1) */ +0.82246703342411321823620758332, /* ... */ +0.90154267736969571404980362113, +0.94703282949724591757650323447, +0.97211977044690930593565514355, +0.98555109129743510409843924448, +0.99259381992283028267042571313, +0.99623300185264789922728926008, +0.99809429754160533076778303185, +0.99903950759827156563922184570, +0.99951714349806075414409417483, +0.99975768514385819085317967871, +0.99987854276326511549217499282, +0.99993917034597971817095419226, +0.99996955121309923808263293263, +0.99998476421490610644168277496, +0.99999237829204101197693787224, +0.99999618786961011347968922641, +0.99999809350817167510685649297, +0.99999904661158152211505084256, +0.99999952325821554281631666433, +0.99999976161323082254789720494, +0.99999988080131843950322382485, +0.99999994039889239462836140314, +0.99999997019885696283441513311, +0.99999998509923199656878766181, +0.99999999254955048496351585274, +0.99999999627475340010872752767, +0.99999999813736941811218674656, +0.99999999906868228145397862728, +0.99999999953434033145421751469, +0.99999999976716989595149082282, +0.99999999988358485804603047265, +0.99999999994179239904531592388, +0.99999999997089618952980952258, +0.99999999998544809143388476396, +0.99999999999272404460658475006, +0.99999999999636202193316875550, +0.99999999999818101084320873555, +0.99999999999909050538047887809, +0.99999999999954525267653087357, +0.99999999999977262633369589773, +0.99999999999988631316532476488, +0.99999999999994315658215465336, +0.99999999999997157829090808339, +0.99999999999998578914539762720, +0.99999999999999289457268000875, +0.99999999999999644728633373609, +0.99999999999999822364316477861, +0.99999999999999911182158169283, +0.99999999999999955591079061426, +0.99999999999999977795539522974, +0.99999999999999988897769758908, +0.99999999999999994448884878594, +0.99999999999999997224442439010, +0.99999999999999998612221219410, +0.99999999999999999306110609673, +0.99999999999999999653055304826, +0.99999999999999999826527652409, +0.99999999999999999913263826204, +0.99999999999999999956631913101, +0.99999999999999999978315956551, +0.99999999999999999989157978275, +0.99999999999999999994578989138, +0.99999999999999999997289494569, +0.99999999999999999998644747284, +0.99999999999999999999322373642, +0.99999999999999999999661186821, +0.99999999999999999999830593411, +0.99999999999999999999915296705, +0.99999999999999999999957648353, +0.99999999999999999999978824176, +0.99999999999999999999989412088, +0.99999999999999999999994706044, +0.99999999999999999999997353022, +0.99999999999999999999998676511, +0.99999999999999999999999338256, +0.99999999999999999999999669128, +0.99999999999999999999999834564, +0.99999999999999999999999917282, +0.99999999999999999999999958641, +0.99999999999999999999999979320, +0.99999999999999999999999989660, +0.99999999999999999999999994830, +0.99999999999999999999999997415, +0.99999999999999999999999998708, +0.99999999999999999999999999354, +0.99999999999999999999999999677, +0.99999999999999999999999999838, +0.99999999999999999999999999919, +0.99999999999999999999999999960, +0.99999999999999999999999999980, +0.99999999999999999999999999990, +0.99999999999999999999999999995, +0.99999999999999999999999999997, +0.99999999999999999999999999999, +0.99999999999999999999999999999, +1.00000000000000000000000000000, +1.00000000000000000000000000000, +1.00000000000000000000000000000, +}; + + +#define ETA_NEG_TABLE_NMAX 99 +#define ETA_NEG_TABLE_SIZE 50 +static double eta_neg_int_table[ETA_NEG_TABLE_SIZE] = { + 0.25000000000000000000000000000, /* eta(-1) */ +-0.12500000000000000000000000000, /* eta(-3) */ + 0.25000000000000000000000000000, /* ... */ +-1.06250000000000000000000000000, + 7.75000000000000000000000000000, +-86.3750000000000000000000000000, + 1365.25000000000000000000000000, +-29049.0312500000000000000000000, + 800572.750000000000000000000000, +-2.7741322625000000000000000000e+7, + 1.1805291302500000000000000000e+9, +-6.0523980051687500000000000000e+10, + 3.6794167785377500000000000000e+12, +-2.6170760990658387500000000000e+14, + 2.1531418140800295250000000000e+16, +-2.0288775575173015930156250000e+18, + 2.1708009902623770590275000000e+20, +-2.6173826968455814932120125000e+22, + 3.5324148876863877826668602500e+24, +-5.3042033406864906641493838981e+26, + 8.8138218364311576767253114668e+28, +-1.6128065107490778547354654864e+31, + 3.2355470001722734208527794569e+33, +-7.0876727476537493198506645215e+35, + 1.6890450341293965779175629389e+38, +-4.3639690731216831157655651358e+40, + 1.2185998827061261322605065672e+43, +-3.6670584803153006180101262324e+45, + 1.1859898526302099104271449748e+48, +-4.1120769493584015047981746438e+50, + 1.5249042436787620309090168687e+53, +-6.0349693196941307074572991901e+55, + 2.5437161764210695823197691519e+58, +-1.1396923802632287851130360170e+61, + 5.4180861064753979196802726455e+63, +-2.7283654799994373847287197104e+66, + 1.4529750514918543238511171663e+69, +-8.1705519371067450079777183386e+71, + 4.8445781606678367790247757259e+74, +-3.0246694206649519336179448018e+77, + 1.9858807961690493054169047970e+80, +-1.3694474620720086994386818232e+83, + 9.9070382984295807826303785989e+85, +-7.5103780796592645925968460677e+88, + 5.9598418264260880840077992227e+91, +-4.9455988887500020399263196307e+94, + 4.2873596927020241277675775935e+97, +-3.8791952037716162900707994047e+100, + 3.6600317773156342245401829308e+103, +-3.5978775704117283875784869570e+106 /* eta(-99) */ +}; + + +/*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + +int gsl_sf_hzeta_e(const double s, const double q, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s <= 1.0 || q <= 0.0) { + DOMAIN_ERROR(result); + } + else { + const double max_bits = 54.0; + const double ln_term0 = -s * log(q); + + if(ln_term0 < GSL_LOG_DBL_MIN + 1.0) { + UNDERFLOW_ERROR(result); + } + else if(ln_term0 > GSL_LOG_DBL_MAX - 1.0) { + OVERFLOW_ERROR (result); + } + else if((s > max_bits && q < 1.0) || (s > 0.5*max_bits && q < 0.25)) { + result->val = pow(q, -s); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else if(s > 0.5*max_bits && q < 1.0) { + const double p1 = pow(q, -s); + const double p2 = pow(q/(1.0+q), s); + const double p3 = pow(q/(2.0+q), s); + result->val = p1 * (1.0 + p2 + p3); + result->err = GSL_DBL_EPSILON * (0.5*s + 2.0) * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* Euler-Maclaurin summation formula + * [Moshier, p. 400, with several typo corrections] + */ + const int jmax = 12; + const int kmax = 10; + int j, k; + const double pmax = pow(kmax + q, -s); + double scp = s; + double pcp = pmax / (kmax + q); + double ans = pmax*((kmax+q)/(s-1.0) + 0.5); + + for(k=0; kval = ans; + result->err = 2.0 * (jmax + 1.0) * GSL_DBL_EPSILON * fabs(ans); + return GSL_SUCCESS; + } + } +} + + +int gsl_sf_zeta_e(const double s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s == 1.0) { + DOMAIN_ERROR(result); + } + else if(s >= 0.0) { + return riemann_zeta_sgt0(s, result); + } + else { + /* reflection formula, [Abramowitz+Stegun, 23.2.5] */ + + gsl_sf_result zeta_one_minus_s; + const int stat_zoms = riemann_zeta1ms_slt0(s, &zeta_one_minus_s); + const double sin_term = (fmod(s,2.0) == 0.0) ? 0.0 : sin(0.5*M_PI*fmod(s,4.0))/M_PI; + + if(sin_term == 0.0) { + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(s > -170) { + /* We have to be careful about losing digits + * in calculating pow(2 Pi, s). The gamma + * function is fine because we were careful + * with that implementation. + * We keep an array of (2 Pi)^(10 n). + */ + const double twopi_pow[18] = { 1.0, + 9.589560061550901348e+007, + 9.195966217409212684e+015, + 8.818527036583869903e+023, + 8.456579467173150313e+031, + 8.109487671573504384e+039, + 7.776641909496069036e+047, + 7.457457466828644277e+055, + 7.151373628461452286e+063, + 6.857852693272229709e+071, + 6.576379029540265771e+079, + 6.306458169130020789e+087, + 6.047615938853066678e+095, + 5.799397627482402614e+103, + 5.561367186955830005e+111, + 5.333106466365131227e+119, + 5.114214477385391780e+127, + 4.904306689854036836e+135 + }; + const int n = floor((-s)/10.0); + const double fs = s + 10.0*n; + const double p = pow(2.0*M_PI, fs) / twopi_pow[n]; + + gsl_sf_result g; + const int stat_g = gsl_sf_gamma_e(1.0-s, &g); + result->val = p * g.val * sin_term * zeta_one_minus_s.val; + result->err = fabs(p * g.val * sin_term) * zeta_one_minus_s.err; + result->err += fabs(p * sin_term * zeta_one_minus_s.val) * g.err; + result->err += GSL_DBL_EPSILON * (fabs(s)+2.0) * fabs(result->val); + return GSL_ERROR_SELECT_2(stat_g, stat_zoms); + } + else { + /* The actual zeta function may or may not + * overflow here. But we have no easy way + * to calculate it when the prefactor(s) + * overflow. Trying to use log's and exp + * is no good because we loose a couple + * digits to the exp error amplification. + * When we gather a little more patience, + * we can implement something here. Until + * then just give up. + */ + OVERFLOW_ERROR(result); + } + } +} + + +int gsl_sf_zeta_int_e(const int n, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(n < 0) { + if(!GSL_IS_ODD(n)) { + result->val = 0.0; /* exactly zero at even negative integers */ + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n > -ZETA_NEG_TABLE_NMAX) { + result->val = zeta_neg_int_table[-(n+1)/2]; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return gsl_sf_zeta_e((double)n, result); + } + } + else if(n == 1){ + DOMAIN_ERROR(result); + } + else if(n <= ZETA_POS_TABLE_NMAX){ + result->val = 1.0 + zetam1_pos_int_table[n]; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + result->val = 1.0; + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } +} + + +int gsl_sf_zetam1_e(const double s, gsl_sf_result * result) +{ + if(s <= 5.0) + { + int stat = gsl_sf_zeta_e(s, result); + result->val = result->val - 1.0; + return stat; + } + else if(s < 15.0) + { + return riemann_zeta_minus_1_intermediate_s(s, result); + } + else + { + return riemann_zeta_minus1_large_s(s, result); + } +} + + +int gsl_sf_zetam1_int_e(const int n, gsl_sf_result * result) +{ + if(n < 0) { + if(!GSL_IS_ODD(n)) { + result->val = -1.0; /* at even negative integers zetam1 == -1 since zeta is exactly zero */ + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n > -ZETA_NEG_TABLE_NMAX) { + result->val = zeta_neg_int_table[-(n+1)/2] - 1.0; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* could use gsl_sf_zetam1_e here but subtracting 1 makes no difference + for such large values, so go straight to the result */ + return gsl_sf_zeta_e((double)n, result); + } + } + else if(n == 1){ + DOMAIN_ERROR(result); + } + else if(n <= ZETA_POS_TABLE_NMAX){ + result->val = zetam1_pos_int_table[n]; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + return gsl_sf_zetam1_e(n, result); + } +} + + +int gsl_sf_eta_int_e(int n, gsl_sf_result * result) +{ + if(n > ETA_POS_TABLE_NMAX) { + result->val = 1.0; + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(n >= 0) { + result->val = eta_pos_int_table[n]; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + /* n < 0 */ + + if(!GSL_IS_ODD(n)) { + /* exactly zero at even negative integers */ + result->val = 0.0; + result->err = 0.0; + return GSL_SUCCESS; + } + else if(n > -ETA_NEG_TABLE_NMAX) { + result->val = eta_neg_int_table[-(n+1)/2]; + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result z; + gsl_sf_result p; + int stat_z = gsl_sf_zeta_int_e(n, &z); + int stat_p = gsl_sf_exp_e((1.0-n)*M_LN2, &p); + int stat_m = gsl_sf_multiply_e(-p.val, z.val, result); + result->err = fabs(p.err * (M_LN2*(1.0-n)) * z.val) + z.err * fabs(p.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_m, stat_p, stat_z); + } + } +} + + +int gsl_sf_eta_e(const double s, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(s > 100.0) { + result->val = 1.0; + result->err = GSL_DBL_EPSILON; + return GSL_SUCCESS; + } + else if(fabs(s-1.0) < 10.0*GSL_ROOT5_DBL_EPSILON) { + double del = s-1.0; + double c0 = M_LN2; + double c1 = M_LN2 * (M_EULER - 0.5*M_LN2); + double c2 = -0.0326862962794492996; + double c3 = 0.0015689917054155150; + double c4 = 0.00074987242112047532; + result->val = c0 + del * (c1 + del * (c2 + del * (c3 + del * c4))); + result->err = 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_SUCCESS; + } + else { + gsl_sf_result z; + gsl_sf_result p; + int stat_z = gsl_sf_zeta_e(s, &z); + int stat_p = gsl_sf_exp_e((1.0-s)*M_LN2, &p); + int stat_m = gsl_sf_multiply_e(1.0-p.val, z.val, result); + result->err = fabs(p.err * (M_LN2*(1.0-s)) * z.val) + z.err * fabs(p.val); + result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); + return GSL_ERROR_SELECT_3(stat_m, stat_p, stat_z); + } +} + + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double gsl_sf_zeta(const double s) +{ + EVAL_RESULT(gsl_sf_zeta_e(s, &result)); +} + +double gsl_sf_hzeta(const double s, const double a) +{ + EVAL_RESULT(gsl_sf_hzeta_e(s, a, &result)); +} + +double gsl_sf_zeta_int(const int s) +{ + EVAL_RESULT(gsl_sf_zeta_int_e(s, &result)); +} + +double gsl_sf_zetam1(const double s) +{ + EVAL_RESULT(gsl_sf_zetam1_e(s, &result)); +} + +double gsl_sf_zetam1_int(const int s) +{ + EVAL_RESULT(gsl_sf_zetam1_int_e(s, &result)); +} + +double gsl_sf_eta_int(const int s) +{ + EVAL_RESULT(gsl_sf_eta_int_e(s, &result)); +} + +double gsl_sf_eta(const double s) +{ + EVAL_RESULT(gsl_sf_eta_e(s, &result)); +} diff --git a/software/gsl-1.15/stamp-h1 b/software/gsl-1.15/stamp-h1 new file mode 100644 index 000000000..4547fe1b5 --- /dev/null +++ b/software/gsl-1.15/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/software/gsl-1.15/statistics/.deps/absdev.Plo b/software/gsl-1.15/statistics/.deps/absdev.Plo new file mode 100644 index 000000000..d71bfaa97 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/absdev.Plo @@ -0,0 +1,58 @@ +absdev.lo: absdev.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h absdev_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +absdev_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/covariance.Plo b/software/gsl-1.15/statistics/.deps/covariance.Plo new file mode 100644 index 000000000..e3daaf0b7 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/covariance.Plo @@ -0,0 +1,58 @@ +covariance.lo: covariance.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h covariance_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +covariance_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/kurtosis.Plo b/software/gsl-1.15/statistics/.deps/kurtosis.Plo new file mode 100644 index 000000000..cb08ab379 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/kurtosis.Plo @@ -0,0 +1,58 @@ +kurtosis.lo: kurtosis.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h kurtosis_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +kurtosis_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/lag1.Plo b/software/gsl-1.15/statistics/.deps/lag1.Plo new file mode 100644 index 000000000..395be38b9 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/lag1.Plo @@ -0,0 +1,43 @@ +lag1.lo: lag1.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h lag1_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +lag1_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/mean.Plo b/software/gsl-1.15/statistics/.deps/mean.Plo new file mode 100644 index 000000000..47b914134 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/mean.Plo @@ -0,0 +1,43 @@ +mean.lo: mean.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h mean_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +mean_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/median.Plo b/software/gsl-1.15/statistics/.deps/median.Plo new file mode 100644 index 000000000..d7a52f48d --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/median.Plo @@ -0,0 +1,43 @@ +median.lo: median.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h median_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +median_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/minmax.Plo b/software/gsl-1.15/statistics/.deps/minmax.Plo new file mode 100644 index 000000000..ae78df55d --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/minmax.Plo @@ -0,0 +1,155 @@ +minmax.lo: minmax.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h minmax_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +minmax_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/p_variance.Plo b/software/gsl-1.15/statistics/.deps/p_variance.Plo new file mode 100644 index 000000000..a60364685 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/p_variance.Plo @@ -0,0 +1,43 @@ +p_variance.lo: p_variance.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h p_variance_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +p_variance_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/quantiles.Plo b/software/gsl-1.15/statistics/.deps/quantiles.Plo new file mode 100644 index 000000000..3bb941be6 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/quantiles.Plo @@ -0,0 +1,43 @@ +quantiles.lo: quantiles.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h quantiles_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +quantiles_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/skew.Plo b/software/gsl-1.15/statistics/.deps/skew.Plo new file mode 100644 index 000000000..ad7f83fe2 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/skew.Plo @@ -0,0 +1,58 @@ +skew.lo: skew.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h skew_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +skew_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/test.Po b/software/gsl-1.15/statistics/.deps/test.Po new file mode 100644 index 000000000..e28765178 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/test.Po @@ -0,0 +1,302 @@ +test.o: test.c ../config.h /usr/include/string.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/strings.h \ + /usr/include/secure/_string.h /usr/include/secure/_common.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_sort.h \ + ../gsl/gsl_sort_long_double.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_permutation.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_sort_double.h \ + ../gsl/gsl_sort_float.h ../gsl/gsl_sort_ulong.h ../gsl/gsl_sort_long.h \ + ../gsl/gsl_sort_uint.h ../gsl/gsl_sort_int.h ../gsl/gsl_sort_ushort.h \ + ../gsl/gsl_sort_short.h ../gsl/gsl_sort_uchar.h ../gsl/gsl_sort_char.h \ + ../gsl/gsl_sort_vector.h ../gsl/gsl_sort_vector_long_double.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_sort_vector_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_sort_vector_float.h \ + ../gsl/gsl_vector_float.h ../gsl/gsl_block_float.h \ + ../gsl/gsl_sort_vector_ulong.h ../gsl/gsl_vector_ulong.h \ + ../gsl/gsl_block_ulong.h ../gsl/gsl_sort_vector_long.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_sort_vector_uint.h ../gsl/gsl_vector_uint.h \ + ../gsl/gsl_block_uint.h ../gsl/gsl_sort_vector_int.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_sort_vector_ushort.h ../gsl/gsl_vector_ushort.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_sort_vector_short.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_sort_vector_uchar.h ../gsl/gsl_vector_uchar.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_sort_vector_char.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h \ + ../gsl/gsl_statistics.h ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../gsl/gsl_ieee_utils.h ../templates_on.h test_float_source.c \ + ../templates_off.h test_int_source.c + +../config.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sort.h: + +../gsl/gsl_sort_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_permutation.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_sort_double.h: + +../gsl/gsl_sort_float.h: + +../gsl/gsl_sort_ulong.h: + +../gsl/gsl_sort_long.h: + +../gsl/gsl_sort_uint.h: + +../gsl/gsl_sort_int.h: + +../gsl/gsl_sort_ushort.h: + +../gsl/gsl_sort_short.h: + +../gsl/gsl_sort_uchar.h: + +../gsl/gsl_sort_char.h: + +../gsl/gsl_sort_vector.h: + +../gsl/gsl_sort_vector_long_double.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_sort_vector_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_sort_vector_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_sort_vector_ulong.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_sort_vector_long.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_sort_vector_uint.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_sort_vector_int.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_sort_vector_ushort.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_sort_vector_short.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_sort_vector_uchar.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_sort_vector_char.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../gsl/gsl_ieee_utils.h: + +../templates_on.h: + +test_float_source.c: + +../templates_off.h: + +test_int_source.c: diff --git a/software/gsl-1.15/statistics/.deps/test_nist.Po b/software/gsl-1.15/statistics/.deps/test_nist.Po new file mode 100644 index 000000000..54a163d94 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/test_nist.Po @@ -0,0 +1,121 @@ +test_nist.o: test_nist.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_test.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../gsl/gsl_ieee_utils.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_test.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../gsl/gsl_ieee_utils.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: diff --git a/software/gsl-1.15/statistics/.deps/ttest.Plo b/software/gsl-1.15/statistics/.deps/ttest.Plo new file mode 100644 index 000000000..425155643 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/ttest.Plo @@ -0,0 +1,58 @@ +ttest.lo: ttest.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h ttest_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +ttest_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/variance.Plo b/software/gsl-1.15/statistics/.deps/variance.Plo new file mode 100644 index 000000000..4ab061769 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/variance.Plo @@ -0,0 +1,58 @@ +variance.lo: variance.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h variance_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +variance_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/wabsdev.Plo b/software/gsl-1.15/statistics/.deps/wabsdev.Plo new file mode 100644 index 000000000..6bb64e906 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/wabsdev.Plo @@ -0,0 +1,58 @@ +wabsdev.lo: wabsdev.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h wabsdev_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +wabsdev_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/wkurtosis.Plo b/software/gsl-1.15/statistics/.deps/wkurtosis.Plo new file mode 100644 index 000000000..53cda4e3f --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/wkurtosis.Plo @@ -0,0 +1,58 @@ +wkurtosis.lo: wkurtosis.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h wkurtosis_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +wkurtosis_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/wmean.Plo b/software/gsl-1.15/statistics/.deps/wmean.Plo new file mode 100644 index 000000000..9c7aead77 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/wmean.Plo @@ -0,0 +1,43 @@ +wmean.lo: wmean.c ../config.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h wmean_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +wmean_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/wskew.Plo b/software/gsl-1.15/statistics/.deps/wskew.Plo new file mode 100644 index 000000000..e200981e3 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/wskew.Plo @@ -0,0 +1,58 @@ +wskew.lo: wskew.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h wskew_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +wskew_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/.deps/wvariance.Plo b/software/gsl-1.15/statistics/.deps/wvariance.Plo new file mode 100644 index 000000000..c6097f271 --- /dev/null +++ b/software/gsl-1.15/statistics/.deps/wvariance.Plo @@ -0,0 +1,58 @@ +wvariance.lo: wvariance.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_statistics.h \ + ../gsl/gsl_statistics_long_double.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h \ + ../gsl/gsl_statistics_double.h ../gsl/gsl_statistics_float.h \ + ../gsl/gsl_statistics_ulong.h ../gsl/gsl_statistics_long.h \ + ../gsl/gsl_statistics_uint.h ../gsl/gsl_statistics_int.h \ + ../gsl/gsl_statistics_ushort.h ../gsl/gsl_statistics_short.h \ + ../gsl/gsl_statistics_uchar.h ../gsl/gsl_statistics_char.h \ + ../templates_on.h wvariance_source.c ../templates_off.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_statistics.h: + +../gsl/gsl_statistics_long_double.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_statistics_double.h: + +../gsl/gsl_statistics_float.h: + +../gsl/gsl_statistics_ulong.h: + +../gsl/gsl_statistics_long.h: + +../gsl/gsl_statistics_uint.h: + +../gsl/gsl_statistics_int.h: + +../gsl/gsl_statistics_ushort.h: + +../gsl/gsl_statistics_short.h: + +../gsl/gsl_statistics_uchar.h: + +../gsl/gsl_statistics_char.h: + +../templates_on.h: + +wvariance_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/statistics/ChangeLog b/software/gsl-1.15/statistics/ChangeLog new file mode 100644 index 000000000..e9e685ad6 --- /dev/null +++ b/software/gsl-1.15/statistics/ChangeLog @@ -0,0 +1,127 @@ +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-10-02 Brian Gough + + * variance_source.c: added functions for sum of squares and + weighted sum of squares + +2006-01-07 Brian Gough + + * test_float_source.c: additional tests for NaNs + + * minmax_source.c: handle NaNs correctly, if any element is NaN + then the max and min are NaN + +Sat Jul 15 12:23:09 2000 Brian Gough + + * test_nist.c: added url/reference to the original NIST datasets + +Thu May 4 15:11:11 2000 Brian Gough + + * covariance.c: added covariance function + +Wed Mar 8 15:29:19 2000 Brian Gough + + * Function Name Reorganization: The function suffix "_with_mean" + has been changed to "_m", the function suffix "_with_mean_and_sd" + has been changed to "_m_sd". The variance function est_variance + has been changed to simply _variance, (similarly for est_sd, which + is now _sd), while the function _variance is now + _variance_with_fixed_mean (and _sd is _sd_with_fixed_mean). + +Wed Mar 1 11:09:21 2000 Brian Gough + + * wabsdev.c wabsdev_source.c wkurtosis.c wkurtosis_source.c + wmean.c wmean_source.c wskew.c wskew_source.c wvariance.c + wvariance_source.c: added support for weighted statistics + + * removed source.h (no longer used) + +Tue Feb 29 10:35:23 2000 Brian Gough + + * changed arguments of pvariance and ttest to have consistent form + (DATA,STRIDE,SIZE) + +Mon Feb 28 20:29:08 2000 Brian Gough + + * removed sort function since this is now available in the sort + directory. + + * converted all functions to take a stride argument, in + preparation for supporting statistics on vectors + +1998-11-06 + + * test.c: added prototype for memcpy using #include + +Wed Aug 12 12:34:24 1998 Brian Gough + + * quantiles.c: Renamed percentile to quantile throughout. This is + the correct name for the quantity, mathematically speaking. + +Wed Aug 5 12:34:58 1998 Brian Gough + + * mkheaders.pl: script to generate all the headers from + gsl_statistics_int.h + + * test.h: removed test.h, not needed + + * test.c: added tests for all types + + * converted functions to use 'long double' for internal calculations, + for extra range. + + * converted all the functions to use templates_on.h and + templates_off.h + +Mon Jun 1 23:47:23 1998 Brian Gough + + * lag1_source.c: added a new function to compute the + lag1-autocorrelation + + * test_nist.c: added some numerical accuracy tests from NIST + +Fri Apr 10 15:11:51 1998 Brian Gough + + * renamed pooled_variance.c, etc to p_variance to avoid linker + complaints about long filenames on some platforms + +Wed Apr 8 18:11:48 1998 Brian Gough + + * Added a new recurrence algorithm for the mean, variance, skew + and kurtosis. It uses a running value which is less likely to + overflow than a global sum. + +Mon Mar 30 22:18:59 1998 Brian Gough + + * completely reorganised the source system to use macros as + a primitive form of templates. + +Sun Mar 29 16:25:24 1998 Brian Gough + + * make everything const where possible (to reduce the chance of errors) + +Sun Mar 22 23:34:05 1998 Brian Gough + + * skew.c: compute the skewness of a dataset + + * percentiles.c: find a given percentile from a sorted dataset + + * minmax.c: allow the user to find the indices of the max/min + data points, in addition to the max/min values + + * median.c: compute the median of a sorted dataset + + * kurtosis.c: compute the kurtosis + + * absdev.c: compute absolute deviations + + * split statistics functions into double versions (gsl_stats) and + integer versions (gsl_stats_int). There is a script + (convert_double_to_int.pl) to make the integer versions from the + double versions. + + + diff --git a/software/gsl-1.15/statistics/Makefile.am b/software/gsl-1.15/statistics/Makefile.am new file mode 100644 index 000000000..63843e9e6 --- /dev/null +++ b/software/gsl-1.15/statistics/Makefile.am @@ -0,0 +1,19 @@ +## Process this file with automake to produce Makefile.in + +noinst_LTLIBRARIES = libgslstatistics.la + +pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h + +INCLUDES = -I$(top_srcdir) + +libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c + +noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c test_nist.c +test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + + diff --git a/software/gsl-1.15/statistics/Makefile.in b/software/gsl-1.15/statistics/Makefile.in new file mode 100644 index 000000000..f51945cab --- /dev/null +++ b/software/gsl-1.15/statistics/Makefile.in @@ -0,0 +1,682 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = statistics +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslstatistics_la_LIBADD = +am_libgslstatistics_la_OBJECTS = mean.lo variance.lo absdev.lo skew.lo \ + kurtosis.lo lag1.lo p_variance.lo minmax.lo ttest.lo median.lo \ + covariance.lo quantiles.lo wmean.lo wvariance.lo wabsdev.lo \ + wskew.lo wkurtosis.lo +libgslstatistics_la_OBJECTS = $(am_libgslstatistics_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) test_nist.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslstatistics.la ../sort/libgslsort.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslstatistics_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslstatistics_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslstatistics.la +pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h +INCLUDES = -I$(top_srcdir) +libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c +noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c test_nist.c +test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu statistics/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu statistics/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslstatistics.la: $(libgslstatistics_la_OBJECTS) $(libgslstatistics_la_DEPENDENCIES) + $(LINK) $(libgslstatistics_la_OBJECTS) $(libgslstatistics_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/absdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/covariance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kurtosis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lag1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mean.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/median.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_variance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantiles.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skew.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_nist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wabsdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wkurtosis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmean.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wskew.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wvariance.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/statistics/TODO b/software/gsl-1.15/statistics/TODO new file mode 100644 index 000000000..4a56cbfdb --- /dev/null +++ b/software/gsl-1.15/statistics/TODO @@ -0,0 +1,105 @@ +# -*- org -*- +#+CATEGORY: statistics + +* From: James Theiler +To: John Lamb +Cc: gsl-discuss@sources.redhat.com +Subject: Re: Collecting statistics for time dependent data? +Date: Thu, 9 Dec 2004 14:18:36 -0700 (MST) + +On Thu, 9 Dec 2004, John Lamb wrote: + +] Raimondo Giammanco wrote: +] > Hello, +] > +] > I was wondering if there is a way to compute "running" statistics with +] > gsl. +] > +] Yes you can do it, but there's nothing in GSL that does it and its eay +] enough that you don't need GSL. Something like (untested) +] +] double update_mean( double* mean, int* n, double x ){ +] if( *n == 1 ) +] *mean = x; +] else +] *mean = (1 - (double)1 / *n ) * *mean + x / n; +] } +] +] will work and you can derive a similar method for updating the variance +] using the usual textbook formula. +] +] var[x] = (1/n) sum x^2_i - mean(x)^2 +] +] I don't know if there is a method that avoids the rounding errors. I +] don't know why so many textbooks repeat this formula without the +] slightest warning that it can go so badly wrong. +] +] + +Stably updating mean and variance is remarkably nontrivial. There was +a series of papers in Comm ACM that discussed the issue; the final one +(that I know of) refers back to the earlier ones, and it can be found +in D.H.D. West, Updating mean and variance estimates: an improved +method, Comm ACM 22:9, 532 (1979) [* I see Luke Stras just sent this +reference! *]. I'll just copy out the pseudocode since the paper is +old enough that it might not be easy to find. This, by the way, is +generalized for weighted data, so it assumes that you get a weight and +a data value (W_i and X_i) that you use to update the estimates XBAR +and S2: + + SUMW = W_1 + M = X_1 + T = 0 + For i=2,3,...,n + { + Q = X_i - M + TEMP = SUM + W_i // typo: He meant SUMW + R = Q*W_i/TEMP + M = M + R + T = T + R*SUMW*Q + SUMW = TEMP + } + XBAR = M + S2 = T*n/((n-1)*SUMW) + + + +jt + +-- +James Theiler Space and Remote Sensing Sciences +MS-B244, ISR-2, LANL Los Alamos National Laboratory +Los Alamos, NM 87545 http://nis-www.lanl.gov/~jt + + +* Look at STARPAC ftp://ftp.ucar.edu/starpac/ and Statlib +http://lib.stat.cmu.edu/ for more ideas + +* Try using the Kahan summation formula to improve accuracy for the +NIST tests (see Brian for details, below is a sketch of the algorithm). + + sum = x(1) + c = 0 + + DO i = 2, 1000000, 1 + y = x(i) - c + t = sum + y + c = (t - sum) - y + sum = t + ENDDO + +* Prevent incorrect use of unsorted data for quartile calculations +using a typedef for sorted data (?) + +* Rejection of outliers + +* Time series. Auto correlation, cross-correlation, smoothing (moving +average), detrending, various econometric things. Integrated +quantities (area under the curve). Interpolation of noisy data/fitting +-- maybe add that to the existing interpolation stuff.What about +missing data and gaps? + + There is a new GNU package called gretl which does econometrics + +* Statistical tests (equal means, equal variance, etc). + diff --git a/software/gsl-1.15/statistics/absdev.c b/software/gsl-1.15/statistics/absdev.c new file mode 100644 index 000000000..eb2bde933 --- /dev/null +++ b/software/gsl-1.15/statistics/absdev.c @@ -0,0 +1,70 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "absdev_source.c" +#include "templates_off.h" +#undef BASE_CHAR + diff --git a/software/gsl-1.15/statistics/absdev_source.c b/software/gsl-1.15/statistics/absdev_source.c new file mode 100644 index 000000000..7b0228d2a --- /dev/null +++ b/software/gsl-1.15/statistics/absdev_source.c @@ -0,0 +1,49 @@ +/* statistics/absdev_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,absdev) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean)(data, stride, n); + return FUNCTION(gsl_stats,absdev_m)(data, stride, n, mean); +} + +double +FUNCTION(gsl_stats,absdev_m) (const BASE data[], + const size_t stride, + const size_t n, + const double mean) +{ + /* takes a dataset and finds the absolute deviation */ + + double sum = 0, absdev; + size_t i; + + /* find the sum of the absolute deviations */ + for (i = 0; i < n; i++) + { + const double delta = fabs(data[i * stride] - mean); + sum += delta; + } + + absdev = sum / n; + + return absdev; +} + diff --git a/software/gsl-1.15/statistics/covariance.c b/software/gsl-1.15/statistics/covariance.c new file mode 100644 index 000000000..4538f75cb --- /dev/null +++ b/software/gsl-1.15/statistics/covariance.c @@ -0,0 +1,72 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "covariance_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/covariance_source.c b/software/gsl-1.15/statistics/covariance_source.c new file mode 100644 index 000000000..ba00d88a2 --- /dev/null +++ b/software/gsl-1.15/statistics/covariance_source.c @@ -0,0 +1,136 @@ +/* statistics/covar_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static double +FUNCTION(compute,covariance) (const BASE data1[], const size_t stride1, + const BASE data2[], const size_t stride2, + const size_t n, + const double mean1, const double mean2); + +static double +FUNCTION(compute,covariance) (const BASE data1[], const size_t stride1, + const BASE data2[], const size_t stride2, + const size_t n, + const double mean1, const double mean2) +{ + /* takes a dataset and finds the covariance */ + + long double covariance = 0 ; + + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + const long double delta1 = (data1[i * stride1] - mean1); + const long double delta2 = (data2[i * stride2] - mean2); + covariance += (delta1 * delta2 - covariance) / (i + 1); + } + + return covariance ; +} + +double +FUNCTION(gsl_stats,covariance_m) (const BASE data1[], const size_t stride1, + const BASE data2[], const size_t stride2, + const size_t n, + const double mean1, const double mean2) +{ + const double covariance = FUNCTION(compute,covariance) (data1, stride1, + data2, stride2, + n, + mean1, mean2); + + return covariance * ((double)n / (double)(n - 1)); +} + +double +FUNCTION(gsl_stats,covariance) (const BASE data1[], const size_t stride1, + const BASE data2[], const size_t stride2, + const size_t n) +{ + const double mean1 = FUNCTION(gsl_stats,mean) (data1, stride1, n); + const double mean2 = FUNCTION(gsl_stats,mean) (data2, stride2, n); + + return FUNCTION(gsl_stats,covariance_m)(data1, stride1, + data2, stride2, + n, + mean1, mean2); +} + +/* +gsl_stats_correlation() + Calculate Pearson correlation = cov(X, Y) / (sigma_X * sigma_Y) +This routine efficiently computes the correlation in one pass of the +data and makes use of the algorithm described in: + +B. P. Welford, "Note on a Method for Calculating Corrected Sums of +Squares and Products", Technometrics, Vol 4, No 3, 1962. + +This paper derives a numerically stable recurrence to compute a sum +of products + +S = sum_{i=1..N} [ (x_i - mu_x) * (y_i - mu_y) ] + +with the relation + +S_n = S_{n-1} + ((n-1)/n) * (x_n - mu_x_{n-1}) * (y_n - mu_y_{n-1}) +*/ + +double +FUNCTION(gsl_stats,correlation) (const BASE data1[], const size_t stride1, + const BASE data2[], const size_t stride2, + const size_t n) +{ + size_t i; + long double sum_xsq = 0.0; + long double sum_ysq = 0.0; + long double sum_cross = 0.0; + long double ratio; + long double delta_x, delta_y; + long double mean_x, mean_y; + long double r; + + /* + * Compute: + * sum_xsq = Sum [ (x_i - mu_x)^2 ], + * sum_ysq = Sum [ (y_i - mu_y)^2 ] and + * sum_cross = Sum [ (x_i - mu_x) * (y_i - mu_y) ] + * using the above relation from Welford's paper + */ + + mean_x = data1[0 * stride1]; + mean_y = data2[0 * stride2]; + + for (i = 1; i < n; ++i) + { + ratio = i / (i + 1.0); + delta_x = data1[i * stride1] - mean_x; + delta_y = data2[i * stride2] - mean_y; + sum_xsq += delta_x * delta_x * ratio; + sum_ysq += delta_y * delta_y * ratio; + sum_cross += delta_x * delta_y * ratio; + mean_x += delta_x / (i + 1.0); + mean_y += delta_y / (i + 1.0); + } + + r = sum_cross / (sqrt(sum_xsq) * sqrt(sum_ysq)); + + return r; +} diff --git a/software/gsl-1.15/statistics/gsl_statistics.h b/software/gsl-1.15/statistics/gsl_statistics.h new file mode 100644 index 000000000..9fb414f28 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics.h @@ -0,0 +1,20 @@ +#ifndef __GSL_STATISTICS_H__ +#define __GSL_STATISTICS_H__ + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#endif /* __GSL_STATISTICS_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_char.h b/software/gsl-1.15/statistics/gsl_statistics_char.h new file mode 100644 index 000000000..904c50b6b --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_char.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_CHAR_H__ +#define __GSL_STATISTICS_CHAR_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_char_mean (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_variance (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_sd (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_variance_with_fixed_mean (const char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_char_sd_with_fixed_mean (const char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_char_tss (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_tss_m (const char data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_char_absdev (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_skew (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_kurtosis (const char data[], const size_t stride, const size_t n); +double gsl_stats_char_lag1_autocorrelation (const char data[], const size_t stride, const size_t n); + +double gsl_stats_char_covariance (const char data1[], const size_t stride1,const char data2[], const size_t stride2, const size_t n); +double gsl_stats_char_correlation (const char data1[], const size_t stride1,const char data2[], const size_t stride2, const size_t n); + +double gsl_stats_char_variance_m (const char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_char_sd_m (const char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_char_absdev_m (const char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_char_skew_m_sd (const char data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_char_kurtosis_m_sd (const char data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_char_lag1_autocorrelation_m (const char data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_char_covariance_m (const char data1[], const size_t stride1,const char data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_char_pvariance (const char data1[], const size_t stride1, const size_t n1, const char data2[], const size_t stride2, const size_t n2); +double gsl_stats_char_ttest (const char data1[], const size_t stride1, const size_t n1, const char data2[], const size_t stride2, const size_t n2); + +char gsl_stats_char_max (const char data[], const size_t stride, const size_t n); +char gsl_stats_char_min (const char data[], const size_t stride, const size_t n); +void gsl_stats_char_minmax (char * min, char * max, const char data[], const size_t stride, const size_t n); + +size_t gsl_stats_char_max_index (const char data[], const size_t stride, const size_t n); +size_t gsl_stats_char_min_index (const char data[], const size_t stride, const size_t n); +void gsl_stats_char_minmax_index (size_t * min_index, size_t * max_index, const char data[], const size_t stride, const size_t n); + +double gsl_stats_char_median_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_char_quantile_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_CHAR_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_double.h b/software/gsl-1.15/statistics/gsl_statistics_double.h new file mode 100644 index 000000000..81881841e --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_double.h @@ -0,0 +1,99 @@ +/* statistics/gsl_statistics_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_DOUBLE_H__ +#define __GSL_STATISTICS_DOUBLE_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_mean (const double data[], const size_t stride, const size_t n); +double gsl_stats_variance (const double data[], const size_t stride, const size_t n); +double gsl_stats_sd (const double data[], const size_t stride, const size_t n); +double gsl_stats_variance_with_fixed_mean (const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_sd_with_fixed_mean (const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_tss (const double data[], const size_t stride, const size_t n); +double gsl_stats_tss_m (const double data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_absdev (const double data[], const size_t stride, const size_t n); +double gsl_stats_skew (const double data[], const size_t stride, const size_t n); +double gsl_stats_kurtosis (const double data[], const size_t stride, const size_t n); +double gsl_stats_lag1_autocorrelation (const double data[], const size_t stride, const size_t n); + +double gsl_stats_covariance (const double data1[], const size_t stride1,const double data2[], const size_t stride2, const size_t n); +double gsl_stats_correlation (const double data1[], const size_t stride1,const double data2[], const size_t stride2, const size_t n); + +double gsl_stats_variance_m (const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_sd_m (const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_absdev_m (const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_skew_m_sd (const double data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_kurtosis_m_sd (const double data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_lag1_autocorrelation_m (const double data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_covariance_m (const double data1[], const size_t stride1,const double data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + +/* DEFINED FOR FLOATING POINT TYPES ONLY */ + +double gsl_stats_wmean (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wvariance (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wsd (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wvariance_with_fixed_mean (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_wsd_with_fixed_mean (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_wtss (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wtss_m (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_wabsdev (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wskew (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); +double gsl_stats_wkurtosis (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n); + +double gsl_stats_wvariance_m (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_wsd_m (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_wabsdev_m (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_wskew_m_sd (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean, const double wsd); +double gsl_stats_wkurtosis_m_sd (const double w[], const size_t wstride, const double data[], const size_t stride, const size_t n, const double wmean, const double wsd); + +/* END OF FLOATING POINT TYPES */ + +double gsl_stats_pvariance (const double data1[], const size_t stride1, const size_t n1, const double data2[], const size_t stride2, const size_t n2); +double gsl_stats_ttest (const double data1[], const size_t stride1, const size_t n1, const double data2[], const size_t stride2, const size_t n2); + +double gsl_stats_max (const double data[], const size_t stride, const size_t n); +double gsl_stats_min (const double data[], const size_t stride, const size_t n); +void gsl_stats_minmax (double * min, double * max, const double data[], const size_t stride, const size_t n); + +size_t gsl_stats_max_index (const double data[], const size_t stride, const size_t n); +size_t gsl_stats_min_index (const double data[], const size_t stride, const size_t n); +void gsl_stats_minmax_index (size_t * min_index, size_t * max_index, const double data[], const size_t stride, const size_t n); + +double gsl_stats_median_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_quantile_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_DOUBLE_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_float.h b/software/gsl-1.15/statistics/gsl_statistics_float.h new file mode 100644 index 000000000..045c6ea15 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_float.h @@ -0,0 +1,99 @@ +/* statistics/gsl_statistics_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_FLOAT_H__ +#define __GSL_STATISTICS_FLOAT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_float_mean (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_variance (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_sd (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_variance_with_fixed_mean (const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_sd_with_fixed_mean (const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_tss (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_tss_m (const float data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_float_absdev (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_skew (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_kurtosis (const float data[], const size_t stride, const size_t n); +double gsl_stats_float_lag1_autocorrelation (const float data[], const size_t stride, const size_t n); + +double gsl_stats_float_covariance (const float data1[], const size_t stride1,const float data2[], const size_t stride2, const size_t n); +double gsl_stats_float_correlation (const float data1[], const size_t stride1,const float data2[], const size_t stride2, const size_t n); + +double gsl_stats_float_variance_m (const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_sd_m (const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_absdev_m (const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_skew_m_sd (const float data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_float_kurtosis_m_sd (const float data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_float_lag1_autocorrelation_m (const float data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_float_covariance_m (const float data1[], const size_t stride1,const float data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + +/* DEFINED FOR FLOATING POINT TYPES ONLY */ + +double gsl_stats_float_wmean (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wvariance (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wsd (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wvariance_with_fixed_mean (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_wsd_with_fixed_mean (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_float_wtss (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wtss_m (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_float_wabsdev (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wskew (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); +double gsl_stats_float_wkurtosis (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n); + +double gsl_stats_float_wvariance_m (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_float_wsd_m (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_float_wabsdev_m (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_float_wskew_m_sd (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean, const double wsd); +double gsl_stats_float_wkurtosis_m_sd (const float w[], const size_t wstride, const float data[], const size_t stride, const size_t n, const double wmean, const double wsd); + +/* END OF FLOATING POINT TYPES */ + +double gsl_stats_float_pvariance (const float data1[], const size_t stride1, const size_t n1, const float data2[], const size_t stride2, const size_t n2); +double gsl_stats_float_ttest (const float data1[], const size_t stride1, const size_t n1, const float data2[], const size_t stride2, const size_t n2); + +float gsl_stats_float_max (const float data[], const size_t stride, const size_t n); +float gsl_stats_float_min (const float data[], const size_t stride, const size_t n); +void gsl_stats_float_minmax (float * min, float * max, const float data[], const size_t stride, const size_t n); + +size_t gsl_stats_float_max_index (const float data[], const size_t stride, const size_t n); +size_t gsl_stats_float_min_index (const float data[], const size_t stride, const size_t n); +void gsl_stats_float_minmax_index (size_t * min_index, size_t * max_index, const float data[], const size_t stride, const size_t n); + +double gsl_stats_float_median_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_float_quantile_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_FLOAT_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_int.h b/software/gsl-1.15/statistics/gsl_statistics_int.h new file mode 100644 index 000000000..be20704c6 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_int.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_INT_H__ +#define __GSL_STATISTICS_INT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_int_mean (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_variance (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_sd (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_variance_with_fixed_mean (const int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_int_sd_with_fixed_mean (const int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_int_tss (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_tss_m (const int data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_int_absdev (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_skew (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_kurtosis (const int data[], const size_t stride, const size_t n); +double gsl_stats_int_lag1_autocorrelation (const int data[], const size_t stride, const size_t n); + +double gsl_stats_int_covariance (const int data1[], const size_t stride1,const int data2[], const size_t stride2, const size_t n); +double gsl_stats_int_correlation (const int data1[], const size_t stride1,const int data2[], const size_t stride2, const size_t n); + +double gsl_stats_int_variance_m (const int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_int_sd_m (const int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_int_absdev_m (const int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_int_skew_m_sd (const int data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_int_kurtosis_m_sd (const int data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_int_lag1_autocorrelation_m (const int data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_int_covariance_m (const int data1[], const size_t stride1,const int data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_int_pvariance (const int data1[], const size_t stride1, const size_t n1, const int data2[], const size_t stride2, const size_t n2); +double gsl_stats_int_ttest (const int data1[], const size_t stride1, const size_t n1, const int data2[], const size_t stride2, const size_t n2); + +int gsl_stats_int_max (const int data[], const size_t stride, const size_t n); +int gsl_stats_int_min (const int data[], const size_t stride, const size_t n); +void gsl_stats_int_minmax (int * min, int * max, const int data[], const size_t stride, const size_t n); + +size_t gsl_stats_int_max_index (const int data[], const size_t stride, const size_t n); +size_t gsl_stats_int_min_index (const int data[], const size_t stride, const size_t n); +void gsl_stats_int_minmax_index (size_t * min_index, size_t * max_index, const int data[], const size_t stride, const size_t n); + +double gsl_stats_int_median_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_int_quantile_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_INT_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_long.h b/software/gsl-1.15/statistics/gsl_statistics_long.h new file mode 100644 index 000000000..263eb2b65 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_long.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_LONG_H__ +#define __GSL_STATISTICS_LONG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_long_mean (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_variance (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_sd (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_variance_with_fixed_mean (const long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_sd_with_fixed_mean (const long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_tss (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_tss_m (const long data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_long_absdev (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_skew (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_kurtosis (const long data[], const size_t stride, const size_t n); +double gsl_stats_long_lag1_autocorrelation (const long data[], const size_t stride, const size_t n); + +double gsl_stats_long_covariance (const long data1[], const size_t stride1,const long data2[], const size_t stride2, const size_t n); +double gsl_stats_long_correlation (const long data1[], const size_t stride1,const long data2[], const size_t stride2, const size_t n); + +double gsl_stats_long_variance_m (const long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_sd_m (const long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_absdev_m (const long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_skew_m_sd (const long data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_long_kurtosis_m_sd (const long data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_long_lag1_autocorrelation_m (const long data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_long_covariance_m (const long data1[], const size_t stride1,const long data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_long_pvariance (const long data1[], const size_t stride1, const size_t n1, const long data2[], const size_t stride2, const size_t n2); +double gsl_stats_long_ttest (const long data1[], const size_t stride1, const size_t n1, const long data2[], const size_t stride2, const size_t n2); + +long gsl_stats_long_max (const long data[], const size_t stride, const size_t n); +long gsl_stats_long_min (const long data[], const size_t stride, const size_t n); +void gsl_stats_long_minmax (long * min, long * max, const long data[], const size_t stride, const size_t n); + +size_t gsl_stats_long_max_index (const long data[], const size_t stride, const size_t n); +size_t gsl_stats_long_min_index (const long data[], const size_t stride, const size_t n); +void gsl_stats_long_minmax_index (size_t * min_index, size_t * max_index, const long data[], const size_t stride, const size_t n); + +double gsl_stats_long_median_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_quantile_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_LONG_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_long_double.h b/software/gsl-1.15/statistics/gsl_statistics_long_double.h new file mode 100644 index 000000000..dd07645af --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_long_double.h @@ -0,0 +1,99 @@ +/* statistics/gsl_statistics_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_LONG_DOUBLE_H__ +#define __GSL_STATISTICS_LONG_DOUBLE_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_long_double_mean (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_variance (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_sd (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_variance_with_fixed_mean (const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_sd_with_fixed_mean (const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_tss (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_tss_m (const long double data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_long_double_absdev (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_skew (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_kurtosis (const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_lag1_autocorrelation (const long double data[], const size_t stride, const size_t n); + +double gsl_stats_long_double_covariance (const long double data1[], const size_t stride1,const long double data2[], const size_t stride2, const size_t n); +double gsl_stats_long_double_correlation (const long double data1[], const size_t stride1,const long double data2[], const size_t stride2, const size_t n); + +double gsl_stats_long_double_variance_m (const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_sd_m (const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_absdev_m (const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_skew_m_sd (const long double data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_long_double_kurtosis_m_sd (const long double data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_long_double_lag1_autocorrelation_m (const long double data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_long_double_covariance_m (const long double data1[], const size_t stride1,const long double data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + +/* DEFINED FOR FLOATING POINT TYPES ONLY */ + +double gsl_stats_long_double_wmean (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wvariance (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wsd (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wvariance_with_fixed_mean (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_wsd_with_fixed_mean (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_long_double_wtss (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wtss_m (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_long_double_wabsdev (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wskew (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); +double gsl_stats_long_double_wkurtosis (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n); + +double gsl_stats_long_double_wvariance_m (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_long_double_wsd_m (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_long_double_wabsdev_m (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean); +double gsl_stats_long_double_wskew_m_sd (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean, const double wsd); +double gsl_stats_long_double_wkurtosis_m_sd (const long double w[], const size_t wstride, const long double data[], const size_t stride, const size_t n, const double wmean, const double wsd); + +/* END OF FLOATING POINT TYPES */ + +double gsl_stats_long_double_pvariance (const long double data1[], const size_t stride1, const size_t n1, const long double data2[], const size_t stride2, const size_t n2); +double gsl_stats_long_double_ttest (const long double data1[], const size_t stride1, const size_t n1, const long double data2[], const size_t stride2, const size_t n2); + +long double gsl_stats_long_double_max (const long double data[], const size_t stride, const size_t n); +long double gsl_stats_long_double_min (const long double data[], const size_t stride, const size_t n); +void gsl_stats_long_double_minmax (long double * min, long double * max, const long double data[], const size_t stride, const size_t n); + +size_t gsl_stats_long_double_max_index (const long double data[], const size_t stride, const size_t n); +size_t gsl_stats_long_double_min_index (const long double data[], const size_t stride, const size_t n); +void gsl_stats_long_double_minmax_index (size_t * min_index, size_t * max_index, const long double data[], const size_t stride, const size_t n); + +double gsl_stats_long_double_median_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_double_quantile_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_short.h b/software/gsl-1.15/statistics/gsl_statistics_short.h new file mode 100644 index 000000000..920714776 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_short.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_SHORT_H__ +#define __GSL_STATISTICS_SHORT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_short_mean (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_variance (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_sd (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_variance_with_fixed_mean (const short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_short_sd_with_fixed_mean (const short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_short_tss (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_tss_m (const short data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_short_absdev (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_skew (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_kurtosis (const short data[], const size_t stride, const size_t n); +double gsl_stats_short_lag1_autocorrelation (const short data[], const size_t stride, const size_t n); + +double gsl_stats_short_covariance (const short data1[], const size_t stride1,const short data2[], const size_t stride2, const size_t n); +double gsl_stats_short_correlation (const short data1[], const size_t stride1,const short data2[], const size_t stride2, const size_t n); + +double gsl_stats_short_variance_m (const short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_short_sd_m (const short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_short_absdev_m (const short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_short_skew_m_sd (const short data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_short_kurtosis_m_sd (const short data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_short_lag1_autocorrelation_m (const short data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_short_covariance_m (const short data1[], const size_t stride1,const short data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_short_pvariance (const short data1[], const size_t stride1, const size_t n1, const short data2[], const size_t stride2, const size_t n2); +double gsl_stats_short_ttest (const short data1[], const size_t stride1, const size_t n1, const short data2[], const size_t stride2, const size_t n2); + +short gsl_stats_short_max (const short data[], const size_t stride, const size_t n); +short gsl_stats_short_min (const short data[], const size_t stride, const size_t n); +void gsl_stats_short_minmax (short * min, short * max, const short data[], const size_t stride, const size_t n); + +size_t gsl_stats_short_max_index (const short data[], const size_t stride, const size_t n); +size_t gsl_stats_short_min_index (const short data[], const size_t stride, const size_t n); +void gsl_stats_short_minmax_index (size_t * min_index, size_t * max_index, const short data[], const size_t stride, const size_t n); + +double gsl_stats_short_median_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_short_quantile_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_SHORT_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_uchar.h b/software/gsl-1.15/statistics/gsl_statistics_uchar.h new file mode 100644 index 000000000..601ff4cbd --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_uchar.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_UCHAR_H__ +#define __GSL_STATISTICS_UCHAR_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_uchar_mean (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_variance (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_sd (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_variance_with_fixed_mean (const unsigned char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uchar_sd_with_fixed_mean (const unsigned char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uchar_tss (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_tss_m (const unsigned char data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_uchar_absdev (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_skew (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_kurtosis (const unsigned char data[], const size_t stride, const size_t n); +double gsl_stats_uchar_lag1_autocorrelation (const unsigned char data[], const size_t stride, const size_t n); + +double gsl_stats_uchar_covariance (const unsigned char data1[], const size_t stride1,const unsigned char data2[], const size_t stride2, const size_t n); +double gsl_stats_uchar_correlation (const unsigned char data1[], const size_t stride1,const unsigned char data2[], const size_t stride2, const size_t n); + +double gsl_stats_uchar_variance_m (const unsigned char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uchar_sd_m (const unsigned char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uchar_absdev_m (const unsigned char data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uchar_skew_m_sd (const unsigned char data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_uchar_kurtosis_m_sd (const unsigned char data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_uchar_lag1_autocorrelation_m (const unsigned char data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_uchar_covariance_m (const unsigned char data1[], const size_t stride1,const unsigned char data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_uchar_pvariance (const unsigned char data1[], const size_t stride1, const size_t n1, const unsigned char data2[], const size_t stride2, const size_t n2); +double gsl_stats_uchar_ttest (const unsigned char data1[], const size_t stride1, const size_t n1, const unsigned char data2[], const size_t stride2, const size_t n2); + +unsigned char gsl_stats_uchar_max (const unsigned char data[], const size_t stride, const size_t n); +unsigned char gsl_stats_uchar_min (const unsigned char data[], const size_t stride, const size_t n); +void gsl_stats_uchar_minmax (unsigned char * min, unsigned char * max, const unsigned char data[], const size_t stride, const size_t n); + +size_t gsl_stats_uchar_max_index (const unsigned char data[], const size_t stride, const size_t n); +size_t gsl_stats_uchar_min_index (const unsigned char data[], const size_t stride, const size_t n); +void gsl_stats_uchar_minmax_index (size_t * min_index, size_t * max_index, const unsigned char data[], const size_t stride, const size_t n); + +double gsl_stats_uchar_median_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uchar_quantile_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_UCHAR_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_uint.h b/software/gsl-1.15/statistics/gsl_statistics_uint.h new file mode 100644 index 000000000..3f4bd3828 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_uint.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_UINT_H__ +#define __GSL_STATISTICS_UINT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_uint_mean (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_variance (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_sd (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_variance_with_fixed_mean (const unsigned int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uint_sd_with_fixed_mean (const unsigned int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uint_tss (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_tss_m (const unsigned int data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_uint_absdev (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_skew (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_kurtosis (const unsigned int data[], const size_t stride, const size_t n); +double gsl_stats_uint_lag1_autocorrelation (const unsigned int data[], const size_t stride, const size_t n); + +double gsl_stats_uint_covariance (const unsigned int data1[], const size_t stride1,const unsigned int data2[], const size_t stride2, const size_t n); +double gsl_stats_uint_correlation (const unsigned int data1[], const size_t stride1,const unsigned int data2[], const size_t stride2, const size_t n); + +double gsl_stats_uint_variance_m (const unsigned int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uint_sd_m (const unsigned int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uint_absdev_m (const unsigned int data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_uint_skew_m_sd (const unsigned int data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_uint_kurtosis_m_sd (const unsigned int data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_uint_lag1_autocorrelation_m (const unsigned int data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_uint_covariance_m (const unsigned int data1[], const size_t stride1,const unsigned int data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_uint_pvariance (const unsigned int data1[], const size_t stride1, const size_t n1, const unsigned int data2[], const size_t stride2, const size_t n2); +double gsl_stats_uint_ttest (const unsigned int data1[], const size_t stride1, const size_t n1, const unsigned int data2[], const size_t stride2, const size_t n2); + +unsigned int gsl_stats_uint_max (const unsigned int data[], const size_t stride, const size_t n); +unsigned int gsl_stats_uint_min (const unsigned int data[], const size_t stride, const size_t n); +void gsl_stats_uint_minmax (unsigned int * min, unsigned int * max, const unsigned int data[], const size_t stride, const size_t n); + +size_t gsl_stats_uint_max_index (const unsigned int data[], const size_t stride, const size_t n); +size_t gsl_stats_uint_min_index (const unsigned int data[], const size_t stride, const size_t n); +void gsl_stats_uint_minmax_index (size_t * min_index, size_t * max_index, const unsigned int data[], const size_t stride, const size_t n); + +double gsl_stats_uint_median_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uint_quantile_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_UINT_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_ulong.h b/software/gsl-1.15/statistics/gsl_statistics_ulong.h new file mode 100644 index 000000000..f45cfad04 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_ulong.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_ULONG_H__ +#define __GSL_STATISTICS_ULONG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_ulong_mean (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_variance (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_sd (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_variance_with_fixed_mean (const unsigned long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ulong_sd_with_fixed_mean (const unsigned long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ulong_tss (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_tss_m (const unsigned long data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_ulong_absdev (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_skew (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_kurtosis (const unsigned long data[], const size_t stride, const size_t n); +double gsl_stats_ulong_lag1_autocorrelation (const unsigned long data[], const size_t stride, const size_t n); + +double gsl_stats_ulong_covariance (const unsigned long data1[], const size_t stride1,const unsigned long data2[], const size_t stride2, const size_t n); +double gsl_stats_ulong_correlation (const unsigned long data1[], const size_t stride1,const unsigned long data2[], const size_t stride2, const size_t n); + +double gsl_stats_ulong_variance_m (const unsigned long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ulong_sd_m (const unsigned long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ulong_absdev_m (const unsigned long data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ulong_skew_m_sd (const unsigned long data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_ulong_kurtosis_m_sd (const unsigned long data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_ulong_lag1_autocorrelation_m (const unsigned long data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_ulong_covariance_m (const unsigned long data1[], const size_t stride1,const unsigned long data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_ulong_pvariance (const unsigned long data1[], const size_t stride1, const size_t n1, const unsigned long data2[], const size_t stride2, const size_t n2); +double gsl_stats_ulong_ttest (const unsigned long data1[], const size_t stride1, const size_t n1, const unsigned long data2[], const size_t stride2, const size_t n2); + +unsigned long gsl_stats_ulong_max (const unsigned long data[], const size_t stride, const size_t n); +unsigned long gsl_stats_ulong_min (const unsigned long data[], const size_t stride, const size_t n); +void gsl_stats_ulong_minmax (unsigned long * min, unsigned long * max, const unsigned long data[], const size_t stride, const size_t n); + +size_t gsl_stats_ulong_max_index (const unsigned long data[], const size_t stride, const size_t n); +size_t gsl_stats_ulong_min_index (const unsigned long data[], const size_t stride, const size_t n); +void gsl_stats_ulong_minmax_index (size_t * min_index, size_t * max_index, const unsigned long data[], const size_t stride, const size_t n); + +double gsl_stats_ulong_median_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ulong_quantile_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_ULONG_H__ */ diff --git a/software/gsl-1.15/statistics/gsl_statistics_ushort.h b/software/gsl-1.15/statistics/gsl_statistics_ushort.h new file mode 100644 index 000000000..ad1b9f002 --- /dev/null +++ b/software/gsl-1.15/statistics/gsl_statistics_ushort.h @@ -0,0 +1,79 @@ +/* statistics/gsl_statistics_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_STATISTICS_USHORT_H__ +#define __GSL_STATISTICS_USHORT_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_stats_ushort_mean (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_variance (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_sd (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_variance_with_fixed_mean (const unsigned short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ushort_sd_with_fixed_mean (const unsigned short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ushort_tss (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_tss_m (const unsigned short data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_ushort_absdev (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_skew (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_kurtosis (const unsigned short data[], const size_t stride, const size_t n); +double gsl_stats_ushort_lag1_autocorrelation (const unsigned short data[], const size_t stride, const size_t n); + +double gsl_stats_ushort_covariance (const unsigned short data1[], const size_t stride1,const unsigned short data2[], const size_t stride2, const size_t n); +double gsl_stats_ushort_correlation (const unsigned short data1[], const size_t stride1,const unsigned short data2[], const size_t stride2, const size_t n); + +double gsl_stats_ushort_variance_m (const unsigned short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ushort_sd_m (const unsigned short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ushort_absdev_m (const unsigned short data[], const size_t stride, const size_t n, const double mean); +double gsl_stats_ushort_skew_m_sd (const unsigned short data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_ushort_kurtosis_m_sd (const unsigned short data[], const size_t stride, const size_t n, const double mean, const double sd); +double gsl_stats_ushort_lag1_autocorrelation_m (const unsigned short data[], const size_t stride, const size_t n, const double mean); + +double gsl_stats_ushort_covariance_m (const unsigned short data1[], const size_t stride1,const unsigned short data2[], const size_t stride2, const size_t n, const double mean1, const double mean2); + + +double gsl_stats_ushort_pvariance (const unsigned short data1[], const size_t stride1, const size_t n1, const unsigned short data2[], const size_t stride2, const size_t n2); +double gsl_stats_ushort_ttest (const unsigned short data1[], const size_t stride1, const size_t n1, const unsigned short data2[], const size_t stride2, const size_t n2); + +unsigned short gsl_stats_ushort_max (const unsigned short data[], const size_t stride, const size_t n); +unsigned short gsl_stats_ushort_min (const unsigned short data[], const size_t stride, const size_t n); +void gsl_stats_ushort_minmax (unsigned short * min, unsigned short * max, const unsigned short data[], const size_t stride, const size_t n); + +size_t gsl_stats_ushort_max_index (const unsigned short data[], const size_t stride, const size_t n); +size_t gsl_stats_ushort_min_index (const unsigned short data[], const size_t stride, const size_t n); +void gsl_stats_ushort_minmax_index (size_t * min_index, size_t * max_index, const unsigned short data[], const size_t stride, const size_t n); + +double gsl_stats_ushort_median_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ushort_quantile_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, const double f) ; + +__END_DECLS + +#endif /* __GSL_STATISTICS_USHORT_H__ */ diff --git a/software/gsl-1.15/statistics/kurtosis.c b/software/gsl-1.15/statistics/kurtosis.c new file mode 100644 index 000000000..4d14f51a3 --- /dev/null +++ b/software/gsl-1.15/statistics/kurtosis.c @@ -0,0 +1,71 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "kurtosis_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/statistics/kurtosis_source.c b/software/gsl-1.15/statistics/kurtosis_source.c new file mode 100644 index 000000000..36d3a1720 --- /dev/null +++ b/software/gsl-1.15/statistics/kurtosis_source.c @@ -0,0 +1,55 @@ +/* statistics/kurtosis_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,kurtosis) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean)(data, stride, n); + const double est_sd = FUNCTION(gsl_stats,sd_m)(data, stride, n, mean); + return FUNCTION(gsl_stats,kurtosis_m_sd)(data, stride, n, mean, est_sd); +} + +double +FUNCTION(gsl_stats,kurtosis_m_sd) (const BASE data[], + const size_t stride, + const size_t n, + const double mean, + const double sd) +{ + /* takes a dataset and finds the kurtosis */ + + long double avg = 0, kurtosis; + size_t i; + + /* find the fourth moment the deviations, normalized by the sd */ + + /* we use a recurrence relation to stably update a running value so + there aren't any large sums that can overflow */ + + for (i = 0; i < n; i++) + { + const long double x = (data[i * stride] - mean) / sd; + avg += (x * x * x * x - avg)/(i + 1); + } + + kurtosis = avg - 3.0; /* makes kurtosis zero for a Gaussian */ + + return kurtosis; +} + diff --git a/software/gsl-1.15/statistics/lag1.c b/software/gsl-1.15/statistics/lag1.c new file mode 100644 index 000000000..4bc09f12d --- /dev/null +++ b/software/gsl-1.15/statistics/lag1.c @@ -0,0 +1,70 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "lag1_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/statistics/lag1_source.c b/software/gsl-1.15/statistics/lag1_source.c new file mode 100644 index 000000000..209502acc --- /dev/null +++ b/software/gsl-1.15/statistics/lag1_source.c @@ -0,0 +1,51 @@ +/* statistics/lag1_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +double +FUNCTION(gsl_stats,lag1_autocorrelation) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean) (data, stride, n); + return FUNCTION(gsl_stats,lag1_autocorrelation_m)(data, stride, n, mean); +} + +double +FUNCTION(gsl_stats,lag1_autocorrelation_m) (const BASE data[], const size_t stride, const size_t size, const double mean) +{ + /* Compute the lag-1 autocorrelation of a dataset using the + recurrence relation */ + + size_t i; + + long double r1 ; + long double q = 0 ; + long double v = (data[0 * stride] - mean) * (data[0 * stride] - mean) ; + + for (i = 1; i < size ; i++) + { + const long double delta0 = (data[(i-1) * stride] - mean); + const long double delta1 = (data[i * stride] - mean); + q += (delta0 * delta1 - q)/(i + 1); + v += (delta1 * delta1 - v)/(i + 1); + } + + r1 = q / v ; + + return r1; +} diff --git a/software/gsl-1.15/statistics/mean.c b/software/gsl-1.15/statistics/mean.c new file mode 100644 index 000000000..24dd04f9f --- /dev/null +++ b/software/gsl-1.15/statistics/mean.c @@ -0,0 +1,70 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "mean_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/statistics/mean_source.c b/software/gsl-1.15/statistics/mean_source.c new file mode 100644 index 000000000..d54c3d606 --- /dev/null +++ b/software/gsl-1.15/statistics/mean_source.c @@ -0,0 +1,35 @@ +/* statistics/mean_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION (gsl_stats, mean) (const BASE data[], const size_t stride, const size_t size) +{ + /* Compute the arithmetic mean of a dataset using the recurrence relation + mean_(n) = mean(n-1) + (data[n] - mean(n-1))/(n+1) */ + + long double mean = 0; + size_t i; + + for (i = 0; i < size; i++) + { + mean += (data[i * stride] - mean) / (i + 1); + } + + return mean; +} diff --git a/software/gsl-1.15/statistics/median.c b/software/gsl-1.15/statistics/median.c new file mode 100644 index 000000000..e42301b80 --- /dev/null +++ b/software/gsl-1.15/statistics/median.c @@ -0,0 +1,71 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "median_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/median_source.c b/software/gsl-1.15/statistics/median_source.c new file mode 100644 index 000000000..a3c7ee042 --- /dev/null +++ b/software/gsl-1.15/statistics/median_source.c @@ -0,0 +1,44 @@ +/* statistics/median_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +double +FUNCTION(gsl_stats,median_from_sorted_data) (const BASE sorted_data[], + const size_t stride, + const size_t n) +{ + double median ; + const size_t lhs = (n - 1) / 2 ; + const size_t rhs = n / 2 ; + + if (n == 0) + return 0.0 ; + + if (lhs == rhs) + { + median = sorted_data[lhs * stride] ; + } + else + { + median = (sorted_data[lhs * stride] + sorted_data[rhs * stride])/2.0 ; + } + + return median ; +} + diff --git a/software/gsl-1.15/statistics/minmax.c b/software/gsl-1.15/statistics/minmax.c new file mode 100644 index 000000000..e3ce00275 --- /dev/null +++ b/software/gsl-1.15/statistics/minmax.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/statistics/minmax_source.c b/software/gsl-1.15/statistics/minmax_source.c new file mode 100644 index 000000000..1fcc35b97 --- /dev/null +++ b/software/gsl-1.15/statistics/minmax_source.c @@ -0,0 +1,207 @@ +/* statistics/minmax_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +BASE +FUNCTION (gsl_stats,max) (const BASE data[], const size_t stride, + const size_t n) +{ + /* finds the largest member of a dataset */ + + BASE max = data[0 * stride]; + size_t i; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi > max) + max = xi; +#ifdef FP + if (isnan (xi)) + return xi; +#endif + } + + return max; +} + +BASE +FUNCTION (gsl_stats,min) (const BASE data[], const size_t stride, + const size_t n) +{ + /* finds the smallest member of a dataset */ + + BASE min = data[0 * stride]; + size_t i; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi < min) + min = xi; +#ifdef FP + if (isnan (xi)) + return xi; +#endif + } + + return min; + +} + +void +FUNCTION (gsl_stats,minmax) (BASE * min_out, BASE * max_out, + const BASE data[], const size_t stride, + const size_t n) +{ + /* finds the smallest and largest members of a dataset */ + + BASE min = data[0 * stride]; + BASE max = data[0 * stride]; + size_t i; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi < min) + min = xi; + + if (xi > max) + max = xi; + +#ifdef FP + if (isnan (xi)) + { + min = xi; + max = xi; + break; + } +#endif + + } + + *min_out = min; + *max_out = max; +} + +size_t +FUNCTION (gsl_stats,max_index) (const BASE data[], const size_t stride, + const size_t n) +{ + /* finds the index of the largest member of a dataset */ + /* if there is more than one largest value then we choose the first */ + + BASE max = data[0 * stride]; + size_t i, max_index = 0; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi > max) + { + max = xi; + max_index = i; + } + +#ifdef FP + if (isnan (xi)) + { + return i; + } +#endif + } + + return max_index; +} + +size_t +FUNCTION (gsl_stats,min_index) (const BASE data[], const size_t stride, + const size_t n) +{ + /* finds the index of the smallest member of a dataset */ + /* if there is more than one largest value then we choose the first */ + + BASE min = data[0 * stride]; + size_t i, min_index = 0; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi < min) + { + min = xi; + min_index = i; + } + +#ifdef FP + if (isnan (xi)) + { + return i; + } +#endif + } + + return min_index; +} + +void +FUNCTION (gsl_stats,minmax_index) (size_t * min_index_out, + size_t * max_index_out, const BASE data[], + const size_t stride, const size_t n) +{ + /* finds the smallest and largest members of a dataset */ + + BASE min = data[0 * stride]; + BASE max = data[0 * stride]; + size_t i, min_index = 0, max_index = 0; + + for (i = 0; i < n; i++) + { + BASE xi = data[i * stride]; + + if (xi < min) + { + min = xi; + min_index = i; + } + + if (xi > max) + { + max = xi; + max_index = i; + } + +#ifdef FP + if (isnan (xi)) + { + min_index = i; + max_index = i; + break; + } +#endif + } + + *min_index_out = min_index; + *max_index_out = max_index; +} diff --git a/software/gsl-1.15/statistics/p_variance.c b/software/gsl-1.15/statistics/p_variance.c new file mode 100644 index 000000000..dafb43e21 --- /dev/null +++ b/software/gsl-1.15/statistics/p_variance.c @@ -0,0 +1,71 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "p_variance_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/p_variance_source.c b/software/gsl-1.15/statistics/p_variance_source.c new file mode 100644 index 000000000..c127b9cd1 --- /dev/null +++ b/software/gsl-1.15/statistics/p_variance_source.c @@ -0,0 +1,39 @@ +/* statistics/p_variance_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +double +FUNCTION(gsl_stats,pvariance) (const BASE data1[], + const size_t stride1, const size_t n1, + const BASE data2[], + const size_t stride2, const size_t n2) +{ + /* Find the pooled variance of two datasets */ + + const double var1 = FUNCTION(gsl_stats,variance) (data1, stride1, n1); + const double var2 = FUNCTION(gsl_stats,variance) (data2, stride2, n2); + + /* calculate the pooled variance */ + + const double pooled_variance = + (((n1 - 1) * var1) + ((n2 - 1) * var2)) / (n1 + n2 - 2); + + return pooled_variance; +} + diff --git a/software/gsl-1.15/statistics/quantiles.c b/software/gsl-1.15/statistics/quantiles.c new file mode 100644 index 000000000..96a3a25cd --- /dev/null +++ b/software/gsl-1.15/statistics/quantiles.c @@ -0,0 +1,71 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "quantiles_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/quantiles_source.c b/software/gsl-1.15/statistics/quantiles_source.c new file mode 100644 index 000000000..e2956d9d2 --- /dev/null +++ b/software/gsl-1.15/statistics/quantiles_source.c @@ -0,0 +1,45 @@ +/* statistics/quantiles_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +double +FUNCTION(gsl_stats,quantile_from_sorted_data) (const BASE sorted_data[], + const size_t stride, + const size_t n, + const double f) +{ + const double index = f * (n - 1) ; + const size_t lhs = (int)index ; + const double delta = index - lhs ; + double result; + + if (n == 0) + return 0.0 ; + + if (lhs == n - 1) + { + result = sorted_data[lhs * stride] ; + } + else + { + result = (1 - delta) * sorted_data[lhs * stride] + delta * sorted_data[(lhs + 1) * stride] ; + } + + return result ; +} diff --git a/software/gsl-1.15/statistics/skew.c b/software/gsl-1.15/statistics/skew.c new file mode 100644 index 000000000..00f379ca1 --- /dev/null +++ b/software/gsl-1.15/statistics/skew.c @@ -0,0 +1,72 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "skew_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/skew_source.c b/software/gsl-1.15/statistics/skew_source.c new file mode 100644 index 000000000..d58955820 --- /dev/null +++ b/software/gsl-1.15/statistics/skew_source.c @@ -0,0 +1,51 @@ +/* statistics/skew_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,skew) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean)(data, stride, n); + const double sd = FUNCTION(gsl_stats,sd_m)(data, stride, n, mean); + return FUNCTION(gsl_stats,skew_m_sd)(data, stride, n, mean, sd); +} + +double +FUNCTION(gsl_stats,skew_m_sd) (const BASE data[], + const size_t stride, const size_t n, + const double mean, const double sd) +{ + /* takes a dataset and finds the skewness */ + + long double skew = 0; + size_t i; + + /* find the sum of the cubed deviations, normalized by the sd. */ + + /* we use a recurrence relation to stably update a running value so + there aren't any large sums that can overflow */ + + for (i = 0; i < n; i++) + { + const long double x = (data[i * stride] - mean) / sd; + skew += (x * x * x - skew) / (i + 1); + } + + return skew; +} + diff --git a/software/gsl-1.15/statistics/test.c b/software/gsl-1.15/statistics/test.c new file mode 100644 index 000000000..4942cc07e --- /dev/null +++ b/software/gsl-1.15/statistics/test.c @@ -0,0 +1,132 @@ +/* statistics/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +int test_nist (void); + +/* Test program for mean.c. JimDavies 7.96 */ + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "test_float_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "test_float_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "test_float_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "test_int_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + +int +main (void) +{ + size_t s1, s2; + + gsl_ieee_env_setup (); + + for (s1 = 1; s1 < 4 ; s1++) + { + s2 = (s1 < 3) ? 1 : (s1 - 1) ; + + test_func (s1,s2); + test_float_func (s1,s2); + test_long_double_func (s1,s2); + + test_ulong_func (s1,s2); + test_long_func (s1,s2); + test_uint_func (s1,s2); + test_int_func (s1,s2); + test_ushort_func (s1,s2); + test_short_func (s1,s2); + test_uchar_func (s1,s2); + test_char_func (s1,s2); + } + + test_nist(); + + exit (gsl_test_summary ()); +} + diff --git a/software/gsl-1.15/statistics/test_float_source.c b/software/gsl-1.15/statistics/test_float_source.c new file mode 100644 index 000000000..c33c0ad42 --- /dev/null +++ b/software/gsl-1.15/statistics/test_float_source.c @@ -0,0 +1,416 @@ +/* statistics/test_float_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (const size_t stridea, const size_t strideb); + +void +FUNCTION (test, func) (const size_t stridea, const size_t strideb) +{ + /* sample sets of doubles */ + size_t i; + const size_t na = 14, nb = 14; + + const double rawa[] = + {.0421, .0941, .1064, .0242, .1331, + .0773, .0243, .0815, .1186, .0356, + .0728, .0999, .0614, .0479}; + + const double rawb[] = + {.1081, .0986, .1566, .1961, .1125, + .1942, .1079, .1021, .1583, .1673, + .1675, .1856, .1688, .1512}; + + const double raww[] = + {.0000, .0000, .0000, 3.000, .0000, + 1.000, 1.000, 1.000, 0.000, .5000, + 7.000, 5.000, 4.000, 0.123}; + + BASE * sorted ; + + BASE * groupa = (BASE *) malloc (stridea * na * sizeof(BASE)); + BASE * groupb = (BASE *) malloc (strideb * nb * sizeof(BASE)); + BASE * w = (BASE *) malloc (strideb * na * sizeof(BASE)); + +#ifdef BASE_FLOAT + double rel = 1e-6; +#else + double rel = 1e-10; +#endif + + for (i = 0 ; i < na ; i++) + groupa[i * stridea] = (BASE) rawa[i] ; + + for (i = 0 ; i < na ; i++) + w[i * strideb] = (BASE) raww[i] ; + + for (i = 0 ; i < nb ; i++) + groupb[i * strideb] = (BASE) rawb[i] ; + + + { + double mean = FUNCTION(gsl_stats,mean) (groupa, stridea, na); + double expected = 0.0728; + gsl_test_rel (mean, expected, rel, NAME(gsl_stats) "_mean"); + } + + { + double mean = FUNCTION(gsl_stats,mean) (groupa, stridea, na); + double var = FUNCTION(gsl_stats,variance_with_fixed_mean) (groupa, stridea, na, mean); + double expected = 0.00113837428571429; + gsl_test_rel (var, expected, rel, NAME(gsl_stats) "_variance_with_fixed_mean"); + } + + + { + double mean = FUNCTION(gsl_stats,mean) (groupa, stridea, na); + double var = FUNCTION(gsl_stats,sd_with_fixed_mean) (groupa, stridea, na, mean); + double expected = 0.0337398026922845; + gsl_test_rel (var, expected, rel, NAME(gsl_stats) "_sd_with_fixed_mean"); + } + + + { + double var = FUNCTION(gsl_stats,variance) (groupb, strideb, nb); + double expected = 0.00124956615384615; + gsl_test_rel (var, expected, rel, NAME(gsl_stats) "_variance"); + } + + { + double sd = FUNCTION(gsl_stats,sd) (groupa, stridea, na); + double expected = 0.0350134479659107; + gsl_test_rel (sd, expected, rel, NAME(gsl_stats) "_sd"); + } + + { + double ss = FUNCTION(gsl_stats,tss) (groupb, strideb, nb); + double expected = 0.01624436; + gsl_test_rel (ss, expected, rel, NAME(gsl_stats) "_ss"); + } + + { + double mean = FUNCTION(gsl_stats,mean) (groupa, stridea, na); + double ss = FUNCTION(gsl_stats,tss_m) (groupa, stridea, na, mean); + double expected = 1.59372400000000e-02; + gsl_test_rel (ss, expected, rel, NAME(gsl_stats) "_ss_m"); + } + + { + double absdev = FUNCTION(gsl_stats,absdev) (groupa, stridea, na); + double expected = 0.0287571428571429; + gsl_test_rel (absdev, expected, rel, NAME(gsl_stats) "_absdev"); + } + + { + double skew = FUNCTION(gsl_stats,skew) (groupa, stridea, na); + double expected = 0.0954642051479004; + gsl_test_rel (skew, expected, rel, NAME(gsl_stats) "_skew"); + } + + { + double kurt = FUNCTION(gsl_stats,kurtosis) (groupa, stridea, na); + double expected = -1.38583851548909 ; + gsl_test_rel (kurt, expected, rel, NAME(gsl_stats) "_kurtosis"); + } + + { + double wmean = FUNCTION(gsl_stats,wmean) (w, strideb, groupa, stridea, na); + double expected = 0.0678111523670601; + gsl_test_rel (wmean, expected, rel, NAME(gsl_stats) "_wmean"); + } + + { + double wmean = FUNCTION(gsl_stats,wmean) (w, strideb, groupa, stridea, na); + double wvar = FUNCTION(gsl_stats,wvariance_with_fixed_mean) (w, strideb, groupa, stridea, na, wmean); + double expected = 0.000615793060878654; + gsl_test_rel (wvar, expected, rel, NAME(gsl_stats) "_wvariance_with_fixed_mean"); + } + + { + double est_wvar = FUNCTION(gsl_stats,wvariance) (w, strideb, groupa, stridea, na); + double expected = 0.000769562962860317; + gsl_test_rel (est_wvar, expected, rel, NAME(gsl_stats) "_wvariance"); + } + + { + double wsd = FUNCTION(gsl_stats,wsd) (w, strideb, groupa, stridea, na); + double expected = 0.0277409978706664; + gsl_test_rel (wsd, expected, rel, NAME(gsl_stats) "_wsd"); + } + + + { + double wtss = FUNCTION(gsl_stats,wtss) (w, strideb, groupa, stridea, na); + double expected = 1.39310864162578e-02; + gsl_test_rel (wtss, expected, rel, NAME(gsl_stats) "_wtss"); + } + + { + double wmean = FUNCTION(gsl_stats,wmean) (w, strideb, groupa, stridea, na); + double wtss = FUNCTION(gsl_stats,wtss_m) (w, strideb, groupa, stridea, na, wmean); + double expected = 1.39310864162578e-02; + gsl_test_rel (wtss, expected, rel, NAME(gsl_stats) "_wtss_m"); + } + + + + { + double wabsdev = FUNCTION(gsl_stats,wabsdev) (w, strideb, groupa, stridea, na); + double expected = 0.0193205027504008; + gsl_test_rel (wabsdev, expected, rel, NAME(gsl_stats) "_wabsdev"); + } + + { + double wskew = FUNCTION(gsl_stats,wskew) (w, strideb, groupa, stridea, na); + double expected = -0.373631000307076; + gsl_test_rel (wskew, expected, rel, NAME(gsl_stats) "_wskew"); + } + + { + double wkurt = FUNCTION(gsl_stats,wkurtosis) (w, strideb, groupa, stridea, na); + double expected = -1.48114233353963; + gsl_test_rel (wkurt, expected, rel, NAME(gsl_stats) "_wkurtosis"); + } + + { + double c = FUNCTION(gsl_stats,covariance) (groupa, stridea, groupb, strideb, nb); + double expected = -0.000139021538461539; + gsl_test_rel (c, expected, rel, NAME(gsl_stats) "_covariance"); + } + + { + double r = FUNCTION(gsl_stats,correlation) (groupa, stridea, groupb, strideb, nb); + double expected = -0.112322712666074171; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_correlation"); + } + + { + double pv = FUNCTION(gsl_stats,pvariance) (groupa, stridea, na, groupb, strideb, nb); + double expected = 0.00123775384615385; + gsl_test_rel (pv, expected, rel, NAME(gsl_stats) "_pvariance"); + } + + { + double t = FUNCTION(gsl_stats,ttest) (groupa, stridea, na, groupb, strideb, nb); + double expected = -5.67026326985851; + gsl_test_rel (t, expected, rel, NAME(gsl_stats) "_ttest"); + } + + { + BASE expected = (BASE)0.1331; + gsl_test (FUNCTION(gsl_stats,max) (groupa, stridea, na) != expected, + NAME(gsl_stats) "_max (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + FUNCTION(gsl_stats,max) (groupa, stridea, na), expected); + } + + { + BASE min = FUNCTION(gsl_stats,min) (groupa, stridea, na); + BASE expected = (BASE)0.0242; + gsl_test (min != expected, + NAME(gsl_stats) "_min (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected); + } + + { + BASE min, max; + BASE expected_max = (BASE)0.1331; + BASE expected_min = (BASE)0.0242; + + FUNCTION(gsl_stats,minmax) (&min, &max, groupa, stridea, na); + + gsl_test (max != expected_max, + NAME(gsl_stats) "_minmax max (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + max, expected_max); + gsl_test (min != expected_min, + NAME(gsl_stats) "_minmax min (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected_min); + } + + { + int max_index = FUNCTION(gsl_stats,max_index) (groupa, stridea, na); + int expected = 4; + gsl_test (max_index != expected, + NAME(gsl_stats) "_max_index (%d observed vs %d expected)", + max_index, expected); + } + + { + int min_index = FUNCTION(gsl_stats,min_index) (groupa, stridea, na); + int expected = 3; + gsl_test (min_index != expected, + NAME(gsl_stats) "_min_index (%d observed vs %d expected)", + min_index, expected); + } + + { + size_t min_index, max_index; + size_t expected_max_index = 4; + size_t expected_min_index = 3; + + FUNCTION(gsl_stats,minmax_index) (&min_index, &max_index, groupa, stridea, na); + + gsl_test (max_index != expected_max_index, + NAME(gsl_stats) "_minmax_index max (%u observed vs %u expected)", + max_index, expected_max_index); + gsl_test (min_index != expected_min_index, + NAME(gsl_stats) "_minmax_index min (%u observed vs %u expected)", + min_index, expected_min_index); + } + + + sorted = (BASE *) malloc(stridea * na * sizeof(BASE)) ; + + for (i = 0 ; i < na ; i++) + sorted[stridea * i] = groupa[stridea * i] ; + + TYPE(gsl_sort)(sorted, stridea, na) ; + + { + double median = FUNCTION(gsl_stats,median_from_sorted_data)(sorted, stridea, na) ; + double expected = 0.07505; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_median_from_sorted_data (even)"); + } + + { + double median = FUNCTION(gsl_stats,median_from_sorted_data)(sorted, stridea, na - 1) ; + double expected = 0.0728; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_median_from_sorted_data"); + } + + + { + double zeroth = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, na, 0.0) ; + double expected = 0.0242; + gsl_test_rel (zeroth,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (0)"); + } + + { + double top = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, na, 1.0) ; + double expected = 0.1331; + gsl_test_rel (top,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (100)"); + } + + { + double median = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, na, 0.5) ; + double expected = 0.07505; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (50even)"); + } + + { + double median = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, na - 1, 0.5); + double expected = 0.0728; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (50odd)"); + + } + + /* Test for IEEE handling - set third element to NaN */ + + groupa [3*stridea] = GSL_NAN; + + { + BASE max = FUNCTION(gsl_stats,max) (groupa, stridea, na); + BASE expected = GSL_NAN; + gsl_test (!isnan(max), + NAME(gsl_stats) "_max NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + max, expected); + } + + { + BASE min = FUNCTION(gsl_stats,min) (groupa, stridea, na); + BASE expected = GSL_NAN; + gsl_test (!isnan(min), + NAME(gsl_stats) "_min NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected); + } + + { + BASE min, max; + BASE expected_max = GSL_NAN; + BASE expected_min = GSL_NAN; + + FUNCTION(gsl_stats,minmax) (&min, &max, groupa, stridea, na); + + gsl_test (!isnan(max), + NAME(gsl_stats) "_minmax max NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + max, expected_max); + gsl_test (!isnan(min), + NAME(gsl_stats) "_minmax min NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected_min); + } + +#ifdef FAST + { + BASE min, max; + BASE expected_max = GSL_NAN; + BASE expected_min = GSL_NAN; + + FUNCTION(gsl_stats,minmax) (&min, &max, groupa, stridea, na-1); + + gsl_test (!isnan(max), + NAME(gsl_stats) "_minmax(-1) max NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + max, expected_max); + gsl_test (!isnan(min), + NAME(gsl_stats) "_minmax(-1) min NaN (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected_min); + } +#endif + + + { + int max_index = FUNCTION(gsl_stats,max_index) (groupa, stridea, na); + int expected = 3; + gsl_test (max_index != expected, + NAME(gsl_stats) "_max_index NaN (%d observed vs %d expected)", + max_index, expected); + } + + { + int min_index = FUNCTION(gsl_stats,min_index) (groupa, stridea, na); + int expected = 3; + gsl_test (min_index != expected, + NAME(gsl_stats) "_min_index NaN (%d observed vs %d expected)", + min_index, expected); + } + + { + size_t min_index, max_index; + size_t expected_max_index = 3; + size_t expected_min_index = 3; + + FUNCTION(gsl_stats,minmax_index) (&min_index, &max_index, groupa, stridea, na); + + gsl_test (max_index != expected_max_index, + NAME(gsl_stats) "_minmax_index max NaN (%u observed vs %u expected)", + max_index, expected_max_index); + gsl_test (min_index != expected_min_index, + NAME(gsl_stats) "_minmax_index min NaN (%u observed vs %u expected)", + min_index, expected_min_index); + } + + free (sorted); + free (groupa); + free (groupb); + free (w); + +} diff --git a/software/gsl-1.15/statistics/test_int_source.c b/software/gsl-1.15/statistics/test_int_source.c new file mode 100644 index 000000000..9ac537b77 --- /dev/null +++ b/software/gsl-1.15/statistics/test_int_source.c @@ -0,0 +1,258 @@ +/* statistics/test_int_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (const size_t stridea, const size_t strideb); + +void +FUNCTION (test, func) (const size_t stridea, const size_t strideb) +{ + /* sample sets of integers */ + size_t i; + const size_t ina = 20, inb = 20; + + const BASE raw1[] = {1, 2, 3, 4, 5, 6} ; + + const BASE irawa[] = + {17, 18, 16, 18, 12, + 20, 18, 20, 20, 22, + 20, 10, 8, 12, 16, + 16, 18, 20, 18, 21}; + + const BASE irawb[] = + {19, 20, 22, 24, 10, + 25, 20, 22, 21, 23, + 20, 10, 12, 14, 12, + 20, 22, 24, 23, 17}; + + BASE * sorted ; + + BASE * test1 = (BASE *) malloc (stridea * 6 * sizeof(BASE)); + BASE * igroupa = (BASE *) malloc (stridea * ina * sizeof(BASE)); + BASE * igroupb = (BASE *) malloc (strideb * inb * sizeof(BASE)); + + double rel = 1e-10 ; + + for (i = 0 ; i < ina ; i++) + igroupa[i * stridea] = irawa[i] ; + + for (i = 0 ; i < inb ; i++) + igroupb[i * strideb] = irawb[i] ; + + for (i = 0 ; i < 6 ; i++) + test1[i * stridea] = raw1[i] ; + + + + { + double mean = FUNCTION(gsl_stats,mean) (igroupa, stridea, ina); + double expected = 17.0; + gsl_test_rel (mean,expected, rel, NAME(gsl_stats) "_mean (integer)"); + } + + { + double mean = FUNCTION(gsl_stats,mean) (test1, stridea, 6); + double expected = 3.5; + gsl_test_rel (mean,expected, rel, NAME(gsl_stats) "_mean (fractional)"); + } + + { + double mean = FUNCTION(gsl_stats,mean) (igroupa, stridea, ina); + double var = FUNCTION(gsl_stats,variance_with_fixed_mean) (igroupa, stridea, ina, mean); + double expected = 13.7; + gsl_test_rel (var, expected, rel, NAME(gsl_stats) "_variance_with_fixed_mean"); + } + + { + double mean = FUNCTION(gsl_stats,mean) (igroupa, stridea, ina); + double sd = FUNCTION(gsl_stats,sd_with_fixed_mean) (igroupa, stridea, ina, mean); + double expected = 3.70135110466435; + gsl_test_rel (sd, expected, rel, NAME(gsl_stats) "_sd_with_fixed_mean"); + } + + { + double var = FUNCTION(gsl_stats,variance) (igroupa, stridea, ina); + double expected = 14.4210526315789; + gsl_test_rel (var, expected, rel, NAME(gsl_stats) "_variance"); + } + + { + double sd_est = FUNCTION(gsl_stats,sd) (igroupa, stridea, ina); + double expected = 3.79750610685209; + gsl_test_rel (sd_est, expected, rel, NAME(gsl_stats) "_sd"); + } + + { + double absdev = FUNCTION(gsl_stats,absdev) (igroupa, stridea, ina); + double expected = 2.9; + gsl_test_rel (absdev, expected, rel, NAME(gsl_stats) "_absdev"); + } + + { + double skew = FUNCTION(gsl_stats,skew) (igroupa, stridea, ina); + double expected = -0.909355923168064; + gsl_test_rel (skew, expected, rel, NAME(gsl_stats) "_skew"); + } + + { + double kurt = FUNCTION(gsl_stats,kurtosis) (igroupa, stridea, ina); + double expected = -0.233692524908094 ; + gsl_test_rel (kurt, expected, rel, NAME(gsl_stats) "_kurtosis"); + } + + { + double c = FUNCTION(gsl_stats,covariance) (igroupa, stridea, igroupb, strideb, inb); + double expected = 14.5263157894737; + gsl_test_rel (c, expected, rel, NAME(gsl_stats) "_covariance"); + } + + { + double r = FUNCTION(gsl_stats,correlation) (igroupa, stridea, igroupb, strideb, inb); + double expected = 0.793090350710101; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_correlation"); + } + + { + double pv = FUNCTION(gsl_stats,pvariance) (igroupa, stridea, ina, igroupb, strideb, inb); + double expected = 18.8421052631579; + gsl_test_rel (pv, expected, rel, NAME(gsl_stats) "_pvariance"); + } + + { + double t = FUNCTION(gsl_stats,ttest) (igroupa, stridea, ina, igroupb, strideb, inb); + double expected = -1.45701922702927; + gsl_test_rel (t, expected, rel, NAME(gsl_stats) "_ttest"); + } + + { + int max = FUNCTION(gsl_stats,max) (igroupa, stridea, ina); + int expected = 22; + gsl_test (max != expected, + NAME(gsl_stats) "_max (%d observed vs %d expected)", max, expected); + } + + { + int min = FUNCTION(gsl_stats,min) (igroupa, stridea, ina); + int expected = 8; + gsl_test (min != expected, + NAME(gsl_stats) "_min (%d observed vs %d expected)", min, expected); + } + + { + BASE min, max; + BASE expected_max = 22; + BASE expected_min = 8; + + FUNCTION(gsl_stats,minmax) (&min, &max, igroupa, stridea, ina); + + gsl_test (max != expected_max, + NAME(gsl_stats) "_minmax max (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + max, expected_max); + gsl_test (min != expected_min, + NAME(gsl_stats) "_minmax min (" OUT_FORMAT " observed vs " OUT_FORMAT " expected)", + min, expected_min); + } + + { + int max_index = FUNCTION(gsl_stats,max_index) (igroupa, stridea, ina); + int expected = 9 ; + gsl_test (max_index != expected, + NAME(gsl_stats) "_max_index (%d observed vs %d expected)", + max_index, expected); + } + + { + int min_index = FUNCTION(gsl_stats,min_index) (igroupa, stridea, ina); + int expected = 12 ; + gsl_test (min_index != expected, + NAME(gsl_stats) "_min_index (%d observed vs %d expected)", + min_index, expected); + } + + { + size_t min_index, max_index; + size_t expected_max_index = 9; + size_t expected_min_index = 12; + + FUNCTION(gsl_stats,minmax_index) (&min_index, &max_index, igroupa, stridea, ina); + + gsl_test (max_index != expected_max_index, + NAME(gsl_stats) "_minmax_index max (%u observed vs %u expected)", + max_index, expected_max_index); + gsl_test (min_index != expected_min_index, + NAME(gsl_stats) "_minmax_index min (%u observed vs %u expected)", + min_index, expected_min_index); + } + + + sorted = (BASE *) malloc(stridea * ina * sizeof(BASE)) ; + + for (i = 0 ; i < ina ; i++) + sorted[stridea * i] = igroupa[stridea * i] ; + + + TYPE(gsl_sort)(sorted, stridea, ina) ; + + { + double median = FUNCTION(gsl_stats,median_from_sorted_data)(sorted, stridea, ina) ; + double expected = 18; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_median_from_sorted_data (even)"); + } + + { + double median = FUNCTION(gsl_stats,median_from_sorted_data)(sorted, stridea, ina - 1) ; + double expected = 18; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_median_from_sorted_data (odd)"); + } + + + { + double zeroth = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, ina, 0.0) ; + double expected = 8; + gsl_test_rel (zeroth,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (0)"); + } + + { + double top = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, ina, 1.0) ; + double expected = 22; + gsl_test_rel (top,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (100)"); + } + + { + double median = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, ina, 0.5) ; + double expected = 18; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (50, even)"); + } + + { + double median = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, ina - 1, 0.5); + double expected = 18; + gsl_test_rel (median,expected, rel, + NAME(gsl_stats) "_quantile_from_sorted_data (50, odd)"); + } + + free (sorted); + free (igroupa); + free (igroupb); + free (test1); +} diff --git a/software/gsl-1.15/statistics/test_nist.c b/software/gsl-1.15/statistics/test_nist.c new file mode 100644 index 000000000..30b8ecc56 --- /dev/null +++ b/software/gsl-1.15/statistics/test_nist.c @@ -0,0 +1,503 @@ +/* statistics/test_nist.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* These tests are based on the NIST Statistical Reference Datasets + See http://www.nist.gov/itl/div898/strd/index.html for more + information. */ + +#include +#include +#include + +#include +#include +#include + +int +test_nist (void) +{ + size_t i ; + + const size_t nlew = 200 ; + + const double lew[200] = { + -213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, 194, + -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, -175, + 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, -541, + -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, 131, + -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, -472, -338, + 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, 162, -430, + -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, -465, 156, + -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, -44, -577, + -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, 134, -28, + -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, -568, -160, + 172, -414, -408, 188, -125, -572, -32, 139, -492, -321, 205, -262, + -504, 142, -83, -574, 0, 48, -571, -106, 137, -501, -266, 190, + -391, -406, 194, -186, -553, 83, -13, -577, -49, 103, -515, -280, + 201, 300, -506, 131, -45, -578, -80, 138, -462, -361, 201, -211, + -554, 32, 74, -533, -235, 187, -372, -442, 182, -147, -566, 25, + 68, -535, -244, 194, -351, -463, 174, -125, -570, 15, 72, -550, + -190, 172, -424, -385, 198, -218, -536, 96 } ; + + const size_t nlottery = 218 ; + + const double lottery[218] = { + 162, 671, 933, 414, 788, 730, 817, 33, 536, 875, 670, 236, 473, 167, + 877, 980, 316, 950, 456, 92, 517, 557, 956, 954, 104, 178, 794, 278, + 147, 773, 437, 435, 502, 610, 582, 780, 689, 562, 964, 791, 28, 97, + 848, 281, 858, 538, 660, 972, 671, 613, 867, 448, 738, 966, 139, 636, + 847, 659, 754, 243, 122, 455, 195, 968, 793, 59, 730, 361, 574, 522, + 97, 762, 431, 158, 429, 414, 22, 629, 788, 999, 187, 215, 810, 782, + 47, 34, 108, 986, 25, 644, 829, 630, 315, 567, 919, 331, 207, 412, + 242, 607, 668, 944, 749, 168, 864, 442, 533, 805, 372, 63, 458, 777, + 416, 340, 436, 140, 919, 350, 510, 572, 905, 900, 85, 389, 473, 758, + 444, 169, 625, 692, 140, 897, 672, 288, 312, 860, 724, 226, 884, 508, + 976, 741, 476, 417, 831, 15, 318, 432, 241, 114, 799, 955, 833, 358, + 935, 146, 630, 830, 440, 642, 356, 373, 271, 715, 367, 393, 190, 669, + 8, 861, 108, 795, 269, 590, 326, 866, 64, 523, 862, 840, 219, 382, + 998, 4, 628, 305, 747, 247, 34, 747, 729, 645, 856, 974, 24, 568, 24, + 694, 608, 480, 410, 729, 947, 293, 53, 930, 223, 203, 677, 227, 62, + 455, 387, 318, 562, 242, 428, 968 } ; + + const size_t nmavro = 50 ; + + const double mavro[50] = { + 2.00180, 2.00170, 2.00180, 2.00190, 2.00180, 2.00170, 2.00150, + 2.00140, 2.00150, 2.00150, 2.00170, 2.00180, 2.00180, 2.00190, + 2.00190, 2.00210, 2.00200, 2.00160, 2.00140, 2.00130, 2.00130, + 2.00150, 2.00150, 2.00160, 2.00150, 2.00140, 2.00130, 2.00140, + 2.00150, 2.00140, 2.00150, 2.00160, 2.00150, 2.00160, 2.00190, + 2.00200, 2.00200, 2.00210, 2.00220, 2.00230, 2.00240, 2.00250, + 2.00270, 2.00260, 2.00260, 2.00260, 2.00270, 2.00260, 2.00250, + 2.00240 } ; + + const size_t nmichelson = 100 ; + + const double michelson [100] = { + 299.85, 299.74, 299.90, 300.07, 299.93, 299.85, 299.95, 299.98, + 299.98, 299.88, 300.00, 299.98, 299.93, 299.65, 299.76, 299.81, + 300.00, 300.00, 299.96, 299.96, 299.96, 299.94, 299.96, 299.94, + 299.88, 299.80, 299.85, 299.88, 299.90, 299.84, 299.83, 299.79, + 299.81, 299.88, 299.88, 299.83, 299.80, 299.79, 299.76, 299.80, + 299.88, 299.88, 299.88, 299.86, 299.72, 299.72, 299.62, 299.86, + 299.97, 299.95, 299.88, 299.91, 299.85, 299.87, 299.84, 299.84, + 299.85, 299.84, 299.84, 299.84, 299.89, 299.81, 299.81, 299.82, + 299.80, 299.77, 299.76, 299.74, 299.75, 299.76, 299.91, 299.92, + 299.89, 299.86, 299.88, 299.72, 299.84, 299.85, 299.85, 299.78, + 299.89, 299.84, 299.78, 299.81, 299.76, 299.81, 299.79, 299.81, + 299.82, 299.85, 299.87, 299.87, 299.81, 299.74, 299.81, 299.94, + 299.95, 299.80, 299.81, 299.87 } ; + + const size_t npidigits = 5000 ; + const double pidigits [5000] = { 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, + 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, + 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, + 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, + 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7, + 9, 8, 2, 1, 4, 8, 0, 8, 6, 5, 1, 3, 2, 8, 2, 3, 0, 6, 6, 4, 7, 0, + 9, 3, 8, 4, 4, 6, 0, 9, 5, 5, 0, 5, 8, 2, 2, 3, 1, 7, 2, 5, 3, 5, + 9, 4, 0, 8, 1, 2, 8, 4, 8, 1, 1, 1, 7, 4, 5, 0, 2, 8, 4, 1, 0, 2, + 7, 0, 1, 9, 3, 8, 5, 2, 1, 1, 0, 5, 5, 5, 9, 6, 4, 4, 6, 2, 2, 9, + 4, 8, 9, 5, 4, 9, 3, 0, 3, 8, 1, 9, 6, 4, 4, 2, 8, 8, 1, 0, 9, 7, + 5, 6, 6, 5, 9, 3, 3, 4, 4, 6, 1, 2, 8, 4, 7, 5, 6, 4, 8, 2, 3, 3, + 7, 8, 6, 7, 8, 3, 1, 6, 5, 2, 7, 1, 2, 0, 1, 9, 0, 9, 1, 4, 5, 6, + 4, 8, 5, 6, 6, 9, 2, 3, 4, 6, 0, 3, 4, 8, 6, 1, 0, 4, 5, 4, 3, 2, + 6, 6, 4, 8, 2, 1, 3, 3, 9, 3, 6, 0, 7, 2, 6, 0, 2, 4, 9, 1, 4, 1, + 2, 7, 3, 7, 2, 4, 5, 8, 7, 0, 0, 6, 6, 0, 6, 3, 1, 5, 5, 8, 8, 1, + 7, 4, 8, 8, 1, 5, 2, 0, 9, 2, 0, 9, 6, 2, 8, 2, 9, 2, 5, 4, 0, 9, + 1, 7, 1, 5, 3, 6, 4, 3, 6, 7, 8, 9, 2, 5, 9, 0, 3, 6, 0, 0, 1, 1, + 3, 3, 0, 5, 3, 0, 5, 4, 8, 8, 2, 0, 4, 6, 6, 5, 2, 1, 3, 8, 4, 1, + 4, 6, 9, 5, 1, 9, 4, 1, 5, 1, 1, 6, 0, 9, 4, 3, 3, 0, 5, 7, 2, 7, + 0, 3, 6, 5, 7, 5, 9, 5, 9, 1, 9, 5, 3, 0, 9, 2, 1, 8, 6, 1, 1, 7, + 3, 8, 1, 9, 3, 2, 6, 1, 1, 7, 9, 3, 1, 0, 5, 1, 1, 8, 5, 4, 8, 0, + 7, 4, 4, 6, 2, 3, 7, 9, 9, 6, 2, 7, 4, 9, 5, 6, 7, 3, 5, 1, 8, 8, + 5, 7, 5, 2, 7, 2, 4, 8, 9, 1, 2, 2, 7, 9, 3, 8, 1, 8, 3, 0, 1, 1, + 9, 4, 9, 1, 2, 9, 8, 3, 3, 6, 7, 3, 3, 6, 2, 4, 4, 0, 6, 5, 6, 6, + 4, 3, 0, 8, 6, 0, 2, 1, 3, 9, 4, 9, 4, 6, 3, 9, 5, 2, 2, 4, 7, 3, + 7, 1, 9, 0, 7, 0, 2, 1, 7, 9, 8, 6, 0, 9, 4, 3, 7, 0, 2, 7, 7, 0, + 5, 3, 9, 2, 1, 7, 1, 7, 6, 2, 9, 3, 1, 7, 6, 7, 5, 2, 3, 8, 4, 6, + 7, 4, 8, 1, 8, 4, 6, 7, 6, 6, 9, 4, 0, 5, 1, 3, 2, 0, 0, 0, 5, 6, + 8, 1, 2, 7, 1, 4, 5, 2, 6, 3, 5, 6, 0, 8, 2, 7, 7, 8, 5, 7, 7, 1, + 3, 4, 2, 7, 5, 7, 7, 8, 9, 6, 0, 9, 1, 7, 3, 6, 3, 7, 1, 7, 8, 7, + 2, 1, 4, 6, 8, 4, 4, 0, 9, 0, 1, 2, 2, 4, 9, 5, 3, 4, 3, 0, 1, 4, + 6, 5, 4, 9, 5, 8, 5, 3, 7, 1, 0, 5, 0, 7, 9, 2, 2, 7, 9, 6, 8, 9, + 2, 5, 8, 9, 2, 3, 5, 4, 2, 0, 1, 9, 9, 5, 6, 1, 1, 2, 1, 2, 9, 0, + 2, 1, 9, 6, 0, 8, 6, 4, 0, 3, 4, 4, 1, 8, 1, 5, 9, 8, 1, 3, 6, 2, + 9, 7, 7, 4, 7, 7, 1, 3, 0, 9, 9, 6, 0, 5, 1, 8, 7, 0, 7, 2, 1, 1, + 3, 4, 9, 9, 9, 9, 9, 9, 8, 3, 7, 2, 9, 7, 8, 0, 4, 9, 9, 5, 1, 0, + 5, 9, 7, 3, 1, 7, 3, 2, 8, 1, 6, 0, 9, 6, 3, 1, 8, 5, 9, 5, 0, 2, + 4, 4, 5, 9, 4, 5, 5, 3, 4, 6, 9, 0, 8, 3, 0, 2, 6, 4, 2, 5, 2, 2, + 3, 0, 8, 2, 5, 3, 3, 4, 4, 6, 8, 5, 0, 3, 5, 2, 6, 1, 9, 3, 1, 1, + 8, 8, 1, 7, 1, 0, 1, 0, 0, 0, 3, 1, 3, 7, 8, 3, 8, 7, 5, 2, 8, 8, + 6, 5, 8, 7, 5, 3, 3, 2, 0, 8, 3, 8, 1, 4, 2, 0, 6, 1, 7, 1, 7, 7, + 6, 6, 9, 1, 4, 7, 3, 0, 3, 5, 9, 8, 2, 5, 3, 4, 9, 0, 4, 2, 8, 7, + 5, 5, 4, 6, 8, 7, 3, 1, 1, 5, 9, 5, 6, 2, 8, 6, 3, 8, 8, 2, 3, 5, + 3, 7, 8, 7, 5, 9, 3, 7, 5, 1, 9, 5, 7, 7, 8, 1, 8, 5, 7, 7, 3, 0, + 5, 3, 2, 1, 7, 1, 2, 2, 6, 8, 0, 6, 6, 1, 3, 0, 0, 1, 9, 2, 7, 8, + 7, 6, 6, 1, 1, 1, 9, 5, 9, 0, 9, 2, 1, 6, 4, 2, 0, 1, 9, 8, 9, 3, + 8, 0, 9, 5, 2, 5, 7, 2, 0, 1, 0, 6, 5, 4, 8, 5, 8, 6, 3, 2, 7, 8, + 8, 6, 5, 9, 3, 6, 1, 5, 3, 3, 8, 1, 8, 2, 7, 9, 6, 8, 2, 3, 0, 3, + 0, 1, 9, 5, 2, 0, 3, 5, 3, 0, 1, 8, 5, 2, 9, 6, 8, 9, 9, 5, 7, 7, + 3, 6, 2, 2, 5, 9, 9, 4, 1, 3, 8, 9, 1, 2, 4, 9, 7, 2, 1, 7, 7, 5, + 2, 8, 3, 4, 7, 9, 1, 3, 1, 5, 1, 5, 5, 7, 4, 8, 5, 7, 2, 4, 2, 4, + 5, 4, 1, 5, 0, 6, 9, 5, 9, 5, 0, 8, 2, 9, 5, 3, 3, 1, 1, 6, 8, 6, + 1, 7, 2, 7, 8, 5, 5, 8, 8, 9, 0, 7, 5, 0, 9, 8, 3, 8, 1, 7, 5, 4, + 6, 3, 7, 4, 6, 4, 9, 3, 9, 3, 1, 9, 2, 5, 5, 0, 6, 0, 4, 0, 0, 9, + 2, 7, 7, 0, 1, 6, 7, 1, 1, 3, 9, 0, 0, 9, 8, 4, 8, 8, 2, 4, 0, 1, + 2, 8, 5, 8, 3, 6, 1, 6, 0, 3, 5, 6, 3, 7, 0, 7, 6, 6, 0, 1, 0, 4, + 7, 1, 0, 1, 8, 1, 9, 4, 2, 9, 5, 5, 5, 9, 6, 1, 9, 8, 9, 4, 6, 7, + 6, 7, 8, 3, 7, 4, 4, 9, 4, 4, 8, 2, 5, 5, 3, 7, 9, 7, 7, 4, 7, 2, + 6, 8, 4, 7, 1, 0, 4, 0, 4, 7, 5, 3, 4, 6, 4, 6, 2, 0, 8, 0, 4, 6, + 6, 8, 4, 2, 5, 9, 0, 6, 9, 4, 9, 1, 2, 9, 3, 3, 1, 3, 6, 7, 7, 0, + 2, 8, 9, 8, 9, 1, 5, 2, 1, 0, 4, 7, 5, 2, 1, 6, 2, 0, 5, 6, 9, 6, + 6, 0, 2, 4, 0, 5, 8, 0, 3, 8, 1, 5, 0, 1, 9, 3, 5, 1, 1, 2, 5, 3, + 3, 8, 2, 4, 3, 0, 0, 3, 5, 5, 8, 7, 6, 4, 0, 2, 4, 7, 4, 9, 6, 4, + 7, 3, 2, 6, 3, 9, 1, 4, 1, 9, 9, 2, 7, 2, 6, 0, 4, 2, 6, 9, 9, 2, + 2, 7, 9, 6, 7, 8, 2, 3, 5, 4, 7, 8, 1, 6, 3, 6, 0, 0, 9, 3, 4, 1, + 7, 2, 1, 6, 4, 1, 2, 1, 9, 9, 2, 4, 5, 8, 6, 3, 1, 5, 0, 3, 0, 2, + 8, 6, 1, 8, 2, 9, 7, 4, 5, 5, 5, 7, 0, 6, 7, 4, 9, 8, 3, 8, 5, 0, + 5, 4, 9, 4, 5, 8, 8, 5, 8, 6, 9, 2, 6, 9, 9, 5, 6, 9, 0, 9, 2, 7, + 2, 1, 0, 7, 9, 7, 5, 0, 9, 3, 0, 2, 9, 5, 5, 3, 2, 1, 1, 6, 5, 3, + 4, 4, 9, 8, 7, 2, 0, 2, 7, 5, 5, 9, 6, 0, 2, 3, 6, 4, 8, 0, 6, 6, + 5, 4, 9, 9, 1, 1, 9, 8, 8, 1, 8, 3, 4, 7, 9, 7, 7, 5, 3, 5, 6, 6, + 3, 6, 9, 8, 0, 7, 4, 2, 6, 5, 4, 2, 5, 2, 7, 8, 6, 2, 5, 5, 1, 8, + 1, 8, 4, 1, 7, 5, 7, 4, 6, 7, 2, 8, 9, 0, 9, 7, 7, 7, 7, 2, 7, 9, + 3, 8, 0, 0, 0, 8, 1, 6, 4, 7, 0, 6, 0, 0, 1, 6, 1, 4, 5, 2, 4, 9, + 1, 9, 2, 1, 7, 3, 2, 1, 7, 2, 1, 4, 7, 7, 2, 3, 5, 0, 1, 4, 1, 4, + 4, 1, 9, 7, 3, 5, 6, 8, 5, 4, 8, 1, 6, 1, 3, 6, 1, 1, 5, 7, 3, 5, + 2, 5, 5, 2, 1, 3, 3, 4, 7, 5, 7, 4, 1, 8, 4, 9, 4, 6, 8, 4, 3, 8, + 5, 2, 3, 3, 2, 3, 9, 0, 7, 3, 9, 4, 1, 4, 3, 3, 3, 4, 5, 4, 7, 7, + 6, 2, 4, 1, 6, 8, 6, 2, 5, 1, 8, 9, 8, 3, 5, 6, 9, 4, 8, 5, 5, 6, + 2, 0, 9, 9, 2, 1, 9, 2, 2, 2, 1, 8, 4, 2, 7, 2, 5, 5, 0, 2, 5, 4, + 2, 5, 6, 8, 8, 7, 6, 7, 1, 7, 9, 0, 4, 9, 4, 6, 0, 1, 6, 5, 3, 4, + 6, 6, 8, 0, 4, 9, 8, 8, 6, 2, 7, 2, 3, 2, 7, 9, 1, 7, 8, 6, 0, 8, + 5, 7, 8, 4, 3, 8, 3, 8, 2, 7, 9, 6, 7, 9, 7, 6, 6, 8, 1, 4, 5, 4, + 1, 0, 0, 9, 5, 3, 8, 8, 3, 7, 8, 6, 3, 6, 0, 9, 5, 0, 6, 8, 0, 0, + 6, 4, 2, 2, 5, 1, 2, 5, 2, 0, 5, 1, 1, 7, 3, 9, 2, 9, 8, 4, 8, 9, + 6, 0, 8, 4, 1, 2, 8, 4, 8, 8, 6, 2, 6, 9, 4, 5, 6, 0, 4, 2, 4, 1, + 9, 6, 5, 2, 8, 5, 0, 2, 2, 2, 1, 0, 6, 6, 1, 1, 8, 6, 3, 0, 6, 7, + 4, 4, 2, 7, 8, 6, 2, 2, 0, 3, 9, 1, 9, 4, 9, 4, 5, 0, 4, 7, 1, 2, + 3, 7, 1, 3, 7, 8, 6, 9, 6, 0, 9, 5, 6, 3, 6, 4, 3, 7, 1, 9, 1, 7, + 2, 8, 7, 4, 6, 7, 7, 6, 4, 6, 5, 7, 5, 7, 3, 9, 6, 2, 4, 1, 3, 8, + 9, 0, 8, 6, 5, 8, 3, 2, 6, 4, 5, 9, 9, 5, 8, 1, 3, 3, 9, 0, 4, 7, + 8, 0, 2, 7, 5, 9, 0, 0, 9, 9, 4, 6, 5, 7, 6, 4, 0, 7, 8, 9, 5, 1, + 2, 6, 9, 4, 6, 8, 3, 9, 8, 3, 5, 2, 5, 9, 5, 7, 0, 9, 8, 2, 5, 8, + 2, 2, 6, 2, 0, 5, 2, 2, 4, 8, 9, 4, 0, 7, 7, 2, 6, 7, 1, 9, 4, 7, + 8, 2, 6, 8, 4, 8, 2, 6, 0, 1, 4, 7, 6, 9, 9, 0, 9, 0, 2, 6, 4, 0, + 1, 3, 6, 3, 9, 4, 4, 3, 7, 4, 5, 5, 3, 0, 5, 0, 6, 8, 2, 0, 3, 4, + 9, 6, 2, 5, 2, 4, 5, 1, 7, 4, 9, 3, 9, 9, 6, 5, 1, 4, 3, 1, 4, 2, + 9, 8, 0, 9, 1, 9, 0, 6, 5, 9, 2, 5, 0, 9, 3, 7, 2, 2, 1, 6, 9, 6, + 4, 6, 1, 5, 1, 5, 7, 0, 9, 8, 5, 8, 3, 8, 7, 4, 1, 0, 5, 9, 7, 8, + 8, 5, 9, 5, 9, 7, 7, 2, 9, 7, 5, 4, 9, 8, 9, 3, 0, 1, 6, 1, 7, 5, + 3, 9, 2, 8, 4, 6, 8, 1, 3, 8, 2, 6, 8, 6, 8, 3, 8, 6, 8, 9, 4, 2, + 7, 7, 4, 1, 5, 5, 9, 9, 1, 8, 5, 5, 9, 2, 5, 2, 4, 5, 9, 5, 3, 9, + 5, 9, 4, 3, 1, 0, 4, 9, 9, 7, 2, 5, 2, 4, 6, 8, 0, 8, 4, 5, 9, 8, + 7, 2, 7, 3, 6, 4, 4, 6, 9, 5, 8, 4, 8, 6, 5, 3, 8, 3, 6, 7, 3, 6, + 2, 2, 2, 6, 2, 6, 0, 9, 9, 1, 2, 4, 6, 0, 8, 0, 5, 1, 2, 4, 3, 8, + 8, 4, 3, 9, 0, 4, 5, 1, 2, 4, 4, 1, 3, 6, 5, 4, 9, 7, 6, 2, 7, 8, + 0, 7, 9, 7, 7, 1, 5, 6, 9, 1, 4, 3, 5, 9, 9, 7, 7, 0, 0, 1, 2, 9, + 6, 1, 6, 0, 8, 9, 4, 4, 1, 6, 9, 4, 8, 6, 8, 5, 5, 5, 8, 4, 8, 4, + 0, 6, 3, 5, 3, 4, 2, 2, 0, 7, 2, 2, 2, 5, 8, 2, 8, 4, 8, 8, 6, 4, + 8, 1, 5, 8, 4, 5, 6, 0, 2, 8, 5, 0, 6, 0, 1, 6, 8, 4, 2, 7, 3, 9, + 4, 5, 2, 2, 6, 7, 4, 6, 7, 6, 7, 8, 8, 9, 5, 2, 5, 2, 1, 3, 8, 5, + 2, 2, 5, 4, 9, 9, 5, 4, 6, 6, 6, 7, 2, 7, 8, 2, 3, 9, 8, 6, 4, 5, + 6, 5, 9, 6, 1, 1, 6, 3, 5, 4, 8, 8, 6, 2, 3, 0, 5, 7, 7, 4, 5, 6, + 4, 9, 8, 0, 3, 5, 5, 9, 3, 6, 3, 4, 5, 6, 8, 1, 7, 4, 3, 2, 4, 1, + 1, 2, 5, 1, 5, 0, 7, 6, 0, 6, 9, 4, 7, 9, 4, 5, 1, 0, 9, 6, 5, 9, + 6, 0, 9, 4, 0, 2, 5, 2, 2, 8, 8, 7, 9, 7, 1, 0, 8, 9, 3, 1, 4, 5, + 6, 6, 9, 1, 3, 6, 8, 6, 7, 2, 2, 8, 7, 4, 8, 9, 4, 0, 5, 6, 0, 1, + 0, 1, 5, 0, 3, 3, 0, 8, 6, 1, 7, 9, 2, 8, 6, 8, 0, 9, 2, 0, 8, 7, + 4, 7, 6, 0, 9, 1, 7, 8, 2, 4, 9, 3, 8, 5, 8, 9, 0, 0, 9, 7, 1, 4, + 9, 0, 9, 6, 7, 5, 9, 8, 5, 2, 6, 1, 3, 6, 5, 5, 4, 9, 7, 8, 1, 8, + 9, 3, 1, 2, 9, 7, 8, 4, 8, 2, 1, 6, 8, 2, 9, 9, 8, 9, 4, 8, 7, 2, + 2, 6, 5, 8, 8, 0, 4, 8, 5, 7, 5, 6, 4, 0, 1, 4, 2, 7, 0, 4, 7, 7, + 5, 5, 5, 1, 3, 2, 3, 7, 9, 6, 4, 1, 4, 5, 1, 5, 2, 3, 7, 4, 6, 2, + 3, 4, 3, 6, 4, 5, 4, 2, 8, 5, 8, 4, 4, 4, 7, 9, 5, 2, 6, 5, 8, 6, + 7, 8, 2, 1, 0, 5, 1, 1, 4, 1, 3, 5, 4, 7, 3, 5, 7, 3, 9, 5, 2, 3, + 1, 1, 3, 4, 2, 7, 1, 6, 6, 1, 0, 2, 1, 3, 5, 9, 6, 9, 5, 3, 6, 2, + 3, 1, 4, 4, 2, 9, 5, 2, 4, 8, 4, 9, 3, 7, 1, 8, 7, 1, 1, 0, 1, 4, + 5, 7, 6, 5, 4, 0, 3, 5, 9, 0, 2, 7, 9, 9, 3, 4, 4, 0, 3, 7, 4, 2, + 0, 0, 7, 3, 1, 0, 5, 7, 8, 5, 3, 9, 0, 6, 2, 1, 9, 8, 3, 8, 7, 4, + 4, 7, 8, 0, 8, 4, 7, 8, 4, 8, 9, 6, 8, 3, 3, 2, 1, 4, 4, 5, 7, 1, + 3, 8, 6, 8, 7, 5, 1, 9, 4, 3, 5, 0, 6, 4, 3, 0, 2, 1, 8, 4, 5, 3, + 1, 9, 1, 0, 4, 8, 4, 8, 1, 0, 0, 5, 3, 7, 0, 6, 1, 4, 6, 8, 0, 6, + 7, 4, 9, 1, 9, 2, 7, 8, 1, 9, 1, 1, 9, 7, 9, 3, 9, 9, 5, 2, 0, 6, + 1, 4, 1, 9, 6, 6, 3, 4, 2, 8, 7, 5, 4, 4, 4, 0, 6, 4, 3, 7, 4, 5, + 1, 2, 3, 7, 1, 8, 1, 9, 2, 1, 7, 9, 9, 9, 8, 3, 9, 1, 0, 1, 5, 9, + 1, 9, 5, 6, 1, 8, 1, 4, 6, 7, 5, 1, 4, 2, 6, 9, 1, 2, 3, 9, 7, 4, + 8, 9, 4, 0, 9, 0, 7, 1, 8, 6, 4, 9, 4, 2, 3, 1, 9, 6, 1, 5, 6, 7, + 9, 4, 5, 2, 0, 8, 0, 9, 5, 1, 4, 6, 5, 5, 0, 2, 2, 5, 2, 3, 1, 6, + 0, 3, 8, 8, 1, 9, 3, 0, 1, 4, 2, 0, 9, 3, 7, 6, 2, 1, 3, 7, 8, 5, + 5, 9, 5, 6, 6, 3, 8, 9, 3, 7, 7, 8, 7, 0, 8, 3, 0, 3, 9, 0, 6, 9, + 7, 9, 2, 0, 7, 7, 3, 4, 6, 7, 2, 2, 1, 8, 2, 5, 6, 2, 5, 9, 9, 6, + 6, 1, 5, 0, 1, 4, 2, 1, 5, 0, 3, 0, 6, 8, 0, 3, 8, 4, 4, 7, 7, 3, + 4, 5, 4, 9, 2, 0, 2, 6, 0, 5, 4, 1, 4, 6, 6, 5, 9, 2, 5, 2, 0, 1, + 4, 9, 7, 4, 4, 2, 8, 5, 0, 7, 3, 2, 5, 1, 8, 6, 6, 6, 0, 0, 2, 1, + 3, 2, 4, 3, 4, 0, 8, 8, 1, 9, 0, 7, 1, 0, 4, 8, 6, 3, 3, 1, 7, 3, + 4, 6, 4, 9, 6, 5, 1, 4, 5, 3, 9, 0, 5, 7, 9, 6, 2, 6, 8, 5, 6, 1, + 0, 0, 5, 5, 0, 8, 1, 0, 6, 6, 5, 8, 7, 9, 6, 9, 9, 8, 1, 6, 3, 5, + 7, 4, 7, 3, 6, 3, 8, 4, 0, 5, 2, 5, 7, 1, 4, 5, 9, 1, 0, 2, 8, 9, + 7, 0, 6, 4, 1, 4, 0, 1, 1, 0, 9, 7, 1, 2, 0, 6, 2, 8, 0, 4, 3, 9, + 0, 3, 9, 7, 5, 9, 5, 1, 5, 6, 7, 7, 1, 5, 7, 7, 0, 0, 4, 2, 0, 3, + 3, 7, 8, 6, 9, 9, 3, 6, 0, 0, 7, 2, 3, 0, 5, 5, 8, 7, 6, 3, 1, 7, + 6, 3, 5, 9, 4, 2, 1, 8, 7, 3, 1, 2, 5, 1, 4, 7, 1, 2, 0, 5, 3, 2, + 9, 2, 8, 1, 9, 1, 8, 2, 6, 1, 8, 6, 1, 2, 5, 8, 6, 7, 3, 2, 1, 5, + 7, 9, 1, 9, 8, 4, 1, 4, 8, 4, 8, 8, 2, 9, 1, 6, 4, 4, 7, 0, 6, 0, + 9, 5, 7, 5, 2, 7, 0, 6, 9, 5, 7, 2, 2, 0, 9, 1, 7, 5, 6, 7, 1, 1, + 6, 7, 2, 2, 9, 1, 0, 9, 8, 1, 6, 9, 0, 9, 1, 5, 2, 8, 0, 1, 7, 3, + 5, 0, 6, 7, 1, 2, 7, 4, 8, 5, 8, 3, 2, 2, 2, 8, 7, 1, 8, 3, 5, 2, + 0, 9, 3, 5, 3, 9, 6, 5, 7, 2, 5, 1, 2, 1, 0, 8, 3, 5, 7, 9, 1, 5, + 1, 3, 6, 9, 8, 8, 2, 0, 9, 1, 4, 4, 4, 2, 1, 0, 0, 6, 7, 5, 1, 0, + 3, 3, 4, 6, 7, 1, 1, 0, 3, 1, 4, 1, 2, 6, 7, 1, 1, 1, 3, 6, 9, 9, + 0, 8, 6, 5, 8, 5, 1, 6, 3, 9, 8, 3, 1, 5, 0, 1, 9, 7, 0, 1, 6, 5, + 1, 5, 1, 1, 6, 8, 5, 1, 7, 1, 4, 3, 7, 6, 5, 7, 6, 1, 8, 3, 5, 1, + 5, 5, 6, 5, 0, 8, 8, 4, 9, 0, 9, 9, 8, 9, 8, 5, 9, 9, 8, 2, 3, 8, + 7, 3, 4, 5, 5, 2, 8, 3, 3, 1, 6, 3, 5, 5, 0, 7, 6, 4, 7, 9, 1, 8, + 5, 3, 5, 8, 9, 3, 2, 2, 6, 1, 8, 5, 4, 8, 9, 6, 3, 2, 1, 3, 2, 9, + 3, 3, 0, 8, 9, 8, 5, 7, 0, 6, 4, 2, 0, 4, 6, 7, 5, 2, 5, 9, 0, 7, + 0, 9, 1, 5, 4, 8, 1, 4, 1, 6, 5, 4, 9, 8, 5, 9, 4, 6, 1, 6, 3, 7, + 1, 8, 0, 2, 7, 0, 9, 8, 1, 9, 9, 4, 3, 0, 9, 9, 2, 4, 4, 8, 8, 9, + 5, 7, 5, 7, 1, 2, 8, 2, 8, 9, 0, 5, 9, 2, 3, 2, 3, 3, 2, 6, 0, 9, + 7, 2, 9, 9, 7, 1, 2, 0, 8, 4, 4, 3, 3, 5, 7, 3, 2, 6, 5, 4, 8, 9, + 3, 8, 2, 3, 9, 1, 1, 9, 3, 2, 5, 9, 7, 4, 6, 3, 6, 6, 7, 3, 0, 5, + 8, 3, 6, 0, 4, 1, 4, 2, 8, 1, 3, 8, 8, 3, 0, 3, 2, 0, 3, 8, 2, 4, + 9, 0, 3, 7, 5, 8, 9, 8, 5, 2, 4, 3, 7, 4, 4, 1, 7, 0, 2, 9, 1, 3, + 2, 7, 6, 5, 6, 1, 8, 0, 9, 3, 7, 7, 3, 4, 4, 4, 0, 3, 0, 7, 0, 7, + 4, 6, 9, 2, 1, 1, 2, 0, 1, 9, 1, 3, 0, 2, 0, 3, 3, 0, 3, 8, 0, 1, + 9, 7, 6, 2, 1, 1, 0, 1, 1, 0, 0, 4, 4, 9, 2, 9, 3, 2, 1, 5, 1, 6, + 0, 8, 4, 2, 4, 4, 4, 8, 5, 9, 6, 3, 7, 6, 6, 9, 8, 3, 8, 9, 5, 2, + 2, 8, 6, 8, 4, 7, 8, 3, 1, 2, 3, 5, 5, 2, 6, 5, 8, 2, 1, 3, 1, 4, + 4, 9, 5, 7, 6, 8, 5, 7, 2, 6, 2, 4, 3, 3, 4, 4, 1, 8, 9, 3, 0, 3, + 9, 6, 8, 6, 4, 2, 6, 2, 4, 3, 4, 1, 0, 7, 7, 3, 2, 2, 6, 9, 7, 8, + 0, 2, 8, 0, 7, 3, 1, 8, 9, 1, 5, 4, 4, 1, 1, 0, 1, 0, 4, 4, 6, 8, + 2, 3, 2, 5, 2, 7, 1, 6, 2, 0, 1, 0, 5, 2, 6, 5, 2, 2, 7, 2, 1, 1, + 1, 6, 6, 0, 3, 9, 6, 6, 6, 5, 5, 7, 3, 0, 9, 2, 5, 4, 7, 1, 1, 0, + 5, 5, 7, 8, 5, 3, 7, 6, 3, 4, 6, 6, 8, 2, 0, 6, 5, 3, 1, 0, 9, 8, + 9, 6, 5, 2, 6, 9, 1, 8, 6, 2, 0, 5, 6, 4, 7, 6, 9, 3, 1, 2, 5, 7, + 0, 5, 8, 6, 3, 5, 6, 6, 2, 0, 1, 8, 5, 5, 8, 1, 0, 0, 7, 2, 9, 3, + 6, 0, 6, 5, 9, 8, 7, 6, 4, 8, 6, 1, 1, 7, 9, 1, 0, 4, 5, 3, 3, 4, + 8, 8, 5, 0, 3, 4, 6, 1, 1, 3, 6, 5, 7, 6, 8, 6, 7, 5, 3, 2, 4, 9, + 4, 4, 1, 6, 6, 8, 0, 3, 9, 6, 2, 6, 5, 7, 9, 7, 8, 7, 7, 1, 8, 5, + 5, 6, 0, 8, 4, 5, 5, 2, 9, 6, 5, 4, 1, 2, 6, 6, 5, 4, 0, 8, 5, 3, + 0, 6, 1, 4, 3, 4, 4, 4, 3, 1, 8, 5, 8, 6, 7, 6, 9, 7, 5, 1, 4, 5, + 6, 6, 1, 4, 0, 6, 8, 0, 0, 7, 0, 0, 2, 3, 7, 8, 7, 7, 6, 5, 9, 1, + 3, 4, 4, 0, 1, 7, 1, 2, 7, 4, 9, 4, 7, 0, 4, 2, 0, 5, 6, 2, 2, 3, + 0, 5, 3, 8, 9, 9, 4, 5, 6, 1, 3, 1, 4, 0, 7, 1, 1, 2, 7, 0, 0, 0, + 4, 0, 7, 8, 5, 4, 7, 3, 3, 2, 6, 9, 9, 3, 9, 0, 8, 1, 4, 5, 4, 6, + 6, 4, 6, 4, 5, 8, 8, 0, 7, 9, 7, 2, 7, 0, 8, 2, 6, 6, 8, 3, 0, 6, + 3, 4, 3, 2, 8, 5, 8, 7, 8, 5, 6, 9, 8, 3, 0, 5, 2, 3, 5, 8, 0, 8, + 9, 3, 3, 0, 6, 5, 7, 5, 7, 4, 0, 6, 7, 9, 5, 4, 5, 7, 1, 6, 3, 7, + 7, 5, 2, 5, 4, 2, 0, 2, 1, 1, 4, 9, 5, 5, 7, 6, 1, 5, 8, 1, 4, 0, + 0, 2, 5, 0, 1, 2, 6, 2, 2, 8, 5, 9, 4, 1, 3, 0, 2, 1, 6, 4, 7, 1, + 5, 5, 0, 9, 7, 9, 2, 5, 9, 2, 3, 0, 9, 9, 0, 7, 9, 6, 5, 4, 7, 3, + 7, 6, 1, 2, 5, 5, 1, 7, 6, 5, 6, 7, 5, 1, 3, 5, 7, 5, 1, 7, 8, 2, + 9, 6, 6, 6, 4, 5, 4, 7, 7, 9, 1, 7, 4, 5, 0, 1, 1, 2, 9, 9, 6, 1, + 4, 8, 9, 0, 3, 0, 4, 6, 3, 9, 9, 4, 7, 1, 3, 2, 9, 6, 2, 1, 0, 7, + 3, 4, 0, 4, 3, 7, 5, 1, 8, 9, 5, 7, 3, 5, 9, 6, 1, 4, 5, 8, 9, 0, + 1, 9, 3, 8, 9, 7, 1, 3, 1, 1, 1, 7, 9, 0, 4, 2, 9, 7, 8, 2, 8, 5, + 6, 4, 7, 5, 0, 3, 2, 0, 3, 1, 9, 8, 6, 9, 1, 5, 1, 4, 0, 2, 8, 7, + 0, 8, 0, 8, 5, 9, 9, 0, 4, 8, 0, 1, 0, 9, 4, 1, 2, 1, 4, 7, 2, 2, + 1, 3, 1, 7, 9, 4, 7, 6, 4, 7, 7, 7, 2, 6, 2, 2, 4, 1, 4, 2, 5, 4, + 8, 5, 4, 5, 4, 0, 3, 3, 2, 1, 5, 7, 1, 8, 5, 3, 0, 6, 1, 4, 2, 2, + 8, 8, 1, 3, 7, 5, 8, 5, 0, 4, 3, 0, 6, 3, 3, 2, 1, 7, 5, 1, 8, 2, + 9, 7, 9, 8, 6, 6, 2, 2, 3, 7, 1, 7, 2, 1, 5, 9, 1, 6, 0, 7, 7, 1, + 6, 6, 9, 2, 5, 4, 7, 4, 8, 7, 3, 8, 9, 8, 6, 6, 5, 4, 9, 4, 9, 4, + 5, 0, 1, 1, 4, 6, 5, 4, 0, 6, 2, 8, 4, 3, 3, 6, 6, 3, 9, 3, 7, 9, + 0, 0, 3, 9, 7, 6, 9, 2, 6, 5, 6, 7, 2, 1, 4, 6, 3, 8, 5, 3, 0, 6, + 7, 3, 6, 0, 9, 6, 5, 7, 1, 2, 0, 9, 1, 8, 0, 7, 6, 3, 8, 3, 2, 7, + 1, 6, 6, 4, 1, 6, 2, 7, 4, 8, 8, 8, 8, 0, 0, 7, 8, 6, 9, 2, 5, 6, + 0, 2, 9, 0, 2, 2, 8, 4, 7, 2, 1, 0, 4, 0, 3, 1, 7, 2, 1, 1, 8, 6, + 0, 8, 2, 0, 4, 1, 9, 0, 0, 0, 4, 2, 2, 9, 6, 6, 1, 7, 1, 1, 9, 6, + 3, 7, 7, 9, 2, 1, 3, 3, 7, 5, 7, 5, 1, 1, 4, 9, 5, 9, 5, 0, 1, 5, + 6, 6, 0, 4, 9, 6, 3, 1, 8, 6, 2, 9, 4, 7, 2, 6, 5, 4, 7, 3, 6, 4, + 2, 5, 2, 3, 0, 8, 1, 7, 7, 0, 3, 6, 7, 5, 1, 5, 9, 0, 6, 7, 3, 5, + 0, 2, 3, 5, 0, 7, 2, 8, 3, 5, 4, 0, 5, 6, 7, 0, 4, 0, 3, 8, 6, 7, + 4, 3, 5, 1, 3, 6, 2, 2, 2, 2, 4, 7, 7, 1, 5, 8, 9, 1, 5, 0, 4, 9, + 5, 3, 0, 9, 8, 4, 4, 4, 8, 9, 3, 3, 3, 0, 9, 6, 3, 4, 0, 8, 7, 8, + 0, 7, 6, 9, 3, 2, 5, 9, 9, 3, 9, 7, 8, 0, 5, 4, 1, 9, 3, 4, 1, 4, + 4, 7, 3, 7, 7, 4, 4, 1, 8, 4, 2, 6, 3, 1, 2, 9, 8, 6, 0, 8, 0, 9, + 9, 8, 8, 8, 6, 8, 7, 4, 1, 3, 2, 6, 0, 4, 7, 2 } ; + + + const size_t nacc1 = 3 ; + const double numacc1[3] = { 10000001, 10000003, 10000002 } ; + + const size_t nacc2 = 1001 ; + double numacc2[1001] ; + + const size_t nacc3 = 1001 ; + double numacc3[1001] ; + + const size_t nacc4 = 1001 ; + double numacc4[1001] ; + + numacc2[0] = 1.2 ; + numacc3[0] = 1000000.2 ; + numacc4[0] = 10000000.2 ; + + for (i = 1 ; i < 1000 ; i += 2) + { + numacc2[i] = 1.1 ; + numacc2[i+1] = 1.3 ; + numacc3[i] = 1000000.1 ; + numacc3[i+1] = 1000000.3 ; + numacc4[i] = 10000000.1 ; + numacc4[i+1] = 10000000.3 ; + } + + gsl_ieee_env_setup (); + + { + double mean = gsl_stats_mean (lew, 1, nlew); + double sd = gsl_stats_sd (lew, 1, nlew); + double lag1 = gsl_stats_lag1_autocorrelation (lew, 1, nlew); + + double expected_mean = -177.435000000000; + double expected_sd = 277.332168044316; + double expected_lag1 = -0.307304800605679; + + gsl_test_rel (mean, expected_mean, 1e-15, "lew gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-15, "lew gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-14, "lew autocorrelation") ; + } + + + { + double mean = gsl_stats_mean (lottery, 1, nlottery); + double sd = gsl_stats_sd (lottery, 1, nlottery); + double lag1 = gsl_stats_lag1_autocorrelation (lottery, 1, nlottery); + + double expected_mean = 518.958715596330; + double expected_sd = 291.699727470969; + double expected_lag1 = -0.120948622967393; + + gsl_test_rel (mean, expected_mean, 1e-15, "lottery gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-15, "lottery gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-14, "lottery autocorrelation") ; + } + + { + double mean = gsl_stats_mean (mavro, 1, nmavro); + double sd = gsl_stats_sd (mavro, 1, nmavro); + double lag1 = gsl_stats_lag1_autocorrelation (mavro, 1, nmavro); + + double expected_mean = 2.00185600000000; + double expected_sd = 0.000429123454003053; + double expected_lag1 = 0.937989183438248; + + gsl_test_rel (mean, expected_mean, 1e-15, "mavro gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-13, "mavro gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-13, "mavro autocorrelation") ; + } + + + { + double mean = gsl_stats_mean (michelson, 1, nmichelson); + double sd = gsl_stats_sd (michelson, 1, nmichelson); + double lag1 = gsl_stats_lag1_autocorrelation (michelson, 1, nmichelson); + + double expected_mean = 299.852400000000; + double expected_sd = 0.0790105478190518; + double expected_lag1 = 0.535199668621283; + + gsl_test_rel (mean, expected_mean, 1e-15, "michelson gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-13, "michelson gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-13, "michelson autocorrelation") ; + } + + { + double mean = gsl_stats_mean (pidigits, 1, npidigits); + double sd = gsl_stats_sd (pidigits, 1, npidigits); + double lag1 = gsl_stats_lag1_autocorrelation (pidigits, 1, npidigits); + + double expected_mean = 4.53480000000000; + double expected_sd = 2.86733906028871; + double expected_lag1 = -0.00355099287237972; + + gsl_test_rel (mean, expected_mean, 1e-14, "pidigits gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-15, "pidigits gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-14, "pidigits autocorrelation") ; + } + + { + double mean = gsl_stats_mean (numacc1, 1, nacc1); + double sd = gsl_stats_sd (numacc1, 1, nacc1); + double lag1 = gsl_stats_lag1_autocorrelation (numacc1, 1, nacc1); + + double expected_mean = 10000002; + double expected_sd = 1; + double expected_lag1 = -0.5; + + gsl_test_rel (mean, expected_mean, 1e-15, "acc1 gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-15, "acc1 gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-15, "acc1 autocorrelation") ; + } + + { + double mean = gsl_stats_mean (numacc2, 1, nacc2); + double sd = gsl_stats_sd (numacc2, 1, nacc2); + double lag1 = gsl_stats_lag1_autocorrelation (numacc2, 1, nacc2); + + double expected_mean = 1.2; + double expected_sd = 0.1; + double expected_lag1 = -0.999; + + gsl_test_rel (mean, expected_mean, 1e-15, "acc2 gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-15, "acc2 gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-10, "acc2 autocorrelation") ; + } + + { + double mean = gsl_stats_mean (numacc3, 1, nacc3); + double sd = gsl_stats_sd (numacc3, 1, nacc3); + double lag1 = gsl_stats_lag1_autocorrelation (numacc3, 1, nacc3); + + double expected_mean = 1000000.2; + double expected_sd = 0.1; + double expected_lag1 = -0.999; + + gsl_test_rel (mean, expected_mean, 1e-15, "acc3 gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-9, "acc3 gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-10, "acc3 autocorrelation") ; + } + + + { + double mean = gsl_stats_mean (numacc4, 1, nacc4); + double sd = gsl_stats_sd (numacc4, 1, nacc4); + double lag1 = gsl_stats_lag1_autocorrelation (numacc4, 1, nacc4); + + double expected_mean = 10000000.2; + double expected_sd = 0.1; + double expected_lag1 = -0.999; + + gsl_test_rel (mean, expected_mean, 1e-15, "acc4 gsl_stats_mean") ; + gsl_test_rel (sd, expected_sd, 1e-7, "acc4 gsl_stats_sd") ; + gsl_test_rel (lag1, expected_lag1, 1e-10, "acc4 autocorrelation") ; + } + + return 0; +} + + + + + + + diff --git a/software/gsl-1.15/statistics/ttest.c b/software/gsl-1.15/statistics/ttest.c new file mode 100644 index 000000000..3bc50da73 --- /dev/null +++ b/software/gsl-1.15/statistics/ttest.c @@ -0,0 +1,72 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "ttest_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/ttest_source.c b/software/gsl-1.15/statistics/ttest_source.c new file mode 100644 index 000000000..36997e4d9 --- /dev/null +++ b/software/gsl-1.15/statistics/ttest_source.c @@ -0,0 +1,42 @@ +/* statistics/ttest_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,ttest) (const BASE data1[], + const size_t stride1, const size_t n1, + const BASE data2[], + const size_t stride2, const size_t n2) +{ + /* runs a t-test between two datasets representing independent + samples. Tests to see if the difference between means of the + samples is different from zero */ + + /* find means for the two samples */ + const double mean1 = FUNCTION(gsl_stats,mean) (data1, stride1, n1); + const double mean2 = FUNCTION(gsl_stats,mean) (data2, stride2, n2); + + /* find pooled variance for the two samples */ + const double pv = FUNCTION(gsl_stats,pvariance) (data1, stride1, n1, data2, stride2, n2); + + /* calculate the t statistic */ + const double t = (mean1 - mean2) / (sqrt (pv * ((1.0 / n1) + (1.0 / n2)))); + + return t; +} + diff --git a/software/gsl-1.15/statistics/variance.c b/software/gsl-1.15/statistics/variance.c new file mode 100644 index 000000000..7c30a0ae0 --- /dev/null +++ b/software/gsl-1.15/statistics/variance.c @@ -0,0 +1,72 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "variance_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff --git a/software/gsl-1.15/statistics/variance_source.c b/software/gsl-1.15/statistics/variance_source.c new file mode 100644 index 000000000..3a5d643fc --- /dev/null +++ b/software/gsl-1.15/statistics/variance_source.c @@ -0,0 +1,128 @@ +/* statistics/variance_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static double +FUNCTION(compute,variance) (const BASE data[], const size_t stride, const size_t n, const double mean); + +static double +FUNCTION(compute,tss) (const BASE data[], const size_t stride, const size_t n, const double mean); + +static double +FUNCTION(compute,variance) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + /* takes a dataset and finds the variance */ + + long double variance = 0 ; + + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + const long double delta = (data[i * stride] - mean); + variance += (delta * delta - variance) / (i + 1); + } + + return variance ; +} + +static double +FUNCTION(compute,tss) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + /* takes a dataset and finds the sum of squares about the mean */ + + long double tss = 0 ; + + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + const long double delta = (data[i * stride] - mean); + tss += delta * delta; + } + + return tss ; +} + + +double +FUNCTION(gsl_stats,variance_with_fixed_mean) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + const double variance = FUNCTION(compute,variance) (data, stride, n, mean); + return variance; +} + +double +FUNCTION(gsl_stats,sd_with_fixed_mean) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + const double variance = FUNCTION(compute,variance) (data, stride, n, mean); + const double sd = sqrt (variance); + + return sd; +} + + + +double +FUNCTION(gsl_stats,variance_m) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + const double variance = FUNCTION(compute,variance) (data, stride, n, mean); + + return variance * ((double)n / (double)(n - 1)); +} + +double +FUNCTION(gsl_stats,sd_m) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + const double variance = FUNCTION(compute,variance) (data, stride, n, mean); + const double sd = sqrt (variance * ((double)n / (double)(n - 1))); + + return sd; +} + +double +FUNCTION(gsl_stats,variance) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean) (data, stride, n); + return FUNCTION(gsl_stats,variance_m)(data, stride, n, mean); +} + +double +FUNCTION(gsl_stats,sd) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean) (data, stride, n); + return FUNCTION(gsl_stats,sd_m) (data, stride, n, mean); +} + + +double +FUNCTION(gsl_stats,tss_m) (const BASE data[], const size_t stride, const size_t n, const double mean) +{ + const double tss = FUNCTION(compute,tss) (data, stride, n, mean); + + return tss; +} + +double +FUNCTION(gsl_stats,tss) (const BASE data[], const size_t stride, const size_t n) +{ + const double mean = FUNCTION(gsl_stats,mean) (data, stride, n); + return FUNCTION(gsl_stats,tss_m)(data, stride, n, mean); +} diff --git a/software/gsl-1.15/statistics/wabsdev.c b/software/gsl-1.15/statistics/wabsdev.c new file mode 100644 index 000000000..27e0e93fb --- /dev/null +++ b/software/gsl-1.15/statistics/wabsdev.c @@ -0,0 +1,21 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "wabsdev_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "wabsdev_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "wabsdev_source.c" +#include "templates_off.h" +#undef BASE_FLOAT diff --git a/software/gsl-1.15/statistics/wabsdev_source.c b/software/gsl-1.15/statistics/wabsdev_source.c new file mode 100644 index 000000000..18d7b97d0 --- /dev/null +++ b/software/gsl-1.15/statistics/wabsdev_source.c @@ -0,0 +1,51 @@ +/* statistics/wabsdev_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,wabsdev) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean)(w, wstride, data, stride, n); + return FUNCTION(gsl_stats,wabsdev_m)(w, wstride, data, stride, n, wmean); +} + +double +FUNCTION(gsl_stats,wabsdev_m) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + /* Compute the weighted absolute deviation of a dataset */ + + long double wabsdev = 0; + long double W = 0; + + size_t i; + + /* find the sum of the absolute deviations */ + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) { + const long double delta = fabs(data[i * stride] - wmean); + W += wi ; + wabsdev += (delta - wabsdev) * (wi / W); + } + } + + return wabsdev; +} + diff --git a/software/gsl-1.15/statistics/wkurtosis.c b/software/gsl-1.15/statistics/wkurtosis.c new file mode 100644 index 000000000..5b0e0a254 --- /dev/null +++ b/software/gsl-1.15/statistics/wkurtosis.c @@ -0,0 +1,21 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "wkurtosis_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "wkurtosis_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "wkurtosis_source.c" +#include "templates_off.h" +#undef BASE_FLOAT diff --git a/software/gsl-1.15/statistics/wkurtosis_source.c b/software/gsl-1.15/statistics/wkurtosis_source.c new file mode 100644 index 000000000..f02615d00 --- /dev/null +++ b/software/gsl-1.15/statistics/wkurtosis_source.c @@ -0,0 +1,62 @@ +/* statistics/wkurtosis_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,wkurtosis) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean)(w, wstride, data, stride, n); + const double wsd = FUNCTION(gsl_stats,wsd_m)(w, wstride, data, stride, n, wmean); + return FUNCTION(gsl_stats,wkurtosis_m_sd)(w, wstride, data, stride, n, wmean, wsd); +} + +double +FUNCTION(gsl_stats,wkurtosis_m_sd) (const BASE w[], const size_t wstride, + const BASE data[], + const size_t stride, + const size_t n, + const double wmean, + const double wsd) +{ + /* takes a dataset and finds the kurtosis */ + + long double wavg = 0, kurtosis; + long double W = 0; + size_t i; + + /* find the fourth moment the deviations, normalized by the sd */ + + /* we use a recurrence relation to stably update a running value so + there aren't any large sums that can overflow */ + + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) { + const long double x = (data[i * stride] - wmean) / wsd; + W += wi ; + wavg += (x * x * x * x - wavg) * (wi / W); + } + } + + kurtosis = wavg - 3.0; /* makes kurtosis zero for a Gaussian */ + + return kurtosis; +} + diff --git a/software/gsl-1.15/statistics/wmean.c b/software/gsl-1.15/statistics/wmean.c new file mode 100644 index 000000000..6cb13282e --- /dev/null +++ b/software/gsl-1.15/statistics/wmean.c @@ -0,0 +1,21 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "wmean_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "wmean_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "wmean_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + diff --git a/software/gsl-1.15/statistics/wmean_source.c b/software/gsl-1.15/statistics/wmean_source.c new file mode 100644 index 000000000..a87628654 --- /dev/null +++ b/software/gsl-1.15/statistics/wmean_source.c @@ -0,0 +1,48 @@ +/* statistics/wmean_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION (gsl_stats, wmean) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t size) +{ + /* Compute the weighted arithmetic mean M of a dataset using the + recurrence relation + + M(n) = M(n-1) + (data[n] - M(n-1)) (w(n)/(W(n-1) + w(n))) + W(n) = W(n-1) + w(n) + + */ + + long double wmean = 0; + long double W = 0; + + size_t i; + + for (i = 0; i < size; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) + { + W += wi; + wmean += (data[i * stride] - wmean) * (wi / W); + } + } + + return wmean; +} diff --git a/software/gsl-1.15/statistics/wskew.c b/software/gsl-1.15/statistics/wskew.c new file mode 100644 index 000000000..9e747c6cd --- /dev/null +++ b/software/gsl-1.15/statistics/wskew.c @@ -0,0 +1,22 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "wskew_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "wskew_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "wskew_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + diff --git a/software/gsl-1.15/statistics/wskew_source.c b/software/gsl-1.15/statistics/wskew_source.c new file mode 100644 index 000000000..a69966861 --- /dev/null +++ b/software/gsl-1.15/statistics/wskew_source.c @@ -0,0 +1,59 @@ +/* statistics/wskew_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +double +FUNCTION(gsl_stats,wskew) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean)(w, wstride, data, stride, n); + const double wsd = FUNCTION(gsl_stats,wsd_m)(w, wstride, data, stride, n, wmean); + return FUNCTION(gsl_stats,wskew_m_sd)(w, wstride, data, stride, n, wmean, wsd); +} + +double +FUNCTION(gsl_stats,wskew_m_sd) (const BASE w[], const size_t wstride, + const BASE data[], + const size_t stride, const size_t n, + const double wmean, const double wsd) +{ + /* Compute the weighted skewness of a dataset */ + + long double wskew = 0; + long double W = 0; + + size_t i; + + /* find the sum of the cubed deviations, normalized by the sd. */ + + /* we use a recurrence relation to stably update a running value so + there aren't any large sums that can overflow */ + + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) { + const long double x = (data[i * stride] - wmean) / wsd; + W += wi ; + wskew += (x * x * x - wskew) * (wi / W); + } + } + + return wskew; +} + diff --git a/software/gsl-1.15/statistics/wvariance.c b/software/gsl-1.15/statistics/wvariance.c new file mode 100644 index 000000000..32626649e --- /dev/null +++ b/software/gsl-1.15/statistics/wvariance.c @@ -0,0 +1,21 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "wvariance_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "wvariance_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "wvariance_source.c" +#include "templates_off.h" +#undef BASE_FLOAT diff --git a/software/gsl-1.15/statistics/wvariance_source.c b/software/gsl-1.15/statistics/wvariance_source.c new file mode 100644 index 000000000..a84eba0b0 --- /dev/null +++ b/software/gsl-1.15/statistics/wvariance_source.c @@ -0,0 +1,171 @@ +/* statistics/wvariance_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 Jim Davies, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +static double +FUNCTION(compute,wvariance) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean); + +static double +FUNCTION(compute,wtss) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean); + + +static double +FUNCTION(compute,factor) (const BASE w[], const size_t wstride, const size_t n); + +static double +FUNCTION(compute,wvariance) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + /* takes a dataset and finds the weighted variance */ + + long double wvariance = 0 ; + long double W = 0; + + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) { + const long double delta = (data[i * stride] - wmean); + W += wi ; + wvariance += (delta * delta - wvariance) * (wi / W); + } + } + + return wvariance ; +} + +static double +FUNCTION(compute,wtss) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + /* takes a dataset and finds the weighted sum of squares about wmean*/ + + long double wtss = 0 ; + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) { + const long double delta = (data[i * stride] - wmean); + wtss += wi * delta * delta; + } + } + + return wtss ; +} + + +static double +FUNCTION(compute,factor) (const BASE w[], const size_t wstride, const size_t n) +{ + /* Find the factor ``N/(N-1)'' which multiplies the raw std dev + see the file doc/statnotes.tex for the derivation */ + + long double a = 0 ; + long double b = 0; + long double factor; + + size_t i; + + /* find the sum of the squares */ + for (i = 0; i < n; i++) + { + BASE wi = w[i * wstride]; + + if (wi > 0) + { + a += wi ; + b += wi * wi ; + } + } + + factor = (a*a) / ((a*a) - b); + + return factor ; +} + +double +FUNCTION(gsl_stats,wvariance_with_fixed_mean) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + const double wvariance = FUNCTION(compute,wvariance) (w, wstride, data, stride, n, wmean); + return wvariance; +} + +double +FUNCTION(gsl_stats,wsd_with_fixed_mean) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + const double wvariance = FUNCTION(compute,wvariance) (w, wstride, data, stride, n, wmean); + const double wsd = sqrt (wvariance); + + return wsd; +} + + +double +FUNCTION(gsl_stats,wvariance_m) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + const double variance = FUNCTION(compute,wvariance) (w, wstride, data, stride, n, wmean); + const double scale = FUNCTION(compute,factor)(w, wstride, n); + + return scale * variance; +} + +double +FUNCTION(gsl_stats,wsd_m) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + const double variance = FUNCTION(compute,wvariance) (w, wstride, data, stride, n, wmean); + const double scale = FUNCTION(compute,factor)(w, wstride, n); + const double wsd = sqrt(scale * variance) ; + + return wsd; +} + +double +FUNCTION(gsl_stats,wsd) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean) (w, wstride, data, stride, n); + return FUNCTION(gsl_stats,wsd_m) (w, wstride, data, stride, n, wmean) ; +} + +double +FUNCTION(gsl_stats,wvariance) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean) (w, wstride, data, stride, n); + return FUNCTION(gsl_stats,wvariance_m)(w, wstride, data, stride, n, wmean); +} + +double +FUNCTION(gsl_stats,wtss_m) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n, const double wmean) +{ + const double wtss = FUNCTION(compute,wtss) (w, wstride, data, stride, n, wmean); + return wtss; +} + +double +FUNCTION(gsl_stats,wtss) (const BASE w[], const size_t wstride, const BASE data[], const size_t stride, const size_t n) +{ + const double wmean = FUNCTION(gsl_stats,wmean) (w, wstride, data, stride, n); + return FUNCTION(gsl_stats,wtss_m)(w, wstride, data, stride, n, wmean); +} + + diff --git a/software/gsl-1.15/sum/.deps/levin_u.Plo b/software/gsl-1.15/sum/.deps/levin_u.Plo new file mode 100644 index 000000000..5f651f97a --- /dev/null +++ b/software/gsl-1.15/sum/.deps/levin_u.Plo @@ -0,0 +1,133 @@ +levin_u.lo: levin_u.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sum.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sum.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/sum/.deps/levin_utrunc.Plo b/software/gsl-1.15/sum/.deps/levin_utrunc.Plo new file mode 100644 index 000000000..20d093aa8 --- /dev/null +++ b/software/gsl-1.15/sum/.deps/levin_utrunc.Plo @@ -0,0 +1,134 @@ +levin_utrunc.lo: levin_utrunc.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sum.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sum.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/sum/.deps/test.Po b/software/gsl-1.15/sum/.deps/test.Po new file mode 100644 index 000000000..a75ff4666 --- /dev/null +++ b/software/gsl-1.15/sum/.deps/test.Po @@ -0,0 +1,129 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_sum.h \ + ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_sum.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/sum/.deps/work_u.Plo b/software/gsl-1.15/sum/.deps/work_u.Plo new file mode 100644 index 000000000..3f21a12b8 --- /dev/null +++ b/software/gsl-1.15/sum/.deps/work_u.Plo @@ -0,0 +1,131 @@ +work_u.lo: work_u.c ../config.h ../gsl/gsl_math.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sum.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sum.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/sum/.deps/work_utrunc.Plo b/software/gsl-1.15/sum/.deps/work_utrunc.Plo new file mode 100644 index 000000000..0b99d345a --- /dev/null +++ b/software/gsl-1.15/sum/.deps/work_utrunc.Plo @@ -0,0 +1,132 @@ +work_utrunc.lo: work_utrunc.c ../config.h ../gsl/gsl_math.h \ + /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_sum.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_sum.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/sum/ChangeLog b/software/gsl-1.15/sum/ChangeLog new file mode 100644 index 000000000..1f7840076 --- /dev/null +++ b/software/gsl-1.15/sum/ChangeLog @@ -0,0 +1,102 @@ +2009-07-09 Brian Gough + + * work_utrunc.c (gsl_sum_levin_utrunc_free): handle NULL argument + in free + + * work_u.c (gsl_sum_levin_u_free): handle NULL argument in free + +2009-06-28 Brian Gough + + * test.c (check_full): allow for case where err_est is zero. + + * levin_u.c (gsl_sum_levin_u_minmax): handle the special case + where the sum has the form 1+0+0+0+... by ignoring trailing zeros. + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +Thu Dec 21 21:46:54 2000 Brian Gough + + * changed err to abserr, to make it clear that it is an absolute + error in line with other modules. + +Thu Nov 2 20:08:14 2000 Brian Gough + + * added support for a workspace so that the user does not have to + allocate memory + + * made the names of the functions consistent as either levin_u, + for the full u transform with error estimate, or levin_utrunc for + the u transform with only a truncation error estimate. + +Mon Apr 24 21:15:27 2000 Brian Gough + + * gsl_sum.h: added #include for size_t + +Mon Nov 1 12:50:17 1999 Brian Gough + + * test.c (main): added tests using series for the Euler constant + and eta(1/2) + + * resolved problems with spurious failures by replacing the + directly computed truncation error by an estimate which varies + more smoothly. I have used the average of the previous two values, + which seems to give a reliable estimate of the truncation + error. The direct evaluation of the truncation error sometimes + fluctuated wildly, due to cancellation effects. + +Thu Oct 28 12:05:47 1999 Brian Gough + + * test.c: cleaned up tests, now find that everything works in + double-precision but not extended-precision where there are two + failures depending on the optimization level + + * levin_uerr.c (gsl_sum_levin_u_accel_minmax): changed loop + maximum from <=n to + + * levin_u.c levin_uerr.c: changed DBL_MAX to GSL_DBL_MAX since we + don't rely on DBL_MAX + +Sat Feb 6 20:35:26 1999 Brian Gough + + * test.c: adjusted the precision check to allow for "infinite + accuracy" which occurs when two results agree to machine precision + +Thu Nov 19 13:10:19 1998 Brian Gough + + * added an n_used parameter to all routines which gives the number + of terms actually used + +Tue Nov 17 12:31:03 1998 Brian Gough + + * test.c: added #include + + * renamed test_sum.c to test.c + + * renamed all the functions so that _with_derivs is now the + default and _trunc is the case of no error estimates from the + derivatives + + * test_sum.c (main): cleaned up tests + +Mon Nov 9 22:05:45 1998 Brian Gough + + * levin_u.c (gsl_sum_levin_u_accel_minmax): got rid of noise + variables since they aren't used in the non-derivative case + +1998-11-06 + + * test_sum.c: replace variable N by macro to avoid variable length + array warning + +Tue Oct 27 18:06:16 1998 Brian Gough + + * levin_u.c: added in noise but it does not seem to be giving the + right answer for the error estimate. The actual value for the + accelerated sum is correct though. Check toms/602 for the original + algorithm. + diff --git a/software/gsl-1.15/sum/Makefile.am b/software/gsl-1.15/sum/Makefile.am new file mode 100644 index 000000000..626f3e4d4 --- /dev/null +++ b/software/gsl-1.15/sum/Makefile.am @@ -0,0 +1,17 @@ +noinst_LTLIBRARIES = libgslsum.la + +pkginclude_HEADERS = gsl_sum.h + +INCLUDES = -I$(top_srcdir) + +libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c + +TESTS = $(check_PROGRAMS) + +check_PROGRAMS = test + +test_LDADD = libgslsum.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + + diff --git a/software/gsl-1.15/sum/Makefile.in b/software/gsl-1.15/sum/Makefile.in new file mode 100644 index 000000000..c48316785 --- /dev/null +++ b/software/gsl-1.15/sum/Makefile.in @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = sum +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslsum_la_LIBADD = +am_libgslsum_la_OBJECTS = levin_u.lo levin_utrunc.lo work_u.lo \ + work_utrunc.lo +libgslsum_la_OBJECTS = $(am_libgslsum_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslsum.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslsum_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslsum_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslsum.la +pkginclude_HEADERS = gsl_sum.h +INCLUDES = -I$(top_srcdir) +libgslsum_la_SOURCES = levin_u.c levin_utrunc.c work_u.c work_utrunc.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslsum.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sum/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu sum/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslsum.la: $(libgslsum_la_OBJECTS) $(libgslsum_la_DEPENDENCIES) + $(LINK) $(libgslsum_la_OBJECTS) $(libgslsum_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levin_u.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levin_utrunc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_u.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_utrunc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/sum/gsl_sum.h b/software/gsl-1.15/sum/gsl_sum.h new file mode 100644 index 000000000..d9c4da81a --- /dev/null +++ b/software/gsl-1.15/sum/gsl_sum.h @@ -0,0 +1,162 @@ +/* sum/gsl_sum.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + + +#ifndef __GSL_SUM_H__ +#define __GSL_SUM_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Workspace for Levin U Transform with error estimation, + * + * size = number of terms the workspace can handle + * sum_plain = simple sum of series + * q_num = backward diagonal of numerator; length = size + * q_den = backward diagonal of denominator; length = size + * dq_num = table of numerator derivatives; length = size**2 + * dq_den = table of denominator derivatives; length = size**2 + * dsum = derivative of sum wrt term i; length = size + */ + +typedef struct +{ + size_t size; + size_t i; /* position in array */ + size_t terms_used; /* number of calls */ + double sum_plain; + double *q_num; + double *q_den; + double *dq_num; + double *dq_den; + double *dsum; +} +gsl_sum_levin_u_workspace; + +gsl_sum_levin_u_workspace *gsl_sum_levin_u_alloc (size_t n); +void gsl_sum_levin_u_free (gsl_sum_levin_u_workspace * w); + +/* Basic Levin-u acceleration method. + * + * array = array of series elements + * n = size of array + * sum_accel = result of summation acceleration + * err = estimated error + * + * See [Fessler et al., ACM TOMS 9, 346 (1983) and TOMS-602] + */ + +int gsl_sum_levin_u_accel (const double *array, + const size_t n, + gsl_sum_levin_u_workspace * w, + double *sum_accel, double *abserr); + +/* Basic Levin-u acceleration method with constraints on the terms + * used, + * + * array = array of series elements + * n = size of array + * min_terms = minimum number of terms to sum + * max_terms = maximum number of terms to sum + * sum_accel = result of summation acceleration + * err = estimated error + * + * See [Fessler et al., ACM TOMS 9, 346 (1983) and TOMS-602] + */ + +int gsl_sum_levin_u_minmax (const double *array, + const size_t n, + const size_t min_terms, + const size_t max_terms, + gsl_sum_levin_u_workspace * w, + double *sum_accel, double *abserr); + +/* Basic Levin-u step w/o reference to the array of terms. + * We only need to specify the value of the current term + * to execute the step. See TOMS-745. + * + * sum = t0 + ... + t_{n-1} + term; term = t_{n} + * + * term = value of the series term to be added + * n = position of term in series (starting from 0) + * sum_accel = result of summation acceleration + * sum_plain = simple sum of series + */ + +int +gsl_sum_levin_u_step (const double term, + const size_t n, + const size_t nmax, + gsl_sum_levin_u_workspace * w, + double *sum_accel); + +/* The following functions perform the same calculation without + estimating the errors. They require O(N) storage instead of O(N^2). + This may be useful for summing many similar series where the size + of the error has already been estimated reliably and is not + expected to change. */ + +typedef struct +{ + size_t size; + size_t i; /* position in array */ + size_t terms_used; /* number of calls */ + double sum_plain; + double *q_num; + double *q_den; + double *dsum; +} +gsl_sum_levin_utrunc_workspace; + +gsl_sum_levin_utrunc_workspace *gsl_sum_levin_utrunc_alloc (size_t n); +void gsl_sum_levin_utrunc_free (gsl_sum_levin_utrunc_workspace * w); + +int gsl_sum_levin_utrunc_accel (const double *array, + const size_t n, + gsl_sum_levin_utrunc_workspace * w, + double *sum_accel, double *abserr_trunc); + +int gsl_sum_levin_utrunc_minmax (const double *array, + const size_t n, + const size_t min_terms, + const size_t max_terms, + gsl_sum_levin_utrunc_workspace * w, + double *sum_accel, double *abserr_trunc); + +int gsl_sum_levin_utrunc_step (const double term, + const size_t n, + gsl_sum_levin_utrunc_workspace * w, + double *sum_accel); + +__END_DECLS + +#endif /* __GSL_SUM_H__ */ diff --git a/software/gsl-1.15/sum/levin_u.c b/software/gsl-1.15/sum/levin_u.c new file mode 100644 index 000000000..81dcc75ee --- /dev/null +++ b/software/gsl-1.15/sum/levin_u.c @@ -0,0 +1,262 @@ +/* sum/levin_u.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2009 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +int +gsl_sum_levin_u_accel (const double *array, const size_t array_size, + gsl_sum_levin_u_workspace * w, + double *sum_accel, double *abserr) +{ + return gsl_sum_levin_u_minmax (array, array_size, + 0, array_size - 1, w, sum_accel, abserr); +} + +int +gsl_sum_levin_u_minmax (const double *array, const size_t array_size, + const size_t min_terms, const size_t max_terms, + gsl_sum_levin_u_workspace * w, + double *sum_accel, double *abserr) +{ + /* Ignore any trailing zeros in the array */ + size_t size = array_size; + + while (size > 0 && array[size - 1] == 0) { + size--; + } + + if (size == 0) + { + *sum_accel = 0.0; + *abserr = 0.0; + w->sum_plain = 0.0; + w->terms_used = 0; + return GSL_SUCCESS; + } + else if (size == 1) + { + *sum_accel = array[0]; + *abserr = 0.0; + w->sum_plain = array[0]; + w->terms_used = 1; + return GSL_SUCCESS; + } + else + { + const double SMALL = 0.01; + const size_t nmax = GSL_MAX (max_terms, array_size) - 1; + double noise_n = 0.0, noise_nm1 = 0.0; + double trunc_n = 0.0, trunc_nm1 = 0.0; + double actual_trunc_n = 0.0, actual_trunc_nm1 = 0.0; + double result_n = 0.0, result_nm1 = 0.0; + double variance = 0; + size_t n; + unsigned int i; + int better = 0; + int before = 0; + int converging = 0; + double least_trunc = GSL_DBL_MAX; + double least_trunc_noise = GSL_DBL_MAX; + double least_trunc_result; + + /* Calculate specified minimum number of terms. No convergence + tests are made, and no truncation information is stored. */ + + for (n = 0; n < min_terms; n++) + { + const double t = array[n]; + result_nm1 = result_n; + gsl_sum_levin_u_step (t, n, nmax, w, &result_n); + } + + least_trunc_result = result_n; + + variance = 0; + for (i = 0; i < n; i++) + { + double dn = w->dsum[i] * GSL_MACH_EPS * array[i]; + variance += dn * dn; + } + noise_n = sqrt (variance); + + /* Calculate up to maximum number of terms. Check truncation + condition. */ + + for (; n <= nmax; n++) + { + const double t = array[n]; + + result_nm1 = result_n; + gsl_sum_levin_u_step (t, n, nmax, w, &result_n); + + /* Compute the truncation error directly */ + + actual_trunc_nm1 = actual_trunc_n; + actual_trunc_n = fabs (result_n - result_nm1); + + /* Average results to make a more reliable estimate of the + real truncation error */ + + trunc_nm1 = trunc_n; + trunc_n = 0.5 * (actual_trunc_n + actual_trunc_nm1); + + noise_nm1 = noise_n; + variance = 0; + + for (i = 0; i <= n; i++) + { + double dn = w->dsum[i] * GSL_MACH_EPS * array[i]; + variance += dn * dn; + } + + noise_n = sqrt (variance); + + /* Determine if we are in the convergence region. */ + + better = (trunc_n < trunc_nm1 || trunc_n < SMALL * fabs (result_n)); + converging = converging || (better && before); + before = better; + + if (converging) + { + if (trunc_n < least_trunc) + { + /* Found a low truncation point in the convergence + region. Save it. */ + + least_trunc_result = result_n; + least_trunc = trunc_n; + least_trunc_noise = noise_n; + } + + if (noise_n > trunc_n / 3.0) + break; + + if (trunc_n < 10.0 * GSL_MACH_EPS * fabs (result_n)) + break; + } + + } + + if (converging) + { + /* Stopped in the convergence region. Return result and + error estimate. */ + + *sum_accel = least_trunc_result; + *abserr = GSL_MAX_DBL (least_trunc, least_trunc_noise); + w->terms_used = n; + return GSL_SUCCESS; + } + else + { + /* Never reached the convergence region. Use the last + calculated values. */ + + *sum_accel = result_n; + *abserr = GSL_MAX_DBL (trunc_n, noise_n); + w->terms_used = n; + return GSL_SUCCESS; + } + } +} + + +int +gsl_sum_levin_u_step (const double term, const size_t n, const size_t nmax, + gsl_sum_levin_u_workspace * w, double *sum_accel) +{ + +#define I(i,j) ((i)*(nmax+1) + (j)) + + if (n == 0) + { + *sum_accel = term; + w->sum_plain = term; + + w->q_den[0] = 1.0 / term; + w->q_num[0] = 1.0; + + w->dq_den[I (0, 0)] = -1.0 / (term * term); + w->dq_num[I (0, 0)] = 0.0; + + w->dsum[0] = 1.0; + + return GSL_SUCCESS; + } + else + { + double result; + double factor = 1.0; + double ratio = (double) n / (n + 1.0); + unsigned int i; + int j; + + w->sum_plain += term; + + w->q_den[n] = 1.0 / (term * (n + 1.0) * (n + 1.0)); + w->q_num[n] = w->sum_plain * w->q_den[n]; + + for (i = 0; i < n; i++) + { + w->dq_den[I (i, n)] = 0; + w->dq_num[I (i, n)] = w->q_den[n]; + } + + w->dq_den[I (n, n)] = -w->q_den[n] / term; + w->dq_num[I (n, n)] = + w->q_den[n] + w->sum_plain * (w->dq_den[I (n, n)]); + + for (j = n - 1; j >= 0; j--) + { + double c = factor * (j + 1) / (n + 1); + factor *= ratio; + w->q_den[j] = w->q_den[j + 1] - c * w->q_den[j]; + w->q_num[j] = w->q_num[j + 1] - c * w->q_num[j]; + + for (i = 0; i < n; i++) + { + w->dq_den[I (i, j)] = + w->dq_den[I (i, j + 1)] - c * w->dq_den[I (i, j)]; + w->dq_num[I (i, j)] = + w->dq_num[I (i, j + 1)] - c * w->dq_num[I (i, j)]; + } + + w->dq_den[I (n, j)] = w->dq_den[I (n, j + 1)]; + w->dq_num[I (n, j)] = w->dq_num[I (n, j + 1)]; + } + + result = w->q_num[0] / w->q_den[0]; + + *sum_accel = result; + + for (i = 0; i <= n; i++) + { + w->dsum[i] = + (w->dq_num[I (i, 0)] - + result * w->dq_den[I (i, 0)]) / w->q_den[0]; + } + + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/sum/levin_utrunc.c b/software/gsl-1.15/sum/levin_utrunc.c new file mode 100644 index 000000000..03bf8bc04 --- /dev/null +++ b/software/gsl-1.15/sum/levin_utrunc.c @@ -0,0 +1,202 @@ +/* sum/levin_utrunc.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include + +int +gsl_sum_levin_utrunc_accel (const double *array, + const size_t array_size, + gsl_sum_levin_utrunc_workspace * w, + double *sum_accel, double *abserr_trunc) +{ + return gsl_sum_levin_utrunc_minmax (array, array_size, + 0, array_size - 1, + w, sum_accel, abserr_trunc); +} + + +int +gsl_sum_levin_utrunc_minmax (const double *array, + const size_t array_size, + const size_t min_terms, + const size_t max_terms, + gsl_sum_levin_utrunc_workspace * w, + double *sum_accel, double *abserr_trunc) +{ + if (array_size == 0) + { + *sum_accel = 0.0; + *abserr_trunc = 0.0; + w->sum_plain = 0.0; + w->terms_used = 0; + return GSL_SUCCESS; + } + else if (array_size == 1) + { + *sum_accel = array[0]; + *abserr_trunc = GSL_POSINF; + w->sum_plain = array[0]; + w->terms_used = 1; + return GSL_SUCCESS; + } + else + { + const double SMALL = 0.01; + const size_t nmax = GSL_MAX (max_terms, array_size) - 1; + double trunc_n = 0.0, trunc_nm1 = 0.0; + double actual_trunc_n = 0.0, actual_trunc_nm1 = 0.0; + double result_n = 0.0, result_nm1 = 0.0; + size_t n; + int better = 0; + int before = 0; + int converging = 0; + double least_trunc = GSL_DBL_MAX; + double result_least_trunc; + + /* Calculate specified minimum number of terms. No convergence + tests are made, and no truncation information is stored. */ + + for (n = 0; n < min_terms; n++) + { + const double t = array[n]; + + result_nm1 = result_n; + gsl_sum_levin_utrunc_step (t, n, w, &result_n); + } + + /* Assume the result after the minimum calculation is the best. */ + + result_least_trunc = result_n; + + /* Calculate up to maximum number of terms. Check truncation + condition. */ + + for (; n <= nmax; n++) + { + const double t = array[n]; + + result_nm1 = result_n; + gsl_sum_levin_utrunc_step (t, n, w, &result_n); + + /* Compute the truncation error directly */ + + actual_trunc_nm1 = actual_trunc_n; + actual_trunc_n = fabs (result_n - result_nm1); + + /* Average results to make a more reliable estimate of the + real truncation error */ + + trunc_nm1 = trunc_n; + trunc_n = 0.5 * (actual_trunc_n + actual_trunc_nm1); + + /* Determine if we are in the convergence region. */ + + better = (trunc_n < trunc_nm1 || trunc_n < SMALL * fabs (result_n)); + converging = converging || (better && before); + before = better; + + if (converging) + { + if (trunc_n < least_trunc) + { + /* Found a low truncation point in the convergence + region. Save it. */ + + least_trunc = trunc_n; + result_least_trunc = result_n; + } + + if (fabs (trunc_n / result_n) < 10.0 * GSL_MACH_EPS) + break; + } + } + + if (converging) + { + /* Stopped in the convergence region. Return result and + error estimate. */ + + *sum_accel = result_least_trunc; + *abserr_trunc = least_trunc; + w->terms_used = n; + return GSL_SUCCESS; + } + else + { + /* Never reached the convergence region. Use the last + calculated values. */ + + *sum_accel = result_n; + *abserr_trunc = trunc_n; + w->terms_used = n; + return GSL_SUCCESS; + } + } +} + +int +gsl_sum_levin_utrunc_step (const double term, + const size_t n, + gsl_sum_levin_utrunc_workspace * w, double *sum_accel) +{ + if (term == 0.0) + { + /* This is actually harmless when treated in this way. A term + which is exactly zero is simply ignored; the state is not + changed. We return GSL_EZERODIV as an indicator that this + occured. */ + + return GSL_EZERODIV; + } + else if (n == 0) + { + *sum_accel = term; + w->sum_plain = term; + w->q_den[0] = 1.0 / term; + w->q_num[0] = 1.0; + return GSL_SUCCESS; + } + else + { + double factor = 1.0; + double ratio = (double) n / (n + 1.0); + int j; + + w->sum_plain += term; + w->q_den[n] = 1.0 / (term * (n + 1.0) * (n + 1.0)); + w->q_num[n] = w->sum_plain * w->q_den[n]; + + for (j = n - 1; j >= 0; j--) + { + double c = factor * (j + 1) / (n + 1); + factor *= ratio; + w->q_den[j] = w->q_den[j + 1] - c * w->q_den[j]; + w->q_num[j] = w->q_num[j + 1] - c * w->q_num[j]; + } + + *sum_accel = w->q_num[0] / w->q_den[0]; + return GSL_SUCCESS; + } +} diff --git a/software/gsl-1.15/sum/test.c b/software/gsl-1.15/sum/test.c new file mode 100644 index 000000000..1af39fa6a --- /dev/null +++ b/software/gsl-1.15/sum/test.c @@ -0,0 +1,250 @@ +/* sum/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include +#include +#include +#include +#include + +#include + +#define N 50 + +void check_trunc (double * t, double expected, const char * desc); +void check_full (double * t, double expected, const char * desc); + +int +main (void) +{ + gsl_ieee_env_setup (); + + { + double t[N]; + int n; + + const double zeta_2 = M_PI * M_PI / 6.0; + + /* terms for zeta(2) */ + + for (n = 0; n < N; n++) + { + double np1 = n + 1.0; + t[n] = 1.0 / (np1 * np1); + } + + check_trunc (t, zeta_2, "zeta(2)"); + check_full (t, zeta_2, "zeta(2)"); + } + + { + double t[N]; + double x, y; + int n; + + /* terms for exp(10.0) */ + x = 10.0; + y = exp(x); + + t[0] = 1.0; + for (n = 1; n < N; n++) + { + t[n] = t[n - 1] * (x / n); + } + + check_trunc (t, y, "exp(10)"); + check_full (t, y, "exp(10)"); + } + + { + double t[N]; + double x, y; + int n; + + /* terms for exp(-10.0) */ + x = -10.0; + y = exp(x); + + t[0] = 1.0; + for (n = 1; n < N; n++) + { + t[n] = t[n - 1] * (x / n); + } + + check_trunc (t, y, "exp(-10)"); + check_full (t, y, "exp(-10)"); + } + + { + double t[N]; + double x, y; + int n; + + /* terms for -log(1-x) */ + x = 0.5; + y = -log(1-x); + t[0] = x; + for (n = 1; n < N; n++) + { + t[n] = t[n - 1] * (x * n) / (n + 1.0); + } + + check_trunc (t, y, "-log(1/2)"); + check_full (t, y, "-log(1/2)"); + } + + { + double t[N]; + double x, y; + int n; + + /* terms for -log(1-x) */ + x = -1.0; + y = -log(1-x); + t[0] = x; + for (n = 1; n < N; n++) + { + t[n] = t[n - 1] * (x * n) / (n + 1.0); + } + + check_trunc (t, y, "-log(2)"); + check_full (t, y, "-log(2)"); + } + + { + double t[N]; + int n; + + double result = 0.192594048773; + + /* terms for an alternating asymptotic series */ + + t[0] = 3.0 / (M_PI * M_PI); + + for (n = 1; n < N; n++) + { + t[n] = -t[n - 1] * (4.0 * (n + 1.0) - 1.0) / (M_PI * M_PI); + } + + check_trunc (t, result, "asymptotic series"); + check_full (t, result, "asymptotic series"); + } + + { + double t[N]; + int n; + + /* Euler's gamma from GNU Calc (precision = 32) */ + + double result = 0.5772156649015328606065120900824; + + /* terms for Euler's gamma */ + + t[0] = 1.0; + + for (n = 1; n < N; n++) + { + t[n] = 1/(n+1.0) + log(n/(n+1.0)); + } + + check_trunc (t, result, "Euler's constant"); + check_full (t, result, "Euler's constant"); + } + + { + double t[N]; + int n; + + /* eta(1/2) = sum_{k=1}^{\infty} (-1)^(k+1) / sqrt(k) + + From Levin, Intern. J. Computer Math. B3:371--388, 1973. + + I=(1-sqrt(2))zeta(1/2) + =(2/sqrt(pi))*integ(1/(exp(x^2)+1),x,0,inf) */ + + double result = 0.6048986434216305; /* approx */ + + /* terms for eta(1/2) */ + + for (n = 0; n < N; n++) + { + t[n] = (n%2 ? -1 : 1) * 1.0 /sqrt(n + 1.0); + } + + check_trunc (t, result, "eta(1/2)"); + check_full (t, result, "eta(1/2)"); + } + + { + double t[N]; + int n; + + double result = 1.23; + + for (n = 0; n < N; n++) + { + t[n] = (n == 0) ? 1.23 : 0.0; + } + + check_trunc (t, result, "1.23 + 0 + 0 + 0..."); + check_full (t, result, "1.23 + 0 + 0 + 0..."); + } + + + exit (gsl_test_summary ()); +} + +void +check_trunc (double * t, double expected, const char * desc) +{ + double sum_accel, prec; + + gsl_sum_levin_utrunc_workspace * w = gsl_sum_levin_utrunc_alloc (N); + + gsl_sum_levin_utrunc_accel (t, N, w, &sum_accel, &prec); + gsl_test_rel (sum_accel, expected, 1e-8, "trunc result, %s", desc); + + /* No need to check precision for truncated result since this is not + a meaningful number */ + + gsl_sum_levin_utrunc_free (w); +} + +void +check_full (double * t, double expected, const char * desc) +{ + double sum_accel, err_est, sd_actual, sd_est; + + gsl_sum_levin_u_workspace * w = gsl_sum_levin_u_alloc (N); + + gsl_sum_levin_u_accel (t, N, w, &sum_accel, &err_est); + gsl_test_rel (sum_accel, expected, 1e-8, "full result, %s", desc); + + sd_est = -log10 (err_est/fabs(sum_accel) + GSL_DBL_EPSILON); + sd_actual = -log10 (DBL_EPSILON + fabs ((sum_accel - expected)/expected)); + + /* Allow one digit of slop */ + + gsl_test (sd_est > sd_actual + 1.0, "full significant digits, %s (%g vs %g)", desc, sd_est, sd_actual); + + gsl_sum_levin_u_free (w); +} diff --git a/software/gsl-1.15/sum/work_u.c b/software/gsl-1.15/sum/work_u.c new file mode 100644 index 000000000..32a1fe80d --- /dev/null +++ b/software/gsl-1.15/sum/work_u.c @@ -0,0 +1,95 @@ +#include +#include +#include +#include + +gsl_sum_levin_u_workspace * +gsl_sum_levin_u_alloc (size_t n) +{ + gsl_sum_levin_u_workspace * w; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + w = (gsl_sum_levin_u_workspace *) malloc(sizeof(gsl_sum_levin_u_workspace)); + + if (w == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + w->q_num = (double *) malloc (n * sizeof (double)); + + if (w->q_num == NULL) + { + free(w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for q_num", GSL_ENOMEM, 0); + } + + w->q_den = (double *) malloc (n * sizeof (double)); + + if (w->q_den == NULL) + { + free (w->q_num); + free (w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for q_den", GSL_ENOMEM, 0); + } + + w->dq_num = (double *) malloc (n * n * sizeof (double)); + + if (w->dq_num == NULL) + { + free (w->q_den); + free (w->q_num); + free(w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for dq_num", GSL_ENOMEM, 0); + } + + w->dq_den = (double *) malloc (n * n * sizeof (double)); + + if (w->dq_den == NULL) + { + free (w->dq_num); + free (w->q_den); + free (w->q_num); + free (w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for dq_den", GSL_ENOMEM, 0); + } + + w->dsum = (double *) malloc (n * sizeof (double)); + + if (w->dsum == NULL) + { + free (w->dq_den); + free (w->dq_num); + free (w->q_den); + free (w->q_num); + free (w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for dsum", GSL_ENOMEM, 0); + } + + w->size = n; + w->terms_used = 0; + w->sum_plain = 0; + + return w; +} + +void +gsl_sum_levin_u_free (gsl_sum_levin_u_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->dsum); + free (w->dq_den); + free (w->dq_num); + free (w->q_den); + free (w->q_num); + free (w); +} diff --git a/software/gsl-1.15/sum/work_utrunc.c b/software/gsl-1.15/sum/work_utrunc.c new file mode 100644 index 000000000..81ddf67fe --- /dev/null +++ b/software/gsl-1.15/sum/work_utrunc.c @@ -0,0 +1,68 @@ +#include +#include +#include +#include + +gsl_sum_levin_utrunc_workspace * +gsl_sum_levin_utrunc_alloc (size_t n) +{ + gsl_sum_levin_utrunc_workspace * w; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + w = (gsl_sum_levin_utrunc_workspace *) malloc(sizeof(gsl_sum_levin_utrunc_workspace)); + + if (w == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + w->q_num = (double *) malloc (n * sizeof (double)); + + if (w->q_num == NULL) + { + free(w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for q_num", GSL_ENOMEM, 0); + } + + w->q_den = (double *) malloc (n * sizeof (double)); + + if (w->q_den == NULL) + { + free (w->q_num); + free (w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for q_den", GSL_ENOMEM, 0); + } + + w->dsum = (double *) malloc (n * sizeof (double)); + + if (w->dsum == NULL) + { + free (w->q_den); + free (w->q_num); + free (w) ; /* error in constructor, prevent memory leak */ + + GSL_ERROR_VAL ("failed to allocate space for dsum", GSL_ENOMEM, 0); + } + + w->size = n; + w->terms_used = 0; + w->sum_plain = 0; + + return w; +} + +void +gsl_sum_levin_utrunc_free (gsl_sum_levin_utrunc_workspace * w) +{ + RETURN_IF_NULL (w); + free (w->dsum); + free (w->q_den); + free (w->q_num); + free (w); +} diff --git a/software/gsl-1.15/sys/.deps/coerce.Plo b/software/gsl-1.15/sys/.deps/coerce.Plo new file mode 100644 index 000000000..9d2520ce5 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/coerce.Plo @@ -0,0 +1,20 @@ +coerce.lo: coerce.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: diff --git a/software/gsl-1.15/sys/.deps/expm1.Plo b/software/gsl-1.15/sys/.deps/expm1.Plo new file mode 100644 index 000000000..74ef2df67 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/expm1.Plo @@ -0,0 +1,57 @@ +expm1.lo: expm1.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/sys/.deps/fcmp.Plo b/software/gsl-1.15/sys/.deps/fcmp.Plo new file mode 100644 index 000000000..6f27afa87 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/fcmp.Plo @@ -0,0 +1,20 @@ +fcmp.lo: fcmp.c ../config.h ../gsl/gsl_sys.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h + +../config.h: + +../gsl/gsl_sys.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: diff --git a/software/gsl-1.15/sys/.deps/fdiv.Plo b/software/gsl-1.15/sys/.deps/fdiv.Plo new file mode 100644 index 000000000..2afa0e7fd --- /dev/null +++ b/software/gsl-1.15/sys/.deps/fdiv.Plo @@ -0,0 +1,20 @@ +fdiv.lo: fdiv.c ../config.h /usr/include/math.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: diff --git a/software/gsl-1.15/sys/.deps/hypot.Plo b/software/gsl-1.15/sys/.deps/hypot.Plo new file mode 100644 index 000000000..c7ffdcf05 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/hypot.Plo @@ -0,0 +1,57 @@ +hypot.lo: hypot.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/sys/.deps/infnan.Plo b/software/gsl-1.15/sys/.deps/infnan.Plo new file mode 100644 index 000000000..64fb983e9 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/infnan.Plo @@ -0,0 +1,20 @@ +infnan.lo: infnan.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: diff --git a/software/gsl-1.15/sys/.deps/invhyp.Plo b/software/gsl-1.15/sys/.deps/invhyp.Plo new file mode 100644 index 000000000..dd555481b --- /dev/null +++ b/software/gsl-1.15/sys/.deps/invhyp.Plo @@ -0,0 +1,57 @@ +invhyp.lo: invhyp.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/sys/.deps/ldfrexp.Plo b/software/gsl-1.15/sys/.deps/ldfrexp.Plo new file mode 100644 index 000000000..bd527b975 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/ldfrexp.Plo @@ -0,0 +1,57 @@ +ldfrexp.lo: ldfrexp.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: diff --git a/software/gsl-1.15/sys/.deps/log1p.Plo b/software/gsl-1.15/sys/.deps/log1p.Plo new file mode 100644 index 000000000..c6fbc0278 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/log1p.Plo @@ -0,0 +1,20 @@ +log1p.lo: log1p.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../gsl/gsl_sys.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../gsl/gsl_sys.h: diff --git a/software/gsl-1.15/sys/.deps/minmax.Plo b/software/gsl-1.15/sys/.deps/minmax.Plo new file mode 100644 index 000000000..6735bd6e3 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/minmax.Plo @@ -0,0 +1,10 @@ +minmax.lo: minmax.c ../config.h ../build.h ../gsl/gsl_minmax.h \ + ../gsl/gsl_inline.h + +../config.h: + +../build.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/sys/.deps/pow_int.Plo b/software/gsl-1.15/sys/.deps/pow_int.Plo new file mode 100644 index 000000000..9288e5abf --- /dev/null +++ b/software/gsl-1.15/sys/.deps/pow_int.Plo @@ -0,0 +1,25 @@ +pow_int.lo: pow_int.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h ../build.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_inline.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +../build.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/sys/.deps/prec.Plo b/software/gsl-1.15/sys/.deps/prec.Plo new file mode 100644 index 000000000..2ab1f6280 --- /dev/null +++ b/software/gsl-1.15/sys/.deps/prec.Plo @@ -0,0 +1,42 @@ +prec.lo: prec.c ../config.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../build.h ../gsl/gsl_precision.h ../gsl/gsl_types.h ../gsl/gsl_mode.h \ + ../gsl/gsl_inline.h + +../config.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../build.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_mode.h: + +../gsl/gsl_inline.h: diff --git a/software/gsl-1.15/sys/.deps/test.Po b/software/gsl-1.15/sys/.deps/test.Po new file mode 100644 index 000000000..bb5a8477b --- /dev/null +++ b/software/gsl-1.15/sys/.deps/test.Po @@ -0,0 +1,126 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_math.h /usr/include/math.h \ + ../gsl/gsl_sys.h ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_test.h ../gsl/gsl_ieee_utils.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: diff --git a/software/gsl-1.15/sys/ChangeLog b/software/gsl-1.15/sys/ChangeLog new file mode 100644 index 000000000..84d2235e3 --- /dev/null +++ b/software/gsl-1.15/sys/ChangeLog @@ -0,0 +1,170 @@ +2010-10-12 Brian Gough + + * pow_int.c (gsl_pow_uint): added function gsl_pow_uint(x,n) for + unsigned n (larger range) + (gsl_pow_int): handle case where n=MIN_INT correctly + +2010-02-15 Brian Gough + + * infnan.c: use #error if gsl_isnan or gsl_finite cannot be defined + +2009-08-21 Brian Gough + + * test.c (main): move x/=2 outside test of while loops because it + is (possibly) not volatile. + +2008-10-13 Brian Gough + + * log1p.c: use gsl_sys.h header file + + * infnan.c: use gsl_sys.h header file + + * hypot.c: use gsl_sys.h header file + + * fdiv.c: use gsl_sys.h header file + + * coerce.c: use gsl_sys.h header file + +2008-10-08 Brian Gough + + * infnan.c (gsl_isinf): handle the case where isinf(-inf) + returns +1 + +2008-07-03 Brian Gough + + * prec.c: compile inline functions from header here + + * pow_int.c: compile inline functions from header here + + * minmax.c: compile inline functions from header here + +2008-03-18 Brian Gough + + * test.c (main): use volatile to avoid extended precision in loop + + * ldfrexp.c (gsl_ldexp): added a test for x==0 + +2007-11-04 Brian Gough + + * ldfrexp.c (gsl_ldexp): handle full range of double precision + (gsl_frexp): handle full range of double precision + +2007-07-30 Brian Gough + + * infnan.c (gsl_finite): use isfinite (c99) in preference to + finite + +2007-07-23 Brian Gough + + * log1p.c (gsl_log1p): added another volatile to prevent unwanted + optimisation + +2007-04-03 Brian Gough + + * infnan.c (gsl_isinf): now return -1 for -Inf instead of +1 + + * test.c (main): add test for -inf + + * infnan.c (gsl_finite): always use finite where available + (gsl_isnan): always use isnan where available + (gsl_isinf): always use isinf where available + +2005-11-14 Brian Gough + + * test.c: added tests for constants + +2005-04-05 Brian Gough + + * infnan.c: added #include ieeefp.h for Solaris + +2004-12-22 Brian Gough + + * infnan.c (gsl_isinf): added missing return type of int + +2003-09-02 Brian Gough + + * infnan.c (gsl_isinf): added fallback for missing isinf (IRIX) + +2003-07-24 Brian Gough + + * invhyp.c: removed duplicate declarations + + * ldfrexp.c: removed duplicate declarations + + * expm1.c: removed duplicate declaration of gsl_expm1 + +2003-01-02 Brian Gough + + * infnan.c (gsl_isnan): fall back to isnan,isinf,finite/isfinite + if available and IEEE comparisons do not work + +Wed Dec 11 17:29:24 2002 Brian Gough + + * ldfrexp.c: fix include to use instead of + + +2002-08-25 Brian Gough + + * fcmp.c (gsl_fcmp): approximate comparison of floating point + numbers using Knuth's algorithm + + * ldfrexp.c (gsl_ldexp): portable replacement for ldexp() + (gsl_frexp): portable replacement for frexp() + +Wed Jan 16 16:35:58 2002 Brian Gough + + * test.c (main): only test gsl_isnan, gsl_isinf, gsl_finite + functions if they have been compiled in. + + * infnan.c (gsl_isnan): #ifdef out the gsl_isnan, gsl_isinf and + gsl_finite functions if IEEE comparisons for nans and infs are not + supported (HAVE_IEEE_COMPARISONS). + +Tue Aug 21 22:54:08 2001 Brian Gough + + * test.c (main): use inf/inf to generate a nan, because MSVC + optimizes inf-inf to zero + +Sun May 6 14:28:57 2001 Brian Gough + + * infnan.c: added gsl_isnan, gsl_isinf, gsl_isreal + +Sun Feb 25 11:54:21 2001 Brian Gough + + * invhyp.c: added gsl_acosh, gsl_asinh, gsl_atanh + +Mon Jan 29 10:53:06 2001 Brian Gough + + * hypot.c: removed the inline from gsl_hypot, since this is the + static version of the function + + * test.c (main): added an underflow test for gsl_hypot + +Thu Nov 16 19:28:38 2000 Brian Gough + + * coerce.c: added functions for coercing values out of registers + so they are correctly rounded + +Sun Oct 22 15:00:24 2000 Brian Gough + + * expm1.c (gsl_expm1): added gsl_expm1, a substitute for BSD's expm1 + +Mon Apr 3 16:58:53 2000 Brian Gough + + * params.c (main): added parentheses around negative output values + +Tue Mar 21 12:44:07 2000 Brian Gough + + * hypot.c: added a quick gsl_hypot function for sqrt(x^2+y^2) + +1999-07-14 Mark Galassi + + * prec.c (GSL_MODE_PREC): surrounded this with function with an + #ifndef, since it might already be defined as a macro. In truth, + this function might be completely unnecessary, since the logic in + ../gsl_mode.h seems to cover all cases. + +Fri Nov 20 17:41:35 1998 Brian Gough + + * params.c: added program for printing ieee parameters + diff --git a/software/gsl-1.15/sys/Makefile.am b/software/gsl-1.15/sys/Makefile.am new file mode 100644 index 000000000..4dd6ccf75 --- /dev/null +++ b/software/gsl-1.15/sys/Makefile.am @@ -0,0 +1,12 @@ +noinst_LTLIBRARIES = libgslsys.la + +pkginclude_HEADERS = gsl_sys.h + +libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c + +INCLUDES = -I$(top_srcdir) + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/sys/Makefile.in b/software/gsl-1.15/sys/Makefile.in new file mode 100644 index 000000000..dc42a8f96 --- /dev/null +++ b/software/gsl-1.15/sys/Makefile.in @@ -0,0 +1,674 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = sys +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslsys_la_LIBADD = +am_libgslsys_la_OBJECTS = minmax.lo prec.lo hypot.lo log1p.lo expm1.lo \ + coerce.lo invhyp.lo pow_int.lo infnan.lo fdiv.lo fcmp.lo \ + ldfrexp.lo +libgslsys_la_OBJECTS = $(am_libgslsys_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslsys.la ../ieee-utils/libgslieeeutils.la \ + ../err/libgslerr.la ../test/libgsltest.la libgslsys.la \ + ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslsys_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslsys_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslsys.la +pkginclude_HEADERS = gsl_sys.h +libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslsys.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu sys/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslsys.la: $(libgslsys_la_OBJECTS) $(libgslsys_la_DEPENDENCIES) + $(LINK) $(libgslsys_la_OBJECTS) $(libgslsys_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coerce.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expm1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdiv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hypot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infnan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invhyp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldfrexp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log1p.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pow_int.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/sys/coerce.c b/software/gsl-1.15/sys/coerce.c new file mode 100644 index 000000000..101dacc90 --- /dev/null +++ b/software/gsl-1.15/sys/coerce.c @@ -0,0 +1,49 @@ +/* sys/coerce.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double +gsl_coerce_double (const double x) +{ + volatile double y; + y = x; + return y; +} + +float +gsl_coerce_float (const float x) +{ + volatile float y; + y = x; + return y; +} + +/* The following function is not needed, but is included for completeness */ + +long double +gsl_coerce_long_double (const long double x) +{ + volatile long double y; + y = x; + return y; +} + diff --git a/software/gsl-1.15/sys/expm1.c b/software/gsl-1.15/sys/expm1.c new file mode 100644 index 000000000..d47548f2c --- /dev/null +++ b/software/gsl-1.15/sys/expm1.c @@ -0,0 +1,50 @@ +/* sys/expm1.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double gsl_expm1 (const double x) +{ + /* FIXME: this should be improved */ + + if (fabs(x) < M_LN2) + { + /* Compute the taylor series S = x + (1/2!) x^2 + (1/3!) x^3 + ... */ + + double i = 1.0; + double sum = x; + double term = x / 1.0; + + do + { + i++ ; + term *= x/i; + sum += term; + } + while (fabs(term) > fabs(sum) * GSL_DBL_EPSILON) ; + + return sum ; + } + else + { + return exp(x) - 1; + } +} diff --git a/software/gsl-1.15/sys/fcmp.c b/software/gsl-1.15/sys/fcmp.c new file mode 100644 index 000000000..4f673d983 --- /dev/null +++ b/software/gsl-1.15/sys/fcmp.c @@ -0,0 +1,62 @@ +/* sys/gsl_compare.c + * + * Copyright (C) 2002 Gert Van den Eynde + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Based on fcmp 1.2.2 Copyright (c) 1998-2000 Theodore C. Belding + * University of Michigan Center for the Study of Complex Systems + * Ted.Belding@umich.edu + * + */ + +#include +#include +#include + +int +gsl_fcmp (const double x1, const double x2, const double epsilon) +{ + int exponent; + double delta, difference; + + /* Find exponent of largest absolute value */ + + { + double max = (fabs (x1) > fabs (x2)) ? x1 : x2; + + frexp (max, &exponent); + } + + /* Form a neighborhood of size 2 * delta */ + + delta = ldexp (epsilon, exponent); + + difference = x1 - x2; + + if (difference > delta) /* x1 > x2 */ + { + return 1; + } + else if (difference < -delta) /* x1 < x2 */ + { + return -1; + } + else /* -delta <= difference <= delta */ + { + return 0; /* x1 ~=~ x2 */ + } +} + diff --git a/software/gsl-1.15/sys/fdiv.c b/software/gsl-1.15/sys/fdiv.c new file mode 100644 index 000000000..05b95b2ba --- /dev/null +++ b/software/gsl-1.15/sys/fdiv.c @@ -0,0 +1,28 @@ +/* sys/fdiv.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double +gsl_fdiv (const double x, const double y) +{ + return x / y; +} diff --git a/software/gsl-1.15/sys/gsl_sys.h b/software/gsl-1.15/sys/gsl_sys.h new file mode 100644 index 000000000..25e134862 --- /dev/null +++ b/software/gsl-1.15/sys/gsl_sys.h @@ -0,0 +1,63 @@ +/* sys/gsl_sys.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_SYS_H__ +#define __GSL_SYS_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +double gsl_log1p (const double x); +double gsl_expm1 (const double x); +double gsl_hypot (const double x, const double y); +double gsl_hypot3 (const double x, const double y, const double z); +double gsl_acosh (const double x); +double gsl_asinh (const double x); +double gsl_atanh (const double x); + +int gsl_isnan (const double x); +int gsl_isinf (const double x); +int gsl_finite (const double x); + +double gsl_nan (void); +double gsl_posinf (void); +double gsl_neginf (void); +double gsl_fdiv (const double x, const double y); + +double gsl_coerce_double (const double x); +float gsl_coerce_float (const float x); +long double gsl_coerce_long_double (const long double x); + +double gsl_ldexp(const double x, const int e); +double gsl_frexp(const double x, int * e); + +int gsl_fcmp (const double x1, const double x2, const double epsilon); + +__END_DECLS + +#endif /* __GSL_SYS_H__ */ diff --git a/software/gsl-1.15/sys/hypot.c b/software/gsl-1.15/sys/hypot.c new file mode 100644 index 000000000..3bb664225 --- /dev/null +++ b/software/gsl-1.15/sys/hypot.c @@ -0,0 +1,68 @@ +/* sys/hypot.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough, Patrick Alken + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double gsl_hypot (const double x, const double y) +{ + double xabs = fabs(x) ; + double yabs = fabs(y) ; + double min, max; + + if (xabs < yabs) { + min = xabs ; + max = yabs ; + } else { + min = yabs ; + max = xabs ; + } + + if (min == 0) + { + return max ; + } + + { + double u = min / max ; + return max * sqrt (1 + u * u) ; + } +} + +double +gsl_hypot3(const double x, const double y, const double z) +{ + double xabs = fabs(x); + double yabs = fabs(y); + double zabs = fabs(z); + double w = GSL_MAX(xabs, GSL_MAX(yabs, zabs)); + + if (w == 0.0) + { + return (0.0); + } + else + { + double r = w * sqrt((xabs / w) * (xabs / w) + + (yabs / w) * (yabs / w) + + (zabs / w) * (zabs / w)); + return r; + } +} diff --git a/software/gsl-1.15/sys/infnan.c b/software/gsl-1.15/sys/infnan.c new file mode 100644 index 000000000..aee48ceec --- /dev/null +++ b/software/gsl-1.15/sys/infnan.c @@ -0,0 +1,152 @@ +/* sys/infnan.c + * + * Copyright (C) 2001, 2004, 2007, 2010 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#if HAVE_IEEEFP_H +#include +#endif + +#include + +double gsl_nan (void) +{ + return gsl_fdiv (0.0, 0.0); +} + +double gsl_posinf (void) +{ + return gsl_fdiv (+1.0, 0.0); +} + +double gsl_neginf (void) +{ + return gsl_fdiv (-1.0, 0.0); +} + + +int gsl_isnan (const double x); +int gsl_isinf (const double x); +int gsl_finite (const double x); + +#if defined(_MSC_VER) /* Microsoft Visual C++ */ +#include +int +gsl_isnan (const double x) +{ + return _isnan(x); +} + +int +gsl_isinf (const double x) +{ + int fpc = _fpclass(x); + + if (fpc == _FPCLASS_PINF) + return +1; + else if (fpc == _FPCLASS_NINF) + return -1; + else + return 0; +} + +int +gsl_finite (const double x) +{ + return _finite(x); +} +#else + +# if HAVE_DECL_ISFINITE +int +gsl_finite (const double x) +{ + return isfinite(x); +} +# elif HAVE_DECL_FINITE +int +gsl_finite (const double x) +{ + return finite(x); +} +# elif HAVE_IEEE_COMPARISONS +int +gsl_finite (const double x) +{ + const double y = x - x; + int status = (y == y); + return status; +} +# else +# error "cannot define gsl_finite without HAVE_DECL_FINITE or HAVE_IEEE_COMPARISONS" +# endif + +# if HAVE_DECL_ISNAN +int +gsl_isnan (const double x) +{ + return isnan(x); +} +#elif HAVE_IEEE_COMPARISONS +int +gsl_isnan (const double x) +{ + int status = (x != x); + return status; +} +# else +# error "cannot define gsl_isnan without HAVE_DECL_ISNAN or HAVE_IEEE_COMPARISONS" +# endif + +# if HAVE_DECL_ISINF +int +gsl_isinf (const double x) +{ + /* isinf(3): In glibc 2.01 and earlier, isinf() returns a + non-zero value (actually: 1) if x is an infinity (positive or + negative). (This is all that C99 requires.) */ + + if (isinf(x)) + { + return (x > 0) ? 1 : -1; + } + else + { + return 0; + } +} +# else + +int +gsl_isinf (const double x) +{ + if (! gsl_finite(x) && ! gsl_isnan(x)) + { + return (x > 0 ? +1 : -1); + } + else + { + return 0; + } +} + +# endif +#endif + diff --git a/software/gsl-1.15/sys/invhyp.c b/software/gsl-1.15/sys/invhyp.c new file mode 100644 index 000000000..8262ffb63 --- /dev/null +++ b/software/gsl-1.15/sys/invhyp.c @@ -0,0 +1,102 @@ +/* sys/invhyp.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +double +gsl_acosh (const double x) +{ + if (x > 1.0 / GSL_SQRT_DBL_EPSILON) + { + return log (x) + M_LN2; + } + else if (x > 2) + { + return log (2 * x - 1 / (sqrt (x * x - 1) + x)); + } + else if (x > 1) + { + double t = x - 1; + return log1p (t + sqrt (2 * t + t * t)); + } + else if (x == 1) + { + return 0; + } + else + { + return GSL_NAN; + } +} + +double +gsl_asinh (const double x) +{ + double a = fabs (x); + double s = (x < 0) ? -1 : 1; + + if (a > 1 / GSL_SQRT_DBL_EPSILON) + { + return s * (log (a) + M_LN2); + } + else if (a > 2) + { + return s * log (2 * a + 1 / (a + sqrt (a * a + 1))); + } + else if (a > GSL_SQRT_DBL_EPSILON) + { + double a2 = a * a; + return s * log1p (a + a2 / (1 + sqrt (1 + a2))); + } + else + { + return x; + } +} + +double +gsl_atanh (const double x) +{ + double a = fabs (x); + double s = (x < 0) ? -1 : 1; + + if (a > 1) + { + return GSL_NAN; + } + else if (a == 1) + { + return (x < 0) ? GSL_NEGINF : GSL_POSINF; + } + else if (a >= 0.5) + { + return s * 0.5 * log1p (2 * a / (1 - a)); + } + else if (a > GSL_DBL_EPSILON) + { + return s * 0.5 * log1p (2 * a + 2 * a * a / (1 - a)); + } + else + { + return x; + } +} diff --git a/software/gsl-1.15/sys/ldfrexp.c b/software/gsl-1.15/sys/ldfrexp.c new file mode 100644 index 000000000..4a75f3c1d --- /dev/null +++ b/software/gsl-1.15/sys/ldfrexp.c @@ -0,0 +1,110 @@ +/* sys/ldfrexp.c + * + * Copyright (C) 2002, Gert Van den Eynde + * Copyright (C) 2007, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double +gsl_ldexp (const double x, const int e) +{ + int ex; + + if (x == 0.0) + { + return x; + } + + { + double y = gsl_frexp (x, &ex); + double e2 = e + ex, p2; + + if (e2 >= DBL_MAX_EXP) + { + y *= pow (2.0, e2 - DBL_MAX_EXP + 1); + e2 = DBL_MAX_EXP - 1; + } + else if (e2 <= DBL_MIN_EXP) + { + y *= pow (2.0, e2 - DBL_MIN_EXP - 1); + e2 = DBL_MIN_EXP + 1; + } + + p2 = pow (2.0, e2); + return y * p2; + } +} + +double +gsl_frexp (const double x, int *e) +{ + if (x == 0.0) + { + *e = 0; + return 0.0; + } + else if (!finite (x)) + { + *e = 0; + return x; + } + else if (fabs (x) >= 0.5 && fabs (x) < 1) /* Handle the common case */ + { + *e = 0; + return x; + } + else + { + double ex = ceil (log (fabs (x)) / M_LN2); + int ei = (int) ex; + double f; + + /* Prevent underflow and overflow of 2**(-ei) */ + if (ei < DBL_MIN_EXP) + ei = DBL_MIN_EXP; + + if (ei > -DBL_MIN_EXP) + ei = -DBL_MIN_EXP; + + f = x * pow (2.0, -ei); + + if (!finite (f)) + { + /* This should not happen */ + *e = 0; + return f; + } + + while (fabs (f) >= 1.0) + { + ei++; + f /= 2.0; + } + + while (fabs (f) > 0 && fabs (f) < 0.5) + { + ei--; + f *= 2.0; + } + + *e = ei; + return f; + } +} diff --git a/software/gsl-1.15/sys/log1p.c b/software/gsl-1.15/sys/log1p.c new file mode 100644 index 000000000..e6d706684 --- /dev/null +++ b/software/gsl-1.15/sys/log1p.c @@ -0,0 +1,30 @@ +/* sys/log1p.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +double gsl_log1p (const double x) +{ + volatile double y, z; + y = 1 + x; + z = y - 1; + return log(y) - (z-x)/y ; /* cancels errors with IEEE arithmetic */ +} diff --git a/software/gsl-1.15/sys/minmax.c b/software/gsl-1.15/sys/minmax.c new file mode 100644 index 000000000..ade4f4558 --- /dev/null +++ b/software/gsl-1.15/sys/minmax.c @@ -0,0 +1,39 @@ +/* sys/minmax.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + +/* Define some static functions which are always available */ + +double gsl_max (double a, double b) +{ + return GSL_MAX (a, b); +} + +double gsl_min (double a, double b) +{ + return GSL_MIN (a, b); +} + diff --git a/software/gsl-1.15/sys/pow_int.c b/software/gsl-1.15/sys/pow_int.c new file mode 100644 index 000000000..26c7fff73 --- /dev/null +++ b/software/gsl-1.15/sys/pow_int.c @@ -0,0 +1,56 @@ +/* sys/pow_int.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + +double gsl_pow_int(double x, int n) +{ + unsigned int un; + + if(n < 0) { + x = 1.0/x; + un = -n; + } else { + un = n; + } + + return gsl_pow_uint(x, un); +} + +double gsl_pow_uint(double x, unsigned int n) +{ + double value = 1.0; + + /* repeated squaring method + * returns 0.0^0 = 1.0, so continuous in x + */ + do { + if(n & 1) value *= x; /* for n odd */ + n >>= 1; + x *= x; + } while (n); + + return value; +} diff --git a/software/gsl-1.15/sys/prec.c b/software/gsl-1.15/sys/prec.c new file mode 100644 index 000000000..f5bb0ad7d --- /dev/null +++ b/software/gsl-1.15/sys/prec.c @@ -0,0 +1,67 @@ +/* sys/prec.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include +#include + +const double gsl_prec_eps[_GSL_PREC_T_NUM] = { + GSL_DBL_EPSILON, + GSL_FLT_EPSILON, + GSL_SFLT_EPSILON +}; + +const double gsl_prec_sqrt_eps[_GSL_PREC_T_NUM] = { + GSL_SQRT_DBL_EPSILON, + GSL_SQRT_FLT_EPSILON, + GSL_SQRT_SFLT_EPSILON +}; + +const double gsl_prec_root3_eps[_GSL_PREC_T_NUM] = { + GSL_ROOT3_DBL_EPSILON, + GSL_ROOT3_FLT_EPSILON, + GSL_ROOT3_SFLT_EPSILON +}; + +const double gsl_prec_root4_eps[_GSL_PREC_T_NUM] = { + GSL_ROOT4_DBL_EPSILON, + GSL_ROOT4_FLT_EPSILON, + GSL_ROOT4_SFLT_EPSILON +}; + +const double gsl_prec_root5_eps[_GSL_PREC_T_NUM] = { + GSL_ROOT5_DBL_EPSILON, + GSL_ROOT5_FLT_EPSILON, + GSL_ROOT5_SFLT_EPSILON +}; + +const double gsl_prec_root6_eps[_GSL_PREC_T_NUM] = { + GSL_ROOT6_DBL_EPSILON, + GSL_ROOT6_FLT_EPSILON, + GSL_ROOT6_SFLT_EPSILON +}; + diff --git a/software/gsl-1.15/sys/test.c b/software/gsl-1.15/sys/test.c new file mode 100644 index 000000000..99255cbef --- /dev/null +++ b/software/gsl-1.15/sys/test.c @@ -0,0 +1,624 @@ +/* sys/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +int +main (void) +{ + double y, y_expected; + int e, e_expected; + + gsl_ieee_env_setup (); + + /* Test for expm1 */ + + y = gsl_expm1 (0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.0)"); + + y = gsl_expm1 (1e-10); + y_expected = 1.000000000050000000002e-10; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(1e-10)"); + + y = gsl_expm1 (-1e-10); + y_expected = -9.999999999500000000017e-11; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-1e-10)"); + + y = gsl_expm1 (0.1); + y_expected = 0.1051709180756476248117078264902; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.1)"); + + y = gsl_expm1 (-0.1); + y_expected = -0.09516258196404042683575094055356; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-0.1)"); + + y = gsl_expm1 (10.0); + y_expected = 22025.465794806716516957900645284; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(10.0)"); + + y = gsl_expm1 (-10.0); + y_expected = -0.99995460007023751514846440848444; + gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-10.0)"); + + /* Test for log1p */ + + y = gsl_log1p (0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.0)"); + + y = gsl_log1p (1e-10); + y_expected = 9.9999999995000000000333333333308e-11; + gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(1e-10)"); + + y = gsl_log1p (0.1); + y_expected = 0.095310179804324860043952123280765; + gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.1)"); + + y = gsl_log1p (10.0); + y_expected = 2.3978952727983705440619435779651; + gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(10.0)"); + + /* Test for gsl_hypot */ + + y = gsl_hypot (0.0, 0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(0.0, 0.0)"); + + y = gsl_hypot (1e-10, 1e-10); + y_expected = 1.414213562373095048801688e-10; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, 1e-10)"); + + y = gsl_hypot (1e-38, 1e-38); + y_expected = 1.414213562373095048801688e-38; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-38, 1e-38)"); + + y = gsl_hypot (1e-10, -1.0); + y_expected = 1.000000000000000000005; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, -1)"); + + y = gsl_hypot (-1.0, 1e-10); + y_expected = 1.000000000000000000005; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(-1, 1e-10)"); + + y = gsl_hypot (1e307, 1e301); + y_expected = 1.000000000000499999999999e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e301)"); + + y = gsl_hypot (1e301, 1e307); + y_expected = 1.000000000000499999999999e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e301, 1e307)"); + + y = gsl_hypot (1e307, 1e307); + y_expected = 1.414213562373095048801688e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e307)"); + + /* Test for gsl_hypot3 */ + + y = gsl_hypot3 (0.0, 0.0, 0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(0.0, 0.0, 0.0)"); + + y = gsl_hypot3 (1e-10, 1e-10, 1e-10); + y_expected = 1.732050807568877293527446e-10; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e-10, 1e-10, 1e-10)"); + + y = gsl_hypot3 (1e-38, 1e-38, 1e-38); + y_expected = 1.732050807568877293527446e-38; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e-38, 1e-38, 1e-38)"); + + y = gsl_hypot3 (1e-10, 1e-10, -1.0); + y_expected = 1.000000000000000000099; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e-10, 1e-10, -1)"); + + y = gsl_hypot3 (1e-10, -1.0, 1e-10); + y_expected = 1.000000000000000000099; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e-10, -1, 1e-10)"); + + y = gsl_hypot3 (-1.0, 1e-10, 1e-10); + y_expected = 1.000000000000000000099; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(-1, 1e-10, 1e-10)"); + + y = gsl_hypot3 (1e307, 1e301, 1e301); + y_expected = 1.0000000000009999999999995e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e307, 1e301, 1e301)"); + + y = gsl_hypot3 (1e307, 1e307, 1e307); + y_expected = 1.732050807568877293527446e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e307, 1e307, 1e307)"); + + y = gsl_hypot3 (1e307, 1e-307, 1e-307); + y_expected = 1.0e307; + gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot3(1e307, 1e-307, 1e-307)"); + + /* Test for acosh */ + + y = gsl_acosh (1.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.0)"); + + y = gsl_acosh (1.1); + y_expected = 4.435682543851151891329110663525e-1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.1)"); + + y = gsl_acosh (10.0); + y_expected = 2.9932228461263808979126677137742e0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(10.0)"); + + y = gsl_acosh (1e10); + y_expected = 2.3718998110500402149594646668302e1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1e10)"); + + /* Test for asinh */ + + y = gsl_asinh (0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.0)"); + + y = gsl_asinh (1e-10); + y_expected = 9.9999999999999999999833333333346e-11; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); + + y = gsl_asinh (-1e-10); + y_expected = -9.9999999999999999999833333333346e-11; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); + + y = gsl_asinh (0.1); + y_expected = 9.983407889920756332730312470477e-2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.1)"); + + y = gsl_asinh (-0.1); + y_expected = -9.983407889920756332730312470477e-2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-0.1)"); + + y = gsl_asinh (1.0); + y_expected = 8.8137358701954302523260932497979e-1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1.0)"); + + y = gsl_asinh (-1.0); + y_expected = -8.8137358701954302523260932497979e-1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1.0)"); + + y = gsl_asinh (10.0); + y_expected = 2.9982229502979697388465955375965e0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(10)"); + + y = gsl_asinh (-10.0); + y_expected = -2.9982229502979697388465955375965e0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-10)"); + + y = gsl_asinh (1e10); + y_expected = 2.3718998110500402149599646668302e1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e10)"); + + y = gsl_asinh (-1e10); + y_expected = -2.3718998110500402149599646668302e1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1e10)"); + + /* Test for atanh */ + + y = gsl_atanh (0.0); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.0)"); + + y = gsl_atanh (1e-20); + y_expected = 1e-20; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(1e-20)"); + + y = gsl_atanh (-1e-20); + y_expected = -1e-20; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-1e-20)"); + + y = gsl_atanh (0.1); + y_expected = 1.0033534773107558063572655206004e-1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.1)"); + + y = gsl_atanh (-0.1); + y_expected = -1.0033534773107558063572655206004e-1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-0.1)"); + + y = gsl_atanh (0.9); + y_expected = 1.4722194895832202300045137159439e0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); + + y = gsl_atanh (-0.9); + y_expected = -1.4722194895832202300045137159439e0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); + + /* Test for pow_int */ + + y = gsl_pow_2 (-3.14); + y_expected = pow (-3.14, 2.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_2(-3.14)"); + + y = gsl_pow_3 (-3.14); + y_expected = pow (-3.14, 3.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_3(-3.14)"); + + y = gsl_pow_4 (-3.14); + y_expected = pow (-3.14, 4.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_4(-3.14)"); + + y = gsl_pow_5 (-3.14); + y_expected = pow (-3.14, 5.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_5(-3.14)"); + + y = gsl_pow_6 (-3.14); + y_expected = pow (-3.14, 6.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_6(-3.14)"); + + y = gsl_pow_7 (-3.14); + y_expected = pow (-3.14, 7.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_7(-3.14)"); + + y = gsl_pow_8 (-3.14); + y_expected = pow (-3.14, 8.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_8(-3.14)"); + + y = gsl_pow_9 (-3.14); + y_expected = pow (-3.14, 9.0); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_9(-3.14)"); + + { + int n; + for (n = -9; n < 10; n++) + { + y = gsl_pow_int (-3.14, n); + y_expected = pow (-3.14, n); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_int(-3.14,%d)", n); + } + } + + + { + unsigned int n; + for (n = 0; n < 10; n++) + { + y = gsl_pow_uint (-3.14, n); + y_expected = pow (-3.14, n); + gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_uint(-3.14,%d)", n); + } + } + + /* Test case for n at INT_MAX, INT_MIN */ + + { + double u = 1.0000001; + int n = INT_MAX; + y = gsl_pow_int (u, n); + y_expected = pow (u, n); + gsl_test_rel (y, y_expected, 1e-6, "gsl_pow_int(%.7f,%d)", u, n); + + n = INT_MIN; + y = gsl_pow_int (u, n); + y_expected = pow (u, n); + gsl_test_rel (y, y_expected, 1e-6, "gsl_pow_int(%.7f,%d)", u, n); + } + + /* Test for ldexp */ + + y = gsl_ldexp (M_PI, -2); + y_expected = M_PI_4; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(pi,-2)"); + + y = gsl_ldexp (1.0, 2); + y_expected = 4.000000; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(1.0,2)"); + + y = gsl_ldexp (0.0, 2); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(0.0,2)"); + + y = gsl_ldexp (9.999999999999998890e-01, 1024); + y_expected = GSL_DBL_MAX; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp DBL_MAX"); + + y = gsl_ldexp (1e308, -2000); + y_expected = 8.7098098162172166755761e-295; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(1e308,-2000)"); + + y = gsl_ldexp (GSL_DBL_MIN, 2000); + y_expected = 2.554675596204441378334779940e294; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(DBL_MIN,2000)"); + + /* Test subnormals */ + + { + int i = 0; + volatile double x = GSL_DBL_MIN; + y_expected = 2.554675596204441378334779940e294; + + x /= 2; + while (x > 0) + { + i++ ; + y = gsl_ldexp (x, 2000 + i); + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(DBL_MIN/2**%d,%d)",i,2000+i); + x /= 2; + } + } + + + /* Test for frexp */ + + y = gsl_frexp (0.0, &e); + y_expected = 0; + e_expected = 0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(0) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(0) exponent"); + + y = gsl_frexp (M_PI, &e); + y_expected = M_PI_4; + e_expected = 2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(pi) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(pi) exponent"); + + y = gsl_frexp (2.0, &e); + y_expected = 0.5; + e_expected = 2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(2.0) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(2.0) exponent"); + + y = gsl_frexp (1.0 / 4.0, &e); + y_expected = 0.5; + e_expected = -1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(0.25) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(0.25) exponent"); + + y = gsl_frexp (1.0 / 4.0 - 4.0 * GSL_DBL_EPSILON, &e); + y_expected = 0.999999999999996447; + e_expected = -2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(0.25-eps) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(0.25-eps) exponent"); + + y = gsl_frexp (GSL_DBL_MAX, &e); + y_expected = 9.999999999999998890e-01; + e_expected = 1024; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(DBL_MAX) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(DBL_MAX) exponent"); + + y = gsl_frexp (-GSL_DBL_MAX, &e); + y_expected = -9.999999999999998890e-01; + e_expected = 1024; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(-DBL_MAX) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(-DBL_MAX) exponent"); + + y = gsl_frexp (GSL_DBL_MIN, &e); + y_expected = 0.5; + e_expected = -1021; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(DBL_MIN) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(DBL_MIN) exponent"); + + y = gsl_frexp (-GSL_DBL_MIN, &e); + y_expected = -0.5; + e_expected = -1021; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(-DBL_MIN) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(-DBL_MIN) exponent"); + + /* Test subnormals */ + + { + int i = 0; + volatile double x = GSL_DBL_MIN; + y_expected = 0.5; + e_expected = -1021; + + x /= 2; + + while (x > 0) + { + e_expected--; + i++ ; + + y = gsl_frexp (x, &e); + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(DBL_MIN/2**%d) fraction",i); + gsl_test_int (e, e_expected, "gsl_frexp(DBL_MIN/2**%d) exponent", i); + x /= 2; + } + } + + + /* Test for approximate floating point comparison */ + { + double x, y; + int i; + + x = M_PI; + y = 22.0 / 7.0; + + /* test the basic function */ + + for (i = 0; i < 10; i++) + { + double tol = pow (10, -i); + int res = gsl_fcmp (x, y, tol); + gsl_test_int (res, -(i >= 4), "gsl_fcmp(%.5f,%.5f,%g)", x, y, tol); + } + + for (i = 0; i < 10; i++) + { + double tol = pow (10, -i); + int res = gsl_fcmp (y, x, tol); + gsl_test_int (res, (i >= 4), "gsl_fcmp(%.5f,%.5f,%g)", y, x, tol); + } + } + + +#if HAVE_IEEE_COMPARISONS + /* Test for isinf, isnan, finite */ + + { + double zero, one, inf, nan; + int s; + + zero = 0.0; + one = 1.0; + inf = exp (1.0e10); + nan = inf / inf; + + s = gsl_isinf (zero); + gsl_test_int (s, 0, "gsl_isinf(0)"); + + s = gsl_isinf (one); + gsl_test_int (s, 0, "gsl_isinf(1)"); + + s = gsl_isinf (inf); + gsl_test_int (s, 1, "gsl_isinf(inf)"); + + s = gsl_isinf (-inf); + gsl_test_int (s, -1, "gsl_isinf(-inf)"); + + s = gsl_isinf (nan); + gsl_test_int (s, 0, "gsl_isinf(nan)"); + + + s = gsl_isnan (zero); + gsl_test_int (s, 0, "gsl_isnan(0)"); + + s = gsl_isnan (one); + gsl_test_int (s, 0, "gsl_isnan(1)"); + + s = gsl_isnan (inf); + gsl_test_int (s, 0, "gsl_isnan(inf)"); + + s = gsl_isnan (-inf); + gsl_test_int (s, 0, "gsl_isnan(-inf)"); + + s = gsl_isnan (nan); + gsl_test_int (s, 1, "gsl_isnan(nan)"); + + + s = gsl_finite (zero); + gsl_test_int (s, 1, "gsl_finite(0)"); + + s = gsl_finite (one); + gsl_test_int (s, 1, "gsl_finite(1)"); + + s = gsl_finite (inf); + gsl_test_int (s, 0, "gsl_finite(inf)"); + + s = gsl_finite (-inf); + gsl_test_int (s, 0, "gsl_finite(-inf)"); + + s = gsl_finite (nan); + gsl_test_int (s, 0, "gsl_finite(nan)"); + } +#endif + + + { + double x = gsl_fdiv (2.0, 3.0); + gsl_test_rel (x, 2.0 / 3.0, 4 * GSL_DBL_EPSILON, "gsl_fdiv(2,3)"); + } + + + /* Test constants in gsl_math.h */ + + { + double x = log(M_E); + gsl_test_rel (x, 1.0, 4 * GSL_DBL_EPSILON, "ln(M_E)"); + } + + { + double x=pow(2.0,M_LOG2E); + gsl_test_rel (x, exp(1.0), 4 * GSL_DBL_EPSILON, "2^M_LOG2E"); + } + + { + double x=pow(10.0,M_LOG10E); + gsl_test_rel (x, exp(1.0), 4 * GSL_DBL_EPSILON, "10^M_LOG10E"); + } + + { + double x=pow(M_SQRT2, 2.0); + gsl_test_rel (x, 2.0, 4 * GSL_DBL_EPSILON, "M_SQRT2^2"); + } + + { + double x=pow(M_SQRT1_2, 2.0); + gsl_test_rel (x, 1.0/2.0, 4 * GSL_DBL_EPSILON, "M_SQRT1_2"); + } + + { + double x=pow(M_SQRT3, 2.0); + gsl_test_rel (x, 3.0, 4 * GSL_DBL_EPSILON, "M_SQRT3^2"); + } + + { + double x = M_PI; + gsl_test_rel (x, 3.1415926535897932384626433832795, 4 * GSL_DBL_EPSILON, "M_PI"); + } + + { + double x = 2 * M_PI_2; + gsl_test_rel (x, M_PI, 4 * GSL_DBL_EPSILON, "2*M_PI_2"); + } + + { + double x = 4 * M_PI_4; + gsl_test_rel (x, M_PI, 4 * GSL_DBL_EPSILON, "4*M_PI_4"); + } + + { + double x = pow(M_SQRTPI, 2.0); + gsl_test_rel (x, M_PI, 4 * GSL_DBL_EPSILON, "M_SQRTPI^2"); + } + + { + double x = pow(M_2_SQRTPI, 2.0); + gsl_test_rel (x, 4/M_PI, 4 * GSL_DBL_EPSILON, "M_SQRTPI^2"); + } + + { + double x = M_1_PI; + gsl_test_rel (x, 1/M_PI, 4 * GSL_DBL_EPSILON, "M_1_SQRTPI"); + } + + { + double x = M_2_PI; + gsl_test_rel (x, 2.0/M_PI, 4 * GSL_DBL_EPSILON, "M_2_PI"); + } + + { + double x = exp(M_LN10); + gsl_test_rel (x, 10, 4 * GSL_DBL_EPSILON, "exp(M_LN10)"); + } + + { + double x = exp(M_LN2); + gsl_test_rel (x, 2, 4 * GSL_DBL_EPSILON, "exp(M_LN2)"); + } + + { + double x = exp(M_LNPI); + gsl_test_rel (x, M_PI, 4 * GSL_DBL_EPSILON, "exp(M_LNPI)"); + } + + { + double x = M_EULER; + gsl_test_rel (x, 0.5772156649015328606065120900824, 4 * GSL_DBL_EPSILON, "M_EULER"); + } + + exit (gsl_test_summary ()); +} diff --git a/software/gsl-1.15/templates_off.h b/software/gsl-1.15/templates_off.h new file mode 100644 index 000000000..9b235adfb --- /dev/null +++ b/software/gsl-1.15/templates_off.h @@ -0,0 +1,92 @@ +#ifdef FUNCTION +#undef FUNCTION +#endif + +#ifdef CONCAT4 +#undef CONCAT4 +#endif + +#ifdef CONCAT4x +#undef CONCAT4x +#endif + +#ifdef CONCAT3 +#undef CONCAT3 +#endif + +#ifdef CONCAT3x +#undef CONCAT3x +#endif + +#ifdef CONCAT2 +#undef CONCAT2 +#endif + +#ifdef CONCAT2x +#undef CONCAT2x +#endif + +#ifdef TYPE +#undef TYPE +#endif + +#ifdef REAL_TYPE +#undef REAL_TYPE +#endif + +#ifdef QUALIFIED_TYPE +#undef QUALIFIED_TYPE +#endif + +#ifdef VIEW +#undef VIEW +#endif + +#ifdef REAL_VIEW +#undef REAL_VIEW +#endif + +#ifdef QUALIFIED_VIEW +#undef QUALIFIED_VIEW +#endif + +#ifdef QUALIFIED_REAL_TYPE +#undef QUALIFIED_REAL_TYPE +#endif + +#ifdef QUALIFIED_REAL_VIEW +#undef QUALIFIED_REAL_VIEW +#endif + +#ifdef USES_LONGDOUBLE +#undef USES_LONGDOUBLE +#endif + +#ifdef SHORT_REAL +#undef SHORT_REAL +#endif + +#ifndef USE_QUALIFIER +#ifdef QUALIFIER +#undef QUALIFIER +#endif +#endif + +#undef BASE +#undef BASE_EPSILON +#undef SHORT +#undef ATOMIC +#undef MULTIPLICITY +#undef IN_FORMAT +#undef OUT_FORMAT +#undef ATOMIC_IO +#undef ZERO +#undef ONE +#undef NAME +#undef STRING +#undef EXPAND +#undef UNSIGNED + +#ifdef FP +#undef FP +#endif diff --git a/software/gsl-1.15/templates_on.h b/software/gsl-1.15/templates_on.h new file mode 100644 index 000000000..cd32eff80 --- /dev/null +++ b/software/gsl-1.15/templates_on.h @@ -0,0 +1,254 @@ +/* If BASE is undefined we use function names like gsl_name() + and assume that we are using doubles. + + If BASE is defined we used function names like gsl_BASE_name() + and use BASE as the base datatype */ + +#if defined(BASE_GSL_COMPLEX_LONG) +#define BASE gsl_complex_long_double +#define SHORT complex_long_double +#define SHORT_REAL long_double +#define ATOMIC long double +#define USES_LONGDOUBLE 1 +#define MULTIPLICITY 2 +#define FP 1 +#define IN_FORMAT "%Lg" +#define OUT_FORMAT "%Lg" +#define ATOMIC_IO ATOMIC +#define ZERO {{0.0L,0.0L}} +#define ONE {{1.0L,0.0L}} +#define BASE_EPSILON GSL_DBL_EPSILON + +#elif defined(BASE_GSL_COMPLEX) +#define BASE gsl_complex +#define SHORT complex +#define SHORT_REAL +#define ATOMIC double +#define MULTIPLICITY 2 +#define FP 1 +#define IN_FORMAT "%lg" +#define OUT_FORMAT "%g" +#define ATOMIC_IO ATOMIC +#define ZERO {{0.0,0.0}} +#define ONE {{1.0,0.0}} +#define BASE_EPSILON GSL_DBL_EPSILON + +#elif defined(BASE_GSL_COMPLEX_FLOAT) +#define BASE gsl_complex_float +#define SHORT complex_float +#define SHORT_REAL float +#define ATOMIC float +#define MULTIPLICITY 2 +#define FP 1 +#define IN_FORMAT "%g" +#define OUT_FORMAT "%g" +#define ATOMIC_IO ATOMIC +#define ZERO {{0.0F,0.0F}} +#define ONE {{1.0F,0.0F}} +#define BASE_EPSILON GSL_FLT_EPSILON + +#elif defined(BASE_LONG_DOUBLE) +#define BASE long double +#define SHORT long_double +#define ATOMIC long double +#define USES_LONGDOUBLE 1 +#define MULTIPLICITY 1 +#define FP 1 +#define IN_FORMAT "%Lg" +#define OUT_FORMAT "%Lg" +#define ATOMIC_IO ATOMIC +#define ZERO 0.0L +#define ONE 1.0L +#define BASE_EPSILON GSL_DBL_EPSILON + +#elif defined(BASE_DOUBLE) +#define BASE double +#define SHORT +#define ATOMIC double +#define MULTIPLICITY 1 +#define FP 1 +#define IN_FORMAT "%lg" +#define OUT_FORMAT "%g" +#define ATOMIC_IO ATOMIC +#define ZERO 0.0 +#define ONE 1.0 +#define BASE_EPSILON GSL_DBL_EPSILON + +#elif defined(BASE_FLOAT) +#define BASE float +#define SHORT float +#define ATOMIC float +#define MULTIPLICITY 1 +#define FP 1 +#define IN_FORMAT "%g" +#define OUT_FORMAT "%g" +#define ATOMIC_IO ATOMIC +#define ZERO 0.0F +#define ONE 1.0F +#define BASE_EPSILON GSL_FLT_EPSILON + +#elif defined(BASE_ULONG) +#define BASE unsigned long +#define SHORT ulong +#define ATOMIC unsigned long +#define MULTIPLICITY 1 +#define IN_FORMAT "%lu" +#define OUT_FORMAT "%lu" +#define ATOMIC_IO ATOMIC +#define ZERO 0UL +#define ONE 1UL +#define UNSIGNED 1 + +#elif defined(BASE_LONG) +#define BASE long +#define SHORT long +#define ATOMIC long +#define MULTIPLICITY 1 +#define IN_FORMAT "%ld" +#define OUT_FORMAT "%ld" +#define ATOMIC_IO ATOMIC +#define ZERO 0L +#define ONE 1L + +#elif defined(BASE_UINT) +#define BASE unsigned int +#define SHORT uint +#define ATOMIC unsigned int +#define MULTIPLICITY 1 +#define IN_FORMAT "%u" +#define OUT_FORMAT "%u" +#define ATOMIC_IO ATOMIC +#define ZERO 0U +#define ONE 1U +#define UNSIGNED 1 + +#elif defined(BASE_INT) +#define BASE int +#define SHORT int +#define ATOMIC int +#define MULTIPLICITY 1 +#define IN_FORMAT "%d" +#define OUT_FORMAT "%d" +#define ATOMIC_IO ATOMIC +#define ZERO 0 +#define ONE 1 + +#elif defined(BASE_USHORT) +#define BASE unsigned short +#define SHORT ushort +#define ATOMIC unsigned short +#define MULTIPLICITY 1 +#define IN_FORMAT "%hu" +#define OUT_FORMAT "%hu" +#define ATOMIC_IO ATOMIC +#define ZERO 0U +#define ONE 1U +#define UNSIGNED 1 + +#elif defined(BASE_SHORT) +#define BASE short +#define SHORT short +#define ATOMIC short +#define MULTIPLICITY 1 +#define IN_FORMAT "%hd" +#define OUT_FORMAT "%hd" +#define ATOMIC_IO ATOMIC +#define ZERO 0 +#define ONE 1 + +#elif defined(BASE_UCHAR) +#define BASE unsigned char +#define SHORT uchar +#define ATOMIC unsigned char +#define MULTIPLICITY 1 +#define IN_FORMAT "%u" +#define OUT_FORMAT "%u" +#define ATOMIC_IO unsigned int +#define ZERO 0U +#define ONE 1U +#define UNSIGNED 1 + +#elif defined(BASE_CHAR) +#define BASE char +#define SHORT char +#define ATOMIC char +#define MULTIPLICITY 1 +#define IN_FORMAT "%d" +#define OUT_FORMAT "%d" +#define ATOMIC_IO int +#define ZERO 0 +#define ONE 1 +#ifdef __CHAR_UNSIGNED__ +#define UNSIGNED 1 +#endif + +#else +#error unknown BASE_ directive in source.h +#endif + +#define CONCAT2x(a,b) a ## _ ## b +#define CONCAT2(a,b) CONCAT2x(a,b) +#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c +#define CONCAT3(a,b,c) CONCAT3x(a,b,c) +#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d +#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d) + +#ifndef USE_QUALIFIER +#define QUALIFIER +#endif + +#ifdef USE_QUALIFIER +#if defined(BASE_DOUBLE) +#define FUNCTION(dir,name) CONCAT3(dir,QUALIFIER,name) +#define TYPE(dir) dir +#define VIEW(dir,name) CONCAT2(dir,name) +#define QUALIFIED_TYPE(dir) QUALIFIER dir +#define QUALIFIED_VIEW(dir,name) CONCAT3(dir,QUALIFIER,name) +#else +#define FUNCTION(a,c) CONCAT4(a,SHORT,QUALIFIER,c) +#define TYPE(dir) CONCAT2(dir,SHORT) +#define VIEW(dir,name) CONCAT3(dir,SHORT,name) +#define QUALIFIED_TYPE(dir) QUALIFIER CONCAT2(dir,SHORT) +#define QUALIFIED_VIEW(dir,name) CONCAT4(dir,SHORT,QUALIFIER,name) +#endif +#if defined(BASE_GSL_COMPLEX) +#define REAL_TYPE(dir) dir +#define REAL_VIEW(dir,name) CONCAT2(dir,name) +#define QUALIFIED_REAL_TYPE(dir) QUALIFIER dir +#define QUALIFIED_REAL_VIEW(dir,name) CONCAT3(dir,QUALIFIER,name) +#else +#define REAL_TYPE(dir) CONCAT2(dir,SHORT_REAL) +#define REAL_VIEW(dir,name) CONCAT3(dir,SHORT_REAL,name) +#define QUALIFIED_REAL_TYPE(dir) QUALIFIER CONCAT2(dir,SHORT_REAL) +#define QUALIFIED_REAL_VIEW(dir,name) CONCAT4(dir,SHORT_REAL,QUALIFIER,name) +#endif +#else +#if defined(BASE_DOUBLE) +#define FUNCTION(dir,name) CONCAT2(dir,name) +#define TYPE(dir) dir +#define VIEW(dir,name) CONCAT2(dir,name) +#define QUALIFIED_TYPE(dir) TYPE(dir) +#define QUALIFIED_VIEW(dir,name) CONCAT2(dir,name) +#else +#define FUNCTION(a,c) CONCAT3(a,SHORT,c) +#define TYPE(dir) CONCAT2(dir,SHORT) +#define VIEW(dir,name) CONCAT3(dir,SHORT,name) +#define QUALIFIED_TYPE(dir) TYPE(dir) +#define QUALIFIED_VIEW(dir,name) CONCAT3(dir,SHORT,name) +#endif +#if defined(BASE_GSL_COMPLEX) +#define REAL_TYPE(dir) dir +#define REAL_VIEW(dir,name) CONCAT2(dir,name) +#define QUALIFIED_REAL_TYPE(dir) dir +#define QUALIFIED_REAL_VIEW(dir,name) CONCAT2(dir,name) +#else +#define REAL_TYPE(dir) CONCAT2(dir,SHORT_REAL) +#define REAL_VIEW(dir,name) CONCAT3(dir,SHORT_REAL,name) +#define QUALIFIED_REAL_TYPE(dir) CONCAT2(dir,SHORT_REAL) +#define QUALIFIED_REAL_VIEW(dir,name) CONCAT3(dir,SHORT_REAL,name) +#endif +#endif + +#define STRING(x) #x +#define EXPAND(x) STRING(x) +#define NAME(x) EXPAND(TYPE(x)) diff --git a/software/gsl-1.15/test/.deps/results.Plo b/software/gsl-1.15/test/.deps/results.Plo new file mode 100644 index 000000000..714e0d848 --- /dev/null +++ b/software/gsl-1.15/test/.deps/results.Plo @@ -0,0 +1,118 @@ +results.lo: results.c ../config.h /usr/include/math.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/string.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/machine/_types.h /usr/include/i386/_types.h \ + /usr/include/strings.h /usr/include/secure/_string.h \ + /usr/include/secure/_common.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_sys.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h \ + /usr/bin/../lib/clang/4.1/include/stdarg.h ../gsl/gsl_test.h + +../config.h: + +/usr/include/math.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/string.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/strings.h: + +/usr/include/secure/_string.h: + +/usr/include/secure/_common.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +/usr/bin/../lib/clang/4.1/include/stdarg.h: + +../gsl/gsl_test.h: diff --git a/software/gsl-1.15/test/ChangeLog b/software/gsl-1.15/test/ChangeLog new file mode 100644 index 000000000..b93407d60 --- /dev/null +++ b/software/gsl-1.15/test/ChangeLog @@ -0,0 +1,32 @@ +2005-06-21 Brian Gough + + * results.c: now displayed PASS lines only if GSL_TEST_VERBOSE=1, + otherwise only display fail lines by default. + +Thu Sep 12 22:56:31 2002 Brian Gough + + * results.c (gsl_test_rel): catch NaN + (gsl_test_abs): catch NaN + +Fri Sep 28 10:40:21 2001 Brian Gough + + * results.c: use the definition STDC_HEADERS instead of __STDC__ + as recommended by the autoconf manual + +Thu Sep 6 10:17:10 2001 Brian Gough + + * results.c (gsl_test_factor): fixed factor to work for case of + 0==0 without dividing by zero + +Wed Nov 29 10:42:57 2000 Brian Gough + + * results.c (gsl_test_factor): added a test for two results being + within a given factor of each other (e.g. "result should be good + to within a factor of 2"). Note that this is different from the + definition of relative error, which starts with a measurement of + the difference by subtraction. + +Fri May 5 11:20:36 2000 Brian Gough + + * split out gsl_test code from err/ directory + diff --git a/software/gsl-1.15/test/Makefile.am b/software/gsl-1.15/test/Makefile.am new file mode 100644 index 000000000..b6fe04dec --- /dev/null +++ b/software/gsl-1.15/test/Makefile.am @@ -0,0 +1,10 @@ +noinst_LTLIBRARIES = libgsltest.la + +pkginclude_HEADERS = gsl_test.h + +libgsltest_la_SOURCES = results.c + +#check_PROGRAMS = test +#TESTS = test +#test_SOURCES = test_errnos.c +#test_LDADD = libgsltest.la ../sys/libgslsys.la ../utils/libutils.la diff --git a/software/gsl-1.15/test/Makefile.in b/software/gsl-1.15/test/Makefile.in new file mode 100644 index 000000000..fb13a140d --- /dev/null +++ b/software/gsl-1.15/test/Makefile.in @@ -0,0 +1,546 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = test +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgsltest_la_LIBADD = +am_libgsltest_la_OBJECTS = results.lo +libgsltest_la_OBJECTS = $(am_libgsltest_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgsltest_la_SOURCES) +DIST_SOURCES = $(libgsltest_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgsltest.la +pkginclude_HEADERS = gsl_test.h +libgsltest_la_SOURCES = results.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgsltest.la: $(libgsltest_la_OBJECTS) $(libgsltest_la_DEPENDENCIES) + $(LINK) $(libgsltest_la_OBJECTS) $(libgsltest_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/results.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +#check_PROGRAMS = test +#TESTS = test +#test_SOURCES = test_errnos.c +#test_LDADD = libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/test/gsl_test.h b/software/gsl-1.15/test/gsl_test.h new file mode 100644 index 000000000..bb86896ce --- /dev/null +++ b/software/gsl-1.15/test/gsl_test.h @@ -0,0 +1,66 @@ +/* err/gsl_test.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_TEST_H__ +#define __GSL_TEST_H__ + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +void + gsl_test (int status, const char *test_description, ...); + +void +gsl_test_rel (double result, double expected, double relative_error, + const char *test_description, ...) ; + +void +gsl_test_abs (double result, double expected, double absolute_error, + const char *test_description, ...) ; + +void +gsl_test_factor (double result, double expected, double factor, + const char *test_description, ...) ; + +void +gsl_test_int (int result, int expected, const char *test_description, ...) ; + +void +gsl_test_str (const char * result, const char * expected, + const char *test_description, ...) ; + +void + gsl_test_verbose (int verbose) ; + +int + gsl_test_summary (void) ; + + +__END_DECLS + +#endif /* __GSL_TEST_H__ */ diff --git a/software/gsl-1.15/test/results.c b/software/gsl-1.15/test/results.c new file mode 100644 index 000000000..0e37effcd --- /dev/null +++ b/software/gsl-1.15/test/results.c @@ -0,0 +1,461 @@ +/* err/test_results.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#if HAVE_VPRINTF +#ifdef STDC_HEADERS +#include +#else +#include +#endif +#endif + +#include + +static unsigned int tests = 0; +static unsigned int passed = 0; +static unsigned int failed = 0; + +static unsigned int verbose = 0; + +static void +initialise (void) +{ + const char * p = getenv("GSL_TEST_VERBOSE"); + + /* 0 = show failures only (we always want to see these) */ + /* 1 = show passes and failures */ + + if (p == 0) /* environment variable is not set */ + return ; + + if (*p == '\0') /* environment variable is empty */ + return ; + + verbose = strtoul (p, 0, 0); + + return; +} + +static void +update (int s) +{ + tests++; + + if (s == 0) + { + passed++; + } + else + { + failed++; + } +} + +void +gsl_test (int status, const char *test_description,...) +{ + if (!tests) initialise(); + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + + if (status && !verbose) + printf(" [%u]", tests); + + printf("\n"); + fflush (stdout); + } +} + + +void +gsl_test_rel (double result, double expected, double relative_error, + const char *test_description,...) +{ + int status ; + + if (!tests) initialise(); + + /* Check for NaN vs inf vs number */ + + if (gsl_isnan(result) || gsl_isnan(expected)) + { + status = gsl_isnan(result) != gsl_isnan(expected); + } + else if (gsl_isinf(result) || gsl_isinf(expected)) + { + status = gsl_isinf(result) != gsl_isinf(expected); + } + else if ((expected > 0 && expected < GSL_DBL_MIN) + || (expected < 0 && expected > -(GSL_DBL_MIN))) + { + status = -1; + } + else if (expected != 0 ) + { + status = (fabs(result-expected)/fabs(expected) > relative_error) ; + } + else + { + status = (fabs(result) > relative_error) ; + } + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + + if (status == 0) + { + if (strlen(test_description) < 45) + { + printf(" (%g observed vs %g expected)", result, expected) ; + } + else + { + printf(" (%g obs vs %g exp)", result, expected) ; + } + } + else + { + printf(" (%.18g observed vs %.18g expected)", result, expected) ; + } + + if (status == -1) + { + printf(" [test uses subnormal value]") ; + } + + if (status && !verbose) + printf(" [%u]", tests); + + printf ("\n") ; + fflush (stdout); + } +} + +void +gsl_test_abs (double result, double expected, double absolute_error, + const char *test_description,...) +{ + int status ; + + if (!tests) initialise(); + + /* Check for NaN vs inf vs number */ + + if (gsl_isnan(result) || gsl_isnan(expected)) + { + status = gsl_isnan(result) != gsl_isnan(expected); + } + else if (gsl_isinf(result) || gsl_isinf(expected)) + { + status = gsl_isinf(result) != gsl_isinf(expected); + } + else if ((expected > 0 && expected < GSL_DBL_MIN) + || (expected < 0 && expected > -(GSL_DBL_MIN))) + { + status = -1; + } + else + { + status = fabs(result-expected) > absolute_error ; + } + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; + +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + + if (status == 0) + { + if (strlen(test_description) < 45) + { + printf(" (%g observed vs %g expected)", result, expected) ; + } + else + { + printf(" (%g obs vs %g exp)", result, expected) ; + } + } + else + { + printf(" (%.18g observed vs %.18g expected)", result, expected) ; + } + + if (status == -1) + { + printf(" [test uses subnormal value]") ; + } + + if (status && !verbose) + printf(" [%u]", tests); + + printf ("\n") ; + fflush (stdout); + } +} + + +void +gsl_test_factor (double result, double expected, double factor, + const char *test_description,...) +{ + int status; + + if (!tests) initialise(); + + if ((expected > 0 && expected < GSL_DBL_MIN) + || (expected < 0 && expected > -(GSL_DBL_MIN))) + { + status = -1; + } + else if (result == expected) + { + status = 0; + } + else if (expected == 0.0) + { + status = (result > expected || result < expected); + } + else + { + double u = result / expected; + status = (u > factor || u < 1.0 / factor) ; + } + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; + +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + if (status == 0) + { + if (strlen(test_description) < 45) + { + printf(" (%g observed vs %g expected)", result, expected) ; + } + else + { + printf(" (%g obs vs %g exp)", result, expected) ; + } + } + else + { + printf(" (%.18g observed vs %.18g expected)", result, expected) ; + } + + if (status == -1) + { + printf(" [test uses subnormal value]") ; + } + + if (status && !verbose) + printf(" [%u]", tests); + + printf ("\n") ; + fflush (stdout); + } +} + +void +gsl_test_int (int result, int expected, const char *test_description,...) +{ + int status = (result != expected) ; + + if (!tests) initialise(); + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; + +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + if (status == 0) + { + printf(" (%d observed vs %d expected)", result, expected) ; + } + else + { + printf(" (%d observed vs %d expected)", result, expected) ; + } + + if (status && !verbose) + printf(" [%u]", tests); + + printf ("\n"); + fflush (stdout); + } +} + +void +gsl_test_str (const char * result, const char * expected, + const char *test_description,...) +{ + int status = strcmp(result,expected) ; + + if (!tests) initialise(); + + update (status); + + if (status || verbose) + { + printf (status ? "FAIL: " : "PASS: "); + +#if HAVE_VPRINTF + { + va_list ap; + +#ifdef STDC_HEADERS + va_start (ap, test_description); +#else + va_start (ap); +#endif + vprintf (test_description, ap); + va_end (ap); + } +#endif + if (status) + { + printf(" (%s observed vs %s expected)", result, expected) ; + } + + if (status && !verbose) + printf(" [%u]", tests); + + printf ("\n"); + fflush (stdout); + } +} + +void +gsl_test_verbose (int v) +{ + verbose = v; +} + +int +gsl_test_summary (void) +{ + if (verbose && 0) /* FIXME: turned it off, this annoys me */ + printf ("%d tests, passed %d, failed %d.\n", tests, passed, failed); + + if (failed != 0) + { + return EXIT_FAILURE; + } + + if (tests != passed + failed) + { + if (verbose) + printf ("TEST RESULTS DO NOT ADD UP %d != %d + %d\n", + tests, passed, failed); + return EXIT_FAILURE; + } + + if (passed == tests) + { + if (!verbose) /* display a summary of passed tests */ + printf ("Completed [%d/%d]\n", passed, tests); + + return EXIT_SUCCESS; + } + + return EXIT_FAILURE; +} diff --git a/software/gsl-1.15/test_gsl_histogram.sh b/software/gsl-1.15/test_gsl_histogram.sh new file mode 100755 index 000000000..74116605e --- /dev/null +++ b/software/gsl-1.15/test_gsl_histogram.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +cat > test.exp.1.tmp < test.obs.1.tmp + +cmp test.exp.1.tmp test.obs.1.tmp +STATUS=$? +rm test.exp.1.tmp test.obs.1.tmp + +exit $STATUS diff --git a/software/gsl-1.15/testfile b/software/gsl-1.15/testfile new file mode 100644 index 000000000..1600528de --- /dev/null +++ b/software/gsl-1.15/testfile @@ -0,0 +1,4 @@ +ellint.c:124:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] + const nmax = 10000; + ~~~~~ ^ +1 warning generated. diff --git a/software/gsl-1.15/utils/.deps/memcpy.Po b/software/gsl-1.15/utils/.deps/memcpy.Po new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/software/gsl-1.15/utils/.deps/memcpy.Po @@ -0,0 +1 @@ +# dummy diff --git a/software/gsl-1.15/utils/.deps/memmove.Po b/software/gsl-1.15/utils/.deps/memmove.Po new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/software/gsl-1.15/utils/.deps/memmove.Po @@ -0,0 +1 @@ +# dummy diff --git a/software/gsl-1.15/utils/.deps/placeholder.Plo b/software/gsl-1.15/utils/.deps/placeholder.Plo new file mode 100644 index 000000000..e70f9099b --- /dev/null +++ b/software/gsl-1.15/utils/.deps/placeholder.Plo @@ -0,0 +1 @@ +placeholder.lo: placeholder.c diff --git a/software/gsl-1.15/utils/.deps/strdup.Po b/software/gsl-1.15/utils/.deps/strdup.Po new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/software/gsl-1.15/utils/.deps/strdup.Po @@ -0,0 +1 @@ +# dummy diff --git a/software/gsl-1.15/utils/.deps/strtol.Po b/software/gsl-1.15/utils/.deps/strtol.Po new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/software/gsl-1.15/utils/.deps/strtol.Po @@ -0,0 +1 @@ +# dummy diff --git a/software/gsl-1.15/utils/.deps/strtoul.Po b/software/gsl-1.15/utils/.deps/strtoul.Po new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/software/gsl-1.15/utils/.deps/strtoul.Po @@ -0,0 +1 @@ +# dummy diff --git a/software/gsl-1.15/utils/Makefile.am b/software/gsl-1.15/utils/Makefile.am new file mode 100644 index 000000000..117cf7cea --- /dev/null +++ b/software/gsl-1.15/utils/Makefile.am @@ -0,0 +1,7 @@ +noinst_LTLIBRARIES = libutils.la + +# Don't need to list alloca.c, etc., Automake includes them. +libutils_la_SOURCES = system.h placeholder.c +libutils_la_LIBADD = @LIBOBJS@ + +EXTRA_DIST = README diff --git a/software/gsl-1.15/utils/Makefile.in b/software/gsl-1.15/utils/Makefile.in new file mode 100644 index 000000000..8af43f04b --- /dev/null +++ b/software/gsl-1.15/utils/Makefile.in @@ -0,0 +1,501 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = utils +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + memcpy.c memmove.c strdup.c strtol.c strtoul.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libutils_la_DEPENDENCIES = @LIBOBJS@ +am_libutils_la_OBJECTS = placeholder.lo +libutils_la_OBJECTS = $(am_libutils_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libutils_la_SOURCES) +DIST_SOURCES = $(libutils_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libutils.la + +# Don't need to list alloca.c, etc., Automake includes them. +libutils_la_SOURCES = system.h placeholder.c +libutils_la_LIBADD = @LIBOBJS@ +EXTRA_DIST = README +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu utils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libutils.la: $(libutils_la_OBJECTS) $(libutils_la_DEPENDENCIES) + $(LINK) $(libutils_la_OBJECTS) $(libutils_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memmove.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/placeholder.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/utils/README b/software/gsl-1.15/utils/README new file mode 100644 index 000000000..87073b6c3 --- /dev/null +++ b/software/gsl-1.15/utils/README @@ -0,0 +1,5 @@ +Some common routines. +These were taken from the lib directory of Texinfo-3.11. +Many are common to other GNU packages as well. +(On the FSF machines, check /gd/gnu/lib for the latest.) + diff --git a/software/gsl-1.15/utils/memcpy.c b/software/gsl-1.15/utils/memcpy.c new file mode 100644 index 000000000..4f2933391 --- /dev/null +++ b/software/gsl-1.15/utils/memcpy.c @@ -0,0 +1,20 @@ +/* Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined + if the source overlaps with the destination. + Return DESTADDR. */ + +#if HAVE_CONFIG_H +#include +#endif + +void * +memcpy (destaddr, srcaddr, len) + void *destaddr; + const void *srcaddr; + unsigned int len; +{ + char *dest = (char *) destaddr; + const char *src = srcaddr; + while (len-- > 0) + *dest++ = *src++; + return destaddr; +} diff --git a/software/gsl-1.15/utils/memmove.c b/software/gsl-1.15/utils/memmove.c new file mode 100644 index 000000000..5615f5bf6 --- /dev/null +++ b/software/gsl-1.15/utils/memmove.c @@ -0,0 +1,28 @@ +/* memmove.c -- copy memory. + Copy LENGTH bytes from SOURCE to DEST. Does not null-terminate. + In the public domain. + By David MacKenzie . */ + +#if HAVE_CONFIG_H +#include +#endif + +void * +memmove (destaddr, sourceaddr, length) + void *destaddr; + const void *sourceaddr; + unsigned length; +{ + char *dest = destaddr; + const char *source = sourceaddr; + if (source < dest) + /* Moving from low mem to hi mem; start at end. */ + for (source += length, dest += length; length; --length) + *--dest = *--source; + else if (source != dest) + /* Moving from hi mem to low mem; start at beginning. */ + for (; length; --length) + *dest++ = *source++; + + return destaddr; +} diff --git a/software/gsl-1.15/utils/placeholder.c b/software/gsl-1.15/utils/placeholder.c new file mode 100644 index 000000000..e96ec1aea --- /dev/null +++ b/software/gsl-1.15/utils/placeholder.c @@ -0,0 +1,9 @@ +void +gsl_utils_placeholder (void); + +void +gsl_utils_placeholder (void) +{ + int i = 0; + i++ ; +} diff --git a/software/gsl-1.15/utils/strdup.c b/software/gsl-1.15/utils/strdup.c new file mode 100644 index 000000000..44aaf353d --- /dev/null +++ b/software/gsl-1.15/utils/strdup.c @@ -0,0 +1,43 @@ +/* strdup.c -- return a newly allocated copy of a string + Copyright (C) 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if HAVE_CONFIG_H +#include +#endif + +#ifdef STDC_HEADERS +#include +#include +#else +char *malloc (); +char *strcpy (); +#endif + +/* Return a newly allocated copy of STR, + or 0 if out of memory. */ + +char * +strdup (str) + const char *str; +{ + char *newstr; + + newstr = (char *) malloc (strlen (str) + 1); + if (newstr) + strcpy (newstr, str); + return newstr; +} diff --git a/software/gsl-1.15/utils/strtol.c b/software/gsl-1.15/utils/strtol.c new file mode 100644 index 000000000..7ea9c2395 --- /dev/null +++ b/software/gsl-1.15/utils/strtol.c @@ -0,0 +1,162 @@ +/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. + +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02110-1301, USA. */ + +#include +#include +#include +#include +#include + +#ifndef UNSIGNED +#define UNSIGNED 0 +#endif + +/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. + If BASE is 0 the base is determined by the presence of a leading + zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. + If BASE is < 2 or > 36, it is reset to 10. + If ENDPTR is not NULL, a pointer to the character after the last + one converted is stored in *ENDPTR. */ +#if UNSIGNED +unsigned long int +#define strtol strtoul +#else +long int +#endif +strtol (nptr, endptr, base) + const char *nptr; + char **endptr; + int base; +{ + int negative; + register unsigned long int cutoff; + register unsigned int cutlim; + register unsigned long int i; + register const char *s; + register unsigned char c; + const char *save; + int overflow; + + if (base < 0 || base == 1 || base > 36) + base = 10; + + s = nptr; + + /* Skip white space. */ + while (isspace (*s)) + ++s; + if (*s == '\0') + goto noconv; + + /* Check for a sign. */ + if (*s == '-') + { + negative = 1; + ++s; + } + else if (*s == '+') + { + negative = 0; + ++s; + } + else + negative = 0; + + if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X') + s += 2; + + /* If BASE is zero, figure it out ourselves. */ + if (base == 0) + if (*s == '0') + { + if (toupper (s[1]) == 'X') + { + s += 2; + base = 16; + } + else + base = 8; + } + else + base = 10; + + /* Save the pointer so we can check later if anything happened. */ + save = s; + + cutoff = ULONG_MAX / (unsigned long int) base; + cutlim = ULONG_MAX % (unsigned long int) base; + + overflow = 0; + i = 0; + for (c = *s; c != '\0'; c = *++s) + { + if (isdigit (c)) + c -= '0'; + else if (isalpha (c)) + c = toupper (c) - 'A' + 10; + else + break; + if (c >= base) + break; + /* Check for overflow. */ + if (i > cutoff || (i == cutoff && c > cutlim)) + overflow = 1; + else + { + i *= (unsigned long int) base; + i += c; + } + } + + /* Check if anything actually happened. */ + if (s == save) + goto noconv; + + /* Store in ENDPTR the address of one character + past the last character we converted. */ + if (endptr != NULL) + *endptr = (char *) s; + +#if !UNSIGNED + /* Check for a value that is within the range of + `unsigned long int', but outside the range of `long int'. */ + if (i > (negative ? + -(unsigned long int) LONG_MIN : (unsigned long int) LONG_MAX)) + overflow = 1; +#endif + + if (overflow) + { + errno = ERANGE; +#if UNSIGNED + return ULONG_MAX; +#else + return negative ? LONG_MIN : LONG_MAX; +#endif + } + + /* Return the result of the appropriate sign. */ + return (negative ? -i : i); + +noconv: + /* There was no number to convert. */ + if (endptr != NULL) + *endptr = (char *) nptr; + return 0L; +} diff --git a/software/gsl-1.15/utils/strtoul.c b/software/gsl-1.15/utils/strtoul.c new file mode 100644 index 000000000..a085746e1 --- /dev/null +++ b/software/gsl-1.15/utils/strtoul.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02110-1301, USA. */ + +#define UNSIGNED 1 + +#include diff --git a/software/gsl-1.15/utils/system.h b/software/gsl-1.15/utils/system.h new file mode 100644 index 000000000..f2a9530b5 --- /dev/null +++ b/software/gsl-1.15/utils/system.h @@ -0,0 +1,102 @@ +/* system.h: System-dependent declarations. Include this first. + $Id$ + + Copyright (C) 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef TEXINFO_SYSTEM_H +#define TEXINFO_SYSTEM_H + +#define _GNU_SOURCE + +#include + +/* should be included before any preprocessor test + of _POSIX_VERSION. */ +#if HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ + +#include +#include +#include + +#if HAVE_LOCALE_H +#include +#endif +#include + +/* Don't use bcopy! Use memmove if source and destination may overlap, + memcpy otherwise. */ +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#else +# include +char *memchr (); +#endif + +#ifdef STDC_HEADERS +#define getopt system_getopt +#include +#undef getopt +#else +extern char *getenv (); +#endif + +#ifndef HAVE_STRERROR +extern char *strerror (); +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifdef VMS +#include +#endif + +#include + +#if HAVE_SYS_FILE_H +#include +#endif /* HAVE_SYS_FILE_H */ + +#ifndef O_RDONLY +/* Since is POSIX, prefer that to . + This also avoids some useless warnings on (at least) Linux. */ +#if HAVE_FCNTL_H +#include +#else /* not HAVE_FCNTL_H */ +#if HAVE_SYS_FCNTL_H +#include +#endif /* not HAVE_SYS_FCNTL_H */ +#endif /* not HAVE_FCNTL_H */ +#endif /* not O_RDONLY */ + +#if HAVE_PWD_H +#include +#endif +/* Some systems don't declare this function in pwd.h. */ +struct passwd *getpwnam (); + +/* Our library routines not included in any system library. */ +extern void *xmalloc (), *xrealloc (); +extern char *xstrdup (); + +#endif /* TEXINFO_SYSTEM_H */ diff --git a/software/gsl-1.15/vector/.deps/copy.Plo b/software/gsl-1.15/vector/.deps/copy.Plo new file mode 100644 index 000000000..73ee518a0 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/copy.Plo @@ -0,0 +1,179 @@ +copy.lo: copy.c ../config.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + copy_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +copy_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/file.Plo b/software/gsl-1.15/vector/.deps/file.Plo new file mode 100644 index 000000000..822d510ec --- /dev/null +++ b/software/gsl-1.15/vector/.deps/file.Plo @@ -0,0 +1,180 @@ +file.lo: file.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h ../gsl/gsl_errno.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_block.h \ + ../gsl/gsl_block_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_block_complex_double.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_block_long.h ../gsl/gsl_block_uint.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_block_ushort.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_block_uchar.h ../gsl/gsl_block_char.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_vector_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_vector_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_vector_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_vector_char.h ../templates_on.h \ + file_source.c ../templates_off.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_block.h: + +../gsl/gsl_block_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_vector_char.h: + +../templates_on.h: + +file_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/init.Plo b/software/gsl-1.15/vector/.deps/init.Plo new file mode 100644 index 000000000..6c936caf1 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/init.Plo @@ -0,0 +1,179 @@ +init.lo: init.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + init_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +init_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/minmax.Plo b/software/gsl-1.15/vector/.deps/minmax.Plo new file mode 100644 index 000000000..98b732c5e --- /dev/null +++ b/software/gsl-1.15/vector/.deps/minmax.Plo @@ -0,0 +1,216 @@ +minmax.lo: minmax.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + minmax_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +minmax_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/oper.Plo b/software/gsl-1.15/vector/.deps/oper.Plo new file mode 100644 index 000000000..38532f95a --- /dev/null +++ b/software/gsl-1.15/vector/.deps/oper.Plo @@ -0,0 +1,218 @@ +oper.lo: oper.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/math.h ../gsl/gsl_math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + oper_complex_source.c ../templates_off.h oper_source.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/math.h: + +../gsl/gsl_math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +oper_complex_source.c: + +../templates_off.h: + +oper_source.c: diff --git a/software/gsl-1.15/vector/.deps/prop.Plo b/software/gsl-1.15/vector/.deps/prop.Plo new file mode 100644 index 000000000..d53d2b719 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/prop.Plo @@ -0,0 +1,179 @@ +prop.lo: prop.c ../config.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + prop_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +prop_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/reim.Plo b/software/gsl-1.15/vector/.deps/reim.Plo new file mode 100644 index 000000000..be068d1c6 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/reim.Plo @@ -0,0 +1,181 @@ +reim.lo: reim.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h view.h \ + ../templates_on.h reim_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +view.h: + +../templates_on.h: + +reim_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/subvector.Plo b/software/gsl-1.15/vector/.deps/subvector.Plo new file mode 100644 index 000000000..8ea1814b6 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/subvector.Plo @@ -0,0 +1,181 @@ +subvector.lo: subvector.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h view.h \ + ../templates_on.h subvector_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +view.h: + +../templates_on.h: + +subvector_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/swap.Plo b/software/gsl-1.15/vector/.deps/swap.Plo new file mode 100644 index 000000000..aefcbb463 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/swap.Plo @@ -0,0 +1,179 @@ +swap.lo: swap.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../templates_on.h \ + swap_source.c ../templates_off.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../templates_on.h: + +swap_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/.deps/test.Po b/software/gsl-1.15/vector/.deps/test.Po new file mode 100644 index 000000000..cc2ea639d --- /dev/null +++ b/software/gsl-1.15/vector/.deps/test.Po @@ -0,0 +1,228 @@ +test.o: test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../templates_on.h test_complex_source.c \ + ../templates_off.h test_source.c + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/fcntl.h: + +/usr/include/sys/fcntl.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../templates_on.h: + +test_complex_source.c: + +../templates_off.h: + +test_source.c: diff --git a/software/gsl-1.15/vector/.deps/test_static.Po b/software/gsl-1.15/vector/.deps/test_static.Po new file mode 100644 index 000000000..583b2379d --- /dev/null +++ b/software/gsl-1.15/vector/.deps/test_static.Po @@ -0,0 +1,230 @@ +test_static.o: test_static.c test.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + /usr/include/fcntl.h /usr/include/sys/fcntl.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + ../gsl/gsl_math.h /usr/include/math.h ../gsl/gsl_sys.h \ + ../gsl/gsl_inline.h ../gsl/gsl_machine.h \ + /usr/bin/../lib/clang/4.1/include/limits.h /usr/include/limits.h \ + /usr/include/machine/limits.h /usr/include/i386/limits.h \ + /usr/include/i386/_limits.h /usr/include/sys/syslimits.h \ + /usr/bin/../lib/clang/4.1/include/float.h ../gsl/gsl_precision.h \ + ../gsl/gsl_types.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_vector.h \ + ../gsl/gsl_vector_complex_long_double.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_test.h \ + ../gsl/gsl_ieee_utils.h ../templates_on.h test_complex_source.c \ + ../templates_off.h test_source.c + +test.c: + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +/usr/include/fcntl.h: + +/usr/include/sys/fcntl.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_types.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_test.h: + +../gsl/gsl_ieee_utils.h: + +../templates_on.h: + +test_complex_source.c: + +../templates_off.h: + +test_source.c: diff --git a/software/gsl-1.15/vector/.deps/vector.Plo b/software/gsl-1.15/vector/.deps/vector.Plo new file mode 100644 index 000000000..7bb068669 --- /dev/null +++ b/software/gsl-1.15/vector/.deps/vector.Plo @@ -0,0 +1,175 @@ +vector.lo: vector.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../build.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../build.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: diff --git a/software/gsl-1.15/vector/.deps/view.Plo b/software/gsl-1.15/vector/.deps/view.Plo new file mode 100644 index 000000000..967da1f7b --- /dev/null +++ b/software/gsl-1.15/vector/.deps/view.Plo @@ -0,0 +1,181 @@ +view.lo: view.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + ../gsl/gsl_types.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_complex.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_vector_long_double.h \ + ../gsl/gsl_inline.h ../gsl/gsl_block_long_double.h \ + ../gsl/gsl_vector_complex.h ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h view.h \ + ../templates_on.h view_source.c ../templates_off.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +../gsl/gsl_types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +view.h: + +../templates_on.h: + +view_source.c: + +../templates_off.h: diff --git a/software/gsl-1.15/vector/ChangeLog b/software/gsl-1.15/vector/ChangeLog new file mode 100644 index 000000000..d0044f6e5 --- /dev/null +++ b/software/gsl-1.15/vector/ChangeLog @@ -0,0 +1,237 @@ +2010-03-12 Brian Gough + + * prop_source.c (FUNCTION): added a function to test if two + vectors are equal + +2009-11-14 Brian Gough + + * gsl_vector_complex.h (GSL_VECTOR_COMPLEX): added missing + dereference + +2009-07-09 Brian Gough + + * init_source.c (FUNCTION): handle NULL argument in free + +2008-09-27 Brian Gough + + * gsl_vector_complex_double.h: added missing functions isnonneg, + add, sub, mul, div, scale, add_constant + +2008-07-03 Brian Gough + + * gsl_vector.h: use new inline declarations in all header files + + * vector.c: compile inline functions from header here + + * vector_source.c: removed + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2007-08-21 Brian Gough + + * prop_source.c (FUNCTION): added gsl_vector_isnonneg + +2007-02-17 Brian Gough + + * test_source.c (FUNCTION): avoid running tests on char, because + it can be unsigned + +2007-01-26 Brian Gough + + * minmax_source.c: added support for NaNs + +2006-10-31 Brian Gough + + * prop_source.c: added functions gsl_vector_ispos, + gsl_vector_isneg + +2004-09-13 Brian Gough + + * swap_source.c (gsl_vector_swap): fixed bug where stride of + first argument v was used for second argument w + + * test.c: improved test coverage + +2003-01-01 Brian Gough + + * gsl_vector_complex_float.h (gsl_vector_complex_float_get): + removed const from zero + + * vector_source.c (FUNCTION): removed const from zero + +Sun Jan 27 22:29:54 2002 Brian Gough + + * test.c: ensure that range check is working when running the + tests + +Fri Sep 14 19:13:20 2001 Brian Gough + + * view.c (USE_QUALIFIER): added missing qualified types + +Thu Aug 23 13:22:29 2001 Brian Gough + + * gsl_vector_complex_float.h: added const to second argument of + _ptr functions + + * gsl_vector.h: changed definition of gsl_vector_const_view to + compile with Sun's cc + +Fri Aug 3 14:11:51 2001 Brian Gough + + * added gsl_vector_ptr and gsl_vector_const_ptr functions + +Mon Jul 16 21:28:37 2001 Brian Gough + + * reim_source.c: initialized views to null + +Fri Jul 13 21:29:06 2001 Brian Gough + + * changed views to be structs and used casts to initialize them + +Mon Jul 2 12:34:43 2001 Brian Gough + + * view.h: provide macros for initializing null vectors and views + +Sun Jul 1 22:38:30 2001 Brian Gough + + * introduction of new-style vector views + + * view_source.c: changed order of arguments to be consistent with + rest of library for _with_stride functions + +Mon May 14 22:43:18 2001 Brian Gough + + * vector_source.c (FUNCTION): removed unnecessary inline from + static function definition + +Tue Mar 27 15:12:07 2001 Brian Gough + + * view_source.c: split view functions into a separate file + +Sat Sep 9 16:45:15 2000 Brian Gough + + * added an owner field for indicating whether the underlying + memory is owned by the vector. Changed the meaning of the block + field to always be the address of the underlying block, even for + subviews (previously the block field was set to NULL in this + case). + +Sun Jul 16 10:39:39 2000 Brian Gough + + * init_source.c (FUNCTION): added gsl_vector_view function for + creating a vector view of an ordinary C array + +Sat Jul 15 21:44:49 2000 Brian Gough + + * changed GSL_EDOM to GSL_EINVAL for invalid vector size arguments + +Sat Jun 17 15:37:57 2000 Brian Gough + + * fixed up missing MULTIPLICITY factors in various functions + +Sun May 28 12:25:31 2000 Brian Gough + + * test_complex_source.c (FUNCTION): use binary mode "b" when + reading and writing binary files + + * test_source.c (FUNCTION): use binary mode "b" when reading and + writing binary files + +Fri May 5 10:57:16 2000 Brian Gough + + * oper_source.c (FUNCTION): changed functions + gsl_vector_mul_elements and gsl_vector_div_elements to + gsl_vector_mul and gsl_vector_div since the _elements suffix is + redundant for vectors (unlike matrices). + + * oper.c: added simple arithmetic operations (+,-,*,/,scale,+const) + +Wed Apr 26 14:17:14 2000 Brian Gough + + * prop_source.c (FUNCTION): added const to argument of + gsl_vector_isnull + + * init_source.c (FUNCTION): added gsl_vector_set_basis(v,i) to set + v to basis vector v = e_i (0,0,...,1,...,0) + +Tue Apr 25 11:31:38 2000 Brian Gough + + * test_source.c (FUNCTION): modified the tests so that they work + more cleanly with checkergcc when using long doubles. The trick + seems to be to avoid having any long doubles on the stack. + +Sat Apr 22 15:09:44 2000 Brian Gough + + * init_source.c (FUNCTION): separated subvector functions into + gsl_vector_subvector and gsl_vector_subvector_with_stride + +Sat Mar 25 20:23:58 2000 Brian Gough + + * swap_source.c (FUNCTION): renames gsl_vector_swap to + gsl_vector_swap_elements + +Tue Mar 21 21:15:10 2000 Brian Gough + + * vector_source.c (FUNCTION): added set_zero function + +Thu Feb 24 16:19:55 2000 Brian Gough + + * added missing prototypes for gsl_vector_complex_..._reverse + +Fri Feb 18 20:48:32 2000 Brian Gough + + * swap_source.c (FUNCTION): added gsl_vector_reverse function for + flipping the order of a vector + + * copy_source.c: renamed gsl_vector_copy to gsl_vector_cpy + since it acts like memcpy (dest, src) not 'cp(copy) from to' + +Thu Dec 2 20:39:02 1999 Brian Gough + + * init_source.c: fixed bug, block element needs to be null in + gsl_vector_alloc_from_vector to maintain correct ownership, + added gsl_vector_view_from_vector (Thanks to Fabrice Rossi) + +Tue Oct 19 14:13:14 1999 Brian Gough + + * added gsl_vector_swap function to exchange elements + +Fri Oct 1 15:47:45 1999 Brian Gough + + * removed support for gsl_vector_ptr. Use set/get instead. + + * now uses separate block directory for memory management + +Mon Mar 1 19:38:16 1999 Brian Gough + + * test_source.c: added tests for gsl_vector_ptr with and without + stride + + * gsl_vector_char.h: added missing code to gsl_vector_char_ptr for + stride in char case. + + +Sun Nov 8 18:39:40 1998 Brian Gough + + * test_io.c, test_complex_io.c: split out the printf/scanf + routines since these aren't supported on all platforms + for long double + +Fri Jul 24 19:44:52 1998 Brian Gough + + * added parent pointer in structs, to determine whether or not + we're allowed to free the memory pointed to by * data. + +Wed Jun 10 19:13:35 1998 Brian Gough + + * init_source.c: added a cast for each malloc + +Sun Apr 26 14:10:06 1998 Brian Gough + + * added support for complex vectors + +Mon Apr 6 15:06:38 1998 Brian Gough + + * make range checking the default, you have to define + GSL_RANGE_CHECK_OFF to turn it off + diff --git a/software/gsl-1.15/vector/Makefile.am b/software/gsl-1.15/vector/Makefile.am new file mode 100644 index 000000000..21a915f69 --- /dev/null +++ b/software/gsl-1.15/vector/Makefile.am @@ -0,0 +1,21 @@ +noinst_LTLIBRARIES = libgslvector.la + +check_PROGRAMS = test test_static + +pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h + +INCLUDES = -I$(top_srcdir) + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_static_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c +test_static_SOURCES = test_static.c + +CLEANFILES = test.txt test.dat + +noinst_HEADERS = init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c oper_complex_source.c reim_source.c subvector_source.c view_source.c + +libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h diff --git a/software/gsl-1.15/vector/Makefile.in b/software/gsl-1.15/vector/Makefile.in new file mode 100644 index 000000000..11752b374 --- /dev/null +++ b/software/gsl-1.15/vector/Makefile.in @@ -0,0 +1,688 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) test_static$(EXEEXT) +subdir = vector +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslvector_la_LIBADD = +am_libgslvector_la_OBJECTS = init.lo file.lo vector.lo copy.lo swap.lo \ + prop.lo minmax.lo oper.lo reim.lo subvector.lo view.lo +libgslvector_la_OBJECTS = $(am_libgslvector_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslvector.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +am_test_static_OBJECTS = test_static.$(OBJEXT) +test_static_OBJECTS = $(am_test_static_OBJECTS) +test_static_DEPENDENCIES = libgslvector.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslvector_la_SOURCES) $(test_SOURCES) \ + $(test_static_SOURCES) +DIST_SOURCES = $(libgslvector_la_SOURCES) $(test_SOURCES) \ + $(test_static_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslvector.la +pkginclude_HEADERS = gsl_vector.h gsl_vector_char.h gsl_vector_complex.h gsl_vector_complex_double.h gsl_vector_complex_float.h gsl_vector_complex_long_double.h gsl_vector_double.h gsl_vector_float.h gsl_vector_int.h gsl_vector_long.h gsl_vector_long_double.h gsl_vector_short.h gsl_vector_uchar.h gsl_vector_uint.h gsl_vector_ulong.h gsl_vector_ushort.h +INCLUDES = -I$(top_srcdir) +TESTS = $(check_PROGRAMS) +test_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_static_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +test_static_SOURCES = test_static.c +CLEANFILES = test.txt test.dat +noinst_HEADERS = init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c oper_complex_source.c reim_source.c subvector_source.c view_source.c +libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vector/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu vector/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslvector.la: $(libgslvector_la_OBJECTS) $(libgslvector_la_DEPENDENCIES) + $(LINK) $(libgslvector_la_OBJECTS) $(libgslvector_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) +test_static$(EXEEXT): $(test_static_OBJECTS) $(test_static_DEPENDENCIES) + @rm -f test_static$(EXEEXT) + $(LINK) $(test_static_OBJECTS) $(test_static_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reim.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subvector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_static.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/vector/TODO b/software/gsl-1.15/vector/TODO new file mode 100644 index 000000000..a3c88490f --- /dev/null +++ b/software/gsl-1.15/vector/TODO @@ -0,0 +1,6 @@ +# -*- org -*- +#+CATEGORY: vector + +* Pretty print function + +* Vector p-norms diff --git a/software/gsl-1.15/vector/copy.c b/software/gsl-1.15/vector/copy.c new file mode 100644 index 000000000..1b42916b3 --- /dev/null +++ b/software/gsl-1.15/vector/copy.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "copy_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/copy_source.c b/software/gsl-1.15/vector/copy_source.c new file mode 100644 index 000000000..66283fec7 --- /dev/null +++ b/software/gsl-1.15/vector/copy_source.c @@ -0,0 +1,51 @@ +/* vector/copy_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_vector, memcpy) (TYPE (gsl_vector) * dest, + const TYPE (gsl_vector) * src) +{ + const size_t src_size = src->size; + const size_t dest_size = dest->size; + + if (src_size != dest_size) + { + GSL_ERROR ("vector lengths are not equal", GSL_EBADLEN); + } + + { + const size_t src_stride = src->stride ; + const size_t dest_stride = dest->stride ; + size_t j; + + for (j = 0; j < src_size; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + dest->data[MULTIPLICITY * dest_stride * j + k] + = src->data[MULTIPLICITY * src_stride * j + k]; + } + } + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/vector/file.c b/software/gsl-1.15/vector/file.c new file mode 100644 index 000000000..d7b88724f --- /dev/null +++ b/software/gsl-1.15/vector/file.c @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "file_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/file_source.c b/software/gsl-1.15/vector/file_source.c new file mode 100644 index 000000000..b4b0375a0 --- /dev/null +++ b/software/gsl-1.15/vector/file_source.c @@ -0,0 +1,63 @@ +/* vector/file_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_vector, fread) (FILE * stream, TYPE (gsl_vector) * v) +{ + int status = FUNCTION (gsl_block, raw_fread) (stream, + v->data, + v->size, + v->stride); + return status; +} + +int +FUNCTION (gsl_vector, fwrite) (FILE * stream, const TYPE (gsl_vector) * v) +{ + int status = FUNCTION (gsl_block, raw_fwrite) (stream, + v->data, + v->size, + v->stride); + return status; +} + +#if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE) +int +FUNCTION (gsl_vector, fprintf) (FILE * stream, const TYPE (gsl_vector) * v, + const char *format) +{ + int status = FUNCTION (gsl_block, raw_fprintf) (stream, + v->data, + v->size, + v->stride, + format); + return status; +} + +int +FUNCTION (gsl_vector, fscanf) (FILE * stream, TYPE (gsl_vector) * v) +{ + int status = FUNCTION (gsl_block, raw_fscanf) (stream, + v->data, + v->size, + v->stride); + return status; +} +#endif + diff --git a/software/gsl-1.15/vector/gsl_vector.h b/software/gsl-1.15/vector/gsl_vector.h new file mode 100644 index 000000000..cf762e42f --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector.h @@ -0,0 +1,25 @@ +#ifndef __GSL_VECTOR_H__ +#define __GSL_VECTOR_H__ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + + +#endif /* __GSL_VECTOR_H__ */ diff --git a/software/gsl-1.15/vector/gsl_vector_char.h b/software/gsl-1.15/vector/gsl_vector_char.h new file mode 100644 index 000000000..ab1107ded --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_char.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_char.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_CHAR_H__ +#define __GSL_VECTOR_CHAR_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + char *data; + gsl_block_char *block; + int owner; +} +gsl_vector_char; + +typedef struct +{ + gsl_vector_char vector; +} _gsl_vector_char_view; + +typedef _gsl_vector_char_view gsl_vector_char_view; + +typedef struct +{ + gsl_vector_char vector; +} _gsl_vector_char_const_view; + +typedef const _gsl_vector_char_const_view gsl_vector_char_const_view; + + +/* Allocation */ + +gsl_vector_char *gsl_vector_char_alloc (const size_t n); +gsl_vector_char *gsl_vector_char_calloc (const size_t n); + +gsl_vector_char *gsl_vector_char_alloc_from_block (gsl_block_char * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_char *gsl_vector_char_alloc_from_vector (gsl_vector_char * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_char_free (gsl_vector_char * v); + +/* Views */ + +_gsl_vector_char_view +gsl_vector_char_view_array (char *v, size_t n); + +_gsl_vector_char_view +gsl_vector_char_view_array_with_stride (char *base, + size_t stride, + size_t n); + +_gsl_vector_char_const_view +gsl_vector_char_const_view_array (const char *v, size_t n); + +_gsl_vector_char_const_view +gsl_vector_char_const_view_array_with_stride (const char *base, + size_t stride, + size_t n); + +_gsl_vector_char_view +gsl_vector_char_subvector (gsl_vector_char *v, + size_t i, + size_t n); + +_gsl_vector_char_view +gsl_vector_char_subvector_with_stride (gsl_vector_char *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_char_const_view +gsl_vector_char_const_subvector (const gsl_vector_char *v, + size_t i, + size_t n); + +_gsl_vector_char_const_view +gsl_vector_char_const_subvector_with_stride (const gsl_vector_char *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_char_set_zero (gsl_vector_char * v); +void gsl_vector_char_set_all (gsl_vector_char * v, char x); +int gsl_vector_char_set_basis (gsl_vector_char * v, size_t i); + +int gsl_vector_char_fread (FILE * stream, gsl_vector_char * v); +int gsl_vector_char_fwrite (FILE * stream, const gsl_vector_char * v); +int gsl_vector_char_fscanf (FILE * stream, gsl_vector_char * v); +int gsl_vector_char_fprintf (FILE * stream, const gsl_vector_char * v, + const char *format); + +int gsl_vector_char_memcpy (gsl_vector_char * dest, const gsl_vector_char * src); + +int gsl_vector_char_reverse (gsl_vector_char * v); + +int gsl_vector_char_swap (gsl_vector_char * v, gsl_vector_char * w); +int gsl_vector_char_swap_elements (gsl_vector_char * v, const size_t i, const size_t j); + +char gsl_vector_char_max (const gsl_vector_char * v); +char gsl_vector_char_min (const gsl_vector_char * v); +void gsl_vector_char_minmax (const gsl_vector_char * v, char * min_out, char * max_out); + +size_t gsl_vector_char_max_index (const gsl_vector_char * v); +size_t gsl_vector_char_min_index (const gsl_vector_char * v); +void gsl_vector_char_minmax_index (const gsl_vector_char * v, size_t * imin, size_t * imax); + +int gsl_vector_char_add (gsl_vector_char * a, const gsl_vector_char * b); +int gsl_vector_char_sub (gsl_vector_char * a, const gsl_vector_char * b); +int gsl_vector_char_mul (gsl_vector_char * a, const gsl_vector_char * b); +int gsl_vector_char_div (gsl_vector_char * a, const gsl_vector_char * b); +int gsl_vector_char_scale (gsl_vector_char * a, const double x); +int gsl_vector_char_add_constant (gsl_vector_char * a, const double x); + +int gsl_vector_char_equal (const gsl_vector_char * u, + const gsl_vector_char * v); + +int gsl_vector_char_isnull (const gsl_vector_char * v); +int gsl_vector_char_ispos (const gsl_vector_char * v); +int gsl_vector_char_isneg (const gsl_vector_char * v); +int gsl_vector_char_isnonneg (const gsl_vector_char * v); + +INLINE_DECL char gsl_vector_char_get (const gsl_vector_char * v, const size_t i); +INLINE_DECL void gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x); +INLINE_DECL char * gsl_vector_char_ptr (gsl_vector_char * v, const size_t i); +INLINE_DECL const char * gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +char +gsl_vector_char_get (const gsl_vector_char * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_char_set (gsl_vector_char * v, const size_t i, char x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +char * +gsl_vector_char_ptr (gsl_vector_char * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (char *) (v->data + i * v->stride); +} + +INLINE_FUN +const char * +gsl_vector_char_const_ptr (const gsl_vector_char * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const char *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_CHAR_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_complex.h b/software/gsl-1.15/vector/gsl_vector_complex.h new file mode 100644 index 000000000..e56d6a616 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_complex.h @@ -0,0 +1,17 @@ +#ifndef __GSL_VECTOR_COMPLEX_H__ +#define __GSL_VECTOR_COMPLEX_H__ + +#define GSL_VECTOR_REAL(z, i) ((z)->data[2*(i)*(z)->stride]) +#define GSL_VECTOR_IMAG(z, i) ((z)->data[2*(i)*(z)->stride + 1]) + +#if GSL_RANGE_CHECK +#define GSL_VECTOR_COMPLEX(zv, i) (((i) >= (zv)->size ? (gsl_error ("index out of range", __FILE__, __LINE__, GSL_EINVAL), 0):0 , *GSL_COMPLEX_AT((zv),(i)))) +#else +#define GSL_VECTOR_COMPLEX(zv, i) (*GSL_COMPLEX_AT((zv),(i))) +#endif + +#define GSL_COMPLEX_AT(zv,i) ((gsl_complex*)&((zv)->data[2*(i)*(zv)->stride])) +#define GSL_COMPLEX_FLOAT_AT(zv,i) ((gsl_complex_float*)&((zv)->data[2*(i)*(zv)->stride])) +#define GSL_COMPLEX_LONG_DOUBLE_AT(zv,i) ((gsl_complex_long_double*)&((zv)->data[2*(i)*(zv)->stride])) + +#endif /* __GSL_VECTOR_COMPLEX_H__ */ diff --git a/software/gsl-1.15/vector/gsl_vector_complex_double.h b/software/gsl-1.15/vector/gsl_vector_complex_double.h new file mode 100644 index 000000000..2e5361762 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_complex_double.h @@ -0,0 +1,251 @@ +/* vector/gsl_vector_complex_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_COMPLEX_DOUBLE_H__ +#define __GSL_VECTOR_COMPLEX_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + double *data; + gsl_block_complex *block; + int owner; +} gsl_vector_complex; + +typedef struct +{ + gsl_vector_complex vector; +} _gsl_vector_complex_view; + +typedef _gsl_vector_complex_view gsl_vector_complex_view; + +typedef struct +{ + gsl_vector_complex vector; +} _gsl_vector_complex_const_view; + +typedef const _gsl_vector_complex_const_view gsl_vector_complex_const_view; + +/* Allocation */ + +gsl_vector_complex *gsl_vector_complex_alloc (const size_t n); +gsl_vector_complex *gsl_vector_complex_calloc (const size_t n); + +gsl_vector_complex * +gsl_vector_complex_alloc_from_block (gsl_block_complex * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_complex * +gsl_vector_complex_alloc_from_vector (gsl_vector_complex * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_complex_free (gsl_vector_complex * v); + +/* Views */ + +_gsl_vector_complex_view +gsl_vector_complex_view_array (double *base, + size_t n); + +_gsl_vector_complex_view +gsl_vector_complex_view_array_with_stride (double *base, + size_t stride, + size_t n); + +_gsl_vector_complex_const_view +gsl_vector_complex_const_view_array (const double *base, + size_t n); + +_gsl_vector_complex_const_view +gsl_vector_complex_const_view_array_with_stride (const double *base, + size_t stride, + size_t n); + +_gsl_vector_complex_view +gsl_vector_complex_subvector (gsl_vector_complex *base, + size_t i, + size_t n); + + +_gsl_vector_complex_view +gsl_vector_complex_subvector_with_stride (gsl_vector_complex *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_complex_const_view +gsl_vector_complex_const_subvector (const gsl_vector_complex *base, + size_t i, + size_t n); + + +_gsl_vector_complex_const_view +gsl_vector_complex_const_subvector_with_stride (const gsl_vector_complex *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_view +gsl_vector_complex_real (gsl_vector_complex *v); + +_gsl_vector_view +gsl_vector_complex_imag (gsl_vector_complex *v); + +_gsl_vector_const_view +gsl_vector_complex_const_real (const gsl_vector_complex *v); + +_gsl_vector_const_view +gsl_vector_complex_const_imag (const gsl_vector_complex *v); + + +/* Operations */ + +void gsl_vector_complex_set_zero (gsl_vector_complex * v); +void gsl_vector_complex_set_all (gsl_vector_complex * v, + gsl_complex z); +int gsl_vector_complex_set_basis (gsl_vector_complex * v, size_t i); + +int gsl_vector_complex_fread (FILE * stream, + gsl_vector_complex * v); +int gsl_vector_complex_fwrite (FILE * stream, + const gsl_vector_complex * v); +int gsl_vector_complex_fscanf (FILE * stream, + gsl_vector_complex * v); +int gsl_vector_complex_fprintf (FILE * stream, + const gsl_vector_complex * v, + const char *format); + +int gsl_vector_complex_memcpy (gsl_vector_complex * dest, const gsl_vector_complex * src); + +int gsl_vector_complex_reverse (gsl_vector_complex * v); + +int gsl_vector_complex_swap (gsl_vector_complex * v, gsl_vector_complex * w); +int gsl_vector_complex_swap_elements (gsl_vector_complex * v, const size_t i, const size_t j); + +int gsl_vector_complex_equal (const gsl_vector_complex * u, + const gsl_vector_complex * v); + +int gsl_vector_complex_isnull (const gsl_vector_complex * v); +int gsl_vector_complex_ispos (const gsl_vector_complex * v); +int gsl_vector_complex_isneg (const gsl_vector_complex * v); +int gsl_vector_complex_isnonneg (const gsl_vector_complex * v); + +int gsl_vector_complex_add (gsl_vector_complex * a, const gsl_vector_complex * b); +int gsl_vector_complex_sub (gsl_vector_complex * a, const gsl_vector_complex * b); +int gsl_vector_complex_mul (gsl_vector_complex * a, const gsl_vector_complex * b); +int gsl_vector_complex_div (gsl_vector_complex * a, const gsl_vector_complex * b); +int gsl_vector_complex_scale (gsl_vector_complex * a, const gsl_complex x); +int gsl_vector_complex_add_constant (gsl_vector_complex * a, const gsl_complex x); + +INLINE_DECL gsl_complex gsl_vector_complex_get (const gsl_vector_complex * v, const size_t i); +INLINE_DECL void gsl_vector_complex_set (gsl_vector_complex * v, const size_t i, gsl_complex z); +INLINE_DECL gsl_complex *gsl_vector_complex_ptr (gsl_vector_complex * v, const size_t i); +INLINE_DECL const gsl_complex *gsl_vector_complex_const_ptr (const gsl_vector_complex * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex +gsl_vector_complex_get (const gsl_vector_complex * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + gsl_complex zero = {{0, 0}}; + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); + } +#endif + return *GSL_COMPLEX_AT (v, i); +} + +INLINE_FUN +void +gsl_vector_complex_set (gsl_vector_complex * v, + const size_t i, gsl_complex z) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + *GSL_COMPLEX_AT (v, i) = z; +} + +INLINE_FUN +gsl_complex * +gsl_vector_complex_ptr (gsl_vector_complex * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_AT (v, i); +} + +INLINE_FUN +const gsl_complex * +gsl_vector_complex_const_ptr (const gsl_vector_complex * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_AT (v, i); +} + + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_COMPLEX_DOUBLE_H__ */ diff --git a/software/gsl-1.15/vector/gsl_vector_complex_float.h b/software/gsl-1.15/vector/gsl_vector_complex_float.h new file mode 100644 index 000000000..182f48742 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_complex_float.h @@ -0,0 +1,251 @@ +/* vector/gsl_vector_complex_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_COMPLEX_FLOAT_H__ +#define __GSL_VECTOR_COMPLEX_FLOAT_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + float *data; + gsl_block_complex_float *block; + int owner; +} gsl_vector_complex_float; + +typedef struct +{ + gsl_vector_complex_float vector; +} _gsl_vector_complex_float_view; + +typedef _gsl_vector_complex_float_view gsl_vector_complex_float_view; + +typedef struct +{ + gsl_vector_complex_float vector; +} _gsl_vector_complex_float_const_view; + +typedef const _gsl_vector_complex_float_const_view gsl_vector_complex_float_const_view; + +/* Allocation */ + +gsl_vector_complex_float *gsl_vector_complex_float_alloc (const size_t n); +gsl_vector_complex_float *gsl_vector_complex_float_calloc (const size_t n); + +gsl_vector_complex_float * +gsl_vector_complex_float_alloc_from_block (gsl_block_complex_float * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_complex_float * +gsl_vector_complex_float_alloc_from_vector (gsl_vector_complex_float * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_complex_float_free (gsl_vector_complex_float * v); + +/* Views */ + +_gsl_vector_complex_float_view +gsl_vector_complex_float_view_array (float *base, + size_t n); + +_gsl_vector_complex_float_view +gsl_vector_complex_float_view_array_with_stride (float *base, + size_t stride, + size_t n); + +_gsl_vector_complex_float_const_view +gsl_vector_complex_float_const_view_array (const float *base, + size_t n); + +_gsl_vector_complex_float_const_view +gsl_vector_complex_float_const_view_array_with_stride (const float *base, + size_t stride, + size_t n); + +_gsl_vector_complex_float_view +gsl_vector_complex_float_subvector (gsl_vector_complex_float *base, + size_t i, + size_t n); + + +_gsl_vector_complex_float_view +gsl_vector_complex_float_subvector_with_stride (gsl_vector_complex_float *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_complex_float_const_view +gsl_vector_complex_float_const_subvector (const gsl_vector_complex_float *base, + size_t i, + size_t n); + + +_gsl_vector_complex_float_const_view +gsl_vector_complex_float_const_subvector_with_stride (const gsl_vector_complex_float *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_float_view +gsl_vector_complex_float_real (gsl_vector_complex_float *v); + +_gsl_vector_float_view +gsl_vector_complex_float_imag (gsl_vector_complex_float *v); + +_gsl_vector_float_const_view +gsl_vector_complex_float_const_real (const gsl_vector_complex_float *v); + +_gsl_vector_float_const_view +gsl_vector_complex_float_const_imag (const gsl_vector_complex_float *v); + + +/* Operations */ + +void gsl_vector_complex_float_set_zero (gsl_vector_complex_float * v); +void gsl_vector_complex_float_set_all (gsl_vector_complex_float * v, + gsl_complex_float z); +int gsl_vector_complex_float_set_basis (gsl_vector_complex_float * v, size_t i); + +int gsl_vector_complex_float_fread (FILE * stream, + gsl_vector_complex_float * v); +int gsl_vector_complex_float_fwrite (FILE * stream, + const gsl_vector_complex_float * v); +int gsl_vector_complex_float_fscanf (FILE * stream, + gsl_vector_complex_float * v); +int gsl_vector_complex_float_fprintf (FILE * stream, + const gsl_vector_complex_float * v, + const char *format); + +int gsl_vector_complex_float_memcpy (gsl_vector_complex_float * dest, const gsl_vector_complex_float * src); + +int gsl_vector_complex_float_reverse (gsl_vector_complex_float * v); + +int gsl_vector_complex_float_swap (gsl_vector_complex_float * v, gsl_vector_complex_float * w); +int gsl_vector_complex_float_swap_elements (gsl_vector_complex_float * v, const size_t i, const size_t j); + +int gsl_vector_complex_float_equal (const gsl_vector_complex_float * u, + const gsl_vector_complex_float * v); + +int gsl_vector_complex_float_isnull (const gsl_vector_complex_float * v); +int gsl_vector_complex_float_ispos (const gsl_vector_complex_float * v); +int gsl_vector_complex_float_isneg (const gsl_vector_complex_float * v); +int gsl_vector_complex_float_isnonneg (const gsl_vector_complex_float * v); + +int gsl_vector_complex_float_add (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); +int gsl_vector_complex_float_sub (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); +int gsl_vector_complex_float_mul (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); +int gsl_vector_complex_float_div (gsl_vector_complex_float * a, const gsl_vector_complex_float * b); +int gsl_vector_complex_float_scale (gsl_vector_complex_float * a, const gsl_complex_float x); +int gsl_vector_complex_float_add_constant (gsl_vector_complex_float * a, const gsl_complex_float x); + +INLINE_DECL gsl_complex_float gsl_vector_complex_float_get (const gsl_vector_complex_float * v, const size_t i); +INLINE_DECL void gsl_vector_complex_float_set (gsl_vector_complex_float * v, const size_t i, gsl_complex_float z); +INLINE_DECL gsl_complex_float *gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, const size_t i); +INLINE_DECL const gsl_complex_float *gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex_float +gsl_vector_complex_float_get (const gsl_vector_complex_float * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + gsl_complex_float zero = {{0, 0}}; + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); + } +#endif + return *GSL_COMPLEX_FLOAT_AT (v, i); +} + +INLINE_FUN +void +gsl_vector_complex_float_set (gsl_vector_complex_float * v, + const size_t i, gsl_complex_float z) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + *GSL_COMPLEX_FLOAT_AT (v, i) = z; +} + +INLINE_FUN +gsl_complex_float * +gsl_vector_complex_float_ptr (gsl_vector_complex_float * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_FLOAT_AT (v, i); +} + +INLINE_FUN +const gsl_complex_float * +gsl_vector_complex_float_const_ptr (const gsl_vector_complex_float * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_FLOAT_AT (v, i); +} + + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_COMPLEX_FLOAT_H__ */ diff --git a/software/gsl-1.15/vector/gsl_vector_complex_long_double.h b/software/gsl-1.15/vector/gsl_vector_complex_long_double.h new file mode 100644 index 000000000..91755e0cf --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_complex_long_double.h @@ -0,0 +1,251 @@ +/* vector/gsl_vector_complex_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_COMPLEX_LONG_DOUBLE_H__ +#define __GSL_VECTOR_COMPLEX_LONG_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + long double *data; + gsl_block_complex_long_double *block; + int owner; +} gsl_vector_complex_long_double; + +typedef struct +{ + gsl_vector_complex_long_double vector; +} _gsl_vector_complex_long_double_view; + +typedef _gsl_vector_complex_long_double_view gsl_vector_complex_long_double_view; + +typedef struct +{ + gsl_vector_complex_long_double vector; +} _gsl_vector_complex_long_double_const_view; + +typedef const _gsl_vector_complex_long_double_const_view gsl_vector_complex_long_double_const_view; + +/* Allocation */ + +gsl_vector_complex_long_double *gsl_vector_complex_long_double_alloc (const size_t n); +gsl_vector_complex_long_double *gsl_vector_complex_long_double_calloc (const size_t n); + +gsl_vector_complex_long_double * +gsl_vector_complex_long_double_alloc_from_block (gsl_block_complex_long_double * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_complex_long_double * +gsl_vector_complex_long_double_alloc_from_vector (gsl_vector_complex_long_double * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_complex_long_double_free (gsl_vector_complex_long_double * v); + +/* Views */ + +_gsl_vector_complex_long_double_view +gsl_vector_complex_long_double_view_array (long double *base, + size_t n); + +_gsl_vector_complex_long_double_view +gsl_vector_complex_long_double_view_array_with_stride (long double *base, + size_t stride, + size_t n); + +_gsl_vector_complex_long_double_const_view +gsl_vector_complex_long_double_const_view_array (const long double *base, + size_t n); + +_gsl_vector_complex_long_double_const_view +gsl_vector_complex_long_double_const_view_array_with_stride (const long double *base, + size_t stride, + size_t n); + +_gsl_vector_complex_long_double_view +gsl_vector_complex_long_double_subvector (gsl_vector_complex_long_double *base, + size_t i, + size_t n); + + +_gsl_vector_complex_long_double_view +gsl_vector_complex_long_double_subvector_with_stride (gsl_vector_complex_long_double *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_complex_long_double_const_view +gsl_vector_complex_long_double_const_subvector (const gsl_vector_complex_long_double *base, + size_t i, + size_t n); + + +_gsl_vector_complex_long_double_const_view +gsl_vector_complex_long_double_const_subvector_with_stride (const gsl_vector_complex_long_double *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_long_double_view +gsl_vector_complex_long_double_real (gsl_vector_complex_long_double *v); + +_gsl_vector_long_double_view +gsl_vector_complex_long_double_imag (gsl_vector_complex_long_double *v); + +_gsl_vector_long_double_const_view +gsl_vector_complex_long_double_const_real (const gsl_vector_complex_long_double *v); + +_gsl_vector_long_double_const_view +gsl_vector_complex_long_double_const_imag (const gsl_vector_complex_long_double *v); + + +/* Operations */ + +void gsl_vector_complex_long_double_set_zero (gsl_vector_complex_long_double * v); +void gsl_vector_complex_long_double_set_all (gsl_vector_complex_long_double * v, + gsl_complex_long_double z); +int gsl_vector_complex_long_double_set_basis (gsl_vector_complex_long_double * v, size_t i); + +int gsl_vector_complex_long_double_fread (FILE * stream, + gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_fwrite (FILE * stream, + const gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_fscanf (FILE * stream, + gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_fprintf (FILE * stream, + const gsl_vector_complex_long_double * v, + const char *format); + +int gsl_vector_complex_long_double_memcpy (gsl_vector_complex_long_double * dest, const gsl_vector_complex_long_double * src); + +int gsl_vector_complex_long_double_reverse (gsl_vector_complex_long_double * v); + +int gsl_vector_complex_long_double_swap (gsl_vector_complex_long_double * v, gsl_vector_complex_long_double * w); +int gsl_vector_complex_long_double_swap_elements (gsl_vector_complex_long_double * v, const size_t i, const size_t j); + +int gsl_vector_complex_long_double_equal (const gsl_vector_complex_long_double * u, + const gsl_vector_complex_long_double * v); + +int gsl_vector_complex_long_double_isnull (const gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_ispos (const gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_isneg (const gsl_vector_complex_long_double * v); +int gsl_vector_complex_long_double_isnonneg (const gsl_vector_complex_long_double * v); + +int gsl_vector_complex_long_double_add (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); +int gsl_vector_complex_long_double_sub (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); +int gsl_vector_complex_long_double_mul (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); +int gsl_vector_complex_long_double_div (gsl_vector_complex_long_double * a, const gsl_vector_complex_long_double * b); +int gsl_vector_complex_long_double_scale (gsl_vector_complex_long_double * a, const gsl_complex_long_double x); +int gsl_vector_complex_long_double_add_constant (gsl_vector_complex_long_double * a, const gsl_complex_long_double x); + +INLINE_DECL gsl_complex_long_double gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, const size_t i); +INLINE_DECL void gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, const size_t i, gsl_complex_long_double z); +INLINE_DECL gsl_complex_long_double *gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, const size_t i); +INLINE_DECL const gsl_complex_long_double *gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +gsl_complex_long_double +gsl_vector_complex_long_double_get (const gsl_vector_complex_long_double * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + gsl_complex_long_double zero = {{0, 0}}; + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, zero); + } +#endif + return *GSL_COMPLEX_LONG_DOUBLE_AT (v, i); +} + +INLINE_FUN +void +gsl_vector_complex_long_double_set (gsl_vector_complex_long_double * v, + const size_t i, gsl_complex_long_double z) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + *GSL_COMPLEX_LONG_DOUBLE_AT (v, i) = z; +} + +INLINE_FUN +gsl_complex_long_double * +gsl_vector_complex_long_double_ptr (gsl_vector_complex_long_double * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_LONG_DOUBLE_AT (v, i); +} + +INLINE_FUN +const gsl_complex_long_double * +gsl_vector_complex_long_double_const_ptr (const gsl_vector_complex_long_double * v, + const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return GSL_COMPLEX_LONG_DOUBLE_AT (v, i); +} + + +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_COMPLEX_LONG_DOUBLE_H__ */ diff --git a/software/gsl-1.15/vector/gsl_vector_double.h b/software/gsl-1.15/vector/gsl_vector_double.h new file mode 100644 index 000000000..26a12d833 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_double.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_DOUBLE_H__ +#define __GSL_VECTOR_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + double *data; + gsl_block *block; + int owner; +} +gsl_vector; + +typedef struct +{ + gsl_vector vector; +} _gsl_vector_view; + +typedef _gsl_vector_view gsl_vector_view; + +typedef struct +{ + gsl_vector vector; +} _gsl_vector_const_view; + +typedef const _gsl_vector_const_view gsl_vector_const_view; + + +/* Allocation */ + +gsl_vector *gsl_vector_alloc (const size_t n); +gsl_vector *gsl_vector_calloc (const size_t n); + +gsl_vector *gsl_vector_alloc_from_block (gsl_block * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector *gsl_vector_alloc_from_vector (gsl_vector * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_free (gsl_vector * v); + +/* Views */ + +_gsl_vector_view +gsl_vector_view_array (double *v, size_t n); + +_gsl_vector_view +gsl_vector_view_array_with_stride (double *base, + size_t stride, + size_t n); + +_gsl_vector_const_view +gsl_vector_const_view_array (const double *v, size_t n); + +_gsl_vector_const_view +gsl_vector_const_view_array_with_stride (const double *base, + size_t stride, + size_t n); + +_gsl_vector_view +gsl_vector_subvector (gsl_vector *v, + size_t i, + size_t n); + +_gsl_vector_view +gsl_vector_subvector_with_stride (gsl_vector *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_const_view +gsl_vector_const_subvector (const gsl_vector *v, + size_t i, + size_t n); + +_gsl_vector_const_view +gsl_vector_const_subvector_with_stride (const gsl_vector *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_set_zero (gsl_vector * v); +void gsl_vector_set_all (gsl_vector * v, double x); +int gsl_vector_set_basis (gsl_vector * v, size_t i); + +int gsl_vector_fread (FILE * stream, gsl_vector * v); +int gsl_vector_fwrite (FILE * stream, const gsl_vector * v); +int gsl_vector_fscanf (FILE * stream, gsl_vector * v); +int gsl_vector_fprintf (FILE * stream, const gsl_vector * v, + const char *format); + +int gsl_vector_memcpy (gsl_vector * dest, const gsl_vector * src); + +int gsl_vector_reverse (gsl_vector * v); + +int gsl_vector_swap (gsl_vector * v, gsl_vector * w); +int gsl_vector_swap_elements (gsl_vector * v, const size_t i, const size_t j); + +double gsl_vector_max (const gsl_vector * v); +double gsl_vector_min (const gsl_vector * v); +void gsl_vector_minmax (const gsl_vector * v, double * min_out, double * max_out); + +size_t gsl_vector_max_index (const gsl_vector * v); +size_t gsl_vector_min_index (const gsl_vector * v); +void gsl_vector_minmax_index (const gsl_vector * v, size_t * imin, size_t * imax); + +int gsl_vector_add (gsl_vector * a, const gsl_vector * b); +int gsl_vector_sub (gsl_vector * a, const gsl_vector * b); +int gsl_vector_mul (gsl_vector * a, const gsl_vector * b); +int gsl_vector_div (gsl_vector * a, const gsl_vector * b); +int gsl_vector_scale (gsl_vector * a, const double x); +int gsl_vector_add_constant (gsl_vector * a, const double x); + +int gsl_vector_equal (const gsl_vector * u, + const gsl_vector * v); + +int gsl_vector_isnull (const gsl_vector * v); +int gsl_vector_ispos (const gsl_vector * v); +int gsl_vector_isneg (const gsl_vector * v); +int gsl_vector_isnonneg (const gsl_vector * v); + +INLINE_DECL double gsl_vector_get (const gsl_vector * v, const size_t i); +INLINE_DECL void gsl_vector_set (gsl_vector * v, const size_t i, double x); +INLINE_DECL double * gsl_vector_ptr (gsl_vector * v, const size_t i); +INLINE_DECL const double * gsl_vector_const_ptr (const gsl_vector * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +double +gsl_vector_get (const gsl_vector * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_set (gsl_vector * v, const size_t i, double x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +double * +gsl_vector_ptr (gsl_vector * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (double *) (v->data + i * v->stride); +} + +INLINE_FUN +const double * +gsl_vector_const_ptr (const gsl_vector * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const double *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_DOUBLE_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_float.h b/software/gsl-1.15/vector/gsl_vector_float.h new file mode 100644 index 000000000..2b499c81e --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_float.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_float.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_FLOAT_H__ +#define __GSL_VECTOR_FLOAT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + float *data; + gsl_block_float *block; + int owner; +} +gsl_vector_float; + +typedef struct +{ + gsl_vector_float vector; +} _gsl_vector_float_view; + +typedef _gsl_vector_float_view gsl_vector_float_view; + +typedef struct +{ + gsl_vector_float vector; +} _gsl_vector_float_const_view; + +typedef const _gsl_vector_float_const_view gsl_vector_float_const_view; + + +/* Allocation */ + +gsl_vector_float *gsl_vector_float_alloc (const size_t n); +gsl_vector_float *gsl_vector_float_calloc (const size_t n); + +gsl_vector_float *gsl_vector_float_alloc_from_block (gsl_block_float * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_float *gsl_vector_float_alloc_from_vector (gsl_vector_float * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_float_free (gsl_vector_float * v); + +/* Views */ + +_gsl_vector_float_view +gsl_vector_float_view_array (float *v, size_t n); + +_gsl_vector_float_view +gsl_vector_float_view_array_with_stride (float *base, + size_t stride, + size_t n); + +_gsl_vector_float_const_view +gsl_vector_float_const_view_array (const float *v, size_t n); + +_gsl_vector_float_const_view +gsl_vector_float_const_view_array_with_stride (const float *base, + size_t stride, + size_t n); + +_gsl_vector_float_view +gsl_vector_float_subvector (gsl_vector_float *v, + size_t i, + size_t n); + +_gsl_vector_float_view +gsl_vector_float_subvector_with_stride (gsl_vector_float *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_float_const_view +gsl_vector_float_const_subvector (const gsl_vector_float *v, + size_t i, + size_t n); + +_gsl_vector_float_const_view +gsl_vector_float_const_subvector_with_stride (const gsl_vector_float *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_float_set_zero (gsl_vector_float * v); +void gsl_vector_float_set_all (gsl_vector_float * v, float x); +int gsl_vector_float_set_basis (gsl_vector_float * v, size_t i); + +int gsl_vector_float_fread (FILE * stream, gsl_vector_float * v); +int gsl_vector_float_fwrite (FILE * stream, const gsl_vector_float * v); +int gsl_vector_float_fscanf (FILE * stream, gsl_vector_float * v); +int gsl_vector_float_fprintf (FILE * stream, const gsl_vector_float * v, + const char *format); + +int gsl_vector_float_memcpy (gsl_vector_float * dest, const gsl_vector_float * src); + +int gsl_vector_float_reverse (gsl_vector_float * v); + +int gsl_vector_float_swap (gsl_vector_float * v, gsl_vector_float * w); +int gsl_vector_float_swap_elements (gsl_vector_float * v, const size_t i, const size_t j); + +float gsl_vector_float_max (const gsl_vector_float * v); +float gsl_vector_float_min (const gsl_vector_float * v); +void gsl_vector_float_minmax (const gsl_vector_float * v, float * min_out, float * max_out); + +size_t gsl_vector_float_max_index (const gsl_vector_float * v); +size_t gsl_vector_float_min_index (const gsl_vector_float * v); +void gsl_vector_float_minmax_index (const gsl_vector_float * v, size_t * imin, size_t * imax); + +int gsl_vector_float_add (gsl_vector_float * a, const gsl_vector_float * b); +int gsl_vector_float_sub (gsl_vector_float * a, const gsl_vector_float * b); +int gsl_vector_float_mul (gsl_vector_float * a, const gsl_vector_float * b); +int gsl_vector_float_div (gsl_vector_float * a, const gsl_vector_float * b); +int gsl_vector_float_scale (gsl_vector_float * a, const double x); +int gsl_vector_float_add_constant (gsl_vector_float * a, const double x); + +int gsl_vector_float_equal (const gsl_vector_float * u, + const gsl_vector_float * v); + +int gsl_vector_float_isnull (const gsl_vector_float * v); +int gsl_vector_float_ispos (const gsl_vector_float * v); +int gsl_vector_float_isneg (const gsl_vector_float * v); +int gsl_vector_float_isnonneg (const gsl_vector_float * v); + +INLINE_DECL float gsl_vector_float_get (const gsl_vector_float * v, const size_t i); +INLINE_DECL void gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x); +INLINE_DECL float * gsl_vector_float_ptr (gsl_vector_float * v, const size_t i); +INLINE_DECL const float * gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +float +gsl_vector_float_get (const gsl_vector_float * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_float_set (gsl_vector_float * v, const size_t i, float x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +float * +gsl_vector_float_ptr (gsl_vector_float * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (float *) (v->data + i * v->stride); +} + +INLINE_FUN +const float * +gsl_vector_float_const_ptr (const gsl_vector_float * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const float *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_FLOAT_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_int.h b/software/gsl-1.15/vector/gsl_vector_int.h new file mode 100644 index 000000000..de04a449d --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_int.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_int.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_INT_H__ +#define __GSL_VECTOR_INT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + int *data; + gsl_block_int *block; + int owner; +} +gsl_vector_int; + +typedef struct +{ + gsl_vector_int vector; +} _gsl_vector_int_view; + +typedef _gsl_vector_int_view gsl_vector_int_view; + +typedef struct +{ + gsl_vector_int vector; +} _gsl_vector_int_const_view; + +typedef const _gsl_vector_int_const_view gsl_vector_int_const_view; + + +/* Allocation */ + +gsl_vector_int *gsl_vector_int_alloc (const size_t n); +gsl_vector_int *gsl_vector_int_calloc (const size_t n); + +gsl_vector_int *gsl_vector_int_alloc_from_block (gsl_block_int * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_int *gsl_vector_int_alloc_from_vector (gsl_vector_int * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_int_free (gsl_vector_int * v); + +/* Views */ + +_gsl_vector_int_view +gsl_vector_int_view_array (int *v, size_t n); + +_gsl_vector_int_view +gsl_vector_int_view_array_with_stride (int *base, + size_t stride, + size_t n); + +_gsl_vector_int_const_view +gsl_vector_int_const_view_array (const int *v, size_t n); + +_gsl_vector_int_const_view +gsl_vector_int_const_view_array_with_stride (const int *base, + size_t stride, + size_t n); + +_gsl_vector_int_view +gsl_vector_int_subvector (gsl_vector_int *v, + size_t i, + size_t n); + +_gsl_vector_int_view +gsl_vector_int_subvector_with_stride (gsl_vector_int *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_int_const_view +gsl_vector_int_const_subvector (const gsl_vector_int *v, + size_t i, + size_t n); + +_gsl_vector_int_const_view +gsl_vector_int_const_subvector_with_stride (const gsl_vector_int *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_int_set_zero (gsl_vector_int * v); +void gsl_vector_int_set_all (gsl_vector_int * v, int x); +int gsl_vector_int_set_basis (gsl_vector_int * v, size_t i); + +int gsl_vector_int_fread (FILE * stream, gsl_vector_int * v); +int gsl_vector_int_fwrite (FILE * stream, const gsl_vector_int * v); +int gsl_vector_int_fscanf (FILE * stream, gsl_vector_int * v); +int gsl_vector_int_fprintf (FILE * stream, const gsl_vector_int * v, + const char *format); + +int gsl_vector_int_memcpy (gsl_vector_int * dest, const gsl_vector_int * src); + +int gsl_vector_int_reverse (gsl_vector_int * v); + +int gsl_vector_int_swap (gsl_vector_int * v, gsl_vector_int * w); +int gsl_vector_int_swap_elements (gsl_vector_int * v, const size_t i, const size_t j); + +int gsl_vector_int_max (const gsl_vector_int * v); +int gsl_vector_int_min (const gsl_vector_int * v); +void gsl_vector_int_minmax (const gsl_vector_int * v, int * min_out, int * max_out); + +size_t gsl_vector_int_max_index (const gsl_vector_int * v); +size_t gsl_vector_int_min_index (const gsl_vector_int * v); +void gsl_vector_int_minmax_index (const gsl_vector_int * v, size_t * imin, size_t * imax); + +int gsl_vector_int_add (gsl_vector_int * a, const gsl_vector_int * b); +int gsl_vector_int_sub (gsl_vector_int * a, const gsl_vector_int * b); +int gsl_vector_int_mul (gsl_vector_int * a, const gsl_vector_int * b); +int gsl_vector_int_div (gsl_vector_int * a, const gsl_vector_int * b); +int gsl_vector_int_scale (gsl_vector_int * a, const double x); +int gsl_vector_int_add_constant (gsl_vector_int * a, const double x); + +int gsl_vector_int_equal (const gsl_vector_int * u, + const gsl_vector_int * v); + +int gsl_vector_int_isnull (const gsl_vector_int * v); +int gsl_vector_int_ispos (const gsl_vector_int * v); +int gsl_vector_int_isneg (const gsl_vector_int * v); +int gsl_vector_int_isnonneg (const gsl_vector_int * v); + +INLINE_DECL int gsl_vector_int_get (const gsl_vector_int * v, const size_t i); +INLINE_DECL void gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x); +INLINE_DECL int * gsl_vector_int_ptr (gsl_vector_int * v, const size_t i); +INLINE_DECL const int * gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +int +gsl_vector_int_get (const gsl_vector_int * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_int_set (gsl_vector_int * v, const size_t i, int x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +int * +gsl_vector_int_ptr (gsl_vector_int * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (int *) (v->data + i * v->stride); +} + +INLINE_FUN +const int * +gsl_vector_int_const_ptr (const gsl_vector_int * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const int *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_INT_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_long.h b/software/gsl-1.15/vector/gsl_vector_long.h new file mode 100644 index 000000000..f844a0277 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_long.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_long.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_LONG_H__ +#define __GSL_VECTOR_LONG_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + long *data; + gsl_block_long *block; + int owner; +} +gsl_vector_long; + +typedef struct +{ + gsl_vector_long vector; +} _gsl_vector_long_view; + +typedef _gsl_vector_long_view gsl_vector_long_view; + +typedef struct +{ + gsl_vector_long vector; +} _gsl_vector_long_const_view; + +typedef const _gsl_vector_long_const_view gsl_vector_long_const_view; + + +/* Allocation */ + +gsl_vector_long *gsl_vector_long_alloc (const size_t n); +gsl_vector_long *gsl_vector_long_calloc (const size_t n); + +gsl_vector_long *gsl_vector_long_alloc_from_block (gsl_block_long * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_long *gsl_vector_long_alloc_from_vector (gsl_vector_long * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_long_free (gsl_vector_long * v); + +/* Views */ + +_gsl_vector_long_view +gsl_vector_long_view_array (long *v, size_t n); + +_gsl_vector_long_view +gsl_vector_long_view_array_with_stride (long *base, + size_t stride, + size_t n); + +_gsl_vector_long_const_view +gsl_vector_long_const_view_array (const long *v, size_t n); + +_gsl_vector_long_const_view +gsl_vector_long_const_view_array_with_stride (const long *base, + size_t stride, + size_t n); + +_gsl_vector_long_view +gsl_vector_long_subvector (gsl_vector_long *v, + size_t i, + size_t n); + +_gsl_vector_long_view +gsl_vector_long_subvector_with_stride (gsl_vector_long *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_long_const_view +gsl_vector_long_const_subvector (const gsl_vector_long *v, + size_t i, + size_t n); + +_gsl_vector_long_const_view +gsl_vector_long_const_subvector_with_stride (const gsl_vector_long *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_long_set_zero (gsl_vector_long * v); +void gsl_vector_long_set_all (gsl_vector_long * v, long x); +int gsl_vector_long_set_basis (gsl_vector_long * v, size_t i); + +int gsl_vector_long_fread (FILE * stream, gsl_vector_long * v); +int gsl_vector_long_fwrite (FILE * stream, const gsl_vector_long * v); +int gsl_vector_long_fscanf (FILE * stream, gsl_vector_long * v); +int gsl_vector_long_fprintf (FILE * stream, const gsl_vector_long * v, + const char *format); + +int gsl_vector_long_memcpy (gsl_vector_long * dest, const gsl_vector_long * src); + +int gsl_vector_long_reverse (gsl_vector_long * v); + +int gsl_vector_long_swap (gsl_vector_long * v, gsl_vector_long * w); +int gsl_vector_long_swap_elements (gsl_vector_long * v, const size_t i, const size_t j); + +long gsl_vector_long_max (const gsl_vector_long * v); +long gsl_vector_long_min (const gsl_vector_long * v); +void gsl_vector_long_minmax (const gsl_vector_long * v, long * min_out, long * max_out); + +size_t gsl_vector_long_max_index (const gsl_vector_long * v); +size_t gsl_vector_long_min_index (const gsl_vector_long * v); +void gsl_vector_long_minmax_index (const gsl_vector_long * v, size_t * imin, size_t * imax); + +int gsl_vector_long_add (gsl_vector_long * a, const gsl_vector_long * b); +int gsl_vector_long_sub (gsl_vector_long * a, const gsl_vector_long * b); +int gsl_vector_long_mul (gsl_vector_long * a, const gsl_vector_long * b); +int gsl_vector_long_div (gsl_vector_long * a, const gsl_vector_long * b); +int gsl_vector_long_scale (gsl_vector_long * a, const double x); +int gsl_vector_long_add_constant (gsl_vector_long * a, const double x); + +int gsl_vector_long_equal (const gsl_vector_long * u, + const gsl_vector_long * v); + +int gsl_vector_long_isnull (const gsl_vector_long * v); +int gsl_vector_long_ispos (const gsl_vector_long * v); +int gsl_vector_long_isneg (const gsl_vector_long * v); +int gsl_vector_long_isnonneg (const gsl_vector_long * v); + +INLINE_DECL long gsl_vector_long_get (const gsl_vector_long * v, const size_t i); +INLINE_DECL void gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x); +INLINE_DECL long * gsl_vector_long_ptr (gsl_vector_long * v, const size_t i); +INLINE_DECL const long * gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +long +gsl_vector_long_get (const gsl_vector_long * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +long * +gsl_vector_long_ptr (gsl_vector_long * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (long *) (v->data + i * v->stride); +} + +INLINE_FUN +const long * +gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const long *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_LONG_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_long_double.h b/software/gsl-1.15/vector/gsl_vector_long_double.h new file mode 100644 index 000000000..836b09a52 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_long_double.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_long_double.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_LONG_DOUBLE_H__ +#define __GSL_VECTOR_LONG_DOUBLE_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + long double *data; + gsl_block_long_double *block; + int owner; +} +gsl_vector_long_double; + +typedef struct +{ + gsl_vector_long_double vector; +} _gsl_vector_long_double_view; + +typedef _gsl_vector_long_double_view gsl_vector_long_double_view; + +typedef struct +{ + gsl_vector_long_double vector; +} _gsl_vector_long_double_const_view; + +typedef const _gsl_vector_long_double_const_view gsl_vector_long_double_const_view; + + +/* Allocation */ + +gsl_vector_long_double *gsl_vector_long_double_alloc (const size_t n); +gsl_vector_long_double *gsl_vector_long_double_calloc (const size_t n); + +gsl_vector_long_double *gsl_vector_long_double_alloc_from_block (gsl_block_long_double * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_long_double *gsl_vector_long_double_alloc_from_vector (gsl_vector_long_double * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_long_double_free (gsl_vector_long_double * v); + +/* Views */ + +_gsl_vector_long_double_view +gsl_vector_long_double_view_array (long double *v, size_t n); + +_gsl_vector_long_double_view +gsl_vector_long_double_view_array_with_stride (long double *base, + size_t stride, + size_t n); + +_gsl_vector_long_double_const_view +gsl_vector_long_double_const_view_array (const long double *v, size_t n); + +_gsl_vector_long_double_const_view +gsl_vector_long_double_const_view_array_with_stride (const long double *base, + size_t stride, + size_t n); + +_gsl_vector_long_double_view +gsl_vector_long_double_subvector (gsl_vector_long_double *v, + size_t i, + size_t n); + +_gsl_vector_long_double_view +gsl_vector_long_double_subvector_with_stride (gsl_vector_long_double *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_long_double_const_view +gsl_vector_long_double_const_subvector (const gsl_vector_long_double *v, + size_t i, + size_t n); + +_gsl_vector_long_double_const_view +gsl_vector_long_double_const_subvector_with_stride (const gsl_vector_long_double *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_long_double_set_zero (gsl_vector_long_double * v); +void gsl_vector_long_double_set_all (gsl_vector_long_double * v, long double x); +int gsl_vector_long_double_set_basis (gsl_vector_long_double * v, size_t i); + +int gsl_vector_long_double_fread (FILE * stream, gsl_vector_long_double * v); +int gsl_vector_long_double_fwrite (FILE * stream, const gsl_vector_long_double * v); +int gsl_vector_long_double_fscanf (FILE * stream, gsl_vector_long_double * v); +int gsl_vector_long_double_fprintf (FILE * stream, const gsl_vector_long_double * v, + const char *format); + +int gsl_vector_long_double_memcpy (gsl_vector_long_double * dest, const gsl_vector_long_double * src); + +int gsl_vector_long_double_reverse (gsl_vector_long_double * v); + +int gsl_vector_long_double_swap (gsl_vector_long_double * v, gsl_vector_long_double * w); +int gsl_vector_long_double_swap_elements (gsl_vector_long_double * v, const size_t i, const size_t j); + +long double gsl_vector_long_double_max (const gsl_vector_long_double * v); +long double gsl_vector_long_double_min (const gsl_vector_long_double * v); +void gsl_vector_long_double_minmax (const gsl_vector_long_double * v, long double * min_out, long double * max_out); + +size_t gsl_vector_long_double_max_index (const gsl_vector_long_double * v); +size_t gsl_vector_long_double_min_index (const gsl_vector_long_double * v); +void gsl_vector_long_double_minmax_index (const gsl_vector_long_double * v, size_t * imin, size_t * imax); + +int gsl_vector_long_double_add (gsl_vector_long_double * a, const gsl_vector_long_double * b); +int gsl_vector_long_double_sub (gsl_vector_long_double * a, const gsl_vector_long_double * b); +int gsl_vector_long_double_mul (gsl_vector_long_double * a, const gsl_vector_long_double * b); +int gsl_vector_long_double_div (gsl_vector_long_double * a, const gsl_vector_long_double * b); +int gsl_vector_long_double_scale (gsl_vector_long_double * a, const double x); +int gsl_vector_long_double_add_constant (gsl_vector_long_double * a, const double x); + +int gsl_vector_long_double_equal (const gsl_vector_long_double * u, + const gsl_vector_long_double * v); + +int gsl_vector_long_double_isnull (const gsl_vector_long_double * v); +int gsl_vector_long_double_ispos (const gsl_vector_long_double * v); +int gsl_vector_long_double_isneg (const gsl_vector_long_double * v); +int gsl_vector_long_double_isnonneg (const gsl_vector_long_double * v); + +INLINE_DECL long double gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i); +INLINE_DECL void gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x); +INLINE_DECL long double * gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i); +INLINE_DECL const long double * gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +long double +gsl_vector_long_double_get (const gsl_vector_long_double * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_long_double_set (gsl_vector_long_double * v, const size_t i, long double x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +long double * +gsl_vector_long_double_ptr (gsl_vector_long_double * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (long double *) (v->data + i * v->stride); +} + +INLINE_FUN +const long double * +gsl_vector_long_double_const_ptr (const gsl_vector_long_double * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const long double *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_LONG_DOUBLE_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_short.h b/software/gsl-1.15/vector/gsl_vector_short.h new file mode 100644 index 000000000..4f41f7a6f --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_short.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_short.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_SHORT_H__ +#define __GSL_VECTOR_SHORT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + short *data; + gsl_block_short *block; + int owner; +} +gsl_vector_short; + +typedef struct +{ + gsl_vector_short vector; +} _gsl_vector_short_view; + +typedef _gsl_vector_short_view gsl_vector_short_view; + +typedef struct +{ + gsl_vector_short vector; +} _gsl_vector_short_const_view; + +typedef const _gsl_vector_short_const_view gsl_vector_short_const_view; + + +/* Allocation */ + +gsl_vector_short *gsl_vector_short_alloc (const size_t n); +gsl_vector_short *gsl_vector_short_calloc (const size_t n); + +gsl_vector_short *gsl_vector_short_alloc_from_block (gsl_block_short * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_short *gsl_vector_short_alloc_from_vector (gsl_vector_short * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_short_free (gsl_vector_short * v); + +/* Views */ + +_gsl_vector_short_view +gsl_vector_short_view_array (short *v, size_t n); + +_gsl_vector_short_view +gsl_vector_short_view_array_with_stride (short *base, + size_t stride, + size_t n); + +_gsl_vector_short_const_view +gsl_vector_short_const_view_array (const short *v, size_t n); + +_gsl_vector_short_const_view +gsl_vector_short_const_view_array_with_stride (const short *base, + size_t stride, + size_t n); + +_gsl_vector_short_view +gsl_vector_short_subvector (gsl_vector_short *v, + size_t i, + size_t n); + +_gsl_vector_short_view +gsl_vector_short_subvector_with_stride (gsl_vector_short *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_short_const_view +gsl_vector_short_const_subvector (const gsl_vector_short *v, + size_t i, + size_t n); + +_gsl_vector_short_const_view +gsl_vector_short_const_subvector_with_stride (const gsl_vector_short *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_short_set_zero (gsl_vector_short * v); +void gsl_vector_short_set_all (gsl_vector_short * v, short x); +int gsl_vector_short_set_basis (gsl_vector_short * v, size_t i); + +int gsl_vector_short_fread (FILE * stream, gsl_vector_short * v); +int gsl_vector_short_fwrite (FILE * stream, const gsl_vector_short * v); +int gsl_vector_short_fscanf (FILE * stream, gsl_vector_short * v); +int gsl_vector_short_fprintf (FILE * stream, const gsl_vector_short * v, + const char *format); + +int gsl_vector_short_memcpy (gsl_vector_short * dest, const gsl_vector_short * src); + +int gsl_vector_short_reverse (gsl_vector_short * v); + +int gsl_vector_short_swap (gsl_vector_short * v, gsl_vector_short * w); +int gsl_vector_short_swap_elements (gsl_vector_short * v, const size_t i, const size_t j); + +short gsl_vector_short_max (const gsl_vector_short * v); +short gsl_vector_short_min (const gsl_vector_short * v); +void gsl_vector_short_minmax (const gsl_vector_short * v, short * min_out, short * max_out); + +size_t gsl_vector_short_max_index (const gsl_vector_short * v); +size_t gsl_vector_short_min_index (const gsl_vector_short * v); +void gsl_vector_short_minmax_index (const gsl_vector_short * v, size_t * imin, size_t * imax); + +int gsl_vector_short_add (gsl_vector_short * a, const gsl_vector_short * b); +int gsl_vector_short_sub (gsl_vector_short * a, const gsl_vector_short * b); +int gsl_vector_short_mul (gsl_vector_short * a, const gsl_vector_short * b); +int gsl_vector_short_div (gsl_vector_short * a, const gsl_vector_short * b); +int gsl_vector_short_scale (gsl_vector_short * a, const double x); +int gsl_vector_short_add_constant (gsl_vector_short * a, const double x); + +int gsl_vector_short_equal (const gsl_vector_short * u, + const gsl_vector_short * v); + +int gsl_vector_short_isnull (const gsl_vector_short * v); +int gsl_vector_short_ispos (const gsl_vector_short * v); +int gsl_vector_short_isneg (const gsl_vector_short * v); +int gsl_vector_short_isnonneg (const gsl_vector_short * v); + +INLINE_DECL short gsl_vector_short_get (const gsl_vector_short * v, const size_t i); +INLINE_DECL void gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x); +INLINE_DECL short * gsl_vector_short_ptr (gsl_vector_short * v, const size_t i); +INLINE_DECL const short * gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +short +gsl_vector_short_get (const gsl_vector_short * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_short_set (gsl_vector_short * v, const size_t i, short x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +short * +gsl_vector_short_ptr (gsl_vector_short * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (short *) (v->data + i * v->stride); +} + +INLINE_FUN +const short * +gsl_vector_short_const_ptr (const gsl_vector_short * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const short *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_SHORT_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_uchar.h b/software/gsl-1.15/vector/gsl_vector_uchar.h new file mode 100644 index 000000000..b27096d95 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_uchar.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_uchar.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_UCHAR_H__ +#define __GSL_VECTOR_UCHAR_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + unsigned char *data; + gsl_block_uchar *block; + int owner; +} +gsl_vector_uchar; + +typedef struct +{ + gsl_vector_uchar vector; +} _gsl_vector_uchar_view; + +typedef _gsl_vector_uchar_view gsl_vector_uchar_view; + +typedef struct +{ + gsl_vector_uchar vector; +} _gsl_vector_uchar_const_view; + +typedef const _gsl_vector_uchar_const_view gsl_vector_uchar_const_view; + + +/* Allocation */ + +gsl_vector_uchar *gsl_vector_uchar_alloc (const size_t n); +gsl_vector_uchar *gsl_vector_uchar_calloc (const size_t n); + +gsl_vector_uchar *gsl_vector_uchar_alloc_from_block (gsl_block_uchar * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_uchar *gsl_vector_uchar_alloc_from_vector (gsl_vector_uchar * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_uchar_free (gsl_vector_uchar * v); + +/* Views */ + +_gsl_vector_uchar_view +gsl_vector_uchar_view_array (unsigned char *v, size_t n); + +_gsl_vector_uchar_view +gsl_vector_uchar_view_array_with_stride (unsigned char *base, + size_t stride, + size_t n); + +_gsl_vector_uchar_const_view +gsl_vector_uchar_const_view_array (const unsigned char *v, size_t n); + +_gsl_vector_uchar_const_view +gsl_vector_uchar_const_view_array_with_stride (const unsigned char *base, + size_t stride, + size_t n); + +_gsl_vector_uchar_view +gsl_vector_uchar_subvector (gsl_vector_uchar *v, + size_t i, + size_t n); + +_gsl_vector_uchar_view +gsl_vector_uchar_subvector_with_stride (gsl_vector_uchar *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_uchar_const_view +gsl_vector_uchar_const_subvector (const gsl_vector_uchar *v, + size_t i, + size_t n); + +_gsl_vector_uchar_const_view +gsl_vector_uchar_const_subvector_with_stride (const gsl_vector_uchar *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_uchar_set_zero (gsl_vector_uchar * v); +void gsl_vector_uchar_set_all (gsl_vector_uchar * v, unsigned char x); +int gsl_vector_uchar_set_basis (gsl_vector_uchar * v, size_t i); + +int gsl_vector_uchar_fread (FILE * stream, gsl_vector_uchar * v); +int gsl_vector_uchar_fwrite (FILE * stream, const gsl_vector_uchar * v); +int gsl_vector_uchar_fscanf (FILE * stream, gsl_vector_uchar * v); +int gsl_vector_uchar_fprintf (FILE * stream, const gsl_vector_uchar * v, + const char *format); + +int gsl_vector_uchar_memcpy (gsl_vector_uchar * dest, const gsl_vector_uchar * src); + +int gsl_vector_uchar_reverse (gsl_vector_uchar * v); + +int gsl_vector_uchar_swap (gsl_vector_uchar * v, gsl_vector_uchar * w); +int gsl_vector_uchar_swap_elements (gsl_vector_uchar * v, const size_t i, const size_t j); + +unsigned char gsl_vector_uchar_max (const gsl_vector_uchar * v); +unsigned char gsl_vector_uchar_min (const gsl_vector_uchar * v); +void gsl_vector_uchar_minmax (const gsl_vector_uchar * v, unsigned char * min_out, unsigned char * max_out); + +size_t gsl_vector_uchar_max_index (const gsl_vector_uchar * v); +size_t gsl_vector_uchar_min_index (const gsl_vector_uchar * v); +void gsl_vector_uchar_minmax_index (const gsl_vector_uchar * v, size_t * imin, size_t * imax); + +int gsl_vector_uchar_add (gsl_vector_uchar * a, const gsl_vector_uchar * b); +int gsl_vector_uchar_sub (gsl_vector_uchar * a, const gsl_vector_uchar * b); +int gsl_vector_uchar_mul (gsl_vector_uchar * a, const gsl_vector_uchar * b); +int gsl_vector_uchar_div (gsl_vector_uchar * a, const gsl_vector_uchar * b); +int gsl_vector_uchar_scale (gsl_vector_uchar * a, const double x); +int gsl_vector_uchar_add_constant (gsl_vector_uchar * a, const double x); + +int gsl_vector_uchar_equal (const gsl_vector_uchar * u, + const gsl_vector_uchar * v); + +int gsl_vector_uchar_isnull (const gsl_vector_uchar * v); +int gsl_vector_uchar_ispos (const gsl_vector_uchar * v); +int gsl_vector_uchar_isneg (const gsl_vector_uchar * v); +int gsl_vector_uchar_isnonneg (const gsl_vector_uchar * v); + +INLINE_DECL unsigned char gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i); +INLINE_DECL void gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x); +INLINE_DECL unsigned char * gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i); +INLINE_DECL const unsigned char * gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +unsigned char +gsl_vector_uchar_get (const gsl_vector_uchar * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_uchar_set (gsl_vector_uchar * v, const size_t i, unsigned char x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +unsigned char * +gsl_vector_uchar_ptr (gsl_vector_uchar * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (unsigned char *) (v->data + i * v->stride); +} + +INLINE_FUN +const unsigned char * +gsl_vector_uchar_const_ptr (const gsl_vector_uchar * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const unsigned char *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_UCHAR_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_uint.h b/software/gsl-1.15/vector/gsl_vector_uint.h new file mode 100644 index 000000000..d2f6cb35e --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_uint.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_uint.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_UINT_H__ +#define __GSL_VECTOR_UINT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + unsigned int *data; + gsl_block_uint *block; + int owner; +} +gsl_vector_uint; + +typedef struct +{ + gsl_vector_uint vector; +} _gsl_vector_uint_view; + +typedef _gsl_vector_uint_view gsl_vector_uint_view; + +typedef struct +{ + gsl_vector_uint vector; +} _gsl_vector_uint_const_view; + +typedef const _gsl_vector_uint_const_view gsl_vector_uint_const_view; + + +/* Allocation */ + +gsl_vector_uint *gsl_vector_uint_alloc (const size_t n); +gsl_vector_uint *gsl_vector_uint_calloc (const size_t n); + +gsl_vector_uint *gsl_vector_uint_alloc_from_block (gsl_block_uint * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_uint *gsl_vector_uint_alloc_from_vector (gsl_vector_uint * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_uint_free (gsl_vector_uint * v); + +/* Views */ + +_gsl_vector_uint_view +gsl_vector_uint_view_array (unsigned int *v, size_t n); + +_gsl_vector_uint_view +gsl_vector_uint_view_array_with_stride (unsigned int *base, + size_t stride, + size_t n); + +_gsl_vector_uint_const_view +gsl_vector_uint_const_view_array (const unsigned int *v, size_t n); + +_gsl_vector_uint_const_view +gsl_vector_uint_const_view_array_with_stride (const unsigned int *base, + size_t stride, + size_t n); + +_gsl_vector_uint_view +gsl_vector_uint_subvector (gsl_vector_uint *v, + size_t i, + size_t n); + +_gsl_vector_uint_view +gsl_vector_uint_subvector_with_stride (gsl_vector_uint *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_uint_const_view +gsl_vector_uint_const_subvector (const gsl_vector_uint *v, + size_t i, + size_t n); + +_gsl_vector_uint_const_view +gsl_vector_uint_const_subvector_with_stride (const gsl_vector_uint *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_uint_set_zero (gsl_vector_uint * v); +void gsl_vector_uint_set_all (gsl_vector_uint * v, unsigned int x); +int gsl_vector_uint_set_basis (gsl_vector_uint * v, size_t i); + +int gsl_vector_uint_fread (FILE * stream, gsl_vector_uint * v); +int gsl_vector_uint_fwrite (FILE * stream, const gsl_vector_uint * v); +int gsl_vector_uint_fscanf (FILE * stream, gsl_vector_uint * v); +int gsl_vector_uint_fprintf (FILE * stream, const gsl_vector_uint * v, + const char *format); + +int gsl_vector_uint_memcpy (gsl_vector_uint * dest, const gsl_vector_uint * src); + +int gsl_vector_uint_reverse (gsl_vector_uint * v); + +int gsl_vector_uint_swap (gsl_vector_uint * v, gsl_vector_uint * w); +int gsl_vector_uint_swap_elements (gsl_vector_uint * v, const size_t i, const size_t j); + +unsigned int gsl_vector_uint_max (const gsl_vector_uint * v); +unsigned int gsl_vector_uint_min (const gsl_vector_uint * v); +void gsl_vector_uint_minmax (const gsl_vector_uint * v, unsigned int * min_out, unsigned int * max_out); + +size_t gsl_vector_uint_max_index (const gsl_vector_uint * v); +size_t gsl_vector_uint_min_index (const gsl_vector_uint * v); +void gsl_vector_uint_minmax_index (const gsl_vector_uint * v, size_t * imin, size_t * imax); + +int gsl_vector_uint_add (gsl_vector_uint * a, const gsl_vector_uint * b); +int gsl_vector_uint_sub (gsl_vector_uint * a, const gsl_vector_uint * b); +int gsl_vector_uint_mul (gsl_vector_uint * a, const gsl_vector_uint * b); +int gsl_vector_uint_div (gsl_vector_uint * a, const gsl_vector_uint * b); +int gsl_vector_uint_scale (gsl_vector_uint * a, const double x); +int gsl_vector_uint_add_constant (gsl_vector_uint * a, const double x); + +int gsl_vector_uint_equal (const gsl_vector_uint * u, + const gsl_vector_uint * v); + +int gsl_vector_uint_isnull (const gsl_vector_uint * v); +int gsl_vector_uint_ispos (const gsl_vector_uint * v); +int gsl_vector_uint_isneg (const gsl_vector_uint * v); +int gsl_vector_uint_isnonneg (const gsl_vector_uint * v); + +INLINE_DECL unsigned int gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i); +INLINE_DECL void gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x); +INLINE_DECL unsigned int * gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i); +INLINE_DECL const unsigned int * gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +unsigned int +gsl_vector_uint_get (const gsl_vector_uint * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_uint_set (gsl_vector_uint * v, const size_t i, unsigned int x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +unsigned int * +gsl_vector_uint_ptr (gsl_vector_uint * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (unsigned int *) (v->data + i * v->stride); +} + +INLINE_FUN +const unsigned int * +gsl_vector_uint_const_ptr (const gsl_vector_uint * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const unsigned int *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_UINT_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_ulong.h b/software/gsl-1.15/vector/gsl_vector_ulong.h new file mode 100644 index 000000000..01bf24294 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_ulong.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_ulong.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_ULONG_H__ +#define __GSL_VECTOR_ULONG_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + unsigned long *data; + gsl_block_ulong *block; + int owner; +} +gsl_vector_ulong; + +typedef struct +{ + gsl_vector_ulong vector; +} _gsl_vector_ulong_view; + +typedef _gsl_vector_ulong_view gsl_vector_ulong_view; + +typedef struct +{ + gsl_vector_ulong vector; +} _gsl_vector_ulong_const_view; + +typedef const _gsl_vector_ulong_const_view gsl_vector_ulong_const_view; + + +/* Allocation */ + +gsl_vector_ulong *gsl_vector_ulong_alloc (const size_t n); +gsl_vector_ulong *gsl_vector_ulong_calloc (const size_t n); + +gsl_vector_ulong *gsl_vector_ulong_alloc_from_block (gsl_block_ulong * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_ulong *gsl_vector_ulong_alloc_from_vector (gsl_vector_ulong * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_ulong_free (gsl_vector_ulong * v); + +/* Views */ + +_gsl_vector_ulong_view +gsl_vector_ulong_view_array (unsigned long *v, size_t n); + +_gsl_vector_ulong_view +gsl_vector_ulong_view_array_with_stride (unsigned long *base, + size_t stride, + size_t n); + +_gsl_vector_ulong_const_view +gsl_vector_ulong_const_view_array (const unsigned long *v, size_t n); + +_gsl_vector_ulong_const_view +gsl_vector_ulong_const_view_array_with_stride (const unsigned long *base, + size_t stride, + size_t n); + +_gsl_vector_ulong_view +gsl_vector_ulong_subvector (gsl_vector_ulong *v, + size_t i, + size_t n); + +_gsl_vector_ulong_view +gsl_vector_ulong_subvector_with_stride (gsl_vector_ulong *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_ulong_const_view +gsl_vector_ulong_const_subvector (const gsl_vector_ulong *v, + size_t i, + size_t n); + +_gsl_vector_ulong_const_view +gsl_vector_ulong_const_subvector_with_stride (const gsl_vector_ulong *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_ulong_set_zero (gsl_vector_ulong * v); +void gsl_vector_ulong_set_all (gsl_vector_ulong * v, unsigned long x); +int gsl_vector_ulong_set_basis (gsl_vector_ulong * v, size_t i); + +int gsl_vector_ulong_fread (FILE * stream, gsl_vector_ulong * v); +int gsl_vector_ulong_fwrite (FILE * stream, const gsl_vector_ulong * v); +int gsl_vector_ulong_fscanf (FILE * stream, gsl_vector_ulong * v); +int gsl_vector_ulong_fprintf (FILE * stream, const gsl_vector_ulong * v, + const char *format); + +int gsl_vector_ulong_memcpy (gsl_vector_ulong * dest, const gsl_vector_ulong * src); + +int gsl_vector_ulong_reverse (gsl_vector_ulong * v); + +int gsl_vector_ulong_swap (gsl_vector_ulong * v, gsl_vector_ulong * w); +int gsl_vector_ulong_swap_elements (gsl_vector_ulong * v, const size_t i, const size_t j); + +unsigned long gsl_vector_ulong_max (const gsl_vector_ulong * v); +unsigned long gsl_vector_ulong_min (const gsl_vector_ulong * v); +void gsl_vector_ulong_minmax (const gsl_vector_ulong * v, unsigned long * min_out, unsigned long * max_out); + +size_t gsl_vector_ulong_max_index (const gsl_vector_ulong * v); +size_t gsl_vector_ulong_min_index (const gsl_vector_ulong * v); +void gsl_vector_ulong_minmax_index (const gsl_vector_ulong * v, size_t * imin, size_t * imax); + +int gsl_vector_ulong_add (gsl_vector_ulong * a, const gsl_vector_ulong * b); +int gsl_vector_ulong_sub (gsl_vector_ulong * a, const gsl_vector_ulong * b); +int gsl_vector_ulong_mul (gsl_vector_ulong * a, const gsl_vector_ulong * b); +int gsl_vector_ulong_div (gsl_vector_ulong * a, const gsl_vector_ulong * b); +int gsl_vector_ulong_scale (gsl_vector_ulong * a, const double x); +int gsl_vector_ulong_add_constant (gsl_vector_ulong * a, const double x); + +int gsl_vector_ulong_equal (const gsl_vector_ulong * u, + const gsl_vector_ulong * v); + +int gsl_vector_ulong_isnull (const gsl_vector_ulong * v); +int gsl_vector_ulong_ispos (const gsl_vector_ulong * v); +int gsl_vector_ulong_isneg (const gsl_vector_ulong * v); +int gsl_vector_ulong_isnonneg (const gsl_vector_ulong * v); + +INLINE_DECL unsigned long gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i); +INLINE_DECL void gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x); +INLINE_DECL unsigned long * gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i); +INLINE_DECL const unsigned long * gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +unsigned long +gsl_vector_ulong_get (const gsl_vector_ulong * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_ulong_set (gsl_vector_ulong * v, const size_t i, unsigned long x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +unsigned long * +gsl_vector_ulong_ptr (gsl_vector_ulong * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (unsigned long *) (v->data + i * v->stride); +} + +INLINE_FUN +const unsigned long * +gsl_vector_ulong_const_ptr (const gsl_vector_ulong * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const unsigned long *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_ULONG_H__ */ + + diff --git a/software/gsl-1.15/vector/gsl_vector_ushort.h b/software/gsl-1.15/vector/gsl_vector_ushort.h new file mode 100644 index 000000000..7b7e66438 --- /dev/null +++ b/software/gsl-1.15/vector/gsl_vector_ushort.h @@ -0,0 +1,230 @@ +/* vector/gsl_vector_ushort.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_VECTOR_USHORT_H__ +#define __GSL_VECTOR_USHORT_H__ + +#include +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef struct +{ + size_t size; + size_t stride; + unsigned short *data; + gsl_block_ushort *block; + int owner; +} +gsl_vector_ushort; + +typedef struct +{ + gsl_vector_ushort vector; +} _gsl_vector_ushort_view; + +typedef _gsl_vector_ushort_view gsl_vector_ushort_view; + +typedef struct +{ + gsl_vector_ushort vector; +} _gsl_vector_ushort_const_view; + +typedef const _gsl_vector_ushort_const_view gsl_vector_ushort_const_view; + + +/* Allocation */ + +gsl_vector_ushort *gsl_vector_ushort_alloc (const size_t n); +gsl_vector_ushort *gsl_vector_ushort_calloc (const size_t n); + +gsl_vector_ushort *gsl_vector_ushort_alloc_from_block (gsl_block_ushort * b, + const size_t offset, + const size_t n, + const size_t stride); + +gsl_vector_ushort *gsl_vector_ushort_alloc_from_vector (gsl_vector_ushort * v, + const size_t offset, + const size_t n, + const size_t stride); + +void gsl_vector_ushort_free (gsl_vector_ushort * v); + +/* Views */ + +_gsl_vector_ushort_view +gsl_vector_ushort_view_array (unsigned short *v, size_t n); + +_gsl_vector_ushort_view +gsl_vector_ushort_view_array_with_stride (unsigned short *base, + size_t stride, + size_t n); + +_gsl_vector_ushort_const_view +gsl_vector_ushort_const_view_array (const unsigned short *v, size_t n); + +_gsl_vector_ushort_const_view +gsl_vector_ushort_const_view_array_with_stride (const unsigned short *base, + size_t stride, + size_t n); + +_gsl_vector_ushort_view +gsl_vector_ushort_subvector (gsl_vector_ushort *v, + size_t i, + size_t n); + +_gsl_vector_ushort_view +gsl_vector_ushort_subvector_with_stride (gsl_vector_ushort *v, + size_t i, + size_t stride, + size_t n); + +_gsl_vector_ushort_const_view +gsl_vector_ushort_const_subvector (const gsl_vector_ushort *v, + size_t i, + size_t n); + +_gsl_vector_ushort_const_view +gsl_vector_ushort_const_subvector_with_stride (const gsl_vector_ushort *v, + size_t i, + size_t stride, + size_t n); + +/* Operations */ + +void gsl_vector_ushort_set_zero (gsl_vector_ushort * v); +void gsl_vector_ushort_set_all (gsl_vector_ushort * v, unsigned short x); +int gsl_vector_ushort_set_basis (gsl_vector_ushort * v, size_t i); + +int gsl_vector_ushort_fread (FILE * stream, gsl_vector_ushort * v); +int gsl_vector_ushort_fwrite (FILE * stream, const gsl_vector_ushort * v); +int gsl_vector_ushort_fscanf (FILE * stream, gsl_vector_ushort * v); +int gsl_vector_ushort_fprintf (FILE * stream, const gsl_vector_ushort * v, + const char *format); + +int gsl_vector_ushort_memcpy (gsl_vector_ushort * dest, const gsl_vector_ushort * src); + +int gsl_vector_ushort_reverse (gsl_vector_ushort * v); + +int gsl_vector_ushort_swap (gsl_vector_ushort * v, gsl_vector_ushort * w); +int gsl_vector_ushort_swap_elements (gsl_vector_ushort * v, const size_t i, const size_t j); + +unsigned short gsl_vector_ushort_max (const gsl_vector_ushort * v); +unsigned short gsl_vector_ushort_min (const gsl_vector_ushort * v); +void gsl_vector_ushort_minmax (const gsl_vector_ushort * v, unsigned short * min_out, unsigned short * max_out); + +size_t gsl_vector_ushort_max_index (const gsl_vector_ushort * v); +size_t gsl_vector_ushort_min_index (const gsl_vector_ushort * v); +void gsl_vector_ushort_minmax_index (const gsl_vector_ushort * v, size_t * imin, size_t * imax); + +int gsl_vector_ushort_add (gsl_vector_ushort * a, const gsl_vector_ushort * b); +int gsl_vector_ushort_sub (gsl_vector_ushort * a, const gsl_vector_ushort * b); +int gsl_vector_ushort_mul (gsl_vector_ushort * a, const gsl_vector_ushort * b); +int gsl_vector_ushort_div (gsl_vector_ushort * a, const gsl_vector_ushort * b); +int gsl_vector_ushort_scale (gsl_vector_ushort * a, const double x); +int gsl_vector_ushort_add_constant (gsl_vector_ushort * a, const double x); + +int gsl_vector_ushort_equal (const gsl_vector_ushort * u, + const gsl_vector_ushort * v); + +int gsl_vector_ushort_isnull (const gsl_vector_ushort * v); +int gsl_vector_ushort_ispos (const gsl_vector_ushort * v); +int gsl_vector_ushort_isneg (const gsl_vector_ushort * v); +int gsl_vector_ushort_isnonneg (const gsl_vector_ushort * v); + +INLINE_DECL unsigned short gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i); +INLINE_DECL void gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x); +INLINE_DECL unsigned short * gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i); +INLINE_DECL const unsigned short * gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i); + +#ifdef HAVE_INLINE + +INLINE_FUN +unsigned short +gsl_vector_ushort_get (const gsl_vector_ushort * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); + } +#endif + return v->data[i * v->stride]; +} + +INLINE_FUN +void +gsl_vector_ushort_set (gsl_vector_ushort * v, const size_t i, unsigned short x) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_VOID ("index out of range", GSL_EINVAL); + } +#endif + v->data[i * v->stride] = x; +} + +INLINE_FUN +unsigned short * +gsl_vector_ushort_ptr (gsl_vector_ushort * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (unsigned short *) (v->data + i * v->stride); +} + +INLINE_FUN +const unsigned short * +gsl_vector_ushort_const_ptr (const gsl_vector_ushort * v, const size_t i) +{ +#if GSL_RANGE_CHECK + if (GSL_RANGE_COND(i >= v->size)) + { + GSL_ERROR_NULL ("index out of range", GSL_EINVAL); + } +#endif + return (const unsigned short *) (v->data + i * v->stride); +} +#endif /* HAVE_INLINE */ + +__END_DECLS + +#endif /* __GSL_VECTOR_USHORT_H__ */ + + diff --git a/software/gsl-1.15/vector/init.c b/software/gsl-1.15/vector/init.c new file mode 100644 index 000000000..5f3b00084 --- /dev/null +++ b/software/gsl-1.15/vector/init.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "init_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/init_source.c b/software/gsl-1.15/vector/init_source.c new file mode 100644 index 000000000..f55c8b423 --- /dev/null +++ b/software/gsl-1.15/vector/init_source.c @@ -0,0 +1,230 @@ +/* vector/init_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, alloc) (const size_t n) +{ + TYPE (gsl_block) * block; + TYPE (gsl_vector) * v; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, 0); + } + + v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector))); + + if (v == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vector struct", + GSL_ENOMEM, 0); + } + + block = FUNCTION (gsl_block,alloc) (n); + + if (block == 0) + { + free (v) ; + + GSL_ERROR_VAL ("failed to allocate space for block", + GSL_ENOMEM, 0); + } + + v->data = block->data ; + v->size = n; + v->stride = 1; + v->block = block; + v->owner = 1; + + return v; +} + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, calloc) (const size_t n) +{ + size_t i; + + TYPE (gsl_vector) * v = FUNCTION (gsl_vector, alloc) (n); + + if (v == 0) + return 0; + + /* initialize vector to zero */ + + for (i = 0; i < MULTIPLICITY * n; i++) + { + v->data[i] = 0; + } + + return v; +} + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, alloc_from_block) (TYPE(gsl_block) * block, + const size_t offset, + const size_t n, + const size_t stride) +{ + TYPE (gsl_vector) * v; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, 0); + } + + if (stride == 0) + { + GSL_ERROR_VAL ("stride must be positive integer", GSL_EINVAL, 0); + } + + if (block->size <= offset + (n - 1) * stride) + { + GSL_ERROR_VAL ("vector would extend past end of block", GSL_EINVAL, 0); + } + + v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector))); + + if (v == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vector struct", + GSL_ENOMEM, 0); + } + + v->data = block->data + MULTIPLICITY * offset ; + v->size = n; + v->stride = stride; + v->block = block; + v->owner = 0; + + return v; +} + +TYPE (gsl_vector) * +FUNCTION (gsl_vector, alloc_from_vector) (TYPE(gsl_vector) * w, + const size_t offset, + const size_t n, + const size_t stride) +{ + TYPE (gsl_vector) * v; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, 0); + } + + if (stride == 0) + { + GSL_ERROR_VAL ("stride must be positive integer", GSL_EINVAL, 0); + } + + if (offset + (n - 1) * stride >= w->size) + { + GSL_ERROR_VAL ("vector would extend past end of block", GSL_EINVAL, 0); + } + + v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector))); + + if (v == 0) + { + GSL_ERROR_VAL ("failed to allocate space for vector struct", + GSL_ENOMEM, 0); + } + + v->data = w->data + MULTIPLICITY * w->stride * offset ; + v->size = n; + v->stride = stride * w->stride; + v->block = w->block; + v->owner = 0; + + return v; +} + + +void +FUNCTION (gsl_vector, free) (TYPE (gsl_vector) * v) +{ + RETURN_IF_NULL (v); + + if (v->owner) + { + FUNCTION(gsl_block, free) (v->block) ; + } + free (v); +} + + +void +FUNCTION (gsl_vector, set_all) (TYPE (gsl_vector) * v, BASE x) +{ + ATOMIC * const data = v->data; + const size_t n = v->size; + const size_t stride = v->stride; + + size_t i; + + for (i = 0; i < n; i++) + { + *(BASE *) (data + MULTIPLICITY * i * stride) = x; + } +} + +void +FUNCTION (gsl_vector, set_zero) (TYPE (gsl_vector) * v) +{ + ATOMIC * const data = v->data; + const size_t n = v->size; + const size_t stride = v->stride; + const BASE zero = ZERO ; + + size_t i; + + for (i = 0; i < n; i++) + { + *(BASE *) (data + MULTIPLICITY * i * stride) = zero; + } +} + +int +FUNCTION (gsl_vector, set_basis) (TYPE (gsl_vector) * v, size_t i) +{ + ATOMIC * const data = v->data; + const size_t n = v->size; + const size_t stride = v->stride; + const BASE zero = ZERO ; + const BASE one = ONE; + + size_t k; + + if (i >= n) + { + GSL_ERROR ("index out of range", GSL_EINVAL); + } + + for (k = 0; k < n; k++) + { + *(BASE *) (data + MULTIPLICITY * k * stride) = zero; + } + + *(BASE *) (data + MULTIPLICITY * i * stride) = one; + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/vector/minmax.c b/software/gsl-1.15/vector/minmax.c new file mode 100644 index 000000000..27ee8dba4 --- /dev/null +++ b/software/gsl-1.15/vector/minmax.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "minmax_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/vector/minmax_source.c b/software/gsl-1.15/vector/minmax_source.c new file mode 100644 index 000000000..a6ba45aa4 --- /dev/null +++ b/software/gsl-1.15/vector/minmax_source.c @@ -0,0 +1,217 @@ +/* vector/minmax_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +BASE +FUNCTION(gsl_vector,max) (const TYPE(gsl_vector) * v) +{ + /* finds the largest element of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + BASE max = v->data[0 * stride]; + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x > max) + max = x; +#ifdef FP + if (isnan (x)) + return x; +#endif + } + + return max; +} + +BASE +FUNCTION(gsl_vector,min) (const TYPE(gsl_vector) * v) +{ + /* finds the smallest element of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + BASE min = v->data[0 * stride]; + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x < min) + min = x; +#ifdef FP + if (isnan (x)) + return x; +#endif + } + + return min; +} + +void +FUNCTION(gsl_vector,minmax) (const TYPE(gsl_vector) * v, + BASE * min_out, + BASE * max_out) +{ + /* finds the smallest and largest elements of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + BASE max = v->data[0 * stride]; + BASE min = v->data[0 * stride]; + + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x < min) + { + min = x; + } + if (x > max) + { + max = x; + } +#ifdef FP + if (isnan (x)) + { + min = x; + max = x; + break; + } +#endif + } + + *min_out = min; + *max_out = max; +} + + +size_t +FUNCTION(gsl_vector,max_index) (const TYPE(gsl_vector) * v) +{ + /* finds the largest element of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + BASE max = v->data[0 * stride]; + size_t imax = 0; + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x > max) + { + max = x; + imax = i; + } +#ifdef FP + if (isnan (x)) + { + return i; + } +#endif + } + + return imax; +} + +size_t +FUNCTION(gsl_vector,min_index) (const TYPE(gsl_vector) * v) +{ + /* finds the smallest element of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + BASE min = v->data[0 * stride]; + size_t imin = 0; + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x < min) + { + min = x; + imin = i; + } +#ifdef FP + if (isnan (x)) + { + return i; + } +#endif + } + + return imin; +} + + +void +FUNCTION(gsl_vector,minmax_index) (const TYPE(gsl_vector) * v, + size_t * imin_out, + size_t * imax_out) +{ + /* finds the smallest and largest elements of a vector */ + + const size_t N = v->size ; + const size_t stride = v->stride ; + + size_t imin = 0, imax = 0; + BASE max = v->data[0 * stride]; + BASE min = v->data[0 * stride]; + + size_t i; + + for (i = 0; i < N; i++) + { + BASE x = v->data[i*stride]; + if (x < min) + { + min = x; + imin = i; + } + if (x > max) + { + max = x; + imax = i; + } +#ifdef FP + if (isnan (x)) + { + imin = i; + imax = i; + break; + } +#endif + } + + *imin_out = imin; + *imax_out = imax; +} + + diff --git a/software/gsl-1.15/vector/oper.c b/software/gsl-1.15/vector/oper.c new file mode 100644 index 000000000..73665f615 --- /dev/null +++ b/software/gsl-1.15/vector/oper.c @@ -0,0 +1,91 @@ +#include +#include +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "oper_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "oper_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff --git a/software/gsl-1.15/vector/oper_complex_source.c b/software/gsl-1.15/vector/oper_complex_source.c new file mode 100644 index 000000000..aa9a56873 --- /dev/null +++ b/software/gsl-1.15/vector/oper_complex_source.c @@ -0,0 +1,182 @@ +/* vector/oper_source.c + * + * Copyright (C) 2008 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_vector, add) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride_a] += b->data[2 * i * stride_b]; + a->data[2 * i * stride_a + 1] += b->data[2 * i * stride_b + 1]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, sub) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride_a] -= b->data[2 * i * stride_b]; + a->data[2 * i * stride_a + 1] -= b->data[2 * i * stride_b + 1]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, mul) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride_a]; + ATOMIC ai = a->data[2 * i * stride_a + 1]; + + ATOMIC br = b->data[2 * i * stride_b]; + ATOMIC bi = b->data[2 * i * stride_b + 1]; + + a->data[2 * i * stride_a] = ar * br - ai * bi; + a->data[2 * i * stride_a + 1] = ar * bi + ai * br; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, div) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride_a]; + ATOMIC ai = a->data[2 * i * stride_a + 1]; + + ATOMIC br = b->data[2 * i * stride_b]; + ATOMIC bi = b->data[2 * i * stride_b + 1]; + + ATOMIC s = 1.0 / hypot(br, bi); + + ATOMIC sbr = s * br; + ATOMIC sbi = s * bi; + + a->data[2 * i * stride_a] = (ar * sbr + ai * sbi) * s; + a->data[2 * i * stride_a + 1] = (ai * sbr - ar * sbi) * s; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, scale) (TYPE(gsl_vector) * a, const BASE x) +{ + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + ATOMIC xr = GSL_REAL(x); + ATOMIC xi = GSL_IMAG(x); + + for (i = 0; i < N; i++) + { + ATOMIC ar = a->data[2 * i * stride]; + ATOMIC ai = a->data[2 * i * stride + 1]; + + a->data[2 * i * stride] = ar * xr - ai * xi; + a->data[2 * i * stride + 1] = ar * xi + ai * xr; + } + + return GSL_SUCCESS; +} + +int +FUNCTION(gsl_vector, add_constant) (TYPE(gsl_vector) * a, const BASE x) +{ + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + ATOMIC xr = GSL_REAL(x); + ATOMIC xi = GSL_IMAG(x); + + for (i = 0; i < N; i++) + { + a->data[2 * i * stride] += xr; + a->data[2 * i * stride + 1] += xi; + } + + return GSL_SUCCESS; +} diff --git a/software/gsl-1.15/vector/oper_source.c b/software/gsl-1.15/vector/oper_source.c new file mode 100644 index 000000000..c08714f45 --- /dev/null +++ b/software/gsl-1.15/vector/oper_source.c @@ -0,0 +1,151 @@ +/* vector/oper_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION(gsl_vector, add) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride_a] += b->data[i * stride_b]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, sub) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride_a] -= b->data[i * stride_b]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, mul) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride_a] *= b->data[i * stride_b]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, div) (TYPE(gsl_vector) * a, const TYPE(gsl_vector) * b) +{ + const size_t N = a->size; + + if (b->size != N) + { + GSL_ERROR ("vectors must have same length", GSL_EBADLEN); + } + else + { + const size_t stride_a = a->stride; + const size_t stride_b = b->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride_a] /= b->data[i * stride_b]; + } + + return GSL_SUCCESS; + } +} + +int +FUNCTION(gsl_vector, scale) (TYPE(gsl_vector) * a, const double x) +{ + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride] *= x; + } + + return GSL_SUCCESS; +} + +int +FUNCTION(gsl_vector, add_constant) (TYPE(gsl_vector) * a, const double x) +{ + const size_t N = a->size; + const size_t stride = a->stride; + + size_t i; + + for (i = 0; i < N; i++) + { + a->data[i * stride] += x; + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/vector/prop.c b/software/gsl-1.15/vector/prop.c new file mode 100644 index 000000000..eeb18d63e --- /dev/null +++ b/software/gsl-1.15/vector/prop.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "prop_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/prop_source.c b/software/gsl-1.15/vector/prop_source.c new file mode 100644 index 000000000..5913e7e65 --- /dev/null +++ b/software/gsl-1.15/vector/prop_source.c @@ -0,0 +1,148 @@ +/* vector/prop_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +int +FUNCTION (gsl_vector, equal) (const TYPE (gsl_vector) * u, const TYPE (gsl_vector) * v) +{ + const size_t n = v->size; + const size_t stride_u = u->stride ; + const size_t stride_v = v->stride ; + + size_t j; + + if (u->size != v->size) + { + GSL_ERROR_VAL ("vectors must have same length", GSL_EBADLEN, 0); + } + + for (j = 0; j < n; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (u->data[MULTIPLICITY * stride_u * j + k] != v->data[MULTIPLICITY * stride_v * j + k]) + { + return 0; + } + } + } + + return 1; +} + + + +int +FUNCTION (gsl_vector, isnull) (const TYPE (gsl_vector) * v) +{ + const size_t n = v->size; + const size_t stride = v->stride ; + + size_t j; + + for (j = 0; j < n; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (v->data[MULTIPLICITY * stride * j + k] != 0.0) + { + return 0; + } + } + } + + return 1; +} + +int +FUNCTION (gsl_vector, ispos) (const TYPE (gsl_vector) * v) +{ + const size_t n = v->size; + const size_t stride = v->stride ; + + size_t j; + + for (j = 0; j < n; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (v->data[MULTIPLICITY * stride * j + k] <= 0.0) + { + return 0; + } + } + } + + return 1; +} + +int +FUNCTION (gsl_vector, isneg) (const TYPE (gsl_vector) * v) +{ + const size_t n = v->size; + const size_t stride = v->stride ; + + size_t j; + + for (j = 0; j < n; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (v->data[MULTIPLICITY * stride * j + k] >= 0.0) + { + return 0; + } + } + } + + return 1; +} + +int +FUNCTION (gsl_vector, isnonneg) (const TYPE (gsl_vector) * v) +{ + const size_t n = v->size; + const size_t stride = v->stride ; + + size_t j; + + for (j = 0; j < n; j++) + { + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + if (v->data[MULTIPLICITY * stride * j + k] < 0.0) + { + return 0; + } + } + } + + return 1; +} + diff --git a/software/gsl-1.15/vector/reim.c b/software/gsl-1.15/vector/reim.c new file mode 100644 index 000000000..9271a1a88 --- /dev/null +++ b/software/gsl-1.15/vector/reim.c @@ -0,0 +1,44 @@ +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "reim_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT diff --git a/software/gsl-1.15/vector/reim_source.c b/software/gsl-1.15/vector/reim_source.c new file mode 100644 index 000000000..c413d5b4c --- /dev/null +++ b/software/gsl-1.15/vector/reim_source.c @@ -0,0 +1,56 @@ +/* vector/reim_source.c + * + * Copyright (C) 2001, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_REAL_VIEW(_gsl_vector, view) +FUNCTION(gsl_vector, real) (QUALIFIED_TYPE(gsl_vector) * v) +{ + REAL_TYPE(gsl_vector) s = NULL_VECTOR; + + s.data = v->data; + s.size = v->size; + s.stride = MULTIPLICITY * v->stride; + s.block = 0; /* FIXME: should be v->block, but cannot point to + block of different type */ + s.owner = 0; + + { + QUALIFIED_REAL_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + view.vector = s; + return view; + } +} + +QUALIFIED_REAL_VIEW(_gsl_vector, view) +FUNCTION(gsl_vector, imag) (QUALIFIED_TYPE(gsl_vector) * v) +{ + REAL_TYPE(gsl_vector) s = NULL_VECTOR; + + s.data = v->data + 1; + s.size = v->size; + s.stride = MULTIPLICITY * v->stride; + s.block = 0; /* FIXME: cannot point to block of different type */ + s.owner = 0; + + { + QUALIFIED_REAL_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + view.vector = s; + return view; + } +} + diff --git a/software/gsl-1.15/vector/subvector.c b/software/gsl-1.15/vector/subvector.c new file mode 100644 index 000000000..5f6b83e55 --- /dev/null +++ b/software/gsl-1.15/vector/subvector.c @@ -0,0 +1,176 @@ +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "subvector_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/subvector_source.c b/software/gsl-1.15/vector/subvector_source.c new file mode 100644 index 000000000..6fb638f74 --- /dev/null +++ b/software/gsl-1.15/vector/subvector_source.c @@ -0,0 +1,86 @@ +/* vector/subvector_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_VIEW(_gsl_vector, view) +FUNCTION(gsl_vector, subvector) (QUALIFIED_TYPE(gsl_vector) * v, size_t offset, size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + + if (offset + (n - 1) >= v->size) + { + GSL_ERROR_VAL ("view would extend past end of vector", + GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) s = NULL_VECTOR; + + s.data = v->data + MULTIPLICITY * v->stride * offset ; + s.size = n; + s.stride = v->stride; + s.block = v->block; + s.owner = 0; + + view.vector = s; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector, view) +FUNCTION(gsl_vector, subvector_with_stride) (QUALIFIED_TYPE(gsl_vector) * v, size_t offset, size_t stride, size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + + if (stride == 0) + { + GSL_ERROR_VAL ("stride must be positive integer", + GSL_EINVAL, view); + } + + if (offset + (n - 1) * stride >= v->size) + { + GSL_ERROR_VAL ("view would extend past end of vector", + GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) s = NULL_VECTOR; + + s.data = v->data + MULTIPLICITY * v->stride * offset ; + s.size = n; + s.stride = v->stride * stride; + s.block = v->block; + s.owner = 0; + + view.vector = s; + return view; + } +} diff --git a/software/gsl-1.15/vector/swap.c b/software/gsl-1.15/vector/swap.c new file mode 100644 index 000000000..226e9832d --- /dev/null +++ b/software/gsl-1.15/vector/swap.c @@ -0,0 +1,87 @@ +#include +#include +#include + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "swap_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/swap_source.c b/software/gsl-1.15/vector/swap_source.c new file mode 100644 index 000000000..92300d839 --- /dev/null +++ b/software/gsl-1.15/vector/swap_source.c @@ -0,0 +1,107 @@ +/* vector/swap_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +int +FUNCTION (gsl_vector, swap) (TYPE (gsl_vector) * v, TYPE (gsl_vector) * w) +{ + ATOMIC * d1 = v->data ; + ATOMIC * d2 = w->data ; + const size_t size = v->size ; + const size_t s1 = MULTIPLICITY * v->stride ; + const size_t s2 = MULTIPLICITY * w->stride ; + size_t i, k ; + + if (v->size != w->size) + { + GSL_ERROR("vector lengths must be equal", GSL_EINVAL); + } + + for (i = 0; i < size; i++) + { + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC tmp = d1[i*s1 + k]; + d1[i*s1+k] = d2[i*s2 + k]; + d2[i*s2+k] = tmp; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_vector, swap_elements) (TYPE (gsl_vector) * v, const size_t i, const size_t j) +{ + ATOMIC * data = v->data ; + const size_t size = v->size ; + const size_t stride = v->stride ; + + if (i >= size) + { + GSL_ERROR("first index is out of range", GSL_EINVAL); + } + + if (j >= size) + { + GSL_ERROR("second index is out of range", GSL_EINVAL); + } + + if (i != j) + { + const size_t s = MULTIPLICITY * stride ; + size_t k ; + + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC tmp = data[j*s + k]; + data[j*s+k] = data[i*s + k]; + data[i*s+k] = tmp; + } + } + + return GSL_SUCCESS; +} + +int +FUNCTION (gsl_vector, reverse) (TYPE (gsl_vector) * v) +{ + ATOMIC * data = v->data ; + const size_t size = v->size ; + const size_t stride = v->stride ; + + const size_t s = MULTIPLICITY * stride ; + + size_t i ; + + for (i = 0 ; i < (size / 2) ; i++) + { + size_t j = size - i - 1 ; + size_t k; + + for (k = 0; k < MULTIPLICITY; k++) + { + ATOMIC tmp = data[j*s + k]; + data[j*s+k] = data[i*s + k]; + data[i*s+k] = tmp; + } + } + + return GSL_SUCCESS; +} + diff --git a/software/gsl-1.15/vector/test.c b/software/gsl-1.15/vector/test.c new file mode 100644 index 000000000..f08ced33f --- /dev/null +++ b/software/gsl-1.15/vector/test.c @@ -0,0 +1,244 @@ +/* vector/test.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#if (!GSL_RANGE_CHECK) && defined(HAVE_INLINE) +#undef GSL_RANGE_CHECK +#define GSL_RANGE_CHECK 1 +#endif + +#include +#include +#include +#include +#include +#include +#include + +int status = 0; + +#ifndef DESC +#define DESC "" +#endif + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "test_complex_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "test_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +void my_error_handler (const char *reason, const char *file, + int line, int err); + +int +main (void) +{ + size_t stride, ostride, N; + + gsl_ieee_env_setup (); + + for (N = 10; N < 1024; N = 2*N + 1) + { + for (stride = 1; stride < 5 ; stride++) + { + test_func (stride, N); + test_float_func (stride, N); + test_long_double_func (stride, N); + test_ulong_func (stride, N); + test_long_func (stride, N); + test_uint_func (stride, N); + test_int_func (stride, N); + test_ushort_func (stride, N); + test_short_func (stride, N); + test_uchar_func (stride, N); + test_char_func (stride, N); + + test_complex_func (stride, N); + test_complex_float_func (stride, N); + test_complex_long_double_func (stride, N); + + for (ostride = 1; ostride < 5 ; ostride++) + { + test_ops (stride, ostride, N); + test_float_ops (stride, ostride, N); + test_long_double_ops (stride, ostride, N); + test_ulong_ops (stride, ostride, N); + test_long_ops (stride, ostride, N); + test_uint_ops (stride, ostride, N); + test_int_ops (stride, ostride, N); + test_ushort_ops (stride, ostride, N); + test_short_ops (stride, ostride, N); + test_uchar_ops (stride, ostride, N); + test_char_ops (stride, ostride, N); + test_complex_ops (stride, ostride, N); + test_complex_float_ops (stride, ostride, N); + test_complex_long_double_ops (stride, ostride, N); + } + + test_text (stride, N); + test_float_text (stride, N); +#if HAVE_PRINTF_LONGDOUBLE + test_long_double_text (stride, N); +#endif + test_ulong_text (stride, N); + test_long_text (stride, N); + test_uint_text (stride, N); + test_int_text (stride, N); + test_ushort_text (stride, N); + test_short_text (stride, N); + test_uchar_text (stride, N); + test_char_text (stride, N); + + test_complex_text (stride, N); + test_complex_float_text (stride, N); +#if HAVE_PRINTF_LONGDOUBLE + test_complex_long_double_text (stride, N); +#endif + + test_file (stride, N); + test_float_file (stride, N); + test_long_double_file (stride, N); + test_ulong_file (stride, N); + test_long_file (stride, N); + test_uint_file (stride, N); + test_int_file (stride, N); + test_ushort_file (stride, N); + test_short_file (stride, N); + test_uchar_file (stride, N); + test_char_file (stride, N); + test_complex_file (stride, N); + test_complex_float_file (stride, N); + test_complex_long_double_file (stride, N); + } + } + +#if GSL_RANGE_CHECK + gsl_set_error_handler (&my_error_handler); + + for (N = 1; N < 1024; N *=2) + { + for (stride = 1; stride < 5 ; stride++) + { + test_trap (stride, N); + test_float_trap (stride, N); + test_long_double_trap (stride, N); + test_ulong_trap (stride, N); + test_long_trap (stride, N); + test_uint_trap (stride, N); + test_int_trap (stride, N); + test_ushort_trap (stride, N); + test_short_trap (stride, N); + test_uchar_trap (stride, N); + test_char_trap (stride, N); + test_complex_trap (stride, N); + test_complex_float_trap (stride, N); + test_complex_long_double_trap (stride, N); + } + } +#endif + + exit (gsl_test_summary ()); +} + +void +my_error_handler (const char *reason, const char *file, int line, int err) +{ + if (0) + printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err); + status = 1; +} diff --git a/software/gsl-1.15/vector/test_complex_source.c b/software/gsl-1.15/vector/test_complex_source.c new file mode 100644 index 000000000..057629e9f --- /dev/null +++ b/software/gsl-1.15/vector/test_complex_source.c @@ -0,0 +1,782 @@ +/* vector/test_complex_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (size_t stride, size_t N); +void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N); +void FUNCTION (test, file) (size_t stride, size_t N); +void FUNCTION (test, text) (size_t stride, size_t N); +void FUNCTION (test, trap) (size_t stride, size_t N); +TYPE (gsl_vector) * FUNCTION(create, vector) (size_t stride, size_t N); + +#define TEST(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride=%d, N=%d", stride, N) +#define TEST2(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride1=%d, stride2=%d, N=%d", stride1, stride2, N) + +TYPE (gsl_vector) * +FUNCTION(create, vector) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N*stride); + v->stride = stride; + v->size = N; + return v; +} + +void +FUNCTION (test, func) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v0; + TYPE (gsl_vector) * v; + QUALIFIED_VIEW(gsl_vector,view) view; + + size_t i, j; + + if (stride == 1) + { + v = FUNCTION (gsl_vector, calloc) (N); + + TEST(v->data == 0, "_calloc pointer"); + TEST(v->size != N, "_calloc size"); + TEST(v->stride != 1, "_calloc stride"); + + { + int status = (FUNCTION(gsl_vector,isnull)(v) != 1); + TEST (status, "_isnull" DESC " on calloc vector"); + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on calloc vector"); + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on calloc vector"); + } + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + } + + if (stride == 1) + { + v = FUNCTION (gsl_vector, alloc) (N); + + TEST(v->data == 0, "_alloc pointer"); + TEST(v->size != N, "_alloc size"); + TEST(v->stride != 1, "_alloc stride"); + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + } + + if (stride == 1) + { + v0 = FUNCTION (gsl_vector, alloc) (N); + view = FUNCTION (gsl_vector, subvector) (v0, 0, N); + v = &view.vector; + } + else + { + v0 = FUNCTION (gsl_vector, alloc) (N * stride); + + for (i = 0; i < N*stride; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + FUNCTION (gsl_vector, set) (v0, i, x); + } + + view = FUNCTION (gsl_vector, subvector_with_stride) (v0, 0, stride, N); + v = &view.vector; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + FUNCTION (gsl_vector, set) (v, i, x); + } + + for (i = 0; i < N; i++) + { + if (v->data[2*i*stride] != (ATOMIC) (i) || v->data[2 * i * stride + 1] != (ATOMIC) (i + 1234)) + status = 1; + }; + + TEST(status,"_set" DESC " writes into array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE x, y; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + y = FUNCTION (gsl_vector, get) (v, i); + if (!GSL_COMPLEX_EQ (x, y)) + status = 1; + }; + + TEST (status, "_get" DESC " reads from array"); + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, ptr) (v, i) != (BASE *)v->data + i*stride) + status = 1; + }; + + TEST (status, "_ptr" DESC " access to array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, const_ptr) (v, i) != (BASE *)v->data + i*stride) + status = 1; + }; + + TEST (status, "_const_ptr" DESC " access to array"); + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + FUNCTION (gsl_vector, set) (v, i, x); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 1); + TEST (status, "_isnull" DESC " on null vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on null vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on null vector") ; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + FUNCTION (gsl_vector, set) (v, i, x); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on non-null vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on non-null vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_isneg" DESC " on non-null vector") ; + } + + { + int status = 0; + + FUNCTION (gsl_vector, set_zero) (v); + + for (i = 0; i < N; i++) + { + BASE x, y = ZERO; + x = FUNCTION (gsl_vector, get) (v, i); + if (!GSL_COMPLEX_EQ (x, y)) + status = 1; + }; + + TEST (status, "_setzero" DESC " on non-null vector") ; + } + + { + int status = 0; + + BASE x; + GSL_REAL (x) = (ATOMIC)27; + GSL_IMAG (x) = (ATOMIC)(27 + 1234); + + FUNCTION (gsl_vector, set_all) (v, x); + + for (i = 0; i < N; i++) + { + BASE y = FUNCTION (gsl_vector, get) (v, i); + if (!GSL_COMPLEX_EQ (x, y)) + status = 1; + }; + + TEST (status, "_setall" DESC " to non-zero value") ; + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set_basis) (v, i); + + for (j = 0; j < N; j++) + { + BASE x = FUNCTION (gsl_vector, get) (v, j); + BASE one = ONE; + BASE zero = ZERO; + + if (i == j) + { + if (!GSL_COMPLEX_EQ (x, one)) + status = 1 ; + } + else + { + if (!GSL_COMPLEX_EQ (x, zero)) + status = 1; + } + }; + } + + TEST (status, "_setbasis" DESC " over range") ; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + FUNCTION (gsl_vector, set) (v, i, x); + } + + { + BASE x = ZERO; + GSL_REAL(x) = 2.0; + GSL_IMAG(x) = 3.0; + FUNCTION (gsl_vector, scale) (v, x); + } + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC real = -(ATOMIC)i-(ATOMIC)3702; + ATOMIC imag = 5*(ATOMIC)i+(ATOMIC)2468; + if (GSL_REAL(r) != real || GSL_IMAG(r) != imag) + status = 1; + }; + + TEST (status, "_scale" DESC " by 2") ; + } + + { + int status = 0; + + { + BASE x = ZERO; + GSL_REAL(x) = 7.0; + GSL_IMAG(x) = 13.0; + FUNCTION (gsl_vector, add_constant) (v, x); + } + + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC real = -(ATOMIC)i-(ATOMIC)3695; + ATOMIC imag = 5*(ATOMIC)i+(ATOMIC)2481; + + if (GSL_REAL(r) != real || GSL_IMAG(r) != imag) + status = 1; + }; + + TEST (status, "_add_constant" DESC) ; + } + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1234); + FUNCTION (gsl_vector, set) (v, i, x); + } + + { + int status; + BASE x, y, r, s ; + GSL_REAL(x) = 2 ; + GSL_IMAG(x) = 2 + 1234; + GSL_REAL(y) = 5 ; + GSL_IMAG(y) = 5 + 1234; + + FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; + + r = FUNCTION(gsl_vector,get)(v,2); + s = FUNCTION(gsl_vector,get)(v,5); + + status = ! GSL_COMPLEX_EQ(r,y) ; + status |= ! GSL_COMPLEX_EQ(s,x) ; + + FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; + + r = FUNCTION(gsl_vector,get)(v,2); + s = FUNCTION(gsl_vector,get)(v,5); + + status |= ! GSL_COMPLEX_EQ(r,x) ; + status |= ! GSL_COMPLEX_EQ(s,y) ; + + TEST (status, "_swap_elements" DESC " exchanges elements") ; + } + + { + int status = 0; + + FUNCTION (gsl_vector,reverse) (v) ; + + for (i = 0; i < N; i++) + { + BASE x,r ; + GSL_REAL(x) = (ATOMIC)(N - i - 1) ; + GSL_IMAG(x) = (ATOMIC)(N - i - 1 + 1234); + + r = FUNCTION (gsl_vector, get) (v, i); + + status |= !GSL_COMPLEX_EQ(r,x); + } + + gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; + } + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array) (v->data, N*stride); + + for (i = 0; i < N; i++) + { + BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i*stride) ; + BASE y = FUNCTION (gsl_vector, get) (v, i); + if (!GSL_COMPLEX_EQ(x,y)) + status = 1; + }; + + TEST (status, "_view_array" DESC); + } + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array_with_stride) (v->data, stride, N*stride); + + for (i = 0; i < N; i++) + { + BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; + BASE y = FUNCTION (gsl_vector, get) (v, i); + if (!GSL_COMPLEX_EQ(x,y)) + status = 1; + }; + + TEST (status, "_view_array_with_stride" DESC); + } + + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector) (v, N/3, N/2); + + for (i = 0; i < N/2; i++) + { + BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; + BASE y = FUNCTION (gsl_vector, get) (v, (N/3)+i); + if (!GSL_COMPLEX_EQ(x,y)) + status = 1; + }; + + TEST (status, "_view_subvector" DESC); + } + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector_with_stride) (v, N/5, 3, N/4); + + for (i = 0; i < N/4; i++) + { + BASE x = FUNCTION (gsl_vector, get) (&v1.vector, i) ; + BASE y = FUNCTION (gsl_vector, get) (v, (N/5)+3*i); + if (!GSL_COMPLEX_EQ(x,y)) + status = 1; + }; + + TEST (status, "_view_subvector_with_stride" DESC); + } + + + { + int status = 0; + + QUALIFIED_REAL_VIEW(gsl_vector,view) vv = FUNCTION(gsl_vector, real) (v); + + for (i = 0; i < N; i++) + { + ATOMIC xr = REAL_VIEW (gsl_vector, get) (&vv.vector, i) ; + BASE y = FUNCTION (gsl_vector, get) (v, i); + ATOMIC yr = GSL_REAL(y); + + if (xr != yr) + status = 1; + }; + + TEST (status, "_real" DESC); + } + + { + int status = 0; + + QUALIFIED_REAL_VIEW(gsl_vector,view) vv = FUNCTION(gsl_vector, imag) (v); + + for (i = 0; i < N; i++) + { + ATOMIC xr = REAL_VIEW (gsl_vector, get) (&vv.vector, i) ; + BASE y = FUNCTION (gsl_vector, get) (v, i); + ATOMIC yr = GSL_IMAG(y); + + if (xr != yr) + status = 1; + }; + + TEST (status, "_imag" DESC); + } + + + FUNCTION (gsl_vector, free) (v0); /* free whatever is in v */ +} + +void +FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N) +{ + size_t i; + TYPE (gsl_vector) * a = FUNCTION (create, vector) (stride1, N); + TYPE (gsl_vector) * b = FUNCTION (create, vector) (stride2, N); + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride1, N); + + for (i = 0; i < N; i++) + { + BASE z, z1; + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + FUNCTION (gsl_vector, set) (a, i, z); + FUNCTION (gsl_vector, set) (b, i, z1); + } + + { + int status = (FUNCTION(gsl_vector,equal) (a,b) != 0); + TEST2 (status, "_equal vectors unequal"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + + { + int status = (FUNCTION(gsl_vector,equal) (a,v) != 1); + TEST2 (status, "_equal vectors equal"); + } + + FUNCTION(gsl_vector, add) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + if (GSL_REAL(r) != (ATOMIC) (3*i+11) + || GSL_IMAG(r) != (ATOMIC) (3*i+36)) + status = 1; + } + TEST2 (status, "_add vector addition"); + } + + { + int status = 0; + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + BASE z, z1; + + BASE x = FUNCTION (gsl_vector, get) (a, i); + BASE y = FUNCTION (gsl_vector, get) (b, i); + + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + status |= !GSL_COMPLEX_EQ(z,y); + status |= !GSL_COMPLEX_EQ(z1,x); + } + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + BASE z, z1; + + BASE x = FUNCTION (gsl_vector, get) (a, i); + BASE y = FUNCTION (gsl_vector, get) (b, i); + + GSL_REAL (z) = (ATOMIC) 3+i; + GSL_IMAG (z) = (ATOMIC) (3+i + 10); + GSL_REAL (z1) = (ATOMIC) (3 + 2*i + 5); + GSL_IMAG (z1) = (ATOMIC) (3 + 2*i + 20); + + status |= !GSL_COMPLEX_EQ(z,x); + status |= !GSL_COMPLEX_EQ(z1,y); + } + + TEST2 (status, "_swap exchange vectors"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, sub) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + if (GSL_REAL(r) != (-(ATOMIC)i-(ATOMIC)5) || GSL_IMAG(r) != (-(ATOMIC)i-(ATOMIC)10)) + status = 1; + } + + TEST2 (status, "_sub vector subtraction"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, mul) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC real = (-35*(ATOMIC)i-275); + ATOMIC imag = (173+((ATOMIC)i)*(63+4*(ATOMIC)i)); + if (fabs(GSL_REAL(r) - real) > 100 * BASE_EPSILON || + fabs(GSL_IMAG(r) - imag) > 100 * BASE_EPSILON) + status = 1; + } + + TEST2 (status, "_mul multiplication"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, div) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + ATOMIC denom = 593 + ((ATOMIC)i)*(124+((ATOMIC)i)*8); + ATOMIC real = (323+((ATOMIC)i)*(63+4*((ATOMIC)i))) / denom; + ATOMIC imag = (35 +((ATOMIC)i)*5) / denom; + if (fabs(GSL_REAL(r) - real) > 100 * BASE_EPSILON) + status = 1; + if (fabs(GSL_IMAG(r) - imag) > 100 * BASE_EPSILON) + status = 1; + } + TEST2 (status, "_div division"); + } + + FUNCTION(gsl_vector, free) (a); + FUNCTION(gsl_vector, free) (b); + FUNCTION(gsl_vector, free) (v); +} + +void +FUNCTION (test, file) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); + + size_t i; + + { + FILE *f = fopen ("test.dat", "wb"); + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)(N - i); + GSL_IMAG (x) = (ATOMIC)(N - i + 1); + FUNCTION (gsl_vector, set) (v, i, x); + }; + + FUNCTION (gsl_vector, fwrite) (f, v); + + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + + FUNCTION (gsl_vector, fread) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i * stride] != (ATOMIC) (N - i) || w->data[2 * i * stride + 1] != (ATOMIC) (N - i + 1)) + status = 1; + }; + fclose (f); + } + + FUNCTION (gsl_vector, free) (v); + FUNCTION (gsl_vector, free) (w); + + gsl_test (status, NAME (gsl_vector) "_write and read work"); + +} + +#if USES_LONGDOUBLE && ! HAVE_PRINTF_LONGDOUBLE +/* skip this test */ +#else +void +FUNCTION (test, text) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); + + size_t i; + + { + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < N; i++) + { + BASE x; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1); + FUNCTION (gsl_vector, set) (v, i, x); + }; + + FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); + + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + + FUNCTION (gsl_vector, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i * stride] != (ATOMIC) i || w->data[2 * i * stride + 1] != (ATOMIC) (i + 1)) + status = 1; + }; + fclose (f); + } + + FUNCTION (gsl_vector, free) (v); + FUNCTION (gsl_vector, free) (w); + + gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); +} +#endif + +void +FUNCTION (test, trap) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * vc = FUNCTION (create, vector) (stride, N); + + BASE z = {{(ATOMIC)1.2, (ATOMIC)3.4}}; + BASE z1 = {{(ATOMIC)4.5, (ATOMIC)6.7}}; + + size_t j = 0; + + status = 0; + FUNCTION (gsl_vector, set) (vc, j - 1, z); + gsl_test (!status, + NAME (gsl_vector) "_set traps index below lower bound"); + + status = 0; + FUNCTION (gsl_vector, set) (vc, N + 1, z); + gsl_test (!status, + NAME (gsl_vector) "_set traps index above upper bound"); + + status = 0; + FUNCTION (gsl_vector, set) (vc, N, z); + gsl_test (!status, NAME (gsl_vector) "_set traps index at upper bound"); + + status = 0; + z1 = FUNCTION (gsl_vector, get) (vc, j - 1); + gsl_test (!status, + NAME (gsl_vector) "_get traps index below lower bound"); + + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_vector) "_get returns zero real below lower bound"); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_vector) "_get returns zero imag below lower bound"); + + status = 0; + z1 = FUNCTION (gsl_vector, get) (vc, N + 1); + gsl_test (!status, + NAME (gsl_vector) "_get traps index above upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_vector) "_get returns zero real above upper bound"); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_vector) "_get returns zero imag above upper bound"); + + status = 0; + z1 = FUNCTION (gsl_vector, get) (vc, N); + gsl_test (!status, NAME (gsl_vector) "_get traps index at upper bound"); + gsl_test (GSL_REAL (z1) != 0, + NAME (gsl_vector) "_get returns zero real at upper bound"); + gsl_test (GSL_IMAG (z1) != 0, + NAME (gsl_vector) "_get returns zero imag at upper bound"); + + FUNCTION (gsl_vector, free) (vc); +} + + + + diff --git a/software/gsl-1.15/vector/test_source.c b/software/gsl-1.15/vector/test_source.c new file mode 100644 index 000000000..94fcbf60d --- /dev/null +++ b/software/gsl-1.15/vector/test_source.c @@ -0,0 +1,843 @@ +/* vector/test_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007, 2010 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +void FUNCTION (test, func) (size_t stride, size_t N); +void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N); +void FUNCTION (test, file) (size_t stride, size_t N); +void FUNCTION (test, text) (size_t stride, size_t N); +void FUNCTION (test, trap) (size_t stride, size_t N); +TYPE (gsl_vector) * FUNCTION(create, vector) (size_t stride, size_t N); + +#define TEST(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride=%d, N=%d", stride, N) +#define TEST2(expr,desc) gsl_test((expr), NAME(gsl_vector) desc " stride1=%d, stride2=%d, N=%d", stride1, stride2, N) + +TYPE (gsl_vector) * +FUNCTION(create, vector) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (gsl_vector, calloc) (N*stride); + v->stride = stride; + v->size = N; + return v; +} + +void +FUNCTION (test, func) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v0; + TYPE (gsl_vector) * v; + QUALIFIED_VIEW(gsl_vector,view) view; + + size_t i, j; + + if (stride == 1) + { + v = FUNCTION (gsl_vector, calloc) (N); + + TEST(v->data == 0, "_calloc pointer"); + TEST(v->size != N, "_calloc size"); + TEST(v->stride != 1, "_calloc stride"); + + { + int status = (FUNCTION(gsl_vector,isnull)(v) != 1); + TEST (status, "_isnull" DESC " on calloc vector"); + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on calloc vector"); + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on calloc vector"); + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 1); + TEST (status, "_isnonneg" DESC " on calloc vector"); + + } + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + } + + if (stride == 1) + { + v = FUNCTION (gsl_vector, alloc) (N); + + TEST(v->data == 0, "_alloc pointer"); + TEST(v->size != N, "_alloc size"); + TEST(v->stride != 1, "_alloc stride"); + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + } + + if (stride == 1) + { + v0 = FUNCTION (gsl_vector, alloc) (N); + view = FUNCTION (gsl_vector, subvector) (v0, 0, N); + v = &view.vector; + } + else + { + v0 = FUNCTION (gsl_vector, alloc) (N * stride); + + for (i = 0; i < N*stride; i++) + { + v0->data[i] = i; + } + + view = FUNCTION (gsl_vector, subvector_with_stride) (v0, 0, stride, N); + v = &view.vector; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); + } + + for (i = 0; i < N; i++) + { + if (v->data[i*stride] != (ATOMIC) (i)) + status = 1; + }; + + TEST(status,"_set" DESC " writes into array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i)) + status = 1; + }; + + TEST (status, "_get" DESC " reads from array"); + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, ptr) (v, i) != v->data + i*stride) + status = 1; + }; + + TEST (status, "_ptr" DESC " access to array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, const_ptr) (v, i) != v->data + i*stride) + status = 1; + }; + + TEST (status, "_const_ptr" DESC " access to array"); + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) 0); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 1); + TEST (status, "_isnull" DESC " on null vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on null vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on null vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 1); + TEST (status, "_isnonneg" DESC " on null vector") ; + + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (i % 10)); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on non-negative vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on non-negative vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on non-negative vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 1); + TEST (status, "_isnonneg" DESC " on non-negative vector") ; + } + + +#ifndef UNSIGNED + { + int status = 0; + + for (i = 0; i < N; i++) + { + ATOMIC vi = (i % 10) - (ATOMIC) 5; + FUNCTION (gsl_vector, set) (v, i, vi); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on mixed vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on mixed vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on mixed vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 0); + TEST (status, "_isnonneg" DESC " on mixed vector") ; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, -(ATOMIC) (i % 10)); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on non-positive vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on non-positive vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on non-positive non-null vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 0); + TEST (status, "_isnonneg" DESC " on non-positive non-null vector") ; + } +#endif + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (i % 10 + 1)); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on positive vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 1); + TEST (status, "_ispos" DESC " on positive vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 0); + TEST (status, "_isneg" DESC " on positive vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 1); + TEST (status, "_isnonneg" DESC " on positive vector") ; + } + + +#if (!defined(UNSIGNED) && !defined(BASE_CHAR)) + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, -(ATOMIC) (i % 10 + 1)); + } + + status = (FUNCTION(gsl_vector,isnull)(v) != 0); + TEST (status, "_isnull" DESC " on negative vector") ; + + status = (FUNCTION(gsl_vector,ispos)(v) != 0); + TEST (status, "_ispos" DESC " on negative vector") ; + + status = (FUNCTION(gsl_vector,isneg)(v) != 1); + TEST (status, "_isneg" DESC " on negative vector") ; + + status = (FUNCTION(gsl_vector,isnonneg)(v) != 0); + TEST (status, "_isnonneg" DESC " on negative vector") ; + } +#endif + + { + int status = 0; + + FUNCTION (gsl_vector, set_zero) (v); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC)0) + status = 1; + }; + + TEST (status, "_setzero" DESC " on non-null vector") ; + } + + { + int status = 0; + + FUNCTION (gsl_vector, set_all) (v, (ATOMIC)27); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (27)) + status = 1; + }; + + TEST (status, "_setall" DESC " to non-zero value") ; + } + + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set_basis) (v, i); + + for (j = 0; j < N; j++) + { + if (i == j) + { + if (FUNCTION (gsl_vector, get) (v, j) != (ATOMIC)1) + status = 1 ; + } + else + { + if (FUNCTION (gsl_vector, get) (v, j) != (ATOMIC)(0)) + status = 1; + } + }; + } + + TEST (status, "_setbasis" DESC " over range") ; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); + } + + FUNCTION (gsl_vector, scale) (v, 2.0); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i*2.0)) + status = 1; + }; + + TEST (status, "_scale" DESC " by 2") ; + } + + { + int status = 0; + + FUNCTION (gsl_vector, add_constant) (v, (ATOMIC)7); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (i*2.0 + 7)) + status = 1; + }; + + TEST (status, "_add_constant" DESC) ; + } + + { + int status = 0; + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); + } + + FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; + + status = (FUNCTION(gsl_vector,get)(v,2) != 5) ; + status |= (FUNCTION(gsl_vector,get)(v,5) != 2) ; + + FUNCTION (gsl_vector,swap_elements) (v, 2, 5) ; + + status |= (FUNCTION(gsl_vector,get)(v,2) != 2) ; + status |= (FUNCTION(gsl_vector,get)(v,5) != 5) ; + + TEST (status, "_swap_elements" DESC " (2,5)") ; + } + + { + int status = 0; + + FUNCTION (gsl_vector,reverse) (v) ; + + for (i = 0; i < N; i++) + { + status |= (FUNCTION (gsl_vector, get) (v, i) != (ATOMIC) (N - i - 1)); + } + + TEST (status, "_reverse" DESC " reverses elements") ; + } + + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array) (v->data, N*stride); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (&v1.vector, i*stride) != FUNCTION (gsl_vector, get) (v, i)) + status = 1; + }; + + TEST (status, "_view_array" DESC); + } + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, view_array_with_stride) (v->data, stride, N*stride); + + for (i = 0; i < N; i++) + { + if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, i)) + status = 1; + }; + + TEST (status, "_view_array_with_stride" DESC); + } + + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector) (v, N/3, N/2); + + for (i = 0; i < N/2; i++) + { + if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, (N/3) + i)) + status = 1; + }; + + TEST (status, "_view_subvector" DESC); + } + + { + int status = 0; + + QUALIFIED_VIEW(gsl_vector,view) v1 = FUNCTION(gsl_vector, subvector_with_stride) (v, N/5, 3, N/4); + + for (i = 0; i < N/4; i++) + { + if (FUNCTION (gsl_vector, get) (&v1.vector, i) != FUNCTION (gsl_vector, get) (v, (N/5) + 3*i)) + status = 1; + }; + + TEST (status, "_view_subvector_with_stride" DESC); + } + + + { + BASE exp_max = FUNCTION(gsl_vector,get)(v, 0); + BASE exp_min = FUNCTION(gsl_vector,get)(v, 0); + size_t exp_imax = 0, exp_imin = 0; + + for (i = 0; i < N; i++) + { + BASE k = FUNCTION(gsl_vector, get) (v, i) ; + if (k < exp_min) { + exp_min = FUNCTION(gsl_vector, get) (v, i); + exp_imin = i; + } + } + + for (i = 0; i < N; i++) + { + BASE k = FUNCTION(gsl_vector, get) (v, i) ; + if (k > exp_max) { + exp_max = FUNCTION(gsl_vector, get) (v, i) ; + exp_imax = i; + } + } + + { + BASE max = FUNCTION(gsl_vector, max) (v) ; + TEST (max != exp_max, "_max returns correct maximum value"); + } + + { + BASE min = FUNCTION(gsl_vector, min) (v) ; + TEST (min != exp_min, "_min returns correct minimum value"); + } + + { + BASE min, max; + FUNCTION(gsl_vector, minmax) (v, &min, &max); + + TEST (max != exp_max, "_minmax returns correct maximum value"); + TEST (min != exp_min, "_minmax returns correct minimum value"); + } + + + { + size_t imax = FUNCTION(gsl_vector, max_index) (v) ; + TEST (imax != exp_imax, "_max_index returns correct maximum i"); + } + + { + size_t imin = FUNCTION(gsl_vector, min_index) (v) ; + TEST (imin != exp_imin, "_min_index returns correct minimum i"); + } + + { + size_t imin, imax; + + FUNCTION(gsl_vector, minmax_index) (v, &imin, &imax); + + TEST (imax != exp_imax, "_minmax_index returns correct maximum i"); + TEST (imin != exp_imin, "_minmax_index returns correct minimum i"); + } + +#if FP + i = N/2; + FUNCTION(gsl_vector, set) (v, i, GSL_NAN); + exp_max = GSL_NAN; exp_min = GSL_NAN; + exp_imax = i; exp_imin = i; + + { + BASE max = FUNCTION(gsl_vector, max) (v) ; + gsl_test_abs (max, exp_max, 0, "_max returns correct maximum value for NaN"); + } + + { + BASE min = FUNCTION(gsl_vector, min) (v) ; + gsl_test_abs (min, exp_min, 0, "_min returns correct minimum value for NaN"); + } + + { + BASE min, max; + FUNCTION(gsl_vector, minmax) (v, &min, &max); + + gsl_test_abs (max, exp_max, 0, "_minmax returns correct maximum value for NaN"); + gsl_test_abs (min, exp_min, 0, "_minmax returns correct minimum value for NaN"); + } + + + { + size_t imax = FUNCTION(gsl_vector, max_index) (v) ; + TEST (imax != exp_imax, "_max_index returns correct maximum i for NaN"); + } + + { + size_t imin = FUNCTION(gsl_vector, min_index) (v) ; + TEST (imin != exp_imin, "_min_index returns correct minimum i for NaN"); + } + + { + size_t imin, imax; + + FUNCTION(gsl_vector, minmax_index) (v, &imin, &imax); + + TEST (imax != exp_imax, "_minmax_index returns correct maximum i for NaN"); + TEST (imin != exp_imin, "_minmax_index returns correct minimum i for NaN"); + } +#endif + + } + + + FUNCTION (gsl_vector, free) (v0); /* free whatever is in v */ +} + +void +FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N) +{ + size_t i; + TYPE (gsl_vector) * a = FUNCTION (create, vector) (stride1, N); + TYPE (gsl_vector) * b = FUNCTION (create, vector) (stride2, N); + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride1, N); + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (a, i, (BASE)(3 + i)); + FUNCTION (gsl_vector, set) (b, i, (BASE)(3 + 2 * i)); + } + + { + int status = (FUNCTION(gsl_vector,equal) (a,b) != 0); + TEST2 (status, "_equal vectors unequal"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + + { + int status = (FUNCTION(gsl_vector,equal) (a,v) != 1); + TEST2 (status, "_equal vectors equal"); + } + + FUNCTION(gsl_vector, add) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x + y; + if (r != z) + status = 1; + } + TEST2 (status, "_add vector addition"); + } + + { + int status = 0; + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + status |= (FUNCTION (gsl_vector, get) (a, i) != (BASE)(3 + 2 * i)); + status |= (FUNCTION (gsl_vector, get) (b, i) != (BASE)(3 + i)); + } + + FUNCTION(gsl_vector, swap) (a, b); + + for (i = 0; i < N; i++) + { + status |= (FUNCTION (gsl_vector, get) (a, i) != (BASE)(3 + i)); + status |= (FUNCTION (gsl_vector, get) (b, i) != (BASE)(3 + 2 * i)); + } + + TEST2 (status, "_swap exchange vectors"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, sub) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x - y; + if (r != z) + status = 1; + } + + TEST2 (status, "_sub vector subtraction"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, mul) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x * y; + if (r != z) + status = 1; + } + + TEST2 (status, "_mul multiplication"); + } + + FUNCTION(gsl_vector, memcpy) (v, a); + FUNCTION(gsl_vector, div) (v, b); + + { + int status = 0; + + for (i = 0; i < N; i++) + { + BASE r = FUNCTION(gsl_vector,get) (v,i); + BASE x = FUNCTION(gsl_vector,get) (a,i); + BASE y = FUNCTION(gsl_vector,get) (b,i); + BASE z = x / y; + if (fabs(r - z) > 2 * GSL_FLT_EPSILON * fabs(z)) + status = 1; + } + TEST2 (status, "_div division"); + } + + FUNCTION(gsl_vector, free) (a); + FUNCTION(gsl_vector, free) (b); + FUNCTION(gsl_vector, free) (v); +} + + +void +FUNCTION (test, file) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); + + size_t i; + + { + FILE *f = fopen ("test.dat", "wb"); + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (N - i)); + }; + + FUNCTION (gsl_vector, fwrite) (f, v); + + fclose (f); + } + + { + FILE *f = fopen ("test.dat", "rb"); + + FUNCTION (gsl_vector, fread) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[i*stride] != (ATOMIC) (N - i)) + status = 1; + }; + + TEST (status, "_write and read"); + + fclose (f); + } + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ + FUNCTION (gsl_vector, free) (w); /* free whatever is in w */ +} + +#if USES_LONGDOUBLE && ! HAVE_PRINTF_LONGDOUBLE +/* skip this test */ +#else +void +FUNCTION (test, text) (size_t stride, size_t N) +{ + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); + + size_t i; + + { + FILE *f = fopen ("test.txt", "w"); + + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); + }; + + FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); + + fclose (f); + } + + { + FILE *f = fopen ("test.txt", "r"); + + FUNCTION (gsl_vector, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[i*stride] != (ATOMIC) i) + status = 1; + }; + + gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); + + fclose (f); + } + + FUNCTION (gsl_vector, free) (v); + FUNCTION (gsl_vector, free) (w); +} +#endif + +void +FUNCTION (test, trap) (size_t stride, size_t N) +{ + double x; + size_t j = 0; + TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); + v->size = N; + v->stride = stride; + + status = 0; + FUNCTION (gsl_vector, set) (v, j - 1, (ATOMIC)0); + TEST (!status, "_set traps index below lower bound"); + + status = 0; + FUNCTION (gsl_vector, set) (v, N + 1, (ATOMIC)0); + TEST (!status, "_set traps index above upper bound"); + + status = 0; + FUNCTION (gsl_vector, set) (v, N, (ATOMIC)0); + TEST (!status, "_set traps index at upper bound"); + + status = 0; + x = FUNCTION (gsl_vector, get) (v, j - 1); + TEST (!status, "_get traps index below lower bound"); + TEST (x != 0, "_get returns zero for index below lower bound"); + + status = 0; + x = FUNCTION (gsl_vector, get) (v, N + 1); + TEST (!status, "_get traps index above upper bound"); + TEST (x != 0, "_get returns zero for index above upper bound"); + + status = 0; + x = FUNCTION (gsl_vector, get) (v, N); + TEST (!status, "_get traps index at upper bound"); + TEST (x != 0, "_get returns zero for index at upper bound"); + + FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ +} + + + + + diff --git a/software/gsl-1.15/vector/test_static.c b/software/gsl-1.15/vector/test_static.c new file mode 100644 index 000000000..bd11f0028 --- /dev/null +++ b/software/gsl-1.15/vector/test_static.c @@ -0,0 +1,6 @@ +#undef HAVE_INLINE +#ifndef NO_INLINE +#define NO_INLINE +#endif +#define DESC " (static)" +#include "test.c" diff --git a/software/gsl-1.15/vector/vector.c b/software/gsl-1.15/vector/vector.c new file mode 100644 index 000000000..347c6eaa6 --- /dev/null +++ b/software/gsl-1.15/vector/vector.c @@ -0,0 +1,31 @@ +/* vector/vector.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* Compile all the inline functions */ + +#define COMPILE_INLINE_STATIC +#include "build.h" +#include + +/* turn on range checking at runtime (disabled if zero) */ +int gsl_check_range = 1; + diff --git a/software/gsl-1.15/vector/view.c b/software/gsl-1.15/vector/view.c new file mode 100644 index 000000000..da7b5e97e --- /dev/null +++ b/software/gsl-1.15/vector/view.c @@ -0,0 +1,176 @@ +#include +#include +#include + +#include "view.h" + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_CHAR + +#define USE_QUALIFIER +#define QUALIFIER const + +#define BASE_GSL_COMPLEX_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_LONG + +#define BASE_GSL_COMPLEX +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX + +#define BASE_GSL_COMPLEX_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_GSL_COMPLEX_FLOAT + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "view_source.c" +#include "templates_off.h" +#undef BASE_CHAR diff --git a/software/gsl-1.15/vector/view.h b/software/gsl-1.15/vector/view.h new file mode 100644 index 000000000..37e324a5c --- /dev/null +++ b/software/gsl-1.15/vector/view.h @@ -0,0 +1,2 @@ +#define NULL_VECTOR {0, 0, 0, 0, 0} +#define NULL_VECTOR_VIEW {{0, 0, 0, 0, 0}} diff --git a/software/gsl-1.15/vector/view_source.c b/software/gsl-1.15/vector/view_source.c new file mode 100644 index 000000000..862f42d62 --- /dev/null +++ b/software/gsl-1.15/vector/view_source.c @@ -0,0 +1,76 @@ +/* vector/view_source.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2007 Gerard Jungman, Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION(gsl_vector, view_array) (QUALIFIER ATOMIC * base, size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = (ATOMIC *)base ; + v.size = n; + v.stride = 1; + v.block = 0; + v.owner = 0; + + view.vector = v; + return view; + } +} + +QUALIFIED_VIEW(_gsl_vector,view) +FUNCTION(gsl_vector, view_array_with_stride) (QUALIFIER ATOMIC * base, + size_t stride, + size_t n) +{ + QUALIFIED_VIEW(_gsl_vector,view) view = NULL_VECTOR_VIEW; + + if (n == 0) + { + GSL_ERROR_VAL ("vector length n must be positive integer", + GSL_EINVAL, view); + } + + if (stride == 0) + { + GSL_ERROR_VAL ("stride must be positive integer", + GSL_EINVAL, view); + } + + { + TYPE(gsl_vector) v = NULL_VECTOR; + + v.data = (ATOMIC *)base ; + v.size = n; + v.stride = stride; + v.block = 0; + v.owner = 0; + + view.vector = v; + return view; + } +} diff --git a/software/gsl-1.15/version.c b/software/gsl-1.15/version.c new file mode 100644 index 000000000..c791116d2 --- /dev/null +++ b/software/gsl-1.15/version.c @@ -0,0 +1,30 @@ +/* version.c + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +/* This file needs to use the top-level due to the + possibility of a VPATH-style build where the original source + tree is on read-only filesystem and so will not be picked up + by the symlinking comands in gsl/Makefile.am */ + + +const char * gsl_version = GSL_VERSION; + diff --git a/software/gsl-1.15/wavelet/.deps/bspline.Plo b/software/gsl-1.15/wavelet/.deps/bspline.Plo new file mode 100644 index 000000000..f0e522219 --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/bspline.Plo @@ -0,0 +1,130 @@ +bspline.lo: bspline.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_wavelet.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_wavelet.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/wavelet/.deps/daubechies.Plo b/software/gsl-1.15/wavelet/.deps/daubechies.Plo new file mode 100644 index 000000000..bfa9508a8 --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/daubechies.Plo @@ -0,0 +1,93 @@ +daubechies.lo: daubechies.c ../config.h ../gsl/gsl_errno.h \ + /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_wavelet.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_wavelet.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/wavelet/.deps/dwt.Plo b/software/gsl-1.15/wavelet/.deps/dwt.Plo new file mode 100644 index 000000000..28a741f26 --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/dwt.Plo @@ -0,0 +1,107 @@ +dwt.lo: dwt.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_wavelet.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_wavelet2d.h ../gsl/gsl_vector_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_check_range.h ../gsl/gsl_block_double.h \ + ../gsl/gsl_matrix_double.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_wavelet.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_wavelet2d.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_matrix_double.h: diff --git a/software/gsl-1.15/wavelet/.deps/haar.Plo b/software/gsl-1.15/wavelet/.deps/haar.Plo new file mode 100644 index 000000000..9fa4f8f12 --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/haar.Plo @@ -0,0 +1,130 @@ +haar.lo: haar.c ../config.h ../gsl/gsl_errno.h /usr/include/stdio.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_math.h \ + /usr/include/math.h ../gsl/gsl_sys.h ../gsl/gsl_inline.h \ + ../gsl/gsl_machine.h /usr/bin/../lib/clang/4.1/include/limits.h \ + /usr/include/limits.h /usr/include/machine/limits.h \ + /usr/include/i386/limits.h /usr/include/i386/_limits.h \ + /usr/include/sys/syslimits.h /usr/bin/../lib/clang/4.1/include/float.h \ + ../gsl/gsl_precision.h ../gsl/gsl_nan.h ../gsl/gsl_pow_int.h \ + ../gsl/gsl_minmax.h ../gsl/gsl_wavelet.h /usr/include/stdlib.h \ + /usr/include/sys/wait.h /usr/include/sys/signal.h \ + /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h \ + /usr/include/i386/signal.h /usr/include/i386/_structs.h \ + /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ + /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ + /usr/include/machine/endian.h /usr/include/i386/endian.h \ + /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h + +../config.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_math.h: + +/usr/include/math.h: + +../gsl/gsl_sys.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_machine.h: + +/usr/bin/../lib/clang/4.1/include/limits.h: + +/usr/include/limits.h: + +/usr/include/machine/limits.h: + +/usr/include/i386/limits.h: + +/usr/include/i386/_limits.h: + +/usr/include/sys/syslimits.h: + +/usr/bin/../lib/clang/4.1/include/float.h: + +../gsl/gsl_precision.h: + +../gsl/gsl_nan.h: + +../gsl/gsl_pow_int.h: + +../gsl/gsl_minmax.h: + +../gsl/gsl_wavelet.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: diff --git a/software/gsl-1.15/wavelet/.deps/test.Po b/software/gsl-1.15/wavelet/.deps/test.Po new file mode 100644 index 000000000..f5bade65e --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/test.Po @@ -0,0 +1,229 @@ +test.o: test.c ../config.h /usr/include/stdio.h /usr/include/sys/cdefs.h \ + /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ + /usr/include/AvailabilityInternal.h /usr/include/_types.h \ + /usr/include/sys/_types.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/math.h ../gsl/gsl_errno.h \ + /usr/include/errno.h /usr/include/sys/errno.h ../gsl/gsl_types.h \ + ../gsl/gsl_vector.h ../gsl/gsl_vector_complex_long_double.h \ + /usr/include/stdlib.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_complex.h ../gsl/gsl_check_range.h \ + ../gsl/gsl_vector_long_double.h ../gsl/gsl_inline.h \ + ../gsl/gsl_block_long_double.h ../gsl/gsl_vector_complex.h \ + ../gsl/gsl_block_complex_long_double.h \ + ../gsl/gsl_vector_complex_double.h ../gsl/gsl_vector_double.h \ + ../gsl/gsl_block_double.h ../gsl/gsl_block_complex_double.h \ + ../gsl/gsl_vector_complex_float.h ../gsl/gsl_vector_float.h \ + ../gsl/gsl_block_float.h ../gsl/gsl_block_complex_float.h \ + ../gsl/gsl_vector_ulong.h ../gsl/gsl_block_ulong.h \ + ../gsl/gsl_vector_long.h ../gsl/gsl_block_long.h \ + ../gsl/gsl_vector_uint.h ../gsl/gsl_block_uint.h \ + ../gsl/gsl_vector_int.h ../gsl/gsl_block_int.h \ + ../gsl/gsl_vector_ushort.h ../gsl/gsl_block_ushort.h \ + ../gsl/gsl_vector_short.h ../gsl/gsl_block_short.h \ + ../gsl/gsl_vector_uchar.h ../gsl/gsl_block_uchar.h \ + ../gsl/gsl_vector_char.h ../gsl/gsl_block_char.h ../gsl/gsl_blas.h \ + ../gsl/gsl_matrix.h ../gsl/gsl_matrix_complex_long_double.h \ + ../gsl/gsl_matrix_complex_double.h ../gsl/gsl_matrix_complex_float.h \ + ../gsl/gsl_matrix_long_double.h ../gsl/gsl_matrix_double.h \ + ../gsl/gsl_matrix_float.h ../gsl/gsl_matrix_ulong.h \ + ../gsl/gsl_matrix_long.h ../gsl/gsl_matrix_uint.h \ + ../gsl/gsl_matrix_int.h ../gsl/gsl_matrix_ushort.h \ + ../gsl/gsl_matrix_short.h ../gsl/gsl_matrix_uchar.h \ + ../gsl/gsl_matrix_char.h ../gsl/gsl_blas_types.h ../gsl/gsl_cblas.h \ + /usr/bin/../lib/clang/4.1/include/stddef.h ../gsl/gsl_test.h \ + ../gsl/gsl_wavelet.h ../gsl/gsl_wavelet2d.h + +../config.h: + +/usr/include/stdio.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/math.h: + +../gsl/gsl_errno.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_vector.h: + +../gsl/gsl_vector_complex_long_double.h: + +/usr/include/stdlib.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_complex.h: + +../gsl/gsl_check_range.h: + +../gsl/gsl_vector_long_double.h: + +../gsl/gsl_inline.h: + +../gsl/gsl_block_long_double.h: + +../gsl/gsl_vector_complex.h: + +../gsl/gsl_block_complex_long_double.h: + +../gsl/gsl_vector_complex_double.h: + +../gsl/gsl_vector_double.h: + +../gsl/gsl_block_double.h: + +../gsl/gsl_block_complex_double.h: + +../gsl/gsl_vector_complex_float.h: + +../gsl/gsl_vector_float.h: + +../gsl/gsl_block_float.h: + +../gsl/gsl_block_complex_float.h: + +../gsl/gsl_vector_ulong.h: + +../gsl/gsl_block_ulong.h: + +../gsl/gsl_vector_long.h: + +../gsl/gsl_block_long.h: + +../gsl/gsl_vector_uint.h: + +../gsl/gsl_block_uint.h: + +../gsl/gsl_vector_int.h: + +../gsl/gsl_block_int.h: + +../gsl/gsl_vector_ushort.h: + +../gsl/gsl_block_ushort.h: + +../gsl/gsl_vector_short.h: + +../gsl/gsl_block_short.h: + +../gsl/gsl_vector_uchar.h: + +../gsl/gsl_block_uchar.h: + +../gsl/gsl_vector_char.h: + +../gsl/gsl_block_char.h: + +../gsl/gsl_blas.h: + +../gsl/gsl_matrix.h: + +../gsl/gsl_matrix_complex_long_double.h: + +../gsl/gsl_matrix_complex_double.h: + +../gsl/gsl_matrix_complex_float.h: + +../gsl/gsl_matrix_long_double.h: + +../gsl/gsl_matrix_double.h: + +../gsl/gsl_matrix_float.h: + +../gsl/gsl_matrix_ulong.h: + +../gsl/gsl_matrix_long.h: + +../gsl/gsl_matrix_uint.h: + +../gsl/gsl_matrix_int.h: + +../gsl/gsl_matrix_ushort.h: + +../gsl/gsl_matrix_short.h: + +../gsl/gsl_matrix_uchar.h: + +../gsl/gsl_matrix_char.h: + +../gsl/gsl_blas_types.h: + +../gsl/gsl_cblas.h: + +/usr/bin/../lib/clang/4.1/include/stddef.h: + +../gsl/gsl_test.h: + +../gsl/gsl_wavelet.h: + +../gsl/gsl_wavelet2d.h: diff --git a/software/gsl-1.15/wavelet/.deps/wavelet.Plo b/software/gsl-1.15/wavelet/.deps/wavelet.Plo new file mode 100644 index 000000000..0c4c054a0 --- /dev/null +++ b/software/gsl-1.15/wavelet/.deps/wavelet.Plo @@ -0,0 +1,92 @@ +wavelet.lo: wavelet.c ../config.h /usr/include/stdlib.h \ + /usr/include/Availability.h /usr/include/AvailabilityInternal.h \ + /usr/include/_types.h /usr/include/sys/_types.h \ + /usr/include/sys/cdefs.h /usr/include/sys/_symbol_aliasing.h \ + /usr/include/sys/_posix_availability.h /usr/include/machine/_types.h \ + /usr/include/i386/_types.h /usr/include/sys/wait.h \ + /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ + /usr/include/machine/signal.h /usr/include/i386/signal.h \ + /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ + /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ + /usr/include/sys/resource.h /usr/include/machine/endian.h \ + /usr/include/i386/endian.h /usr/include/sys/_endian.h \ + /usr/include/libkern/_OSByteOrder.h \ + /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ + /usr/include/machine/types.h /usr/include/i386/types.h \ + ../gsl/gsl_errno.h /usr/include/stdio.h /usr/include/secure/_stdio.h \ + /usr/include/secure/_common.h /usr/include/errno.h \ + /usr/include/sys/errno.h ../gsl/gsl_types.h ../gsl/gsl_wavelet.h + +../config.h: + +/usr/include/stdlib.h: + +/usr/include/Availability.h: + +/usr/include/AvailabilityInternal.h: + +/usr/include/_types.h: + +/usr/include/sys/_types.h: + +/usr/include/sys/cdefs.h: + +/usr/include/sys/_symbol_aliasing.h: + +/usr/include/sys/_posix_availability.h: + +/usr/include/machine/_types.h: + +/usr/include/i386/_types.h: + +/usr/include/sys/wait.h: + +/usr/include/sys/signal.h: + +/usr/include/sys/appleapiopts.h: + +/usr/include/machine/signal.h: + +/usr/include/i386/signal.h: + +/usr/include/i386/_structs.h: + +/usr/include/sys/_structs.h: + +/usr/include/machine/_structs.h: + +/usr/include/mach/i386/_structs.h: + +/usr/include/sys/resource.h: + +/usr/include/machine/endian.h: + +/usr/include/i386/endian.h: + +/usr/include/sys/_endian.h: + +/usr/include/libkern/_OSByteOrder.h: + +/usr/include/libkern/i386/_OSByteOrder.h: + +/usr/include/alloca.h: + +/usr/include/machine/types.h: + +/usr/include/i386/types.h: + +../gsl/gsl_errno.h: + +/usr/include/stdio.h: + +/usr/include/secure/_stdio.h: + +/usr/include/secure/_common.h: + +/usr/include/errno.h: + +/usr/include/sys/errno.h: + +../gsl/gsl_types.h: + +../gsl/gsl_wavelet.h: diff --git a/software/gsl-1.15/wavelet/ChangeLog b/software/gsl-1.15/wavelet/ChangeLog new file mode 100644 index 000000000..dfadaa97f --- /dev/null +++ b/software/gsl-1.15/wavelet/ChangeLog @@ -0,0 +1,32 @@ +2009-07-09 Brian Gough + + * wavelet.c (gsl_wavelet_free): handle NULL argument in free + (gsl_wavelet_workspace_free): handle NULL argument in free + +2008-10-13 Brian Gough + + * test.c (test_2d): change typename variable to name to avoid + conflict with C++ typename keyword + +2008-07-03 Brian Gough + + * Makefile.am (INCLUDES): use top_srcdir instead of top_builddir + +2008-01-03 Brian Gough + + * dwt.c (dwt_step): move pointer dereference out of loop + +2006-03-16 Brian Gough + + * changed to gsl_wavelet_forward and gsl_wavelet_backward enums + throughout internally instead of forward and backward. + +2004-12-29 Brian Gough + + * gsl_wavelet.h: added missing includes, use GSL_VAR instead of + extern + +2004-07-23 Brian Gough + + * added wavelet directory from Ivo Alxneit. + diff --git a/software/gsl-1.15/wavelet/Makefile.am b/software/gsl-1.15/wavelet/Makefile.am new file mode 100644 index 000000000..1c15f2d51 --- /dev/null +++ b/software/gsl-1.15/wavelet/Makefile.am @@ -0,0 +1,17 @@ +noinst_LTLIBRARIES = libgslwavelet.la + +pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h + +INCLUDES = -I$(top_srcdir) + +libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c + +check_PROGRAMS = test + +TESTS = $(check_PROGRAMS) + +test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la + +test_SOURCES = test.c + + diff --git a/software/gsl-1.15/wavelet/Makefile.in b/software/gsl-1.15/wavelet/Makefile.in new file mode 100644 index 000000000..78a11ba33 --- /dev/null +++ b/software/gsl-1.15/wavelet/Makefile.in @@ -0,0 +1,668 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = wavelet +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslwavelet_la_LIBADD = +am_libgslwavelet_la_OBJECTS = dwt.lo wavelet.lo bspline.lo \ + daubechies.lo haar.lo +libgslwavelet_la_OBJECTS = $(am_libgslwavelet_la_OBJECTS) +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslwavelet.la ../blas/libgslblas.la \ + ../cblas/libgslcblas.la ../matrix/libgslmatrix.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ + ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgslwavelet_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslwavelet_la_SOURCES) $(test_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslwavelet.la +pkginclude_HEADERS = gsl_wavelet.h gsl_wavelet2d.h +INCLUDES = -I$(top_srcdir) +libgslwavelet_la_SOURCES = dwt.c wavelet.c bspline.c daubechies.c haar.c +TESTS = $(check_PROGRAMS) +test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la +test_SOURCES = test.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wavelet/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu wavelet/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgslwavelet.la: $(libgslwavelet_la_OBJECTS) $(libgslwavelet_la_DEPENDENCIES) + $(LINK) $(libgslwavelet_la_OBJECTS) $(libgslwavelet_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bspline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daubechies.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/haar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavelet.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/software/gsl-1.15/wavelet/TODO b/software/gsl-1.15/wavelet/TODO new file mode 100644 index 000000000..52ced7145 --- /dev/null +++ b/software/gsl-1.15/wavelet/TODO @@ -0,0 +1,14 @@ +# -*- org -*- +#+CATEGORY: wavelet + +* Implement more wavelet types: + Check the literature to find out what are commonly used types. Candidates + could be coiflets and symmlets. +** Coefficients for coiflets and symmlets found so far are only with a + precision of about eight digts. This is probaly insufficient. + +* Wavelet packet transform: + Should include utility functions for selecting the coefficients according + to "dwt-type", "best basis" or "best level". + +* Continuous wavelet transform. diff --git a/software/gsl-1.15/wavelet/bspline.c b/software/gsl-1.15/wavelet/bspline.c new file mode 100644 index 000000000..eef166e72 --- /dev/null +++ b/software/gsl-1.15/wavelet/bspline.c @@ -0,0 +1,591 @@ +/* wavelet/bspline.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Coefficients are from A. Cohen, I. Daubechies, and J.-C. Feauveau; + * "Biorthogonal Bases of Compactly Supported Wavelets", Communications + * on Pure and Applied Mathematics, 45 (1992) 485--560 (table 6.1). + * + * Note the following errors in table 1: + * + * N = 2, N~ = 4, m0~ + * the second term in z^-1 (45/64 z^-1) should be left out. + * + * N = 3, N~ = 7, m0~ + * the term 336z^-3 should read 363z^-3. + */ + +#include +#include +#include +#include + +static const double h1_103[6] = { -0.0883883476483184405501055452631, + 0.0883883476483184405501055452631, + M_SQRT1_2, + M_SQRT1_2, + 0.0883883476483184405501055452631, + -0.0883883476483184405501055452631 +}; + +static const double g2_103[6] = { -0.0883883476483184405501055452631, + -0.0883883476483184405501055452631, + M_SQRT1_2, + -(M_SQRT1_2), + 0.0883883476483184405501055452631, + 0.0883883476483184405501055452631 +}; + +static const double h1_105[10] = { 0.0165728151840597076031447897368, + -0.0165728151840597076031447897368, + -0.1215339780164378557563951247368, + 0.1215339780164378557563951247368, + M_SQRT1_2, + M_SQRT1_2, + 0.1215339780164378557563951247368, + -0.1215339780164378557563951247368, + -0.0165728151840597076031447897368, + 0.0165728151840597076031447897368 +}; + +static const double g2_105[10] = { 0.0165728151840597076031447897368, + 0.0165728151840597076031447897368, + -0.1215339780164378557563951247368, + -0.1215339780164378557563951247368, + M_SQRT1_2, + -(M_SQRT1_2), + 0.1215339780164378557563951247368, + 0.1215339780164378557563951247368, + -0.0165728151840597076031447897368, + -0.0165728151840597076031447897368 +}; + +static const double g1_1[10] = { 0.0, 0.0, 0.0, 0.0, + M_SQRT1_2, + -(M_SQRT1_2), + 0.0, 0.0, 0.0, 0.0 +}; + +static const double h2_1[10] = { 0.0, 0.0, 0.0, 0.0, + M_SQRT1_2, + M_SQRT1_2, + 0.0, 0.0, 0.0, 0.0 +}; + +static const double h1_202[6] = { -0.1767766952966368811002110905262, + 0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + 0.3535533905932737622004221810524, + -0.1767766952966368811002110905262, + 0.0 +}; + +static const double g2_202[6] = { 0.0, + -0.1767766952966368811002110905262, + -0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + -0.3535533905932737622004221810524, + -0.1767766952966368811002110905262 +}; + +static const double h1_204[10] = { 0.0331456303681194152062895794737, + -0.0662912607362388304125791589473, + -0.1767766952966368811002110905262, + 0.4198446513295125926130013399998, + 0.9943689110435824561886873842099, + 0.4198446513295125926130013399998, + -0.1767766952966368811002110905262, + -0.0662912607362388304125791589473, + 0.0331456303681194152062895794737, + 0.0 +}; + +static const double g2_204[10] = { 0.0, + 0.0331456303681194152062895794737, + 0.0662912607362388304125791589473, + -0.1767766952966368811002110905262, + -0.4198446513295125926130013399998, + 0.9943689110435824561886873842099, + -0.4198446513295125926130013399998, + -0.1767766952966368811002110905262, + 0.0662912607362388304125791589473, + 0.0331456303681194152062895794737 +}; + +static const double h1_206[14] = { -0.0069053396600248781679769957237, + 0.0138106793200497563359539914474, + 0.0469563096881691715422435709210, + -0.1077232986963880994204411332894, + -0.1698713556366120029322340948025, + 0.4474660099696121052849093228945, + 0.9667475524034829435167794013152, + 0.4474660099696121052849093228945, + -0.1698713556366120029322340948025, + -0.1077232986963880994204411332894, + 0.0469563096881691715422435709210, + 0.0138106793200497563359539914474, + -0.0069053396600248781679769957237, + 0.0 +}; + +static const double g2_206[14] = { 0.0, + -0.0069053396600248781679769957237, + -0.0138106793200497563359539914474, + 0.0469563096881691715422435709210, + 0.1077232986963880994204411332894, + -0.1698713556366120029322340948025, + -0.4474660099696121052849093228945, + 0.9667475524034829435167794013152, + -0.4474660099696121052849093228945, + -0.1698713556366120029322340948025, + 0.1077232986963880994204411332894, + 0.0469563096881691715422435709210, + -0.0138106793200497563359539914474, + -0.0069053396600248781679769957237, +}; + +static const double h1_208[18] = { 0.0015105430506304420992449678146, + -0.0030210861012608841984899356291, + -0.0129475118625466465649568669819, + 0.0289161098263541773284036695929, + 0.0529984818906909399392234421792, + -0.1349130736077360572068505539514, + -0.1638291834340902345352542235443, + 0.4625714404759165262773590010400, + 0.9516421218971785225243297231697, + 0.4625714404759165262773590010400, + -0.1638291834340902345352542235443, + -0.1349130736077360572068505539514, + 0.0529984818906909399392234421792, + 0.0289161098263541773284036695929, + -0.0129475118625466465649568669819, + -0.0030210861012608841984899356291, + 0.0015105430506304420992449678146, + 0.0 +}; + +static const double g2_208[18] = { 0.0, + 0.0015105430506304420992449678146, + 0.0030210861012608841984899356291, + -0.0129475118625466465649568669819, + -0.0289161098263541773284036695929, + 0.0529984818906909399392234421792, + 0.1349130736077360572068505539514, + -0.1638291834340902345352542235443, + -0.4625714404759165262773590010400, + 0.9516421218971785225243297231697, + -0.4625714404759165262773590010400, + -0.1638291834340902345352542235443, + 0.1349130736077360572068505539514, + 0.0529984818906909399392234421792, + -0.0289161098263541773284036695929, + -0.0129475118625466465649568669819, + 0.0030210861012608841984899356291, + 0.0015105430506304420992449678146, +}; + +static const double h2_2[18] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.3535533905932737622004221810524, + 0.7071067811865475244008443621048, + 0.3535533905932737622004221810524, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 +}; + +static const double g1_2[18] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + -0.3535533905932737622004221810524, + 0.7071067811865475244008443621048, + -0.3535533905932737622004221810524, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 +}; + +static const double h1_301[4] = { -0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + 1.0606601717798212866012665431573, + -0.3535533905932737622004221810524 +}; + +static const double g2_301[4] = { 0.3535533905932737622004221810524, + 1.0606601717798212866012665431573, + -1.0606601717798212866012665431573, + -0.3535533905932737622004221810524 +}; + +static const double h1_303[8] = { 0.0662912607362388304125791589473, + -0.1988737822087164912377374768420, + -0.1546796083845572709626847042104, + 0.9943689110435824561886873842099, + 0.9943689110435824561886873842099, + -0.1546796083845572709626847042104, + -0.1988737822087164912377374768420, + 0.0662912607362388304125791589473 +}; + +static const double g2_303[8] = { -0.0662912607362388304125791589473, + -0.1988737822087164912377374768420, + 0.1546796083845572709626847042104, + 0.9943689110435824561886873842099, + -0.9943689110435824561886873842099, + -0.1546796083845572709626847042104, + 0.1988737822087164912377374768420, + 0.0662912607362388304125791589473 +}; + +static const double h1_305[12] = { -0.0138106793200497563359539914474, + 0.0414320379601492690078619743421, + 0.0524805814161890740766251675000, + -0.2679271788089652729175074340788, + -0.0718155324642587329469607555263, + 0.9667475524034829435167794013152, + 0.9667475524034829435167794013152, + -0.0718155324642587329469607555263, + -0.2679271788089652729175074340788, + 0.0524805814161890740766251675000, + 0.0414320379601492690078619743421, + -0.0138106793200497563359539914474 +}; + +static const double g2_305[12] = { 0.0138106793200497563359539914474, + 0.0414320379601492690078619743421, + -0.0524805814161890740766251675000, + -0.2679271788089652729175074340788, + 0.0718155324642587329469607555263, + 0.9667475524034829435167794013152, + -0.9667475524034829435167794013152, + -0.0718155324642587329469607555263, + 0.2679271788089652729175074340788, + 0.0524805814161890740766251675000, + -0.0414320379601492690078619743421, + -0.0138106793200497563359539914474 +}; + +static const double h1_307[16] = { 0.0030210861012608841984899356291, + -0.0090632583037826525954698068873, + -0.0168317654213106405344439270765, + 0.0746639850740189951912512662623, + 0.0313329787073628846871956180962, + -0.3011591259228349991008967259990, + -0.0264992409453454699696117210896, + 0.9516421218971785225243297231697, + 0.9516421218971785225243297231697, + -0.0264992409453454699696117210896, + -0.3011591259228349991008967259990, + 0.0313329787073628846871956180962, + 0.0746639850740189951912512662623, + -0.0168317654213106405344439270765, + -0.0090632583037826525954698068873, + 0.0030210861012608841984899356291 +}; + +static const double g2_307[16] = { -0.0030210861012608841984899356291, + -0.0090632583037826525954698068873, + 0.0168317654213106405344439270765, + 0.0746639850740189951912512662623, + -0.0313329787073628846871956180962, + -0.3011591259228349991008967259990, + 0.0264992409453454699696117210896, + 0.9516421218971785225243297231697, + -0.9516421218971785225243297231697, + -0.0264992409453454699696117210896, + 0.3011591259228349991008967259990, + 0.0313329787073628846871956180962, + -0.0746639850740189951912512662623, + -0.0168317654213106405344439270765, + 0.0090632583037826525954698068873, + 0.0030210861012608841984899356291 +}; + +static const double h1_309[20] = { -0.0006797443727836989446602355165, + 0.0020392331183510968339807065496, + 0.0050603192196119810324706421788, + -0.0206189126411055346546938106687, + -0.0141127879301758447558029850103, + 0.0991347824942321571990197448581, + 0.0123001362694193142367090236328, + -0.3201919683607785695513833204624, + 0.0020500227115698857061181706055, + 0.9421257006782067372990864259380, + 0.9421257006782067372990864259380, + 0.0020500227115698857061181706055, + -0.3201919683607785695513833204624, + 0.0123001362694193142367090236328, + 0.0991347824942321571990197448581, + -0.0141127879301758447558029850103, + -0.0206189126411055346546938106687, + 0.0050603192196119810324706421788, + 0.0020392331183510968339807065496, + -0.0006797443727836989446602355165 +}; + +static const double g2_309[20] = { 0.0006797443727836989446602355165, + 0.0020392331183510968339807065496, + -0.0050603192196119810324706421788, + -0.0206189126411055346546938106687, + 0.0141127879301758447558029850103, + 0.0991347824942321571990197448581, + -0.0123001362694193142367090236328, + -0.3201919683607785695513833204624, + -0.0020500227115698857061181706055, + 0.9421257006782067372990864259380, + -0.9421257006782067372990864259380, + 0.0020500227115698857061181706055, + 0.3201919683607785695513833204624, + 0.0123001362694193142367090236328, + -0.0991347824942321571990197448581, + -0.0141127879301758447558029850103, + 0.0206189126411055346546938106687, + 0.0050603192196119810324706421788, + -0.0020392331183510968339807065496, + -0.0006797443727836989446602355165 +}; + +static const double h2_3[20] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.1767766952966368811002110905262, + 0.5303300858899106433006332715786, + 0.5303300858899106433006332715786, + 0.1767766952966368811002110905262, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 +}; + +static const double g1_3[20] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + -0.1767766952966368811002110905262, + 0.5303300858899106433006332715786, + -0.5303300858899106433006332715786, + 0.1767766952966368811002110905262, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 +}; + +static int +bspline_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) +{ + switch (member) + { + case 103: + *nc = 6; + *h1 = h1_103; + *g1 = &g1_1[2]; + *h2 = &h2_1[2]; + *g2 = g2_103; + break; + + case 105: + *nc = 10; + *h1 = h1_105; + *g1 = g1_1; + *h2 = h2_1; + *g2 = g2_105; + break; + + case 202: + *nc = 6; + *h1 = h1_202; + *g1 = &g1_2[6]; + *h2 = &h2_2[6]; + *g2 = g2_202; + break; + + case 204: + *nc = 10; + *h1 = h1_204; + *g1 = &g1_2[4]; + *h2 = &h2_2[4]; + *g2 = g2_204; + break; + + case 206: + *nc = 14; + *h1 = h1_206; + *g1 = &g1_2[2]; + *h2 = &h2_2[2]; + *g2 = g2_206; + break; + + case 208: + *nc = 18; + *h1 = h1_208; + *g1 = g1_2; + *h2 = h2_2; + *g2 = g2_208; + break; + + case 301: + *nc = 4; + *h1 = h1_301; + *g1 = &g1_3[8]; + *h2 = &h2_3[8]; + *g2 = g2_301; + break; + + case 303: + *nc = 8; + *h1 = h1_303; + *g1 = &g1_3[6]; + *h2 = &h2_3[6]; + *g2 = g2_303; + break; + + case 305: + *nc = 12; + *h1 = h1_305; + *g1 = &g1_3[4]; + *h2 = &h2_3[4]; + *g2 = g2_305; + break; + + case 307: + *nc = 16; + *h1 = h1_307; + *g1 = &g1_3[2]; + *h2 = &h2_3[2]; + *g2 = g2_307; + break; + + case 309: + *nc = 20; + *h1 = h1_309; + *g1 = g1_3; + *h2 = h2_3; + *g2 = g2_309; + break; + + default: + return GSL_FAILURE; + } + + *offset = 0; + + return GSL_SUCCESS; +} + +static int +bspline_centered_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) +{ + switch (member) + { + case 103: + *nc = 6; + *h1 = h1_103; + *g1 = &g1_1[2]; + *h2 = &h2_1[2]; + *g2 = g2_103; + break; + + case 105: + *nc = 10; + *h1 = h1_105; + *g1 = g1_1; + *h2 = h2_1; + *g2 = g2_105; + break; + + case 202: + *nc = 6; + *h1 = h1_202; + *g1 = &g1_2[6]; + *h2 = &h2_2[6]; + *g2 = g2_202; + break; + + case 204: + *nc = 10; + *h1 = h1_204; + *g1 = &g1_2[4]; + *h2 = &h2_2[4]; + *g2 = g2_204; + break; + + case 206: + *nc = 14; + *h1 = h1_206; + *g1 = &g1_2[2]; + *h2 = &h2_2[2]; + *g2 = g2_206; + break; + + case 208: + *nc = 18; + *h1 = h1_208; + *g1 = g1_2; + *h2 = h2_2; + *g2 = g2_208; + break; + + case 301: + *nc = 4; + *h1 = h1_301; + *g1 = &g1_3[8]; + *h2 = &h2_3[8]; + *g2 = g2_301; + break; + + case 303: + *nc = 8; + *h1 = h1_303; + *g1 = &g1_3[6]; + *h2 = &h2_3[6]; + *g2 = g2_303; + break; + + case 305: + *nc = 12; + *h1 = h1_305; + *g1 = &g1_3[4]; + *h2 = &h2_3[4]; + *g2 = g2_305; + break; + + case 307: + *nc = 16; + *h1 = h1_307; + *g1 = &g1_3[2]; + *h2 = &h2_3[2]; + *g2 = g2_307; + break; + + case 309: + *nc = 20; + *h1 = h1_309; + *g1 = g1_3; + *h2 = h2_3; + *g2 = g2_309; + break; + + default: + return GSL_FAILURE; + } + + *offset = ((*nc) >> 1); + + return GSL_SUCCESS; +} + +static const gsl_wavelet_type bspline_type = { + "bspline", + &bspline_init +}; + +static const gsl_wavelet_type bspline_centered_type = { + "bspline-centered", + &bspline_centered_init +}; + +const gsl_wavelet_type *gsl_wavelet_bspline = &bspline_type; +const gsl_wavelet_type *gsl_wavelet_bspline_centered = &bspline_centered_type; diff --git a/software/gsl-1.15/wavelet/daubechies.c b/software/gsl-1.15/wavelet/daubechies.c new file mode 100644 index 000000000..8b1b8107a --- /dev/null +++ b/software/gsl-1.15/wavelet/daubechies.c @@ -0,0 +1,458 @@ +/* wavelet/daubechies.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * Coefficients for Daubechies wavelets of extremal phase are from + * I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets", + * Communications on Pure and Applied Mathematics, 41 (1988) 909--996 + * (table 1). + * Additional digits have been obtained using the Mathematica package + * Daubechies.m by Tong Chen & Meng Xu available at + * http://www.cwp.mines.edu/wavelets/. + */ + +#include +#include +#include + +static const double h_4[4] = { 0.48296291314453414337487159986, + 0.83651630373780790557529378092, + 0.22414386804201338102597276224, + -0.12940952255126038117444941881 +}; + +static const double g_4[4] = { -0.12940952255126038117444941881, + -0.22414386804201338102597276224, + 0.83651630373780790557529378092, + -0.48296291314453414337487159986 +}; + +static const double h_6[6] = { 0.33267055295008261599851158914, + 0.80689150931109257649449360409, + 0.45987750211849157009515194215, + -0.13501102001025458869638990670, + -0.08544127388202666169281916918, + 0.03522629188570953660274066472 +}; + +static const double g_6[6] = { 0.03522629188570953660274066472, + 0.08544127388202666169281916918, + -0.13501102001025458869638990670, + -0.45987750211849157009515194215, + 0.80689150931109257649449360409, + -0.33267055295008261599851158914 +}; + +static const double h_8[8] = { 0.23037781330889650086329118304, + 0.71484657055291564708992195527, + 0.63088076792985890788171633830, + -0.02798376941685985421141374718, + -0.18703481171909308407957067279, + 0.03084138183556076362721936253, + 0.03288301166688519973540751355, + -0.01059740178506903210488320852 +}; + +static const double g_8[8] = { -0.01059740178506903210488320852, + -0.03288301166688519973540751355, + 0.03084138183556076362721936253, + 0.18703481171909308407957067279, + -0.02798376941685985421141374718, + -0.63088076792985890788171633830, + 0.71484657055291564708992195527, + -0.23037781330889650086329118304 +}; + +static const double h_10[10] = { 0.16010239797419291448072374802, + 0.60382926979718967054011930653, + 0.72430852843777292772807124410, + 0.13842814590132073150539714634, + -0.24229488706638203186257137947, + -0.03224486958463837464847975506, + 0.07757149384004571352313048939, + -0.00624149021279827427419051911, + -0.01258075199908199946850973993, + 0.00333572528547377127799818342 +}; + +static const double g_10[10] = { 0.00333572528547377127799818342, + 0.01258075199908199946850973993, + -0.00624149021279827427419051911, + -0.07757149384004571352313048939, + -0.03224486958463837464847975506, + 0.24229488706638203186257137947, + 0.13842814590132073150539714634, + -0.72430852843777292772807124410, + 0.60382926979718967054011930653, + -0.16010239797419291448072374802 +}; + +static const double h_12[12] = { 0.11154074335010946362132391724, + 0.49462389039845308567720417688, + 0.75113390802109535067893449844, + 0.31525035170919762908598965481, + -0.22626469396543982007631450066, + -0.12976686756726193556228960588, + 0.09750160558732304910234355254, + 0.02752286553030572862554083950, + -0.03158203931748602956507908070, + 0.00055384220116149613925191840, + 0.00477725751094551063963597525, + -0.00107730108530847956485262161 +}; + +static const double g_12[12] = { -0.00107730108530847956485262161, + -0.00477725751094551063963597525, + 0.00055384220116149613925191840, + 0.03158203931748602956507908070, + 0.02752286553030572862554083950, + -0.09750160558732304910234355254, + -0.12976686756726193556228960588, + 0.22626469396543982007631450066, + 0.31525035170919762908598965481, + -0.75113390802109535067893449844, + 0.49462389039845308567720417688, + -0.11154074335010946362132391724 +}; + +static const double h_14[14] = { 0.07785205408500917901996352196, + 0.39653931948191730653900039094, + 0.72913209084623511991694307034, + 0.46978228740519312247159116097, + -0.14390600392856497540506836221, + -0.22403618499387498263814042023, + 0.07130921926683026475087657050, + 0.08061260915108307191292248036, + -0.03802993693501441357959206160, + -0.01657454163066688065410767489, + 0.01255099855609984061298988603, + 0.00042957797292136652113212912, + -0.00180164070404749091526826291, + 0.00035371379997452024844629584 +}; + +static const double g_14[14] = { 0.00035371379997452024844629584, + 0.00180164070404749091526826291, + 0.00042957797292136652113212912, + -0.01255099855609984061298988603, + -0.01657454163066688065410767489, + 0.03802993693501441357959206160, + 0.08061260915108307191292248036, + -0.07130921926683026475087657050, + -0.22403618499387498263814042023, + 0.14390600392856497540506836221, + 0.46978228740519312247159116097, + -0.72913209084623511991694307034, + 0.39653931948191730653900039094, + -0.07785205408500917901996352196 +}; + +static const double h_16[16] = { 0.05441584224310400995500940520, + 0.31287159091429997065916237551, + 0.67563073629728980680780076705, + 0.58535468365420671277126552005, + -0.01582910525634930566738054788, + -0.28401554296154692651620313237, + 0.00047248457391328277036059001, + 0.12874742662047845885702928751, + -0.01736930100180754616961614887, + -0.04408825393079475150676372324, + 0.01398102791739828164872293057, + 0.00874609404740577671638274325, + -0.00487035299345157431042218156, + -0.00039174037337694704629808036, + 0.00067544940645056936636954757, + -0.00011747678412476953373062823 +}; + +static const double g_16[16] = { -0.00011747678412476953373062823, + -0.00067544940645056936636954757, + -0.00039174037337694704629808036, + 0.00487035299345157431042218156, + 0.00874609404740577671638274325, + -0.01398102791739828164872293057, + -0.04408825393079475150676372324, + 0.01736930100180754616961614887, + 0.12874742662047845885702928751, + -0.00047248457391328277036059001, + -0.28401554296154692651620313237, + 0.01582910525634930566738054788, + 0.58535468365420671277126552005, + -0.67563073629728980680780076705, + 0.31287159091429997065916237551, + -0.05441584224310400995500940520 +}; + +static const double h_18[18] = { 0.03807794736387834658869765888, + 0.24383467461259035373204158165, + 0.60482312369011111190307686743, + 0.65728807805130053807821263905, + 0.13319738582500757619095494590, + -0.29327378327917490880640319524, + -0.09684078322297646051350813354, + 0.14854074933810638013507271751, + 0.03072568147933337921231740072, + -0.06763282906132997367564227483, + 0.00025094711483145195758718975, + 0.02236166212367909720537378270, + -0.00472320475775139727792570785, + -0.00428150368246342983449679500, + 0.00184764688305622647661912949, + 0.00023038576352319596720521639, + -0.00025196318894271013697498868, + 0.00003934732031627159948068988 +}; + +static const double g_18[18] = { 0.00003934732031627159948068988, + 0.00025196318894271013697498868, + 0.00023038576352319596720521639, + -0.00184764688305622647661912949, + -0.00428150368246342983449679500, + 0.00472320475775139727792570785, + 0.02236166212367909720537378270, + -0.00025094711483145195758718975, + -0.06763282906132997367564227483, + -0.03072568147933337921231740072, + 0.14854074933810638013507271751, + 0.09684078322297646051350813354, + -0.29327378327917490880640319524, + -0.13319738582500757619095494590, + 0.65728807805130053807821263905, + -0.60482312369011111190307686743, + 0.24383467461259035373204158165, + -0.03807794736387834658869765888 +}; + +static const double h_20[20] = { 0.02667005790055555358661744877, + 0.18817680007769148902089297368, + 0.52720118893172558648174482796, + 0.68845903945360356574187178255, + 0.28117234366057746074872699845, + -0.24984642432731537941610189792, + -0.19594627437737704350429925432, + 0.12736934033579326008267723320, + 0.09305736460357235116035228984, + -0.07139414716639708714533609308, + -0.02945753682187581285828323760, + 0.03321267405934100173976365318, + 0.00360655356695616965542329142, + -0.01073317548333057504431811411, + 0.00139535174705290116578931845, + 0.00199240529518505611715874224, + -0.00068585669495971162656137098, + -0.00011646685512928545095148097, + 0.00009358867032006959133405013, + -0.00001326420289452124481243668 +}; + +static const double g_20[20] = { -0.00001326420289452124481243668, + -0.00009358867032006959133405013, + -0.00011646685512928545095148097, + 0.00068585669495971162656137098, + 0.00199240529518505611715874224, + -0.00139535174705290116578931845, + -0.01073317548333057504431811411, + -0.00360655356695616965542329142, + 0.03321267405934100173976365318, + 0.02945753682187581285828323760, + -0.07139414716639708714533609308, + -0.09305736460357235116035228984, + 0.12736934033579326008267723320, + 0.19594627437737704350429925432, + -0.24984642432731537941610189792, + -0.28117234366057746074872699845, + 0.68845903945360356574187178255, + -0.52720118893172558648174482796, + 0.18817680007769148902089297368, + -0.02667005790055555358661744877 +}; + +static int +daubechies_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + size_t member) +{ + switch (member) + { + case 4: + *h1 = h_4; + *g1 = g_4; + *h2 = h_4; + *g2 = g_4; + break; + + case 6: + *h1 = h_6; + *g1 = g_6; + *h2 = h_6; + *g2 = g_6; + break; + + case 8: + *h1 = h_8; + *g1 = g_8; + *h2 = h_8; + *g2 = g_8; + break; + + case 10: + *h1 = h_10; + *g1 = g_10; + *h2 = h_10; + *g2 = g_10; + break; + + case 12: + *h1 = h_12; + *g1 = g_12; + *h2 = h_12; + *g2 = g_12; + break; + + case 14: + *h1 = h_14; + *g1 = g_14; + *h2 = h_14; + *g2 = g_14; + break; + + case 16: + *h1 = h_16; + *g1 = g_16; + *h2 = h_16; + *g2 = g_16; + break; + + case 18: + *h1 = h_18; + *g1 = g_18; + *h2 = h_18; + *g2 = g_18; + break; + + case 20: + *h1 = h_20; + *g1 = g_20; + *h2 = h_20; + *g2 = g_20; + break; + + default: + return GSL_FAILURE; + } + + *nc = member; + *offset = 0; + + return GSL_SUCCESS; +} + +static int +daubechies_centered_init (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member) +{ + switch (member) + { + case 4: + *h1 = h_4; + *g1 = g_4; + *h2 = h_4; + *g2 = g_4; + break; + + case 6: + *h1 = h_6; + *g1 = g_6; + *h2 = h_6; + *g2 = g_6; + break; + + case 8: + *h1 = h_8; + *g1 = g_8; + *h2 = h_8; + *g2 = g_8; + break; + + case 10: + *h1 = h_10; + *g1 = g_10; + *h2 = h_10; + *g2 = g_10; + break; + + case 12: + *h1 = h_12; + *g1 = g_12; + *h2 = h_12; + *g2 = g_12; + break; + + case 14: + *h1 = h_14; + *g1 = g_14; + *h2 = h_14; + *g2 = g_14; + break; + + case 16: + *h1 = h_16; + *g1 = g_16; + *h2 = h_16; + *g2 = g_16; + break; + + case 18: + *h1 = h_18; + *g1 = g_18; + *h2 = h_18; + *g2 = g_18; + break; + + case 20: + *h1 = h_20; + *g1 = g_20; + *h2 = h_20; + *g2 = g_20; + break; + + default: + return GSL_FAILURE; + } + + *nc = member; + *offset = (member >> 1); + + return GSL_SUCCESS; +} + +static const gsl_wavelet_type daubechies_type = { + "daubechies", + &daubechies_init +}; + +static const gsl_wavelet_type daubechies_centered_type = { + "daubechies-centered", + &daubechies_centered_init +}; + +const gsl_wavelet_type *gsl_wavelet_daubechies = &daubechies_type; +const gsl_wavelet_type *gsl_wavelet_daubechies_centered = + &daubechies_centered_type; diff --git a/software/gsl-1.15/wavelet/dwt.c b/software/gsl-1.15/wavelet/dwt.c new file mode 100644 index 000000000..b6ef88c9d --- /dev/null +++ b/software/gsl-1.15/wavelet/dwt.c @@ -0,0 +1,396 @@ +/* wavelet/dwt.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* function dwt_step is based on the public domain function pwt.c + * available from http://www.numerical-recipes.com + */ + +#include +#include +#include +#include + +#define ELEMENT(a,stride,i) ((a)[(stride)*(i)]) + +static int binary_logn (const size_t n); +static void dwt_step (const gsl_wavelet * w, double *a, size_t stride, size_t n, gsl_wavelet_direction dir, gsl_wavelet_workspace * work); + +static int +binary_logn (const size_t n) +{ + size_t ntest; + size_t logn = 0; + size_t k = 1; + + while (k < n) + { + k *= 2; + logn++; + } + + ntest = (1 << logn); + + if (n != ntest) + { + return -1; /* n is not a power of 2 */ + } + + return logn; +} + +static void +dwt_step (const gsl_wavelet * w, double *a, size_t stride, size_t n, + gsl_wavelet_direction dir, gsl_wavelet_workspace * work) +{ + double ai, ai1; + size_t i, ii; + size_t jf; + size_t k; + size_t n1, ni, nh, nmod; + + for (i = 0; i < work->n; i++) + { + work->scratch[i] = 0.0; + } + + nmod = w->nc * n; + nmod -= w->offset; /* center support */ + + n1 = n - 1; + nh = n >> 1; + + if (dir == gsl_wavelet_forward) + { + for (ii = 0, i = 0; i < n; i += 2, ii++) + { + double h = 0, g = 0; + + ni = i + nmod; + + for (k = 0; k < w->nc; k++) + { + jf = n1 & (ni + k); + h += w->h1[k] * ELEMENT (a, stride, jf); + g += w->g1[k] * ELEMENT (a, stride, jf); + } + + work->scratch[ii] += h; + work->scratch[ii + nh] += g; + } + } + else + { + for (ii = 0, i = 0; i < n; i += 2, ii++) + { + ai = ELEMENT (a, stride, ii); + ai1 = ELEMENT (a, stride, ii + nh); + ni = i + nmod; + for (k = 0; k < w->nc; k++) + { + jf = (n1 & (ni + k)); + work->scratch[jf] += (w->h2[k] * ai + w->g2[k] * ai1); + } + } + } + + for (i = 0; i < n; i++) + { + ELEMENT (a, stride, i) = work->scratch[i]; + } +} + +int +gsl_wavelet_transform (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) +{ + size_t i; + + if (work->n < n) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (n) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (n < 2) + { + return GSL_SUCCESS; + } + + if (dir == gsl_wavelet_forward) + { + for (i = n; i >= 2; i >>= 1) + { + dwt_step (w, data, stride, i, dir, work); + } + } + else + { + for (i = 2; i <= n; i <<= 1) + { + dwt_step (w, data, stride, i, dir, work); + } + } + + return GSL_SUCCESS; +} + +int +gsl_wavelet_transform_forward (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet_transform (w, data, stride, n, gsl_wavelet_forward, work); +} + +int +gsl_wavelet_transform_inverse (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet_transform (w, data, stride, n, gsl_wavelet_backward, work); +} + + +/* Leaving this out for now BJG */ +#if 0 +int +gsl_dwt_vector (const gsl_wavelet * w, gsl_vector *v, gsl_wavelet_direction + dir, gsl_wavelet_workspace * work) +{ + return gsl_dwt (w, v->data, v->stride, v->size, dir, work); +} +#endif + +int +gsl_wavelet2d_transform (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) +{ + size_t i; + + if (size1 != size2) + { + GSL_ERROR ("2d dwt works only with square matrix", GSL_EINVAL); + } + + if (work->n < size1) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (size1) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (size1 < 2) + { + return GSL_SUCCESS; + } + + if (dir == gsl_wavelet_forward) + { + for (i = 0; i < size1; i++) /* for every row j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, tda, i), 1, size1, dir, work); + } + for (i = 0; i < size2; i++) /* for every column j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, 1, i), tda, size2, dir, work); + } + } + else + { + for (i = 0; i < size2; i++) /* for every column j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, 1, i), tda, size2, dir, work); + } + for (i = 0; i < size1; i++) /* for every row j */ + { + gsl_wavelet_transform (w, &ELEMENT(data, tda, i), 1, size1, dir, work); + } + } + + return GSL_SUCCESS; +} + +int +gsl_wavelet2d_nstransform (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) +{ + size_t i, j; + + if (size1 != size2) + { + GSL_ERROR ("2d dwt works only with square matrix", GSL_EINVAL); + } + + if (work->n < size1) + { + GSL_ERROR ("not enough workspace provided", GSL_EINVAL); + } + + if (binary_logn (size1) == -1) + { + GSL_ERROR ("n is not a power of 2", GSL_EINVAL); + } + + if (size1 < 2) + { + return GSL_SUCCESS; + } + + if (dir == gsl_wavelet_forward) + { + for (i = size1; i >= 2; i >>= 1) + { + for (j = 0; j < i; j++) /* for every row j */ + { + dwt_step (w, &ELEMENT(data, tda, j), 1, i, dir, work); + } + for (j = 0; j < i; j++) /* for every column j */ + { + dwt_step (w, &ELEMENT(data, 1, j), tda, i, dir, work); + } + } + } + else + { + for (i = 2; i <= size1; i <<= 1) + { + for (j = 0; j < i; j++) /* for every column j */ + { + dwt_step (w, &ELEMENT(data, 1, j), tda, i, dir, work); + } + for (j = 0; j < i; j++) /* for every row j */ + { + dwt_step (w, &ELEMENT(data, tda, j), 1, i, dir, work); + } + } + } + + return GSL_SUCCESS; +} + + +int +gsl_wavelet2d_transform_forward (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_transform (w, data, tda, size1, size2, gsl_wavelet_forward, work); +} + +int +gsl_wavelet2d_transform_inverse (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_transform (w, data, tda, size1, size2, gsl_wavelet_backward, work); +} + +int +gsl_wavelet2d_nstransform_forward (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_nstransform (w, data, tda, size1, size2, gsl_wavelet_forward, work); +} + +int +gsl_wavelet2d_nstransform_inverse (const gsl_wavelet * w, + double *data, size_t tda, size_t size1, + size_t size2, gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_nstransform (w, data, tda, size1, size2, gsl_wavelet_backward, work); +} + + +int +gsl_wavelet2d_transform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + dir, work); +} + +int +gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + gsl_wavelet_forward, work); +} + +int +gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_transform (w, a->data, + a->tda, a->size1, a->size2, + gsl_wavelet_backward, work); +} + +int +gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + dir, work); +} + +int +gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + gsl_wavelet_forward, work); +} + +int +gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work) +{ + return gsl_wavelet2d_nstransform (w, a->data, + a->tda, a->size1, a->size2, + gsl_wavelet_backward, work); +} + + diff --git a/software/gsl-1.15/wavelet/gsl_wavelet.h b/software/gsl-1.15/wavelet/gsl_wavelet.h new file mode 100644 index 000000000..5261c4874 --- /dev/null +++ b/software/gsl-1.15/wavelet/gsl_wavelet.h @@ -0,0 +1,108 @@ +/* wavelet/gsl_wavelet.h + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_WAVELET_H__ +#define __GSL_WAVELET_H__ +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +#ifndef GSL_DISABLE_DEPRECATED +typedef enum { + forward = 1, backward = -1, + gsl_wavelet_forward = 1, gsl_wavelet_backward = -1 +} +gsl_wavelet_direction; +#else +typedef enum { + gsl_wavelet_forward = 1, gsl_wavelet_backward = -1 +} +gsl_wavelet_direction; +#endif + +typedef struct +{ + const char *name; + int (*init) (const double **h1, const double **g1, + const double **h2, const double **g2, size_t * nc, + size_t * offset, size_t member); +} +gsl_wavelet_type; + +typedef struct +{ + const gsl_wavelet_type *type; + const double *h1; + const double *g1; + const double *h2; + const double *g2; + size_t nc; + size_t offset; +} +gsl_wavelet; + +typedef struct +{ + double *scratch; + size_t n; +} +gsl_wavelet_workspace; + +GSL_VAR const gsl_wavelet_type *gsl_wavelet_daubechies; +GSL_VAR const gsl_wavelet_type *gsl_wavelet_daubechies_centered; +GSL_VAR const gsl_wavelet_type *gsl_wavelet_haar; +GSL_VAR const gsl_wavelet_type *gsl_wavelet_haar_centered; +GSL_VAR const gsl_wavelet_type *gsl_wavelet_bspline; +GSL_VAR const gsl_wavelet_type *gsl_wavelet_bspline_centered; + +gsl_wavelet *gsl_wavelet_alloc (const gsl_wavelet_type * T, size_t k); +void gsl_wavelet_free (gsl_wavelet * w); +const char *gsl_wavelet_name (const gsl_wavelet * w); + +gsl_wavelet_workspace *gsl_wavelet_workspace_alloc (size_t n); +void gsl_wavelet_workspace_free (gsl_wavelet_workspace * work); + +int gsl_wavelet_transform (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + +int gsl_wavelet_transform_forward (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work); + +int gsl_wavelet_transform_inverse (const gsl_wavelet * w, + double *data, size_t stride, size_t n, + gsl_wavelet_workspace * work); + +__END_DECLS + +#endif /* __GSL_WAVELET_H__ */ diff --git a/software/gsl-1.15/wavelet/gsl_wavelet2d.h b/software/gsl-1.15/wavelet/gsl_wavelet2d.h new file mode 100644 index 000000000..173f43e2c --- /dev/null +++ b/software/gsl-1.15/wavelet/gsl_wavelet2d.h @@ -0,0 +1,107 @@ +/* wavelet/gsl_wavelet.h + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GSL_WAVELET2D_H__ +#define __GSL_WAVELET2D_H__ +#include +#include +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +int gsl_wavelet2d_transform (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + +int gsl_wavelet2d_transform_forward (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + +int gsl_wavelet2d_transform_inverse (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + +int gsl_wavelet2d_nstransform (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + +int gsl_wavelet2d_nstransform_forward (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + +int gsl_wavelet2d_nstransform_inverse (const gsl_wavelet * w, + double *data, + size_t tda, size_t size1, size_t size2, + gsl_wavelet_workspace * work); + +int +gsl_wavelet2d_transform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + +int +gsl_wavelet2d_transform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + +int +gsl_wavelet2d_transform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + + +int +gsl_wavelet2d_nstransform_matrix (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_direction dir, + gsl_wavelet_workspace * work); + +int +gsl_wavelet2d_nstransform_matrix_forward (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + +int +gsl_wavelet2d_nstransform_matrix_inverse (const gsl_wavelet * w, + gsl_matrix * a, + gsl_wavelet_workspace * work); + +__END_DECLS + +#endif /* __GSL_WAVELET2D_H__ */ diff --git a/software/gsl-1.15/wavelet/haar.c b/software/gsl-1.15/wavelet/haar.c new file mode 100644 index 000000000..5d2e32464 --- /dev/null +++ b/software/gsl-1.15/wavelet/haar.c @@ -0,0 +1,81 @@ +/* wavelet/haar.c + * + * Copyright (C) 2004 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +static const double ch_2[2] = { M_SQRT1_2, M_SQRT1_2 }; +static const double cg_2[2] = { M_SQRT1_2, -(M_SQRT1_2) }; + +static int +haar_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + const size_t member) +{ + if (member != 2) + { + return GSL_FAILURE; + } + + *h1 = ch_2; + *g1 = cg_2; + *h2 = ch_2; + *g2 = cg_2; + + *nc = 2; + *offset = 0; + + return GSL_SUCCESS; +} + +static int +haar_centered_init (const double **h1, const double **g1, const double **h2, + const double **g2, size_t * nc, size_t * offset, + const size_t member) +{ + if (member != 2) + { + return GSL_FAILURE; + } + + *h1 = ch_2; + *g1 = cg_2; + *h2 = ch_2; + *g2 = cg_2; + + *nc = 2; + *offset = 1; + + return GSL_SUCCESS; +} + +static const gsl_wavelet_type haar_type = { + "haar", + &haar_init +}; + +static const gsl_wavelet_type haar_centered_type = { + "haar-centered", + &haar_centered_init +}; + +const gsl_wavelet_type *gsl_wavelet_haar = &haar_type; +const gsl_wavelet_type *gsl_wavelet_haar_centered = &haar_centered_type; diff --git a/software/gsl-1.15/wavelet/test.c b/software/gsl-1.15/wavelet/test.c new file mode 100644 index 000000000..db8dcd583 --- /dev/null +++ b/software/gsl-1.15/wavelet/test.c @@ -0,0 +1,270 @@ +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define N_BS 11 + +double urand (void); + +double +urand (void) +{ + static unsigned long int x = 1; + x = (1103515245 * x + 12345) & 0x7fffffffUL; + return x / 2147483648.0; +} + +const size_t member[N_BS] = + { 309, 307, 305, 303, 301, 208, 206, 204, 202, 105, 103 }; + +void +test_1d (size_t N, size_t stride, const gsl_wavelet_type * T, size_t member); + +void +test_2d (size_t N, size_t tda, const gsl_wavelet_type * T, size_t member, int type); + +int +main (int argc, char **argv) +{ + size_t i, N, stride, tda; + const int S = 1, NS = 2; /* Standard & Non-standard transforms */ + + /* One-dimensional tests */ + + for (N = 1; N <= 16384; N *= 2) + { + for (stride = 1; stride <= 5; stride++) + { + for (i = 0; i < N_BS; i++) + { + test_1d (N, stride, gsl_wavelet_bspline, member[i]); + test_1d (N, stride, gsl_wavelet_bspline_centered, member[i]); + } + + for (i = 4; i <= 20; i += 2) + { + test_1d (N, stride, gsl_wavelet_daubechies, i); + test_1d (N, stride, gsl_wavelet_daubechies_centered, i); + } + + test_1d (N, stride, gsl_wavelet_haar, 2); + test_1d (N, stride, gsl_wavelet_haar_centered, 2); + } + } + + /* Two-dimensional tests */ + + for (N = 1; N <= 64; N *= 2) + { + for (tda = N; tda <= N + 5; tda++) + { + for (i = 0; i < N_BS; i++) + { + test_2d (N, tda, gsl_wavelet_bspline, member[i], S); + test_2d (N, tda, gsl_wavelet_bspline_centered, member[i], S); + + test_2d (N, tda, gsl_wavelet_bspline, member[i], NS); + test_2d (N, tda, gsl_wavelet_bspline_centered, member[i], NS); + } + + for (i = 4; i <= 20; i += 2) + { + test_2d (N, tda, gsl_wavelet_daubechies, i, S); + test_2d (N, tda, gsl_wavelet_daubechies_centered, i, S); + + test_2d (N, tda, gsl_wavelet_daubechies, i, NS); + test_2d (N, tda, gsl_wavelet_daubechies_centered, i, NS); + } + + test_2d (N, tda, gsl_wavelet_haar, 2, S); + test_2d (N, tda, gsl_wavelet_haar_centered, 2, S); + + test_2d (N, tda, gsl_wavelet_haar, 2, NS); + test_2d (N, tda, gsl_wavelet_haar_centered, 2, NS); + } + } + + exit (gsl_test_summary ()); +} + + +void +test_1d (size_t N, size_t stride, const gsl_wavelet_type * T, size_t member) +{ + gsl_wavelet_workspace *work; + gsl_vector *v1, *v2, *vdelta; + gsl_vector_view v; + gsl_wavelet *w; + + size_t i; + double *data = (double *)malloc (N * stride * sizeof (double)); + + for (i = 0; i < N * stride; i++) + data[i] = 12345.0 + i; + + v = gsl_vector_view_array_with_stride (data, stride, N); + v1 = &(v.vector); + + for (i = 0; i < N; i++) + { + gsl_vector_set (v1, i, urand ()); + } + + v2 = gsl_vector_alloc (N); + gsl_vector_memcpy (v2, v1); + + vdelta = gsl_vector_alloc (N); + + work = gsl_wavelet_workspace_alloc (N); + + w = gsl_wavelet_alloc (T, member); + + gsl_wavelet_transform_forward (w, v2->data, v2->stride, v2->size, work); + gsl_wavelet_transform_inverse (w, v2->data, v2->stride, v2->size, work); + + for (i = 0; i < N; i++) + { + double x1 = gsl_vector_get (v1, i); + double x2 = gsl_vector_get (v2, i); + gsl_vector_set (vdelta, i, fabs (x1 - x2)); + } + + { + double x1, x2; + i = gsl_vector_max_index (vdelta); + x1 = gsl_vector_get (v1, i); + x2 = gsl_vector_get (v2, i); + + gsl_test (fabs (x2 - x1) > N * 1e-15, + "%s(%d), n = %d, stride = %d, maxerr = %g", + gsl_wavelet_name (w), member, N, stride, fabs (x2 - x1)); + } + + if (stride > 1) + { + int status = 0; + + for (i = 0; i < N * stride; i++) + { + if (i % stride == 0) + continue; + + status |= (data[i] != (12345.0 + i)); + } + + gsl_test (status, "%s(%d) other data untouched, n = %d, stride = %d", + gsl_wavelet_name (w), member, N, stride); + } + + gsl_wavelet_workspace_free (work); + gsl_wavelet_free (w); + gsl_vector_free (vdelta); + gsl_vector_free (v2); + free (data); +} + + +void +test_2d (size_t N, size_t tda, const gsl_wavelet_type * T, size_t member, int type) +{ + gsl_wavelet_workspace *work; + gsl_matrix *m2; + gsl_wavelet *w; + gsl_matrix *m1; + gsl_matrix *mdelta; + gsl_matrix_view m; + size_t i; + size_t j; + + double *data = (double *)malloc (N * tda * sizeof (double)); + + const char * name; + + name = (type == 1) ? "standard" : "nonstd" ; + + for (i = 0; i < N * tda; i++) + data[i] = 12345.0 + i; + + m = gsl_matrix_view_array_with_tda (data, N, N, tda); + m1 = &(m.matrix); + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + gsl_matrix_set (m1, i, j, urand()); + } + } + + m2 = gsl_matrix_alloc (N, N); + gsl_matrix_memcpy (m2, m1); + + mdelta = gsl_matrix_alloc (N, N); + + work = gsl_wavelet_workspace_alloc (N); + + w = gsl_wavelet_alloc (T, member); + + switch (type) + { + case 1: + gsl_wavelet2d_transform_matrix_forward (w, m2, work); + gsl_wavelet2d_transform_matrix_inverse (w, m2, work); + break; + case 2: + gsl_wavelet2d_nstransform_matrix_forward (w, m2, work); + gsl_wavelet2d_nstransform_matrix_inverse (w, m2, work); + break; + } + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + double x1 = gsl_matrix_get (m1, i, j); + double x2 = gsl_matrix_get (m2, i, j ); + gsl_matrix_set (mdelta, i, j, fabs (x1 - x2)); + } + } + + { + double x1, x2; + gsl_matrix_max_index (mdelta, &i, &j); + x1 = gsl_matrix_get (m1, i, j); + x2 = gsl_matrix_get (m2, i, j); + + gsl_test (fabs (x2 - x1) > N * 1e-15, + "%s(%d)-2d %s, n = %d, tda = %d, maxerr = %g", + gsl_wavelet_name (w), member, name, N, tda, fabs (x2 - x1)); + } + + if (tda > N) + { + int status = 0; + + for (i = 0; i < N ; i++) + { + for (j = N; j < tda; j++) + { + status |= (data[i*tda+j] != (12345.0 + (i*tda+j))); + } + } + + gsl_test (status, "%s(%d)-2d %s other data untouched, n = %d, tda = %d", + gsl_wavelet_name (w), member, name, N, tda); + } + + free (data); + gsl_wavelet_workspace_free (work); + gsl_wavelet_free (w); + gsl_matrix_free (m2); + gsl_matrix_free (mdelta); +} diff --git a/software/gsl-1.15/wavelet/wavelet.c b/software/gsl-1.15/wavelet/wavelet.c new file mode 100644 index 000000000..8a83ae6a9 --- /dev/null +++ b/software/gsl-1.15/wavelet/wavelet.c @@ -0,0 +1,134 @@ +/* wavelet/wavelet.c + * + * Copyright (C) 2004, 2009 Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +gsl_wavelet * +gsl_wavelet_alloc (const gsl_wavelet_type * T, size_t k) +{ + int status; + + gsl_wavelet *w = (gsl_wavelet *) malloc (sizeof (gsl_wavelet)); + + if (w == NULL) + { + GSL_ERROR_VAL ("failed to allocate space for wavelet struct", + GSL_ENOMEM, 0); + }; + + w->type = T; + + status = (T->init) (&(w->h1), &(w->g1), &(w->h2), &(w->g2), + &(w->nc), &(w->offset), k); + + if (status) + { + free (w); + GSL_ERROR_VAL ("invalid wavelet member", GSL_EINVAL, 0); + } + + return w; +} + +void +gsl_wavelet_free (gsl_wavelet * w) +{ + RETURN_IF_NULL (w); + free (w); +} + +const char * +gsl_wavelet_name (const gsl_wavelet * w) +{ + return w->type->name; +} + + +/* Let's not export this for now (BJG) */ +#if 0 +void +gsl_wavelet_print (const gsl_wavelet * w) +{ + size_t n = w->nc; + size_t i; + + printf ("Wavelet type: %s\n", w->type->name); + + printf + (" h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + 0, w->h1[0], 0, w->g1[0], 0, w->h2[0], 0, w->g2[0]); + + for (i = 1; i < (n < 10 ? n : 10); i++) + { + printf + (" h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + i, w->h1[i], i, w->g1[i], i, w->h2[i], i, w->g2[i]); + } + + for (; i < n; i++) + { + printf + ("h1(%d):%12.8f g1(%d):%12.8f h2(%d):%12.8f g2(%d):%12.8f\n", + i, w->h1[i], i, w->g1[i], i, w->h2[i], i, w->g2[i]); + } +} +#endif + +gsl_wavelet_workspace * +gsl_wavelet_workspace_alloc (size_t n) +{ + gsl_wavelet_workspace *work; + + if (n == 0) + { + GSL_ERROR_VAL ("length n must be positive integer", GSL_EDOM, 0); + } + + work = (gsl_wavelet_workspace *) malloc (sizeof (gsl_wavelet_workspace)); + + if (work == NULL) + { + GSL_ERROR_VAL ("failed to allocate struct", GSL_ENOMEM, 0); + } + + work->n = n; + work->scratch = (double *) malloc (n * sizeof (double)); + + if (work->scratch == NULL) + { + /* error in constructor, prevent memory leak */ + free (work); + GSL_ERROR_VAL ("failed to allocate scratch space", GSL_ENOMEM, 0); + } + + return work; +} + +void +gsl_wavelet_workspace_free (gsl_wavelet_workspace * work) +{ + RETURN_IF_NULL (work); + /* release scratch space */ + free (work->scratch); + work->scratch = NULL; + free (work); +} diff --git a/Makefile b/source/Makefile similarity index 100% rename from Makefile rename to source/Makefile diff --git a/agn.c b/source/agn.c similarity index 100% rename from agn.c rename to source/agn.c diff --git a/anisowind.c b/source/anisowind.c similarity index 100% rename from anisowind.c rename to source/anisowind.c diff --git a/atomic.c b/source/atomic.c similarity index 100% rename from atomic.c rename to source/atomic.c diff --git a/atomic.h b/source/atomic.h similarity index 100% rename from atomic.h rename to source/atomic.h diff --git a/auger_ionization.c b/source/auger_ionization.c similarity index 100% rename from auger_ionization.c rename to source/auger_ionization.c diff --git a/bal_photon2d.c b/source/bal_photon2d.c similarity index 100% rename from bal_photon2d.c rename to source/bal_photon2d.c diff --git a/bal_trans_phot.c b/source/bal_trans_phot.c similarity index 100% rename from bal_trans_phot.c rename to source/bal_trans_phot.c diff --git a/balance.c b/source/balance.c similarity index 100% rename from balance.c rename to source/balance.c diff --git a/balance_abso.c b/source/balance_abso.c similarity index 100% rename from balance_abso.c rename to source/balance_abso.c diff --git a/balance_bb.c b/source/balance_bb.c similarity index 100% rename from balance_bb.c rename to source/balance_bb.c diff --git a/balance_gen.c b/source/balance_gen.c similarity index 100% rename from balance_gen.c rename to source/balance_gen.c diff --git a/balance_sub.c b/source/balance_sub.c similarity index 100% rename from balance_sub.c rename to source/balance_sub.c diff --git a/balance_templates.h b/source/balance_templates.h similarity index 100% rename from balance_templates.h rename to source/balance_templates.h diff --git a/bands.c b/source/bands.c similarity index 100% rename from bands.c rename to source/bands.c diff --git a/bb.c b/source/bb.c similarity index 100% rename from bb.c rename to source/bb.c diff --git a/bilinear.c b/source/bilinear.c similarity index 100% rename from bilinear.c rename to source/bilinear.c diff --git a/compton.c b/source/compton.c similarity index 100% rename from compton.c rename to source/compton.c diff --git a/continuum.c b/source/continuum.c similarity index 100% rename from continuum.c rename to source/continuum.c diff --git a/corona.c b/source/corona.c similarity index 100% rename from corona.c rename to source/corona.c diff --git a/cylind_var.c b/source/cylind_var.c similarity index 100% rename from cylind_var.c rename to source/cylind_var.c diff --git a/cylindrical.c b/source/cylindrical.c similarity index 100% rename from cylindrical.c rename to source/cylindrical.c diff --git a/debug.c b/source/debug.c similarity index 100% rename from debug.c rename to source/debug.c diff --git a/density.c b/source/density.c similarity index 100% rename from density.c rename to source/density.c diff --git a/detail.c b/source/detail.c similarity index 100% rename from detail.c rename to source/detail.c diff --git a/diag.c b/source/diag.c similarity index 100% rename from diag.c rename to source/diag.c diff --git a/dielectronic.c b/source/dielectronic.c similarity index 100% rename from dielectronic.c rename to source/dielectronic.c diff --git a/direct_ion.c b/source/direct_ion.c similarity index 100% rename from direct_ion.c rename to source/direct_ion.c diff --git a/disk.c b/source/disk.c similarity index 100% rename from disk.c rename to source/disk.c diff --git a/do.c b/source/do.c similarity index 100% rename from do.c rename to source/do.c diff --git a/ei.c b/source/ei.c similarity index 100% rename from ei.c rename to source/ei.c diff --git a/elvis.c b/source/elvis.c similarity index 100% rename from elvis.c rename to source/elvis.c diff --git a/emission.c b/source/emission.c similarity index 100% rename from emission.c rename to source/emission.c diff --git a/estimators.c b/source/estimators.c similarity index 100% rename from estimators.c rename to source/estimators.c diff --git a/extract.c b/source/extract.c similarity index 100% rename from extract.c rename to source/extract.c diff --git a/fitsio.h b/source/fitsio.h similarity index 100% rename from fitsio.h rename to source/fitsio.h diff --git a/foo.h b/source/foo.h similarity index 100% rename from foo.h rename to source/foo.h diff --git a/get_atomicdata.c b/source/get_atomicdata.c similarity index 100% rename from get_atomicdata.c rename to source/get_atomicdata.c diff --git a/get_models.c b/source/get_models.c similarity index 100% rename from get_models.c rename to source/get_models.c diff --git a/gradv.c b/source/gradv.c similarity index 100% rename from gradv.c rename to source/gradv.c diff --git a/gridwind.c b/source/gridwind.c similarity index 100% rename from gridwind.c rename to source/gridwind.c diff --git a/homologous.c b/source/homologous.c similarity index 100% rename from homologous.c rename to source/homologous.c diff --git a/ionization.c b/source/ionization.c similarity index 100% rename from ionization.c rename to source/ionization.c diff --git a/ispy.c b/source/ispy.c similarity index 100% rename from ispy.c rename to source/ispy.c diff --git a/knigge.c b/source/knigge.c similarity index 100% rename from knigge.c rename to source/knigge.c diff --git a/levels.c b/source/levels.c similarity index 100% rename from levels.c rename to source/levels.c diff --git a/lineio.c b/source/lineio.c similarity index 100% rename from lineio.c rename to source/lineio.c diff --git a/lines.c b/source/lines.c similarity index 100% rename from lines.c rename to source/lines.c diff --git a/log.c b/source/log.c similarity index 100% rename from log.c rename to source/log.c diff --git a/log.h b/source/log.h similarity index 100% rename from log.h rename to source/log.h diff --git a/longnam.h b/source/longnam.h similarity index 100% rename from longnam.h rename to source/longnam.h diff --git a/matom.c b/source/matom.c similarity index 100% rename from matom.c rename to source/matom.c diff --git a/matom_diag.c b/source/matom_diag.c similarity index 100% rename from matom_diag.c rename to source/matom_diag.c diff --git a/models.h b/source/models.h similarity index 100% rename from models.h rename to source/models.h diff --git a/my_linalg.h b/source/my_linalg.h similarity index 100% rename from my_linalg.h rename to source/my_linalg.h diff --git a/partition.c b/source/partition.c similarity index 100% rename from partition.c rename to source/partition.c diff --git a/pdf.c b/source/pdf.c similarity index 100% rename from pdf.c rename to source/pdf.c diff --git a/phot_util.c b/source/phot_util.c similarity index 100% rename from phot_util.c rename to source/phot_util.c diff --git a/photon2d.c b/source/photon2d.c similarity index 100% rename from photon2d.c rename to source/photon2d.c diff --git a/photon_gen.c b/source/photon_gen.c similarity index 100% rename from photon_gen.c rename to source/photon_gen.c diff --git a/pi_rates.c b/source/pi_rates.c similarity index 100% rename from pi_rates.c rename to source/pi_rates.c diff --git a/plane.c b/source/plane.c similarity index 100% rename from plane.c rename to source/plane.c diff --git a/plot_roche.c b/source/plot_roche.c similarity index 100% rename from plot_roche.c rename to source/plot_roche.c diff --git a/proga.c b/source/proga.c similarity index 100% rename from proga.c rename to source/proga.c diff --git a/py_grid.c b/source/py_grid.c similarity index 100% rename from py_grid.c rename to source/py_grid.c diff --git a/py_ray.c b/source/py_ray.c similarity index 100% rename from py_ray.c rename to source/py_ray.c diff --git a/py_smooth.c b/source/py_smooth.c similarity index 100% rename from py_smooth.c rename to source/py_smooth.c diff --git a/py_wind.c b/source/py_wind.c similarity index 100% rename from py_wind.c rename to source/py_wind.c diff --git a/py_wind_ion.c b/source/py_wind_ion.c similarity index 100% rename from py_wind_ion.c rename to source/py_wind_ion.c diff --git a/py_wind_macro.c b/source/py_wind_macro.c similarity index 100% rename from py_wind_macro.c rename to source/py_wind_macro.c diff --git a/py_wind_sub.c b/source/py_wind_sub.c similarity index 100% rename from py_wind_sub.c rename to source/py_wind_sub.c diff --git a/py_wind_write.c b/source/py_wind_write.c similarity index 100% rename from py_wind_write.c rename to source/py_wind_write.c diff --git a/python.c b/source/python.c similarity index 100% rename from python.c rename to source/python.c diff --git a/python.h b/source/python.h similarity index 100% rename from python.h rename to source/python.h diff --git a/radiation.c b/source/radiation.c similarity index 100% rename from radiation.c rename to source/radiation.c diff --git a/random.c b/source/random.c similarity index 100% rename from random.c rename to source/random.c diff --git a/rdpar.c b/source/rdpar.c similarity index 100% rename from rdpar.c rename to source/rdpar.c diff --git a/recipes.c b/source/recipes.c similarity index 100% rename from recipes.c rename to source/recipes.c diff --git a/recipes.h b/source/recipes.h similarity index 100% rename from recipes.h rename to source/recipes.h diff --git a/recomb.c b/source/recomb.c similarity index 100% rename from recomb.c rename to source/recomb.c diff --git a/reposition.c b/source/reposition.c similarity index 100% rename from reposition.c rename to source/reposition.c diff --git a/resonate.c b/source/resonate.c similarity index 100% rename from resonate.c rename to source/resonate.c diff --git a/roche.c b/source/roche.c similarity index 100% rename from roche.c rename to source/roche.c diff --git a/rtheta.c b/source/rtheta.c similarity index 100% rename from rtheta.c rename to source/rtheta.c diff --git a/saha.c b/source/saha.c similarity index 100% rename from saha.c rename to source/saha.c diff --git a/shell_wind.c b/source/shell_wind.c similarity index 100% rename from shell_wind.c rename to source/shell_wind.c diff --git a/signal.c b/source/signal.c similarity index 100% rename from signal.c rename to source/signal.c diff --git a/spectra.c b/source/spectra.c similarity index 100% rename from spectra.c rename to source/spectra.c diff --git a/spectral_estimators.c b/source/spectral_estimators.c similarity index 100% rename from spectral_estimators.c rename to source/spectral_estimators.c diff --git a/spherical.c b/source/spherical.c similarity index 100% rename from spherical.c rename to source/spherical.c diff --git a/stellar_wind.c b/source/stellar_wind.c similarity index 100% rename from stellar_wind.c rename to source/stellar_wind.c diff --git a/sv.c b/source/sv.c similarity index 100% rename from sv.c rename to source/sv.c diff --git a/t_bilinear.c b/source/t_bilinear.c similarity index 100% rename from t_bilinear.c rename to source/t_bilinear.c diff --git a/templates.h b/source/templates.h similarity index 100% rename from templates.h rename to source/templates.h diff --git a/test_bb.c b/source/test_bb.c similarity index 100% rename from test_bb.c rename to source/test_bb.c diff --git a/test_diectronic.c b/source/test_diectronic.c similarity index 100% rename from test_diectronic.c rename to source/test_diectronic.c diff --git a/test_saha.c b/source/test_saha.c similarity index 100% rename from test_saha.c rename to source/test_saha.c diff --git a/time.c b/source/time.c similarity index 100% rename from time.c rename to source/time.c diff --git a/torus.c b/source/torus.c similarity index 100% rename from torus.c rename to source/torus.c diff --git a/trans_phot.c b/source/trans_phot.c similarity index 100% rename from trans_phot.c rename to source/trans_phot.c diff --git a/util.c b/source/util.c similarity index 100% rename from util.c rename to source/util.c diff --git a/variable_temperature.c b/source/variable_temperature.c similarity index 100% rename from variable_temperature.c rename to source/variable_temperature.c diff --git a/vector.c b/source/vector.c similarity index 100% rename from vector.c rename to source/vector.c diff --git a/version.h b/source/version.h similarity index 100% rename from version.h rename to source/version.h diff --git a/wind.c b/source/wind.c similarity index 100% rename from wind.c rename to source/wind.c diff --git a/wind2d.c b/source/wind2d.c similarity index 100% rename from wind2d.c rename to source/wind2d.c diff --git a/wind_sum.c b/source/wind_sum.c similarity index 100% rename from wind_sum.c rename to source/wind_sum.c diff --git a/wind_updates2d.c b/source/wind_updates2d.c similarity index 100% rename from wind_updates2d.c rename to source/wind_updates2d.c diff --git a/windsave.c b/source/windsave.c similarity index 100% rename from windsave.c rename to source/windsave.c diff --git a/yso.c b/source/yso.c similarity index 100% rename from yso.c rename to source/yso.c diff --git a/zeta.c b/source/zeta.c similarity index 100% rename from zeta.c rename to source/zeta.c From 46f395c478637b500482d73c0debd8f11224ca08 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Fri, 3 Oct 2014 16:25:50 +0100 Subject: [PATCH 02/10] Corrected makefile and moved some scripts --- py_progs/CheckComplete | 9 -- py_progs/error_scripts/py_error.py | 142 ------------------ py_progs/error_scripts/watchdog.py | 224 ----------------------------- source/Makefile | 10 +- 4 files changed, 5 insertions(+), 380 deletions(-) delete mode 100755 py_progs/CheckComplete delete mode 100644 py_progs/error_scripts/py_error.py delete mode 100755 py_progs/error_scripts/watchdog.py diff --git a/py_progs/CheckComplete b/py_progs/CheckComplete deleted file mode 100755 index bf0092b62..000000000 --- a/py_progs/CheckComplete +++ /dev/null @@ -1,9 +0,0 @@ -find . -name *.sig -print > tmpCheck -rm tmpCheck1 -awk '{print "grep COMPLETE "$1" >> tmpCheck1.out"}'>tmpCheck1 -rm tmpCheck1.out -source tmpCheck1 -echo 'Total sig files' -wc tmpCheck -echo 'Total completed' -wc tmpCheck1.out diff --git a/py_progs/error_scripts/py_error.py b/py_progs/error_scripts/py_error.py deleted file mode 100644 index a0b1d32dd..000000000 --- a/py_progs/error_scripts/py_error.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -#specify your python interpreter path above to run as executable - -''' - -University of Southampton, James Matthews, 130722 - -"py_error.py" - -This is the post-processing code to deal with the error logs in -PYTHON's parallel mode. - -usage and arguments: - - python py_error.py [-f folder] root - root is the parameter files - -f folder is the folder the diagfiles are in, defaults to diag_root - -returns: - - Error summary printed to screen. Can pipe to file if required. - -130722 JM Coding began -- initial tests conducted successfully - -''' - - -## import modules -import sys, subprocess - -#help string for user -def help(flag): - ''' help function for user''' - if flag=='help' or flag =='-h': - print '''usage and arguments: - - python py_error.py [-f folder] root - root is the parameter files - -f folder is the folder the diagfiles are in, defaults to diag_root''' - sys.exit(0) - else: print 'Watchdog.py: for help type use -h flag' - -# read root pf file from command line -if len(sys.argv) > 1: - root = sys.argv[-1] -else: - print 'Error: no arguments provided. Exiting.' - exit (0) - -help(root) - - -# set defaults -nprocessors = 1 -diagfolder_name = 'diag_' + root - - -# check for args -for i in range(len(sys.argv)): - if sys.argv[i]=="-f": - diagfolder_name = sys.argv[i+1] - - -# list files in folder, put in array 'files' -command = "ls " + diagfolder_name + "/" + root + "_*.diag &" -output = subprocess.check_output ( command , shell=True ) -files = output.split("\n") -if files[-1] == "": files = files[0:-1] - - -# number of processors and therefore diag files provided as argument -nfiles = len(files) -nprocessors = nfiles - - - -# create some arrays to store the error logs and increment the counters -# note that we also count the number of threads an error occurs in -error_log = [] -error_count = [] -thread_count = [] - - - -#everything now initialised, can collate errors - -for i in range(nfiles): - - filepath = files [i] - - # grep for error summary in the diag file - command = "grep -A 100 'Error summary: End of program' " + filepath +"&" - output = subprocess.check_output ( command , shell=True ) - - # split the grep output up into lines - data = output.split("\n") - - # now cycle through the lines in output - for j in range(len(data)): - No_log = True # variable which is True if this is a new error - - # check we have a non blank entry to avoid indexing error - if len(data[j])>0: - error = data[j].split() - - # this next line is to check we have an actual error summary and not a string line - if error[0].isdigit(): - - # now get the err log string, and its count - error = data[j].split() - - count = int(error[0]) - log_string = data[j][13:] - - # search for a match in the already fpund errors - for k in range(len(error_log)): - if log_string == error_log[k]: - - No_log = False # we've found a match, increment the counts - error_count[k] += count - thread_count[k] += 1 - - # this is a new error, so append to the log and count arrays - if No_log: - error_log.append ( log_string ) - error_count.append ( count ) - thread_count.append (1) - - -n_logs=len(error_log) - -# print the output to screen -print "Error summary: "+root -print "Collated errors for " + str(nprocessors) + " processors" -print "Recurrences -- Description -- number of threads in which error occurred" -for i in range(n_logs): - print "\t%d -- %s -- %d" % (error_count[i], error_log[i], thread_count[i]) - -# all done. - - - diff --git a/py_progs/error_scripts/watchdog.py b/py_progs/error_scripts/watchdog.py deleted file mode 100755 index 8ddd5f2d3..000000000 --- a/py_progs/error_scripts/watchdog.py +++ /dev/null @@ -1,224 +0,0 @@ -#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -#specify your python interpreter path above to run as executable - -''' - -University of Southampton, James Matthews, 130722 - -"watchdog.py" - -This is the during-processing watchdog code to deal with the error logs in -PYTHON's parallel mode. Very similar to py_error.py - -usage and arguments: - - python watchdog.py [-f folder] root - root is the parameter files - -f folder is the folder the diagfiles are in, defaults to diag_root - -returns: - - Error summary of ongoing run printed to screen - -130722 JM Coding began -- initial tests conducted successfully - -''' - - -## import modules -import sys, subprocess - - -#help string for user -def help(flag): - ''' help function for user''' - if flag=='help' or flag =='-h': - print '''usage and arguments: - - python py_error.py [-f folder] root - root is the parameter files - -f folder is the folder the diagfiles are in, defaults to diag_root''' - sys.exit(0) - else: print 'Watchdog.py: for help type use -h flag' - -#strip function for comparing error strings (removes actual numbers from error message) -def strip_error(s): - '''little routine which strips numerical digits from errors''' - result_nodigits = ''.join(i for i in s if not i.isdigit()) - result =' '.join( result_nodigits.split() ) - return result - - - - -# read root pf file from command line -if len(sys.argv) > 1: - root = sys.argv[-1] -else: - print 'Error: no arguments provided. Exiting.' - exit (0) - -#print help if needed -help(root) - - - -# set defaults -nprocessors = 1 -diagfolder_name = 'diag_' + root - - -# check for folder args -for i in range(len(sys.argv)): - if sys.argv[i]=="-f": - diagfolder_name = sys.argv[i+1] - - -# list files in folder, put in array 'files' -command = "ls " + diagfolder_name + "/" + root + "_*.diag &" -output = subprocess.check_output ( command , shell=True ) -files = output.split("\n") -if files[-1] == "": files = files[0:-1] - - -# number of processors and therefore diag files provided as argument -nfiles = len(files) -nprocessors = nfiles - - - -# create some arrays to store the error logs and increment the counters -# note that we also count the number of threads an error occurs in - -#2d arrays with index i,j, which store the jth error in thread i, plus the counting array -error_log_thread = [] -error_count_thread = [] - -#errors that have exceeded error counts for each thread are stored here -error_nolonger=[] -error_nolonger_thread=[] - -errors=[] - - -#everything now initialised, can collate errors - -for i in range(nfiles): - - filepath = files [i] - - #two temporary arrays for storing error logs in this thread - #these get appended to the arrays above, error_log_thread - temp_error_log=[] - temp_error_count=[] - temp_errors=[] - - - # grep for error count errors in the diag file - command = "grep 'Error: error_count:' " + filepath +"&" - output = subprocess.check_output ( command , shell=True ) - - # split the grep output up into lines - data = output.split("\n") - if data[-1] == "": data = data[0:-1] #this is needed because the array has an extra element - - # now cycle through the lines in output and append these message to an array - for j in range(len(data)): - error_nolonger.append(data[j]) - error_nolonger_thread.append(i) - - - - - - - # grep for errors themselves in the diag file - command = "grep 'Error:' " + filepath +"&" - output = subprocess.check_output ( command , shell=True ) - #print output, filepath - - # split the grep output up into lines - data = output.split("\n") - if data[-1] == "": data = data[0:-1] - - # now cycle through the lines in output - for j in range(len(data)): - error_string=strip_error(data[j]) - temp_errors.append(error_string) - No_log=True - - for k in range(len(temp_error_log)): - if error_string==temp_error_log[k]: - No_log = False # we've found a match, increment the counts - temp_error_count[k]+=1 - if No_log: - temp_error_log.append ( error_string ) - temp_error_count.append (1) - - error_log_thread.append(temp_error_log) - error_count_thread.append(temp_error_count) - errors.append(temp_errors) - - -#1d arrays with index i,j, which store the jth error in thread i, plus the counting array -error_log_total = [] -error_count_total = [] -thread_count = [] - - - -#now we cycle over each error log for each thread and count the totals -for i in range(len(error_log_thread)): - #cycle other error_log array for - for j in range(len(error_log_thread[i])): - error_string=error_log_thread[i][j] - error_count=error_count_thread[i][j] - No_log=True - for k in range(len(error_log_total)): - if error_string==error_log_total[k]: - No_log = False # we've found a match, increment the counts - error_count_total[k]+=error_count - thread_count[k] += 1 - if No_log: - error_log_total.append ( error_string ) - error_count_total.append (error_count) - thread_count.append(1) - - - - - - - -n_logs=len(error_log_total) -n_nolonger=len(error_nolonger) - -# print the output to screen - -# first we print the total errors across all scripts -print "WATCHDOG Error summary: "+root -print "Collated errors for " + str(nprocessors) + " processors" -for i in range(n_logs): - print "\t%d -- %s -- %d" % (error_count_total[i], error_log_total[i], thread_count[i]) - - -# now the errors for each thread -print '\n-------------------------------\n' -print 'Errors which will no longer be logged' -print 'Thread -- Error' -for i in range(n_nolonger): - print '%d -- %s %s' % (error_nolonger_thread[i], 'Error count:', error_nolonger[i][57:]) - - -print '\n-------------------------------\n' -for i in range(nprocessors): - print '\n' - print 'Thread %d errors' % i - print 'Recurrences -- Description' - for j in range(len(error_log_thread[i])): - print "\t%d -- %s" % (error_count_thread[i][j], error_log_thread[i][j]) - -# all done. - - - diff --git a/source/Makefile b/source/Makefile index 0fdc641b3..06f89fe6e 100755 --- a/source/Makefile +++ b/source/Makefile @@ -82,9 +82,9 @@ endif -INCLUDE = ../../include -LIB = ../../lib -BIN = ../../bin +INCLUDE = ../include +LIB = ../lib +BIN = ../bin ifeq (D,$(firstword $(MAKECMDGOALS))) # use pg when you want to use gprof the profiler @@ -102,8 +102,8 @@ endif -# next line for debugging when concerned about memory problems -# LDFLAGS= -L$(LIB) -lm -lkpar -lcfitsio -lgsl -lgslcblas ../../duma_2_5_3/libduma.a -lpthread +# next line for debugging when concerned about memory problems and duma installed in python directory +# LDFLAGS= -L$(LIB) -lm -lkpar -lcfitsio -lgsl -lgslcblas ../duma_2_5_3/libduma.a -lpthread # next line if you want to use kpar as a library, rather than as source below # LDFLAGS= -L$(LIB) -lm -lkpar -lcfitsio -lgsl -lgslcblas LDFLAGS= -L$(LIB) -lm -lcfitsio -lgsl -lgslcblas From 4d5d70d38c54904df39b28d3ef92fef9452843b5 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Fri, 3 Oct 2014 16:30:29 +0100 Subject: [PATCH 03/10] Corrected .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1aea6785a..d8199b188 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ branches: install: # first configure - - export PYTHON=$TRAVIS_BUILD_DIR/structure + - export PYTHON=$TRAVIS_BUILD_DIR - export PATH=$PATH:$PYTHON/bin - ./configure From b0104bc56e42f4b5650ab41fa1dde4e1955cdcaf Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Fri, 3 Oct 2014 16:47:41 +0100 Subject: [PATCH 04/10] Corrected Makefile --- Makefile.in | 17 ++-- README.md | 47 +++++----- bin/CheckComplete | 9 ++ bin/py_error.py | 142 +++++++++++++++++++++++++++++ bin/watchdog.py | 224 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 405 insertions(+), 34 deletions(-) create mode 100755 bin/CheckComplete create mode 100755 bin/py_error.py create mode 100755 bin/watchdog.py diff --git a/Makefile.in b/Makefile.in index f3b5bdeaa..be1a54f06 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,6 +25,10 @@ else PRINT_CLONE = 'No git installed- have to obtain release and data manually from releases page on github. Exiting.' endif +MAKE_SOURCE = cd $(PYTHON)/source; make python; make py_wind; + + + ifeq (True, $(LIBS)) INSTALL_CFITSIO = cd $(CFITSIO); ./configure; make; mv libcfitsio.a ../../lib; make clean INSTALL_GSL = cd $(GSL); ./configure --disable-shared --prefix=$(GSL); make; make check 2>&1; make install; make clean; @@ -47,18 +51,11 @@ install: $(INSTALL_GSL) $(MOVE_GSL) - # get atomic data from git - @echo 'Installing Atomic data' - $(CLONE_DATA) - #finally, make the latest release - @echo 'Making latest release...' - @echo $(PRINT_CLONE) - $(CLONE_RELEASE) + @echo 'Making source code...' + $(MAKE_SOURCE) - @echo 'Copying Setup_Py_dir to scripts directory' - cp $(PYTHON)/py_progs/setup_scripts/Setup_Py_Dir $(PYTHON)/bin @echo 'all done' @@ -66,4 +63,4 @@ clean: rm -f *.o *~ cd $(CFITSIO); make clean cd $(GSL); make clean - cd $(PYTHON)/progs/python; make clean + cd $(PYTHON)/source/; make clean diff --git a/README.md b/README.md index 3348d2289..16b700bf5 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,12 @@ It has been developed by Knox Long, Christian Knigge, Stuart Sim, Nick Higginbot The code is not yet ready for use and should not be installed yet. If you are interested in using Python please contact long@stsci.edu. -# Travis Build Status - -Simple build checks are carried out on Travis. The latest status shows up below: +## Travis Build Status [![Build Status](https://travis-ci.org/agnwinds/python.png?branch=dev)](https://travis-ci.org/agnwinds/python) -# Getting the radiative transfer code 'Python' +## Getting the radiative transfer code 'Python' You can download the required structure under the structure branch. e.g. git clone https://github.com/agnwinds/python.git -b structure @@ -25,19 +23,23 @@ Releases of progs can be found under [tags](https://github.com/agnwinds/python/t Consult the [wiki](https://github.com/agnwinds/python/wiki/_pages "Wiki") for how to install Python. -# Installation +## Installation + +Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved and compiled. -Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved (and most likely recompiled). +If you want to obtain a stable (!) release, go to the [Releases](https://github.com/agnwinds/python/releases) page. +If you want to download the latest dev version, you can zip up the git repository by clicking on the zip icon to the right of the GitHub page. Aternatively, you can clone the repository using -**If you have git installed:** To obtain the directory structure, simply retrieve it using git as follows to clone the directory structure: + $ git clone https://github.com/agnwinds/python.git - $ git clone https://github.com/agnwinds/python.git -b structure +If you anticipate contributing to development we suggest Forking the repository and submitting pull requests with any proposed changes. -You then need to cd to the new directory and set your environment variables +Once you have the files, you need to cd to the new directory and set your environment variables $ export PYTHON = /path/to/python/ $ cd $PYTHON + $ ./configure $ make install $ make clean @@ -45,26 +47,23 @@ note that export syntax is for bash- for csh use $ setenv PYTHON /path/to/python/ +Atomic data is stored in our [data repository](https://github.com/agnwinds/data) with it's own releases page. one should unzip these files and place them in the $PYTHON/data folder. -**Without git:** Use the ZIP function under the [structures](https://github.com/agnwinds/python/tree/structure "Structure") branch, and then download .tar.gz versions of the python source under [releases](https://github.com/agnwinds/python/releases). +## Running python -Once you have a directory /path/to/python/ which contains the structure, place the unpacked tar.gz python source folder under /path/to/python/progs/ +To run python you need to add the following to your $PATH variable: - $ export PYTHON = /path/to/python/ - $ cd $PYTHON - $ make GIT=False install - $ make clean - $ cd progs/python_xx #replace xx version you download - $ make clean - $ make CC=gcc python # if you want to use mpicc, ignore the CC=gcc - $ make clean + $PYTHON/bin -Again, for csh use - - $ setenv PYTHON /path/to/python/ +You can then setup your symbolic links by running + + $ Setup_Py_Dir + +and run the code by typing, e.g. + + $ py root.pf -As you can tell, the git install is simpler! -Please see the (wiki)[https://github.com/agnwinds/python/wiki/Installing-and-Running-Python] for how to use the code. +Please see the (wiki)[https://github.com/agnwinds/python/wiki/Installing-and-Running-Python] and docs folder for how to use the code. Any comments, email jm8g08@soton.ac.uk or long@stsci.edu. \ No newline at end of file diff --git a/bin/CheckComplete b/bin/CheckComplete new file mode 100755 index 000000000..bf0092b62 --- /dev/null +++ b/bin/CheckComplete @@ -0,0 +1,9 @@ +find . -name *.sig -print > tmpCheck +rm tmpCheck1 +awk '{print "grep COMPLETE "$1" >> tmpCheck1.out"}'>tmpCheck1 +rm tmpCheck1.out +source tmpCheck1 +echo 'Total sig files' +wc tmpCheck +echo 'Total completed' +wc tmpCheck1.out diff --git a/bin/py_error.py b/bin/py_error.py new file mode 100755 index 000000000..a0b1d32dd --- /dev/null +++ b/bin/py_error.py @@ -0,0 +1,142 @@ +#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python +#specify your python interpreter path above to run as executable + +''' + +University of Southampton, James Matthews, 130722 + +"py_error.py" + +This is the post-processing code to deal with the error logs in +PYTHON's parallel mode. + +usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root + +returns: + + Error summary printed to screen. Can pipe to file if required. + +130722 JM Coding began -- initial tests conducted successfully + +''' + + +## import modules +import sys, subprocess + +#help string for user +def help(flag): + ''' help function for user''' + if flag=='help' or flag =='-h': + print '''usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root''' + sys.exit(0) + else: print 'Watchdog.py: for help type use -h flag' + +# read root pf file from command line +if len(sys.argv) > 1: + root = sys.argv[-1] +else: + print 'Error: no arguments provided. Exiting.' + exit (0) + +help(root) + + +# set defaults +nprocessors = 1 +diagfolder_name = 'diag_' + root + + +# check for args +for i in range(len(sys.argv)): + if sys.argv[i]=="-f": + diagfolder_name = sys.argv[i+1] + + +# list files in folder, put in array 'files' +command = "ls " + diagfolder_name + "/" + root + "_*.diag &" +output = subprocess.check_output ( command , shell=True ) +files = output.split("\n") +if files[-1] == "": files = files[0:-1] + + +# number of processors and therefore diag files provided as argument +nfiles = len(files) +nprocessors = nfiles + + + +# create some arrays to store the error logs and increment the counters +# note that we also count the number of threads an error occurs in +error_log = [] +error_count = [] +thread_count = [] + + + +#everything now initialised, can collate errors + +for i in range(nfiles): + + filepath = files [i] + + # grep for error summary in the diag file + command = "grep -A 100 'Error summary: End of program' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + + # split the grep output up into lines + data = output.split("\n") + + # now cycle through the lines in output + for j in range(len(data)): + No_log = True # variable which is True if this is a new error + + # check we have a non blank entry to avoid indexing error + if len(data[j])>0: + error = data[j].split() + + # this next line is to check we have an actual error summary and not a string line + if error[0].isdigit(): + + # now get the err log string, and its count + error = data[j].split() + + count = int(error[0]) + log_string = data[j][13:] + + # search for a match in the already fpund errors + for k in range(len(error_log)): + if log_string == error_log[k]: + + No_log = False # we've found a match, increment the counts + error_count[k] += count + thread_count[k] += 1 + + # this is a new error, so append to the log and count arrays + if No_log: + error_log.append ( log_string ) + error_count.append ( count ) + thread_count.append (1) + + +n_logs=len(error_log) + +# print the output to screen +print "Error summary: "+root +print "Collated errors for " + str(nprocessors) + " processors" +print "Recurrences -- Description -- number of threads in which error occurred" +for i in range(n_logs): + print "\t%d -- %s -- %d" % (error_count[i], error_log[i], thread_count[i]) + +# all done. + + + diff --git a/bin/watchdog.py b/bin/watchdog.py new file mode 100755 index 000000000..8ddd5f2d3 --- /dev/null +++ b/bin/watchdog.py @@ -0,0 +1,224 @@ +#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python +#specify your python interpreter path above to run as executable + +''' + +University of Southampton, James Matthews, 130722 + +"watchdog.py" + +This is the during-processing watchdog code to deal with the error logs in +PYTHON's parallel mode. Very similar to py_error.py + +usage and arguments: + + python watchdog.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root + +returns: + + Error summary of ongoing run printed to screen + +130722 JM Coding began -- initial tests conducted successfully + +''' + + +## import modules +import sys, subprocess + + +#help string for user +def help(flag): + ''' help function for user''' + if flag=='help' or flag =='-h': + print '''usage and arguments: + + python py_error.py [-f folder] root + root is the parameter files + -f folder is the folder the diagfiles are in, defaults to diag_root''' + sys.exit(0) + else: print 'Watchdog.py: for help type use -h flag' + +#strip function for comparing error strings (removes actual numbers from error message) +def strip_error(s): + '''little routine which strips numerical digits from errors''' + result_nodigits = ''.join(i for i in s if not i.isdigit()) + result =' '.join( result_nodigits.split() ) + return result + + + + +# read root pf file from command line +if len(sys.argv) > 1: + root = sys.argv[-1] +else: + print 'Error: no arguments provided. Exiting.' + exit (0) + +#print help if needed +help(root) + + + +# set defaults +nprocessors = 1 +diagfolder_name = 'diag_' + root + + +# check for folder args +for i in range(len(sys.argv)): + if sys.argv[i]=="-f": + diagfolder_name = sys.argv[i+1] + + +# list files in folder, put in array 'files' +command = "ls " + diagfolder_name + "/" + root + "_*.diag &" +output = subprocess.check_output ( command , shell=True ) +files = output.split("\n") +if files[-1] == "": files = files[0:-1] + + +# number of processors and therefore diag files provided as argument +nfiles = len(files) +nprocessors = nfiles + + + +# create some arrays to store the error logs and increment the counters +# note that we also count the number of threads an error occurs in + +#2d arrays with index i,j, which store the jth error in thread i, plus the counting array +error_log_thread = [] +error_count_thread = [] + +#errors that have exceeded error counts for each thread are stored here +error_nolonger=[] +error_nolonger_thread=[] + +errors=[] + + +#everything now initialised, can collate errors + +for i in range(nfiles): + + filepath = files [i] + + #two temporary arrays for storing error logs in this thread + #these get appended to the arrays above, error_log_thread + temp_error_log=[] + temp_error_count=[] + temp_errors=[] + + + # grep for error count errors in the diag file + command = "grep 'Error: error_count:' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + + # split the grep output up into lines + data = output.split("\n") + if data[-1] == "": data = data[0:-1] #this is needed because the array has an extra element + + # now cycle through the lines in output and append these message to an array + for j in range(len(data)): + error_nolonger.append(data[j]) + error_nolonger_thread.append(i) + + + + + + + # grep for errors themselves in the diag file + command = "grep 'Error:' " + filepath +"&" + output = subprocess.check_output ( command , shell=True ) + #print output, filepath + + # split the grep output up into lines + data = output.split("\n") + if data[-1] == "": data = data[0:-1] + + # now cycle through the lines in output + for j in range(len(data)): + error_string=strip_error(data[j]) + temp_errors.append(error_string) + No_log=True + + for k in range(len(temp_error_log)): + if error_string==temp_error_log[k]: + No_log = False # we've found a match, increment the counts + temp_error_count[k]+=1 + if No_log: + temp_error_log.append ( error_string ) + temp_error_count.append (1) + + error_log_thread.append(temp_error_log) + error_count_thread.append(temp_error_count) + errors.append(temp_errors) + + +#1d arrays with index i,j, which store the jth error in thread i, plus the counting array +error_log_total = [] +error_count_total = [] +thread_count = [] + + + +#now we cycle over each error log for each thread and count the totals +for i in range(len(error_log_thread)): + #cycle other error_log array for + for j in range(len(error_log_thread[i])): + error_string=error_log_thread[i][j] + error_count=error_count_thread[i][j] + No_log=True + for k in range(len(error_log_total)): + if error_string==error_log_total[k]: + No_log = False # we've found a match, increment the counts + error_count_total[k]+=error_count + thread_count[k] += 1 + if No_log: + error_log_total.append ( error_string ) + error_count_total.append (error_count) + thread_count.append(1) + + + + + + + +n_logs=len(error_log_total) +n_nolonger=len(error_nolonger) + +# print the output to screen + +# first we print the total errors across all scripts +print "WATCHDOG Error summary: "+root +print "Collated errors for " + str(nprocessors) + " processors" +for i in range(n_logs): + print "\t%d -- %s -- %d" % (error_count_total[i], error_log_total[i], thread_count[i]) + + +# now the errors for each thread +print '\n-------------------------------\n' +print 'Errors which will no longer be logged' +print 'Thread -- Error' +for i in range(n_nolonger): + print '%d -- %s %s' % (error_nolonger_thread[i], 'Error count:', error_nolonger[i][57:]) + + +print '\n-------------------------------\n' +for i in range(nprocessors): + print '\n' + print 'Thread %d errors' % i + print 'Recurrences -- Description' + for j in range(len(error_log_thread[i])): + print "\t%d -- %s" % (error_count_thread[i][j], error_log_thread[i][j]) + +# all done. + + + From a4c7a0a87b3c7f7dca626688cedaf3ed835660ec Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Fri, 3 Oct 2014 16:57:50 +0100 Subject: [PATCH 05/10] Another makefile edit to work with travis build check --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index be1a54f06..fe92c796a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,7 +25,7 @@ else PRINT_CLONE = 'No git installed- have to obtain release and data manually from releases page on github. Exiting.' endif -MAKE_SOURCE = cd $(PYTHON)/source; make python; make py_wind; +MAKE_SOURCE = cd $(PYTHON)/source; make CC=$(CMAKE) python; make CC=$(CMAKE) py_wind; From 8ff0e4c99392637b39185b18ddae06188843e052 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Mon, 6 Oct 2014 11:15:09 +0100 Subject: [PATCH 06/10] Quick edit of travis yml and README --- .travis.yml | 2 +- README.md | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index d8199b188..e344a6800 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: #Then clone data - mkdir data - cd data - - git clone --depth=50 --branch=data git://github.com/agnwinds/data.git . + - git clone --depth=50 git://github.com/agnwinds/data.git . script: diff --git a/README.md b/README.md index 16b700bf5..8f3637b44 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,6 @@ Python please contact long@stsci.edu. [![Build Status](https://travis-ci.org/agnwinds/python.png?branch=dev)](https://travis-ci.org/agnwinds/python) -## Getting the radiative transfer code 'Python' - -You can download the required structure under the structure branch. e.g. -git clone https://github.com/agnwinds/python.git -b structure -or simply click on the 'zip' button! - - -Releases of progs can be found under [tags](https://github.com/agnwinds/python/tags "Wiki"). - -Consult the [wiki](https://github.com/agnwinds/python/wiki/_pages "Wiki") for how to install Python. ## Installation @@ -64,6 +54,6 @@ and run the code by typing, e.g. $ py root.pf -Please see the (wiki)[https://github.com/agnwinds/python/wiki/Installing-and-Running-Python] and docs folder for how to use the code. +Please see the [wiki](https://github.com/agnwinds/python/wiki/Installing-and-Running-Python) and docs folder for how to use the code. Any comments, email jm8g08@soton.ac.uk or long@stsci.edu. \ No newline at end of file From f36d7ba29c05a34460878e7f955ec27bb4918049 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Mon, 6 Oct 2014 11:44:49 +0100 Subject: [PATCH 07/10] Another travis yml tweak --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e344a6800..79f3a4373 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,8 +35,7 @@ install: #Then clone data - mkdir data - - cd data - - git clone --depth=50 git://github.com/agnwinds/data.git . + - git clone --depth=50 git://github.com/agnwinds/data.git data script: From ddf8c98319af8cb70c2c92199d7a678964519b0d Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Mon, 6 Oct 2014 11:52:07 +0100 Subject: [PATCH 08/10] travis yml, correct cd path --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 79f3a4373..66831df2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,9 +42,9 @@ script: - echo $PWD - cd source/ - make clean - - make py_wind + - make CC=gcc py_wind - make clean - - cd structure/examples/travis + - cd ../examples/travis - Setup_Py_Dir - py test1 > test1.out - py balmer_test > balmer_test.out From 3949880320868d12defce52707319b31c5a0d7fb Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Tue, 7 Oct 2014 11:44:02 +0100 Subject: [PATCH 09/10] Removed install.txt- install information is in README.md --- INSTALL.txt | 87 ----------------------------------------------------- README.md | 3 +- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 INSTALL.txt diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index f2b4a2379..000000000 --- a/INSTALL.txt +++ /dev/null @@ -1,87 +0,0 @@ -WIKI AND MORE DETAIL CAN BE FOUND AT - -https://github.com/agnwinds/python/wiki - - -### Retrieving the software the first time: -Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved (and most likely recompiled). - - -**If you have git installed:** To obtain the directory structure, simply retrieve it using git as follows to clone the directory structure: - - $ git clone https://github.com/agnwinds/python.git -b structure - -You then need to cd to the new directory and set your environment variables - - $ export PYTHON = /path/to/python/ - $ cd $PYTHON - $ make install - $ make clean # this can take a while, cleaning gsl is a little laborious - -note that export syntax is for bash- for csh use - - $ setenv PYTHON /path/to/python/ - - -**Without git:** Use the ZIP function under the [structures](https://github.com/agnwinds/python/tree/structure "Structure") branch, and then download .tar.gz versions of the python source under [releases](https://github.com/agnwinds/python/releases). - -Once you have a directory /path/to/python/ which contains the structure, place the unpacked tar.gz python source folder under /path/to/python/progs/ - - $ export PYTHON = /path/to/python/ - $ cd $PYTHON - $ make GIT=False install - $ make clean - $ cd progs/python_xx #replace xx version you download - $ make clean - $ make CC=gcc python # if you want to use mpicc, ignore the CC=gcc - $ make clean - -Again, for csh use - - $ setenv PYTHON /path/to/python/ - -As you can tell, the git install is simpler! - -### Setting up environment variables -The only environment variables that is needed is to define PYTHON. For bash or sh users simply place the following: - - export PYTHON=/path/to/python/ - -where $HOME is you would modify $HOME to read something else if you are not installing putting this in your top level directory. You also need to add $PYTHON/bin to your path, e.g:: - - PATH = $PATH:$PYTHON/bin - -for c shell, use the following commands - - setenv PYTHON /path/to/python/ - setenv PATH "${PATH}:${PYTHON}" - -### Running Python - -Once you have added PYTHON to your path, copy the script Setup_Py_Dir to $PYTHON/bin/: - - $ cp $PYTHON/py_progs/setup_scripts/Setup_Py_Dir $PYTHON/bin - -Then go to a directory where you want to do a run with parameter file root.pf - - $ Setup_Py_Dir - $ py root.pf - -The code will now run! - - -### Directory structure - -The python directory structure is fairly simple: - -* progs: location of source code for various fully debugged version of the code -* bin: location of excutables -* data: location for all datafiles. Files that are mainly for reference should be gzipped to save space. Such files are not recreated in -* bin: The location of the executables. (It is a good idea to put this directory in your path) -* software: This directory contains libraries which are used in in python that must be recompiled when creating an installation on a new machine, primarily Bill Pence's cfitsio package and the GNU scientific library gsl -* Example: A directory with a few examples of python runs. (Note that the input files will have changed and so one may not be able to run these examples without some changes in the input files.) - - - - - diff --git a/README.md b/README.md index 8f3637b44..0a6f3d3bb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Python please contact long@stsci.edu. - ## Installation Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved and compiled. @@ -56,4 +55,4 @@ and run the code by typing, e.g. Please see the [wiki](https://github.com/agnwinds/python/wiki/Installing-and-Running-Python) and docs folder for how to use the code. -Any comments, email jm8g08@soton.ac.uk or long@stsci.edu. \ No newline at end of file +Any comments, email jm8g08@soton.ac.uk or long@stsci.edu. From 6355051ce4dfca354ae58450ac6a9ecd54114cf0 Mon Sep 17 00:00:00 2001 From: jhmatthews Date: Tue, 7 Oct 2014 11:46:13 +0100 Subject: [PATCH 10/10] README edit --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a6f3d3bb..e86ed65c1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,11 @@ note that export syntax is for bash- for csh use $ setenv PYTHON /path/to/python/ -Atomic data is stored in our [data repository](https://github.com/agnwinds/data) with it's own releases page. one should unzip these files and place them in the $PYTHON/data folder. +Atomic data is stored in our [data repository](https://github.com/agnwinds/data) with it's own releases page. one should unzip these files and place them in a $PYTHON/data folder. + +A development user may want to work on atomic data as part of their work, and pull in changes as they are made, in which case we recommend cloning the data repository: + + $ cd $PYTHON; git clone https://github.com/agnwinds/data data ## Running python